[SCM] Git repository for pkg-virtuoso branch, master, updated. debian/6.1.3+dfsg1-2.1-8-g140ed05

José Manuel Santamar?==?UTF-8?Q?ía Lema panfaust at gmail.com
Wed May 23 16:07:34 UTC 2012


The following commit has been merged in the master branch:
commit 802a6bc065e9d0eb45c88b856f69607fd0a43397
Author: José Manuel Santamaría Lema <panfaust at gmail.com>
Date:   Wed May 23 16:18:41 2012 +0200

    Imported Upstream version 6.1.5+dfsg1

diff --git a/CREDITS b/CREDITS
index 5eff8e3..d67c41c 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,12 +1,12 @@
 #
-#  $Id: CREDITS,v 1.8.2.6 2010/02/03 15:08:59 source Exp $
+#  $Id: CREDITS,v 1.8.2.7 2012/03/08 12:54:54 source Exp $
 #
 #  CREDITS
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 
 Included Functionality
diff --git a/ChangeLog b/ChangeLog
index b534128..923c411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4795 @@
+2012-03-15 17:16  source
+
+	* Updated version to 6.1.5 for final release
+
+2012-03-15 16:41  source
+
+	* Fixed labels
+
+2012-03-15 16:41  source
+
+	* Fixed minor issues to xbrl
+
+2012-03-15 16:35  source
+
+	* Fixed minor issues
+
+2012-03-15 14:44  source
+
+	* Fixed column name back to __ask_retval for odbc/jdbc connections
+
+2012-03-15 13:57  source
+
+	* Moved define to more logical place
+
+2012-03-15 13:41  source
+
+	* Fixed set default catalog name to %
+
+2012-03-15 13:06  source
+
+	* Fixed enabled tests to run on jdk4
+
+2012-03-15 12:56  source
+
+	* Removed old _JAVA_ pragma
+
+2012-03-15 12:00  source
+
+	* Fixed unhandled rdf type
+
+2012-03-15 11:48  source
+
+	* Rebuild drivers
+
+2012-03-15 11:17  source
+
+	* Fixed leak with statement handles
+
+2012-03-15 11:08  source
+
+	* Added stub isgeometry so point data can be inserted normally
+
+2012-03-15 10:32  source
+
+	* Fixed check for odbc/jdbc connection
+
+2012-03-14 20:46  source
+
+	* Added missing files to distribution
+
+2012-03-14 19:47  source
+
+	* Fixed meta information on ANY type
+
+2012-03-14 14:12  source
+
+	* Updated documentation
+
+2012-03-14 14:07  source
+
+	* Fixed allow http client session to be put on hold and leave thread free
+
+2012-03-14 13:59  source
+
+	* Updated version to 6.1.5-rc3
+
+2012-03-14 13:58  source
+
+	* Updated SSL support
+
+2012-03-14 12:50  source
+
+	* Fixed compiler warning
+
+2012-03-14 12:46  source
+
+	* Fixed set default value for CheckExtentFreePages to 1
+
+2012-03-14 11:40  source
+
+	* Added option to accept pragma
+
+2012-03-14 11:39  source
+
+	* Added entries for entity types and scores
+
+2012-03-14 11:17  source
+
+	* Fixed version of vad package
+
+2012-03-14 11:10  source
+
+	* Fixed use new xlat cb
+
+2012-03-14 11:06  source
+
+	* Fixed small issue
+
+2012-03-14 11:05  source
+
+	* Fixed issue awol:content on stackoverflow.com
+
+2012-03-14 00:46  source
+
+	* Added new SPARQL DESCRIBE modes OBJCBD and SCBD
+
+2012-03-14 00:43  source
+
+	* Fixed issue with Oracle double which should be decimal
+
+2012-03-14 00:42  source
+
+	* Fixed call to xlat_cbk to detect rdf:type etc
+
+2012-03-13 12:07  source
+
+	* Fixed metadata for S, P and O
+
+2012-03-13 12:05  source
+
+	* Fixed set default output:format to _UDBC_ for ODBC/JDBC/.NET apps
+
+2012-03-13 11:51  source
+
+	* Fixed typo in subcode
+
+2012-03-13 11:50  source
+
+	* Fixed when row is deleted, place the single bm entry over it
+
+2012-03-13 11:48  source
+
+	* Fixed issue when codegen takes dtp from 1st param and no ssl exists yet
+
+2012-03-13 11:46  source
+
+	* Fixed issue with union
+
+2012-03-12 22:50  source
+
+	* Updated version to 6.1.5-rc2
+
+2012-03-12 22:45  source
+
+	* Added additional tests
+	* Fixed building/checking vads on VOS
+
+2012-03-12 17:43  source
+
+	* Fixed ignore log files
+
+2012-03-12 17:41  source
+
+	* Fixed issue with Bookmark app that caused user to be logged out
+
+2012-03-12 14:28  source
+
+	* Fixed issue with semaphores on Mac OS X 10.7
+
+2012-03-12 14:25  source
+
+	* Fixed wrong function name
+
+2012-03-12 14:24  source
+
+	* FIxed typo in function name
+
+2012-03-12 10:28  source
+
+	* Added SET EXPLAIN ON and SET SPARQL_TRANSLATE ON options
+
+2012-03-12 10:28  source
+
+	* Fixed issue with fd in binary mode
+
+2012-03-12 10:18  source
+
+	* Added alias _UDBC_ for _JAVA_
+
+2012-03-12 10:17  source
+
+	* Fixed issue if dfe is not initialized yet and used inside gdb
+
+2012-03-11 13:30  source
+
+	* Updated vad version
+
+2012-03-11 13:26  source
+
+	* Fixed use of foaf_check_ssl function
+
+2012-03-09 17:33  source
+
+	* Fixed issue with uninitialized variables
+
+2012-03-09 15:07  source
+
+	* Fixed do not output NULL triples
+
+2012-03-09 14:42  source
+
+	* Added README.GIT
+	* Added discontinuation notice to README.CVS
+
+2012-03-09 14:41  source
+
+	* Added information for Mac OS X 10.7
+
+2012-03-09 13:42  source
+
+	* Fixed compiler warnings
+
+2012-03-08 16:22  source
+
+	* Fixed CRLF
+
+2012-03-08 15:52  source
+
+	* Fixed list of files to distribute for Windows build
+
+2012-03-08 13:52  source
+
+	* Fixed use portable method for escaping symbol for gawk 3 and 4
+
+2012-03-08 13:30  source
+
+	* Updated vad_version
+
+2012-03-08 13:25  source
+
+	* Updated version to 6.1.5-rc1
+
+2012-03-08 12:14  source
+
+	* Added CalDAV
+	* Added ACLs
+	* Added ACL editing for DETs
+	* Added new procedures for WebDAV
+	* Updated private graphs data
+	* Updated to latest SIOC functions
+	* Fixed data generated by SIOC
+	* Fixed 'Create and New' button
+	* Fixed drag and drop
+	* Fixed authentication functions
+	* Fixed issue registering CalDAV links
+	* Fixed check for nulls
+	* Fixed issues with validate
+	* Fixed SyncML owner resources
+	* Fixed issue importing file without timezone info
+	* Fixed CSS load
+	* Fixed clear button in settings
+	* Fixed issue with JSON
+	* Fixed error reporting
+
+2012-03-08 12:08  source
+
+	* Added CardDAV
+	* Added VCARD Property Grouping
+	* Added new procedures for WebDAV
+	* Added ACLs
+	* Added ACL editing for DETs
+	* Added folder selecton for SyncML
+	* Updated private graphs data
+	* Updated ACL items list
+	* Updated latest SIOC functions
+	* Fixed issues importing contacts
+	* Fixed user's image on profile page
+	* Fixed issue with  syncML
+	* Fixed issue with validate
+	* Fixed syncML owner resources
+	* Fixed issue with progress bar after loading contacts
+	* Fixed CSS loading
+	* Fixed clear button in settings
+	* Fixed CSS in footer
+	* Fixed error reporting
+
+2012-03-08 12:03  source
+
+	* Fixed issues with patching versions automatically
+	* Fixed wrong ctype
+	* Fixed bad url
+	* Fixed all columns in the table def
+
+2012-03-08 12:00  source
+
+	* Added 'create' to store in RDF
+	* Added ACLs
+	* Added ACL editing for DETs
+	* Added option to import rdf data from file
+	* Added folder types for CalDAV and CardDAV
+	* Added rule for briefcase folder IRIs
+	* Updated private graphs data
+	* Fixed about dialog
+	* Fixed issue with edit file content
+	* Fixed issue with resource not found on delete
+	* Fixed rdf_sink folder creation
+	* Fixed typos
+	* Fixed DET folder sharing
+	* Fixed syntax checks
+	* Fixed IMAP DET folder params
+	* Fixed IMAP and webmail DETs support
+	* Fixed syncML folders
+	* Fixed versions view
+	* Fixed RDF upload
+	* Fixed linked upload folder
+	* Fixed CSS load
+	* Fixed issue after rename
+	* Fixed issue with group settings
+	* Fixed clear button in settings
+	* Fixed issue with JSON
+	* Fixed error reporting
+
+2012-03-08 11:52  source
+
+	* Updated ACL items list
+	* Updated private graphs data
+	* Updated to latest SIOC functions
+	* Fixed folder creation with bookmark update
+	* Fixed syntax checks
+	* Fixed issue with text index
+	* Fixed pre tag show
+	* Fixed validate bug
+	* Fixed issue with progress bar after loading bookmarks
+	* Fixed CSS loading
+	* Fixed clear button in settings
+	* Fixed issue with JSON
+	* Fixed error reporting
+
+2012-03-08 11:48  source
+
+	* Updated private graphs data
+	* Fixed about dialog
+	* Fixed generated SIOC data
+	* Fixed validate bug
+	* Fixed issue with progress bar after loading contacts
+	* Fixed CSS loading
+	* Fixed clear button in settings
+	* Fixed issue with JSON
+	* Fixed error reporting
+
+2012-03-08 11:46  source
+
+	* Fixed whitespace
+
+2012-03-08 11:46  source
+
+	* Fixed minor issues
+
+2012-03-08 11:44  source
+
+	* Updated private graphs data
+	* Fixed about dialog
+	* Fixed generated SIOC data
+	* Fixed validate bug
+	* Fixed clear button in settings
+	* Fixed footer CSS
+	* Fixed error reporting
+
+2012-03-08 11:41  source
+
+	* Fixed html encoding in title
+
+2012-03-08 11:19  source
+
+	* Fixed issue with vad_version
+
+2012-03-08 11:18  source
+
+	* Added files to ignore
+
+2012-03-08 10:49  source
+
+	* Fixed attachemt problem with rights
+	* Fixed upstream URL
+	* Fixed ordering of acl triggers
+	* Fixed issue with blobs in triggers
+
+2012-03-08 10:46  source
+
+	* Fixed copyright year
+
+2012-03-08 10:39  source
+
+	* Fixed use monospace font for textedit area
+
+2012-03-07 23:45  source
+
+	* Added function xenc_pubkey_ssh_export
+
+2012-03-07 21:14  source
+
+	* Fixed encoding problems
+
+2012-03-07 16:16  source
+
+	* Added function xenc_pubkey_DER_export
+
+2012-03-07 15:28  source
+
+	* Updated documentation
+
+2012-03-07 14:57  source
+
+	* Added missing file
+
+2012-03-07 13:16  source
+
+	* Fixed use vad_version when generating vad packages in VOS
+
+2012-03-07 11:37  source
+
+	* Fixed indentation and whitespace
+
+2012-03-07 11:29  source
+
+	* Fixed typo in json-ld output
+
+2012-03-07 11:28  source
+
+	* Fixed debug lines
+
+2012-03-07 11:27  source
+
+	* Added empty RDF_TRIPLES_BATCH_COMPLETE
+
+2012-03-07 11:23  source
+
+	* Fixed compiler warnings on trigraphs in generated code
+
+2012-03-07 11:16  source
+
+	* Fixed initialization on db creation
+
+2012-03-07 10:56  source
+
+	* Fixed windows build
+
+2012-03-07 10:47  source
+
+	* Added new Visual Studio 11 project files containing rules for both
+	  32bit and 64bit builds
+	* Removed old win32 and win64 build environments
+
+2012-03-07 02:16  source
+
+	* Fixed missing var decl
+
+2012-03-07 02:16  source
+
+	* Updated vad version
+
+2012-03-07 02:09  source
+
+	* Updated vad version to 1.85.83
+
+2012-03-07 02:09  source
+
+	* Fixed demo
+
+2012-03-07 02:08  source
+
+	* Fixed remove duplicate lines
+
+2012-03-07 02:02  source
+
+	* Fixed use of common WebID verifier
+
+2012-03-07 02:00  source
+
+	* Fixed bad code
+
+2012-03-07 01:59  source
+
+	* Added /sparql-oauth
+
+2012-03-07 01:59  source
+
+	* Fixed sparql-webid
+
+2012-03-07 01:59  source
+
+	* Fixed JS errors
+
+2012-03-07 01:58  source
+
+	* Fixed WebID check procedure
+
+2012-03-07 01:57  source
+
+	* Fixed graph issues
+
+2012-03-07 01:56  source
+
+	* Fixed return on sparql errors
+
+2012-03-07 01:56  source
+
+	* Fixed grant permission for API to sponge
+
+2012-03-07 01:55  source
+
+	* Fixed output from verifier
+
+2012-03-07 01:54  source
+
+	* Fixed new param in WebID verifier
+
+2012-03-07 01:54  source
+
+	* Fixed return if no user
+
+2012-03-07 01:53  source
+
+	* Fixed openid registration
+
+2012-03-07 01:53  source
+
+	* Fixed date check
+
+2012-03-07 01:52  source
+
+	* Fixed selecting identifier
+
+2012-03-07 01:51  source
+
+	* Fixed use 15s timeout
+
+2012-03-07 01:51  source
+
+	* Fixed error condition checks
+
+2012-03-07 01:51  source
+
+	* Fixed use vector of vectors
+
+2012-03-07 01:50  source
+
+	* Fixed handling of di:
+
+2012-03-07 01:50  source
+
+	* Fixed copyright year to include 2012
+
+2012-03-07 01:49  source
+
+	* Fixed rdf_sink folder creation for new users
+
+2012-03-07 01:49  source
+
+	* Fixed expiration check
+
+2012-03-07 01:49  source
+
+	* Fixed get WebID function
+
+2012-03-07 01:48  source
+
+	* Fixed copyright year to 2012
+
+2012-03-07 01:48  source
+
+	* Fixed DI URI
+
+2012-03-07 01:47  source
+
+	* Fixed small issue
+
+2012-03-07 01:47  source
+
+	* Fixed same-as
+
+2012-03-07 01:46  source
+
+	* Fixed to preserve content
+
+2012-03-07 01:46  source
+
+	* Added new rule for /mv
+
+2012-03-07 01:46  source
+
+	* Added void to graph
+
+2012-03-07 01:45  source
+
+	* Fixed image show in login
+
+2012-03-07 01:44  source
+
+	* Fixed multiple values in SAN
+
+2012-03-07 01:44  source
+
+	* Fixed VAD upgrade
+
+2012-03-07 01:44  source
+
+	* Added support to enable automatic login
+
+2012-03-07 01:43  source
+
+	* Fixed grant
+
+2012-03-07 01:43  source
+
+	* FIxed key usage
+
+2012-03-07 01:42  source
+
+	* Fixed primary topic should be the profile
+
+2012-03-07 01:41  source
+
+	* Fixed VAD install problem
+
+2012-03-07 01:41  source
+
+	* Added private graphs data
+
+2012-03-07 01:39  source
+
+	* Fixed use get:soft "add"
+
+2012-03-07 01:38  source
+
+	* Fixed vhosts define
+
+2012-03-07 01:37  source
+
+	* Fixed typo
+
+2012-03-07 01:37  source
+
+	* Fixed twitter sha1 post
+
+2012-03-07 01:36  source
+
+	* Added private data in graph
+
+2012-03-07 01:34  source
+
+	* Fixed try sha1 for fingerprint
+
+2012-03-07 01:33  source
+
+	* Added rule for briefcase folder IRIs
+
+2012-03-07 01:32  source
+
+	* Fixed user's image on profile page
+
+2012-03-07 01:32  source
+
+	* Fixed use proper digest
+
+2012-03-07 01:32  source
+
+	* Fixed proper namespace
+
+2012-03-07 01:31  source
+
+	* Fixed use new property
+
+2012-03-07 01:30  source
+
+	* Added option to ask to delete data
+
+2012-03-07 01:29  source
+
+	* Fixed use sponger
+
+2012-03-07 01:28  source
+
+	* Fixed verification
+
+2012-03-07 01:28  source
+
+	* Added more checks
+
+2012-03-07 01:27  source
+
+	* Fixed search twitter for tweet
+
+2012-03-07 01:26  source
+
+	* Fixed check for fingerprint
+
+2012-03-07 01:26  source
+
+	* Fixed page show and SIOC data
+
+2012-03-07 01:25  source
+
+	* Fixed labels
+
+2012-03-07 01:25  source
+
+	* Fixed ampersand
+
+2012-03-07 01:24  source
+
+	* Fixed MIME type for JSON-LD to application/ld+json
+
+2012-03-07 01:24  source
+
+	* Fixed ODS upgrade proc
+
+2012-03-07 01:23  source
+
+	* Fixed row selection style
+
+2012-03-07 01:23  source
+
+	* Fixed issues with session expire in new ODS UI
+
+2012-03-07 01:21  source
+
+	* Fixed SPARQL clear graph
+
+2012-03-07 01:20  source
+
+	* Fixed path to OAT style sheets
+
+2012-03-07 01:19  source
+
+	* Fixed missing CSS file
+
+2012-03-07 01:18  source
+
+	* Fixed call to obsolete hostip
+
+2012-03-07 01:17  source
+
+	* Upgraded ODS css
+
+2012-03-07 01:16  source
+
+	* Fixed JS table API
+
+2012-03-07 01:16  source
+
+	* Fixed photo value
+
+2012-03-07 01:16  source
+
+	* Fixed deactivate user
+
+2012-03-07 01:15  source
+
+	* Fixed photo show
+
+2012-03-07 01:14  source
+
+	* Fixed triggers
+
+2012-03-07 01:13  source
+
+	* Added option to deactivate user
+
+2012-03-07 01:12  source
+
+	* Fixed common applications CSS
+
+2012-03-07 01:11  source
+
+	* Fixed tab labels
+
+2012-03-07 01:10  source
+
+	* Fixed WebID login
+
+2012-03-07 01:09  source
+
+	* Fixed login dialog with unregistered users
+
+2012-03-07 01:09  source
+
+	* Fixed labels and CSS for Firefox
+
+2012-03-07 01:07  source
+
+	* Added new verification proc
+
+2012-03-07 01:06  source
+
+	* Added QRCode
+
+2012-03-07 01:05  source
+
+	* Updated WebID demo pages
+
+2012-03-07 01:04  source
+
+	* Added WebID WaterMark
+
+2012-03-07 00:57  source
+
+	* Fixed HREF to not need proxy
+
+2012-03-07 00:56  source
+
+	* Added proxy url
+
+2012-03-07 00:56  source
+
+	* Added data graph associated with the WebID
+	* Fixed present WebID as link
+	* Fixed syntax
+
+2012-03-07 00:54  source
+
+	* Fixed WebID to be presented as link
+
+2012-03-07 00:53  source
+
+	* Fixed warning if no key found
+
+2012-03-07 00:52  source
+
+	* Removed fixed link from webid_demo pages
+
+2012-03-07 00:49  source
+
+	* Added new /ods/webid endpoint
+
+2012-03-07 00:47  source
+
+	* Updated WebID 1.0 spec
+
+2012-03-07 00:44  source
+
+	* Added callback
+
+2012-03-07 00:42  source
+
+	* Fixed webid_demo https requirements
+
+2012-03-07 00:41  source
+
+	* Fixed photo url
+
+2012-03-07 00:38  source
+
+	* Added WebID demo pages
+
+2012-03-06 23:46  source
+
+	* Fixed SPARQL initialization
+
+2012-03-06 20:12  source
+
+	* Added extra MALLOC_DEBUG checks
+
+2012-03-06 17:10  source
+
+	* Fixed MALLOC_DEBUG support for box_iri_id()
+
+2012-03-06 16:54  source
+
+	* Updated vad_version to 1.34.22
+
+2012-03-06 16:48  source
+
+	* Fixed copyright comment
+
+2012-03-06 16:32  source
+
+	* Added StackOverflow cartridge
+
+2012-03-06 16:31  source
+
+	* Added support for DI: in mail address
+
+2012-03-06 16:28  source
+
+	* Fixed tsuite failure
+
+2012-03-06 16:28  source
+
+	* Fixed qualify opl:mentions  with cartridge identifier
+
+2012-03-06 16:27  source
+
+	* Added function dbpedia_url_label
+
+2012-03-06 16:26  source
+
+	* Fixed issues with RM_CLEAN_DEST
+
+2012-03-06 16:25  source
+
+	* Added logging to NYT Article cartridge
+
+2012-03-06 16:25  source
+
+	* Added Angellist ontology and cartridge
+	* Added generic blog-URL links to oplbase
+
+2012-03-06 16:23  source
+
+	* Added oplbase ontology
+
+2012-03-06 16:22  source
+
+	* Added binding subproperty in new oplbase: ontology
+	* Aligned social-profile-url property across some social cartridges
+
+2012-03-06 16:21  source
+
+	* Added Crunchbase ontology
+	* Added DBpedia Spotlight ontology
+
+2012-03-06 16:16  source
+
+	* Fixed LinkedIn cartridge
+
+2012-03-06 16:15  source
+
+	* Fixed Amazon cartridge to work with new Product Advertising API
+
+2012-03-06 16:14  source
+
+	* Added support for extracting all meta and link head-element data from
+	  XHTML documents
+
+2012-03-06 16:13  source
+
+	* Fixed handling of # in About header
+
+2012-03-06 16:08  source
+
+	* Fixed DI: handling
+
+2012-03-06 16:07  source
+
+	* Addded webid via DI: text link
+
+2012-03-06 16:07  source
+
+	* Fixed DI: like mask
+
+2012-03-06 16:06  source
+
+	* Fixed DI: detection
+
+2012-03-06 16:06  source
+
+	* Fixed twitter profile
+
+2012-03-06 16:06  source
+
+	* Added post-processing script for generating owl:sameAs links for
+	  co-reference resolution
+
+2012-03-06 15:41  source
+
+	 * Fixed typos
+
+2012-03-06 15:35  source
+
+	* Added DI spoort for certs
+	* Fixed xslt, no xmlns
+
+2012-03-06 15:34  source
+
+	* Fixed copyright year
+
+2012-03-06 15:33  source
+
+	* Added support for ld+json and microdata+json
+
+2012-03-06 15:32  source
+
+	* Added curl examples for other structured data formats
+
+2012-03-06 15:32  source
+
+	* Fixed rdf mapper logging
+
+2012-03-06 15:31  source
+
+	* Fixed bad fmt
+
+2012-03-06 15:31  source
+
+	* Fixed extraction of a cert:key from sioc:content
+
+2012-03-06 15:29  source
+
+	* Fixed key in vcard
+
+2012-03-06 15:29  source
+
+	* Fixed link to the dataset
+
+2012-03-06 15:28  source
+
+	* Added Klout extractor cartridge
+
+2012-03-06 15:28  source
+
+	* Added New York Times Article cartridge
+
+2012-03-06 15:27  source
+
+	* Added get:cartridge option
+
+2012-03-06 15:21  source
+
+	* Fixed sponger front pages
+
+2012-03-06 15:21  source
+
+	* Added NTY ontology
+
+2012-03-06 15:20  source
+
+	* Fixed check to ensure only access tokens granted to sponger are used
+
+2012-03-06 15:19  source
+
+	* Added Klout ontology
+
+2012-03-06 15:19  source
+
+	* Added twitter v2 screen_name
+
+2012-03-06 15:18  source
+
+	* Fixed sponger frontpage
+	* Added Foursquare button
+
+2012-03-06 15:13  source
+
+	* Added support for flagging access tokens as invalid in FB cartridge
+
+2012-03-06 15:13  source
+
+	* Added sponger param
+
+2012-03-06 15:13  source
+
+	* Fixed Facebook cartridge
+
+2012-03-06 15:12  source
+
+	* Fixed equivproperties etc
+
+2012-03-06 15:12  source
+
+	* Fixed long descs
+
+2012-03-06 15:11  source
+
+	* Added OpenGraph mapping
+
+2012-03-06 15:10  source
+
+	* Added FB Parrot specification classes/properties
+
+2012-03-06 15:10  source
+
+	* Fixed ordering needs an int
+
+2012-03-06 15:09  source
+
+	* Added code to delete orig triples
+
+2012-03-06 15:08  source
+
+	* Fixed minor issues
+
+2012-03-06 15:06  source
+
+	* Added support for paging over large collections to FB cartridge
+
+2012-03-06 15:05  source
+
+	* Fixed shadow var
+
+2012-03-06 15:04  source
+
+	* Fixed use triple dict
+
+2012-03-06 15:04  source
+
+	* Added cert ontology
+
+2012-03-06 15:03  source
+
+	* Fixed cert in html
+
+2012-03-06 15:03  source
+
+	* Fixed syntax
+
+2012-03-06 15:02  source
+
+	* Added equivalence triples for linkedin
+
+2012-03-06 15:02  source
+
+	* Fixed use batch request for facebook
+	* Added hasCertificate property in relevant cartridges
+
+2012-03-06 15:01  source
+
+	* Fixed run fb only on facebook uri
+
+2012-03-06 15:00  source
+
+	* Fixed cert property
+	* Fixed opengraph returns 1/-1 depending on mime type
+
+2012-03-06 14:59  source
+
+	* Fixed favour activity_title over providerTitle for Google+
+
+2012-03-06 14:58  source
+
+	* Fixed wrong property
+
+2012-03-06 14:58  source
+
+	* Fixed google plus cartridge
+
+2012-03-06 14:52  source
+
+	* Added Twitter ontology to dbpedia, foaf, sioc, vcard etc ontologies
+
+2012-03-06 14:52  source
+
+	* Removed equivalent triples
+
+2012-03-06 14:51  source
+
+	* Fixed check if operation returned triples and set flag appropriately
+
+2012-03-06 14:50  source
+
+	* Fixed use uppercase proedure names
+
+2012-03-06 14:49  source
+
+	* Identify application agent used for posting to twitter v2 cartridge
+
+2012-03-06 14:48  source
+
+	* Moved mappings from google plus
+
+2012-03-06 14:47  source
+
+	* Added mappings to BIBO, Dublin Core, FOAF, vCard, SIOC, Dbpedia
+
+2012-03-06 14:44  source
+
+	* Fixed bad expression
+
+2012-03-06 14:44  source
+
+	* Added check for RDF content-type
+	* Added doc links
+
+2012-03-06 14:42  source
+
+	* Changed datatype of oplgp:published/oplgp:updated to xsd:dateTime
+
+2012-03-06 14:41  source
+
+	* Fixed status handling
+
+2012-03-06 14:37  source
+
+	* Fixed missing stop timer
+
+2012-03-06 14:33  source
+
+	* Fixed status
+
+2012-03-06 14:33  source
+
+	* Added status
+
+2012-03-06 14:29  source
+
+	* Fixed minor issue
+
+2012-03-06 14:28  source
+
+	* Fixed do not use bnodes for labels
+
+2012-03-06 14:27  source
+
+	* Fixed need triple dict as 1st argument
+
+2012-03-06 14:27  source
+
+	* Fixed use dictionary
+
+2012-03-06 14:22  source
+
+	* Fixed SocialStatistics
+
+2012-03-06 14:22  source
+
+	* Added function XSLT_SANEURI
+
+2012-03-06 14:21  source
+
+	* Added support for sponging Albums in Facebook cartridge
+
+2012-03-06 14:20  source
+
+	* Replaced namedEntityConcept by entityType property
+
+2012-03-06 14:18  source
+
+	* Fixed date parsing
+
+2012-03-06 14:18  source
+
+	* Added SocialStatistics cartridge
+
+2012-03-06 14:16  source
+
+	* Fixed make html default choice
+
+2012-03-06 14:16  source
+
+	* Added Linkedin Shares cartridge
+
+2012-03-06 14:15  source
+
+	* Added new FP signature
+
+2012-03-06 14:09  source
+
+	* Fixed match mime type
+
+2012-03-06 14:08  source
+
+	* Fixed deprecated items
+
+2012-03-06 12:45  source
+
+	* Added option to specify the accept header
+
+2012-03-06 12:43  source
+
+	* Added support for XHTML+Microdata
+	* Added common infrastructure for RDF-specific XML parsers
+	* Fixed memory leaks
+
+2012-03-06 12:40  source
+
+	* Fixed redundant self-comparison in min_nonnull and max_nonnull
+
+2012-03-06 12:34  source
+
+	* Fixed compiler warnings
+
+2012-03-06 12:30  source
+
+	* Fixed permission check reading XML file
+
+2012-03-06 12:28  source
+
+	* Fixed MALLOC_DEBUG support
+
+2012-03-06 10:43  source
+
+	* Added function to get local filename from "path" portion of IRIs
+
+2012-03-06 10:22  source
+
+	* Ignore generated files
+
+2012-03-06 10:21  source
+
+	* Fixed integer overflow
+
+2012-03-06 10:20  source
+
+	* Fixed build dependancy
+
+2012-03-05 17:38  source
+
+	* Fixed whitespace
+
+2012-03-05 17:25  source
+
+	* Fixed issue saving state
+
+2012-03-05 17:22  source
+
+	* Fixed typo
+
+2012-03-05 17:21  source
+
+	* Added XSL for setting location in COND
+
+2012-03-05 17:14  source
+
+	* Fixed missing image
+
+2012-03-05 17:11  source
+
+	* Updated vad version to 1.11.70
+
+2012-03-05 17:10  source
+
+	* Fixed issue distinguishing lables between various NLP cartridges
+
+2012-03-05 17:09  source
+
+	* Fixed keep info in permalink
+
+2012-03-05 17:08  source
+
+	* Added oplweb ontology
+
+2012-03-05 17:07  source
+
+	* Fixed suppress errors if any
+
+2012-03-05 17:07  source
+
+	* Fixed functionality between /about and /describe
+
+2012-03-05 17:06  source
+
+	* Added generation of Pivot link for entities-list view type
+
+2012-03-05 17:06  source
+
+	* Added registry setting for CSS stylesheet
+	* Fixed copyright statements
+	* Fixed map initialization
+	* Fixed problem with Class URIs
+
+2012-03-05 17:04  source
+
+	* Fixed debug statements
+
+2012-03-05 17:03  source
+
+	* Fixed check if data is returned as it can timeout transaction without
+	  any data
+
+2012-03-05 17:02  source
+
+	* Added check for wide labels
+
+2012-03-05 17:01  source
+
+	* Fixed copyright statement on describe page
+
+2012-03-05 17:00  source
+
+	* Added more labels in the ontology
+
+2012-03-05 17:00  source
+
+	* Added registry key for data license markup
+	* Fixed missing datatype in some conditionals
+	* Fixed datatype selector to reflect last clicked value dtp
+
+2012-03-05 16:55  source
+
+	* Fixed missing initialization
+
+2012-03-05 16:54  source
+
+	* Fixed initialization of the main page
+
+2012-03-05 16:54  source
+
+	* Added encoding page in permalink in describe
+	* Fixed regression disabling the COND UI
+
+2012-03-05 16:53  source
+
+	* Added permalink for usage stats page
+
+2012-03-05 16:52  source
+
+	* Fixed small bug
+
+2012-03-05 16:51  source
+
+	* Fixed missing menu on Metadata page
+	* Fixed header on Metadata and Settings pages
+	* Fixed formatting of SID in sponger link
+
+2012-03-05 16:50  source
+
+	* Fixed qrcode link
+
+2012-03-05 16:49  source
+
+	* Added support for AddThis
+	* Added registry keys to override debug output
+	* Fixed bad icons by using text links
+	* Small CSS tweaks
+
+2012-03-05 13:15  source
+
+	* Fixed handing of wide/narrow labels
+
+2012-03-05 13:15  source
+
+	* Fixed label order
+
+2012-03-05 13:14  source
+
+	* Fixed guessing Type label for entities
+	* Fixed rendering of set class UI when no class is found
+
+2012-03-05 13:13  source
+
+	* Fixed sponger parameter
+
+2012-03-05 13:13  source
+
+	* Added prefixes
+	* Fixed sponger call
+
+2012-03-05 13:12  source
+
+	* Added better indication of current focus in query description
+	* Fixed display of entities list when focused on e1
+	* Fixed display of "Describe" link for URIs
+	* Removed extra page elems when query has no result
+	* Minor typography and colour tweaks.
+
+2012-03-05 13:01  source
+
+	* Fixed permalink
+
+2012-03-05 13:00  source
+
+	* Fixed description page to not generate a sid in sponger link
+
+2012-03-05 13:00  source
+
+	* Fixed default mode in /about
+
+2012-03-05 12:59  source
+
+	* Added mode for sponger
+
+2012-03-05 12:59  source
+
+	* Fixed pager button
+
+2012-03-05 12:58  source
+
+	* Fixed check for lang
+
+2012-03-05 12:57  source
+
+	* Added new pager to allow change page lenght and jump to row number
+
+2012-03-05 12:56  source
+
+	* Fixed description page when encountering labels of numeric DTP
+
+2012-03-05 12:56  source
+
+	* Added better remore debug logging facility
+
+2012-03-05 12:54  source
+
+	* Fixed use EN if no language specified
+
+2012-03-05 12:54  source
+
+	* Fixed use short summary when available
+
+2012-03-05 12:53  source
+
+	* Fixed description page dropdown to show distinct IRI
+	* Fixed description page to show curie of page resource uri in title
+
+2012-03-05 12:52  source
+
+	* Fixed description page to use CURIEs in the constrain facet to type
+	  dropdown
+
+2012-03-05 12:51  source
+
+	* Fixed description page to allow selection of class as FCT starting
+	  point when the entity is member of many classes
+
+2012-03-05 12:50  source
+
+	* Fixed layout of demo queries page
+	* Fixed display of detailed information in error handler
+	* Fixed setting empty default graph in SPARQL query link
+
+2012-03-05 12:47  source
+
+	* Fixed check lenght
+
+2012-03-05 12:46  source
+
+	* Added better handling of strings with LAND for BETWEEN condition
+
+2012-03-05 12:46  source
+
+	* Added workaround for narrow cset in literals
+
+2012-03-05 12:45  source
+
+	* Added check for bnodes
+
+2012-03-05 12:45  source
+
+	* Fixed typo in locating throbber file name
+	* Fixed  display of autolocating NEAR cond in query description
+	* Fixed generation of conditionals in UI
+	* Fixed missing hyphen in pager indicator for range of results
+
+2012-03-05 12:43  source
+
+	* Added xsl to strip lat/long from autoacquire cond permalinks
+
+2012-03-05 12:42  source
+
+	* Fixed bug causing addig NEAR COND in Firefox to fail
+
+2012-03-05 12:41  source
+
+	* Fixed bug adding location marker
+
+2012-03-05 12:39  source
+
+	* Added support for autolocating proximity queries
+
+2012-03-05 12:32  source
+
+	* Fixed small bugs
+
+2012-03-05 12:30  source
+
+	* Fixed datatype field showing up in contains cond UX
+	* Fixed generation of conds without enclosing property pattern
+
+2012-03-05 12:28  source
+
+	* Fixed fct_view_pos to return value 0 in case of an empty tree
+
+2012-03-05 12:06  source
+
+	* Updated vad version
+
+2012-03-05 12:05  source
+
+	* Merged replication pages
+
+2012-03-05 12:04  source
+
+	* Added option to browse table definitions
+
+2012-03-05 12:03  source
+
+	* Fixed message
+
+2012-03-05 12:02  source
+
+	* Added option to scope ACL to a VD
+
+2012-03-05 12:01  source
+
+	* Fixed rdfmapper logging
+
+2012-03-05 12:01  source
+
+	* Added support for r2rml graph generation
+
+2012-03-05 12:00  source
+
+	* Fixed do not use autoritykeyid
+
+2012-03-05 11:59  source
+
+	* Added initial pages for r2rml
+
+2012-03-05 11:57  source
+
+	* Added support for unicode strings in password
+
+2012-03-05 11:47  source
+
+	* Fixed copyright to include 2012
+
+2012-03-05 11:45  source
+
+	* Updated copyright to include 2012
+
+2012-03-05 11:45  source
+
+	* Fixed use dbpedia url for testing
+
+2012-03-05 11:43  source
+
+	* Added asynchronous connection detection for DAV
+
+2012-03-05 11:42  source
+
+	* Fixed use Grid View as initial tab
+	* Fixed use raw iris instead of shortened
+
+2012-03-05 11:40  source
+
+	* Fixed copyright year to include 2012
+
+2012-03-05 11:37  source
+
+	* Fixed issue with rdf_mappers
+
+2012-03-05 11:34  source
+
+	* Added more types to check
+
+2012-03-05 11:33  source
+
+	* Fixed use new WebiD module
+
+2012-03-05 11:32  source
+
+	* Fixed issue with sink folder
+
+2012-03-05 11:31  source
+
+	* Fixed return http status 500 when execution fails
+
+2012-03-05 00:08  source
+
+	* Updated version to 3.60
+
+2012-03-04 23:58  source
+
+	* Fixed  problem with blobs when using getString()
+
+2012-03-03 10:36  source
+
+	* Fixed XMLA Columns, PrimaryKey and Foreignkey
+
+2012-03-03 09:56  source
+
+	* Fixed ignore generated files
+
+2012-03-03 09:55  source
+
+	* Removed bad symbol
+
+2012-03-03 02:09  source
+
+	* Added function virt_mbrlen
+
+2012-03-03 02:08  source
+
+	* Fixed skip internal options
+
+2012-03-03 02:07  source
+
+	* Fixed memleak
+
+2012-03-03 02:06  source
+
+	* Fixed potential filedesc leak
+
+2012-03-03 02:05  source
+
+	* Added function strses_wide_string
+
+2012-03-03 00:03  source
+
+	* Added TRIG formatter
+	* Updated TRIG parser to comply with latest draft spec
+
+2012-03-02 23:57  source
+
+	* Added support for SPARQL 1.1 WITH, USING, NAMED
+	* Added support for SPARQL 1.1 Update
+
+2012-03-02 23:37  source
+
+	* Added human-readable HTML output for DESCRIBE (list and table)
+
+2012-03-02 23:10  source
+
+	* Added functionnumeric_rescale_noround
+
+2012-03-02 22:48  source
+
+	* Added support for long nvarchar
+
+2012-03-02 22:34  source
+
+	* Fixed dump of all subject entries
+
+2012-03-02 22:33  source
+
+	* Fixed use graph in the r2rml graph
+
+2012-03-02 22:32  source
+
+	* Fixed FOAF query
+
+2012-03-02 22:15  source
+
+	* Updated version of sparql internals to match cached resources
+
+2012-03-02 22:11  source
+
+	* Fixed warning from gperf by using different way to calculate hash key
+
+2012-03-02 22:09  source
+
+	* Applied missing patch
+
+2012-03-02 21:53  source
+
+	* Small cleanups
+
+2012-03-02 21:52  source
+
+	* Added support for SELECT scalar_expression subqueries without FROM
+	  clause to avoid extra lock on fake subqueries like:
+	  (SELECT TOP 1 scalar_expression FROM nonempty_table) AS alias
+
+2012-03-02 21:48  source
+
+	* Fixed additional case of SPARQL OPTIONAL bug
+
+2012-03-02 21:45  source
+
+	* Fixed buildin call to IN
+
+2012-03-02 21:42  source
+
+	* Fixed problem where /sparql endpoint seems to retain graph data
+	  after deletion
+
+2012-03-02 21:37  source
+
+	* Added difference between DB.DBA.rdf_...impl() stored procedures
+	  and rdf_.._impl() BIFs for SPARQL 1.1
+
+2012-03-02 21:32  source
+
+	* Added additional checking if two variables are equal
+
+2012-03-02 21:26  source
+
+	* Added nice syntax for declarations of macro libraries
+
+2012-03-02 21:22  source
+
+	* Added support for SPARQL 1.1 ISNUMERIC()
+	* Added enhancements to codegen to speed up fake subqueries
+	* Fixed checks in ISREF() and ISLITERAL for nullable arguments
+
+2012-03-02 19:23  source
+
+	* Fixed debug code
+
+2012-03-02 18:54  source
+
+	* Fixed JSON-LD syntax to match recent draft of the spec
+
+2012-03-02 18:51  source
+
+	* Fixed compiler warnings
+
+2012-03-02 18:49  source
+
+	* Fixed need to escape amp etc in rdf/xml
+
+2012-03-02 18:48  source
+
+	* Fixed mixed declarations and code
+
+2012-03-02 18:47  source
+
+	* Added support for wide strings in all SPARQL serializers
+	  (Turtle-like, NT, JSONs and SPARQL-XML result set)
+
+2012-03-02 18:45  source
+
+	* Fixed output of bnodes in RDF/XML format
+
+2012-03-02 18:42  source
+
+	* Fixed warnings
+
+2012-03-02 18:40  source
+
+	* Fixed CONTRUCT with constant "string"@lang
+
+2012-03-02 18:37  source
+
+	* Added new RDF/XML printer (fater + pretty print)
+	* Fixed CONSTRUCT with constant string objects with language
+	* FIxed bad TTL output for DV_WIDE objects
+
+2012-03-02 18:32  source
+
+	* Fixed memory leak
+
+2012-03-02 18:24  source
+
+	* Fixed whitespace
+
+2012-03-02 18:23  source
+
+	* Fixed do not use etag when  using no-cache
+
+2012-03-02 18:19  source
+
+	* Added support for base64url encode/decode functions
+
+2012-03-02 18:14  source
+
+	* Added missing setting for ShortenLongURIs in SPARQL section
+
+2012-03-02 12:43  source
+
+	* Removed debug code
+
+2012-03-02 11:13  source
+
+	* Added DBpedia vad package to VOS release
+
+2012-02-27 01:16  source
+
+	* Added initial r2rml generator
+
+2012-02-27 01:13  source
+
+	* Fixed whitespace
+
+2012-02-27 01:08  source
+
+	* Added support for new SPARQL 1.1 BIFs
+
+2012-02-26 17:11  source
+
+	* Added initial implementation of SPARQL 1.1 functions
+
+2012-02-26 15:28  source
+
+	* Added support of comparions of DV_WIDE with DV_STRINGs flaged by
+	  BF_UTF8 or BF_IRI
+
+2012-02-26 15:17  source
+
+	* Fixed show http threads vs. internal calls
+
+2012-02-26 15:16  source
+
+	* Fixed get full name for procedure
+
+2012-02-26 15:07  source
+
+	* Added support of comparision of DV_WIDE with DV_STRING flagged
+	  by BF_URF8 or BF_IRI
+
+2012-02-26 15:04  source
+
+	* Added different digest for fingerprint
+
+2012-02-26 15:03  source
+
+	* Added hex2bin function
+
+2012-02-26 15:01  source
+
+	* Fixed low selectivity of min bnode call
+
+2012-02-26 15:00  source
+
+	* Fixed copyright year to 2012
+
+2012-02-26 14:59  source
+
+	* Fixed issue with ORDER BY
+
+2012-02-26 14:56  source
+
+	* Added flag for binary blob in sqlgetdata
+
+2012-02-26 14:52  source
+
+	* Added check for rd & tmp key when page check is enabled
+
+2012-02-26 14:49  source
+
+	* Added optional digest for x509 generator
+
+2012-02-26 13:54  source
+
+	* Extended SPARQL macro syntax to allow any IRI syntax
+
+2012-02-26 13:16  source
+
+	* Fixed invalid SQL
+
+2012-02-26 13:15  source
+
+	* Fixed resultSet of xmla_dbschema_columns
+	* Fixed call parameters to xmla_dbchema_tables
+
+2012-02-26 13:13  source
+
+	* Fixed describe should return 3 rows
+
+2012-02-15 13:46  source
+
+	* Added check for out slots
+
+2012-02-15 01:16  source
+
+	* Added flag to create text index in silent mode
+
+2012-02-15 01:14  source
+
+	* Fixed do not check preds are placed when there is no from clause
+
+2012-01-31 13:50  source
+
+	* Fixed handling of primarykeys and foreignkeys in XMLA
+
+2012-01-24 00:43  source
+
+	* Added alt link in header
+
+2012-01-24 00:39  source
+
+	* Fixed DET ACLs
+
+2012-01-24 00:34  source
+
+	* Fixed issues with CalDav and Mac OS X 10.6
+
+2012-01-18 20:46  source
+
+	* Added ld+json
+
+2012-01-17 12:15  source
+
+	* Fixed cannot use inline macro as it may read past end of buffer
+
+2012-01-12 19:15  source
+
+	* Added support for scoping ACL to a virtual dir
+
+2012-01-12 11:21  source
+
+	* Added flag to know if conten-len actually is read
+
+2012-01-10 14:22  source
+
+	* Added pragma "get:cartridge"
+
+2012-01-10 14:21  source
+
+	* Added support for "define get:..." options in SPARUL LOAD
+
+2012-01-10 14:17  source
+
+	* Fixed debug output
+
+2012-01-10 14:16  source
+
+	* Fixed allow underline in ?actor_name as part of regular SPARQL
+
+2012-01-10 14:04  source
+
+	* Fixed indentation
+
+2012-01-10 14:02  source
+
+	* Fixed do not write end of message to output
+
+2012-01-10 13:57  source
+
+	* Fixed should not kill transactions when checkpoint is pending
+
+2012-01-10 13:54  source
+
+	* Added support functions for SPARQL Macro library syntax
+
+2012-01-10 13:53  source
+
+	* Fixed minor issues
+
+2012-01-10 13:50  source
+
+	* Added support for get:soft add to proxy service
+
+2012-01-09 14:42  source
+
+	* Added support for CardDAV
+	* Fixed updating Apple calendars
+
+2012-01-09 14:41  source
+
+	* Fixed must have certain permissions to do cleanup
+
+2011-12-14 16:05  source
+
+	* Added human readable HTML outputs for DESCRIBE (list and table)
+
+2011-12-14 15:57  source
+
+	* Fixed check for scope
+
+2011-12-14 15:56  source
+
+	* Fixed support for sparql load <file:///....> i.e. with absolute path
+	  from system root
+
+2011-12-14 15:52  source
+
+	* Added support for wide and long-wide blobs
+
+2011-12-14 15:50  source
+
+	* Added atomic mode
+	* Added log mode parameter
+
+2011-12-14 15:48  source
+
+	* Fixed crash if stmt is invalid
+
+2011-12-08 21:25  source
+
+	* Added support for get:soft "add"
+
+2011-12-08 21:23  source
+
+	* Fixed RDF/XML parser to pass w3c tests dated 2003-Nov.
+
+2011-12-08 21:19  source
+
+	* Fixed if ssl session, make it regular as an error can leave it as ssl
+
+2011-12-08 21:16  source
+
+	* Added new function RDF_VIEW_DROP_STMT_BY_GRAPH
+
+2011-12-08 21:15  source
+
+	* Fixed only kill txn when we have the lt, else we should wait
+
+2011-12-08 21:11  source
+
+	* Fixed issue in IRI splitter used by RDFa serializer when namespace
+	  ends in '%' if the last char of the original IRI was %nn
+
+2011-12-08 21:08  source
+
+	* Added new function DB.DBA.RDF_GRAPH_USER_PERMS_DEL
+
+2011-11-29 14:31  source
+
+	* Fixed reduntant lock on DB.DBA.RDF_QUAD is removed in cases where
+	  RDF_QUAD was used as a stub
+
+2011-11-29 14:14  source
+
+	* Fixed labels
+
+2011-11-29 14:14  source
+
+	* Fixed use different physical graphs
+
+2011-11-29 13:53  source
+
+	* Added message OAT_MAP_API_LOADED in map API
+	* Added detection of right click in ghostdrag.js
+	* Added option raw-irix that disables URI shortning (namespave systhesis)
+	  in the rdf viewer components
+	* Updated version to 2.9.3
+
+2011-11-29 13:35  source
+
+	* Fixed conditional on long/short in mutex_try_enter
+	* Fixed problem with MTX_DEBUG
+
+2011-11-29 10:11  source
+
+	* Fixed webid
+
+2011-11-29 10:10  source
+
+	* Removed duplicate procedure
+
+2011-11-29 10:06  source
+
+	* Updated sparql metadata version
+
+2011-11-29 00:01  source
+
+	* Fixed int64 comparision
+
+2011-11-28 21:18  source
+
+	* Added initial support for SPARQL MACRO
+
+2011-11-28 21:15  source
+
+	* Fixed types
+
+2011-11-28 20:59  source
+
+	* Fixed expression logic
+
+2011-11-28 12:15  source
+
+	* Added RDF_VIEW_SYNC_TO_PHYSICAL API call
+
+2011-11-28 10:11  source
+
+	* Added extra alias E_MAIL to options field
+
+2011-11-28 10:10  source
+
+	* Added support for nvarchar passwords
+
+2011-11-28 10:09  source
+
+	* Fixed show maintenance page when database is in atomic lock
+
+2011-11-28 10:07  source
+
+	* Fixed crash on passing NULLs to xpath_funcall with functions that
+	  do not support NULLs
+
+2011-11-28 09:58  source
+
+	* Fixed issue with bad characters in long doublequoted strings
+
+2011-11-21 14:13  source
+
+	* Added support function for sponger to use dictionary for loading
+	  the main stream
+
+2011-11-21 14:10  source
+
+	* Added argument to sparql_rdb2rdf_codegen() that describes the
+	  translation of graph IRIs
+
+2011-11-21 13:43  source
+
+	* Fixed use options to make a physical graph different than a virtual
+
+2011-11-17 14:41  source
+
+	* Added aq_max_threads to sys_stat
+
+2011-11-17 14:39  source
+
+	* Fixed do not reset memcache flag for non-numeric dtps
+
+2011-11-16 15:27  source
+
+	* Fixed expressions should use NOT NULL
+
+2011-11-16 10:24  source
+
+	* FIxed if arg is already an XML entity, just copy it
+
+2011-11-16 10:23  source
+
+	* Fixed if dfe_tree is changed we cannot find the dfe later, so
+	  make full copy, modify and pass it on
+
+2011-11-16 10:21  source
+
+	* Fixed integrity of graph security objects
+
+2011-11-16 10:18  source
+
+	* Fixed when left hand side of expr returns unknown, test the right hand
+	  side for false, if so then return false
+
+2011-10-28 23:28  source
+
+	* Updated version to 6.1.4 for final release
+
+2011-10-28 23:22  source
+
+	* Enabled check for bad index due to XML fragment
+
+2011-10-28 23:21  source
+
+	* Added information about upgrading from previous 6.1.x to 6.1.4
+
+2011-10-28 21:46  source
+
+	* Fixed prototype
+
+2011-10-28 21:41  source
+
+	* Fixed datetime fraction
+
+2011-10-28 21:10  source
+
+	* Rebuild drivers
+
+2011-10-28 16:09  source
+
+	* Fixed disable strict void var checking as /fct sometimes generates
+	  undefined vars
+
+2011-10-28 16:00  source
+
+	* Added support for setting syslog facility
+
+2011-10-28 15:56  source
+
+	* Fixed call auth check only when needed
+
+2011-10-28 15:55  source
+
+	* Fixed flags for ods
+
+2011-10-28 13:16  source
+
+	* Added common function for testing extensions for rdfxml
+
+2011-10-28 13:14  source
+
+	* Fixed encoding issues
+
+2011-10-26 15:38  source
+
+	* Added new UI for conditionals like = < > ranges and IN
+	* Added initial UI for geo based conditionals
+	* Added support for proper permalink
+	* Added Twitter, Facebook and Google+ share buttons to footer
+	* Added version info to footer
+
+2011-10-26 15:22  source
+
+	* Added AddThis share buttons
+
+2011-10-26 09:34  source
+
+	* Fixed Compiled for line in usage
+	* Fixed compiler warning
+
+2011-10-26 00:21  source
+
+	* Updated documentation
+
+2011-10-26 00:00  source
+
+	* Fixed run check init on local
+
+2011-10-25 23:56  source
+
+	* Fixed package uninstall
+
+2011-10-25 23:56  source
+
+	file syncml_drop.sql was added on branch V6_0_0-DEVEL on 2011-10-25 23:58:36 +0000
+
+2011-10-25 23:54  source
+
+	* Added async rdf extraction
+
+2011-10-25 23:36  source
+
+	* Added opl:mentions and opl:NamedEntity class to OpenLink Attribution
+
+2011-10-25 23:31  source
+
+	file location.js was added on branch V6_0_0-DEVEL on 2011-10-25 23:37:37 +0000
+
+2011-10-25 23:31  source
+
+	* Added missing location support
+
+2011-10-25 23:28  source
+
+	* Added finger print from twitter entry
+	* Fixed minor issues
+
+2011-10-25 23:28  source
+
+	file twitter_fp2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-10-25 23:36:21 +0000
+
+2011-10-25 23:25  source
+
+	* Added support for Google+ comments
+
+2011-10-25 23:20  source
+
+	* Fixed when dropping a graph, also check if there is a quad map for it
+	* Fixed move all cols in pk rdf view sel
+	* Fixed handling of syncml functionality
+	* Fixed labels
+
+2011-10-25 19:36  source
+
+	* Added new implementation of search_excerpt that can handle both
+	  ANSI/UTF8 and Wide strings
+
+2011-10-25 10:54  source
+
+	* Fixed problems re-creating quad map
+
+2011-10-21 12:03  source
+
+	* Fixed drop stmt gr
+
+2011-10-21 11:53  source
+
+	* Fixed bad conversion of utf8 in rdf/xml
+
+2011-10-19 15:22  source
+
+	* Fixed dtp check
+
+2011-10-19 15:18  source
+
+	* Fixed reset bitmap flag as previous insert might have set it to true
+
+2011-10-19 15:14  source
+
+	* Fixed missing cast
+
+2011-10-18 12:45  source
+
+	* Fixed if one column cannot fit into available space, then instead
+	  of guessing how much space is needed we calculate space for all
+	  columns which cannot fit
+
+2011-10-18 12:41  source
+
+	* Fixed error adding inherited roles as they can overlap
+
+2011-10-18 09:15  source
+
+	* Updated default settings file
+
+2011-10-17 15:50  source
+
+	* Fixed issue building with Mono
+
+2011-10-17 14:06  source
+
+	* Fixed log info about row state
+
+2011-10-17 09:55  source
+
+	* Fixed labels
+
+2011-10-17 09:48  source
+
+	* Fixed issue with SPASQL and ADONET3 named parameters
+	* Fixed ADO.Net Provider failure retrieving RDF datetime literal values
+	* Removed duplicate functions
+
+2011-10-14 17:02  source
+
+	* Fixed issue with rdfview generation
+
+2011-10-14 12:54  source
+
+	* Fixed if BeginTransaction is called with an Unspecified isolation
+	  level, use a default of ReadCommitted
+
+2011-10-14 12:47  source
+
+	* Fixed recompile all qr's cached on cli connection when dropping
+	  a group or creating new graph group
+
+2011-10-14 10:33  source
+
+	* Fixed labels
+
+2011-10-14 00:32  source
+
+	* Fixed missing Diagnostic
+
+2011-10-13 22:14  source
+
+	* Rebuild driver
+
+2011-10-13 22:07  source
+
+	* Upgraded driver to Sesame 2.5.1
+
+2011-10-13 22:07  source
+
+	file VirtuosoOperation.java was added on branch V6_0_0-DEVEL on 2011-10-13 22:49:22 +0000
+
+2011-10-13 22:07  source
+
+	file VirtuosoUpdate.java was added on branch V6_0_0-DEVEL on 2011-10-13 22:49:22 +0000
+
+2011-10-13 18:36  source
+
+	* Added new Google+ cartridge
+	* Added new Jigsaw cartridge
+	* Added gr:Brand information to Ebay cartridge
+	* Added money class similar to GoodRelations prices for Crunchbase
+	* Fixed handling of HTTPS Groupon URIs
+	* Fixed do not immediately index in normal mode
+	* Fixed eBay URL-schemes
+	* Fixed MIME type for JSON-LD
+	* Fixed documentation
+	* Removed CRLF
+
+2011-10-13 18:33  source
+
+	* Added new tabs to Linked Data
+	* Added PSH tabs
+	* Fixed labels and texts
+
+2011-10-13 18:32  source
+
+	* Fixed issue displayong characters in isql.vspx
+
+2011-10-13 18:29  source
+
+	* Fixed uninitialized var
+
+2011-10-13 18:28  source
+
+	* Added support for ms-author-va : sparql header
+	* Fixed use new virtuoso_ini_item_value
+	* Fixed set id of current user
+	* Fixed issue compiling stored procedure
+
+2011-10-13 17:09  source
+
+	file VirtuosoDateTime.cs was added on branch V6_0_0-DEVEL on 2011-10-13 18:26:27 +0000
+
+2011-10-13 17:09  source
+
+	file VirtuosoDateTimeOffset.cs was added on branch V6_0_0-DEVEL on 2011-10-13 18:26:27 +0000
+
+2011-10-13 17:09  source
+
+	file VirtuosoTimeSpan.cs was added on branch V6_0_0-DEVEL on 2011-10-13 18:26:27 +0000
+
+2011-10-13 17:08  source
+
+	* Added support for VirtuosoDateTime, VirtuosoDateTimeOffset and
+	  VirtuosoTimeSpan
+	* Fixed issue with dropped connection after multiple bad login attempts
+	* Fixed dispose methods should never throw an exception
+	* Fixed drop statement in Virtuoso when it is disposed in the provider
+
+2011-10-13 16:52  source
+
+	* Fixed copyright year to 2011
+
+2011-10-13 16:50  source
+
+	* Fixed buggy comparison when installing VAD packages
+
+2011-10-13 16:48  source
+
+	* Added stats for time waiting on a mutex
+
+2011-10-13 16:35  source
+
+	file googleplus2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-10-13 18:36:28 +0000
+
+2011-10-13 16:35  source
+
+	file oplgoogleplus.owl was added on branch V6_0_0-DEVEL on 2011-10-13 18:36:28 +0000
+
+2011-10-13 16:29  source
+
+	* Removed duplicate stored procedures
+
+2011-10-13 14:39  source
+
+	* Fixed use openssl md5 where available
+
+2011-10-13 14:24  source
+
+	* Fixed check for min async queue size
+
+2011-10-13 14:21  source
+
+	* Added new setting RdfFreeTextRulesSize
+
+2011-10-13 14:08  source
+
+	* Fixed execute on all partitions at same time
+
+2011-10-13 14:06  source
+
+	* Fixed undefined Inference rule error when rule created from graph
+	  created from SPARUL insert statement
+	* Fixed issue loading inf rules on cluster
+
+2011-10-13 14:00  source
+
+	* Added support to sql_bif_excerpt for using wide string
+
+2011-10-13 13:59  source
+
+	* Fixed memleak
+
+2011-10-13 13:58  source
+
+	* Fixed issue with fulltext indexing
+
+2011-10-13 13:56  source
+
+	* Fixed issue with bif:contains
+
+2011-10-13 13:54  source
+
+	* Fixed deadlock on attempt of qr_recompile during the run of
+	  SPARQL-to_SQL front-end
+
+2011-10-13 13:28  source
+
+	* Fixed http recording
+
+2011-10-13 13:27  source
+
+	* Fixed crash when array is bad
+
+2011-10-13 13:26  source
+
+	* Fixed function name in argument
+
+2011-10-13 13:11  source
+
+	* Fixed SSL verification context
+
+2011-10-13 13:00  source
+
+	* Added inproved support for inference and RDF views to "non-default"
+	  storages
+	* Added option to register pos-processing callbacks to DESCRIBE
+
+2011-10-13 12:54  source
+
+	* Added new BIF functions for handling dictionaries of triples
+
+2011-10-13 12:15  source
+
+	* Added iri range size setting
+
+2011-10-13 12:14  source
+
+	* Added new "mode" flag to TURTLE parser, so it adds source line
+	  numbers (and source text labels) to blank nodes of the parsed
+	  document
+
+2011-10-13 12:12  source
+
+	* Fixed check for DAV
+
+2011-10-13 11:09  source
+
+	* Added dbs id hash to log
+
+2011-10-13 11:05  source
+
+	* Fixed compiler warning
+
+2011-10-13 11:04  source
+
+	* Fixed private key protection
+
+2011-10-13 11:03  source
+
+	* Fixed checks
+
+2011-10-13 11:03  source
+
+	* Fixed inlist to mean equality, not a lt of the one_of_these call
+	  comparison
+
+2011-10-13 11:01  source
+
+	* Fixed label
+
+2011-10-13 11:00  source
+
+	* Fixed use cartridge if such is defined
+
+2011-10-13 10:59  source
+
+	* Fixed moved assignment before loop, as sqlerror can lead to a
+	  double free
+
+2011-10-13 10:58  source
+
+	* Fixed issue with foreignkey handling inside rdfview
+
+2011-09-28 17:04  source
+
+	* Rewrite HTML generation for /sparql endpoint
+
+2011-09-28 17:01  source
+
+	* Added new function virtuoso_ini_item_value which can read settings
+	  from the virtuoso.ini, without having to open/parse it for every
+	  request
+
+2011-09-27 12:14  source
+
+	file sec_acl_edit_sp.vspx was added on branch V6_0_0-DEVEL on 2011-10-13 18:33:27 +0000
+
+2011-09-27 12:14  source
+
+	file sec_auth_serv_sp.vspx was added on branch V6_0_0-DEVEL on 2011-10-13 18:33:27 +0000
+
+2011-09-27 09:42  source
+
+	* Fixed sql codegen for combination of SERVICE {} that binds a
+	  variable and OPTIONAL {} that uses it later, and the binding in
+	  SERVICE is the only non-nullable binding of that variable
+	cvs: ----------------------------------------------------------------------
+
+2011-09-27 09:40  source
+
+	* Fixed do not cache samples indefinitely
+
+2011-09-23 19:22  source
+
+	* Added initial support for filtering on value ranges
+	* Added new export formats
+	* Fixed MIME type for JSON-LD
+	* Fixed use lang for properties labels
+	* Fixed pretty-print query
+	* Fixed check for owl:Class
+	* Fixed label prefs and metadata
+	* Fixed footer
+
+2011-09-23 19:12  source
+
+	* Added extra mime types to accept header
+
+2011-09-23 15:20  source
+
+	* Fixed overflow in bif_date_diff
+
+2011-09-22 18:57  source
+
+	file jigsaw2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-10-13 18:36:28 +0000
+
+2011-09-22 18:57  source
+
+	file oplmoney.owl was added on branch V6_0_0-DEVEL on 2011-10-13 18:36:28 +0000
+
+2011-09-21 15:23  source
+
+	* FIxed do not make UNAMEs in SQL texts immortal
+
+2011-09-21 15:22  source
+
+	* Fixed must save IN list as it will be reset to 0 inside
+
+2011-09-21 13:27  source
+
+	* Fixed use len of the N leading chars represented as UTF8
+
+2011-09-21 13:23  source
+
+	* Added support for DV_BIN
+
+2011-09-20 12:03  source
+
+	* Fixed issues detecting images
+
+2011-09-20 11:58  source
+
+	* Fixed handling of sparql endpoint in Pivot permalink generation
+
+2011-09-19 13:37  source
+
+	* Fixed do not check byte-order on crash recovery replay
+
+2011-09-15 16:02  source
+
+	* Updated version to 6.1.4-rc1
+
+2011-09-15 10:42  source
+
+	* Fixed mem leaks
+
+2011-09-14 19:06  source
+
+	* Fixed uninitialized variable
+
+2011-09-14 15:38  source
+
+	* Fixed memory leaks
+
+2011-09-14 15:38  source
+
+	* Fixed valgrind warning when using DEBUG
+
+2011-09-13 14:50  source
+
+	* Fixed memory leaks
+
+2011-09-12 21:05  source
+
+	* Fixed GPF on optimization of DELETE/INSERT/MODIFY due to lists
+	  of known vars that were not deALIASed properly
+
+2011-09-12 20:08  source
+
+	* Added log when built-in procedure has duplicate in the db
+
+2011-09-12 20:04  source
+
+	* Fixed removed duplicate procedures
+
+2011-09-12 20:01  source
+
+	* Fixed crash
+
+2011-09-12 12:30  source
+
+	* Fixed mime type of JSON-ld to application/ld+json
+
+2011-09-12 11:02  source
+
+	* Updated documentation
+
+2011-09-12 10:52  source
+
+	* Fixed use available non-expiring access token
+	* Fixed drilldown through Posts (including posted links) to show
+	  associated comments
+	* Fixed removed oplcb:competitor property from its oplcb:competition
+	  wrapper and dropped latter
+	* Fixed use dbpedia:author property when handling books
+	* Fixed use string session with serialized XML for large csv files
+
+2011-09-12 10:47  source
+
+	* Added initial support for PHP 5.3
+
+2011-09-12 10:36  source
+
+	* Fixed indentation
+
+2011-09-12 10:28  source
+
+	* Fixed use shorter names
+
+2011-09-12 10:21  source
+
+	* Fixed WebID demo pages
+
+2011-09-09 14:09  source
+
+	* Updated documentation
+
+2011-09-09 13:30  source
+
+	* Fixed warning about uninitialized data
+
+2011-09-09 13:21  source
+
+	* Added option for explicit graph
+	* Fixed SyncML Folder Types in drop-down list
+	* Fixed labels
+
+2011-09-09 13:20  source
+
+	* Fixed do not remove trailing cr/lf
+
+2011-09-09 13:19  source
+
+	* Fixed issue when dirname is a blob
+
+2011-09-09 13:12  source
+
+	* Added dbpedia:author property when handling books
+	* Fixed ACL rule */* allows everybody
+	* Fixed Facebook auth
+	* Fixed use string session with serialized XML for large csv files
+	* Fixed map OpenLink Zillow ontology to geo:lat/long
+	* Fixed map oplog:likes_XXX property to like:likes
+
+2011-09-09 13:11  source
+
+	* Added support for switchable favicon to Sponger front page
+
+2011-09-09 12:51  source
+
+	* Fixed issues with linked data upload
+
+2011-09-09 11:16  source
+
+	* Added HTTP status codes in SPARQL graph store protocol
+
+2011-09-09 11:13  source
+
+	* Fixed issue with SPARUL LOAD INTO command creating duplicate graphs
+
+2011-09-09 00:10  source
+
+	* Fixed issue when pragma list was empty
+	* Fixed issues generating Pivot Permalink
+	* Fixed whitespace and stray > char from Raw formats line
+
+2011-09-08 18:54  source
+
+	* Fixed handling of GROUP BY and ORDER BY using expressions
+
+2011-09-08 15:29  source
+
+	* Fixed re-definition of a quad map that is a single user of a quad
+	  map format
+
+2011-09-08 15:28  source
+
+	* Fixed codegeneration issue with awk 4.0
+
+2011-09-08 12:51  source
+
+	* Fixed UI for sponger options
+
+2011-09-08 12:19  source
+
+	* Fixed issue with sparql LOAD from file
+
+2011-09-07 22:44  source
+
+	* Fixed crash running FILTER query containing IN clause with only
+	  one item in it
+	* Fixed issue with ORDER BY expression optimization
+
+2011-09-05 15:27  source
+
+	* Added test for empty graph result
+	* Added margins for RDF mini browser container
+	* Added check for existence of sparql_cxml to enable display of CXML
+	  result link
+	* Replaced default AJAX throbber with new OAT Notify
+	* Fixed undef variable causing dereference control malfunction
+	* Fixed layout bug causing the dereference mode control hiding behind
+	  a block
+
+2011-09-05 15:26  source
+
+	* Added support for replacing existing content on OAT.Notify.send
+
+2011-09-05 15:23  source
+
+	file notify-throbber.gif was added on branch V6_0_0-DEVEL on 2011-09-05 15:27:50 +0000
+
+2011-08-30 15:02  source
+
+	* Fixed issue with code generation using gawk 4
+
+2011-08-29 10:37  source
+
+	* Added Google Place cartridge
+	* Added Seatgeek cartridge
+	* Added API for selective sponging
+	* Added Google+ button
+	* Added menu item linking direct to 'How it Works'
+	* Fixed bug when offline_access=1 not present in OpenGraph cartridge
+	* Fixed access token requests now request permission to read user and
+	  friend checkins
+	* Fixed complete rdf boxes when looking for label
+	* Fixed lang use for comment
+	* Fixed missing block op
+	* Fixed minor issues
+
+2011-08-29 10:27  source
+
+	* Added support for anytime query (timeout) on virtuoso
+	* Added CSS for pushbar notify
+	* Fixed bug with updated maxrow value not being passed
+	* Fixed dereferencing preference dropdown disappearing when paging
+	  between results
+	* Fixed cosmetics
+
+2011-08-29 10:23  source
+
+	* Added support for oplzilw:latitude and longitude
+	* Fixed rdftabs notification to use PUSHBAR
+	* Fixed problem in geo coordinates detection
+
+2011-08-29 10:22  source
+
+	* Added new option to rdfmini to facilitate placing of view control
+	  outside its container
+
+2011-08-29 10:21  source
+
+	* Added new notification widget types PUSHBAR and BAR
+	* Added target class for notify content for skinning
+
+2011-08-29 10:19  source
+
+	* Added support for HEAD requests in AJAX
+
+2011-08-29 10:18  source
+
+	* Added limit to number of open statements
+
+2011-08-26 19:34  source
+
+	* Fixed if we have a wide string and want typed string we cast to utf-8
+
+2011-08-26 18:04  source
+
+	* Fixed /sparql/ endpoint to produce more accurate diagnostics for
+	  failed INSERT DATA statements
+
+2011-08-26 18:03  source
+
+	* Fixed timeout should be specified in miliseconds according to docs
+
+2011-08-26 17:59  source
+
+	* Added limit to number of open statements
+
+2011-08-26 17:57  source
+
+	* Added mem debug support for sqlp_box_id_upcase
+
+2011-08-26 17:55  source
+
+	* Fixed memory leak
+
+2011-08-26 10:58  source
+
+	* Fixed crash when un-expected array is passed as argument
+
+2011-08-26 10:57  source
+
+	* Fixed loading member functions of UDT that refer to XML namespace
+	  declarations and other items loaded after the loading of the UTD
+	  declaration
+
+2011-08-26 10:54  source
+
+	* Fixed issue with trim('test', null)
+
+2011-08-23 12:24  source
+
+	file google_place2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-08-29 10:37:48 +0000
+
+2011-08-23 12:24  source
+
+	file seatgeek2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-08-29 10:37:48 +0000
+
+2011-08-21 12:54  source
+
+	* Added initial code for timeout handling
+	* Added param to control the anchor mode, persisted in permalinks.
+	* Added anchor mode to pass the URL to /describe
+	* Added missing URI encoding in some generated links/queries
+	* Fixed "aliased" qtxt URL param
+	* Fixed re-enabled anchor mode to control what to do when dereferencing links.
+	* Fixed try to set values of nonexisting UI objects in /view
+	* Fixed visibility of footer in /view
+
+2011-08-21 12:52  source
+
+	* Fixed display of RDF store stats
+
+2011-08-21 12:51  source
+
+	* Fixed set default anchorMode back to 0
+
+2011-08-21 12:50  source
+
+	* Fixed footer background
+
+2011-08-21 12:50  source
+
+	* Added MSG MAP_NOTHING_TO_SHOW to rdftabs Map widget
+	* Added MAP_NOTHING_TO_SHOW to rdfmini by switching to default viewer
+	* Added references in map popups
+	* Added function to detect nodes that only contain coordinates
+	* Fixed bugs in getContent link generation
+	* Fixed removed attempt to resolve item references throught recursion
+	* Fixed drawMarker to extract properties from referencing node when node contains only
+	  coordinate data
+	* Fixed structure of rdftabs marker popups
+	* Fixed make properties list scrollable instead of whole window
+
+2011-08-21 12:34  source
+
+	* Rebuild drivers
+
+2011-08-21 12:33  source
+
+	* Removed deprecated functions and files
+
+2011-08-18 09:16  source
+
+	* Fixed connection leak in connection pool during long checkpoints
+
+2011-08-17 17:46  source
+
+	* Fixed memory leak in statement when using connectionpooling
+
+2011-08-17 17:36  source
+
+	* Rebuild drivers
+
+2011-08-17 17:20  source
+
+	* Rebuild driver
+
+2011-08-17 17:20  source
+
+	* Updated hibernate support to work with Hibernate 3.6.6-Final
+
+2011-08-15 15:30  source
+
+	* Fixed bad merge
+
+2011-08-14 14:48  source
+
+	* Fixed check for NULL IRI before printing
+
+2011-08-09 11:19  source
+
+	* Fixed indentation and whitespace
+
+2011-08-09 11:17  source
+
+	* Fixed missing namespave declarations
+
+2011-08-09 11:11  source
+
+	* Fixed minor issue
+
+2011-08-09 10:58  source
+
+	* Added SimpleGeo cartridge
+	* Added Eventful cartridge
+	* Fixed use standard properties for Latitude and Longitude
+	* Fixed use /about to sponge URL
+
+2011-08-05 21:33  source
+
+	file simplegeo2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-08-09 10:58:33 +0000
+
+2011-08-03 11:36  source
+
+	* Added show photo in WebID login/registrer
+	* Fixed typo in messages
+	* Fixed facebook accounts
+
+2011-08-03 11:34  source
+
+	* Added missing files
+
+2011-08-03 11:34  source
+
+	file mc.vsp was added on branch V6_0_0-DEVEL on 2011-08-03 11:42:19 +0000
+
+2011-08-03 11:34  source
+
+	file mv.vsp was added on branch V6_0_0-DEVEL on 2011-08-03 11:42:19 +0000
+
+2011-08-02 12:05  source
+
+	file eventful2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-08-09 10:58:33 +0000
+
+2011-08-01 14:19  source
+
+	* Added Twitter cartridge using OAuth and Twitter REST api
+	* Added XRD cartridge
+	* Added Google Profile cartridge
+	* Fixed use OG community page as starting point for facebook OpenGraph
+	  cartridge
+	* Fixed minor issues
+
+2011-08-01 14:17  source
+
+	* Added check for XML
+	* Fixed update must do delta and remove all entries which are not
+	  from this source
+
+2011-08-01 14:15  source
+
+	* Fixed SIOC data
+
+2011-08-01 14:13  source
+
+	* Updated CKeditor to version 3.6.1
+
+2011-08-01 14:12  source
+
+	* Added RDF links in header and head
+
+2011-08-01 14:12  source
+
+	* FIxed Delicious publish
+
+2011-08-01 14:09  source
+
+	* Fixed undefined function
+
+2011-08-01 14:08  source
+
+	* Added user/mail availablitiy action
+	* Added mail verification service
+	* Fixed WebID login and registration
+	* Fixed Facebook accounts
+	* Fixed order tabs and labels
+	* Fixed SIOC RDF links API functions
+
+2011-08-01 14:05  source
+
+	* Added ACL eXecute flag
+	* Fixed ACl issue with editing .acl file
+	* Fixed API functions
+
+2011-08-01 14:04  source
+
+	* Fixed encryption and signing
+	* Fixed security properties
+	* Fixed mail parameters
+
+2011-08-01 13:18  source
+
+	* Fixed throw away old content before starting execute
+
+2011-08-01 13:14  source
+
+	file google_profile2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-08-01 14:19:28 +0000
+
+2011-08-01 13:14  source
+
+	file xrd-generic.xsl was added on branch V6_0_0-DEVEL on 2011-08-01 14:19:28 +0000
+
+2011-08-01 13:11  source
+
+	file opltwitter.owl was added on branch V6_0_0-DEVEL on 2011-08-01 14:19:28 +0000
+
+2011-08-01 13:11  source
+
+	file twitter_access_token.vsp was added on branch V6_0_0-DEVEL on 2011-08-01 14:19:28 +0000
+
+2011-08-01 13:11  source
+
+	file twitter_rest_api2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-08-01 14:19:28 +0000
+
+2011-07-29 10:04  source
+
+	* Fixed debug code
+
+2011-07-29 10:03  source
+
+	* Fixed must redirect on OPTIONS
+
+2011-07-29 10:03  source
+
+	* Fixed calculate lenght before inserting the row
+
+2011-07-29 10:00  source
+
+	* Fixed unnamed GPF
+
+2011-07-20 15:56  source
+
+	* Added check for %nn
+
+2011-07-20 09:50  source
+
+	* Added Idp
+	* Added Domain check
+	* Added WebID
+
+2011-07-20 09:26  source
+
+	file idp_s_1.xml was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 09:26  source
+
+	file webid_demo.html was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 09:26  source
+
+	file webid_demo.html was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:20 +0000
+
+2011-07-20 09:26  source
+
+	file webid_demo.php was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:20 +0000
+
+2011-07-20 09:26  source
+
+	file webid_demo.vsp was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:20 +0000
+
+2011-07-20 09:26  source
+
+	file dc_s_1.sql was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 09:26  source
+
+	file dc_s_1.xml was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 09:26  source
+
+	file dc_s_1_sample.vsp was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 09:26  source
+
+	file idp_s_1.vsp was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 09:26  source
+
+	file options.xml was added on branch V6_0_0-DEVEL on 2011-07-20 09:50:19 +0000
+
+2011-07-20 08:58  source
+
+	* Added Hyperpublic cartridge
+
+2011-07-20 08:58  source
+
+	file hyperpublic2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-07-20 09:55:07 +0000
+
+2011-07-20 08:56  source
+
+	* Added configuration option for page title
+
+2011-07-20 08:51  source
+
+	* Added webid_check option to control execution flag
+
+2011-07-20 08:51  source
+
+	* Fixed problems with big tokens
+
+2011-07-20 08:29  source
+
+	* Added support for dumping v5 in v6 log format
+
+2011-07-20 00:01  source
+
+	* Reverted merge from wrong branch
+
+2011-07-19 23:58  source
+
+	* Fixed DV_RDF serialization
+
+2011-07-19 23:43  source
+
+	* Fixed small issue for single engine
+
+2011-07-19 23:40  source
+
+	* Added new aggregate DB.DBA.GROUP_DIGEST which makes it possible
+	  to return part of big output of DB.DBA.GROUP_CONCAT without
+	  running out of row length limits
+
+2011-07-19 23:38  source
+
+	* Added support to call XPath/XQuery functions in SPARQL
+	* Added bif functions xpath_funcall and xpath_apply
+
+2011-07-19 23:34  source
+
+	* Fixed moved macros isdatechar, isfloatchar and inplainURIchar
+
+2011-07-19 23:33  source
+
+	* Added option 'exec_as_get' to http map
+	* Added support for SPARQL Graph CRUD
+
+2011-07-19 23:30  source
+
+	* Added function isfinitenumeric()
+
+2011-07-19 23:30  source
+
+	* Fixed memleak
+
+2011-07-19 23:29  source
+
+	* Fixed compiler warnings
+
+2011-07-19 23:27  source
+
+	* Added optimized codegen for built-in aggregate functions
+
+2011-07-19 23:26  source
+
+	* Fixed DV_RDF serializationo
+	* Added upgrade procedure for RDF_QUAD
+
+2011-07-19 19:36  source
+
+	* Added generic function to describe objects
+	* Fixed check to see if ssl is in effect
+	* Fixed use proper case as sparql is always using quoted identifiers
+
+2011-07-19 19:27  source
+
+	* Fixed bug in endpoint setting persistence
+	* Fixed visibility of pager in navigator
+	* Improved recovery from some proxy-AJAX-related errors
+
+2011-07-19 19:25  source
+
+	* Changed handling of anchors in map bubbles
+
+2011-07-15 11:17  source
+
+	* Added missing opl:provided by property
+
+2011-07-15 11:16  source
+
+	* Added option to set site logo in banner text
+	* Added new serialization format examples
+
+2011-07-15 11:15  source
+
+	* Added Seevl cartridge
+	* Added Guardian cartridge
+
+2011-07-15 11:15  source
+
+	* Fixed minor issue
+
+2011-07-15 11:07  source
+
+	* Added new export formats
+
+2011-07-15 11:06  source
+
+	* Added generation of CV from LinkedIn using the oplcv ontology
+
+2011-07-15 11:05  source
+
+	file guardian2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-07-15 11:15:47 +0000
+
+2011-07-15 11:05  source
+
+	file seevl2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-07-15 11:15:47 +0000
+
+2011-07-15 11:02  source
+
+	* Added OpenLink CV/Resume ontology
+
+2011-07-15 11:02  source
+
+	file oplcv.owl was added on branch V6_0_0-DEVEL on 2011-07-15 11:14:01 +0000
+
+2011-07-14 19:14  source
+
+	* Fixed use the actual length of the string in cli_utf82narrow not max len
+
+2011-07-13 19:09  source
+
+	* Added check for cert
+
+2011-07-12 14:46  source
+
+	* Fixed extra debugging
+
+2011-07-08 13:44  source
+
+	* Merged first part of V7
+
+2011-07-05 21:09  source
+
+	* Fixed GPF as stmt not available at this point
+
+2011-07-04 09:59  source
+
+	* Fixed XML escape data
+	* Fixed issues with mail addresses and encrypted mails
+
+2011-07-04 09:57  source
+
+	* Added header and head links for IRIs
+
+2011-07-04 09:56  source
+
+	* Added header and head procedures for IRI URLs
+	* Added new ODS rewrite rules
+	* Fixed get CA from connection if not set
+	* Fixed ACL using patterns
+	* Fixed default cert login
+	* FIxed take relevant webid
+	* Fixed Offers
+
+2011-07-04 09:54  source
+
+	* Added LinkedIn cartridge
+	* Added linkedIn access token
+	* Added Zoopla cartridge
+	* Added new pattern for Eventbrite
+	* Added support for acct scheme
+	* Adjustments to OpenGraph RDF mappings and additions to OpenGraph ontology
+	* Fixed Yelp cartridge
+	* Fixed minor issuesdded additional checks for RDFa
+	* Fixed use origin as a base, not graph
+	* Fixed protection against bad datetime offsets returned by OpenGraph
+	CV: ----------------------------------------------------------------------
+
+2011-07-04 09:33  source
+
+	* Added loading NS prefixes into IRIDB through virtuoso defaults page
+
+2011-07-04 09:31  source
+
+	file linkedin2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-07-04 09:54:06 +0000
+
+2011-07-04 09:31  source
+
+	file linkedin_access_token.vsp was added on branch V6_0_0-DEVEL on 2011-07-04 09:54:05 +0000
+
+2011-07-04 09:31  source
+
+	file opllinkedin.owl was added on branch V6_0_0-DEVEL on 2011-07-04 09:54:04 +0000
+
+2011-07-04 09:31  source
+
+	file zoopla2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-07-04 09:54:06 +0000
+
+2011-06-29 10:10  source
+
+	* Fixed cannot perform file_stat as it runs on a different node
+
+2011-06-27 19:45  source
+
+	* Added nsprefix and rulelist pages
+
+2011-06-27 11:24  source
+
+	* Fixed do not perform keyset update on non pk ref
+
+2011-06-24 19:05  source
+
+	* Added initial support for HTML+Microformat, Microformat/JSON and
+	  JSON-LD output formats
+
+2011-06-24 11:25  source
+
+	* Added result type detection
+	* Fixed SVG capability detection
+
+2011-06-24 11:25  source
+
+	* Fixed .isparql serialization in FF4 and IE9
+
+2011-06-24 11:24  source
+
+	* Fixed JSON output for native parsers
+
+2011-06-24 11:22  source
+
+	* Added prefix for http://www.w3.org/2002/07/owl# (owl:)
+	* Added prefix for http://www.openlinksw.com/schemas/rdfs/ (oplrdfs:)
+	* Fixed prefix handling in IRIDB, rdfstore and rdftabs
+
+2011-06-24 11:20  source
+
+	* Fixed MSIE detection in opacity anim
+
+2011-06-24 11:20  source
+
+	* Fixed handling of decoding url values with + instead of spaces
+
+2011-06-22 13:30  source
+
+	* Fixed no not crash when key is empty
+
+2011-06-22 13:29  source
+
+	* Fixed check for NULL pred
+
+2011-06-21 18:11  source
+
+	* Fixed make sure all required dfe are placed before making a decision
+
+2011-06-20 19:27  source
+
+	* Fixed replay as we need to take into account non txn mode
+
+2011-06-20 19:25  source
+
+	* Fixed memory leak
+
+2011-06-20 14:15  source
+
+	* Fixed cast to uint32 instead of long as this is a serialized type
+
+2011-06-17 15:21  source
+
+	* Fixed when sas, O is considered to be an iri
+
+2011-06-17 15:20  source
+
+	* Fixed if result is empty but input is same variable as input then
+	  pesumable we have distinct and have to send input
+
+2011-06-17 00:11  source
+
+	* Fixed placement of ifdef
+
+2011-06-16 22:53  source
+
+	* Added check for errors on bitmap insert
+
+2011-06-13 14:25  source
+
+	* Fixed if too many cursors, do not crash server, just kill txn
+
+2011-06-13 09:31  source
+
+	* Fixed "delayed" filters like
+	  ?x p1 ?o1 ; p2 ?o2 . optional { ... } . filter (?o1 = ?o2)
+
+2011-06-13 09:29  source
+
+	* Added function to backup index to log
+
+2011-06-11 16:41  source
+
+	* Added support for SQLQUERY syntax in declaration of RDF views
+	* Fixed SQL codegen bug in SPARQL queries of R2RML rewriter
+
+2011-06-11 16:39  source
+
+	* Fixed issue with variable argument list
+
+2011-06-11 16:28  source
+
+	* Fixed fill can get out of bounds
+
+2011-06-10 22:45  source
+
+	* Fixed disable debug code from standard binary
+
+2011-06-10 22:44  source
+
+	* Fixed skip rules which perform http redirect when doing a POST
+
+2011-06-10 21:39  source
+
+	* Fixed check if instance has trx and it has thread, else we do not
+	  run
+
+2011-06-09 17:41  source
+
+	* Fixed problem with non-existing item and get API function
+	* Fixed myA JS error
+
+2011-06-09 17:39  source
+
+	* Added tooltop for 'Language' property
+	* Fixed 'My Offers' typo
+	* Fixex get CA from connection if not set
+	* Fixed myA JS error
+	* Fixed error message
+	* Fixed check name when uload private key
+
+2011-06-09 17:26  source
+
+	* Fixed crash when trying to unbox non-boxed item from tree
+
+2011-06-09 15:32  source
+
+	* Added sponger splash page
+
+2011-06-09 15:29  source
+
+	file linked_data_gen_opts3a.png was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file linkeddata.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file linkedin.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file openlinklogo_wstrap_2008_100h.png was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file sponger_frontpage.css was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file twitter.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file webfinger.png was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file webid_icon.png was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file cartridge_config.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file delicious.png was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file facebook_icon.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file flickr.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file google.jpg was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file help_button.gif was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:38 +0000
+
+2011-06-09 15:29  source
+
+	file sponge_uri.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file sponger_architecture.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file sponger_setup.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	file examples.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:36 +0000
+
+2011-06-09 15:29  source
+
+	file fb_access_token_popup.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:36 +0000
+
+2011-06-09 15:29  source
+
+	file index.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:36 +0000
+
+2011-06-09 15:29  source
+
+	file jquery.js was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:36 +0000
+
+2011-06-09 15:29  source
+
+	file sponge_flickr.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:36 +0000
+
+2011-06-09 15:29  source
+
+	file sponge_social_profile.vsp was added on branch V6_0_0-DEVEL on 2011-06-09 15:35:37 +0000
+
+2011-06-09 15:29  source
+
+	* Added sponger splash page
+	* Fixed minor issues
+
+2011-06-09 13:27  source
+
+	* Added option to enable/disable ?P statistics
+
+2011-06-09 13:25  source
+
+	* FIxed added option to enable/disable ?P statistics
+
+2011-06-09 13:24  source
+
+	* Fixed memory leak
+
+2011-06-07 18:53  source
+
+	* Fixed compiler warning
+
+2011-06-07 18:52  source
+
+	* Added new functions
+
+2011-06-07 18:51  source
+
+	* Fixed if cannot ensure sas then return proper error not null
+
+2011-06-07 12:30  source
+
+	* Fixed print ins options
+
+2011-06-07 12:29  source
+
+	* Fixed issue with int32 stats
+
+2011-06-06 08:06  source
+
+	* Added function to create certificate from CSR
+
+2011-06-06 08:02  source
+
+	* Fixed memory leaks
+
+2011-06-03 15:13  source
+
+	* Fixed memory leak
+
+2011-06-02 12:32  source
+
+	* Fixed bad URL in typeahead.css
+	* Fixed issue with external ccount creation
+	* Fixed WebDAV selection
+
+2011-06-02 12:25  source
+
+	* Fixed iCalendar parser
+
+2011-06-02 12:24  source
+
+	* Added daylight saving time
+	* Fixed issue with validation
+	* Fixed WebDAV selection
+
+2011-06-02 12:22  source
+
+	* Fixed WebDAV selection
+
+2011-06-02 12:22  source
+
+	* Fixed issue with validation
+	* Fixed WebDAV selection
+
+2011-06-02 12:21  source
+
+	* Fixed issue with validation
+	* Fixed WebDAV selection
+	* Fixed uninstall some views
+
+2011-06-02 12:20  source
+
+	* Added user's rewrite rules
+	* Added WebID verify service
+
+2011-06-02 12:20  source
+
+	file webid_verify.vsp was added on branch V6_0_0-DEVEL on 2011-06-02 12:34:01 +0000
+
+2011-06-02 12:08  source
+
+	* Added ProgrammableWeb cartridge
+
+2011-06-02 12:08  source
+
+	file programmableweb2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-06-02 12:30:21 +0000
+
+2011-06-02 12:08  source
+
+	* Fixed minor issue
+
+2011-06-02 11:18  source
+
+	* Fixed check vdb col for nullable
+
+2011-06-01 09:20  source
+
+	* Fixed signal error instead of GPF in normal build
+
+2011-05-31 15:34  source
+
+	* Fixed set rehash factor if expecting large number of inserts in hash
+
+2011-05-31 15:33  source
+
+	* Added function for CSR generation
+
+2011-05-31 15:32  source
+
+	* Fixed use max number to avoid buffer overrun
+
+2011-05-30 20:19  source
+
+	* Fixed translation from nodeiD://xxx to _:xxx
+
+2011-05-30 20:17  source
+
+	* Fixed issue with cost based optimizer
+
+2011-05-24 18:57  source
+
+	* Fixed when iri exceeds 2KB limit and flag is enabled then shorten
+	  the iri, instead of rejecting it
+
+2011-05-24 18:56  source
+
+	* Fixed loop so it only uses local files
+
+2011-05-23 13:44  source
+
+	* Added initial support for SPARQL 1.1. build-in IF and COALISCE
+
+2011-05-23 11:24  source
+
+	* Fixed minor issue
+
+2011-05-23 11:23  source
+
+	* Fixed LastFM cartridge
+
+2011-05-23 09:02  source
+
+	* Added support for CREATE LITERAL CLASS "format string" ...
+
+2011-05-20 16:20  source
+
+	* Fixed WebID selection
+
+2011-05-20 16:20  source
+
+	* Fixed use certificate to verify the signature as an option
+	* Fixed use ldap&webid login
+
+2011-05-20 16:11  source
+
+	* Fixed add sponger ACL when installed
+
+2011-05-20 12:01  source
+
+	* Fixed comments
+
+2011-05-20 12:00  source
+
+	file webid_check.vsp was added on branch V6_0_0-DEVEL on 2011-05-20 12:02:32 +0000
+
+2011-05-20 12:00  source
+
+	* Added support for WebID idp
+	* Fixed WebID selection
+
+2011-05-20 11:51  source
+
+	* Added csv bulk loader script
+
+2011-05-20 11:46  source
+
+	* Fixed CSV import failed importing NULL values
+
+2011-05-20 11:44  source
+
+	* Fixed dav_enable should not be touched for dba account
+
+2011-05-19 18:32  source
+
+	* Fixed NULL value is not an error in lax mode
+
+2011-05-19 18:22  source
+
+	* Fixed wrong arg
+
+2011-05-19 13:34  source
+
+	* Added ldap schema support to WebID
+
+2011-05-19 13:15  source
+
+	* Added version and timeout argument
+
+2011-05-19 13:11  source
+
+	* Fixed duplicate symbol
+
+2011-05-19 10:17  source
+
+	* Fixed API contact edit function
+
+2011-05-19 09:58  source
+
+	* Fixed compiler warning
+
+2011-05-19 09:57  source
+
+	* Fixed add user to bootstrap as it can run procs in this context
+
+2011-05-18 21:15  source
+
+	* Fixed SIOC object services
+
+2011-05-18 21:12  source
+
+	* Fixed install/uninstall bugs
+
+2011-05-18 09:19  source
+
+	* Added Eventbrite cartridge
+	* Fixed guard against using revoked long-lived FB access token
+
+2011-05-18 09:10  source
+
+	* Added instructions on revoking access tokens to FB on retrieval
+	  confirmation page
+
+2011-05-18 09:09  source
+
+	* Fixed issue with properties
+
+2011-05-18 09:06  source
+
+	file eventbrite2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-05-18 09:19:11 +0000
+
+2011-05-18 09:01  source
+
+	* Added Upcoming cartridge
+	* Added Plancast cartridge
+	* Fixed use labels by default
+	* Fixed remove pro
+	* Fixed minor issues
+
+2011-05-17 22:53  source
+
+	* Added SIOC object services
+	* Fixed problem with edit command and Wiki version folders
+	* Fixed version history properties
+	* Fixed move/copy API with wrong source/destination
+	* Fixed problems with WebID
+
+2011-05-17 22:51  source
+
+	* Added SIOC object services
+	* Fixed IE JS problems
+	* Fixed UI bug
+
+2011-05-17 22:50  source
+
+	* Added SIOC object services
+	* Fixed changing/deleting events does not trigger re-sync with publication
+	* Fixed import/export bug
+	* Fixed IE JS problems
+
+2011-05-17 22:48  source
+
+	* Added SIOC object services
+	* Added annotation rules
+	* Fixed navigation and UI
+	* Fixed css
+	* Fixed IE bug
+	* Fixed UI bug
+
+2011-05-17 22:46  source
+
+	* Added SIOC object services
+	* Fixed IE bug
+	* Fixed UI bug
+
+2011-05-17 22:45  source
+
+	* Fixed IE JS problems
+	* Fixed UI bugs
+
+2011-05-17 22:44  source
+
+	* Added SIOC object services
+
+2011-05-17 22:43  source
+
+	* Fixed issue with Wiki after delete and restore VVC folder
+
+2011-05-17 22:42  source
+
+	* Added SIOC object services
+	* Fixed a++
+
+2011-05-17 21:14  source
+
+	* Fixed compiler warnings
+
+2011-05-17 14:06  source
+
+	* Added optimization for %g specifier for "Decimal" types in RDFViews
+
+2011-05-17 13:51  source
+
+	* Rebuild drivers
+
+2011-05-17 13:48  source
+
+	* Added function to get/set Query timeout (default = 0 = unlimited)
+
+2011-05-16 23:12  source
+
+	file upcoming2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-05-18 09:01:49 +0000
+
+2011-05-16 09:04  source
+
+	* Added initial support for SPARQL 1.1 Graph Store HTTP Protocol
+
+2011-05-16 08:51  source
+
+	* Fixed usage of http_request_header
+	* Fixed useage of last modified
+
+2011-05-16 08:50  source
+
+	* Fixed empty subject
+	* Fixed WebID selection
+	* Fixed problem with certificate generation using Safari on windows
+	* Fixed topic of interests
+	* Fixed a++
+
+2011-05-16 08:42  source
+
+	file plancast2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-05-18 09:01:49 +0000
+
+2011-05-16 08:35  source
+
+	* Fixed setting name
+
+2011-05-16 08:34  source
+
+	* Fixed entry page for sponged Facebook user's profile to top level
+	  container document
+
+2011-05-12 20:53  source
+
+	* Fixed compiler warning
+
+2011-05-12 20:53  source
+
+	* Added more system unames
+
+2011-05-11 14:49  source
+
+	* Fixed small issue
+
+2011-05-11 13:32  source
+
+	* Fixed issue compiling zip support on Mac OS X
+
+2011-05-11 13:19  source
+
+	* Fixed typo in Content-Type header
+
+2011-05-11 13:15  source
+
+	* Added missing file
+
+2011-05-11 13:11  source
+
+	* Fixed rdf_sink is not a DET
+
+2011-05-11 13:09  source
+
+	* Added more parameters for crawling
+	* Fixed top proc must run as dba
+	* Fixed use array for values
+
+2011-05-11 09:39  source
+
+	* Added WebID support to dynares
+	* Added optional async mode for dav meta extraction
+
+2011-05-11 08:08  source
+
+	* Added missing files
+
+2011-05-10 18:57  source
+
+	* Fixed write processing status to sponger queue
+	* Fixed access tokens for OpenGraph cartridge save/restore from table
+	  instead of the API key
+
+2011-05-10 18:43  source
+
+	* Fixed access tokens for OpenGraph cartridge save/restore from table
+	  instead of the API key
+
+2011-05-10 18:42  source
+
+	* Fixed minor issues
+
+2011-05-10 18:40  source
+
+	* Fixed disabled pg_check_map by default to make cpt faster
+
+2011-05-10 18:37  source
+
+	* Fixed disable pg_check_map by default to make cpt faster
+
+2011-05-10 12:20  source
+
+	* Fixed myust set sl_owner before cpt_rollback in order to know which
+	  thread owns the process, otherwise other threads may wrongly go
+	  inside the wait_checkpoint
+
+2011-05-10 12:18  source
+
+	* Added initial support for B.C. datetimes
+	* Added new functions to convert datetime from/to NASA Truncated
+	  Julian Day
+	* Fixed bug in date2num and num2date
+
+2011-05-09 12:06  source
+
+	* Fixed internal error in sparql_detalize on SPARUL statement
+
+2011-05-09 12:05  source
+
+	* Added new statistic counters
+
+2011-05-08 22:24  source
+
+	* Added GROUP_CONCAT and SAMPLE
+
+2011-05-08 22:23  source
+
+	* Added common function to set certificate server-side
+
+2011-05-08 22:18  source
+
+	* Added option to use certificates stored in the db
+
+2011-05-06 11:34  source
+
+	* Fixed call to sponger status procedure
+
+2011-05-05 12:55  source
+
+	* Fixed do not use aq if in sponger queue
+
+2011-05-05 12:54  source
+
+	* Fixed print literals with meta info only when html is requested
+
+2011-05-03 18:00  source
+
+	* Fixed workaround for missing offers
+
+2011-05-03 18:00  source
+
+	* Fixed minor issue
+
+2011-05-03 17:55  source
+
+	* Fixed compiling on VC10
+
+2011-05-03 17:51  source
+
+	* Fixed function signature for windows build
+
+2011-05-03 17:50  source
+
+	* Fixed error checking
+
+2011-05-03 14:03  source
+
+	* Added check for native JSON serializer/deserializer when available
+	* Fixed detection of buggy XML serializer in IE9
+	* Fixed MSIE detection
+	* Fixed SVG detection in OAT.Browser
+
+2011-05-03 11:50  source
+
+	* Fixed set rehash pct
+
+2011-05-03 11:15  source
+
+	* Fixed SPARQL OPTIONAL keyword sometimes causing queries to not
+	  return graph matches
+
+2011-05-02 14:16  source
+
+	* Added app discussion rules
+	* Added annotation rules
+	* Added common css
+	* Fixed navigation and standardize UI
+	* Fixed updating external URIs access rights in UI profile
+	* Fixed missing webfinger lookup
+	* Fixed OpenId not registered id message
+	* Fixed user selection page size
+	* Fixed popup windows
+	* Fixed security tab
+
+2011-05-02 14:09  source
+
+	* Added support for social bookmarking
+	* Fixed use 404 when no data is found
+	* Fixed links in footer
+	* Fixed escape the single quote char
+
+2011-05-02 14:06  source
+
+	* Fixed labels
+
+2011-05-02 14:02  source
+
+	* Fixed links
+
+2011-05-02 12:48  source
+
+	* Fixed popup windows
+
+2011-05-02 12:44  source
+
+	* Added annotation rules
+	* Added discussion IRIs
+	* Fixed navigation and standardize UI
+	* Fixed popup windows
+
+2011-05-02 12:43  source
+
+	file common.css was added on branch V6_0_0-DEVEL on 2011-05-02 14:16:01 +0000
+
+2011-05-02 12:30  source
+
+	* Added option to obtain a Facebook OAuth access token for use with
+	  sponger cartridge
+	* Fixed group export and delete of crawling targets
+	* Fixed crawling feeds, parameters for crawling
+	* Fixed disable config if no https
+	* Fixed shorten queue description
+
+2011-05-02 12:30  source
+
+	file fb_access_token_popup.vsp was added on branch V6_0_0-DEVEL on 2011-05-02 14:13:40 +0000
+
+2011-05-02 12:22  source
+
+	file google_store2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-05-02 14:10:54 +0000
+
+2011-05-02 12:22  source
+
+	file gowalla2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-05-02 14:10:54 +0000
+
+2011-05-02 12:22  source
+
+	* Added Gowalla cartridge
+	* Added Productontology
+	* Added Google Product
+	* Updated Facebook cartridge with multiple access tokens
+	* Fixed do not print empty container string if there is no name
+
+2011-05-02 08:24  source
+
+	* Fixed col_default to be same dtp as col_dtp to prevent default value
+	  misuse
+
+2011-05-02 08:23  source
+
+	* Fixed wrong deref of default int value
+
+2011-04-29 11:56  source
+
+	* Fixed when redirect is to secure site, setup the appropriate flags
+
+2011-04-26 12:16  source
+
+	* Fixed loading TriG
+
+2011-04-26 12:14  source
+
+	* Fixed loading NQuads
+
+2011-04-26 12:13  source
+
+	* Fixed check webid only if not uathenticated
+
+2011-04-21 13:09  source
+
+	* Added session counters for read/write/seek on gzip file
+
+2011-04-21 11:42  source
+
+	file README-WIN32.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:13 +0000
+
+2011-04-21 11:42  source
+
+	file watcom_f.mak was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:13 +0000
+
+2011-04-21 11:42  source
+
+	file watcom_l.mak was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:13 +0000
+
+2011-04-21 11:42  source
+
+	file zlib.dsw was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file README.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file bndsrc was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:11 +0000
+
+2011-04-21 11:42  source
+
+	file compile.clp was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:11 +0000
+
+2011-04-21 11:42  source
+
+	file example.dsp was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file minigzip.dsp was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file readme.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file zlib.dsp was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file zlib.inc was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:12 +0000
+
+2011-04-21 11:42  source
+
+	file README was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:11 +0000
+
+2011-04-21 11:41  source
+
+	file algorithm.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file enough.c was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:10 +0000
+
+2011-04-21 11:41  source
+
+	file rfc1950.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:10 +0000
+
+2011-04-21 11:41  source
+
+	file rfc1951.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:10 +0000
+
+2011-04-21 11:41  source
+
+	file rfc1952.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:10 +0000
+
+2011-04-21 11:41  source
+
+	file txtvsbin.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:10 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.vcproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file miniunz.vcproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:08 +0000
+
+2011-04-21 11:41  source
+
+	file minizip.vcproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file testzlib.vcproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file testzlibdll.vcproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file zlib.rc was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file zlibstat.vcproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.def was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.sln was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:09 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.sln was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.vcxproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.vcxproj.filters was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:08 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.vcxproj.user was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:08 +0000
+
+2011-04-21 11:41  source
+
+	file testzlibdll.vcxproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file testzlibdll.vcxproj.filters was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file testzlibdll.vcxproj.user was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlib.rc was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlibstat.vcxproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlibstat.vcxproj.filters was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlibstat.vcxproj.user was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file zlibvc.def was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:07 +0000
+
+2011-04-21 11:41  source
+
+	file miniunz.vcxproj.filters was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file miniunz.vcxproj.user was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file minizip.vcxproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file minizip.vcxproj.filters was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file minizip.vcxproj.user was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file testzlib.vcxproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file testzlib.vcxproj.filters was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file testzlib.vcxproj.user was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:06 +0000
+
+2011-04-21 11:41  source
+
+	file miniunz.vcxproj was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:05 +0000
+
+2011-04-21 11:41  source
+
+	file MiniZip64_Changes.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:04 +0000
+
+2011-04-21 11:41  source
+
+	file MiniZip64_info.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:04 +0000
+
+2011-04-21 11:41  source
+
+	file make_vms.com was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:04 +0000
+
+2011-04-21 11:41  source
+
+	file match686.asm was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:04 +0000
+
+2011-04-21 11:41  source
+
+	file gvmat64.S was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:02 +0000
+
+2011-04-21 11:41  source
+
+	file amd64-match.S was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:01 +0000
+
+2011-04-21 11:41  source
+
+	file zconf.h.cmakein was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:59 +0000
+
+2011-04-21 11:41  source
+
+	file zconf.h.in was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:59 +0000
+
+2011-04-21 11:41  source
+
+	file zlib.3.pdf was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:59 +0000
+
+2011-04-21 11:41  source
+
+	file zlib.map was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:59 +0000
+
+2011-04-21 11:41  source
+
+	file zlib.pc.in was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:59 +0000
+
+2011-04-21 11:41  source
+
+	file zlib2ansi was added on branch V6_0_0-DEVEL on 2011-04-21 11:43:00 +0000
+
+2011-04-21 11:41  source
+
+	file gzwrite.c was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:58 +0000
+
+2011-04-21 11:41  source
+
+	file treebuild.xml was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:58 +0000
+
+2011-04-21 11:41  source
+
+	file gzclose.c was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:57 +0000
+
+2011-04-21 11:41  source
+
+	file gzguts.h was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:57 +0000
+
+2011-04-21 11:41  source
+
+	file gzlib.c was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:58 +0000
+
+2011-04-21 11:41  source
+
+	file gzread.c was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:58 +0000
+
+2011-04-21 11:41  source
+
+	* Upgraded to zlib 1.2.5
+
+2011-04-21 11:41  source
+
+	file CMakeLists.txt was added on branch V6_0_0-DEVEL on 2011-04-21 11:42:56 +0000
+
+2011-04-20 15:12  source
+
+	* FIxed hang or crash after cpt over
+
+2011-04-20 15:12  source
+
+	* Fixed disable dep cols check
+
+2011-04-20 15:11  source
+
+	* Added debug code to detect mutex hang on same thread
+
+2011-04-19 20:50  source
+
+	* Fixed lock status report
+
+2011-04-19 20:49  source
+
+	* Fixed key dep cols check for sample
+
+2011-04-19 16:16  source
+
+	* Fixed bad bnode syntax in output
+
+2011-04-19 16:15  source
+
+	* Added session read waits statistic
+
+2011-04-18 16:03  source
+
+	* Fixed default mode for sponger should be sync instead of async
+
+2011-04-18 16:03  source
+
+	* Fixed http_lock requires that maintenance page is set
+
+2011-04-18 16:02  source
+
+	* Added statistics on read/write/seek session via file/gzip counters
+
+2011-04-15 12:42  source
+
+	* Added deadlock retry handler
+	* Added support to use redirect and timeout options
+
+2011-04-15 12:39  source
+
+	* Added Foursquare cartridge
+	* Added Zappos cartridge
+	* Added enhancements to Facebook OpenGraph cartridge
+	* Fixed minor issues
+
+2011-04-15 12:33  source
+
+	* Added "Raw linked data format" permalinks
+	* Fixed CSS
+
+2011-04-15 12:05  source
+
+	* Fixed codegen for service invocation for case of IN parameter
+	  that is not bound in SINV subquery (used only in filter) and is
+	  neither external/global nor fixed in parent group pattern
+
+2011-04-15 12:04  source
+
+	* Fixed support for xsd:time() in sparql when the argument value
+	  is safe for SQL CASET instead of function call
+
+2011-04-14 12:09  source
+
+	file zappos2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-04-15 12:39:05 +0000
+
+2011-04-13 22:51  source
+
+	* Added initial variant for estimate taking dep cols in account
+	  (by default disabled)
+
+2011-04-13 22:50  source
+
+	* Added missing param for http_get
+
+2011-04-13 10:16  source
+
+	* Fixed if tf_xx signals an error, xn_children were released twice
+
+2011-04-12 18:29  source
+
+	* Fixed check bnode subject
+	* Fixed clear avalues array before possible jump
+	* Fixed compiler warnings
+
+2011-04-11 21:44  source
+
+	* Fixed do not report a frequent error re unescaped "&&" in <SCRIPT>
+	  HTML tag
+	* Fixed can jump over buffer boundary if you have an &xx not ending
+	  in a semicolon
+
+2011-04-11 21:42  source
+
+	file copy_16.png was added on branch V6_0_0-DEVEL on 2011-04-11 21:45:59 +0000
+
+2011-04-11 21:42  source
+
+	* Added option top copy/clone crawler target
+	* Added option for crawl-delay
+
+2011-04-11 21:39  source
+
+	* Added support for crawl-delay
+
+2011-04-11 21:01  source
+
+	* Fixed removed leading CRLF
+
+2011-04-11 21:01  source
+
+	* Fixed wrong function call
+	* Fixed bad inference tag
+
+2011-04-11 20:55  source
+
+	* Fixed error message in spar_find_sc_for_big_ssl_const
+
+2011-04-11 20:54  source
+
+	* Added support for RDFa 1.1
+
+2011-04-11 20:53  source
+
+	* Fixed compiler warnings
+
+2011-04-11 15:36  source
+
+	* Added DB.DBA.RDF_RDFA11_FETCH_PROFILES() to sponge and return
+	  RDFa 1.1 external profile data
+
+2011-04-11 15:35  source
+
+	* Added rdfa: namespace prefix
+
+2011-04-11 15:05  source
+
+	* Added w3-1999-xhtml/vocab for RDFa 1.1
+
+2011-04-11 12:40  source
+
+	file foursquare2rdf.xsl was added on branch V6_0_0-DEVEL on 2011-04-15 12:39:04 +0000
+
+2011-04-11 12:40  source
+
+	file oplopengraph.owl was added on branch V6_0_0-DEVEL on 2011-04-15 12:39:03 +0000
+
+2011-04-11 09:15  source
+
+	* Fxed issue with rdf_type attr
+
+2011-04-11 08:28  source
+
+	* Fixed double free
+
+2011-04-11 08:27  source
+
+	* Added support for trig
+
+2011-04-11 08:27  source
+
+	* Fixed check if file is present on local fs
+
+2011-04-07 21:19  source
+
+	* Added function to validate rdfxml
+
+2011-04-07 21:17  source
+
+	* Fixed do not flush immediately, as client may ask for gzip later
+
+2011-04-07 21:16  source
+
+	* FIxed if bitmap error on a cursor, kill the transaction instead of GPF
+
+2011-04-07 11:11  source
+
+	* Fixed if process is swapping do not try to signal self as lock reaper
+	  may decide to kill this transaction where it may wait for select
+	  thread to run its signal function
+
+2011-04-06 12:09  source
+
+	* Fixed issue with multiple transitive subqueries in sql optimizer
+
+2011-04-06 12:01  source
+
+	* Fixed when doing subseq, session will return session handle, which
+	  needs to be converted to string
+
+2011-04-05 14:38  source
+
+	* Fixed issues with RDFa 1.1 test
+
+2011-04-05 14:37  source
+
+	* Fixed possible mutex deadlock
+
+2011-04-04 12:32  source
+
+	* Added support for javascript-like hrefs in RDFa
+
+2011-04-04 12:31  source
+
+	* Fixed when not a string, use a cast to string
+
+2011-04-04 12:31  source
+
+	* Fixed use mtx in proper order
+
+2011-03-31 21:33  source
+
+	* Fixed issues with RDFa parsing
+
+2011-03-31 21:32  source
+
+	* Added check for MacDataSourceSize with default of 20MB
+
 2011-03-29 23:20  source
 
 	* Updated version to 6.1.3 for final release
@@ -117,10 +4909,6 @@
 
 	* Updated version
 
-2011-03-25 21:29  source
-
-	* Updated build environment for win32 and win64
-
 2011-03-25 17:47  source
 
 	* Fixed possible copy overlap on some newer C libs
@@ -4611,7 +9399,7 @@
 
 2010-04-14 10:47  source
 
-	* Fixed UI profileCVS: ----------------------------------------------------------------------
+	* Fixed UI profile
 
 2010-04-13 12:19  source
 
@@ -4833,10 +9621,6 @@
 
 	* Fixed no value is null
 
-2010-03-30 20:52  source
-
-	* Fixed PACKAGE_VERSION
-
 2010-03-30 17:59  source
 
 	* Updated documentation
@@ -5342,7 +10126,6 @@
 2010-03-07 08:20  source
 
 	* Fixed typo
-	 CVS: ----------------------------------------------------------------------
 
 2010-03-07 08:18  source
 
@@ -6209,10 +10992,6 @@
 
 	* Updated windows project file
 
-2010-02-01 23:15  source
-
-	* Updated win32 and win64 build scripts
-
 2010-02-01 23:14  source
 
 	* Fixed compiler warning
@@ -12540,7 +17319,7 @@
 
 2009-11-30 23:44  source
 
-	* Added debug log to meta cartridgesCVS: ----------------------------------------------------------------------
+	* Added debug log to meta cartridges
 
 2009-11-30 23:40  source
 
diff --git a/LICENSE b/LICENSE
index 33f11a8..4e83c45 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
 OpenLink Software's Virtuoso Open-Source (VOS) project
-Copyright (C) 1998-2010 OpenLink Software
+Copyright (C) 1998-2012 OpenLink Software
 
 This software is licensed under the GNU General Public License (see
 COPYING).
diff --git a/Makefile.am b/Makefile.am
index 8e5e9fc..15f4826 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -103,10 +103,6 @@ EXTRA_DIST = \
 	debian/virtuoso-opensource.postrm.debhelper \
 	debian/virtuoso-opensource.prerm.debhelper \
 	debian/virtuoso-opensource.substvars \
-	win32/mkperlenv.pl \
-	win32/mkpythonenv.py \
-	win32/*.bat \
-	win32/*.vcproj \
-	win32/*.sln \
-	win64/*.vcproj \
-	win64/*.sln
+	windows/*.bat \
+	windows/*.sln \
+	windows/*.vcxproj
diff --git a/Makefile.in b/Makefile.in
index 4e4e784..6e70e18 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -180,6 +180,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -228,6 +229,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -279,6 +281,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -325,7 +328,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -395,13 +397,9 @@ EXTRA_DIST = \
 	debian/virtuoso-opensource.postrm.debhelper \
 	debian/virtuoso-opensource.prerm.debhelper \
 	debian/virtuoso-opensource.substvars \
-	win32/mkperlenv.pl \
-	win32/mkpythonenv.py \
-	win32/*.bat \
-	win32/*.vcproj \
-	win32/*.sln \
-	win64/*.vcproj \
-	win64/*.sln
+	windows/*.bat \
+	windows/*.sln \
+	windows/*.vcxproj
 
 all: all-recursive
 
diff --git a/NEWS b/NEWS
index 3343d6d..d1e106c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,190 @@
+Mar 15, 2012, V6.1.5:
+  * Database engine
+    - Added support for SPARQL 1.1 WITH, USING, NAMED
+    - Added support for SPARQL 1.1 Update
+    - Added support for SPARQL 1.1 Functions
+    - Added support for SPARQL Macro Library syntax
+    - Added support for SPARQL DESCRIBE modes OBJCBD and SCBD
+    - Added support for SPARQL DESCRIBE/CONSTRUCT to return 3 column
+      resultset when using ODBC/JDBC/.NET by default
+    - Added support for wide strings in all SPARQL serializers
+    - Added common infrastructure for RDF-specific XML parsers
+    - Added new RDF/XML printer (faster + pretty print)
+    - Added TRIG formatter
+    - Added support for r2rml graph generation
+    - Added support for XHTML+Microdata
+    - Added human-readable HTML output for DESCRIBE (list and table)
+    - Added support for SELECT scalar_expression subqueries without FROM
+      clause to avoid extra lock on fake subqueries
+    - Added DBpedia vad package
+    - Added support for scoping ACL to a virtual dir
+    - Added new Visual Studio 11 project files for both 32bit and 64bit builds
+    - Fixed RDF/XML parser to pass w3c tests dated 2003-Nov.
+    - Fixed JSON-LD syntax to match recent draft of the spec
+    - Fixed CONSTRUCT with constant string objects with language
+    - Fixed output of bnodes in RDF/XML format
+    - Fixed support for sparql load <file:///....> i.e. with absolute path
+      from system root
+    - Fixed issue with uninitialized variables
+    - Fixed use portable method for escaping symbol for gawk 3 and 4
+    - Fixed issue with semaphores on Mac OS X 10.7
+    - Fixed compiler warnings
+    - Fixed memory leaks
+    - Updated documentation
+
+  * SPARQL and RDF
+    - Added new cartridges for Angellis. Klout, New York Times Article,
+      Social Statistics and Stackoverflow
+    - Added new ontolgies for Angellis, Cert, Crunchbase, DBpedia
+      Spotlight, NYT, LinkedIn, oplbase, oplweb
+    - Added Linkedin Shares cartridge
+    - Added support for extracting all meta and link head-element data from XHTML documents
+    - Added post-processing script for generating owl:sameAs links for
+      co-reference resolution
+    - Added support for get:soft "add" and get:cartridge
+    - Added support for paging over large collections to FB cartridge
+    - Fixed Amazon cartridge to work with new Product Advertising API
+    - Fixed handling of # in About header
+    - Fixed qualify opl:mentions  with cartridge identifier
+    - Fixed social-profile-url property across social cartridges
+
+  * ODS Applications
+    - Added support for WebID 1.0 spec
+    - Added WebID WaterMark
+    - Added support for CalDAV and CardDAV
+    - Added ACL editing for DETs
+    - Added folder selecton for SyncML
+    - Added option to import rdf data from file
+    - Added rule for briefcase folder IRIs
+    - Added VCARD Property Grouping
+    - Added private graphs data
+    - Added option to deactivate user
+
+
+Oct 31, 2011, V6.1.4:
+  * Upgrading from previous versions
+    - Added information about upgrading from previous 6.1.x to 6.1.4
+    - Enabled check for bad index due to XML fragment
+      See: README.UPGRADE
+
+  * Database engine
+    - Added new implementation of search_excerpt that can handle both ANSI/UTF8 and Wide strings
+    - Added new setting RdfFreeTextRulesSize
+    - Added improved support for inference and RDF views to "non-default" storages
+    - Added option to register post-processing callbacks to DESCRIBE
+    - Added initial support for PHP 5.3
+    - Added aggregate DB.DBA.GROUP_DIGEST which makes it possible to
+      return part of big output of DB.DBA.GROUP_CONCAT without running out of row length limits
+    - Added optimised codegen for built-in aggregate functions
+    - Added option to enable/disable ?P statistics
+    - Added support for HTML+Microformat, Microformat/JSON and JSON-LD output formats
+    - Added support for SPARQL 1.1 build-in IF and COALESCE
+    - Added support for SPARQL 1.1 Graph Store HTTP Protocol
+    - Added support for SPARQL Graph CRUD
+    - Added support for SQLQUERY syntax in declaration of RDF views
+    - Added support to call XPath/XQuery functions in SPARQL
+    - Added option to enable/disable ?P statistics
+    - Fixed code generation using gawk 4
+    - Fixed code generation for service invocation for case of IN parameter that is not bound in 
+      SINV sub-query is neither external/global nor fixed in parent group pattern
+    - Fixed col_default to be same dtp as col_dtp to prevent default value misuse
+    - Fixed compiler warnings
+    - Fixed connection leak in connection pool during long checkpoints
+    - Fixed crash running FILTER query containing IN clause with only one item in it
+    - Fixed deadlock on attempt of qr_recompile during the run of SPARQL-to_SQL front-end
+    - Fixed disable dep cols check
+    - Fixed disabled pg_check_map by default to make checkpoint faster
+    - Fixed handling of GROUP BY and ORDER BY using expressions
+    - Fixed hang or crash after checkpoint is finished
+    - Fixed issues with cost based optimizer
+    - Fixed issue with multiple transitive subqueries in sql optimizer
+    - Fixed issue with ORDER BY expression optimization
+    - Fixed JSON output for native parsers
+    - Fixed key dep cols check for sample
+    - Fixed lock status report
+    - Fixed memory leaks
+    - Fixed possible mutex deadlock
+    - Fixed problems re-creating quad map
+    - Fixed rdfview generation
+    - Fixed recompile all qr's cached on cli connection when dropping a group or creating new
+      graph group
+    - Fixed set sl_owner before cpt_rollback in order to know which thread owns the process,
+      otherwise other threads may wrongly go inside the wait_checkpoint
+    - Fixed skip rules which perform http redirect when doing a POST
+    - Fixed space calculation when changed records does not fit in available space on page
+    - Fixed SPARQL OPTIONAL keyword sometimes causing queries to not return graph matches
+    - Fixed SQL codegen bug in SPARQL queries of R2RML rewriter
+    - Fixed when iri exceeds 2KB limit and flag is enabled then shorten the iri, instead of
+      rejecting it
+    - Rebuild Jena, Sesame2 and JDBC drivers
+    - Updated documentation
+
+
+  * SPARQL and RDF
+    - Added new cartridges for Eventbrite, Eventful, Foursquare, Google+, Google Place, Google
+      Product, Google Profile, Gowalla, Guardian, Hyperpublic, Jigsaw, LinkedIn, Plancast,
+      ProgrammableWeb, Seatgeek, Seevl, SimpleGeo, Upcoming, XRD, Zappos and Zoopla
+    - Added ontologies for OpenLink CV/Resume, Productontology
+    - Added new cartridge for Twitter using REST API
+    - Added enhancements to Facebook OpenGraph cartridge
+    - Added support for social bookmarking
+    - Added new HTML generation for /sparql endpoint
+    - Added support for ms-author-va : sparql header
+    - Added new UI in /fct for conditionals like = < > ranges and IN
+    - Added support for proper permalink for /fct
+    - Added support for javascript-like hrefs in RDFa
+    - Added w3-1999-xhtml/vocab for RDFa 1.1
+    - Added HTTP status codes in SPARQL graph store protocol
+    - Added API for selective sponging
+    - Added generation of CV from LinkedIn using the oplcv ontology
+    - Added support for CREATE LITERAL CLASS "format string" ...
+    - Fixed bad conversion of utf8 in rdf/xml
+    - Fixed "delayed" filters like ?x p1 ?o1 ; p2 ?o2 . optional { ... } . filter (?o1 = ?o2)
+    - Fixed map OpenLink Zillow ontology to geo:lat/long
+    - Fixed map oplog:likes_XXX property to like:likes
+    - Fixed minor issues
+    - Fixed SPARUL LOAD INTO command creating duplicate graphs
+    - Fixed translation from nodeID://xxx to _:xxx
+    - Fixed url encoding issues in RDF/XML
+    - Fixed when dropping a graph, also check if there is a quad map for it
+
+
+  * ODS Applications
+    - Added ACL eXecute flag
+    - Added RDL and TTL representations to Offers
+    - Added SIOC object services
+    - Added WebID verify service
+    - Added annotation rules
+    - Added app discussion rules
+    - Added discussion IRIs
+    - Added header and head links for IRIs
+    - Added ldap schema support to WebID
+    - Added mail verification service
+    - Added support for WebID idp
+    - Added user's rewrite rules
+    - Added user/mail availability action
+    - Updated CKEditor to version 3.6.1
+    - Fixed a++
+    - Fixed ACL using patterns
+    - Fixed API functions
+    - Fixed call auth check only when needed
+    - Fixed changing/deleting events does not trigger re-sync with publication
+    - Fixed Delicious import/publish
+    - Fixed description presentation
+    - Fixed Facebook UI
+    - Fixed IE JS problems
+    - Fixed import atom sources
+    - Fixed move/copy API with wrong source/destination
+    - Fixed navigation and UI
+    - Fixed Offers, Likes and Dislikes, Topic of Interest
+    - Fixed search RSS problem
+    - Fixed SIOC RDF links API functions
+    - Fixed typo in messages
+    - Fixed UI bug
+    - Fixed UI bugs
+    - Fixed WebDAV selection
+
+
 March 30, 2011, V6.1.3:
   * Database engine
     - Added configurable normalization of accented characters
diff --git a/README b/README
index 5899fe4..32302d5 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 Virtuoso Open-Source Edition: Building
 ======================================
 
-Copyright (C) 1998-2010 OpenLink Software <vos.admin at openlinksw.com>
+Copyright (C) 1998-2012 OpenLink Software <vos.admin at openlinksw.com>
 
 
 Table of Contents
@@ -34,6 +34,9 @@ Table of Contents
  * .... Mac OS X 10.6 32-bit
  * .... Mac OS X 10.6 64-bit
  * .... Mac OS X 10.6 Universal
+ * .... Mac OS X 10.7 32-bit
+ * .... Mac OS X 10.7 64-bit
+ * .... Mac OS X 10.7 Universal
  * .... Solaris 2.x i386 32-bit
  * .... Solaris 2.10 Opteron 32-bit
  * .... Solaris 2.10 Opteron 64-bit
@@ -313,6 +316,24 @@ Mac OS X 10.6 Universal
     export CFLAGS
     ./configure --disable-dependency-tracking ...
 
+Mac OS X 10.7 32-bit
+--------------------
+    CFLAGS="-O -m32 -mmacosx-version-min=10.7"
+    export CFLAGS
+    ./configure ...
+
+Mac OS X 10.7 64-bit
+--------------------
+    CFLAGS="-O -m64 -mmacosx-version-min=10.7"
+    export CFLAGS
+    ./configure ...
+
+Mac OS X 10.7 Universal 
+-----------------------
+    CFLAGS="-O -arch i386 -arch x86_64 -mmacosx-version-min=10.7"
+    export CFLAGS
+    ./configure --disable-dependency-tracking ...
+
 Solaris 2.x i386 32-bit
 -----------------------
 Note: on Solaris or Open Solaris we recommend you use gmake either from
diff --git a/README.CVS b/README.CVS
index 40b42a3..93f435a 100644
--- a/README.CVS
+++ b/README.CVS
@@ -1,7 +1,21 @@
 Using Virtuoso Open Source Edition CVS Tree
 ===========================================
 
-Copyright (C) 1998-2010 by OpenLink Software <vos.admin at openlinksw.com>
+Copyright (C) 1998-2012 OpenLink Software <vos.admin at openlinksw.com>
+
+
+NOTICE
+======
+
+The Virtuoso Open Source development team has decided to stop using
+CVS in favour of GIT. The VOS 6.1.5 version will be the last version
+in CVS tree on sourceforge.net. Users who are tracking the Virtuoso
+Open Source project or want to aid in it's development are encouraged
+to move with us to github via:
+
+  https://github.com/openlink/virtuoso-opensource
+
+For information about GIT see also README.GIT
 
 
 Introduction
diff --git a/README.GIT b/README.GIT
new file mode 100644
index 0000000..8cf774e
--- /dev/null
+++ b/README.GIT
@@ -0,0 +1,152 @@
+Using Virtuoso Open Source Edition GIT Tree
+===========================================
+
+Copyright (C) 1998-2012 OpenLink Software <vos.admin at openlinksw.com>
+
+
+Introduction
+============
+
+This document describes how to checkout a copy of the git tree for
+development purposes. It also lists the packages that need to be
+installed prior to generating the necessary scripts and Makefiles to
+build the project.
+
+Git access is only needed for developers who want to actively track
+progress of the Virtuoso source code and contribute bugfixes or
+enhancements to the project. It requires basic knowledge of git
+itself, the general layout of open source and GNU projects, the use
+of autoconf and automake etc, which is beyond the scope of this
+document. 
+
+If you have any questions, please email us at <vos.admin at openlinksw.com>.
+
+
+Git Archive Server Access
+=========================
+
+For main development OpenLink Software will publish the Virtuoso
+Open Source tree to GitHub and encourage everyone who is interested
+in tracking the project, to make an account there.
+
+Users who mainly just want to track the code can use the following
+command to get a copy of the tree:
+
+    $ git clone git://github.com/openlink/virtuoso-opensource.git
+
+
+At this point you can create your own work branch based on any of
+the branches available, create bugfixes and commit them to your own
+branch and then use the 'git format-patch' command to generate the
+appropriate diffs to send to:
+
+    vos.admin at openlinksw.com
+
+
+Developers are encouraged to fork the project using GitHub, create
+their own branches to make enhancements/bugfixes and then send pull
+requests using the excellent GitHub interface for the OpenLink team
+to examine and incorporate the fixes into the master tree for an
+upcoming release.
+
+Github has excellent documentation on how to fork a project, send
+pull requests, track the project etc. on:
+
+    http://help.github.com/
+
+
+OpenLink Software will continue to use sourceforge.net for the
+source tarball releases and certain binary releases, and for
+completenes will also provides read-only Git Archive access.
+
+For more information read:
+
+   https://sourceforge.net/scm/?type=git&group_id=161622
+
+
+
+
+Package Dependencies
+====================
+
+To generate the configure script and all other build files necessary,
+please make sure the following packages and recommended versions are
+installed on your system.
+
+    Package   Version  From
+    autoconf  2.57     http://www.gnu.org/software/autoconf/
+    automake  1.9      http://www.gnu.org/software/automake/
+    libtool   1.5      http://www.gnu.org/software/libtool/
+    flex      2.5.33   http://flex.sourceforge.net/
+    bison     2.3      http://www.gnu.org/software/bison/
+    gperf     2.7.2    http://www.gnu.org/software/gperf/
+    gawk      3.1.1    http://www.gnu.org/software/gawk/
+    m4        1.4.1    http://www.gnu.org/software/m4/
+    make      3.79.1   http://www.gnu.org/software/make/
+    OpenSSL   0.9.7    http://www.openssl.org/
+
+and any GNU packages required by these. The autogen.sh and configure
+scripts check for the presence and right version of some of the required
+components.
+
+The above version are the minimum recommended versions of these
+packages. Older version of these packages can sometimes be used, but
+could cause build problems.
+
+To check the version number of the tools installed on your system,
+use one of the following commands:
+
+  * autoconf --version
+  * automake --version
+  * libtoolize --version
+  * flex --version
+  * bison --version
+  * gperf --version
+  * gawk --version
+  * m4 --version
+  * make --version
+  * openssl version
+
+If you have an older version than automake version 1.9 you can edit
+the configure.in script around line 47 using the examples provided for
+each version.
+
+
+Diskspace Requirements
+======================
+
+The build produces a demo database and Virtuoso application packages
+that are quite large. At least 800 MB of free space should be available
+in the build file system.
+
+When running `make install', the target file system should have about 460
+MB free. By default, the install target directories are under /usr/local/,
+but you can specify
+
+    ./configure --prefix=/path/to/dir
+
+instead.
+
+The minimum working configuration consists of the server executable
+and config files plus database, no more than a few MB for the server
+executable, depending on platform and options.
+
+
+Generate build files
+====================
+
+To generate the configure script and all related build files, use use
+the supplied script in your CVS checkout directory:
+
+    $ ./autogen.sh
+
+If the above command succeed without any error messages, please use the
+following command to check out all the options you can use:
+
+    $ ./configure --help
+
+Certain build targets are only enabled when the --enable-maintainer-mode
+flag is added to configure.
+
+Please read the files INSTALL and README in this directory for further
+information on how to configure the package and install it on your system.
diff --git a/README.UPGRADE b/README.UPGRADE
index a2ab2da..d8e3026 100644
--- a/README.UPGRADE
+++ b/README.UPGRADE
@@ -92,3 +92,130 @@ the new RDF_QUAD table is installed. The steps for this are:
      section
 
   8. Start up database
+
+
+Upgrading from VOS 6.1.X to VOS 6.1.Y
+-------------------------------------
+
+The database format has not changed between various versions of Virtuoso
+6.1.X, so from a database standpoint no particular steps need to be
+performed before upgrading to the latest version of Virtuoso 6.1.x.
+
+The only requirement is that you have properly shutdown the database
+prior to installing the latest binaries, as the transaction logs can
+have a different version tag. In this case the virtuoso server will
+print the following message and refuses to start the database:
+
+    The transaction log file has been produced by server version
+    '06.01.XXXX'. The version of this server is '06.01.YYYY'. If the
+    transaction log is empty or you do not want to replay it then delete
+    it and start the server again. Otherwise replay the log using the
+    server of version '06.01.XXXX' and make checkpoint and shutdown
+    to ensure that the log is empty, then delete it and start using
+    new version.
+
+
+Upgrading from VOS 6.1.X to VOS 6.1.4
+-------------------------------------
+
+In Virtuoso versions before 6.1.4 some XML data was stored in the
+QUAD store in such a way it could break the sequence in an index
+causing wrong results to be passed back.
+
+To fix this we've added an automated check into 6.1.4 to detect if
+this condition occurs and to fix the index when needed.
+
+When a DBA starts the database with this newer virtuoso binary the
+following text will appear in the virtuoso session log:
+
+  21:05:36 PL LOG: This database may contain RDF data that could cause indexing problems on previous versions of the server.
+  21:05:36 PL LOG: The content of the DB.DBA.RDF_QUAD table will be checked and an update may automatically be performed if
+  21:05:36 PL LOG: such data is found.
+  21:05:36 PL LOG: This check will take some time but is made only once.
+
+This check will take some time depending on the number of stored
+QUADS, but if the check succeeds the following message is entered
+in the log and virtuoso will flag this check is done, so it will
+not affect subsequent restarts of the database server. 
+
+  21:05:36 PL LOG: No need to update DB.DBA.RDF_QUAD
+
+The database will continue to perform the startup routines and go
+into an online state.
+
+
+However if the condition is detected, the following message will
+appear in the log and the virtuoso server will refuse to start up:
+
+  21:05:36 PL LOG: An update is required.
+  21:05:36 PL LOG:
+  21:05:36 PL LOG: NOTICE: Before Virtuoso can continue fixing the DB.DBA.RDF_QUAD table and its indexes
+  21:05:36 PL LOG:         the DB Administrator should check make sure that:
+  21:05:36 PL LOG:
+  21:05:36 PL LOG:          * there is a recent backup of the database
+  21:05:36 PL LOG:          * there is enough free disk space available to complete this conversion
+  21:05:36 PL LOG:          * the database can be offline for the duration of this conversion
+  21:05:36 PL LOG:
+  21:05:36 PL LOG:         Since the update can take a considerable amount of time on large databases
+  21:05:36 PL LOG:         it is advisable to schedule this at an appropriate time.
+  21:05:36 PL LOG:
+  21:05:36 PL LOG: To continue the DBA must change the virtuoso.ini file and add the following flag:
+  21:05:36 PL LOG:
+  21:05:36 PL LOG:     [Parameters]
+  21:05:36 PL LOG:     AnalyzeFixQuadStore = 1
+  21:05:36 PL LOG:
+  21:05:36 PL LOG: For additional information please contact OpenLink Support <support at openlinksw.com>
+  21:05:36 PL LOG: This process will now exit.
+
+Since the update will take a substantial amount of time and additional
+disk space depending on the size of the QUAD store, OpenLink has
+decided not to automatically start the update process but hand
+control back to the DBA and let him decide when to perform this
+update. In case the DBA wants to delay the update until a more
+appropriate time, he should restart with the previous binary as
+this latest binary will not allow him to startup.
+
+Once the DBA has checked the backups, disk space and found an
+appropriate time-slot to run this update, he should edit the
+virtuoso.ini file and add the following flag:
+
+	[Parameters]
+	AnalyzeFixQuadStore = 1
+
+
+
+Upon starting the virtuoso server, the following messages will appear in the virtuoso.log file:
+
+  21:05:57 PL LOG: This database may contain RDF data that could cause indexing problems on previous versions of the server.
+  21:05:57 PL LOG: The content of the DB.DBA.RDF_QUAD table will be checked and an update may automatically be performed if
+  21:05:57 PL LOG: such data is found.
+  21:05:57 PL LOG: This check will take some time but is made only once.
+  21:05:57 PL LOG:
+  21:05:57 PL LOG: An update is required.
+  21:05:57 PL LOG: Please be patient.
+  21:05:57 PL LOG: The table DB.DBA.RDF_QUAD and two of its additional indexes will now be patched.
+  21:05:57 PL LOG: In case of an error during the operation, delete the transaction log before restarting the server.
+  21:05:57 Checkpoint started
+  21:05:57 Checkpoint finished, log off
+  21:05:57 PL LOG: Phase 1 of 9: Gathering statistics ...
+  21:05:58 PL LOG:  * Index sizes before the processing: 002565531 RDF_QUAD, 002565531 POGS, 001171100 OP
+  21:05:58 PL LOG: Phase 2 of 9: Copying all quads to a temporary table ...
+  21:07:26 PL LOG: * Index sizes of temporary table: 001171100 OP
+  21:07:26 PL LOG: Phase 3 of 9: Cleaning the quad storage ...
+  21:07:51 PL LOG: Phase 4 of 9: Refilling the quad storage from the temporary table...
+  21:09:17 PL LOG: Phase 5 of 9: Cleaning the temporary table ...
+  21:09:41 PL LOG: Phase 6 of 9: Gathering statistics again ...
+  21:09:41 PL LOG: * Index sizes after the processing: 002565531 RDF_QUAD, 002565531 POGS, 001171100 OP
+  21:09:41 PL LOG: Phase 7 of 9: integrity check (completeness of index RDF_QUAD_POGS of DB.DBA.RDF_QUAD) ...
+  21:10:00 PL LOG: Phase 8 of 9: integrity check (completeness of primary key of DB.DBA.RDF_QUAD) ...
+  21:10:17 PL LOG: Phase 9 of 9: final checkpoint...
+  21:10:20 Checkpoint started
+  21:10:22 Checkpoint finished, log off
+  21:10:22 PL LOG: Update complete.
+
+If the update process detects any problem, it will put some debug
+output into the virtuoso.log and exit. At this point the DBA is
+advised to remove the virtuoso.trx file and contact OpenLink Support
+<support at openlinksw.com>.
+
+After the update process has completed, the database is left in an online state.
diff --git a/aclocal.m4 b/aclocal.m4
index 0db7c18..ac48335 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/appsrc/Makefile.am b/appsrc/Makefile.am
index d271b54..80e4fc4 100644
--- a/appsrc/Makefile.am
+++ b/appsrc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/Makefile.in b/appsrc/Makefile.in
index ef7a5fe..63585ba 100644
--- a/appsrc/Makefile.in
+++ b/appsrc/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -139,6 +139,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -187,6 +188,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -238,6 +240,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -284,7 +287,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/appsrc/ODS-Addressbook/Makefile.am b/appsrc/ODS-Addressbook/Makefile.am
index b4ce644..46acc3e 100644
--- a/appsrc/ODS-Addressbook/Makefile.am
+++ b/appsrc/ODS-Addressbook/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -46,6 +46,7 @@ clean-local:
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Addressbook/Makefile.in b/appsrc/ODS-Addressbook/Makefile.in
index 356db60..5b483db 100644
--- a/appsrc/ODS-Addressbook/Makefile.in
+++ b/appsrc/ODS-Addressbook/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -309,6 +311,7 @@ CLEANFILES = \
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Addressbook/make_vad.sh b/appsrc/ODS-Addressbook/make_vad.sh
index be4ecb6..e09d5d1 100755
--- a/appsrc/ODS-Addressbook/make_vad.sh
+++ b/appsrc/ODS-Addressbook/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.47.2.30 2011/03/23 12:17:57 source Exp $
+#  $Id: make_vad.sh,v 1.47.2.36 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.4.66"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -87,6 +87,56 @@ else
   myrm=$RM
 fi
 
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -222,7 +272,7 @@ sticker_init() {
   echo "  <name package=\"AddressBook\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS AddressBook Manager\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -234,8 +284,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.76.96\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-10-08 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.85.05\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-12-29 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -261,9 +311,9 @@ sticker_init() {
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/ab-a-table.sql', 1, 'report',  $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/ab-a-code.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/ab-a-update.sql', 1, 'report', $ISDAV);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/ab-a-soap.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/ab-a-api.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/sioc_ab.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/AddressBook/sql/DET_CardDAV.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
   echo "  <sql purpose=\"pre-uninstall\">" >> $STICKER
@@ -378,6 +428,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -394,7 +445,6 @@ virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_addressbook_dav.vad
 chmod 644 ods_addressbook_filesystem.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -404,5 +454,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Addressbook/sql/DET_CardDAV.sql b/appsrc/ODS-Addressbook/sql/DET_CardDAV.sql
new file mode 100755
index 0000000..59bb619
--- /dev/null
+++ b/appsrc/ODS-Addressbook/sql/DET_CardDAV.sql
@@ -0,0 +1,833 @@
+--
+--
+--  $Id: DET_CardDAV.sql,v 1.1.2.1 2012/03/08 12:08:38 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+use DB
+;
+
+create function "CardDAV_FIXNAME" (in mailname any) returns varchar
+{
+  return
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (mailname, '/', '_'), '\\', '_'), ':', '_'), '+', '_'), '\"', '_'), '[', '_'), ']', '_'), '''', '_'), ' ', '_');
+}
+;
+
+create function "CardDAV_COMPOSE_ICS_NAME" (in uid varchar) returns varchar
+{
+  return replace(sprintf('%s.vcf', uid), '@', '-');
+}
+;
+
+create function "CardDAV_ACCESS_PARAMS" (
+  in detcol_id any,
+  out access varchar,
+  out gid integer,
+  out uid integer)
+{
+  whenever not found goto ret;
+
+  access := '110000000NN';
+  gid := http_nogroup_gid ();
+  uid := http_nobody_uid ();
+  if (isinteger (detcol_id))
+    select COL_PERMS, COL_GROUP, COL_OWNER into access, gid, uid from WS.WS.SYS_DAV_COL where COL_ID = detcol_id;
+
+  ret: ;
+}
+;
+
+--| This matches DAV_AUTHENTICATE (in id any, in what char(1), in req varchar, in a_uname varchar, in a_pwd varchar, in a_uid integer := null)
+--| The difference is that the DET function should not check whether the pair of name and password is valid; the auth_uid is not a null already.
+create function "CardDAV_DAV_AUTHENTICATE" (
+  in id any,
+  in what char(1),
+  in req varchar,
+  in auth_uname varchar,
+  in auth_pwd varchar,
+  in auth_uid integer)
+{
+  -- dbg_obj_princ ('CardDAV_DAV_AUTHENTICATE (', id, what, req, auth_uname, auth_pwd, auth_uid, http_dav_uid(), ')');
+  declare domain_id, item_id integer;
+  declare rc any;
+
+  rc := '';
+  domain_id := id[3];
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+    return -1;
+
+  if ('R' = what)
+  {
+    item_id := id[4];
+    if (not exists (select 1 from AB.WA.PERSONS where P_ID = item_id))
+      return -1;
+
+    rc := AB.WA.acl_check (domain_id, item_id);
+  }
+  else
+  {
+    rc := AB.WA.acl_check (domain_id);
+  }
+  if (rc <> '')
+  {
+    if ((rc = 'R') and (req = '1__'))
+      return http_nobody_uid ();
+
+    if ((rc = 'W') and (req = '11_'))
+      return http_nobody_uid ();
+  }
+  return -20;
+}
+;
+
+--| This exactly matches DAV_AUTHENTICATE_HTTP (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer
+--| The function should fully check access because DAV_AUTHENTICATE_HTTP do nothing with auth data either before or after calling this DET function.
+--| Unlike DAV_AUTHENTICATE, user name passed to DAV_AUTHENTICATE_HTTP header may not match real DAV user.
+--| If DET call is successful, DAV_AUTHENTICATE_HTTP checks whether the user have read permission on mount point collection.
+--| Thus even if DET function allows anonymous access, the whole request may fail if mountpoint is not readable by public.
+create function "CardDAV_DAV_AUTHENTICATE_HTTP" (
+  in id any,
+  in what char(1),
+  in req varchar,
+  in can_write_http integer,
+  inout a_lines any,
+  inout a_uname varchar,
+  inout a_pwd varchar,
+  inout a_uid integer,
+  inout a_gid integer,
+  inout _perms varchar) returns integer
+{
+  -- dbg_obj_princ ('CardDAV_DAV_AUTHENTICATE_HTTP (', id, what, req, can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, _perms, ')');
+  declare domain_id, item_id integer;
+  declare rc any;
+
+  rc := '';
+  domain_id := id[3];
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+    return -1;
+
+  if ('R' = what)
+  {
+    item_id := id[4];
+    if (not exists (select 1 from AB.WA.PERSONS where P_ID = item_id))
+      return -1;
+
+    rc := AB.WA.acl_check (domain_id, item_id);
+  }
+  else
+  {
+    rc := AB.WA.acl_check (domain_id);
+  }
+  if (rc <> '')
+  {
+    a_uid := http_nobody_uid ();
+    a_gid := http_nogroup_gid ();
+    if (rc = 'R')
+      _perms := '1__';
+    else if (rc = 'W')
+      _perms := '11_';
+
+    return a_uid;
+  }
+  return -20;
+}
+;
+
+--| This matches DAV_GET_PARENT (in id any, in st char(1), in path varchar) returns any
+create function "CardDAV_DAV_GET_PARENT" (in id any, in st char(1), in path varchar) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_GET_PARENT (', id, st, path, ')');
+  return -20;
+}
+;
+
+--| When DAV_COL_CREATE_INT calls DET function, authentication, check for lock and check for overwrite are passed, uid and gid are translated from strings to IDs.
+--| Check for overwrite, but the deletion of previously existing collection should be made by DET function.
+create function "CardDAV_DAV_COL_CREATE" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_COL_CREATE (', detcol_id, path_parts, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| It looks like that this is redundant and should be removed at all.
+create function "CardDAV_DAV_COL_MOUNT" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_COL_MOUNT (', detcol_id, path_parts, full_mount_path, mount_det, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| It looks like that this is redundant and should be removed at all.
+create function "CardDAV_DAV_COL_MOUNT_HERE" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_COL_MOUNT_HERE (', parent_id, full_mount_path, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_DELETE_INT calls DET function, authentication and check for lock are passed.
+create function "CardDAV_DAV_DELETE" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer
+{
+  --dbg_obj_princ ('CardDAV_DAV_DELETE (', detcol_id, path_parts, what, silent, auth_uid, ')');
+  declare top_id any;
+  declare rc, muser_id, domain_id integer;
+
+  top_id := "CardDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, 'R', muser_id, domain_id);
+  if (top_id = -1)
+    return -20;
+
+  AB.WA.contact_delete (top_id[4], domain_id);
+  return 1;
+}
+;
+
+--| When DAV_RES_UPLOAD_STRSES_INT calls DET function, authentication and check for locks are performed before the call.
+--| There's a special problem, known as 'Transaction deadlock after reading from HTTP session'.
+--| The DET function should do only one INSERT of the 'content' into the table and do it as late as possible.
+--| The function should return -29 if deadlocked or otherwise broken after reading blob from HTTP.
+create function "CardDAV_DAV_RES_UPLOAD" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  --dbg_obj_princ ('CardDAV_DAV_RES_UPLOAD (', detcol_id, path_parts, ', [content], ', content, type, permissions, uid, gid, auth_uid, ')');
+  declare top_id, res any;
+  declare muser_id, domain_id, rc integer;
+
+  top_id := "CardDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, 'R', muser_id, domain_id);
+  if (top_id = -1)
+  {
+    ;
+  }
+  else
+  {
+    AB.WA.contact_delete (top_id[4], domain_id);
+  }
+  declare real_content any;
+  if (__tag (content) = 126)
+  {
+    real_content := http_body_read (1);
+    real_content := string_output_string (real_content);  -- check if bellow code can work with string session and if so remove this line
+    content := real_content;
+  }
+  res := AB.WA.import_vcard (domain_id, content);
+  if (length(res) > 0)
+    return vector (UNAME'CardDAV', detcol_id, uid, domain_id, path_parts[1], 0);
+
+  return -20;
+}
+;
+
+--| When DAV_PROP_REMOVE_INT calls DET function, authentication and check for locks are performed before the call.
+--| The check whether it's a system name or not is _not_ permitted.
+create function "CardDAV_DAV_PROP_REMOVE" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer
+{
+  -- dbg_obj_princ ('CardDAV_DAV_PROP_REMOVE (', id, what, propname, silent, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_PROP_SET_INT calls DET function, authentication and check for locks are performed before the call.
+--| The check whether it's a system property or not is _not_ permitted and the function should return -16 for live system properties.
+create function "CardDAV_DAV_PROP_SET" (
+  in id any,
+  in what char(0),
+  in propname varchar,
+  in propvalue any,
+  in overwrite integer,
+  in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_PROP_SET (', id, what, propname, propvalue, overwrite, auth_uid, ')');
+  if (propname = 'virt:aci_meta')
+  {
+    declare domain_id, item_id integer;
+
+    domain_id := id[3];
+    if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+      return -1;
+
+    if ('R' = what)
+    {
+      item_id := id[4];
+      if (not exists (select 1 from AB.WA.PERSONS where P_ID = item_id))
+        return -1;
+
+      AB.WA.contact_update2 (item_id, domain_id, 'P_ACL', serialize (propvalue));
+      return 1;
+    }
+    else
+    {
+      update DB.DBA.WA_INSTANCE
+         set WAI_ACL = serialize (propvalue)
+       where WAI_ID = domain_id;
+      return 1;
+    }
+    return -16;
+  }
+  if (propname[0] = 58)
+    return -16;
+
+  return -20;
+}
+;
+
+--| When DAV_PROP_GET_INT calls DET function, authentication and check whether it's a system property are performed before the call.
+create function "CardDAV_DAV_PROP_GET" (
+  in id any,
+  in what char(0),
+  in propname varchar,
+  in auth_uid integer)
+{
+  -- dbg_obj_princ ('CardDAV_DAV_PROP_GET (', id, what, propname, auth_uid, ')');
+  if ('virt:aci_meta' = propname)
+  {
+    declare domain_id, item_id integer;
+
+    domain_id := id[3];
+    if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+      return -1;
+
+    if ('R' = what)
+    {
+      item_id := id[4];
+      if (not exists (select 1 from AB.WA.PERSONS where P_ID = item_id))
+        return -1;
+
+      return (select deserialize (P_ACL) from AB.WA.PERSONS where P_DOMAIN_ID = domain_id and P_ID = item_id);
+    }
+    else
+    {
+      return (select deserialize (WAI_ACL) from DB.DBA.WA_INSTANCE where WAI_ID = domain_id);
+    }
+  }
+  if (':virtdet' = propname)
+  {
+    if ('R' = what)
+      return null;
+
+    return '';
+  }
+  return -11;
+}
+;
+
+--| When DAV_PROP_LIST_INT calls DET function, authentication is performed before the call.
+--| The returned list should contain only user properties.
+create function "CardDAV_DAV_PROP_LIST" (in id any, in what char(0), in propmask varchar, in auth_uid integer)
+{
+  -- dbg_obj_princ ('CardDAV_DAV_PROP_LIST (', id, what, propmask, auth_uid, ')');
+  return vector ();
+}
+;
+
+--| When DAV_PROP_GET_INT or DAV_DIR_LIST_INT calls DET function, authentication is performed before the call.
+create function "CardDAV_DAV_DIR_SINGLE" (in id any, in what char(0), in path any, in auth_uid integer) returns any
+{
+  declare domain_id integer;
+  declare colname, fullpath, rightcol varchar;
+  declare maxrcvdate datetime;
+  declare owner_gid, owner_uid integer;
+  declare access varchar;
+
+  "CardDAV_ACCESS_PARAMS" (id[1], access, owner_gid, owner_uid);
+
+  domain_id := id[3];
+  if (maxrcvdate is null)
+    maxrcvdate := coalesce ( (select max(P_UPDATED) from AB.WA.PERSONS where P_DOMAIN_ID = domain_id), cast ('1980-01-01' as datetime));
+
+  if (cast (maxrcvdate as integer) = 0)
+    maxrcvdate := cast ('1980-01-01' as datetime);
+
+  colname := (select "CardDAV_FIXNAME" (C.WAI_NAME)
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = id[2]
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_MEMBER_TYPE = 1
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_TYPE_NAME = 'AddressBook'
+                 and C.WAI_ID = domain_id);
+  if (DAV_HIDE_ERROR (colname) is null)
+    return -1;
+
+  if (path is not null)
+  {
+    rightcol := path[length(path) - 2];
+    if ('C' = what)
+      return vector (DAV_CONCAT_PATH ('/', path), 'C', 0, maxrcvdate, id, access, 0, id[2], maxrcvdate, 'dav/unix-directory', rightcol );
+  }
+  fullpath := DAV_CONCAT_PATH (DAV_SEARCH_PATH (id[1], 'C'), colname || '/');
+  if ('C' = what)
+  {
+    if (id[4] > 0)
+      return -1;
+
+    return vector (fullpath, 'C', 0, maxrcvdate, id, access, 0, id[2], maxrcvdate, 'dav/unix-directory', colname );
+  }
+  for (select "CardDAV_COMPOSE_ICS_NAME"(P_UID) as orig_mname, P_UPDATED from AB.WA.PERSONS where P_ID = id[4]) do
+    return vector (fullpath || orig_mname, 'R', 1024, P_UPDATED, id, access, 0, id[2], P_UPDATED, 'text/vcard', orig_mname);
+
+  return -1;
+}
+;
+
+--| When DAV_PROP_GET_INT or DAV_DIR_LIST_INT calls DET function, authentication is performed before the call.
+create function "CardDAV_DAV_DIR_LIST" (
+  in detcol_id any,
+  in path_parts any,
+  in detcol_path varchar,
+  in name_mask varchar,
+  in recursive integer,
+  in auth_uid integer) returns any
+{
+  --dbg_obj_princ ('CardDAV_DAV_DIR_LIST (', detcol_id, path_parts, detcol_path, name_mask, recursive, auth_uid,  ')');
+  declare domain_id, owner_gid, owner_uid integer;
+  declare top_davpath, access varchar;
+  declare res any;
+  declare top_id, descnames any;
+  declare what char (1);
+
+  "CardDAV_ACCESS_PARAMS" (detcol_id, access, owner_gid, owner_uid);
+  what := case when ((0 = length (path_parts)) or ('' = path_parts[length (path_parts) - 1])) then 'C' else 'R' end;
+  if (isarray (detcol_id) and (recursive = -1))
+    return "CardDAV_DAV_DIR_SINGLE" (detcol_id, what, CardDAV_DAV_SEARCH_PATH (detcol_id, what), auth_uid);
+
+  domain_id := 0;
+  if ('C' = what and 1 = length(path_parts))
+  {
+    top_id := vector (UNAME'CardDAV', detcol_id, owner_uid, 0, 0, 0); -- may be a fake id because top_id[3] may be NULL
+  } else {
+    top_id := "CardDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, what, owner_uid, domain_id);
+  }
+  if (DAV_HIDE_ERROR (top_id) is null)
+    return vector();
+
+  top_davpath := DAV_CONCAT_PATH (detcol_path, path_parts);
+  if ('R' = what)
+    return vector ("CardDAV_DAV_DIR_SINGLE" (top_id, what, top_davpath, auth_uid));
+
+  res := vector();
+  if ('C' = what)
+  {
+    -- Top level
+    if (top_id[3] = 0)
+    {
+      for select "CardDAV_FIXNAME"(C.WAI_NAME) as orig_name,
+                 C.WAI_ID as dom_id
+            from SYS_USERS A,
+                 WA_MEMBER B,
+                 WA_INSTANCE C
+           where A.U_ID = owner_uid
+             and B.WAM_USER = A.U_ID
+             and B.WAM_MEMBER_TYPE = 1
+             and B.WAM_INST = C.WAI_NAME
+             and C.WAI_TYPE_NAME = 'AddressBook'
+      do
+      {
+         res := vector_concat (res, vector (vector (DAV_CONCAT_PATH (top_davpath, orig_name) || '/', 'C', 0, now(),
+                  vector (UNAME'CardDAV', detcol_id, owner_uid, dom_id, 0, 0),
+                  access, owner_gid, owner_uid, now(), 'dav/unix-directory', orig_name) ) );
+      }
+      return res;
+    }
+  }
+  for select "CardDAV_COMPOSE_ICS_NAME"(P_UID) as orig_mname, P_ID, P_UPDATED
+        from AB.WA.PERSONS
+       where P_DOMAIN_ID = top_id[3]
+  do
+  {
+    res := vector_concat (res, vector (vector (DAV_CONCAT_PATH (top_davpath, orig_mname), 'R', 1024, P_UPDATED,
+    vector (UNAME'CardDAV', detcol_id, owner_uid, top_id[3], P_ID, 0),
+    access, owner_gid, owner_uid, P_UPDATED, 'text/vcard', orig_mname) ) );
+  }
+  return res;
+}
+;
+
+create procedure "CardDAV_DAV_FC_PRED_METAS" (inout pred_metas any)
+{
+  pred_metas := vector(
+    'P_ID',                 vector ('EVENTS'        , 0, 'integer', 'P_ID'   ),
+    'P_DOMAIN_ID',              vector ('EVENTS'        , 0, 'integer', 'P_DOMAIN_ID'   ),
+    'RES_NAME',                 vector ('EVENTS'             , 0, 'varchar'  , '"CardDAV_COMPOSE_ICS_NAME"(_top.P_UID)'),
+    'RES_FULL_PATH',            vector ('EVENTS'     , 0, 'varchar'  , 'concat (DAV_CONCAT_PATH (_param.detcolpath, ''addressbook''), "CardDAV_FIXNAME" (WAI_NAME), ''/'', "CardDAV_COMPOSE_ICS_NAME" (_top.P_UID)'),
+    'RES_TYPE',                 vector ('EVENTS'     , 0, 'varchar'  , '(''text/vcard'')'),
+    'RES_OWNER_ID',             vector ('SYS_USERS'       , 0, 'integer'  , 'U_ID'        ),
+    'RES_OWNER_NAME',           vector ('SYS_USERS'       , 0, 'varchar'  , 'U_NAME'      ),
+    'RES_GROUP_ID',             vector ('SYS_USERS'     , 0, 'integer'  , 'http_nogroup_gid()'  ),
+    'RES_GROUP_NAME',           vector ('SYS_USERS'     , 0, 'varchar'  , '(''nogroup'')'       ),
+    'RES_COL_FULL_PATH',        vector ('EVENTS'     , 0, 'varchar'  , 'concat (DAV_CONCAT_PATH (_param.detcolpath, ''addressbook''), "CardDAV_FIXNAME" (WAI_NAME), ''/'')'      ),
+    'RES_COL_NAME',             vector ('EVENTS'     , 0, 'varchar'  , '"CardDAV_FIXNAME" (WAI_NAME)'   ),
+    'RES_CR_TIME',              vector ('EVENTS'     , 0, 'datetime' , 'P_UPDATED'        ),
+    'RES_MOD_TIME',             vector ('EVENTS'     , 0, 'datetime' , 'P_UPDATED'  ),
+    'RES_PERMS',                vector ('EVENTS'     , 0, 'varchar'  , '(''110100000RR'')'   ),
+    'RES_CONTENT',              vector ('EVENTS'     , 0, 'text'     , 'P_INTERESTS'   ),
+    'PROP_NAME',        vector ('EVENTS'    , 0, 'varchar'  , '(''P_INTERESTS'')' ),
+    'PROP_VALUE',       vector ('SYS_DAV_PROP'  , 1, 'text' , 'P_INTERESTS'   ),
+    'RES_TAGS',         vector ('all-tags'  , 0, 'varchar'  , 'P_TAGS'  ), -- 'varchar', not 'text-tag' because there's no free-text on union
+    'RES_PUBLIC_TAGS',      vector ('public-tags'   , 0, 'varchar'  , 'P_TAGS'  ), -- 'varchar', not 'text-tag' because there's no free-text in table!
+    'RES_PRIVATE_TAGS',     vector ('private-tags'  , 0, 'varchar'  , 'P_TAGS'  ), -- 'varchar', not 'text-tag' because there's no free-text in table!
+    'RDF_PROP',         vector ('fake-prop' , 1, 'varchar'  , NULL  ),
+    'RDF_VALUE',        vector ('fake-prop' , 2, 'XML'  , NULL  ),
+    'RDF_OBJ_VALUE',        vector ('fake-prop' , 3, 'XML'  , NULL  )
+  );
+}
+;
+
+create procedure "CardDAV_DAV_FC_TABLE_METAS" (inout table_metas any)
+{
+  table_metas := vector (
+    'PERSONS'             , vector (      ''      ,
+                                        ''      ,
+                                                'P_NAME'    , 'P_NAME'  , '[__quiet] /' ),
+    'WA_INSTANCE'         , vector (      ''      ,
+                                        ''      ,
+                                                'WAI_NAME'     , 'WAI_NAME'   , '[__quiet] /' ),
+    'WA_MEMBER'         , vector (      ''      ,
+                                        ''      ,
+                                                'WAM_INST'     , 'WAM_INST'   , '[__quiet] /' ),
+
+    'SYS_USERS'   , vector (      ''      ,
+                                        ''      ,
+                                                NULL            , NULL          , NULL          ),
+    'public-tags'   , vector (  '  '    ,
+                                    ''  ,
+                        'P_TAGS'    , 'P_TAGS'  , NULL  ),
+    'private-tags'  , vector (  ' ' ,
+                    ' ' ,
+                        'P_TAGS'    , 'P_TAGS'  , NULL  ),
+    'all-tags'      , vector (  ' ' ,
+                    ' ' ,
+                        'P_TAGS'    , 'P_TAGS'  , NULL  ),
+    'fake-prop' , vector (  '\n  inner join WS.WS.SYS_DAV_PROP as ^{alias}^ on ((^{alias}^.PROP_PARENT_ID is null) and (^{alias}^.PROP_TYPE = ''R'')^{andpredicates}^)' ,
+                    '\n  exists (select 1 from WS.WS.SYS_DAV_PROP as ^{alias}^ where (^{alias}^.PROP_PARENT_ID is null) and (^{alias}^.PROP_TYPE = ''R'')^{andpredicates}^)'    ,
+                        'PROP_VALUE'    , 'PROP_VALUE'  , '[__quiet __davprop xmlns:virt="virt"] fakepropthatprobablyneverexists'   )
+    );
+}
+;
+
+create function "CardDAV_DAV_FC_PRINT_WHERE" (inout filter any, in param_uid integer) returns varchar
+{
+  declare pred_metas, cmp_metas, table_metas any;
+  declare used_tables any;
+  -- dbg_obj_princ ('Blog_POST_DAV_FC_PRINT_WHERE (', filter, param_uid, ')');
+  "CardDAV_DAV_FC_PRED_METAS" (pred_metas);
+  DAV_FC_CMP_METAS (cmp_metas);
+  "CardDAV_DAV_FC_TABLE_METAS" (table_metas);
+  used_tables := vector(
+      'PERSONS', vector ('PERSONS', '_top', null, vector (), vector (), vector ()),
+      'WA_INSTANCE', vector ('WA_INSTANCE', '_instances', null, vector (), vector (), vector ()),
+      'WA_MEMBER', vector ('WA_MEMBER', '_members', null, vector (), vector (), vector ()),
+      'SYS_USERS', vector ('SYS_USERS', '_users', null, vector (), vector (), vector ())
+  );
+  return DAV_FC_PRINT_WHERE_INT (filter, pred_metas, cmp_metas, table_metas, used_tables, param_uid);
+}
+;
+
+--| When DAV_DIR_FILTER_INT calls DET function, authentication is performed before the call and compilation is initialized.
+create function "CardDAV_DAV_DIR_FILTER" (in detcol_id any, in path_parts any, in detcol_path any, inout compilation any, in recursive integer, in auth_uid integer) returns any
+{
+    --dbg_obj_princ ('CardDAV_DAV_DIR_FILTER (', detcol_id, path_parts, detcol_path, compilation, recursive, auth_uid, ')');
+    declare st, access, qry_text, execstate, execmessage varchar;
+    declare res any;
+    declare cond_list, execmeta, execrows any;
+    declare sub, post_id, condtext, cond_key varchar;
+    declare owner_gid, owner_uid, domain_id integer;
+    "CardDAV_ACCESS_PARAMS" (detcol_id, access, owner_gid, owner_uid);
+    vectorbld_init (res);
+    sub := null;
+    post_id := null;
+    if (((length (path_parts) <= 1) and (recursive <> 1)) or (length (path_parts) > 2))
+    {
+      -- dbg_obj_princ ('\r\nGoto skip_post_level\r\n');
+      goto finalize;
+    }
+    if (length (path_parts) >= 2)
+    {
+        sub := path_parts[0];
+        if (sub = 'addressbooks')
+        {
+            domain_id := coalesce ((select C.WAI_ID
+                from SYS_USERS A,
+                WA_MEMBER B,
+                WA_INSTANCE C
+            where A.U_ID = owner_uid
+              and B.WAM_USER = A.U_ID
+              and B.WAM_MEMBER_TYPE = 1
+              and B.WAM_INST = C.WAI_NAME
+              and C.WAI_TYPE_NAME = 'AddressBook'
+              and "CardDAV_FIXNAME"(C.WAI_NAME) = path_parts[1]));
+            if (domain_id is null)
+                goto finalize;
+        }
+        else
+            goto finalize;
+    }
+    cond_key := sprintf ('AddressBook&%d', coalesce (domain_id, 0));
+    condtext := get_keyword (cond_key, compilation);
+    if (condtext is null and 0)
+    {
+      cond_list := get_keyword ('', compilation);
+      if (sub is not null)
+        cond_list := vector_concat (cond_list, vector ( vector ('P_DOMAIN_ID', '=', domain_id)));
+      condtext := "CardDAV_DAV_FC_PRINT_WHERE" (cond_list, auth_uid);
+      compilation := vector_concat (compilation, vector (cond_key, condtext));
+    }
+    execstate := '00000';
+        qry_text := 'select concat (DAV_CONCAT_PATH (_param.detcolpath, ''addressbook''), ''/'', "CardDAV_FIXNAME" (WAI_NAME), ''/'', "CardDAV_COMPOSE_ICS_NAME" (_top.P_UID)),
+        ''R'', 1024, _top.P_UPDATED,
+                vector (UNAME_ADDRESSBOOK(), ?, _users.U_ID, 3, _top.P_DOMAIN_ID, 0, 0, 0, 0),
+                ''110100000RR'', http_nogroup_gid(), _users.U_ID, _top.P_UPDATED, ''text/vcard'', "CardDAV_COMPOSE_ICS_NAME" (_top.P_UID)
+        from
+        (select top 1 ? as detcolpath from WS.WS.SYS_DAV_COL) as _param,
+        AB.WA.PERSONS as _top
+        join DB.DBA.WA_INSTANCE as _instances on (WAI_ID = P_DOMAIN_ID and WAI_TYPE_NAME = ''AddressBook'')
+                join DB.DBA.WA_MEMBER as _members on (WAM_MEMBER_TYPE = 1 and WAM_INST = WAI_NAME)
+                join DB.DBA.SYS_USERS as _users on (WAM_USER = U_ID and U_ID = ?)
+        ' || condtext;
+      exec (qry_text, execstate, execmessage,
+        vector (detcol_id, detcol_path, owner_uid),
+        100000000, execmeta, execrows );
+      if ('00000' <> execstate)
+        signal (execstate, execmessage || ' in ' || qry_text);
+      vectorbld_concat_acc (res, execrows);
+finalize:
+    vectorbld_final (res);
+    return res;
+}
+;
+
+create function UNAME_ADDRESSBOOK () returns any
+{
+  return UNAME'CardDAV';
+}
+;
+
+create function "CardDAV_DAV_SEARCH_ID_IMPL" (in detcol_id any, in path_parts any, in what char(1), inout muser_id integer, inout domain_id integer) returns any
+{
+    --dbg_obj_princ ('CardDAV_DAV_SEARCH_ID_IMPL (', detcol_id, path_parts, what, muser_id, domain_id, ')');
+    declare owner_gid, owner_uid, ctr, len integer;
+    declare hitlist any;
+    declare access, colpath varchar;
+    "CardDAV_ACCESS_PARAMS" (detcol_id, access, owner_gid, owner_uid);
+  muser_id := owner_uid;
+    if (0 = length(path_parts))
+    {
+        if ('C' <> what)
+            return -1;
+        return vector (UNAME'CardDAV', detcol_id, owner_uid, domain_id, 0, 0);
+    }
+    if ('' = path_parts[length(path_parts) - 1])
+    {
+        if ('C' <> what)
+            return -1;
+    }
+    else
+    {
+        if ('R' <> what)
+            return -1;
+    }
+    len := length (path_parts) - 1;
+    ctr := 0;
+    while (ctr < len)
+    {
+        if (ctr = 0)
+        {
+            hitlist := vector ();
+            for select C.WAI_ID as D_ID
+                     from SYS_USERS A,
+                          WA_MEMBER B,
+                          WA_INSTANCE C
+                    where A.U_ID = owner_uid
+                      and B.WAM_USER = A.U_ID
+                      and B.WAM_MEMBER_TYPE = 1
+                      and B.WAM_INST = C.WAI_NAME
+                      and C.WAI_TYPE_NAME = 'AddressBook'
+                      and "CardDAV_FIXNAME"(C.WAI_NAME) = path_parts[ctr]
+            do
+            {
+                hitlist := vector_concat (hitlist, vector (D_ID));
+            }
+            if (length (hitlist) <> 1)
+                return -1;
+            domain_id := hitlist[0];
+        }
+        else if (ctr = 1 and len > 1)
+    {
+            return -1;
+    }
+        ctr := ctr + 1;
+    }
+    if ('C' = what)
+        return vector (UNAME'CardDAV', detcol_id, owner_uid, domain_id, 0, 0);
+    hitlist := vector ();
+  for select distinct P_ID
+    from AB.WA.PERSONS
+    where "CardDAV_COMPOSE_ICS_NAME" (P_UID) = path_parts[ctr] and P_DOMAIN_ID = domain_id
+  do
+  {
+    hitlist := vector_concat (hitlist, vector (P_ID));
+  }
+    if (length (hitlist) <> 1)
+        return -1;
+    return vector (UNAME'CardDAV', detcol_id, owner_uid, domain_id, hitlist[0], 0);
+}
+;
+
+--| When DAV_PROP_GET_INT or DAV_DIR_LIST_INT calls DET function, authentication is performed before the call.
+create function "CardDAV_DAV_SEARCH_ID" (in detcol_id any, in path_parts any, in what char(1)) returns any
+{
+  declare u_id, domain_id integer;
+  domain_id := 0;
+  --dbg_obj_princ ('CardDAV_DAV_SEARCH_ID (', detcol_id, path_parts, what, ')');
+  return "CardDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, what, u_id, domain_id);
+}
+;
+
+--| When DAV_SEARCH_PATH_INT calls DET function, authentication is performed before the call.
+create function "CardDAV_DAV_SEARCH_PATH" (
+  in id any,
+  in what char(1)) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_SEARCH_PATH (', id, what, ')');
+  declare path varchar;
+  declare domain_id, item_id integer;
+
+  path := DAV_SEARCH_PATH (id[1], 'C');
+  domain_id := id[3];
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+    return null;
+
+  path := path || "CardDAV_FIXNAME" (AB.WA.domain_name (domain_id)) || '/';
+  if ('C' = what)
+    return path;
+
+  item_id := id[4];
+  for (select P_UID from AB.WA.PERSONS where P_ID = item_id) do
+    return  path || "CardDAV_COMPOSE_ICS_NAME" (P_UID);
+
+  return null;
+}
+;
+
+--| When DAV_COPY_INT calls DET function, authentication and check for locks are performed before the call, but no check for existing/overwrite.
+create function "CardDAV_DAV_RES_UPLOAD_COPY" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_RES_UPLOAD_COPY (', detcol_id, path_parts, source_id, what, overwrite_flags, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_COPY_INT calls DET function, authentication and check for locks are performed before the call, but no check for existing/overwrite.
+create function "CardDAV_DAV_RES_UPLOAD_MOVE" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_RES_UPLOAD_MOVE (', detcol_id, path_parts, source_id, what, overwrite_flags, auth_uid, ')');
+  return -20;
+}
+;
+
+
+--| When DAV_RES_CONTENT or DAV_RES_COPY_INT or DAV_RES_MOVE_INT calls DET function, authentication is made.
+--| If content_mode is 1 then content is a valid output stream before the call.
+create function "CardDAV_DAV_RES_CONTENT" (
+  in id any,
+  inout content any,
+  out type varchar,
+  in content_mode integer) returns integer
+{
+  --dbg_obj_princ ('CardDAV_DAV_RES_CONTENT (', id, ', content, type, ', content_mode, ')');
+  declare tz integer;
+
+  type := 'text/vcard';
+  whenever not found goto endline;
+  if (id[4] is not null)
+    content := AB.WA.export_vcard (id[3], vector(id[4]));
+
+endline:
+  return 0;
+}
+;
+
+--| This adds an extra access path to the existing resource or collection.
+create function "CardDAV_DAV_SYMLINK" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_SYMLINK (', detcol_id, path_parts, source_id, overwrite, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| This gets a list of resources and/or collections as it is returned by DAV_DIR_LIST and and writes the list of quads (old_id, 'what', old_full_path, dereferenced_id, dereferenced_full_path).
+create function "CardDAV_DAV_DEREFERENCE_LIST" (in detcol_id any, inout report_array any) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_DEREFERENCE_LIST (', detcol_id, report_array, ')');
+  return -20;
+}
+;
+
+--| This gets one of reference quads returned by ..._DAV_REREFERENCE_LIST() and returns a record (new_full_path, new_dereferenced_full_path, name_may_vary).
+create function "CardDAV_DAV_RESOLVE_PATH" (in detcol_id any, inout reference_item any, inout old_base varchar, inout new_base varchar) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_RESOLVE_PATH (', detcol_id, reference_item, old_base, new_base, ')');
+  return -20;
+}
+;
+
+--| There's no API function to lock for a while (do we need such?) The "LOCK" DAV method checks that all parameters are valid but does not check for existing locks.
+create function "CardDAV_DAV_LOCK" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_LOCK (', id, type, locktype, scope, token, owner_name, owned_tokens, depth, timeout_sec, owner_name, auth_uid, ')');
+  return -20;
+}
+;
+
+
+--| There's no API function to unlock for a while (do we need such?) The "UNLOCK" DAV method checks that all parameters are valid but does not check for existing locks.
+create function "CardDAV_DAV_UNLOCK" (in id any, in type char(1), in token varchar, in auth_uid integer)
+{
+  -- dbg_obj_princ ('CardDAV_DAV_UNLOCK (', id, type, token, auth_uid, ')');
+  return -27;
+}
+;
+
+--| The caller does not check if id is valid.
+--| This returns -1 if id is not valid, 0 if all existing locks are listed in owned_tokens whitespace-delimited list, 1 for soft 2 for hard lock.
+create function "CardDAV_DAV_IS_LOCKED" (inout id any, inout type char(1), in owned_tokens varchar) returns integer
+{
+  -- dbg_obj_princ ('CardDAV_DAV_IS_LOCKED (', id, type, owned_tokens, ')');
+  return 0;
+}
+;
+
+
+--| The caller does not check if id is valid.
+--| This returns -1 if id is not valid, list of tuples (LOCK_TYPE, LOCK_SCOPE, LOCK_TOKEN, LOCK_TIMEOUT, LOCK_OWNER, LOCK_OWNER_INFO) otherwise.
+create function "CardDAV_DAV_LIST_LOCKS" (in id any, in type char(1), in recursive integer) returns any
+{
+  -- dbg_obj_princ ('CardDAV_DAV_LIST_LOCKS" (', id, type, recursive);
+  return vector ();
+}
+;
diff --git a/appsrc/ODS-Addressbook/sql/ab-a-api.sql b/appsrc/ODS-Addressbook/sql/ab-a-api.sql
index cfc5a6a..603c846 100644
--- a/appsrc/ODS-Addressbook/sql/ab-a-api.sql
+++ b/appsrc/ODS-Addressbook/sql/ab-a-api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ab-a-api.sql,v 1.16.2.3 2010/09/20 10:14:39 source Exp $
+--  $Id: ab-a-api.sql,v 1.16.2.7 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -79,6 +79,21 @@ create procedure ODS.ODS_API.addressbook_type_check (
 
 -------------------------------------------------------------------------------
 --
+create procedure ODS.ODS_API.addressbook_edit_update (
+  in id integer,
+  in domain_id integer,
+  in pName varchar,
+  in pValue any)
+{
+  if (isnull (pValue))
+    return;
+
+  AB.WA.contact_update2 (id, domain_id, pName, pValue);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ODS.ODS_API."addressbook.search" (
   in inst_id integer,
 	in keywords any := null,
@@ -99,6 +114,10 @@ create procedure ODS.ODS_API."addressbook.search" (
 
 	if (not ods_check_auth (uname, inst_id, 'author'))
 		return ods_auth_failed ();
+
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
 	account_id := AB.WA.domain_owner_id (inst_id);
 
   data := vector ();
@@ -155,6 +174,9 @@ create procedure ODS.ODS_API."addressbook.get" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
 	ods_describe_iri (SIOC..addressbook_contact_iri (inst_id, contact_id));
 	return '';
 }
@@ -178,6 +200,7 @@ create procedure ODS.ODS_API."addressbook.new" (
   in foaf varchar := null,
 	in photo varchar := null,
 	in interests varchar := null,
+  in relationships varchar := null,
   in mail varchar := null,
   in web varchar := null,
   in icq varchar := null,
@@ -231,6 +254,10 @@ create procedure ODS.ODS_API."addressbook.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
+  tags := coalesce (tags, '');
   rc := AB.WA.contact_update (
           -1,
           inst_id,
@@ -248,6 +275,7 @@ create procedure ODS.ODS_API."addressbook.new" (
           foaf,
 					photo,
 					interests,
+          relationships,
           mail,
           web,
           icq,
@@ -311,6 +339,7 @@ create procedure ODS.ODS_API."addressbook.edit" (
   in foaf varchar := null,
 	in photo varchar := null,
 	in interests varchar := null,
+  in relationships varchar := null,
   in mail varchar := null,
   in web varchar := null,
   in icq varchar := null,
@@ -368,65 +397,63 @@ create procedure ODS.ODS_API."addressbook.edit" (
 
   if (not exists (select 1 from AB.WA.PERSONS where P_ID = contact_id))
     return ods_serialize_sql_error ('37000', 'The item is not found');
-  rc := AB.WA.contact_update (
-          contact_id,
-          inst_id,
-          category_id,
-          kind,
-          name,
-          title,
-          fName,
-          mName,
-          lName,
-          fullName,
-          gender,
-          birthday,
-          iri,
-          foaf,
-					photo,
-					interests,
-          mail,
-          web,
-          icq,
-          skype,
-          aim,
-          yahoo,
-          msn,
-          hCountry,
-          hState,
-          hCity,
-          hCode,
-          hAddress1,
-          hAddress2,
-          hTzone,
-          hLat,
-          hLng,
-          hPhone,
-          hMobile,
-          hFax,
-          hMail,
-          hWeb,
-          bCountry,
-          bState,
-          bCity,
-          bCode,
-          bAddress1,
-          bAddress2,
-          bTzone,
-          bLat,
-          bLng,
-          bPhone,
-          bMobile,
-          bFax,
-          bIndustry,
-          bOrganization,
-          bDepartment,
-          bJob,
-          bMail,
-          bWeb,
-          tags);
 
-  return ods_serialize_int_res (rc);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_KIND', kind);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_NAME', name);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_TITLE', title);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_FIRST_NAME', fName);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_MIDDLE_NAME', mName);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_LAST_NAME', lName);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_FULL_NAME', fullName);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_GENDER', gender);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_BIRTHDAY', birthday);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_IRI', iri);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_FOAF', foaf);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_PHOTO', photo);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_INTERESTS', interests);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_RELATIONSHIPS', relationships);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_MAIL', mail);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_WEB', web);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_ICQ', icq);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_SKYPE', skype);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_AIM', aim);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_YAHOO', yahoo);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_MSN', msn);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_ADDRESS1', hAddress1);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_ADDRESS2', hAddress2);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_CODE', hCode);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_CITY', hCity);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_STATE', hState);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_COUNTRY', hCountry);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_TZONE', hTzone);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_LAT', hLat);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_LNG', hLng);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_PHONE', hPhone);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_MOBILE', hMobile);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_FAX', hFax);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_MAIL', hMail);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_H_WEB', hWeb);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_ADDRESS1', bAddress1);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_ADDRESS2', bAddress2);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_CODE', bCode);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_CITY', bCity);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_STATE', bState);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_COUNTRY', bCountry);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_TZONE', bTzone);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_LAT', bLat);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_LNG', bLng);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_PHONE', bPhone);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_MOBILE', bMobile);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_FAX', bFax);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_INDUSTRY', bIndustry);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_ORGANIZATION', bOrganization);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_DEPARTMENT', bDepartment);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_JOB', bJob);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_MAIL', bMail);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_B_WEB', bWeb);
+  ODS.ODS_API.addressbook_edit_update (contact_id, inst_id, 'P_TAGS', tags);
+
+	return ods_serialize_int_res (contact_id);
 }
 ;
 
@@ -578,16 +605,21 @@ create procedure ODS.ODS_API."addressbook.import" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
-  if (lcase(sourceType) = 'string')
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
+  dbg_obj_print ('', now());
+	sourceType := lcase(sourceType);
+	if (sourceType = 'string')
   {
     content := source;
   }
-  else if (lcase(sourceType) = 'webdav')
+	else if (sourceType = 'webdav')
   {
     passwd := __user_password (uname);
     content := AB.WA.dav_content (AB.WA.host_url () || http_physical_path_resolve (replace (source, ' ', '%20')), uname, passwd);
   }
-  else if (lcase(sourceType) = 'url')
+	else if (sourceType = 'url')
   {
     content := source;
   }
@@ -606,13 +638,17 @@ create procedure ODS.ODS_API."addressbook.import" (
   if (DB.DBA.is_empty_or_null (content))
     signal ('AB107', 'Bad import source!');
 
-  if (lcase(contentType) = 'vcard')
+  set_user_id ('dba');
+	contentType := lcase(contentType);
+	dbg_obj_print ('contentType', contentType);
+	if (contentType = 'vcard')
   {
     AB.WA.import_vcard (inst_id, content, vector ('tags', tags));
   }
-  else if (lcase(contentType) = 'foaf')
+	else if (contentType = 'foaf')
   {
-    AB.WA.import_foaf (inst_id, content, tags, vector (), case when (lcase (sourceType) = 'url') then 1 else 0 end);
+	  dbg_obj_princ ('', inst_id, content, vector ('tags', tags, 'contentType', case when (sourceType = 'url') then 1 else 0 end));
+		AB.WA.import_foaf (inst_id, content, vector ('tags', tags, 'contentType', case when (sourceType = 'url') then 1 else 0 end));
   }
   else
   {
@@ -639,6 +675,9 @@ create procedure ODS.ODS_API."addressbook.export" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   if (lcase (contentType) = 'vcard')
   {
     http (AB.WA.export_vcard (inst_id));
@@ -723,7 +762,6 @@ create procedure ODS.ODS_API."addressbook.annotation.new" (
 --
 create procedure ODS.ODS_API."addressbook.annotation.claim" (
   in annotation_id integer,
-  in claimIri varchar,
   in claimRelation varchar,
   in claimValue varchar) __soap_http 'text/xml'
 {
@@ -745,7 +783,7 @@ create procedure ODS.ODS_API."addressbook.annotation.claim" (
   if (not exists (select 1 from AB.WA.ANNOTATIONS where A_ID = annotation_id))
     return ods_serialize_sql_error ('37000', 'The item is not found');
   claims := (select deserialize (A_CLAIMS) from AB.WA.ANNOTATIONS where A_ID = annotation_id);
-  claims := vector_concat (claims, vector (vector (claimIri, claimRelation, claimValue)));
+	claims := vector_concat (claims, vector (vector (null, claimRelation, claimValue)));
   update AB.WA.ANNOTATIONS
      set A_CLAIMS = serialize (claims),
          A_UPDATED = now ()
@@ -918,6 +956,9 @@ create procedure ODS.ODS_API."addressbook.publication.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   _type := ODS.ODS_API.addressbook_type_check (destinationType, destination);
 	options := vector ('type', _type, 'name', destination, 'user', userName, 'password', userPassword, 'tagsInclude', tagsInclude, 'tagsExclude', tagsExclude);
 	insert into AB.WA.EXCHANGE (EX_DOMAIN_ID, EX_TYPE, EX_NAME, EX_UPDATE_TYPE, EX_UPDATE_PERIOD, EX_UPDATE_FREQ, EX_OPTIONS)
@@ -1122,6 +1163,9 @@ create procedure ODS.ODS_API."addressbook.subscription.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'AddressBook'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   _type := ODS.ODS_API.addressbook_type_check (sourceType, source);
 	options := vector ('type', _type, 'name', source, 'user', userName, 'password', userPassword, 'tagsInclude', tagsInclude, 'tagsExclude', tagsExclude);
 	insert into AB.WA.EXCHANGE (EX_DOMAIN_ID, EX_TYPE, EX_NAME, EX_UPDATE_TYPE, EX_UPDATE_PERIOD, EX_UPDATE_FREQ, EX_OPTIONS)
@@ -1410,11 +1454,16 @@ grant execute on ODS.ODS_API."addressbook.comment.get" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.comment.new" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.comment.delete" to ODS_API;
 
+grant execute on ODS.ODS_API."addressbook.publication.get" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.publication.new" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.publication.edit" to ODS_API;
+grant execute on ODS.ODS_API."addressbook.publication.sync" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.publication.delete" to ODS_API;
+
+grant execute on ODS.ODS_API."addressbook.subscription.get" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.subscription.new" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.subscription.edit" to ODS_API;
+grant execute on ODS.ODS_API."addressbook.subscription.sync" to ODS_API;
 grant execute on ODS.ODS_API."addressbook.subscription.delete" to ODS_API;
 
 grant execute on ODS.ODS_API."addressbook.options.get" to ODS_API;
diff --git a/appsrc/ODS-Addressbook/sql/ab-a-code.sql b/appsrc/ODS-Addressbook/sql/ab-a-code.sql
index 5b6ac7c..b66393e 100644
--- a/appsrc/ODS-Addressbook/sql/ab-a-code.sql
+++ b/appsrc/ODS-Addressbook/sql/ab-a-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ab-a-code.sql,v 1.50.2.23 2011/03/23 12:17:57 source Exp $
+--  $Id: ab-a-code.sql,v 1.50.2.28 2012/03/08 12:08:38 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -119,7 +119,7 @@ _end:;
 create procedure AB.WA.session_restore(
   inout params any)
 {
-  declare domain_id, account_id, account_rights any;
+  declare domain_id, account_id any;
 
   domain_id := AB.WA.session_domain (params);
   account_id := -1;
@@ -135,11 +135,11 @@ create procedure AB.WA.session_restore(
   {
     account_id := U_ID;
   }
-  account_rights := AB.WA.access_rights (domain_id, account_id);
   return vector (
                  'domain_id', domain_id,
                  'account_id',   account_id,
-                 'account_rights', account_rights
+                 'account_rights', AB.WA.account_rights (domain_id, account_id),
+                 'person_rights', AB.WA.person_rights (domain_id, account_id)
                );
 }
 ;
@@ -218,7 +218,7 @@ create procedure AB.WA.check_grants (
 
 -------------------------------------------------------------------------------
 --
-create procedure AB.WA.access_rights (
+create procedure AB.WA.person_rights (
   in domain_id integer,
   in account_id integer)
 {
@@ -284,6 +284,62 @@ create procedure AB.WA.access_rights (
 
 -------------------------------------------------------------------------------
 --
+create procedure AB.WA.account_rights (
+  in domain_id integer,
+  in account_id integer)
+{
+  declare rc varchar;
+
+  if (domain_id <= 0)
+    return null;
+
+  if (AB.WA.check_admin (account_id))
+    return 'W';
+
+  if (exists (select 1
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = account_id
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_MEMBER_TYPE = 1
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_ID = domain_id))
+    return 'W';
+
+  if (exists (select 1
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = account_id
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_MEMBER_TYPE = 2
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_ID = domain_id))
+    return 'W';
+
+  if (exists (select 1
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = account_id
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_ID = domain_id))
+    return 'R';
+
+  if (exists (select 1
+                from DB.DBA.WA_INSTANCE
+               where WAI_ID = domain_id
+                 and WAI_IS_PUBLIC = 1))
+    return 'R';
+
+  return null;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure AB.WA.wa_home_link ()
 {
   return case when registry_get ('wa_home_link') = 0 then '/ods/' else registry_get ('wa_home_link') end;
@@ -709,6 +765,12 @@ create procedure AB.WA.domain_update (
   AB.WA.domain_gems_delete (domain_id, account_id, 'AddressBook', AB.WA.domain_gems_name (domain_id) || '_Gems');
   AB.WA.domain_gems_create (domain_id, account_id);
 
+  declare home, path varchar;
+  home := AB.WA.dav_home (account_id);
+  path := home || 'addressbooks' || '/';
+  DB.DBA.DAV_MAKE_DIR (path, account_id, null, '110100000N');
+  update WS.WS.SYS_DAV_COL set COL_DET = 'CardDAV' where COL_ID = DAV_SEARCH_ID (path, 'C');
+
   return 1;
 }
 ;
@@ -1637,6 +1699,18 @@ create procedure AB.WA.stringCut (
 
 -------------------------------------------------------------------------------
 --
+create procedure AB.WA.isVector (
+  inout aVector any)
+{
+  if (isarray (aVector) and not isstring (aVector))
+    return 1;
+
+  return 0;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure AB.WA.vector_unique(
   inout aVector any,
   in minLength integer := 0)
@@ -2425,9 +2499,10 @@ create procedure AB.WA.dt_iso8601 (
 create procedure AB.WA.test_clear (
   in S any)
 {
-  declare N integer;
+  S := substring (S, 1, coalesce (strstr (S, '<>'), length (S)));
+  S := substring (S, 1, coalesce (strstr (S, '\nin'), length (S)));
 
-  return substring(S, 1, coalesce(strstr(S, '<>'), length(S)));
+  return S;
 }
 ;
 
@@ -2492,8 +2567,10 @@ create procedure AB.WA.test (
   } else if (is_empty_or_null(value)) {
     return value;
   }
+
   value := AB.WA.validate2 (valueClass, cast (value as varchar));
-  if (valueType = 'integer') {
+  if (valueType = 'integer')
+  {
     tmp := get_keyword('minValue', params);
     if ((not isnull (tmp)) and (value < tmp))
       signal('MIN', cast (tmp as varchar));
@@ -2501,8 +2578,9 @@ create procedure AB.WA.test (
     tmp := get_keyword('maxValue', params);
     if (not isnull (tmp) and (value > tmp))
       signal('MAX', cast (tmp as varchar));
-
-  } else if (valueType = 'float') {
+  }
+  else if (valueType = 'float')
+  {
     tmp := get_keyword('minValue', params);
     if (not isnull (tmp) and (value < tmp))
       signal('MIN', cast (tmp as varchar));
@@ -2510,8 +2588,9 @@ create procedure AB.WA.test (
     tmp := get_keyword('maxValue', params);
     if (not isnull (tmp) and (value > tmp))
       signal('MAX', cast (tmp as varchar));
-
-  } else if (valueType = 'varchar') {
+  }
+  else if (valueType = 'varchar')
+  {
     tmp := get_keyword('minLength', params);
     if (not isnull (tmp) and (length(AB.WA.utf2wide(value)) < tmp))
       signal('MINLENGTH', cast (tmp as varchar));
@@ -2574,7 +2653,7 @@ create procedure AB.WA.validate2 (
     if (isnull (regexp_match('^[^\\\/\?\*\"\'\>\<\:\|]*\$', propertyValue)))
       goto _error;
   } else if ((propertyType = 'uri') or (propertyType = 'anyuri')) {
-    if (isnull (regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:]*)?\$', propertyValue)))
+    if (isnull (regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:~]*)?\$', propertyValue)))
       goto _error;
   } else if (propertyType = 'email') {
     if (isnull (regexp_match('^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))\$', propertyValue)))
@@ -2758,7 +2837,10 @@ create procedure AB.WA.ab_sparql (
 create procedure AB.WA.ab_graph_delete (
   in graph varchar)
 {
-  AB.WA.ab_sparql (sprintf ('SPARQL clear graph <%s>', graph));
+  if (is_empty_or_null (graph))
+    return;
+
+  SPARQL clear graph ?:graph;
 }
 ;
 
@@ -2946,6 +3028,7 @@ create procedure AB.WA.contact_update (
         P_FOAF,
         P_PHOTO,
         P_INTERESTS,
+        P_RELATIONSHIPS,
         P_MAIL,
         P_WEB,
         P_ICQ,
@@ -3006,6 +3089,7 @@ create procedure AB.WA.contact_update (
         foaf,
         photo,
         interests,
+        relationships,
         mail,
         web,
         icq,
@@ -3162,7 +3246,7 @@ create procedure AB.WA.contact_update2 (
   if (pName = 'P_FULL_NAME')
     update AB.WA.PERSONS set P_FULL_NAME = pValue where P_ID = id;
   if (pName = 'P_GENDER')
-    update AB.WA.PERSONS set P_GENDER = pValue where P_ID = id;
+    update AB.WA.PERSONS set P_GENDER = lcase (pValue) where P_ID = id;
   if (pName = 'P_BIRTHDAY')
     update AB.WA.PERSONS set P_BIRTHDAY = pValue where P_ID = id;
   if (pName = 'P_FOAF')
@@ -3315,12 +3399,11 @@ create procedure AB.WA.contact_update4 (
   if (not isnull (tmp))
   {
     if (length (pFields) = 0)
-      return 0;
+      return vector ();
 
     id := tmp;
   }
-
-  if ((isinteger (id)) and (id = -1))
+  if (isinteger (id) and (id = -1))
   {
     L := length (pFields);
     for (N := 0; N < L; N := N + 1)
@@ -3365,13 +3448,10 @@ create procedure AB.WA.contact_update4 (
     pValues := V;
   }
   if (isinteger (id))
-  {
     id := vector (id);
-  }
+
   for (N := 0; N < length (id); N := N + 1)
-  {
     AB.WA.contact_update3 (id[N], domain_id, pFields, pValues, tags);
-  }
 
   return id;
 }
@@ -3418,10 +3498,11 @@ create procedure AB.WA.contact_validation (
   declare id, st, msg, meta, rows, F, V, T any;
 
   id := null;
-  if (not isnull (validation) and length (validation))
-  {
-    S := sprintf ('select P_ID from AB.WA.PERSONS where P_DOMAIN_ID = %d', domain_id);
-    V := vector ();
+  if (isnull (validation) or (length (validation) = 0))
+    goto _exit;
+
+  S := 'select P_ID from AB.WA.PERSONS where P_DOMAIN_ID = ?';
+  V := vector (domain_id);
     for (N := 0; N < length (validation); N := N + 1)
     {
       M := AB.WA.vector_index (pFields, validation [N]);
@@ -3431,10 +3512,14 @@ create procedure AB.WA.contact_validation (
           V := vector_concat (V, vector (pValues [M]));
         }
       }
+  if (length (V) = 1)
+    goto _exit;
+
       st := '00000';
     exec (S, st, msg, V, vector ('use_cache', 1), meta, rows);
-      if ((st = '00000') and (length (rows) > 0))
-      {
+  if ((st <> '00000') or (length (rows) <> 1))
+    goto _exit;
+
       declare validationMode varchar;
 
       id := vector ();
@@ -3521,8 +3606,8 @@ create procedure AB.WA.contact_validation (
       }
       pFields := F;
       pValues := V;
-    }
-  }
+
+_exit:;
   return id;
 }
 ;
@@ -3532,16 +3617,19 @@ create procedure AB.WA.contact_validation (
 create procedure AB.WA.contact_rights (
   in domain_id integer,
   in id integer,
-  in access_role varchar)
+  in account_rights varchar,
+  in person_rights varchar)
 {
   declare retValue varchar;
 
   retValue := '';
   if (exists (select 1 from AB.WA.PERSONS where P_ID = id and P_DOMAIN_ID = domain_id))
   {
+    if (account_rights < person_rights)
   retValue := AB.WA.acl_check (domain_id, id);
+
     if (retValue = '')
-      retValue := access_role;
+      retValue := account_rights;
   }
     return retValue;
   }
@@ -3839,6 +3927,15 @@ create procedure AB.WA.import (
 
 -------------------------------------------------------------------------------
 --
+create procedure AB.WA.import_vcard_decode (
+  in S varchar)
+{
+  return replace (S, '\\:', ':');
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure AB.WA.import_vcard (
   in domain_id integer,
   in content any,
@@ -3846,9 +3943,9 @@ create procedure AB.WA.import_vcard (
   in validation any := null,
   in progress_id varchar := null)
 {
-  declare L, M, N, nLength, mLength, id integer;
-  declare tmp, uid, data, pFields, pValues, pField, pField2 any;
-  declare xmlData, xmlItems, itemName, Meta, V any;
+  declare M, N, pos, mLength, mGroupLength, id integer;
+  declare tmp, T, uid, data, pFields, pValues, pField any;
+  declare xmlData, xmlItems, xmlSubItems, itemSubName, itemPrefix, itemName, Meta, MetaGroup any;
   declare mode, externalUID, updatedBefore, vcardImported any;
 
   vcardImported := vector ();
@@ -3865,27 +3962,53 @@ create procedure AB.WA.import_vcard (
 
   Meta := vector
     (
-      'P_UID',            null, 'UID/val',
-      'P_NAME',           null, 'NICKNAME/val|N/fld[1]|N/fld[2]|N/val',
-      'P_TITLE',          null, 'N/fld[4]',
-      'P_FIRST_NAME',     null, 'N/fld[2]',
-      'P_MIDDLE_NAME',    null, 'N/fld[3]',
-      'P_LAST_NAME',      null, 'N/fld[1]|N/val',
-      'P_FULL_NAME',      null, 'FN/val',
-      'P_BIRTHDAY',       null, 'BDAY/val',
-      'P_B_ORGANIZATION', null, 'ORG/val|ORG/fld[1]',
-      'P_B_JOB',          null, 'TITLE/val',
-      'P_H_ADDRESS1',     vector ('*', 'P_H_ADDRESS1', 'HOME',     'P_H_ADDRESS1', 'WORK',     'P_B_ADDRESS1'),                'for \044v in ADR/fld[3] return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_H_ADDRESS2',     vector ('*', 'P_H_ADDRESS2', 'HOME',     'P_H_ADDRESS2', 'WORK',     'P_B_ADDRESS2'),                'for \044v in ADR/fld[2] return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_H_CITY',         vector ('*', 'P_H_CITY',     'HOME',     'P_H_CITY',     'WORK',     'P_B_CITY'),                    'for \044v in ADR/fld[4] return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_H_CODE',         vector ('*', 'P_H_CODE',     'HOME',     'P_H_CODE',     'WORK',     'P_B_CODE'),                    'for \044v in ADR/fld[6] return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_H_STATE',        vector ('*', 'P_H_STATE',    'HOME',     'P_H_STATE',    'WORK',     'P_B_STATE'),                   'for \044v in ADR/fld[5] return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_H_COUNTRY',      vector ('*', 'P_H_COUNTRY',  'HOME',     'P_H_COUNTRY',  'WORK',     'P_B_COUNTRY'),                 'for \044v in ADR/fld[7] return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_MAIL',           vector ('*', 'P_MAIL',       'HOME',     'P_H_MAIL',     'WORK',     'P_B_MAIL',  'PREF', 'P_MAIL'), 'for \044v in EMAIL/val return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_H_PHONE',        vector ('*', 'P_H_PHONE',    'HOME,FAX', 'P_H_FAX',      'WORK,FAX', 'P_B_FAX',   'FAX',  'P_H_FAX', 'HOME', 'P_H_PHONE', 'WORK', 'P_B_PHONE', 'CELL', 'P_H_MOBILE'), 'for \044v in TEL/val return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))',
-      'P_WEB',            vector ('*', 'P_WEB',        'HOME',     'P_H_WEB',      'WORK',     'P_B_WEB'),                     'for \044v in URL/val return concat (\044v, for \044t in \044v/../TYPE return concat (" @TYPE_", \044t))'
+      'P_UID',            vector ('UID/val'),
+      'P_NAME',           vector ('NICKNAME/val', 'N/fld[1]', 'N/fld[2]', 'N/val'),
+      'P_TITLE',          vector ('N/fld[4]'),
+      'P_FIRST_NAME',     vector ('N/fld[2]'),
+      'P_MIDDLE_NAME',    vector ('N/fld[3]'),
+      'P_LAST_NAME',      vector ('N/fld[1]', 'N/val'),
+      'P_FULL_NAME',      vector ('FN/val'),
+      'P_BIRTHDAY',       vector ('BDAY/val'),
+      'P_GENDER',         vector ('X-GENDER/val'),
+      'P_B_ORGANIZATION', vector ('ORG/val', 'ORG/fld[1]'),
+      'P_B_JOB',          vector ('TITLE/val'),
+      'P_ICQ',            vector ('X-ICQ/val'),
+      'P_MSN',            vector ('X-MSN/val'),
+      'P_AIM',            vector ('X-AIM/val'),
+      'P_YAHOO',          vector ('X-YAHOO/val'),
+      'P_SKYPE',          vector ('X-SKYPE/val'),
+      'P_MAIL',           vector ('EMAIL[TYPE="PREF"]/val'),
+      'P_WEB',            vector ('URL[TYPE="PREF"]/val'),
+      'P_H_ADDRESS1',     vector ('ADR[TYPE="HOME" or TYPE!="WORK"]/fld[3]'),
+      'P_H_ADDRESS2',     vector ('ADR[TYPE="HOME" or TYPE!="WORK"]/fld[2]'),
+      'P_H_CITY',         vector ('ADR[TYPE="HOME" or TYPE!="WORK"]/fld[4]'),
+      'P_H_CODE',         vector ('ADR[TYPE="HOME" or TYPE!="WORK"]/fld[6]'),
+      'P_H_STATE',        vector ('ADR[TYPE="HOME" or TYPE!="WORK"]/fld[5]'),
+      'P_H_COUNTRY',      vector ('ADR[TYPE="HOME" or TYPE!="WORK"]/fld[7]'),
+      'P_H_PHONE',        vector ('TEL[TYPE="HOME" or TYPE!="WORK"]/val'),
+      'P_H_FAX',          vector ('TEL[TYPE="HOME" and TYPE="FAX"]/val'),
+      'P_H_MOBILE',       vector ('TEL[TYPE="MOBILE"]/val'),
+      'P_H_MAIL',         vector ('EMAIL[TYPE="HOME"]/val'),
+      'P_H_WEB',          vector ('URL[TYPE="HOME"]/val'),
+      'P_H_ADDRESS1',     vector ('ADR[TYPE="WORK"]/fld[3]'),
+      'P_H_ADDRESS2',     vector ('ADR[TYPE="WORK"]/fld[2]'),
+      'P_H_CITY',         vector ('ADR[TYPE="WORK"]/fld[4]'),
+      'P_H_CODE',         vector ('ADR[TYPE="WORK"]/fld[6]'),
+      'P_H_STATE',        vector ('ADR[TYPE="WORK"]/fld[5]'),
+      'P_H_COUNTRY',      vector ('ADR[TYPE="WORK"]/fld[7]'),
+      'P_B_PHONE',        vector ('TEL[TYPE="WORK"]/val'),
+      'P_B_FAX',          vector ('TEL[TYPE="WORK" and TYPE="FAX"]/val'),
+      'P_B_MOBILE',       vector ('TEL[TYPE="WORK" and TYPE="MOBILE"]/val'),
+      'P_B_MAIL',         vector ('EMAIL[TYPE="WORK"]/val'),
+      'P_B_WEB',          vector ('URL[TYPE="WORK"]/val')
     );
   mLength := length (Meta);
+  MetaGroup := vector
+    (
+      'P_IRI',            vector ('URL/val', 'X-ABLabel[val="PROFILE"]/val')
+    );
+  mGroupLength := length (MetaGroup);
 
   -- using DAV parser
   if (not isstring (content))
@@ -3896,9 +4019,7 @@ create procedure AB.WA.import_vcard (
   xmlItems := xpath_eval ('/*', xmlData, 0);
   foreach (any xmlItem in xmlItems) do
   {
-    itemName := xpath_eval ('name(.)', xmlItem);
-    if (itemName = 'IMC-VCARD')
-    {
+    xmlItem := xml_cut (xmlItem);
       if (not AB.WA.import_check_progress_id (progress_id))
         return;
 
@@ -3906,54 +4027,55 @@ create procedure AB.WA.import_vcard (
       uid := null;
       pFields := vector ();
       pValues := vector ();
-      for (N := 0; N < mLength; N := N + 3)
+    for (N := 0; N < mLength; N := N + 2)
       {
         pField := Meta [N];
-        tmp := xquery_eval (Meta [N+2], xmlItem, 0);
-        foreach (any T in tmp) do
+      for (M := 0; M < length (Meta[N+1]); M := M + 1)
         {
-          T := cast (T as varchar);
+        T := serialize_to_UTF8_xml (xpath_eval ('/IMC-VCARD/' || Meta[N+1][M] || '/text()', xmlItem, 1));
           if (not is_empty_or_null (T))
           {
-            pField2 := pField;
-            if (pField2 = 'P_UID')
-            {
+          if (pField = 'P_UID')
               uid := T;
-            }
-              if (not isnull (Meta [N+1]))
-              {
-                if (strstr (T, ' @TYPE_') <> 0)
-                {
-                  pField2 := '';
-                  for (M := 0; M < length (Meta [N+1]); M := M + 2)
-                  {
-                    if ((Meta [N+1][M] = '*') and isnull (strstr (T, ' @TYPE_')))
-                    {
-                      pField2 := Meta [N+1][M+1];
-            } else {
-                      V := split_and_decode (Meta [N+1][M], 0, '\0\0,');
-                      for (L := 0; L < length (V); L := L + 1)
+
+          if (not AB.WA.vector_contains (pFields, pField))
                     {
-                        if (isnull (strstr (T, ' @TYPE_' || V[L])))
-                          goto _exit;
-                    }
-                      pField2 := Meta [N+1][M+1];
-                    _exit:;
+            pFields := vector_concat (pFields, vector (pField));
+            pValues := vector_concat (pValues, vector (AB.WA.import_vcard_decode (T)));
                     }
                   }
-                  M := strstr (T, ' @TYPE_');
-                  if (not isnull (M))
-                    T := subseq (T, 0, M);
                 }
               }
-              if (not AB.WA.vector_contains (pFields, pField2))
+    xmlSubItems := xpath_eval ('/IMC-VCARD/*', xmlItem, 0);
+    foreach (any xmlSubItem in xmlSubItems) do
+    {
+      itemSubName := cast (xpath_eval ('name(.)', xmlSubItem) as varchar);
+      pos := strchr (itemSubName, '.');
+      if (pos is not NULL)
               {
-                  pFields := vector_concat (pFields, vector (pField2));
-              pValues := vector_concat (pValues, vector (T));
+        itemName := subseq (itemSubName, pos+1);
+        itemPrefix := subseq (itemSubName, 0, pos);
+        for (N := 0; N < mGroupLength; N := N + 2)
+        {
+          if (strstr (MetaGroup[N+1][0], itemName) = 0)
+          {
+            T := xpath_eval ('/IMC-VCARD/' || itemPrefix || '.' || MetaGroup[N+1][1] || '/text()', xmlItem, 1);
+            if (not isnull (T))
+            {
+              pField := MetaGroup[N];
+              T := serialize_to_UTF8_xml (xpath_eval ('./val/text()', xmlSubItem));
+              if (not AB.WA.vector_contains (pFields, pField))
+              {
+                pFields := vector_concat (pFields, vector (pField));
+                pValues := vector_concat (pValues, vector (AB.WA.import_vcard_decode (T)));
             }
+              goto _1;
           }
         }
       }
+      _1:;
+      }
+    }
       if (isnull (uid) and not isnull (externalUID))
       {
         N := strchr (externalUID, '_');
@@ -3978,7 +4100,6 @@ create procedure AB.WA.import_vcard (
     _skip:;
       AB.WA.import_inc_progress_id (progress_id);
     }
-  }
   return vcardImported;
 }
 ;
@@ -4016,7 +4137,7 @@ create procedure AB.WA.import_rdf_data (
       'homepage',                'P_H_WEB',
       'workplaceHomepage',       'P_B_WEB',
       'lat',                     'P_H_LAT',
-      'long',                    'P_H_LNG',
+      'lng',                     'P_H_LNG',
       'depiction',               'P_PHOTO'
     );
 
@@ -4315,8 +4436,7 @@ create procedure AB.WA.import_foaf_content (
   if (length (Items))
   {
     personIRI := Items[0][0];
-    tmp := replace (Items[N][3], 'mailto:', '');
-    Persons := vector_concat (Persons, vector (vector (1, personIRI,  coalesce (Items[N][2], Items[N][1]), tmp)));
+    Persons := vector_concat (Persons, vector (vector (1, personIRI,  coalesce (Items[0][2], Items[0][1]), replace (Items[0][3], 'mailto:', ''))));
     S := sprintf (' sparql
                     define input:storage ""
                     prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@@ -4349,21 +4469,20 @@ create procedure AB.WA.import_foaf_content (
                            }', contentIRI);
   }
   Items := AB.WA.ab_sparql (S);
-  for (N := 0; N < length (Items); N := N + 1)
-  {
-    if (not isnull (coalesce (Items[N][2], Items[N][1])))
+  foreach (any Item in Items) do
     {
+    if (isnull (coalesce (Item[2], Item[1])))
+      goto _skip;
+
       for (M := 0; M < length (Persons); M := M + 1)
       {
-        if (Persons[M][1] = Items[N][0])
+      if (Persons[M][1] = Item[0])
           goto _skip;
       }
-      tmp := replace (Items[N][3], 'mailto:', '');
-      Persons := vector_concat (Persons, vector (vector (0, Items[N][0], coalesce (Items[N][2], Items[N][1]), tmp)));
+    Persons := vector_concat (Persons, vector (vector (0, Item[0], coalesce (Item[2], Item[1]), replace (Item[3], 'mailto:', ''))));
+
     _skip:;
     }
-  }
-
 _exit:;
   return Persons;
 }
@@ -4626,6 +4745,15 @@ create procedure AB.WA.import_contact_update (
 
 ----------------------------------------------------------------------
 --
+create procedure AB.WA.export_vcard_encode (
+  in S varchar)
+{
+  return replace (S, ':', '\\:');
+}
+;
+
+----------------------------------------------------------------------
+--
 create procedure AB.WA.export_vcard_line (
   in property varchar,
   in value any,
@@ -4638,6 +4766,24 @@ create procedure AB.WA.export_vcard_line (
 }
 ;
 
+----------------------------------------------------------------------
+--
+create procedure AB.WA.export_vcard_group (
+  in prefix varchar,
+  in property varchar,
+  in value any,
+  in label varchar,
+  in labelValue any,
+  inout sStream any)
+{
+  if (not is_empty_or_null (value))
+  {
+    http (sprintf ('%s:%s\r\n', prefix || '.' || property, AB.WA.export_vcard_encode (cast (value as varchar))), sStream);
+    http (sprintf ('%s:%s\r\n', prefix || '.' || label, cast (labelValue as varchar)), sStream);
+  }
+}
+;
+
 -------------------------------------------------------------------------------
 --
 create procedure AB.WA.export_vcard (
@@ -4662,7 +4808,7 @@ create procedure AB.WA.export_vcard (
     if (AB.WA.tags_exchangeTest (P_TAGS, oTagsInclude, oTagsExclude))
   {
 	  http ('BEGIN:VCARD\r\n', sStream);
-	  http ('VERSION:2.1\r\n', sStream);
+      http ('VERSION:3.0\r\n', sStream);
 
       AB.WA.export_vcard_line ('REV', AB.WA.dt_iso8601 (P_UPDATED), sStream);
 
@@ -4681,6 +4827,7 @@ create procedure AB.WA.export_vcard (
         AB.WA.export_vcard_line ('N', S, sStream);
       }
       AB.WA.export_vcard_line ('BDAY', AB.WA.dt_format (P_BIRTHDAY, 'Y-M-D'), sStream);
+      AB.WA.export_vcard_line ('X-GENDER', initcap (P_GENDER), sStream);
 
 	  -- mail
       AB.WA.export_vcard_line ('EMAIL;TYPE=PREF;TYPE=INTERNET', P_MAIL, sStream);
@@ -4722,6 +4869,14 @@ create procedure AB.WA.export_vcard (
       AB.WA.export_vcard_line ('ORG', P_B_ORGANIZATION, sStream);
       AB.WA.export_vcard_line ('TITLE', P_B_JOB, sStream);
 
+      AB.WA.export_vcard_line ('X-ICQ',   P_ICQ, sStream);
+      AB.WA.export_vcard_line ('X-MSN',   P_MSN, sStream);
+      AB.WA.export_vcard_line ('X-AIM',   P_AIM, sStream);
+      AB.WA.export_vcard_line ('X-YAHOO', P_YAHOO, sStream);
+      AB.WA.export_vcard_line ('X-SKYPE', P_SKYPE, sStream);
+
+      AB.WA.export_vcard_group ('item1', 'URL', P_IRI, 'X-ABLabel', 'PROFILE', sStream);
+
 	  http ('END:VCARD\r\n', sStream);
 	}
 	}
@@ -5274,6 +5429,10 @@ create procedure AB.WA.syncml_check (
     return 0;
   if (VAD.DBA.version_compare (syncmlVersion, '1.05.75') < 0)
     return 0;
+  if (__proc_exists ('DB.DBA.yac_syncml_version_get') is null)
+    return 0;
+  if (__proc_exists ('DB.DBA.yac_syncml_type_get') is null)
+    return 0;
   if (isnull (syncmlPath))
     return 1;
   if (DB.DBA.yac_syncml_version_get (syncmlPath) = 'N')
@@ -5301,11 +5460,8 @@ create procedure AB.WA.syncml_entry_update (
   for (select deserialize (EX_OPTIONS) as _options from AB.WA.EXCHANGE where EX_DOMAIN_ID = _domain_id and EX_TYPE = 2) do
   {
     _syncmlPath := get_keyword ('name', _options);
-
     if (not AB.WA.syncml_check (_syncmlPath))
       goto _skip;
-    if (DB.DBA.yac_syncml_type_get (_syncmlPath) not in ('vcard_11', 'vcard_12'))
-      goto _skip;
 
     oTagsInclude := null;
     oTagsExclude := null;
@@ -5345,17 +5501,15 @@ create procedure AB.WA.syncml_entry_update_internal (
     _content := AB.WA.entry2syncml (_entry_id);
     _permissions := USER_GET_OPTION (_user, 'PERMISSIONS');
     if (isnull (_permissions))
-    {
       _permissions := '110100000RR';
-    }
+
     connection_set ('__sync_dav_upl', '1');
     connection_set ('__sync_ods', '1');
-    DB.DBA.DAV_RES_UPLOAD_STRSES_INT (_path, _content, 'text/x-vcard', _permissions, http_dav_uid (), http_dav_uid () + 1, null, null, 0);
+    DB.DBA.DAV_RES_UPLOAD_STRSES_INT (_path, _content, 'text/x-vcard', _permissions, _user, _user, null, null, 0);
     connection_set ('__sync_ods', '0');
     connection_set ('__sync_dav_upl', '0');
   }
-
-  if (_action = 'D')
+  else if (_action = 'D')
   {
     declare _id integer;
 
@@ -5363,7 +5517,7 @@ create procedure AB.WA.syncml_entry_update_internal (
     if (isinteger(_id) and (_id > 0))
     {
       connection_set ('__sync_ods', '1');
-      DB.DBA.DAV_DELETE (_path, 1, _user, _password);
+      DB.DBA.DAV_DELETE_INT (_path, 1, _user, _password, 0);
       connection_set ('__sync_ods', '0');
     }
   }
diff --git a/appsrc/ODS-Addressbook/sql/ab-a-soap.sql b/appsrc/ODS-Addressbook/sql/ab-a-soap.sql
deleted file mode 100644
index 4d6dc2c..0000000
--- a/appsrc/ODS-Addressbook/sql/ab-a-soap.sql
+++ /dev/null
@@ -1,153 +0,0 @@
---
---  $Id: ab-a-soap.sql,v 1.3.2.1 2010/09/20 10:14:39 source Exp $
---
---  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
---  project.
---
---  Copyright (C) 1998-2007 OpenLink Software
---
---  This project 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; only version 2 of the License, dated June 1991.
---
---  This program 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
---  General Public License for more details.
---
---  You should have received a copy of the GNU General Public License along
---  with this program; if not, write to the Free Software Foundation, Inc.,
---  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
---
-
------------------------------------------------------------------------------
---
-create procedure DBA.DB.addressbook_import (
-  in pUser varchar,
-  in pPassword varchar,
-  in pInstance varchar,
-  in pSource varchar,
-  in pSourceType varchar,
-  in pContentType varchar,
-  in pTags varchar := '') returns varchar
-{
-  declare user_id, domain_id integer;
-  declare content varchar;
-  declare tmp any;
-
-  user_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = pUser and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = pPassword);
-  if (isnull (user_id))
-  	signal ('AB101', 'Bad user name or password');
-  domain_id := AB.WA.domain_id (pInstance);
-  if (isnull (domain_id))
-  	signal ('AB102', 'Bad instance name');
-  if (not exists (select 1
-                   from WA_MEMBER,
-                        WA_INSTANCE
-                  where WAM_USER = user_id
-                    and WAM_INST = WAI_NAME
-                    and WAI_ID   = domain_id))
-  	signal ('AB103', 'User not a member of the instance');
-
-  -- get content
-  if (lcase(pSourceType) = 'string')
-  {
-    content := pSource;
-  }
-  else if (lcase(pSourceType) = 'webdav')
-  {
-    if (pSource not like (AB.WA.dav_home (user_id) || '%'))
-      signal ('AB108', sprintf('Please select file from your WebDAV home directory ''%s''!', AB.WA.dav_home (user_id)));
-    content := AB.WA.dav_content (AB.WA.host_url () || pSource, pUser, pPassword);
-  }
-  else if (lcase(pSourceType) = 'url')
-  {
-    content := pSource;
-  }
-  else
-  {
-	  signal ('AB106', 'The source type must be string, WebDAV or URL.');
-  }
-
-  pTags := trim (pTags);
-  AB.WA.test (pTags, vector ('name', 'Tags', 'class', 'tags'));
-  tmp := AB.WA.tags2vector (pTags);
-  tmp := AB.WA.vector_unique (tmp);
-  pTags := AB.WA.vector2tags (tmp);
-
-  -- import content
-  set_user_id ('dba');
-  if (is_empty_or_null (content))
-    signal ('AB107', 'Bad import source!');
-
-  if (lcase(pContentType) = 'vcard')
-  {
-    AB.WA.import_vcard (domain_id, content, vector ('tags', pTags));
-  }
-  else if (lcase(pContentType) = 'foaf')
-  {
-    AB.WA.import_foaf (domain_id, content, pTags, vector (), case when (lcase (pSourceType) = 'url') then 1 else 0 end);
-  }
-  else
-  {
-  	signal ('AB105', 'The content type must be vCard or FOAF.');
-  }
-  return 1;
-}
-;
-
------------------------------------------------------------------------------
---
-create procedure DBA.DB.addressbook_export (
-  in pUser varchar,
-  in pPassword varchar,
-  in pInstance varchar,
-  in pContentType varchar) returns varchar
-{
-  declare user_id, domain_id integer;
-
-  user_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = pUser and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = pPassword);
-  if (isnull (user_id))
-  	signal ('AB101', 'Bad user name or password');
-  domain_id := AB.WA.domain_id (pInstance);
-  if (isnull (domain_id))
-  	signal ('AB102', 'Bad instance name');
-  if (not exists (select 1
-                   from WA_MEMBER,
-                        WA_INSTANCE
-                  where WAM_USER = user_id
-                    and WAM_INST = WAI_NAME
-                    and WAI_ID   = domain_id))
-  	signal ('AB103', 'User not a member of the instance');
-
-  declare sStream any;
-
-  sStream := string_output ();
-  set_user_id ('dba');
-  if (lcase(pContentType) = 'vcard')
-  {
-    http (AB.WA.export_vcard (domain_id), sStream);
-  }
-  else if (lcase(pContentType) = 'foaf')
-  {
-    http (AB.WA.export_foaf (domain_id), sStream);
-  }
-  else if (lcase(pContentType) = 'csv')
-  {
-    -- CSV
-    http (AB.WA.export_csv_head (), sStream);
-    http (AB.WA.export_csv (domain_id), sStream);
-  }
-  else
-  {
-  	signal ('AB104', 'The content type must be vCard, FOAF or CSV.');
-  }
-  return string_output_string (sStream);
-}
-;
-
-grant execute on DBA.DB.addressbook_import to SOAP_ADDRESSBOOK
-;
-
-grant execute on DBA.DB.addressbook_export to SOAP_ADDRESSBOOK
-;
diff --git a/appsrc/ODS-Addressbook/sql/ab-a-table.sql b/appsrc/ODS-Addressbook/sql/ab-a-table.sql
index a8d00ee..051f4c8 100644
--- a/appsrc/ODS-Addressbook/sql/ab-a-table.sql
+++ b/appsrc/ODS-Addressbook/sql/ab-a-table.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ab-a-table.sql,v 1.21.2.4 2010/11/11 12:37:55 source Exp $
+--  $Id: ab-a-table.sql,v 1.21.2.5 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/sql/ab-a-update.sql b/appsrc/ODS-Addressbook/sql/ab-a-update.sql
index 6be1745..4c66791 100644
--- a/appsrc/ODS-Addressbook/sql/ab-a-update.sql
+++ b/appsrc/ODS-Addressbook/sql/ab-a-update.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ab-a-update.sql,v 1.3.2.4 2010/10/07 13:24:45 source Exp $
+--  $Id: ab-a-update.sql,v 1.3.2.5 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/sql/ab-a-wa.sql b/appsrc/ODS-Addressbook/sql/ab-a-wa.sql
index 922c320..5fbc20e 100644
--- a/appsrc/ODS-Addressbook/sql/ab-a-wa.sql
+++ b/appsrc/ODS-Addressbook/sql/ab-a-wa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ab-a-wa.sql,v 1.8.2.8 2010/09/22 13:57:02 source Exp $
+--  $Id: ab-a-wa.sql,v 1.8.2.10 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -93,6 +93,9 @@ create procedure AB.WA.vhost()
   );
   DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_rulelist_addressbook', 1, vector ('ods_rule_addressbook'));
 
+  USER_CREATE ('SOAP_ADDRESSBOOK', md5 (cast (now() as varchar)), vector ('DISABLED', 1));
+  USER_SET_QUALIFIER ('SOAP_ADDRESSBOOK', 'DBA');
+
   VHOST_REMOVE(lpath    => '/addressbook');
   VHOST_DEFINE(lpath    => '/addressbook',
                ppath    => '/DAV/VAD/wa/',
@@ -101,16 +104,6 @@ create procedure AB.WA.vhost()
                vsp_user => 'dba',
                opts     => vector ('url_rewrite', 'ods_rulelist_addressbook')
              );
-  USER_CREATE ('SOAP_ADDRESSBOOK', md5 (cast (now() as varchar)), vector ('DISABLED', 1));
-  USER_SET_QUALIFIER ('SOAP_ADDRESSBOOK', 'DBA');
-
-  VHOST_REMOVE (lpath => '/dataspace/services/addressbook');
-  VHOST_DEFINE (lpath => '/dataspace/services/addressbook',
-                ppath => '/SOAP/',
-                soap_user => 'SOAP_ADDRESSBOOK',
-                soap_opts => vector('Use', 'literal', 'XML-RPC', 'no' )
-               );
-
   VHOST_REMOVE (lpath     => '/ods/portablecontacts');
   VHOST_DEFINE (lpath     => '/ods/portablecontacts',
                 ppath     => '/SOAP/Http/portablecontacts',
@@ -138,6 +131,13 @@ create procedure AB.WA.vhost()
                 soap_user => 'SOAP_ADDRESSBOOK',
                 opts      => vector ('atom-pub', 1)
                );
+
+  -- old SOAP
+  -- api url
+  VHOST_REMOVE (lpath => '/dataspace/services/addressbook');
+  -- procs
+  AB.WA.exec_no_error ('DROP procedure DBA.DB.addressbook_import');
+  AB.WA.exec_no_error ('DROP procedure DBA.DB.addressbook_export');
 }
 ;
 
diff --git a/appsrc/ODS-Addressbook/sql/ab-d.sql b/appsrc/ODS-Addressbook/sql/ab-d.sql
index dd2a2dd..2a33949 100644
--- a/appsrc/ODS-Addressbook/sql/ab-d.sql
+++ b/appsrc/ODS-Addressbook/sql/ab-d.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ab-d.sql,v 1.13.2.5 2010/11/11 12:37:55 source Exp $
+--  $Id: ab-d.sql,v 1.13.2.9 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -69,9 +69,9 @@ AB.WA.exec_no_error('delete from WA_TYPES where WAT_NAME = \'AddressBook\'');
 AB.WA.exec_no_error ('DROP type wa_AddressBook');
 
 -- Views
-AB.WA.exec_no_error ('DROP view AB..TAGS_VIEW');
-AB.WA.exec_no_error ('DROP view AB..GRANDS_PERSON_VIEW');
-AB.WA.exec_no_error ('DROP view AB..GRANDS_VIEW');
+AB.WA.exec_no_error ('DROP view AB.DBA.TAGS_VIEW');
+AB.WA.exec_no_error ('DROP view AB.DBA.GRANTS_PERSON_VIEW');
+AB.WA.exec_no_error ('DROP view AB.DBA.GRANTS_VIEW');
 
 -- Registry
 registry_remove ('ab_path');
@@ -81,6 +81,7 @@ registry_remove ('ab_index_version');
 registry_remove ('ab_path_upgrade2');
 registry_remove ('ab_acl_update');
 registry_remove ('__ods_addressbook_sioc_init');
+registry_remove ('ab_services_update');
 
 -- Procedures
 create procedure AB.WA.drop_procedures()
@@ -131,10 +132,6 @@ AB.WA.exec_no_error ('DROP view DB.DBA.ODS_ADDRESSBOOK_TAGS');
 -- reinit
 ODS_RDF_VIEW_INIT ();
 
--- dropping SIOC procs
-AB.WA.exec_no_error('DROP procedure DBA.DB.addressbook_import');
-AB.WA.exec_no_error('DROP procedure DBA.DB.addressbook_export');
-
 -- dropping API procs
 AB.WA.exec_no_error ('DROP procedure ODS.ODS_API."addressbook.get"');
 AB.WA.exec_no_error ('DROP procedure ODS.ODS_API."addressbook.new"');
diff --git a/appsrc/ODS-Addressbook/sql/sioc_ab.sql b/appsrc/ODS-Addressbook/sql/sioc_ab.sql
index ac9f03e..8abe82d 100644
--- a/appsrc/ODS-Addressbook/sql/sioc_ab.sql
+++ b/appsrc/ODS-Addressbook/sql/sioc_ab.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_ab.sql,v 1.33.2.12 2010/12/07 10:59:56 source Exp $
+--  $Id: sioc_ab.sql,v 1.33.2.17 2012/03/08 12:08:39 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -117,7 +117,10 @@ create procedure fill_ods_addressbook_sioc2 (
   declare graph_iri, addressbook_iri, socialnetwork_iri, contact_iri, creator_iri, role_iri, iri varchar;
 
   {
+    fill_ods_addressbook_services ();
+
     for (select WAI_ID,
+                WAI_IS_PUBLIC,
                 WAI_TYPE_NAME,
                 WAI_NAME,
                 WAI_ACL
@@ -127,7 +130,7 @@ create procedure fill_ods_addressbook_sioc2 (
     {
       graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
       exec (sprintf ('sparql clear graph <%s>', graph_iri));
-      SIOC..wa_instance_acl_insert (WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
+      SIOC..wa_instance_acl_insert (WAI_IS_PUBLIC, WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
       for (select P_DOMAIN_ID, P_ID, P_ACL
              from AB.WA.PERSONS
             where P_DOMAIN_ID = WAI_ID and P_ACL is not null) do
@@ -201,7 +204,8 @@ create procedure fill_ods_addressbook_sioc2 (
 								P_TAGS,
 	              P_FOAF,
                 P_IRI,
-                P_ACL
+                P_ACL,
+                P_CERTIFICATE
            from DB.DBA.WA_INSTANCE,
                 DB.DBA.WA_MEMBER,
                 AB.WA.PERSONS
@@ -213,7 +217,7 @@ create procedure fill_ods_addressbook_sioc2 (
           order by P_ID) do
   {
       contact_iri := SIOC..addressbook_contact_iri (P_DOMAIN_ID, P_ID);
-      graph_iri := SIOC..get_graph_new (null, coalesce (_access_mode, WAI_IS_PUBLIC), contact_iri);
+      graph_iri := SIOC..get_graph_new (coalesce (_access_mode, WAI_IS_PUBLIC), contact_iri);
       addressbook_iri := addressbook_iri (WAI_NAME);
       socialnetwork_iri := socialnetwork_iri (WAI_NAME);
     creator_iri := user_iri (WAM_USER);
@@ -271,7 +275,8 @@ create procedure fill_ods_addressbook_sioc2 (
                     P_UPDATED,
 											P_TAGS,
 		                  P_FOAF,
-				  P_IRI);
+                      P_IRI,
+                      P_CERTIFICATE);
 
       cnt := cnt + 1;
 		   if (mod (cnt, 500) = 0)
@@ -287,7 +292,34 @@ create procedure fill_ods_addressbook_sioc2 (
 
 -------------------------------------------------------------------------------
 --
-create procedure clean_ods_addressbook_sioc2 (
+create procedure fill_ods_addressbook_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('addressbook.search', 'addressbook.new', 'addressbook.import', 'addressbook.export', 'addressbook.publication.new', 'addressbook.subscription.new', 'addressbook.options.set',  'addressbook.options.get');
+  ods_object_services (graph_iri, 'addressbook', 'ODS AddressBook instance services', svc_functions);
+
+  -- contact
+  svc_functions := vector ('addressbook.get', 'addressbook.edit', 'addressbook.delete', 'addressbook.comment.new', 'addressbook.relationship.new', 'addressbook.relationship.delete', 'addressbook.annotation.new');
+  ods_object_services (graph_iri, 'addressbook/contact', 'ODS AddressBook contact services', svc_functions);
+
+  -- contact comment
+  svc_functions := vector ('addressbook.comment.get', 'addressbook.comment.delete');
+  ods_object_services (graph_iri, 'addressbook/contact/comment', 'ODS AddressBook comment services', svc_functions);
+
+  -- contact annotation
+  svc_functions := vector ('addressbook.annotation.get', 'addressbook.annotation.claim', 'addressbook.annotation.delete');
+  ods_object_services (graph_iri, 'addressbook/contact/annotation', 'ODS AddressBook annotation services', svc_functions);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure clean_ods_addressbook_sioc (
   in _wai_name varchar := null,
   in _access_mode integer := null)
 {
@@ -324,7 +356,7 @@ create procedure clean_ods_addressbook_sioc2 (
           order by P_ID) do
     {
       contact_iri := SIOC..addressbook_contact_iri (P_DOMAIN_ID, P_ID);
-      graph_iri := SIOC..get_graph_new (null, coalesce (_access_mode, WAI_IS_PUBLIC), contact_iri);
+      graph_iri := SIOC..get_graph_new (coalesce (_access_mode, WAI_IS_PUBLIC), contact_iri);
 
       contact_delete (graph_iri,
                       P_DOMAIN_ID,
@@ -346,22 +378,6 @@ create procedure clean_ods_addressbook_sioc2 (
 
 -------------------------------------------------------------------------------
 --
-create procedure ods_addressbook_services (
-  in graph_iri varchar, 
-  in forum_iri varchar,
-  in wai_id varchar := null,
-  in wai_name varchar := null)
-{
-  declare svc_iri varchar;
-  
-  -- dbg_obj_print (now (), 'ods_addressbook_services');
-  svc_iri := sprintf ('http://%s%s/services/addressbook', get_cname(), get_base_path ());
-  ods_sioc_service (graph_iri, svc_iri, forum_iri, null, 'text/xml', svc_iri||'/services.wsdl', svc_iri, 'SOAP');
-}
-;
-
--------------------------------------------------------------------------------
---
 create procedure contact_insert (
   in graph_iri varchar,
   in addressbook_iri varchar,
@@ -415,10 +431,12 @@ create procedure contact_insert (
   inout updated datetime,
 	inout tags varchar,
 	inout foaf varchar,
-	inout ext_iri varchar)
+  inout ext_iri varchar,
+  inout certificate varchar)
 {
   declare iri, iri2, temp_iri varchar;
 	declare person_iri varchar;
+  declare info, modulus, exponent, certificate_iri any;
 
 	declare exit handler for sqlstate '*'
 	{
@@ -439,7 +457,7 @@ create procedure contact_insert (
             and WAI_IS_PUBLIC > 0) do
   {
       iri := addressbook_contact_iri (domain_id, contact_id);
-      graph_iri := SIOC..get_graph_new (domain_id, WAI_IS_PUBLIC, iri);
+      graph_iri := SIOC..get_graph_new (WAI_IS_PUBLIC, iri);
       addressbook_iri := addressbook_iri (WAI_NAME);
       socialnetwork_iri := socialnetwork_iri (WAI_NAME);
     creator_iri := user_iri (WAM_USER);
@@ -649,6 +667,24 @@ create procedure contact_insert (
         DB.DBA.ODS_QUAD_URI_L (graph_iri, temp_iri, vcard_iri ('Country'), bCountry);
     }
   }
+
+  -- certificate
+  info := get_certificate_info (9, cast (certificate as varchar), 0);
+  if (info is not null and isarray (info) and cast (info[0] as varchar) = 'RSAPublicKey')
+  {
+    modulus := info[2];
+    exponent := info[1];
+    certificate_iri := iri || '#cert';
+    DB.DBA.ODS_QUAD_URI (graph_iri, certificate_iri, cert_iri ('identity'), iri);
+    DB.DBA.ODS_QUAD_URI (graph_iri, certificate_iri, rdf_iri ('type'), rsa_iri ('RSAPublicKey'));
+
+    DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri, certificate_iri, rsa_iri ('modulus'), bin2hex (modulus), cert_iri ('hex'), null);
+    DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri, certificate_iri, rsa_iri ('public_exponent'), cast (exponent as varchar), cert_iri ('int'), null);
+  }
+
+  -- contact services
+  SIOC..ods_object_services_attach (graph_iri, iri2, 'addressbook/contact');
+
   SIOC..contact_comments_insert (graph_iri, addressbook_iri, domain_id, contact_id);
   SIOC..contact_annotations_insert (graph_iri, domain_id, contact_id);
 }
@@ -671,7 +707,7 @@ create procedure contact_delete (
   iri := SIOC..addressbook_contact_iri (domain_id, contact_id);
   if (isnull (graph_iri))
   {
-    graph_iri := SIOC..get_graph_new (domain_id, null, iri);
+    graph_iri := SIOC..get_graph_new (AB.WA.domain_is_public (domain_id), iri);
     if (isnull (graph_iri))
       return;
   }
@@ -680,6 +716,8 @@ create procedure contact_delete (
 	scot_tags_delete (domain_id, iri, tags);
 	delete_quad_s_or_o (graph_iri, iri, iri);
 
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'addressbook/contact');
+
   -- Social Data
   iri := SIOC..socialnetwork_contact_iri (domain_id, contact_id);
 	scot_tags_delete (domain_id, iri, tags);
@@ -746,7 +784,8 @@ create trigger PERSONS_SIOC_I after insert on AB.WA.PERSONS referencing new as N
                   N.P_UPDATED,
 									N.P_TAGS,
 									N.P_FOAF,
-									N.P_IRI);
+                  N.P_IRI,
+                  N.P_CERTIFICATE);
 }
 ;
 
@@ -810,7 +849,8 @@ create trigger PERSONS_SIOC_U after update on AB.WA.PERSONS referencing old as O
                   N.P_UPDATED,
 									N.P_TAGS,
 									N.P_FOAF,
-									N.P_IRI);
+                  N.P_IRI,
+                  N.P_CERTIFICATE);
 }
 ;
 
@@ -1004,23 +1044,24 @@ create procedure contact_comment_insert (
   master_id := cast (master_id as integer);
   master_iri := SIOC..addressbook_contact_iri (domain_id, master_id);
 	if (isnull (graph_iri))
-		{
-    graph_iri := get_graph_new (domain_id, null, master_iri);
+    graph_iri := get_graph_new (AB.WA.domain_is_public (domain_id), master_iri);
+
     if (isnull (graph_iri))
       return;
-		}
+
   if (isnull (forum_iri))
-	{
     forum_iri := AB.WA.forum_iri (domain_id);
+
     if (isnull (forum_iri))
       return;
-  }
+
 		comment_iri := addressbook_comment_iri (domain_id, master_id, comment_id);
   if (isnull (comment_iri))
     return;
 
       foaf_maker (graph_iri, u_url, u_name, u_mail);
-      ods_sioc_post (graph_iri, comment_iri, forum_iri, null, title, last_update, last_update, null, comment, null, null, u_url);
+  SIOC..ods_sioc_post (graph_iri, comment_iri, forum_iri, null, title, last_update, last_update, null, comment, null, null, u_url);
+  SIOC..ods_object_services_attach (graph_iri, comment_iri, 'addressbook/contact/comment');
   DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, sioc_iri ('has_reply'), comment_iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, comment_iri, sioc_iri ('reply_of'), master_iri);
     }
@@ -1043,13 +1084,15 @@ create procedure contact_comment_delete (
   master_id := cast (master_id as integer);
   master_iri := SIOC..addressbook_contact_iri (domain_id, master_id);
   if (isnull (graph_iri))
-  {
-    graph_iri := SIOC..get_graph_new (domain_id, null, master_iri);
+    graph_iri := SIOC..get_graph_new (AB.WA.domain_is_public (domain_id), master_iri);
+
     if (isnull (graph_iri))
       return;
-  }
+
   comment_iri := SIOC..addressbook_comment_iri (domain_id, master_id, comment_id);
   delete_quad_s_or_o (graph_iri, comment_iri, comment_iri);
+  -- comment services
+  SIOC..ods_object_services_dettach (graph_iri, comment_iri, 'addressbook/contact/comment');
 }
 ;
 
@@ -1178,8 +1221,7 @@ create procedure contact_annotation_insert (
 	inout created datetime,
 	inout updated datetime)
 {
-	declare master_iri, annotattion_iri varchar;
-
+  declare master_iri, annotation_iri varchar;
 	declare exit handler for sqlstate '*'
 	{
 		sioc_log_message (__SQL_MESSAGE);
@@ -1190,19 +1232,20 @@ create procedure contact_annotation_insert (
   master_iri := SIOC..addressbook_contact_iri (domain_id, master_id);
 	if (isnull (graph_iri))
 		{
-    graph_iri := get_graph_new (domain_id, null, master_iri);
+    graph_iri := get_graph_new (AB.WA.domain_is_public (domain_id), master_iri);
     if (isnull (graph_iri))
       return;
 		}
-  annotattion_iri := addressbook_annotation_iri (domain_id, master_id, annotation_id);
-  DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, an_iri ('annotates'), master_iri);
-  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotattion_iri);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('author'), author);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('body'), body);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('created'), created);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('modified'), updated);
-
-	  addressbook_claims_insert (graph_iri, annotattion_iri, claims);
+  annotation_iri := addressbook_annotation_iri (domain_id, master_id, annotation_id);
+  DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, an_iri ('annotates'), master_iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotation_iri);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('author'), author);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('body'), body);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('created'), created);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('modified'), updated);
+
+  addressbook_claims_insert (graph_iri, annotation_iri, claims);
+  SIOC..ods_object_services_attach (graph_iri, annotation_iri, 'addressbook/contact/annotation');
 	}
 ;
 
@@ -1215,7 +1258,7 @@ create procedure contact_annotation_delete (
   inout annotation_id integer,
   inout claims any)
 {
-  declare master_iri, annotattion_iri varchar;
+  declare master_iri, annotation_iri varchar;
   declare exit handler for sqlstate '*'
   {
 		sioc_log_message (__SQL_MESSAGE);
@@ -1226,12 +1269,13 @@ create procedure contact_annotation_delete (
   master_iri := SIOC..addressbook_contact_iri (domain_id, master_id);
   if (isnull (graph_iri))
   {
-    graph_iri := SIOC..get_graph_new (domain_id, null, master_iri);
+    graph_iri := SIOC..get_graph_new (AB.WA.domain_is_public (domain_id), master_iri);
     if (isnull (graph_iri))
       return;
   }
-  annotattion_iri := addressbook_annotation_iri (domain_id, master_id, annotation_id);
-  SIOC..delete_quad_s_or_o (graph_iri, annotattion_iri, annotattion_iri);
+  annotation_iri := addressbook_annotation_iri (domain_id, master_id, annotation_id);
+  SIOC..delete_quad_s_or_o (graph_iri, annotation_iri, annotation_iri);
+  SIOC..ods_object_services_dettach (graph_iri, annotation_iri, 'addressbook/contact/annotation');
 }
 ;
 
@@ -1239,7 +1283,7 @@ create procedure contact_annotation_delete (
 --
 create procedure addressbook_claims_insert (
   in graph_iri varchar,
-  in annotattion_iri varchar,
+  in annotation_iri varchar,
   in claims any)
 {
   declare N integer;
@@ -1256,7 +1300,7 @@ create procedure addressbook_claims_insert (
     } else {
       cPedicate := ODS.ODS_API."ontology.denormalize" (cPedicate);
   }
-    DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, cPedicate, cValue);
+    DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, cPedicate, cValue);
 }
 }
 ;
@@ -1329,9 +1373,24 @@ create procedure ods_addressbook_sioc_init ()
 }
 ;
 
---AB.WA.exec_no_error('ods_addressbook_sioc_init ()');
+-------------------------------------------------------------------------------
+--
+create procedure AB.WA.tmp_update ()
+{
+  if (registry_get ('ab_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_addressbook_services();
+  registry_set ('ab_services_update', '1');
+}
+;
+
+AB.WA.tmp_update ();
 
+-------------------------------------------------------------------------------
+--
 use DB;
+
 -------------------------------------------------------------------------------
 --
 wa_exec_no_error ('drop view ODS_ADDRESSBOOK_CONTACTS');
diff --git a/appsrc/ODS-Addressbook/vad_version b/appsrc/ODS-Addressbook/vad_version
new file mode 100644
index 0000000..030dea2
--- /dev/null
+++ b/appsrc/ODS-Addressbook/vad_version
@@ -0,0 +1 @@
+1.9.52
diff --git a/appsrc/ODS-Addressbook/www/ab_login.vspx b/appsrc/ODS-Addressbook/www/ab_login.vspx
index 023b3cf..4cec85c 100644
--- a/appsrc/ODS-Addressbook/www/ab_login.vspx
+++ b/appsrc/ODS-Addressbook/www/ab_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: ab_login.vspx,v 1.2.2.4 2010/10/07 13:24:45 source Exp $
+  -  $Id: ab_login.vspx,v 1.2.2.6 2012/03/08 12:08:39 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -34,16 +34,16 @@
       if (page_name = 'error.vspx')
         return;
 
-      if (AB.WA.check_grants (self.account_rights, page_name))
+      if (AB.WA.check_grants (self.person_rights, page_name))
         return;
 
-      if (isnull (self.account_rights) and not is_empty_or_null (self.sid))
+      if (isnull (self.person_rights) and not is_empty_or_null (self.sid))
       {
         self.vc_redirect (sprintf ('/ods/error.vspx?__PAGE=%U&__SQL_STATE=%U&__SQL_MESSAGE=%U', 'home.vspx', '23023', 'You have no access rights for the application!'));
         return;
       }
 
-      if (isnull (self.account_rights))
+      if (isnull (self.person_rights))
       {
       vh := http_map_get ('vhost');
       lh := http_map_get ('lhost');
diff --git a/appsrc/ODS-Addressbook/www/ajax.vsp b/appsrc/ODS-Addressbook/www/ajax.vsp
index 16da906..95bb784 100644
--- a/appsrc/ODS-Addressbook/www/ajax.vsp
+++ b/appsrc/ODS-Addressbook/www/ajax.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: ajax.vsp,v 1.1.2.4 2011/03/23 12:17:57 source Exp $
+--  $Id: ajax.vsp,v 1.1.2.6 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -111,7 +111,7 @@
 	}
   else if (action = 'about')
   {
-    http (         '<div style="padding: 1em;">');
+    http (         '<div style="padding: 1em; overflow: hidden;">');
     http (         '<table style="width: 100%;">');
     http (         '  <tr>');
     http (         '    <td align="right" width="50%">');
diff --git a/appsrc/ODS-Addressbook/www/annotea.vspx b/appsrc/ODS-Addressbook/www/annotea.vspx
index 59ff0f6..8274eb8 100644
--- a/appsrc/ODS-Addressbook/www/annotea.vspx
+++ b/appsrc/ODS-Addressbook/www/annotea.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: annotea.vspx,v 1.7.2.4 2010/09/20 10:14:40 source Exp $
+ -  $Id: annotea.vspx,v 1.7.2.7 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -42,9 +42,11 @@
   <vm:pagetitle>Annotation page</vm:pagetitle>
   <vm:popup_page_wrapper>
     <vm:variables>
+      <v:variable persist="0" name="v_sid" param-name="sid" type="varchar" />
+      <v:variable persist="0" name="v_realm" param-name="realm" type="varchar" />
       <v:variable persist="0" name="v_mode" param-name="mode" type="varchar" default="'show'"/>
       <v:variable persist="0" name="v_oid" param-name="oid" type="integer" />
-      <v:variable persist="0" name="v_id" type="integer" />
+      <v:variable persist="0" name="v_id" param-name="id" type="integer" />
       <v:variable persist="0" name="v_author" type="varchar" default="''" />
       <v:variable persist="0" name="v_body" type="varchar" default="''" />
       <v:variable persist="0" name="v_claims" type="any" default="null" />
@@ -52,8 +54,8 @@
       <v:variable name="v_tabNo" param-name="tabNo" type="varchar" default="0" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <input type="hidden" name="sid"   id="sid"   value="<?V self.v_sid ?>" />
+      <input type="hidden" name="realm" id="realm" value="<?V self.v_realm ?>" />
       <div class="new-form-header">
         Free Text Annotation: '<?V AB.WA.utf2wide ((select coalesce(P_NAME, '~ no title ~') from AB.WA.PERSONS where P_ID = self.v_oid)) ?>'
       </div>
@@ -74,7 +76,7 @@
                 </v:on-post>
               </v:button>
             </div>
-            <table id="annotations" class="AB_grid" cellspacing="0" style="border: 0;">
+            <table class="ODS_grid ANN_grid">
             </table>
           </v:template>
 
@@ -82,7 +84,7 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
+                <tr>
                   <td>
                     No annotations
                   </td>
@@ -91,16 +93,27 @@
             </v:template>
 
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
+              <?vsp
+                 declare row vspx_row_template;
+                 row := control;
+              ?>
               <table>
                 <tr>
-                  <td width="1%" nowrap="nowrap" valign="top">
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), AB.WA.dt_value ((control as vspx_row_template).te_column_value('A_CREATED'))); ?>
+                  <td width="1%" nowrap="nowrap">
+                    <?vsp self.showTDValue (row.te_column_value('A_ID'), AB.WA.dt_value (row.te_column_value('A_CREATED'))); ?>
                   </td>
                   <td>
-                    <u><b><?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_AUTHOR')); ?></b></u>
-                    <br /><?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_BODY')); ?>
+                    <?vsp
+                      declare id, iri any;
+
+                      id := row.te_column_value('A_ID');
+                      iri := AB.WA.url_fix (SIOC..addressbook_annotation_iri (self.domain_id, self.v_oid, id), self.v_sid, self.v_realm);
+                      http (sprintf ('<a href="%V">', iri));
+                      self.showTDValue (id, row.te_column_value('A_AUTHOR'));
+                      http ('</a>');
+                    ?>
                   </td>
-                  <td width="1%" nowrap="nowrap" valign="top">
+                  <td width="1%" nowrap="nowrap">
                     <v:button action="simple" value="edit" xhtml_title="Edit" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -125,6 +138,12 @@
                     </v:button>
                   </td>
                 </tr>
+                <tr>
+                  <td />
+                  <td colspan="2">
+                    <i><?vsp self.showTDValue (row.te_column_value('A_ID'), row.te_column_value('A_BODY')); ?></i>
+                  </td>
+                </tr>
               </table>
             </v:template>
 
@@ -153,6 +172,8 @@
                        self.v_claims
                   from AB.WA.ANNOTATIONS
                  where A_ID = self.v_id;
+
+                self.rdf_iri := SIOC..addressbook_annotation_iri (self.domain_id, self.v_oid, self.v_id);
               }
             ]]>
           </v:before-data-bind>
@@ -203,12 +224,12 @@
                 <table>
                   <tr>
                     <td width="800px">
-                      <table id="c_tbl" class="form-list" cellspacing="0">
-                  <thead class="sortHeader">
+                      <table id="c_tbl" class="ODS_grid">
+                        <thead>
             <tr>
-                            <th>Relation</th>
-                            <th width="70%">Value</th>
-                            <th width="1%">Action</th>
+                            <th width="50%">Relation</th>
+                            <th width="50%">Value</th>
+                            <th class="action">Action</th>
                     </tr>
                   </thead>
                   		  <![CDATA[
@@ -223,7 +244,7 @@
                   ?>
                 		    </script>
                 		  ]]>
-                        <tr id="c_tr_no"><td colspan="2"><b>No Triplets</b></td></tr>
+                        <tr id="c_tr_no"><td colspan="3"><b>No Triplets</b></td></tr>
                       </table>
 		                </td>
                     <td valign="top" nowrap="nowrap">
@@ -288,11 +309,6 @@
                 </div>
         </vm:if>
       </div>
-      <script>
-        <![CDATA[
-          coloriseTable('annotations');
-        ]]>
-      </script>
     </vm:pagebody>
   </vm:popup_page_wrapper>
 </v:page>
diff --git a/appsrc/ODS-Addressbook/www/conversation.vspx b/appsrc/ODS-Addressbook/www/conversation.vspx
index 453d588..4da2e1f 100644
--- a/appsrc/ODS-Addressbook/www/conversation.vspx
+++ b/appsrc/ODS-Addressbook/www/conversation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conversation.vspx,v 1.2.2.2 2010/09/20 10:14:40 source Exp $
+ -  $Id: conversation.vspx,v 1.2.2.4 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -64,8 +64,8 @@
       <v:variable persist="0" name="openid_name" type="varchar" default="null" param-name="openid.sreg.fullname" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params, ''))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params, ''))); ?>
       <?vsp http(sprintf('<input type="hidden" name="user_name" id="user_name" value="%s" />', AB.WA.account_name (self.account_id))); ?>
       <div class="new-form-header">
         Discussion
@@ -107,7 +107,7 @@
                   <div class="<?V case when control.tn_level = 0 then 'cm_node_top' else 'cm_node' end ?>">
                     <?vsp
                       {
-                        declare id, comment, title, u_name, last_update any;
+                        declare id, comment, title, iri, u_name, last_update any;
 
                         id := cast (control.tn_value as integer);
                         declare exit handler for not found;
@@ -115,6 +115,7 @@
                           into title, comment, u_name, last_update
                           from AB.WA.PERSON_COMMENTS
                          where PC_ID = id;
+                        iri := AB.WA.url_fix (SIOC..addressbook_comment_iri (self.domain_id, self.v_id, id), get_keyword ('sid', self.vc_page.vc_event.ve_params), get_keyword ('realm', self.vc_page.vc_event.ve_params));
 
                         declare parsed_message any;
                         declare d_name varchar;
@@ -147,7 +148,8 @@
                     ?>
                     <div class="comment" id="msg_<?V id ?>">
                       <div class="comment-header">
-                        <span class="comment-subj"><?V AB.WA.utf2wide (title) ?></span> <br />
+                        <?vsp http (sprintf ('<a href="%V">%s</a>', iri, title)); ?>
+                        <br />
                       </div>
                       <div class="comment-msg">
                         <?vsp
diff --git a/appsrc/ODS-Addressbook/www/css/style.css b/appsrc/ODS-Addressbook/www/css/style.css
index 43ae183..48fff8e 100644
--- a/appsrc/ODS-Addressbook/www/css/style.css
+++ b/appsrc/ODS-Addressbook/www/css/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.18.2.9 2010/10/13 12:15:51 source Exp $
+ *  $Id: style.css,v 1.18.2.13 2012/03/08 12:08:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -21,112 +21,81 @@
  *
  */
 
-body
-{
+body {
   padding: 0;
   margin: 0;
   font-family: Verdana, Arial, Helvetica, Sans-Serif;
   font-size: 9pt;
 }
 
-a
-{
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+form {
+  margin: 0;
+  padding: 0;
+}
+
+abbr {
+  border: none;
+}
+
+input[type="text"], input[type="password"], select {
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+}
+
+a {
   text-decoration: none;
 }
 
-a:active
-{
+a:active {
   text-decoration: none;
 }
 
-a:visited
-{
+a:visited {
   text-decoration: none;
 }
 
-a:hover
-{
+a:hover {
   text-decoration: underline;
 }
 
-.link
-{
+.link {
   color: blue;
 	cursor: pointer;
 }
 
-#MTB
-{
+#MTB {
   width: 100%;
   left: 0px;
   right: 0px;
 }
 
-#LC
-{
+#LC {
   width: 170px;
   padding-top: 5px;
   vertical-align: top;
 }
 
-#RC
-{
+#RC {
   padding-top: 5px;
   vertical-align: top;
 }
 
-/* Footer */
-
-#FT
-{
-  width: 100%;
-  position: relative;
-  bottom: 0px;
-  font-size: 8pt;
-  float: left;
-  clear: both;
-  text-align: right;
-  border-top: 2px solid #fff;
-  margin-right: 10px;
-  background-color: #fff;
-  background-image: url(../image/ods_main_footer.png);
-}
-
-#FT_L
-{
-  float: left;
-  clear: left;
-  margin-top: 10px;
-  margin-left: 8px;
-  border: 1px solid #788;
-}
-
-#FT_R
-{
-  float: right;
-  clear: right;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  margin-right: 5px;
-  color: #788;
-}
-
-#FT_R a
-{
-  text-decoration: none;
-  color: inherit;
-}
-
 /* Left side within MT */
-
-.page_head
-{
+.page_head {
   width: 100%;
   background-color: #b0cde4;
 }
 
-.lc
-{
+.lc {
   font-size: 12px;
   background-color: #EFEFEF;
   border: 1px solid #7f94a5;
@@ -137,25 +106,21 @@ a:hover
   width: auto;
 }
 
-.lc_none
-{
+.lc_none {
   margin: 0 0.5em 0.5em 0.5em;
   width: auto;
 }
 
-.lc_closer
-{
+.lc_closer {
   margin-top: -0.5em;
   z-index: 1;
 }
 
-.lc_noborder
-{
+.lc_noborder {
   border-top: 0;
 }
 
-.lc div
-{
+.lc div {
   color: blue;
 	cursor: pointer;
   display: block;
@@ -163,8 +128,7 @@ a:hover
   margin: 3px;
 }
 
-.gems2
-{
+.gems2 {
   color: black;
 	cursor: pointer;
   display: block;
@@ -174,79 +138,67 @@ a:hover
   background: #b0cde4;
 }
 
-.lc a:hover, .lc .gems:hover, .lc .gems2:hover
-{
+.lc a:hover, .lc .gems:hover, .lc .gems2:hover {
   color: blue;
   background: #99b3c5;
 }
 
-.lc_head
-{
+.lc_head {
   -moz-user-select: none;
   cursor: pointer;
   font-size: 1em;
   font-weight: bold;
 }
 
-a.gems
-{
+a.gems {
   display: block;
   padding: 3px;
   margin: 3px;
   text-decoration: none;
 }
 
-a.gems:hover
-{
+a.gems:hover {
   color: black;
   background: #bce;
 }
 
-.navigator_info
-{
+.navigator_info {
   font-size: smaller;
 }
 
-.copyright
-{
+.copyright {
   font-size: 75%;
   text-align: right;
   padding-right: 5px;
   border-top: 1px solid silver;
 }
 
-.system_info
-{
+.system_info {
   font-size: 75%;
 }
 
-.page_title
-{
+.page_title {
   font-size: 12pt;
   font-weight: bold;
 }
 
-.main_page_area
-{
+.main_page_area {
   background-color: white;
   width: 100%;
 }
 
-.page_section_head
-{
+.page_section_head {
   font-size: 12pt;
   font-weight: bold;
 }
 
-table.sub_page_area
-{
+table.sub_page_area {
   width: 100%;
 }
 
 /* Label */
 
-.error
-{
+.error {
   color: red;
   font-weight: bold;
   margin: 3px 0px 3px 0px;
@@ -255,144 +207,32 @@ table.sub_page_area
   text-align: center;
 }
 
-.attention_marker
-{
+.attention_marker {
   color: #ff0033;
 }
 
-.subpage_header_area
-{
+.subpage_header_area {
   margin: 3px 0px 3px 0px;
   border: 1pt solid silver;
 }
 
-.page_header_area
-{
+.page_header_area {
   border: 1pt solid silver;
   position: relative;
   bottom:15pt;
 }
 
-/* The main navigation bar */
-.nav_bar
-{
-  display: block;
-  padding: 0;
-  margin: 0;
-  line-height: 1.9em;
-  font-size: 0.9em;
-}
-
-.nav_bar td.sel
-{
-}
-
-.nav_bar td
-{
-  background: #ddd;
-}
-
-.nav_bar td.filler
-{
-  background: #b0cde4;
-  width: 100%;
-}
-
-.nav_bar a
-{
-  display: block;
-  color: #444;
-  text-decoration: none;
-  font-weight: bold;
-  background: #99b3c5;
-  background-image: url(../image/stl_blu2_grad.gif);
-  background-repeat: repeat-x;
-  margin: 0;
-  padding: 0.25em 1em;
-  border-left: 1px solid #fff;
-  border-top: 1px solid #fff;
-  border-right: 1px solid #aaa;
-  white-space: nowrap;
-}
-
-.nav_bar a.les
-{
-  background: #b0cde4;
-  background-image: url(../image/sel_nav_grad2.gif);
-}
-
-.nav_bar a.les:hover
-{
-  color: black;
-  background: #99b3c5;
-}
-
-.nav_bar a:hover,
-.nav_bar a:active,
-.nav_bar a.sel:link,
-.nav_bar a.sel:visited
-{
-  background: #b0cde4;
-  background-image: url(../image/sel_nav_grad2.gif);
-  color: #000;
-}
-
-.nav_seperator {
-  left: 0px;
-  top: 0px;
-  width: 100%;
-  background-color: #b0cde4;
-  line-height: 2.6em;
-  color: #b0cde4;
-}
-
-/*
-  Fields
-*/
-input[readonly]
-{
+/* Fields */
+input[readonly] {
   background: #EFEFEF;
 }
 
-.readonly
-{
+.readonly {
   background: #EFEFEF;
 }
 
-/* ====== lists ====== */
-table#list
-{
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-}
-
-table#list th
-{
-  font-size: 0.9em;
-  font-weight: bold;
-  text-align: center;
-  padding: 2px;
-  background-color: #b0cde4;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-table#list th:last-child
-{
-  border-width: 0px 0px 1px 0px;
-}
-
-table#list thead input {
-  font-size: 0.9em;
-  font-weight: bold;
-  border: none;
-  background-color: #b0cde4;
-}
-
 /*====== trees ======*/
-.tree_main
-{
+.tree_main {
   border: solid #7f94a5;
   border-width: 1px 1px 1px 1px;
   padding: 3px;
@@ -402,20 +242,17 @@ table#list thead input {
 }
 
 /*====== news ======*/
-.ab_main
-{
+.ab_main {
   width: 100%;
 }
 
-.ab_left
-{
+.ab_left {
   width: 30.3%;
   min-height: 500px;
   float: left;
 }
 
-.ab_right
-{
+.ab_right {
   width: 69.3%;
   min-height: 500px;
   float: right;
@@ -423,8 +260,7 @@ table#list thead input {
   border-width: 0px;;
 }
 
-#ab_header
-{
+#ab_header {
   font-size: 1em;
   height: 16px;
   padding: 3px;
@@ -433,8 +269,7 @@ table#list thead input {
   border-width: 1px;
 }
 
-#ab_subheader
-{
+#ab_subheader {
   font-size: 0.9em;
   padding: 2px;
   background-color: #b0cde4;
@@ -443,55 +278,46 @@ table#list thead input {
 }
 
 /* ====== rows ====== */
-.td_border
-{
+.td_border {
   border: solid #7f94a5;
   border-width: 1px 0px 1px 0px;
 }
 
-.tr_0
-{
+.tr_0 {
   border: solid #7f94a5;
   border-width: 0px 0px 1px 0px;
   background-color: #F5F5EE;
 }
 
-.tr_1
-{
+.tr_1 {
   border: solid #7f94a5;
   border-width: 0px 0px 1px 0px;
 }
 
-.tr_1:hover, .tr_0:hover
-{
+.tr_1:hover, .tr_0:hover {
  	background-color: #eec;
 }
 
-.tr_select
-{
+.tr_select {
   background-color: #FFFFCC;
 }
 
-.read
-{
+.read {
 }
 
-.unread
-{
+.unread {
   font-weight: bold;
 }
 
 /*====== forms ======*/
-.body-scroll
-{
+.body-scroll {
   background-color: white;
   height: 30em;
   width: auto;
   overflow: auto;
 }
 
-.from-button
-{
+.from-button {
   margin: .8em 0 .8em 0;
   font-size: .8em;
   font-family: verdana, sans-serif;
@@ -500,8 +326,7 @@ table#list thead input {
   text-decoration: none;
 }
 
-input.button
-{
+input.button {
   margin: .2em 0 .1em 0;
   font-size: .8em;
   font-family: verdana, sans-serif;
@@ -540,16 +365,6 @@ input.nolink2 {
   background-color: inherit;
 }
 
-input.nolink4 {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  border: 0px;
-  background-color: #b0cde4;
-}
-
 .nolink_a {
   color: #000;
   background-color: #F0F0F0;
@@ -565,23 +380,6 @@ input.nolink4 {
   color: #4F6C7F;
 }
 
-.navbar {
-  position: absolute;
-  top: 2px;
-  right: 5px;
-}
-
-.button2 {
-  font-size: .8em;
-  font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  padding: 0.1em 1em 0.1em 1em ;
-  border: solid 1px;
-  border-color: #7f94a5;
-  background: #99b3c5;
-}
-
 .pane {
   color: black;
   background-color: #EFEFEF;
@@ -592,24 +390,8 @@ input.nolink4 {
   vertical-align: top;
 }
 
-
-.pane-label
-{
-  font-weight: bold;
-  background-color: #EFEFEF;
-  border: 1px solid #000;
-  border-bottom-width: 0px;
-  border-color: #7f94a5;
-  padding: 2px 10px 2px 10px;
-  position: relative;
-  text-decoration: none;
-  top: -1px;
-  z-index: 100;
-}
-
 /* New */
-.form-header
-{
+.form-header {
   font-size: 13px;
   font-weight: bold;
   margin: 0 0 8px 0;
@@ -619,8 +401,7 @@ input.nolink4 {
   background-color: #b0cde4;
 }
 
-.form-footer
-{
+.form-footer {
   margin: 6px 0px;
   text-align: center;
   border: solid 1px #7f94a5;
@@ -630,36 +411,30 @@ input.nolink4 {
   padding-bottom: 2px;
 }
 
-.form-body
-{
+.form-body {
   width: 100%;
   font-size: 1em;
 }
 
-.form-body td
-{
+.form-body td {
   padding: 2px;
 }
 
-.form-body th
-{
+.form-body th {
   text-align: right;
   padding: 4px;
 }
 
-.td_label
-{
+.td_label {
   text-align: right;
   padding-right: 1em;
 }
 
-.td_simple
-{
+.td_simple {
   border-width: 0px 0px 0px 0px;
 }
 
-.tab_page
-{
+.tab_page {
   font-size: 10pt;
   border-width: 1px 1px 1px 1px;
   background-color: white;
@@ -670,42 +445,17 @@ input.nolink4 {
   height: 100%;
 }
 
-.clear
-{
+.clear {
   width: 100%;
   padding: 0px;
   border-width: 0;
 }
 
-.clear td
-{
+.clear td {
   padding: 0px;
   border-width: 0;
 }
 
-.form-body2
-{
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-  background-color: #EFEFEF;
-}
-
-.form-body2-td
-{
-  padding: 2px;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-.form-body2-th
-{
-  text-align: right;
-  padding: 4px;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
 div.boxHeader {
   background-color: #EFEFEF;
   margin: 0 0 0.5em 0;
@@ -714,79 +464,8 @@ div.boxHeader {
   vertical-align: middle;
 }
 
-/*====== Grids ======*/
-.AB_grid
-{
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-}
-
-.AB_grid tr td {
-  border-bottom: 1px solid #fff;
-}
-
-.ab_grid
-{
-  width: 100%;
-}
-
-.ab_grid tr td {
-  border-bottom: 1px solid #fff;
-}
-
-thead.sortHeader tr
-{
-  background-image: url(../image/stl_blu1_grad.gif);
-  background-repeat: repeat-x;
-}
-
-/* make the TH elements pretty */
-thead.sortHeader tr th
-{
-  font-size: 1em;
-  font-weight: bold;
-  text-align: left;
-  padding: 3px 2px 3px 3px;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-thead.sortHeader tr th.checkbox
-{
-  text-align: center;
-  padding: 0;
-}
-
-thead.sortHeader th:last-child
-{
-  border-width: 0px 0px 1px 0px;
-}
-
-/* make the A elements pretty. makes for nice clickable headers                */
-thead.sortHeader a, thead.sortHeader a:link, thead.sortHeader a:visited
-{
-  color: #000;
-  font-weight: bold;
-  display: block;
-  text-decoration: none;
-  width: 100%
-}
-
-/* make the A elements pretty. makes for nice clickable headers                */
-/* WARNING: swapping the background on hover may cause problems in WinIE 6.x   */
-thead.sortHeader a:hover
-{
-  color: #000;
-  font-weight: bold;
-  display: block;
-  text-decoration: underline;
-  width: 100%
-}
-
-/*====== New forms ======*/
-.new-form-header
-{
+/* New forms */
+.new-form-header {
   font-size: 1.1em;
   font-weight: bold;
   margin: 0 0 6px 0;
@@ -796,8 +475,7 @@ thead.sortHeader a:hover
   background-color: #b0cde4;
 }
 
-.new-form-footer
-{
+.new-form-footer {
   font-size: 1.1em;
   font-weight: bold;
   margin: 6px 0 0 0;
@@ -806,8 +484,7 @@ thead.sortHeader a:hover
   background-color: #b0cde4;
 }
 
-.new-form-body
-{
+.new-form-body {
   font-size: 1em;
   padding: 6px;
   border: solid #7f94a5;
@@ -815,8 +492,7 @@ thead.sortHeader a:hover
   background-color: #EFEFEF;
 }
 
-.new-form-mapping
-{
+.new-form-mapping {
   width: 100%;
   height: 443px;
   overflow: auto;
@@ -824,52 +500,44 @@ thead.sortHeader a:hover
   border-width: 1px 1px 1px 1px;
 }
 
-.new-form-mapping2
-{
+.new-form-mapping2 {
   width: 100%;
   text-align: right;
   border-width: 0px;
 }
 
-.no-border
-{
+.no-border {
   border-width: 0;
 }
 
-.new-form-body table
-{
+.new-form-body table {
   width: 100%;
   background-color: #EFEFEF;
 }
 
-.new-form-body table td
-{
+.new-form-body table td {
   padding: 2px;
 }
 
-.new-form-body table td.text
-{
+.new-form-body table td.text {
   font-style: italic;
   font-weight: bold;
   padding: 2px;
 }
 
-.new-form-body table th
-{
+.new-form-body table th {
   text-align: right;
   white-space: nowrap;
   padding: 4px;
 }
 
-td.new-section
-{
+td.new-section {
   text-align: center;
   font-weight: bold;
   background-color: #B0CDE4;
 }
 
-.text
-{
+.text {
   font-style: italic;
   font-weight: bold;
   padding: 2px;
@@ -965,33 +633,8 @@ a.tab.activeTab2 {
   background-color: #FFF;
 }
 
-/*====== Toolbars ======*/
-div.toolbar {
-}
-
-img.toolbar
-{
-  display: block;
-  float: left;
-  margin-top: 10px;
-  background-color: #7F94A5;
-}
-
-a.toolbar
-{
-  display: block;
-  float: left;
-  width: 70px;
-  padding: 10px 0 10px 0;
-  color: #4F56A6;
-  font-weight: bold;
-  font-size: 12px;
-  text-decoration: none;
-  text-align: center;
-}
-
-span.toolbar
-{
+/* Toolbars */
+span.toolbar {
   display: block;
   float: left;
   width: 70px;
@@ -1003,60 +646,25 @@ span.toolbar
   text-align: center;
 }
 
-span.toolbarLabel
-{
+span.toolbarLabel {
   font-size: 0.8em;
 }
 
-/* Popup Calendar */
-.calendar {
-	border: 1px solid #000;
-	background-color: #FFF;
-  z-index: 101;
-}
-
-.calendar_year, .calendar_month {
-	text-align: center;
-	border-bottom: 1px solid #aaa;
-	padding: 2px 0px;
-}
-
-.calendar table {
-	margin-top: 2px;
-}
-
-.calendar thead {
-	font-weight: bold;
-}
-
-.calendar thead td {
-	padding: 0px 2px;
-}
-
-.calendar td {
-	font-size: 75%;
-	text-align: center;
-}
-
-td.calendar_selected {
-	background-color: #faa;
-}
-
-.calendar_special {
-	color: #c55;
+img.toolbar {
+  display: block;
+  float: left;
+  margin-top: 10px;
+  background-color: #7F94A5;
 }
 
-/*-------------- panelbar -----------------*/
-
-.panelbar
-{
+/* panelbar */
+.panelbar {
   width: 100%;
   height: 100%;
 	border: 1px solid #7f94a5;
 }
 
-.panelbar_option
-{
+.panelbar_option {
 	font-weight: bold;
 	padding: 3px;
 	height: 16px;
@@ -1064,58 +672,36 @@ td.calendar_selected {
 	cursor: pointer;
 }
 
-div.panelbar_option:hover
-{
+div.panelbar_option: hover {
 	background-color: #bce;
 }
 
-.panelbar_option_upper
-{
+.panelbar_option_upper {
 	border-bottom: 1px solid #7f94a5;
 }
 
-.panelbar_option_lower
-{
+.panelbar_option_lower {
 	border-top: 1px solid #7f94a5;
 }
 
-.panelbar_content
-{
+.panelbar_content {
 	background-color: #fff;
   overflow: auto;
 }
 
-/* ComboList */
-.combo_list_list {
-  background-color: white;
-  border: 1px solid black;
-  padding: 5px 10px 5px 10px;
-  height: 100px;
-  width: 200px;
-  overflow: auto;
-}
-
-.combo_list_option:hover {
-  background-color: #bce;
-  color: white;
-}
-
 /* Comments */
-div.cm_node_top
-{
+div.cm_node_top {
   padding-left: 1em;
   margin-left: 0px;
 }
 
-div.cm_node
-{
+div.cm_node {
   padding-left: 1em;
   margin-left: 0px;
   border-left: 2px #e0e0e0 solid;
 }
 
-div.comment-section
-{
+div.comment-section {
   padding: 0 0px 0 2px;
   font-size: 1.1em;
   font-weight: bold;
@@ -1124,25 +710,21 @@ div.comment-section
   background-color: #b0cde4;
 }
 
-div.comment
-{
+div.comment {
   margin-top: 5px;
 }
 
-div.comment-footer
-{
+div.comment-footer {
   margin: 1px;
   color: gray;
 }
 
-div.comment-header
-{
+div.comment-header {
   border-bottom: 1px #cccccc solid;
   font-size: 1.1em;
 }
 
-div.comment-button
-{
+div.comment-button {
   margin: 1px;
   padding-top: 5px;
   border-top: 1px #cccccc solid;
diff --git a/appsrc/ODS-Addressbook/www/error.vspx b/appsrc/ODS-Addressbook/www/error.vspx
index 8824500..4eacb95 100644
--- a/appsrc/ODS-Addressbook/www/error.vspx
+++ b/appsrc/ODS-Addressbook/www/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: error.vspx,v 1.3.2.2 2010/09/20 10:14:40 source Exp $
+  -  $Id: error.vspx,v 1.3.2.3 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/www/export.vspx b/appsrc/ODS-Addressbook/www/export.vspx
index fe1b7ae..c409e74 100644
--- a/appsrc/ODS-Addressbook/www/export.vspx
+++ b/appsrc/ODS-Addressbook/www/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: export.vspx,v 1.5.2.4 2010/10/07 13:24:45 source Exp $
+  -  $Id: export.vspx,v 1.5.2.5 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/www/gems.vsp b/appsrc/ODS-Addressbook/www/gems.vsp
index ba2e53f..b8e4a49 100644
--- a/appsrc/ODS-Addressbook/www/gems.vsp
+++ b/appsrc/ODS-Addressbook/www/gems.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: gems.vsp,v 1.1.2.3 2010/10/07 13:24:46 source Exp $
+--  $Id: gems.vsp,v 1.1.2.4 2012/03/08 10:46:12 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/www/home.vspx b/appsrc/ODS-Addressbook/www/home.vspx
index 8154d5b..7588175 100644
--- a/appsrc/ODS-Addressbook/www/home.vspx
+++ b/appsrc/ODS-Addressbook/www/home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: home.vspx,v 1.58.2.25 2011/03/23 12:17:57 source Exp $
+ -  $Id: home.vspx,v 1.58.2.31 2012/03/08 12:08:39 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,6 +24,21 @@
 -->
 <v:page name="ab" decor="template/template.vspx" style="template/template.xsl" fast-render="1" button-anchors="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+  <v:method name="sortChange" arglist="in columnName varchar">
+    <![CDATA[
+      if (columnName = '')
+        return;
+      self.ds.vc_reset ();
+      if (self.v_order = columnName)
+      {
+        self.v_direction := either (equ (self.v_direction, 'asc'), 'desc', 'asc');
+      } else {
+        self.v_direction := 'asc';
+      }
+      self.v_order := columnName;
+    ]]>
+  </v:method>
+
   <v:method name="mode_test" arglist="">
     <![CDATA[
       declare pos integer;
@@ -36,7 +51,7 @@
         self.v_id := atoi(self.abContact);
         if (self.v_id = -1)
         {
-          if (self.account_rights = 'W')
+          if (self.person_rights = 'W')
           {
             self.abAction := 'create';
             self.v_name := trim (get_keyword ('name', params, ''));
@@ -78,11 +93,11 @@
 
   <v:method name="toolbarEnable" arglist="in cmd varchar">
     <![CDATA[
-      if ((cmd = 'create') and ((self.account_rights <> 'W') or (self.abScope = 'MySharedContacts')))
+      if ((cmd = 'create') and ((self.person_rights <> 'W') or (self.abScope = 'MySharedContacts')))
         return 0;
-      if ((cmd = 'import') and ((self.account_rights <> 'W') or (self.abScope = 'MySharedContacts')))
+      if ((cmd = 'import') and ((self.person_rights <> 'W') or (self.abScope = 'MySharedContacts')))
         return 0;
-      if ((cmd = 'export') and ((self.account_rights <> 'W') or (self.abScope = 'MySharedContacts')))
+      if ((cmd = 'export') and ((self.person_rights <> 'W') or (self.abScope = 'MySharedContacts')))
         return 0;
       return 1;
     ]]>
@@ -166,7 +181,7 @@
       -- value
       if (fProperty = 'description')
          {
-        F := '<pre>' || AB.WA.utf2wide (cast (fValue as varchar)) || '</pre>';
+        F := '<pre style="margin: 0; white-space: pre-wrap;">' || AB.WA.utf2wide (cast (fValue as varchar)) || '</pre>';
       }
       else if (internal_type (fValue) = 211)
            {
@@ -232,7 +247,7 @@
          {
            http (' ');
          } else {
-           http (sprintf ('<img class="photo" src="%s"/>', fValue));
+        http (sprintf ('<img class="resize" src="%s" />', fValue));
          }
     ]]>
   </v:method>
@@ -428,7 +443,7 @@
 
   <v:method name="windowOpen" arglist="in p_url varchar, in p_name varchar, in p_title varchar">
     <![CDATA[
-      return  sprintf ('<span onclick="javascript: window.open (\'%s\', \'addressbook_%s_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=600, width=800\'); return false;" title="%s %s" class="link">%s</span>', AB.WA.url_fix (sprintf ('%s%s', AB.WA.ab_url (self.domain_id), p_url), self.sid, self.realm), p_name, p_name, p_title, p_name);
+      return  sprintf ('<span onclick="javascript: windowShow (\'%s\', \'addressbook_%s_window\'); return false;" title="%s %s" class="link">%s</span>', AB.WA.page_url (self.domain_id, p_url, self.sid, self.realm), p_name, p_name, p_title, p_name);
     ]]>
   </v:method>
 
@@ -486,6 +501,9 @@
       AddressBook
     </vm:header>
     <vm:variables>
+      <v:variable name="v_order" type="varchar" default="'P_NAME'" />
+      <v:variable name="v_direction" type="varchar" default="'asc'" />
+
       <v:variable persist="0" name="abAction" type="varchar" param-name="action" default="'browse'" />
       <v:variable persist="0" name="abSubAction" type="varchar" default="''" />
       <v:variable persist="0" name="abSelected" type="any" default="null" />
@@ -623,7 +641,7 @@
             self.abSubAction := '';
             self.abValue := '';
           }
-          if ((self.account_rights <> 'W') and (self.abAction = 'settings'))
+          if ((self.person_rights <> 'W') and (self.abAction = 'settings'))
             self.abAction := 'browse';
             
           self.mode_test();
@@ -1107,7 +1125,7 @@
                         if (not is_empty_or_null (cast (self.abValue as integer)))
                           AB.WA.xml_set('category', data, self.abValue);
                       }
-                        control.ds_sql := AB.WA.search_sql (self.domain_id, self.account_id, self.account_rights, data);
+                        control.ds_sql := AB.WA.search_sql (self.domain_id, self.account_id, self.person_rights, data);
                     }
                     else if (self.abScope = 'MySharedContacts')
                     {
@@ -1146,6 +1164,8 @@
                     }
                   }
 
+                      self.sortChange (get_keyword ('sortColumn', params, ''));
+                      control.ds_sql := concat (control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
                   control.ds_nrows := AB.WA.settings_rows (self.settings);
                   control.ds_parameters := vector ();
                 ]]>
@@ -1158,17 +1178,15 @@
             <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
 
               <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom" >
-                <table id="contacts" class="ab_grid" cellspacing="0">
-                  <thead class="sortHeader">
+                    <table class="ODS_grid" style="border: 0px;">
+                      <thead>
                     <tr>
-                          <v:template name="t2" type="simple" enabled="--case when ((self.account_rights <> 'W') or (self.abScope = 'MySharedContacts')) then 0 else 1 end">
-                        <th class="checkbox" width="1%">
+                          <v:template name="t2" type="simple" enabled="--case when ((self.person_rights <> 'W') or (self.abScope = 'MySharedContacts')) then 0 else 1 end">
+                            <th class="checkbox">
                           <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                         </th>
                       </v:template>
-                          <th>
-                        Name
-                      </th>
+                          <?vsp http (DB.DBA.wa_show_column_header ('Name', 'P_NAME', self.v_order, self.v_direction)); ?>
                     </tr>
                   </thead>
                 </table>
@@ -1182,20 +1200,15 @@
                         declare permissions any;
 
                         id := (control as vspx_row_template).te_column_value('P_ID');
-                        permissions := AB.WA.contact_rights (self.domain_id, id, self.account_rights);
+                        permissions := AB.WA.contact_rights (self.domain_id, id, self.account_rights, self.person_rights);
                       ?>
                   <table>
                     <tr>
-                          <vm:if test="(self.account_rights = 'W') and (self.abScope <> 'MySharedContacts')">
-                        <td align="center" valign="top">
+                          <vm:if test="(self.person_rights = 'W') and (self.abScope <> 'MySharedContacts')">
+                            <td class="checkbox" valign="top">
                           <?vsp
                                 if (permissions = 'W')
-                                {
-                            declare S varchar;
-
-                                  S := case when (self.abContact = id) then 'checked="checked"' else '' end;
-                                  http (sprintf ('<input type="checkbox" name="cb_item" value="%d" %s onclick="selectCheck(this, \'cb_item\')" />', id, S));
-                                }
+                                  http (sprintf ('<input type="checkbox" name="cb_item" value="%d" %s onclick="selectCheck(this, \'cb_item\')" />', id, case when (self.abContact = id) then 'checked="checked"' else '' end));
                           ?>
                         </td>
                           </vm:if>
@@ -1263,7 +1276,6 @@
               </div>
             <script type="text/javascript">
               <![CDATA[
-                coloriseTable('contacts');
                   exchangeHTML();
 
                 var objForm = document.forms['F1'];
@@ -1369,7 +1381,7 @@
                   </th>
                   <td>
                     <v:text name="s_grants" null-value="--''" value="--self.v_grants" xhtml_class="textbox" xhtml_size="60" xhtml_title="User names must be comma delimited!" />
-                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?form=F1&dst=mc&params=s_grants:s1;',520)" class="button" />
+                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?dst=mc&params=s_grants:s1;&nrows=<?V AB.WA.settings_rows (self.settings) ?>')" class="button" />
                     <input type="button" value="Clear" onclick="javascript: document.F1.elements['s_grants'].value = ''" class="button" />
                   </td>
                 </tr>
@@ -1543,6 +1555,7 @@
                    where P_ID = self.v_id;
                   self.v_grants := self.shareSelect (self.v_id);
                     self.v_photo_preview_path := '';
+                    self.rdf_iri := SIOC..addressbook_contact_iri (self.domain_id, self.v_id);
                 }
                 _end:;
               ]]>
@@ -1761,17 +1774,17 @@
                         <th valign="top">
                           <label for="ab_interests">Topic of interest</label>
                         </th>
-                        <td>
+                        <td style="padding-left: 0;">
                           <table>
                             <tr>
-                              <td style="width: 40em; background-color: white;">
-                                <table id="a_tbl" width="100%" cellspacing="0">
-                                  <thead class="sortHeader">
+                              <td style="padding: 0; width: 600px; background-color: white;">
+                                <table id="a_tbl" class="ODS_grid">
+                                  <thead>
                                     <tr>
-                                      <th>URL</th>
-                                      <th>Label</th>
+                                      <th width="50%">URL</th>
+                                      <th width="50%">Label</th>
                                       <vm:if test="self.abAction <> 'view'">
-                                        <th width="50px">Action</th>
+                                        <th class="action">Action</th>
                                       </vm:if>
                                     </tr>
                                   </thead>
@@ -2460,13 +2473,13 @@
                     <table class="form-body" cellspacing="0">
                       <tr>
                         <td style="width: 60em; background-color: white;">
-                          <table id="b_tbl" width="100%" cellspacing="0">
-                            <thead class="sortHeader">
+                          <table id="b_tbl" class="ODS_grid">
+                            <thead>
                               <tr>
                                 <th width="50%">Relationship</th>
                                 <th width="50%">URI</th>
                                 <vm:if test="self.abAction <> 'view'">
-                                  <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                                 </vm:if>
                               </tr>
                             </thead>
@@ -2507,11 +2520,11 @@
                       <table class="form-body" cellspacing="0">
                         <tr>
                           <td style="width: 90%; background-color: white;">
-                            <table id="f_tbl" width="100%" cellspacing="0">
-                              <thead class="sortHeader">
+                            <table id="f_tbl" class="ODS_grid">
+                              <thead>
                                 <tr>
                                   <th width="100%">Value</th>
-                                  <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                                 </tr>
                               </thead>
                         		  <![CDATA[
@@ -2551,13 +2564,13 @@
                     <table class="form-body" cellspacing="0">
                       <tr>
                         <td style="width: 90%; background-color: white;">
-                          <table id="s_tbl" width="100%" cellspacing="0">
-                            <thead class="sortHeader">
+                            <table id="s_tbl" class="ODS_grid">
+                              <thead>
                               <tr>
                                 <th width="15%">Type</th>
                                 <th>Value</th>
                                 <th width="1%" nowrap="nowrap">ACL: (R)ead, (W)rite</th>
-                                  <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                               </tr>
                             </thead>
                       		  <![CDATA[
@@ -2932,7 +2945,7 @@
                   ]]>
                 </v:on-post>
               </v:button>
-                <v:button action="simple" name="ab_edit" value="Edit" enabled="--case when (AB.WA.contact_rights (self.domain_id, self.v_id, self.account_rights) = 'W') and (self.abAction = 'view') then 1 else 0 end" xhtml_class="form-button">
+                <v:button action="simple" name="ab_edit" value="Edit" enabled="--case when (AB.WA.contact_rights (self.domain_id, self.v_id, self.account_rights, self.person_rights) = 'W') and (self.abAction = 'view') then 1 else 0 end" xhtml_class="form-button">
                   <v:on-post>
                     <![CDATA[
                       self.abAction := 'edit';
@@ -3497,7 +3510,7 @@
                           self.i_number := AB.WA.import_count (self.i_type, self.i_data);
                         }
                         if (self.i_number = 0)
-                          signal ('TEST', 'No persons founded!<>');
+                          signal ('TEST', 'Import target data not found!<>');
 
                         -- next step
                       if (self.i_type = 0)
@@ -3535,20 +3548,20 @@
               </div>
 
               <div class="new-form-mapping">
-                  <table id="foaf" class="AB_grid" style="border-width: 0" cellspacing="0">
-                  <thead class="sortHeader">
+                  <table class="ODS_grid" style="border: 0px">
+                    <thead>
                     <tr>
-                      <th class="checkbox" width="1%">
-                        <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
+                        <th class="checkbox">
+                          <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item', true)" />
                       </th>
                       <th>Name</th>
                       <th>Mail</th>
                       <th>Comment</th>
-                        <th class="checkbox last-child" width="1%" style="border-width: 0px 0px 1px 0px;">
+                        <th class="checkbox last-child" style="border-width: 0px 0px 1px 0px;">
                           <input type="checkbox" name="cb_all_ping" value="Select All" onclick="selectAllCheckboxes(this, 'cb_ping')" />
                         </th>
-                        <th width="1%">Ping</th>
-                        <th width="1%">Action</th>
+                        <th class="action">Ping</th>
+                        <th class="action">Action</th>
                     </tr>
                   </thead>
                 <?vsp
@@ -3556,10 +3569,10 @@
                     {
                 ?>
                     <tr class="<?V case when (item[0] = 1) then 'tr_select' else '' end ?>">
-              		  <td width="1%">
+                      <td class="checkbox">
                       <?vsp
                           if (item[0] = 0)
-                            http (sprintf ('<input type="checkbox" name="cb_item" value="%s" onclick="selectCheck(this, \'cb_item\')" />', item[1]));
+                            http (sprintf ('<input type="checkbox" name="cb_item" value="%s" onclick="selectCheck(this, \'cb_item\', true)" />', item[1]));
                       ?>
               		  </td>
               		  <td>
@@ -3595,11 +3608,6 @@
                 ?>
                 </table>
               </div>
-              <script>
-                <![CDATA[
-                  coloriseTable('foaf');
-                ]]>
-              </script>
 
               <div class="new-form-footer">
                   <v:button action="simple" name="i3_back" value="Back" xhtml_class="form-button">
@@ -3660,8 +3668,8 @@
 	            </div>
 	            <div class="new-form-mapping">
               <vm:if test="self.i_type = 2">
-                    <table id="ldap" class="AB_grid" style="border-width: 0" cellspacing="0">
-                  <thead class="sortHeader">
+                    <table class="ODS_grid" style="border: 0px">
+                      <thead>
                     <tr>
                       <th>CSV Column</th>
                       <th>Contact Property</th>
@@ -3697,8 +3705,8 @@
                 </table>
               </vm:if>
               <vm:if test="self.i_type = 3">
-                    <table id="ldap" class="AB_grid" style="border-width: 0" cellspacing="0">
-                  <thead class="sortHeader">
+                    <table id="ldap" class="ODS_grid" style="border: 0px">
+                      <thead>
                     <tr>
                       <th>LDAP Property</th>
                       <th>Contact Property</th>
@@ -3919,12 +3927,12 @@
                           <legend><b>ODS users</b></legend>
                           <table class="form-body" cellspacing="0">
                             <tr>
-                              <td style="width: 95%; background-color: white;">
-                                <table id="f_tbl" width="100%" cellspacing="0">
-                                  <thead class="sortHeader">
+                              <td style="width: 90%; background-color: white;">
+                                <table id="f_tbl" class="ODS_grid">
+                                  <thead>
                                     <tr>
                                       <th width="100%">Value</th>
-                                      <th width="50px">Action</th>
+                                      <th class="action">Action</th>
                                     </tr>
                                   </thead>
                                   <tr id="f_tr_no"><td colspan="2"><b>No Shares</b></td></tr>
@@ -3940,9 +3948,9 @@
                           <legend><b>WebID users</b></legend>
                           <table class="form-body" cellspacing="0">
                             <tr>
-                              <td style="width: 95%; background-color: white;">
-                                <table id="s_tbl" width="100%" cellspacing="0">
-                                  <thead class="sortHeader">
+                              <td style="width: 90%; background-color: white;">
+                                <table id="s_tbl" class="ODS_grid">
+                                  <thead>
                                     <tr>
                                       <th width="15%">Type</th>
                                       <th>Value</th>
@@ -4011,7 +4019,7 @@
                               declare N, M integer;
                             declare data, fields any;
 
-                            data := coalesce ((select deserialize (LV_FIELDS) from LDAP..LDAP_VALIDATION where LV_USER_ID = self.account_id), vector());
+                              data := coalesce ((select deserialize (LV_FIELDS) from LDAP..LDAP_VALIDATION where LV_USER_ID = self.account_id), vector('P_NAME', '1'));
                             fields := LDAP..contact_fields ();
                               M := length (fields) / 2;
                               for (N := 0; N < M; N := N + 2)
@@ -4548,12 +4556,13 @@
                       ]]>
                     </v:on-post>
                   </v:button>
-                  <v:button action="simple" value="Clear" xhtml_class="form-button">
+                  <v:button action="simple" value="Clear" xhtml_onclick="javascript: return confirm (\'Do you want to reset settings to default?\');" xhtml_class="form-button">
                     <v:on-post>
                       <![CDATA[
                         delete from AB.WA.SETTINGS where S_ACCOUNT_ID = self.account_id;
                         AB.WA.nntp_update (self.domain_id, null, null, 1, 0);
 
+                        self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), AB.WA.settings (self.domain_id));
                         self.vc_data_bind(e);
                       ]]>
                     </v:on-post>
@@ -4587,14 +4596,14 @@
                   <v:param name="p0" value="--self.domain_id" />
 
                   <v:template name="ds_categories_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                    <table id="categoriesTable" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                      <thead class="sortHeader">
+                    <table id="categoriesTable" class="ODS_grid">
+                      <thead>
                         <tr>
-                          <th class="checkbox" width="1%">
+                          <th class="checkbox">
                             <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                           </th>
-                          <th style="text-align: left;">Name</th>
-                          <th style="text-align: left;" width="5%">Action</th>
+                          <th>Name</th>
+                          <th class="action">Action</th>
                         </tr>
                       </thead>
                     </table>
@@ -4612,13 +4621,13 @@
                     <v:template name="ds_categories_browse" type="browse" name-to-remove="table" set-to-remove="both">
                       <table>
                         <tr>
-                          <td align="center" valign="top">
+                          <td class="checkbox">
                             <input type="checkbox" name="cb_item" value="<?V (control as vspx_row_template).te_column_value('C_ID') ?>" onclick="selectCheck(this, 'cb_item')" />
                           </td>
                           <td nowrap="nowrap">
                             <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('C_NAME')" />
                           </td>
-                          <td nowrap="nowrap">
+                          <td class="action">
                             <v:button value="Edit" action="simple" xhtml_class="button">
                               <v:on-post>
                                 <![CDATA[
@@ -4799,16 +4808,16 @@
 
                 <v:data-set name="ds_exchanges" data-source="self.dsrc_exchanges" scrollable="1">
                   <v:template name="ds_exchanges_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                    <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                      <thead class="sortHeader">
+                    <table id="preferences" class="ODS_grid">
+                      <thead>
                         <tr>
-                          <th class="checkbox" width="1%">
+                          <th class="checkbox">
                             <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                           </th>
-                          <th style="text-align: left;">Name</th>
-                          <th style="text-align: left;" width="5%" nowrap="nowrap">Executed On</th>
-                          <th style="text-align: left;" width="5%" nowrap="nowrap">Status</th>
-                          <th style="text-align: left;" width="5%" nowrap="nowrap">Action</th>
+                          <th>Name</th>
+                          <th width="5%" nowrap="nowrap">Executed On</th>
+                          <th width="5%" nowrap="nowrap">Status</th>
+                          <th class="action">Action</th>
                         </tr>
                       </thead>
                     </table>
@@ -5076,14 +5085,12 @@
                       </th>
                       <td>
                         <v:text name="exc_options_name" xhtml_id="exc_options_name" value="--get_keyword ('name', self.ve_options)" xhtml_size="60" />
-                        <vm:if test="self.abSubAction not in ('syncmlCreate', 'syncmlUpdate')">
-                          <input type="button" id="exc_options_name_button" value="Browse..." onclick="davBrowse ('exc_options_name');" style="display: <?V case when (get_keyword ('type', self.ve_options, 1) <> 1) then 'none' else '' end ?>" />
+                        <input type="button" id="exc_options_name_button" value="Browse..." onclick="davBrowse ('exc_options_name', <?V case when (self.abSubAction in ('syncmlCreate', 'syncmlUpdate')) then 'true' else 'false' end ?>);" style="display: <?V case when (get_keyword ('type', self.ve_options, 1) <> 1) then 'none' else '' end ?>" />
                             <![CDATA[
                     		    <script type="text/javascript">
                               OAT.Loader.load(['dav'], function(){OAT.WebDav.init(davOptions);});
                     		    </script>
                             ]]>
-                        </vm:if>
                       </td>
                     </tr>
                     <tr>
@@ -5091,7 +5098,7 @@
                         User
                       </th>
                       <td>
-                        <v:text name="exc_options_user" value="--get_keyword ('user', self.ve_options)" />
+                        <v:text name="exc_options_user" value="--get_keyword ('user', self.ve_options)" null-value="''" />
                       </td>
                     </tr>
                     <tr>
@@ -5099,7 +5106,7 @@
                         Password
                       </th>
                       <td>
-                        <v:text name="exc_options_password" type="password"  value="--get_keyword ('password', self.ve_options)" />
+                        <v:text name="exc_options_password" type="password"  value="--get_keyword ('password', self.ve_options)" null-value="''" />
                       </td>
                     </tr>
                     <tr>
@@ -5363,7 +5370,7 @@
                   </table>
                 </div>
                 <div class="new-form-footer">
-                  <v:button action="simple" value="Sync" name="exc_sync_exec" xhtml_class="form-button">
+                  <v:button action="simple" value="--case when isnull (self.ve_result) then 'Sync' else 'New Sync' end" name="exc_sync_exec" xhtml_class="form-button">
                     <v:on-post>
                       <![CDATA[
                         declare _mode any;
@@ -5375,7 +5382,7 @@
                       ]]>
                     </v:on-post>
                   </v:button>
-                  <v:button action="simple" value="Cancel" name="exc_sync_cancel" xhtml_class="form-button">
+                  <v:button action="simple" value="--case when isnull (self.ve_result) then 'Cancel' else 'Exit' end" name="exc_sync_cancel" xhtml_class="form-button">
                     <v:on-post>
                       <![CDATA[
                         self.abSubAction := 'syncmlBrowse';
diff --git a/appsrc/ODS-Addressbook/www/invite.vspx b/appsrc/ODS-Addressbook/www/invite.vspx
index d5c2b73..02fbf88 100644
--- a/appsrc/ODS-Addressbook/www/invite.vspx
+++ b/appsrc/ODS-Addressbook/www/invite.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: invite.vspx,v 1.3.2.1 2010/09/20 10:14:41 source Exp $
+ -  $Id: invite.vspx,v 1.3.2.2 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/www/js/ab.js b/appsrc/ODS-Addressbook/www/js/ab.js
index 337c362..55898ef 100644
--- a/appsrc/ODS-Addressbook/www/js/ab.js
+++ b/appsrc/ODS-Addressbook/www/js/ab.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -37,6 +37,13 @@ function urlParam(fldName)
   return '';
 }
 
+function myA(obj) {
+  if (obj.href) {
+    document.location = obj.href + '?' + urlParam('sid') + urlParam('realm');
+    return false;
+  }
+}
+
 function myPost(frm_name, fld_name, fld_value) {
   createHidden(frm_name, fld_name, fld_value);
   document.forms[frm_name].submit();
@@ -61,6 +68,19 @@ function vspxPost(fButton, fName, fValue, f2Name, f2Value, f3Name, f3Value) {
   doPost ('F1', fButton);
 }
 
+function odsPost(obj, fields, button) {
+  var form = getParent (obj, 'form');
+  var formName = form.name;
+  for (var i = 0; i < fields.length; i += 2)
+    createHidden(formName, fields[i], fields[i+1]);
+
+  if (button) {
+    doPost(formName, button);
+  } else {
+    form.submit();
+  }
+}
+
 function toolbarPost(fValue) {
   vspxPost('command', 'select', fValue);
 }
@@ -178,8 +198,10 @@ function confirmAction(confirmMsq, form, txt, selectionMsq) {
   return false;
 }
 
-function selectCheck(obj, prefix) {
+function selectCheck(obj, prefix, noToolbars) {
   coloriseRow(getParent(obj, 'tr'), obj.checked);
+  if (noToolbars)
+    return;
   enableToolbars(obj.form, prefix);
 }
 
@@ -207,7 +229,7 @@ function enableElement(id, id_gray, showFlag) {
 }
 }
 
-function selectAllCheckboxes (obj, prefix) {
+function selectAllCheckboxes(obj, prefix, noToolbars) {
   var objForm = obj.form;
   for (var i = 0; i < objForm.elements.length; i++) {
     var o = objForm.elements[i];
@@ -219,12 +241,15 @@ function selectAllCheckboxes (obj, prefix) {
       coloriseRow(getParent(o, 'tr'), o.checked);
     }
   }
+  obj.focus();
   if (obj.value == 'Select All')
     obj.value = 'Unselect All';
   else
     obj.value = 'Select All';
-  selectCheck (obj, prefix);
-  obj.focus();
+
+  if (noToolbars)
+    return;
+  enableToolbars(objForm, prefix);
 }
 
 function anySelected (form, txt, selectionMsq) {
@@ -288,13 +313,18 @@ function showTab(tabs, tabsCount, tabNo) {
   }
 }
 
-function windowShow(sPage, width, height) {
-	if (!width)
-		width = 520;
-	if (!height)
-    height = 420;
-	sPage += urlParam('sid') + urlParam('realm');
-	win = window.open(sPage, null, "width="+width+",height="+height+", top=100, left=100, scrollbars=yes, resize=yes, menubar=no");
+function windowShow(sPage, sPageName, width, height) {
+	if (width == null)
+		width = 700;
+	if (height == null)
+		height = 500;
+  if (sPage.indexOf('form=') == -1)
+    sPage += '&form=F1';
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
 
@@ -516,8 +546,17 @@ function updateGeodata(mode) {
 	OAT.AJAX.GET(S, '', function(arg) {cb(arg, mode);});
 }
 
-function davBrowse(fld) {
-	var options = {mode: 'browser', onConfirmClick: function(path, fname) {$(fld).value = path + fname;}};
+function davBrowse(fld, folders) {
+	/* load stylesheets */
+	OAT.Style.include("grid.css");
+	OAT.Style.include("webdav.css");
+
+  var options = {
+    mode: 'browser',
+    onConfirmClick: function(path, fname) {$(fld).value = '/DAV' + path + fname;}
+  };
+  if (!folders) {folders = false;}
+  OAT.WebDav.options.foldersOnly = folders;
   OAT.WebDav.open(options);
 }
 
@@ -666,7 +705,9 @@ function checkState()
     } else {
       progressTimer = null;
       progressPollTimer = null;
-      $('btn_Stop').click();
+      $('btn_Stop').value = 'Close';
+      OAT.Dom.hide('btn_Background');
+      doPost ('F1', 'btn_Background');
     }
   }
   OAT.AJAX.POST('ajax.vsp', "a=load&sa=state&id="+progressID+urlParam("sid")+urlParam("realm"), x);
@@ -843,20 +884,12 @@ AB.setFOAFValue = function(fValue, fName) {
 
 AB.aboutDialog = function() {
   var aboutDiv = $('aboutDiv');
-	if (aboutDiv) {
+  if (aboutDiv)
 		OAT.Dom.unlink(aboutDiv);
-	}
-	aboutDiv = OAT.Dom.create('div', {
-		width : '430px',
-		height : '150px'
-	});
+
+  aboutDiv = OAT.Dom.create('div', {height: '160px', overflow: 'hidden'});
   aboutDiv.id = 'aboutDiv';
-	aboutDialog = new OAT.Dialog('About ODS AddressBook', aboutDiv, {
-		width : 445,
-		buttons : 0,
-		resize : 0,
-		modal : 1
-	});
+  aboutDialog = new OAT.Dialog('About ODS AddressBook', aboutDiv, {width:445, buttons: 0, resize:0, modal:1});
 	aboutDialog.cancel = aboutDialog.hide;
 
   var x = function (txt) {
diff --git a/appsrc/ODS-Addressbook/www/js/conversation.js b/appsrc/ODS-Addressbook/www/js/conversation.js
deleted file mode 100644
index 8cc7670..0000000
--- a/appsrc/ODS-Addressbook/www/js/conversation.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2009 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
-*/
-// ---------------------------------------------------------------------------
-var CNV = new Object();
-CNV.page = new Object();
-
-CNV.fromLabels = {
-  "openid": "Openid",
-  "facebook": "Facebook"
-}
-
-CNV.fromMenu = function (obj)
-{
-  if (!CNV.fm)
-  {
-    CNV.fm = OAT.Dom.create("div", {width: "120px", display: "none"});
-    CNV.fm.className = "cnv-menu";
-    if (CNV.fromLabels)
-    for (var i in CNV.fromLabels)
-    {
-      var item = OAT.Dom.create("div");
-      item.className = "cnv-menuItem";
-      var label = OAT.Dom.create("label");
-      var ch = OAT.Dom.create("input");
-			ch.id = "cb_" + i;
-			ch.type = "checkbox";
-			var cbAction = function (){CNV.fromAction(this);};
-			OAT.Event.attach(ch, "click", cbAction);
-			label.appendChild(ch);
-			label.appendChild(OAT.Dom.text(CNV.fromLabels[i]));
-			item.appendChild(label);
-      CNV.fm.appendChild(item);
-    }
-    document.body.appendChild(CNV.fm);
-  }
-  if (CNV.fm.style.display == "none")
-  {
-		var coords = OAT.Dom.position(obj);
-		var dims = OAT.Dom.getWH(obj);
-		CNV.fm.style.left = (coords[0]) +"px";
-		CNV.fm.style.top = (coords[1]+dims[1]+5)+"px";
-    OAT.Dom.show(CNV.fm);
-  } else {
-    OAT.Dom.hide(CNV.fm);
-  }
-}
-
-CNV.fromAction = function (obj)
-{
-  OAT.Dom.hide(CNV.fm);
-  //if (!obj.checked)
-  //  return;
-
-  var mode = obj.id.replace('cb_', '');
-  var formDiv = $('formDiv');
-  if (formDiv) {OAT.Dom.unlink(formDiv);}
-
-  var dx;
-  if (!dx) {dx = '400';}
-  var dy;
-  if (!dy) {dy = '145';}
-  formDiv = OAT.Dom.create('div', {width:dx+'px', height:dy+'px'});
-  formDiv.id = 'formDiv';
-  formDialog = new OAT.Dialog('', formDiv, {width:parseInt(dx)+20, buttons: 0, resize: 0, modal: 1, onhide: function(){return false;}});
-  formDialog.cancel = formDialog.hide;
-  var s = 'conversation-login.vsp?mode='+mode;
-  formDiv.innerHTML = '<iframe id="forms_iframe" src="'+s+'" width="100%" height="100%" frameborder="0" scrolling="auto" hspace="0" vspace="0" marginwidth="0" marginheight="0"></iframe>';
-  formDialog.show();
-}
-
-CNV.fromClose = function ()
-{
-  parent.formDialog.hide ();
-}
-
-CNV.writeCookie = function (name, value, hours)
-{
-  if (hours)
-  {
-    var date = new Date ();
-    date.setTime (date.getTime () + (hours * 60 * 60 * 1000));
-    var expires = "; expires=" + date.toGMTString ();
-  } else {
-    var expires = "";
-  }
-  document.cookie = name + "=" + value + expires + "; path=/";
-}
-
-CNV.readCookie = function (name)
-{
-  var cookiesArr = document.cookie.split (';');
-  for (var i = 0; i < cookiesArr.length; i++)
-  {
-    cookiesArr[i] = cookiesArr[i].trim ();
-    if (cookiesArr[i].indexOf (name+'=') == 0)
-      return cookiesArr[i].substring (name.length + 1, cookiesArr[i].length);
-  }
-  return false;
-}
-
-CNV.initState = function (state)
-{
-  // init cookie data
-  if (!state)
-    var state = new Object();
-  return state;
-}
-
-CNV.loadState = function ()
-{
-  // load cookie data
-  var s = CNV.readCookie('CNV_State');
-  if (s)
-  {
-    try {
-      s = OAT.JSON.parse(unescape(s));
-    } catch (e) { s = null; }
-    s = CNV.initState(s);
-  } else {
-    s = CNV.initState();
-  }
-  CNV.state = s;
-}
-
-CNV.saveState = function ()
-{
-  CNV.writeCookie('CNV_State', escape(OAT.JSON.stringify(CNV.state)), 1);
-}
-
-CNV.initQE = function (items)
-{
-  CNV.loadState();
-  if (items)
-  {
-    for (var i = 0; i < items.length; i++)
-      if ($('qe_'+items[i]))
-      {
-        var tmp = CNV.state[items[i]];
-        if (!tmp)
-          tmp = CNV.page[items[i]];
-        if (tmp)
-          $('qe_'+items[i]).innerHTML = tmp;
-        OAT.QuickEdit.assign('qe_'+items[i],OAT.QuickEdit.STRING,[])
-      }
-  }
-  CNV.saveState();
-}
-
-CNV.saveQE = function (items)
-{
-  if (items)
-  {
-    for (var i = 0; i < items.length; i++)
-      if ($(items[i]) && $('qe_'+items[i]))
-      {
-        CNV.state[items[i]] = $('qe_'+items[i]).innerHTML;
-        $(items[i]).value = $('qe_'+items[i]).innerHTML;
-      }
-  }
-  CNV.saveState();
-}
diff --git a/appsrc/ODS-Addressbook/www/message.vspx b/appsrc/ODS-Addressbook/www/message.vspx
index 1e0fd63..feab63e 100644
--- a/appsrc/ODS-Addressbook/www/message.vspx
+++ b/appsrc/ODS-Addressbook/www/message.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: message.vspx,v 1.1.2.1 2010/09/20 10:14:41 source Exp $
+ -  $Id: message.vspx,v 1.1.2.2 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/www/search.vspx b/appsrc/ODS-Addressbook/www/search.vspx
index dd02021..32b25c1 100644
--- a/appsrc/ODS-Addressbook/www/search.vspx
+++ b/appsrc/ODS-Addressbook/www/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.vspx,v 1.15.2.9 2010/11/11 12:37:55 source Exp $
+ -  $Id: search.vspx,v 1.15.2.13 2012/03/08 12:08:39 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,29 +24,9 @@
 -->
 <v:page name="search" decor="template/template.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-  <v:method name="update_params" arglist="">
-    <![CDATA[
-      declare tmp, params any;
-
-      self.v_keywords := trim (self.v_keywords);
-      self.v_expression := trim (self.v_expression);
-      self.v_tags := trim (self.v_tags);
-
-      tmp := AB.WA.tags2vector (self.v_tags);
-      tmp := AB.WA.vector_unique (tmp);
-      self.v_tags := AB.WA.vector2tags (tmp);
-
-      params := self.vc_page.vc_event.ve_params;
-      if (not (self.account_rights = 'public') and not isnull (get_keyword ('f_tags', params)))
-        self.v_own := cast (get_keyword ('f_own', params, '0') as integer);
-      self.v_shared := self.f_shared.ufl_selected;
-    ]]>
-  </v:method>
-
   <v:method name="do_search" arglist="inout e vspx_event">
     <![CDATA[
-      declare tmp any;
-
+      declare tmp, params any;
       declare exit handler for SQLSTATE '*' 
       {
         if (__SQL_STATE = 'TEST') {
@@ -57,7 +37,13 @@
         resignal;
       };
 
-      self.update_params();
+      self.v_keywords := trim (self.v_keywords);
+      self.v_expression := trim (self.v_expression);
+      self.v_tags := trim (self.v_tags);
+
+      tmp := AB.WA.tags2vector (self.v_tags);
+      tmp := AB.WA.vector_unique (tmp);
+      self.v_tags := AB.WA.vector2tags (tmp);
 
       AB.WA.test(self.v_keywords, vector('name', 'Keywords', 'class', 'free-text'));
       if (self.v_mode not in ('simple', 'opensearch'))
@@ -92,6 +78,7 @@
       }
       if (self.v_mode in ('simple', 'opensearch'))
       {
+        self.v_own := 1;
         AB.WA.xml_set('MyContacts', data, 1);
       } else {
         if (self.v_own = 1)
@@ -104,7 +91,7 @@
 
       state := '00000';
       sqlParams := vector();
-      sql := AB.WA.search_sql (self.domain_id, self.account_id, self.account_rights, data, self.v_max);
+      sql := AB.WA.search_sql (self.domain_id, self.account_id, self.person_rights, data, self.v_max);
       sql := concat (sql, ' order by ', self.v_order, ' ', self.v_direction);
       exec(sql, state, msg, sqlParams, 0, meta, result);
       if (state = '00000')
@@ -254,8 +241,8 @@
           self.v_category := cast (get_keyword ('f_category', params, get_keyword ('category', params, self.v_category)) as integer);
 
           -- options
-            self.v_own := cast (get_keyword ('f_own', params, '0') as integer);
-          self.v_shared := self.f_shared.ufl_selected;
+          self.v_own := cast (get_keyword ('f_own', params, self.v_own) as integer);
+          self.v_shared := cast (get_keyword ('f_shared', params, self.v_shared) as integer);
 
           self.v_max := trim (get_keyword ('f_max', params, self.v_max));
           self.v_order := trim (get_keyword ('f_order', params, self.v_order));
@@ -284,11 +271,6 @@
       ?>
       <v:text name="tabNo" xhtml_id="tabNo" type="hidden" value="--self.v_tabNo"/>
       <v:text name="step" xhtml_id="step" type="hidden" value="1"/>
-      <v:template type="simple" enabled="-- case when (self.v_step and self.vc_is_valid) then 1 else 0 end;">
-        <div class="new-form-header" style="margin-top: 6px;">
-          <i><?V initcap(self.v_mode) ?> search found <?V length (self.ds_data) ?> person(s) in last search</i>
-        </div>
-      </v:template>
       <v:template type="simple">
         <v:before-render>
           <![CDATA[
@@ -326,12 +308,10 @@
                 </v:before-data-bind>
 
                 <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                  <table id="search" class="AB_grid" style="border: solid #935000;  border-width: 0px 0px 0px 0px;" cellspacing="0">
-                    <thead class="sortHeader">
+                  <table id="search" class="ODS_grid" style="border: 0px;">
+                    <thead>
                       <tr>
-                        <th>
-                          Name
-                        </th>
+                        <th>Name</th>
                       </tr>
                     </thead>
                   </table>
@@ -384,16 +364,19 @@
 
                 <v:template name="ds_footer" type="simple" name-to-remove="table" set-to-remove="top">
                   <table>
+                    <tfoot>
+                      <tr>
+                        <td align="right">
+                          <vm:ds-navigation data-set="ds" />
+                        </td>
+                      </tr>
+                    </tfoot>
                   </table>
                 </v:template>
 
-                <span id="ds_navigation">
-                  <vm:ds-navigation data-set="ds" />
-                </span>
               </v:data-set>
               <script type="text/javascript">
                 <![CDATA[
-                  coloriseTable('search');
                   exchangeHTML();
                 ]]>
               </script>
@@ -462,10 +445,12 @@
                   <tr>
                     <th/>
                     <td>
+                    <label>
                       <?vsp
                         http(sprintf('<input type="checkbox" name="f_own" id="f_own" value="1" %s onclick="javascript: changeState(this, \'f_category\');" />', case when (self.v_own = 1) then 'checked="checked"' else '' end));
                       ?>
-                      <b><vm:label for="f_own" value="Search in my contacts"/></b>
+                      <b>Search in my contacts</b>
+                    </label>
                     </td>
                   </tr>
                   <tr>
@@ -479,8 +464,12 @@
                 <tr>
                   <th/>
                   <td>
-                    <v:check-box name="f_shared" initial-checked="self.v_shared" xhtml_id="f_shared" value="1" />
-                    <b><vm:label for="f_shared" value="Search in my shared contacts"/></b>
+                    <label>
+                      <?vsp
+                        http (sprintf ('<input type="checkbox" name="f_shared" id="f_shared" value="1" %s />', case when (self.v_shared = 1) then 'checked="checked"' else '' end));
+                      ?>
+                      <b>Search in my shared contacts</b>
+                    </label>
                   </td>
                 </tr>
               </table>
@@ -561,7 +550,7 @@
                 <v:button action="simple" style="url" value="Advanced" xhtml_class="form-button">
                   <v:on-post>
                     <![CDATA[
-                      self.vc_redirect (AB.WA.utf2wide (AB.WA.page_url (self.domain_id, 'search.vspx?mode=advanced')));
+                    self.vc_redirect (AB.WA.utf2wide (AB.WA.page_url (self.domain_id, sprintf ('search.vspx?mode=advanced&s_keywords=%s', self.s_keywords.ufl_value))));
                     ]]>
                   </v:on-post>
                 </v:button>
diff --git a/appsrc/ODS-Addressbook/www/tags.vspx b/appsrc/ODS-Addressbook/www/tags.vspx
index 0f91f72..329aced 100644
--- a/appsrc/ODS-Addressbook/www/tags.vspx
+++ b/appsrc/ODS-Addressbook/www/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.2.2.2 2010/09/20 10:14:41 source Exp $
+ -  $Id: tags.vspx,v 1.2.2.4 2012/03/08 10:46:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -32,10 +32,10 @@
       <v:variable persist="0" name="v_tags" type="any"/>
     </vm:variables>
     <vm:pagebody>
-      <table id="tags" class="grid" style="width: 100%;" cellspacing="0">
-        <thead class="sortHeader">
+      <table class="ODS_grid">
+        <thead>
           <tr>
-            <th class="checkbox" width="1%">
+            <th class="checkbox">
               <?vsp
                 http('<input type="checkbox" name="cb_all" value="Unselect All" checked="checked" onclick="selectAllCheckboxes(this, \'cb_item\'); "/>');
               ?>
@@ -66,7 +66,7 @@
             for (N := 0; N < length (vTags); N := N + 1) {
         ?>
           <tr>
-            <td>
+            <td class="checkbox">
               <?vsp
                 http (sprintf ('<input type="checkbox" name="cb_item" value="%s" checked="checked" onclick="javascript: coloriseRow(getParent(this, \'tr\'), this.checked);"/>', vTags[N]));
               ?>
diff --git a/appsrc/ODS-Addressbook/www/template/popup.vspx b/appsrc/ODS-Addressbook/www/template/popup.vspx
index 4855d3c..687c4c0 100644
--- a/appsrc/ODS-Addressbook/www/template/popup.vspx
+++ b/appsrc/ODS-Addressbook/www/template/popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: popup.vspx,v 1.7.2.8 2011/03/23 12:17:58 source Exp $
+  -  $Id: popup.vspx,v 1.7.2.13 2012/03/08 12:08:39 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,8 +25,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <html xmlns:v="http://www.openlinksw.com/vspx/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
   <head profile="http://internetalchemy.org/2003/02/profile">
+    <base href="<?V AB.WA.host_url () || http_path () ?>" /><![CDATA[<!--[if IE]></base><![endif]-->]]>
+    <?vsp
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
+    ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
-    <link rel="stylesheet" href="css/conversation.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
@@ -38,6 +44,7 @@
         OAT.Loader.load(featureList);
       </script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="js/ab.js"></script>
       <script type="text/javascript">
         function myInit()
@@ -47,18 +54,23 @@
         }
         OAT.MSG.attach(OAT, 'PAGE_LOADED', myInit);
         window.onload = function(){OAT.MSG.send(OAT, 'PAGE_LOADED');};
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
+      		}
+      	}
       </script>
     ]]>
     <title></title>
   </head>
   <body>
     <v:page xmlns:v="http://www.openlinksw.com/vspx/">
-      <vm:variables>
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_rights" type="varchar" default="''"/>
+      <v:variable persist="0" name="person_rights" type="varchar" default="''" />
         <v:variable persist="0" name="settings" type="any" />
-      </vm:variables>
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -71,6 +83,7 @@
           self.domain_id := cast(get_keyword('domain_id', aSessInfo, '-1') as integer);
           self.account_id := cast (get_keyword ('account_id', aSessInfo, '-1') as integer);
           self.account_rights := get_keyword ('account_rights', aSessInfo, '');
+          self.person_rights := get_keyword ('person_rights', aSessInfo);
           self.settings := AB.WA.settings (self.domain_id);
         ]]>
       </v:on-init>
diff --git a/appsrc/ODS-Addressbook/www/template/template.vspx b/appsrc/ODS-Addressbook/www/template/template.vspx
index 94f8923..8e1037f 100644
--- a/appsrc/ODS-Addressbook/www/template/template.vspx
+++ b/appsrc/ODS-Addressbook/www/template/template.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.vspx,v 1.26.2.12 2011/03/23 12:17:58 source Exp $
+ -  $Id: template.vspx,v 1.26.2.18 2012/03/08 12:08:39 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -39,8 +39,13 @@
       http (sprintf ('\n    <link rel="alternate" type="application/rss+xml" title="%V" href="%s" />', domainName, AB.WA.gems_url (self.domain_id)||'AddressBook.rss'));
       http (sprintf ('\n    <link rel="alternate" type="application/atom+xml" title="%V" href="%s" />', domainName, AB.WA.gems_url (self.domain_id)||'AddressBook.atom'));
       http (AB.WA.geo_url (self.domain_id, self.account_id));
+
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
     ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta name="dc.description" content="<?V AB.WA.utf2wide (AB.WA.domain_description (self.domain_id)) ?>" />
     <meta name="dc.title" content="<?V AB.WA.utf2wide (AB.WA.domain_description (self.domain_id)) ?>" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
@@ -60,15 +65,11 @@
           connectionHeaders: {Authorization: '<?V AB.WA.account_basicAuthorization (self.account_id) ?>'}
         };
 
-      	/* load stylesheets */
-      	OAT.Style.include("grid.css");
-      	OAT.Style.include("webdav.css");
-      	OAT.Style.include("winms.css");
-        
-        var featureList=["ajax", "json", "anchor", "dimmer", "dialog", "panelbar", "combolist", "calendar"];
+        var featureList=["ajax", "json", "anchor", "dialog", "panelbar", "combolist", "calendar"];
         OAT.Loader.load(featureList);
       </script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="/ods/app.js"></script>
       <script type="text/javascript" src="/ods/validate.js"></script>
       <script type="text/javascript" src="js/ab.js"></script>
@@ -77,15 +78,11 @@
         var askDialog;
 
         function myInit() {
-          if (!OAT._loaded) {
-            setTimeout(myInit, 50);
+          if (!OAT._loaded || !OAT.Panelbar) {
+            setTimeout(myInit, 100);
             return;
           }
 
-          // <a>++
-          OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-          OAT.Anchor.zIndex = 1001;
-        
           if (<?V cast (get_keyword ('app', self.settings, '0') as integer) ?> > 0)
             generateAPP('app_area', {appActivation: "<?V case when cast (get_keyword ('app', self.settings, '1') as integer) = 2 then 'hover' else 'click' end ?>"});
             
@@ -153,7 +150,9 @@
         <v:variable persist="0" name="domain_id" type="integer" default="-1" />
         <v:variable persist="0" name="account_id" type="integer" default="-1" />
       <v:variable persist="0" name="account_rights" type="varchar" default="''" />
+      <v:variable persist="0" name="person_rights" type="varchar" default="''" />
         <v:variable persist="0" name="settings" type="any" />
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -166,6 +165,7 @@
           self.domain_id := cast(get_keyword('domain_id', aSessInfo, '-1') as integer);
           self.account_id := cast (get_keyword ('account_id', aSessInfo, '-1') as integer);
           self.account_rights := get_keyword ('account_rights', aSessInfo);
+          self.person_rights := get_keyword ('person_rights', aSessInfo);
           self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), AB.WA.settings (self.domain_id));
 
           self.vc_add_attribute ('xmlns:foaf', 'http://xmlns.com/foaf/0.1/');
diff --git a/appsrc/ODS-Addressbook/www/template/template.xsl b/appsrc/ODS-Addressbook/www/template/template.xsl
index c383759..a74eeda 100644
--- a/appsrc/ODS-Addressbook/www/template/template.xsl
+++ b/appsrc/ODS-Addressbook/www/template/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.xsl,v 1.16.2.9 2010/11/09 20:11:43 source Exp $
+ -  $Id: template.xsl,v 1.16.2.12 2012/03/08 12:08:39 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -190,7 +190,7 @@
             <?vsp http (AB.WA.utf2wide (AB.WA.banner_links (self.domain_id, self.sid, self.realm))); ?>
           </div>
           <div style="float: right; padding-right: 0.5em;">
-            <vm:if test="self.account_rights = 'W'">
+            <vm:if test="self.person_rights = 'W'">
               <a href="<?vsp http (AB.WA.utf2wide (AB.WA.page_url (self.domain_id, 'home.vspx?action=settings', self.sid, self.realm))); ?>" title="Preferences">Preferences</a>
               |
             </vm:if>
@@ -239,11 +239,10 @@
   <!--=========================================================================-->
   <xsl:template match="vm:ds-navigation">
     <?vsp
-      {
         declare n_start, n_end, n_total integer;
         declare ds vspx_data_set;
 
-        ds := self.vc_find_descendant_control ('<xsl:value-of select="@data-set" />');
+      ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
         if (isnull (ds.ds_data_source))
         {
           n_total := ds.ds_rows_total;
@@ -258,57 +257,46 @@
           n_end := n_total;
 
         if (n_total)
-          http (sprintf ('%d - %d of %d', n_start, n_end, n_total));
+        http (sprintf ('Showing %d - %d of %d', n_start, n_end, n_total));
 
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first integer;
+      declare _prev, _next vspx_button;
 
-        d_prev := d_next := d_last := d_first := 0;
-        _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-        _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
         _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
         _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (not (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled))
-        {
-          if (n_total)
+      if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
           http (' | ');
-        if (_first is not null and not _first.vc_enabled)
-          d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-          d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-          d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-          d_last := 1;
-        }
     ?>
-    <?vsp
-      if (d_first)
-        http ('<img src="/ods/images/skin/pager/p_first_gr.png" alt="First Page" title="First Page" border="0" />first ');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="/ods/images/skin/pager/p_first.png" xhtml_alt="First" text="first&nbsp;" />
-    <?vsp
-      if (d_prev)
-        http ('<img src="/ods/images/skin/pager/p_prev_gr.png" alt="Previous Page" title="Previous Page" border="0" />prev ');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="/ods/images/skin/pager/p_prev.png" xhtml_alt="Previous" text="prev&nbsp;" />
-    <?vsp
-      if (d_next)
-        http ('<img src="/ods/images/skin/pager/p_next_gr.png" alt="Next Page" title="Next Page" border="0" />next ');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="/ods/images/skin/pager/p_next.png" xhtml_alt="Next" text="next&nbsp;" />
-    <?vsp
-      if (d_last)
-        http ('<img src="/ods/images/skin/pager/p_last_gr.png" alt="Last Page" title="Last Page" border="0" />last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="/ods/images/skin/pager/p_last.png" xhtml_alt="Last" text="last" />
-    <?vsp
-      }
-    ?>
+    <v:button name="{@data-set}_first" action="simple" style="url" value="" xhtml_alt="First" xhtml_class="navi-button" >
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/> First ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_prev" action="simple" style="url" value="" xhtml_alt="Previous" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/> Prev ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_next" action="simple" style="url" value="" xhtml_alt="Next" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/> Next ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_last" action="simple" style="url" value="" xhtml_alt="Last" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/> Last ';
+        ]]>
+      </v:before-render>
+    </v:button>
   </xsl:template>
 
   <!--=========================================================================-->
diff --git a/appsrc/ODS-Addressbook/www/users.vspx b/appsrc/ODS-Addressbook/www/users.vspx
deleted file mode 100644
index 37ac682..0000000
--- a/appsrc/ODS-Addressbook/www/users.vspx
+++ /dev/null
@@ -1,283 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- -
- -  $Id: users.vspx,v 1.6.2.3 2010/09/20 10:14:41 source Exp $
- -
- -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- -  project.
- -
- -  Copyright (C) 1998-2006 OpenLink Software
- -
- -  This project 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; only version 2 of the License, dated June 1991.
- -
- -  This program 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
- -  General Public License for more details.
- -
- -  You should have received a copy of the GNU General Public License along
- -  with this program; if not, write to the Free Software Foundation, Inc.,
- -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- -
--->
-<v:page name="users" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc') {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (self.v_order = columnName and self.v_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
-  <v:method name="sortChange" arglist="in columnName varchar">
-    <![CDATA[
-      if (columnName = '')
-        return;
-      self.ds_users.vc_reset ();
-      if (self.v_order = columnName) {
-        self.v_direction := either(equ(self.v_direction, 'asc'), 'desc', 'asc');
-      } else {
-        self.v_direction := 'asc';
-      }
-      self.v_order := columnName;
-    ]]>
-  </v:method>
-
-  <v:method name="isMultiple" arglist="in dst any">
-    <![CDATA[
-      declare pos integer;
-
-      pos := strstr(self.v_dst, 'm');
-      if (not isnull(pos))
-        return 1;
-      return 0;
-    ]]>
-  </v:method>
-
-  <v:before-data-bind>
-    <![CDATA[
-      if (self.v_mode = 'g') {
-        self.v_filter := 'g';
-      } else {
-        self.v_filter := 'u';
-      }
-    ]]>
-  </v:before-data-bind>
-
-  <vm:pagetitle>Select User/Group</vm:pagetitle>
-
-  <vm:popup_page_wrapper>
-    <vm:variables>
-      <v:variable name="v_params" param-name="params" type="varchar"/>
-      <v:variable name="v_mode" persist="0" param-name="mode" type="varchar" default="''"/>
-      <v:variable name="v_filter" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_value" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_mask" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_how" persist="0" type="varchar" default="'1'"/>
-      <v:variable name="v_order" persist="0" type="varchar" default="'U_NAME'" />
-      <v:variable name="v_direction" persist="0" type="varchar" default="'asc'" />
-      <v:variable name="v_src" persist="0" param-name="src" type="varchar" default="''" />
-      <v:variable name="v_dst" persist="0" param-name="dst" type="varchar" default="'sc'" />
-      <v:variable name="v_s1" persist="0" param-name="s1" type="varchar" default="''" />
-      <v:variable name="v_s2" persist="0" param-name="s2" type="varchar" default="''" />
-    </vm:variables>
-    <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s"/>', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s"/>', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="src"   id="src"   value="%s"/>', get_keyword('src', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="dst"   id="dst"   value="%s"/>', get_keyword('dst', self.vc_page.vc_event.ve_params, 'sc'))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s1"    id="s1"    value="%s"/>', get_keyword('s1', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s2"    id="s2"    value="%s"/>', get_keyword('s2', self.vc_page.vc_event.ve_params, ''))); ?>
-      <v:text name="params" type="hidden" value="--self.v_params"/>
-      <div class="boxHeader">
-        Show
-        <v:select-list name="filter" value="--self.v_filter" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-          <v:item name="Users & Groups" value="" />
-          <v:item name="Users" value="u" />
-          <v:item name="Groups" value="g" />
-        </v:select-list>
-        <v:select-list name="how" value="--self.v_how">
-          <v:item name="Starting with" value="1" />
-          <v:item name="Containing" value="2" />
-          <v:item name="Ending with" value="3" />
-          <v:item name="Exact match" value="4" />
-        </v:select-list>
-        <v:text name="value" value="--self.v_value" xhtml_size="15"/>
-        <v:button action="simple" value="Filter" xhtml_class="button">
-          <v:on-post>
-            <![CDATA[
-              self.v_filter := get_keyword('filter', self.vc_page.vc_event.ve_params, self.v_filter);
-              self.v_how := self.how.ufl_value;
-              self.v_value := trim(self.value.ufl_value);
-              self.vc_data_bind (e);
-            ]]>
-          </v:on-post>
-        </v:button>
-        <v:button name="reset" action="simple" value="Clear" xhtml_class="button">
-          <v:on-post>
-            <![CDATA[
-              self.v_how := '1';
-              self.v_value := '';
-              self.vc_data_bind (e);
-            ]]>
-          </v:on-post>
-        </v:button>
-      </div>
-
-      <v:data-source name="dsrc_users" expression-type="sql" nrows="0" initial-offset="0">
-        <v:before-data-bind>
-          <![CDATA[
-            declare user_sql, group_sql varchar;
-
-            self.v_mask := case self.v_how
-                             when '1' then self.v_value || '%'
-                             when '2' then '%' || self.v_value || '%'
-                             when '3' then '%' || self.v_value
-                             else self.v_value
-                           end;
-            if (self.v_mask = '')
-              self.v_mask := '%';
-            self.v_mask := replace(self.v_mask, '%%', '%');
-
-            group_sql := '';
-            if (self.v_mode = 's')
-            {
-              user_sql := sprintf('select ''User'' U_TYPE, U_NAME, coalesce(U_FULL_NAME, \'\') U_FULL_NAME from AB.WA.GRANTS, DB.DBA.SYS_USERS where (U_ACCOUNT_DISABLED=0) and upper(U_NAME) like upper(\'%s\') and G_GRANTEE_ID = %d and G_GRANTER_ID = U_ID', self.v_mask, self.account_id);
-            } else {
-              user_sql := sprintf('select ''User'' U_TYPE, U_NAME, coalesce(U_FULL_NAME, \'\') U_FULL_NAME from WS.WS.SYS_DAV_USER where (U_ACCOUNT_DISABLED=0) and (upper(U_NAME) like upper(\'%s\') and (U_ID<>5) and (U_ID<>6) and (U_ID<>%d))', self.v_mask, self.account_id);
-            }
-            if (user_sql = '')
-            {
-              control.ds_sql := group_sql;
-            } else if (group_sql = '') {
-              control.ds_sql := user_sql;
-            } else {
-              control.ds_sql := concat('select U_TYPE, U_NAME, U_FULL_NAME from (', user_sql, ' union ' , group_sql, ') x ');
-            }
-            self.sortChange(get_keyword('sortColumn', e.ve_params, ''));
-            control.ds_nrows := AB.WA.settings_rows (self.settings);
-            control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
-          ]]>
-        </v:before-data-bind>
-        <v:after-data-bind>
-          control.ds_make_statistic ();
-        </v:after-data-bind>
-      </v:data-source>
-
-      <v:data-set name="ds_users" data-source="self.dsrc_users" scrollable="1">
-
-        <v:template name="ds_users_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="users" class="AB_grid" cellspacing="0">
-            <thead class="sortHeader">
-              <tr>
-                <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-                  <th class="checkbox" width="1%">
-                    <?vsp
-                      http('<input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, ''cb_item''); updateChecked(this, ''cb_item''); "/>');
-                    ?>
-                  </th>
-                </v:template>
-                <v:template type="simple" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-                  <th>
-                    <v:label value="Type" format="%s"/>
-                  </th>
-                </v:template>
-                <th>
-                  <?vsp self.sortColumn('Name', 'U_NAME'); ?>
-                </th>
-                <th>
-                  <?vsp self.sortColumn('Description', 'U_FULL_NAME'); ?>
-                </th>
-                <v:template type="simple" enabled="--neq(self.isMultiple(self.v_dst), 1)">
-                  <th width="1%">
-                    <v:label value="Action" format="%s"/>
-                  </th>
-                </v:template>
-              </tr>
-            </thead>
-          </table>
-        </v:template>
-
-        <v:template name="ds_users_repeat" type="repeat" name-to-remove="" set-to-remove="">
-
-          <v:template name="ds_users_browse" type="browse" name-to-remove="table" set-to-remove="both">
-            <table>
-              <tr>
-                <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-                  <td  align="center">
-                    <?vsp
-                      declare pos integer;
-                      declare S, name any;
-
-                      name := (control.vc_parent as vspx_row_template).te_column_value('U_NAME');
-                      S := '';
-                      pos := strstr(self.v_s1, concat(name, ','));
-                      if (not isnull(pos))
-                        S := 'checked="checked"';
-                      http (sprintf ('<input type="checkbox" name="cb_item" value="%s" %s onclick="javascript: updateChecked(this, ''cb_item''); " />', name, S));
-                    ?>
-                  </td>
-                </v:template>
-                <v:template type="simple" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-                  <td nowrap="nowrap">
-                    <v:label value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('U_TYPE')" format="%s"/>
-                  </td>
-                </v:template>
-                <td nowrap="nowrap">
-                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_NAME')" format="%s"/>
-                </td>
-                <td nowrap="nowrap">
-                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')" format="%s"/>
-                </td>
-                <v:template type="simple" enabled="--neq(self.isMultiple(self.v_dst), 1)">
-                  <td nowrap="nowrap">
-                    <v:text name="s1" type="hidden" value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('U_NAME')"/>
-                    <v:text name="s2" type="hidden" value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')"/>
-                    <v:button name="b1" action="simple" value="select" xhtml_alt="Select" xhtml_onclick="javascript: rowSelect(this); return false;" xhtml_class="button"/>
-                  </td>
-                </v:template>
-              </tr>
-            </table>
-          </v:template>
-
-        </v:template>
-
-        <v:template name="ds_users_footer" type="simple" name-to-remove="table" set-to-remove="top">
-          <table>
-            <tr>
-              <td align="center" colspan="<?V case when self.v_mode = '' then '4' else '3' end ?>">
-                <vm:ds-navigation data-set="ds_users"/>
-              </td>
-            </tr>
-          </table>
-        </v:template>
-
-      </v:data-set>
-      <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-        <div style="padding: 0 0 0.5em 0;">
-          <hr />
-          <a href="#" onclick="javascript: addChecked(document.forms['F1'], 'cb_item', 'No users were selected for addition.');" class="button2">&nbsp;Add selected</a>
-        </div>
-      </v:template>
-      <script>
-        <![CDATA[
-          coloriseTable('users');
-        ]]>
-      </script>
-    </vm:pagebody>
-  </vm:popup_page_wrapper>
-</v:page>
diff --git a/appsrc/ODS-Addressbook/xslt/rss2atom.xsl b/appsrc/ODS-Addressbook/xslt/rss2atom.xsl
index 641213c..1482750 100644
--- a/appsrc/ODS-Addressbook/xslt/rss2atom.xsl
+++ b/appsrc/ODS-Addressbook/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.2.2.2 2010/09/20 10:14:41 source Exp $
+ -  $Id: rss2atom.xsl,v 1.2.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/xslt/rss2atom03.xsl b/appsrc/ODS-Addressbook/xslt/rss2atom03.xsl
index 2505311..ef6d140 100644
--- a/appsrc/ODS-Addressbook/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-Addressbook/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.2.2.1 2010/09/20 10:14:41 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/xslt/rss2rdf.xsl b/appsrc/ODS-Addressbook/xslt/rss2rdf.xsl
index 6556b06..548b32d 100644
--- a/appsrc/ODS-Addressbook/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-Addressbook/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: rss2rdf.xsl,v 1.2.2.1 2010/09/20 10:14:41 source Exp $
+  -  $Id: rss2rdf.xsl,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/xslt/rss2xbel.xsl b/appsrc/ODS-Addressbook/xslt/rss2xbel.xsl
index 59a9eeb..4183969 100644
--- a/appsrc/ODS-Addressbook/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-Addressbook/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
-  -  $Id: rss2xbel.xsl,v 1.1.2.1 2010/09/20 10:14:41 source Exp $
+  -  $Id: rss2xbel.xsl,v 1.1.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/Makefile.am b/appsrc/ODS-Blog/Makefile.am
index e2d15e3..d133381 100644
--- a/appsrc/ODS-Blog/Makefile.am
+++ b/appsrc/ODS-Blog/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/Makefile.in b/appsrc/ODS-Blog/Makefile.in
index d0d0767..6ca93f2 100644
--- a/appsrc/ODS-Blog/Makefile.in
+++ b/appsrc/ODS-Blog/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/appsrc/ODS-Blog/atom_pub.sql b/appsrc/ODS-Blog/atom_pub.sql
index 2eaa139..87dc12c 100644
--- a/appsrc/ODS-Blog/atom_pub.sql
+++ b/appsrc/ODS-Blog/atom_pub.sql
@@ -1,12 +1,12 @@
 --
---  $Id: atom_pub.sql,v 1.3.2.1 2010/09/20 10:14:42 source Exp $
+--  $Id: atom_pub.sql,v 1.3.2.3 2012/03/08 12:03:12 source Exp $
 --
 --  Atom publishing protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -288,11 +288,11 @@ atom_req_headers (in req "blogRequest", in what int := 0)
     if (req.user_name is not null)
       {
   b := encode_base64 (req.user_name||':'||req.passwd);
-  return sprintf ('%s: application/x.atom+xml\r\nAuthorization: Basic %s', case when what = 0 then 'Content-Type' else 'Accept' end, b);
+	return sprintf ('%s: application/atom+xml\r\nAuthorization: Basic %s', case when what = 0 then 'Content-Type' else 'Accept' end, b);
       }
     else
       {
-  return sprintf ('%s: application/x.atom+xml', case when what = 0 then 'Content-Type' else 'Accept' end);
+	return sprintf ('%s: application/atom+xml', case when what = 0 then 'Content-Type' else 'Accept' end);
       }
   }
 ;
diff --git a/appsrc/ODS-Blog/blog.sql b/appsrc/ODS-Blog/blog.sql
index 167c022..59c7592 100644
--- a/appsrc/ODS-Blog/blog.sql
+++ b/appsrc/ODS-Blog/blog.sql
@@ -1,12 +1,12 @@
 --
---  $Id: blog.sql,v 1.20.2.7 2010/12/07 10:59:24 source Exp $
+--  $Id: blog.sql,v 1.20.2.9 2012/03/08 12:03:12 source Exp $
 --
 --  Blogger API support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -666,6 +666,7 @@ blog2_exec_no_error ('create table SYS_BLOG_CHANNEL_FEEDS
   CF_PUBDATE datetime,
   CF_COMMENT_API varchar,
   CF_COMMENT_RSS varchar,
+  CF_READ int,
   primary key (CF_CHANNEL_URI, CF_ID)
   )')
 ;
@@ -884,7 +885,7 @@ insert soft SYS_ROUTING_TYPE (RT_ID, RT_NAME, RT_TYPE_DESCRIPTION) values (3, 'd
 insert soft SYS_ROUTING_TYPE (RT_ID, RT_NAME, RT_TYPE_DESCRIPTION) values (4, 'Ping', 'Weblog ping')
 ;
 
---   Routing Procotol Table Structure:
+--   Routing Protocol Table Structure:
 blog2_exec_no_error ('create table SYS_ROUTING_PROTOCOL
 (
    RP_ID  int primary key,
diff --git a/appsrc/ODS-Blog/conv.sql b/appsrc/ODS-Blog/conv.sql
index 1cc1bbc..2520a1b 100644
--- a/appsrc/ODS-Blog/conv.sql
+++ b/appsrc/ODS-Blog/conv.sql
@@ -1,10 +1,10 @@
 --
---  $Id: conv.sql,v 1.4.2.1 2010/09/20 10:14:42 source Exp $
+--  $Id: conv.sql,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/dav_browser.sql b/appsrc/ODS-Blog/dav_browser.sql
index 0d5a620..257a463 100644
--- a/appsrc/ODS-Blog/dav_browser.sql
+++ b/appsrc/ODS-Blog/dav_browser.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dav_browser.sql,v 1.3.2.1 2010/09/20 10:14:42 source Exp $
+--  $Id: dav_browser.sql,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/gdata.sql b/appsrc/ODS-Blog/gdata.sql
index 4765976..e55cacc 100644
--- a/appsrc/ODS-Blog/gdata.sql
+++ b/appsrc/ODS-Blog/gdata.sql
@@ -1,12 +1,12 @@
 --
---  $Id: gdata.sql,v 1.4.2.1 2010/09/20 10:14:42 source Exp $
+--  $Id: gdata.sql,v 1.4.2.3 2012/03/08 12:03:12 source Exp $
 --
 --  Atom publishing protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -121,8 +121,8 @@ create procedure ATOM.ATOM.gdata
     id := path [5];
 
   ver := null;
-  if (length (path) > 6 and atoi (id) > 0)
-    ver := atoi (path [6]);
+  --if (length (path) > 6 and atoi (id) > 0)
+  --  ver := atoi (path [6]);
 
   if (blogid is null)
     {
diff --git a/appsrc/ODS-Blog/index.vsp b/appsrc/ODS-Blog/index.vsp
index 9f71613..6eeb9c8 100644
--- a/appsrc/ODS-Blog/index.vsp
+++ b/appsrc/ODS-Blog/index.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: index.vsp,v 1.3.2.1 2010/09/20 10:14:42 source Exp $
+--  $Id: index.vsp,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/index.vspx b/appsrc/ODS-Blog/index.vspx
index ed4abd3..7e1a1fb 100644
--- a/appsrc/ODS-Blog/index.vspx
+++ b/appsrc/ODS-Blog/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.1 2010/09/20 10:14:42 source Exp $
+ -  $Id: index.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/install.sql b/appsrc/ODS-Blog/install.sql
index 72f8670..64f92b9 100644
--- a/appsrc/ODS-Blog/install.sql
+++ b/appsrc/ODS-Blog/install.sql
@@ -1,10 +1,10 @@
 --
---  $Id: install.sql,v 1.25.2.8 2010/11/09 20:15:17 source Exp $
+--  $Id: install.sql,v 1.25.2.9 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/make_vad.sh b/appsrc/ODS-Blog/make_vad.sh
index 4fac5a0..44cc689 100755
--- a/appsrc/ODS-Blog/make_vad.sh
+++ b/appsrc/ODS-Blog/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.22.2.9 2011/02/03 10:26:14 source Exp $
+#  $Id: make_vad.sh,v 1.22.2.12 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -59,6 +59,7 @@ TEMPFILE=/tmp/isql.$$
 LN="ln -fs"
 RM="rm -f"
 fi
+
 VOS=0
 if [ -f ../../autogen.sh ]
 then
@@ -84,7 +85,7 @@ else
   myrm=rm
 fi
 
-VERSION_INIT()
+version_init()
 {
   if [ $VOS -eq 1 ]
   then
@@ -281,7 +282,7 @@ sticker_init() {
   echo "  <name package=\"Weblog\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Weblog\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso/blog2/download\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso/blog2/download\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -336,8 +337,8 @@ sticker_init() {
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/blog2/DET_Blog.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/blog2/wa_search_blog.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/blog2/conv.sql', 1, 'report', 1);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/blog2/sioc_blog.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/blog2/blog_api.sql', 1, 'report', 1);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/blog2/sioc_blog.sql', 1, 'report', 1);" >> $STICKER
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
   echo "  <sql purpose=\"pre-uninstall\">" >> $STICKER
@@ -462,7 +463,7 @@ BANNER "STARTED PACKAGING BLOG VAD"
 STOP_SERVER
 $myrm $LOGFILE 2>/dev/null
 directory_clean
-VERSION_INIT
+version_init
 directory_init
 virtuoso_init
 sticker_init
@@ -470,7 +471,6 @@ vad_create
 virtuoso_shutdown
 chmod 644 ods_blog_dav.vad
 #chmod 644 virtuoso.trx
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -480,5 +480,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Blog/public/back_nav.vspx b/appsrc/ODS-Blog/public/back_nav.vspx
index a4586ef..e80c82b 100644
--- a/appsrc/ODS-Blog/public/back_nav.vspx
+++ b/appsrc/ODS-Blog/public/back_nav.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: back_nav.vspx,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+ -  $Id: back_nav.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/c_confirm.vspx b/appsrc/ODS-Blog/public/c_confirm.vspx
index 34727bd..9beeab4 100644
--- a/appsrc/ODS-Blog/public/c_confirm.vspx
+++ b/appsrc/ODS-Blog/public/c_confirm.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: c_confirm.vspx,v 1.5.2.1 2010/09/20 10:14:43 source Exp $
+ -  $Id: c_confirm.vspx,v 1.5.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/css/dav.css b/appsrc/ODS-Blog/public/css/dav.css
index 0ac3769..90c94df 100644
--- a/appsrc/ODS-Blog/public/css/dav.css
+++ b/appsrc/ODS-Blog/public/css/dav.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: dav.css,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: dav.css,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/css/default.css b/appsrc/ODS-Blog/public/css/default.css
index bdd10b3..f112105 100644
--- a/appsrc/ODS-Blog/public/css/default.css
+++ b/appsrc/ODS-Blog/public/css/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: default.css,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/css/rte.css b/appsrc/ODS-Blog/public/css/rte.css
index 0dadda8..1f3844c 100644
--- a/appsrc/ODS-Blog/public/css/rte.css
+++ b/appsrc/ODS-Blog/public/css/rte.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: rte.css,v 1.3.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: rte.css,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/css/webdav.css b/appsrc/ODS-Blog/public/css/webdav.css
index df4618a..6ed567f 100644
--- a/appsrc/ODS-Blog/public/css/webdav.css
+++ b/appsrc/ODS-Blog/public/css/webdav.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: webdav.css,v 1.1.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: webdav.css,v 1.1.2.2 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2007 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/appsrc/ODS-Blog/public/openid_helper.vsp b/appsrc/ODS-Blog/public/openid_helper.vsp
index a645a2e..06e121f 100644
--- a/appsrc/ODS-Blog/public/openid_helper.vsp
+++ b/appsrc/ODS-Blog/public/openid_helper.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --  
---  $Id: openid_helper.vsp,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+--  $Id: openid_helper.vsp,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/popup_browser.vspx b/appsrc/ODS-Blog/public/popup_browser.vspx
index cf48ffc..55996be 100644
--- a/appsrc/ODS-Blog/public/popup_browser.vspx
+++ b/appsrc/ODS-Blog/public/popup_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: popup_browser.vspx,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+ -  $Id: popup_browser.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/r_unsubscribe.vspx b/appsrc/ODS-Blog/public/r_unsubscribe.vspx
index 76ca18a..dd92687 100644
--- a/appsrc/ODS-Blog/public/r_unsubscribe.vspx
+++ b/appsrc/ODS-Blog/public/r_unsubscribe.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: r_unsubscribe.vspx,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+ -  $Id: r_unsubscribe.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/scripts/browserdetect.js b/appsrc/ODS-Blog/public/scripts/browserdetect.js
index d3b717a..60ce5e8 100644
--- a/appsrc/ODS-Blog/public/scripts/browserdetect.js
+++ b/appsrc/ODS-Blog/public/scripts/browserdetect.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: browserdetect.js,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: browserdetect.js,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/scripts/entry.js b/appsrc/ODS-Blog/public/scripts/entry.js
index 38a2bb8..5144a35 100644
--- a/appsrc/ODS-Blog/public/scripts/entry.js
+++ b/appsrc/ODS-Blog/public/scripts/entry.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: entry.js,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: entry.js,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/scripts/form.js b/appsrc/ODS-Blog/public/scripts/form.js
index 985191f..7b923dc 100644
--- a/appsrc/ODS-Blog/public/scripts/form.js
+++ b/appsrc/ODS-Blog/public/scripts/form.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: form.js,v 1.6.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: form.js,v 1.6.2.2 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/scripts/openid.js b/appsrc/ODS-Blog/public/scripts/openid.js
index 2bc7e9b..28ab248 100644
--- a/appsrc/ODS-Blog/public/scripts/openid.js
+++ b/appsrc/ODS-Blog/public/scripts/openid.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: openid.js,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: openid.js,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/scripts/plugins.js b/appsrc/ODS-Blog/public/scripts/plugins.js
index 934dd03..414cab0 100644
--- a/appsrc/ODS-Blog/public/scripts/plugins.js
+++ b/appsrc/ODS-Blog/public/scripts/plugins.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: plugins.js,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: plugins.js,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/search.vspx b/appsrc/ODS-Blog/public/search.vspx
index 123203c..767ee23 100644
--- a/appsrc/ODS-Blog/public/search.vspx
+++ b/appsrc/ODS-Blog/public/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.vspx,v 1.11.2.2 2010/09/20 10:14:43 source Exp $
+ -  $Id: search.vspx,v 1.11.2.4 2012/03/08 12:03:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1285,7 +1285,9 @@
           http ('<title>');
           http_value (BLOG..blog_utf2wide(elm[2]));
           http ('</title>');
-          http (sprintf ('<link>http://%s', BLOG.DBA.BLOG_GET_HOST ()));
+          http ('<link>');
+	  if (elm[1] not like '%://%')    
+            http (sprintf ('http://%s', BLOG.DBA.BLOG_GET_HOST ()));
           http_value (elm[1]);
           http ('</link>');
           http ('<pubDate>');
diff --git a/appsrc/ODS-Blog/public/view.vspx b/appsrc/ODS-Blog/public/view.vspx
index d2e46a6..459b25e 100644
--- a/appsrc/ODS-Blog/public/view.vspx
+++ b/appsrc/ODS-Blog/public/view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: view.vspx,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+ -  $Id: view.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/public/view_file.vspx b/appsrc/ODS-Blog/public/view_file.vspx
index 0e6300a..f88f1ed 100644
--- a/appsrc/ODS-Blog/public/view_file.vspx
+++ b/appsrc/ODS-Blog/public/view_file.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: view_file.vspx,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+ -  $Id: view_file.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/sioc_blog.sql b/appsrc/ODS-Blog/sioc_blog.sql
index bc8328d..259127b 100644
--- a/appsrc/ODS-Blog/sioc_blog.sql
+++ b/appsrc/ODS-Blog/sioc_blog.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_blog.sql,v 1.14.2.3 2010/10/07 13:24:14 source Exp $
+--  $Id: sioc_blog.sql,v 1.14.2.5 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -58,6 +58,8 @@ create procedure fill_ods_weblog_sioc (in graph_iri varchar, in site_iri varchar
   declare links any;
 
  {
+    fill_ods_weblog_services ();
+
     declare deadl, cnt any;
     declare _pid any;
 
@@ -164,6 +166,26 @@ create procedure fill_ods_weblog_sioc (in graph_iri varchar, in site_iri varchar
     }
 };
 
+create procedure fill_ods_weblog_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('weblog.get', 'weblog.post.new', 'weblog.upstreaming.set', 'weblog.upstreaming.get', 'weblog.upstreaming.remove', 'weblog.options.set',  'weblog.options.get');
+  ods_object_services (graph_iri, 'weblog', 'ODS weblog instance services', svc_functions);
+
+  -- item
+  svc_functions := vector ('weblog.post.get', 'weblog.post.edit', 'weblog.post.delete', 'weblog.comment.new');
+  ods_object_services (graph_iri, 'weblog/contact', 'ODS weblog contact services', svc_functions);
+
+  -- item comment
+  svc_functions := vector ('weblog.comment.get', 'weblog.comment.approve', 'weblog.comment.delete');
+  ods_object_services (graph_iri, 'weblog/contact/comment', 'ODS weblog comment services', svc_functions);
+}
+;
 
 create procedure ods_weblog_sioc_init ()
 {
@@ -247,7 +269,8 @@ create trigger SYS_BLOGS_SIOC_I after insert on BLOG..SYS_BLOGS order 10 referen
       	where PL_BLOG_ID = N.B_BLOG_ID and PL_POST_ID = N.B_POST_ID);
   ods_sioc_post (graph_iri, iri, blog_iri, cr_iri, N.B_TITLE, N.B_TS, N.B_MODIFIED,
       home ||'?id='||N.B_POST_ID, N.B_CONTENT, null, links, null, att);
-  return;
+  -- services
+  SIOC..ods_object_services_attach (graph_iri, iri, 'weblog/item');
 };
 
 create trigger SYS_BLOGS_SIOC_D before delete on BLOG..SYS_BLOGS referencing old as O
@@ -260,7 +283,8 @@ create trigger SYS_BLOGS_SIOC_D before delete on BLOG..SYS_BLOGS referencing old
   graph_iri := get_graph ();
   iri := blog_post_iri (O.B_BLOG_ID, O.B_POST_ID);
   delete_quad_s_or_o (graph_iri, iri, iri);
-  return;
+  -- services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'weblog/item');
 };
 
 create trigger SYS_BLOGS_SIOC_U after update on BLOG..SYS_BLOGS order 10 referencing old as O, new as N
@@ -304,7 +328,8 @@ create trigger SYS_BLOGS_SIOC_U after update on BLOG..SYS_BLOGS order 10 referen
       (select DB.DBA.VECTOR_AGG (vector (PL_TITLE,PL_LINK)) from BLOG..BLOG_POST_LINKS
       	where PL_BLOG_ID = N.B_BLOG_ID and PL_POST_ID = N.B_POST_ID);
   ods_sioc_post (graph_iri, iri, blog_iri, cr_iri, N.B_TITLE, N.B_TS, N.B_MODIFIED, null, N.B_CONTENT, null, links, null, att);
-  return;
+  -- services
+  SIOC..ods_object_services_attach (graph_iri, iri, 'weblog/item');
 };
 
 create trigger BLOG_COMMENTS_SIOC_I after insert on BLOG..BLOG_COMMENTS referencing new as N
@@ -336,7 +361,8 @@ create trigger BLOG_COMMENTS_SIOC_I after insert on BLOG..BLOG_COMMENTS referenc
   post_iri := blog_post_iri (N.BM_BLOG_ID, N.BM_POST_ID);
   DB.DBA.ODS_QUAD_URI (graph_iri, post_iri, sioc_iri ('has_reply'), iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc_iri ('reply_of'), post_iri);
-  return;
+  -- services
+  SIOC..ods_object_services_attach (graph_iri, iri, 'weblog/item/comment');
 };
 
 create trigger BLOG_COMMENTS_SIOC_D after delete on BLOG..BLOG_COMMENTS referencing old as O
@@ -349,7 +375,8 @@ create trigger BLOG_COMMENTS_SIOC_D after delete on BLOG..BLOG_COMMENTS referenc
   graph_iri := get_graph ();
   iri := blog_comment_iri (O.BM_BLOG_ID, O.BM_POST_ID, O.BM_ID);
   delete_quad_s_or_o (graph_iri, iri, iri);
-  return;
+  -- services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'weblog/item/comment');
 };
 
 create trigger BLOG_COMMENTS_SIOC_U after update on BLOG..BLOG_COMMENTS referencing old as O, new as N
@@ -417,6 +444,20 @@ create trigger BLOG_TAG_SIOC_D after delete on BLOG..BLOG_TAG referencing old as
     }
 };
 
+-------------------------------------------------------------------------------
+--
+create procedure BLOG.DBA.tmp_update ()
+{
+  if (registry_get ('weblog_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_weblog_services();
+  registry_set ('weblog_services_update', '1');
+}
+;
+
+BLOG.DBA.tmp_update ();
+
 use DB;
 -- BLOG
 
diff --git a/appsrc/ODS-Blog/template.sql b/appsrc/ODS-Blog/template.sql
index 9dcb8d7..91303ad 100644
--- a/appsrc/ODS-Blog/template.sql
+++ b/appsrc/ODS-Blog/template.sql
@@ -1,10 +1,10 @@
 --
---  $Id: template.sql,v 1.4.2.1 2010/09/20 10:14:42 source Exp $
+--  $Id: template.sql,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/atlantis/default.css b/appsrc/ODS-Blog/templates/atlantis/default.css
index 3734382..01777bf 100644
--- a/appsrc/ODS-Blog/templates/atlantis/default.css
+++ b/appsrc/ODS-Blog/templates/atlantis/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.1 2010/09/20 10:14:44 source Exp $
+ *  $Id: default.css,v 1.2.2.2 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/atlantis/index.vspx b/appsrc/ODS-Blog/templates/atlantis/index.vspx
index 0030e47..a49d555 100644
--- a/appsrc/ODS-Blog/templates/atlantis/index.vspx
+++ b/appsrc/ODS-Blog/templates/atlantis/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:44 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/autumn/default.css b/appsrc/ODS-Blog/templates/autumn/default.css
index 159215d..04ea96a 100644
--- a/appsrc/ODS-Blog/templates/autumn/default.css
+++ b/appsrc/ODS-Blog/templates/autumn/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:45 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/autumn/index.vspx b/appsrc/ODS-Blog/templates/autumn/index.vspx
index 76baed3..92bbc39 100644
--- a/appsrc/ODS-Blog/templates/autumn/index.vspx
+++ b/appsrc/ODS-Blog/templates/autumn/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:45 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/blue_left/default.css b/appsrc/ODS-Blog/templates/blue_left/default.css
index e71a434..7762bb0 100644
--- a/appsrc/ODS-Blog/templates/blue_left/default.css
+++ b/appsrc/ODS-Blog/templates/blue_left/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:45 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/blue_left/index.vspx b/appsrc/ODS-Blog/templates/blue_left/index.vspx
index c137b74..fb9dbd0 100644
--- a/appsrc/ODS-Blog/templates/blue_left/index.vspx
+++ b/appsrc/ODS-Blog/templates/blue_left/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:45 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/columns_clean/archive.vspx b/appsrc/ODS-Blog/templates/columns_clean/archive.vspx
index 6fe7b69..7633b44 100644
--- a/appsrc/ODS-Blog/templates/columns_clean/archive.vspx
+++ b/appsrc/ODS-Blog/templates/columns_clean/archive.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: archive.vspx,v 1.1.2.1 2010/09/20 10:14:45 source Exp $
+ -  $Id: archive.vspx,v 1.1.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/columns_clean/default.css b/appsrc/ODS-Blog/templates/columns_clean/default.css
index de79bef..27acca1 100644
--- a/appsrc/ODS-Blog/templates/columns_clean/default.css
+++ b/appsrc/ODS-Blog/templates/columns_clean/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.1.2.2 2010/09/20 10:14:45 source Exp $
+ *  $Id: default.css,v 1.1.2.3 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/columns_clean/index.vspx b/appsrc/ODS-Blog/templates/columns_clean/index.vspx
index ef1a0ac..cfac4df 100644
--- a/appsrc/ODS-Blog/templates/columns_clean/index.vspx
+++ b/appsrc/ODS-Blog/templates/columns_clean/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.1.2.2 2010/09/20 10:14:45 source Exp $
+ -  $Id: index.vspx,v 1.1.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/columns_clean/linkblog.vspx b/appsrc/ODS-Blog/templates/columns_clean/linkblog.vspx
index 1260422..01be51c 100644
--- a/appsrc/ODS-Blog/templates/columns_clean/linkblog.vspx
+++ b/appsrc/ODS-Blog/templates/columns_clean/linkblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: linkblog.vspx,v 1.1.2.1 2010/09/20 10:14:45 source Exp $
+ -  $Id: linkblog.vspx,v 1.1.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/columns_clean/summary.vspx b/appsrc/ODS-Blog/templates/columns_clean/summary.vspx
index 744e85f..80893af 100644
--- a/appsrc/ODS-Blog/templates/columns_clean/summary.vspx
+++ b/appsrc/ODS-Blog/templates/columns_clean/summary.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: summary.vspx,v 1.1.2.1 2010/09/20 10:14:45 source Exp $
+ -  $Id: summary.vspx,v 1.1.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/default/default.css b/appsrc/ODS-Blog/templates/default/default.css
index 41c6c5d..414c2c0 100644
--- a/appsrc/ODS-Blog/templates/default/default.css
+++ b/appsrc/ODS-Blog/templates/default/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:45 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/default/index.vspx b/appsrc/ODS-Blog/templates/default/index.vspx
index 6c6ac7c..b1f34a2 100644
--- a/appsrc/ODS-Blog/templates/default/index.vspx
+++ b/appsrc/ODS-Blog/templates/default/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:45 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/default/red.css b/appsrc/ODS-Blog/templates/default/red.css
index 0c1c97e..c17dc71 100644
--- a/appsrc/ODS-Blog/templates/default/red.css
+++ b/appsrc/ODS-Blog/templates/default/red.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: red.css,v 1.3.2.2 2010/09/20 10:14:45 source Exp $
+ *  $Id: red.css,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/digital_bazaar/archive.vspx b/appsrc/ODS-Blog/templates/digital_bazaar/archive.vspx
index 19dbf9c..ae5cb05 100755
--- a/appsrc/ODS-Blog/templates/digital_bazaar/archive.vspx
+++ b/appsrc/ODS-Blog/templates/digital_bazaar/archive.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 -
--  $Id: archive.vspx,v 1.1.4.2 2010/09/22 13:56:49 source Exp $
+-  $Id: archive.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -
--  Copyright (C) 1998-2006 OpenLink Software
+-  Copyright (C) 1998-2012 OpenLink Software
 -
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/digital_bazaar/default.css b/appsrc/ODS-Blog/templates/digital_bazaar/default.css
index a79512d..44075b4 100755
--- a/appsrc/ODS-Blog/templates/digital_bazaar/default.css
+++ b/appsrc/ODS-Blog/templates/digital_bazaar/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.1.4.3 2010/09/22 13:56:49 source Exp $
+ *  $Id: default.css,v 1.1.4.4 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/digital_bazaar/index.vspx b/appsrc/ODS-Blog/templates/digital_bazaar/index.vspx
index 5ef5716..23b2e59 100755
--- a/appsrc/ODS-Blog/templates/digital_bazaar/index.vspx
+++ b/appsrc/ODS-Blog/templates/digital_bazaar/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
--  $Id: index.vspx,v 1.1.4.4 2010/10/07 13:24:15 source Exp $
+-  $Id: index.vspx,v 1.1.4.5 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/digital_bazaar/linkblog.vspx b/appsrc/ODS-Blog/templates/digital_bazaar/linkblog.vspx
index c6794c6..f3a741e 100755
--- a/appsrc/ODS-Blog/templates/digital_bazaar/linkblog.vspx
+++ b/appsrc/ODS-Blog/templates/digital_bazaar/linkblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: linkblog.vspx,v 1.1.4.2 2010/09/27 14:45:09 source Exp $
+ -  $Id: linkblog.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/digital_bazaar/summary.vspx b/appsrc/ODS-Blog/templates/digital_bazaar/summary.vspx
index 4761607..0f55bdd 100755
--- a/appsrc/ODS-Blog/templates/digital_bazaar/summary.vspx
+++ b/appsrc/ODS-Blog/templates/digital_bazaar/summary.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 -
--  $Id: summary.vspx,v 1.1.4.2 2010/09/22 13:56:49 source Exp $
+-  $Id: summary.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -
--  Copyright (C) 1998-2006 OpenLink Software
+-  Copyright (C) 1998-2012 OpenLink Software
 -
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/main.vspx b/appsrc/ODS-Blog/templates/main.vspx
index 46f2a92..5af574a 100644
--- a/appsrc/ODS-Blog/templates/main.vspx
+++ b/appsrc/ODS-Blog/templates/main.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: main.vspx,v 1.4.2.1 2010/09/20 10:14:44 source Exp $
+ -  $Id: main.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/micro/default.css b/appsrc/ODS-Blog/templates/micro/default.css
index f29b355..dff5034 100644
--- a/appsrc/ODS-Blog/templates/micro/default.css
+++ b/appsrc/ODS-Blog/templates/micro/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.1.4.2 2010/12/07 10:59:24 source Exp $
+ *  $Id: default.css,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/micro/index.vspx b/appsrc/ODS-Blog/templates/micro/index.vspx
index 8f85d8b..fd2a01b 100644
--- a/appsrc/ODS-Blog/templates/micro/index.vspx
+++ b/appsrc/ODS-Blog/templates/micro/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.1.4.2 2010/12/07 10:59:24 source Exp $
+ -  $Id: index.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/modern/default.css b/appsrc/ODS-Blog/templates/modern/default.css
index 70376aa..333cdc7 100644
--- a/appsrc/ODS-Blog/templates/modern/default.css
+++ b/appsrc/ODS-Blog/templates/modern/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:45 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/modern/index.vspx b/appsrc/ODS-Blog/templates/modern/index.vspx
index 9b8a651..ca17703 100644
--- a/appsrc/ODS-Blog/templates/modern/index.vspx
+++ b/appsrc/ODS-Blog/templates/modern/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:46 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/modern/red.css b/appsrc/ODS-Blog/templates/modern/red.css
index 2a9839f..31c7cbc 100644
--- a/appsrc/ODS-Blog/templates/modern/red.css
+++ b/appsrc/ODS-Blog/templates/modern/red.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: red.css,v 1.3.2.2 2010/09/20 10:14:46 source Exp $
+ *  $Id: red.css,v 1.3.2.3 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/newspaper_view/archive.vspx b/appsrc/ODS-Blog/templates/newspaper_view/archive.vspx
index d536cde..abbee15 100755
--- a/appsrc/ODS-Blog/templates/newspaper_view/archive.vspx
+++ b/appsrc/ODS-Blog/templates/newspaper_view/archive.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: archive.vspx,v 1.1.4.2 2010/09/22 13:56:49 source Exp $
+ -  $Id: archive.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/newspaper_view/default.css b/appsrc/ODS-Blog/templates/newspaper_view/default.css
index ff29242..988c81b 100755
--- a/appsrc/ODS-Blog/templates/newspaper_view/default.css
+++ b/appsrc/ODS-Blog/templates/newspaper_view/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.1.4.3 2010/09/22 13:56:49 source Exp $
+ *  $Id: default.css,v 1.1.4.4 2012/03/08 10:46:13 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/newspaper_view/index.vspx b/appsrc/ODS-Blog/templates/newspaper_view/index.vspx
index 752b6ae..af6c3e6 100755
--- a/appsrc/ODS-Blog/templates/newspaper_view/index.vspx
+++ b/appsrc/ODS-Blog/templates/newspaper_view/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.1.4.3 2010/09/22 13:56:49 source Exp $
+ -  $Id: index.vspx,v 1.1.4.4 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/newspaper_view/linkblog.vspx b/appsrc/ODS-Blog/templates/newspaper_view/linkblog.vspx
index 31b03dd..11fc413 100755
--- a/appsrc/ODS-Blog/templates/newspaper_view/linkblog.vspx
+++ b/appsrc/ODS-Blog/templates/newspaper_view/linkblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: linkblog.vspx,v 1.1.4.2 2010/09/27 14:45:09 source Exp $
+ -  $Id: linkblog.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/newspaper_view/summary.vspx b/appsrc/ODS-Blog/templates/newspaper_view/summary.vspx
index 3f028ef..7295642 100755
--- a/appsrc/ODS-Blog/templates/newspaper_view/summary.vspx
+++ b/appsrc/ODS-Blog/templates/newspaper_view/summary.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: summary.vspx,v 1.1.4.2 2010/09/22 13:56:50 source Exp $
+ -  $Id: summary.vspx,v 1.1.4.3 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/about.vspx b/appsrc/ODS-Blog/templates/openlink/about.vspx
index a3907d5..02094aa 100644
--- a/appsrc/ODS-Blog/templates/openlink/about.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/about.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: about.vspx,v 1.3.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: about.vspx,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/archive.vspx b/appsrc/ODS-Blog/templates/openlink/archive.vspx
index 332f3ee..d62c34a 100644
--- a/appsrc/ODS-Blog/templates/openlink/archive.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/archive.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: archive.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: archive.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/bridge.vspx b/appsrc/ODS-Blog/templates/openlink/bridge.vspx
index 6f76089..0517302 100644
--- a/appsrc/ODS-Blog/templates/openlink/bridge.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/bridge.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bridge.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: bridge.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/category.vspx b/appsrc/ODS-Blog/templates/openlink/category.vspx
index 4623ca3..2f35feb 100644
--- a/appsrc/ODS-Blog/templates/openlink/category.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/category.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: category.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: category.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/channel_list.vspx b/appsrc/ODS-Blog/templates/openlink/channel_list.vspx
index a2fcb2a..5b9b522 100644
--- a/appsrc/ODS-Blog/templates/openlink/channel_list.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/channel_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: channel_list.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: channel_list.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/channels.vspx b/appsrc/ODS-Blog/templates/openlink/channels.vspx
index ac8d7f8..5f28d17 100644
--- a/appsrc/ODS-Blog/templates/openlink/channels.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/channels.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: channels.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: channels.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/channels_ctgs.vspx b/appsrc/ODS-Blog/templates/openlink/channels_ctgs.vspx
index 9794126..2a7aa49 100644
--- a/appsrc/ODS-Blog/templates/openlink/channels_ctgs.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/channels_ctgs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: channels_ctgs.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: channels_ctgs.vspx,v 1.4.2.2 2012/03/08 10:46:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/comments.vspx b/appsrc/ODS-Blog/templates/openlink/comments.vspx
index 0ee2c8c..e04dde8 100644
--- a/appsrc/ODS-Blog/templates/openlink/comments.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/comments.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: comments.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: comments.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/community.vspx b/appsrc/ODS-Blog/templates/openlink/community.vspx
index cac3f11..ddbc0ac 100644
--- a/appsrc/ODS-Blog/templates/openlink/community.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/community.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: community.vspx,v 1.4.2.1 2010/09/20 10:14:46 source Exp $
+ -  $Id: community.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/contacts.vspx b/appsrc/ODS-Blog/templates/openlink/contacts.vspx
index 0ad9454..9f9ef32 100644
--- a/appsrc/ODS-Blog/templates/openlink/contacts.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/contacts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: contacts.vspx,v 1.4.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: contacts.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/default.css b/appsrc/ODS-Blog/templates/openlink/default.css
index 1320fe6..776c62c 100644
--- a/appsrc/ODS-Blog/templates/openlink/default.css
+++ b/appsrc/ODS-Blog/templates/openlink/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.10.2.2 2010/09/20 10:14:47 source Exp $
+ *  $Id: default.css,v 1.10.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/edit.vspx b/appsrc/ODS-Blog/templates/openlink/edit.vspx
index 4564ff9..e4677e2 100644
--- a/appsrc/ODS-Blog/templates/openlink/edit.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: edit.vspx,v 1.4.2.2 2010/09/20 10:14:47 source Exp $
+ -  $Id: edit.vspx,v 1.4.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/edit_comments.vspx b/appsrc/ODS-Blog/templates/openlink/edit_comments.vspx
index 6e0d74f..53dfed5 100644
--- a/appsrc/ODS-Blog/templates/openlink/edit_comments.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/edit_comments.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: edit_comments.vspx,v 1.4.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: edit_comments.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/edit_post.vspx b/appsrc/ODS-Blog/templates/openlink/edit_post.vspx
index 43e249f..2010bc5 100644
--- a/appsrc/ODS-Blog/templates/openlink/edit_post.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/edit_post.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: edit_post.vspx,v 1.5.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: edit_post.vspx,v 1.5.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/edit_tb.vspx b/appsrc/ODS-Blog/templates/openlink/edit_tb.vspx
index bacb7b0..65914a6 100644
--- a/appsrc/ODS-Blog/templates/openlink/edit_tb.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/edit_tb.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: edit_tb.vspx,v 1.4.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: edit_tb.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/errors.vspx b/appsrc/ODS-Blog/templates/openlink/errors.vspx
index 5f4f3c4..5f95181 100644
--- a/appsrc/ODS-Blog/templates/openlink/errors.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/errors.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: errors.vspx,v 1.3.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: errors.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/feed_list.vspx b/appsrc/ODS-Blog/templates/openlink/feed_list.vspx
index f68cad2..b36d9c2 100644
--- a/appsrc/ODS-Blog/templates/openlink/feed_list.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/feed_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: feed_list.vspx,v 1.3.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: feed_list.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/feed_view.vspx b/appsrc/ODS-Blog/templates/openlink/feed_view.vspx
index d1a812d..a70cbe6 100644
--- a/appsrc/ODS-Blog/templates/openlink/feed_view.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/feed_view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: feed_view.vspx,v 1.3.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: feed_view.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/get_blogs.vspx b/appsrc/ODS-Blog/templates/openlink/get_blogs.vspx
index b5b4cf5..efa4c9e 100644
--- a/appsrc/ODS-Blog/templates/openlink/get_blogs.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/get_blogs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: get_blogs.vspx,v 1.3.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: get_blogs.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/get_tags.vspx b/appsrc/ODS-Blog/templates/openlink/get_tags.vspx
index 0a2a0e4..0bbf904 100644
--- a/appsrc/ODS-Blog/templates/openlink/get_tags.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/get_tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: get_tags.vspx,v 1.3.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: get_tags.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/import.vspx b/appsrc/ODS-Blog/templates/openlink/import.vspx
index 79e8611..d4d09dc 100644
--- a/appsrc/ODS-Blog/templates/openlink/import.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/import.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: import.vspx,v 1.1.2.1 2010/09/20 10:14:47 source Exp $
+ -  $Id: import.vspx,v 1.1.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/index.vspx b/appsrc/ODS-Blog/templates/openlink/index.vspx
index c94cf8e..5402c18 100644
--- a/appsrc/ODS-Blog/templates/openlink/index.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.14.2.5 2010/09/27 14:45:09 source Exp $
+ -  $Id: index.vspx,v 1.14.2.6 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/linkblog.vspx b/appsrc/ODS-Blog/templates/openlink/linkblog.vspx
index 6eed82c..bb17223 100644
--- a/appsrc/ODS-Blog/templates/openlink/linkblog.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/linkblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: linkblog.vspx,v 1.5.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: linkblog.vspx,v 1.5.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/list_comments.vspx b/appsrc/ODS-Blog/templates/openlink/list_comments.vspx
index d056a89..20c2979 100644
--- a/appsrc/ODS-Blog/templates/openlink/list_comments.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/list_comments.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: list_comments.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: list_comments.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/login.vspx b/appsrc/ODS-Blog/templates/openlink/login.vspx
index 1ea5a5d..796b7de 100644
--- a/appsrc/ODS-Blog/templates/openlink/login.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: login.vspx,v 1.3.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: login.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/logout.vspx b/appsrc/ODS-Blog/templates/openlink/logout.vspx
index d57ed60..663c7bd 100644
--- a/appsrc/ODS-Blog/templates/openlink/logout.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/logout.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logout.vspx,v 1.3.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: logout.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/member_data.vspx b/appsrc/ODS-Blog/templates/openlink/member_data.vspx
index 4267f1d..268ce98 100644
--- a/appsrc/ODS-Blog/templates/openlink/member_data.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/member_data.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: member_data.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: member_data.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/membership.vspx b/appsrc/ODS-Blog/templates/openlink/membership.vspx
index 68c65d9..eed381d 100644
--- a/appsrc/ODS-Blog/templates/openlink/membership.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/membership.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: membership.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: membership.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/moblog_mime_select.vspx b/appsrc/ODS-Blog/templates/openlink/moblog_mime_select.vspx
index 4d36575..c97b039 100644
--- a/appsrc/ODS-Blog/templates/openlink/moblog_mime_select.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/moblog_mime_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: moblog_mime_select.vspx,v 1.3.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: moblog_mime_select.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/moblog_msg.vspx b/appsrc/ODS-Blog/templates/openlink/moblog_msg.vspx
index bac7b61..3d3c9f3 100644
--- a/appsrc/ODS-Blog/templates/openlink/moblog_msg.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/moblog_msg.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: moblog_msg.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: moblog_msg.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/moblogimage.vspx b/appsrc/ODS-Blog/templates/openlink/moblogimage.vspx
index 8d370c0..b71108d 100644
--- a/appsrc/ODS-Blog/templates/openlink/moblogimage.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/moblogimage.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: moblogimage.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: moblogimage.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/ping.vspx b/appsrc/ODS-Blog/templates/openlink/ping.vspx
index 4776b24..c3c2720 100644
--- a/appsrc/ODS-Blog/templates/openlink/ping.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/ping.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ping.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: ping.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/ping_queue.vspx b/appsrc/ODS-Blog/templates/openlink/ping_queue.vspx
index b50e03a..f8ae40e 100644
--- a/appsrc/ODS-Blog/templates/openlink/ping_queue.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/ping_queue.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ping_queue.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: ping_queue.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/posts.vspx b/appsrc/ODS-Blog/templates/openlink/posts.vspx
index c3d8915..5a9a977 100644
--- a/appsrc/ODS-Blog/templates/openlink/posts.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/posts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: posts.vspx,v 1.4.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: posts.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/register.vspx b/appsrc/ODS-Blog/templates/openlink/register.vspx
index 734b500..ef0c07b 100644
--- a/appsrc/ODS-Blog/templates/openlink/register.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/register.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: register.vspx,v 1.3.2.1 2010/09/20 10:14:48 source Exp $
+ -  $Id: register.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/routing_queue.vspx b/appsrc/ODS-Blog/templates/openlink/routing_queue.vspx
index c181626..5eb7b67 100644
--- a/appsrc/ODS-Blog/templates/openlink/routing_queue.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/routing_queue.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: routing_queue.vspx,v 1.4.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: routing_queue.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/suggest_kwd.vspx b/appsrc/ODS-Blog/templates/openlink/suggest_kwd.vspx
index c11be22..6f458be 100644
--- a/appsrc/ODS-Blog/templates/openlink/suggest_kwd.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/suggest_kwd.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: suggest_kwd.vspx,v 1.3.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: suggest_kwd.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/suggest_tb.vspx b/appsrc/ODS-Blog/templates/openlink/suggest_tb.vspx
index 5f06703..f0d7ee5 100644
--- a/appsrc/ODS-Blog/templates/openlink/suggest_tb.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/suggest_tb.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: suggest_tb.vspx,v 1.3.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: suggest_tb.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/summary.vspx b/appsrc/ODS-Blog/templates/openlink/summary.vspx
index 5115582..9e39461 100644
--- a/appsrc/ODS-Blog/templates/openlink/summary.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/summary.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: summary.vspx,v 1.5.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: summary.vspx,v 1.5.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/tags.vspx b/appsrc/ODS-Blog/templates/openlink/tags.vspx
index 0785aa7..80a4e76 100644
--- a/appsrc/ODS-Blog/templates/openlink/tags.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.4.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: tags.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/templates.vspx b/appsrc/ODS-Blog/templates/openlink/templates.vspx
index 63b8ab9..7300891 100644
--- a/appsrc/ODS-Blog/templates/openlink/templates.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/templates.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: templates.vspx,v 1.4.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: templates.vspx,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/wa.vspx b/appsrc/ODS-Blog/templates/openlink/wa.vspx
index 18ce034..0aa6165 100644
--- a/appsrc/ODS-Blog/templates/openlink/wa.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/wa.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wa.vspx,v 1.3.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: wa.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/wa_left.vspx b/appsrc/ODS-Blog/templates/openlink/wa_left.vspx
index 5d74377..386f163 100644
--- a/appsrc/ODS-Blog/templates/openlink/wa_left.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/wa_left.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wa_left.vspx,v 1.3.2.1 2010/09/20 10:14:49 source Exp $
+ -  $Id: wa_left.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink/wa_right.vspx b/appsrc/ODS-Blog/templates/openlink/wa_right.vspx
index 7b266bc..ed068b7 100644
--- a/appsrc/ODS-Blog/templates/openlink/wa_right.vspx
+++ b/appsrc/ODS-Blog/templates/openlink/wa_right.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wa_right.vspx,v 1.3.2.1 2010/09/20 10:14:50 source Exp $
+ -  $Id: wa_right.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/openlink_classic/default.css b/appsrc/ODS-Blog/templates/openlink_classic/default.css
index 2942fb6..92c1e38 100644
--- a/appsrc/ODS-Blog/templates/openlink_classic/default.css
+++ b/appsrc/ODS-Blog/templates/openlink_classic/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.3.2.1 2010/09/20 10:14:50 source Exp $
+ *  $Id: default.css,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/round_the_corner/default.css b/appsrc/ODS-Blog/templates/round_the_corner/default.css
index 15d91fd..7c6a5a9 100644
--- a/appsrc/ODS-Blog/templates/round_the_corner/default.css
+++ b/appsrc/ODS-Blog/templates/round_the_corner/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:50 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/round_the_corner/index.vspx b/appsrc/ODS-Blog/templates/round_the_corner/index.vspx
index c8c5c3d..7c264aa 100644
--- a/appsrc/ODS-Blog/templates/round_the_corner/index.vspx
+++ b/appsrc/ODS-Blog/templates/round_the_corner/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:50 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/round_wheat/default.css b/appsrc/ODS-Blog/templates/round_wheat/default.css
index 00c74bb..350f0a9 100644
--- a/appsrc/ODS-Blog/templates/round_wheat/default.css
+++ b/appsrc/ODS-Blog/templates/round_wheat/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:50 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/round_wheat/index.vspx b/appsrc/ODS-Blog/templates/round_wheat/index.vspx
index e588a7d..35d6b1a 100644
--- a/appsrc/ODS-Blog/templates/round_wheat/index.vspx
+++ b/appsrc/ODS-Blog/templates/round_wheat/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:50 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/seattle/default.css b/appsrc/ODS-Blog/templates/seattle/default.css
index d1d2002..5d33aa5 100644
--- a/appsrc/ODS-Blog/templates/seattle/default.css
+++ b/appsrc/ODS-Blog/templates/seattle/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.1 2010/09/20 10:14:50 source Exp $
+ *  $Id: default.css,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/seattle/index.vspx b/appsrc/ODS-Blog/templates/seattle/index.vspx
index c3929bb..4d40251 100644
--- a/appsrc/ODS-Blog/templates/seattle/index.vspx
+++ b/appsrc/ODS-Blog/templates/seattle/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:50 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/spring/default.css b/appsrc/ODS-Blog/templates/spring/default.css
index 41da667..8490eb5 100644
--- a/appsrc/ODS-Blog/templates/spring/default.css
+++ b/appsrc/ODS-Blog/templates/spring/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.1 2010/09/20 10:14:50 source Exp $
+ *  $Id: default.css,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/spring/index.vspx b/appsrc/ODS-Blog/templates/spring/index.vspx
index 1a22c18..64276a6 100644
--- a/appsrc/ODS-Blog/templates/spring/index.vspx
+++ b/appsrc/ODS-Blog/templates/spring/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:50 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean/archive.vspx b/appsrc/ODS-Blog/templates/squeaky_clean/archive.vspx
index 830938e..c4c3f31 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean/archive.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean/archive.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: archive.vspx,v 1.3.2.1 2010/09/20 10:14:50 source Exp $
+ -  $Id: archive.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean/default.css b/appsrc/ODS-Blog/templates/squeaky_clean/default.css
index fa12836..e535612 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean/default.css
+++ b/appsrc/ODS-Blog/templates/squeaky_clean/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:50 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean/index.vspx b/appsrc/ODS-Blog/templates/squeaky_clean/index.vspx
index 56d5b28..9a6902d 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean/index.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:51 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean/linkblog.vspx b/appsrc/ODS-Blog/templates/squeaky_clean/linkblog.vspx
index 5309bd0..da290bc 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean/linkblog.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean/linkblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: linkblog.vspx,v 1.3.2.1 2010/09/20 10:14:51 source Exp $
+ -  $Id: linkblog.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean/mr_green_genes.css b/appsrc/ODS-Blog/templates/squeaky_clean/mr_green_genes.css
index 1053cfd..434048f 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean/mr_green_genes.css
+++ b/appsrc/ODS-Blog/templates/squeaky_clean/mr_green_genes.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: mr_green_genes.css,v 1.2.2.2 2010/09/20 10:14:51 source Exp $
+ *  $Id: mr_green_genes.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean/summary.vspx b/appsrc/ODS-Blog/templates/squeaky_clean/summary.vspx
index 750c846..19455b7 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean/summary.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean/summary.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: summary.vspx,v 1.3.2.1 2010/09/20 10:14:51 source Exp $
+ -  $Id: summary.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean_2col/archive.vspx b/appsrc/ODS-Blog/templates/squeaky_clean_2col/archive.vspx
index 669eff7..02ae2b9 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean_2col/archive.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean_2col/archive.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: archive.vspx,v 1.3.2.1 2010/09/20 10:14:51 source Exp $
+ -  $Id: archive.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean_2col/default.css b/appsrc/ODS-Blog/templates/squeaky_clean_2col/default.css
index 7a512b1..277dbcb 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean_2col/default.css
+++ b/appsrc/ODS-Blog/templates/squeaky_clean_2col/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:51 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean_2col/index.vspx b/appsrc/ODS-Blog/templates/squeaky_clean_2col/index.vspx
index 4e0ed4f..d1beb71 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean_2col/index.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean_2col/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:51 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean_2col/linkblog.vspx b/appsrc/ODS-Blog/templates/squeaky_clean_2col/linkblog.vspx
index b8fb4a4..82a0b39 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean_2col/linkblog.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean_2col/linkblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: linkblog.vspx,v 1.3.2.1 2010/09/20 10:14:51 source Exp $
+ -  $Id: linkblog.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean_2col/mr_green_genes.css b/appsrc/ODS-Blog/templates/squeaky_clean_2col/mr_green_genes.css
index 1053cfd..434048f 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean_2col/mr_green_genes.css
+++ b/appsrc/ODS-Blog/templates/squeaky_clean_2col/mr_green_genes.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: mr_green_genes.css,v 1.2.2.2 2010/09/20 10:14:51 source Exp $
+ *  $Id: mr_green_genes.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/squeaky_clean_2col/summary.vspx b/appsrc/ODS-Blog/templates/squeaky_clean_2col/summary.vspx
index 63df308..b1bb4e8 100644
--- a/appsrc/ODS-Blog/templates/squeaky_clean_2col/summary.vspx
+++ b/appsrc/ODS-Blog/templates/squeaky_clean_2col/summary.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: summary.vspx,v 1.3.2.1 2010/09/20 10:14:51 source Exp $
+ -  $Id: summary.vspx,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/thin_clean/default.css b/appsrc/ODS-Blog/templates/thin_clean/default.css
index 9ad5c12..200b441 100644
--- a/appsrc/ODS-Blog/templates/thin_clean/default.css
+++ b/appsrc/ODS-Blog/templates/thin_clean/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:51 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/thin_clean/index.vspx b/appsrc/ODS-Blog/templates/thin_clean/index.vspx
index c5470e4..8099fb5 100644
--- a/appsrc/ODS-Blog/templates/thin_clean/index.vspx
+++ b/appsrc/ODS-Blog/templates/thin_clean/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:51 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/thin_pastel/default.css b/appsrc/ODS-Blog/templates/thin_pastel/default.css
index 615b5ae..1bb292f 100644
--- a/appsrc/ODS-Blog/templates/thin_pastel/default.css
+++ b/appsrc/ODS-Blog/templates/thin_pastel/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.2 2010/09/20 10:14:51 source Exp $
+ *  $Id: default.css,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/templates/thin_pastel/index.vspx b/appsrc/ODS-Blog/templates/thin_pastel/index.vspx
index 5485074..58aec2e 100644
--- a/appsrc/ODS-Blog/templates/thin_pastel/index.vspx
+++ b/appsrc/ODS-Blog/templates/thin_pastel/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.2 2010/09/20 10:14:51 source Exp $
+ -  $Id: index.vspx,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/trackback.sql b/appsrc/ODS-Blog/trackback.sql
index feaa61b..dbf2dbb 100644
--- a/appsrc/ODS-Blog/trackback.sql
+++ b/appsrc/ODS-Blog/trackback.sql
@@ -1,12 +1,12 @@
 --
---  $Id: trackback.sql,v 1.5.2.1 2010/09/20 10:14:43 source Exp $
+--  $Id: trackback.sql,v 1.5.2.2 2012/03/08 10:46:13 source Exp $
 --
 --  MT Trackback support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/uninst.sql b/appsrc/ODS-Blog/uninst.sql
index 4a4fdc9..fbb02cd 100644
--- a/appsrc/ODS-Blog/uninst.sql
+++ b/appsrc/ODS-Blog/uninst.sql
@@ -1,10 +1,10 @@
 --
---  $Id: uninst.sql,v 1.5.2.2 2010/11/09 20:15:17 source Exp $
+--  $Id: uninst.sql,v 1.5.2.3 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/vad_version b/appsrc/ODS-Blog/vad_version
index b146dc5..bb536bd 100644
--- a/appsrc/ODS-Blog/vad_version
+++ b/appsrc/ODS-Blog/vad_version
@@ -1 +1 @@
-1.34.69
+1.34.78
diff --git a/appsrc/ODS-Blog/wa_integration.sql b/appsrc/ODS-Blog/wa_integration.sql
index f2dbcce..3f0adb1 100644
--- a/appsrc/ODS-Blog/wa_integration.sql
+++ b/appsrc/ODS-Blog/wa_integration.sql
@@ -1,10 +1,10 @@
 --
---  $Id: wa_integration.sql,v 1.12.2.3 2010/10/07 13:24:15 source Exp $
+--  $Id: wa_integration.sql,v 1.12.2.4 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/wa_search_blog.sql b/appsrc/ODS-Blog/wa_search_blog.sql
index fdf3f90..0b46de1 100644
--- a/appsrc/ODS-Blog/wa_search_blog.sql
+++ b/appsrc/ODS-Blog/wa_search_blog.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_search_blog.sql,v 1.3.2.1 2010/09/20 10:14:43 source Exp $
+--  $Id: wa_search_blog.sql,v 1.3.2.2 2012/03/08 10:46:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/blog_template_check.xsl b/appsrc/ODS-Blog/widgets/blog_template_check.xsl
index 534317d..435bf15 100644
--- a/appsrc/ODS-Blog/widgets/blog_template_check.xsl
+++ b/appsrc/ODS-Blog/widgets/blog_template_check.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: blog_template_check.xsl,v 1.2.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: blog_template_check.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/blog_tidy.xsl b/appsrc/ODS-Blog/widgets/blog_tidy.xsl
index d5b8ed1..15ed01c 100644
--- a/appsrc/ODS-Blog/widgets/blog_tidy.xsl
+++ b/appsrc/ODS-Blog/widgets/blog_tidy.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: blog_tidy.xsl,v 1.4.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: blog_tidy.xsl,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/calendar.xsl b/appsrc/ODS-Blog/widgets/calendar.xsl
index 47433be..0b00bf7 100644
--- a/appsrc/ODS-Blog/widgets/calendar.xsl
+++ b/appsrc/ODS-Blog/widgets/calendar.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: calendar.xsl,v 1.17.2.9 2010/12/07 10:59:24 source Exp $
+ -  $Id: calendar.xsl,v 1.17.2.10 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/comment_check.xsl b/appsrc/ODS-Blog/widgets/comment_check.xsl
index 612bb25..993e386 100644
--- a/appsrc/ODS-Blog/widgets/comment_check.xsl
+++ b/appsrc/ODS-Blog/widgets/comment_check.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: comment_check.xsl,v 1.2.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: comment_check.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/compat.xsl b/appsrc/ODS-Blog/widgets/compat.xsl
index 5d8708c..4325998 100644
--- a/appsrc/ODS-Blog/widgets/compat.xsl
+++ b/appsrc/ODS-Blog/widgets/compat.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: compat.xsl,v 1.3.2.2 2010/09/20 10:14:52 source Exp $
+ -  $Id: compat.xsl,v 1.3.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/dav_browser.xsl b/appsrc/ODS-Blog/widgets/dav_browser.xsl
index 798e2ec..60ae7cf 100644
--- a/appsrc/ODS-Blog/widgets/dav_browser.xsl
+++ b/appsrc/ODS-Blog/widgets/dav_browser.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dav_browser.xsl,v 1.3.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: dav_browser.xsl,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/error.xsl b/appsrc/ODS-Blog/widgets/error.xsl
index 51e5073..c484214 100644
--- a/appsrc/ODS-Blog/widgets/error.xsl
+++ b/appsrc/ODS-Blog/widgets/error.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: error.xsl,v 1.3.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: error.xsl,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/foaf.xsl b/appsrc/ODS-Blog/widgets/foaf.xsl
index a37d6b9..a4c9043 100644
--- a/appsrc/ODS-Blog/widgets/foaf.xsl
+++ b/appsrc/ODS-Blog/widgets/foaf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: foaf.xsl,v 1.3.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: foaf.xsl,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/main.xsl b/appsrc/ODS-Blog/widgets/main.xsl
index bbf97be..c90fa6e 100644
--- a/appsrc/ODS-Blog/widgets/main.xsl
+++ b/appsrc/ODS-Blog/widgets/main.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: main.xsl,v 1.39.2.13 2010/12/07 10:59:24 source Exp $
+ -  $Id: main.xsl,v 1.39.2.16 2012/03/08 12:03:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -653,6 +653,7 @@ else if (length (self.catid))
  self.vc_add_attribute ('xmlns:rdfs', 'http://www.w3.org/2000/01/rdf-schema#');
  self.vc_add_attribute ('xmlns:sioct', 'http://rdfs.org/sioc/types#');
  self.vc_add_attribute ('xmlns:sioc', 'http://rdfs.org/sioc/ns#');
+ self.vc_add_attribute ('xmlns:cert', 'http://www.w3.org/ns/auth/cert#');
       ]]>
       <xsl:if test="//vm:keep-variable">
       self.restore_vars ();
@@ -875,6 +876,20 @@ else if (length (self.catid))
       <xsl:text>
</xsl:text>
       <?vsp
           }
+          declare rdf_iri varchar;
+
+          rdf_iri := null;
+          if (not isnull (self.editpost))
+            rdf_iri := SIOC..blog_post_iri (self.blogid, self.editpost);
+
+          if (not isnull (self.postid) and not isnull(self.comm_ref))
+            rdf_iri := SIOC..blog_comment_iri (self.blogid, self.postid, self.comm_ref);
+
+          if (not isnull (rdf_iri))
+          {
+            SIOC..rdf_links_header (rdf_iri);
+            SIOC..rdf_links_head (rdf_iri);
+          }
       ?>
       <![CDATA[
       <script type="text/javascript">
@@ -1265,16 +1280,8 @@ window.onload = function (e)
       <xsl:attribute name="hspace">3</xsl:attribute>
       <xsl:attribute name="src">
 	  <xsl:choose>
-	      <xsl:when test="@image">
-		  <?vsp
-		      http(self.custom_img_loc || '<xsl:value-of select="@image"/>');
-		  ?>
-	      </xsl:when>
-	      <xsl:otherwise>
-		  <?vsp
-		      http(self.custom_img_loc || <xsl:value-of select="$default"/>);
-		  ?>
-	      </xsl:otherwise>
+	      <xsl:when test="@image"><?vsp http(self.custom_img_loc || '<xsl:value-of select="@image"/>'); ?></xsl:when>
+	      <xsl:otherwise><?vsp http(self.custom_img_loc || <xsl:value-of select="$default"/>); ?></xsl:otherwise>
 	  </xsl:choose>
       </xsl:attribute>
   </xsl:template>
diff --git a/appsrc/ODS-Blog/widgets/make_sp.xsl b/appsrc/ODS-Blog/widgets/make_sp.xsl
index a688c7c..4b404cf 100644
--- a/appsrc/ODS-Blog/widgets/make_sp.xsl
+++ b/appsrc/ODS-Blog/widgets/make_sp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: make_sp.xsl,v 1.2.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: make_sp.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/opml2ocs.xsl b/appsrc/ODS-Blog/widgets/opml2ocs.xsl
index 7eaa131..7e0f767 100644
--- a/appsrc/ODS-Blog/widgets/opml2ocs.xsl
+++ b/appsrc/ODS-Blog/widgets/opml2ocs.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: opml2ocs.xsl,v 1.2.2.1 2010/09/20 10:14:52 source Exp $
+ -  $Id: opml2ocs.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/opml2ocs03.xsl b/appsrc/ODS-Blog/widgets/opml2ocs03.xsl
index 72ad9b8..0384b0d 100644
--- a/appsrc/ODS-Blog/widgets/opml2ocs03.xsl
+++ b/appsrc/ODS-Blog/widgets/opml2ocs03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: opml2ocs03.xsl,v 1.3.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: opml2ocs03.xsl,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/render.xsl b/appsrc/ODS-Blog/widgets/render.xsl
index e10258c..11a3d14 100644
--- a/appsrc/ODS-Blog/widgets/render.xsl
+++ b/appsrc/ODS-Blog/widgets/render.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: render.xsl,v 1.2.2.2 2010/09/20 10:14:53 source Exp $
+ -  $Id: render.xsl,v 1.2.2.3 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss11.xsl b/appsrc/ODS-Blog/widgets/rss11.xsl
index e0b5e43..1341ab6 100644
--- a/appsrc/ODS-Blog/widgets/rss11.xsl
+++ b/appsrc/ODS-Blog/widgets/rss11.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss11.xsl,v 1.3.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: rss11.xsl,v 1.3.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss2atom.xsl b/appsrc/ODS-Blog/widgets/rss2atom.xsl
index 9278af5..a0d3743 100644
--- a/appsrc/ODS-Blog/widgets/rss2atom.xsl
+++ b/appsrc/ODS-Blog/widgets/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.4.2.4 2010/11/09 20:15:17 source Exp $
+ -  $Id: rss2atom.xsl,v 1.4.2.5 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss2atom03.xsl b/appsrc/ODS-Blog/widgets/rss2atom03.xsl
index da34dfb..6e875a6 100644
--- a/appsrc/ODS-Blog/widgets/rss2atom03.xsl
+++ b/appsrc/ODS-Blog/widgets/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.4.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss2mrss.xsl b/appsrc/ODS-Blog/widgets/rss2mrss.xsl
index 4272176..3e0f41b 100644
--- a/appsrc/ODS-Blog/widgets/rss2mrss.xsl
+++ b/appsrc/ODS-Blog/widgets/rss2mrss.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2mrss.xsl,v 1.2.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: rss2mrss.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss2rdf.xsl b/appsrc/ODS-Blog/widgets/rss2rdf.xsl
index 12e9541..473d9ab 100644
--- a/appsrc/ODS-Blog/widgets/rss2rdf.xsl
+++ b/appsrc/ODS-Blog/widgets/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.6.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.6.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss2wml.xsl b/appsrc/ODS-Blog/widgets/rss2wml.xsl
index 582d481..8e62c4c 100644
--- a/appsrc/ODS-Blog/widgets/rss2wml.xsl
+++ b/appsrc/ODS-Blog/widgets/rss2wml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2wml.xsl,v 1.2.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: rss2wml.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/rss2xbel.xsl b/appsrc/ODS-Blog/widgets/rss2xbel.xsl
index ea17d33..066481f 100644
--- a/appsrc/ODS-Blog/widgets/rss2xbel.xsl
+++ b/appsrc/ODS-Blog/widgets/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/store.xsl b/appsrc/ODS-Blog/widgets/store.xsl
index 0d27f75..fafb5da 100644
--- a/appsrc/ODS-Blog/widgets/store.xsl
+++ b/appsrc/ODS-Blog/widgets/store.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: store.xsl,v 1.2.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: store.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/store_post.xsl b/appsrc/ODS-Blog/widgets/store_post.xsl
index 2dcf17c..322a306 100644
--- a/appsrc/ODS-Blog/widgets/store_post.xsl
+++ b/appsrc/ODS-Blog/widgets/store_post.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: store_post.xsl,v 1.4.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: store_post.xsl,v 1.4.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Blog/widgets/xbel.xsl b/appsrc/ODS-Blog/widgets/xbel.xsl
index 0cee1ee..272b30a 100644
--- a/appsrc/ODS-Blog/widgets/xbel.xsl
+++ b/appsrc/ODS-Blog/widgets/xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xbel.xsl,v 1.2.2.1 2010/09/20 10:14:53 source Exp $
+ -  $Id: xbel.xsl,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/Makefile.am b/appsrc/ODS-Bookmark/Makefile.am
index d67f527..b08373d 100644
--- a/appsrc/ODS-Bookmark/Makefile.am
+++ b/appsrc/ODS-Bookmark/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -46,6 +46,7 @@ clean-local:
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Bookmark/Makefile.in b/appsrc/ODS-Bookmark/Makefile.in
index b2942be..ac177b5 100644
--- a/appsrc/ODS-Bookmark/Makefile.in
+++ b/appsrc/ODS-Bookmark/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -309,6 +311,7 @@ CLEANFILES = \
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Bookmark/make_vad.sh b/appsrc/ODS-Bookmark/make_vad.sh
index 7b1963b..735f132 100755
--- a/appsrc/ODS-Bookmark/make_vad.sh
+++ b/appsrc/ODS-Bookmark/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.58.2.23 2011/02/03 10:26:14 source Exp $
+#  $Id: make_vad.sh,v 1.58.2.29 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.7.92"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -63,11 +63,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -91,6 +86,57 @@ else
   myrm=$RM
 fi
 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -226,7 +272,7 @@ sticker_init() {
   echo "  <name package=\"Bookmarks\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Bookmark Manager\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -238,8 +284,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.76.96\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-10-08 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.85.05\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-12-29 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -270,7 +316,6 @@ sticker_init() {
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/bookmark/sql/bmk-a-update.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/bookmark/sql/DET_Bookmark.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/bookmark/sql/bmk-a-ods.sql', 1, 'report', $ISDAV);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/bookmark/sql/bmk-a-soap.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/bookmark/sql/bmk-a-api.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/bookmark/sql/sioc_bmk.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "    ]]>" >> $STICKER
@@ -381,6 +426,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -397,7 +443,6 @@ virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_bookmark_dav.vad
 chmod 644 ods_bookmark_filesystem.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -407,5 +452,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Bookmark/sql/DET_Bookmark.sql b/appsrc/ODS-Bookmark/sql/DET_Bookmark.sql
index ae5aba3..ed3772e 100644
--- a/appsrc/ODS-Bookmark/sql/DET_Bookmark.sql
+++ b/appsrc/ODS-Bookmark/sql/DET_Bookmark.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Bookmark.sql,v 1.11.2.1 2010/09/20 10:14:54 source Exp $
+--  $Id: DET_Bookmark.sql,v 1.11.2.2 2012/03/08 10:46:14 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-api.sql b/appsrc/ODS-Bookmark/sql/bmk-a-api.sql
index 817eff0..8e92160 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-a-api.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-a-api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-a-api.sql,v 1.10.2.3 2010/09/20 10:14:54 source Exp $
+--  $Id: bmk-a-api.sql,v 1.10.2.6 2012/03/08 10:46:14 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -92,9 +92,11 @@ create procedure ODS.ODS_API."bookmark.get" (
 
   inst_id := (select BD_DOMAIN_ID from BMK.WA.BOOKMARK_DOMAIN where BD_ID = bookmark_id);
   if (not ods_check_auth (uname, inst_id, 'author'))
-  {
     return ods_auth_failed ();
-  }
+
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   ods_describe_iri (SIOC..bmk_post_iri (inst_id, bookmark_id));
   return '';
 }
@@ -122,6 +124,9 @@ create procedure ODS.ODS_API."bookmark.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   rc := BMK.WA.bookmark_update (
           -1,
           inst_id,
@@ -220,6 +225,9 @@ create procedure ODS.ODS_API."bookmark.folder.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   rc := BMK.WA.folder_id (inst_id, path);
 
   return ods_serialize_int_res (rc);
@@ -244,6 +252,9 @@ create procedure ODS.ODS_API."bookmark.folder.delete" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   if (not exists (select 1 from BMK.WA.FOLDER where F_DOMAIN_ID = inst_id and F_PATH = path))
     return ods_serialize_sql_error ('37000', 'The item is not found');
   delete from BMK.WA.FOLDER where F_DOMAIN_ID = inst_id and F_PATH = path;
@@ -274,6 +285,9 @@ create procedure ODS.ODS_API."bookmark.import" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   -- get content
   if (lcase (sourceType) = 'string')
   {
@@ -326,6 +340,9 @@ create procedure ODS.ODS_API."bookmark.export" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   if (lcase (contentType) not in ('netscape', 'xbel'))
   	signal ('BMK05', 'The content type must be Netscape or XBEL.');
 
@@ -601,6 +618,9 @@ create procedure ODS.ODS_API."bookmark.publication.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   _type := ODS.ODS_API.bookmark_type_check (destinationType, destination);
   options := vector ('type', _type, 'name', destination, 'user', userName, 'password', userPassword, 'folderPath', folderPath, 'tagsInclude', tagsInclude, 'tagsExclude', tagsExclude);
   insert into BMK.WA.EXCHANGE (EX_DOMAIN_ID, EX_TYPE, EX_NAME, EX_UPDATE_TYPE, EX_UPDATE_PERIOD, EX_UPDATE_FREQ, EX_OPTIONS)
@@ -809,6 +829,9 @@ create procedure ODS.ODS_API."bookmark.subscription.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Bookmark'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   _type := ODS.ODS_API.bookmark_type_check (sourceType, source);
   options := vector ('type', _type, 'name', source, 'user', userName, 'password', userPassword, 'folderPath', folderPath, 'tags', tags);
   insert into BMK.WA.EXCHANGE (EX_DOMAIN_ID, EX_TYPE, EX_NAME, EX_UPDATE_TYPE, EX_UPDATE_PERIOD, EX_UPDATE_FREQ, EX_OPTIONS)
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-code.sql b/appsrc/ODS-Bookmark/sql/bmk-a-code.sql
index 7dd121d..432391d 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-a-code.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-a-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-a-code.sql,v 1.56.2.16 2010/11/19 16:49:51 source Exp $
+--  $Id: bmk-a-code.sql,v 1.56.2.23 2012/03/12 14:24:11 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -140,11 +140,11 @@ create procedure BMK.WA.session_restore(
   {
     account_id := U_ID;
     }
-  account_rights := BMK.WA.access_rights (domain_id, account_id);
   return vector (
                  'domain_id', domain_id,
                  'account_id',   account_id,
-                 'account_rights', account_rights
+                 'account_rights', BMK.WA.account_rights (domain_id, account_id),
+                 'person_rights', BMK.WA.person_rights (domain_id, account_id)
                );
 }
 ;
@@ -219,7 +219,7 @@ create procedure BMK.WA.check_grants (in role_name varchar, in page_name varchar
 
 -------------------------------------------------------------------------------
 --
-create procedure BMK.WA.access_rights (
+create procedure BMK.WA.person_rights (
   in domain_id integer,
   in account_id integer)
 {
@@ -288,6 +288,65 @@ create procedure BMK.WA.access_rights (
 
 -------------------------------------------------------------------------------
 --
+create procedure BMK.WA.account_rights (
+  in domain_id integer,
+  in account_id integer)
+{
+  declare rc varchar;
+
+  if (domain_id = -1)
+    return 'R';
+
+  if (domain_id = -2)
+    return null;
+
+  if (BMK.WA.check_admin (account_id))
+    return 'W';
+
+  if (exists (select 1
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = account_id
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_MEMBER_TYPE = 1
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_ID = domain_id))
+    return 'W';
+
+  if (exists (select 1
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = account_id
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_MEMBER_TYPE = 2
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_ID = domain_id))
+    return 'W';
+
+  if (exists (select 1
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = account_id
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_ID = domain_id))
+    return 'R';
+
+  if (exists (select 1
+                from DB.DBA.WA_INSTANCE
+               where WAI_ID = domain_id
+                 and WAI_IS_PUBLIC = 1))
+    return 'R';
+
+  return null;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure BMK.WA.wa_home_link ()
 {
 	return case when registry_get ('wa_home_link') = 0 then '/ods/' else registry_get ('wa_home_link') end;
@@ -941,7 +1000,7 @@ create procedure BMK.WA.bookmark_import(
   in tags varchar := '',
   in progress_id varchar := null)
 {
-  declare V any;
+  declare V, V2 any;
 
   -- check netscape format
   if (isnull(strcasestr(S, '<!doctype netscape-bookmark-file-1>')))
@@ -954,30 +1013,50 @@ create procedure BMK.WA.bookmark_import(
   S := replace(S, '&', '&');
   V := xtree_doc (S, 2);
   V := xpath_eval('//dl', V);
-  if (V is null)
+  if (isnull (V))
     goto _xbel;
 
   BMK..bookmark_import_netscape (domain_id, folder_id, tags, xml_cut(V), progress_id);
   goto _end;
 
 _xbel:;
-  -- check xbel format
-  V := xtree_doc (S);
-  V := xpath_eval('/xbel', BMK.WA.string2xml(S));
-  if (V is null)
+  -- check XBEL format
+  --
+  V := BMK.WA.string2xml (S);
+  if (isnull (V))
+    goto _end;
+  V2 := xpath_eval('/xbel', V);
+  if (isnull (V2))
+    goto _rss;
+  BMK..bookmark_import_xbel (domain_id, folder_id, tags, xml_cut(V2), progress_id, 'xbel');
+  goto _end;
+
+_rss:;
+  -- check RSS format
+  --
+  V2 := xpath_eval ('/rss/channel/item|/rss/item|/RDF/item|/Channel/items/item', V);
+  if (isnull (V2))
+    goto _atom;
+  BMK..bookmark_import_rss (domain_id, folder_id, tags, V2, progress_id);
+  goto _end;
+
+_atom:;
+  -- check Atom format
+  --
+  V2 := xpath_eval ('/feed/entry', V);
+  if (isnull (V2))
     goto _delicious;
-  BMK..bookmark_import_xbel (domain_id, folder_id, tags, xml_cut(V), progress_id, 'xbel');
+  BMK..bookmark_import_atom (domain_id, folder_id, tags, V2, progress_id);
   goto _end;
 
 _delicious:;
-  V := xtree_doc (S);
-  V := xpath_eval('/posts', V);
-  if (V is null)
+  V2 := xpath_eval('/posts', V);
+  if (isnull (V2))
   {
     signal ('BMK01', 'The content being imported was not of a format ODS-Bookmarks understands!<>');
     goto _end;
   }
-  BMK..bookmark_import_delicious (domain_id, folder_id, tags, xml_cut(V), progress_id);
+  BMK..bookmark_import_delicious (domain_id, folder_id, tags, xml_cut(V2), progress_id);
 
 _end:
     return;
@@ -993,8 +1072,8 @@ create procedure BMK.WA.bookmark_import_netscape(
   in V any,
   in progress_id varchar)
 {
-  declare tmp, UID, T, Q any;
-  declare N, M integer;
+  declare tmp, T, Q any;
+  declare N integer;
 
   if (V is null)
     return;
@@ -1006,20 +1085,9 @@ create procedure BMK.WA.bookmark_import_netscape(
     if (T is null)
       goto _folder;
     Q := xpath_eval('/dl/dt/a/@href', V, N);
-    UID := xpath_eval('/dl/dt/a/@id', V, N);
-    commit work;
 
-    connection_set ('__bookmark_import', '1');
-    tmp := BMK.WA.bookmark_update (-1, domain_id, cast (Q as varchar), cast (T as varchar), null, tags, folder_id);
-    connection_set ('__bookmark_import', '0');
+    BMK.WA.bookmark_import_update (domain_id, Q, T, null, tags, folder_id, progress_id);
 
-	  if (not is_empty_or_null (progress_id))
-	  {
-	    if  (cast(registry_get ('bookmark_action_' || progress_id) as varchar) = 'stop')
-	      return;
-	    M := cast (registry_get('bookmark_index_' || progress_id) as integer) + 1;
-	    registry_set ('bookmark_index_' || progress_id, cast (M as varchar));
-	  }
     N := N + 1;
   }
 _folder:
@@ -1050,8 +1118,8 @@ create procedure BMK.WA.bookmark_import_xbel(
   in progress_id varchar,
   in tag varchar)
 {
-  declare tmp, T, Q, D any;
-  declare N, M integer;
+  declare T, Q, D any;
+  declare N integer;
 
   if (V is null)
     return;
@@ -1066,21 +1134,12 @@ create procedure BMK.WA.bookmark_import_xbel(
     Q := xpath_eval(sprintf('/%s/bookmark[%d]/@href', tag, N), V, 1);
     if (Q is null)
       goto _folder;
+
     T := BMK.WA.wide2utf(xpath_eval(sprintf('string(/%s/bookmark[%d]/title/text())', tag, N), V, 1));
     D := BMK.WA.wide2utf(xpath_eval(sprintf('string(/%s/bookmark[%d]/desc/text())', tag, N), V, 1));
-    commit work;
 
-    connection_set ('__bookmark_import', '1');
-    tmp := BMK.WA.bookmark_update (-1, domain_id, cast(Q as varchar), cast(T as varchar), D, tags, folder_id);
-    connection_set ('__bookmark_import', '0');
+    BMK.WA.bookmark_import_update (domain_id, Q, T, D, tags, folder_id, progress_id);
 
-	  if (not is_empty_or_null (progress_id))
-	  {
-	    if  (cast(registry_get ('bookmark_action_' || progress_id) as varchar) = 'stop')
-	      return;
-	    M := cast (registry_get('bookmark_index_' || progress_id) as integer) + 1;
-	    registry_set('bookmark_index_' || progress_id, cast (M as varchar));
-	  }
     N := N + 1;
   }
 _folder:
@@ -1100,6 +1159,91 @@ _exit:
 
 -----------------------------------------------------
 --
+create procedure BMK.WA.bookmark_import_rss (
+  in domain_id integer,
+  in folder_id integer,
+  in tags varchar,
+  in V any,
+  in progress_id varchar)
+{
+  declare items, item, T, Q, D any;
+  declare N, L integer;
+
+  items := xpath_eval ('/rss/channel/item|/rss/item|/RDF/item|/Channel/items/item', V, 0);
+  L := length (items);
+  for (N := 0; N < L; N := N + 1)
+  {
+    item := xml_cut(items[N]);
+    T := serialize_to_UTF8_xml (xpath_eval ('string(/item/title)', item, 1));
+    D := xpath_eval ('[ xmlns:content="http://purl.org/rss/1.0/modules/content/" ] string(/item/content:encoded)', item, 1);
+    if (is_empty_or_null (D))
+      D := xpath_eval ('string(/item/description)', item, 1);
+
+    D := serialize_to_UTF8_xml (D);
+    Q := cast (xpath_eval ('/item/link', item, 1) as varchar);
+    if (isnull (Q))
+    {
+      Q := cast (xpath_eval ('[xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"] /item/@rdf:about', item, 1) as varchar);
+      if ((isnull (Q)) and isnull (cast(xpath_eval ('/item/guid[@isPermaLink = "false"]', item, 1) as varchar)))
+        Q := cast (xpath_eval ('/item/guid', item, 1) as varchar);
+    }
+
+    BMK.WA.bookmark_import_update (domain_id, Q, T, D, tags, folder_id, progress_id);
+  }
+}
+;
+
+-----------------------------------------------------
+--
+create procedure BMK.WA.bookmark_import_atom (
+  in domain_id integer,
+  in folder_id integer,
+  in tags varchar,
+  in V any,
+  in progress_id varchar)
+{
+  declare items, item, contents, T, Q, D any;
+  declare N, L integer;
+
+  items := xpath_eval ('/feed/entry', V, 0);
+  L := length (items);
+  for (N := 0; N < L; N := N + 1)
+  {
+    item := xml_cut (items[N]);
+    T := serialize_to_UTF8_xml (xpath_eval ('string(/entry/title)', item, 1));
+    if (xpath_eval ('/entry/content[@type = "application/xhtml+xml" or @type="xhtml"]', item) is not null)
+    {
+      contents := xpath_eval ('/entry/content/*', item, 0);
+      if (length (contents) = 1)
+      {
+        D := serialize_to_UTF8_xml (contents[0]);
+      }
+      else
+      {
+        D := '<div>';
+        foreach (any content in contents) do
+          D := concat(D, BMK.WA.xml2string(content));
+
+        D := concat(D, '</div>');
+      }
+    }
+    else
+    {
+      D := xpath_eval ('string(/entry/content)', item, 1);
+      if (is_empty_or_null(D))
+        D := xpath_eval ('string(/entry/summary)', item, 1);
+
+      D := serialize_to_UTF8_xml (D);
+    }
+    Q := cast (xpath_eval ('/entry/link[@rel="alternate"]/@href', item, 1) as varchar);
+
+    BMK.WA.bookmark_import_update (domain_id, Q, T, D, tags, folder_id, progress_id);
+  }
+}
+;
+
+-----------------------------------------------------
+--
 create procedure BMK.WA.bookmark_import_delicious(
   in domain_id integer,
   in folder_id integer,
@@ -1108,7 +1252,7 @@ create procedure BMK.WA.bookmark_import_delicious(
   in progress_id varchar)
 {
   declare tmp, T, Q, D, H, nTags, TG, TGA any;
-  declare N, M integer;
+  declare N integer;
 
   if (V is null)
     return;
@@ -1130,12 +1274,38 @@ create procedure BMK.WA.bookmark_import_delicious(
     {
       TGA := split_and_decode(TG, 0, '\0\0 ');
       foreach (any tag in TGA) do
+      {
         if (BMK.WA.validate_tag (tag))
           nTags := concat(nTags, tag, ',');
     }
+    }
     nTags := trim(tags || ',' || nTags, ',');
+
+    BMK.WA.bookmark_import_update (domain_id, Q, T, D, nTags, folder_id, progress_id);
+
+    N := N + 1;
+  }
+_exit:
+  return;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure BMK.WA.bookmark_import_update (
+  in domain_id integer,
+  in Q any,
+  in T any,
+  in D any,
+  in tags varchar,
+  in folder_id integer,
+  in progress_id varchar)
+{
+  declare id, M integer;
+
+  commit work;
     connection_set ('__bookmark_import', '1');
-    BMK.WA.bookmark_update (-1, domain_id, cast (Q as varchar), cast (T as varchar), D, nTags, folder_id, H);
+  id := BMK.WA.bookmark_update (-1, domain_id, cast (Q as varchar), cast (T as varchar), D, tags, folder_id);
     connection_set ('__bookmark_import', '0');
 
 	  if (not is_empty_or_null (progress_id))
@@ -1145,10 +1315,7 @@ create procedure BMK.WA.bookmark_import_delicious(
 	    M := cast (registry_get('bookmark_index_' || progress_id) as integer) + 1;
 	    registry_set('bookmark_index_' || progress_id, cast (M as varchar));
     }
-    N := N + 1;
-  }
-_exit:
-  return;
+  return id;
 }
 ;
 
@@ -1216,16 +1383,19 @@ create procedure BMK.WA.bookmark_export_tmp (
 create procedure BMK.WA.bookmark_rights (
   in domain_id integer,
   in id integer,
-  in access_role varchar)
+  in account_rights varchar,
+  in person_rights varchar)
 {
   declare retValue varchar;
 
   retValue := '';
   if (exists (select 1 from BMK.WA.BOOKMARK_DOMAIN where BD_ID = id and BD_DOMAIN_ID = domain_id))
   {
+    if (account_rights < person_rights)
     retValue := BMK.WA.acl_check (domain_id, id);
+
     if (retValue = '')
-      retValue := access_role;
+      retValue := account_rights;
   }
   return retValue;
 }
@@ -1315,16 +1485,17 @@ create procedure BMK.WA.folder_id(
   declare aPath any;
 
   folder_id := null;
-  if (not is_empty_or_null(folder_name))
+  if (not is_empty_or_null (trim (folder_name)))
   {
     aPath := split_and_decode(trim(folder_name, '/'),0,'\0\0/');
     for (i := 0; i < length(aPath); i := i + 1)
     {
       if (i = 0)
       {
-        if (not exists (select 1 from BMK.WA.FOLDER where F_DOMAIN_ID = domain_id and F_NAME = aPath[i] and F_PARENT_ID is null))
-          insert into BMK.WA.FOLDER (F_DOMAIN_ID, F_NAME, F_PATH) values (domain_id, aPath[i], '');
-        folder_id := (select F_ID from BMK.WA.FOLDER where F_DOMAIN_ID = domain_id and F_NAME = aPath[i] and F_PARENT_ID is null);
+        if (not exists (select 1 from BMK.WA.FOLDER where F_DOMAIN_ID = domain_id and F_NAME = aPath[i] and coalesce (F_PARENT_ID, -1) = -1))
+          insert into BMK.WA.FOLDER (F_DOMAIN_ID, F_PARENT_ID, F_NAME, F_PATH) values (domain_id, -1, aPath[i], '');
+
+        folder_id := (select F_ID from BMK.WA.FOLDER where F_DOMAIN_ID = domain_id and F_NAME = aPath[i] and coalesce (F_PARENT_ID, -1) = -1);
       }
       else
       {
@@ -1341,9 +1512,9 @@ create procedure BMK.WA.folder_id(
 -------------------------------------------------------------------------------
 --
 create procedure BMK.WA.folder_create(
-  inout domain_id varchar,
-  in folder_name any,
-  in folder_id any)
+  inout domain_id integer,
+  in folder_name varchar,
+  in folder_id integer)
 {
   folder_name := trim(folder_name);
   if (folder_name <> '')
@@ -1362,8 +1533,8 @@ create procedure BMK.WA.folder_create(
 -------------------------------------------------------------------------------
 --
 create procedure BMK.WA.folder_create2(
-  in domain_id varchar,
-  in parent_id varchar,
+  in domain_id integer,
+  in parent_id integer,
   in folder_name any)
 {
   declare folder_id integer;
@@ -1578,7 +1749,8 @@ create procedure BMK.WA.sfolder_sql(
   in maxRows varchar := '',
   in nodeType varchar := 'b')
 {
-  declare S, T, tmp, where2, delimiter2 varchar;
+  declare tmp any;
+  declare S, T, where2, delimiter2 varchar;
 
   where2 := ' \n ';
   delimiter2 := '\n and ';
@@ -2018,6 +2190,25 @@ create procedure BMK.WA.tags2unique(
 
 -------------------------------------------------------------------------------
 --
+create procedure BMK.WA.tags2delicious (
+  inout tags varchar)
+{
+  declare aVector any;
+  declare aResult varchar;
+  declare N, M integer;
+
+  aResult := '';
+  aVector := BMK.WA.tags2vector(tags);
+  for (N := 0; N < length(aVector); N := N + 1)
+  {
+    aResult := aResult || ' ' || replace(aVector[N], ' ', '_');
+  }
+  return aResult;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure BMK.WA.tags_exchangeTest (
   inout tagsEntry any,
   inout tagsInclude any := null,
@@ -2613,7 +2804,7 @@ create procedure BMK.WA.exchange_exec_internal (
             path := sprintf ('%s&extended=%U', path, tmp);
           tmp := cast (xpath_eval ('@tags', post) as varchar);
           if (not is_empty_or_null (tmp))
-            path := sprintf ('%s&tags=%U', path, tmp);
+            path := sprintf ('%s&tags=%U', path, BMK.WA.tags2delicious(tmp));
 
           rc := http_client (path, _user, _password, 'POST', null, null, null, null);
         }
@@ -2847,8 +3038,6 @@ create procedure BMK.WA.export_rss_sqlx_int(
 }
 ;
 
---  http('    XMLELEMENT(\'http://www.openlinksw.com/weblog/:modified\', BMK.WA.dt_iso8601 (EFI_PUBLISH_DATE)), \n', retValue);
-
 -------------------------------------------------------------------------------
 --
 create procedure BMK.WA.export_rss_sqlx(
@@ -3082,10 +3271,9 @@ create procedure BMK.WA.xtree_doc (
 create procedure BMK.WA.xml_set(
   in id varchar,
   inout pXml varchar,
-  in value varchar)
+  in value any)
 {
   declare aEntity any;
-
   {
     declare exit handler for SQLSTATE '*' {
       pXml := xtree_doc('<?xml version="1.0" encoding="UTF-8"?><settings />');
@@ -3134,8 +3322,11 @@ create procedure BMK.WA.string2xml (
   in content varchar,
   in mode integer := 0)
 {
-  if (mode = 0) {
-    declare exit handler for sqlstate '*' { goto _html; };
+  if (mode = 0)
+  {
+    declare exit handler for sqlstate '*' {
+      goto _html;
+    };
     return xml_tree_doc (xml_tree (content, 0));
   }
 _html:;
@@ -3251,6 +3442,18 @@ create procedure BMK.WA.stringCut (
 
 -------------------------------------------------------------------------------
 --
+create procedure BMK.WA.isVector (
+  inout aVector any)
+{
+  if (isarray (aVector) and not isstring (aVector))
+    return 1;
+
+  return 0;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure BMK.WA.vector_unique(
   inout aVector any,
   in minLength integer := 0)
@@ -3787,7 +3990,7 @@ create procedure BMK.WA.dt_user2gmt(
 --
 create procedure BMK.WA.dt_value(
   in pDate datetime,
-  in pUser datetime := null)
+  in pUser varchar := null)
 {
   if (isnull(pDate))
     return pDate;
@@ -3887,21 +4090,23 @@ create procedure BMK.WA.dt_deformat(
   d := 0;
   m := 0;
   y := 0;
-  while (N <= length(pFormat)) {
+  while (N <= length (pFormat))
+  {
     ch := upper(substring(pFormat, N, 1));
     if (ch = 'M')
       m := BMK.WA.dt_deformat_tmp(pString, I);
     if (ch = 'D')
       d := BMK.WA.dt_deformat_tmp(pString, I);
-    if (ch = 'Y') {
+    if (ch = 'Y')
+    {
       y := BMK.WA.dt_deformat_tmp(pString, I);
       if (y < 50)
         y := 2000 + y;
       if (y < 100)
         y := 1900 + y;
-    };
+    }
     N := N + 1;
-  };
+  }
   return stringdate(concat(cast(m as varchar), '.', cast(d as varchar), '.', cast(y as varchar)));
 }
 ;
@@ -3910,16 +4115,16 @@ create procedure BMK.WA.dt_deformat(
 --
 create procedure BMK.WA.dt_deformat_tmp(
   in S varchar,
-  inout N varchar)
+  inout N integer)
 {
-  declare
-    V any;
+  declare V any;
 
   V := regexp_parse('[0-9]+', S, N);
-  if (length(V) > 1) {
-    N := aref(V,1);
-    return atoi(subseq(S, aref(V, 0), aref(V,1)));
-  };
+  if (length(V) > 1)
+  {
+    N := V[1];
+    return atoi (subseq (S, V[0], V[1]));
+  }
   N := N + 1;
   return 0;
 }
@@ -3933,7 +4138,8 @@ create procedure BMK.WA.dt_reformat(
   in pOutFormat varchar := 'm.d.Y')
 {
   return BMK.WA.dt_format(BMK.WA.dt_deformat(pString, pInFormat), pOutFormat);
-};
+}
+;
 
 -----------------------------------------------------------------------------------------
 --
@@ -3987,9 +4193,10 @@ create procedure BMK.WA.data (
 create procedure BMK.WA.test_clear (
   in S any)
 {
-  declare N integer;
+  S := substring (S, 1, coalesce (strstr (S, '<>'), length (S)));
+  S := substring (S, 1, coalesce (strstr (S, '\nin'), length (S)));
 
-  return substring(S, 1, coalesce(strstr(S, '<>'), length(S)));
+  return S;
 }
 ;
 
@@ -4000,8 +4207,8 @@ create procedure BMK.WA.test (
   in params any := null)
 {
   declare valueType, valueClass, valueName, valueMessage, tmp any;
-
-  declare exit handler for SQLSTATE '*' {
+  declare exit handler for SQLSTATE '*'
+  {
     if (not is_empty_or_null(valueMessage))
       signal ('TEST', valueMessage);
     if (__SQL_STATE = 'EMPTY')
@@ -4029,6 +4236,7 @@ create procedure BMK.WA.test (
     --resignal;
   };
 
+  if (isstring (value))
   value := trim(value);
   if (is_empty_or_null(params))
     return value;
@@ -4037,23 +4245,26 @@ create procedure BMK.WA.test (
   valueType := coalesce(get_keyword('type', params), get_keyword('class', params));
   valueName := get_keyword('name', params, 'Field');
   valueMessage := get_keyword('message', params, '');
+
   tmp := get_keyword('canEmpty', params);
-  if (isnull(tmp)) {
+  if (isnull(tmp))
+  {
     if (not isnull(get_keyword('minValue', params))) {
       tmp := 0;
     } else if (get_keyword('minLength', params, 0) <> 0) {
       tmp := 0;
     }
   }
-  if (not isnull(tmp) and (tmp = 0) and is_empty_or_null(value)) {
+  if (not isnull(tmp) and (tmp = 0) and is_empty_or_null(value))
+  {
     signal('EMPTY', '');
   } else if (is_empty_or_null(value)) {
     return value;
   }
 
-  value := BMK.WA.validate2 (valueClass, value);
-
-  if (valueType = 'integer') {
+  value := BMK.WA.validate2 (valueClass, cast (value as varchar));
+  if (valueType = 'integer')
+  {
     tmp := get_keyword('minValue', params);
     if ((not isnull(tmp)) and (value < tmp))
       signal('MIN', cast(tmp as varchar));
@@ -4985,63 +5196,3 @@ create procedure BMK.WA.news_comment_get_cn_type (in f_name varchar)
   return ext;
 }
 ;
-
--------------------------------------------------------------------------------
---
-create procedure BMK.WA.obj2json (
-  in o any,
-  in d integer := 2)
-{
-  declare N, Nn, M, Mm integer;
-  declare R, T any;
-  declare retValue any;
-
-	if (d = 0)
-	  return '[maximum depth achieved]';
-
-  T := vector ('\b', '\\b', '\t', '\\t', '\n', '\\n', '\f', '\\f',	'\r', '\\r', '"', '\\"', '\\', '\\\\');
-	retValue := '';
-	if (isnumeric (o))
-	{
-		retValue := cast (o as varchar);
-	}
-	else if (isstring (o))
-	{
-		Nn := length(o);
-		for (N := 0; N < Nn; N := N + 1)
-		{
-			R := chr (o[N]);
-		  Mm := length(T);
-		  for (M := 0; M < Mm; M := M + 2)
-		  {
-				if (R = T[M])
-				  R := T[M+1];
-			}
-			retValue := retValue || R;
-		}
-		retValue := '"' || retValue || '"';
-	}
-	else if (isarray (o))
-	{
-		retValue := '[';
-		Nn := length(o);
-		for (N := 0; N < Nn; N := N + 1)
-		{
-		  retValue := retValue || BMK.WA.obj2json (o[N], d-1);
-		  if (N <> length(o)-1)
-			  retValue := retValue || ',';
-		}
-		retValue := retValue || ']';
-	}
-	return retValue;
-}
-;
-
--------------------------------------------------------------------------------
---
-create procedure BMK.WA.json2obj (
-  in o any)
-{
-  return json_parse (o);
-}
-;
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-ods.sql b/appsrc/ODS-Bookmark/sql/bmk-a-ods.sql
index a1c502c..f0e13c9 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-a-ods.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-a-ods.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-a-ods.sql,v 1.2.2.1 2010/09/20 10:14:54 source Exp $
+--  $Id: bmk-a-ods.sql,v 1.2.2.2 2012/03/08 10:46:14 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-soap.sql b/appsrc/ODS-Bookmark/sql/bmk-a-soap.sql
deleted file mode 100644
index 5414600..0000000
--- a/appsrc/ODS-Bookmark/sql/bmk-a-soap.sql
+++ /dev/null
@@ -1,159 +0,0 @@
---
---  $Id: bmk-a-soap.sql,v 1.2.2.1 2010/09/20 10:14:54 source Exp $
---
---  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
---  project.
---
---  Copyright (C) 1998-2007 OpenLink Software
---
---  This project 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; only version 2 of the License, dated June 1991.
---
---  This program 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
---  General Public License for more details.
---
---  You should have received a copy of the GNU General Public License along
---  with this program; if not, write to the Free Software Foundation, Inc.,
---  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
---
-
------------------------------------------------------------------------------
---
-create procedure DBA.DB.bookmark_import (
-  in pUser varchar,
-  in pPassword varchar,
-  in pInstance varchar,
-  in pSource varchar,
-  in pSourceType varchar,
-  in pTags varchar := '') returns varchar
-{
-  declare user_id, domain_id integer;
-  declare content varchar;
-  declare tmp any;
-
-  user_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = pUser and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = pPassword);
-  if (isnull (user_id))
-  	signal ('BMK01', 'Bad user name or password');
-  domain_id := BMK.WA.domain_id (pInstance);
-  if (isnull (domain_id))
-  	signal ('BMK02', 'Bad instance name');
-  if (not exists (select 1
-                   from WA_MEMBER,
-                        WA_INSTANCE
-                  where WAM_USER = user_id
-                    and WAM_INST = WAI_NAME
-                    and WAI_ID   = domain_id))
-  	signal ('BMK03', 'User not a member of the instance');
-
-
-  -- get content
-  if (lcase(pSourceType) = 'string') 
-  {
-    content := pSource;
-  } 
-  else if (lcase(pSourceType) = 'webdav') 
-  {
-    content := BMK.WA.dav_content (BMK.WA.host_url () || pSource, pUser, pPassword);
-  } 
-  else if (lcase(pSourceType) = 'url') 
-  {
-    content := BMK.WA.dav_content (pSource);
-  } 
-  else 
-  {
-	  signal ('BMK04', 'The source type must be string, WebDAV or URL.');
-  }
-
-  pTags := trim (pTags);
-  BMK.WA.test (pTags, vector ('name', 'Tags', 'class', 'tags'));
-  tmp := BMK.WA.tags2vector (pTags);
-  tmp := BMK.WA.vector_unique (tmp);
-  pTags := BMK.WA.vector2tags (tmp);
-
-  -- import content
-  set_user_id ('dba');
-  if (is_empty_or_null (content))
-    signal ('BMK04', 'Bad import source!');
-
-  BMK.WA.bookmark_import (content, domain_id, user_id, null, pTags, null);
-  
-  return 1;
-}
-;
-
------------------------------------------------------------------------------
---
-create procedure DBA.DB.bookmark_export (
-  in pUser varchar,
-  in pPassword varchar,
-  in pInstance varchar,
-  in pContentType varchar := 'Netscape') returns varchar
-{
-  declare user_id, domain_id integer;
-
-  user_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = pUser and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = pPassword);
-  if (isnull (user_id))
-  	signal ('BMK01', 'Bad user name or password');
-  domain_id := BMK.WA.domain_id (pInstance);
-  if (isnull (domain_id))
-  	signal ('BMK02', 'Bad instance name');
-  if (not exists (select 1
-                   from WA_MEMBER,
-                        WA_INSTANCE
-                  where WAM_USER = user_id
-                    and WAM_INST = WAI_NAME
-                    and WAI_ID   = domain_id))
-  	signal ('BMK03', 'User not a member of the instance');
-
-  if (not ((lcase (pContentType) = 'netscape') or (lcase (pContentType) = 'xbel')))
-  	signal ('BMK05', 'The content type must be Netscape or XBEL.');
-
-  set_user_id ('dba');
-  return BMK.WA.dav_content (sprintf('%s/bookmark/%d/export.vspx?did=%d&output=BMK&file=export&format=%s', BMK.WA.host_url (), domain_id, domain_id, pContentType));
-}
-;
-
------------------------------------------------------------------------------
---
-create procedure DBA.DB.bookmark_update (
-  in pUser varchar,
-  in pPassword varchar,
-  in pInstance varchar,
-  in pBookmarkUri varchar,
-  in pBookmarkName varchar,
-  in pBookmarkDescription varchar := '',
-  in pBookmarkFolderPath varchar := '') returns varchar
-{
-  declare user_id, domain_id, folder_id integer;
-
-  user_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = pUser and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = pPassword);
-  if (isnull (user_id))
-  	signal ('BMK01', 'Bad user name or password');
-  domain_id := BMK.WA.domain_id (pInstance);
-  if (isnull (domain_id))
-  	signal ('BMK02', 'Bad instance name');
-  if (not exists (select 1
-                   from WA_MEMBER,
-                        WA_INSTANCE
-                  where WAM_USER = user_id
-                    and WAM_INST = WAI_NAME
-                    and WAI_ID   = domain_id))
-  	signal ('BMK03', 'User not a member of the instance');
-
-  set_user_id ('dba');
-  folder_id := BMK.WA.folder_id(domain_id, pBookmarkFolderPath);
-  return BMK.WA.bookmark_update (-1, domain_id, pBookmarkUri, pBookmarkName, pBookmarkDescription, folder_id);
-}
-;
-
-grant execute on DBA.DB.bookmark_import to SOAP_BOOKMARK
-;
-
-grant execute on DBA.DB.bookmark_export to SOAP_BOOKMARK
-;
-
-grant execute on DBA.DB.bookmark_update to SOAP_BOOKMARK
-;
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-table.sql b/appsrc/ODS-Bookmark/sql/bmk-a-table.sql
index 6dc147f..52bcfb5 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-a-table.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-a-table.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-a-table.sql,v 1.22.2.2 2010/11/19 16:49:51 source Exp $
+--  $Id: bmk-a-table.sql,v 1.22.2.5 2012/03/08 11:52:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -237,7 +237,7 @@ create procedure BMK.WA.tags_update (
 
 -------------------------------------------------------------------------------
 --
--- Conatins domain bookmarks
+-- Contains domain bookmarks
 --
 -------------------------------------------------------------------------------
 BMK.WA.exec_no_error('
@@ -694,17 +694,17 @@ BMK.WA.exec_no_error ('
 --
 create procedure BMK.WA.drop_index ()
 {
-  if (registry_get ('bmk_index_version') = '2')
+  if (registry_get ('bmk_index_version') = '3')
     return;
 
   BMK.WA.exec_no_error ('drop table BMK.WA.BOOKMARK_DOMAIN_BD_DESCRIPTION_WORDS');
-  registry_set ('bmk_index_version', '2');
+  registry_set ('bmk_index_version', '3');
 }
 ;
 BMK.WA.drop_index ();
 
 BMK.WA.exec_no_error('
-  create text index on BMK.WA.BOOKMARK_DOMAIN (BD_DESCRIPTION) with key BD_ID not insert clustered with (BD_ID, BD_UPDATED) using function
+  create text index on BMK.WA.BOOKMARK_DOMAIN (BD_DESCRIPTION) with key BD_ID not insert clustered with (BD_ID, BD_UPDATED) using function language \'x-ViDoc\'
 ');
 
 -------------------------------------------------------------------------------
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-update.sql b/appsrc/ODS-Bookmark/sql/bmk-a-update.sql
index 2803c8e..63a8322 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-a-update.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-a-update.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-a-update.sql,v 1.2.2.3 2010/10/07 13:24:04 source Exp $
+--  $Id: bmk-a-update.sql,v 1.2.2.4 2012/03/08 10:46:14 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/sql/bmk-a-wa.sql b/appsrc/ODS-Bookmark/sql/bmk-a-wa.sql
index 29d14f6..2a3b423 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-a-wa.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-a-wa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-a-wa.sql,v 1.14.2.5 2010/09/22 13:57:02 source Exp $
+--  $Id: bmk-a-wa.sql,v 1.14.2.7 2012/03/08 10:46:14 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -101,14 +101,15 @@ create procedure BMK.WA.vhost()
                realm    => 'wa',
                def_page => 'bookmarks.vspx'
              );
-  USER_CREATE ('SOAP_BOOKMARK', md5 (cast (now() as varchar)), vector ('DISABLED', 1));
-  USER_SET_QUALIFIER ('SOAP_BOOKMARK', 'DBA');
 
+  -- old SOAP
+  -- api user & url
+  BMK.WA.exec_no_error ('USER_DROP (\'SOAP_BOOKMARK\')');
   VHOST_REMOVE (lpath => '/dataspace/services/bookmark');
-  VHOST_DEFINE (lpath => '/dataspace/services/bookmark',
-                ppath => '/SOAP/',
-                soap_user => 'SOAP_BOOKMARK',
-                soap_opts => vector('Use', 'literal', 'XML-RPC', 'no' )); 
+  -- procs
+  BMK.WA.exec_no_error ('DROP procedure DBA.DB.bookmark_import');
+  BMK.WA.exec_no_error ('DROP procedure DBA.DB.bookmark_export');
+  BMK.WA.exec_no_error ('DROP procedure DBA.DB.bookmark_update');
 }
 ;
 
diff --git a/appsrc/ODS-Bookmark/sql/bmk-d.sql b/appsrc/ODS-Bookmark/sql/bmk-d.sql
index 6d02569..8aa2117 100644
--- a/appsrc/ODS-Bookmark/sql/bmk-d.sql
+++ b/appsrc/ODS-Bookmark/sql/bmk-d.sql
@@ -1,10 +1,10 @@
 --
---  $Id: bmk-d.sql,v 1.15.2.5 2010/11/19 16:49:51 source Exp $
+--  $Id: bmk-d.sql,v 1.15.2.9 2012/03/08 13:13:47 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -21,8 +21,7 @@
 --
 ------------------------------------------------------------------------------
 -- bmk-d.sql
--- script for cleaning wa instalation.
--- Copyright (C) 2004 OpenLink Software
+-- script for cleaning wa installation.
 ------------------------------------------------------------------------------
 
 create procedure BMK.WA.uninstall ()
@@ -99,6 +98,7 @@ registry_remove ('bmk_table_update');
 registry_remove ('bmk_index_version');
 registry_remove ('bmk_path_update');
 registry_remove ('bmk_path_upgrade2');
+registry_remove ('bmk_services_update');
 
 -- Procedures
 create procedure BMK.WA.drop_procedures()
diff --git a/appsrc/ODS-Bookmark/sql/sioc_bmk.sql b/appsrc/ODS-Bookmark/sql/sioc_bmk.sql
index fec982b..a9e9781 100644
--- a/appsrc/ODS-Bookmark/sql/sioc_bmk.sql
+++ b/appsrc/ODS-Bookmark/sql/sioc_bmk.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_bmk.sql,v 1.19.2.9 2010/10/13 12:15:19 source Exp $
+--  $Id: sioc_bmk.sql,v 1.19.2.13 2012/03/08 11:52:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -105,8 +105,13 @@ create procedure fill_ods_bookmark_sioc2 (
   declare id, deadl, cnt integer;
   declare domain_id, bookmark_id integer;
   declare graph_iri, forum_iri, creator_iri, bookmark_iri, iri varchar;
+
  {
+    -- init services
+    SIOC..fill_ods_bookmark_services ();
+
     for (select WAI_ID,
+                WAI_IS_PUBLIC,
                 WAI_TYPE_NAME,
                 WAI_NAME,
                 WAI_ACL
@@ -116,7 +121,7 @@ create procedure fill_ods_bookmark_sioc2 (
     {
       graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
       exec (sprintf ('sparql clear graph <%s>', graph_iri));
-      SIOC..wa_instance_acl_insert (WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
+      SIOC..wa_instance_acl_insert (WAI_IS_PUBLIC, WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
       for (select BD_DOMAIN_ID, BD_ID, BD_ACL
              from BMK..BOOKMARK_DOMAIN
             where BD_DOMAIN_ID = WAI_ID and BD_ACL is not null) do
@@ -161,7 +166,7 @@ create procedure fill_ods_bookmark_sioc2 (
           order by BD_ID) do
       {
       bookmark_iri := SIOC..bmk_post_iri (BD_DOMAIN_ID, BD_ID);
-      graph_iri := SIOC..get_graph_new (null, coalesce (_access_mode, WAI_IS_PUBLIC), bookmark_iri);
+      graph_iri := SIOC..get_graph_new (coalesce (_access_mode, WAI_IS_PUBLIC), bookmark_iri);
       forum_iri := SIOC..bmk_iri (coalesce (_wai_name, WAI_NAME));
       creator_iri := SIOC..user_iri (WAM_USER);
 
@@ -191,7 +196,34 @@ create procedure fill_ods_bookmark_sioc2 (
 
 -------------------------------------------------------------------------------
 --
-create procedure clean_ods_bookmark_sioc2 (
+create procedure fill_ods_bookmark_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('bookmark.new', 'bookmark.import', 'bookmark.export', 'bookmark.publication.new', 'bookmark.subscription.new', 'bookmark.options.set',  'bookmark.options.get');
+  ods_object_services (graph_iri, 'bookmark', 'ODS Bookmark instance services', svc_functions);
+
+  -- item
+  svc_functions := vector ('bookmark.get', 'bookmark.edit', 'bookmark.delete', 'bookmark.comment.new', 'bookmark.annotation.new');
+  ods_object_services (graph_iri, 'bookmark/item', 'ODS Bookmark item services', svc_functions);
+
+  -- item comment
+  svc_functions := vector ('bookmark.comment.get', 'bookmark.comment.delete');
+  ods_object_services (graph_iri, 'bookmark/item/comment', 'ODS Bookmark comment services', svc_functions);
+
+  -- item annotation
+  svc_functions := vector ('bookmark.annotation.get', 'bookmark.annotation.claim', 'bookmark.annotation.delete');
+  ods_object_services (graph_iri, 'bookmark/item/annotation', 'ODS Bookmark annotation services', svc_functions);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure clean_ods_bookmark_sioc (
   in _wai_name varchar := null,
   in _access_mode integer := null)
 {
@@ -229,9 +261,9 @@ create procedure clean_ods_bookmark_sioc2 (
           order by BD_ID) do
     {
       bookmark_iri := SIOC..bmk_post_iri (BD_DOMAIN_ID, BD_ID);
-      graph_iri := SIOC..get_graph_new (WAI_ID, coalesce (_access_mode, WAI_IS_PUBLIC), bookmark_iri);
+      graph_iri := SIOC..get_graph_new (coalesce (_access_mode, WAI_IS_PUBLIC), bookmark_iri);
 
-      bookmark_domain_delete (graph_iri, BD_DOMAIN_ID, BD_ID);
+      SIOC..bookmark_domain_delete (graph_iri, BD_DOMAIN_ID, BD_ID);
 
       cnt := cnt + 1;
       if (mod (cnt, 500) = 0)
@@ -247,22 +279,6 @@ create procedure clean_ods_bookmark_sioc2 (
 
 -------------------------------------------------------------------------------
 --
-create procedure ods_bookmark_services (
-  in graph_iri varchar, 
-  in forum_iri varchar,
-  in wai_id varchar := null,
-  in wai_name varchar := null)
-{
-  declare svc_iri varchar;
-  
-  -- dbg_obj_print (now (), 'ods_bookmark_services');
-  svc_iri := sprintf ('http://%s%s/services/bookmark', get_cname(), get_base_path ());
-  ods_sioc_service (graph_iri, svc_iri, forum_iri, null, 'text/xml', svc_iri||'/services.wsdl', svc_iri, 'SOAP');
-}
-;
-
--------------------------------------------------------------------------------
---
 create procedure bookmark_domain_insert (
   in graph_iri varchar,
   in forum_iri varchar,
@@ -300,7 +316,7 @@ create procedure bookmark_domain_insert (
           and WAM_INST = WAI_NAME
             and U_ID = WAM_USER) do
   {
-      graph_iri := SIOC..get_graph_new (WAI_ID, WAI_IS_PUBLIC, bookmark_iri);
+      graph_iri := SIOC..get_graph_new (WAI_IS_PUBLIC, bookmark_iri);
       forum_iri := SIOC..bmk_iri (WAI_NAME);
       creator_iri := SIOC..user_iri (WAM_USER);
 
@@ -316,6 +332,9 @@ create procedure bookmark_domain_insert (
   SIOC..ods_sioc_post (graph_iri, bookmark_iri, forum_iri, creator_iri, name, created, updated, uri, description, null, linksTo);
   SIOC..scot_tags_insert (domain_id, bookmark_iri, tags);
 
+  -- bookmark services
+  SIOC..ods_object_services_dettach (graph_iri, bookmark_iri, 'bookmark/item');
+
   SIOC..bookmark_comments_insert (graph_iri, forum_iri, domain_id, bookmark_id);
   SIOC..bookmark_annotations_insert (graph_iri, domain_id, bookmark_id);
 }
@@ -337,11 +356,12 @@ create procedure bookmark_domain_delete (
   bookmark_iri := SIOC..bmk_post_iri (domain_id, bookmark_id);
   if (isnull (graph_iri))
   {
-    graph_iri := SIOC..get_graph_new (domain_id, null, bookmark_iri);
+    graph_iri := SIOC..get_graph_new (BMK.WA.domain_is_public (domain_id), bookmark_iri);
     if (isnull (graph_iri))
       return;
   }
   SIOC..delete_quad_s_or_o (graph_iri, bookmark_iri, bookmark_iri);
+  SIOC..ods_object_services_attach (graph_iri, bookmark_iri, 'bookmark/item');
   SIOC..bookmark_comments_delete (graph_iri, domain_id, bookmark_id);
   SIOC..bookmark_annotations_delete (graph_iri, domain_id, bookmark_id);
 }
@@ -569,7 +589,7 @@ create procedure bmk_comment_insert (
   master_iri := SIOC..bmk_post_iri (domain_id, master_id);
 	if (isnull (graph_iri))
 		{
-    graph_iri := get_graph_new (domain_id, null, master_iri);
+    graph_iri := get_graph_new (BMK.WA.domain_is_public (domain_id), master_iri);
     if (isnull (graph_iri))
       return;
 		}
@@ -584,7 +604,8 @@ create procedure bmk_comment_insert (
     return;
 
       foaf_maker (graph_iri, u_url, u_name, u_mail);
-      ods_sioc_post (graph_iri, comment_iri, forum_iri, null, title, last_update, last_update, null, comment, null, null, u_url);
+  SIOC..ods_sioc_post (graph_iri, comment_iri, forum_iri, null, title, last_update, last_update, null, comment, null, null, u_url);
+  SIOC..ods_object_services_attach (graph_iri, comment_iri, 'bookmark/item/comment');
   DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, sioc_iri ('has_reply'), comment_iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, comment_iri, sioc_iri ('reply_of'), master_iri);
     }
@@ -609,12 +630,13 @@ create procedure bmk_comment_delete (
   master_iri := SIOC..bmk_post_iri (domain_id, master_id);
   if (isnull (graph_iri))
   {
-    graph_iri := SIOC..get_graph_new (domain_id, null, master_iri);
+    graph_iri := SIOC..get_graph_new (BMK.WA.domain_is_public (domain_id), master_iri);
     if (isnull (graph_iri))
       return;
   }
   comment_iri := bmk_comment_iri (domain_id, master_id, comment_id);
   delete_quad_s_or_o (graph_iri, comment_iri, comment_iri);
+  SIOC..ods_object_services_dettach (graph_iri, comment_iri, 'bookmark/item/comment');
 }
 ;
 
@@ -742,8 +764,7 @@ create procedure bmk_annotation_insert (
 	inout created datetime,
 	inout updated datetime)
 {
-	declare master_iri, annotattion_iri varchar;
-
+  declare master_iri, annotation_iri varchar;
 	declare exit handler for sqlstate '*'
 	{
 		sioc_log_message (__SQL_MESSAGE);
@@ -754,19 +775,20 @@ create procedure bmk_annotation_insert (
   master_iri := SIOC..bmk_post_iri (domain_id, master_id);
 	if (isnull (graph_iri))
 		{
-    graph_iri := get_graph_new (domain_id, null, master_iri);
+    graph_iri := get_graph_new (BMK.WA.domain_is_public (domain_id), master_iri);
     if (isnull (graph_iri))
       return;
 		}
-		annotattion_iri := bmk_annotation_iri (domain_id, master_id, annotation_id);
-  DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, an_iri ('annotates'), master_iri);
-  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotattion_iri);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('author'), author);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('body'), body);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('created'), created);
-  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('modified'), updated);
-
-	  bmk_claims_insert (graph_iri, annotattion_iri, claims);
+  annotation_iri := bmk_annotation_iri (domain_id, master_id, annotation_id);
+  DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, an_iri ('annotates'), master_iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotation_iri);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('author'), author);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('body'), body);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('created'), created);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('modified'), updated);
+
+  bmk_claims_insert (graph_iri, annotation_iri, claims);
+  SIOC..ods_object_services_attach (graph_iri, annotation_iri, 'bookmark/item/annotation');
 	}
 ;
 
@@ -779,7 +801,7 @@ create procedure bmk_annotation_delete (
   inout annotation_id integer,
   inout claims any)
 {
-  declare master_iri, annotattion_iri varchar;
+  declare master_iri, annotation_iri varchar;
 	declare exit handler for sqlstate '*'
 	{
 		sioc_log_message (__SQL_MESSAGE);
@@ -790,12 +812,13 @@ create procedure bmk_annotation_delete (
   if (isnull (graph_iri))
   {
     master_iri := SIOC..bmk_post_iri (domain_id, master_id);
-    graph_iri := SIOC..get_graph_new (domain_id, null, master_iri);
+    graph_iri := SIOC..get_graph_new (BMK.WA.domain_is_public (domain_id), master_iri);
     if (isnull (graph_iri))
       return;
   }
-	annotattion_iri := bmk_annotation_iri (domain_id, master_id, annotation_id);
-  SIOC..delete_quad_s_or_o (graph_iri, annotattion_iri, annotattion_iri);
+  annotation_iri := bmk_annotation_iri (domain_id, master_id, annotation_id);
+  SIOC..delete_quad_s_or_o (graph_iri, annotation_iri, annotation_iri);
+  SIOC..ods_object_services_dettach (graph_iri, annotation_iri, 'bookmark/item/annotation');
 }
 ;
 
@@ -803,7 +826,7 @@ create procedure bmk_annotation_delete (
 --
 create procedure bmk_claims_insert (
   in graph_iri varchar,
-  in annotattion_iri varchar,
+  in annotation_iri varchar,
   in claims any)
 {
   declare N integer;
@@ -820,7 +843,7 @@ create procedure bmk_claims_insert (
     } else {
       cPedicate := ODS.ODS_API."ontology.denormalize" (cPedicate);
   }
-    DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, cPedicate, cValue);
+    DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, cPedicate, cValue);
 }
 }
 ;
@@ -895,7 +918,21 @@ create procedure ods_bookmark_sioc_init ()
 
 -------------------------------------------------------------------------------
 --
--- Bookmrks RDF Views
+create procedure BMK.WA.tmp_update ()
+{
+  if (registry_get ('bmk_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_bookmark_services();
+  registry_set ('bmk_services_update', '1');
+}
+;
+
+BMK.WA.tmp_update ();
+
+-------------------------------------------------------------------------------
+--
+-- Bookmarks RDF Views
 --
 -------------------------------------------------------------------------------
 use DB;
diff --git a/appsrc/ODS-Bookmark/vad_version b/appsrc/ODS-Bookmark/vad_version
new file mode 100644
index 0000000..8704603
--- /dev/null
+++ b/appsrc/ODS-Bookmark/vad_version
@@ -0,0 +1 @@
+1.12.43
diff --git a/appsrc/ODS-Bookmark/www/ajax.vsp b/appsrc/ODS-Bookmark/www/ajax.vsp
index 488bbae..be01a43 100644
--- a/appsrc/ODS-Bookmark/www/ajax.vsp
+++ b/appsrc/ODS-Bookmark/www/ajax.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: ajax.vsp,v 1.9.2.6 2010/10/07 13:24:04 source Exp $
+--  $Id: ajax.vsp,v 1.9.2.9 2012/03/08 11:52:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -21,14 +21,13 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 
-  declare N, M, id, _domain_id, _account_id integer;
+  declare N, M, _domain_id, _account_id integer;
   declare sid, realm, action, subAction, node, nodePath varchar;
   declare nodes, parts, sessionData, returnData any;
 
   sid := get_keyword ('sid', params, '');
   realm := get_keyword ('realm', params, '');
 
-  id := cast (get_keyword ('id', params, '0') as integer);
   action := get_keyword ('a', params, '');
   subAction := get_keyword ('sa', params, '');
 
@@ -38,6 +37,9 @@
 
   if (action = 'visited')
   {
+    declare id integer;
+
+    id := cast (get_keyword ('id', params, '0') as integer);
     BMK.WA.bookmark_visited_set (_domain_id, id, now ());
   }
   else if (action = 'load')
@@ -45,7 +47,7 @@
     declare progressID, progressIndex any;
 
     progressID := cast (get_keyword ('id', params, msec_time()) as varchar);
-    progressIndex := registry_get ('feed_' || progressID || '_index');
+    progressIndex := registry_get ('bookmark_index_' || progressID);
 	  if (subAction = 'stop')
 	  {
 	    registry_set ('bookmark_action_' || progressID, 'stop');
@@ -150,7 +152,7 @@
     }
     http_rewrite ();
     http_header ('Content-Type: text/plain\r\n');
-    http (BMK.WA.obj2json(returnData, 3));
+    http (ODS..obj2json (returnData, 5));
   }
   else if (action = 'tags')
   {
@@ -204,7 +206,7 @@
           tmp := split_and_decode (trim (params[N+1]), 0, '\0\0,');
           for (M := 0; M < length (tmp); M := M + 1)
           {
-            if (ODRIVE.WA.odrive_user_id (trim (tmp[M])) <> -1)
+            if (not isnull (BMK.WA.account_id (trim (tmp[M]))))
               grants := grants || ',' || tmp[M];
           }
         }
@@ -413,7 +415,7 @@
 	_formExit:;
     http_rewrite ();
     http_header ('Content-Type: text/plain\r\n');
-    http (BMK.WA.obj2json(returnData));
+    http (ODS..obj2json(returnData, 5));
   }
   else if (action = 'about')
   {
diff --git a/appsrc/ODS-Bookmark/www/annotea.vspx b/appsrc/ODS-Bookmark/www/annotea.vspx
index e4fa45e..fe9c847 100644
--- a/appsrc/ODS-Bookmark/www/annotea.vspx
+++ b/appsrc/ODS-Bookmark/www/annotea.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: annotea.vspx,v 1.8.2.5 2010/10/07 13:24:04 source Exp $
+ -  $Id: annotea.vspx,v 1.8.2.8 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -41,9 +41,11 @@
   <vm:pagetitle>Annotation page</vm:pagetitle>
   <vm:popup_pagewrapper>
     <vm:variables>
-      <v:variable persist="0" name="v_mode" type="varchar" default="'show'"/>
+      <v:variable persist="0" name="v_sid" param-name="sid" type="varchar" />
+      <v:variable persist="0" name="v_realm" param-name="realm" type="varchar" />
+      <v:variable persist="0" name="v_mode" param-name="mode" type="varchar" default="'show'"/>
       <v:variable persist="0" name="v_oid" param-name="oid" type="integer" />
-      <v:variable persist="0" name="v_id" type="integer" />
+      <v:variable persist="0" name="v_id" param-name="id" type="integer" />
       <v:variable persist="0" name="v_author" type="varchar" default="''" />
       <v:variable persist="0" name="v_body" type="varchar" default="''" />
       <v:variable persist="0" name="v_claims" type="any" default="null" />
@@ -51,8 +53,8 @@
       <v:variable name="v_tabNo" param-name="tabNo" type="varchar" default="0" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <input type="hidden" name="sid"   id="sid"   value="<?V self.v_sid ?>" />
+      <input type="hidden" name="realm" id="realm" value="<?V self.v_realm ?>" />
       <div class="form-header">
         Free Text Annotation: '<?V BMK.WA.utf2wide ((select coalesce(BD_NAME, '~ no title ~') from BMK.WA.BOOKMARK_DOMAIN where BD_ID = self.v_oid)) ?>'
       </div>
@@ -73,7 +75,7 @@
                 </v:on-post>
               </v:button>
             </div>
-            <table id="annotations" class="BMK_grid" cellspacing="0" style="border: 0;">
+            <table class="ODS_grid ANN_grid">
             </table>
           </v:template>
 
@@ -81,7 +83,7 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
+                <tr>
                   <td>
                     No annotations
                   </td>
@@ -90,13 +92,25 @@
             </v:template>
 
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
+              <?vsp
+                 declare row vspx_row_template;
+                 row := control;
+              ?>
               <table>
                 <tr>
                   <td width="1%" nowrap="nowrap">
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), BMK.WA.dt_value ((control as vspx_row_template).te_column_value('A_CREATED'))); ?>
+                    <?vsp self.showTDValue (row.te_column_value('A_ID'), BMK.WA.dt_value (row.te_column_value('A_CREATED'))); ?>
                   </td>
                   <td>
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_AUTHOR')); ?>
+                    <?vsp
+                      declare id, iri any;
+
+                      id := row.te_column_value('A_ID');
+                      iri := BMK.WA.url_fix (SIOC..bmk_annotation_iri (self.domain_id, self.v_oid, id), self.v_sid, self.v_realm);
+                      http (sprintf ('<a href="%V">', iri));
+                      self.showTDValue (id, row.te_column_value('A_AUTHOR'));
+                      http ('</a>');
+                    ?>
                   </td>
                   <td width="1%" nowrap="nowrap">
                     <v:button action="simple" value="edit" xhtml_title="Edit" xhtml_class="button">
@@ -126,7 +140,7 @@
                 <tr>
                   <td />
                   <td colspan="2">
-                    <i><?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_BODY')); ?></i>
+                    <i><?vsp self.showTDValue (row.te_column_value('A_ID'), row.te_column_value('A_BODY')); ?></i>
                   </td>
                 </tr>
               </table>
@@ -157,6 +171,8 @@
                        self.v_claims
                   from BMK.WA.ANNOTATIONS
                  where A_ID = self.v_id;
+
+                self.rdf_iri := SIOC..bmk_annotation_iri (self.domain_id, self.v_oid, self.v_id);
               }
             ]]>
           </v:before-data-bind>
@@ -207,14 +223,12 @@
                 <table>
                   <tr>
                     <td width="800px">
-                      <table id="c_tbl" class="form-list" cellspacing="0">
-                  <thead class="sortHeader">
+                      <table id="c_tbl" class="ODS_grid">
+                        <thead>
             <tr>
-                            <th>Relation</th>
-                            <th width="70%">Value</th>
-                            <th width="1%">
-                              Action
-                            </th>
+                            <th width="50%">Relation</th>
+                            <th width="50%">Value</th>
+                            <th class="action">Action</th>
                     </tr>
                   </thead>
                   		  <![CDATA[
@@ -294,11 +308,6 @@
                 </div>
         </vm:if>
       </div>
-      <script>
-        <![CDATA[
-          coloriseTable('annotations');
-        ]]>
-      </script>
     </vm:pagebody>
   </vm:popup_pagewrapper>
 </v:page>
diff --git a/appsrc/ODS-Bookmark/www/bmk_login.vspx b/appsrc/ODS-Bookmark/www/bmk_login.vspx
index ea98db6..f11e8ef 100644
--- a/appsrc/ODS-Bookmark/www/bmk_login.vspx
+++ b/appsrc/ODS-Bookmark/www/bmk_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bmk_login.vspx,v 1.9.2.4 2010/10/07 13:24:04 source Exp $
+ -  $Id: bmk_login.vspx,v 1.9.2.6 2012/03/08 11:52:37 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -34,7 +34,7 @@
       if (page_name = 'error.vspx')
         return;
 
-      if (isnull (self.account_rights) and not is_empty_or_null (self.sid))
+      if (isnull (self.person_rights) and not is_empty_or_null (self.sid))
       {
         self.vc_redirect (sprintf ('/ods/error.vspx?__PAGE=%U&__SQL_STATE=%U&__SQL_MESSAGE=%U', 'home.vspx', '23023', 'You have no access rights for the application!'));
         return;
@@ -56,10 +56,10 @@
         return;
       }
 
-      if (BMK.WA.check_grants (self.account_rights, page_name))
+      if (BMK.WA.check_grants (self.person_rights, page_name))
         return;
 
-      if (isnull (self.account_rights))
+      if (isnull (self.person_rights))
       {
         self.vc_redirect (sprintf ('%slogin.vspx?URL=%U', ods_path, HTTP_REQUESTED_URL()));;
         return;
diff --git a/appsrc/ODS-Bookmark/www/bookmarks.vspx b/appsrc/ODS-Bookmark/www/bookmarks.vspx
index e556cd7..87a9607 100644
--- a/appsrc/ODS-Bookmark/www/bookmarks.vspx
+++ b/appsrc/ODS-Bookmark/www/bookmarks.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bookmarks.vspx,v 1.40.2.5 2010/10/07 13:24:04 source Exp $
+ -  $Id: bookmarks.vspx,v 1.40.2.8 2012/03/08 11:52:37 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,9 +26,7 @@
 
   <v:method name="toolbarLabel" arglist="in cmd varchar">
     <![CDATA[
-      if (self.tbLabels = 0)
-        return '';
-      return sprintf('<br /><span class="toolbarLabel">%s</span>', cmd);
+      return case when (self.tbLabels = 0) then '' else sprintf('<br /><span class="toolbarLabel">%s</span>', cmd) end;
     ]]>
   </v:method>
 
@@ -67,7 +65,7 @@
                   self.tbLabels := cast (get_keyword ('tbLabels', self.settings, '1') as integer);
           
                   self.bNodeAction := '';
-                  if ((get_keyword ('URI', params, '') <> '') and (self.account_rights = 'W'))
+                  if ((get_keyword ('URI', params, '') <> '') and (self.person_rights = 'W'))
                             {
                     self.bNodeAction := 'Bookmark/Create';
                     self.bNodeParams := sprintf('&URI=%U&TITLE=%U', get_keyword ('URI', params, ''), get_keyword ('TITLE', params, ''));
@@ -97,7 +95,7 @@
                             {
                       self.bNode := BMK.WA.make_node ('b', get_keyword ('id', params));
                       self.bNodeAction := 'Bookmark/Edit';
-                      if ((self.account_rights <> 'W') or (grant_id >= 0))
+                      if ((self.person_rights <> 'W') or (grant_id >= 0))
                         self.bNodeAction := 'Bookmark/View';
                     }
                   }
@@ -113,7 +111,7 @@
                       self.bNodePath := BMK.WA.bmk_path2 (BMK.WA.make_node ('f', BD_FOLDER_ID));
                     }
                   }
-                  else if ((get_keyword ('action', params, '') = 'Smart Folder/Create') and (self.account_rights = 'W'))
+                  else if ((get_keyword ('action', params, '') = 'Smart Folder/Create') and (self.person_rights = 'W'))
                             {
                     self.bNodeAction := 'Smart Folder/Create';
                     for (N := 0; N < length (params); N := N + 1)
@@ -145,7 +143,7 @@
                   toolbarWidth := '';
                 ?>
                 <div>
-                  <vm:if test="self.account_rights = 'W'">
+                  <vm:if test="self.person_rights = 'W'">
                   <span class="toolbar" style="cursor: pointer;<?V toolbarWidth ?>" onclick="javascript: BMK.formShow('import');" alt="Import">
                     <img src="image/impt_32.png" border="0" alt="Import" /><?vsp http(self.toolbarLabel('Import'));?>
                   </span>
diff --git a/appsrc/ODS-Bookmark/www/conversation.vspx b/appsrc/ODS-Bookmark/www/conversation.vspx
index 054fa2e..d314767 100644
--- a/appsrc/ODS-Bookmark/www/conversation.vspx
+++ b/appsrc/ODS-Bookmark/www/conversation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conversation.vspx,v 1.3.2.2 2010/09/20 10:14:55 source Exp $
+ -  $Id: conversation.vspx,v 1.3.2.4 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -64,8 +64,8 @@
       <v:variable persist="0" name="openid_name" type="varchar" default="null" param-name="openid.sreg.fullname" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params, ''))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params, ''))); ?>
       <?vsp http(sprintf('<input type="hidden" name="user_name" id="user_name" value="%s" />', BMK.WA.account_name (self.account_id))); ?>
       <div class="new-form-header">
         Discussion
@@ -107,7 +107,7 @@
                   <div class="<?V case when control.tn_level = 0 then 'cm_node_top' else 'cm_node' end ?>">
                     <?vsp
                       {
-                        declare id, comment, title, u_name, last_update any;
+                        declare id, comment, title, iri, u_name, last_update any;
 
                         id := cast (control.tn_value as integer);
                         declare exit handler for not found;
@@ -115,6 +115,7 @@
                           into title, comment, u_name, last_update
                           from BMK.WA.BOOKMARK_COMMENT
                          where BC_ID = id;
+                        iri := BMK.WA.url_fix (SIOC..bmk_comment_iri (self.domain_id, self.v_id, id), get_keyword ('sid', self.vc_page.vc_event.ve_params), get_keyword ('realm', self.vc_page.vc_event.ve_params));
 
                         declare parsed_message any;
                         declare d_name varchar;
@@ -147,7 +148,8 @@
                     ?>
                     <div class="comment" id="msg_<?V id ?>">
                       <div class="comment-header">
-                        <span class="comment-subj"><?V BMK.WA.utf2wide (title) ?></span> <br />
+                        <?vsp http (sprintf ('<a href="%V">%s</a>', iri, title)); ?>
+                        <br />
                       </div>
                       <div class="comment-msg">
                         <?vsp
diff --git a/appsrc/ODS-Bookmark/www/css/style.css b/appsrc/ODS-Bookmark/www/css/style.css
index 3e4913f..64ae59d 100644
--- a/appsrc/ODS-Bookmark/www/css/style.css
+++ b/appsrc/ODS-Bookmark/www/css/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.24.2.9 2010/10/07 13:24:05 source Exp $
+ *  $Id: style.css,v 1.24.2.13 2012/03/08 11:52:37 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,23 @@ body {
   font-size: 9pt;
 }
 
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+form {
+  margin: 0;
+  padding: 0;
+}
+
+abbr {
+  border: none;
+}
+
 a {
   text-decoration: none;
 }
@@ -77,43 +94,6 @@ a:hover, .link:hover
   vertical-align: top;
 }
 
-/* Footer */
-#FT {
-  width: 100%;
-  position: relative;
-  bottom: 0px;
-  font-size: 8pt;
-  float: left;
-  clear: both;
-  text-align: right;
-  border-top: 2px solid #fff;
-  margin-right: 10px;
-  background-color: #fff;
-  background-image: url(../image/ods_main_footer.png);
-}
-
-#FT_L {
-  float: left;
-  clear: left;
-  margin-top: 10px;
-  margin-left: 8px;
-  border: 1px solid #788;
-}
-
-#FT_R {
-  float: right;
-  clear: right;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  margin-right: 5px;
-  color: #788;
-}
-
-#FT_R a {
-  text-decoration: none;
-  color: inherit;
-}
-
 /* Left side within MT */
 .page_head {
   width: 100%;
@@ -353,21 +333,6 @@ table#list thead input {
 }
 
 /* Grid Rows */
-.tr_0 {
-  border: solid #7f94a5;
-  border-width: 0px 0px 1px 0px;
-  background-color: #F5F5EE;
-}
-
-.tr_1 {
-  border: solid #7f94a5;
-  border-width: 0px 0px 1px 0px;
-}
-
-.tr_1:hover, .tr_0:hover {
- 	background-color: #eec;
-}
-
 .tr_select {
   background-color: #FFFFCC;
 }
@@ -417,23 +382,6 @@ input.nolink2 {
   background-color: #EFEFEF;
 }
 
-.nolink3 {
-  font-size: 1em;
-  font-weight: bold;
-  color: #000;
-  background-color: inherit;
-}
-
-input.nolink4 {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  border: 0px;
-  background-color: #b0cde4;
-}
-
 .nolink_a {
   color: #000;
   background-color: #F0F0F0;
@@ -455,17 +403,6 @@ input.nolink4 {
 	right: 5px;
 }
 
-.button2 {
-  font-size: .8em;
-	font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  padding: 0.1em 1em 0.1em 1em ;
-  border: solid 1px;
-  border-color: #7f94a5;
-  background: #99b3c5;
-}
-
 .pane {
   color: black;
   background-color: #EFEFEF;
@@ -560,56 +497,6 @@ div.boxHeader {
   vertical-align: middle;
 }
 
-/* Grids */
-.BMK_grid {
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-}
-
-.BMK_grid tr td {
-  border-bottom: 1px solid #CCC;
-}
-
-thead.sortHeader tr {
-  background-image: url(../image/stl_blu1_grad.gif);
-  background-repeat: repeat-x;
-}
-
-thead.sortHeader tr th {
-  font-size: 1em;
-  font-weight: bold;
-  text-align: left;
-  padding: 3px 2px 3px 3px;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-thead.sortHeader th.checkbox {
-  text-align: center;
-  padding: 0;
-}
-
-thead.sortHeader th:last-child {
-  border-width: 0px 0px 1px 0px;
-}
-
-thead.sortHeader a, thead.sortHeader a:link, thead.sortHeader a:visited {
-  color: #000;
-  font-weight: bold;
-	display: block;
-	text-decoration: none;
-	width: 100%
-}
-
-thead.sortHeader a:hover {
-  color: #000;
-  font-weight: bold;
-	display: block;
-  text-decoration: none;
-	width: 100%
-}
-
 /* New forms */
 .new-form-body {
   font-size: 1em;
@@ -733,15 +620,6 @@ div.activeTab2 {
 }
 
 /* Toolbars */
-div.toolbar {
-}
-
-img.toolbar {
-	float: left;
-  margin-top: 10px;
-  background-color: #7F94A5;
-}
-
 span.toolbar {
 	float: left;
 	width: 70px;
@@ -756,18 +634,11 @@ span.toolbarLabel {
   font-size: 0.8em;
 }
 
-/* ComboList */
-.combo_list_list {
-  background-color: white;
-  border: 1px solid black;
-  padding: 5px 10px 5px 10px;
-  height: 100px;
-  overflow: auto;
-}
-
-.combo_list_option:hover {
-  background-color: #99b3c5;
-  color: white;
+img.toolbar {
+  display: block;
+  float: left;
+  margin-top: 10px;
+  background-color: #7F94A5;
 }
 
 /* Comments */
@@ -833,44 +704,6 @@ font-weight:bold;
 font-weight:normal !important;
 }
 
-/* Popup Calendar */
-.calendar {
-	border: 1px solid #000;
-	background-color: #FFF;
-  z-index: 101;
-}
-
-.calendar_year, .calendar_month {
-	text-align: center;
-	border-bottom: 1px solid #aaa;
-	padding: 2px 0px;
-}
-
-.calendar table {
-	margin-top: 2px;
-}
-
-.calendar thead {
-	font-weight: bold;
-}
-
-.calendar thead td {
-	padding: 0px 2px;
-}
-
-.calendar td {
-	font-size: 75%;
-	text-align: center;
-}
-
-td.calendar_selected {
-	background-color: #faa;
-}
-
-.calendar_special {
-	color: #c55;
-}
-
 .pointer {
   cursor: pointer;
 }
diff --git a/appsrc/ODS-Bookmark/www/error.vspx b/appsrc/ODS-Bookmark/www/error.vspx
index c209c44..667de97 100644
--- a/appsrc/ODS-Bookmark/www/error.vspx
+++ b/appsrc/ODS-Bookmark/www/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.5.2.2 2010/09/20 10:14:55 source Exp $
+ -  $Id: error.vspx,v 1.5.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/www/export.vspx b/appsrc/ODS-Bookmark/www/export.vspx
index c10a1d6..f992557 100644
--- a/appsrc/ODS-Bookmark/www/export.vspx
+++ b/appsrc/ODS-Bookmark/www/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: export.vspx,v 1.15.2.3 2010/09/20 10:14:55 source Exp $
+  -  $Id: export.vspx,v 1.15.2.4 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/www/forms.vspx b/appsrc/ODS-Bookmark/www/forms.vspx
index 0b676d0..642c1df 100644
--- a/appsrc/ODS-Bookmark/www/forms.vspx
+++ b/appsrc/ODS-Bookmark/www/forms.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: forms.vspx,v 1.12.2.15 2010/11/19 16:49:51 source Exp $
+ -  $Id: forms.vspx,v 1.12.2.20 2012/03/08 11:52:37 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -23,25 +23,6 @@
  -
 -->
 <v:page name="forms" decor="template/template.vspx" style="template/template.xsl" fast-render="1" button-anchors="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.n_order = columnName and self.n_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (self.n_order = columnName and self.n_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf ('Sort Rows on %s in %s Order', titleName, directionStr);
-      http (sprintf ('<a href="#" onclick="javascript: myPost (''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
 
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
@@ -74,7 +55,7 @@
       if (lcase (BMK.WA.node_type (node)) <> 'b')
         return 'visited';
 
-      if (self.account_rights <> 'W')
+      if (self.person_rights <> 'W')
         return 'unvisited';
 
       return either (isnull (BMK.WA.bookmark_visited (self.domain_id, BMK.WA.node_id (node))), 'unvisited', 'visited');
@@ -144,7 +125,7 @@
 
   <v:method name="windowOpen" arglist="in p_url varchar, in p_name varchar, in p_title varchar">
     <![CDATA[
-      return sprintf ('<span onclick="javascript: window.open (\'%s\', \'bookmarks_%s_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=600, width=800\'); return false;" title="%s %s" class="link">%s</span>', BMK.WA.url_fix (sprintf ('%s%s', BMK.WA.bookmarks_url (self.domain_id), p_url), self.sid, self.realm), p_name, p_name, p_title, p_name);
+      return sprintf ('<span onclick="javascript: windowShow(\'%s\', \'bookmarks_%s_window\'); return false;" title="%s %s" class="link">%s</span>', BMK.WA.page_url (self.domain_id, p_url, self.sid, self.realm), p_name, p_name, p_title, p_name);
     ]]>
   </v:method>
 
@@ -174,7 +155,7 @@
       <v:variable name="v_tags" type="varchar" default="''"/>
       <v:variable name="v_folder_name" type="varchar" default="''"/>
       <v:variable name="v_own" type="integer" default="0"/>
-      <v:variable name="v_folder_id" type="varchar" default="'0'"/>
+      <v:variable name="v_folder_id" type="integer" default="0"/>
       <v:variable name="v_shared" type="integer" default="0"/>
       <v:variable name="v_grants" type="any" default="null"/>
       <v:variable name="v_acl" type="any" default="null"/>
@@ -253,7 +234,7 @@
 
           mt := '';
           st := '';
-          if ((self.account_rights = 'W') and (not (((node_type = 's') and (node_id = -1)) or (node_type = 'u') or (node_type = 'F'))))
+          if ((self.person_rights = 'W') and (not (((node_type = 's') and (node_id = -1)) or (node_type = 'u') or (node_type = 'F'))))
           {
             mt := sprintf('Selected as <select name="mark" onchange="javascript: if (anySelected(this.form, \'cb_item\', \'No posts were selected to mark as \'+this.options[this.selectedIndex].text+\'.\')) {this.form.submit();} else {this.selectedIndex = 0}"><option/><option>visited</option><option>unvisited</option></select>');
             st := sprintf('View <select name="show" onchange="javascript: this.form.submit();"><option value="">all</option><option value="visited">visited</option><option value="unvisited">unvisited</option></select>');
@@ -349,7 +330,7 @@
                                  ) x
                                       where 1 = 1';
                   BMK.WA.xml_set('folderID', data, BMK.WA.node_suffix(self.bNode));
-                  tmp := BMK.WA.sfolder_sql (self.domain_id, self.account_id, self.account_rights, data);
+                  tmp := BMK.WA.sfolder_sql (self.domain_id, self.account_id, self.person_rights, data);
                   sql := replace(sql, '<BOOKMARKS>', tmp);
                   sql := replace(sql, '<ID>', BMK.WA.node_suffix(self.bNode));
                 }
@@ -398,14 +379,14 @@
                 sql := 'select distinct rs.* from BMK.WA.shared_sql (rs0, rs1, rs2, rs3)(_TYPE integer, _ID integer, _NODE varchar, _NAME varchar, _URI varchar, _VISITED datetime, _UPDATED datetime, _CREATED datetime, _FOLDER_ID integer, _FOLDER_NAME varchar, _GRANT_ID integer) rs where rs0 = ? and rs1 = ? and rs2 = ? and rs3 = ?';
                 control.add_parameter (self.domain_id);
                 control.add_parameter (self.account_id);
-                control.add_parameter (self.account_rights);
+                control.add_parameter (self.person_rights);
                 control.add_parameter (data);
 
               }
               else if ((node_type = 't') and not is_empty_or_null (BMK.WA.node_suffix (self.bNode)))
               {
                 BMK.WA.xml_set('tags', data, BMK.WA.node_suffix(self.bNode));
-                sql := BMK.WA.sfolder_sql (self.domain_id, self.account_id, self.account_rights, data);
+                sql := BMK.WA.sfolder_sql (self.domain_id, self.account_id, self.person_rights, data);
               }
               else if ((node_type = 'u') and (node_id = -1))
               {
@@ -519,31 +500,23 @@
         <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
 
           <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="bookmarks" style="clear: left; width: 100%;" cellspacing="0">
-            <thead class="sortHeader">
+            <table id="bookmarks" class="ODS_grid" style="border: 0px; clear: left;">
+              <thead>
               <tr>
-                  <th class="checkbox" width="1%">
+                  <th class="checkbox">
                     <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')"/>
                   </th>
                 <th width="1%" style="border-width: 0px 0px 1px 0px;">
                   <img src="image/c.gif" border="0" alt="" />
                 </th>
-                <th width="80%">
-                  <?vsp self.sortColumn('Name', '_NAME'); ?>
-                </th>
+                  <?vsp http (DB.DBA.wa_show_column_header ('Name', '_NAME', self.n_order, self.n_direction, 'width="80%"')); ?>
                 <vm:if test="cast(get_keyword('column_#2', self.settings, '0') as integer) = 1">
-                  <th nowrap="nowrap">
-                    <?vsp self.sortColumn('Date Created', '_CREATED'); ?>
-                  </th>
+                    <?vsp http (DB.DBA.wa_show_column_header ('Date Created', '_CREATED', self.n_order, self.n_direction)); ?>
                 </vm:if>
                 <vm:if test="cast(get_keyword('column_#3', self.settings, '1') as integer) = 1">
-                  <th nowrap="nowrap">
-                    <?vsp self.sortColumn('Last Update', '_UPDATED'); ?>
-                  </th>
+                    <?vsp http (DB.DBA.wa_show_column_header ('Last Update', '_UPDATED', self.n_order, self.n_direction)); ?>
                 </vm:if>
-                <th width="1%">
-                  Action
-                </th>
+                  <th class="action">Action</th>
               </tr>
             </thead>
           </table>
@@ -560,12 +533,12 @@
                     node := (control as vspx_row_template).te_column_value('_NODE');
                       node_type := BMK.WA.node_type (node);
                     node_id := BMK.WA.node_id (node);
-                    permissions := self.account_rights;
+                    permissions := self.person_rights;
                     if (node_type = 'b')
-                      permissions := BMK.WA.bookmark_rights (self.domain_id, node_id, self.account_rights);
+                      permissions := BMK.WA.bookmark_rights (self.domain_id, node_id, self.person_rights, self.account_rights);
 
                   ?>
-                  <td align="center" valign="top">
+                  <td class="checkbox">
                     <?vsp
                       if ((permissions = 'W') and (node_type in ('f', 's', 'b')))
                       {
@@ -652,7 +625,7 @@
                       <?vsp http (BMK.WA.rdfa_value (BMK.WA.dt_value((control as vspx_row_template).te_column_value('_UPDATED')), 'dct:modified')); ?>
                     </td>
                   </vm:if>
-                  <td nowrap="nowrap" valign="top">
+                  <td class="action">
                     <?vsp
                       declare N, domain_id integer;
                       declare actions, actionPrefix, uri, onclick, title, target, tags any;
@@ -714,11 +687,6 @@
           </v:template>
 
         </v:data-set>
-        <script type="text/javascript">
-          <![CDATA[
-            coloriseTable('bookmarks');
-          ]]>
-        </script>
       </v:template>
 
       <v:template type="simple" enabled="--case when self.v_form = 'import' then 1 else 0 end">
@@ -914,7 +882,7 @@
             <v:button action="simple" value="Next" xhtml_class="form-button">
               <v:on-post>
                 <![CDATA[
-                  declare params, S any;
+                  declare params, S, V any;
                   params := self.vc_page.vc_event.ve_params;
 
                   if (self.v_source = 0)
@@ -953,6 +921,24 @@
                       self.vc_error_message := 'Bad import source!';
                       self.vc_is_valid := 0;
                       return;
+                    } else {
+                      V := BMK.WA.string2xml (S);
+                      if (xpath_eval ('/html', V, 1) is not null)
+                      {
+                        -- HTML, do auto discovery of the feeds
+                        declare url, T any;
+
+                        T := xpath_eval('//head/link[ @rel="alternate" and @type="application/rss+xml" ]/@href', V, 0);
+                        if (not length (T))
+                          T := xpath_eval('//head/link[ @rel="alternate" and @type="application/atom+xml" ]/@href', V, 0);
+
+                        if (length (T))
+                        {
+                          url := cast (T[0] as varchar);
+                          url := WS.WS.EXPAND_URL (self.f_uri.ufl_value, url);
+                          S := BMK.WA.dav_content (url);
+                        }
+                      }
                     }
                   }
                   else if (self.v_source = 3)
@@ -1058,7 +1044,7 @@
               <v:on-post>
                 <![CDATA[
                   -- check / create folder
-                  self.v_folder_id := self.i_folder_id.ufl_value;
+                  self.v_folder_id := cast (self.i_folder_id.ufl_value as integer);
                   self.v_folder_name := trim (self.i_folder_name.ufl_value);
                   if ((self.v_folder_name <> '') and (not BMK.WA.folder_check_name(self.v_folder_name, 1)))
                   {
@@ -1094,10 +1080,9 @@
             <input type="hidden" name="tags" value="<?V self.v_tag ?>"/>
             <span id="progressMax" style="display: none;">
               <?vsp
-                 declare progressMax, S, T, R, V any;
+                 declare progressMax, S, T, R, V, V2 any;
 
                  progressMax := 0;
-
                  R := DAV_RES_CONTENT_INT (DAV_SEARCH_ID ('/DAV/VAD/Bookmarks/Import/' || self.sid, 'R'), S, T, 0, 0);
                  S := blob_to_string (S);
 
@@ -1111,37 +1096,53 @@
                  S := replace(S, 'FOLDED', '');
                  S := replace(S, '  ', ' ');
                  S := replace(S, '&', '&');
-                 V := BMK.WA.xtree_doc (S, 2);
+
+                 V := BMK.WA.string2xml (S, 2);
                  if (isnull (V))
                    goto _xbel;
-                 V := xpath_eval ('//dl', V);
-                 if (isnull (V))
+                 V2 := xpath_eval ('//dl', V);
+                 if (isnull (V2))
                    goto _xbel;
-                 progressMax := xpath_eval('count (//a)', V);
+                 progressMax := xpath_eval('count (//a)', V2);
                  goto _end;
 
                _xbel:;
                  -- check XBEL format
                  --
-                 V := BMK.WA.xtree_doc (S);
-                 if (isnull (V))
-                   goto _delicious;
-                 V := xpath_eval('/xbel', BMK.WA.string2xml(S));
+                 V := BMK.WA.string2xml (S);
                  if (isnull (V))
+                   goto _end;
+                 V2 := xpath_eval('/xbel', V);
+                 if (isnull (V2))
+                   goto _rss;
+                 progressMax := xpath_eval('count (//bookmark)', V2);
+                 goto _end;
+
+               _rss:;
+                 -- check RSS format
+                 --
+                 V2 := xpath_eval ('/rss/channel/item|/rss/item|/RDF/item|/Channel/items/item', V);
+                 if (isnull (V2))
+                   goto _atom;
+                 progressMax := xpath_eval('count (/rss/channel/item|/rss/item|/RDF/item|/Channel/items/item)', V2);
+                 goto _end;
+
+               _atom:;
+                 -- check Atom format
+                 --
+                 V2 := xpath_eval ('/feed/entry', V);
+                 if (isnull (V2))
                    goto _delicious;
-                 progressMax := xpath_eval('count (//bookmark)', V);
+                 progressMax := xpath_eval('count (/feed/entry)', V2);
                  goto _end;
 
               _delicious:;
                  -- check delicious format
                  --
-                 V := BMK.WA.xtree_doc (S);
-                 if (isnull (V))
+                 V2 := xpath_eval('/posts', V);
+                 if (isnull (V2))
                    goto _end;
-                 V := xpath_eval('/posts', V);
-                 if (isnull (V))
-                   goto _end;
-                 progressMax := xpath_eval('count (//post)', V);
+                 progressMax := xpath_eval('count (//post)', V2);
 
               _end:;
                  http (cast (progressMax as varchar));
@@ -1166,7 +1167,7 @@
           </div>
           <script type="text/javascript">
             <![CDATA[
-              initState();
+              OAT.MSG.attach(OAT, "PAGE_LOADED", function(){initState();});
             ]]>
           </script>
         </v:template>
@@ -1183,12 +1184,12 @@
                 <v:label for="e_format" value="Format"/>
               </th>
               <td>
-                <input type="radio" name="e_format" id="e_format_0" value="Netscape" checked="checked" onclick="changeExportName('e_file', '.xbel', '.html');"/><xsl:call-template name="nbsp"/><label for="e_format_0">Netscape</label>
+                <input type="radio" name="e_format" id="e_format_0" value="Netscape" checked="checked" onclick="changeExportName('e_file', '.xbel', '.html');"/> <label for="e_format_0">Netscape</label>
               </td>
             </tr>
             <tr>
               <td>
-                <input type="radio" name="e_format" id="e_format_1" value="XBEL" onclick="changeExportName('e_file', '.html', '.xbel');"/><xsl:call-template name="nbsp"/><label for="e_format_1">XBEL</label>
+                <input type="radio" name="e_format" id="e_format_1" value="XBEL" onclick="changeExportName('e_file', '.html', '.xbel');"/> <label for="e_format_1">XBEL</label>
               </td>
             </tr>
             <tr>
@@ -1244,6 +1245,7 @@
 
               self.v_folder_name := '';
               self.v_grants := self.shareSelect (BMK.WA.make_node ('b', self.v_id));
+              self.rdf_iri := SIOC..bmk_post_iri (self.domain_id, self.v_id);
 
               return;
             }
@@ -1325,7 +1327,7 @@
               <script type="text/javascript">
                 function suggestTags ()
                 {
-                  window.open ('tags.vspx?sid=<?V self.sid ?>&realm=<?V self.realm ?>&txt=' + escape (document.F1.elements['b_name'].value) + '&txt2=' + escape (document.F1.elements['b_description'].value) + '&fld=b_tags', 'bookmarks_suggest_window', 'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500');
+                      windowShow('<?V BMK.WA.page_url (self.domain_id, 'tags.vspx', self.sid, self.realm) ?>&txt=' + escape (document.F1.elements['b_name'].value) + '&txt2=' + escape (document.F1.elements['b_description'].value) + '&fld=b_tags', 'bookmarks_suggest_window');
                 }
               </script>
               <th>
@@ -1350,12 +1352,12 @@
                 <legend><b>ODS users</b></legend>
                 <table class="form-body" cellspacing="0">
                   <tr>
-                    <td style="width: 95%; background-color: white;">
-                      <table id="f_tbl" width="100%" cellspacing="0">
-                        <thead class="sortHeader">
+                    <td style="width: 90%; background-color: white;">
+                      <table id="f_tbl" class="ODS_grid">
+                        <thead>
                           <tr>
                             <th width="100%">Value</th>
-                            <th width="50px">Action</th>
+                            <th class="action">Action</th>
                           </tr>
                         </thead>
                   		  <![CDATA[
@@ -1394,14 +1396,14 @@
                 <legend><b>WebID users</b></legend>
               <table class="form-body" cellspacing="0">
                 <tr>
-                  <td style="width: 95%; background-color: white;">
-                    <table id="s_tbl" width="100%" cellspacing="0">
-                      <thead class="sortHeader">
+                    <td style="width: 90%; background-color: white;">
+                      <table id="s_tbl" class="ODS_grid">
+                        <thead>
                         <tr>
                           <th width="15%">Type</th>
                           <th>Value</th>
                           <th width="1%" nowrap="nowrap">ACL: (R)ead, (W)rite</th>
-                            <th width="50px">Action</th>
+                            <th class="action">Action</th>
                         </tr>
                       </thead>
                 		  <![CDATA[
@@ -1554,7 +1556,7 @@
               </th>
               <td>
                 <v:text name="f_grants" null-value="--''" value="--self.v_grants" xhtml_class="textbox" xhtml_size="60" xhtml_title="User names must be comma delimited!" />
-                <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?form=F1&dst=mc&params=f_grants:s1;')" class="button" />
+                <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?amp;dst=mc&params=f_grants:s1;&nrows=<?V BMK.WA.settings_rows (self.settings) ?>')" class="button" />
                 <input type="button" value="Clear" onClick="javascript: document.F1.elements['f_grants'].value = ''" class="button" />
               </td>
             </tr>
@@ -1684,7 +1686,7 @@
               </th>
               <td>
                 <v:text name="s_grants" null-value="--''" value="--self.v_grants" xhtml_class="textbox" xhtml_size="60" xhtml_title="User names must be comma delimited!" />
-                <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?form=F1&mode=s_bmk&dst=mc&params=s_grants:s1;')" class="button" />
+                <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?mode=s_bmk&dst=mc&params=s_grants:s1;&nrows=<?V BMK.WA.settings_rows (self.settings) ?>')" class="button" />
               </td>
             </tr>
           </table>
@@ -1795,7 +1797,7 @@
 
                 params := self.vc_page.vc_event.ve_params;
 
-                control.ufl_value := 'Sharings for ';
+                control.ufl_value := 'Shares for ';
                 delimiter := '';
                 for (N := 0; N < length (params); N := N + 2)
                 {
@@ -1811,8 +1813,8 @@
                     {
                       name := (select F_NAME from BMK.WA.FOLDER where F_ID = node_id);
                     }
-                    delimiter := ', ';
                     control.ufl_value := control.ufl_value || delimiter || '''' || name || '''';
+                    delimiter := ', ';
                   }
                 }
               ]]>
@@ -1827,7 +1829,7 @@
               </th>
               <td>
                 <v:text name="s_share" null-value="--''" value="--self.vs_share" xhtml_class="textbox" xhtml_size="60" xhtml_title="User names must be comma delimited!" />
-                <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?form=F1&dst=mc&params=s_share:s1;')" class="button" />
+                <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?dst=mc&params=s_share:s1;&nrows=<?V BMK.WA.settings_rows (self.settings) ?>')" class="button" />
                 <input type="button" value="Clear" onClick="javascript: document.F1.elements['s_share'].value = ''" class="button" />
               </td>
             </tr>
diff --git a/appsrc/ODS-Bookmark/www/gems.vsp b/appsrc/ODS-Bookmark/www/gems.vsp
index 8055702..a02315b 100644
--- a/appsrc/ODS-Bookmark/www/gems.vsp
+++ b/appsrc/ODS-Bookmark/www/gems.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: gems.vsp,v 1.1.2.3 2010/10/07 13:24:04 source Exp $
+--  $Id: gems.vsp,v 1.1.2.4 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/www/js/bookmark.js b/appsrc/ODS-Bookmark/www/js/bookmark.js
index 0c0ff78..5793483 100644
--- a/appsrc/ODS-Bookmark/www/js/bookmark.js
+++ b/appsrc/ODS-Bookmark/www/js/bookmark.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: bookmark.js,v 1.27.2.11 2010/11/19 16:49:52 source Exp $
+ *  $Id: bookmark.js,v 1.27.2.17 2012/03/08 11:52:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -58,6 +58,19 @@ function toolbarPost(value)
   doPost ('F1', 'toolbar');
 }
 
+function odsPost(obj, fields, button) {
+  var form = getParent (obj, 'form');
+  var formName = form.name;
+  for (var i = 0; i < fields.length; i += 2)
+    createHidden(formName, fields[i], fields[i+1]);
+
+  if (button) {
+    doPost(formName, button);
+  } else {
+    form.submit();
+  }
+}
+
 function dateFormat(date, format) {
 	function long(d) {
 		return ((d < 10) ? "0" : "") + d;
@@ -363,14 +376,18 @@ function showTab(tabs, tabsCount, tabNo)
   }
 }
 
-function windowShow(sPage, width, height)
-{
-  if (!width)
+function windowShow(sPage, sPageName, width, height) {
+	if (width == null)
     width = 700;
-  if (!height)
-    height = 420;
-  sPage += urlParam("sid")+urlParam("realm");
-  win = window.open(sPage, null, "width="+width+",height="+height+", top=100, left=100, scrollbars=yes, resize=yes, menubar=no");
+	if (height == null)
+		height = 500;
+  if (sPage.indexOf('form=') == -1)
+    sPage += '&form=F1';
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
 
@@ -609,6 +626,13 @@ function urlParam (fldName)
   return '';
 }
 
+function myA(obj) {
+  if (obj.href) {
+    document.location = obj.href + '?' + urlParam('sid') + urlParam('realm');
+    return false;
+  }
+}
+
 var progressTimer = null;
 var progressID = null;
 var progressMax = null;
@@ -618,7 +642,7 @@ var progressInc = 100 / progressSize;
 function stopState()
 {
   progressTimer = null;
-  OAT.AJAX.POST('ajax.vsp', "a=load&sa=stop&id="+progressID+urlParam("sid")+urlParam("realm"), x, {async: false});
+  OAT.AJAX.POST('ajax.vsp', "a=load&sa=stop&id="+progressID+urlParam("sid")+urlParam("realm"), null, {async: false});
 }
 
 function initState ()
@@ -653,7 +677,8 @@ function checkState()
         setTimeout("checkState()", 500);
       } else {
       progressTimer = null;
-        $('btn_Stop').click();
+      $('btn_Stop').value = 'Close';
+      OAT.Dom.hide('btn_Background');
       }
     }
   OAT.AJAX.POST('ajax.vsp', "a=load&sa=state&id="+progressID+urlParam("sid")+urlParam("realm"), x);
@@ -724,12 +749,20 @@ function readBookmark (id)
   var realm = '';
   if (document.forms[0].elements['realm'])
     realm = document.forms[0].elements['realm'].value;
-  OAT.AJAX.POST ("ajax.vsp", "sid="+sid+"&realm="+realm+"&id="+id+"&a=visited", function(){}, {onstart:function(){}, onerror:function(){}});
+  OAT.AJAX.POST ('ajax.vsp', "sid="+sid+"&realm="+realm+"&id="+id+"&a=visited", function(){}, {onstart:function(){}, onerror:function(){}});
 }
 
-function davBrowse (fld)
-{
-  var options = {mode: 'browser', onConfirmClick: function(path, fname) {$(fld).value = path + fname;}};
+function davBrowse(fld, folders) {
+	/* load stylesheets */
+	OAT.Style.include("grid.css");
+	OAT.Style.include("webdav.css");
+
+  var options = {
+    mode: 'browser',
+    onConfirmClick: function(path, fname) {$(fld).value = '/DAV' + path + fname;}
+  };
+  if (!folders) {folders = false;}
+  OAT.WebDav.options.foldersOnly = folders;
   OAT.WebDav.open(options);
 }
 
@@ -1266,7 +1299,7 @@ BMK.loadItems = function(nodeID, nodePath)
     nodePath = nodeID;
   var pane = $('pane_right_top');
   pane.innerHTML = '';
-  var URL = 'forms.vspx?sa=browse&node='+encodeURIComponent(nodeID)+'&path='+encodeURIComponent(nodePath)+BMK.sessionParams();
+  var URL = 'forms.vspx?sa=browse&node='+encodeURIComponent(nodeID)+'&path='+encodeURIComponent('/'+BMK.trim(nodePath, '/'))+BMK.sessionParams();
   var v = $('nodeItem');
   if (v && (v.value != '')) {
     URL += '&item=' + v.value;
@@ -1399,8 +1432,10 @@ BMK.formPostAfter = function (action)
 BMK.aboutDialog = function ()
 {
   var aboutDiv = $('aboutDiv');
-  if (aboutDiv) {OAT.Dom.unlink(aboutDiv);}
-  aboutDiv = OAT.Dom.create('div', {width:'430px', height:'150px'});
+  if (aboutDiv)
+    OAT.Dom.unlink(aboutDiv);
+
+  aboutDiv = OAT.Dom.create('div', {height: '160px', overflow: 'hidden'});
   aboutDiv.id = 'aboutDiv';
   aboutDialog = new OAT.Dialog('About ODS Booomarks', aboutDiv, {width:445, buttons: 0, resize:0, modal:1});
 	aboutDialog.cancel = aboutDialog.hide;
diff --git a/appsrc/ODS-Bookmark/www/message.vspx b/appsrc/ODS-Bookmark/www/message.vspx
index f6d68a6..370ef31 100644
--- a/appsrc/ODS-Bookmark/www/message.vspx
+++ b/appsrc/ODS-Bookmark/www/message.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: message.vspx,v 1.1.2.1 2010/09/20 10:14:55 source Exp $
+ -  $Id: message.vspx,v 1.1.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/www/search.vspx b/appsrc/ODS-Bookmark/www/search.vspx
index d565411..9acbc50 100644
--- a/appsrc/ODS-Bookmark/www/search.vspx
+++ b/appsrc/ODS-Bookmark/www/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.vspx,v 1.30.2.11 2010/11/19 16:49:51 source Exp $
+ -  $Id: search.vspx,v 1.30.2.14 2012/03/08 11:52:37 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,26 +24,6 @@
 -->
 <v:page name="search" decor="template/template.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (self.v_order = columnName and self.v_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
       if (columnName = '')
@@ -158,7 +138,7 @@
         if (maxRows <> '')
           maxRows := 'TOP ' || maxRows;
         sql := replace(sql, '<MAX>', maxRows);
-      sqlParams := vector (self.domain_id, self.account_id, self.account_rights, data, self.v_max);
+      sqlParams := vector (self.domain_id, self.account_id, self.person_rights, data, self.v_max);
       sql := concat(sql, 'order by ', self.v_order, ' ', self.v_direction);
       exec(sql, state, msg, sqlParams, 0, meta, result);
       if (state = '00000')
@@ -380,18 +360,13 @@
       ?>
       <v:text name="tabNo" xhtml_id="tabNo" type="hidden" value="--self.v_tabNo"/>
       <v:text name="step" xhtml_id="step" type="hidden" value="1"/>
-      <v:template type="simple" enabled="-- case when (self.v_step and self.vc_is_valid) then 1 else 0 end;">
-        <div class="new-form-header" style="margin-top: 6px;">
-          <i><?V initcap(self.v_mode) ?> search found <?V length (self.ds_data) ?> bookmark(s) in last search</i>
-        </div>
-      </v:template>
       <v:template type="simple">
         <v:before-render>
           <![CDATA[
             control.vc_enabled := case when (length (self.ds_data) and (self.vc_is_valid = 1) and self.v_step) then 1 else 0 end;
           ]]>
         </v:before-render>
-        <div style="padding-bottom: 5px;">
+        <div style="padding: 3px;">
           <?vsp
             http (sprintf('<a href="export.vspx?output=rss%s"><img src="image/rss-icon-16.gif" border="0" title="RSS 2.0" alt="RSS 2.0" /> RSS</a>  ', self.do_url('export', '')));
             if (BMK.WA.settings_atomVersion (self.settings) = '1.0')
@@ -414,26 +389,18 @@
                   control.ds_nrows := BMK.WA.settings_rows (self.settings);
                 </v:before-data-bind>
                 <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                  <table id="search" class="BMK_grid" style="border: solid #935000;  border-width: 0px 0px 0px 0px;" cellspacing="0">
-                    <thead class="sortHeader">
+                  <table id="search" class="ODS_grid" style="border: 0px;">
+                    <thead>
                       <tr>
                         <th width="1%" style="border-width: 0px 0px 1px 0px;">
                           <img src="image/c.gif" border="0"/>
                         </th>
-                        <th>
-                          <?vsp self.sortColumn('Name', '_NAME'); ?>
-                        </th>
+                        <?vsp http (DB.DBA.wa_show_column_header('Name', '_NAME', self.v_order, self.v_direction)); ?>
                         <vm:if test="self.v_shared = 1">
-                          <th>
-                            User
-                          </th>
+                          <th>User</th>
                        </vm:if>
-                        <th>
-                          <?vsp self.sortColumn('Folder', '_FOLDER_NAME'); ?>
-                        </th>
-                        <th>
-                          Action
-                        </th>
+                        <?vsp http (DB.DBA.wa_show_column_header('Folder', '_FOLDER_NAME', self.v_order, self.v_direction)); ?>
+                        <th class="action">Action</th>
                       </tr>
                     </thead>
                   </table>
@@ -452,12 +419,12 @@
                   <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
                     <table>
                       <tr>
-                        <td valign="top">
+                        <td>
                           <?vsp
                             http('<img src="image/web_16.png" style="padding: 0 2px 0 0;" border="0" alt="Bookmark" width="16"/>');
                           ?>
                         </td>
-                        <td valign="top">
+                        <td>
                           <?vsp
                             declare N, id, domain_id, account_id integer;
                             declare node, tags, target, uri, onclick, title, title2 varchar;
@@ -488,19 +455,19 @@
                           ?>
                         </td>
                         <vm:if test="self.v_shared = 1">
-                          <td valign="top">
+                          <td>
                             <?vsp
                               http (coalesce((SELECT U_NAME FROM WS.WS.SYS_DAV_USER, BMK.WA.GRANTS WHERE U_ID = G_GRANTER_ID and G_ID = (control as vspx_row_template).te_rowset[10]), ''));
                             ?>
                           </td>
                         </vm:if>
-                        <td valign="top">
+                        <td>
                           <v:url value="--BMK.WA.folder_path4 ((control.vc_parent as vspx_row_template).te_rowset[9], (control.vc_parent as vspx_row_template).te_rowset[10])"
                                  url="--sprintf('bookmarks.vspx?fid=%d&gid=%d', coalesce((control.vc_parent as vspx_row_template).te_rowset[8], -1), coalesce((control.vc_parent as vspx_row_template).te_rowset[10], -1))"
                                  format="%s"
                                  xhtml_title="--BMK.WA.folder_path4 ((control.vc_parent as vspx_row_template).te_rowset[9], (control.vc_parent as vspx_row_template).te_rowset[10])"/>
                         </td>
-                        <td valign="top">
+                        <td class="action">
                           <?vsp
                             if ((coalesce((control as vspx_row_template).te_rowset[10], -1) = -1) and length (self.sid))
                               http (sprintf ('<a href="bookmarks.vspx?sid=%s&realm=%s&id=%d&fid=%d&gid=%d" title="%s %s">%s</a>',
@@ -511,7 +478,7 @@
                                              coalesce((control as vspx_row_template).te_rowset[10], -1),
                                              'Edit',
                                            BMK.WA.utf2wide ((control as vspx_row_template).te_rowset[3]),
-                                             'Edit'));
+                                             'edit'));
                           ?>
                         </td>
                       </tr>
@@ -522,20 +489,17 @@
 
                 <v:template name="ds_footer" type="simple" name-to-remove="table" set-to-remove="top">
                   <table>
+                    <tfoot>
                     <tr>
-                      <td align="center" colspan="5">
+                        <td align="right" colspan="5">
                         <vm:ds-navigation data-set="ds"/>
                       </td>
                     </tr>
+                    </tfoot>
                   </table>
                 </v:template>
 
               </v:data-set>
-              <script type="text/javascript">
-                <![CDATA[
-                  coloriseTable('search');
-                ]]>
-              </script>
             </td>
           </v:template>
           <v:template type="simple" enabled="-- case when (self.v_cloud and self.v_step and self.vc_is_valid) then 1 else 0 end;">
@@ -646,7 +610,7 @@
                     </th>
                   <td>
                       <v:text name="f_grants" null-value="--''" value="--self.v_grants" xhtml_class="textbox" xhtml_size="60" xhtml_title="User names must be comma delimited!" />
-                    <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?mode=s_bmk&form=F1&dst=mc&params=f_grants:s1;')" class="button" />
+                    <input type="button" value="Select" onClick="javascript: windowShow('/ods/users_select.vspx?mode=s_bmk&dst=mc&params=f_grants:s1;&nrows=<?V BMK.WA.settings_rows (self.settings) ?>')" class="button" />
                   </td>
                 </tr>
               </table>
@@ -704,7 +668,7 @@
               ]]>
             </v:on-post>
           </v:button>
-          <v:button action="simple" value="Save" enabled="-- case when self.account_rights = 'W' then 1 else 0 end" xhtml_class="form-button">
+          <v:button action="simple" value="Save" enabled="-- case when self.person_rights = 'W' then 1 else 0 end" xhtml_class="form-button">
             <v:on-post>
               <![CDATA[
                 self.update_params();
diff --git a/appsrc/ODS-Bookmark/www/settings.vspx b/appsrc/ODS-Bookmark/www/settings.vspx
index f69f6bd..334c98b 100644
--- a/appsrc/ODS-Bookmark/www/settings.vspx
+++ b/appsrc/ODS-Bookmark/www/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: settings.vspx,v 1.19.2.8 2010/10/13 12:15:19 source Exp $
+ -  $Id: settings.vspx,v 1.19.2.12 2012/03/08 11:52:37 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -90,11 +90,11 @@
         <tr>
           <td id="LC">
             <div class="lc lc_close">
-              <vm:if test="self.account_rights = 'W'">
+              <vm:if test="self.person_rights = 'W'">
               <span onclick="javascript: vspxPost('command', 'action', 'settings', 'mode', '');" title="Settings" class="gems2">Settings</span>
               </vm:if>
               <span onclick="javascript: vspxPost('command', 'action', 'settings', 'mode', 'bookmarklet');" title="Bookmarklet" class="gems2">Bookmarklet</span>
-              <vm:if test="self.account_rights = 'W'">
+              <vm:if test="self.person_rights = 'W'">
               <span onclick="javascript: vspxPost('command', 'action', 'settings', 'mode', 'publishBrowse');" title="Publications" class="gems2">Publications</span>
               <span onclick="javascript: vspxPost('command', 'action', 'settings', 'mode', 'subscribeBrowse');" title="Subscriptions" class="gems2">Subscriptions</span>
               </vm:if>
@@ -424,12 +424,13 @@
       	    ]]>
       	  </v:on-post>
         </v:button>
-        <v:button action="simple" value="Clear" xhtml_class="form-button">
+                <v:button action="simple" value="Clear" xhtml_onclick="javascript: return confirm (\'Do you want to reset settings to default?\');" xhtml_class="form-button">
           <v:on-post>
             <![CDATA[
               delete from BMK.WA.SETTINGS where S_ACCOUNT_ID = self.account_id;
                       BMK.WA.nntp_update (self.domain_id, null, null, 1, 0);
 
+                      self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), BMK.WA.settings (self.domain_id));
                       self.vc_data_bind(e);
       	    ]]>
       	  </v:on-post>
@@ -537,16 +538,16 @@
 
               <v:data-set name="ds_exchanges" data-source="self.dsrc_exchanges" scrollable="1">
                 <v:template name="ds_exchanges_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                  <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                    <thead class="sortHeader">
+                  <table id="preferences" class="ODS_grid">
+                    <thead>
                       <tr>
-                        <th class="checkbox" width="1%">
+                        <th class="checkbox">
                           <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                         </th>
                         <th style="text-align: left;">Name</th>
                         <th style="text-align: left;" width="5%" nowrap="nowrap">Executed On</th>
                         <th style="text-align: left;" width="5%" nowrap="nowrap">Status</th>
-                        <th style="text-align: left;" width="5%" nowrap="nowrap">Action</th>
+                        <th class="action">Action</th>
                       </tr>
                     </thead>
                   </table>
@@ -579,7 +580,7 @@
                   <v:template name="ds_exchanges_browse" type="browse" name-to-remove="table" set-to-remove="both">
                     <table>
                       <tr>
-                        <td align="center" valign="top">
+                        <td class="checkbox">
                           <input type="checkbox" name="cb_item" value="<?V (control as vspx_row_template).te_column_value('EX_ID') ?>" onclick="selectCheck(this, 'cb_item')" />
                         </td>
                         <td nowrap="nowrap">
@@ -592,7 +593,7 @@
                           <?vsp
                             if ((control as vspx_row_template).te_column_value('EX_EXEC_LOG') is not null)
                             {
-                              http (sprintf ('<a href="#" onclick="javascript: window.open (\'message.vspx?msg=%U\', \'BM_message\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500\');"><img src="/ods/images/icons/stop_16.png" border="0"/></a>', (control as vspx_row_template).te_column_value('EX_EXEC_LOG')));
+                              http (sprintf ('<a href="#" onclick="javascript: windowShow(\'message.vspx?msg=%U\', \'BM_message\');"><img src="/ods/images/icons/stop_16.png" border="0"/></a>', (control as vspx_row_template).te_column_value('EX_EXEC_LOG')));
                             }
                             else
                             {
@@ -600,7 +601,7 @@
                             }
                           ?>
                         </td>
-                        <td nowrap="nowrap">
+                        <td class="action">
                           <v:button value="Edit" action="simple" xhtml_class="button">
                             <v:on-post>
                               <![CDATA[
diff --git a/appsrc/ODS-Bookmark/www/tags.vspx b/appsrc/ODS-Bookmark/www/tags.vspx
index 9bb177a..78737cb 100644
--- a/appsrc/ODS-Bookmark/www/tags.vspx
+++ b/appsrc/ODS-Bookmark/www/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.4.2.2 2010/09/20 10:14:55 source Exp $
+ -  $Id: tags.vspx,v 1.4.2.4 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,10 +33,10 @@
       <v:variable persist="0" name="v_tags" type="any"/>
     </vm:variables>
     <vm:pagebody>
-      <table id="tags" class="BMK_grid" style="width: 100%;" cellspacing="0">
-        <thead class="sortHeader">
+      <table id="tags" class="ODS_grid">
+        <thead>
           <tr>
-            <th class="checkbox" width="1%">
+            <th class="checkbox">
               <?vsp
                 http('<input type="checkbox" name="cb_all" value="Unselect All" checked="checked" onclick="selectAllCheckboxes(this, \'cb_item\'); "/>');
               ?>
@@ -67,7 +67,7 @@
             for (N := 0; N < length (vTags); N := N + 1) {
         ?>
           <tr>
-            <td>
+            <td class="checkbox">
               <?vsp
                 http (sprintf ('<input type="checkbox" name="cb_item" value="%s" checked="checked" onclick="javascript: coloriseRow(getParent(this, \'tr\'), this.checked);"/>', vTags[N]));
               ?>
diff --git a/appsrc/ODS-Bookmark/www/template/popup.vspx b/appsrc/ODS-Bookmark/www/template/popup.vspx
index a185e96..f497fba 100644
--- a/appsrc/ODS-Bookmark/www/template/popup.vspx
+++ b/appsrc/ODS-Bookmark/www/template/popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: popup.vspx,v 1.7.2.6 2010/10/13 12:15:19 source Exp $
+  -  $Id: popup.vspx,v 1.7.2.11 2012/03/08 11:52:37 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <html xmlns:v="http://www.openlinksw.com/vspx/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
   <head profile="http://internetalchemy.org/2003/02/profile">
+    <base href="<?V BMK.WA.host_url () || http_path () ?>" /><![CDATA[<!--[if IE]></base><![endif]-->]]>
+    <?vsp
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
+    ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
@@ -52,6 +59,7 @@
         OAT.Loader.load(featureList);
       </script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="js/bookmark.js"></script>
       <script type="text/javascript">
         function myInit()
@@ -61,18 +69,23 @@
         }
         OAT.MSG.attach(OAT, 'PAGE_LOADED', myInit);
         window.onload = function(){OAT.MSG.send(OAT, 'PAGE_LOADED');};
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
+      		}
+      	}
       </script>
     ]]>
     <title></title>
   </head>
   <body>
     <v:page xmlns:v="http://www.openlinksw.com/vspx/">
-      <vm:variables>
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_rights" type="varchar" default="''"/>
+      <v:variable persist="0" name="person_rights" type="varchar" default="''" />
         <v:variable persist="0" name="settings" type="any" />
-      </vm:variables>
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -84,7 +97,8 @@
           aSessInfo := BMK.WA.session_restore (params);
           self.domain_id := cast(get_keyword('domain_id', aSessInfo, '-1') as integer);
           self.account_id := cast (get_keyword ('account_id', aSessInfo, '-1') as integer);
-          self.account_rights := get_keyword ('account_rights', aSessInfo, '');
+          self.account_rights := get_keyword ('account_rights', aSessInfo);
+          self.person_rights := get_keyword ('person_rights', aSessInfo);
           self.settings := BMK.WA.settings (self.domain_id);
         ]]>
       </v:on-init>
diff --git a/appsrc/ODS-Bookmark/www/template/template.vspx b/appsrc/ODS-Bookmark/www/template/template.vspx
index e20bef2..58b2ad3 100644
--- a/appsrc/ODS-Bookmark/www/template/template.vspx
+++ b/appsrc/ODS-Bookmark/www/template/template.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.vspx,v 1.33.2.11 2010/10/13 12:15:20 source Exp $
+ -  $Id: template.vspx,v 1.33.2.17 2012/03/08 11:52:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -40,8 +40,13 @@
       http (sprintf ('\n    <link rel="alternate" type="application/atom+xml" title="%V Atom" href="%s" />', domainName, BMK.WA.gems_url (self.domain_id)||'Bookmark.atom'));
       http (sprintf ('\n    <link rel="subscriptions" type="text/x-opml" title="%V Subscriptions" href="%s" />', domainName, BMK.WA.gems_url (self.domain_id)||'Bookmark.opml'));
       http (BMK.WA.geo_url (self.domain_id, self.account_id));
+
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
     ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta name="dc.description" content="<?V BMK.WA.utf2wide (BMK.WA.domain_description (self.domain_id)) ?>" />
     <meta name="dc.title" content="<?V BMK.WA.utf2wide (BMK.WA.domain_description (self.domain_id)) ?>" />
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@@ -61,16 +66,12 @@
           connectionHeaders: {Authorization: '<?V BMK.WA.account_basicAuthorization (self.account_id) ?>'}
         };
 
-      	/* load stylesheets */
-      	OAT.Style.include("grid.css");
-      	OAT.Style.include("webdav.css");
-      	OAT.Style.include("winms.css");
-        
         var featureList=["ajax", "json", "anchor", "dialog", "tree", "calendar"];
         OAT.Loader.load(featureList);
       </script>
       <script type="text/javascript" src="/ods/app.js"></script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="/ods/validate.js"></script>
       <script type="text/javascript" src="js/bookmark.js"></script>
       <script type="text/javascript">
@@ -78,15 +79,11 @@
         var formDialog;
 
         function myInit() {
-          if (!OAT._loaded) {
+          if (!OAT._loaded || !OAT.Tree) {
             setTimeout(myInit, 50);
             return;
           }
 
-          // <a>++
-          OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-          OAT.Anchor.zIndex = 1001;
-        
           if ((<?V cast (get_keyword ('app', self.settings, '0') as integer) ?> > 0) && $('app_area'))
             generateAPP('app_area', {appActivation: "<?V case when cast (get_keyword ('app', self.settings, '1') as integer) = 2 then 'hover' else 'click' end ?>"});
             
@@ -114,19 +111,22 @@
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
       <v:variable persist="0" name="account_rights" type="varchar" default="''" />
+      <v:variable persist="0" name="person_rights" type="varchar" default="''" />
         <v:variable persist="0" name="settings" type="any" />
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
           set http_charset = 'utf-8';
 
           -- Initialize variables
-          declare sessionData any;
+          declare aSessInfo any;
 
-          sessionData := BMK.WA.session_restore (params);
-          self.domain_id := cast (get_keyword('domain_id', sessionData, '-1') as integer);
-          self.account_id := cast (get_keyword('account_id', sessionData, '-1') as integer);
-          self.account_rights := get_keyword ('account_rights', sessionData, '');
+          aSessInfo := BMK.WA.session_restore (params);
+          self.domain_id := cast (get_keyword('domain_id', aSessInfo, '-1') as integer);
+          self.account_id := cast (get_keyword('account_id', aSessInfo, '-1') as integer);
+          self.account_rights := get_keyword ('account_rights', aSessInfo);
+          self.person_rights := get_keyword ('person_rights', aSessInfo);
           self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), BMK.WA.settings (self.domain_id));
 
           self.vc_add_attribute ('xmlns:foaf', 'http://xmlns.com/foaf/0.1/');
diff --git a/appsrc/ODS-Bookmark/www/template/template.xsl b/appsrc/ODS-Bookmark/www/template/template.xsl
index fd7ea95..16b3ba0 100644
--- a/appsrc/ODS-Bookmark/www/template/template.xsl
+++ b/appsrc/ODS-Bookmark/www/template/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.xsl,v 1.29.2.6 2010/10/13 12:15:20 source Exp $
+ -  $Id: template.xsl,v 1.29.2.9 2012/03/08 11:52:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -181,7 +181,7 @@
             <?vsp http (BMK.WA.utf2wide (BMK.WA.banner_links (self.domain_id, self.sid, self.realm))); ?>
           </div>
           <div style="float: right; padding-right: 0.5em;">
-            <vm:if test="self.account_rights = 'W'">
+            <vm:if test="self.person_rights = 'W'">
               <a href="<?vsp http (BMK.WA.utf2wide (BMK.WA.page_url (self.domain_id, 'settings.vspx', self.sid, self.realm))); ?>" title="Preferences">Preferences</a>
               |
             </vm:if>
@@ -254,11 +254,10 @@
   <!--=========================================================================-->
   <xsl:template match="vm:ds-navigation">
     <?vsp
-      {
         declare n_start, n_end, n_total integer;
         declare ds vspx_data_set;
 
-        ds := self.vc_find_descendant_control ('<xsl:value-of select="@data-set" />');
+      ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
         if (isnull (ds.ds_data_source))
         {
           n_total := ds.ds_rows_total;
@@ -273,57 +272,46 @@
           n_end := n_total;
 
         if (n_total)
-          http (sprintf ('%d - %d of %d', n_start, n_end, n_total));
+        http (sprintf ('Showing %d - %d of %d', n_start, n_end, n_total));
 
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first integer;
+      declare _prev, _next vspx_button;
 
-  	    d_prev := d_next := d_last := d_first := 0;
-  	    _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-  	    _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
   	    _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
   	    _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (not (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled))
-        {
-          if (n_total)
+      if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
             http (' | ');
-        if (_first is not null and not _first.vc_enabled)
-    	    d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-    	    d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-    	    d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-    	    d_last := 1;
-        }
     ?>
-    <?vsp
-      if (d_first)
-        http ('<img src="/ods/images/skin/pager/p_first_gr.png" alt="First Page" title="First Page" border="0" />first ');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="/ods/images/skin/pager/p_first.png" xhtml_alt="First" text="first&nbsp;" />
-    <?vsp
-      if (d_prev)
-        http ('<img src="/ods/images/skin/pager/p_prev_gr.png" alt="Previous Page" title="Previous Page" border="0" />prev ');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="/ods/images/skin/pager/p_prev.png" xhtml_alt="Previous" text="prev&nbsp;" />
-    <?vsp
-      if (d_next)
-        http ('<img src="/ods/images/skin/pager/p_next_gr.png" alt="Next Page" title="Next Page" border="0" />next ');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="/ods/images/skin/pager/p_next.png" xhtml_alt="Next" text="next&nbsp;" />
-    <?vsp
-      if (d_last)
-        http ('<img src="/ods/images/skin/pager/p_last_gr.png" alt="Last Page" title="Last Page" border="0" />last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="/ods/images/skin/pager/p_last.png" xhtml_alt="Last" text="last" />
-    <?vsp
-      }
-    ?>
+    <v:button name="{@data-set}_first" action="simple" style="url" value="" xhtml_alt="First" xhtml_class="navi-button" >
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/> First ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_prev" action="simple" style="url" value="" xhtml_alt="Previous" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/> Prev ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_next" action="simple" style="url" value="" xhtml_alt="Next" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/> Next ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_last" action="simple" style="url" value="" xhtml_alt="Last" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/> Last ';
+        ]]>
+      </v:before-render>
+    </v:button>
   </xsl:template>
 
   <!--=========================================================================-->
diff --git a/appsrc/ODS-Bookmark/www/users.vspx b/appsrc/ODS-Bookmark/www/users.vspx
deleted file mode 100644
index 99002e6..0000000
--- a/appsrc/ODS-Bookmark/www/users.vspx
+++ /dev/null
@@ -1,273 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- -
- -  $Id: users.vspx,v 1.6.2.4 2010/10/13 12:15:19 source Exp $
- -
- -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- -  project.
- -
- -  Copyright (C) 1998-2006 OpenLink Software
- -
- -  This project 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; only version 2 of the License, dated June 1991.
- -
- -  This program 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
- -  General Public License for more details.
- -
- -  You should have received a copy of the GNU General Public License along
- -  with this program; if not, write to the Free Software Foundation, Inc.,
- -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- -
--->
-<v:page name="users" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      }
-      else if (self.v_order = columnName and self.v_direction = 'asc')
-      {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      }
-      else
-      {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
-  <v:method name="sortChange" arglist="in columnName varchar">
-    <![CDATA[
-      if (columnName <> '')
-      {
-      self.ds.vc_reset();
-        if (self.v_order = columnName)
-        {
-        self.v_direction := either(equ(self.v_direction, 'asc'), 'desc', 'asc');
-      } else {
-        self.v_direction := 'asc';
-      self.v_order := columnName;
-        }
-      }
-    ]]>
-  </v:method>
-
-  <v:method name="isMultiple" arglist="in dst any">
-    <![CDATA[
-      return case when isnull (strstr (self.v_dst, 'm')) then 0 else 1 end;
-    ]]>
-  </v:method>
-
-    <v:before-data-bind>
-      <![CDATA[
-      self.v_filter := case when (self.v_mode = 'g') then 'g' else 'u' end;
-      ]]>
-    </v:before-data-bind>
-
-  <vm:pagetitle>Select User/Group</vm:pagetitle>
-
-  <vm:popup_pagewrapper>
-    <vm:variables>
-      <v:variable name="v_params" param-name="params" type="varchar"/>
-      <v:variable name="v_mode" persist="0" param-name="mode" type="varchar" default="''"/>
-      <v:variable name="v_filter" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_value" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_mask" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_how" persist="0" type="varchar" default="'1'"/>
-      <v:variable name="v_order" persist="0" type="varchar" default="'U_NAME'" />
-      <v:variable name="v_direction" persist="0" type="varchar" default="'asc'" />
-      <v:variable name="v_src" persist="0" param-name="src" type="varchar" default="''" />
-      <v:variable name="v_dst" persist="0" param-name="dst" type="varchar" default="'sc'" />
-      <v:variable name="v_s1" persist="0" param-name="s1" type="varchar" default="''" />
-      <v:variable name="v_s2" persist="0" param-name="s2" type="varchar" default="''" />
-    </vm:variables>
-    <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s"/>', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s"/>', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="src"   id="src"   value="%s"/>', get_keyword('src', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="dst"   id="dst"   value="%s"/>', get_keyword('dst', self.vc_page.vc_event.ve_params, 'sc'))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s1"    id="s1"    value="%s"/>', get_keyword('s1', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s2"    id="s2"    value="%s"/>', get_keyword('s2', self.vc_page.vc_event.ve_params, ''))); ?>
-      <v:text name="params" type="hidden" value="--self.v_params"/>
-      <div class="boxHeader">
-        Show
-        <v:select-list name="filter" value="--self.v_filter" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-          <v:item name="Users & Groups" value="" />
-          <v:item name="Users" value="u" />
-          <v:item name="Groups" value="g" />
-        </v:select-list>
-        <v:select-list name="how" value="--self.v_how">
-          <v:item name="Starting with" value="1" />
-          <v:item name="Containing" value="2" />
-          <v:item name="Ending with" value="3" />
-          <v:item name="Exact match" value="4" />
-        </v:select-list>
-        <v:text name="value" value="--self.v_value" xhtml_size="15"/>
-        <v:button action="simple" value="Filter" xhtml_class="button">
-          <v:on-post>
-            <![CDATA[
-              self.v_filter := get_keyword ('filter', e.ve_params, self.v_filter);
-              self.v_how := self.how.ufl_value;
-              self.v_value := trim(self.value.ufl_value);
-              self.vc_data_bind (e);
-            ]]>
-          </v:on-post>
-        </v:button>
-        <v:button name="reset" action="simple" value="Clear" xhtml_class="button">
-          <v:on-post>
-            <![CDATA[
-              self.v_how := '1';
-              self.v_value := '';
-              self.vc_data_bind (e);
-            ]]>
-          </v:on-post>
-        </v:button>
-      </div>
-      <v:data-source name="dsrc" expression-type="sql" nrows="0" initial-offset="0">
-        <v:before-data-bind>
-          <![CDATA[
-            declare user_sql, group_sql varchar;
-
-            self.v_mask := case self.v_how
-                             when '1' then self.v_value || '%'
-                             when '2' then '%' || self.v_value || '%'
-                             when '3' then '%' || self.v_value
-                             else self.v_value end;
-            if (self.v_mask = '')
-              self.v_mask := '%';
-            self.v_mask := replace(self.v_mask, '%%', '%');
-
-            group_sql := '';
-            if (self.v_mode = 's')
-            {
-              user_sql := sprintf('select ''User'' U_TYPE, U_NAME, coalesce(U_FULL_NAME, \'\') U_FULL_NAME from BMK.WA.GRANTS, DB.DBA.SYS_USERS where (U_ACCOUNT_DISABLED=0) and upper(U_NAME) like upper(\'%s\') and G_GRANTEE_ID = %d and G_GRANTER_ID = U_ID', self.v_mask, self.account_id);
-            } else {
-              user_sql := sprintf('select ''User'' U_TYPE, U_NAME, coalesce(U_FULL_NAME, \'\') U_FULL_NAME from WS.WS.SYS_DAV_USER where (U_ACCOUNT_DISABLED=0) and (upper(U_NAME) like upper(\'%s\') and (U_ID<>5) and (U_ID<>6) and (U_ID<>%d))', self.v_mask, self.account_id);
-            }
-            if (user_sql = '')
-            {
-              control.ds_sql := group_sql;
-            } else if (group_sql = '') {
-              control.ds_sql := user_sql;
-            } else {
-              control.ds_sql := concat('select U_TYPE, U_NAME, U_FULL_NAME from (', user_sql, ' union ' , group_sql, ') x ');
-            }
-            self.sortChange(get_keyword('sortColumn', e.ve_params, ''));
-            control.ds_nrows := BMK.WA.settings_rows (self.settings);
-            control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
-          ]]>
-        </v:before-data-bind>
-        <v:after-data-bind>
-          control.ds_make_statistic ();
-        </v:after-data-bind>
-      </v:data-source>
-      <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
-        <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="users" class="BMK_grid" cellspacing="0">
-            <thead class="sortHeader">
-              <tr>
-                <vm:if test="self.isMultiple(self.v_dst)">
-                  <th class="checkbox" width="1%">
-                    <?vsp
-                      http('<input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, ''cb_item''); updateChecked(this, ''cb_item''); "/>');
-                    ?>
-                  </th>
-                </vm:if>
-                <vm:if test="self.v_mode = ''">
-                  <th>
-                    Type
-                  </th>
-                </vm:if>
-                <th>
-                  <?vsp self.sortColumn('Name', 'U_NAME'); ?>
-                </th>
-                <th>
-                  <?vsp self.sortColumn('Description', 'U_FULL_NAME'); ?>
-                </th>
-              </tr>
-            </thead>
-          </table>
-        </v:template>
-
-        <v:template name="ds_repeat" type="repeat" name-to-remove="" set-to-remove="">
-
-          <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
-            <table>
-              <tr align="center">
-                <td colspan="<?V either(equ(self.v_mode,''),3,2)+self.isMultiple(self.v_dst) ?>">
-                  No records
-                </td>
-              </tr>
-            </table>
-          </v:template>
-
-          <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
-            <table>
-              <tr onclick="rowSelected(this);" class="pointer">
-                <vm:if test="self.isMultiple(self.v_dst)">
-                  <td  align="center">
-                    <?vsp
-                      declare S, name any;
-
-                      name := (control as vspx_row_template).te_column_value('U_NAME');
-                      S := case when isnull (strstr(self.v_s1, concat(name, ','))) then '' else 'checked="checked"' end;
-                      http (sprintf ('<input type="checkbox" name="cb_item" value="%s" %s onclick="updateChecked(this, ''cb_item'', event); " />', name, S));
-                    ?>
-                  </td>
-                </vm:if>
-                <vm:if test="self.v_mode = ''">
-                  <td nowrap="nowrap">
-                    <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_TYPE')" format="%s"/>
-                  </td>
-                </vm:if>
-                <td nowrap="nowrap">
-                  <input name="s1_item" type="hidden" value="<?V (control as vspx_row_template).te_column_value('U_NAME') ?>" />
-                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_NAME')" format="%s"/>
-                </td>
-                <td nowrap="nowrap">
-                  <input name="s2_item" type="hidden" value="<?V (control as vspx_row_template).te_column_value('U_FULL_NAME') ?>" />
-                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')" format="%s"/>
-                </td>
-              </tr>
-            </table>
-          </v:template>
-
-        </v:template>
-
-        <v:template type="simple" name-to-remove="table" set-to-remove="top">
-          <table>
-            <tr align="center">
-              <td colspan="<?V either(equ(self.v_mode,''),3,2)+self.isMultiple(self.v_dst) ?>">
-                <vm:ds-navigation data-set="ds"/>
-              </td>
-            </tr>
-          </table>
-        </v:template>
-
-      </v:data-set>
-      <vm:if test="self.isMultiple(self.v_dst)">
-        <div style="padding: 0 0 0.5em 0;">
-          <hr />
-          <a href="#" onclick="javascript: addChecked(document.forms['F1'], 'cb_item', 'No users were selected for addition.');" class="button2">&nbsp;Add selected</a>
-        </div>
-      </vm:if>
-      <script>
-        <![CDATA[
-          coloriseTable('users');
-        ]]>
-      </script>
-    </vm:pagebody>
-  </vm:popup_pagewrapper>
-</v:page>
diff --git a/appsrc/ODS-Bookmark/xslt/Netscape.xsl b/appsrc/ODS-Bookmark/xslt/Netscape.xsl
index d7cf727..8509111 100644
--- a/appsrc/ODS-Bookmark/xslt/Netscape.xsl
+++ b/appsrc/ODS-Bookmark/xslt/Netscape.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?> 
 <!--  
  -
- -  $Id: Netscape.xsl,v 1.4.2.1 2010/09/20 10:14:56 source Exp $
+ -  $Id: Netscape.xsl,v 1.4.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/xslt/XBEL.xsl b/appsrc/ODS-Bookmark/xslt/XBEL.xsl
index b4b5f39..3dba782 100644
--- a/appsrc/ODS-Bookmark/xslt/XBEL.xsl
+++ b/appsrc/ODS-Bookmark/xslt/XBEL.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?> 
 <!--  
  -
- -  $Id: XBEL.xsl,v 1.2.2.1 2010/09/20 10:14:56 source Exp $
+ -  $Id: XBEL.xsl,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/xslt/rss2atom.xsl b/appsrc/ODS-Bookmark/xslt/rss2atom.xsl
index a8f5bee..96adc95 100644
--- a/appsrc/ODS-Bookmark/xslt/rss2atom.xsl
+++ b/appsrc/ODS-Bookmark/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.4.2.2 2010/09/20 10:14:56 source Exp $
+ -  $Id: rss2atom.xsl,v 1.4.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/xslt/rss2atom03.xsl b/appsrc/ODS-Bookmark/xslt/rss2atom03.xsl
index 53f03df..da72f9d 100644
--- a/appsrc/ODS-Bookmark/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-Bookmark/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.4.2.1 2010/09/20 10:14:56 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.4.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/xslt/rss2rdf.xsl b/appsrc/ODS-Bookmark/xslt/rss2rdf.xsl
index 032e4d8..667a0d2 100644
--- a/appsrc/ODS-Bookmark/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-Bookmark/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.5.2.1 2010/09/20 10:14:56 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.5.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Bookmark/xslt/rss2xbel.xsl b/appsrc/ODS-Bookmark/xslt/rss2xbel.xsl
index 3ac603e..a5047ac 100644
--- a/appsrc/ODS-Bookmark/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-Bookmark/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:14:56 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/Makefile.am b/appsrc/ODS-Briefcase/Makefile.am
index 5ea20c0..bbda7ef 100644
--- a/appsrc/ODS-Briefcase/Makefile.am
+++ b/appsrc/ODS-Briefcase/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -47,6 +47,7 @@ EXTRA_DIST = \
 	make_vad.sh \
 	new/*.sql \
 	schemas/*.rdf \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Briefcase/Makefile.in b/appsrc/ODS-Briefcase/Makefile.in
index 74dab77..c4e2821 100644
--- a/appsrc/ODS-Briefcase/Makefile.in
+++ b/appsrc/ODS-Briefcase/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -310,6 +312,7 @@ EXTRA_DIST = \
 	make_vad.sh \
 	new/*.sql \
 	schemas/*.rdf \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Briefcase/make_vad.sh b/appsrc/ODS-Briefcase/make_vad.sh
index d0128c4..030ff4d 100755
--- a/appsrc/ODS-Briefcase/make_vad.sh
+++ b/appsrc/ODS-Briefcase/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.49.2.37 2011/02/03 10:26:14 source Exp $
+#  $Id: make_vad.sh,v 1.49.2.44 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.3.305"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -63,16 +63,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -107,6 +97,57 @@ else
   myrm=$RM
 fi
 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -242,7 +283,7 @@ sticker_init() {
   echo "  <name package=\"Briefcase\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Briefcase\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -254,8 +295,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.77.47\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-11-08 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.85.05\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-12-29 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -287,7 +328,6 @@ sticker_init() {
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-rdf.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-dc.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-code.sql', 1, 'report', $ISDAV);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-soap.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-dc-data.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-rdf-data.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/oDrive/new/od-a-api.sql', 1, 'report', $ISDAV);" >> $STICKER
@@ -403,6 +443,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -428,6 +469,7 @@ then
 	$myrm -f *.vad
 	exit 1
 fi
+
 directory_clean
 
 BANNER "COMPLETED VAD PACKAGING"
diff --git a/appsrc/ODS-Briefcase/new/od-a-api.sql b/appsrc/ODS-Briefcase/new/od-a-api.sql
index 06bc21b..24deaf6 100644
--- a/appsrc/ODS-Briefcase/new/od-a-api.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-api.sql,v 1.1.2.5 2010/09/20 10:14:56 source Exp $
+--  $Id: od-a-api.sql,v 1.1.2.8 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -124,6 +124,55 @@ create procedure ODS.ODS_API.inheritance2string (
 
 -------------------------------------------------------------------------------
 --
+create procedure ODS.ODS_API."briefcase.list" (
+  in path varchar) __soap_http 'text/xml'
+{
+  declare uname, upassword, instance_iri varchar;
+  declare inst_id, id integer;
+  declare N integer;
+  declare sql, params, state, msg, meta, items any;
+
+  path := ODRIVE.WA.path_normalize (path, 'C');
+
+  inst_id := ODS.ODS_API.briefcase_instance (path);
+  if (not ods_check_auth (uname, inst_id))
+    return ods_auth_failed ();
+
+  instance_iri := SIOC..briefcase_iri (ODRIVE.WA.domain_name (inst_id));
+  upassword := ODRIVE.WA.account_password (ODRIVE.WA.account_id (uname));
+
+  sql := 'select TOP 100 rs.* from ODRIVE.WA.odrive_proc (rs0, rs1, rs2, rs3, rs4, rs5)(c0 varchar, c1 varchar, c2 integer, c3 varchar, c4 varchar, c5 varchar, c6 varchar, c7 varchar, c8 varchar, c9 varchar) rs where rs0 = ? and rs1 = ? and rs2 = ? and rs3 = ? and rs4 = ? and rs5 = ? order by c9, c3, c1';
+  params := vector (path, 0, null, null, uname, upassword);
+
+  set_user_id('dba');
+  state := '00000';
+  exec (sql, state, msg, params, 0, meta, items);
+  if (state <> '00000')
+    signal (state, msg);
+
+  http ('<?xml version="1.0"?>\n');
+  http ('<items>\n');
+  foreach (any item in items) do
+  {
+    http (sprintf ('<item path="%V">\n', ODRIVE.WA.utf2wide(item[8])));
+      http (sprintf ('<uri>%V</uri>\n', SIOC..post_iri_ex (instance_iri, DB.DBA.DAV_SEARCH_ID (item[8], item[1]))));
+      http (sprintf ('<name>%V</name>\n', ODRIVE.WA.utf2wide (item[0])));
+      http (sprintf ('<mimeType>%V</mimeType>\n', item[4]));
+      http (sprintf ('<size>%V</size>\n', cast(item[2] as varchar)));
+      http (sprintf ('<owner>%V</owner>\n', item[5]));
+      http (sprintf ('<group>%V</group>\n', item[6]));
+      http (sprintf ('<permissions>%V</permissions>\n', item[7]));
+      http (sprintf ('<modification>%V</modification>\n', item[3]));
+    http ('</item>\n');
+  }
+  http ('</items>\n');
+
+  return '';
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ODS.ODS_API."briefcase.info" (
   in path varchar,
   in "type" varchar) __soap_http 'text/xml'
@@ -188,15 +237,6 @@ create procedure ODS.ODS_API."briefcase.resource.info" (
 
 -------------------------------------------------------------------------------
 --
-create procedure ODS.ODS_API."briefcase.collection.info" (
-  in path varchar) __soap_http 'text/xml'
-{
-  return ODS.ODS_API."briefcase.info" (path, 'C');
-}
-;
-
--------------------------------------------------------------------------------
---
 create procedure ODS.ODS_API."briefcase.resource.vc.set" (
   in path varchar,
   in state varchar := 'on') __soap_http 'text/xml'
@@ -603,6 +643,15 @@ create procedure ODS.ODS_API."briefcase.resource.delete" (
 
 -------------------------------------------------------------------------------
 --
+create procedure ODS.ODS_API."briefcase.collection.info" (
+  in path varchar) __soap_http 'text/xml'
+{
+  return ODS.ODS_API."briefcase.info" (path, 'C');
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ODS.ODS_API."briefcase.collection.create" (
   in path varchar,
   in permissions varchar := '110100100RM') __soap_http 'text/xml'
@@ -665,10 +714,11 @@ create procedure ODS.ODS_API."briefcase.copy" (
   in overwrite integer := 1,
   in permissions varchar := '110100000RR') __soap_http 'text/xml'
 {
-  declare uname, upassword varchar;
+  declare uname, upassword, targetPath varchar;
   declare rc integer;
   declare uid, gid integer;
   declare inst_id, inst_id2 integer;
+  declare from_item, to_item any;
 
   declare exit handler for sqlstate '*'
   {
@@ -686,9 +736,20 @@ create procedure ODS.ODS_API."briefcase.copy" (
     return ods_auth_failed ();
 
   whenever not found goto ret;
+  rc := -1;
   select U_ID, U_GROUP into uid, gid from DB.DBA.SYS_USERS where U_NAME = uname;
   upassword := ODRIVE.WA.account_password (ODRIVE.WA.account_id (uname));
-  rc := DB.DBA.DAV_COPY (from_path, to_path, overwrite, permissions, uid, gid, uname, upassword);
+  from_item := ODRIVE.WA.DAV_INIT (from_path, uname, upassword);
+  if (ODRIVE.WA.dav_error (from_item))
+    return ods_serialize_int_res (from_item);
+  to_item := ODRIVE.WA.DAV_INIT (to_path, uname, upassword);
+  if (ODRIVE.WA.dav_error (to_item))
+    return ods_serialize_int_res (to_item);
+  targetPath := to_path || ODRIVE.WA.DAV_GET (from_item, 'name');
+  if (ODRIVE.WA.DAV_GET (from_item, 'type') = 'C')
+    targetPath := targetPath || '/';
+
+  rc := DB.DBA.DAV_COPY (from_path, targetPath, overwrite, permissions, uid, gid, uname, upassword);
 ret:
   return ods_serialize_int_res (rc);
 }
@@ -701,9 +762,10 @@ create procedure ODS.ODS_API."briefcase.move" (
   in to_path varchar,
   in overwrite integer := 1) __soap_http 'text/xml'
 {
-  declare uname, upassword varchar;
+  declare uname, upassword, targetPath varchar;
   declare rc integer;
   declare inst_id, inst_id2 integer;
+  declare from_item, to_item any;
 
   declare exit handler for sqlstate '*'
   {
@@ -721,7 +783,17 @@ create procedure ODS.ODS_API."briefcase.move" (
     return ods_auth_failed ();
 
   upassword := ODRIVE.WA.account_password (ODRIVE.WA.account_id (uname));
-  rc := DB.DBA.DAV_MOVE (from_path, to_path, overwrite, uname, upassword);
+  from_item := ODRIVE.WA.DAV_INIT (from_path, uname, upassword);
+  if (ODRIVE.WA.dav_error (from_item))
+    return ods_serialize_int_res (from_item);
+  to_item := ODRIVE.WA.DAV_INIT (to_path, uname, upassword);
+  if (ODRIVE.WA.dav_error (to_item))
+    return ods_serialize_int_res (to_item);
+  targetPath := to_path || ODRIVE.WA.DAV_GET (from_item, 'name');
+  if (ODRIVE.WA.DAV_GET (from_item, 'type') = 'C')
+    targetPath := targetPath || '/';
+
+  rc := DB.DBA.DAV_MOVE (from_path, targetPath, overwrite, uname, upassword);
   return ods_serialize_int_res (rc);
 }
 ;
@@ -901,7 +973,7 @@ create procedure ODS.ODS_API."briefcase.share.add" (
     return ods_auth_failed ();
 
   user_id := ODRIVE.WA.account_id ("user");
-  if (isnull (user_id))
+  if (user_id = -1)
     signal ('22023', 'The user name does not exist');
 
   "allow" := ODS.ODS_API.permissions2array ("allow");
@@ -967,7 +1039,7 @@ create procedure ODS.ODS_API."briefcase.share.remove" (
     return ods_auth_failed ();
 
   user_id := ODRIVE.WA.account_id ("user");
-  if (isnull (user_id))
+  if (user_id = -1)
     signal ('22023', 'The user name does not exist');
 
   upassword := ODRIVE.WA.account_password (ODRIVE.WA.account_id (uname));
@@ -1077,7 +1149,7 @@ create procedure ODS.ODS_API."briefcase.options.set" (
   if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'oDrive'))
     return ods_serialize_sql_error ('37000', 'The instance is not found');
 
-	account_id := (select U_ID from WS.WS.SYS_DAV_USER where U_NAME = uname);
+	account_id := ODRIVE.WA.account_id (uname);
 	optionsParams := split_and_decode (options, 0, '%\0,='); -- XXX: FIXME
 
 	settings := ODRIVE.WA.settings (account_id);
@@ -1117,7 +1189,7 @@ create procedure ODS.ODS_API."briefcase.options.get" (
   if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'oDrive'))
     return ods_serialize_sql_error ('37000', 'The instance is not found');
 
-	account_id := (select U_ID from WS.WS.SYS_DAV_USER where U_NAME = uname);
+	account_id := ODRIVE.WA.account_id (uname);
 	settings := ODRIVE.WA.settings (account_id);
 	ODRIVE.WA.settings_init (settings);
 
@@ -1135,6 +1207,7 @@ create procedure ODS.ODS_API."briefcase.options.get" (
 
 grant select on WS.WS.SYS_DAV_RES to ODS_API;
 
+grant execute on ODS.ODS_API."briefcase.list" to ODS_API;
 grant execute on ODS.ODS_API."briefcase.resource.info" to ODS_API;
 grant execute on ODS.ODS_API."briefcase.resource.get" to ODS_API;
 grant execute on ODS.ODS_API."briefcase.resource.store" to ODS_API;
diff --git a/appsrc/ODS-Briefcase/new/od-a-code.sql b/appsrc/ODS-Briefcase/new/od-a-code.sql
index 729235c..377b0d3 100644
--- a/appsrc/ODS-Briefcase/new/od-a-code.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-code.sql,v 1.36.2.20 2010/11/09 20:12:19 source Exp $
+--  $Id: od-a-code.sql,v 1.36.2.26 2012/03/08 12:00:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -377,7 +377,7 @@ create procedure ODRIVE.WA.dashboard_rs(
   in p0 integer)
 {
   declare account_id, vspxUser any;
-  declare wai_name, link varchar;
+  declare waiName, link varchar;
 
   declare c0 integer;
   declare c1 varchar;
@@ -401,8 +401,8 @@ create procedure ODRIVE.WA.dashboard_rs(
             and substring (RES_PERMS, 7, 1) = '1'
           order by RES_MOD_TIME desc) do
     {
-      wai_name := (select top 1 WAI_NAME from DB.DBA.WA_INSTANCE, DB.DBA.WA_MEMBER where WAI_TYPE_NAME = 'oDrive' and WAI_NAME = WAM_INST and WAM_MEMBER_TYPE = 1 and WAM_USER = RES_OWNER);
-      link := case when isnull (wai_name) then RES_FULL_PATH else SIOC..post_iri_ex (SIOC..briefcase_iri (wai_name), RES_ID) end;
+      waiName := (select top 1 WAI_NAME from DB.DBA.WA_INSTANCE, DB.DBA.WA_MEMBER where WAI_TYPE_NAME = 'oDrive' and WAI_NAME = WAM_INST and WAM_MEMBER_TYPE = 1 and WAM_USER = RES_OWNER);
+      link := case when isnull (waiName) then RES_FULL_PATH else SIOC..post_iri_ex (SIOC..briefcase_iri (waiName), RES_ID) end;
       result (RES_ID, RES_NAME, link, RES_MOD_TIME, RES_OWNER);
     }
   }
@@ -440,8 +440,8 @@ create procedure ODRIVE.WA.dashboard_rs(
                 ) sub
           order by RES_MOD_TIME desc) do
     {
-      wai_name := (select top 1 WAI_NAME from DB.DBA.WA_INSTANCE, DB.DBA.WA_MEMBER where WAI_TYPE_NAME = 'oDrive' and WAI_NAME = WAM_INST and WAM_MEMBER_TYPE = 1 and WAM_USER = RES_OWNER);
-      link := case when isnull (wai_name) then RES_FULL_PATH else SIOC..post_iri_ex (SIOC..briefcase_iri (wai_name), RES_ID) end;
+      waiName := (select top 1 WAI_NAME from DB.DBA.WA_INSTANCE, DB.DBA.WA_MEMBER where WAI_TYPE_NAME = 'oDrive' and WAI_NAME = WAM_INST and WAM_MEMBER_TYPE = 1 and WAM_USER = RES_OWNER);
+      link := case when isnull (waiName) then RES_FULL_PATH else SIOC..post_iri_ex (SIOC..briefcase_iri (waiName), RES_ID) end;
       result (RES_ID, RES_NAME, link, RES_MOD_TIME, RES_OWNER);
     }
   }
@@ -455,30 +455,24 @@ create procedure ODRIVE.WA.show_column_header (
   in columnName varchar,
   in sortOrder varchar,
   in sortDirection varchar := 'asc',
-  in isSortable integer := 1)
+  in columnProperties varchar := '')
 {
-  declare strClass, strOnclick any;
+  declare class, image, onclick any;
 
-  strClass := '';
-  strOnclick := '';
-  if (isSortable)
-  {
-    strClass := 'sortcol';
-    strOnclick := sprintf ('onclick="javascript: myPost(\'F1\', \'sortColumn\', \'%s\');"', columnName);
+  image := '';
+  onclick := sprintf ('onclick="javascript: odsPost(this, [\'sortColumn\', \'%s\']);"', columnName);
     if (sortOrder = columnName)
     {
       if (sortDirection = 'desc')
       {
-        strClass := strClass || ' sortcol_active sortcol_desc';
+      image := ' <img src="/ods/images/icons/orderdown_16.png" border="0" alt="Down"/>';
       }
       else if (sortDirection = 'asc')
       {
-        strClass := strClass || ' sortcol_active sortcol_asc';
-      }
+      image := ' <img src="/ods/images/icons/orderup_16.png" border="0" alt="Up"/>';
     }
-    strClass := 'class="' || strClass || '"';
   }
-  return sprintf ('<th %s %s>%s</th>', strClass, strOnclick, columnLabel);
+  return sprintf ('<th %s %s>%s%s</th>', columnProperties, onclick, columnLabel, image);
 }
 ;
 
@@ -804,13 +798,25 @@ create procedure ODRIVE.WA.xml2string(
 ;
 
 -------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.isVector (
+  inout aVector any)
+{
+  if (isarray (aVector) and not isstring (aVector))
+    return 1;
+
+  return 0;
+}
+;
+
+-------------------------------------------------------------------------------
 --  Returns:
 --    N -  if pAny is in pArray
 --   -1 -  otherwise
 -------------------------------------------------------------------------------
 create procedure ODRIVE.WA.vector_contains (
   inout aVector any,
-  in value varchar)
+  in value any)
 {
   declare N integer;
 
@@ -825,7 +831,7 @@ create procedure ODRIVE.WA.vector_contains (
 --
 create procedure ODRIVE.WA.vector_index (
   inout aVector any,
-  in value varchar)
+  in value any)
 {
   declare N integer;
 
@@ -1312,19 +1318,19 @@ create procedure ODRIVE.WA.odrive_proc(
     group_name := '';
     foreach (any item in dirList) do
     {
-      if (isarray(item))
+      if (isarray(item) and not isnull (item[0]))
       {
         if (((item[1] = 'C') or (item[10] like dirFilter)) and (ODRIVE.WA.hiddens_check (dirHiddens, item[10]) = 0))
         {
-          if (user_id <> item[7])
+          if (user_id <> coalesce (item[7], -1))
           {
-            user_id := item[7];
-            user_name := ODRIVE.WA.odrive_user_name(user_id);
+            user_id := coalesce (item[7], -1);
+            user_name := ODRIVE.WA.odrive_user_name (user_id, '');
           }
-          if (group_id <> item[6])
+          if (group_id <> coalesce (item[6], -1))
           {
-            group_id := item[6];
-            group_name := ODRIVE.WA.odrive_user_name(group_id);
+            group_id := coalesce (item[6], -1);
+            group_name := ODRIVE.WA.odrive_user_name (group_id, '');
           }
           tmp := coalesce((select RS_CATNAME from WS.WS.SYS_RDF_SCHEMAS, WS.WS.SYS_MIME_RDFS where RS_URI = MR_RDF_URI and MR_MIME_IDENT = item[9]), '~unknown~');
           result(item[either(gte(dir_mode,2),0,10)], item[1], item[2], left(cast(item[3] as varchar), 19), item[9], user_name, group_name, adm_dav_format_perms(item[5]), item[0], tmp);
@@ -1344,6 +1350,7 @@ create procedure ODRIVE.WA.odrive_effective_permissions (
   declare N, I, nPermission integer;
   declare rc, id, type, item any;
   declare lines, name, pwd, uid, gid, permissions any;
+  declare auth_name varchar;
 
   if (isstring(permission))
     permission := vector(permission);
@@ -1362,9 +1369,6 @@ create procedure ODRIVE.WA.odrive_effective_permissions (
   if (isinteger(item))
     return 0;
 
-  declare uid, gid integer;
-  declare auth_name varchar;
-
   auth_name := ODRIVE.WA.account();
   uid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = auth_name);
   gid := (select U_GROUP from DB.DBA.SYS_USERS where U_NAME = auth_name);
@@ -1614,6 +1618,34 @@ create procedure ODRIVE.WA.account_mail(
 
 -------------------------------------------------------------------------------
 --
+create procedure ODRIVE.WA.account_iri (
+  in account_id integer)
+{
+  declare exit handler for sqlstate '*'
+  {
+    return ODRIVE.WA.account_name (account_id);
+  };
+  return SIOC..person_iri (SIOC..user_iri (account_id, null));
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.account_inverse_iri (
+  in account_iri varchar)
+{
+  declare params any;
+
+  params := sprintf_inverse (account_iri, 'http://%s/dataspace/person/%s#this', 1);
+  if (length (params) <> 2)
+    return -1;
+
+  return coalesce ((select U_ID from DB.DBA.SYS_USERS where U_NAME = params[1]), -1);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ODRIVE.WA.account_sioc_url (
   in domain_id integer,
   in sid varchar := null,
@@ -1621,7 +1653,7 @@ create procedure ODRIVE.WA.account_sioc_url (
 {
   declare S varchar;
 
-  S := ODRIVE.WA.iri_fix (SIOC..person_iri (SIOC..user_iri (ODRIVE.WA.domain_owner_id (domain_id), null)));
+  S := ODRIVE.WA.iri_fix (ODRIVE.WA.account_iri (ODRIVE.WA.domain_owner_id (domain_id)));
   return ODRIVE.WA.url_fix (S, sid, realm);
 }
 ;
@@ -1753,6 +1785,7 @@ create procedure ODRIVE.WA.host_url ()
 
       hp := sys_connected_server_address ();
       hpa := split_and_decode ( hp , 0 , '\0\0:');
+      if (hpa [1] <> '80')
       host := host || ':' || hpa [1];
     }
     goto _exit;
@@ -2023,7 +2056,7 @@ create procedure ODRIVE.WA.odrive_name_home() returns varchar
 --
 create procedure ODRIVE.WA.shared_name() returns varchar
 {
-  return 'Shared Folders';
+  return 'Shared Resources';
 }
 ;
 
@@ -2237,6 +2270,8 @@ create procedure ODRIVE.WA.acl_params (
       acl_users := split_and_decode (trim (params[I+1]), 0, '\0\0,');
       for (N := 0; N < length (acl_users); N := N + 1)
       {
+        acl_user := ODRIVE.WA.account_inverse_iri (trim (acl_users[N]));
+        if (acl_user = -1)
         acl_user := ODRIVE.WA.odrive_user_id (trim (acl_users[N]));
         if (acl_user <> -1)
         {
@@ -2481,8 +2516,6 @@ create procedure ODRIVE.WA.odrive_sharing_dir_list (
         exec (S, st, msg, vector (), vector ('use_cache', 1), meta, data);
         if (st = '00000' and length (data))
         {
-          declare V any;
-
           for (N := 0; N < length (data); N := N + 1)
           {
             name := '';
@@ -2728,13 +2761,28 @@ create procedure ODRIVE.WA.auto_version_short (
 
 -------------------------------------------------------------------------------
 --
+create procedure ODRIVE.WA.det_type (
+  in path varchar,
+  in type varchar := 'C')
+{
+  declare id any;
+
+  id := DB.DBA.DAV_SEARCH_ID (path, type);
+  if (ODRIVE.WA.DAV_ERROR (id))
+    return '';
+  return cast (coalesce (DB.DBA.DAV_PROP_GET_INT (id, type, ':virtdet', 0), '') as varchar);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ODRIVE.WA.det_class(
   in path varchar,
   in type varchar := 'C')
 {
   declare id any;
 
-  id := ODRIVE.WA.DAV_SEARCH_ID (path);
+  id := ODRIVE.WA.DAV_SEARCH_ID (path, type);
   if (not ODRIVE.WA.DAV_ERROR (id) and isarray (id))
       return cast (id[0] as varchar);
   return '';
@@ -2760,41 +2808,6 @@ create procedure ODRIVE.WA.det_category(
 
 -------------------------------------------------------------------------------
 --
-create procedure ODRIVE.WA.det_action_enable(
-  in path varchar,
-  in action varchar)
-{
-  declare retValue integer;
-  declare det_category varchar;
-
-  retValue := 1;
-  det_category := ODRIVE.WA.det_category (path, either (equ (right (path, 1), '/'), 'C', 'R'));
-  if ((det_category <> '') and (action in ('share', 'version')))
-      {
-        retValue := 0;
-      }
-  else if ((det_category = 'Versioning') and (action in ('new', 'upload', 'edit', 'rename', 'version', 'share')))
-      {
-        retValue := 0;
-      }
-  else if ((det_category = 'S3') and (action in ('version', 'rename', 'tag', 'share')))
-      {
-        retValue := 0;
-      }
-  else if ((det_category = 'HostFs') and (action in ('version', 'tag', 'share')))
-    {
-          retValue := 0;
-      }
-  else if ((lcase(det_category) in ('blog', 'omail', 'news3', 'bookmark', 'calendar', 'nntp')) and (action in ('new', 'upload', 'delete', 'rename', 'move', 'version', 'share')))
-      {
-          retValue := 0;
-      }
-  return retValue;
-}
-;
-
--------------------------------------------------------------------------------
---
 create procedure ODRIVE.WA.DAV_GET_INFO(
   in path varchar,
   in info varchar,
@@ -2977,7 +2990,7 @@ create procedure ODRIVE.WA.DAV_GET_VERSION_CONTROL (
 -------------------------------------------------------------------------------
 --
 create procedure ODRIVE.WA.path_parent (
-  in path value)
+  in path varchar)
 {
   path := trim(path, '/');
   if (isnull(strrchr(path, '/')))
@@ -2989,7 +3002,7 @@ create procedure ODRIVE.WA.path_parent (
 -------------------------------------------------------------------------------
 --
 create procedure ODRIVE.WA.path_name (
-  in path value)
+  in path varchar)
 {
   path := trim(path, '/');
   if (isnull(strrchr(path, '/')))
@@ -3159,7 +3172,8 @@ create procedure ODRIVE.WA.DAV_INIT_INT (
   in auth_pwd varchar := null)
 {
   declare uid, gid integer;
-  declare permissions, uname, gname varchar;
+  declare uname, gname varchar;
+  declare permissions any;
 
   DB.DBA.DAV_OWNER_ID(ODRIVE.WA.account (), null, uid, gid);
   ODRIVE.WA.DAV_API_PARAMS (uid, gid, uname, gname, auth_name, auth_pwd);
@@ -3243,7 +3257,7 @@ create procedure ODRIVE.WA.DAV_GET (
     return resource[2];
 
   if (property = 'modificationTime')
-    return resource[3];
+    return case when is_empty_or_null (resource[3]) then now () else resource[3] end;
 
   if (property = 'id')
     return resource[4];
@@ -3279,7 +3293,7 @@ create procedure ODRIVE.WA.DAV_GET (
     return ODRIVE.WA.odrive_user_name(resource[7]);
 
   if (property = 'creationTime')
-    return resource[8];
+    return case when is_empty_or_null (resource[8]) then now () else resource[8] end;
 
   if (property = 'mimeType')
     return coalesce(resource[9], '');
@@ -3303,8 +3317,10 @@ create procedure ODRIVE.WA.DAV_GET (
     {
       if (ODRIVE.WA.DAV_PROP_GET (resource[0], 'virt:rdf_graph', '') <> '')
         detType := 'rdfSink';
-      if (ODRIVE.WA.DAV_PROP_GET (resource[0], 'virt:Versioning-History', '') <> '')
+      else if (ODRIVE.WA.DAV_PROP_GET (resource[0], 'virt:Versioning-History', '') <> '')
         detType := 'UnderVersioning';
+      else if (ODRIVE.WA.syncml_detect (resource[0]))
+        detType := 'SyncML';
     }  
     return detType;
   }
@@ -3342,7 +3358,7 @@ create procedure ODRIVE.WA.DAV_GET (
 
   if (property = 'permissions-inheritance')
   {
-    if ((isnull (resource[0])) or (resource[1] = 'R') or isarray(resource[1]))
+    if (isnull (resource[0]) or (resource[1] = 'R') or ODRIVE.WA.isVector (resource[1]))
       return null;
     return (select COL_INHERIT from WS.WS.SYS_DAV_COL where COL_ID = resource[4]);
   }
@@ -3469,7 +3485,11 @@ create procedure ODRIVE.WA.DAV_API_PARAMS (
     gname := (select G_NAME from WS.WS.SYS_DAV_GROUP where G_ID = gid);
 
   if (isnull(auth_name))
+  {
     auth_name := ODRIVE.WA.account();
+    if (auth_name = 'dba')
+      auth_name := 'dav';
+  }
   if (isnull(auth_pwd)) {
     auth_pwd := coalesce((SELECT U_PWD FROM WS.WS.SYS_DAV_USER WHERE U_NAME = auth_name), '');
     if (auth_pwd[0] = 0)
@@ -3499,7 +3519,7 @@ create procedure ODRIVE.WA.DAV_DIR_LIST (
 create procedure ODRIVE.WA.DAV_DIR_FILTER (
   in path varchar := '/DAV/',
   in recursive integer := 0,
-  inout filter any,
+  in filter any,
   in auth_name varchar := null,
   in auth_pwd varchar := null)
 {
@@ -3622,9 +3642,28 @@ create procedure ODRIVE.WA.DAV_DELETE (
   in auth_name varchar := null,
   in auth_pwd varchar := null)
 {
-  declare uname, gname varchar;
+  declare id any;
+  declare owner, uname, gname, detType varchar;
 
   ODRIVE.WA.DAV_API_PARAMS (null, null, uname, gname, auth_name, auth_pwd);
+  if (path[length (path)-1] = ascii('/'))
+  {
+    detType := ODRIVE.WA.det_type (path, 'C');
+    if (detType = 'SyncML')
+    {
+      ODRIVE.WA.exec ('delete from DB.DBA.SYNC_COLS_TYPES where CT_COL_ID = ?', vector (DB.DBA.DAV_SEARCH_ID (path, 'C')));
+    }
+    else if (detType = 'IMAP')
+    {
+      id := DB.DBA.DAV_SEARCH_ID (path, 'C');
+      if (not ODRIVE.WA.DAV_ERROR (id) and not isarray(id))
+      {
+        owner := sprintf ('IMAP_%d', id);
+        ODRIVE.WA.exec ('delete from DB.DBA.MAIL_FOLDER where MF_OWN = ?', vector (owner));
+        ODRIVE.WA.exec ('delete from DB.DBA.MAIL_MESSAGE where MM_OWN = ?', vector (owner));
+      }
+    }
+  }
   return DB.DBA.DAV_DELETE(path, silent, auth_name, auth_pwd);
 }
 ;
@@ -3650,6 +3689,24 @@ create procedure ODRIVE.WA.DAV_RES_UPLOAD (
 
 -------------------------------------------------------------------------------
 --
+create procedure ODRIVE.WA.DAV_RDF_UPLOAD (
+  inout content any,
+  in type varchar,
+  in graph varchar)
+{
+  declare retValue integer;
+  declare graph2 varchar;
+
+  graph2 := 'http://local.virt/temp';
+  retValue := DB.DBA.RDF_SINK_UPLOAD ('/temp', content, type, graph, 'on', '', '');
+  SPARQL clear graph ?:graph2;
+
+  return retValue;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ODRIVE.WA.DAV_RES_CONTENT (
   in path varchar,
   in auth_name varchar := null,
@@ -3768,13 +3825,15 @@ create procedure ODRIVE.WA.DAV_PROP_SET (
   in auth_pwd varchar := null,
   in removeBefore integer := 1)
 {
-  -- dbg_obj_princ ('ODRIVE.WA.DAV_PROP_SET (', path, propName, ')');
+  -- dbg_obj_princ ('ODRIVE.WA.DAV_PROP_SET (', path, propName, propValue, ')');
   declare uname, gname varchar;
+  declare retValue any;
 
   ODRIVE.WA.DAV_API_PARAMS (null, null, uname, gname, auth_name, auth_pwd);
   if (removeBefore)
-  DB.DBA.DAV_PROP_REMOVE(path, propname, auth_name, auth_pwd);
-  return DB.DBA.DAV_PROP_SET(path, propname, propvalue, auth_name, auth_pwd);
+    retValue := DB.DBA.DAV_PROP_REMOVE (path, propName, auth_name, auth_pwd);
+
+  return DB.DBA.DAV_PROP_SET (path, propName, propValue, auth_name, auth_pwd);
 }
 ;
 
@@ -3923,7 +3982,10 @@ create procedure ODRIVE.WA.get_rdf (
 create procedure ODRIVE.WA.test_clear (
   in S any)
 {
-  return substring(S, 1, coalesce(strstr(S, '<>'), length(S)));
+  S := substring (S, 1, coalesce (strstr (S, '<>'), length (S)));
+  S := substring (S, 1, coalesce (strstr (S, '\nin'), length (S)));
+
+  return S;
 }
 ;
 
@@ -3994,8 +4056,9 @@ create procedure ODRIVE.WA.test (
     tmp := get_keyword('maxValue', params);
     if (not isnull(tmp) and (value > tmp))
       signal('MAX', cast(tmp as varchar));
-
-  } else if (valueType = 'float') {
+  }
+  else if (valueType = 'float')
+  {
     tmp := get_keyword('minValue', params);
     if (not isnull(tmp) and (value < tmp))
       signal('MIN', cast(tmp as varchar));
@@ -4003,8 +4066,9 @@ create procedure ODRIVE.WA.test (
     tmp := get_keyword('maxValue', params);
     if (not isnull(tmp) and (value > tmp))
       signal('MAX', cast(tmp as varchar));
-
-  } else if (valueType = 'varchar') {
+  }
+  else if (valueType = 'varchar')
+  {
     tmp := get_keyword('minLength', params);
     if (not isnull(tmp) and (length(value) < tmp))
       signal('MINLENGTH', cast(tmp as varchar));
@@ -4198,63 +4262,6 @@ ODRIVE.WA.version_update()
 
 -------------------------------------------------------------------------------
 --
-create procedure ODRIVE.WA.obj2json (
-  in o any,
-  in d integer := 2)
-{
-  declare N, M integer;
-  declare R, T any;
-  declare retValue any;
-
-	if (d = 0)
-	  return '[maximum depth achieved]';
-
-  T := vector ('\b', '\\b', '\t', '\\t', '\n', '\\n', '\f', '\\f',	'\r', '\\r', '"', '\\"', '\\', '\\\\');
-	retValue := '';
-	if (isnumeric (o))
-	{
-		retValue := cast (o as varchar);
-	}
-	else if (isstring (o))
-	{
-		for (N := 0; N < length(o); N := N + 1)
-		{
-			R := chr (o[N]);
-		  for (M := 0; M < length(T); M := M + 2)
-		  {
-				if (R = T[M])
-				  R := T[M+1];
-			}
-			retValue := retValue || R;
-		}
-		retValue := '"' || retValue || '"';
-	}
-	else if (isarray (o))
-	{
-		retValue := '[';
-		for (N := 0; N < length(o); N := N + 1)
-		{
-		  retValue := retValue || ODRIVE.WA.obj2json (o[N], d-1);
-		  if (N <> length(o)-1)
-			  retValue := retValue || ',\n';
-		}
-		retValue := retValue || ']';
-	}
-	return retValue;
-}
-;
-
--------------------------------------------------------------------------------
---
-create procedure ODRIVE.WA.json2obj (
-  in o any)
-{
-  return json_parse (o);
-}
-;
-
--------------------------------------------------------------------------------
---
 create procedure ODRIVE.WA.ui_image (
   in itemPath varchar,
   in itemType varchar,
@@ -4262,19 +4269,22 @@ create procedure ODRIVE.WA.ui_image (
 {
   if (itemType = 'C')
   {
-    if (ODRIVE.WA.det_category(itemPath) = 'CatFilter')
+    declare det_type varchar;
+
+    det_type := ODRIVE.WA.det_type (itemPath, itemType);
+    if (det_type = 'CatFilter')
       return 'image/dav/category_16.png';
-    if (ODRIVE.WA.det_category(itemPath) = 'PropFilter')
+    if (det_type = 'PropFilter')
       return 'image/dav/property_16.png';
-    if (ODRIVE.WA.det_category(itemPath) = 'HostFs')
+    if (det_type = 'HostFs')
       return 'image/dav/hostfs_16.png';
-    if (ODRIVE.WA.det_category(itemPath) = 'Versioning')
+    if (det_type = 'Versioning')
       return 'image/dav/versions_16.png';
-    if (ODRIVE.WA.det_category(itemPath) = 'News3')
+    if (det_type = 'News3')
       return 'image/dav/enews_16.png';
-    if (ODRIVE.WA.det_category(itemPath) = 'Blog')
+    if (det_type = 'Blog')
       return 'image/dav/blog_16.png';
-    if (ODRIVE.WA.det_category(itemPath) = 'oMail')
+    if (det_type = 'oMail')
       return 'image/dav/omail_16.png';
     return 'image/dav/foldr_16.png';
   }
@@ -4380,6 +4390,8 @@ create procedure ODRIVE.WA.send_mail (
   {
      _iri := SIOC..briefcase_iri (ODRIVE.WA.domain_name (_instance));
      _what := case when (_path[length (_path)-1] <> ascii('/')) then 'R' else 'C' end;
+     if (_what = 'C')
+       _iri := _iri || '/folder';
      _id := DB.DBA.DAV_SEARCH_ID (_path, _what);
 
     if (exists (select 1 from SYS_USERS where U_ID = _to and U_IS_ROLE = 1))
@@ -4481,9 +4493,19 @@ create procedure ODRIVE.WA.aci_parents (
 create procedure ODRIVE.WA.aci_load (
   in path varchar)
 {
-  declare retValue, graph any;
+  declare id, what, retValue, graph any;
   declare S, st, msg, data, meta any;
 
+  what := case when (path[length (path)-1] <> ascii('/')) then 'R' else 'C' end;
+  id := ODRIVE.WA.DAV_SEARCH_ID (path, what);
+  if (isarray (id))
+  {
+    retValue := ODRIVE.WA.DAV_PROP_GET (path, 'virt:aci_meta');
+    if (ODRIVE.WA.DAV_ERROR (retValue))
+      retValue := vector ();
+  }
+  else
+  {
   retValue := vector ();
 
   graph := WS.WS.DAV_IRI (path);
@@ -4542,12 +4564,33 @@ create procedure ODRIVE.WA.aci_load (
         V[3] := 1;
       if (aclMode = 'acl:Write')
         V[4] := 1;
-      if (aclMode = 'acl:Control')
+      if (aclMode = 'acl:Execute')
         V[5] := 1;
     }
     if (not isnull (V))
       retValue := vector_concat (retValue, vector (V));
   }
+  }
+  return retValue;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.aci_save (
+  in path varchar,
+  inout aci any)
+{
+  declare id, what, retValue, tmp any;
+
+  what := case when (path[length (path)-1] <> ascii('/')) then 'R' else 'C' end;
+  id := ODRIVE.WA.DAV_SEARCH_ID (path, what);
+  if (isarray (id))
+    retValue := ODRIVE.WA.DAV_PROP_SET (path, 'virt:aci_meta', aci);
+
+  if (not isarray (id))
+    retValue := ODRIVE.WA.DAV_PROP_SET (path, 'virt:aci_meta_n3', ODRIVE.WA.aci_n3 (aci));
+
   return retValue;
 }
 ;
@@ -4555,7 +4598,7 @@ create procedure ODRIVE.WA.aci_load (
 -------------------------------------------------------------------------------
 --
 create procedure ODRIVE.WA.aci_params (
-  in params any)
+  inout params any)
 {
   declare N, M integer;
   declare aclNo, retValue, V any;
@@ -4618,7 +4661,7 @@ create procedure ODRIVE.WA.aci_n3 (
       if (aciArray[N][4])
         retValue := retValue || ';\n   acl:mode acl:Write';
       if (aciArray[N][5])
-        retValue := retValue || ';\n   acl:mode acl:Control';
+        retValue := retValue || ';\n   acl:mode acl:Execute';
       retValue := retValue || '.\n';
     }
   }
@@ -4658,3 +4701,118 @@ create procedure ODRIVE.WA.path_normalize (
   return path;
 }
 ;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.path2ssl (
+  in path varchar)
+{
+  declare pos any;
+  declare V, sslData, sslPort any;
+
+  sslData := ODS.ODS_API."server.getInfo"('sslPort');
+  if (not isnull (sslData))
+  {
+    sslPort := get_keyword ('sslPort', sslData, 443);
+    V := rfc1808_parse_uri (path);
+    V[0] := 'https';
+
+    pos := strrchr (V[1], ':');
+    if (pos is not null)
+      V[1] := subseq (V[1], 0, pos);
+    V[1] := V[1] || case when sslPort <> 443 then ':' || cast (sslPort as varchar) else '' end;
+    path := DB.DBA.vspx_uri_compose (V);
+
+  }
+  return path;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.syncml_detect (
+  in path varchar)
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_detect') is not null)
+    return DB.DBA.yac_syncml_detect (path);
+
+  return 0;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.syncml_versions ()
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_version') is not null)
+    return DB.DBA.yac_syncml_version ();
+
+  return vector ();
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.syncml_version (
+  in path varchar)
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_version_get') is not null)
+    return DB.DBA.yac_syncml_version_get (path);
+
+  return 'N';
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.syncml_types ()
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_type') is not null)
+    return DB.DBA.yac_syncml_type ();
+
+  return vector ();
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.syncml_type (
+  in path varchar)
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_type_get') is not null)
+    return DB.DBA.yac_syncml_type_get (path);
+
+  return 'N';
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.cartridges_get ()
+{
+  declare retValue any;
+
+  retValue := vector ();
+  for (select RM_ID, RM_DESCRIPTION, ucase (cast (RM_DESCRIPTION as varchar (128))) as RM_SORT from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by 3) do
+  {
+    retValue := vector_concat (retValue, vector (vector (RM_ID, RM_DESCRIPTION)));
+  }
+  return retValue;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.metaCartridges_get ()
+{
+  declare items, retValue any;
+
+  retValue := vector ();
+  items := ODRIVE.WA.exec ('select MC_ID, MC_DESC, ucase (cast (MC_DESC as varchar (128))) as MC_SORT from DB.DBA.RDF_META_CARTRIDGES where MC_ENABLED = 1 order by 3');
+  foreach (any item in items) do
+  {
+    retValue := vector_concat (retValue, vector (vector (item[0], item[1])));
+  }
+  return retValue;
+}
+;
diff --git a/appsrc/ODS-Briefcase/new/od-a-dc-data.sql b/appsrc/ODS-Briefcase/new/od-a-dc-data.sql
index 88f50ff..64f80f7 100644
--- a/appsrc/ODS-Briefcase/new/od-a-dc-data.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-dc-data.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-dc-data.sql,v 1.2.2.1 2010/09/20 10:14:57 source Exp $
+--  $Id: od-a-dc-data.sql,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-dc.sql b/appsrc/ODS-Briefcase/new/od-a-dc.sql
index 7d389d6..e223ff0 100644
--- a/appsrc/ODS-Briefcase/new/od-a-dc.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-dc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-dc.sql,v 1.7.2.4 2010/09/20 10:14:57 source Exp $
+--  $Id: od-a-dc.sql,v 1.7.2.5 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-ddk.sql b/appsrc/ODS-Briefcase/new/od-a-ddk.sql
index df5d42a..1ad6b29 100644
--- a/appsrc/ODS-Briefcase/new/od-a-ddk.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-ddk.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-ddk.sql,v 1.5.2.5 2010/11/09 20:12:19 source Exp $
+--  $Id: od-a-ddk.sql,v 1.5.2.6 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-ods.sql b/appsrc/ODS-Briefcase/new/od-a-ods.sql
index a85ed89..69adb4f 100644
--- a/appsrc/ODS-Briefcase/new/od-a-ods.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-ods.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-ods.sql,v 1.1.2.1 2010/09/20 10:14:57 source Exp $
+--  $Id: od-a-ods.sql,v 1.1.2.2 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-rdf-data.sql b/appsrc/ODS-Briefcase/new/od-a-rdf-data.sql
index f6f60a2..c68dae6 100644
--- a/appsrc/ODS-Briefcase/new/od-a-rdf-data.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-rdf-data.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-rdf-data.sql,v 1.7.2.1 2010/09/20 10:14:57 source Exp $
+--  $Id: od-a-rdf-data.sql,v 1.7.2.2 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-rdf.sql b/appsrc/ODS-Briefcase/new/od-a-rdf.sql
index 255bfed..10424c6 100644
--- a/appsrc/ODS-Briefcase/new/od-a-rdf.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-rdf.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-rdf.sql,v 1.6.2.1 2010/09/20 10:14:57 source Exp $
+--  $Id: od-a-rdf.sql,v 1.6.2.2 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-soap.sql b/appsrc/ODS-Briefcase/new/od-a-soap.sql
deleted file mode 100644
index 2e51927..0000000
--- a/appsrc/ODS-Briefcase/new/od-a-soap.sql
+++ /dev/null
@@ -1,163 +0,0 @@
---
---  $Id: od-a-soap.sql,v 1.12.2.1 2010/09/20 10:14:57 source Exp $
---
---  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
---  project.
---
---  Copyright (C) 1998-2006 OpenLink Software
---
---  This project 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; only version 2 of the License, dated June 1991.
---
---  This program 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
---  General Public License for more details.
---
---  You should have received a copy of the GNU General Public License along
---  with this program; if not, write to the Free Software Foundation, Inc.,
---  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
---
-
-SOAP_LOAD_SCH (
-'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.openlinksw.com/odrive" xmlns:od="http://www.openlinksw.com/odrive">
-	<xs:element name="version">
- 		<xs:complexType mixed="true">
- 			<xs:attribute name="number" use="required" type="xs:integer"/>
- 		</xs:complexType>
- 	</xs:element>
- 	<xs:element name="versions">
- 		<xs:complexType>
- 			<xs:sequence>
- 				<xs:element ref="od:version"/>
- 			</xs:sequence>
- 		</xs:complexType>
- 	</xs:element>
- 	<xs:element name="row">
- 		<xs:complexType>
- 			<xs:sequence>
-		    <xs:element name="uri" type="xs:string"/>
-		    <xs:element name="path" type="xs:string"/>
-		    <xs:element name="name" type="xs:string"/>
-		    <xs:element name="dateModified" type="xs:dateTime"/>
-		    <xs:element name="kind" type="xs:string"/>
-		    <xs:element name="size" type="xs:integer"/>
-		    <xs:element name="owner" type="xs:string"/>
-		    <xs:element name="group" type="xs:string"/>
-		    <xs:element name="permissions" type="xs:string"/>
-		    <xs:element name="tags" type="xs:string"/>
-		    <xs:element ref="od:versions" minOccurs="0"/>
- 			</xs:sequence>
- 			<xs:attribute name="number" use="required" type="xs:integer"/>
- 		</xs:complexType>
- 	</xs:element>
-  <xs:complexType name="rows">
-    <xs:sequence>
-      <xs:element ref="od:row" maxOccurs="unbounded"/>
-    </xs:sequence>
-  </xs:complexType>
- </xs:schema>')
-;
-
------------------------------------------------------------------------------
---
-create procedure DBA.SOAPODRIVE.Browse (
-  in uName varchar,
-  in uPassword varchar,
-  in path varchar,
-  in dateBegin dateTime,
-  in dateEnd dateTime) __SOAP_OPTIONS (__SOAP_TYPE:='http://www.openlinksw.com/odrive:rows', "PartName" := 'rows')
-{
-  declare N, M integer;
-  declare tags, tags2, data, sql, params, state, msg, meta, rows any;
-  declare sVersions, aVersions any;
-
-  ODRIVE.WA.dc_set_base (data, 'path', path);
-
-  ODRIVE.WA.dc_set_criteria (data, '0', 'RES_MOD_TIME',  '>=', cast (dateBegin as varchar));
-  ODRIVE.WA.dc_set_criteria (data, '1', 'RES_MOD_TIME',  '<=', cast (dateEnd as varchar));
-
-  sql := 'select TOP 100 rs.* from ODRIVE.WA.odrive_proc(rs0, rs1, rs2, rs3, rs4, rs5)(c0 varchar, c1 varchar, c2 integer, c3 varchar, c4 varchar, c5 varchar, c6 varchar, c7 varchar, c8 varchar, c9 varchar) rs where rs0 = ? and rs1 = ? and rs2 = ? and rs3 = ? and rs4 = ? and rs5 = ? order by c9, c3, c1';
-  params := vector(path, 20, data, null, uName, uPassword);
-
-  set_user_id('dba');
-  state := '00000';
-  exec(sql, state, msg, params, 0, meta, rows);
-  if (state <> '00000')
-    signal (state, msg);
-
-  declare sStream, resource any;
-
-  sStream := string_output();
-  http ('<?xml version="1.0"?>\n', sStream);
-  http ('<rows>\n', sStream);
-  for (N := 0; N < length(rows); N := N + 1)
-  {
-    resource := DB.DBA.DAV_DIR_LIST(rows[N][0], -1, uName, uPassword);
-    if (ODRIVE.WA.DAV_ERROR (resource))
-      goto _end;
-    tags := DB.DBA.DAV_PROP_GET(rows[N][0], ':virtpublictags', uName, uPassword);
-    if (ODRIVE.WA.DAV_ERROR (tags))
-      tags := '';
-    tags2 := DB.DBA.DAV_PROP_GET(rows[N][0], ':virtprivatetags', uName, uPassword);
-    if (ODRIVE.WA.DAV_ERROR (tags2))
-      tags2 := '';
-    http (sprintf('<row number="%d">\n', N+1), sStream);
-      http ('<uri>', sStream);
-        http_value (sprintf('%s/%s', ODRIVE.WA.host_url (), ODRIVE.WA.utf2wide(rows[N][0])), null, sStream);
-      http ('</uri>\n', sStream);
-      http ('<path>', sStream);
-        http_value (ODRIVE.WA.utf2wide(rows[N][0]), null, sStream);
-      http ('</path>\n', sStream);
-      http ('<name>', sStream);
-        http_value (resource[0][10], null, sStream);
-      http ('</name>\n', sStream);
-      http ('<dateModified>', sStream);
-        http_value (rows[N][3], null, sStream);
-      http ('</dateModified>', sStream);
-      http ('<kind>', sStream);
-        http_value (rows[N][9], null, sStream);
-      http ('</kind>\n', sStream);
-      http ('<size>', sStream);
-        http_value (cast(rows[N][2] as varchar), null, sStream);
-      http ('</size>\n', sStream);
-      http ('<owner>', sStream);
-        http_value (rows[N][5], null, sStream);
-      http ('</owner>\n', sStream);
-      http ('<group>', sStream);
-        http_value (rows[N][6], null, sStream);
-      http ('</group>\n', sStream);
-      http ('<permissions>', sStream);
-        http_value (rows[N][7], null, sStream);
-      http ('</permissions>\n', sStream);
-      http ('<tags>', sStream);
-        http_value (ODRIVE.WA.tags_join(tags, tags2), null, sStream);
-      http ('</tags>\n', sStream);
-      sVersions := DB.DBA.DAV_PROP_GET(ODRIVE.WA.DAV_GET_VERSION_HISTORY_PATH(rows[N][0]), 'DAV:version-set', uName, uPassword);
-      if (isstring(sVersions))
-      {
-        http ('<versions>\n', sStream);
-        aVersions := xpath_eval ('/href', xtree_doc(sVersions), 0);
-        for (M := 0; M < length(aVersions); M := M + 1)
-        {
-          http (sprintf('<version number="%d">', M+1), sStream);
-            http_value (cast(aVersions[M] as varchar), null, sStream);
-          http ('</version>\n', sStream);
-        }
-        http ('</versions>\n', sStream);
-      }
-    http ('</row>\n', sStream);
-  _end:;
-  }
-  http ('</rows>\n', sStream);
-
-  return xml_tree_doc(string_output_string(sStream));
-}
-;
-
-grant execute on "http://www.openlinksw.com/odrive:rows" to SOAPODrive
-;
-grant execute on DBA.SOAPODRIVE.Browse to SOAPODrive
-;
diff --git a/appsrc/ODS-Briefcase/new/od-a-update.sql b/appsrc/ODS-Briefcase/new/od-a-update.sql
index 9668f5f..bd44d00 100644
--- a/appsrc/ODS-Briefcase/new/od-a-update.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-update.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-update.sql,v 1.1.2.2 2010/09/20 10:14:57 source Exp $
+--  $Id: od-a-update.sql,v 1.1.2.3 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/new/od-a-wa.sql b/appsrc/ODS-Briefcase/new/od-a-wa.sql
index fd26235..a62a24c 100644
--- a/appsrc/ODS-Briefcase/new/od-a-wa.sql
+++ b/appsrc/ODS-Briefcase/new/od-a-wa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-a-wa.sql,v 1.13.2.4 2010/09/22 13:57:02 source Exp $
+--  $Id: od-a-wa.sql,v 1.13.2.6 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -58,10 +58,8 @@ create procedure ODRIVE.WA.exec_no_error(in expr varchar, in execType varchar :=
 --
 create procedure ODRIVE.WA.odrive_vhost()
 {
-  declare
-    iIsDav integer;
-  declare
-    sHost varchar;
+  declare iIsDav integer;
+  declare sHost varchar;
 
   -- Add a virtual directory for oDrive - public www -------------------------
   sHost := registry_get('_oDrive_path_');
@@ -96,16 +94,6 @@ create procedure ODRIVE.WA.odrive_vhost()
                opts     => vector ('url_rewrite', 'ods_rulelist_briefcase')
              );
 
-  USER_CREATE ('SOAPODrive', md5 (cast (now() as varchar)), vector ('DISABLED', 1));
-  USER_SET_QUALIFIER ('SOAPODrive', 'DBA');
-
-  VHOST_REMOVE (lpath => '/odrive/SOAP');
-  VHOST_REMOVE (lpath => '/dataspace/services/briefcase');
-  VHOST_DEFINE (lpath => '/dataspace/services/briefcase',
-                ppath => '/SOAP/',
-                soap_user => 'SOAPODrive',
-                soap_opts => vector('Use', 'literal', 'XML-RPC', 'no' ));
-
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
     'rdf_sink_rule1',
     1,
@@ -128,6 +116,14 @@ create procedure ODRIVE.WA.odrive_vhost()
 
   VHOST_REMOVE (lpath=>'/DAV');
   VHOST_DEFINE (lpath=>'/DAV', ppath=>'/DAV/', is_dav=>1, vsp_user=>'dba', is_brws=>1, opts=>vector ('url_rewrite', 'rdf_sink_rule_list'));
+
+  -- old SOAP
+  -- api user & url
+  ODRIVE.WA.exec_no_error ('USER_DROP (\'SOAPODrive\')');
+  VHOST_REMOVE (lpath => '/odrive/SOAP');
+  VHOST_REMOVE (lpath => '/dataspace/services/briefcase');
+  -- procs
+  ODRIVE.WA.exec_no_error ('DROP procedure DBA.SOAPODRIVE.Browse');
 }
 ;
 
diff --git a/appsrc/ODS-Briefcase/new/od-d.sql b/appsrc/ODS-Briefcase/new/od-d.sql
index f221789..d83eb7d 100644
--- a/appsrc/ODS-Briefcase/new/od-d.sql
+++ b/appsrc/ODS-Briefcase/new/od-d.sql
@@ -1,10 +1,10 @@
 --
---  $Id: od-d.sql,v 1.7.2.4 2010/09/20 10:14:57 source Exp $
+--  $Id: od-d.sql,v 1.7.2.7 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -89,9 +89,6 @@ ODRIVE.WA.exec_no_error ('DROP view DB.DBA.ODS_ODRIVE_TAGS');
 -- reinit
 ODS_RDF_VIEW_INIT ();
 
--- SOAP procs
-ODRIVE.WA.exec_no_error('DROP procedure DBA.SOAPODRIVE.Browse');
-
 -- dropping ODS procs
 ODRIVE.WA.exec_no_error('DROP procedure DB.DBA.wa_collect_odrive_tags');
 
@@ -105,3 +102,4 @@ registry_remove ('__ods_briefcase_sioc_init');
 registry_remove ('odrive_items_upgrade');
 registry_remove ('odrive_path_upgrade');
 registry_remove ('odrive_path_upgrade2');
+registry_remove ('odrive_services_update');
diff --git a/appsrc/ODS-Briefcase/new/sioc_briefcase.sql b/appsrc/ODS-Briefcase/new/sioc_briefcase.sql
index 4b61cbb..be96700 100644
--- a/appsrc/ODS-Briefcase/new/sioc_briefcase.sql
+++ b/appsrc/ODS-Briefcase/new/sioc_briefcase.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_briefcase.sql,v 1.16.2.9 2010/09/27 14:44:36 source Exp $
+--  $Id: sioc_briefcase.sql,v 1.16.2.14 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -80,11 +80,47 @@ create procedure briefcase_sparql (
 
 -------------------------------------------------------------------------------
 --
+create procedure briefcase_resource_iri (
+  in full_path varchar)
+{
+  declare id, path, wai_name any;
+
+  path := split_and_decode (full_path, 0, '\0\0/');
+  if (length (path) < 6 or path [4] <> 'Public')
+    return null;
+
+  wai_name := (select WAI_NAME
+                 from DB.DBA.WA_INSTANCE,
+                      DB.DBA.WA_MEMBER,
+                      DB.DBA.SYS_USERS
+                where WAI_TYPE_NAME = 'oDrive'
+                  and WAM_INST = WAI_NAME
+                  and WAM_USER = U_ID
+                  and WAM_IS_PUBLIC = 1
+                  and U_NAME = path[3]
+                  and U_ACCOUNT_DISABLED = 0
+                  and U_DAV_ENABLE = 1);
+  if (isnull (wai_name))
+    return null;
+
+  id := (select RES_ID from WS.WS.SYS_DAV_RES where RES_FULL_PATH = full_path);
+  if (isnull (id))
+    return null;
+
+  return post_iri_ex (briefcase_iri (wai_name), id);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure fill_ods_briefcase_sioc (in graph_iri varchar, in site_iri varchar, in _wai_name varchar := null)
 {
   declare iri, c_iri, creator_iri, t_iri, link, content varchar;
   declare linksTo, tags any;
 
+  -- init services
+  SIOC..fill_ods_briefcase_services ();
+
   for (select WAI_ID,
               WAI_NAME,
               WAM_USER,
@@ -172,6 +208,29 @@ create procedure fill_ods_briefcase_sioc (in graph_iri varchar, in site_iri varc
 }
 ;
 
+-------------------------------------------------------------------------------
+--
+create procedure fill_ods_briefcase_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('briefcase.resource.store', 'briefcase.collection.create', 'briefcase.options.set',  'briefcase.options.get');
+  ods_object_services (graph_iri, 'briefcase', 'ODS briefcase instance services', svc_functions);
+
+  -- contact
+  svc_functions := vector ('briefcase.resource.info', 'briefcase.resource.get', 'briefcase.resource.delete', 'briefcase.copy', 'briefcase.move', 'briefcase.property.set', 'briefcase.property.get', 'briefcase.property.remove');
+  ods_object_services (graph_iri, 'briefcase/resource', 'ODS briefcase resource services', svc_functions);
+
+  -- contact comment
+  svc_functions := vector ('briefcase.collection.info', 'briefcase.collection.delete', 'briefcase.copy', 'briefcase.move', 'briefcase.property.set', 'briefcase.property.get', 'briefcase.property.remove');
+  ods_object_services (graph_iri, 'briefcase/collection', 'ODS briefcase collection services', svc_functions);
+}
+;
+
 create procedure ods_briefcase_sioc_tags (in path varchar, in res_id int, in owner int, in owner_name varchar, in tags any, in op varchar)
 {
   declare iri, post_iri varchar;
@@ -207,8 +266,8 @@ create procedure briefcase_sioc_insert (
   declare graph_iri, iri, c_iri, creator_iri, t_iri, link varchar;
   declare linksTo, tags, content any;
 
-  declare exit handler for sqlstate '*' {
-    --dbg_obj_print (__SQL_MESSAGE);
+  declare exit handler for sqlstate '*'
+  {
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
@@ -217,7 +276,6 @@ create procedure briefcase_sioc_insert (
   {
     r_full_path := (select r.RES_FULL_PATH from WS.WS.SYS_DAV_RES r where r.RES_ID = r_id);
   }
-  --dbg_obj_print (r_id, r_full_path);
   if (r_full_path not like '/DAV/%/Public/%' or r_name[0] = ascii ('.'))
     return;
 
@@ -259,13 +317,16 @@ create procedure briefcase_sioc_insert (
       tags := '';
     scot_tags_insert (WAI_ID, iri, tags);
 
+    -- briefcase services
+    SIOC..ods_object_services_dettach (graph_iri, c_iri, 'briefcase/resource');
+
     -- SIOC data for 'application/foaf+xml' and AddressBook application
-    briefcase_sioc_insert_ex (r_full_path, r_type, r_owner, U_NAME, r_content);
+    SIOC..briefcase_sioc_insert_ex (r_full_path, r_type, r_owner, U_NAME, r_content);
   }
 }
 ;
 
--- SIOC data for 'application/foaf+xml' and SocialNetwork application
+-- SIOC data for 'application/foaf+xml' and AddressBook application
 --
 create procedure briefcase_sioc_insert_ex (
   in r_full_path varchar,
@@ -274,11 +335,6 @@ create procedure briefcase_sioc_insert_ex (
   in r_ownerName varchar,
   inout r_content any)
 {
-  declare continue handler for SQLSTATE '*' {
-    --dbg_obj_print (__SQL_STATE, __SQL_MESSAGE )
-    ;
-  };
-
   declare K, L, M, N, is_xml, instance_id integer;
   declare appType, g_iri, c_iri, w_iri, also_iri, creator_iri, p_iri, a_iri, r_iri, e_iri any;
   declare personName any;
@@ -380,7 +436,8 @@ create procedure briefcase_sioc_insert_ex (
 
   -- is vCard or vCalendar file?
   --
-  if ((r_type = 'text/directory') or (r_type = 'text/calendar')) {
+  if ((r_type = 'text/directory') or (r_type = 'text/calendar'))
+  {
     -- main IRI-s
     g_iri := get_graph ();
     creator_iri := user_iri (r_owner);
@@ -528,7 +585,9 @@ create procedure briefcase_sioc_insert_ex (
             eLink := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/URL/val', N), xmlItem, 1) as varchar);
             eSummary := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/SUMMARY/val', N), xmlItem, 1) as varchar);
             eDescription := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/DESCRIPTION/val', N), xmlItem, 1) as varchar);
-            { declare continue handler for sqlstate '*' {
+            {
+              declare continue handler for sqlstate '*'
+              {
                 eCreated := null;
               };
               eCreated := stringdate (cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/DTSTAMP/val', N), xmlItem, 1) as varchar));
@@ -602,7 +661,8 @@ create procedure briefcase_sioc_delete (
     }
 
   also_iri := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_TYPE = 'R' and PROP_PARENT_ID = r_id and PROP_NAME = 'virt:graphIri');
-  if (not isnull (also_iri)) {
+  if (not isnull (also_iri))
+  {
     declare _g, _p, persons any;
 
     persons := briefcase_sparql (sprintf (' SPARQL ' ||
@@ -658,8 +718,8 @@ create trigger SYS_DAV_PROP_BRIEFCASE_SIOC_I after insert on WS.WS.SYS_DAV_PROP
 {
   declare meta, c_iri, iri, xt, graph_iri, path any;
   declare full_path, _wai_name varchar;
-
-  declare exit handler for sqlstate '*' {
+  declare exit handler for sqlstate '*'
+  {
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
@@ -818,6 +878,22 @@ create procedure ods_briefcase_sioc_init ()
 
 --ODRIVE.WA.exec_no_error ('ods_briefcase_sioc_init ()');
 
+-------------------------------------------------------------------------------
+--
+create procedure ODRIVE.WA.tmp_update ()
+{
+  if (registry_get ('odrive_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_briefcase_services();
+  registry_set ('odrive_services_update', '1');
+}
+;
+
+ODRIVE.WA.tmp_update ();
+
+-------------------------------------------------------------------------------
+--
 use DB;
 -- ODRIVE
 
diff --git a/appsrc/ODS-Briefcase/schemas/DOAP.rdf b/appsrc/ODS-Briefcase/schemas/DOAP.rdf
index 4c06515..b491a83 100644
--- a/appsrc/ODS-Briefcase/schemas/DOAP.rdf
+++ b/appsrc/ODS-Briefcase/schemas/DOAP.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: DOAP.rdf,v 1.2.2.1 2010/09/20 10:14:57 source Exp $
+ -  $Id: DOAP.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/EML.rdf b/appsrc/ODS-Briefcase/schemas/EML.rdf
index 47574cd..8d502f9 100644
--- a/appsrc/ODS-Briefcase/schemas/EML.rdf
+++ b/appsrc/ODS-Briefcase/schemas/EML.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: EML.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: EML.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/FOAF.rdf b/appsrc/ODS-Briefcase/schemas/FOAF.rdf
index df88f9f..131f7c4 100644
--- a/appsrc/ODS-Briefcase/schemas/FOAF.rdf
+++ b/appsrc/ODS-Briefcase/schemas/FOAF.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: FOAF.rdf,v 1.3.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: FOAF.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/ICS.rdf b/appsrc/ODS-Briefcase/schemas/ICS.rdf
index 2f17927..4d75abc 100644
--- a/appsrc/ODS-Briefcase/schemas/ICS.rdf
+++ b/appsrc/ODS-Briefcase/schemas/ICS.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ICS.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: ICS.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/MODS.rdf b/appsrc/ODS-Briefcase/schemas/MODS.rdf
index a38f2ab..bc1d786 100644
--- a/appsrc/ODS-Briefcase/schemas/MODS.rdf
+++ b/appsrc/ODS-Briefcase/schemas/MODS.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: MODS.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: MODS.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/OPML.rdf b/appsrc/ODS-Briefcase/schemas/OPML.rdf
index e6a4204..f179bc2 100644
--- a/appsrc/ODS-Briefcase/schemas/OPML.rdf
+++ b/appsrc/ODS-Briefcase/schemas/OPML.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: OPML.rdf,v 1.3.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: OPML.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/Office.rdf b/appsrc/ODS-Briefcase/schemas/Office.rdf
index ccc9fd7..e8559cc 100644
--- a/appsrc/ODS-Briefcase/schemas/Office.rdf
+++ b/appsrc/ODS-Briefcase/schemas/Office.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: Office.rdf,v 1.3.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: Office.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/RDF.rdf b/appsrc/ODS-Briefcase/schemas/RDF.rdf
index 3de764d..6fdd750 100644
--- a/appsrc/ODS-Briefcase/schemas/RDF.rdf
+++ b/appsrc/ODS-Briefcase/schemas/RDF.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: RDF.rdf,v 1.3.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: RDF.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/RSS.rdf b/appsrc/ODS-Briefcase/schemas/RSS.rdf
index 18c6bca..7213138 100644
--- a/appsrc/ODS-Briefcase/schemas/RSS.rdf
+++ b/appsrc/ODS-Briefcase/schemas/RSS.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: RSS.rdf,v 1.3.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: RSS.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/Spotlight.rdf b/appsrc/ODS-Briefcase/schemas/Spotlight.rdf
index c318369..e1fa852 100644
--- a/appsrc/ODS-Briefcase/schemas/Spotlight.rdf
+++ b/appsrc/ODS-Briefcase/schemas/Spotlight.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: Spotlight.rdf,v 1.4.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: Spotlight.rdf,v 1.4.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/VAD.rdf b/appsrc/ODS-Briefcase/schemas/VAD.rdf
index a7579e5..8620378 100644
--- a/appsrc/ODS-Briefcase/schemas/VAD.rdf
+++ b/appsrc/ODS-Briefcase/schemas/VAD.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: VAD.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: VAD.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/VSPX.rdf b/appsrc/ODS-Briefcase/schemas/VSPX.rdf
index d50d849..7a4f61f 100644
--- a/appsrc/ODS-Briefcase/schemas/VSPX.rdf
+++ b/appsrc/ODS-Briefcase/schemas/VSPX.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: VSPX.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: VSPX.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/WSDL.rdf b/appsrc/ODS-Briefcase/schemas/WSDL.rdf
index e3b44f9..53c0b85 100644
--- a/appsrc/ODS-Briefcase/schemas/WSDL.rdf
+++ b/appsrc/ODS-Briefcase/schemas/WSDL.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: WSDL.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: WSDL.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/Wiki.rdf b/appsrc/ODS-Briefcase/schemas/Wiki.rdf
index 2d142f7..35d11ed 100644
--- a/appsrc/ODS-Briefcase/schemas/Wiki.rdf
+++ b/appsrc/ODS-Briefcase/schemas/Wiki.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: Wiki.rdf,v 1.2.2.1 2010/09/20 10:14:58 source Exp $
+ -  $Id: Wiki.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/XBEL.rdf b/appsrc/ODS-Briefcase/schemas/XBEL.rdf
index cd4c638..2d97099 100644
--- a/appsrc/ODS-Briefcase/schemas/XBEL.rdf
+++ b/appsrc/ODS-Briefcase/schemas/XBEL.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: XBEL.rdf,v 1.2.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: XBEL.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/XBRL.rdf b/appsrc/ODS-Briefcase/schemas/XBRL.rdf
index 1b0506c..8d13df5 100644
--- a/appsrc/ODS-Briefcase/schemas/XBRL.rdf
+++ b/appsrc/ODS-Briefcase/schemas/XBRL.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: XBRL.rdf,v 1.3.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: XBRL.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/XDDL.rdf b/appsrc/ODS-Briefcase/schemas/XDDL.rdf
index f276273..dc7b0bd 100644
--- a/appsrc/ODS-Briefcase/schemas/XDDL.rdf
+++ b/appsrc/ODS-Briefcase/schemas/XDDL.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: XDDL.rdf,v 1.2.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: XDDL.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/XHTML.rdf b/appsrc/ODS-Briefcase/schemas/XHTML.rdf
index 85d1ec2..73572bd 100644
--- a/appsrc/ODS-Briefcase/schemas/XHTML.rdf
+++ b/appsrc/ODS-Briefcase/schemas/XHTML.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: XHTML.rdf,v 1.2.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: XHTML.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/annotea.rdf b/appsrc/ODS-Briefcase/schemas/annotea.rdf
index 21a3275..5bc77f5 100644
--- a/appsrc/ODS-Briefcase/schemas/annotea.rdf
+++ b/appsrc/ODS-Briefcase/schemas/annotea.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: annotea.rdf,v 1.1.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: annotea.rdf,v 1.1.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/archive.rdf b/appsrc/ODS-Briefcase/schemas/archive.rdf
index 3e4009f..a1206ac 100644
--- a/appsrc/ODS-Briefcase/schemas/archive.rdf
+++ b/appsrc/ODS-Briefcase/schemas/archive.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
  -
- -  $Id: archive.rdf,v 1.1.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: archive.rdf,v 1.1.2.2 2012/03/08 10:46:15 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/audio.rdf b/appsrc/ODS-Briefcase/schemas/audio.rdf
index bda3c9b..870d57a 100644
--- a/appsrc/ODS-Briefcase/schemas/audio.rdf
+++ b/appsrc/ODS-Briefcase/schemas/audio.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- 
  -  
- -  $Id: audio.rdf,v 1.2.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: audio.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/google-kinds.rdf b/appsrc/ODS-Briefcase/schemas/google-kinds.rdf
index 97c2c48..e6f1741 100644
--- a/appsrc/ODS-Briefcase/schemas/google-kinds.rdf
+++ b/appsrc/ODS-Briefcase/schemas/google-kinds.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: google-kinds.rdf,v 1.3.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: google-kinds.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/image.rdf b/appsrc/ODS-Briefcase/schemas/image.rdf
index 75cb810..ab09693 100644
--- a/appsrc/ODS-Briefcase/schemas/image.rdf
+++ b/appsrc/ODS-Briefcase/schemas/image.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: image.rdf,v 1.3.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: image.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/opl-lic.rdf b/appsrc/ODS-Briefcase/schemas/opl-lic.rdf
index c7a71b8..9351be4 100644
--- a/appsrc/ODS-Briefcase/schemas/opl-lic.rdf
+++ b/appsrc/ODS-Briefcase/schemas/opl-lic.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: opl-lic.rdf,v 1.3.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: opl-lic.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/photo.rdf b/appsrc/ODS-Briefcase/schemas/photo.rdf
index b8e2cf2..bf5074d 100644
--- a/appsrc/ODS-Briefcase/schemas/photo.rdf
+++ b/appsrc/ODS-Briefcase/schemas/photo.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: photo.rdf,v 1.3.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: photo.rdf,v 1.3.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/schemas/vcard-rdf.rdf b/appsrc/ODS-Briefcase/schemas/vcard-rdf.rdf
index 9ccb708..8bcdbf4 100644
--- a/appsrc/ODS-Briefcase/schemas/vcard-rdf.rdf
+++ b/appsrc/ODS-Briefcase/schemas/vcard-rdf.rdf
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vcard-rdf.rdf,v 1.2.2.1 2010/09/20 10:14:59 source Exp $
+ -  $Id: vcard-rdf.rdf,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/vad_version b/appsrc/ODS-Briefcase/vad_version
new file mode 100644
index 0000000..a63f96d
--- /dev/null
+++ b/appsrc/ODS-Briefcase/vad_version
@@ -0,0 +1 @@
+1.19.40
diff --git a/appsrc/ODS-Briefcase/www/ajax.vsp b/appsrc/ODS-Briefcase/www/ajax.vsp
index 1fd2268..6ddfd9d 100644
--- a/appsrc/ODS-Briefcase/www/ajax.vsp
+++ b/appsrc/ODS-Briefcase/www/ajax.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: ajax.vsp,v 1.2.2.1 2010/09/20 10:14:59 source Exp $
+--  $Id: ajax.vsp,v 1.2.2.3 2012/03/08 12:00:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -71,7 +71,17 @@
     }
     http_rewrite ();
     http_header ('Content-Type: text/plain\r\n');
-    http (ODRIVE.WA.obj2json(returnData, 5));
+    http (ODS..obj2json (returnData, 5));
+    return;
+  }
+  if (action = 'cartridges')
+  {
+    http (ODS..obj2json (ODRIVE.WA.cartridges_get (), 5));
+    return;
+  }
+  if (action = 'metaCartridges')
+  {
+    http (ODS..obj2json (ODRIVE.WA.metaCartridges_get (), 5));
     return;
   }
   if (action = 'about')
diff --git a/appsrc/ODS-Briefcase/www/css/style.css b/appsrc/ODS-Briefcase/www/css/style.css
index 5224909..b613cd3 100644
--- a/appsrc/ODS-Briefcase/www/css/style.css
+++ b/appsrc/ODS-Briefcase/www/css/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.10.2.8 2010/10/07 13:23:47 source Exp $
+ *  $Id: style.css,v 1.10.2.12 2012/03/08 12:00:18 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -21,48 +21,63 @@
  *  
  */
 
-body
-{
+body {
   margin: 0;
   padding: 0;
   font-family: Verdana, Arial, Helvetica, Sans-Serif;
   font-size: 9pt;
 }
 
-.pointer
-{
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+form {
+  margin: 0;
+  padding: 0;
+}
+
+abbr {
+  border: none;
+}
+
+input[type="text"], input[type="password"], select {
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+}
+
+.pointer {
   cursor: pointer;
 }
 
-a
-{
+a {
   text-decoration: none;
 }
 
-a:active
-{
+a:active {
   text-decoration: none;
 }
 
-a:visited
-{
+a:visited {
   text-decoration: none;
 }
 
-a:hover
-{
+a:hover {
   text-decoration: underline;
 }
 
-#MTB
-{
+#MTB {
   width: 100%;
   left: 0px;
   right: 0px;
 }
 
-#LC
-{
+#LC {
   font-size: 1em;
   top: 4px;
   width: 15%;
@@ -70,152 +85,94 @@ a:hover
   vertical-align: top;
 }
 
-#LCT
-{
+#LCT {
   width: 100%;
 }
 
-#RC
-{
+#RC {
   margin-left: 5px;
   vertical-align: top;
   width: 85%;
 }
 
-#RCT
-{
+#RCT {
   width: 100%;
 }
 
-#RCT_head
-{
+#RCT_head {
   margin-top: 8px;
   margin-left: 0px;
 }
 
-
-#RCT_body
-{
+#RCT_body {
 }
 
-/* Footer */
-
-#FT
-{
-  width: 100%;
-  position: relative;
-  bottom: 0px;
-  font-size: 8pt;
-  float: left;
-  clear: both;
-  text-align: right;
-  border-top: 2px solid #fff;
-  margin-right: 10px;
-  background-color: #fff;
-  background-image: url(../image/ods_main_footer.png);
-}
-
-#FT_L
-{
-  float: left;
-  clear: left;
-  margin-top: 10px;
-  margin-left: 8px;
-  border: 1px solid #788;
-}
-
-#FT_R
-{
-  float: right;
-  clear: right;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  margin-right: 5px;
-  color: #788;
-}
-
-#FT_R a
-{
-  text-decoration: none;
-  color: inherit;
-}
-
-#MTB2
-{
+#MTB2 {
   width: 100%;
   left: 0px;
   right: 0px;
 }
 
-#LC2
-{
+#LC2 {
   font-size: 1em;
   vertical-align:top;
   width: 15%;
   padding-bottom: 5px;
 }
 
-#RC2
-{
+#RC2 {
   margin-left: 5px;
   vertical-align: top;
   width: 85%;
 }
 
-.lc
-{
+.lc {
   background-color: #EFEFEF;
   border: 1px solid #7f94a5;
+  -moz-border-radius: 5px;
+  -webkit-border-radius: 5px;
   padding: 5px;
   margin-top: 6px;
   width: auto;
 }
 
-.lc_none
-{
+.lc_none{
   margin: 0 0.5em 0.5em 0.5em;
   width: auto;
 }
 
-.lc_closer
-{
+.lc_closer {
   margin-top: -0.5em;
   z-index: 1;
 }
 
-.lc_noborder
-{
+.lc_noborder {
   border-top: 0;
 }
 
-.lc a.gems, .lc span.gems2, .lc div
-{
+.lc a.gems, .lc span.gems2, .lc div {
   display: block;
   padding: 3px;
   margin: 3px;
 }
 
-.lc a.gems, .lc span.gems2
-{
+.lc a.gems, .lc span.gems2 {
   text-decoration: none;
 }
 
-.lc a.gems:hover, .lc span.gems2:hover
-{
+.lc a.gems:hover, .lc span.gems2:hover {
   color: blue;
   background: #99b3c5;
 }
 
-.lc span.gems2
-{
+.lc span.gems2 {
   cursor: pointer;
   color: black;
   font-weight: bold;
   background: #b0cde4;
 }
 
-.lc_head
-{
+.lc_head {
   -moz-user-select: none;
   cursor: pointer;
   font-size: 1em;
@@ -224,42 +181,36 @@ a:hover
 
 /* Left side within MT */
 
-.page_head
-{
+.page_head {
   width: 100%;
   background-color: #ffd200;
 }
 
-.login_form_container
-{
+.login_form_container {
   padding: 5pt;
   border: 1px solid #7f94a5;
   width: 100%;
 }
 
-.left_container
-{
+.left_container {
   border: 1px solid #7f94a5;
 	margin: 0.5em;
   width: auto;
 }
 
-ul.left_navigation
-{
+ul.left_navigation {
   font-size: 0.9em;
 	padding: 5px;
 	margin: 3px;
 	list-style-type: none;
 }
 
-ul.left_navigation li
-{
+ul.left_navigation li {
   margin: 0;
   padding: 2px;
 }
 
-.navigator_info
-{
+.navigator_info {
   font-size: smaller;
 }
 
@@ -282,46 +233,39 @@ ul.left_navigation li
 	text-decoration: underline;
 }
 
-.copyright
-{
+.copyright {
   font-size: 75%;
   text-align: right;
   padding-right: 5px;
   border-top: 1px solid silver;
 }
 
-.system_info
-{
+.system_info {
   font-size: 75%;
 }
 
-.page_title
-{
+.page_title {
   font-size: 12pt;
   font-weight: bold;
 }
 
-.main_page_area
-{
+.main_page_area {
   background-color: white;
   margin: 6px;
 }
 
-.page_section_head
-{
+.page_section_head {
   font-size: 12pt;
   font-weight: bold;
 }
 
-table.sub_page_area
-{
+table.sub_page_area {
   width: 100%;
 }
 
 /* Label */
 
-.error
-{
+.error {
   color: red;
   font-weight: bold;
   margin: 0px 0px 3px 0px;
@@ -330,27 +274,23 @@ table.sub_page_area
   text-align: center;
 }
 
-.attention_marker
-{
+.attention_marker {
   color: #ff0033;
 }
 
-.subpage_header_area
-{
+.subpage_header_area {
   margin: 3px 0px 3px 0px;
   border: 1pt solid silver;
 }
 
-.page_header_area
-{
+.page_header_area {
   border: 1pt solid silver;
   position: relative;
   bottom:15pt;
 }
 
 /* The main navigation bar */
-.nav_bar
-{
+.nav_bar {
   display: block;
   padding: 0;
   margin: 0;
@@ -358,23 +298,19 @@ table.sub_page_area
   font-size: 0.9em;
 }
 
-.nav_bar td.sel
-{
+.nav_bar td.sel {
 }
 
-.nav_bar td
-{
+.nav_bar td {
   background: #ddd;
 }
 
-.nav_bar td.filler
-{
+.nav_bar td.filler {
   background: #b0cde4;
   width: 100%;
 }
 
-.nav_bar a
-{
+.nav_bar a {
   display: block;
   color: #444;
   text-decoration: none;
@@ -390,14 +326,12 @@ table.sub_page_area
   white-space: nowrap;
 }
 
-.nav_bar a.les
-{
+.nav_bar a.les {
   background: #b0cde4;
   background-image: url(../image/sel_nav_grad2.gif);
 }
 
-.nav_bar a.les:hover
-{
+.nav_bar a.les:hover {
   color: black;
   background: #99b3c5;
 }
@@ -405,8 +339,7 @@ table.sub_page_area
 .nav_bar a:hover,
 .nav_bar a:active,
 .nav_bar a.sel:link,
-.nav_bar a.sel:visited
-{
+.nav_bar a.sel:visited {
   background: #b0cde4;
   background-image: url(../image/sel_nav_grad2.gif);
   color: #000000;
@@ -421,16 +354,14 @@ table.sub_page_area
   color: #b0cde4;
 }
 
-/*====== Lists ======*/
-table#list
-{
+/* Lists */
+table#list {
   width: 100%;
   border: solid #7f94a5;
   border-width: 1px 1px 2px 1px;
 }
 
-table#list th
-{
+table#list th {
   font-size: 1em;
   padding: 2px;
   border: solid #7f94a5;
@@ -439,64 +370,38 @@ table#list th
   font-weight: normal;
 }
 
-/*====== rows ======*/
-.td_border
-{
-  border: solid #7f94a5;
-  border-width: 1px 0px 1px 0px;
-}
-
-.tr_0
-{
+/* rows */
+.tr_0 {
   background-color: #EFEFEF;
 }
 
-.tr_1
-{
+.tr_1 {
 }
 
-.tr_1:hover, .tr_0:hover
-{
+.tr_1:hover, .tr_0:hover {
  	background-color: #eec;
 }
 
-.tr_select
-{
+.tr_select {
   background-color: #FFFFCC;
 }
 
-/*
-  Fields
-*/
-.field-text
-{
-  width: 40em;
+/* Fields */
+.field-text {
+  width: 500px;
 }
 
-.field-short
-{
-  width: 20em;
+.field-short {
+  width: 250px;
 }
 
-.field-max
-{
+.field-max {
   width: 98%;
 }
 
-/*
-  Forms
-*/
-.from-button
-{
-  margin: .8em 0 .8em 0;
-  font-size: .8em;
-	font-family: verdana,sans-serif;
-  color: #7f94a5;
-	font-weight: bold;
-	text-decoration: none;
-}
-
+/* Forms */
 input.button {
+  cursor: pointer;
   margin: .2em 0 .1em 0;
   font-size: .8em;
 	font-family: verdana, sans-serif;
@@ -505,33 +410,11 @@ input.button {
   border: solid 1px;
   border-color: #7f94a5;
   background: #99b3c5;
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
 }
 
-.button2 {
-  font-size: .8em;
-	font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  padding: 0.1em 1em 0.1em 1em ;
-  border: solid 1px;
-  border-color: #7f94a5;
-  background: #99b3c5;
-}
-
-.button3 {
-  text-decoration: none;
-  font-size: .8em;
-  font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  padding: 5px 5px 2px 5px;
-  border: solid 1px;
-  border-color: #7f94a5;
-  background: #99b3c5;
-}
-
-.form-header
-{
+.form-header {
   font-size: 1.1em;
   font-weight: bold;
   margin: 0 0 6px 0;
@@ -541,8 +424,7 @@ input.button {
   background-color: #b0cde4;
 }
 
-.form-footer
-{
+.form-footer {
   margin: 6px 0px;
   text-align: center;
   height: 20px;
@@ -552,8 +434,7 @@ input.button {
   background-color: #b0cde4;
 }
 
-.form-info
-{
+.form-info {
   color: red;
   font-weight: bold;
   background-color: #EFEFEF;
@@ -566,45 +447,38 @@ input.button {
   z-index: 100;
 }
 
-.form-body
-{
+.form-body {
   width: 100%;
   font-size: 1em;
 }
 
-.form-body td
-{
+.form-body td {
   padding: 2px;
 }
 
-.form-body th
-{
+.form-body th {
   text-align: right;
   white-space: nowrap;
   padding: 4px;
 }
 
-.form-body td.text
-{
+.form-body td.text {
   font-style: italic;
   font-weight: bold;
   padding: 2px;
 }
 
-.td_label
-{
+.td_label {
   text-align: left;
   width: 45%;
 }
 
-/*====== Form lists ======*/
-.permissions-list
-{
+/* Form lists */
+.permissions-list {
   text-align: center;
 }
 
-.permissions-list th
-{
+.permissions-list th {
   text-align: center;
   padding: 2px 4px 2px 4px;
   border: solid #7f94a5;
@@ -613,13 +487,11 @@ input.button {
   font-weight: bold;
 }
 
-.permissions-list td.right, .permissions-list th.right
-{
+.permissions-list td.right, .permissions-list th.right {
   border-right-width: 1px;
 }
 
-.permissions-list td.bottom, .permissions-list th.bottom
-{
+.permissions-list td.bottom, .permissions-list th.bottom {
   border-bottom-width: 1px;
 }
 
@@ -783,33 +655,8 @@ input.nolink {
   background-color: inherit;
 }
 
-/*====== Toolbars ======*/
-div.toolbar {
-}
-
-img.toolbar
-{
-	display: block;
-	float: left;
-  margin-top: 10px;
-  background-color: #7f94a5;
-}
-
-a.toolbar
-{
-	display: block;
-	float: left;
-	width: 70px;
-	padding: 10px 0 10px 0;
-	color: #4F56A6;
-	font-weight: bold;
-  font-size: 12px;
-	text-decoration: none;
-	text-align: center;
-}
-
-span.toolbar
-{
+/* Toolbars */
+span.toolbar {
 	display: block;
 	float: left;
 	width: 70px;
@@ -821,91 +668,37 @@ span.toolbar
 	text-align: center;
 }
 
-span.toolbarLabel
-{
+span.toolbarLabel {
   font-size: 0.8em;
 }
 
-/*====== Grid ======*/
-.OD_grid
-{
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-}
-
-thead.sortHeader tr
-{
-  background-color: #B0CDE4;
-}
-
-/* make the TH elements pretty */
-thead.sortHeader tr th {
-  font-size: 1.1em;
-  font-weight: bold;
-  text-align: center;
-  padding: 3px 2px 3px 3px;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-thead.sortHeader th.checkbox {
-  text-align: center;
-  padding: 0;
-}
-
-thead.sortHeader th:last-child {
-  border-width: 0px 0px 1px 0px;
-}
-
-thead.sortHeader th.sortcol {
-  cursor: pointer;
-}
-
-thead.sortHeader th.sortcol_active {
-  padding-right: 20px;
-  background-position: right center;
-  background-repeat: no-repeat;
-}
-
-thead.sortHeader th.sortcol_desc {
-  background-image: url(../image/d.gif) !important;
-}
-
-thead.sortHeader th.sortcol_asc {
-  background-image: url(../image/u.gif) !important;
-}
-
-table.OD_grid td
-{
-  padding: 2px 4px 2px 4px;
+img.toolbar {
+  display: block;
+  float: left;
+  margin-top: 10px;
+  background-color: #7F94A5;
 }
 
-td.checkbox
-{
+td.checkbox {
   text-align: center;
   padding: 0;
 }
 
-td.image
-{
+td.image {
   text-align: center;
   padding: 0;
 }
 
-td.number
-{
+td.number {
   text-align: right;
 }
 
-td.action
-{
+td.action {
   white-space: nowrap;
 }
 
-/*====== New forms ======*/
-.new-form-header
-{
+/* New forms */
+.new-form-header {
   font-size: 1.1em;
   font-weight: bold;
   margin: 0 0 6px 0;
@@ -915,8 +708,7 @@ td.action
   background-color: #b0cde4;
 }
 
-.new-form-footer
-{
+.new-form-footer {
   font-size: 1.1em;
   font-weight: bold;
   margin: 6px 0 0 0;
@@ -925,8 +717,7 @@ td.action
   background-color: #b0cde4;
 }
 
-.new-form-body
-{
+.new-form-body {
   font-size: 1em;
   padding: 6px;
   border: solid #7f94a5;
@@ -934,117 +725,50 @@ td.action
   background-color: #EFEFEF;
 }
 
-.no-border
-{
+.no-border {
   border-width: 0;
 }
 
-.new-form-body table
-{
+.new-form-body table {
   width: 100%;
   background-color: #EFEFEF;
 }
 
-.new-form-body table td
-{
+.new-form-body table td {
   padding: 2px;
 }
 
-.new-form-body table td.text
-{
+.new-form-body table td.text {
   font-style: italic;
   font-weight: bold;
   padding: 2px;
 }
 
-.new-form-body table th
-{
+.new-form-body table th {
   text-align: right;
   white-space: nowrap;
   padding: 4px;
 }
 
-.text
-{
+.text {
   font-style: italic;
   font-weight: bold;
   padding: 2px;
 }
 
-.helpText
-{
+.helpText {
   font-size: 0.9em;
   font-style: italic;
   font-weight: bold;
 }
 
-/* Popup Calendar */
-.calendar {
-	border: 1px solid #000;
-	background-color: #FFF;
-  z-index: 101;
-}
-
-.calendar_year, .calendar_month {
-	text-align: center;
-	border-bottom: 1px solid #aaa;
-	padding: 2px 0px;
-}
-
-.calendar table {
-	margin-top: 2px;
-}
-
-.calendar thead {
-	font-weight: bold;
-}
-
-.calendar thead td {
-	padding: 0px 2px;
-}
-
-.calendar td {
-	font-size: 75%;
-	text-align: center;
-}
-
-td.calendar_selected {
-	background-color: #faa;
-}
-
-.calendar_special {
-	color: #c55;
-}
-
-#dav_list
-{
+#dav_list {
   background-color: white;
   width: 100%;
   min-height: 350px;
   overflow: auto;
 }
 
-/* ComboList */
-.combo_list_list {
-  background-color: white;
-  border: 1px solid black;
-  padding: 5px 10px 5px 10px;
-  height: 100px;
-  width: 200px;
-  overflow: auto;
-}
-
-.combo_list_option:hover {
-  background-color: #bce;
-  color: white;
-}
-
-table.grid {
-	border-collapse: collapse;
-	font: menu;
-	width: 99%;
-}
-
 span.button {
   background: none repeat scroll 0 0 #99B3C5;
   border: 1px solid #7F94A5;
diff --git a/appsrc/ODS-Briefcase/www/error.vspx b/appsrc/ODS-Briefcase/www/error.vspx
index 417e7e4..b637a1c 100644
--- a/appsrc/ODS-Briefcase/www/error.vspx
+++ b/appsrc/ODS-Briefcase/www/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.6.2.2 2010/09/20 10:15:00 source Exp $
+ -  $Id: error.vspx,v 1.6.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/www/export.vspx b/appsrc/ODS-Briefcase/www/export.vspx
index 7661975..c7fae82 100644
--- a/appsrc/ODS-Briefcase/www/export.vspx
+++ b/appsrc/ODS-Briefcase/www/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: export.vspx,v 1.13.2.4 2010/09/20 10:15:00 source Exp $
+ -  $Id: export.vspx,v 1.13.2.5 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/www/forms.vspx b/appsrc/ODS-Briefcase/www/forms.vspx
index 357329d..750bd05 100644
--- a/appsrc/ODS-Briefcase/www/forms.vspx
+++ b/appsrc/ODS-Briefcase/www/forms.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: forms.vspx,v 1.6.2.14 2010/10/13 12:15:00 source Exp $
+ -  $Id: forms.vspx,v 1.6.2.18 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -38,8 +38,8 @@
       declare item any;
 
       http ('<div id="dav_list" style="max-height: 200px; min-height: 200px;">');
-      http ('  <table class="OD_grid colorise no-border" cellspacing="0">');
-      http ('    <thead class="sortHeader nocolor">');
+      http ('  <table class="ODS_grid" style="border: 0px;">');
+      http ('    <thead>');
       http ('      <tr>');
       http ('        <th>Name</th>');
       http ('        <th>Size</th>');
@@ -57,10 +57,11 @@
       for (i := 0; i < length (self.items); i := i + 2)
       {
         item := ODRIVE.WA.DAV_INIT (self.items[i]);
-
+        if (not ODRIVE.WA.DAV_ERROR (item))
+        {
         http ('    <tr>');
         http (sprintf ('<td nowrap="nowrap"><img src="%s" alt="%s">  %s</td>', ODRIVE.WA.ui_image (ODRIVE.WA.DAV_GET (item, 'fullPath'), ODRIVE.WA.DAV_GET (item, 'type'), ODRIVE.WA.DAV_GET (item, 'mimeType')), ODRIVE.WA.ui_alt (ODRIVE.WA.DAV_GET (item, 'name'), ODRIVE.WA.DAV_GET (item, 'type')), self.items[i]));
-        http (sprintf ('<td class="number" nowrap="nowrap">%s</td', ODRIVE.WA.ui_size (ODRIVE.WA.DAV_GET (item, 'length'), ODRIVE.WA.DAV_GET (item, 'type'))));
+        http (sprintf ('<td class="number" nowrap="nowrap">%s</td>', ODRIVE.WA.ui_size (ODRIVE.WA.DAV_GET (item, 'length'), ODRIVE.WA.DAV_GET (item, 'type'))));
         http (sprintf ('<td nowrap="nowrap">%s</td>', ODRIVE.WA.ui_date (ODRIVE.WA.DAV_GET (item, 'modificationTime'))));
         http (sprintf ('<td>%s</td>', ODRIVE.WA.DAV_GET (item, 'ownerName')));
         http (sprintf ('<td>%s</td>', ODRIVE.WA.DAV_GET (item, 'groupName')));
@@ -71,6 +72,7 @@
         }
         http ('    </tr>');
       }
+      }
       http ('  </table>');
       http ('</div>');
       http ('<br />');
@@ -267,7 +269,7 @@
 
             -- aci - WebAccess
             item := ODRIVE.WA.DAV_INIT(self.items[I]);
-            if ((ODRIVE.WA.DAV_GET (item, 'type') = 'R') and length (aci_value))
+            if (not ODRIVE.WA.DAV_ERROR (item) and (ODRIVE.WA.DAV_GET (item, 'type') = 'R') and length (aci_value))
             {
               ODRIVE.WA.DAV_PROP_SET (self.items[I], 'virt:aci_meta_n3', aci_value);
             }
@@ -275,13 +277,15 @@
         }
         self.v_step := 'end';
       }
-      else if (self.v_form = 'edit')
+      else if (self.v_form in ('edit', 'view'))
       {
         item := ODRIVE.WA.DAV_INIT (self.v_path);
+        if (not ODRIVE.WA.DAV_ERROR (item))
+        {
         returnData := ODRIVE.WA.DAV_RES_UPLOAD (self.v_path, get_keyword ('f_content', params, ''), ODRIVE.WA.DAV_GET (item, 'mimeType'), ODRIVE.WA.DAV_GET (item, 'permissions'), ODRIVE.WA.DAV_GET (item, 'ownerID'), ODRIVE.WA.DAV_GET (item, 'groupID'));
         if (ODRIVE.WA.DAV_ERROR (returnData))
           signal('TEST', ODRIVE.WA.DAV_PERROR (returnData) || '<>');
-
+        }
         self.v_step := 'end';
       }
       else if (self.v_form = 'rename')
@@ -425,7 +429,7 @@
                     </th>
                     <td>
                       <input type="text" name="prop_mime" class="field-short" />
-                      <input type="button" value="Select" onclick="javascript: windowShow('mimes_select.vspx?params=prop_mime:s1;')" class="button" />
+                      <input type="button" value="Select" onclick="javascript: windowShow('<?V ODRIVE.WA.page_url (self.domain_id, 'mimes_select.vspx?params=prop_mime:s1;') ?>');" class="button" />
                     </td>
                   </tr>
                   <tr>
@@ -442,7 +446,7 @@
                         </v:after-data-bind>
                       </v:text>
                       <vm:if test="ODRIVE.WA.check_admin (self.account_id)">
-                        <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?form=F1&mode=u&params=prop_owner:s1;')" class="button" />
+                        <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=u&params=prop_owner:s1;&nrows=<?V ODRIVE.WA.settings_rows (self.settings) ?>')" class="button" />
                       </vm:if>
                     </td>
                   </tr>
@@ -452,7 +456,7 @@
                     </th>
                     <td>
                       <v:text name="prop_group" value="--'Do not change'" format="%s" xhtml_class="field-short" />
-                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?form=F1&mode=g&params=prop_group:s1;')" class="button" />
+                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=g&params=prop_group:s1;')" class="button" />
                     </td>
                   </tr>
                   <tr>
@@ -614,7 +618,7 @@
           </script>
         </v:template>
 
-        <v:template type="simple" enabled="-- case when (self.v_form = 'edit') then 1 else 0 end">
+        <v:template type="simple" enabled="-- case when (self.v_form in ('edit', 'view')) then 1 else 0 end">
           <v:before-data-bind>
             <![CDATA[
               declare item any;
@@ -625,10 +629,15 @@
             ]]>
           </v:before-data-bind>
           <div class="new-form-header">
-            Edit resource <?V self.v_path ?>
+            <?V initcap (self.v_form) ?> resource <?V self.v_path ?>
           </div>
-          <div style="padding-right: 12px;">
-            <textarea id="f_content" name="f_content" style="width: 100%; height: 365px"><?vsp http (ODRIVE.WA.DAV_RES_CONTENT (self.v_path)); ?></textarea>
+          <div style="padding-right: 6px;">
+            <?vsp
+              declare disabled varchar;
+
+              disabled := case when self.v_form = 'view' then 'disabled="disabled"' else '' end;
+              http (sprintf ('<textarea id="f_content" name="f_content" style="width: 100%%; height: 360px" %s>%V</textarea>', disabled, cast (ODRIVE.WA.DAV_RES_CONTENT (self.v_path) as varchar)));
+            ?>
             <vm:if test="self.mimeType like 'text/html'">
               <![CDATA[
                 <script type="text/javascript" src="/ods/ckeditor/ckeditor.js"></script>
@@ -639,7 +648,7 @@
             </vm:if>
           </div>
           <div class="new-form-footer">
-            <v:button action="simple" value="Save">
+            <v:button action="simple" value="Save" enabled="--case when self.v_form = 'view' then 0 else 1 end">
               <v:on-post>
                 <![CDATA[
                   self.execPost (e);
diff --git a/appsrc/ODS-Briefcase/www/groups.vspx b/appsrc/ODS-Briefcase/www/groups.vspx
deleted file mode 100644
index f752f64..0000000
--- a/appsrc/ODS-Briefcase/www/groups.vspx
+++ /dev/null
@@ -1,358 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- -
- -  $Id: groups.vspx,v 1.8.2.10 2010/10/13 12:15:00 source Exp $
- -
- -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- -  project.
- -
- -  Copyright (C) 1998-2006 OpenLink Software
- -
- -  This project 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; only version 2 of the License, dated June 1991.
- -
- -  This program 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
- -  General Public License for more details.
- -
- -  You should have received a copy of the GNU General Public License along
- -  with this program; if not, write to the Free Software Foundation, Inc.,
- -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- -
--->
-<v:page name="groups" decor="template/template.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-  <vm:pagetitle>Groups</vm:pagetitle>
-  <vm:pagewrapper>
-    <vm:variables>
-      <v:variable name="v_mode" type="varchar" default="'browse'"/>
-
-      <v:variable name="v_tabNo" param-name="tabNo" type="varchar" default="1"/>
-      <v:variable name="v_id" type="integer" default="null"/>
-      <v:variable name="v_name" param-name="name" type="varchar" default="''"/>
-      <v:variable name="v_description" type="varchar" default="''"/>
-      <v:variable name="v_members" type="any" default="null"/>
-    </vm:variables>
-    <vm:pagebody>
-      <v:before-render>
-        <![CDATA[
-          self.F1.uf_action := ODRIVE.WA.utf2wide (ODRIVE.WA.page_url (self.domain_id, 'groups.vspx'));
-        ]]>
-      </v:before-render>
-      <v:template type="simple" enabled="-- case when self.v_mode = 'browse' then 1 else 0 end">
-      	<v:data-source name="dsrc" expression-type="sql" nrows="0" initial-offset="0">
-          <v:before-data-bind>
-            <![CDATA[
-                control.ds_sql := sprintf('select a.U_ID, a.U_NAME, a.U_FULL_NAME from DB.DBA.SYS_USERS a, ODRIVE.WA.GROUPS b, DB.DBA.SYS_USERS c where a.U_ID=b.GROUP_ID and a.U_IS_ROLE=1 and b.USER_ID=c.U_ID and c.U_NAME=\'%s\' order by U_NAME', ODRIVE.WA.session_user(self.vc_page.vc_event.ve_params));
-              control.ds_nrows := ODRIVE.WA.settings_rows (self.settings);
-            ]]>
-          </v:before-data-bind>
-        </v:data-source>
-        <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
-          <div style="padding: 0 0 0.5em 0;">
-            <v:button action="simple" value="Create" xhtml_class="button">
-              <v:on-post>
-                <![CDATA[
-                  self.v_name := '';
-                  self.v_description := '';
-       		          self.v_members := vector ();
-                    self.v_tabNo := 0;
-                  self.v_mode := 'create';
-
-         		      self.vc_data_bind(e);
-                ]]>
-              </v:on-post>
-            </v:button>
-            <v:button action="simple" value="Delete" xhtml_onclick="javascript: return deleteConfirm();" xhtml_class="button">
-              <v:on-post>
-                <![CDATA[
-                  declare N, group_id integer;
-                  declare userName varchar;
-
-                  for (N := 0; N < length (e.ve_params); N := N + 4)
-                  {
-                    if (e.ve_params[N] = 'cb_item')
-                    {
-                      userName := e.ve_params[N+1];
-                      group_id := (select U_ID from WS.WS.SYS_DAV_USER where U_NAME = userName);
-                      delete from ODRIVE.WA.GROUPS where GROUP_ID = group_id;
-                      USER_ROLE_DROP (userName);
-                    }
-                  }
-
-         		      self.vc_data_bind(e);
-                ]]>
-              </v:on-post>
-            </v:button>
-          </div>
-          <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="groups" class="OD_grid colorise" cellspacing="0">
-              <thead class="sortHeader">
-                <tr class="nocolor">
-                  <th class="checkbox" width="1%">
-                    <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
-                  </th>
-                    <th>
-                      Name
-                    </th>
-                    <th>
-                      Description
-                    </th>
-                    <th width="1%">
-                      Actions
-                  </th>
-                </tr>
-              </thead>
-            </table>
-          </v:template>
-
-          <v:template name="ds_repeat" type="repeat" name-to-remove="" set-to-remove="">
-
-            <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
-              <table>
-                <tr align="center">
-                    <td colspan="4">No own regular groups</td>
-                </tr>
-              </table>
-            </v:template>
-
-            <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
-              <table>
-                <tr>
-                  <td align="center" valign="top">
-                    <input type="checkbox" name="cb_item" value="<?V (control as vspx_row_template).te_column_value('U_NAME') ?>" onclick="selectCheck(this, 'cb_item')" />
-                  </td>
-                  <td nowrap="nowrap">
-                    <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_NAME')" format="%s"/>
-                  </td>
-                  <td nowrap="nowrap">
-                    <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')" format="%s"/>
-                  </td>
-                  <td nowrap="nowrap">
-                    <v:button value="Edit" action="simple" xhtml_class="button">
-                      <v:on-post>
-                        <![CDATA[
-                          self.v_name := (control.vc_parent as vspx_row_template).te_column_value('U_NAME');
-                          select a.U_FULL_NAME
-                            into self.v_description
-                            from DB.DBA.SYS_USERS a,
-                                 ODRIVE.WA.GROUPS b,
-                                 DB.DBA.SYS_USERS c
-                           where a.U_NAME    = self.v_name
-                             and a.U_IS_ROLE = 1
-                             and a.U_ID      = b.GROUP_ID
-                             and c.U_ID      = b.USER_ID
-                             and c.U_NAME    = ODRIVE.WA.session_user(self.vc_page.vc_event.ve_params);
-
-                            self.v_members := vector ();
-                          for (select b.U_NAME from DB.DBA.SYS_ROLE_GRANTS a, DB.DBA.SYS_USERS b, DB.DBA.SYS_USERS c where a.GI_SUPER = b.U_ID and a.GI_GRANT = c.U_ID and c.U_NAME = self.v_name and a.GI_DIRECT = '1') do
-                          {
-                              self.v_members := vector_concat (self.v_members, vector (U_NAME));
-                          }
-
-                            self.v_tabNo := 0;
-                          self.v_mode := 'update';
-
-                		      self.vc_data_bind(e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                  </td>
-                </tr>
-              </table>
-            </v:template>
-
-          </v:template>
-
-          <v:template type="simple" name-to-remove="table" set-to-remove="top">
-            <table>
-              <tr align="center">
-                <td colspan="4">
-                  <vm:ds-navigation data-set="ds"/>
-                </td>
-              </tr>
-            </table>
-          </v:template>
-
-        </v:data-set>
-      </v:template>
-
-      <v:template type="simple" enabled="--case when self.v_mode in ('create', 'update') then 1 else 0 end">
-        <input name="tabNo" id="tabNo" type="hidden" value="<?V self.v_tabNo ?>" />
-        <div class="new-form-header">
-          <v:label format="%s" value="--concat(initcap(self.v_mode), ' Group')"/>
-        </div>
-
-        <div id="c1">
-          <div class="tabs">
-            <vm:tabCaption tab="1" tabs="2" caption="Main"/> 
-            <vm:tabCaption tab="2" tabs="2" caption="Members"/> 
-          </div>
-          <div class="contents">
-            <div id="1" class="tabContent" style="display: none;">
-              <table class="form-body" cellspacing="0">
-                <tr>
-                  <th>
-                    <v:label for="f_name" value="Group name"/>
-                  </th>
-                  <td>
-                    <v:text name="f_name" value="--self.v_name" type="--either(equ(self.v_mode, 'create'), 'plain', 'hidden')" xhtml_class="field-short"/>
-                    <v:template type="simple" enabled="--equ(self.v_mode, 'update')">
-                      <span class="text"><v:label value="--self.v_name"/></span>
-                    </v:template>
-                  </td>
-                </tr>
-                <tr>
-                  <th>
-                    <v:label for="f_description" value="Group description"/>
-                  </th>
-                  <td>
-                    <v:text name="f_description" value="--self.v_description" xhtml_class="field-text"/>
-                  </td>
-                </tr>
-              </table>
-            </div>
-
-            <div id="2" class="tabContent" style="display: none;">
-              <table>
-                <tr>
-                  <td width="800px">
-                    <table id="x_tbl" class="form-list" cellspacing="0">
-                      <thead>
-                <tr>
-                  <th>
-                            Name
-                  </th>
-                          <th width="1%">
-                            Action
-                  </th>
-                </tr>
-                      </thead>
-                		  <![CDATA[
-                		    <script type="text/javascript">
-                <?vsp
-                		      declare N varchar;
-
-                          if ((self.v_mode = 'create') and (length(self.v_members) = 0))
-             		            self.v_members := vector (ODRIVE.WA.account_name (self.account_id));
-
-                          for (N := 0; N < length (self.v_members); N := N + 1)
-                          {
-                            if (length (self.v_members[N]))
-                              http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x", null, {fld_1: {mode: 1, value: "%s", form: "F1"}});});', self.v_members[N]));
-                  }
-                ?>
-                		    </script>
-                		  ]]>
-                      <tr id="x_tr_no"><td colspan="2"><b>No Members</b></td></tr>
-                    </table>
-                  </td>
-                  <td valign="top" nowrap="nowrap">
-                    <span class="button3 pointer" onclick="javascript: TBL.createRow('x', null, {fld_1: {mode: 1, form: 'F1'}});"><img src="image/add_16.png" border="0" alt="Add Security" title="Add Security" /> Add</span>
-                  </td>
-                </tr>
-              </table>
-            </div>
-          </div>
-        </div>
-
-        <div class="new-form-footer">
-          <v:button action="simple" value="--initcap(self.v_mode)" xhtml_class="form-button">
-                      <v:on-post>
-                        <![CDATA[
-                declare N integer;
-                declare uid, gid integer;
-                declare tmp, params any;
-                declare exit handler for SQLSTATE '*' {
-                  if (__SQL_STATE = 'TEST') {
-                    self.vc_error_message := ODRIVE.WA.test_clear(__SQL_MESSAGE);
-                    self.vc_is_valid := 0;
-                    return;
-                  }
-                  resignal;
-                };
-
-                params := self.vc_page.vc_event.ve_params;
-                self.v_name := trim(self.f_name.ufl_value);
-                self.v_description := trim(self.f_description.ufl_value);
-
-                self.v_name := ODRIVE.WA.test(self.v_name, vector('name', 'Group name', 'class', 'varchar', 'type', 'varchar', 'minLength', 1, 'maxLength', 128));
-                self.v_description := ODRIVE.WA.test(self.v_description, vector('name', 'Group description', 'class', 'varchar', 'type', 'varchar', 'minLength', 1, 'maxLength', 255));
-
-                uid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = ODRIVE.WA.session_user (params));
-                gid := (select a.U_ID
-                          from DB.DBA.SYS_USERS a,
-                               ODRIVE.WA.GROUPS b
-                         where a.U_ID=b.GROUP_ID
-                           and a.U_NAME = self.v_name
-                           and a.U_IS_ROLE = 1
-                           and b.USER_ID <> uid);
-                if (not isnull(gid))
-                  signal('TEST', 'Group already exists for another user. Please choose another name!<>');
-
-                gid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = self.v_name);
-                if (self.v_mode = 'create')
-                {
-                  if (not isnull(gid))
-                    signal('TEST', 'Group already exists. Please choose another name!<>');
-                  gid := USER_ROLE_CREATE(self.v_name);
-                -- make owner
-                  insert soft ODRIVE.WA.GROUPS(USER_ID, GROUP_ID) values(uid, gid);
-                }
-                update DB.DBA.SYS_USERS set U_FULL_NAME = self.v_description, U_DAV_ENABLE = 1 where U_NAME = self.v_name;
-
-                tmp := vector();
-                for (N := 0; N < length (params); N := N + 2)
-                {
-                  if ((params [N] like 'x_fld_1_%') and (trim (params [N+1]) <> ''))
-                  {
-                    tmp := vector_concat (tmp, split_and_decode (trim (trim (params [N+1]), ','), 0, '\0\0,'));
-                  }
-                }
-
-                -- delete members
-                for (select b.U_NAME from DB.DBA.SYS_ROLE_GRANTS a, DB.DBA.SYS_USERS b, DB.DBA.SYS_USERS c where a.GI_SUPER = b.U_ID and a.GI_GRANT = c.U_ID and c.U_NAME = self.v_name and a.GI_DIRECT = '1') do
-                {
-                  if (not ODRIVE.WA.vector_contains (tmp, U_NAME))
-                          {
-                    declare continue handler for sqlstate '*' { goto _delete;};
-                    USER_REVOKE_ROLE (U_NAME, self.v_name);
-                  _delete:;
-                  }
-                          }
-
-                -- add members
-                for (N := 0; N < length(tmp); N := N + 1)
-                  {
-                    declare continue handler for sqlstate '*' { goto _add;};
-                  USER_GRANT_ROLE (tmp[N], self.v_name);
-                  _add:;
-                  }
-
-                self.v_mode := 'browse';
-         		    self.vc_data_bind(e);
-              ]]>
-            </v:on-post>
-          </v:button>
-          <v:button action="simple" value="Cancel" xhtml_class="form-button">
-            <v:on-post>
-              <![CDATA[
-                self.v_mode := 'browse';
-         		    self.vc_data_bind(e);
-              ]]>
-            </v:on-post>
-          </v:button>
-        </div>
-
-        <script>
-          <![CDATA[
-            initTab(2, 1);
-          ]]>
-        </script>
-      </v:template>
-
-    </vm:pagebody>
-  </vm:pagewrapper>
-</v:page>
diff --git a/appsrc/ODS-Briefcase/www/home.vspx b/appsrc/ODS-Briefcase/www/home.vspx
index 07bd3e4..8495731 100644
--- a/appsrc/ODS-Briefcase/www/home.vspx
+++ b/appsrc/ODS-Briefcase/www/home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: home.vspx,v 1.30.2.27 2011/03/23 12:19:08 source Exp $
+ -  $Id: home.vspx,v 1.30.2.33 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -141,6 +141,10 @@
       {
         return 1;
       }
+      if (cmd = 'shared')
+      {
+        return 1;
+      }
       if (is_empty_or_null(self.dir_path))
       {
         return 0;
@@ -174,7 +178,7 @@
         if (not ODRIVE.WA.odrive_write_permission(ODRIVE.WA.odrive_real_path(self.dir_path)))
           return 0;
       }
-      if (not ODRIVE.WA.det_action_enable (ODRIVE.WA.odrive_real_path (self.dir_path), cmd))
+      if (not self.commandRights (ODRIVE.WA.det_type (ODRIVE.WA.odrive_real_path (self.dir_path)), ODRIVE.WA.det_class (ODRIVE.WA.odrive_real_path (self.dir_path)), cmd))
       {
         return 0;
       }
@@ -243,26 +247,24 @@
       if (not self.enabledColumn(columnId))
         return;
 
-      declare dir_column, strClass, strOnclick any;
+      declare dir_column, image, onclick any;
 
+      image := '';
+      onclick := '';
       dir_column := self.getColumn(columnId);
-      strClass := '';
-      strOnclick := '';
       if ((dir_column[3] = 1) and (self.dir_path <> ''))
       {
-        strClass := 'sortcol';
-        strOnclick := sprintf ('onclick="javascript: myPost(\'F1\', \'sortColumn\', \'%s\');"', dir_column[0]);
+        onclick := sprintf ('onclick="javascript: odsPost(this, [\'sortColumn\', \'%s\']);"', dir_column[0]);
         if ((self.dir_order = dir_column[0]) and (self.dir_direction = 'desc'))
         {
-          strClass := strClass || ' sortcol_active sortcol_desc';
+          image := ' <img src="/ods/images/icons/orderdown_16.png" border="0" alt="Down"/>';
         }
         else if ((self.dir_order = dir_column[0]) and (self.dir_direction = 'asc'))
         {
-          strClass := strClass || ' sortcol_active sortcol_asc';
+          image := ' <img src="/ods/images/icons/orderup_16.png" border="0" alt="Up"/>';
         }
-        strClass := 'class="' || strClass || '"';
       }
-      http (sprintf ('<th nowrap="nowrap" %s %s %s>%s</th>', dir_column[6], strClass, strOnclick, dir_column[2]));
+      http (sprintf ('<th %s %s>%s%s</th>', dir_column[6], onclick, dir_column[2], image));
     ]]>
   </v:method>
 
@@ -345,12 +347,158 @@
     ]]>
   </v:method>
 
+  <v:method name="commandRights" arglist="in detType varchar, in detClass varchar, in action varchar">
+    <![CDATA[
+      declare retValue integer;
+
+      retValue := 0;
+      if (detClass = '')
+      {
+        if      (action = 'edit')
+        {
+          retValue := 1;
+        }
+        else if (action = 'new')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'create')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'upload')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'rename')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'copy')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'move')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        if      (action = 'delete')
+        {
+          if ((detType = '') or detType in ('HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'tag')
+        {
+          if ((detType = '') or detType in ('CalDAV', 'CardDAV'))
+            retValue := 1;
+        }
+        else if (action = 'version')
+        {
+          if (detType = '')
+            retValue := 1;
+        }
+      }
+      else
+      {
+        if (action = 'upload')
+        {
+          if (detType in ('', 'CalDAV', 'CardDAV'))
+            retValue := 1;
+        }
+        else if (action = 'create')
+        {
+          if (detType in ('', 'CalDAV', 'CardDAV'))
+            retValue := 1;
+        }
+        else if (action = 'tag')
+        {
+          if (detType in ('', 'CalDAV', 'CardDAV'))
+            retValue := 1;
+        }
+      }
+      -- dbg_obj_print (detType, detClass, action, retValue);
+      return retValue;
+    ]]>
+  </v:method>
+
+  <v:method name="fieldRights" arglist="in action varchar">
+    <![CDATA[
+      declare retValue integer;
+      declare detType, detClass  varchar;
+
+      detType := self.dav_detType;
+      detClass := self.dav_detClass;
+      retValue := 0;
+      if (detClass = '')
+      {
+        if      (action = 'edit')
+        {
+          retValue := 1;
+        }
+        else if (action = 'tag')
+        {
+          retValue := 1;
+        }
+        else if (action = 'metadata')
+        {
+          if ((detType = '') and ODRIVE.WA.dav_rdf_has_metadata (self.dav_path))
+            retValue := 1;
+        }
+        else if (action = 'permissions')
+        {
+          retValue := 1;
+        }
+        else if (action = 'properties')
+        {
+          retValue := self.fieldRights ('edit');
+          if (retValue and not isnull (DB.DBA.DAV_HIDE_ERROR (DB.DBA.DAV_PROP_GET_INT (ODRIVE.WA.DAV_GET (self.dav_item, 'id'), 'R', 'DAV:checked-in', 0))))
+            retValue := 0;
+        }
+        else if (action in ('sharing', 'sharing_acl', 'sharing_aci'))
+        {
+          retValue := 1;
+        }
+      }
+      else
+      {
+        if (action = 'permissions')
+        {
+          if ((detClass not in ('CalDAV', 'CardDAV')) and detType in ('', 'HostFS', 'S3'))
+            retValue := 1;
+        }
+        else if (action = 'tag')
+        {
+          if (detClass in ('CalDAV', 'CardDAV'))
+            retValue := 1;
+        }
+        else if (action = 'sharing')
+        {
+          if (detClass in ('CalDAV', 'CardDAV') or detType in (''))
+            retValue := 1;
+        }
+        else if (action = 'sharing_aci')
+        {
+          if (detClass in ('CalDAV', 'CardDAV') or detType in (''))
+            retValue := 1;
+        }
+      }
+      -- dbg_obj_print (detType, detClass, action, retValue);
+      return retValue;
+    ]]>
+  </v:method>
+
   <v:on-init>
     <![CDATA[
       declare N, M, retValue, dav_id, dav_owner, dav_group integer;
       declare dav_detType, dav_mime, dav_name, dav_fullPath, dav_perms, msg, _p varchar;
       declare properties, c_properties any;
-      declare dav_aci, dav_acl, dav_filename, dav_file, rdf_content any;
+      declare dav_acl, dav_filename, dav_file, rdf_content any;
       declare params, itemList any;
 
       params := self.vc_page.vc_event.ve_params;
@@ -402,15 +550,20 @@
         {
             msg := 'Can not update resource. ';
           }
-
+        self.dav_destination := cast (get_keyword ('dav_destination', params, '0') as integer);
         self.dav_source := cast (get_keyword ('dav_source', params, '-1') as integer);
-        if ((self.command_mode = 5) and (get_keyword('dav_destination', params, '') = '1'))
+        if ((self.command_mode in (5, 6)) and (get_keyword ('dav_destination', params, '') = '1'))
           {
             -- RDF Triple Store
+          declare rdf_data, rdf_type, rdf_graph any;
 
-            declare pos integer;
-          declare is_ttl, is_xml, rdf_data, rdf_xml, rdf_name, rdf_graph any;
-
+          if (self.command_mode = 6)
+          {
+            rdf_type := trim (get_keyword ('dav_mime', params, ''));
+            rdf_data := get_keyword (case when rdf_type = 'text/html' then 'dav_content_html' else 'dav_content_plain' end, params, '');
+          }
+          else
+          {
           if (self.dav_source = 0)
             {
             dav_filename := get_keyword('filename', get_keyword_ucase('attr-dav_file', params));
@@ -420,6 +573,8 @@
             }
             else
             {
+                declare pos integer;
+
                 pos := position ('dav_file', params);
                 rdf_data := aref_set_0 (params, pos);
               }
@@ -429,48 +584,34 @@
             dav_filename := get_keyword('dav_url', params, '');
               rdf_data := http_get(dav_filename);
             }
-          rdf_graph := trim (get_keyword('dav_name_rdf', params));
-            {
-            declare continue handler for SQLSTATE '*' {
-                is_ttl := 0;
-              };
-              is_ttl := 1;
-              DB.DBA.RDF_TTL2HASH (rdf_data, rdf_graph, rdf_graph);
-            }
-            if (not is_ttl)
-            {
-              {
-              declare continue handler for SQLSTATE '*' {
-                  is_xml := 0;
-                };
-                is_xml := 1;
-                xtree_doc (rdf_data, 0, rdf_graph);
-              }
+            rdf_type := http_mime_type (dav_filename);
             }
-            if (is_xml = 0 and is_ttl = 0)
+          rdf_graph := trim (get_keyword ('dav_name_rdf', params));
+          retValue := ODRIVE.WA.DAV_RDF_UPLOAD (rdf_data, rdf_type, rdf_graph);
+          if (not retValue)
           {
-              signal ('TEST', 'You have attempted to upload invalid data. You can only upload RDF, Turtle, N3 serializations of RDF Data to the RDF Data Store.<>');
-          }
-            if (is_ttl)
-            {
-            retValue := DB.DBA.TTLP (rdf_data, '', rdf_graph);
-          }
-          else
-          {
-            retValue := DB.DBA.RDF_LOAD_RDFXML (rdf_data, '', rdf_graph);
+            self.vc_error_message := 'You have attempted to upload invalid data to the RDF Data Store.';
+            self.vc_is_valid := 0;
+            return;
             }
         }
         else
         {
             -- WebDAV
-
+          -- Action test
             if (self.command_mode = 10)
             {
             self.dav_id := ODRIVE.WA.DAV_GET(self.dav_item, 'id');
+            self.dav_type := ODRIVE.WA.DAV_GET (self.dav_item, 'type');
+            self.dav_detClass := coalesce (ODRIVE.WA.det_class (self.dav_path, self.dav_type) , '');
             if (ODRIVE.WA.DAV_ERROR(self.dav_id))
               signal('TEST', 'Folder/File could not be found!<>');
           }
 
+          if ((self.command_mode = 10) and not self.fieldRights ('edit'))
+            goto _nextTest_1;
+
+          -- file/folde name
           dav_name := trim (get_keyword('dav_name', params));
           if (is_empty_or_null(dav_name))
             signal('TEST', 'Folder/File name can not be empty!<>');
@@ -478,6 +619,13 @@
           if (strchr(dav_name, '/') is not null or strchr(dav_name, '\\') is not null)
             signal('TEST', 'The folder/file name should not contain slash or back-slash symbols!<>');
 
+          if ((self.command_mode = 5) and (self.dav_type = 'R') and (dav_name like '%,acl'))
+            signal('TEST', 'The file names like ''*,acl'' are used for system purposes!<>');
+
+        _nextTest_1:;
+          if ((self.command_mode = 10) and not self.fieldRights ('tag'))
+            goto _nextTest_2;
+
           -- validate tags
           self.dav_tags_public := trim (get_keyword ('f_tags_public', params, ''));
           if (not ODRIVE.WA.validate_tags (self.dav_tags_public))
@@ -487,8 +635,12 @@
           if (not ODRIVE.WA.validate_tags (self.dav_tags_private))
             signal('TEST', 'The expression contains no valid tag(s)!<>');
 
+        _nextTest_2:;
+          if ((self.command_mode = 10) and not self.fieldRights ('metadata'))
+            goto _nextTest_3;
+
           -- validate metadata
-            if ((self.command_mode = 10) and ODRIVE.WA.dav_rdf_has_metadata (self.dav_path))
+          if (self.command_mode = 10)
             {
             declare param, uri, property, value any;
             declare delim integer;
@@ -507,6 +659,15 @@
               }
             }
           }
+
+        _nextTest_3:;
+          if (self.command_mode = 10)
+          {
+            dav_fullPath := ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath');
+            if (not self.fieldRights ('edit'))
+              goto _nextTest_4;
+          }
+
           dav_fullPath := rtrim (self.dir_path, '/') || '/' || dav_name;
           if (self.dav_type = 'C')
             dav_fullPath := dav_fullPath || '/';
@@ -517,6 +678,11 @@
               if (not ODRIVE.WA.DAV_ERROR(retValue))
                 signal('TEST', 'Folder/File with such name already exists!<>');
             }
+
+        _nextTest_4:;
+          if ((self.command_mode = 10) and not self.fieldRights ('edit'))
+            goto _nextTest_5;
+
           if (self.dav_type = 'C')
           {
             dav_detType := get_keyword ('dav_det', params);
@@ -528,8 +694,7 @@
               if (search_path between dav_fullPath and (dav_fullPath || '\255\255\255\255'))
                 signal('TEST', sprintf('Search path (%s) can not contains in folder full path (%s)!<>', search_path, dav_fullPath));
             }
-
-              if (dav_detType = 'PropFilter')
+            else if (dav_detType = 'PropFilter')
               {
               declare search_path varchar;
 
@@ -538,6 +703,15 @@
               if (ODRIVE.WA.DAV_ERROR(retValue))
                 signal('TEST', 'Search path does not exists!<>');
             }
+            else if (dav_detType = 'IMAP')
+            {
+              declare tmp varchar;
+
+              tmp := get_keyword ('dav_IMAP_server', params);
+              ODRIVE.WA.test (tmp, vector('name', 'IMAP Server', 'class', 'varchar', 'minLength', 1, 'maxLength', 255));
+              tmp := get_keyword ('dav_IMAP_user', params);
+              ODRIVE.WA.test (tmp, vector('name', 'IMAP User', 'class', 'varchar', 'minLength', 1, 'maxLength', 255));
+            }
           }
             if (self.command_mode = 5)
             {
@@ -565,6 +739,11 @@
                 dav_file := ODRIVE.WA.get_rdf (dav_filename);
             }
           }
+
+        _nextTest_5:;
+          if ((self.command_mode = 10) and not self.fieldRights ('edit'))
+            goto _nextTest_6;
+
             if (self.dav_type = 'R')
             {
             dav_mime := trim(get_keyword('dav_mime', params, ''));
@@ -576,18 +755,28 @@
             dav_file := get_keyword (case when dav_mime = 'text/html' then 'dav_content_html' else 'dav_content_plain' end, params, '');
           }
 
+        _nextTest_6:;
+          if ((self.command_mode = 10) and not self.fieldRights ('edit'))
+            goto _nextTest_7;
+
           dav_owner := ODRIVE.WA.odrive_user_id(trim(get_keyword('dav_owner', params, '')));
           if (dav_owner < 0)
             dav_owner := null;
 
+        _nextTest_7:;
+          if ((self.command_mode = 10) and not self.fieldRights ('edit'))
+            goto _nextTest_8;
+
           dav_group := ODRIVE.WA.odrive_user_id(trim(get_keyword('dav_group', params, '')));
           if (dav_group < 0)
             dav_group := null;
-        if (not ODRIVE.WA.check_admin (self.account_id))
-            if ((ODRIVE.WA.DAV_GET(self.dav_item, 'groupID') <> dav_group) or isnull(dav_group))
-              if (not ODRIVE.WA.odrive_group_own(trim(get_keyword('dav_group', params, ''))))
+          if (not ODRIVE.WA.check_admin (self.account_id) and not ODRIVE.WA.odrive_group_own (dav_group) and (coalesce (ODRIVE.WA.DAV_GET (self.dav_item, 'groupID'), -1) <> coalesce (dav_group, -1)))
                 signal('TEST', 'Only own groups or ''dba'' group are allowed!<>');
 
+        _nextTest_8:;
+          if ((self.command_mode = 10) and not self.fieldRights ('edit'))
+            goto _nextTest_9;
+
           dav_perms := '';
             for (N := 0; N < 9; N := N + 1)
             {
@@ -602,40 +791,69 @@
           }
           dav_perms := concat (dav_perms, get_keyword ('dav_index', params, 'N'), get_keyword ('dav_metagrab', params, 'N'));
 
+        _nextTest_9:;
           -- changing properties
           c_properties := ODRIVE.WA.prop_params (params, self.account_id);
 
+          -- Action execute
           -- Update
             if (self.command_mode = 10)
             {
+            if (not self.fieldRights ('edit'))
+              goto _nextExec_1;
+
             if (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath') <> dav_fullPath)
+            {
               ODRIVE.WA.DAV_SET (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'), 'name', dav_name);
+              self.dav_path := dav_fullPath;
+            }
+
+          _nextExec_1:;
+            if (not self.fieldRights ('edit'))
+              goto _nextExec_2;
+
             if ((self.dav_type = 'R') and (ODRIVE.WA.DAV_GET(self.dav_item, 'mimeType') <> dav_mime))
               ODRIVE.WA.DAV_SET(self.dav_path, 'mimeType', dav_mime);
 
+          _nextExec_2:;
+            if (not self.fieldRights ('permissions'))
+              goto _nextExec_3;
+
             if (ODRIVE.WA.DAV_GET(self.dav_item, 'permissions') <> dav_perms)
               ODRIVE.WA.DAV_SET(self.dav_path, 'permissions', dav_perms);
 
+          _nextExec_3:;
+            if (not self.fieldRights ('edit'))
+              goto _nextExec_4;
+
             if ((ODRIVE.WA.DAV_GET(self.dav_item, 'ownerID') <> dav_owner) or isnull(dav_owner))
               ODRIVE.WA.DAV_SET(self.dav_path, 'ownerID', dav_owner);
 
+          _nextExec_4:;
+            if (not self.fieldRights ('edit'))
+              goto _nextExec_5;
+
             if ((ODRIVE.WA.DAV_GET(self.dav_item, 'groupID') <> dav_group) or isnull(dav_group))
               ODRIVE.WA.DAV_SET(self.dav_path, 'groupID', dav_group);
 
+          _nextExec_5:;
+            if (not self.fieldRights ('sharing_acl'))
+              goto _nextExec_6;
+
             -- ACL
             dav_acl := ODRIVE.WA.DAV_GET (self.dav_item, 'acl');
             self.dav_acl := ODRIVE.WA.acl_params (params, dav_acl);
-            if (dav_acl <> self.dav_acl)
-            {
-              if (not ODRIVE.WA.DAV_ERROR (ODRIVE.WA.DAV_SET (self.dav_path, 'acl', self.dav_acl)))
-              {
+            if ((dav_acl <> self.dav_acl) and not ODRIVE.WA.DAV_ERROR (ODRIVE.WA.DAV_SET (self.dav_path, 'acl', self.dav_acl)))
                 ODRIVE.WA.acl_send_mail (self.domain_id, self.account_id, self.dav_path, dav_acl, self.dav_acl);
-              }
-            }
+
+          _nextExec_6:;
+            if (not self.fieldRights ('sharing_aci'))
+              goto _nextExec_7;
 
             -- ACI (Web Access)
-              dav_aci := ODRIVE.WA.aci_n3 (ODRIVE.WA.aci_params (params));
-              ODRIVE.WA.DAV_PROP_SET (dav_fullPath, 'virt:aci_meta_n3', dav_aci);
+            ODRIVE.WA.aci_save (dav_fullPath, ODRIVE.WA.aci_params (params));
+
+          _nextExec_7:;
           }
 
           -- Folder
@@ -651,37 +869,25 @@
             else
             {
               if (get_keyword ('dav_recursive', params, '') <> '')
-              {
                 ODRIVE.WA.DAV_SET_RECURSIVE (self.dav_path, dav_perms, dav_owner, dav_group);
-              }
+
                 if (dav_detType <> 'Versioning')
                 {
                   -- clear old properties
                 itemList := DB.DBA.DAV_PROP_LIST_INT (DB.DBA.DAV_SEARCH_ID (dav_fullPath, 'C'), 'C', 'virt:%', 0);
                   foreach (any item in itemList) do
                   {
-                  if (item[0] <> 'virt:aci_meta_n3')
+                  if (item[0] not like ('virt:aci_meta%'))
                   DB.DBA.DAV_PROP_REMOVE_INT (dav_fullPath, item[0], null, null, 0, 0, 0);
                   }
+                ODRIVE.WA.exec ('delete from DB.DBA.SYNC_COLS_TYPES where CT_COL_ID = ?', vector (DB.DBA.DAV_SEARCH_ID (self.dav_path, 'C')));
                 }
               }
-            if (__proc_exists ('DB.DBA.SYNC_MAKE_DAV_DIR'))
-            {
-              declare sync_version, sync_type any;
-
-              sync_version := get_keyword ('s_v', params, 'N');
-              sync_type := get_keyword ('s_t', params, 'N');
-
-              if (self.command_mode = 10)
-              {
-                ODRIVE.WA.exec ('delete from DB.DBA.SYNC_COLS_TYPES where CT_PATH = ?', vector (ODRIVE.WA.DAV_GET(self.dav_item, 'fullPath')));
-              }
-
-				      DB.DBA.SYNC_MAKE_DAV_DIR (sync_type, DB.DBA.DAV_SEARCH_ID (dav_fullPath, 'C'), dav_name, dav_fullPath, sync_version);
-            }
-
             ODRIVE.WA.DAV_SET (dav_fullPath, 'permissions-inheritance', get_keyword('dav_permissions_inheritance', params, 'N'));
 
+            if (not self.fieldRights ('edit'))
+              goto _nextExec_8;
+
               -- set new properties
             if (dav_detType in ('ResFilter', 'CatFilter'))
             {
@@ -703,25 +909,66 @@
               retValue := ODRIVE.WA.CatFilter_CONFIGURE(self.dav_path, self.search_dc);
               }
               if (ODRIVE.WA.DAV_ERROR(retValue))
-              {
                 signal('TEST', concat(ODRIVE.WA.DAV_PERROR(retValue), '<>'));
               }
-            }
             else if (dav_detType = 'rdfSink')
             {
+              declare tmp any;
+              declare cartridges, metaCartridges varchar;
+
+              cartridges := '';
+              metaCartridges := '';
+              tmp := get_keyword ('dav_rdfSink_rdfSponger', params, 'off');
+              if (tmp = 'on')
+              {
+                for (N := 0; N < length (params); N := N + 2)
+                {
+                  if (params[N] = 'ca_item')
+                    cartridges := cartridges || ',' || trim (params[N+1]);
+                  else if (params[N] = 'mca_item')
+                    metaCartridges := metaCartridges || ',' || trim (params[N+1]);
+                }
+                cartridges := ltrim (cartridges, ',');
+                metaCartridges := ltrim (metaCartridges, ',');
+              }
               ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:rdf_graph', get_keyword('dav_rdfSink_rdfGraph', params));
-              ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:rdf_sponger', get_keyword('dav_rdfSink_rdfSponger', params));
+              ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:rdf_sponger', tmp);
+              ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:rdf_cartridges', cartridges);
+              ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:rdf_metaCartridges', metaCartridges);
+            }
+            else if (dav_detType = 'SyncML')
+            {
+              if (__proc_exists ('DB.DBA.SYNC_MAKE_DAV_DIR'))
+              {
+                declare sync_version, sync_type any;
+
+                sync_version := get_keyword ('syncml_version', params, 'N');
+                sync_type := get_keyword ('syncml_type', params, 'N');
+  				      DB.DBA.SYNC_MAKE_DAV_DIR (sync_type, DB.DBA.DAV_SEARCH_ID (dav_fullPath, 'C'), dav_name, dav_fullPath, sync_version);
+              }
             }
             else if (dav_detType <> 'Versioning')
             {
               retValue := ODRIVE.WA.DAV_SET(self.dav_path, 'detType', either(equ(dav_detType, ''), null, dav_detType));
                 if (dav_detType = 'oMail')
                 {
-                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:oMail-DomainId', get_keyword('dav_oMail_DomainId', params));
-                  ODRIVE.WA.DAV_PROP_SET(self.dav_path, 'virt:oMail-UserName', ODRIVE.WA.account());
-                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:oMail-FolderName', get_keyword('dav_oMail_FolderName', params));
+                declare tmp any;
+
+                tmp := trim (get_keyword ('dav_oMail_FolderName', params, ''));
+                if (tmp = '')
+                  tmp := 'NULL';
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:oMail-DomainId', '1');
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:oMail-UserName', ODRIVE.WA.account_name (self.account_id));
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:oMail-FolderName', tmp);
                 ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:oMail-NameFormat', get_keyword('dav_oMail_NameFormat', params));
               }
+              else if (dav_detType = 'IMAP')
+              {
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:IMAP-connection', get_keyword ('dav_IMAP_connection', params));
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:IMAP-server', get_keyword ('dav_IMAP_server', params));
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:IMAP-user', get_keyword ('dav_IMAP_user', params));
+                ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:IMAP-password', get_keyword ('dav_IMAP_password', params));
+              }
               else if (dav_detType = 'PropFilter')
                 {
                 ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:PropFilter-SearchPath', ODRIVE.WA.odrive_real_path(get_keyword('dav_PropFilter_SearchPath', params, '/DAV/')));
@@ -735,6 +982,7 @@
                 ODRIVE.WA.DAV_PROP_SET (self.dav_path, 'virt:S3-SecretKey', get_keyword ('dav_S3_SecretKey', params));
               }
                 }
+          _nextExec_8:;
             }
 
           -- File
@@ -760,7 +1008,7 @@
             }
             else
             {
-              if (ODRIVE.WA.dav_rdf_has_metadata(self.dav_path))
+              if (self.fieldRights ('metadata'))
               {
                 declare param, property any;
                 declare delim integer;
@@ -779,12 +1027,16 @@
               }
             }
             -- Tags
+            if (not self.fieldRights ('tag'))
+              goto _nextExec_9;
+
             ODRIVE.WA.DAV_SET (dav_fullPath, 'privatetags', self.dav_tags_private);
             ODRIVE.WA.DAV_SET (dav_fullPath, 'publictags', self.dav_tags_public);
+          _nextExec_9:;
           }
 
           -- properties
-          if (get_keyword ('dav_propEnable', params, '0') <> '0')
+          if (self.fieldRights ('properties'))
           {
           properties := ODRIVE.WA.DAV_PROP_LIST (dav_fullPath, '%', vector ('virt:%', 'http://www.openlinksw.com/schemas/%', 'http://local.virt/DAV-RDF%'));
             for (N := 0; N < length (properties); N := N + 1)
@@ -845,14 +1097,15 @@
       <v:variable name="dav_vector" persist="0" type="any" default="null" />
       <v:variable name="tabNo" param-name="tabNo" type="varchar" default="'1'" />
       <v:variable name="dav_id" type="integer" default="-1" />
+      <v:variable name="dav_destination" type="integer" default="0" />
       <v:variable name="dav_source" type="integer" default="0" />
       <v:variable name="dav_path" type="varchar" default="''" />
       <v:variable name="dav_category" type="varchar" default="''" />
       <v:variable name="dav_type" type="varchar" default="''" />
       <v:variable name="dav_detType" type="varchar" default="''" />
+      <v:variable name="dav_detClass" type="varchar" default="''" />
       <v:variable name="dav_item" type="any" default="null" />
       <v:variable name="dav_enable" type="integer" default="1" />
-      <v:variable name="dav_propEnable" type="integer" default="1" />
       <v:variable name="dav_acl" persist="0" type="varbinary" />
       <v:variable name="dav_tags_private" persist="0" type="varchar" />
       <v:variable name="dav_tags_public" persist="0" type="varchar" />
@@ -929,7 +1182,7 @@
       <?vsp http (sprintf ('<input type="hidden" name="tabNo" id="tabNo" value="%s" />', self.tabNo)); ?>
       <div class="toolbar">
         <?vsp
-          self.toolbarShow ('refresh', 'Refresh', 'onclick="javascript: document.forms[0].submit();"', 'ref_32.png', '', 0);
+          self.toolbarShow ('refresh', 'Refresh', 'onclick="javascript: vspxPost(\'action\', \'_cmd\', \'refresh\');"', 'ref_32.png', '', 0);
           self.toolbarShow ('up', 'Up', 'onclick="javascript: vspxPost(\'action\', \'_cmd\', \'up\');"', 'up_32.png', 'grey_up_32.png', 0);
 
           http ('<img src="image/c.gif" height="32" width="2" border="0" class="toolbar" />');
@@ -975,13 +1228,16 @@
 
                 params := e.ve_params;
                 _action := get_keyword ('_cmd', params, '');
+
                 if (_action = 'home')
                 {
+                _home:
                   self.dir_path := ODRIVE.WA.dav_home2 (self.owner_id, self.account_role);
                   self.command_set (0, 0);
                 }
                 else if (_action = 'shared')
                 {
+                _shared:
                   self.dir_path := ODRIVE.WA.shared_name();
                   self.command_set (0, 0);
                 }
@@ -1046,6 +1302,7 @@
                 else if (_action = 'upload')
                 {
                   self.command_push (10, 5);
+                  self.dav_destination := 0;
                   self.dav_source := 0;
                 }
                 else if (_action = 'create')
@@ -1061,8 +1318,18 @@
                 else if (_action = 'select')
                 {
                   _path := get_keyword ('_path', params, '');
-                  if (_path <> '')
+                  _item := ODRIVE.WA.dav_init (_path);
+                  if (ODRIVE.WA.isVector (_item) and (_path <> ''))
+                  {
+                  if (self.dir_path = '')
                   {
+                    if (trim (_path, '/') = ODRIVE.WA.odrive_name_home ())
+                      goto _home;
+
+                    if (trim (_path, '/') = ODRIVE.WA.shared_name ())
+                      goto _shared;
+                  }
+
                     if (ODRIVE.WA.odrive_permission (_path) = '')
                     {
                       self.vc_error_message := 'You have not rights to read this folder/file!';
@@ -1070,25 +1337,21 @@
                       self.vc_data_bind (e);
                       return;
                     }
-                    _item := ODRIVE.WA.dav_init (_path);
                     if (ODRIVE.WA.dav_get (_item, 'type') = 'R')
                     {
                       http_request_status ('HTTP/1.1 302 Found');
                       http_header (sprintf ('Location: %s&mode=download&file=%U\r\n', ODRIVE.WA.page_url (self.domain_id, 'view.vsp', self.sid , self.realm), _path));
+                      return;
                     }
-                    else
-                    {
+
                       if (self.dir_path <> '')
-                      {
                         self.dir_path := rtrim (self.dir_path, '/') || '/';
-                      }
-                      self.dir_path := self.dir_path || ODRIVE.WA.dav_get (_item, 'name');
 
+                    self.dir_path := self.dir_path || ODRIVE.WA.dav_get (_item, 'name');
+                  }
                       self.ds_items.vc_reset();
                       self.vc_data_bind (e);
                     }
-                  }
-                }
                 else if (_action = 'tag_search')
                 {
                   declare _mode, tag, tags, tagType, tagsID any;
@@ -1337,20 +1600,14 @@
       <v:template name="tform_4" type="simple" enabled="-- equ(self.command, 10)">
         <v:before-data-bind>
           <![CDATA[
+            declare params any;
+
+            params := self.vc_page.vc_event.ve_params;
             self.search_dc := null;
             self.dav_path := ODRIVE.WA.odrive_real_resource (self.source);
             self.dav_enable := 1;
-            self.dav_propEnable := self.dav_enable;
             if (self.command_mode = 10)
             {
-              if (equ(self.dav_type, 'R') and (self.dav_path like '%,acl'))
-              {
-                self.dav_enable := 0;
-              } else {
-              self.dav_enable := ODRIVE.WA.odrive_write_permission (self.dav_path);
-              }
-              if (self.dav_enable)
-                ODRIVE.WA.det_action_enable (self.dav_path, 'edit');
               self.dav_item := ODRIVE.WA.DAV_INIT(self.dav_path);
               if (ODRIVE.WA.DAV_ERROR(self.dav_item))
               {
@@ -1358,11 +1615,8 @@
                 self.vc_data_bind (e);
                 return;
               }
-              self.dav_propEnable := self.dav_enable;
-              if (self.dav_propEnable and
-                  not isnull (DB.DBA.DAV_HIDE_ERROR(DB.DBA.DAV_PROP_GET_INT (ODRIVE.WA.DAV_GET (self.dav_item, 'id'), 'R', 'DAV:checked-in', 0))))
-                  self.dav_propEnable := 0;
-              self.dav_category := coalesce (ODRIVE.WA.det_category (self.dav_path, ODRIVE.WA.DAV_GET (self.dav_item, 'type')) , '');
+              self.dav_type := ODRIVE.WA.DAV_GET (self.dav_item, 'type');
+              self.dav_detClass := coalesce (ODRIVE.WA.det_class (self.dav_path, self.dav_type) , '');
             }
             else if (self.command_mode in (5, 6))
             {
@@ -1371,25 +1625,38 @@
               V := ODRIVE.WA.DAV_INIT_RESOURCE (self.dir_path);
               if (self.command_mode = 6)
                 aset (V, 9, 'text/html');
+
               self.dav_item := V;
-              self.dav_category := coalesce (ODRIVE.WA.det_category (ODRIVE.WA.odrive_real_path_int (self.dir_path, 1, 'C'), 'C') , '');
+              self.dav_type := 'R';
+              self.dav_detClass := coalesce (ODRIVE.WA.det_class (ODRIVE.WA.odrive_real_path_int (self.dir_path, 1, 'C'), 'C') , '');
             }
             else
             {
               self.dav_item := ODRIVE.WA.DAV_INIT_COLLECTION (self.dir_path);
               if (self.command_mode = 1)
-                self.vc_page.vc_event.ve_params := vector_concat(self.vc_page.vc_event.ve_params, vector ('dav_det', 'ResFilter', 'attr_dav_det', ''));
-              self.dav_category := coalesce (ODRIVE.WA.det_category (ODRIVE.WA.odrive_real_path_int (self.dir_path, 1, 'C'), 'C') , '');
+                params := vector_concat (params, vector ('dav_det', 'ResFilter', 'attr_dav_det', ''));
+
+              self.dav_type := 'C';
+              self.dav_detClass := coalesce (ODRIVE.WA.det_class (ODRIVE.WA.odrive_real_path_int (self.dir_path, 1, 'C'), 'C') , '');
             }
-            self.dav_type := ODRIVE.WA.DAV_GET (self.dav_item, 'type');
-            self.dav_detType := get_keyword ('dav_det', self.vc_page.vc_event.ve_params, ODRIVE.WA.DAV_GET (self.dav_item, 'detType'));
-            if (isnull(get_keyword ('dav_group', self.vc_page.vc_event.ve_params)))
+            self.dav_detType := cast (coalesce (get_keyword ('dav_det', params, ODRIVE.WA.DAV_GET (self.dav_item, 'detType')), '') as varchar);
+            if (self.command_mode = 10)
             {
-              self.dav_acl := ODRIVE.WA.DAV_GET (self.dav_item, 'acl');
+              if (equ (self.dav_type, 'R') and (self.dav_path like '%,acl'))
+              {
+                self.dav_enable := 0;
+              } else {
+                self.dav_enable := ODRIVE.WA.odrive_write_permission (self.dav_path);
+              }
+              if (self.dav_enable)
+                self.dav_enable := self.commandRights (self.dav_detType, self.dav_detClass, 'edit');
             }
+            if (isnull (get_keyword ('dav_group', params)))
+              self.dav_acl := ODRIVE.WA.DAV_GET (self.dav_item, 'acl');
+
             if (self.command_mode = 10)
             {
-              if (isnull(get_keyword ('dav_group', self.vc_page.vc_event.ve_params)))
+              if (isnull (get_keyword ('dav_group', params)))
               {
                 self.dav_tags_private := '';
                 self.dav_tags_public := '';
@@ -1404,8 +1671,10 @@
                 self.search_dc := ODRIVE.WA.DAV_PROP_GET (self.dav_path, 'virt:Filter-Params');
               }
             }
-            if (not isnull(get_keyword ('dav_group', self.vc_page.vc_event.ve_params)))
+            if (not isnull (get_keyword ('dav_group', params)))
               self.dc_prepare();
+
+            self.rdf_iri := SIOC..briefcase_resource_iri (self.dav_path);
           ]]>
         </v:before-data-bind>
         <v:text name="formRight" type="hidden" value="--self.dav_enable" />
@@ -1425,87 +1694,78 @@
         </div>
          <div id="c1">
           <div class="tabs">
-            <vm:tabCaption tab="1" tabs="10" caption="Main" />
-            <v:template name="tform_5" type="simple" enabled="-- case when (equ (self.command_mode, 10) and ODRIVE.WA.det_action_enable (self.dav_path, 'share') and not (equ(self.dav_type, 'R') and (ODRIVE.WA.DAV_GET (self.dav_item, 'name') like '%,acl'))) then 1 else 0 end">
-            <vm:tabCaption tab="2" tabs="10" caption="Sharing" />
+            <vm:tabCaption tab="1"   tabs="12" caption="Main" />
+            <v:template name="tform_5" type="simple" enabled="-- case when (equ (self.command_mode, 10) and self.fieldRights ('sharing') and not (equ (self.dav_type, 'R') and (ODRIVE.WA.DAV_GET (self.dav_item, 'name') like '%,acl'))) then 1 else 0 end">
+            <vm:tabCaption tab="2"   tabs="12" caption="Sharing" />
             </v:template>
-            <v:template name="tform_6" type="simple" enabled="-- case when (equ (self.command_mode, 10) and ODRIVE.WA.dav_rdf_has_metadata (self.dav_path)) then 1 else 0 end">
-            <vm:tabCaption tab="3" tabs="10" caption="Metadata" />
+            <v:template name="tform_6" type="simple" enabled="-- case when (equ (self.command_mode, 10) and self.fieldRights ('metadata')) then 1 else 0 end">
+            <vm:tabCaption tab="3"   tabs="12" caption="Metadata" />
             </v:template>
-            <v:template name="tform_7" type="simple" enabled="-- case when (equ (self.command_mode, 10) and equ(self.dav_type, 'R') and ODRIVE.WA.det_action_enable (self.dav_path, 'version') and not (equ(self.dav_type, 'R') and (ODRIVE.WA.DAV_GET (self.dav_item, 'name') like '%,acl'))) then 1 else 0 end">
-            <vm:tabCaption tab="9" tabs="10" caption="Versions" />
+            <v:template name="tform_7" type="simple" enabled="-- case when (equ (self.command_mode, 10) and equ (self.dav_type, 'R') and self.fieldRights ('version') and not (equ (self.dav_type, 'R') and (ODRIVE.WA.DAV_GET (self.dav_item, 'name') like '%,acl'))) then 1 else 0 end">
+            <vm:tabCaption tab="9"   tabs="12" caption="Versions" />
             </v:template>
             <v:template name="tform_8" type="simple" enabled="-- equ(self.dav_type, 'C')">
-            <vm:tabCaption tab="4" tabs="10" caption="WebMail" />
-            <vm:tabCaption tab="5"  tabs="10" caption="Filter" />
-            <vm:tabCaption tab="6"   tabs="10" caption="S3 Properties" />
-            <vm:tabCaption tab="7"  tabs="10" caption="Criteria" />
-            <vm:tabCaption tab="8"  tabs="10" caption="RDF Upload" />
+            <vm:tabCaption tab="4"   tabs="12" caption="WebMail" />
+            <vm:tabCaption tab="5"   tabs="12" caption="Filter" />
+            <vm:tabCaption tab="6"   tabs="12" caption="S3 Properties" />
+            <vm:tabCaption tab="7"   tabs="12" caption="Criteria" />
+            <vm:tabCaption tab="8"   tabs="12" caption="Linked Data Import" />
+            <v:template name="tform_17" type="simple" enabled="-- case when (isstring (DB.DBA.vad_check_version ('SyncML'))) then 1 else 0 end">
+            <vm:tabCaption tab="10"  tabs="12" caption="SyncML" />
+            </v:template>
+            <vm:tabCaption tab="11"  tabs="12" caption="IMAP Account" />
             </v:template>
           </div>
           <div class="contents">
             <div id="1" class="tabContent">
               <table class="form-body" cellspacing="0">
-                <v:template name="tform_9" type="simple" enabled="-- equ(self.command_mode, 5)">
+                <v:template name="tform_9" type="simple" enabled="-- case when (self.command_mode in (5, 6)) then 1 else 0 end">
                   <tr>
-                    <th width="30%">
+                    <th width="30%" valign="top">
                       <vm:label for="dav_file" value="--'Destination'" />
                     </th>
                     <td style="padding-left: 4px">
-                      <input type="radio" name="dav_destination" id="dav_destination_0" value="0" checked="checked" onchange="javascript: toggleDavRows();" title="WebDAV" /><b><vm:label for="dav_destination_0" value="--'WebDAV'" /></b>
-                      <input type="radio" name="dav_destination" id="dav_destination_1" value="1" onchange="javascript: toggleDavRows();" title="RDF Store" /><b><vm:label for="dav_destination_1" value="--'RDF Store'" /></b>
+                      <label><?vsp http (sprintf ('<input type="radio" name="dav_destination" id="dav_destination_0" value="0" %s onchange="javascript: toggleDavRows();" title="WebDAV" />', case when self.dav_destination = 0 then 'checked="checked"' else '' end)); ?> <b>WebDAV</b></label><br />
+                      <label><?vsp http (sprintf ('<input type="radio" name="dav_destination" id="dav_destination_1" value="1" %s onchange="javascript: toggleDavRows();" title="WebDAV" />', case when self.dav_destination = 1 then 'checked="checked"' else '' end)); ?> <b>Quad Store</b></label>
+                		  <![CDATA[
+                		    <script type="text/javascript">
+                          OAT.MSG.attach(OAT, "PAGE_LOADED", function(){toggleDavRows();});
+                		    </script>
+                		  ]]>
                     </td>
                   </tr>
+                </v:template>
+                <v:template name="tform_9_1" type="simple" enabled="-- equ (self.command_mode, 5)">
                   <tr>
                     <th valign="top">
-                      <v:label for="dav_file" value="--'Source'" />
+                      <v:label for="dav_source" value="--'Source'" />
                     </th>
                     <td>
-                      <table cellspacing="0" cellpadding="0">
-                        <tr>
-                          <td>
-                            <?vsp http (sprintf ('<input type="radio" name="dav_source" id="dav_source_0" value="0" %s title="File" />', case when self.dav_source = 0 then 'checked="checked"' else '' end)); ?>&nbsp;
-                          </td>
-                          <td>
-                            <b><vm:label for="dav_source_0" value="--'File'" /></b>
-                          </td>
-                          <td>
-                            <input type="file" name="dav_file" onchange="javascript: F1.dav_source[0].checked=true; getFileName(this);" onblur="javascript: getFileName(this);" onFocus="javascript: F1.dav_source[0].checked=true;" size="40" />
+                      <label id="dav_source_0"><?vsp http (sprintf ('<input type="radio" name="dav_source" value="0" %s onchange="javascript: toggleDavSource();" title="File" />', case when self.dav_source = 0 then 'checked="checked"' else '' end)); ?><b>File</b></label><br />
+                      <label id="dav_source_1"><?vsp http (sprintf ('<input type="radio" name="dav_source" value="1" %s onchange="javascript: toggleDavSource();" title="URL" />', case when self.dav_source = 1 then 'checked="checked"' else '' end)); ?><b>URL</b></label><br />
+                      <label id="dav_source_2"><?vsp http (sprintf ('<input type="radio" name="dav_source" value="2" %s onchange="javascript: toggleDavSource();" title="Quad Store Named Graph IRI" />', case when self.dav_source = 2 then 'checked="checked"' else '' end)); ?><b>Quad Store Named Graph IRI</b></label>
                           </td>
                         </tr>
                         <tr>
+                    <th valign="top">
+                      <label id="dav_file_label">File</label>
+                    </th>
                           <td>
-                            <?vsp http (sprintf ('<input type="radio" name="dav_source" id="dav_source_1" value="1" %s title="URL" />', case when self.dav_source = 1 then 'checked="checked"' else '' end)); ?>&nbsp;
-                          </td>
-                          <td>
-                            <b><vm:label for="dav_source_1" value="--'URL'" /></b>
-                          </td>
-                          <td>
-                            <input type="text" name="dav_url" value="<?V get_keyword ('dav_url', self.vc_page.vc_event.ve_params, get_keyword ('URI', self.vc_page.vc_event.ve_params, '')) ?>" onblur="javascript: getFileName(this);" onFocus="javascript: F1.dav_source[1].checked=true;" size="40" />
-                          </td>
-                        </tr>
-                        <tr id="rdf_store">
-                          <td>
-                            <?vsp http (sprintf ('<input type="radio" name="dav_source" id="dav_source_2" value="2" %s title="RDF Store" />', case when self.dav_source = 2 then 'checked="checked"' else '' end)); ?>&nbsp;
-                          </td>
-                          <td>
-                            <b><vm:label for="dav_source_2" value="--'RDF Store'" /></b>
-                          </td>
-                          <td>
-                            <input type="text" name="dav_rdf" value="<?V get_keyword ('dav_rdf', self.vc_page.vc_event.ve_params, '') ?>" onblur="javascript: getFileName(this);" onFocus="javascript: F1.dav_source[2].checked=true;" size="40" />
-                          </td>
-                        </tr>
-                      </table>
+                      <input type="file" name="dav_file" id="dav_file" onchange="javascript: F1.dav_source[0].checked=true; getFileName(this);" onblur="javascript: getFileName(this);" onfocus="javascript: F1.dav_source[0].checked=true;" size="60" />
+                      <input type="text" name="dav_url"  id="dav_url"  value="<?V get_keyword ('dav_url', self.vc_page.vc_event.ve_params, get_keyword ('URI', self.vc_page.vc_event.ve_params, '')) ?>" onblur="javascript: getFileName(this);" onfocus="javascript: F1.dav_source[1].checked=true;" size="60" style="display: none;"/>
+                      <input type="text" name="dav_rdf"  id="dav_rdf"  value="<?V get_keyword ('dav_rdf', self.vc_page.vc_event.ve_params, '') ?>" onblur="javascript: getFileName(this);" onfocus="javascript: F1.dav_source[2].checked=true;" size="60" style="display: none;"/>
                     </td>
                   </tr>
                 </v:template>
-                <tr>
+                <tr id="davRow_name">
                   <th width="30%">
                     <span id="label_dav"><v:label for="dav_name" value="--either(equ(self.dav_type, 'R'), 'File name (*)', 'Folder name (*)')" /></span>
-                    <span id="label_dav_rdf" style="display: none;"><v:label for="dav_name" value="--'RDF graph name'" /></span>
+                    <span id="label_dav_rdf" style="display: none;"><v:label for="label_dav_rdf" value="--'RDF graph name'" /></span>
                   </th>
                   <td>
-                    <v:text name="dav_name" xhtml_id="dav_name" value="--get_keyword ('dav_name', self.vc_page.vc_event.ve_params, get_keyword ('TITLE', self.vc_page.vc_event.ve_params, ODRIVE.WA.DAV_GET (self.dav_item, 'name')))" format="%s" fmt-function="ODRIVE.WA.utf2wide" xhtml_disabled="disabled" xhtml_class="field-short" />
+                    <v:text name="rdfGraph_prefix" xhtml_id="rdfGraph_prefix" type="hidden" value="--ODRIVE.WA.host_url () || WS.WS.FIXPATH (ODRIVE.WA.odrive_real_path (self.dir_path))" />
+                    <v:text name="dav_name" xhtml_id="dav_name" value="--get_keyword ('dav_name', self.vc_page.vc_event.ve_params, get_keyword ('TITLE', self.vc_page.vc_event.ve_params, ODRIVE.WA.DAV_GET (self.dav_item, 'name')))" format="%s" fmt-function="ODRIVE.WA.utf2wide" xhtml_disabled="disabled" xhtml_class="field-short" xhtml_onkeyup="javascript: ODRIVE.updateRdfGraph();" />
+                    <v:text name="dav_name_save" xhtml_id="dav_name_save" type="hidden" value="--get_keyword ('dav_name', self.vc_page.vc_event.ve_params, get_keyword ('TITLE', self.vc_page.vc_event.ve_params, ODRIVE.WA.DAV_GET (self.dav_item, 'name')))" />
                     <v:text name="dav_name_rdf" xhtml_id="dav_name_rdf" value="--get_keyword ('dav_name', self.vc_page.vc_event.ve_params, ODRIVE.WA.host_url() || WS.WS.FIXPATH(ODRIVE.WA.odrive_real_path(self.dir_path)))" format="%s" fmt-function="ODRIVE.WA.utf2wide" xhtml_disabled="disabled" xhtml_class="field-text" xhtml_style="display: none;" />
                   </td>
                 </tr>
@@ -1517,7 +1777,7 @@
                     <td>
                       <v:text name="dav_mime" xhtml_id="dav_mime" value="--get_keyword ('dav_mime', self.vc_page.vc_event.ve_params, ODRIVE.WA.DAV_GET (self.dav_item, 'mimeType'))" format="%s" xhtml_disabled="disabled" xhtml_class="field-short" xhtml_onchange="javascript: ODRIVE.toggleEditor();" />
                       <v:template name="tform_11" type="simple" enabled="--self.dav_enable">
-                        <input type="button" value="Select" onclick="javascript: windowShow('mimes_select.vspx?params=dav_mime:s1;')" disabled="disabled" class="button" />
+                        <input type="button" value="Select" onclick="javascript: windowShow('<?V ODRIVE.WA.page_url (self.domain_id, 'mimes_select.vspx?params=dav_mime:s1;') ?>');" disabled="disabled" class="button" />
                       </v:template>
                     </td>
                   </tr>
@@ -1543,7 +1803,7 @@
                     </td>
                   </tr>
                 </v:template>
-                <v:template name="tform_12" type="simple" enabled="-- case when (((self.dav_type = 'C') and (self.dav_detType <> 'Versioning')) or (self.command_mode <> 10)) then 1 else 0 end">
+                <v:template name="tform_12" type="simple" enabled="-- case when (((self.dav_type = 'C') and (self.dav_detType = '') and (self.dav_detClass = '')) or (self.command_mode <> 10)) then 1 else 0 end">
                   <vm:autoVersion />
                 </v:template>
                 <v:template name="tform_13" type="simple" enabled="-- equ(self.dav_type, 'C')">
@@ -1558,23 +1818,58 @@
                           {
                             http (self.option_prepare('ResFilter',        'Smart Folder',                  'ResFilter'));
                           }
-                          else if ((self.command_mode = 10) and (self.dav_detType = 'Versioning'))
+                          else
                           {
-                            http (self.option_prepare('Versioning',       'Version Control Folder',        self.dav_detType));
+                            declare N, M, V any;
+
+                            -- dbg_obj_print ('', self.dav_detType);
+                            V := vector (
+                                          0, '',           'Normal',
+                                          1, 'ResFilter',  'Smart Folder',
+                                          1, 'CatFilter',  'Category Folder',
+                                          1, 'PropFilter', 'Property Filter Folder',
+                                          1, 'HostFs',     'Host FS Folders',
+                                          0, 'rdfSink',    'Linked Data Import',
+                                          1, 'RDFData',    'RDF Data',
+                                          1, 'DynaRes',    'Dynamic Resources',
+                                          2, 'SyncML',     'SyncML Folder',
+                                          1, 'Versioning', 'Version Control Folder',
+                                          1, 'S3',         'Amazon S3',
+                                          1, 'CardDAV',    'CardDAV Folder',
+                                          1, 'Blog',       'Blog Folder',
+                                          1, 'Bookmark',   'Bookmark Folder',
+                                          1, 'calendar',   'Calendar Folder',
+                                          1, 'CalDAV',     'CalDAV Folder',
+                                          1, 'News3',      'Feed Subscriptions',
+                                          1, 'oMail',      'WebMail Folders',
+                                          1, 'IMAP',       'IMAP Mail Account');
+
+                            M := 0;
+                            for (N := 0; N < length (V); N := N + 3)
+                            {
+                              if ((V[N] = 1) and (__proc_exists (sprintf ('DB.DBA.%s_DAV_AUTHENTICATE', V[N+1])) is null))
+                                goto _0;
+
+                              if ((V[N] = 2) and not isstring (DB.DBA.vad_check_version ('SyncML')))
+                                goto _0;
+
+                              if (self.command_mode = 10)
+                              {
+                                if (self.dav_detType = V[N+1])
+                                {
+                                  M := 1;
+                                  http (self.option_prepare(V[N+1], V[N+2], self.dav_detType));
+                                }
                           }
                           else
                           {
-                            http (self.option_prepare('',                 'Normal',                        self.dav_detType));
-                            http (self.option_prepare('ResFilter',        'Smart Folder',                  self.dav_detType));
-                            http (self.option_prepare('CatFilter',        'Category Folder',               self.dav_detType));
-                            http (self.option_prepare('PropFilter',       'Property Filter Folder',        self.dav_detType));
-                            http (self.option_prepare('HostFs',           'Host FS Folders',               self.dav_detType));
-                            http (self.option_prepare('oMail',            'WebMail Folders',               self.dav_detType));
-                            http (self.option_prepare('News3',            'OFM Subscriptions',             self.dav_detType));
-                            http (self.option_prepare('rdfSink',          'RDF Upload Folder',             self.dav_detType));
-                            http (self.option_prepare('RDFData',          'RDF Data',                      self.dav_detType));
-                            http (self.option_prepare('S3',               'Amazon S3',                     self.dav_detType));
-                            http (self.option_prepare('DynaRes',          'Dynamic Resources',             self.dav_detType));
+                                M := 1;
+                                http (self.option_prepare(V[N+1], V[N+2], self.dav_detType));
+                              }
+                            _0:;
+                            }
+                            if (not M)
+                              http (self.option_prepare(V[1], V[2], self.dav_detType));
                           }
                         ?>
                       </select>
@@ -1595,7 +1890,7 @@
                       </v:after-data-bind>
                     </v:text>
                     <vm:if test="ODRIVE.WA.check_admin (self.account_id) and self.dav_enable">
-                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?form=F1&mode=u&params=dav_owner:s1;')" disabled="disabled" class="button" />
+                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=u&params=dav_owner:s1;&nrows=<?V ODRIVE.WA.settings_rows (self.settings) ?>')" disabled="disabled" class="button" />
                     </vm:if>
                   </td>
                 </tr>
@@ -1606,16 +1901,16 @@
                   <td>
                     <v:text name="dav_group" value="--get_keyword ('dav_group', self.vc_page.vc_event.ve_params, ODRIVE.WA.DAV_GET (self.dav_item, 'groupName'))" format="%s" xhtml_disabled="disabled" xhtml_class="field-short" />
                     <vm:if test="self.dav_enable">
-                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?form=F1&mode=g&params=dav_group:s1;')" disabled="disabled" class="button" />
+                      <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=g&params=dav_group:s1;&nrows=<?V ODRIVE.WA.settings_rows (self.settings) ?>')" disabled="disabled" class="button" />
                     </vm:if>
                   </td>
                 </tr>
                 <tr id="davRow_perms">
-                  <th>
+                  <th valign="top">
                     <v:label for="dav_group" value="--'Permissions'" />
                   </th>
                   <td>
-                    <table class="permissions-list" cellspacing="0">
+                    <table class="permissions-list" cellspacing="0" style="width: 250px;">
                       <vm:permissions-header1 />
                       <vm:permissions-header2 />
                       <tr>
@@ -1641,7 +1936,7 @@
                     </table>
                   </td>
                 </tr>
-                <v:template name="tform_120" type="simple" enabled="-- case when (self.dav_category = '') then 1 else 0 end">
+                <v:template name="tform_120" type="simple" enabled="-- case when not length (self.dav_detClass) then 1 else 0 end">
                 <tr id="davRow_text">
                   <th>
                     <vm:label for="dav_index" value="--'Full Text Search'" />
@@ -1681,45 +1976,7 @@
                   </td>
                 </tr>
                 </v:template>
-                <v:template name="tform_16" type="simple" enabled="-- case when ((self.dav_type = 'C') and (self.dav_category = '') and isstring (DB.DBA.vad_check_version ('SyncML')) and ((self.command_mode = 0) or ((self.command_mode = 10) and (DB.DBA.yac_syncml_detect (self.dav_path) = 1)))) then 1 else 0 end">
-                  <tr>
-                    <th>SyncML version</th>
-                    <td>
-                    <select name="s_v">
-                      <?vsp
-                        declare aValues, aValue any;
-                        declare N integer;
-
-                        aValue := case when (self.command_mode = 0) then 'N' else DB.DBA.yac_syncml_version_get (self.dav_path) end;
-                        aValues := DB.DBA.yac_syncml_version ();
-                        for (N := 0; N < length (aValues); N := N + 2)
-                        {
-                          http(sprintf('<option value="%s" %s>%s</option>', aValues[N], select_if(aValue, aValues[N]), aValues[N+1]));
-                        }
-                      ?>
-                    </select>
-                    </td>
-                  </tr>
-                  <tr>
-                    <th>SyncML type</th>
-                    <td>
-                    <select name="s_t">
-                      <?vsp
-                        declare aValues, aValue any;
-                        declare N integer;
-
-                        aValue := case when (self.command_mode = 0) then 'N' else DB.DBA.yac_syncml_type_get (self.dav_path) end;
-                        aValues := DB.DBA.yac_syncml_type ();
-                        for (N := 0; N < length (aValues); N := N + 2)
-                        {
-                          http(sprintf('<option value="%s" %s>%s</option>', aValues[N], select_if (aValue, aValues[N]), aValues[N+1]));
-                        }
-                      ?>
-                    </select>
-                    </td>
-                  </tr>
-                </v:template>
-                <v:template name="tform_17" type="simple" enabled="-- case when ((self.dav_type = 'C') and (self.command_mode = 10)) then 1 else 0 end">
+                <v:template name="tform_16" type="simple" enabled="--case when ((self.dav_type = 'C') and (self.command_mode = 10) and not length (self.dav_detClass)) then 1 else 0 end">
                   <tr>
                     <th> </th>
                     <td>
@@ -1752,7 +2009,7 @@
                     </td>
                   </tr>
                 </v:template>
-                <v:template name="tform_19" type="simple" enabled="-- gte(self.command_mode, 10)">
+                <v:template name="tform_19" type="simple" enabled="-- case when gte(self.command_mode, 10) and not length (self.dav_detClass) then 1 else 0 end">
                   <tr>
                     <th valign="top">WebDAV Properties</th>
                     <td>
@@ -1764,14 +2021,13 @@
                         declare properties any;
 
                         properties := ODRIVE.WA.DAV_PROP_LIST (self.dav_path, '%', vector ('virt:%', 'http://www.openlinksw.com/schemas/%', 'http://local.virt/DAV-RDF%'));
-                          http (sprintf ('<input type="hidden" name="dav_propEnable" id="dav_propEnable" value="%d" />', self.dav_propEnable));
                       ?>
                             <table id="c_tbl" class="form-list" cellspacing="0">
                         <tr>
                                 <th width="50%">Property</th>
                                 <th width="50%">Value</th>
-                          <vm:if test="self.dav_propEnable">
-                            <th>&nbsp;</th>
+                                <vm:if test="self.fieldRights ('properties')">
+                                  <th>Action</th>
                           </vm:if>
                         </tr>
                           		  <![CDATA[
@@ -1783,7 +2039,7 @@
                                   for (N := 0; N < length (properties); N := N + 1)
                                   {
                                     M := M + 1;
-                                    if (self.dav_propEnable)
+                                    if (self.dav_enable or self.fieldRights ('sharing_acl'))
                                     {
                                       http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("c", null, {fld_1: {mode: 40, value: "%s", className: "_validate_", onbBlur: function(){validateField(this);}}, fld_2: {mode: 0, value: "%s"}});});', properties[N][0], properties[N][1]));
                                     } else {
@@ -1793,10 +2049,10 @@
                         ?>
                         		    </script>
                         		  ]]>
-                              <tr id="c_tr_no" style="display: <?V case when M=0 then '' else 'none' end ?>;"><td colspan="<?V case when self.dav_propEnable then 2 else 3 end ?>"><b>No Properties</b></td></tr>
+                              <tr id="c_tr_no" style="display: <?V case when M=0 then '' else 'none' end ?>;"><td colspan="<?V (2 + self.fieldRights ('properties')) ?>"><b>No Properties</b></td></tr>
                             </table>
                             </td>
-                            <vm:if test="self.dav_propEnable">
+                          <vm:if test="self.fieldRights ('properties')">
                             <td valign="top" nowrap="nowrap">
                               <span class="button pointer" onclick="javascript: TBL.createRow('c', null, {fld_1: {mode: 40, className: '_validate_', onblur: function(){validateField(this);}}, fld_2: {mode: 0}});"><img src="image/add_16.png" border="0" class="button" alt="Add Property" title="Add Property" /> Add</span><br /><br />
                               </td>
@@ -1811,14 +2067,15 @@
 
             <v:template name="tform_20" type="simple" enabled="-- gte(self.command_mode, 10)">
               <div id="2" class="tabContent">
+                <vm:if test='not isnull (ODS.ODS_API."server.getInfo"('sslPort')) and self.fieldRights ('sharing_acl')'>
                 <fieldset>
                   <legend><b>ODS users/groups</b></legend>
-                  <table>
+                    <table width="100%">
                     <tr>
                       <td width="100%">
                         <table id="s_tbl" class="form-list" style="width: 100%;"  cellspacing="0">
                   <tr>
-                            <th nowrap="nowrap">User/Group</th>
+                            <th nowrap="nowrap">User/Group (WebID)</th>
                             <th width="1%">Inheritance</th>
                             <th width="1%" align="center" nowrap="nowrap">Allow<br />(R)ead, (W)rite, e(X)ecute</th>
                             <th width="1%" align="center" nowrap="nowrap">Deny<br />(R)ead, (W)rite, e(X)ecute</th>
@@ -1839,9 +2096,9 @@
                       acl := acl_values[N];
                                 if (self.dav_enable and (acl[1] <> 3))
                                 {
-                                  http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("s", null, {fld_1: {mode: 1, value: "%s", form: "F1", formMode: "u", tdCssText: "white-space: nowrap;"}, fld_2: {mode: 43, value: %d, objectType: "%s"}, fld_3: {mode: 42, value: [%d, %d, %d], suffix: "_grant", onclick: function(){TBL.clickCell42(this);}, tdCssText: "width: 1%%; text-align: center;"}, fld_4: {mode: 42, value: [%d, %d, %d], suffix: "_deny", onclick: function(){TBL.clickCell42(this);}, tdCssText: "width: 1%%; text-align: center;"}});});', ODRIVE.WA.account_name (acl[0]), acl[1], self.dav_type, bit_and (acl[2], 4), bit_and (acl[2], 2), bit_and (acl[2], 1), bit_and (acl[3], 4), bit_and (acl[3], 2), bit_and (acl[3], 1)));
+                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("s", null, {fld_1: {mode: 51, value: "%s", formMode: "u", nrows: %d, tdCssText: "white-space: nowrap;", className: "_validate_"}, fld_2: {mode: 43, value: %d, tdCssText: "white-space: nowrap;", objectType: "%s"}, fld_3: {mode: 42, value: [%d, %d, %d], suffix: "_grant", onclick: function(){TBL.clickCell42(this);}, tdCssText: "width: 1%%; text-align: center;"}, fld_4: {mode: 42, value: [%d, %d, %d], suffix: "_deny", onclick: function(){TBL.clickCell42(this);}, tdCssText: "width: 1%%; text-align: center;"}});});', ODRIVE.WA.account_iri (acl[0]), ODRIVE.WA.settings_rows (self.settings), acl[1], self.dav_type, bit_and (acl[2], 4), bit_and (acl[2], 2), bit_and (acl[2], 1), bit_and (acl[3], 4), bit_and (acl[3], 2), bit_and (acl[3], 1)));
                                 } else {
-                                  http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createViewRow("s", {fld_1: {value: "%s"}, fld_2: {value: "%s"}, fld_3: {mode: 42, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}, fld_4: {mode: 42, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}});});', ODRIVE.WA.account_name (acl[0]), get_keyword (acl[1], V, ''), bit_and (acl[2], 4), bit_and (acl[2], 2), bit_and (acl[2], 1), bit_and (acl[3], 4), bit_and (acl[3], 2), bit_and (acl[3], 1)));
+                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createViewRow("s", {fld_1: {value: "%s"}, fld_2: {value: "%s", tdCssText: "white-space: nowrap;"}, fld_3: {mode: 42, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}, fld_4: {mode: 42, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}});});', ODRIVE.WA.account_iri (acl[0]), get_keyword (acl[1], V, ''), bit_and (acl[2], 4), bit_and (acl[2], 2), bit_and (acl[2], 1), bit_and (acl[3], 4), bit_and (acl[3], 2), bit_and (acl[3], 1)));
                                 }
                   }
                   ?>
@@ -1851,27 +2108,26 @@
                 </table>
                       </td>
                       <td valign="top" nowrap="nowrap">
-                        <vm:if test="self.dav_enable">
-                          <span class="button pointer" onclick="javascript: TBL.createRow('s', null, {fld_1: {mode: 1, form: 'F1', formMode: 'u', tdCssText: 'white-space: nowrap;'}, fld_2: {mode: 43, value: 1, objectType: '<?V self.dav_type ?>'}, fld_3: {mode: 42, value: [1, 1, 0], suffix: '_grant', onclick: function(){TBL.clickCell42(this);}, tdCssText: 'width: 1%; text-align: center;'}, fld_4: {mode: 42,  suffix: '_deny', onclick: function(){TBL.clickCell42(this);}, tdCssText: 'width: 1%; text-align: center;'}});"><img src="image/add_16.png" border="0" class="button" alt="Add Security" title="Add Security" /> Add</span><br /><br />
+                          <vm:if test="self.dav_enable or self.fieldRights ('sharing_acl')">
+                          <span class="button pointer" onclick="javascript: TBL.createRow('s', null, {fld_1: {mode: 51, formMode: 'u', nrows: <?V ODRIVE.WA.settings_rows (self.settings) ?>, tdCssText: 'white-space: nowrap;', className: '_validate_'}, fld_2: {mode: 43, value: 1, objectType: '<?V self.dav_type ?>'}, fld_3: {mode: 42, value: [1, 1, 0], suffix: '_grant', onclick: function(){TBL.clickCell42(this);}, tdCssText: 'width: 1%; text-align: center;'}, fld_4: {mode: 42,  suffix: '_deny', onclick: function(){TBL.clickCell42(this);}, tdCssText: 'width: 1%; text-align: center;'}});"><img src="image/add_16.png" border="0" class="button" alt="Add Security" title="Add Security" /> Add</span><br /><br />
                         </vm:if>
                       </td>
                     </tr>
                   </table>
                 </fieldset>
-                <vm:if test='not isnull (ODS.ODS_API."server.getInfo"('sslPort'))'>
+                </vm:if>
+                <vm:if test='not isnull (ODS.ODS_API."server.getInfo"('sslPort')) and self.fieldRights ('sharing_aci')'>
                   <fieldset>
                     <legend><b>WebID users</b></legend>
-                    <table>
+                    <table width="100%">
                       <tr>
                         <td width="100%">
                           <table id="f_tbl" class="form-list" style="width: 100%;" cellspacing="0">
                             <tr>
                               <th width="1%" nowrap="nowrap">Access Type</th>
                               <th nowrap="nowrap">WebID</th>
-                              <th width="1%" align="center" nowrap="nowrap">ACL: (R)ead, (W)rite</th>
-                              <vm:if test="self.dav_enable">
+                              <th width="1%" align="center" nowrap="nowrap">Allow<br />(R)ead, (W)rite, e(X)ecute</th>
                               <th width="1%" >Action</th>
-                              </vm:if>
                             </tr>
                         		  <![CDATA[
                         		    <script type="text/javascript">
@@ -1885,28 +2141,28 @@
                                   aci_values := ODRIVE.WA.aci_load (aci_parents[L]);
                                   for (N := 0; N < length (aci_values); N := N + 1)
                                   {
-                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createViewRow("f", {fld_1: {mode: 50, value: "%s"}, fld_2: {value: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}, fld_4: {value: "Inherited"}});});', aci_values[N][2], aci_values[N][1], aci_values[N][3], aci_values[N][4], aci_values[N][5]));
+                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createViewRow("f", {fld_1: {mode: 50, value: "%s"}, fld_2: {value: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], execute: true, tdCssText: "width: 1%%; text-align: center;"}, fld_4: {value: "Inherited"}});});', aci_values[N][2], aci_values[N][1], aci_values[N][3], aci_values[N][4], aci_values[N][5]));
                                   }
                                 }
                                 aci_values := ODRIVE.WA.aci_load (self.dav_path);
                                 for (N := 0; N < length (aci_values); N := N + 1)
                                 {
-                                  if (self.dav_enable)
+                                  if (self.dav_enable or self.fieldRights ('sharing_aci'))
                                   {
-                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("f", null, {fld_1: {mode: 50, value: "%s", onchange: function(){TBL.changeCell50(this);}}, fld_2: {mode: 51, form: "F1", tdCssText: "white-space: nowrap;", className: "_validate_ _webid_", value: "%s", readOnly: %s, imgCssText: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}});});', aci_values[N][2], aci_values[N][1], case when aci_values[N][2] = 'public' then 'true' else 'false' end, case when aci_values[N][2] = 'public' then 'display: none;' else '' end, aci_values[N][3], aci_values[N][4], aci_values[N][5]));
+                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("f", null, {fld_1: {mode: 50, value: "%s", onchange: function(){TBL.changeCell50(this);}}, fld_2: {mode: 51, value: "%s", tdCssText: "white-space: nowrap;", className: "_validate_ _webid_", readOnly: %s, imgCssText: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], execute: true, tdCssText: "width: 1%%; text-align: center;"}});});', aci_values[N][2], aci_values[N][1], case when aci_values[N][2] = 'public' then 'true' else 'false' end, case when aci_values[N][2] = 'public' then 'display: none;' else '' end, aci_values[N][3], aci_values[N][4], aci_values[N][5]));
                                   } else {
-                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createViewRow("f", {fld_1: {mode: 50, value: "%s"}, fld_2: {value: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}});});', aci_values[N][2], aci_values[N][1], aci_values[N][3], aci_values[N][4], aci_values[N][5]));
+                                    http (sprintf ('OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createViewRow("f", {fld_1: {mode: 50, value: "%s"}, fld_2: {value: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], execute: true, tdCssText: "width: 1%%; text-align: center;"}});});', aci_values[N][2], aci_values[N][1], aci_values[N][3], aci_values[N][4], aci_values[N][5]));
                                   }
                                   }
                         		    ?>
                         		    </script>
                         		  ]]>
-                            <tr id="f_tr_no"><td colspan="<?V case when self.dav_enable then 3 else 4 end ?>"><b>No WebID Security</b></td></tr>
+                            <tr id="f_tr_no"><td colspan="4"><b>No WebID Security</b></td></tr>
                           </table>
                         </td>
-                        <vm:if test="self.dav_enable">
+                        <vm:if test="self.dav_enable or self.fieldRights ('sharing_aci')">
                         <td valign="top" nowrap="nowrap">
-                            <span class="button pointer" onclick="javascript: TBL.createRow('f', null, {fld_1: {mode: 50, onchange: function(){TBL.changeCell50(this);}}, fld_2: {mode: 51, form: 'F1', tdCssText: 'white-space: nowrap;', className: '_validate_ _webid_'}, fld_3: {mode: 52, value: [1, 0, 0], tdCssText: 'width: 1%; text-align: center;'}});"><img src="image/add_16.png" border="0" class="button" alt="Add Security" title="Add Security" /> Add</span><br /><br />
+                            <span class="button pointer" onclick="javascript: TBL.createRow('f', null, {fld_1: {mode: 50, onchange: function(){TBL.changeCell50(this);}}, fld_2: {mode: 51, tdCssText: 'white-space: nowrap;', className: '_validate_ _webid_'}, fld_3: {mode: 52, value: [1, 0, 0], execute: true, tdCssText: 'width: 1%; text-align: center;'}});"><img src="image/add_16.png" border="0" class="button" alt="Add Security" title="Add Security" /> Add</span><br /><br />
                         </td>
                         </vm:if>
                       </tr>
@@ -1916,20 +2172,14 @@
               </div>
             </v:template>
 
-            <v:template name="tform_21" type="simple" enabled="-- case when (gte(self.command_mode, 10) and ODRIVE.WA.dav_rdf_has_metadata (self.dav_path)) then 1 else 0 end">
+            <v:template name="tform_21" type="simple" enabled="-- case when (gte(self.command_mode, 10) and self.fieldRights ('metadata')) then 1 else 0 end">
               <div id="3" class="tabContent" style="display: none;">
-                <table id="schema" class="OD_grid" cellspacing="0">
-                  <thead class="sortHeader">
+                <table id="schema" class="ODS_grid">
+                  <thead>
                     <tr>
-                      <th>
-                        Schema
-                      </th>
-                      <th>
-                        Property
-                      </th>
-                      <th>
-                        Value
-                      </th>
+                      <th>Schema</th>
+                      <th>Property</th>
+                      <th>Value</th>
                     </tr>
                   </thead>
                   <?vsp
@@ -2007,6 +2257,8 @@
               <vm:search-dc-template6 />
               <vm:search-dc-template7 />
               <vm:search-dc-template8 />
+              <vm:search-dc-template11 />
+              <vm:search-dc-template12 />
             </v:template>
             <v:template type="simple" enabled="-- equ(self.dav_type, 'R')">
               <vm:search-dc-template9 />
@@ -2015,7 +2267,7 @@
           </div>
         </div>
         <div class="new-form-footer">
-          <v:button action="simple" name="cCreate" value="--case when (self.command_mode >= 10) then 'Update' else case when (self.command_mode = 5) then 'Upload' else 'Create' end end" enabled="--self.dav_enable" xhtml_onclick="return validateInputs(this);"/>
+          <v:button action="simple" name="cCreate" value="--case when (self.command_mode >= 10) then 'Update' else case when (self.command_mode = 5) then 'Upload' else 'Create' end end" enabled="--case when (self.dav_enable or self.fieldRights ('sharing')) then 1 else 0 end" xhtml_onclick="return validateInputs(this);"/>
           <v:button action="simple" name="cCancel" value="Cancel" >
             <v:on-post>
               <![CDATA[
@@ -2030,7 +2282,7 @@
             if (document.F1.elements['dav_det'])
               updateLabel(document.F1.dav_det.options[document.F1.dav_det.selectedIndex].value);
             initDisabled();
-            initTab(10, 1);
+            initTab(11, 1);
           ]]>
         </script>
       </v:template>
@@ -2206,13 +2458,13 @@
                       ]]>
                     </v:after-data-bind>
                     <v:template name="ds_items_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                      <table id="dir" class="OD_grid colorise no-border" cellspacing="0">
-                        <thead class="sortHeader">
-                          <tr class="nocolor">
+                      <table id="dir" class="ODS_grid" style="border: 0px;">
+                        <thead>
+                          <tr>
                             <?vsp
                               if (self.dir_path <> '')
                               {
-                                http ('<th class="checkbox" width="1%">');
+                                http ('<th class="checkbox">');
                                   http ('<input type="checkbox" name="selectall" value="Select All" onclick="selectAllCheckboxes (this, \'cb_item\', true)" title="Select All" />');
                                 http ('</th>');
                               }
@@ -2228,9 +2480,7 @@
                               <?vsp self.showColumnHeader('column_#8'); ?>
                               <?vsp self.showColumnHeader('column_#9'); ?>
                             </vm:if>
-                            <th width="1%">
-                              Actions
-                            </th>
+                            <th class="action">Actions</th>
                           </tr>
                         </thead>
                       </table>
@@ -2274,7 +2524,7 @@
 
                               if (self.dir_path <> '')
                               {
-                                http (         '<td align="center">');
+                                http (         '<td class="checkbox">');
                                 if (rowset[8] not like '%,acl')
                                   http (sprintf ('  <input type="checkbox" name="cb_item" value="%s" onclick="selectCheck (this, \'cb_item\')"/>', rowset[8]));
                                 http (         '</td>');
@@ -2376,7 +2626,7 @@
                                 {
                                   http (sprintf( ' <img class="pointer" border="0" alt="Update Properties" title="Update Properties"" src="image/dav/item_prop.png" onclick="javascript: vspxPost(\'action\', \'_cmd\', \'update\', \'_path\', \'%s\');" />', replace (rowset[8], '\'', '\\\'')));
                                 }
-                                if ((__tag (DB.DBA.DAV_SEARCH_ID (rowset[8], 'R')) <> 193)
+                                if ((__tag (DB.DBA.DAV_SEARCH_ID (rowset[8], rowset[1])) <> 193)
                                     and (rowset[0] like '%.vsp'
 		                                  or rowset[0] like '%.vspx'
 		                                  or rowset[0] like '%.rdf'
@@ -2388,9 +2638,18 @@
 		                                  or rowset[0] like '%.htm'
 		                                  or rowset[0] like '%.sql'
 		                                  or rowset[0] like '%.ini'
-		                                  or rowset[4] like 'text/%'))
+		                                  or rowset[4] like 'text/%')
+		                               )
                                 {
-                                  http (sprintf( ' <img class="pointer" border="0" alt="Edit Content" title="Edit Content" src="image/dav/item_edit.png" onclick="javascript: ODRIVE.formShow(\'edit\', \'%s\')" />', replace (rowset[8], '\'', '\\\'')));
+                                  declare S varchar;
+
+
+		                              if (rowset[0] like '%,acl')
+		                              {
+                                    http (sprintf( ' <img class="pointer" border="0" alt="View Content" title="View Content" src="/ods/images/icons/docs_16.png" onclick="javascript: ODRIVE.formShow(\'view\', \'%s\')" />', replace (rowset[8], '\'', '\\\'')));
+                                  } else {
+                                    http (sprintf( ' <img class="pointer" border="0" alt="Edit Content" title="Edit Content" src="/ods/images/icons/edit_16.png" onclick="javascript: ODRIVE.formShow(\'edit\', \'%s\')" />', replace (rowset[8], '\'', '\\\'')));
+                                  }
                                 }
                               ?>
                           </td>
@@ -2402,11 +2661,6 @@
 
                     <v:template type="simple" name-to-remove="table" set-to-remove="top">
                       <table>
-                        <tr class="nocolor" align="center">
-                          <td colspan="11">
-                            <vm:ds-navigation data-set="ds_items" />
-                          </td>
-                        </tr>
                       </table>
                     </v:template>
 
diff --git a/appsrc/ODS-Briefcase/www/js/odrive.js b/appsrc/ODS-Briefcase/www/js/odrive.js
index 1dff572..8b66108 100644
--- a/appsrc/ODS-Briefcase/www/js/odrive.js
+++ b/appsrc/ODS-Briefcase/www/js/odrive.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: odrive.js,v 1.15.2.18 2010/10/07 13:23:47 source Exp $
+ *  $Id: odrive.js,v 1.15.2.24 2012/03/08 12:00:18 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -29,22 +29,61 @@ function setFooter() {
   }
 }
 
-function urlParam(fldName)
-{
+function destinationChange(obj, changes) {
+  function destinationChangeInternal(actions) {
+    if (actions.hide) {
+      var a = actions.hide;
+      for ( var i = 0; i < a.length; i++) {
+        var o = $(a[i])
+        if (o) {
+          OAT.Dom.hide(o);
+        }
+      }
+    }
+    if (actions.show) {
+      var a = actions.show;
+      for ( var i = 0; i < a.length; i++) {
+        var o = $(a[i])
+        if (o) {
+          OAT.Dom.show(o);
+        }
+      }
+    }
+    if (actions.clear) {
+      var a = actions.clear;
+      for ( var i = 0; i < a.length; i++) {
+        var o = $(a[i])
+        if (o && o.value) {
+          o.value = '';
+        }
+      }
+    }
+  }
+  if (!changes)
+    return;
+
+  if (obj.checked && changes.checked)
+    destinationChangeInternal(changes.checked);
+
+  if (!obj.checked && changes.unchecked)
+    destinationChangeInternal(changes.unchecked);
+}
+
+function urlParam(fldName) {
   var O = document.forms[0].elements[fldName];
   if (O && O.value != '')
     return '&' + fldName + '=' + encodeURIComponent(O.value);
   return '';
 }
 
-function myPost(frm_name, fld_name, fld_value)
-{
-  createHidden(frm_name, fld_name, fld_value);
-  document.forms[frm_name].submit();
+function myA(obj) {
+  if (obj.href) {
+    document.location = obj.href + '?' + urlParam('sid') + urlParam('realm');
+    return false;
+  }
 }
 
-function vspxPost(fButton, fName, fValue, f2Name, f2Value, f3Name, f3Value)
-{
+function vspxPost(fButton, fName, fValue, f2Name, f2Value, f3Name, f3Value) {
   if (fName)
     createHidden('F1', fName, fValue);
   if (f2Name)
@@ -54,10 +93,17 @@ function vspxPost(fButton, fName, fValue, f2Name, f2Value, f3Name, f3Value)
   doPost('F1', fButton);
 }
 
-function toolbarPost(fld_value)
-{
-  document.F1.toolbar_hidden.value = fld_value;
-  doPost ('F1', 'toolbar');
+function odsPost(obj, fields, button) {
+  var form = getParent (obj, 'form');
+  var formName = form.name;
+  for (var i = 0; i < fields.length; i += 2)
+    createHidden(formName, fields[i], fields[i+1]);
+
+  if (button) {
+    doPost(formName, button);
+  } else {
+    form.submit();
+  }
 }
 
 function dateFormat(date, format) {
@@ -157,16 +203,12 @@ function submitEnter(e, myForm, myButton, myAction)
   return true;
 }
 
-function checkNotEnter(e)
-{
+function checkNotEnter(e) {
   var key;
-
-  if (window.event)
-  {
+  if (window.event) {
     key = window.event.keyCode;
   } else {
-    if (e)
-    {
+    if (e) {
       key = e.which;
     } else {
       return true;
@@ -182,7 +224,7 @@ function selectAllCheckboxes (obj, prefix, toolbarsFlag) {
   for (var i = 0; i < objForm.elements.length; i++)
   {
     var o = objForm.elements[i];
-    if (o != null && o.type == "checkbox" && !o.disabled && o.name.indexOf (prefix) != -1)
+    if (o != null && o.type == "checkbox" && !o.disabled && o.name.indexOf (prefix) == 0)
     {
       o.checked = (obj.value == 'Select All');
       coloriseRow(getParent(o, 'tr'), o.checked);
@@ -229,7 +271,7 @@ function enableToolbars (objForm, prefix, doc)
   enableElement('tb_delete', 'tb_delete_gray', oCount>0, doc);
 
   enableElement('tb_tag', 'tb_tag_gray', tCount>0, doc);
-  enableElement('tb_properties', 'tb_properties_gray', oCount>0, doc);
+  enableElement('tb_properties', 'tb_properties_gray', oCount>1, doc);
 }
 
 function getParent (o, tag)
@@ -395,19 +437,23 @@ function chkbx(bx1, bx2)
 
 function updateLabel(value)
 {
-  hideLabel(4, 10);
+  hideLabel(4, 11);
   if (value == 'oMail')
     showLabel(4, 4);
-  if (value == 'PropFilter')
+  else if (value == 'PropFilter')
     showLabel(5, 5);
-  if (value == 'S3')
+  else if (value == 'S3')
     showLabel(6, 6);
-  if (value == 'ResFilter')
+  else if (value == 'ResFilter')
     showLabel(7, 7);
-  if (value == 'CatFilter')
+  else if (value == 'CatFilter')
     showLabel(7, 7);
-  if (value == 'rdfSink')
+  else if (value == 'rdfSink')
     showLabel(8, 8);
+  else if (value == 'SyncML')
+    showLabel(10, 10);
+  else if (value == 'IMAP')
+    showLabel(11, 11);
 }
 
 function showLabel(from, to)
@@ -480,13 +526,11 @@ function initDisabled()
 }
 }
 
-function deleteConfirm()
-{
+function deleteConfirm() {
   return confirm('Are you sure you want to delete the chosen record?');
 }
 
-function deprecateConfirm()
-{
+function deprecateConfirm() {
   return confirm('Are you sure you want to deprecate the chosen record?');
 }
 
@@ -496,28 +540,30 @@ function confirmAction(confirmMsq, form, txt, selectionMsq) {
   return false;
 }
 
-function webidShow(obj, width, height)
-{
+function webidShow(obj) {
   var S = 'p';
   if (obj.id.replace('fld_2', 'fld_1') != obj.id)
     S = $v(obj.id.replace('fld_2', 'fld_1'));
 
-  windowShow('/ods/webid_select.vspx?form=F1&mode='+S.charAt(0)+'&params='+obj.id+':s1;', width, height);
+  windowShow('/ods/webid_select.vspx?mode='+S.charAt(0)+'&params='+obj.id+':s1;');
 }
 
-function windowShow(sPage, width, height)
-{
-  if (!width)
+function windowShow(sPage, sPageName, width, height) {
+	if (width == null)
     width = 700;
-  if (!height)
-    height = 420;
-  sPage += '&sid=' + document.forms[0].elements['sid'].value + '&realm=' + document.forms[0].elements['realm'].value;
-  win = window.open(sPage, null, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
+	if (height == null)
+		height = 500;
+  if (sPage.indexOf('form=') == -1)
+    sPage += '&form=F1';
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
 
-function renameShow(myForm, myPrefix, myPage, width, height)
-{
+function renameShow(myForm, myPrefix, myPage, width, height) {
   var myFiles = getSelected (myForm, myPrefix);
   if (myFiles != '')
     windowShow(myPage + myFiles, width, height);
@@ -538,9 +584,10 @@ function mailShow(myForm, myPrefix, myPage, width, height)
 }
 
 function coloriseRow(obj, checked) {
-  obj.className = (obj.className).replace('tr_select', '');
   if (checked)
-    obj.className = obj.className + ' ' + 'tr_select';
+    OAT.Dom.addClass(obj, 'selected');
+  else
+    OAT.Dom.removeClass(obj, 'selected');
 }
 
 function coloriseTable(id)
@@ -761,8 +808,9 @@ function hideCell(cell)
 
 function toggleDavRows()
 {
-  if (document.forms['F1'].elements['dav_destination'])
-  {
+  if (!document.forms['F1'].elements['dav_destination'])
+    return;
+
     if (document.forms['F1'].elements['dav_destination'][0].checked == '1')
     {
       showTableRow('davRow_mime');
@@ -775,14 +823,13 @@ function toggleDavRows()
       showTableRow('davRow_tagsPublic');
       showTableRow('davRow_tagsPrivate');
 
-      showTableRow('rdf_store');
-
+    showCell('dav_source_2');
       showCell('label_dav');
       hideCell('label_dav_rdf');
       showCell('dav_name');
       hideCell('dav_name_rdf');
     }
-    if (document.forms['F1'].elements['dav_destination'][1].checked == '1')
+  else if (document.forms['F1'].elements['dav_destination'][1].checked == '1')
     {
       hideCell('davRow_tagsPrivate');
       hideCell('davRow_tagsPublic');
@@ -793,9 +840,11 @@ function toggleDavRows()
       hideCell('davRow_owner');
       hideCell('davRow_version');
       hideCell('davRow_mime');
+    if ($('dav_content_plain'))
+      showCell('davRow_mime');
 
-      hideCell('rdf_store');
-      if (document.forms['F1'].elements['dav_source'][2].checked == '1')
+    hideCell('dav_source_2');
+    if (document.forms['F1'].elements['dav_source'] && (document.forms['F1'].elements['dav_source'][2].checked == '1'))
         document.forms['F1'].elements['dav_source'][0].checked = '1';
 
       hideCell('label_dav');
@@ -803,6 +852,34 @@ function toggleDavRows()
       hideCell('dav_name');
       showCell('dav_name_rdf');
     }
+  toggleDavSource();
+}
+
+function toggleDavSource()
+{
+  if (!document.forms['F1'].elements['dav_source'])
+    return;
+
+  if (document.forms['F1'].elements['dav_source'][0].checked == '1')
+  {
+    $('dav_file_label').innerHTML = 'File';
+    showCell('dav_file');
+    hideCell('dav_url');
+    hideCell('dav_rdf');
+  }
+  else if (document.forms['F1'].elements['dav_source'][1].checked == '1')
+  {
+    $('dav_file_label').innerHTML = 'URL';
+    hideCell('dav_file');
+    showCell('dav_url');
+    hideCell('dav_rdf');
+  }
+  else if (document.forms['F1'].elements['dav_source'][2].checked == '1')
+  {
+    $('dav_file_label').innerHTML = 'Quad Store Named Graph IRI';
+    hideCell('dav_file');
+    hideCell('dav_url');
+    showCell('dav_rdf');
   }
 }
 
@@ -810,7 +887,8 @@ var ODRIVE = new Object();
 
 ODRIVE.forms = new Object();
 ODRIVE.forms['properties'] = {params: {items: true}, width: '900', height: '700', postActions:['ODRIVE.formSubmit()', 'ODRIVE.resetToolbars()']};
-ODRIVE.forms['edit'] = {params: {items: true}, height: '430'};
+ODRIVE.forms['edit'] = {params: {items: true}, height: '430', postActions:['ODRIVE.formSubmit()']};
+ODRIVE.forms['view'] = {params: {items: true}, height: '430'};
 ODRIVE.forms['copy'] = {params: {items: true}, height: '380', postActions:['ODRIVE.formSubmit()', 'ODRIVE.resetToolbars()']};
 ODRIVE.forms['move'] = {params: {items: true}, height: '380', postActions:['ODRIVE.formSubmit()', 'ODRIVE.resetToolbars()']};
 ODRIVE.forms['tags'] = {params: {items: true}, height: '360', postActions:['ODRIVE.formSubmit()', 'ODRIVE.resetToolbars()']};
@@ -972,6 +1050,10 @@ ODRIVE.resetToolbars = function ()
 
 ODRIVE.formShow = function (action, id, params)
 {
+  var cmd = $('_cmd');
+  if (cmd)
+   cmd.value = '';
+
   var formParams = action.split('/')[0].toLowerCase();
   var form = ODRIVE.forms[formParams];
   if (form)
@@ -1387,24 +1469,35 @@ ODRIVE.searchGetPredicate = function (No)
 
 ODRIVE.searchGetCompares = function (predicate)
 {
-  if (predicate)
-  {}
+  if (predicate) {}
   return null;
 }
 
 ODRIVE.davFolderSelect = function (fld)
 {
-  var options = { mode: 'browser',
+	/* load stylesheets */
+	OAT.Style.include("grid.css");
+	OAT.Style.include("webdav.css");
+
+  var options = {
+    mode: 'browser',
                   onConfirmClick: function(path) {$(fld).value = '/DAV' + path;}
                 };
+  OAT.WebDav.options.foldersOnly = true;
   OAT.WebDav.open(options);
 }
 
 ODRIVE.davFileSelect = function (fld)
 {
-  var options = { mode: 'browser',
-                  onConfirmClick: function(path, fname) {$(fld).value = path + fname;}
+	/* load stylesheets */
+	OAT.Style.include("grid.css");
+	OAT.Style.include("webdav.css");
+
+  var options = {
+    mode: 'browser',
+    onConfirmClick: function(path, fname) {$(fld).value = '/DAV' + path + fname;}
                 };
+  OAT.WebDav.options.foldersOnly = false;
   OAT.WebDav.open(options);
 }
 
@@ -1425,8 +1518,10 @@ ODRIVE.coloriseTables = function ()
 ODRIVE.aboutDialog = function ()
 {
   var aboutDiv = $('aboutDiv');
-  if (aboutDiv) {OAT.Dom.unlink(aboutDiv);}
-  aboutDiv = OAT.Dom.create('div', {width:'430px', height:'150px'});
+  if (aboutDiv)
+    OAT.Dom.unlink(aboutDiv);
+
+  aboutDiv = OAT.Dom.create('div', {height: '160px', overflow: 'hidden'});
   aboutDiv.id = 'aboutDiv';
   aboutDialog = new OAT.Dialog('About ODS Briefcase', aboutDiv, {width:445, buttons: 0, resize:0, modal:1});
 	aboutDialog.cancel = aboutDialog.hide;
@@ -1475,3 +1570,14 @@ ODRIVE.toggleEditor = function ()
     $('dav_content_plain').value = $v('dav_content_html');
   }
 }
+
+ODRIVE.updateRdfGraph = function ()
+{
+  if (
+      ($v('dav_rdfSink_rdfGraph') == '') ||
+      ($v('dav_rdfSink_rdfGraph') == ($v('rdfGraph_prefix')+$v('dav_name_save')+'#this'))
+     )
+    $('dav_rdfSink_rdfGraph').value = $v('rdfGraph_prefix') + $v('dav_name') + '#this';
+
+  $('dav_name_save').value = $v('dav_name');
+}
\ No newline at end of file
diff --git a/appsrc/ODS-Briefcase/www/js/tbl.js b/appsrc/ODS-Briefcase/www/js/tbl.js
index 6bda4f5..ab4ac6f 100644
--- a/appsrc/ODS-Briefcase/www/js/tbl.js
+++ b/appsrc/ODS-Briefcase/www/js/tbl.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -78,9 +78,7 @@ TBL.createCell42 = function (td, prefix, fldName, No, fldOptions, disabled)
 
 TBL.createCell43 = function (td, prefix, fldName, No, fldOptions)
 {
-	var fld = OAT.Dom.create("select");
-	fld.name = fldName;
-	fld.id = fldName;
+  var fld = TBL.createCellSelect(fldName, fldOptions);
 	TBL.selectOption(fld, fldOptions.value, 'This object only', 0);
 	if (fldOptions.objectType == 'C') {
 	TBL.selectOption(fld, fldOptions.value, 'This object, subfolders and files', 1);
@@ -109,3 +107,53 @@ TBL.clickCell42 = function (fld)
   }
   $(fldName).checked = false;
 }
+
+var Cartridges;
+TBL.createCell45 = function (td, prefix, fldName, No, fldOptions)
+{
+  var fld = TBL.createCellSelect(fldName, fldOptions);
+  if (Cartridges) {
+    TBL.createCell45Options(fld, fldOptions.value);
+  } else {
+    var x = function (data) {
+      try {
+        Cartridges = OAT.JSON.parse(data);
+        TBL.createCell45Options(fld, fldOptions.value);
+      } catch (e) {Cartridges = null;}
+    }
+    OAT.AJAX.GET('ajax.vsp?a=cartridges', '', x);
+  }
+  td.appendChild(fld);
+  return fld;
+}
+
+TBL.createCell45Options = function (fld, fldValue)
+{
+  for (var i = 0; i < Cartridges.length; i++)
+    TBL.selectOption(fld, fldValue, Cartridges[i][1], Cartridges[i][0]);
+}
+
+var MetaCartridges;
+TBL.createCell46 = function (td, prefix, fldName, No, fldOptions)
+{
+  var fld = TBL.createCellSelect(fldName, fldOptions);
+  if (MetaCartridges) {
+    TBL.createCell46Options(fld, fldOptions.value);
+  } else {
+    var x = function (data) {
+      try {
+        MetaCartridges = OAT.JSON.parse(data);
+        TBL.createCell46Options(fld, fldOptions.value);
+      } catch (e) {MetaCartridges = null;}
+    }
+    OAT.AJAX.GET('ajax.vsp?a=metaCartridges', '', x);
+  }
+  td.appendChild(fld);
+  return fld;
+}
+
+TBL.createCell46Options = function (fld, fldValue)
+{
+  for (var i = 0; i < MetaCartridges.length; i++)
+    TBL.selectOption(fld, fldValue, MetaCartridges[i][1], MetaCartridges[i][0]);
+}
diff --git a/appsrc/ODS-Briefcase/www/mimes.vspx b/appsrc/ODS-Briefcase/www/mimes.vspx
index 3b00563..0f9675e 100644
--- a/appsrc/ODS-Briefcase/www/mimes.vspx
+++ b/appsrc/ODS-Briefcase/www/mimes.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mimes.vspx,v 1.8.2.4 2010/10/13 12:15:01 source Exp $
+ -  $Id: mimes.vspx,v 1.8.2.6 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -74,6 +74,9 @@
             control.ds_nrows := ODRIVE.WA.settings_rows (self.settings);
             ]]>
           </v:before-data-bind>
+          <v:after-data-bind>
+            control.ds_make_statistic ();
+          </v:after-data-bind>
         </v:data-source>
         <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
           <div style="padding: 0 0 0.5em 0;">
@@ -114,16 +117,16 @@
           </div>
 
           <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="mimes" class="OD_grid colorise" cellspacing="0">
-              <thead class="sortHeader">
+            <table class="ODS_grid">
+              <thead>
                 <tr>
-                  <th class="checkbox" width="1%">
+                  <th class="checkbox">
                     <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                   </th>
                   <?vsp http (ODRIVE.WA.show_column_header ('MIME Type', 'MT_IDENT', self.mimes_order, self.mimes_direction)); ?>
                   <?vsp http (ODRIVE.WA.show_column_header ('File Extension', 'MT_DEFAULT_EXT', self.mimes_order, self.mimes_direction)); ?>
                   <?vsp http (ODRIVE.WA.show_column_header ('Description', 'MT_DESCRIPTION', self.mimes_order, self.mimes_direction)); ?>
-                  <th width="1%">
+                  <th class="action">
                     Actions
                   </th>
                 </tr>
@@ -135,7 +138,7 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
+                <tr>
                   <td colspan="5">No MIME types</td>
                 </tr>
               </table>
@@ -144,12 +147,10 @@
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
               <table>
                 <tr>
-                  <td align="center" valign="top">
+                  <td class="checkbox">
                     <?vsp
                       if (self.v_right = 'W')
-                      {
                         http (sprintf ('<input type="checkbox" name="cb_item" value="%s" onclick="selectCheck(this, \'cb_item\')" />', (control as vspx_row_template).te_column_value('MT_IDENT')));
-                      }
                     ?>
                   </td>
                   <td nowrap="nowrap">
@@ -161,7 +162,7 @@
                   <td nowrap="nowrap">
                     <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('MT_DESCRIPTION')" format="%s"/>
                   </td>
-                  <td nowrap="nowrap">
+                  <td class="action">
                     <v:button value="-- case when neq(self.v_right, 'W') then 'View' else 'Edit' end" action="simple" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -188,11 +189,13 @@
 
           <v:template type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <tr align="center">
-                <td colspan="4">
+              <tfoot>
+                <tr>
+                  <td align="right" colspan="5">
                   <vm:ds-navigation data-set="ds"/>
                 </td>
               </tr>
+              </tfoot>
             </table>
           </v:template>
 
diff --git a/appsrc/ODS-Briefcase/www/mimes_select.vspx b/appsrc/ODS-Briefcase/www/mimes_select.vspx
index 3968ad7..4f4278a 100644
--- a/appsrc/ODS-Briefcase/www/mimes_select.vspx
+++ b/appsrc/ODS-Briefcase/www/mimes_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mimes_select.vspx,v 1.8.2.2 2010/09/20 10:15:00 source Exp $
+ -  $Id: mimes_select.vspx,v 1.8.2.4 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  -
 -->
-<v:page name="users_select" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<v:page name="mimes_select" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
@@ -108,14 +108,12 @@
         </v:data-source>
         <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
           <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="mimes" class="OD_grid colorise" cellspacing="0">
-              <thead class="sortHeader">
+            <table class="ODS_grid">
+              <thead>
                 <tr>
                   <?vsp http (ODRIVE.WA.show_column_header ('MIME Type', 'T_TYPE', self.v_order, self.v_direction)); ?>
                   <?vsp http (ODRIVE.WA.show_column_header ('File Extension', 'T_EXT', self.v_order, self.v_direction)); ?>
-                  <th width="1%">
-                    Action
-                  </th>
+                  <th class="action">Action</th>
                 </tr>
               </thead>
             </table>
@@ -125,7 +123,7 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
+                <tr>
                   <td colspan="3">No mime types</td>
                 </tr>
               </table>
@@ -140,7 +138,7 @@
                   <td nowrap="nowrap">
                     <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('T_EXT')" format="%s"/>
                   </td>
-                  <td nowrap="nowrap">
+                  <td class="action">
                     <v:text name="s1" type="hidden" value="--(control.vc_parent as vspx_row_template).te_column_value('T_TYPE')"/>
                     <v:text name="s2" type="hidden" value="--(control.vc_parent as vspx_row_template).te_column_value('T_EXT')"/>
                     <v:button name="b1" action="simple" value="select" xhtml_alt="Select" xhtml_onClick="javascript: rowSelect(this); return false;" xhtml_class="button"/>
@@ -153,11 +151,13 @@
 
           <v:template type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <tr align="center">
+              <tfoot>
+                <tr align="right">
                 <td colspan="3">
                   <vm:ds-navigation data-set="ds"/>
                 </td>
               </tr>
+              </tfoot>
             </table>
           </v:template>
 
diff --git a/appsrc/ODS-Briefcase/www/odrive_login.vspx b/appsrc/ODS-Briefcase/www/odrive_login.vspx
index 4ad4f24..33108da 100644
--- a/appsrc/ODS-Briefcase/www/odrive_login.vspx
+++ b/appsrc/ODS-Briefcase/www/odrive_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: odrive_login.vspx,v 1.6.2.8 2010/10/07 13:23:47 source Exp $
+ -  $Id: odrive_login.vspx,v 1.6.2.10 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -44,6 +44,11 @@
       params := self.vc_page.vc_event.ve_params;
         domain_id := ODRIVE.WA.session_domain (params);
       path := rtrim (case when (domain_id <> -1) then ODRIVE.WA.iri_fix (ODRIVE.WA.forum_iri (domain_id)) else HTTP_REQUESTED_URL() end, '/');
+      if ((page_name = 'home.vspx') and (get_keyword ('id', params, '') <> '') and (lcase (get_keyword ('what', params)) = 'c') and (domain_id <> -1))
+      {
+        self.vc_redirect (sprintf ('%s/home.vspx?dir=%U', path, DB.DBA.DAV_SEARCH_PATH (atoi(get_keyword ('id', params)), 'C')));
+        return;
+      }
       if ((page_name = 'home.vspx') and (get_keyword ('id', params, '') <> '') and (domain_id <> -1))
       {
         self.vc_redirect (sprintf ('%s/view.vsp?file=%U&mode=download', path, DB.DBA.DAV_SEARCH_PATH (atoi(get_keyword ('id', params)), 'R')));
diff --git a/appsrc/ODS-Briefcase/www/settings.vspx b/appsrc/ODS-Briefcase/www/settings.vspx
index ff1d596..f6fcd2a 100644
--- a/appsrc/ODS-Briefcase/www/settings.vspx
+++ b/appsrc/ODS-Briefcase/www/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: settings.vspx,v 1.11.2.6 2010/10/13 12:15:01 source Exp $
+ -  $Id: settings.vspx,v 1.11.2.8 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -96,9 +96,9 @@
               <v:text name="tabNo" xhtml_id="tabNo" type="hidden" value="--self.v_tabNo"/>
         <div id="c1">
           <div class="tabs">
-          <vm:tabCaption tab="1" tabs="3" caption="Main"/> 
-          <vm:tabCaption tab="2" tabs="3" caption="Grid"/> 
-          <vm:tabCaption tab="3" tabs="3" caption="Mail Settings"/> 
+                  <vm:tabCaption tab="1" tabs="3" caption="Main"/>&nbsp;
+                  <vm:tabCaption tab="2" tabs="3" caption="Grid"/>&nbsp;
+                  <vm:tabCaption tab="3" tabs="3" caption="Mail Settings"/>&nbsp;
           </div>
           <div class="contents">
             <div id="1" class="tabContent" style="display: none;">
@@ -114,7 +114,7 @@
                     S := case when (ODRIVE.WA.settings_chars (self.settings) = 0) then 'checked="checked"' else '' end;
                     http(sprintf('<input type="radio" name="r_chars" id="r_chars_0" value="0" %s />', S));
                   ?>
-                  <xsl:call-template name="nbsp"/><vm:label for="r_chars_0" value="--'show everything'" />
+                          &nbsp;<vm:label for="r_chars_0" value="--'show everything'" />
                   </td>
                 </tr>
                 <tr>
@@ -126,9 +126,9 @@
                     S := case when (ODRIVE.WA.settings_chars (self.settings) <> 0) then 'checked="checked"' else '' end;
                     http(sprintf('<input type="radio" name="r_chars" id="r_chars_1" value="1" %s />', S));
                   ?>
-                  <xsl:call-template name="nbsp"/><vm:label for="r_chars_1" value="--'show no more than'" /><xsl:call-template name="nbsp"/>
+                          &nbsp;<vm:label for="r_chars_1" value="--'show no more than'" />&nbsp;
                   <v:text name="f_chars" null-value="--''" value="--ODRIVE.WA.settings_chars (self.settings)" xhtml_size="3"/>
-                  <xsl:call-template name="nbsp"/><vm:label for="r_chars_1" value="--'characters'" /><xsl:call-template name="nbsp"/>
+                          &nbsp;<vm:label for="r_chars_1" value="--'characters'" />&nbsp;
                   </td>
                 </tr>
                 <tr>
@@ -300,11 +300,12 @@
         	    ]]>
         	  </v:on-post>
           </v:button>
-                <v:button action="simple" value="Clear" xhtml_class="form-button">
+                <v:button action="simple" value="Clear" xhtml_onclick="javascript: return confirm (\'Do you want to reset settings to default?\');" xhtml_class="form-button">
             <v:on-post>
               <![CDATA[
                       delete from ODRIVE.WA.SETTINGS where USER_ID = self.account_id;
-                      self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), ODRIVE.WA.settings (self.account_id));
+                      self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), BMK.WA.settings (self.domain_id));
+
                       self.vc_data_bind(e);
         	    ]]>
         	  </v:on-post>
diff --git a/appsrc/ODS-Briefcase/www/subscriptions.vspx b/appsrc/ODS-Briefcase/www/subscriptions.vspx
index 589c914..641bb49 100644
--- a/appsrc/ODS-Briefcase/www/subscriptions.vspx
+++ b/appsrc/ODS-Briefcase/www/subscriptions.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: subscriptions.vspx,v 1.5.2.3 2010/10/13 12:15:01 source Exp $
+ -  $Id: subscriptions.vspx,v 1.5.2.5 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -136,14 +136,14 @@
           <v:param name="instance" value="--self.domain_id" />
 
           <v:template name="ds_header_template" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="groups" class="OD_grid" cellspacing="0">
-              <thead class="sortHeader">
+            <table class="ODS_grid">
+              <thead>
                 <tr>
                   <th>Description</th>
                   <th>Host</th>
                   <th>Start Path</th>
                   <th>Target Collection</th>
-                  <th nowrap="nowrap" width="1%">Action</th>
+                  <th class="action">Action</th>
                 </tr>
               </thead>
             </table>
@@ -152,8 +152,8 @@
           <v:template name="ds_repeat_template" type="repeat" name-to-remove="" set-to-remove="">
             <v:template name="ds_if_not_exists_template" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr class="listing_count">
-                  <td align="center" colspan="5" class="listing_row_count">
+                <tr>
+                  <td colspan="5">
                     No rows retrieved
                   </td>
                 </tr>
@@ -175,7 +175,7 @@
                   <td>
                     <v:label format="%s" value="--((control.vc_parent as vspx_row_template).te_rowset[3])" />
                   </td>
-                  <td nowrap="nowrap" width="1%">
+                  <td class="action">
                     <v:button action="simple" value="Edit" name="edit1" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -347,7 +347,7 @@
                   </v:after-data-bind>
                 </v:text>
                 <vm:if test="ODRIVE.WA.check_admin (self.account_id)">
-                  <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?form=F1&mode=u&params=owner:s1;')" class="button" />
+                  <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=u&params=owner:s1;&nrows=<?V ODRIVE.WA.settings_rows (self.settings) ?>')" class="button" />
                 </vm:if>
               </td>
             </tr>
@@ -432,7 +432,7 @@
               <td colspan="2">
                 <div  id="meta_opts" style="display: <?V case when self.v_get_rdf = 0 then 'none' else 'block' end ?>;">
                   <table class="listing">
-                    <thead class="sortHeader">
+                    <thead>
                       <tr>
                         <th class="checkbox" style="text-align: left;">
                           <label>
@@ -673,15 +673,15 @@
           <v:param name="instance" value="--self.domain_id" />
 
           <v:template name="data_set2_header_template" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="groups" class="OD_grid" cellspacing="0">
-              <thead class="sortHeader">
+            <table class="ODS_grid">
+              <thead>
                 <tr>
                   <th>Description</th>
                   <th>Host</th>
                   <th>URL</th>
                   <th>Target Collection</th>
                   <th>State</th>
-                  <th nowrap="nowrap" width="1%">Action</th>
+                  <th class="action">Action</th>
                 </tr>
               </thead>
             </table>
@@ -691,8 +691,8 @@
 
             <v:template name="data_set2_if_not_exists_template" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr class="listing_count">
-                  <td class="listing_row_count" colspan="6">
+                <tr>
+                  <td colspan="6">
                     No rows retrieved
                   </td>
                 </tr>
@@ -717,7 +717,7 @@
                   <td>
                     <v:label format="%s" value="--((control.vc_parent as vspx_row_template).te_rowset[2])" />
                   </td>
-                  <td nowrap="nowrap" width="1%">
+                  <td class="action">
                     <v:button action="simple" value="Start" name="start" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -841,14 +841,14 @@
           <v:param name="instance" value="--self.domain_id" />
 
           <v:template name="ds3_header_template" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="groups" class="OD_grid" cellspacing="0">
-              <thead class="sortHeader">
+            <table class="ODS_grid">
+              <thead>
                 <tr>
                   <th>Description</th>
                   <th>Start on</th>
                   <th>Interval (minutes)</th>
                   <th>Last executed</th>
-                  <th nowrap="nowrap" width="1%">Action</th>
+                  <th class="action">Action</th>
                 </tr>
               </thead>
             </table>
@@ -859,7 +859,7 @@
             <v:template name="ds3_if_not_exists_template" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
                 <tr>
-                  <td class="listing_count" colspan="5">
+                  <td colspan="5">
                     No rows retrieved
                   </td>
                 </tr>
@@ -881,7 +881,7 @@
                   <td>
                     <v:label format="%s" value="--(control.vc_parent as vspx_row_template).te_rowset[3]"  fmt-function="date_fmt"/>
                   </td>
-                  <td nowrap="nowrap" width="1%">
+                  <td class="action">
                     <v:button action="simple" value="Edit" name="edit3" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -914,13 +914,16 @@
 
           <v:template name="ds3_footer_template" type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <tr class="browse_button_row">
+              <tfoot>
+                <tr align="right">
                 <td colspan="5" align="center">
                   <vm:ds-navigation data-set="ds3"/>
                 </td>
               </tr>
+              </tfoot>
             </table>
           </v:template>
+
         </v:data-set>
       </vm:if>
 
@@ -1169,15 +1172,15 @@
           <v:param name="instance" value="--self.domain_id" />
 
           <v:template name="ds4_header_template" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="groups" class="OD_grid" cellspacing="0">
-              <thead class="sortHeader">
+            <table class="ODS_grid">
+              <thead>
                 <tr>
                   <th>Description</th>
                   <th>Host</th>
                   <th>URL</th>
                   <th>Collection</th>
                   <th nowrap="nowrap" width="1%">Total pages</th>
-                  <th nowrap="nowrap" width="1%">Action</th>
+                  <th class="action">Action</th>
                 </tr>
               </thead>
             </table>
@@ -1188,7 +1191,7 @@
             <v:template name="ds4_if_not_exists_template" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
                 <tr>
-                  <td class="listing_count" colspan="6">
+                  <td colspan="6">
                     No rows retrieved
                   </td>
                 </tr>
@@ -1213,7 +1216,7 @@
                   <td nowrap="nowrap" width="1%" align="right">
                     <?V (select count (*) from WS.WS.VFS_URL where VU_HOST = (control as vspx_row_template).te_rowset[1] and VU_ROOT = (control as vspx_row_template).te_rowset[3]) ?>
                   </td>
-                  <td nowrap="nowrap" width="1%">
+                  <td class="action">
                     <v:button action="simple" value="Edit" name="edit4" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -1254,13 +1257,13 @@
       <vm:if test="self.v_mode = 'retrievedEdit'">
         <h3>Current downloads for <?V self.v_host ?></h3>
         <hr />
-        <table id="groups" class="OD_grid" cellspacing="0">
-          <thead class="sortHeader">
+        <table class="ODS_grid">
+          <thead>
             <tr>
               <th>URL</th>
               <th>Etag</th>
               <th>Retrieved</th>
-              <th nowrap="nowrap" width="1%">Action</th>
+              <th class="action">Action</th>
             </tr>
           </thead>
           <v:data-set name="data_set1" sql=" select VU_URL, VU_ETAG, VU_CPTIME from WS.WS.VFS_URL where VU_HOST = :ehost and VU_ROOT = :eroot" nrows="0" scrollable="1" cursor-type="keyset" edit="0">
@@ -1278,7 +1281,7 @@
               </v:template>
 
               <v:template name="tmpl2" type="browse">
-                <tr class="<?V case when mod(control.te_ctr, 2) then 'listing_row_odd' else 'listing_row_even' end ?>">
+                <tr>
                   <td>
                     <?V control.te_rowset[0] ?>
                   </td>
@@ -1288,7 +1291,7 @@
                   <td>
                     <?V subseq(cast (control.te_rowset[2] as varchar),0, 19) ?>
                   </td>
-                  <td nowrap="nowrap" width="1%">
+                  <td class="action">
                     <v:button action="simple" value="Delete" name="delete4" xhtml_onclick="javascript: return deleteConfirm();" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
diff --git a/appsrc/ODS-Briefcase/www/template/popup.vspx b/appsrc/ODS-Briefcase/www/template/popup.vspx
index feafd7c..cb61559 100644
--- a/appsrc/ODS-Briefcase/www/template/popup.vspx
+++ b/appsrc/ODS-Briefcase/www/template/popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: popup.vspx,v 1.4.2.4 2010/10/13 12:15:01 source Exp $
+  -  $Id: popup.vspx,v 1.4.2.9 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <html xmlns:v="http://www.openlinksw.com/vspx/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
   <head profile="http://internetalchemy.org/2003/02/profile">
+    <base href="<?V ODRIVE.WA.host_url () || http_path () ?>" /><![CDATA[<!--[if IE]></base><![endif]-->]]>
+    <?vsp
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
+    ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
@@ -35,32 +42,28 @@
         OAT.Preferences.showAjax = false;
       </script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="js/odrive.js"></script>
       <script type="text/javascript" src="js/tbl.js"></script>
       <script type="text/javascript">
-        function myInit()
-        {
-          OAT.Preferences.imagePath = '/ods/images/oat/';
-          OAT.Preferences.stylePath = '/ods/oat/styles/';
-          OAT.Preferences.showAjax = false;
-
-          ODRIVE.coloriseTables();
-        }
-        OAT.MSG.attach(OAT, 'PAGE_LOADED', myInit);
         window.onload = function(){OAT.MSG.send(OAT, 'PAGE_LOADED');};
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
+      		}
+      	}
       </script>
     ]]>
     <title></title>
   </head>
   <body>
     <v:page xmlns:v="http://www.openlinksw.com/vspx/">
-      <vm:variables>
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_role" type="varchar" default="'public'"/>
         <v:variable persist="0" name="accountName" type="varchar" default="'Public User'"/>
         <v:variable persist="0" name="settings" type="any" />
-      </vm:variables>
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -74,7 +77,7 @@
           self.account_id := cast (get_keyword ('user_id', aSessInfo, '-1') as integer);
           self.account_role := get_keyword ('user_role', aSessInfo, '');
           self.accountName := get_keyword ('user_name', aSessInfo, '');
-          self.settings := ODRIVE.WA.settings (self.domain_id);
+          self.settings := ODRIVE.WA.settings (self.account_id);
         ]]>
       </v:on-init>
 
diff --git a/appsrc/ODS-Briefcase/www/template/template.vspx b/appsrc/ODS-Briefcase/www/template/template.vspx
index 1e9137c..503005f 100644
--- a/appsrc/ODS-Briefcase/www/template/template.vspx
+++ b/appsrc/ODS-Briefcase/www/template/template.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.vspx,v 1.25.2.9 2010/10/13 12:15:01 source Exp $
+ -  $Id: template.vspx,v 1.25.2.15 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -32,8 +32,13 @@
         http (sprintf('\n<link rel="meta" type="application/rdf+xml" title="SIOC (N3/Turtle)" href="%s" />', replace(ODRIVE.WA.sioc_url (self.domain_id), 'sioc.rdf', 'sioc.ttl')));
       }
       http (ODRIVE.WA.geo_url (self.domain_id, self.account_id));
+
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
     ?>
     <link rel="stylesheet" href="css/style.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta name="dc.description" content="<?V ODRIVE.WA.utf2wide (ODRIVE.WA.domain_description (self.domain_id)) ?>" />
     <meta name="dc.title" content="<?V ODRIVE.WA.utf2wide (ODRIVE.WA.domain_description (self.domain_id)) ?>" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -52,29 +57,21 @@
           user: '<?V ODRIVE.WA.account_name (self.account_id) ?>',
           connectionHeaders: {Authorization: '<?V ODRIVE.WA.account_basicAuthorization (self.account_id) ?>'}
         };
-
-      	/* load stylesheets */
-      	OAT.Style.include("grid.css");
-      	OAT.Style.include("webdav.css");
-      	OAT.Style.include("winms.css");
-
         var featureList=["ajax", "json", "anchor", "dialog", "combolist", "calendar"];
         OAT.Loader.load(featureList);
       </script>
       <script type="text/javascript" src="/ods/app.js"></script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="/ods/validate.js"></script>
       <script type="text/javascript" src="js/odrive.js"></script>
       <script type="text/javascript" src="js/tbl.js"></script>
       <script type="text/javascript">
         function myInit() {
           if (!OAT._loaded) {
-            setTimeout(myInit, 50);
+            setTimeout(myInit, 100);
             return;
           }
-          // <a>++
-          OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-          OAT.Anchor.zIndex = 1001;
         
           if ((<?V cast (get_keyword ('app', self.settings, '0') as integer) ?> > 0) && $('app_area'))
             generateAPP('app_area', {appActivation: "<?V case when cast (get_keyword ('app', self.settings, '1') as integer) = 2 then 'hover' else 'click' end ?>"});
@@ -100,7 +97,7 @@
         <v:variable persist="0" name="account_role" type="varchar" default="'public'"/>
         <v:variable persist="0" name="accountName" type="varchar" default="'Public User'"/>
         <v:variable persist="0" name="settings" type="any" />
-
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
diff --git a/appsrc/ODS-Briefcase/www/template/template.xsl b/appsrc/ODS-Briefcase/www/template/template.xsl
index bf52028..45cc740 100644
--- a/appsrc/ODS-Briefcase/www/template/template.xsl
+++ b/appsrc/ODS-Briefcase/www/template/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.xsl,v 1.18.2.9 2010/10/13 12:15:01 source Exp $
+ -  $Id: template.xsl,v 1.18.2.12 2012/03/08 12:00:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -105,8 +105,7 @@
     </xsl:for-each>
     <xsl:if test="not @clean or @clean = 'no'">
       <div style="padding: 0 0 0.5em 0;">
-        &nbsp;<a href="" onclick="javascript: if (opener != null) opener.focus(); window.close();"><img src="image/close_16.png" border="0" alt="Close" title="Close" />&nbsp;Close</a>
-        <hr />
+        <span class="button pointer" onclick="javascript: if (opener != null) opener.focus(); window.close();"><img class="button" src="/ods/images/icons/close_16.png" border="0" alt="Close" title="Close" /> Close</span>
       </div>
     </xsl:if>
     <div id="app_area">
@@ -129,7 +128,7 @@
     <xsl:apply-templates select="vm:init"/>
     <v:form name="F1" method="POST" type="simple" action="--ODRIVE.WA.utf2wide (ODRIVE.WA.page_url (self.domain_id))" xhtml_enctype="multipart/form-data">
       <ods:ods-bar app_type='oDrive'/>
-      <div id="app_area" style="clear: right;">
+      <div id="app_area" style="clear: right; min-width: 1008px;">
       <div style="background-color: #fff;">
         <div style="float: left;">
             <?vsp
@@ -298,11 +297,10 @@
   <!--=========================================================================-->
   <xsl:template match="vm:ds-navigation">
     <?vsp
-      {
         declare n_start, n_end, n_total integer;
         declare ds vspx_data_set;
 
-        ds := self.vc_find_descendant_control ('<xsl:value-of select="@data-set" />');
+      ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
         if (isnull (ds.ds_data_source))
         {
           n_total := ds.ds_rows_total;
@@ -317,57 +315,46 @@
           n_end := n_total;
 
         if (n_total)
-          http (sprintf ('%d - %d of %d', n_start, n_end, n_total));
+        http (sprintf ('Showing %d - %d of %d', n_start, n_end, n_total));
 
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first integer;
+      declare _prev, _next vspx_button;
 
-  	    d_prev := d_next := d_last := d_first := 0;
-  	    _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-  	    _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
   	    _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
   	    _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (not (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled))
-        {
-          if (n_total)
+      if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
             http (' | ');
-        if (_first is not null and not _first.vc_enabled)
-    	    d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-    	    d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-    	    d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-    	    d_last := 1;
-        }
     ?>
-    <?vsp
-      if (d_first)
-        http ('<img src="/ods/images/skin/pager/p_first_gr.png" alt="First Page" title="First Page" border="0" />first ');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="/ods/images/skin/pager/p_first.png" xhtml_alt="First" text="first&nbsp;" />
-    <?vsp
-      if (d_prev)
-        http ('<img src="/ods/images/skin/pager/p_prev_gr.png" alt="Previous Page" title="Previous Page" border="0" />prev ');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="/ods/images/skin/pager/p_prev.png" xhtml_alt="Previous" text="prev&nbsp;" />
-    <?vsp
-      if (d_next)
-        http ('<img src="/ods/images/skin/pager/p_next_gr.png" alt="Next Page" title="Next Page" border="0" />next ');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="/ods/images/skin/pager/p_next.png" xhtml_alt="Next" text="next&nbsp;" />
-    <?vsp
-      if (d_last)
-        http ('<img src="/ods/images/skin/pager/p_last_gr.png" alt="Last Page" title="Last Page" border="0" />last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="/ods/images/skin/pager/p_last.png" xhtml_alt="Last" text="last" />
-    <?vsp
-      }
-    ?>
+    <v:button name="{@data-set}_first" action="simple" style="url" value="" xhtml_alt="First" xhtml_class="navi-button" >
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/> First ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_prev" action="simple" style="url" value="" xhtml_alt="Previous" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/> Prev ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_next" action="simple" style="url" value="" xhtml_alt="Next" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/> Next ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_last" action="simple" style="url" value="" xhtml_alt="Last" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/> Last ';
+        ]]>
+      </v:before-render>
+    </v:button>
   </xsl:template>
 
   <!--=========================================================================-->
@@ -529,30 +516,17 @@
     <div id="4" class="tabContent" style="display: none;">
       <table class="form-body" cellspacing="0">
     <tr>
-          <th>
-            <v:label for="dav_oMail_DomainId" value="--'oMail domain'" />
-          </th>
-      <td>
-            <v:text name="dav_oMail_DomainId" format="%s" xhtml_disabled="disabled" xhtml_class="field-text">
-              <v:validator test="regexp" regexp="^[0-9]+$" message="Number is expected" runat="client" />
-              <v:before-data-bind>
-                <![CDATA[
-                  control.ufl_value := self.get_fieldProperty ('dav_oMail_DomainId', self.dav_path, 'virt:oMail-DomainId', '1');
-                ]]>
-              </v:before-data-bind>
-            </v:text>
-          </td>
-        </tr>
-        <tr>
-          <th>
-            <v:label for="dav_oMail_FolderName" value="--'oMail folder name'" />
+          <th width="30%">
+            <v:label for="dav_oMail_FolderName" value="--'WebMail folder name'" />
           </th>
           <td>
             <v:text name="dav_oMail_FolderName" format="%s" xhtml_disabled="disabled" xhtml_class="field-text">
               <v:validator test="length" min="1" max="255" message="The input can not be empty." runat="client" />
               <v:before-data-bind>
                 <![CDATA[
-                  control.ufl_value := self.get_fieldProperty ('dav_oMail_FolderName', self.dav_path, 'virt:oMail-FolderName', 'Inbox');
+                  control.ufl_value := self.get_fieldProperty ('dav_oMail_FolderName', self.dav_path, 'virt:oMail-FolderName', 'NULL');
+                  if (control.ufl_value = 'NULL')
+                    control.ufl_value := '';
                 ]]>
               </v:before-data-bind>
             </v:text>
@@ -560,7 +534,7 @@
         </tr>
         <tr>
           <th>
-            <v:label for="dav_oMail_NameFormat" value="--'oMail name format'" />
+            <v:label for="dav_oMail_NameFormat" value="--'WebMail name format'" />
           </th>
           <td>
             <v:text name="dav_oMail_NameFormat" format="%s" xhtml_disabled="disabled" xhtml_class="field-text">
@@ -754,15 +728,17 @@
     <div id="8" class="tabContent" style="display: none;">
       <table class="form-body" cellspacing="0">
         <tr>
-          <th>
+          <th width="30%">
             <v:label for="dav_rdfSink_rdfGraph" value="--'Graph name'" />
           </th>
           <td>
-            <v:text name="dav_rdfSink_rdfGraph" format="%s" xhtml_disabled="disabled" xhtml_class="field-text">
+            <v:text name="dav_rdfSink_rdfGraph" xhtml_id="dav_rdfSink_rdfGraph" format="%s" xhtml_disabled="disabled" xhtml_class="field-text">
               <v:validator test="length" min="1" max="255" message="The input can not be empty." runat="client" />
               <v:before-data-bind>
                 <![CDATA[
                   control.ufl_value := self.get_fieldProperty ('dav_rdfSink_rdfGraph', self.dav_path, 'virt:rdf_graph', '');
+                  if ((control.ufl_value = '') and (self.command = 10))
+                    control.ufl_value := ODRIVE.WA.host_url () || rtrim (WS.WS.FIXPATH (ODRIVE.WA.odrive_real_path (self.dav_path)), '/') || '/#this';
                 ]]>
               </v:before-data-bind>
             </v:text>
@@ -773,17 +749,91 @@
             <v:label for="dav_rdfSink_rdfSponger" value="--'Sponger (on/off)'" />
           </th>
           <td>
-            <v:text name="dav_rdfSink_rdfSponger" format="%s" xhtml_disabled="disabled" xhtml_class="field-short">
-              <v:before-data-bind>
-                <![CDATA[
-                  control.ufl_value := self.get_fieldProperty ('dav_rdfSink_rdfSponger', self.dav_path, 'virt:rdf_sponger', '');
-                ]]>
-              </v:before-data-bind>
-            </v:text>
+            <?vsp
+              declare S varchar;
+
+              S := self.get_fieldProperty ('dav_rdfSink_rdfSponger', self.dav_path, 'virt:rdf_sponger', 'off');
+              http (sprintf ('<input type="checkbox" name="dav_rdfSink_rdfSponger" id="dav_rdfSink_rdfSponger" %s disabled="disabled" onchange="javascript: destinationChange(this, {checked: {show: [\'dav_cartridge\', \'dav_metaCartridge\']}, unchecked: {hide: [\'dav_cartridge\', \'dav_metaCartridge\']}});" value="on" />', case when S = 'on' then 'checked="checked"' else '' end));
+            ?>
           </td>
         </tr>
+        <tr id="dav_cartridge" style="display: none;">
+          <th valign="top">Sponger Extractor Cartridges</th>
+          <td>
+            <div style="margin-bottom: 6px; max-height: 200px; overflow: auto;">
+              <?vsp
+                declare N integer;
+                declare cartridges, selectedCartridges any;
+
+                selectedCartridges := self.get_fieldProperty ('dav_rdfSink_rdfCartridges', self.dav_path, 'virt:rdf_cartridges', '');
+                selectedCartridges := split_and_decode (selectedCartridges, 0, '\0\0,');
+                cartridges := ODRIVE.WA.cartridges_get ();
+              ?>
+              <table id="ca_tbl" class="ODS_grid" cellspacing="0">
+                <thead>
+                  <tr>
+                    <th><input type="checkbox" name="ca_select" value="Select All" onclick="selectAllCheckboxes (this, 'ca_item', true)" title="Select All" /></th>
+                    <th width="100%">Cartridge</th>
+                  </tr>
+                </thead>
+                <?vsp
+                  for (N := 0; N < length (cartridges); N := N + 1)
+                  {
+                    http ('<tr>');
+                    http (sprintf ('<td class="checkbox"><input type="checkbox" name="ca_item" value="%d" disabled="disabled" %s /></td>', cartridges[N][0], case when ODRIVE.WA.vector_contains (selectedCartridges, cast (cartridges[N][0] as varchar)) then 'checked="checked"' else '' end));
+                    http (sprintf ('<td>%V</td>', cartridges[N][1]));
+                    http ('</tr>');
+                  }
+                  if (length (cartridges) = 0)
+                    http ('<tr><td colspan="2"><b>No available cartridges</b></td></tr>');
+                ?>
+              </table>
+            </div>
+          </td>
+        </tr>
+        <vm:if test="DB.DBA.wa_check_package ('rdf_mappers')">
+          <tr id="dav_metaCartridge" style="display: none;">
+            <th valign="top">Sponger Meta Cartridges</th>
+            <td>
+              <div style="margin-bottom: 6px; max-height: 200px; overflow: auto;">
+                <?vsp
+                  declare N integer;
+                  declare cartridges, selectedCartridges any;
+
+                  selectedCartridges := self.get_fieldProperty ('dav_rdfSink_rdfMetaCartridges', self.dav_path, 'virt:rdf_metaCartridges', '');
+                  selectedCartridges := split_and_decode (selectedCartridges, 0, '\0\0,');
+                  cartridges := ODRIVE.WA.metaCartridges_get ();
+                ?>
+                <table id="mca_tbl" class="ODS_grid" cellspacing="0">
+                  <thead>
+                    <tr>
+                      <th><input type="checkbox" name="mca_select" value="Select All" onclick="selectAllCheckboxes (this, 'mca_item', true)" title="Select All" /></th>
+                      <th width="100%">Meta Cartridge</th>
+                    </tr>
+                  </thead>
+                  <?vsp
+                    for (N := 0; N < length (cartridges); N := N + 1)
+                    {
+                      http ('<tr>');
+                      http (sprintf ('<td class="checkbox"><input type="checkbox" name="mca_item" value="%d" disabled="disabled" %s /></td>', cartridges[N][0], case when ODRIVE.WA.vector_contains (selectedCartridges, cast (cartridges[N][0] as varchar)) then 'checked="checked"' else '' end));
+                      http (sprintf ('<td>%V</td>', cartridges[N][1]));
+                      http ('</tr>');
+                    }
+                    if (length (cartridges) = 0)
+                      http ('<tr><td colspan="2"><b>No available cartridges</b></td></tr>');
+                  ?>
       </table>
         </div>
+            </td>
+          </tr>
+        </vm:if>
+      </table>
+      <![CDATA[
+  	    <script type="text/javascript">
+          OAT.MSG.attach(OAT, "PAGE_LOADED", function(){destinationChange($('dav_rdfSink_rdfSponger'), {checked: {show: ['dav_cartridge', 'dav_metaCartridge']}})});
+  	    </script>
+  	  ]]>
+  	</div>
   </xsl:template>
 
   <!--=========================================================================-->
@@ -796,10 +846,10 @@
           </th>
           <td>
             <?vsp
-              http (sprintf ('Lock is <b>%s</b>, ', ODRIVE.WA.DAV_GET_INFO (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'), 'lockState')));
-              http (sprintf ('Version Control is <b>%s</b>, ', ODRIVE.WA.DAV_GET_INFO (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'), 'vc')));
-              http (sprintf ('Auto Versioning is <b>%s</b>, ', ODRIVE.WA.DAV_GET_INFO (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'), 'avcState')));
-              http (sprintf ('Version State is <b>%s</b>', ODRIVE.WA.DAV_GET_INFO (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'), 'vcState')));
+              http (sprintf ('Lock is <b>%s</b>, ', ODRIVE.WA.DAV_GET_INFO (self.dav_path, 'lockState')));
+              http (sprintf ('Version Control is <b>%s</b>, ', ODRIVE.WA.DAV_GET_INFO (self.dav_path, 'vc')));
+              http (sprintf ('Auto Versioning is <b>%s</b>, ', ODRIVE.WA.DAV_GET_INFO (self.dav_path, 'avcState')));
+              http (sprintf ('Version State is <b>%s</b>', ODRIVE.WA.DAV_GET_INFO (self.dav_path, 'vcState')));
             ?>
           </td>
         </tr>
@@ -814,11 +864,12 @@
                   <![CDATA[
                     declare retValue any;
 
+                    dbg_obj_print ('self.dav_path', self.dav_path);
                     if (ODRIVE.WA.DAV_GET (self.dav_item, 'versionControl'))
                     {
-                      retValue := ODRIVE.WA.DAV_REMOVE_VERSION_CONTROL (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                      retValue := ODRIVE.WA.DAV_REMOVE_VERSION_CONTROL (self.dav_path);
                     } else {
-                      retValue := ODRIVE.WA.DAV_VERSION_CONTROL (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                      retValue := ODRIVE.WA.DAV_VERSION_CONTROL (self.dav_path);
                     }
                     if (ODRIVE.WA.DAV_ERROR(retValue))
                     {
@@ -840,12 +891,12 @@
               File commands
             </th>
             <td>
-              <v:button name="tepmpate_lock" action="simple" value="Lock" enabled="-- case when (ODRIVE.WA.DAV_IS_LOCKED(ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'))) then 0 else 1 end" xhtml_class="button">
+              <v:button name="tepmpate_lock" action="simple" value="Lock" enabled="-- case when (ODRIVE.WA.DAV_IS_LOCKED (self.dav_path)) then 0 else 1 end" xhtml_class="button">
                 <v:on-post>
                   <![CDATA[
                     declare retValue any;
 
-                    retValue := ODRIVE.WA.DAV_LOCK (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                    retValue := ODRIVE.WA.DAV_LOCK (self.dav_path);
                     if (ODRIVE.WA.DAV_ERROR(retValue))
                     {
                       self.vc_error_message := ODRIVE.WA.DAV_PERROR(retValue);
@@ -856,12 +907,12 @@
                   ]]>
                 </v:on-post>
               </v:button>
-              <v:button name="tepmpate_unlock" action="simple" value="Unlock" enabled="-- case when (ODRIVE.WA.DAV_IS_LOCKED(ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'))) then 1 else 0 end" xhtml_class="button">
+              <v:button name="tepmpate_unlock" action="simple" value="Unlock" enabled="-- case when (ODRIVE.WA.DAV_IS_LOCKED (self.dav_path)) then 1 else 0 end" xhtml_class="button">
                 <v:on-post>
                   <![CDATA[
                     declare retValue any;
 
-                    retValue := ODRIVE.WA.DAV_UNLOCK (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                    retValue := ODRIVE.WA.DAV_UNLOCK (self.dav_path);
                     if (ODRIVE.WA.DAV_ERROR(retValue))
                     {
                       self.vc_error_message := ODRIVE.WA.DAV_PERROR(retValue);
@@ -884,8 +935,9 @@
                   <![CDATA[
                     declare retValue any;
 
-                    retValue := ODRIVE.WA.DAV_CHECKIN (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
-                    if (ODRIVE.WA.DAV_ERROR(retValue)) {
+                    retValue := ODRIVE.WA.DAV_CHECKIN (self.dav_path);
+                    if (ODRIVE.WA.DAV_ERROR (retValue))
+                    {
                       self.vc_error_message := ODRIVE.WA.DAV_PERROR(retValue);
                       self.vc_is_valid := 0;
                       return;
@@ -899,7 +951,7 @@
                   <![CDATA[
                     declare retValue any;
 
-                    retValue := ODRIVE.WA.DAV_CHECKOUT (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                    retValue := ODRIVE.WA.DAV_CHECKOUT (self.dav_path);
                     if (ODRIVE.WA.DAV_ERROR(retValue))
                     {
                       self.vc_error_message := ODRIVE.WA.DAV_PERROR(retValue);
@@ -915,7 +967,7 @@
                   <![CDATA[
                     declare retValue any;
 
-                    retValue := ODRIVE.WA.DAV_UNCHECKOUT (ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                    retValue := ODRIVE.WA.DAV_UNCHECKOUT (self.dav_path);
                     if (ODRIVE.WA.DAV_ERROR(retValue))
                     {
                       self.vc_error_message := ODRIVE.WA.DAV_PERROR(retValue);
@@ -933,7 +985,7 @@
               Number of Versions in History
             </th>
             <td>
-              <v:label value="--ODRIVE.WA.DAV_GET_VERSION_COUNT(ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'))" format="%d" />
+              <v:label value="--ODRIVE.WA.DAV_GET_VERSION_COUNT (self.dav_path)" format="%d" />
             </td>
           </tr>
           <tr>
@@ -941,12 +993,12 @@
               Root version
             </th>
             <td>
-              <v:button style="url" action="simple" value="--ODRIVE.WA.DAV_GET_VERSION_ROOT(ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'))" format="%s">
+              <v:button style="url" action="simple" value="--ODRIVE.WA.DAV_GET_VERSION_ROOT (self.dav_path)" format="%s">
                 <v:on-post>
                   <![CDATA[
                     declare path varchar;
 
-                    path := ODRIVE.WA.DAV_GET_VERSION_ROOT(ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath'));
+                    path := ODRIVE.WA.DAV_GET_VERSION_ROOT (self.dav_path);
                     if (ODRIVE.WA.odrive_permission(path) = '')
                     {
                       self.vc_error_message := 'You have not rights to read this folder/file!';
@@ -964,7 +1016,7 @@
             </td>
           </tr>
           <tr>
-            <th>Versions</th>
+            <th valign="top">Versions</th>
             <td>
               <v:data-set name="ds_versions" sql="select rs.* from ODRIVE.WA.DAV_GET_VERSION_SET(rs0)(c0 varchar, c1 integer) rs where rs0 = :p0" nrows="0" scrollable="1">
                 <v:param name="p0" value="--ODRIVE.WA.DAV_GET (self.dav_item, 'fullPath')" />
@@ -1010,7 +1062,7 @@
                                 }
 
                                 http_request_status ('HTTP/1.1 302 Found');
-                                http_header (sprintf ('Location: view.vsp?sid=%s&realm=%s&file=%U&mode=download\r\n', self.sid , self.realm, path));
+                                http_header (sprintf ('Location: %s&mode=download&file=%U\r\n', ODRIVE.WA.page_url (self.domain_id, 'view.vsp', self.sid , self.realm), path));
                                 self.vc_data_bind (e);
                               ]]>
                             </v:on-post>
@@ -1149,9 +1201,112 @@
   </xsl:template>
 
   <!--=========================================================================-->
+  <xsl:template match="vm:search-dc-template11">
+    <div id="10" class="tabContent" style="display: none;">
+      <table class="form-body" cellspacing="0">
+        <tr>
+          <th width="30%">SyncML version</th>
+          <td>
+            <select name="syncml_version">
+              <?vsp
+                declare aValues, aValue any;
+                declare N integer;
+
+                aValue := case when (self.command_mode = 0) then 'N' else ODRIVE.WA.syncml_version (self.dav_path) end;
+                aValues := ODRIVE.WA.syncml_versions ();
+                for (N := 2; N < length (aValues); N := N + 2)
+                {
+                  http(sprintf('<option value="%s" %s>%s</option>', aValues[N], select_if(aValue, aValues[N]), aValues[N+1]));
+                }
+              ?>
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <th>SyncML type</th>
+          <td>
+            <select name="syncml_type">
+              <?vsp
+                declare aValues, aValue any;
+                declare N integer;
+
+                aValue := case when (self.command_mode = 0) then 'N' else ODRIVE.WA.syncml_type (self.dav_path) end;
+                aValues := ODRIVE.WA.syncml_types ();
+                for (N := 2; N < length (aValues); N := N + 2)
+                {
+                  http(sprintf('<option value="%s" %s>%s</option>', aValues[N], select_if (aValue, aValues[N]), aValues[N+1]));
+                }
+              ?>
+            </select>
+          </td>
+        </tr>
+      </table>
+    </div>
+  </xsl:template>
+
+  <!--=========================================================================-->
+  <xsl:template match="vm:search-dc-template12">
+    <div id="11" class="tabContent" style="display: none;">
+      <table class="form-body" cellspacing="0">
+        <tr>
+          <th width="30%">Connection Type</th>
+          <td>
+            <select name="dav_IMAP_connection">
+              <?vsp
+                declare aValues, aValue any;
+                declare N integer;
+
+                aValue := self.get_fieldProperty ('dav_IMAP_connection', self.dav_path, 'virt:IMAP-connection', '');
+                aValues := vector ('none', 'None', 'ssl', 'SSL/TSL');
+                for (N := 0; N < length (aValues); N := N + 2)
+                  http (sprintf ('<option value="%s" %s>%s</option>', aValues[N], select_if(aValue, aValues[N]), aValues[N+1]));
+              ?>
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <th>Server Address</th>
+          <td>
+            <v:text name="dav_IMAP_server" format="%s" xhtml_disabled="disabled" xhtml_class="field-text">
+              <v:before-data-bind>
+                <![CDATA[
+                  control.ufl_value := self.get_fieldProperty ('dav_IMAP_server', self.dav_path, 'virt:IMAP-server', '');
+                ]]>
+              </v:before-data-bind>
+            </v:text>
+          </td>
+        </tr>
+        <tr>
+          <th>User Name</th>
+          <td>
+            <v:text name="dav_IMAP_user" format="%s" xhtml_disabled="disabled" xhtml_class="field-short">
+              <v:before-data-bind>
+                <![CDATA[
+                  control.ufl_value := self.get_fieldProperty ('dav_IMAP_user', self.dav_path, 'virt:IMAP-user', '');
+                ]]>
+              </v:before-data-bind>
+            </v:text>
+          </td>
+        </tr>
+        <tr>
+          <th>User Password</th>
+          <td>
+            <v:text type="password" name="dav_IMAP_password" format="%s" xhtml_disabled="disabled" xhtml_class="field-short">
+              <v:before-data-bind>
+                <![CDATA[
+                  control.ufl_value := self.get_fieldProperty ('dav_IMAP_password', self.dav_path, 'virt:IMAP-password', '');
+                ]]>
+              </v:before-data-bind>
+            </v:text>
+          </td>
+        </tr>
+      </table>
+    </div>
+  </xsl:template>
+
+  <!--=========================================================================-->
   <!-- Auto Versioning -->
   <xsl:template match="vm:autoVersion">
-    <vm:if test="self.dav_category = ''">
     <tr id="davRow_version">
       <th>
         <v:label for="dav_autoversion" value="--'Auto Versioning Content'" />
@@ -1163,7 +1318,7 @@
           tmp := '';
           if ((self.dav_type = 'R') and (self.command_mode = 10))
             tmp := 'onchange="javascript: window.document.F1.submit();"';
-          http (sprintf ('<select name="dav_autoversion" %s disabled="disabled">', tmp));
+          http (sprintf ('<select name="dav_autoversion" %s disabled="disabled" class="field-short">', tmp));
 
           tmp := ODRIVE.WA.DAV_GET (self.dav_item, 'autoversion');
           if (isnull(tmp) and (self.dav_type = 'R'))
@@ -1178,7 +1333,6 @@
         ?>
       </td>
     </tr>
-    </vm:if>
   </xsl:template>
 
 </xsl:stylesheet>
diff --git a/appsrc/ODS-Briefcase/www/users_select.vspx b/appsrc/ODS-Briefcase/www/users_select.vspx
deleted file mode 100644
index f686b5c..0000000
--- a/appsrc/ODS-Briefcase/www/users_select.vspx
+++ /dev/null
@@ -1,285 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- -
- -  $Id: users_select.vspx,v 1.8.2.3 2010/09/20 10:15:01 source Exp $
- -
- -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- -  project.
- -
- -  Copyright (C) 1998-2006 OpenLink Software
- -
- -  This project 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; only version 2 of the License, dated June 1991.
- -
- -  This program 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
- -  General Public License for more details.
- -
- -  You should have received a copy of the GNU General Public License along
- -  with this program; if not, write to the Free Software Foundation, Inc.,
- -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- -
--->
-<v:page name="users_select" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc') {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (self.v_order = columnName and self.v_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-  <v:method name="sortChange" arglist="in columnName varchar">
-    <![CDATA[
-      if (columnName = '')
-        return;
-      self.ds.vc_reset();
-      if (self.v_order = columnName) {
-        self.v_direction := either(equ(self.v_direction, 'asc'), 'desc', 'asc');
-      } else {
-        self.v_direction := 'asc';
-      }
-      self.v_order := columnName;
-    ]]>
-  </v:method>
-  <v:method name="isMultiple" arglist="in dst any">
-    <![CDATA[
-      declare pos integer;
-
-      pos := strstr(self.v_dst, 'm');
-      if (not isnull(pos))
-        return 1;
-      return 0;
-    ]]>
-  </v:method>
-
-    <v:before-data-bind>
-      <![CDATA[
-        if (self.v_mode = 'g')
-      {
-          self.v_filter := 'g';
-      }
-      else if (self.v_mode = 'u')
-      {
-          self.v_filter := 'u';
-      }
-      ]]>
-    </v:before-data-bind>
-
-  <vm:pagetitle>Select User/Group</vm:pagetitle>
-  <vm:popup_pagewrapper>
-    <vm:variables>
-      <v:variable name="v_params" param-name="params" type="varchar"/>
-      <v:variable name="v_mode" persist="0" param-name="mode" type="varchar" default="''"/>
-      <v:variable name="v_filter" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_value" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_mask" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_how" persist="0" type="varchar" default="'1'"/>
-      <v:variable name="v_order" persist="0" type="varchar" default="'U_NAME'" />
-      <v:variable name="v_direction" persist="0" type="varchar" default="'asc'" />
-      <v:variable name="v_src" persist="0" param-name="src" type="varchar" default="''" />
-      <v:variable name="v_dst" persist="0" param-name="dst" type="varchar" default="'sc'" />
-      <v:variable name="v_s1" persist="0" param-name="s1" type="varchar" default="''" />
-      <v:variable name="v_s2" persist="0" param-name="s2" type="varchar" default="''" />
-    </vm:variables>
-    <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s"/>', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s"/>', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="src"   id="src"   value="%s"/>', get_keyword('src', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="dst"   id="dst"   value="%s"/>', get_keyword('dst', self.vc_page.vc_event.ve_params, 'sc'))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s1"    id="s1"    value="%s"/>', get_keyword('s1', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s2"    id="s2"    value="%s"/>', get_keyword('s2', self.vc_page.vc_event.ve_params, ''))); ?>
-      <v:text name="params" type="hidden" value="--self.v_params"/>
-      <div style="padding: 0.2em;">
-        <div class="boxHeader">
-          Show
-          <v:select-list name="filter" value="--self.v_filter" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-            <v:item name="Users & Groups" value="" />
-            <v:item name="Users" value="u" />
-            <v:item name="Groups" value="g" />
-          </v:select-list>
-          <v:select-list name="how" value="--self.v_how">
-            <v:item name="Starting with" value="1" />
-            <v:item name="Containing" value="2" />
-            <v:item name="Ending with" value="3" />
-            <v:item name="Exact match" value="4" />
-          </v:select-list>
-          <v:text name="value" value="--self.v_value" xhtml_size="15"/>
-          <v:button action="simple" value="Filter" xhtml_class="button">
-            <v:on-post>
-              <![CDATA[
-                self.v_filter := get_keyword('filter', self.vc_page.vc_event.ve_params, self.v_filter);
-                self.v_how := self.how.ufl_value;
-                self.v_value := trim(self.value.ufl_value);
-                self.vc_data_bind (e);
-              ]]>
-            </v:on-post>
-          </v:button>
-          <v:button name="reset" action="simple" value="Clear" xhtml_class="button">
-            <v:on-post>
-              <![CDATA[
-                self.v_how := '1';
-                self.v_value := '';
-                self.vc_data_bind (e);
-              ]]>
-            </v:on-post>
-          </v:button>
-        </div>
-        <v:data-source name="dsrc" expression-type="sql" nrows="0" initial-offset="0">
-          <v:before-data-bind>
-            <![CDATA[
-              declare user_sql, group_sql varchar;
-
-              self.v_mask := case self.v_how
-                               when '1' then self.v_value || '%'
-                               when '2' then '%' || self.v_value || '%'
-                               when '3' then '%' || self.v_value
-                               else self.v_value end;
-              if (self.v_mask = '')
-                self.v_mask := '%';
-              self.v_mask := replace(self.v_mask, '%%', '%');
-
-              user_sql := '';
-              group_sql := '';
-              if (self.v_filter <> 'u') {
-                if (ODRIVE.WA.check_admin(ODRIVE.WA.session_user_id(self.vc_page.vc_event.ve_params))) {
-                  group_sql := sprintf('select ''Group'' U_TYPE, a.U_NAME, coalesce(a.U_FULL_NAME, a.U_NAME) U_FULL_NAME from DB.DBA.SYS_USERS a where (a.U_IS_ROLE=1) and (upper(a.U_NAME) like upper(\'%s\') and (U_ID<>5) and (U_ID<>6))', self.v_mask);
-                } else {
-                  group_sql := sprintf('select ''Group'' U_TYPE, a.U_NAME, coalesce(a.U_FULL_NAME, a.U_NAME) U_FULL_NAME from DB.DBA.SYS_USERS a, ODRIVE.WA.GROUPS b, DB.DBA.SYS_USERS c where (a.U_ID=b.GROUP_ID) and (a.U_IS_ROLE=1) and (b.USER_ID=c.U_ID) and (c.U_NAME=\'%s\') and (upper(a.U_NAME) like upper(\'%s\') and (a.U_ID<>5) and (a.U_ID<>6))', ODRIVE.WA.session_user(self.vc_page.vc_event.ve_params), self.v_mask);
-                }
-              }
-              if (self.v_filter <> 'g')
-              {
-                user_sql := sprintf('select ''User'' U_TYPE, U_NAME, coalesce(U_FULL_NAME, \'\') U_FULL_NAME from WS.WS.SYS_DAV_USER where (U_ACCOUNT_DISABLED=0) and (upper(U_NAME) like upper(\'%s\') and (U_ID<>5) and (U_ID<>6))', self.v_mask);
-              }
-              if (user_sql = '') {
-                control.ds_sql := group_sql;
-              } else if (group_sql = '') {
-                control.ds_sql := user_sql;
-              } else {
-                control.ds_sql := concat('select U_TYPE, U_NAME, U_FULL_NAME from (', user_sql, ' union ' , group_sql, ') x ');
-              }
-              self.sortChange(get_keyword('sortColumn', e.ve_params, ''));
-              control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
-              control.ds_nrows := ODRIVE.WA.settings_rows (self.settings);
-            ]]>
-          </v:before-data-bind>
-          <v:after-data-bind>
-            control.ds_make_statistic ();
-          </v:after-data-bind>
-        </v:data-source>
-        <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
-          <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="users" class="OD_grid colorise" cellspacing="0">
-              <thead class="sortHeader">
-                <tr>
-                  <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-                    <th class="checkbox" width="1%">
-                      <?vsp
-                        http('<input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, ''cb_item''); updateChecked(this.form, ''cb_item''); "/>');
-                      ?>
-                    </th>
-                  </v:template>
-                  <v:template type="simple" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-                    <th>
-                      <v:label value="Type" format="%s"/>
-                    </th>
-                  </v:template>
-                  <?vsp http (ODRIVE.WA.show_column_header ('Name', 'U_NAME', self.v_order, self.v_direction)); ?>
-                  <?vsp http (ODRIVE.WA.show_column_header ('Description', 'U_FULL_NAME', self.v_order, self.v_direction)); ?>
-                  <v:template type="simple" enabled="--neq(self.isMultiple(self.v_dst), 1)">
-                    <th width="1%">
-                      Action
-                    </th>
-                  </v:template>
-                </tr>
-              </thead>
-            </table>
-          </v:template>
-
-          <v:template name="ds_repeat" type="repeat" name-to-remove="" set-to-remove="">
-
-            <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
-              <table>
-                <tr align="center">
-                  <?vsp http(sprintf('<td colspan="%d">No records</td>', either(equ(self.v_mode,''),4,3))); ?>
-                </tr>
-              </table>
-            </v:template>
-
-            <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
-              <table>
-                <tr>
-                  <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-                    <td  align="center">
-                      <?vsp
-                        declare pos integer;
-                        declare S, name any;
-
-                        name := (control.vc_parent as vspx_row_template).te_column_value('U_NAME');
-                        S := '';
-                        pos := strstr(self.v_s1, concat(name, ','));
-                        if (not isnull(pos))
-                          S := 'checked="checked"';
-                        http (sprintf ('<input type="checkbox" name="cb_item" value="%s" %s onclick="javascript: updateChecked(this.form, ''cb_item''); " />', name, S));
-                      ?>
-                    </td>
-                  </v:template>
-                  <v:template type="simple" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-                    <td nowrap="nowrap">
-                      <v:label value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('U_TYPE')" format="%s"/>
-                    </td>
-                  </v:template>
-                  <td nowrap="nowrap">
-                    <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_NAME')" format="%s"/>
-                  </td>
-                  <td nowrap="nowrap">
-                    <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')" format="%s"/>
-                  </td>
-                  <v:template type="simple" enabled="--neq(self.isMultiple(self.v_dst), 1)">
-                    <td nowrap="nowrap">
-                      <v:text name="s1" type="hidden" value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('U_NAME')"/>
-                      <v:text name="s2" type="hidden" value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')"/>
-                      <v:button name="b1" action="simple" value="select" xhtml_alt="Select" xhtml_onclick="javascript: rowSelect(this); return false;" xhtml_class="button"/>
-                    </td>
-                  </v:template>
-                </tr>
-              </table>
-            </v:template>
-
-          </v:template>
-
-          <v:template type="simple" name-to-remove="table" set-to-remove="top">
-            <table>
-              <tr align="center">
-                <?vsp http(sprintf('<td colspan="%d">', either(equ(self.v_mode,''),4,3))); ?>
-                  <vm:ds-navigation data-set="ds"/>
-                <?vsp http('</td>'); ?>
-              </tr>
-            </table>
-          </v:template>
-
-        </v:data-set>
-        <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-          <div style="padding: 0 0 0.5em 0;">
-            <hr />
-            <a href="#" onclick="javascript: addChecked(document.forms['F1'], 'cb_item', 'No users were selected for addition. No groups were selected for addition.');" class="button2">&nbsp;Add selected</a>
-          </div>
-        </v:template>
-      </div>
-    </vm:pagebody>
-  </vm:popup_pagewrapper>
-</v:page>
diff --git a/appsrc/ODS-Briefcase/www/view.vsp b/appsrc/ODS-Briefcase/www/view.vsp
index b090da9..9f99bc3 100644
--- a/appsrc/ODS-Briefcase/www/view.vsp
+++ b/appsrc/ODS-Briefcase/www/view.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: view.vsp,v 1.8.2.5 2010/09/20 10:15:01 source Exp $
+--  $Id: view.vsp,v 1.8.2.6 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/www/vmds.vspx b/appsrc/ODS-Briefcase/www/vmds.vspx
index 13e8430..b79fcc9 100644
--- a/appsrc/ODS-Briefcase/www/vmds.vspx
+++ b/appsrc/ODS-Briefcase/www/vmds.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vmds.vspx,v 1.7.2.5 2010/10/13 12:15:01 source Exp $
+ -  $Id: vmds.vspx,v 1.7.2.7 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -104,6 +104,9 @@
             control.ds_nrows := ODRIVE.WA.settings_rows (self.settings);
             ]]>
           </v:before-data-bind>
+          <v:after-data-bind>
+            control.ds_make_statistic ();
+          </v:after-data-bind>
         </v:data-source>
         <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
           <div style="padding: 0 0 0.5em 0;">
@@ -145,19 +148,17 @@
           </div>
 
           <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-            <table id="vmds" class="OD_grid colorise" cellspacing="0">
-              <thead class="sortHeader">
+            <table id="vmds" class="ODS_grid">
+              <thead>
                 <tr>
-                  <th class="checkbox" width="1%">
+                  <th class="checkbox">
                     <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                   </th>
                   <?vsp http (ODRIVE.WA.show_column_header ('Schema URI', 'RS_URI', self.vmds_order, self.vmds_direction)); ?>
                   <?vsp http (ODRIVE.WA.show_column_header ('Label', 'RS_LABEL', self.vmds_order, self.vmds_direction)); ?>
                   <?vsp http (ODRIVE.WA.show_column_header ('Kind', 'RS_CATNAME', self.vmds_order, self.vmds_direction)); ?>
                   <?vsp http (ODRIVE.WA.show_column_header ('Version', 'RS_VERSION', self.vmds_order, self.vmds_direction)); ?>
-                  <th width="1%">
-                    Actions
-                  </th>
+                  <th class="action">Actions</th>
                 </tr>
               </thead>
             </table>
@@ -167,8 +168,8 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
-                <td colspan="5">No Schemas</td>
+                <tr>
+                  <td colspan="6">No Schemas</td>
                 </tr>
               </table>
             </v:template>
@@ -176,12 +177,10 @@
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
               <table>
                 <tr>
-                  <td align="center" valign="top">
+                  <td class="checkbox">
                     <?vsp
                       if (ODRIVE.WA.dav_rdf_notDeprecated((control as vspx_row_template).te_column_value('RS_URI')))
-                      {
                         http (sprintf ('<input type="checkbox" name="cb_item" value="%s" onclick="selectCheck(this, \'cb_item\')" />', (control as vspx_row_template).te_column_value('RS_URI')));
-                      }
                     ?>
                   </td>
                   <td nowrap="nowrap">
@@ -196,7 +195,7 @@
                   <td nowrap="nowrap">
                     <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('RS_VERSION')" format="%s"/>
                   </td>
-                  <td nowrap="nowrap">
+                  <td class="action">
                     <v:button value="--case when ((self.v_right <> 'W') or not ODRIVE.WA.dav_rdf_notDeprecated (((control.vc_parent as vspx_row_template).te_column_value('RS_URI')))) then 'View' else 'Edit' end" action="simple" xhtml_class="button">
                       <v:on-post>
                         <![CDATA[
@@ -227,20 +226,17 @@
 
           <v:template type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <tr align="center">
-                <td colspan="5">
+              <tfoot>
+                <tr align="right">
+                  <td colspan="6">
                   <vm:ds-navigation data-set="ds" />
                 </td>
               </tr>
+              </tfoot>
             </table>
           </v:template>
 
         </v:data-set>
-        <script>
-                        <![CDATA[
-            coloriseTable('vmds');
-                        ]]>
-        </script>
       </v:template>
 
       <v:template type="simple" enabled="-- case when self.v_mode <> 'browse' then 1 else 0 end">
diff --git a/appsrc/ODS-Briefcase/xslt/rss2atom.xsl b/appsrc/ODS-Briefcase/xslt/rss2atom.xsl
index 817d839..fd157d9 100644
--- a/appsrc/ODS-Briefcase/xslt/rss2atom.xsl
+++ b/appsrc/ODS-Briefcase/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.3.2.2 2010/09/20 10:15:01 source Exp $
+ -  $Id: rss2atom.xsl,v 1.3.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/xslt/rss2atom03.xsl b/appsrc/ODS-Briefcase/xslt/rss2atom03.xsl
index 4ff5b07..2ff6636 100644
--- a/appsrc/ODS-Briefcase/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-Briefcase/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.3.2.2 2010/09/20 10:15:01 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.3.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/xslt/rss2rdf.xsl b/appsrc/ODS-Briefcase/xslt/rss2rdf.xsl
index 98067ea..dc5f7f5 100644
--- a/appsrc/ODS-Briefcase/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-Briefcase/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.4.2.2 2010/09/20 10:15:01 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.4.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Briefcase/xslt/rss2xbel.xsl b/appsrc/ODS-Briefcase/xslt/rss2xbel.xsl
index efb62a9..a5047ac 100644
--- a/appsrc/ODS-Briefcase/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-Briefcase/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:15:02 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/Makefile.am b/appsrc/ODS-Calendar/Makefile.am
index f1921bb..0f6cc45 100644
--- a/appsrc/ODS-Calendar/Makefile.am
+++ b/appsrc/ODS-Calendar/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -46,6 +46,7 @@ clean-local:
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Calendar/Makefile.in b/appsrc/ODS-Calendar/Makefile.in
index cc39cca..b468cdf 100644
--- a/appsrc/ODS-Calendar/Makefile.in
+++ b/appsrc/ODS-Calendar/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -309,6 +311,7 @@ CLEANFILES = \
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Calendar/make_vad.sh b/appsrc/ODS-Calendar/make_vad.sh
index bc8c886..ed2d485 100755
--- a/appsrc/ODS-Calendar/make_vad.sh
+++ b/appsrc/ODS-Calendar/make_vad.sh
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -28,7 +28,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.6.69"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -62,11 +62,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -90,6 +85,57 @@ else
   myrm=$RM
 fi
 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -225,7 +271,7 @@ sticker_init() {
   echo "  <name package=\"Calendar\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Calendar Manager\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -237,8 +283,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.76.62\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-09-27 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.85.05\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-12-29 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -267,6 +313,7 @@ sticker_init() {
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/Calendar/sql/calendar-a-api.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/Calendar/sql/sioc_calendar.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/Calendar/sql/DET_Calendar.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"/Calendar/sql/DET_CalDAV.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
   echo "  <sql purpose=\"pre-uninstall\">" >> $STICKER
@@ -381,6 +428,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -397,7 +445,6 @@ virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_calendar_dav.vad
 chmod 644 ods_calendar_filesystem.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -407,5 +454,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Calendar/sql/DET_CalDAV.sql b/appsrc/ODS-Calendar/sql/DET_CalDAV.sql
new file mode 100755
index 0000000..947b454
--- /dev/null
+++ b/appsrc/ODS-Calendar/sql/DET_CalDAV.sql
@@ -0,0 +1,1020 @@
+--
+--
+--  $Id: DET_CalDAV.sql,v 1.1.2.1 2012/03/08 12:14:09 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+use DB
+;
+
+--| This matches DAV_AUTHENTICATE (in id any, in what char(1), in req varchar, in a_uname varchar, in a_pwd varchar, in a_uid integer := null)
+--| The difference is that the DET function should not check whether the pair of name and password is valid; the auth_uid is not a null already.
+create function "CalDAV_DAV_AUTHENTICATE" (
+  in id any,
+  in what char(1),
+  in req varchar,
+  in auth_uname varchar,
+  in auth_pwd varchar,
+  in auth_uid integer)
+{
+  -- dbg_obj_princ ('CalDAV_DAV_AUTHENTICATE (', id, what, req, auth_uname, auth_pwd, auth_uid, http_dav_uid(), ')');
+  declare domain_id, item_id integer;
+  declare rc any;
+
+  rc := '';
+  domain_id := id[3];
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+    return -1;
+
+  if ('R' = what)
+  {
+    item_id := id[4];
+    if (not exists (select 1 from CAL.WA.EVENTS where E_ID = item_id))
+      return -1;
+
+    rc := CAL.WA.acl_check (domain_id, item_id);
+  }
+  else
+  {
+    rc := CAL.WA.acl_check (domain_id);
+  }
+  if (rc <> '')
+  {
+    if ((rc = 'R') and (req = '1__'))
+      return http_nobody_uid ();
+
+    if ((rc = 'W') and (req = '11_'))
+      return http_nobody_uid ();
+  }
+  return -20;
+}
+;
+
+--| This exactly matches DAV_AUTHENTICATE_HTTP (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer
+--| The function should fully check access because DAV_AUTHENTICATE_HTTP do nothing with auth data either before or after calling this DET function.
+--| Unlike DAV_AUTHENTICATE, user name passed to DAV_AUTHENTICATE_HTTP header may not match real DAV user.
+--| If DET call is successful, DAV_AUTHENTICATE_HTTP checks whether the user have read permission on mount point collection.
+--| Thus even if DET function allows anonymous access, the whole request may fail if mountpoint is not readable by public.
+create function "CalDAV_DAV_AUTHENTICATE_HTTP" (
+  in id any,
+  in what char(1),
+  in req varchar,
+  in can_write_http integer,
+  inout a_lines any,
+  inout a_uname varchar,
+  inout a_pwd varchar,
+  inout a_uid integer,
+  inout a_gid integer,
+  inout _perms varchar) returns integer
+{
+  -- dbg_obj_princ ('CalDAV_DAV_AUTHENTICATE_HTTP (', id, what, req, can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, _perms, ')');
+  declare domain_id, item_id integer;
+  declare rc any;
+
+  rc := '';
+  domain_id := id[3];
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+    return -1;
+
+  if ('R' = what)
+  {
+    item_id := id[4];
+    if (not exists (select 1 from CAL.WA.EVENTS where E_ID = item_id))
+      return -1;
+
+    rc := CAL.WA.acl_check (domain_id, item_id);
+  }
+  else
+  {
+    rc := CAL.WA.acl_check (domain_id);
+  }
+  if (rc <> '')
+  {
+    a_uid := http_nobody_uid ();
+    a_gid := http_nogroup_gid ();
+    if (rc = 'R')
+      _perms := '1__';
+    else if (rc = 'W')
+      _perms := '11_';
+
+    return a_uid;
+  }
+  return -20;
+}
+;
+
+--| This matches DAV_GET_PARENT (in id any, in st char(1), in path varchar) returns any
+create function "CalDAV_DAV_GET_PARENT" (in id any, in st char(1), in path varchar) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_GET_PARENT (', id, st, path, ')');
+  return -20;
+}
+;
+
+--| When DAV_COL_CREATE_INT calls DET function, authentication, check for lock and check for overwrite are passed, uid and gid are translated from strings to IDs.
+--| Check for overwrite, but the deletion of previously existing collection should be made by DET function.
+create function "CalDAV_DAV_COL_CREATE" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_COL_CREATE (', detcol_id, path_parts, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| It looks like that this is redundant and should be removed at all.
+create function "CalDAV_DAV_COL_MOUNT" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_COL_MOUNT (', detcol_id, path_parts, full_mount_path, mount_det, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| It looks like that this is redundant and should be removed at all.
+create function "CalDAV_DAV_COL_MOUNT_HERE" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_COL_MOUNT_HERE (', parent_id, full_mount_path, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_DELETE_INT calls DET function, authentication and check for lock are passed.
+create function "CalDAV_DAV_DELETE" (
+  in detcol_id any,
+  in path_parts any,
+  in what char(1),
+  in silent integer,
+  in auth_uid integer) returns integer
+{
+  -- dbg_obj_princ ('CalDAV_DAV_DELETE (', detcol_id, path_parts, what, silent, auth_uid, ')');
+  declare top_id any;
+  declare rc, owner_uid, domain_id integer;
+
+  if ('C' = what)
+    return -20;
+
+  top_id := "CalDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, what, owner_uid, domain_id);
+  if (top_id = -1)
+    return -20;
+
+  rc := CAL.WA.event_delete (top_id[4]);
+  return rc;
+}
+;
+
+--| When DAV_RES_UPLOAD_STRSES_INT calls DET function, authentication and check for locks are performed before the call.
+--| There's a special problem, known as 'Transaction deadlock after reading from HTTP session'.
+--| The DET function should do only one INSERT of the 'content' into the table and do it as late as possible.
+--| The function should return -29 if deadlocked or otherwise broken after reading blob from HTTP.
+create function "CalDAV_DAV_RES_UPLOAD" (
+  in detcol_id any,
+  in path_parts any,
+  inout content any,
+  in type varchar,
+  in permissions varchar,
+  in uid integer,
+  in gid integer,
+  in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_RES_UPLOAD (', detcol_id, path_parts, ', [content], ', content, type, permissions, uid, gid, auth_uid, ')');
+  declare top_id, res any;
+  declare owner_uid, domain_id, rc integer;
+
+  top_id := "CalDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, 'R', owner_uid, domain_id);
+  if (top_id <> -1)
+  {
+    rc := CAL.WA.event_delete (top_id[4]);
+    if (rc < 1)
+      return -20;
+  }
+  if (__tag (content) = 126)
+  {
+    declare real_content any;
+
+    real_content := http_body_read (1);
+    content := string_output_string (real_content);  -- check if bellow code can work with string session and if so remove this line
+  }
+  res := CAL.WA.import_vcal (domain_id, content);
+  if (length (res) > 0)
+    return vector (CalDAV__UNAME(), detcol_id, uid, domain_id, path_parts[1], 0);
+
+  return -20;
+}
+;
+
+
+--| When DAV_PROP_REMOVE_INT calls DET function, authentication and check for locks are performed before the call.
+--| The check whether it's a system name or not is _not_ permitted.
+create function "CalDAV_DAV_PROP_REMOVE" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer
+{
+  -- dbg_obj_princ ('CalDAV_DAV_PROP_REMOVE (', id, what, propname, silent, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_PROP_SET_INT calls DET function, authentication and check for locks are performed before the call.
+--| The check whether it's a system property or not is _not_ permitted and the function should return -16 for live system properties.
+create function "CalDAV_DAV_PROP_SET" (
+  in id any,
+  in what char(0),
+  in propname varchar,
+  in propvalue any,
+  in overwrite integer,
+  in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_PROP_SET (', id, what, propname, propvalue, overwrite, auth_uid, ')');
+  if (propname = 'virt:aci_meta')
+  {
+    declare domain_id, item_id integer;
+
+    domain_id := id[3];
+    if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+      return -1;
+
+    if ('R' = what)
+    {
+      item_id := id[4];
+      if (not exists (select 1 from CAL.WA.EVENTS where E_ID = item_id))
+        return -1;
+
+      update CAL.WA.EVENTS set E_PRIVACY = 2 where E_DOMAIN_ID = domain_id and E_ID = item_id;
+      CAL.WA.event_update_acl (item_id, serialize (propvalue));
+    }
+    else
+    {
+      update DB.DBA.WA_INSTANCE
+         set WAI_ACL = serialize (propvalue)
+       where WAI_ID = domain_id;
+    }
+    return 1;
+  }
+  if (propname[0] = 58)
+    return -16;
+
+  return -20;
+}
+;
+
+--| When DAV_PROP_GET_INT calls DET function, authentication and check whether it's a system property are performed before the call.
+create function "CalDAV_DAV_PROP_GET" (
+  in id any,
+  in what char(0),
+  in propname varchar,
+  in auth_uid integer)
+{
+  -- dbg_obj_princ ('CalDAV_DAV_PROP_GET (', id, what, propname, auth_uid, ')');
+  if ('virt:aci_meta' = propname)
+  {
+    declare domain_id, item_id integer;
+
+    domain_id := id[3];
+    if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+      return -1;
+
+    if ('R' = what)
+    {
+      item_id := id[4];
+      if (not exists (select 1 from CAL.WA.EVENTS where E_ID = item_id))
+        return -1;
+
+      return (select deserialize (E_ACL) from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_ID = item_id and E_PRIVACY = 2);
+    }
+    else
+    {
+      return (select deserialize (WAI_ACL) from DB.DBA.WA_INSTANCE where WAI_ID = domain_id);
+    }
+  }
+  if (':virtdet' = propname)
+  {
+    return CalDAV__UNAME();
+  }
+  return -11;
+}
+;
+
+--| When DAV_PROP_LIST_INT calls DET function, authentication is performed before the call.
+--| The returned list should contain only user properties.
+create function "CalDAV_DAV_PROP_LIST" (in id any, in what char(0), in propmask varchar, in auth_uid integer)
+{
+  -- dbg_obj_princ ('CalDAV_DAV_PROP_LIST (', id, what, propmask, auth_uid, ')');
+  return vector ();
+}
+;
+
+--| When DAV_PROP_GET_INT or DAV_DIR_LIST_INT calls DET function, authentication is performed before the call.
+create function "CalDAV_DAV_DIR_SINGLE" (
+  in id any,
+  in what char(0),
+  in path any,
+  in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_DIR_SINGLE (', id, what, path, auth_uid, ')');
+  declare domain_id integer;
+  declare colname, fullpath, rightcol varchar;
+  declare maxrcvdate datetime;
+  declare owner_gid, owner_uid integer;
+  declare access varchar;
+
+  CalDAV__ACCESS_PARAMS (id[1], access, owner_gid, owner_uid);
+
+  domain_id := id[3];
+  if (maxrcvdate is null)
+    maxrcvdate := coalesce ( (select max(E_UPDATED) from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id), cast ('1980-01-01' as datetime));
+
+  if (cast (maxrcvdate as integer) = 0)
+    maxrcvdate := cast ('1980-01-01' as datetime);
+
+  colname := (select CalDAV__FIXNAME (C.WAI_NAME)
+                from SYS_USERS A,
+                     WA_MEMBER B,
+                     WA_INSTANCE C
+               where A.U_ID = id[2]
+                 and B.WAM_USER = A.U_ID
+                 and B.WAM_MEMBER_TYPE = 1
+                 and B.WAM_INST = C.WAI_NAME
+                 and C.WAI_TYPE_NAME = 'Calendar'
+                 and C.WAI_ID = domain_id);
+  if (DAV_HIDE_ERROR (colname) is null)
+    return -1;
+
+  if (path is not null)
+  {
+    rightcol := path[length(path) - 2];
+    if ('C' = what)
+      return vector (DAV_CONCAT_PATH ('/', path), 'C', 0, maxrcvdate, id, access, 0, id[2], maxrcvdate, 'dav/unix-directory', rightcol );
+  }
+  fullpath := DAV_CONCAT_PATH (DAV_SEARCH_PATH (id[1], 'C'), colname || '/');
+  if ('C' = what)
+  {
+    if (id[4] > 0)
+      return -1;
+
+    return vector (fullpath, 'C', 0, maxrcvdate, id, access, 0, id[2], maxrcvdate, 'dav/unix-directory', colname );
+  }
+  for (select CalDAV__COMPOSE_ICS_NAME(E_UID) as orig_mname, E_UPDATED from CAL.WA.EVENTS where E_ID = id[4]) do
+    return vector (fullpath || orig_mname, 'R', 1024, E_UPDATED, id, access, 0, id[2], E_UPDATED, 'text/calendar', orig_mname);
+
+  return -1;
+}
+;
+
+--| When DAV_PROP_GET_INT or DAV_DIR_LIST_INT calls DET function, authentication is performed before the call.
+create function "CalDAV_DAV_DIR_LIST" (
+  in detcol_id any,
+  in path_parts any,
+  in detcol_path varchar,
+  in name_mask varchar,
+  in recursive integer,
+  in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_DIR_LIST (', detcol_id, path_parts, detcol_path, name_mask, recursive, auth_uid,  ')');
+  declare domain_id, owner_gid, owner_uid integer;
+  declare top_davpath, access varchar;
+  declare res any;
+  declare top_id any;
+  declare what char (1);
+
+  CalDAV__ACCESS_PARAMS (detcol_id, access, owner_gid, owner_uid);
+  what := case when ((0 = length (path_parts)) or ('' = path_parts[length (path_parts) - 1])) then 'C' else 'R' end;
+  if (isarray (detcol_id) and (recursive = -1))
+    return "CalDAV_DAV_DIR_SINGLE" (detcol_id, what, CalDAV_DAV_SEARCH_PATH (detcol_id, what), auth_uid);
+
+  domain_id := 0;
+  if (('C' = what) and (1 = length (path_parts)))
+  {
+    top_id := vector (CalDAV__UNAME(), detcol_id, owner_uid, 0, 0, 0); -- may be a fake id because top_id[3] may be NULL
+  } else {
+    top_id := "CalDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, what, owner_uid, domain_id);
+  }
+  if (DAV_HIDE_ERROR (top_id) is null)
+    return vector();
+
+  top_davpath := DAV_CONCAT_PATH (detcol_path, path_parts);
+  if ('R' = what)
+    return vector ("CalDAV_DAV_DIR_SINGLE" (top_id, what, top_davpath, auth_uid));
+
+  res := vector();
+  if ('C' = what)
+  {
+    -- Top level
+    if (top_id[3] = 0)
+    {
+      for select CalDAV__FIXNAME(C.WAI_NAME) as orig_name,
+                 C.WAI_ID as dom_id
+            from SYS_USERS A,
+                 WA_MEMBER B,
+                 WA_INSTANCE C
+           where A.U_ID = owner_uid
+             and B.WAM_USER = A.U_ID
+             and B.WAM_MEMBER_TYPE = 1
+             and B.WAM_INST = C.WAI_NAME
+             and C.WAI_TYPE_NAME = 'Calendar'
+      do
+      {
+        res := vector_concat (res, vector (vector (DAV_CONCAT_PATH (top_davpath, orig_name) || '/', 'C', 0, now(),
+                vector (CalDAV__UNAME(), detcol_id, owner_uid, dom_id, 0, 0),
+                access, owner_gid, owner_uid, now(), 'dav/unix-directory', orig_name) ) );
+      }
+      return res;
+    }
+  }
+  for (select CalDAV__COMPOSE_ICS_NAME(E_UID) as orig_mname, E_ID, E_UPDATED
+         from CAL.WA.EVENTS
+        where E_DOMAIN_ID = top_id[3]) do
+  {
+    res := vector_concat (res, vector (vector (DAV_CONCAT_PATH (top_davpath, orig_mname), 'R', 1024, E_UPDATED,
+    vector (CalDAV__UNAME(), detcol_id, owner_uid, top_id[3], E_ID, 0),
+    access, owner_gid, owner_uid, E_UPDATED, 'text/calendar', orig_mname) ) );
+  }
+  return res;
+}
+;
+
+create procedure "CalDAV_DAV_FC_PRED_METAS" (inout pred_metas any)
+{
+    pred_metas := vector (
+      'E_ID',             vector ('EVENTS'      , 0, 'integer'  , 'E_ID'   ),
+      'E_DOMAIN_ID',      vector ('EVENTS'      , 0, 'integer'  , 'E_DOMAIN_ID'   ),
+      'RES_NAME',         vector ('EVENTS'      , 0, 'varchar'  , 'CalDAV__COMPOSE_ICS_NAME(_top.E_UID)'),
+      'RES_FULL_PATH',    vector ('EVENTS'      , 0, 'varchar'  , 'concat (DAV_CONCAT_PATH (_param.detcolpath, ''calendar''), CalDAV__FIXNAME (WAI_NAME), ''/'', CalDAV__COMPOSE_ICS_NAME (_top.E_UID)'),
+      'RES_TYPE',         vector ('EVENTS'      , 0, 'varchar'  , '(''text/calendar'')'),
+      'RES_OWNER_ID',     vector ('SYS_USERS'   , 0, 'integer'  , 'U_ID'        ),
+      'RES_OWNER_NAME',   vector ('SYS_USERS'   , 0, 'varchar'  , 'U_NAME'      ),
+      'RES_GROUP_ID',     vector ('SYS_USERS'   , 0, 'integer'  , 'http_nogroup_gid()'  ),
+      'RES_GROUP_NAME',   vector ('SYS_USERS'   , 0, 'varchar'  , '(''nogroup'')'       ),
+      'RES_COL_FULL_PATH',vector ('EVENTS'      , 0, 'varchar'  , 'concat (DAV_CONCAT_PATH (_param.detcolpath, ''calendar''), CalDAV__FIXNAME (WAI_NAME), ''/'')'      ),
+      'RES_COL_NAME',     vector ('EVENTS'      , 0, 'varchar'  , 'CalDAV__FIXNAME (WAI_NAME)'   ),
+      'RES_CR_TIME',      vector ('EVENTS'      , 0, 'datetime' , 'E_UPDATED'        ),
+      'RES_MOD_TIME',     vector ('EVENTS'      , 0, 'datetime' , 'E_UPDATED'  ),
+      'RES_PERMS',        vector ('EVENTS'      , 0, 'varchar'  , '(''110100000RR'')'   ),
+      'RES_CONTENT',      vector ('EVENTS'      , 0, 'text'     , 'E_DESCRIPTION'   ),
+      'PROP_NAME',        vector ('EVENTS'      , 0, 'varchar'  , '(''E_DESCRIPTION'')' ),
+      'PROP_VALUE',       vector ('SYS_DAV_PROP', 1, 'text'     , 'E_DESCRIPTION'   ),
+      'RES_TAGS',         vector ('all-tags'    , 0, 'varchar'  , 'E_TAGS'  ), -- 'varchar', not 'text-tag' because there's no free-text on union
+      'RES_PUBLIC_TAGS',  vector ('public-tags' , 0, 'varchar'  , 'E_TAGS'  ), -- 'varchar', not 'text-tag' because there's no free-text in table!
+      'RES_PRIVATE_TAGS', vector ('private-tags', 0, 'varchar'  , 'E_TAGS'  ), -- 'varchar', not 'text-tag' because there's no free-text in table!
+      'RDF_PROP',         vector ('fake-prop'   , 1, 'varchar'  , NULL  ),
+      'RDF_VALUE',        vector ('fake-prop'   , 2, 'XML'      , NULL  ),
+      'RDF_OBJ_VALUE',    vector ('fake-prop'   , 3, 'XML'      , NULL  )
+    );
+}
+;
+
+create procedure "CalDAV_DAV_FC_TABLE_METAS" (inout table_metas any)
+{
+  table_metas := vector (
+    'EVENTS'             , vector (      ''      ,
+                                        ''      ,
+                                                'E_SUBJECT'    , 'E_SUBJECT'  , '[__quiet] /' ),
+    'WA_INSTANCE'         , vector (      ''      ,
+                                        ''      ,
+                                                'WAI_NAME'     , 'WAI_NAME'   , '[__quiet] /' ),
+    'WA_MEMBER'         , vector (      ''      ,
+                                        ''      ,
+                                                'WAM_INST'     , 'WAM_INST'   , '[__quiet] /' ),
+
+    'SYS_USERS'   , vector (      ''      ,
+                                        ''      ,
+                                                NULL            , NULL          , NULL          ),
+    'public-tags'   , vector (  '  '    ,
+                                    ''  ,
+                        'E_TAGS'    , 'E_TAGS'  , NULL  ),
+    'private-tags'  , vector (  ' ' ,
+                    ' ' ,
+                        'E_TAGS'    , 'E_TAGS'  , NULL  ),
+    'all-tags'      , vector (  ' ' ,
+                    ' ' ,
+                        'E_TAGS'    , 'E_TAGS'  , NULL  ),
+    'fake-prop' , vector (  '\n  inner join WS.WS.SYS_DAV_PROP as ^{alias}^ on ((^{alias}^.PROP_PARENT_ID is null) and (^{alias}^.PROP_TYPE = ''R'')^{andpredicates}^)' ,
+                    '\n  exists (select 1 from WS.WS.SYS_DAV_PROP as ^{alias}^ where (^{alias}^.PROP_PARENT_ID is null) and (^{alias}^.PROP_TYPE = ''R'')^{andpredicates}^)'    ,
+                        'PROP_VALUE'    , 'PROP_VALUE'  , '[__quiet __davprop xmlns:virt="virt"] fakepropthatprobablyneverexists'   )
+    );
+}
+;
+
+create function "CalDAV_DAV_FC_PRINT_WHERE" (inout filter any, in param_uid integer) returns varchar
+{
+  -- dbg_obj_princ ('Blog_POST_DAV_FC_PRINT_WHERE (', filter, param_uid, ')');
+  declare pred_metas, cmp_metas, table_metas any;
+  declare used_tables any;
+
+  "CalDAV_DAV_FC_PRED_METAS" (pred_metas);
+  DAV_FC_CMP_METAS (cmp_metas);
+  "CalDAV_DAV_FC_TABLE_METAS" (table_metas);
+  used_tables := vector(
+      'EVENTS', vector ('EVENTS', '_top', null, vector (), vector (), vector ()),
+      'WA_INSTANCE', vector ('WA_INSTANCE', '_instances', null, vector (), vector (), vector ()),
+      'WA_MEMBER', vector ('WA_MEMBER', '_members', null, vector (), vector (), vector ()),
+      'SYS_USERS', vector ('SYS_USERS', '_users', null, vector (), vector (), vector ())
+  );
+  return DAV_FC_PRINT_WHERE_INT (filter, pred_metas, cmp_metas, table_metas, used_tables, param_uid);
+}
+;
+
+--| When DAV_DIR_FILTER_INT calls DET function, authentication is performed before the call and compilation is initialized.
+create function "CalDAV_DAV_DIR_FILTER" (in detcol_id any, in path_parts any, in detcol_path any, inout compilation any, in recursive integer, in auth_uid integer) returns any
+{
+    --dbg_obj_princ ('CalDAV_DAV_DIR_FILTER (', detcol_id, path_parts, detcol_path, compilation, recursive, auth_uid, ')');
+    declare st, access, qry_text, execstate, execmessage varchar;
+    declare res any;
+    declare cond_list, execmeta, execrows any;
+    declare sub, post_id, condtext, cond_key varchar;
+    declare owner_gid, owner_uid, domain_id integer;
+    CalDAV__ACCESS_PARAMS (detcol_id, access, owner_gid, owner_uid);
+    vectorbld_init (res);
+    sub := null;
+    post_id := null;
+    if (((length (path_parts) <= 1) and (recursive <> 1)) or (length (path_parts) > 2))
+    {
+      -- dbg_obj_princ ('\r\nGoto skip_post_level\r\n');
+      goto finalize;
+    }
+    if (length (path_parts) >= 2)
+    {
+        sub := path_parts[0];
+        if (sub = 'calendars')
+        {
+            domain_id := coalesce ((select C.WAI_ID
+                from SYS_USERS A,
+                WA_MEMBER B,
+                WA_INSTANCE C
+            where A.U_ID = owner_uid
+              and B.WAM_USER = A.U_ID
+              and B.WAM_MEMBER_TYPE = 1
+              and B.WAM_INST = C.WAI_NAME
+              and C.WAI_TYPE_NAME = 'Calendar'
+              and CalDAV__FIXNAME(C.WAI_NAME) = path_parts[1]));
+            if (domain_id is null)
+                goto finalize;
+        }
+        else
+            goto finalize;
+    }
+    cond_key := sprintf ('Calendar&%d', coalesce (domain_id, 0));
+    condtext := get_keyword (cond_key, compilation);
+    if (condtext is null and 0)
+    {
+      cond_list := get_keyword ('', compilation);
+      if (sub is not null)
+        cond_list := vector_concat (cond_list, vector ( vector ('E_DOMAIN_ID', '=', domain_id)));
+      condtext := "CalDAV_DAV_FC_PRINT_WHERE" (cond_list, auth_uid);
+      compilation := vector_concat (compilation, vector (cond_key, condtext));
+    }
+    execstate := '00000';
+        qry_text := 'select concat (DAV_CONCAT_PATH (_param.detcolpath, ''calendar''), ''/'', CalDAV__FIXNAME (WAI_NAME), ''/'', CalDAV__COMPOSE_ICS_NAME (_top.E_UID)),
+        ''R'', 1024, _top.E_UPDATED,
+                vector (CalDAV__UNAME(), ?, _users.U_ID, 3, _top.E_DOMAIN_ID, 0, 0, 0, 0),
+                ''110100000RR'', http_nogroup_gid(), _users.U_ID, _top.E_UPDATED, ''text/calendar'', CalDAV__COMPOSE_ICS_NAME (_top.E_UID)
+        from
+        (select top 1 ? as detcolpath from WS.WS.SYS_DAV_COL) as _param,
+        CAL.WA.EVENTS as _top
+        join DB.DBA.WA_INSTANCE as _instances on (WAI_ID = E_DOMAIN_ID and WAI_TYPE_NAME = ''Calendar'')
+                join DB.DBA.WA_MEMBER as _members on (WAM_MEMBER_TYPE = 1 and WAM_INST = WAI_NAME)
+                join DB.DBA.SYS_USERS as _users on (WAM_USER = U_ID and U_ID = ?)
+        ' || condtext;
+      exec (qry_text, execstate, execmessage,
+        vector (detcol_id, detcol_path, owner_uid),
+        110100000, execmeta, execrows );
+      if ('00000' <> execstate)
+        signal (execstate, execmessage || ' in ' || qry_text);
+      vectorbld_concat_acc (res, execrows);
+finalize:
+    vectorbld_final (res);
+    return res;
+}
+;
+
+create function "CalDAV_DAV_SEARCH_ID_IMPL" (
+  in detcol_id any,
+  in path_parts any,
+  in what char(1),
+  inout owner_uid integer,
+  inout domain_id integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_SEARCH_ID_IMPL (', detcol_id, path_parts, what, owner_uid, domain_id, ')');
+  declare owner_gid, ctr, len integer;
+  declare hitlist any;
+  declare access, colpath varchar;
+
+  CalDAV__ACCESS_PARAMS (detcol_id, access, owner_gid, owner_uid);
+  if (0 = length (path_parts))
+  {
+    if ('C' <> what)
+      return -1;
+
+    return vector (CalDAV__UNAME(), detcol_id, owner_uid, domain_id, 0, 0);
+  }
+  if ('' = path_parts[length (path_parts) - 1])
+  {
+    if ('C' <> what)
+      return -1;
+  }
+  else
+  {
+    if ('R' <> what)
+      return -1;
+  }
+  len := length (path_parts) - 1;
+  ctr := 0;
+  while (ctr < len)
+  {
+    if (ctr = 0)
+    {
+      hitlist := vector ();
+      for (select C.WAI_ID as D_ID
+             from SYS_USERS A,
+                  WA_MEMBER B,
+                  WA_INSTANCE C
+            where A.U_ID = owner_uid
+              and B.WAM_USER = A.U_ID
+              and B.WAM_MEMBER_TYPE = 1
+              and B.WAM_INST = C.WAI_NAME
+              and C.WAI_TYPE_NAME = 'Calendar'
+              and CalDAV__FIXNAME (C.WAI_NAME) = path_parts[ctr]) do
+      {
+        hitlist := vector_concat (hitlist, vector (D_ID));
+      }
+      if (length (hitlist) <> 1)
+        return -1;
+
+      domain_id := hitlist[0];
+    }
+    else if (ctr = 1 and len > 1)
+    {
+      return -1;
+    }
+    ctr := ctr + 1;
+  }
+  if ('C' = what)
+    return vector (CalDAV__UNAME(), detcol_id, owner_uid, domain_id, 0, 0);
+
+  hitlist := vector ();
+  for (select distinct E_ID from CAL.WA.EVENTS where CalDAV__COMPOSE_ICS_NAME (E_UID) = path_parts[ctr] and E_DOMAIN_ID = domain_id) do
+  {
+    hitlist := vector_concat (hitlist, vector (E_ID));
+  }
+  if (length (hitlist) <> 1)
+    return -1;
+
+  return vector (CalDAV__UNAME(), detcol_id, owner_uid, domain_id, hitlist[0], 0);
+}
+;
+
+--| When DAV_PROP_GET_INT or DAV_DIR_LIST_INT calls DET function, authentication is performed before the call.
+create function "CalDAV_DAV_SEARCH_ID" (in detcol_id any, in path_parts any, in what char(1)) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_SEARCH_ID (', detcol_id, path_parts, what, ')');
+  declare owner_uid, domain_id integer;
+
+  return "CalDAV_DAV_SEARCH_ID_IMPL" (detcol_id, path_parts, what, owner_uid, domain_id);
+}
+;
+
+--| When DAV_SEARCH_PATH_INT calls DET function, authentication is performed before the call.
+create function "CalDAV_DAV_SEARCH_PATH" (
+  in id any,
+  in what char(1)) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_SEARCH_PATH (', id, what, ')');
+  declare path varchar;
+  declare domain_id, item_id integer;
+
+  path := DAV_SEARCH_PATH (id[1], 'C');
+  domain_id := id[3];
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = domain_id))
+    return null;
+
+  path := path || CalDAV__FIXNAME (CAL.WA.domain_name (domain_id)) || '/';
+  if ('C' = what)
+    return path;
+
+  item_id := id[4];
+  for (select E_UID from CAL.WA.EVENTS where E_ID = item_id) do
+    return  path || CalDAV__COMPOSE_ICS_NAME (E_UID);
+
+  return null;
+}
+;
+
+--| When DAV_COPY_INT calls DET function, authentication and check for locks are performed before the call, but no check for existing/overwrite.
+create function "CalDAV_DAV_RES_UPLOAD_COPY" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_RES_UPLOAD_COPY (', detcol_id, path_parts, source_id, what, overwrite_flags, permissions, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_COPY_INT calls DET function, authentication and check for locks are performed before the call, but no check for existing/overwrite.
+create function "CalDAV_DAV_RES_UPLOAD_MOVE" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_RES_UPLOAD_MOVE (', detcol_id, path_parts, source_id, what, overwrite_flags, auth_uid, ')');
+  return -20;
+}
+;
+
+--| When DAV_RES_CONTENT or DAV_RES_COPY_INT or DAV_RES_MOVE_INT calls DET function, authentication is made.
+--| If content_mode is 1 then content is a valid output stream before the call.
+create function "CalDAV_DAV_RES_CONTENT" (in id any, inout content any, out type varchar, in content_mode integer) returns integer
+{
+  --dbg_obj_princ ('CalDAV_DAV_RES_CONTENT (', id, ', content, type, ', content_mode, ')');
+  if (id[4] < 0)
+  {
+    type := 'text/xml';
+    if (id[4] = -1)
+      content := CAL.WA.export_rss_sqlx_for_det (id[3], id[2]);
+    if (id[4] = -2)
+      content := CAL.WA.export_atom_sqlx_for_det (id[3], id[2]);
+    if (id[4] = -3)
+      content := CAL.WA.export_rdf_sqlx_for_det (id[3], id[2]);
+    return 0;
+  }
+  declare tz integer;
+
+  type := 'text/calendar';
+  whenever not found goto endline;
+  tz := timezone(now());
+  if (id[4] is not null)
+  {
+    content := CAL.WA.det_export_vcal (id[3], tz, id[4]);
+  }
+endline:
+  return 0;
+}
+;
+
+--| This adds an extra access path to the existing resource or collection.
+create function "CalDAV_DAV_SYMLINK" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_SYMLINK (', detcol_id, path_parts, source_id, overwrite, uid, gid, auth_uid, ')');
+  return -20;
+}
+;
+
+--| This gets a list of resources and/or collections as it is returned by DAV_DIR_LIST and and writes the list of quads (old_id, 'what', old_full_path, dereferenced_id, dereferenced_full_path).
+create function "CalDAV_DAV_DEREFERENCE_LIST" (in detcol_id any, inout report_array any) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_DEREFERENCE_LIST (', detcol_id, report_array, ')');
+  return -20;
+}
+;
+
+--| This gets one of reference quads returned by ..._DAV_REREFERENCE_LIST() and returns a record (new_full_path, new_dereferenced_full_path, name_may_vary).
+create function "CalDAV_DAV_RESOLVE_PATH" (in detcol_id any, inout reference_item any, inout old_base varchar, inout new_base varchar) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_RESOLVE_PATH (', detcol_id, reference_item, old_base, new_base, ')');
+  return -20;
+}
+;
+
+--| There's no API function to lock for a while (do we need such?) The "LOCK" DAV method checks that all parameters are valid but does not check for existing locks.
+create function "CalDAV_DAV_LOCK" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_LOCK (', path, id, type, locktype, scope, token, owner_name, owned_tokens, depth, timeout_sec, owner_name, auth_uid, ')');
+  if (isinteger (id) and (id = -1))
+    return 1;
+
+  return -20;
+}
+;
+
+--| There's no API function to unlock for a while (do we need such?) The "UNLOCK" DAV method checks that all parameters are valid but does not check for existing locks.
+create function "CalDAV_DAV_UNLOCK" (in id any, in type char(1), in token varchar, in auth_uid integer)
+{
+  -- dbg_obj_princ ('CalDAV_DAV_UNLOCK (', id, type, token, auth_uid, ')');
+  return -27;
+}
+;
+
+--| The caller does not check if id is valid.
+--| This returns -1 if id is not valid, 0 if all existing locks are listed in owned_tokens whitespace-delimited list, 1 for soft 2 for hard lock.
+create function "CalDAV_DAV_IS_LOCKED" (inout id any, inout type char(1), in owned_tokens varchar) returns integer
+{
+  -- dbg_obj_princ ('CalDAV_DAV_IS_LOCKED (', id, type, owned_tokens, ')');
+  return 0;
+}
+;
+
+--| The caller does not check if id is valid.
+--| This returns -1 if id is not valid, list of tuples (LOCK_TYPE, LOCK_SCOPE, LOCK_TOKEN, LOCK_TIMEOUT, LOCK_OWNER, LOCK_OWNER_INFO) otherwise.
+create function "CalDAV_DAV_LIST_LOCKS" (in id any, in type char(1), in recursive integer) returns any
+{
+  -- dbg_obj_princ ('CalDAV_DAV_LIST_LOCKS" (', id, type, recursive);
+  return vector ();
+}
+;
+
+create function CalDAV__UNAME () returns any
+{
+  return UNAME'CalDAV';
+}
+;
+
+create function CalDAV__FIXNAME (
+  in name any) returns varchar
+{
+  return
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (
+    replace (name, '/', '_'), '\\', '_'), ':', '_'), '+', '_'), '\"', '_'), '[', '_'), ']', '_'), '''', '_'), ' ', '_');
+}
+;
+
+create function CalDAV__COMPOSE_ICS_NAME (
+  in uid varchar) returns varchar
+{
+  return replace(sprintf('%s.ics', uid), '@', '-');
+}
+;
+
+create function CalDAV__ACCESS_PARAMS (
+  in detcol_id any,
+  out access varchar,
+  out gid integer,
+  out uid integer)
+{
+  whenever not found goto ret;
+
+  access := '110000000NN';
+  gid := http_nogroup_gid ();
+  uid := http_nobody_uid ();
+  if (isinteger (detcol_id))
+    select COL_PERMS, COL_GROUP, COL_OWNER into access, gid, uid from WS.WS.SYS_DAV_COL where COL_ID = detcol_id;
+
+ret: ;
+}
+;
+
+create procedure CAL.WA.det_export_vcal(
+  in domain_id integer,
+  in tz integer,
+  in event_id integer)
+{
+  declare S, url, tzID, tzName varchar;
+  declare sStream any;
+
+  tzID := sprintf ('GMT%s%04d', case when cast (tz as integer) < 0 then '-' else '+' end,  tz);
+  tzName := sprintf ('GMT %s%02d:00', case when cast (tz as integer) < 0 then '-' else '+' end,  abs(floor (tz / 60)));
+  sStream := string_output();
+  -- start
+  http ('BEGIN:VCALENDAR\r\n', sStream);
+  http ('PRODID:-//OpenLink Software//OpenLink ODS Calendar 0.1//EN\r\n', sStream);
+  http ('VERSION:2.0\r\n', sStream);
+  http ('CALSCALE:GREGORIAN\r\n', sStream);
+  http ('BEGIN:VTIMEZONE\r\n', sStream);
+  http (sprintf ('TZID:%s\r\n', tzID), sStream);
+  http ('BEGIN:STANDARD\r\n', sStream);
+  http (sprintf ('TZOFFSETTO:%s\r\n', CAL.WA.tz_string (tz)), sStream);
+  http (sprintf ('TZNAME:%s\r\n', tzName), sStream);
+  http ('END:STANDARD\r\n', sStream);
+  http ('END:VTIMEZONE\r\n', sStream);
+  -- events
+  for (select * from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_KIND = 0 and E_ID = event_id) do
+  {
+    http ('BEGIN:VEVENT\r\n', sStream);
+    url := sprintf ('http://%s%s/%U/calendar/%U/Event/', SIOC.DBA.get_cname(), SIOC.DBA.get_base_path (), CAL.WA.domain_owner_name (domain_id), CAL.WA.domain_name (domain_id));
+    CAL.WA.export_vcal_line ('UID', cast (E_UID as varchar), sStream);
+    --CAL.WA.export_vcal_line ('URL', url || cast (E_ID as varchar), sStream);
+    CAL.WA.export_vcal_line ('DTSTAMP', CAL.WA.vcal_date2utc (now ()), sStream);
+    CAL.WA.export_vcal_line ('CREATED', CAL.WA.vcal_date2utc (E_CREATED), sStream);
+    CAL.WA.export_vcal_line ('LAST-MODIFIED', CAL.WA.vcal_date2utc (E_UPDATED), sStream);
+    CAL.WA.export_vcal_line ('SUMMARY', E_SUBJECT, sStream);
+    CAL.WA.export_vcal_line ('DESCRIPTION', E_DESCRIPTION, sStream);
+    CAL.WA.export_vcal_line ('LOCATION', E_LOCATION, sStream);
+    --CAL.WA.export_vcal_line ('CATEGORIES', replace (E_TAGS, ',', ';'), sStream);
+    if (E_EVENT_START is not null)
+      CAL.WA.export_vcal_line ('DTSTART', CAL.WA.vcal_date2utc (E_EVENT_START), sStream);
+    if (E_EVENT_END is not null)
+      CAL.WA.export_vcal_line ('DTEND', CAL.WA.vcal_date2utc (E_EVENT_END), sStream);
+    CAL.WA.export_vcal_line ('RRULE', CAL.WA.vcal_recurrence2str (E_REPEAT, E_REPEAT_PARAM1, E_REPEAT_PARAM2, E_REPEAT_PARAM3, E_REPEAT_UNTIL), sStream);
+    --CAL.WA.export_vcal_line ('DALARM', CAL.WA.vcal_reminder2str (E_REMINDER), sStream);
+    http ('END:VEVENT\r\n', sStream);
+  }
+  -- tasks
+  for (select * from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_KIND = 1 and E_ID = event_id) do
+  {
+    http ('BEGIN:VTODO\r\n', sStream);
+    url := sprintf ('http://%s%s/%U/calendar/%U/Task/', SIOC.DBA.get_cname(), SIOC.DBA.get_base_path (), CAL.WA.domain_owner_name (domain_id), CAL.WA.domain_name (domain_id));
+    CAL.WA.export_vcal_line ('UID', cast (E_UID as varchar), sStream);
+    --CAL.WA.export_vcal_line ('URL', url || cast (E_ID as varchar), sStream);
+    CAL.WA.export_vcal_line ('DTSTAMP', CAL.WA.vcal_date2utc (now ()), sStream);
+    CAL.WA.export_vcal_line ('CREATED', CAL.WA.vcal_date2utc (E_CREATED), sStream);
+    CAL.WA.export_vcal_line ('LAST-MODIFIED', CAL.WA.vcal_date2utc (E_UPDATED), sStream);
+    CAL.WA.export_vcal_line ('SUMMARY', E_SUBJECT, sStream);
+    CAL.WA.export_vcal_line ('DESCRIPTION', E_DESCRIPTION, sStream);
+    --CAL.WA.export_vcal_line ('CATEGORIES', replace (E_TAGS, ',', ';'), sStream);
+    if (E_EVENT_START is not null)
+      CAL.WA.export_vcal_line ('DTSTART', CAL.WA.vcal_date2utc (E_EVENT_START), sStream);
+    if (E_EVENT_END is not null)
+      CAL.WA.export_vcal_line ('DTEND', CAL.WA.vcal_date2utc (E_EVENT_END), sStream);
+    CAL.WA.export_vcal_line ('PRIORITY', E_PRIORITY, sStream);
+    CAL.WA.export_vcal_line ('STATUS', E_STATUS, sStream);
+    http ('END:VTODO\r\n', sStream);
+  }
+  -- end
+  http ('END:VCALENDAR\r\n', sStream);
+  return string_output_string(sStream);
+}
+;
+
+create procedure CAL.WA.export_rss_sqlx_for_det (
+  in domain_id integer,
+  in account_id integer)
+{
+  declare retValue any;
+  declare qry_text any;
+  retValue := string_output ();
+
+  http ('<?xml version ="1.0" encoding="UTF-8"?>\n', retValue);
+  http ('<rss version="2.0">\n', retValue);
+  http ('<channel>\n', retValue);
+
+  qry_text := (select
+   XMLELEMENT('title', CAL.WA.utf2wide(CAL.WA.domain_name (domain_id))),
+   XMLELEMENT('description', CAL.WA.utf2wide(CAL.WA.domain_description (domain_id))),
+   XMLELEMENT('managingEditor', U_E_MAIL),
+   XMLELEMENT('pubDate', CAL.WA.dt_rfc1123(now ())),
+   XMLELEMENT('generator', 'Virtuoso Universal Server ' || sys_stat('st_dbms_ver')),
+   XMLELEMENT('webMaster', U_E_MAIL),
+   XMLELEMENT('link', CAL.WA.CalDAV_url (domain_id))
+  from DB.DBA.SYS_USERS where U_ID = account_id);
+
+  http (serialize_to_UTF8_xml(qry_text), retValue);
+
+  qry_text := (select
+   XMLAGG(XMLELEMENT('item',
+     XMLELEMENT('title', CAL.WA.utf2wide (E_SUBJECT)),
+     XMLELEMENT('description', CAL.WA.utf2wide (E_DESCRIPTION)),
+     XMLELEMENT('guid', E_ID),
+     XMLELEMENT('link', CAL.WA.event_url (domain_id, E_ID)),
+     XMLELEMENT('pubDate', CAL.WA.dt_rfc1123 (E_UPDATED)),
+     (select XMLAGG (XMLELEMENT ('category', TV_TAG)) from CAL..TAGS_VIEW where tags = E_TAGS),
+     XMLELEMENT('http://www.openlinksw.com/ods/:modified', CAL.WA.dt_iso8601 (E_UPDATED))))
+ from (select top 15
+         E_SUBJECT,
+         E_DESCRIPTION,
+         E_UPDATED,
+         E_TAGS,
+         E_ID
+       from
+         CAL.WA.EVENTS
+       where E_DOMAIN_ID = domain_id
+       order by E_UPDATED desc) x );
+
+  http (serialize_to_UTF8_xml(qry_text), retValue);
+
+  http ('</channel>\n', retValue);
+  http ('</rss>\n', retValue);
+
+  retValue := string_output_string (retValue);
+  return retValue;
+}
+;
+
+create procedure CAL.WA.export_atom_sqlx_for_det (
+  in domain_id integer,
+  in account_id integer)
+{
+  declare xml_entity, xsltTemplate any;
+  xsltTemplate := CAL.WA.xslt_full ('rss2atom03.xsl');
+  if (CAL.WA.settings_atomVersion (CAL.WA.settings (account_id)) = '1.0')
+    xsltTemplate := CAL.WA.xslt_full ('rss2atom.xsl');
+
+  xml_entity := xtree_doc(CAL.WA.export_rss_sqlx_for_det (domain_id, account_id));
+
+  xml_entity := xslt(xsltTemplate, xml_entity);
+  return serialize_to_UTF8_xml(xml_entity);
+}
+;
+
+create procedure CAL.WA.export_rdf_sqlx_for_det (
+  in domain_id integer,
+  in account_id integer)
+{
+  declare xml_entity, xsltTemplate any;
+  xsltTemplate := CAL.WA.xslt_full ('rss2rdf.xsl');
+  xml_entity := xtree_doc(CAL.WA.export_rss_sqlx_for_det (domain_id, account_id));
+  xml_entity := xslt(xsltTemplate, xml_entity);
+  return serialize_to_UTF8_xml(xml_entity);
+}
+;
+
diff --git a/appsrc/ODS-Calendar/sql/DET_Calendar.sql b/appsrc/ODS-Calendar/sql/DET_Calendar.sql
index 13b18fa..d392caf 100644
--- a/appsrc/ODS-Calendar/sql/DET_Calendar.sql
+++ b/appsrc/ODS-Calendar/sql/DET_Calendar.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Calendar.sql,v 1.7.2.2 2010/09/20 10:15:02 source Exp $
+--  $Id: DET_Calendar.sql,v 1.7.2.3 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/sql/calendar-a-api.sql b/appsrc/ODS-Calendar/sql/calendar-a-api.sql
index 0e9eb70..749aa6c 100644
--- a/appsrc/ODS-Calendar/sql/calendar-a-api.sql
+++ b/appsrc/ODS-Calendar/sql/calendar-a-api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: calendar-a-api.sql,v 1.10.2.3 2010/09/20 10:15:02 source Exp $
+--  $Id: calendar-a-api.sql,v 1.10.2.7 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -94,6 +94,9 @@ create procedure ODS.ODS_API."calendar.get" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   ods_describe_iri (SIOC..calendar_event_iri (inst_id, event_id));
   return '';
 }
@@ -134,6 +137,9 @@ create procedure ODS.ODS_API."calendar.event.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   cTimezone := CAL.WA.settings_usedTimeZone (inst_id);
   eventStart := CAL.WA.event_user2gmt (eventStart, cTimezone);
   eventEnd := CAL.WA.event_user2gmt (eventEnd, cTimezone);
@@ -200,6 +206,9 @@ create procedure ODS.ODS_API."calendar.event.edit" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   cTimezone := CAL.WA.settings_usedTimeZone (inst_id);
   eventStart := CAL.WA.event_user2gmt (eventStart, cTimezone);
   eventEnd := CAL.WA.event_user2gmt (eventEnd, cTimezone);
@@ -260,6 +269,9 @@ create procedure ODS.ODS_API."calendar.task.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   cTimezone := CAL.WA.settings_usedTimeZone (inst_id);
   eventStart := CAL.WA.event_user2gmt (CAL.WA.dt_join (CAL.WA.dt_dateClear (eventStart), CAL.WA.dt_timeEncode (12, 0)), cTimezone);
   eventEnd := CAL.WA.event_user2gmt (CAL.WA.dt_join (CAL.WA.dt_dateClear (eventEnd), CAL.WA.dt_timeEncode (12, 0)), cTimezone);
@@ -318,6 +330,9 @@ create procedure ODS.ODS_API."calendar.task.edit" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   cTimezone := CAL.WA.settings_usedTimeZone (inst_id);
   eventStart := CAL.WA.event_user2gmt (CAL.WA.dt_join (CAL.WA.dt_dateClear (eventStart), CAL.WA.dt_timeEncode (12, 0)), cTimezone);
   eventEnd := CAL.WA.event_user2gmt (CAL.WA.dt_join (CAL.WA.dt_dateClear (eventEnd), CAL.WA.dt_timeEncode (12, 0)), cTimezone);
@@ -395,6 +410,9 @@ create procedure ODS.ODS_API."calendar.import" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   if (isnull (userName))
   {
     userName := uname;
@@ -457,6 +475,9 @@ create procedure ODS.ODS_API."calendar.export" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   http (CAL.WA.export_vcal (inst_id, null, vector ('events', events, 'tasks', tasks, 'periodFrom', periodFrom, 'periodTo', periodTo, 'tagsInclude', tagsInclude, 'tagsExclude', tagsExclude)));
 
   return '';
@@ -712,12 +733,29 @@ create procedure ODS.ODS_API."calendar.publication.new" (
 
   declare rc integer;
   declare uname varchar;
-  declare _type, options any;
+  declare _type, _name, _permissions, options any;
 
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   _type := ODS.ODS_API.calendar_type_check (destinationType, destination);
+  _name := trim (destination);
+  if (_type = 1)
+  {
+    _name := '/' || _name;
+    _name := replace (_name, '//', '/');
+  }
+  _name := ODS..dav_path_normalize(_name);
+  if (_type = 1)
+  {
+    _name := CAL.WA.dav_parent (_name);
+    _permissions := '11_';
+    if (not CAL.WA.dav_check_authenticate (_name, userName, userPassword, _permissions))
+      signal ('TEST', 'The user has no rights for this folder.<>');
+  }
   options := vector ('type', _type, 'name', destination, 'user', userName, 'password', userPassword, 'events', events, 'tasks', tasks);
   insert into CAL.WA.EXCHANGE (EX_DOMAIN_ID, EX_TYPE, EX_NAME, EX_UPDATE_TYPE, EX_UPDATE_PERIOD, EX_UPDATE_FREQ, EX_OPTIONS)
     values (inst_id, 0, name, updateType, updatePeriod, updateFreq, serialize (options));
@@ -810,7 +848,7 @@ create procedure ODS.ODS_API."calendar.publication.edit" (
   declare rc integer;
   declare uname varchar;
   declare inst_id integer;
-  declare _type, options any;
+  declare _type, _name, _permissions, options any;
 
   inst_id := (select EX_DOMAIN_ID from CAL.WA.EXCHANGE where EX_ID = publication_id);
   if (not ods_check_auth (uname, inst_id, 'author'))
@@ -820,6 +858,20 @@ create procedure ODS.ODS_API."calendar.publication.edit" (
     return ods_serialize_sql_error ('37000', 'The item is not found');
 
   _type := ODS.ODS_API.calendar_type_check (destinationType, destination);
+  _name := trim (destination);
+  if (_type = 1)
+  {
+    _name := '/' || _name;
+    _name := replace (_name, '//', '/');
+  }
+  _name := ODS..dav_path_normalize(_name);
+  if (_type = 1)
+  {
+    _name := CAL.WA.dav_parent (_name);
+    _permissions := '11_';
+    if (not CAL.WA.dav_check_authenticate (_name, userName, userPassword, _permissions))
+      signal ('TEST', 'The user has no rights for this folder.<>');
+  }
   options := vector ('type', _type, 'name', destination, 'user', userName, 'password', userPassword, 'events', events, 'tasks', tasks);
   update CAL.WA.EXCHANGE
      set EX_NAME = name,
@@ -915,12 +967,29 @@ create procedure ODS.ODS_API."calendar.subscription.new" (
 
   declare rc integer;
   declare uname varchar;
-  declare _type, options any;
+  declare _type, _name, _permissions, options any;
 
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   _type := ODS.ODS_API.calendar_type_check (sourceType, source);
+  _name := trim (source);
+  if (_type = 1)
+  {
+    _name := '/' || _name;
+    _name := replace (_name, '//', '/');
+  }
+  _name := ODS..dav_path_normalize(_name);
+  if (_type = 1)
+  {
+    _name := CAL.WA.dav_parent (_name);
+    _permissions := '1__';
+    if (not CAL.WA.dav_check_authenticate (_name, userName, userPassword, _permissions))
+      signal ('TEST', 'The user has no rights for this folder.<>');
+  }
   options := vector ('type', _type, 'name', source, 'user', userName, 'password', userPassword, 'events', events, 'tasks', tasks);
   insert into CAL.WA.EXCHANGE (EX_DOMAIN_ID, EX_TYPE, EX_NAME, EX_UPDATE_TYPE, EX_UPDATE_PERIOD, EX_UPDATE_FREQ, EX_OPTIONS)
     values (inst_id, 1, name, updateType, updatePeriod, updateFreq, serialize (options));
@@ -1013,7 +1082,7 @@ create procedure ODS.ODS_API."calendar.subscription.edit" (
   declare rc integer;
   declare uname varchar;
   declare inst_id integer;
-  declare _type, options any;
+  declare _type, _name, _permissions, options any;
 
   inst_id := (select EX_DOMAIN_ID from CAL.WA.EXCHANGE where EX_ID = subscription_id);
   if (not ods_check_auth (uname, inst_id, 'author'))
@@ -1023,6 +1092,20 @@ create procedure ODS.ODS_API."calendar.subscription.edit" (
     return ods_serialize_sql_error ('37000', 'The item is not found');
 
   _type := ODS.ODS_API.calendar_type_check (sourceType, source);
+  _name := trim (source);
+  if (_type = 1)
+  {
+    _name := '/' || _name;
+    _name := replace (_name, '//', '/');
+  }
+  _name := ODS..dav_path_normalize(_name);
+  if (_type = 1)
+  {
+    _name := CAL.WA.dav_parent (_name);
+    _permissions := '1__';
+    if (not CAL.WA.dav_check_authenticate (_name, userName, userPassword, _permissions))
+      signal ('TEST', 'The user has no rights for this folder.<>');
+  }
   options := vector ('type', _type, 'name', source, 'user', userName, 'password', userPassword, 'events', events, 'tasks', tasks);
   update CAL.WA.EXCHANGE
      set EX_NAME = name,
@@ -1119,6 +1202,9 @@ create procedure ODS.ODS_API."calendar.upstream.new" (
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
 
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Calendar'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   CAL.WA.test (name, vector('name', 'Upstream Name', 'class', 'varchar', 'minLength', 1, 'maxLength', 255));
   CAL.WA.test (source, vector('name', 'Upstream URI', 'class', 'varchar', 'minLength', 1, 'maxLength', 255));
   CAL.WA.test (userName, vector('name', 'Upstream User', 'class', 'varchar', 'minLength', 1, 'maxLength', 255));
@@ -1263,6 +1349,7 @@ create procedure ODS.ODS_API."calendar.options.set" (
   ODS.ODS_API.calendar_setting_set (settings, optionsParams, 'dateFormat');
   ODS.ODS_API.calendar_setting_set (settings, optionsParams, 'timeZone');
   ODS.ODS_API.calendar_setting_set (settings, optionsParams, 'showTasks');
+  ODS.ODS_API.calendar_setting_set (settings, optionsParams, 'daylichtEnable');
 	if (CAL.WA.discussion_check ())
 	{
   ODS.ODS_API.calendar_setting_set (settings, optionsParams, 'conv');
@@ -1333,6 +1420,7 @@ create procedure ODS.ODS_API."calendar.options.get" (
   http (ODS.ODS_API.calendar_setting_xml (settings, 'dateFormat'));
   http (ODS.ODS_API.calendar_setting_xml (settings, 'timeZone'));
   http (ODS.ODS_API.calendar_setting_xml (settings, 'showTasks'));
+  http (ODS.ODS_API.calendar_setting_xml (settings, 'daylichEnable'));
 
   http (ODS.ODS_API.calendar_setting_xml (settings, 'conv'));
   http (ODS.ODS_API.calendar_setting_xml (settings, 'conv_init'));
diff --git a/appsrc/ODS-Calendar/sql/calendar-a-code.sql b/appsrc/ODS-Calendar/sql/calendar-a-code.sql
index 0f57dce..9b148cf 100644
--- a/appsrc/ODS-Calendar/sql/calendar-a-code.sql
+++ b/appsrc/ODS-Calendar/sql/calendar-a-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: calendar-a-code.sql,v 1.64.2.29 2011/03/23 12:18:41 source Exp $
+--  $Id: calendar-a-code.sql,v 1.64.2.36 2012/03/12 14:25:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -732,6 +732,11 @@ create procedure CAL.WA.domain_update (
   path := home || 'Calendar' || '/';
   DB.DBA.DAV_MAKE_DIR (path, account_id, null, '110100000N');
   update WS.WS.SYS_DAV_COL set COL_DET = 'Calendar' where COL_ID = DAV_SEARCH_ID (path, 'C');
+
+  path := home || 'calendars' || '/';
+  DB.DBA.DAV_MAKE_DIR (path, account_id, null, '110100000N');
+  update WS.WS.SYS_DAV_COL set COL_DET = 'CalDAV' where COL_ID = DAV_SEARCH_ID (path, 'C');
+
   return 1;
 }
 ;
@@ -887,6 +892,15 @@ create procedure CAL.WA.domain_sioc_url (
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.domain_calDav_url (
+  in domain_id integer)
+{
+  return sprintf ('%s/DAV/home/%s/calendars/%s', CAL.WA.host_url (), CAL.WA.domain_owner_name (domain_id), DB.DBA.CalDAV__FIXNAME (CAL.WA.domain_name (domain_id)));
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure CAL.WA.page_url (
   in domain_id integer,
   in page varchar := null,
@@ -1029,6 +1043,18 @@ create procedure CAL.WA.user_name(
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.tag_rule_exists (
+  in user_id integer)
+{
+  if (exists (select 1 from TAG_RULE_SET, TAG_USER where TU_TRS = TRS_ID and TU_U_ID = user_id))
+    return 1;
+
+  return 0;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure CAL.WA.tag_prepare(
   inout tag varchar)
 {
@@ -1744,6 +1770,18 @@ create procedure CAL.WA.strDecode (
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.isVector (
+  inout aVector any)
+{
+  if (isarray (aVector) and not isstring (aVector))
+    return 1;
+
+  return 0;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure CAL.WA.vector_unique(
   inout aVector any,
   in minLength integer := 0)
@@ -2270,12 +2308,8 @@ create procedure CAL.WA.dt_format (
   in dt datetime,
   in pFormat varchar := 'd.m.Y')
 {
-  declare
-    N integer;
-  declare
-    ch,
-    S varchar;
-
+  declare N integer;
+  declare ch, S varchar;
   declare exit handler for sqlstate '*' {
     return '';
   };
@@ -2289,76 +2323,57 @@ create procedure CAL.WA.dt_format (
     if (ch = 'M')
     {
       S := concat(S, xslt_format_number(month(dt), '00'));
-    } else {
-      if (ch = 'm')
+    }
+    else if (ch = 'm')
       {
         S := concat(S, xslt_format_number(month(dt), '##'));
-      } else
-      {
-        if (ch = 'Y')
+    }
+    else if (ch = 'Y')
         {
           S := concat(S, xslt_format_number(year(dt), '0000'));
-        } else
-        {
-          if (ch = 'y')
+    }
+    else if (ch = 'y')
           {
             S := concat(S, substring (xslt_format_number(year(dt), '0000'),3,2));
-          } else {
-            if (ch = 'd')
+    }
+    else if (ch = 'd')
             {
               S := concat(S, xslt_format_number(dayofmonth(dt), '##'));
-            } else
-            {
-              if (ch = 'D')
+    }
+    else if (ch = 'D')
               {
                 S := concat(S, xslt_format_number(dayofmonth(dt), '00'));
-              } else
-              {
-                if (ch = 'H')
+    }
+    else if (ch = 'H')
                 {
                   S := concat(S, xslt_format_number(hour(dt), '00'));
-                } else
-                {
-                  if (ch = 'h')
+    }
+    else if (ch = 'h')
                   {
                     S := concat(S, xslt_format_number(hour(dt), '##'));
-                  } else
-                  {
-                    if (ch = 'N')
+    }
+    else if (ch = 'N')
                     {
                       S := concat(S, xslt_format_number(minute(dt), '00'));
-                    } else
-                    {
-                      if (ch = 'n')
+    }
+    else if (ch = 'n')
                       {
                         S := concat(S, xslt_format_number(minute(dt), '##'));
-                      } else
-                      {
-                        if (ch = 'S')
+    }
+    else if (ch = 'S')
                         {
                           S := concat(S, xslt_format_number(second(dt), '00'));
-                        } else
-                        {
-                          if (ch = 's')
+    }
+    else if (ch = 's')
                           {
                             S := concat(S, xslt_format_number(second(dt), '##'));
-                          } else
+    }
+    else
                           {
                             S := concat(S, ch);
-                          };
-                        };
-                      };
-                    };
-                  };
-                };
-              };
-            };
-          };
-        };
-      };
-    };
+    }
     N := N + 1;
-  };
+  }
   return S;
 }
 ;
@@ -2409,7 +2424,8 @@ create procedure CAL.WA.dt_deformat_tmp (
   declare V any;
 
   V := regexp_parse('[0-9]+', S, N);
-  if (length (V) > 1) {
+  if (length (V) > 1)
+  {
     N := V[1];
     return atoi (subseq (S, V[0], V[1]));
   }
@@ -2526,21 +2542,26 @@ create procedure CAL.WA.dt_stringtime (
   am := 0;
   pm := 0;
   pString := lcase (pString);
-  if (not isnull (strstr (pString, 'am'))) {
+  if (not isnull (strstr (pString, 'am')))
+  {
     am := 1;
     pString := replace (pString, 'am', '');
   }
-  if (not isnull (strstr (pString, 'pm'))) {
+  if (not isnull (strstr (pString, 'pm')))
+  {
     pm := 1;
     pString := replace (pString, 'pm', '');
   }
   pTime := stringtime (trim (pString));
-  if (am = 1) {
+  if (am = 1)
+  {
     if (hour (pTime) = 12)
       pTime := dateadd ('hour', 12, pTime);
   }
-  if (pm = 1) {
-    if (hour (pTime) = 12) {
+  if (pm = 1)
+  {
+    if (hour (pTime) = 12)
+    {
       pTime := dateadd ('hour', -12, pTime);
     } else {
       pTime := dateadd ('hour', 12, pTime);
@@ -2556,15 +2577,18 @@ create procedure CAL.WA.dt_timeFloor (
   in pTime datetime,
   in pRound integer := 0)
 {
+  declare h, m integer;
   declare exit handler for SQLSTATE '*' {
     return pTime;
   };
-  declare h, m integer;
 
-  if (pRound = 0)
-    return pTime;
+  if (pRound)
+  {
   CAL.WA.dt_timeDecode (pTime, h, m);
-  return CAL.WA.dt_timeEncode (h, floor (cast (m as float) / pRound) * pRound);
+    if (mod (m, pRound))
+      pTime := CAL.WA.dt_timeEncode (h, floor (cast (m as float) / pRound) * pRound);
+  }
+  return pTime;
 }
 ;
 
@@ -2574,10 +2598,18 @@ create procedure CAL.WA.dt_timeCeiling (
   in pTime datetime,
   in pRound integer := 0)
 {
+  declare h, m integer;
   declare exit handler for SQLSTATE '*' {
     return pTime;
   };
-  return CAL.WA.dt_timeFloor (dateadd ('minute', pRound, pTime), pRound);
+
+  if (pRound)
+  {
+    CAL.WA.dt_timeDecode (pTime, h, m);
+    if (mod (m, pRound))
+      pTime := CAL.WA.dt_timeFloor (dateadd ('minute', pRound, pTime), pRound);
+  }
+  return pTime;
 }
 ;
 
@@ -2850,17 +2882,18 @@ create procedure CAL.WA.p_dateadd (
 -----------------------------------------------------------------------------------------
 --
 create procedure CAL.WA.tz_decode (
-  in S any,
-  inout pMinutes integer)
+  in S any)
 {
+  declare minutes integer;
   declare continue handler for SQLSTATE '*' {
-    pMinutes := 0;
-    return;
+    return 0;
   };
 
-  pMinutes := atoi (substring (S, 2, 2)) * 60 + atoi (substring (S, 4, 2));
+  minutes := atoi (substring (S, 2, 2)) * 60 + atoi (substring (S, 4, 2));
   if (substring (S, 1, 1) = '+')
-    pMinutes := -pMinutes;
+    minutes := -minutes;
+
+  return minutes;
 }
 ;
 
@@ -3225,6 +3258,29 @@ create procedure CAL.WA.tz_value (in tzName varchar)
 }
 ;
 
+create procedure CAL.WA.dt_daylightRRules (
+  in pDaylight integer,
+  inout pStartRRule any,
+  inout pEndRRule any)
+{
+  if (pDaylight = 1)
+  {
+    pStartRRule := vector ('Y2', 5, 7,  3, null);
+    pEndRRule := vector ('Y2', 5, 7, 10, null);
+  }
+  else if (pDaylight = 2)
+  {
+    pStartRRule := vector ('Y2', 2, 7,  3, null);
+    pEndRRule := vector ('Y2', 1, 7, 11, null);
+  }
+  else
+  {
+    pStartRRule := null;
+    pEndRRule := null;
+  }
+}
+;
+
 -----------------------------------------------------------------------------------------
 --
 -- Durations
@@ -3298,9 +3354,10 @@ create procedure CAL.WA.d_encode (
 create procedure CAL.WA.test_clear (
   in S any)
 {
-  declare N integer;
+  S := substring (S, 1, coalesce (strstr (S, '<>'), length (S)));
+  S := substring (S, 1, coalesce (strstr (S, '\nin'), length (S)));
 
-  return substring (S, 1, coalesce(strstr(S, '<>'), length (S)));
+  return S;
 }
 ;
 
@@ -3340,6 +3397,7 @@ create procedure CAL.WA.test (
     --resignal;
   };
 
+  if (isstring (value))
   value := trim(value);
   if (is_empty_or_null(params))
     return value;
@@ -3348,23 +3406,26 @@ create procedure CAL.WA.test (
   valueType := coalesce (get_keyword ('type', params), get_keyword ('class', params));
   valueName := get_keyword ('name', params, 'Field');
   valueMessage := get_keyword ('message', params, '');
+
   tmp := get_keyword ('canEmpty', params);
-  if (isnull (tmp)) {
+  if (isnull (tmp))
+  {
     if (not isnull (get_keyword ('minValue', params))) {
       tmp := 0;
     } else if (get_keyword ('minLength', params, 0) <> 0) {
       tmp := 0;
     }
   }
-  if (not isnull (tmp) and (tmp = 0) and is_empty_or_null(value)) {
+  if (not isnull (tmp) and (tmp = 0) and is_empty_or_null(value))
+  {
     signal('EMPTY', '');
   } else if (is_empty_or_null(value)) {
     return value;
   }
 
-  value := CAL.WA.validate2 (valueClass, value);
-
-  if (valueType = 'integer') {
+  value := CAL.WA.validate2 (valueClass, cast (value as varchar));
+  if (valueType = 'integer')
+  {
     tmp := get_keyword ('minValue', params);
     if ((not isnull (tmp)) and (value < tmp))
       signal('MIN', cast (tmp as varchar));
@@ -3372,8 +3433,9 @@ create procedure CAL.WA.test (
     tmp := get_keyword ('maxValue', params);
     if (not isnull (tmp) and (value > tmp))
       signal('MAX', cast (tmp as varchar));
-
-  } else if (valueType = 'float') {
+  }
+  else if (valueType = 'float')
+  {
     tmp := get_keyword ('minValue', params);
     if (not isnull (tmp) and (value < tmp))
       signal('MIN', cast (tmp as varchar));
@@ -3381,8 +3443,9 @@ create procedure CAL.WA.test (
     tmp := get_keyword ('maxValue', params);
     if (not isnull (tmp) and (value > tmp))
       signal('MAX', cast (tmp as varchar));
-
-  } else if (valueType = 'varchar') {
+  }
+  else if (valueType = 'varchar')
+  {
     tmp := get_keyword ('minLength', params);
     if (not isnull (tmp) and (length (CAL.WA.utf2wide(value)) < tmp))
       signal('MINLENGTH', cast (tmp as varchar));
@@ -3458,7 +3521,7 @@ create procedure CAL.WA.validate2 (
     if (isnull (regexp_match('^[^\\\/\?\*\"\'\>\<\:\|]*\$', propertyValue)))
       goto _error;
   } else if ((propertyType = 'uri') or (propertyType = 'anyuri')) {
-    if (isnull (regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:]*)?\$', propertyValue)))
+    if (isnull (regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:~]*)?\$', propertyValue)))
       goto _error;
   } else if (propertyType = 'email') {
     if (isnull (regexp_match('^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))\$', propertyValue)))
@@ -3691,7 +3754,8 @@ create procedure CAL.WA.settings_init (
   CAL.WA.set_keyword ('dateFormat', settings, get_keyword ('dateFormat', settings, 'dd.MM.yyyy'));
   CAL.WA.set_keyword ('timeZone', settings, tz);
   CAL.WA.set_keyword ('timeZoneName', settings, get_keyword ('timeZoneName', settings, case when tz = 0 then 'Etc/GMT' else CAL.WA.tz_name (tz) end));
-  CAL.WA.set_keyword ('showTasks', settings, cast (get_keyword ('showTasks', settings, '0') as integer));
+  CAL.WA.set_keyword ('daylight', settings, CAL.WA.settings_daylight (settings));
+  CAL.WA.set_keyword ('showTasks', settings, cast (get_keyword ('showTasks', settings, '1') as integer));
   CAL.WA.set_keyword ('mailAttendees', settings, cast (get_keyword ('mailAttendees', settings, '1') as integer));
 
   CAL.WA.set_keyword ('conv', settings, cast (get_keyword ('conv', settings, '0') as integer));
@@ -3869,6 +3933,24 @@ create procedure CAL.WA.settings_timeFormat2 (
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.settings_daylight (
+  in settings any)
+{
+  return cast (get_keyword ('daylight', settings, '0') as integer);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure CAL.WA.settings_daylight2 (
+  in domain_id integer)
+{
+  return CAL.WA.settings_daylight (CAL.WA.settings (domain_id));
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure CAL.WA.settings_showTasks (
   in settings any)
 {
@@ -4139,7 +4221,8 @@ create procedure CAL.WA.event_update_acl (
 {
   update CAL.WA.EVENTS
      set E_ACL = acl
-   where E_ID = id;
+   where E_ID = id
+     and E_PRIVACY = 2;
 }
 ;
 
@@ -4227,12 +4310,17 @@ create procedure CAL.WA.event_check_privacy (
 --
 create procedure CAL.WA.event_gmt2user (
   in pDate datetime,
-  in pTimezone integer := 0)
+  in pTimezone integer := 0,
+  in pDaylight integer := 0)
 
 {
-  if (isnull (pDate))
+  if (not isnull (pDate))
+  {
+    pDate := dateadd ('minute', pTimezone, pDate);
+    if (pDaylight)
+      pDate := CAL.WA.event_daylight (pDate, pDaylight, 1);
+  }
     return pDate;
-  return dateadd ('minute', pTimezone, pDate);
 }
 ;
 
@@ -4240,11 +4328,93 @@ create procedure CAL.WA.event_gmt2user (
 --
 create procedure CAL.WA.event_user2gmt (
   in pDate datetime,
-  in pTimezone integer := 0)
+  in pTimezone integer := 0,
+  in pDaylight integer := 0)
 {
-  if (isnull (pDate))
+  if (not isnull (pDate))
+  {
+    pDate := dateadd ('minute', -pTimezone, pDate);
+    if (pDaylight)
+      pDate := CAL.WA.event_daylight (pDate, pDaylight, -1);
+  }
     return pDate;
-  return dateadd ('minute', -pTimezone, pDate);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure CAL.WA.event_daylight (
+  in pDate datetime,
+  in pDaylight integer,
+  in pStep integer := 0)
+{
+  declare _day, _month integer;
+  declare startRRule, endRRule any;
+
+  CAL.WA.dt_daylightRRules (pDaylight, startRRule, endRRule);
+  _month := month (pDate);
+  if (_month < startRRule[3])
+    return pDate;
+
+  if (_month = startRRule[3])
+  {
+    _day := CAL.WA.event_findDay (pDate, startRRule[1], startRRule[2]);
+    if (dayofmonth (pDate) < _day)
+      return pDate;
+
+    return dateadd ('hour', pStep, pDate);
+  }
+
+  if (_month < endRRule[3])
+    return dateadd ('hour', pStep, pDate);
+
+  if (_month = endRRule[3])
+  {
+    _day := CAL.WA.event_findDay (pDate, endRRule[1], endRRule[2]);
+    if (dayofmonth (pDate) >= _day)
+      return pDate;
+
+    return dateadd ('hour', pStep, pDate);
+  }
+  return pDate;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure CAL.WA.event_daylightCheck (
+  in pDate datetime,
+  in pStartRRule any,
+  in pEndRRule any)
+
+{
+  declare _day, _month integer;
+
+  _month := month (pDate);
+  if (_month < pStartRRule[3])
+    return 0;
+
+  if (_month = pStartRRule[3])
+  {
+    _day := CAL.WA.event_findDay (pDate, pStartRRule[1], pStartRRule[2]);
+    if (dayofmonth (pDate) <= _day)
+      return 0;
+
+    return 1;
+  }
+
+  if (_month < pEndRRule[3])
+    return 1;
+
+  if (_month = pEndRRule[3])
+  {
+    _day := CAL.WA.event_findDay (pDate, pEndRRule[1], pEndRRule[2]);
+    if (dayofmonth (pDate) > _day)
+      return 0;
+
+    return 1;
+  }
+  return 0;
 }
 ;
 
@@ -4280,48 +4450,51 @@ create procedure CAL.WA.event_occurAtDate (
   if (not isnull (strstr (eRepeatExceptions, '<' || cast (datediff ('day', CAL.WA.dt_dateClear (eEventStart), dt) as varchar) || '>')))
     return 0;
 
+  if (eRepeat = 'D1')
+  {
   -- Every N-th day(s)
-  if (eRepeat = 'D1') {
     if (mod (datediff ('day', eEventStart, dtEnd), eRepeatParam1) = 0)
       return 1;
   }
-
+  else if (eRepeat = 'D2')
+  {
   -- Every week day
-  if (eRepeat = 'D2') {
     tmp := dayofweek (dt);
     if ((tmp > 1) and (tmp < 7))
       return 1;
   }
-
+  else if (eRepeat = 'W1')
+  {
   -- Every N-th week on ...
-  if (eRepeat = 'W1') {
+    if (eRepeatParam2 = 0)
+      eRepeatParam2 := bit_or (eRepeatParam2, power (2, dayofweek (eEventStart)-1));
     if (mod (datediff ('day', eEventStart, dtEnd) / 7, eRepeatParam1) = 0)
       if (bit_and (eRepeatParam2, power (2, CAL.WA.dt_WeekDay (dt, weekStarts)-1)))
         return 1;
   }
-
+  else if (eRepeat = 'M1')
+  {
   -- Every N-th day of M-th month(s)
-  if (eRepeat = 'M1') {
     if (mod (datediff ('month', eEventStart, dtEnd), eRepeatParam1) = 0)
       if (dayofmonth (dt) = eRepeatParam2)
         return 1;
   }
-
+  else if (eRepeat = 'M2')
+  {
   -- Every X day/weekday/weekend/... of Y-th month(s)
-  if (eRepeat = 'M2') {
     if (mod (datediff ('month', eEventStart, dtEnd), eRepeatParam1) = 0)
       if (dayofmonth (dt) = CAL.WA.event_findDay (dt, eRepeatParam2, eRepeatParam3))
         return 1;
   }
-
-  if (eRepeat = 'Y1') {
+  else if (eRepeat = 'Y1')
+  {
     if (mod (datediff ('year', eEventStart, dtEnd), eRepeatParam1) = 0)
       if ((month (dt) = eRepeatParam2) and (dayofmonth (dt) = eRepeatParam3))
       return 1;
   }
-
+  else if (eRepeat = 'Y2')
+  {
   -- Every X day/weekday/weekend/... of Y-th month(s)
-  if (eRepeat = 'Y2') {
     if (month (dt) = eRepeatParam3)
       if (dayofmonth (dt) = CAL.WA.event_findDay (dt, eRepeatParam1, eRepeatParam2))
         return 1;
@@ -4360,54 +4533,57 @@ create procedure CAL.WA.event_checkDate (
   if (dtEnd < eEventStart)
     return 0;
 
+  if (eRepeat = 'D1')
+  {
   -- Every N-th day(s)
-  if (eRepeat = 'D1') {
     iInterval := eRepeatParam1;
     if (mod (datediff ('day', eEventStart, dtEnd), eRepeatParam1) = 0)
       return CAL.WA.event_checkNotDeletedOccurence (dt, eEventStart, eRepeatExceptions);
   }
-
+  else if (eRepeat = 'D2')
+  {
   -- Every week day
-  if (eRepeat = 'D2') {
     iInterval := 1;
     tmp := dayofweek (dt);
     if ((tmp > 1) and (tmp < 7))
       return CAL.WA.event_checkNotDeletedOccurence (dt, eEventStart, eRepeatExceptions);
   }
-
+  else if (eRepeat = 'W1')
+  {
   -- Every N-th week on ...
-  if (eRepeat = 'W1') {
     iInterval := 1;
+    if (eRepeatParam2 = 0)
+      eRepeatParam2 := bit_or (eRepeatParam2, power (2, dayofweek (eEventStart)-1));
     if (mod (datediff ('day', eEventStart, dtEnd) / 7, eRepeatParam1) = 0)
       if (bit_and (eRepeatParam2, power (2, CAL.WA.dt_WeekDay (dt, weekStarts)-1)))
         return CAL.WA.event_checkNotDeletedOccurence (dt, eEventStart, eRepeatExceptions);
   }
-
+  else if (eRepeat = 'M1')
+  {
   -- Every N-th day of M-th month(s)
-  if (eRepeat = 'M1') {
     iInterval := eRepeatParam1;
     if (mod (datediff ('month', eEventStart, dtEnd), eRepeatParam1) = 0)
       if (dayofmonth (dt) = eRepeatParam2)
         return CAL.WA.event_checkNotDeletedOccurence (dt, eEventStart, eRepeatExceptions);
   }
-
+  else if (eRepeat = 'M2')
+  {
   -- Every X day/weekday/weekend/... of Y-th month(s)
-  if (eRepeat = 'M2') {
     iInterval := eRepeatParam1;
     if (mod (datediff ('month', eEventStart, dtEnd), eRepeatParam1) = 0)
       if (dayofmonth (dt) = CAL.WA.event_findDay (dt, eRepeatParam2, eRepeatParam3))
         return CAL.WA.event_checkNotDeletedOccurence (dt, eEventStart, eRepeatExceptions);
   }
-
-  if (eRepeat = 'Y1') {
+  else if (eRepeat = 'Y1')
+  {
     iInterval := eRepeatParam1;
     if (mod (datediff ('year', eEventStart, dtEnd), eRepeatParam1) = 0)
       if ((month (dt) = eRepeatParam2) and (dayofmonth (dt) = eRepeatParam3))
         return CAL.WA.event_checkNotDeletedOccurence (dt, eEventStart, eRepeatExceptions);
   }
-
+  else if (eRepeat = 'Y2')
+  {
   -- Every X day/weekday/weekend/... of Y-th month(s)
-  if (eRepeat = 'Y2') {
     iInterval := 365;
     if (month (dt) = eRepeatParam3)
       if (dayofmonth (dt) = CAL.WA.event_findDay (dt, eRepeatParam1, eRepeatParam2))
@@ -4685,7 +4861,7 @@ create procedure CAL.WA.events_forPeriod (
   in pTaskMode integer := 0,
   in pRights varchar := '')
 {
-  declare dt_offset, dtTimezone, account_id integer;
+  declare dt_offset, dtTimezone, dtDaylight, account_id integer;
   declare dtWeekStarts varchar;
   declare dt, dtStart, dtEnd, tzDT, tzEventStart, tzRepeatUntil date;
 
@@ -4696,8 +4872,10 @@ create procedure CAL.WA.events_forPeriod (
 
   dtTimezone := CAL.WA.settings_timeZone2 (pDomainID);
   dtWeekStarts := CAL.WA.settings_weekStarts2 (pDomainID);
-  dtStart := CAL.WA.event_user2gmt (CAL.WA.dt_dateClear (pDateStart), dtTimezone);
-  dtEnd := CAL.WA.event_user2gmt (dateadd ('day', 1, CAL.WA.dt_dateClear (pDateEnd)), dtTimezone);
+  dtDaylight := CAL.WA.settings_daylight2 (pDomainID);
+
+  dtStart := CAL.WA.event_user2gmt (CAL.WA.dt_dateClear (pDateStart), dtTimezone, dtDaylight);
+  dtEnd := CAL.WA.event_user2gmt (dateadd ('day', 1, CAL.WA.dt_dateClear (pDateEnd)), dtTimezone, dtDaylight);
   account_id := CAL.WA.domain_owner_id (pDomainID);
 
     if (pTaskMode)
@@ -4730,8 +4908,8 @@ create procedure CAL.WA.events_forPeriod (
       result (E_ID,
               E_EVENT,
               E_SUBJECT,
-                CAL.WA.event_gmt2user (E_EVENT_START, dtTimezone),
-                CAL.WA.event_gmt2user (E_EVENT_END, dtTimezone),
+              CAL.WA.event_gmt2user (E_EVENT_START, dtTimezone, dtDaylight),
+              CAL.WA.event_gmt2user (E_EVENT_END, dtTimezone, dtDaylight),
               E_REPEAT,
               null,
               E_REMINDER,
@@ -4767,8 +4945,8 @@ create procedure CAL.WA.events_forPeriod (
     result (E_ID,
             E_EVENT,
             E_SUBJECT,
-              CAL.WA.event_gmt2user (E_EVENT_START, dtTimezone),
-              CAL.WA.event_gmt2user (E_EVENT_END, dtTimezone),
+            CAL.WA.event_gmt2user (E_EVENT_START, dtTimezone, dtDaylight),
+            CAL.WA.event_gmt2user (E_EVENT_END, dtTimezone, dtDaylight),
             E_REPEAT,
             null,
             E_REMINDER,
@@ -4805,33 +4983,34 @@ create procedure CAL.WA.events_forPeriod (
                )
               )) do
   {
-      tzEventStart := CAL.WA.event_gmt2user (E_EVENT_START, dtTimezone);
-      tzRepeatUntil := CAL.WA.event_gmt2user (E_REPEAT_UNTIL, dtTimezone);
+    tzEventStart := CAL.WA.event_gmt2user (E_EVENT_START, dtTimezone, dtDaylight);
+    tzRepeatUntil := CAL.WA.event_gmt2user (E_REPEAT_UNTIL, dtTimezone, dtDaylight);
     dt := dtStart;
       while (dt < dtEnd)
       {
-        tzDT := CAL.WA.event_gmt2user (dt, dtTimezone);
-      if (CAL.WA.event_occurAtDate (tzDT,
+      tzDT := CAL.WA.event_gmt2user (dt, dtTimezone, dtDaylight);
+      if (CAL.WA.event_occurAtDate (dt,
                                     E_EVENT,
-                                    tzEventStart,
+                                    E_EVENT_START,
                                     E_REPEAT,
                                     E_REPEAT_PARAM1,
                                     E_REPEAT_PARAM2,
                                     E_REPEAT_PARAM3,
-                                    tzRepeatUntil,
+                                    E_REPEAT_UNTIL,
                                     E_REPEAT_EXCEPTIONS,
                                       dtWeekStarts)) {
           if (E_EVENT = 1)
           {
-          dt_offset := datediff ('day', dateadd ('hour', -12, E_EVENT_START), dt);
+          dt_offset := datediff ('hour', dateadd ('hour', -12, E_EVENT_START), dt);
         } else {
-          dt_offset := datediff ('day', E_EVENT_START, dateadd ('second', 86399, dt));
+          dt_offset := datediff ('hour', E_EVENT_START, dateadd ('second', 86399, dt));
         }
+        dt_offset := floor (dt_offset / 24);
         result (E_ID,
                 E_EVENT,
                 E_SUBJECT,
-                  CAL.WA.event_gmt2user (dateadd ('day', dt_offset, E_EVENT_START), dtTimezone),
-                  CAL.WA.event_gmt2user (dateadd ('day', dt_offset, E_EVENT_END), dtTimezone),
+                CAL.WA.event_gmt2user (dateadd ('day', dt_offset, E_EVENT_START), dtTimezone, dtDaylight),
+                CAL.WA.event_gmt2user (dateadd ('day', dt_offset, E_EVENT_END), dtTimezone, dtDaylight),
                 E_REPEAT,
                 dt_offset,
                 E_REMINDER,
@@ -5366,7 +5545,7 @@ create procedure CAL.WA.vcal_str (
   T := null;
   while (1)
   {
-    S := cast (xquery_eval (xmlPath || sprintf ('val[%d]', N), xmlItem, 1) as varchar);
+    S := cast (xquery_eval (xmlPath || sprintf ('/val[%d]', N), xmlItem, 1) as varchar);
     if (is_empty_or_null (S))
       goto _exit;
     if (isnull (T))
@@ -5390,19 +5569,35 @@ create procedure CAL.WA.vcal_str2date (
   in xmlPath varchar,
   in tzDict any := null)
 {
-  declare S, dt, tzID, tzOffset any;
+  declare S, dt, tzID, tzObject, tzStartRRule, tzEndRRule, tzOffset any;
 
-  S := cast (xquery_eval (xmlPath || 'val', xmlItem, 1) as varchar);
+  S := CAL.WA.vcal_str (xmlItem, xmlPath);
   dt := CAL.WA.vcal_iso2date (S);
   if ((not isnull (dt)) and (not isnull (tzDict)) and (chr (S[length(S)-1]) <> 'Z'))
   {
-      tzID := cast (xquery_eval (xmlPath || 'TZID', xmlItem, 1) as varchar);
+    tzID := cast (xquery_eval (xmlPath || '/TZID', xmlItem, 1) as varchar);
     if (not isnull (tzID))
     {
-        tzOffset := dict_get (tzDict, tzID, 0);
+      tzObject := dict_get (tzDict, tzID, null);
+      if (isnull (tzObject))
+        goto _exit;
+
+      tzOffset := get_keyword ('standartTo', tzObject);
+      if (isnull (tzOffset))
+        goto _exit;
+
+      tzStartRRule := get_keyword ('daylightRRule', tzObject);
+      if (isnull (tzStartRRule))
+        goto _exit;
+
+        tzEndRRule := get_keyword ('standartRRule', tzObject);
+        if (CAL.WA.event_daylightCheck (dt, tzStartRRule, tzEndRRule))
+          tzOffset := get_keyword ('daylightTo', tzObject);
+
         dt := dateadd ('minute', tzOffset, dt);
       }
     }
+_exit:;
   return dt;
 }
 ;
@@ -5417,7 +5612,7 @@ create procedure CAL.WA.vcal_str2status (
   declare S, V any;
 
   V := vector ('Not Started', 'In Progress', 'Completed', 'Waiting', 'Deferred');
-  S := cast (xquery_eval (xmlPath, xmlItem, 1) as varchar);
+  S := CAL.WA.vcal_str (xmlItem, xmlPath);
   for (N := 0; N < length (V); N := N + 1)
     if (lcase (S) = lcase (V[N]))
       return V[N];
@@ -5436,7 +5631,7 @@ create procedure CAL.WA.vcal_str2privacy (
   declare S, V any;
 
   V := vector ('SHARED', 2, 'PUBLIC', 1, 'PRIVATE', 0);
-  S := cast (xquery_eval (xmlPath, xmlItem, 1) as varchar);
+  S := CAL.WA.vcal_str (xmlItem, xmlPath);
   for (N := 0; N < length (V); N := N + 2)
     if (lcase (S) = lcase (V[N]))
       return V[N+1];
@@ -5502,7 +5697,8 @@ create procedure CAL.WA.vcal_datetime2str (
 create procedure CAL.WA.vcal_date2utc (
   in dt datetime)
 {
-  return CAL.WA.dt_format (dateadd ('minute', -timezone (now ()), dt), 'YMDTHNSZ');
+  return CAL.WA.dt_format (dt, 'YMDTHNSZ');
+  --return CAL.WA.dt_format (dateadd ('minute', -timezone (now ()), dt), 'YMDTHNSZ');
 }
 ;
 
@@ -5519,8 +5715,9 @@ create procedure CAL.WA.vcal_str2recurrence (
 {
   declare N integer;
   declare S, T varchar;
-  declare V, ruleParams any;
+  declare V, weekdays, ruleParams any;
 
+  weekdays := vector ('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU');
   eRepeat := '';
   eRepeatParam1 := null;
   eRepeatParam2 := null;
@@ -5528,7 +5725,9 @@ create procedure CAL.WA.vcal_str2recurrence (
   eRepeatUntil := null;
 
   V := vector ();
-  ruleParams := xquery_eval (xmlPath, xmlItem, 0);
+  ruleParams := xquery_eval (xmlPath || '/fld', xmlItem, 0);
+  if (length (ruleParams) = 0)
+    ruleParams := xquery_eval (xmlPath || '/val', xmlItem, 0);
   foreach (any ruleParam in ruleParams) do
   {
     S := cast (xpath_eval ('.', ruleParam) as varchar);
@@ -5539,19 +5738,51 @@ create procedure CAL.WA.vcal_str2recurrence (
     return;
 
   -- daily rule
-  if (get_keyword ('FREQ', V) = 'DAILY') {
+  if (get_keyword ('FREQ', V) = 'DAILY')
+  {
+    T := get_keyword ('BYDAY', V);
+    if (isnull (T))
+    {
     eRepeat := 'D1';
     eRepeatParam1 := cast (get_keyword ('INTERVAL', V, '1') as integer);
+    } else {
+      eRepeat := 'D2';
+      eRepeatParam1 := cast (get_keyword ('INTERVAL', V, '1') as integer);
+      eRepeatParam2 := 0;
+      {
+        T := split_and_decode (T, 0, '\0\0,');
+        for (N := 0; N < length (T); N := N + 1)
+        {
+          if        (T[N] = 'MO') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 0));
+          } else if (T[N] = 'TU') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 1));
+          } else if (T[N] = 'WE') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 2));
+          } else if (T[N] = 'TH') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 3));
+          } else if (T[N] = 'FR') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 4));
+          } else if (T[N] = 'SA') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 5));
+          } else if (T[N] = 'SU') {
+            eRepeatParam2 := bit_or (eRepeatParam2, power (2, 6));
   }
-
-  if (get_keyword ('FREQ', V) = 'WEEKLY') {
+        }
+      }
+    }
+  }
+  else if (get_keyword ('FREQ', V) = 'WEEKLY')
+  {
     eRepeat := 'W1';
     eRepeatParam1 := cast (get_keyword ('INTERVAL', V, '1') as integer);
     eRepeatParam2 := 0;
     T := get_keyword ('BYDAY', V);
-    if (not isnull (T)) {
+    if (not isnull (T))
+    {
       T := split_and_decode (T, 0, '\0\0,');
-      for (N := 0; N < length (T); N := N + 1) {
+      for (N := 0; N < length (T); N := N + 1)
+      {
         if        (T[N] = 'MO') {
           eRepeatParam2 := bit_or (eRepeatParam2, power (2, 0));
         } else if (T[N] = 'TU') {
@@ -5570,25 +5801,65 @@ create procedure CAL.WA.vcal_str2recurrence (
         }
       }
   }
-
-  if (get_keyword ('FREQ', V) = 'MONTHLY') {
+  else if (get_keyword ('FREQ', V) = 'MONTHLY')
+  {
+    if (isnull (get_keyword ('BYDAY', V)))
+    {
     eRepeat := 'M1';
     eRepeatParam1 := cast (get_keyword ('INTERVAL', V, '1') as integer);
     eRepeatParam2 := cast (get_keyword ('BYMONTHDAY', V, '1') as integer);
+    } else {
+      eRepeat := 'M2';
+      eRepeatParam1 := cast (get_keyword ('INTERVAL', V, '1') as integer);
+      S := get_keyword ('BYDAY', V);
+      T := subseq (S, length (S)-2);
+      eRepeatParam3 := CAL.WA.vector_indexOf(weekdays, T);
+      if (isinteger (eRepeatParam3))
+        eRepeatParam3 := eRepeatParam3 + 1;
+      eRepeatParam2 := cast (subseq (S, 0, length (S)-2) as integer);
+      if (eRepeatParam2 = -1)
+        eRepeatParam2 := 5;
+    }
   }
-  if (get_keyword ('FREQ', V) = 'YEARLY') {
+  else if (get_keyword ('FREQ', V) = 'YEARLY')
+  {
+    if (isnull (get_keyword ('BYDAY', V)))
+    {
     eRepeat := 'Y1';
     eRepeatParam1 := cast (get_keyword ('INTERVAL', V, '1') as integer);
     eRepeatParam2 := cast (get_keyword ('BYMONTH', V, '1') as integer);
     eRepeatParam3 := cast (get_keyword ('BYMONTHDAY', V, '1') as integer);
+    } else {
+      eRepeat := 'Y2';
+      eRepeatParam3 := cast (get_keyword ('BYMONTH', V, '1') as integer);
+      S := get_keyword ('BYDAY', V);
+      T := subseq (S, length (S)-2);
+      eRepeatParam2 := CAL.WA.vector_indexOf(weekdays, T);
+      if (isinteger (eRepeatParam2))
+        eRepeatParam2 := eRepeatParam2 + 1;
+      eRepeatParam1 := cast (subseq (S, 0, length (S)-2) as integer);
+      if (eRepeatParam1 = -1)
+        eRepeatParam1 := 5;
+    }
   }
-
   eRepeatUntil := CAL.WA.vcal_iso2date (get_keyword ('UNTIL', V));
 }
 ;
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.vcal_recurrenceByDay2str (
+  in repeatValue integer)
+{
+  if (repeatValue = 5)
+    return '-1';
+
+  return '+' || cast (repeatValue as varchar);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure CAL.WA.vcal_recurrence2str (
   inout eRepeat varchar,
   inout eRepeatParam1 integer,
@@ -5597,31 +5868,29 @@ create procedure CAL.WA.vcal_recurrence2str (
   inout eRepeatUntil datetime)
 {
   declare S varchar;
+  declare weekdays any;
+
 
   if (is_empty_or_null (eRepeat))
     return null;
 
+  weekdays := vector ('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU');
   S := null;
-  -- daily rule
-  if (eRepeat = 'D1') {
-    S := 'FREQ=DAILY';
-    S := S || ';INTERVAL=' || cast (eRepeatParam1 as varchar);
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
+  if (eRepeat = 'D1')
+  {
+    S := 'FREQ=DAILY'
+      || ';INTERVAL=' || cast (eRepeatParam1 as varchar);
   }
-
-  if (eRepeat = 'D2') {
-    S := 'FREQ=DAILY';
-    S := S || ';INTERVAL=1';
-    S := S || ';BYDAY=MO,TU,WE,TH,FR';
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
+  else if (eRepeat = 'D2')
+  {
+    S := 'FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR';
   }
-
-  if (eRepeat = 'W1') {
+  else if (eRepeat = 'W1')
+  {
     S := 'FREQ=WEEKLY';
     S := S || ';INTERVAL=' || cast (eRepeatParam1 as varchar);
-    if (eRepeatParam2 <> 0) {
+    if (eRepeatParam2 <> 0)
+    {
       S := S || ';BYDAY=';
       if (bit_and (eRepeatParam2, power (2, 0)))
         S := S || 'MO,';
@@ -5639,45 +5908,48 @@ create procedure CAL.WA.vcal_recurrence2str (
         S := S || 'SU,';
       S := trim (S, ',');
     }
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
   }
-
-  if (eRepeat = 'M1') {
-    S := 'FREQ=MONTHLY';
-    S := S || ';INTERVAL=' || cast (eRepeatParam1 as varchar);
-    S := S || ';BYMONTHDAY=' || cast (eRepeatParam2 as varchar);
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
+  else if (eRepeat = 'M1')
+  {
+    S := 'FREQ=MONTHLY'
+      || ';INTERVAL='   || cast (eRepeatParam1 as varchar)
+      || ';BYMONTHDAY=' || cast (eRepeatParam2 as varchar);
   }
-
-  if (eRepeat = 'M2') {
-    S := 'FREQ=MONTHLY';
-    S := S || ';INTERVAL=' || cast (eRepeatParam1 as varchar);
+  else if (eRepeat = 'M2')
+  {
+    S := 'FREQ=MONTHLY'
+      || ';INTERVAL='   || cast (eRepeatParam1 as varchar);
     if (eRepeatParam3 = 10)
-      S := S || ';BYMONTHDAY=' || cast (eRepeatParam2 as varchar);
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
+    {
+      S := S || ';BYMONTHDAY=' || CAL.WA.vcal_recurrenceByDay2str(eRepeatParam2);
   }
-
-  if (eRepeat = 'Y1') {
-    S := 'FREQ=YEARLY';
-    S := S || ';INTERVAL=' || cast (eRepeatParam1 as varchar);
-    S := S || ';BYMONTH=' || cast (eRepeatParam2 as varchar);
-    S := S || ';BYMONTHDAY=' || cast (eRepeatParam3 as varchar);
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
+    else if ((eRepeatParam3 >= 1) and (eRepeatParam3 <= 7))
+    {
+      S := S || ';BYDAY=' || CAL.WA.vcal_recurrenceByDay2str(eRepeatParam2) || weekdays[eRepeatParam3-1];
   }
-
-  if (eRepeat = 'Y2') {
-    S := 'FREQ=YEARLY';
-    S := S || ';INTERVAL=1';
-    S := S || ';BYMONTH=' || cast (eRepeatParam3 as varchar);
-    if (eRepeatParam1 = 10)
-      S := S || ';BYMONTHDAY=' || cast (eRepeatParam2 as varchar);
-    if (not isnull (eRepeatUntil))
-      S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
   }
+  else if (eRepeat = 'Y1')
+  {
+    S := 'FREQ=YEARLY'
+      || ';INTERVAL='   || cast (eRepeatParam1 as varchar)
+      || ';BYMONTH='    || cast (eRepeatParam2 as varchar)
+      || ';BYMONTHDAY=' || cast (eRepeatParam3 as varchar);
+  }
+  else if (eRepeat = 'Y2')
+  {
+    S := 'FREQ=YEARLY'
+      || ';BYMONTH='    || cast (eRepeatParam3 as varchar);
+    if (eRepeatParam2 = 10)
+    {
+      S := S || ';BYMONTHDAY=' || CAL.WA.vcal_recurrenceByDay2str(eRepeatParam1);
+    }
+    else if ((eRepeatParam2 >= 1) and (eRepeatParam2 <= 7))
+    {
+      S := S || ';BYDAY=' || CAL.WA.vcal_recurrenceByDay2str(eRepeatParam1) || weekdays[eRepeatParam2-1];
+    }
+  }
+  if (not isnull (S) and not isnull (eRepeatUntil))
+    S := S || ';UNTIL=' || CAL.WA.vcal_date2str (eRepeatUntil);
 
   return S;
 }
@@ -5698,6 +5970,19 @@ create procedure CAL.WA.vcal_str2reminder (
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.vcal_tzDecode (
+  in xmlItem any,
+  in xmlPath varchar)
+{
+  declare S varchar;
+
+  S := CAL.WA.vcal_str (xmlItem, xmlPath);
+  return CAL.WA.tz_decode (S);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure CAL.WA.export_vcal_privacy (
   in privacy integer,
   inout sStream any)
@@ -5785,9 +6070,27 @@ create procedure CAL.WA.export_vcal_line (
   in value any,
   inout sStream any)
 {
+  declare prefix varchar;
+  declare tmp any;
+
   if (is_empty_or_null (value))
     return;
-  http (sprintf ('%s:%s\r\n', property, cast (value as varchar)), sStream);
+
+  prefix := '';
+  tmp := CAL.WA.utf2wide(sprintf ('%s:%s', property, replace(replace (cast (value as varchar), '\n', '\\n'), '\r', '')));
+  while (length (tmp) > length (prefix))
+  {
+	http_escape(CAL.WA.wide2utf(subseq (tmp, 0, 60)) || '\r\n', 1, sStream, 1, 1);
+    if (length (tmp) > 60)
+    {
+      tmp := prefix || subseq (tmp, 60);
+    }
+    else
+    {
+      tmp := '';
+    }
+    prefix := ' ';
+  }
 }
 ;
 
@@ -5798,9 +6101,10 @@ create procedure CAL.WA.export_vcal (
   in entries any := null,
   in options any := null)
 {
-  declare tz integer;
+  declare tz, toTz, fromTz, daylight integer;
   declare oEvents, oTasks, oPeriodFrom, oPeriodTo, oTagsInclude, oTagsExclude any;
-  declare S, url, tzID, tzName varchar;
+  declare S, url, tzID, tzName, tzName2 varchar;
+  declare startRRule, endRRule any;
   declare sStream any;
 
   oEvents := 1;
@@ -5820,23 +6124,48 @@ create procedure CAL.WA.export_vcal (
   }
 
   tz := CAL.WA.settings_timeZone2 (domain_id);
+  daylight := CAL.WA.settings_daylight2 (domain_id);
   url := sprintf ('http://%s%s/%U/calendar/%U/', SIOC.DBA.get_cname(), SIOC.DBA.get_base_path (), CAL.WA.domain_owner_name (domain_id), CAL.WA.domain_name (domain_id));
   -- tzID := sprintf ('GMT%s%04d', case when cast (tz as integer) < 0 then '-' else '+' end,  tz);
   tzID := CAL.WA.settings_timeZoneName2 (domain_id);
   tzName := sprintf ('GMT %s%02d:00', case when cast (tz as integer) < 0 then '-' else '+' end,  abs(floor (tz / 60)));
+  tzName2 := sprintf ('GMT %s%02d:00', case when cast ((tz+60) as integer) < 0 then '-' else '+' end,  abs(floor ((tz+60) / 60)));
 
   sStream := string_output();
 
   -- start
   http ('BEGIN:VCALENDAR\r\n', sStream);
   http ('VERSION:2.0\r\n', sStream);
+  http (sprintf ('X-WR-CALNAME:%s\r\n', CAL.WA.domain_name (domain_id)), sStream);
+
   http ('BEGIN:VTIMEZONE\r\n', sStream);
   http (sprintf ('TZID:%s\r\n', tzID), sStream);
+  CAL.WA.dt_daylightRRules(daylight, startRRule, endRRule);
+  fromTz := tz;
+  toTz := tz;
+  if (startRRule)
+  {
+    fromTz := tz;
+    toTz := tz + 60;
+    http ('BEGIN:DAYLIGHT\r\n', sStream);
+    http (sprintf ('TZOFFSETFROM:%s\r\n', CAL.WA.tz_string (fromTz)), sStream);
+    http (sprintf ('TZOFFSETTO:%s\r\n', CAL.WA.tz_string (toTz)), sStream);
+    http (sprintf ('TZNAME:%s\r\n', tzName2), sStream);
+    http ('DTSTART:19700329T020000\r\n', sStream);
+    CAL.WA.export_vcal_line ('RRULE', CAL.WA.vcal_recurrence2str (startRRule[0], startRRule[1], startRRule[2], startRRule[3], startRRule[4]), sStream);
+    http ('END:DAYLIGHT\r\n', sStream);
+    fromTz := tz + 60;
+    toTz := tz;
+  }
   http ('BEGIN:STANDARD\r\n', sStream);
-  http (sprintf ('TZOFFSETFROM:%s\r\n', CAL.WA.tz_string (tz)), sStream);
-  http (sprintf ('TZOFFSETTO:%s\r\n', CAL.WA.tz_string (tz)), sStream);
+  http (sprintf ('TZOFFSETFROM:%s\r\n', CAL.WA.tz_string (fromTz)), sStream);
+  http (sprintf ('TZOFFSETTO:%s\r\n', CAL.WA.tz_string (toTz)), sStream);
   http (sprintf ('TZNAME:%s\r\n', tzName), sStream);
+  if (endRRule)
+  {
   http ('DTSTART:19700101T000000\r\n', sStream);
+    CAL.WA.export_vcal_line ('RRULE', CAL.WA.vcal_recurrence2str (endRRule[0], endRRule[1], endRRule[2], endRRule[3], endRRule[4]), sStream);
+  }
   http ('END:STANDARD\r\n', sStream);
   http ('END:VTIMEZONE\r\n', sStream);
 
@@ -5845,7 +6174,7 @@ create procedure CAL.WA.export_vcal (
   {
     for (select * from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_KIND = 0 and (entries is null or CAL.WA.vector_contains (entries, E_ID))) do
     {
-      if (CAL.WA.dt_exchangeTest (oPeriodFrom, oPeriodTo, CAL.WA.event_gmt2user (E_EVENT_START, tz), CAL.WA.event_gmt2user (E_EVENT_END, tz), E_REPEAT_UNTIL) and CAL.WA.tags_exchangeTest (E_TAGS, oTagsInclude, oTagsExclude))
+      if (CAL.WA.dt_exchangeTest (oPeriodFrom, oPeriodTo, CAL.WA.event_gmt2user (E_EVENT_START, tz, daylight), CAL.WA.event_gmt2user (E_EVENT_END, tz, daylight), E_REPEAT_UNTIL) and CAL.WA.tags_exchangeTest (E_TAGS, oTagsInclude, oTagsExclude))
       {
         http ('BEGIN:VEVENT\r\n', sStream);
         CAL.WA.export_vcal_line ('UID', E_UID, sStream);
@@ -5859,11 +6188,11 @@ create procedure CAL.WA.export_vcal (
         CAL.WA.export_vcal_line ('CATEGORIES', E_TAGS, sStream);
         if (E_EVENT)
         {
-          CAL.WA.export_vcal_line ('DTSTART;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.event_gmt2user (E_EVENT_START, tz)), sStream);
-          CAL.WA.export_vcal_line ('DTEND;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.event_gmt2user (E_EVENT_END, tz)), sStream);
+          CAL.WA.export_vcal_line ('DTSTART;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.event_gmt2user (E_EVENT_START, tz, daylight)), sStream);
+          CAL.WA.export_vcal_line ('DTEND;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.event_gmt2user (E_EVENT_END, tz, daylight)), sStream);
         } else {
-          CAL.WA.export_vcal_line (sprintf ('DTSTART;TZID=%s', tzID), CAL.WA.vcal_datetime2str (CAL.WA.event_gmt2user (E_EVENT_START, tz)), sStream);
-          CAL.WA.export_vcal_line (sprintf ('DTEND;TZID=%s', tzID), CAL.WA.vcal_datetime2str (CAL.WA.event_gmt2user (E_EVENT_END, tz)), sStream);
+          CAL.WA.export_vcal_line (sprintf ('DTSTART;TZID=%s', tzID), CAL.WA.vcal_datetime2str (CAL.WA.event_gmt2user (E_EVENT_START, tz, daylight)), sStream);
+          CAL.WA.export_vcal_line (sprintf ('DTEND;TZID=%s', tzID), CAL.WA.vcal_datetime2str (CAL.WA.event_gmt2user (E_EVENT_END, tz, daylight)), sStream);
         }
         CAL.WA.export_vcal_line ('RRULE', CAL.WA.vcal_recurrence2str (E_REPEAT, E_REPEAT_PARAM1, E_REPEAT_PARAM2, E_REPEAT_PARAM3, E_REPEAT_UNTIL), sStream);
         CAL.WA.export_vcal_reminder (E_REMINDER, sStream);
@@ -5880,7 +6209,7 @@ create procedure CAL.WA.export_vcal (
   {
     for (select * from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_KIND = 1 and ((entries is null) or CAL.WA.vector_contains (entries, E_ID))) do
     {
-      if (CAL.WA.dt_exchangeTest (oPeriodFrom, oPeriodTo, CAL.WA.event_gmt2user (E_EVENT_START, tz), CAL.WA.event_gmt2user (E_EVENT_END, tz)) and CAL.WA.tags_exchangeTest (E_TAGS, oTagsInclude, oTagsExclude))
+      if (CAL.WA.dt_exchangeTest (oPeriodFrom, oPeriodTo, CAL.WA.event_gmt2user (E_EVENT_START, tz, daylight), CAL.WA.event_gmt2user (E_EVENT_END, tz, daylight)) and CAL.WA.tags_exchangeTest (E_TAGS, oTagsInclude, oTagsExclude))
       {
         http ('BEGIN:VTODO\r\n', sStream);
         CAL.WA.export_vcal_line ('UID', E_UID, sStream);
@@ -5891,9 +6220,9 @@ create procedure CAL.WA.export_vcal (
         CAL.WA.export_vcal_line ('SUMMARY', E_SUBJECT, sStream);
         CAL.WA.export_vcal_line ('DESCRIPTION', E_DESCRIPTION, sStream);
         CAL.WA.export_vcal_line ('CATEGORIES', E_TAGS, sStream);
-        CAL.WA.export_vcal_line ('DTSTART;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.dt_dateClear (CAL.WA.event_gmt2user (E_EVENT_START, tz))), sStream);
-        CAL.WA.export_vcal_line ('DUE;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.dt_dateClear (CAL.WA.event_gmt2user (E_EVENT_END, tz))), sStream);
-        CAL.WA.export_vcal_line ('COMPLETED;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.dt_dateClear (CAL.WA.event_gmt2user (E_COMPLETED, tz))), sStream);
+        CAL.WA.export_vcal_line ('DTSTART;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.dt_dateClear (CAL.WA.event_gmt2user (E_EVENT_START, tz, daylight))), sStream);
+        CAL.WA.export_vcal_line ('DUE;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.dt_dateClear (CAL.WA.event_gmt2user (E_EVENT_END, tz, daylight))), sStream);
+        CAL.WA.export_vcal_line ('COMPLETED;VALUE=DATE', CAL.WA.vcal_date2str (CAL.WA.dt_dateClear (CAL.WA.event_gmt2user (E_COMPLETED, tz, daylight))), sStream);
         CAL.WA.export_vcal_line ('PRIORITY', E_PRIORITY, sStream);
         CAL.WA.export_vcal_line ('STATUS', E_STATUS, sStream);
         CAL.WA.export_vcal_attendees (E_ID, E_DOMAIN_ID, E_ATTENDEES, sStream);
@@ -5922,8 +6251,9 @@ create procedure CAL.WA.import_vcal (
 {
   declare N, nLength integer;
   declare oEvents, oTasks, oTags, oSync, oMailAttendees any;
-  declare tmp, xmlData, xmlItems, itemName, V any;
+  declare tmp, xmlData, xmlItems, xmlTimezones, xmlEvents, itemName, V any;
   declare id,
+          recurenceId,
           uid,
           subject,
           description,
@@ -5981,58 +6311,75 @@ create procedure CAL.WA.import_vcal (
     if (itemName = 'IMC-VCALENDAR')
     {
       -- vCalendar version
-      vcalVersion := cast (xquery_eval ('VERSION/val', xmlItem, 1) as varchar);
+      vcalVersion := CAL.WA.vcal_str (xmlItem, 'VERSION');
 
       -- timezone
+      declare tzObject any;
+
       tzDict := dict_new();
-      nLength := xpath_eval('count (IMC-VTIMEZONE)', xmlItem);
-      for (N := 1; N <= nLength; N := N + 1)
+      xmlTimezones := xpath_eval ('./IMC-VTIMEZONE', xmlItem, 0);
+      foreach (any xmlTimezone in xmlTimezones) do
       {
-        tzID := cast (xquery_eval (sprintf ('IMC-VTIMEZONE[%d]/TZID/val', N), xmlItem, 1) as varchar);
+        tzID := CAL.WA.vcal_str (xmlTimezone, 'TZID');
         if (not isnull (tzID))
         {
-          tmp := cast (xquery_eval (sprintf ('IMC-VTIMEZONE[%d]/IMC-STANDARD/TZOFFSETTO/val', N), xmlItem, 1) as varchar);
-          CAL.WA.tz_decode (tmp, tzOffset);
+          tzObject := vector ();
+          tzOffset := CAL.WA.vcal_tzDecode (xmlTimezone, 'IMC-STANDARD/TZOFFSETFROM');
           if (not isnull (tzOffset))
-          {
-            dict_put (tzDict, tzID, tzOffset);
-        }
+            tzObject := vector_concat (tzObject, vector ('standartFrom', tzOffset));
+
+          tzOffset := CAL.WA.vcal_tzDecode (xmlTimezone, 'IMC-STANDARD/TZOFFSETTO');
+          if (not isnull (tzOffset))
+            tzObject := vector_concat (tzObject, vector ('standartTo', tzOffset));
+
+          CAL.WA.vcal_str2recurrence (xmlTimezone, 'IMC-STANDARD/RRULE', eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil);
+          tzObject := vector_concat (tzObject, vector ('standartRRule', vector (eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil)));
+
+          tzOffset := CAL.WA.vcal_tzDecode (xmlTimezone, 'IMC-DAYLIGHT/TZOFFSETFROM');
+          if (not isnull (tzOffset))
+            tzObject := vector_concat (tzObject, vector ('daylightFrom', tzOffset));
+
+          tzOffset := CAL.WA.vcal_tzDecode (xmlTimezone, 'IMC-DAYLIGHT/TZOFFSETTO');
+          if (not isnull (tzOffset))
+            tzObject := vector_concat (tzObject, vector ('daylightTo', tzOffset));
+
+          CAL.WA.vcal_str2recurrence (xmlTimezone, 'IMC-DAYLIGHT/RRULE', eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil);
+          tzObject := vector_concat (tzObject, vector ('daylightRRule', vector (eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil)));
+
+          dict_put (tzDict, tzID, tzObject);
       }
       }
 
       -- events
       if (oEvents)
       {
-      nLength := xpath_eval('count (IMC-VEVENT)', xmlItem);
-      for (N := 1; N <= nLength; N := N + 1)
+        xmlEvents := xpath_eval ('./IMC-VEVENT', xmlItem, 0);
+        foreach (any xmlEvent in xmlEvents) do
       {
-        uid := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/UID/val', N), xmlItem, 1) as varchar);
+          uid := CAL.WA.vcal_str (xmlEvent, 'UID');
+          recurenceId := CAL.WA.vcal_str (xmlEvent, 'RECURRENCE-ID');
         id := coalesce ((select E_ID from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_UID = uid), -1);
-          if ((id <> -1) and not isnull (updatedBefore))
-          {
-            if (exists (select 1 from CAL.WA.EVENTS where E_ID = id and E_UPDATED >= updatedBefore))
+          if ((id <> -1) and not isnull (recurenceId))
               goto _skip;
-          }
-          subject := CAL.WA.strDecode (cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/SUMMARY/val', N), xmlItem, 1) as varchar));
-          description := CAL.WA.strDecode (cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/DESCRIPTION/val', N), xmlItem, 1) as varchar));
-        location := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/LOCATION/val', N), xmlItem, 1) as varchar);
-        privacy := CAL.WA.vcal_str2privacy (xmlItem, sprintf ('IMC-VEVENT[%d]/CLASS/val', N));
+          if ((id <> -1) and not isnull (updatedBefore) and exists (select 1 from CAL.WA.EVENTS where E_ID = id and E_UPDATED >= updatedBefore))
+            goto _skip;
+          subject := CAL.WA.strDecode (CAL.WA.vcal_str (xmlEvent, 'SUMMARY'));
+          description := CAL.WA.strDecode (CAL.WA.vcal_str (xmlEvent, 'DESCRIPTION'));
+          location := CAL.WA.vcal_str (xmlEvent, 'LOCATION');
+          privacy := CAL.WA.vcal_str2privacy (xmlEvent, 'CLASS');
         if (isnull (privacy))
           privacy := CAL.WA.domain_is_public (domain_id);
-          eventTags := CAL.WA.tags_join (CAL.WA.vcal_str (xmlItem, sprintf ('IMC-VEVENT[%d]/CATEGORIES/', N)), oTags);
-        eEventStart := CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VEVENT[%d]/DTSTART/', N), tzDict);
-        eEventEnd := CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VEVENT[%d]/DTEND/', N), tzDict);
+          eventTags := CAL.WA.tags_join (CAL.WA.vcal_str (xmlEvent, 'CATEGORIES'), oTags);
+          eEventStart := CAL.WA.vcal_str2date (xmlEvent, 'DTSTART', tzDict);
+          eEventEnd := CAL.WA.vcal_str2date (xmlEvent, 'DTEND', tzDict);
         if (isnull (eEventEnd))
-        {
-          tmp := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/DURATION/val', N), xmlItem, 1) as varchar);
-          eEventEnd := CAL.WA.p_dateadd (eEventStart, tmp);
-        }
-        event := case when (isnull (xquery_eval (sprintf ('IMC-VEVENT[%d]/DTSTART/VALUE', N), xmlItem, 1))) then 0 else 1 end;
-        CAL.WA.vcal_str2recurrence (xmlItem, sprintf ('IMC-VEVENT[%d]/RRULE/fld', N), eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil);
-        tmp := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/DALARM/val', N), xmlItem, 1) as varchar);
-        eReminder := CAL.WA.vcal_str2reminder (xmlItem, sprintf ('IMC-VEVENT[%d]/IMC-VALARM/TRIGGER/', N));
-          updated := case when isnull (updatedBefore) then CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VEVENT[%d]/DTSTAMP/', N), tzDict) else null end;
-          notes := cast (xquery_eval (sprintf ('IMC-VEVENT[%d]/X-OL-NOTES/val', N), xmlItem, 1) as varchar);
+            eEventEnd := CAL.WA.p_dateadd (eEventStart, CAL.WA.vcal_str (xmlEvent, 'DURATION'));
+          event := case when (isnull (xquery_eval ('DTSTART/VALUE', xmlEvent, 1))) then 0 else 1 end;
+          CAL.WA.vcal_str2recurrence (xmlEvent, 'RRULE', eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil);
+          tmp := CAL.WA.vcal_str (xmlEvent, 'DALARM');
+          eReminder := CAL.WA.vcal_str2reminder (xmlEvent, 'IMC-VALARM/TRIGGER');
+          updated := case when isnull (updatedBefore) then CAL.WA.vcal_str2date (xmlEvent, 'DTSTAMP', tzDict) else null end;
+          notes := CAL.WA.vcal_str (xmlEvent, 'X-OL-NOTES');
           connection_set ('__calendar_import', '1');
           id := CAL.WA.event_update
           (
@@ -6059,7 +6406,7 @@ create procedure CAL.WA.import_vcal (
           );
           if (not isnull (exchange_id))
             update CAL.WA.EVENTS set E_EXCHANGE_ID = exchange_id where E_ID = id;
-          attendees := CAL.WA.import_vcal_attendees (xmlItem, sprintf ('IMC-VEVENT[%d]/ATTENDEE', N));
+          attendees := CAL.WA.import_vcal_attendees (xmlEvent, 'ATTENDEE');
           if (length (attendees))
             CAL.WA.attendees_update2 (id, attendees, oMailAttendees);
           connection_set ('__calendar_import', '0');
@@ -6073,36 +6420,33 @@ create procedure CAL.WA.import_vcal (
       if (oTasks)
       {
       -- tasks (todo)
-      nLength := xpath_eval('count (IMC-VTODO)', xmlItem);
-      for (N := 1; N <= nLength; N := N + 1)
+        xmlEvents := xpath_eval ('./IMC-VTODO', xmlItem, 0);
+        foreach (any xmlEvent in xmlEvents) do
       {
-        uid := cast (xquery_eval (sprintf ('IMC-VTODO[%d]/UID/val', N), xmlItem, 1) as varchar);
+          uid := CAL.WA.vcal_str (xmlEvent, 'UID');
         id := coalesce ((select E_ID from CAL.WA.EVENTS where E_DOMAIN_ID = domain_id and E_UID = uid), -1);
-          if ((id <> -1) and not isnull (updatedBefore))
-          {
-            if (exists (select 1 from CAL.WA.EVENTS where E_ID = id and E_UPDATED >= updatedBefore))
+          if ((id <> -1) and not isnull (updatedBefore) and exists (select 1 from CAL.WA.EVENTS where E_ID = id and E_UPDATED >= updatedBefore))
               goto _skip2;
-          }
-          subject := CAL.WA.strDecode (cast (xquery_eval (sprintf ('IMC-VTODO[%d]/SUMMARY/val', N), xmlItem, 1) as varchar));
-          description := CAL.WA.strDecode (cast (xquery_eval (sprintf ('IMC-VTODO[%d]/DESCRIPTION/val', N), xmlItem, 1) as varchar));
-        privacy := CAL.WA.vcal_str2privacy (xmlItem, sprintf ('IMC-VTODO[%d]/CLASS/val', N));
+          subject := CAL.WA.strDecode (CAL.WA.vcal_str (xmlEvent, 'SUMMARY'));
+          description := CAL.WA.strDecode (CAL.WA.vcal_str (xmlEvent, 'DESCRIPTION'));
+          privacy := CAL.WA.vcal_str2privacy (xmlEvent, 'CLASS');
         if (isnull (privacy))
           privacy := CAL.WA.domain_is_public (domain_id);
-          eventTags := CAL.WA.tags_join (CAL.WA.vcal_str (xmlItem, sprintf ('IMC-VTODO[%d]/CATEGORIES/', N)), oTags);
-        eEventStart := CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VTODO[%d]/DTSTART/', N));
+          eventTags := CAL.WA.tags_join (CAL.WA.vcal_str (xmlEvent, 'CATEGORIES'), oTags);
+          eEventStart := CAL.WA.vcal_str2date (xmlEvent, 'DTSTART');
         eEventStart := CAL.WA.dt_join (eEventStart, CAL.WA.dt_timeEncode (12, 0));
-        eEventEnd := CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VTODO[%d]/DUE/', N));
+          eEventEnd := CAL.WA.vcal_str2date (xmlEvent, 'DUE');
         eEventEnd := CAL.WA.dt_join (eEventEnd, CAL.WA.dt_timeEncode (12, 0));
-        priority := cast (xquery_eval (sprintf ('IMC-VTODO[%d]/PRIORITY/val', N), xmlItem, 1) as varchar);
+          priority := CAL.WA.vcal_str (xmlEvent, 'PRIORITY');
         if (isnull (priority))
           priority := '3';
-        status := CAL.WA.vcal_str2status (xmlItem, sprintf ('IMC-VTODO[%d]/STATUS/val', N));
-        complete := cast (xquery_eval (sprintf ('IMC-VTODO[%d]/COMPLETE/val', N), xmlItem, 1) as varchar);
-        completed := CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VTODO[%d]/COMPLETED/', N));
+          status := CAL.WA.vcal_str2status (xmlEvent, 'STATUS');
+          complete := CAL.WA.vcal_str (xmlEvent, 'COMPLETE');
+          completed := CAL.WA.vcal_str2date (xmlEvent, 'COMPLETED');
         completed := CAL.WA.dt_join (completed, CAL.WA.dt_timeEncode (12, 0));
-        updated := CAL.WA.vcal_str2date (xmlItem, sprintf ('IMC-VTODO[%d]/DTSTAMP/', N), tzDict);
-          notes := cast (xquery_eval (sprintf ('IMC-VTODO[%d]/X-OL-NOTES/val', N), xmlItem, 1) as varchar);
-          attendees := CAL.WA.import_vcal_attendees (xmlItem, sprintf ('IMC-VTODO[%d]/ATTENDEE', N));
+          updated := CAL.WA.vcal_str2date (xmlEvent, 'DTSTAMP', tzDict);
+          notes := CAL.WA.vcal_str (xmlEvent, 'X-OL-NOTES');
+          attendees := CAL.WA.import_vcal_attendees (xmlEvent, 'ATTENDEE');
           id := CAL.WA.import_task_update
           (
                   id,              -- id
@@ -6238,7 +6582,8 @@ create procedure CAL.WA.import_feed_rss_item (
   description := xpath_eval ('[ xmlns:content="http://purl.org/rss/1.0/modules/content/" ] string(/item/content:encoded)', xt, 1);
   if (is_empty_or_null (description))
     description := xpath_eval ('string(/item/description)', xt, 1);
-  description := CAL.WA.string2xml (serialize_to_UTF8_xml (description));
+  description := serialize_to_UTF8_xml (description);
+
   link := cast (xpath_eval ('/item/link', xt, 1) as varchar);
   if (isnull (link))
   {
@@ -6296,31 +6641,40 @@ create procedure CAL.WA.import_feed_atom_item(
     if (length (contents) = 1)
     {
       description := CAL.WA.xml2string(contents[0]);
-    } else {
+    }
+    else
+    {
       description := '<div>';
       foreach (any content in contents) do
+      {
         description := concat(description, CAL.WA.xml2string(content));
-      description := concat(description, '</div>');
     }
-  } else {
+      description := description || '</div>';
+    }
+  }
+  else
+  {
     description := xpath_eval ('string(/entry/content)', xt, 1);
     if (is_empty_or_null(description))
       description := xpath_eval ('string(/entry/summary)', xt, 1);
-    description := CAL.WA.string2xml (serialize_to_UTF8_xml (description));
+
+    description := serialize_to_UTF8_xml (description);
   }
+
   link := cast (xpath_eval ('/entry/link[@rel="alternate"]/@href', xt, 1) as varchar);
+
   uid := cast (xpath_eval ('/entry/id', xt, 1) as varchar);
-  pubDate := CAL.WA.dt_convert(cast(xpath_eval ('/entry/created', xt, 1) as varchar), null);
+
+  pubDate := CAL.WA.dt_convert(cast(xpath_eval ('/entry/created', xt, 1) as varchar));
   if (isnull (pubDate))
   {
-    pubdate := CAL.WA.dt_convert(cast(xpath_eval ('/entry/modified', xt, 1) as varchar), null);
+    pubdate := CAL.WA.dt_convert (cast(xpath_eval ('/entry/modified', xt, 1) as varchar));
     if (isnull (pubDate))
     {
-      pubdate := CAL.WA.dt_convert(cast(xpath_eval ('/entry/updated', xt, 1) as varchar), null);
-      if (isnull (pubDate))
-        pubdate := now();
+      pubdate := CAL.WA.dt_convert (cast(xpath_eval ('/entry/updated', xt, 1) as varchar), now ());
     }
   }
+
   id := CAL.WA.import_task_update
         (
           id,                                   -- id
@@ -6516,12 +6870,10 @@ create procedure CAL.WA.exchange_exec_internal (
           };
           retContent := http_get (_name, resHeader, 'PUT', reqHeader, _content);
           if (not (length (resHeader) > 0 and (resHeader[0] like 'HTTP/1._ 2__ %' or  resHeader[0] like 'HTTP/1._ 3__ %')))
-          {
             signal ('cal02', 'The export/publication did not pass successfully. Please verify the path and parameters values!<>');
           }
         }
       }
-    }
     -- subscribe
     else if (_direction = 1)
     {
@@ -6735,6 +7087,10 @@ create procedure CAL.WA.syncml_check (
     return 0;
   if (VAD.DBA.version_compare (syncmlVersion, '1.05.75') < 0)
     return 0;
+  if (__proc_exists ('DB.DBA.yac_syncml_version_get') is null)
+    return 0;
+  if (__proc_exists ('DB.DBA.yac_syncml_type_get') is null)
+    return 0;
   if (isnull (syncmlPath))
     return 1;
   if (DB.DBA.yac_syncml_version_get (syncmlPath) = 'N')
@@ -6764,6 +7120,8 @@ create procedure CAL.WA.syncml_entry_update (
     _syncmlPath := get_keyword ('name', _options);
     if (not CAL.WA.syncml_check (_syncmlPath))
       goto _skip;
+    if ((_event_kind = 0) and (get_keyword ('events', _options, 0) = 0))
+      goto _skip;
     if ((_event_kind = 1) and (get_keyword ('tasks', _options, 0) = 0))
       goto _skip;
 
@@ -6795,17 +7153,15 @@ create procedure CAL.WA.syncml_entry_update_internal (
     _content := CAL.WA.entry2syncml (_domain_id, _event_id);
     _permissions := USER_GET_OPTION (_user, 'PERMISSIONS');
     if (isnull (_permissions))
-    {
       _permissions := '110100000RR';
-    }
+
     connection_set ('__sync_dav_upl', '1');
     connection_set ('__sync_ods', '1');
-    DB.DBA.DAV_RES_UPLOAD_STRSES_INT (_path, _content, 'text/x-vcalendar', _permissions, http_dav_uid (), http_dav_uid () + 1, null, null, 0);
+    DB.DBA.DAV_RES_UPLOAD_STRSES_INT (_path, _content, 'text/x-vcalendar', _permissions, _user, _user, null, null, 0);
     connection_set ('__sync_ods', '0');
     connection_set ('__sync_dav_upl', '0');
   }
-
-  if (_action = 'D')
+  else if (_action = 'D')
   {
     declare _id integer;
 
@@ -6813,7 +7169,7 @@ create procedure CAL.WA.syncml_entry_update_internal (
     if (isinteger(_id) and (_id > 0))
     {
       connection_set ('__sync_ods', '1');
-      DB.DBA.DAV_DELETE (_path, 1, _user, _password);
+      DB.DBA.DAV_DELETE_INT (_path, 1, _user, _password, 0);
       connection_set ('__sync_ods', '0');
     }
   }
@@ -7024,7 +7380,7 @@ create procedure CAL.WA.alarm_scheduler ()
   {
     fetch cr into eID, eDomainID, eEvent, eEventStart, eEventEnd, eRepeat, eRepeatParam1, eRepeatParam2, eRepeatParam3, eRepeatUntil, eRepeatExceptions, eReminder, eReminderDate;
 
-    nextReminderDate := CAL.WA.event_addReminder (CAL.WA.event_user2gmt (dt, CAL.WA.settings_timeZone2 (eDomainID)),
+    nextReminderDate := CAL.WA.event_addReminder (CAL.WA.event_user2gmt (dt, CAL.WA.settings_timeZone2 (eDomainID), CAL.WA.settings_daylight2 (eDomainID)),
                                                   eID,
                                                   eDomainID,
                                                   eEvent,
@@ -8134,60 +8490,3 @@ create procedure CAL.WA.news_comment_get_cn_type (in f_name varchar)
   return ext;
 }
 ;
-
--------------------------------------------------------------------------------
---
-create procedure CAL.WA.obj2json (
-  in o any,
-  in d integer := 2)
-{
-  declare N, M integer;
-  declare R, T any;
-  declare retValue any;
-
-	if (d = 0)
-	  return '[maximum depth achieved]';
-
-  T := vector ('\b', '\\b', '\t', '\\t', '\n', '\\n', '\f', '\\f',	'\r', '\\r', '"', '\\"', '\\', '\\\\');
-	retValue := '';
-	if (isnumeric (o))
-	{
-		retValue := cast (o as varchar);
-	}
-	else if (isstring (o))
-	{
-		for (N := 0; N < length(o); N := N + 1)
-		{
-			R := chr (o[N]);
-		  for (M := 0; M < length(T); M := M + 2)
-		  {
-				if (R = T[M])
-				  R := T[M+1];
-			}
-			retValue := retValue || R;
-		}
-		retValue := '"' || retValue || '"';
-	}
-	else if (isarray (o))
-	{
-		retValue := '[';
-		for (N := 0; N < length(o); N := N + 1)
-		{
-		  retValue := retValue || CAL.WA.obj2json (o[N], d-1);
-		  if (N <> length(o)-1)
-			  retValue := retValue || ',\n';
-		}
-		retValue := retValue || ']';
-	}
-	return retValue;
-}
-;
-
--------------------------------------------------------------------------------
---
-create procedure CAL.WA.json2obj (
-  in o any)
-{
-  return json_parse (o);
-}
-;
diff --git a/appsrc/ODS-Calendar/sql/calendar-a-table.sql b/appsrc/ODS-Calendar/sql/calendar-a-table.sql
index 8010ba1..920172c 100644
--- a/appsrc/ODS-Calendar/sql/calendar-a-table.sql
+++ b/appsrc/ODS-Calendar/sql/calendar-a-table.sql
@@ -1,10 +1,10 @@
 --
---  $Id: calendar-a-table.sql,v 1.26.2.5 2010/11/19 16:50:15 source Exp $
+--  $Id: calendar-a-table.sql,v 1.26.2.8 2012/03/08 12:14:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -111,7 +111,7 @@ CAL.WA.exec_no_error ('
 --
 create procedure CAL.WA.my_calendars (
   in domain_id any,
-  in privacy varchar)
+  in privacy integer)
 {
   declare calendar_id, calendar_privacy integer;
 
@@ -475,6 +475,7 @@ CAL.WA.exec_no_error ('
     CAL.WA.upstream_event_update (N.E_DOMAIN_ID, N.E_ID, _uid, N.E_TAGS, \'U\');
     CAL.WA.exchange_event_update (N.E_DOMAIN_ID);
     CAL.WA.syncml_entry_update (N.E_DOMAIN_ID, N.E_ID, _uid, N.E_KIND, \'U\');
+    CAL.WA.domain_ping (N.E_DOMAIN_ID);
   }
 ');
 
@@ -485,7 +486,9 @@ CAL.WA.exec_no_error ('
     delete from CAL.WA.ALARMS where A_EVENT_ID = O.E_ID;
 
     CAL.WA.upstream_event_update (O.E_DOMAIN_ID, O.E_ID, O.E_UID, O.E_TAGS, \'D\');
+    CAL.WA.exchange_event_update (O.E_DOMAIN_ID);
     CAL.WA.syncml_entry_update (O.E_DOMAIN_ID, O.E_ID, O.E_UID, O.E_KIND, \'D\');
+    CAL.WA.domain_ping (O.E_DOMAIN_ID);
   }
 ');
 
diff --git a/appsrc/ODS-Calendar/sql/calendar-a-update.sql b/appsrc/ODS-Calendar/sql/calendar-a-update.sql
index 83d3693..54a45ab 100644
--- a/appsrc/ODS-Calendar/sql/calendar-a-update.sql
+++ b/appsrc/ODS-Calendar/sql/calendar-a-update.sql
@@ -1,10 +1,10 @@
 --
---  $Id: calendar-a-update.sql,v 1.1.2.3 2010/10/07 13:23:18 source Exp $
+--  $Id: calendar-a-update.sql,v 1.1.2.4 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/sql/calendar-a-wa.sql b/appsrc/ODS-Calendar/sql/calendar-a-wa.sql
index 8438653..3229f24 100644
--- a/appsrc/ODS-Calendar/sql/calendar-a-wa.sql
+++ b/appsrc/ODS-Calendar/sql/calendar-a-wa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: calendar-a-wa.sql,v 1.8.2.5 2010/09/22 13:57:03 source Exp $
+--  $Id: calendar-a-wa.sql,v 1.8.2.6 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/sql/calendar-d.sql b/appsrc/ODS-Calendar/sql/calendar-d.sql
index 9dbc89a..811f90c 100644
--- a/appsrc/ODS-Calendar/sql/calendar-d.sql
+++ b/appsrc/ODS-Calendar/sql/calendar-d.sql
@@ -1,10 +1,10 @@
 --
---  $Id: calendar-d.sql,v 1.12.2.5 2010/11/19 16:50:15 source Exp $
+--  $Id: calendar-d.sql,v 1.12.2.8 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -73,6 +73,7 @@ CAL.WA.exec_no_error('DROP TABLE CAL.WA.SHARED');
 CAL.WA.exec_no_error('DROP TABLE CAL.WA.GRANTS');
 CAL.WA.exec_no_error('DROP TABLE CAL.WA.ANNOTATIONS');
 CAL.WA.exec_no_error('DROP TABLE CAL.WA.ALARMS');
+CAL.WA.exec_no_error ('DROP TABLE CAL.WA.EVENT_GRANTS');
 CAL.WA.exec_no_error('DROP TABLE CAL.WA.EVENT_COMMENTS');
 CAL.WA.exec_no_error('DROP TABLE CAL.WA.EVENTS');
 CAL.WA.exec_no_error('DROP TABLE CAL.WA.EXCHANGE');
@@ -101,6 +102,7 @@ registry_remove ('cal_uid_version');
 registry_remove ('cal_attendee_update');
 registry_remove ('cal_path_upgrade2');
 registry_remove ('cal_atom_update');
+registry_remove ('cal_services_update');
 
 -- Procedures
 create procedure CAL.WA.drop_procedures()
diff --git a/appsrc/ODS-Calendar/sql/sioc_calendar.sql b/appsrc/ODS-Calendar/sql/sioc_calendar.sql
index b7a9178..e95a87b 100644
--- a/appsrc/ODS-Calendar/sql/sioc_calendar.sql
+++ b/appsrc/ODS-Calendar/sql/sioc_calendar.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_calendar.sql,v 1.19.2.9 2010/10/13 12:14:39 source Exp $
+--  $Id: sioc_calendar.sql,v 1.19.2.13 2012/03/08 12:14:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -106,10 +106,14 @@ create procedure fill_ods_calendar_sioc (
   in _wai_name varchar := null)
 {
   declare id, deadl, cnt integer;
-  declare c_iri, creator_iri, iri varchar;
+  declare acl_graph_iri, c_iri, creator_iri, iri varchar;
 
   {
+    -- init services
+    SIOC..fill_ods_calendar_services ();
+
     for (select WAI_ID,
+                WAI_IS_PUBLIC,
                 WAI_TYPE_NAME,
                 WAI_NAME,
                 WAI_ACL
@@ -117,9 +121,9 @@ create procedure fill_ods_calendar_sioc (
           where ((_wai_name is null) or (WAI_NAME = _wai_name))
             and WAI_TYPE_NAME = 'Calendar') do
     {
-      graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
-      exec (sprintf ('sparql clear graph <%s>', graph_iri));
-      SIOC..wa_instance_acl_insert (WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
+      acl_graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
+      exec (sprintf ('sparql clear graph <%s>', acl_graph_iri));
+      SIOC..wa_instance_acl_insert (WAI_IS_PUBLIC, WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
       for (select E_DOMAIN_ID, E_ID, E_ACL
              from CAL.WA.EVENTS
             where E_DOMAIN_ID = WAI_ID and E_ACL is not null) do
@@ -198,51 +202,7 @@ create procedure fill_ods_calendar_sioc (
                     E_UPDATED,
                     E_TAGS,
                     E_NOTES);
-	    for (select EC_ID,
-                  EC_DOMAIN_ID,
-                  EC_EVENT_ID,
-                  EC_TITLE,
-                  EC_COMMENT,
-                  EC_UPDATED,
-                  EC_U_NAME,
-                  EC_U_MAIL,
-                  EC_U_URL
-		         from CAL.WA.EVENT_COMMENTS
-		        where EC_EVENT_ID = E_ID) do
-		  {
-		    calendar_comment_insert (graph_iri,
-            		                 c_iri,
-                                 EC_ID,
-                                 EC_DOMAIN_ID,
-                                 EC_EVENT_ID,
-                                 EC_TITLE,
-                                 EC_COMMENT,
-                                 EC_UPDATED,
-                                 EC_U_NAME,
-                                 EC_U_MAIL,
-                                 EC_U_URL);
-      }
-      for (select A_ID,
-                  A_DOMAIN_ID,
-                  A_OBJECT_ID,
-                  A_AUTHOR,
-                  A_BODY,
-                  A_CLAIMS,
-                  A_CREATED,
-                  A_UPDATED
-             from CAL.WA.ANNOTATIONS
-            where A_OBJECT_ID = E_ID) do
-      {
-        cal_annotation_insert (graph_iri,
-                               A_ID,
-                               A_DOMAIN_ID,
-                               A_OBJECT_ID,
-                               A_AUTHOR,
-                               A_BODY,
-                               A_CLAIMS,
-                               A_CREATED,
-                               A_UPDATED);
-      }
+
       cnt := cnt + 1;
       if (mod (cnt, 500) = 0)
       {
@@ -289,6 +249,88 @@ create procedure fill_ods_calendar_sioc (
 
 -------------------------------------------------------------------------------
 --
+create procedure fill_ods_calendar_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('calendar.event.new', 'calendar.task.new', 'calendar.import', 'calendar.export', 'calendar.publication.new', 'calendar.subscription.new', 'calendar.upstream.new', 'calendar.options.set',  'calendar.options.get');
+  ods_object_services (graph_iri, 'calendar', 'ODS calendar instance services', svc_functions);
+
+  -- event
+  svc_functions := vector ('calendar.get', 'calendar.event.edit', 'calendar.delete', 'calendar.comment.new', 'calendar.annotation.new');
+  ods_object_services (graph_iri, 'calendar/event', 'ODS calendar item services', svc_functions);
+
+  -- task
+  svc_functions := vector ('calendar.get', 'calendar.task.edit', 'calendar.delete', 'calendar.comment.new', 'calendar.annotation.new');
+  ods_object_services (graph_iri, 'calendar/task', 'ODS calendar item services', svc_functions);
+
+  -- item comment
+  svc_functions := vector ('calendar.comment.get', 'calendar.comment.delete');
+  ods_object_services (graph_iri, 'calendar/item/comment', 'ODS calendar comment services', svc_functions);
+
+  -- item annotation
+  svc_functions := vector ('calendar.annotation.get', 'calendar.annotation.claim', 'calendar.annotation.delete');
+  ods_object_services (graph_iri, 'calendar/item/annotation', 'ODS calendar annotation services', svc_functions);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure clean_ods_calendar_sioc (
+  in _wai_name varchar := null,
+  in _access_mode integer := null)
+{
+  declare id, deadl, cnt integer;
+  declare acl_graph_iri, c_iri, creator_iri, iri varchar;
+
+  {
+    id := -1;
+    deadl := 3;
+    cnt := 0;
+    declare exit handler for sqlstate '40001'
+    {
+      if (deadl <= 0)
+	      resignal;
+      rollback work;
+      deadl := deadl - 1;
+      goto L0;
+    };
+  L0:
+
+    for (select E_ID,
+                E_DOMAIN_ID,
+                E_TAGS
+           from DB.DBA.WA_INSTANCE,
+                DB.DBA.WA_MEMBER,
+                CAL.WA.EVENTS
+          where WAM_INST = WAI_NAME
+            and ((WAM_IS_PUBLIC = 1 and _wai_name is null) or WAI_NAME = _wai_name)
+            and E_DOMAIN_ID = WAI_ID
+            and E_PRIVACY = 1
+          order by E_ID) do
+    {
+      event_delete (E_ID,
+                    E_DOMAIN_ID,
+                    E_TAGS);
+
+      cnt := cnt + 1;
+      if (mod (cnt, 500) = 0)
+      {
+  	    commit work;
+  	    id := E_ID;
+      }
+    }
+    commit work;
+  }
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure ods_calendar_services (
   in graph_iri varchar, 
   in forum_iri varchar,
@@ -352,8 +394,9 @@ create procedure event_insert (
       creator_iri := user_iri (WAM_USER);
     }
 
-  if (not isnull (graph_iri))
-  {
+  if (isnull (graph_iri))
+    return;
+
     iri := calendar_event_iri (domain_id, event_id);
 
     ods_sioc_post (graph_iri, iri, c_iri, creator_iri, subject, created, updated, CAL.WA.event_url (domain_id, event_id), description);
@@ -384,8 +427,11 @@ create procedure event_insert (
         DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, vcal_iri ('location'), location);
       if (not isnull (privacy))
         DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, vcal_iri ('class'), case when privacy = 1 then 'PUBLIC' else 'PRIVATE' end);
+
+    -- event services
+    SIOC..ods_object_services_attach (graph_iri, iri, 'calendar/event');
     }
-    if (kind = 1)
+  else if (kind = 1)
     {
       DB.DBA.ODS_QUAD_URI   (graph_iri, iri, rdf_iri ('type'), vcal_iri ('vtodo'));
       if (not isnull (uid))
@@ -414,10 +460,14 @@ create procedure event_insert (
         DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, vcal_iri ('status'), status);
       if (not isnull (privacy))
         DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, vcal_iri ('class'), case when privacy = 1 then 'PUBLIC' else 'PRIVATE' end);
+
+    -- task services
+    SIOC..ods_object_services_attach (graph_iri, iri, 'calendar/task');
+
+    SIOC..calendar_comments_insert (graph_iri, c_iri, domain_id, event_id);
+    SIOC..cal_annotations_insert (graph_iri, domain_id, event_id);
   }
   }
-  return;
-}
 ;
 
 -------------------------------------------------------------------------------
@@ -439,6 +489,13 @@ create procedure event_delete (
   iri := calendar_event_iri (domain_id, event_id);
   scot_tags_delete (domain_id, iri, tags);
   delete_quad_s_or_o (graph_iri, iri, iri);
+
+  -- event services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'calendar/event');
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'calendar/task');
+
+  SIOC..calendar_comments_delete (graph_iri, domain_id, event_id);
+  SIOC..cal_annotations_delete (graph_iri, domain_id, event_id);
 }
 ;
 
@@ -609,6 +666,62 @@ create trigger EVENTS_SIOC_ACL_D before delete on CAL.WA.EVENTS order 100 refere
 
 -------------------------------------------------------------------------------
 --
+create procedure calendar_comments_insert (
+  in graph_iri varchar,
+  in forum_iri varchar,
+  inout domain_id integer,
+  inout master_id integer)
+{
+  for (select EC_ID,
+              EC_DOMAIN_ID,
+              EC_EVENT_ID,
+              EC_TITLE,
+              EC_COMMENT,
+              EC_UPDATED,
+              EC_U_NAME,
+              EC_U_MAIL,
+              EC_U_URL
+         from CAL.WA.EVENT_COMMENTS
+        where EC_EVENT_ID = master_id) do
+  {
+    calendar_comment_insert (graph_iri,
+                             forum_iri,
+                             EC_ID,
+                             EC_DOMAIN_ID,
+                             EC_EVENT_ID,
+                             EC_TITLE,
+                             EC_COMMENT,
+                             EC_UPDATED,
+                             EC_U_NAME,
+                             EC_U_MAIL,
+                             EC_U_URL);
+  }
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure calendar_comments_delete (
+  in graph_iri varchar,
+  inout domain_id integer,
+  inout master_id integer)
+{
+  for (select EC_ID,
+              EC_DOMAIN_ID,
+              EC_EVENT_ID
+         from CAL.WA.EVENT_COMMENTS
+        where EC_EVENT_ID = master_id) do
+  {
+    calendar_comment_delete (graph_iri,
+                             EC_DOMAIN_ID,
+                             EC_EVENT_ID,
+                             EC_ID);
+  }
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure calendar_comment_insert (
 	in graph_iri varchar,
 	in forum_iri varchar,
@@ -646,38 +759,47 @@ create procedure calendar_comment_insert (
       forum_iri := calendar_iri (WAI_NAME);
 		}
 
-	if (not isnull (graph_iri))
-	{
+	if (isnull (graph_iri))
+	  return;
+
 		comment_iri := calendar_comment_iri (domain_id, master_id, comment_id);
-    if (not isnull (comment_iri))
-    {
-		  master_iri := calendar_event_iri (domain_id, master_id);
+  if (isnull (comment_iri))
+	  return;
+
+  master_iri := SIOC..calendar_event_iri (domain_id, master_id);
       foaf_maker (graph_iri, u_url, u_name, u_mail);
       ods_sioc_post (graph_iri, comment_iri, forum_iri, null, title, last_update, last_update, null, comment, null, null, u_url);
       DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, sioc_iri ('has_reply'), comment_iri);
       DB.DBA.ODS_QUAD_URI (graph_iri, comment_iri, sioc_iri ('reply_of'), master_iri);
-    }
-  }
+
+  SIOC..ods_object_services_attach (graph_iri, comment_iri, 'calendar/item/comment');
 }
 ;
 
 -------------------------------------------------------------------------------
 --
 create procedure calendar_comment_delete (
+  in graph_iri varchar,
   inout domain_id integer,
-  inout item_id integer,
-  inout id integer)
+  inout master_id integer,
+  inout comment_id integer)
 {
+  declare master_iri, comment_iri varchar;
   declare exit handler for sqlstate '*'
   {
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
+  master_iri := SIOC..calendar_event_iri (domain_id, master_id);
+  if (isnull (graph_iri))
+    graph_iri := SIOC..get_graph_new (CAL.WA.domain_is_public (domain_id), master_iri);
 
-  declare iri varchar;
+  if (isnull (graph_iri))
+    return;
 
-  iri := calendar_comment_iri (domain_id, item_id, id);
-  delete_quad_s_or_o (get_graph_ext (CAL.WA.domain_is_public (domain_id)), iri, iri);
+  comment_iri := calendar_comment_iri (domain_id, master_id, comment_id);
+  delete_quad_s_or_o (get_graph_ext (CAL.WA.domain_is_public (domain_id)), comment_iri, comment_iri);
+  SIOC..ods_object_services_dettach (graph_iri, comment_iri, 'calendar/item/comment');
 }
 ;
 
@@ -705,7 +827,8 @@ create trigger EVENT_COMMENTS_SIOC_I after insert on CAL.WA.EVENT_COMMENTS refer
 create trigger EVENT_COMMENTS_SIOC_U after update on CAL.WA.EVENT_COMMENTS referencing old as O, new as N
 {
   if (not isnull(O.EC_PARENT_ID))
-    calendar_comment_delete (O.EC_DOMAIN_ID,
+    calendar_comment_delete (null,
+                             O.EC_DOMAIN_ID,
                              O.EC_EVENT_ID,
                              O.EC_ID);
   if (not isnull(N.EC_PARENT_ID))
@@ -728,7 +851,8 @@ create trigger EVENT_COMMENTS_SIOC_U after update on CAL.WA.EVENT_COMMENTS refer
 create trigger EVENT_COMMENTS_SIOC_D before delete on CAL.WA.EVENT_COMMENTS referencing old as O
 {
   if (not isnull(O.EC_PARENT_ID))
-    calendar_comment_delete (O.EC_DOMAIN_ID,
+    calendar_comment_delete (null,
+                             O.EC_DOMAIN_ID,
                              O.EC_EVENT_ID,
                              O.EC_ID);
 }
@@ -736,6 +860,61 @@ create trigger EVENT_COMMENTS_SIOC_D before delete on CAL.WA.EVENT_COMMENTS refe
 
 -------------------------------------------------------------------------------
 --
+create procedure cal_annotations_insert (
+  in graph_iri varchar,
+  inout domain_id integer,
+  inout master_id integer)
+{
+  for (select A_ID,
+              A_DOMAIN_ID,
+              A_OBJECT_ID,
+              A_AUTHOR,
+              A_BODY,
+              A_CLAIMS,
+              A_CREATED,
+              A_UPDATED
+         from CAL.WA.ANNOTATIONS
+        where A_OBJECT_ID = master_id) do
+  {
+    cal_annotation_insert (graph_iri,
+                           A_ID,
+                           A_DOMAIN_ID,
+                           A_OBJECT_ID,
+                           A_AUTHOR,
+                           A_BODY,
+                           A_CLAIMS,
+                           A_CREATED,
+                           A_UPDATED);
+  }
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure cal_annotations_delete (
+  in graph_iri varchar,
+  inout domain_id integer,
+  inout master_id integer)
+{
+  for (select A_ID,
+              A_DOMAIN_ID,
+              A_OBJECT_ID,
+              A_CLAIMS
+         from CAL.WA.ANNOTATIONS
+        where A_OBJECT_ID = master_id) do
+  {
+    cal_annotation_delete (graph_iri,
+                           A_DOMAIN_ID,
+                           A_OBJECT_ID,
+                           A_ID,
+                           A_CLAIMS
+                          );
+  }
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure cal_annotation_insert (
   in graph_iri varchar,
   inout annotation_id integer,
@@ -747,8 +926,7 @@ create procedure cal_annotation_insert (
   inout created datetime,
   inout updated datetime)
 {
-  declare master_iri, annotattion_iri varchar;
-
+  declare master_iri, annotation_iri varchar;
   declare exit handler for sqlstate '*'
   {
     sioc_log_message (__SQL_MESSAGE);
@@ -769,20 +947,20 @@ create procedure cal_annotation_insert (
       graph_iri := get_graph_ext (WAI_IS_PUBLIC);
     }
 
-  if (not isnull (graph_iri))
-  {
+  if (isnull (graph_iri))
+    return;
+
     master_iri := calendar_event_iri (domain_id, cast (master_id as integer));
-    annotattion_iri := calendar_annotation_iri (domain_id, cast (master_id as integer), annotation_id);
-	  DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, an_iri ('annotates'), master_iri);
-	  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotattion_iri);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('author'), author);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('body'), body);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('created'), created);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('modified'), updated);
-
-	  cal_claims_insert (graph_iri, annotattion_iri, claims);
-  }
-  return;
+  annotation_iri := calendar_annotation_iri (domain_id, cast (master_id as integer), annotation_id);
+  DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, an_iri ('annotates'), master_iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotation_iri);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('author'), author);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('body'), body);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('created'), created);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('modified'), updated);
+
+  cal_claims_insert (graph_iri, annotation_iri, claims);
+  SIOC..ods_object_services_attach (graph_iri, annotation_iri, 'calendar/item/annotation');
 }
 ;
 
@@ -794,8 +972,7 @@ create procedure cal_annotation_delete (
   inout master_id integer,
   inout claims any)
 {
-  declare graph_iri, annotattion_iri varchar;
-
+  declare graph_iri, annotation_iri varchar;
   declare exit handler for sqlstate '*'
   {
     sioc_log_message (__SQL_MESSAGE);
@@ -803,8 +980,9 @@ create procedure cal_annotation_delete (
   };
 
   graph_iri := get_graph_ext (CAL.WA.domain_is_public (domain_id));
-  annotattion_iri := calendar_annotation_iri (domain_id, master_id, annotation_id);
-  delete_quad_s_or_o (graph_iri, annotattion_iri, annotattion_iri);
+  annotation_iri := calendar_annotation_iri (domain_id, master_id, annotation_id);
+  delete_quad_s_or_o (graph_iri, annotation_iri, annotation_iri);
+  SIOC..ods_object_services_dettach (graph_iri, annotation_iri, 'calendar/item/annotation');
 }
 ;
 
@@ -902,6 +1080,19 @@ create procedure ods_calendar_sioc_init ()
 
 -------------------------------------------------------------------------------
 --
+create procedure CAL.WA.tmp_update ()
+{
+  if (registry_get ('cal_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_calendar_services();
+  registry_set ('cal_services_update', '1');
+}
+;
+
+CAL.WA.tmp_update ();
+-------------------------------------------------------------------------------
+--
 -- RDF Views
 --
 use DB;
diff --git a/appsrc/ODS-Calendar/vad_version b/appsrc/ODS-Calendar/vad_version
new file mode 100644
index 0000000..59c4af2
--- /dev/null
+++ b/appsrc/ODS-Calendar/vad_version
@@ -0,0 +1 @@
+1.10.52
diff --git a/appsrc/ODS-Calendar/www/ajax.vsp b/appsrc/ODS-Calendar/www/ajax.vsp
index a045bc7..b93dea2 100644
--- a/appsrc/ODS-Calendar/www/ajax.vsp
+++ b/appsrc/ODS-Calendar/www/ajax.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: ajax.vsp,v 1.2.2.2 2010/09/20 10:15:03 source Exp $
+--  $Id: ajax.vsp,v 1.2.2.4 2012/03/08 12:14:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -38,8 +38,8 @@
     {
       if (subAction = 'list')
       {
-        declare id integer;
-        declare cTimeZone, cDateFormat, cTimeFormat varchar;
+        declare id, cTimeZone integer;
+        declare cDateFormat, cTimeFormat varchar;
         declare cTimeNow datetime;
         declare settings, sStream, x any;
 
diff --git a/appsrc/ODS-Calendar/www/annotea.vspx b/appsrc/ODS-Calendar/www/annotea.vspx
index cca7879..03429e5 100644
--- a/appsrc/ODS-Calendar/www/annotea.vspx
+++ b/appsrc/ODS-Calendar/www/annotea.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: annotea.vspx,v 1.7.2.5 2010/10/07 13:23:19 source Exp $
+ -  $Id: annotea.vspx,v 1.7.2.9 2012/03/08 12:14:09 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -41,9 +41,11 @@
   <vm:pagetitle>Annotation page</vm:pagetitle>
   <vm:popup_page_wrapper>
     <vm:variables>
+      <v:variable persist="0" name="v_sid" param-name="sid" type="varchar" />
+      <v:variable persist="0" name="v_realm" param-name="realm" type="varchar" />
       <v:variable persist="0" name="v_mode" param-name="mode" type="varchar" default="'show'"/>
       <v:variable persist="0" name="v_oid" param-name="oid" type="integer" />
-      <v:variable persist="0" name="v_id" type="integer" />
+      <v:variable persist="0" name="v_id" param-name="id" type="integer" />
       <v:variable persist="0" name="v_author" type="varchar" default="''" />
       <v:variable persist="0" name="v_body" type="varchar" default="''" />
       <v:variable persist="0" name="v_claims" type="any" default="null" />
@@ -51,8 +53,8 @@
       <v:variable name="v_tabNo" param-name="tabNo" type="varchar" default="0" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <input type="hidden" name="sid"   id="sid"   value="<?V self.v_sid ?>" />
+      <input type="hidden" name="realm" id="realm" value="<?V self.v_realm ?>" />
       <div class="form-header">
         Free Text Annotation: '<?V CAL.WA.utf2wide ((select coalesce(E_SUBJECT, '~ no title ~') from CAL.WA.EVENTS where E_ID = self.v_oid)) ?>'
       </div>
@@ -73,7 +75,7 @@
                 </v:on-post>
               </v:button>
             </div>
-            <table id="annotations" class="CAL_grid" cellspacing="0" style="border: 0;">
+            <table class="ODS_grid ANN_grid">
             </table>
           </v:template>
 
@@ -81,7 +83,7 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
+                <tr>
                   <td>
                     No annotations
                   </td>
@@ -90,13 +92,25 @@
             </v:template>
 
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
+              <?vsp
+                 declare row vspx_row_template;
+                 row := control;
+              ?>
               <table>
                 <tr>
                   <td width="1%" nowrap="nowrap">
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), CAL.WA.dt_datetimestring ((control as vspx_row_template).te_column_value('A_CREATED'), CAL.WA.settings_dateFormat (self.settings), CAL.WA.settings_timeFormat (self.settings))); ?>
+                    <?vsp self.showTDValue (row.te_column_value('A_ID'), CAL.WA.dt_datetimestring (row.te_column_value('A_CREATED'), CAL.WA.settings_dateFormat (self.settings), CAL.WA.settings_timeFormat (self.settings))); ?>
                   </td>
                   <td>
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_AUTHOR')); ?>
+                    <?vsp
+                      declare id, iri any;
+
+                      id := row.te_column_value('A_ID');
+                      iri := CAL.WA.url_fix (SIOC..calendar_annotation_iri (self.domain_id, self.v_oid, id), self.v_sid, self.v_realm);
+                      http (sprintf ('<a href="%V">', iri));
+                      self.showTDValue (id, row.te_column_value('A_AUTHOR'));
+                      http ('</a>');
+                    ?>
                   </td>
                   <td width="1%" nowrap="nowrap">
                     <v:button action="simple" value="edit" xhtml_title="Edit" xhtml_class="button">
@@ -126,7 +140,7 @@
                 <tr>
                   <td />
                   <td colspan="2">
-                    <i><?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_BODY')); ?></i>
+                    <i><?vsp self.showTDValue (row.te_column_value('A_ID'), row.te_column_value('A_BODY')); ?></i>
                   </td>
                 </tr>
               </table>
@@ -157,6 +171,8 @@
                        self.v_claims
                   from CAL.WA.ANNOTATIONS
                  where A_ID = self.v_id;
+
+                self.rdf_iri := SIOC..calendar_annotation_iri (self.domain_id, self.v_oid, self.v_id);
               }
             ]]>
           </v:before-data-bind>
@@ -207,14 +223,12 @@
                 <table>
                   <tr>
                     <td width="800px">
-                      <table id="c_tbl" class="form-list" cellspacing="0">
-                  <thead class="sortHeader">
+                      <table id="c_tbl" class="ODS_grid">
+                        <thead>
             <tr>
-                            <th>Relation</th>
-                            <th width="70%">Value</th>
-                            <th width="1%">
-                              Action
-                            </th>
+                            <th width="50%">Relation</th>
+                            <th width="50%">Value</th>
+                            <th class="action">Action</th>
                     </tr>
                   </thead>
                   		  <![CDATA[
diff --git a/appsrc/ODS-Calendar/www/attendees.vspx b/appsrc/ODS-Calendar/www/attendees.vspx
index c3f4d76..804bfd0 100644
--- a/appsrc/ODS-Calendar/www/attendees.vspx
+++ b/appsrc/ODS-Calendar/www/attendees.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: attendees.vspx,v 1.2.2.4 2011/03/08 13:25:23 source Exp $
+ -  $Id: attendees.vspx,v 1.2.2.5 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2008 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/calendar_login.vspx b/appsrc/ODS-Calendar/www/calendar_login.vspx
index 09c162b..296e5e7 100644
--- a/appsrc/ODS-Calendar/www/calendar_login.vspx
+++ b/appsrc/ODS-Calendar/www/calendar_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: calendar_login.vspx,v 1.4.2.5 2010/10/07 13:23:19 source Exp $
+  -  $Id: calendar_login.vspx,v 1.4.2.6 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/calendars.vspx b/appsrc/ODS-Calendar/www/calendars.vspx
index 811a901..9d0fc0d 100644
--- a/appsrc/ODS-Calendar/www/calendars.vspx
+++ b/appsrc/ODS-Calendar/www/calendars.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: calendars.vspx,v 1.3.2.3 2010/11/09 20:19:16 source Exp $
+ -  $Id: calendars.vspx,v 1.3.2.6 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,26 +24,6 @@
 -->
 <v:page name="calendars" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (self.v_order = columnName and self.v_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
       if (columnName = '')
@@ -97,6 +77,8 @@
             <![CDATA[
               self.v_how := self.how.ufl_value;
               self.v_value := trim(self.value.ufl_value);
+
+              self.ds.vc_reset();
               self.vc_data_bind (e);
             ]]>
           </v:on-post>
@@ -135,18 +117,17 @@
             control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
           ]]>
         </v:before-data-bind>
+        <v:after-data-bind>
+          control.ds_make_statistic ();
+        </v:after-data-bind>
       </v:data-source>
       <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
         <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="calendars" class="CAL_grid" cellspacing="0">
-            <thead class="sortHeader">
+          <table class="ODS_grid">
+            <thead>
               <tr>
-                <th>
-                  <?vsp self.sortColumn('Name', 'WAI_NAME'); ?>
-                </th>
-                <th>
-                  <?vsp self.sortColumn('Description', 'WAI_DESCRIPTION'); ?>
-                </th>
+                <?vsp http (DB.DBA.wa_show_column_header('Name', 'WAI_NAME', self.v_order, self.v_direction, 'width="50%"')); ?>
+                <?vsp http (DB.DBA.wa_show_column_header('Description', 'WAI_DESCRIPTION', self.v_order, self.v_direction, 'width="50%"')); ?>
               </tr>
             </thead>
           </table>
@@ -154,6 +135,16 @@
 
         <v:template name="ds_repeat" type="repeat" name-to-remove="" set-to-remove="">
 
+          <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
+            <table>
+              <tr align="center">
+                <td colspan="2">
+                  No records
+                </td>
+              </tr>
+            </table>
+          </v:template>
+
           <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
             <table>
               <tr onclick="rowSelected(this);" class="pointer">
@@ -173,15 +164,17 @@
 
         <v:template type="simple" name-to-remove="table" set-to-remove="top">
           <table>
+            <tfoot>
+              <tr>
+                <td style="text-align: right;" colspan="2">
+                  <vm:ds-navigation data-set="ds"/>
+                </td>
+              </tr>
+            </tfoot>
           </table>
         </v:template>
 
       </v:data-set>
-      <script>
-        <![CDATA[
-          coloriseTable('calendars');
-        ]]>
-      </script>
     </vm:pagebody>
   </vm:popup_page_wrapper>
 </v:page>
diff --git a/appsrc/ODS-Calendar/www/contacts.vspx b/appsrc/ODS-Calendar/www/contacts.vspx
index b667a1f..c25c147 100644
--- a/appsrc/ODS-Calendar/www/contacts.vspx
+++ b/appsrc/ODS-Calendar/www/contacts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: contacts.vspx,v 1.2.2.3 2011/03/23 12:18:41 source Exp $
+ -  $Id: contacts.vspx,v 1.2.2.6 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,30 +24,6 @@
 -->
 <v:page name="users" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      }
-      else if (self.v_order = columnName and self.v_direction = 'asc')
-      {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      }
-      else
-      {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
       if (columnName = '')
@@ -118,6 +94,8 @@
             <![CDATA[
               self.v_how := self.how.ufl_value;
               self.v_value := trim(self.value.ufl_value);
+
+              self.ds.vc_reset();
               self.vc_data_bind (e);
             ]]>
           </v:on-post>
@@ -152,29 +130,26 @@
             control.ds_sql := concat (control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
           ]]>
         </v:before-data-bind>
+        <v:after-data-bind>
+          control.ds_make_statistic ();
+        </v:after-data-bind>
       </v:data-source>
       <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
         <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="users" class="CAL_grid" cellspacing="0">
-            <thead class="sortHeader">
+          <table class="ODS_grid">
+            <thead>
               <tr>
                 <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-                  <th class="checkbox" width="1%">
+                  <th class="checkbox">
                     <?vsp
                       http('<input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this.form, this); updateChecked(this, ''cb_item''); "/>');
                     ?>
                   </th>
                 </v:template>
-                <th>
-                  <?vsp self.sortColumn('Name', 'P_NAME'); ?>
-                </th>
-                <th>
-                  <?vsp self.sortColumn('Mail', 'P_MAIL'); ?>
-                </th>
+                <?vsp http (DB.DBA.wa_show_column_header('Name', 'P_NAME', self.v_order, self.v_direction, 'width="50%"')); ?>
+                <?vsp http (DB.DBA.wa_show_column_header('Mail', 'P_MAIL', self.v_order, self.v_direction, 'width="50%"')); ?>
                 <v:template type="simple" enabled="--neq(self.isMultiple(self.v_dst), 1)">
-                  <th width="1%">
-                    Action
-                  </th>
+                  <th class="action">Action</th>
                 </v:template>
               </tr>
             </thead>
@@ -186,7 +161,7 @@
           <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
             <table>
               <tr align="center">
-                <td colspan="3">No records</td>
+                <td colspan="<?V either(equ(self.isMultiple(self.v_dst),1),4,3) ?>">No records</td>
               </tr>
             </table>
           </v:template>
@@ -195,7 +170,7 @@
             <table>
               <tr onclick="rowSelected(this);" class="pointer">
                 <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
-                  <td  align="center">
+                  <td class="checkbox">
                     <?vsp
                       declare S, name any;
 
@@ -226,6 +201,13 @@
 
         <v:template type="simple" name-to-remove="table" set-to-remove="top">
           <table>
+            <tfoot>
+              <tr>
+                <td style="text-align: right;" colspan="<?V either(equ(self.isMultiple(self.v_dst),1),4,3) ?>">
+                  <vm:ds-navigation data-set="ds"/>
+                </td>
+              </tr>
+            </tfoot>
           </table>
         </v:template>
 
@@ -233,14 +215,9 @@
       <v:template type="simple" enabled="--equ(self.isMultiple(self.v_dst), 1)">
         <div style="padding: 0 0 0.5em 0;">
           <hr />
-          <a href="#" onclick="javascript: addChecked(document.forms['F1'], 'cb_item', 'No users were selected for addition.');" class="button2">&nbsp;Add selected</a>
+          <span onclick="javascript: addChecked(document.forms['F1'], 'cb_item', 'No users were selected for addition.');" class="button"> Add selected</span>
         </div>
       </v:template>
-      <script>
-        <![CDATA[
-          coloriseTable('users');
-        ]]>
-      </script>
     </vm:pagebody>
   </vm:popup_page_wrapper>
 </v:page>
diff --git a/appsrc/ODS-Calendar/www/conversation.vspx b/appsrc/ODS-Calendar/www/conversation.vspx
index 11ffda2..a30d5fb 100644
--- a/appsrc/ODS-Calendar/www/conversation.vspx
+++ b/appsrc/ODS-Calendar/www/conversation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conversation.vspx,v 1.3.2.3 2010/10/07 13:23:19 source Exp $
+ -  $Id: conversation.vspx,v 1.3.2.5 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -64,14 +64,14 @@
       <v:variable persist="0" name="openid_name" type="varchar" default="null" param-name="openid.sreg.fullname" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params, ''))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params, ''))); ?>
       <?vsp http(sprintf('<input type="hidden" name="user_name" id="user_name" value="%s" />', CAL.WA.account_name (self.account_id))); ?>
       <div class="form-header">
         Discussion
       </div>
       <div class="form-body">
-        <table cellspacing="0">
+        <table cellspacing="0" width="100%">
           <tr>
             <td>
               <div class="comment-section">Item</div>
@@ -107,7 +107,7 @@
                   <div class="<?V case when control.tn_level = 0 then 'cm_node_top' else 'cm_node' end ?>">
                     <?vsp
                       {
-                        declare id, comment, title, u_name, last_update any;
+                        declare id, comment, title, iri, u_name, last_update any;
 
                         id := cast (control.tn_value as integer);
                         declare exit handler for not found;
@@ -115,6 +115,7 @@
                           into title, comment, u_name, last_update
                           from CAL.WA.EVENT_COMMENTS
                          where EC_ID = id;
+                        iri := CAL.WA.url_fix (SIOC..calendar_comment_iri (self.domain_id, self.v_id, id), get_keyword ('sid', self.vc_page.vc_event.ve_params), get_keyword ('realm', self.vc_page.vc_event.ve_params));
 
                         declare parsed_message any;
                         declare d_name varchar;
@@ -147,7 +148,8 @@
                     ?>
                     <div class="comment" id="msg_<?V id ?>">
                       <div class="comment-header">
-                        <span class="comment-subj"><?V CAL.WA.utf2wide (title) ?></span> <br />
+                        <?vsp http (sprintf ('<a href="%V">%s</a>', iri, title)); ?>
+                        <br />
                       </div>
                       <div class="comment-msg">
                         <?vsp
@@ -205,7 +207,7 @@
           <v:template type="simple" enabled="--case when (self.v_mode = 'reply') then 1 else 0 end">
             <tr>
               <td>
-                <table cellspacing="0">
+                <table cellspacing="0" width="100%">
                   <tr>
                     <td colspan="2">
                       <div class="comment-section">Reply</div>
diff --git a/appsrc/ODS-Calendar/www/css/style.css b/appsrc/ODS-Calendar/www/css/style.css
index 84e90b7..5c64600 100644
--- a/appsrc/ODS-Calendar/www/css/style.css
+++ b/appsrc/ODS-Calendar/www/css/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.23.2.11 2010/10/07 13:23:19 source Exp $
+ *  $Id: style.css,v 1.23.2.15 2012/03/08 12:14:09 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,19 @@ body {
   font-size: 9pt;
 }
 
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+form {
+  margin: 0;
+  padding: 0;
+}
+
 abbr {
   border: none;
 }
@@ -69,45 +82,7 @@ a:hover {
   vertical-align: top;
 }
 
-/* Footer */
-#FT {
-  width: 100%;
-  position: relative;
-  bottom: 0px;
-  font-size: 8pt;
-  float: left;
-  clear: both;
-  text-align: right;
-  border-top: 2px solid #fff;
-  margin-right: 10px;
-  background-color: #fff;
-  background-image: url(../image/ods_main_footer.png);
-}
-
-#FT_L {
-  float: left;
-  clear: left;
-  margin-top: 10px;
-  margin-left: 8px;
-  border: 1px solid #788;
-}
-
-#FT_R {
-  float: right;
-  clear: right;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  margin-right: 5px;
-  color: #788;
-}
-
-#FT_R a {
-  text-decoration: none;
-  color: inherit;
-}
-
 /* Left side within MT */
-
 .page_head {
   width: 100%;
   background-color: #b0cde4;
@@ -235,66 +210,16 @@ input[readonly] {
   background: #EFEFEF;
 }
 
-/* ====== lists ====== */
-table#list {
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-}
-
-table#list th {
-  font-size: 0.9em;
-  font-weight: bold;
-  text-align: center;
-  padding: 2px;
-  background-color: #b0cde4;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-table#list th:last-child {
-  border-width: 0px 0px 1px 0px;
-}
-
-table#list thead input {
-  font-size: 0.9em;
-  font-weight: bold;
-  border: none;
-  background-color: #b0cde4;
-}
-
 /* rows */
 .td_border {
   border: solid #7f94a5;
   border-width: 1px 0px 1px 0px;
 }
 
-.tr_0 {
-  border: solid #7f94a5;
-  border-width: 0px 0px 1px 0px;
-  background-color: #F5F5EE;
-}
-
-.tr_1 {
-  border: solid #7f94a5;
-  border-width: 0px 0px 1px 0px;
-}
-
-.tr_1:hover, .tr_0:hover {
- 	background-color: #eec;
-}
-
 .tr_select {
   background-color: #FFFFCC;
 }
 
-.read {
-}
-
-.unread {
-  font-weight: bold;
-}
-
 /* Menus */
 div.menuBar {
   display: inline;
@@ -364,111 +289,25 @@ div.menu div.menuItemSep {
 }
 
 input.button {
-  margin: .2em 0 .1em 0;
   font-size: .8em;
   font-family: verdana, sans-serif;
   color: #ffffff;
   font-weight: bold;
+  margin: .2em 0 .1em 0;
   border: solid 1px;
   border-color: #7f94a5;
   background: #99b3c5;
+	cursor: pointer;
   -moz-border-radius: 3px;
   -webkit-border-radius: 3px;
 }
 
-input.nolink {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  color: #000;
-  border: 0px;
-  background-color: inherit;
-}
-
-input.nolink2 {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  border: 0px;
-  background-color: #EFEFEF;
-}
-
-.nolink3 {
-  font-size: 1em;
-  font-weight: bold;
-  color: #000;
-  background-color: inherit;
-}
-
-input.nolink4 {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  border: 0px;
-  background-color: #b0cde4;
-}
-
-.nolink_a {
-  color: #000;
-  background-color: #F0F0F0;
-}
-
-.nolink_b {
-  color: #000;
-}
-
-.link_ed {
-  font-size: 0.9em;
-  font-style: italic;
-  color: #4F6C7F;
-}
-
 .navbar {
   position: absolute;
   top: 2px;
   right: 5px;
 }
 
-.button2 {
-  padding: 0 0.35em 0 0.35em;
-  font-size: .8em;
-  font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  border: solid 1px;
-  border-color: #7f94a5;
-  background: #99b3c5;
-}
-
-.pane {
-  color: black;
-  background-color: #EFEFEF;
-  margin: 0px;
-  margin-bottom: 0.5em;
-  padding: 1px;
-  border: 1px solid #7f94a5;
-  vertical-align: top;
-}
-
-.pane-label {
-  font-weight: bold;
-  background-color: #EFEFEF;
-  border: 1px solid #000;
-  border-bottom-width: 0px;
-  border-color: #7f94a5;
-  padding: 2px 10px 2px 10px;
-  position: relative;
-  text-decoration: none;
-  top: -1px;
-  z-index: 100;
-}
-
 /* New */
 .form-header {
   font-size: 1.1em;
@@ -543,56 +382,6 @@ div.boxHeader {
   vertical-align: middle;
 }
 
-/* Grids */
-.CAL_grid {
-  width: 100%;
-  border: solid #7f94a5;
-  border-width: 1px 1px 2px 1px;
-}
-
-.CAL_grid tr td {
-  border-bottom: 1px solid #fff;
-}
-
-thead.sortHeader tr {
-  background-image: url(../image/stl_blu1_grad.gif);
-  background-repeat: repeat-x;
-}
-
-thead.sortHeader tr th {
-  font-size: 1em;
-  font-weight: bold;
-  text-align: left;
-  padding: 3px 2px 3px 3px;
-  border: solid #7f94a5;
-  border-width: 0px 1px 1px 0px;
-}
-
-thead.sortHeader th.checkbox {
-  text-align: center;
-  padding: 0;
-}
-
-thead.sortHeader th:last-child {
-  border-width: 0px 0px 1px 0px;
-}
-
-thead.sortHeader a, thead.sortHeader a:link, thead.sortHeader a:visited {
-  color: #000;
-  font-weight: bold;
-  display: block;
-  text-decoration: none;
-  width: 100%
-}
-
-thead.sortHeader a:hover {
-  color: #000;
-  font-weight: bold;
-  display: block;
-  text-decoration: underline;
-  width: 100%
-}
-
 /* New forms */
 .new-form-body {
   font-size: 1em;
@@ -705,19 +494,11 @@ a.tab {
   z-index: 100;
 }
 
-a.tab.tab2 {
-  background-color: #EFEFEF;
-}
-
 a.tab.activeTab {
   background-color: #EFEFEF;
   border-color: #7f94a5 #7f94a5 #7f94a5 #7f94a5;
 }
 
-a.tab.activeTab2 {
-  background-color: #FFF;
-}
-
 /* Calendar pane */
 .calendar_tab {
   cursor: pointer;
@@ -1004,44 +785,6 @@ a.tab.activeTab2 {
   -moz-user-select:none;
 }
 
-/* Popup Calendar */
-.calendar {
-	border: 1px solid #000;
-	background-color: #FFF;
-  z-index: 101;
-}
-
-.calendar_year, .calendar_month {
-	text-align: center;
-	border-bottom: 1px solid #aaa;
-	padding: 2px 0px;
-}
-
-.calendar table {
-	margin-top: 2px;
-}
-
-.calendar thead {
-	font-weight: bold;
-}
-
-.calendar thead td {
-	padding: 0px 2px;
-}
-
-.calendar td {
-	font-size: 75%;
-	text-align: center;
-}
-
-td.calendar_selected {
-	background-color: #faa;
-}
-
-.calendar_special {
-	color: #c55;
-}
-
 .ss_color {
   float: left;   
 	width: 60px;
@@ -1049,20 +792,6 @@ td.calendar_selected {
 	border: 1px solid #000;
 }
 
-/* ComboList */
-.combo_list_list {
-  background-color: white;
-  border: 1px solid black;
-  padding: 5px 10px 5px 10px;
-  height: 100px;
-  overflow: auto;
-}
-
-.combo_list_option:hover {
-  background-color: #99b3c5;
-  color: white;
-}
-
 /* Comments */
 div.cm_node_top {
   padding-left: 1em;
@@ -1116,13 +845,14 @@ input.openID {
 span.button {
   background: none repeat scroll 0 0 #99B3C5;
   border: 1px solid #7F94A5;
-  -moz-border-radius: 5px;
-  -webkit-border-radius: 5px;
   color: #FFFFFF;
   font-size: 0.8em;
   font-weight: bold;
-  padding: 3px 4px 1px;
+  padding: 2px 5px 0px;
   text-decoration:none;
+	cursor: pointer;
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
 }
 
 img.button {
diff --git a/appsrc/ODS-Calendar/www/error.vspx b/appsrc/ODS-Calendar/www/error.vspx
index 133517f..ec50181 100644
--- a/appsrc/ODS-Calendar/www/error.vspx
+++ b/appsrc/ODS-Calendar/www/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: error.vspx,v 1.5.2.2 2010/09/20 10:15:03 source Exp $
+  -  $Id: error.vspx,v 1.5.2.3 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/export.vspx b/appsrc/ODS-Calendar/www/export.vspx
index 1a44d27..39887bb 100644
--- a/appsrc/ODS-Calendar/www/export.vspx
+++ b/appsrc/ODS-Calendar/www/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: export.vspx,v 1.1.2.4 2010/09/20 10:15:03 source Exp $
+  -  $Id: export.vspx,v 1.1.2.5 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/gems.vsp b/appsrc/ODS-Calendar/www/gems.vsp
index 4e16a86..5b16c28 100644
--- a/appsrc/ODS-Calendar/www/gems.vsp
+++ b/appsrc/ODS-Calendar/www/gems.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: gems.vsp,v 1.3.2.3 2010/10/07 13:23:19 source Exp $
+--  $Id: gems.vsp,v 1.3.2.4 2012/03/08 10:46:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/help.vspx b/appsrc/ODS-Calendar/www/help.vspx
index 66b1701..17a8328 100644
--- a/appsrc/ODS-Calendar/www/help.vspx
+++ b/appsrc/ODS-Calendar/www/help.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: help.vspx,v 1.2.2.1 2010/09/20 10:15:03 source Exp $
+ -  $Id: help.vspx,v 1.2.2.2 2012/03/08 10:46:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/home.vspx b/appsrc/ODS-Calendar/www/home.vspx
index 25a8d2d..25b9d5a 100644
--- a/appsrc/ODS-Calendar/www/home.vspx
+++ b/appsrc/ODS-Calendar/www/home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: home.vspx,v 1.60.2.32 2011/03/23 12:18:41 source Exp $
+ -  $Id: home.vspx,v 1.60.2.38 2012/03/08 12:14:09 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,39 +24,60 @@
 -->
 <v:page name="calendar" decor="template/template.vspx" style="template/template.xsl" fast-render="1" button-anchors="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar, in fieldName varchar, in dsOrder varchar, in dsDirection varchar">
+  <v:method name="sortColumn" arglist="in columnLabel varchar, in columnName varchar, in sortField varchar, in sortOrder varchar, in sortDirection varchar, in columnProperties varchar">
     <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
+      declare image, onclick any;
 
-      if (dsOrder = columnName and dsDirection = 'desc')
+      image := '';
+      onclick := sprintf ('onclick="javascript: odsPost(this, [\'%s\', \'%s\']);"', sortField, columnName);
+      if (sortOrder = columnName)
       {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (dsOrder = columnName and dsDirection = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
+        if (sortDirection = 'desc')
+        {
+          image := ' <img src="/ods/images/icons/orderdown_16.png" border="0" alt="Down"/>';
+        }
+        else if (sortDirection = 'asc')
+        {
+          image := ' <img src="/ods/images/icons/orderup_16.png" border="0" alt="Up"/>';
+        }
       }
-      altStr := sprintf ('Sort Rows on %s in %s Order', titleName, directionStr);
-      http (sprintf ('<a href="#" onclick="javascript: myPost (''F1'', ''%s'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', fieldName, columnName, altStr, altStr, titleName, imageStr));
+      http (sprintf ('<th %s %s>%s%s</th>', columnProperties, onclick, columnLabel, image));
     ]]>
   </v:method>
 
-  <v:method name="sortChange" arglist="in columnName varchar, in dsOrder varchar, in dsDirection varchar, inout ds vspx_data_set">
+  <v:method name="sortChange" arglist="in columnName varchar, in sortOrder varchar, in sortDirection varchar, inout ds vspx_data_set">
     <![CDATA[
       if (is_empty_or_null (columnName))
         return;
 
       ds.vc_reset ();
-      if (udt_get (self, dsOrder) = columnName)
+      if (udt_get (self, sortOrder) = columnName)
       {
-        udt_set (self, dsDirection, either (equ (udt_get (self, dsDirection), 'asc'), 'desc', 'asc'));
+        udt_set (self, sortDirection, either (equ (udt_get (self, sortDirection), 'asc'), 'desc', 'asc'));
       } else {
-        udt_set (self, dsDirection, 'asc');
+        udt_set (self, sortDirection, 'asc');
       }
-      udt_set (self, dsOrder, columnName);
+      udt_set (self, sortOrder, columnName);
+    ]]>
+  </v:method>
+
+  <v:method name="columnHeaderShow" arglist="in columnLabel varchar, in columnName varchar, in sortField varchar, in sortOrder varchar, in sortDirection varchar, in settingsName varchar, in defaultVisible integer, in isSortable integer, in columnProperties varchar">
+    <![CDATA[
+      if (not cast (get_keyword (settingsName, self.settings, defaultVisible) as integer))
+        return;
+
+      if (isSortable = 1)
+      {
+        self.sortColumn (columnLabel, columnName, sortField, sortOrder, sortDirection, columnProperties);
+      } else {
+        http (sprintf ('<th nowrap="nowrap" %s>%s</th>', columnProperties, columnLabel));
+      }
+    ]]>
+  </v:method>
+
+  <v:method name="columnEnabled" arglist="in columnVisibleName varchar, in defaultVisible integer">
+    <![CDATA[
+      return cast (get_keyword (columnVisibleName, self.settings, defaultVisible) as integer);
     ]]>
   </v:method>
 
@@ -271,7 +292,7 @@
       if (isnull (e_time))
         return;
 
-        e_time := CAL.WA.event_gmt2user (e_time, self.cTimezone);
+      e_time := CAL.WA.event_gmt2user (e_time, self.cTimezone, self.cDaylight);
       http (self.showTagEventDate (e_time, self.showEventDate (e_time, e_timeProperty, case when e_event = 1 then 'date' else 'dateTime' end, 0)));
     ]]>
   </v:method>
@@ -281,7 +302,7 @@
       if (isnull (e_time))
         return;
 
-        e_time := CAL.WA.event_gmt2user (e_time, self.cTimezone);
+      e_time := CAL.WA.event_gmt2user (e_time, self.cTimezone, self.cDaylight);
       http (self.showTagEventDate (e_time, self.showEventDate (e_time, e_timeProperty, case when e_event = 1 then 'date' else 'dateTime' end, 1)));
     ]]>
   </v:method>
@@ -293,8 +314,8 @@
       if (isnull (e_start))
         return self.showEventEnd (e_event, e_end, 'dtend');
 
-      e_start := CAL.WA.event_gmt2user (e_start, self.cTimezone);
-      e_end := CAL.WA.event_gmt2user (e_end, self.cTimezone);
+      e_start := CAL.WA.event_gmt2user (e_start, self.cTimezone, self.cDaylight);
+      e_end := CAL.WA.event_gmt2user (e_end, self.cTimezone, self.cDaylight);
       if (CAL.WA.dt_compare (e_start, e_end))
       {
         if (e_event = 1)
@@ -346,9 +367,12 @@
       declare S varchar;
 
       S := '';
-        if (CAL.WA.dt_dateClear (e_start) < CAL.WA.dt_dateClear (dt))
+      dt := CAL.WA.dt_dateClear (dt);
+      e_start := CAL.WA.dt_dateClear (e_start);
+      e_end := CAL.WA.dt_dateClear (e_end);
+      if (e_start < dt)
           S := '<img src="image/tr_close2.gif" border="0" />';
-        if (CAL.WA.dt_dateClear (e_end) > CAL.WA.dt_dateClear (dt))
+      if (e_end > dt)
         {
           if (S <> '')
           {
@@ -487,7 +511,7 @@
       }
       else if (fProperty = 'description')
           {
-        F := sprintf ('<pre style="margin: 0">%V</pre>', CAL.WA.utf2wide (cast (fValue as varchar)));
+        F := sprintf ('<pre style="margin: 0; white-space: pre-wrap;">%V</pre>', cast (fValue as varchar));
       }
       else if (internal_type (fValue) = 211)
       {
@@ -828,8 +852,8 @@
         self.v_privacy,
         self.v_tags,
         self.v_event,
-        CAL.WA.event_user2gmt (self.v_eventStart, self.cTimezone),
-        CAL.WA.event_user2gmt (self.v_eventEnd, self.cTimezone),
+                     CAL.WA.event_user2gmt (self.v_eventStart, self.cTimezone, self.cDaylight),
+                     CAL.WA.event_user2gmt (self.v_eventEnd, self.cTimezone, self.cDaylight),
         self.v_repeat,
         self.v_repeatParam1,
         self.v_repeatParam2,
@@ -963,8 +987,8 @@
         self.v_attendees,
         self.v_privacy,
         self.v_tags,
-        CAL.WA.event_user2gmt (self.v_eventStart, self.cTimezone),
-        CAL.WA.event_user2gmt (self.v_eventEnd, self.cTimezone),
+                     CAL.WA.event_user2gmt (self.v_eventStart, self.cTimezone, self.cDaylight),
+                     CAL.WA.event_user2gmt (self.v_eventEnd, self.cTimezone, self.cDaylight),
         self.v_priority,
         self.v_status,
         self.v_complete,
@@ -976,33 +1000,6 @@
     ]]>
   </v:method>
 
-  <v:method name="columnEnabled" arglist="in columnVisibleName varchar, in defaultVisible integer">
-    <![CDATA[
-      return cast (get_keyword (columnVisibleName, self.settings, defaultVisible) as integer);
-    ]]>
-  </v:method>
-
-  <v:method name="columnHeaderShow" arglist="in columnVisibleName varchar, in defaultVisible integer, in isSortable integer, in titleName varchar, in columnWidth integer, in columnName varchar, in fieldName varchar, in dsOrder varchar, in dsDirection varchar">
-    <![CDATA[
-      declare S varchar;
-
-      if (not cast (get_keyword (columnVisibleName, self.settings, defaultVisible) as integer))
-        return;
-
-      S := '';
-      if (not isnull (columnWidth))
-        S := sprintf ('width="%s"', columnWidth);
-      http (sprintf ('<th nowrap="nowrap" %s>', S));
-      if (isSortable = 1)
-      {
-        self.sortColumn (titleName, columnName, fieldName, dsOrder, dsDirection);
-      } else {
-        http (titleName);
-      }
-      http ('</th>');
-    ]]>
-  </v:method>
-
   <v:method name="priorityLabel" arglist="in priority integer">
     <![CDATA[
      if (priority = 1)
@@ -1048,9 +1045,9 @@
     ]]>
   </v:method>
 
-  <v:method name="windowOpen" arglist="in p_url varchar, in p_name varchar, in p_title varchar">
+  <v:method name="windowOpen" arglist="in p_url varchar, in p_name varchar, in p_title varchar, in p_class varchar">
     <![CDATA[
-      return  sprintf ('<span onclick="javascript: window.open (\'%s\', \'calendar_%s_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=600, width=800\'); return false;" title="%s %s" class="link">%s</span>', CAL.WA.url_fix (sprintf ('%s%s', CAL.WA.calendar_url (self.domain_id), p_url), self.sid, self.realm), p_name, p_name, p_title, p_name);
+      return  sprintf ('<span onclick="javascript: windowShow(\'%s\', \'calendar_%s_window\'); return false;" title="%s %s" class="%s">%s</span>', CAL.WA.page_url (self.domain_id, p_url, self.sid, self.realm), p_name, p_name, p_title, p_class, p_name);
     ]]>
   </v:method>
 
@@ -1280,14 +1277,12 @@
                         if (cCommand = 'create')
                         {
                     self.cAction := 'create';
+                          self.cSubAction := get_keyword ('mode', params, 'event');
                           if (get_keyword ('mode', params, 'event') = 'task')
                     {
-                      self.cScope := 'tasks';
                       self.initNewTask ();
                     } else {
                       self.initNewEvent ();
-                      if ((self.cScope = 'tasks') or (self.cScope = 'search'))
-                        self.cScope := 'events';
                     }
                           if (get_keyword ('onDate', params, '') <> '')
                             self.on_date := cast (get_keyword ('onDate', params) as integer);
@@ -1434,15 +1429,7 @@
                           {
                             return;
                           }
-                    kind := CAL.WA.event_kind (self.v_id);
-                    if ((kind = 'event') and (self.cScope in ('tasks', 'search')))
-                          {
-                      self.cScope := 'events';
-                          }
-                          else if (kind = 'task')
-                          {
-                      self.cScope := 'tasks';
-                  }
+                          self.cSubAction := CAL.WA.event_kind (self.v_id);
                 }
                       }
 
@@ -1458,11 +1445,7 @@
                             return;
 
                           self.cAction := 'view';
-                          kind := CAL.WA.event_kind (self.v_id);
-                          if ((kind = 'event') and (self.cScope in ('tasks', 'search')))
-                            self.cScope := 'events';
-                          if (kind = 'task')
-                            self.cScope := 'tasks';
+                          self.cSubAction := CAL.WA.event_kind (self.v_id);
                         }
                       }
 
@@ -1734,6 +1717,7 @@
               <v:on-post>
                 <![CDATA[
                   self.cAction := 'create';
+                                self.cSubAction := case when (self.cScope = 'events') then 'event' else 'task' end;
           		    self.vc_data_bind(e);
                 ]]>
               </v:on-post>
@@ -2100,49 +2084,40 @@
               <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
 
                 <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                  <table id="events" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                    <thead class="sortHeader">
+                        <table class="ODS_grid" style="border: 0px;">
+                          <thead>
                       <tr>
-                          <th class="checkbox" width="1%">
+                              <th class="checkbox">
                             <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')"/>
                           </th>
-                              <vm:if test="self.cScope = 'events'">
-                        <th nowrap="nowrap" width="10%">
-                          <?vsp self.sortColumn ('Duration', 'E_EVENT_START', 'e_sortColumn', self.e_order, self.e_direction); ?>
-                        </th>
-                        <th nowrap="nowrap">
-                          <?vsp self.sortColumn ('Name', 'E_SUBJECT', 'e_sortColumn', self.e_order, self.e_direction); ?>
-                        </th>
-                        <?vsp self.columnHeaderShow ('event_E_LOCATION', 0, 0, 'Location', '1%', 'E_LOCATION', 'e_sortColumn', self.e_order, self.e_direction); ?>
-                        <?vsp self.columnHeaderShow ('event_E_UPDATED',  1, 1, 'Updated', '1%',  'E_UPDATED',  'e_sortColumn', self.e_order, self.e_direction); ?>
-                        <?vsp self.columnHeaderShow ('event_E_CREATED',  0, 1, 'Created', '1%',  'E_CREATED',  'e_sortColumn', self.e_order, self.e_direction); ?>
-                              </vm:if>
-                              <vm:if test="self.cScope = 'tasks'">
-                                <th nowrap="nowrap">
-                                  <?vsp self.sortColumn ('Name', 'E_SUBJECT', 't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                </th>
-                                <?vsp self.columnHeaderShow ('task_E_START',     0, 1, 'Start',     '5%', 'E_EVENT_START', 't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                <?vsp self.columnHeaderShow ('task_E_END',       1, 1, 'Due',       '5%', 'E_EVENT_END',   't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                <?vsp self.columnHeaderShow ('task_E_COMPLETED', 0, 1, 'Completed', '1%', 'E_COMPLETED',   't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                <?vsp self.columnHeaderShow ('task_E_STATUS',    1, 1, 'Status',    '3%', 'E_STATUS',      't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                <?vsp self.columnHeaderShow ('task_E_PRIORITY',  1, 1, 'Priority',  '1%', 'E_PRIORITY',    't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                <?vsp self.columnHeaderShow ('task_E_UPDATED',   0, 1, 'Updated',   '1%', 'E_UPDATED',     't_sortColumn', self.ts_order, self.ts_direction); ?>
-                                <?vsp self.columnHeaderShow ('task_E_CREATED',   0, 1, 'Created',   '1%', 'E_CREATED',     't_sortColumn', self.ts_order, self.ts_direction); ?>
-                              </vm:if>
-                              <vm:if test="self.cScope = 'search'">
-                                <th nowrap="nowrap" width="1%">
-                                  <?vsp self.sortColumn ('Type', 'E_KIND', 's_sortColumn', self.s_order, self.s_direction); ?>
-                                </th>
-                                <th nowrap="nowrap">
-                                  <?vsp self.sortColumn ('Item', 'E_EVENT_START', 's_sortColumn', self.s_order, self.s_direction); ?>
-                                </th>
-                                <th nowrap="nowrap" width="1%">
-                                  <?vsp self.sortColumn ('Updated', 'E_UPDATED', 's_sortColumn', self.s_order, self.s_direction); ?>
-                                </th>
-                              </vm:if>
-                          <th width="1%">
-                            Action
-                          </th>
+                              <?vsp
+                                if (self.cScope = 'events')
+                                {
+                                  self.sortColumn ('Duration', 'E_EVENT_START', 'e_sortColumn', self.e_order, self.e_direction, 'width="10%"');
+                                  self.sortColumn ('Name', 'E_SUBJECT', 'e_sortColumn', self.e_order, self.e_direction, '');
+                                  self.columnHeaderShow ('Location', 'E_LOCATION', 'e_sortColumn', self.e_order, self.e_direction, 'event_E_LOCATION', 0, 0, ' width="1%"');
+                                  self.columnHeaderShow ('Updated' , 'E_UPDATED' , 'e_sortColumn', self.e_order, self.e_direction, 'event_E_UPDATED' , 1, 1, ' width="1%"');
+                                  self.columnHeaderShow ('Created' , 'E_CREATED' , 'e_sortColumn', self.e_order, self.e_direction, 'event_E_CREATED' , 0, 1, ' width="1%"');
+                                }
+                                else if (self.cScope = 'tasks')
+                                {
+                                  self.sortColumn ('Name', 'E_SUBJECT', 't_sortColumn', self.ts_order, self.ts_direction, '');
+                                  self.columnHeaderShow ('Start'    , 'E_EVENT_START', 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_START',     0, 1, ' width="5%"');
+                                  self.columnHeaderShow ('Due'      , 'E_EVENT_END'  , 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_END',       1, 1, ' width="5%"');
+                                  self.columnHeaderShow ('Completed', 'E_COMPLETED'  , 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_COMPLETED', 0, 1, ' width="1%"');
+                                  self.columnHeaderShow ('Status'   , 'E_STATUS'     , 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_STATUS',    1, 1, ' width="3%"');
+                                  self.columnHeaderShow ('Priority' , 'E_PRIORITY'   , 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_PRIORITY',  1, 1, ' width="1%"');
+                                  self.columnHeaderShow ('Updated'  , 'E_UPDATED'    , 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_UPDATED',   0, 1, ' width="1%"');
+                                  self.columnHeaderShow ('Created'  , 'E_CREATED'    , 't_sortColumn', self.ts_order, self.ts_direction, 'task_E_CREATED',   0, 1, ' width="1%"');
+                                }
+                                else if (self.cScope = 'search')
+                                {
+                                  self.sortColumn ('Type'   , 'E_KIND'       , 's_sortColumn', self.s_order, self.s_direction, '');
+                                  self.sortColumn ('Item'   , 'E_EVENT_START', 's_sortColumn', self.s_order, self.s_direction, '');
+                                  self.sortColumn ('Updated', 'E_UPDATED'    , 's_sortColumn', self.s_order, self.s_direction, '');
+                                }
+                              ?>
+                              <th class="action">Action</th>
                       </tr>
                     </thead>
                   </table>
@@ -2281,10 +2256,10 @@
                                 {
                                   actions := sprintf ('<span onclick="javascript: vspxPost (\'command\', \'edit\', \'x_%d\'); return false;" class="link">edit</span>', e_id)
                                              || ' | '
-                                             || self.windowOpen (sprintf ('annotea.vspx?oid=%d', e_id), 'annotate', e_subject);
+                                             || self.windowOpen (sprintf ('annotea.vspx?oid=%d', e_id), 'annotate', e_subject, 'link');
                                 }
                                 if (CAL.WA.discussion_check () and CAL.WA.conversation_enable (self.domain_id))
-                                  actions := actions || either (equ(actions, ''), '', ' | ') || self.windowOpen (sprintf ('conversation.vspx?id=%d', e_id), 'discuss', e_subject);
+                                  actions := actions || either (equ(actions, ''), '', ' | ') || self.windowOpen (sprintf ('conversation.vspx?id=%d', e_id), 'discuss', e_subject, 'link');
                                   http ('<td nowrap="nowrap">' || actions || '</td>');
                               ?>
                       </tr>
@@ -2307,7 +2282,6 @@
 
               <script type="text/javascript">
                 <![CDATA[
-                  coloriseTable('events');
                 exchangeHTML();
                 ]]>
               </script>
@@ -2321,7 +2295,7 @@
         <v:text name="dateFormat" xhtml_id="dateFormat" type="hidden" value="--self.cDateFormat" />
       </vm:if>
 
-            <v:template type="simple" name="template_edit_event" enabled="--case when ((self.cScope <> 'tasks') and (self.cAction in ('create', 'edit'))) then 1 else 0 end">
+            <v:template type="simple" name="template_edit_event" enabled="--case when (self.cAction in ('create', 'edit')) and (self.cSubAction = 'event') then 1 else 0 end">
         <v:before-data-bind>
           <![CDATA[
             declare params any;
@@ -2342,8 +2316,8 @@
                              E_PRIVACY,
                        E_TAGS,
                        E_EVENT,
-                       CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone),
-                       CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone),
+                             CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone, self.cDaylight),
+                             CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone, self.cDaylight),
                        E_REPEAT,
                        E_REPEAT_PARAM1,
                        E_REPEAT_PARAM2,
@@ -2376,6 +2350,7 @@
 
                        self.v_attendees := CAL.WA.attendees_return (self.v_id);
                        self.v_grants := self.shareSelect (self.v_id);
+                       self.rdf_iri := SIOC..calendar_event_iri (self.domain_id, self.v_id);
                  return;
               }
             _end:;
@@ -2402,7 +2377,7 @@
                     <v:label for="e_subject" value="Name" />
               </th>
               <td>
-                          <v:text name="e_subject" null-value="''" value="--self.v_subject" fmt-function="CAL.WA.utf2wide" xhtml_class="textbox" xhtml_size="60" />
+                          <v:text name="e_subject" xhtml_id="e_subject" null-value="''" value="--self.v_subject" fmt-function="CAL.WA.utf2wide" xhtml_class="textbox" xhtml_size="60" />
               </td>
             </tr>
             <tr>
@@ -2515,7 +2490,7 @@
                 <v:label for="e_description" value="Description"/>
               </th>
               <td>
-                          <v:textarea name="e_description" null-value="--''" value="--self.v_description" fmt-function="CAL.WA.utf2wide" xhtml_cols="45" xhtml_rows="6" />
+                          <v:textarea name="e_description" xhtml_id="e_description" null-value="--''" value="--self.v_description" fmt-function="CAL.WA.utf2wide" xhtml_cols="45" xhtml_rows="6" />
               </td>
             </tr>
             <tr>
@@ -2578,25 +2553,21 @@
                           <v:textarea name="e_attendees" null-value="--''" value="--self.v_attendees" fmt-function="CAL.WA.utf2wide" xhtml_cols="45" xhtml_rows="6" />
                           <?vsp
                             if (CAL.WA.instance_check (self.account_id, 'AddressBook'))
-                              http (sprintf ('<input type="button" value="Select" onclick="javascript: window.open (\'contacts.vspx?form=F1&dst=mc&params=e_attendees:s1;&sid=%s&realm=%s\', \'calendar_contacts_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=500, width=600\'); return false;" class="button"> ', self.sid, self.realm));
+                              http (self.windowOpen('contacts.vspx?dst=mc&params=e_attendees:s1;', 'Select', 'Select', 'button'));
                             if (self.v_attendees_count)
-                              http (sprintf ('<input type="button" value="Details" onclick="javascript: window.open (\'attendees.vspx?id=%d&sid=%s&realm=%s\', \'calendar_contacts_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=768, width=1024\'); return false;" class="button">', self.v_id, self.sid, self.realm));
+                              http (self.windowOpen('attendees.vspx?id=' || cast (self.v_id as varchar), 'Details', 'Details', 'button'));
                           ?>
                         </td>
                       </tr>
                       <tr>
-                  <script type="text/javascript">
-                    function suggestTags ()
-                    {
-                      window.open ('tags.vspx?sid=<?V self.sid ?>&realm=<?V self.realm ?>&txt='+escape(document.F1.elements['e_subject'].value)+'&txt2='+escape(document.F1.elements['e_description'].value) + '&fld=e_tags', 'bookmarks_suggest_window', 'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500');
-                    }
-                  </script>
                   <th>
                     <v:label for="e_tags" value="Tags (comma-separated)" />
                   </th>
                   <td>
                       <v:text name="e_tags" null-value="''" value="--self.v_tags" xhtml_class="textbox" xhtml_size="60" />
-                      <input type="button" value="Suggest" onclick="javascript: suggestTags();" class="button" />
+                          <?vsp if (CAL.WA.tag_rule_exists (self.account_id)) { ?>
+                            <input type="button" value="Suggest" onclick="javascript: tagsShow('<?V CAL.WA.page_url (self.domain_id, 'tags.vspx?fld=e_tags') ?>', 'e');" class="button" />
+                          <?vsp } ?>
                       <input type="button" value="Clear" onclick="javascript: document.F1.elements['e_tags'].value = ''" class="button" />
                   </td>
                 </tr>
@@ -2788,8 +2759,8 @@
                             x[5] := 'Wednesday';
                             x[6] := 'Thursday';
                             x[7] := 'Friday';
-                            x[8] := 'Saturday.';
-                            x[9] := 'Sunday.';
+                                      x[8] := 'Saturday';
+                                      x[9] := 'Sunday';
                             y:= make_array (10, 'any');
                             y[0] := '10';
                             y[1] := '11';
@@ -3060,11 +3031,11 @@
                       <table class="form-body" cellspacing="0">
                         <tr>
                           <td style="width: 90%; background-color: white;">
-                            <table id="f_tbl" width="100%" cellspacing="0">
-                              <thead class="sortHeader">
+                            <table id="f_tbl" class="ODS_grid">
+                              <thead>
                                 <tr>
                                   <th width="100%">Value</th>
-                                  <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                                 </tr>
                               </thead>
                         		  <![CDATA[
@@ -3104,13 +3075,13 @@
                     <table class="form-body" cellspacing="0">
                       <tr>
                         <td style="width: 90%; background-color: white;">
-                          <table id="s_tbl" width="100%" cellspacing="0">
-                            <thead class="sortHeader">
+                            <table id="s_tbl" class="ODS_grid">
+                              <thead>
                               <tr>
                                 <th width="15%">Type</th>
                                 <th>Value</th>
                                 <th width="1%" nowrap="nowrap">ACL: (R)ead, (W)rite</th>
-                                <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                               </tr>
                             </thead>
                       		  <![CDATA[
@@ -3169,7 +3140,7 @@
               ]]>
             </v:on-post>
           </v:button>
-                <v:button action="simple" name="e_create_new" value="Create and New" enabled="--case when ((self.cScope = 'events') and (self.cAction = 'create')) then 1 else 0 end" xhtml_class="form-button" xhtml_onclick="return validateInputs(this);">
+                <v:button action="simple" name="e_create_new" value="Create and New" enabled="--case when (self.cAction = 'create') then 1 else 0 end" xhtml_class="form-button" xhtml_onclick="return validateInputs(this);">
             <v:on-post>
               <![CDATA[
                 self.saveEvent ();
@@ -3194,7 +3165,7 @@
         </div>
       </v:template>
 
-            <v:template type="simple" name="template_view_event" enabled="--case when ((self.cScope <> 'tasks') and (self.cAction = 'view')) then 1 else 0 end">
+            <v:template type="simple" name="template_view_event" enabled="--case when (self.cAction = 'view') and (self.cSubAction = 'event') then 1 else 0 end">
         <v:before-data-bind>
           <![CDATA[
             declare exit handler for not found goto _end;
@@ -3206,8 +3177,8 @@
                          E_PRIVACY,
                    E_TAGS,
                    E_EVENT,
-                   CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone),
-                   CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone),
+                         E_EVENT_START,
+                         E_EVENT_END,
                    E_REPEAT,
                    E_REPEAT_PARAM1,
                    E_REPEAT_PARAM2,
@@ -3237,6 +3208,7 @@
              where E_ID = self.v_id;
 
                   self.v_attendees := CAL.WA.attendees_return (self.v_id);
+                  self.rdf_iri := SIOC..calendar_event_iri (self.domain_id, self.v_id);
             return;
 
           _end:;
@@ -3392,7 +3364,7 @@
         </div>
       </v:template>
 
-            <v:template type="simple" name="template_edit_task" enabled="--case when ((self.cScope = 'tasks') and (self.cAction in ('create', 'edit'))) then 1 else 0 end">
+            <v:template type="simple" name="template_edit_task" enabled="--case when (self.cAction in ('create', 'edit')) and (self.cSubAction = 'task') then 1 else 0 end">
         <v:before-data-bind>
           <![CDATA[
                   if (isnull (get_keyword ('t_subject', self.vc_page.vc_event.ve_params)))
@@ -3408,9 +3380,9 @@
                              E_ATTENDEES,
                              E_PRIVACY,
                        E_TAGS,
-                       CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone),
-                       CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone),
-                       CAL.WA.event_gmt2user (E_COMPLETED, self.cTimezone),
+                             CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone, self.cDaylight),
+                             CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone, self.cDaylight),
+                             CAL.WA.event_gmt2user (E_COMPLETED, self.cTimezone, self.cDaylight),
                        E_PRIORITY,
                        E_STATUS,
                        E_COMPLETE,
@@ -3434,6 +3406,7 @@
 
                        self.v_attendees := CAL.WA.attendees_return (self.v_id);
                        self.v_grants := self.shareSelect (self.v_id);
+                       self.rdf_iri := SIOC..calendar_event_iri (self.domain_id, self.v_id);
                  return;
               }
             _end:;
@@ -3459,7 +3432,7 @@
                     <v:label for="t_subject" value="Name" />
               </th>
               <td>
-                          <v:text name="t_subject" null-value="''" value="--self.v_subject" fmt-function="CAL.WA.utf2wide" xhtml_class="textbox" xhtml_size="60" />
+                          <v:text name="t_subject" xhtml_id="t_subject" null-value="''" value="--self.v_subject" fmt-function="CAL.WA.utf2wide" xhtml_class="textbox" xhtml_size="60" />
               </td>
             </tr>
             <tr>
@@ -3582,7 +3555,7 @@
                 <v:label for="t_description" value="Description"/>
               </th>
               <td>
-                          <v:textarea name="t_description" null-value="--''" value="--self.v_description" fmt-function="CAL.WA.utf2wide" xhtml_cols="45" xhtml_rows="6" />
+                          <v:textarea name="t_description" xhtml_id="t_description" null-value="--''" value="--self.v_description" fmt-function="CAL.WA.utf2wide" xhtml_cols="45" xhtml_rows="6" />
                         </td>
                       </tr>
                       <vm:if test="(self.cAction = 'create') or (CAL.WA.event_domain (self.v_id) = self.domain_id)">
@@ -3612,25 +3585,21 @@
                           <v:textarea name="t_attendees" null-value="--''" value="--self.v_attendees" fmt-function="CAL.WA.utf2wide" xhtml_cols="45" xhtml_rows="6" />
                           <?vsp
                             if (CAL.WA.instance_check (self.account_id, 'AddressBook'))
-                              http (sprintf ('<input type="button" value="Select" onclick="javascript: window.open (\'contacts.vspx?form=F1&dst=mc&params=t_attendees:s1;&sid=%s&realm=%s\', \'calendar_contacts_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=500, width=600\'); return false;" class="button"> ', self.sid, self.realm));
+                              http (self.windowOpen('contacts.vspx?dst=mc&params=t_attendees:s1;', 'Select', 'Select', 'button'));
                             if (self.v_attendees_count)
-                              http (sprintf ('<input type="button" value="Details" onclick="javascript: window.open (\'attendees.vspx?id=%d&sid=%s&realm=%s\', \'calendar_contacts_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=768, width=1024\'); return false;" class="button">', self.v_id, self.sid, self.realm));
+                              http (self.windowOpen('attendees.vspx?id=' || cast (self.v_id as varchar), 'Details', 'Details', 'button'));
                           ?>
                         </td>
                       </tr>
                       <tr>
-              <script type="text/javascript">
-                function suggestTags ()
-                {
-                  window.open ('tags.vspx?sid=<?V self.sid ?>&realm=<?V self.realm ?>&txt='+escape(document.F1.elements['t_subject'].value)+'&txt2='+escape(document.F1.elements['t_description'].value) + '&fld=n_tags', 'bookmarks_suggest_window', 'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500');
-                }
-              </script>
               <th>
                 <v:label for="t_tags" value="Tags (comma-separated)" />
               </th>
               <td>
                   <v:text name="t_tags" null-value="''" value="--self.v_tags" xhtml_class="textbox" xhtml_size="60" />
-                  <input type="button" value="Suggest" onclick="javascript: suggestTags();" class="button" />
+                          <?vsp if (CAL.WA.tag_rule_exists (self.account_id)) { ?>
+                            <input type="button" value="Suggest" onclick="javascript: tagsShow('<?V CAL.WA.page_url (self.domain_id, 'tags.vspx?fld=t_tags') ?>', 't');" class="button" />
+                          <?vsp } ?>
                   <input type="button" value="Clear" onclick="javascript: document.F1.elements['t_tags'].value = ''" class="button" />
               </td>
             </tr>
@@ -3661,11 +3630,11 @@
                       <table class="form-body" cellspacing="0">
                         <tr>
                           <td style="width: 90%; background-color: white;">
-                            <table id="f_tbl" width="100%" cellspacing="0">
-                              <thead class="sortHeader">
+                            <table id="f_tbl" class="ODS_grid">
+                              <thead>
                                 <tr>
                                   <th width="100%">Value</th>
-                                  <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                                 </tr>
                               </thead>
                         		  <![CDATA[
@@ -3705,13 +3674,13 @@
                     <table class="form-body" cellspacing="0">
                       <tr>
                         <td style="width: 90%; background-color: white;">
-                          <table id="s_tbl" width="100%" cellspacing="0">
-                            <thead class="sortHeader">
+                            <table id="s_tbl" class="ODS_grid">
+                              <thead>
                               <tr>
                                 <th width="15%">Type</th>
                                 <th>Value</th>
                                 <th width="1%" nowrap="nowrap">ACL: (R)ead, (W)rite</th>
-                                <th width="50px">Action</th>
+                                  <th class="action">Action</th>
                               </tr>
                             </thead>
                       		  <![CDATA[
@@ -3770,7 +3739,7 @@
               ]]>
             </v:on-post>
           </v:button>
-                <v:button action="simple" name="t_create_new" value="Create and New" enabled="--case when ((self.cScope = 'tasks') and (self.cAction = 'create')) then 1 else 0 end" xhtml_class="form-button">
+                <v:button action="simple" name="t_create_new" value="Create and New" enabled="--case when (self.cAction = 'create') then 1 else 0 end" xhtml_class="form-button">
             <v:on-post>
               <![CDATA[
                 self.saveTask ();
@@ -3795,7 +3764,7 @@
         </div>
       </v:template>
 
-            <v:template type="simple" name="template_view_task" enabled="--case when ((self.cScope = 'tasks') and (self.cAction in ('view'))) then 1 else 0 end">
+            <v:template type="simple" name="template_view_task" enabled="--case when (self.cAction = 'view') and (self.cSubAction = 'task') then 1 else 0 end">
         <v:before-data-bind>
           <![CDATA[
             declare exit handler for not found goto _end;
@@ -3803,9 +3772,9 @@
             select E_SUBJECT,
                    E_DESCRIPTION,
                    E_TAGS,
-                   CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone),
-                   CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone),
-                   CAL.WA.event_gmt2user (E_COMPLETED, self.cTimezone),
+                         CAL.WA.event_gmt2user (E_EVENT_START, self.cTimezone, self.cDaylight),
+                         CAL.WA.event_gmt2user (E_EVENT_END, self.cTimezone, self.cDaylight),
+                         CAL.WA.event_gmt2user (E_COMPLETED, self.cTimezone, self.cDaylight),
                    E_PRIORITY,
                    E_STATUS,
                    E_COMPLETE,
@@ -3824,6 +3793,7 @@
              where E_ID = self.v_id;
 
                   self.v_attendees := CAL.WA.attendees_return (self.v_id);
+                  self.rdf_iri := SIOC..calendar_event_iri (self.domain_id, self.v_id);
              return;
 
           _end:;
@@ -4046,7 +4016,7 @@
                       User
                   </th>
                   <td>
-                      <v:text name="i_user" value="--self.icUser" xhtml_class="" />
+                      <v:text name="i_user" value="--self.icUser" null-value="''" xhtml_class="" />
                     </td>
                   </tr>
                   <tr id="imp_tr_32" style="<?V case when self.icSource < 1 then 'display: none;' else '' end ?>;">
@@ -4054,7 +4024,7 @@
                       Password
                     </th>
                     <td>
-                      <v:text name="i_password" type="password" value="--''" xhtml_class="" />
+                      <v:text name="i_password" type="password" value="--''" null-value="''" xhtml_class="" />
                   </td>
                 </tr>
               <tr>
@@ -4259,7 +4229,7 @@
                       User
                     </th>
                     <td>
-                      <v:text name="ex_user" value="--self.exUser" xhtml_class="" />
+                      <v:text name="ex_user" value="--self.exUser" null-value="''" xhtml_class="" />
                     </td>
                   </tr>
                   <tr id="ex_tr_1" style="<?V case when self.exType < 1 then 'display: none;' else '' end ?>;">
@@ -4267,7 +4237,7 @@
                       Password
                     </th>
                     <td>
-                      <v:text name="ex_password" type="password" value="--''" xhtml_class="" />
+                      <v:text name="ex_password" type="password" value="--''" null-value="''" xhtml_class="" />
                     </td>
                   </tr>
                   <tr>
@@ -4276,17 +4246,15 @@
                     </td>
                   </tr>
                   <tr>
-                    <th></th>
+                    <th valign="top">
+                      Related objects
+                    </th>
                     <td>
                       <label>
                         <v:check-box name="ex_events" is-boolean="1" true-value="1" false-value="0" value="--self.exEvents" />
                         Events
                       </label>
-                    </td>
-                  </tr>
-                  <tr>
-                    <th></th>
-                    <td>
+                      <br />
                       <label>
                         <v:check-box name="ex_tasks" is-boolean="1" true-value="1" false-value="0" value="--self.exTasks" />
                         Tasks
@@ -4397,7 +4365,7 @@
                       self.exUser := trim (self.ex_user.ufl_value);
                       self.exPassword := self.ex_password.ufl_value;
                       self.exEvents := case when self.ex_events.ufl_selected then 1 else 0 end;
-                      self.exTasks := case when self.ex_events.ufl_selected then 1 else 0 end;
+                      self.exTasks := case when self.ex_tasks.ufl_selected then 1 else 0 end;
                       exOptions := vector ('events', self.exEvents, 'tasks', self.exTasks, 'periodFrom', self.exPeriodFrom, 'periodTo', self.exPeriodTo, 'tagsInclude', self.exTagsInclude, 'tagsExclude', self.exTagsExclude);
 
                       content := CAL.WA.export_vcal (self.domain_id, null, exOptions);
@@ -4572,16 +4540,16 @@
               <div style="min-height: 200px">
                 <v:data-set name="ds_exchanges" data-source="self.dsrc_exchanges" scrollable="1">
                   <v:template name="ds_exchanges_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                    <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                      <thead class="sortHeader">
+                    <table class="ODS_grid" style="border: 0px;">
+                      <thead>
                         <tr>
-                          <th class="checkbox" width="1%">
+                          <th class="checkbox">
                             <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                           </th>
-                          <th style="text-align: left;">Name</th>
-                          <th style="text-align: left;" width="5%" nowrap="nowrap">Executed On</th>
-                          <th style="text-align: left;" width="5%" nowrap="nowrap">Status</th>
-                          <th style="text-align: left;" width="5%" nowrap="nowrap">Action</th>
+                          <th>Name</th>
+                          <th width="5%" nowrap="nowrap">Executed On</th>
+                          <th width="5%" nowrap="nowrap">Status</th>
+                          <th class="action">Action</th>
                         </tr>
                       </thead>
                     </table>
@@ -4596,7 +4564,7 @@
                     <v:template name="ds_exchanges_browse" type="browse" name-to-remove="table" set-to-remove="both">
                       <table>
                         <tr>
-                          <td align="center" valign="top">
+                          <td class="checkbox">
                             <input type="checkbox" name="cb_item" value="<?V (control as vspx_row_template).te_column_value('EX_ID') ?>" onclick="selectCheck(this, 'cb_item')" />
                           </td>
                           <td nowrap="nowrap">
@@ -4609,7 +4577,7 @@
                       		  <?vsp
                       		    if ((control as vspx_row_template).te_column_value('EX_EXEC_LOG') is not null)
                   {
-                      		      http (sprintf ('<a href="#" onclick="javascript: window.open (\'message.vspx?msg=%U\', \'calendar_message\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500\');"><img src="/ods/images/icons/stop_16.png" border="0"/></a>', (control as vspx_row_template).te_column_value('EX_EXEC_LOG')));
+                      		      http (sprintf ('<a href="#" onclick="javascript: return windowShow(\'%s?msg=%U\');"><img src="/ods/images/icons/stop_16.png" border="0"/></a>', CAL.WA.page_url (self.domain_id, 'message.vspx'), (control as vspx_row_template).te_column_value('EX_EXEC_LOG')));
                   }
                       		    else
                   {
@@ -4617,7 +4585,7 @@
                   }
                       		  ?>
                           </td>
-                          <td nowrap="nowrap">
+                          <td class="action">
                             <v:button action="simple" name="edit_exchange" value="Edit" xhtml_class="button">
                               <v:on-post>
                                 <![CDATA[
@@ -4688,11 +4656,6 @@
                   </v:on-post>
                 </v:button>
               </div>
-              <script type="text/javascript">
-                <![CDATA[
-                  coloriseTable('preferences');
-                ]]>
-              </script>
             </vm:if>
 
             <v:template name="exchange_form" type="simple" enabled="--case when self.cAction in ('publishCreate', 'publishUpdate', 'subscribeCreate', 'subscribeUpdate', 'syncmlCreate', 'syncmlUpdate') then 1 else 0 end">
@@ -4881,14 +4844,12 @@
                           </th>
                           <td>
                       <v:text name="exc_options_name" xhtml_id="exc_options_name" value="--get_keyword ('name', self.ve_options)" xhtml_size="60" />
-                      <vm:if test="self.cAction not in ('syncmlCreate', 'syncmlUpdate')">
-                        <input type="button" id="exc_options_name_button" value="Browse..." onclick="davBrowse ('exc_options_name');" style="display: <?V case when (get_keyword ('type', self.ve_options, 1) <> 1) then 'none' else '' end ?>;" />
+                      <input type="button" id="exc_options_name_button" value="Browse..." onclick="davBrowse ('exc_options_name', <?V case when (self.cAction in ('syncmlCreate', 'syncmlUpdate')) then 'true' else 'false' end ?>);" style="display: <?V case when (get_keyword ('type', self.ve_options, 1) <> 1) then 'none' else '' end ?>" />
                           <![CDATA[
                   		    <script type="text/javascript">
                             OAT.Loader.load(['dav'], function(){OAT.WebDav.init(davOptions);});
                   		    </script>
                           ]]>
-                      </vm:if>
                           </td>
                         </tr>
                         <tr>
@@ -4896,7 +4857,7 @@
                       User
                     </th>
                           <td>
-                      <v:text name="exc_options_user" value="--get_keyword ('user', self.ve_options)" />
+                      <v:text name="exc_options_user" value="--get_keyword ('user', self.ve_options)" null-value="''" />
                           </td>
                         </tr>
                         <tr>
@@ -4904,7 +4865,7 @@
                       Password
                     </th>
                           <td>
-                      <v:text name="exc_options_password" type="password"  value="--get_keyword ('password', self.ve_options)" />
+                      <v:text name="exc_options_password" type="password"  value="--get_keyword ('password', self.ve_options)" null-value="''" />
                           </td>
                         </tr>
                         <tr>
@@ -4951,17 +4912,15 @@
                     </tr>
                   </vm:if>
                         <tr>
-                    <th></th>
+                    <th valign="top">
+                      Related objects
+                    </th>
                           <td>
                       <label>
                         <v:check-box name="exc_options_events" is-boolean="1" true-value="1" false-value="0" value="--get_keyword ('events', coalesce (self.ve_options, vector ()), 1)" />
                         Events
                       </label>
-                          </td>
-                        </tr>
-                        <tr>
-                    <th></th>
-                          <td>
+                      <br />
                       <label>
                         <v:check-box name="exc_options_tasks" is-boolean="1" true-value="1" false-value="0" value="--get_keyword ('tasks', coalesce (self.ve_options, vector ()), 1)" />
                         Tasks
@@ -5047,15 +5006,13 @@
                           tmp := '11_';
                         }
                         if (not CAL.WA.dav_check_authenticate (_nameTest, _user, _password, tmp))
-                        {
                           signal ('TEST', 'The user has no rights for this folder.<>');
                         }
-                      }
 
                       _attendees := cast (self.exc_options_attendees.ufl_value as integer);
                       _mode := cast (self.exc_options_mode.ufl_value as integer);
                     _events := case when self.exc_options_events.ufl_selected then 1 else 0 end;
-                    _tasks := case when self.exc_options_events.ufl_selected then 1 else 0 end;
+                      _tasks := case when self.exc_options_tasks.ufl_selected then 1 else 0 end;
 
                       self.ve_options := vector ('type', _type, 'name', _name, 'user', _user, 'password', _password, 'mailAttendees', _attendees, 'mode', _mode, 'events', _events, 'tasks', _tasks);
 
@@ -5105,10 +5062,10 @@
                 <br />
                 <b>The following subscription(s) will be deleted. For checked subscriptions corresponding events/tasks will be deleted too.</b>
                 <br /><br />
-                <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                  <thead class="sortHeader">
+                <table class="ODS_grid">
+                  <thead>
                     <tr>
-                      <th class="checkbox" width="1%">
+                      <th class="checkbox">
                         <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                       </th>
                       <th style="text-align: left;">Name</th>
@@ -5125,7 +5082,7 @@
                       {
                   ?>
                         <tr>
-                          <td align="center" valign="top">
+                          <td class="checkbox">
                             <input type="hidden" name="ex_item" value="<?V params[N+1] ?>" />
                             <input type="checkbox" name="cb_item" value="<?V params[N+1] ?>" onclick="selectCheck(this, 'cb_item')" />
                           </td>
@@ -5415,8 +5372,10 @@
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_showTasks" xhtml_id="s_showTasks" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword('showTasks', self.settings, '1') as integer)" />
-                              <vm:label for="s_showTasks" value="Show tasks in Calendar"/>
+                                Show tasks in Calendar
+                              </label>
                             </td>
                         </tr>
                           <tr>
@@ -5437,22 +5396,28 @@
                               Show columns in 'Events' view
                             </th>
                             <td>
+                              <label>
                               <v:check-box name="s_e_column_3" xhtml_id="s_e_column_3" is-boolean="1" true-value="1" false-value="0" value="--cast (get_keyword ('event_E_LOCATION', self.settings, '0') as integer)" />
-                              <vm:label for="s_e_column_3" value="Location"/>
+                                Location
+                              </label>
                           </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_e_column_1" xhtml_id="s_e_column_1" is-boolean="1" true-value="1" false-value="0" value="--cast (get_keyword ('event_E_UPDATED', self.settings, '1') as integer)" />
-                              <vm:label for="s_e_column_1" value="Updated"/>
+                                Updated
+                              </label>
                           </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_e_column_2" xhtml_id="s_e_column_2" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword ('event_E_CREATED', self.settings, '0') as integer)" />
-                              <vm:label for="s_e_column_2" value="Created"/>
+                                Created
+                              </label>
                           </td>
                           </tr>
                           <tr>
@@ -5460,50 +5425,64 @@
                               Show columns in 'Tasks' view
                             </th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_1" xhtml_id="s_t_column_1" is-boolean="1" true-value="1" false-value="0" value="--cast (get_keyword ('task_E_STATUS', self.settings, '1') as integer)" />
-                              <vm:label for="s_t_column_1" value="Status"/>
+                                Status
+                              </label>
                           </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_5" xhtml_id="s_t_column_5" is-boolean="1" true-value="1" false-value="0" value="--cast (get_keyword ('task_E_PRIORITY', self.settings, '1') as integer)" />
-                              <vm:label for="s_t_column_5" value="Priority"/>
+                                Priority
+                              </label>
                             </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_6" xhtml_id="s_t_column_6" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword ('task_E_START', self.settings, '0') as integer)" />
-                              <vm:label for="s_t_column_6" value="Start Date"/>
+                                Start Date
+                              </label>
                             </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_7" xhtml_id="s_t_column_7" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword ('task_E_END', self.settings, '1') as integer)" />
-                              <vm:label for="s_t_column_7" value="Due Date"/>
+                                Due Date
+                              </label>
                             </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_2" xhtml_id="s_t_column_2" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword ('task_E_COMPLETED', self.settings, '0') as integer)" />
-                              <vm:label for="s_t_column_2" value="Completed"/>
+                                Completed
+                              </label>
                             </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_3" xhtml_id="s_t_column_3" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword ('task_E_UPDATED', self.settings, '0') as integer)" />
-                              <vm:label for="s_t_column_3" value="Updated"/>
+                                Updated
+                              </label>
                             </td>
                           </tr>
                           <tr>
                             <th></th>
                             <td>
+                              <label>
                               <v:check-box name="s_t_column_4" xhtml_id="s_t_column_4" is-boolean="1" true-value="1" false-value="0" value="--cast(get_keyword ('task_E_CREATED', self.settings, '0') as integer)" />
-                              <vm:label for="s_t_column_4" value="Created"/>
+                                Created
+                              </label>
                             </td>
                           </tr>
                           <tr>
@@ -5652,13 +5631,26 @@
                     </td>
                   </tr>
                           <tr>
-                            <th>
-                              Effective timezone
-                            </th>
+                            <th>Effective timezone</th>
                             <td>
                               <?vsp http (self.showTimeZone (self.cTimeZone / 60)); ?>
                             </td>
                           </tr>
+                          <tr>
+                            <th>Daylight Saving Time (DST)</th>
+                            <td>
+                              <v:select-list name="s_daylight">
+                                <v:item value="0" name="No" />
+                                <v:item value="1" name="Last Sunday in March - Last Sunday in October (Europa)" />
+                                <v:item value="2" name="Second Sunday in March - First Sunday in November (US)" />
+                                <v:before-data-bind>
+                                  <![CDATA[
+                                    control.ufl_value := CAL.WA.settings_daylight (self.settings);
+                                  ]]>
+                                </v:before-data-bind>
+                              </v:select-list>
+                            </td>
+                          </tr>
                         </table>
                       </div>
                       <div id="s_content_3" class="tabContent" style="display: none;">
@@ -5673,35 +5665,31 @@
                   <tr>
                             <th width="30%"> </th>
                     <td>
+                              <label>
                               <?vsp
                                 declare S, T varchar;
 
-                                S := '';
-                      				  if (not CAL.WA.discussion_check ())
-                      				    S := 'disabled="disabled"';
-                                T := '';
-                      				  if (cast(get_keyword ('conv', self.settings, '0') as integer) = 1)
-                      				    T := 'checked';
+                                  S := case when (not CAL.WA.discussion_check ()) then 'disabled="disabled"' else '' end;
+                                  T := case when (cast(get_keyword ('conv', self.settings, '0') as integer) = 1) then 'checked' else '' end;
                                 http (sprintf ('<input type="checkbox" name="s_conv" value="1" %s %s />', T, S));
                               ?>
-                      				<vm:label for="s_conv" value="Enable discussions on this instance" />
+                      				  Enable discussions on this instance
+                              </label>
                     </td>
                   </tr>
                   <tr>
                             <th width="30%"> </th>
                     <td>
+                              <label>
                               <?vsp
                                 declare S, T varchar;
 
-                                S := '';
-                      				  if (not CAL.WA.discussion_check ())
-                      				    S := 'disabled="disabled"';
-                                T := '';
-                      				  if (cast(get_keyword ('conv_init', self.settings, '0') as integer) = 1)
-                      				    T := 'checked';
+                                  S := case when (not CAL.WA.discussion_check ()) then 'disabled="disabled"' else '' end;
+                                  T := case when (cast(get_keyword ('conv_init', self.settings, '0') as integer) = 1) then 'checked' else '' end;
                                 http (sprintf ('<input type="checkbox" name="s_conv_init" value="1" %s %s />', T, S));
                               ?>
-                      				<vm:label for="s_conv_init" value="Initialize the news group with existing posts" />
+                      				  Initialize the news group with existing posts
+                              </label>
                     </td>
                   </tr>
                 </table>
@@ -5709,7 +5697,7 @@
                     </div>
                   </div>
                   <div class="form-footer">
-                    <v:button action="simple" value="Save" xhtml_class="form-button">
+                    <v:button name="sp_save" action="simple" value="Save" xhtml_class="form-button">
                     <v:on-post>
                       <![CDATA[
                           declare rows, chars any;
@@ -5747,6 +5735,8 @@
                           self.settings := CAL.WA.set_keyword ('weekStarts', self.settings, self.s_weekStarts.ufl_value);
                           self.settings := CAL.WA.set_keyword ('timeFormat', self.settings, self.s_timeFormat.ufl_value);
                           self.settings := CAL.WA.set_keyword ('dateFormat', self.settings, self.s_dateFormat.ufl_value);
+                          self.settings := CAL.WA.set_keyword ('daylight', self.settings, self.s_daylight.ufl_value);
+
                           CAL.WA.remove_keyword ('timeZone', self.settings);
                           CAL.WA.remove_keyword ('timeZoneName', self.settings);
                           if (not is_empty_or_null (self.s_timeZone.ufl_value))
@@ -5803,22 +5793,25 @@
 
                           commit work;
                           self.initData ();
-                          self.cAction := 'browse';
-                          self.cSubAction := '';
 
                         self.vc_data_bind(e);
                       ]]>
                     </v:on-post>
                   </v:button>
-                    <v:button action="simple" value="Clear" xhtml_class="form-button">
+                    <v:button name="sp_clear" action="simple" value="Clear" xhtml_onclick="javascript: return confirm (\'Do you want to reset settings to default?\');" xhtml_class="form-button">
                     <v:on-post>
                       <![CDATA[
+                          declare tmp any;
+
                           delete from CAL.WA.SETTINGS where S_DOMAIN_ID = self.domain_id;
                           CAL.WA.nntp_update (self.domain_id, null, null, 1, 0);
-
                           commit work;
-                          self.settings := vector ();
-                          self.initData ();
+
+                          self.settings := CAL.WA.settings (self.domain_id);
+                          CAL.WA.settings_init (self.settings);
+                          self.settings := CAL.WA.set_keyword ('app', self.settings, DB.DBA.WA_USER_APP_ENABLE (self.account_id));
+                          tmp := CAL.WA.settings_usedTimeZone (self.domain_id, self.owner_id);
+                          CAL.WA.set_keyword ('usedTimeZone', self.settings, tmp);
 
                 self.vc_data_bind(e);
               ]]>
@@ -5907,16 +5900,16 @@
                     <v:param name="p0" value="--self.domain_id" />
 
                     <v:template name="ds_upstreams_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                      <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                        <thead class="sortHeader">
+                      <table class="ODS_grid" style="border: 0px;">
+                        <thead>
                           <tr>
-                            <th class="checkbox" width="1%">
+                            <th class="checkbox">
                               <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                             </th>
-                            <th style="text-align: left;">Name</th>
-                            <th style="text-align: left;">Path</th>
-                            <th style="text-align: left;">In Queue</th>
-                            <th style="text-align: left;" width="5%">Action</th>
+                            <th>Name</th>
+                            <th>Path</th>
+                            <th>In Queue</th>
+                            <th class="action">Action</th>
                           </tr>
                         </thead>
                       </table>
@@ -5931,7 +5924,7 @@
                       <v:template name="ds_upstreams_browse" type="browse" name-to-remove="table" set-to-remove="both">
                         <table>
                           <tr>
-                            <td align="center" valign="top">
+                            <td class="checkbox">
                               <input type="checkbox" name="cb_item" value="<?V (control as vspx_row_template).te_column_value('U_ID') ?>" onclick="selectCheck(this, 'cb_item')" />
                             </td>
                             <td nowrap="nowrap">
@@ -5945,7 +5938,7 @@
                                 http (cast ((select count(*) from CAL.WA.UPSTREAM_EVENT where UE_UPSTREAM_ID = (control as vspx_row_template).te_column_value('U_ID')) as varchar));
                         		  ?>
                             </td>
-                            <td nowrap="nowrap">
+                            <td class="action">
                               <v:button value="Edit" action="simple" xhtml_class="button">
                                 <v:on-post>
                                   <![CDATA[
@@ -5957,7 +5950,7 @@
                               </v:button>
                               <?vsp
                                 if ((select count(*) from CAL.WA.UPSTREAM_LOG where UL_UPSTREAM_ID = (control as vspx_row_template).te_column_value('U_ID')))
-                                  http (sprintf ('<input type="button" value="Error Log" onclick="javascript: window.open (\'logs.vspx?sid=%s&realm=%s&oid=%d\', \'calendar_log_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=500, width=600\'); return false;" class="button">', self.sid, self.realm, (control as vspx_row_template).te_column_value('U_ID')));
+                                  http (self.windowOpen(sprintf ('logs.vspx?oid=%d', (control as vspx_row_template).te_column_value('U_ID')), 'Error Log', 'Error Log', 'button'));
                               ?>
                             </td>
                           </tr>
@@ -6145,7 +6138,7 @@
                 </v:template>
 
                 <v:template type="simple" enabled="--case when self.cSubAction = 'grantBrowse' then 1 else 0 end">
-                  <v:button value="--'Share'" action="simple" xhtml_class="button">
+                  <v:button value="--'New Share'" action="simple" xhtml_class="button">
                     <v:on-post>
                       <![CDATA[
                         commit work;
@@ -6175,16 +6168,16 @@
                     <v:param name="p0" value="--self.domain_id" />
 
                     <v:template name="ds_grant_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                      <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                        <thead class="sortHeader">
+                      <table class="ODS_grid" style="border: 0px;">
+                        <thead>
                           <tr>
-                            <th class="checkbox" width="1%">
+                            <th class="checkbox">
                               <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                             </th>
-                            <th style="text-align: left;" nowrap="nowrap">User</th>
-                            <th style="text-align: left;" nowrap="nowrap" width="5%">Enabled/Disabled</th>
-                            <th style="text-align: left;" nowrap="nowrap" width="5%">Share Mode</th>
-                            <th style="text-align: left;" nowrap="nowrap" width="5%">Action</th>
+                            <th nowrap="nowrap">User</th>
+                            <th nowrap="nowrap" width="5%">Enabled/Disabled</th>
+                            <th nowrap="nowrap" width="5%">Share Mode</th>
+                            <th class="action">Action</th>
                           </tr>
                         </thead>
                       </table>
@@ -6278,32 +6271,31 @@
                         </th>
                         <td>
                           <v:text name="sg_account" null-value="--''" value="--self.vg_account" xhtml_class="textbox" />
-                          <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=u&form=F1&params=sg_account:s1;')" class="button" />
+                          <input type="button" value="Select" onclick="javascript: windowShow('/ods/users_select.vspx?mode=u&params=sg_account:s1;&nrows=<?V CAL.WA.settings_rows (self.settings) ?>')" class="button" />
                         </td>
                       </tr>
                       <tr>
-                        <th></th>
+                        <th valign="top">
+                          Share access
+                        </th>
                         <td>
                           <?vsp
-                            http (sprintf ('<input type="checkbox" value="1" name="sg_enable" id="sg_enable" %s />', CAL.WA.checkedAttribute (self.vg_enable)));
+                            http(sprintf('<label><input type="radio" name="sg_enable" id="sg_enable_0" value="0" %s />Disable</label>', CAL.WA.checkedAttribute (self.vg_enable, 0)));
+                            http('<br />');
+                            http(sprintf('<label><input type="radio" name="sg_enable" id="sg_enable_1" value="1" %s />Enable</label>', CAL.WA.checkedAttribute (self.vg_enable, 1)));
                           ?>
-                          <vm:label for="sg_enable" value="Enable"/>
                         </td>
                       </tr>
                       <tr>
-                        <th>
+                        <th valign="top">
                           Share mode
                         </th>
                         <td>
-                          <v:select-list name="sg_mode">
-                            <v:item value="R" name="Read Only" />
-                            <v:item value="W" name="Read/Write" />
-                            <v:before-data-bind>
-                              <![CDATA[
-                                control.ufl_value := self.vg_mode;
-                              ]]>
-                            </v:before-data-bind>
-                          </v:select-list>
+                          <?vsp
+                            http(sprintf('<label><input type="radio" name="sg_mode" id="sg_mode_0" value="R" %s />Read Only</label>', CAL.WA.checkedAttribute (self.vg_mode, 'R')));
+                            http('<br />');
+                            http(sprintf('<label><input type="radio" name="sg_mode" id="sg_mode_1" value="R" %s />Read/Write</label>', CAL.WA.checkedAttribute (self.vg_mode, 'W')));
+                          ?>
                         </td>
                       </tr>
                     </table>
@@ -6328,7 +6320,7 @@
 
                           self.vg_account    := trim (self.sg_account.ufl_value);
                           self.vg_enable     := cast (get_keyword ('sg_enable', params, '0') as integer);
-                          self.vg_mode       := trim (self.sg_mode.ufl_value);
+                          self.vg_mode       := get_keyword ('sg_mode', params, 'R');
                           self.vg_account_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = self.vg_account);
                           if (isnull (self.vg_account_id))
                           {
@@ -6409,23 +6401,23 @@
                       ]]>
                     </v:on-post>
                   </v:button>
-                  <input class="button" type="button" title="Help" alt="Help" value="Help" onclick="javascript: window.open ('help.vspx?page=proba', 'calendar_help', 'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500'); return false;"/>
+                  <input class="button" type="button" title="Help" alt="Help" value="Help" onclick="javascript: return windowShow('<?V CAL.WA.page_url (self.domain_id, 'help.vspx?page=proba') ?>');"/>
                   <v:data-set name="ds_shared" sql="select a.*, b.WAI_NAME from CAL.WA.SHARED a, DB.DBA.WA_INSTANCE b where a.S_DOMAIN_ID = :p0 and a.S_CALENDAR_ID = b.WAI_ID order by b.WAI_NAME" nrows="0" scrollable="1">
                     <v:param name="p0" value="--self.domain_id" />
 
                     <v:template name="ds_shared_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-                      <table id="preferences" style="width: 100%; background-color: #FFF;" cellspacing="0">
-                        <thead class="sortHeader">
+                      <table class="ODS_grid" style="border: 0px;">
+                        <thead>
                           <tr>
-                            <th class="checkbox" width="1%">
+                            <th class="checkbox">
                               <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item')" />
                             </th>
-                            <th style="text-align: left;">Calendar</th>
-                            <th style="text-align: left;" width="5%">Type</th>
-                            <th style="text-align: left;" width="5%">Visible</th>
-                            <th style="text-align: left;" width="5%">Mode</th>
-                            <th style="text-align: left;" width="5%">Color</th>
-                            <th style="text-align: left;" width="5%">Action</th>
+                            <th>Calendar</th>
+                            <th width="5%">Type</th>
+                            <th width="5%">Visible</th>
+                            <th width="5%">Mode</th>
+                            <th width="5%">Color</th>
+                            <th class="action">Action</th>
                           </tr>
                         </thead>
                       </table>
@@ -6435,7 +6427,7 @@
                       <v:template name="ds_shared_browse" type="browse" name-to-remove="table" set-to-remove="both">
                         <table>
                           <tr>
-                            <td align="center" valign="top">
+                            <td class="checkbox">
                               <input type="checkbox" name="cb_item" value="<?V (control as vspx_row_template).te_column_value('S_ID') ?>" onclick="selectCheck(this, 'cb_item')" />
                             </td>
                             <td nowrap="nowrap">
@@ -6568,7 +6560,7 @@
                       <tr>
                         <td colspan="2" align="center">
                           <?vsp
-                            http ('<a href="javascript: void(0);" onclick="javascript: window.open (\'help.vspx?page=proba\', \'calendar_help\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=420, width=500\');">Learn more about public and shared calendars</a><br />');
+                            http (self.windowOpen('help.vspx?page=proba', 'Learn more about public and shared calendars', 'Learn more about public and shared calendars', 'link'));
                           ?>
                         </td>
                       </tr>
@@ -6590,7 +6582,7 @@
                         </th>
                         <td>
                           <v:text name="ss_calendar" xhtml_id="ss_calendar" value="--self.vs_calendar" xhtml_size="60" />
-                          <input id="ss_type_button" type="button" value="Select" onclick="javascript: calendarsShow('calendars.vspx?form=F1&params=ss_calendar:s1;',520)" class="button" />
+                          <input id="ss_type_button" type="button" value="Select" onclick="javascript: calendarsShow('calendars.vspx?params=ss_calendar:s1;',520)" class="button" />
                         </td>
                       </tr>
                       <tr>
@@ -6715,7 +6707,6 @@
                 </v:template>
                 <script type="text/javascript">
                   <![CDATA[
-                    coloriseTable('preferences');
                     calendarsHelp();
                   ]]>
                 </script>
@@ -6723,10 +6714,10 @@
       
       <div id="reminderDiv" style="display: none;">
         <div style="height: 200px; overflow: auto;">
-          <table id="reminderTable" style="width: 100%; background-color: #FFF;" cellspacing="0">
-            <thead class="sortHeader">
+                  <table class="ODS_grid">
+                    <thead>
               <tr>
-                <th class="checkbox" width="1%">
+                        <th class="checkbox">
                   <input type="checkbox" name="cbr_all" value="Select All" onclick="selectAllCheckboxes2(this, 'cbr_item')" />
                 </th>
                 <th>
diff --git a/appsrc/ODS-Calendar/www/js/calendar.js b/appsrc/ODS-Calendar/www/js/calendar.js
index 43838c0..5d307ea 100644
--- a/appsrc/ODS-Calendar/www/js/calendar.js
+++ b/appsrc/ODS-Calendar/www/js/calendar.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -48,6 +48,19 @@ function vspxPost(fButton, fName, fValue, f2Name, f2Value, f3Name, f3Value) {
   doPost ('F1', fButton);
 }
 
+function odsPost(obj, fields, button) {
+  var form = getParent (obj, 'form');
+  var formName = form.name;
+  for (var i = 0; i < fields.length; i += 2)
+    createHidden(formName, fields[i], fields[i+1]);
+
+  if (button) {
+    doPost(formName, button);
+  } else {
+    form.submit();
+  }
+}
+
 function dateFormat(date, format) {
 	function long(d) {
 		return ((d < 10) ? "0" : "") + d;
@@ -386,23 +399,38 @@ function showTab(tabs, tabsCount, tabNo) {
   }
 }
 
-function windowShow(sPage, width, height) {
+function windowShow(sPage, sPageName, width, height) {
   if (width == null)
 		width = 700;
   if (height == null)
-    height = 420;
-	sPage = sPage + '&sid=' + document.forms[0].elements['sid'].value
-			+ '&realm=' + document.forms[0].elements['realm'].value;
-	win = window.open(sPage, null, "width=" + width + ",height=" + height
-			+ ", top=100, left=100, scrollbars=yes, resize=yes, menubar=no");
+		height = 500;
+  if (sPage.indexOf('form=') == -1)
+    sPage += '&form=F1';
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
+
+	return false;
 }
 
 function calendarsShow(sPage, width, height) {
 	if ($('ss_type_0').checked)
     sPage = sPage + '&mode=p'
 
-  windowShow(sPage, width, height);
+	return windowShow(sPage, width, height);
+}
+
+function tagsShow(sPage, prefix) {
+	if ($(prefix+'_subject'))
+		sPage += '&txt=' + encodeURIComponent($v(prefix+'_subject'))
+
+	if ($(prefix+'_description'))
+		sPage += '&txt2=' + encodeURIComponent($v(prefix+'_description'))
+
+	return windowShow(sPage);
 }
 
 function calendarsHelp(mode) {
@@ -418,8 +446,7 @@ function calendarsHelp(mode) {
     $('ss_calendar').value = '';
 }
 
-function rowSelect(obj)
-{
+function rowSelect(obj) {
   var srcForm = window.document.F1;
   var dstForm = window.opener.document.F1;
 
@@ -658,22 +685,22 @@ function eDelete(event, obj, onOffset) {
 
 	// delete dialog
 	if (onOffset != null) {
-		deleteDialog2.ok = function() {
+		deleteDialog2.okBtn.onclick = function() {
   		deleteDialog2.hide();
       if ($('e_delete_0').checked)
         createHidden('F1', 'onOffset', onOffset);
       createHidden('F1', 'delete', obj.id);
     doPost ('F1', 'command');
   }
-  	deleteDialog2.cancel = deleteDialog2.hide;
+		deleteDialog2.cancelBtn = deleteDialog2.hide;
   	deleteDialog2.show ();
   } else {
-  	deleteDialog.ok = function() {
+		deleteDialog.okBtn.onclick = function() {
       createHidden('F1', 'delete', obj.id);
       doPost ('F1', 'command');
   		deleteDialog.hide();
    	}
-   	deleteDialog.cancel = deleteDialog.hide;
+		deleteDialog.cancelBtn = deleteDialog.hide;
   	deleteDialog.show ();
   }
   return false;
@@ -682,9 +709,7 @@ function eDelete(event, obj, onOffset) {
 function eAnnotea(event, id, domain_id, account_id) {
   event.cancelBubble = true;
 
-	URL = 'annotea.vspx?sid=' + document.forms[0].sid.value + '&realm='
-			+ document.forms[0].realm.value + '&oid=' + id + '&did='
-			+ domain_id + '&aid=' + account_id;
+	URL = 'annotea.vspx?' + urlParam("sid") + urlParam("realm") + '&oid=' + id + '&did=' + domain_id + '&aid=' + account_id;
 	window.open(URL, 'addressbook_anotea_window', 'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=500, width=600');
   return false;
 }
@@ -748,6 +773,13 @@ function urlParam(fldName) {
   return S;
 }
 
+function myA(obj) {
+  if (obj.href) {
+    document.location = obj.href + '?' + urlParam('sid') + urlParam('realm');
+    return false;
+  }
+}
+
 function checkReminder() {
   var cb = function(txt) {
     setTimeout("checkReminder()", 60000);
@@ -770,8 +802,7 @@ function checkReminder() {
       }
     }
   }
-	OAT.AJAX.POST("ajax.vsp", "a=alarms&sa=list" + urlParam("sid")
-			+ urlParam("realm"), cb, {
+	OAT.AJAX.POST("ajax.vsp", "a=alarms&sa=list" + urlParam("sid") + urlParam("realm"), cb, {
 		type : OAT.AJAX.TYPE_TEXT,
 		onstart : function() {
 		},
@@ -795,13 +826,17 @@ function dismissReminder(prefix, mode) {
 	reminderDialog.hide ();
 }
 
-function davBrowse(fld) {
+function davBrowse(fld, folders) {
+	/* load stylesheets */
+	OAT.Style.include("grid.css");
+	OAT.Style.include("webdav.css");
+
 	var options = {
 		mode : 'browser',
-		onConfirmClick : function(path, fname) {
-			$(fld).value = path + fname;
-		}
+    onConfirmClick: function(path, fname) {$(fld).value = '/DAV' + path + fname;}
                 };
+  if (!folders) {folders = false;}
+  OAT.WebDav.options.foldersOnly = folders;
   OAT.WebDav.open(options);
 }
 
@@ -885,7 +920,11 @@ CAL.aboutDialog = function() {
 	if (aboutDiv)
 		OAT.Dom.unlink(aboutDiv);
 
-	aboutDiv = OAT.Dom.create('div', {width: '430px', height: '150px'});
+  aboutDiv = OAT.Dom.create('div', {
+    width:'430px',
+    height: '170px',
+    overflow: 'hidden'
+  });
   aboutDiv.id = 'aboutDiv';
 	aboutDialog = new OAT.Dialog('About ODS Calendar', aboutDiv, {width: 445, buttons: 0, resize: 0, modal: 1});
 	aboutDialog.cancel = aboutDialog.hide;
diff --git a/appsrc/ODS-Calendar/www/logs.vspx b/appsrc/ODS-Calendar/www/logs.vspx
index 2d6bb9e..597c7fe 100644
--- a/appsrc/ODS-Calendar/www/logs.vspx
+++ b/appsrc/ODS-Calendar/www/logs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: logs.vspx,v 1.1.2.1 2010/09/20 10:15:03 source Exp $
+ -  $Id: logs.vspx,v 1.1.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -38,8 +38,8 @@
         <v:param name="p0" value="--self.v_oid" />
 
         <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="upstreamsTable" style="width: 100%; background-color: #FFF;" cellspacing="0">
-            <thead class="sortHeader">
+          <table class="ODS_grid">
+            <thead>
               <tr>
                 <th style="text-align: left;">Time</th>
                 <th style="text-align: left;">Message</th>
diff --git a/appsrc/ODS-Calendar/www/message.vspx b/appsrc/ODS-Calendar/www/message.vspx
index e9cb110..12dcf0a 100644
--- a/appsrc/ODS-Calendar/www/message.vspx
+++ b/appsrc/ODS-Calendar/www/message.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: message.vspx,v 1.1.2.1 2010/09/20 10:15:04 source Exp $
+ -  $Id: message.vspx,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/www/tags.vspx b/appsrc/ODS-Calendar/www/tags.vspx
index 34700f8..8fd41c2 100644
--- a/appsrc/ODS-Calendar/www/tags.vspx
+++ b/appsrc/ODS-Calendar/www/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.3.2.2 2010/09/20 10:15:04 source Exp $
+ -  $Id: tags.vspx,v 1.3.2.5 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,10 +33,21 @@
       <v:variable persist="0" name="v_tags" type="any"/>
     </vm:variables>
     <vm:pagebody>
-      <table id="tags" class="CAL_grid" style="width: 100%;" cellspacing="0">
-        <thead class="sortHeader">
+      <?vsp
+        declare params any;
+
+        params := self.vc_page.vc_event.ve_params;
+
+        http (sprintf ('<input type="hidden" name="sid"   id="sid"   value="%V"/>', get_keyword ('sid', params)));
+        http (sprintf ('<input type="hidden" name="realm" id="realm" value="%V"/>', get_keyword ('realm', params)));
+        http (sprintf ('<input type="hidden" name="txt"   id="txt"   value="%V"/>', get_keyword ('txt', params)));
+        http (sprintf ('<input type="hidden" name="txt2"  id="txt2"  value="%V"/>', get_keyword ('txt2', params)));
+        http (sprintf ('<input type="hidden" name="fld"   id="fld"   value="%V"/>', get_keyword ('fld', params)));
+      ?>
+      <table id="tags" class="ODS_grid">
+        <thead>
           <tr>
-            <th class="checkbox" width="1%">
+            <th class="checkbox">
               <?vsp
                 http('<input type="checkbox" name="cb_all" value="Unselect All" checked="checked" onclick="selectAllCheckboxes(this, \'cb_item\'); "/>');
               ?>
@@ -45,40 +56,33 @@
           </tr>
         </thead>
         <?vsp
-          declare exit handler for SQLSTATE '*' { goto _end;};
+          declare exit handler for SQLSTATE '*' { dbg_obj_print ('', __SQL_MESSAGE); goto _end;};
 
           declare N integer;
-          declare rules, vTags any;
+          declare rules any;
 
-          self.v_tags := '';
+          self.v_tags := vector ();
           rules := user_tag_rules (self.account_id);
-          vTags := tag_document (self.v_txt, 0, rules);
-          for (N := 0; N < length (vTags); N := N + 2)
-            self.v_tags := concat (self.v_tags, ',', vTags[N]);
+          self.v_tags := vector_concat (tag_document (self.v_txt, 0, rules), tag_document (self.v_txt2, 0, rules));
 
-          vTags := tag_document (self.v_txt2, 0, rules);
-          for (N := 0; N < length(vTags); N := N + 2)
-            self.v_tags := concat (self.v_tags, ',', vTags[N]);
-          self.v_tags := trim(self.v_tags, ',');
-
-        _end:
-          if (not is_empty_or_null(self.v_tags)) {
-            vTags := CAL.WA.tags2vector (self.v_tags);
-            for (N := 0; N < length (vTags); N := N + 1) {
+          for (N := 0; N < length (self.v_tags); N := N + 1)
+          {
         ?>
           <tr>
-            <td>
+            <td class="checkbox">
               <?vsp
-                http (sprintf ('<input type="checkbox" name="cb_item" value="%s" checked="checked" onclick="javascript: coloriseRow(getParent(this, \'tr\'), this.checked);"/>', vTags[N]));
+                http (sprintf ('<input type="checkbox" name="cb_item" value="%s" checked="checked" onclick="javascript: coloriseRow(getParent(this, \'tr\'), this.checked);"/>', self.v_tags[N]));
               ?>
             </td>
             <td>
-               <?V vTags[N] ?>
+               <?V self.v_tags[N] ?>
             </td>
           </tr>
         <?vsp
             }
-          } else {
+        _end:
+          if (length (self.v_tags) = 0)
+          {
         ?>
             <tr>
               <td align="center" colspan="2">
@@ -89,20 +93,17 @@
           }
         ?>
       </table>
-      <div class="form-footer">
-        <?vsp
-          http(sprintf('<input type="hidden" name="fld" id="fld" value="%s" />', self.v_field));
-          if (length (self.v_tags))
-            http('<input type="button" name="use" value="Use Selection" onclick="javascript: addCheckedTags(\'fld\', \'cb_item\')" />');
-        ?>
-        <input type="button" name="close" value="Cancel" onclick="javascript: window.close()" />
+      <div style="padding: 0 0 0.5em 0;">
+        <hr />
+        <span onclick="javascript: addCheckedTags('fld', 'cb_item');" class="button"> Add selected</span>
       </div>
       <script type="text/javascript">
         <![CDATA[
           coloriseTable('tags');
 
           var objForm = document.forms['F1'];
-          for (var i = 0; i < objForm.elements.length; i++) {
+          for (var i = 0; i < objForm.elements.length; i++)
+          {
             var o = objForm.elements[i];
             if (o != null && o.type == 'checkbox' && !o.disabled && o.name.indexOf ('cb_item') != -1)
               coloriseRow(getParent(o, 'tr'), o.checked);
diff --git a/appsrc/ODS-Calendar/www/template/popup.vspx b/appsrc/ODS-Calendar/www/template/popup.vspx
index 2d0cac9..d58252e 100644
--- a/appsrc/ODS-Calendar/www/template/popup.vspx
+++ b/appsrc/ODS-Calendar/www/template/popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: popup.vspx,v 1.11.2.7 2010/11/09 20:19:16 source Exp $
+  -  $Id: popup.vspx,v 1.11.2.12 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <html xmlns:v="http://www.openlinksw.com/vspx/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
   <head profile="http://internetalchemy.org/2003/02/profile">
+    <base href="<?V CAL.WA.host_url () || http_path () ?>" /><![CDATA[<!--[if IE]></base><![endif]-->]]>
+    <?vsp
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
+    ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
@@ -52,6 +59,7 @@
         OAT.Loader.load(featureList);
       </script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="js/calendar.js"></script>
       <script type="text/javascript" src="/ods/users_select.js"></script>
       <script type="text/javascript">
@@ -62,23 +70,28 @@
         }
         OAT.MSG.attach(OAT, 'PAGE_LOADED', myInit);
         window.onload = function(){OAT.MSG.send(OAT, 'PAGE_LOADED');};
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
+      		}
+      	}
       </script>
     ]]>
     <title></title>
   </head>
   <body>
     <v:page xmlns:v="http://www.openlinksw.com/vspx/">
-      <vm:variables>
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
         <v:variable persist="0" name="owner_id" type="integer" default="null" />
         <v:variable persist="0" name="account_rights" type="varchar" default="''"/>
         <v:variable persist="0" name="settings" type="any" />
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
         <v:variable persist="0" name="cWeekStarts" type="varchar" default="'m'" />
         <v:variable persist="0" name="cTimeZone" type="integer" default="0" />
         <v:variable persist="0" name="cTimeFormat" type="varchar" default="'e'" />
         <v:variable persist="0" name="cDateFormat" type="varchar" default="'dd.MM.yyyy'" />
-      </vm:variables>
+        <v:variable persist="0" name="cDaylight" type="integer" default="0" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -99,6 +112,7 @@
           self.cTimeZone := CAL.WA.settings_timeZone (self.settings);
           self.cTimeFormat := CAL.WA.settings_timeFormat (self.settings);
           self.cDateFormat := CAL.WA.settings_dateFormat (self.settings);
+          self.cDaylight := CAL.WA.settings_daylight (self.settings);
         ]]>
       </v:on-init>
 
diff --git a/appsrc/ODS-Calendar/www/template/template.vspx b/appsrc/ODS-Calendar/www/template/template.vspx
index 70d902d..0e75f6f 100644
--- a/appsrc/ODS-Calendar/www/template/template.vspx
+++ b/appsrc/ODS-Calendar/www/template/template.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.vspx,v 1.29.2.14 2010/11/09 20:19:16 source Exp $
+ -  $Id: template.vspx,v 1.29.2.21 2012/03/08 12:14:09 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -40,9 +40,15 @@
       http (sprintf('\n    <link rel="alternate" type="application/atom+xml" title="%V Atom" href="%s" />', domainName, CAL.WA.gems_url (self.domain_id)||'Calendar.atom'));
       http (sprintf('\n    <link rel="alternate" type="application/atomserv+xml" title="%V" href="%s/intro" />', domainName, CAL.WA.atom_lpath2 (self.domain_id)));
       http (sprintf('\n    <link rel="alternate" type="text/calendar" title="%V" href="%s/gems/calendar.ics" />', domainName, CAL.WA.domain_sioc_url (self.domain_id)));
+      http (sprintf('\n    <link rel="alternate" type="text/icalendar" title="%V CalDAV" href="%s" />', domainName, CAL.WA.domain_calDav_url (self.domain_id)));
       http (CAL.WA.geo_url (self.domain_id, self.account_id));
+
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
     ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta name="dc.description" content="<?V CAL.WA.utf2wide (CAL.WA.domain_description (self.domain_id)) ?>" />
     <meta name="dc.title" content="<?V CAL.WA.utf2wide (CAL.WA.domain_description (self.domain_id)) ?>" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
@@ -62,15 +68,11 @@
           connectionHeaders: {Authorization: '<?V CAL.WA.account_basicAuthorization (self.account_id) ?>'}
         };
         
-      	/* load stylesheets */
-      	OAT.Style.include("grid.css");
-      	OAT.Style.include("webdav.css");
-      	OAT.Style.include("winms.css");
-
         var featureList=["ajax", "json", "anchor", "dialog", "color", "calendar"];
         OAT.Loader.load(featureList);
     </script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="/ods/app.js"></script>
       <script type="text/javascript" src="/ods/validate.js"></script>
       <script type="text/javascript" src="js/calendar.js"></script>
@@ -81,17 +83,13 @@
         var aboutDialog;
       	
         function myInit() {
-          if (!OAT._loaded) {
+          if (!OAT._loaded || !OAT.Dialog) {
             setTimeout(myInit, 50);
             return;
           }
           CAL.weekStartDay = '<?V self.cWeekStarts ?>';
           CAL.dateFormat = '<?V self.cDateFormat ?>';
 
-          // <a>++
-          OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-          OAT.Anchor.zIndex = 1001;
-        
           if (<?V cast (get_keyword ('app', self.settings, '0') as integer) ?> > 0)
             generateAPP('app_area', {appActivation: "<?V case when cast (get_keyword ('app', self.settings, '1') as integer) = 2 then 'hover' else 'click' end ?>"});
             
@@ -140,10 +138,12 @@
         <v:variable persist="0" name="owner_id" type="integer" default="null" />
       <v:variable persist="0" name="account_rights" type="varchar" default="''" />
         <v:variable persist="0" name="settings" type="any" />
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:variable persist="0" name="cWeekStarts" type="varchar" default="'m'" />
       <v:variable persist="0" name="cTimeZone" type="integer" default="0" />
       <v:variable persist="0" name="cTimeFormat" type="varchar" default="'e'" />
       <v:variable persist="0" name="cDateFormat" type="varchar" default="'dd.MM.yyyy'" />
+      <v:variable persist="0" name="cDaylight" type="integer" default="0" />
       <v:on-init>
         <![CDATA[
           declare tmp any;
@@ -170,6 +170,7 @@
           self.cTimeZone := CAL.WA.settings_timeZone (self.settings);
           self.cTimeFormat := CAL.WA.settings_timeFormat (self.settings);
           self.cDateFormat := CAL.WA.settings_dateFormat (self.settings);
+          self.cDaylight := CAL.WA.settings_daylight (self.settings);
 
           self.vc_add_attribute ('xmlns:foaf', 'http://xmlns.com/foaf/0.1/');
           self.vc_add_attribute ('xmlns:dc', 'http://purl.org/dc/elements/1.1/');
diff --git a/appsrc/ODS-Calendar/www/template/template.xsl b/appsrc/ODS-Calendar/www/template/template.xsl
index 9d5490f..3c338d5 100644
--- a/appsrc/ODS-Calendar/www/template/template.xsl
+++ b/appsrc/ODS-Calendar/www/template/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.xsl,v 1.38.2.10 2010/11/09 20:19:16 source Exp $
+ -  $Id: template.xsl,v 1.38.2.12 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -430,73 +430,64 @@
   <!--=========================================================================-->
   <xsl:template match="vm:ds-navigation">
     <?vsp
-      {
         declare n_start, n_end, n_total integer;
+      declare ds vspx_data_set;
 
-        if (isnull (control.ds_data_source))
+      ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
+      if (isnull (ds.ds_data_source))
         {
-          n_total := control.ds_rows_total;
-          n_start := control.ds_rows_offs + 1;
-          n_end   := n_start + control.ds_nrows - 1;
+        n_total := ds.ds_rows_total;
+        n_start := ds.ds_rows_offs + 1;
+        n_end   := n_start + ds.ds_nrows - 1;
         } else {
-        n_total := control.ds_data_source.ds_total_rows;
-        n_start := control.ds_data_source.ds_rows_offs + 1;
-        n_end   := n_start + control.ds_data_source.ds_rows_fetched - 1;
+        n_total := ds.ds_data_source.ds_total_rows;
+        n_start := ds.ds_data_source.ds_rows_offs + 1;
+        n_end   := n_start + ds.ds_data_source.ds_rows_fetched - 1;
         }
         if (n_end > n_total)
           n_end := n_total;
 
         if (n_total)
-          http (sprintf ('%d - %d of %d', n_start, n_end, n_total));
+        http (sprintf ('Showing %d - %d of %d', n_start, n_end, n_total));
 
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first integer;
+      declare _prev, _next vspx_button;
 
-        d_prev := d_next := d_last := d_first := 0;
-        _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-        _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
         _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
         _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (not (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled))
-        {
+      if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
           http (' | ');
-        if (_first is not null and not _first.vc_enabled)
-          d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-          d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-          d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-          d_last := 1;
-        }
     ?>
-    <?vsp
-      if (d_first)
-        http ('<img src="/ods/images/skin/pager/p_first_gr.png" alt="First Page" title="First Page" border="0" />first ');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="/ods/images/skin/pager/p_first.png" xhtml_alt="First" text="first&nbsp;" />
-    <?vsp
-      if (d_prev)
-        http ('<img src="/ods/images/skin/pager/p_prev_gr.png" alt="Previous Page" title="Previous Page" border="0" />prev ');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="/ods/images/skin/pager/p_prev.png" xhtml_alt="Previous" text="prev&nbsp;" />
-    <?vsp
-      if (d_next)
-        http ('<img src="/ods/images/skin/pager/p_next_gr.png" alt="Next Page" title="Next Page" border="0" />next ');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="/ods/images/skin/pager/p_next.png" xhtml_alt="Next" text="next&nbsp;" />
-    <?vsp
-      if (d_last)
-        http ('<img src="/ods/images/skin/pager/p_last_gr.png" alt="Last Page" title="Last Page" border="0" />last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="/ods/images/skin/pager/p_last.png" xhtml_alt="Last" text="last" />
-    <?vsp
-      }
-    ?>
+    <v:button name="{@data-set}_first" action="simple" style="url" value="" xhtml_alt="First" xhtml_class="navi-button" >
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/> First ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_prev" action="simple" style="url" value="" xhtml_alt="Previous" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/> Prev ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_next" action="simple" style="url" value="" xhtml_alt="Next" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/> Next ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_last" action="simple" style="url" value="" xhtml_alt="Last" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/> Last ';
+        ]]>
+      </v:before-render>
+    </v:button>
   </xsl:template>
 
   <!--=========================================================================-->
diff --git a/appsrc/ODS-Calendar/www/users.vspx b/appsrc/ODS-Calendar/www/users.vspx
deleted file mode 100644
index be67838..0000000
--- a/appsrc/ODS-Calendar/www/users.vspx
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- -
- -  $Id: users.vspx,v 1.2.2.4 2010/11/09 20:19:16 source Exp $
- -
- -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- -  project.
- -
- -  Copyright (C) 1998-2007 OpenLink Software
- -
- -  This project 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; only version 2 of the License, dated June 1991.
- -
- -  This program 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
- -  General Public License for more details.
- -
- -  You should have received a copy of the GNU General Public License along
- -  with this program; if not, write to the Free Software Foundation, Inc.,
- -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- -
--->
-<v:page name="users" decor="template/popup.vspx" style="template/template.xsl" fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      } else if (self.v_order = columnName and self.v_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
-  <v:method name="sortChange" arglist="in columnName varchar">
-    <![CDATA[
-      if (columnName = '')
-        return;
-      self.ds.vc_reset();
-      if (self.v_order = columnName)
-      {
-        self.v_direction := either(equ(self.v_direction, 'asc'), 'desc', 'asc');
-      } else {
-        self.v_direction := 'asc';
-      }
-      self.v_order := columnName;
-    ]]>
-  </v:method>
-
-  <v:method name="isMultiple" arglist="in dst any">
-    <![CDATA[
-      return case when isnull (strstr (self.v_dst, 'm')) then 0 else 1 end;
-    ]]>
-  </v:method>
-
-  <v:before-data-bind>
-    <![CDATA[
-      if (self.v_mode = 'g')
-      {
-        self.v_filter := 'g';
-      }
-      else if (self.v_mode = 'u')
-      {
-        self.v_filter := 'u';
-      }
-    ]]>
-  </v:before-data-bind>
-
-  <vm:pagetitle>Select User/Group</vm:pagetitle>
-
-  <vm:popup_page_wrapper>
-    <vm:variables>
-      <v:variable name="v_params" param-name="params" type="varchar"/>
-      <v:variable name="v_mode" persist="0" param-name="mode" type="varchar" default="'u'"/>
-      <v:variable name="v_filter" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_value" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_mask" persist="0" type="varchar" default="''"/>
-      <v:variable name="v_how" persist="0" type="varchar" default="'1'"/>
-      <v:variable name="v_order" persist="0" type="varchar" default="'U_NAME'" />
-      <v:variable name="v_direction" persist="0" type="varchar" default="'asc'" />
-      <v:variable name="v_src" persist="0" param-name="src" type="varchar" default="''" />
-      <v:variable name="v_dst" persist="0" param-name="dst" type="varchar" default="'sc'" />
-      <v:variable name="v_s1" persist="0" param-name="s1" type="varchar" default="''" />
-      <v:variable name="v_s2" persist="0" param-name="s2" type="varchar" default="''" />
-    </vm:variables>
-    <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s"/>', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s"/>', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="form"  id="form"  value="%s"/>', get_keyword('form', self.vc_page.vc_event.ve_params, 'F1'))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="src"   id="src"   value="%s"/>', get_keyword('src', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="dst"   id="dst"   value="%s"/>', get_keyword('dst', self.vc_page.vc_event.ve_params, 'sc'))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s1"    id="s1"    value="%s"/>', get_keyword('s1', self.vc_page.vc_event.ve_params, ''))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="s2"    id="s2"    value="%s"/>', get_keyword('s2', self.vc_page.vc_event.ve_params, ''))); ?>
-      <v:text name="params" type="hidden" value="--self.v_params"/>
-      <div class="boxHeader">
-        Show
-        <v:select-list name="filter" value="--self.v_filter" enabled="-- case when (self.v_mode = '') then 1 else 0 end">
-          <v:item name="Users & Groups" value="" />
-          <v:item name="Users" value="u" />
-          <v:item name="Groups" value="g" />
-        </v:select-list>
-        <v:select-list name="how" value="--self.v_how">
-          <v:item name="Starting with" value="1" />
-          <v:item name="Containing" value="2" />
-          <v:item name="Ending with" value="3" />
-          <v:item name="Exact match" value="4" />
-        </v:select-list>
-        <v:text name="value" value="--self.v_value" xhtml_size="15"/>
-        <v:button action="simple" value="Filter" xhtml_class="button">
-          <v:on-post>
-            <![CDATA[
-              self.v_filter := get_keyword('filter', self.vc_page.vc_event.ve_params, self.v_filter);
-              self.v_how := self.how.ufl_value;
-              self.v_value := trim(self.value.ufl_value);
-              self.vc_data_bind (e);
-            ]]>
-          </v:on-post>
-        </v:button>
-        <v:button name="reset" action="simple" value="Clear" xhtml_class="button">
-          <v:on-post>
-            <![CDATA[
-              self.v_how := '1';
-              self.v_value := '';
-              self.vc_data_bind (e);
-            ]]>
-          </v:on-post>
-        </v:button>
-      </div>
-      <v:data-source name="dsrc" expression-type="sql" nrows="0" initial-offset="0">
-        <v:before-data-bind>
-          <![CDATA[
-            declare user_sql, group_sql varchar;
-
-            control.ds_nrows := CAL.WA.settings_rows (self.settings);
-
-            self.v_mask := case self.v_how
-                             when '1' then self.v_value || '%'
-                             when '2' then '%' || self.v_value || '%'
-                             when '3' then '%' || self.v_value
-                             else self.v_value
-                           end;
-            if (self.v_mask = '')
-              self.v_mask := '%';
-            self.v_mask := replace(self.v_mask, '%%', '%');
-
-            group_sql := '';
-            user_sql := sprintf('select ''User'' U_TYPE, U_NAME, coalesce(U_FULL_NAME, \'\') U_FULL_NAME from WS.WS.SYS_DAV_USER where (U_ACCOUNT_DISABLED=0) and (upper(U_NAME) like upper(\'%s\') and (U_ID<>5) and (U_ID<>6) and (U_ID<>%d))', self.v_mask, self.account_id);
-            if (user_sql = '')
-            {
-              control.ds_sql := group_sql;
-            } else if (group_sql = '') {
-              control.ds_sql := user_sql;
-            } else {
-              control.ds_sql := concat('select U_TYPE, U_NAME, U_FULL_NAME from (', user_sql, ' union ' , group_sql, ') x ');
-            }
-            self.sortChange(get_keyword('sortColumn', e.ve_params, ''));
-            control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
-          ]]>
-        </v:before-data-bind>
-      </v:data-source>
-      <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
-        <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="users" class="CAL_grid" cellspacing="0">
-            <thead class="sortHeader">
-              <tr>
-                <vm:if test="self.isMultiple(self.v_dst)">
-                  <th class="checkbox" width="1%">
-                    <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item'); updateChecked(this, 'cb_item'); "/>
-                  </th>
-                </vm:if>
-                <vm:if test="self.v_mode = ''">
-                  <th>
-                    Type
-                  </th>
-                </vm:if>
-                <th>
-                  <?vsp self.sortColumn('Name', 'U_NAME'); ?>
-                </th>
-                <th>
-                  <?vsp self.sortColumn('Description', 'U_FULL_NAME'); ?>
-                </th>
-              </tr>
-            </thead>
-          </table>
-        </v:template>
-
-        <v:template name="ds_repeat" type="repeat" name-to-remove="" set-to-remove="">
-
-          <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
-            <table>
-              <tr align="center">
-                <?vsp http(sprintf('<td colspan="%d">No records</td>', either(equ(self.v_mode,''),4,3))); ?>
-              </tr>
-            </table>
-          </v:template>
-
-          <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
-            <table>
-              <tr onclick="rowSelected(this);" class="pointer">
-                <vm:if test="self.isMultiple(self.v_dst)">
-                  <td  align="center">
-                    <?vsp
-                      declare S, name any;
-
-                      name := (control as vspx_row_template).te_column_value('U_NAME');
-                      S := case when isnull (strstr(self.v_s1, concat(name, ','))) then '' else 'checked="checked"' end;
-                      http (sprintf ('<input type="checkbox" name="cb_item" value="%s" %s onclick="javascript: updateChecked(this, ''cb_item'', event); " />', name, S));
-                    ?>
-                  </td>
-                </vm:if>
-                <vm:if test="self.v_mode = ''">
-                  <td nowrap="nowrap">
-                    <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_TYPE')" format="%s"/>
-                  </td>
-                </vm:if>
-                <td nowrap="nowrap">
-                  <input name="s1_item" type="hidden" value="<?V (control as vspx_row_template).te_column_value('U_NAME') ?>" />
-                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_NAME')" format="%s"/>
-                </td>
-                <td nowrap="nowrap">
-                  <input name="s2_item" type="hidden" value="<?V (control as vspx_row_template).te_column_value('U_FULL_NAME') ?>" />
-                  <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')" format="%s"/>
-                </td>
-              </tr>
-            </table>
-          </v:template>
-
-        </v:template>
-
-        <v:template type="simple" name-to-remove="table" set-to-remove="top">
-          <table>
-          </table>
-        </v:template>
-
-      </v:data-set>
-      <vm:if test="self.isMultiple(self.v_dst)">
-        <div style="padding: 0 0 0.5em 0;">
-          <hr />
-          <a href="#" onclick="javascript: addChecked(document.forms['F1'], 'cb_item', 'No users were selected for addition.');" class="button2">&nbsp;Add selected</a>
-        </div>
-      </vm:if>
-      <script>
-        <![CDATA[
-          coloriseTable('users');
-        ]]>
-      </script>
-    </vm:pagebody>
-  </vm:popup_page_wrapper>
-</v:page>
diff --git a/appsrc/ODS-Calendar/xslt/rss2atom.xsl b/appsrc/ODS-Calendar/xslt/rss2atom.xsl
index e998236..b5c19ef 100644
--- a/appsrc/ODS-Calendar/xslt/rss2atom.xsl
+++ b/appsrc/ODS-Calendar/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.2.2.2 2010/09/20 10:15:04 source Exp $
+ -  $Id: rss2atom.xsl,v 1.2.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/xslt/rss2atom03.xsl b/appsrc/ODS-Calendar/xslt/rss2atom03.xsl
index fff9714..6d8e77f 100644
--- a/appsrc/ODS-Calendar/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-Calendar/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.2.2.1 2010/09/20 10:15:04 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/xslt/rss2rdf.xsl b/appsrc/ODS-Calendar/xslt/rss2rdf.xsl
index 84757c1..44386dd 100644
--- a/appsrc/ODS-Calendar/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-Calendar/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: rss2rdf.xsl,v 1.2.2.1 2010/09/20 10:15:04 source Exp $
+  -  $Id: rss2rdf.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Calendar/xslt/rss2xbel.xsl b/appsrc/ODS-Calendar/xslt/rss2xbel.xsl
index d03224d..fa079c2 100644
--- a/appsrc/ODS-Calendar/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-Calendar/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
-  -  $Id: rss2xbel.xsl,v 1.1.2.1 2010/09/20 10:15:04 source Exp $
+  -  $Id: rss2xbel.xsl,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/Makefile.am b/appsrc/ODS-Community/Makefile.am
index 4522f5a..a76d9fa 100644
--- a/appsrc/ODS-Community/Makefile.am
+++ b/appsrc/ODS-Community/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -48,6 +48,7 @@ EXTRA_DIST = \
 	sql/*.sql \
 	sql/install.bat \
 	sql/uninstall.bat \
+	vad_version \
 	www-root/*.vsp \
 	www-root/*.vspx \
 	www-root/public/*.html \
diff --git a/appsrc/ODS-Community/Makefile.in b/appsrc/ODS-Community/Makefile.in
index ba2502c..a340a84 100644
--- a/appsrc/ODS-Community/Makefile.in
+++ b/appsrc/ODS-Community/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -311,6 +313,7 @@ EXTRA_DIST = \
 	sql/*.sql \
 	sql/install.bat \
 	sql/uninstall.bat \
+	vad_version \
 	www-root/*.vsp \
 	www-root/*.vspx \
 	www-root/public/*.html \
diff --git a/appsrc/ODS-Community/make_vad.sh b/appsrc/ODS-Community/make_vad.sh
index 8123297..70b833b 100755
--- a/appsrc/ODS-Community/make_vad.sh
+++ b/appsrc/ODS-Community/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.14.2.3 2011/02/03 10:26:14 source Exp $
+#  $Id: make_vad.sh,v 1.14.2.5 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -28,8 +28,9 @@ LANG=C
 LC_ALL=POSIX
 export LANG LC_ALL
 
+
 LOGDIR=`pwd`
-VERSION="0.0.996"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/make_vad.log"
 STICKER="make_vad.xml"
 PACKDATE=`date +"%Y-%m-%d %H:%M"`
@@ -58,11 +59,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -85,16 +81,58 @@ else
   myrm=$RM
 fi
 
-VERSION_INIT() 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init() 
 {
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
   rm -f version.tmp
-  for i in `find . -name 'Entries' | grep -v "vad/"`; do
-        cat $i | grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
   done
-  VERSION=`cat version.tmp | awk ' BEGIN { cnt=100 } { cnt = cnt + $1 } END { printf "1.%02.02f", cnt/100 }'`
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
   rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
 }
 
+
 virtuoso_start() {
   echo "Starting $SERVER"
   ddate=`date`
@@ -225,7 +263,7 @@ sticker_init() {
   echo "  <name package=\"Community\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Community\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -370,7 +408,7 @@ echo '------------------------'
 
 STOP_SERVER
 directory_clean
-VERSION_INIT
+version_init
 directory_init
 virtuoso_init
 sticker_init
@@ -378,7 +416,6 @@ vad_create
 virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_community_dav.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -388,5 +425,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Community/sql/exec_no_error.sql b/appsrc/ODS-Community/sql/exec_no_error.sql
index 0b0d0e3..293dced 100644
--- a/appsrc/ODS-Community/sql/exec_no_error.sql
+++ b/appsrc/ODS-Community/sql/exec_no_error.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: exec_no_error.sql,v 1.3.2.1 2010/09/20 10:15:04 source Exp $
+--  $Id: exec_no_error.sql,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/install.bat b/appsrc/ODS-Community/sql/install.bat
index 5e42f94..be6c75e 100644
--- a/appsrc/ODS-Community/sql/install.bat
+++ b/appsrc/ODS-Community/sql/install.bat
@@ -1,11 +1,11 @@
 @echo off
 rem
-rem  $Id: install.bat,v 1.2.2.1 2010/09/20 10:15:05 source Exp $
+rem  $Id: install.bat,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
 rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/procedures.sql b/appsrc/ODS-Community/sql/procedures.sql
index 8fc1fc6..0ce8f00 100644
--- a/appsrc/ODS-Community/sql/procedures.sql
+++ b/appsrc/ODS-Community/sql/procedures.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: procedures.sql,v 1.11.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: procedures.sql,v 1.11.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/run_install.sql b/appsrc/ODS-Community/sql/run_install.sql
index 227ccfe..d7a7f0c 100644
--- a/appsrc/ODS-Community/sql/run_install.sql
+++ b/appsrc/ODS-Community/sql/run_install.sql
@@ -1,10 +1,10 @@
 --
---  $Id: run_install.sql,v 1.3.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: run_install.sql,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/run_uninstall.sql b/appsrc/ODS-Community/sql/run_uninstall.sql
index d1428a8..4939f74 100644
--- a/appsrc/ODS-Community/sql/run_uninstall.sql
+++ b/appsrc/ODS-Community/sql/run_uninstall.sql
@@ -1,10 +1,10 @@
 --
---  $Id: run_uninstall.sql,v 1.3.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: run_uninstall.sql,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/sioc_xd.sql b/appsrc/ODS-Community/sql/sioc_xd.sql
index fc1d0c1..bb50fa2 100644
--- a/appsrc/ODS-Community/sql/sioc_xd.sql
+++ b/appsrc/ODS-Community/sql/sioc_xd.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_xd.sql,v 1.7.2.2 2010/09/20 10:15:05 source Exp $
+--  $Id: sioc_xd.sql,v 1.7.2.3 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/tables.sql b/appsrc/ODS-Community/sql/tables.sql
index 99847ca..8231b3b 100644
--- a/appsrc/ODS-Community/sql/tables.sql
+++ b/appsrc/ODS-Community/sql/tables.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables.sql,v 1.5.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: tables.sql,v 1.5.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/uninstall.bat b/appsrc/ODS-Community/sql/uninstall.bat
index a6fc51d..b233cef 100644
--- a/appsrc/ODS-Community/sql/uninstall.bat
+++ b/appsrc/ODS-Community/sql/uninstall.bat
@@ -1,11 +1,11 @@
 @echo off
 rem
-rem  $Id: uninstall.bat,v 1.2.2.1 2010/09/20 10:15:05 source Exp $
+rem  $Id: uninstall.bat,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
 rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/sql/wa_install.sql b/appsrc/ODS-Community/sql/wa_install.sql
index 57899fa..88a4dde 100644
--- a/appsrc/ODS-Community/sql/wa_install.sql
+++ b/appsrc/ODS-Community/sql/wa_install.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_install.sql,v 1.10.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: wa_install.sql,v 1.10.2.3 2012/03/08 11:46:01 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -743,6 +743,14 @@ create method apply_custom_settings ( in template_path varchar, in logoimg_path
   where
     CI_COMMUNITY_ID = self.wa_name;
 
+--  update ODS.COMMUNITY.SYS_COMMUNITY_INFO
+--  set
+--    CI_TEMPLATE=template_path ,
+--    CI_CSS=template_path ||'/default.css'
+--  where
+--    CI_COMMUNITY_ID = self.wa_name;
+
+
   return;
 };
 
diff --git a/appsrc/ODS-Community/sql/wa_uninstall.sql b/appsrc/ODS-Community/sql/wa_uninstall.sql
index b0c8bb0..7ae2936 100644
--- a/appsrc/ODS-Community/sql/wa_uninstall.sql
+++ b/appsrc/ODS-Community/sql/wa_uninstall.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_uninstall.sql,v 1.3.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: wa_uninstall.sql,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/vad_version b/appsrc/ODS-Community/vad_version
new file mode 100644
index 0000000..773e9fd
--- /dev/null
+++ b/appsrc/ODS-Community/vad_version
@@ -0,0 +1 @@
+1.8.46
diff --git a/appsrc/ODS-Community/www-root/index.vsp b/appsrc/ODS-Community/www-root/index.vsp
index ee3fd4b..c345b8c 100644
--- a/appsrc/ODS-Community/www-root/index.vsp
+++ b/appsrc/ODS-Community/www-root/index.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: index.vsp,v 1.4.2.1 2010/09/20 10:15:05 source Exp $
+--  $Id: index.vsp,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/index.vspx b/appsrc/ODS-Community/www-root/index.vspx
index 37dbbc5..fea4f42 100644
--- a/appsrc/ODS-Community/www-root/index.vspx
+++ b/appsrc/ODS-Community/www-root/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.3.2.1 2010/09/20 10:15:05 source Exp $
+ -  $Id: index.vspx,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/public/aboutcommunity.html b/appsrc/ODS-Community/www-root/public/aboutcommunity.html
index fbb565e..66800f7 100644
--- a/appsrc/ODS-Community/www-root/public/aboutcommunity.html
+++ b/appsrc/ODS-Community/www-root/public/aboutcommunity.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: aboutcommunity.html,v 1.2.2.1 2010/09/20 10:15:05 source Exp $
+ -  $Id: aboutcommunity.html,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/public/css/default.css b/appsrc/ODS-Community/www-root/public/css/default.css
index 252d7f2..4c5385d 100644
--- a/appsrc/ODS-Community/www-root/public/css/default.css
+++ b/appsrc/ODS-Community/www-root/public/css/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.9.2.1 2010/09/20 10:15:05 source Exp $
+ *  $Id: default.css,v 1.9.2.2 2012/03/08 10:46:16 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/public/images/lightblue/myopenlink.css b/appsrc/ODS-Community/www-root/public/images/lightblue/myopenlink.css
index 8e7c733..8d92340 100644
--- a/appsrc/ODS-Community/www-root/public/images/lightblue/myopenlink.css
+++ b/appsrc/ODS-Community/www-root/public/images/lightblue/myopenlink.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: myopenlink.css,v 1.2.2.1 2010/09/20 10:15:05 source Exp $
+ *  $Id: myopenlink.css,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/public/js/map_control.js b/appsrc/ODS-Community/www-root/public/js/map_control.js
index 35a9924..d19159d 100644
--- a/appsrc/ODS-Community/www-root/public/js/map_control.js
+++ b/appsrc/ODS-Community/www-root/public/js/map_control.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: map_control.js,v 1.3.2.1 2010/09/20 10:15:06 source Exp $
+ *  $Id: map_control.js,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/app_inst.vspx b/appsrc/ODS-Community/www-root/templates/openlink/app_inst.vspx
index 431ef30..7c0c838 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/app_inst.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/app_inst.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: app_inst.vspx,v 1.10.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: app_inst.vspx,v 1.10.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/default.css b/appsrc/ODS-Community/www-root/templates/openlink/default.css
index 99dac85..d55e90f 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/default.css
+++ b/appsrc/ODS-Community/www-root/templates/openlink/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.9.2.1 2010/09/20 10:15:06 source Exp $
+ *  $Id: default.css,v 1.9.2.2 2012/03/08 10:46:16 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/errors.vspx b/appsrc/ODS-Community/www-root/templates/openlink/errors.vspx
index 5ca605f..1075dac 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/errors.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/errors.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: errors.vspx,v 1.4.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: errors.vspx,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/index.vspx b/appsrc/ODS-Community/www-root/templates/openlink/index.vspx
index c92ed44..018f043 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/index.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: index.vspx,v 1.12.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: index.vspx,v 1.12.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/login.vspx b/appsrc/ODS-Community/www-root/templates/openlink/login.vspx
index 6c1c2b3..6fb3f9e 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/login.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: login.vspx,v 1.3.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: login.vspx,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/logout.vspx b/appsrc/ODS-Community/www-root/templates/openlink/logout.vspx
index 2b35468..e863f59 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/logout.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/logout.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logout.vspx,v 1.3.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: logout.vspx,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/settings.vspx b/appsrc/ODS-Community/www-root/templates/openlink/settings.vspx
index d9a840a..a651774 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/settings.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: settings.vspx,v 1.6.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: settings.vspx,v 1.6.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/settings_app.vspx b/appsrc/ODS-Community/www-root/templates/openlink/settings_app.vspx
index 239edf1..ef4cb33 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/settings_app.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/settings_app.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: settings_app.vspx,v 1.9.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: settings_app.vspx,v 1.9.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/templates/openlink/wa_maps.vspx b/appsrc/ODS-Community/www-root/templates/openlink/wa_maps.vspx
index 0d0c232..5e15d3a 100644
--- a/appsrc/ODS-Community/www-root/templates/openlink/wa_maps.vspx
+++ b/appsrc/ODS-Community/www-root/templates/openlink/wa_maps.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: wa_maps.vspx,v 1.9.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: wa_maps.vspx,v 1.9.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/widgets/app_inst_menu.xsl b/appsrc/ODS-Community/www-root/widgets/app_inst_menu.xsl
index def1810..d8a0f71 100644
--- a/appsrc/ODS-Community/www-root/widgets/app_inst_menu.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/app_inst_menu.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: app_inst_menu.xsl,v 1.4.2.1 2010/09/20 10:15:06 source Exp $
+ -  $Id: app_inst_menu.xsl,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/widgets/apply_custom_settings.xsl b/appsrc/ODS-Community/www-root/widgets/apply_custom_settings.xsl
index dbd3151..33cba72 100644
--- a/appsrc/ODS-Community/www-root/widgets/apply_custom_settings.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/apply_custom_settings.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: apply_custom_settings.xsl,v 1.1.2.1 2010/09/20 10:15:07 source Exp $
+ -  $Id: apply_custom_settings.xsl,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/widgets/dashboard.xsl b/appsrc/ODS-Community/www-root/widgets/dashboard.xsl
index b03b548..7fea2d3 100644
--- a/appsrc/ODS-Community/www-root/widgets/dashboard.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/dashboard.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dashboard.xsl,v 1.7.2.1 2010/09/20 10:15:07 source Exp $
+ -  $Id: dashboard.xsl,v 1.7.2.3 2012/03/08 11:46:01 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -539,6 +539,7 @@
          declare inst_url_local varchar;
          inst_url_local :='not specified';
          inst_url_local := wa_expand_url ((select top 1 WAM_HOME_PAGE from WA_MEMBER where WAM_INST=inst_name), self.login_pars);
+--         inst_url_local:=wa_expand_url (sprintf('/dataspace/%V/%s/%U',uname,app_dataspace,inst_name_org), self.login_pars);
 
          declare insttype_from_xsl varchar;
          insttype_from_xsl:='';
diff --git a/appsrc/ODS-Community/www-root/widgets/error.xsl b/appsrc/ODS-Community/www-root/widgets/error.xsl
index aeec633..0faed86 100644
--- a/appsrc/ODS-Community/www-root/widgets/error.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/error.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: error.xsl,v 1.4.2.1 2010/09/20 10:15:07 source Exp $
+ -  $Id: error.xsl,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/widgets/main.xsl b/appsrc/ODS-Community/www-root/widgets/main.xsl
index f2b8808..af585e9 100644
--- a/appsrc/ODS-Community/www-root/widgets/main.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/main.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: main.xsl,v 1.21.2.2 2010/09/20 10:15:07 source Exp $
+ -  $Id: main.xsl,v 1.21.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/widgets/map_control.xsl b/appsrc/ODS-Community/www-root/widgets/map_control.xsl
index a9edb25..308edc4 100644
--- a/appsrc/ODS-Community/www-root/widgets/map_control.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/map_control.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: map_control.xsl,v 1.5.2.1 2010/09/20 10:15:07 source Exp $
+ -  $Id: map_control.xsl,v 1.5.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Community/www-root/widgets/template_check.xsl b/appsrc/ODS-Community/www-root/widgets/template_check.xsl
index 9223985..cc97651 100644
--- a/appsrc/ODS-Community/www-root/widgets/template_check.xsl
+++ b/appsrc/ODS-Community/www-root/widgets/template_check.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: template_check.xsl,v 1.2.2.1 2010/09/20 10:15:07 source Exp $
+ -  $Id: template_check.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/DET_nntp.sql b/appsrc/ODS-Discussion/DET_nntp.sql
index 0fea09b..f2b4877 100644
--- a/appsrc/ODS-Discussion/DET_nntp.sql
+++ b/appsrc/ODS-Discussion/DET_nntp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: DET_nntp.sql,v 1.1.2.1 2010/09/20 10:15:07 source Exp $
+--  $Id: DET_nntp.sql,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/Makefile.am b/appsrc/ODS-Discussion/Makefile.am
index be5c7b5..2994495 100644
--- a/appsrc/ODS-Discussion/Makefile.am
+++ b/appsrc/ODS-Discussion/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/Makefile.in b/appsrc/ODS-Discussion/Makefile.in
index ea9e243..aaf91d8 100644
--- a/appsrc/ODS-Discussion/Makefile.in
+++ b/appsrc/ODS-Discussion/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/appsrc/ODS-Discussion/attachment.vsp b/appsrc/ODS-Discussion/attachment.vsp
index d18476c..b3a737a 100644
--- a/appsrc/ODS-Discussion/attachment.vsp
+++ b/appsrc/ODS-Discussion/attachment.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: attachment.vsp,v 1.2.2.1 2010/09/20 10:15:07 source Exp $
+--  $Id: attachment.vsp,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/adv_srh.xsl b/appsrc/ODS-Discussion/comp/adv_srh.xsl
index d0fd5bd..6ba2b7d 100644
--- a/appsrc/ODS-Discussion/comp/adv_srh.xsl
+++ b/appsrc/ODS-Discussion/comp/adv_srh.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: adv_srh.xsl,v 1.5.2.1 2010/09/20 10:15:11 source Exp $
+ -  $Id: adv_srh.xsl,v 1.5.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/attach.xsl b/appsrc/ODS-Discussion/comp/attach.xsl
index bb83562..4e548f6 100644
--- a/appsrc/ODS-Discussion/comp/attach.xsl
+++ b/appsrc/ODS-Discussion/comp/attach.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: attach.xsl,v 1.6.2.1 2010/09/20 10:15:11 source Exp $
+ -  $Id: attach.xsl,v 1.6.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/common.xsl b/appsrc/ODS-Discussion/comp/common.xsl
index efe9f68..af21fa4 100644
--- a/appsrc/ODS-Discussion/comp/common.xsl
+++ b/appsrc/ODS-Discussion/comp/common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: common.xsl,v 1.2.2.1 2010/09/20 10:15:11 source Exp $
+ -  $Id: common.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/dialog.xsl b/appsrc/ODS-Discussion/comp/dialog.xsl
index 91bc3bb..8553a69 100644
--- a/appsrc/ODS-Discussion/comp/dialog.xsl
+++ b/appsrc/ODS-Discussion/comp/dialog.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dialog.xsl,v 1.1.2.1 2010/09/20 10:15:11 source Exp $
+ -  $Id: dialog.xsl,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/group_list.xsl b/appsrc/ODS-Discussion/comp/group_list.xsl
index ef96c7b..24020bd 100644
--- a/appsrc/ODS-Discussion/comp/group_list.xsl
+++ b/appsrc/ODS-Discussion/comp/group_list.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: group_list.xsl,v 1.13.2.3 2010/09/20 10:15:11 source Exp $
+ -  $Id: group_list.xsl,v 1.13.2.4 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/group_view.xsl b/appsrc/ODS-Discussion/comp/group_view.xsl
index 72d6acb..dd6ba5a 100644
--- a/appsrc/ODS-Discussion/comp/group_view.xsl
+++ b/appsrc/ODS-Discussion/comp/group_view.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: group_view.xsl,v 1.9.2.4 2010/09/20 10:15:11 source Exp $
+ -  $Id: group_view.xsl,v 1.9.2.5 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/login.xsl b/appsrc/ODS-Discussion/comp/login.xsl
index 17c631e..4eb0871 100644
--- a/appsrc/ODS-Discussion/comp/login.xsl
+++ b/appsrc/ODS-Discussion/comp/login.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: login.xsl,v 1.3.2.1 2010/09/20 10:15:11 source Exp $
+ -  $Id: login.xsl,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/menubar.xsl b/appsrc/ODS-Discussion/comp/menubar.xsl
index 04726d7..4681eca 100644
--- a/appsrc/ODS-Discussion/comp/menubar.xsl
+++ b/appsrc/ODS-Discussion/comp/menubar.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: menubar.xsl,v 1.10.2.2 2010/09/20 10:15:11 source Exp $
+ -  $Id: menubar.xsl,v 1.10.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/nntp_cal.xsl b/appsrc/ODS-Discussion/comp/nntp_cal.xsl
index dab3a4a..c7a0cdf 100644
--- a/appsrc/ODS-Discussion/comp/nntp_cal.xsl
+++ b/appsrc/ODS-Discussion/comp/nntp_cal.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntp_cal.xsl,v 1.6.2.3 2010/09/20 10:15:12 source Exp $
+ -  $Id: nntp_cal.xsl,v 1.6.2.4 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/nntpf_tags.xsl b/appsrc/ODS-Discussion/comp/nntpf_tags.xsl
index 33321ba..1b42155 100644
--- a/appsrc/ODS-Discussion/comp/nntpf_tags.xsl
+++ b/appsrc/ODS-Discussion/comp/nntpf_tags.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: nntpf_tags.xsl,v 1.5.2.4 2010/09/20 10:15:12 source Exp $
+ -  $Id: nntpf_tags.xsl,v 1.5.2.5 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/page.xsl b/appsrc/ODS-Discussion/comp/page.xsl
index 141afe0..e50b3f3 100644
--- a/appsrc/ODS-Discussion/comp/page.xsl
+++ b/appsrc/ODS-Discussion/comp/page.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: page.xsl,v 1.16.2.2 2010/09/20 10:15:12 source Exp $
+ -  $Id: page.xsl,v 1.16.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/post.xsl b/appsrc/ODS-Discussion/comp/post.xsl
index 59064ee..23e6841 100644
--- a/appsrc/ODS-Discussion/comp/post.xsl
+++ b/appsrc/ODS-Discussion/comp/post.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: post.xsl,v 1.14.2.2 2010/09/20 10:15:12 source Exp $
+ -  $Id: post.xsl,v 1.14.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/register.xsl b/appsrc/ODS-Discussion/comp/register.xsl
index 1b35200..ab1a031 100644
--- a/appsrc/ODS-Discussion/comp/register.xsl
+++ b/appsrc/ODS-Discussion/comp/register.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: register.xsl,v 1.4.2.1 2010/09/20 10:15:12 source Exp $
+ -  $Id: register.xsl,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/rss_del.xsl b/appsrc/ODS-Discussion/comp/rss_del.xsl
index dccc2f7..3524da8 100644
--- a/appsrc/ODS-Discussion/comp/rss_del.xsl
+++ b/appsrc/ODS-Discussion/comp/rss_del.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss_del.xsl,v 1.1.2.1 2010/09/20 10:15:12 source Exp $
+ -  $Id: rss_del.xsl,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/rss_group.xsl b/appsrc/ODS-Discussion/comp/rss_group.xsl
index d59d3c0..aecb970 100644
--- a/appsrc/ODS-Discussion/comp/rss_group.xsl
+++ b/appsrc/ODS-Discussion/comp/rss_group.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss_group.xsl,v 1.2.2.1 2010/09/20 10:15:12 source Exp $
+ -  $Id: rss_group.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/rss_list.xsl b/appsrc/ODS-Discussion/comp/rss_list.xsl
index 1644e23..3b4959c 100644
--- a/appsrc/ODS-Discussion/comp/rss_list.xsl
+++ b/appsrc/ODS-Discussion/comp/rss_list.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss_list.xsl,v 1.2.2.1 2010/09/20 10:15:12 source Exp $
+ -  $Id: rss_list.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/search.xsl b/appsrc/ODS-Discussion/comp/search.xsl
index c14508c..c80203f 100644
--- a/appsrc/ODS-Discussion/comp/search.xsl
+++ b/appsrc/ODS-Discussion/comp/search.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.xsl,v 1.6.2.1 2010/09/20 10:15:12 source Exp $
+ -  $Id: search.xsl,v 1.6.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/search_res.xsl b/appsrc/ODS-Discussion/comp/search_res.xsl
index 3db1460..c5ce435 100644
--- a/appsrc/ODS-Discussion/comp/search_res.xsl
+++ b/appsrc/ODS-Discussion/comp/search_res.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search_res.xsl,v 1.9.2.1 2010/09/20 10:15:13 source Exp $
+ -  $Id: search_res.xsl,v 1.9.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/settings.xsl b/appsrc/ODS-Discussion/comp/settings.xsl
index 2f52f5a..c272254 100644
--- a/appsrc/ODS-Discussion/comp/settings.xsl
+++ b/appsrc/ODS-Discussion/comp/settings.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: settings.xsl,v 1.2.2.1 2010/09/20 10:15:13 source Exp $
+ -  $Id: settings.xsl,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/thread_view.xsl b/appsrc/ODS-Discussion/comp/thread_view.xsl
index 917dcfc..14a1d41 100644
--- a/appsrc/ODS-Discussion/comp/thread_view.xsl
+++ b/appsrc/ODS-Discussion/comp/thread_view.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: thread_view.xsl,v 1.4.2.1 2010/09/20 10:15:13 source Exp $
+ -  $Id: thread_view.xsl,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/comp/title.xsl b/appsrc/ODS-Discussion/comp/title.xsl
index e4f8169..8a57cf6 100644
--- a/appsrc/ODS-Discussion/comp/title.xsl
+++ b/appsrc/ODS-Discussion/comp/title.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: title.xsl,v 1.3.2.1 2010/09/20 10:15:13 source Exp $
+ -  $Id: title.xsl,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/drop.sql b/appsrc/ODS-Discussion/drop.sql
index f834746..b95e13e 100644
--- a/appsrc/ODS-Discussion/drop.sql
+++ b/appsrc/ODS-Discussion/drop.sql
@@ -1,10 +1,10 @@
 --
---  $Id: drop.sql,v 1.3.2.1 2010/09/20 10:15:07 source Exp $
+--  $Id: drop.sql,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/login.vspx b/appsrc/ODS-Discussion/login.vspx
index 7ecf541..b742b08 100644
--- a/appsrc/ODS-Discussion/login.vspx
+++ b/appsrc/ODS-Discussion/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: login.vspx,v 1.3.2.1 2010/09/20 10:15:07 source Exp $
+ -  $Id: login.vspx,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/mail_notify.sql b/appsrc/ODS-Discussion/mail_notify.sql
index 2bf9031..4b08acf 100644
--- a/appsrc/ODS-Discussion/mail_notify.sql
+++ b/appsrc/ODS-Discussion/mail_notify.sql
@@ -1,10 +1,10 @@
 --
---  $Id: mail_notify.sql,v 1.1.2.1 2010/09/20 10:15:07 source Exp $
+--  $Id: mail_notify.sql,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/main.xsl b/appsrc/ODS-Discussion/main.xsl
index dd0eed6..d956659 100644
--- a/appsrc/ODS-Discussion/main.xsl
+++ b/appsrc/ODS-Discussion/main.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: main.xsl,v 1.3.2.2 2010/09/20 10:15:08 source Exp $
+ -  $Id: main.xsl,v 1.3.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/make_vad.sh b/appsrc/ODS-Discussion/make_vad.sh
index 874b6e2..7ea5a42 100755
--- a/appsrc/ODS-Discussion/make_vad.sh
+++ b/appsrc/ODS-Discussion/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.23.2.5 2011/02/03 10:26:14 source Exp $
+#  $Id: make_vad.sh,v 1.23.2.7 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -57,11 +57,6 @@ TEMPFILE=/tmp/isql.$$
 LN="ln -fs"
 RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -83,8 +78,13 @@ else
   myrm=rm
 fi
 
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
 
-VERSION_INIT() 
+version_init() 
 {
     if [ $VOS -eq 1 ]
     then
@@ -239,7 +239,7 @@ sticker_init() {
   echo "  <name package=\"Discussion\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Discussion\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -407,15 +407,13 @@ vad_create() {
 
 STOP_SERVER
 directory_clean
-VERSION_INIT
+version_init
 directory_init
 virtuoso_init
 sticker_init
 vad_create
 virtuoso_shutdown
 chmod 644 ods_discussion_dav.vad
-directory_clean
-
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -425,5 +423,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Discussion/nntpf.css b/appsrc/ODS-Discussion/nntpf.css
index bd67a4f..4157df6 100644
--- a/appsrc/ODS-Discussion/nntpf.css
+++ b/appsrc/ODS-Discussion/nntpf.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: nntpf.css,v 1.9.2.2 2010/09/20 10:15:08 source Exp $
+ *  $Id: nntpf.css,v 1.9.2.3 2012/03/08 10:46:16 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_addtorss.vspx b/appsrc/ODS-Discussion/nntpf_addtorss.vspx
index f520a4c..23aa72c 100644
--- a/appsrc/ODS-Discussion/nntpf_addtorss.vspx
+++ b/appsrc/ODS-Discussion/nntpf_addtorss.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_addtorss.vspx,v 1.5.2.2 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_addtorss.vspx,v 1.5.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_adv_search.vspx b/appsrc/ODS-Discussion/nntpf_adv_search.vspx
index b7f7cc0..2a16122 100644
--- a/appsrc/ODS-Discussion/nntpf_adv_search.vspx
+++ b/appsrc/ODS-Discussion/nntpf_adv_search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_adv_search.vspx,v 1.3.2.2 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_adv_search.vspx,v 1.3.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_api.sql b/appsrc/ODS-Discussion/nntpf_api.sql
index 94e0550..bbf7fe4 100644
--- a/appsrc/ODS-Discussion/nntpf_api.sql
+++ b/appsrc/ODS-Discussion/nntpf_api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nntpf_api.sql,v 1.4.2.3 2010/09/20 10:15:08 source Exp $
+--  $Id: nntpf_api.sql,v 1.4.2.4 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_browser.vspx b/appsrc/ODS-Discussion/nntpf_browser.vspx
index 7f9940b..977e7af 100644
--- a/appsrc/ODS-Discussion/nntpf_browser.vspx
+++ b/appsrc/ODS-Discussion/nntpf_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_browser.vspx,v 1.2.2.1 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_browser.vspx,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_ddl.sql b/appsrc/ODS-Discussion/nntpf_ddl.sql
index daeaf47..3263d39 100644
--- a/appsrc/ODS-Discussion/nntpf_ddl.sql
+++ b/appsrc/ODS-Discussion/nntpf_ddl.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nntpf_ddl.sql,v 1.3.2.1 2010/09/20 10:15:08 source Exp $
+--  $Id: nntpf_ddl.sql,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_disp_article.vspx b/appsrc/ODS-Discussion/nntpf_disp_article.vspx
index 5ee5e56..ee7fb71 100644
--- a/appsrc/ODS-Discussion/nntpf_disp_article.vspx
+++ b/appsrc/ODS-Discussion/nntpf_disp_article.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_disp_article.vspx,v 1.7.2.1 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_disp_article.vspx,v 1.7.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_edit_rss.vspx b/appsrc/ODS-Discussion/nntpf_edit_rss.vspx
index 9c8cc8a..5660d7d 100644
--- a/appsrc/ODS-Discussion/nntpf_edit_rss.vspx
+++ b/appsrc/ODS-Discussion/nntpf_edit_rss.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_edit_rss.vspx,v 1.5.2.1 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_edit_rss.vspx,v 1.5.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_error.vsp b/appsrc/ODS-Discussion/nntpf_error.vsp
index eb7e694..aa90c2a 100644
--- a/appsrc/ODS-Discussion/nntpf_error.vsp
+++ b/appsrc/ODS-Discussion/nntpf_error.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: nntpf_error.vsp,v 1.3.2.1 2010/09/20 10:15:08 source Exp $
+--  $Id: nntpf_error.vsp,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_error.vspx b/appsrc/ODS-Discussion/nntpf_error.vspx
index 7256f6e..be9bdab 100644
--- a/appsrc/ODS-Discussion/nntpf_error.vspx
+++ b/appsrc/ODS-Discussion/nntpf_error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: nntpf_error.vspx,v 1.2.2.1 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_error.vspx,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,12 +25,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_error.vspx,v 1.2.2.1 2010/09/20 10:15:08 source Exp $
+ -  $Id: nntpf_error.vspx,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_logout.vspx b/appsrc/ODS-Discussion/nntpf_logout.vspx
index c34505e..0178449 100644
--- a/appsrc/ODS-Discussion/nntpf_logout.vspx
+++ b/appsrc/ODS-Discussion/nntpf_logout.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_logout.vspx,v 1.3.2.1 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_logout.vspx,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_main.vspx b/appsrc/ODS-Discussion/nntpf_main.vspx
index f1fc9b0..63deda2 100644
--- a/appsrc/ODS-Discussion/nntpf_main.vspx
+++ b/appsrc/ODS-Discussion/nntpf_main.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_main.vspx,v 1.9.2.1 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_main.vspx,v 1.9.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_nthread_view.vspx b/appsrc/ODS-Discussion/nntpf_nthread_view.vspx
index 2ef3904..eaedfa7 100644
--- a/appsrc/ODS-Discussion/nntpf_nthread_view.vspx
+++ b/appsrc/ODS-Discussion/nntpf_nthread_view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_nthread_view.vspx,v 1.7.2.1 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_nthread_view.vspx,v 1.7.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_odsnewsgroups_admin.vspx b/appsrc/ODS-Discussion/nntpf_odsnewsgroups_admin.vspx
index df80eee..8de3490 100644
--- a/appsrc/ODS-Discussion/nntpf_odsnewsgroups_admin.vspx
+++ b/appsrc/ODS-Discussion/nntpf_odsnewsgroups_admin.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_odsnewsgroups_admin.vspx,v 1.8.2.2 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_odsnewsgroups_admin.vspx,v 1.8.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_post.vspx b/appsrc/ODS-Discussion/nntpf_post.vspx
index a5c321b..85c7fc1 100644
--- a/appsrc/ODS-Discussion/nntpf_post.vspx
+++ b/appsrc/ODS-Discussion/nntpf_post.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_post.vspx,v 1.8.2.1 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_post.vspx,v 1.8.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_preferences.vspx b/appsrc/ODS-Discussion/nntpf_preferences.vspx
index ac608df..4641702 100644
--- a/appsrc/ODS-Discussion/nntpf_preferences.vspx
+++ b/appsrc/ODS-Discussion/nntpf_preferences.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_preferences.vspx,v 1.4.2.1 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_preferences.vspx,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_rss_del.vspx b/appsrc/ODS-Discussion/nntpf_rss_del.vspx
index a64d186..ec0db88 100644
--- a/appsrc/ODS-Discussion/nntpf_rss_del.vspx
+++ b/appsrc/ODS-Discussion/nntpf_rss_del.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_rss_del.vspx,v 1.3.2.2 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_rss_del.vspx,v 1.3.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_rss_group.vspx b/appsrc/ODS-Discussion/nntpf_rss_group.vspx
index 0dd8fc3..ed6d57b 100644
--- a/appsrc/ODS-Discussion/nntpf_rss_group.vspx
+++ b/appsrc/ODS-Discussion/nntpf_rss_group.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_rss_group.vspx,v 1.3.2.2 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_rss_group.vspx,v 1.3.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_rss_list.vspx b/appsrc/ODS-Discussion/nntpf_rss_list.vspx
index 57697df..4f430e6 100644
--- a/appsrc/ODS-Discussion/nntpf_rss_list.vspx
+++ b/appsrc/ODS-Discussion/nntpf_rss_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_rss_list.vspx,v 1.3.2.2 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_rss_list.vspx,v 1.3.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_subs.vspx b/appsrc/ODS-Discussion/nntpf_subs.vspx
index 10536e4..9e1095f 100644
--- a/appsrc/ODS-Discussion/nntpf_subs.vspx
+++ b/appsrc/ODS-Discussion/nntpf_subs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_subs.vspx,v 1.7.2.1 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_subs.vspx,v 1.7.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_subs_edit.vspx b/appsrc/ODS-Discussion/nntpf_subs_edit.vspx
index 9b8a16f..48bc507 100644
--- a/appsrc/ODS-Discussion/nntpf_subs_edit.vspx
+++ b/appsrc/ODS-Discussion/nntpf_subs_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_subs_edit.vspx,v 1.5.2.2 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_subs_edit.vspx,v 1.5.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_subs_group.vspx b/appsrc/ODS-Discussion/nntpf_subs_group.vspx
index 8e4d70d..26f2eb6 100644
--- a/appsrc/ODS-Discussion/nntpf_subs_group.vspx
+++ b/appsrc/ODS-Discussion/nntpf_subs_group.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_subs_group.vspx,v 1.3.2.2 2010/09/20 10:15:09 source Exp $
+ -  $Id: nntpf_subs_group.vspx,v 1.3.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_subs_remove.vspx b/appsrc/ODS-Discussion/nntpf_subs_remove.vspx
index 9836c10..b0b5c22 100644
--- a/appsrc/ODS-Discussion/nntpf_subs_remove.vspx
+++ b/appsrc/ODS-Discussion/nntpf_subs_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_subs_remove.vspx,v 1.4.2.1 2010/09/20 10:15:10 source Exp $
+ -  $Id: nntpf_subs_remove.vspx,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_tags.sql b/appsrc/ODS-Discussion/nntpf_tags.sql
index 10251aa..9eabfb9 100644
--- a/appsrc/ODS-Discussion/nntpf_tags.sql
+++ b/appsrc/ODS-Discussion/nntpf_tags.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nntpf_tags.sql,v 1.2.2.2 2010/09/20 10:15:10 source Exp $
+--  $Id: nntpf_tags.sql,v 1.2.2.3 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_thread_view.vspx b/appsrc/ODS-Discussion/nntpf_thread_view.vspx
index 9c1c801..b3135ba 100644
--- a/appsrc/ODS-Discussion/nntpf_thread_view.vspx
+++ b/appsrc/ODS-Discussion/nntpf_thread_view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_thread_view.vspx,v 1.4.2.2 2010/09/20 10:15:10 source Exp $
+ -  $Id: nntpf_thread_view.vspx,v 1.4.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_warning.vsp b/appsrc/ODS-Discussion/nntpf_warning.vsp
index 935ad7e..182ce84 100644
--- a/appsrc/ODS-Discussion/nntpf_warning.vsp
+++ b/appsrc/ODS-Discussion/nntpf_warning.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: nntpf_warning.vsp,v 1.2.2.2 2010/09/20 10:15:10 source Exp $
+--  $Id: nntpf_warning.vsp,v 1.2.2.3 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/nntpf_yacutia.vspx b/appsrc/ODS-Discussion/nntpf_yacutia.vspx
index fe9f930..7cce4dd 100644
--- a/appsrc/ODS-Discussion/nntpf_yacutia.vspx
+++ b/appsrc/ODS-Discussion/nntpf_yacutia.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: nntpf_yacutia.vspx,v 1.4.2.2 2010/09/20 10:15:10 source Exp $
+ -  $Id: nntpf_yacutia.vspx,v 1.4.2.3 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/openid.js b/appsrc/ODS-Discussion/openid.js
index 0115420..96453b8 100644
--- a/appsrc/ODS-Discussion/openid.js
+++ b/appsrc/ODS-Discussion/openid.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/openid_helper.vsp b/appsrc/ODS-Discussion/openid_helper.vsp
index b10e92c..987deaa 100644
--- a/appsrc/ODS-Discussion/openid_helper.vsp
+++ b/appsrc/ODS-Discussion/openid_helper.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --  
---  $Id: openid_helper.vsp,v 1.2.2.1 2010/09/20 10:15:10 source Exp $
+--  $Id: openid_helper.vsp,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/register.vspx b/appsrc/ODS-Discussion/register.vspx
index b1e4d01..e2142ed 100644
--- a/appsrc/ODS-Discussion/register.vspx
+++ b/appsrc/ODS-Discussion/register.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: register.vspx,v 1.3.2.1 2010/09/20 10:15:10 source Exp $
+ -  $Id: register.vspx,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/rss.vsp b/appsrc/ODS-Discussion/rss.vsp
index 24e1078..98dd093 100644
--- a/appsrc/ODS-Discussion/rss.vsp
+++ b/appsrc/ODS-Discussion/rss.vsp
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="<?= current_charset () ?>"?>
 <?vsp
 --
---  $Id: rss.vsp,v 1.3.2.1 2010/09/20 10:15:10 source Exp $
+--  $Id: rss.vsp,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/rsscomments.vsp b/appsrc/ODS-Discussion/rsscomments.vsp
index 2a23fb9..821eee6 100644
--- a/appsrc/ODS-Discussion/rsscomments.vsp
+++ b/appsrc/ODS-Discussion/rsscomments.vsp
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="<?= current_charset () ?>"?>
 <?vsp
 --
---  $Id: rsscomments.vsp,v 1.3.2.1 2010/09/20 10:15:10 source Exp $
+--  $Id: rsscomments.vsp,v 1.3.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/setup.sql b/appsrc/ODS-Discussion/setup.sql
index 6df545e..ee7492d 100644
--- a/appsrc/ODS-Discussion/setup.sql
+++ b/appsrc/ODS-Discussion/setup.sql
@@ -1,10 +1,10 @@
 --
---  $Id: setup.sql,v 1.27.2.1 2010/09/20 10:15:10 source Exp $
+--  $Id: setup.sql,v 1.27.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/sioc_nntp.sql b/appsrc/ODS-Discussion/sioc_nntp.sql
index f32ea32..b2b4bf6 100644
--- a/appsrc/ODS-Discussion/sioc_nntp.sql
+++ b/appsrc/ODS-Discussion/sioc_nntp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_nntp.sql,v 1.14.2.3 2010/09/20 10:15:10 source Exp $
+--  $Id: sioc_nntp.sql,v 1.14.2.4 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/vad_version b/appsrc/ODS-Discussion/vad_version
index a0903c6..d12a887 100644
--- a/appsrc/ODS-Discussion/vad_version
+++ b/appsrc/ODS-Discussion/vad_version
@@ -1 +1 @@
-1.10.70
+1.10.71
diff --git a/appsrc/ODS-Discussion/virtuoso_app_links.xhtml b/appsrc/ODS-Discussion/virtuoso_app_links.xhtml
index 8cfeafd..644d2fb 100644
--- a/appsrc/ODS-Discussion/virtuoso_app_links.xhtml
+++ b/appsrc/ODS-Discussion/virtuoso_app_links.xhtml
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: virtuoso_app_links.xhtml,v 1.1.2.1 2010/09/20 10:15:11 source Exp $
+ -  $Id: virtuoso_app_links.xhtml,v 1.1.2.2 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Discussion/wa_install.sql b/appsrc/ODS-Discussion/wa_install.sql
index 35911d9..56d5f40 100644
--- a/appsrc/ODS-Discussion/wa_install.sql
+++ b/appsrc/ODS-Discussion/wa_install.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_install.sql,v 1.4.2.2 2010/09/20 10:15:11 source Exp $
+--  $Id: wa_install.sql,v 1.4.2.3 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/Makefile.am b/appsrc/ODS-FeedManager/Makefile.am
index 5c6792e..462be1a 100644
--- a/appsrc/ODS-FeedManager/Makefile.am
+++ b/appsrc/ODS-FeedManager/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -46,6 +46,7 @@ clean-local:
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-FeedManager/Makefile.in b/appsrc/ODS-FeedManager/Makefile.in
index 51abc9f..a969291 100644
--- a/appsrc/ODS-FeedManager/Makefile.in
+++ b/appsrc/ODS-FeedManager/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -309,6 +311,7 @@ CLEANFILES = \
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-FeedManager/make_vad.sh b/appsrc/ODS-FeedManager/make_vad.sh
index 8af3046..af73552 100755
--- a/appsrc/ODS-FeedManager/make_vad.sh
+++ b/appsrc/ODS-FeedManager/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.44.2.25 2011/03/23 12:19:24 source Exp $
+#  $Id: make_vad.sh,v 1.44.2.32 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.8.176"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -63,11 +63,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -90,6 +85,57 @@ else
   myrm=$RM
 fi
 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -225,7 +271,7 @@ sticker_init() {
   echo "  <name package=\"Feed Manager\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Feed Manager\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -237,8 +283,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.76.62\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-09-27 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.85.05\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-12-29 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -397,6 +443,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -413,7 +460,6 @@ virtuoso_shutdown
 STOP_SERVER
 chmod 644 $VAD_DAV
 chmod 644 $VAD_FS
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -423,5 +469,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-FeedManager/sql/DET_News3.sql b/appsrc/ODS-FeedManager/sql/DET_News3.sql
index a00f403..e886fa8 100644
--- a/appsrc/ODS-FeedManager/sql/DET_News3.sql
+++ b/appsrc/ODS-FeedManager/sql/DET_News3.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_News3.sql,v 1.4.2.1 2010/09/20 10:15:13 source Exp $
+--  $Id: DET_News3.sql,v 1.4.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/sql/nws-a-api.sql b/appsrc/ODS-FeedManager/sql/nws-a-api.sql
index 76b0ef8..36fe7eb 100644
--- a/appsrc/ODS-FeedManager/sql/nws-a-api.sql
+++ b/appsrc/ODS-FeedManager/sql/nws-a-api.sql
@@ -6,12 +6,12 @@
 
 
 --
---  $Id: nws-a-api.sql,v 1.7.2.3 2010/09/20 10:15:13 source Exp $
+--  $Id: nws-a-api.sql,v 1.7.2.4 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/sql/nws-a-code.sql b/appsrc/ODS-FeedManager/sql/nws-a-code.sql
index d0563ff..adb6eea 100644
--- a/appsrc/ODS-FeedManager/sql/nws-a-code.sql
+++ b/appsrc/ODS-FeedManager/sql/nws-a-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nws-a-code.sql,v 1.44.2.27 2011/03/23 12:19:24 source Exp $
+--  $Id: nws-a-code.sql,v 1.44.2.29 2012/03/08 11:48:57 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -6152,7 +6152,10 @@ create procedure ENEWS.WA.data (
 create procedure ENEWS.WA.test_clear (
   in S any)
 {
-  return substring(S, 1, coalesce(strstr(S, '<>'), length(S)));
+  S := substring (S, 1, coalesce (strstr (S, '<>'), length (S)));
+  S := substring (S, 1, coalesce (strstr (S, '\nin'), length (S)));
+
+  return S;
 }
 ;
 
@@ -6308,7 +6311,7 @@ create procedure ENEWS.WA.validate2 (
     if (isnull(regexp_match('^[^\\\/\?\*\"\'\>\<\:\|]*\$', propertyValue)))
       goto _error;
   } else if ((propertyType = 'uri') or (propertyType = 'anyuri')) {
-    if (isnull(regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:]*)?\$', propertyValue)))
+    if (isnull (regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:~]*)?\$', propertyValue)))
       goto _error;
   } else if (propertyType = 'email') {
     if (isnull(regexp_match('^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))\$', propertyValue)))
@@ -7466,63 +7469,6 @@ registry_set ('news_table_version', '1');
 
 -------------------------------------------------------------------------------
 --
-create procedure ENEWS.WA.obj2json (
-  in o any,
-  in d integer := 2)
-{
-  declare N, M integer;
-  declare R, T any;
-  declare retValue any;
-
-	if (d = 0)
-	  return '[maximum depth achieved]';
-
-  T := vector ('\b', '\\b', '\t', '\\t', '\n', '\\n', '\f', '\\f',	'\r', '\\r', '"', '\\"', '\\', '\\\\');
-	retValue := '';
-	if (isnumeric (o))
-	{
-		retValue := cast (o as varchar);
-	}
-	else if (isstring (o))
-	{
-		for (N := 0; N < length(o); N := N + 1)
-		{
-			R := chr (o[N]);
-		  for (M := 0; M < length(T); M := M + 2)
-		  {
-				if (R = T[M])
-				  R := T[M+1];
-			}
-			retValue := retValue || R;
-		}
-		retValue := '"' || retValue || '"';
-	}
-	else if (isarray (o))
-	{
-		retValue := '[';
-		for (N := 0; N < length(o); N := N + 1)
-		{
-		  retValue := retValue || ENEWS.WA.obj2json (o[N], d-1);
-		  if (N <> length(o)-1)
-			  retValue := retValue || ',\n';
-		}
-		retValue := retValue || ']';
-	}
-	return retValue;
-}
-;
-
--------------------------------------------------------------------------------
---
-create procedure ENEWS.WA.json2obj (
-  in o any)
-{
-  return json_parse (o);
-}
-;
-
--------------------------------------------------------------------------------
---
 create procedure ENEWS.WA.pshCheck ()
 {
   return case when isnull (DB.DBA.VAD_CHECK_VERSION ('pubsubhub')) or ((select top 1 coalesce (WS_FEEDS_HUB_CALLBACK, 1) from DB.DBA.WA_SETTINGS) = 0) then 0 else 1 end;
diff --git a/appsrc/ODS-FeedManager/sql/nws-a-ods.sql b/appsrc/ODS-FeedManager/sql/nws-a-ods.sql
index 2bcc5e7..5af37c5 100644
--- a/appsrc/ODS-FeedManager/sql/nws-a-ods.sql
+++ b/appsrc/ODS-FeedManager/sql/nws-a-ods.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nws-a-ods.sql,v 1.2.2.1 2010/09/20 10:15:13 source Exp $
+--  $Id: nws-a-ods.sql,v 1.2.2.2 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/sql/nws-a-table.sql b/appsrc/ODS-FeedManager/sql/nws-a-table.sql
index fb2ad13..7eec6c4 100644
--- a/appsrc/ODS-FeedManager/sql/nws-a-table.sql
+++ b/appsrc/ODS-FeedManager/sql/nws-a-table.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nws-a-table.sql,v 1.16.2.8 2011/01/25 14:11:48 source Exp $
+--  $Id: nws-a-table.sql,v 1.16.2.10 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -303,7 +303,7 @@ ENEWS.WA.exec_no_error('
 
 -------------------------------------------------------------------------------
 --
--- Conatins directory structure
+-- Contains directory structure
 --
 -------------------------------------------------------------------------------
 ENEWS.WA.exec_no_error('
diff --git a/appsrc/ODS-FeedManager/sql/nws-a-wa.sql b/appsrc/ODS-FeedManager/sql/nws-a-wa.sql
index 69654ce..695e16d 100644
--- a/appsrc/ODS-FeedManager/sql/nws-a-wa.sql
+++ b/appsrc/ODS-FeedManager/sql/nws-a-wa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nws-a-wa.sql,v 1.7.2.4 2010/09/22 13:57:03 source Exp $
+--  $Id: nws-a-wa.sql,v 1.7.2.5 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/sql/nws-d.sql b/appsrc/ODS-FeedManager/sql/nws-d.sql
index 5f47610..4185546 100644
--- a/appsrc/ODS-FeedManager/sql/nws-d.sql
+++ b/appsrc/ODS-FeedManager/sql/nws-d.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nws-d.sql,v 1.13.2.4 2010/09/20 10:15:13 source Exp $
+--  $Id: nws-d.sql,v 1.13.2.6 2012/03/08 10:46:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -104,6 +104,7 @@ registry_remove ('news_links_upgrade');
 registry_remove ('news_comment_upgrade');
 registry_remove ('news_path_upgrade2');
 registry_remove ('__ods_feeds_sioc_init');
+registry_remove ('news_services_update');
 
 -- Procedures
 create procedure ENEWS.WA.drop_procedures()
diff --git a/appsrc/ODS-FeedManager/sql/sioc_feeds.sql b/appsrc/ODS-FeedManager/sql/sioc_feeds.sql
index 96d01b8..16bd725 100644
--- a/appsrc/ODS-FeedManager/sql/sioc_feeds.sql
+++ b/appsrc/ODS-FeedManager/sql/sioc_feeds.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_feeds.sql,v 1.20.2.9 2010/10/13 12:14:21 source Exp $
+--  $Id: sioc_feeds.sql,v 1.20.2.12 2012/03/08 11:48:57 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -232,12 +232,16 @@ create procedure fill_ods_subscriptions_sioc (in graph_iri varchar, in site_iri
 --
 create procedure fill_ods_feeds_sioc (in graph_iri varchar, in site_iri varchar, in _wai_name varchar := null)
 {
-  declare iri, m_iri, f_iri, t_iri, u_iri, c_iri varchar;
+  declare acl_graph_iri, iri, m_iri, f_iri, t_iri, u_iri, c_iri varchar;
   declare tags, linksTo any;
   declare id, deadl, cnt any;
 
  {
+    -- init service containers
+    fill_ods_feeds_services ();
+
     for (select WAI_ID,
+                WAI_IS_PUBLIC,
                 WAI_TYPE_NAME,
                 WAI_NAME,
                 WAI_ACL
@@ -245,9 +249,9 @@ create procedure fill_ods_feeds_sioc (in graph_iri varchar, in site_iri varchar,
           where ((_wai_name is null) or (WAI_NAME = _wai_name))
             and WAI_TYPE_NAME = 'eNews2') do
     {
-      graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
-      exec (sprintf ('sparql clear graph <%s>', graph_iri));
-      SIOC..wa_instance_acl_insert (WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
+      acl_graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
+      exec (sprintf ('sparql clear graph <%s>', acl_graph_iri));
+      SIOC..wa_instance_acl_insert (WAI_IS_PUBLIC, WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
       for (select EFD_DOMAIN_ID, EFD_FEED_ID, EFD_ACL
              from ENEWS.WA.FEED_DOMAIN
             where EFD_DOMAIN_ID = WAI_ID and EFD_ACL is not null) do
@@ -381,6 +385,37 @@ create procedure fill_ods_feeds_sioc (in graph_iri varchar, in site_iri varchar,
 
 -------------------------------------------------------------------------------
 --
+create procedure fill_ods_feeds_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('feeds.subscribe', 'feeds.blog.subscribe', 'feeds.options.set',  'feeds.options.get');
+  ods_object_services (graph_iri, 'feeds', 'ODS feeds instance services', svc_functions);
+
+  -- feed
+  svc_functions := vector ('feeds.get', 'feeds.unsubscribe', 'feeds.refresh');
+  ods_object_services (graph_iri, 'feeds/feed', 'ODS Feeds feed services', svc_functions);
+
+  -- blog
+  svc_functions := vector ('feeds.blog.unsubscribe', 'feeds.blog.refresh');
+  ods_object_services (graph_iri, 'feeds/blog', 'ODS Feeds blog services', svc_functions);
+
+  -- feed item comment
+  svc_functions := vector ('feeds.comment.get', 'feeds.comment.delete');
+  ods_object_services (graph_iri, 'feeds/item/comment', 'ODS Feeds comment services', svc_functions);
+
+  -- feed item annotation
+  svc_functions := vector ('feeds.annotation.get', 'feeds.annotation.claim', 'feeds.annotation.delete');
+  ods_object_services (graph_iri, 'feeds/item/annotation', 'ODS Feeds annotation services', svc_functions);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 -- ENEWS..FEED
 create trigger FEEDD_SIOC_I after insert on ENEWS..FEED_DOMAIN referencing new as N
 {
@@ -683,7 +718,8 @@ create procedure feeds_comment_insert (
   declare feed_id integer;
   declare graph_iri, iri, feed_iri, item_iri varchar;
 
-  declare exit handler for sqlstate '*' {
+  declare exit handler for sqlstate '*'
+  {
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
@@ -693,9 +729,12 @@ create procedure feeds_comment_insert (
   feed_iri := feed_iri (feed_id);
   item_iri := feed_item_iri (feed_id, item_id);
   iri := feed_comment_iri (domain_id, item_id, id);
-  if (not isnull (iri)) {
+  if (not isnull (iri))
+  {
   foaf_maker (graph_iri, u_url, u_name, u_mail);
     ods_sioc_post (graph_iri, iri, feed_iri, null, title, last_update, last_update, feed_item_url (domain_id, item_id), comment, null, null, u_url);
+    -- services
+    SIOC..ods_object_services_attach (graph_iri, iri, 'feeds/item/comment');
     DB.DBA.ODS_QUAD_URI (graph_iri, item_iri, sioc_iri ('has_reply'), iri);
     DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc_iri ('reply_of'), item_iri);
 }
@@ -719,7 +758,8 @@ create procedure feeds_comment_delete (
   graph_iri := get_graph ();
   iri := feed_comment_iri (domain_id, item_id, id);
   delete_quad_s_or_o (graph_iri, iri, iri);
-  return;
+  -- services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'feeds/item/comment');
 }
 ;
 
@@ -766,7 +806,7 @@ create procedure feeds_annotation_insert (
   inout created datetime,
   inout updated datetime)
 {
-  declare master_iri, annotattion_iri varchar;
+  declare master_iri, annotation_iri varchar;
 
   declare exit handler for sqlstate '*' {
     sioc_log_message (__SQL_MESSAGE);
@@ -785,26 +825,27 @@ create procedure feeds_annotation_insert (
       forum_iri := feeds_iri (WAI_NAME);
     }
 
-  if (not isnull (graph_iri)) {
+  if (isnull (graph_iri))
+    return;
+
     declare feed_id integer;
 
     feed_id := (select EFI_FEED_ID from ENEWS.WA.FEED_ITEM where EFI_ID = master_id);
     master_iri := feed_item_iri (feed_id, master_id);
-    annotattion_iri := feed_annotation_iri (domain_id, cast (master_id as integer), annotation_id);
+  annotation_iri := feed_annotation_iri (domain_id, cast (master_id as integer), annotation_id);
 
-	  DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, sioc_iri ('has_container'), forum_iri);
-	  DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('container_of'), annotattion_iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, sioc_iri ('has_container'), forum_iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('container_of'), annotation_iri);
 
-	  DB.DBA.ODS_QUAD_URI (graph_iri, annotattion_iri, an_iri ('annotates'), master_iri);
-	  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotattion_iri);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('author'), author);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('body'), body);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('created'), created);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotattion_iri, an_iri ('modified'), updated);
+  DB.DBA.ODS_QUAD_URI (graph_iri, annotation_iri, an_iri ('annotates'), master_iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, an_iri ('hasAnnotation'), annotation_iri);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('author'), author);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('body'), body);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('created'), created);
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, annotation_iri, an_iri ('modified'), updated);
 
-	  feeds_claims_insert (graph_iri, annotattion_iri, claims);
-  }
-  return;
+  feeds_claims_insert (graph_iri, annotation_iri, claims);
+  SIOC..ods_object_services_attach (graph_iri, annotation_iri, 'feeds/item/annotation');
 }
 ;
 
@@ -816,7 +857,7 @@ create procedure feeds_annotation_delete (
   inout master_id integer,
   inout claims any)
 {
-  declare graph_iri, annotattion_iri varchar;
+  declare graph_iri, annotation_iri varchar;
 
   declare exit handler for sqlstate '*' {
     sioc_log_message (__SQL_MESSAGE);
@@ -824,8 +865,9 @@ create procedure feeds_annotation_delete (
   };
 
   graph_iri := get_graph ();
-  annotattion_iri := feed_annotation_iri (domain_id, master_id, annotation_id);
-  delete_quad_s_or_o (graph_iri, annotattion_iri, annotattion_iri);
+  annotation_iri := feed_annotation_iri (domain_id, master_id, annotation_id);
+  delete_quad_s_or_o (graph_iri, annotation_iri, annotation_iri);
+  SIOC..ods_object_services_dettach (graph_iri, annotation_iri, 'feeds/item/annotation');
 }
 ;
 
@@ -922,6 +964,22 @@ create procedure ods_feeds_sioc_init ()
 ;
 --ENEWS.WA.exec_no_error('ods_feeds_sioc_init ()');
 
+-------------------------------------------------------------------------------
+--
+create procedure ENEWS.WA.tmp_update ()
+{
+  if (registry_get ('news_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_feeds_services();
+  registry_set ('news_services_update', '1');
+}
+;
+
+ENEWS.WA.tmp_update ();
+
+-------------------------------------------------------------------------------
+--
 use DB;
 -- FEEDS
 
diff --git a/appsrc/ODS-FeedManager/vad_version b/appsrc/ODS-FeedManager/vad_version
new file mode 100644
index 0000000..5d855c7
--- /dev/null
+++ b/appsrc/ODS-FeedManager/vad_version
@@ -0,0 +1 @@
+1.19.64
diff --git a/appsrc/ODS-FeedManager/www/ajax.vsp b/appsrc/ODS-FeedManager/www/ajax.vsp
index ecf874a..21ee0ef 100644
--- a/appsrc/ODS-FeedManager/www/ajax.vsp
+++ b/appsrc/ODS-FeedManager/www/ajax.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: ajax.vsp,v 1.3.2.3 2010/10/07 13:23:02 source Exp $
+--  $Id: ajax.vsp,v 1.3.2.5 2012/03/08 11:48:57 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2007 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -107,7 +107,7 @@
     }
     http_rewrite ();
     http_header ('Content-Type: text/plain\r\n');
-    http (ENEWS.WA.obj2json(returnData, 3));
+    http (ODS..obj2json(returnData, 5));
   }
   else if (action = 'tags')
   {
diff --git a/appsrc/ODS-FeedManager/www/annotea.vspx b/appsrc/ODS-FeedManager/www/annotea.vspx
index 01ee866..4e7d967 100644
--- a/appsrc/ODS-FeedManager/www/annotea.vspx
+++ b/appsrc/ODS-FeedManager/www/annotea.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: annotea.vspx,v 1.8.2.5 2010/10/07 13:23:02 source Exp $
+ -  $Id: annotea.vspx,v 1.8.2.8 2012/03/08 10:46:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -41,9 +41,11 @@
   <vm:pagetitle>Annotation page</vm:pagetitle>
   <vm:popup_pagewrapper>
     <vm:variables>
-      <v:variable persist="0" name="v_mode" type="varchar" default="'show'"/>
+      <v:variable persist="0" name="v_sid" param-name="sid" type="varchar" />
+      <v:variable persist="0" name="v_realm" param-name="realm" type="varchar" />
+      <v:variable persist="0" name="v_mode" param-name="mode" type="varchar" default="'show'"/>
       <v:variable persist="0" name="v_oid" param-name="oid" type="integer" />
-      <v:variable persist="0" name="v_id" type="integer" />
+      <v:variable persist="0" name="v_id" param-name="id" type="integer" />
       <v:variable persist="0" name="v_author" type="varchar" default="''" />
       <v:variable persist="0" name="v_body" type="varchar" default="''" />
       <v:variable persist="0" name="v_claims" type="any" default="null" />
@@ -51,8 +53,8 @@
       <v:variable name="v_tabNo" param-name="tabNo" type="varchar" default="0" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <input type="hidden" name="sid"   id="sid"   value="<?V self.v_sid ?>" />
+      <input type="hidden" name="realm" id="realm" value="<?V self.v_realm ?>" />
       <div class="form-header">
         Free Text Annotation: '<?V ENEWS.WA.utf2wide ((select coalesce(EFI_TITLE, '~ no title ~') from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_oid)) ?>'
       </div>
@@ -74,7 +76,7 @@
                 </v:on-post>
               </v:button>
             </div>
-            <table id="annotations" class="FM_grid" cellspacing="0" style="border: 0;">
+            <table class="ODS_grid ANN_grid">
             </table>
           </v:template>
 
@@ -82,7 +84,7 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
+                <tr>
                   <td>
                     No annotations
                   </td>
@@ -91,13 +93,25 @@
             </v:template>
 
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
+              <?vsp
+                 declare row vspx_row_template;
+                 row := control;
+              ?>
               <table>
                 <tr>
                   <td width="1%" nowrap="nowrap">
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), ENEWS.WA.dt_value ((control as vspx_row_template).te_column_value('A_CREATED'))); ?>
+                    <?vsp self.showTDValue (row.te_column_value('A_ID'), ENEWS.WA.dt_value (row.te_column_value('A_CREATED'))); ?>
                   </td>
                   <td>
-                    <?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_AUTHOR')); ?>
+                    <?vsp
+                      declare id, iri any;
+
+                      id := row.te_column_value('A_ID');
+                      iri := ENEWS.WA.url_fix (SIOC..feed_annotation_iri (self.domain_id, self.v_oid, id), self.v_sid, self.v_realm);
+                      http (sprintf ('<a href="%V">', iri));
+                      self.showTDValue (id, row.te_column_value('A_AUTHOR'));
+                      http ('</a>');
+                    ?>
                   </td>
                   <td width="1%" nowrap="nowrap">
                     <v:button action="simple" value="edit" xhtml_title="Edit" xhtml_class="button">
@@ -127,7 +141,7 @@
                 <tr>
                   <td />
                   <td colspan="2">
-                    <i><?vsp self.showTDValue ((control as vspx_row_template).te_column_value('A_ID'), (control as vspx_row_template).te_column_value('A_BODY')); ?></i>
+                    <i><?vsp self.showTDValue (row.te_column_value('A_ID'), row.te_column_value('A_BODY')); ?></i>
                   </td>
                 </tr>
               </table>
@@ -158,6 +172,8 @@
                        self.v_claims
                   from ENEWS.WA.ANNOTATIONS
                  where A_ID = self.v_id;
+
+                self.rdf_iri := SIOC..feed_annotation_iri (self.domain_id, self.v_oid, self.v_id);
               }
             ]]>
           </v:before-data-bind>
@@ -208,14 +224,12 @@
                 <table>
                   <tr>
                     <td width="800px">
-                      <table id="c_tbl" class="form-list" cellspacing="0">
-                  <thead class="sortHeader">
+                      <table id="c_tbl" class="ODS_grid">
+                        <thead>
             <tr>
-                            <th>Relation</th>
-                            <th width="70%">Value</th>
-                            <th width="1%">
-                              Action
-                            </th>
+                            <th width="50%">Relation</th>
+                            <th width="50%">Value</th>
+                            <th class="action">Action</th>
                     </tr>
                   </thead>
                   		  <![CDATA[
diff --git a/appsrc/ODS-FeedManager/www/attachment.vsp b/appsrc/ODS-FeedManager/www/attachment.vsp
index e1e3bc7..dd8eb9e 100644
--- a/appsrc/ODS-FeedManager/www/attachment.vsp
+++ b/appsrc/ODS-FeedManager/www/attachment.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: attachment.vsp,v 1.1.2.1 2010/09/20 10:15:14 source Exp $
+--  $Id: attachment.vsp,v 1.1.2.2 2012/03/08 10:46:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/blog.vspx b/appsrc/ODS-FeedManager/www/blog.vspx
index 2bcbed2..89ac65f 100644
--- a/appsrc/ODS-FeedManager/www/blog.vspx
+++ b/appsrc/ODS-FeedManager/www/blog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: blog.vspx,v 1.7.2.3 2010/10/07 13:23:02 source Exp $
+ -  $Id: blog.vspx,v 1.7.2.4 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/bookmark.vspx b/appsrc/ODS-FeedManager/www/bookmark.vspx
index dbb21b2..72c2fa4 100644
--- a/appsrc/ODS-FeedManager/www/bookmark.vspx
+++ b/appsrc/ODS-FeedManager/www/bookmark.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bookmark.vspx,v 1.5.2.3 2010/09/20 10:15:14 source Exp $
+ -  $Id: bookmark.vspx,v 1.5.2.4 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/channels.vspx b/appsrc/ODS-FeedManager/www/channels.vspx
index 5e061a3..3332095 100644
--- a/appsrc/ODS-FeedManager/www/channels.vspx
+++ b/appsrc/ODS-FeedManager/www/channels.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: channels.vspx,v 1.12.2.11 2011/01/25 14:11:49 source Exp $
+ -  $Id: channels.vspx,v 1.12.2.15 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -23,29 +23,7 @@
  -
 -->
 <v:page name="channels" decor="template/template.vspx" style="template/template.xsl" fast-render="1" button-anchors="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro" doctype="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
 
-      if (self.c_order = columnName and self.c_direction = 'desc')
-      {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="image/d.gif" border="0" alt="Down"/>';
-      }
-      else if (self.c_order = columnName and self.c_direction = 'asc')
-      {
-        directionStr := 'Descending';
-        imageStr := ' <img src="image/u.gif" border="0" alt="Up"/>';
-      }
-      else
-      {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''F1'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
       if (columnName = '')
@@ -101,15 +79,64 @@
       </v:before-render>
       <v:template name="t1" type="simple" enabled="--either(equ(self.v_mode, ''), 1, 0)">
           <div style="padding: 0 0 0.5em 0;">
-          <v:button name="btn_subscribe" action="simple" value="subscribe" xhtml_class="button2" xhtml_alt="Subscribe feed">
+          <v:button name="btn_subscribe" action="simple" value="subscribe" xhtml_class="button" xhtml_alt="Subscribe feed">
               <v:on-post>
                 <![CDATA[
                 self.vc_redirect (ENEWS.WA.utf2wide (ENEWS.WA.page_url (self.domain_id, 'channels_create.vspx')));
                 ]]>
               </v:on-post>
             </v:button>
+          <v:button name="btn_delete" value="delete" action="simple" xhtml_onclick="javascript: return confirmAction(\'Are you sure that you want to delete selected feed(s)?\', this.form, \'cb_item\', \'No feeds were selected to be deleted.\');" xhtml_class="button" xhtml_alt="Delete selected feed(s)">
+            <v:on-post>
+              <![CDATA[
+                declare i integer;
+
+                for (i := 0; i < length(e.ve_params); i := i + 2)
+                {
+                  if (e.ve_params[i] = 'cb_item')
+                  {
+                    declare exit handler for sqlstate '*'
+                    {
+                      rollback work;
+                      goto _next;
+                    };
+                    commit work;
+
+                    ENEWS.WA.channel_delete (e.ve_params[i+1]);
+                  }
+                  _next:;
+                }
+                ENEWS.WA.tags_refresh(self.domain_id, self.account_id, 0);
+                self.vc_data_bind(e);
+              ]]>
+            </v:on-post>
+          </v:button>
+          <v:button name="btn_refresh" value="refresh" action="simple" xhtml_onclick="javascript: return anySelected(this.form, \'cb_item\', \'No feeds were selected to be refreshed.\');" xhtml_class="button" xhtml_alt="Refresh selected feed(s)">
+            <v:on-post>
+              <![CDATA[
+                declare i integer;
+
+                for (i := 0; i < length(e.ve_params); i := i + 2)
+                {
+                  if (e.ve_params[i] = 'cb_item')
+                  {
+                    declare exit handler for sqlstate '*'
+                    {
+                      rollback work;
+                      goto _next;
+                    };
+                    commit work;
+
+                     ENEWS.WA.feed_refresh(e.ve_params[i+1]);
+                  }
+                  _next:;
+                }
+                self.vc_data_bind (e);
+              ]]>
+            </v:on-post>
+          </v:button>
             <div class="menuBar" id="exportBar">
-          <a class="menuButton button2" onMouseDown="return this.blur();" onClick="return menuPopup(this, 'exportMenu');" title="Export Feeds">export</a>
+            <a class="menuButton button2" onMouseDown="return this.blur();" onclick="return menuPopup(this, 'exportMenu');" title="Export Feeds">export</a>
               <div class="menu" id="exportMenu">
                 <?vsp
               http(sprintf('<a class="menuItem" href="%sOFM.ocs" target="_blank" title="%s"><img src="image/%s" border="0" alt="%s"/> %s</a>', ENEWS.WA.dav_url (self.domain_id), 'OCS Export', 'blue-icon-16.gif', 'OCS Export', 'OCS'));
@@ -128,27 +155,22 @@
             control.ds_sql := concat(control.ds_sql, ' order by ', self.c_order, ' ', self.c_direction);
           ]]>
         </v:before-data-bind>
+          <v:after-data-bind>
+            control.ds_make_statistic ();
+          </v:after-data-bind>
       </v:data-source>
       <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
           <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-          <table id="channels" class="FM_grid" cellspacing="0">
-              <thead class="sortHeader">
+            <table id="channels" class="ODS_grid" cellspacing="0">
+              <thead>
                 <tr>
-                  <th class="checkbox" width="1%">
+                  <th class="checkbox">
                     <input type="checkbox" name="cb_all" value="Select All" onClick="selectAllCheckboxes(this.form, this, 'cb_item')" title="Select All" />
                   </th>
-                  <th>
-                    <?vsp self.sortColumn('Title', 'EF_TITLE'); ?>
-                  </th>
-                  <th>
-                    <?vsp self.sortColumn('Feed URL', 'EF_URI'); ?>
-                  </th>
-                  <th>
-                    <?vsp self.sortColumn('Retrieved', 'EF_COUNT'); ?>
-                  </th>
-                  <th width="5%" colspan="2">
-                    Action
-                  </th>
+                  <?vsp http (DB.DBA.wa_show_column_header ('Title', 'EF_TITLE', self.c_order, self.c_direction, ' width="50%"')); ?>
+                  <?vsp http (DB.DBA.wa_show_column_header ('Feed URL', 'EF_URI', self.c_order, self.c_direction, ' width="50%"')); ?>
+                  <?vsp http (DB.DBA.wa_show_column_header ('Retrieved', 'EF_COUNT', self.c_order, self.c_direction)); ?>
+                  <th class="action">Action</th>
                 </tr>
               </thead>
             </table>
@@ -158,8 +180,8 @@
 
             <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
               <table>
-                <tr align="center">
-                  <td colspan="6">No feeds</td>
+                <tr>
+                  <td colspan="5">No feeds</td>
                 </tr>
               </table>
             </v:template>
@@ -167,7 +189,7 @@
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
               <table>
                 <tr>
-                  <td align="center">
+                  <td class="checkbox">
                     <?vsp
                       http (sprintf ('<input type="checkbox" name="cb_item" value="%d" title="%V" />', control.te_rowset[0], control.te_rowset[2]));
                     ?>
@@ -181,7 +203,7 @@
                   <td align="right">
                     <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('EF_COUNT')" format="%d"/>
                   </td>
-                  <td nowrap="nowrap">
+                  <td class="action">
                     <v:button name="btn_edit" value="edit" action="simple" xhtml_class="button" xhtml_alt="edit feed">
                       <v:on-post>
                         <![CDATA[
@@ -192,28 +214,6 @@
                       </v:on-post>
                     </v:button>
                   </td>
-                  <td nowrap="nowrap">
-                    <v:button name="btn_delete" value="delete" action="simple" xhtml_onclick="return confirmAction(\'Are you sure that you want to delete this feed?\');" xhtml_class="button" xhtml_alt="Delete feed">
-                      <v:on-post>
-                        <![CDATA[
-                        ENEWS.WA.channel_delete ((control.vc_parent as vspx_row_template).te_column_value('EFD_ID'));
-                          ENEWS.WA.tags_refresh(self.domain_id, self.account_id, 0);
-                		      self.vc_data_bind(e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                    <v:button name="btn_refresh" value="refresh" action="simple" xhtml_class="button" xhtml_alt="Refresh feed">
-                      <v:on-post>
-                        <![CDATA[
-                          declare exit handler for sqlstate '*' { goto _next; };
-
-                 			    ENEWS.WA.feed_refresh((control.vc_parent as vspx_row_template).te_column_value('EF_ID'));
-                 			  _next:
-                   		    self.vc_data_bind (e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                  </td>
                 </tr>
               </table>
             </v:template>
@@ -222,122 +222,13 @@
 
           <v:template name="ds_footer" type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <v:template name="t2" type="simple" enabled="--case when self.ds.ds_rows_fetched > 0 then 1 else 0 end;">
-                <tr class="td_border">
-                  <td align="right" colspan="4" class="td_border">
-                    <b>Selected&nbsp;</b>
-                  </td>
-                  <td class="td_border">
-                    &nbsp;
-                  </td>
-                  <td nowrap="nowrap" class="td_border">
-                    <v:button name="btn_delete2" value="delete" action="simple" xhtml_onclick="javascript: return confirmAction(\'Are you sure that you want to delete selected feed(s)?\', this.form, \'cb_item\', \'No feeds were selected to be deleted.\');" xhtml_class="button" xhtml_alt="Delete selected feed(s)">
-                      <v:on-post>
-                        <![CDATA[
-                          declare i integer;
-
-                          for (i := 0; i < length(e.ve_params); i := i + 2) {
-                            if (e.ve_params[i] = 'cb_item') {
-                              declare exit handler for sqlstate '*' {
-                                rollback work;
-                                goto _next;
-                              };
-                              commit work;
-
-                            ENEWS.WA.channel_delete (e.ve_params[i+1]);
-                            }
-                            _next:;
-                          }
-                          ENEWS.WA.tags_refresh(self.domain_id, self.account_id, 0);
-                		      self.vc_data_bind(e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                    <v:button name="btn_refresh2" value="refresh" action="simple" xhtml_onclick="javascript: return anySelected(this.form, \'cb_item\', \'No feeds were selected to be refreshed.\');" xhtml_class="button" xhtml_alt="Refresh selected feed(s)">
-                      <v:on-post>
-                        <![CDATA[
-                          declare i integer;
-
-                          for (i := 0; i < length(e.ve_params); i := i + 2)
-                          {
-                            if (e.ve_params[i] = 'cb_item')
-                            {
-                              declare exit handler for sqlstate '*'
-                              {
-                                rollback work;
-                                goto _next;
-                              };
-                              commit work;
-
-                     			    ENEWS.WA.feed_refresh(e.ve_params[i+1]);
-                            }
-                            _next:;
-                          }
-                   		    self.vc_data_bind (e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                  </td>
-                </tr>
-                <tr class="td_border">
-                  <td align="right" colspan="4" class="td_border">
-                    <b>All&nbsp;</b>
-                  </td>
-                  <td class="td_border">
-                    &nbsp;
-                  </td>
-                  <td nowrap="nowrap" class="td_border">
-                    <v:button name="btn_delete3" value="delete" action="simple" xhtml_onclick="javascript: return confirmAction(\'Are you sure that you want to delete all feeds?\');" xhtml_class="button" xhtml_alt="Delete all feeds">
-                      <v:on-post>
-                        <![CDATA[
-                        for (select EFD_ID
-                                 from ENEWS.WA.FEED
-                                   join ENEWS.WA.FEED_DOMAIN EC on EFD_FEED_ID = EF_ID
-                                where EFD_DOMAIN_ID = self.domain_id) do {
-                            declare exit handler for sqlstate '*'
-                            {
-                              rollback work;
-                              goto _next;
-                            };
-                            commit work;
-
-                          ENEWS.WA.channel_delete(EFD_ID);
-                          _next:;
-                          }
-                          ENEWS.WA.tags_refresh(self.domain_id, self.account_id, 0);
-                		      self.vc_data_bind(e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                    <v:button name="btn_refresh3" value="refresh" action="simple" xhtml_class="button" xhtml_alt="Refresh all feeds">
-                      <v:on-post>
-                        <![CDATA[
-                          for (select EF_ID
-                                 from ENEWS.WA.FEED ECD
-                                   join ENEWS.WA.FEED_DOMAIN on EFD_FEED_ID = EF_ID
-                                where EFD_DOMAIN_ID = self.domain_id) do {
-                            declare exit handler for sqlstate '*'
-                            {
-                              rollback work;
-                              goto _next;
-                            };
-                            commit work;
-
-                   			    ENEWS.WA.feed_refresh(EF_ID);
-                          _next:;
-                          }
-                   		    self.vc_data_bind (e);
-                        ]]>
-                      </v:on-post>
-                    </v:button>
-                  </td>
-                </tr>
-              </v:template>
-              <tr align="center">
-                <td align="center" colspan="6">
+              <tfoot>
+                <tr align="right" >
+                  <td colspan="5">
                   <vm:ds-navigation data-set="ds"/>
                 </td>
               </tr>
+              </tfoot>
             </table>
           </v:template>
 
@@ -390,6 +281,7 @@
                           left join ENEWS.WA.FEED_DIRECTORY c on c.EFD_FEED_ID = a.EFD_FEED_ID
                 where a.EFD_ID = self.v_id;
 
+              self.rdf_iri := SIOC..feed_iri (self.v_feed_id);
               return;
             }
 
diff --git a/appsrc/ODS-FeedManager/www/channels_create.vspx b/appsrc/ODS-FeedManager/www/channels_create.vspx
index 682762c..353ff7f 100644
--- a/appsrc/ODS-FeedManager/www/channels_create.vspx
+++ b/appsrc/ODS-FeedManager/www/channels_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: channels_create.vspx,v 1.14.2.6 2010/10/13 12:14:21 source Exp $
+ -  $Id: channels_create.vspx,v 1.14.2.8 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -255,13 +255,12 @@
                 </v:template>
                 <v:template type="simple" enabled="-- case when (self.v_source = 2) then 1 else 0 end">
                   <v:text name="source_2" xhtml_id="source_2" value="" xhtml_size="70" />
-                  <v:button action="browse" value="Browse...">
-                 	  <v:after-data-bind>
+                  <input type="button" id="source_2_button" value="Browse..." onclick="davBrowse ('source_2');" />
                  		  <![CDATA[
-                        control.vc_add_attribute ('onclick', 'javascript: davBrowse (''source_2'');');
+                	  <script type="text/javascript">
+                      OAT.Loader.load(['dav'], function(){OAT.WebDav.init(davOptions);});
+                	  </script>
             			    ]]>
-            			  </v:after-data-bind>
-            		  </v:button>
                 </v:template>
                 <v:button action="simple" value="Subscribe" xhtml_alt="Subscribe feed" enabled="-- case when (self.v_source = 0) then 1 else 0 end">
                   <v:on-post>
diff --git a/appsrc/ODS-FeedManager/www/channels_select.vspx b/appsrc/ODS-FeedManager/www/channels_select.vspx
index 7cfea00..b05ba51 100644
--- a/appsrc/ODS-FeedManager/www/channels_select.vspx
+++ b/appsrc/ODS-FeedManager/www/channels_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: channels_select.vspx,v 1.6.2.2 2010/09/20 10:15:14 source Exp $
+ -  $Id: channels_select.vspx,v 1.6.2.4 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -96,6 +96,8 @@
 
                 if (self.v_mask = '')
                   self.v_mask := '%';
+
+                self.ds.vc_reset();
                 self.ds.vc_data_bind (e);
               ]]>
             </v:on-post>
@@ -174,11 +176,13 @@
 
           <v:template type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <tr align="center">
+              <tfoot>
+                <tr align="right">
                 <td colspan="3">
                   <vm:ds-navigation data-set="ds"/>
                 </td>
               </tr>
+              </tfoot>
             </table>
           </v:template>
 
diff --git a/appsrc/ODS-FeedManager/www/conversation.vspx b/appsrc/ODS-FeedManager/www/conversation.vspx
index 0518b9c..4f48d9e 100644
--- a/appsrc/ODS-FeedManager/www/conversation.vspx
+++ b/appsrc/ODS-FeedManager/www/conversation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conversation.vspx,v 1.13.2.3 2010/10/07 13:23:03 source Exp $
+ -  $Id: conversation.vspx,v 1.13.2.5 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -29,7 +29,7 @@
 
       if (isnull(self.v_pid))
       {
-            select EFI_TITLE into title from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_fid;
+        select EFI_TITLE into title from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_id;
           } else {
             select EFIC_TITLE into title from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_ID = self.v_pid;
           }
@@ -43,7 +43,7 @@
 
       if (isnull(self.v_pid))
       {
-            select EFI_TITLE into comment from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_fid;
+        select EFI_TITLE into comment from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_id;
           } else {
             select EFIC_COMMENT into comment from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_ID = self.v_pid;
           }
@@ -55,7 +55,7 @@
   <vm:popup_pagewrapper>
         <vm:variables>
       <v:variable persist="0" name="v_mode" type="varchar" default="'show'" param-name="mode" />
-          <v:variable persist="0" name="v_fid" param-name="fid" type="integer"/>
+      <v:variable persist="0" name="v_id" param-name="id" type="integer" />
           <v:variable persist="0" name="v_pid" type="integer"/>
       <v:variable persist="0" name="openid_identity" type="varchar" default="null" param-name="openid.identity" />
       <v:variable persist="0" name="openid_sig" type="varchar" default="null" param-name="openid.sig" />
@@ -64,8 +64,8 @@
       <v:variable persist="0" name="openid_name" type="varchar" default="null" param-name="openid.sreg.fullname" />
         </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params, ''))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params, ''))); ?>
       <?vsp http(sprintf('<input type="hidden" name="user_name" id="user_name" value="%s" />', ENEWS.WA.account_name (self.account_id))); ?>
       <div class="form-header">
         Discussion
@@ -78,7 +78,7 @@
                   <v:label value="">
                     <v:after-data-bind>
                       <![CDATA[
-                        control.ufl_value := (select coalesce(EFI_TITLE, '~ no title ~') from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_fid);
+                    control.ufl_value := (select coalesce (EFI_TITLE, '~ no title ~') from ENEWS.WA.FEED_ITEM where EFI_ID = self.v_id);
                       ]]>
                     </v:after-data-bind>
                   </v:label>
@@ -96,18 +96,18 @@
                 </td>
               </tr>
           <?vsp
-            if (exists (select 1 from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_ITEM_ID = self.v_fid and EFIC_PARENT_ID is not null))
+            if (exists (select 1 from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_ITEM_ID = self.v_id and EFIC_PARENT_ID is not null))
             {
           ?>
               <tr>
                 <td>
               <div class="comment-section">Comments</div>
-                  <v:tree name="comments_list" multi-branch="1" orientation="vertical" start-path="--self.v_fid" open-at="--'//*'" root="ENEWS.WA.cm_root_node"	child-function="ENEWS.WA.cm_child_node">
+              <v:tree name="comments_list" multi-branch="1" orientation="vertical" start-path="--self.v_id" open-at="--'//*'" root="ENEWS.WA.cm_root_node"  child-function="ENEWS.WA.cm_child_node">
 	                  <v:node-template name="node_tmpl">
 	                    <div class="<?V case when control.tn_level = 0 then 'cm_node_top' else 'cm_node' end ?>">
                     		<?vsp
                       		{
-                      		  declare id, comment, title, u_name, last_update any;
+                        declare id, comment, title, iri, u_name, last_update any;
 
                       		  id := cast (control.tn_value as integer);
                       		  declare exit handler for not found;
@@ -115,6 +115,7 @@
                       		    into title, comment, u_name, last_update
                       		    from ENEWS.WA.FEED_ITEM_COMMENT
                       		   where EFIC_ID = id;
+                        iri := ENEWS.WA.url_fix (SIOC..feed_comment_iri (self.domain_id, self.v_id, id), get_keyword ('sid', self.vc_page.vc_event.ve_params), get_keyword ('realm', self.vc_page.vc_event.ve_params));
                          
                         declare parsed_message any;
                         declare _print_body,d_name varchar;
@@ -152,7 +153,8 @@
                       	?>
 	                      <div class="comment" id="msg_<?V id ?>">
 		                      <div class="comment-header">
-                        <span class="comment-subj"><?V ENEWS.WA.utf2wide (title) ?></span> <br />
+                        <?vsp http (sprintf ('<a href="%V">%s</a>', iri, title)); ?>
+                        <br />
 		                      </div>
 		                      <div class="comment-msg">
                             <?vsp
@@ -281,7 +283,7 @@
 
                             host := http_request_header (lines, 'Host');
 
-                            this_page := 'http://' || host || http_path () || sprintf ('?fid=%d&mode=reply', self.v_fid);
+                            this_page := 'http://' || host || http_path () || sprintf ('?fid=%d&mode=reply', self.v_id);
                             trust_root := 'http://' || host;
                             oi_ident := self.openid_url.ufl_value;
                             if (oi_ident is not null)
@@ -383,17 +385,17 @@
                             if (isnull(self.v_pid))
                             {
                                   -- get root comment;
-                              self.v_pid := (select EFIC_ID from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_DOMAIN_ID = self.domain_id and EFIC_ITEM_ID = self.v_fid and EFIC_PARENT_ID is null);
+                              self.v_pid := (select EFIC_ID from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_DOMAIN_ID = self.domain_id and EFIC_ITEM_ID = self.v_id and EFIC_PARENT_ID is null);
                               if (isnull(self.v_pid))
                               {
-                                ENEWS.WA.nntp_root (self.domain_id, self.v_fid);
-                                self.v_pid := (select EFIC_ID from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_DOMAIN_ID = self.domain_id and EFIC_ITEM_ID = self.v_fid and EFIC_PARENT_ID is null);
+                                ENEWS.WA.nntp_root (self.domain_id, self.v_id);
+                                self.v_pid := (select EFIC_ID from ENEWS.WA.FEED_ITEM_COMMENT where EFIC_DOMAIN_ID = self.domain_id and EFIC_ITEM_ID = self.v_id and EFIC_PARENT_ID is null);
                               }
                                 }
 
-                            ENEWS.WA.nntp_update_item (self.domain_id, self.v_fid);
+                            ENEWS.WA.nntp_update_item (self.domain_id, self.v_id);
                             insert into ENEWS.WA.FEED_ITEM_COMMENT (EFIC_PARENT_ID, EFIC_DOMAIN_ID, EFIC_ITEM_ID, EFIC_TITLE, EFIC_COMMENT, EFIC_U_NAME, EFIC_U_MAIL, EFIC_U_URL, EFIC_LAST_UPDATE, EFIC_OPENID_SIG)
-                              values (self.v_pid, self.domain_id, self.v_fid, title, comment, name, mail, url, now (), self.oid_sig.ufl_value || '&mac_key=' || self.oid_key.ufl_value);
+                              values (self.v_pid, self.domain_id, self.v_id, title, comment, name, mail, url, now (), self.oid_sig.ufl_value || '&mac_key=' || self.oid_key.ufl_value);
 
                                 self.v_mode := 'show';
                                 self.vc_data_bind(e);
@@ -420,7 +422,7 @@
             <td>
               Subscribe to an RSS feed of this comment thread:
               <?vsp
-                http(sprintf('<a href="%sOFM.comment?:id=%d" target="_blank" title="RSS conversation" alt="RSS conversation" class="gems"><img src="image/rss-icon-16.gif" border="0" /></a>', ENEWS.WA.gems_url (self.domain_id), self.v_fid));
+                http(sprintf('<a href="%sOFM.comment?:id=%d" target="_blank" title="RSS conversation" alt="RSS conversation" class="gems"><img src="image/rss-icon-16.gif" border="0" /></a>', ENEWS.WA.gems_url (self.domain_id), self.v_id));
               ?>
             </td>
           </tr>
diff --git a/appsrc/ODS-FeedManager/www/css/style.css b/appsrc/ODS-FeedManager/www/css/style.css
index 6d10078..22bd88c 100644
--- a/appsrc/ODS-FeedManager/www/css/style.css
+++ b/appsrc/ODS-FeedManager/www/css/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.26.2.8 2010/10/07 13:23:04 source Exp $
+ *  $Id: style.css,v 1.26.2.12 2012/03/08 11:48:57 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,23 @@ body {
   font-size: 9pt;
 }
 
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+form {
+  margin: 0;
+  padding: 0;
+}
+
+abbr {
+  border: none;
+}
+
 .pointer {
   cursor: pointer;
 }
@@ -106,43 +123,6 @@ div.app_hdr_cmds_ctr {
   margin: 0 5px 0 0;
 }
 
-/* Footer */
-#FT {
-  width: 100%;
-  position: relative;
-  bottom: 0px;
-  font-size: 8pt;
-  float: left;
-  clear: both;
-  text-align: right;
-  border-top: 2px solid #fff;
-  margin-right: 10px;
-  background-color: #fff;
-  background-image: url(../image/ods_main_footer.png);
-}
-
-#FT_L {
-  float: left;
-  clear: left;
-  margin-top: 10px;
-  margin-left: 8px;
-  border: 1px solid #788;
-}
-
-#FT_R {
-  float: right;
-  clear: right;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  margin-right: 5px;
-  color: #788;
-}
-
-#FT_R a {
-  text-decoration: none;
-  color: inherit;
-}
-
 #MTB {
   width: 100%;
   left: 0px;
@@ -565,16 +545,6 @@ input.nolink2 {
   background-color: inherit;
 }
 
-input.nolink4 {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  border: 0px;
-  background-color: #b0cde4;
-}
-
 .FM_bold {
   font-weight: bold;
 }
@@ -585,7 +555,7 @@ input.nolink4 {
 
 .button2 {
   font-size: .8em;
-	font-family: verdana, sans-serif;
+  font-family: verdana, sans-serif;
   color: #ffffff;
   font-weight: bold;
   border: solid 1px;
@@ -943,20 +913,6 @@ div.menu div.menuItemSep {
   margin: 4px 2px;
 }
 
-/* ComboList */
-.combo_list_list {
-  background-color: white;
-  border: 1px solid black;
-  padding: 5px 10px 5px 10px;
-  height: 100px;
-  overflow: auto;
-}
-
-.combo_list_option:hover {
-  background-color: #99b3c5;
-  color: white;
-}
-
 /* Comments */
 div.cm_node_top {
   padding-left: 1em;
@@ -1003,44 +959,6 @@ input.openID {
   padding-left: 18px;
 }
 
-/* Popup Calendar */
-.calendar {
-	border: 1px solid #000;
-	background-color: #FFF;
-  z-index: 101;
-}
-
-.calendar_year, .calendar_month {
-	text-align: center;
-	border-bottom: 1px solid #aaa;
-	padding: 2px 0px;
-}
-
-.calendar table {
-	margin-top: 2px;
-}
-
-.calendar thead {
-	font-weight: bold;
-}
-
-.calendar thead td {
-	padding: 0px 2px;
-}
-
-.calendar td {
-	font-size: 75%;
-	text-align: center;
-}
-
-td.calendar_selected {
-	background-color: #faa;
-}
-
-.calendar_special {
-	color: #c55;
-}
-
 /* Tree */
 #pane_left li {
   cursor: pointer;
diff --git a/appsrc/ODS-FeedManager/www/directories.vspx b/appsrc/ODS-FeedManager/www/directories.vspx
index 24a5d43..d749ac4 100644
--- a/appsrc/ODS-FeedManager/www/directories.vspx
+++ b/appsrc/ODS-FeedManager/www/directories.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: directories.vspx,v 1.6.2.5 2010/10/13 12:14:21 source Exp $
+ -  $Id: directories.vspx,v 1.6.2.7 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -279,7 +279,7 @@
 
               <div style="padding: 0.5em 0 0.5em 0;">
                 <v:text name="channel_id" type="hidden" value="--''" format="%s"/>
-                <?vsp http(sprintf('<input type="button" value="Add feed(s)" onClick="javascript:windowShow(\'channels_select.vspx?sid=%s&realm=%s&dst=m&src=s&params=channel_id:s1;&ex=%d\', 800)" class="button"/>', self.sid, self.realm, self.v_id)); ?>
+                <?vsp http(sprintf('<input type="button" value="Add feed(s)" onClick="javascript:windowShow(\'channels_select.vspx?dst=m&src=s&params=channel_id:s1;&ex=%d\')" class="button"/>', self.v_id)); ?>
               </div>
 
               <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
diff --git a/appsrc/ODS-FeedManager/www/enews_login.vspx b/appsrc/ODS-FeedManager/www/enews_login.vspx
index dce8090..ce74d64 100644
--- a/appsrc/ODS-FeedManager/www/enews_login.vspx
+++ b/appsrc/ODS-FeedManager/www/enews_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: enews_login.vspx,v 1.5.2.5 2010/10/07 13:23:03 source Exp $
+ -  $Id: enews_login.vspx,v 1.5.2.6 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/error.vspx b/appsrc/ODS-FeedManager/www/error.vspx
index b69ea73..4825a69 100644
--- a/appsrc/ODS-FeedManager/www/error.vspx
+++ b/appsrc/ODS-FeedManager/www/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.5.2.1 2010/09/20 10:15:15 source Exp $
+ -  $Id: error.vspx,v 1.5.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/export.vspx b/appsrc/ODS-FeedManager/www/export.vspx
index 9411552..e7b8180 100644
--- a/appsrc/ODS-FeedManager/www/export.vspx
+++ b/appsrc/ODS-FeedManager/www/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: export.vspx,v 1.10.2.5 2010/10/07 13:23:03 source Exp $
+ -  $Id: export.vspx,v 1.10.2.6 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/folders.vspx b/appsrc/ODS-FeedManager/www/folders.vspx
index cb81e0d..8bb5f8a 100644
--- a/appsrc/ODS-FeedManager/www/folders.vspx
+++ b/appsrc/ODS-FeedManager/www/folders.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: folders.vspx,v 1.6.2.4 2010/10/13 12:14:21 source Exp $
+ -  $Id: folders.vspx,v 1.6.2.5 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/gems.vsp b/appsrc/ODS-FeedManager/www/gems.vsp
index a4d5e12..07db596 100644
--- a/appsrc/ODS-FeedManager/www/gems.vsp
+++ b/appsrc/ODS-FeedManager/www/gems.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: gems.vsp,v 1.1.2.3 2010/10/07 13:23:03 source Exp $
+--  $Id: gems.vsp,v 1.1.2.4 2012/03/08 10:46:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/item.vspx b/appsrc/ODS-FeedManager/www/item.vspx
index 77cc5ad..f8303fb 100644
--- a/appsrc/ODS-FeedManager/www/item.vspx
+++ b/appsrc/ODS-FeedManager/www/item.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: item.vspx,v 1.4.2.4 2010/10/07 13:23:03 source Exp $
+ -  $Id: item.vspx,v 1.4.2.7 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -84,6 +84,8 @@
                   where EFI_ID = item_id) do
             {
               declare lt, ut, en, rt, ft, mt, bt, ct, tt varchar;
+
+            self.rdf_iri := SIOC..feed_item_iri (EF_ID, item_id);
               if (isnull(EFI_LINK))
               {
               lt := EFI_TITLE;
@@ -108,7 +110,7 @@
 
               ct := '';
               if (not isnull(EFI_COMMENT_API))
-              ct := sprintf('<span onclick="javascript: window.open(\'blog.vspx?sid=%s&realm=%s&mode=comment&did=%d&aid=%d&fid=%d\', \'\', \'width=640,height=450\'); return false;" title="%s" class="link">| %s</span>', sid, realm, domain_id, account_id, EFI_ID, 'Comment This', 'Comment This');
+              ct := sprintf ('<span onclick="javascript: windowShow(\'blog.vspx?mode=comment&did=%d&aid=%d&fid=%d\');" title="%s" class="link">| %s</span>', domain_id, account_id, EFI_ID, 'Comment This', 'Comment This');
 
               tags := ENEWS.WA.tags_account_item_select(domain_id, account_id, item_id);
               tags := ENEWS.WA.tags2vector (tags);
@@ -191,6 +193,8 @@
                     where EFI_ID = item_id) do
             {
               declare lt, ut, en, rt, ft, mt, bt, ct, tt, cv, an varchar;
+
+            self.rdf_iri := SIOC..feed_item_iri (EF_ID, item_id);
               if (isnull(EFI_LINK))
               {
               lt := EFI_TITLE;
@@ -224,7 +228,7 @@
               if (mail_domain_id)
               {
                 mt := sprintf('subject=%U&body=%U', sprintf('OFM post: %s', EFI_TITLE), sprintf('OFM post:\n\nFeed: %s - %s\nPost: %s - %s', EFD_TITLE, EF_URI, EFI_TITLE, EFI_LINK));
-              mt := sprintf(' | <span onclick="javascript: window.open(\'../../oMail/%d/write.vsp?sid=%s&realm=%s&return=F1&html=0&%s\', \'\', \'width=800,height=500\'); return false;" title="%s" class="link">%s</span>', mail_domain_id, sid, realm, mt, 'Mail This', 'Mail');
+              mt := sprintf (' | <span onclick="javascript: windowShow(\'../../oMail/%d/write.vsp?return=F1&html=0&%s\');" title="%s" class="link">%s</span>', mail_domain_id, mt, 'Mail This', 'Mail');
               } else {
                 mt := sprintf('subject=%s&body=%s', sprintf('OFM post: %s', EFI_TITLE), sprintf('OFM post:\n\nChannel: %s - %s\nPost: %s - %s', EFD_TITLE, EF_URI, EFI_TITLE, EFI_LINK));
                 mt := sprintf(' | <a href="mailto:?%s" title="%s">%s</a>', mt, 'Mail This', 'Mail');
@@ -232,15 +236,15 @@
 
               -- Comment this
               if (not isnull(EFI_COMMENT_API))
-              ct := sprintf(' | <span onclick="javascript: window.open(\'blog.vspx?sid=%s&realm=%s&mode=comment&did=%d&aid=%d&fid=%d\', \'\', \'width=640,height=450\'); return false;" title="%s" class="link">%s</span>', sid, realm, domain_id, account_id, EFI_ID, 'Comment This', 'Comment');
+              ct := sprintf (' | <span onclick="javascript: windowShow(\'%s?mode=comment&fid=%d\');" title="%s" class="link">%s</span>', ENEWS.WA.page_url (domain_id, 'blog.vspx'), EFI_ID, 'Comment This', 'Comment');
 
               -- Annotation
               if (account_id >= 0)
-              an := sprintf(' | <span onclick="javascript: window.open(\'annotea.vspx?sid=%s&realm=%s&did=%d&aid=%d&oid=%d\', \'\', \'width=700,height=500,scrollbars=yes\'); return false;" title="%s" class="link">%s</span>', sid, realm, domain_id, account_id, EFI_ID, 'Annotate', 'Annotate');
+              an := sprintf (' | <span onclick="javascript: windowShow(\'%s?oid=%d\');" title="%s" class="link">%s</span>', ENEWS.WA.page_url (domain_id, 'annotea.vspx'), EFI_ID, 'Annotate', 'Annotate');
 
             -- Discussion
             if ((ENEWS.WA.discussion_check ()) and (ENEWS.WA.conversation_enable(domain_id)))
-              cv := sprintf(' | <span onclick="javascript: window.open(\'conversation.vspx?sid=%s&realm=%s&fid=%d\', \'\', \'width=700,height=650,scrollbars=yes\'); return false;" title="%s" class="link">%s</span>', sid, realm, EFI_ID, 'Discussion', 'Discuss');
+              cv := sprintf (' | <span onclick="javascript: windowShow(\'%s?id=%d\');" title="%s" class="link">%s</span>', ENEWS.WA.page_url (domain_id, 'conversation.vspx'), EFI_ID, 'Discussion', 'Discuss');
 
               if (account_id >= 0)
               {
@@ -259,12 +263,12 @@
 
                 -- Blog this
                 if (ENEWS.WA.blog_check(domain_id))
-                bt := sprintf(' | <span onclick="javascript: window.open(\'blog.vspx?sid=%s&realm=%s&did=%d&aid=%d&fid=%d\', \'\', \'width=640,height=450\'); return false;" title="%s" class="link">%s</span>', sid, realm, domain_id, account_id, EFI_ID, 'Blog This', 'Blog');
+                bt := sprintf (' | <span onclick="javascript: windowShow(\'%s?fid=%d\');" title="%s" class="link">%s</span>', ENEWS.WA.page_url (domain_id, 'blog.vspx'), EFI_ID, 'Blog This', 'Blog');
               }
             -- Tags
               tt := '';
               if (account_id >= 0)
-              tt := tt || sprintf('<span onclick="javascript: window.open(\'tags.vspx?sid=%s&realm=%s&did=%d&aid=%d&fid=%d\', \'\', \'width=640,height=450\'); return false;" class="link" title="Revise tags">(Revise)</span>: <input type="text" name="tag"/>%s <span onclick="javascript: myPost(\'F1\', \'atag\', \'+\'); parent.Feeds.loadTags(); return false" class="link"><img src="image/add_16.png" border="0" alt="Add Tag" title="Add Tag" /></span>', sid, realm, domain_id, account_id, EFI_ID, tagError);
+              tt := tt || sprintf ('<span onclick="javascript: windowShow(\'%s?fid=%d\');" class="link" title="Revise tags">(Revise)</span>: <input type="text" name="tag"/>%s <span onclick="javascript: myPost(\'F1\', \'atag\', \'+\'); parent.Feeds.loadTags(); return false" class="link"><img src="image/add_16.png" border="0" alt="Add Tag" title="Add Tag" /></span>',  ENEWS.WA.page_url (domain_id, 'tags.vspx'), EFI_ID, tagError);
 
               tags := ENEWS.WA.tags_account_item_select(domain_id, account_id, item_id);
               tags := ENEWS.WA.tags2vector (tags);
diff --git a/appsrc/ODS-FeedManager/www/items.vspx b/appsrc/ODS-FeedManager/www/items.vspx
index f1b844e..e90637d 100644
--- a/appsrc/ODS-FeedManager/www/items.vspx
+++ b/appsrc/ODS-FeedManager/www/items.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: items.vspx,v 1.3.2.5 2010/10/13 12:14:22 source Exp $
+ -  $Id: items.vspx,v 1.3.2.8 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -166,6 +166,7 @@
                                   where EF_ID = %d
                                     and coalesce(EFI_DELETE_FLAG, 0) <> 1';
               sql := sprintf (sql, node_id);
+              self.rdf_iri := SIOC..feed_iri (node_id);
             }
             else if ((node_type = 'c') and (self.domain_id > 0))
             {
@@ -182,6 +183,7 @@
                                   where EFD_ID = %d
                                     and coalesce(EFI_DELETE_FLAG, 0) <> 1';
               sql := sprintf (sql, self.account_id, node_id);
+              self.rdf_iri := SIOC..feed_iri ((select EFD_FEED_ID from ENEWS.WA.FEED_DOMAIN where EFD_ID = node_id));
             }
             else if (node_type = 'f')
             {
@@ -473,7 +475,7 @@
 
         <div id="ds_navigation">
           <span>
-            <vm:ds-navigation data-set="ds"/>
+            <vm:ds-navigation data-set="ds" mode="compact"/>
           </span>
         </div>
       </v:data-set>
diff --git a/appsrc/ODS-FeedManager/www/js/enews.js b/appsrc/ODS-FeedManager/www/js/enews.js
index 238eb03..e018e0a 100644
--- a/appsrc/ODS-FeedManager/www/js/enews.js
+++ b/appsrc/ODS-FeedManager/www/js/enews.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: enews.js,v 1.21.2.10 2010/10/07 13:23:04 source Exp $
+ *  $Id: enews.js,v 1.21.2.16 2012/03/08 11:48:58 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -508,8 +508,10 @@ Feeds.listFavourites = function ()
 Feeds.aboutDialog = function ()
 {
   var aboutDiv = $('aboutDiv');
-  if (aboutDiv) {OAT.Dom.unlink(aboutDiv);}
-  aboutDiv = OAT.Dom.create('div', {width:'430px', height:'150px'});
+  if (aboutDiv)
+    OAT.Dom.unlink(aboutDiv);
+
+  aboutDiv = OAT.Dom.create('div', {height: '160px', overflow: 'hidden'});
   aboutDiv.id = 'aboutDiv';
   aboutDialog = new OAT.Dialog('About ODS FeedsManager', aboutDiv, {width:445, buttons: 0, resize:0, modal:1});
 	aboutDialog.cancel = aboutDialog.hide;
@@ -558,6 +560,19 @@ function vspxPost(fButton, fName, fValue, f2Name, f2Value, f3Name, f3Value)
   doPost ('F1', fButton);
 }
 
+function odsPost(obj, fields, button) {
+  var form = getParent (obj, 'form');
+  var formName = form.name;
+  for (var i = 0; i < fields.length; i += 2)
+    createHidden(formName, fields[i], fields[i+1]);
+
+  if (button) {
+    doPost(formName, button);
+  } else {
+    form.submit();
+  }
+}
+
 function dateFormat(date, format) {
 	function long(d) {
 		return ((d < 10) ? "0" : "") + d;
@@ -835,19 +850,22 @@ function showTab(tabs, tabsCount, tabNo)
 }
   }
 
-function windowShow(sPage, width, height)
-{
+function windowShow(sPage, sPageName, width, height) {
   if (width == null)
-    width = 500;
+		width = 700;
   if (height == null)
-    height = 420;
-  sPage = sPage + '&sid=' + document.forms[0].elements['sid'].value + '&realm=' + document.forms[0].elements['realm'].value;
-  win = window.open(sPage, null, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
+		height = 500;
+  if (sPage.indexOf('form=') == -1)
+    sPage += '&form=F1';
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
 
-function rowSelect(obj)
-{
+function rowSelect(obj) {
   var submitMode = false;
   if (window.document.F1.elements['src'])
     if (window.document.F1.elements['src'].value.indexOf('s') != -1)
@@ -1012,6 +1030,13 @@ function urlParam(fldName)
   return '';
 }
 
+function myA(obj) {
+  if (obj.href) {
+    document.location = obj.href + '?' + urlParam('sid') + urlParam('realm');
+    return false;
+  }
+}
+
 function urlParams(mask)
 {
   var S = '';
@@ -1090,7 +1115,8 @@ function checkState()
         setTimeout("checkState()", 1000);
 			} else {
       progressTimer = null;
-        doPost ('F1', 'btn_Stop');
+      $('btn_Stop').value = 'Close';
+      OAT.Dom.hide('btn_Background');
 			}
 	  }
   OAT.AJAX.POST('ajax.vsp', "a=load&sa=state&id="+progressID+urlParams("sid")+urlParams("realm"), x);
@@ -1159,9 +1185,17 @@ function showProgress(progressIndex)
 }
 }
 
-function davBrowse (fld)
-{
-  var options = {mode: 'browser', onConfirmClick: function(path, fname){$(fld).value = path + fname;}};
+function davBrowse(fld, folders) {
+	/* load stylesheets */
+	OAT.Style.include("grid.css");
+	OAT.Style.include("webdav.css");
+
+  var options = {
+    mode: 'browser',
+    onConfirmClick: function(path, fname){$(fld).value = '/DAV' + path + fname;}
+  };
+  if (!folders) {folders = false;}
+  OAT.WebDav.options.foldersOnly = folders;
   OAT.WebDav.open(options);
 }
 
diff --git a/appsrc/ODS-FeedManager/www/news.vsp b/appsrc/ODS-FeedManager/www/news.vsp
index e0b357a..2b11cac 100644
--- a/appsrc/ODS-FeedManager/www/news.vsp
+++ b/appsrc/ODS-FeedManager/www/news.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: news.vsp,v 1.7.2.2 2010/09/20 10:15:15 source Exp $
+--  $Id: news.vsp,v 1.7.2.3 2012/03/08 10:46:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/news.vspx b/appsrc/ODS-FeedManager/www/news.vspx
index e41364f..d48cb31 100644
--- a/appsrc/ODS-FeedManager/www/news.vspx
+++ b/appsrc/ODS-FeedManager/www/news.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: news.vspx,v 1.21.2.4 2010/10/07 13:23:03 source Exp $
+ -  $Id: news.vspx,v 1.21.2.5 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/search.vspx b/appsrc/ODS-FeedManager/www/search.vspx
index e709fad..67f2625 100644
--- a/appsrc/ODS-FeedManager/www/search.vspx
+++ b/appsrc/ODS-FeedManager/www/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: search.vspx,v 1.18.2.9 2010/10/13 12:14:22 source Exp $
+ -  $Id: search.vspx,v 1.18.2.10 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/settings.vspx b/appsrc/ODS-FeedManager/www/settings.vspx
index 5cb7eff..0b60e61 100644
--- a/appsrc/ODS-FeedManager/www/settings.vspx
+++ b/appsrc/ODS-FeedManager/www/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: settings.vspx,v 1.13.2.4 2010/10/13 12:14:22 source Exp $
+ -  $Id: settings.vspx,v 1.13.2.6 2012/03/08 11:48:57 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -212,6 +212,17 @@
       	    ]]>
       	  </v:on-post>
         </v:button>
+        <v:button name="clear" action="simple" value="Clear" xhtml_onclick="javascript: return confirm (\'Do you want to reset settings to default?\');" xhtml_class="form-button">
+          <v:on-post>
+            <![CDATA[
+              delete from ENEWS.WA.SETTINGS where ES_DOMAIN_ID = self.domain_id;
+              ENEWS.WA.nntp_update (self.domain_id, null, null, 1, 0);
+              commit work;
+
+              self.vc_data_bind(e);
+            ]]>
+          </v:on-post>
+        </v:button>
         <v:button action="simple" value="Cancel" xhtml_class="form-button">
           <v:on-post>
             <![CDATA[
diff --git a/appsrc/ODS-FeedManager/www/sfolders.vspx b/appsrc/ODS-FeedManager/www/sfolders.vspx
index beeded3..692cdbf 100644
--- a/appsrc/ODS-FeedManager/www/sfolders.vspx
+++ b/appsrc/ODS-FeedManager/www/sfolders.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sfolders.vspx,v 1.7.2.6 2010/10/13 12:14:22 source Exp $
+ -  $Id: sfolders.vspx,v 1.7.2.8 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -89,6 +89,9 @@
             control.ds_sql := concat(control.ds_sql, ' order by ', self.sf_order, ' ', self.sf_direction);
           ]]>
         </v:before-data-bind>
+          <v:after-data-bind>
+            control.ds_make_statistic ();
+          </v:after-data-bind>
       </v:data-source>
       <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
         <div style="padding: 0 0 0.5em 0;">
@@ -101,6 +104,14 @@
               ]]>
             </v:on-post>
           </v:button>
+            <v:button value="delete" action="simple" xhtml_onclick="return confirmAction(\'Are you sure that you want to delete this smart folder?\');" xhtml_class="button" xhtml_alt="Delete Smart folder">
+              <v:on-post>
+                <![CDATA[
+                  ENEWS.WA.sfolder_delete(self.domain_id, cast((control.vc_parent as vspx_row_template).te_column_value('ESFO_ID') as integer));
+          		    self.vc_data_bind(e);
+                ]]>
+              </v:on-post>
+            </v:button>
         </div>
 
         <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
@@ -113,7 +124,7 @@
                 <th>
                   <?vsp self.sortColumn('Title', 'ESFO_NAME'); ?>
                 </th>
-                  <th width="5%" colspan="2">
+                  <th width="1%">
                   <v:label value="Action" format="%s"/>
                 </th>
               </tr>
@@ -126,7 +137,7 @@
           <v:template name="ds_empty" type="if-not-exists" name-to-remove="table" set-to-remove="both">
             <table id="list" cellspacing="0">
               <tr align="center">
-                <td colspan="4">No Smart folders</td>
+                  <td colspan="3">No Smart folders</td>
               </tr>
             </table>
           </v:template>
@@ -153,16 +164,6 @@
                     </v:on-post>
                   </v:button>
                 </td>
-                <td nowrap="nowrap">
-                  <v:button value="delete" action="simple" xhtml_onclick="return confirmAction(\'Are you sure that you want to delete this smart folder?\');" xhtml_class="button" xhtml_alt="Delete Smart folder">
-                    <v:on-post>
-                      <![CDATA[
-                        ENEWS.WA.sfolder_delete(self.domain_id, cast((control.vc_parent as vspx_row_template).te_column_value('ESFO_ID') as integer));
-                		    self.vc_data_bind(e);
-                      ]]>
-                    </v:on-post>
-                  </v:button>
-                </td>
               </tr>
             </table>
           </v:template>
@@ -170,66 +171,9 @@
         </v:template>
 
         <v:template name="ds_footer" type="simple" name-to-remove="table" set-to-remove="top">
-          <table id="list" cellspacing="0">
-            <v:template type="simple" enabled="--case when self.ds.ds_rows_fetched > 0 then 1 else 0 end;">
-              <tr class="td_border">
-                <td align="right" colspan="2" class="td_border">
-                  <b>Selected&nbsp;</b>
-                </td>
-                <td class="td_border">
-                  &nbsp;
-                </td>
-                <td nowrap="nowrap" class="td_border">
-                  <v:button value="delete" action="simple" xhtml_onclick="return confirmAction(\'Are you sure that you want to delete selected smart folder(s)?\', this.form, \'cb_item\', \'No smart folders were selected to be deleted.\');" xhtml_class="button" xhtml_alt="Delete selected Smart folders">
-                    <v:on-post>
-                      <![CDATA[
-                        declare i integer;
-
-                          for (i := 0; i < length(e.ve_params); i := i + 2)
-                          {
-                            if (e.ve_params[i] = 'cb_item')
-                            {
-                              declare exit handler for sqlstate '*'
-                              {
-                              rollback work;
-                              goto _next;
-                            };
-                            commit work;
-
-                            ENEWS.WA.sfolder_delete(self.domain_id, e.ve_params[i+1]);
-                          }
-                          _next:;
-                        }
-              		      self.vc_data_bind(e);
-                      ]]>
-                    </v:on-post>
-                  </v:button>
-                </td>
-              </tr>
-              <tr class="td_border">
-                <td align="right" colspan="2" class="td_border">
-                  <b>All&nbsp;</b>
-                </td>
-                <td class="td_border">
-                  &nbsp;
-                </td>
-                <td nowrap="nowrap" class="td_border">
-                  <v:button value="delete" action="simple" xhtml_onclick="return confirmAction(\'Are you sure that you want to delete all smart folder(s)?\');" xhtml_class="button" xhtml_alt="Delete all Smart folders">
-                    <v:on-post>
-                      <![CDATA[
-                        for (select ESFO_ID from ENEWS.WA.SFOLDER where ESFO_DOMAIN_ID = self.domain_id) do
-                          {
-                          ENEWS.WA.sfolder_delete(self.domain_id, ESFO_ID);
-                          }
-              		      self.vc_data_bind(e);
-                      ]]>
-                    </v:on-post>
-                  </v:button>
-                </td>
-              </tr>
-            </v:template>
+            <table>
             <tr>
-              <td align="center" colspan="4">
+                <td align="right" colspan="3">
                 <vm:ds-navigation data-set="ds"/>
               </td>
             </tr>
diff --git a/appsrc/ODS-FeedManager/www/tags.vspx b/appsrc/ODS-FeedManager/www/tags.vspx
index 6d4ca4a..d9656a4 100644
--- a/appsrc/ODS-FeedManager/www/tags.vspx
+++ b/appsrc/ODS-FeedManager/www/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.6.2.1 2010/09/20 10:15:16 source Exp $
+ -  $Id: tags.vspx,v 1.6.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/www/template/popup.vspx b/appsrc/ODS-FeedManager/www/template/popup.vspx
index 1ec92e7..ebcb3a0 100644
--- a/appsrc/ODS-FeedManager/www/template/popup.vspx
+++ b/appsrc/ODS-FeedManager/www/template/popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: popup.vspx,v 1.10.2.5 2010/10/07 13:23:04 source Exp $
+ -  $Id: popup.vspx,v 1.10.2.9 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <html xmlns:v="http://www.openlinksw.com/vspx/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
   <head profile="http://internetalchemy.org/2003/02/profile">
+    <base href="<?V ENEWS.WA.host_url () || http_path () ?>" /><![CDATA[<!--[if IE]></base><![endif]-->]]>
+    <?vsp
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
+    ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
       <script type="text/javascript">
@@ -36,6 +43,7 @@
       </script>
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="/ods/app.js"></script>
       <script type="text/javascript" src="js/enews.js"></script>
       <script type="text/javascript">
@@ -61,18 +69,22 @@
           showTab('a', 2, 0);
         }
         OAT.MSG.attach(OAT, 'OAT_LOADED', myInit);
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
+      		}
+      	}
       </script>
     ]]>
     <title></title>
   </head>
   <body>
     <v:page name="popup" xmlns:v="http://www.openlinksw.com/vspx/">
-      <vm:variables>
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_rights" type="varchar" default="''"/>
         <v:variable persist="0" name="settings" type="any" />
-      </vm:variables>
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
diff --git a/appsrc/ODS-FeedManager/www/template/template.vspx b/appsrc/ODS-FeedManager/www/template/template.vspx
index ce73089..92d1b17 100644
--- a/appsrc/ODS-FeedManager/www/template/template.vspx
+++ b/appsrc/ODS-FeedManager/www/template/template.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.vspx,v 1.33.2.8 2010/10/07 13:23:04 source Exp $
+ -  $Id: template.vspx,v 1.33.2.14 2012/03/08 11:48:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -40,48 +40,45 @@
       http (sprintf ('\n    <link rel="alternate" type="application/atom+xml" title="%V Atom" href="%s" />', domainName, ENEWS.WA.gems_url (self.domain_id)||'OFM.atom'));
       http (sprintf ('\n    <link rel="subscriptions" type="text/x-opml" title="%V Subscriptions" href="%sexport.vspx?output=OPML" />', domainName, ENEWS.WA.enews_url (self.domain_id)));
       http (ENEWS.WA.geo_url (self.domain_id, self.account_id));
+
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
     ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta name="dc.description" content="<?V ENEWS.WA.utf2wide (ENEWS.WA.domain_description (self.domain_id)) ?>" />
     <meta name="dc.title" content="<?V ENEWS.WA.utf2wide (ENEWS.WA.domain_description (self.domain_id)) ?>" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
-      <script type="text/javascript">
-        var toolkitPath="/ods/oat";
-        var imagePath="/ods/images/oat/";
-        
-        var featureList=["ajax", "json", "tree", "anchor", "dialog", "ghostdrag", "dav", "calendar"];
-      </script>
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
-      <script type="text/javascript" src="/ods/tbl.js"></script>
-      <script type="text/javascript" src="/ods/app.js"></script>
-      <script type="text/javascript" src="js/enews.js"></script>
       <script type="text/javascript">
-        function myInit() {
-          if (!OAT._loaded) {
-            setTimeout(myInit, 50);
-            return;
-          }
           OAT.Preferences.imagePath = '/ods/images/oat/';
           OAT.Preferences.stylePath = '/ods/oat/styles/';
           OAT.Preferences.showAjax = false;
 
-        	/* load stylesheets */
-        	OAT.Style.include("grid.css");
-        	OAT.Style.include("webdav.css");
-
-          // WebDAV
-          var options = { imagePath: OAT.Preferences.imagePath,
+        // DAV
+        var davOptions = {
+          imagePath: OAT.Preferences.imagePath,
                           pathHome: '/home/',
                           path: '<?V ENEWS.WA.dav_logical_home (self.account_id) ?>',
                           user: '<?V ENEWS.WA.account_name (self.account_id) ?>',
                           connectionHeaders: {Authorization: '<?V ENEWS.WA.account_basicAuthorization (self.account_id) ?>'}
                         };
-          OAT.WebDav.init(options);
 
-          // a++
-          OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-          OAT.Anchor.zIndex = 1001;
+        var featureList=["ajax", "json", "anchor", "dialog", "tree", "calendar"];
+        OAT.Loader.load(featureList);
+      </script>
+      <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
+      <script type="text/javascript" src="/ods/app.js"></script>
+      <script type="text/javascript" src="js/enews.js"></script>
+      <script type="text/javascript">
+        function myInit() {
+          if (!OAT._loaded || !OAT.Tree) {
+            setTimeout(myInit, 50);
+            return;
+          }
         
           if (<?V cast (get_keyword ('app', self.settings, '0') as integer) ?> > 0)
             generateAPP('app_area', {appActivation: "<?V case when cast (get_keyword ('app', self.settings, '1') as integer) = 2 then 'hover' else 'click' end ?>"});
@@ -110,6 +107,7 @@
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
       <v:variable persist="0" name="account_rights" type="varchar" default="''"/>
         <v:variable persist="0" name="settings" type="any" />
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
diff --git a/appsrc/ODS-FeedManager/www/template/template.xsl b/appsrc/ODS-FeedManager/www/template/template.xsl
index e4b40a0..d072c5b 100644
--- a/appsrc/ODS-FeedManager/www/template/template.xsl
+++ b/appsrc/ODS-FeedManager/www/template/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.xsl,v 1.29.2.8 2010/10/13 12:14:22 source Exp $
+ -  $Id: template.xsl,v 1.29.2.10 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -108,8 +108,7 @@
     </xsl:for-each>
     <xsl:if test="not @clean or @clean = 'no'">
       <div style="padding: 0 0 0.5em 0;">
-        &nbsp;<a href="javascript: void (0);" onclick="javascript: if (opener != null) opener.focus(); window.close();"><img src="image/close_16.png" border="0" alt="Close" title="Close" />&nbsp;Close</a>
-        <hr />
+        <span class="button pointer" onclick="javascript: if (opener != null) opener.focus(); window.close();"><img class="button" src="/ods/images/icons/close_16.png" border="0" alt="Close" title="Close" /> Close</span>
       </div>
     </xsl:if>
     <div id="app_area">
@@ -355,9 +354,12 @@
     <?vsp
       {
         declare n_start, n_end, n_total integer;
+      declare mode any;
         declare ds vspx_data_set;
+      declare _prev, _next vspx_button;
 
-        ds := self.vc_find_descendant_control ('<xsl:value-of select="@data-set" />');
+      mode := '<xsl:value-of select="string(@mode)" />';
+      ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
         if (isnull (ds.ds_data_source))
         {
           n_total := ds.ds_rows_total;
@@ -372,57 +374,42 @@
           n_end := n_total;
 
         if (n_total)
-          http (sprintf ('%d - %d of %d', n_start, n_end, n_total));
+        http (sprintf ('%s%d - %d of %d', case when (mode = 'compact') then '' else 'Showing ' end, n_start, n_end, n_total));
 
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first integer;
-
-  	    d_prev := d_next := d_last := d_first := 0;
-  	    _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-  	    _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
   	    _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
   	    _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (not (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled))
-        {
-          if (n_total)
+      if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
             http (' | ');
-        if (_first is not null and not _first.vc_enabled)
-    	    d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-    	    d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-    	    d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-    	    d_last := 1;
-        }
     ?>
-    <?vsp
-      if (d_first)
-        http ('<img src="/ods/images/skin/pager/p_first_gr.png" alt="First Page" title="First Page" border="0" />first ');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="/ods/images/skin/pager/p_first.png" xhtml_alt="First" text="first&nbsp;" />
-    <?vsp
-      if (d_prev)
-        http ('<img src="/ods/images/skin/pager/p_prev_gr.png" alt="Previous Page" title="Previous Page" border="0" />prev ');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="/ods/images/skin/pager/p_prev.png" xhtml_alt="Previous" text="prev&nbsp;" />
-    <?vsp
-      if (d_next)
-        http ('<img src="/ods/images/skin/pager/p_next_gr.png" alt="Next Page" title="Next Page" border="0" />next ');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="/ods/images/skin/pager/p_next.png" xhtml_alt="Next" text="next&nbsp;" />
-    <?vsp
-      if (d_last)
-        http ('<img src="/ods/images/skin/pager/p_last_gr.png" alt="Last Page" title="Last Page" border="0" />last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="/ods/images/skin/pager/p_last.png" xhtml_alt="Last" text="last" />
-    <?vsp
-      }
-    ?>
+    <v:button name="{@data-set}_first" action="simple" style="url" value="{@mode}" xhtml_alt="First" xhtml_class="navi-button" >
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/>' || case when (control.ufl_value = 'compact') then '' else ' First' end;
+        ]]>
+      </v:before-render>
+    </v:button>
+    <v:button name="{@data-set}_prev" action="simple" style="url" value="{@mode}" xhtml_alt="Previous" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/>' || case when (control.ufl_value = 'compact') then '' else ' Prev' end;
+        ]]>
+      </v:before-render>
+    </v:button>
+    <v:button name="{@data-set}_next" action="simple" style="url" value="{@mode}" xhtml_alt="Next" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/>' || case when (control.ufl_value = 'compact') then '' else ' Next' end;;
+        ]]>
+      </v:before-render>
+    </v:button>
+    <v:button name="{@data-set}_last" action="simple" style="url" value="{@mode}" xhtml_alt="Last" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/>' || case when (control.ufl_value = 'compact') then '' else ' Last ' end;;
+        ]]>
+      </v:before-render>
+    </v:button>
+    <?vsp } ?>
   </xsl:template>
 
   <!--=========================================================================-->
diff --git a/appsrc/ODS-FeedManager/www/weblog.vspx b/appsrc/ODS-FeedManager/www/weblog.vspx
index a538aaa..1dc7e09 100644
--- a/appsrc/ODS-FeedManager/www/weblog.vspx
+++ b/appsrc/ODS-FeedManager/www/weblog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: weblog.vspx,v 1.9.2.4 2010/10/13 12:14:22 source Exp $
+ -  $Id: weblog.vspx,v 1.9.2.5 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/xslt/foaf.xsl b/appsrc/ODS-FeedManager/xslt/foaf.xsl
index 41798cc..26f2d8f 100644
--- a/appsrc/ODS-FeedManager/xslt/foaf.xsl
+++ b/appsrc/ODS-FeedManager/xslt/foaf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: foaf.xsl,v 1.2.2.1 2010/09/20 10:15:16 source Exp $
+ -  $Id: foaf.xsl,v 1.2.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/xslt/rss2atom.xsl b/appsrc/ODS-FeedManager/xslt/rss2atom.xsl
index 86d363d..54f25c1 100644
--- a/appsrc/ODS-FeedManager/xslt/rss2atom.xsl
+++ b/appsrc/ODS-FeedManager/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.3.2.3 2010/09/20 10:15:16 source Exp $
+ -  $Id: rss2atom.xsl,v 1.3.2.4 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/xslt/rss2atom03.xsl b/appsrc/ODS-FeedManager/xslt/rss2atom03.xsl
index 3f7456d..44ac8c9 100644
--- a/appsrc/ODS-FeedManager/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-FeedManager/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.3.2.2 2010/09/20 10:15:16 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.3.2.3 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/xslt/rss2rdf.xsl b/appsrc/ODS-FeedManager/xslt/rss2rdf.xsl
index 26c06dc..9a730d1 100644
--- a/appsrc/ODS-FeedManager/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-FeedManager/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.4.2.2 2010/09/20 10:15:17 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.4.2.3 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-FeedManager/xslt/rss2xbel.xsl b/appsrc/ODS-FeedManager/xslt/rss2xbel.xsl
index 99f98d6..cce3e11 100644
--- a/appsrc/ODS-FeedManager/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-FeedManager/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/Makefile.am b/appsrc/ODS-Framework/Makefile.am
index 55b20bd..c4597f4 100644
--- a/appsrc/ODS-Framework/Makefile.am
+++ b/appsrc/ODS-Framework/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -47,12 +47,14 @@ EXTRA_DIST = \
 	*.css \
 	*.html \
 	*.js \
+	*.php \
 	*.sql \
 	*.txt \
 	*.vsp \
 	*.vspx \
 	*.xml \
 	*.xsl \
+	ckeditor/*.css \
 	ckeditor/*.html \
 	ckeditor/*.js \
 	ckeditor/images/*.gif \
@@ -135,6 +137,4 @@ EXTRA_DIST = \
 	users/js/*.js \
 	users/users.jsp \
 	users/users.rb \
-	vad_version \
-	version.base \
-	version.curr
+	vad_version
diff --git a/appsrc/ODS-Framework/Makefile.in b/appsrc/ODS-Framework/Makefile.in
index d57c5da..b71ca82 100644
--- a/appsrc/ODS-Framework/Makefile.in
+++ b/appsrc/ODS-Framework/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -310,12 +312,14 @@ EXTRA_DIST = \
 	*.css \
 	*.html \
 	*.js \
+	*.php \
 	*.sql \
 	*.txt \
 	*.vsp \
 	*.vspx \
 	*.xml \
 	*.xsl \
+	ckeditor/*.css \
 	ckeditor/*.html \
 	ckeditor/*.js \
 	ckeditor/images/*.gif \
@@ -398,9 +402,7 @@ EXTRA_DIST = \
 	users/js/*.js \
 	users/users.jsp \
 	users/users.rb \
-	vad_version \
-	version.base \
-	version.curr
+	vad_version
 
 all: all-am
 
diff --git a/appsrc/ODS-Framework/aboutus.html b/appsrc/ODS-Framework/aboutus.html
index b2abf52..3e930bb 100644
--- a/appsrc/ODS-Framework/aboutus.html
+++ b/appsrc/ODS-Framework/aboutus.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: aboutus.html,v 1.2.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: aboutus.html,v 1.2.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/accounts.vspx b/appsrc/ODS-Framework/accounts.vspx
index 6fd0a2e..81a9138 100644
--- a/appsrc/ODS-Framework/accounts.vspx
+++ b/appsrc/ODS-Framework/accounts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: accounts.vspx,v 1.7.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: accounts.vspx,v 1.7.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/add_rule.vspx b/appsrc/ODS-Framework/add_rule.vspx
index 25bf19a..4733b0e 100644
--- a/appsrc/ODS-Framework/add_rule.vspx
+++ b/appsrc/ODS-Framework/add_rule.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: add_rule.vspx,v 1.4.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: add_rule.vspx,v 1.4.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/admin.vspx b/appsrc/ODS-Framework/admin.vspx
index 580da4a..b3e7ca0 100644
--- a/appsrc/ODS-Framework/admin.vspx
+++ b/appsrc/ODS-Framework/admin.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: admin.vspx,v 1.4.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: admin.vspx,v 1.4.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/advertise.html b/appsrc/ODS-Framework/advertise.html
index d8e99b7..86a4f5b 100644
--- a/appsrc/ODS-Framework/advertise.html
+++ b/appsrc/ODS-Framework/advertise.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: advertise.html,v 1.2.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: advertise.html,v 1.2.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/afoaf.xml b/appsrc/ODS-Framework/afoaf.xml
index 9d4a134..e7167aa 100644
--- a/appsrc/ODS-Framework/afoaf.xml
+++ b/appsrc/ODS-Framework/afoaf.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: afoaf.xml,v 1.5.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: afoaf.xml,v 1.5.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app.js b/appsrc/ODS-Framework/app.js
index 014f7eb..3e62452 100644
--- a/appsrc/ODS-Framework/app.js
+++ b/appsrc/ODS-Framework/app.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -30,13 +30,12 @@ function generateAPPAnchor(options, app)
   var useRDFB = options.useRDFB;
   var searchECRM = options.searchECRM;
   // If we use a separate image to make a++, then actual anchor is previous sibling
-  if (app.tagName == "IMG")
-  {
+  if (app.tagName == "IMG") {
     link = app.previousSibling;
     appHref = link.href;
   }
   var genRef = function() {
-    var ul = OAT.Dom.create("div",{paddingLeft:"20px",marginLeft:"0px"});
+    var ul = OAT.Dom.create("div",{paddingLeft:"5px",marginLeft:"0px"});
 
     // html link
     /*
@@ -65,8 +64,7 @@ function generateAPPAnchor(options, app)
     */
 
     // rdf link
-    if (appIRI)
-    {
+    if (appIRI) {
       var a = OAT.Dom.create("a");
       var img = OAT.Dom.image("/ods/images/icons/rdf-icon-16.gif");
       img.style["border"] = "0px";
@@ -81,8 +79,7 @@ function generateAPPAnchor(options, app)
       ul.appendChild(elm);
     }
 
-    if (ul.innerHTML != "")
-    {
+    if (ul.innerHTML != "") {
       var elm = OAT.Dom.create("hr");
       ul.appendChild(elm);
     }
@@ -107,29 +104,22 @@ function generateAPPAnchor(options, app)
       	var imgSrc = generateAPP_image (aType, imgPath);
       	var tp = "", sm = OAT.Dom.create("small");
       	var pos = aType.lastIndexOf ('#');
-      	if (pos == -1)
-      	{
+      	if (pos == -1) {
       	  aType.lastIndexOf ('/');
-      	}
-      	if (pos != -1)
-      	{
+      	} else {
       	  tp = aType.substring (pos+1);
       	  tp = ' ('+tp+')';
    	      sm.appendChild(OAT.Dom.text(tp));
       	}
-      	var elm = OAT.Dom.create("div");
+      	var elm = OAT.Dom.create("div", {className:"app_item"});
       	var a = OAT.Dom.create("a");
-        if (useRDFB == true)
-    	  {
+        if (useRDFB == true) {
           a.href = '/rdfbrowser/index.html?uri='+encodeURIComponent(aURL);
 	        a.target = "_blank";
-        }
-        else
-        {
+        } else {
 	        a.href = aURL;
         }
-      	if (imgSrc != "")
-      	{
+      	if (imgSrc != "") {
       	  var img = OAT.Dom.image(imgSrc);
       	  img.style["border"] = "0px";
       	  a.appendChild(img);
@@ -140,24 +130,19 @@ function generateAPPAnchor(options, app)
       	elm.appendChild(a);
       	ul.appendChild(elm);
       }
-      if (ul.innerHTML == "")
-      {
+      if (ul.innerHTML == "") {
         ul.innerHTML = "Empty list";
      	}
 	  }
     var search;
     //alert (app.childNodes[0].tagName);
-    if ((link.childNodes.length == 1) && (link.childNodes[0].tagName == "IMG"))
-    {
+    if ((link.childNodes.length == 1) && (link.childNodes[0].tagName == "IMG")) {
 	    search = link.childNodes[0].getAttribute("alt");
-    }
-    else
-    {
+    } else {
 	    search = link.innerHTML;
     }
     OAT.AJAX.GET("/ods_services/search/"+escape(search), false, cb, {type:OAT.AJAX.TYPE_XML, onstart:function(){}, onerror:function(){OAT.Dom.unlink(ul.lastChild);}});
-    if (searchECRM)
-    {
+    if (searchECRM) {
       OAT.AJAX.GET("/ods_services/search_ecrm/"+escape(search), false, cb, {type:OAT.AJAX.TYPE_XML, onstart:function(){}, onerror:function(){OAT.Dom.unlink(ul.lastChild);}});
     }
     return ul;
@@ -220,16 +205,13 @@ function generateAPP(appArea, optObj)
     useRDFB: false,
     searchECRM: false
   }
-  for (var p in optObj)
-  {
+  for (var p in optObj) {
     options[p] = optObj[p];
   }
   var appLinks = $(appArea).getElementsByTagName("a");
-  for (var i = 0; i < appLinks.length; i++)
-  {
+  for (var i = 0; i < appLinks.length; i++) {
     var app = appLinks[i];
-    if ((app.id) && (app.id.indexOf('cke_') != 0) && (app.href || app.onclick) && !OAT.Dom.isClass(app, 'noapp'))
-    {
+    if ((app.id) && (app.id.indexOf('cke_') != 0) && (app.href || app.onclick) && !OAT.Dom.isClass(app, 'noapp')) {
     	var img = OAT.Dom.image("/ods/images/icons/rdf_11.png");
     	img.style["border"] = "0px";
     	img.style["padding"] = "0 0 0 5px";
@@ -238,11 +220,10 @@ function generateAPP(appArea, optObj)
     	img.alt = "RDF";
     	img.title = "RDF";
     	var next = app.nextSibling;
-    	if (next != null)
-    	{
-    	  app.parentNode.insertBefore (img, next);
-    	} else {
+    	if (next) {
     	  app.parentNode.appendChild (img);
+    	} else {
+    	  app.parentNode.insertBefore (img, next);
     	}
     	generateAPPAnchor (options, img, OAT.Dom.isClass(app, 'searchECRM'));
     }
diff --git a/appsrc/ODS-Framework/app.vspx b/appsrc/ODS-Framework/app.vspx
index 80974f6..dadb873 100644
--- a/appsrc/ODS-Framework/app.vspx
+++ b/appsrc/ODS-Framework/app.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: app.vspx,v 1.6.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: app.vspx,v 1.6.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_inst.vspx b/appsrc/ODS-Framework/app_inst.vspx
index bbccd52..5e89de1 100644
--- a/appsrc/ODS-Framework/app_inst.vspx
+++ b/appsrc/ODS-Framework/app_inst.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: app_inst.vspx,v 1.19.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: app_inst.vspx,v 1.19.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_instance_limits.vspx b/appsrc/ODS-Framework/app_instance_limits.vspx
index a2758ca..444c2fb 100644
--- a/appsrc/ODS-Framework/app_instance_limits.vspx
+++ b/appsrc/ODS-Framework/app_instance_limits.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: app_instance_limits.vspx,v 1.4.2.1 2010/09/20 10:15:17 source Exp $
+ -  $Id: app_instance_limits.vspx,v 1.4.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_menu.js b/appsrc/ODS-Framework/app_menu.js
index 96ec3b7..8a11ce4 100644
--- a/appsrc/ODS-Framework/app_menu.js
+++ b/appsrc/ODS-Framework/app_menu.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: app_menu.js,v 1.3.2.1 2010/09/20 10:15:17 source Exp $
+ *  $Id: app_menu.js,v 1.3.2.2 2012/03/08 10:46:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_menu_settings.vspx b/appsrc/ODS-Framework/app_menu_settings.vspx
index 2d4b353..98c5762 100644
--- a/appsrc/ODS-Framework/app_menu_settings.vspx
+++ b/appsrc/ODS-Framework/app_menu_settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: app_menu_settings.vspx,v 1.7.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: app_menu_settings.vspx,v 1.7.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_my_inst.vspx b/appsrc/ODS-Framework/app_my_inst.vspx
index 85613d7..409c73e 100644
--- a/appsrc/ODS-Framework/app_my_inst.vspx
+++ b/appsrc/ODS-Framework/app_my_inst.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: app_my_inst.vspx,v 1.21.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: app_my_inst.vspx,v 1.21.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_sent_inv.vspx b/appsrc/ODS-Framework/app_sent_inv.vspx
index 834fedd..707f745 100644
--- a/appsrc/ODS-Framework/app_sent_inv.vspx
+++ b/appsrc/ODS-Framework/app_sent_inv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: app_sent_inv.vspx,v 1.4.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: app_sent_inv.vspx,v 1.4.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/app_settings.vspx b/appsrc/ODS-Framework/app_settings.vspx
index b269ffd..be6c5e3 100644
--- a/appsrc/ODS-Framework/app_settings.vspx
+++ b/appsrc/ODS-Framework/app_settings.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: app_settings.vspx,v 1.10.2.3 2011/03/08 13:28:13 source Exp $
+ -  $Id: app_settings.vspx,v 1.10.2.4 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/back_nav.vspx b/appsrc/ODS-Framework/back_nav.vspx
index d2f27be..c15a512 100644
--- a/appsrc/ODS-Framework/back_nav.vspx
+++ b/appsrc/ODS-Framework/back_nav.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: back_nav.vspx,v 1.5.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: back_nav.vspx,v 1.5.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/cert.vsp b/appsrc/ODS-Framework/cert.vsp
index 68c579c..87a27e6 100644
--- a/appsrc/ODS-Framework/cert.vsp
+++ b/appsrc/ODS-Framework/cert.vsp
@@ -18,14 +18,14 @@
    sid := {?'sid'};
    if (get_keyword ('pubkey', params) is not null)
      {
-       declare exts any;
+       declare exts, login any;
        whenever not found goto nf;
        select U_NAME, U_FULL_NAME, U_E_MAIL, WAUI_BORG, WAUI_BCOUNTRY, U_ID 
          into uname, cn, mail, o, c, uid
        	 from SYS_USERS, WA_USER_INFO, VSPX_SESSION
       	where VS_SID = sid and VS_REALM = 'wa' and VS_UID = U_NAME and U_ID = WAUI_U_ID;
        webid := sioc..person_iri (sioc..user_obj_iri (uname));
-       
+
        pk := replace (get_keyword ('pubkey', params), '\r\n', '');
        pk := replace (pk, '\n', '');
        pk := replace (pk, '\r', '');
@@ -36,14 +36,16 @@
        mail := get_keyword ('email', params, mail);
        webid := get_keyword ('webid', params, webid);
        if (length (webid))
-         {  
-	   webid := 'URI:' || webid;
+         {
+	   webid := 'URI:' || replace (webid, ',', '%2C');
 	   exts := vector ('subjectAltName', webid, 'nsComment', 'Virtuoso Generated Certificate');
          }
        else
          {
 	   exts := vector ('nsComment', 'Virtuoso Generated Certificate');
 	 }
+       exts := vector_concat (exts, vector ('keyUsage', 'critical, digitalSignature,keyEncipherment',
+					    'extendedKeyUsage', 'critical, clientAuth,emailProtection'));
        days := atoi (get_keyword ('days', params, '365'));
        hours := atof (get_keyword ('hours', params, '0.0'));
        xenc_x509_generate ('id_rsa', kname, sequence_next ('ca_id_rsa'), days,
@@ -56,9 +58,12 @@
 			exts,
 		        hours);
        cvalue := xenc_pem_export (kname);
+       login := 1;
+       if (exists (select 1 from WA_USER_CERTS where UC_U_ID = uid and UC_LOGIN = 1))
+         login := 0;
        insert into WA_USER_CERTS (UC_U_ID, UC_CERT, UC_FINGERPRINT, UC_LOGIN, UC_TS)
-		         values (uid, cvalue, get_certificate_info (6, cvalue, 0, ''), 0, now ());
-       http_rewrite (); 
+		         values (uid, cvalue, get_certificate_info (6, cvalue, 0, ''), login, now ());
+       http_rewrite ();
        http_header ('Content-Type: application/x-x509-user-cert\r\n');
        http (decode_base64 (xenc_X509_certificate_serialize (kname)));
        xenc_key_remove (kname);
@@ -74,40 +79,40 @@
 	 svc_url := (select  top 1 WS_CERT_GEN_URL from DB.DBA.WA_SETTINGS);
          if (length (svc_url)) {
          for select U_NAME, U_FULL_NAME, U_E_MAIL, WAUI_BORG, WAUI_BCOUNTRY from SYS_USERS, VSPX_SESSION, WA_USER_INFO
-      	where VS_SID = sid and VS_REALM = 'wa' and VS_UID = U_NAME and U_ID = WAUI_U_ID do 
+      	 where VS_SID = sid and VS_REALM = 'wa' and VS_UID = U_NAME and U_ID = WAUI_U_ID do
           {
             declare url varchar;
             webid := sioc..person_iri (sioc..user_obj_iri (U_NAME));
             url := sprintf ('%s?uri=%U&name=%U&email=%U&organization=%U',
-		svc_url, webid, coalesce (U_FULL_NAME, U_NAME), coalesce (U_E_MAIL, ''), coalesce (WAUI_BORG, '')); 
-	
+		svc_url, webid, coalesce (U_FULL_NAME, U_NAME), coalesce (U_E_MAIL, ''), coalesce (WAUI_BORG, ''));
+
      ?>
      <form>
 	<div>
- 	  <a class="button" href='<?vsp http (url); ?>'>Generate</a>	
+ 	  <a class="button" href='<?vsp http (url); ?>'>Generate</a>
         </div>
      </form>
-     	     
+
      <?vsp
-       }
-	 } 
+	   }
+	 }
 	else if (regexp_match ('Mozilla.*Windows.*Firefox.*\.NET CLR .*', ua) is not null)
 	  goto make_cert;
-        else 
-	 {  ?>Certificate & Key Generation Not Supported. You can export a PKCS12 file produced by other browsers instead <?vsp } 
+        else
+	 {  ?>Certificate & Key Generation Not Supported. You can export a PKCS12 file produced by other browsers instead <?vsp }
        }
        else
        {
  	 make_cert:;
          for select U_NAME, U_FULL_NAME, U_E_MAIL, WAUI_BORG, WAUI_BCOUNTRY from SYS_USERS, VSPX_SESSION, WA_USER_INFO
-      	    where VS_SID = sid and VS_REALM = 'wa' and VS_UID = U_NAME and U_ID = WAUI_U_ID do 
+      	    where VS_SID = sid and VS_REALM = 'wa' and VS_UID = U_NAME and U_ID = WAUI_U_ID do
 	    {
 	      cn := coalesce (U_FULL_NAME, U_NAME);
               webid := sioc..person_iri (sioc..user_obj_iri (U_NAME));
 	      mail := coalesce (U_E_MAIL, '');
 	      o := WAUI_BORG;
               c := WAUI_BCOUNTRY;
-              
+
 	    }
      ?>
      <form>
@@ -115,7 +120,7 @@
 	 <table border="0">
 	     <tr>
 		 <td nowrap="1">
-		     Common Name: 
+		     Common Name:
 		 </td>
 		 <td>
 		     <input type="text" name="cn" value="<?V cn ?>" size="50"/>
@@ -123,7 +128,7 @@
 	     </tr>
 	     <tr>
 		 <td nowrap="1">
-		     Country: 
+		     Country:
 		 </td>
 		 <td>
 		     <input type="text" name="c" value="<?V c ?>" size="50"/>
@@ -131,7 +136,7 @@
 	     </tr>
 	     <tr>
 		 <td nowrap="1">
-		     Organization: 
+		     Organization:
 		 </td>
 		 <td>
 		     <input type="text" name="o" value="<?V o ?>" size="50"/>
@@ -147,7 +152,7 @@
 	     </tr>
 	     <tr>
 		 <td>
-		     WebID:       
+		     WebID:
 		 </td>
 		 <td>
 		     <input type="text" name="webid" value="<?V webid ?>" size="80" />
@@ -155,7 +160,7 @@
 	     </tr>
 	     <tr>
 		 <td>
-		     Key strength: 
+		     Key strength:
 		 </td>
 		 <td>
 		     <keygen name="pubkey" />
@@ -163,7 +168,7 @@
 	     </tr>
 	     <tr>
 		 <td rowspan="2">
-		     Valid for 
+		     Valid for
 		 </td>
 		 <td>
 		     <input type="text" name="hours" value="0.0" size="4"/> hours
diff --git a/appsrc/ODS-Framework/ckeditor/ckeditor.js b/appsrc/ODS-Framework/ckeditor/ckeditor.js
index 8843b54..bd85726 100644
--- a/appsrc/ODS-Framework/ckeditor/ckeditor.js
+++ b/appsrc/ODS-Framework/ckeditor/ckeditor.js
@@ -3,139 +3,145 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'B1GG4Z6',version:'3.5.2',revision:'6450',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];
-return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})d=null;if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7');
-if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=1;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f],i=h.name;if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var j=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!j.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();a.dom={};var d=a.dom;(function(){var e=[];a.on('reset',function(){e=[];});a.tools={arrayCompare:function(f,g){if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h<f.length;h++){if(f[h]!=g[h])return false;}return true;},clone:function(f){var g;if(f&&f instanceof Array){g=[];for(var h=0;h<f.length;h++)g[h]=this.clone(f[h]);return g;}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp)return f;g=new f.constructor();for(var i in f){var j=f[i];g[i]=this.clone(j);}return g;},capitalize:function(f){return f.charAt(0).toUpperCase()+f.substring(1).toLowerCase();},extend:function(f){var g=arguments.length,h,i;if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){i=arguments[g-1];
-g-=2;}for(var j=1;j<g;j++){var k=arguments[j];for(var l in k){if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];}}return f;},prototypedCopy:function(f){var g=function(){};g.prototype=f;return new g();},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'>');}:h,j=g('  ')=='  '?function(k){return i(k).replace(/ /g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);g.prototype['constructor']=g;g.prototype.base=function(){this.base=h.prototype.base;
-h.apply(this,arguments);this.base=arguments.callee;};}if(j)this.extend(g.prototype,j,true);if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){return f.apply(g||this,arguments);})-1;},removeFunction:function(f){e[f]=null;},callFunction:function(f){var g=e[f];return g&&g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){var f=/^\d+(?:\.\d+)?$/;return function(g){return g+(f.test(g)?'px':'');};})(),repeat:function(f,g){return new Array(g+1).join(f);},tryThese:function(){var f;for(var g=0,h=arguments.length;g<h;g++){var i=arguments[g];try{f=i();break;}catch(j){}}return f;},genKey:function(){return Array.prototype.slice.call(arguments).join('-');}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1,style:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={style:1,script:1},y={base:1,link:1,meta:1,title:1},z=f(y,x),A={head:1,body:1},B={html:1},C={address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};return{$nonBodyContent:f(B,A,y),$block:C,$blockLimit:{body:1,div:1,td:1,th:1,caption:1,form:1},$inline:r,$body:f({script:1,style:1},C),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:A,head:z,style:t,script:t,body:v,base:{},link:{},meta:{},title:t,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:r,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,script:t,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:r,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r};
-})();var f=a.dtd;d.event=function(g){this.$=g;};d.event.prototype={getKey:function(){return this.$.keyCode||this.$.which;},getKeystroke:function(){var h=this;var g=h.getKey();if(h.$.ctrlKey||h.$.metaKey)g+=1000;if(h.$.shiftKey)g+=2000;if(h.$.altKey)g+=4000;return g;},preventDefault:function(g){var h=this.$;if(h.preventDefault)h.preventDefault();else h.returnValue=false;if(g)this.stopPropagation();},stopPropagation:function(){var g=this.$;if(g.stopPropagation)g.stopPropagation();else g.cancelBubble=true;},getTarget:function(){var g=this.$.target||this.$.srcElement;return g?new d.node(g):null;}};a.CTRL=1000;a.SHIFT=2000;a.ALT=4000;d.domObject=function(g){if(g)this.$=g;};d.domObject.prototype=(function(){var g=function(h,i){return function(j){if(typeof a!='undefined')h.fire(i,new d.event(j));};};return{getPrivate:function(){var h;if(!(h=this.getCustomData('_')))this.setCustomData('_',h={});return h;},on:function(h){var k=this;var i=k.getCustomData('_cke_nativeListeners');if(!i){i={};k.setCustomData('_cke_nativeListeners',i);}if(!i[h]){var j=i[h]=g(k,h);if(k.$.attachEvent)k.$.attachEvent('on'+h,j);else if(k.$.addEventListener)k.$.addEventListener(h,j,!!a.event.useCapture);}return a.event.prototype.on.apply(k,arguments);},removeListener:function(h){var k=this;a.event.prototype.removeListener.apply(k,arguments);if(!k.hasListeners(h)){var i=k.getCustomData('_cke_nativeListeners'),j=i&&i[h];if(j){if(k.$.detachEvent)k.$.detachEvent('on'+h,j);else if(k.$.removeEventListener)k.$.removeEventListener(h,j,false);delete i[h];}}},removeAllListeners:function(){var k=this;var h=k.getCustomData('_cke_nativeListeners');for(var i in h){var j=h[i];if(k.$.detachEvent)k.$.detachEvent('on'+i,j);else if(k.$.removeEventListener)k.$.removeEventListener(i,j,false);delete h[i];}}};})();(function(g){var h={};a.on('reset',function(){h={};});g.equals=function(i){return i&&i.$===this.$;};g.setCustomData=function(i,j){var k=this.getUniqueId(),l=h[k]||(h[k]={});l[i]=j;return this;};g.getCustomData=function(i){var j=this.$['data-cke-expando'],k=j&&h[j];return k&&k[i];};g.removeCustomData=function(i){var j=this.$['data-cke-expando'],k=j&&h[j],l=k&&k[i];if(typeof l!='undefined')delete k[i];return l||null;};g.clearCustomData=function(){this.removeAllListeners();var i=this.$['data-cke-expando'];i&&delete h[i];};g.getUniqueId=function(){return this.$['data-cke-expando']||(this.$['data-cke-expando']=e.getNextNumber());};a.event.implementOn(g);})(d.domObject.prototype);d.window=function(g){d.domObject.call(this,g);
-};d.window.prototype=new d.domObject();e.extend(d.window.prototype,{focus:function(){if(b.webkit&&this.$.parent)this.$.parent.focus();this.$.focus();},getViewPaneSize:function(){var g=this.$.document,h=g.compatMode=='CSS1Compat';return{width:(h?g.documentElement.clientWidth:g.body.clientWidth)||0,height:(h?g.documentElement.clientHeight:g.body.clientHeight)||0};},getScrollPosition:function(){var g=this.$;if('pageXOffset' in g)return{x:g.pageXOffset||0,y:g.pageYOffset||0};else{var h=g.document;return{x:h.documentElement.scrollLeft||h.body.scrollLeft||0,y:h.documentElement.scrollTop||h.body.scrollTop||0};}}});d.document=function(g){d.domObject.call(this,g);};var g=d.document;g.prototype=new d.domObject();e.extend(g.prototype,{appendStyleSheet:function(h){if(this.$.createStyleSheet)this.$.createStyleSheet(h);else{var i=new d.element('link');i.setAttributes({rel:'stylesheet',type:'text/css',href:h});this.getHead().append(i);}},appendStyleText:function(h){var k=this;if(k.$.createStyleSheet){var i=k.$.createStyleSheet('');i.cssText=h;}else{var j=new d.element('style',k);j.append(new d.text(h,k));k.getHead().append(j);}},createElement:function(h,i){var j=new d.element(h,this);if(i){if(i.attributes)j.setAttributes(i.attributes);if(i.styles)j.setStyles(i.styles);}return j;},createText:function(h){return new d.text(h,this);},focus:function(){this.getWindow().focus();},getById:function(h){var i=this.$.getElementById(h);return i?new d.element(i):null;},getByAddress:function(h,i){var j=this.$.documentElement;for(var k=0;j&&k<h.length;k++){var l=h[k];if(!i){j=j.childNodes[l];continue;}var m=-1;for(var n=0;n<j.childNodes.length;n++){var o=j.childNodes[n];if(i===true&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(m==l){j=o;break;}}}return j?new d.node(j):null;},getElementsByTag:function(h,i){if(!(c&&!(document.documentMode>8))&&i)h=i+':'+h;return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];if(!h)h=this.getDocumentElement().append(new d.element('head'),true);else h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h;
-})();},write:function(h){var i=this;i.$.open('text/html','replace');b.isCustomDomain()&&(i.$.domain=document.domain);i.$.write(h);i.$.close();}});d.node=function(h){if(h){switch(h.nodeType){case 9:return new g(h);case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);}return this;};d.node.prototype=new d.domObject();a.NODE_ELEMENT=1;a.NODE_DOCUMENT=9;a.NODE_TEXT=3;a.NODE_COMMENT=8;a.NODE_DOCUMENT_FRAGMENT=11;a.POSITION_IDENTICAL=0;a.POSITION_DISCONNECTED=1;a.POSITION_FOLLOWING=2;a.POSITION_PRECEDING=4;a.POSITION_IS_CONTAINED=8;a.POSITION_CONTAINS=16;e.extend(d.node.prototype,{appendTo:function(h,i){h.append(this,i);return h;},clone:function(h,i){var j=this.$.cloneNode(h),k=function(l){if(l.nodeType!=1)return;if(!i)l.removeAttribute('id',false);l.removeAttribute('data-cke-expando',false);if(h){var m=l.childNodes;for(var n=0;n<m.length;n++)k(m[n]);}};k(j);return new d.node(j);},hasPrevious:function(){return!!this.$.previousSibling;},hasNext:function(){return!!this.$.nextSibling;},insertAfter:function(h){h.$.parentNode.insertBefore(this.$,h.$.nextSibling);return h;},insertBefore:function(h){h.$.parentNode.insertBefore(this.$,h.$);return h;},insertBeforeMe:function(h){this.$.parentNode.insertBefore(h.$,this.$);return h;},getAddress:function(h){var i=[],j=this.getDocument().$.documentElement,k=this.$;while(k&&k!=j){var l=k.parentNode,m=-1;if(l){for(var n=0;n<l.childNodes.length;n++){var o=l.childNodes[n];if(h&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(o==k)break;}i.unshift(m);}k=l;}return i;},getDocument:function(){return new g(this.$.ownerDocument||this.$.parentNode.ownerDocument);},getIndex:function(){var h=this.$,i=h.parentNode&&h.parentNode.firstChild,j=-1;while(i){j++;if(i==h)return j;i=i.nextSibling;}return-1;},getNextSourceNode:function(h,i,j){if(j&&!j.call){var k=j;j=function(n){return!n.equals(k);};}var l=!h&&this.getFirst&&this.getFirst(),m;if(!l){if(this.type==1&&j&&j(this,true)===false)return null;l=this.getNext();}while(!l&&(m=(m||this).getParent())){if(j&&j(m,true)===false)return null;l=m.getNext();}if(!l)return null;if(j&&j(l)===false)return null;if(i&&i!=l.type)return l.getNextSourceNode(false,i,j);return l;},getPreviousSourceNode:function(h,i,j){if(j&&!j.call){var k=j;j=function(n){return!n.equals(k);};}var l=!h&&this.getLast&&this.getLast(),m;if(!l){if(this.type==1&&j&&j(this,true)===false)return null;l=this.getPrevious();}while(!l&&(m=(m||this).getParent())){if(j&&j(m,true)===false)return null;
-l=m.getPrevious();}if(!l)return null;if(j&&j(l)===false)return null;if(i&&l.type!=i)return l.getPreviousSourceNode(false,i,j);return l;},getPrevious:function(h){var i=this.$,j;do{i=i.previousSibling;j=i&&new d.node(i);}while(j&&h&&!h(j));return j;},getNext:function(h){var i=this.$,j;do{i=i.nextSibling;j=i&&new d.node(i);}while(j&&h&&!h(j));return j;},getParent:function(){var h=this.$.parentNode;return h&&h.nodeType==1?new d.node(h):null;},getParents:function(h){var i=this,j=[];do j[h?'push':'unshift'](i);while(i=i.getParent());return j;},getCommonAncestor:function(h){var j=this;if(h.equals(j))return j;if(h.contains&&h.contains(j))return h;var i=j.contains?j:j.getParent();do{if(i.contains(h))return i;}while(i=i.getParent());return null;},getPosition:function(h){var i=this.$,j=h.$;if(i.compareDocumentPosition)return i.compareDocumentPosition(j);if(i==j)return 0;if(this.type==1&&h.type==1){if(i.contains){if(i.contains(j))return 16+4;if(j.contains(i))return 8+2;}if('sourceIndex' in i)return i.sourceIndex<0||j.sourceIndex<0?1:i.sourceIndex<j.sourceIndex?4:2;}var k=this.getAddress(),l=h.getAddress(),m=Math.min(k.length,l.length);for(var n=0;n<=m-1;n++){if(k[n]!=l[n]){if(n<m)return k[n]<l[n]?4:2;break;}}return k.length<l.length?16+4:8+2;},getAscendant:function(h,i){var j=this.$;if(!i)j=j.parentNode;while(j){if(j.nodeName&&j.nodeName.toLowerCase()==h)return new d.node(j);j=j.parentNode;}return null;},hasAscendant:function(h,i){var j=this.$;if(!i)j=j.parentNode;while(j){if(j.nodeName&&j.nodeName.toLowerCase()==h)return true;j=j.parentNode;}return false;},move:function(h,i){h.append(this.remove(),i);},remove:function(h){var i=this.$,j=i.parentNode;if(j){if(h)for(var k;k=i.firstChild;)j.insertBefore(i.removeChild(k),i);j.removeChild(i);}return this;},replace:function(h){this.insertBefore(h);h.remove();},trim:function(){this.ltrim();this.rtrim();},ltrim:function(){var k=this;var h;while(k.getFirst&&(h=k.getFirst())){if(h.type==3){var i=e.ltrim(h.getText()),j=h.getLength();if(!i){h.remove();continue;}else if(i.length<j){h.split(j-i.length);k.$.removeChild(k.$.firstChild);}}break;}},rtrim:function(){var k=this;var h;while(k.getLast&&(h=k.getLast())){if(h.type==3){var i=e.rtrim(h.getText()),j=h.getLength();if(!i){h.remove();continue;}else if(i.length<j){h.split(i.length);k.$.lastChild.parentNode.removeChild(k.$.lastChild);}}break;}if(!c&&!b.opera){h=k.$.lastChild;if(h&&h.type==1&&h.nodeName.toLowerCase()=='br')h.parentNode.removeChild(h);}},isReadOnly:function(){var h=this;
-while(h){if(h.type==1){if(h.is('body')||!!h.data('cke-editable'))break;if(h.getAttribute('contentEditable')=='false')return h;else if(h.getAttribute('contentEditable')=='true')break;}h=h.getParent();}return false;}});d.nodeList=function(h){this.$=h;};d.nodeList.prototype={count:function(){return this.$.length;},getItem:function(h){var i=this.$[h];return i?new d.node(i):null;}};d.element=function(h,i){if(typeof h=='string')h=(i?i.$:document).createElement(h);d.domObject.call(this,h);};var h=d.element;h.get=function(i){return i&&(i.$?i:new h(i));};h.prototype=new d.node();h.createFromHtml=function(i,j){var k=new h('div',j);k.setHtml(i);return k.getFirst().remove();};h.setMarker=function(i,j,k,l){var m=j.getCustomData('list_marker_id')||j.setCustomData('list_marker_id',e.getNextNumber()).getCustomData('list_marker_id'),n=j.getCustomData('list_marker_names')||j.setCustomData('list_marker_names',{}).getCustomData('list_marker_names');i[m]=j;n[k]=1;return j.setCustomData(k,l);};h.clearAllMarkers=function(i){for(var j in i)h.clearMarkers(i,i[j],1);};h.clearMarkers=function(i,j,k){var l=j.getCustomData('list_marker_names'),m=j.getCustomData('list_marker_id');for(var n in l)j.removeCustomData(n);j.removeCustomData('list_marker_names');if(k){j.removeCustomData('list_marker_id');delete i[m];}};e.extend(h.prototype,{type:1,addClass:function(i){var j=this.$.className;if(j){var k=new RegExp('(?:^|\\s)'+i+'(?:\\s|$)','');if(!k.test(j))j+=' '+i;}this.$.className=j||i;},removeClass:function(i){var j=this.getAttribute('class');if(j){var k=new RegExp('(?:^|\\s+)'+i+'(?=\\s|$)','i');if(k.test(j)){j=j.replace(k,'').replace(/^\s+/,'');if(j)this.setAttribute('class',j);else this.removeAttribute('class');}}},hasClass:function(i){var j=new RegExp('(?:^|\\s+)'+i+'(?=\\s|$)','');return j.test(this.getAttribute('class'));},append:function(i,j){var k=this;if(typeof i=='string')i=k.getDocument().createElement(i);if(j)k.$.insertBefore(i.$,k.$.firstChild);else k.$.appendChild(i.$);return i;},appendHtml:function(i){var k=this;if(!k.$.childNodes.length)k.setHtml(i);else{var j=new h('div',k.getDocument());j.setHtml(i);j.moveChildren(k);}},appendText:function(i){if(this.$.text!=undefined)this.$.text+=i;else this.append(new d.text(i));},appendBogus:function(){var k=this;var i=k.getLast();while(i&&i.type==3&&!e.rtrim(i.getText()))i=i.getPrevious();if(!i||!i.is||!i.is('br')){var j=b.opera?k.getDocument().createText(''):k.getDocument().createElement('br');b.gecko&&j.setAttribute('type','_moz');k.append(j);
-}},breakParent:function(i){var l=this;var j=new d.range(l.getDocument());j.setStartAfter(l);j.setEndAfter(i);var k=j.extractContents();j.insertNode(l.remove());k.insertAfterNode(l);},contains:c||b.webkit?function(i){var j=this.$;return i.type!=1?j.contains(i.getParent().$):j!=i.$&&j.contains(i.$);}:function(i){return!!(this.$.compareDocumentPosition(i.$)&16);},focus:(function(){function i(){try{this.$.focus();}catch(j){}};return function(j){if(j)e.setTimeout(i,100,this);else i.call(this);};})(),getHtml:function(){var i=this.$.innerHTML;return c?i.replace(/<\?[^>]*>/g,''):i;},getOuterHtml:function(){var j=this;if(j.$.outerHTML)return j.$.outerHTML.replace(/<\?[^>]*>/,'');var i=j.$.ownerDocument.createElement('div');i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var n=this;switch(j){case 'class':j='className';break;case 'tabindex':var k=i.call(n,j);if(k!==0&&n.$.tabIndex===0)k=null;return k;break;case 'checked':var l=n.$.attributes.getNamedItem(j),m=l.specified?l.nodeValue:n.$.checked;return m?'checked':null;case 'hspace':case 'value':return n.$[j];case 'style':return n.$.style.cssText;}return i.call(n,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c&&!(document.documentMode>8)){var j=this.$.scopeName;
-if(j!='HTML')i=j.toLowerCase()+':'+i;}return(this.getName=function(){return i;})();},getValue:function(){return this.$.value;},getFirst:function(i){var j=this.$.firstChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getNext(i);return k;},getLast:function(i){var j=this.$.lastChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getPrevious(i);return k;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j<arguments.length;j++){if(arguments[j]==i)return true;}return false;},isEditable:function(){var i=this.getName(),j=!f.$nonEditable[i]&&(f[i]||f.span);return j&&j['#'];},isIdentical:function(i){if(this.getName()!=i.getName())return false;var j=this.$.attributes,k=i.$.attributes,l=j.length,m=k.length;for(var n=0;n<l;n++){var o=j[n];if(o.nodeName=='_moz_dirty')continue;if((!c||o.specified&&o.nodeName!='data-cke-expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='data-cke-expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},isEmptyInlineRemoveable:function(){if(!f.$removeEmpty[this.getName()])return false;var i=this.getChildren();for(var j=0,k=i.count();j<k;j++){var l=i.getItem(j);if(l.type==1&&l.data('cke-bookmark'))continue;if(l.type==1&&!l.isEmptyInlineRemoveable()||l.type==3&&e.trim(l.getText()))return false;}return true;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case 'data-cke-expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes,j=i.length,k={'data-cke-expando':1,_moz_dirty:1};return j>0&&(j>2||!k[i[0].nodeName]||j==2&&!k[i[1].nodeName]);},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},mergeSiblings:(function(){function i(j,k,l){if(k&&k.type==1){var m=[];while(k.data('cke-bookmark')||k.isEmptyInlineRemoveable()){m.push(k);
-k=l?k.getNext():k.getPrevious();if(!k||k.type!=1)return;}if(j.isIdentical(k)){var n=l?j.getLast():j.getFirst();while(m.length)m.shift().move(j,!l);k.moveChildren(j,!l);k.remove();if(n&&n.type==1)n.mergeSiblings();}}};return function(j){var k=this;if(!(j===false||f.$removeEmpty[k.getName()]||k.is('a')))return;i(k,k.getNext(),true);i(k,k.getPrevious());};})(),show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();
-if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;if(c&&b.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l<k.length;l++){var m=k[l],n=m.nodeName.toLowerCase(),o;if(n in j)continue;if(n=='checked'&&(o=p.getAttribute(n)))i.setAttribute(n,o);else if(m.specified||c&&m.nodeValue&&n=='value'){o=p.getAttribute(n);if(o===null)o=m.nodeValue;i.setAttribute(n,o);}}if(p.$.style.cssText!=='')i.$.style.cssText=p.$.style.cssText;},renameNode:function(i){var l=this;if(l.getName()==i)return;var j=l.getDocument(),k=new h(i,j);l.copyAttributes(k);l.moveChildren(k);l.getParent()&&l.$.parentNode.replaceChild(k.$,l.$);k.$['data-cke-expando']=l.$['data-cke-expando'];l.$=k.$;
-},getChild:function(i){var j=this.$;if(!i.slice)j=j.childNodes[i];else while(i.length>0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(i){if(!i.data.getTarget().hasClass('cke_enable_context_menu'))i.data.preventDefault();});},getDirection:function(i){return i?this.getComputedStyle('direction'):this.getStyle('direction')||this.getAttribute('dir');},data:function(i,j){i='data-'+i;if(j===undefined)return this.getAttribute(i);else if(j===false)this.removeAttribute(i);else this.setAttribute(i,j);return null;}});(function(){var i={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']};function j(k){var l=0;for(var m=0,n=i[k].length;m<n;m++)l+=parseInt(this.getComputedStyle(i[k][m])||0,10)||0;return l;};h.prototype.setSize=function(k,l,m){if(typeof l=='number'){if(m&&!(c&&b.quirks))l-=j.call(this,k);this.setStyle(k,l+'px');}};h.prototype.getSize=function(k,l){var m=Math.max(this.$['offset'+e.capitalize(k)],this.$['client'+e.capitalize(k)])||0;if(l)m-=j.call(this,k);return m;};})();a.command=function(i,j){this.uiItems=[];this.exec=function(k){if(this.state==0)return false;if(this.editorFocus)i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},editorFocus:1,state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ui',contentsLanguage:'',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000};
-var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getChild(1).addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0){o&&a.document.getDocumentElement().removeStyle('cursor');t(z);}},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B<A.length;B++)A[B](y,z);},w=function(y){if(j[y]){u(y,true);return;}var z=k[y]||(k[y]=[]);z.push(u);if(z.length>1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};o&&a.document.getDocumentElement().setStyle('cursor','wait');for(var x=0;x<q;x++)w(l[x]);}};})();a.resourceManager=function(j,k){var l=this;
-l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';a.fire(j+e.capitalize(this.fileName)+'Ready',this.registered[j]=k||{});},get:function(j){return this.registered[j]||null;},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&typeof k.file=='string'?k.file:this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++){if(!o[v[w]])s.push(v[w]);}}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k),o=n.lang||(n.lang={});o[l]=m;};a.skins=(function(){var k={},l={},m=function(n,o,p,q){var r=k[o];if(!n.skin){n.skin=r;if(r.init)r.init(n);}var s=function(B){for(var C=0;C<B.length;C++)B[C]=a.getUrl(l[o]+B[C]);};function t(B,C){return B.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(D,E,F,G){if(/^\/|^\w?:/.test(F))return D;else return 'url('+C+E+F+G+')';});};p=r[p];var u=!p||!!p._isLoaded;if(u)q&&q();else{var v=p._pending||(p._pending=[]);v.push(q);if(v.length>1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var B=0;B<v.length;B++){if(v[B])v[B]();}}};if(!w){var z=p.css;if(e.isArray(z)){s(z);for(var A=0;A<z.length;A++)a.document.appendStyleSheet(z[A]);
-}else{z=t(z,a.getUrl(l[o]));a.document.appendStyleText(z);}p.css=z;w=1;}if(!x){s(p.js);a.scriptLoader.load(p.js,function(){x=1;y();});}y();}};return{add:function(n,o){k[n]=o;o.skinPath=l[n]||(l[n]=a.getUrl('skins/'+n+'/'));},load:function(n,o,p){var q=n.skinName,r=n.skinPath;if(k[q])m(n,q,o,p);else{l[q]=r;a.scriptLoader.load(a.getUrl(r+'skin.js'),function(){m(n,q,o,p);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};a.event.implementOn(k);(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';var A=x.config;A.contentsLangDirection=='ui'&&(A.contentsLangDirection=x.lang.dir);s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}b.air&&(z+=',adobeair');j.load(z.split(','),function(D){var E=[],F=[],G=[];x.plugins=D;
-for(var H in D){var I=D[H],J=I.lang,K=j.getPath(H),L=null;I.path=K;if(J){L=e.indexOf(J,x.langCode)>=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N<M.length;N++)for(var O=0;O<E.length;O++){var P=E[O];if(N===0&&F[O]&&P.lang)e.extend(x.lang,P.lang[F[O]]);if(P[M[N]])P[M[N]](x);}x.fire('pluginsLoaded');u(x);});});},t=function(x){a.skins.load(x,'editor',function(){r(x);});},u=function(x){var y=x.config.theme;a.themes.load(y,function(){var z=x.theme=a.themes.get(y);z.path=a.themes.getPath(y);z.build(x);if(x.config.autoUpdateElement)v(x);});},v=function(x){var y=x.element;if(x.elementMode==1&&y.is('textarea')){var z=y.$.form&&new h(y.$.form);if(z){function A(){x.updateElement();};z.on('submit',A);if(!z.$.submit.nodeName&&!z.$.submit.length)z.$.submit=e.override(z.$.submit,function(B){return function(){x.updateElement();if(B.apply)B.apply(this,arguments);else B();};});x.on('destroy',function(){z.removeListener('submit',A);});}}};function w(){var x,y=this._.commands,z=this.mode;for(var A in y){x=y[A];x[x.startDisabled?'disable':x.modes[z]?'enable':'disable']();}};a.editor.prototype._init=function(){var z=this;var x=h.get(z._.element),y=z._.instanceConfig;delete z._.element;delete z._.instanceConfig;z._.commands={};z._.styles=[];z.element=x;z.name=x&&z.elementMode==1&&(x.getId()||x.getNameAtt())||m();if(z.name in a.instances)throw '[CKEDITOR.editor] The instance "'+z.name+'" already exists.';z.id=e.getNextId();z.config=e.prototypedCopy(i);z.ui=new k(z);z.focusManager=new a.focusManager(z);a.fire('instanceCreated',null,z);z.on('mode',w,null,null,1);p(z,y);};})();e.extend(a.editor.prototype,{addCommand:function(l,m){return this._.commands[l]=new a.command(this,m);},addCss:function(l){this._.styles.push(l);},destroy:function(l){var m=this;if(!l)m.updateElement();m.fire('destroy');m.theme&&m.theme.destroy(m);a.remove(m);a.fire('instanceDestroyed',null,m);},execCommand:function(l,m){var n=this.getCommand(l),o={name:l,commandData:m,command:n};if(n&&n.state!=0)if(this.fire('beforeCommandExec',o)!==true){o.returnValue=n.exec(o.commandData);if(!n.async&&this.fire('afterCommandExec',o)!==true)return o.returnValue;}return false;},getCommand:function(l){return this._.commands[l];},getData:function(){var n=this;n.fire('beforeGetData');var l=n._.data;if(typeof l!='string'){var m=n.element;if(m&&n.elementMode==1)l=m.is('textarea')?m.getValue():m.getHtml();
-else l='';}l={dataValue:l};n.fire('getData',l);return l.dataValue;},getSnapshot:function(){var l=this.fire('getSnapshot');if(typeof l!='string'){var m=this.element;if(m&&this.elementMode==1)l=m.is('textarea')?m.getValue():m.getHtml();}return l;},loadSnapshot:function(l){this.fire('loadSnapshot',l);},setData:function(l,m,n){if(m)this.on('dataReady',function(p){p.removeListener();m.call(p.editor);});var o={dataValue:l};!n&&this.fire('setData',o);this._.data=o.dataValue;!n&&this.fire('afterSetData',o);},insertHtml:function(l){this.fire('insertHtml',l);},insertText:function(l){this.fire('insertText',l);},insertElement:function(l){this.fire('insertElement',l);},checkDirty:function(){return this.mayBeDirty&&this._.previousValue!==this.getSnapshot();},resetDirty:function(){if(this.mayBeDirty)this._.previousValue=this.getSnapshot();},updateElement:function(){var n=this;var l=n.element;if(l&&n.elementMode==1){var m=n.getData();if(n.config.htmlEncodeOutput)m=e.htmlEncode(m);if(l.is('textarea'))l.setValue(m);else l.setHtml(m);}}});a.on('loaded',function(){var l=a.editor._pending;if(l){delete a.editor._pending;for(var m=0;m<l.length;m++)l[m]._init();}});a.htmlParser=function(){this._={htmlPartsRegex:new RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^\"'>]+)|(?:\"[^\"]*\")|(?:'[^']*'))*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();if(/="/.test(p))continue;var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;
-if(m){if(!(n=m.onComment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writeHtml(l,m);return;}}l.comment(n);}};(function(){var l=/[\t\r\n ]{2,}|[\t\r\n]/g;a.htmlParser.text=function(m){this.value=m;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(m,n){var o=this.value;if(n&&!(o=n.onText(o,this)))return;m.text(o);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),n=f.$list,o=f.$listItem;a.htmlParser.fragment.fromHtml=function(p,q){var r=new a.htmlParser(),s=[],t=new a.htmlParser.fragment(),u=[],v=[],w=t,x=false,y;function z(E){var F;if(u.length>0)for(var G=0;G<u.length;G++){var H=u[G],I=H.name,J=f[I],K=w.name&&f[w.name];if((!K||K[I])&&(!E||!J||J[E]||!f[E])){if(!F){A();F=1;}H=H.clone();H.parent=w;w=H;u.splice(G,1);G--;}}};function A(E){while(v.length-(E||0)>0)w.add(v.shift());};function B(E,F,G){F=F||w||t;if(q&&!F.type){var H,I;if(E.attributes&&(I=E.attributes['data-cke-real-element-type']))H=I;else H=E.name;if(H&&H in f.$inline){var J=w;w=F;r.onTagOpen(q,{});F=w;if(G)w=J;}}if(E._.isBlockLike&&E.name!='pre'){var K=E.children.length,L=E.children[K-1],M;if(L&&L.type==3)if(!(M=e.rtrim(L.value)))E.children.length=K-1;else L.value=M;}F.add(E);if(E.returnPoint){w=E.returnPoint;delete E.returnPoint;}};r.onTagOpen=function(E,F,G){var H=new a.htmlParser.element(E,F);if(H.isUnknown&&G)H.isEmpty=true;if(f.$removeEmpty[E]){u.push(H);return;}else if(E=='pre')x=true;else if(E=='br'&&x){w.add(new a.htmlParser.text('\n'));return;}if(E=='br'){v.push(H);return;}var I=w.name,J=I&&(f[I]||(w._.isBlockLike?f.div:f.span));if(J&&!H.isUnknown&&!w.isUnknown&&!J[E]){var K=false,L;if(E in n&&I in n){var M=w.children,N=M[M.length-1];if(!(N&&N.name in o))B(N=new a.htmlParser.element('li'),w);y=w,L=N;}else if(E==I)B(w,w.parent);else if(E in f.$listItem){r.onTagOpen('ul',{});L=w;K=true;}else{if(m[I]){if(!y)y=w;}else{B(w,w.parent,true);if(!l[I])u.unshift(w);}K=true;}if(L)w=L;else w=w.returnPoint||w.parent;if(K){r.onTagOpen.apply(this,arguments);return;}}z(E);A();H.parent=w;H.returnPoint=y;y=0;if(H.isEmpty)B(H);else w=H;};r.onTagClose=function(E){for(var F=u.length-1;F>=0;F--){if(E==u[F].name){u.splice(F,1);
-return;}}var G=[],H=[],I=w;while(I.type&&I.name!=E){if(!I._.isBlockLike)H.unshift(I);G.push(I);I=I.parent;}if(I.type){for(F=0;F<G.length;F++){var J=G[F];B(J,J.parent);}w=I;if(w.name=='pre')x=false;if(I._.isBlockLike)A();B(I,I.parent);if(I==w)w=w.parent;u=u.concat(H);}if(E=='body')q=false;};r.onText=function(E){if(!w._.hasInlineStarted&&!x){E=e.ltrim(E);if(E.length===0)return;}A();z();if(q&&(!w.type||w.name=='body')&&e.trim(E))this.onTagOpen(q,{});if(!x)E=E.replace(/[\t\r\n ]{2,}|[\t\r\n]/g,' ');w.add(new a.htmlParser.text(E));};r.onCDATA=function(E){w.add(new a.htmlParser.cdata(E));};r.onComment=function(E){A();z();w.add(new a.htmlParser.comment(E));};r.parse(p);A(!c&&1);while(w.type){var C=w.parent,D=w;if(q&&(!C.type||C.name=='body')&&!f.$body[D.name]){w=C;r.onTagOpen(q,{});C=w;}C.add(D);w=C;}return t;};a.htmlParser.fragment.prototype={add:function(p){var s=this;var q=s.children.length,r=q>0&&s.children[q-1]||null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){var r;this.filterChildren=function(){var s=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,s,q,true);var t=s.getHtml();this.children=new a.htmlParser.fragment.fromHtml(t).children;r=1;};!this.name&&q&&q.onFragment(this);this.writeChildrenHtml(p,r?null:q);},writeChildrenHtml:function(p,q){for(var r=0;r<this.children.length;r++)this.children[r].writeHtml(p,q);}};})();a.htmlParser.element=function(l,m){var s=this;s.name=l;s.attributes=m||(m={});s.children=[];var n=m['data-cke-real-element-type']||l,o=n.match(/^cke:(.*)/);o&&(n=o[1]);var p=f,q=!!(p.$nonBodyContent[n]||p.$block[n]||p.$listItem[n]||p.$tableContent[n]||p.$nonEditable[n]||n=='br'),r=!!p.$empty[l];s.isEmpty=r;s.isUnknown=!p[l];s._={isBlockLike:q,hasInlineStarted:r||!q};};(function(){var l=function(m,n){m=m[0];n=n[0];return m<n?-1:m>n?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterChildren=function(){if(!u){var z=new a.htmlParser.basicWriter();a.htmlParser.fragment.prototype.writeChildrenHtml.call(p,z,n);p.children=new a.htmlParser.fragment.fromHtml(z.getHtml()).children;u=1;}};if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;
-if(!(p=n.onElement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writeHtml(m,n);return;}q=p.name;if(!q){this.writeChildrenHtml.call(p,m,u?null:n);return;}}o=p.attributes;}m.openTag(q,o);var v=[];for(var w=0;w<2;w++)for(r in o){s=r;t=o[r];if(w==1)v.push([r,t]);else if(n){for(;;){if(!(s=n.onAttributeName(r))){delete o[r];break;}else if(s!=r){delete o[r];r=s;continue;}else break;}if(s)if((t=n.onAttribute(p,s,t))===false)delete o[s];else o[s]=t;}}if(m.sortAttributes)v.sort(l);var x=v.length;for(w=0;w<x;w++){var y=v[w];m.attribute(y[0],y[1]);}m.openTagClose(q,p.isEmpty);if(!p.isEmpty){this.writeChildrenHtml.call(p,m,u?null:n);m.closeTag(q);}},writeChildrenHtml:function(m,n){a.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,arguments);}};})();(function(){a.htmlParser.filter=e.createClass({$:function(q){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};if(q)this.addRules(q,10);},proto:{addRules:function(q,r){var s=this;if(typeof r!='number')r=10;m(s._.elementNames,q.elementNames,r);m(s._.attributeNames,q.attributeNames,r);n(s._.elements,q.elements,r);n(s._.attributes,q.attributes,r);s._.text=o(s._.text,q.text,r)||s._.text;s._.comment=o(s._.comment,q.comment,r)||s._.comment;s._.root=o(s._.root,q.root,r)||s._.root;},onElementName:function(q){return l(q,this._.elementNames);},onAttributeName:function(q){return l(q,this._.attributeNames);},onText:function(q){var r=this._.text;return r?r.filter(q):q;},onComment:function(q,r){var s=this._.comment;return s?s.filter(q,r):q;},onFragment:function(q){var r=this._.root;return r?r.filter(q):q;},onElement:function(q){var v=this;var r=[v._.elements['^'],v._.elements[q.name],v._.elements.$],s,t;for(var u=0;u<3;u++){s=r[u];if(s){t=s.filter(q,v);if(t===false)return null;if(t&&t!=q)return v.onNode(t);if(q.parent&&!q.name)break;}}return q;},onNode:function(q){var r=q.type;return r==1?this.onElement(q):r==3?new a.htmlParser.text(this.onText(q.value)):r==8?new a.htmlParser.comment(this.onComment(q.value)):null;},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){if(typeof r=='function')r=[r];var t,u,v=q.length,w=r&&r.length;if(w){for(t=0;t<v&&q[t].pri<s;t++){}for(u=w-1;u>=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];
-q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=q.type||q instanceof a.htmlParser.fragment;for(var s=0;s<this.length;s++){if(r)var t=q.type,u=q.name;var v=this[s],w=v.apply(window,arguments);if(w===false)return w;if(r){if(w&&(w.name!=u||w.type!=t))return w;}else if(typeof w!='string')return w;w!=undefined&&(q=w);}return q;};})();a.htmlParser.basicWriter=e.createClass({$:function(){this._={output:[]};},proto:{openTag:function(l,m){this._.output.push('<',l);},openTagClose:function(l,m){if(m)this._.output.push(' />');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('</',l,'>');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('<!--',l,'-->');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.on('instanceDestroyed',function(){if(e.isEmpty(this.instances))a.fire('reset');});a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '<!--'+this.$.nodeValue+'-->';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1,fieldset:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q<r;q++){var s=p.getItem(q);if(s.type==1&&f.$block[s.getName()])return true;}return false;};d.elementPath=function(o){var u=this;var p=null,q=null,r=[],s=o;while(s){if(s.type==1){if(!u.lastElement)u.lastElement=s;var t=s.getName();if(c&&s.$.scopeName!='HTML')t=s.$.scopeName.toLowerCase()+':'+t;if(!q){if(!p&&l[t])p=s;if(m[t])if(!p&&t=='div'&&!n(s))p=s;else q=s;}r.push(s);if(t=='body')break;}s=s.getParent();
-}u.block=p;u.blockLimit=q;u.elements=r;};})();d.elementPath.prototype={compare:function(l){var m=this.elements,n=l&&l.elements;if(!n||m.length!=n.length)return false;for(var o=0;o<m.length;o++){if(!m[o].equals(n[o]))return false;}return true;},contains:function(l){var m=this.elements;for(var n=0;n<m.length;n++){if(m[n].getName() in l)return m[n];}return null;}};d.text=function(l,m){if(typeof l=='string')l=(m?m.$:document).createTextNode(l);this.$=l;};d.text.prototype=new d.node();e.extend(d.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},split:function(l){var q=this;if(c&&l==q.getLength()){var m=q.getDocument().createText('');m.insertAfter(q);return m;}var n=q.getDocument(),o=new d.text(q.$.splitText(l),n);if(b.ie8){var p=new d.text('',n);p.insertAfter(o);p.remove();}return o;},substring:function(l,m){if(typeof m!='number')return this.$.nodeValue.substr(l);else return this.$.nodeValue.substring(l,m);}});d.documentFragment=function(l){l=l||a.document;this.$=l.$.createDocumentFragment();};e.extend(d.documentFragment.prototype,h.prototype,{type:11,insertAfterNode:function(l){l=l.$;l.parentNode.insertBefore(this.$,l.nextSibling);}},true,{append:1,appendBogus:1,getFirst:1,getLast:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});(function(){function l(s,t){if(this._.end)return null;var u,v=this.range,w,x=this.guard,y=this.type,z=s?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;v.trim();if(v.collapsed){this.end();return null;}}if(!s&&!this._.guardLTR){var A=v.endContainer,B=A.getChild(v.endOffset);this._.guardLTR=function(F,G){return(!G||!A.equals(F))&&(!B||!F.equals(B))&&(F.type!=1||!G||F.getName()!='body');};}if(s&&!this._.guardRTL){var C=v.startContainer,D=v.startOffset>0&&C.getChild(v.startOffset-1);this._.guardRTL=function(F,G){return(!G||!C.equals(F))&&(!D||!F.equals(D))&&(F.type!=1||!G||F.getName()!='body');};}var E=s?this._.guardRTL:this._.guardLTR;if(x)w=function(F,G){if(E(F,G)===false)return false;return x(F,G);};else w=E;if(this.current)u=this.current[z](false,y,w);else if(s){u=v.endContainer;if(v.endOffset>0){u=u.getChild(v.endOffset-1);if(w(u)===false)u=null;}else u=w(u,true)===false?null:u.getPreviousSourceNode(true,y,w);}else{u=v.startContainer;u=u.getChild(v.startOffset);if(u){if(w(u)===false)u=null;}else u=w(v.startContainer,true)===false?null:v.startContainer.getNextSourceNode(true,y,w);
-}while(u&&!this._.end){this.current=u;if(!this.evaluator||this.evaluator(u)!==false){if(!t)return u;}else if(t&&this.evaluator)return false;u=u[z](false,y,w);}this.end();return this.current=null;};function m(s){var t,u=null;while(t=l.call(this,s))u=t;return u;};d.walker=e.createClass({$:function(s){this.range=s;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,1);},checkForward:function(){return l.call(this,0,1)!==false;},checkBackward:function(){return l.call(this,1,1)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,1);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1};h.prototype.isBlockBoundary=function(s){var t=e.extend({},f.$block,s||{});return this.getComputedStyle('float')=='none'&&n[this.getComputedStyle('display')]||t[this.getName()];};d.walker.blockBoundary=function(s){return function(t,u){return!(t.type==1&&t.isBlockBoundary(s));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmark=function(s,t){function u(v){return v&&v.getName&&v.getName()=='span'&&v.data('cke-bookmark');};return function(v){var w,x;w=v&&!v.getName&&(x=v.getParent())&&u(x);w=s?w:w||u(v);return!!(t^w);};};d.walker.whitespaces=function(s){return function(t){var u=t&&t.type==3&&!e.trim(t.getText());return!!(s^u);};};d.walker.invisible=function(s){var t=d.walker.whitespaces();return function(u){var v=t(u)||u.is&&!u.$.offsetHeight;return!!(s^v);};};d.walker.nodeType=function(s,t){return function(u){return!!(t^u.type==s);};};var o=/^[\t\r\n ]*(?: |\xa0)$/,p=d.walker.whitespaces(),q=d.walker.bookmark(),r=function(s){return q(s)||p(s)||s.type==1&&s.getName() in f.$inline&&!(s.getName() in f.$empty);};h.prototype.getBogus=function(){var s=this;do s=s.getPreviousSourceNode();while(r(s));if(s&&(!c?s.is&&s.is('br'):s.getText&&o.test(s.getText())))return s;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v,w){t.optimizeBookmark();var x=t.startContainer,y=t.endContainer,z=t.startOffset,A=t.endOffset,B,C;
-if(y.type==3)y=y.split(A);else if(y.getChildCount()>0)if(A>=y.getChildCount()){y=y.append(t.document.createText(''));C=true;}else y=y.getChild(A);if(x.type==3){x.split(z);if(x.equals(y))y=x.getNext();}else if(!z){x=x.getFirst().insertBeforeMe(t.document.createText(''));B=true;}else if(z>=x.getChildCount()){x=x.append(t.document.createText(''));B=true;}else x=x.getChild(z).getPrevious();var D=x.getParents(),E=y.getParents(),F,G,H;for(F=0;F<D.length;F++){G=D[F];H=E[F];if(!G.equals(H))break;}var I=v,J,K,L,M;for(var N=F;N<D.length;N++){J=D[N];if(I&&!J.equals(x))K=I.append(J.clone());L=J.getNext();while(L){if(L.equals(E[N])||L.equals(y))break;M=L.getNext();if(u==2)I.append(L.clone(true));else{L.remove();if(u==1)I.append(L);}L=M;}if(I)I=K;}I=v;for(var O=F;O<E.length;O++){J=E[O];if(u>0&&!J.equals(y))K=I.append(J.clone());if(!D[O]||J.$.parentNode!=D[O].$.parentNode){L=J.getPrevious();while(L){if(L.equals(D[O])||L.equals(x))break;M=L.getPrevious();if(u==2)I.$.insertBefore(L.$.cloneNode(true),I.$.firstChild);else{L.remove();if(u==1)I.$.insertBefore(L.$,I.$.firstChild);}L=M;}}if(I)I=K;}if(u==2){var P=t.startContainer;if(P.type==3){P.$.data+=P.$.nextSibling.data;P.$.parentNode.removeChild(P.$.nextSibling);}var Q=t.endContainer;if(Q.type==3&&Q.$.nextSibling){Q.$.data+=Q.$.nextSibling.data;Q.$.parentNode.removeChild(Q.$.nextSibling);}}else{if(G&&H&&(x.$.parentNode!=G.$.parentNode||y.$.parentNode!=H.$.parentNode)){var R=H.getIndex();if(B&&H.$.parentNode==x.$.parentNode)R--;if(w&&G.type==1){var S=h.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',t.document);S.insertAfter(G);G.mergeSiblings(false);t.moveToBookmark({startNode:S});}else t.setStart(H.getParent(),R);}t.collapse(true);}if(B)x.remove();if(C&&y.$.parentNode)y.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(t){var u=false,v=d.walker.bookmark(true);return function(w){if(v(w))return true;if(w.type==3){if(e.trim(w.getText()).length)return false;}else if(w.type==1)if(!n[w.getName()])if(!t&&!c&&w.getName()=='br'&&!u)u=true;else return false;return true;};};function p(t){return t.type!=3&&t.getName() in f.$removeEmpty||!e.trim(t.getText())||!!t.getParent().data('cke-bookmark');};var q=new d.walker.whitespaces(),r=new d.walker.bookmark();function s(t){return!q(t)&&!r(t);};d.range.prototype={clone:function(){var u=this;var t=new d.range(u.document);
-t.startContainer=u.startContainer;t.startOffset=u.startOffset;t.endContainer=u.endContainer;t.endOffset=u.endOffset;t.collapsed=u.collapsed;return t;},collapse:function(t){var u=this;if(t){u.endContainer=u.startContainer;u.endOffset=u.startOffset;}else{u.startContainer=u.endContainer;u.startOffset=u.endOffset;}u.collapsed=true;},cloneContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,t);return t;},deleteContents:function(t){if(this.collapsed)return;m(this,0,null,t);},extractContents:function(t){var u=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,u,t);return u;},createBookmark:function(t){var z=this;var u,v,w,x,y=z.collapsed;u=z.document.createElement('span');u.data('cke-bookmark',1);u.setStyle('display','none');u.setHtml(' ');if(t){w='cke_bm_'+e.getNextNumber();u.setAttribute('id',w+'S');}if(!y){v=u.clone();v.setHtml(' ');if(t)v.setAttribute('id',w+'E');x=z.clone();x.collapse();x.insertNode(v);}x=z.clone();x.collapse(true);x.insertNode(u);if(v){z.setStartAfter(u);z.setEndBefore(v);}else z.moveToPosition(u,4);return{startNode:t?w+'S':u,endNode:t?w+'E':v,serializable:t,collapsed:y};},createBookmark2:function(t){var B=this;var u=B.startContainer,v=B.endContainer,w=B.startOffset,x=B.endOffset,y=B.collapsed,z,A;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){z=u.getChild(w);if(z&&z.type==3&&w>0&&z.getPrevious().type==3){u=z;w=0;}}while(u.type==3&&(A=u.getPrevious())&&A.type==3){u=A;w+=A.getLength();}if(!y){if(v.type==1){z=v.getChild(x);if(z&&z.type==3&&x>0&&z.getPrevious().type==3){v=z;x=0;}}while(v.type==3&&(A=v.getPrevious())&&A.type==3){v=A;x+=A.getLength();}}}return{start:u.getAddress(t),end:y?null:v.getAddress(t),startOffset:w,endOffset:x,normalized:t,collapsed:y,is2:true};},moveToBookmark:function(t){var B=this;if(t.is2){var u=B.document.getByAddress(t.start,t.normalized),v=t.startOffset,w=t.end&&B.document.getByAddress(t.end,t.normalized),x=t.endOffset;B.setStart(u,v);if(w)B.setEnd(w,x);else B.collapse(true);}else{var y=t.serializable,z=y?B.document.getById(t.startNode):t.startNode,A=y?B.document.getById(t.endNode):t.endNode;B.setStartBefore(z);z.remove();if(A){B.setEndBefore(A);A.remove();}else B.collapse(true);}},getBoundaryNodes:function(){var y=this;var t=y.startContainer,u=y.endContainer,v=y.startOffset,w=y.endOffset,x;if(t.type==1){x=t.getChildCount();if(x>v)t=t.getChild(v);else if(x<1)t=t.getPreviousSourceNode();else{t=t.$;while(t.lastChild)t=t.lastChild;t=new d.node(t);t=t.getNextSourceNode()||t;
-}}if(u.type==1){x=u.getChildCount();if(x>w)u=u.getChild(w).getPreviousSourceNode(true);else if(x<1)u=u.getPreviousSourceNode();else{u=u.$;while(u.lastChild)u=u.lastChild;u=new d.node(u);}}if(t.getPosition(u)&2)t=u;return{startNode:t,endNode:u};},getCommonAncestor:function(t,u){var y=this;var v=y.startContainer,w=y.endContainer,x;if(v.equals(w)){if(t&&v.type==1&&y.startOffset==y.endOffset-1)x=v.getChild(y.startOffset);else x=v;}else x=v.getCommonAncestor(w);return u&&!x.is?x.getParent():x;},optimize:function(){var v=this;var t=v.startContainer,u=v.startOffset;if(t.type!=1)if(!u)v.setStartBefore(t);else if(u>=t.getLength())v.setStartAfter(t);t=v.endContainer;u=v.endOffset;if(t.type!=1)if(!u)v.setEndBefore(t);else if(u>=t.getLength())v.setEndAfter(t);},optimizeBookmark:function(){var v=this;var t=v.startContainer,u=v.endContainer;if(t.is&&t.is('span')&&t.data('cke-bookmark'))v.setStartAt(t,3);if(u&&u.is&&u.is('span')&&u.data('cke-bookmark'))v.setEndAt(u,4);},trim:function(t,u){var B=this;var v=B.startContainer,w=B.startOffset,x=B.collapsed;if((!t||x)&&v&&v.type==3){if(!w){w=v.getIndex();v=v.getParent();}else if(w>=v.getLength()){w=v.getIndex()+1;v=v.getParent();}else{var y=v.split(w);w=v.getIndex()+1;v=v.getParent();if(B.startContainer.equals(B.endContainer))B.setEnd(y,B.endOffset-B.startOffset);else if(v.equals(B.endContainer))B.endOffset+=1;}B.setStart(v,w);if(x){B.collapse(true);return;}}var z=B.endContainer,A=B.endOffset;if(!(u||x)&&z&&z.type==3){if(!A){A=z.getIndex();z=z.getParent();}else if(A>=z.getLength()){A=z.getIndex()+1;z=z.getParent();}else{z.split(A);A=z.getIndex()+1;z=z.getParent();}B.setEnd(z,A);}},enlarge:function(t,u){switch(t){case 1:if(this.collapsed)return;var v=this.getCommonAncestor(),w=this.document.getBody(),x,y,z,A,B,C=false,D,E,F=this.startContainer,G=this.startOffset;if(F.type==3){if(G){F=!e.trim(F.substring(0,G)).length&&F;C=!!F;}if(F)if(!(A=F.getPrevious()))z=F.getParent();}else{if(G)A=F.getChild(G-1)||F.getLast();if(!A)z=F;}while(z||A){if(z&&!A){if(!B&&z.equals(v))B=true;if(!w.contains(z))break;if(!C||z.getComputedStyle('display')!='inline'){C=false;if(B)x=z;else this.setStartBefore(z);}A=z.getPrevious();}while(A){D=false;if(A.type==3){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;D=/[\s\ufeff]$/.test(E);}else if((A.$.offsetWidth>0||u&&A.is('br'))&&!A.data('cke-bookmark'))if(C&&f.$removeEmpty[A.getName()]){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;else{var H=A.$.all||A.$.getElementsByTagName('*');for(var I=0,J;J=H[I++];){if(!f.$removeEmpty[J.nodeName.toLowerCase()]){A=null;
-break;}}}if(A)D=!!E.length;}else A=null;if(D)if(C){if(B)x=z;else if(z)this.setStartBefore(z);}else C=true;if(A){var K=A.getPrevious();if(!z&&!K){z=A;A=null;break;}A=K;}else z=null;}if(z)z=z.getParent();}F=this.endContainer;G=this.endOffset;z=A=null;B=C=false;if(F.type==3){F=!e.trim(F.substring(G)).length&&F;C=!(F&&F.getLength());if(F)if(!(A=F.getNext()))z=F.getParent();}else{A=F.getChild(G);if(!A)z=F;}while(z||A){if(z&&!A){if(!B&&z.equals(v))B=true;if(!w.contains(z))break;if(!C||z.getComputedStyle('display')!='inline'){C=false;if(B)y=z;else if(z)this.setEndAfter(z);}A=z.getNext();}while(A){D=false;if(A.type==3){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;D=/^[\s\ufeff]/.test(E);}else if((A.$.offsetWidth>0||u&&A.is('br'))&&!A.data('cke-bookmark'))if(C&&f.$removeEmpty[A.getName()]){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;else{H=A.$.all||A.$.getElementsByTagName('*');for(I=0;J=H[I++];){if(!f.$removeEmpty[J.nodeName.toLowerCase()]){A=null;break;}}}if(A)D=!!E.length;}else A=null;if(D)if(C)if(B)y=z;else this.setEndAfter(z);if(A){K=A.getNext();if(!z&&!K){z=A;A=null;break;}A=K;}else z=null;}if(z)z=z.getParent();}if(x&&y){v=x.contains(y)?y:x;this.setStartBefore(v);this.setEndAfter(v);}break;case 2:case 3:var L=new d.range(this.document);w=this.document.getBody();L.setStartAt(w,1);L.setEnd(this.startContainer,this.startOffset);var M=new d.walker(L),N,O,P=d.walker.blockBoundary(t==3?{br:1}:null),Q=function(S){var T=P(S);if(!T)N=S;return T;},R=function(S){var T=Q(S);if(!T&&S.is&&S.is('br'))O=S;return T;};M.guard=Q;z=M.lastBackward();N=N||w;this.setStartAt(N,!N.is('br')&&(!z&&this.checkStartOfBlock()||z&&N.contains(z))?1:4);L=this.clone();L.collapse();L.setEndAt(w,2);M=new d.walker(L);M.guard=t==3?R:Q;N=null;z=M.lastForward();N=N||w;this.setEndAt(N,!z&&this.checkEndOfBlock()||z&&N.contains(z)?2:3);if(O)this.setEndAfter(O);}},shrink:function(t,u){if(!this.collapsed){t=t||2;var v=this.clone(),w=this.startContainer,x=this.endContainer,y=this.startOffset,z=this.endOffset,A=this.collapsed,B=1,C=1;if(w&&w.type==3)if(!y)v.setStartBefore(w);else if(y>=w.getLength())v.setStartAfter(w);else{v.setStartBefore(w);B=0;}if(x&&x.type==3)if(!z)v.setEndBefore(x);else if(z>=x.getLength())v.setEndAfter(x);else{v.setEndAfter(x);C=0;}var D=new d.walker(v),E=d.walker.bookmark();D.evaluator=function(I){return I.type==(t==1?1:3);};var F;D.guard=function(I,J){if(E(I))return true;if(t==1&&I.type==3)return false;if(J&&I.equals(F))return false;if(!J&&I.type==1)F=I;return true;};if(B){var G=D[t==1?'lastForward':'next']();
-G&&this.setStartAt(G,u?1:3);}if(C){D.reset();var H=D[t==1?'lastBackward':'previous']();H&&this.setEndAt(H,u?2:4);}return!!(B||C);}},insertNode:function(t){var x=this;x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])u=t.getIndex(),t=t.getParent();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])u=t.getIndex()+1,t=t.getParent();v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();
-}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=u==1,w=this.clone();w.collapse(v);w[v?'setStartAt':'setEndAt'](t,v?1:2);var x=new d.walker(w);x.evaluator=p;return x[v?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var z=this;var t=z.startContainer,u=z.startOffset;if(u&&t.type==3){var v=e.ltrim(t.substring(0,u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.startContainer),x=z.clone();x.collapse(true);x.setStartAt(w.block||w.blockLimit,1);var y=new d.walker(x);y.evaluator=o(true);return y.checkBackward();},checkEndOfBlock:function(){var z=this;var t=z.endContainer,u=z.endOffset;if(t.type==3){var v=e.rtrim(t.substring(u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.endContainer),x=z.clone();x.collapse(false);x.setEndAt(w.block||w.blockLimit,2);var y=new d.walker(x);y.evaluator=o(false);return y.checkForward();},checkReadOnly:(function(){function t(u,v){while(u){if(u.type==1)if(u.getAttribute('contentEditable')=='false'&&!u.data('cke-editable'))return 0;else if(u.is('body')||u.getAttribute('contentEditable')=='true'&&(u.contains(v)||u.equals(v)))break;u=u.getParent();}return 1;};return function(){var u=this.startContainer,v=this.endContainer;return!(t(u,v)&&t(v,u));};})(),moveToElementEditablePosition:function(t,u){var v;if(f.$empty[t.getName()])return false;while(t&&t.type==1){v=t.isEditable();if(v)this.moveToPosition(t,u?2:1);else if(f.$inline[t.getName()]){this.moveToPosition(t,u?4:3);return true;}if(f.$empty[t.getName()])t=t[u?'getPrevious':'getNext'](s);else t=t[u?'getLast':'getFirst'](s);if(t&&t.type==3){this.moveToPosition(t,u?4:3);return true;}}return v;},moveToElementEditStart:function(t){return this.moveToElementEditablePosition(t);},moveToElementEditEnd:function(t){return this.moveToElementEditablePosition(t,true);},getEnclosedNode:function(){var t=this.clone();t.optimize();if(t.startContainer.type!=1||t.endContainer.type!=1)return null;var u=new d.walker(t),v=d.walker.bookmark(true),w=d.walker.whitespaces(true),x=function(z){return w(z)&&v(z);};t.evaluator=x;var y=u.next();u.reset();return y&&y.equals(u.previous())?y:null;},getTouchedStartNode:function(){var t=this.startContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.startOffset)||t;
-},getTouchedEndNode:function(){var t=this.endContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.endOffset-1)||t;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;a.SHRINK_ELEMENT=1;a.SHRINK_TEXT=2;(function(){d.rangeList=function(n){if(n instanceof d.rangeList)return n;if(!n)n=[];else if(n instanceof d.range)n=[n];return e.extend(n,l);};var l={createIterator:function(){var n=this,o=d.walker.bookmark(),p=function(s){return!(s.is&&s.is('tr'));},q=[],r;return{getNextRange:function(s){r=r==undefined?0:r+1;var t=n[r];if(t&&n.length>1){if(!r)for(var u=n.length-1;u>=0;u--)q.unshift(n[u].createBookmark(true));if(s){var v=0;while(n[r+v+1]){var w=t.document,x=0,y=w.getById(q[v].endNode),z=w.getById(q[v+1].startNode),A;while(1){A=y.getNextSourceNode(false);if(!z.equals(A)){if(o(A)||A.type==1&&A.isBlockBoundary()){y=A;continue;}}else x=1;break;}if(!x)break;v++;}}t.moveToBookmark(q.shift());while(v--){A=n[++r];A.moveToBookmark(q.shift());t.setEnd(A.endContainer,A.endOffset);}}return t;}};},createBookmarks:function(n){var s=this;var o=[],p;for(var q=0;q<s.length;q++){o.push(p=s[q].createBookmark(n,true));for(var r=q+1;r<s.length;r++){s[r]=m(p,s[r]);s[r]=m(p,s[r],true);}}return o;},createBookmarks2:function(n){var o=[];for(var p=0;p<this.length;p++)o.push(this[p].createBookmark2(n));return o;},moveToBookmarks:function(n){for(var o=0;o<this.length;o++)this[o].moveToBookmark(n[o]);}};function m(n,o,p){var q=n.serializable,r=o[p?'endContainer':'startContainer'],s=p?'endOffset':'startOffset',t=q?o.document.getById(n.startNode):n.startNode,u=q?o.document.getById(n.endNode):n.endNode;if(r.equals(t.getPrevious())){o.startOffset=o.startOffset-r.getLength()-u.getPrevious().getLength();r=u.getNext();}else if(r.equals(u.getPrevious())){o.startOffset=o.startOffset-r.getLength();r=u.getNext();}r.equals(t.getParent())&&o[s]++;r.equals(u.getParent())&&o[s]++;o[p?'endContainer':'startContainer']=r;return o;};})();(function(){if(b.webkit){b.hc=false;return;}var l=c&&b.version<7,m=c&&b.version==7,n=l?a.basePath+'images/spacer.gif':m?'about:blank':'data:image/png;base64,',o=h.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;background-image:url('+n+')"></div>',a.document);o.appendTo(a.document.getHead());try{b.hc=o.getComputedStyle('background-image')=='none';}catch(p){b.hc=false;
-}if(b.hc)b.cssClass+=' cke_hc';o.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m<l.length;m++)a.add(l[m]);}});if(c)try{document.execCommand('BackgroundImageCache',false,true);}catch(l){}a.skins.add('kama',(function(){var m='cke_ui_color';return{editor:{css:['editor.css']},dialog:{css:['dialog.css']},templates:{css:['templates.css']},margins:[0,0,0,0],init:function(n){if(n.config.width&&!isNaN(n.config.width))n.config.width-=12;var o=[],p=/\$color/g,q='/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}';if(b.webkit){q=q.split('}').slice(0,-1);for(var r=0;r<q.length;r++)q[r]=q[r].split('{');}function s(v){var w=v.getById(m);if(!w){w=v.getHead().append('style');w.setAttribute('id',m);w.setAttribute('type','text/css');}return w;};function t(v,w,x){var y,z,A;for(var B=0;B<v.length;B++){if(b.webkit)for(z=0;z<w.length;z++){A=w[z][1];for(y=0;y<x.length;y++)A=A.replace(x[y][0],x[y][1]);v[B].$.sheet.addRule(w[z][0],A);}else{A=w;for(y=0;y<x.length;y++)A=A.replace(x[y][0],x[y][1]);if(c)v[B].$.styleSheet.cssText+=A;else v[B].$.innerHTML+=A;
-}}};var u=/\$color/g;e.extend(n,{uiColor:null,getUiColor:function(){return this.uiColor;},setUiColor:function(v){var w,x=s(a.document),y='.'+n.id,z=[y+' .cke_wrapper',y+'_dialog .cke_dialog_contents',y+'_dialog a.cke_dialog_tab',y+'_dialog .cke_dialog_footer'].join(','),A='background-color: $color !important;';if(b.webkit)w=[[z,A]];else w=z+'{'+A+'}';return(this.setUiColor=function(B){var C=[[u,B]];n.uiColor=B;t([x],w,C);t(o,q,C);})(v);}});n.on('menuShow',function(v){var w=v.data[0],x=w.element.getElementsByTag('iframe').getItem(0).getFrameDocument();if(!x.getById('cke_ui_color')){var y=s(x);o.push(y);var z=n.getUiColor();if(z)t([y],q,[[u,z]]);}});if(n.config.uiColor)n.setUiColor(n.config.uiColor);}};})());(function(){a.dialog?m():a.on('dialogPluginReady',m);function m(){a.dialog.on('resize',function(n){var o=n.data,p=o.width,q=o.height,r=o.dialog,s=r.parts.contents;if(o.skin!='kama')return;s.setStyles({width:p+'px',height:q+'px'});});};})();j.add('about',{requires:['dialog'],init:function(m){var n=m.addCommand('about',new a.dialogCommand('about'));n.modes={wysiwyg:1,source:1};n.canUndo=false;m.ui.addButton('About',{label:m.lang.about.title,command:'about'});a.dialog.add('about',this.path+'dialogs/about.js');}});(function(){var m='a11yhelp',n='a11yHelp';j.add(m,{availableLangs:{en:1,he:1},init:function(o){var p=this;o.addCommand(n,{exec:function(){var q=o.langCode;q=p.availableLangs[q]?q:'en';a.scriptLoader.load(a.getUrl(p.path+'lang/'+q+'.js'),function(){e.extend(o.lang,p.lang[q]);o.openDialog(n);});},modes:{wysiwyg:1,source:1},canUndo:false});a.dialog.add(n,this.path+'dialogs/a11yhelp.js');}});})();j.add('basicstyles',{requires:['styles','button'],init:function(m){var n=function(q,r,s,t){var u=new a.style(t);m.attachStyleStateChange(u,function(v){m.getCommand(s).setState(v);});m.addCommand(s,new a.styleCommand(u));m.ui.addButton(q,{label:r,command:s});},o=m.config,p=m.lang;n('Bold',p.bold,'bold',o.coreStyles_bold);n('Italic',p.italic,'italic',o.coreStyles_italic);n('Underline',p.underline,'underline',o.coreStyles_underline);n('Strike',p.strike,'strike',o.coreStyles_strike);n('Subscript',p.subscript,'subscript',o.coreStyles_subscript);n('Superscript',p.superscript,'superscript',o.coreStyles_superscript);}});i.coreStyles_bold={element:'strong',overrides:'b'};i.coreStyles_italic={element:'em',overrides:'i'};i.coreStyles_underline={element:'u'};i.coreStyles_strike={element:'strike'};i.coreStyles_subscript={element:'sub'};i.coreStyles_superscript={element:'sup'};
-(function(){var m={table:1,ul:1,ol:1,blockquote:1,div:1},n={},o={};e.extend(n,m,{tr:1,p:1,div:1,li:1});e.extend(o,n,{td:1});function p(w){q(w);r(w);};function q(w){var x=w.editor,y=w.data.path,z=x.config.useComputedState,A;z=z===undefined||z;if(!z)A=s(y.lastElement);A=A||y.block||y.blockLimit;A.is('body')&&(A=x.getSelection().getRanges()[0].getEnclosedNode());if(!A)return;var B=z?A.getComputedStyle('direction'):A.getStyle('direction')||A.getAttribute('dir');x.getCommand('bidirtl').setState(B=='rtl'?1:2);x.getCommand('bidiltr').setState(B=='ltr'?1:2);};function r(w){var x=w.editor,y=x.container.getChild(1),z=w.data.path.block||w.data.path.blockLimit;if(z&&x.lang.dir!=z.getComputedStyle('direction'))y.addClass('cke_mixed_dir_content');else y.removeClass('cke_mixed_dir_content');};function s(w){while(w&&!(w.getName() in o||w.is('body'))){var x=w.getParent();if(!x)break;w=x;}return w;};function t(w,x,y,z){h.setMarker(z,w,'bidi_processed',1);var A=w;while((A=A.getParent())&&!A.is('body')){if(A.getCustomData('bidi_processed')){w.removeStyle('direction');w.removeAttribute('dir');return null;}}var B='useComputedState' in y.config?y.config.useComputedState:1,C=B?w.getComputedStyle('direction'):w.getStyle('direction')||w.hasAttribute('dir');if(C==x)return null;var D=B?C:w.getComputedStyle('direction');w.removeStyle('direction');if(B){w.removeAttribute('dir');if(x!=w.getComputedStyle('direction'))w.setAttribute('dir',x);}else w.setAttribute('dir',x);if(x!=D)y.fire('dirChanged',{node:w,dir:x});y.forceNextSelectionCheck();return null;};function u(w,x,y){var z=w.getCommonAncestor(false,true);w=w.clone();w.enlarge(y==2?3:2);if(w.checkBoundaryOfElement(z,1)&&w.checkBoundaryOfElement(z,2)){var A;while(z&&z.type==1&&(A=z.getParent())&&A.getChildCount()==1&&!(z.getName() in x))z=A;return z.type==1&&z.getName() in x&&z;}};function v(w){return function(x){var y=x.getSelection(),z=x.config.enterMode,A=y.getRanges();if(A&&A.length){var B={},C=y.createBookmarks(),D=A.createIterator(),E,F=0;while(E=D.getNextRange(1)){var G=E.getEnclosedNode();if(!G||G&&!(G.type==1&&G.getName() in n))G=u(E,m,z);if(G&&!G.isReadOnly())t(G,w,x,B);var H,I,J=new d.walker(E),K=C[F].startNode,L=C[F++].endNode;J.evaluator=function(M){return!!(M.type==1&&M.getName() in m&&!(M.getName()==(z==1?'p':'div')&&M.getParent().type==1&&M.getParent().getName()=='blockquote')&&M.getPosition(K)&2&&(M.getPosition(L)&4+16)==4);};while(I=J.next())t(I,w,x,B);H=E.createIterator();H.enlargeBr=z!=2;while(I=H.getNextParagraph(z==1?'p':'div'))!I.isReadOnly()&&t(I,w,x,B);
-}h.clearAllMarkers(B);x.forceNextSelectionCheck();y.selectBookmarks(C);x.focus();}};};j.add('bidi',{requires:['styles','button'],init:function(w){var x=function(z,A,B,C){w.addCommand(B,new a.command(w,{exec:C}));w.ui.addButton(z,{label:A,command:B});},y=w.lang.bidi;x('BidiLtr',y.ltr,'bidiltr',v('ltr'));x('BidiRtl',y.rtl,'bidirtl',v('rtl'));w.on('selectionChange',p);}});})();(function(){function m(q,r){var s=r.block||r.blockLimit;if(!s||s.getName()=='body')return 2;if(s.getAscendant('blockquote',true))return 1;return 2;};function n(q){var r=q.editor,s=r.getCommand('blockquote');s.state=m(r,q.data.path);s.fire('state');};function o(q){for(var r=0,s=q.getChildCount(),t;r<s&&(t=q.getChild(r));r++){if(t.type==1&&t.isBlockBoundary())return false;}return true;};var p={exec:function(q){var r=q.getCommand('blockquote').state,s=q.getSelection(),t=s&&s.getRanges(true)[0];if(!t)return;var u=s.createBookmarks();if(c){var v=u[0].startNode,w=u[0].endNode,x;if(v&&v.getParent().getName()=='blockquote'){x=v;while(x=x.getNext()){if(x.type==1&&x.isBlockBoundary()){v.move(x,true);break;}}}if(w&&w.getParent().getName()=='blockquote'){x=w;while(x=x.getPrevious()){if(x.type==1&&x.isBlockBoundary()){w.move(x);break;}}}}var y=t.createIterator(),z;y.enlargeBr=q.config.enterMode!=2;if(r==2){var A=[];while(z=y.getNextParagraph())A.push(z);if(A.length<1){var B=q.document.createElement(q.config.enterMode==1?'p':'div'),C=u.shift();t.insertNode(B);B.append(new d.text('\ufeff',q.document));t.moveToBookmark(C);t.selectNodeContents(B);t.collapse(true);C=t.createBookmark();A.push(B);u.unshift(C);}var D=A[0].getParent(),E=[];for(var F=0;F<A.length;F++){z=A[F];D=D.getCommonAncestor(z.getParent());}var G={table:1,tbody:1,tr:1,ol:1,ul:1};while(G[D.getName()])D=D.getParent();var H=null;while(A.length>0){z=A.shift();while(!z.getParent().equals(D))z=z.getParent();if(!z.equals(H))E.push(z);H=z;}while(E.length>0){z=E.shift();if(z.getName()=='blockquote'){var I=new d.documentFragment(q.document);while(z.getFirst()){I.append(z.getFirst().remove());A.push(I.getLast());}I.replace(z);}else A.push(z);}var J=q.document.createElement('blockquote');J.insertBefore(A[0]);while(A.length>0){z=A.shift();J.append(z);}}else if(r==1){var K=[],L={};while(z=y.getNextParagraph()){var M=null,N=null;while(z.getParent()){if(z.getParent().getName()=='blockquote'){M=z.getParent();N=z;break;}z=z.getParent();}if(M&&N&&!N.getCustomData('blockquote_moveout')){K.push(N);h.setMarker(L,N,'blockquote_moveout',true);}}h.clearAllMarkers(L);
-var O=[],P=[];L={};while(K.length>0){var Q=K.shift();J=Q.getParent();if(!Q.getPrevious())Q.remove().insertBefore(J);else if(!Q.getNext())Q.remove().insertAfter(J);else{Q.breakParent(Q.getParent());P.push(Q.getNext());}if(!J.getCustomData('blockquote_processed')){P.push(J);h.setMarker(L,J,'blockquote_processed',true);}O.push(Q);}h.clearAllMarkers(L);for(F=P.length-1;F>=0;F--){J=P[F];if(o(J))J.remove();}if(q.config.enterMode==2){var R=true;while(O.length){Q=O.shift();if(Q.getName()=='div'){I=new d.documentFragment(q.document);var S=R&&Q.getPrevious()&&!(Q.getPrevious().type==1&&Q.getPrevious().isBlockBoundary());if(S)I.append(q.document.createElement('br'));var T=Q.getNext()&&!(Q.getNext().type==1&&Q.getNext().isBlockBoundary());while(Q.getFirst())Q.getFirst().remove().appendTo(I);if(T)I.append(q.document.createElement('br'));I.replace(Q);R=false;}}}}s.selectBookmarks(u);q.focus();}};j.add('blockquote',{init:function(q){q.addCommand('blockquote',p);q.ui.addButton('Blockquote',{label:q.lang.blockquote,command:'blockquote'});q.on('selectionChange',n);},requires:['domiterator']});})();j.add('button',{beforeInit:function(m){m.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(m){e.extend(this,m,{title:m.label,className:m.className||m.command&&'cke_button_'+m.command||'',click:m.click||(function(n){n.execCommand(m.command);})});this._={};};k.button.handler={create:function(m){return new k.button(m);}};k.button._={instances:[],keydown:function(m,n){var o=k.button._.instances[m];if(o.onkey){n=new d.event(n);return o.onkey(o,n.getKeystroke())!==false;}},focus:function(m,n){var o=k.button._.instances[m],p;if(o.onfocus)p=o.onfocus(o,new d.event(n))!==false;if(b.gecko&&b.version<10900)n.preventBubble();return p;}};(function(){var m=e.addFunction(k.button._.keydown,k.button._),n=e.addFunction(k.button._.focus,k.button._);k.button.prototype={canGroup:true,render:function(o,p){var q=b,r=this._.id=e.getNextId(),s='',t=this.command,u,v;this._.editor=o;var w={id:r,button:this,editor:o,focus:function(){var z=a.document.getById(r);z.focus();},execute:function(){this.button.click(o);}};w.clickFn=u=e.addFunction(w.execute,w);w.index=v=k.button._.instances.push(w)-1;if(this.modes){var x={};o.on('beforeModeUnload',function(){x[o.mode]=this._.state;},this);o.on('mode',function(){var z=o.mode;this.setState(this.modes[z]?x[z]!=undefined?x[z]:2:0);},this);}else if(t){t=o.getCommand(t);if(t){t.on('state',function(){this.setState(t.state);},this);s+='cke_'+(t.state==1?'on':t.state==0?'disabled':'off');
-}}if(!t)s+='cke_off';if(this.className)s+=' '+this.className;p.push('<span class="cke_button'+(this.icon&&this.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">','<a id="',r,'" class="',s,'"',q.gecko&&q.version>=10900&&!q.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+r+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(q.opera||q.gecko&&q.mac)p.push(' onkeypress="return false;"');if(q.gecko)p.push(' onblur="this.style.cssText = this.style.cssText;"');p.push(' onkeydown="return CKEDITOR.tools.callFunction(',m,', ',v,', event);" onfocus="return CKEDITOR.tools.callFunction(',n,', ',v,', event);" onclick="CKEDITOR.tools.callFunction(',u,', this); return false;"><span class="cke_icon"');if(this.icon){var y=(this.iconOffset||0)*-16;p.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+y+'px;"');}p.push('> </span><span id="',r,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)p.push('<span class="cke_buttonarrow">'+(b.hc?'▼':' ')+'</span>');p.push('</a>','</span>');if(this.onRender)this.onRender();return w;},setState:function(o){if(this._.state==o)return false;this._.state=o;var p=a.document.getById(this._.id);if(p){p.setState(o);o==0?p.setAttribute('aria-disabled',true):p.removeAttribute('aria-disabled');o==1?p.setAttribute('aria-pressed',true):p.removeAttribute('aria-pressed');return true;}else return false;}};})();k.prototype.addButton=function(m,n){this.add(m,1,n);};a.on('reset',function(){k.button._.instances=[];});(function(){var m=function(x,y){var z=x.document,A=z.getBody(),B=0,C=function(){B=1;};A.on(y,C);(b.version>7?z.$:z.$.selection.createRange()).execCommand(y);A.removeListener(y,C);return B;},n=c?function(x,y){return m(x,y);}:function(x,y){try{return x.document.$.execCommand(y,false,null);}catch(z){return false;}},o=function(x){var y=this;y.type=x;y.canUndo=y.type=='cut';y.startDisabled=true;};o.prototype={exec:function(x,y){this.type=='cut'&&s(x);var z=n(x,this.type);if(!z)alert(x.lang.clipboard[this.type+'Error']);return z;}};var p={canUndo:false,exec:c?function(x){x.focus();if(!x.document.getBody().fire('beforepaste')&&!m(x,'paste')){x.fire('pasteDialog');return false;}}:function(x){try{if(!x.document.getBody().fire('beforepaste')&&!x.document.$.execCommand('Paste',false,null))throw 0;}catch(y){setTimeout(function(){x.fire('pasteDialog');},0);return false;}}},q=function(x){if(this.mode!='wysiwyg')return;
-switch(x.data.keyCode){case 1000+86:case 2000+45:var y=this.document.getBody();if(!c&&y.fire('beforepaste'))x.cancel();else if(b.opera||b.gecko&&b.version<10900)y.fire('paste');return;case 1000+88:case 2000+46:var z=this;this.fire('saveSnapshot');setTimeout(function(){z.fire('saveSnapshot');},0);}};function r(x,y,z){var A=this.document;if(A.getById('cke_pastebin'))return;if(y=='text'&&x.data&&x.data.$.clipboardData){var B=x.data.$.clipboardData.getData('text/plain');if(B){x.data.preventDefault();z(B);return;}}var C=this.getSelection(),D=new d.range(A),E=new h(y=='text'?'textarea':b.webkit?'body':'div',A);E.setAttribute('id','cke_pastebin');b.webkit&&E.append(A.createText('\xa0'));A.getBody().append(E);E.setStyles({position:'absolute',top:C.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});E.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var F=C.createBookmarks();if(y=='text'){if(c){var G=A.getBody().$.createTextRange();G.moveToElementText(E.$);G.execCommand('Paste');x.data.preventDefault();}else E.$.focus();}else{D.setStartAt(E,1);D.setEndAt(E,2);D.select(true);}var H=this;window.setTimeout(function(){y=='text'&&b.gecko&&H.focusGrabber.focus();E.remove();var I;E=b.webkit&&(I=E.getFirst())&&I.is&&I.hasClass('Apple-style-span')?I:E;C.selectBookmarks(F);z(E['get'+(y=='text'?'Value':'Html')]());},0);};function s(x){if(!c||b.quirks)return;var y=x.getSelection(),z;if(y.getType()==3&&(z=y.getSelectedElement())){var A=y.getRanges()[0],B=x.document.createText('');B.insertBefore(z);A.setStartBefore(B);A.setEndAfter(z);y.selectRanges([A]);setTimeout(function(){if(z.getParent()){B.remove();y.selectElement(z);}},0);}};var t;function u(x,y){c&&(t=1);var z=y.document.$.queryCommandEnabled(x)?2:0;t=0;return z;};var v;function w(){var y=this;if(y.mode!='wysiwyg')return;y.getCommand('cut').setState(v?0:u('Cut',y));y.getCommand('copy').setState(u('Copy',y));var x=v?0:b.webkit?2:u('Paste',y);y.fire('pasteState',x);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(x){x.on('paste',function(A){var B=A.data;if(B.html)x.insertHtml(B.html);else if(B.text)x.insertText(B.text);},null,null,1000);x.on('pasteDialog',function(A){setTimeout(function(){x.openDialog('paste');},0);});x.on('pasteState',function(A){x.getCommand('paste').setState(A.data);});function y(A,B,C,D){var E=x.lang[B];x.addCommand(B,C);x.ui.addButton(A,{label:E,command:B});if(x.addMenuItems)x.addMenuItem(B,{label:E,command:B,group:'clipboard',order:D});
-};y('Cut','cut',new o('cut'),1);y('Copy','copy',new o('copy'),4);y('Paste','paste',p,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));x.on('key',q,x);var z=x.config.forcePasteAsPlainText?'text':'html';x.on('contentDom',function(){var A=x.document.getBody();A.on(z=='text'&&c||b.webkit?'paste':'beforepaste',function(B){if(t)return;r.call(x,B,z,function(C){if(!C)return;var D={};D[z]=C;x.fire('paste',D);});});A.on('beforecut',function(){!t&&s(x);});A.on('mouseup',function(){setTimeout(function(){w.call(x);},0);},x);A.on('keyup',w,x);});x.on('selectionChange',function(A){v=A.data.selection.getRanges()[0].checkReadOnly();w.call(x);});if(x.contextMenu)x.contextMenu.addListener(function(A,B){var C=B.getRanges()[0].checkReadOnly();return{cut:!C&&u('Cut',x),copy:u('Copy',x),paste:!C&&(b.webkit?2:u('Paste',x))};});}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p;if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,4,{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2000+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit;do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=x.length+(n.colorButton_enableMore?2:1),z=e.addFunction(function(F,G){if(F=='?'){var H=arguments.callee;function I(K){this.removeListener('ok',I);this.removeListener('cancel',I);K.name=='ok'&&H(this.getContentElement('picker','selectedColor').getValue(),G);};m.openDialog('colordialog',function(){this.on('ok',I);this.on('cancel',I);});return;}m.focus();t.hide();m.fire('saveSnapshot');new a.style(n['colorButton_'+G+'Style'],{color:'inherit'}).remove(m.document);
-if(F){var J=n['colorButton_'+G+'Style'];J.childRule=G=='back'?function(K){return s(K);}:function(K){return K.getName()!='a'||s(K);};new a.style(J,{color:F}).apply(m.document);}m.fire('saveSnapshot');});w.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',o.auto,'" onclick="CKEDITOR.tools.callFunction(',z,",null,'",u,"');return false;\" href=\"javascript:void('",o.auto,'\')" role="option" aria-posinset="1" aria-setsize="',y,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',v,'"></span></td><td colspan=7 align=center>',o.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var A=0;A<x.length;A++){if(A%8===0)w.push('</tr><tr>');var B=x[A].split('/'),C=B[0],D=B[1]||C;if(!B[1])C='#'+C.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var E=m.lang.colors[D]||D;w.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',E,'" onclick="CKEDITOR.tools.callFunction(',z,",'",C,"','",u,"'); return false;\" href=\"javascript:void('",E,'\')" role="option" aria-posinset="',A+2,'" aria-setsize="',y,'"><span class="cke_colorbox" style="background-color:#',D,'"></span></a></td>');}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',z,",'?','",u,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option" aria-posinset="',y,'" aria-setsize="',y,'">',o.more,'</a></td>');w.push('</tr></table>');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};(function(){j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],onLoad:function(){j.contextMenu=e.createClass({base:a.menu,$:function(m){this.base.call(this,m,{panel:{className:m.skinClass+' cke_contextmenu',attributes:{'aria-label':m.lang.contextmenu.options}}});
-},proto:{addTarget:function(m,n){if(b.opera&&!('oncontextmenu' in document.body)){var o;m.on('mousedown',function(s){s=s.data;if(s.$.button!=2){if(s.getKeystroke()==1000+1)m.fire('contextmenu',s);return;}if(n&&(b.mac?s.$.metaKey:s.$.ctrlKey))return;var t=s.getTarget();if(!o){var u=t.getDocument();o=u.createElement('input');o.$.type='button';u.getBody().append(o);}o.setAttribute('style','position:absolute;top:'+(s.$.clientY-2)+'px;left:'+(s.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});m.on('mouseup',function(s){if(o){o.remove();o=undefined;m.fire('contextmenu',s.data);}});}m.on('contextmenu',function(s){var t=s.data;if(n&&(b.webkit?p:b.mac?t.$.metaKey:t.$.ctrlKey))return;t.preventDefault();var u=t.getTarget().getDocument().getDocumentElement(),v=t.$.clientX,w=t.$.clientY;e.setTimeout(function(){this.open(u,null,v,w);},0,this);},this);if(b.opera)m.on('keypress',function(s){var t=s.data;if(t.$.keyCode===0)t.preventDefault();});if(b.webkit){var p,q=function(s){p=b.mac?s.data.$.metaKey:s.data.$.ctrlKey;},r=function(){p=0;};m.on('keydown',q);m.on('keyup',r);m.on('contextmenu',r);}},open:function(m,n,o,p){this.editor.focus();m=m||a.document.getDocumentElement();this.show(m,n,o,p);}}});},beforeInit:function(m){m.contextMenu=new j.contextMenu(m);m.addCommand('contextMenu',{exec:function(){m.contextMenu.open(m.document.getBody());}});}});(function(){function m(o){var p=this.att,q=o&&o.hasAttribute(p)&&o.getAttribute(p)||'';if(q!==undefined)this.setValue(q);};function n(){var o;for(var p=0;p<arguments.length;p++){if(arguments[p] instanceof h){o=arguments[p];break;}}if(o){var q=this.att,r=this.getValue();if(q=='dir'){var s=o.getAttribute(q);if(s!=r&&o.getParent())this._.dialog._.editor.fire('dirChanged',{node:o,dir:r||o.getDirection(1)});}if(r)o.setAttribute(q,r);else o.removeAttribute(q,r);}};j.add('dialogadvtab',{createAdvancedTab:function(o,p){if(!p)p={id:1,dir:1,classes:1,styles:1};var q=o.lang.common,r={id:'advanced',label:q.advancedTab,title:q.advancedTab,elements:[{type:'vbox',padding:1,children:[]}]},s=[];if(p.id||p.dir){if(p.id)s.push({id:'advId',att:'id',type:'text',label:q.id,setup:m,commit:n});if(p.dir)s.push({id:'advLangDir',att:'dir',type:'select',label:q.langDir,'default':'',style:'width:100%',items:[[q.notSet,''],[q.langDirLTR,'ltr'],[q.langDirRTL,'rtl']],setup:m,commit:n});r.elements[0].children.push({type:'hbox',widths:['50%','50%'],children:[].concat(s)});}if(p.styles||p.classes){s=[];if(p.styles)s.push({id:'advStyles',att:'style',type:'text',label:q.styles,'default':'',getStyle:function(t,u){var v=this.getValue().match(new RegExp(t+'\\s*:s*([^;]*)','i'));
-return v?v[1]:u;},updateStyle:function(t,u){var v=this.getValue();if(v)v=v.replace(new RegExp('\\s*'+t+'s*:[^;]*(?:$|;s*)','i'),'').replace(/^[;\s]+/,'').replace(/\s+$/,'');if(u){v&&!/;\s*$/.test(v)&&(v+='; ');v+=t+': '+u;}this.setValue(v,1);},setup:m,commit:n});if(p.classes)s.push({type:'hbox',widths:['45%','55%'],children:[{id:'advCSSClasses',att:'class',type:'text',label:q.cssClasses,'default':'',setup:m,commit:n}]});r.elements[0].children.push({type:'hbox',widths:['50%','50%'],children:[].concat(s)});}return r;}});})();(function(){j.add('div',{requires:['editingblock','domiterator','styles'],init:function(m){var n=m.lang.div;m.addCommand('creatediv',new a.dialogCommand('creatediv'));m.addCommand('editdiv',new a.dialogCommand('editdiv'));m.addCommand('removediv',{exec:function(o){var p=o.getSelection(),q=p&&p.getRanges(),r,s=p.createBookmarks(),t,u=[];function v(x){var y=new d.elementPath(x),z=y.blockLimit,A=z.is('div')&&z;if(A&&!A.data('cke-div-added')){u.push(A);A.data('cke-div-added');}};for(var w=0;w<q.length;w++){r=q[w];if(r.collapsed)v(p.getStartElement());else{t=new d.walker(r);t.evaluator=v;t.lastForward();}}for(w=0;w<u.length;w++)u[w].remove(true);p.selectBookmarks(s);}});m.ui.addButton('CreateDiv',{label:n.toolbar,command:'creatediv'});if(m.addMenuItems){m.addMenuItems({editdiv:{label:n.edit,command:'editdiv',group:'div',order:1},removediv:{label:n.remove,command:'removediv',group:'div',order:5}});if(m.contextMenu)m.contextMenu.addListener(function(o,p){if(!o||o.isReadOnly())return null;var q=new d.elementPath(o),r=q.blockLimit;if(r&&r.getAscendant('div',true))return{editdiv:2,removediv:2};return null;});}a.dialog.add('creatediv',this.path+'dialogs/div.js');a.dialog.add('editdiv',this.path+'dialogs/div.js');}});})();(function(){var m={toolbarFocus:{exec:function(o){var p=o._.elementsPath.idBase,q=a.document.getById(p+'0');q&&q.focus(c||b.air);}}},n='<span class="cke_empty"> </span>';j.add('elementspath',{requires:['selection'],init:function(o){var p='cke_path_'+o.name,q,r=function(){if(!q)q=a.document.getById(p);return q;},s='cke_elementspath_'+e.getNextNumber()+'_';o._.elementsPath={idBase:s,filters:[]};o.on('themeSpace',function(w){if(w.data.space=='bottom')w.data.html+='<span id="'+p+'_label" class="cke_voice_label">'+o.lang.elementsPath.eleLabel+'</span>'+'<div id="'+p+'" class="cke_path" role="group" aria-labelledby="'+p+'_label">'+n+'</div>';});function t(w){o.focus();var x=o._.elementsPath.list[w];if(x.is('body')){var y=new d.range(o.document);
-y.selectNodeContents(x);y.select();}else o.getSelection().selectElement(x);};var u=e.addFunction(t),v=e.addFunction(function(w,x){var y=o._.elementsPath.idBase,z;x=new d.event(x);var A=o.lang.dir=='rtl';switch(x.getKeystroke()){case A?39:37:case 9:z=a.document.getById(y+(w+1));if(!z)z=a.document.getById(y+'0');z.focus();return false;case A?37:39:case 2000+9:z=a.document.getById(y+(w-1));if(!z)z=a.document.getById(y+(o._.elementsPath.list.length-1));z.focus();return false;case 27:o.focus();return false;case 13:case 32:t(w);return false;}return true;});o.on('selectionChange',function(w){var x=b,y=w.data.selection,z=y.getStartElement(),A=[],B=w.editor,C=B._.elementsPath.list=[],D=B._.elementsPath.filters;while(z){var E=0;for(var F=0;F<D.length;F++){if(D[F](z)===false){E=1;break;}}if(!E){var G=C.push(z)-1,H;if(z.data('cke-real-element-type'))H=z.data('cke-real-element-type');else H=z.getName();var I='';if(x.opera||x.gecko&&x.mac)I+=' onkeypress="return false;"';if(x.gecko)I+=' onblur="this.style.cssText = this.style.cssText;"';var J=B.lang.elementsPath.eleTitle.replace(/%1/,H);A.unshift('<a id="',s,G,'" href="javascript:void(\'',H,'\')" tabindex="-1" title="',J,'"'+(b.gecko&&b.version<10900?' onfocus="event.preventBubble();"':'')+' hidefocus="true" '+' onkeydown="return CKEDITOR.tools.callFunction(',v,',',G,', event );"'+I,' onclick="CKEDITOR.tools.callFunction('+u,',',G,'); return false;"',' role="button" aria-labelledby="'+s+G+'_label">',H,'<span id="',s,G,'_label" class="cke_label">'+J+'</span>','</a>');}if(H=='body')break;z=z.getParent();}var K=r();K.setHtml(A.join('')+n);B.fire('elementsPathUpdate',{space:K});});o.on('contentDomUnload',function(){q&&q.setHtml(n);});o.addCommand('elementsPathFocus',m.toolbarFocus);}});})();(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(t){var u=t.specialKeys;u[13]=r;u[2000+13]=q;}});j.enterkey={enterBlock:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document;if(v.checkStartOfBlock()&&v.checkEndOfBlock()){var y=new d.elementPath(v.startContainer),z=y.block;if(z&&(z.is('li')||z.getParent().is('li'))){t.execCommand('outdent');return;}}var A=u==3?'div':'p',B=v.splitBlock(A);if(!B)return;var C=B.previousBlock,D=B.nextBlock,E=B.wasStartOfBlock,F=B.wasEndOfBlock,G;if(D){G=D.getParent();if(G.is('li')){D.breakParent(G);D.move(D.getNext(),1);}}else if(C&&(G=C.getParent())&&G.is('li')){C.breakParent(G);v.moveToElementEditStart(C.getNext());C.move(C.getPrevious());}if(!E&&!F){if(D.is('li')&&(G=D.getFirst(d.walker.invisible(true)))&&G.is&&G.is('ul','ol'))(c?x.createText('\xa0'):x.createElement('br')).insertBefore(G);
-if(D)v.moveToElementEditStart(D);}else{var H,I;if(C){if(C.is('li')||!p.test(C.getName()))H=C.clone();}else if(D)H=D.clone();if(!H){H=x.createElement(A);if(C&&(I=C.getDirection()))H.setAttribute('dir',I);}else if(w&&!H.is('li'))H.renameNode(A);var J=B.elementPath;if(J)for(var K=0,L=J.elements.length;K<L;K++){var M=J.elements[K];if(M.equals(J.block)||M.equals(J.blockLimit))break;if(f.$removeEmpty[M.getName()]){M=M.clone();H.moveChildren(M);H.append(M);}}if(!c)H.appendBogus();v.insertNode(H);if(c&&E&&(!F||!C.getChildCount())){v.moveToElementEditStart(F?C:H);v.select();}v.moveToElementEditStart(E&&!F?D:H);}if(!c)if(D){var N=x.createElement('span');N.setHtml(' ');v.insertNode(N);N.scrollIntoView();v.deleteContents();}else H.scrollIntoView();v.select();},enterBr:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=u==3?'div':'p',z=v.checkEndOfBlock(),A=new d.elementPath(t.getSelection().getStartElement()),B=A.block,C=B&&A.block.getName(),D=false;if(!w&&C=='li'){o(t,u,v,w);return;}if(!w&&z&&p.test(C)){var E,F;if(F=B.getDirection()){E=x.createElement('div');E.setAttribute('dir',F);E.insertAfter(B);v.setStart(E,0);}else{x.createElement('br').insertAfter(B);if(b.gecko)x.createText('').insertAfter(B);v.setStartAt(B.getNext(),c?3:1);}}else{var G;D=C=='pre';if(D&&!b.gecko)G=x.createText(c?'\r':'\n');else G=x.createElement('br');v.deleteContents();v.insertNode(G);if(!c)x.createText('\ufeff').insertAfter(G);if(z&&!c)G.getParent().appendBogus();if(!c)G.getNext().$.nodeValue='';if(c)v.setStartAt(G,4);else v.setStartAt(G.getNext(),1);if(!c){var H=null;if(!b.gecko){H=x.createElement('span');H.setHtml(' ');}else H=x.createElement('br');H.insertBefore(G.getNext());H.scrollIntoView();H.remove();}}v.collapse(true);v.select(D);}};var m=j.enterkey,n=m.enterBr,o=m.enterBlock,p=/^h[1-6]$/;function q(t){if(t.mode!='wysiwyg')return false;if(t.getSelection().getStartElement().hasAscendant('pre',true)){setTimeout(function(){o(t,t.config.enterMode,null,true);},0);return true;}else return r(t,t.config.shiftEnterMode,1);};function r(t,u,v){v=t.config.forceEnterMode||v;if(t.mode!='wysiwyg')return false;if(!u)u=t.config.enterMode;setTimeout(function(){t.fire('saveSnapshot');if(u==2||t.getSelection().getStartElement().hasAscendant('pre',1))n(t,u,null,v);else o(t,u,null,v);},0);return true;};function s(t){var u=t.getSelection().getRanges(true);for(var v=u.length-1;v>0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';
-function q(r,s){var t={},u=[],v={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};r=r.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(A,B){var C=s?'&'+B+';':v[B],D=s?v[B]:'&'+B+';';t[C]=D;u.push(C);return '';});if(!s&&r){r=r.split(',');var w=document.createElement('div'),x;w.innerHTML='&'+r.join(';&')+';';x=w.innerHTML;w=null;for(var y=0;y<x.length;y++){var z=x.charAt(y);t[z]='&'+r[y]+';';u.push(z);}}t.regex=u.join(s?'|':'');return t;};j.add('entities',{afterInit:function(r){var s=r.config,t=r.dataProcessor,u=t&&t.htmlFilter;if(u){var v=m;if(s.entities){v+=','+n;if(s.entities_latin)v+=','+o;if(s.entities_greek)v+=','+p;if(s.entities_additional)v+=','+s.entities_additional;}var w=q(v),x='['+w.regex+']';delete w.regex;if(s.entities&&s.entities_processNumerical)x='[^ -~]|'+x;x=new RegExp(x,'g');function y(C){return s.entities_processNumerical=='force'||!w[C]?'&#'+C.charCodeAt(0)+';':w[C];};var z=q([m,'shy'].join(','),true),A=new RegExp(z.regex,'g');function B(C){return z[C];};u.addRules({text:function(C){return C.replace(A,B).replace(x,y);}});}}});})();i.entities=true;i.entities_latin=true;i.entities_greek=true;i.entities_additional='#39';(function(){function m(v,w){var x=[];if(!w)return v;else for(var y in w)x.push(y+'='+encodeURIComponent(w[y]));return v+(v.indexOf('?')!=-1?'&':'?')+x.join('&');};function n(v){v+='';var w=v.charAt(0).toUpperCase();return w+v.substr(1);};function o(v){var C=this;var w=C.getDialog(),x=w.getParentEditor();x._.filebrowserSe=C;var y=x.config['filebrowser'+n(w.getName())+'WindowWidth']||x.config.filebrowserWindowWidth||'80%',z=x.config['filebrowser'+n(w.getName())+'WindowHeight']||x.config.filebrowserWindowHeight||'70%',A=C.filebrowser.params||{};A.CKEditor=x.name;A.CKEditorFuncNum=x._.filebrowserFn;if(!A.langCode)A.langCode=x.langCode;var B=m(C.filebrowser.url,A);x.popup(B,y,z,x.config.fileBrowserWindowFeatures);};function p(v){var y=this;var w=y.getDialog(),x=w.getParentEditor();x._.filebrowserSe=y;if(!w.getContentElement(y['for'][0],y['for'][1]).getInputElement().$.value)return false;if(!w.getContentElement(y['for'][0],y['for'][1]).getAction())return false;return true;};function q(v,w,x){var y=x.params||{};y.CKEditor=v.name;y.CKEditorFuncNum=v._.filebrowserFn;if(!y.langCode)y.langCode=v.langCode;w.action=m(x.url,y);w.filebrowser=x;};function r(v,w,x,y){var z,A;for(var B in y){z=y[B];if(z.type=='hbox'||z.type=='vbox')r(v,w,x,z.children);if(!z.filebrowser)continue;if(typeof z.filebrowser=='string'){var C={action:z.type=='fileButton'?'QuickUpload':'Browse',target:z.filebrowser};
-z.filebrowser=C;}if(z.filebrowser.action=='Browse'){var D=z.filebrowser.url;if(D===undefined){D=v.config['filebrowser'+n(w)+'BrowseUrl'];if(D===undefined)D=v.config.filebrowserBrowseUrl;}if(D){z.onClick=o;z.filebrowser.url=D;z.hidden=false;}}else if(z.filebrowser.action=='QuickUpload'&&z['for']){D=z.filebrowser.url;if(D===undefined){D=v.config['filebrowser'+n(w)+'UploadUrl'];if(D===undefined)D=v.config.filebrowserUploadUrl;}if(D){var E=z.onClick;z.onClick=function(F){var G=F.sender;if(E&&E.call(G,F)===false)return false;return p.call(G,F);};z.filebrowser.url=D;z.hidden=false;q(v,x.getContents(z['for'][0]).get(z['for'][1]),z.filebrowser);}}}};function s(v,w){var x=w.getDialog(),y=w.filebrowser.target||null;v=v.replace(/#/g,'%23');if(y){var z=y.split(':'),A=x.getContentElement(z[0],z[1]);if(A){A.setValue(v);x.selectPage(z[0]);}}};function t(v,w,x){if(x.indexOf(';')!==-1){var y=x.split(';');for(var z=0;z<y.length;z++){if(t(v,w,y[z]))return true;}return false;}var A=v.getContents(w).get(x).filebrowser;return A&&A.url;};function u(v,w){var A=this;var x=A._.filebrowserSe.getDialog(),y=A._.filebrowserSe['for'],z=A._.filebrowserSe.filebrowser.onSelect;if(y)x.getContentElement(y[0],y[1]).reset();if(typeof w=='function'&&w.call(A._.filebrowserSe)===false)return;if(z&&z.call(A._.filebrowserSe,v,w)===false)return;if(typeof w=='string'&&w)alert(w);if(v)s(v,A._.filebrowserSe);};j.add('filebrowser',{init:function(v,w){v._.filebrowserFn=e.addFunction(u,v);v.on('destroy',function(){e.removeFunction(this._.filebrowserFn);});}});a.on('dialogDefinition',function(v){var w=v.data.definition,x;for(var y in w.contents){if(x=w.contents[y]){r(v.editor,v.data.name,w,x.elements);if(x.hidden&&x.filebrowser)x.hidden=!t(w,x.id,x.filebrowser);}}});})();j.add('find',{init:function(m){var n=j.find;m.ui.addButton('Find',{label:m.lang.findAndReplace.find,command:'find'});var o=m.addCommand('find',new a.dialogCommand('find'));o.canUndo=false;m.ui.addButton('Replace',{label:m.lang.findAndReplace.replace,command:'replace'});var p=m.addCommand('replace',new a.dialogCommand('replace'));p.canUndo=false;a.dialog.add('find',this.path+'dialogs/find.js');a.dialog.add('replace',this.path+'dialogs/find.js');},requires:['styles']});i.find_highlight={element:'span',styles:{'background-color':'#004',color:'#fff'}};(function(){var m=/\.swf(?:$|\?)/i,n=e.cssLength;function o(q){var r=q.attributes;return r.type=='application/x-shockwave-flash'||m.test(r.src||'');};function p(q,r){var s=q.createFakeParserElement(r,'cke_flash','flash',true),t=s.attributes.style||'',u=r.attributes.width,v=r.attributes.height;
-if(typeof u!='undefined')t=s.attributes.style=t+'width:'+n(u)+';';if(typeof v!='undefined')t=s.attributes.style=t+'height:'+n(v)+';';return s;};j.add('flash',{init:function(q){q.addCommand('flash',new a.dialogCommand('flash'));q.ui.addButton('Flash',{label:q.lang.common.flash,command:'flash'});a.dialog.add('flash',this.path+'dialogs/flash.js');q.addCss('img.cke_flash{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');if(q.addMenuItems)q.addMenuItems({flash:{label:q.lang.flash.properties,command:'flash',group:'flash'}});q.on('doubleclick',function(r){var s=r.data.element;if(s.is('img')&&s.data('cke-real-element-type')=='flash')r.data.dialog='flash';});if(q.contextMenu)q.contextMenu.addListener(function(r,s){if(r&&r.is('img')&&!r.isReadOnly()&&r.data('cke-real-element-type')=='flash')return{flash:2};});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter;if(s)s.addRules({elements:{'cke:object':function(t){var u=t.attributes,v=u.classid&&String(u.classid).toLowerCase();if(!v){for(var w=0;w<t.children.length;w++){if(t.children[w].name=='cke:embed'){if(!o(t.children[w]))return null;return p(q,t);}}return null;}return p(q,t);},'cke:embed':function(t){if(!o(t))return null;return p(q,t);}}},5);},requires:['fakeobjects']});})();e.extend(i,{flashEmbedTagOnly:false,flashAddEmbedTag:true,flashConvertOnEdit:false});(function(){function m(n,o,p,q,r,s,t){var u=n.config,v=r.split(';'),w=[],x={};for(var y=0;y<v.length;y++){var z=v[y];if(z){z=z.split('/');var A={},B=v[y]=z[0];A[p]=w[y]=z[1]||B;x[B]=new a.style(t,A);x[B]._.definition.name=B;}else v.splice(y--,1);}n.ui.addRichCombo(o,{label:q.label,title:q.panelTitle,className:'cke_'+(p=='size'?'fontSize':'font'),panel:{css:n.skin.editor.css.concat(u.contentsCss),multiSelect:false,attributes:{'aria-label':q.panelTitle}},init:function(){this.startGroup(q.panelTitle);for(var C=0;C<v.length;C++){var D=v[C];this.add(D,x[D].buildPreview(),D);}},onClick:function(C){n.focus();n.fire('saveSnapshot');var D=x[C];if(this.getValue()==C)D.remove(n.document);else D.apply(n.document);n.fire('saveSnapshot');},onRender:function(){n.on('selectionChange',function(C){var D=this.getValue(),E=C.data.path,F=E.elements;for(var G=0,H;G<F.length;G++){H=F[G];for(var I in x){if(x[I].checkElementRemovable(H,true)){if(I!=D)this.setValue(I);return;}}}this.setValue('',s);},this);}});};j.add('font',{requires:['richcombo','styles'],init:function(n){var o=n.config;
-m(n,'Font','family',n.lang.font,o.font_names,o.font_defaultLabel,o.font_style);m(n,'FontSize','size',n.lang.fontSize,o.fontSize_sizes,o.fontSize_defaultLabel,o.fontSize_style);}});})();i.font_names='Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif';i.font_defaultLabel='';i.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};i.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';i.fontSize_defaultLabel='';i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};j.add('format',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.format,p=n.format_tags.split(';'),q={};for(var r=0;r<p.length;r++){var s=p[r];q[s]=new a.style(n['format_'+s]);q[s]._.enterMode=m.config.enterMode;}m.ui.addRichCombo('Format',{label:o.label,title:o.panelTitle,className:'cke_format',panel:{css:m.skin.editor.css.concat(n.contentsCss),multiSelect:false,attributes:{'aria-label':o.panelTitle}},init:function(){this.startGroup(o.panelTitle);for(var t in q){var u=o['tag_'+t];this.add(t,'<'+t+'>'+u+'</'+t+'>',u);}},onClick:function(t){m.focus();m.fire('saveSnapshot');var u=q[t],v=new d.elementPath(m.getSelection().getStartElement());u[u.checkActive(v)?'remove':'apply'](m.document);setTimeout(function(){m.fire('saveSnapshot');},0);},onRender:function(){m.on('selectionChange',function(t){var u=this.getValue(),v=t.data.path;for(var w in q){if(q[w].checkActive(v)){if(w!=u)this.setValue(w,m.lang.format['tag_'+w]);return;}}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(m){var n=m.lang;m.addCss('form{border: 1px dotted #FF0000;padding: 2px;}\n');m.addCss('img.cke_hidden{background-image: url('+a.getUrl(this.path+'images/hiddenfield.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 16px !important;'+'height: 16px !important;'+'}');
+(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'B5GJ5GG',version:'3.6.1',revision:'7072',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);
+}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})d=null;if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';},secure:location.protocol=='https:'};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie9Compat=document.documentMode==9;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');
+if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=1;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f];if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var i=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!i.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();a.dom={};var d=a.dom;(function(){var e=[];a.on('reset',function(){e=[];});a.tools={arrayCompare:function(f,g){if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h<f.length;h++){if(f[h]!=g[h])return false;}return true;},clone:function(f){var g;if(f&&f instanceof Array){g=[];for(var h=0;h<f.length;h++)g[h]=this.clone(f[h]);return g;}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp)return f;g=new f.constructor();for(var i in f){var j=f[i];g[i]=this.clone(j);}return g;},capitalize:function(f){return f.charAt(0).toUpperCase()+f.substring(1).toLowerCase();},extend:function(f){var g=arguments.length,h,i;
+if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){i=arguments[g-1];g-=2;}for(var j=1;j<g;j++){var k=arguments[j];for(var l in k){if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];}}return f;},prototypedCopy:function(f){var g=function(){};g.prototype=f;return new g();},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'>');}:h,j=g('  ')=='  '?function(k){return i(k).replace(/ /g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);
+g.prototype['constructor']=g;g.prototype.base=function(){this.base=h.prototype.base;h.apply(this,arguments);this.base=arguments.callee;};}if(j)this.extend(g.prototype,j,true);if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){return f.apply(g||this,arguments);})-1;},removeFunction:function(f){e[f]=null;},callFunction:function(f){var g=e[f];return g&&g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){return function(f){return f+(!f||isNaN(Number(f))?'':'px');};})(),convertToPx:(function(){var f;return function(g){if(!f){f=d.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',a.document);a.document.getBody().append(f);}if(!/%$/.test(g)){f.setStyle('width',g);return f.$.clientWidth;}return g;};})(),repeat:function(f,g){return new Array(g+1).join(f);},tryThese:function(){var f;for(var g=0,h=arguments.length;g<h;g++){var i=arguments[g];try{f=i();break;}catch(j){}}return f;},genKey:function(){return Array.prototype.slice.call(arguments).join('-');}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1,style:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1,wbr:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1,mark:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={style:1,script:1},y={base:1,link:1,meta:1,title:1},z=f(y,x),A={head:1,body:1},B={html:1},C={address:1,blockquote:1,center:1,dir:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};
+return{$nonBodyContent:f(B,A,y),$block:C,$blockLimit:{body:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,td:1,th:1,caption:1,form:1},$inline:r,$body:f({script:1,style:1},C),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1,audio:1,video:1},$captionBlock:{caption:1,legend:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1,mark:1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:A,head:z,style:t,script:t,body:v,base:{},link:{},meta:{},title:t,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},wbr:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:r,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:r,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r,section:v,header:v,footer:v,nav:v,article:v,aside:v,figure:v,dialog:v,hgroup:v,mark:r,time:r,meter:r,menu:r,command:r,keygen:r,output:r,progress:u,audio:u,video:u,details:u,datagrid:u,datalist:u};})();var f=a.dtd;d.event=function(g){this.$=g;};d.event.prototype={getKey:function(){return this.$.keyCode||this.$.which;},getKeystroke:function(){var h=this;var g=h.getKey();if(h.$.ctrlKey||h.$.metaKey)g+=1114112;if(h.$.shiftKey)g+=2228224;if(h.$.altKey)g+=4456448;return g;},preventDefault:function(g){var h=this.$;if(h.preventDefault)h.preventDefault();else h.returnValue=false;if(g)this.stopPropagation();},stopPropagation:function(){var g=this.$;if(g.stopPropagation)g.stopPropagation();else g.cancelBubble=true;
+},getTarget:function(){var g=this.$.target||this.$.srcElement;return g?new d.node(g):null;}};a.CTRL=1114112;a.SHIFT=2228224;a.ALT=4456448;d.domObject=function(g){if(g)this.$=g;};d.domObject.prototype=(function(){var g=function(h,i){return function(j){if(typeof a!='undefined')h.fire(i,new d.event(j));};};return{getPrivate:function(){var h;if(!(h=this.getCustomData('_')))this.setCustomData('_',h={});return h;},on:function(h){var k=this;var i=k.getCustomData('_cke_nativeListeners');if(!i){i={};k.setCustomData('_cke_nativeListeners',i);}if(!i[h]){var j=i[h]=g(k,h);if(k.$.attachEvent)k.$.attachEvent('on'+h,j);else if(k.$.addEventListener)k.$.addEventListener(h,j,!!a.event.useCapture);}return a.event.prototype.on.apply(k,arguments);},removeListener:function(h){var k=this;a.event.prototype.removeListener.apply(k,arguments);if(!k.hasListeners(h)){var i=k.getCustomData('_cke_nativeListeners'),j=i&&i[h];if(j){if(k.$.detachEvent)k.$.detachEvent('on'+h,j);else if(k.$.removeEventListener)k.$.removeEventListener(h,j,false);delete i[h];}}},removeAllListeners:function(){var k=this;var h=k.getCustomData('_cke_nativeListeners');for(var i in h){var j=h[i];if(k.$.detachEvent)k.$.detachEvent('on'+i,j);else if(k.$.removeEventListener)k.$.removeEventListener(i,j,false);delete h[i];}}};})();(function(g){var h={};a.on('reset',function(){h={};});g.equals=function(i){return i&&i.$===this.$;};g.setCustomData=function(i,j){var k=this.getUniqueId(),l=h[k]||(h[k]={});l[i]=j;return this;};g.getCustomData=function(i){var j=this.$['data-cke-expando'],k=j&&h[j];return k&&k[i];};g.removeCustomData=function(i){var j=this.$['data-cke-expando'],k=j&&h[j],l=k&&k[i];if(typeof l!='undefined')delete k[i];return l||null;};g.clearCustomData=function(){this.removeAllListeners();var i=this.$['data-cke-expando'];i&&delete h[i];};g.getUniqueId=function(){return this.$['data-cke-expando']||(this.$['data-cke-expando']=e.getNextNumber());};a.event.implementOn(g);})(d.domObject.prototype);d.window=function(g){d.domObject.call(this,g);};d.window.prototype=new d.domObject();e.extend(d.window.prototype,{focus:function(){if(b.webkit&&this.$.parent)this.$.parent.focus();this.$.focus();},getViewPaneSize:function(){var g=this.$.document,h=g.compatMode=='CSS1Compat';return{width:(h?g.documentElement.clientWidth:g.body.clientWidth)||0,height:(h?g.documentElement.clientHeight:g.body.clientHeight)||0};},getScrollPosition:function(){var g=this.$;if('pageXOffset' in g)return{x:g.pageXOffset||0,y:g.pageYOffset||0};else{var h=g.document;
+return{x:h.documentElement.scrollLeft||h.body.scrollLeft||0,y:h.documentElement.scrollTop||h.body.scrollTop||0};}}});d.document=function(g){d.domObject.call(this,g);};var g=d.document;g.prototype=new d.domObject();e.extend(g.prototype,{appendStyleSheet:function(h){if(this.$.createStyleSheet)this.$.createStyleSheet(h);else{var i=new d.element('link');i.setAttributes({rel:'stylesheet',type:'text/css',href:h});this.getHead().append(i);}},appendStyleText:function(h){var k=this;if(k.$.createStyleSheet){var i=k.$.createStyleSheet('');i.cssText=h;}else{var j=new d.element('style',k);j.append(new d.text(h,k));k.getHead().append(j);}},createElement:function(h,i){var j=new d.element(h,this);if(i){if(i.attributes)j.setAttributes(i.attributes);if(i.styles)j.setStyles(i.styles);}return j;},createText:function(h){return new d.text(h,this);},focus:function(){this.getWindow().focus();},getById:function(h){var i=this.$.getElementById(h);return i?new d.element(i):null;},getByAddress:function(h,i){var j=this.$.documentElement;for(var k=0;j&&k<h.length;k++){var l=h[k];if(!i){j=j.childNodes[l];continue;}var m=-1;for(var n=0;n<j.childNodes.length;n++){var o=j.childNodes[n];if(i===true&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(m==l){j=o;break;}}}return j?new d.node(j):null;},getElementsByTag:function(h,i){if(!(c&&!(document.documentMode>8))&&i)h=i+':'+h;return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];if(!h)h=this.getDocumentElement().append(new d.element('head'),true);else h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h;})();},write:function(h){var i=this;i.$.open('text/html','replace');b.isCustomDomain()&&(i.$.domain=document.domain);i.$.write(h);i.$.close();}});d.node=function(h){if(h){switch(h.nodeType){case 9:return new g(h);case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);}return this;};d.node.prototype=new d.domObject();a.NODE_ELEMENT=1;a.NODE_DOCUMENT=9;a.NODE_TEXT=3;a.NODE_COMMENT=8;a.NODE_DOCUMENT_FRAGMENT=11;a.POSITION_IDENTICAL=0;a.POSITION_DISCONNECTED=1;a.POSITION_FOLLOWING=2;
+a.POSITION_PRECEDING=4;a.POSITION_IS_CONTAINED=8;a.POSITION_CONTAINS=16;e.extend(d.node.prototype,{appendTo:function(h,i){h.append(this,i);return h;},clone:function(h,i){var j=this.$.cloneNode(h),k=function(l){if(l.nodeType!=1)return;if(!i)l.removeAttribute('id',false);l.removeAttribute('data-cke-expando',false);if(h){var m=l.childNodes;for(var n=0;n<m.length;n++)k(m[n]);}};k(j);return new d.node(j);},hasPrevious:function(){return!!this.$.previousSibling;},hasNext:function(){return!!this.$.nextSibling;},insertAfter:function(h){h.$.parentNode.insertBefore(this.$,h.$.nextSibling);return h;},insertBefore:function(h){h.$.parentNode.insertBefore(this.$,h.$);return h;},insertBeforeMe:function(h){this.$.parentNode.insertBefore(h.$,this.$);return h;},getAddress:function(h){var i=[],j=this.getDocument().$.documentElement,k=this.$;while(k&&k!=j){var l=k.parentNode;if(l)i.unshift(this.getIndex.call({$:k},h));k=l;}return i;},getDocument:function(){return new g(this.$.ownerDocument||this.$.parentNode.ownerDocument);},getIndex:function(h){var i=this.$,j=0;while(i=i.previousSibling){if(h&&i.nodeType==3&&(!i.nodeValue.length||i.previousSibling&&i.previousSibling.nodeType==3))continue;j++;}return j;},getNextSourceNode:function(h,i,j){if(j&&!j.call){var k=j;j=function(n){return!n.equals(k);};}var l=!h&&this.getFirst&&this.getFirst(),m;if(!l){if(this.type==1&&j&&j(this,true)===false)return null;l=this.getNext();}while(!l&&(m=(m||this).getParent())){if(j&&j(m,true)===false)return null;l=m.getNext();}if(!l)return null;if(j&&j(l)===false)return null;if(i&&i!=l.type)return l.getNextSourceNode(false,i,j);return l;},getPreviousSourceNode:function(h,i,j){if(j&&!j.call){var k=j;j=function(n){return!n.equals(k);};}var l=!h&&this.getLast&&this.getLast(),m;if(!l){if(this.type==1&&j&&j(this,true)===false)return null;l=this.getPrevious();}while(!l&&(m=(m||this).getParent())){if(j&&j(m,true)===false)return null;l=m.getPrevious();}if(!l)return null;if(j&&j(l)===false)return null;if(i&&l.type!=i)return l.getPreviousSourceNode(false,i,j);return l;},getPrevious:function(h){var i=this.$,j;do{i=i.previousSibling;j=i&&new d.node(i);}while(j&&h&&!h(j));return j;},getNext:function(h){var i=this.$,j;do{i=i.nextSibling;j=i&&new d.node(i);}while(j&&h&&!h(j));return j;},getParent:function(){var h=this.$.parentNode;return h&&h.nodeType==1?new d.node(h):null;},getParents:function(h){var i=this,j=[];do j[h?'push':'unshift'](i);while(i=i.getParent());return j;},getCommonAncestor:function(h){var j=this;if(h.equals(j))return j;
+if(h.contains&&h.contains(j))return h;var i=j.contains?j:j.getParent();do{if(i.contains(h))return i;}while(i=i.getParent());return null;},getPosition:function(h){var i=this.$,j=h.$;if(i.compareDocumentPosition)return i.compareDocumentPosition(j);if(i==j)return 0;if(this.type==1&&h.type==1){if(i.contains){if(i.contains(j))return 16+4;if(j.contains(i))return 8+2;}if('sourceIndex' in i)return i.sourceIndex<0||j.sourceIndex<0?1:i.sourceIndex<j.sourceIndex?4:2;}var k=this.getAddress(),l=h.getAddress(),m=Math.min(k.length,l.length);for(var n=0;n<=m-1;n++){if(k[n]!=l[n]){if(n<m)return k[n]<l[n]?4:2;break;}}return k.length<l.length?16+4:8+2;},getAscendant:function(h,i){var j=this.$,k;if(!i)j=j.parentNode;while(j){if(j.nodeName&&(k=j.nodeName.toLowerCase(),typeof h=='string'?k==h:k in h))return new d.node(j);j=j.parentNode;}return null;},hasAscendant:function(h,i){var j=this.$;if(!i)j=j.parentNode;while(j){if(j.nodeName&&j.nodeName.toLowerCase()==h)return true;j=j.parentNode;}return false;},move:function(h,i){h.append(this.remove(),i);},remove:function(h){var i=this.$,j=i.parentNode;if(j){if(h)for(var k;k=i.firstChild;)j.insertBefore(i.removeChild(k),i);j.removeChild(i);}return this;},replace:function(h){this.insertBefore(h);h.remove();},trim:function(){this.ltrim();this.rtrim();},ltrim:function(){var k=this;var h;while(k.getFirst&&(h=k.getFirst())){if(h.type==3){var i=e.ltrim(h.getText()),j=h.getLength();if(!i){h.remove();continue;}else if(i.length<j){h.split(j-i.length);k.$.removeChild(k.$.firstChild);}}break;}},rtrim:function(){var k=this;var h;while(k.getLast&&(h=k.getLast())){if(h.type==3){var i=e.rtrim(h.getText()),j=h.getLength();if(!i){h.remove();continue;}else if(i.length<j){h.split(i.length);k.$.lastChild.parentNode.removeChild(k.$.lastChild);}}break;}if(!c&&!b.opera){h=k.$.lastChild;if(h&&h.type==1&&h.nodeName.toLowerCase()=='br')h.parentNode.removeChild(h);}},isReadOnly:function(){var h=this;while(h){if(h.type==1){if(h.is('body')||!!h.data('cke-editable'))break;if(h.getAttribute('contentEditable')=='false')return h;else if(h.getAttribute('contentEditable')=='true')break;}h=h.getParent();}return false;}});d.nodeList=function(h){this.$=h;};d.nodeList.prototype={count:function(){return this.$.length;},getItem:function(h){var i=this.$[h];return i?new d.node(i):null;}};d.element=function(h,i){if(typeof h=='string')h=(i?i.$:document).createElement(h);d.domObject.call(this,h);};var h=d.element;h.get=function(i){return i&&(i.$?i:new h(i));};h.prototype=new d.node();
+h.createFromHtml=function(i,j){var k=new h('div',j);k.setHtml(i);return k.getFirst().remove();};h.setMarker=function(i,j,k,l){var m=j.getCustomData('list_marker_id')||j.setCustomData('list_marker_id',e.getNextNumber()).getCustomData('list_marker_id'),n=j.getCustomData('list_marker_names')||j.setCustomData('list_marker_names',{}).getCustomData('list_marker_names');i[m]=j;n[k]=1;return j.setCustomData(k,l);};h.clearAllMarkers=function(i){for(var j in i)h.clearMarkers(i,i[j],1);};h.clearMarkers=function(i,j,k){var l=j.getCustomData('list_marker_names'),m=j.getCustomData('list_marker_id');for(var n in l)j.removeCustomData(n);j.removeCustomData('list_marker_names');if(k){j.removeCustomData('list_marker_id');delete i[m];}};e.extend(h.prototype,{type:1,addClass:function(i){var j=this.$.className;if(j){var k=new RegExp('(?:^|\\s)'+i+'(?:\\s|$)','');if(!k.test(j))j+=' '+i;}this.$.className=j||i;},removeClass:function(i){var j=this.getAttribute('class');if(j){var k=new RegExp('(?:^|\\s+)'+i+'(?=\\s|$)','i');if(k.test(j)){j=j.replace(k,'').replace(/^\s+/,'');if(j)this.setAttribute('class',j);else this.removeAttribute('class');}}},hasClass:function(i){var j=new RegExp('(?:^|\\s+)'+i+'(?=\\s|$)','');return j.test(this.getAttribute('class'));},append:function(i,j){var k=this;if(typeof i=='string')i=k.getDocument().createElement(i);if(j)k.$.insertBefore(i.$,k.$.firstChild);else k.$.appendChild(i.$);return i;},appendHtml:function(i){var k=this;if(!k.$.childNodes.length)k.setHtml(i);else{var j=new h('div',k.getDocument());j.setHtml(i);j.moveChildren(k);}},appendText:function(i){if(this.$.text!=undefined)this.$.text+=i;else this.append(new d.text(i));},appendBogus:function(){var k=this;var i=k.getLast();while(i&&i.type==3&&!e.rtrim(i.getText()))i=i.getPrevious();if(!i||!i.is||!i.is('br')){var j=b.opera?k.getDocument().createText(''):k.getDocument().createElement('br');b.gecko&&j.setAttribute('type','_moz');k.append(j);}},breakParent:function(i){var l=this;var j=new d.range(l.getDocument());j.setStartAfter(l);j.setEndAfter(i);var k=j.extractContents();j.insertNode(l.remove());k.insertAfterNode(l);},contains:c||b.webkit?function(i){var j=this.$;return i.type!=1?j.contains(i.getParent().$):j!=i.$&&j.contains(i.$);}:function(i){return!!(this.$.compareDocumentPosition(i.$)&16);},focus:(function(){function i(){try{this.$.focus();}catch(j){}};return function(j){if(j)e.setTimeout(i,100,this);else i.call(this);};})(),getHtml:function(){var i=this.$.innerHTML;return c?i.replace(/<\?[^>]*>/g,''):i;
+},getOuterHtml:function(){var j=this;if(j.$.outerHTML)return j.$.outerHTML.replace(/<\?[^>]*>/,'');var i=j.$.ownerDocument.createElement('div');i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var n=this;switch(j){case 'class':j='className';break;case 'http-equiv':j='httpEquiv';break;case 'name':return n.$.name;case 'tabindex':var k=i.call(n,j);if(k!==0&&n.$.tabIndex===0)k=null;return k;break;case 'checked':var l=n.$.attributes.getNamedItem(j),m=l.specified?l.nodeValue:n.$.checked;return m?'checked':null;case 'hspace':case 'value':return n.$[j];case 'style':return n.$.style.cssText;}return i.call(n,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c&&!(document.documentMode>8)){var j=this.$.scopeName;if(j!='HTML')i=j.toLowerCase()+':'+i;}return(this.getName=function(){return i;})();},getValue:function(){return this.$.value;},getFirst:function(i){var j=this.$.firstChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getNext(i);return k;},getLast:function(i){var j=this.$.lastChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getPrevious(i);return k;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j<arguments.length;j++){if(arguments[j]==i)return true;
+}return false;},isEditable:function(){if(this.isReadOnly())return false;var i=this.getName(),j=!f.$nonEditable[i]&&(f[i]||f.span);return j&&j['#'];},isIdentical:function(i){if(this.getName()!=i.getName())return false;var j=this.$.attributes,k=i.$.attributes,l=j.length,m=k.length;for(var n=0;n<l;n++){var o=j[n];if(o.nodeName=='_moz_dirty')continue;if((!c||o.specified&&o.nodeName!='data-cke-expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='data-cke-expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},isEmptyInlineRemoveable:function(){if(!f.$removeEmpty[this.getName()])return false;var i=this.getChildren();for(var j=0,k=i.count();j<k;j++){var l=i.getItem(j);if(l.type==1&&l.data('cke-bookmark'))continue;if(l.type==1&&!l.isEmptyInlineRemoveable()||l.type==3&&e.trim(l.getText()))return false;}return true;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case 'data-cke-expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes,j=i.length,k={'data-cke-expando':1,_moz_dirty:1};return j>0&&(j>2||!k[i[0].nodeName]||j==2&&!k[i[1].nodeName]);},hasAttribute:(function(){function i(j){var k=this.$.attributes.getNamedItem(j);return!!(k&&k.specified);};return c&&b.version<8?function(j){if(j=='name')return!!this.$.name;return i.call(this,j);}:i;})(),hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},mergeSiblings:(function(){function i(j,k,l){if(k&&k.type==1){var m=[];while(k.data('cke-bookmark')||k.isEmptyInlineRemoveable()){m.push(k);k=l?k.getNext():k.getPrevious();if(!k||k.type!=1)return;}if(j.isIdentical(k)){var n=l?j.getLast():j.getFirst();while(m.length)m.shift().move(j,!l);k.moveChildren(j,!l);k.remove();if(n&&n.type==1)n.mergeSiblings();}}};return function(j){var k=this;if(!(j===false||f.$removeEmpty[k.getName()]||k.is('a')))return;i(k,k.getNext(),true);
+i(k,k.getPrevious());};})(),show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else if(b.ie8Compat&&b.secure)return function(j,k){if(j=='src'&&k.match(/^http:\/\//))try{i.apply(this,arguments);}catch(l){}else i.apply(this,arguments);return this;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;
+if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;if(c&&b.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l<k.length;l++){var m=k[l],n=m.nodeName.toLowerCase(),o;if(n in j)continue;if(n=='checked'&&(o=p.getAttribute(n)))i.setAttribute(n,o);else if(m.specified||c&&m.nodeValue&&n=='value'){o=p.getAttribute(n);if(o===null)o=m.nodeValue;i.setAttribute(n,o);}}if(p.$.style.cssText!=='')i.$.style.cssText=p.$.style.cssText;},renameNode:function(i){var l=this;if(l.getName()==i)return;var j=l.getDocument(),k=new h(i,j);l.copyAttributes(k);l.moveChildren(k);l.getParent()&&l.$.parentNode.replaceChild(k.$,l.$);k.$['data-cke-expando']=l.$['data-cke-expando'];l.$=k.$;},getChild:function(i){var j=this.$;if(!i.slice)j=j.childNodes[i];else while(i.length>0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;
+},disableContextMenu:function(){this.on('contextmenu',function(i){if(!i.data.getTarget().hasClass('cke_enable_context_menu'))i.data.preventDefault();});},getDirection:function(i){var j=this;return i?j.getComputedStyle('direction')||j.getDirection()||j.getDocument().$.dir||j.getDocument().getBody().getDirection(1):j.getStyle('direction')||j.getAttribute('dir');},data:function(i,j){i='data-'+i;if(j===undefined)return this.getAttribute(i);else if(j===false)this.removeAttribute(i);else this.setAttribute(i,j);return null;}});(function(){var i={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']};function j(k){var l=0;for(var m=0,n=i[k].length;m<n;m++)l+=parseInt(this.getComputedStyle(i[k][m])||0,10)||0;return l;};h.prototype.setSize=function(k,l,m){if(typeof l=='number'){if(m&&!(c&&b.quirks))l-=j.call(this,k);this.setStyle(k,l+'px');}};h.prototype.getSize=function(k,l){var m=Math.max(this.$['offset'+e.capitalize(k)],this.$['client'+e.capitalize(k)])||0;if(l)m-=j.call(this,k);return m;};})();a.command=function(i,j){this.uiItems=[];this.exec=function(k){if(this.state==0)return false;if(this.editorFocus)i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},editorFocus:1,state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ui',contentsLanguage:'',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000};
+var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getChild(1).addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0){o&&a.document.getDocumentElement().removeStyle('cursor');t(z);}},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B<A.length;B++)A[B](y,z);},w=function(y){if(j[y]){u(y,true);return;}var z=k[y]||(k[y]=[]);z.push(u);if(z.length>1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};o&&a.document.getDocumentElement().setStyle('cursor','wait');for(var x=0;x<q;x++)w(l[x]);}};})();a.resourceManager=function(j,k){var l=this;
+l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';a.fire(j+e.capitalize(this.fileName)+'Ready',this.registered[j]=k||{});},get:function(j){return this.registered[j]||null;},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&typeof k.file=='string'?k.file:this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++){if(!o[v[w]])s.push(v[w]);}}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k),o=n.langEntries||(n.langEntries={}),p=n.lang||(n.lang=[]);if(e.indexOf(p,l)==-1)p.push(l);o[l]=m;};a.skins=(function(){var k={},l={},m=function(n,o,p,q){var r=k[o];if(!n.skin){n.skin=r;if(r.init)r.init(n);}var s=function(B){for(var C=0;C<B.length;C++)B[C]=a.getUrl(l[o]+B[C]);};function t(B,C){return B.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(D,E,F,G){if(/^\/|^\w?:/.test(F))return D;else return 'url('+C+E+F+G+')';});};p=r[p];var u=!p||!!p._isLoaded;if(u)q&&q();else{var v=p._pending||(p._pending=[]);v.push(q);if(v.length>1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var B=0;B<v.length;B++){if(v[B])v[B]();}}};if(!w){var z=p.css;if(e.isArray(z)){s(z);
+for(var A=0;A<z.length;A++)a.document.appendStyleSheet(z[A]);}else{z=t(z,a.getUrl(l[o]));a.document.appendStyleText(z);}p.css=z;w=1;}if(!x){s(p.js);a.scriptLoader.load(p.js,function(){x=1;y();});}y();}};return{add:function(n,o){k[n]=o;o.skinPath=l[n]||(l[n]=a.getUrl('skins/'+n+'/'));},load:function(n,o,p){var q=n.skinName,r=n.skinPath;if(k[q])m(n,q,o,p);else{l[q]=r;a.scriptLoader.load(a.getUrl(r+'skin.js'),function(){m(n,q,o,p);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);m&&(p=e.extend(p,q._.editor.skin[m.type],true));if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};a.event.implementOn(k);(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.readOnly=!!(x.config.readOnly||x.element.getAttribute('disabled'));x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';x.fire('langLoaded');var A=x.config;A.contentsLangDirection=='ui'&&(A.contentsLangDirection=x.lang.dir);s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');
+z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}b.air&&(z+=',adobeair');j.load(z.split(','),function(D){var E=[],F=[],G=[];x.plugins=D;for(var H in D){var I=D[H],J=I.lang,K=j.getPath(H),L=null;I.path=K;if(J){L=e.indexOf(J,x.langCode)>=0?x.langCode:J[0];if(!I.langEntries||!I.langEntries[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.langEntries[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N<M.length;N++)for(var O=0;O<E.length;O++){var P=E[O];if(N===0&&F[O]&&P.lang)e.extend(x.lang,P.langEntries[F[O]]);if(P[M[N]])P[M[N]](x);}x.fire('pluginsLoaded');u(x);});});},t=function(x){a.skins.load(x,'editor',function(){r(x);});},u=function(x){var y=x.config.theme;a.themes.load(y,function(){var z=x.theme=a.themes.get(y);z.path=a.themes.getPath(y);z.build(x);if(x.config.autoUpdateElement)v(x);});},v=function(x){var y=x.element;if(x.elementMode==1&&y.is('textarea')){var z=y.$.form&&new h(y.$.form);if(z){function A(){x.updateElement();};z.on('submit',A);if(!z.$.submit.nodeName&&!z.$.submit.length)z.$.submit=e.override(z.$.submit,function(B){return function(){x.updateElement();if(B.apply)B.apply(this,arguments);else B();};});x.on('destroy',function(){z.removeListener('submit',A);});}}};function w(){var x,y=this._.commands,z=this.mode;if(!z)return;for(var A in y){x=y[A];x[x.startDisabled?'disable':this.readOnly&&!x.readOnly?'disable':x.modes[z]?'enable':'disable']();}};a.editor.prototype._init=function(){var z=this;var x=h.get(z._.element),y=z._.instanceConfig;delete z._.element;delete z._.instanceConfig;z._.commands={};z._.styles=[];z.element=x;z.name=x&&z.elementMode==1&&(x.getId()||x.getNameAtt())||m();if(z.name in a.instances)throw '[CKEDITOR.editor] The instance "'+z.name+'" already exists.';z.id=e.getNextId();z.config=e.prototypedCopy(i);z.ui=new k(z);z.focusManager=new a.focusManager(z);a.fire('instanceCreated',null,z);z.on('mode',w,null,null,1);z.on('readOnly',w,null,null,1);p(z,y);};})();e.extend(a.editor.prototype,{addCommand:function(l,m){return this._.commands[l]=new a.command(this,m);},addCss:function(l){this._.styles.push(l);},destroy:function(l){var m=this;if(!l)m.updateElement();m.fire('destroy');m.theme&&m.theme.destroy(m);a.remove(m);a.fire('instanceDestroyed',null,m);},execCommand:function(l,m){var n=this.getCommand(l),o={name:l,commandData:m,command:n};if(n&&n.state!=0)if(this.fire('beforeCommandExec',o)!==true){o.returnValue=n.exec(o.commandData);
+if(!n.async&&this.fire('afterCommandExec',o)!==true)return o.returnValue;}return false;},getCommand:function(l){return this._.commands[l];},getData:function(){var n=this;n.fire('beforeGetData');var l=n._.data;if(typeof l!='string'){var m=n.element;if(m&&n.elementMode==1)l=m.is('textarea')?m.getValue():m.getHtml();else l='';}l={dataValue:l};n.fire('getData',l);return l.dataValue;},getSnapshot:function(){var l=this.fire('getSnapshot');if(typeof l!='string'){var m=this.element;if(m&&this.elementMode==1)l=m.is('textarea')?m.getValue():m.getHtml();}return l;},loadSnapshot:function(l){this.fire('loadSnapshot',l);},setData:function(l,m,n){if(m)this.on('dataReady',function(p){p.removeListener();m.call(p.editor);});var o={dataValue:l};!n&&this.fire('setData',o);this._.data=o.dataValue;!n&&this.fire('afterSetData',o);},setReadOnly:function(l){l=l==undefined||l;if(this.readOnly!=l){this.readOnly=l;this.fire('readOnly');}},insertHtml:function(l){this.fire('insertHtml',l);},insertText:function(l){this.fire('insertText',l);},insertElement:function(l){this.fire('insertElement',l);},checkDirty:function(){return this.mayBeDirty&&this._.previousValue!==this.getSnapshot();},resetDirty:function(){if(this.mayBeDirty)this._.previousValue=this.getSnapshot();},updateElement:function(){var n=this;var l=n.element;if(l&&n.elementMode==1){var m=n.getData();if(n.config.htmlEncodeOutput)m=e.htmlEncode(m);if(l.is('textarea'))l.setValue(m);else l.setHtml(m);}}});a.on('loaded',function(){var l=a.editor._pending;if(l){delete a.editor._pending;for(var m=0;m<l.length;m++)l[m]._init();}});a.htmlParser=function(){this._={htmlPartsRegex:new RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();if(/="/.test(p))continue;
+var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writeHtml(l,m);return;}}l.comment(n);}};(function(){var l=/[\t\r\n ]{2,}|[\t\r\n]/g;a.htmlParser.text=function(m){this.value=m;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(m,n){var o=this.value;if(n&&!(o=n.onText(o,this)))return;m.text(o);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),m=c&&b.version<8?{dd:1,dt:1}:{},n={ol:1,ul:1},o=e.extend({},{html:1},f.html,f.body,f.head,{style:1,script:1});a.htmlParser.fragment.fromHtml=function(p,q,r){var s=new a.htmlParser(),t=r||new a.htmlParser.fragment(),u=[],v=[],w=t,x=false;function y(B){var C;if(u.length>0)for(var D=0;D<u.length;D++){var E=u[D],F=E.name,G=f[F],H=w.name&&f[w.name];if((!H||H[F])&&(!B||!G||G[B]||!f[B])){if(!C){z();C=1;}E=E.clone();E.parent=w;w=E;u.splice(D,1);D--;}}};function z(){while(v.length)w.add(v.shift());};function A(B,C,D){if(B.previous!==undefined)return;C=C||w||t;var E=w;if(q&&(!C.type||C.name=='body')){var F,G;if(B.attributes&&(G=B.attributes['data-cke-real-element-type']))F=G;else F=B.name;if(F&&!(F in f.$body||F=='body'||B.isOrphan)){w=C;s.onTagOpen(q,{});B.returnPoint=C=w;}}if(B._.isBlockLike&&B.name!='pre'){var H=B.children.length,I=B.children[H-1],J;if(I&&I.type==3)if(!(J=e.rtrim(I.value)))B.children.length=H-1;else I.value=J;}C.add(B);if(B.returnPoint){w=B.returnPoint;delete B.returnPoint;}else w=D?C:E;};s.onTagOpen=function(B,C,D,E){var F=new a.htmlParser.element(B,C);if(F.isUnknown&&D)F.isEmpty=true;F.isOptionalClose=B in m||E;if(f.$removeEmpty[B]){u.push(F);return;}else if(B=='pre')x=true;else if(B=='br'&&x){w.add(new a.htmlParser.text('\n'));return;}if(B=='br'){v.push(F);return;}while(1){var G=w.name,H=G?f[G]||(w._.isBlockLike?f.div:f.span):o;
+if(!F.isUnknown&&!w.isUnknown&&!H[B]){if(w.isOptionalClose)s.onTagClose(G);else if(B in n&&G in n){var I=w.children,J=I[I.length-1];if(!(J&&J.name=='li'))A(J=new a.htmlParser.element('li'),w);!F.returnPoint&&(F.returnPoint=w);w=J;}else if(B in f.$listItem&&G!=B)s.onTagOpen(B=='li'?'ul':'dl',{},0,1);else if(G in l&&G!=B){!F.returnPoint&&(F.returnPoint=w);w=w.parent;}else{if(G in f.$inline)u.unshift(w);if(w.parent)A(w,w.parent,1);else{F.isOrphan=1;break;}}}else break;}y(B);z();F.parent=w;if(F.isEmpty)A(F);else w=F;};s.onTagClose=function(B){for(var C=u.length-1;C>=0;C--){if(B==u[C].name){u.splice(C,1);return;}}var D=[],E=[],F=w;while(F!=t&&F.name!=B){if(!F._.isBlockLike)E.unshift(F);D.push(F);F=F.returnPoint||F.parent;}if(F!=t){for(C=0;C<D.length;C++){var G=D[C];A(G,G.parent);}w=F;if(w.name=='pre')x=false;if(F._.isBlockLike)z();A(F,F.parent);if(F==w)w=w.parent;u=u.concat(E);}if(B=='body')q=false;};s.onText=function(B){if((!w._.hasInlineStarted||v.length)&&!x){B=e.ltrim(B);if(B.length===0)return;}z();y();if(q&&(!w.type||w.name=='body')&&e.trim(B))this.onTagOpen(q,{},0,1);if(!x)B=B.replace(/[\t\r\n ]{2,}|[\t\r\n]/g,' ');w.add(new a.htmlParser.text(B));};s.onCDATA=function(B){w.add(new a.htmlParser.cdata(B));};s.onComment=function(B){z();y();w.add(new a.htmlParser.comment(B));};s.parse(p);z(!c&&1);while(w!=t)A(w,w.parent,1);return t;};a.htmlParser.fragment.prototype={add:function(p,q){var s=this;isNaN(q)&&(q=s.children.length);var r=q>0?s.children[q-1]:null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.splice(q,0,p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){var r;this.filterChildren=function(){var s=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,s,q,true);var t=s.getHtml();this.children=new a.htmlParser.fragment.fromHtml(t).children;r=1;};!this.name&&q&&q.onFragment(this);this.writeChildrenHtml(p,r?null:q);},writeChildrenHtml:function(p,q){for(var r=0;r<this.children.length;r++)this.children[r].writeHtml(p,q);}};})();a.htmlParser.element=function(l,m){var s=this;s.name=l;s.attributes=m||(m={});s.children=[];var n=m['data-cke-real-element-type']||l||'',o=n.match(/^cke:(.*)/);o&&(n=o[1]);var p=f,q=!!(p.$nonBodyContent[n]||p.$block[n]||p.$listItem[n]||p.$tableContent[n]||p.$nonEditable[n]||n=='br'),r=!!p.$empty[l];s.isEmpty=r;s.isUnknown=!p[l];s._={isBlockLike:q,hasInlineStarted:r||!q};};
+a.htmlParser.cssStyle=function(){var l,m=arguments[0],n={};l=m instanceof a.htmlParser.element?m.attributes.style:m;(l||'').replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(o,p,q){p=='font-family'&&(q=q.replace(/["']/g,''));n[p.toLowerCase()]=q;});return{rules:n,populate:function(o){var p=this.toString();if(p)o instanceof h?o.setAttribute('style',p):o instanceof a.htmlParser.element?o.attributes.style=p:o.style=p;},'toString':function(){var o=[];for(var p in n)n[p]&&o.push(p,':',n[p],';');return o.join('');}};};(function(){var l=function(m,n){m=m[0];n=n[0];return m<n?-1:m>n?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterChildren=function(){if(!u){var B=new a.htmlParser.basicWriter();a.htmlParser.fragment.prototype.writeChildrenHtml.call(p,B,n);p.children=new a.htmlParser.fragment.fromHtml(B.getHtml(),0,p.clone()).children;u=1;}};if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writeHtml(m,n);return;}q=p.name;if(!q){for(var v=0,w=this.children.length;v<w;v++)this.children[v].parent=p.parent;this.writeChildrenHtml.call(p,m,u?null:n);return;}}o=p.attributes;}m.openTag(q,o);var x=[];for(var y=0;y<2;y++)for(r in o){s=r;t=o[r];if(y==1)x.push([r,t]);else if(n){for(;;){if(!(s=n.onAttributeName(r))){delete o[r];break;}else if(s!=r){delete o[r];r=s;continue;}else break;}if(s)if((t=n.onAttribute(p,s,t))===false)delete o[s];else o[s]=t;}}if(m.sortAttributes)x.sort(l);var z=x.length;for(y=0;y<z;y++){var A=x[y];m.attribute(A[0],A[1]);}m.openTagClose(q,p.isEmpty);if(!p.isEmpty){this.writeChildrenHtml.call(p,m,u?null:n);m.closeTag(q);}},writeChildrenHtml:function(m,n){a.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,arguments);}};})();(function(){a.htmlParser.filter=e.createClass({$:function(q){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};if(q)this.addRules(q,10);},proto:{addRules:function(q,r){var s=this;if(typeof r!='number')r=10;m(s._.elementNames,q.elementNames,r);m(s._.attributeNames,q.attributeNames,r);n(s._.elements,q.elements,r);n(s._.attributes,q.attributes,r);s._.text=o(s._.text,q.text,r)||s._.text;s._.comment=o(s._.comment,q.comment,r)||s._.comment;s._.root=o(s._.root,q.root,r)||s._.root;},onElementName:function(q){return l(q,this._.elementNames);
+},onAttributeName:function(q){return l(q,this._.attributeNames);},onText:function(q){var r=this._.text;return r?r.filter(q):q;},onComment:function(q,r){var s=this._.comment;return s?s.filter(q,r):q;},onFragment:function(q){var r=this._.root;return r?r.filter(q):q;},onElement:function(q){var v=this;var r=[v._.elements['^'],v._.elements[q.name],v._.elements.$],s,t;for(var u=0;u<3;u++){s=r[u];if(s){t=s.filter(q,v);if(t===false)return null;if(t&&t!=q)return v.onNode(t);if(q.parent&&!q.name)break;}}return q;},onNode:function(q){var r=q.type;return r==1?this.onElement(q):r==3?new a.htmlParser.text(this.onText(q.value)):r==8?new a.htmlParser.comment(this.onComment(q.value)):null;},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){if(typeof r=='function')r=[r];var t,u,v=q.length,w=r&&r.length;if(w){for(t=0;t<v&&q[t].pri<s;t++){}for(u=w-1;u>=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=q.type||q instanceof a.htmlParser.fragment;for(var s=0;s<this.length;s++){if(r)var t=q.type,u=q.name;var v=this[s],w=v.apply(window,arguments);if(w===false)return w;if(r){if(w&&(w.name!=u||w.type!=t))return w;}else if(typeof w!='string')return w;w!=undefined&&(q=w);}return q;};})();a.htmlParser.basicWriter=e.createClass({$:function(){this._={output:[]};},proto:{openTag:function(l,m){this._.output.push('<',l);},openTagClose:function(l,m){if(m)this._.output.push(' />');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('</',l,'>');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('<!--',l,'-->');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');
+}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.on('instanceDestroyed',function(){if(e.isEmpty(this.instances))a.fire('reset');});a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '<!--'+this.$.nodeValue+'-->';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1,caption:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q<r;q++){var s=p.getItem(q);if(s.type==1&&f.$block[s.getName()])return true;}return false;};d.elementPath=function(o){var u=this;var p=null,q=null,r=[],s=o;while(s){if(s.type==1){if(!u.lastElement)u.lastElement=s;var t=s.getName();if(c&&s.$.scopeName!='HTML')t=s.$.scopeName.toLowerCase()+':'+t;if(!q){if(!p&&l[t])p=s;if(m[t])if(!p&&t=='div'&&!n(s))p=s;else q=s;}r.push(s);if(t=='body')break;}s=s.getParent();}u.block=p;u.blockLimit=q;u.elements=r;};})();d.elementPath.prototype={compare:function(l){var m=this.elements,n=l&&l.elements;if(!n||m.length!=n.length)return false;for(var o=0;o<m.length;o++){if(!m[o].equals(n[o]))return false;}return true;},contains:function(l){var m=this.elements;for(var n=0;n<m.length;n++){if(m[n].getName() in l)return m[n];}return null;}};d.text=function(l,m){if(typeof l=='string')l=(m?m.$:document).createTextNode(l);this.$=l;};d.text.prototype=new d.node();e.extend(d.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},setText:function(l){this.$.nodeValue=l;},split:function(l){var q=this;if(c&&l==q.getLength()){var m=q.getDocument().createText('');m.insertAfter(q);return m;}var n=q.getDocument(),o=new d.text(q.$.splitText(l),n);if(b.ie8){var p=new d.text('',n);p.insertAfter(o);p.remove();}return o;},substring:function(l,m){if(typeof m!='number')return this.$.nodeValue.substr(l);else return this.$.nodeValue.substring(l,m);}});d.documentFragment=function(l){l=l||a.document;this.$=l.$.createDocumentFragment();};e.extend(d.documentFragment.prototype,h.prototype,{type:11,insertAfterNode:function(l){l=l.$;l.parentNode.insertBefore(this.$,l.nextSibling);}},true,{append:1,appendBogus:1,getFirst:1,getLast:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});
+(function(){function l(s,t){if(this._.end)return null;var u,v=this.range,w,x=this.guard,y=this.type,z=s?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;v.trim();if(v.collapsed){this.end();return null;}}if(!s&&!this._.guardLTR){var A=v.endContainer,B=A.getChild(v.endOffset);this._.guardLTR=function(F,G){return(!G||!A.equals(F))&&(!B||!F.equals(B))&&(F.type!=1||!G||F.getName()!='body');};}if(s&&!this._.guardRTL){var C=v.startContainer,D=v.startOffset>0&&C.getChild(v.startOffset-1);this._.guardRTL=function(F,G){return(!G||!C.equals(F))&&(!D||!F.equals(D))&&(F.type!=1||!G||F.getName()!='body');};}var E=s?this._.guardRTL:this._.guardLTR;if(x)w=function(F,G){if(E(F,G)===false)return false;return x(F,G);};else w=E;if(this.current)u=this.current[z](false,y,w);else if(s){u=v.endContainer;if(v.endOffset>0){u=u.getChild(v.endOffset-1);if(w(u)===false)u=null;}else u=w(u,true)===false?null:u.getPreviousSourceNode(true,y,w);}else{u=v.startContainer;u=u.getChild(v.startOffset);if(u){if(w(u)===false)u=null;}else u=w(v.startContainer,true)===false?null:v.startContainer.getNextSourceNode(true,y,w);}while(u&&!this._.end){this.current=u;if(!this.evaluator||this.evaluator(u)!==false){if(!t)return u;}else if(t&&this.evaluator)return false;u=u[z](false,y,w);}this.end();return this.current=null;};function m(s){var t,u=null;while(t=l.call(this,s))u=t;return u;};d.walker=e.createClass({$:function(s){this.range=s;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,1);},checkForward:function(){return l.call(this,0,1)!==false;},checkBackward:function(){return l.call(this,1,1)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,1);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1};h.prototype.isBlockBoundary=function(s){var t=s?e.extend({},f.$block,s||{}):f.$block;return this.getComputedStyle('float')=='none'&&n[this.getComputedStyle('display')]||t[this.getName()];};d.walker.blockBoundary=function(s){return function(t,u){return!(t.type==1&&t.isBlockBoundary(s));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmark=function(s,t){function u(v){return v&&v.getName&&v.getName()=='span'&&v.data('cke-bookmark');};return function(v){var w,x;
+w=v&&!v.getName&&(x=v.getParent())&&u(x);w=s?w:w||u(v);return!!(t^w);};};d.walker.whitespaces=function(s){return function(t){var u=t&&t.type==3&&!e.trim(t.getText());return!!(s^u);};};d.walker.invisible=function(s){var t=d.walker.whitespaces();return function(u){var v=t(u)||u.is&&!u.$.offsetHeight;return!!(s^v);};};d.walker.nodeType=function(s,t){return function(u){return!!(t^u.type==s);};};var o=/^[\t\r\n ]*(?: |\xa0)$/,p=d.walker.whitespaces(),q=d.walker.bookmark(),r=function(s){return q(s)||p(s)||s.type==1&&s.getName() in f.$inline&&!(s.getName() in f.$empty);};h.prototype.getBogus=function(){var s=this;do s=s.getPreviousSourceNode();while(r(s));if(s&&(!c?s.is&&s.is('br'):s.getText&&o.test(s.getText())))return s;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v,w){t.optimizeBookmark();var x=t.startContainer,y=t.endContainer,z=t.startOffset,A=t.endOffset,B,C;if(y.type==3)y=y.split(A);else if(y.getChildCount()>0)if(A>=y.getChildCount()){y=y.append(t.document.createText(''));C=true;}else y=y.getChild(A);if(x.type==3){x.split(z);if(x.equals(y))y=x.getNext();}else if(!z){x=x.getFirst().insertBeforeMe(t.document.createText(''));B=true;}else if(z>=x.getChildCount()){x=x.append(t.document.createText(''));B=true;}else x=x.getChild(z).getPrevious();var D=x.getParents(),E=y.getParents(),F,G,H;for(F=0;F<D.length;F++){G=D[F];H=E[F];if(!G.equals(H))break;}var I=v,J,K,L,M;for(var N=F;N<D.length;N++){J=D[N];if(I&&!J.equals(x))K=I.append(J.clone());L=J.getNext();while(L){if(L.equals(E[N])||L.equals(y))break;M=L.getNext();if(u==2)I.append(L.clone(true));else{L.remove();if(u==1)I.append(L);}L=M;}if(I)I=K;}I=v;for(var O=F;O<E.length;O++){J=E[O];if(u>0&&!J.equals(y))K=I.append(J.clone());if(!D[O]||J.$.parentNode!=D[O].$.parentNode){L=J.getPrevious();while(L){if(L.equals(D[O])||L.equals(x))break;M=L.getPrevious();if(u==2)I.$.insertBefore(L.$.cloneNode(true),I.$.firstChild);else{L.remove();if(u==1)I.$.insertBefore(L.$,I.$.firstChild);}L=M;}}if(I)I=K;}if(u==2){var P=t.startContainer;if(P.type==3){P.$.data+=P.$.nextSibling.data;P.$.parentNode.removeChild(P.$.nextSibling);}var Q=t.endContainer;if(Q.type==3&&Q.$.nextSibling){Q.$.data+=Q.$.nextSibling.data;Q.$.parentNode.removeChild(Q.$.nextSibling);}}else{if(G&&H&&(x.$.parentNode!=G.$.parentNode||y.$.parentNode!=H.$.parentNode)){var R=H.getIndex();
+if(B&&H.$.parentNode==x.$.parentNode)R--;if(w&&G.type==1){var S=h.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',t.document);S.insertAfter(G);G.mergeSiblings(false);t.moveToBookmark({startNode:S});}else t.setStart(H.getParent(),R);}t.collapse(true);}if(B)x.remove();if(C&&y.$.parentNode)y.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(t){var u=false,v=d.walker.bookmark(true);return function(w){if(v(w))return true;if(w.type==3){if(w.hasAscendant('pre')||e.trim(w.getText()).length)return false;}else if(w.type==1)if(!n[w.getName()])if(!t&&!c&&w.getName()=='br'&&!u)u=true;else return false;return true;};};function p(t){return t.type!=3&&t.getName() in f.$removeEmpty||!e.trim(t.getText())||!!t.getParent().data('cke-bookmark');};var q=new d.walker.whitespaces(),r=new d.walker.bookmark();function s(t){return!q(t)&&!r(t);};d.range.prototype={clone:function(){var u=this;var t=new d.range(u.document);t.startContainer=u.startContainer;t.startOffset=u.startOffset;t.endContainer=u.endContainer;t.endOffset=u.endOffset;t.collapsed=u.collapsed;return t;},collapse:function(t){var u=this;if(t){u.endContainer=u.startContainer;u.endOffset=u.startOffset;}else{u.startContainer=u.endContainer;u.startOffset=u.endOffset;}u.collapsed=true;},cloneContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,t);return t;},deleteContents:function(t){if(this.collapsed)return;m(this,0,null,t);},extractContents:function(t){var u=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,u,t);return u;},createBookmark:function(t){var z=this;var u,v,w,x,y=z.collapsed;u=z.document.createElement('span');u.data('cke-bookmark',1);u.setStyle('display','none');u.setHtml(' ');if(t){w='cke_bm_'+e.getNextNumber();u.setAttribute('id',w+'S');}if(!y){v=u.clone();v.setHtml(' ');if(t)v.setAttribute('id',w+'E');x=z.clone();x.collapse();x.insertNode(v);}x=z.clone();x.collapse(true);x.insertNode(u);if(v){z.setStartAfter(u);z.setEndBefore(v);}else z.moveToPosition(u,4);return{startNode:t?w+'S':u,endNode:t?w+'E':v,serializable:t,collapsed:y};},createBookmark2:function(t){var B=this;var u=B.startContainer,v=B.endContainer,w=B.startOffset,x=B.endOffset,y=B.collapsed,z,A;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){z=u.getChild(w);if(z&&z.type==3&&w>0&&z.getPrevious().type==3){u=z;w=0;
+}if(z&&z.type==1)w=z.getIndex(1);}while(u.type==3&&(A=u.getPrevious())&&A.type==3){u=A;w+=A.getLength();}if(!y){if(v.type==1){z=v.getChild(x);if(z&&z.type==3&&x>0&&z.getPrevious().type==3){v=z;x=0;}if(z&&z.type==1)x=z.getIndex(1);}while(v.type==3&&(A=v.getPrevious())&&A.type==3){v=A;x+=A.getLength();}}}return{start:u.getAddress(t),end:y?null:v.getAddress(t),startOffset:w,endOffset:x,normalized:t,collapsed:y,is2:true};},moveToBookmark:function(t){var B=this;if(t.is2){var u=B.document.getByAddress(t.start,t.normalized),v=t.startOffset,w=t.end&&B.document.getByAddress(t.end,t.normalized),x=t.endOffset;B.setStart(u,v);if(w)B.setEnd(w,x);else B.collapse(true);}else{var y=t.serializable,z=y?B.document.getById(t.startNode):t.startNode,A=y?B.document.getById(t.endNode):t.endNode;B.setStartBefore(z);z.remove();if(A){B.setEndBefore(A);A.remove();}else B.collapse(true);}},getBoundaryNodes:function(){var y=this;var t=y.startContainer,u=y.endContainer,v=y.startOffset,w=y.endOffset,x;if(t.type==1){x=t.getChildCount();if(x>v)t=t.getChild(v);else if(x<1)t=t.getPreviousSourceNode();else{t=t.$;while(t.lastChild)t=t.lastChild;t=new d.node(t);t=t.getNextSourceNode()||t;}}if(u.type==1){x=u.getChildCount();if(x>w)u=u.getChild(w).getPreviousSourceNode(true);else if(x<1)u=u.getPreviousSourceNode();else{u=u.$;while(u.lastChild)u=u.lastChild;u=new d.node(u);}}if(t.getPosition(u)&2)t=u;return{startNode:t,endNode:u};},getCommonAncestor:function(t,u){var y=this;var v=y.startContainer,w=y.endContainer,x;if(v.equals(w)){if(t&&v.type==1&&y.startOffset==y.endOffset-1)x=v.getChild(y.startOffset);else x=v;}else x=v.getCommonAncestor(w);return u&&!x.is?x.getParent():x;},optimize:function(){var v=this;var t=v.startContainer,u=v.startOffset;if(t.type!=1)if(!u)v.setStartBefore(t);else if(u>=t.getLength())v.setStartAfter(t);t=v.endContainer;u=v.endOffset;if(t.type!=1)if(!u)v.setEndBefore(t);else if(u>=t.getLength())v.setEndAfter(t);},optimizeBookmark:function(){var v=this;var t=v.startContainer,u=v.endContainer;if(t.is&&t.is('span')&&t.data('cke-bookmark'))v.setStartAt(t,3);if(u&&u.is&&u.is('span')&&u.data('cke-bookmark'))v.setEndAt(u,4);},trim:function(t,u){var B=this;var v=B.startContainer,w=B.startOffset,x=B.collapsed;if((!t||x)&&v&&v.type==3){if(!w){w=v.getIndex();v=v.getParent();}else if(w>=v.getLength()){w=v.getIndex()+1;v=v.getParent();}else{var y=v.split(w);w=v.getIndex()+1;v=v.getParent();if(B.startContainer.equals(B.endContainer))B.setEnd(y,B.endOffset-B.startOffset);else if(v.equals(B.endContainer))B.endOffset+=1;
+}B.setStart(v,w);if(x){B.collapse(true);return;}}var z=B.endContainer,A=B.endOffset;if(!(u||x)&&z&&z.type==3){if(!A){A=z.getIndex();z=z.getParent();}else if(A>=z.getLength()){A=z.getIndex()+1;z=z.getParent();}else{z.split(A);A=z.getIndex()+1;z=z.getParent();}B.setEnd(z,A);}},enlarge:function(t,u){switch(t){case 1:if(this.collapsed)return;var v=this.getCommonAncestor(),w=this.document.getBody(),x,y,z,A,B,C=false,D,E,F=this.startContainer,G=this.startOffset;if(F.type==3){if(G){F=!e.trim(F.substring(0,G)).length&&F;C=!!F;}if(F)if(!(A=F.getPrevious()))z=F.getParent();}else{if(G)A=F.getChild(G-1)||F.getLast();if(!A)z=F;}while(z||A){if(z&&!A){if(!B&&z.equals(v))B=true;if(!w.contains(z))break;if(!C||z.getComputedStyle('display')!='inline'){C=false;if(B)x=z;else this.setStartBefore(z);}A=z.getPrevious();}while(A){D=false;if(A.type==3){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;D=/[\s\ufeff]$/.test(E);}else if((A.$.offsetWidth>0||u&&A.is('br'))&&!A.data('cke-bookmark'))if(C&&f.$removeEmpty[A.getName()]){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;else{var H=A.$.all||A.$.getElementsByTagName('*');for(var I=0,J;J=H[I++];){if(!f.$removeEmpty[J.nodeName.toLowerCase()]){A=null;break;}}}if(A)D=!!E.length;}else A=null;if(D)if(C){if(B)x=z;else if(z)this.setStartBefore(z);}else C=true;if(A){var K=A.getPrevious();if(!z&&!K){z=A;A=null;break;}A=K;}else z=null;}if(z)z=z.getParent();}F=this.endContainer;G=this.endOffset;z=A=null;B=C=false;if(F.type==3){F=!e.trim(F.substring(G)).length&&F;C=!(F&&F.getLength());if(F)if(!(A=F.getNext()))z=F.getParent();}else{A=F.getChild(G);if(!A)z=F;}while(z||A){if(z&&!A){if(!B&&z.equals(v))B=true;if(!w.contains(z))break;if(!C||z.getComputedStyle('display')!='inline'){C=false;if(B)y=z;else if(z)this.setEndAfter(z);}A=z.getNext();}while(A){D=false;if(A.type==3){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;D=/^[\s\ufeff]/.test(E);}else if((A.$.offsetWidth>0||u&&A.is('br'))&&!A.data('cke-bookmark'))if(C&&f.$removeEmpty[A.getName()]){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;else{H=A.$.all||A.$.getElementsByTagName('*');for(I=0;J=H[I++];){if(!f.$removeEmpty[J.nodeName.toLowerCase()]){A=null;break;}}}if(A)D=!!E.length;}else A=null;if(D)if(C)if(B)y=z;else this.setEndAfter(z);if(A){K=A.getNext();if(!z&&!K){z=A;A=null;break;}A=K;}else z=null;}if(z)z=z.getParent();}if(x&&y){v=x.contains(y)?y:x;this.setStartBefore(v);this.setEndAfter(v);}break;case 2:case 3:var L=new d.range(this.document);w=this.document.getBody();L.setStartAt(w,1);L.setEnd(this.startContainer,this.startOffset);
+var M=new d.walker(L),N,O,P=d.walker.blockBoundary(t==3?{br:1}:null),Q=function(S){var T=P(S);if(!T)N=S;return T;},R=function(S){var T=Q(S);if(!T&&S.is&&S.is('br'))O=S;return T;};M.guard=Q;z=M.lastBackward();N=N||w;this.setStartAt(N,!N.is('br')&&(!z&&this.checkStartOfBlock()||z&&N.contains(z))?1:4);L=this.clone();L.collapse();L.setEndAt(w,2);M=new d.walker(L);M.guard=t==3?R:Q;N=null;z=M.lastForward();N=N||w;this.setEndAt(N,!z&&this.checkEndOfBlock()||z&&N.contains(z)?2:3);if(O)this.setEndAfter(O);}},shrink:function(t,u){if(!this.collapsed){t=t||2;var v=this.clone(),w=this.startContainer,x=this.endContainer,y=this.startOffset,z=this.endOffset,A=this.collapsed,B=1,C=1;if(w&&w.type==3)if(!y)v.setStartBefore(w);else if(y>=w.getLength())v.setStartAfter(w);else{v.setStartBefore(w);B=0;}if(x&&x.type==3)if(!z)v.setEndBefore(x);else if(z>=x.getLength())v.setEndAfter(x);else{v.setEndAfter(x);C=0;}var D=new d.walker(v),E=d.walker.bookmark();D.evaluator=function(I){return I.type==(t==1?1:3);};var F;D.guard=function(I,J){if(E(I))return true;if(t==1&&I.type==3)return false;if(J&&I.equals(F))return false;if(!J&&I.type==1)F=I;return true;};if(B){var G=D[t==1?'lastForward':'next']();G&&this.setStartAt(G,u?1:3);}if(C){D.reset();var H=D[t==1?'lastBackward':'previous']();H&&this.setEndAt(H,u?2:4);}return!!(B||C);}},insertNode:function(t){var x=this;x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])u=t.getIndex(),t=t.getParent();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])u=t.getIndex()+1,t=t.getParent();v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());
+else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=u==1,w=this.clone();w.collapse(v);w[v?'setStartAt':'setEndAt'](t,v?1:2);var x=new d.walker(w);x.evaluator=p;return x[v?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var z=this;var t=z.startContainer,u=z.startOffset;if(u&&t.type==3){var v=e.ltrim(t.substring(0,u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.startContainer),x=z.clone();x.collapse(true);x.setStartAt(w.block||w.blockLimit,1);var y=new d.walker(x);y.evaluator=o(true);return y.checkBackward();},checkEndOfBlock:function(){var z=this;var t=z.endContainer,u=z.endOffset;if(t.type==3){var v=e.rtrim(t.substring(u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.endContainer),x=z.clone();x.collapse(false);x.setEndAt(w.block||w.blockLimit,2);var y=new d.walker(x);y.evaluator=o(false);return y.checkForward();},checkReadOnly:(function(){function t(u,v){while(u){if(u.type==1)if(u.getAttribute('contentEditable')=='false'&&!u.data('cke-editable'))return 0;else if(u.is('html')||u.getAttribute('contentEditable')=='true'&&(u.contains(v)||u.equals(v)))break;
+u=u.getParent();}return 1;};return function(){var u=this.startContainer,v=this.endContainer;return!(t(u,v)&&t(v,u));};})(),moveToElementEditablePosition:function(t,u){var v;if(f.$empty[t.getName()])return false;while(t&&t.type==1){v=t.isEditable();if(v)this.moveToPosition(t,u?2:1);else if(f.$inline[t.getName()]){this.moveToPosition(t,u?4:3);return true;}if(f.$empty[t.getName()])t=t[u?'getPrevious':'getNext'](s);else t=t[u?'getLast':'getFirst'](s);if(t&&t.type==3){this.moveToPosition(t,u?4:3);return true;}}return v;},moveToElementEditStart:function(t){return this.moveToElementEditablePosition(t);},moveToElementEditEnd:function(t){return this.moveToElementEditablePosition(t,true);},getEnclosedNode:function(){var t=this.clone();t.optimize();if(t.startContainer.type!=1||t.endContainer.type!=1)return null;var u=new d.walker(t),v=d.walker.bookmark(true),w=d.walker.whitespaces(true),x=function(z){return w(z)&&v(z);};t.evaluator=x;var y=u.next();u.reset();return y&&y.equals(u.previous())?y:null;},getTouchedStartNode:function(){var t=this.startContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.startOffset)||t;},getTouchedEndNode:function(){var t=this.endContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.endOffset-1)||t;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;a.SHRINK_ELEMENT=1;a.SHRINK_TEXT=2;(function(){d.rangeList=function(n){if(n instanceof d.rangeList)return n;if(!n)n=[];else if(n instanceof d.range)n=[n];return e.extend(n,l);};var l={createIterator:function(){var n=this,o=d.walker.bookmark(),p=function(s){return!(s.is&&s.is('tr'));},q=[],r;return{getNextRange:function(s){r=r==undefined?0:r+1;var t=n[r];if(t&&n.length>1){if(!r)for(var u=n.length-1;u>=0;u--)q.unshift(n[u].createBookmark(true));if(s){var v=0;while(n[r+v+1]){var w=t.document,x=0,y=w.getById(q[v].endNode),z=w.getById(q[v+1].startNode),A;while(1){A=y.getNextSourceNode(false);if(!z.equals(A)){if(o(A)||A.type==1&&A.isBlockBoundary()){y=A;continue;}}else x=1;break;}if(!x)break;v++;}}t.moveToBookmark(q.shift());while(v--){A=n[++r];A.moveToBookmark(q.shift());t.setEnd(A.endContainer,A.endOffset);}}return t;}};},createBookmarks:function(n){var s=this;var o=[],p;for(var q=0;q<s.length;q++){o.push(p=s[q].createBookmark(n,true));for(var r=q+1;r<s.length;r++){s[r]=m(p,s[r]);s[r]=m(p,s[r],true);}}return o;
+},createBookmarks2:function(n){var o=[];for(var p=0;p<this.length;p++)o.push(this[p].createBookmark2(n));return o;},moveToBookmarks:function(n){for(var o=0;o<this.length;o++)this[o].moveToBookmark(n[o]);}};function m(n,o,p){var q=n.serializable,r=o[p?'endContainer':'startContainer'],s=p?'endOffset':'startOffset',t=q?o.document.getById(n.startNode):n.startNode,u=q?o.document.getById(n.endNode):n.endNode;if(r.equals(t.getPrevious())){o.startOffset=o.startOffset-r.getLength()-u.getPrevious().getLength();r=u.getNext();}else if(r.equals(u.getPrevious())){o.startOffset=o.startOffset-r.getLength();r=u.getNext();}r.equals(t.getParent())&&o[s]++;r.equals(u.getParent())&&o[s]++;o[p?'endContainer':'startContainer']=r;return o;};})();(function(){if(b.webkit){b.hc=false;return;}var l=h.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',a.document);l.appendTo(a.document.getHead());try{b.hc=l.getComputedStyle('border-top-color')==l.getComputedStyle('border-right-color');}catch(m){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';l.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m<l.length;m++)a.add(l[m]);}});if(c)try{document.execCommand('BackgroundImageCache',false,true);}catch(l){}a.skins.add('kama',(function(){var m='cke_ui_color';return{editor:{css:['editor.css']},dialog:{css:['dialog.css']},richcombo:{canGroup:false},templates:{css:['templates.css']},margins:[0,0,0,0],init:function(n){if(n.config.width&&!isNaN(n.config.width))n.config.width-=12;var o=[],p=/\$color/g,q='/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}';
+if(b.webkit){q=q.split('}').slice(0,-1);for(var r=0;r<q.length;r++)q[r]=q[r].split('{');}function s(v){var w=v.getById(m);if(!w){w=v.getHead().append('style');w.setAttribute('id',m);w.setAttribute('type','text/css');}return w;};function t(v,w,x){var y,z,A;for(var B=0;B<v.length;B++){if(b.webkit)for(z=0;z<w.length;z++){A=w[z][1];for(y=0;y<x.length;y++)A=A.replace(x[y][0],x[y][1]);v[B].$.sheet.addRule(w[z][0],A);}else{A=w;for(y=0;y<x.length;y++)A=A.replace(x[y][0],x[y][1]);if(c)v[B].$.styleSheet.cssText+=A;else v[B].$.innerHTML+=A;}}};var u=/\$color/g;e.extend(n,{uiColor:null,getUiColor:function(){return this.uiColor;},setUiColor:function(v){var w,x=s(a.document),y='.'+n.id,z=[y+' .cke_wrapper',y+'_dialog .cke_dialog_contents',y+'_dialog a.cke_dialog_tab',y+'_dialog .cke_dialog_footer'].join(','),A='background-color: $color !important;';if(b.webkit)w=[[z,A]];else w=z+'{'+A+'}';return(this.setUiColor=function(B){var C=[[u,B]];n.uiColor=B;t([x],w,C);t(o,q,C);})(v);}});n.on('menuShow',function(v){var w=v.data[0],x=w.element.getElementsByTag('iframe').getItem(0).getFrameDocument();if(!x.getById('cke_ui_color')){var y=s(x);o.push(y);var z=n.getUiColor();if(z)t([y],q,[[u,z]]);}});if(n.config.uiColor)n.setUiColor(n.config.uiColor);}};})());(function(){a.dialog?m():a.on('dialogPluginReady',m);function m(){a.dialog.on('resize',function(n){var o=n.data,p=o.width,q=o.height,r=o.dialog,s=r.parts.contents;if(o.skin!='kama')return;s.setStyles({width:p+'px',height:q+'px'});});};})();j.add('about',{requires:['dialog'],init:function(m){var n=m.addCommand('about',new a.dialogCommand('about'));n.modes={wysiwyg:1,source:1};n.canUndo=false;n.readOnly=1;m.ui.addButton('About',{label:m.lang.about.title,command:'about'});a.dialog.add('about',this.path+'dialogs/about.js');}});(function(){var m='a11yhelp',n='a11yHelp';j.add(m,{availableLangs:{en:1,he:1},init:function(o){var p=this;o.addCommand(n,{exec:function(){var q=o.langCode;q=p.availableLangs[q]?q:'en';a.scriptLoader.load(a.getUrl(p.path+'lang/'+q+'.js'),function(){e.extend(o.lang,p.langEntries[q]);o.openDialog(n);});},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:false});a.dialog.add(n,this.path+'dialogs/a11yhelp.js');}});})();j.add('basicstyles',{requires:['styles','button'],init:function(m){var n=function(q,r,s,t){var u=new a.style(t);m.attachStyleStateChange(u,function(v){!m.readOnly&&m.getCommand(s).setState(v);});m.addCommand(s,new a.styleCommand(u));m.ui.addButton(q,{label:r,command:s});},o=m.config,p=m.lang;n('Bold',p.bold,'bold',o.coreStyles_bold);
+n('Italic',p.italic,'italic',o.coreStyles_italic);n('Underline',p.underline,'underline',o.coreStyles_underline);n('Strike',p.strike,'strike',o.coreStyles_strike);n('Subscript',p.subscript,'subscript',o.coreStyles_subscript);n('Superscript',p.superscript,'superscript',o.coreStyles_superscript);}});i.coreStyles_bold={element:'strong',overrides:'b'};i.coreStyles_italic={element:'em',overrides:'i'};i.coreStyles_underline={element:'u'};i.coreStyles_strike={element:'strike'};i.coreStyles_subscript={element:'sub'};i.coreStyles_superscript={element:'sup'};(function(){var m={table:1,ul:1,ol:1,blockquote:1,div:1},n={},o={};e.extend(n,m,{tr:1,p:1,div:1,li:1});e.extend(o,n,{td:1});function p(B){q(B);r(B);};function q(B){var C=B.editor,D=B.data.path;if(C.readOnly)return;var E=C.config.useComputedState,F;E=E===undefined||E;if(!E)F=s(D.lastElement);F=F||D.block||D.blockLimit;if(F.is('body')){var G=C.getSelection().getRanges()[0].getEnclosedNode();G&&G.type==1&&(F=G);}if(!F)return;var H=E?F.getComputedStyle('direction'):F.getStyle('direction')||F.getAttribute('dir');C.getCommand('bidirtl').setState(H=='rtl'?1:2);C.getCommand('bidiltr').setState(H=='ltr'?1:2);};function r(B){var C=B.editor,D=B.data.path.block||B.data.path.blockLimit;C.fire('contentDirChanged',D?D.getComputedStyle('direction'):C.lang.dir);};function s(B){while(B&&!(B.getName() in o||B.is('body'))){var C=B.getParent();if(!C)break;B=C;}return B;};function t(B,C,D,E){if(B.isReadOnly())return;h.setMarker(E,B,'bidi_processed',1);var F=B;while((F=F.getParent())&&!F.is('body')){if(F.getCustomData('bidi_processed')){B.removeStyle('direction');B.removeAttribute('dir');return;}}var G='useComputedState' in D.config?D.config.useComputedState:1,H=G?B.getComputedStyle('direction'):B.getStyle('direction')||B.hasAttribute('dir');if(H==C)return;B.removeStyle('direction');if(G){B.removeAttribute('dir');if(C!=B.getComputedStyle('direction'))B.setAttribute('dir',C);}else B.setAttribute('dir',C);D.forceNextSelectionCheck();};function u(B,C,D){var E=B.getCommonAncestor(false,true);B=B.clone();B.enlarge(D==2?3:2);if(B.checkBoundaryOfElement(E,1)&&B.checkBoundaryOfElement(E,2)){var F;while(E&&E.type==1&&(F=E.getParent())&&F.getChildCount()==1&&!(E.getName() in C))E=F;return E.type==1&&E.getName() in C&&E;}};function v(B){return function(C){var D=C.getSelection(),E=C.config.enterMode,F=D.getRanges();if(F&&F.length){var G={},H=D.createBookmarks(),I=F.createIterator(),J,K=0;while(J=I.getNextRange(1)){var L=J.getEnclosedNode();if(!L||L&&!(L.type==1&&L.getName() in n))L=u(J,m,E);
+L&&t(L,B,C,G);var M,N,O=new d.walker(J),P=H[K].startNode,Q=H[K++].endNode;O.evaluator=function(R){return!!(R.type==1&&R.getName() in m&&!(R.getName()==(E==1?'p':'div')&&R.getParent().type==1&&R.getParent().getName()=='blockquote')&&R.getPosition(P)&2&&(R.getPosition(Q)&4+16)==4);};while(N=O.next())t(N,B,C,G);M=J.createIterator();M.enlargeBr=E!=2;while(N=M.getNextParagraph(E==1?'p':'div'))t(N,B,C,G);}h.clearAllMarkers(G);C.forceNextSelectionCheck();D.selectBookmarks(H);C.focus();}};};j.add('bidi',{requires:['styles','button'],init:function(B){var C=function(E,F,G,H){B.addCommand(G,new a.command(B,{exec:H}));B.ui.addButton(E,{label:F,command:G});},D=B.lang.bidi;C('BidiLtr',D.ltr,'bidiltr',v('ltr'));C('BidiRtl',D.rtl,'bidirtl',v('rtl'));B.on('selectionChange',p);B.on('contentDom',function(){B.document.on('dirChanged',function(E){B.fire('dirChanged',{node:E.data,dir:E.data.getDirection(1)});});});}});function w(B){var C=B.getDocument().getBody().getParent();while(B){if(B.equals(C))return false;B=B.getParent();}return true;};function x(B){var C=B==y.setAttribute,D=B==y.removeAttribute,E=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(F,G){var J=this;if(!J.getDocument().equals(a.document)){var H;if((F==(C||D?'dir':'direction')||F=='style'&&(D||E.test(G)))&&!w(J)){H=J.getDirection(1);var I=B.apply(J,arguments);if(H!=J.getDirection(1)){J.getDocument().fire('dirChanged',J);return I;}}}return B.apply(J,arguments);};};var y=h.prototype,z=['setStyle','removeStyle','setAttribute','removeAttribute'];for(var A=0;A<z.length;A++)y[z[A]]=e.override(y[z[A]],x);})();(function(){function m(q,r){var s=r.block||r.blockLimit;if(!s||s.getName()=='body')return 2;if(s.getAscendant('blockquote',true))return 1;return 2;};function n(q){var r=q.editor;if(r.readOnly)return;var s=r.getCommand('blockquote');s.state=m(r,q.data.path);s.fire('state');};function o(q){for(var r=0,s=q.getChildCount(),t;r<s&&(t=q.getChild(r));r++){if(t.type==1&&t.isBlockBoundary())return false;}return true;};var p={exec:function(q){var r=q.getCommand('blockquote').state,s=q.getSelection(),t=s&&s.getRanges(true)[0];if(!t)return;var u=s.createBookmarks();if(c){var v=u[0].startNode,w=u[0].endNode,x;if(v&&v.getParent().getName()=='blockquote'){x=v;while(x=x.getNext()){if(x.type==1&&x.isBlockBoundary()){v.move(x,true);break;}}}if(w&&w.getParent().getName()=='blockquote'){x=w;while(x=x.getPrevious()){if(x.type==1&&x.isBlockBoundary()){w.move(x);break;}}}}var y=t.createIterator(),z;y.enlargeBr=q.config.enterMode!=2;if(r==2){var A=[];
+while(z=y.getNextParagraph())A.push(z);if(A.length<1){var B=q.document.createElement(q.config.enterMode==1?'p':'div'),C=u.shift();t.insertNode(B);B.append(new d.text('\ufeff',q.document));t.moveToBookmark(C);t.selectNodeContents(B);t.collapse(true);C=t.createBookmark();A.push(B);u.unshift(C);}var D=A[0].getParent(),E=[];for(var F=0;F<A.length;F++){z=A[F];D=D.getCommonAncestor(z.getParent());}var G={table:1,tbody:1,tr:1,ol:1,ul:1};while(G[D.getName()])D=D.getParent();var H=null;while(A.length>0){z=A.shift();while(!z.getParent().equals(D))z=z.getParent();if(!z.equals(H))E.push(z);H=z;}while(E.length>0){z=E.shift();if(z.getName()=='blockquote'){var I=new d.documentFragment(q.document);while(z.getFirst()){I.append(z.getFirst().remove());A.push(I.getLast());}I.replace(z);}else A.push(z);}var J=q.document.createElement('blockquote');J.insertBefore(A[0]);while(A.length>0){z=A.shift();J.append(z);}}else if(r==1){var K=[],L={};while(z=y.getNextParagraph()){var M=null,N=null;while(z.getParent()){if(z.getParent().getName()=='blockquote'){M=z.getParent();N=z;break;}z=z.getParent();}if(M&&N&&!N.getCustomData('blockquote_moveout')){K.push(N);h.setMarker(L,N,'blockquote_moveout',true);}}h.clearAllMarkers(L);var O=[],P=[];L={};while(K.length>0){var Q=K.shift();J=Q.getParent();if(!Q.getPrevious())Q.remove().insertBefore(J);else if(!Q.getNext())Q.remove().insertAfter(J);else{Q.breakParent(Q.getParent());P.push(Q.getNext());}if(!J.getCustomData('blockquote_processed')){P.push(J);h.setMarker(L,J,'blockquote_processed',true);}O.push(Q);}h.clearAllMarkers(L);for(F=P.length-1;F>=0;F--){J=P[F];if(o(J))J.remove();}if(q.config.enterMode==2){var R=true;while(O.length){Q=O.shift();if(Q.getName()=='div'){I=new d.documentFragment(q.document);var S=R&&Q.getPrevious()&&!(Q.getPrevious().type==1&&Q.getPrevious().isBlockBoundary());if(S)I.append(q.document.createElement('br'));var T=Q.getNext()&&!(Q.getNext().type==1&&Q.getNext().isBlockBoundary());while(Q.getFirst())Q.getFirst().remove().appendTo(I);if(T)I.append(q.document.createElement('br'));I.replace(Q);R=false;}}}}s.selectBookmarks(u);q.focus();}};j.add('blockquote',{init:function(q){q.addCommand('blockquote',p);q.ui.addButton('Blockquote',{label:q.lang.blockquote,command:'blockquote'});q.on('selectionChange',n);},requires:['domiterator']});})();j.add('button',{beforeInit:function(m){m.ui.addHandler('button',k.button.handler);}});a.UI_BUTTON='button';k.button=function(m){e.extend(this,m,{title:m.label,className:m.className||m.command&&'cke_button_'+m.command||'',click:m.click||(function(n){n.execCommand(m.command);
+})});this._={};};k.button.handler={create:function(m){return new k.button(m);}};(function(){k.button.prototype={render:function(m,n){var o=b,p=this._.id=e.getNextId(),q='',r=this.command,s;this._.editor=m;var t={id:p,button:this,editor:m,focus:function(){var z=a.document.getById(p);z.focus();},execute:function(){if(c&&b.version<7)e.setTimeout(function(){this.button.click(m);},0,this);else this.button.click(m);}},u=e.addFunction(function(z){if(t.onkey){z=new d.event(z);return t.onkey(t,z.getKeystroke())!==false;}}),v=e.addFunction(function(z){var A;if(t.onfocus)A=t.onfocus(t,new d.event(z))!==false;if(b.gecko&&b.version<10900)z.preventBubble();return A;});t.clickFn=s=e.addFunction(t.execute,t);if(this.modes){var w={};function x(){var z=m.mode;if(z){var A=this.modes[z]?w[z]!=undefined?w[z]:2:0;this.setState(m.readOnly&&!this.readOnly?0:A);}};m.on('beforeModeUnload',function(){if(m.mode&&this._.state!=0)w[m.mode]=this._.state;},this);m.on('mode',x,this);!this.readOnly&&m.on('readOnly',x,this);}else if(r){r=m.getCommand(r);if(r){r.on('state',function(){this.setState(r.state);},this);q+='cke_'+(r.state==1?'on':r.state==0?'disabled':'off');}}if(!r)q+='cke_off';if(this.className)q+=' '+this.className;n.push('<span class="cke_button'+(this.icon&&this.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">','<a id="',p,'" class="',q,'"',o.gecko&&o.version>=10900&&!o.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+p+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(o.opera||o.gecko&&o.mac)n.push(' onkeypress="return false;"');if(o.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="return CKEDITOR.tools.callFunction(',u,', event);" onfocus="return CKEDITOR.tools.callFunction(',v,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',s,', this); return false;"><span class="cke_icon"');if(this.icon){var y=(this.iconOffset||0)*-16;n.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+y+'px;"');}n.push('> </span><span id="',p,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)n.push('<span class="cke_buttonarrow">'+(b.hc?'▼':' ')+'</span>');n.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(m){if(this._.state==m)return false;this._.state=m;var n=a.document.getById(this._.id);if(n){n.setState(m);
+m==0?n.setAttribute('aria-disabled',true):n.removeAttribute('aria-disabled');m==1?n.setAttribute('aria-pressed',true):n.removeAttribute('aria-pressed');return true;}else return false;}};})();k.prototype.addButton=function(m,n){this.add(m,'button',n);};(function(){var m=function(y,z){var A=y.document,B=A.getBody(),C=0,D=function(){C=1;};B.on(z,D);(b.version>7?A.$:A.$.selection.createRange()).execCommand(z);B.removeListener(z,D);return C;},n=c?function(y,z){return m(y,z);}:function(y,z){try{return y.document.$.execCommand(z,false,null);}catch(A){return false;}},o=function(y){var z=this;z.type=y;z.canUndo=z.type=='cut';z.startDisabled=true;};o.prototype={exec:function(y,z){this.type=='cut'&&t(y);var A=n(y,this.type);if(!A)alert(y.lang.clipboard[this.type+'Error']);return A;}};var p={canUndo:false,exec:c?function(y){y.focus();if(!y.document.getBody().fire('beforepaste')&&!m(y,'paste')){y.fire('pasteDialog');return false;}}:function(y){try{if(!y.document.getBody().fire('beforepaste')&&!y.document.$.execCommand('Paste',false,null))throw 0;}catch(z){setTimeout(function(){y.fire('pasteDialog');},0);return false;}}},q=function(y){if(this.mode!='wysiwyg')return;switch(y.data.keyCode){case 1114112+86:case 2228224+45:var z=this.document.getBody();if(!c&&z.fire('beforepaste'))y.cancel();else if(b.opera||b.gecko&&b.version<10900)z.fire('paste');return;case 1114112+88:case 2228224+46:var A=this;this.fire('saveSnapshot');setTimeout(function(){A.fire('saveSnapshot');},0);}};function r(y){y.cancel();};function s(y,z,A){var B=this.document;if(B.getById('cke_pastebin'))return;if(z=='text'&&y.data&&y.data.$.clipboardData){var C=y.data.$.clipboardData.getData('text/plain');if(C){y.data.preventDefault();A(C);return;}}var D=this.getSelection(),E=new d.range(B),F=new h(z=='text'?'textarea':b.webkit?'body':'div',B);F.setAttribute('id','cke_pastebin');b.webkit&&F.append(B.createText('\xa0'));B.getBody().append(F);F.setStyles({position:'absolute',top:D.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});F.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var G=D.createBookmarks();this.on('selectionChange',r,null,null,0);if(z=='text')F.$.focus();else{E.setStartAt(F,1);E.setEndAt(F,2);E.select(true);}var H=this;window.setTimeout(function(){z=='text'&&b.gecko&&H.focusGrabber.focus();F.remove();H.removeListener('selectionChange',r);var I;F=b.webkit&&(I=F.getFirst())&&I.is&&I.hasClass('Apple-style-span')?I:F;D.selectBookmarks(G);
+A(F['get'+(z=='text'?'Value':'Html')]());},0);};function t(y){if(!c||b.quirks)return;var z=y.getSelection(),A;if(z.getType()==3&&(A=z.getSelectedElement())){var B=z.getRanges()[0],C=y.document.createText('');C.insertBefore(A);B.setStartBefore(C);B.setEndAfter(A);z.selectRanges([B]);setTimeout(function(){if(A.getParent()){C.remove();z.selectElement(A);}},0);}};var u;function v(y,z){c&&(u=1);var A=2;try{A=z.document.$.queryCommandEnabled(y)?2:0;}catch(B){}u=0;return A;};var w;function x(){var z=this;if(z.mode!='wysiwyg')return;z.getCommand('cut').setState(w?0:v('Cut',z));z.getCommand('copy').setState(v('Copy',z));var y=w?0:b.webkit?2:v('Paste',z);z.fire('pasteState',y);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(y){y.on('paste',function(A){var B=A.data;if(B.html)y.insertHtml(B.html);else if(B.text)y.insertText(B.text);setTimeout(function(){y.fire('afterPaste');},0);},null,null,1000);y.on('pasteDialog',function(A){setTimeout(function(){y.openDialog('paste');},0);});y.on('pasteState',function(A){y.getCommand('paste').setState(A.data);});function z(A,B,C,D){var E=y.lang[B];y.addCommand(B,C);y.ui.addButton(A,{label:E,command:B});if(y.addMenuItems)y.addMenuItem(B,{label:E,command:B,group:'clipboard',order:D});};z('Cut','cut',new o('cut'),1);z('Copy','copy',new o('copy'),4);z('Paste','paste',p,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));y.on('key',q,y);y.on('contentDom',function(){var A=y.document.getBody();A.on(b.webkit?'paste':'beforepaste',function(B){if(u)return;var C={mode:'html'};y.fire('beforePaste',C);s.call(y,B,C.mode,function(D){if(!(D=e.trim(D.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,''))))return;var E={};E[C.mode]=D;y.fire('paste',E);});});A.on('contextmenu',function(){u=1;setTimeout(function(){u=0;},10);});A.on('beforecut',function(){!u&&t(y);});A.on('mouseup',function(){setTimeout(function(){x.call(y);},0);},y);A.on('keyup',x,y);});y.on('selectionChange',function(A){w=A.data.selection.getRanges()[0].checkReadOnly();x.call(y);});if(y.contextMenu)y.contextMenu.addListener(function(A,B){var C=B.getRanges()[0].checkReadOnly();return{cut:!C&&v('Cut',y),copy:v('Copy',y),paste:!C&&(b.webkit?2:v('Paste',y))};});}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p;if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,'panelbutton',{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;
+y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2228224+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=x.length+(n.colorButton_enableMore?2:1),z=e.addFunction(function(F,G){if(F=='?'){var H=arguments.callee;function I(K){this.removeListener('ok',I);this.removeListener('cancel',I);K.name=='ok'&&H(this.getContentElement('picker','selectedColor').getValue(),G);};m.openDialog('colordialog',function(){this.on('ok',I);this.on('cancel',I);});return;}m.focus();t.hide(false);m.fire('saveSnapshot');new a.style(n['colorButton_'+G+'Style'],{color:'inherit'}).remove(m.document);if(F){var J=n['colorButton_'+G+'Style'];J.childRule=G=='back'?function(K){return s(K);}:function(K){return K.getName()!='a'||s(K);};new a.style(J,{color:F}).apply(m.document);}m.fire('saveSnapshot');});w.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',o.auto,'" onclick="CKEDITOR.tools.callFunction(',z,",null,'",u,"');return false;\" href=\"javascript:void('",o.auto,'\')" role="option" aria-posinset="1" aria-setsize="',y,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',v,'"></span></td><td colspan=7 align=center>',o.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var A=0;A<x.length;A++){if(A%8===0)w.push('</tr><tr>');var B=x[A].split('/'),C=B[0],D=B[1]||C;if(!B[1])C='#'+C.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var E=m.lang.colors[D]||D;w.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',E,'" onclick="CKEDITOR.tools.callFunction(',z,",'",C,"','",u,"'); return false;\" href=\"javascript:void('",E,'\')" role="option" aria-posinset="',A+2,'" aria-setsize="',y,'"><span class="cke_colorbox" style="background-color:#',D,'"></span></a></td>');}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',z,",'?','",u,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option" aria-posinset="',y,'" aria-setsize="',y,'">',o.more,'</a></td>');
+w.push('</tr></table>');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);j.add('contextmenu',{requires:['menu'],onLoad:function(){j.contextMenu=e.createClass({base:a.menu,$:function(m){this.base.call(this,m,{panel:{className:m.skinClass+' cke_contextmenu',attributes:{'aria-label':m.lang.contextmenu.options}}});},proto:{addTarget:function(m,n){if(b.opera&&!('oncontextmenu' in document.body)){var o;m.on('mousedown',function(s){s=s.data;if(s.$.button!=2){if(s.getKeystroke()==1114112+1)m.fire('contextmenu',s);return;}if(n&&(b.mac?s.$.metaKey:s.$.ctrlKey))return;var t=s.getTarget();if(!o){var u=t.getDocument();o=u.createElement('input');o.$.type='button';u.getBody().append(o);}o.setAttribute('style','position:absolute;top:'+(s.$.clientY-2)+'px;left:'+(s.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});m.on('mouseup',function(s){if(o){o.remove();o=undefined;m.fire('contextmenu',s.data);}});}m.on('contextmenu',function(s){var t=s.data;if(n&&(b.webkit?p:b.mac?t.$.metaKey:t.$.ctrlKey))return;t.preventDefault();var u=t.getTarget().getDocument().getDocumentElement(),v=t.$.clientX,w=t.$.clientY;e.setTimeout(function(){this.open(u,null,v,w);},0,this);},this);if(b.opera)m.on('keypress',function(s){var t=s.data;if(t.$.keyCode===0)t.preventDefault();});if(b.webkit){var p,q=function(s){p=b.mac?s.data.$.metaKey:s.data.$.ctrlKey;},r=function(){p=0;};m.on('keydown',q);m.on('keyup',r);m.on('contextmenu',r);}},open:function(m,n,o,p){this.editor.focus();m=m||a.document.getDocumentElement();this.show(m,n,o,p);}}});},beforeInit:function(m){m.contextMenu=new j.contextMenu(m);m.addCommand('contextMenu',{exec:function(){m.contextMenu.open(m.document.getBody());}});}});(function(){function m(o){var p=this.att,q=o&&o.hasAttribute(p)&&o.getAttribute(p)||'';
+if(q!==undefined)this.setValue(q);};function n(){var o;for(var p=0;p<arguments.length;p++){if(arguments[p] instanceof h){o=arguments[p];break;}}if(o){var q=this.att,r=this.getValue();if(r)o.setAttribute(q,r);else o.removeAttribute(q,r);}};j.add('dialogadvtab',{createAdvancedTab:function(o,p){if(!p)p={id:1,dir:1,classes:1,styles:1};var q=o.lang.common,r={id:'advanced',label:q.advancedTab,title:q.advancedTab,elements:[{type:'vbox',padding:1,children:[]}]},s=[];if(p.id||p.dir){if(p.id)s.push({id:'advId',att:'id',type:'text',label:q.id,setup:m,commit:n});if(p.dir)s.push({id:'advLangDir',att:'dir',type:'select',label:q.langDir,'default':'',style:'width:100%',items:[[q.notSet,''],[q.langDirLTR,'ltr'],[q.langDirRTL,'rtl']],setup:m,commit:n});r.elements[0].children.push({type:'hbox',widths:['50%','50%'],children:[].concat(s)});}if(p.styles||p.classes){s=[];if(p.styles)s.push({id:'advStyles',att:'style',type:'text',label:q.styles,'default':'',onChange:function(){},getStyle:function(t,u){var v=this.getValue().match(new RegExp(t+'\\s*:\\s*([^;]*)','i'));return v?v[1]:u;},updateStyle:function(t,u){var v=this.getValue();if(v)v=v.replace(new RegExp('\\s*'+t+'s*:[^;]*(?:$|;s*)','i'),'').replace(/^[;\s]+/,'').replace(/\s+$/,'');if(u){v&&!/;\s*$/.test(v)&&(v+='; ');v+=t+': '+u;}this.setValue(v,1);},setup:m,commit:n});if(p.classes)s.push({type:'hbox',widths:['45%','55%'],children:[{id:'advCSSClasses',att:'class',type:'text',label:q.cssClasses,'default':'',setup:m,commit:n}]});r.elements[0].children.push({type:'hbox',widths:['50%','50%'],children:[].concat(s)});}return r;}});})();(function(){j.add('div',{requires:['editingblock','domiterator','styles'],init:function(m){var n=m.lang.div;m.addCommand('creatediv',new a.dialogCommand('creatediv'));m.addCommand('editdiv',new a.dialogCommand('editdiv'));m.addCommand('removediv',{exec:function(o){var p=o.getSelection(),q=p&&p.getRanges(),r,s=p.createBookmarks(),t,u=[];function v(x){var y=new d.elementPath(x),z=y.blockLimit,A=z.is('div')&&z;if(A&&!A.data('cke-div-added')){u.push(A);A.data('cke-div-added');}};for(var w=0;w<q.length;w++){r=q[w];if(r.collapsed)v(p.getStartElement());else{t=new d.walker(r);t.evaluator=v;t.lastForward();}}for(w=0;w<u.length;w++)u[w].remove(true);p.selectBookmarks(s);}});m.ui.addButton('CreateDiv',{label:n.toolbar,command:'creatediv'});if(m.addMenuItems){m.addMenuItems({editdiv:{label:n.edit,command:'editdiv',group:'div',order:1},removediv:{label:n.remove,command:'removediv',group:'div',order:5}});if(m.contextMenu)m.contextMenu.addListener(function(o,p){if(!o||o.isReadOnly())return null;
+var q=new d.elementPath(o),r=q.blockLimit;if(r&&r.getAscendant('div',true))return{editdiv:2,removediv:2};return null;});}a.dialog.add('creatediv',this.path+'dialogs/div.js');a.dialog.add('editdiv',this.path+'dialogs/div.js');}});})();(function(){var m={toolbarFocus:{editorFocus:false,readOnly:1,exec:function(o){var p=o._.elementsPath.idBase,q=a.document.getById(p+'0');q&&q.focus(c||b.air);}}},n='<span class="cke_empty"> </span>';j.add('elementspath',{requires:['selection'],init:function(o){var p='cke_path_'+o.name,q,r=function(){if(!q)q=a.document.getById(p);return q;},s='cke_elementspath_'+e.getNextNumber()+'_';o._.elementsPath={idBase:s,filters:[]};o.on('themeSpace',function(x){if(x.data.space=='bottom')x.data.html+='<span id="'+p+'_label" class="cke_voice_label">'+o.lang.elementsPath.eleLabel+'</span>'+'<div id="'+p+'" class="cke_path" role="group" aria-labelledby="'+p+'_label">'+n+'</div>';});function t(x){o.focus();var y=o._.elementsPath.list[x];if(y.is('body')){var z=new d.range(o.document);z.selectNodeContents(y);z.select();}else o.getSelection().selectElement(y);};var u=e.addFunction(t),v=e.addFunction(function(x,y){var z=o._.elementsPath.idBase,A;y=new d.event(y);var B=o.lang.dir=='rtl';switch(y.getKeystroke()){case B?39:37:case 9:A=a.document.getById(z+(x+1));if(!A)A=a.document.getById(z+'0');A.focus();return false;case B?37:39:case 2228224+9:A=a.document.getById(z+(x-1));if(!A)A=a.document.getById(z+(o._.elementsPath.list.length-1));A.focus();return false;case 27:o.focus();return false;case 13:case 32:t(x);return false;}return true;});o.on('selectionChange',function(x){var y=b,z=x.data.selection,A=z.getStartElement(),B=[],C=x.editor,D=C._.elementsPath.list=[],E=C._.elementsPath.filters;while(A){var F=0,G;if(A.data('cke-display-name'))G=A.data('cke-display-name');else if(A.data('cke-real-element-type'))G=A.data('cke-real-element-type');else G=A.getName();for(var H=0;H<E.length;H++){var I=E[H](A,G);if(I===false){F=1;break;}G=I||G;}if(!F){var J=D.push(A)-1,K='';if(y.opera||y.gecko&&y.mac)K+=' onkeypress="return false;"';if(y.gecko)K+=' onblur="this.style.cssText = this.style.cssText;"';var L=C.lang.elementsPath.eleTitle.replace(/%1/,G);B.unshift('<a id="',s,J,'" href="javascript:void(\'',G,'\')" tabindex="-1" title="',L,'"'+(b.gecko&&b.version<10900?' onfocus="event.preventBubble();"':'')+' hidefocus="true" '+' onkeydown="return CKEDITOR.tools.callFunction(',v,',',J,', event );"'+K,' onclick="CKEDITOR.tools.callFunction('+u,',',J,'); return false;"',' role="button" aria-labelledby="'+s+J+'_label">',G,'<span id="',s,J,'_label" class="cke_label">'+L+'</span>','</a>');
+}if(G=='body')break;A=A.getParent();}var M=r();M.setHtml(B.join('')+n);C.fire('elementsPathUpdate',{space:M});});function w(){q&&q.setHtml(n);delete o._.elementsPath.list;};o.on('readOnly',w);o.on('contentDomUnload',w);o.addCommand('elementsPathFocus',m.toolbarFocus);}});})();(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(t){t.addCommand('enter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){r(v);}});t.addCommand('shiftEnter',{modes:{wysiwyg:1},editorFocus:false,exec:function(v){q(v);}});var u=t.keystrokeHandler.keystrokes;u[13]='enter';u[2228224+13]='shiftEnter';}});j.enterkey={enterBlock:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=v.checkStartOfBlock(),z=v.checkEndOfBlock(),A=new d.elementPath(v.startContainer),B=A.block;if(y&&z){if(B&&(B.is('li')||B.getParent().is('li'))){t.execCommand('outdent');return;}}else if(B&&B.is('pre')){if(!z){n(t,u,v,w);return;}}else if(B&&f.$captionBlock[B.getName()]){n(t,u,v,w);return;}var C=u==3?'div':'p',D=v.splitBlock(C);if(!D)return;var E=D.previousBlock,F=D.nextBlock,G=D.wasStartOfBlock,H=D.wasEndOfBlock,I;if(F){I=F.getParent();if(I.is('li')){F.breakParent(I);F.move(F.getNext(),1);}}else if(E&&(I=E.getParent())&&I.is('li')){E.breakParent(I);I=E.getNext();v.moveToElementEditStart(I);E.move(E.getPrevious());}if(!G&&!H){if(F.is('li')&&(I=F.getFirst(d.walker.invisible(true)))&&I.is&&I.is('ul','ol'))(c?x.createText('\xa0'):x.createElement('br')).insertBefore(I);if(F)v.moveToElementEditStart(F);}else{var J,K;if(E){if(E.is('li')||!(p.test(E.getName())||E.is('pre')))J=E.clone();}else if(F)J=F.clone();if(!J){if(I&&I.is('li'))J=I;else{J=x.createElement(C);if(E&&(K=E.getDirection()))J.setAttribute('dir',K);}}else if(w&&!J.is('li'))J.renameNode(C);var L=D.elementPath;if(L)for(var M=0,N=L.elements.length;M<N;M++){var O=L.elements[M];if(O.equals(L.block)||O.equals(L.blockLimit))break;if(f.$removeEmpty[O.getName()]){O=O.clone();J.moveChildren(O);J.append(O);}}if(!c)J.appendBogus();if(!J.getParent())v.insertNode(J);J.is('li')&&J.removeAttribute('value');if(c&&G&&(!H||!E.getChildCount())){v.moveToElementEditStart(H?E:J);v.select();}v.moveToElementEditStart(G&&!H?F:J);}if(!c)if(F){var P=x.createElement('span');P.setHtml(' ');v.insertNode(P);P.scrollIntoView();v.deleteContents();}else J.scrollIntoView();v.select();},enterBr:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document,y=u==3?'div':'p',z=v.checkEndOfBlock(),A=new d.elementPath(t.getSelection().getStartElement()),B=A.block,C=B&&A.block.getName(),D=false;
+if(!w&&C=='li'){o(t,u,v,w);return;}if(!w&&z&&p.test(C)){var E,F;if(F=B.getDirection()){E=x.createElement('div');E.setAttribute('dir',F);E.insertAfter(B);v.setStart(E,0);}else{x.createElement('br').insertAfter(B);if(b.gecko)x.createText('').insertAfter(B);v.setStartAt(B.getNext(),c?3:1);}}else{var G;D=C=='pre';if(D&&!b.gecko)G=x.createText(c?'\r':'\n');else G=x.createElement('br');v.deleteContents();v.insertNode(G);if(c)v.setStartAt(G,4);else{x.createText('\ufeff').insertAfter(G);if(z)G.getParent().appendBogus();G.getNext().$.nodeValue='';v.setStartAt(G.getNext(),1);var H=null;if(!b.gecko){H=x.createElement('span');H.setHtml(' ');}else H=x.createElement('br');H.insertBefore(G.getNext());H.scrollIntoView();H.remove();}}v.collapse(true);v.select(D);}};var m=j.enterkey,n=m.enterBr,o=m.enterBlock,p=/^h[1-6]$/;function q(t){if(t.mode!='wysiwyg')return false;return r(t,t.config.shiftEnterMode,1);};function r(t,u,v){v=t.config.forceEnterMode||v;if(t.mode!='wysiwyg')return false;if(!u)u=t.config.enterMode;setTimeout(function(){t.fire('saveSnapshot');if(u==2)n(t,u,null,v);else o(t,u,null,v);},0);return true;};function s(t){var u=t.getSelection().getRanges(true);for(var v=u.length-1;v>0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt,amp',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';
+function q(r,s){var t={},u=[],v={nbsp:'\xa0',shy:'­',gt:'>',lt:'<',amp:'&'};r=r.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(A,B){var C=s?'&'+B+';':v[B],D=s?v[B]:'&'+B+';';t[C]=D;u.push(C);return '';});if(!s&&r){r=r.split(',');var w=document.createElement('div'),x;w.innerHTML='&'+r.join(';&')+';';x=w.innerHTML;w=null;for(var y=0;y<x.length;y++){var z=x.charAt(y);t[z]='&'+r[y]+';';u.push(z);}}t.regex=u.join(s?'|':'');return t;};j.add('entities',{afterInit:function(r){var s=r.config,t=r.dataProcessor,u=t&&t.htmlFilter;if(u){var v='';if(s.basicEntities!==false)v+=m;if(s.entities){v+=','+n;if(s.entities_latin)v+=','+o;if(s.entities_greek)v+=','+p;if(s.entities_additional)v+=','+s.entities_additional;}var w=q(v),x=w.regex?'['+w.regex+']':'a^';delete w.regex;if(s.entities&&s.entities_processNumerical)x='[^ -~]|'+x;x=new RegExp(x,'g');function y(C){return s.entities_processNumerical=='force'||!w[C]?'&#'+C.charCodeAt(0)+';':w[C];};var z=q([m,'shy'].join(','),true),A=new RegExp(z.regex,'g');function B(C){return z[C];};u.addRules({text:function(C){return C.replace(A,B).replace(x,y);}});}}});})();i.basicEntities=true;i.entities=true;i.entities_latin=true;i.entities_greek=true;i.entities_additional='#39';(function(){function m(v,w){var x=[];if(!w)return v;else for(var y in w)x.push(y+'='+encodeURIComponent(w[y]));return v+(v.indexOf('?')!=-1?'&':'?')+x.join('&');};function n(v){v+='';var w=v.charAt(0).toUpperCase();return w+v.substr(1);};function o(v){var C=this;var w=C.getDialog(),x=w.getParentEditor();x._.filebrowserSe=C;var y=x.config['filebrowser'+n(w.getName())+'WindowWidth']||x.config.filebrowserWindowWidth||'80%',z=x.config['filebrowser'+n(w.getName())+'WindowHeight']||x.config.filebrowserWindowHeight||'70%',A=C.filebrowser.params||{};A.CKEditor=x.name;A.CKEditorFuncNum=x._.filebrowserFn;if(!A.langCode)A.langCode=x.langCode;var B=m(C.filebrowser.url,A);x.popup(B,y,z,x.config.fileBrowserWindowFeatures);};function p(v){var y=this;var w=y.getDialog(),x=w.getParentEditor();x._.filebrowserSe=y;if(!w.getContentElement(y['for'][0],y['for'][1]).getInputElement().$.value)return false;if(!w.getContentElement(y['for'][0],y['for'][1]).getAction())return false;return true;};function q(v,w,x){var y=x.params||{};y.CKEditor=v.name;y.CKEditorFuncNum=v._.filebrowserFn;if(!y.langCode)y.langCode=v.langCode;w.action=m(x.url,y);w.filebrowser=x;};function r(v,w,x,y){var z,A;for(var B in y){z=y[B];if(z.type=='hbox'||z.type=='vbox')r(v,w,x,z.children);if(!z.filebrowser)continue;if(typeof z.filebrowser=='string'){var C={action:z.type=='fileButton'?'QuickUpload':'Browse',target:z.filebrowser};
+z.filebrowser=C;}if(z.filebrowser.action=='Browse'){var D=z.filebrowser.url;if(D===undefined){D=v.config['filebrowser'+n(w)+'BrowseUrl'];if(D===undefined)D=v.config.filebrowserBrowseUrl;}if(D){z.onClick=o;z.filebrowser.url=D;z.hidden=false;}}else if(z.filebrowser.action=='QuickUpload'&&z['for']){D=z.filebrowser.url;if(D===undefined){D=v.config['filebrowser'+n(w)+'UploadUrl'];if(D===undefined)D=v.config.filebrowserUploadUrl;}if(D){var E=z.onClick;z.onClick=function(F){var G=F.sender;if(E&&E.call(G,F)===false)return false;return p.call(G,F);};z.filebrowser.url=D;z.hidden=false;q(v,x.getContents(z['for'][0]).get(z['for'][1]),z.filebrowser);}}}};function s(v,w){var x=w.getDialog(),y=w.filebrowser.target||null;v=v.replace(/#/g,'%23');if(y){var z=y.split(':'),A=x.getContentElement(z[0],z[1]);if(A){A.setValue(v);x.selectPage(z[0]);}}};function t(v,w,x){if(x.indexOf(';')!==-1){var y=x.split(';');for(var z=0;z<y.length;z++){if(t(v,w,y[z]))return true;}return false;}var A=v.getContents(w).get(x).filebrowser;return A&&A.url;};function u(v,w){var A=this;var x=A._.filebrowserSe.getDialog(),y=A._.filebrowserSe['for'],z=A._.filebrowserSe.filebrowser.onSelect;if(y)x.getContentElement(y[0],y[1]).reset();if(typeof w=='function'&&w.call(A._.filebrowserSe)===false)return;if(z&&z.call(A._.filebrowserSe,v,w)===false)return;if(typeof w=='string'&&w)alert(w);if(v)s(v,A._.filebrowserSe);};j.add('filebrowser',{init:function(v,w){v._.filebrowserFn=e.addFunction(u,v);v.on('destroy',function(){e.removeFunction(this._.filebrowserFn);});}});a.on('dialogDefinition',function(v){var w=v.data.definition,x;for(var y in w.contents){if(x=w.contents[y]){r(v.editor,v.data.name,w,x.elements);if(x.hidden&&x.filebrowser)x.hidden=!t(w,x.id,x.filebrowser);}}});})();j.add('find',{init:function(m){var n=j.find;m.ui.addButton('Find',{label:m.lang.findAndReplace.find,command:'find'});var o=m.addCommand('find',new a.dialogCommand('find'));o.canUndo=false;o.readOnly=1;m.ui.addButton('Replace',{label:m.lang.findAndReplace.replace,command:'replace'});var p=m.addCommand('replace',new a.dialogCommand('replace'));p.canUndo=false;a.dialog.add('find',this.path+'dialogs/find.js');a.dialog.add('replace',this.path+'dialogs/find.js');},requires:['styles']});i.find_highlight={element:'span',styles:{'background-color':'#004',color:'#fff'}};(function(){var m=/\.swf(?:$|\?)/i;function n(p){var q=p.attributes;return q.type=='application/x-shockwave-flash'||m.test(q.src||'');};function o(p,q){return p.createFakeParserElement(q,'cke_flash','flash',true);
+};j.add('flash',{init:function(p){p.addCommand('flash',new a.dialogCommand('flash'));p.ui.addButton('Flash',{label:p.lang.common.flash,command:'flash'});a.dialog.add('flash',this.path+'dialogs/flash.js');p.addCss('img.cke_flash{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');if(p.addMenuItems)p.addMenuItems({flash:{label:p.lang.flash.properties,command:'flash',group:'flash'}});p.on('doubleclick',function(q){var r=q.data.element;if(r.is('img')&&r.data('cke-real-element-type')=='flash')q.data.dialog='flash';});if(p.contextMenu)p.contextMenu.addListener(function(q,r){if(q&&q.is('img')&&!q.isReadOnly()&&q.data('cke-real-element-type')=='flash')return{flash:2};});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter;if(r)r.addRules({elements:{'cke:object':function(s){var t=s.attributes,u=t.classid&&String(t.classid).toLowerCase();if(!u&&!n(s)){for(var v=0;v<s.children.length;v++){if(s.children[v].name=='cke:embed'){if(!n(s.children[v]))return null;return o(p,s);}}return null;}return o(p,s);},'cke:embed':function(s){if(!n(s))return null;return o(p,s);}}},5);},requires:['fakeobjects']});})();e.extend(i,{flashEmbedTagOnly:false,flashAddEmbedTag:true,flashConvertOnEdit:false});(function(){function m(n,o,p,q,r,s,t){var u=n.config,v=r.split(';'),w=[],x={};for(var y=0;y<v.length;y++){var z=v[y];if(z){z=z.split('/');var A={},B=v[y]=z[0];A[p]=w[y]=z[1]||B;x[B]=new a.style(t,A);x[B]._.definition.name=B;}else v.splice(y--,1);}n.ui.addRichCombo(o,{label:q.label,title:q.panelTitle,className:'cke_'+(p=='size'?'fontSize':'font'),panel:{css:n.skin.editor.css.concat(u.contentsCss),multiSelect:false,attributes:{'aria-label':q.panelTitle}},init:function(){this.startGroup(q.panelTitle);for(var C=0;C<v.length;C++){var D=v[C];this.add(D,x[D].buildPreview(),D);}},onClick:function(C){n.focus();n.fire('saveSnapshot');var D=x[C];if(this.getValue()==C)D.remove(n.document);else D.apply(n.document);n.fire('saveSnapshot');},onRender:function(){n.on('selectionChange',function(C){var D=this.getValue(),E=C.data.path,F=E.elements;for(var G=0,H;G<F.length;G++){H=F[G];for(var I in x){if(x[I].checkElementRemovable(H,true)){if(I!=D)this.setValue(I);return;}}}this.setValue('',s);},this);}});};j.add('font',{requires:['richcombo','styles'],init:function(n){var o=n.config;m(n,'Font','family',n.lang.font,o.font_names,o.font_defaultLabel,o.font_style);
+m(n,'FontSize','size',n.lang.fontSize,o.fontSize_sizes,o.fontSize_defaultLabel,o.fontSize_style);}});})();i.font_names='Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif';i.font_defaultLabel='';i.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};i.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';i.fontSize_defaultLabel='';i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};j.add('format',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.format,p=n.format_tags.split(';'),q={};for(var r=0;r<p.length;r++){var s=p[r];q[s]=new a.style(n['format_'+s]);q[s]._.enterMode=m.config.enterMode;}m.ui.addRichCombo('Format',{label:o.label,title:o.panelTitle,className:'cke_format',panel:{css:m.skin.editor.css.concat(n.contentsCss),multiSelect:false,attributes:{'aria-label':o.panelTitle}},init:function(){this.startGroup(o.panelTitle);for(var t in q){var u=o['tag_'+t];this.add(t,q[t].buildPreview(u),u);}},onClick:function(t){m.focus();m.fire('saveSnapshot');var u=q[t],v=new d.elementPath(m.getSelection().getStartElement());u[u.checkActive(v)?'remove':'apply'](m.document);setTimeout(function(){m.fire('saveSnapshot');},0);},onRender:function(){m.on('selectionChange',function(t){var u=this.getValue(),v=t.data.path;for(var w in q){if(q[w].checkActive(v)){if(w!=u)this.setValue(w,m.lang.format['tag_'+w]);return;}}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(m){var n=m.lang;m.addCss('form{border: 1px dotted #FF0000;padding: 2px;}\n');m.addCss('img.cke_hidden{background-image: url('+a.getUrl(this.path+'images/hiddenfield.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 16px !important;'+'height: 16px !important;'+'}');
 var o=function(q,r,s){m.addCommand(r,new a.dialogCommand(r));m.ui.addButton(q,{label:n.common[q.charAt(0).toLowerCase()+q.slice(1)],command:r});a.dialog.add(r,s);},p=this.path+'dialogs/';o('Form','form',p+'form.js');o('Checkbox','checkbox',p+'checkbox.js');o('Radio','radio',p+'radio.js');o('TextField','textfield',p+'textfield.js');o('Textarea','textarea',p+'textarea.js');o('Select','select',p+'select.js');o('Button','button',p+'button.js');o('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');o('HiddenField','hiddenfield',p+'hiddenfield.js');if(m.addMenuItems)m.addMenuItems({form:{label:n.form.menu,command:'form',group:'form'},checkbox:{label:n.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:n.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:n.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:n.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:n.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:n.button.title,command:'button',group:'button'},select:{label:n.select.title,command:'select',group:'select'},textarea:{label:n.textarea.title,command:'textarea',group:'textarea'}});if(m.contextMenu){m.contextMenu.addListener(function(q){if(q&&q.hasAscendant('form',true)&&!q.isReadOnly())return{form:2};});m.contextMenu.addListener(function(q){if(q&&!q.isReadOnly()){var r=q.getName();if(r=='select')return{select:2};if(r=='textarea')return{textarea:2};if(r=='input')switch(q.getAttribute('type')){case 'button':case 'submit':case 'reset':return{button:2};case 'checkbox':return{checkbox:2};case 'radio':return{radio:2};case 'image':return{imagebutton:2};default:return{textfield:2};}if(r=='img'&&q.data('cke-real-element-type')=='hiddenfield')return{hiddenfield:2};}});}m.on('doubleclick',function(q){var r=q.data.element;if(r.is('form'))q.data.dialog='form';else if(r.is('select'))q.data.dialog='select';else if(r.is('textarea'))q.data.dialog='textarea';else if(r.is('img')&&r.data('cke-real-element-type')=='hiddenfield')q.data.dialog='hiddenfield';else if(r.is('input'))switch(r.getAttribute('type')){case 'button':case 'submit':case 'reset':q.data.dialog='button';break;case 'checkbox':q.data.dialog='checkbox';break;case 'radio':q.data.dialog='radio';break;case 'image':q.data.dialog='imagebutton';break;default:q.data.dialog='textfield';break;}});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.htmlFilter,p=n&&n.dataFilter;if(c)o&&o.addRules({elements:{input:function(q){var r=q.attributes,s=r.type;
-if(!s)r.type='text';if(s=='checkbox'||s=='radio')r.value=='on'&&delete r.value;}}});if(p)p.addRules({elements:{input:function(q){if(q.attributes.type=='hidden')return m.createFakeParserElement(q,'cke_hidden','hiddenfield');}}});},requires:['image','fakeobjects']});if(c)h.prototype.hasAttribute=function(m){var p=this;var n=p.$.attributes.getNamedItem(m);if(p.getName()=='input')switch(m){case 'class':return p.$.className.length>0;case 'checked':return!!p.$.checked;case 'value':var o=p.getAttribute('type');return o=='checkbox'||o=='radio'?p.$.value!='on':p.$.value;}return!!(n&&n.specified);};(function(){var m={canUndo:false,exec:function(o){o.insertElement(o.document.createElement('hr'));}},n='horizontalrule';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('HorizontalRule',{label:o.lang.horizontalrule,command:n});}});})();(function(){var m=/^[\t\r\n ]*(?: |\xa0)$/,n='{cke_protected}';function o(R){var S=R.children.length,T=R.children[S-1];while(T&&T.type==3&&!e.trim(T.value))T=R.children[--S];return T;};function p(R,S){var T=R.children,U=o(R);if(U){if((S||!c)&&U.type==1&&U.name=='br')T.pop();if(U.type==3&&m.test(U.value))T.pop();}};function q(R,S,T){if(!S&&(!T||typeof T=='function'&&T(R)===false))return false;if(S&&c&&(document.documentMode>7||R.name in f.tr||R.name in f.$listItem))return false;var U=o(R);return!U||U&&(U.type==1&&U.name=='br'||R.name=='form'&&U.name=='input');};function r(R,S){return function(T){p(T,!R);if(q(T,!R,S))if(R||c)T.add(new a.htmlParser.text('\xa0'));else T.add(new a.htmlParser.element('br',{}));};};var s=f,t=e.extend({},s.$block,s.$listItem,s.$tableContent);for(var u in t){if(!('br' in s[u]))delete t[u];}delete t.pre;var v={elements:{a:function(R){var S=R.attributes;if(S&&S['data-cke-saved-name'])S['class']=(S['class']?S['class']+' ':'')+'cke_anchor';}},attributeNames:[[/^on/,'data-cke-pa-on']]},w={elements:{}};for(u in t)w.elements[u]=r();var x={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(R){var S=R.attributes;if(S){if(S['data-cke-temp'])return false;var T=['name','href','src'],U;for(var V=0;V<T.length;V++){U='data-cke-saved-'+T[V];U in S&&delete S[T[V]];}}return R;},embed:function(R){var S=R.parent;if(S&&S.name=='object'){var T=S.attributes.width,U=S.attributes.height;T&&(R.attributes.width=T);U&&(R.attributes.height=U);}},param:function(R){R.children=[];R.isEmpty=true;return R;},a:function(R){if(!(R.children.length||R.attributes.name||R.attributes['data-cke-saved-name']))return false;
-},span:function(R){if(R.attributes['class']=='Apple-style-span')delete R.name;},pre:function(R){c&&p(R);},html:function(R){delete R.attributes.contenteditable;delete R.attributes['class'];},body:function(R){delete R.attributes.spellcheck;delete R.attributes.contenteditable;},style:function(R){var S=R.children[0];S&&S.value&&(S.value=e.trim(S.value));if(!R.attributes.type)R.attributes.type='text/css';},title:function(R){var S=R.children[0];S&&(S.value=R.attributes['data-cke-title']||'');}},attributes:{'class':function(R,S){return e.ltrim(R.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}},comment:function(R){if(R.substr(0,n.length)==n){if(R.substr(n.length,3)=='{C}')R=R.substr(n.length+3);else R=R.substr(n.length);return new a.htmlParser.cdata(decodeURIComponent(R));}return R;}};if(c)x.attributes.style=function(R,S){return R.replace(/(^|;)([^\:]+)/g,function(T){return T.toLowerCase();});};function y(R){var S=R.attributes;if(S.contenteditable!='false')S['data-cke-editable']=S.contenteditable?'true':1;S.contenteditable='false';};function z(R){var S=R.attributes;switch(S['data-cke-editable']){case 'true':S.contenteditable='true';break;case '1':delete S.contenteditable;break;}};for(u in {input:1,textarea:1}){v.elements[u]=y;x.elements[u]=z;}var A=/<(a|area|img|input)\b([^>]*)>/gi,B=/\b(href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,D=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,E=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,G=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function H(R){return R.replace(A,function(S,T,U){return '<'+T+U.replace(B,function(V,W){if(U.indexOf('data-cke-saved-'+W)==-1)return ' data-cke-saved-'+V+' '+V;return V;})+'>';});};function I(R){return R.replace(C,function(S){return '<cke:encoded>'+encodeURIComponent(S)+'</cke:encoded>';});};function J(R){return R.replace(D,function(S,T){return decodeURIComponent(T);});};function K(R){return R.replace(E,'$1cke:$2');};function L(R){return R.replace(F,'$1$2');};function M(R){return R.replace(G,'<cke:$1$2></cke:$1>');};function N(R){return R.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,'$1$2$2');};function O(R){return R.replace(/<!--(?!{cke_protected})[\s\S]+?-->/g,function(S){return '<!--'+n+'{C}'+encodeURIComponent(S).replace(/--/g,'%2D%2D')+'-->';});};function P(R){return R.replace(/<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g,function(S,T){return decodeURIComponent(T);
-});};function Q(R,S){var T=[],U=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,V=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(S);R=R.replace(/<!--[\s\S]*?-->/g,function(X){return '<!--{cke_tempcomment}'+(T.push(X)-1)+'-->';});for(var W=0;W<V.length;W++)R=R.replace(V[W],function(X){X=X.replace(U,function(Y,Z,aa){return T[aa];});return '<!--{cke_temp}'+(T.push(X)-1)+'-->';});R=R.replace(U,function(X,Y,Z){return '<!--'+n+(Y?'{C}':'')+encodeURIComponent(T[Z]).replace(/--/g,'%2D%2D')+'-->';});return R;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(R){var S=R.dataProcessor=new a.htmlDataProcessor(R);S.writer.forceSimpleAmpersand=R.config.forceSimpleAmpersand;S.dataFilter.addRules(v);S.dataFilter.addRules(w);S.htmlFilter.addRules(x);var T={elements:{}};for(u in t)T.elements[u]=r(true,R.config.fillEmptyBlocks);S.htmlFilter.addRules(T);},onLoad:function(){!('fillEmptyBlocks' in i)&&(i.fillEmptyBlocks=1);}});a.htmlDataProcessor=function(R){var S=this;S.editor=R;S.writer=new a.htmlWriter();S.dataFilter=new a.htmlParser.filter();S.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(R,S){R=Q(R,this.editor.config.protectedSource);R=H(R);R=I(R);R=K(R);R=M(R);R=N(R);var T=new h('div');T.setHtml('a'+R);R=T.getHtml().substr(1);R=L(R);R=J(R);R=P(R);var U=a.htmlParser.fragment.fromHtml(R,S),V=new a.htmlParser.basicWriter();U.writeHtml(V,this.dataFilter);R=V.getHtml(true);R=O(R);return R;},toDataFormat:function(R,S){var T=this.writer,U=a.htmlParser.fragment.fromHtml(R,S);T.reset();U.writeHtml(T,this.htmlFilter);return T.getHtml(true);}};})();(function(){function m(n,o){var p=n.createFakeParserElement(o,'cke_iframe','iframe',true),q=p.attributes.style||'',r=o.attributes.width,s=o.attributes.height;if(typeof r!='undefined')q+='width:'+e.cssLength(r)+';';if(typeof s!='undefined')q+='height:'+e.cssLength(s)+';';p.attributes.style=q;return p;};j.add('iframe',{requires:['dialog','fakeobjects'],init:function(n){var o='iframe',p=n.lang.iframe;a.dialog.add(o,this.path+'dialogs/iframe.js');n.addCommand(o,new a.dialogCommand(o));n.addCss('img.cke_iframe{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');n.ui.addButton('Iframe',{label:p.toolbar,command:o});n.on('doubleclick',function(q){var r=q.data.element;if(r.is('img')&&r.data('cke-real-element-type')=='iframe')q.data.dialog='iframe';
-});if(n.addMenuItems)n.addMenuItems({iframe:{label:p.title,command:'iframe',group:'image'}});if(n.contextMenu)n.contextMenu.addListener(function(q,r){if(q&&q.is('img')&&q.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(n){var o=n.dataProcessor,p=o&&o.dataFilter;if(p)p.addRules({elements:{iframe:function(q){return m(n,q);}}});}});})();j.add('image',{init:function(m){var n='image';a.dialog.add(n,this.path+'dialogs/image.js');m.addCommand(n,new a.dialogCommand(n));m.ui.addButton('Image',{label:m.lang.common.image,command:n});m.on('doubleclick',function(o){var p=o.data.element;if(p.is('img')&&!p.data('cke-realelement'))o.data.dialog='image';});if(m.addMenuItems)m.addMenuItems({image:{label:m.lang.image.menu,command:'image',group:'image'}});if(m.contextMenu)m.contextMenu.addListener(function(o,p){if(!o||!o.is('img')||o.data('cke-realelement')||o.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var m={ol:1,ul:1},n=d.walker.whitespaces(true),o=d.walker.bookmark(false,true);function p(t){var C=this;var u=t.editor,v=t.data.path,w=v&&v.contains(m);if(w)return C.setState(2);if(!C.useIndentClasses&&C.name=='indent')return C.setState(2);var x=t.data.path,y=x.block||x.blockLimit;if(!y)return C.setState(0);if(C.useIndentClasses){var z=y.$.className.match(C.classNameRegex),A=0;if(z){z=z[1];A=C.indentClassMap[z];}if(C.name=='outdent'&&!A||C.name=='indent'&&A==u.config.indentClasses.length)return C.setState(0);return C.setState(2);}else{var B=parseInt(y.getStyle(r(y)),10);if(isNaN(B))B=0;if(B<=0)return C.setState(0);return C.setState(2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');w.indentClassMap={};for(var v=0;v<t.config.indentClasses.length;v++)w.indentClassMap[t.config.indentClasses[v]]=v+1;}w.startDisabled=u=='outdent';};function r(t,u){return(u||t.getComputedStyle('direction'))=='ltr'?'margin-left':'margin-right';};function s(t){return t.type=1&&t.is('li');};q.prototype={exec:function(t){var u=this,v={};function w(M){var N=C.startContainer,O=C.endContainer;while(N&&!N.getParent().equals(M))N=N.getParent();while(O&&!O.getParent().equals(M))O=O.getParent();if(!N||!O)return;var P=N,Q=[],R=false;while(!R){if(P.equals(O))R=true;Q.push(P);P=P.getNext();}if(Q.length<1)return;var S=M.getParents(true);for(var T=0;T<S.length;
-T++){if(S[T].getName&&m[S[T].getName()]){M=S[T];break;}}var U=u.name=='indent'?1:-1,V=Q[0],W=Q[Q.length-1],X=j.list.listToArray(M,v),Y=X[W.getCustomData('listarray_index')].indent;for(T=V.getCustomData('listarray_index');T<=W.getCustomData('listarray_index');T++){X[T].indent+=U;var Z=X[T].parent;X[T].parent=new h(Z.getName(),Z.getDocument());}for(T=W.getCustomData('listarray_index')+1;T<X.length&&X[T].indent>Y;T++)X[T].indent+=U;var aa=j.list.arrayToList(X,v,null,t.config.enterMode,M.getDirection());if(u.name=='outdent'){var ab;if((ab=M.getParent())&&ab.is('li')){var ac=aa.listNode.getChildren(),ad=[],ae=ac.count(),af;for(T=ae-1;T>=0;T--){if((af=ac.getItem(T))&&af.is&&af.is('li'))ad.push(af);}}}if(aa)aa.listNode.replace(M);if(ad&&ad.length)for(T=0;T<ad.length;T++){var ag=ad[T],ah=ag;while((ah=ah.getNext())&&ah.is&&ah.getName() in m){if(c&&!ag.getFirst(function(ai){return n(ai)&&o(ai);}))ag.append(C.document.createText('\xa0'));ag.append(ah);}ag.insertAfter(ab);}};function x(){var M=C.createIterator(),N=t.config.enterMode;M.enforceRealBlocks=true;M.enlargeBr=N!=2;var O;while(O=M.getNextParagraph(N==1?'p':'div'))y(O);};function y(M,N){if(M.getCustomData('indent_processed'))return false;if(u.useIndentClasses){var O=M.$.className.match(u.classNameRegex),P=0;if(O){O=O[1];P=u.indentClassMap[O];}if(u.name=='outdent')P--;else P++;if(P<0)return false;P=Math.min(P,t.config.indentClasses.length);P=Math.max(P,0);M.$.className=e.ltrim(M.$.className.replace(u.classNameRegex,''));if(P>0)M.addClass(t.config.indentClasses[P-1]);}else{var Q=r(M,N),R=parseInt(M.getStyle(Q),10);if(isNaN(R))R=0;var S=t.config.indentOffset||40;R+=(u.name=='indent'?1:-1)*S;if(R<0)return false;R=Math.max(R,0);R=Math.ceil(R/S)*S;M.setStyle(Q,R?R+(t.config.indentUnit||'px'):'');if(M.getAttribute('style')==='')M.removeAttribute('style');}h.setMarker(v,M,'indent_processed',1);return true;};var z=t.getSelection(),A=z.createBookmarks(1),B=z&&z.getRanges(1),C,D=B.createIterator();while(C=D.getNextRange()){var E=C.getCommonAncestor(),F=E;while(F&&!(F.type==1&&m[F.getName()]))F=F.getParent();if(!F){var G=C.getEnclosedNode();if(G&&G.type==1&&G.getName() in m){C.setStartAt(G,1);C.setEndAt(G,2);F=G;}}if(F&&C.startContainer.type==1&&C.startContainer.getName() in m){var H=new d.walker(C);H.evaluator=s;C.startContainer=H.next();}if(F&&C.endContainer.type==1&&C.endContainer.getName() in m){H=new d.walker(C);H.evaluator=s;C.endContainer=H.previous();}if(F){var I=F.getFirst(s),J=!!I.getNext(s),K=C.startContainer,L=I.equals(K)||I.contains(K);
-if(!(L&&(u.name=='indent'||u.useIndentClasses||parseInt(F.getStyle(r(F)),10))&&y(F,!J&&I.getDirection())))w(F);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=t.addCommand('indent',new q(t,'indent')),v=t.addCommand('outdent',new q(t,'outdent'));t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');t.on('dirChanged',function(w){var x=new d.range(t.document);x.setStartBefore(w.data.node);x.setEndAfter(w.data.node);var y=new d.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(w.data.node)&&z.getDirection()){x.setStartAfter(z);y=new d.walker(x);continue;}var A=t.config.indentClasses;if(A){var B=w.data.dir=='ltr'?['_rtl','']:['','_rtl'];for(var C=0;C<A.length;C++){if(z.hasClass(A[C]+B[0])){z.removeClass(A[C]+B[0]);z.addClass(A[C]+B[1]);}}}var D=z.getStyle('margin-right'),E=z.getStyle('margin-left');D?z.setStyle('margin-left',D):z.removeStyle('margin-left');E?z.setStyle('margin-right',E):z.removeStyle('margin-right');}}});},requires:['domiterator','list']});})();(function(){function m(r,s){var t=s.block||s.blockLimit;if(!t||t.getName()=='body')return 2;return n(t,r.config.useComputedState)==this.value?1:2;};function n(r,s){s=s===undefined||s;var t;if(s)t=r.getComputedStyle('text-align');else{while(!r.hasAttribute||!(r.hasAttribute('align')||r.getStyle('text-align'))){var u=r.getParent();if(!u)break;r=u;}t=r.getStyle('text-align')||r.getAttribute('align')||'';}t&&(t=t.replace(/-moz-|-webkit-|start|auto/i,''));!t&&s&&(t=r.getComputedStyle('direction')=='rtl'?'right':'left');return t;};function o(r){var s=r.editor.getCommand(this.name);s.state=m.call(this,r.editor,r.data.path);s.fire('state');};function p(r,s,t){var v=this;v.name=s;v.value=t;var u=r.config.justifyClasses;if(u){switch(t){case 'left':v.cssClassName=u[0];break;case 'center':v.cssClassName=u[1];break;case 'right':v.cssClassName=u[2];break;case 'justify':v.cssClassName=u[3];break;}v.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+u.join('|')+')(?=$|\\s)');}};function q(r){var s=r.editor,t=new d.range(s.document);t.setStartBefore(r.data.node);t.setEndAfter(r.data.node);var u=new d.walker(t),v;while(v=u.next()){if(v.type==1){if(!v.equals(r.data.node)&&v.getDirection()){t.setStartAfter(v);u=new d.walker(t);
-continue;}var w=s.config.justifyClasses;if(w)if(v.hasClass(w[0])){v.removeClass(w[0]);v.addClass(w[2]);}else if(v.hasClass(w[2])){v.removeClass(w[2]);v.addClass(w[0]);}var x='text-align',y=v.getStyle(x);if(y=='left')v.setStyle(x,'right');else if(y=='right')v.setStyle(x,'left');}}};p.prototype={exec:function(r){var D=this;var s=r.getSelection(),t=r.config.enterMode;if(!s)return;var u=s.createBookmarks(),v=s.getRanges(true),w=D.cssClassName,x,y,z=r.config.useComputedState;z=z===undefined||z;for(var A=v.length-1;A>=0;A--){x=v[A].createIterator();x.enlargeBr=t!=2;while(y=x.getNextParagraph(t==1?'p':'div')){y.removeAttribute('align');y.removeStyle('text-align');var B=w&&(y.$.className=e.ltrim(y.$.className.replace(D.cssClassRegex,''))),C=D.state==2&&(!z||n(y,true)!=D.value);if(w){if(C)y.addClass(w);else if(!B)y.removeAttribute('class');}else if(C)y.setStyle('text-align',D.value);}}r.focus();r.forceNextSelectionCheck();s.selectBookmarks(u);}};j.add('justify',{init:function(r){var s=new p(r,'justifyleft','left'),t=new p(r,'justifycenter','center'),u=new p(r,'justifyright','right'),v=new p(r,'justifyblock','justify');r.addCommand('justifyleft',s);r.addCommand('justifycenter',t);r.addCommand('justifyright',u);r.addCommand('justifyblock',v);r.ui.addButton('JustifyLeft',{label:r.lang.justify.left,command:'justifyleft'});r.ui.addButton('JustifyCenter',{label:r.lang.justify.center,command:'justifycenter'});r.ui.addButton('JustifyRight',{label:r.lang.justify.right,command:'justifyright'});r.ui.addButton('JustifyBlock',{label:r.lang.justify.block,command:'justifyblock'});r.on('selectionChange',e.bind(o,s));r.on('selectionChange',e.bind(o,u));r.on('selectionChange',e.bind(o,t));r.on('selectionChange',e.bind(o,v));r.on('dirChanged',q);},requires:['domiterator']});})();j.add('keystrokes',{beforeInit:function(m){m.keystrokeHandler=new a.keystrokeHandler(m);m.specialKeys={};},init:function(m){var n=m.config.keystrokes,o=m.config.blockedKeystrokes,p=m.keystrokeHandler.keystrokes,q=m.keystrokeHandler.blockedKeystrokes;for(var r=0;r<n.length;r++)p[n[r][0]]=n[r][1];for(r=0;r<o.length;r++)q[o[r]]=1;}});a.keystrokeHandler=function(m){var n=this;if(m.keystrokeHandler)return m.keystrokeHandler;n.keystrokes={};n.blockedKeystrokes={};n._={editor:m};return n;};(function(){var m,n=function(p){p=p.data;var q=p.getKeystroke(),r=this.keystrokes[q],s=this._.editor;m=s.fire('key',{keyCode:q})===true;if(!m){if(r){var t={from:'keystrokeHandler'};m=s.execCommand(r,t)!==false;}if(!m){var u=s.specialKeys[q];
-m=u&&u(s)===true;if(!m)m=!!this.blockedKeystrokes[q];}}if(m)p.preventDefault(true);return!m;},o=function(p){if(m){m=false;p.data.preventDefault(true);}};a.keystrokeHandler.prototype={attach:function(p){p.on('keydown',n,this);if(b.opera||b.gecko&&b.mac)p.on('keypress',o,this);}};})();i.blockedKeystrokes=[1000+66,1000+73,1000+85];i.keystrokes=[[4000+121,'toolbarFocus'],[4000+122,'elementsPathFocus'],[2000+121,'contextMenu'],[1000+2000+121,'contextMenu'],[1000+90,'undo'],[1000+89,'redo'],[1000+2000+90,'redo'],[1000+76,'link'],[1000+66,'bold'],[1000+73,'italic'],[1000+85,'underline'],[4000+109,'toolbarCollapse'],[4000+48,'a11yHelp']];j.add('link',{init:function(m){m.addCommand('link',new a.dialogCommand('link'));m.addCommand('anchor',new a.dialogCommand('anchor'));m.addCommand('unlink',new a.unlinkCommand());m.ui.addButton('Link',{label:m.lang.link.toolbar,command:'link'});m.ui.addButton('Unlink',{label:m.lang.unlink,command:'unlink'});m.ui.addButton('Anchor',{label:m.lang.anchor.toolbar,command:'anchor'});a.dialog.add('link',this.path+'dialogs/link.js');a.dialog.add('anchor',this.path+'dialogs/anchor.js');var n=m.lang.dir=='rtl'?'right':'left';m.addCss('img.cke_anchor{background-image: url('+a.getUrl(this.path+'images/anchor.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 18px !important;'+'height: 18px !important;'+'}\n'+'a.cke_anchor'+'{'+'background-image: url('+a.getUrl(this.path+'images/anchor.gif')+');'+'background-position: '+n+' center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'padding-'+n+': 18px;'+'}');m.on('selectionChange',function(o){var p=m.getCommand('unlink'),q=o.data.path.lastElement&&o.data.path.lastElement.getAscendant('a',true);if(q&&q.getName()=='a'&&q.getAttribute('href'))p.setState(2);else p.setState(0);});m.on('doubleclick',function(o){var p=j.link.getSelectedLink(m)||o.data.element;if(!p.isReadOnly())if(p.is('a'))o.data.dialog=p.getAttribute('name')&&!p.getAttribute('href')?'anchor':'link';else if(p.is('img')&&p.data('cke-real-element-type')=='anchor')o.data.dialog='anchor';});if(m.addMenuItems)m.addMenuItems({anchor:{label:m.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:m.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:m.lang.unlink,command:'unlink',group:'link',order:5}});if(m.contextMenu)m.contextMenu.addListener(function(o,p){if(!o||o.isReadOnly())return null;var q=o.is('img')&&o.data('cke-real-element-type')=='anchor';
-if(!q){if(!(o=j.link.getSelectedLink(m)))return null;q=o.getAttribute('name')&&!o.getAttribute('href');}return q?{anchor:2}:{link:2,unlink:2};});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter;if(o)o.addRules({elements:{a:function(p){var q=p.attributes;if(q.name&&!q.href)return m.createFakeParserElement(p,'cke_anchor','anchor');}}});},requires:['fakeobjects']});j.link={getSelectedLink:function(m){try{var n=m.getSelection();if(n.getType()==3){var o=n.getSelectedElement();if(o.is('a'))return o;}var p=n.getRanges(true)[0];p.shrink(2);var q=p.getCommonAncestor();return q.getAscendant('a',true);}catch(r){return null;}}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p=n.getRanges(),q,r;for(var s=0;s<p.length;s++){q=p[s].getCommonAncestor(true);r=q.getAscendant('a',true);if(!r)continue;p[s].selectNodeContents(r);}n.selectRanges(p);m.document.$.execCommand('unlink',false,null);n.selectBookmarks(o);},startDisabled:true};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var m={ol:1,ul:1},n=/^[\n\r\t ]*$/,o=d.walker.whitespaces(),p=d.walker.bookmark(),q=function(E){return!(o(E)||p(E));};j.list={listToArray:function(E,F,G,H,I){if(!m[E.getName()])return[];if(!H)H=0;if(!G)G=[];for(var J=0,K=E.getChildCount();J<K;J++){var L=E.getChild(J);if(L.$.nodeName.toLowerCase()!='li')continue;var M={parent:E,indent:H,element:L,contents:[]};if(!I){M.grandparent=E.getParent();if(M.grandparent&&M.grandparent.$.nodeName.toLowerCase()=='li')M.grandparent=M.grandparent.getParent();}else M.grandparent=I;if(F)h.setMarker(F,L,'listarray_index',G.length);G.push(M);for(var N=0,O=L.getChildCount(),P;N<O;N++){P=L.getChild(N);if(P.type==1&&m[P.getName()])j.list.listToArray(P,F,G,H+1,M.grandparent);else M.contents.push(P);}}return G;},arrayToList:function(E,F,G,H,I){if(!G)G=0;if(!E||E.length<G+1)return null;var J=E[G].parent.getDocument(),K=new d.documentFragment(J),L=null,M=G,N=Math.max(E[G].indent,0),O=null,P=H==1?'p':'div';while(1){var Q=E[M];if(Q.indent==N){if(!L||E[M].parent.getName()!=L.getName()){L=E[M].parent.clone(false,1);I&&L.setAttribute('dir',I);K.append(L);}O=L.append(Q.element.clone(0,1));for(var R=0;R<Q.contents.length;R++)O.append(Q.contents[R].clone(1,1));M++;}else if(Q.indent==Math.max(N,0)+1){var S=j.list.arrayToList(E,null,M,H);if(!O.getChildCount()&&c&&!(J.$.documentMode>7))O.append(J.createText('\xa0'));O.append(S.listNode);M=S.nextIndex;}else if(Q.indent==-1&&!G&&Q.grandparent){O;
-if(m[Q.grandparent.getName()])O=Q.element.clone(false,true);else if(I||Q.element.hasAttributes()||H!=2){O=J.createElement(P);Q.element.copyAttributes(O,{type:1,value:1});var T=Q.element.getDirection()||I;T&&O.setAttribute('dir',T);if(!I&&H==2&&!O.hasAttributes())O=new d.documentFragment(J);}else O=new d.documentFragment(J);for(R=0;R<Q.contents.length;R++)O.append(Q.contents[R].clone(1,1));if(O.type==11&&M!=E.length-1){var U=O.getLast();if(U&&U.type==1&&U.getAttribute('type')=='_moz')U.remove();if(!(U=O.getLast(q)&&U.type==1&&U.getName() in f.$block))O.append(J.createElement('br'));}if(O.type==1&&O.getName()==P&&O.$.firstChild){O.trim();var V=O.getFirst();if(V.type==1&&V.isBlockBoundary()){var W=new d.documentFragment(J);O.moveChildren(W);O=W;}}var X=O.$.nodeName.toLowerCase();if(!c&&(X=='div'||X=='p'))O.appendBogus();K.append(O);L=null;M++;}else return null;if(E.length<=M||Math.max(E[M].indent,0)<N)break;}if(F){var Y=K.getFirst();while(Y){if(Y.type==1)h.clearMarkers(F,Y);Y=Y.getNextSourceNode();}}return{listNode:K,nextIndex:M};}};function r(E){var F=E.data.path,G=F.blockLimit,H=F.elements,I,J;for(J=0;J<H.length&&(I=H[J])&&!I.equals(G);J++){if(m[H[J].getName()])return this.setState(this.type==H[J].getName()?1:2);}return this.setState(2);};function s(E,F,G,H){var I=j.list.listToArray(F.root,G),J=[];for(var K=0;K<F.contents.length;K++){var L=F.contents[K];L=L.getAscendant('li',true);if(!L||L.getCustomData('list_item_processed'))continue;J.push(L);h.setMarker(G,L,'list_item_processed',true);}var M=F.root,N=M.getDocument().createElement(this.type);M.copyAttributes(N,{start:1,type:1});N.removeStyle('list-style-type');for(K=0;K<J.length;K++){var O=J[K].getCustomData('listarray_index');I[O].parent=N;}var P=j.list.arrayToList(I,G,null,E.config.enterMode),Q,R=P.listNode.getChildCount();for(K=0;K<R&&(Q=P.listNode.getChild(K));K++){if(Q.getName()==this.type)H.push(Q);}P.listNode.replace(F.root);};var t=/^h[1-6]$/;function u(E,F,G){var H=F.contents,I=F.root.getDocument(),J=[];if(H.length==1&&H[0].equals(F.root)){var K=I.createElement('div');H[0].moveChildren&&H[0].moveChildren(K);H[0].append(K);H[0]=K;}var L=F.contents[0].getParent();for(var M=0;M<H.length;M++)L=L.getCommonAncestor(H[M].getParent());var N=E.config.useComputedState,O,P;N=N===undefined||N;for(M=0;M<H.length;M++){var Q=H[M],R;while(R=Q.getParent()){if(R.equals(L)){J.push(Q);if(!P&&Q.getDirection())P=1;var S=Q.getDirection(N);if(O!==null)if(O&&O!=S)O=null;else O=S;break;}Q=R;}}if(J.length<1)return;var T=J[J.length-1].getNext(),U=I.createElement(this.type);
-G.push(U);var V,W;while(J.length){V=J.shift();W=I.createElement('li');if(V.is('pre')||t.test(V.getName()))V.appendTo(W);else{if(O&&V.getDirection()){V.removeStyle('direction');V.removeAttribute('dir');}V.copyAttributes(W);V.moveChildren(W);V.remove();}W.appendTo(U);}if(O&&P)U.setAttribute('dir',O);if(T)U.insertBefore(T);else U.appendTo(L);};function v(E,F,G){var H=j.list.listToArray(F.root,G),I=[];for(var J=0;J<F.contents.length;J++){var K=F.contents[J];K=K.getAscendant('li',true);if(!K||K.getCustomData('list_item_processed'))continue;I.push(K);h.setMarker(G,K,'list_item_processed',true);}var L=null;for(J=0;J<I.length;J++){var M=I[J].getCustomData('listarray_index');H[M].indent=-1;L=M;}for(J=L+1;J<H.length;J++){if(H[J].indent>H[J-1].indent+1){var N=H[J-1].indent+1-H[J].indent,O=H[J].indent;while(H[J]&&H[J].indent>=O){H[J].indent+=N;J++;}J--;}}var P=j.list.arrayToList(H,G,null,E.config.enterMode,F.root.getAttribute('dir')),Q=P.listNode,R,S;function T(U){if((R=Q[U?'getFirst':'getLast']())&&!(R.is&&R.isBlockBoundary())&&(S=F.root[U?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(S.is&&S.isBlockBoundary({br:1})))E.document.createElement('br')[U?'insertBefore':'insertAfter'](R);};T(true);T();Q.replace(F.root);};function w(E,F){this.name=E;this.type=F;};w.prototype={exec:function(E){E.focus();var F=E.document,G=E.getSelection(),H=G&&G.getRanges(true);if(!H||H.length<1)return;if(this.state==2){var I=F.getBody();I.trim();if(!I.getFirst()){var J=F.createElement(E.config.enterMode==1?'p':E.config.enterMode==3?'div':'br');J.appendTo(I);H=new d.rangeList([new d.range(F)]);if(J.is('br')){H[0].setStartBefore(J);H[0].setEndAfter(J);}else H[0].selectNodeContents(J);G.selectRanges(H);}else{var K=H.length==1&&H[0],L=K&&K.getEnclosedNode();if(L&&L.is&&this.type==L.getName())this.setState(1);}}var M=G.createBookmarks(true),N=[],O={},P=H.createIterator(),Q=0;while((K=P.getNextRange())&&++Q){var R=K.getBoundaryNodes(),S=R.startNode,T=R.endNode;if(S.type==1&&S.getName()=='td')K.setStartAt(R.startNode,1);if(T.type==1&&T.getName()=='td')K.setEndAt(R.endNode,2);var U=K.createIterator(),V;U.forceBrBreak=this.state==2;while(V=U.getNextParagraph()){if(V.getCustomData('list_block'))continue;else h.setMarker(O,V,'list_block',1);var W=new d.elementPath(V),X=W.elements,Y=X.length,Z=null,aa=0,ab=W.blockLimit,ac;for(var ad=Y-1;ad>=0&&(ac=X[ad]);ad--){if(m[ac.getName()]&&ab.contains(ac)){ab.removeCustomData('list_group_object_'+Q);var ae=ac.getCustomData('list_group_object');if(ae)ae.contents.push(V);
-else{ae={root:ac,contents:[V]};N.push(ae);h.setMarker(O,ac,'list_group_object',ae);}aa=1;break;}}if(aa)continue;var af=ab;if(af.getCustomData('list_group_object_'+Q))af.getCustomData('list_group_object_'+Q).contents.push(V);else{ae={root:af,contents:[V]};h.setMarker(O,af,'list_group_object_'+Q,ae);N.push(ae);}}}var ag=[];while(N.length>0){ae=N.shift();if(this.state==2){if(m[ae.root.getName()])s.call(this,E,ae,O,ag);else u.call(this,E,ae,ag);}else if(this.state==1&&m[ae.root.getName()])v.call(this,E,ae,O);}for(ad=0;ad<ag.length;ad++){Z=ag[ad];var ah,ai=this;(ah=function(aj){var ak=Z[aj?'getPrevious':'getNext'](d.walker.whitespaces(true));if(ak&&ak.getName&&ak.getName()==ai.type){ak.remove();ak.moveChildren(Z,aj);}})();ah(1);}h.clearAllMarkers(O);G.selectBookmarks(M);E.focus();}};var x=f,y=/[\t\r\n ]*(?: |\xa0)$/;function z(E,F){var G,H=E.children,I=H.length;for(var J=0;J<I;J++){G=H[J];if(G.name&&G.name in F)return J;}return I;};function A(E){return function(F){var G=F.children,H=z(F,x.$list),I=G[H],J=I&&I.previous,K;if(J&&(J.name&&J.name=='br'||J.value&&(K=J.value.match(y)))){var L=J;if(!(K&&K.index)&&L==G[0])G[0]=E||c?new a.htmlParser.text('\xa0'):new a.htmlParser.element('br',{});else if(L.name=='br')G.splice(H-1,1);else L.value=L.value.replace(y,'');}};};var B={elements:{}};for(var C in x.$listItem)B.elements[C]=A();var D={elements:{}};for(C in x.$listItem)D.elements[C]=A(true);j.add('list',{init:function(E){var F=E.addCommand('numberedlist',new w('numberedlist','ol')),G=E.addCommand('bulletedlist',new w('bulletedlist','ul'));E.ui.addButton('NumberedList',{label:E.lang.numberedlist,command:'numberedlist'});E.ui.addButton('BulletedList',{label:E.lang.bulletedlist,command:'bulletedlist'});E.on('selectionChange',e.bind(r,F));E.on('selectionChange',e.bind(r,G));},afterInit:function(E){var F=E.dataProcessor;if(F){F.dataFilter.addRules(B);F.htmlFilter.addRules(D);}},requires:['domiterator']});})();(function(){j.liststyle={requires:['dialog'],init:function(m){m.addCommand('numberedListStyle',new a.dialogCommand('numberedListStyle'));a.dialog.add('numberedListStyle',this.path+'dialogs/liststyle.js');m.addCommand('bulletedListStyle',new a.dialogCommand('bulletedListStyle'));a.dialog.add('bulletedListStyle',this.path+'dialogs/liststyle.js');if(m.addMenuItems){m.addMenuGroup('list',108);m.addMenuItems({numberedlist:{label:m.lang.list.numberedTitle,group:'list',command:'numberedListStyle'},bulletedlist:{label:m.lang.list.bulletedTitle,group:'list',command:'bulletedListStyle'}});
-}if(m.contextMenu)m.contextMenu.addListener(function(n,o){if(!n||n.isReadOnly())return null;while(n){var p=n.getName();if(p=='ol')return{numberedlist:2};else if(p=='ul')return{bulletedlist:2};n=n.getParent();}return null;});}};j.add('liststyle',j.liststyle);})();(function(){function m(s){if(!s||s.type!=1||s.getName()!='form')return[];var t=[],u=['style','className'];for(var v=0;v<u.length;v++){var w=u[v],x=s.$.elements.namedItem(w);if(x){var y=new h(x);t.push([y,y.nextSibling]);y.remove();}}return t;};function n(s,t){if(!s||s.type!=1||s.getName()!='form')return;if(t.length>0)for(var u=t.length-1;u>=0;u--){var v=t[u][0],w=t[u][1];if(w)v.insertBefore(w);else v.appendTo(s);}};function o(s,t){var u=m(s),v={},w=s.$;if(!t){v['class']=w.className||'';w.className='';}v.inline=w.style.cssText||'';if(!t)w.style.cssText='position: static; overflow: visible';n(u);return v;};function p(s,t){var u=m(s),v=s.$;if('class' in t)v.className=t['class'];if('inline' in t)v.style.cssText=t.inline;n(u);};function q(s){var t=a.instances;for(var u in t){var v=t[u];if(v.mode=='wysiwyg'){var w=v.document.getBody();w.setAttribute('contentEditable',false);w.setAttribute('contentEditable',true);}}if(s.focusManager.hasFocus){s.toolbox.focus();s.focus();}};function r(s){if(!c||b.version>6)return null;var t=h.createFromHtml('<iframe frameborder="0" tabindex="-1" src="javascript:void((function(){document.open();'+(b.isCustomDomain()?"document.domain='"+this.getDocument().$.domain+"';":'')+'document.close();'+'})())"'+' style="display:block;position:absolute;z-index:-1;'+'progid:DXImageTransform.Microsoft.Alpha(opacity=0);'+'"></iframe>');return s.append(t,true);};j.add('maximize',{init:function(s){var t=s.lang,u=a.document,v=u.getWindow(),w,x,y,z;function A(){var C=v.getViewPaneSize();z&&z.setStyles({width:C.width+'px',height:C.height+'px'});s.resize(C.width,C.height,null,true);};var B=2;s.addCommand('maximize',{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(){var C=s.container.getChild(1),D=s.getThemeSpace('contents');if(s.mode=='wysiwyg'){var E=s.getSelection();w=E&&E.getRanges();x=v.getScrollPosition();}else{var F=s.textarea.$;w=!c&&[F.selectionStart,F.selectionEnd];x=[F.scrollLeft,F.scrollTop];}if(this.state==2){v.on('resize',A);y=v.getScrollPosition();var G=s.container;while(G=G.getParent()){G.setCustomData('maximize_saved_styles',o(G));G.setStyle('z-index',s.config.baseFloatZIndex-1);}D.setCustomData('maximize_saved_styles',o(D,true));C.setCustomData('maximize_saved_styles',o(C,true));
-var H={overflow:b.webkit?'':'hidden',width:0,height:0};u.getDocumentElement().setStyles(H);!b.gecko&&u.getDocumentElement().setStyle('position','fixed');u.getBody().setStyles(H);c?setTimeout(function(){v.$.scrollTo(0,0);},0):v.$.scrollTo(0,0);C.setStyle('position','absolute');C.$.offsetLeft;C.setStyles({'z-index':s.config.baseFloatZIndex-1,left:'0px',top:'0px'});z=r(C);C.addClass('cke_maximized');A();var I=C.getDocumentPosition();C.setStyles({left:-1*I.x+'px',top:-1*I.y+'px'});b.gecko&&q(s);}else if(this.state==1){v.removeListener('resize',A);var J=[D,C];for(var K=0;K<J.length;K++){p(J[K],J[K].getCustomData('maximize_saved_styles'));J[K].removeCustomData('maximize_saved_styles');}G=s.container;while(G=G.getParent()){p(G,G.getCustomData('maximize_saved_styles'));G.removeCustomData('maximize_saved_styles');}c?setTimeout(function(){v.$.scrollTo(y.x,y.y);},0):v.$.scrollTo(y.x,y.y);C.removeClass('cke_maximized');if(b.webkit){C.setStyle('display','inline');setTimeout(function(){C.setStyle('display','block');},0);}if(z){z.remove();z=null;}s.fire('resize');}this.toggleState();var L=this.uiItems[0];if(L){var M=this.state==2?t.maximize:t.minimize,N=s.element.getDocument().getById(L._.id);N.getChild(1).setHtml(M);N.setAttribute('title',M);N.setAttribute('href','javascript:void("'+M+'");');}if(s.mode=='wysiwyg'){if(w){b.gecko&&q(s);s.getSelection().selectRanges(w);var O=s.getSelection().getStartElement();O&&O.scrollIntoView(true);}else v.$.scrollTo(x.x,x.y);}else{if(w){F.selectionStart=w[0];F.selectionEnd=w[1];}F.scrollLeft=x[0];F.scrollTop=x[1];}w=x=null;B=this.state;},canUndo:false});s.ui.addButton('Maximize',{label:t.maximize,command:'maximize'});s.on('mode',function(){var C=s.getCommand('maximize');C.setState(C.state==0?0:B);},null,null,100);}});})();j.add('newpage',{init:function(m){m.addCommand('newpage',{modes:{wysiwyg:1,source:1},exec:function(n){var o=this;n.setData(n.config.newpage_html||'',function(){setTimeout(function(){n.fire('afterCommandExec',{name:o.name,command:o});},200);});n.focus();},async:true});m.ui.addButton('NewPage',{label:m.lang.newPage,command:'newpage'});}});j.add('pagebreak',{init:function(m){m.addCommand('pagebreak',j.pagebreakCmd);m.ui.addButton('PageBreak',{label:m.lang.pagebreak,command:'pagebreak'});m.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width:100% !important; _width:99.9% !important;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px !important;'+'page-break-after: always;'+'}');
-},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter;if(o)o.addRules({elements:{div:function(p){var q=p.attributes,r=q&&q.style,s=r&&p.children.length==1&&p.children[0],t=s&&s.name=='span'&&s.attributes.style;if(t&&/page-break-after\s*:\s*always/i.test(r)&&/display\s*:\s*none/i.test(t)){var u=m.createFakeParserElement(p,'cke_pagebreak','div'),v=m.lang.pagebreakAlt;u.attributes.alt=v;u.attributes['aria-label']=v;return u;}}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(m){var n=m.lang.pagebreakAlt,o=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;"> </span></div>');o=m.createFakeElement(o,'cke_pagebreak','div');o.setAttributes({alt:n,'aria-label':n,title:n});var p=m.getSelection().getRanges(true);m.fire('saveSnapshot');for(var q,r=p.length-1;r>=0;r--){q=p[r];if(r<p.length-1)o=o.clone(true);q.splitBlock('p');q.insertNode(o);if(r==p.length-1){q.moveToPosition(o,4);q.select();}var s=o.getPrevious();if(s&&f[s.getName()].div)o.move(s);}m.fire('saveSnapshot');}};(function(){j.add('pastefromword',{init:function(m){var n=0,o=function(){setTimeout(function(){n=0;},0);};m.addCommand('pastefromword',{canUndo:false,exec:function(){n=1;if(m.execCommand('paste')===false)m.on('dialogHide',function(p){p.removeListener();o();});else o();}});m.ui.addButton('PasteFromWord',{label:m.lang.pastefromword.toolbar,command:'pastefromword'});m.on('pasteState',function(p){m.getCommand('pastefromword').setState(p.data);});m.on('paste',function(p){var q=p.data,r;if((r=q.html)&&(n||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(r))){var s=this.loadFilterRules(function(){if(s)m.fire('paste',q);else if(!m.config.pasteFromWordPromptCleanup||n||confirm(m.lang.pastefromword.confirmCleanup))q.html=a.cleanWord(r,m);});s&&p.cancel();}},this);},loadFilterRules:function(m){var n=a.cleanWord;if(n)m();else{var o=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(o,m,null,true);}return!n;},requires:['clipboard']});})();(function(){var m={exec:function(n){var o=e.tryThese(function(){var p=window.clipboardData.getData('Text');if(!p)throw 0;return p;});if(!o){n.openDialog('pastetext');return false;}else n.fire('paste',{text:o});return true;}};j.add('pastetext',{init:function(n){var o='pastetext',p=n.addCommand(o,m);n.ui.addButton('PasteText',{label:n.lang.pasteText.button,command:o});a.dialog.add(o,a.getUrl(this.path+'dialogs/pastetext.js'));if(n.config.forcePasteAsPlainText)n.on('beforeCommandExec',function(q){if(q.data.name=='paste'){n.execCommand('pastetext');
-q.cancel();}},null,null,0);n.on('pasteState',function(q){n.getCommand('pastetext').setState(q.data);});},requires:['clipboard']});})();j.add('popup');e.extend(a.editor.prototype,{popup:function(m,n,o,p){n=n||'80%';o=o||'70%';if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.width*parseInt(n,10)/100,10);if(typeof o=='string'&&o.length>1&&o.substr(o.length-1,1)=='%')o=parseInt(window.screen.height*parseInt(o,10)/100,10);if(n<640)n=640;if(o<420)o=420;var q=parseInt((window.screen.height-o)/2,10),r=parseInt((window.screen.width-n)/2,10);p=(p||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+n+',height='+o+',top='+q+',left='+r;var s=window.open('',null,p,true);if(!s)return false;try{s.moveTo(r,q);s.resizeTo(n,o);s.focus();s.location.href=m;}catch(t){s=window.open(m,null,p,true);}return true;}});(function(){var m={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(o){var p,q=o.config,r=q.baseHref?'<base href="'+q.baseHref+'"/>':'',s=b.isCustomDomain();if(q.fullPage)p=o.getData().replace(/<head>/,'$&'+r).replace(/[^>]*(?=<\/title>)/,'$& — '+o.lang.preview);else{var t='<body ',u=o.document&&o.document.getBody();if(u){if(u.getAttribute('id'))t+='id="'+u.getAttribute('id')+'" ';if(u.getAttribute('class'))t+='class="'+u.getAttribute('class')+'" ';}t+='>';p=o.config.docType+'<html dir="'+o.config.contentsLangDirection+'">'+'<head>'+r+'<title>'+o.lang.preview+'</title>'+e.buildStyleHtml(o.config.contentsCss)+'</head>'+t+o.getData()+'</body></html>';}var v=640,w=420,x=80;try{var y=window.screen;v=Math.round(y.width*0.8);w=Math.round(y.height*0.7);x=Math.round(y.width*0.1);}catch(B){}var z='';if(s){window._cke_htmlToLoad=p;z='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var A=window.open(z,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+v+',height='+w+',left='+x);if(!s){A.document.open();A.document.write(p);A.document.close();}}},n='preview';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('Preview',{label:o.lang.preview,command:n});}});})();j.add('print',{init:function(m){var n='print',o=m.addCommand(n,j.print);m.ui.addButton('Print',{label:m.lang.print,command:n});}});j.print={exec:function(m){if(b.opera)return;else if(b.gecko)m.window.$.print();
-else m.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(m){m.addCommand('removeFormat',j.removeformat.commands.removeformat);m.ui.addButton('RemoveFormat',{label:m.lang.removeFormat,command:'removeFormat'});m._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(m){var n=m._.removeFormatRegex||(m._.removeFormatRegex=new RegExp('^(?:'+m.config.removeFormatTags.replace(/,/g,'|')+')$','i')),o=m._.removeAttributes||(m._.removeAttributes=m.config.removeFormatAttributes.split(',')),p=j.removeformat.filter,q=m.getSelection().getRanges(1),r=q.createIterator(),s;while(s=r.getNextRange()){if(!s.collapsed)s.enlarge(1);var t=s.createBookmark(),u=t.startNode,v=t.endNode,w,x=function(z){var A=new d.elementPath(z),B=A.elements;for(var C=1,D;D=B[C];C++){if(D.equals(A.block)||D.equals(A.blockLimit))break;if(n.test(D.getName())&&p(m,D))z.breakParent(D);}};x(u);if(v){x(v);w=u.getNextSourceNode(true,1);while(w){if(w.equals(v))break;var y=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.data('cke-realelement'))&&p(m,w))if(n.test(w.getName()))w.remove(1);else{w.removeAttributes(o);m.fire('removeFormatCleanup',w);}w=y;}}s.moveToBookmark(t);}m.getSelection().selectRanges(q);}}},filter:function(m,n){var o=m._.removeFormat.filters;for(var p=0;p<o.length;p++){if(o[p](n)===false)return false;}return true;}};a.editor.prototype.addRemoveFormatFilter=function(m){this._.removeFormat.filters.push(m);};i.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(m){var n=m.config;!n.resize_dir&&(n.resize_dir='both');n.resize_maxWidth==undefined&&(n.resize_maxWidth=3000);n.resize_maxHeight==undefined&&(n.resize_maxHeight=3000);n.resize_minWidth==undefined&&(n.resize_minWidth=750);n.resize_minHeight==undefined&&(n.resize_minHeight=250);if(n.resize_enabled!==false){var o=null,p,q,r=(n.resize_dir=='both'||n.resize_dir=='horizontal')&&n.resize_minWidth!=n.resize_maxWidth,s=(n.resize_dir=='both'||n.resize_dir=='vertical')&&n.resize_minHeight!=n.resize_maxHeight;function t(w){var x=w.data.$.screenX-p.x,y=w.data.$.screenY-p.y,z=q.width,A=q.height,B=z+x*(m.lang.dir=='rtl'?-1:1),C=A+y;if(r)z=Math.max(n.resize_minWidth,Math.min(B,n.resize_maxWidth));if(s)A=Math.max(n.resize_minHeight,Math.min(C,n.resize_maxHeight));m.resize(z,A);};
-function u(w){a.document.removeListener('mousemove',t);a.document.removeListener('mouseup',u);if(m.document){m.document.removeListener('mousemove',t);m.document.removeListener('mouseup',u);}};var v=e.addFunction(function(w){if(!o)o=m.getResizable();q={width:o.$.offsetWidth||0,height:o.$.offsetHeight||0};p={x:w.screenX,y:w.screenY};n.resize_minWidth>q.width&&(n.resize_minWidth=q.width);n.resize_minHeight>q.height&&(n.resize_minHeight=q.height);a.document.on('mousemove',t);a.document.on('mouseup',u);if(m.document){m.document.on('mousemove',t);m.document.on('mouseup',u);}});m.on('destroy',function(){e.removeFunction(v);});m.on('themeSpace',function(w){if(w.data.space=='bottom'){var x='';if(r&&!s)x=' cke_resizer_horizontal';if(!r&&s)x=' cke_resizer_vertical';w.data.html+='<div class="cke_resizer'+x+'"'+' title="'+e.htmlEncode(m.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+v+', event)"'+'></div>';}},m,null,100);}}});(function(){var m={modes:{wysiwyg:1,source:1},exec:function(o){var p=o.element.$.form;if(p)try{p.submit();}catch(q){if(p.submit.click)p.submit.click();}}},n='save';j.add(n,{init:function(o){var p=o.addCommand(n,m);p.modes={wysiwyg:!!o.element.$.form};o.ui.addButton('Save',{label:o.lang.save,command:n});}});})();(function(){var m='scaytcheck',n='';function o(t,u){var v=0,w;for(w in u){if(u[w]==t){v=1;break;}}return v;};var p=function(){var t=this,u=function(){var y=t.config,z={};z.srcNodeRef=t.document.getWindow().$.frameElement;z.assocApp='CKEDITOR.'+a.version+'@'+a.revision;z.customerid=y.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';z.customDictionaryIds=y.scayt_customDictionaryIds||'';z.userDictionaryName=y.scayt_userDictionaryName||'';z.sLang=y.scayt_sLang||'en_US';z.onLoad=function(){if(!(c&&b.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(t.focusManager.hasFocus&&!q.isControlRestored(t))this.focus();};z.onBeforeChange=function(){if(q.getScayt(t)&&!t.checkDirty())setTimeout(function(){t.resetDirty();},0);};var A=window.scayt_custom_params;if(typeof A=='object')for(var B in A)z[B]=A[B];if(q.getControlId(t))z.id=q.getControlId(t);var C=new window.scayt(z);C.afterMarkupRemove.push(function(J){new h(J,C.document).mergeSiblings();});var D=q.instances[t.name];if(D){C.sLang=D.sLang;C.option(D.option());C.paused=D.paused;}q.instances[t.name]=C;var E='scaytButton',F=window.scayt.uiTags,G=[];for(var H=0,I=4;H<I;H++)G.push(F[H]&&q.uiTabs[H]);q.uiTabs=G;try{C.setDisabled(q.isPaused(t)===false);
-}catch(J){}t.fire('showScaytState');};t.on('contentDom',u);t.on('contentDomUnload',function(){var y=a.document.getElementsByTag('script'),z=/^dojoIoScript(\d+)$/i,A=/^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var B=0;B<y.count();B++){var C=y.getItem(B),D=C.getId(),E=C.getAttribute('src');if(D&&E&&D.match(z)&&E.match(A))C.remove();}});t.on('beforeCommandExec',function(y){if((y.data.name=='source'||y.data.name=='newpage')&&t.mode=='wysiwyg'){var z=q.getScayt(t);if(z){q.setPaused(t,!z.disabled);q.setControlId(t,z.id);z.destroy(true);delete q.instances[t.name];}}else if(y.data.name=='source'&&t.mode=='source')q.markControlRestore(t);});t.on('afterCommandExec',function(y){if(!q.isScaytEnabled(t))return;if(t.mode=='wysiwyg'&&(y.data.name=='undo'||y.data.name=='redo'))window.setTimeout(function(){q.getScayt(t).refresh();},10);});t.on('destroy',function(y){var z=y.editor,A=q.getScayt(z);if(!A)return;delete q.instances[z.name];q.setControlId(z,A.id);A.destroy(true);});t.on('afterSetData',function(){if(q.isScaytEnabled(t))window.setTimeout(function(){var y=q.getScayt(t);y&&y.refresh();},10);});t.on('insertElement',function(){var y=q.getScayt(t);if(q.isScaytEnabled(t)){if(c)t.getSelection().unlock(true);window.setTimeout(function(){y.focus();y.refresh();},10);}},this,null,50);t.on('insertHtml',function(){var y=q.getScayt(t);if(q.isScaytEnabled(t)){if(c)t.getSelection().unlock(true);window.setTimeout(function(){y.focus();y.refresh();},10);}},this,null,50);t.on('scaytDialog',function(y){y.data.djConfig=window.djConfig;y.data.scayt_control=q.getScayt(t);y.data.tab=n;y.data.scayt=window.scayt;});var v=t.dataProcessor,w=v&&v.htmlFilter;if(w)w.addRules({elements:{span:function(y){if(y.attributes['data-scayt_word']&&y.attributes['data-scaytid']){delete y.name;return y;}}}});var x=j.undo.Image.prototype;x.equals=e.override(x.equals,function(y){return function(z){var E=this;var A=E.contents,B=z.contents,C=q.getScayt(E.editor);if(C&&q.isScaytReady(E.editor)){E.contents=C.reset(A)||'';z.contents=C.reset(B)||'';}var D=y.apply(E,arguments);E.contents=A;z.contents=B;return D;};});if(t.document)u();};j.scayt={engineLoaded:false,instances:{},controlInfo:{},setControlInfo:function(t,u){if(t&&t.name&&typeof this.controlInfo[t.name]!='object')this.controlInfo[t.name]={};for(var v in u)this.controlInfo[t.name][v]=u[v];},isControlRestored:function(t){if(t&&t.name&&this.controlInfo[t.name])return this.controlInfo[t.name].restored;return false;},markControlRestore:function(t){this.setControlInfo(t,{restored:true});
-},setControlId:function(t,u){this.setControlInfo(t,{id:u});},getControlId:function(t){if(t&&t.name&&this.controlInfo[t.name]&&this.controlInfo[t.name].id)return this.controlInfo[t.name].id;return null;},setPaused:function(t,u){this.setControlInfo(t,{paused:u});},isPaused:function(t){if(t&&t.name&&this.controlInfo[t.name])return this.controlInfo[t.name].paused;return undefined;},getScayt:function(t){return this.instances[t.name];},isScaytReady:function(t){return this.engineLoaded===true&&'undefined'!==typeof window.scayt&&this.getScayt(t);},isScaytEnabled:function(t){var u=this.getScayt(t);return u?u.disabled===false:false;},loadEngine:function(t){if(b.gecko&&b.version<10900||b.opera||b.air)return t.fire('showScaytState');if(this.engineLoaded===true)return p.apply(t);else if(this.engineLoaded==-1)return a.on('scaytReady',function(){p.apply(t);});a.on('scaytReady',p,t);a.on('scaytReady',function(){this.engineLoaded=true;},this,null,0);this.engineLoaded=-1;var u=document.location.protocol;u=u.search(/https?:/)!=-1?u:'http:';var v='svc.spellchecker.net/scayt26/loader__base.js',w=t.config.scayt_srcUrl||u+'//'+v,x=q.parseUrl(w).path+'/';if(window.scayt==undefined){a._djScaytConfig={baseUrl:x,addOnLoad:[function(){a.fireOnce('scaytReady');}],isDebug:false};a.document.getHead().append(a.document.createElement('script',{attributes:{type:'text/javascript',async:'true',src:w}}));}else a.fireOnce('scaytReady');return null;},parseUrl:function(t){var u;if(t.match&&(u=t.match(/(.*)[\/\\](.*?\.\w+)$/)))return{path:u[1],file:u[2]};else return t;}};var q=j.scayt,r=function(t,u,v,w,x,y,z){t.addCommand(w,x);t.addMenuItem(w,{label:v,command:w,group:y,order:z});},s={preserveState:true,editorFocus:false,canUndo:false,exec:function(t){if(q.isScaytReady(t)){var u=q.isScaytEnabled(t);this.setState(u?2:1);var v=q.getScayt(t);v.focus();v.setDisabled(u);}else if(!t.config.scayt_autoStartup&&q.engineLoaded>=0){this.setState(0);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){var u=t.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',v='';u=u.split('|');if(u&&u.length)for(var w=0;w<u.length;w++)v+='scayt_'+u[w]+(u.length!=parseInt(w,10)+1?',':'');t.config.menu_groups=v+','+t.config.menu_groups;},init:function(t){var u={},v={},w=t.addCommand(m,s);a.dialog.add(m,a.getUrl(this.path+'dialogs/options.js'));var x=t.config.scayt_uiTabs||'1,1,1',y=[];x=x.split(',');for(var z=0,A=3;z<A;z++){var B=parseInt(x[z]||'1',10);y.push(B);}var C='scaytButton';
-t.addMenuGroup(C);var D={},E=t.lang.scayt;D.scaytToggle={label:E.enable,command:m,group:C};if(y[0]==1)D.scaytOptions={label:E.options,group:C,onClick:function(){n='options';t.openDialog(m);}};if(y[1]==1)D.scaytLangs={label:E.langs,group:C,onClick:function(){n='langs';t.openDialog(m);}};if(y[2]==1)D.scaytDict={label:E.dictionariesTab,group:C,onClick:function(){n='dictionaries';t.openDialog(m);}};D.scaytAbout={label:t.lang.scayt.about,group:C,onClick:function(){n='about';t.openDialog(m);}};y[3]=1;q.uiTabs=y;t.addMenuItems(D);t.ui.add('Scayt',5,{label:E.title,title:b.opera?E.opera_title:E.title,className:'cke_button_scayt',modes:{wysiwyg:1},onRender:function(){w.on('state',function(){this.setState(w.state);},this);},onMenu:function(){var G=q.isScaytEnabled(t);t.getMenuItem('scaytToggle').label=E[G?'disable':'enable'];return{scaytToggle:2,scaytOptions:G&&q.uiTabs[0]?2:0,scaytLangs:G&&q.uiTabs[1]?2:0,scaytDict:G&&q.uiTabs[2]?2:0,scaytAbout:G&&q.uiTabs[3]?2:0};}});if(t.contextMenu&&t.addMenuItems)t.contextMenu.addListener(function(G,H){if(!q.isScaytEnabled(t)||H.getRanges()[0].checkReadOnly())return null;var I=q.getScayt(t),J=I.getScaytNode();if(!J)return null;var K=I.getWord(J);if(!K)return null;var L=I.getLang(),M={},N=window.scayt.getSuggestion(K,L);if(!N||!N.length)return null;for(z in u){delete t._.menuItems[z];delete t._.commands[z];}for(z in v){delete t._.menuItems[z];delete t._.commands[z];}u={};v={};var O=t.config.scayt_moreSuggestions||'on',P=false,Q=t.config.scayt_maxSuggestions;typeof Q!='number'&&(Q=5);!Q&&(Q=N.length);var R=t.config.scayt_contextCommands||'all';R=R.split('|');for(var S=0,T=N.length;S<T;S+=1){var U='scayt_suggestion_'+N[S].replace(' ','_'),V=(function(Z,aa){return{exec:function(){I.replace(Z,aa);}};})(J,N[S]);if(S<Q){r(t,'button_'+U,N[S],U,V,'scayt_suggest',S+1);M[U]=2;v[U]=2;}else if(O=='on'){r(t,'button_'+U,N[S],U,V,'scayt_moresuggest',S+1);u[U]=2;P=true;}}if(P){t.addMenuItem('scayt_moresuggest',{label:E.moreSuggestions,group:'scayt_moresuggest',order:10,getItems:function(){return u;}});v.scayt_moresuggest=2;}if(o('all',R)||o('ignore',R)){var W={exec:function(){I.ignore(J);}};r(t,'ignore',E.ignore,'scayt_ignore',W,'scayt_control',1);v.scayt_ignore=2;}if(o('all',R)||o('ignoreall',R)){var X={exec:function(){I.ignoreAll(J);}};r(t,'ignore_all',E.ignoreAll,'scayt_ignore_all',X,'scayt_control',2);v.scayt_ignore_all=2;}if(o('all',R)||o('add',R)){var Y={exec:function(){window.scayt.addWordToUserDictionary(J);}};r(t,'add_word',E.addWord,'scayt_add_word',Y,'scayt_control',3);
-v.scayt_add_word=2;}if(I.fireOnContextMenu)I.fireOnContextMenu(t);return v;});var F=function(){t.removeListener('showScaytState',F);if(!b.opera&&!b.air)w.setState(q.isScaytEnabled(t)?1:2);else w.setState(0);};t.on('showScaytState',F);if(b.opera||b.air)t.on('instanceReady',function(){F();});if(t.config.scayt_autoStartup)t.on('instanceReady',function(){q.loadEngine(t);});},afterInit:function(t){var u,v=function(w){if(w.hasAttribute('data-scaytid'))return false;};if(t._.elementsPath&&(u=t._.elementsPath.filters))u.push(v);t.addRemoveFormatFilter&&t.addRemoveFormatFilter(v);}});})();j.add('smiley',{requires:['dialog'],init:function(m){m.config.smiley_path=m.config.smiley_path||this.path+'images/';m.addCommand('smiley',new a.dialogCommand('smiley'));m.ui.addButton('Smiley',{label:m.lang.smiley.toolbar,command:'smiley'});a.dialog.add('smiley',this.path+'dialogs/smiley.js');}});i.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];i.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];(function(){var m='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;background-position: top %3;border: 1px dotted gray;padding-top: 8px;padding-%3: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',n=/%1/g,o=/%2/g,p=/%3/g,q={preserveState:true,editorFocus:false,exec:function(r){this.toggleState();this.refresh(r);},refresh:function(r){var s=this.state==1?'addClass':'removeClass';r.document.getBody()[s]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(r){var s=r.addCommand('showblocks',q);s.canUndo=false;if(r.config.startupOutlineBlocks)s.setState(1);r.addCss(m.replace(n,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(o,'cke_show_blocks ').replace(p,r.lang.dir=='rtl'?'right':'left'));r.ui.addButton('ShowBlocks',{label:r.lang.showBlocks,command:'showblocks'});
-r.on('mode',function(){if(s.state!=0)s.refresh(r);});r.on('contentDom',function(){if(s.state!=0)s.refresh(r);});}});})();(function(){var m='cke_show_border',n,o=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');n=o.replace(/%2/g,m).replace(/%1/g,'cke_show_borders ');var p={preserveState:true,editorFocus:false,exec:function(q){this.toggleState();this.refresh(q);},refresh:function(q){var r=this.state==1?'addClass':'removeClass';q.document.getBody()[r]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(q){var r=q.addCommand('showborders',p);r.canUndo=false;if(q.config.startupShowBorders!==false)r.setState(1);q.addCss(n);q.on('mode',function(){if(r.state!=0)r.refresh(q);},null,null,100);q.on('contentDom',function(){if(r.state!=0)r.refresh(q);});q.on('removeFormatCleanup',function(s){var t=s.data;if(q.getCommand('showborders').state==1&&t.is('table')&&(!t.hasAttribute('border')||parseInt(t.getAttribute('border'),10)<=0))t.addClass(m);});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter,t=r&&r.htmlFilter;if(s)s.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'],x=parseInt(v.border,10);if(!x||x<=0)v['class']=(w||'')+' '+m;}}});if(t)t.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'];w&&(v['class']=w.replace(m,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(q){var r=q.data.name;if(r=='table'||r=='tableProperties'){var s=q.data.definition,t=s.getContents('info'),u=t.get('txtBorder'),v=u.commit;u.commit=e.override(v,function(y){return function(z,A){y.apply(this,arguments);var B=parseInt(this.getValue(),10);A[!B||B<=0?'addClass':'removeClass'](m);};});var w=s.getContents('advanced'),x=w&&w.get('advCSSClasses');if(x){x.setup=e.override(x.setup,function(y){return function(){y.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});x.commit=e.override(x.commit,function(y){return function(z,A){y.apply(this,arguments);if(!parseInt(A.getAttribute('border'),10))A.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(m){var n=j.sourcearea,o=a.document.getWindow();
-m.on('editingBlockReady',function(){var p,q;m.addMode('source',{load:function(r,s){if(c&&b.version<8)r.setStyle('position','relative');m.textarea=p=new h('textarea');p.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:m.tabIndex,role:'textbox','aria-label':m.lang.editorTitle.replace('%1',m.name)});p.addClass('cke_source');p.addClass('cke_enable_context_menu');var t={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){q=function(){p.hide();p.setStyle('height',r.$.clientHeight+'px');p.setStyle('width',r.$.clientWidth+'px');p.show();};m.on('resize',q);o.on('resize',q);setTimeout(q,0);}r.setHtml('');r.append(p);p.setStyles(t);m.fire('ariaWidget',p);p.on('blur',function(){m.focusManager.blur();});p.on('focus',function(){m.focusManager.focus();});m.mayBeDirty=true;this.loadData(s);var u=m.keystrokeHandler;if(u)u.attach(p);setTimeout(function(){m.mode='source';m.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(r){p.setValue(r);m.fire('dataReady');},getData:function(){return p.getValue();},getSnapshotData:function(){return p.getValue();},unload:function(r){p.clearCustomData();m.textarea=p=null;if(q){m.removeListener('resize',q);o.removeListener('resize',q);}if(c&&b.version<8)r.removeStyle('position');},focus:function(){p.focus();}});});m.addCommand('source',n.commands.source);if(m.ui.addButton)m.ui.addButton('Source',{label:m.lang.source,command:'source'});m.on('mode',function(){m.getCommand('source').setState(m.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(m){if(m.mode=='wysiwyg')m.fire('saveSnapshot');m.getCommand('source').setState(0);m.setMode(m.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(n){var o=n.config,p=n.lang.stylesCombo,q={},r=[];function s(t){n.getStylesSet(function(u){if(!r.length){var v,w;for(var x=0,y=u.length;x<y;x++){var z=u[x];w=z.name;v=q[w]=new a.style(z);v._name=w;v._.enterMode=o.enterMode;r.push(v);}r.sort(m);}t&&t();});};n.ui.addRichCombo('Styles',{label:p.label,title:p.panelTitle,className:'cke_styles',panel:{css:n.skin.editor.css.concat(o.contentsCss),multiSelect:true,attributes:{'aria-label':p.panelTitle}},init:function(){var t=this;s(function(){var u,v,w;for(var x=0,y=r.length;x<y;x++){u=r[x];v=u._name;var z=u.type;if(z!=w){t.startGroup(p['panelTitle'+String(z)]);w=z;}t.add(v,u.type==3?v:u.buildPreview(),v);}t.commit();t.onOpen();
-});},onClick:function(t){n.focus();n.fire('saveSnapshot');var u=q[t],v=n.getSelection(),w=new d.elementPath(v.getStartElement());u[u.checkActive(w)?'remove':'apply'](n.document);n.fire('saveSnapshot');},onRender:function(){n.on('selectionChange',function(t){var u=this.getValue(),v=t.data.path,w=v.elements;for(var x=0,y=w.length,z;x<y;x++){z=w[x];for(var A in q){if(q[A].checkElementRemovable(z,true)){if(A!=u)this.setValue(A);return;}}}this.setValue('');},this);},onOpen:function(){var A=this;if(c||b.webkit)n.focus();var t=n.getSelection(),u=t.getSelectedElement(),v=new d.elementPath(u||t.getStartElement()),w=[0,0,0,0];A.showAll();A.unmarkAll();for(var x in q){var y=q[x],z=y.type;if(y.checkActive(v))A.mark(x);else if(z==3&&!y.checkApplicable(v)){A.hideItem(x);w[z]--;}w[z]++;}if(!w[1])A.hideGroup(p['panelTitle'+String(1)]);if(!w[2])A.hideGroup(p['panelTitle'+String(2)]);if(!w[3])A.hideGroup(p['panelTitle'+String(3)]);}});n.on('instanceReady',function(){s();});}});function m(n,o){var p=n.type,q=o.type;return p==q?0:p==3?-1:q==3?1:q==1?1:-1;};})();j.add('table',{init:function(m){var n=j.table,o=m.lang.table;m.addCommand('table',new a.dialogCommand('table'));m.addCommand('tableProperties',new a.dialogCommand('tableProperties'));m.ui.addButton('Table',{label:o.toolbar,command:'table'});a.dialog.add('table',this.path+'dialogs/table.js');a.dialog.add('tableProperties',this.path+'dialogs/table.js');if(m.addMenuItems)m.addMenuItems({table:{label:o.menu,command:'tableProperties',group:'table',order:5},tabledelete:{label:o.deleteTable,command:'tableDelete',group:'table',order:1}});m.on('doubleclick',function(p){var q=p.data.element;if(q.is('table'))p.data.dialog='tableProperties';});if(m.contextMenu)m.contextMenu.addListener(function(p,q){if(!p||p.isReadOnly())return null;var r=p.hasAscendant('table',1);if(r)return{tabledelete:2,table:2};return null;});}});(function(){var m=/^(?:td|th)$/;function n(G){var H=G.createBookmarks(),I=G.getRanges(),J=[],K={};function L(T){if(J.length>0)return;if(T.type==1&&m.test(T.getName())&&!T.getCustomData('selected_cell')){h.setMarker(K,T,'selected_cell',true);J.push(T);}};for(var M=0;M<I.length;M++){var N=I[M];if(N.collapsed){var O=N.getCommonAncestor(),P=O.getAscendant('td',true)||O.getAscendant('th',true);if(P)J.push(P);}else{var Q=new d.walker(N),R;Q.guard=L;while(R=Q.next()){var S=R.getParent();if(S&&m.test(S.getName())&&!S.getCustomData('selected_cell')){h.setMarker(K,S,'selected_cell',true);J.push(S);}}}}h.clearAllMarkers(K);G.selectBookmarks(H);
-return J;};function o(G){var H=0,I=G.length-1,J={},K,L,M;while(K=G[H++])h.setMarker(J,K,'delete_cell',true);H=0;while(K=G[H++]){if((L=K.getPrevious())&&!L.getCustomData('delete_cell')||(L=K.getNext())&&!L.getCustomData('delete_cell')){h.clearAllMarkers(J);return L;}}h.clearAllMarkers(J);M=G[0].getParent();if(M=M.getPrevious())return M.getLast();M=G[I].getParent();if(M=M.getNext())return M.getChild(0);return null;};function p(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=J.getDocument(),M=I[0].getParent(),N=M.$.rowIndex,O=I[I.length-1],P=O.getParent().$.rowIndex+O.$.rowSpan-1,Q=new h(K.$.rows[P]),R=H?N:P,S=H?M:Q,T=e.buildTableMap(K),U=T[R],V=H?T[R-1]:T[R+1],W=T[0].length,X=L.createElement('tr');for(var Y=0;Y<W;Y++){var Z;if(U[Y].rowSpan>1&&V&&U[Y]==V[Y]){Z=U[Y];Z.rowSpan+=1;}else{Z=new h(U[Y]).clone();Z.removeAttribute('rowSpan');!c&&Z.appendBogus();X.append(Z);Z=Z.$;}Y+=Z.colSpan-1;}H?X.insertBefore(S):X.insertAfter(S);};function q(G){if(G instanceof d.selection){var H=n(G),I=H[0],J=I.getAscendant('table'),K=e.buildTableMap(J),L=H[0].getParent(),M=L.$.rowIndex,N=H[H.length-1],O=N.getParent().$.rowIndex+N.$.rowSpan-1,P=[];for(var Q=M;Q<=O;Q++){var R=K[Q],S=new h(J.$.rows[Q]);for(var T=0;T<R.length;T++){var U=new h(R[T]),V=U.getParent().$.rowIndex;if(U.$.rowSpan==1)U.remove();else{U.$.rowSpan-=1;if(V==Q){var W=K[Q+1];W[T-1]?U.insertAfter(new h(W[T-1])):new h(J.$.rows[Q+1]).append(U,1);}}T+=U.$.colSpan-1;}P.push(S);}var X=J.$.rows,Y=new h(X[M]||X[M-1]||J.$.parentNode);for(Q=P.length;Q>=0;Q--)q(P[Q]);return Y;}else if(G instanceof h){J=G.getAscendant('table');if(J.$.rows.length==1)J.remove();else G.remove();}return null;};function r(G,H){var I=G.getParent(),J=I.$.cells,K=0;for(var L=0;L<J.length;L++){var M=J[L];K+=H?1:M.colSpan;if(M==G.$)break;}return K-1;};function s(G,H){var I=H?Infinity:0;for(var J=0;J<G.length;J++){var K=r(G[J],H);if(H?K<I:K>I)I=K;}return I;};function t(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=s(I,1),M=s(I),N=H?L:M,O=e.buildTableMap(K),P=[],Q=[],R=O.length;for(var S=0;S<R;S++){P.push(O[S][N]);var T=H?O[S][N-1]:O[S][N+1];T&&Q.push(T);}for(S=0;S<R;S++){var U;if(P[S].colSpan>1&&Q.length&&Q[S]==P[S]){U=P[S];U.colSpan+=1;}else{U=new h(P[S]).clone();U.removeAttribute('colSpan');!c&&U.appendBogus();U[H?'insertBefore':'insertAfter'].call(U,new h(P[S]));U=U.$;}S+=U.rowSpan-1;}};function u(G){var H=n(G),I=H[0],J=H[H.length-1],K=I.getAscendant('table'),L=e.buildTableMap(K),M,N,O=[];for(var P=0,Q=L.length;P<Q;P++)for(var R=0,S=L[P].length;
-R<S;R++){if(L[P][R]==I.$)M=R;if(L[P][R]==J.$)N=R;}for(P=M;P<=N;P++)for(R=0;R<L.length;R++){var T=L[R],U=new h(K.$.rows[R]),V=new h(T[P]);if(V.$.colSpan==1)V.remove();else V.$.colSpan-=1;R+=V.$.rowSpan-1;if(!U.$.cells.length)O.push(U);}var W=K.$.rows[0]&&K.$.rows[0].cells,X=new h(W[M]||(M?W[M-1]:K.$.parentNode));if(O.length==Q)K.remove();return X;};function v(G){var H=[],I=G[0]&&G[0].getAscendant('table'),J,K,L,M;for(J=0,K=G.length;J<K;J++)H.push(G[J].$.cellIndex);H.sort();for(J=1,K=H.length;J<K;J++){if(H[J]-H[J-1]>1){L=H[J-1]+1;break;}}if(!L)L=H[0]>0?H[0]-1:H[H.length-1]+1;var N=I.$.rows;for(J=0,K=N.length;J<K;J++){M=N[J].cells[L];if(M)break;}return M?new h(M):I.getPrevious();};function w(G,H){var I=G.getStartElement(),J=I.getAscendant('td',1)||I.getAscendant('th',1);if(!J)return;var K=J.clone();if(!c)K.appendBogus();if(H)K.insertBefore(J);else K.insertAfter(J);};function x(G){if(G instanceof d.selection){var H=n(G),I=H[0]&&H[0].getAscendant('table'),J=o(H);for(var K=H.length-1;K>=0;K--)x(H[K]);if(J)z(J,true);else if(I)I.remove();}else if(G instanceof h){var L=G.getParent();if(L.getChildCount()==1)L.remove();else G.remove();}};function y(G){var H=G.getBogus();H&&H.remove();G.trim();};function z(G,H){var I=new d.range(G.getDocument());if(!I['moveToElementEdit'+(H?'End':'Start')](G)){I.selectNodeContents(G);I.collapse(H?false:true);}I.select(true);};function A(G,H,I){var J=G[H];if(typeof I=='undefined')return J;for(var K=0;J&&K<J.length;K++){if(I.is&&J[K]==I.$)return K;else if(K==I)return new h(J[K]);}return I.is?-1:null;};function B(G,H,I){var J=[];for(var K=0;K<G.length;K++){var L=G[K];if(typeof I=='undefined')J.push(L[H]);else if(I.is&&L[H]==I.$)return K;else if(K==I)return new h(L[H]);}return typeof I=='undefined'?J:I.is?-1:null;};function C(G,H,I){var J=n(G),K;if((H?J.length!=1:J.length<2)||(K=G.getCommonAncestor())&&K.type==1&&K.is('table'))return false;var L,M=J[0],N=M.getAscendant('table'),O=e.buildTableMap(N),P=O.length,Q=O[0].length,R=M.getParent().$.rowIndex,S=A(O,R,M);if(H){var T;try{var U=parseInt(M.getAttribute('rowspan'),10)||1,V=parseInt(M.getAttribute('colspan'),10)||1;T=O[H=='up'?R-U:H=='down'?R+U:R][H=='left'?S-V:H=='right'?S+V:S];}catch(an){return false;}if(!T||M.$==T)return false;J[H=='up'||H=='left'?'unshift':'push'](new h(T));}var W=M.getDocument(),X=R,Y=0,Z=0,aa=!I&&new d.documentFragment(W),ab=0;for(var ac=0;ac<J.length;ac++){L=J[ac];var ad=L.getParent(),ae=L.getFirst(),af=L.$.colSpan,ag=L.$.rowSpan,ah=ad.$.rowIndex,ai=A(O,ah,L);ab+=af*ag;
-Z=Math.max(Z,ai-S+af);Y=Math.max(Y,ah-R+ag);if(!I){if(y(L),L.getChildren().count()){if(ah!=X&&ae&&!(ae.isBlockBoundary&&ae.isBlockBoundary({br:1}))){var aj=aa.getLast(d.walker.whitespaces(true));if(aj&&!(aj.is&&aj.is('br')))aa.append('br');}L.moveChildren(aa);}ac?L.remove():L.setHtml('');}X=ah;}if(!I){aa.moveChildren(M);if(!c)M.appendBogus();if(Z>=Q)M.removeAttribute('rowSpan');else M.$.rowSpan=Y;if(Y>=P)M.removeAttribute('colSpan');else M.$.colSpan=Z;var ak=new d.nodeList(N.$.rows),al=ak.count();for(ac=al-1;ac>=0;ac--){var am=ak.getItem(ac);if(!am.$.cells.length){am.remove();al++;continue;}}return M;}else return Y*Z==ab;};function D(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.rowSpan,Q,R,S,T;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);T=N+R;var U=new h(L.$.rows[T]),V=A(M,T),W;Q=J.clone();for(var X=0;X<V.length;X++){W=V[X];if(W.parentNode==U.$&&X>O){Q.insertBefore(new h(W));break;}else W=null;}if(!W)U.append(Q,true);}else{S=R=1;U=K.clone();U.insertAfter(K);U.append(Q=J.clone());var Y=A(M,N);for(var Z=0;Z<Y.length;Z++)Y[Z].rowSpan++;}if(!c)Q.appendBogus();J.$.rowSpan=R;Q.$.rowSpan=S;if(R==1)J.removeAttribute('rowSpan');if(S==1)Q.removeAttribute('rowSpan');return Q;};function E(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.colSpan,Q,R,S;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);}else{S=R=1;var T=B(M,O);for(var U=0;U<T.length;U++)T[U].colSpan++;}Q=J.clone();Q.insertAfter(J);if(!c)Q.appendBogus();J.$.colSpan=R;Q.$.colSpan=S;if(R==1)J.removeAttribute('colSpan');if(S==1)Q.removeAttribute('colSpan');return Q;};var F={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};j.tabletools={init:function(G){var H=G.lang.table;G.addCommand('cellProperties',new a.dialogCommand('cellProperties'));a.dialog.add('cellProperties',this.path+'dialogs/tableCell.js');G.addCommand('tableDelete',{exec:function(I){var J=I.getSelection(),K=J&&J.getStartElement(),L=K&&K.getAscendant('table',1);if(!L)return;J.selectElement(L);var M=J.getRanges()[0];M.collapse();J.selectRanges([M]);var N=L.getParent();if(N.getChildCount()==1&&!N.is('body','td','th'))N.remove();else L.remove();}});G.addCommand('rowDelete',{exec:function(I){var J=I.getSelection();z(q(J));}});G.addCommand('rowInsertBefore',{exec:function(I){var J=I.getSelection();p(J,true);}});G.addCommand('rowInsertAfter',{exec:function(I){var J=I.getSelection();
-p(J);}});G.addCommand('columnDelete',{exec:function(I){var J=I.getSelection(),K=u(J);K&&z(K,true);}});G.addCommand('columnInsertBefore',{exec:function(I){var J=I.getSelection();t(J,true);}});G.addCommand('columnInsertAfter',{exec:function(I){var J=I.getSelection();t(J);}});G.addCommand('cellDelete',{exec:function(I){var J=I.getSelection();x(J);}});G.addCommand('cellMerge',{exec:function(I){z(C(I.getSelection()),true);}});G.addCommand('cellMergeRight',{exec:function(I){z(C(I.getSelection(),'right'),true);}});G.addCommand('cellMergeDown',{exec:function(I){z(C(I.getSelection(),'down'),true);}});G.addCommand('cellVerticalSplit',{exec:function(I){z(D(I.getSelection()));}});G.addCommand('cellHorizontalSplit',{exec:function(I){z(E(I.getSelection()));}});G.addCommand('cellInsertBefore',{exec:function(I){var J=I.getSelection();w(J,true);}});G.addCommand('cellInsertAfter',{exec:function(I){var J=I.getSelection();w(J);}});if(G.addMenuItems)G.addMenuItems({tablecell:{label:H.cell.menu,group:'tablecell',order:1,getItems:function(){var I=G.getSelection(),J=n(I);return{tablecell_insertBefore:2,tablecell_insertAfter:2,tablecell_delete:2,tablecell_merge:C(I,null,true)?2:0,tablecell_merge_right:C(I,'right',true)?2:0,tablecell_merge_down:C(I,'down',true)?2:0,tablecell_split_vertical:D(I,true)?2:0,tablecell_split_horizontal:E(I,true)?2:0,tablecell_properties:J.length>0?2:0};}},tablecell_insertBefore:{label:H.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:H.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:H.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:H.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:H.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:H.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:H.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:H.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:H.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:H.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};}},tablerow_insertBefore:{label:H.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:H.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:H.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:H.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};
-}},tablecolumn_insertBefore:{label:H.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:H.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:H.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(G.contextMenu)G.contextMenu.addListener(function(I,J){if(!I||I.isReadOnly())return null;while(I){if(I.getName() in F)return{tablecell:2,tablerow:2,tablecolumn:2};I=I.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();e.buildTableMap=function(m){var n=m.$.rows,o=-1,p=[];for(var q=0;q<n.length;q++){o++;!p[o]&&(p[o]=[]);var r=-1;for(var s=0;s<n[q].cells.length;s++){var t=n[q].cells[s];r++;while(p[o][r])r++;var u=isNaN(t.colSpan)?1:t.colSpan,v=isNaN(t.rowSpan)?1:t.rowSpan;for(var w=0;w<v;w++){if(!p[o+w])p[o+w]=[];for(var x=0;x<u;x++)p[o+w][r+x]=n[q].cells[s];}r+=u-1;}}return p;};j.add('specialchar',{availableLangs:{en:1},init:function(m){var n='specialchar',o=this;a.dialog.add(n,this.path+'dialogs/specialchar.js');m.addCommand(n,{exec:function(){var p=m.langCode;p=o.availableLangs[p]?p:'en';a.scriptLoader.load(a.getUrl(o.path+'lang/'+p+'.js'),function(){e.extend(m.lang.specialChar,o.lang[p]);m.openDialog(n);});},modes:{wysiwyg:1},canUndo:false});m.ui.addButton('SpecialChar',{label:m.lang.specialChar.toolbar,command:n});}});i.specialChars=['!','"','#','$','%','&',"'",'(',')','*','+','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','|','}','~','€','‘','’','“','”','–','—','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','&','&sup2;','&sup3;','´','µ','¶','·','¸','&sup1;','º','&','&frac14;','&frac12;','&frac34;','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ü','ý','þ','ÿ','Œ','œ','Ŵ','&#374','&#373','ŷ','‚','‛','„','…','™','►','•','→','⇒','⇔','♦','≈'];
-(function(){var m={editorFocus:false,modes:{wysiwyg:1,source:1}},n={exec:function(q){q.container.focusNext(true,q.tabIndex);}},o={exec:function(q){q.container.focusPrevious(true,q.tabIndex);}};function p(q){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(r){if(r.focusManager.hasFocus){var s=r.getSelection(),t=s.getCommonAncestor(),u;if(u=t.getAscendant('td',true)||t.getAscendant('th',true)){var v=new d.range(r.document),w=e.tryThese(function(){var D=u.getParent(),E=D.$.cells[u.$.cellIndex+(q?-1:1)];E.parentNode.parentNode;return E;},function(){var D=u.getParent(),E=D.getAscendant('table'),F=E.$.rows[D.$.rowIndex+(q?-1:1)];return F.cells[q?F.cells.length-1:0];});if(!(w||q)){var x=u.getAscendant('table').$,y=u.getParent().$.cells,z=new h(x.insertRow(-1),r.document);for(var A=0,B=y.length;A<B;A++){var C=z.append(new h(y[A],r.document).clone(false,false));!c&&C.appendBogus();}v.moveToElementEditStart(z);}else if(w){w=new h(w);v.moveToElementEditStart(w);if(!(v.checkStartOfBlock()&&v.checkEndOfBlock()))v.selectNodeContents(w);}else return true;v.select(true);return true;}}return false;}};};j.add('tab',{requires:['keystrokes'],init:function(q){var r=q.config.enableTabKeyTools!==false,s=q.config.tabSpaces||0,t='';while(s--)t+='\xa0';if(t)q.on('key',function(u){if(u.data.keyCode==9){q.insertHtml(t);u.cancel();}});if(r)q.on('key',function(u){if(u.data.keyCode==9&&q.execCommand('selectNextCell')||u.data.keyCode==2000+9&&q.execCommand('selectPreviousCell'))u.cancel();});if(b.webkit||b.gecko)q.on('key',function(u){var v=u.data.keyCode;if(v==9&&!t){u.cancel();q.execCommand('blur');}if(v==2000+9){q.execCommand('blurBack');u.cancel();}});q.addCommand('blur',e.extend(n,m));q.addCommand('blurBack',e.extend(o,m));q.addCommand('selectNextCell',p());q.addCommand('selectPreviousCell',p(true));}});})();h.prototype.focusNext=function(m,n){var w=this;var o=w.$,p=n===undefined?w.getTabIndex():n,q,r,s,t,u,v;if(p<=0){u=w.getNextSourceNode(m,1);while(u){if(u.isVisible()&&u.getTabIndex()===0){s=u;break;}u=u.getNextSourceNode(false,1);}}else{u=w.getDocument().getBody().getFirst();while(u=u.getNextSourceNode(false,1)){if(!q)if(!r&&u.equals(w)){r=true;if(m){if(!(u=u.getNextSourceNode(true,1)))break;q=1;}}else if(r&&!w.contains(u))q=1;if(!u.isVisible()||(v=u.getTabIndex())<0)continue;if(q&&v==p){s=u;break;}if(v>p&&(!s||!t||v<t)){s=u;t=v;}else if(!s&&v===0){s=u;t=v;}}}if(s)s.focus();};h.prototype.focusPrevious=function(m,n){var w=this;var o=w.$,p=n===undefined?w.getTabIndex():n,q,r,s,t=0,u,v=w.getDocument().getBody().getLast();
-while(v=v.getPreviousSourceNode(false,1)){if(!q)if(!r&&v.equals(w)){r=true;if(m){if(!(v=v.getPreviousSourceNode(true,1)))break;q=1;}}else if(r&&!w.contains(v))q=1;if(!v.isVisible()||(u=v.getTabIndex())<0)continue;if(p<=0){if(q&&u===0){s=v;break;}if(u>t){s=v;t=u;}}else{if(q&&u==p){s=v;break;}if(u<p&&(!s||u>t)){s=v;t=u;}}}if(s)s.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(o){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));o.addCommand('templates',new a.dialogCommand('templates'));o.ui.addButton('Templates',{label:o.lang.templates.button,command:'templates'});}});var m={},n={};a.addTemplates=function(o,p){m[o]=p;};a.getTemplates=function(o){return m[o];};a.loadTemplates=function(o,p){var q=[];for(var r=0,s=o.length;r<s;r++){if(!n[o[r]]){q.push(o[r]);n[o[r]]=1;}}if(q.length)a.scriptLoader.load(q,p);else setTimeout(p,0);};})();i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var m=function(){this.toolbars=[];this.focusCommandExecuted=false;};m.prototype.focus=function(){for(var o=0,p;p=this.toolbars[o++];)for(var q=0,r;r=p.items[q++];){if(r.focus){r.focus();return;}}};var n={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(o){if(o.toolbox){o.toolbox.focusCommandExecuted=true;if(c||b.air)setTimeout(function(){o.toolbox.focus();},100);else o.toolbox.focus();}}}};j.add('toolbar',{init:function(o){var p=function(q,r){var s,t,u,v=o.lang.dir=='rtl';switch(r){case v?37:39:case 9:do{s=q.next;if(!s){t=q.toolbar.next;u=t&&t.items.length;while(u===0){t=t.next;u=t&&t.items.length;}if(t)s=t.items[0];}q=s;}while(q&&!q.focus);if(q)q.focus();else o.toolbox.focus();return false;case v?39:37:case 2000+9:do{s=q.previous;if(!s){t=q.toolbar.previous;u=t&&t.items.length;while(u===0){t=t.previous;u=t&&t.items.length;}if(t)s=t.items[u-1];}q=s;}while(q&&!q.focus);if(q)q.focus();else{var w=o.toolbox.toolbars[o.toolbox.toolbars.length-1].items;w[w.length-1].focus();}return false;case 27:o.focus();return false;case 13:case 32:q.execute();return false;}return true;};o.on('themeSpace',function(q){if(q.data.space==o.config.toolbarLocation){o.toolbox=new m();var r=e.getNextId(),s=['<div class="cke_toolbox" role="toolbar" aria-labelledby="',r,'" onmousedown="return false;"'],t=o.config.toolbarStartupExpanded!==false,u;s.push(t?'>':' style="display:none">');s.push('<span id="',r,'" class="cke_voice_label">',o.lang.toolbar,'</span>');var v=o.toolbox.toolbars,w=o.config.toolbar instanceof Array?o.config.toolbar:o.config['toolbar_'+o.config.toolbar];
-for(var x=0;x<w.length;x++){var y=w[x];if(!y)continue;var z=e.getNextId(),A={id:z,items:[]};if(u){s.push('</div>');u=0;}if(y==='/'){s.push('<div class="cke_break"></div>');continue;}s.push('<span id="',z,'" class="cke_toolbar" role="presentation"><span class="cke_toolbar_start"></span>');var B=v.push(A)-1;if(B>0){A.previous=v[B-1];A.previous.next=A;}for(var C=0;C<y.length;C++){var D,E=y[C];if(E=='-')D=k.separator;else D=o.ui.create(E);if(D){if(D.canGroup){if(!u){s.push('<span class="cke_toolgroup" role="presentation">');u=1;}}else if(u){s.push('</span>');u=0;}var F=D.render(o,s);B=A.items.push(F)-1;if(B>0){F.previous=A.items[B-1];F.previous.next=F;}F.toolbar=A;F.onkey=p;F.onfocus=function(){if(!o.toolbox.focusCommandExecuted)o.focus();};}}if(u){s.push('</span>');u=0;}s.push('<span class="cke_toolbar_end"></span></span>');}s.push('</div>');if(o.config.toolbarCanCollapse){var G=e.addFunction(function(){o.execCommand('toolbarCollapse');});o.on('destroy',function(){e.removeFunction(G);});var H=e.getNextId();o.addCommand('toolbarCollapse',{exec:function(I){var J=a.document.getById(H),K=J.getPrevious(),L=I.getThemeSpace('contents'),M=K.getParent(),N=parseInt(L.$.style.height,10),O=M.$.offsetHeight,P=!K.isVisible();if(!P){K.hide();J.addClass('cke_toolbox_collapser_min');J.setAttribute('title',I.lang.toolbarExpand);}else{K.show();J.removeClass('cke_toolbox_collapser_min');J.setAttribute('title',I.lang.toolbarCollapse);}J.getFirst().setText(P?'â–²':'â—€');var Q=M.$.offsetHeight-O;L.setStyle('height',N-Q+'px');I.fire('resize');},modes:{wysiwyg:1,source:1}});s.push('<a title="'+(t?o.lang.toolbarCollapse:o.lang.toolbarExpand)+'" id="'+H+'" tabIndex="-1" class="cke_toolbox_collapser');if(!t)s.push(' cke_toolbox_collapser_min');s.push('" onclick="CKEDITOR.tools.callFunction('+G+')">','<span>▲</span>','</a>');}q.data.html+=s.join('');}});o.on('destroy',function(){var q,r=0,s,t,u;q=this.toolbox.toolbars;for(;r<q.length;r++){t=q[r].items;for(s=0;s<t.length;s++){u=t[s];if(u.clickFn)e.removeFunction(u.clickFn);if(u.keyDownFn)e.removeFunction(u.keyDownFn);if(u.index)k.button._.instances[u.index]=null;}}});o.addCommand('toolbarFocus',n.toolbarFocus);}});})();k.separator={render:function(m,n){n.push('<span class="cke_separator" role="separator"></span>');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['BidiLtr','BidiRtl'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];
-i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(s){var t=new o(s),u=s.addCommand('undo',{exec:function(){if(t.undo()){s.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),v=s.addCommand('redo',{exec:function(){if(t.redo()){s.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});t.onChange=function(){u.setState(t.undoable()?2:0);v.setState(t.redoable()?2:0);};function w(x){if(t.enabled&&x.data.command.canUndo!==false)t.save();};s.on('beforeCommandExec',w);s.on('afterCommandExec',w);s.on('saveSnapshot',function(){t.save();});s.on('contentDom',function(){s.document.on('keydown',function(x){if(!x.data.$.ctrlKey&&!x.data.$.metaKey)t.type(x);});});s.on('beforeModeUnload',function(){s.mode=='wysiwyg'&&t.save(true);});s.on('mode',function(){t.enabled=s.mode=='wysiwyg';t.onChange();});s.ui.addButton('Undo',{label:s.lang.undo,command:'undo'});s.ui.addButton('Redo',{label:s.lang.redo,command:'redo'});s.resetUndo=function(){t.reset();s.fire('saveSnapshot');};s.on('updateSnapshot',function(){if(t.currentImage&&new m(s).equals(t.currentImage))setTimeout(function(){t.update();},0);});}});j.undo={};var m=j.undo.Image=function(s){this.editor=s;var t=s.getSnapshot(),u=t&&s.getSelection();c&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=t;this.bookmarks=u&&u.createBookmarks2(true);},n=/\b(?:href|src|name)="[^"]*?"/gi;m.prototype={equals:function(s,t){var u=this.contents,v=s.contents;if(c&&(b.ie7Compat||b.ie6Compat)){u=u.replace(n,'');v=v.replace(n,'');}if(u!=v)return false;if(t)return true;var w=this.bookmarks,x=s.bookmarks;if(w||x){if(!w||!x||w.length!=x.length)return false;for(var y=0;y<w.length;y++){var z=w[y],A=x[y];if(z.startOffset!=A.startOffset||z.endOffset!=A.endOffset||!e.arrayCompare(z.start,A.start)||!e.arrayCompare(z.end,A.end))return false;}}return true;}};function o(s){this.editor=s;this.reset();};var p={8:1,46:1},q={16:1,17:1,18:1},r={37:1,38:1,39:1,40:1};o.prototype={type:function(s){var t=s&&s.data.getKey(),u=t in q,v=t in p,w=this.lastKeystroke in p,x=v&&t==this.lastKeystroke,y=t in r,z=this.lastKeystroke in r,A=!v&&!y,B=v&&!x,C=!(u||this.typing)||A&&(w||z);if(C||B){var D=new m(this.editor);e.setTimeout(function(){var F=this;var E=F.editor.getSnapshot();if(c)E=E.replace(/\s+data-cke-expando=".*?"/g,'');if(D.contents!=E){F.typing=true;if(!F.save(false,D,false))F.snapshots.splice(F.index+1,F.snapshots.length-F.index-1);F.hasUndo=true;F.hasRedo=false;
-F.typesCount=1;F.modifiersCount=1;F.onChange();}},0,this);}this.lastKeystroke=t;if(v){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1;}}else if(!y){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var s=this;s.lastKeystroke=0;s.snapshots=[];s.index=-1;s.limit=s.editor.config.undoStackSize||20;s.currentImage=null;s.hasUndo=false;s.hasRedo=false;s.resetType();},resetType:function(){var s=this;s.typing=false;delete s.lastKeystroke;s.typesCount=0;s.modifiersCount=0;},fireChange:function(){var s=this;s.hasUndo=!!s.getNextImage(true);s.hasRedo=!!s.getNextImage(false);s.resetType();s.onChange();},save:function(s,t,u){var w=this;var v=w.snapshots;if(!t)t=new m(w.editor);if(t.contents===false)return false;if(w.currentImage&&t.equals(w.currentImage,s))return false;v.splice(w.index+1,v.length-w.index-1);if(v.length==w.limit)v.shift();w.index=v.push(t)-1;w.currentImage=t;if(u!==false)w.fireChange();return true;},restoreImage:function(s){var u=this;u.editor.loadSnapshot(s.contents);if(s.bookmarks)u.editor.getSelection().selectBookmarks(s.bookmarks);else if(c){var t=u.editor.document.getBody().$.createTextRange();t.collapse(true);t.select();}u.index=s.index;u.update();u.fireChange();},getNextImage:function(s){var x=this;var t=x.snapshots,u=x.currentImage,v,w;if(u)if(s)for(w=x.index-1;w>=0;w--){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}else for(w=x.index+1;w<t.length;w++){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}return null;},redoable:function(){return this.enabled&&this.hasRedo;},undoable:function(){return this.enabled&&this.hasUndo;},undo:function(){var t=this;if(t.undoable()){t.save(true);var s=t.getNextImage(true);if(s)return t.restoreImage(s),true;}return false;},redo:function(){var t=this;if(t.redoable()){t.save(true);if(t.redoable()){var s=t.getNextImage(false);if(s)return t.restoreImage(s),true;}}return false;},update:function(){var s=this;s.snapshots.splice(s.index,1,s.currentImage=new m(s.editor));}};})();(function(){var m={table:1,pre:1},n=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,o=d.walker.whitespaces(true);function p(D){return D.getName() in m||D.isBlockBoundary()&&f.$empty[D.getName()];};function q(D){return function(E){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');D.call(this,E.data);e.setTimeout(function(){this.fire('saveSnapshot');
-},0,this);}};};function r(D){var J=this;if(J.dataProcessor)D=J.dataProcessor.toHtml(D);var E=J.getSelection(),F=E.getRanges()[0];if(F.checkReadOnly())return;if(c){var G=E.isLocked;if(G)E.unlock();var H=E.getNative();if(H.type=='Control')H.clear();else if(E.getType()==2){F=E.getRanges()[0];var I=F&&F.endContainer;if(I&&I.type==1&&I.getAttribute('contenteditable')=='false'&&F.checkBoundaryOfElement(I,2)){F.setEndAfter(F.endContainer);F.deleteContents();}}try{H.createRange().pasteHTML(D);}catch(K){}if(G)J.getSelection().lock();}else J.document.$.execCommand('inserthtml',false,D);if(b.webkit){E=J.getSelection();E.scrollIntoView();}};function s(D){var E=this.getSelection(),F=E.getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,G=F==2,H=e.htmlEncode(D.replace(/\r\n|\r/g,'\n'));H=H.replace(/^[ \t]+|[ \t]+$/g,function(N,O,P){if(N.length==1)return ' ';else if(!O)return e.repeat(' ',N.length-1)+' ';else return ' '+e.repeat(' ',N.length-1);});H=H.replace(/[ \t]{2,}/g,function(N){return e.repeat(' ',N.length-1)+' ';});var I=F==1?'p':'div';if(!G)H=H.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(N,O,P){return '<'+I+'>'+P+'</'+I+'>';});H=H.replace(/\n/g,'<br>');if(!(G||c))H=H.replace(new RegExp('<br>(?=</'+I+'>)'),function(N){return e.repeat(N,2);});if(b.gecko||b.webkit){var J=new d.elementPath(E.getStartElement()),K=[];for(var L=0;L<J.elements.length;L++){var M=J.elements[L].getName();if(M in f.$inline)K.unshift(J.elements[L].getOuterHtml().match(/^<.*?>/));else if(M in f.$block)break;}H=K.join('')+H;}r.call(this,H);};function t(D){var E=this.getSelection(),F=E.getRanges(),G=D.getName(),H=f.$block[G],I=E.isLocked;if(I)E.unlock();var J,K,L,M;for(var N=F.length-1;N>=0;N--){J=F[N];if(!J.checkReadOnly()){J.deleteContents(1);K=!N&&D||D.clone(1);var O,P;if(H)while((O=J.getCommonAncestor(0,1))&&(P=f[O.getName()])&&!(P&&P[G])){if(O.getName() in f.span)J.splitElement(O);else if(J.checkStartOfBlock()&&J.checkEndOfBlock()){J.setStartBefore(O);J.collapse(true);O.remove();}else J.splitBlock();}J.insertNode(K);if(!L)L=K;}}if(L){J.moveToPosition(L,4);if(H){var Q=L.getNext(o),R=Q&&Q.type==1&&Q.getName();if(R&&f.$block[R]&&f[R]['#'])J.moveToElementEditStart(Q);}}E.selectRanges([J]);if(I)this.getSelection().lock();};function u(D){if(!D.checkDirty())setTimeout(function(){D.resetDirty();},0);};var v=d.walker.whitespaces(true),w=d.walker.bookmark(false,true);function x(D){return v(D)&&w(D);};function y(D){return D.type==3&&e.trim(D.getText()).match(/^(?: |\xa0)$/);
-};function z(D){if(D.isLocked){D.unlock();setTimeout(function(){D.lock();},0);}};function A(D){return D.getOuterHtml().match(n);};v=d.walker.whitespaces(true);function B(D){var E=D.window,F=D.document,G=D.document.getBody(),H=G.getChildren().count();if(!H||H==1&&G.getFirst().hasAttribute('_moz_editor_bogus_node')){u(D);var I=D.element.getDocument(),J=I.getDocumentElement(),K=J.$.scrollTop,L=J.$.scrollLeft,M=F.$.createEvent('KeyEvents');M.initKeyEvent('keypress',true,true,E.$,false,false,false,false,0,32);F.$.dispatchEvent(M);if(K!=J.$.scrollTop||L!=J.$.scrollLeft)I.getWindow().$.scrollTo(L,K);H&&G.getFirst().remove();F.getBody().appendBogus();var N=new d.range(F);N.setStartAt(G,1);N.select();}};function C(D){var E=D.editor,F=D.data.path,G=F.blockLimit,H=D.data.selection,I=H.getRanges()[0],J=E.document.getBody(),K=E.config.enterMode;if(b.gecko){B(E);var L=F.block||F.blockLimit;if(L&&!L.getBogus()){E.fire('updateSnapshot');u(E);L.appendBogus();}}if(K!=2&&I.collapsed&&G.getName()=='body'&&!F.block){E.fire('updateSnapshot');u(E);c&&z(H);var M=I.fixBlock(true,E.config.enterMode==3?'div':'p');if(c){var N=M.getFirst(x);N&&y(N)&&N.remove();}if(A(M)){var O=M.getNext(v);if(O&&O.type==1&&!p(O)){I.moveToElementEditStart(O);M.remove();}else{O=M.getPrevious(v);if(O&&O.type==1&&!p(O)){I.moveToElementEditEnd(O);M.remove();}}}I.select();if(!c){E.forceNextSelectionCheck();E.selectionChange();}}var P=new d.range(E.document),Q=new d.walker(P);P.selectNodeContents(J);Q.evaluator=function(S){return S.type==1&&S.getName() in m;};Q.guard=function(S,T){return!(S.type==3&&v(S)||T);};if(Q.previous()){E.fire('updateSnapshot');u(E);c&&z(H);var R;if(K!=2)R=J.append(new h(K==1?'p':'div'));else R=J;if(!c)R.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(D){var E=D.config.enterMode!=2?D.config.enterMode==3?'div':'p':false,F=D.lang.editorTitle.replace('%1',D.name),G;D.on('editingBlockReady',function(){var M,N,O,P,Q,R,S=b.isCustomDomain(),T=function(W){if(N)N.remove();var X='document.open();'+(S?'document.domain="'+document.domain+'";':'')+'document.close();';X=b.air?'javascript:void(0)':c?'javascript:void(function(){'+encodeURIComponent(X)+'}())':'';N=h.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" title="'+F+'"'+' src="'+X+'"'+' tabIndex="'+(b.webkit?-1:D.tabIndex)+'"'+' allowTransparency="true"'+'></iframe>');if(document.location.protocol=='chrome:')a.event.useCapture=true;N.on('load',function(ab){Q=1;ab.removeListener();var ac=N.getFrameDocument();
-ac.write(W);b.air&&V(ac.getWindow().$);});if(document.location.protocol=='chrome:')a.event.useCapture=false;var Y=D.element,Z=b.gecko&&!Y.isVisible(),aa={};if(Z){Y.show();aa={position:Y.getStyle('position'),top:Y.getStyle('top')};Y.setStyles({position:'absolute',top:'-3000px'});}M.append(N);if(Z)setTimeout(function(){Y.hide();Y.setStyles(aa);},1000);};G=e.addFunction(V);var U='<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">'+(S?'document.domain="'+document.domain+'";':'')+'window.parent.CKEDITOR.tools.callFunction( '+G+', window );'+'</script>';function V(W){if(!Q)return;Q=0;D.fire('ariaWidget',N);var X=W.document,Y=X.body,Z=X.getElementById('cke_actscrpt');Z&&Z.parentNode.removeChild(Z);Y.spellcheck=!D.config.disableNativeSpellChecker;if(c){Y.hideFocus=true;Y.disabled=true;Y.contentEditable=true;Y.removeAttribute('disabled');}else setTimeout(function(){if(b.gecko&&b.version>=10900||b.opera)X.$.body.contentEditable=true;else if(b.webkit)X.$.body.parentNode.contentEditable=true;else X.$.designMode='on';},0);b.gecko&&e.setTimeout(B,0,null,D);W=D.window=new d.window(W);X=D.document=new g(X);X.on('dblclick',function(af){var ag=af.data.getTarget(),ah={element:ag,dialog:''};D.fire('doubleclick',ah);ah.dialog&&D.openDialog(ah.dialog);});c&&X.on('click',function(af){var ag=af.data.getTarget();if(ag.is('input')){var ah=ag.getAttribute('type');if(ah=='submit'||ah=='reset')af.data.preventDefault();}});if(!(c||b.opera))X.on('mousedown',function(af){var ag=af.data.getTarget();if(ag.is('img','hr','input','textarea','select'))D.getSelection().selectElement(ag);});if(b.gecko)X.on('mouseup',function(af){if(af.data.$.button==2){var ag=af.data.getTarget();if(!ag.getOuterHtml().replace(n,'')){var ah=new d.range(X);ah.moveToElementEditStart(ag);ah.select(true);}}});X.on('click',function(af){af=af.data;if(af.getTarget().is('a')&&af.$.button!=2)af.preventDefault();});if(b.webkit){X.on('click',function(af){if(af.data.getTarget().is('input','select'))af.data.preventDefault();});X.on('mouseup',function(af){if(af.data.getTarget().is('input','textarea'))af.data.preventDefault();});}if(c&&X.$.compatMode=='CSS1Compat'||b.gecko||b.opera){var aa=X.getDocumentElement();aa.on('mousedown',function(af){if(af.data.getTarget().equals(aa)){if(b.gecko&&b.version>=10900)K();L.focus();}});}var ab=c?N:W;ab.on('blur',function(){D.focusManager.blur();});var ac;ab.on('focus',function(){var af=D.document;if(b.gecko&&b.version>=10900)K();else if(b.opera)af.getBody().focus();else if(b.webkit)if(!ac){D.document.getDocumentElement().focus();
-ac=1;}D.focusManager.focus();});var ad=D.keystrokeHandler;if(ad)ad.attach(X);if(c){X.getDocumentElement().addClass(X.$.compatMode);X.on('keydown',function(af){var ag=af.data.getKeystroke();if(ag in {8:1,46:1}){var ah=D.getSelection(),ai=ah.getSelectedElement();if(ai){D.fire('saveSnapshot');var aj=ah.getRanges()[0].createBookmark();ai.remove();ah.selectBookmarks([aj]);D.fire('saveSnapshot');af.data.preventDefault();}}});if(X.$.compatMode=='CSS1Compat'){var ae={33:1,34:1};X.on('keydown',function(af){if(af.data.getKeystroke() in ae)setTimeout(function(){D.getSelection().scrollIntoView();},0);});}}if(D.contextMenu)D.contextMenu.addTarget(X,D.config.browserContextMenuOnCtrl!==false);setTimeout(function(){D.fire('contentDom');if(R){D.mode='wysiwyg';D.fire('mode');R=false;}O=false;if(P){D.focus();P=false;}setTimeout(function(){D.fire('dataReady');},0);try{D.document.$.execCommand('enableInlineTableEditing',false,!D.config.disableNativeTableHandles);}catch(af){}if(D.config.disableObjectResizing)try{D.document.$.execCommand('enableObjectResizing',false,false);}catch(ag){D.document.getBody().on(c?'resizestart':'resize',function(ah){ah.data.preventDefault();});}if(c)setTimeout(function(){if(D.document){var ah=D.document.$.body;ah.runtimeStyle.marginBottom='0px';ah.runtimeStyle.marginBottom='';}},1000);},0);};D.addMode('wysiwyg',{load:function(W,X,Y){M=W;if(c&&b.quirks)W.setStyle('position','relative');D.mayBeDirty=true;R=true;if(Y)this.loadSnapshotData(X);else this.loadData(X);},loadData:function(W){O=true;var X=D.config,Y=X.fullPage,Z=X.docType,aa='<style type="text/css" data-cke-temp="1">'+D._.styles.join('\n')+'</style>';!Y&&(aa=e.buildStyleHtml(D.config.contentsCss)+aa);var ab=X.baseHref?'<base href="'+X.baseHref+'" data-cke-temp="1" />':'';if(Y)W=W.replace(/<!DOCTYPE[^>]*>/i,function(ac){D.docType=Z=ac;return '';});if(D.dataProcessor)W=D.dataProcessor.toHtml(W,E);if(Y){if(!/<body[\s|>]/.test(W))W='<body>'+W;if(!/<html[\s|>]/.test(W))W='<html>'+W+'</html>';if(!/<head[\s|>]/.test(W))W=W.replace(/<html[^>]*>/,'$&<head><title></title></head>');else if(!/<title[\s|>]/.test(W))W=W.replace(/<head[^>]*>/,'$&<title></title>');ab&&(W=W.replace(/<head>/,'$&'+ab));W=W.replace(/<\/head\s*>/,aa+'$&');W=Z+W;}else W=X.docType+'<html dir="'+X.contentsLangDirection+'"'+' lang="'+(X.contentsLanguage||D.langCode)+'">'+'<head>'+'<title>'+F+'</title>'+ab+aa+'</head>'+'<body'+(X.bodyId?' id="'+X.bodyId+'"':'')+(X.bodyClass?' class="'+X.bodyClass+'"':'')+'>'+W+'</html>';W+=U;this.onDispose();
-T(W);},getData:function(){var W=D.config,X=W.fullPage,Y=X&&D.docType,Z=N.getFrameDocument(),aa=X?Z.getDocumentElement().getOuterHtml():Z.getBody().getHtml();if(D.dataProcessor)aa=D.dataProcessor.toDataFormat(aa,E);if(W.ignoreEmptyParagraph)aa=aa.replace(n,function(ab,ac){return ac;});if(Y)aa=Y+'\n'+aa;return aa;},getSnapshotData:function(){return N.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(W){N.getFrameDocument().getBody().setHtml(W);},onDispose:function(){if(!D.document)return;D.document.getDocumentElement().clearCustomData();D.document.getBody().clearCustomData();D.window.clearCustomData();D.document.clearCustomData();N.clearCustomData();N.remove();},unload:function(W){this.onDispose();D.window=D.document=N=M=P=null;D.fire('contentDomUnload');},focus:function(){var W=D.window;if(O)P=true;else if(b.opera&&D.document){var X=D.window.$.frameElement;X.blur(),X.focus();D.document.getBody().focus();D.selectionChange();}else if(!b.opera&&W){b.air?setTimeout(function(){W.focus();},0):W.focus();D.selectionChange();}}});D.on('insertHtml',q(r),null,null,20);D.on('insertElement',q(t),null,null,20);D.on('insertText',q(s),null,null,20);D.on('selectionChange',C,null,null,1);});var H;D.on('contentDom',function(){var M=D.document.getElementsByTag('title').getItem(0);M.data('cke-title',D.document.$.title);D.document.$.title=F;});if(a.document.$.documentMode>=8){D.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var I=[];for(var J in f.$removeEmpty)I.push('html.CSS1Compat '+J+'[contenteditable=false]');D.addCss(I.join(',')+'{ display:inline-block;}');}else if(b.gecko)D.addCss('html { height: 100% !important; }');function K(M){e.tryThese(function(){D.document.$.designMode='on';setTimeout(function(){D.document.$.designMode='off';if(a.currentInstance==D)D.document.getBody().focus();},50);},function(){D.document.$.designMode='off';var N=D.document.getBody();N.setAttribute('contentEditable',false);N.setAttribute('contentEditable',true);!M&&K(1);});};if(b.gecko||c||b.opera){var L;D.on('uiReady',function(){L=D.container.append(h.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>'));L.on('focus',function(){D.focus();});D.focusGrabber=L;});D.on('destroy',function(){e.removeFunction(G);L.clearCustomData();delete D.focusGrabber;});}D.on('insertElement',function(M){var N=M.data;if(N.type==1&&(N.is('input')||N.is('textarea'))){if(!N.isReadOnly())N.data('cke-editable',N.hasAttribute('contenteditable')?'true':'1');
-N.setAttribute('contentEditable',false);}});}});if(b.gecko)(function(){var D=document.body;if(!D)window.addEventListener('load',arguments.callee,false);else{var E=D.getAttribute('onpageshow');D.setAttribute('onpageshow',(E?E+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();');}})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(m){var n='checkspell',o=m.addCommand(n,new a.dialogCommand(n));o.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname};m.ui.addButton('SpellChecker',{label:m.lang.spellCheck.toolbar,command:n});a.dialog.add(n,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){var m=e.cssLength;function n(P){return!!this._.tabs[P][0].$.offsetHeight;};function o(){var T=this;var P=T._.currentTabId,Q=T._.tabIdList.length,R=e.indexOf(T._.tabIdList,P)+Q;for(var S=R-1;S>R-Q;S--){if(n.call(T,T._.tabIdList[S%Q]))return T._.tabIdList[S%Q];}return null;};function p(){var T=this;var P=T._.currentTabId,Q=T._.tabIdList.length,R=e.indexOf(T._.tabIdList,P);for(var S=R+1;S<R+Q;S++){if(n.call(T,T._.tabIdList[S%Q]))return T._.tabIdList[S%Q];}return null;};function q(P,Q){var R=P.$.getElementsByTagName('input');for(var S=0,T=R.length;S<T;S++){var U=new h(R[S]);if(U.getAttribute('type').toLowerCase()=='text')if(Q){U.setAttribute('value',U.getCustomData('fake_value')||'');U.removeCustomData('fake_value');}else{U.setCustomData('fake_value',U.getAttribute('value'));U.setAttribute('value','');}}};a.dialog=function(P,Q){var R=a.dialog._.dialogDefinitions[Q],S=e.clone(s),T=P.config.dialog_buttonsOrder||'OS',U=P.lang.dir;if(T=='OS'&&b.mac||T=='rtl'&&U=='ltr'||T=='ltr'&&U=='rtl')S.buttons.reverse();R=e.extend(R(P),S);R=e.clone(R);R=new w(this,R);var V=a.document,W=P.theme.buildDialog(P);this._={editor:P,element:W.element,name:Q,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};
-this.parts=W.parts;e.setTimeout(function(){P.fire('ariaWidget',this.parts.contents);},0,this);this.parts.dialog.setStyles({position:b.ie6Compat?'absolute':'fixed',top:0,left:0,visibility:'hidden'});a.event.call(this);this.definition=R=a.fire('dialogDefinition',{name:Q,definition:R},P).definition;var X={};if(!('removeDialogTabs' in P._)&&P.config.removeDialogTabs){var Y=P.config.removeDialogTabs.split(';');for(i=0;i<Y.length;i++){var Z=Y[i].split(':');if(Z.length==2){var aa=Z[0];if(!X[aa])X[aa]=[];X[aa].push(Z[1]);}}P._.removeDialogTabs=X;}if(P._.removeDialogTabs&&(X=P._.removeDialogTabs[Q]))for(i=0;i<X.length;i++)R.removeContents(X[i]);if(R.onLoad)this.on('load',R.onLoad);if(R.onShow)this.on('show',R.onShow);if(R.onHide)this.on('hide',R.onHide);if(R.onOk)this.on('ok',function(an){P.fire('saveSnapshot');setTimeout(function(){P.fire('saveSnapshot');},0);if(R.onOk.call(this,an)===false)an.data.hide=false;});if(R.onCancel)this.on('cancel',function(an){if(R.onCancel.call(this,an)===false)an.data.hide=false;});var ab=this,ac=function(an){var ao=ab._.contents,ap=false;for(var aq in ao)for(var ar in ao[aq]){ap=an.call(this,ao[aq][ar]);if(ap)return;}};this.on('ok',function(an){ac(function(ao){if(ao.validate){var ap=ao.validate(this);if(typeof ap=='string'){alert(ap);ap=false;}if(ap===false){if(ao.select)ao.select();else ao.focus();an.data.hide=false;an.stop();return true;}}});},this,null,0);this.on('cancel',function(an){ac(function(ao){if(ao.isChanged()){if(!confirm(P.lang.common.confirmCancel))an.data.hide=false;return true;}});},this,null,0);this.parts.close.on('click',function(an){if(this.fire('cancel',{hide:true}).hide!==false)this.hide();an.data.preventDefault();},this);function ad(){var an=ab._.focusList;an.sort(function(aq,ar){if(aq.tabIndex!=ar.tabIndex)return ar.tabIndex-aq.tabIndex;else return aq.focusIndex-ar.focusIndex;});var ao=an.length;for(var ap=0;ap<ao;ap++)an[ap].focusIndex=ap;};function ae(an){var ao=ab._.focusList,ap=an?1:-1;if(ao.length<1)return;var aq=ab._.currentFocusIndex;try{ao[aq].getInputElement().$.blur();}catch(at){}var ar=(aq+ap+ao.length)%ao.length,as=ar;while(!ao[as].isFocusable()){as=(as+ap+ao.length)%ao.length;if(as==ar)break;}ao[as].focus();if(ao[as].type=='text')ao[as].select();};this.changeFocus=ae;var af;function ag(an){var as=this;if(ab!=a.dialog._.currentTop)return;var ao=an.data.getKeystroke(),ap=P.lang.dir=='rtl';af=0;if(ao==9||ao==2000+9){var aq=ao==2000+9;if(ab._.tabBarMode){var ar=aq?o.call(ab):p.call(ab);ab.selectPage(ar);
-ab._.tabs[ar][0].focus();}else ae(!aq);af=1;}else if(ao==4000+121&&!ab._.tabBarMode&&ab.getPageCount()>1){ab._.tabBarMode=true;ab._.tabs[ab._.currentTabId][0].focus();af=1;}else if((ao==37||ao==39)&&ab._.tabBarMode){ar=ao==(ap?39:37)?o.call(ab):p.call(ab);ab.selectPage(ar);ab._.tabs[ar][0].focus();af=1;}else if((ao==13||ao==32)&&ab._.tabBarMode){as.selectPage(as._.currentTabId);as._.tabBarMode=false;as._.currentFocusIndex=-1;ae(true);af=1;}if(af){an.stop();an.data.preventDefault();}};function ah(an){af&&an.data.preventDefault();};var ai=this._.element;this.on('show',function(){ai.on('keydown',ag,this,null,0);if(b.opera||b.gecko&&b.mac)ai.on('keypress',ah,this);});this.on('hide',function(){ai.removeListener('keydown',ag);if(b.opera||b.gecko&&b.mac)ai.removeListener('keypress',ah);});this.on('iframeAdded',function(an){var ao=new g(an.data.iframe.$.contentWindow.document);ao.on('keydown',ag,this,null,0);});this.on('show',function(){var ar=this;ad();if(P.config.dialog_startupFocusTab&&ab._.pageCount>1){ab._.tabBarMode=true;ab._.tabs[ab._.currentTabId][0].focus();}else if(!ar._.hasFocus){ar._.currentFocusIndex=-1;if(R.onFocus){var an=R.onFocus.call(ar);an&&an.focus();}else ae(true);if(ar._.editor.mode=='wysiwyg'&&c){var ao=P.document.$.selection,ap=ao.createRange();if(ap)if(ap.parentElement&&ap.parentElement().ownerDocument==P.document.$||ap.item&&ap.item(0).ownerDocument==P.document.$){var aq=document.body.createTextRange();aq.moveToElementText(ar.getElement().getFirst().$);aq.collapse(true);aq.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(an){var ao=this.getElement(),ap=ao.getFirst();ap.remove();ap.appendTo(ao);},this);y(this);z(this);new d.text(R.title,a.document).appendTo(this.parts.title);for(var aj=0;aj<R.contents.length;aj++){var ak=R.contents[aj];ak&&this.addPage(ak);}this.parts.tabs.on('click',function(an){var aq=this;var ao=an.data.getTarget();if(ao.hasClass('cke_dialog_tab')){var ap=ao.$.id;aq.selectPage(ap.substring(4,ap.lastIndexOf('_')));if(aq._.tabBarMode){aq._.tabBarMode=false;aq._.currentFocusIndex=-1;ae(true);}an.data.preventDefault();}},this);var al=[],am=a.dialog._.uiElementBuilders.hbox.build(this,{type:'hbox',className:'cke_dialog_footer_buttons',widths:[],children:R.buttons},al).getChild();this.parts.footer.setHtml(al.join(''));for(aj=0;aj<am.length;aj++)this._.buttons[am[aj].id]=am[aj];};function r(P,Q,R){this.element=Q;this.focusIndex=R;this.tabIndex=0;this.isFocusable=function(){return!Q.getAttribute('disabled')&&Q.isVisible();
-};this.focus=function(){P._.currentFocusIndex=this.focusIndex;this.element.focus();};Q.on('keydown',function(S){if(S.data.getKeystroke() in {32:1,13:1})this.fire('click');});Q.on('focus',function(){this.fire('mouseover');});Q.on('blur',function(){this.fire('mouseout');});};a.dialog.prototype={destroy:function(){this.hide();this._.element.remove();},resize:(function(){return function(P,Q){var R=this;if(R._.contentSize&&R._.contentSize.width==P&&R._.contentSize.height==Q)return;a.dialog.fire('resize',{dialog:R,skin:R._.editor.skinName,width:P,height:Q},R._.editor);R._.contentSize={width:P,height:Q};};})(),getSize:function(){var P=this._.element.getFirst();return{width:P.$.offsetWidth||0,height:P.$.offsetHeight||0};},move:(function(){var P;return function(Q,R,S){var V=this;var T=V._.element.getFirst();if(P===undefined)P=T.getComputedStyle('position')=='fixed';if(P&&V._.position&&V._.position.x==Q&&V._.position.y==R)return;V._.position={x:Q,y:R};if(!P){var U=a.document.getWindow().getScrollPosition();Q+=U.x;R+=U.y;}T.setStyles({left:(Q>0?Q:0)+'px',top:(R>0?R:0)+'px'});S&&(V._.moved=1);};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){var P=this._.element,Q=this.definition;if(!(P.getParent()&&P.getParent().equals(a.document.getBody())))P.appendTo(a.document.getBody());else P.setStyle('display','block');if(b.gecko&&b.version<10900){var R=this.parts.dialog;R.setStyle('position','absolute');setTimeout(function(){R.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||Q.minWidth,this._.contentSize&&this._.contentSize.height||Q.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;D(this._.editor);P.on('keydown',H);P.on(b.opera?'keypress':'keyup',I);for(var S in {keyup:1,keydown:1,keypress:1})P.on(S,O);}else{this._.parentDialog=a.dialog._.currentTop;var T=this._.parentDialog.getElement().getFirst();T.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}J(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;e.setTimeout(function(){this.layout();this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});k.fire('ready',this);
-this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(U){U.setInitValue&&U.setInitValue();});},100,this);},layout:function(){var R=this;var P=a.document.getWindow().getViewPaneSize(),Q=R.getSize();R.move(R._.moved?R._.position.x:(P.width-Q.width)/2,R._.moved?R._.position.y:(P.height-Q.height)/2);},foreach:function(P){var S=this;for(var Q in S._.contents)for(var R in S._.contents[Q])P(S._.contents[Q][R]);return S;},reset:(function(){var P=function(Q){if(Q.reset)Q.reset(1);};return function(){this.foreach(P);return this;};})(),setupContent:function(){var P=arguments;this.foreach(function(Q){if(Q.setup)Q.setup.apply(Q,P);});},commitContent:function(){var P=arguments;this.foreach(function(Q){if(Q.commit)Q.commit.apply(Q,P);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var P=this._.element;P.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');K(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)E();else{var Q=this._.parentDialog.getElement().getFirst();Q.setStyle('z-index',parseInt(Q.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;P.removeListener('keydown',H);P.removeListener(b.opera?'keypress':'keyup',I);for(var R in {keyup:1,keydown:1,keypress:1})P.removeListener(R,O);var S=this._.editor;S.focus();if(S.mode=='wysiwyg'&&c){var T=S.getSelection();T&&T.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(U){U.resetInitValue&&U.resetInitValue();});},addPage:function(P){var ab=this;var Q=[],R=P.label?' title="'+e.htmlEncode(P.label)+'"':'',S=P.elements,T=a.dialog._.uiElementBuilders.vbox.build(ab,{type:'vbox',className:'cke_dialog_page_contents',children:P.elements,expand:!!P.expand,padding:P.padding,style:P.style||'width: 100%;'},Q),U=h.createFromHtml(Q.join(''));U.setAttribute('role','tabpanel');var V=b,W='cke_'+P.id+'_'+e.getNextNumber(),X=h.createFromHtml(['<a class="cke_dialog_tab"',ab._.pageCount>0?' cke_last':'cke_first',R,!!P.hidden?' style="display:none"':'',' id="',W,'"',V.gecko&&V.version>=10900&&!V.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',P.label,'</a>'].join(''));U.setAttribute('aria-labelledby',W);ab._.tabs[P.id]=[X,U];ab._.tabIdList.push(P.id);!P.hidden&&ab._.pageCount++;ab._.lastTab=X;
-ab.updateStyle();var Y=ab._.contents[P.id]={},Z,aa=T.getChild();while(Z=aa.shift()){Y[Z.id]=Z;if(typeof Z.getChild=='function')aa.push.apply(aa,Z.getChild());}U.setAttribute('name',P.id);U.appendTo(ab.parts.contents);X.unselectable();ab.parts.tabs.append(X);if(P.accessKey){J(ab,ab,'CTRL+'+P.accessKey,M,L);ab._.accessKeyMap['CTRL+'+P.accessKey]=P.id;}},selectPage:function(P){if(this._.currentTabId==P)return;if(this.fire('selectPage',{page:P,currentPage:this._.currentTabId})===true)return;for(var Q in this._.tabs){var R=this._.tabs[Q][0],S=this._.tabs[Q][1];if(Q!=P){R.removeClass('cke_dialog_tab_selected');S.hide();}S.setAttribute('aria-hidden',Q!=P);}var T=this._.tabs[P];T[0].addClass('cke_dialog_tab_selected');if(b.ie6Compat||b.ie7Compat){q(T[1]);T[1].show();setTimeout(function(){q(T[1],1);},0);}else T[1].show();this._.currentTabId=P;this._.currentTabIndex=e.indexOf(this._.tabIdList,P);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(P){var R=this;var Q=R._.tabs[P]&&R._.tabs[P][0];if(!Q||R._.pageCount==1||!Q.isVisible())return;else if(P==R._.currentTabId)R.selectPage(o.call(R));Q.hide();R._.pageCount--;R.updateStyle();},showPage:function(P){var R=this;var Q=R._.tabs[P]&&R._.tabs[P][0];if(!Q)return;Q.show();R._.pageCount++;R.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(P,Q){var R=this._.contents[P];return R&&R[Q];},getValueOf:function(P,Q){return this.getContentElement(P,Q).getValue();},setValueOf:function(P,Q,R){return this.getContentElement(P,Q).setValue(R);},getButton:function(P){return this._.buttons[P];},click:function(P){return this._.buttons[P].click();},disableButton:function(P){return this._.buttons[P].disable();},enableButton:function(P){return this._.buttons[P].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(P,Q){var S=this;if(typeof Q=='undefined'){Q=S._.focusList.length;S._.focusList.push(new r(S,P,Q));}else{S._.focusList.splice(Q,0,new r(S,P,Q));for(var R=Q+1;R<S._.focusList.length;R++)S._.focusList[R].focusIndex++;}}};e.extend(a.dialog,{add:function(P,Q){if(!this._.dialogDefinitions[P]||typeof Q=='function')this._.dialogDefinitions[P]=Q;},exists:function(P){return!!this._.dialogDefinitions[P];},getCurrent:function(){return a.dialog._.currentTop;
-},okButton:(function(){var P=function(Q,R){R=R||{};return e.extend({id:'ok',type:'button',label:Q.lang.common.ok,'class':'cke_dialog_ui_button_ok',onClick:function(S){var T=S.data.dialog;if(T.fire('ok',{hide:true}).hide!==false)T.hide();}},R,true);};P.type='button';P.override=function(Q){return e.extend(function(R){return P(R,Q);},{type:'button'},true);};return P;})(),cancelButton:(function(){var P=function(Q,R){R=R||{};return e.extend({id:'cancel',type:'button',label:Q.lang.common.cancel,'class':'cke_dialog_ui_button_cancel',onClick:function(S){var T=S.data.dialog;if(T.fire('cancel',{hide:true}).hide!==false)T.hide();}},R,true);};P.type='button';P.override=function(Q){return e.extend(function(R){return P(R,Q);},{type:'button'},true);};return P;})(),addUIElement:function(P,Q){this._.uiElementBuilders[P]=Q;}});a.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};a.event.implementOn(a.dialog);a.event.implementOn(a.dialog.prototype,true);var s={resizable:3,minWidth:600,minHeight:400,buttons:[a.dialog.okButton,a.dialog.cancelButton]},t=function(P,Q,R){for(var S=0,T;T=P[S];S++){if(T.id==Q)return T;if(R&&T[R]){var U=t(T[R],Q,R);if(U)return U;}}return null;},u=function(P,Q,R,S,T){if(R){for(var U=0,V;V=P[U];U++){if(V.id==R){P.splice(U,0,Q);return Q;}if(S&&V[S]){var W=u(V[S],Q,R,S,true);if(W)return W;}}if(T)return null;}P.push(Q);return Q;},v=function(P,Q,R){for(var S=0,T;T=P[S];S++){if(T.id==Q)return P.splice(S,1);if(R&&T[R]){var U=v(T[R],Q,R);if(U)return U;}}return null;},w=function(P,Q){this.dialog=P;var R=Q.contents;for(var S=0,T;T=R[S];S++)R[S]=T&&new x(P,T);e.extend(this,Q);};w.prototype={getContents:function(P){return t(this.contents,P);},getButton:function(P){return t(this.buttons,P);},addContents:function(P,Q){return u(this.contents,P,Q);},addButton:function(P,Q){return u(this.buttons,P,Q);},removeContents:function(P){v(this.contents,P);},removeButton:function(P){v(this.buttons,P);}};function x(P,Q){this._={dialog:P};e.extend(this,Q);};x.prototype={get:function(P){return t(this.elements,P,'children');},add:function(P,Q){return u(this.elements,P,Q,'children');},remove:function(P){v(this.elements,P,'children');}};function y(P){var Q=null,R=null,S=P.getElement().getFirst(),T=P.getParentEditor(),U=T.config.dialog_magnetDistance,V=T.skin.margins||[0,0,0,0];if(typeof U=='undefined')U=20;function W(Y){var Z=P.getSize(),aa=a.document.getWindow().getViewPaneSize(),ab=Y.data.$.screenX,ac=Y.data.$.screenY,ad=ab-Q.x,ae=ac-Q.y,af,ag;
-Q={x:ab,y:ac};R.x+=ad;R.y+=ae;if(R.x+V[3]<U)af=-V[3];else if(R.x-V[1]>aa.width-Z.width-U)af=aa.width-Z.width+(T.lang.dir=='rtl'?0:V[1]);else af=R.x;if(R.y+V[0]<U)ag=-V[0];else if(R.y-V[2]>aa.height-Z.height-U)ag=aa.height-Z.height+V[2];else ag=R.y;P.move(af,ag,1);Y.data.preventDefault();};function X(Y){a.document.removeListener('mousemove',W);a.document.removeListener('mouseup',X);if(b.ie6Compat){var Z=C.getChild(0).getFrameDocument();Z.removeListener('mousemove',W);Z.removeListener('mouseup',X);}};P.parts.title.on('mousedown',function(Y){Q={x:Y.data.$.screenX,y:Y.data.$.screenY};a.document.on('mousemove',W);a.document.on('mouseup',X);R=P.getPosition();if(b.ie6Compat){var Z=C.getChild(0).getFrameDocument();Z.on('mousemove',W);Z.on('mouseup',X);}Y.data.preventDefault();},P);};function z(P){var Q=P.definition,R=Q.resizable;if(R==0)return;var S=P.getParentEditor(),T,U,V,W,X,Y;function Z(ad){if(P._.moved&&S.lang.dir=='rtl'){var ae=P._.element.getFirst();ae.setStyle('right',ad+'px');ae.removeStyle('left');}else if(!P._.moved)P.layout();};var aa=e.addFunction(function(ad){X=P.getSize();var ae=P.parts.contents,af=ae.$.getElementsByTagName('iframe').length;if(af){Y=h.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');ae.append(Y);}U=X.height-P.parts.contents.getSize('height',!(b.gecko||b.opera||c&&b.quirks));T=X.width-P.parts.contents.getSize('width',1);W={x:ad.screenX,y:ad.screenY};V=a.document.getWindow().getViewPaneSize();a.document.on('mousemove',ab);a.document.on('mouseup',ac);if(b.ie6Compat){var ag=C.getChild(0).getFrameDocument();ag.on('mousemove',ab);ag.on('mouseup',ac);}ad.preventDefault&&ad.preventDefault();});P.on('load',function(){var ad='';if(R==1)ad=' cke_resizer_horizontal';else if(R==2)ad=' cke_resizer_vertical';var ae=h.createFromHtml('<div class="cke_resizer'+ad+'"'+' title="'+e.htmlEncode(S.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+aa+', event )"></div>');P.parts.footer.append(ae,1);});S.on('destroy',function(){e.removeFunction(aa);});function ab(ad){var ae=S.lang.dir=='rtl',af=(ad.data.$.screenX-W.x)*(ae?-1:1),ag=ad.data.$.screenY-W.y,ah=X.width,ai=X.height,aj=ah+af*(P._.moved?1:2),ak=ai+ag*(P._.moved?1:2),al=P._.element.getFirst(),am=ae&&al.getComputedStyle('right'),an=P.getPosition();if(am)am=am=='auto'?V.width-(an.x||0)-al.getSize('width'):parseInt(am,10);if(an.y+ak>V.height)ak=V.height-an.y;if((ae?am:an.x)+aj>V.width)aj=V.width-(ae?am:an.x);if((R==1||R==3)&&!(ae&&af>0&&!an.x))ah=Math.max(Q.minWidth||0,aj-T);
-if(R==2||R==3)ai=Math.max(Q.minHeight||0,ak-U);P.resize(ah,ai);Z(am);ad.data.preventDefault();};function ac(){a.document.removeListener('mouseup',ac);a.document.removeListener('mousemove',ab);if(Y){Y.remove();Y=null;}if(b.ie6Compat){var ad=C.getChild(0).getFrameDocument();ad.removeListener('mouseup',ac);ad.removeListener('mousemove',ab);}if(S.lang.dir=='rtl'){var ae=P._.element.getFirst(),af=ae.getComputedStyle('left');if(af=='auto')af=V.width-parseInt(ae.getStyle('right'),10)-P.getSize().width;else af=parseInt(af,10);ae.removeStyle('right');P._.position.x+=1;P.move(af,P._.position.y);}};};var A,B={},C;function D(P){var Q=a.document.getWindow(),R=P.config,S=R.dialog_backgroundCoverColor||'white',T=R.dialog_backgroundCoverOpacity,U=R.baseFloatZIndex,V=e.genKey(S,T,U),W=B[V];if(!W){var X=['<div tabIndex="-1" style="position: ',b.ie6Compat?'absolute':'fixed','; z-index: ',U,'; top: 0px; left: 0px; ',!b.ie6Compat?'background-color: '+S:'','" class="cke_dialog_background_cover">'];if(b.ie6Compat){var Y=b.isCustomDomain(),Z="<html><body style=\\'background-color:"+S+";\\'></body></html>";X.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');X.push('void((function(){document.open();'+(Y?"document.domain='"+document.domain+"';":'')+"document.write( '"+Z+"' );"+'document.close();'+'})())');X.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>');}X.push('</div>');W=h.createFromHtml(X.join(''));W.setOpacity(T!=undefined?T:0.5);W.appendTo(a.document.getBody());B[V]=W;}else W.show();C=W;var aa=function(){var ad=Q.getViewPaneSize();W.setStyles({width:ad.width+'px',height:ad.height+'px'});},ab=function(){var ad=Q.getScrollPosition(),ae=a.dialog._.currentTop;W.setStyles({left:ad.x+'px',top:ad.y+'px'});if(ae)do{var af=ae.getPosition();ae.move(af.x,af.y);}while(ae=ae._.parentDialog)};A=aa;Q.on('resize',aa);aa();if(!(b.mac&&b.webkit))W.focus();if(b.ie6Compat){var ac=function(){ab();arguments.callee.prevScrollHandler.apply(this,arguments);};Q.$.setTimeout(function(){ac.prevScrollHandler=window.onscroll||(function(){});window.onscroll=ac;},0);ab();}};function E(){if(!C)return;var P=a.document.getWindow();C.hide();P.removeListener('resize',A);if(b.ie6Compat)P.$.setTimeout(function(){var Q=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=Q||null;},0);A=null;};function F(){for(var P in B)B[P].remove();B={};};var G={},H=function(P){var Q=P.data.$.ctrlKey||P.data.$.metaKey,R=P.data.$.altKey,S=P.data.$.shiftKey,T=String.fromCharCode(P.data.$.keyCode),U=G[(Q?'CTRL+':'')+(R?'ALT+':'')+(S?'SHIFT+':'')+T];
-if(!U||!U.length)return;U=U[U.length-1];U.keydown&&U.keydown.call(U.uiElement,U.dialog,U.key);P.data.preventDefault();},I=function(P){var Q=P.data.$.ctrlKey||P.data.$.metaKey,R=P.data.$.altKey,S=P.data.$.shiftKey,T=String.fromCharCode(P.data.$.keyCode),U=G[(Q?'CTRL+':'')+(R?'ALT+':'')+(S?'SHIFT+':'')+T];if(!U||!U.length)return;U=U[U.length-1];if(U.keyup){U.keyup.call(U.uiElement,U.dialog,U.key);P.data.preventDefault();}},J=function(P,Q,R,S,T){var U=G[R]||(G[R]=[]);U.push({uiElement:P,dialog:Q,key:R,keyup:T||P.accessKeyUp,keydown:S||P.accessKeyDown});},K=function(P){for(var Q in G){var R=G[Q];for(var S=R.length-1;S>=0;S--){if(R[S].dialog==P||R[S].uiElement==P)R.splice(S,1);}if(R.length===0)delete G[Q];}},L=function(P,Q){if(P._.accessKeyMap[Q])P.selectPage(P._.accessKeyMap[Q]);},M=function(P,Q){},N={27:1,13:1},O=function(P){if(P.data.getKeystroke() in N)P.data.stopPropagation();};(function(){k.dialog={uiElement:function(P,Q,R,S,T,U,V){if(arguments.length<4)return;var W=(S.call?S(Q):S)||'div',X=['<',W,' '],Y=(T&&T.call?T(Q):T)||{},Z=(U&&U.call?U(Q):U)||{},aa=(V&&V.call?V.call(this,P,Q):V)||'',ab=this.domId=Z.id||e.getNextId()+'_uiElement',ac=this.id=Q.id,ad;Z.id=ab;var ae={};if(Q.type)ae['cke_dialog_ui_'+Q.type]=1;if(Q.className)ae[Q.className]=1;var af=Z['class']&&Z['class'].split?Z['class'].split(' '):[];for(ad=0;ad<af.length;ad++){if(af[ad])ae[af[ad]]=1;}var ag=[];for(ad in ae)ag.push(ad);Z['class']=ag.join(' ');if(Q.title)Z.title=Q.title;var ah=(Q.style||'').split(';');for(ad in Y)ah.push(ad+':'+Y[ad]);if(Q.hidden)ah.push('display:none');for(ad=ah.length-1;ad>=0;ad--){if(ah[ad]==='')ah.splice(ad,1);}if(ah.length>0)Z.style=(Z.style?Z.style+'; ':'')+ah.join('; ');for(ad in Z)X.push(ad+'="'+e.htmlEncode(Z[ad])+'" ');X.push('>',aa,'</',W,'>');R.push(X.join(''));(this._||(this._={})).dialog=P;if(typeof Q.isChanged=='boolean')this.isChanged=function(){return Q.isChanged;};if(typeof Q.isChanged=='function')this.isChanged=Q.isChanged;a.event.implementOn(this);this.registerEvents(Q);if(this.accessKeyUp&&this.accessKeyDown&&Q.accessKey)J(this,P,'CTRL+'+Q.accessKey);var ai=this;P.on('load',function(){if(ai.getInputElement())ai.getInputElement().on('focus',function(){P._.tabBarMode=false;P._.hasFocus=true;ai.fire('focus');},ai);});if(this.keyboardFocusable){this.tabIndex=Q.tabIndex||0;this.focusIndex=P._.focusList.push(this)-1;this.on('focus',function(){P._.currentFocusIndex=ai.focusIndex;});}e.extend(this,Q);},hbox:function(P,Q,R,S,T){if(arguments.length<4)return;this._||(this._={});
-var U=this._.children=Q,V=T&&T.widths||null,W=T&&T.height||null,X={},Y,Z=function(){var ab=['<tbody><tr class="cke_dialog_ui_hbox">'];for(Y=0;Y<R.length;Y++){var ac='cke_dialog_ui_hbox_child',ad=[];if(Y===0)ac='cke_dialog_ui_hbox_first';if(Y==R.length-1)ac='cke_dialog_ui_hbox_last';ab.push('<td class="',ac,'" role="presentation" ');if(V){if(V[Y])ad.push('width:'+m(V[Y]));}else ad.push('width:'+Math.floor(100/R.length)+'%');if(W)ad.push('height:'+m(W));if(T&&T.padding!=undefined)ad.push('padding:'+m(T.padding));if(ad.length>0)ab.push('style="'+ad.join('; ')+'" ');ab.push('>',R[Y],'</td>');}ab.push('</tr></tbody>');return ab.join('');},aa={role:'presentation'};T&&T.align&&(aa.align=T.align);k.dialog.uiElement.call(this,P,T||{type:'hbox'},S,'table',X,aa,Z);},vbox:function(P,Q,R,S,T){if(arguments.length<3)return;this._||(this._={});var U=this._.children=Q,V=T&&T.width||null,W=T&&T.heights||null,X=function(){var Y=['<table role="presentation" cellspacing="0" border="0" '];Y.push('style="');if(T&&T.expand)Y.push('height:100%;');Y.push('width:'+m(V||'100%'),';');Y.push('"');Y.push('align="',e.htmlEncode(T&&T.align||(P.getParentEditor().lang.dir=='ltr'?'left':'right')),'" ');Y.push('><tbody>');for(var Z=0;Z<R.length;Z++){var aa=[];Y.push('<tr><td role="presentation" ');if(V)aa.push('width:'+m(V||'100%'));if(W)aa.push('height:'+m(W[Z]));else if(T&&T.expand)aa.push('height:'+Math.floor(100/R.length)+'%');if(T&&T.padding!=undefined)aa.push('padding:'+m(T.padding));if(aa.length>0)Y.push('style="',aa.join('; '),'" ');Y.push(' class="cke_dialog_ui_vbox_child">',R[Z],'</td></tr>');}Y.push('</tbody></table>');return Y.join('');};k.dialog.uiElement.call(this,P,T||{type:'vbox'},S,'div',null,{role:'presentation'},X);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(P,Q){this.getInputElement().setValue(P);!Q&&this.fire('change',{value:P});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var S=this;var P=S.getInputElement(),Q=P,R;while((Q=Q.getParent())&&Q.$.className.search('cke_dialog_page_contents')==-1){}if(!Q)return S;R=Q.getAttribute('name');if(S._.dialog._.currentTabId!=R)S._.dialog.selectPage(R);return S;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(P){var Q=/^on([A-Z]\w+)/,R,S=function(U,V,W,X){V.on('load',function(){U.getInputElement().on(W,X,U);
-});};for(var T in P){if(!(R=T.match(Q)))continue;if(this.eventProcessors[T])this.eventProcessors[T].call(this,this._.dialog,P[T]);else S(this,this._.dialog,R[1].toLowerCase(),P[T]);}return this;},eventProcessors:{onLoad:function(P,Q){P.on('load',Q,this);},onShow:function(P,Q){P.on('show',Q,this);},onHide:function(P,Q){P.on('hide',Q,this);}},accessKeyDown:function(P,Q){this.focus();},accessKeyUp:function(P,Q){},disable:function(){var P=this.getInputElement();P.setAttribute('disabled','true');P.addClass('cke_disabled');},enable:function(){var P=this.getInputElement();P.removeAttribute('disabled');P.removeClass('cke_disabled');},isEnabled:function(){return!this.getInputElement().getAttribute('disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(P){var Q=this;if(arguments.length<1)return Q._.children.concat();if(!P.splice)P=[P];if(P.length<2)return Q._.children[P[0]];else return Q._.children[P[0]]&&Q._.children[P[0]].getChild?Q._.children[P[0]].getChild(P.slice(1,P.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var P={build:function(Q,R,S){var T=R.children,U,V=[],W=[];for(var X=0;X<T.length&&(U=T[X]);X++){var Y=[];V.push(Y);W.push(a.dialog._.uiElementBuilders[U.type].build(Q,U,Y));}return new k.dialog[R.type](Q,W,V,S,R);}};a.dialog.addUIElement('hbox',P);a.dialog.addUIElement('vbox',P);})();a.dialogCommand=function(P){this.dialogName=P;};a.dialogCommand.prototype={exec:function(P){P.openDialog(this.dialogName);},canUndo:false,editorFocus:c||b.webkit};(function(){var P=/^([a]|[^a])+$/,Q=/^\d*$/,R=/^\d*(?:\.\d+)?$/;a.VALIDATE_OR=1;a.VALIDATE_AND=2;a.dialog.validate={functions:function(){return function(){var Y=this;var S=Y&&Y.getValue?Y.getValue():arguments[0],T=undefined,U=2,V=[],W;for(W=0;W<arguments.length;W++){if(typeof arguments[W]=='function')V.push(arguments[W]);else break;}if(W<arguments.length&&typeof arguments[W]=='string'){T=arguments[W];W++;}if(W<arguments.length&&typeof arguments[W]=='number')U=arguments[W];var X=U==2?true:false;for(W=0;W<V.length;W++){if(U==2)X=X&&V[W](S);else X=X||V[W](S);}if(!X){if(T!==undefined)alert(T);if(Y&&(Y.select||Y.focus))Y.select||Y.focus();return false;}return true;};},regex:function(S,T){return function(){var V=this;var U=V&&V.getValue?V.getValue():arguments[0];if(!S.test(U)){if(T!==undefined)alert(T);
-if(V&&(V.select||V.focus))if(V.select)V.select();else V.focus();return false;}return true;};},notEmpty:function(S){return this.regex(P,S);},integer:function(S){return this.regex(Q,S);},number:function(S){return this.regex(R,S);},equals:function(S,T){return this.functions(function(U){return U==S;},T);},notEqual:function(S,T){return this.functions(function(U){return U!=S;},T);}};a.on('instanceDestroyed',function(S){if(e.isEmpty(a.instances)){var T;while(T=a.dialog._.currentTop)T.hide();F();}var U=S.editor._.storedDialogs;for(var V in U)U[V].destroy();});})();e.extend(a.editor.prototype,{openDialog:function(P,Q){if(this.mode=='wysiwyg'&&c){var R=this.getSelection();R&&R.lock();}var S=a.dialog._.dialogDefinitions[P],T=this.skin.dialog;if(a.dialog._.currentTop===null)D(this);if(typeof S=='function'&&T._isLoaded){var U=this._.storedDialogs||(this._.storedDialogs={}),V=U[P]||(U[P]=new a.dialog(this,P));Q&&Q.call(V,V);V.show();return V;}else if(S=='failed')throw new Error('[CKEDITOR.dialog.openDialog] Dialog "'+P+'" failed when loading definition.');var W=this;function X(Z){var aa=a.dialog._.dialogDefinitions[P],ab=W.skin.dialog;if(!ab._isLoaded||Y&&typeof Z=='undefined')return;if(typeof aa!='function')a.dialog._.dialogDefinitions[P]='failed';W.openDialog(P,Q);};if(typeof S=='string'){var Y=1;a.scriptLoader.load(a.getUrl(S),X,null,0,1);}a.skins.load(this,'dialog',X);return null;}});})();j.add('dialog',{requires:['dialogui']});j.add('styles',{requires:['selection'],init:function(m){m.on('contentDom',function(){m.document.setCustomData('cke_includeReadonly',!m.config.disableReadonlyStyling);});}});a.editor.prototype.attachStyleStateChange=function(m,n){var o=this._.styleStateChangeCallbacks;if(!o){o=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(p){for(var q=0;q<o.length;q++){var r=o[q],s=r.style.checkActive(p.data.path)?1:2;if(r.state!==s){r.fn.call(this,s);r.state=s;}}});}o.push({style:m,fn:n});};a.STYLE_BLOCK=1;a.STYLE_INLINE=2;a.STYLE_OBJECT=3;(function(){var m={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1},n={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1},o=/\s*(?:;\s*|$)/,p=d.walker.bookmark(0,1);a.style=function(T,U){if(U){T=e.clone(T);L(T.attributes,U);L(T.styles,U);}var V=this.element=(T.element||'*').toLowerCase();this.type=V=='#'||m[V]?1:n[V]?3:2;this._={definition:T};};a.style.prototype={apply:function(T){S.call(this,T,false);},remove:function(T){S.call(this,T,true);},applyToRange:function(T){var U=this;
-return(U.applyToRange=U.type==2?r:U.type==1?v:U.type==3?t:null).call(U,T);},removeFromRange:function(T){var U=this;return(U.removeFromRange=U.type==2?s:U.type==1?w:U.type==3?u:null).call(U,T);},applyToObject:function(T){J(T,this);},checkActive:function(T){var X=this;switch(X.type){case 1:return X.checkElementRemovable(T.block||T.blockLimit,true);case 3:case 2:var U=T.elements;for(var V=0,W;V<U.length;V++){W=U[V];if(X.type==2&&(W==T.block||W==T.blockLimit))continue;if(X.type==3&&!(W.getName() in n))continue;if(X.checkElementRemovable(W,true))return true;}}return false;},checkApplicable:function(T){switch(this.type){case 2:case 1:break;case 3:return T.lastElement.getAscendant(this.element,true);}return true;},checkElementRemovable:function(T,U){if(!T)return false;var V=this._.definition,W;if(T.getName()==this.element){if(!U&&!T.hasAttributes())return true;W=M(V);if(W._length){for(var X in W){if(X=='_length')continue;var Y=T.getAttribute(X)||'';if(X=='style'?R(W[X],P(Y,false)):W[X]==Y){if(!U)return true;}else if(U)return false;}if(U)return true;}else return true;}var Z=N(this)[T.getName()];if(Z){if(!(W=Z.attributes))return true;for(var aa=0;aa<W.length;aa++){X=W[aa][0];var ab=T.getAttribute(X);if(ab){var ac=W[aa][1];if(ac===null||typeof ac=='string'&&ab==ac||ac.test(ab))return true;}}}return false;},buildPreview:function(){var T=this._.definition,U=[],V=T.element;if(V=='bdo')V='span';U=['<',V];var W=T.attributes;if(W)for(var X in W)U.push(' ',X,'="',W[X],'"');var Y=a.style.getStyleText(T);if(Y)U.push(' style="',Y,'"');U.push('>',T.name,'</',V,'>');return U.join('');}};a.style.getStyleText=function(T){var U=T._ST;if(U)return U;U=T.styles;var V=T.attributes&&T.attributes.style||'',W='';if(V.length)V=V.replace(o,';');for(var X in U){var Y=U[X],Z=(X+':'+Y).replace(o,';');if(Y=='inherit')W+=Z;else V+=Z;}if(V.length)V=P(V);V+=W;return T._ST=V;};function q(T){var U,V;while(T=T.getParent()){if(T.getName()=='body')break;if(T.getAttribute('data-nostyle'))U=T;else if(!V){var W=T.getAttribute('contentEditable');if(W=='false')U=T;else if(W=='true')V=1;}}return U;};function r(T){var ax=this;var U=T.document;if(T.collapsed){var V=I(ax,U);T.insertNode(V);T.moveToPosition(V,2);return;}var W=ax.element,X=ax._.definition,Y,Z=X.includeReadonly;if(Z==undefined)Z=U.getCustomData('cke_includeReadonly');var aa=f[W]||(Y=true,f.span);T.enlarge(1,1);T.trim();var ab=T.createBookmark(),ac=ab.startNode,ad=ab.endNode,ae=ac,af,ag=q(ac),ah=q(ad);if(ag)ae=ag.getNextSourceNode(true);if(ah)ad=ah;
-if(ae.getPosition(ad)==2)ae=0;while(ae){var ai=false;if(ae.equals(ad)){ae=null;ai=true;}else{var aj=ae.type,ak=aj==1?ae.getName():null,al=ak&&ae.getAttribute('contentEditable')=='false',am=ak&&ae.getAttribute('data-nostyle');if(ak&&ae.data('cke-bookmark')){ae=ae.getNextSourceNode(true);continue;}if(!ak||aa[ak]&&!am&&(!al||Z)&&(ae.getPosition(ad)|4|0|8)==4+0+8&&(!X.childRule||X.childRule(ae))){var an=ae.getParent();if(an&&((an.getDtd()||f.span)[W]||Y)&&(!X.parentRule||X.parentRule(an))){if(!af&&(!ak||!f.$removeEmpty[ak]||(ae.getPosition(ad)|4|0|8)==4+0+8)){af=new d.range(U);af.setStartBefore(ae);}if(aj==3||al||aj==1&&!ae.getChildCount()){var ao=ae,ap;while((ai=!ao.getNext(p))&&(ap=ao.getParent(),aa[ap.getName()])&&(ap.getPosition(ac)|2|0|8)==2+0+8&&(!X.childRule||X.childRule(ap)))ao=ap;af.setEndAfter(ao);}}else ai=true;}else ai=true;ae=ae.getNextSourceNode(am||al);}if(ai&&af&&!af.collapsed){var aq=I(ax,U),ar=aq.hasAttributes(),as=af.getCommonAncestor(),at={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},au,av,aw;while(aq&&as){if(as.getName()==W){for(au in X.attributes){if(at.blockedAttrs[au]||!(aw=as.getAttribute(av)))continue;if(aq.getAttribute(au)==aw)at.attrs[au]=1;else at.blockedAttrs[au]=1;}for(av in X.styles){if(at.blockedStyles[av]||!(aw=as.getStyle(av)))continue;if(aq.getStyle(av)==aw)at.styles[av]=1;else at.blockedStyles[av]=1;}}as=as.getParent();}for(au in at.attrs)aq.removeAttribute(au);for(av in at.styles)aq.removeStyle(av);if(ar&&!aq.hasAttributes())aq=null;if(aq){af.extractContents().appendTo(aq);F(ax,aq);af.insertNode(aq);aq.mergeSiblings();if(!c)aq.$.normalize();}else{aq=new h('span');af.extractContents().appendTo(aq);af.insertNode(aq);F(ax,aq);aq.remove(true);}af=null;}}T.moveToBookmark(ab);T.shrink(2);};function s(T){T.enlarge(1,1);var U=T.createBookmark(),V=U.startNode;if(T.collapsed){var W=new d.elementPath(V.getParent()),X;for(var Y=0,Z;Y<W.elements.length&&(Z=W.elements[Y]);Y++){if(Z==W.block||Z==W.blockLimit)break;if(this.checkElementRemovable(Z)){var aa;if(T.collapsed&&(T.checkBoundaryOfElement(Z,2)||(aa=T.checkBoundaryOfElement(Z,1)))){X=Z;X.match=aa?'start':'end';}else{Z.mergeSiblings();E(this,Z);}}}if(X){var ab=V;for(Y=0;true;Y++){var ac=W.elements[Y];if(ac.equals(X))break;else if(ac.match)continue;else ac=ac.clone();ac.append(ab);ab=ac;}ab[X.match=='start'?'insertBefore':'insertAfter'](X);}}else{var ad=U.endNode,ae=this;function af(){var ai=new d.elementPath(V.getParent()),aj=new d.elementPath(ad.getParent()),ak=null,al=null;
-for(var am=0;am<ai.elements.length;am++){var an=ai.elements[am];if(an==ai.block||an==ai.blockLimit)break;if(ae.checkElementRemovable(an))ak=an;}for(am=0;am<aj.elements.length;am++){an=aj.elements[am];if(an==aj.block||an==aj.blockLimit)break;if(ae.checkElementRemovable(an))al=an;}if(al)ad.breakParent(al);if(ak)V.breakParent(ak);};af();var ag=V.getNext();while(!ag.equals(ad)){var ah=ag.getNextSourceNode();if(ag.type==1&&this.checkElementRemovable(ag)){if(ag.getName()==this.element)E(this,ag);else G(ag,N(this)[ag.getName()]);if(ah.type==1&&ah.contains(V)){af();ah=V.getNext();}}ag=ah;}}T.moveToBookmark(U);};function t(T){var U=T.getCommonAncestor(true,true),V=U.getAscendant(this.element,true);V&&J(V,this);};function u(T){var U=T.getCommonAncestor(true,true),V=U.getAscendant(this.element,true);if(!V)return;var W=this,X=W._.definition,Y=X.attributes,Z=a.style.getStyleText(X);if(Y)for(var aa in Y)V.removeAttribute(aa,Y[aa]);if(X.styles)for(var ab in X.styles){if(!X.styles.hasOwnProperty(ab))continue;V.removeStyle(ab);}};function v(T){var U=T.createBookmark(true),V=T.createIterator();V.enforceRealBlocks=true;if(this._.enterMode)V.enlargeBr=this._.enterMode!=2;var W,X=T.document,Y;while(W=V.getNextParagraph()){var Z=I(this,X,W);x(W,Z);}T.moveToBookmark(U);};function w(T){var Y=this;var U=T.createBookmark(1),V=T.createIterator();V.enforceRealBlocks=true;V.enlargeBr=Y._.enterMode!=2;var W;while(W=V.getNextParagraph()){if(Y.checkElementRemovable(W))if(W.is('pre')){var X=Y._.enterMode==2?null:T.document.createElement(Y._.enterMode==1?'p':'div');X&&W.copyAttributes(X);x(W,X);}else E(Y,W,1);}T.moveToBookmark(U);};function x(T,U){var V=!U;if(V){U=T.getDocument().createElement('div');T.copyAttributes(U);}var W=U&&U.is('pre'),X=T.is('pre'),Y=W&&!X,Z=!W&&X;if(Y)U=D(T,U);else if(Z)U=C(V?[T.getHtml()]:A(T),U);else T.moveChildren(U);U.replace(T);if(W)z(U);else if(V)H(U);};var y=d.walker.whitespaces(1);function z(T){var U;if(!((U=T.getPrevious(y))&&U.is&&U.is('pre')))return;var V=B(U.getHtml(),/\n$/,'')+'\n\n'+B(T.getHtml(),/^\n/,'');if(c)T.$.outerHTML='<pre>'+V+'</pre>';else T.setHtml(V);U.remove();};function A(T){var U=/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=B(T.getOuterHtml(),U,function(Y,Z,aa){return Z+'</pre>'+aa+'<pre>';}),X=[];W.replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function B(T,U,V){var W='',X='';T=T.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);
-aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function C(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W<T.length;W++){var X=T[W];X=X.replace(/(\r\n|\r)/g,'\n');X=B(X,/^[ \t]*\n/,'');X=B(X,/\n$/,'');X=B(X,/^[ \t]+|[ \t]+$/g,function(Z,aa,ab){if(Z.length==1)return ' ';else if(!aa)return e.repeat(' ',Z.length-1)+' ';else return ' '+e.repeat(' ',Z.length-1);});X=X.replace(/\n/g,'<br>');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function D(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=B(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/<br\b[^>]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='<pre>'+W+'</pre>';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function E(T,U){var V=T._.definition,W=e.extend({},V.attributes,N(T)[U.getName()]),X=V.styles,Y=e.isEmpty(W)&&e.isEmpty(X);for(var Z in W){if((Z=='class'||T._.definition.fullMatch)&&U.getAttribute(Z)!=O(Z,W[Z]))continue;Y=U.hasAttribute(Z);U.removeAttribute(Z);}for(var aa in X){if(T._.definition.fullMatch&&U.getStyle(aa)!=O(aa,X[aa],true))continue;Y=Y||!!U.getStyle(aa);U.removeStyle(aa);}if(Y)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?H(U):U.renameNode(T._.enterMode==1?'p':'div');};function F(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)E(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);G(ac,Y[ab]);}}}};function G(T,U){var V=U&&U.attributes;if(V)for(var W=0;W<V.length;W++){var X=V[W][0],Y;if(Y=T.getAttribute(X)){var Z=V[W][1];if(Z===null||Z.test&&Z.test(Y)||typeof Z=='string'&&Y==Z)T.removeAttribute(X);}}H(T);};function H(T){if(!T.hasAttributes())if(f.$block[T.getName()]){var U=T.getPrevious(y),V=T.getNext(y);if(U&&(U.type==3||!U.isBlockBoundary({br:1})))T.append('br',1);if(V&&(V.type==3||!V.isBlockBoundary({br:1})))T.append('br');T.remove(true);}else{var W=T.getFirst(),X=T.getLast();T.remove(true);if(W){W.type==1&&W.mergeSiblings();if(X&&!W.equals(X)&&X.type==1)X.mergeSiblings();}}};function I(T,U,V){var W,X=T._.definition,Y=T.element;if(Y=='*')Y='span';W=new h(Y,U);if(V)V.copyAttributes(W);
-W=J(W,T);if(U.getCustomData('doc_processing_style')&&W.hasAttribute('id'))W.removeAttribute('id');else U.setCustomData('doc_processing_style',1);return W;};function J(T,U){var V=U._.definition,W=V.attributes,X=a.style.getStyleText(V);if(W)for(var Y in W)T.setAttribute(Y,W[Y]);if(X)T.setAttribute('style',X);return T;};var K=/#\((.+?)\)/g;function L(T,U){for(var V in T)T[V]=T[V].replace(K,function(W,X){return U[X];});};function M(T){var U=T._AC;if(U)return U;U={};var V=0,W=T.attributes;if(W)for(var X in W){V++;U[X]=W[X];}var Y=a.style.getStyleText(T);if(Y){if(!U.style)V++;U.style=Y;}U._length=V;return T._AC=U;};function N(T){if(T._.overrides)return T._.overrides;var U=T._.overrides={},V=T._.definition.overrides;if(V){if(!e.isArray(V))V=[V];for(var W=0;W<V.length;W++){var X=V[W],Y,Z,aa;if(typeof X=='string')Y=X.toLowerCase();else{Y=X.element?X.element.toLowerCase():T.element;aa=X.attributes;}Z=U[Y]||(U[Y]={});if(aa){var ab=Z.attributes=Z.attributes||[];for(var ac in aa)ab.push([ac.toLowerCase(),aa[ac]]);}}}return U;};function O(T,U,V){var W=new h('span');W[V?'setStyle':'setAttribute'](T,U);return W[V?'getStyle':'getAttribute'](T);};function P(T,U){var V;if(U!==false){var W=new h('span');W.setAttribute('style',T);V=W.getAttribute('style')||'';}else V=T;return V.replace(/\s*([;:])\s*/,'$1').replace(/([^\s;])$/,'$1;').replace(/,\s+/g,',').replace(/\"/g,'').toLowerCase();};function Q(T){var U={};T.replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(V,W,X){U[W]=X;});return U;};function R(T,U){typeof T=='string'&&(T=Q(T));typeof U=='string'&&(U=Q(U));for(var V in T){if(!(V in U&&(U[V]==T[V]||T[V]=='inherit'||U[V]=='inherit')))return false;}return true;};function S(T,U){var V=T.getSelection(),W=V.getRanges(),X=U?this.removeFromRange:this.applyToRange,Y,Z=W.createIterator();while(Y=Z.getNextRange())X.call(this,Y);V.selectRanges(W);T.removeCustomData('doc_processing_style');};})();a.styleCommand=function(m){this.style=m;};a.styleCommand.prototype.exec=function(m){var o=this;m.focus();var n=m.document;if(n)if(o.state==2)o.style.apply(n);else if(o.state==1)o.style.remove(n);return!!n;};a.stylesSet=new a.resourceManager('','stylesSet');a.addStylesSet=e.bind(a.stylesSet.add,a.stylesSet);a.loadStylesSet=function(m,n,o){a.stylesSet.addExternal(m,n,'');a.stylesSet.load(m,o);};a.editor.prototype.getStylesSet=function(m){if(!this._.stylesDefinitions){var n=this,o=n.config.stylesCombo_stylesSet||n.config.stylesSet||'default';if(o instanceof Array){n._.stylesDefinitions=o;
-m(o);return;}var p=o.split(':'),q=p[0],r=p[1],s=j.registered.styles.path;a.stylesSet.addExternal(q,r?p.slice(1).join(':'):s+'styles/'+q+'.js','');a.stylesSet.load(q,function(t){n._.stylesDefinitions=t[q];m(n._.stylesDefinitions);});}else m(this._.stylesDefinitions);};j.add('domiterator');(function(){function m(q){var r=this;if(arguments.length<1)return;r.range=q;r.forceBrBreak=0;r.enlargeBr=1;r.enforceRealBlocks=0;r._||(r._={});};var n=/^[\r\n\t ]+$/,o=d.walker.bookmark(false,true);function p(q,r,s){var t=q.getNextSourceNode(r,null,s);while(!o(t))t=t.getNextSourceNode(r,null,s);return t;};m.prototype={getNextParagraph:function(q){var Q=this;var r,s,t,u,v,w;if(!Q._.lastNode){s=Q.range.clone();s.shrink(1,true);u=s.endContainer.hasAscendant('pre',true)||s.startContainer.hasAscendant('pre',true);s.enlarge(Q.forceBrBreak&&!u||!Q.enlargeBr?3:2);var x=new d.walker(s),y=d.walker.bookmark(true,true);x.evaluator=y;Q._.nextNode=x.next();x=new d.walker(s);x.evaluator=y;var z=x.previous();Q._.lastNode=z.getNextSourceNode(true);if(Q._.lastNode&&Q._.lastNode.type==3&&!e.trim(Q._.lastNode.getText())&&Q._.lastNode.getParent().isBlockBoundary()){var A=new d.range(s.document);A.moveToPosition(Q._.lastNode,4);if(A.checkEndOfBlock()){var B=new d.elementPath(A.endContainer),C=B.block||B.blockLimit;Q._.lastNode=C.getNextSourceNode(true);}}if(!Q._.lastNode){Q._.lastNode=Q._.docEndMarker=s.document.createText('');Q._.lastNode.insertAfter(z);}s=null;}var D=Q._.nextNode;z=Q._.lastNode;Q._.nextNode=null;while(D){var E=0,F=D.hasAscendant('pre'),G=D.type!=1,H=0;if(!G){var I=D.getName();if(D.isBlockBoundary(Q.forceBrBreak&&!F&&{br:1})){if(I=='br')G=1;else if(!s&&!D.getChildCount()&&I!='hr'){r=D;t=D.equals(z);break;}if(s){s.setEndAt(D,3);if(I!='br')Q._.nextNode=D;}E=1;}else{if(D.getFirst()){if(!s){s=new d.range(Q.range.document);s.setStartAt(D,3);}D=D.getFirst();continue;}G=1;}}else if(D.type==3)if(n.test(D.getText()))G=0;if(G&&!s){s=new d.range(Q.range.document);s.setStartAt(D,3);}t=(!E||G)&&D.equals(z);if(s&&!E)while(!D.getNext(o)&&!t){var J=D.getParent();if(J.isBlockBoundary(Q.forceBrBreak&&!F&&{br:1})){E=1;t=t||J.equals(z);break;}D=J;G=1;t=D.equals(z);H=1;}if(G)s.setEndAt(D,4);D=p(D,H,z);t=!D;if(t||E&&s)break;}if(!r){if(!s){Q._.docEndMarker&&Q._.docEndMarker.remove();Q._.nextNode=null;return null;}var K=new d.elementPath(s.startContainer),L=K.blockLimit,M={div:1,th:1,td:1};r=K.block;if(!r&&!Q.enforceRealBlocks&&M[L.getName()]&&s.checkStartOfBlock()&&s.checkEndOfBlock())r=L;else if(!r||Q.enforceRealBlocks&&r.getName()=='li'){r=Q.range.document.createElement(q||'p');
-s.extractContents().appendTo(r);r.trim();s.insertNode(r);v=w=true;}else if(r.getName()!='li'){if(!s.checkStartOfBlock()||!s.checkEndOfBlock()){r=r.clone(false);s.extractContents().appendTo(r);r.trim();var N=s.splitBlock();v=!N.wasStartOfBlock;w=!N.wasEndOfBlock;s.insertNode(r);}}else if(!t)Q._.nextNode=r.equals(z)?null:p(s.getBoundaryNodes().endNode,1,z);}if(v){var O=r.getPrevious();if(O&&O.type==1)if(O.getName()=='br')O.remove();else if(O.getLast()&&O.getLast().$.nodeName.toLowerCase()=='br')O.getLast().remove();}if(w){var P=r.getLast();if(P&&P.type==1&&P.getName()=='br')if(c||P.getPrevious(o)||P.getNext(o))P.remove();}if(!Q._.nextNode)Q._.nextNode=t||r.equals(z)?null:p(r,1,z);return r;}};d.range.prototype.createIterator=function(){return new m(this);};})();j.add('panelbutton',{requires:['button'],beforeInit:function(m){m.ui.addHandler(4,k.panelButton.handler);}});a.UI_PANELBUTTON=4;(function(){var m=function(n){var p=this;var o=p._;if(o.state==0)return;p.createPanel(n);if(o.on){o.panel.hide();return;}o.panel.showBlock(p._.id,p.document.getById(p._.id),4);};k.panelButton=e.createClass({base:k.button,$:function(n){var p=this;var o=n.panel;delete n.panel;p.base(n);p.document=o&&o.parent&&o.parent.getDocument()||a.document;o.block={attributes:o.attributes};p.hasArrow=true;p.click=m;p._={panelDefinition:o};},statics:{handler:{create:function(n){return new k.panelButton(n);}}},proto:{createPanel:function(n){var o=this._;if(o.panel)return;var p=this._.panelDefinition||{},q=this._.panelDefinition.block,r=p.parent||a.document.getBody(),s=this._.panel=new k.floatPanel(n,r,p),t=s.addBlock(o.id,q),u=this;s.onShow=function(){if(u.className)this.element.getFirst().addClass(u.className+'_panel');u.setState(1);o.on=1;if(u.onOpen)u.onOpen();};s.onHide=function(v){if(u.className)this.element.getFirst().removeClass(u.className+'_panel');u.setState(u.modes&&u.modes[n.mode]?2:0);o.on=0;if(!v&&u.onClose)u.onClose();};s.onEscape=function(){s.hide();u.document.getById(o.id).focus();};if(this.onBlock)this.onBlock(s,t);t.onHide=function(){o.on=0;u.setState(2);};}}});})();j.add('floatpanel',{requires:['panel']});(function(){var m={},n=false;function o(p,q,r,s,t){var u=e.genKey(q.getUniqueId(),r.getUniqueId(),p.skinName,p.lang.dir,p.uiColor||'',s.css||'',t||''),v=m[u];if(!v){v=m[u]=new k.panel(q,s);v.element=r.append(h.createFromHtml(v.renderHtml(p),q));v.element.setStyles({display:'none',position:'absolute'});}return v;};k.floatPanel=e.createClass({$:function(p,q,r,s){r.forceIFrame=1;
-var t=q.getDocument(),u=o(p,t,q,r,s||0),v=u.element,w=v.getFirst().getFirst();this.element=v;this._={panel:u,parentElement:q,definition:r,document:t,iframe:w,children:[],dir:p.lang.dir};p.on('mode',function(){this.hide();},this);},proto:{addBlock:function(p,q){return this._.panel.addBlock(p,q);},addListBlock:function(p,q){return this._.panel.addListBlock(p,q);},getBlock:function(p){return this._.panel.getBlock(p);},showBlock:function(p,q,r,s,t){var u=this._.panel,v=u.showBlock(p);this.allowBlur(false);n=1;var w=this.element,x=this._.iframe,y=this._.definition,z=q.getDocumentPosition(w.getDocument()),A=this._.dir=='rtl',B=z.x+(s||0),C=z.y+(t||0);if(A&&(r==1||r==4))B+=q.$.offsetWidth;else if(!A&&(r==2||r==3))B+=q.$.offsetWidth-1;if(r==3||r==4)C+=q.$.offsetHeight-1;this._.panel._.offsetParentId=q.getId();w.setStyles({top:C+'px',left:0,display:''});w.setOpacity(0);w.getFirst().removeStyle('width');if(!this._.blurSet){var D=c?x:new d.window(x.$.contentWindow);a.event.useCapture=true;D.on('blur',function(E){var G=this;if(!G.allowBlur())return;var F;if(c&&!G.allowBlur()||(F=E.data.getTarget())&&F.getName&&F.getName()!='iframe')return;if(G.visible&&!G._.activeChild&&!n)G.hide();},this);D.on('focus',function(){this._.focused=true;this.hideChild();this.allowBlur(true);},this);a.event.useCapture=false;this._.blurSet=1;}u.onEscape=e.bind(function(E){if(this.onEscape&&this.onEscape(E)===false)return false;},this);e.setTimeout(function(){if(A)B-=w.$.offsetWidth;var E=e.bind(function(){var F=w.getFirst();if(v.autoSize){var G=v.element.$;if(b.gecko||b.opera)G=G.parentNode;if(c)G=G.document.body;var H=G.scrollWidth;if(c&&b.quirks&&H>0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0);H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0);F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');var J=u.element,K=J.getWindow(),L=K.getScrollPosition(),M=K.getViewPaneSize(),N={height:J.$.offsetHeight,width:J.$.offsetWidth};if(A?B<0:B+N.width>M.width+L.x)B+=N.width*(A?1:-1);if(C+N.height>M.height+L.y)C-=N.height;if(c){var O=new h(w.$.offsetParent),P=O;if(P.getName()=='html')P=P.getDocument().getBody();if(P.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=O.$.scrollWidth-O.$.clientWidth;}var Q=w.getFirst(),R;if(R=Q.getCustomData('activePanel'))R.onHide&&R.onHide.call(this,1);
-Q.setCustomData('activePanel',this);w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(){var p=this;if(p.visible&&(!p.onHide||p.onHide.call(p)!==true)){p.hideChild();p.element.setStyle('display','none');p.visible=0;p.element.getFirst().removeCustomData('activePanel');}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q<n.length;q++)o[n[q]]=q+1;m.addMenuGroup=function(r,s){o[r]=s||100;};m.addMenuItem=function(r,s){if(o[s.group])p[r]=new a.menuItem(this,r,s);};m.addMenuItems=function(r){for(var s in r)this.addMenuItem(s,r[s]);};m.getMenuItem=function(r){return p[r];};},requires:['floatpanel']});(function(){a.menu=e.createClass({$:function(n,o){var r=this;o=r._.definition=o||{};r.id=e.getNextId();r.editor=n;r.items=[];r._.listeners=[];r._.level=o.level||1;var p=e.extend({},o.panel,{css:n.skin.editor.css,level:r._.level-1,block:{}}),q=p.block.attributes=p.attributes||{};!q.role&&(q.role='menu');r._.panelDefinition=p;},_:{onShow:function(){var v=this;var n=v.editor.getSelection();if(c)n&&n.lock();var o=n&&n.getStartElement(),p=v._.listeners,q=[];v.removeAll();for(var r=0;r<p.length;r++){var s=p[r](o,n);if(s)for(var t in s){var u=v.editor.getMenuItem(t);if(u){u.state=s[t];v.add(u);}}}},onClick:function(n){this.hide();if(n.onClick)n.onClick();else if(n.command)this.editor.execCommand(n.command);},onEscape:function(n){var o=this.parent;if(o){o._.panel.hideChild();var p=o._.panel._.panel._.currentBlock,q=p._.focusIndex;p._.markItem(q);}else if(n==27){this.hide();
-this.editor.focus();}return false;},onHide:function(){if(c){var n=this.editor.getSelection();n&&n.unlock();}this.onHide&&this.onHide();},showSubMenu:function(n){var v=this;var o=v._.subMenu,p=v.items[n],q=p.getItems&&p.getItems();if(!q){v._.panel.hideChild();return;}var r=v._.panel.getBlock(v.id);r._.focusIndex=n;if(o)o.removeAll();else{o=v._.subMenu=new a.menu(v.editor,e.extend({},v._.definition,{level:v._.level+1},true));o.parent=v;o._.onClick=e.bind(v._.onClick,v);}for(var s in q){var t=v.editor.getMenuItem(s);if(t){t.state=q[s];o.add(t);}}var u=v._.panel.getBlock(v.id).element.getDocument().getById(v.id+String(n));o.show(u,2);}},proto:{add:function(n){if(!n.order)n.order=this.items.length;this.items.push(n);},removeAll:function(){this.items=[];},show:function(n,o,p,q){if(!this.parent){this._.onShow();if(!this.items.length)return;}o=o||(this.editor.lang.dir=='rtl'?2:1);var r=this.items,s=this.editor,t=this._.panel,u=this._.element;if(!t){t=this._.panel=new k.floatPanel(this.editor,a.document.getBody(),this._.panelDefinition,this._.level);t.onEscape=e.bind(function(F){if(this._.onEscape(F)===false)return false;},this);t.onHide=e.bind(function(){this._.onHide&&this._.onHide();},this);var v=t.addBlock(this.id,this._.panelDefinition.block);v.autoSize=true;var w=v.keys;w[40]='next';w[9]='next';w[38]='prev';w[2000+9]='prev';w[32]='click';w[s.lang.dir=='rtl'?37:39]='click';u=this._.element=v.element;u.addClass(s.skinClass);var x=u.getDocument();x.getBody().setStyle('overflow','hidden');x.getElementsByTag('html').getItem(0).setStyle('overflow','hidden');this._.itemOverFn=e.addFunction(function(F){var G=this;clearTimeout(G._.showSubTimeout);G._.showSubTimeout=e.setTimeout(G._.showSubMenu,s.config.menu_subMenuDelay||400,G,[F]);},this);this._.itemOutFn=e.addFunction(function(F){clearTimeout(this._.showSubTimeout);},this);this._.itemClickFn=e.addFunction(function(F){var H=this;var G=H.items[F];if(G.state==0){H.hide();return;}if(G.getItems)H._.showSubMenu(F);else H._.onClick(G);},this);}m(r);var y=s.container.getChild(1),z=y.hasClass('cke_mixed_dir_content')?' cke_mixed_dir_content':'',A=['<div class="cke_menu'+z+'" role="presentation">'],B=r.length,C=B&&r[0].group;for(var D=0;D<B;D++){var E=r[D];if(C!=E.group){A.push('<div class="cke_menuseparator" role="separator"></div>');C=E.group;}E.render(this,D,A);}A.push('</div>');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);
-},addListener:function(n){this._.listeners.push(n);},hide:function(){var n=this;n._.onHide&&n._.onHide();n._.panel&&n._.panel.hide();}}});function m(n){n.sort(function(o,p){if(o.group<p.group)return-1;else if(o.group>p.group)return 1;return o.order<p.order?-1:o.order>p.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push('<span class="cke_menuitem'+(w.icon&&w.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">'+'<a id="',q,'" class="',s,'" href="javascript:void(\'',(w.label||'').replace("'",''),'\')" title="',w.label,'" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem"'+(u?'aria-haspopup="true"':'')+(r==0?'aria-disabled="true"':'')+(r==1?'aria-pressed="true"':''));if(b.opera||b.gecko&&b.mac)p.push(' onkeypress="return false;"');if(b.gecko)p.push(' onblur="this.style.cssText = this.style.cssText;"');var v=(w.iconOffset||0)*-16;p.push(' onmouseover="CKEDITOR.tools.callFunction(',n._.itemOverFn,',',o,');" onmouseout="CKEDITOR.tools.callFunction(',n._.itemOutFn,',',o,');" onclick="CKEDITOR.tools.callFunction(',n._.itemClickFn,',',o,'); return false;"><span class="cke_icon_wrapper"><span class="cke_icon"'+(w.icon?' style="background-image:url('+a.getUrl(w.icon)+');background-position:0 '+v+'px;"':'')+'></span></span>'+'<span class="cke_label">');if(u)p.push('<span class="cke_menuarrow">','<span>&#',w.editor.lang.dir=='rtl'?'9668':'9658',';</span>','</span>');p.push(t,'</span></a></span>');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m=function(o,p){return o._.modes&&o._.modes[p||o.mode];},n;j.add('editingblock',{init:function(o){if(!o.config.editingBlock)return;o.on('themeSpace',function(p){if(p.data.space=='contents')p.data.html+='<br>';});o.on('themeLoaded',function(){o.fireOnce('editingBlockReady');});o.on('uiReady',function(){o.setMode(o.config.startupMode);});o.on('afterSetData',function(){if(!n){function p(){n=true;m(o).loadData(o.getData());n=false;};if(o.mode)p();else o.on('mode',function(){p();o.removeListener('mode',arguments.callee);});}});o.on('beforeGetData',function(){if(!n&&o.mode){n=true;
-o.setData(m(o).getData(),null,1);n=false;}});o.on('getSnapshot',function(p){if(o.mode)p.data=m(o).getSnapshotData();});o.on('loadSnapshot',function(p){if(o.mode)m(o).loadSnapshotData(p.data);});o.on('mode',function(p){p.removeListener();b.webkit&&o.container.on('focus',function(){o.focus();});if(o.config.startupFocus)o.focus();setTimeout(function(){o.fireOnce('instanceReady');a.fire('instanceReady',null,o);},0);});o.on('destroy',function(){var p=this;if(p.mode)p._.modes[p.mode].unload(p.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(o,p){p.name=o;(this._.modes||(this._.modes={}))[o]=p;};a.editor.prototype.setMode=function(o){var p,q=this.getThemeSpace('contents'),r=this.checkDirty();if(this.mode){if(o==this.mode)return;this.fire('beforeModeUnload');var s=m(this);p=s.getData();s.unload(q);this.mode='';}q.setHtml('');var t=m(this,o);if(!t)throw '[CKEDITOR.editor.setMode] Unknown mode "'+o+'".';if(!r)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});t.load(q,typeof p!='string'?this.getData():p);};a.editor.prototype.focus=function(){var o=m(this);if(o)o.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var w=this;try{var t=w.getSelection();if(!t||!t.document.getWindow().$)return;var u=t.getStartElement(),v=new d.elementPath(u);if(!v.compare(w._.selectionPreviousPath)){w._.selectionPreviousPath=v;w.fire('selectionChange',{selection:t,path:v,element:u});}}catch(x){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};var r={modes:{wysiwyg:1,source:1},exec:function(t){switch(t.mode){case 'wysiwyg':t.document.$.execCommand('SelectAll',false,null);t.forceNextSelectionCheck();t.selectionChange();break;case 'source':var u=t.textarea.$;if(c)u.createTextRange().execCommand('SelectAll');else{u.selectionStart=0;u.selectionEnd=u.value.length;}u.focus();}},canUndo:false};j.add('selection',{init:function(t){t.on('contentDom',function(){var u=t.document,v=u.getBody(),w=u.getDocumentElement();if(c){var x,y,z=1;v.on('focusin',function(D){if(D.data.$.srcElement.nodeName!='BODY')return;if(x){var E=u.getCustomData('cke_locked_selection');if(z&&!E)try{x.select();}catch(F){}x=null;}});v.on('focus',function(){y=1;C();});v.on('beforedeactivate',function(D){if(D.data.$.toElement)return;y=0;z=1;});if(c&&b.version<8)t.on('blur',function(D){try{t.document&&t.document.$.selection.empty();
-}catch(E){}});w.on('mousedown',function(){z=0;});w.on('mouseup',function(){z=1;});if(c&&(b.ie7Compat||b.version<8||b.quirks))w.on('click',function(D){if(D.data.getTarget().getName()=='html')t.getSelection().getRanges()[0].select();});var A;v.on('mousedown',function(D){if(D.data.$.button==2){var E=t.document.$.selection;if(E.type=='None')A=t.window.getScrollPosition();}B();});v.on('mouseup',function(D){if(D.data.$.button==2&&A){t.document.$.documentElement.scrollLeft=A.x;t.document.$.documentElement.scrollTop=A.y;}A=null;y=1;setTimeout(function(){C(true);},0);});v.on('keydown',B);v.on('keyup',function(){y=1;C();});u.on('selectionchange',C);function B(){y=0;};function C(D){if(y){var E=t.document,F=t.getSelection(),G=F&&F.getNative();if(D&&G&&G.type=='None')if(!E.$.queryCommandEnabled('InsertImage')){e.setTimeout(C,50,this,true);return;}var H;if(G&&G.type&&G.type!='Control'&&(H=G.createRange())&&(H=H.parentElement())&&(H=H.nodeName)&&H.toLowerCase() in {input:1,textarea:1})return;x=G&&F.getRanges()[0];p.call(t);}};}else{u.on('mouseup',p,t);u.on('keyup',p,t);}});t.on('contentDomUnload',t.forceNextSelectionCheck,t);t.addCommand('selectAll',r);t.ui.addButton('SelectAll',{label:t.lang.selectAll,command:'selectAll'});t.selectionChange=p;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var t=new d.selection(this);return!t||t.isInvalid?null:t;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(t){var w=this;var u=t.getCustomData('cke_locked_selection');if(u)return u;w.document=t;w.isLocked=0;w._={cache:{}};if(c){var v=w.getNative().createRange();if(!v||v.item&&v.item(0).ownerDocument!=w.document.$||v.parentElement&&v.parentElement().ownerDocument!=w.document.$)w.isInvalid=true;}return w;};var s={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,th:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var t=this._.cache;if(t.type)return t.type;var u=1;try{var v=this.getNative(),w=v.type;if(w=='Text')u=2;if(w=='Control')u=3;if(v.createRange().parentElement)u=2;}catch(x){}return t.type=u;
-}:function(){var t=this._.cache;if(t.type)return t.type;var u=2,v=this.getNative();if(!v)u=1;else if(v.rangeCount==1){var w=v.getRangeAt(0),x=w.startContainer;if(x==w.endContainer&&x.nodeType==1&&w.endOffset-w.startOffset==1&&s[x.childNodes[w.startOffset].nodeName.toLowerCase()])u=3;}return t.type=u;},getRanges:(function(){var t=c?(function(){function u(w){return new d.node(w).getIndex();};var v=function(w,x){w=w.duplicate();w.collapse(x);var y=w.parentElement();if(!y.hasChildNodes())return{container:y,offset:0};var z=y.children,A,B=w.duplicate(),C=0,D=z.length-1,E=-1,F,G;while(C<=D){E=Math.floor((C+D)/2);A=z[E];B.moveToElementText(A);F=B.compareEndPoints('StartToStart',w);if(F>0)D=E-1;else if(F<0)C=E+1;else return{container:y,offset:u(A)};}if(E==-1||E==z.length-1&&F<0){B.moveToElementText(y);B.setEndPoint('StartToStart',w);G=B.text.replace(/(\r\n|\r)/g,'\n').length;z=y.childNodes;if(!G){A=z[z.length-1];if(A.nodeType==1)return{container:y,offset:z.length};else return{container:A,offset:A.nodeValue.length};}var H=z.length;while(G>0)G-=z[--H].nodeValue.length;return{container:z[H],offset:-G};}else{B.collapse(F>0?true:false);B.setEndPoint(F>0?'StartToStart':'EndToStart',w);G=B.text.replace(/(\r\n|\r)/g,'\n').length;if(!G)return{container:y,offset:u(A)+(F>0?0:1)};while(G>0){A=A[F>0?'previousSibling':'nextSibling'];try{G-=A.nodeValue.length;}catch(I){return{container:y,offset:u(A)};}}return{container:A,offset:F>0?-G:A.nodeValue.length+G};}};return function(){var G=this;var w=G.getNative(),x=w&&w.createRange(),y=G.getType(),z;if(!w)return[];if(y==2){z=new d.range(G.document);var A=v(x,true);z.setStart(new d.node(A.container),A.offset);A=v(x);z.setEnd(new d.node(A.container),A.offset);if(z.endContainer.getPosition(z.startContainer)&4&&z.endOffset<=z.startContainer.getIndex())z.collapse();return[z];}else if(y==3){var B=[];for(var C=0;C<x.length;C++){var D=x.item(C),E=D.parentNode,F=0;z=new d.range(G.document);for(;F<E.childNodes.length&&E.childNodes[F]!=D;F++){}z.setStart(new d.node(E),F);z.setEnd(new d.node(E),F+1);B.push(z);}return B;}return[];};})():function(){var u=[],v,w=this.document,x=this.getNative();if(!x)return u;if(!x.rangeCount){v=new d.range(w);v.moveToElementEditStart(w.getBody());u.push(v);}for(var y=0;y<x.rangeCount;y++){var z=x.getRangeAt(y);v=new d.range(w);v.setStart(new d.node(z.startContainer),z.startOffset);v.setEnd(new d.node(z.endContainer),z.endOffset);u.push(v);}return u;};return function(u){var v=this._.cache;if(v.ranges&&!u)return v.ranges;
-else if(!v.ranges)v.ranges=new d.rangeList(t.call(this));if(u){var w=v.ranges;for(var x=0;x<w.length;x++){var y=w[x],z=y.getCommonAncestor();if(z.isReadOnly())w.splice(x,1);if(y.collapsed)continue;var A=y.startContainer,B=y.endContainer,C=y.startOffset,D=y.endOffset,E=y.clone(),F;if(F=A.isReadOnly())y.setStartAfter(F);if(A&&A.type==3)if(C>=A.getLength())E.setStartAfter(A);else E.setStartBefore(A);if(B&&B.type==3)if(!D)E.setEndBefore(B);else E.setEndAfter(B);var G=new d.walker(E);G.evaluator=function(H){if(H.type==1&&H.isReadOnly()){var I=y.clone();y.setEndBefore(H);if(y.collapsed)w.splice(x--,1);if(!(H.getPosition(E.endContainer)&16)){I.setStartAfter(H);if(!I.collapsed)w.splice(x+1,0,I);}return true;}return false;};G.next();}}return v.ranges;};})(),getStartElement:function(){var A=this;var t=A._.cache;if(t.startElement!==undefined)return t.startElement;var u,v=A.getNative();switch(A.getType()){case 3:return A.getSelectedElement();case 2:var w=A.getRanges()[0];if(w){if(!w.collapsed){w.optimize();while(1){var x=w.startContainer,y=w.startOffset;if(y==(x.getChildCount?x.getChildCount():x.getLength())&&!x.isBlockBoundary())w.setStartAfter(x);else break;}u=w.startContainer;if(u.type!=1)return u.getParent();u=u.getChild(w.startOffset);if(!u||u.type!=1)u=w.startContainer;else{var z=u.getFirst();while(z&&z.type==1){u=z;z=z.getFirst();}}}else{u=w.startContainer;if(u.type!=1)u=u.getParent();}u=u.$;}}return t.startElement=u?new h(u):null;},getSelectedElement:function(){var t=this._.cache;if(t.selectedElement!==undefined)return t.selectedElement;var u=this,v=e.tryThese(function(){return u.getNative().createRange().item(0);},function(){var w=u.getRanges()[0],x,y;for(var z=2;z&&!((x=w.getEnclosedNode())&&x.type==1&&s[x.getName()]&&(y=x));z--)w.shrink(1);return y.$;});return t.selectedElement=v?new h(v):null;},lock:function(){var t=this;t.getRanges();t.getStartElement();t.getSelectedElement();t._.cache.nativeSel={};t.isLocked=1;t.document.setCustomData('cke_locked_selection',t);},unlock:function(t){var y=this;var u=y.document,v=u.getCustomData('cke_locked_selection');if(v){u.setCustomData('cke_locked_selection',null);if(t){var w=v.getSelectedElement(),x=!w&&v.getRanges();y.isLocked=0;y.reset();u.getBody().focus();if(w)y.selectElement(w);else y.selectRanges(x);}}if(!v||!t){y.isLocked=0;y.reset();}},reset:function(){this._.cache={};},selectElement:function(t){var w=this;if(w.isLocked){var u=new d.range(w.document);u.setStartBefore(t);u.setEndAfter(t);w._.cache.selectedElement=t;
-w._.cache.startElement=t;w._.cache.ranges=new d.rangeList(u);w._.cache.type=3;return;}if(c){w.getNative().empty();try{u=w.document.$.body.createControlRange();u.addElement(t.$);u.select();}catch(x){u=w.document.$.body.createTextRange();u.moveToElementText(t.$);u.select();}finally{w.document.fire('selectionchange');}w.reset();}else{u=w.document.$.createRange();u.selectNode(t.$);var v=w.getNative();v.removeAllRanges();v.addRange(u);w.reset();}},selectRanges:function(t){var F=this;if(F.isLocked){F._.cache.selectedElement=null;F._.cache.startElement=t[0]&&t[0].getTouchedStartNode();F._.cache.ranges=new d.rangeList(t);F._.cache.type=2;return;}if(c){if(t.length>1){var u=t[t.length-1];t[0].setEnd(u.endContainer,u.endOffset);t.length=1;}if(t[0])t[0].select();F.reset();}else{var v=F.getNative();if(t.length)v.removeAllRanges();for(var w=0;w<t.length;w++){if(w<t.length-1){var x=t[w],y=t[w+1],z=x.clone();z.setStart(x.endContainer,x.endOffset);z.setEnd(y.startContainer,y.startOffset);if(!z.collapsed){z.shrink(1,true);var A=z.getCommonAncestor(),B=z.getEnclosedNode();if(A.isReadOnly()||B&&B.isReadOnly()){y.setStart(x.startContainer,x.startOffset);t.splice(w--,1);continue;}}}var C=t[w],D=F.document.$.createRange(),E=C.startContainer;if(C.collapsed&&(b.opera||b.gecko&&b.version<10900)&&E.type==1&&!E.getChildCount())E.appendText('');D.setStart(E.$,C.startOffset);D.setEnd(C.endContainer.$,C.endOffset);v.addRange(D);}F.reset();}},createBookmarks:function(t){return this.getRanges().createBookmarks(t);},createBookmarks2:function(t){return this.getRanges().createBookmarks2(t);},selectBookmarks:function(t){var u=[];for(var v=0;v<t.length;v++){var w=new d.range(this.document);w.moveToBookmark(t[v]);u.push(w);}this.selectRanges(u);return this;},getCommonAncestor:function(){var t=this.getRanges(),u=t[0].startContainer,v=t[t.length-1].endContainer;return u.getCommonAncestor(v);},scrollIntoView:function(){var t=this.getStartElement();t.scrollIntoView();}};})();(function(){var m=d.walker.whitespaces(true),n=/\ufeff|\u00a0/,o={table:1,tbody:1,tr:1};d.range.prototype.select=c?function(p){var z=this;var q=z.collapsed,r,s;if(z.startContainer.type==1&&z.startContainer.getName() in o||z.endContainer.type==1&&z.endContainer.getName() in o)z.shrink(1,true);var t=z.createBookmark(),u=t.startNode,v;if(!q)v=t.endNode;var w=z.document.$.body.createTextRange();w.moveToElementText(u.$);w.moveStart('character',1);if(v){var x=z.document.$.body.createTextRange();x.moveToElementText(v.$);w.setEndPoint('EndToEnd',x);
-w.moveEnd('character',-1);}else{var y=u.getNext(m);r=!(y&&y.getText&&y.getText().match(n))&&(p||!u.hasPrevious()||u.getPrevious().is&&u.getPrevious().is('br'));s=z.document.createElement('span');s.setHtml('');s.insertBefore(u);if(r)z.document.createText('\ufeff').insertBefore(u);}z.setStartBefore(u);u.remove();if(q){if(r){w.moveStart('character',-1);w.select();z.document.$.selection.clear();}else w.select();z.moveToPosition(s,3);s.remove();}else{z.setEndBefore(v);v.remove();w.select();}z.document.fire('selectionchange');}:function(){var s=this;var p=s.startContainer;if(s.collapsed&&p.type==1&&!p.getChildCount())p.append(new d.text(''));var q=s.document.$.createRange();q.setStart(p.$,s.startOffset);try{q.setEnd(s.endContainer.$,s.endOffset);}catch(t){if(t.toString().indexOf('NS_ERROR_ILLEGAL_VALUE')>=0){s.collapse(true);q.setEnd(s.endContainer.$,s.endOffset);}else throw t;}var r=s.document.getSelection().getNative();if(r){r.removeAllRanges();r.addRange(q);}};})();(function(){var m={elements:{$:function(n){var o=n.attributes,p=o&&o['data-cke-realelement'],q=p&&new a.htmlParser.fragment.fromHtml(decodeURIComponent(p)),r=q&&q.children[0];if(r&&n.attributes['data-cke-resizable']){var s=n.attributes.style;if(s){var t=/(?:^|\s)width\s*:\s*(\d+)/i.exec(s),u=t&&t[1];t=/(?:^|\s)height\s*:\s*(\d+)/i.exec(s);var v=t&&t[1];if(u)r.attributes.width=u;if(v)r.attributes.height=v;}}return r;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(n){var o=n.dataProcessor,p=o&&o.htmlFilter;if(p)p.addRules(m);}});})();a.editor.prototype.createFakeElement=function(m,n,o,p){var q=this.lang.fakeobjects,r=q[o]||q.unknown,s={'class':n,src:a.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(m.getOuterHtml()),'data-cke-real-node-type':m.type,alt:r,title:r,align:m.getAttribute('align')||''};if(o)s['data-cke-real-element-type']=o;if(p)s['data-cke-resizable']=p;return this.document.createElement('img',{attributes:s});};a.editor.prototype.createFakeParserElement=function(m,n,o,p){var q=this.lang.fakeobjects,r=q[o]||q.unknown,s,t=new a.htmlParser.basicWriter();m.writeHtml(t);s=t.getHtml();var u={'class':n,src:a.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(s),'data-cke-real-node-type':m.type,alt:r,title:r,align:m.attributes.align||''};if(o)u['data-cke-real-element-type']=o;if(p)u['data-cke-resizable']=p;return new a.htmlParser.element('img',u);};a.editor.prototype.restoreRealElement=function(m){if(m.data('cke-real-node-type')!=1)return null;
-return h.createFromHtml(decodeURIComponent(m.data('cke-realelement')),this.document);};j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(m){m.ui.addHandler(3,k.richCombo.handler);}});a.UI_RICHCOMBO=3;k.richCombo=e.createClass({$:function(m){var o=this;e.extend(o,m,{title:m.label,modes:{wysiwyg:1}});var n=o.panel||{};delete o.panel;o.id=e.getNextNumber();o.document=n&&n.parent&&n.parent.getDocument()||a.document;n.className=(n.className||'')+' cke_rcombopanel';n.block={multiSelect:n.multiSelect,attributes:n.attributes};o._={panelDefinition:n,items:{},state:2};},statics:{handler:{create:function(m){return new k.richCombo(m);}}},proto:{renderHtml:function(m){var n=[];this.render(m,n);return n.join('');},render:function(m,n){var o=b,p='cke_'+this.id,q=e.addFunction(function(t){var w=this;var u=w._;if(u.state==0)return;w.createPanel(m);if(u.on){u.panel.hide();return;}w.commit();var v=w.getValue();if(v)u.list.mark(v);else u.list.unmarkAll();u.panel.showBlock(w.id,new h(t),4);},this),r={id:p,combo:this,focus:function(){var t=a.document.getById(p).getChild(1);t.focus();},clickFn:q};m.on('mode',function(){this.setState(this.modes[m.mode]?2:0);this.setValue('');},this);var s=e.addFunction(function(t,u){t=new d.event(t);var v=t.getKeystroke();switch(v){case 13:case 32:case 40:e.callFunction(q,u);break;default:r.onkey(r,v);}t.preventDefault();});r.keyDownFn=s;n.push('<span class="cke_rcombo">','<span id=',p);if(this.className)n.push(' class="',this.className,' cke_off"');n.push('>','<span id="'+p+'_label" class=cke_label>',this.label,'</span>','<a hidefocus=true title="',this.title,'" tabindex="-1"',o.gecko&&o.version>=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',s,', event, this );" onclick="CKEDITOR.tools.callFunction(',q,', this); return false;"><span><span id="'+p+'_text" class="cke_text cke_inline_label">'+this.label+'</span>'+'</span>'+'<span class=cke_openbutton>'+(b.hc?'<span>▼</span>':b.air?' ':'')+'</span>'+'</a>'+'</span>'+'</span>');if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;
-q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();s.document.getById('cke_'+s.id).getFirst().getNext().focus();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide();};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m);},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,3,n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];
-if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('</',m,'>');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('<!--',m,'-->');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler(5,k.menuButton.handler);}});a.UI_MENUBUTTON=5;(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w<arguments.length;w++)v.push(arguments[w]);v.push(true);e.extend.apply(e,v);return x._;},n={build:function(u,v,w){return new k.dialog.textInput(u,v,w);}},o={build:function(u,v,w){return new k.dialog[v.type](u,v,w);}},p={build:function(u,v,w){var x=v.children,y,z=[],A=[];for(var B=0;B<x.length&&(y=x[B]);B++){var C=[];z.push(C);A.push(a.dialog._.uiElementBuilders[y.type].build(u,y,C));
-}return new k.dialog[v.type](u,A,z,w,v);}},q={isChanged:function(){return this.getValue()!=this.getInitValue();},reset:function(u){this.setValue(this.getInitValue(),u);},setInitValue:function(){this._.initValue=this.getValue();},resetInitValue:function(){this._.initValue=this._['default'];},getInitValue:function(){return this._.initValue;}},r=e.extend({},k.dialog.uiElement.prototype.eventProcessors,{onChange:function(u,v){if(!this._.domOnChangeRegistered){u.on('load',function(){this.getInputElement().on('change',function(){if(!u.parts.dialog.isVisible())return;this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',v);}},true),s=/^on([A-Z]\w+)/,t=function(u){for(var v in u){if(s.test(v)||v=='title'||v=='type')delete u[v];}return u;};e.extend(k.dialog,{labeledElement:function(u,v,w,x){if(arguments.length<4)return;var y=m.call(this,v);y.labelId=e.getNextId()+'_label';var z=this._.children=[],A=function(){var B=[],C=v.required?' cke_required':'';if(v.labelLayout!='horizontal')B.push('<label class="cke_dialog_ui_labeled_label'+C+'" ',' id="'+y.labelId+'"',' for="'+y.inputId+'"',' style="'+v.labelStyle+'">',v.label,'</label>','<div class="cke_dialog_ui_labeled_content" role="presentation">',x.call(this,u,v),'</div>');else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'<label class="cke_dialog_ui_labeled_label'+C+'"'+' id="'+y.labelId+'"'+' for="'+y.inputId+'"'+' style="'+v.labelStyle+'">'+e.htmlEncode(v.label)+'</span>'},{type:'html',html:'<span class="cke_dialog_ui_labeled_content">'+x.call(this,u,v)+'</span>'}]};a.dialog._.uiElementBuilders.hbox.build(u,D,B);}return B.join('');};k.dialog.uiElement.call(this,u,v,w,'div',null,{role:'presentation'},A);},textInput:function(u,v,w){if(arguments.length<3)return;m.call(this,v);var x=this._.inputId=e.getNextId()+'_textInput',y={'class':'cke_dialog_ui_input_'+v.type,id:x,type:'text'},z;if(v.validate)this.validate=v.validate;if(v.maxLength)y.maxlength=v.maxLength;if(v.size)y.size=v.size;if(v.controlStyle)y.style=v.controlStyle;var A=this,B=false;u.on('load',function(){A.getInputElement().on('keydown',function(D){if(D.data.getKeystroke()==13)B=true;});A.getInputElement().on('keyup',function(D){if(D.data.getKeystroke()==13&&B){u.getButton('ok')&&setTimeout(function(){u.getButton('ok').click();},0);B=false;}},null,null,1000);});var C=function(){var D=['<div class="cke_dialog_ui_input_',v.type,'" role="presentation"'];if(v.width)D.push('style="width:'+v.width+'" ');
-D.push('><input ');y['aria-labelledby']=this._.labelId;this._.required&&(y['aria-required']=this._.required);for(var E in y)D.push(E+'="'+y[E]+'" ');D.push(' /></div>');return D.join('');};k.dialog.labeledElement.call(this,u,v,w,C);},textarea:function(u,v,w){if(arguments.length<3)return;m.call(this,v);var x=this,y=this._.inputId=e.getNextId()+'_textarea',z={};if(v.validate)this.validate=v.validate;z.rows=v.rows||5;z.cols=v.cols||20;var A=function(){z['aria-labelledby']=this._.labelId;this._.required&&(z['aria-required']=this._.required);var B=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',y,'" '];for(var C in z)B.push(C+'="'+e.htmlEncode(z[C])+'" ');B.push('>',e.htmlEncode(x._['default']),'</textarea></div>');return B.join('');};k.dialog.labeledElement.call(this,u,v,w,A);},checkbox:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v,{'default':!!v['default']});if(v.validate)this.validate=v.validate;var y=function(){var z=e.extend({},v,{id:v.id?v.id+'_checkbox':e.getNextId()+'_checkbox'},true),A=[],B=e.getNextId()+'_label',C={'class':'cke_dialog_ui_checkbox_input',type:'checkbox','aria-labelledby':B};t(z);if(v['default'])C.checked='checked';if(typeof z.controlStyle!='undefined')z.style=z.controlStyle;x.checkbox=new k.dialog.uiElement(u,z,A,'input',null,C);A.push(' <label id="',B,'" for="',C.id,'">',e.htmlEncode(v.label),'</label>');return A.join('');};k.dialog.uiElement.call(this,u,v,w,'span',null,null,y);},radio:function(u,v,w){if(arguments.length<3)return;m.call(this,v);if(!this._['default'])this._['default']=this._.initValue=v.items[0][1];if(v.validate)this.validate=v.valdiate;var x=[],y=this,z=function(){var A=[],B=[],C={'class':'cke_dialog_ui_radio_item','aria-labelledby':this._.labelId},D=v.id?v.id+'_radio':e.getNextId()+'_radio';for(var E=0;E<v.items.length;E++){var F=v.items[E],G=F[2]!==undefined?F[2]:F[0],H=F[1]!==undefined?F[1]:F[0],I=e.getNextId()+'_radio_input',J=I+'_label',K=e.extend({},v,{id:I,title:null,type:null},true),L=e.extend({},K,{title:G},true),M={type:'radio','class':'cke_dialog_ui_radio_input',name:D,value:H,'aria-labelledby':J},N=[];if(y._['default']==H)M.checked='checked';t(K);t(L);if(typeof K.controlStyle!='undefined')K.style=K.controlStyle;x.push(new k.dialog.uiElement(u,K,N,'input',null,M));N.push(' ');new k.dialog.uiElement(u,L,N,'label',null,{id:J,'for':M.id},F[0]);A.push(N.join(''));}new k.dialog.hbox(u,[],A,B);return B.join('');};k.dialog.labeledElement.call(this,u,v,w,z);
-this._.children=x;},button:function(u,v,w){if(!arguments.length)return;if(typeof v=='function')v=v(u.getParentEditor());m.call(this,v,{disabled:v.disabled||false});a.event.implementOn(this);var x=this;u.on('load',function(A){var B=this.getElement();(function(){B.on('click',function(C){x.fire('click',{dialog:x.getDialog()});C.data.preventDefault();});B.on('keydown',function(C){if(C.data.getKeystroke() in {32:1}){x.click();C.data.preventDefault();}});})();B.unselectable();},this);var y=e.extend({},v);delete y.style;var z=e.getNextId()+'_label';k.dialog.uiElement.call(this,u,y,w,'a',null,{style:v.style,href:'javascript:void(0)',title:v.label,hidefocus:'true','class':v['class'],role:'button','aria-labelledby':z},'<span id="'+z+'" class="cke_dialog_ui_button">'+e.htmlEncode(v.label)+'</span>');},select:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v);if(v.validate)this.validate=v.validate;x.inputId=e.getNextId()+'_select';var y=function(){var z=e.extend({},v,{id:v.id?v.id+'_select':e.getNextId()+'_select'},true),A=[],B=[],C={id:x.inputId,'class':'cke_dialog_ui_input_select','aria-labelledby':this._.labelId};if(v.size!=undefined)C.size=v.size;if(v.multiple!=undefined)C.multiple=v.multiple;t(z);for(var D=0,E;D<v.items.length&&(E=v.items[D]);D++)B.push('<option value="',e.htmlEncode(E[1]!==undefined?E[1]:E[0]),'" /> ',e.htmlEncode(E[0]));if(typeof z.controlStyle!='undefined')z.style=z.controlStyle;x.select=new k.dialog.uiElement(u,z,A,'select',null,C,B.join(''));return A.join('');};k.dialog.labeledElement.call(this,u,v,w,y);},file:function(u,v,w){if(arguments.length<3)return;if(v['default']===undefined)v['default']='';var x=e.extend(m.call(this,v),{definition:v,buttons:[]});if(v.validate)this.validate=v.validate;var y=function(){x.frameId=e.getNextId()+'_fileInput';var z=b.isCustomDomain(),A=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" id="',x.frameId,'" title="',v.label,'" src="javascript:void('];A.push(z?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');A.push(')"></iframe>');return A.join('');};u.on('load',function(){var z=a.document.getById(x.frameId),A=z.getParent();A.addClass('cke_dialog_ui_input_file');});k.dialog.labeledElement.call(this,u,v,w,y);},fileButton:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v),y=this;if(v.validate)this.validate=v.validate;var z=e.extend({},v),A=z.onClick;z.className=(z.className?z.className+' ':'')+'cke_dialog_ui_button';
-z.onClick=function(B){var C=v['for'];if(!A||A.call(this,B)!==false){u.getContentElement(C[0],C[1]).submit();this.disable();}};u.on('load',function(){u.getContentElement(v['for'][0],v['for'][1])._.buttons.push(y);});k.dialog.button.call(this,u,z,w);},html:(function(){var u=/^\s*<[\w:]+\s+([^>]*)?>/,v=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,w=/\/$/;return function(x,y,z){if(arguments.length<3)return;var A=[],B,C=y.html,D,E;if(C.charAt(0)!='<')C='<span>'+C+'</span>';var F=y.focus;if(F){var G=this.focus;this.focus=function(){G.call(this);typeof F=='function'&&F.call(this);this.fire('focus');};if(y.isFocusable){var H=this.isFocusable;this.isFocusable=H;}this.keyboardFocusable=true;}k.dialog.uiElement.call(this,x,y,A,'span',null,null,'');B=A.join('');D=B.match(u);E=C.match(v)||['','',''];if(w.test(E[1])){E[1]=E[1].slice(0,-1);E[2]='/'+E[2];}z.push([E[1],' ',D[1]||'',E[2]].join(''));};})(),fieldset:function(u,v,w,x,y){var z=y.label,A=function(){var B=[];z&&B.push('<legend>'+z+'</legend>');for(var C=0;C<w.length;C++)B.push(w[C]);return B.join('');};this._={children:v};k.dialog.uiElement.call(this,u,y,x,'fieldset',null,null,A);}},true);k.dialog.html.prototype=new k.dialog.uiElement();k.dialog.labeledElement.prototype=e.extend(new k.dialog.uiElement(),{setLabel:function(u){var v=a.document.getById(this._.labelId);if(v.getChildCount()<1)new d.text(u,a.document).appendTo(v);else v.getChild(0).$.nodeValue=u;return this;},getLabel:function(){var u=a.document.getById(this._.labelId);if(!u||u.getChildCount()<1)return '';else return u.getChild(0).getText();},eventProcessors:r},true);k.dialog.button.prototype=e.extend(new k.dialog.uiElement(),{click:function(){var u=this;if(!u._.disabled)return u.fire('click',{dialog:u._.dialog});u.getElement().$.blur();return false;},enable:function(){this._.disabled=false;var u=this.getElement();u&&u.removeClass('cke_disabled');},disable:function(){this._.disabled=true;this.getElement().addClass('cke_disabled');},isVisible:function(){return this.getElement().getFirst().isVisible();},isEnabled:function(){return!this._.disabled;},eventProcessors:e.extend({},k.dialog.uiElement.prototype.eventProcessors,{onClick:function(u,v){this.on('click',v);}},true),accessKeyUp:function(){this.click();},accessKeyDown:function(){this.focus();},keyboardFocusable:true},true);k.dialog.textInput.prototype=e.extend(new k.dialog.labeledElement(),{getInputElement:function(){return a.document.getById(this._.inputId);},focus:function(){var u=this.selectParentTab();
-setTimeout(function(){var v=u.getInputElement();v&&v.$.focus();},0);},select:function(){var u=this.selectParentTab();setTimeout(function(){var v=u.getInputElement();if(v){v.$.focus();v.$.select();}},0);},accessKeyUp:function(){this.select();},setValue:function(u){!u&&(u='');return k.dialog.uiElement.prototype.setValue.apply(this,arguments);},keyboardFocusable:true},q,true);k.dialog.textarea.prototype=new k.dialog.textInput();k.dialog.select.prototype=e.extend(new k.dialog.labeledElement(),{getInputElement:function(){return this._.select.getElement();},add:function(u,v,w){var x=new h('option',this.getDialog().getParentEditor().document),y=this.getInputElement().$;x.$.text=u;x.$.value=v===undefined||v===null?u:v;if(w===undefined||w===null){if(c)y.add(x.$);else y.add(x.$,null);}else y.add(x.$,w);return this;},remove:function(u){var v=this.getInputElement().$;v.remove(u);return this;},clear:function(){var u=this.getInputElement().$;while(u.length>0)u.remove(0);return this;},keyboardFocusable:true},q,true);k.dialog.checkbox.prototype=e.extend(new k.dialog.uiElement(),{getInputElement:function(){return this._.checkbox.getElement();},setValue:function(u,v){this.getInputElement().$.checked=u;!v&&this.fire('change',{value:u});},getValue:function(){return this.getInputElement().$.checked;},accessKeyUp:function(){this.setValue(!this.getValue());},eventProcessors:{onChange:function(u,v){if(!c)return r.onChange.apply(this,arguments);else{u.on('load',function(){var w=this._.checkbox.getElement();w.on('propertychange',function(x){x=x.data.$;if(x.propertyName=='checked')this.fire('change',{value:w.$.checked});},this);},this);this.on('change',v);}return null;}},keyboardFocusable:true},q,true);k.dialog.radio.prototype=e.extend(new k.dialog.uiElement(),{setValue:function(u,v){var w=this._.children,x;for(var y=0;y<w.length&&(x=w[y]);y++)x.getElement().$.checked=x.getValue()==u;!v&&this.fire('change',{value:u});},getValue:function(){var u=this._.children;for(var v=0;v<u.length;v++){if(u[v].getElement().$.checked)return u[v].getValue();}return null;},accessKeyUp:function(){var u=this._.children,v;for(v=0;v<u.length;v++){if(u[v].getElement().$.checked){u[v].getElement().focus();return;}}u[0].getElement().focus();},eventProcessors:{onChange:function(u,v){if(!c)return r.onChange.apply(this,arguments);else{u.on('load',function(){var w=this._.children,x=this;for(var y=0;y<w.length;y++){var z=w[y].getElement();z.on('propertychange',function(A){A=A.data.$;if(A.propertyName=='checked'&&this.$.checked)x.fire('change',{value:this.getAttribute('value')});
-});}},this);this.on('change',v);}return null;}},keyboardFocusable:true},q,true);k.dialog.file.prototype=e.extend(new k.dialog.labeledElement(),q,{getInputElement:function(){var u=a.document.getById(this._.frameId).getFrameDocument();return u.$.forms.length>0?new h(u.$.forms[0].elements[0]):this.getElement();},submit:function(){this.getInputElement().getParent().$.submit();return this;},getAction:function(){return this.getInputElement().getParent().$.action;},registerEvents:function(u){var v=/^on([A-Z]\w+)/,w,x=function(z,A,B,C){z.on('formLoaded',function(){z.getInputElement().on(B,C,z);});};for(var y in u){if(!(w=y.match(v)))continue;if(this.eventProcessors[y])this.eventProcessors[y].call(this,this._.dialog,u[y]);else x(this,this._.dialog,w[1].toLowerCase(),u[y]);}return this;},reset:function(){var u=this._,v=a.document.getById(u.frameId),w=v.getFrameDocument(),x=u.definition,y=u.buttons,z=this.formLoadedNumber,A=this.formUnloadNumber,B=u.dialog._.editor.lang.dir,C=u.dialog._.editor.langCode;if(!z){z=this.formLoadedNumber=e.addFunction(function(){this.fire('formLoaded');},this);A=this.formUnloadNumber=e.addFunction(function(){this.getInputElement().clearCustomData();},this);this.getDialog()._.editor.on('destroy',function(){e.removeFunction(z);e.removeFunction(A);});}function D(){w.$.open();if(b.isCustomDomain())w.$.domain=document.domain;var E='';if(x.size)E=x.size-(c?7:0);w.$.write(['<html dir="'+B+'" lang="'+C+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+B+'" lang="'+C+'" action="',e.htmlEncode(x.action),'">','<input type="file" name="',e.htmlEncode(x.id||'cke_upload'),'" size="',e.htmlEncode(E>0?E:''),'" />','</form>','</body></html>','<script>window.parent.CKEDITOR.tools.callFunction('+z+');','window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction('+A+')}</script>'].join(''));w.$.close();for(var F=0;F<y.length;F++)y[F].enable();};if(b.gecko)setTimeout(D,500);else D();},getValue:function(){return this.getInputElement().$.value||'';},setInitValue:function(){this._.initValue='';},eventProcessors:{onChange:function(u,v){if(!this._.domOnChangeRegistered){this.on('formLoaded',function(){this.getInputElement().on('change',function(){this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',v);}},keyboardFocusable:true},true);k.dialog.fileButton.prototype=new k.dialog.button();
-k.dialog.fieldset.prototype=e.clone(k.dialog.hbox.prototype);a.dialog.addUIElement('text',n);a.dialog.addUIElement('password',n);a.dialog.addUIElement('textarea',o);a.dialog.addUIElement('checkbox',o);a.dialog.addUIElement('radio',o);a.dialog.addUIElement('button',o);a.dialog.addUIElement('select',o);a.dialog.addUIElement('file',o);a.dialog.addUIElement('fileButton',o);a.dialog.addUIElement('html',o);a.dialog.addUIElement('fieldset',p);})();j.add('panel',{beforeInit:function(m){m.ui.addHandler(2,k.panel.handler);}});a.UI_PANEL=2;k.panel=function(m,n){var o=this;if(n)e.extend(o,n);e.extend(o,{className:'',css:[]});o.id=e.getNextId();o.document=m;o._={blocks:{}};};k.panel.handler={create:function(m){return new k.panel(m);}};k.panel.prototype={renderHtml:function(m){var n=[];this.render(m,n);return n.join('');},render:function(m,n){var p=this;var o=p.id;n.push('<div class="',m.skinClass,'" lang="',m.langCode,'" role="presentation" style="display:none;z-index:'+(m.config.baseFloatZIndex+1)+'">'+'<div'+' id=',o,' dir=',m.lang.dir,' role="presentation" class="cke_panel cke_',m.lang.dir);if(p.className)n.push(' ',p.className);n.push('">');if(p.forceIFrame||p.css.length){n.push('<iframe id="',o,'_frame" frameborder="0" role="application" src="javascript:void(');n.push(b.isCustomDomain()?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');n.push(')"></iframe>');}n.push('</div></div>');return o;},getHolderElement:function(){var m=this._.holder;if(!m){if(this.forceIFrame||this.css.length){var n=this.document.getById(this.id+'_frame'),o=n.getParent(),p=o.getAttribute('dir'),q=o.getParent().getAttribute('class'),r=o.getParent().getAttribute('lang'),s=n.getFrameDocument(),t=e.addFunction(e.bind(function(w){this.isLoaded=true;if(this.onLoad)this.onLoad();},this)),u='<!DOCTYPE html><html dir="'+p+'" class="'+q+'_container" lang="'+r+'">'+'<head>'+'<style>.'+q+'_container{visibility:hidden}</style>'+'</head>'+'<body class="cke_'+p+' cke_panel_frame '+b.cssClass+'" style="margin:0;padding:0"'+' onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction('+t+');"></body>'+e.buildStyleHtml(this.css)+'</html>';s.write(u);var v=s.getWindow();v.$.CKEDITOR=a;s.on('key'+(b.opera?'press':'down'),function(w){var z=this;var x=w.data.getKeystroke(),y=z.document.getById(z.id).getAttribute('dir');if(z._.onKeyDown&&z._.onKeyDown(x)===false){w.data.preventDefault();return;}if(x==27||x==(y=='rtl'?39:37))if(z.onEscape&&z.onEscape(x)===false)w.data.preventDefault();
-},this);m=s.getBody();m.unselectable();b.air&&e.callFunction(t);}else m=this.document.getById(this.id);this._.holder=m;}return m;},addBlock:function(m,n){var o=this;n=o._.blocks[m]=n instanceof k.panel.block?n:new k.panel.block(o.getHolderElement(),n);if(!o._.currentBlock)o.showBlock(m);return n;},getBlock:function(m){return this._.blocks[m];},showBlock:function(m){var n=this._.blocks,o=n[m],p=this._.currentBlock,q=this.forceIFrame?this.document.getById(this.id+'_frame'):this._.holder;q.getParent().getParent().disableContextMenu();if(p){q.removeAttributes(p.attributes);p.hide();}this._.currentBlock=o;q.setAttributes(o.attributes);a.fire('ariaWidget',q);o._.focusIndex=-1;this._.onKeyDown=o.onKeyDown&&e.bind(o.onKeyDown,o);o.onMark=function(r){q.setAttribute('aria-activedescendant',r.getId()+'_option');};o.onUnmark=function(){q.removeAttribute('aria-activedescendant');};o.show();return o;},destroy:function(){this.element&&this.element.remove();}};k.panel.block=e.createClass({$:function(m,n){var o=this;o.element=m.append(m.getDocument().createElement('div',{attributes:{tabIndex:-1,'class':'cke_panel_block',role:'presentation'},styles:{display:'none'}}));if(n)e.extend(o,n);if(!o.attributes.title)o.attributes.title=o.attributes['aria-label'];o.keys={};o._.focusIndex=-1;o.element.disableContextMenu();},_:{markItem:function(m){var p=this;if(m==-1)return;var n=p.element.getElementsByTag('a'),o=n.getItem(p._.focusIndex=m);if(b.webkit||b.opera)o.getDocument().getWindow().focus();o.focus();p.onMark&&p.onMark(o);}},proto:{show:function(){this.element.setStyle('display','');},hide:function(){var m=this;if(!m.onHide||m.onHide.call(m)!==true)m.element.setStyle('display','none');},onKeyDown:function(m){var r=this;var n=r.keys[m];switch(n){case 'next':var o=r._.focusIndex,p=r.element.getElementsByTag('a'),q;while(q=p.getItem(++o)){if(q.getAttribute('_cke_focus')&&q.$.offsetWidth){r._.focusIndex=o;q.focus();break;}}return false;case 'prev':o=r._.focusIndex;p=r.element.getElementsByTag('a');while(o>0&&(q=p.getItem(--o))){if(q.getAttribute('_cke_focus')&&q.$.offsetWidth){r._.focusIndex=o;q.focus();break;}}return false;case 'click':o=r._.focusIndex;q=o>=0&&r.element.getElementsByTag('a').getItem(o);if(q)q.$.click?q.$.click():q.$.onclick();return false;}return true;}}});j.add('listblock',{requires:['panel'],onLoad:function(){k.panel.prototype.addListBlock=function(m,n){return this.addBlock(m,new k.listBlock(this.getHolderElement(),n));};k.listBlock=e.createClass({base:k.panel.block,$:function(m,n){var q=this;
-n=n||{};var o=n.attributes||(n.attributes={});(q.multiSelect=!!n.multiSelect)&&(o['aria-multiselectable']=true);!o.role&&(o.role='listbox');q.base.apply(q,arguments);var p=q.keys;p[40]='next';p[9]='next';p[38]='prev';p[2000+9]='prev';p[32]='click';q._.pendingHtml=[];q._.items={};q._.groups={};},_:{close:function(){if(this._.started){this._.pendingHtml.push('</ul>');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=e.addFunction(function(m){var o=this;var n=true;if(o.multiSelect)n=o.toggle(m);else o.mark(m);if(o.onClick)o.onClick(m,n);},this);return this._.click;}},proto:{add:function(m,n,o){var r=this;var p=r._.pendingHtml,q=e.getNextId();if(!r._.started){p.push('<ul role="presentation" class=cke_panel_list>');r._.started=1;r._.size=r._.size||0;}r._.items[m]=q;p.push('<li id=',q,' class=cke_panel_listItem role=presentation><a id="',q,'_option" _cke_focus=1 hidefocus=true title="',o||m,'" href="javascript:void(\'',m,'\')" onclick="CKEDITOR.tools.callFunction(',r._.getClick(),",'",m,"'); return false;\"",' role="option" aria-posinset="'+ ++r._.size+'">',n||m,'</a></li>');},startGroup:function(m){this._.close();var n=e.getNextId();this._.groups[m]=n;this._.pendingHtml.push('<h1 role="presentation" id=',n,' class=cke_panel_grouptitle>',m,'</h1>');},commit:function(){var p=this;p._.close();p.element.appendHtml(p._.pendingHtml.join(''));var m=p._.items,n=p.element.getDocument();for(var o in m)n.getById(m[o]+'_option').setAttribute('aria-setsize',p._.size);delete p._.size;p._.pendingHtml=[];},toggle:function(m){var n=this.isMarked(m);if(n)this.unmark(m);else this.mark(m);return!n;},hideGroup:function(m){var n=this.element.getDocument().getById(this._.groups[m]),o=n&&n.getNext();if(n){n.setStyle('display','none');if(o&&o.getName()=='ul')o.setStyle('display','none');}},hideItem:function(m){this.element.getDocument().getById(this._.items[m]).setStyle('display','none');},showAll:function(){var m=this._.items,n=this._.groups,o=this.element.getDocument();for(var p in m)o.getById(m[p]).setStyle('display','');for(var q in n){var r=o.getById(n[q]),s=r.getNext();r.setStyle('display','');if(s&&s.getName()=='ul')s.setStyle('display','');}},mark:function(m){var p=this;if(!p.multiSelect)p.unmarkAll();var n=p._.items[m],o=p.element.getDocument().getById(n);o.addClass('cke_selected');p.element.getDocument().getById(n+'_option').setAttribute('aria-selected',true);p.element.setAttribute('aria-activedescendant',n+'_option');p.onMark&&p.onMark(o);},unmark:function(m){var n=this;
-n.element.getDocument().getById(n._.items[m]).removeClass('cke_selected');n.onUnmark&&n.onUnmark(n._.items[m]);},unmarkAll:function(){var p=this;var m=p._.items,n=p.element.getDocument();for(var o in m)n.getById(m[o]).removeClass('cke_selected');p.onUnmark&&p.onUnmark();},isMarked:function(m){return this.element.getDocument().getById(this._.items[m]).hasClass('cke_selected');},focus:function(m){this._.focusIndex=-1;if(m){var n=this.element.getDocument().getById(this._.items[m]).getFirst(),o=this.element.getElementsByTag('a'),p,q=-1;while(p=o.getItem(++q)){if(p.equals(n)){this._.focusIndex=q;break;}}setTimeout(function(){n.focus();},0);}}}});}});a.themes.add('default',(function(){function m(n,o){var p,q;q=n.config.sharedSpaces;q=q&&q[o];q=q&&a.document.getById(q);if(q){var r='<span class="cke_shared " dir="'+n.lang.dir+'"'+'>'+'<span class="'+n.skinClass+' '+n.id+' cke_editor_'+n.name+'">'+'<span class="'+b.cssClass+'">'+'<span class="cke_wrapper cke_'+n.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+o+'">'+'</div></span></span></span></span></span>',s=q.append(h.createFromHtml(r,q.getDocument()));if(q.getCustomData('cke_hasshared'))s.hide();else q.setCustomData('cke_hasshared',1);p=s.getChild([0,0,0,0]);!n.sharedSpaces&&(n.sharedSpaces={});n.sharedSpaces[o]=p;n.on('focus',function(){for(var t=0,u,v=q.getChildren();u=v.getItem(t);t++){if(u.type==1&&!u.equals(s)&&u.hasClass('cke_shared'))u.hide();}s.show();});n.on('destroy',function(){s.remove();});}return p;};return{build:function(n,o){var p=n.name,q=n.element,r=n.elementMode;if(!q||r==0)return;if(r==1)q.hide();var s=n.fire('themeSpace',{space:'top',html:''}).html,t=n.fire('themeSpace',{space:'contents',html:''}).html,u=n.fireOnce('themeSpace',{space:'bottom',html:''}).html,v=t&&n.config.height,w=n.config.tabIndex||n.element.getAttribute('tabindex')||0;if(!t)v='auto';else if(!isNaN(v))v+='px';var x='',y=n.config.width;if(y){if(!isNaN(y))y+='px';x+='width: '+y+';';}var z=s&&m(n,'top'),A=m(n,'bottom');z&&(z.setHtml(s),s='');A&&(A.setHtml(u),u='');var B=h.createFromHtml(['<span id="cke_',p,'" class="',n.skinClass,' ',n.id,' cke_editor_',p,'" dir="',n.lang.dir,'" title="',b.gecko?' ':'','" lang="',n.langCode,'"'+(b.webkit?' tabindex="'+w+'"':'')+' role="application"'+' aria-labelledby="cke_',p,'_arialbl"'+(x?' style="'+x+'"':'')+'>'+'<span id="cke_',p,'_arialbl" class="cke_voice_label">'+n.lang.editor+'</span>'+'<span class="',b.cssClass,'" role="presentation"><span class="cke_wrapper cke_',n.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',s?'':' style="display:none"',' role="presentation"><td id="cke_top_',p,'" class="cke_top" role="presentation">',s,'</td></tr><tr',t?'':' style="display:none"',' role="presentation"><td id="cke_contents_',p,'" class="cke_contents" style="height:',v,'" role="presentation">',t,'</td></tr><tr',u?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',p,'" class="cke_bottom" role="presentation">',u,'</td></tr></tbody></table><style>.',n.skinClass,'{visibility:hidden;}</style></span></span></span>'].join(''));
-B.getChild([1,0,0,0,0]).unselectable();B.getChild([1,0,0,0,2]).unselectable();if(r==1)B.insertAfter(q);else q.append(B);n.container=B;B.disableContextMenu();n.fireOnce('themeLoaded');n.fireOnce('uiReady');},buildDialog:function(n){var o=e.getNextNumber(),p=h.createFromHtml(['<div class="',n.id,'_dialog cke_editor_',n.name.replace('.','\\.'),'_dialog cke_skin_',n.skinName,'" dir="',n.lang.dir,'" lang="',n.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+b.cssClass,' cke_',n.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+n.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',c?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+o).replace(/%/g,'cke_dialog_')),q=p.getChild([0,0,0,0,0]),r=q.getChild(0),s=q.getChild(1);r.unselectable();s.unselectable();return{element:p,parts:{dialog:p.getChild(0),title:r,close:s,tabs:q.getChild(2),contents:q.getChild([3,0,0,0]),footer:q.getChild([3,0,1,0])}};},destroy:function(n){var o=n.container,p=n.element;if(o){o.clearCustomData();o.remove();}if(p){p.clearCustomData();n.elementMode==1&&p.show();delete n.element;}}};})());a.editor.prototype.getThemeSpace=function(m){var n='cke_'+m,o=this._[n]||(this._[n]=a.document.getById(n+'_'+this.name));return o;};a.editor.prototype.resize=function(m,n,o,p){var q=this.container,r=a.document.getById('cke_contents_'+this.name),s=p?q.getChild(1):q;b.webkit&&s.setStyle('display','none');s.setSize('width',m,true);if(b.webkit){s.$.offsetWidth;s.setStyle('display','');}var t=o?0:(s.$.offsetHeight||0)-(r.$.clientHeight||0);r.setStyle('height',Math.max(n-t,0)+'px');this.fire('resize');};a.editor.prototype.getResizable=function(){return this.container;
-};})();
+if(!s)r.type='text';if(s=='checkbox'||s=='radio')r.value=='on'&&delete r.value;}}});if(p)p.addRules({elements:{input:function(q){if(q.attributes.type=='hidden')return m.createFakeParserElement(q,'cke_hidden','hiddenfield');}}});},requires:['image','fakeobjects']});if(c)h.prototype.hasAttribute=e.override(h.prototype.hasAttribute,function(m){return function(n){var q=this;var o=q.$.attributes.getNamedItem(n);if(q.getName()=='input')switch(n){case 'class':return q.$.className.length>0;case 'checked':return!!q.$.checked;case 'value':var p=q.getAttribute('type');return p=='checkbox'||p=='radio'?q.$.value!='on':q.$.value;}return m.apply(q,arguments);};});(function(){var m={canUndo:false,exec:function(o){var p=o.document.createElement('hr'),q=new d.range(o.document);o.insertElement(p);q.moveToPosition(p,4);var r=p.getNext();if(!r||r.type==1&&!r.isEditable())q.fixBlock(true,o.config.enterMode==3?'div':'p');q.select();}},n='horizontalrule';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('HorizontalRule',{label:o.lang.horizontalrule,command:n});}});})();(function(){var m=/^[\t\r\n ]*(?: |\xa0)$/,n='{cke_protected}';function o(T){var U=T.children.length,V=T.children[U-1];while(V&&V.type==3&&!e.trim(V.value))V=T.children[--U];return V;};function p(T,U){var V=T.children,W=o(T);if(W){if((U||!c)&&W.type==1&&W.name=='br')V.pop();if(W.type==3&&m.test(W.value))V.pop();}};function q(T,U,V){if(!U&&(!V||typeof V=='function'&&V(T)===false))return false;if(U&&c&&(document.documentMode>7||T.name in f.tr||T.name in f.$listItem))return false;var W=o(T);return!W||W&&(W.type==1&&W.name=='br'||T.name=='form'&&W.name=='input');};function r(T,U){return function(V){p(V,!T);if(q(V,!T,U))if(T||c)V.add(new a.htmlParser.text('\xa0'));else V.add(new a.htmlParser.element('br',{}));};};var s=f,t=['caption','colgroup','col','thead','tfoot','tbody'],u=e.extend({},s.$block,s.$listItem,s.$tableContent);for(var v in u){if(!('br' in s[v]))delete u[v];}delete u.pre;var w={elements:{},attributeNames:[[/^on/,'data-cke-pa-on']]},x={elements:{}};for(v in u)x.elements[v]=r();var y={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(T){var U=T.attributes;if(U){if(U['data-cke-temp'])return false;var V=['name','href','src'],W;for(var X=0;X<V.length;X++){W='data-cke-saved-'+V[X];W in U&&delete U[V[X]];}}return T;},table:function(T){var U=T.children;U.sort(function(V,W){return V.type==1&&W.type==V.type?e.indexOf(t,V.name)>e.indexOf(t,W.name)?1:-1:0;
+});},embed:function(T){var U=T.parent;if(U&&U.name=='object'){var V=U.attributes.width,W=U.attributes.height;V&&(T.attributes.width=V);W&&(T.attributes.height=W);}},param:function(T){T.children=[];T.isEmpty=true;return T;},a:function(T){if(!(T.children.length||T.attributes.name||T.attributes['data-cke-saved-name']))return false;},span:function(T){if(T.attributes['class']=='Apple-style-span')delete T.name;},pre:function(T){c&&p(T);},html:function(T){delete T.attributes.contenteditable;delete T.attributes['class'];},body:function(T){delete T.attributes.spellcheck;delete T.attributes.contenteditable;},style:function(T){var U=T.children[0];U&&U.value&&(U.value=e.trim(U.value));if(!T.attributes.type)T.attributes.type='text/css';},title:function(T){var U=T.children[0];U&&(U.value=T.attributes['data-cke-title']||'');}},attributes:{'class':function(T,U){return e.ltrim(T.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(c)y.attributes.style=function(T,U){return T.replace(/(^|;)([^\:]+)/g,function(V){return V.toLowerCase();});};function z(T){var U=T.attributes;if(U.contenteditable!='false')U['data-cke-editable']=U.contenteditable?'true':1;U.contenteditable='false';};function A(T){var U=T.attributes;switch(U['data-cke-editable']){case 'true':U.contenteditable='true';break;case '1':delete U.contenteditable;break;}};for(v in {input:1,textarea:1}){w.elements[v]=z;y.elements[v]=A;}var B=/<(a|area|img|input)\b([^>]*)>/gi,C=/\b(href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,E=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,H=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function I(T){return T.replace(B,function(U,V,W){return '<'+V+W.replace(C,function(X,Y){if(W.indexOf('data-cke-saved-'+Y)==-1)return ' data-cke-saved-'+X+' '+X;return X;})+'>';});};function J(T){return T.replace(D,function(U){return '<cke:encoded>'+encodeURIComponent(U)+'</cke:encoded>';});};function K(T){return T.replace(E,function(U,V){return decodeURIComponent(V);});};function L(T){return T.replace(F,'$1cke:$2');};function M(T){return T.replace(G,'$1$2');};function N(T){return T.replace(H,'<cke:$1$2></cke:$1>');};function O(T){return T.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,'$1$2$2');};function P(T){return T.replace(/<!--(?!{cke_protected})[\s\S]+?-->/g,function(U){return '<!--'+n+'{C}'+encodeURIComponent(U).replace(/--/g,'%2D%2D')+'-->';
+});};function Q(T){return T.replace(/<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g,function(U,V){return decodeURIComponent(V);});};function R(T,U){var V=U._.dataStore;return T.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(W,X){return decodeURIComponent(X);}).replace(/\{cke_protected_(\d+)\}/g,function(W,X){return V&&V[X]||'';});};function S(T,U){var V=[],W=U.config.protectedSource,X=U._.dataStore||(U._.dataStore={id:1}),Y=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,Z=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(W);T=T.replace(/<!--[\s\S]*?-->/g,function(ab){return '<!--{cke_tempcomment}'+(V.push(ab)-1)+'-->';});for(var aa=0;aa<Z.length;aa++)T=T.replace(Z[aa],function(ab){ab=ab.replace(Y,function(ac,ad,ae){return V[ae];});return/cke_temp(comment)?/.test(ab)?ab:'<!--{cke_temp}'+(V.push(ab)-1)+'-->';});T=T.replace(Y,function(ab,ac,ad){return '<!--'+n+(ac?'{C}':'')+encodeURIComponent(V[ad]).replace(/--/g,'%2D%2D')+'-->';});return T.replace(/(['"]).*?\1/g,function(ab){return ab.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(ac,ad){X[X.id]=decodeURIComponent(ad);return '{cke_protected_'+X.id++ +'}';});});};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(T){var U=T.dataProcessor=new a.htmlDataProcessor(T);U.writer.forceSimpleAmpersand=T.config.forceSimpleAmpersand;U.dataFilter.addRules(w);U.dataFilter.addRules(x);U.htmlFilter.addRules(y);var V={elements:{}};for(v in u)V.elements[v]=r(true,T.config.fillEmptyBlocks);U.htmlFilter.addRules(V);},onLoad:function(){!('fillEmptyBlocks' in i)&&(i.fillEmptyBlocks=1);}});a.htmlDataProcessor=function(T){var U=this;U.editor=T;U.writer=new a.htmlWriter();U.dataFilter=new a.htmlParser.filter();U.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(T,U){T=S(T,this.editor);T=I(T);T=J(T);T=L(T);T=N(T);T=O(T);var V=new h('div');V.setHtml('a'+T);T=V.getHtml().substr(1);T=M(T);T=K(T);T=Q(T);var W=a.htmlParser.fragment.fromHtml(T,U),X=new a.htmlParser.basicWriter();W.writeHtml(X,this.dataFilter);T=X.getHtml(true);T=P(T);return T;},toDataFormat:function(T,U){var V=this.writer,W=a.htmlParser.fragment.fromHtml(T,U);V.reset();W.writeHtml(V,this.htmlFilter);var X=V.getHtml(true);X=Q(X);X=R(X,this.editor);return X;}};})();(function(){j.add('iframe',{requires:['dialog','fakeobjects'],init:function(m){var n='iframe',o=m.lang.iframe;a.dialog.add(n,this.path+'dialogs/iframe.js');m.addCommand(n,new a.dialogCommand(n));m.addCss('img.cke_iframe{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');
+m.ui.addButton('Iframe',{label:o.toolbar,command:n});m.on('doubleclick',function(p){var q=p.data.element;if(q.is('img')&&q.data('cke-real-element-type')=='iframe')p.data.dialog='iframe';});if(m.addMenuItems)m.addMenuItems({iframe:{label:o.title,command:'iframe',group:'image'}});if(m.contextMenu)m.contextMenu.addListener(function(p,q){if(p&&p.is('img')&&p.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter;if(o)o.addRules({elements:{iframe:function(p){return m.createFakeParserElement(p,'cke_iframe','iframe',true);}}});}});})();j.add('image',{init:function(m){var n='image';a.dialog.add(n,this.path+'dialogs/image.js');m.addCommand(n,new a.dialogCommand(n));m.ui.addButton('Image',{label:m.lang.common.image,command:n});m.on('doubleclick',function(o){var p=o.data.element;if(p.is('img')&&!p.data('cke-realelement')&&!p.isReadOnly())o.data.dialog='image';});if(m.addMenuItems)m.addMenuItems({image:{label:m.lang.image.menu,command:'image',group:'image'}});if(m.contextMenu)m.contextMenu.addListener(function(o,p){if(!o||!o.is('img')||o.data('cke-realelement')||o.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var m={ol:1,ul:1},n=d.walker.whitespaces(true),o=d.walker.bookmark(false,true);function p(t){var B=this;if(t.editor.readOnly)return null;var u=t.editor,v=t.data.path,w=v&&v.contains(m),x=v.block||v.blockLimit;if(w)return B.setState(2);if(!B.useIndentClasses&&B.name=='indent')return B.setState(2);if(!x)return B.setState(0);if(B.useIndentClasses){var y=x.$.className.match(B.classNameRegex),z=0;if(y){y=y[1];z=B.indentClassMap[y];}if(B.name=='outdent'&&!z||B.name=='indent'&&z==u.config.indentClasses.length)return B.setState(0);return B.setState(2);}else{var A=parseInt(x.getStyle(r(x)),10);if(isNaN(A))A=0;if(A<=0)return B.setState(0);return B.setState(2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');w.indentClassMap={};for(var v=0;v<t.config.indentClasses.length;v++)w.indentClassMap[t.config.indentClasses[v]]=v+1;}w.startDisabled=u=='outdent';};function r(t,u){return(u||t.getComputedStyle('direction'))=='ltr'?'margin-left':'margin-right';};function s(t){return t.type=1&&t.is('li');};q.prototype={exec:function(t){var u=this,v={};function w(M){var N=C.startContainer,O=C.endContainer;
+while(N&&!N.getParent().equals(M))N=N.getParent();while(O&&!O.getParent().equals(M))O=O.getParent();if(!N||!O)return;var P=N,Q=[],R=false;while(!R){if(P.equals(O))R=true;Q.push(P);P=P.getNext();}if(Q.length<1)return;var S=M.getParents(true);for(var T=0;T<S.length;T++){if(S[T].getName&&m[S[T].getName()]){M=S[T];break;}}var U=u.name=='indent'?1:-1,V=Q[0],W=Q[Q.length-1],X=j.list.listToArray(M,v),Y=X[W.getCustomData('listarray_index')].indent;for(T=V.getCustomData('listarray_index');T<=W.getCustomData('listarray_index');T++){X[T].indent+=U;var Z=X[T].parent;X[T].parent=new h(Z.getName(),Z.getDocument());}for(T=W.getCustomData('listarray_index')+1;T<X.length&&X[T].indent>Y;T++)X[T].indent+=U;var aa=j.list.arrayToList(X,v,null,t.config.enterMode,M.getDirection());if(u.name=='outdent'){var ab;if((ab=M.getParent())&&ab.is('li')){var ac=aa.listNode.getChildren(),ad=[],ae=ac.count(),af;for(T=ae-1;T>=0;T--){if((af=ac.getItem(T))&&af.is&&af.is('li'))ad.push(af);}}}if(aa)aa.listNode.replace(M);if(ad&&ad.length)for(T=0;T<ad.length;T++){var ag=ad[T],ah=ag;while((ah=ah.getNext())&&ah.is&&ah.getName() in m){if(c&&!ag.getFirst(function(ai){return n(ai)&&o(ai);}))ag.append(C.document.createText('\xa0'));ag.append(ah);}ag.insertAfter(ab);}};function x(){var M=C.createIterator(),N=t.config.enterMode;M.enforceRealBlocks=true;M.enlargeBr=N!=2;var O;while(O=M.getNextParagraph(N==1?'p':'div'))y(O);};function y(M,N){if(M.getCustomData('indent_processed'))return false;if(u.useIndentClasses){var O=M.$.className.match(u.classNameRegex),P=0;if(O){O=O[1];P=u.indentClassMap[O];}if(u.name=='outdent')P--;else P++;if(P<0)return false;P=Math.min(P,t.config.indentClasses.length);P=Math.max(P,0);M.$.className=e.ltrim(M.$.className.replace(u.classNameRegex,''));if(P>0)M.addClass(t.config.indentClasses[P-1]);}else{var Q=r(M,N),R=parseInt(M.getStyle(Q),10);if(isNaN(R))R=0;var S=t.config.indentOffset||40;R+=(u.name=='indent'?1:-1)*S;if(R<0)return false;R=Math.max(R,0);R=Math.ceil(R/S)*S;M.setStyle(Q,R?R+(t.config.indentUnit||'px'):'');if(M.getAttribute('style')==='')M.removeAttribute('style');}h.setMarker(v,M,'indent_processed',1);return true;};var z=t.getSelection(),A=z.createBookmarks(1),B=z&&z.getRanges(1),C,D=B.createIterator();while(C=D.getNextRange()){var E=C.getCommonAncestor(),F=E;while(F&&!(F.type==1&&m[F.getName()]))F=F.getParent();if(!F){var G=C.getEnclosedNode();if(G&&G.type==1&&G.getName() in m){C.setStartAt(G,1);C.setEndAt(G,2);F=G;}}if(F&&C.startContainer.type==1&&C.startContainer.getName() in m){var H=new d.walker(C);
+H.evaluator=s;C.startContainer=H.next();}if(F&&C.endContainer.type==1&&C.endContainer.getName() in m){H=new d.walker(C);H.evaluator=s;C.endContainer=H.previous();}if(F){var I=F.getFirst(s),J=!!I.getNext(s),K=C.startContainer,L=I.equals(K)||I.contains(K);if(!(L&&(u.name=='indent'||u.useIndentClasses||parseInt(F.getStyle(r(F)),10))&&y(F,!J&&I.getDirection())))w(F);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=t.addCommand('indent',new q(t,'indent')),v=t.addCommand('outdent',new q(t,'outdent'));t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');t.on('dirChanged',function(w){var x=new d.range(t.document);x.setStartBefore(w.data.node);x.setEndAfter(w.data.node);var y=new d.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(w.data.node)&&z.getDirection()){x.setStartAfter(z);y=new d.walker(x);continue;}var A=t.config.indentClasses;if(A){var B=w.data.dir=='ltr'?['_rtl','']:['','_rtl'];for(var C=0;C<A.length;C++){if(z.hasClass(A[C]+B[0])){z.removeClass(A[C]+B[0]);z.addClass(A[C]+B[1]);}}}var D=z.getStyle('margin-right'),E=z.getStyle('margin-left');D?z.setStyle('margin-left',D):z.removeStyle('margin-left');E?z.setStyle('margin-right',E):z.removeStyle('margin-right');}}});},requires:['domiterator','list']});})();(function(){function m(r,s){var t=s.block||s.blockLimit;if(!t||t.getName()=='body')return 2;return n(t,r.config.useComputedState)==this.value?1:2;};function n(r,s){s=s===undefined||s;var t;if(s)t=r.getComputedStyle('text-align');else{while(!r.hasAttribute||!(r.hasAttribute('align')||r.getStyle('text-align'))){var u=r.getParent();if(!u)break;r=u;}t=r.getStyle('text-align')||r.getAttribute('align')||'';}t&&(t=t.replace(/-moz-|-webkit-|start|auto/i,''));!t&&s&&(t=r.getComputedStyle('direction')=='rtl'?'right':'left');return t;};function o(r){if(r.editor.readOnly)return;var s=r.editor.getCommand(this.name);s.state=m.call(this,r.editor,r.data.path);s.fire('state');};function p(r,s,t){var v=this;v.name=s;v.value=t;var u=r.config.justifyClasses;if(u){switch(t){case 'left':v.cssClassName=u[0];break;case 'center':v.cssClassName=u[1];break;case 'right':v.cssClassName=u[2];break;case 'justify':v.cssClassName=u[3];break;}v.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+u.join('|')+')(?=$|\\s)');
+}};function q(r){var s=r.editor,t=new d.range(s.document);t.setStartBefore(r.data.node);t.setEndAfter(r.data.node);var u=new d.walker(t),v;while(v=u.next()){if(v.type==1){if(!v.equals(r.data.node)&&v.getDirection()){t.setStartAfter(v);u=new d.walker(t);continue;}var w=s.config.justifyClasses;if(w)if(v.hasClass(w[0])){v.removeClass(w[0]);v.addClass(w[2]);}else if(v.hasClass(w[2])){v.removeClass(w[2]);v.addClass(w[0]);}var x='text-align',y=v.getStyle(x);if(y=='left')v.setStyle(x,'right');else if(y=='right')v.setStyle(x,'left');}}};p.prototype={exec:function(r){var D=this;var s=r.getSelection(),t=r.config.enterMode;if(!s)return;var u=s.createBookmarks(),v=s.getRanges(true),w=D.cssClassName,x,y,z=r.config.useComputedState;z=z===undefined||z;for(var A=v.length-1;A>=0;A--){x=v[A].createIterator();x.enlargeBr=t!=2;while(y=x.getNextParagraph(t==1?'p':'div')){y.removeAttribute('align');y.removeStyle('text-align');var B=w&&(y.$.className=e.ltrim(y.$.className.replace(D.cssClassRegex,''))),C=D.state==2&&(!z||n(y,true)!=D.value);if(w){if(C)y.addClass(w);else if(!B)y.removeAttribute('class');}else if(C)y.setStyle('text-align',D.value);}}r.focus();r.forceNextSelectionCheck();s.selectBookmarks(u);}};j.add('justify',{init:function(r){var s=new p(r,'justifyleft','left'),t=new p(r,'justifycenter','center'),u=new p(r,'justifyright','right'),v=new p(r,'justifyblock','justify');r.addCommand('justifyleft',s);r.addCommand('justifycenter',t);r.addCommand('justifyright',u);r.addCommand('justifyblock',v);r.ui.addButton('JustifyLeft',{label:r.lang.justify.left,command:'justifyleft'});r.ui.addButton('JustifyCenter',{label:r.lang.justify.center,command:'justifycenter'});r.ui.addButton('JustifyRight',{label:r.lang.justify.right,command:'justifyright'});r.ui.addButton('JustifyBlock',{label:r.lang.justify.block,command:'justifyblock'});r.on('selectionChange',e.bind(o,s));r.on('selectionChange',e.bind(o,u));r.on('selectionChange',e.bind(o,t));r.on('selectionChange',e.bind(o,v));r.on('dirChanged',q);},requires:['domiterator']});})();j.add('keystrokes',{beforeInit:function(m){m.keystrokeHandler=new a.keystrokeHandler(m);m.specialKeys={};},init:function(m){var n=m.config.keystrokes,o=m.config.blockedKeystrokes,p=m.keystrokeHandler.keystrokes,q=m.keystrokeHandler.blockedKeystrokes;for(var r=0;r<n.length;r++)p[n[r][0]]=n[r][1];for(r=0;r<o.length;r++)q[o[r]]=1;}});a.keystrokeHandler=function(m){var n=this;if(m.keystrokeHandler)return m.keystrokeHandler;n.keystrokes={};n.blockedKeystrokes={};n._={editor:m};
+return n;};(function(){var m,n=function(p){p=p.data;var q=p.getKeystroke(),r=this.keystrokes[q],s=this._.editor;m=s.fire('key',{keyCode:q})===true;if(!m){if(r){var t={from:'keystrokeHandler'};m=s.execCommand(r,t)!==false;}if(!m){var u=s.specialKeys[q];m=u&&u(s)===true;if(!m)m=!!this.blockedKeystrokes[q];}}if(m)p.preventDefault(true);return!m;},o=function(p){if(m){m=false;p.data.preventDefault(true);}};a.keystrokeHandler.prototype={attach:function(p){p.on('keydown',n,this);if(b.opera||b.gecko&&b.mac)p.on('keypress',o,this);}};})();i.blockedKeystrokes=[1114112+66,1114112+73,1114112+85];i.keystrokes=[[4456448+121,'toolbarFocus'],[4456448+122,'elementsPathFocus'],[2228224+121,'contextMenu'],[1114112+2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'link'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline'],[4456448+(c||b.webkit?189:109),'toolbarCollapse'],[4456448+48,'a11yHelp']];j.add('link',{init:function(m){m.addCommand('link',new a.dialogCommand('link'));m.addCommand('anchor',new a.dialogCommand('anchor'));m.addCommand('unlink',new a.unlinkCommand());m.addCommand('removeAnchor',new a.removeAnchorCommand());m.ui.addButton('Link',{label:m.lang.link.toolbar,command:'link'});m.ui.addButton('Unlink',{label:m.lang.unlink,command:'unlink'});m.ui.addButton('Anchor',{label:m.lang.anchor.toolbar,command:'anchor'});a.dialog.add('link',this.path+'dialogs/link.js');a.dialog.add('anchor',this.path+'dialogs/anchor.js');var n=m.lang.dir=='rtl'?'right':'left',o='background:url('+a.getUrl(this.path+'images/anchor.gif')+') no-repeat '+n+' center;'+'border:1px dotted #00f;';m.addCss('a.cke_anchor,a.cke_anchor_empty'+(c&&b.version<7?'':',a[name],a[data-cke-saved-name]')+'{'+o+'padding-'+n+':18px;'+'cursor:auto;'+'}'+(c?'a.cke_anchor_empty{display:inline-block;}':'')+'img.cke_anchor'+'{'+o+'width:16px;'+'min-height:15px;'+'height:1.15em;'+'vertical-align:'+(b.opera?'middle':'text-bottom')+';'+'}');m.on('selectionChange',function(p){if(m.readOnly)return;var q=m.getCommand('unlink'),r=p.data.path.lastElement&&p.data.path.lastElement.getAscendant('a',true);if(r&&r.getName()=='a'&&r.getAttribute('href')&&r.getChildCount())q.setState(2);else q.setState(0);});m.on('doubleclick',function(p){var q=j.link.getSelectedLink(m)||p.data.element;if(!q.isReadOnly())if(q.is('a')){p.data.dialog=q.getAttribute('name')&&(!q.getAttribute('href')||!q.getChildCount())?'anchor':'link';m.getSelection().selectElement(q);}else if(j.link.tryRestoreFakeAnchor(m,q))p.data.dialog='anchor';
+});if(m.addMenuItems)m.addMenuItems({anchor:{label:m.lang.anchor.menu,command:'anchor',group:'anchor',order:1},removeAnchor:{label:m.lang.anchor.remove,command:'removeAnchor',group:'anchor',order:5},link:{label:m.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:m.lang.unlink,command:'unlink',group:'link',order:5}});if(m.contextMenu)m.contextMenu.addListener(function(p,q){if(!p||p.isReadOnly())return null;var r=j.link.tryRestoreFakeAnchor(m,p);if(!r&&!(r=j.link.getSelectedLink(m)))return null;var s={};if(r.getAttribute('href')&&r.getChildCount())s={link:2,unlink:2};if(r&&r.hasAttribute('name'))s.anchor=s.removeAnchor=2;return s;});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter,p=n&&n.htmlFilter,q=m._.elementsPath&&m._.elementsPath.filters;if(o)o.addRules({elements:{a:function(r){var s=r.attributes;if(!s.name)return null;var t=!r.children.length;if(j.link.synAnchorSelector){var u=t?'cke_anchor_empty':'cke_anchor',v=s['class'];if(s.name&&(!v||v.indexOf(u)<0))s['class']=(v||'')+' '+u;if(t&&j.link.emptyAnchorFix){s.contenteditable='false';s['data-cke-editable']=1;}}else if(j.link.fakeAnchor&&t)return m.createFakeParserElement(r,'cke_anchor','anchor');return null;}}});if(j.link.emptyAnchorFix&&p)p.addRules({elements:{a:function(r){delete r.attributes.contenteditable;}}});if(q)q.push(function(r,s){if(s=='a')if(j.link.tryRestoreFakeAnchor(m,r)||r.getAttribute('name')&&(!r.getAttribute('href')||!r.getChildCount()))return 'anchor';});},requires:['fakeobjects']});j.link={getSelectedLink:function(m){try{var n=m.getSelection();if(n.getType()==3){var o=n.getSelectedElement();if(o.is('a'))return o;}var p=n.getRanges(true)[0];p.shrink(2);var q=p.getCommonAncestor();return q.getAscendant('a',true);}catch(r){return null;}},fakeAnchor:b.opera||b.webkit,synAnchorSelector:c,emptyAnchorFix:c&&b.version<8,tryRestoreFakeAnchor:function(m,n){if(n&&n.data('cke-real-element-type')&&n.data('cke-real-element-type')=='anchor'){var o=m.restoreRealElement(n);if(o.data('cke-saved-name'))return o;}}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p=n.getRanges(),q,r;for(var s=0;s<p.length;s++){q=p[s].getCommonAncestor(true);r=q.getAscendant('a',true);if(!r)continue;p[s].selectNodeContents(r);}n.selectRanges(p);m.document.$.execCommand('unlink',false,null);n.selectBookmarks(o);},startDisabled:true};a.removeAnchorCommand=function(){};a.removeAnchorCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p;
+if(n&&(p=n.getSelectedElement())&&(j.link.fakeAnchor&&!p.getChildCount()?j.link.tryRestoreFakeAnchor(m,p):p.is('a')))p.remove(1);else if(p=j.link.getSelectedLink(m))if(p.hasAttribute('href')){p.removeAttributes({name:1,'data-cke-saved-name':1});p.removeClass('cke_anchor');}else p.remove(1);n.selectBookmarks(o);}};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var m={ol:1,ul:1},n=/^[\n\r\t ]*$/,o=d.walker.whitespaces(),p=d.walker.bookmark(),q=function(E){return!(o(E)||p(E));};j.list={listToArray:function(E,F,G,H,I){if(!m[E.getName()])return[];if(!H)H=0;if(!G)G=[];for(var J=0,K=E.getChildCount();J<K;J++){var L=E.getChild(J);if(L.type==1&&L.getName() in f.$list)j.list.listToArray(L,F,G,H+1);if(L.$.nodeName.toLowerCase()!='li')continue;var M={parent:E,indent:H,element:L,contents:[]};if(!I){M.grandparent=E.getParent();if(M.grandparent&&M.grandparent.$.nodeName.toLowerCase()=='li')M.grandparent=M.grandparent.getParent();}else M.grandparent=I;if(F)h.setMarker(F,L,'listarray_index',G.length);G.push(M);for(var N=0,O=L.getChildCount(),P;N<O;N++){P=L.getChild(N);if(P.type==1&&m[P.getName()])j.list.listToArray(P,F,G,H+1,M.grandparent);else M.contents.push(P);}}return G;},arrayToList:function(E,F,G,H,I){if(!G)G=0;if(!E||E.length<G+1)return null;var J=E[G].parent.getDocument(),K=new d.documentFragment(J),L=null,M=G,N=Math.max(E[G].indent,0),O=null,P,Q=H==1?'p':'div';while(1){var R=E[M];P=R.element.getDirection(1);if(R.indent==N){if(!L||E[M].parent.getName()!=L.getName()){L=E[M].parent.clone(false,1);I&&L.setAttribute('dir',I);K.append(L);}O=L.append(R.element.clone(0,1));if(P!=L.getDirection(1))O.setAttribute('dir',P);else O.removeAttribute('dir');for(var S=0;S<R.contents.length;S++)O.append(R.contents[S].clone(1,1));M++;}else if(R.indent==Math.max(N,0)+1){var T=E[M-1].element.getDirection(1),U=j.list.arrayToList(E,null,M,H,T!=P?P:null);if(!O.getChildCount()&&c&&!(J.$.documentMode>7))O.append(J.createText('\xa0'));O.append(U.listNode);M=U.nextIndex;}else if(R.indent==-1&&!G&&R.grandparent){if(m[R.grandparent.getName()])O=R.element.clone(false,true);else if(I||R.element.hasAttributes()||H!=2){O=J.createElement(Q);R.element.copyAttributes(O,{type:1,value:1});if(!I&&H==2&&!O.hasAttributes())O=new d.documentFragment(J);}else O=new d.documentFragment(J);if(O.type==1)if(R.grandparent.getDirection(1)!=P)O.setAttribute('dir',P);else O.removeAttribute('dir');for(S=0;S<R.contents.length;S++)O.append(R.contents[S].clone(1,1));if(O.type==11&&M!=E.length-1){var V=O.getLast();
+if(V&&V.type==1&&V.getAttribute('type')=='_moz')V.remove();if(!(V=O.getLast(q)&&V.type==1&&V.getName() in f.$block))O.append(J.createElement('br'));}if(O.type==1&&O.getName()==Q&&O.$.firstChild){O.trim();var W=O.getFirst();if(W.type==1&&W.isBlockBoundary()){var X=new d.documentFragment(J);O.moveChildren(X);O=X;}}var Y=O.$.nodeName.toLowerCase();if(!c&&(Y=='div'||Y=='p'))O.appendBogus();K.append(O);L=null;M++;}else return null;if(E.length<=M||Math.max(E[M].indent,0)<N)break;}if(F){var Z=K.getFirst();while(Z){if(Z.type==1)h.clearMarkers(F,Z);Z=Z.getNextSourceNode();}}return{listNode:K,nextIndex:M};}};function r(E){if(E.editor.readOnly)return null;var F=E.data.path,G=F.blockLimit,H=F.elements,I,J;for(J=0;J<H.length&&(I=H[J])&&!I.equals(G);J++){if(m[H[J].getName()])return this.setState(this.type==H[J].getName()?1:2);}return this.setState(2);};function s(E,F,G,H){var I=j.list.listToArray(F.root,G),J=[];for(var K=0;K<F.contents.length;K++){var L=F.contents[K];L=L.getAscendant('li',true);if(!L||L.getCustomData('list_item_processed'))continue;J.push(L);h.setMarker(G,L,'list_item_processed',true);}var M=F.root,N=M.getDocument().createElement(this.type);M.copyAttributes(N,{start:1,type:1});N.removeStyle('list-style-type');for(K=0;K<J.length;K++){var O=J[K].getCustomData('listarray_index');I[O].parent=N;}var P=j.list.arrayToList(I,G,null,E.config.enterMode),Q,R=P.listNode.getChildCount();for(K=0;K<R&&(Q=P.listNode.getChild(K));K++){if(Q.getName()==this.type)H.push(Q);}P.listNode.replace(F.root);};var t=/^h[1-6]$/;function u(E,F,G){var H=F.contents,I=F.root.getDocument(),J=[];if(H.length==1&&H[0].equals(F.root)){var K=I.createElement('div');H[0].moveChildren&&H[0].moveChildren(K);H[0].append(K);H[0]=K;}var L=F.contents[0].getParent();for(var M=0;M<H.length;M++)L=L.getCommonAncestor(H[M].getParent());var N=E.config.useComputedState,O,P;N=N===undefined||N;for(M=0;M<H.length;M++){var Q=H[M],R;while(R=Q.getParent()){if(R.equals(L)){J.push(Q);if(!P&&Q.getDirection())P=1;var S=Q.getDirection(N);if(O!==null)if(O&&O!=S)O=null;else O=S;break;}Q=R;}}if(J.length<1)return;var T=J[J.length-1].getNext(),U=I.createElement(this.type);G.push(U);var V,W;while(J.length){V=J.shift();W=I.createElement('li');if(V.is('pre')||t.test(V.getName()))V.appendTo(W);else{V.copyAttributes(W);if(O&&V.getDirection()){W.removeStyle('direction');W.removeAttribute('dir');}V.moveChildren(W);V.remove();}W.appendTo(U);}if(O&&P)U.setAttribute('dir',O);if(T)U.insertBefore(T);else U.appendTo(L);};function v(E,F,G){var H=j.list.listToArray(F.root,G),I=[];
+for(var J=0;J<F.contents.length;J++){var K=F.contents[J];K=K.getAscendant('li',true);if(!K||K.getCustomData('list_item_processed'))continue;I.push(K);h.setMarker(G,K,'list_item_processed',true);}var L=null;for(J=0;J<I.length;J++){var M=I[J].getCustomData('listarray_index');H[M].indent=-1;L=M;}for(J=L+1;J<H.length;J++){if(H[J].indent>H[J-1].indent+1){var N=H[J-1].indent+1-H[J].indent,O=H[J].indent;while(H[J]&&H[J].indent>=O){H[J].indent+=N;J++;}J--;}}var P=j.list.arrayToList(H,G,null,E.config.enterMode,F.root.getAttribute('dir')),Q=P.listNode,R,S;function T(U){if((R=Q[U?'getFirst':'getLast']())&&!(R.is&&R.isBlockBoundary())&&(S=F.root[U?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(S.is&&S.isBlockBoundary({br:1})))E.document.createElement('br')[U?'insertBefore':'insertAfter'](R);};T(true);T();Q.replace(F.root);};function w(E,F){this.name=E;this.type=F;};w.prototype={exec:function(E){var F=E.document,G=E.config,H=E.getSelection(),I=H&&H.getRanges(true);if(!I||I.length<1)return;if(this.state==2){var J=F.getBody();if(!J.getFirst(q)){G.enterMode==2?J.appendBogus():I[0].fixBlock(1,G.enterMode==1?'p':'div');H.selectRanges(I);}else{var K=I.length==1&&I[0],L=K&&K.getEnclosedNode();if(L&&L.is&&this.type==L.getName())this.setState(1);}}var M=H.createBookmarks(true),N=[],O={},P=I.createIterator(),Q=0;while((K=P.getNextRange())&&++Q){var R=K.getBoundaryNodes(),S=R.startNode,T=R.endNode;if(S.type==1&&S.getName()=='td')K.setStartAt(R.startNode,1);if(T.type==1&&T.getName()=='td')K.setEndAt(R.endNode,2);var U=K.createIterator(),V;U.forceBrBreak=this.state==2;while(V=U.getNextParagraph()){if(V.getCustomData('list_block'))continue;else h.setMarker(O,V,'list_block',1);var W=new d.elementPath(V),X=W.elements,Y=X.length,Z=null,aa=0,ab=W.blockLimit,ac;for(var ad=Y-1;ad>=0&&(ac=X[ad]);ad--){if(m[ac.getName()]&&ab.contains(ac)){ab.removeCustomData('list_group_object_'+Q);var ae=ac.getCustomData('list_group_object');if(ae)ae.contents.push(V);else{ae={root:ac,contents:[V]};N.push(ae);h.setMarker(O,ac,'list_group_object',ae);}aa=1;break;}}if(aa)continue;var af=ab;if(af.getCustomData('list_group_object_'+Q))af.getCustomData('list_group_object_'+Q).contents.push(V);else{ae={root:af,contents:[V]};h.setMarker(O,af,'list_group_object_'+Q,ae);N.push(ae);}}}var ag=[];while(N.length>0){ae=N.shift();if(this.state==2){if(m[ae.root.getName()])s.call(this,E,ae,O,ag);else u.call(this,E,ae,ag);}else if(this.state==1&&m[ae.root.getName()])v.call(this,E,ae,O);}for(ad=0;ad<ag.length;ad++){Z=ag[ad];
+var ah,ai=this;(ah=function(aj){var ak=Z[aj?'getPrevious':'getNext'](d.walker.whitespaces(true));if(ak&&ak.getName&&ak.getName()==ai.type){ak.remove();ak.moveChildren(Z,aj);}})();ah(1);}h.clearAllMarkers(O);H.selectBookmarks(M);E.focus();}};var x=f,y=/[\t\r\n ]*(?: |\xa0)$/;function z(E,F){var G,H=E.children,I=H.length;for(var J=0;J<I;J++){G=H[J];if(G.name&&G.name in F)return J;}return I;};function A(E){return function(F){var G=F.children,H=z(F,x.$list),I=G[H],J=I&&I.previous,K;if(J&&(J.name&&J.name=='br'||J.value&&(K=J.value.match(y)))){var L=J;if(!(K&&K.index)&&L==G[0])G[0]=E||c?new a.htmlParser.text('\xa0'):new a.htmlParser.element('br',{});else if(L.name=='br')G.splice(H-1,1);else L.value=L.value.replace(y,'');}};};var B={elements:{}};for(var C in x.$listItem)B.elements[C]=A();var D={elements:{}};for(C in x.$listItem)D.elements[C]=A(true);j.add('list',{init:function(E){var F=E.addCommand('numberedlist',new w('numberedlist','ol')),G=E.addCommand('bulletedlist',new w('bulletedlist','ul'));E.ui.addButton('NumberedList',{label:E.lang.numberedlist,command:'numberedlist'});E.ui.addButton('BulletedList',{label:E.lang.bulletedlist,command:'bulletedlist'});E.on('selectionChange',e.bind(r,F));E.on('selectionChange',e.bind(r,G));},afterInit:function(E){var F=E.dataProcessor;if(F){F.dataFilter.addRules(B);F.htmlFilter.addRules(D);}},requires:['domiterator']});})();(function(){j.liststyle={requires:['dialog'],init:function(m){m.addCommand('numberedListStyle',new a.dialogCommand('numberedListStyle'));a.dialog.add('numberedListStyle',this.path+'dialogs/liststyle.js');m.addCommand('bulletedListStyle',new a.dialogCommand('bulletedListStyle'));a.dialog.add('bulletedListStyle',this.path+'dialogs/liststyle.js');if(m.addMenuItems){m.addMenuGroup('list',108);m.addMenuItems({numberedlist:{label:m.lang.list.numberedTitle,group:'list',command:'numberedListStyle'},bulletedlist:{label:m.lang.list.bulletedTitle,group:'list',command:'bulletedListStyle'}});}if(m.contextMenu)m.contextMenu.addListener(function(n,o){if(!n||n.isReadOnly())return null;while(n){var p=n.getName();if(p=='ol')return{numberedlist:2};else if(p=='ul')return{bulletedlist:2};n=n.getParent();}return null;});}};j.add('liststyle',j.liststyle);})();(function(){function m(s){if(!s||s.type!=1||s.getName()!='form')return[];var t=[],u=['style','className'];for(var v=0;v<u.length;v++){var w=u[v],x=s.$.elements.namedItem(w);if(x){var y=new h(x);t.push([y,y.nextSibling]);y.remove();}}return t;};function n(s,t){if(!s||s.type!=1||s.getName()!='form')return;
+if(t.length>0)for(var u=t.length-1;u>=0;u--){var v=t[u][0],w=t[u][1];if(w)v.insertBefore(w);else v.appendTo(s);}};function o(s,t){var u=m(s),v={},w=s.$;if(!t){v['class']=w.className||'';w.className='';}v.inline=w.style.cssText||'';if(!t)w.style.cssText='position: static; overflow: visible';n(u);return v;};function p(s,t){var u=m(s),v=s.$;if('class' in t)v.className=t['class'];if('inline' in t)v.style.cssText=t.inline;n(u);};function q(s){var t=a.instances;for(var u in t){var v=t[u];if(v.mode=='wysiwyg'&&!v.readOnly){var w=v.document.getBody();w.setAttribute('contentEditable',false);w.setAttribute('contentEditable',true);}}if(s.focusManager.hasFocus){s.toolbox.focus();s.focus();}};function r(s){if(!c||b.version>6)return null;var t=h.createFromHtml('<iframe frameborder="0" tabindex="-1" src="javascript:void((function(){document.open();'+(b.isCustomDomain()?"document.domain='"+this.getDocument().$.domain+"';":'')+'document.close();'+'})())"'+' style="display:block;position:absolute;z-index:-1;'+'progid:DXImageTransform.Microsoft.Alpha(opacity=0);'+'"></iframe>');return s.append(t,true);};j.add('maximize',{init:function(s){var t=s.lang,u=a.document,v=u.getWindow(),w,x,y,z;function A(){var C=v.getViewPaneSize();z&&z.setStyles({width:C.width+'px',height:C.height+'px'});s.resize(C.width,C.height,null,true);};var B=2;s.addCommand('maximize',{modes:{wysiwyg:1,source:1},readOnly:1,editorFocus:false,exec:function(){var C=s.container.getChild(1),D=s.getThemeSpace('contents');if(s.mode=='wysiwyg'){var E=s.getSelection();w=E&&E.getRanges();x=v.getScrollPosition();}else{var F=s.textarea.$;w=!c&&[F.selectionStart,F.selectionEnd];x=[F.scrollLeft,F.scrollTop];}if(this.state==2){v.on('resize',A);y=v.getScrollPosition();var G=s.container;while(G=G.getParent()){G.setCustomData('maximize_saved_styles',o(G));G.setStyle('z-index',s.config.baseFloatZIndex-1);}D.setCustomData('maximize_saved_styles',o(D,true));C.setCustomData('maximize_saved_styles',o(C,true));var H={overflow:b.webkit?'':'hidden',width:0,height:0};u.getDocumentElement().setStyles(H);!b.gecko&&u.getDocumentElement().setStyle('position','fixed');!(b.gecko&&b.quirks)&&u.getBody().setStyles(H);c?setTimeout(function(){v.$.scrollTo(0,0);},0):v.$.scrollTo(0,0);C.setStyle('position',b.gecko&&b.quirks?'fixed':'absolute');C.$.offsetLeft;C.setStyles({'z-index':s.config.baseFloatZIndex-1,left:'0px',top:'0px'});z=r(C);C.addClass('cke_maximized');A();var I=C.getDocumentPosition();C.setStyles({left:-1*I.x+'px',top:-1*I.y+'px'});b.gecko&&q(s);
+}else if(this.state==1){v.removeListener('resize',A);var J=[D,C];for(var K=0;K<J.length;K++){p(J[K],J[K].getCustomData('maximize_saved_styles'));J[K].removeCustomData('maximize_saved_styles');}G=s.container;while(G=G.getParent()){p(G,G.getCustomData('maximize_saved_styles'));G.removeCustomData('maximize_saved_styles');}c?setTimeout(function(){v.$.scrollTo(y.x,y.y);},0):v.$.scrollTo(y.x,y.y);C.removeClass('cke_maximized');if(b.webkit){C.setStyle('display','inline');setTimeout(function(){C.setStyle('display','block');},0);}if(z){z.remove();z=null;}s.fire('resize');}this.toggleState();var L=this.uiItems[0];if(L){var M=this.state==2?t.maximize:t.minimize,N=s.element.getDocument().getById(L._.id);N.getChild(1).setHtml(M);N.setAttribute('title',M);N.setAttribute('href','javascript:void("'+M+'");');}if(s.mode=='wysiwyg'){if(w){b.gecko&&q(s);s.getSelection().selectRanges(w);var O=s.getSelection().getStartElement();O&&O.scrollIntoView(true);}else v.$.scrollTo(x.x,x.y);}else{if(w){F.selectionStart=w[0];F.selectionEnd=w[1];}F.scrollLeft=x[0];F.scrollTop=x[1];}w=x=null;B=this.state;},canUndo:false});s.ui.addButton('Maximize',{label:t.maximize,command:'maximize'});s.on('mode',function(){var C=s.getCommand('maximize');C.setState(C.state==0?0:B);},null,null,100);}});})();j.add('newpage',{init:function(m){m.addCommand('newpage',{modes:{wysiwyg:1,source:1},exec:function(n){var o=this;n.setData(n.config.newpage_html||'',function(){setTimeout(function(){n.fire('afterCommandExec',{name:o.name,command:o});n.selectionChange();},200);});n.focus();},async:true});m.ui.addButton('NewPage',{label:m.lang.newPage,command:'newpage'});}});j.add('pagebreak',{init:function(m){m.addCommand('pagebreak',j.pagebreakCmd);m.ui.addButton('PageBreak',{label:m.lang.pagebreak,command:'pagebreak'});var n=['{','background: url('+a.getUrl(this.path+'images/pagebreak.gif')+') no-repeat center center;','clear: both;','width:100%; _width:99.9%;','border-top: #999999 1px dotted;','border-bottom: #999999 1px dotted;','padding:0;','height: 5px;','cursor: default;','}'].join('').replace(/;/g,' !important;');m.addCss('div.cke_pagebreak'+n);b.opera&&m.on('contentDom',function(){m.document.on('click',function(o){var p=o.data.getTarget();if(p.is('div')&&p.hasClass('cke_pagebreak'))m.getSelection().selectElement(p);});});},afterInit:function(m){var n=m.lang.pagebreakAlt,o=m.dataProcessor,p=o&&o.dataFilter,q=o&&o.htmlFilter;if(q)q.addRules({attributes:{'class':function(r,s){var t=r.replace('cke_pagebreak','');if(t!=r){var u=a.htmlParser.fragment.fromHtml('<span style="display: none;"> </span>');
+s.children.length=0;s.add(u);var v=s.attributes;delete v['aria-label'];delete v.contenteditable;delete v.title;}return t;}}},5);if(p)p.addRules({elements:{div:function(r){var s=r.attributes,t=s&&s.style,u=t&&r.children.length==1&&r.children[0],v=u&&u.name=='span'&&u.attributes.style;if(v&&/page-break-after\s*:\s*always/i.test(t)&&/display\s*:\s*none/i.test(v)){s.contenteditable='false';s['class']='cke_pagebreak';s['data-cke-display-name']='pagebreak';s['aria-label']=n;s.title=n;r.children.length=0;}}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(m){var n=m.lang.pagebreakAlt,o=h.createFromHtml('<div style="page-break-after: always;"contenteditable="false" title="'+n+'" '+'aria-label="'+n+'" '+'data-cke-display-name="pagebreak" '+'class="cke_pagebreak">'+'</div>',m.document),p=m.getSelection().getRanges(true);m.fire('saveSnapshot');for(var q,r=p.length-1;r>=0;r--){q=p[r];if(r<p.length-1)o=o.clone(true);q.splitBlock('p');q.insertNode(o);if(r==p.length-1){var s=o.getNext();q.moveToPosition(o,4);if(!s||s.type==1&&!s.isEditable())q.fixBlock(true,m.config.enterMode==3?'div':'p');q.select();}}m.fire('saveSnapshot');}};(function(){function m(n){n.data.mode='html';};j.add('pastefromword',{init:function(n){var o=0,p=function(q){q&&q.removeListener();n.removeListener('beforePaste',m);o&&setTimeout(function(){o=0;},0);};n.addCommand('pastefromword',{canUndo:false,exec:function(){o=1;n.on('beforePaste',m);if(n.execCommand('paste','html')===false){n.on('dialogShow',function(q){q.removeListener();q.data.on('cancel',p);});n.on('dialogHide',function(q){q.data.removeListener('cancel',p);});}n.on('afterPaste',p);}});n.ui.addButton('PasteFromWord',{label:n.lang.pastefromword.toolbar,command:'pastefromword'});n.on('pasteState',function(q){n.getCommand('pastefromword').setState(q.data);});n.on('paste',function(q){var r=q.data,s;if((s=r.html)&&(o||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(s))){var t=this.loadFilterRules(function(){if(t)n.fire('paste',r);else if(!n.config.pasteFromWordPromptCleanup||o||confirm(n.lang.pastefromword.confirmCleanup))r.html=a.cleanWord(s,n);});t&&q.cancel();}},this);},loadFilterRules:function(n){var o=a.cleanWord;if(o)n();else{var p=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(p,n,null,true);}return!o;},requires:['clipboard']});})();(function(){var m={exec:function(n){var o=e.tryThese(function(){var p=window.clipboardData.getData('Text');if(!p)throw 0;return p;});if(!o){n.openDialog('pastetext');
+return false;}else n.fire('paste',{text:o});return true;}};j.add('pastetext',{init:function(n){var o='pastetext',p=n.addCommand(o,m);n.ui.addButton('PasteText',{label:n.lang.pasteText.button,command:o});a.dialog.add(o,a.getUrl(this.path+'dialogs/pastetext.js'));if(n.config.forcePasteAsPlainText){n.on('beforeCommandExec',function(q){var r=q.data.commandData;if(q.data.name=='paste'&&r!='html'){n.execCommand('pastetext');q.cancel();}},null,null,0);n.on('beforePaste',function(q){q.data.mode='text';});}n.on('pasteState',function(q){n.getCommand('pastetext').setState(q.data);});},requires:['clipboard']});})();j.add('popup');e.extend(a.editor.prototype,{popup:function(m,n,o,p){n=n||'80%';o=o||'70%';if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.width*parseInt(n,10)/100,10);if(typeof o=='string'&&o.length>1&&o.substr(o.length-1,1)=='%')o=parseInt(window.screen.height*parseInt(o,10)/100,10);if(n<640)n=640;if(o<420)o=420;var q=parseInt((window.screen.height-o)/2,10),r=parseInt((window.screen.width-n)/2,10);p=(p||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+n+',height='+o+',top='+q+',left='+r;var s=window.open('',null,p,true);if(!s)return false;try{s.moveTo(r,q);s.resizeTo(n,o);s.focus();s.location.href=m;}catch(t){s=window.open(m,null,p,true);}return true;}});(function(){var m={modes:{wysiwyg:1,source:1},canUndo:false,readOnly:1,exec:function(o){var p,q=o.config,r=q.baseHref?'<base href="'+q.baseHref+'"/>':'',s=b.isCustomDomain();if(q.fullPage)p=o.getData().replace(/<head>/,'$&'+r).replace(/[^>]*(?=<\/title>)/,'$& — '+o.lang.preview);else{var t='<body ',u=o.document&&o.document.getBody();if(u){if(u.getAttribute('id'))t+='id="'+u.getAttribute('id')+'" ';if(u.getAttribute('class'))t+='class="'+u.getAttribute('class')+'" ';}t+='>';p=o.config.docType+'<html dir="'+o.config.contentsLangDirection+'">'+'<head>'+r+'<title>'+o.lang.preview+'</title>'+e.buildStyleHtml(o.config.contentsCss)+'</head>'+t+o.getData()+'</body></html>';}var v=640,w=420,x=80;try{var y=window.screen;v=Math.round(y.width*0.8);w=Math.round(y.height*0.7);x=Math.round(y.width*0.1);}catch(B){}var z='';if(s){window._cke_htmlToLoad=p;z='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var A=window.open(z,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+v+',height='+w+',left='+x);
+if(!s){A.document.open();A.document.write(p);A.document.close();}}},n='preview';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('Preview',{label:o.lang.preview,command:n});}});})();j.add('print',{init:function(m){var n='print',o=m.addCommand(n,j.print);m.ui.addButton('Print',{label:m.lang.print,command:n});}});j.print={exec:function(m){if(b.opera)return;else if(b.gecko)m.window.$.print();else m.document.$.execCommand('Print');},canUndo:false,readOnly:1,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(m){m.addCommand('removeFormat',j.removeformat.commands.removeformat);m.ui.addButton('RemoveFormat',{label:m.lang.removeFormat,command:'removeFormat'});m._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(m){var n=m._.removeFormatRegex||(m._.removeFormatRegex=new RegExp('^(?:'+m.config.removeFormatTags.replace(/,/g,'|')+')$','i')),o=m._.removeAttributes||(m._.removeAttributes=m.config.removeFormatAttributes.split(',')),p=j.removeformat.filter,q=m.getSelection().getRanges(1),r=q.createIterator(),s;while(s=r.getNextRange()){if(!s.collapsed)s.enlarge(1);var t=s.createBookmark(),u=t.startNode,v=t.endNode,w,x=function(z){var A=new d.elementPath(z),B=A.elements;for(var C=1,D;D=B[C];C++){if(D.equals(A.block)||D.equals(A.blockLimit))break;if(n.test(D.getName())&&p(m,D))z.breakParent(D);}};x(u);if(v){x(v);w=u.getNextSourceNode(true,1);while(w){if(w.equals(v))break;var y=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.data('cke-realelement'))&&p(m,w))if(n.test(w.getName()))w.remove(1);else{w.removeAttributes(o);m.fire('removeFormatCleanup',w);}w=y;}}s.moveToBookmark(t);}m.getSelection().selectRanges(q);}}},filter:function(m,n){var o=m._.removeFormat.filters;for(var p=0;p<o.length;p++){if(o[p](n)===false)return false;}return true;}};a.editor.prototype.addRemoveFormatFilter=function(m){this._.removeFormat.filters.push(m);};i.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(m){var n=m.config,o=m.element.getDirection(1);!n.resize_dir&&(n.resize_dir='both');n.resize_maxWidth==undefined&&(n.resize_maxWidth=3000);n.resize_maxHeight==undefined&&(n.resize_maxHeight=3000);n.resize_minWidth==undefined&&(n.resize_minWidth=750);n.resize_minHeight==undefined&&(n.resize_minHeight=250);if(n.resize_enabled!==false){var p=null,q,r,s=(n.resize_dir=='both'||n.resize_dir=='horizontal')&&n.resize_minWidth!=n.resize_maxWidth,t=(n.resize_dir=='both'||n.resize_dir=='vertical')&&n.resize_minHeight!=n.resize_maxHeight;
+function u(x){var y=x.data.$.screenX-q.x,z=x.data.$.screenY-q.y,A=r.width,B=r.height,C=A+y*(o=='rtl'?-1:1),D=B+z;if(s)A=Math.max(n.resize_minWidth,Math.min(C,n.resize_maxWidth));if(t)B=Math.max(n.resize_minHeight,Math.min(D,n.resize_maxHeight));m.resize(A,B);};function v(x){a.document.removeListener('mousemove',u);a.document.removeListener('mouseup',v);if(m.document){m.document.removeListener('mousemove',u);m.document.removeListener('mouseup',v);}};var w=e.addFunction(function(x){if(!p)p=m.getResizable();r={width:p.$.offsetWidth||0,height:p.$.offsetHeight||0};q={x:x.screenX,y:x.screenY};n.resize_minWidth>r.width&&(n.resize_minWidth=r.width);n.resize_minHeight>r.height&&(n.resize_minHeight=r.height);a.document.on('mousemove',u);a.document.on('mouseup',v);if(m.document){m.document.on('mousemove',u);m.document.on('mouseup',v);}});m.on('destroy',function(){e.removeFunction(w);});m.on('themeSpace',function(x){if(x.data.space=='bottom'){var y='';if(s&&!t)y=' cke_resizer_horizontal';if(!s&&t)y=' cke_resizer_vertical';var z='<div class="cke_resizer'+y+' cke_resizer_'+o+'"'+' title="'+e.htmlEncode(m.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+w+', event)"'+'></div>';o=='ltr'&&y=='ltr'?x.data.html+=z:x.data.html=z+x.data.html;}},m,null,100);}}});(function(){var m={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(o){var p=o.element.$.form;if(p)try{p.submit();}catch(q){if(p.submit.click)p.submit.click();}}},n='save';j.add(n,{init:function(o){var p=o.addCommand(n,m);p.modes={wysiwyg:!!o.element.$.form};o.ui.addButton('Save',{label:o.lang.save,command:n});}});})();(function(){var m='scaytcheck',n='';function o(t,u){var v=0,w;for(w in u){if(u[w]==t){v=1;break;}}return v;};var p=function(){var t=this,u=function(){var y=t.config,z={};z.srcNodeRef=t.document.getWindow().$.frameElement;z.assocApp='CKEDITOR.'+a.version+'@'+a.revision;z.customerid=y.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';z.customDictionaryIds=y.scayt_customDictionaryIds||'';z.userDictionaryName=y.scayt_userDictionaryName||'';z.sLang=y.scayt_sLang||'en_US';z.onLoad=function(){if(!(c&&b.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(t.focusManager.hasFocus&&!q.isControlRestored(t))this.focus();};z.onBeforeChange=function(){if(q.getScayt(t)&&!t.checkDirty())setTimeout(function(){t.resetDirty();},0);};var A=window.scayt_custom_params;if(typeof A=='object')for(var B in A)z[B]=A[B];if(q.getControlId(t))z.id=q.getControlId(t);
+var C=new window.scayt(z);C.afterMarkupRemove.push(function(E){new h(E,C.document).mergeSiblings();});var D=q.instances[t.name];if(D){C.sLang=D.sLang;C.option(D.option());C.paused=D.paused;}q.instances[t.name]=C;try{C.setDisabled(q.isPaused(t)===false);}catch(E){}t.fire('showScaytState');};t.on('contentDom',u);t.on('contentDomUnload',function(){var y=a.document.getElementsByTag('script'),z=/^dojoIoScript(\d+)$/i,A=/^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var B=0;B<y.count();B++){var C=y.getItem(B),D=C.getId(),E=C.getAttribute('src');if(D&&E&&D.match(z)&&E.match(A))C.remove();}});t.on('beforeCommandExec',function(y){if((y.data.name=='source'||y.data.name=='newpage')&&t.mode=='wysiwyg'){var z=q.getScayt(t);if(z){q.setPaused(t,!z.disabled);q.setControlId(t,z.id);z.destroy(true);delete q.instances[t.name];}}else if(y.data.name=='source'&&t.mode=='source')q.markControlRestore(t);});t.on('afterCommandExec',function(y){if(!q.isScaytEnabled(t))return;if(t.mode=='wysiwyg'&&(y.data.name=='undo'||y.data.name=='redo'))window.setTimeout(function(){q.getScayt(t).refresh();},10);});t.on('destroy',function(y){var z=y.editor,A=q.getScayt(z);if(!A)return;delete q.instances[z.name];q.setControlId(z,A.id);A.destroy(true);});t.on('afterSetData',function(){if(q.isScaytEnabled(t))window.setTimeout(function(){var y=q.getScayt(t);y&&y.refresh();},10);});t.on('insertElement',function(){var y=q.getScayt(t);if(q.isScaytEnabled(t)){if(c)t.getSelection().unlock(true);window.setTimeout(function(){y.focus();y.refresh();},10);}},this,null,50);t.on('insertHtml',function(){var y=q.getScayt(t);if(q.isScaytEnabled(t)){if(c)t.getSelection().unlock(true);window.setTimeout(function(){y.focus();y.refresh();},10);}},this,null,50);t.on('scaytDialog',function(y){y.data.djConfig=window.djConfig;y.data.scayt_control=q.getScayt(t);y.data.tab=n;y.data.scayt=window.scayt;});var v=t.dataProcessor,w=v&&v.htmlFilter;if(w)w.addRules({elements:{span:function(y){if(y.attributes['data-scayt_word']&&y.attributes['data-scaytid']){delete y.name;return y;}}}});var x=j.undo.Image.prototype;x.equals=e.override(x.equals,function(y){return function(z){var E=this;var A=E.contents,B=z.contents,C=q.getScayt(E.editor);if(C&&q.isScaytReady(E.editor)){E.contents=C.reset(A)||'';z.contents=C.reset(B)||'';}var D=y.apply(E,arguments);E.contents=A;z.contents=B;return D;};});if(t.document)u();};j.scayt={engineLoaded:false,instances:{},controlInfo:{},setControlInfo:function(t,u){if(t&&t.name&&typeof this.controlInfo[t.name]!='object')this.controlInfo[t.name]={};
+for(var v in u)this.controlInfo[t.name][v]=u[v];},isControlRestored:function(t){if(t&&t.name&&this.controlInfo[t.name])return this.controlInfo[t.name].restored;return false;},markControlRestore:function(t){this.setControlInfo(t,{restored:true});},setControlId:function(t,u){this.setControlInfo(t,{id:u});},getControlId:function(t){if(t&&t.name&&this.controlInfo[t.name]&&this.controlInfo[t.name].id)return this.controlInfo[t.name].id;return null;},setPaused:function(t,u){this.setControlInfo(t,{paused:u});},isPaused:function(t){if(t&&t.name&&this.controlInfo[t.name])return this.controlInfo[t.name].paused;return undefined;},getScayt:function(t){return this.instances[t.name];},isScaytReady:function(t){return this.engineLoaded===true&&'undefined'!==typeof window.scayt&&this.getScayt(t);},isScaytEnabled:function(t){var u=this.getScayt(t);return u?u.disabled===false:false;},getUiTabs:function(t){var u=[],v=t.config.scayt_uiTabs||'1,1,1';v=v.split(',');v[3]='1';for(var w=0;w<4;w++)u[w]=typeof window.scayt!='undefined'&&typeof window.scayt.uiTags!='undefined'?parseInt(v[w],10)&&window.scayt.uiTags[w]:parseInt(v[w],10);return u;},loadEngine:function(t){if(b.gecko&&b.version<10900||b.opera||b.air)return t.fire('showScaytState');if(this.engineLoaded===true)return p.apply(t);else if(this.engineLoaded==-1)return a.on('scaytReady',function(){p.apply(t);});a.on('scaytReady',p,t);a.on('scaytReady',function(){this.engineLoaded=true;},this,null,0);this.engineLoaded=-1;var u=document.location.protocol;u=u.search(/https?:/)!=-1?u:'http:';var v='svc.spellchecker.net/scayt26/loader__base.js',w=t.config.scayt_srcUrl||u+'//'+v,x=q.parseUrl(w).path+'/';if(window.scayt==undefined){a._djScaytConfig={baseUrl:x,addOnLoad:[function(){a.fireOnce('scaytReady');}],isDebug:false};a.document.getHead().append(a.document.createElement('script',{attributes:{type:'text/javascript',async:'true',src:w}}));}else a.fireOnce('scaytReady');return null;},parseUrl:function(t){var u;if(t.match&&(u=t.match(/(.*)[\/\\](.*?\.\w+)$/)))return{path:u[1],file:u[2]};else return t;}};var q=j.scayt,r=function(t,u,v,w,x,y,z){t.addCommand(w,x);t.addMenuItem(w,{label:v,command:w,group:y,order:z});},s={preserveState:true,editorFocus:false,canUndo:false,exec:function(t){if(q.isScaytReady(t)){var u=q.isScaytEnabled(t);this.setState(u?2:1);var v=q.getScayt(t);v.focus();v.setDisabled(u);}else if(!t.config.scayt_autoStartup&&q.engineLoaded>=0){this.setState(0);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){var u=t.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',v='';
+u=u.split('|');if(u&&u.length)for(var w=0;w<u.length;w++)v+='scayt_'+u[w]+(u.length!=parseInt(w,10)+1?',':'');t.config.menu_groups=v+','+t.config.menu_groups;},init:function(t){var u=t.dataProcessor&&t.dataProcessor.dataFilter,v={elements:{span:function(E){var F=E.attributes;if(F&&F['data-scaytid'])delete E.name;}}};u&&u.addRules(v);var w={},x={},y=t.addCommand(m,s);a.dialog.add(m,a.getUrl(this.path+'dialogs/options.js'));var z=q.getUiTabs(t),A='scaytButton';t.addMenuGroup(A);var B={},C=t.lang.scayt;B.scaytToggle={label:C.enable,command:m,group:A};if(z[0]==1)B.scaytOptions={label:C.options,group:A,onClick:function(){n='options';t.openDialog(m);}};if(z[1]==1)B.scaytLangs={label:C.langs,group:A,onClick:function(){n='langs';t.openDialog(m);}};if(z[2]==1)B.scaytDict={label:C.dictionariesTab,group:A,onClick:function(){n='dictionaries';t.openDialog(m);}};B.scaytAbout={label:t.lang.scayt.about,group:A,onClick:function(){n='about';t.openDialog(m);}};t.addMenuItems(B);t.ui.add('Scayt','menubutton',{label:C.title,title:b.opera?C.opera_title:C.title,className:'cke_button_scayt',modes:{wysiwyg:1},onRender:function(){y.on('state',function(){this.setState(y.state);},this);},onMenu:function(){var E=q.isScaytEnabled(t);t.getMenuItem('scaytToggle').label=C[E?'disable':'enable'];var F=q.getUiTabs(t);return{scaytToggle:2,scaytOptions:E&&F[0]?2:0,scaytLangs:E&&F[1]?2:0,scaytDict:E&&F[2]?2:0,scaytAbout:E&&F[3]?2:0};}});if(t.contextMenu&&t.addMenuItems)t.contextMenu.addListener(function(E,F){if(!q.isScaytEnabled(t)||F.getRanges()[0].checkReadOnly())return null;var G=q.getScayt(t),H=G.getScaytNode();if(!H)return null;var I=G.getWord(H);if(!I)return null;var J=G.getLang(),K={},L=window.scayt.getSuggestion(I,J);if(!L||!L.length)return null;for(var M in w){delete t._.menuItems[M];delete t._.commands[M];}for(M in x){delete t._.menuItems[M];delete t._.commands[M];}w={};x={};var N=t.config.scayt_moreSuggestions||'on',O=false,P=t.config.scayt_maxSuggestions;typeof P!='number'&&(P=5);!P&&(P=L.length);var Q=t.config.scayt_contextCommands||'all';Q=Q.split('|');for(var R=0,S=L.length;R<S;R+=1){var T='scayt_suggestion_'+L[R].replace(' ','_'),U=(function(Y,Z){return{exec:function(){G.replace(Y,Z);}};})(H,L[R]);if(R<P){r(t,'button_'+T,L[R],T,U,'scayt_suggest',R+1);K[T]=2;x[T]=2;}else if(N=='on'){r(t,'button_'+T,L[R],T,U,'scayt_moresuggest',R+1);w[T]=2;O=true;}}if(O){t.addMenuItem('scayt_moresuggest',{label:C.moreSuggestions,group:'scayt_moresuggest',order:10,getItems:function(){return w;}});x.scayt_moresuggest=2;
+}if(o('all',Q)||o('ignore',Q)){var V={exec:function(){G.ignore(H);}};r(t,'ignore',C.ignore,'scayt_ignore',V,'scayt_control',1);x.scayt_ignore=2;}if(o('all',Q)||o('ignoreall',Q)){var W={exec:function(){G.ignoreAll(H);}};r(t,'ignore_all',C.ignoreAll,'scayt_ignore_all',W,'scayt_control',2);x.scayt_ignore_all=2;}if(o('all',Q)||o('add',Q)){var X={exec:function(){window.scayt.addWordToUserDictionary(H);}};r(t,'add_word',C.addWord,'scayt_add_word',X,'scayt_control',3);x.scayt_add_word=2;}if(G.fireOnContextMenu)G.fireOnContextMenu(t);return x;});var D=function(){t.removeListener('showScaytState',D);if(!b.opera&&!b.air)y.setState(q.isScaytEnabled(t)?1:2);else y.setState(0);};t.on('showScaytState',D);if(b.opera||b.air)t.on('instanceReady',function(){D();});if(t.config.scayt_autoStartup)t.on('instanceReady',function(){q.loadEngine(t);});},afterInit:function(t){var u,v=function(w){if(w.hasAttribute('data-scaytid'))return false;};if(t._.elementsPath&&(u=t._.elementsPath.filters))u.push(v);t.addRemoveFormatFilter&&t.addRemoveFormatFilter(v);}});})();j.add('smiley',{requires:['dialog'],init:function(m){m.config.smiley_path=m.config.smiley_path||this.path+'images/';m.addCommand('smiley',new a.dialogCommand('smiley'));m.ui.addButton('Smiley',{label:m.lang.smiley.toolbar,command:'smiley'});a.dialog.add('smiley',this.path+'dialogs/smiley.js');}});i.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];i.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];(function(){var m='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;background-position: top %3;border: 1px dotted gray;padding-top: 8px;padding-%3: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',n=/%1/g,o=/%2/g,p=/%3/g,q={readOnly:1,preserveState:true,editorFocus:false,exec:function(r){this.toggleState();
+this.refresh(r);},refresh:function(r){if(r.document){var s=this.state==1?'addClass':'removeClass';r.document.getBody()[s]('cke_show_blocks');}}};j.add('showblocks',{requires:['wysiwygarea'],init:function(r){var s=r.addCommand('showblocks',q);s.canUndo=false;if(r.config.startupOutlineBlocks)s.setState(1);r.addCss(m.replace(n,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(o,'cke_show_blocks ').replace(p,r.lang.dir=='rtl'?'right':'left'));r.ui.addButton('ShowBlocks',{label:r.lang.showBlocks,command:'showblocks'});r.on('mode',function(){if(s.state!=0)s.refresh(r);});r.on('contentDom',function(){if(s.state!=0)s.refresh(r);});}});})();(function(){var m='cke_show_border',n,o=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');n=o.replace(/%2/g,m).replace(/%1/g,'cke_show_borders ');var p={preserveState:true,editorFocus:false,readOnly:1,exec:function(q){this.toggleState();this.refresh(q);},refresh:function(q){if(q.document){var r=this.state==1?'addClass':'removeClass';q.document.getBody()[r]('cke_show_borders');}}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(q){var r=q.addCommand('showborders',p);r.canUndo=false;if(q.config.startupShowBorders!==false)r.setState(1);q.addCss(n);q.on('mode',function(){if(r.state!=0)r.refresh(q);},null,null,100);q.on('contentDom',function(){if(r.state!=0)r.refresh(q);});q.on('removeFormatCleanup',function(s){var t=s.data;if(q.getCommand('showborders').state==1&&t.is('table')&&(!t.hasAttribute('border')||parseInt(t.getAttribute('border'),10)<=0))t.addClass(m);});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter,t=r&&r.htmlFilter;if(s)s.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'],x=parseInt(v.border,10);if(!x||x<=0)v['class']=(w||'')+' '+m;}}});if(t)t.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'];w&&(v['class']=w.replace(m,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(q){var r=q.data.name;if(r=='table'||r=='tableProperties'){var s=q.data.definition,t=s.getContents('info'),u=t.get('txtBorder'),v=u.commit;u.commit=e.override(v,function(y){return function(z,A){y.apply(this,arguments);
+var B=parseInt(this.getValue(),10);A[!B||B<=0?'addClass':'removeClass'](m);};});var w=s.getContents('advanced'),x=w&&w.get('advCSSClasses');if(x){x.setup=e.override(x.setup,function(y){return function(){y.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});x.commit=e.override(x.commit,function(y){return function(z,A){y.apply(this,arguments);if(!parseInt(A.getAttribute('border'),10))A.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(m){var n=j.sourcearea,o=a.document.getWindow();m.on('editingBlockReady',function(){var p,q;m.addMode('source',{load:function(r,s){if(c&&b.version<8)r.setStyle('position','relative');m.textarea=p=new h('textarea');p.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:m.tabIndex,role:'textbox','aria-label':m.lang.editorTitle.replace('%1',m.name)});p.addClass('cke_source');p.addClass('cke_enable_context_menu');m.readOnly&&p.setAttribute('readOnly','readonly');var t={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){q=function(){p.hide();p.setStyle('height',r.$.clientHeight+'px');p.setStyle('width',r.$.clientWidth+'px');p.show();};m.on('resize',q);o.on('resize',q);setTimeout(q,0);}r.setHtml('');r.append(p);p.setStyles(t);m.fire('ariaWidget',p);p.on('blur',function(){m.focusManager.blur();});p.on('focus',function(){m.focusManager.focus();});m.mayBeDirty=true;this.loadData(s);var u=m.keystrokeHandler;if(u)u.attach(p);setTimeout(function(){m.mode='source';m.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(r){p.setValue(r);m.fire('dataReady');},getData:function(){return p.getValue();},getSnapshotData:function(){return p.getValue();},unload:function(r){p.clearCustomData();m.textarea=p=null;if(q){m.removeListener('resize',q);o.removeListener('resize',q);}if(c&&b.version<8)r.removeStyle('position');},focus:function(){p.focus();}});});m.on('readOnly',function(){if(m.mode=='source')if(m.readOnly)m.textarea.setAttribute('readOnly','readonly');else m.textarea.removeAttribute('readOnly');});m.addCommand('source',n.commands.source);if(m.ui.addButton)m.ui.addButton('Source',{label:m.lang.source,command:'source'});m.on('mode',function(){m.getCommand('source').setState(m.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,readOnly:1,exec:function(m){if(m.mode=='wysiwyg')m.fire('saveSnapshot');m.getCommand('source').setState(0);m.setMode(m.mode=='source'?'wysiwyg':'source');
+},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(n){var o=n.config,p=n.lang.stylesCombo,q={},r=[],s;function t(u){n.getStylesSet(function(v){if(!r.length){var w,x;for(var y=0,z=v.length;y<z;y++){var A=v[y];x=A.name;w=q[x]=new a.style(A);w._name=x;w._.enterMode=o.enterMode;r.push(w);}r.sort(m);}u&&u();});};n.ui.addRichCombo('Styles',{label:p.label,title:p.panelTitle,className:'cke_styles',panel:{css:n.skin.editor.css.concat(o.contentsCss),multiSelect:true,attributes:{'aria-label':p.panelTitle}},init:function(){s=this;t(function(){var u,v,w,x,y,z;for(y=0,z=r.length;y<z;y++){u=r[y];v=u._name;x=u.type;if(x!=w){s.startGroup(p['panelTitle'+String(x)]);w=x;}s.add(v,u.type==3?v:u.buildPreview(),v);}s.commit();});},onClick:function(u){n.focus();n.fire('saveSnapshot');var v=q[u],w=n.getSelection(),x=new d.elementPath(w.getStartElement());v[v.checkActive(x)?'remove':'apply'](n.document);n.fire('saveSnapshot');},onRender:function(){n.on('selectionChange',function(u){var v=this.getValue(),w=u.data.path,x=w.elements;for(var y=0,z=x.length,A;y<z;y++){A=x[y];for(var B in q){if(q[B].checkElementRemovable(A,true)){if(B!=v)this.setValue(B);return;}}}this.setValue('');},this);},onOpen:function(){var B=this;if(c||b.webkit)n.focus();var u=n.getSelection(),v=u.getSelectedElement(),w=new d.elementPath(v||u.getStartElement()),x=[0,0,0,0];B.showAll();B.unmarkAll();for(var y in q){var z=q[y],A=z.type;if(z.checkActive(w))B.mark(y);else if(A==3&&!z.checkApplicable(w)){B.hideItem(y);x[A]--;}x[A]++;}if(!x[1])B.hideGroup(p['panelTitle'+String(1)]);if(!x[2])B.hideGroup(p['panelTitle'+String(2)]);if(!x[3])B.hideGroup(p['panelTitle'+String(3)]);},reset:function(){if(s){delete s._.panel;delete s._.list;s._.committed=0;s._.items={};s._.state=2;}q={};r=[];t();}});n.on('instanceReady',function(){t();});}});function m(n,o){var p=n.type,q=o.type;return p==q?0:p==3?-1:q==3?1:q==1?1:-1;};})();j.add('table',{init:function(m){var n=j.table,o=m.lang.table;m.addCommand('table',new a.dialogCommand('table'));m.addCommand('tableProperties',new a.dialogCommand('tableProperties'));m.ui.addButton('Table',{label:o.toolbar,command:'table'});a.dialog.add('table',this.path+'dialogs/table.js');a.dialog.add('tableProperties',this.path+'dialogs/table.js');if(m.addMenuItems)m.addMenuItems({table:{label:o.menu,command:'tableProperties',group:'table',order:5},tabledelete:{label:o.deleteTable,command:'tableDelete',group:'table',order:1}});m.on('doubleclick',function(p){var q=p.data.element;
+if(q.is('table'))p.data.dialog='tableProperties';});if(m.contextMenu)m.contextMenu.addListener(function(p,q){if(!p||p.isReadOnly())return null;var r=p.hasAscendant('table',1);if(r)return{tabledelete:2,table:2};return null;});}});(function(){var m=/^(?:td|th)$/;function n(G){var H=G.createBookmarks(),I=G.getRanges(),J=[],K={};function L(T){if(J.length>0)return;if(T.type==1&&m.test(T.getName())&&!T.getCustomData('selected_cell')){h.setMarker(K,T,'selected_cell',true);J.push(T);}};for(var M=0;M<I.length;M++){var N=I[M];if(N.collapsed){var O=N.getCommonAncestor(),P=O.getAscendant('td',true)||O.getAscendant('th',true);if(P)J.push(P);}else{var Q=new d.walker(N),R;Q.guard=L;while(R=Q.next()){var S=R.getAscendant('td')||R.getAscendant('th');if(S&&!S.getCustomData('selected_cell')){h.setMarker(K,S,'selected_cell',true);J.push(S);}}}}h.clearAllMarkers(K);G.selectBookmarks(H);return J;};function o(G){var H=0,I=G.length-1,J={},K,L,M;while(K=G[H++])h.setMarker(J,K,'delete_cell',true);H=0;while(K=G[H++]){if((L=K.getPrevious())&&!L.getCustomData('delete_cell')||(L=K.getNext())&&!L.getCustomData('delete_cell')){h.clearAllMarkers(J);return L;}}h.clearAllMarkers(J);M=G[0].getParent();if(M=M.getPrevious())return M.getLast();M=G[I].getParent();if(M=M.getNext())return M.getChild(0);return null;};function p(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=J.getDocument(),M=I[0].getParent(),N=M.$.rowIndex,O=I[I.length-1],P=O.getParent().$.rowIndex+O.$.rowSpan-1,Q=new h(K.$.rows[P]),R=H?N:P,S=H?M:Q,T=e.buildTableMap(K),U=T[R],V=H?T[R-1]:T[R+1],W=T[0].length,X=L.createElement('tr');for(var Y=0;Y<W;Y++){var Z;if(U[Y].rowSpan>1&&V&&U[Y]==V[Y]){Z=U[Y];Z.rowSpan+=1;}else{Z=new h(U[Y]).clone();Z.removeAttribute('rowSpan');!c&&Z.appendBogus();X.append(Z);Z=Z.$;}Y+=Z.colSpan-1;}H?X.insertBefore(S):X.insertAfter(S);};function q(G){if(G instanceof d.selection){var H=n(G),I=H[0],J=I.getAscendant('table'),K=e.buildTableMap(J),L=H[0].getParent(),M=L.$.rowIndex,N=H[H.length-1],O=N.getParent().$.rowIndex+N.$.rowSpan-1,P=[];for(var Q=M;Q<=O;Q++){var R=K[Q],S=new h(J.$.rows[Q]);for(var T=0;T<R.length;T++){var U=new h(R[T]),V=U.getParent().$.rowIndex;if(U.$.rowSpan==1)U.remove();else{U.$.rowSpan-=1;if(V==Q){var W=K[Q+1];W[T-1]?U.insertAfter(new h(W[T-1])):new h(J.$.rows[Q+1]).append(U,1);}}T+=U.$.colSpan-1;}P.push(S);}var X=J.$.rows,Y=new h(X[O+1]||(M>0?X[M-1]:null)||J.$.parentNode);for(Q=P.length;Q>=0;Q--)q(P[Q]);return Y;}else if(G instanceof h){J=G.getAscendant('table');if(J.$.rows.length==1)J.remove();
+else G.remove();}return null;};function r(G,H){var I=G.getParent(),J=I.$.cells,K=0;for(var L=0;L<J.length;L++){var M=J[L];K+=H?1:M.colSpan;if(M==G.$)break;}return K-1;};function s(G,H){var I=H?Infinity:0;for(var J=0;J<G.length;J++){var K=r(G[J],H);if(H?K<I:K>I)I=K;}return I;};function t(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=s(I,1),M=s(I),N=H?L:M,O=e.buildTableMap(K),P=[],Q=[],R=O.length;for(var S=0;S<R;S++){P.push(O[S][N]);var T=H?O[S][N-1]:O[S][N+1];T&&Q.push(T);}for(S=0;S<R;S++){var U;if(P[S].colSpan>1&&Q.length&&Q[S]==P[S]){U=P[S];U.colSpan+=1;}else{U=new h(P[S]).clone();U.removeAttribute('colSpan');!c&&U.appendBogus();U[H?'insertBefore':'insertAfter'].call(U,new h(P[S]));U=U.$;}S+=U.rowSpan-1;}};function u(G){var H=n(G),I=H[0],J=H[H.length-1],K=I.getAscendant('table'),L=e.buildTableMap(K),M,N,O=[];for(var P=0,Q=L.length;P<Q;P++)for(var R=0,S=L[P].length;R<S;R++){if(L[P][R]==I.$)M=R;if(L[P][R]==J.$)N=R;}for(P=M;P<=N;P++)for(R=0;R<L.length;R++){var T=L[R],U=new h(K.$.rows[R]),V=new h(T[P]);if(V.$){if(V.$.colSpan==1)V.remove();else V.$.colSpan-=1;R+=V.$.rowSpan-1;if(!U.$.cells.length)O.push(U);}}var W=K.$.rows[0]&&K.$.rows[0].cells,X=new h(W[M]||(M?W[M-1]:K.$.parentNode));if(O.length==Q)K.remove();return X;};function v(G){var H=[],I=G[0]&&G[0].getAscendant('table'),J,K,L,M;for(J=0,K=G.length;J<K;J++)H.push(G[J].$.cellIndex);H.sort();for(J=1,K=H.length;J<K;J++){if(H[J]-H[J-1]>1){L=H[J-1]+1;break;}}if(!L)L=H[0]>0?H[0]-1:H[H.length-1]+1;var N=I.$.rows;for(J=0,K=N.length;J<K;J++){M=N[J].cells[L];if(M)break;}return M?new h(M):I.getPrevious();};function w(G,H){var I=G.getStartElement(),J=I.getAscendant('td',1)||I.getAscendant('th',1);if(!J)return;var K=J.clone();if(!c)K.appendBogus();if(H)K.insertBefore(J);else K.insertAfter(J);};function x(G){if(G instanceof d.selection){var H=n(G),I=H[0]&&H[0].getAscendant('table'),J=o(H);for(var K=H.length-1;K>=0;K--)x(H[K]);if(J)z(J,true);else if(I)I.remove();}else if(G instanceof h){var L=G.getParent();if(L.getChildCount()==1)L.remove();else G.remove();}};function y(G){var H=G.getBogus();H&&H.remove();G.trim();};function z(G,H){var I=new d.range(G.getDocument());if(!I['moveToElementEdit'+(H?'End':'Start')](G)){I.selectNodeContents(G);I.collapse(H?false:true);}I.select(true);};function A(G,H,I){var J=G[H];if(typeof I=='undefined')return J;for(var K=0;J&&K<J.length;K++){if(I.is&&J[K]==I.$)return K;else if(K==I)return new h(J[K]);}return I.is?-1:null;};function B(G,H,I){var J=[];for(var K=0;K<G.length;K++){var L=G[K];
+if(typeof I=='undefined')J.push(L[H]);else if(I.is&&L[H]==I.$)return K;else if(K==I)return new h(L[H]);}return typeof I=='undefined'?J:I.is?-1:null;};function C(G,H,I){var J=n(G),K;if((H?J.length!=1:J.length<2)||(K=G.getCommonAncestor())&&K.type==1&&K.is('table'))return false;var L,M=J[0],N=M.getAscendant('table'),O=e.buildTableMap(N),P=O.length,Q=O[0].length,R=M.getParent().$.rowIndex,S=A(O,R,M);if(H){var T;try{var U=parseInt(M.getAttribute('rowspan'),10)||1,V=parseInt(M.getAttribute('colspan'),10)||1;T=O[H=='up'?R-U:H=='down'?R+U:R][H=='left'?S-V:H=='right'?S+V:S];}catch(an){return false;}if(!T||M.$==T)return false;J[H=='up'||H=='left'?'unshift':'push'](new h(T));}var W=M.getDocument(),X=R,Y=0,Z=0,aa=!I&&new d.documentFragment(W),ab=0;for(var ac=0;ac<J.length;ac++){L=J[ac];var ad=L.getParent(),ae=L.getFirst(),af=L.$.colSpan,ag=L.$.rowSpan,ah=ad.$.rowIndex,ai=A(O,ah,L);ab+=af*ag;Z=Math.max(Z,ai-S+af);Y=Math.max(Y,ah-R+ag);if(!I){if(y(L),L.getChildren().count()){if(ah!=X&&ae&&!(ae.isBlockBoundary&&ae.isBlockBoundary({br:1}))){var aj=aa.getLast(d.walker.whitespaces(true));if(aj&&!(aj.is&&aj.is('br')))aa.append('br');}L.moveChildren(aa);}ac?L.remove():L.setHtml('');}X=ah;}if(!I){aa.moveChildren(M);if(!c)M.appendBogus();if(Z>=Q)M.removeAttribute('rowSpan');else M.$.rowSpan=Y;if(Y>=P)M.removeAttribute('colSpan');else M.$.colSpan=Z;var ak=new d.nodeList(N.$.rows),al=ak.count();for(ac=al-1;ac>=0;ac--){var am=ak.getItem(ac);if(!am.$.cells.length){am.remove();al++;continue;}}return M;}else return Y*Z==ab;};function D(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.rowSpan,Q,R,S,T;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);T=N+R;var U=new h(L.$.rows[T]),V=A(M,T),W;Q=J.clone();for(var X=0;X<V.length;X++){W=V[X];if(W.parentNode==U.$&&X>O){Q.insertBefore(new h(W));break;}else W=null;}if(!W)U.append(Q,true);}else{S=R=1;U=K.clone();U.insertAfter(K);U.append(Q=J.clone());var Y=A(M,N);for(var Z=0;Z<Y.length;Z++)Y[Z].rowSpan++;}if(!c)Q.appendBogus();J.$.rowSpan=R;Q.$.rowSpan=S;if(R==1)J.removeAttribute('rowSpan');if(S==1)Q.removeAttribute('rowSpan');return Q;};function E(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.colSpan,Q,R,S;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);}else{S=R=1;var T=B(M,O);for(var U=0;U<T.length;U++)T[U].colSpan++;
+}Q=J.clone();Q.insertAfter(J);if(!c)Q.appendBogus();J.$.colSpan=R;Q.$.colSpan=S;if(R==1)J.removeAttribute('colSpan');if(S==1)Q.removeAttribute('colSpan');return Q;};var F={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};j.tabletools={init:function(G){var H=G.lang.table;G.addCommand('cellProperties',new a.dialogCommand('cellProperties'));a.dialog.add('cellProperties',this.path+'dialogs/tableCell.js');G.addCommand('tableDelete',{exec:function(I){var J=I.getSelection(),K=J&&J.getStartElement(),L=K&&K.getAscendant('table',1);if(!L)return;var M=L.getParent();if(M.getChildCount()==1&&!M.is('body','td','th'))L=M;var N=new d.range(I.document);N.moveToPosition(L,3);L.remove();N.select();}});G.addCommand('rowDelete',{exec:function(I){var J=I.getSelection();z(q(J));}});G.addCommand('rowInsertBefore',{exec:function(I){var J=I.getSelection();p(J,true);}});G.addCommand('rowInsertAfter',{exec:function(I){var J=I.getSelection();p(J);}});G.addCommand('columnDelete',{exec:function(I){var J=I.getSelection(),K=u(J);K&&z(K,true);}});G.addCommand('columnInsertBefore',{exec:function(I){var J=I.getSelection();t(J,true);}});G.addCommand('columnInsertAfter',{exec:function(I){var J=I.getSelection();t(J);}});G.addCommand('cellDelete',{exec:function(I){var J=I.getSelection();x(J);}});G.addCommand('cellMerge',{exec:function(I){z(C(I.getSelection()),true);}});G.addCommand('cellMergeRight',{exec:function(I){z(C(I.getSelection(),'right'),true);}});G.addCommand('cellMergeDown',{exec:function(I){z(C(I.getSelection(),'down'),true);}});G.addCommand('cellVerticalSplit',{exec:function(I){z(D(I.getSelection()));}});G.addCommand('cellHorizontalSplit',{exec:function(I){z(E(I.getSelection()));}});G.addCommand('cellInsertBefore',{exec:function(I){var J=I.getSelection();w(J,true);}});G.addCommand('cellInsertAfter',{exec:function(I){var J=I.getSelection();w(J);}});if(G.addMenuItems)G.addMenuItems({tablecell:{label:H.cell.menu,group:'tablecell',order:1,getItems:function(){var I=G.getSelection(),J=n(I);return{tablecell_insertBefore:2,tablecell_insertAfter:2,tablecell_delete:2,tablecell_merge:C(I,null,true)?2:0,tablecell_merge_right:C(I,'right',true)?2:0,tablecell_merge_down:C(I,'down',true)?2:0,tablecell_split_vertical:D(I,true)?2:0,tablecell_split_horizontal:E(I,true)?2:0,tablecell_properties:J.length>0?2:0};}},tablecell_insertBefore:{label:H.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:H.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:H.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:H.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:H.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:H.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:H.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:H.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:H.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:H.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};
+}},tablerow_insertBefore:{label:H.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:H.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:H.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:H.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:H.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:H.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:H.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(G.contextMenu)G.contextMenu.addListener(function(I,J){if(!I||I.isReadOnly())return null;while(I){if(I.getName() in F)return{tablecell:2,tablerow:2,tablecolumn:2};I=I.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();e.buildTableMap=function(m){var n=m.$.rows,o=-1,p=[];for(var q=0;q<n.length;q++){o++;!p[o]&&(p[o]=[]);var r=-1;for(var s=0;s<n[q].cells.length;s++){var t=n[q].cells[s];r++;while(p[o][r])r++;var u=isNaN(t.colSpan)?1:t.colSpan,v=isNaN(t.rowSpan)?1:t.rowSpan;for(var w=0;w<v;w++){if(!p[o+w])p[o+w]=[];for(var x=0;x<u;x++)p[o+w][r+x]=n[q].cells[s];}r+=u-1;}}return p;};j.add('specialchar',{availableLangs:{en:1},init:function(m){var n='specialchar',o=this;a.dialog.add(n,this.path+'dialogs/specialchar.js');m.addCommand(n,{exec:function(){var p=m.langCode;p=o.availableLangs[p]?p:'en';a.scriptLoader.load(a.getUrl(o.path+'lang/'+p+'.js'),function(){e.extend(m.lang.specialChar,o.langEntries[p]);m.openDialog(n);});},modes:{wysiwyg:1},canUndo:false});m.ui.addButton('SpecialChar',{label:m.lang.specialChar.toolbar,command:n});}});i.specialChars=['!','"','#','$','%','&',"'",'(',')','*','+','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','|','}','~','€','‘','’','“','”','–','—','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','®','¯','°','&','&sup2;','&sup3;','´','µ','¶','·','¸','&sup1;','º','&','&frac14;','&frac12;','&frac34;','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ü','ý','þ','ÿ','Œ','œ','Ŵ','&#374','&#373','ŷ','‚','‛','„','…','™','►','•','→','⇒','⇔','♦','≈'];
+(function(){var m={editorFocus:false,modes:{wysiwyg:1,source:1}},n={exec:function(q){q.container.focusNext(true,q.tabIndex);}},o={exec:function(q){q.container.focusPrevious(true,q.tabIndex);}};function p(q){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(r){if(r.focusManager.hasFocus){var s=r.getSelection(),t=s.getCommonAncestor(),u;if(u=t.getAscendant('td',true)||t.getAscendant('th',true)){var v=new d.range(r.document),w=e.tryThese(function(){var D=u.getParent(),E=D.$.cells[u.$.cellIndex+(q?-1:1)];E.parentNode.parentNode;return E;},function(){var D=u.getParent(),E=D.getAscendant('table'),F=E.$.rows[D.$.rowIndex+(q?-1:1)];return F.cells[q?F.cells.length-1:0];});if(!(w||q)){var x=u.getAscendant('table').$,y=u.getParent().$.cells,z=new h(x.insertRow(-1),r.document);for(var A=0,B=y.length;A<B;A++){var C=z.append(new h(y[A],r.document).clone(false,false));!c&&C.appendBogus();}v.moveToElementEditStart(z);}else if(w){w=new h(w);v.moveToElementEditStart(w);if(!(v.checkStartOfBlock()&&v.checkEndOfBlock()))v.selectNodeContents(w);}else return true;v.select(true);return true;}}return false;}};};j.add('tab',{requires:['keystrokes'],init:function(q){var r=q.config.enableTabKeyTools!==false,s=q.config.tabSpaces||0,t='';while(s--)t+='\xa0';if(t)q.on('key',function(u){if(u.data.keyCode==9){q.insertHtml(t);u.cancel();}});if(r)q.on('key',function(u){if(u.data.keyCode==9&&q.execCommand('selectNextCell')||u.data.keyCode==2228224+9&&q.execCommand('selectPreviousCell'))u.cancel();});if(b.webkit||b.gecko)q.on('key',function(u){var v=u.data.keyCode;if(v==9&&!t){u.cancel();q.execCommand('blur');}if(v==2228224+9){q.execCommand('blurBack');u.cancel();}});q.addCommand('blur',e.extend(n,m));q.addCommand('blurBack',e.extend(o,m));q.addCommand('selectNextCell',p());q.addCommand('selectPreviousCell',p(true));}});})();h.prototype.focusNext=function(m,n){var w=this;var o=w.$,p=n===undefined?w.getTabIndex():n,q,r,s,t,u,v;if(p<=0){u=w.getNextSourceNode(m,1);while(u){if(u.isVisible()&&u.getTabIndex()===0){s=u;break;}u=u.getNextSourceNode(false,1);}}else{u=w.getDocument().getBody().getFirst();while(u=u.getNextSourceNode(false,1)){if(!q)if(!r&&u.equals(w)){r=true;if(m){if(!(u=u.getNextSourceNode(true,1)))break;q=1;}}else if(r&&!w.contains(u))q=1;if(!u.isVisible()||(v=u.getTabIndex())<0)continue;if(q&&v==p){s=u;break;}if(v>p&&(!s||!t||v<t)){s=u;t=v;}else if(!s&&v===0){s=u;t=v;}}}if(s)s.focus();};h.prototype.focusPrevious=function(m,n){var w=this;var o=w.$,p=n===undefined?w.getTabIndex():n,q,r,s,t=0,u,v=w.getDocument().getBody().getLast();
+while(v=v.getPreviousSourceNode(false,1)){if(!q)if(!r&&v.equals(w)){r=true;if(m){if(!(v=v.getPreviousSourceNode(true,1)))break;q=1;}}else if(r&&!w.contains(v))q=1;if(!v.isVisible()||(u=v.getTabIndex())<0)continue;if(p<=0){if(q&&u===0){s=v;break;}if(u>t){s=v;t=u;}}else{if(q&&u==p){s=v;break;}if(u<p&&(!s||u>t)){s=v;t=u;}}}if(s)s.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(o){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));o.addCommand('templates',new a.dialogCommand('templates'));o.ui.addButton('Templates',{label:o.lang.templates.button,command:'templates'});}});var m={},n={};a.addTemplates=function(o,p){m[o]=p;};a.getTemplates=function(o){return m[o];};a.loadTemplates=function(o,p){var q=[];for(var r=0,s=o.length;r<s;r++){if(!n[o[r]]){q.push(o[r]);n[o[r]]=1;}}if(q.length)a.scriptLoader.load(q,p);else setTimeout(p,0);};})();i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var m=function(){this.toolbars=[];this.focusCommandExecuted=false;};m.prototype.focus=function(){for(var o=0,p;p=this.toolbars[o++];)for(var q=0,r;r=p.items[q++];){if(r.focus){r.focus();return;}}};var n={toolbarFocus:{modes:{wysiwyg:1,source:1},readOnly:1,exec:function(o){if(o.toolbox){o.toolbox.focusCommandExecuted=true;if(c||b.air)setTimeout(function(){o.toolbox.focus();},100);else o.toolbox.focus();}}}};j.add('toolbar',{init:function(o){var p,q=function(r,s){var t,u,v=o.lang.dir=='rtl',w=o.config.toolbarGroupCycling;w=w===undefined||w;switch(s){case 9:case 2228224+9:while(!u||!u.items.length){u=s==9?(u?u.next:r.toolbar.next)||o.toolbox.toolbars[0]:(u?u.previous:r.toolbar.previous)||o.toolbox.toolbars[o.toolbox.toolbars.length-1];if(u.items.length){r=u.items[p?u.items.length-1:0];while(r&&!r.focus){r=p?r.previous:r.next;if(!r)u=0;}}}if(r)r.focus();return false;case v?37:39:case 40:t=r;do{t=t.next;if(!t&&w)t=r.toolbar.items[0];}while(t&&!t.focus);if(t)t.focus();else q(r,9);return false;case v?39:37:case 38:t=r;do{t=t.previous;if(!t&&w)t=r.toolbar.items[r.toolbar.items.length-1];}while(t&&!t.focus);if(t)t.focus();else{p=1;q(r,2228224+9);p=0;}return false;case 27:o.focus();return false;case 13:case 32:r.execute();return false;}return true;};o.on('themeSpace',function(r){if(r.data.space==o.config.toolbarLocation){o.toolbox=new m();var s=e.getNextId(),t=['<div class="cke_toolbox" role="group" aria-labelledby="',s,'" onmousedown="return false;"'],u=o.config.toolbarStartupExpanded!==false,v;
+t.push(u?'>':' style="display:none">');t.push('<span id="',s,'" class="cke_voice_label">',o.lang.toolbars,'</span>');var w=o.toolbox.toolbars,x=o.config.toolbar instanceof Array?o.config.toolbar:o.config['toolbar_'+o.config.toolbar];for(var y=0;y<x.length;y++){var z,A=0,B,C=x[y],D;if(!C)continue;if(v){t.push('</div>');v=0;}if(C==='/'){t.push('<div class="cke_break"></div>');continue;}D=C.items||C;for(var E=0;E<D.length;E++){var F,G=D[E],H;F=o.ui.create(G);if(F){H=F.canGroup!==false;if(!A){z=e.getNextId();A={id:z,items:[]};B=C.name&&(o.lang.toolbarGroups[C.name]||C.name);t.push('<span id="',z,'" class="cke_toolbar"',B?' aria-labelledby="'+z+'_label"':'',' role="toolbar">');B&&t.push('<span id="',z,'_label" class="cke_voice_label">',B,'</span>');t.push('<span class="cke_toolbar_start"></span>');var I=w.push(A)-1;if(I>0){A.previous=w[I-1];A.previous.next=A;}}if(H){if(!v){t.push('<span class="cke_toolgroup" role="presentation">');v=1;}}else if(v){t.push('</span>');v=0;}var J=F.render(o,t);I=A.items.push(J)-1;if(I>0){J.previous=A.items[I-1];J.previous.next=J;}J.toolbar=A;J.onkey=q;J.onfocus=function(){if(!o.toolbox.focusCommandExecuted)o.focus();};}}if(v){t.push('</span>');v=0;}if(A)t.push('<span class="cke_toolbar_end"></span></span>');}t.push('</div>');if(o.config.toolbarCanCollapse){var K=e.addFunction(function(){o.execCommand('toolbarCollapse');});o.on('destroy',function(){e.removeFunction(K);});var L=e.getNextId();o.addCommand('toolbarCollapse',{readOnly:1,exec:function(M){var N=a.document.getById(L),O=N.getPrevious(),P=M.getThemeSpace('contents'),Q=O.getParent(),R=parseInt(P.$.style.height,10),S=Q.$.offsetHeight,T=!O.isVisible();if(!T){O.hide();N.addClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarExpand);}else{O.show();N.removeClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarCollapse);}N.getFirst().setText(T?'â–²':'â—€');var U=Q.$.offsetHeight-S;P.setStyle('height',R-U+'px');M.fire('resize');},modes:{wysiwyg:1,source:1}});t.push('<a title="'+(u?o.lang.toolbarCollapse:o.lang.toolbarExpand)+'" id="'+L+'" tabIndex="-1" class="cke_toolbox_collapser');if(!u)t.push(' cke_toolbox_collapser_min');t.push('" onclick="CKEDITOR.tools.callFunction('+K+')">','<span>▲</span>','</a>');}r.data.html+=t.join('');}});o.on('destroy',function(){var r,s=0,t,u,v;r=this.toolbox.toolbars;for(;s<r.length;s++){u=r[s].items;for(t=0;t<u.length;t++){v=u[t];if(v.clickFn)e.removeFunction(v.clickFn);if(v.keyDownFn)e.removeFunction(v.keyDownFn);
+}}});o.addCommand('toolbarFocus',n.toolbarFocus);o.ui.add('-',a.UI_SEPARATOR,{});o.ui.addHandler(a.UI_SEPARATOR,{create:function(){return{render:function(r,s){s.push('<span class="cke_separator" role="separator"></span>');return{};}};}});}});})();a.UI_SEPARATOR='separator';i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},{name:'links',items:['Link','Unlink','Anchor']},{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',{name:'styles',items:['Styles','Format','Font','FontSize']},{name:'colors',items:['TextColor','BGColor']},{name:'tools',items:['Maximize','ShowBlocks','-','About']}];i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(s){var t=new o(s),u=s.addCommand('undo',{exec:function(){if(t.undo()){s.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),v=s.addCommand('redo',{exec:function(){if(t.redo()){s.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});t.onChange=function(){u.setState(t.undoable()?2:0);v.setState(t.redoable()?2:0);};function w(x){if(t.enabled&&x.data.command.canUndo!==false)t.save();};s.on('beforeCommandExec',w);s.on('afterCommandExec',w);s.on('saveSnapshot',function(){t.save();});s.on('contentDom',function(){s.document.on('keydown',function(x){if(!x.data.$.ctrlKey&&!x.data.$.metaKey)t.type(x);});});s.on('beforeModeUnload',function(){s.mode=='wysiwyg'&&t.save(true);});s.on('mode',function(){t.enabled=s.readOnly?false:s.mode=='wysiwyg';t.onChange();});s.ui.addButton('Undo',{label:s.lang.undo,command:'undo'});s.ui.addButton('Redo',{label:s.lang.redo,command:'redo'});s.resetUndo=function(){t.reset();
+s.fire('saveSnapshot');};s.on('updateSnapshot',function(){if(t.currentImage&&new m(s).equals(t.currentImage))setTimeout(function(){t.update();},0);});}});j.undo={};var m=j.undo.Image=function(s){this.editor=s;s.fire('beforeUndoImage');var t=s.getSnapshot(),u=t&&s.getSelection();c&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=t;this.bookmarks=u&&u.createBookmarks2(true);s.fire('afterUndoImage');},n=/\b(?:href|src|name)="[^"]*?"/gi;m.prototype={equals:function(s,t){var u=this.contents,v=s.contents;if(c&&(b.ie7Compat||b.ie6Compat)){u=u.replace(n,'');v=v.replace(n,'');}if(u!=v)return false;if(t)return true;var w=this.bookmarks,x=s.bookmarks;if(w||x){if(!w||!x||w.length!=x.length)return false;for(var y=0;y<w.length;y++){var z=w[y],A=x[y];if(z.startOffset!=A.startOffset||z.endOffset!=A.endOffset||!e.arrayCompare(z.start,A.start)||!e.arrayCompare(z.end,A.end))return false;}}return true;}};function o(s){this.editor=s;this.reset();};var p={8:1,46:1},q={16:1,17:1,18:1},r={37:1,38:1,39:1,40:1};o.prototype={type:function(s){var t=s&&s.data.getKey(),u=t in q,v=t in p,w=this.lastKeystroke in p,x=v&&t==this.lastKeystroke,y=t in r,z=this.lastKeystroke in r,A=!v&&!y,B=v&&!x,C=!(u||this.typing)||A&&(w||z);if(C||B){var D=new m(this.editor);e.setTimeout(function(){var F=this;var E=F.editor.getSnapshot();if(c)E=E.replace(/\s+data-cke-expando=".*?"/g,'');if(D.contents!=E){F.typing=true;if(!F.save(false,D,false))F.snapshots.splice(F.index+1,F.snapshots.length-F.index-1);F.hasUndo=true;F.hasRedo=false;F.typesCount=1;F.modifiersCount=1;F.onChange();}},0,this);}this.lastKeystroke=t;if(v){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1;}}else if(!y){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var s=this;s.lastKeystroke=0;s.snapshots=[];s.index=-1;s.limit=s.editor.config.undoStackSize||20;s.currentImage=null;s.hasUndo=false;s.hasRedo=false;s.resetType();},resetType:function(){var s=this;s.typing=false;delete s.lastKeystroke;s.typesCount=0;s.modifiersCount=0;},fireChange:function(){var s=this;s.hasUndo=!!s.getNextImage(true);s.hasRedo=!!s.getNextImage(false);s.resetType();s.onChange();},save:function(s,t,u){var w=this;var v=w.snapshots;if(!t)t=new m(w.editor);if(t.contents===false)return false;if(w.currentImage&&t.equals(w.currentImage,s))return false;v.splice(w.index+1,v.length-w.index-1);if(v.length==w.limit)v.shift();
+w.index=v.push(t)-1;w.currentImage=t;if(u!==false)w.fireChange();return true;},restoreImage:function(s){var u=this;u.editor.loadSnapshot(s.contents);if(s.bookmarks)u.editor.getSelection().selectBookmarks(s.bookmarks);else if(c){var t=u.editor.document.getBody().$.createTextRange();t.collapse(true);t.select();}u.index=s.index;u.update();u.fireChange();},getNextImage:function(s){var x=this;var t=x.snapshots,u=x.currentImage,v,w;if(u)if(s)for(w=x.index-1;w>=0;w--){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}else for(w=x.index+1;w<t.length;w++){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}return null;},redoable:function(){return this.enabled&&this.hasRedo;},undoable:function(){return this.enabled&&this.hasUndo;},undo:function(){var t=this;if(t.undoable()){t.save(true);var s=t.getNextImage(true);if(s)return t.restoreImage(s),true;}return false;},redo:function(){var t=this;if(t.redoable()){t.save(true);if(t.redoable()){var s=t.getNextImage(false);if(s)return t.restoreImage(s),true;}}return false;},update:function(){var s=this;s.snapshots.splice(s.index,1,s.currentImage=new m(s.editor));}};})();(function(){var m=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,n=d.walker.whitespaces(true);function o(C){return C.isBlockBoundary()&&f.$empty[C.getName()];};function p(C){return function(D){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');C.call(this,D.data);e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};};function q(C){var M=this;if(M.dataProcessor)C=M.dataProcessor.toHtml(C);if(!C)return;var D=M.getSelection(),E=D.getRanges()[0];if(E.checkReadOnly())return;if(b.opera){var F=new d.elementPath(E.startContainer);if(F.block){var G=a.htmlParser.fragment.fromHtml(C,false).children;for(var H=0,I=G.length;H<I;H++){if(G[H]._.isBlockLike){E.splitBlock(M.enterMode==3?'div':'p');E.insertNode(E.document.createText(''));E.select();break;}}}}if(c){var J=D.isLocked;if(J)D.unlock();var K=D.getNative();if(K.type=='Control')K.clear();else if(D.getType()==2){E=D.getRanges()[0];var L=E&&E.endContainer;if(L&&L.type==1&&L.getAttribute('contenteditable')=='false'&&E.checkBoundaryOfElement(L,2)){E.setEndAfter(E.endContainer);E.deleteContents();}}try{K.createRange().pasteHTML(C);}catch(N){}if(J)M.getSelection().lock();}else M.document.$.execCommand('inserthtml',false,C);if(b.webkit){D=M.getSelection();D.scrollIntoView();}};function r(C){var D=this.getSelection(),E=D.getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,F=E==2,G=e.htmlEncode(C.replace(/\r\n|\r/g,'\n'));
+G=G.replace(/^[ \t]+|[ \t]+$/g,function(M,N,O){if(M.length==1)return ' ';else if(!N)return e.repeat(' ',M.length-1)+' ';else return ' '+e.repeat(' ',M.length-1);});G=G.replace(/[ \t]{2,}/g,function(M){return e.repeat(' ',M.length-1)+' ';});var H=E==1?'p':'div';if(!F)G=G.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(M,N,O){return '<'+H+'>'+O+'</'+H+'>';});G=G.replace(/\n/g,'<br>');if(!(F||c))G=G.replace(new RegExp('<br>(?=</'+H+'>)'),function(M){return e.repeat(M,2);});if(b.gecko||b.webkit){var I=new d.elementPath(D.getStartElement()),J=[];for(var K=0;K<I.elements.length;K++){var L=I.elements[K].getName();if(L in f.$inline)J.unshift(I.elements[K].getOuterHtml().match(/^<.*?>/));else if(L in f.$block)break;}G=J.join('')+G;}q.call(this,G);};function s(C){var D=this.getSelection(),E=D.getRanges(),F=C.getName(),G=f.$block[F],H=D.isLocked;if(H)D.unlock();var I,J,K,L;for(var M=E.length-1;M>=0;M--){I=E[M];if(!I.checkReadOnly()){I.deleteContents(1);J=!M&&C||C.clone(1);var N,O;if(G)while((N=I.getCommonAncestor(0,1))&&(O=f[N.getName()])&&!(O&&O[F])){if(N.getName() in f.span)I.splitElement(N);else if(I.checkStartOfBlock()&&I.checkEndOfBlock()){I.setStartBefore(N);I.collapse(true);N.remove();}else I.splitBlock();}I.insertNode(J);if(!K)K=J;}}if(K){I.moveToPosition(K,4);if(G){var P=K.getNext(n),Q=P&&P.type==1&&P.getName();if(Q&&f.$block[Q]&&f[Q]['#'])I.moveToElementEditStart(P);}}D.selectRanges([I]);if(H)this.getSelection().lock();};function t(C){if(!C.checkDirty())setTimeout(function(){C.resetDirty();},0);};var u=d.walker.whitespaces(true),v=d.walker.bookmark(false,true);function w(C){return u(C)&&v(C);};function x(C){return C.type==3&&e.trim(C.getText()).match(/^(?: |\xa0)$/);};function y(C){if(C.isLocked){C.unlock();setTimeout(function(){C.lock();},0);}};function z(C){return C.getOuterHtml().match(m);};u=d.walker.whitespaces(true);function A(C){var D=C.window,E=C.document,F=C.document.getBody(),G=F.getFirst(),H=F.getChildren().count();if(!H||H==1&&G.type==1&&G.hasAttribute('_moz_editor_bogus_node')){t(C);var I=C.element.getDocument(),J=I.getDocumentElement(),K=J.$.scrollTop,L=J.$.scrollLeft,M=E.$.createEvent('KeyEvents');M.initKeyEvent('keypress',true,true,D.$,false,false,false,false,0,32);E.$.dispatchEvent(M);if(K!=J.$.scrollTop||L!=J.$.scrollLeft)I.getWindow().$.scrollTo(L,K);H&&F.getFirst().remove();E.getBody().appendBogus();var N=new d.range(E);N.setStartAt(F,1);N.select();}};function B(C){var D=C.editor,E=C.data.path,F=E.blockLimit,G=C.data.selection,H=G.getRanges()[0],I=D.document.getBody(),J=D.config.enterMode;
+if(b.gecko){A(D);var K=E.block||E.blockLimit,L=K&&K.getLast(w);if(K&&K.isBlockBoundary()&&!(L&&L.type==1&&L.isBlockBoundary())&&!K.is('pre')&&!K.getBogus()){D.fire('updateSnapshot');t(D);K.appendBogus();}}if(D.config.autoParagraph!==false&&J!=2&&H.collapsed&&F.getName()=='body'&&!E.block){D.fire('updateSnapshot');t(D);c&&y(G);var M=H.fixBlock(true,D.config.enterMode==3?'div':'p');if(c){var N=M.getFirst(w);N&&x(N)&&N.remove();}if(z(M)){var O=M.getNext(u);if(O&&O.type==1&&!o(O)){H.moveToElementEditStart(O);M.remove();}else{O=M.getPrevious(u);if(O&&O.type==1&&!o(O)){H.moveToElementEditEnd(O);M.remove();}}}H.select();C.cancel();}var P=new d.range(D.document);P.moveToElementEditEnd(D.document.getBody());var Q=new d.elementPath(P.startContainer);if(!Q.blockLimit.is('body')){D.fire('updateSnapshot');t(D);c&&y(G);var R;if(J!=2)R=I.append(D.document.createElement(J==1?'p':'div'));else R=I;if(!c)R.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(C){var D=C.config.enterMode!=2&&C.config.autoParagraph!==false?C.config.enterMode==3?'div':'p':false,E=C.lang.editorTitle.replace('%1',C.name),F;C.on('editingBlockReady',function(){var L,M,N,O,P,Q,R=b.isCustomDomain(),S=function(V){if(M)M.remove();var W='document.open();'+(R?'document.domain="'+document.domain+'";':'')+'document.close();';W=b.air?'javascript:void(0)':c?'javascript:void(function(){'+encodeURIComponent(W)+'}())':'';M=h.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" title="'+E+'"'+' src="'+W+'"'+' tabIndex="'+(b.webkit?-1:C.tabIndex)+'"'+' allowTransparency="true"'+'></iframe>');if(document.location.protocol=='chrome:')a.event.useCapture=true;M.on('load',function(X){P=1;X.removeListener();var Y=M.getFrameDocument();Y.write(V);b.air&&U(Y.getWindow().$);});if(document.location.protocol=='chrome:')a.event.useCapture=false;L.append(M);};F=e.addFunction(U);var T='<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">'+(R?'document.domain="'+document.domain+'";':'')+'window.parent.CKEDITOR.tools.callFunction( '+F+', window );'+'</script>';function U(V){if(!P)return;P=0;C.fire('ariaWidget',M);var W=V.document,X=W.body,Y=W.getElementById('cke_actscrpt');Y&&Y.parentNode.removeChild(Y);X.spellcheck=!C.config.disableNativeSpellChecker;var Z=!C.readOnly;if(c){X.hideFocus=true;X.disabled=true;X.contentEditable=Z;X.removeAttribute('disabled');}else setTimeout(function(){if(b.gecko&&b.version>=10900||b.opera)W.$.body.contentEditable=Z;else if(b.webkit)W.$.body.parentNode.contentEditable=Z;
+else W.$.designMode=Z?'off':'on';},0);Z&&b.gecko&&e.setTimeout(A,0,null,C);V=C.window=new d.window(V);W=C.document=new g(W);Z&&W.on('dblclick',function(af){var ag=af.data.getTarget(),ah={element:ag,dialog:''};C.fire('doubleclick',ah);ah.dialog&&C.openDialog(ah.dialog);});c&&W.on('click',function(af){var ag=af.data.getTarget();if(ag.is('input')){var ah=ag.getAttribute('type');if(ah=='submit'||ah=='reset')af.data.preventDefault();}});if(!(c||b.opera))W.on('mousedown',function(af){var ag=af.data.getTarget();if(ag.is('img','hr','input','textarea','select'))C.getSelection().selectElement(ag);});if(b.gecko)W.on('mouseup',function(af){if(af.data.$.button==2){var ag=af.data.getTarget();if(!ag.getOuterHtml().replace(m,'')){var ah=new d.range(W);ah.moveToElementEditStart(ag);ah.select(true);}}});W.on('click',function(af){af=af.data;if(af.getTarget().is('a')&&af.$.button!=2)af.preventDefault();});if(b.webkit){W.on('mousedown',function(){ac=1;});W.on('click',function(af){if(af.data.getTarget().is('input','select'))af.data.preventDefault();});W.on('mouseup',function(af){if(af.data.getTarget().is('input','textarea'))af.data.preventDefault();});}if(Z&&c&&W.$.compatMode=='CSS1Compat'||b.gecko||b.opera){var aa=W.getDocumentElement();aa.on('mousedown',function(af){if(af.data.getTarget().equals(aa)){if(b.gecko&&b.version>=10900)J();K.focus();}});}var ab=c?M:V;ab.on('blur',function(){C.focusManager.blur();});var ac;ab.on('focus',function(){var af=C.document;if(Z&&b.gecko&&b.version>=10900)J();else if(b.opera)af.getBody().focus();else if(b.webkit)if(!ac){C.document.getDocumentElement().focus();ac=1;}C.focusManager.focus();});var ad=C.keystrokeHandler;ad.blockedKeystrokes[8]=!Z;ad.attach(W);if(c){W.getDocumentElement().addClass(W.$.compatMode);Z&&W.on('keydown',function(af){var ag=af.data.getKeystroke();if(ag in {8:1,46:1}){var ah=C.getSelection(),ai=ah.getSelectedElement();if(ai){C.fire('saveSnapshot');var aj=ah.getRanges()[0].createBookmark();ai.remove();ah.selectBookmarks([aj]);C.fire('saveSnapshot');af.data.preventDefault();}}});if(W.$.compatMode=='CSS1Compat'){var ae={33:1,34:1};W.on('keydown',function(af){if(af.data.getKeystroke() in ae)setTimeout(function(){C.getSelection().scrollIntoView();},0);});}C.config.enterMode!=1&&W.on('selectionchange',function(){var af=W.getBody(),ag=C.getSelection().getRanges()[0];if(af.getHtml().match(/^<p> <\/p>$/i)&&ag.startContainer.equals(af))setTimeout(function(){ag=C.getSelection().getRanges()[0];if(!ag.startContainer.equals('body')){af.getFirst().remove(1);
+ag.moveToElementEditEnd(af);ag.select(1);}},0);});}if(C.contextMenu)C.contextMenu.addTarget(W,C.config.browserContextMenuOnCtrl!==false);setTimeout(function(){C.fire('contentDom');if(Q){C.mode='wysiwyg';C.fire('mode');Q=false;}N=false;if(O){C.focus();O=false;}setTimeout(function(){C.fire('dataReady');},0);try{C.document.$.execCommand('enableInlineTableEditing',false,!C.config.disableNativeTableHandles);}catch(af){}if(C.config.disableObjectResizing)try{C.document.$.execCommand('enableObjectResizing',false,false);}catch(ag){C.document.getBody().on(c?'resizestart':'resize',function(ah){ah.data.preventDefault();});}if(c)setTimeout(function(){if(C.document){var ah=C.document.$.body;ah.runtimeStyle.marginBottom='0px';ah.runtimeStyle.marginBottom='';}},1000);},0);};C.addMode('wysiwyg',{load:function(V,W,X){L=V;if(c&&b.quirks)V.setStyle('position','relative');C.mayBeDirty=true;Q=true;if(X)this.loadSnapshotData(W);else this.loadData(W);},loadData:function(V){N=true;C._.dataStore={id:1};var W=C.config,X=W.fullPage,Y=W.docType,Z='<style type="text/css" data-cke-temp="1">'+C._.styles.join('\n')+'</style>';!X&&(Z=e.buildStyleHtml(C.config.contentsCss)+Z);var aa=W.baseHref?'<base href="'+W.baseHref+'" data-cke-temp="1" />':'';if(X)V=V.replace(/<!DOCTYPE[^>]*>/i,function(ab){C.docType=Y=ab;return '';}).replace(/<\?xml\s[^\?]*\?>/i,function(ab){C.xmlDeclaration=ab;return '';});if(C.dataProcessor)V=C.dataProcessor.toHtml(V,D);if(X){if(!/<body[\s|>]/.test(V))V='<body>'+V;if(!/<html[\s|>]/.test(V))V='<html>'+V+'</html>';if(!/<head[\s|>]/.test(V))V=V.replace(/<html[^>]*>/,'$&<head><title></title></head>');else if(!/<title[\s|>]/.test(V))V=V.replace(/<head[^>]*>/,'$&<title></title>');aa&&(V=V.replace(/<head>/,'$&'+aa));V=V.replace(/<\/head\s*>/,Z+'$&');V=Y+V;}else V=W.docType+'<html dir="'+W.contentsLangDirection+'"'+' lang="'+(W.contentsLanguage||C.langCode)+'">'+'<head>'+'<title>'+E+'</title>'+aa+Z+'</head>'+'<body'+(W.bodyId?' id="'+W.bodyId+'"':'')+(W.bodyClass?' class="'+W.bodyClass+'"':'')+'>'+V+'</html>';if(b.gecko)V=V.replace(/<br \/>(?=\s*<\/(:?html|body)>)/,'$&<br type="_moz" />');V+=T;this.onDispose();S(V);},getData:function(){var V=C.config,W=V.fullPage,X=W&&C.docType,Y=W&&C.xmlDeclaration,Z=M.getFrameDocument(),aa=W?Z.getDocumentElement().getOuterHtml():Z.getBody().getHtml();if(b.gecko)aa=aa.replace(/<br>(?=\s*(:?$|<\/body>))/,'');if(C.dataProcessor)aa=C.dataProcessor.toDataFormat(aa,D);if(V.ignoreEmptyParagraph)aa=aa.replace(m,function(ab,ac){return ac;});if(Y)aa=Y+'\n'+aa;
+if(X)aa=X+'\n'+aa;return aa;},getSnapshotData:function(){return M.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(V){M.getFrameDocument().getBody().setHtml(V);},onDispose:function(){if(!C.document)return;C.document.getDocumentElement().clearCustomData();C.document.getBody().clearCustomData();C.window.clearCustomData();C.document.clearCustomData();M.clearCustomData();M.remove();},unload:function(V){this.onDispose();C.window=C.document=M=L=O=null;C.fire('contentDomUnload');},focus:function(){var V=C.window;if(N)O=true;else if(b.opera&&C.document){var W=C.window.$.frameElement;W.blur(),W.focus();C.document.getBody().focus();C.selectionChange();}else if(!b.opera&&V){b.air?setTimeout(function(){V.focus();},0):V.focus();C.selectionChange();}}});C.on('insertHtml',p(q),null,null,20);C.on('insertElement',p(s),null,null,20);C.on('insertText',p(r),null,null,20);C.on('selectionChange',B,null,null,1);});var G;C.on('contentDom',function(){var L=C.document.getElementsByTag('title').getItem(0);L.data('cke-title',C.document.$.title);C.document.$.title=E;});C.on('readOnly',function(){if(C.mode=='wysiwyg'){var L=C.getMode();L.loadData(L.getData());}});if(a.document.$.documentMode>=8){C.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var H=[];for(var I in f.$removeEmpty)H.push('html.CSS1Compat '+I+'[contenteditable=false]');C.addCss(H.join(',')+'{ display:inline-block;}');}else if(b.gecko){C.addCss('html { height: 100% !important; }');C.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\twidth : 24px; height : 24px; }');}C.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');C.addCss('img, input, textarea { cursor: default;}');function J(L){if(C.readOnly)return;e.tryThese(function(){C.document.$.designMode='on';setTimeout(function(){C.document.$.designMode='off';if(a.currentInstance==C)C.document.getBody().focus();},50);},function(){C.document.$.designMode='off';var M=C.document.getBody();M.setAttribute('contentEditable',false);M.setAttribute('contentEditable',true);!L&&J(1);});};if(b.gecko||c||b.opera){var K;C.on('uiReady',function(){K=C.container.append(h.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>'));K.on('focus',function(){C.focus();});C.focusGrabber=K;});C.on('destroy',function(){e.removeFunction(F);K.clearCustomData();delete C.focusGrabber;});}C.on('insertElement',function(L){var M=L.data;if(M.type==1&&(M.is('input')||M.is('textarea'))){if(!M.isReadOnly())M.data('cke-editable',M.hasAttribute('contenteditable')?'true':'1');
+M.setAttribute('contentEditable',false);}});}});if(b.gecko)(function(){var C=document.body;if(!C)window.addEventListener('load',arguments.callee,false);else{var D=C.getAttribute('onpageshow');C.setAttribute('onpageshow',(D?D+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();');}})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(m){var n='checkspell',o=m.addCommand(n,new a.dialogCommand(n));o.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname};m.ui.addButton('SpellChecker',{label:m.lang.spellCheck.toolbar,command:n});a.dialog.add(n,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){var m=e.cssLength;function n(S){return!!this._.tabs[S][0].$.offsetHeight;};function o(){var W=this;var S=W._.currentTabId,T=W._.tabIdList.length,U=e.indexOf(W._.tabIdList,S)+T;for(var V=U-1;V>U-T;V--){if(n.call(W,W._.tabIdList[V%T]))return W._.tabIdList[V%T];}return null;};function p(){var W=this;var S=W._.currentTabId,T=W._.tabIdList.length,U=e.indexOf(W._.tabIdList,S);for(var V=U+1;V<U+T;V++){if(n.call(W,W._.tabIdList[V%T]))return W._.tabIdList[V%T];}return null;};function q(S,T){var U=S.$.getElementsByTagName('input');for(var V=0,W=U.length;V<W;V++){var X=new h(U[V]);if(X.getAttribute('type').toLowerCase()=='text')if(T){X.setAttribute('value',X.getCustomData('fake_value')||'');X.removeCustomData('fake_value');}else{X.setCustomData('fake_value',X.getAttribute('value'));X.setAttribute('value','');}}};function r(S,T){var V=this;var U=V.getInputElement();if(U)S?U.removeAttribute('aria-invalid'):U.setAttribute('aria-invalid',true);if(!S)if(V.select)V.select();else V.focus();T&&alert(T);V.fire('validated',{valid:S,msg:T});};function s(){var S=this.getInputElement();S&&S.removeAttribute('aria-invalid');};a.dialog=function(S,T){var U=a.dialog._.dialogDefinitions[T],V=e.clone(u),W=S.config.dialog_buttonsOrder||'OS',X=S.lang.dir;if(W=='OS'&&b.mac||W=='rtl'&&X=='ltr'||W=='ltr'&&X=='rtl')V.buttons.reverse();
+U=e.extend(U(S),V);U=e.clone(U);U=new y(this,U);var Y=a.document,Z=S.theme.buildDialog(S);this._={editor:S,element:Z.element,name:T,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=Z.parts;e.setTimeout(function(){S.fire('ariaWidget',this.parts.contents);},0,this);var aa={position:b.ie6Compat?'absolute':'fixed',top:0,visibility:'hidden'};aa[X=='rtl'?'right':'left']=0;this.parts.dialog.setStyles(aa);a.event.call(this);this.definition=U=a.fire('dialogDefinition',{name:T,definition:U},S).definition;var ab={};if(!('removeDialogTabs' in S._)&&S.config.removeDialogTabs){var ac=S.config.removeDialogTabs.split(';');for(i=0;i<ac.length;i++){var ad=ac[i].split(':');if(ad.length==2){var ae=ad[0];if(!ab[ae])ab[ae]=[];ab[ae].push(ad[1]);}}S._.removeDialogTabs=ab;}if(S._.removeDialogTabs&&(ab=S._.removeDialogTabs[T]))for(i=0;i<ab.length;i++)U.removeContents(ab[i]);if(U.onLoad)this.on('load',U.onLoad);if(U.onShow)this.on('show',U.onShow);if(U.onHide)this.on('hide',U.onHide);if(U.onOk)this.on('ok',function(ar){S.fire('saveSnapshot');setTimeout(function(){S.fire('saveSnapshot');},0);if(U.onOk.call(this,ar)===false)ar.data.hide=false;});if(U.onCancel)this.on('cancel',function(ar){if(U.onCancel.call(this,ar)===false)ar.data.hide=false;});var af=this,ag=function(ar){var as=af._.contents,at=false;for(var au in as)for(var av in as[au]){at=ar.call(this,as[au][av]);if(at)return;}};this.on('ok',function(ar){ag(function(as){if(as.validate){var at=as.validate(this),au=typeof at=='string'||at===false;if(au){ar.data.hide=false;ar.stop();}r.call(as,!au,typeof at=='string'?at:undefined);return au;}});},this,null,0);this.on('cancel',function(ar){ag(function(as){if(as.isChanged()){if(!confirm(S.lang.common.confirmCancel))ar.data.hide=false;return true;}});},this,null,0);this.parts.close.on('click',function(ar){if(this.fire('cancel',{hide:true}).hide!==false)this.hide();ar.data.preventDefault();},this);function ah(){var ar=af._.focusList;ar.sort(function(au,av){if(au.tabIndex!=av.tabIndex)return av.tabIndex-au.tabIndex;else return au.focusIndex-av.focusIndex;});var as=ar.length;for(var at=0;at<as;at++)ar[at].focusIndex=at;};function ai(ar){var as=af._.focusList,at=ar?1:-1;if(as.length<1)return;var au=af._.currentFocusIndex;try{as[au].getInputElement().$.blur();}catch(ax){}var av=(au+at+as.length)%as.length,aw=av;
+while(!as[aw].isFocusable()){aw=(aw+at+as.length)%as.length;if(aw==av)break;}as[aw].focus();if(as[aw].type=='text')as[aw].select();};this.changeFocus=ai;var aj;function ak(ar){var aw=this;if(af!=a.dialog._.currentTop)return;var as=ar.data.getKeystroke(),at=S.lang.dir=='rtl';aj=0;if(as==9||as==2228224+9){var au=as==2228224+9;if(af._.tabBarMode){var av=au?o.call(af):p.call(af);af.selectPage(av);af._.tabs[av][0].focus();}else ai(!au);aj=1;}else if(as==4456448+121&&!af._.tabBarMode&&af.getPageCount()>1){af._.tabBarMode=true;af._.tabs[af._.currentTabId][0].focus();aj=1;}else if((as==37||as==39)&&af._.tabBarMode){av=as==(at?39:37)?o.call(af):p.call(af);af.selectPage(av);af._.tabs[av][0].focus();aj=1;}else if((as==13||as==32)&&af._.tabBarMode){aw.selectPage(aw._.currentTabId);aw._.tabBarMode=false;aw._.currentFocusIndex=-1;ai(true);aj=1;}if(aj){ar.stop();ar.data.preventDefault();}};function al(ar){aj&&ar.data.preventDefault();};var am=this._.element;this.on('show',function(){am.on('keydown',ak,this,null,0);if(b.opera||b.gecko&&b.mac)am.on('keypress',al,this);});this.on('hide',function(){am.removeListener('keydown',ak);if(b.opera||b.gecko&&b.mac)am.removeListener('keypress',al);ag(function(ar){s.apply(ar);});});this.on('iframeAdded',function(ar){var as=new g(ar.data.iframe.$.contentWindow.document);as.on('keydown',ak,this,null,0);});this.on('show',function(){var av=this;ah();if(S.config.dialog_startupFocusTab&&af._.pageCount>1){af._.tabBarMode=true;af._.tabs[af._.currentTabId][0].focus();}else if(!av._.hasFocus){av._.currentFocusIndex=-1;if(U.onFocus){var ar=U.onFocus.call(av);ar&&ar.focus();}else ai(true);if(av._.editor.mode=='wysiwyg'&&c){var as=S.document.$.selection,at=as.createRange();if(at)if(at.parentElement&&at.parentElement().ownerDocument==S.document.$||at.item&&at.item(0).ownerDocument==S.document.$){var au=document.body.createTextRange();au.moveToElementText(av.getElement().getFirst().$);au.collapse(true);au.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(ar){var as=this.getElement(),at=as.getFirst();at.remove();at.appendTo(as);},this);A(this);B(this);new d.text(U.title,a.document).appendTo(this.parts.title);for(var an=0;an<U.contents.length;an++){var ao=U.contents[an];ao&&this.addPage(ao);}this.parts.tabs.on('click',function(ar){var au=this;var as=ar.data.getTarget();if(as.hasClass('cke_dialog_tab')){var at=as.$.id;au.selectPage(at.substring(4,at.lastIndexOf('_')));if(au._.tabBarMode){au._.tabBarMode=false;au._.currentFocusIndex=-1;
+ai(true);}ar.data.preventDefault();}},this);var ap=[],aq=a.dialog._.uiElementBuilders.hbox.build(this,{type:'hbox',className:'cke_dialog_footer_buttons',widths:[],children:U.buttons},ap).getChild();this.parts.footer.setHtml(ap.join(''));for(an=0;an<aq.length;an++)this._.buttons[aq[an].id]=aq[an];};function t(S,T,U){this.element=T;this.focusIndex=U;this.tabIndex=0;this.isFocusable=function(){return!T.getAttribute('disabled')&&T.isVisible();};this.focus=function(){S._.currentFocusIndex=this.focusIndex;this.element.focus();};T.on('keydown',function(V){if(V.data.getKeystroke() in {32:1,13:1})this.fire('click');});T.on('focus',function(){this.fire('mouseover');});T.on('blur',function(){this.fire('mouseout');});};a.dialog.prototype={destroy:function(){this.hide();this._.element.remove();},resize:(function(){return function(S,T){var U=this;if(U._.contentSize&&U._.contentSize.width==S&&U._.contentSize.height==T)return;a.dialog.fire('resize',{dialog:U,skin:U._.editor.skinName,width:S,height:T},U._.editor);U.fire('resize',{skin:U._.editor.skinName,width:S,height:T},U._.editor);if(U._.editor.lang.dir=='rtl'&&U._.position)U._.position.x=a.document.getWindow().getViewPaneSize().width-U._.contentSize.width-parseInt(U._.element.getFirst().getStyle('right'),10);U._.contentSize={width:S,height:T};};})(),getSize:function(){var S=this._.element.getFirst();return{width:S.$.offsetWidth||0,height:S.$.offsetHeight||0};},move:(function(){var S;return function(T,U,V){var ac=this;var W=ac._.element.getFirst(),X=ac._.editor.lang.dir=='rtl';if(S===undefined)S=W.getComputedStyle('position')=='fixed';if(S&&ac._.position&&ac._.position.x==T&&ac._.position.y==U)return;ac._.position={x:T,y:U};if(!S){var Y=a.document.getWindow().getScrollPosition();T+=Y.x;U+=Y.y;}if(X){var Z=ac.getSize(),aa=a.document.getWindow().getViewPaneSize();T=aa.width-Z.width-T;}var ab={top:(U>0?U:0)+'px'};ab[X?'right':'left']=(T>0?T:0)+'px';W.setStyles(ab);V&&(ac._.moved=1);};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){var S=this._.element,T=this.definition;if(!(S.getParent()&&S.getParent().equals(a.document.getBody())))S.appendTo(a.document.getBody());else S.setStyle('display','block');if(b.gecko&&b.version<10900){var U=this.parts.dialog;U.setStyle('position','absolute');setTimeout(function(){U.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||T.width||T.minWidth,this._.contentSize&&this._.contentSize.height||T.height||T.minHeight);this.reset();
+this.selectPage(this.definition.contents[0].id);if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;G(this._.editor);S.on('keydown',K);S.on(b.opera?'keypress':'keyup',L);for(var V in {keyup:1,keydown:1,keypress:1})S.on(V,R);}else{this._.parentDialog=a.dialog._.currentTop;var W=this._.parentDialog.getElement().getFirst();W.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}M(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;e.setTimeout(function(){this.layout();this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});k.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(X){X.setInitValue&&X.setInitValue();});},100,this);},layout:function(){var U=this;var S=a.document.getWindow().getViewPaneSize(),T=U.getSize();U.move(U._.moved?U._.position.x:(S.width-T.width)/2,U._.moved?U._.position.y:(S.height-T.height)/2);},foreach:function(S){var V=this;for(var T in V._.contents)for(var U in V._.contents[T])S.call(V,V._.contents[T][U]);return V;},reset:(function(){var S=function(T){if(T.reset)T.reset(1);};return function(){this.foreach(S);return this;};})(),setupContent:function(){var S=arguments;this.foreach(function(T){if(T.setup)T.setup.apply(T,S);});},commitContent:function(){var S=arguments;this.foreach(function(T){if(c&&this._.currentFocusIndex==T.focusIndex)T.getInputElement().$.blur();if(T.commit)T.commit.apply(T,S);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var S=this._.element;S.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');N(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)H();else{var T=this._.parentDialog.getElement().getFirst();T.setStyle('z-index',parseInt(T.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;S.removeListener('keydown',K);S.removeListener(b.opera?'keypress':'keyup',L);for(var U in {keyup:1,keydown:1,keypress:1})S.removeListener(U,R);var V=this._.editor;V.focus();if(V.mode=='wysiwyg'&&c){var W=V.getSelection();
+W&&W.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(X){X.resetInitValue&&X.resetInitValue();});},addPage:function(S){var ae=this;var T=[],U=S.label?' title="'+e.htmlEncode(S.label)+'"':'',V=S.elements,W=a.dialog._.uiElementBuilders.vbox.build(ae,{type:'vbox',className:'cke_dialog_page_contents',children:S.elements,expand:!!S.expand,padding:S.padding,style:S.style||'width: 100%;height:100%'},T),X=h.createFromHtml(T.join(''));X.setAttribute('role','tabpanel');var Y=b,Z='cke_'+S.id+'_'+e.getNextNumber(),aa=h.createFromHtml(['<a class="cke_dialog_tab"',ae._.pageCount>0?' cke_last':'cke_first',U,!!S.hidden?' style="display:none"':'',' id="',Z,'"',Y.gecko&&Y.version>=10900&&!Y.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',S.label,'</a>'].join(''));X.setAttribute('aria-labelledby',Z);ae._.tabs[S.id]=[aa,X];ae._.tabIdList.push(S.id);!S.hidden&&ae._.pageCount++;ae._.lastTab=aa;ae.updateStyle();var ab=ae._.contents[S.id]={},ac,ad=W.getChild();while(ac=ad.shift()){ab[ac.id]=ac;if(typeof ac.getChild=='function')ad.push.apply(ad,ac.getChild());}X.setAttribute('name',S.id);X.appendTo(ae.parts.contents);aa.unselectable();ae.parts.tabs.append(aa);if(S.accessKey){M(ae,ae,'CTRL+'+S.accessKey,P,O);ae._.accessKeyMap['CTRL+'+S.accessKey]=S.id;}},selectPage:function(S){if(this._.currentTabId==S)return;if(this.fire('selectPage',{page:S,currentPage:this._.currentTabId})===true)return;for(var T in this._.tabs){var U=this._.tabs[T][0],V=this._.tabs[T][1];if(T!=S){U.removeClass('cke_dialog_tab_selected');V.hide();}V.setAttribute('aria-hidden',T!=S);}var W=this._.tabs[S];W[0].addClass('cke_dialog_tab_selected');if(b.ie6Compat||b.ie7Compat){q(W[1]);W[1].show();setTimeout(function(){q(W[1],1);},0);}else W[1].show();this._.currentTabId=S;this._.currentTabIndex=e.indexOf(this._.tabIdList,S);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(S){var U=this;var T=U._.tabs[S]&&U._.tabs[S][0];if(!T||U._.pageCount==1||!T.isVisible())return;else if(S==U._.currentTabId)U.selectPage(o.call(U));T.hide();U._.pageCount--;U.updateStyle();},showPage:function(S){var U=this;var T=U._.tabs[S]&&U._.tabs[S][0];if(!T)return;T.show();U._.pageCount++;U.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(S,T){var U=this._.contents[S];return U&&U[T];},getValueOf:function(S,T){return this.getContentElement(S,T).getValue();
+},setValueOf:function(S,T,U){return this.getContentElement(S,T).setValue(U);},getButton:function(S){return this._.buttons[S];},click:function(S){return this._.buttons[S].click();},disableButton:function(S){return this._.buttons[S].disable();},enableButton:function(S){return this._.buttons[S].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(S,T){var V=this;if(typeof T=='undefined'){T=V._.focusList.length;V._.focusList.push(new t(V,S,T));}else{V._.focusList.splice(T,0,new t(V,S,T));for(var U=T+1;U<V._.focusList.length;U++)V._.focusList[U].focusIndex++;}}};e.extend(a.dialog,{add:function(S,T){if(!this._.dialogDefinitions[S]||typeof T=='function')this._.dialogDefinitions[S]=T;},exists:function(S){return!!this._.dialogDefinitions[S];},getCurrent:function(){return a.dialog._.currentTop;},okButton:(function(){var S=function(T,U){U=U||{};return e.extend({id:'ok',type:'button',label:T.lang.common.ok,'class':'cke_dialog_ui_button_ok',onClick:function(V){var W=V.data.dialog;if(W.fire('ok',{hide:true}).hide!==false)W.hide();}},U,true);};S.type='button';S.override=function(T){return e.extend(function(U){return S(U,T);},{type:'button'},true);};return S;})(),cancelButton:(function(){var S=function(T,U){U=U||{};return e.extend({id:'cancel',type:'button',label:T.lang.common.cancel,'class':'cke_dialog_ui_button_cancel',onClick:function(V){var W=V.data.dialog;if(W.fire('cancel',{hide:true}).hide!==false)W.hide();}},U,true);};S.type='button';S.override=function(T){return e.extend(function(U){return S(U,T);},{type:'button'},true);};return S;})(),addUIElement:function(S,T){this._.uiElementBuilders[S]=T;}});a.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};a.event.implementOn(a.dialog);a.event.implementOn(a.dialog.prototype,true);var u={resizable:3,minWidth:600,minHeight:400,buttons:[a.dialog.okButton,a.dialog.cancelButton]},v=function(S,T,U){for(var V=0,W;W=S[V];V++){if(W.id==T)return W;if(U&&W[U]){var X=v(W[U],T,U);if(X)return X;}}return null;},w=function(S,T,U,V,W){if(U){for(var X=0,Y;Y=S[X];X++){if(Y.id==U){S.splice(X,0,T);return T;}if(V&&Y[V]){var Z=w(Y[V],T,U,V,true);if(Z)return Z;}}if(W)return null;}S.push(T);return T;},x=function(S,T,U){for(var V=0,W;W=S[V];V++){if(W.id==T)return S.splice(V,1);if(U&&W[U]){var X=x(W[U],T,U);if(X)return X;}}return null;},y=function(S,T){this.dialog=S;
+var U=T.contents;for(var V=0,W;W=U[V];V++)U[V]=W&&new z(S,W);e.extend(this,T);};y.prototype={getContents:function(S){return v(this.contents,S);},getButton:function(S){return v(this.buttons,S);},addContents:function(S,T){return w(this.contents,S,T);},addButton:function(S,T){return w(this.buttons,S,T);},removeContents:function(S){x(this.contents,S);},removeButton:function(S){x(this.buttons,S);}};function z(S,T){this._={dialog:S};e.extend(this,T);};z.prototype={get:function(S){return v(this.elements,S,'children');},add:function(S,T){return w(this.elements,S,T,'children');},remove:function(S){x(this.elements,S,'children');}};function A(S){var T=null,U=null,V=S.getElement().getFirst(),W=S.getParentEditor(),X=W.config.dialog_magnetDistance,Y=W.skin.margins||[0,0,0,0];if(typeof X=='undefined')X=20;function Z(ab){var ac=S.getSize(),ad=a.document.getWindow().getViewPaneSize(),ae=ab.data.$.screenX,af=ab.data.$.screenY,ag=ae-T.x,ah=af-T.y,ai,aj;T={x:ae,y:af};U.x+=ag;U.y+=ah;if(U.x+Y[3]<X)ai=-Y[3];else if(U.x-Y[1]>ad.width-ac.width-X)ai=ad.width-ac.width+(W.lang.dir=='rtl'?0:Y[1]);else ai=U.x;if(U.y+Y[0]<X)aj=-Y[0];else if(U.y-Y[2]>ad.height-ac.height-X)aj=ad.height-ac.height+Y[2];else aj=U.y;S.move(ai,aj,1);ab.data.preventDefault();};function aa(ab){a.document.removeListener('mousemove',Z);a.document.removeListener('mouseup',aa);if(b.ie6Compat){var ac=E.getChild(0).getFrameDocument();ac.removeListener('mousemove',Z);ac.removeListener('mouseup',aa);}};S.parts.title.on('mousedown',function(ab){T={x:ab.data.$.screenX,y:ab.data.$.screenY};a.document.on('mousemove',Z);a.document.on('mouseup',aa);U=S.getPosition();if(b.ie6Compat){var ac=E.getChild(0).getFrameDocument();ac.on('mousemove',Z);ac.on('mouseup',aa);}ab.data.preventDefault();},S);};function B(S){var T=S.definition,U=T.resizable;if(U==0)return;var V=S.getParentEditor(),W,X,Y,Z,aa,ab,ac=e.addFunction(function(af){aa=S.getSize();var ag=S.parts.contents,ah=ag.$.getElementsByTagName('iframe').length;if(ah){ab=h.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');ag.append(ab);}X=aa.height-S.parts.contents.getSize('height',!(b.gecko||b.opera||c&&b.quirks));W=aa.width-S.parts.contents.getSize('width',1);Z={x:af.screenX,y:af.screenY};Y=a.document.getWindow().getViewPaneSize();a.document.on('mousemove',ad);a.document.on('mouseup',ae);if(b.ie6Compat){var ai=E.getChild(0).getFrameDocument();ai.on('mousemove',ad);ai.on('mouseup',ae);}af.preventDefault&&af.preventDefault();
+});S.on('load',function(){var af='';if(U==1)af=' cke_resizer_horizontal';else if(U==2)af=' cke_resizer_vertical';var ag=h.createFromHtml('<div class="cke_resizer'+af+' cke_resizer_'+V.lang.dir+'"'+' title="'+e.htmlEncode(V.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+ac+', event )"></div>');S.parts.footer.append(ag,1);});V.on('destroy',function(){e.removeFunction(ac);});function ad(af){var ag=V.lang.dir=='rtl',ah=(af.data.$.screenX-Z.x)*(ag?-1:1),ai=af.data.$.screenY-Z.y,aj=aa.width,ak=aa.height,al=aj+ah*(S._.moved?1:2),am=ak+ai*(S._.moved?1:2),an=S._.element.getFirst(),ao=ag&&an.getComputedStyle('right'),ap=S.getPosition();if(ap.y+am>Y.height)am=Y.height-ap.y;if((ag?ao:ap.x)+al>Y.width)al=Y.width-(ag?ao:ap.x);if(U==1||U==3)aj=Math.max(T.minWidth||0,al-W);if(U==2||U==3)ak=Math.max(T.minHeight||0,am-X);S.resize(aj,ak);if(!S._.moved)S.layout();af.data.preventDefault();};function ae(){a.document.removeListener('mouseup',ae);a.document.removeListener('mousemove',ad);if(ab){ab.remove();ab=null;}if(b.ie6Compat){var af=E.getChild(0).getFrameDocument();af.removeListener('mouseup',ae);af.removeListener('mousemove',ad);}};};var C,D={},E;function F(S){S.data.preventDefault(1);};function G(S){var T=a.document.getWindow(),U=S.config,V=U.dialog_backgroundCoverColor||'white',W=U.dialog_backgroundCoverOpacity,X=U.baseFloatZIndex,Y=e.genKey(V,W,X),Z=D[Y];if(!Z){var aa=['<div tabIndex="-1" style="position: ',b.ie6Compat?'absolute':'fixed','; z-index: ',X,'; top: 0px; left: 0px; ',!b.ie6Compat?'background-color: '+V:'','" class="cke_dialog_background_cover">'];if(b.ie6Compat){var ab=b.isCustomDomain(),ac="<html><body style=\\'background-color:"+V+";\\'></body></html>";aa.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');aa.push('void((function(){document.open();'+(ab?"document.domain='"+document.domain+"';":'')+"document.write( '"+ac+"' );"+'document.close();'+'})())');aa.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>');}aa.push('</div>');Z=h.createFromHtml(aa.join(''));Z.setOpacity(W!=undefined?W:0.5);Z.on('keydown',F);Z.on('keypress',F);Z.on('keyup',F);Z.appendTo(a.document.getBody());D[Y]=Z;}else Z.show();E=Z;var ad=function(){var ag=T.getViewPaneSize();Z.setStyles({width:ag.width+'px',height:ag.height+'px'});},ae=function(){var ag=T.getScrollPosition(),ah=a.dialog._.currentTop;Z.setStyles({left:ag.x+'px',top:ag.y+'px'});if(ah)do{var ai=ah.getPosition();
+ah.move(ai.x,ai.y);}while(ah=ah._.parentDialog)};C=ad;T.on('resize',ad);ad();if(!(b.mac&&b.webkit))Z.focus();if(b.ie6Compat){var af=function(){ae();arguments.callee.prevScrollHandler.apply(this,arguments);};T.$.setTimeout(function(){af.prevScrollHandler=window.onscroll||(function(){});window.onscroll=af;},0);ae();}};function H(){if(!E)return;var S=a.document.getWindow();E.hide();S.removeListener('resize',C);if(b.ie6Compat)S.$.setTimeout(function(){var T=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=T||null;},0);C=null;};function I(){for(var S in D)D[S].remove();D={};};var J={},K=function(S){var T=S.data.$.ctrlKey||S.data.$.metaKey,U=S.data.$.altKey,V=S.data.$.shiftKey,W=String.fromCharCode(S.data.$.keyCode),X=J[(T?'CTRL+':'')+(U?'ALT+':'')+(V?'SHIFT+':'')+W];if(!X||!X.length)return;X=X[X.length-1];X.keydown&&X.keydown.call(X.uiElement,X.dialog,X.key);S.data.preventDefault();},L=function(S){var T=S.data.$.ctrlKey||S.data.$.metaKey,U=S.data.$.altKey,V=S.data.$.shiftKey,W=String.fromCharCode(S.data.$.keyCode),X=J[(T?'CTRL+':'')+(U?'ALT+':'')+(V?'SHIFT+':'')+W];if(!X||!X.length)return;X=X[X.length-1];if(X.keyup){X.keyup.call(X.uiElement,X.dialog,X.key);S.data.preventDefault();}},M=function(S,T,U,V,W){var X=J[U]||(J[U]=[]);X.push({uiElement:S,dialog:T,key:U,keyup:W||S.accessKeyUp,keydown:V||S.accessKeyDown});},N=function(S){for(var T in J){var U=J[T];for(var V=U.length-1;V>=0;V--){if(U[V].dialog==S||U[V].uiElement==S)U.splice(V,1);}if(U.length===0)delete J[T];}},O=function(S,T){if(S._.accessKeyMap[T])S.selectPage(S._.accessKeyMap[T]);},P=function(S,T){},Q={27:1,13:1},R=function(S){if(S.data.getKeystroke() in Q)S.data.stopPropagation();};(function(){k.dialog={uiElement:function(S,T,U,V,W,X,Y){if(arguments.length<4)return;var Z=(V.call?V(T):V)||'div',aa=['<',Z,' '],ab=(W&&W.call?W(T):W)||{},ac=(X&&X.call?X(T):X)||{},ad=(Y&&Y.call?Y.call(this,S,T):Y)||'',ae=this.domId=ac.id||e.getNextId()+'_uiElement',af=this.id=T.id,ag;ac.id=ae;var ah={};if(T.type)ah['cke_dialog_ui_'+T.type]=1;if(T.className)ah[T.className]=1;if(T.disabled)ah.cke_disabled=1;var ai=ac['class']&&ac['class'].split?ac['class'].split(' '):[];for(ag=0;ag<ai.length;ag++){if(ai[ag])ah[ai[ag]]=1;}var aj=[];for(ag in ah)aj.push(ag);ac['class']=aj.join(' ');if(T.title)ac.title=T.title;var ak=(T.style||'').split(';');if(T.align){var al=T.align;ab['margin-left']=al=='left'?0:'auto';ab['margin-right']=al=='right'?0:'auto';}for(ag in ab)ak.push(ag+':'+ab[ag]);if(T.hidden)ak.push('display:none');
+for(ag=ak.length-1;ag>=0;ag--){if(ak[ag]==='')ak.splice(ag,1);}if(ak.length>0)ac.style=(ac.style?ac.style+'; ':'')+ak.join('; ');for(ag in ac)aa.push(ag+'="'+e.htmlEncode(ac[ag])+'" ');aa.push('>',ad,'</',Z,'>');U.push(aa.join(''));(this._||(this._={})).dialog=S;if(typeof T.isChanged=='boolean')this.isChanged=function(){return T.isChanged;};if(typeof T.isChanged=='function')this.isChanged=T.isChanged;if(typeof T.setValue=='function')this.setValue=e.override(this.setValue,function(an){return function(ao){an.call(this,T.setValue.call(this,ao));};});if(typeof T.getValue=='function')this.getValue=e.override(this.getValue,function(an){return function(){return T.getValue.call(this,an.call(this));};});a.event.implementOn(this);this.registerEvents(T);if(this.accessKeyUp&&this.accessKeyDown&&T.accessKey)M(this,S,'CTRL+'+T.accessKey);var am=this;S.on('load',function(){if(am.getInputElement())am.getInputElement().on('focus',function(){S._.tabBarMode=false;S._.hasFocus=true;am.fire('focus');},am);});if(this.keyboardFocusable){this.tabIndex=T.tabIndex||0;this.focusIndex=S._.focusList.push(this)-1;this.on('focus',function(){S._.currentFocusIndex=am.focusIndex;});}e.extend(this,T);},hbox:function(S,T,U,V,W){if(arguments.length<4)return;this._||(this._={});var X=this._.children=T,Y=W&&W.widths||null,Z=W&&W.height||null,aa={},ab,ac=function(){var ae=['<tbody><tr class="cke_dialog_ui_hbox">'];for(ab=0;ab<U.length;ab++){var af='cke_dialog_ui_hbox_child',ag=[];if(ab===0)af='cke_dialog_ui_hbox_first';if(ab==U.length-1)af='cke_dialog_ui_hbox_last';ae.push('<td class="',af,'" role="presentation" ');if(Y){if(Y[ab])ag.push('width:'+m(Y[ab]));}else ag.push('width:'+Math.floor(100/U.length)+'%');if(Z)ag.push('height:'+m(Z));if(W&&W.padding!=undefined)ag.push('padding:'+m(W.padding));if(c&&b.quirks&&X[ab].align)ag.push('text-align:'+X[ab].align);if(ag.length>0)ae.push('style="'+ag.join('; ')+'" ');ae.push('>',U[ab],'</td>');}ae.push('</tr></tbody>');return ae.join('');},ad={role:'presentation'};W&&W.align&&(ad.align=W.align);k.dialog.uiElement.call(this,S,W||{type:'hbox'},V,'table',aa,ad,ac);},vbox:function(S,T,U,V,W){if(arguments.length<3)return;this._||(this._={});var X=this._.children=T,Y=W&&W.width||null,Z=W&&W.heights||null,aa=function(){var ab=['<table role="presentation" cellspacing="0" border="0" '];ab.push('style="');if(W&&W.expand)ab.push('height:100%;');ab.push('width:'+m(Y||'100%'),';');ab.push('"');ab.push('align="',e.htmlEncode(W&&W.align||(S.getParentEditor().lang.dir=='ltr'?'left':'right')),'" ');
+ab.push('><tbody>');for(var ac=0;ac<U.length;ac++){var ad=[];ab.push('<tr><td role="presentation" ');if(Y)ad.push('width:'+m(Y||'100%'));if(Z)ad.push('height:'+m(Z[ac]));else if(W&&W.expand)ad.push('height:'+Math.floor(100/U.length)+'%');if(W&&W.padding!=undefined)ad.push('padding:'+m(W.padding));if(c&&b.quirks&&X[ac].align)ad.push('text-align:'+X[ac].align);if(ad.length>0)ab.push('style="',ad.join('; '),'" ');ab.push(' class="cke_dialog_ui_vbox_child">',U[ac],'</td></tr>');}ab.push('</tbody></table>');return ab.join('');};k.dialog.uiElement.call(this,S,W||{type:'vbox'},V,'div',null,{role:'presentation'},aa);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(S,T){this.getInputElement().setValue(S);!T&&this.fire('change',{value:S});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var V=this;var S=V.getInputElement(),T=S,U;while((T=T.getParent())&&T.$.className.search('cke_dialog_page_contents')==-1){}if(!T)return V;U=T.getAttribute('name');if(V._.dialog._.currentTabId!=U)V._.dialog.selectPage(U);return V;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(S){var T=/^on([A-Z]\w+)/,U,V=function(X,Y,Z,aa){Y.on('load',function(){X.getInputElement().on(Z,aa,X);});};for(var W in S){if(!(U=W.match(T)))continue;if(this.eventProcessors[W])this.eventProcessors[W].call(this,this._.dialog,S[W]);else V(this,this._.dialog,U[1].toLowerCase(),S[W]);}return this;},eventProcessors:{onLoad:function(S,T){S.on('load',T,this);},onShow:function(S,T){S.on('show',T,this);},onHide:function(S,T){S.on('hide',T,this);}},accessKeyDown:function(S,T){this.focus();},accessKeyUp:function(S,T){},disable:function(){var S=this.getElement(),T=this.getInputElement();T.setAttribute('disabled','true');S.addClass('cke_disabled');},enable:function(){var S=this.getElement(),T=this.getInputElement();T.removeAttribute('disabled');S.removeClass('cke_disabled');},isEnabled:function(){return!this.getElement().hasClass('cke_disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(S){var T=this;if(arguments.length<1)return T._.children.concat();
+if(!S.splice)S=[S];if(S.length<2)return T._.children[S[0]];else return T._.children[S[0]]&&T._.children[S[0]].getChild?T._.children[S[0]].getChild(S.slice(1,S.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var S={build:function(T,U,V){var W=U.children,X,Y=[],Z=[];for(var aa=0;aa<W.length&&(X=W[aa]);aa++){var ab=[];Y.push(ab);Z.push(a.dialog._.uiElementBuilders[X.type].build(T,X,ab));}return new k.dialog[U.type](T,Z,Y,V,U);}};a.dialog.addUIElement('hbox',S);a.dialog.addUIElement('vbox',S);})();a.dialogCommand=function(S){this.dialogName=S;};a.dialogCommand.prototype={exec:function(S){S.openDialog(this.dialogName);},canUndo:false,editorFocus:c||b.webkit};(function(){var S=/^([a]|[^a])+$/,T=/^\d*$/,U=/^\d*(?:\.\d+)?$/,V=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,W=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i;a.VALIDATE_OR=1;a.VALIDATE_AND=2;a.dialog.validate={functions:function(){var X=arguments;return function(){var Y=this&&this.getValue?this.getValue():X[0],Z=undefined,aa=2,ab=[],ac;for(ac=0;ac<X.length;ac++){if(typeof X[ac]=='function')ab.push(X[ac]);else break;}if(ac<X.length&&typeof X[ac]=='string'){Z=X[ac];ac++;}if(ac<X.length&&typeof X[ac]=='number')aa=X[ac];var ad=aa==2?true:false;for(ac=0;ac<ab.length;ac++){if(aa==2)ad=ad&&ab[ac](Y);else ad=ad||ab[ac](Y);}return!ad?Z:true;};},regex:function(X,Y){return function(){var Z=this&&this.getValue?this.getValue():arguments[0];return!X.test(Z)?Y:true;};},notEmpty:function(X){return this.regex(S,X);},integer:function(X){return this.regex(T,X);},number:function(X){return this.regex(U,X);},cssLength:function(X){return this.functions(function(Y){return W.test(e.trim(Y));},X);},htmlLength:function(X){return this.functions(function(Y){return V.test(e.trim(Y));},X);},equals:function(X,Y){return this.functions(function(Z){return Z==X;},Y);},notEqual:function(X,Y){return this.functions(function(Z){return Z!=X;},Y);}};a.on('instanceDestroyed',function(X){if(e.isEmpty(a.instances)){var Y;while(Y=a.dialog._.currentTop)Y.hide();I();}var Z=X.editor._.storedDialogs;for(var aa in Z)Z[aa].destroy();});})();e.extend(a.editor.prototype,{openDialog:function(S,T){if(this.mode=='wysiwyg'&&c){var U=this.getSelection();U&&U.lock();}var V=a.dialog._.dialogDefinitions[S],W=this.skin.dialog;if(a.dialog._.currentTop===null)G(this);if(typeof V=='function'&&W._isLoaded){var X=this._.storedDialogs||(this._.storedDialogs={}),Y=X[S]||(X[S]=new a.dialog(this,S));T&&T.call(Y,Y);Y.show();return Y;}else if(V=='failed'){H();
+throw new Error('[CKEDITOR.dialog.openDialog] Dialog "'+S+'" failed when loading definition.');}var Z=this;function aa(ac){var ad=a.dialog._.dialogDefinitions[S],ae=Z.skin.dialog;if(!ae._isLoaded||ab&&typeof ac=='undefined')return;if(typeof ad!='function')a.dialog._.dialogDefinitions[S]='failed';Z.openDialog(S,T);};if(typeof V=='string'){var ab=1;a.scriptLoader.load(a.getUrl(V),aa,null,0,1);}a.skins.load(this,'dialog',aa);return null;}});})();j.add('dialog',{requires:['dialogui']});j.add('styles',{requires:['selection'],init:function(m){m.on('contentDom',function(){m.document.setCustomData('cke_includeReadonly',!m.config.disableReadonlyStyling);});}});a.editor.prototype.attachStyleStateChange=function(m,n){var o=this._.styleStateChangeCallbacks;if(!o){o=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(p){for(var q=0;q<o.length;q++){var r=o[q],s=r.style.checkActive(p.data.path)?1:2;r.fn.call(this,s);}});}o.push({style:m,fn:n});};a.STYLE_BLOCK=1;a.STYLE_INLINE=2;a.STYLE_OBJECT=3;(function(){var m={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},n={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},o=/\s*(?:;\s*|$)/,p=/#\((.+?)\)/g,q=d.walker.bookmark(0,1),r=d.walker.whitespaces(1);a.style=function(T,U){var W=this;if(U){T=e.clone(T);L(T.attributes,U);L(T.styles,U);}var V=W.element=T.element?typeof T.element=='string'?T.element.toLowerCase():T.element:'*';W.type=m[V]?1:n[V]?3:2;if(typeof W.element=='object')W.type=3;W._={definition:T};};a.style.prototype={apply:function(T){S.call(this,T,false);},remove:function(T){S.call(this,T,true);},applyToRange:function(T){var U=this;return(U.applyToRange=U.type==2?t:U.type==1?x:U.type==3?v:null).call(U,T);},removeFromRange:function(T){var U=this;return(U.removeFromRange=U.type==2?u:U.type==1?y:U.type==3?w:null).call(U,T);},applyToObject:function(T){K(T,this);},checkActive:function(T){var Y=this;switch(Y.type){case 1:return Y.checkElementRemovable(T.block||T.blockLimit,true);case 3:case 2:var U=T.elements;for(var V=0,W;V<U.length;V++){W=U[V];if(Y.type==2&&(W==T.block||W==T.blockLimit))continue;if(Y.type==3){var X=W.getName();if(!(typeof Y.element=='string'?X==Y.element:X in Y.element))continue;}if(Y.checkElementRemovable(W,true))return true;}}return false;},checkApplicable:function(T){switch(this.type){case 2:case 1:break;
+case 3:return T.lastElement.getAscendant(this.element,true);}return true;},checkElementRemovable:function(T,U){var ae=this;if(!T||T.isReadOnly())return false;var V=ae._.definition,W,X=T.getName();if(typeof ae.element=='string'?X==ae.element:X in ae.element){if(!U&&!T.hasAttributes())return true;W=M(V);if(W._length){for(var Y in W){if(Y=='_length')continue;var Z=T.getAttribute(Y)||'';if(Y=='style'?R(W[Y],P(Z,false)):W[Y]==Z){if(!U)return true;}else if(U)return false;}if(U)return true;}else return true;}var aa=N(ae)[T.getName()];if(aa){if(!(W=aa.attributes))return true;for(var ab=0;ab<W.length;ab++){Y=W[ab][0];var ac=T.getAttribute(Y);if(ac){var ad=W[ab][1];if(ad===null||typeof ad=='string'&&ac==ad||ad.test(ac))return true;}}}return false;},buildPreview:function(T){var U=this._.definition,V=[],W=U.element;if(W=='bdo')W='span';V=['<',W];var X=U.attributes;if(X)for(var Y in X)V.push(' ',Y,'="',X[Y],'"');var Z=a.style.getStyleText(U);if(Z)V.push(' style="',Z,'"');V.push('>',T||U.name,'</',W,'>');return V.join('');}};a.style.getStyleText=function(T){var U=T._ST;if(U)return U;U=T.styles;var V=T.attributes&&T.attributes.style||'',W='';if(V.length)V=V.replace(o,';');for(var X in U){var Y=U[X],Z=(X+':'+Y).replace(o,';');if(Y=='inherit')W+=Z;else V+=Z;}if(V.length)V=P(V);V+=W;return T._ST=V;};function s(T){var U,V;while(T=T.getParent()){if(T.getName()=='body')break;if(T.getAttribute('data-nostyle'))U=T;else if(!V){var W=T.getAttribute('contentEditable');if(W=='false')U=T;else if(W=='true')V=1;}}return U;};function t(T){var ax=this;var U=T.document;if(T.collapsed){var V=J(ax,U);T.insertNode(V);T.moveToPosition(V,2);return;}var W=ax.element,X=ax._.definition,Y,Z=X.includeReadonly;if(Z==undefined)Z=U.getCustomData('cke_includeReadonly');var aa=f[W]||(Y=true,f.span);T.enlarge(1,1);T.trim();var ab=T.createBookmark(),ac=ab.startNode,ad=ab.endNode,ae=ac,af,ag=s(ac),ah=s(ad);if(ag)ae=ag.getNextSourceNode(true);if(ah)ad=ah;if(ae.getPosition(ad)==2)ae=0;while(ae){var ai=false;if(ae.equals(ad)){ae=null;ai=true;}else{var aj=ae.type,ak=aj==1?ae.getName():null,al=ak&&ae.getAttribute('contentEditable')=='false',am=ak&&ae.getAttribute('data-nostyle');if(ak&&ae.data('cke-bookmark')){ae=ae.getNextSourceNode(true);continue;}if(!ak||aa[ak]&&!am&&(!al||Z)&&(ae.getPosition(ad)|4|0|8)==4+0+8&&(!X.childRule||X.childRule(ae))){var an=ae.getParent();if(an&&((an.getDtd()||f.span)[W]||Y)&&(!X.parentRule||X.parentRule(an))){if(!af&&(!ak||!f.$removeEmpty[ak]||(ae.getPosition(ad)|4|0|8)==4+0+8)){af=new d.range(U);
+af.setStartBefore(ae);}if(aj==3||al||aj==1&&!ae.getChildCount()){var ao=ae,ap;while((ai=!ao.getNext(q))&&(ap=ao.getParent(),aa[ap.getName()])&&(ap.getPosition(ac)|2|0|8)==2+0+8&&(!X.childRule||X.childRule(ap)))ao=ap;af.setEndAfter(ao);}}else ai=true;}else ai=true;ae=ae.getNextSourceNode(am||al);}if(ai&&af&&!af.collapsed){var aq=J(ax,U),ar=aq.hasAttributes(),as=af.getCommonAncestor(),at={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},au,av,aw;while(aq&&as){if(as.getName()==W){for(au in X.attributes){if(at.blockedAttrs[au]||!(aw=as.getAttribute(av)))continue;if(aq.getAttribute(au)==aw)at.attrs[au]=1;else at.blockedAttrs[au]=1;}for(av in X.styles){if(at.blockedStyles[av]||!(aw=as.getStyle(av)))continue;if(aq.getStyle(av)==aw)at.styles[av]=1;else at.blockedStyles[av]=1;}}as=as.getParent();}for(au in at.attrs)aq.removeAttribute(au);for(av in at.styles)aq.removeStyle(av);if(ar&&!aq.hasAttributes())aq=null;if(aq){af.extractContents().appendTo(aq);G(ax,aq);af.insertNode(aq);aq.mergeSiblings();if(!c)aq.$.normalize();}else{aq=new h('span');af.extractContents().appendTo(aq);af.insertNode(aq);G(ax,aq);aq.remove(true);}af=null;}}T.moveToBookmark(ab);T.shrink(2);};function u(T){T.enlarge(1,1);var U=T.createBookmark(),V=U.startNode;if(T.collapsed){var W=new d.elementPath(V.getParent()),X;for(var Y=0,Z;Y<W.elements.length&&(Z=W.elements[Y]);Y++){if(Z==W.block||Z==W.blockLimit)break;if(this.checkElementRemovable(Z)){var aa;if(T.collapsed&&(T.checkBoundaryOfElement(Z,2)||(aa=T.checkBoundaryOfElement(Z,1)))){X=Z;X.match=aa?'start':'end';}else{Z.mergeSiblings();if(Z.getName()==this.element)F(this,Z);else H(Z,N(this)[Z.getName()]);}}}if(X){var ab=V;for(Y=0;true;Y++){var ac=W.elements[Y];if(ac.equals(X))break;else if(ac.match)continue;else ac=ac.clone();ac.append(ab);ab=ac;}ab[X.match=='start'?'insertBefore':'insertAfter'](X);}}else{var ad=U.endNode,ae=this;function af(){var ai=new d.elementPath(V.getParent()),aj=new d.elementPath(ad.getParent()),ak=null,al=null;for(var am=0;am<ai.elements.length;am++){var an=ai.elements[am];if(an==ai.block||an==ai.blockLimit)break;if(ae.checkElementRemovable(an))ak=an;}for(am=0;am<aj.elements.length;am++){an=aj.elements[am];if(an==aj.block||an==aj.blockLimit)break;if(ae.checkElementRemovable(an))al=an;}if(al)ad.breakParent(al);if(ak)V.breakParent(ak);};af();var ag=V.getNext();while(!ag.equals(ad)){var ah=ag.getNextSourceNode();if(ag.type==1&&this.checkElementRemovable(ag)){if(ag.getName()==this.element)F(this,ag);else H(ag,N(this)[ag.getName()]);
+if(ah.type==1&&ah.contains(V)){af();ah=V.getNext();}}ag=ah;}}T.moveToBookmark(U);};function v(T){var U=T.getCommonAncestor(true,true),V=U.getAscendant(this.element,true);V&&!V.isReadOnly()&&K(V,this);};function w(T){var U=T.getCommonAncestor(true,true),V=U.getAscendant(this.element,true);if(!V)return;var W=this,X=W._.definition,Y=X.attributes,Z=a.style.getStyleText(X);if(Y)for(var aa in Y)V.removeAttribute(aa,Y[aa]);if(X.styles)for(var ab in X.styles){if(!X.styles.hasOwnProperty(ab))continue;V.removeStyle(ab);}};function x(T){var U=T.createBookmark(true),V=T.createIterator();V.enforceRealBlocks=true;if(this._.enterMode)V.enlargeBr=this._.enterMode!=2;var W,X=T.document,Y;while(W=V.getNextParagraph()){if(!W.isReadOnly()){var Z=J(this,X,W);z(W,Z);}}T.moveToBookmark(U);};function y(T){var Y=this;var U=T.createBookmark(1),V=T.createIterator();V.enforceRealBlocks=true;V.enlargeBr=Y._.enterMode!=2;var W;while(W=V.getNextParagraph()){if(Y.checkElementRemovable(W))if(W.is('pre')){var X=Y._.enterMode==2?null:T.document.createElement(Y._.enterMode==1?'p':'div');X&&W.copyAttributes(X);z(W,X);}else F(Y,W,1);}T.moveToBookmark(U);};function z(T,U){var V=!U;if(V){U=T.getDocument().createElement('div');T.copyAttributes(U);}var W=U&&U.is('pre'),X=T.is('pre'),Y=W&&!X,Z=!W&&X;if(Y)U=E(T,U);else if(Z)U=D(V?[T.getHtml()]:B(T),U);else T.moveChildren(U);U.replace(T);if(W)A(U);else if(V)I(U);};function A(T){var U;if(!((U=T.getPrevious(r))&&U.is&&U.is('pre')))return;var V=C(U.getHtml(),/\n$/,'')+'\n\n'+C(T.getHtml(),/^\n/,'');if(c)T.$.outerHTML='<pre>'+V+'</pre>';else T.setHtml(V);U.remove();};function B(T){var U=/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=C(T.getOuterHtml(),U,function(Y,Z,aa){return Z+'</pre>'+aa+'<pre>';}),X=[];W.replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W<T.length;W++){var X=T[W];X=X.replace(/(\r\n|\r)/g,'\n');X=C(X,/^[ \t]*\n/,'');X=C(X,/\n$/,'');X=C(X,/^[ \t]+|[ \t]+$/g,function(Z,aa,ab){if(Z.length==1)return ' ';else if(!aa)return e.repeat(' ',Z.length-1)+' ';else return ' '+e.repeat(' ',Z.length-1);});X=X.replace(/\n/g,'<br>');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';
+});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/<br\b[^>]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='<pre>'+W+'</pre>';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=e.extend({},V.attributes,N(T)[U.getName()]),X=V.styles,Y=e.isEmpty(W)&&e.isEmpty(X);for(var Z in W){if((Z=='class'||T._.definition.fullMatch)&&U.getAttribute(Z)!=O(Z,W[Z]))continue;Y=U.hasAttribute(Z);U.removeAttribute(Z);}for(var aa in X){if(T._.definition.fullMatch&&U.getStyle(aa)!=O(aa,X[aa],true))continue;Y=Y||!!U.getStyle(aa);U.removeStyle(aa);}if(Y)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U){var V=U&&U.attributes;if(V)for(var W=0;W<V.length;W++){var X=V[W][0],Y;if(Y=T.getAttribute(X)){var Z=V[W][1];if(Z===null||Z.test&&Z.test(Y)||typeof Z=='string'&&Y==Z)T.removeAttribute(X);}}I(T);};function I(T){if(!T.hasAttributes())if(f.$block[T.getName()]){var U=T.getPrevious(r),V=T.getNext(r);if(U&&(U.type==3||!U.isBlockBoundary({br:1})))T.append('br',1);if(V&&(V.type==3||!V.isBlockBoundary({br:1})))T.append('br');T.remove(true);}else{var W=T.getFirst(),X=T.getLast();T.remove(true);if(W){W.type==1&&W.mergeSiblings();if(X&&!W.equals(X)&&X.type==1)X.mergeSiblings();}}};function J(T,U,V){var W,X=T._.definition,Y=T.element;if(Y=='*')Y='span';W=new h(Y,U);if(V)V.copyAttributes(W);W=K(W,T);if(U.getCustomData('doc_processing_style')&&W.hasAttribute('id'))W.removeAttribute('id');else U.setCustomData('doc_processing_style',1);return W;};function K(T,U){var V=U._.definition,W=V.attributes,X=a.style.getStyleText(V);if(W)for(var Y in W)T.setAttribute(Y,W[Y]);if(X)T.setAttribute('style',X);return T;};function L(T,U){for(var V in T)T[V]=T[V].replace(p,function(W,X){return U[X];});};function M(T){var U=T._AC;if(U)return U;U={};var V=0,W=T.attributes;if(W)for(var X in W){V++;U[X]=W[X];}var Y=a.style.getStyleText(T);
+if(Y){if(!U.style)V++;U.style=Y;}U._length=V;return T._AC=U;};function N(T){if(T._.overrides)return T._.overrides;var U=T._.overrides={},V=T._.definition.overrides;if(V){if(!e.isArray(V))V=[V];for(var W=0;W<V.length;W++){var X=V[W],Y,Z,aa;if(typeof X=='string')Y=X.toLowerCase();else{Y=X.element?X.element.toLowerCase():T.element;aa=X.attributes;}Z=U[Y]||(U[Y]={});if(aa){var ab=Z.attributes=Z.attributes||[];for(var ac in aa)ab.push([ac.toLowerCase(),aa[ac]]);}}}return U;};function O(T,U,V){var W=new h('span');W[V?'setStyle':'setAttribute'](T,U);return W[V?'getStyle':'getAttribute'](T);};function P(T,U){var V;if(U!==false){var W=new h('span');W.setAttribute('style',T);V=W.getAttribute('style')||'';}else V=T;V=V.replace(/(font-family:)(.*?)(?=;|$)/,function(X,Y,Z){var aa=Z.split(',');for(var ab=0;ab<aa.length;ab++)aa[ab]=e.trim(aa[ab].replace(/["']/g,''));return Y+aa.join(',');});return V.replace(/\s*([;:])\s*/,'$1').replace(/([^\s;])$/,'$1;').replace(/,\s+/g,',').replace(/\"/g,'').toLowerCase();};function Q(T){var U={};T.replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(V,W,X){U[W]=X;});return U;};function R(T,U){typeof T=='string'&&(T=Q(T));typeof U=='string'&&(U=Q(U));for(var V in T){if(!(V in U&&(U[V]==T[V]||T[V]=='inherit'||U[V]=='inherit')))return false;}return true;};function S(T,U){var V=T.getSelection(),W=V.createBookmarks(1),X=V.getRanges(),Y=U?this.removeFromRange:this.applyToRange,Z,aa=X.createIterator();while(Z=aa.getNextRange())Y.call(this,Z);if(W.length==1&&W[0].collapsed){V.selectRanges(X);T.getById(W[0].startNode).remove();}else V.selectBookmarks(W);T.removeCustomData('doc_processing_style');};})();a.styleCommand=function(m){this.style=m;};a.styleCommand.prototype.exec=function(m){var o=this;m.focus();var n=m.document;if(n)if(o.state==2)o.style.apply(n);else if(o.state==1)o.style.remove(n);return!!n;};a.stylesSet=new a.resourceManager('','stylesSet');a.addStylesSet=e.bind(a.stylesSet.add,a.stylesSet);a.loadStylesSet=function(m,n,o){a.stylesSet.addExternal(m,n,'');a.stylesSet.load(m,o);};a.editor.prototype.getStylesSet=function(m){if(!this._.stylesDefinitions){var n=this,o=n.config.stylesCombo_stylesSet||n.config.stylesSet||'default';if(o instanceof Array){n._.stylesDefinitions=o;m(o);return;}var p=o.split(':'),q=p[0],r=p[1],s=j.registered.styles.path;a.stylesSet.addExternal(q,r?p.slice(1).join(':'):s+'styles/'+q+'.js','');a.stylesSet.load(q,function(t){n._.stylesDefinitions=t[q];m(n._.stylesDefinitions);});}else m(this._.stylesDefinitions);
+};j.add('domiterator');(function(){function m(s){var t=this;if(arguments.length<1)return;t.range=s;t.forceBrBreak=0;t.enlargeBr=1;t.enforceRealBlocks=0;t._||(t._={});};var n=/^[\r\n\t ]+$/,o=d.walker.bookmark(false,true),p=d.walker.whitespaces(true),q=function(s){return o(s)&&p(s);};function r(s,t,u){var v=s.getNextSourceNode(t,null,u);while(!o(v))v=v.getNextSourceNode(t,null,u);return v;};m.prototype={getNextParagraph:function(s){var S=this;var t,u,v,w,x,y;if(!S._.lastNode){u=S.range.clone();u.shrink(1,true);w=u.endContainer.hasAscendant('pre',true)||u.startContainer.hasAscendant('pre',true);u.enlarge(S.forceBrBreak&&!w||!S.enlargeBr?3:2);var z=new d.walker(u),A=d.walker.bookmark(true,true);z.evaluator=A;S._.nextNode=z.next();z=new d.walker(u);z.evaluator=A;var B=z.previous();S._.lastNode=B.getNextSourceNode(true);if(S._.lastNode&&S._.lastNode.type==3&&!e.trim(S._.lastNode.getText())&&S._.lastNode.getParent().isBlockBoundary()){var C=new d.range(u.document);C.moveToPosition(S._.lastNode,4);if(C.checkEndOfBlock()){var D=new d.elementPath(C.endContainer),E=D.block||D.blockLimit;S._.lastNode=E.getNextSourceNode(true);}}if(!S._.lastNode){S._.lastNode=S._.docEndMarker=u.document.createText('');S._.lastNode.insertAfter(B);}u=null;}var F=S._.nextNode;B=S._.lastNode;S._.nextNode=null;while(F){var G=0,H=F.hasAscendant('pre'),I=F.type!=1,J=0;if(!I){var K=F.getName();if(F.isBlockBoundary(S.forceBrBreak&&!H&&{br:1})){if(K=='br')I=1;else if(!u&&!F.getChildCount()&&K!='hr'){t=F;v=F.equals(B);break;}if(u){u.setEndAt(F,3);if(K!='br')S._.nextNode=F;}G=1;}else{if(F.getFirst()){if(!u){u=new d.range(S.range.document);u.setStartAt(F,3);}F=F.getFirst();continue;}I=1;}}else if(F.type==3)if(n.test(F.getText()))I=0;if(I&&!u){u=new d.range(S.range.document);u.setStartAt(F,3);}v=(!G||I)&&F.equals(B);if(u&&!G)while(!F.getNext(q)&&!v){var L=F.getParent();if(L.isBlockBoundary(S.forceBrBreak&&!H&&{br:1})){G=1;I=0;v=v||L.equals(B);u.setEndAt(L,2);break;}F=L;I=1;v=F.equals(B);J=1;}if(I)u.setEndAt(F,4);F=r(F,J,B);v=!F;if(v||G&&u)break;}if(!t){if(!u){S._.docEndMarker&&S._.docEndMarker.remove();S._.nextNode=null;return null;}var M=new d.elementPath(u.startContainer),N=M.blockLimit,O={div:1,th:1,td:1};t=M.block;if(!t&&!S.enforceRealBlocks&&O[N.getName()]&&u.checkStartOfBlock()&&u.checkEndOfBlock())t=N;else if(!t||S.enforceRealBlocks&&t.getName()=='li'){t=S.range.document.createElement(s||'p');u.extractContents().appendTo(t);t.trim();u.insertNode(t);x=y=true;}else if(t.getName()!='li'){if(!u.checkStartOfBlock()||!u.checkEndOfBlock()){t=t.clone(false);
+u.extractContents().appendTo(t);t.trim();var P=u.splitBlock();x=!P.wasStartOfBlock;y=!P.wasEndOfBlock;u.insertNode(t);}}else if(!v)S._.nextNode=t.equals(B)?null:r(u.getBoundaryNodes().endNode,1,B);}if(x){var Q=t.getPrevious();if(Q&&Q.type==1)if(Q.getName()=='br')Q.remove();else if(Q.getLast()&&Q.getLast().$.nodeName.toLowerCase()=='br')Q.getLast().remove();}if(y){var R=t.getLast();if(R&&R.type==1&&R.getName()=='br')if(c||R.getPrevious(o)||R.getNext(o))R.remove();}if(!S._.nextNode)S._.nextNode=v||t.equals(B)?null:r(t,1,B);return t;}};d.range.prototype.createIterator=function(){return new m(this);};})();j.add('panelbutton',{requires:['button'],onLoad:function(){function m(n){var p=this;var o=p._;if(o.state==0)return;p.createPanel(n);if(o.on){o.panel.hide();return;}o.panel.showBlock(p._.id,p.document.getById(p._.id),4);};k.panelButton=e.createClass({base:k.button,$:function(n){var p=this;var o=n.panel;delete n.panel;p.base(n);p.document=o&&o.parent&&o.parent.getDocument()||a.document;o.block={attributes:o.attributes};p.hasArrow=true;p.click=m;p._={panelDefinition:o};},statics:{handler:{create:function(n){return new k.panelButton(n);}}},proto:{createPanel:function(n){var o=this._;if(o.panel)return;var p=this._.panelDefinition||{},q=this._.panelDefinition.block,r=p.parent||a.document.getBody(),s=this._.panel=new k.floatPanel(n,r,p),t=s.addBlock(o.id,q),u=this;s.onShow=function(){if(u.className)this.element.getFirst().addClass(u.className+'_panel');u.setState(1);o.on=1;if(u.onOpen)u.onOpen();};s.onHide=function(v){if(u.className)this.element.getFirst().removeClass(u.className+'_panel');u.setState(u.modes&&u.modes[n.mode]?2:0);o.on=0;if(!v&&u.onClose)u.onClose();};s.onEscape=function(){s.hide();u.document.getById(o.id).focus();};if(this.onBlock)this.onBlock(s,t);t.onHide=function(){o.on=0;u.setState(2);};}}});},beforeInit:function(m){m.ui.addHandler('panelbutton',k.panelButton.handler);}});a.UI_PANELBUTTON='panelbutton';j.add('floatpanel',{requires:['panel']});(function(){var m={},n=false;function o(p,q,r,s,t){var u=e.genKey(q.getUniqueId(),r.getUniqueId(),p.skinName,p.lang.dir,p.uiColor||'',s.css||'',t||''),v=m[u];if(!v){v=m[u]=new k.panel(q,s);v.element=r.append(h.createFromHtml(v.renderHtml(p),q));v.element.setStyles({display:'none',position:'absolute'});}return v;};k.floatPanel=e.createClass({$:function(p,q,r,s){r.forceIFrame=1;var t=q.getDocument(),u=o(p,t,q,r,s||0),v=u.element,w=v.getFirst().getFirst();this.element=v;this._={editor:p,panel:u,parentElement:q,definition:r,document:t,iframe:w,children:[],dir:p.lang.dir};
+p.on('mode',function(){this.hide();},this);},proto:{addBlock:function(p,q){return this._.panel.addBlock(p,q);},addListBlock:function(p,q){return this._.panel.addListBlock(p,q);},getBlock:function(p){return this._.panel.getBlock(p);},showBlock:function(p,q,r,s,t){var u=this._.panel,v=u.showBlock(p);this.allowBlur(false);n=1;this._.returnFocus=this._.editor.focusManager.hasFocus?this._.editor:new h(a.document.$.activeElement);var w=this.element,x=this._.iframe,y=this._.definition,z=q.getDocumentPosition(w.getDocument()),A=this._.dir=='rtl',B=z.x+(s||0),C=z.y+(t||0);if(A&&(r==1||r==4))B+=q.$.offsetWidth;else if(!A&&(r==2||r==3))B+=q.$.offsetWidth-1;if(r==3||r==4)C+=q.$.offsetHeight-1;this._.panel._.offsetParentId=q.getId();w.setStyles({top:C+'px',left:0,display:''});w.setOpacity(0);w.getFirst().removeStyle('width');if(!this._.blurSet){var D=c?x:new d.window(x.$.contentWindow);a.event.useCapture=true;D.on('blur',function(E){var G=this;if(!G.allowBlur())return;var F=E.data.getTarget();if(F.getName&&F.getName()!='iframe')return;if(G.visible&&!G._.activeChild&&!n){delete G._.returnFocus;G.hide();}},this);D.on('focus',function(){this._.focused=true;this.hideChild();this.allowBlur(true);},this);a.event.useCapture=false;this._.blurSet=1;}u.onEscape=e.bind(function(E){if(this.onEscape&&this.onEscape(E)===false)return false;},this);e.setTimeout(function(){if(A)B-=w.$.offsetWidth;var E=e.bind(function(){var F=w.getFirst();if(v.autoSize){var G=v.element.$;if(b.gecko||b.opera)G=G.parentNode;if(c)G=G.document.body;var H=G.scrollWidth;if(c&&b.quirks&&H>0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0)+3;H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0)+3;F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');var J=u.element,K=J.getWindow(),L=K.getScrollPosition(),M=K.getViewPaneSize(),N={height:J.$.offsetHeight,width:J.$.offsetWidth};if(A?B<0:B+N.width>M.width+L.x)B+=N.width*(A?1:-1);if(C+N.height>M.height+L.y)C-=N.height;if(c){var O=new h(w.$.offsetParent),P=O;if(P.getName()=='html')P=P.getDocument().getBody();if(P.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=O.$.scrollWidth-O.$.clientWidth;}var Q=w.getFirst(),R;if(R=Q.getCustomData('activePanel'))R.onHide&&R.onHide.call(this,1);Q.setCustomData('activePanel',this);
+w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(p){var r=this;if(r.visible&&(!r.onHide||r.onHide.call(r)!==true)){r.hideChild();b.gecko&&r._.iframe.getFrameDocument().$.activeElement.blur();r.element.setStyle('display','none');r.visible=0;r.element.getFirst().removeCustomData('activePanel');var q=p!==false&&r._.returnFocus;if(q){if(b.webkit&&q.type)q.getWindow().$.focus();q.focus();}}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete p._.returnFocus;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q<n.length;q++)o[n[q]]=q+1;m.addMenuGroup=function(r,s){o[r]=s||100;};m.addMenuItem=function(r,s){if(o[s.group])p[r]=new a.menuItem(this,r,s);};m.addMenuItems=function(r){for(var s in r)this.addMenuItem(s,r[s]);};m.getMenuItem=function(r){return p[r];};m.removeMenuItem=function(r){delete p[r];};},requires:['floatpanel']});(function(){a.menu=e.createClass({$:function(n,o){var r=this;o=r._.definition=o||{};r.id=e.getNextId();r.editor=n;r.items=[];r._.listeners=[];r._.level=o.level||1;var p=e.extend({},o.panel,{css:n.skin.editor.css,level:r._.level-1,block:{}}),q=p.block.attributes=p.attributes||{};!q.role&&(q.role='menu');r._.panelDefinition=p;},_:{onShow:function(){var v=this;var n=v.editor.getSelection();if(c)n&&n.lock();var o=n&&n.getStartElement(),p=v._.listeners,q=[];v.removeAll();for(var r=0;r<p.length;r++){var s=p[r](o,n);if(s)for(var t in s){var u=v.editor.getMenuItem(t);if(u&&(!u.command||v.editor.getCommand(u.command).state)){u.state=s[t];v.add(u);}}}},onClick:function(n){this.hide(false);
+if(n.onClick)n.onClick();else if(n.command)this.editor.execCommand(n.command);},onEscape:function(n){var o=this.parent;if(o){o._.panel.hideChild();var p=o._.panel._.panel._.currentBlock,q=p._.focusIndex;p._.markItem(q);}else if(n==27)this.hide();return false;},onHide:function(){if(c){var n=this.editor.getSelection();n&&n.unlock();}this.onHide&&this.onHide();},showSubMenu:function(n){var v=this;var o=v._.subMenu,p=v.items[n],q=p.getItems&&p.getItems();if(!q){v._.panel.hideChild();return;}var r=v._.panel.getBlock(v.id);r._.focusIndex=n;if(o)o.removeAll();else{o=v._.subMenu=new a.menu(v.editor,e.extend({},v._.definition,{level:v._.level+1},true));o.parent=v;o._.onClick=e.bind(v._.onClick,v);}for(var s in q){var t=v.editor.getMenuItem(s);if(t){t.state=q[s];o.add(t);}}var u=v._.panel.getBlock(v.id).element.getDocument().getById(v.id+String(n));o.show(u,2);}},proto:{add:function(n){if(!n.order)n.order=this.items.length;this.items.push(n);},removeAll:function(){this.items=[];},show:function(n,o,p,q){if(!this.parent){this._.onShow();if(!this.items.length)return;}o=o||(this.editor.lang.dir=='rtl'?2:1);var r=this.items,s=this.editor,t=this._.panel,u=this._.element;if(!t){t=this._.panel=new k.floatPanel(this.editor,a.document.getBody(),this._.panelDefinition,this._.level);t.onEscape=e.bind(function(F){if(this._.onEscape(F)===false)return false;},this);t.onHide=e.bind(function(){this._.onHide&&this._.onHide();},this);var v=t.addBlock(this.id,this._.panelDefinition.block);v.autoSize=true;var w=v.keys;w[40]='next';w[9]='next';w[38]='prev';w[2228224+9]='prev';w[s.lang.dir=='rtl'?37:39]=c?'mouseup':'click';w[32]=c?'mouseup':'click';c&&(w[13]='mouseup');u=this._.element=v.element;u.addClass(s.skinClass);var x=u.getDocument();x.getBody().setStyle('overflow','hidden');x.getElementsByTag('html').getItem(0).setStyle('overflow','hidden');this._.itemOverFn=e.addFunction(function(F){var G=this;clearTimeout(G._.showSubTimeout);G._.showSubTimeout=e.setTimeout(G._.showSubMenu,s.config.menu_subMenuDelay||400,G,[F]);},this);this._.itemOutFn=e.addFunction(function(F){clearTimeout(this._.showSubTimeout);},this);this._.itemClickFn=e.addFunction(function(F){var H=this;var G=H.items[F];if(G.state==0){H.hide();return;}if(G.getItems)H._.showSubMenu(F);else H._.onClick(G);},this);}m(r);var y=s.container.getChild(1),z=y.hasClass('cke_mixed_dir_content')?' cke_mixed_dir_content':'',A=['<div class="cke_menu'+z+'" role="presentation">'],B=r.length,C=B&&r[0].group;for(var D=0;D<B;D++){var E=r[D];if(C!=E.group){A.push('<div class="cke_menuseparator" role="separator"></div>');
+C=E.group;}E.render(this,D,A);}A.push('</div>');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(n){var o=this;o._.onHide&&o._.onHide();o._.panel&&o._.panel.hide(n);}}});function m(n){n.sort(function(o,p){if(o.group<p.group)return-1;else if(o.group>p.group)return 1;return o.order<p.order?-1:o.order>p.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push('<span class="cke_menuitem'+(w.icon&&w.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">'+'<a id="',q,'" class="',s,'" href="javascript:void(\'',(w.label||'').replace("'",''),'\')" title="',w.label,'" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem"'+(u?'aria-haspopup="true"':'')+(r==0?'aria-disabled="true"':'')+(r==1?'aria-pressed="true"':''));if(b.opera||b.gecko&&b.mac)p.push(' onkeypress="return false;"');if(b.gecko)p.push(' onblur="this.style.cssText = this.style.cssText;"');var v=(w.iconOffset||0)*-16;p.push(' onmouseover="CKEDITOR.tools.callFunction(',n._.itemOverFn,',',o,');" onmouseout="CKEDITOR.tools.callFunction(',n._.itemOutFn,',',o,');" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',n._.itemClickFn,',',o,'); return false;"><span class="cke_icon_wrapper"><span class="cke_icon"'+(w.icon?' style="background-image:url('+a.getUrl(w.icon)+');background-position:0 '+v+'px;"':'')+'></span></span>'+'<span class="cke_label">');if(u)p.push('<span class="cke_menuarrow">','<span>&#',w.editor.lang.dir=='rtl'?'9668':'9658',';</span>','</span>');p.push(t,'</span></a></span>');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='<br>';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);
+});n.on('afterSetData',function(){if(!m){function o(){m=true;n.getMode().loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){if(n.mode){o();n.removeListener('mode',arguments.callee);}});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(n.getMode().getData(),null,1);m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=n.getMode().getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)n.getMode().loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();b.webkit&&n.container.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);},0);});n.on('destroy',function(){var o=this;if(o.mode)o._.modes[o.mode].unload(o.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){this.fire('beforeSetMode',{newMode:n});var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=this.getMode();o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=this.getMode(n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.getMode=function(n){return this._.modes&&this._.modes[n||this.mode];};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var n=this.getMode();if(n)n.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var B=this;try{var y=B.getSelection();if(!y||!y.document.getWindow().$)return;var z=y.getStartElement(),A=new d.elementPath(z);if(!A.compare(B._.selectionPreviousPath)){B._.selectionPreviousPath=A;B.fire('selectionChange',{selection:y,path:A,element:z});}}catch(C){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};function r(y){function z(D){return D&&D.type==1&&D.getName() in f.$removeEmpty;};function A(D){var E=y.document.getBody();return!D.is('body')&&E.getChildCount()==1;};var B=y.startContainer,C=y.startOffset;if(B.type==3)return false;return!e.trim(B.getHtml())?z(B)||A(B):z(B.getChild(C-1))||z(B.getChild(C));};var s={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(y){switch(y.mode){case 'wysiwyg':y.document.$.execCommand('SelectAll',false,null);
+y.forceNextSelectionCheck();y.selectionChange();break;case 'source':var z=y.textarea.$;if(c)z.createTextRange().execCommand('SelectAll');else{z.selectionStart=0;z.selectionEnd=z.value.length;}z.focus();}},canUndo:false};function t(y){w(y);var z=y.createText('​');y.setCustomData('cke-fillingChar',z);return z;};function u(y){return y&&y.getCustomData('cke-fillingChar');};function v(y){var z=y&&u(y);if(z)if(z.getCustomData('ready'))w(y);else z.setCustomData('ready',1);};function w(y){var z=y&&y.removeCustomData('cke-fillingChar');if(z){z.setText(z.getText().replace(/\u200B/g,''));z=0;}};j.add('selection',{init:function(y){if(b.webkit){y.on('selectionChange',function(){v(y.document);});y.on('beforeSetMode',function(){w(y.document);});y.on('key',function(D){switch(D.data.keyCode){case 13:case 2228224+13:case 37:case 39:case 8:w(y.document);}},null,null,10);var z,A;function B(){var D=y.document,E=u(D);if(E){var F=D.$.defaultView.getSelection();if(F.type=='Caret'&&F.anchorNode==E.$)A=1;z=E.getText();E.setText(z.replace(/\u200B/g,''));}};function C(){var D=y.document,E=u(D);if(E){E.setText(z);if(A){D.$.defaultView.getSelection().setPosition(E.$,E.getLength());A=0;}}};y.on('beforeUndoImage',B);y.on('afterUndoImage',C);y.on('beforeGetData',B,null,null,0);y.on('getData',C);}y.on('contentDom',function(){var D=y.document,E=D.getBody(),F=D.getDocumentElement();if(c){var G,H,I=1;E.on('focusin',function(M){if(M.data.$.srcElement.nodeName!='BODY')return;if(G){if(I){try{G.select();}catch(O){}var N=D.getCustomData('cke_locked_selection');if(N){N.unlock();N.lock();}}G=null;}});E.on('focus',function(){H=1;L();});E.on('beforedeactivate',function(M){if(M.data.$.toElement)return;H=0;I=1;});if(c&&b.version<8)y.on('blur',function(M){try{y.document&&y.document.$.selection.empty();}catch(N){}});F.on('mousedown',function(){I=0;});F.on('mouseup',function(){I=1;});if(c&&(b.ie7Compat||b.version<8||b.quirks))F.on('click',function(M){if(M.data.getTarget().getName()=='html')y.getSelection().getRanges()[0].select();});var J;E.on('mousedown',function(M){if(M.data.$.button==2){var N=y.document.$.selection;if(N.type=='None')J=y.window.getScrollPosition();}K();});E.on('mouseup',function(M){if(M.data.$.button==2&&J){y.document.$.documentElement.scrollLeft=J.x;y.document.$.documentElement.scrollTop=J.y;}J=null;H=1;setTimeout(function(){L(true);},0);});E.on('keydown',K);E.on('keyup',function(){H=1;L();});D.on('selectionchange',L);function K(){H=0;};function L(M){if(H){var N=y.document,O=y.getSelection(),P=O&&O.getNative();
+if(M&&P&&P.type=='None')if(!N.$.queryCommandEnabled('InsertImage')){e.setTimeout(L,50,this,true);return;}var Q;if(P&&P.type&&P.type!='Control'&&(Q=P.createRange())&&(Q=Q.parentElement())&&(Q=Q.nodeName)&&Q.toLowerCase() in {input:1,textarea:1})return;G=P&&O.getRanges()[0];p.call(y);}};}else{D.on('mouseup',p,y);D.on('keyup',p,y);}});y.on('contentDomUnload',y.forceNextSelectionCheck,y);y.addCommand('selectAll',s);y.ui.addButton('SelectAll',{label:y.lang.selectAll,command:'selectAll'});y.selectionChange=p;b.ie9Compat&&y.on('destroy',function(){var D=y.getSelection();D&&D.getNative().clear();},null,null,9);}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var y=new d.selection(this);return!y||y.isInvalid?null:y;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(y){var B=this;var z=y.getCustomData('cke_locked_selection');if(z)return z;B.document=y;B.isLocked=0;B._={cache:{}};if(c){var A=B.getNative().createRange();if(!A||A.item&&A.item(0).ownerDocument!=B.document.$||A.parentElement&&A.parentElement().ownerDocument!=B.document.$)B.isInvalid=true;}return B;};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var y=this._.cache;if(y.type)return y.type;var z=1;try{var A=this.getNative(),B=A.type;if(B=='Text')z=2;if(B=='Control')z=3;if(A.createRange().parentElement)z=2;}catch(C){}return y.type=z;}:function(){var y=this._.cache;if(y.type)return y.type;var z=2,A=this.getNative();if(!A)z=1;else if(A.rangeCount==1){var B=A.getRangeAt(0),C=B.startContainer;if(C==B.endContainer&&C.nodeType==1&&B.endOffset-B.startOffset==1&&x[C.childNodes[B.startOffset].nodeName.toLowerCase()])z=3;}return y.type=z;},getRanges:(function(){var y=c?(function(){function z(B){return new d.node(B).getIndex();};var A=function(B,C){B=B.duplicate();B.collapse(C);var D=B.parentElement(),E=D.ownerDocument;if(!D.hasChildNodes())return{container:D,offset:0};var F=D.children,G,H,I=B.duplicate(),J=0,K=F.length-1,L=-1,M,N;while(J<=K){L=Math.floor((J+K)/2);
+G=F[L];I.moveToElementText(G);M=I.compareEndPoints('StartToStart',B);if(M>0)K=L-1;else if(M<0)J=L+1;else if(b.ie9Compat&&G.tagName=='BR'){var O='cke_range_marker';B.execCommand('CreateBookmark',false,O);G=E.getElementsByName(O)[0];var P=z(G);D.removeChild(G);return{container:D,offset:P};}else return{container:D,offset:z(G)};}if(L==-1||L==F.length-1&&M<0){I.moveToElementText(D);I.setEndPoint('StartToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;F=D.childNodes;if(!N){G=F[F.length-1];if(G.nodeType==1)return{container:D,offset:F.length};else return{container:G,offset:G.nodeValue.length};}var Q=F.length;while(N>0)N-=F[--Q].nodeValue.length;return{container:F[Q],offset:-N};}else{I.collapse(M>0?true:false);I.setEndPoint(M>0?'StartToStart':'EndToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;if(!N)return{container:D,offset:z(G)+(M>0?0:1)};while(N>0)try{H=G[M>0?'previousSibling':'nextSibling'];N-=H.nodeValue.length;G=H;}catch(R){return{container:D,offset:z(G)};}return{container:G,offset:M>0?-N:G.nodeValue.length+N};}};return function(){var L=this;var B=L.getNative(),C=B&&B.createRange(),D=L.getType(),E;if(!B)return[];if(D==2){E=new d.range(L.document);var F=A(C,true);E.setStart(new d.node(F.container),F.offset);F=A(C);E.setEnd(new d.node(F.container),F.offset);if(E.endContainer.getPosition(E.startContainer)&4&&E.endOffset<=E.startContainer.getIndex())E.collapse();return[E];}else if(D==3){var G=[];for(var H=0;H<C.length;H++){var I=C.item(H),J=I.parentNode,K=0;E=new d.range(L.document);for(;K<J.childNodes.length&&J.childNodes[K]!=I;K++){}E.setStart(new d.node(J),K);E.setEnd(new d.node(J),K+1);G.push(E);}return G;}return[];};})():function(){var z=[],A,B=this.document,C=this.getNative();if(!C)return z;if(!C.rangeCount){A=new d.range(B);A.moveToElementEditStart(B.getBody());z.push(A);}for(var D=0;D<C.rangeCount;D++){var E=C.getRangeAt(D);A=new d.range(B);A.setStart(new d.node(E.startContainer),E.startOffset);A.setEnd(new d.node(E.endContainer),E.endOffset);z.push(A);}return z;};return function(z){var A=this._.cache;if(A.ranges&&!z)return A.ranges;else if(!A.ranges)A.ranges=new d.rangeList(y.call(this));if(z){var B=A.ranges;for(var C=0;C<B.length;C++){var D=B[C],E=D.getCommonAncestor();if(E.isReadOnly())B.splice(C,1);if(D.collapsed)continue;var F=D.startContainer,G=D.endContainer,H=D.startOffset,I=D.endOffset,J=D.clone(),K;if(K=F.isReadOnly())D.setStartAfter(K);if(F&&F.type==3)if(H>=F.getLength())J.setStartAfter(F);else J.setStartBefore(F);if(G&&G.type==3)if(!I)J.setEndBefore(G);
+else J.setEndAfter(G);var L=new d.walker(J);L.evaluator=function(M){if(M.type==1&&M.isReadOnly()){var N=D.clone();D.setEndBefore(M);if(D.collapsed)B.splice(C--,1);if(!(M.getPosition(J.endContainer)&16)){N.setStartAfter(M);if(!N.collapsed)B.splice(C+1,0,N);}return true;}return false;};L.next();}}return A.ranges;};})(),getStartElement:function(){var F=this;var y=F._.cache;if(y.startElement!==undefined)return y.startElement;var z,A=F.getNative();switch(F.getType()){case 3:return F.getSelectedElement();case 2:var B=F.getRanges()[0];if(B){if(!B.collapsed){B.optimize();while(1){var C=B.startContainer,D=B.startOffset;if(D==(C.getChildCount?C.getChildCount():C.getLength())&&!C.isBlockBoundary())B.setStartAfter(C);else break;}z=B.startContainer;if(z.type!=1)return z.getParent();z=z.getChild(B.startOffset);if(!z||z.type!=1)z=B.startContainer;else{var E=z.getFirst();while(E&&E.type==1){z=E;E=E.getFirst();}}}else{z=B.startContainer;if(z.type!=1)z=z.getParent();}z=z.$;}}return y.startElement=z?new h(z):null;},getSelectedElement:function(){var y=this._.cache;if(y.selectedElement!==undefined)return y.selectedElement;var z=this,A=e.tryThese(function(){return z.getNative().createRange().item(0);},function(){var B=z.getRanges()[0],C,D;for(var E=2;E&&!((C=B.getEnclosedNode())&&C.type==1&&x[C.getName()]&&(D=C));E--)B.shrink(1);return D.$;});return y.selectedElement=A?new h(A):null;},getSelectedText:function(){var y=this._.cache;if(y.selectedText!==undefined)return y.selectedText;var z='',A=this.getNative();if(this.getType()==2)z=c?A.createRange().text:A.toString();return y.selectedText=z;},lock:function(){var y=this;y.getRanges();y.getStartElement();y.getSelectedElement();y.getSelectedText();y._.cache.nativeSel={};y.isLocked=1;y.document.setCustomData('cke_locked_selection',y);},unlock:function(y){var D=this;var z=D.document,A=z.getCustomData('cke_locked_selection');if(A){z.setCustomData('cke_locked_selection',null);if(y){var B=A.getSelectedElement(),C=!B&&A.getRanges();D.isLocked=0;D.reset();z.getBody().focus();if(B)D.selectElement(B);else D.selectRanges(C);}}if(!A||!y){D.isLocked=0;D.reset();}},reset:function(){this._.cache={};},selectElement:function(y){var A=this;if(A.isLocked){var z=new d.range(A.document);z.setStartBefore(y);z.setEndAfter(y);A._.cache.selectedElement=y;A._.cache.startElement=y;A._.cache.ranges=new d.rangeList(z);A._.cache.type=3;return;}z=new d.range(y.getDocument());z.setStartBefore(y);z.setEndAfter(y);z.select();A.document.fire('selectionchange');A.reset();
+},selectRanges:function(y){var M=this;if(M.isLocked){M._.cache.selectedElement=null;M._.cache.startElement=y[0]&&y[0].getTouchedStartNode();M._.cache.ranges=new d.rangeList(y);M._.cache.type=2;return;}if(c){if(y.length>1){var z=y[y.length-1];y[0].setEnd(z.endContainer,z.endOffset);y.length=1;}if(y[0])y[0].select();M.reset();}else{var A=M.getNative();if(!A)return;if(y.length){A.removeAllRanges();b.webkit&&w(M.document);}for(var B=0;B<y.length;B++){if(B<y.length-1){var C=y[B],D=y[B+1],E=C.clone();E.setStart(C.endContainer,C.endOffset);E.setEnd(D.startContainer,D.startOffset);if(!E.collapsed){E.shrink(1,true);var F=E.getCommonAncestor(),G=E.getEnclosedNode();if(F.isReadOnly()||G&&G.isReadOnly()){D.setStart(C.startContainer,C.startOffset);y.splice(B--,1);continue;}}}var H=y[B],I=M.document.$.createRange(),J=H.startContainer;if(H.collapsed&&(b.opera||b.gecko&&b.version<10900)&&J.type==1&&!J.getChildCount())J.appendText('');if(H.collapsed&&b.webkit&&r(H)){var K=t(M.document);H.insertNode(K);var L=K.getNext();if(L&&!K.getPrevious()&&L.type==1&&L.getName()=='br'){w(M.document);H.moveToPosition(L,3);}else H.moveToPosition(K,4);}I.setStart(H.startContainer.$,H.startOffset);try{I.setEnd(H.endContainer.$,H.endOffset);}catch(N){if(N.toString().indexOf('NS_ERROR_ILLEGAL_VALUE')>=0){H.collapse(1);I.setEnd(H.endContainer.$,H.endOffset);}else throw N;}A.addRange(I);}M.reset();}},createBookmarks:function(y){return this.getRanges().createBookmarks(y);},createBookmarks2:function(y){return this.getRanges().createBookmarks2(y);},selectBookmarks:function(y){var z=[];for(var A=0;A<y.length;A++){var B=new d.range(this.document);B.moveToBookmark(y[A]);z.push(B);}this.selectRanges(z);return this;},getCommonAncestor:function(){var y=this.getRanges(),z=y[0].startContainer,A=y[y.length-1].endContainer;return z.getCommonAncestor(A);},scrollIntoView:function(){var y=this.getStartElement();y.scrollIntoView();}};})();(function(){var m=d.walker.whitespaces(true),n=/\ufeff|\u00a0/,o={table:1,tbody:1,tr:1};d.range.prototype.select=c?function(p){var A=this;var q=A.collapsed,r,s,t,u=A.getEnclosedNode();if(u)try{t=A.document.$.body.createControlRange();t.addElement(u.$);t.select();return;}catch(B){}if(A.startContainer.type==1&&A.startContainer.getName() in o||A.endContainer.type==1&&A.endContainer.getName() in o)A.shrink(1,true);var v=A.createBookmark(),w=v.startNode,x;if(!q)x=v.endNode;t=A.document.$.body.createTextRange();t.moveToElementText(w.$);t.moveStart('character',1);if(x){var y=A.document.$.body.createTextRange();
+y.moveToElementText(x.$);t.setEndPoint('EndToEnd',y);t.moveEnd('character',-1);}else{var z=w.getNext(m);r=!(z&&z.getText&&z.getText().match(n))&&(p||!w.hasPrevious()||w.getPrevious().is&&w.getPrevious().is('br'));s=A.document.createElement('span');s.setHtml('');s.insertBefore(w);if(r)A.document.createText('\ufeff').insertBefore(w);}A.setStartBefore(w);w.remove();if(q){if(r){t.moveStart('character',-1);t.select();A.document.$.selection.clear();}else t.select();A.moveToPosition(s,3);s.remove();}else{A.setEndBefore(x);x.remove();t.select();}A.document.fire('selectionchange');}:function(){this.document.getSelection().selectRanges([this]);};})();(function(){var m=a.htmlParser.cssStyle,n=e.cssLength,o=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;function p(r,s){var t=o.exec(r),u=o.exec(s);if(t){if(!t[2]&&u[2]=='px')return u[1];if(t[2]=='px'&&!u[2])return u[1]+'px';}return s;};var q={elements:{$:function(r){var s=r.attributes,t=s&&s['data-cke-realelement'],u=t&&new a.htmlParser.fragment.fromHtml(decodeURIComponent(t)),v=u&&u.children[0];if(v&&r.attributes['data-cke-resizable']){var w=new m(r).rules,x=v.attributes,y=w.width,z=w.height;y&&(x.width=p(x.width,y));z&&(x.height=p(x.height,z));}return v;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(r){var s=r.dataProcessor,t=s&&s.htmlFilter;if(t)t.addRules(q);}});a.editor.prototype.createFakeElement=function(r,s,t,u){var v=this.lang.fakeobjects,w=v[t]||v.unknown,x={'class':s,src:a.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(r.getOuterHtml()),'data-cke-real-node-type':r.type,alt:w,title:w,align:r.getAttribute('align')||''};if(t)x['data-cke-real-element-type']=t;if(u){x['data-cke-resizable']=u;var y=new m(),z=r.getAttribute('width'),A=r.getAttribute('height');z&&(y.rules.width=n(z));A&&(y.rules.height=n(A));y.populate(x);}return this.document.createElement('img',{attributes:x});};a.editor.prototype.createFakeParserElement=function(r,s,t,u){var v=this.lang.fakeobjects,w=v[t]||v.unknown,x,y=new a.htmlParser.basicWriter();r.writeHtml(y);x=y.getHtml();var z={'class':s,src:a.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(x),'data-cke-real-node-type':r.type,alt:w,title:w,align:r.attributes.align||''};if(t)z['data-cke-real-element-type']=t;if(u){z['data-cke-resizable']=u;var A=r.attributes,B=new m(),C=A.width,D=A.height;C!=undefined&&(B.rules.width=n(C));D!=undefined&&(B.rules.height=n(D));B.populate(z);}return new a.htmlParser.element('img',z);};a.editor.prototype.restoreRealElement=function(r){if(r.data('cke-real-node-type')!=1)return null;
+var s=h.createFromHtml(decodeURIComponent(r.data('cke-realelement')),this.document);if(r.data('cke-resizable')){var t=r.getStyle('width'),u=r.getStyle('height');t&&s.setAttribute('width',p(s.getAttribute('width'),t));u&&s.setAttribute('height',p(s.getAttribute('height'),u));}return s;};})();j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(m){m.ui.addHandler('richcombo',k.richCombo.handler);}});a.UI_RICHCOMBO='richcombo';k.richCombo=e.createClass({$:function(m){var o=this;e.extend(o,m,{title:m.label,modes:{wysiwyg:1}});var n=o.panel||{};delete o.panel;o.id=e.getNextNumber();o.document=n&&n.parent&&n.parent.getDocument()||a.document;n.className=(n.className||'')+' cke_rcombopanel';n.block={multiSelect:n.multiSelect,attributes:n.attributes};o._={panelDefinition:n,items:{},state:2};},statics:{handler:{create:function(m){return new k.richCombo(m);}}},proto:{renderHtml:function(m){var n=[];this.render(m,n);return n.join('');},render:function(m,n){var o=b,p='cke_'+this.id,q=e.addFunction(function(v){var y=this;var w=y._;if(w.state==0)return;y.createPanel(m);if(w.on){w.panel.hide();return;}y.commit();var x=y.getValue();if(x)w.list.mark(x);else w.list.unmarkAll();w.panel.showBlock(y.id,new h(v),4);},this),r={id:p,combo:this,focus:function(){var v=a.document.getById(p).getChild(1);v.focus();},clickFn:q};function s(){var w=this;var v=w.modes[m.mode]?2:0;w.setState(m.readOnly&&!w.readOnly?0:v);w.setValue('');};m.on('mode',s,this);!this.readOnly&&m.on('readOnly',s,this);var t=e.addFunction(function(v,w){v=new d.event(v);var x=v.getKeystroke();switch(x){case 13:case 32:case 40:e.callFunction(q,w);break;default:r.onkey(r,x);}v.preventDefault();}),u=e.addFunction(function(){r.onfocus&&r.onfocus();});r.keyDownFn=t;n.push('<span class="cke_rcombo" role="presentation">','<span id=',p);if(this.className)n.push(' class="',this.className,' cke_off"');n.push(' role="presentation">','<span id="'+p+'_label" class=cke_label>',this.label,'</span>','<a hidefocus=true title="',this.title,'" tabindex="-1"',o.gecko&&o.version>=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',t,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',u,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',q,', this); return false;"><span><span id="'+p+'_text" class="cke_text cke_inline_label">'+this.label+'</span>'+'</span>'+'<span class=cke_openbutton><span class=cke_icon>'+(b.hc?'▼':b.air?' ':'')+'</span></span>'+'</a>'+'</span>'+'</span>');
+if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide(false);};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m);},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,'richcombo',n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;
+var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('</',m,'>');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('<!--',m,'-->');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler('menubutton',k.menuButton.handler);}});a.UI_MENUBUTTON='menubutton';(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w<arguments.length;w++)v.push(arguments[w]);v.push(true);e.extend.apply(e,v);return x._;},n={build:function(u,v,w){return new k.dialog.textInput(u,v,w);
+}},o={build:function(u,v,w){return new k.dialog[v.type](u,v,w);}},p={build:function(u,v,w){var x=v.children,y,z=[],A=[];for(var B=0;B<x.length&&(y=x[B]);B++){var C=[];z.push(C);A.push(a.dialog._.uiElementBuilders[y.type].build(u,y,C));}return new k.dialog[v.type](u,A,z,w,v);}},q={isChanged:function(){return this.getValue()!=this.getInitValue();},reset:function(u){this.setValue(this.getInitValue(),u);},setInitValue:function(){this._.initValue=this.getValue();},resetInitValue:function(){this._.initValue=this._['default'];},getInitValue:function(){return this._.initValue;}},r=e.extend({},k.dialog.uiElement.prototype.eventProcessors,{onChange:function(u,v){if(!this._.domOnChangeRegistered){u.on('load',function(){this.getInputElement().on('change',function(){if(!u.parts.dialog.isVisible())return;this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',v);}},true),s=/^on([A-Z]\w+)/,t=function(u){for(var v in u){if(s.test(v)||v=='title'||v=='type')delete u[v];}return u;};e.extend(k.dialog,{labeledElement:function(u,v,w,x){if(arguments.length<4)return;var y=m.call(this,v);y.labelId=e.getNextId()+'_label';var z=this._.children=[],A=function(){var B=[],C=v.required?' cke_required':'';if(v.labelLayout!='horizontal')B.push('<label class="cke_dialog_ui_labeled_label'+C+'" ',' id="'+y.labelId+'"',' for="'+y.inputId+'"',(v.labelStyle?' style="'+v.labelStyle+'"':'')+'>',v.label,'</label>','<div class="cke_dialog_ui_labeled_content"'+(v.controlStyle?' style="'+v.controlStyle+'"':'')+' role="presentation">',x.call(this,u,v),'</div>');else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'<label class="cke_dialog_ui_labeled_label'+C+'"'+' id="'+y.labelId+'"'+' for="'+y.inputId+'"'+(v.labelStyle?' style="'+v.labelStyle+'"':'')+'>'+e.htmlEncode(v.label)+'</span>'},{type:'html',html:'<span class="cke_dialog_ui_labeled_content"'+(v.controlStyle?' style="'+v.controlStyle+'"':'')+'>'+x.call(this,u,v)+'</span>'}]};a.dialog._.uiElementBuilders.hbox.build(u,D,B);}return B.join('');};k.dialog.uiElement.call(this,u,v,w,'div',null,{role:'presentation'},A);},textInput:function(u,v,w){if(arguments.length<3)return;m.call(this,v);var x=this._.inputId=e.getNextId()+'_textInput',y={'class':'cke_dialog_ui_input_'+v.type,id:x,type:'text'},z;if(v.validate)this.validate=v.validate;if(v.maxLength)y.maxlength=v.maxLength;if(v.size)y.size=v.size;if(v.inputStyle)y.style=v.inputStyle;var A=this,B=false;u.on('load',function(){A.getInputElement().on('keydown',function(D){if(D.data.getKeystroke()==13)B=true;
+});A.getInputElement().on('keyup',function(D){if(D.data.getKeystroke()==13&&B){u.getButton('ok')&&setTimeout(function(){u.getButton('ok').click();},0);B=false;}},null,null,1000);});var C=function(){var D=['<div class="cke_dialog_ui_input_',v.type,'" role="presentation"'];if(v.width)D.push('style="width:'+v.width+'" ');D.push('><input ');y['aria-labelledby']=this._.labelId;this._.required&&(y['aria-required']=this._.required);for(var E in y)D.push(E+'="'+y[E]+'" ');D.push(' /></div>');return D.join('');};k.dialog.labeledElement.call(this,u,v,w,C);},textarea:function(u,v,w){if(arguments.length<3)return;m.call(this,v);var x=this,y=this._.inputId=e.getNextId()+'_textarea',z={};if(v.validate)this.validate=v.validate;z.rows=v.rows||5;z.cols=v.cols||20;if(typeof v.inputStyle!='undefined')z.style=v.inputStyle;var A=function(){z['aria-labelledby']=this._.labelId;this._.required&&(z['aria-required']=this._.required);var B=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',y,'" '];for(var C in z)B.push(C+'="'+e.htmlEncode(z[C])+'" ');B.push('>',e.htmlEncode(x._['default']),'</textarea></div>');return B.join('');};k.dialog.labeledElement.call(this,u,v,w,A);},checkbox:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v,{'default':!!v['default']});if(v.validate)this.validate=v.validate;var y=function(){var z=e.extend({},v,{id:v.id?v.id+'_checkbox':e.getNextId()+'_checkbox'},true),A=[],B=e.getNextId()+'_label',C={'class':'cke_dialog_ui_checkbox_input',type:'checkbox','aria-labelledby':B};t(z);if(v['default'])C.checked='checked';if(typeof z.inputStyle!='undefined')z.style=z.inputStyle;x.checkbox=new k.dialog.uiElement(u,z,A,'input',null,C);A.push(' <label id="',B,'" for="',C.id,'"'+(v.labelStyle?' style="'+v.labelStyle+'"':'')+'>',e.htmlEncode(v.label),'</label>');return A.join('');};k.dialog.uiElement.call(this,u,v,w,'span',null,null,y);},radio:function(u,v,w){if(arguments.length<3)return;m.call(this,v);if(!this._['default'])this._['default']=this._.initValue=v.items[0][1];if(v.validate)this.validate=v.valdiate;var x=[],y=this,z=function(){var A=[],B=[],C={'class':'cke_dialog_ui_radio_item','aria-labelledby':this._.labelId},D=v.id?v.id+'_radio':e.getNextId()+'_radio';for(var E=0;E<v.items.length;E++){var F=v.items[E],G=F[2]!==undefined?F[2]:F[0],H=F[1]!==undefined?F[1]:F[0],I=e.getNextId()+'_radio_input',J=I+'_label',K=e.extend({},v,{id:I,title:null,type:null},true),L=e.extend({},K,{title:G},true),M={type:'radio','class':'cke_dialog_ui_radio_input',name:D,value:H,'aria-labelledby':J},N=[];
+if(y._['default']==H)M.checked='checked';t(K);t(L);if(typeof K.inputStyle!='undefined')K.style=K.inputStyle;x.push(new k.dialog.uiElement(u,K,N,'input',null,M));N.push(' ');new k.dialog.uiElement(u,L,N,'label',null,{id:J,'for':M.id},F[0]);A.push(N.join(''));}new k.dialog.hbox(u,[],A,B);return B.join('');};k.dialog.labeledElement.call(this,u,v,w,z);this._.children=x;},button:function(u,v,w){if(!arguments.length)return;if(typeof v=='function')v=v(u.getParentEditor());m.call(this,v,{disabled:v.disabled||false});a.event.implementOn(this);var x=this;u.on('load',function(A){var B=this.getElement();(function(){B.on('click',function(C){x.fire('click',{dialog:x.getDialog()});C.data.preventDefault();});B.on('keydown',function(C){if(C.data.getKeystroke() in {32:1}){x.click();C.data.preventDefault();}});})();B.unselectable();},this);var y=e.extend({},v);delete y.style;var z=e.getNextId()+'_label';k.dialog.uiElement.call(this,u,y,w,'a',null,{style:v.style,href:'javascript:void(0)',title:v.label,hidefocus:'true','class':v['class'],role:'button','aria-labelledby':z},'<span id="'+z+'" class="cke_dialog_ui_button">'+e.htmlEncode(v.label)+'</span>');},select:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v);if(v.validate)this.validate=v.validate;x.inputId=e.getNextId()+'_select';var y=function(){var z=e.extend({},v,{id:v.id?v.id+'_select':e.getNextId()+'_select'},true),A=[],B=[],C={id:x.inputId,'class':'cke_dialog_ui_input_select','aria-labelledby':this._.labelId};if(v.size!=undefined)C.size=v.size;if(v.multiple!=undefined)C.multiple=v.multiple;t(z);for(var D=0,E;D<v.items.length&&(E=v.items[D]);D++)B.push('<option value="',e.htmlEncode(E[1]!==undefined?E[1]:E[0]).replace(/"/g,'"'),'" /> ',e.htmlEncode(E[0]));if(typeof z.inputStyle!='undefined')z.style=z.inputStyle;x.select=new k.dialog.uiElement(u,z,A,'select',null,C,B.join(''));return A.join('');};k.dialog.labeledElement.call(this,u,v,w,y);},file:function(u,v,w){if(arguments.length<3)return;if(v['default']===undefined)v['default']='';var x=e.extend(m.call(this,v),{definition:v,buttons:[]});if(v.validate)this.validate=v.validate;var y=function(){x.frameId=e.getNextId()+'_fileInput';var z=b.isCustomDomain(),A=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" id="',x.frameId,'" title="',v.label,'" src="javascript:void('];A.push(z?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');A.push(')"></iframe>');return A.join('');};u.on('load',function(){var z=a.document.getById(x.frameId),A=z.getParent();
+A.addClass('cke_dialog_ui_input_file');});k.dialog.labeledElement.call(this,u,v,w,y);},fileButton:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v),y=this;if(v.validate)this.validate=v.validate;var z=e.extend({},v),A=z.onClick;z.className=(z.className?z.className+' ':'')+'cke_dialog_ui_button';z.onClick=function(B){var C=v['for'];if(!A||A.call(this,B)!==false){u.getContentElement(C[0],C[1]).submit();this.disable();}};u.on('load',function(){u.getContentElement(v['for'][0],v['for'][1])._.buttons.push(y);});k.dialog.button.call(this,u,z,w);},html:(function(){var u=/^\s*<[\w:]+\s+([^>]*)?>/,v=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,w=/\/$/;return function(x,y,z){if(arguments.length<3)return;var A=[],B,C=y.html,D,E;if(C.charAt(0)!='<')C='<span>'+C+'</span>';var F=y.focus;if(F){var G=this.focus;this.focus=function(){G.call(this);typeof F=='function'&&F.call(this);this.fire('focus');};if(y.isFocusable){var H=this.isFocusable;this.isFocusable=H;}this.keyboardFocusable=true;}k.dialog.uiElement.call(this,x,y,A,'span',null,null,'');B=A.join('');D=B.match(u);E=C.match(v)||['','',''];if(w.test(E[1])){E[1]=E[1].slice(0,-1);E[2]='/'+E[2];}z.push([E[1],' ',D[1]||'',E[2]].join(''));};})(),fieldset:function(u,v,w,x,y){var z=y.label,A=function(){var B=[];z&&B.push('<legend>'+z+'</legend>');for(var C=0;C<w.length;C++)B.push(w[C]);return B.join('');};this._={children:v};k.dialog.uiElement.call(this,u,y,x,'fieldset',null,null,A);}},true);k.dialog.html.prototype=new k.dialog.uiElement();k.dialog.labeledElement.prototype=e.extend(new k.dialog.uiElement(),{setLabel:function(u){var v=a.document.getById(this._.labelId);if(v.getChildCount()<1)new d.text(u,a.document).appendTo(v);else v.getChild(0).$.nodeValue=u;return this;},getLabel:function(){var u=a.document.getById(this._.labelId);if(!u||u.getChildCount()<1)return '';else return u.getChild(0).getText();},eventProcessors:r},true);k.dialog.button.prototype=e.extend(new k.dialog.uiElement(),{click:function(){var u=this;if(!u._.disabled)return u.fire('click',{dialog:u._.dialog});u.getElement().$.blur();return false;},enable:function(){this._.disabled=false;var u=this.getElement();u&&u.removeClass('cke_disabled');},disable:function(){this._.disabled=true;this.getElement().addClass('cke_disabled');},isVisible:function(){return this.getElement().getFirst().isVisible();},isEnabled:function(){return!this._.disabled;},eventProcessors:e.extend({},k.dialog.uiElement.prototype.eventProcessors,{onClick:function(u,v){this.on('click',v);
+}},true),accessKeyUp:function(){this.click();},accessKeyDown:function(){this.focus();},keyboardFocusable:true},true);k.dialog.textInput.prototype=e.extend(new k.dialog.labeledElement(),{getInputElement:function(){return a.document.getById(this._.inputId);},focus:function(){var u=this.selectParentTab();setTimeout(function(){var v=u.getInputElement();v&&v.$.focus();},0);},select:function(){var u=this.selectParentTab();setTimeout(function(){var v=u.getInputElement();if(v){v.$.focus();v.$.select();}},0);},accessKeyUp:function(){this.select();},setValue:function(u){!u&&(u='');return k.dialog.uiElement.prototype.setValue.apply(this,arguments);},keyboardFocusable:true},q,true);k.dialog.textarea.prototype=new k.dialog.textInput();k.dialog.select.prototype=e.extend(new k.dialog.labeledElement(),{getInputElement:function(){return this._.select.getElement();},add:function(u,v,w){var x=new h('option',this.getDialog().getParentEditor().document),y=this.getInputElement().$;x.$.text=u;x.$.value=v===undefined||v===null?u:v;if(w===undefined||w===null){if(c)y.add(x.$);else y.add(x.$,null);}else y.add(x.$,w);return this;},remove:function(u){var v=this.getInputElement().$;v.remove(u);return this;},clear:function(){var u=this.getInputElement().$;while(u.length>0)u.remove(0);return this;},keyboardFocusable:true},q,true);k.dialog.checkbox.prototype=e.extend(new k.dialog.uiElement(),{getInputElement:function(){return this._.checkbox.getElement();},setValue:function(u,v){this.getInputElement().$.checked=u;!v&&this.fire('change',{value:u});},getValue:function(){return this.getInputElement().$.checked;},accessKeyUp:function(){this.setValue(!this.getValue());},eventProcessors:{onChange:function(u,v){if(!c)return r.onChange.apply(this,arguments);else{u.on('load',function(){var w=this._.checkbox.getElement();w.on('propertychange',function(x){x=x.data.$;if(x.propertyName=='checked')this.fire('change',{value:w.$.checked});},this);},this);this.on('change',v);}return null;}},keyboardFocusable:true},q,true);k.dialog.radio.prototype=e.extend(new k.dialog.uiElement(),{setValue:function(u,v){var w=this._.children,x;for(var y=0;y<w.length&&(x=w[y]);y++)x.getElement().$.checked=x.getValue()==u;!v&&this.fire('change',{value:u});},getValue:function(){var u=this._.children;for(var v=0;v<u.length;v++){if(u[v].getElement().$.checked)return u[v].getValue();}return null;},accessKeyUp:function(){var u=this._.children,v;for(v=0;v<u.length;v++){if(u[v].getElement().$.checked){u[v].getElement().focus();return;
+}}u[0].getElement().focus();},eventProcessors:{onChange:function(u,v){if(!c)return r.onChange.apply(this,arguments);else{u.on('load',function(){var w=this._.children,x=this;for(var y=0;y<w.length;y++){var z=w[y].getElement();z.on('propertychange',function(A){A=A.data.$;if(A.propertyName=='checked'&&this.$.checked)x.fire('change',{value:this.getAttribute('value')});});}},this);this.on('change',v);}return null;}},keyboardFocusable:true},q,true);k.dialog.file.prototype=e.extend(new k.dialog.labeledElement(),q,{getInputElement:function(){var u=a.document.getById(this._.frameId).getFrameDocument();return u.$.forms.length>0?new h(u.$.forms[0].elements[0]):this.getElement();},submit:function(){this.getInputElement().getParent().$.submit();return this;},getAction:function(){return this.getInputElement().getParent().$.action;},registerEvents:function(u){var v=/^on([A-Z]\w+)/,w,x=function(z,A,B,C){z.on('formLoaded',function(){z.getInputElement().on(B,C,z);});};for(var y in u){if(!(w=y.match(v)))continue;if(this.eventProcessors[y])this.eventProcessors[y].call(this,this._.dialog,u[y]);else x(this,this._.dialog,w[1].toLowerCase(),u[y]);}return this;},reset:function(){var u=this._,v=a.document.getById(u.frameId),w=v.getFrameDocument(),x=u.definition,y=u.buttons,z=this.formLoadedNumber,A=this.formUnloadNumber,B=u.dialog._.editor.lang.dir,C=u.dialog._.editor.langCode;if(!z){z=this.formLoadedNumber=e.addFunction(function(){this.fire('formLoaded');},this);A=this.formUnloadNumber=e.addFunction(function(){this.getInputElement().clearCustomData();},this);this.getDialog()._.editor.on('destroy',function(){e.removeFunction(z);e.removeFunction(A);});}function D(){w.$.open();if(b.isCustomDomain())w.$.domain=document.domain;var E='';if(x.size)E=x.size-(c?7:0);w.$.write(['<html dir="'+B+'" lang="'+C+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+B+'" lang="'+C+'" action="',e.htmlEncode(x.action),'">','<input type="file" name="',e.htmlEncode(x.id||'cke_upload'),'" size="',e.htmlEncode(E>0?E:''),'" />','</form>','</body></html>','<script>window.parent.CKEDITOR.tools.callFunction('+z+');','window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction('+A+')}</script>'].join(''));w.$.close();for(var F=0;F<y.length;F++)y[F].enable();};if(b.gecko)setTimeout(D,500);else D();},getValue:function(){return this.getInputElement().$.value||'';},setInitValue:function(){this._.initValue='';
+},eventProcessors:{onChange:function(u,v){if(!this._.domOnChangeRegistered){this.on('formLoaded',function(){this.getInputElement().on('change',function(){this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',v);}},keyboardFocusable:true},true);k.dialog.fileButton.prototype=new k.dialog.button();k.dialog.fieldset.prototype=e.clone(k.dialog.hbox.prototype);a.dialog.addUIElement('text',n);a.dialog.addUIElement('password',n);a.dialog.addUIElement('textarea',o);a.dialog.addUIElement('checkbox',o);a.dialog.addUIElement('radio',o);a.dialog.addUIElement('button',o);a.dialog.addUIElement('select',o);a.dialog.addUIElement('file',o);a.dialog.addUIElement('fileButton',o);a.dialog.addUIElement('html',o);a.dialog.addUIElement('fieldset',p);})();j.add('panel',{beforeInit:function(m){m.ui.addHandler('panel',k.panel.handler);}});a.UI_PANEL='panel';k.panel=function(m,n){var o=this;if(n)e.extend(o,n);e.extend(o,{className:'',css:[]});o.id=e.getNextId();o.document=m;o._={blocks:{}};};k.panel.handler={create:function(m){return new k.panel(m);}};k.panel.prototype={renderHtml:function(m){var n=[];this.render(m,n);return n.join('');},render:function(m,n){var p=this;var o=p.id;n.push('<div class="',m.skinClass,'" lang="',m.langCode,'" role="presentation" style="display:none;z-index:'+(m.config.baseFloatZIndex+1)+'">'+'<div'+' id=',o,' dir=',m.lang.dir,' role="presentation" class="cke_panel cke_',m.lang.dir);if(p.className)n.push(' ',p.className);n.push('">');if(p.forceIFrame||p.css.length){n.push('<iframe id="',o,'_frame" frameborder="0" role="application" src="javascript:void(');n.push(b.isCustomDomain()?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');n.push(')"></iframe>');}n.push('</div></div>');return o;},getHolderElement:function(){var m=this._.holder;if(!m){if(this.forceIFrame||this.css.length){var n=this.document.getById(this.id+'_frame'),o=n.getParent(),p=o.getAttribute('dir'),q=o.getParent().getAttribute('class'),r=o.getParent().getAttribute('lang'),s=n.getFrameDocument(),t=e.addFunction(e.bind(function(w){this.isLoaded=true;if(this.onLoad)this.onLoad();},this)),u='<!DOCTYPE html><html dir="'+p+'" class="'+q+'_container" lang="'+r+'">'+'<head>'+'<style>.'+q+'_container{visibility:hidden}</style>'+'</head>'+'<body class="cke_'+p+' cke_panel_frame '+b.cssClass+'" style="margin:0;padding:0"'+' onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction('+t+');"></body>'+e.buildStyleHtml(this.css)+'</html>';
+s.write(u);var v=s.getWindow();v.$.CKEDITOR=a;s.on('key'+(b.opera?'press':'down'),function(w){var z=this;var x=w.data.getKeystroke(),y=z.document.getById(z.id).getAttribute('dir');if(z._.onKeyDown&&z._.onKeyDown(x)===false){w.data.preventDefault();return;}if(x==27||x==(y=='rtl'?39:37))if(z.onEscape&&z.onEscape(x)===false)w.data.preventDefault();},this);m=s.getBody();m.unselectable();b.air&&e.callFunction(t);}else m=this.document.getById(this.id);this._.holder=m;}return m;},addBlock:function(m,n){var o=this;n=o._.blocks[m]=n instanceof k.panel.block?n:new k.panel.block(o.getHolderElement(),n);if(!o._.currentBlock)o.showBlock(m);return n;},getBlock:function(m){return this._.blocks[m];},showBlock:function(m){var n=this._.blocks,o=n[m],p=this._.currentBlock,q=this.forceIFrame?this.document.getById(this.id+'_frame'):this._.holder;q.getParent().getParent().disableContextMenu();if(p){q.removeAttributes(p.attributes);p.hide();}this._.currentBlock=o;q.setAttributes(o.attributes);a.fire('ariaWidget',q);o._.focusIndex=-1;this._.onKeyDown=o.onKeyDown&&e.bind(o.onKeyDown,o);o.onMark=function(r){q.setAttribute('aria-activedescendant',r.getId()+'_option');};o.onUnmark=function(){q.removeAttribute('aria-activedescendant');};o.show();return o;},destroy:function(){this.element&&this.element.remove();}};k.panel.block=e.createClass({$:function(m,n){var o=this;o.element=m.append(m.getDocument().createElement('div',{attributes:{tabIndex:-1,'class':'cke_panel_block',role:'presentation'},styles:{display:'none'}}));if(n)e.extend(o,n);if(!o.attributes.title)o.attributes.title=o.attributes['aria-label'];o.keys={};o._.focusIndex=-1;o.element.disableContextMenu();},_:{markItem:function(m){var p=this;if(m==-1)return;var n=p.element.getElementsByTag('a'),o=n.getItem(p._.focusIndex=m);if(b.webkit||b.opera)o.getDocument().getWindow().focus();o.focus();p.onMark&&p.onMark(o);}},proto:{show:function(){this.element.setStyle('display','');},hide:function(){var m=this;if(!m.onHide||m.onHide.call(m)!==true)m.element.setStyle('display','none');},onKeyDown:function(m){var r=this;var n=r.keys[m];switch(n){case 'next':var o=r._.focusIndex,p=r.element.getElementsByTag('a'),q;while(q=p.getItem(++o)){if(q.getAttribute('_cke_focus')&&q.$.offsetWidth){r._.focusIndex=o;q.focus();break;}}return false;case 'prev':o=r._.focusIndex;p=r.element.getElementsByTag('a');while(o>0&&(q=p.getItem(--o))){if(q.getAttribute('_cke_focus')&&q.$.offsetWidth){r._.focusIndex=o;q.focus();break;}}return false;case 'click':case 'mouseup':o=r._.focusIndex;
+q=o>=0&&r.element.getElementsByTag('a').getItem(o);if(q)q.$[n]?q.$[n]():q.$['on'+n]();return false;}return true;}}});j.add('listblock',{requires:['panel'],onLoad:function(){k.panel.prototype.addListBlock=function(m,n){return this.addBlock(m,new k.listBlock(this.getHolderElement(),n));};k.listBlock=e.createClass({base:k.panel.block,$:function(m,n){var q=this;n=n||{};var o=n.attributes||(n.attributes={});(q.multiSelect=!!n.multiSelect)&&(o['aria-multiselectable']=true);!o.role&&(o.role='listbox');q.base.apply(q,arguments);var p=q.keys;p[40]='next';p[9]='next';p[38]='prev';p[2228224+9]='prev';p[32]=c?'mouseup':'click';c&&(p[13]='mouseup');q._.pendingHtml=[];q._.items={};q._.groups={};},_:{close:function(){if(this._.started){this._.pendingHtml.push('</ul>');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=e.addFunction(function(m){var o=this;var n=true;if(o.multiSelect)n=o.toggle(m);else o.mark(m);if(o.onClick)o.onClick(m,n);},this);return this._.click;}},proto:{add:function(m,n,o){var r=this;var p=r._.pendingHtml,q=e.getNextId();if(!r._.started){p.push('<ul role="presentation" class=cke_panel_list>');r._.started=1;r._.size=r._.size||0;}r._.items[m]=q;p.push('<li id=',q,' class=cke_panel_listItem role=presentation><a id="',q,'_option" _cke_focus=1 hidefocus=true title="',o||m,'" href="javascript:void(\'',m,"')\" "+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',r._.getClick(),",'",m,"'); return false;\"",' role="option" aria-posinset="'+ ++r._.size+'">',n||m,'</a></li>');},startGroup:function(m){this._.close();var n=e.getNextId();this._.groups[m]=n;this._.pendingHtml.push('<h1 role="presentation" id=',n,' class=cke_panel_grouptitle>',m,'</h1>');},commit:function(){var p=this;p._.close();p.element.appendHtml(p._.pendingHtml.join(''));var m=p._.items,n=p.element.getDocument();for(var o in m)n.getById(m[o]+'_option').setAttribute('aria-setsize',p._.size);delete p._.size;p._.pendingHtml=[];},toggle:function(m){var n=this.isMarked(m);if(n)this.unmark(m);else this.mark(m);return!n;},hideGroup:function(m){var n=this.element.getDocument().getById(this._.groups[m]),o=n&&n.getNext();if(n){n.setStyle('display','none');if(o&&o.getName()=='ul')o.setStyle('display','none');}},hideItem:function(m){this.element.getDocument().getById(this._.items[m]).setStyle('display','none');},showAll:function(){var m=this._.items,n=this._.groups,o=this.element.getDocument();for(var p in m)o.getById(m[p]).setStyle('display','');for(var q in n){var r=o.getById(n[q]),s=r.getNext();
+r.setStyle('display','');if(s&&s.getName()=='ul')s.setStyle('display','');}},mark:function(m){var p=this;if(!p.multiSelect)p.unmarkAll();var n=p._.items[m],o=p.element.getDocument().getById(n);o.addClass('cke_selected');p.element.getDocument().getById(n+'_option').setAttribute('aria-selected',true);p.element.setAttribute('aria-activedescendant',n+'_option');p.onMark&&p.onMark(o);},unmark:function(m){var q=this;var n=q.element.getDocument(),o=q._.items[m],p=n.getById(o);p.removeClass('cke_selected');n.getById(o+'_option').removeAttribute('aria-selected');q.onUnmark&&q.onUnmark(p);},unmarkAll:function(){var q=this;var m=q._.items,n=q.element.getDocument();for(var o in m){var p=m[o];n.getById(p).removeClass('cke_selected');n.getById(p+'_option').removeAttribute('aria-selected');}q.onUnmark&&q.onUnmark();},isMarked:function(m){return this.element.getDocument().getById(this._.items[m]).hasClass('cke_selected');},focus:function(m){this._.focusIndex=-1;if(m){var n=this.element.getDocument().getById(this._.items[m]).getFirst(),o=this.element.getElementsByTag('a'),p,q=-1;while(p=o.getItem(++q)){if(p.equals(n)){this._.focusIndex=q;break;}}setTimeout(function(){n.focus();},0);}}}});}});a.themes.add('default',(function(){var m={};function n(o,p){var q,r;r=o.config.sharedSpaces;r=r&&r[p];r=r&&a.document.getById(r);if(r){var s='<span class="cke_shared " dir="'+o.lang.dir+'"'+'>'+'<span class="'+o.skinClass+' '+o.id+' cke_editor_'+o.name+'">'+'<span class="'+b.cssClass+'">'+'<span class="cke_wrapper cke_'+o.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+p+'">'+'</div></span></span></span></span></span>',t=r.append(h.createFromHtml(s,r.getDocument()));if(r.getCustomData('cke_hasshared'))t.hide();else r.setCustomData('cke_hasshared',1);q=t.getChild([0,0,0,0]);!o.sharedSpaces&&(o.sharedSpaces={});o.sharedSpaces[p]=q;o.on('focus',function(){for(var u=0,v,w=r.getChildren();v=w.getItem(u);u++){if(v.type==1&&!v.equals(t)&&v.hasClass('cke_shared'))v.hide();}t.show();});o.on('destroy',function(){t.remove();});}return q;};return{build:function(o,p){var q=o.name,r=o.element,s=o.elementMode;if(!r||s==0)return;if(s==1)r.hide();var t=o.fire('themeSpace',{space:'top',html:''}).html,u=o.fire('themeSpace',{space:'contents',html:''}).html,v=o.fireOnce('themeSpace',{space:'bottom',html:''}).html,w=u&&o.config.height,x=o.config.tabIndex||o.element.getAttribute('tabindex')||0;if(!u)w='auto';else if(!isNaN(w))w+='px';var y='',z=o.config.width;if(z){if(!isNaN(z))z+='px';y+='width: '+z+';';
+}var A=t&&n(o,'top'),B=n(o,'bottom');A&&(A.setHtml(t),t='');B&&(B.setHtml(v),v='');var C='<style>.'+o.skinClass+'{visibility:hidden;}</style>';if(m[o.skinClass])C='';else m[o.skinClass]=1;var D=h.createFromHtml(['<span id="cke_',q,'" class="',o.skinClass,' ',o.id,' cke_editor_',q,'" dir="',o.lang.dir,'" title="',b.gecko?' ':'','" lang="',o.langCode,'"'+(b.webkit?' tabindex="'+x+'"':'')+' role="application"'+' aria-labelledby="cke_',q,'_arialbl"'+(y?' style="'+y+'"':'')+'>'+'<span id="cke_',q,'_arialbl" class="cke_voice_label">'+o.lang.editor+'</span>'+'<span class="',b.cssClass,'" role="presentation"><span class="cke_wrapper cke_',o.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',t?'':' style="display:none"',' role="presentation"><td id="cke_top_',q,'" class="cke_top" role="presentation">',t,'</td></tr><tr',u?'':' style="display:none"',' role="presentation"><td id="cke_contents_',q,'" class="cke_contents" style="height:',w,'" role="presentation">',u,'</td></tr><tr',v?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',q,'" class="cke_bottom" role="presentation">',v,'</td></tr></tbody></table>'+C+'</span>'+'</span>'+'</span>'].join(''));D.getChild([1,0,0,0,0]).unselectable();D.getChild([1,0,0,0,2]).unselectable();if(s==1)D.insertAfter(r);else r.append(D);o.container=D;D.disableContextMenu();o.on('contentDirChanged',function(E){var F=(o.lang.dir!=E.data?'add':'remove')+'Class';D.getChild(1)[F]('cke_mixed_dir_content');var G=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];G&&G.getParent().getParent()[F]('cke_mixed_dir_content');});o.fireOnce('themeLoaded');o.fireOnce('uiReady');},buildDialog:function(o){var p=e.getNextNumber(),q=h.createFromHtml(['<div class="',o.id,'_dialog cke_editor_',o.name.replace('.','\\.'),'_dialog cke_skin_',o.skinName,'" dir="',o.lang.dir,'" lang="',o.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+b.cssClass,' cke_',o.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+o.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',c?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+p).replace(/%/g,'cke_dialog_')),r=q.getChild([0,0,0,0,0]),s=r.getChild(0),t=r.getChild(1);
+s.unselectable();t.unselectable();return{element:q,parts:{dialog:q.getChild(0),title:s,close:t,tabs:r.getChild(2),contents:r.getChild([3,0,0,0]),footer:r.getChild([3,0,1,0])}};},destroy:function(o){var p=o.container,q=o.element;if(p){p.clearCustomData();p.remove();}if(q){q.clearCustomData();o.elementMode==1&&q.show();delete o.element;}}};})());a.editor.prototype.getThemeSpace=function(m){var n='cke_'+m,o=this._[n]||(this._[n]=a.document.getById(n+'_'+this.name));return o;};a.editor.prototype.resize=function(m,n,o,p){var q=this.container,r=a.document.getById('cke_contents_'+this.name),s=p?q.getChild(1):q;b.webkit&&s.setStyle('display','none');s.setSize('width',m,true);if(b.webkit){s.$.offsetWidth;s.setStyle('display','');}var t=o?0:(s.$.offsetHeight||0)-(r.$.clientHeight||0);r.setStyle('height',Math.max(n-t,0)+'px');this.fire('resize');};a.editor.prototype.getResizable=function(m){return m?a.document.getById('cke_contents_'+this.name):this.container;};})();
diff --git a/appsrc/ODS-Framework/ckeditor/contents.css b/appsrc/ODS-Framework/ckeditor/contents.css
new file mode 100644
index 0000000..98fe2d1
--- /dev/null
+++ b/appsrc/ODS-Framework/ckeditor/contents.css
@@ -0,0 +1,25 @@
+/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+body
+{
+	/* Font */
+	font-family: Arial, Verdana, sans-serif;
+	font-size: 12px;
+
+	/* Text color */
+	color: #222;
+
+	/* Remove the background color to make it transparent */
+	background-color: #fff;
+}
+
+ol,ul,dl
+{
+	/* IE7: reset rtl list margin. (#7334) */
+	*margin-right:0px;
+	/* preserved spaces for rtl list item bullets. (#6249)*/
+    padding-right:40px;
+}
diff --git a/appsrc/ODS-Framework/ckeditor/lang/en.js b/appsrc/ODS-Framework/ckeditor/lang/en.js
index ce35fd2..9964394 100644
--- a/appsrc/ODS-Framework/ckeditor/lang/en.js
+++ b/appsrc/ODS-Framework/ckeditor/lang/en.js
@@ -3,4 +3,4 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.lang.en={dir:'ltr',editorTitle:'Rich text editor, %1, press ALT 0 for help.',toolbar:'Toolbar',editor:'Rich Text Editor',source:'Source',newPage:'New Page',save:'Save',preview:'Preview',cut:'Cut',copy:'Copy',paste:'Paste',print:'Print',underline:'Underline',bold:'Bold',italic:'Italic',selectAll:'Select All',removeFormat:'Remove Format',strike:'Strike Through',subscript:'Subscript',superscript:'Superscript',horizontalrule:'Insert Horizontal Line',pagebreak:'Insert Page Break for Printing',pagebreakAlt:'Page Break',unlink:'Unlink',undo:'Undo',redo:'Redo',common:{browseServer:'Browse Server',url:'URL',protocol:'Protocol',upload:'Upload',uploadSubmit:'Send it to the Server',image:'Image',flash:'Flash',form:'Form',checkbox:'Checkbox',radio:'Radio Button',textField:'Text Field',textarea:'Textarea',hiddenField:'Hidden Field',button:'Button',select:'Selection Field',imageButton:'Image Button',notSet:'<not set>',id:'Id',name:'Name',langDir:'Language Direction',langDirLtr:'Left to Right (LTR)',langDirRtl:'Right to Left (RTL)',langCode:'Language Code',longDescr:'Long Description URL',cssClass:'Stylesheet Classes',advisoryTitle:'Advisory Title',cssStyle:'Style',ok:'OK',cancel:'Cancel',close:'Close',preview:'Preview',generalTab:'General',advancedTab:'Advanced',validateNumberFailed:'This value is not a number.',confirmNewPage:'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',confirmCancel:'Some of the options have been changed. Are you sure to close the dialog?',options:'Options',target:'Target',targetNew:'New Window (_blank)',targetTop:'Topmost Window (_top)',targetSelf:'Same Window (_self)',targetParent:'Parent Window (_parent)',langDirLTR:'Left to Right (LTR)',langDirRTL:'Right to Left (RTL)',styles:'Style',cssClasses:'Stylesheet Classes',width:'Width',height:'Height',align:'Alignment',alignLeft:'Left',alignRight:'Right',alignCenter:'Center',alignTop:'Top',alignMiddle:'Middle',alignBottom:'Bottom',invalidHeight:'Height must be a number.',invalidWidth:'Width must be a number.',unavailable:'%1<span class="cke_accessibility">, unavailable</span>'},contextmenu:{options:'Context Menu Options'},specialChar:{toolbar:'Insert Special Character',title:'Select Special Character',options:'Special Character Options'},link:{toolbar:'Link',other:'<other>',menu:'Edit Link',title:'Link',info:'Link Info',target:'Target',upload:'Upload',advanced:'Advanced',type:'Link Type',toUrl:'URL',toAnchor:'Link to anchor in the text',toEmail:'E-mail',targetFrame:'<frame>',targetPopup:'<popup window>',targetFrameName:'Target Frame Name',targetPopupName:'Popup Window Name',popupFeatures:'Popup Window Features',popupResizable:'Resizable',popupStatusBar:'Status Bar',popupLocationBar:'Location Bar',popupToolbar:'Toolbar',popupMenuBar:'Menu Bar',popupFullScreen:'Full Screen (IE)',popupScrollBars:'Scroll Bars',popupDependent:'Dependent (Netscape)',popupLeft:'Left Position',popupTop:'Top Position',id:'Id',langDir:'Language Direction',langDirLTR:'Left to Right (LTR)',langDirRTL:'Right to Left (RTL)',acccessKey:'Access Key',name:'Name',langCode:'Language Code',tabIndex:'Tab Index',advisoryTitle:'Advisory Title',advisoryContentType:'Advisory Content Type',cssClasses:'Stylesheet Classes',charset:'Linked Resource Charset',styles:'Style',selectAnchor:'Select an Anchor',anchorName:'By Anchor Name',anchorId:'By Element Id',emailAddress:'E-Mail Address',emailSubject:'Message Subject',emailBody:'Message Body',noAnchors:'(No anchors available in the document)',noUrl:'Please type the link URL',noEmail:'Please type the e-mail address'},anchor:{toolbar:'Anchor',menu:'Edit Anchor',title:'Anchor Properties',name:'Anchor Name',errorName:'Please type the anchor name'},list:{numberedTitle:'Numbered List Properties',bulletedTitle:'Bulleted List Properties',type:'Type',start:'Start',validateStartNumber:'List start number must be a whole number.',circle:'Circle',disc:'Disc',square:'Square',none:'None',notset:'<not set>',armenian:'Armenian numbering',georgian:'Georgian numbering (an, ban, gan, etc.)',lowerRoman:'Lower Roman (i, ii, iii, iv, v, etc.)',upperRoman:'Upper Roman (I, II, III, IV, V, etc.)',lowerAlpha:'Lower Alpha (a, b, c, d, e, etc.)',upperAlpha:'Upper Alpha (A, B, C, D, E, etc.)',lowerGreek:'Lower Greek (alpha, beta, gamma, etc.)',decimal:'Decimal (1, 2, 3, etc.)',decimalLeadingZero:'Decimal leading zero (01, 02, 03, etc.)'},findAndReplace:{title:'Find and Replace',find:'Find',replace:'Replace',findWhat:'Find what:',replaceWith:'Replace with:',notFoundMsg:'The specified text was not found.',matchCase:'Match case',matchWord:'Match whole word',matchCyclic:'Match cyclic',replaceAll:'Replace All',replaceSuccessMsg:'%1 occurrence(s) replaced.'},table:{toolbar:'Table',title:'Table Properties',menu:'Table Properties',deleteTable:'Delete Table',rows:'Rows',columns:'Columns',border:'Border size',widthPx:'pixels',widthPc:'percent',widthUnit:'width unit',cellSpace:'Cell spacing',cellPad:'Cell padding',caption:'Caption',summary:'Summary',headers:'Headers',headersNone:'None',headersColumn:'First column',headersRow:'First Row',headersBoth:'Both',invalidRows:'Number of rows must be a number greater than 0.',invalidCols:'Number of columns must be a number greater than 0.',invalidBorder:'Border size must be a number.',invalidWidth:'Table width must be a number.',invalidHeight:'Table height must be a number.',invalidCellSpacing:'Cell spacing must be a number.',invalidCellPadding:'Cell padding must be a number.',cell:{menu:'Cell',insertBefore:'Insert Cell Before',insertAfter:'Insert Cell After',deleteCell:'Delete Cells',merge:'Merge Cells',mergeRight:'Merge Right',mergeDown:'Merge Down',splitHorizontal:'Split Cell Horizontally',splitVertical:'Split Cell Vertically',title:'Cell Properties',cellType:'Cell Type',rowSpan:'Rows Span',colSpan:'Columns Span',wordWrap:'Word Wrap',hAlign:'Horizontal Alignment',vAlign:'Vertical Alignment',alignBaseline:'Baseline',bgColor:'Background Color',borderColor:'Border Color',data:'Data',header:'Header',yes:'Yes',no:'No',invalidWidth:'Cell width must be a number.',invalidHeight:'Cell height must be a number.',invalidRowSpan:'Rows span must be a whole number.',invalidColSpan:'Columns span must be a whole number.',chooseColor:'Choose'},row:{menu:'Row',insertBefore:'Insert Row Before',insertAfter:'Insert Row After',deleteRow:'Delete Rows'},column:{menu:'Column',insertBefore:'Insert Column Before',insertAfter:'Insert Column After',deleteColumn:'Delete Columns'}},button:{title:'Button Properties',text:'Text (Value)',type:'Type',typeBtn:'Button',typeSbm:'Submit',typeRst:'Reset'},checkboxAndRadio:{checkboxTitle:'Checkbox Properties',radioTitle:'Radio Button Properties',value:'Value',selected:'Selected'},form:{title:'Form Properties',menu:'Form Properties',action:'Action',method:'Method',encoding:'Encoding'},select:{title:'Selection Field Properties',selectInfo:'Select Info',opAvail:'Available Options',value:'Value',size:'Size',lines:'lines',chkMulti:'Allow multiple selections',opText:'Text',opValue:'Value',btnAdd:'Add',btnModify:'Modify',btnUp:'Up',btnDown:'Down',btnSetValue:'Set as selected value',btnDelete:'Delete'},textarea:{title:'Textarea Properties',cols:'Columns',rows:'Rows'},textfield:{title:'Text Field Properties',name:'Name',value:'Value',charWidth:'Character Width',maxChars:'Maximum Characters',type:'Type',typeText:'Text',typePass:'Password'},hidden:{title:'Hidden Field Properties',name:'Name',value:'Value'},image:{title:'Image Properties',titleButton:'Image Button Properties',menu:'Image Properties',infoTab:'Image Info',btnUpload:'Send it to the Server',upload:'Upload',alt:'Alternative Text',lockRatio:'Lock Ratio',unlockRatio:'Unlock Ratio',resetSize:'Reset Size',border:'Border',hSpace:'HSpace',vSpace:'VSpace',alertUrl:'Please type the image URL',linkTab:'Link',button2Img:'Do you want to transform the selected image button on a simple image?',img2Button:'Do you want to transform the selected image on a image button?',urlMissing:'Image source URL is missing.',validateBorder:'Border must be a whole number.',validateHSpace:'HSpace must be a whole number.',validateVSpace:'VSpace must be a whole number.'},flash:{properties:'Flash Properties',propertiesTab:'Properties',title:'Flash Properties',chkPlay:'Auto Play',chkLoop:'Loop',chkMenu:'Enable Flash Menu',chkFull:'Allow Fullscreen',scale:'Scale',scaleAll:'Show all',scaleNoBorder:'No Border',scaleFit:'Exact Fit',access:'Script Access',accessAlways:'Always',accessSameDomain:'Same domain',accessNever:'Never',alignAbsBottom:'Abs Bottom',alignAbsMiddle:'Abs Middle',alignBaseline:'Baseline',alignTextTop:'Text Top',quality:'Quality',qualityBest:'Best',qualityHigh:'High',qualityAutoHigh:'Auto High',qualityMedium:'Medium',qualityAutoLow:'Auto Low',qualityLow:'Low',windowModeWindow:'Window',windowModeOpaque:'Opaque',windowModeTransparent:'Transparent',windowMode:'Window mode',flashvars:'Variables for Flash',bgcolor:'Background color',hSpace:'HSpace',vSpace:'VSpace',validateSrc:'URL must not be empty.',validateHSpace:'HSpace must be a number.',validateVSpace:'VSpace must be a number.'},spellCheck:{toolbar:'Check Spelling',title:'Spell Check',notAvailable:'Sorry, but service is unavailable now.',errorLoading:'Error loading application service host: %s.',notInDic:'Not in dictionary',changeTo:'Change to',btnIgnore:'Ignore',btnIgnoreAll:'Ignore All',btnReplace:'Replace',btnReplaceAll:'Replace All',btnUndo:'Undo',noSuggestions:'- No suggestions -',progress:'Spell check in progress...',noMispell:'Spell check complete: No misspellings found',noChanges:'Spell check complete: No words changed',oneChange:'Spell check complete: One word changed',manyChanges:'Spell check complete: %1 words changed',ieSpellDownload:'Spell checker not installed. Do you want to download it now?'},smiley:{toolbar:'Smiley',title:'Insert a Smiley',options:'Smiley Options'},elementsPath:{eleLabel:'Elements path',eleTitle:'%1 element'},numberedlist:'Insert/Remove Numbered List',bulletedlist:'Insert/Remove Bulleted List',indent:'Increase Indent',outdent:'Decrease Indent',justify:{left:'Align Left',center:'Center',right:'Align Right',block:'Justify'},blockquote:'Block Quote',clipboard:{title:'Paste',cutError:"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).",copyError:"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).",pasteMsg:'Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK',securityMsg:'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',pasteArea:'Paste Area'},pastefromword:{confirmCleanup:'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?',toolbar:'Paste from Word',title:'Paste from Word',error:'It was not possible to clean up the pasted data due to an internal error'},pasteText:{button:'Paste as plain text',title:'Paste as Plain Text'},templates:{button:'Templates',title:'Content Templates',options:'Template Options',insertOption:'Replace actual contents',selectPromptMsg:'Please select the template to open in the editor',emptyListMsg:'(No templates defined)'},showBlocks:'Show Blocks',stylesCombo:{label:'Styles',panelTitle:'Formatting Styles',panelTitle1:'Block Styles',panelTitle2:'Inline Styles',panelTitle3:'Object Styles'},format:{label:'Format',panelTitle:'Paragraph Format',tag_p:'Normal',tag_pre:'Formatted',tag_address:'Address',tag_h1:'Heading 1',tag_h2:'Heading 2',tag_h3:'Heading 3',tag_h4:'Heading 4',tag_h5:'Heading 5',tag_h6:'Heading 6',tag_div:'Normal (DIV)'},div:{title:'Create Div Container',toolbar:'Create Div Container',cssClassInputLabel:'Stylesheet Classes',styleSelectLabel:'Style',IdInputLabel:'Id',languageCodeInputLabel:' Language Code',inlineStyleInputLabel:'Inline Style',advisoryTitleInputLabel:'Advisory Title',langDirLabel:'Language Direction',langDirLTRLabel:'Left to Right (LTR)',langDirRTLLabel:'Right to Left (RTL)',edit:'Edit Div',remove:'Remove Div'},iframe:{title:'IFrame Properties',toolbar:'IFrame',noUrl:'Please type the iframe URL',scrolling:'Enable scrollbars',border:'Show frame border'},font:{label:'Font',voiceLabel:'Font',panelTitle:'Font Name'},fontSize:{label:'Size',voiceLabel:'Font Size',panelTitle:'Font Size'},colorButton:{textColorTitle:'Text Color',bgColorTitle:'Background Color',panelTitle:'Colors',auto:'Automatic',more:'More Colors...'},colors:{'000':'Black',800000:'Maroon','8B4513':'Saddle Brown','2F4F4F':'Dark Slate Gray','008080':'Teal','000080':'Navy','4B0082':'Indigo',696969:'Dark Gray',B22222:'Fire Brick',A52A2A:'Brown',DAA520:'Golden Rod','006400':'Dark Green','40E0D0':'Turquoise','0000CD':'Medium Blue',800080:'Purple',808080:'Gray',F00:'Red',FF8C00:'Dark Orange',FFD700:'Gold','008000':'Green','0FF':'Cyan','00F':'Blue',EE82EE:'Violet',A9A9A9:'Dim Gray',FFA07A:'Light Salmon',FFA500:'Orange',FFFF00:'Yellow','00FF00':'Lime',AFEEEE:'Pale Turquoise',ADD8E6:'Light Blue',DDA0DD:'Plum',D3D3D3:'Light Grey',FFF0F5:'Lavender Blush',FAEBD7:'Antique White',FFFFE0:'Light Yellow',F0FFF0:'Honeydew',F0FFFF:'Azure',F0F8FF:'Alice Blue',E6E6FA:'Lavender',FFF:'White'},scayt:{title:'Spell Check As You Type',opera_title:'Not supported by Opera',enable:'Enable SCAYT',disable:'Disable SCAYT',about:'About SCAYT',toggle:'Toggle SCAYT',options:'Options',langs:'Languages',moreSuggestions:'More suggestions',ignore:'Ignore',ignoreAll:'Ignore All',addWord:'Add Word',emptyDic:'Dictionary name should not be empty.',optionsTab:'Options',allCaps:'Ignore All-Caps Words',ignoreDomainNames:'Ignore Domain Names',mixedCase:'Ignore Words with Mixed Case',mixedWithDigits:'Ignore Words with Numbers',languagesTab:'Languages',dictionariesTab:'Dictionaries',dic_field_name:'Dictionary name',dic_create:'Create',dic_restore:'Restore',dic_delete:'Delete',dic_rename:'Rename',dic_info:'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.',aboutTab:'About'},about:{title:'About CKEditor',dlgTitle:'About CKEditor',moreInfo:'For licensing information please visit our web site:',copy:'Copyright © $1. All rights reserved.'},maximize:'Maximize',minimize:'Minimize',fakeobjects:{anchor:'Anchor',flash:'Flash Animation',iframe:'IFrame',hiddenfield:'Hidden Field',unknown:'Unknown Object'},resize:'Drag to resize',colordialog:{title:'Select color',options:'Color Options',highlight:'Highlight',selected:'Selected Color',clear:'Clear'},toolbarCollapse:'Collapse Toolbar',toolbarExpand:'Expand Toolbar',bidi:{ltr:'Text direction from left to right',rtl:'Text direction from right to left'}};
+CKEDITOR.lang.en={dir:'ltr',editorTitle:'Rich text editor, %1, press ALT 0 for help.',toolbars:'Editor toolbars',editor:'Rich Text Editor',source:'Source',newPage:'New Page',save:'Save',preview:'Preview',cut:'Cut',copy:'Copy',paste:'Paste',print:'Print',underline:'Underline',bold:'Bold',italic:'Italic',selectAll:'Select All',removeFormat:'Remove Format',strike:'Strike Through',subscript:'Subscript',superscript:'Superscript',horizontalrule:'Insert Horizontal Line',pagebreak:'Insert Page Break for Printing',pagebreakAlt:'Page Break',unlink:'Unlink',undo:'Undo',redo:'Redo',common:{browseServer:'Browse Server',url:'URL',protocol:'Protocol',upload:'Upload',uploadSubmit:'Send it to the Server',image:'Image',flash:'Flash',form:'Form',checkbox:'Checkbox',radio:'Radio Button',textField:'Text Field',textarea:'Textarea',hiddenField:'Hidden Field',button:'Button',select:'Selection Field',imageButton:'Image Button',notSet:'<not set>',id:'Id',name:'Name',langDir:'Language Direction',langDirLtr:'Left to Right (LTR)',langDirRtl:'Right to Left (RTL)',langCode:'Language Code',longDescr:'Long Description URL',cssClass:'Stylesheet Classes',advisoryTitle:'Advisory Title',cssStyle:'Style',ok:'OK',cancel:'Cancel',close:'Close',preview:'Preview',generalTab:'General',advancedTab:'Advanced',validateNumberFailed:'This value is not a number.',confirmNewPage:'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',confirmCancel:'Some of the options have been changed. Are you sure to close the dialog?',options:'Options',target:'Target',targetNew:'New Window (_blank)',targetTop:'Topmost Window (_top)',targetSelf:'Same Window (_self)',targetParent:'Parent Window (_parent)',langDirLTR:'Left to Right (LTR)',langDirRTL:'Right to Left (RTL)',styles:'Style',cssClasses:'Stylesheet Classes',width:'Width',height:'Height',align:'Alignment',alignLeft:'Left',alignRight:'Right',alignCenter:'Center',alignTop:'Top',alignMiddle:'Middle',alignBottom:'Bottom',invalidHeight:'Height must be a number.',invalidWidth:'Width must be a number.',invalidCssLength:'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',invalidHtmlLength:'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',unavailable:'%1<span class="cke_accessibility">, unavailable</span>'},contextmenu:{options:'Context Menu Options'},specialChar:{toolbar:'Insert Special Character',title:'Select Special Character',options:'Special Character Options'},link:{toolbar:'Link',other:'<other>',menu:'Edit Link',title:'Link',info:'Link Info',target:'Target',upload:'Upload',advanced:'Advanced',type:'Link Type',toUrl:'URL',toAnchor:'Link to anchor in the text',toEmail:'E-mail',targetFrame:'<frame>',targetPopup:'<popup window>',targetFrameName:'Target Frame Name',targetPopupName:'Popup Window Name',popupFeatures:'Popup Window Features',popupResizable:'Resizable',popupStatusBar:'Status Bar',popupLocationBar:'Location Bar',popupToolbar:'Toolbar',popupMenuBar:'Menu Bar',popupFullScreen:'Full Screen (IE)',popupScrollBars:'Scroll Bars',popupDependent:'Dependent (Netscape)',popupLeft:'Left Position',popupTop:'Top Position',id:'Id',langDir:'Language Direction',langDirLTR:'Left to Right (LTR)',langDirRTL:'Right to Left (RTL)',acccessKey:'Access Key',name:'Name',langCode:'Language Code',tabIndex:'Tab Index',advisoryTitle:'Advisory Title',advisoryContentType:'Advisory Content Type',cssClasses:'Stylesheet Classes',charset:'Linked Resource Charset',styles:'Style',rel:'Relationship',selectAnchor:'Select an Anchor',anchorName:'By Anchor Name',anchorId:'By Element Id',emailAddress:'E-Mail Address',emailSubject:'Message Subject',emailBody:'Message Body',noAnchors:'(No anchors available in the document)',noUrl:'Please type the link URL',noEmail:'Please type the e-mail address'},anchor:{toolbar:'Anchor',menu:'Edit Anchor',title:'Anchor Properties',name:'Anchor Name',errorName:'Please type the anchor name',remove:'Remove Anchor'},list:{numberedTitle:'Numbered List Properties',bulletedTitle:'Bulleted List Properties',type:'Type',start:'Start',validateStartNumber:'List start number must be a whole number.',circle:'Circle',disc:'Disc',square:'Square',none:'None',notset:'<not set>',armenian:'Armenian numbering',georgian:'Georgian numbering (an, ban, gan, etc.)',lowerRoman:'Lower Roman (i, ii, iii, iv, v, etc.)',upperRoman:'Upper Roman (I, II, III, IV, V, etc.)',lowerAlpha:'Lower Alpha (a, b, c, d, e, etc.)',upperAlpha:'Upper Alpha (A, B, C, D, E, etc.)',lowerGreek:'Lower Greek (alpha, beta, gamma, etc.)',decimal:'Decimal (1, 2, 3, etc.)',decimalLeadingZero:'Decimal leading zero (01, 02, 03, etc.)'},findAndReplace:{title:'Find and Replace',find:'Find',replace:'Replace',findWhat:'Find what:',replaceWith:'Replace with:',notFoundMsg:'The specified text was not found.',matchCase:'Match case',matchWord:'Match whole word',matchCyclic:'Match cyclic',replaceAll:'Replace All',replaceSuccessMsg:'%1 occurrence(s) replaced.'},table:{toolbar:'Table',title:'Table Properties',menu:'Table Properties',deleteTable:'Delete Table',rows:'Rows',columns:'Columns',border:'Border size',widthPx:'pixels',widthPc:'percent',widthUnit:'width unit',cellSpace:'Cell spacing',cellPad:'Cell padding',caption:'Caption',summary:'Summary',headers:'Headers',headersNone:'None',headersColumn:'First column',headersRow:'First Row',headersBoth:'Both',invalidRows:'Number of rows must be a number greater than 0.',invalidCols:'Number of columns must be a number greater than 0.',invalidBorder:'Border size must be a number.',invalidWidth:'Table width must be a number.',invalidHeight:'Table height must be a number.',invalidCellSpacing:'Cell spacing must be a positive number.',invalidCellPadding:'Cell padding must be a positive number.',cell:{menu:'Cell',insertBefore:'Insert Cell Before',insertAfter:'Insert Cell After',deleteCell:'Delete Cells',merge:'Merge Cells',mergeRight:'Merge Right',mergeDown:'Merge Down',splitHorizontal:'Split Cell Horizontally',splitVertical:'Split Cell Vertically',title:'Cell Properties',cellType:'Cell Type',rowSpan:'Rows Span',colSpan:'Columns Span',wordWrap:'Word Wrap',hAlign:'Horizontal Alignment',vAlign:'Vertical Alignment',alignBaseline:'Baseline',bgColor:'Background Color',borderColor:'Border Color',data:'Data',header:'Header',yes:'Yes',no:'No',invalidWidth:'Cell width must be a number.',invalidHeight:'Cell height must be a number.',invalidRowSpan:'Rows span must be a whole number.',invalidColSpan:'Columns span must be a whole number.',chooseColor:'Choose'},row:{menu:'Row',insertBefore:'Insert Row Before',insertAfter:'Insert Row After',deleteRow:'Delete Rows'},column:{menu:'Column',insertBefore:'Insert Column Before',insertAfter:'Insert Column After',deleteColumn:'Delete Columns'}},button:{title:'Button Properties',text:'Text (Value)',type:'Type',typeBtn:'Button',typeSbm:'Submit',typeRst:'Reset'},checkboxAndRadio:{checkboxTitle:'Checkbox Properties',radioTitle:'Radio Button Properties',value:'Value',selected:'Selected'},form:{title:'Form Properties',menu:'Form Properties',action:'Action',method:'Method',encoding:'Encoding'},select:{title:'Selection Field Properties',selectInfo:'Select Info',opAvail:'Available Options',value:'Value',size:'Size',lines:'lines',chkMulti:'Allow multiple selections',opText:'Text',opValue:'Value',btnAdd:'Add',btnModify:'Modify',btnUp:'Up',btnDown:'Down',btnSetValue:'Set as selected value',btnDelete:'Delete'},textarea:{title:'Textarea Properties',cols:'Columns',rows:'Rows'},textfield:{title:'Text Field Properties',name:'Name',value:'Value',charWidth:'Character Width',maxChars:'Maximum Characters',type:'Type',typeText:'Text',typePass:'Password'},hidden:{title:'Hidden Field Properties',name:'Name',value:'Value'},image:{title:'Image Properties',titleButton:'Image Button Properties',menu:'Image Properties',infoTab:'Image Info',btnUpload:'Send it to the Server',upload:'Upload',alt:'Alternative Text',lockRatio:'Lock Ratio',resetSize:'Reset Size',border:'Border',hSpace:'HSpace',vSpace:'VSpace',alertUrl:'Please type the image URL',linkTab:'Link',button2Img:'Do you want to transform the selected image button on a simple image?',img2Button:'Do you want to transform the selected image on a image button?',urlMissing:'Image source URL is missing.',validateBorder:'Border must be a whole number.',validateHSpace:'HSpace must be a whole number.',validateVSpace:'VSpace must be a whole number.'},flash:{properties:'Flash Properties',propertiesTab:'Properties',title:'Flash Properties',chkPlay:'Auto Play',chkLoop:'Loop',chkMenu:'Enable Flash Menu',chkFull:'Allow Fullscreen',scale:'Scale',scaleAll:'Show all',scaleNoBorder:'No Border',scaleFit:'Exact Fit',access:'Script Access',accessAlways:'Always',accessSameDomain:'Same domain',accessNever:'Never',alignAbsBottom:'Abs Bottom',alignAbsMiddle:'Abs Middle',alignBaseline:'Baseline',alignTextTop:'Text Top',quality:'Quality',qualityBest:'Best',qualityHigh:'High',qualityAutoHigh:'Auto High',qualityMedium:'Medium',qualityAutoLow:'Auto Low',qualityLow:'Low',windowModeWindow:'Window',windowModeOpaque:'Opaque',windowModeTransparent:'Transparent',windowMode:'Window mode',flashvars:'Variables for Flash',bgcolor:'Background color',hSpace:'HSpace',vSpace:'VSpace',validateSrc:'URL must not be empty.',validateHSpace:'HSpace must be a number.',validateVSpace:'VSpace must be a number.'},spellCheck:{toolbar:'Check Spelling',title:'Spell Check',notAvailable:'Sorry, but service is unavailable now.',errorLoading:'Error loading application service host: %s.',notInDic:'Not in dictionary',changeTo:'Change to',btnIgnore:'Ignore',btnIgnoreAll:'Ignore All',btnReplace:'Replace',btnReplaceAll:'Replace All',btnUndo:'Undo',noSuggestions:'- No suggestions -',progress:'Spell check in progress...',noMispell:'Spell check complete: No misspellings found',noChanges:'Spell check complete: No words changed',oneChange:'Spell check complete: One word changed',manyChanges:'Spell check complete: %1 words changed',ieSpellDownload:'Spell checker not installed. Do you want to download it now?'},smiley:{toolbar:'Smiley',title:'Insert a Smiley',options:'Smiley Options'},elementsPath:{eleLabel:'Elements path',eleTitle:'%1 element'},numberedlist:'Insert/Remove Numbered List',bulletedlist:'Insert/Remove Bulleted List',indent:'Increase Indent',outdent:'Decrease Indent',justify:{left:'Align Left',center:'Center',right:'Align Right',block:'Justify'},blockquote:'Block Quote',clipboard:{title:'Paste',cutError:"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).",copyError:"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).",pasteMsg:'Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK',securityMsg:'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',pasteArea:'Paste Area'},pastefromword:{confirmCleanup:'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?',toolbar:'Paste from Word',title:'Paste from Word',error:'It was not possible to clean up the pasted data due to an internal error'},pasteText:{button:'Paste as plain text',title:'Paste as Plain Text'},templates:{button:'Templates',title:'Content Templates',options:'Template Options',insertOption:'Replace actual contents',selectPromptMsg:'Please select the template to open in the editor',emptyListMsg:'(No templates defined)'},showBlocks:'Show Blocks',stylesCombo:{label:'Styles',panelTitle:'Formatting Styles',panelTitle1:'Block Styles',panelTitle2:'Inline Styles',panelTitle3:'Object Styles'},format:{label:'Format',panelTitle:'Paragraph Format',tag_p:'Normal',tag_pre:'Formatted',tag_address:'Address',tag_h1:'Heading 1',tag_h2:'Heading 2',tag_h3:'Heading 3',tag_h4:'Heading 4',tag_h5:'Heading 5',tag_h6:'Heading 6',tag_div:'Normal (DIV)'},div:{title:'Create Div Container',toolbar:'Create Div Container',cssClassInputLabel:'Stylesheet Classes',styleSelectLabel:'Style',IdInputLabel:'Id',languageCodeInputLabel:' Language Code',inlineStyleInputLabel:'Inline Style',advisoryTitleInputLabel:'Advisory Title',langDirLabel:'Language Direction',langDirLTRLabel:'Left to Right (LTR)',langDirRTLLabel:'Right to Left (RTL)',edit:'Edit Div',remove:'Remove Div'},iframe:{title:'IFrame Properties',toolbar:'IFrame',noUrl:'Please type the iframe URL',scrolling:'Enable scrollbars',border:'Show frame border'},font:{label:'Font',voiceLabel:'Font',panelTitle:'Font Name'},fontSize:{label:'Size',voiceLabel:'Font Size',panelTitle:'Font Size'},colorButton:{textColorTitle:'Text Color',bgColorTitle:'Background Color',panelTitle:'Colors',auto:'Automatic',more:'More Colors...'},colors:{'000':'Black',800000:'Maroon','8B4513':'Saddle Brown','2F4F4F':'Dark Slate Gray','008080':'Teal','000080':'Navy','4B0082':'Indigo',696969:'Dark Gray',B22222:'Fire Brick',A52A2A:'Brown',DAA520:'Golden Rod','006400':'Dark Green','40E0D0':'Turquoise','0000CD':'Medium Blue',800080:'Purple',808080:'Gray',F00:'Red',FF8C00:'Dark Orange',FFD700:'Gold','008000':'Green','0FF':'Cyan','00F':'Blue',EE82EE:'Violet',A9A9A9:'Dim Gray',FFA07A:'Light Salmon',FFA500:'Orange',FFFF00:'Yellow','00FF00':'Lime',AFEEEE:'Pale Turquoise',ADD8E6:'Light Blue',DDA0DD:'Plum',D3D3D3:'Light Grey',FFF0F5:'Lavender Blush',FAEBD7:'Antique White',FFFFE0:'Light Yellow',F0FFF0:'Honeydew',F0FFFF:'Azure',F0F8FF:'Alice Blue',E6E6FA:'Lavender',FFF:'White'},scayt:{title:'Spell Check As You Type',opera_title:'Not supported by Opera',enable:'Enable SCAYT',disable:'Disable SCAYT',about:'About SCAYT',toggle:'Toggle SCAYT',options:'Options',langs:'Languages',moreSuggestions:'More suggestions',ignore:'Ignore',ignoreAll:'Ignore All',addWord:'Add Word',emptyDic:'Dictionary name should not be empty.',optionsTab:'Options',allCaps:'Ignore All-Caps Words',ignoreDomainNames:'Ignore Domain Names',mixedCase:'Ignore Words with Mixed Case',mixedWithDigits:'Ignore Words with Numbers',languagesTab:'Languages',dictionariesTab:'Dictionaries',dic_field_name:'Dictionary name',dic_create:'Create',dic_restore:'Restore',dic_delete:'Delete',dic_rename:'Rename',dic_info:'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.',aboutTab:'About'},about:{title:'About CKEditor',dlgTitle:'About CKEditor',help:'Check $1 for help.',userGuide:"CKEditor User's Guide",moreInfo:'For licensing information please visit our web site:',copy:'Copyright © $1. All rights reserved.'},maximize:'Maximize',minimize:'Minimize',fakeobjects:{anchor:'Anchor',flash:'Flash Animation',iframe:'IFrame',hiddenfield:'Hidden Field',unknown:'Unknown Object'},resize:'Drag to resize',colordialog:{title:'Select color',options:'Color Options',highlight:'Highlight',selected:'Selected Color',clear:'Clear'},toolbarCollapse:'Collapse Toolbar',toolbarExpand:'Expand Toolbar',toolbarGroups:{document:'Document',clipboard:'Clipboard/Undo',editing:'Editing',forms:'Forms',basicstyles:'Basic Styles',paragraph:'Paragraph',links:'Links',insert:'Insert',styles:'Styles',colors:'Colors',tools:'Tools'},bidi:{ltr:'Text direction from left to right',rtl:'Text direction from right to left'},docprops:{label:'Document Properties',title:'Document Properties',design:'Design',meta:'Meta Tags',chooseColor:'Choose',other:'Other...',docTitle:'Page Title',charset:'Character Set Encoding',charsetOther:'Other Character Set Encoding',charsetASCII:'ASCII',charsetCE:'Central European',charsetCT:'Chinese Traditional (Big5)',charsetCR:'Cyrillic',charsetGR:'Greek',charsetJP:'Japanese',charsetKR:'Korean',charsetTR:'Turkish',charsetUN:'Unicode (UTF-8)',charsetWE:'Western European',docType:'Document Type Heading',docTypeOther:'Other Document Type Heading',xhtmlDec:'Include XHTML Declarations',bgColor:'Background Color',bgImage:'Background Image URL',bgFixed:'Non-scrolling (Fixed) Background',txtColor:'Text Color',margin:'Page Margins',marginTop:'Top',marginLeft:'Left',marginRight:'Right',marginBottom:'Bottom',metaKeywords:'Document Indexing Keywords (comma separated)',metaDescription:'Document Description',metaAuthor:'Author',metaCopyright:'Copyright',previewHtml:'<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>'}};
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/clipboard/dialogs/paste.js b/appsrc/ODS-Framework/ckeditor/plugins/clipboard/dialogs/paste.js
index e9e2dda..35c274d 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/clipboard/dialogs/paste.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/clipboard/dialogs/paste.js
@@ -3,5 +3,5 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.dialog.add('paste',function(a){var b=a.lang.clipboard,c=CKEDITOR.env.isCustomDomain();function d(e){var f=new CKEDITOR.dom.document(e.document),g=f.$,h=f.getById('cke_actscrpt');h&&h.remove();CKEDITOR.env.ie?g.body.contentEditable='true':g.designMode='on';if(CKEDITOR.env.ie&&CKEDITOR.env.version<8)f.getWindow().on('blur',function(){g.selection.empty();});f.on('keydown',function(i){var j=i.data,k=j.getKeystroke(),l;switch(k){case 27:this.hide();l=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(true);l=1;}l&&j.preventDefault();},this);a.fire('ariaWidget',new CKEDITOR.dom.element(e.frameElement));};return{title:b.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;var e='<html dir="'+a.config.contentsLangDirection+'"'+' lang="'+(a.config.contentsLanguage||a.langCode)+'">'+'<head><style>body { margin: 3px; height: 95%; } </style></head><body>'+'<script id="cke_actscrpt" type="text/javascript">'+'window.parent.CKEDITOR.tools.callFunction( '+CKEDITOR.tools.addFunction(d,this)+', this );'+'</script></body>'+'</html>',f=CKEDITOR.env.air?'javascript:void(0)':c?"javascript:void((function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})())"':'',g=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0"  allowTransparency="true" src="'+f+'"'+' role="region"'+' aria-label="'+b.pasteArea+'"'+' aria-describedby="'+this.getContentElement('general','pasteMsg').domId+'"'+' aria-multiple="true"'+'></iframe>');g.on('load',function(k){k.removeListener();var l=g.getFrameDocument();l.write(e);if(CKEDITOR.env.air)d.call(this,l.getWindow().$);},this);g.setCustomData('dialog',this);var h=this.getContentElement('general','editing_area'),i=h.getElement();i.setHtml('');i.append(g);if(CKEDITOR.env.ie){var j=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>');j.on('focus',function(){g.$.contentWindow.focus();});i.append(j);h.focus=function(){j.focus();this.fire('focus');};}h.getInputElement=function(){return g;};if(CKEDITOR.env.ie){i.setStyle('display','block');i.setStyle('height',g.$.offsetHeight+2+'px');}},onHide:function(){if(CKEDITOR.env.ie)this.getParentEditor().document.getBody().$.contentEditable='true';},onLoad:function(){if((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&a.lang.dir=='rtl')this.parts.contents.setStyle('overflow','hidden');},onOk:function(){var e=this.getContentElement('general','editing_area').getElement(),f=e.getElementsByTag('iframe').getItem(0),g=this.getParentEditor(),h=f.$.contentWindow.document.body.innerHTML;
-setTimeout(function(){g.fire('paste',{html:h});},0);},contents:[{id:'general',label:a.lang.common.generalTab,elements:[{type:'html',id:'securityMsg',html:'<div style="white-space:normal;width:340px;">'+b.securityMsg+'</div>'},{type:'html',id:'pasteMsg',html:'<div style="white-space:normal;width:340px;">'+b.pasteMsg+'</div>'},{type:'html',id:'editing_area',style:'width: 100%; height: 100%;',html:'',focus:function(){var e=this.getInputElement().$.contentWindow;setTimeout(function(){e.focus();},500);}}]}]};});
+CKEDITOR.dialog.add('paste',function(a){var b=a.lang.clipboard,c=CKEDITOR.env.isCustomDomain();function d(e){var f=new CKEDITOR.dom.document(e.document),g=f.$,h=f.getById('cke_actscrpt');h&&h.remove();CKEDITOR.env.ie?g.body.contentEditable='true':g.designMode='on';if(CKEDITOR.env.ie&&CKEDITOR.env.version<8)f.getWindow().on('blur',function(){g.selection.empty();});f.on('keydown',function(i){var j=i.data,k=j.getKeystroke(),l;switch(k){case 27:this.hide();l=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(true);l=1;}l&&j.preventDefault();},this);a.fire('ariaWidget',new CKEDITOR.dom.element(e.frameElement));};return{title:b.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();},onHide:function(){if(CKEDITOR.env.ie)this.getParentEditor().document.getBody().$.contentEditable='true';},onLoad:function(){if((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&a.lang.dir=='rtl')this.parts.contents.setStyle('overflow','hidden');},onOk:function(){this.commitContent();},contents:[{id:'general',label:a.lang.common.generalTab,elements:[{type:'html',id:'securityMsg',html:'<div style="white-space:normal;width:340px;">'+b.securityMsg+'</div>'},{type:'html',id:'pasteMsg',html:'<div style="white-space:normal;width:340px;">'+b.pasteMsg+'</div>'},{type:'html',id:'editing_area',style:'width: 100%; height: 100%;',html:'',focus:function(){var e=this.getInputElement().$.contentWindow;setTimeout(function(){e.focus();},500);},setup:function(){var e=this.getDialog(),f='<html dir="'+a.config.contentsLangDirection+'"'+' lang="'+(a.config.contentsLanguage||a.langCode)+'">'+'<head><style>body { margin: 3px; height: 95%; } </style></head><body>'+'<script id="cke_actscrpt" type="text/javascript">'+'window.parent.CKEDITOR.tools.callFunction( '+CKEDITOR.tools.addFunction(d,e)+', this );'+'</script></body>'+'</html>',g=CKEDITOR.env.air?'javascript:void(0)':c?"javascript:void((function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})())"':'',h=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0"  allowTransparency="true" src="'+g+'"'+' role="region"'+' aria-label="'+b.pasteArea+'"'+' aria-describedby="'+e.getContentElement('general','pasteMsg').domId+'"'+' aria-multiple="true"'+'></iframe>');h.on('load',function(k){k.removeListener();var l=h.getFrameDocument();l.write(f);if(CKEDITOR.env.air)d.call(this,l.getWindow().$);
+},e);h.setCustomData('dialog',e);var i=this.getElement();i.setHtml('');i.append(h);if(CKEDITOR.env.ie){var j=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>');j.on('focus',function(){h.$.contentWindow.focus();});i.append(j);this.focus=function(){j.focus();this.fire('focus');};}this.getInputElement=function(){return h;};if(CKEDITOR.env.ie){i.setStyle('display','block');i.setStyle('height',h.$.offsetHeight+2+'px');}},commit:function(e){var f=this.getElement(),g=this.getDialog().getParentEditor(),h=this.getInputElement().getFrameDocument().getBody(),i=h.getBogus(),j;i&&i.remove();j=h.getHtml();setTimeout(function(){g.fire('paste',{html:j});},0);}}]}]};});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/find/dialogs/find.js b/appsrc/ODS-Framework/ckeditor/plugins/find/dialogs/find.js
index 08094fe..99277bb 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/find/dialogs/find.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/find/dialogs/find.js
@@ -5,5 +5,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 
 (function(){var a;function b(i){return i.type==CKEDITOR.NODE_TEXT&&i.getLength()>0&&(!a||!i.isReadOnly());};function c(i){return!(i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)));};var d=function(){var i=this;return{textNode:i.textNode,offset:i.offset,character:i.textNode?i.textNode.getText().charAt(i.offset):null,hitMatchBoundary:i._.matchBoundary};},e=['find','replace'],f=[['txtFindFind','txtFindReplace'],['txtFindCaseChk','txtReplaceCaseChk'],['txtFindWordChk','txtReplaceWordChk'],['txtFindCyclic','txtReplaceCyclic']];function g(i){var j,k,l,m;j=i==='find'?1:0;k=1-j;var n,o=f.length;for(n=0;n<o;n++){l=this.getContentElement(e[j],f[n][j]);m=this.getContentElement(e[k],f[n][k]);m.setValue(l.getValue());}};var h=function(i,j){var k=new CKEDITOR.style(CKEDITOR.tools.extend({fullMatch:true,childRule:function(){return 0;}},i.config.find_highlight)),l=function(y,z){var A=this,B=new CKEDITOR.dom.walker(y);B.guard=z?c:function(C){!c(C)&&(A._.matchBoundary=true);};B.evaluator=b;B.breakOnFalse=1;if(y.startContainer.type==CKEDITOR.NODE_TEXT){this.textNode=y.startContainer;this.offset=y.startOffset-1;}this._={matchWord:z,walker:B,matchBoundary:false};};l.prototype={next:function(){return this.move();},back:function(){return this.move(true);},move:function(y){var A=this;var z=A.textNode;if(z===null)return d.call(A);A._.matchBoundary=false;if(z&&y&&A.offset>0){A.offset--;return d.call(A);}else if(z&&A.offset<z.getLength()-1){A.offset++;return d.call(A);}else{z=null;while(!z){z=A._.walker[y?'previous':'next'].call(A._.walker);if(A._.matchWord&&!z||A._.walker._.end)break;}A.textNode=z;if(z)A.offset=y?z.getLength()-1:0;else A.offset=0;}return d.call(A);}};var m=function(y,z){this._={walker:y,cursors:[],rangeLength:z,highlightRange:null,isMatched:0};};m.prototype={toDomRange:function(){var y=new CKEDITOR.dom.range(i.document),z=this._.cursors;if(z.length<1){var A=this._.walker.textNode;if(A)y.setStartAfter(A);else return null;}else{var B=z[0],C=z[z.length-1];y.setStart(B.textNode,B.offset);y.setEnd(C.textNode,C.offset+1);}return y;},updateFromDomRange:function(y){var B=this;var z,A=new l(y);B._.cursors=[];do{z=A.next();if(z.character)B._.cursors.push(z);}while(z.character);B._.rangeLength=B._.cursors.length;},setMatched:function(){this._.isMatched=true;},clearMatched:function(){this._.isMatched=false;},isMatched:function(){return this._.isMatched;},highlight:function(){var B=this;if(B._.cursors.length<1)return;
 if(B._.highlightRange)B.removeHighlight();var y=B.toDomRange(),z=y.createBookmark();k.applyToRange(y);y.moveToBookmark(z);B._.highlightRange=y;var A=y.startContainer;if(A.type!=CKEDITOR.NODE_ELEMENT)A=A.getParent();A.scrollIntoView();B.updateFromDomRange(y);},removeHighlight:function(){var z=this;if(!z._.highlightRange)return;var y=z._.highlightRange.createBookmark();k.removeFromRange(z._.highlightRange);z._.highlightRange.moveToBookmark(y);z.updateFromDomRange(z._.highlightRange);z._.highlightRange=null;},isReadOnly:function(){if(!this._.highlightRange)return 0;return this._.highlightRange.startContainer.isReadOnly();},moveBack:function(){var A=this;var y=A._.walker.back(),z=A._.cursors;if(y.hitMatchBoundary)A._.cursors=z=[];z.unshift(y);if(z.length>A._.rangeLength)z.pop();return y;},moveNext:function(){var A=this;var y=A._.walker.next(),z=A._.cursors;if(y.hitMatchBoundary)A._.cursors=z=[];z.push(y);if(z.length>A._.rangeLength)z.shift();return y;},getEndCharacter:function(){var y=this._.cursors;if(y.length<1)return null;return y[y.length-1].character;},getNextCharacterRange:function(y){var z,A,B=this._.cursors;if((z=B[B.length-1])&&z.textNode)A=new l(n(z));else A=this._.walker;return new m(A,y);},getCursors:function(){return this._.cursors;}};function n(y,z){var A=new CKEDITOR.dom.range();A.setStart(y.textNode,z?y.offset:y.offset+1);A.setEndAt(i.document.getBody(),CKEDITOR.POSITION_BEFORE_END);return A;};function o(y){var z=new CKEDITOR.dom.range();z.setStartAt(i.document.getBody(),CKEDITOR.POSITION_AFTER_START);z.setEnd(y.textNode,y.offset);return z;};var p=0,q=1,r=2,s=function(y,z){var A=[-1];if(z)y=y.toLowerCase();for(var B=0;B<y.length;B++){A.push(A[B]+1);while(A[B+1]>0&&y.charAt(B)!=y.charAt(A[B+1]-1))A[B+1]=A[A[B+1]-1]+1;}this._={overlap:A,state:0,ignoreCase:!!z,pattern:y};};s.prototype={feedCharacter:function(y){var z=this;if(z._.ignoreCase)y=y.toLowerCase();for(;;){if(y==z._.pattern.charAt(z._.state)){z._.state++;if(z._.state==z._.pattern.length){z._.state=0;return r;}return q;}else if(!z._.state)return p;else z._.state=z._.overlap[z._.state];}return null;},reset:function(){this._.state=0;}};var t=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,u=function(y){if(!y)return true;var z=y.charCodeAt(0);return z>=9&&z<=13||z>=8192&&z<=8202||t.test(y);},v={searchRange:null,matchRange:null,find:function(y,z,A,B,C,D){var M=this;if(!M.matchRange)M.matchRange=new m(new l(M.searchRange),y.length);else{M.matchRange.removeHighlight();M.matchRange=M.matchRange.getNextCharacterRange(y.length);
-}var E=new s(y,!z),F=p,G='%';while(G!==null){M.matchRange.moveNext();while(G=M.matchRange.getEndCharacter()){F=E.feedCharacter(G);if(F==r)break;if(M.matchRange.moveNext().hitMatchBoundary)E.reset();}if(F==r){if(A){var H=M.matchRange.getCursors(),I=H[H.length-1],J=H[0],K=new l(o(J),true),L=new l(n(I),true);if(!(u(K.back().character)&&u(L.next().character)))continue;}M.matchRange.setMatched();if(C!==false)M.matchRange.highlight();return true;}}M.matchRange.clearMatched();M.matchRange.removeHighlight();if(B&&!D){M.searchRange=w(1);M.matchRange=null;return arguments.callee.apply(M,Array.prototype.slice.call(arguments).concat([true]));}return false;},replaceCounter:0,replace:function(y,z,A,B,C,D,E){var J=this;a=1;var F=0;if(J.matchRange&&J.matchRange.isMatched()&&!J.matchRange._.isReplaced&&!J.matchRange.isReadOnly()){J.matchRange.removeHighlight();var G=J.matchRange.toDomRange(),H=i.document.createText(A);if(!E){var I=i.getSelection();I.selectRanges([G]);i.fire('saveSnapshot');}G.deleteContents();G.insertNode(H);if(!E){I.selectRanges([G]);i.fire('saveSnapshot');}J.matchRange.updateFromDomRange(G);if(!E)J.matchRange.highlight();J.matchRange._.isReplaced=true;J.replaceCounter++;F=1;}else F=J.find(z,B,C,D,!E);a=0;return F;}};function w(y){var z,A=i.getSelection(),B=i.document.getBody();if(A&&!y){z=A.getRanges()[0].clone();z.collapse(true);}else{z=new CKEDITOR.dom.range();z.setStartAt(B,CKEDITOR.POSITION_AFTER_START);}z.setEndAt(B,CKEDITOR.POSITION_BEFORE_END);return z;};var x=i.lang.findAndReplace;return{title:x.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:'find',label:x.find,title:x.find,accessKey:'',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindFind',label:x.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:x.find,onClick:function(){var y=this.getDialog();if(!v.find(y.getValueOf('find','txtFindFind'),y.getValueOf('find','txtFindCaseChk'),y.getValueOf('find','txtFindWordChk'),y.getValueOf('find','txtFindCyclic')))alert(x.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtFindCaseChk',isChanged:false,style:'margin-top:28px',label:x.matchCase},{type:'checkbox',id:'txtFindWordChk',isChanged:false,label:x.matchWord},{type:'checkbox',id:'txtFindCyclic',isChanged:false,'default':true,label:x.matchCyclic}]}]},{id:'replace',label:x.replace,accessKey:'M',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindReplace',label:x.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:x.replace,onClick:function(){var y=this.getDialog();
-if(!v.replace(y,y.getValueOf('replace','txtFindReplace'),y.getValueOf('replace','txtReplace'),y.getValueOf('replace','txtReplaceCaseChk'),y.getValueOf('replace','txtReplaceWordChk'),y.getValueOf('replace','txtReplaceCyclic')))alert(x.notFoundMsg);}}]},{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtReplace',label:x.replaceWith,isChanged:false,labelLayout:'horizontal',accessKey:'R'},{type:'button',align:'left',style:'width:100%',label:x.replaceAll,isChanged:false,onClick:function(){var y=this.getDialog(),z;v.replaceCounter=0;v.searchRange=w(1);if(v.matchRange){v.matchRange.removeHighlight();v.matchRange=null;}i.fire('saveSnapshot');while(v.replace(y,y.getValueOf('replace','txtFindReplace'),y.getValueOf('replace','txtReplace'),y.getValueOf('replace','txtReplaceCaseChk'),y.getValueOf('replace','txtReplaceWordChk'),false,true)){}if(v.replaceCounter){alert(x.replaceSuccessMsg.replace(/%1/,v.replaceCounter));i.fire('saveSnapshot');}else alert(x.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtReplaceCaseChk',isChanged:false,label:x.matchCase},{type:'checkbox',id:'txtReplaceWordChk',isChanged:false,label:x.matchWord},{type:'checkbox',id:'txtReplaceCyclic',isChanged:false,'default':true,label:x.matchCyclic}]}]}],onLoad:function(){var y=this,z,A,B=0;this.on('hide',function(){B=0;});this.on('show',function(){B=1;});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(C){return function(D){C.call(y,D);var E=y._.tabs[D],F,G,H;G=D==='find'?'txtFindFind':'txtFindReplace';H=D==='find'?'txtFindWordChk':'txtReplaceWordChk';z=y.getContentElement(D,G);A=y.getContentElement(D,H);if(!E.initialized){F=CKEDITOR.document.getById(z._.inputId);E.initialized=true;}if(B)g.call(this,D);};});},onShow:function(){v.searchRange=w();this.selectPage(j);},onHide:function(){var y;if(v.matchRange&&v.matchRange.isMatched()){v.matchRange.removeHighlight();i.focus();y=v.matchRange.toDomRange();if(y)i.getSelection().selectRanges([y]);}delete v.matchRange;},onFocus:function(){if(j=='replace')return this.getContentElement('replace','txtFindReplace');else return this.getContentElement('find','txtFindFind');}};};CKEDITOR.dialog.add('find',function(i){return h(i,'find');});CKEDITOR.dialog.add('replace',function(i){return h(i,'replace');});})();
+}var E=new s(y,!z),F=p,G='%';while(G!==null){M.matchRange.moveNext();while(G=M.matchRange.getEndCharacter()){F=E.feedCharacter(G);if(F==r)break;if(M.matchRange.moveNext().hitMatchBoundary)E.reset();}if(F==r){if(A){var H=M.matchRange.getCursors(),I=H[H.length-1],J=H[0],K=new l(o(J),true),L=new l(n(I),true);if(!(u(K.back().character)&&u(L.next().character)))continue;}M.matchRange.setMatched();if(C!==false)M.matchRange.highlight();return true;}}M.matchRange.clearMatched();M.matchRange.removeHighlight();if(B&&!D){M.searchRange=w(1);M.matchRange=null;return arguments.callee.apply(M,Array.prototype.slice.call(arguments).concat([true]));}return false;},replaceCounter:0,replace:function(y,z,A,B,C,D,E){var J=this;a=1;var F=0;if(J.matchRange&&J.matchRange.isMatched()&&!J.matchRange._.isReplaced&&!J.matchRange.isReadOnly()){J.matchRange.removeHighlight();var G=J.matchRange.toDomRange(),H=i.document.createText(A);if(!E){var I=i.getSelection();I.selectRanges([G]);i.fire('saveSnapshot');}G.deleteContents();G.insertNode(H);if(!E){I.selectRanges([G]);i.fire('saveSnapshot');}J.matchRange.updateFromDomRange(G);if(!E)J.matchRange.highlight();J.matchRange._.isReplaced=true;J.replaceCounter++;F=1;}else F=J.find(z,B,C,D,!E);a=0;return F;}};function w(y){var z,A=i.getSelection(),B=i.document.getBody();if(A&&!y){z=A.getRanges()[0].clone();z.collapse(true);}else{z=new CKEDITOR.dom.range();z.setStartAt(B,CKEDITOR.POSITION_AFTER_START);}z.setEndAt(B,CKEDITOR.POSITION_BEFORE_END);return z;};var x=i.lang.findAndReplace;return{title:x.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:'find',label:x.find,title:x.find,accessKey:'',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindFind',label:x.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',id:'btnFind',align:'left',style:'width:100%',label:x.find,onClick:function(){var y=this.getDialog();if(!v.find(y.getValueOf('find','txtFindFind'),y.getValueOf('find','txtFindCaseChk'),y.getValueOf('find','txtFindWordChk'),y.getValueOf('find','txtFindCyclic')))alert(x.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtFindCaseChk',isChanged:false,style:'margin-top:28px',label:x.matchCase},{type:'checkbox',id:'txtFindWordChk',isChanged:false,label:x.matchWord},{type:'checkbox',id:'txtFindCyclic',isChanged:false,'default':true,label:x.matchCyclic}]}]},{id:'replace',label:x.replace,accessKey:'M',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindReplace',label:x.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',id:'btnFindReplace',align:'left',style:'width:100%',label:x.replace,onClick:function(){var y=this.getDialog();
+if(!v.replace(y,y.getValueOf('replace','txtFindReplace'),y.getValueOf('replace','txtReplace'),y.getValueOf('replace','txtReplaceCaseChk'),y.getValueOf('replace','txtReplaceWordChk'),y.getValueOf('replace','txtReplaceCyclic')))alert(x.notFoundMsg);}}]},{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtReplace',label:x.replaceWith,isChanged:false,labelLayout:'horizontal',accessKey:'R'},{type:'button',id:'btnReplaceAll',align:'left',style:'width:100%',label:x.replaceAll,isChanged:false,onClick:function(){var y=this.getDialog(),z;v.replaceCounter=0;v.searchRange=w(1);if(v.matchRange){v.matchRange.removeHighlight();v.matchRange=null;}i.fire('saveSnapshot');while(v.replace(y,y.getValueOf('replace','txtFindReplace'),y.getValueOf('replace','txtReplace'),y.getValueOf('replace','txtReplaceCaseChk'),y.getValueOf('replace','txtReplaceWordChk'),false,true)){}if(v.replaceCounter){alert(x.replaceSuccessMsg.replace(/%1/,v.replaceCounter));i.fire('saveSnapshot');}else alert(x.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtReplaceCaseChk',isChanged:false,label:x.matchCase},{type:'checkbox',id:'txtReplaceWordChk',isChanged:false,label:x.matchWord},{type:'checkbox',id:'txtReplaceCyclic',isChanged:false,'default':true,label:x.matchCyclic}]}]}],onLoad:function(){var y=this,z,A,B=0;this.on('hide',function(){B=0;});this.on('show',function(){B=1;});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(C){return function(D){C.call(y,D);var E=y._.tabs[D],F,G,H;G=D==='find'?'txtFindFind':'txtFindReplace';H=D==='find'?'txtFindWordChk':'txtReplaceWordChk';z=y.getContentElement(D,G);A=y.getContentElement(D,H);if(!E.initialized){F=CKEDITOR.document.getById(z._.inputId);E.initialized=true;}if(B)g.call(this,D);};});},onShow:function(){var B=this;v.searchRange=w();var y=B.getParentEditor().getSelection().getSelectedText(),z=j=='find'?'txtFindFind':'txtFindReplace',A=B.getContentElement(j,z);A.setValue(y);A.select();B.selectPage(j);B[(j=='find'&&B._.editor.readOnly?'hide':'show')+'Page']('replace');},onHide:function(){var y;if(v.matchRange&&v.matchRange.isMatched()){v.matchRange.removeHighlight();i.focus();y=v.matchRange.toDomRange();if(y)i.getSelection().selectRanges([y]);}delete v.matchRange;},onFocus:function(){if(j=='replace')return this.getContentElement('replace','txtFindReplace');else return this.getContentElement('find','txtFindFind');}};};CKEDITOR.dialog.add('find',function(i){return h(i,'find');});CKEDITOR.dialog.add('replace',function(i){return h(i,'replace');
+});})();
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/flash/dialogs/flash.js b/appsrc/ODS-Framework/ckeditor/plugins/flash/dialogs/flash.js
index 63d5da0..a0f522b 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/flash/dialogs/flash.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/flash/dialogs/flash.js
@@ -3,7 +3,7 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){var a=1,b=2,c=4,d={id:[{type:a,name:'id'}],classid:[{type:a,name:'classid'}],codebase:[{type:a,name:'codebase'}],pluginspage:[{type:c,name:'pluginspage'}],src:[{type:b,name:'movie'},{type:c,name:'src'}],name:[{type:c,name:'name'}],align:[{type:a,name:'align'}],title:[{type:a,name:'title'},{type:c,name:'title'}],'class':[{type:a,name:'class'},{type:c,name:'class'}],width:[{type:a,name:'width'},{type:c,name:'width'}],height:[{type:a,name:'height'},{type:c,name:'height'}],hSpace:[{type:a,name:'hSpace'},{type:c,name:'hSpace'}],vSpace:[{type:a,name:'vSpace'},{type:c,name:'vSpace'}],style:[{type:a,name:'style'},{type:c,name:'style'}],type:[{type:c,name:'type'}]},e=['play','loop','menu','quality','scale','salign','wmode','bgcolor','base','flashvars','allowScriptAccess','allowFullScreen'];for(var f=0;f<e.length;f++)d[e[f]]=[{type:c,name:e[f]},{type:b,name:e[f]}];e=['allowFullScreen','play','loop','menu'];for(f=0;f<e.length;f++)d[e[f]][0]['default']=d[e[f]][1]['default']=true;function g(i,j,k){var q=this;var l=d[q.id];if(!l)return;var m=q instanceof CKEDITOR.ui.dialog.checkbox;for(var n=0;n<l.length;n++){var o=l[n];switch(o.type){case a:if(!i)continue;if(i.getAttribute(o.name)!==null){var p=i.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case b:if(!i)continue;if(o.name in k){p=k[o.name];if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case c:if(!j)continue;if(j.getAttribute(o.name)){p=j.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);}}};function h(i,j,k){var s=this;var l=d[s.id];if(!l)return;var m=s.getValue()==='',n=s instanceof CKEDITOR.ui.dialog.checkbox;for(var o=0;o<l.length;o++){var p=l[o];switch(p.type){case a:if(!i)continue;var q=s.getValue();if(m||n&&q===p['default'])i.removeAttribute(p.name);else i.setAttribute(p.name,q);break;case b:if(!i)continue;q=s.getValue();if(m||n&&q===p['default']){if(p.name in k)k[p.name].remove();}else if(p.name in k)k[p.name].setAttribute('value',q);else{var r=CKEDITOR.dom.element.createFromHtml('<cke:param></cke:param>',i.getDocument());r.setAttributes({name:p.name,value:q});if(i.getChildCount()<1)r.appendTo(i);else r.insertBefore(i.getFirst());}break;case c:if(!j)continue;q=s.getValue();if(m||n&&q===p['default'])j.removeAttribute(p.name);else j.setAttribute(p.name,q);}}};CKEDITOR.dialog.add('flash',function(i){var j=!i.config.flashEmbedTagOnly,k=i.config.flashAddEmbedTag||i.config.flashEmbedTagOnly,l,m='<div>'+CKEDITOR.tools.htmlEncode(i.lang.common.preview)+'<br>'+'<div id="cke_FlashPreviewLoader'+CKEDITOR.tools.getNextNumber()+'" style="display:none"><div class="loading"> </div></div>'+'<div id="cke_FlashPreviewBox'+CKEDITOR.tools.getNextNumber()+'" class="FlashPreviewBox"></div></div>';
-return{title:i.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){var z=this;z.fakeImage=z.objectNode=z.embedNode=null;l=new CKEDITOR.dom.element('embed',i.document);var n=z.getSelectedElement();if(n&&n.data('cke-real-element-type')&&n.data('cke-real-element-type')=='flash'){z.fakeImage=n;var o=i.restoreRealElement(n),p=null,q=null,r={};if(o.getName()=='cke:object'){p=o;var s=p.getElementsByTag('embed','cke');if(s.count()>0)q=s.getItem(0);var t=p.getElementsByTag('param','cke');for(var u=0,v=t.count();u<v;u++){var w=t.getItem(u),x=w.getAttribute('name'),y=w.getAttribute('value');r[x]=y;}}else if(o.getName()=='cke:embed')q=o;z.objectNode=p;z.embedNode=q;z.setupContent(p,q,r,n);}},onOk:function(){var x=this;var n=null,o=null,p=null;if(!x.fakeImage){if(j){n=CKEDITOR.dom.element.createFromHtml('<cke:object></cke:object>',i.document);var q={classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',codebase:'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'};n.setAttributes(q);}if(k){o=CKEDITOR.dom.element.createFromHtml('<cke:embed></cke:embed>',i.document);o.setAttributes({type:'application/x-shockwave-flash',pluginspage:'http://www.macromedia.com/go/getflashplayer'});if(n)o.appendTo(n);}}else{n=x.objectNode;o=x.embedNode;}if(n){p={};var r=n.getElementsByTag('param','cke');for(var s=0,t=r.count();s<t;s++)p[r.getItem(s).getAttribute('name')]=r.getItem(s);}var u={},v={};x.commitContent(n,o,p,u,v);var w=i.createFakeElement(n||o,'cke_flash','flash',true);w.setAttributes(v);w.setStyles(u);if(x.fakeImage){w.replace(x.fakeImage);i.getSelection().selectElement(w);}else i.insertElement(w);},onHide:function(){if(this.preview)this.preview.setHtml('');},contents:[{id:'info',label:i.lang.common.generalTab,accessKey:'I',elements:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['280px','110px'],align:'right',children:[{id:'src',type:'text',label:i.lang.common.url,required:true,validate:CKEDITOR.dialog.validate.notEmpty(i.lang.flash.validateSrc),setup:g,commit:h,onLoad:function(){var n=this.getDialog(),o=function(p){l.setAttribute('src',p);n.preview.setHtml('<embed height="100%" width="100%" src="'+CKEDITOR.tools.htmlEncode(l.getAttribute('src'))+'" type="application/x-shockwave-flash"></embed>');};n.preview=n.getContentElement('info','preview').getElement().getChild(3);this.on('change',function(p){if(p.data&&p.data.value)o(p.data.value);});this.getInputElement().on('change',function(p){o(this.getValue());},this);}},{type:'button',id:'browse',filebrowser:'info:src',hidden:true,style:'display:inline-block;margin-top:10px;',label:i.lang.common.browseServer}]}]},{type:'hbox',widths:['25%','25%','25%','25%','25%'],children:[{type:'text',id:'width',style:'width:95px',label:i.lang.common.width,validate:CKEDITOR.dialog.validate.integer(i.lang.common.invalidWidth),setup:function(n,o,p,q){g.apply(this,arguments);
-if(q){var r=parseInt(q.$.style.width,10);if(!isNaN(r))this.setValue(r);}},commit:function(n,o,p,q){h.apply(this,arguments);if(this.getValue())q.width=this.getValue()+'px';}},{type:'text',id:'height',style:'width:95px',label:i.lang.common.height,validate:CKEDITOR.dialog.validate.integer(i.lang.common.invalidHeight),setup:function(n,o,p,q){g.apply(this,arguments);if(q){var r=parseInt(q.$.style.height,10);if(!isNaN(r))this.setValue(r);}},commit:function(n,o,p,q){h.apply(this,arguments);if(this.getValue())q.height=this.getValue()+'px';}},{type:'text',id:'hSpace',style:'width:95px',label:i.lang.flash.hSpace,validate:CKEDITOR.dialog.validate.integer(i.lang.flash.validateHSpace),setup:g,commit:h},{type:'text',id:'vSpace',style:'width:95px',label:i.lang.flash.vSpace,validate:CKEDITOR.dialog.validate.integer(i.lang.flash.validateVSpace),setup:g,commit:h}]},{type:'vbox',children:[{type:'html',id:'preview',style:'width:95%;',html:m}]}]},{id:'Upload',hidden:true,filebrowser:'uploadButton',label:i.lang.common.upload,elements:[{type:'file',id:'upload',label:i.lang.common.upload,size:38},{type:'fileButton',id:'uploadButton',label:i.lang.common.uploadSubmit,filebrowser:'info:src','for':['Upload','upload']}]},{id:'properties',label:i.lang.flash.propertiesTab,elements:[{type:'hbox',widths:['50%','50%'],children:[{id:'scale',type:'select',label:i.lang.flash.scale,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.scaleAll,'showall'],[i.lang.flash.scaleNoBorder,'noborder'],[i.lang.flash.scaleFit,'exactfit']],setup:g,commit:h},{id:'allowScriptAccess',type:'select',label:i.lang.flash.access,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.accessAlways,'always'],[i.lang.flash.accessSameDomain,'samedomain'],[i.lang.flash.accessNever,'never']],setup:g,commit:h}]},{type:'hbox',widths:['50%','50%'],children:[{id:'wmode',type:'select',label:i.lang.flash.windowMode,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.windowModeWindow,'window'],[i.lang.flash.windowModeOpaque,'opaque'],[i.lang.flash.windowModeTransparent,'transparent']],setup:g,commit:h},{id:'quality',type:'select',label:i.lang.flash.quality,'default':'high',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.qualityBest,'best'],[i.lang.flash.qualityHigh,'high'],[i.lang.flash.qualityAutoHigh,'autohigh'],[i.lang.flash.qualityMedium,'medium'],[i.lang.flash.qualityAutoLow,'autolow'],[i.lang.flash.qualityLow,'low']],setup:g,commit:h}]},{type:'hbox',widths:['50%','50%'],children:[{id:'align',type:'select',label:i.lang.common.align,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.common.alignLeft,'left'],[i.lang.flash.alignAbsBottom,'absBottom'],[i.lang.flash.alignAbsMiddle,'absMiddle'],[i.lang.flash.alignBaseline,'baseline'],[i.lang.common.alignBottom,'bottom'],[i.lang.common.alignMiddle,'middle'],[i.lang.common.alignRight,'right'],[i.lang.flash.alignTextTop,'textTop'],[i.lang.common.alignTop,'top']],setup:g,commit:function(n,o,p,q,r){var s=this.getValue();
-h.apply(this,arguments);s&&(r.align=s);}},{type:'html',html:'<div></div>'}]},{type:'fieldset',label:CKEDITOR.tools.htmlEncode(i.lang.flash.flashvars),children:[{type:'vbox',padding:0,children:[{type:'checkbox',id:'menu',label:i.lang.flash.chkMenu,'default':true,setup:g,commit:h},{type:'checkbox',id:'play',label:i.lang.flash.chkPlay,'default':true,setup:g,commit:h},{type:'checkbox',id:'loop',label:i.lang.flash.chkLoop,'default':true,setup:g,commit:h},{type:'checkbox',id:'allowFullScreen',label:i.lang.flash.chkFull,'default':true,setup:g,commit:h}]}]}]},{id:'advanced',label:i.lang.common.advancedTab,elements:[{type:'hbox',widths:['45%','55%'],children:[{type:'text',id:'id',label:i.lang.common.id,setup:g,commit:h},{type:'text',id:'title',label:i.lang.common.advisoryTitle,setup:g,commit:h}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',id:'bgcolor',label:i.lang.flash.bgcolor,setup:g,commit:h},{type:'text',id:'class',label:i.lang.common.cssClass,setup:g,commit:h}]},{type:'text',id:'style',label:i.lang.common.cssStyle,setup:g,commit:h}]}]};});})();
+(function(){var a=1,b=2,c=4,d={id:[{type:a,name:'id'}],classid:[{type:a,name:'classid'}],codebase:[{type:a,name:'codebase'}],pluginspage:[{type:c,name:'pluginspage'}],src:[{type:b,name:'movie'},{type:c,name:'src'},{type:a,name:'data'}],name:[{type:c,name:'name'}],align:[{type:a,name:'align'}],title:[{type:a,name:'title'},{type:c,name:'title'}],'class':[{type:a,name:'class'},{type:c,name:'class'}],width:[{type:a,name:'width'},{type:c,name:'width'}],height:[{type:a,name:'height'},{type:c,name:'height'}],hSpace:[{type:a,name:'hSpace'},{type:c,name:'hSpace'}],vSpace:[{type:a,name:'vSpace'},{type:c,name:'vSpace'}],style:[{type:a,name:'style'},{type:c,name:'style'}],type:[{type:c,name:'type'}]},e=['play','loop','menu','quality','scale','salign','wmode','bgcolor','base','flashvars','allowScriptAccess','allowFullScreen'];for(var f=0;f<e.length;f++)d[e[f]]=[{type:c,name:e[f]},{type:b,name:e[f]}];e=['allowFullScreen','play','loop','menu'];for(f=0;f<e.length;f++)d[e[f]][0]['default']=d[e[f]][1]['default']=true;var g=CKEDITOR.tools.cssLength;function h(j,k,l){var r=this;var m=d[r.id];if(!m)return;var n=r instanceof CKEDITOR.ui.dialog.checkbox;for(var o=0;o<m.length;o++){var p=m[o];switch(p.type){case a:if(!j)continue;if(j.getAttribute(p.name)!==null){var q=j.getAttribute(p.name);if(n)r.setValue(q.toLowerCase()=='true');else r.setValue(q);return;}else if(n)r.setValue(!!p['default']);break;case b:if(!j)continue;if(p.name in l){q=l[p.name];if(n)r.setValue(q.toLowerCase()=='true');else r.setValue(q);return;}else if(n)r.setValue(!!p['default']);break;case c:if(!k)continue;if(k.getAttribute(p.name)){q=k.getAttribute(p.name);if(n)r.setValue(q.toLowerCase()=='true');else r.setValue(q);return;}else if(n)r.setValue(!!p['default']);}}};function i(j,k,l){var t=this;var m=d[t.id];if(!m)return;var n=t.getValue()==='',o=t instanceof CKEDITOR.ui.dialog.checkbox;for(var p=0;p<m.length;p++){var q=m[p];switch(q.type){case a:if(!j||q.name=='data'&&k&&!j.hasAttribute('data'))continue;var r=t.getValue();if(n||o&&r===q['default'])j.removeAttribute(q.name);else j.setAttribute(q.name,r);break;case b:if(!j)continue;r=t.getValue();if(n||o&&r===q['default']){if(q.name in l)l[q.name].remove();}else if(q.name in l)l[q.name].setAttribute('value',r);else{var s=CKEDITOR.dom.element.createFromHtml('<cke:param></cke:param>',j.getDocument());s.setAttributes({name:q.name,value:r});if(j.getChildCount()<1)s.appendTo(j);else s.insertBefore(j.getFirst());}break;case c:if(!k)continue;r=t.getValue();if(n||o&&r===q['default'])k.removeAttribute(q.name);
+else k.setAttribute(q.name,r);}}};CKEDITOR.dialog.add('flash',function(j){var k=!j.config.flashEmbedTagOnly,l=j.config.flashAddEmbedTag||j.config.flashEmbedTagOnly,m,n='<div>'+CKEDITOR.tools.htmlEncode(j.lang.common.preview)+'<br>'+'<div id="cke_FlashPreviewLoader'+CKEDITOR.tools.getNextNumber()+'" style="display:none"><div class="loading"> </div></div>'+'<div id="cke_FlashPreviewBox'+CKEDITOR.tools.getNextNumber()+'" class="FlashPreviewBox"></div></div>';return{title:j.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){var A=this;A.fakeImage=A.objectNode=A.embedNode=null;m=new CKEDITOR.dom.element('embed',j.document);var o=A.getSelectedElement();if(o&&o.data('cke-real-element-type')&&o.data('cke-real-element-type')=='flash'){A.fakeImage=o;var p=j.restoreRealElement(o),q=null,r=null,s={};if(p.getName()=='cke:object'){q=p;var t=q.getElementsByTag('embed','cke');if(t.count()>0)r=t.getItem(0);var u=q.getElementsByTag('param','cke');for(var v=0,w=u.count();v<w;v++){var x=u.getItem(v),y=x.getAttribute('name'),z=x.getAttribute('value');s[y]=z;}}else if(p.getName()=='cke:embed')r=p;A.objectNode=q;A.embedNode=r;A.setupContent(q,r,s,o);}},onOk:function(){var y=this;var o=null,p=null,q=null;if(!y.fakeImage){if(k){o=CKEDITOR.dom.element.createFromHtml('<cke:object></cke:object>',j.document);var r={classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',codebase:'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'};o.setAttributes(r);}if(l){p=CKEDITOR.dom.element.createFromHtml('<cke:embed></cke:embed>',j.document);p.setAttributes({type:'application/x-shockwave-flash',pluginspage:'http://www.macromedia.com/go/getflashplayer'});if(o)p.appendTo(o);}}else{o=y.objectNode;p=y.embedNode;}if(o){q={};var s=o.getElementsByTag('param','cke');for(var t=0,u=s.count();t<u;t++)q[s.getItem(t).getAttribute('name')]=s.getItem(t);}var v={},w={};y.commitContent(o,p,q,v,w);var x=j.createFakeElement(o||p,'cke_flash','flash',true);x.setAttributes(w);x.setStyles(v);if(y.fakeImage){x.replace(y.fakeImage);j.getSelection().selectElement(x);}else j.insertElement(x);},onHide:function(){if(this.preview)this.preview.setHtml('');},contents:[{id:'info',label:j.lang.common.generalTab,accessKey:'I',elements:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['280px','110px'],align:'right',children:[{id:'src',type:'text',label:j.lang.common.url,required:true,validate:CKEDITOR.dialog.validate.notEmpty(j.lang.flash.validateSrc),setup:h,commit:i,onLoad:function(){var o=this.getDialog(),p=function(q){m.setAttribute('src',q);
+o.preview.setHtml('<embed height="100%" width="100%" src="'+CKEDITOR.tools.htmlEncode(m.getAttribute('src'))+'" type="application/x-shockwave-flash"></embed>');};o.preview=o.getContentElement('info','preview').getElement().getChild(3);this.on('change',function(q){if(q.data&&q.data.value)p(q.data.value);});this.getInputElement().on('change',function(q){p(this.getValue());},this);}},{type:'button',id:'browse',filebrowser:'info:src',hidden:true,style:'display:inline-block;margin-top:10px;',label:j.lang.common.browseServer}]}]},{type:'hbox',widths:['25%','25%','25%','25%','25%'],children:[{type:'text',id:'width',style:'width:95px',label:j.lang.common.width,validate:CKEDITOR.dialog.validate.htmlLength(j.lang.common.invalidHtmlLength.replace('%1',j.lang.common.width)),setup:h,commit:i},{type:'text',id:'height',style:'width:95px',label:j.lang.common.height,validate:CKEDITOR.dialog.validate.htmlLength(j.lang.common.invalidHtmlLength.replace('%1',j.lang.common.height)),setup:h,commit:i},{type:'text',id:'hSpace',style:'width:95px',label:j.lang.flash.hSpace,validate:CKEDITOR.dialog.validate.integer(j.lang.flash.validateHSpace),setup:h,commit:i},{type:'text',id:'vSpace',style:'width:95px',label:j.lang.flash.vSpace,validate:CKEDITOR.dialog.validate.integer(j.lang.flash.validateVSpace),setup:h,commit:i}]},{type:'vbox',children:[{type:'html',id:'preview',style:'width:95%;',html:n}]}]},{id:'Upload',hidden:true,filebrowser:'uploadButton',label:j.lang.common.upload,elements:[{type:'file',id:'upload',label:j.lang.common.upload,size:38},{type:'fileButton',id:'uploadButton',label:j.lang.common.uploadSubmit,filebrowser:'info:src','for':['Upload','upload']}]},{id:'properties',label:j.lang.flash.propertiesTab,elements:[{type:'hbox',widths:['50%','50%'],children:[{id:'scale',type:'select',label:j.lang.flash.scale,'default':'',style:'width : 100%;',items:[[j.lang.common.notSet,''],[j.lang.flash.scaleAll,'showall'],[j.lang.flash.scaleNoBorder,'noborder'],[j.lang.flash.scaleFit,'exactfit']],setup:h,commit:i},{id:'allowScriptAccess',type:'select',label:j.lang.flash.access,'default':'',style:'width : 100%;',items:[[j.lang.common.notSet,''],[j.lang.flash.accessAlways,'always'],[j.lang.flash.accessSameDomain,'samedomain'],[j.lang.flash.accessNever,'never']],setup:h,commit:i}]},{type:'hbox',widths:['50%','50%'],children:[{id:'wmode',type:'select',label:j.lang.flash.windowMode,'default':'',style:'width : 100%;',items:[[j.lang.common.notSet,''],[j.lang.flash.windowModeWindow,'window'],[j.lang.flash.windowModeOpaque,'opaque'],[j.lang.flash.windowModeTransparent,'transparent']],setup:h,commit:i},{id:'quality',type:'select',label:j.lang.flash.quality,'default':'high',style:'width : 100%;',items:[[j.lang.common.notSet,''],[j.lang.flash.qualityBest,'best'],[j.lang.flash.qualityHigh,'high'],[j.lang.flash.qualityAutoHigh,'autohigh'],[j.lang.flash.qualityMedium,'medium'],[j.lang.flash.qualityAutoLow,'autolow'],[j.lang.flash.qualityLow,'low']],setup:h,commit:i}]},{type:'hbox',widths:['50%','50%'],children:[{id:'align',type:'select',label:j.lang.common.align,'default':'',style:'width : 100%;',items:[[j.lang.common.notSet,''],[j.lang.common.alignLeft,'left'],[j.lang.flash.alignAbsBottom,'absBottom'],[j.lang.flash.alignAbsMiddle,'absMiddle'],[j.lang.flash.alignBaseline,'baseline'],[j.lang.common.alignBottom,'bottom'],[j.lang.common.alignMiddle,'middle'],[j.lang.common.alignRight,'right'],[j.lang.flash.alignTextTop,'textTop'],[j.lang.common.alignTop,'top']],setup:h,commit:function(o,p,q,r,s){var t=this.getValue();
+i.apply(this,arguments);t&&(s.align=t);}},{type:'html',html:'<div></div>'}]},{type:'fieldset',label:CKEDITOR.tools.htmlEncode(j.lang.flash.flashvars),children:[{type:'vbox',padding:0,children:[{type:'checkbox',id:'menu',label:j.lang.flash.chkMenu,'default':true,setup:h,commit:i},{type:'checkbox',id:'play',label:j.lang.flash.chkPlay,'default':true,setup:h,commit:i},{type:'checkbox',id:'loop',label:j.lang.flash.chkLoop,'default':true,setup:h,commit:i},{type:'checkbox',id:'allowFullScreen',label:j.lang.flash.chkFull,'default':true,setup:h,commit:i}]}]}]},{id:'advanced',label:j.lang.common.advancedTab,elements:[{type:'hbox',widths:['45%','55%'],children:[{type:'text',id:'id',label:j.lang.common.id,setup:h,commit:i},{type:'text',id:'title',label:j.lang.common.advisoryTitle,setup:h,commit:i}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',id:'bgcolor',label:j.lang.flash.bgcolor,setup:h,commit:i},{type:'text',id:'class',label:j.lang.common.cssClass,setup:h,commit:i}]},{type:'text',id:'style',label:j.lang.common.cssStyle,setup:h,commit:i}]}]};});})();
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/image/dialogs/image.js b/appsrc/ODS-Framework/ckeditor/plugins/image/dialogs/image.js
index 09a9041..18b361b 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/image/dialogs/image.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/image/dialogs/image.js
@@ -3,11 +3,11 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){var a=function(b,c){var d=1,e=2,f=4,g=8,h=/^\s*(\d+)((px)|\%)?\s*$/i,i=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,j=/^\d+px$/,k=function(){var C=this.getValue(),D=this.getDialog(),E=C.match(h);if(E){if(E[2]=='%')p(D,false);C=E[1];}if(D.lockRatio){var F=D.originalElement;if(F.getCustomData('isReady')=='true')if(this.id=='txtHeight'){if(C&&C!='0')C=Math.round(F.$.width*(C/F.$.height));if(!isNaN(C))D.setValueOf('info','txtWidth',C);}else{if(C&&C!='0')C=Math.round(F.$.height*(C/F.$.width));if(!isNaN(C))D.setValueOf('info','txtHeight',C);}}l(D);},l=function(C){if(!C.originalElement||!C.preview)return 1;C.commitContent(f,C.preview);return 0;};function m(){var C=arguments,D=this.getContentElement('advanced','txtdlgGenStyle');D&&D.commit.apply(D,C);this.foreach(function(E){if(E.commit&&E.id!='txtdlgGenStyle')E.commit.apply(E,C);});};var n;function o(C){if(n)return;n=1;var D=this.getDialog(),E=D.imageElement;if(E){this.commit(d,E);C=[].concat(C);var F=C.length,G;for(var H=0;H<F;H++){G=D.getContentElement.apply(D,C[H].split(':'));G&&G.setup(d,E);}}n=0;};var p=function(C,D){var E=C.originalElement;if(!E)return null;var F=CKEDITOR.document.getById(w);if(E.getCustomData('isReady')=='true'){if(D=='check'){var G=C.getValueOf('info','txtWidth'),H=C.getValueOf('info','txtHeight'),I=E.$.width*1000/E.$.height,J=G*1000/H;C.lockRatio=false;if(!G&&!H)C.lockRatio=true;else if(!isNaN(I)&&!isNaN(J))if(Math.round(I)==Math.round(J))C.lockRatio=true;}else if(D!=undefined)C.lockRatio=D;else C.lockRatio=!C.lockRatio;}else if(D!='check')C.lockRatio=false;if(C.lockRatio)F.removeClass('cke_btn_unlocked');else F.addClass('cke_btn_unlocked');var K=C._.editor.lang.image,L=K[C.lockRatio?'unlockRatio':'lockRatio'];F.setAttribute('title',L);F.getFirst().setText(L);return C.lockRatio;},q=function(C){var D=C.originalElement;if(D.getCustomData('isReady')=='true'){C.setValueOf('info','txtWidth',D.$.width);C.setValueOf('info','txtHeight',D.$.height);}l(C);},r=function(C,D){if(C!=d)return;function E(J,K){var L=J.match(h);if(L){if(L[2]=='%'){L[1]+='%';p(F,false);}return L[1];}return K;};var F=this.getDialog(),G='',H=this.id=='txtWidth'?'width':'height',I=D.getAttribute(H);if(I)G=E(I,G);G=E(D.getStyle(H),G);this.setValue(G);},s,t=function(){var C=this.originalElement;C.setCustomData('isReady','true');C.removeListener('load',t);C.removeListener('error',u);C.removeListener('abort',u);CKEDITOR.document.getById(y).setStyle('display','none');if(!this.dontResetSize)q(this);if(this.firstLoad)CKEDITOR.tools.setTimeout(function(){p(this,'check');
-},0,this);this.firstLoad=false;this.dontResetSize=false;},u=function(){var E=this;var C=E.originalElement;C.removeListener('load',t);C.removeListener('error',u);C.removeListener('abort',u);var D=CKEDITOR.getUrl(b.skinPath+'images/noimage.png');if(E.preview)E.preview.setAttribute('src',D);CKEDITOR.document.getById(y).setStyle('display','none');p(E,false);},v=function(C){return CKEDITOR.tools.getNextId()+'_'+C;},w=v('btnLockSizes'),x=v('btnResetSize'),y=v('ImagePreviewLoader'),z=v('ImagePreviewBox'),A=v('previewLink'),B=v('previewImage');return{title:b.lang.image[c=='image'?'title':'titleButton'],minWidth:420,minHeight:360,onShow:function(){var I=this;I.imageElement=false;I.linkElement=false;I.imageEditMode=false;I.linkEditMode=false;I.lockRatio=true;I.dontResetSize=false;I.firstLoad=true;I.addLink=false;var C=I.getParentEditor(),D=I.getParentEditor().getSelection(),E=D.getSelectedElement(),F=E&&E.getAscendant('a');CKEDITOR.document.getById(y).setStyle('display','none');s=new CKEDITOR.dom.element('img',C.document);I.preview=CKEDITOR.document.getById(B);I.originalElement=C.document.createElement('img');I.originalElement.setAttribute('alt','');I.originalElement.setCustomData('isReady','false');if(F){I.linkElement=F;I.linkEditMode=true;var G=F.getChildren();if(G.count()==1){var H=G.getItem(0).getName();if(H=='img'||H=='input'){I.imageElement=G.getItem(0);if(I.imageElement.getName()=='img')I.imageEditMode='img';else if(I.imageElement.getName()=='input')I.imageEditMode='input';}}if(c=='image')I.setupContent(e,F);}if(E&&E.getName()=='img'&&!E.data('cke-realelement')||E&&E.getName()=='input'&&E.getAttribute('type')=='image'){I.imageEditMode=E.getName();I.imageElement=E;}if(I.imageEditMode){I.cleanImageElement=I.imageElement;I.imageElement=I.cleanImageElement.clone(true,true);I.setupContent(d,I.imageElement);p(I,true);}else I.imageElement=C.document.createElement('img');if(!CKEDITOR.tools.trim(I.getValueOf('info','txtUrl'))){I.preview.removeAttribute('src');I.preview.setStyle('display','none');}},onOk:function(){var D=this;if(D.imageEditMode){var C=D.imageEditMode;if(c=='image'&&C=='input'&&confirm(b.lang.image.button2Img)){C='img';D.imageElement=b.document.createElement('img');D.imageElement.setAttribute('alt','');b.insertElement(D.imageElement);}else if(c!='image'&&C=='img'&&confirm(b.lang.image.img2Button)){C='input';D.imageElement=b.document.createElement('input');D.imageElement.setAttributes({type:'image',alt:''});b.insertElement(D.imageElement);}else{D.imageElement=D.cleanImageElement;
-delete D.cleanImageElement;}}else{if(c=='image')D.imageElement=b.document.createElement('img');else{D.imageElement=b.document.createElement('input');D.imageElement.setAttribute('type','image');}D.imageElement.setAttribute('alt','');}if(!D.linkEditMode)D.linkElement=b.document.createElement('a');D.commitContent(d,D.imageElement);D.commitContent(e,D.linkElement);if(!D.imageElement.getAttribute('style'))D.imageElement.removeAttribute('style');if(!D.imageEditMode){if(D.addLink){if(!D.linkEditMode){b.insertElement(D.linkElement);D.linkElement.append(D.imageElement,false);}else b.insertElement(D.imageElement);}else b.insertElement(D.imageElement);}else if(!D.linkEditMode&&D.addLink){b.insertElement(D.linkElement);D.imageElement.appendTo(D.linkElement);}else if(D.linkEditMode&&!D.addLink){b.getSelection().selectElement(D.linkElement);b.insertElement(D.imageElement);}},onLoad:function(){var D=this;if(c!='image')D.hidePage('Link');var C=D._.element.getDocument();D.addFocusable(C.getById(x),5);D.addFocusable(C.getById(w),5);D.commitContent=m;},onHide:function(){var C=this;if(C.preview)C.commitContent(g,C.preview);if(C.originalElement){C.originalElement.removeListener('load',t);C.originalElement.removeListener('error',u);C.originalElement.removeListener('abort',u);C.originalElement.remove();C.originalElement=false;}delete C.imageElement;},contents:[{id:'info',label:b.lang.image.infoTab,accessKey:'I',elements:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['280px','110px'],align:'right',children:[{id:'txtUrl',type:'text',label:b.lang.common.url,required:true,onChange:function(){var C=this.getDialog(),D=this.getValue();if(D.length>0){C=this.getDialog();var E=C.originalElement;C.preview.removeStyle('display');E.setCustomData('isReady','false');var F=CKEDITOR.document.getById(y);if(F)F.setStyle('display','');E.on('load',t,C);E.on('error',u,C);E.on('abort',u,C);E.setAttribute('src',D);s.setAttribute('src',D);C.preview.setAttribute('src',s.$.src);l(C);}else if(C.preview){C.preview.removeAttribute('src');C.preview.setStyle('display','none');}},setup:function(C,D){if(C==d){var E=D.data('cke-saved-src')||D.getAttribute('src'),F=this;this.getDialog().dontResetSize=true;F.setValue(E);F.setInitValue();}},commit:function(C,D){var E=this;if(C==d&&(E.getValue()||E.isChanged())){D.data('cke-saved-src',E.getValue());D.setAttribute('src',E.getValue());}else if(C==g){D.setAttribute('src','');D.removeAttribute('src');}},validate:CKEDITOR.dialog.validate.notEmpty(b.lang.image.urlMissing)},{type:'button',id:'browse',style:'display:inline-block;margin-top:10px;',align:'center',label:b.lang.common.browseServer,hidden:true,filebrowser:'info:txtUrl'}]}]},{id:'txtAlt',type:'text',label:b.lang.image.alt,accessKey:'T','default':'',onChange:function(){l(this.getDialog());
-},setup:function(C,D){if(C==d)this.setValue(D.getAttribute('alt'));},commit:function(C,D){var E=this;if(C==d){if(E.getValue()||E.isChanged())D.setAttribute('alt',E.getValue());}else if(C==f)D.setAttribute('alt',E.getValue());else if(C==g)D.removeAttribute('alt');}},{type:'hbox',children:[{type:'vbox',children:[{type:'hbox',widths:['50%','50%'],children:[{type:'vbox',padding:1,children:[{type:'text',width:'40px',id:'txtWidth',label:b.lang.common.width,onKeyUp:k,onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:function(){var C=this.getValue().match(i);if(!C)alert(b.lang.common.invalidWidth);return!!C;},setup:r,commit:function(C,D,E){var F=this.getValue();if(C==d){if(F)D.setStyle('width',CKEDITOR.tools.cssLength(F));else if(!F&&this.isChanged())D.removeStyle('width');!E&&D.removeAttribute('width');}else if(C==f){var G=F.match(h);if(!G){var H=this.getDialog().originalElement;if(H.getCustomData('isReady')=='true')D.setStyle('width',H.$.width+'px');}else D.setStyle('width',CKEDITOR.tools.cssLength(F));}else if(C==g){D.removeAttribute('width');D.removeStyle('width');}}},{type:'text',id:'txtHeight',width:'40px',label:b.lang.common.height,onKeyUp:k,onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:function(){var C=this.getValue().match(i);if(!C)alert(b.lang.common.invalidHeight);return!!C;},setup:r,commit:function(C,D,E){var F=this.getValue();if(C==d){if(F)D.setStyle('height',CKEDITOR.tools.cssLength(F));else if(!F&&this.isChanged())D.removeStyle('height');if(!E&&C==d)D.removeAttribute('height');}else if(C==f){var G=F.match(h);if(!G){var H=this.getDialog().originalElement;if(H.getCustomData('isReady')=='true')D.setStyle('height',H.$.height+'px');}else D.setStyle('height',CKEDITOR.tools.cssLength(F));}else if(C==g){D.removeAttribute('height');D.removeStyle('height');}}}]},{type:'html',style:'margin-top:30px;width:40px;height:40px;',onLoad:function(){var C=CKEDITOR.document.getById(x),D=CKEDITOR.document.getById(w);if(C){C.on('click',function(E){q(this);E.data.preventDefault();},this.getDialog());C.on('mouseover',function(){this.addClass('cke_btn_over');},C);C.on('mouseout',function(){this.removeClass('cke_btn_over');},C);}if(D){D.on('click',function(E){var J=this;var F=p(J),G=J.originalElement,H=J.getValueOf('info','txtWidth');if(G.getCustomData('isReady')=='true'&&H){var I=G.$.height/G.$.width*H;if(!isNaN(I)){J.setValueOf('info','txtHeight',Math.round(I));l(J);}}E.data.preventDefault();},this.getDialog());D.on('mouseover',function(){this.addClass('cke_btn_over');
-},D);D.on('mouseout',function(){this.removeClass('cke_btn_over');},D);}},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+b.lang.image.unlockRatio+'" class="cke_btn_locked" id="'+w+'" role="button"><span class="cke_label">'+b.lang.image.unlockRatio+'</span></a>'+'<a href="javascript:void(0)" tabindex="-1" title="'+b.lang.image.resetSize+'" class="cke_btn_reset" id="'+x+'" role="button"><span class="cke_label">'+b.lang.image.resetSize+'</span></a>'+'</div>'}]},{type:'vbox',padding:1,children:[{type:'text',id:'txtBorder',width:'60px',label:b.lang.image.border,'default':'',onKeyUp:function(){l(this.getDialog());},onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateBorder),setup:function(C,D){if(C==d){var E,F=D.getStyle('border-width');F=F&&F.match(/^(\d+px)(?: \1 \1 \1)?$/);E=F&&parseInt(F[1],10);isNaN(parseInt(E,10))&&(E=D.getAttribute('border'));this.setValue(E);}},commit:function(C,D,E){var F=parseInt(this.getValue(),10);if(C==d||C==f){if(!isNaN(F)){D.setStyle('border-width',CKEDITOR.tools.cssLength(F));D.setStyle('border-style','solid');}else if(!F&&this.isChanged()){D.removeStyle('border-width');D.removeStyle('border-style');D.removeStyle('border-color');}if(!E&&C==d)D.removeAttribute('border');}else if(C==g){D.removeAttribute('border');D.removeStyle('border-width');D.removeStyle('border-style');D.removeStyle('border-color');}}},{type:'text',id:'txtHSpace',width:'60px',label:b.lang.image.hSpace,'default':'',onKeyUp:function(){l(this.getDialog());},onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateHSpace),setup:function(C,D){if(C==d){var E,F,G,H=D.getStyle('margin-left'),I=D.getStyle('margin-right');H=H&&H.match(j);I=I&&I.match(j);F=parseInt(H,10);G=parseInt(I,10);E=F==G&&F;isNaN(parseInt(E,10))&&(E=D.getAttribute('hspace'));this.setValue(E);}},commit:function(C,D,E){var F=parseInt(this.getValue(),10);if(C==d||C==f){if(!isNaN(F)){D.setStyle('margin-left',CKEDITOR.tools.cssLength(F));D.setStyle('margin-right',CKEDITOR.tools.cssLength(F));}else if(!F&&this.isChanged()){D.removeStyle('margin-left');D.removeStyle('margin-right');}if(!E&&C==d)D.removeAttribute('hspace');}else if(C==g){D.removeAttribute('hspace');D.removeStyle('margin-left');D.removeStyle('margin-right');}}},{type:'text',id:'txtVSpace',width:'60px',label:b.lang.image.vSpace,'default':'',onKeyUp:function(){l(this.getDialog());},onChange:function(){o.call(this,'advanced:txtdlgGenStyle');
-},validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateVSpace),setup:function(C,D){if(C==d){var E,F,G,H=D.getStyle('margin-top'),I=D.getStyle('margin-bottom');H=H&&H.match(j);I=I&&I.match(j);F=parseInt(H,10);G=parseInt(I,10);E=F==G&&F;isNaN(parseInt(E,10))&&(E=D.getAttribute('vspace'));this.setValue(E);}},commit:function(C,D,E){var F=parseInt(this.getValue(),10);if(C==d||C==f){if(!isNaN(F)){D.setStyle('margin-top',CKEDITOR.tools.cssLength(F));D.setStyle('margin-bottom',CKEDITOR.tools.cssLength(F));}else if(!F&&this.isChanged()){D.removeStyle('margin-top');D.removeStyle('margin-bottom');}if(!E&&C==d)D.removeAttribute('vspace');}else if(C==g){D.removeAttribute('vspace');D.removeStyle('margin-top');D.removeStyle('margin-bottom');}}},{id:'cmbAlign',type:'select',widths:['35%','65%'],style:'width:90px',label:b.lang.common.align,'default':'',items:[[b.lang.common.notSet,''],[b.lang.common.alignLeft,'left'],[b.lang.common.alignRight,'right']],onChange:function(){l(this.getDialog());o.call(this,'advanced:txtdlgGenStyle');},setup:function(C,D){if(C==d){var E=D.getStyle('float');switch(E){case 'inherit':case 'none':E='';}!E&&(E=(D.getAttribute('align')||'').toLowerCase());this.setValue(E);}},commit:function(C,D,E){var F=this.getValue();if(C==d||C==f){if(F)D.setStyle('float',F);else D.removeStyle('float');if(!E&&C==d){F=(D.getAttribute('align')||'').toLowerCase();switch(F){case 'left':case 'right':D.removeAttribute('align');}}}else if(C==g)D.removeStyle('float');}}]}]},{type:'vbox',height:'250px',children:[{type:'html',style:'width:95%;',html:'<div>'+CKEDITOR.tools.htmlEncode(b.lang.common.preview)+'<br>'+'<div id="'+y+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div>'+'<div id="'+z+'" class="ImagePreviewBox"><table><tr><td>'+'<a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+A+'">'+'<img id="'+B+'" alt="" /></a>'+(b.config.image_previewText||'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.')+'</td></tr></table></div></div>'}]}]}]},{id:'Link',label:b.lang.link.title,padding:0,elements:[{id:'txtUrl',type:'text',label:b.lang.common.url,style:'width: 100%','default':'',setup:function(C,D){if(C==e){var E=D.data('cke-saved-href');
+(function(){var a=function(b,c){var d=1,e=2,f=4,g=8,h=/^\s*(\d+)((px)|\%)?\s*$/i,i=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,j=/^\d+px$/,k=function(){var C=this.getValue(),D=this.getDialog(),E=C.match(h);if(E){if(E[2]=='%')p(D,false);C=E[1];}if(D.lockRatio){var F=D.originalElement;if(F.getCustomData('isReady')=='true')if(this.id=='txtHeight'){if(C&&C!='0')C=Math.round(F.$.width*(C/F.$.height));if(!isNaN(C))D.setValueOf('info','txtWidth',C);}else{if(C&&C!='0')C=Math.round(F.$.height*(C/F.$.width));if(!isNaN(C))D.setValueOf('info','txtHeight',C);}}l(D);},l=function(C){if(!C.originalElement||!C.preview)return 1;C.commitContent(f,C.preview);return 0;};function m(){var C=arguments,D=this.getContentElement('advanced','txtdlgGenStyle');D&&D.commit.apply(D,C);this.foreach(function(E){if(E.commit&&E.id!='txtdlgGenStyle')E.commit.apply(E,C);});};var n;function o(C){if(n)return;n=1;var D=this.getDialog(),E=D.imageElement;if(E){this.commit(d,E);C=[].concat(C);var F=C.length,G;for(var H=0;H<F;H++){G=D.getContentElement.apply(D,C[H].split(':'));G&&G.setup(d,E);}}n=0;};var p=function(C,D){if(!C.getContentElement('info','ratioLock'))return null;var E=C.originalElement;if(!E)return null;if(D=='check'){if(!C.userlockRatio&&E.getCustomData('isReady')=='true'){var F=C.getValueOf('info','txtWidth'),G=C.getValueOf('info','txtHeight'),H=E.$.width*1000/E.$.height,I=F*1000/G;C.lockRatio=false;if(!F&&!G)C.lockRatio=true;else if(!isNaN(H)&&!isNaN(I))if(Math.round(H)==Math.round(I))C.lockRatio=true;}}else if(D!=undefined)C.lockRatio=D;else{C.userlockRatio=1;C.lockRatio=!C.lockRatio;}var J=CKEDITOR.document.getById(w);if(C.lockRatio)J.removeClass('cke_btn_unlocked');else J.addClass('cke_btn_unlocked');J.setAttribute('aria-checked',C.lockRatio);if(CKEDITOR.env.hc){var K=J.getChild(0);K.setHtml(C.lockRatio?CKEDITOR.env.ie?'â– ':'â–£':CKEDITOR.env.ie?'â–¡':'â–¢');}return C.lockRatio;},q=function(C){var D=C.originalElement;if(D.getCustomData('isReady')=='true'){var E=C.getContentElement('info','txtWidth'),F=C.getContentElement('info','txtHeight');E&&E.setValue(D.$.width);F&&F.setValue(D.$.height);}l(C);},r=function(C,D){if(C!=d)return;function E(J,K){var L=J.match(h);if(L){if(L[2]=='%'){L[1]+='%';p(F,false);}return L[1];}return K;};var F=this.getDialog(),G='',H=this.id=='txtWidth'?'width':'height',I=D.getAttribute(H);if(I)G=E(I,G);G=E(D.getStyle(H),G);this.setValue(G);},s,t=function(){var C=this.originalElement;C.setCustomData('isReady','true');C.removeListener('load',t);C.removeListener('error',u);C.removeListener('abort',u);
+CKEDITOR.document.getById(y).setStyle('display','none');if(!this.dontResetSize)q(this);if(this.firstLoad)CKEDITOR.tools.setTimeout(function(){p(this,'check');},0,this);this.firstLoad=false;this.dontResetSize=false;},u=function(){var E=this;var C=E.originalElement;C.removeListener('load',t);C.removeListener('error',u);C.removeListener('abort',u);var D=CKEDITOR.getUrl(b.skinPath+'images/noimage.png');if(E.preview)E.preview.setAttribute('src',D);CKEDITOR.document.getById(y).setStyle('display','none');p(E,false);},v=function(C){return CKEDITOR.tools.getNextId()+'_'+C;},w=v('btnLockSizes'),x=v('btnResetSize'),y=v('ImagePreviewLoader'),z=v('ImagePreviewBox'),A=v('previewLink'),B=v('previewImage');return{title:b.lang.image[c=='image'?'title':'titleButton'],minWidth:420,minHeight:360,onShow:function(){var I=this;I.imageElement=false;I.linkElement=false;I.imageEditMode=false;I.linkEditMode=false;I.lockRatio=true;I.userlockRatio=0;I.dontResetSize=false;I.firstLoad=true;I.addLink=false;var C=I.getParentEditor(),D=I.getParentEditor().getSelection(),E=D.getSelectedElement(),F=E&&E.getAscendant('a');CKEDITOR.document.getById(y).setStyle('display','none');s=new CKEDITOR.dom.element('img',C.document);I.preview=CKEDITOR.document.getById(B);I.originalElement=C.document.createElement('img');I.originalElement.setAttribute('alt','');I.originalElement.setCustomData('isReady','false');if(F){I.linkElement=F;I.linkEditMode=true;var G=F.getChildren();if(G.count()==1){var H=G.getItem(0).getName();if(H=='img'||H=='input'){I.imageElement=G.getItem(0);if(I.imageElement.getName()=='img')I.imageEditMode='img';else if(I.imageElement.getName()=='input')I.imageEditMode='input';}}if(c=='image')I.setupContent(e,F);}if(E&&E.getName()=='img'&&!E.data('cke-realelement')||E&&E.getName()=='input'&&E.getAttribute('type')=='image'){I.imageEditMode=E.getName();I.imageElement=E;}if(I.imageEditMode){I.cleanImageElement=I.imageElement;I.imageElement=I.cleanImageElement.clone(true,true);I.setupContent(d,I.imageElement);}else I.imageElement=C.document.createElement('img');p(I,true);if(!CKEDITOR.tools.trim(I.getValueOf('info','txtUrl'))){I.preview.removeAttribute('src');I.preview.setStyle('display','none');}},onOk:function(){var D=this;if(D.imageEditMode){var C=D.imageEditMode;if(c=='image'&&C=='input'&&confirm(b.lang.image.button2Img)){C='img';D.imageElement=b.document.createElement('img');D.imageElement.setAttribute('alt','');b.insertElement(D.imageElement);}else if(c!='image'&&C=='img'&&confirm(b.lang.image.img2Button)){C='input';
+D.imageElement=b.document.createElement('input');D.imageElement.setAttributes({type:'image',alt:''});b.insertElement(D.imageElement);}else{D.imageElement=D.cleanImageElement;delete D.cleanImageElement;}}else{if(c=='image')D.imageElement=b.document.createElement('img');else{D.imageElement=b.document.createElement('input');D.imageElement.setAttribute('type','image');}D.imageElement.setAttribute('alt','');}if(!D.linkEditMode)D.linkElement=b.document.createElement('a');D.commitContent(d,D.imageElement);D.commitContent(e,D.linkElement);if(!D.imageElement.getAttribute('style'))D.imageElement.removeAttribute('style');if(!D.imageEditMode){if(D.addLink){if(!D.linkEditMode){b.insertElement(D.linkElement);D.linkElement.append(D.imageElement,false);}else b.insertElement(D.imageElement);}else b.insertElement(D.imageElement);}else if(!D.linkEditMode&&D.addLink){b.insertElement(D.linkElement);D.imageElement.appendTo(D.linkElement);}else if(D.linkEditMode&&!D.addLink){b.getSelection().selectElement(D.linkElement);b.insertElement(D.imageElement);}},onLoad:function(){var D=this;if(c!='image')D.hidePage('Link');var C=D._.element.getDocument();if(D.getContentElement('info','ratioLock')){D.addFocusable(C.getById(x),5);D.addFocusable(C.getById(w),5);}D.commitContent=m;},onHide:function(){var C=this;if(C.preview)C.commitContent(g,C.preview);if(C.originalElement){C.originalElement.removeListener('load',t);C.originalElement.removeListener('error',u);C.originalElement.removeListener('abort',u);C.originalElement.remove();C.originalElement=false;}delete C.imageElement;},contents:[{id:'info',label:b.lang.image.infoTab,accessKey:'I',elements:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['280px','110px'],align:'right',children:[{id:'txtUrl',type:'text',label:b.lang.common.url,required:true,onChange:function(){var C=this.getDialog(),D=this.getValue();if(D.length>0){C=this.getDialog();var E=C.originalElement;C.preview.removeStyle('display');E.setCustomData('isReady','false');var F=CKEDITOR.document.getById(y);if(F)F.setStyle('display','');E.on('load',t,C);E.on('error',u,C);E.on('abort',u,C);E.setAttribute('src',D);s.setAttribute('src',D);C.preview.setAttribute('src',s.$.src);l(C);}else if(C.preview){C.preview.removeAttribute('src');C.preview.setStyle('display','none');}},setup:function(C,D){if(C==d){var E=D.data('cke-saved-src')||D.getAttribute('src'),F=this;this.getDialog().dontResetSize=true;F.setValue(E);F.setInitValue();}},commit:function(C,D){var E=this;if(C==d&&(E.getValue()||E.isChanged())){D.data('cke-saved-src',E.getValue());
+D.setAttribute('src',E.getValue());}else if(C==g){D.setAttribute('src','');D.removeAttribute('src');}},validate:CKEDITOR.dialog.validate.notEmpty(b.lang.image.urlMissing)},{type:'button',id:'browse',style:'display:inline-block;margin-top:10px;',align:'center',label:b.lang.common.browseServer,hidden:true,filebrowser:'info:txtUrl'}]}]},{id:'txtAlt',type:'text',label:b.lang.image.alt,accessKey:'T','default':'',onChange:function(){l(this.getDialog());},setup:function(C,D){if(C==d)this.setValue(D.getAttribute('alt'));},commit:function(C,D){var E=this;if(C==d){if(E.getValue()||E.isChanged())D.setAttribute('alt',E.getValue());}else if(C==f)D.setAttribute('alt',E.getValue());else if(C==g)D.removeAttribute('alt');}},{type:'hbox',children:[{id:'basic',type:'vbox',children:[{type:'hbox',widths:['50%','50%'],children:[{type:'vbox',padding:1,children:[{type:'text',width:'40px',id:'txtWidth',label:b.lang.common.width,onKeyUp:k,onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:function(){var C=this.getValue().match(i),D=!!(C&&parseInt(C[1],10)!==0);if(!D)alert(b.lang.common.invalidWidth);return D;},setup:r,commit:function(C,D,E){var F=this.getValue();if(C==d){if(F)D.setStyle('width',CKEDITOR.tools.cssLength(F));else D.removeStyle('width');!E&&D.removeAttribute('width');}else if(C==f){var G=F.match(h);if(!G){var H=this.getDialog().originalElement;if(H.getCustomData('isReady')=='true')D.setStyle('width',H.$.width+'px');}else D.setStyle('width',CKEDITOR.tools.cssLength(F));}else if(C==g){D.removeAttribute('width');D.removeStyle('width');}}},{type:'text',id:'txtHeight',width:'40px',label:b.lang.common.height,onKeyUp:k,onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:function(){var C=this.getValue().match(i),D=!!(C&&parseInt(C[1],10)!==0);if(!D)alert(b.lang.common.invalidHeight);return D;},setup:r,commit:function(C,D,E){var F=this.getValue();if(C==d){if(F)D.setStyle('height',CKEDITOR.tools.cssLength(F));else D.removeStyle('height');!E&&D.removeAttribute('height');}else if(C==f){var G=F.match(h);if(!G){var H=this.getDialog().originalElement;if(H.getCustomData('isReady')=='true')D.setStyle('height',H.$.height+'px');}else D.setStyle('height',CKEDITOR.tools.cssLength(F));}else if(C==g){D.removeAttribute('height');D.removeStyle('height');}}}]},{id:'ratioLock',type:'html',style:'margin-top:30px;width:40px;height:40px;',onLoad:function(){var C=CKEDITOR.document.getById(x),D=CKEDITOR.document.getById(w);if(C){C.on('click',function(E){q(this);E.data&&E.data.preventDefault();
+},this.getDialog());C.on('mouseover',function(){this.addClass('cke_btn_over');},C);C.on('mouseout',function(){this.removeClass('cke_btn_over');},C);}if(D){D.on('click',function(E){var J=this;var F=p(J),G=J.originalElement,H=J.getValueOf('info','txtWidth');if(G.getCustomData('isReady')=='true'&&H){var I=G.$.height/G.$.width*H;if(!isNaN(I)){J.setValueOf('info','txtHeight',Math.round(I));l(J);}}E.data&&E.data.preventDefault();},this.getDialog());D.on('mouseover',function(){this.addClass('cke_btn_over');},D);D.on('mouseout',function(){this.removeClass('cke_btn_over');},D);}},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+b.lang.image.lockRatio+'" class="cke_btn_locked" id="'+w+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+b.lang.image.lockRatio+'</span></a>'+'<a href="javascript:void(0)" tabindex="-1" title="'+b.lang.image.resetSize+'" class="cke_btn_reset" id="'+x+'" role="button"><span class="cke_label">'+b.lang.image.resetSize+'</span></a>'+'</div>'}]},{type:'vbox',padding:1,children:[{type:'text',id:'txtBorder',width:'60px',label:b.lang.image.border,'default':'',onKeyUp:function(){l(this.getDialog());},onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateBorder),setup:function(C,D){if(C==d){var E,F=D.getStyle('border-width');F=F&&F.match(/^(\d+px)(?: \1 \1 \1)?$/);E=F&&parseInt(F[1],10);isNaN(parseInt(E,10))&&(E=D.getAttribute('border'));this.setValue(E);}},commit:function(C,D,E){var F=parseInt(this.getValue(),10);if(C==d||C==f){if(!isNaN(F)){D.setStyle('border-width',CKEDITOR.tools.cssLength(F));D.setStyle('border-style','solid');}else if(!F&&this.isChanged()){D.removeStyle('border-width');D.removeStyle('border-style');D.removeStyle('border-color');}if(!E&&C==d)D.removeAttribute('border');}else if(C==g){D.removeAttribute('border');D.removeStyle('border-width');D.removeStyle('border-style');D.removeStyle('border-color');}}},{type:'text',id:'txtHSpace',width:'60px',label:b.lang.image.hSpace,'default':'',onKeyUp:function(){l(this.getDialog());},onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateHSpace),setup:function(C,D){if(C==d){var E,F,G,H=D.getStyle('margin-left'),I=D.getStyle('margin-right');H=H&&H.match(j);I=I&&I.match(j);F=parseInt(H,10);G=parseInt(I,10);E=F==G&&F;isNaN(parseInt(E,10))&&(E=D.getAttribute('hspace'));this.setValue(E);}},commit:function(C,D,E){var F=parseInt(this.getValue(),10);
+if(C==d||C==f){if(!isNaN(F)){D.setStyle('margin-left',CKEDITOR.tools.cssLength(F));D.setStyle('margin-right',CKEDITOR.tools.cssLength(F));}else if(!F&&this.isChanged()){D.removeStyle('margin-left');D.removeStyle('margin-right');}if(!E&&C==d)D.removeAttribute('hspace');}else if(C==g){D.removeAttribute('hspace');D.removeStyle('margin-left');D.removeStyle('margin-right');}}},{type:'text',id:'txtVSpace',width:'60px',label:b.lang.image.vSpace,'default':'',onKeyUp:function(){l(this.getDialog());},onChange:function(){o.call(this,'advanced:txtdlgGenStyle');},validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateVSpace),setup:function(C,D){if(C==d){var E,F,G,H=D.getStyle('margin-top'),I=D.getStyle('margin-bottom');H=H&&H.match(j);I=I&&I.match(j);F=parseInt(H,10);G=parseInt(I,10);E=F==G&&F;isNaN(parseInt(E,10))&&(E=D.getAttribute('vspace'));this.setValue(E);}},commit:function(C,D,E){var F=parseInt(this.getValue(),10);if(C==d||C==f){if(!isNaN(F)){D.setStyle('margin-top',CKEDITOR.tools.cssLength(F));D.setStyle('margin-bottom',CKEDITOR.tools.cssLength(F));}else if(!F&&this.isChanged()){D.removeStyle('margin-top');D.removeStyle('margin-bottom');}if(!E&&C==d)D.removeAttribute('vspace');}else if(C==g){D.removeAttribute('vspace');D.removeStyle('margin-top');D.removeStyle('margin-bottom');}}},{id:'cmbAlign',type:'select',widths:['35%','65%'],style:'width:90px',label:b.lang.common.align,'default':'',items:[[b.lang.common.notSet,''],[b.lang.common.alignLeft,'left'],[b.lang.common.alignRight,'right']],onChange:function(){l(this.getDialog());o.call(this,'advanced:txtdlgGenStyle');},setup:function(C,D){if(C==d){var E=D.getStyle('float');switch(E){case 'inherit':case 'none':E='';}!E&&(E=(D.getAttribute('align')||'').toLowerCase());this.setValue(E);}},commit:function(C,D,E){var F=this.getValue();if(C==d||C==f){if(F)D.setStyle('float',F);else D.removeStyle('float');if(!E&&C==d){F=(D.getAttribute('align')||'').toLowerCase();switch(F){case 'left':case 'right':D.removeAttribute('align');}}}else if(C==g)D.removeStyle('float');}}]}]},{type:'vbox',height:'250px',children:[{type:'html',id:'htmlPreview',style:'width:95%;',html:'<div>'+CKEDITOR.tools.htmlEncode(b.lang.common.preview)+'<br>'+'<div id="'+y+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div>'+'<div id="'+z+'" class="ImagePreviewBox"><table><tr><td>'+'<a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+A+'">'+'<img id="'+B+'" alt="" /></a>'+(b.config.image_previewText||'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.')+'</td></tr></table></div></div>'}]}]}]},{id:'Link',label:b.lang.link.title,padding:0,elements:[{id:'txtUrl',type:'text',label:b.lang.common.url,style:'width: 100%','default':'',setup:function(C,D){if(C==e){var E=D.data('cke-saved-href');
 if(!E)E=D.getAttribute('href');this.setValue(E);}},commit:function(C,D){var F=this;if(C==e)if(F.getValue()||F.isChanged()){var E=decodeURI(F.getValue());D.data('cke-saved-href',E);D.setAttribute('href',E);if(F.getValue()||!b.config.image_removeLinkByEmptyURL)F.getDialog().addLink=true;}}},{type:'button',id:'browse',filebrowser:{action:'Browse',target:'Link:txtUrl',url:b.config.filebrowserImageBrowseLinkUrl},style:'float:right',hidden:true,label:b.lang.common.browseServer},{id:'cmbTarget',type:'select',label:b.lang.common.target,'default':'',items:[[b.lang.common.notSet,''],[b.lang.common.targetNew,'_blank'],[b.lang.common.targetTop,'_top'],[b.lang.common.targetSelf,'_self'],[b.lang.common.targetParent,'_parent']],setup:function(C,D){if(C==e)this.setValue(D.getAttribute('target')||'');},commit:function(C,D){if(C==e)if(this.getValue()||this.isChanged())D.setAttribute('target',this.getValue());}}]},{id:'Upload',hidden:true,filebrowser:'uploadButton',label:b.lang.image.upload,elements:[{type:'file',id:'upload',label:b.lang.image.btnUpload,style:'height:40px',size:38},{type:'fileButton',id:'uploadButton',filebrowser:'info:txtUrl',label:b.lang.image.btnUpload,'for':['Upload','upload']}]},{id:'advanced',label:b.lang.common.advancedTab,elements:[{type:'hbox',widths:['50%','25%','25%'],children:[{type:'text',id:'linkId',label:b.lang.common.id,setup:function(C,D){if(C==d)this.setValue(D.getAttribute('id'));},commit:function(C,D){if(C==d)if(this.getValue()||this.isChanged())D.setAttribute('id',this.getValue());}},{id:'cmbLangDir',type:'select',style:'width : 100px;',label:b.lang.common.langDir,'default':'',items:[[b.lang.common.notSet,''],[b.lang.common.langDirLtr,'ltr'],[b.lang.common.langDirRtl,'rtl']],setup:function(C,D){if(C==d)this.setValue(D.getAttribute('dir'));},commit:function(C,D){if(C==d)if(this.getValue()||this.isChanged())D.setAttribute('dir',this.getValue());}},{type:'text',id:'txtLangCode',label:b.lang.common.langCode,'default':'',setup:function(C,D){if(C==d)this.setValue(D.getAttribute('lang'));},commit:function(C,D){if(C==d)if(this.getValue()||this.isChanged())D.setAttribute('lang',this.getValue());}}]},{type:'text',id:'txtGenLongDescr',label:b.lang.common.longDescr,setup:function(C,D){if(C==d)this.setValue(D.getAttribute('longDesc'));},commit:function(C,D){if(C==d)if(this.getValue()||this.isChanged())D.setAttribute('longDesc',this.getValue());}},{type:'hbox',widths:['50%','50%'],children:[{type:'text',id:'txtGenClass',label:b.lang.common.cssClass,'default':'',setup:function(C,D){if(C==d)this.setValue(D.getAttribute('class'));
 },commit:function(C,D){if(C==d)if(this.getValue()||this.isChanged())D.setAttribute('class',this.getValue());}},{type:'text',id:'txtGenTitle',label:b.lang.common.advisoryTitle,'default':'',onChange:function(){l(this.getDialog());},setup:function(C,D){if(C==d)this.setValue(D.getAttribute('title'));},commit:function(C,D){var E=this;if(C==d){if(E.getValue()||E.isChanged())D.setAttribute('title',E.getValue());}else if(C==f)D.setAttribute('title',E.getValue());else if(C==g)D.removeAttribute('title');}}]},{type:'text',id:'txtdlgGenStyle',label:b.lang.common.cssStyle,'default':'',setup:function(C,D){if(C==d){var E=D.getAttribute('style');if(!E&&D.$.style.cssText)E=D.$.style.cssText;this.setValue(E);var F=D.$.style.height,G=D.$.style.width,H=(F?F:'').match(h),I=(G?G:'').match(h);this.attributesInStyle={height:!!H,width:!!I};}},onChange:function(){o.call(this,['info:cmbFloat','info:cmbAlign','info:txtVSpace','info:txtHSpace','info:txtBorder','info:txtWidth','info:txtHeight']);l(this);},commit:function(C,D){if(C==d&&(this.getValue()||this.isChanged()))D.setAttribute('style',this.getValue());}}]}]};};CKEDITOR.dialog.add('image',function(b){return a(b,'image');});CKEDITOR.dialog.add('imagebutton',function(b){return a(b,'imagebutton');});})();
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/anchor.js b/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/anchor.js
index 4c8edd2..7380c48 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/anchor.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/anchor.js
@@ -3,4 +3,4 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.dialog.add('anchor',function(a){var b=function(c,d,e){var g=this;g.editMode=true;g.editObj=e;var f=g.editObj.getAttribute('name');if(f)g.setValueOf('info','txtName',f);else g.setValueOf('info','txtName','');};return{title:a.lang.anchor.title,minWidth:300,minHeight:60,onOk:function(){var f=this;var c=f.getValueOf('info','txtName'),d=CKEDITOR.env.ie?a.document.createElement('<a name="'+CKEDITOR.tools.htmlEncode(c)+'">'):a.document.createElement('a');if(f.editMode){f.editObj.copyAttributes(d,{name:1});f.editObj.moveChildren(d);}d.data('cke-saved-name',false);d.setAttribute('name',c);var e=a.createFakeElement(d,'cke_anchor','anchor');if(!f.editMode)a.insertElement(e);else{e.replace(f.fakeObj);a.getSelection().selectElement(e);}return true;},onShow:function(){var e=this;e.editObj=false;e.fakeObj=false;e.editMode=false;var c=a.getSelection(),d=c.getSelectedElement();if(d&&d.data('cke-real-element-type')&&d.data('cke-real-element-type')=='anchor'){e.fakeObj=d;d=a.restoreRealElement(e.fakeObj);b.apply(e,[a,c,d]);c.selectElement(e.fakeObj);}e.getContentElement('info','txtName').focus();},contents:[{id:'info',label:a.lang.anchor.title,accessKey:'I',elements:[{type:'text',id:'txtName',label:a.lang.anchor.name,required:true,validate:function(){if(!this.getValue()){alert(a.lang.anchor.errorName);return false;}return true;}}]}]};});
+CKEDITOR.dialog.add('anchor',function(a){var b=function(d){this._.selectedElement=d;var e=d.data('cke-saved-name');this.setValueOf('info','txtName',e||'');};function c(d,e){return d.createFakeElement(e,'cke_anchor','anchor');};return{title:a.lang.anchor.title,minWidth:300,minHeight:60,onOk:function(){var k=this;var d=k.getValueOf('info','txtName'),e={name:d,'data-cke-saved-name':d};if(k._.selectedElement){if(k._.selectedElement.data('cke-realelement')){var f=c(a,a.document.createElement('a',{attributes:e}));f.replace(k._.selectedElement);}else k._.selectedElement.setAttributes(e);}else{var g=a.getSelection(),h=g&&g.getRanges()[0];if(h.collapsed){if(CKEDITOR.plugins.link.synAnchorSelector)e['class']='cke_anchor_empty';if(CKEDITOR.plugins.link.emptyAnchorFix){e.contenteditable='false';e['data-cke-editable']=1;}var i=a.document.createElement('a',{attributes:e});if(CKEDITOR.plugins.link.fakeAnchor)i=c(a,i);h.insertNode(i);}else{if(CKEDITOR.env.ie&&CKEDITOR.env.version<9)e['class']='cke_anchor';var j=new CKEDITOR.style({element:'a',attributes:e});j.type=CKEDITOR.STYLE_INLINE;j.apply(a.document);}}},onHide:function(){delete this._.selectedElement;},onShow:function(){var h=this;var d=a.getSelection(),e=d.getSelectedElement(),f;if(e){if(CKEDITOR.plugins.link.fakeAnchor){var g=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,e);g&&b.call(h,g);h._.selectedElement=e;}else if(e.is('a')&&e.hasAttribute('name'))b.call(h,e);}else{f=CKEDITOR.plugins.link.getSelectedLink(a);if(f){b.call(h,f);d.selectElement(f);}}h.getContentElement('info','txtName').focus();},contents:[{id:'info',label:a.lang.anchor.title,accessKey:'I',elements:[{type:'text',id:'txtName',label:a.lang.anchor.name,required:true,validate:function(){if(!this.getValue()){alert(a.lang.anchor.errorName);return false;}return true;}}]}]};});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/link.js b/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/link.js
index 815487f..cac5e89 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/link.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/link/dialogs/link.js
@@ -3,9 +3,10 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.dialog.add('link',function(a){var b=CKEDITOR.plugins.link,c=function(){var E=this.getDialog(),F=E.getContentElement('target','popupFeatures'),G=E.getContentElement('target','linkTargetName'),H=this.getValue();if(!F||!G)return;F=F.getElement();F.hide();G.setValue('');switch(H){case 'frame':G.setLabel(a.lang.link.targetFrameName);G.getElement().show();break;case 'popup':F.show();G.setLabel(a.lang.link.targetPopupName);G.getElement().show();break;default:G.setValue(H);G.getElement().hide();break;}},d=function(){var E=this.getDialog(),F=['urlOptions','anchorOptions','emailOptions'],G=this.getValue(),H=E.definition.getContents('upload'),I=H&&H.hidden;if(G=='url'){if(a.config.linkShowTargetTab)E.showPage('target');if(!I)E.showPage('upload');}else{E.hidePage('target');if(!I)E.hidePage('upload');}for(var J=0;J<F.length;J++){var K=E.getContentElement('info',F[J]);if(!K)continue;K=K.getElement().getParent().getParent();if(F[J]==G+'Options')K.show();else K.hide();}E.layout();},e=/^javascript:/,f=/^mailto:([^?]+)(?:\?(.+))?$/,g=/subject=([^;?:@&=$,\/]*)/,h=/body=([^;?:@&=$,\/]*)/,i=/^#(.*)$/,j=/^((?:http|https|ftp|news):\/\/)?(.*)$/,k=/^(_(?:self|top|parent|blank))$/,l=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,m=/^javascript:([^(]+)\(([^)]+)\)$/,n=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,o=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,p=function(E,F){var G=F&&(F.data('cke-saved-href')||F.getAttribute('href'))||'',H,I,J,K,L={};if(H=G.match(e))if(y=='encode')G=G.replace(l,function(ab,ac,ad){return 'mailto:'+String.fromCharCode.apply(String,ac.split(','))+(ad&&w(ad));});else if(y)G.replace(m,function(ab,ac,ad){if(ac==z.name){L.type='email';var ae=L.email={},af=/[^,\s]+/g,ag=/(^')|('$)/g,ah=ad.match(af),ai=ah.length,aj,ak;for(var al=0;al<ai;al++){ak=decodeURIComponent(w(ah[al].replace(ag,'')));aj=z.params[al].toLowerCase();ae[aj]=ak;}ae.address=[ae.name,ae.domain].join('@');}});if(!L.type)if(J=G.match(i)){L.type='anchor';L.anchor={};L.anchor.name=L.anchor.id=J[1];}else if(I=G.match(f)){var M=G.match(g),N=G.match(h);L.type='email';var O=L.email={};O.address=I[1];M&&(O.subject=decodeURIComponent(M[1]));N&&(O.body=decodeURIComponent(N[1]));}else if(G&&(K=G.match(j))){L.type='url';L.url={};L.url.protocol=K[1];L.url.url=K[2];}else L.type='url';if(F){var P=F.getAttribute('target');L.target={};L.adv={};if(!P){var Q=F.data('cke-pa-onclick')||F.getAttribute('onclick'),R=Q&&Q.match(n);
-if(R){L.target.type='popup';L.target.name=R[1];var S;while(S=o.exec(R[2])){if(S[2]=='yes'||S[2]=='1')L.target[S[1]]=true;else if(isFinite(S[2]))L.target[S[1]]=S[2];}}}else{var T=P.match(k);if(T)L.target.type=L.target.name=P;else{L.target.type='frame';L.target.name=P;}}var U=this,V=function(ab,ac){var ad=F.getAttribute(ac);if(ad!==null)L.adv[ab]=ad||'';};V('advId','id');V('advLangDir','dir');V('advAccessKey','accessKey');L.adv.advName=F.data('cke-saved-name')||F.getAttribute('name')||'';V('advLangCode','lang');V('advTabIndex','tabindex');V('advTitle','title');V('advContentType','type');V('advCSSClasses','class');V('advCharset','charset');V('advStyles','style');}var W=E.document.getElementsByTag('img'),X=new CKEDITOR.dom.nodeList(E.document.$.anchors),Y=L.anchors=[];for(var Z=0;Z<W.count();Z++){var aa=W.getItem(Z);if(aa.data('cke-realelement')&&aa.data('cke-real-element-type')=='anchor')Y.push(E.restoreRealElement(aa));}for(Z=0;Z<X.count();Z++)Y.push(X.getItem(Z));for(Z=0;Z<Y.length;Z++){aa=Y[Z];Y[Z]={name:aa.getAttribute('name'),id:aa.getAttribute('id')};}this._.selectedElement=F;return L;},q=function(E,F){if(F[E])this.setValue(F[E][this.id]||'');},r=function(E){return q.call(this,'target',E);},s=function(E){return q.call(this,'adv',E);},t=function(E,F){if(!F[E])F[E]={};F[E][this.id]=this.getValue()||'';},u=function(E){return t.call(this,'target',E);},v=function(E){return t.call(this,'adv',E);};function w(E){return E.replace(/\\'/g,"'");};function x(E){return E.replace(/'/g,'\\$&');};var y=a.config.emailProtection||'';if(y&&y!='encode'){var z={};y.replace(/^([^(]+)\(([^)]+)\)$/,function(E,F,G){z.name=F;z.params=[];G.replace(/[^,\s]+/g,function(H){z.params.push(H);});});}function A(E){var F,G=z.name,H=z.params,I,J;F=[G,'('];for(var K=0;K<H.length;K++){I=H[K].toLowerCase();J=E[I];K>0&&F.push(',');F.push("'",J?x(encodeURIComponent(E[I])):'',"'");}F.push(')');return F.join('');};function B(E){var F,G=E.length,H=[];for(var I=0;I<G;I++){F=E.charCodeAt(I);H.push(F);}return 'String.fromCharCode('+H.join(',')+')';};var C=a.lang.common,D=a.lang.link;return{title:D.title,minWidth:350,minHeight:230,contents:[{id:'info',label:D.info,title:D.info,elements:[{id:'linkType',type:'select',label:D.type,'default':'url',items:[[D.toUrl,'url'],[D.toAnchor,'anchor'],[D.toEmail,'email']],onChange:d,setup:function(E){if(E.type)this.setValue(E.type);},commit:function(E){E.type=this.getValue();}},{type:'vbox',id:'urlOptions',children:[{type:'hbox',widths:['25%','75%'],children:[{id:'protocol',type:'select',label:C.protocol,'default':'http://',items:[['http://‎','http://'],['https://‎','https://'],['ftp://‎','ftp://'],['news://‎','news://'],[D.other,'']],setup:function(E){if(E.url)this.setValue(E.url.protocol||'');
-},commit:function(E){if(!E.url)E.url={};E.url.protocol=this.getValue();}},{type:'text',id:'url',label:C.url,required:true,onLoad:function(){this.allowOnChange=true;},onKeyUp:function(){var J=this;J.allowOnChange=false;var E=J.getDialog().getContentElement('info','protocol'),F=J.getValue(),G=/^(http|https|ftp|news):\/\/(?=.)/i,H=/^((javascript:)|[#\/\.\?])/i,I=G.exec(F);if(I){J.setValue(F.substr(I[0].length));E.setValue(I[0].toLowerCase());}else if(H.test(F))E.setValue('');J.allowOnChange=true;},onChange:function(){if(this.allowOnChange)this.onKeyUp();},validate:function(){var E=this.getDialog();if(E.getContentElement('info','linkType')&&E.getValueOf('info','linkType')!='url')return true;if(this.getDialog().fakeObj)return true;var F=CKEDITOR.dialog.validate.notEmpty(D.noUrl);return F.apply(this);},setup:function(E){this.allowOnChange=false;if(E.url)this.setValue(E.url.url);this.allowOnChange=true;},commit:function(E){this.onChange();if(!E.url)E.url={};E.url.url=this.getValue();this.allowOnChange=false;}}],setup:function(E){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().show();}},{type:'button',id:'browse',hidden:'true',filebrowser:'info:url',label:C.browseServer}]},{type:'vbox',id:'anchorOptions',width:260,align:'center',padding:0,children:[{type:'fieldset',id:'selectAnchorText',label:D.selectAnchor,setup:function(E){if(E.anchors.length>0)this.getElement().show();else this.getElement().hide();},children:[{type:'hbox',id:'selectAnchor',children:[{type:'select',id:'anchorName','default':'',label:D.anchorName,style:'width: 100%;',items:[['']],setup:function(E){var H=this;H.clear();H.add('');for(var F=0;F<E.anchors.length;F++){if(E.anchors[F].name)H.add(E.anchors[F].name);}if(E.anchor)H.setValue(E.anchor.name);var G=H.getDialog().getContentElement('info','linkType');if(G&&G.getValue()=='email')H.focus();},commit:function(E){if(!E.anchor)E.anchor={};E.anchor.name=this.getValue();}},{type:'select',id:'anchorId','default':'',label:D.anchorId,style:'width: 100%;',items:[['']],setup:function(E){var G=this;G.clear();G.add('');for(var F=0;F<E.anchors.length;F++){if(E.anchors[F].id)G.add(E.anchors[F].id);}if(E.anchor)G.setValue(E.anchor.id);},commit:function(E){if(!E.anchor)E.anchor={};E.anchor.id=this.getValue();}}],setup:function(E){if(E.anchors.length>0)this.getElement().show();else this.getElement().hide();}}]},{type:'html',id:'noAnchors',style:'text-align: center;',html:'<div role="label" tabIndex="-1">'+CKEDITOR.tools.htmlEncode(D.noAnchors)+'</div>',focus:true,setup:function(E){if(E.anchors.length<1)this.getElement().show();
-else this.getElement().hide();}}],setup:function(E){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().hide();}},{type:'vbox',id:'emailOptions',padding:1,children:[{type:'text',id:'emailAddress',label:D.emailAddress,required:true,validate:function(){var E=this.getDialog();if(!E.getContentElement('info','linkType')||E.getValueOf('info','linkType')!='email')return true;var F=CKEDITOR.dialog.validate.notEmpty(D.noEmail);return F.apply(this);},setup:function(E){if(E.email)this.setValue(E.email.address);var F=this.getDialog().getContentElement('info','linkType');if(F&&F.getValue()=='email')this.select();},commit:function(E){if(!E.email)E.email={};E.email.address=this.getValue();}},{type:'text',id:'emailSubject',label:D.emailSubject,setup:function(E){if(E.email)this.setValue(E.email.subject);},commit:function(E){if(!E.email)E.email={};E.email.subject=this.getValue();}},{type:'textarea',id:'emailBody',label:D.emailBody,rows:3,'default':'',setup:function(E){if(E.email)this.setValue(E.email.body);},commit:function(E){if(!E.email)E.email={};E.email.body=this.getValue();}}],setup:function(E){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().hide();}}]},{id:'target',label:D.target,title:D.target,elements:[{type:'hbox',widths:['50%','50%'],children:[{type:'select',id:'linkTargetType',label:C.target,'default':'notSet',style:'width : 100%;',items:[[C.notSet,'notSet'],[D.targetFrame,'frame'],[D.targetPopup,'popup'],[C.targetNew,'_blank'],[C.targetTop,'_top'],[C.targetSelf,'_self'],[C.targetParent,'_parent']],onChange:c,setup:function(E){if(E.target)this.setValue(E.target.type||'notSet');c.call(this);},commit:function(E){if(!E.target)E.target={};E.target.type=this.getValue();}},{type:'text',id:'linkTargetName',label:D.targetFrameName,'default':'',setup:function(E){if(E.target)this.setValue(E.target.name);},commit:function(E){if(!E.target)E.target={};E.target.name=this.getValue().replace(/\W/gi,'');}}]},{type:'vbox',width:'100%',align:'center',padding:2,id:'popupFeatures',children:[{type:'fieldset',label:D.popupFeatures,children:[{type:'hbox',children:[{type:'checkbox',id:'resizable',label:D.popupResizable,setup:r,commit:u},{type:'checkbox',id:'status',label:D.popupStatusBar,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'location',label:D.popupLocationBar,setup:r,commit:u},{type:'checkbox',id:'toolbar',label:D.popupToolbar,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'menubar',label:D.popupMenuBar,setup:r,commit:u},{type:'checkbox',id:'fullscreen',label:D.popupFullScreen,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'scrollbars',label:D.popupScrollBars,setup:r,commit:u},{type:'checkbox',id:'dependent',label:D.popupDependent,setup:r,commit:u}]},{type:'hbox',children:[{type:'text',widths:['50%','50%'],labelLayout:'horizontal',label:C.width,id:'width',setup:r,commit:u},{type:'text',labelLayout:'horizontal',widths:['50%','50%'],label:D.popupLeft,id:'left',setup:r,commit:u}]},{type:'hbox',children:[{type:'text',labelLayout:'horizontal',widths:['50%','50%'],label:C.height,id:'height',setup:r,commit:u},{type:'text',labelLayout:'horizontal',label:D.popupTop,widths:['50%','50%'],id:'top',setup:r,commit:u}]}]}]}]},{id:'upload',label:D.upload,title:D.upload,hidden:true,filebrowser:'uploadButton',elements:[{type:'file',id:'upload',label:C.upload,style:'height:40px',size:29},{type:'fileButton',id:'uploadButton',label:C.uploadSubmit,filebrowser:'info:url','for':['upload','upload']}]},{id:'advanced',label:D.advanced,title:D.advanced,elements:[{type:'vbox',padding:1,children:[{type:'hbox',widths:['45%','35%','20%'],children:[{type:'text',id:'advId',label:D.id,setup:s,commit:v},{type:'select',id:'advLangDir',label:D.langDir,'default':'',style:'width:110px',items:[[C.notSet,''],[D.langDirLTR,'ltr'],[D.langDirRTL,'rtl']],setup:s,commit:v},{type:'text',id:'advAccessKey',width:'80px',label:D.acccessKey,maxLength:1,setup:s,commit:v}]},{type:'hbox',widths:['45%','35%','20%'],children:[{type:'text',label:D.name,id:'advName',setup:s,commit:v},{type:'text',label:D.langCode,id:'advLangCode',width:'110px','default':'',setup:s,commit:v},{type:'text',label:D.tabIndex,id:'advTabIndex',width:'80px',maxLength:5,setup:s,commit:v}]}]},{type:'vbox',padding:1,children:[{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:D.advisoryTitle,'default':'',id:'advTitle',setup:s,commit:v},{type:'text',label:D.advisoryContentType,'default':'',id:'advContentType',setup:s,commit:v}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:D.cssClasses,'default':'',id:'advCSSClasses',setup:s,commit:v},{type:'text',label:D.charset,'default':'',id:'advCharset',setup:s,commit:v}]},{type:'hbox',children:[{type:'text',label:D.styles,'default':'',id:'advStyles',setup:s,commit:v}]}]}]}],onShow:function(){var H=this;
-H.fakeObj=false;var E=H.getParentEditor(),F=E.getSelection(),G=null;if((G=b.getSelectedLink(E))&&G.hasAttribute('href'))F.selectElement(G);else if((G=F.getSelectedElement())&&G.is('img')&&G.data('cke-real-element-type')&&G.data('cke-real-element-type')=='anchor'){H.fakeObj=G;G=E.restoreRealElement(H.fakeObj);F.selectElement(H.fakeObj);}else G=null;H.setupContent(p.apply(H,[E,G]));},onOk:function(){var E={},F=[],G={},H=this,I=this.getParentEditor();this.commitContent(G);switch(G.type||'url'){case 'url':var J=G.url&&G.url.protocol!=undefined?G.url.protocol:'http://',K=G.url&&G.url.url||'';E['data-cke-saved-href']=K.indexOf('/')===0?K:J+K;break;case 'anchor':var L=G.anchor&&G.anchor.name,M=G.anchor&&G.anchor.id;E['data-cke-saved-href']='#'+(L||M||'');break;case 'email':var N,O=G.email,P=O.address;switch(y){case '':case 'encode':var Q=encodeURIComponent(O.subject||''),R=encodeURIComponent(O.body||''),S=[];Q&&S.push('subject='+Q);R&&S.push('body='+R);S=S.length?'?'+S.join('&'):'';if(y=='encode'){N=["javascript:void(location.href='mailto:'+",B(P)];S&&N.push("+'",x(S),"'");N.push(')');}else N=['mailto:',P,S];break;default:var T=P.split('@',2);O.name=T[0];O.domain=T[1];N=['javascript:',A(O)];}E['data-cke-saved-href']=N.join('');break;}if(G.target)if(G.target.type=='popup'){var U=["window.open(this.href, '",G.target.name||'',"', '"],V=['resizable','status','location','toolbar','menubar','fullscreen','scrollbars','dependent'],W=V.length,X=function(ai){if(G.target[ai])V.push(ai+'='+G.target[ai]);};for(var Y=0;Y<W;Y++)V[Y]=V[Y]+(G.target[V[Y]]?'=yes':'=no');X('width');X('left');X('height');X('top');U.push(V.join(','),"'); return false;");E['data-cke-pa-onclick']=U.join('');F.push('target');}else{if(G.target.type!='notSet'&&G.target.name)E.target=G.target.name;else F.push('target');F.push('data-cke-pa-onclick','onclick');}if(G.adv){var Z=function(ai,aj){var ak=G.adv[ai];if(ak)E[aj]=ak;else F.push(aj);};Z('advId','id');Z('advLangDir','dir');Z('advAccessKey','accessKey');if(G.adv.advName){E.name=E['data-cke-saved-name']=G.adv.advName;E['class']=(E['class']?E['class']+' ':'')+'cke_anchor';}else F=F.concat(['data-cke-saved-name','name']);Z('advLangCode','lang');Z('advTabIndex','tabindex');Z('advTitle','title');Z('advContentType','type');Z('advCSSClasses','class');Z('advCharset','charset');Z('advStyles','style');}E.href=E['data-cke-saved-href'];if(!this._.selectedElement){var aa=I.getSelection(),ab=aa.getRanges(true);if(ab.length==1&&ab[0].collapsed){var ac=new CKEDITOR.dom.text(G.type=='email'?G.email.address:E['data-cke-saved-href'],I.document);
-ab[0].insertNode(ac);ab[0].selectNodeContents(ac);aa.selectRanges(ab);}var ad=new CKEDITOR.style({element:'a',attributes:E});ad.type=CKEDITOR.STYLE_INLINE;ad.apply(I.document);}else{var ae=this._.selectedElement,af=ae.data('cke-saved-href'),ag=ae.getHtml();if(CKEDITOR.env.ie&&E.name!=ae.getAttribute('name')){var ah=new CKEDITOR.dom.element('<a name="'+CKEDITOR.tools.htmlEncode(E.name)+'">',I.document);aa=I.getSelection();ae.copyAttributes(ah,{name:1});ae.moveChildren(ah);ah.replace(ae);ae=ah;aa.selectElement(ae);}ae.setAttributes(E);ae.removeAttributes(F);if(af==ag||G.type=='email'&&ag.indexOf('@')!=-1)ae.setHtml(G.type=='email'?G.email.address:E['data-cke-saved-href']);if(ae.getAttribute('name'))ae.addClass('cke_anchor');else ae.removeClass('cke_anchor');if(this.fakeObj)I.createFakeElement(ae,'cke_anchor','anchor').replace(this.fakeObj);delete this._.selectedElement;}},onLoad:function(){if(!a.config.linkShowAdvancedTab)this.hidePage('advanced');if(!a.config.linkShowTargetTab)this.hidePage('target');},onFocus:function(){var E=this.getContentElement('info','linkType'),F;if(E&&E.getValue()=='url'){F=this.getContentElement('info','url');F.select();}}};});
+CKEDITOR.dialog.add('link',function(a){var b=CKEDITOR.plugins.link,c=function(){var F=this.getDialog(),G=F.getContentElement('target','popupFeatures'),H=F.getContentElement('target','linkTargetName'),I=this.getValue();if(!G||!H)return;G=G.getElement();G.hide();H.setValue('');switch(I){case 'frame':H.setLabel(a.lang.link.targetFrameName);H.getElement().show();break;case 'popup':G.show();H.setLabel(a.lang.link.targetPopupName);H.getElement().show();break;default:H.setValue(I);H.getElement().hide();break;}},d=function(){var F=this.getDialog(),G=['urlOptions','anchorOptions','emailOptions'],H=this.getValue(),I=F.definition.getContents('upload'),J=I&&I.hidden;if(H=='url'){if(a.config.linkShowTargetTab)F.showPage('target');if(!J)F.showPage('upload');}else{F.hidePage('target');if(!J)F.hidePage('upload');}for(var K=0;K<G.length;K++){var L=F.getContentElement('info',G[K]);if(!L)continue;L=L.getElement().getParent().getParent();if(G[K]==H+'Options')L.show();else L.hide();}F.layout();},e=/^javascript:/,f=/^mailto:([^?]+)(?:\?(.+))?$/,g=/subject=([^;?:@&=$,\/]*)/,h=/body=([^;?:@&=$,\/]*)/,i=/^#(.*)$/,j=/^((?:http|https|ftp|news):\/\/)?(.*)$/,k=/^(_(?:self|top|parent|blank))$/,l=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,m=/^javascript:([^(]+)\(([^)]+)\)$/,n=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,o=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,p=function(F,G){var H=G&&(G.data('cke-saved-href')||G.getAttribute('href'))||'',I,J,K,L,M={};if(I=H.match(e))if(y=='encode')H=H.replace(l,function(ae,af,ag){return 'mailto:'+String.fromCharCode.apply(String,af.split(','))+(ag&&w(ag));});else if(y)H.replace(m,function(ae,af,ag){if(af==z.name){M.type='email';var ah=M.email={},ai=/[^,\s]+/g,aj=/(^')|('$)/g,ak=ag.match(ai),al=ak.length,am,an;for(var ao=0;ao<al;ao++){an=decodeURIComponent(w(ak[ao].replace(aj,'')));am=z.params[ao].toLowerCase();ah[am]=an;}ah.address=[ah.name,ah.domain].join('@');}});if(!M.type)if(K=H.match(i)){M.type='anchor';M.anchor={};M.anchor.name=M.anchor.id=K[1];}else if(J=H.match(f)){var N=H.match(g),O=H.match(h);M.type='email';var P=M.email={};P.address=J[1];N&&(P.subject=decodeURIComponent(N[1]));O&&(P.body=decodeURIComponent(O[1]));}else if(H&&(L=H.match(j))){M.type='url';M.url={};M.url.protocol=L[1];M.url.url=L[2];}else M.type='url';if(G){var Q=G.getAttribute('target');M.target={};M.adv={};if(!Q){var R=G.data('cke-pa-onclick')||G.getAttribute('onclick'),S=R&&R.match(n);
+if(S){M.target.type='popup';M.target.name=S[1];var T;while(T=o.exec(S[2])){if((T[2]=='yes'||T[2]=='1')&&!(T[1] in {height:1,width:1,top:1,left:1}))M.target[T[1]]=true;else if(isFinite(T[2]))M.target[T[1]]=T[2];}}}else{var U=Q.match(k);if(U)M.target.type=M.target.name=Q;else{M.target.type='frame';M.target.name=Q;}}var V=this,W=function(ae,af){var ag=G.getAttribute(af);if(ag!==null)M.adv[ae]=ag||'';};W('advId','id');W('advLangDir','dir');W('advAccessKey','accessKey');M.adv.advName=G.data('cke-saved-name')||G.getAttribute('name')||'';W('advLangCode','lang');W('advTabIndex','tabindex');W('advTitle','title');W('advContentType','type');CKEDITOR.plugins.link.synAnchorSelector?M.adv.advCSSClasses=C(G):W('advCSSClasses','class');W('advCharset','charset');W('advStyles','style');W('advRel','rel');}var X=M.anchors=[],Y;if(CKEDITOR.plugins.link.emptyAnchorFix){var Z=F.document.getElementsByTag('a');for(i=0,count=Z.count();i<count;i++){Y=Z.getItem(i);if(Y.data('cke-saved-name')||Y.hasAttribute('name'))X.push({name:Y.data('cke-saved-name')||Y.getAttribute('name'),id:Y.getAttribute('id')});}}else{var aa=new CKEDITOR.dom.nodeList(F.document.$.anchors);for(var ab=0,ac=aa.count();ab<ac;ab++){Y=aa.getItem(ab);X[ab]={name:Y.getAttribute('name'),id:Y.getAttribute('id')};}}if(CKEDITOR.plugins.link.fakeAnchor){var ad=F.document.getElementsByTag('img');for(ab=0,ac=ad.count();ab<ac;ab++){if(Y=CKEDITOR.plugins.link.tryRestoreFakeAnchor(F,ad.getItem(ab)))X.push({name:Y.getAttribute('name'),id:Y.getAttribute('id')});}}this._.selectedElement=G;return M;},q=function(F,G){if(G[F])this.setValue(G[F][this.id]||'');},r=function(F){return q.call(this,'target',F);},s=function(F){return q.call(this,'adv',F);},t=function(F,G){if(!G[F])G[F]={};G[F][this.id]=this.getValue()||'';},u=function(F){return t.call(this,'target',F);},v=function(F){return t.call(this,'adv',F);};function w(F){return F.replace(/\\'/g,"'");};function x(F){return F.replace(/'/g,'\\$&');};var y=a.config.emailProtection||'';if(y&&y!='encode'){var z={};y.replace(/^([^(]+)\(([^)]+)\)$/,function(F,G,H){z.name=G;z.params=[];H.replace(/[^,\s]+/g,function(I){z.params.push(I);});});}function A(F){var G,H=z.name,I=z.params,J,K;G=[H,'('];for(var L=0;L<I.length;L++){J=I[L].toLowerCase();K=F[J];L>0&&G.push(',');G.push("'",K?x(encodeURIComponent(F[J])):'',"'");}G.push(')');return G.join('');};function B(F){var G,H=F.length,I=[];for(var J=0;J<H;J++){G=F.charCodeAt(J);I.push(G);}return 'String.fromCharCode('+I.join(',')+')';};function C(F){var G=F.getAttribute('class');
+return G?G.replace(/\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g,''):'';};var D=a.lang.common,E=a.lang.link;return{title:E.title,minWidth:350,minHeight:230,contents:[{id:'info',label:E.info,title:E.info,elements:[{id:'linkType',type:'select',label:E.type,'default':'url',items:[[E.toUrl,'url'],[E.toAnchor,'anchor'],[E.toEmail,'email']],onChange:d,setup:function(F){if(F.type)this.setValue(F.type);},commit:function(F){F.type=this.getValue();}},{type:'vbox',id:'urlOptions',children:[{type:'hbox',widths:['25%','75%'],children:[{id:'protocol',type:'select',label:D.protocol,'default':'http://',items:[['http://‎','http://'],['https://‎','https://'],['ftp://‎','ftp://'],['news://‎','news://'],[E.other,'']],setup:function(F){if(F.url)this.setValue(F.url.protocol||'');},commit:function(F){if(!F.url)F.url={};F.url.protocol=this.getValue();}},{type:'text',id:'url',label:D.url,required:true,onLoad:function(){this.allowOnChange=true;},onKeyUp:function(){var K=this;K.allowOnChange=false;var F=K.getDialog().getContentElement('info','protocol'),G=K.getValue(),H=/^(http|https|ftp|news):\/\/(?=.)/i,I=/^((javascript:)|[#\/\.\?])/i,J=H.exec(G);if(J){K.setValue(G.substr(J[0].length));F.setValue(J[0].toLowerCase());}else if(I.test(G))F.setValue('');K.allowOnChange=true;},onChange:function(){if(this.allowOnChange)this.onKeyUp();},validate:function(){var F=this.getDialog();if(F.getContentElement('info','linkType')&&F.getValueOf('info','linkType')!='url')return true;if(this.getDialog().fakeObj)return true;var G=CKEDITOR.dialog.validate.notEmpty(E.noUrl);return G.apply(this);},setup:function(F){this.allowOnChange=false;if(F.url)this.setValue(F.url.url);this.allowOnChange=true;},commit:function(F){this.onChange();if(!F.url)F.url={};F.url.url=this.getValue();this.allowOnChange=false;}}],setup:function(F){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().show();}},{type:'button',id:'browse',hidden:'true',filebrowser:'info:url',label:D.browseServer}]},{type:'vbox',id:'anchorOptions',width:260,align:'center',padding:0,children:[{type:'fieldset',id:'selectAnchorText',label:E.selectAnchor,setup:function(F){if(F.anchors.length>0)this.getElement().show();else this.getElement().hide();},children:[{type:'hbox',id:'selectAnchor',children:[{type:'select',id:'anchorName','default':'',label:E.anchorName,style:'width: 100%;',items:[['']],setup:function(F){var I=this;I.clear();I.add('');for(var G=0;G<F.anchors.length;G++){if(F.anchors[G].name)I.add(F.anchors[G].name);}if(F.anchor)I.setValue(F.anchor.name);
+var H=I.getDialog().getContentElement('info','linkType');if(H&&H.getValue()=='email')I.focus();},commit:function(F){if(!F.anchor)F.anchor={};F.anchor.name=this.getValue();}},{type:'select',id:'anchorId','default':'',label:E.anchorId,style:'width: 100%;',items:[['']],setup:function(F){var H=this;H.clear();H.add('');for(var G=0;G<F.anchors.length;G++){if(F.anchors[G].id)H.add(F.anchors[G].id);}if(F.anchor)H.setValue(F.anchor.id);},commit:function(F){if(!F.anchor)F.anchor={};F.anchor.id=this.getValue();}}],setup:function(F){if(F.anchors.length>0)this.getElement().show();else this.getElement().hide();}}]},{type:'html',id:'noAnchors',style:'text-align: center;',html:'<div role="label" tabIndex="-1">'+CKEDITOR.tools.htmlEncode(E.noAnchors)+'</div>',focus:true,setup:function(F){if(F.anchors.length<1)this.getElement().show();else this.getElement().hide();}}],setup:function(F){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().hide();}},{type:'vbox',id:'emailOptions',padding:1,children:[{type:'text',id:'emailAddress',label:E.emailAddress,required:true,validate:function(){var F=this.getDialog();if(!F.getContentElement('info','linkType')||F.getValueOf('info','linkType')!='email')return true;var G=CKEDITOR.dialog.validate.notEmpty(E.noEmail);return G.apply(this);},setup:function(F){if(F.email)this.setValue(F.email.address);var G=this.getDialog().getContentElement('info','linkType');if(G&&G.getValue()=='email')this.select();},commit:function(F){if(!F.email)F.email={};F.email.address=this.getValue();}},{type:'text',id:'emailSubject',label:E.emailSubject,setup:function(F){if(F.email)this.setValue(F.email.subject);},commit:function(F){if(!F.email)F.email={};F.email.subject=this.getValue();}},{type:'textarea',id:'emailBody',label:E.emailBody,rows:3,'default':'',setup:function(F){if(F.email)this.setValue(F.email.body);},commit:function(F){if(!F.email)F.email={};F.email.body=this.getValue();}}],setup:function(F){if(!this.getDialog().getContentElement('info','linkType'))this.getElement().hide();}}]},{id:'target',label:E.target,title:E.target,elements:[{type:'hbox',widths:['50%','50%'],children:[{type:'select',id:'linkTargetType',label:D.target,'default':'notSet',style:'width : 100%;',items:[[D.notSet,'notSet'],[E.targetFrame,'frame'],[E.targetPopup,'popup'],[D.targetNew,'_blank'],[D.targetTop,'_top'],[D.targetSelf,'_self'],[D.targetParent,'_parent']],onChange:c,setup:function(F){if(F.target)this.setValue(F.target.type||'notSet');c.call(this);},commit:function(F){if(!F.target)F.target={};
+F.target.type=this.getValue();}},{type:'text',id:'linkTargetName',label:E.targetFrameName,'default':'',setup:function(F){if(F.target)this.setValue(F.target.name);},commit:function(F){if(!F.target)F.target={};F.target.name=this.getValue().replace(/\W/gi,'');}}]},{type:'vbox',width:'100%',align:'center',padding:2,id:'popupFeatures',children:[{type:'fieldset',label:E.popupFeatures,children:[{type:'hbox',children:[{type:'checkbox',id:'resizable',label:E.popupResizable,setup:r,commit:u},{type:'checkbox',id:'status',label:E.popupStatusBar,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'location',label:E.popupLocationBar,setup:r,commit:u},{type:'checkbox',id:'toolbar',label:E.popupToolbar,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'menubar',label:E.popupMenuBar,setup:r,commit:u},{type:'checkbox',id:'fullscreen',label:E.popupFullScreen,setup:r,commit:u}]},{type:'hbox',children:[{type:'checkbox',id:'scrollbars',label:E.popupScrollBars,setup:r,commit:u},{type:'checkbox',id:'dependent',label:E.popupDependent,setup:r,commit:u}]},{type:'hbox',children:[{type:'text',widths:['50%','50%'],labelLayout:'horizontal',label:D.width,id:'width',setup:r,commit:u},{type:'text',labelLayout:'horizontal',widths:['50%','50%'],label:E.popupLeft,id:'left',setup:r,commit:u}]},{type:'hbox',children:[{type:'text',labelLayout:'horizontal',widths:['50%','50%'],label:D.height,id:'height',setup:r,commit:u},{type:'text',labelLayout:'horizontal',label:E.popupTop,widths:['50%','50%'],id:'top',setup:r,commit:u}]}]}]}]},{id:'upload',label:E.upload,title:E.upload,hidden:true,filebrowser:'uploadButton',elements:[{type:'file',id:'upload',label:D.upload,style:'height:40px',size:29},{type:'fileButton',id:'uploadButton',label:D.uploadSubmit,filebrowser:'info:url','for':['upload','upload']}]},{id:'advanced',label:E.advanced,title:E.advanced,elements:[{type:'vbox',padding:1,children:[{type:'hbox',widths:['45%','35%','20%'],children:[{type:'text',id:'advId',label:E.id,setup:s,commit:v},{type:'select',id:'advLangDir',label:E.langDir,'default':'',style:'width:110px',items:[[D.notSet,''],[E.langDirLTR,'ltr'],[E.langDirRTL,'rtl']],setup:s,commit:v},{type:'text',id:'advAccessKey',width:'80px',label:E.acccessKey,maxLength:1,setup:s,commit:v}]},{type:'hbox',widths:['45%','35%','20%'],children:[{type:'text',label:E.name,id:'advName',setup:s,commit:v},{type:'text',label:E.langCode,id:'advLangCode',width:'110px','default':'',setup:s,commit:v},{type:'text',label:E.tabIndex,id:'advTabIndex',width:'80px',maxLength:5,setup:s,commit:v}]}]},{type:'vbox',padding:1,children:[{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:E.advisoryTitle,'default':'',id:'advTitle',setup:s,commit:v},{type:'text',label:E.advisoryContentType,'default':'',id:'advContentType',setup:s,commit:v}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:E.cssClasses,'default':'',id:'advCSSClasses',setup:s,commit:v},{type:'text',label:E.charset,'default':'',id:'advCharset',setup:s,commit:v}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',label:E.rel,'default':'',id:'advRel',setup:s,commit:v},{type:'text',label:E.styles,'default':'',id:'advStyles',setup:s,commit:v}]}]}]}],onShow:function(){var F=this.getParentEditor(),G=F.getSelection(),H=null;
+if((H=b.getSelectedLink(F))&&H.hasAttribute('href'))G.selectElement(H);else H=null;this.setupContent(p.apply(this,[F,H]));},onOk:function(){var F={},G=[],H={},I=this,J=this.getParentEditor();this.commitContent(H);switch(H.type||'url'){case 'url':var K=H.url&&H.url.protocol!=undefined?H.url.protocol:'http://',L=H.url&&CKEDITOR.tools.trim(H.url.url)||'';F['data-cke-saved-href']=L.indexOf('/')===0?L:K+L;break;case 'anchor':var M=H.anchor&&H.anchor.name,N=H.anchor&&H.anchor.id;F['data-cke-saved-href']='#'+(M||N||'');break;case 'email':var O,P=H.email,Q=P.address;switch(y){case '':case 'encode':var R=encodeURIComponent(P.subject||''),S=encodeURIComponent(P.body||''),T=[];R&&T.push('subject='+R);S&&T.push('body='+S);T=T.length?'?'+T.join('&'):'';if(y=='encode'){O=["javascript:void(location.href='mailto:'+",B(Q)];T&&O.push("+'",x(T),"'");O.push(')');}else O=['mailto:',Q,T];break;default:var U=Q.split('@',2);P.name=U[0];P.domain=U[1];O=['javascript:',A(P)];}F['data-cke-saved-href']=O.join('');break;}if(H.target)if(H.target.type=='popup'){var V=["window.open(this.href, '",H.target.name||'',"', '"],W=['resizable','status','location','toolbar','menubar','fullscreen','scrollbars','dependent'],X=W.length,Y=function(ai){if(H.target[ai])W.push(ai+'='+H.target[ai]);};for(var Z=0;Z<X;Z++)W[Z]=W[Z]+(H.target[W[Z]]?'=yes':'=no');Y('width');Y('left');Y('height');Y('top');V.push(W.join(','),"'); return false;");F['data-cke-pa-onclick']=V.join('');G.push('target');}else{if(H.target.type!='notSet'&&H.target.name)F.target=H.target.name;else G.push('target');G.push('data-cke-pa-onclick','onclick');}if(H.adv){var aa=function(ai,aj){var ak=H.adv[ai];if(ak)F[aj]=ak;else G.push(aj);};aa('advId','id');aa('advLangDir','dir');aa('advAccessKey','accessKey');if(H.adv.advName)F.name=F['data-cke-saved-name']=H.adv.advName;else G=G.concat(['data-cke-saved-name','name']);aa('advLangCode','lang');aa('advTabIndex','tabindex');aa('advTitle','title');aa('advContentType','type');aa('advCSSClasses','class');aa('advCharset','charset');aa('advStyles','style');aa('advRel','rel');}F.href=F['data-cke-saved-href'];if(!this._.selectedElement){var ab=J.getSelection(),ac=ab.getRanges(true);if(ac.length==1&&ac[0].collapsed){var ad=new CKEDITOR.dom.text(H.type=='email'?H.email.address:F['data-cke-saved-href'],J.document);ac[0].insertNode(ad);ac[0].selectNodeContents(ad);ab.selectRanges(ac);}var ae=new CKEDITOR.style({element:'a',attributes:F});ae.type=CKEDITOR.STYLE_INLINE;ae.apply(J.document);}else{var af=this._.selectedElement,ag=af.data('cke-saved-href'),ah=af.getHtml();
+af.setAttributes(F);af.removeAttributes(G);if(H.adv&&H.adv.advName&&CKEDITOR.plugins.link.synAnchorSelector)af.addClass(af.getChildCount()?'cke_anchor':'cke_anchor_empty');if(ag==ah||H.type=='email'&&ah.indexOf('@')!=-1)af.setHtml(H.type=='email'?H.email.address:F['data-cke-saved-href']);delete this._.selectedElement;}},onLoad:function(){if(!a.config.linkShowAdvancedTab)this.hidePage('advanced');if(!a.config.linkShowTargetTab)this.hidePage('target');},onFocus:function(){var F=this.getContentElement('info','linkType'),G;if(F&&F.getValue()=='url'){G=this.getContentElement('info','url');G.select();}}};});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/pastetext/dialogs/pastetext.js b/appsrc/ODS-Framework/ckeditor/plugins/pastetext/dialogs/pastetext.js
index 0d8f165..c13fb56 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/pastetext/dialogs/pastetext.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/pastetext/dialogs/pastetext.js
@@ -3,4 +3,4 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){CKEDITOR.dialog.add('pastetext',function(a){return{title:a.lang.pasteText.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?368:350,minHeight:240,onShow:function(){this.getContentElement('general','content').getInputElement().setValue('');},onOk:function(){var b=this.getContentElement('general','content').getInputElement().getValue(),c=this.getParentEditor();setTimeout(function(){c.fire('paste',{text:b});},0);},contents:[{label:a.lang.common.generalTab,id:'general',elements:[{type:'html',id:'pasteMsg',html:'<div style="white-space:normal;width:340px;">'+a.lang.clipboard.pasteMsg+'</div>'},{type:'textarea',id:'content',className:'cke_pastetext',onLoad:function(){var b=this.getDialog().getContentElement('general','pasteMsg').getElement(),c=this.getElement().getElementsByTag('textarea').getItem(0);c.setAttribute('aria-labelledby',b.$.id);c.setStyle('direction',a.config.contentsLangDirection);},focus:function(){this.getElement().focus();}}]}]};});})();
+(function(){CKEDITOR.dialog.add('pastetext',function(a){return{title:a.lang.pasteText.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?368:350,minHeight:240,onShow:function(){this.setupContent();},onOk:function(){this.commitContent();},contents:[{label:a.lang.common.generalTab,id:'general',elements:[{type:'html',id:'pasteMsg',html:'<div style="white-space:normal;width:340px;">'+a.lang.clipboard.pasteMsg+'</div>'},{type:'textarea',id:'content',className:'cke_pastetext',onLoad:function(){var b=this.getDialog().getContentElement('general','pasteMsg').getElement(),c=this.getElement().getElementsByTag('textarea').getItem(0);c.setAttribute('aria-labelledby',b.$.id);c.setStyle('direction',a.config.contentsLangDirection);},focus:function(){this.getElement().focus();},setup:function(){this.setValue('');},commit:function(){var b=this.getValue();setTimeout(function(){a.fire('paste',{text:b});},0);}}]}]};});})();
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/scayt/dialogs/options.js b/appsrc/ODS-Framework/ckeditor/plugins/scayt/dialogs/options.js
index 3f9aa41..6d7c797 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/scayt/dialogs/options.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/scayt/dialogs/options.js
@@ -3,6 +3,6 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.dialog.add('scaytcheck',function(a){var b=true,c,d=CKEDITOR.document,e=[],f,g=[],h=0,i=['dic_create,dic_restore','dic_rename,dic_delete'],j=['mixedCase','mixedWithDigits','allCaps','ignoreDomainNames'];function k(){return document.forms.optionsbar.options;};function l(){return document.forms.languagesbar.scayt_lang;};function m(y,z){if(!y)return;var A=y.length;if(A==undefined){y.checked=y.value==z.toString();return;}for(var B=0;B<A;B++){y[B].checked=false;if(y[B].value==z.toString())y[B].checked=true;}};var n=a.lang.scayt,o=[{id:'options',label:n.optionsTab,elements:[{type:'html',id:'options',html:'<form name="optionsbar"><div class="inner_options">\t<div class="messagebox"></div>\t<div style="display:none;">\t\t<input type="checkbox" name="options"  id="allCaps" />\t\t<label for="allCaps" id="label_allCaps"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox"  id="ignoreDomainNames" />\t\t<label for="ignoreDomainNames" id="label_ignoreDomainNames"></label>\t</div>\t<div style="display:none;">\t<input name="options" type="checkbox"  id="mixedCase" />\t\t<label for="mixedCase" id="label_mixedCase"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox"  id="mixedWithDigits" />\t\t<label for="mixedWithDigits" id="label_mixedWithDigits"></label>\t</div></div></form>'}]},{id:'langs',label:n.languagesTab,elements:[{type:'html',id:'langs',html:'<form name="languagesbar"><div class="inner_langs">\t<div class="messagebox"></div>\t   <div style="float:left;width:45%;margin-left:5px;" id="scayt_lcol" ></div>   <div style="float:left;width:45%;margin-left:15px;" id="scayt_rcol"></div></div></form>'}]},{id:'dictionaries',label:n.dictionariesTab,elements:[{type:'html',style:'',id:'dictionaries',html:'<form name="dictionarybar"><div class="inner_dictionary" style="text-align:left; white-space:normal; width:320px; overflow: hidden;">\t<div style="margin:5px auto; width:80%;white-space:normal; overflow:hidden;" id="dic_message"> </div>\t<div style="margin:5px auto; width:80%;white-space:normal;">        <span class="cke_dialog_ui_labeled_label" >Dictionary name</span><br>\t\t<span class="cke_dialog_ui_labeled_content" >\t\t\t<div class="cke_dialog_ui_input_text">\t\t\t\t<input id="dic_name" type="text" class="cke_dialog_ui_input_text"/>\t\t</div></span></div>\t\t<div style="margin:5px auto; width:80%;white-space:normal;">\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_create">\t\t\t\t</a>\t\t\t<a  style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_delete">\t\t\t\t</a>\t\t\t<a  style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_rename">\t\t\t\t</a>\t\t\t<a  style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_restore">\t\t\t\t</a>\t\t</div>\t<div style="margin:5px auto; width:95%;white-space:normal;" id="dic_info"></div></div></form>'}]},{id:'about',label:n.aboutTab,elements:[{type:'html',id:'about',style:'margin: 5px 5px;',html:'<div id="scayt_about"></div>'}]}],p={title:n.title,minWidth:360,minHeight:220,onShow:function(){var y=this;
-y.data=a.fire('scaytDialog',{});y.options=y.data.scayt_control.option();y.sLang=y.data.scayt_control.sLang;if(!y.data||!y.data.scayt||!y.data.scayt_control){alert('Error loading application service');y.hide();return;}var z=0;if(b)y.data.scayt.getCaption(a.langCode||'en',function(A){if(z++>0)return;c=A;r.apply(y);s.apply(y);b=false;});else s.apply(y);y.selectPage(y.data.tab);},onOk:function(){var y=this.data.scayt_control;y.option(this.options);var z=this.chosed_lang;y.setLang(z);y.refresh();},onCancel:function(){var y=k();for(var z in y)y[z].checked=false;m(l(),'');},contents:g},q=CKEDITOR.plugins.scayt.getScayt(a);e=CKEDITOR.plugins.scayt.uiTabs;for(f in e){if(e[f]==1)g[g.length]=o[f];}if(e[2]==1)h=1;var r=function(){var y=this,z=y.data.scayt.getLangList(),A=['dic_create','dic_delete','dic_rename','dic_restore'],B=j,C;if(h){for(C=0;C<A.length;C++){var D=A[C];d.getById(D).setHtml('<span class="cke_dialog_ui_button">'+c['button_'+D]+'</span>');}d.getById('dic_info').setHtml(c.dic_info);}if(e[0]==1)for(C in B){var E='label_'+B[C],F=d.getById(E);if('undefined'!=typeof F&&'undefined'!=typeof c[E]&&'undefined'!=typeof y.options[B[C]]){F.setHtml(c[E]);var G=F.getParent();G.$.style.display='block';}}var H='<p><img src="'+window.scayt.getAboutInfo().logoURL+'" /></p>'+'<p>'+c.version+window.scayt.getAboutInfo().version.toString()+'</p>'+'<p>'+c.about_throwt_copy+'</p>';d.getById('scayt_about').setHtml(H);var I=function(S,T){var U=d.createElement('label');U.setAttribute('for','cke_option'+S);U.setHtml(T[S]);if(y.sLang==S)y.chosed_lang=S;var V=d.createElement('div'),W=CKEDITOR.dom.element.createFromHtml('<input id="cke_option'+S+'" type="radio" '+(y.sLang==S?'checked="checked"':'')+' value="'+S+'" name="scayt_lang" />');W.on('click',function(){this.$.checked=true;y.chosed_lang=S;});V.append(W);V.append(U);return{lang:T[S],code:S,radio:V};},J=[];if(e[1]==1){for(C in z.rtl)J[J.length]=I(C,z.ltr);for(C in z.ltr)J[J.length]=I(C,z.ltr);J.sort(function(S,T){return T.lang>S.lang?-1:1;});var K=d.getById('scayt_lcol'),L=d.getById('scayt_rcol');for(C=0;C<J.length;C++){var M=C<J.length/2?K:L;M.append(J[C].radio);}}var N={};N.dic_create=function(S,T,U){var V=U[0]+','+U[1],W=c.err_dic_create,X=c.succ_dic_create;window.scayt.createUserDictionary(T,function(Y){w(V);v(U[1]);X=X.replace('%s',Y.dname);u(X);},function(Y){W=W.replace('%s',Y.dname);t(W+'( '+(Y.message||'')+')');});};N.dic_rename=function(S,T){var U=c.err_dic_rename||'',V=c.succ_dic_rename||'';window.scayt.renameUserDictionary(T,function(W){V=V.replace('%s',W.dname);
-x(T);u(V);},function(W){U=U.replace('%s',W.dname);x(T);t(U+'( '+(W.message||'')+' )');});};N.dic_delete=function(S,T,U){var V=U[0]+','+U[1],W=c.err_dic_delete,X=c.succ_dic_delete;window.scayt.deleteUserDictionary(function(Y){X=X.replace('%s',Y.dname);w(V);v(U[0]);x('');u(X);},function(Y){W=W.replace('%s',Y.dname);t(W);});};N.dic_restore=y.dic_restore||(function(S,T,U){var V=U[0]+','+U[1],W=c.err_dic_restore,X=c.succ_dic_restore;window.scayt.restoreUserDictionary(T,function(Y){X=X.replace('%s',Y.dname);w(V);v(U[1]);u(X);},function(Y){W=W.replace('%s',Y.dname);t(W);});});function O(S){var T=d.getById('dic_name').getValue();if(!T){t(' Dictionary name should not be empty. ');return false;}try{var U=id=S.data.getTarget().getParent(),V=U.getId();N[V].apply(null,[U,T,i]);}catch(W){t(' Dictionary error. ');}return true;};var P=(i[0]+','+i[1]).split(','),Q;for(C=0,Q=P.length;C<Q;C+=1){var R=d.getById(P[C]);if(R)R.on('click',O,this);}},s=function(){var y=this;if(e[0]==1){var z=k();for(var A=0,B=z.length;A<B;A++){var C=z[A].id,D=d.getById(C);if(D){z[A].checked=false;if(y.options[C]==1)z[A].checked=true;if(b)D.on('click',function(){y.options[this.getId()]=this.$.checked?1:0;});}}}if(e[1]==1){var E=d.getById('cke_option'+y.sLang);m(E.$,y.sLang);}if(h){window.scayt.getNameUserDictionary(function(F){var G=F.dname;w(i[0]+','+i[1]);if(G){d.getById('dic_name').setValue(G);v(i[1]);}else v(i[0]);},function(){d.getById('dic_name').setValue('');});u('');}};function t(y){d.getById('dic_message').setHtml('<span style="color:red;">'+y+'</span>');};function u(y){d.getById('dic_message').setHtml('<span style="color:blue;">'+y+'</span>');};function v(y){y=String(y);var z=y.split(',');for(var A=0,B=z.length;A<B;A+=1)d.getById(z[A]).$.style.display='inline';};function w(y){y=String(y);var z=y.split(',');for(var A=0,B=z.length;A<B;A+=1)d.getById(z[A]).$.style.display='none';};function x(y){d.getById('dic_name').$.value=y;};return p;});
+CKEDITOR.dialog.add('scaytcheck',function(a){var b=true,c,d=CKEDITOR.document,e=a.name,f=CKEDITOR.plugins.scayt.getUiTabs(a),g,h=[],i=0,j=['dic_create_'+e+',dic_restore_'+e,'dic_rename_'+e+',dic_delete_'+e],k=['mixedCase','mixedWithDigits','allCaps','ignoreDomainNames'];function l(){if(typeof document.forms['optionsbar_'+e]!='undefined')return document.forms['optionsbar_'+e].options;return[];};function m(){if(typeof document.forms['languagesbar_'+e]!='undefined')return document.forms['languagesbar_'+e].scayt_lang;return[];};function n(z,A){if(!z)return;var B=z.length;if(B==undefined){z.checked=z.value==A.toString();return;}for(var C=0;C<B;C++){z[C].checked=false;if(z[C].value==A.toString())z[C].checked=true;}};var o=a.lang.scayt,p=[{id:'options',label:o.optionsTab,elements:[{type:'html',id:'options',html:'<form name="optionsbar_'+e+'"><div class="inner_options">'+'\t<div class="messagebox"></div>'+'\t<div style="display:none;">'+'\t\t<input type="checkbox" name="options"  id="allCaps_'+e+'" />'+'\t\t<label for="allCaps" id="label_allCaps_'+e+'"></label>'+'\t</div>'+'\t<div style="display:none;">'+'\t\t<input name="options" type="checkbox"  id="ignoreDomainNames_'+e+'" />'+'\t\t<label for="ignoreDomainNames" id="label_ignoreDomainNames_'+e+'"></label>'+'\t</div>'+'\t<div style="display:none;">'+'\t<input name="options" type="checkbox"  id="mixedCase_'+e+'" />'+'\t\t<label for="mixedCase" id="label_mixedCase_'+e+'"></label>'+'\t</div>'+'\t<div style="display:none;">'+'\t\t<input name="options" type="checkbox"  id="mixedWithDigits_'+e+'" />'+'\t\t<label for="mixedWithDigits" id="label_mixedWithDigits_'+e+'"></label>'+'\t</div>'+'</div></form>'}]},{id:'langs',label:o.languagesTab,elements:[{type:'html',id:'langs',html:'<form name="languagesbar_'+e+'"><div class="inner_langs">'+'\t<div class="messagebox"></div>\t'+'   <div style="float:left;width:45%;margin-left:5px;" id="scayt_lcol_'+e+'" ></div>'+'   <div style="float:left;width:45%;margin-left:15px;" id="scayt_rcol_'+e+'"></div>'+'</div></form>'}]},{id:'dictionaries',label:o.dictionariesTab,elements:[{type:'html',style:'',id:'dictionaries',html:'<form name="dictionarybar_'+e+'"><div class="inner_dictionary" style="text-align:left; white-space:normal; width:320px; overflow: hidden;">'+'\t<div style="margin:5px auto; width:80%;white-space:normal; overflow:hidden;" id="dic_message_'+e+'"> </div>'+'\t<div style="margin:5px auto; width:80%;white-space:normal;"> '+'       <span class="cke_dialog_ui_labeled_label" >Dictionary name</span><br>'+'\t\t<span class="cke_dialog_ui_labeled_content" >'+'\t\t\t<div class="cke_dialog_ui_input_text">'+'\t\t\t\t<input id="dic_name_'+e+'" type="text" class="cke_dialog_ui_input_text"/>'+'\t\t</div></span></div>'+'\t\t<div style="margin:5px auto; width:80%;white-space:normal;">'+'\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_create_'+e+'">'+'\t\t\t\t</a>'+'\t\t\t<a  style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_delete_'+e+'">'+'\t\t\t\t</a>'+'\t\t\t<a  style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_rename_'+e+'">'+'\t\t\t\t</a>'+'\t\t\t<a  style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_restore_'+e+'">'+'\t\t\t\t</a>'+'\t\t</div>'+'\t<div style="margin:5px auto; width:95%;white-space:normal;" id="dic_info_'+e+'"></div>'+'</div></form>'}]},{id:'about',label:o.aboutTab,elements:[{type:'html',id:'about',style:'margin: 5px 5px;',html:'<div id="scayt_about_'+e+'"></div>'}]}],q={title:o.title,minWidth:360,minHeight:220,onShow:function(){var z=this;
+z.data=a.fire('scaytDialog',{});z.options=z.data.scayt_control.option();z.chosed_lang=z.sLang=z.data.scayt_control.sLang;if(!z.data||!z.data.scayt||!z.data.scayt_control){alert('Error loading application service');z.hide();return;}var A=0;if(b)z.data.scayt.getCaption(a.langCode||'en',function(B){if(A++>0)return;c=B;s.apply(z);t.apply(z);b=false;});else t.apply(z);z.selectPage(z.data.tab);},onOk:function(){var z=this.data.scayt_control;z.option(this.options);var A=this.chosed_lang;z.setLang(A);z.refresh();},onCancel:function(){var z=l();for(var A in z)z[A].checked=false;n(m(),'');},contents:h},r=CKEDITOR.plugins.scayt.getScayt(a);for(g=0;g<f.length;g++){if(f[g]==1)h[h.length]=p[g];}if(f[2]==1)i=1;var s=function(){var z=this,A=z.data.scayt.getLangList(),B=['dic_create','dic_delete','dic_rename','dic_restore'],C=[],D=[],E=k,F;if(i){for(F=0;F<B.length;F++){C[F]=B[F]+'_'+e;d.getById(C[F]).setHtml('<span class="cke_dialog_ui_button">'+c['button_'+B[F]]+'</span>');}d.getById('dic_info_'+e).setHtml(c.dic_info);}if(f[0]==1)for(F in E){var G='label_'+E[F],H=G+'_'+e,I=d.getById(H);if('undefined'!=typeof I&&'undefined'!=typeof c[G]&&'undefined'!=typeof z.options[E[F]]){I.setHtml(c[G]);var J=I.getParent();J.$.style.display='block';}}var K='<p><img src="'+window.scayt.getAboutInfo().logoURL+'" /></p>'+'<p>'+c.version+window.scayt.getAboutInfo().version.toString()+'</p>'+'<p>'+c.about_throwt_copy+'</p>';d.getById('scayt_about_'+e).setHtml(K);var L=function(U,V){var W=d.createElement('label');W.setAttribute('for','cke_option'+U);W.setHtml(V[U]);if(z.sLang==U)z.chosed_lang=U;var X=d.createElement('div'),Y=CKEDITOR.dom.element.createFromHtml('<input id="cke_option'+U+'" type="radio" '+(z.sLang==U?'checked="checked"':'')+' value="'+U+'" name="scayt_lang" />');Y.on('click',function(){this.$.checked=true;z.chosed_lang=U;});X.append(Y);X.append(W);return{lang:V[U],code:U,radio:X};};if(f[1]==1){for(F in A.rtl)D[D.length]=L(F,A.ltr);for(F in A.ltr)D[D.length]=L(F,A.ltr);D.sort(function(U,V){return V.lang>U.lang?-1:1;});var M=d.getById('scayt_lcol_'+e),N=d.getById('scayt_rcol_'+e);for(F=0;F<D.length;F++){var O=F<D.length/2?M:N;O.append(D[F].radio);}}var P={};P.dic_create=function(U,V,W){var X=W[0]+','+W[1],Y=c.err_dic_create,Z=c.succ_dic_create;window.scayt.createUserDictionary(V,function(aa){x(X);w(W[1]);Z=Z.replace('%s',aa.dname);v(Z);},function(aa){Y=Y.replace('%s',aa.dname);u(Y+'( '+(aa.message||'')+')');});};P.dic_rename=function(U,V){var W=c.err_dic_rename||'',X=c.succ_dic_rename||'';
+window.scayt.renameUserDictionary(V,function(Y){X=X.replace('%s',Y.dname);y(V);v(X);},function(Y){W=W.replace('%s',Y.dname);y(V);u(W+'( '+(Y.message||'')+' )');});};P.dic_delete=function(U,V,W){var X=W[0]+','+W[1],Y=c.err_dic_delete,Z=c.succ_dic_delete;window.scayt.deleteUserDictionary(function(aa){Z=Z.replace('%s',aa.dname);x(X);w(W[0]);y('');v(Z);},function(aa){Y=Y.replace('%s',aa.dname);u(Y);});};P.dic_restore=z.dic_restore||(function(U,V,W){var X=W[0]+','+W[1],Y=c.err_dic_restore,Z=c.succ_dic_restore;window.scayt.restoreUserDictionary(V,function(aa){Z=Z.replace('%s',aa.dname);x(X);w(W[1]);v(Z);},function(aa){Y=Y.replace('%s',aa.dname);u(Y);});});function Q(U){var V=d.getById('dic_name_'+e).getValue();if(!V){u(' Dictionary name should not be empty. ');return false;}try{var W=U.data.getTarget().getParent(),X=/(dic_\w+)_[\w\d]+/.exec(W.getId())[1];P[X].apply(null,[W,V,j]);}catch(Y){u(' Dictionary error. ');}return true;};var R=(j[0]+','+j[1]).split(','),S;for(F=0,S=R.length;F<S;F+=1){var T=d.getById(R[F]);if(T)T.on('click',Q,this);}},t=function(){var z=this;if(f[0]==1){var A=l();for(var B=0,C=A.length;B<C;B++){var D=A[B].id,E=d.getById(D);if(E){A[B].checked=false;if(z.options[D.split('_')[0]]==1)A[B].checked=true;if(b)E.on('click',function(){z.options[this.getId().split('_')[0]]=this.$.checked?1:0;});}}}if(f[1]==1){var F=d.getById('cke_option'+z.sLang);n(F.$,z.sLang);}if(i){window.scayt.getNameUserDictionary(function(G){var H=G.dname;x(j[0]+','+j[1]);if(H){d.getById('dic_name_'+e).setValue(H);w(j[1]);}else w(j[0]);},function(){d.getById('dic_name_'+e).setValue('');});v('');}};function u(z){d.getById('dic_message_'+e).setHtml('<span style="color:red;">'+z+'</span>');};function v(z){d.getById('dic_message_'+e).setHtml('<span style="color:blue;">'+z+'</span>');};function w(z){z=String(z);var A=z.split(',');for(var B=0,C=A.length;B<C;B+=1)d.getById(A[B]).$.style.display='inline';};function x(z){z=String(z);var A=z.split(',');for(var B=0,C=A.length;B<C;B+=1)d.getById(A[B]).$.style.display='none';};function y(z){d.getById('dic_name_'+e).$.value=z;};return q;});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/smiley/dialogs/smiley.js b/appsrc/ODS-Framework/ckeditor/plugins/smiley/dialogs/smiley.js
index 194f258..6572498 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/smiley/dialogs/smiley.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/smiley/dialogs/smiley.js
@@ -4,4 +4,4 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
 CKEDITOR.dialog.add('smiley',function(a){var b=a.config,c=a.lang.smiley,d=b.smiley_images,e=b.smiley_columns||8,f,g,h=function(o){var p=o.data.getTarget(),q=p.getName();if(q=='a')p=p.getChild(0);else if(q!='img')return;var r=p.getAttribute('cke_src'),s=p.getAttribute('title'),t=a.document.createElement('img',{attributes:{src:r,'data-cke-saved-src':r,title:s,alt:s,width:p.$.width,height:p.$.height}});a.insertElement(t);g.hide();o.data.preventDefault();},i=CKEDITOR.tools.addFunction(function(o,p){o=new CKEDITOR.dom.event(o);p=new CKEDITOR.dom.element(p);var q,r,s=o.getKeystroke(),t=a.lang.dir=='rtl';switch(s){case 38:if(q=p.getParent().getParent().getPrevious()){r=q.getChild([p.getParent().getIndex(),0]);r.focus();}o.preventDefault();break;case 40:if(q=p.getParent().getParent().getNext()){r=q.getChild([p.getParent().getIndex(),0]);if(r)r.focus();}o.preventDefault();break;case 32:h({data:o});o.preventDefault();break;case t?37:39:case 9:if(q=p.getParent().getNext()){r=q.getChild(0);r.focus();o.preventDefault(true);}else if(q=p.getParent().getParent().getNext()){r=q.getChild([0,0]);if(r)r.focus();o.preventDefault(true);}break;case t?39:37:case CKEDITOR.SHIFT+9:if(q=p.getParent().getPrevious()){r=q.getChild(0);r.focus();o.preventDefault(true);}else if(q=p.getParent().getParent().getPrevious()){r=q.getLast().getChild(0);r.focus();o.preventDefault(true);}break;default:return;}}),j=CKEDITOR.tools.getNextId()+'_smiley_emtions_label',k=['<div><span id="'+j+'" class="cke_voice_label">'+c.options+'</span>','<table role="listbox" aria-labelledby="'+j+'" style="width:100%;height:100%" cellspacing="2" cellpadding="2"',CKEDITOR.env.ie&&CKEDITOR.env.quirks?' style="position:absolute;"':'','><tbody>'],l=d.length;for(f=0;f<l;f++){if(f%e===0)k.push('<tr>');var m='cke_smile_label_'+f+'_'+CKEDITOR.tools.getNextNumber();k.push('<td class="cke_dark_background cke_centered" style="vertical-align: middle;"><a href="javascript:void(0)" role="option"',' aria-posinset="'+(f+1)+'"',' aria-setsize="'+l+'"',' aria-labelledby="'+m+'"',' class="cke_smile cke_hand" tabindex="-1" onkeydown="CKEDITOR.tools.callFunction( ',i,', event, this );">','<img class="cke_hand" title="',b.smiley_descriptions[f],'" cke_src="',CKEDITOR.tools.htmlEncode(b.smiley_path+d[f]),'" alt="',b.smiley_descriptions[f],'"',' src="',CKEDITOR.tools.htmlEncode(b.smiley_path+d[f]),'"',CKEDITOR.env.ie?" onload=\"this.setAttribute('width', 2); this.removeAttribute('width');\" ":'','><span id="'+m+'" class="cke_voice_label">'+b.smiley_descriptions[f]+'</span>'+'</a>','</td>');
-if(f%e==e-1)k.push('</tr>');}if(f<e-1){for(;f<e-1;f++)k.push('<td></td>');k.push('</tr>');}k.push('</tbody></table></div>');var n={type:'html',html:k.join(''),onLoad:function(o){g=o.sender;},focus:function(){var o=this;setTimeout(function(){var p=o.getElement().getElementsByTag('a').getItem(0);p.focus();},0);},onClick:h,style:'width: 100%; border-collapse: separate;'};return{title:a.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:'tab1',label:'',title:'',expand:true,padding:0,elements:[n]}],buttons:[CKEDITOR.dialog.cancelButton]};});
+if(f%e==e-1)k.push('</tr>');}if(f<e-1){for(;f<e-1;f++)k.push('<td></td>');k.push('</tr>');}k.push('</tbody></table></div>');var n={type:'html',id:'smileySelector',html:k.join(''),onLoad:function(o){g=o.sender;},focus:function(){var o=this;setTimeout(function(){var p=o.getElement().getElementsByTag('a').getItem(0);p.focus();},0);},onClick:h,style:'width: 100%; border-collapse: separate;'};return{title:a.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:'tab1',label:'',title:'',expand:true,padding:0,elements:[n]}],buttons:[CKEDITOR.dialog.cancelButton]};});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/specialchar/dialogs/specialchar.js b/appsrc/ODS-Framework/ckeditor/plugins/specialchar/dialogs/specialchar.js
index bf6988d..80df472 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/specialchar/dialogs/specialchar.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/specialchar/dialogs/specialchar.js
@@ -3,5 +3,5 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.dialog.add('specialchar',function(a){var b,c=a.lang.specialChar,d=function(j){var k,l;if(j.data)k=j.data.getTarget();else k=new CKEDITOR.dom.element(j);if(k.getName()=='a'&&(l=k.getChild(0).getHtml())){k.removeClass('cke_light_background');b.hide();a.insertHtml(l);}},e=CKEDITOR.tools.addFunction(d),f,g=function(j,k){var l;k=k||j.data.getTarget();if(k.getName()=='span')k=k.getParent();if(k.getName()=='a'&&(l=k.getChild(0).getHtml())){if(f)h(null,f);var m=b.getContentElement('info','htmlPreview').getElement();b.getContentElement('info','charPreview').getElement().setHtml(l);m.setHtml(CKEDITOR.tools.htmlEncode(l));k.getParent().addClass('cke_light_background');f=k;}},h=function(j,k){k=k||j.data.getTarget();if(k.getName()=='span')k=k.getParent();if(k.getName()=='a'){b.getContentElement('info','charPreview').getElement().setHtml(' ');b.getContentElement('info','htmlPreview').getElement().setHtml(' ');k.getParent().removeClass('cke_light_background');f=undefined;}},i=CKEDITOR.tools.addFunction(function(j){j=new CKEDITOR.dom.event(j);var k=j.getTarget(),l,m,n=j.getKeystroke(),o=a.lang.dir=='rtl';switch(n){case 38:if(l=k.getParent().getParent().getPrevious()){m=l.getChild([k.getParent().getIndex(),0]);m.focus();h(null,k);g(null,m);}j.preventDefault();break;case 40:if(l=k.getParent().getParent().getNext()){m=l.getChild([k.getParent().getIndex(),0]);if(m&&m.type==1){m.focus();h(null,k);g(null,m);}}j.preventDefault();break;case 32:d({data:j});j.preventDefault();break;case o?37:39:case 9:if(l=k.getParent().getNext()){m=l.getChild(0);if(m.type==1){m.focus();h(null,k);g(null,m);j.preventDefault(true);}else h(null,k);}else if(l=k.getParent().getParent().getNext()){m=l.getChild([0,0]);if(m&&m.type==1){m.focus();h(null,k);g(null,m);j.preventDefault(true);}else h(null,k);}break;case o?39:37:case CKEDITOR.SHIFT+9:if(l=k.getParent().getPrevious()){m=l.getChild(0);m.focus();h(null,k);g(null,m);j.preventDefault(true);}else if(l=k.getParent().getParent().getPrevious()){m=l.getLast().getChild(0);m.focus();h(null,k);g(null,m);j.preventDefault(true);}else h(null,k);break;default:return;}});return{title:c.title,minWidth:430,minHeight:280,buttons:[CKEDITOR.dialog.cancelButton],charColumns:17,onLoad:function(){var j=this.definition.charColumns,k=a.config.extraSpecialChars,l=a.config.specialChars,m=CKEDITOR.tools.getNextId()+'_specialchar_table_label',n=['<table role="listbox" aria-labelledby="'+m+'"'+' style="width: 320px; height: 100%; border-collapse: separate;"'+' align="center" cellspacing="2" cellpadding="2" border="0">'],o=0,p=l.length,q,r;
+CKEDITOR.dialog.add('specialchar',function(a){var b,c=a.lang.specialChar,d=function(j){var k,l;if(j.data)k=j.data.getTarget();else k=new CKEDITOR.dom.element(j);if(k.getName()=='a'&&(l=k.getChild(0).getHtml())){k.removeClass('cke_light_background');b.hide();var m=a.document.createElement('span');m.setHtml(l);a.insertText(m.getText());}},e=CKEDITOR.tools.addFunction(d),f,g=function(j,k){var l;k=k||j.data.getTarget();if(k.getName()=='span')k=k.getParent();if(k.getName()=='a'&&(l=k.getChild(0).getHtml())){if(f)h(null,f);var m=b.getContentElement('info','htmlPreview').getElement();b.getContentElement('info','charPreview').getElement().setHtml(l);m.setHtml(CKEDITOR.tools.htmlEncode(l));k.getParent().addClass('cke_light_background');f=k;}},h=function(j,k){k=k||j.data.getTarget();if(k.getName()=='span')k=k.getParent();if(k.getName()=='a'){b.getContentElement('info','charPreview').getElement().setHtml(' ');b.getContentElement('info','htmlPreview').getElement().setHtml(' ');k.getParent().removeClass('cke_light_background');f=undefined;}},i=CKEDITOR.tools.addFunction(function(j){j=new CKEDITOR.dom.event(j);var k=j.getTarget(),l,m,n=j.getKeystroke(),o=a.lang.dir=='rtl';switch(n){case 38:if(l=k.getParent().getParent().getPrevious()){m=l.getChild([k.getParent().getIndex(),0]);m.focus();h(null,k);g(null,m);}j.preventDefault();break;case 40:if(l=k.getParent().getParent().getNext()){m=l.getChild([k.getParent().getIndex(),0]);if(m&&m.type==1){m.focus();h(null,k);g(null,m);}}j.preventDefault();break;case 32:d({data:j});j.preventDefault();break;case o?37:39:case 9:if(l=k.getParent().getNext()){m=l.getChild(0);if(m.type==1){m.focus();h(null,k);g(null,m);j.preventDefault(true);}else h(null,k);}else if(l=k.getParent().getParent().getNext()){m=l.getChild([0,0]);if(m&&m.type==1){m.focus();h(null,k);g(null,m);j.preventDefault(true);}else h(null,k);}break;case o?39:37:case CKEDITOR.SHIFT+9:if(l=k.getParent().getPrevious()){m=l.getChild(0);m.focus();h(null,k);g(null,m);j.preventDefault(true);}else if(l=k.getParent().getParent().getPrevious()){m=l.getLast().getChild(0);m.focus();h(null,k);g(null,m);j.preventDefault(true);}else h(null,k);break;default:return;}});return{title:c.title,minWidth:430,minHeight:280,buttons:[CKEDITOR.dialog.cancelButton],charColumns:17,onLoad:function(){var j=this.definition.charColumns,k=a.config.extraSpecialChars,l=a.config.specialChars,m=CKEDITOR.tools.getNextId()+'_specialchar_table_label',n=['<table role="listbox" aria-labelledby="'+m+'"'+' style="width: 320px; height: 100%; border-collapse: separate;"'+' align="center" cellspacing="2" cellpadding="2" border="0">'],o=0,p=l.length,q,r;
 while(o<p){n.push('<tr>');for(var s=0;s<j;s++,o++){if(q=l[o]){r='';if(q instanceof Array){r=q[1];q=q[0];}else{var t=q.toLowerCase().replace('&','').replace(';','').replace('#','');r=c[t]||q;}var u='cke_specialchar_label_'+o+'_'+CKEDITOR.tools.getNextNumber();n.push('<td class="cke_dark_background" style="cursor: default" role="presentation"><a href="javascript: void(0);" role="option" aria-posinset="'+(o+1)+'"',' aria-setsize="'+p+'"',' aria-labelledby="'+u+'"',' style="cursor: inherit; display: block; height: 1.25em; margin-top: 0.25em; text-align: center;" title="',CKEDITOR.tools.htmlEncode(r),'" onkeydown="CKEDITOR.tools.callFunction( '+i+', event, this )"'+' onclick="CKEDITOR.tools.callFunction('+e+', this); return false;"'+' tabindex="-1">'+'<span style="margin: 0 auto;cursor: inherit">'+q+'</span>'+'<span class="cke_voice_label" id="'+u+'">'+r+'</span></a>');}else n.push('<td class="cke_dark_background"> ');n.push('</td>');}n.push('</tr>');}n.push('</tbody></table>','<span id="'+m+'" class="cke_voice_label">'+c.options+'</span>');this.getContentElement('info','charContainer').getElement().setHtml(n.join(''));},contents:[{id:'info',label:a.lang.common.generalTab,title:a.lang.common.generalTab,padding:0,align:'top',elements:[{type:'hbox',align:'top',widths:['320px','90px'],children:[{type:'html',id:'charContainer',html:'',onMouseover:g,onMouseout:h,focus:function(){var j=this.getElement().getElementsByTag('a').getItem(0);setTimeout(function(){j.focus();g(null,j);},0);},onShow:function(){var j=this.getElement().getChild([0,0,0,0,0]);setTimeout(function(){j.focus();g(null,j);},0);},onLoad:function(j){b=j.sender;}},{type:'hbox',align:'top',widths:['100%'],children:[{type:'vbox',align:'top',children:[{type:'html',html:'<div></div>'},{type:'html',id:'charPreview',className:'cke_dark_background',style:"border:1px solid #eeeeee;font-size:28px;height:40px;width:70px;padding-top:9px;font-family:'Microsoft Sans Serif',Arial,Helvetica,Verdana;text-align:center;",html:'<div> </div>'},{type:'html',id:'htmlPreview',className:'cke_dark_background',style:"border:1px solid #eeeeee;font-size:14px;height:20px;width:70px;padding-top:2px;font-family:'Microsoft Sans Serif',Arial,Helvetica,Verdana;text-align:center;",html:'<div> </div>'}]}]}]}]}]};});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/specialchar/lang/en.js b/appsrc/ODS-Framework/ckeditor/plugins/specialchar/lang/en.js
index 2bd269c..9893b84 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/specialchar/lang/en.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/specialchar/lang/en.js
@@ -3,4 +3,4 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.plugins.setLang('specialchar','en',{euro:'EURO SIGN',lsquo:'LEFT SINGLE QUOTATION MARK',rsquo:'RIGHT SINGLE QUOTATION MARK',ldquo:'LEFT DOUBLE QUOTATION MARK',rdquo:'RIGHT DOUBLE QUOTATION MARK',ndash:'EN DASH',mdash:'EM DASH',iexcl:'INVERTED EXCLAMATION MARK',cent:'CENT SIGN',pound:'POUND SIGN',curren:'CURRENCY SIGN',yen:'YEN SIGN',brvbar:'BROKEN BAR',sect:'SECTION SIGN',uml:'DIAERESIS',copy:'COPYRIGHT SIGN',ordf:'FEMININE ORDINAL INDICATOR',laquo:'LEFT-POINTING DOUBLE ANGLE QUOTATION MARK',not:'NOT SIGN',reg:'REGISTERED SIGN',macr:'MACRON',deg:'DEGREE SIGN',sup2:'SUPERSCRIPT TWO',sup3:'SUPERSCRIPT THREE',acute:'ACUTE ACCENT',micro:'MICRO SIGN',para:'PILCROW SIGN',middot:'MIDDLE DOT',cedil:'CEDILLA',sup1:'SUPERSCRIPT ONE',ordm:'MASCULINE ORDINAL INDICATOR',frac14:'VULGAR FRACTION ONE QUARTER',frac12:'VULGAR FRACTION ONE HALF',frac34:'VULGAR FRACTION THREE QUARTERS',iquest:'INVERTED QUESTION MARK',agrave:'LATIN SMALL LETTER A WITH GRAVE',aacute:'LATIN SMALL LETTER A WITH ACUTE',acirc:'LATIN SMALL LETTER A WITH CIRCUMFLEX',atilde:'LATIN SMALL LETTER A WITH TILDE',auml:'LATIN SMALL LETTER A WITH DIAERESIS',aring:'LATIN SMALL LETTER A WITH RING ABOVE',aelig:'LATIN SMALL LETTER AE',ccedil:'LATIN SMALL LETTER C WITH CEDILLA',egrave:'LATIN SMALL LETTER E WITH GRAVE',eacute:'LATIN SMALL LETTER E WITH ACUTE',ecirc:'LATIN SMALL LETTER E WITH CIRCUMFLEX',euml:'LATIN SMALL LETTER E WITH DIAERESIS',igrave:'LATIN SMALL LETTER I WITH GRAVE',iacute:'LATIN SMALL LETTER I WITH ACUTE',icirc:'LATIN SMALL LETTER I WITH CIRCUMFLEX',iuml:'LATIN SMALL LETTER I WITH DIAERESIS',eth:'LATIN SMALL LETTER ETH',ntilde:'LATIN SMALL LETTER N WITH TILDE',ograve:'LATIN SMALL LETTER O WITH GRAVE',oacute:'LATIN SMALL LETTER O WITH ACUTE',ocirc:'LATIN SMALL LETTER O WITH CIRCUMFLEX',otilde:'LATIN SMALL LETTER O WITH TILDE',ouml:'LATIN SMALL LETTER O WITH DIAERESIS',times:'MULTIPLICATION SIGN',oslash:'LATIN SMALL LETTER O WITH STROKE',ugrave:'LATIN SMALL LETTER U WITH GRAVE',uacute:'LATIN SMALL LETTER U WITH ACUTE',ucirc:'LATIN SMALL LETTER U WITH CIRCUMFLEX',uuml:'LATIN SMALL LETTER U WITH DIAERESIS',yacute:'LATIN SMALL LETTER Y WITH ACUTE',thorn:'LATIN SMALL LETTER THORN',szlig:'LATIN SMALL LETTER SHARP S',divide:'DIVISION SIGN',yuml:'LATIN SMALL LETTER Y WITH DIAERESIS',oelig:'LATIN SMALL LIGATURE OE',372:'LATIN CAPITAL LETTER W WITH CIRCUMFLEX',374:'LATIN CAPITAL LETTER Y WITH CIRCUMFLEX',373:'LATIN SMALL LETTER W WITH CIRCUMFLEX',375:'LATIN SMALL LETTER Y WITH CIRCUMFLEX',8219:'SINGLE HIGH-REVERSED-9 QUOTATION MARK',bdquo:'DOUBLE LOW-9 QUOTATION MARK',hellip:'HORIZONTAL ELLIPSIS',trade:'TRADE MARK SIGN',9658:'BLACK RIGHT-POINTING POINTER',bull:'BULLET',rarr:'RIGHTWARDS DOUBLE ARROW',harr:'LEFT RIGHT DOUBLE ARROW',diams:'BLACK DIAMOND SUIT',asymp:'ALMOST EQUAL TO',sbquo:'SINGLE LOW-9 QUOTATION MARK'});
+CKEDITOR.plugins.setLang('specialchar','en',{euro:'Euro sign',lsquo:'Left single quotation mark',rsquo:'Right single quotation mark',ldquo:'Left double quotation mark',rdquo:'Right double quotation mark',ndash:'En dash',mdash:'Em dash',iexcl:'Inverted exclamation mark',cent:'Cent sign',pound:'Pound sign',curren:'Currency sign',yen:'Yen sign',brvbar:'Broken bar',sect:'Section sign',uml:'Diaeresis',copy:'Copyright sign',ordf:'Feminine ordinal indicator',laquo:'Left-pointing double angle quotation mark',not:'Not sign',reg:'Registered sign',macr:'Macron',deg:'Degree sign',sup2:'Superscript two',sup3:'Superscript three',acute:'Acute accent',micro:'Micro sign',para:'Pilcrow sign',middot:'Middle dot',cedil:'Cedilla',sup1:'Superscript one',ordm:'Masculine ordinal indicator',frac14:'Vulgar fraction one quarter',frac12:'Vulgar fraction one half',frac34:'Vulgar fraction three quarters',iquest:'Inverted question mark',agrave:'Latin small letter a with grave',aacute:'Latin small letter a with acute',acirc:'Latin small letter a with circumflex',atilde:'Latin small letter a with tilde',auml:'Latin small letter a with diaeresis',aring:'Latin small letter a with ring above',aelig:'Latin small letter ae',ccedil:'Latin small letter c with cedilla',egrave:'Latin small letter e with grave',eacute:'Latin small letter e with acute',ecirc:'Latin small letter e with circumflex',euml:'Latin small letter e with diaeresis',igrave:'Latin small letter i with grave',iacute:'Latin small letter i with acute',icirc:'Latin small letter i with circumflex',iuml:'Latin small letter i with diaeresis',eth:'Latin small letter eth',ntilde:'Latin small letter n with tilde',ograve:'Latin small letter o with grave',oacute:'Latin small letter o with acute',ocirc:'Latin small letter o with circumflex',otilde:'Latin small letter o with tilde',ouml:'Latin small letter o with diaeresis',times:'Multiplication sign',oslash:'Latin small letter o with stroke',ugrave:'Latin small letter u with grave',uacute:'Latin small letter u with acute',ucirc:'Latin small letter u with circumflex',uuml:'Latin small letter u with diaeresis',yacute:'Latin small letter y with acute',thorn:'Latin small letter thorn',szlig:'Latin small letter sharp s',divide:'Division sign',yuml:'Latin small letter y with diaeresis',oelig:'Latin small ligature oe',372:'Latin capital letter w with circumflex',374:'Latin capital letter y with circumflex',373:'Latin small letter w with circumflex',375:'Latin small letter y with circumflex',8219:'Single high-reversed-9 quotation mark',bdquo:'Double low-9 quotation mark',hellip:'Horizontal ellipsis',trade:'Trade mark sign',9658:'Black right-pointing pointer',bull:'Bullet',rarr:'Rightwards double arrow',harr:'Left right double arrow',diams:'Black diamond suit',asymp:'Almost equal to',sbquo:'Single low-9 quotation mark'});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/table/dialogs/table.js b/appsrc/ODS-Framework/ckeditor/plugins/table/dialogs/table.js
index b6f7cf1..640aeb5 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/table/dialogs/table.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/table/dialogs/table.js
@@ -3,7 +3,7 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){var a=/^(\d+(?:\.\d+)?)(px|%)$/,b=/^(\d+(?:\.\d+)?)px$/,c=function(e){var f=this.id;if(!e.info)e.info={};e.info[f]=this.getValue();};function d(e,f){var g=function(i){return new CKEDITOR.dom.element(i,e.document);},h=e.plugins.dialogadvtab;return{title:e.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?310:280,onLoad:function(){var i=this,j=i.getContentElement('advanced','advStyles');if(j)j.on('change',function(k){var l=this.getStyle('width',''),m=i.getContentElement('info','txtWidth'),n=i.getContentElement('info','cmbWidthType'),o=1;if(l){o=l.length<3||l.substr(l.length-1)!='%';l=parseInt(l,10);}m&&m.setValue(l,true);n&&n.setValue(o?'pixels':'percents',true);var p=this.getStyle('height',''),q=i.getContentElement('info','txtHeight');p&&(p=parseInt(p,10));q&&q.setValue(p,true);});},onShow:function(){var q=this;var i=e.getSelection(),j=i.getRanges(),k=null,l=q.getContentElement('info','txtRows'),m=q.getContentElement('info','txtCols'),n=q.getContentElement('info','txtWidth'),o=q.getContentElement('info','txtHeight');if(f=='tableProperties'){if(k=i.getSelectedElement())k=k.getAscendant('table',true);else if(j.length>0){if(CKEDITOR.env.webkit)j[0].shrink(CKEDITOR.NODE_ELEMENT);var p=j[0].getCommonAncestor(true);k=p.getAscendant('table',true);}q._.selectedElement=k;}if(k){q.setupContent(k);l&&l.disable();m&&m.disable();}else{l&&l.enable();m&&m.enable();}n&&n.onChange();o&&o.onChange();},onOk:function(){var D=this;if(D._.selectedElement)var i=e.getSelection(),j=i.createBookmarks();var k=D._.selectedElement||g('table'),l=D,m={};D.commitContent(m,k);if(m.info){var n=m.info;if(!D._.selectedElement){var o=k.append(g('tbody')),p=parseInt(n.txtRows,10)||0,q=parseInt(n.txtCols,10)||0;for(var r=0;r<p;r++){var s=o.append(g('tr'));for(var t=0;t<q;t++){var u=s.append(g('td'));if(!CKEDITOR.env.ie)u.append(g('br'));}}}var v=n.selHeaders;if(!k.$.tHead&&(v=='row'||v=='both')){var w=new CKEDITOR.dom.element(k.$.createTHead());o=k.getElementsByTag('tbody').getItem(0);var x=o.getElementsByTag('tr').getItem(0);for(r=0;r<x.getChildCount();r++){var y=x.getChild(r);if(y.type==CKEDITOR.NODE_ELEMENT&&!y.data('cke-bookmark')){y.renameNode('th');y.setAttribute('scope','col');}}w.append(x.remove());}if(k.$.tHead!==null&&!(v=='row'||v=='both')){w=new CKEDITOR.dom.element(k.$.tHead);o=k.getElementsByTag('tbody').getItem(0);var z=o.getFirst();while(w.getChildCount()>0){x=w.getFirst();for(r=0;r<x.getChildCount();r++){var A=x.getChild(r);if(A.type==CKEDITOR.NODE_ELEMENT){A.renameNode('td');
-A.removeAttribute('scope');}}x.insertBefore(z);}w.remove();}if(!D.hasColumnHeaders&&(v=='col'||v=='both'))for(s=0;s<k.$.rows.length;s++){A=new CKEDITOR.dom.element(k.$.rows[s].cells[0]);A.renameNode('th');A.setAttribute('scope','row');}if(D.hasColumnHeaders&&!(v=='col'||v=='both'))for(r=0;r<k.$.rows.length;r++){s=new CKEDITOR.dom.element(k.$.rows[r]);if(s.getParent().getName()=='tbody'){A=new CKEDITOR.dom.element(s.$.cells[0]);A.renameNode('td');A.removeAttribute('scope');}}var B=[];if(n.txtHeight)k.setStyle('height',CKEDITOR.tools.cssLength(n.txtHeight));else k.removeStyle('height');if(n.txtWidth){var C=n.cmbWidthType||'pixels';k.setStyle('width',n.txtWidth+(C=='pixels'?'px':'%'));}else k.removeStyle('width');if(!k.getAttribute('style'))k.removeAttribute('style');}if(!D._.selectedElement)e.insertElement(k);else i.selectBookmarks(j);return true;},contents:[{id:'info',label:e.lang.table.title,elements:[{type:'hbox',widths:[null,null],styles:['vertical-align:top'],children:[{type:'vbox',padding:0,children:[{type:'text',id:'txtRows','default':3,label:e.lang.table.rows,required:true,style:'width:5em',validate:function(){var i=true,j=this.getValue();i=i&&CKEDITOR.dialog.validate.integer()(j)&&j>0;if(!i){alert(e.lang.table.invalidRows);this.select();}return i;},setup:function(i){this.setValue(i.$.rows.length);},commit:c},{type:'text',id:'txtCols','default':2,label:e.lang.table.columns,required:true,style:'width:5em',validate:function(){var i=true,j=this.getValue();i=i&&CKEDITOR.dialog.validate.integer()(j)&&j>0;if(!i){alert(e.lang.table.invalidCols);this.select();}return i;},setup:function(i){this.setValue(i.$.rows[0].cells.length);},commit:c},{type:'html',html:' '},{type:'select',id:'selHeaders','default':'',label:e.lang.table.headers,items:[[e.lang.table.headersNone,''],[e.lang.table.headersRow,'row'],[e.lang.table.headersColumn,'col'],[e.lang.table.headersBoth,'both']],setup:function(i){var j=this.getDialog();j.hasColumnHeaders=true;for(var k=0;k<i.$.rows.length;k++){if(i.$.rows[k].cells[0].nodeName.toLowerCase()!='th'){j.hasColumnHeaders=false;break;}}if(i.$.tHead!==null)this.setValue(j.hasColumnHeaders?'both':'row');else this.setValue(j.hasColumnHeaders?'col':'');},commit:c},{type:'text',id:'txtBorder','default':1,label:e.lang.table.border,style:'width:3em',validate:CKEDITOR.dialog.validate.number(e.lang.table.invalidBorder),setup:function(i){this.setValue(i.getAttribute('border')||'');},commit:function(i,j){if(this.getValue())j.setAttribute('border',this.getValue());
-else j.removeAttribute('border');}},{id:'cmbAlign',type:'select','default':'',label:e.lang.common.align,items:[[e.lang.common.notSet,''],[e.lang.common.alignLeft,'left'],[e.lang.common.alignCenter,'center'],[e.lang.common.alignRight,'right']],setup:function(i){this.setValue(i.getAttribute('align')||'');},commit:function(i,j){if(this.getValue())j.setAttribute('align',this.getValue());else j.removeAttribute('align');}}]},{type:'vbox',padding:0,children:[{type:'hbox',widths:['5em'],children:[{type:'text',id:'txtWidth',style:'width:5em',label:e.lang.common.width,'default':500,validate:CKEDITOR.dialog.validate.number(e.lang.table.invalidWidth),onLoad:function(){var i=this.getDialog().getContentElement('info','cmbWidthType'),j=i.getElement(),k=this.getInputElement(),l=k.getAttribute('aria-labelledby');k.setAttribute('aria-labelledby',[l,j.$.id].join(' '));},onChange:function(){var i=this.getDialog().getContentElement('advanced','advStyles');if(i){var j=this.getValue();if(j)j+=this.getDialog().getContentElement('info','cmbWidthType').getValue()=='percents'?'%':'px';i.updateStyle('width',j);}},setup:function(i){var j=a.exec(i.$.style.width);if(j)this.setValue(j[1]);else this.setValue('');},commit:c},{id:'cmbWidthType',type:'select',label:e.lang.table.widthUnit,labelStyle:'visibility:hidden','default':'pixels',items:[[e.lang.table.widthPx,'pixels'],[e.lang.table.widthPc,'percents']],setup:function(i){var j=a.exec(i.$.style.width);if(j)this.setValue(j[2]=='px'?'pixels':'percents');},onChange:function(){this.getDialog().getContentElement('info','txtWidth').onChange();},commit:c}]},{type:'hbox',widths:['5em'],children:[{type:'text',id:'txtHeight',style:'width:5em',label:e.lang.common.height,'default':'',validate:CKEDITOR.dialog.validate.number(e.lang.table.invalidHeight),onLoad:function(){var i=this.getDialog().getContentElement('info','htmlHeightType'),j=i.getElement(),k=this.getInputElement(),l=k.getAttribute('aria-labelledby');k.setAttribute('aria-labelledby',[l,j.$.id].join(' '));},onChange:function(){var i=this.getDialog().getContentElement('advanced','advStyles');if(i){var j=this.getValue();i.updateStyle('height',j&&j+'px');}},setup:function(i){var j=b.exec(i.$.style.height);if(j)this.setValue(j[1]);},commit:c},{id:'htmlHeightType',type:'html',html:'<div><br />'+e.lang.table.widthPx+'</div>'}]},{type:'html',html:' '},{type:'text',id:'txtCellSpace',style:'width:3em',label:e.lang.table.cellSpace,'default':1,validate:CKEDITOR.dialog.validate.number(e.lang.table.invalidCellSpacing),setup:function(i){this.setValue(i.getAttribute('cellSpacing')||'');
-},commit:function(i,j){if(this.getValue())j.setAttribute('cellSpacing',this.getValue());else j.removeAttribute('cellSpacing');}},{type:'text',id:'txtCellPad',style:'width:3em',label:e.lang.table.cellPad,'default':1,validate:CKEDITOR.dialog.validate.number(e.lang.table.invalidCellPadding),setup:function(i){this.setValue(i.getAttribute('cellPadding')||'');},commit:function(i,j){if(this.getValue())j.setAttribute('cellPadding',this.getValue());else j.removeAttribute('cellPadding');}}]}]},{type:'html',align:'right',html:''},{type:'vbox',padding:0,children:[{type:'text',id:'txtCaption',label:e.lang.table.caption,setup:function(i){var j=i.getElementsByTag('caption');if(j.count()>0){var k=j.getItem(0);k=CKEDITOR.tools.trim(k.getText());this.setValue(k);}},commit:function(i,j){var k=this.getValue(),l=j.getElementsByTag('caption');if(k){if(l.count()>0){l=l.getItem(0);l.setHtml('');}else{l=new CKEDITOR.dom.element('caption',e.document);if(j.getChildCount())l.insertBefore(j.getFirst());else l.appendTo(j);}l.append(new CKEDITOR.dom.text(k,e.document));}else if(l.count()>0)for(var m=l.count()-1;m>=0;m--)l.getItem(m).remove();}},{type:'text',id:'txtSummary',label:e.lang.table.summary,setup:function(i){this.setValue(i.getAttribute('summary')||'');},commit:function(i,j){if(this.getValue())j.setAttribute('summary',this.getValue());else j.removeAttribute('summary');}}]}]},h&&h.createAdvancedTab(e)]};};CKEDITOR.dialog.add('table',function(e){return d(e,'table');});CKEDITOR.dialog.add('tableProperties',function(e){return d(e,'tableProperties');});})();
+(function(){var a=CKEDITOR.tools.cssLength,b=function(d){var e=this.id;if(!d.info)d.info={};d.info[e]=this.getValue();};function c(d,e){var f=function(h){return new CKEDITOR.dom.element(h,d.document);},g=d.plugins.dialogadvtab;return{title:d.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?310:280,onLoad:function(){var h=this,i=h.getContentElement('advanced','advStyles');if(i)i.on('change',function(j){var k=this.getStyle('width',''),l=h.getContentElement('info','txtWidth');l&&l.setValue(k,true);var m=this.getStyle('height',''),n=h.getContentElement('info','txtHeight');n&&n.setValue(m,true);});},onShow:function(){var p=this;var h=d.getSelection(),i=h.getRanges(),j=null,k=p.getContentElement('info','txtRows'),l=p.getContentElement('info','txtCols'),m=p.getContentElement('info','txtWidth'),n=p.getContentElement('info','txtHeight');if(e=='tableProperties'){if(j=h.getSelectedElement())j=j.getAscendant('table',true);else if(i.length>0){if(CKEDITOR.env.webkit)i[0].shrink(CKEDITOR.NODE_ELEMENT);var o=i[0].getCommonAncestor(true);j=o.getAscendant('table',true);}p._.selectedElement=j;}if(j){p.setupContent(j);k&&k.disable();l&&l.disable();}else{k&&k.enable();l&&l.enable();}m&&m.onChange();n&&n.onChange();},onOk:function(){var h=d.getSelection(),i=this._.selectedElement&&h.createBookmarks(),j=this._.selectedElement||f('table'),k=this,l={};this.commitContent(l,j);if(l.info){var m=l.info;if(!this._.selectedElement){var n=j.append(f('tbody')),o=parseInt(m.txtRows,10)||0,p=parseInt(m.txtCols,10)||0;for(var q=0;q<o;q++){var r=n.append(f('tr'));for(var s=0;s<p;s++){var t=r.append(f('td'));if(!CKEDITOR.env.ie)t.append(f('br'));}}}var u=m.selHeaders;if(!j.$.tHead&&(u=='row'||u=='both')){var v=new CKEDITOR.dom.element(j.$.createTHead());n=j.getElementsByTag('tbody').getItem(0);var w=n.getElementsByTag('tr').getItem(0);for(q=0;q<w.getChildCount();q++){var x=w.getChild(q);if(x.type==CKEDITOR.NODE_ELEMENT&&!x.data('cke-bookmark')){x.renameNode('th');x.setAttribute('scope','col');}}v.append(w.remove());}if(j.$.tHead!==null&&!(u=='row'||u=='both')){v=new CKEDITOR.dom.element(j.$.tHead);n=j.getElementsByTag('tbody').getItem(0);var y=n.getFirst();while(v.getChildCount()>0){w=v.getFirst();for(q=0;q<w.getChildCount();q++){var z=w.getChild(q);if(z.type==CKEDITOR.NODE_ELEMENT){z.renameNode('td');z.removeAttribute('scope');}}w.insertBefore(y);}v.remove();}if(!this.hasColumnHeaders&&(u=='col'||u=='both'))for(r=0;r<j.$.rows.length;r++){z=new CKEDITOR.dom.element(j.$.rows[r].cells[0]);
+z.renameNode('th');z.setAttribute('scope','row');}if(this.hasColumnHeaders&&!(u=='col'||u=='both'))for(q=0;q<j.$.rows.length;q++){r=new CKEDITOR.dom.element(j.$.rows[q]);if(r.getParent().getName()=='tbody'){z=new CKEDITOR.dom.element(r.$.cells[0]);z.renameNode('td');z.removeAttribute('scope');}}m.txtHeight?j.setStyle('height',m.txtHeight):j.removeStyle('height');m.txtWidth?j.setStyle('width',m.txtWidth):j.removeStyle('width');if(!j.getAttribute('style'))j.removeAttribute('style');}if(!this._.selectedElement){d.insertElement(j);setTimeout(function(){var A=new CKEDITOR.dom.element(j.$.rows[0].cells[0]),B=new CKEDITOR.dom.range(d.document);B.moveToPosition(A,CKEDITOR.POSITION_AFTER_START);B.select(1);},0);}else try{h.selectBookmarks(i);}catch(A){}},contents:[{id:'info',label:d.lang.table.title,elements:[{type:'hbox',widths:[null,null],styles:['vertical-align:top'],children:[{type:'vbox',padding:0,children:[{type:'text',id:'txtRows','default':3,label:d.lang.table.rows,required:true,controlStyle:'width:5em',validate:function(){var h=true,i=this.getValue();h=h&&CKEDITOR.dialog.validate.integer()(i)&&i>0;if(!h){alert(d.lang.table.invalidRows);this.select();}return h;},setup:function(h){this.setValue(h.$.rows.length);},commit:b},{type:'text',id:'txtCols','default':2,label:d.lang.table.columns,required:true,controlStyle:'width:5em',validate:function(){var h=true,i=this.getValue();h=h&&CKEDITOR.dialog.validate.integer()(i)&&i>0;if(!h){alert(d.lang.table.invalidCols);this.select();}return h;},setup:function(h){this.setValue(h.$.rows[0].cells.length);},commit:b},{type:'html',html:' '},{type:'select',id:'selHeaders','default':'',label:d.lang.table.headers,items:[[d.lang.table.headersNone,''],[d.lang.table.headersRow,'row'],[d.lang.table.headersColumn,'col'],[d.lang.table.headersBoth,'both']],setup:function(h){var i=this.getDialog();i.hasColumnHeaders=true;for(var j=0;j<h.$.rows.length;j++){if(h.$.rows[j].cells[0].nodeName.toLowerCase()!='th'){i.hasColumnHeaders=false;break;}}if(h.$.tHead!==null)this.setValue(i.hasColumnHeaders?'both':'row');else this.setValue(i.hasColumnHeaders?'col':'');},commit:b},{type:'text',id:'txtBorder','default':1,label:d.lang.table.border,controlStyle:'width:3em',validate:CKEDITOR.dialog.validate.number(d.lang.table.invalidBorder),setup:function(h){this.setValue(h.getAttribute('border')||'');},commit:function(h,i){if(this.getValue())i.setAttribute('border',this.getValue());else i.removeAttribute('border');}},{id:'cmbAlign',type:'select','default':'',label:d.lang.common.align,items:[[d.lang.common.notSet,''],[d.lang.common.alignLeft,'left'],[d.lang.common.alignCenter,'center'],[d.lang.common.alignRight,'right']],setup:function(h){this.setValue(h.getAttribute('align')||'');
+},commit:function(h,i){if(this.getValue())i.setAttribute('align',this.getValue());else i.removeAttribute('align');}}]},{type:'vbox',padding:0,children:[{type:'hbox',widths:['5em'],children:[{type:'text',id:'txtWidth',controlStyle:'width:5em',label:d.lang.common.width,'default':500,getValue:a,validate:CKEDITOR.dialog.validate.cssLength(d.lang.common.invalidCssLength.replace('%1',d.lang.common.width)),onChange:function(){var h=this.getDialog().getContentElement('advanced','advStyles');h&&h.updateStyle('width',this.getValue());},setup:function(h){var i=h.getStyle('width');i&&this.setValue(i);},commit:b}]},{type:'hbox',widths:['5em'],children:[{type:'text',id:'txtHeight',controlStyle:'width:5em',label:d.lang.common.height,'default':'',getValue:a,validate:CKEDITOR.dialog.validate.cssLength(d.lang.common.invalidCssLength.replace('%1',d.lang.common.height)),onChange:function(){var h=this.getDialog().getContentElement('advanced','advStyles');h&&h.updateStyle('height',this.getValue());},setup:function(h){var i=h.getStyle('width');i&&this.setValue(i);},commit:b}]},{type:'html',html:' '},{type:'text',id:'txtCellSpace',controlStyle:'width:3em',label:d.lang.table.cellSpace,'default':1,validate:CKEDITOR.dialog.validate.number(d.lang.table.invalidCellSpacing),setup:function(h){this.setValue(h.getAttribute('cellSpacing')||'');},commit:function(h,i){if(this.getValue())i.setAttribute('cellSpacing',this.getValue());else i.removeAttribute('cellSpacing');}},{type:'text',id:'txtCellPad',controlStyle:'width:3em',label:d.lang.table.cellPad,'default':1,validate:CKEDITOR.dialog.validate.number(d.lang.table.invalidCellPadding),setup:function(h){this.setValue(h.getAttribute('cellPadding')||'');},commit:function(h,i){if(this.getValue())i.setAttribute('cellPadding',this.getValue());else i.removeAttribute('cellPadding');}}]}]},{type:'html',align:'right',html:''},{type:'vbox',padding:0,children:[{type:'text',id:'txtCaption',label:d.lang.table.caption,setup:function(h){var l=this;l.enable();var i=h.getElementsByTag('caption');if(i.count()>0){var j=i.getItem(0),k=j.getFirst(CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT));if(k&&!k.equals(j.getBogus())){l.disable();l.setValue(j.getText());return;}j=CKEDITOR.tools.trim(j.getText());l.setValue(j);}},commit:function(h,i){if(!this.isEnabled())return;var j=this.getValue(),k=i.getElementsByTag('caption');if(j){if(k.count()>0){k=k.getItem(0);k.setHtml('');}else{k=new CKEDITOR.dom.element('caption',d.document);if(i.getChildCount())k.insertBefore(i.getFirst());
+else k.appendTo(i);}k.append(new CKEDITOR.dom.text(j,d.document));}else if(k.count()>0)for(var l=k.count()-1;l>=0;l--)k.getItem(l).remove();}},{type:'text',id:'txtSummary',label:d.lang.table.summary,setup:function(h){this.setValue(h.getAttribute('summary')||'');},commit:function(h,i){if(this.getValue())i.setAttribute('summary',this.getValue());else i.removeAttribute('summary');}}]}]},g&&g.createAdvancedTab(d)]};};CKEDITOR.dialog.add('table',function(d){return c(d,'table');});CKEDITOR.dialog.add('tableProperties',function(d){return c(d,'tableProperties');});})();
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/tabletools/dialogs/tableCell.js b/appsrc/ODS-Framework/ckeditor/plugins/tabletools/dialogs/tableCell.js
index 8822b3e..96bfa5f 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/tabletools/dialogs/tableCell.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/tabletools/dialogs/tableCell.js
@@ -3,6 +3,6 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.dialog.add('cellProperties',function(a){var b=a.lang.table,c=b.cell,d=a.lang.common,e=CKEDITOR.dialog.validate,f=/^(\d+(?:\.\d+)?)(px|%)$/,g=/^(\d+(?:\.\d+)?)px$/,h=CKEDITOR.tools.bind,i={type:'html',html:' '},j=a.lang.dir=='rtl';function k(l,m){var n=function(){var r=this;p(r);m(r,r._.parentDialog);r._.parentDialog.changeFocus(true);},o=function(){p(this);this._.parentDialog.changeFocus();},p=function(r){r.removeListener('ok',n);r.removeListener('cancel',o);},q=function(r){r.on('ok',n);r.on('cancel',o);};a.execCommand(l);if(a._.storedDialogs.colordialog)q(a._.storedDialogs.colordialog);else CKEDITOR.on('dialogDefinition',function(r){if(r.data.name!=l)return;var s=r.data.definition;r.removeListener();s.onLoad=CKEDITOR.tools.override(s.onLoad,function(t){return function(){q(this);s.onLoad=t;if(typeof t=='function')t.call(this);};});});};return{title:c.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?450:410,minHeight:CKEDITOR.env.ie&&CKEDITOR.env.quirks?230:200,contents:[{id:'info',label:c.title,accessKey:'I',elements:[{type:'hbox',widths:['40%','5%','40%'],children:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['70%','30%'],children:[{type:'text',id:'width',width:'100px',label:d.width,validate:e.number(c.invalidWidth),onLoad:function(){var l=this.getDialog().getContentElement('info','widthType'),m=l.getElement(),n=this.getInputElement(),o=n.getAttribute('aria-labelledby');n.setAttribute('aria-labelledby',[o,m.$.id].join(' '));},setup:function(l){var m=parseInt(l.getAttribute('width'),10),n=parseInt(l.getStyle('width'),10);!isNaN(m)&&this.setValue(m);!isNaN(n)&&this.setValue(n);},commit:function(l){var m=parseInt(this.getValue(),10),n=this.getDialog().getValueOf('info','widthType');if(!isNaN(m))l.setStyle('width',m+n);else l.removeStyle('width');l.removeAttribute('width');},'default':''},{type:'select',id:'widthType',label:a.lang.table.widthUnit,labelStyle:'visibility:hidden','default':'px',items:[[b.widthPx,'px'],[b.widthPc,'%']],setup:function(l){var m=f.exec(l.getStyle('width')||l.getAttribute('width'));if(m)this.setValue(m[2]);}}]},{type:'hbox',widths:['70%','30%'],children:[{type:'text',id:'height',label:d.height,width:'100px','default':'',validate:e.number(c.invalidHeight),onLoad:function(){var l=this.getDialog().getContentElement('info','htmlHeightType'),m=l.getElement(),n=this.getInputElement(),o=n.getAttribute('aria-labelledby');n.setAttribute('aria-labelledby',[o,m.$.id].join(' '));},setup:function(l){var m=parseInt(l.getAttribute('height'),10),n=parseInt(l.getStyle('height'),10);
+CKEDITOR.dialog.add('cellProperties',function(a){var b=a.lang.table,c=b.cell,d=a.lang.common,e=CKEDITOR.dialog.validate,f=/^(\d+(?:\.\d+)?)(px|%)$/,g=/^(\d+(?:\.\d+)?)px$/,h=CKEDITOR.tools.bind,i={type:'html',html:' '},j=a.lang.dir=='rtl';function k(l,m){var n=function(){var r=this;p(r);m(r,r._.parentDialog);r._.parentDialog.changeFocus(true);},o=function(){p(this);this._.parentDialog.changeFocus();},p=function(r){r.removeListener('ok',n);r.removeListener('cancel',o);},q=function(r){r.on('ok',n);r.on('cancel',o);};a.execCommand(l);if(a._.storedDialogs.colordialog)q(a._.storedDialogs.colordialog);else CKEDITOR.on('dialogDefinition',function(r){if(r.data.name!=l)return;var s=r.data.definition;r.removeListener();s.onLoad=CKEDITOR.tools.override(s.onLoad,function(t){return function(){q(this);s.onLoad=t;if(typeof t=='function')t.call(this);};});});};return{title:c.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?450:410,minHeight:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?230:200,contents:[{id:'info',label:c.title,accessKey:'I',elements:[{type:'hbox',widths:['40%','5%','40%'],children:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['70%','30%'],children:[{type:'text',id:'width',width:'100px',label:d.width,validate:e.number(c.invalidWidth),onLoad:function(){var l=this.getDialog().getContentElement('info','widthType'),m=l.getElement(),n=this.getInputElement(),o=n.getAttribute('aria-labelledby');n.setAttribute('aria-labelledby',[o,m.$.id].join(' '));},setup:function(l){var m=parseInt(l.getAttribute('width'),10),n=parseInt(l.getStyle('width'),10);!isNaN(m)&&this.setValue(m);!isNaN(n)&&this.setValue(n);},commit:function(l){var m=parseInt(this.getValue(),10),n=this.getDialog().getValueOf('info','widthType');if(!isNaN(m))l.setStyle('width',m+n);else l.removeStyle('width');l.removeAttribute('width');},'default':''},{type:'select',id:'widthType',label:a.lang.table.widthUnit,labelStyle:'visibility:hidden','default':'px',items:[[b.widthPx,'px'],[b.widthPc,'%']],setup:function(l){var m=f.exec(l.getStyle('width')||l.getAttribute('width'));if(m)this.setValue(m[2]);}}]},{type:'hbox',widths:['70%','30%'],children:[{type:'text',id:'height',label:d.height,width:'100px','default':'',validate:e.number(c.invalidHeight),onLoad:function(){var l=this.getDialog().getContentElement('info','htmlHeightType'),m=l.getElement(),n=this.getInputElement(),o=n.getAttribute('aria-labelledby');n.setAttribute('aria-labelledby',[o,m.$.id].join(' '));},setup:function(l){var m=parseInt(l.getAttribute('height'),10),n=parseInt(l.getStyle('height'),10);
 !isNaN(m)&&this.setValue(m);!isNaN(n)&&this.setValue(n);},commit:function(l){var m=parseInt(this.getValue(),10);if(!isNaN(m))l.setStyle('height',CKEDITOR.tools.cssLength(m));else l.removeStyle('height');l.removeAttribute('height');}},{id:'htmlHeightType',type:'html',html:'<br />'+b.widthPx}]},i,{type:'select',id:'wordWrap',label:c.wordWrap,'default':'yes',items:[[c.yes,'yes'],[c.no,'no']],setup:function(l){var m=l.getAttribute('noWrap'),n=l.getStyle('white-space');if(n=='nowrap'||m)this.setValue('no');},commit:function(l){if(this.getValue()=='no')l.setStyle('white-space','nowrap');else l.removeStyle('white-space');l.removeAttribute('noWrap');}},i,{type:'select',id:'hAlign',label:c.hAlign,'default':'',items:[[d.notSet,''],[d.alignLeft,'left'],[d.alignCenter,'center'],[d.alignRight,'right']],setup:function(l){var m=l.getAttribute('align'),n=l.getStyle('text-align');this.setValue(n||m||'');},commit:function(l){var m=this.getValue();if(m)l.setStyle('text-align',m);else l.removeStyle('text-align');l.removeAttribute('align');}},{type:'select',id:'vAlign',label:c.vAlign,'default':'',items:[[d.notSet,''],[d.alignTop,'top'],[d.alignMiddle,'middle'],[d.alignBottom,'bottom'],[c.alignBaseline,'baseline']],setup:function(l){var m=l.getAttribute('vAlign'),n=l.getStyle('vertical-align');switch(n){case 'top':case 'middle':case 'bottom':case 'baseline':break;default:n='';}this.setValue(n||m||'');},commit:function(l){var m=this.getValue();if(m)l.setStyle('vertical-align',m);else l.removeStyle('vertical-align');l.removeAttribute('vAlign');}}]},i,{type:'vbox',padding:0,children:[{type:'select',id:'cellType',label:c.cellType,'default':'td',items:[[c.data,'td'],[c.header,'th']],setup:function(l){this.setValue(l.getName());},commit:function(l){l.renameNode(this.getValue());}},i,{type:'text',id:'rowSpan',label:c.rowSpan,'default':'',validate:e.integer(c.invalidRowSpan),setup:function(l){var m=parseInt(l.getAttribute('rowSpan'),10);if(m&&m!=1)this.setValue(m);},commit:function(l){var m=parseInt(this.getValue(),10);if(m&&m!=1)l.setAttribute('rowSpan',this.getValue());else l.removeAttribute('rowSpan');}},{type:'text',id:'colSpan',label:c.colSpan,'default':'',validate:e.integer(c.invalidColSpan),setup:function(l){var m=parseInt(l.getAttribute('colSpan'),10);if(m&&m!=1)this.setValue(m);},commit:function(l){var m=parseInt(this.getValue(),10);if(m&&m!=1)l.setAttribute('colSpan',this.getValue());else l.removeAttribute('colSpan');}},i,{type:'hbox',padding:0,widths:['60%','40%'],children:[{type:'text',id:'bgColor',label:c.bgColor,'default':'',setup:function(l){var m=l.getAttribute('bgColor'),n=l.getStyle('background-color');
 this.setValue(n||m);},commit:function(l){var m=this.getValue();if(m)l.setStyle('background-color',this.getValue());else l.removeStyle('background-color');l.removeAttribute('bgColor');}},{type:'button',id:'bgColorChoose','class':'colorChooser',label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle('vertical-align','bottom');},onClick:function(){var l=this;k('colordialog',function(m){l.getDialog().getContentElement('info','bgColor').setValue(m.getContentElement('picker','selectedColor').getValue());});}}]},i,{type:'hbox',padding:0,widths:['60%','40%'],children:[{type:'text',id:'borderColor',label:c.borderColor,'default':'',setup:function(l){var m=l.getAttribute('borderColor'),n=l.getStyle('border-color');this.setValue(n||m);},commit:function(l){var m=this.getValue();if(m)l.setStyle('border-color',this.getValue());else l.removeStyle('border-color');l.removeAttribute('borderColor');}},{type:'button',id:'borderColorChoose','class':'colorChooser',label:c.chooseColor,style:(j?'margin-right':'margin-left')+': 10px',onLoad:function(){this.getElement().getParent().setStyle('vertical-align','bottom');},onClick:function(){var l=this;k('colordialog',function(m){l.getDialog().getContentElement('info','borderColor').setValue(m.getContentElement('picker','selectedColor').getValue());});}}]}]}]}]}],onShow:function(){var l=this;l.cells=CKEDITOR.plugins.tabletools.getSelectedCells(l._.editor.getSelection());l.setupContent(l.cells[0]);},onOk:function(){var r=this;var l=r._.editor.getSelection(),m=l.createBookmarks(),n=r.cells;for(var o=0;o<n.length;o++)r.commitContent(n[o]);l.selectBookmarks(m);var p=l.getStartElement(),q=new CKEDITOR.dom.elementPath(p);r._.editor._.selectionPreviousPath=q;r._.editor.fire('selectionChange',{selection:l,path:q,element:p});}};});
diff --git a/appsrc/ODS-Framework/ckeditor/plugins/templates/dialogs/templates.js b/appsrc/ODS-Framework/ckeditor/plugins/templates/dialogs/templates.js
index 57546ce..cd3e184 100644
--- a/appsrc/ODS-Framework/ckeditor/plugins/templates/dialogs/templates.js
+++ b/appsrc/ODS-Framework/ckeditor/plugins/templates/dialogs/templates.js
@@ -3,5 +3,5 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){var a=CKEDITOR.document;CKEDITOR.dialog.add('templates',function(b){function c(k,l){k.setHtml('');for(var m=0,n=l.length;m<n;m++){var o=CKEDITOR.getTemplates(l[m]),p=o.imagesPath,q=o.templates,r=q.length;for(var s=0;s<r;s++){var t=q[s],u=d(t,p);u.setAttribute('aria-posinset',s+1);u.setAttribute('aria-setsize',r);k.append(u);}}};function d(k,l){var m=CKEDITOR.dom.element.createFromHtml('<a href="javascript:void(0)" tabIndex="-1" role="option" ><div class="cke_tpl_item"></div></a>'),n='<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';if(k.image&&l)n+='<td class="cke_tpl_preview_img"><img src="'+CKEDITOR.getUrl(l+k.image)+'"'+(CKEDITOR.env.ie6Compat?' onload="this.width=this.width"':'')+' alt="" title=""></td>';n+='<td style="white-space:normal;"><span class="cke_tpl_title">'+k.title+'</span><br/>';if(k.description)n+='<span>'+k.description+'</span>';n+='</td></tr></table>';m.getFirst().setHtml(n);m.on('click',function(){e(k.html);});return m;};function e(k){var l=CKEDITOR.dialog.getCurrent(),m=l.getValueOf('selectTpl','chkInsertOpt');if(m){b.on('contentDom',function(n){n.removeListener();l.hide();var o=new CKEDITOR.dom.range(b.document);o.moveToElementEditStart(b.document.getBody());o.select(1);setTimeout(function(){b.fire('saveSnapshot');},0);});b.fire('saveSnapshot');b.setData(k);}else{b.insertHtml(k);l.hide();}};function f(k){var l=k.data.getTarget(),m=g.equals(l);if(m||g.contains(l)){var n=k.data.getKeystroke(),o=g.getElementsByTag('a'),p;if(o){if(m)p=o.getItem(0);else switch(n){case 40:p=l.getNext();break;case 38:p=l.getPrevious();break;case 13:case 32:l.fire('click');}if(p){p.focus();k.data.preventDefault();}}}};CKEDITOR.skins.load(b,'templates');var g,h='cke_tpl_list_label_'+CKEDITOR.tools.getNextNumber(),i=b.lang.templates,j=b.config;return{title:b.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:i.title,elements:[{type:'vbox',padding:5,children:[{type:'html',html:'<span>'+i.selectPromptMsg+'</span>'},{id:'templatesList',type:'html',focus:true,html:'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="'+h+'">'+'<div class="cke_tpl_loading"><span></span></div>'+'</div>'+'<span class="cke_voice_label" id="'+h+'">'+i.options+'</span>'},{id:'chkInsertOpt',type:'checkbox',label:i.insertOption,'default':j.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var k=this.getContentElement('selectTpl','templatesList');
+(function(){var a=CKEDITOR.document;CKEDITOR.dialog.add('templates',function(b){function c(k,l){k.setHtml('');for(var m=0,n=l.length;m<n;m++){var o=CKEDITOR.getTemplates(l[m]),p=o.imagesPath,q=o.templates,r=q.length;for(var s=0;s<r;s++){var t=q[s],u=d(t,p);u.setAttribute('aria-posinset',s+1);u.setAttribute('aria-setsize',r);k.append(u);}}};function d(k,l){var m=CKEDITOR.dom.element.createFromHtml('<a href="javascript:void(0)" tabIndex="-1" role="option" ><div class="cke_tpl_item"></div></a>'),n='<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';if(k.image&&l)n+='<td class="cke_tpl_preview_img"><img src="'+CKEDITOR.getUrl(l+k.image)+'"'+(CKEDITOR.env.ie6Compat?' onload="this.width=this.width"':'')+' alt="" title=""></td>';n+='<td style="white-space:normal;"><span class="cke_tpl_title">'+k.title+'</span><br/>';if(k.description)n+='<span>'+k.description+'</span>';n+='</td></tr></table>';m.getFirst().setHtml(n);m.on('click',function(){e(k.html);});return m;};function e(k){var l=CKEDITOR.dialog.getCurrent(),m=l.getValueOf('selectTpl','chkInsertOpt');if(m){b.on('contentDom',function(n){n.removeListener();l.hide();var o=new CKEDITOR.dom.range(b.document);o.moveToElementEditStart(b.document.getBody());o.select(1);setTimeout(function(){b.fire('saveSnapshot');},0);});b.fire('saveSnapshot');b.setData(k);}else{b.insertHtml(k);l.hide();}};function f(k){var l=k.data.getTarget(),m=g.equals(l);if(m||g.contains(l)){var n=k.data.getKeystroke(),o=g.getElementsByTag('a'),p;if(o){if(m)p=o.getItem(0);else switch(n){case 40:p=l.getNext();break;case 38:p=l.getPrevious();break;case 13:case 32:l.fire('click');}if(p){p.focus();k.data.preventDefault();}}}};CKEDITOR.skins.load(b,'templates');var g,h='cke_tpl_list_label_'+CKEDITOR.tools.getNextNumber(),i=b.lang.templates,j=b.config;return{title:b.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:i.title,elements:[{type:'vbox',padding:5,children:[{id:'selectTplText',type:'html',html:'<span>'+i.selectPromptMsg+'</span>'},{id:'templatesList',type:'html',focus:true,html:'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="'+h+'">'+'<div class="cke_tpl_loading"><span></span></div>'+'</div>'+'<span class="cke_voice_label" id="'+h+'">'+i.options+'</span>'},{id:'chkInsertOpt',type:'checkbox',label:i.insertOption,'default':j.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var k=this.getContentElement('selectTpl','templatesList');
 g=k.getElement();CKEDITOR.loadTemplates(j.templates_files,function(){var l=(j.templates||'default').split(',');if(l.length){c(g,l);k.focus();}else g.setHtml('<div class="cke_tpl_empty"><span>'+i.emptyListMsg+'</span>'+'</div>');});this._.element.on('keydown',f);},onHide:function(){this._.element.removeListener('keydown',f);}};});})();
diff --git a/appsrc/ODS-Framework/ckeditor/skins/kama/dialog.css b/appsrc/ODS-Framework/ckeditor/skins/kama/dialog.css
index 5bbb430..29ecfde 100644
--- a/appsrc/ODS-Framework/ckeditor/skins/kama/dialog.css
+++ b/appsrc/ODS-Framework/ckeditor/skins/kama/dialog.css
@@ -4,6 +4,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
 body .cke_dialog{visibility:visible;}.cke_skin_kama table.cke_dialog.cke_browser_gecko{display:block;}.cke_skin_kama .cke_dialog_body{z-index:1;border:solid 1px #ddd;padding:5px;background-color:#fff;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;position:relative;_position:static;}.cke_skin_kama .cke_dialog_tl,.cke_skin_kama .cke_dialog_tr,.cke_skin_kama .cke_dialog_tc,.cke_skin_kama .cke_dialog_bl,.cke_skin_kama .cke_dialog_br,.cke_skin_kama .cke_dialog_bc,.cke_skin_kama .cke_dialog_ml,.cke_skin_kama .cke_dialog_mr{display:none;}.cke_skin_kama .cke_dialog_title{font-weight:bold;font-size:14px;padding:3px 3px 8px;cursor:move;position:relative;border-bottom:1px solid #eee;}.cke_skin_kama .cke_browser_iequirks .cke_dialog_title,.cke_skin_kama .cke_browser_ie6 .cke_dialog_title,.cke_skin_kama .cke_browser_ie7 .cke_dialog_title{margin-bottom:22px;}.cke_skin_kama .cke_browser_iequirks.cke_single_page .cke_dialog_title,.cke_skin_kama .cke_browser_ie6.cke_single_page .cke_dialog_title,.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_title{margin-bottom:10px;}.cke_skin_kama .cke_dialog_contents{background-color:#ebebeb;border:solid 1px #fff;border-bottom:none;overflow:auto;padding:17px 10px 5px 10px;-moz-border-radius-topleft:5px;-moz-border-radius-topright:5px;-webkit-border-top-left-radius:5px;-webkit-border-top-right-radius:5px;border-top-left-radius:5px;border-top-right-radius:5px;margin-top:22px;}.cke_skin_kama .cke_dialog_footer{text-align:right;background-color:#ebebeb;border:solid 1px #fff;border-bottom:none;-moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-left-radius:5px;-webkit-border-bottom-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;}.cke_skin_kama .cke_rtl .cke_dialog_footer{text-align:left;}.cke_skin_kama .cke_dialog_footer .cke_resizer{margin-top:20px;}.cke_skin_kama .cke_browser_iequirks .cke_dialog_footer .cke_resizer,.cke_skin_kama .cke_browser_ie6 .cke_dialog_footer .cke_resizer{margin-top:27px;}.cke_skin_kama .cke_dialog_tabs{height:23px;display:inline-block;_display:block;margin-left:10px;margin-right:10px;margin-top:11px;position:absolute;z-index:2;}.cke_skin_kama .cke_browser_iequirks .cke_dialog_tabs,.cke_skin_kama .cke_browser_ie6 .cke_dialog_tabs,.cke_skin_kama .cke_browser_ie7 .cke_dialog_tabs{top:33px;}.cke_skin_kama .cke_rtl .cke_dialog_tabs{right:10px;}.cke_skin_kama a.cke_dialog_tab,.cke_skin_kama a:link.cke_dialog_tab,.cke_skin_kama a:active.cke_dialog_tab,.cke_skin_kama a:hover.cke_dialog_tab,.cke_skin_kama a:visited.cke_dialog_tab{background-image:url(images/sprites.png);background-repeat:repeat-x;background-position:0 -1323px;background-color:#ebebeb;height:14px;padding:4px 8px;display:inline-block;cursor:pointer;}.cke_skin_kama .cke_browser_gecko18 a.cke_dialog_tab,.cke_skin_kama .cke_browser_gecko18 a:link.cke_dialog_tab,.cke_skin_kama .cke_browser_gecko18 a:active.cke_dialog_tab,.cke_skin_kama .cke_browser_gecko18 a:hover.cke_dialog_tab,.cke_skin_kama .cke_browser_gecko18 a:visited.cke_dialog_tab{display:inline;position:relative;top:6px;}.cke_skin_kama a:hover.cke_dialog_tab{background-color:#f1f1e3;}.cke_skin_kama .cke_hc a:hover.cke_dialog_tab{padding:2px 6px!important;border-width:3px;}.cke_skin_kama a.cke_dialog_tab_selected,.cke_skin_kama a:link.cke_dialog_tab_selected,.cke_skin_kama a:active.cke_dialog_tab_selected,.cke_skin_kama a:hover.cke_dialog_tab_selected,.cke_skin_kama a:visited.cke_dialog_tab_selected{background-position:0 -1279px;cursor:default;}.cke_skin_kama .cke_hc a.cke_dialog_tab_selected,.cke_skin_kama .cke_hc a:link.cke_dialog_tab_selected,.cke_skin_kama .cke_hc a:active.cke_dialog_tab_selected,.cke_skin_kama .cke_hc a:hover.cke_dialog_tab_selected,.cke_skin_kama .cke_hc a:visited.cke_dialog_tab_selected{padding:2px 6px!important;border-width:3px;}.cke_skin_kama .cke_single_page .cke_dialog_tabs{display:none;}.cke_skin_kama .cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:10px;}.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_contents{margin-top:0;position:relative;margin-bottom:-22px;}
-.cke_skin_kama .cke_dialog_ui_vbox table,.cke_skin_kama .cke_dialog_ui_hbox table{margin:auto;}.cke_skin_kama .cke_dialog_ui_vbox_child{padding:5px 0;}.cke_skin_kama input.cke_dialog_ui_input_text,.cke_skin_kama input.cke_dialog_ui_input_password{background-color:white;border:none;padding:0;width:100%;height:14px;}.cke_skin_kama div.cke_dialog_ui_input_text,.cke_skin_kama div.cke_dialog_ui_input_password{background-color:white;border:1px solid #a0a0a0;padding:1px 0;}.cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_password,.cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px;}.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_password,.cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px;}.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_vbox_child,.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_child,.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important;}.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px;}.cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_password{border-width:0;}.cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_password{border-width:1px;}.cke_skin_kama textarea.cke_dialog_ui_input_textarea{background-color:white;border:none;padding:0;width:100%;_width:99%;overflow:auto;resize:none;}.cke_skin_kama div.cke_dialog_ui_input_textarea{background-color:white;border:1px solid #a0a0a0;padding:1px 0;}.cke_skin_kama div.cke_disabled .cke_dialog_ui_labeled_content *{background-color:#a0a0a0;cursor:default;}.cke_skin_kama .cke_dialog_ui_hbox{width:100%;}.cke_skin_kama .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_dialog_ui_hbox_child,.cke_skin_kama .cke_dialog_ui_hbox_last{vertical-align:top;}.cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px;}.cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px;}.cke_skin_kama a.cke_dialog_ui_button{border-collapse:separate;cursor:default;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background:transparent url(images/sprites.png) repeat-x scroll 0 -1069px;_background:none;padding:5px 0;text-align:center;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button{padding:0;}.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span{width:70px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span{width:100px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span{padding:5px 15px;text-align:center;color:#3b3b1f;background:#53D9F0 none;display:inline-block;cursor:default;}.cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button span.cke_dialog_ui_button{margin:0;}.cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button{display:inline-block;padding-top:3px;padding-bottom:2px;margin:2px 0;}.cke_skin_kama a.cke_dialog_ui_button_ok span,.cke_skin_kama a.cke_dialog_ui_button_cancel span{width:60px;padding-right:20px;padding-left:20px;}.cke_skin_kama a.cke_dialog_ui_button_ok{background-position:0 -1143px;}.cke_skin_kama a.cke_dialog_ui_button_ok span{background:transparent url(images/sprites.png) no-repeat scroll right -1219px;}.cke_skin_kama .cke_rtl a.cke_dialog_ui_button_ok span{background-position:left -1219px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span{background-color:#B8E834;margin-right:0;}
-.cke_skin_kama a.cke_dialog_ui_button_cancel{background-position:0 -1104px;}.cke_skin_kama a.cke_dialog_ui_button_cancel span{background:transparent url(images/sprites.png) no-repeat scroll right -1245px;}.cke_skin_kama .cke_rtl a.cke_dialog_ui_button_cancel span{background-position:left -1245px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span{background-color:#F65D20;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span,.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span{background-image:none;}.cke_skin_kama span.cke_dialog_ui_button{padding:2px 10px;text-align:center;color:#222;display:inline-block;cursor:default;min-width:60px;+margin:2px 0;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button{display:block;}.cke_skin_kama a.cke_dialog_ui_button span.cke_disabled{border:#898980 1px solid;color:#5e5e55;background-color:#c5c5b3;}.cke_skin_kama a:hover.cke_dialog_ui_button,.cke_skin_kama a:focus.cke_dialog_ui_button,.cke_skin_kama a:active.cke_dialog_ui_button{background-position:0 -1179px;}.cke_skin_kama .cke_hc a:hover.cke_dialog_ui_button,.cke_skin_kama .cke_hc a:focus.cke_dialog_ui_button,.cke_skin_kama .cke_hc a:active.cke_dialog_ui_button{border-width:2px;}.cke_skin_kama .cke_browser_iequirks a:hover.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a:focus.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a:active.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a:hover.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a:focus.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a:active.cke_dialog_ui_button span{background-image:none;background:#F7A922;}.cke_skin_kama .cke_dialog_footer_buttons{display:inline-table;margin-right:12px;margin-left:12px;width:auto;position:relative;}.cke_skin_kama .cke_browser_ie7 .cke_dialog_footer_buttons{position:static;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons{display:inline;}.cke_skin_kama .cke_dialog_footer_buttons span.cke_dialog_ui_button{margin:7px 0;text-align:center;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons a.cke_dialog_ui_button{display:block;padding:0;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button{padding-bottom:5px;padding-top:6px;margin-bottom:0;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_ok .cke_dialog_ui_button{background-position:right -1214px;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_cancel .cke_dialog_ui_button{background-position:right -1242px;}.cke_skin_kama strong{font-weight:bold;}.cke_skin_kama .cke_dialog .cke_dialog_body .cke_dialog_close_button{background-image:url(images/sprites.png);background-repeat:no-repeat;background-position:0 -1022px;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;_background-image:url(images/sprites_ie6.png);}.cke_skin_kama .cke_dialog_close_button span{display:none;}.cke_skin_kama .cke_dialog_close_button:hover{background-position:0 -1045px;}.cke_skin_kama .cke_ltr .cke_dialog_close_button{right:10px;}.cke_skin_kama .cke_browser_ie8.cke_rtl .cke_dialog_close_button{left:8px;}.cke_skin_kama .cke_rtl .cke_dialog_close_button{left:10px;}.cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button{left:16px;top:0;}.cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button{position:absolute;left:10px;top:5px;}.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_footer{margin-top:22px;}.cke_skin_kama .cke_browser_ie6 .cke_dialog_close_button,.cke_skin_kama .cke_browser_iequirks .cke_dialog_close_button{top:7px;}.cke_skin_kama .cke_browser_ie7.cke_ltr .cke_dialog_close_button{margin-top:0;}.cke_skin_kama .cke_dialog_ui_input_select{border:1px solid #a0a0a0;background-color:white;}.cke_skin_kama .cke_dialog_ui_input_file{width:100%;height:25px;}
-.cke_skin_kama .cke_dialog .cke_dark_background{background-color:#eaead1;}.cke_skin_kama .cke_dialog .cke_hand{cursor:pointer;}.cke_skin_kama .cke_dialog .cke_centered{text-align:center;}.cke_skin_kama .cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px;}.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_reset{float:left;}.cke_skin_kama .cke_dialog a.cke_btn_locked,.cke_skin_kama .cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px;}.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_locked,.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_unlocked{float:right;}.cke_skin_kama .cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.gif);}.cke_skin_kama .cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer;}.cke_skin_kama .cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white;}.cke_skin_kama .cke_dialog .ImagePreviewBox table td{white-space:normal;}.cke_skin_kama .cke_browser_iequirks .cke_dialog_page_contents{_position:absolute;}.cke_skin_kama .cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity=90);background-color:#e4e4e4;}.cke_skin_kama .cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white;}.cke_skin_kama .cke_dialog .cke_pastetext{width:346px;height:170px;}.cke_skin_kama .cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none;}.cke_skin_kama .cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid black;}.cke_skin_kama .cke_dialog .cke_dark_background{text-align:center;background-color:#eaead1;font-size:14px;}.cke_skin_kama .cke_dialog .cke_light_background{text-align:center;background-color:#ffffbe;}.cke_skin_kama .cke_dialog .cke_hand{cursor:pointer;}.cke_skin_kama .cke_disabled{color:#a0a0a0;}.cke_skin_kama .cke_hc .cke_dialog_title,.cke_skin_kama .cke_hc .cke_dialog_tabs,.cke_skin_kama .cke_hc .cke_dialog_contents,.cke_skin_kama .cke_hc .cke_dialog_footer{border-left:1px solid;border-right:1px solid;}.cke_skin_kama .cke_hc .cke_dialog_title{border-top:1px solid;}.cke_skin_kama .cke_hc .cke_dialog_footer{border-bottom:1px solid;}.cke_skin_kama .cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px;}.cke_skin_kama .cke_dialog_body .cke_label{display:none;}.cke_skin_kama .cke_dialog_body label.cke_required{font-weight:bold;}.cke_skin_kama .cke_hc .cke_dialog_body .cke_label{display:inline;}.cke_skin_kama .cke_hc a.cke_btn_locked,.cke_skin_kama .cke_hc a.cke_btn_unlocked,.cke_skin_kama .cke_hc a.cke_btn_reset{border-style:solid;float:left;width:auto;height:auto;}.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_locked,.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_unlocked,.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_reset{float:right;}.cke_skin_kama a.cke_smile img{border:2px solid #eaead1;}.cke_skin_kama a.cke_smile:focus img,.cke_skin_kama a.cke_smile:active img,.cke_skin_kama a.cke_smile:hover img{border-color:#C7C78F;}.cke_skin_kama .cke_hc .cke_dialog_tabs a,.cke_skin_kama .cke_hc .cke_dialog_footer a{opacity:1.0;filter:alpha(opacity=100);border:1px solid white;}.cke_skin_kama .cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px;}.cke_skin_kama .cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px;}
+.cke_skin_kama .cke_dialog_ui_vbox table,.cke_skin_kama .cke_dialog_ui_hbox table{margin:auto;}.cke_skin_kama .cke_dialog_ui_vbox_child{padding:5px 0;}.cke_skin_kama input.cke_dialog_ui_input_text,.cke_skin_kama input.cke_dialog_ui_input_password{background-color:white;border:none;padding:0;width:100%;height:14px;}.cke_skin_kama div.cke_dialog_ui_input_text,.cke_skin_kama div.cke_dialog_ui_input_password{background-color:white;border:1px solid #a0a0a0;padding:1px 0;_width:99.9%;}.cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_password,.cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_password{padding-right:2px;}.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_password,.cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_password{padding-left:2px;}.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_vbox_child,.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_child,.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_last{padding-right:2px!important;}.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text{padding-right:1px;}.cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_password{border-width:0;}.cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_text,.cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_password{border-width:1px;}.cke_skin_kama textarea.cke_dialog_ui_input_textarea{background-color:white;border:none;padding:0;width:100%;_width:99%;overflow:auto;resize:none;}.cke_skin_kama div.cke_dialog_ui_input_textarea{background-color:white;border:1px solid #a0a0a0;padding:1px 0;}.cke_skin_kama div.cke_disabled .cke_dialog_ui_labeled_content *{background-color:#a0a0a0;cursor:default;}.cke_skin_kama .cke_rtl .cke_dialog_ui_labeled_content{_width:95%;}.cke_skin_kama .cke_dialog_ui_hbox{width:100%;}.cke_skin_kama .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_dialog_ui_hbox_child,.cke_skin_kama .cke_dialog_ui_hbox_last{vertical-align:top;}.cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px;}.cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_first,.cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px;}.cke_skin_kama a.cke_dialog_ui_button{border-collapse:separate;cursor:default;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background:transparent url(images/sprites.png) repeat-x scroll 0 -1069px;_background:none;padding:5px 0;text-align:center;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button{padding:0;}.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span{width:70px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span{width:100px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span{padding:5px 15px;text-align:center;color:#3b3b1f;background:#53D9F0 none;display:inline-block;cursor:default;}.cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button span.cke_dialog_ui_button{margin:0;}.cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button{display:inline-block;padding-top:3px;padding-bottom:2px;margin:2px 0;}.cke_skin_kama a.cke_dialog_ui_button_ok span,.cke_skin_kama a.cke_dialog_ui_button_cancel span{width:60px;padding-right:20px;padding-left:20px;}.cke_skin_kama a.cke_dialog_ui_button_ok{background-position:0 -1143px;}.cke_skin_kama a.cke_dialog_ui_button_ok span{background:transparent url(images/sprites.png) no-repeat scroll right -1219px;}.cke_skin_kama .cke_rtl a.cke_dialog_ui_button_ok span{background-position:left -1219px;}
+.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span{background-color:#B8E834;margin-right:0;}.cke_skin_kama a.cke_dialog_ui_button_cancel{background-position:0 -1104px;}.cke_skin_kama a.cke_dialog_ui_button_cancel span{background:transparent url(images/sprites.png) no-repeat scroll right -1245px;}.cke_skin_kama .cke_rtl a.cke_dialog_ui_button_cancel span{background-position:left -1245px;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span{background-color:#F65D20;}.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span,.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span,.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span{background-image:none;}.cke_skin_kama span.cke_dialog_ui_button{padding:2px 10px;text-align:center;color:#222;display:inline-block;cursor:default;min-width:60px;+margin:2px 0;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button{display:block;}.cke_skin_kama a.cke_dialog_ui_button span.cke_disabled{border:#898980 1px solid;color:#5e5e55;background-color:#c5c5b3;}.cke_skin_kama a:hover.cke_dialog_ui_button,.cke_skin_kama a:focus.cke_dialog_ui_button,.cke_skin_kama a:active.cke_dialog_ui_button{background-position:0 -1179px;}.cke_skin_kama .cke_hc a:hover.cke_dialog_ui_button,.cke_skin_kama .cke_hc a:focus.cke_dialog_ui_button,.cke_skin_kama .cke_hc a:active.cke_dialog_ui_button{border-width:2px;}.cke_skin_kama .cke_browser_iequirks a:hover.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a:focus.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_iequirks a:active.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a:hover.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a:focus.cke_dialog_ui_button span,.cke_skin_kama .cke_browser_ie6 a:active.cke_dialog_ui_button span{background-image:none;background:#F7A922;}.cke_skin_kama .cke_dialog_footer_buttons{display:inline-table;margin-right:12px;margin-left:12px;width:auto;position:relative;}.cke_skin_kama .cke_browser_ie7 .cke_dialog_footer_buttons{position:static;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons{display:inline;}.cke_skin_kama .cke_dialog_footer_buttons span.cke_dialog_ui_button{margin:7px 0;text-align:center;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons a.cke_dialog_ui_button{display:block;padding:0;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button{padding-bottom:5px;padding-top:6px;margin-bottom:0;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_ok .cke_dialog_ui_button{background-position:right -1214px;}.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_cancel .cke_dialog_ui_button{background-position:right -1242px;}.cke_skin_kama .cke_browser_ie9.cke_rtl .cke_dialog_footer_buttons td{padding-left:2px;}.cke_skin_kama strong{font-weight:bold;}.cke_skin_kama .cke_dialog .cke_dialog_body .cke_dialog_close_button{background-image:url(images/sprites.png);background-repeat:no-repeat;background-position:0 -1022px;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;_background-image:url(images/sprites_ie6.png);}.cke_skin_kama .cke_dialog_close_button span{display:none;}.cke_skin_kama .cke_dialog_close_button:hover{background-position:0 -1045px;}.cke_skin_kama .cke_ltr .cke_dialog_close_button{right:10px;}.cke_skin_kama .cke_browser_ie8.cke_rtl .cke_dialog_close_button{left:8px;}.cke_skin_kama .cke_rtl .cke_dialog_close_button{left:10px;}.cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button{left:16px;top:0;}.cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button{position:absolute;left:10px;top:5px;}.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_footer{margin-top:22px;}.cke_skin_kama .cke_browser_ie6 .cke_dialog_close_button,.cke_skin_kama .cke_browser_iequirks .cke_dialog_close_button{top:7px;}
+.cke_skin_kama .cke_browser_ie7.cke_ltr .cke_dialog_close_button{margin-top:0;}.cke_skin_kama .cke_dialog_ui_input_select{border:1px solid #a0a0a0;background-color:white;}.cke_skin_kama .cke_dialog_ui_input_file{width:100%;height:25px;}.cke_skin_kama .cke_dialog .cke_dark_background{background-color:#eaead1;}.cke_skin_kama .cke_dialog .cke_hand{cursor:pointer;}.cke_skin_kama .cke_dialog .cke_centered{text-align:center;}.cke_skin_kama .cke_dialog a.cke_btn_reset{float:right;background-position:0 -32px;background-image:url(images/mini.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px;}.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_reset{float:left;}.cke_skin_kama .cke_dialog a.cke_btn_locked,.cke_skin_kama .cke_dialog a.cke_btn_unlocked{float:left;background-position:0 0;background-image:url(images/mini.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px;}.cke_skin_kama .cke_dialog a.cke_btn_locked .cke_icon{display:none;}.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_locked,.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_unlocked{float:right;}.cke_skin_kama .cke_dialog a.cke_btn_unlocked{background-position:0 -16px;background-image:url(images/mini.gif);}.cke_skin_kama .cke_dialog .cke_btn_over{border:outset 1px;cursor:pointer;}.cke_skin_kama .cke_dialog .ImagePreviewBox{border:2px ridge black;overflow:scroll;height:200px;width:300px;padding:2px;background-color:white;}.cke_skin_kama .cke_dialog .ImagePreviewBox table td{white-space:normal;}.cke_skin_kama .cke_browser_iequirks .cke_dialog_page_contents{_position:absolute;}.cke_skin_kama .cke_dialog .ImagePreviewLoader{position:absolute;white-space:normal;overflow:hidden;height:160px;width:230px;margin:2px;padding:2px;opacity:.9;filter:alpha(opacity=90);background-color:#e4e4e4;}.cke_skin_kama .cke_dialog .FlashPreviewBox{white-space:normal;border:2px ridge black;overflow:auto;height:160px;width:390px;padding:2px;background-color:white;}.cke_skin_kama .cke_dialog .cke_pastetext{width:346px;height:170px;}.cke_skin_kama .cke_dialog .cke_pastetext textarea{width:340px;height:170px;resize:none;}.cke_skin_kama .cke_dialog iframe.cke_pasteframe{width:346px;height:130px;background-color:white;border:1px solid black;}.cke_skin_kama .cke_dialog .cke_dark_background{text-align:center;background-color:#eaead1;font-size:14px;}.cke_skin_kama .cke_dialog .cke_light_background{text-align:center;background-color:#ffffbe;}.cke_skin_kama .cke_dialog .cke_hand{cursor:pointer;}.cke_skin_kama .cke_disabled{color:#a0a0a0;}.cke_skin_kama .cke_hc .cke_dialog_title,.cke_skin_kama .cke_hc .cke_dialog_tabs,.cke_skin_kama .cke_hc .cke_dialog_contents,.cke_skin_kama .cke_hc .cke_dialog_footer{border-left:1px solid;border-right:1px solid;}.cke_skin_kama .cke_hc .cke_dialog_title{border-top:1px solid;}.cke_skin_kama .cke_hc .cke_dialog_footer{border-bottom:1px solid;}.cke_skin_kama .cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px;}.cke_skin_kama .cke_dialog_body .cke_label{display:none;}.cke_skin_kama .cke_dialog_body label.cke_required{font-weight:bold;}.cke_skin_kama .cke_hc .cke_dialog_body .cke_label{display:inline;cursor:inherit;}.cke_skin_kama .cke_hc a.cke_btn_locked,.cke_skin_kama .cke_hc a.cke_btn_unlocked,.cke_skin_kama .cke_hc a.cke_btn_reset{border-style:solid;float:left;width:auto;height:auto;padding:0 2px;}.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_locked,.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_unlocked,.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_reset{float:right;}.cke_skin_kama .cke_hc a.cke_btn_locked .cke_icon{display:inline;}.cke_skin_kama a.cke_smile img{border:2px solid #eaead1;}.cke_skin_kama a.cke_smile:focus img,.cke_skin_kama a.cke_smile:active img,.cke_skin_kama a.cke_smile:hover img{border-color:#C7C78F;}.cke_skin_kama .cke_hc .cke_dialog_tabs a,.cke_skin_kama .cke_hc .cke_dialog_footer a{opacity:1.0;filter:alpha(opacity=100);border:1px solid white;}.cke_skin_kama .cke_hc .ImagePreviewBox{width:260px;}.cke_skin_kama .cke_dialog_contents a.colorChooser{display:block;margin-top:6px;margin-left:10px;width:80px;}
+.cke_skin_kama .cke_rtl .cke_dialog_contents a.colorChooser{margin-right:10px;}
diff --git a/appsrc/ODS-Framework/ckeditor/skins/kama/editor.css b/appsrc/ODS-Framework/ckeditor/skins/kama/editor.css
index a7deda9..8cc4903 100644
--- a/appsrc/ODS-Framework/ckeditor/skins/kama/editor.css
+++ b/appsrc/ODS-Framework/ckeditor/skins/kama/editor.css
@@ -3,11 +3,11 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-.cke_skin_kama *,.cke_skin_kama a:hover,.cke_skin_kama a:link,.cke_skin_kama a:visited,.cke_skin_kama a:active{margin:0;padding:0;border:0;background:transparent;text-decoration:none;font:normal normal normal 100% Sans-Serif;width:auto;height:auto;border-collapse:collapse;text-align:left;vertical-align:baseline;white-space:nowrap;cursor:auto;color:#000;font-size:12px;font-family:Arial,Helvetica,Tahoma,Verdana,Sans-Serif;}.cke_skin_kama .cke_rtl *,.cke_skin_kama .cke_rtl a:hover,.cke_skin_kama .cke_rtl a:link,.cke_skin_kama .cke_rtl a:visited,.cke_skin_kama .cke_rtl a:active,.cke_rtl .cke_skin_kama *,.cke_rtl .cke_skin_kama a:hover,.cke_rtl .cke_skin_kama a:link,.cke_rtl .cke_skin_kama a:visited,.cke_rtl .cke_skin_kama a:active{text-align:right;}.cke_skin_kama iframe{vertical-align:inherit;}.cke_skin_kama textarea{white-space:pre;}.cke_skin_kama .cke_browser_gecko textarea{cursor:text;}.cke_skin_kama .cke_browser_gecko textarea[disabled]{cursor:default;}.cke_skin_kama input[type="text"],.cke_skin_kama input[type="password"]{cursor:text;}.cke_skin_kama input[type="text"][disabled],.cke_skin_kama input[type="password"][disabled]{cursor:default;}.cke_skin_kama fieldset{padding:10px;border:2px groove #E0DFE3;}.cke_skin_kama{display:block;}span.cke_skin_kama{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #D3D3D3;padding:5px;}.cke_skin_kama span.cke_browser_webkit,.cke_skin_kama span.cke_browser_gecko18{display:block;}.cke_skin_kama .cke_wrapper{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background-color:#d3d3d3;background-image:url(images/sprites.png);background-repeat:repeat-x;background-position:0 -1950px;display:block;_display:inline-block;padding:5px;}.cke_shared .cke_skin_kama .cke_wrapper{padding-bottom:0;}.cke_skin_kama .cke_browser_ie6 .cke_wrapper,.cke_skin_kama .cke_browser_iequirks .cke_wrapper{background-image:none;}.cke_skin_kama .cke_editor{display:inline-table;width:100%;}.cke_skin_kama .cke_browser_webkit .cke_editor{display:table;}.cke_skin_kama .ltr .cke_browser_ie iframe{margin-right:-10px;}.cke_skin_kama .rtl .cke_browser_ie iframe{margin-left:-10px;}.cke_skin_kama .cke_browser_opera .cke_editor.cke_skin_kama .cke_resizer{display:table;}.cke_skin_kama .cke_contents{margin:5px;}.cke_skin_kama .cke_hc .cke_contents{border:1px solid black;}.cke_skin_kama .cke_contents iframe{background-color:#fff;}.cke_skin_kama .cke_focus{outline:auto 5px -webkit-focus-ring-color;}.cke_skin_kama textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre;}.cke_skin_kama .cke_browser_iequirks textarea.cke_source{_white-space:normal;}.cke_skin_kama .cke_resizer{width:12px;height:12px;margin-top:9px;display:block;float:right;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -1428px;background-repeat:no-repeat;cursor:se-resize;}.cke_skin_kama .cke_browser_air .cke_resizer,.cke_skin_kama .cke_browser_air .cke_rtl .cke_resizer{cursor:move;}.cke_skin_kama .cke_rtl .cke_resizer{cursor:sw-resize;background-position:0 -1455px;float:left;}.cke_skin_kama .cke_resizer_horizontal,.cke_skin_kama .cke_rtl .cke_resizer_horizontal{cursor:e-resize;}.cke_skin_kama .cke_resizer_vertical,.cke_skin_kama .cke_rtl .cke_resizer_vertical{cursor:n-resize;}.cke_skin_kama .cke_maximized .cke_resizer{display:none;}.cke_skin_kama .cke_browser_ie6 .cke_contents textarea,.cke_skin_kama .cke_browser_ie7 .cke_contents textarea{position:absolute;}.cke_skin_kama .cke_browser_ie.cke_browser_quirks .cke_contents iframe{position:absolute;top:0;}.cke_skin_kama .cke_browser_ie6 .cke_editor,.cke_skin_kama .cke_browser_ie7 .cke_editor{display:inline-block;}.cke_skin_kama .cke_browser_ie6 .cke_editor,.cke_shared .cke_skin_kama .cke_browser_ie7 .cke_wrapper{padding-bottom:5px;}.cke_skin_kama .cke_voice_label{display:none;}.cke_skin_kama legend.cke_voice_label{display:none;}.cke_skin_kama .cke_browser_ie legend.cke_voice_label{position:absolute;display:block;width:0;height:0;overflow:hidden;}.cke_skin_kama .cke_panel{border:1px solid #8f8f73;background-color:#fff;width:120px;height:100px;overflow:hidden;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}
-.cke_skin_kama .cke_contextmenu{margin:0;}.cke_skin_kama .cke_panel iframe{width:100%;height:100%;}html.cke_skin_kama_container{overflow:auto;overflow-x:hidden;}body.cke_panel_frame{overflow:auto;}.cke_panel_frame .cke_label{display:none;}ul.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap;}li.cke_panel_listItem{margin:0;}.cke_panel_listItem a{padding:2px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;}* html .cke_panel_listItem a{width:100%;color:#000;}*:first-child+html .cke_panel_listItem a{color:#000;}.cke_panel_listItem.cke_selected a{border:1px solid #ccc;background-color:#e9f5ff;}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#316ac5;background-color:#dff1ff;}.cke_hc .cke_panel_listItem.cke_selected a,.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border-width:3px;padding:0;}.cke_panel_grouptitle{font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif;font-weight:bold;white-space:nowrap;background-color:#dcdcdc;color:#000;margin:0;padding:3px;}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:3px;margin-bottom:3px;}.cke_skin_kama .cke_button_textcolor_panel,.cke_skin_kama .cke_button_bgcolor_panel{width:150px;height:135px;}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif;}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000;}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left;}.cke_rtl span.cke_colorbox{float:right;}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;}.cke_rtl a.cke_colorbox{float:right;}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#316ac5 1px solid;background-color:#dff1ff;}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer;}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#316ac5 1px solid;background-color:#dff1ff;}@media print{.cke_skin_kama .cke_toolbox{display:none;}}.cke_skin_kama .cke_browser_webkit .cke_toolbox,.cke_skin_kama .cke_browser_webkit .cke_toolbox>span{white-space:normal;}.cke_skin_kama .cke_toolbox{clear:both;padding-bottom:1px;}.cke_skin_kama a.cke_toolbox_collapser,.cke_skin_kama a:hover.cke_toolbox_collapser{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:3px -1366px;background-repeat:no-repeat;width:11px;height:11px;float:right;border:1px outset #D3D3D3;margin:11px 0 2px;cursor:pointer;}.cke_skin_kama .cke_rtl a.cke_toolbox_collapser,.cke_skin_kama .cke_rtl a:hover.cke_toolbox_collapser{float:left;}.cke_skin_kama a.cke_toolbox_collapser span{display:none;}.cke_skin_kama .cke_hc a.cke_toolbox_collapser span{font-size:10px;font-weight:bold;font-family:Arial;display:inline;}.cke_skin_kama a.cke_toolbox_collapser_min,.cke_skin_kama a:hover.cke_toolbox_collapser_min{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:4px -1387px;background-repeat:no-repeat;margin:2px 4px;}.cke_skin_kama .cke_rtl a.cke_toolbox_collapser_min,.cke_skin_kama .cke_rtl a:hover.cke_toolbox_collapser_min{background-position:4px -1408px;}.cke_skin_kama .cke_toolbar{display:inline;}.cke_skin_kama .cke_separator{display:none;}.cke_skin_kama .cke_break{font-size:0;clear:left;}.cke_skin_kama .cke_rtl .cke_break{clear:right;}.cke_skin_kama .cke_toolbar_start{display:none;}.cke_skin_kama .cke_toolgroup{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-repeat:repeat-x;background-position:0 -500px;float:left;margin-right:6px;margin-bottom:5px;padding:2px;display:inline;}
-.cke_skin_kama .cke_rtl .cke_toolgroup{float:right;margin-right:0;margin-left:6px;}.cke_skin_kama .cke_toolgroup{display:block;height:22px;}.cke_skin_kama .cke_button a,.cke_skin_kama .cke_button a:hover,.cke_skin_kama .cke_button a:focus,.cke_skin_kama .cke_button a:active,.cke_skin_kama .cke_button a.cke_off{border-radius:3px;outline:none;padding:2px 4px;height:18px;display:inline-block;cursor:default;}.cke_skin_kama .cke_button a,.cke_skin_kama .cke_button a.cke_off{filter:alpha(opacity=70);opacity:.70;-moz-border-radius:3px;-webkit-border-radius:3px;}.cke_skin_kama .cke_hc .cke_button a,.cke_skin_kama .cke_hc .cke_button a.cke_off{opacity:1.0;filter:alpha(opacity=100);border:1px solid white;}.cke_skin_kama .cke_button a.cke_on{background-color:#a3d7ff;filter:alpha(opacity=100);opacity:1;padding:2px 4px;}.cke_skin_kama .cke_hc .cke_button a.cke_on{padding:0 2px!important;border-width:3px;}.cke_skin_kama .cke_button a.cke_disabled *{filter:alpha(opacity=30);opacity:.3;}.cke_skin_kama .cke_browser_ie .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie a:hover.cke_button .cke_disabled *{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=30);}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie .cke_rtl a:hover.cke_button .cke_disabled *{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=30);}.cke_skin_kama .cke_browser_ie6 .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie6 a:hover.cke_button .cke_disabled *,.cke_skin_kama .cke_browser_ie .cke_button.cke_noalphafix a.cke_disabled *{filter:alpha(opacity=30);}.cke_skin_kama .cke_hc .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled *{filter:alpha(opacity=60);opacity:.6;}.cke_skin_kama .cke_button a:hover.cke_on,.cke_skin_kama .cke_button a:focus.cke_on,.cke_skin_kama .cke_button a:active.cke_on,.cke_skin_kama .cke_button a:hover.cke_off,.cke_skin_kama .cke_button a:focus.cke_off,.cke_skin_kama .cke_button a:active.cke_off{filter:alpha(opacity=100);opacity:1;padding:2px 4px;}.cke_skin_kama .cke_button a:hover,.cke_skin_kama .cke_button a:focus,.cke_skin_kama .cke_button a:active{background-color:#dff1ff;}.cke_skin_kama .cke_button a:hover.cke_on,.cke_skin_kama .cke_button a:focus.cke_on,.cke_skin_kama .cke_button a:active.cke_on{background-color:#86caff;}.cke_skin_kama .cke_hc .cke_button a:hover,.cke_skin_kama .cke_hc .cke_button a:focus,.cke_skin_kama .cke_hc .cke_button a:active{padding:0 2px!important;border-width:3px;}.cke_skin_kama .cke_button .cke_icon{background-image:url(icons.png);background-position:100px;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;display:inline-block;float:left;cursor:default;}.cke_skin_kama .cke_rtl .cke_button .cke_icon{background-image:url(icons_rtl.png);}.cke_skin_kama .cke_browser_ie .cke_button .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_skin_kama .cke_browser_ie6 .cke_button .cke_icon,.cke_skin_kama .cke_browser_ie6 .cke_rtl .cke_button .cke_icon,.cke_skin_kama .cke_browser_ie .cke_button.cke_noalphafix .cke_icon,.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button.cke_noalphafix .cke_icon{filter:;}.cke_skin_kama .cke_rtl .cke_button .cke_icon{float:right;}.cke_skin_kama .cke_button .cke_label{cursor:default;display:none;padding-left:3px;line-height:18px;vertical-align:middle;float:left;}.cke_skin_kama .cke_rtl .cke_button .cke_label{padding-left:0;padding-right:3px;float:right;}.cke_skin_kama .cke_hc .cke_button .cke_label{padding:0;display:inline-block;}.cke_skin_kama .cke_hc .cke_button .cke_icon{display:none;}.cke_skin_kama .cke_accessibility{position:absolute;display:block;width:0;height:0;overflow:hidden;}.cke_skin_kama .cke_button .cke_buttonarrow{display:inline-block;height:17px;width:8px;background-position:2px -1469px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-repeat:no-repeat;float:left;cursor:default;}
-.cke_skin_kama .cke_browser_ie .cke_button .cke_buttonarrow{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_skin_kama .cke_browser_ie6 .cke_button .cke_buttonarrow{filter:;}.cke_skin_kama .cke_rtl .cke_button .cke_buttonarrow{background-position:0 -1469px;float:right;}.cke_skin_kama .cke_browser_gecko .cke_toolbar,.cke_skin_kama .cke_browser_gecko .cke_button a,.cke_skin_kama .cke_browser_gecko .cke_button a.cke_off,.cke_skin_kama .cke_browser_gecko .cke_button .cke_icon,.cke_skin_kama .cke_browser_gecko .cke_button .cke_buttonarrow,.cke_skin_kama .cke_browser_gecko .cke_separator,.cke_skin_kama .cke_browser_gecko .cke_toolbar_start{display:block;float:left;}.cke_skin_kama .cke_browser_gecko.cke_hc .cke_button .cke_icon{display:none;}.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_toolbar,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button a,.cke_skin_kama .cke_browser_gecko .cke_rtl.cke_button a.cke_off,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_icon,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_buttonarrow,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_toolbar_start{float:right;}.cke_skin_kama .cke_browser_gecko .cke_button .cke_label,.cke_skin_kama .cke_browser_gecko .cke_break{float:left;}.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_label,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_break{float:right;}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button .cke_icon,.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button .cke_label,.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button .cke_buttonarrow{float:none;}.cke_skin_kama .cke_browser_webkit .cke_toolbar{float:left;}.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_toolbar{float:right;}.cke_skin_kama .cke_browser_ie8 .cke_button .cke_label,.cke_skin_kama .cke_browser_opera .cke_button .cke_label,.cke_skin_kama .cke_browser_webkit .cke_button .cke_label{line-height:20px;}.cke_skin_kama .cke_browser_opera.cke_browser_quirks .cke_button .cke_label,.cke_skin_kama .cke_browser_iequirks .cke_button .cke_label{line-height:17px;}.cke_skin_kama .cke_browser_ie .cke_rcombo,.cke_skin_kama .cke_browser_ie .cke_rcombo *{cursor:default;}.cke_skin_kama .cke_browser_ie .cke_toolbox{padding-bottom:5px;_padding-bottom:6px;}.cke_shared .cke_skin_kama .cke_browser_ie .cke_toolbox{padding-bottom:0;}.cke_skin_kama .cke_contextmenu{padding:2px;}.cke_skin_kama .cke_menuitem a{display:block;}.cke_skin_kama .cke_menuitem span{cursor:default;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{background-color:#D3D3D3;display:block;}.cke_hc .cke_menuitem a:hover,.cke_hc .cke_menuitem a:focus,.cke_hc .cke_menuitem a:active{border:2px solid;}.cke_skin_kama .cke_menuitem .cke_icon{background-image:url(icons.png);background-position:100px;background-repeat:no-repeat;background-color:transparent;width:16px;height:16px;float:left;}.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon{background-image:url(icons_rtl.png);}.cke_browser_ie .cke_skin_kama .cke_menuitem .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie6 .cke_skin_kama .cke_menuitem .cke_icon,.cke_browser_ie .cke_skin_kama .cke_menuitem.cke_noalphafix .cke_icon{filter:;}.cke_skin_kama .cke_menuitem .cke_disabled .cke_icon{filter:alpha(opacity=70);opacity:.70;}.cke_browser_ie .cke_skin_kama .cke_menuitem .cke_disabled .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie.cke_rtl .cke_skin_kama .cke_menuitem .cke_disabled .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie6 .cke_skin_kama .cke_menuitem .cke_disabled .cke_icon,.cke_browser_ie .cke_skin_kama .cke_menuitem.cke_noalphafix .cke_disabled .cke_icon{filter:;}.cke_skin_kama .cke_menuitem .cke_icon_wrapper{background-color:#D3D3D3;border:solid 4px #D3D3D3;width:16px;height:16px;float:left;filter:alpha(opacity=70);opacity:.70;clear:both;}
-.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon_wrapper{float:right;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{background-color:#9d9d9d;border:solid 4px #9d9d9d;filter:alpha(opacity=70);opacity:.70;}.cke_skin_kama .cke_menuitem a:hover.cke_disabled .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus.cke_disabled .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active.cke_disabled .cke_icon_wrapper{background-color:#D3D3D3;border:solid 4px #D3D3D3;}.cke_skin_kama .cke_menuitem .cke_label{display:block;padding-right:3px;padding-top:5px;padding-left:4px;height:19px;margin-left:24px;background-color:#fff;}.cke_skin_kama .cke_frameLoaded .cke_menuitem .cke_label{filter:alpha(opacity=70);opacity:.70;}.cke_rtl .cke_skin_kama .cke_menuitem .cke_label{padding-right:0;margin-left:0;padding-left:3px;margin-right:28px;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_label{filter:alpha(opacity=30);opacity:.30;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{background-color:#D3D3D3;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{background-color:transparent;}.cke_skin_kama .cke_menuseparator{background-color:#D3D3D3;height:2px;filter:alpha(opacity=70);opacity:.70;_font-size:0;}.cke_skin_kama .cke_menuarrow{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -1411px;background-repeat:no-repeat;height:5px;width:3px;float:right;margin-right:2px;margin-top:3px;}.cke_rtl .cke_skin_kama .cke_menuarrow{float:left;margin-right:0;margin-left:2px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -1390px;background-repeat:no-repeat;}.cke_skin_kama .cke_menuarrow span{display:none;}.cke_hc .cke_skin_kama .cke_menuarrow{width:auto;margin-top:0;}.cke_hc .cke_skin_kama .cke_menuarrow span{display:inline;}.cke_browser_ie.cke_ltr .cke_skin_kama .cke_menuarrow{position:absolute;right:2px;}.cke_browser_ie.cke_rtl .cke_skin_kama .cke_menuarrow{position:absolute;left:2px;}.cke_skin_kama .cke_rcombo{display:inline;}.cke_skin_kama .cke_rcombopanel{border:1px solid #8F8F73;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;height:auto;_height:100px;}.cke_skin_kama .cke_rcombo a,.cke_skin_kama .cke_rcombo a:active,.cke_skin_kama .cke_rcombo a:hover{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-repeat:repeat-x;background-position:0 -100px;border-bottom:1px solid #DAD9D9;border-right:1px solid #DAD9D9;float:left;padding:2px;height:21px;margin-right:6px;}.cke_skin_kama .cke_rtl .cke_rcombo a,.cke_skin_kama .cke_rtl .cke_rcombo a:active,.cke_skin_kama .cke_rtl .cke_rcombo a:hover{float:right;margin-right:0;margin-left:6px;}.cke_skin_kama .cke_hc .cke_rcombo a{filter:alpha(opacity=100);opacity:1.0;}.cke_skin_kama .cke_rcombo .cke_label{display:none;line-height:26px;vertical-align:top;margin-right:5px;filter:alpha(opacity=70);opacity:.70;}.cke_skin_kama .cke_rtl .cke_rcombo .cke_label{margin-right:0;margin-left:5px;}.cke_skin_kama .cke_rcombo .cke_inline_label{line-height:21px;font-style:italic;color:#666;}.cke_skin_kama .cke_hc .cke_rcombo .cke_openbutton{vertical-align:top;}.cke_skin_kama .cke_hc .cke_rcombo .cke_label{filter:alpha(opacity=100);opacity:1.0;}.cke_skin_kama .cke_rcombo .cke_text{filter:alpha(opacity=70);opacity:.70;height:21px;line-height:21px;width:60px;text-overflow:ellipsis;overflow:hidden;display:inline-block;margin:0 2px 0 4px;cursor:default;}.cke_skin_kama .cke_rtl .cke_rcombo .cke_text{margin:0 4px 0 2px;}.cke_skin_kama .cke_rcombo .cke_openbutton{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -68px;background-repeat:no-repeat;display:inline-block;width:17px;height:19px;margin:1px 2px;background-repeat:no-repeat;}
-.cke_skin_kama .cke_rcombo .cke_openbutton span{display:none;}.cke_skin_kama .cke_hc .cke_rcombo .cke_openbutton span{display:inline;}.cke_skin_kama .cke_browser_iequirks .cke_rcombo .cke_openbutton{margin-bottom:0;}.cke_skin_kama .cke_rcombo .cke_off a:hover .cke_text,.cke_skin_kama .cke_rcombo .cke_off a:focus .cke_text,.cke_skin_kama .cke_rcombo .cke_off a:active .cke_text,.cke_skin_kama .cke_rcombo .cke_on .cke_text{border-color:#316ac5;filter:alpha(opacity=100);opacity:1;}.cke_skin_kama .cke_rcombo .cke_off a:hover .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:focus .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:active .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_on .cke_openbutton{border-color:#316ac5;background-color:#dff1ff;}.cke_skin_kama .cke_rcombo .cke_on .cke_text{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;}.cke_skin_kama .cke_rcombo .cke_on .cke_openbutton{-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;}.cke_skin_kama .cke_rcombo .cke_disabled .cke_label{filter:alpha(opacity=30);opacity:.3;}.cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_label{filter:alpha(opacity=70);opacity:.7;}.cke_skin_kama .cke_rcombo .cke_disabled .cke_text,.cke_skin_kama .cke_rcombo .cke_disabled .cke_openbutton{filter:alpha(opacity=50);opacity:.5;}.cke_skin_kama .cke_browser_ie .cke_rcombo .cke_disabled .cke_openbutton{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=50);}.cke_skin_kama .cke_browser_ie6 .cke_rcombo .cke_disabled .cke_openbutton{filter:alpha(opacity=50);}.cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_text,.cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_openbutton{filter:alpha(opacity=80);opacity:.8;}.cke_skin_kama .cke_rcombo .cke_disabled .cke_text{color:#fff;}.cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_openbutton,.cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_openbutton{display:block;float:left;}.cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_label,.cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_label{float:left;}.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_label,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_openbutton,.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_label,.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_openbutton{float:right;}.cke_skin_kama .cke_browser_ie7 .cke_rcombo .cke_text{line-height:18px;}.cke_skin_kama .cke_browser_ie6 .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_iequirks .cke_rcombo .cke_text{height:auto;line-height:17px;}.cke_skin_kama .cke_rtl .cke_rcombo .cke_font .cke_text,.cke_skin_kama .cke_rtl .cke_rcombo .cke_fontSize .cke_text{direction:ltr;}@media print{.cke_path{display:none;}}.cke_skin_kama .cke_path{display:inline-block;float:left;margin-top:5px;}.cke_skin_kama .cke_rtl .cke_path{float:right;}.cke_shared .cke_skin_kama .cke_path{_width:100%;margin:0 0 5px;}.cke_skin_kama .cke_path a,.cke_skin_kama .cke_path .cke_empty{display:inline-block;float:left;padding:1px 4px 0;color:#60676a;cursor:default;}.cke_skin_kama .cke_path .cke_empty{visibility:hidden;}.cke_skin_kama .cke_rtl .cke_path a,.cke_skin_kama .cke_rtl .cke_path cke_empty{float:right;}.cke_skin_kama .cke_path a:hover,.cke_skin_kama .cke_path a:focus,.cke_skin_kama .cke_path a:active{background-color:#dff1ff;padding:1px 4px 0;outline:none;color:#000;}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_path a,.cke_skin_kama .cke_browser_ie .cke_rtl .cke_path .cke_empty{float:none;}.cke_skin_kama .cke_path .cke_label{display:none;}.cke_skin_kama .cke_button_source .cke_icon{background-position:0 0;}.cke_skin_kama .cke_button_newpage .cke_icon{background-position:0 -48px;}.cke_skin_kama .cke_button_preview .cke_icon{background-position:0 -64px;}
-.cke_skin_kama .cke_button_cut .cke_icon{background-position:0 -96px;}.cke_skin_kama .cke_button_copy .cke_icon{background-position:0 -112px;}.cke_skin_kama .cke_button_paste .cke_icon{background-position:0 -128px;}.cke_skin_kama .cke_button_pastetext .cke_icon{background-position:0 -144px;}.cke_skin_kama .cke_button_find .cke_icon{background-position:0 -240px;}.cke_skin_kama .cke_button_replace .cke_icon{background-position:0 -256px;}.cke_skin_kama .cke_button_selectAll .cke_icon{background-position:0 -272px;}.cke_skin_kama .cke_button_removeFormat .cke_icon{background-position:0 -288px;}.cke_skin_kama .cke_button_bold .cke_icon{background-position:0 -304px;}.cke_skin_kama .cke_button_italic .cke_icon{background-position:0 -320px;}.cke_skin_kama .cke_button_underline .cke_icon{background-position:0 -336px;}.cke_skin_kama .cke_button_strike .cke_icon{background-position:0 -352px;}.cke_skin_kama .cke_button_subscript .cke_icon{background-position:0 -368px;}.cke_skin_kama .cke_button_superscript .cke_icon{background-position:0 -384px;}.cke_skin_kama .cke_button_table .cke_icon{background-position:0 -608px;}.cke_skin_kama .cke_button_horizontalrule .cke_icon{background-position:0 -624px;}.cke_skin_kama .cke_button_smiley .cke_icon{background-position:0 -640px;}.cke_skin_kama .cke_button_link .cke_icon{background-position:0 -528px;}.cke_skin_kama .cke_button_unlink .cke_icon{background-position:0 -544px;}.cke_skin_kama .cke_button_anchor .cke_icon{background-position:0 -560px;}.cke_skin_kama .cke_button_image .cke_icon{background-position:0 -576px;}.cke_skin_kama .cke_button_flash .cke_icon{background-position:0 -592px;}.cke_skin_kama .cke_button_specialchar .cke_icon{background-position:0 -656px;}.cke_skin_kama .cke_button_pagebreak .cke_icon{background-position:0 -672px;}.cke_skin_kama .cke_button_print .cke_icon{background-position:0 -176px;}.cke_skin_kama .cke_button_checkspell .cke_icon,.cke_skin_kama .cke_button_scayt .cke_icon{background-position:0 -192px;}.cke_skin_kama .cke_button_pagebreak .cke_icon{background-position:0 -672px;}.cke_skin_kama .cke_button_textcolor .cke_icon{background-position:0 -704px;}.cke_skin_kama .cke_button_bgcolor .cke_icon{background-position:0 -720px;}.cke_skin_kama .cke_button_form .cke_icon{background-position:0 -752px;}.cke_skin_kama .cke_button_checkbox .cke_icon{background-position:0 -768px;}.cke_skin_kama .cke_button_radio .cke_icon{background-position:0 -784px;}.cke_skin_kama .cke_button_textfield .cke_icon{background-position:0 -800px;}.cke_skin_kama .cke_button_textarea .cke_icon{background-position:0 -816px;}.cke_skin_kama .cke_button_showblocks .cke_icon{background-position:0 -1136px;}.cke_skin_kama .cke_button_select .cke_icon{background-position:0 -832px;}.cke_skin_kama .cke_button_button .cke_icon{background-position:0 -848px;}.cke_skin_kama .cke_button_imagebutton .cke_icon{background-position:0 -864px;}.cke_skin_kama .cke_button_hiddenfield .cke_icon{background-position:0 -880px;}.cke_skin_kama .cke_button_undo .cke_icon{background-position:0 -208px;}.cke_skin_kama .cke_rtl .cke_button_undo .cke_icon{background-position:0 -224px;}.cke_skin_kama .cke_button_redo .cke_icon{background-position:0 -224px;}.cke_skin_kama .cke_rtl .cke_button_redo .cke_icon{background-position:0 -208px;}.cke_skin_kama .cke_button_templates .cke_icon{background-position:0 -80px;}.cke_skin_kama .cke_button_numberedlist .cke_icon{background-position:0 -400px;}.cke_skin_kama .cke_button_bulletedlist .cke_icon{background-position:0 -416px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_numberedlist .cke_icon{background-position:0 -1217px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_bulletedlist .cke_icon{background-position:0 -1233px;}.cke_skin_kama .cke_button_outdent .cke_icon{background-position:0 -432px;}.cke_skin_kama .cke_button_indent .cke_icon{background-position:0 -448px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_indent .cke_icon{background-position:0 -1265px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_outdent .cke_icon{background-position:0 -1249px;}.cke_skin_kama .cke_button_justifyleft .cke_icon{background-position:0 -464px;}
-.cke_skin_kama .cke_button_justifycenter .cke_icon{background-position:0 -480px;}.cke_skin_kama .cke_button_justifyright .cke_icon{background-position:0 -496px;}.cke_skin_kama .cke_button_justifyblock .cke_icon{background-position:0 -512px;}.cke_skin_kama .cke_button_blockquote .cke_icon{background-position:0 -1152px;}.cke_skin_kama .cke_button_creatediv .cke_icon{background-position:0 -1168px;}.cke_skin_kama .cke_button_editdiv .cke_icon{background-position:0 -1184px;}.cke_skin_kama .cke_button_removediv .cke_icon{background-position:0 -1200px;}.cke_skin_kama .cke_button_flash .cke_icon{background-position:0 -592px;}.cke_skin_kama .cke_button_pastefromword .cke_icon{background-position:0 -160px;}.cke_skin_kama .cke_button_save .cke_icon{background-position:0 -32px;}.cke_skin_kama .cke_button_about .cke_icon{background-position:0 -736px;}.cke_skin_kama .cke_button_maximize .cke_icon{background-position:0 -1040px;}.cke_skin_kama .cke_button_editdiv .cke_icon{background-position:0 -1184px;}.cke_skin_kama .cke_button_bidirtl .cke_icon{background-position:0 -1072px;}.cke_skin_kama .cke_button_bidiltr .cke_icon{background-position:0 -1056px;}.cke_skin_kama .cke_button_iframe .cke_icon{background-position:0 -1279px;}.cke_skin_kama .cke_button_source .cke_label{display:inline;}.cke_skin_kama .cke_styles_panel{width:150px;height:170px;}.cke_skin_kama .cke_format_panel{width:150px;height:170px;}.cke_skin_kama .cke_font_panel{width:150px;height:170px;}.cke_skin_kama .cke_fontSize_panel{height:170px;}.cke_skin_kama .cke_fontSize .cke_text{width:25px;}.cke_skin_kama .cke_browser_iequirks .cke_fontSize .cke_text{width:32px;}html .cke_skin_kama{visibility:inherit;}html.cke_skin_kama_container{visibility:visible;}
+.cke_skin_kama *,.cke_skin_kama a:hover,.cke_skin_kama a:link,.cke_skin_kama a:visited,.cke_skin_kama a:active{margin:0;padding:0;border:0;background:transparent;text-decoration:none;font:normal normal normal 100% Sans-Serif;width:auto;height:auto;border-collapse:collapse;text-align:left;vertical-align:baseline;white-space:nowrap;cursor:auto;color:#000;font-size:12px;font-family:Arial,Helvetica,Tahoma,Verdana,Sans-Serif;}.cke_skin_kama .cke_rtl *,.cke_skin_kama .cke_rtl a:hover,.cke_skin_kama .cke_rtl a:link,.cke_skin_kama .cke_rtl a:visited,.cke_skin_kama .cke_rtl a:active,.cke_rtl .cke_skin_kama *,.cke_rtl .cke_skin_kama a:hover,.cke_rtl .cke_skin_kama a:link,.cke_rtl .cke_skin_kama a:visited,.cke_rtl .cke_skin_kama a:active{text-align:right;}.cke_skin_kama iframe{vertical-align:inherit;}.cke_skin_kama textarea{white-space:pre;}.cke_skin_kama .cke_browser_gecko textarea{cursor:text;}.cke_skin_kama .cke_browser_gecko textarea[disabled]{cursor:default;}.cke_skin_kama input[type="text"],.cke_skin_kama input[type="password"]{cursor:text;}.cke_skin_kama input[type="text"][disabled],.cke_skin_kama input[type="password"][disabled]{cursor:default;}.cke_skin_kama fieldset{padding:10px;border:2px groove #E0DFE3;}.cke_skin_kama{display:block;}span.cke_skin_kama{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #D3D3D3;padding:5px;}.cke_skin_kama span.cke_browser_webkit,.cke_skin_kama span.cke_browser_gecko18{display:block;}.cke_skin_kama .cke_wrapper{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background-color:#d3d3d3;background-image:url(images/sprites.png);background-repeat:repeat-x;background-position:0 -1950px;display:block;_display:inline-block;padding:5px;}.cke_shared .cke_skin_kama .cke_wrapper{padding-bottom:0;}.cke_skin_kama .cke_browser_ie6 .cke_wrapper,.cke_skin_kama .cke_browser_iequirks .cke_wrapper{background-image:none;}.cke_skin_kama .cke_editor{display:inline-table;width:100%;}.cke_skin_kama .cke_browser_webkit .cke_editor{display:table;}.cke_skin_kama .ltr .cke_browser_ie iframe{margin-right:-10px;}.cke_skin_kama .rtl .cke_browser_ie iframe{margin-left:-10px;}.cke_skin_kama .cke_browser_opera .cke_editor.cke_skin_kama .cke_resizer{display:table;}.cke_skin_kama .cke_contents{margin:5px;}.cke_skin_kama .cke_hc .cke_contents{border:1px solid black;}.cke_skin_kama .cke_contents iframe{background-color:#fff;}.cke_skin_kama .cke_focus{outline:auto 5px -webkit-focus-ring-color;}.cke_skin_kama textarea.cke_source{font-family:'Courier New',Monospace;font-size:small;background-color:#fff;white-space:pre;}.cke_skin_kama .cke_browser_iequirks textarea.cke_source{_white-space:normal;}.cke_skin_kama .cke_resizer{width:12px;height:12px;margin-top:9px;display:block;float:right;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -1428px;background-repeat:no-repeat;cursor:se-resize;}.cke_skin_kama .cke_browser_air .cke_resizer,.cke_skin_kama .cke_browser_air .cke_rtl .cke_resizer{cursor:move;}.cke_skin_kama .cke_resizer_rtl{cursor:sw-resize;background-position:0 -1455px;float:left;}.cke_skin_kama .cke_resizer_horizontal,.cke_skin_kama .cke_rtl .cke_resizer_horizontal{cursor:e-resize;}.cke_skin_kama .cke_resizer_vertical,.cke_skin_kama .cke_rtl .cke_resizer_vertical{cursor:n-resize;}.cke_skin_kama .cke_maximized .cke_resizer{display:none;}.cke_skin_kama .cke_browser_ie6 .cke_contents textarea,.cke_skin_kama .cke_browser_ie7 .cke_contents textarea{position:absolute;}.cke_skin_kama .cke_browser_ie.cke_browser_quirks .cke_contents iframe{position:absolute;top:0;}.cke_skin_kama .cke_browser_ie6 .cke_editor,.cke_skin_kama .cke_browser_ie7 .cke_editor{display:inline-block;}.cke_skin_kama .cke_browser_ie6 .cke_editor,.cke_shared .cke_skin_kama .cke_browser_ie7 .cke_wrapper{padding-bottom:5px;}.cke_skin_kama .cke_voice_label{display:none;}.cke_skin_kama legend.cke_voice_label{display:none;}.cke_skin_kama .cke_browser_ie legend.cke_voice_label{position:absolute;display:block;width:0;height:0;overflow:hidden;}.cke_skin_kama .cke_panel{border:1px solid #8f8f73;background-color:#fff;width:120px;height:100px;overflow:hidden;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}
+.cke_skin_kama .cke_contextmenu{margin:0;}.cke_skin_kama .cke_panel iframe{width:100%;height:100%;}html.cke_skin_kama_container{overflow:auto;overflow-x:hidden;}body.cke_panel_frame{overflow:auto;}.cke_panel_frame .cke_label{display:none;}ul.cke_panel_list{list-style-type:none;margin:3px;padding:0;white-space:nowrap;}li.cke_panel_listItem{margin:0;}.cke_panel_listItem a{padding:2px;display:block;border:1px solid #fff;color:inherit!important;text-decoration:none;overflow:hidden;text-overflow:ellipsis;}* html .cke_panel_listItem a{width:100%;color:#000;}*:first-child+html .cke_panel_listItem a{color:#000;}.cke_panel_listItem.cke_selected a{border:1px solid #ccc;background-color:#e9f5ff;}.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{border-color:#316ac5;background-color:#dff1ff;}.cke_hc .cke_panel_listItem.cke_selected a,.cke_hc .cke_panel_listItem a:hover,.cke_hc .cke_panel_listItem a:focus,.cke_hc .cke_panel_listItem a:active{border-width:3px;padding:0;}.cke_panel_grouptitle{font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif;font-weight:bold;white-space:nowrap;background-color:#dcdcdc;color:#000;margin:0;padding:3px;}.cke_panel_listItem p,.cke_panel_listItem h1,.cke_panel_listItem h2,.cke_panel_listItem h3,.cke_panel_listItem h4,.cke_panel_listItem h5,.cke_panel_listItem h6,.cke_panel_listItem pre{margin-top:3px;margin-bottom:3px;}.cke_skin_kama .cke_button_textcolor_panel,.cke_skin_kama .cke_button_bgcolor_panel{width:150px;height:135px;}.cke_colorblock{padding:3px;font-size:11px;font-family:'Microsoft Sans Serif',Tahoma,Arial,Verdana,Sans-Serif;}.cke_colorblock,.cke_colorblock a{text-decoration:none;color:#000;}span.cke_colorbox{width:10px;height:10px;border:#808080 1px solid;float:left;}.cke_rtl span.cke_colorbox{float:right;}a.cke_colorbox{border:#fff 1px solid;padding:2px;float:left;}.cke_rtl a.cke_colorbox{float:right;}a:hover.cke_colorbox,a:focus.cke_colorbox,a:active.cke_colorbox{border:#316ac5 1px solid;background-color:#dff1ff;}a.cke_colorauto,a.cke_colormore{border:#fff 1px solid;padding:2px;display:block;cursor:pointer;}a:hover.cke_colorauto,a:hover.cke_colormore,a:focus.cke_colorauto,a:focus.cke_colormore,a:active.cke_colorauto,a:active.cke_colormore{border:#316ac5 1px solid;background-color:#dff1ff;}@media print{.cke_skin_kama .cke_toolbox{display:none;}}.cke_skin_kama .cke_browser_webkit .cke_toolbox,.cke_skin_kama .cke_browser_webkit .cke_toolbox>span{white-space:normal;}.cke_skin_kama .cke_toolbox{clear:both;padding-bottom:1px;}.cke_skin_kama a.cke_toolbox_collapser,.cke_skin_kama a:hover.cke_toolbox_collapser{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:3px -1366px;background-repeat:no-repeat;width:11px;height:11px;float:right;border:1px outset #D3D3D3;margin:11px 0 2px;cursor:pointer;}.cke_skin_kama .cke_rtl a.cke_toolbox_collapser,.cke_skin_kama .cke_rtl a:hover.cke_toolbox_collapser{float:left;}.cke_skin_kama a.cke_toolbox_collapser span{display:none;}.cke_skin_kama .cke_hc a.cke_toolbox_collapser span{font-size:10px;font-weight:bold;font-family:Arial;display:inline;}.cke_skin_kama a.cke_toolbox_collapser_min,.cke_skin_kama a:hover.cke_toolbox_collapser_min{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:4px -1387px;background-repeat:no-repeat;margin:2px 4px;}.cke_skin_kama .cke_rtl a.cke_toolbox_collapser_min,.cke_skin_kama .cke_rtl a:hover.cke_toolbox_collapser_min{background-position:4px -1408px;}.cke_skin_kama .cke_separator{display:inline-block;border-left:solid 1px #D3D3D3;margin:3px 2px 0;height:16px;vertical-align:top;}.cke_skin_kama .cke_break{font-size:0;clear:left;}.cke_skin_kama .cke_rtl .cke_break{clear:right;}.cke_skin_kama .cke_toolbar_start{display:none;}.cke_skin_kama .cke_toolgroup{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-repeat:repeat-x;background-position:0 -500px;float:left;margin-right:6px;margin-bottom:5px;padding:2px;display:inline;}
+.cke_skin_kama .cke_rtl .cke_toolgroup{float:right;margin-right:0;margin-left:6px;}.cke_skin_kama .cke_button a,.cke_skin_kama .cke_button a:hover,.cke_skin_kama .cke_button a:focus,.cke_skin_kama .cke_button a:active,.cke_skin_kama .cke_button a.cke_off{border-radius:3px;outline:none;padding:2px 4px;height:18px;display:inline-block;cursor:default;}.cke_skin_kama .cke_button a,.cke_skin_kama .cke_button a.cke_off{filter:alpha(opacity=70);opacity:.70;-moz-border-radius:3px;-webkit-border-radius:3px;}.cke_skin_kama .cke_hc .cke_button a,.cke_skin_kama .cke_hc .cke_button a.cke_off{opacity:1.0;filter:alpha(opacity=100);border:1px solid white;}.cke_skin_kama .cke_button a.cke_on{background-color:#a3d7ff;filter:alpha(opacity=100);opacity:1;padding:2px 4px;}.cke_skin_kama .cke_hc .cke_button a.cke_on{padding:0 2px!important;border-width:3px;}.cke_skin_kama .cke_button a.cke_disabled *{filter:alpha(opacity=30);opacity:.3;}.cke_skin_kama .cke_browser_ie .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie a:hover.cke_button .cke_disabled *{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=30);}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie .cke_rtl a:hover.cke_button .cke_disabled *{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=30);}.cke_skin_kama .cke_browser_ie6 .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie6 a:hover.cke_button .cke_disabled *,.cke_skin_kama .cke_browser_ie .cke_button.cke_noalphafix a.cke_disabled *{filter:alpha(opacity=30);}.cke_skin_kama .cke_hc .cke_button a.cke_disabled *,.cke_skin_kama .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled *{filter:alpha(opacity=60);opacity:.6;}.cke_skin_kama .cke_button a:hover.cke_on,.cke_skin_kama .cke_button a:focus.cke_on,.cke_skin_kama .cke_button a:active.cke_on,.cke_skin_kama .cke_button a:hover.cke_off,.cke_skin_kama .cke_button a:focus.cke_off,.cke_skin_kama .cke_button a:active.cke_off{filter:alpha(opacity=100);opacity:1;padding:2px 4px;}.cke_skin_kama .cke_button a:hover,.cke_skin_kama .cke_button a:focus,.cke_skin_kama .cke_button a:active{background-color:#dff1ff;}.cke_skin_kama .cke_button a:hover.cke_on,.cke_skin_kama .cke_button a:focus.cke_on,.cke_skin_kama .cke_button a:active.cke_on{background-color:#86caff;}.cke_skin_kama .cke_hc .cke_button a:hover,.cke_skin_kama .cke_hc .cke_button a:focus,.cke_skin_kama .cke_hc .cke_button a:active{padding:0 2px!important;border-width:3px;}.cke_skin_kama .cke_button .cke_icon{background-image:url(icons.png);background-position:100px;background-repeat:no-repeat;margin-top:1px;width:16px;height:16px;display:inline-block;cursor:default;}.cke_skin_kama .cke_rtl .cke_button .cke_icon{background-image:url(icons_rtl.png);}.cke_skin_kama .cke_browser_ie .cke_button .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_skin_kama .cke_browser_ie6 .cke_button .cke_icon,.cke_skin_kama .cke_browser_ie6 .cke_rtl .cke_button .cke_icon,.cke_skin_kama .cke_browser_ie .cke_button.cke_noalphafix .cke_icon,.cke_skin_kama .cke_browser_ie .cke_rtl .cke_button.cke_noalphafix .cke_icon{filter:;}.cke_skin_kama .cke_button .cke_label{cursor:default;display:none;padding-left:3px;line-height:18px;}.cke_skin_kama .cke_hc .cke_button .cke_label{padding:0;display:inline-block;}.cke_skin_kama .cke_hc .cke_button .cke_icon{display:none;}.cke_skin_kama .cke_accessibility{position:absolute;display:block;width:0;height:0;overflow:hidden;}.cke_skin_kama .cke_button .cke_buttonarrow{display:inline-block;height:17px;width:8px;background-position:2px -1469px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-repeat:no-repeat;cursor:default;}.cke_skin_kama .cke_browser_ie .cke_button .cke_buttonarrow{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}
+.cke_skin_kama .cke_browser_ie6 .cke_button .cke_buttonarrow{filter:;}.cke_skin_kama .cke_browser_gecko .cke_toolbar,.cke_skin_kama .cke_browser_gecko .cke_button a,.cke_skin_kama .cke_browser_gecko .cke_button a.cke_off,.cke_skin_kama .cke_browser_gecko .cke_button .cke_icon,.cke_skin_kama .cke_browser_gecko .cke_button .cke_buttonarrow,.cke_skin_kama .cke_browser_gecko .cke_separator,.cke_skin_kama .cke_browser_gecko .cke_toolbar_start{display:block;float:left;}.cke_skin_kama .cke_browser_gecko.cke_hc .cke_button .cke_icon{display:none;}.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_toolbar,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button a,.cke_skin_kama .cke_browser_gecko .cke_rtl.cke_button a.cke_off,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_icon,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_buttonarrow,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_separator,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_toolbar_start{float:right;}.cke_skin_kama .cke_browser_gecko .cke_button .cke_label,.cke_skin_kama .cke_browser_gecko .cke_break{float:left;}.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_label,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_break{float:right;}.cke_skin_kama .cke_browser_webkit .cke_toolbar{float:left;}.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_toolbar{float:right;}.cke_skin_kama .cke_browser_ie .cke_button .cke_label{line-height:16px;}.cke_skin_kama .cke_browser_ie .cke_rcombo,.cke_skin_kama .cke_browser_ie .cke_rcombo *{cursor:default;}.cke_skin_kama .cke_browser_ie .cke_toolbox{padding-bottom:5px;_padding-bottom:6px;}.cke_shared .cke_skin_kama .cke_browser_ie .cke_toolbox{padding-bottom:0;}.cke_skin_kama .cke_contextmenu{padding:2px;}.cke_skin_kama .cke_menuitem a{display:block;}.cke_skin_kama .cke_menuitem span{cursor:default;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{background-color:#D3D3D3;display:block;}.cke_hc .cke_menuitem a:hover,.cke_hc .cke_menuitem a:focus,.cke_hc .cke_menuitem a:active{border:2px solid;}.cke_skin_kama .cke_menuitem .cke_icon{background-image:url(icons.png);background-position:100px;background-repeat:no-repeat;background-color:transparent;width:16px;height:16px;float:left;}.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon{background-image:url(icons_rtl.png);}.cke_browser_ie .cke_skin_kama .cke_menuitem .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie6 .cke_skin_kama .cke_menuitem .cke_icon,.cke_browser_ie .cke_skin_kama .cke_menuitem.cke_noalphafix .cke_icon{filter:;}.cke_skin_kama .cke_menuitem .cke_disabled .cke_icon{filter:alpha(opacity=70);opacity:.70;}.cke_browser_ie .cke_skin_kama .cke_menuitem .cke_disabled .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie.cke_rtl .cke_skin_kama .cke_menuitem .cke_disabled .cke_icon{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');}.cke_browser_ie6 .cke_skin_kama .cke_menuitem .cke_disabled .cke_icon,.cke_browser_ie .cke_skin_kama .cke_menuitem.cke_noalphafix .cke_disabled .cke_icon{filter:;}.cke_skin_kama .cke_menuitem .cke_icon_wrapper{background-color:#D3D3D3;border:solid 4px #D3D3D3;width:16px;height:16px;float:left;filter:alpha(opacity=70);opacity:.70;clear:both;}.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon_wrapper{float:right;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{background-color:#9d9d9d;border:solid 4px #9d9d9d;filter:alpha(opacity=70);opacity:.70;}.cke_skin_kama .cke_menuitem a:hover.cke_disabled .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus.cke_disabled .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active.cke_disabled .cke_icon_wrapper{background-color:#D3D3D3;border:solid 4px #D3D3D3;}
+.cke_skin_kama .cke_menuitem .cke_label{display:block;padding-right:3px;padding-top:5px;padding-left:4px;height:19px;margin-left:24px;background-color:#fff;}.cke_skin_kama .cke_frameLoaded .cke_menuitem .cke_label{filter:alpha(opacity=70);opacity:.70;}.cke_rtl .cke_skin_kama .cke_menuitem .cke_label{padding-right:0;margin-left:0;padding-left:3px;margin-right:28px;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_label{filter:alpha(opacity=30);opacity:.30;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{background-color:#D3D3D3;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{background-color:transparent;}.cke_skin_kama .cke_menuseparator{background-color:#D3D3D3;height:2px;filter:alpha(opacity=70);opacity:.70;_font-size:0;}.cke_skin_kama .cke_menuarrow{background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -1411px;background-repeat:no-repeat;height:5px;width:3px;float:right;margin-right:2px;margin-top:3px;}.cke_rtl .cke_skin_kama .cke_menuarrow{float:left;margin-right:0;margin-left:2px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -1390px;background-repeat:no-repeat;}.cke_skin_kama .cke_menuarrow span{display:none;}.cke_hc .cke_skin_kama .cke_menuarrow{width:auto;margin-top:0;}.cke_hc .cke_skin_kama .cke_menuarrow span{display:inline;}.cke_browser_ie.cke_ltr .cke_skin_kama .cke_menuarrow{position:absolute;right:2px;}.cke_browser_ie.cke_rtl .cke_skin_kama .cke_menuarrow{position:absolute;left:2px;}.cke_skin_kama .cke_rcombo{display:inline;}.cke_skin_kama .cke_rcombopanel{border:1px solid #8F8F73;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;height:auto;_height:100px;}.cke_skin_kama .cke_rcombo a,.cke_skin_kama .cke_rcombo a:active,.cke_skin_kama .cke_rcombo a:hover{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-repeat:repeat-x;background-position:0 -100px;border-bottom:1px solid #DAD9D9;border-right:1px solid #DAD9D9;float:left;padding:2px;height:21px;margin-right:6px;margin-bottom:5px;}.cke_skin_kama .cke_rtl .cke_rcombo a,.cke_skin_kama .cke_rtl .cke_rcombo a:active,.cke_skin_kama .cke_rtl .cke_rcombo a:hover{float:right;margin-right:0;margin-left:6px;}.cke_skin_kama .cke_hc .cke_rcombo a{filter:alpha(opacity=100);opacity:1.0;}.cke_skin_kama .cke_rcombo .cke_label{display:none;line-height:26px;vertical-align:top;margin-right:5px;filter:alpha(opacity=70);opacity:.70;}.cke_skin_kama .cke_rtl .cke_rcombo .cke_label{margin-right:0;margin-left:5px;}.cke_skin_kama .cke_rcombo .cke_inline_label{line-height:21px;font-style:italic;color:#666;}.cke_skin_kama .cke_hc .cke_rcombo .cke_openbutton{vertical-align:top;}.cke_skin_kama .cke_hc .cke_rcombo .cke_label{filter:alpha(opacity=100);opacity:1.0;}.cke_skin_kama .cke_rcombo .cke_text{filter:alpha(opacity=70);opacity:.70;height:21px;line-height:21px;width:60px;text-overflow:ellipsis;overflow:hidden;display:inline-block;margin:0 2px 0 4px;cursor:default;}.cke_skin_kama .cke_rtl .cke_rcombo .cke_text{margin:0 4px 0 2px;}.cke_skin_kama .cke_rcombo .cke_openbutton{display:inline-block;}.cke_skin_kama .cke_rcombo .cke_openbutton .cke_icon{display:inline-block;background-image:url(images/sprites.png);_background-image:url(images/sprites_ie6.png);background-position:0 -68px;background-repeat:no-repeat;width:17px;height:19px;margin:1px 2px;}.cke_skin_kama .cke_hc .cke_rcombo .cke_openbutton .cke_icon{background:none;}.cke_skin_kama .cke_browser_iequirks .cke_rcombo .cke_openbutton{margin-bottom:0;}.cke_skin_kama .cke_rcombo .cke_off a:hover .cke_text,.cke_skin_kama .cke_rcombo .cke_off a:focus .cke_text,.cke_skin_kama .cke_rcombo .cke_off a:active .cke_text,.cke_skin_kama .cke_rcombo .cke_on .cke_text{border-color:#316ac5;filter:alpha(opacity=100);opacity:1;}
+.cke_skin_kama .cke_rcombo .cke_off a:hover .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:focus .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:active .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_on .cke_openbutton{border-color:#316ac5;background-color:#dff1ff;}.cke_skin_kama .cke_rcombo .cke_on .cke_text{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;}.cke_skin_kama .cke_rcombo .cke_on .cke_openbutton{-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;}.cke_skin_kama .cke_rcombo .cke_disabled .cke_label{filter:alpha(opacity=30);opacity:.3;}.cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_label{filter:alpha(opacity=70);opacity:.7;}.cke_skin_kama .cke_rcombo .cke_disabled .cke_text,.cke_skin_kama .cke_rcombo .cke_disabled .cke_openbutton{filter:alpha(opacity=50);opacity:.5;}.cke_skin_kama .cke_browser_ie .cke_rcombo .cke_disabled .cke_openbutton{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=50);}.cke_skin_kama .cke_browser_ie6 .cke_rcombo .cke_disabled .cke_openbutton{filter:alpha(opacity=50);}.cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_text,.cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_openbutton{filter:alpha(opacity=80);opacity:.8;}.cke_skin_kama .cke_rcombo .cke_disabled .cke_text{color:#fff;}.cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_openbutton,.cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_openbutton{display:block;float:left;}.cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_label,.cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_label{float:left;}.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_label,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_openbutton,.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_label,.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_openbutton{float:right;}.cke_skin_kama .cke_browser_ie7 .cke_rcombo .cke_text{line-height:18px;}.cke_skin_kama .cke_browser_ie6 .cke_rcombo .cke_text,.cke_skin_kama .cke_browser_iequirks .cke_rcombo .cke_text{height:auto;line-height:17px;}.cke_skin_kama .cke_rtl .cke_rcombo .cke_font .cke_text,.cke_skin_kama .cke_rtl .cke_rcombo .cke_fontSize .cke_text{direction:ltr;}@media print{.cke_path{display:none;}}.cke_skin_kama .cke_path{display:inline-block;float:left;margin-top:5px;}.cke_skin_kama .cke_rtl .cke_path{float:right;}.cke_shared .cke_skin_kama .cke_path{_width:100%;margin:0 0 5px;}.cke_skin_kama .cke_path a,.cke_skin_kama .cke_path .cke_empty{display:inline-block;float:left;padding:1px 4px 0;color:#60676a;cursor:default;}.cke_skin_kama .cke_path .cke_empty{visibility:hidden;}.cke_skin_kama .cke_rtl .cke_path a,.cke_skin_kama .cke_rtl .cke_path cke_empty{float:right;}.cke_skin_kama .cke_path a:hover,.cke_skin_kama .cke_path a:focus,.cke_skin_kama .cke_path a:active{background-color:#dff1ff;padding:1px 4px 0;outline:none;color:#000;}.cke_skin_kama .cke_browser_ie .cke_rtl .cke_path a,.cke_skin_kama .cke_browser_ie .cke_rtl .cke_path .cke_empty{float:none;}.cke_skin_kama .cke_path .cke_label{display:none;}.cke_skin_kama .cke_button_source .cke_icon{background-position:0 0;}.cke_skin_kama .cke_button_docProps .cke_icon{background-position:0 -16px;}.cke_skin_kama .cke_button_newpage .cke_icon{background-position:0 -48px;}.cke_skin_kama .cke_button_preview .cke_icon{background-position:0 -64px;}.cke_skin_kama .cke_button_cut .cke_icon{background-position:0 -96px;}.cke_skin_kama .cke_button_copy .cke_icon{background-position:0 -112px;}.cke_skin_kama .cke_button_paste .cke_icon{background-position:0 -128px;}.cke_skin_kama .cke_button_pastetext .cke_icon{background-position:0 -144px;}.cke_skin_kama .cke_button_find .cke_icon{background-position:0 -240px;}.cke_skin_kama .cke_button_replace .cke_icon{background-position:0 -256px;}
+.cke_skin_kama .cke_button_selectAll .cke_icon{background-position:0 -272px;}.cke_skin_kama .cke_button_removeFormat .cke_icon{background-position:0 -288px;}.cke_skin_kama .cke_button_bold .cke_icon{background-position:0 -304px;}.cke_skin_kama .cke_button_italic .cke_icon{background-position:0 -320px;}.cke_skin_kama .cke_button_underline .cke_icon{background-position:0 -336px;}.cke_skin_kama .cke_button_strike .cke_icon{background-position:0 -352px;}.cke_skin_kama .cke_button_subscript .cke_icon{background-position:0 -368px;}.cke_skin_kama .cke_button_superscript .cke_icon{background-position:0 -384px;}.cke_skin_kama .cke_button_table .cke_icon{background-position:0 -608px;}.cke_skin_kama .cke_button_horizontalrule .cke_icon{background-position:0 -624px;}.cke_skin_kama .cke_button_smiley .cke_icon{background-position:0 -640px;}.cke_skin_kama .cke_button_link .cke_icon{background-position:0 -528px;}.cke_skin_kama .cke_button_unlink .cke_icon{background-position:0 -544px;}.cke_skin_kama .cke_button_anchor .cke_icon{background-position:0 -560px;}.cke_skin_kama .cke_button_image .cke_icon{background-position:0 -576px;}.cke_skin_kama .cke_button_flash .cke_icon{background-position:0 -592px;}.cke_skin_kama .cke_button_specialchar .cke_icon{background-position:0 -656px;}.cke_skin_kama .cke_button_pagebreak .cke_icon{background-position:0 -672px;}.cke_skin_kama .cke_button_print .cke_icon{background-position:0 -176px;}.cke_skin_kama .cke_button_checkspell .cke_icon,.cke_skin_kama .cke_button_scayt .cke_icon{background-position:0 -192px;}.cke_skin_kama .cke_button_pagebreak .cke_icon{background-position:0 -672px;}.cke_skin_kama .cke_button_textcolor .cke_icon{background-position:0 -704px;}.cke_skin_kama .cke_button_bgcolor .cke_icon{background-position:0 -720px;}.cke_skin_kama .cke_button_form .cke_icon{background-position:0 -752px;}.cke_skin_kama .cke_button_checkbox .cke_icon{background-position:0 -768px;}.cke_skin_kama .cke_button_radio .cke_icon{background-position:0 -784px;}.cke_skin_kama .cke_button_textfield .cke_icon{background-position:0 -800px;}.cke_skin_kama .cke_button_textarea .cke_icon{background-position:0 -816px;}.cke_skin_kama .cke_button_showblocks .cke_icon{background-position:0 -1136px;}.cke_skin_kama .cke_button_select .cke_icon{background-position:0 -832px;}.cke_skin_kama .cke_button_button .cke_icon{background-position:0 -848px;}.cke_skin_kama .cke_button_imagebutton .cke_icon{background-position:0 -864px;}.cke_skin_kama .cke_button_hiddenfield .cke_icon{background-position:0 -880px;}.cke_skin_kama .cke_button_undo .cke_icon{background-position:0 -208px;}.cke_skin_kama .cke_rtl .cke_button_undo .cke_icon{background-position:0 -224px;}.cke_skin_kama .cke_button_redo .cke_icon{background-position:0 -224px;}.cke_skin_kama .cke_rtl .cke_button_redo .cke_icon{background-position:0 -208px;}.cke_skin_kama .cke_button_templates .cke_icon{background-position:0 -80px;}.cke_skin_kama .cke_button_numberedlist .cke_icon{background-position:0 -400px;}.cke_skin_kama .cke_button_bulletedlist .cke_icon{background-position:0 -416px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_numberedlist .cke_icon{background-position:0 -1217px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_bulletedlist .cke_icon{background-position:0 -1233px;}.cke_skin_kama .cke_button_outdent .cke_icon{background-position:0 -432px;}.cke_skin_kama .cke_button_indent .cke_icon{background-position:0 -448px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_indent .cke_icon{background-position:0 -1265px;}.cke_skin_kama .cke_mixed_dir_content .cke_button_outdent .cke_icon{background-position:0 -1249px;}.cke_skin_kama .cke_button_justifyleft .cke_icon{background-position:0 -464px;}.cke_skin_kama .cke_button_justifycenter .cke_icon{background-position:0 -480px;}.cke_skin_kama .cke_button_justifyright .cke_icon{background-position:0 -496px;}.cke_skin_kama .cke_button_justifyblock .cke_icon{background-position:0 -512px;}.cke_skin_kama .cke_button_blockquote .cke_icon{background-position:0 -1152px;}.cke_skin_kama .cke_button_creatediv .cke_icon{background-position:0 -1168px;}
+.cke_skin_kama .cke_button_editdiv .cke_icon{background-position:0 -1184px;}.cke_skin_kama .cke_button_removediv .cke_icon{background-position:0 -1200px;}.cke_skin_kama .cke_button_flash .cke_icon{background-position:0 -592px;}.cke_skin_kama .cke_button_pastefromword .cke_icon{background-position:0 -160px;}.cke_skin_kama .cke_button_save .cke_icon{background-position:0 -32px;}.cke_skin_kama .cke_button_about .cke_icon{background-position:0 -736px;}.cke_skin_kama .cke_button_maximize .cke_icon{background-position:0 -1040px;}.cke_skin_kama .cke_button_editdiv .cke_icon{background-position:0 -1184px;}.cke_skin_kama .cke_button_bidirtl .cke_icon{background-position:0 -1072px;}.cke_skin_kama .cke_button_bidiltr .cke_icon{background-position:0 -1056px;}.cke_skin_kama .cke_button_iframe .cke_icon{background-position:0 -1279px;}.cke_skin_kama .cke_button_source .cke_label{display:inline;}.cke_skin_kama .cke_styles_panel{width:150px;height:170px;}.cke_skin_kama .cke_format_panel{width:150px;height:170px;}.cke_skin_kama .cke_font_panel{width:150px;height:170px;}.cke_skin_kama .cke_fontSize_panel{height:170px;}.cke_skin_kama .cke_fontSize .cke_text{width:25px;}.cke_skin_kama .cke_browser_iequirks .cke_fontSize .cke_text{width:32px;}html .cke_skin_kama{visibility:inherit;}html.cke_skin_kama_container{visibility:visible;}
diff --git a/appsrc/ODS-Framework/ckeditor/skins/kama/skin.js b/appsrc/ODS-Framework/ckeditor/skins/kama/skin.js
index 19c7473..2cf60f2 100644
--- a/appsrc/ODS-Framework/ckeditor/skins/kama/skin.js
+++ b/appsrc/ODS-Framework/ckeditor/skins/kama/skin.js
@@ -3,5 +3,5 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.skins.add('kama',(function(){var a='cke_ui_color';return{editor:{css:['editor.css']},dialog:{css:['dialog.css']},templates:{css:['templates.css']},margins:[0,0,0,0],init:function(b){if(b.config.width&&!isNaN(b.config.width))b.config.width-=12;var c=[],d=/\$color/g,e='/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}';if(CKEDITOR.env.webkit){e=e.split('}').slice(0,-1);for(var f=0;f<e.length;f++)e[f]=e[f].split('{');}function g(j){var k=j.getById(a);if(!k){k=j.getHead().append('style');k.setAttribute('id',a);k.setAttribute('type','text/css');}return k;};function h(j,k,l){var m,n,o;for(var p=0;p<j.length;p++){if(CKEDITOR.env.webkit)for(n=0;n<k.length;n++){o=k[n][1];for(m=0;m<l.length;m++)o=o.replace(l[m][0],l[m][1]);j[p].$.sheet.addRule(k[n][0],o);}else{o=k;for(m=0;m<l.length;m++)o=o.replace(l[m][0],l[m][1]);if(CKEDITOR.env.ie)j[p].$.styleSheet.cssText+=o;else j[p].$.innerHTML+=o;}}};var i=/\$color/g;CKEDITOR.tools.extend(b,{uiColor:null,getUiColor:function(){return this.uiColor;},setUiColor:function(j){var k,l=g(CKEDITOR.document),m='.'+b.id,n=[m+' .cke_wrapper',m+'_dialog .cke_dialog_contents',m+'_dialog a.cke_dialog_tab',m+'_dialog .cke_dialog_footer'].join(','),o='background-color: $color !important;';
+CKEDITOR.skins.add('kama',(function(){var a='cke_ui_color';return{editor:{css:['editor.css']},dialog:{css:['dialog.css']},richcombo:{canGroup:false},templates:{css:['templates.css']},margins:[0,0,0,0],init:function(b){if(b.config.width&&!isNaN(b.config.width))b.config.width-=12;var c=[],d=/\$color/g,e='/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}';if(CKEDITOR.env.webkit){e=e.split('}').slice(0,-1);for(var f=0;f<e.length;f++)e[f]=e[f].split('{');}function g(j){var k=j.getById(a);if(!k){k=j.getHead().append('style');k.setAttribute('id',a);k.setAttribute('type','text/css');}return k;};function h(j,k,l){var m,n,o;for(var p=0;p<j.length;p++){if(CKEDITOR.env.webkit)for(n=0;n<k.length;n++){o=k[n][1];for(m=0;m<l.length;m++)o=o.replace(l[m][0],l[m][1]);j[p].$.sheet.addRule(k[n][0],o);}else{o=k;for(m=0;m<l.length;m++)o=o.replace(l[m][0],l[m][1]);if(CKEDITOR.env.ie)j[p].$.styleSheet.cssText+=o;else j[p].$.innerHTML+=o;}}};var i=/\$color/g;CKEDITOR.tools.extend(b,{uiColor:null,getUiColor:function(){return this.uiColor;},setUiColor:function(j){var k,l=g(CKEDITOR.document),m='.'+b.id,n=[m+' .cke_wrapper',m+'_dialog .cke_dialog_contents',m+'_dialog a.cke_dialog_tab',m+'_dialog .cke_dialog_footer'].join(','),o='background-color: $color !important;';
 if(CKEDITOR.env.webkit)k=[[n,o]];else k=n+'{'+o+'}';return(this.setUiColor=function(p){var q=[[i,p]];b.uiColor=p;h([l],k,q);h(c,e,q);})(j);}});b.on('menuShow',function(j){var k=j.data[0],l=k.element.getElementsByTag('iframe').getItem(0).getFrameDocument();if(!l.getById('cke_ui_color')){var m=g(l);c.push(m);var n=b.getUiColor();if(n)h([m],e,[[i,n]]);}});if(b.config.uiColor)b.setUiColor(b.config.uiColor);}};})());(function(){CKEDITOR.dialog?a():CKEDITOR.on('dialogPluginReady',a);function a(){CKEDITOR.dialog.on('resize',function(b){var c=b.data,d=c.width,e=c.height,f=c.dialog,g=f.parts.contents;if(c.skin!='kama')return;g.setStyles({width:d+'px',height:e+'px'});});};})();
diff --git a/appsrc/ODS-Framework/ckeditor/themes/default/theme.js b/appsrc/ODS-Framework/ckeditor/themes/default/theme.js
index 171fb00..9feddfe 100644
--- a/appsrc/ODS-Framework/ckeditor/themes/default/theme.js
+++ b/appsrc/ODS-Framework/ckeditor/themes/default/theme.js
@@ -3,6 +3,6 @@ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-CKEDITOR.themes.add('default',(function(){function a(b,c){var d,e;e=b.config.sharedSpaces;e=e&&e[c];e=e&&CKEDITOR.document.getById(e);if(e){var f='<span class="cke_shared " dir="'+b.lang.dir+'"'+'>'+'<span class="'+b.skinClass+' '+b.id+' cke_editor_'+b.name+'">'+'<span class="'+CKEDITOR.env.cssClass+'">'+'<span class="cke_wrapper cke_'+b.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+c+'">'+'</div></span></span></span></span></span>',g=e.append(CKEDITOR.dom.element.createFromHtml(f,e.getDocument()));if(e.getCustomData('cke_hasshared'))g.hide();else e.setCustomData('cke_hasshared',1);d=g.getChild([0,0,0,0]);!b.sharedSpaces&&(b.sharedSpaces={});b.sharedSpaces[c]=d;b.on('focus',function(){for(var h=0,i,j=e.getChildren();i=j.getItem(h);h++){if(i.type==CKEDITOR.NODE_ELEMENT&&!i.equals(g)&&i.hasClass('cke_shared'))i.hide();}g.show();});b.on('destroy',function(){g.remove();});}return d;};return{build:function(b,c){var d=b.name,e=b.element,f=b.elementMode;if(!e||f==CKEDITOR.ELEMENT_MODE_NONE)return;if(f==CKEDITOR.ELEMENT_MODE_REPLACE)e.hide();var g=b.fire('themeSpace',{space:'top',html:''}).html,h=b.fire('themeSpace',{space:'contents',html:''}).html,i=b.fireOnce('themeSpace',{space:'bottom',html:''}).html,j=h&&b.config.height,k=b.config.tabIndex||b.element.getAttribute('tabindex')||0;if(!h)j='auto';else if(!isNaN(j))j+='px';var l='',m=b.config.width;if(m){if(!isNaN(m))m+='px';l+='width: '+m+';';}var n=g&&a(b,'top'),o=a(b,'bottom');n&&(n.setHtml(g),g='');o&&(o.setHtml(i),i='');var p=CKEDITOR.dom.element.createFromHtml(['<span id="cke_',d,'" class="',b.skinClass,' ',b.id,' cke_editor_',d,'" dir="',b.lang.dir,'" title="',CKEDITOR.env.gecko?' ':'','" lang="',b.langCode,'"'+(CKEDITOR.env.webkit?' tabindex="'+k+'"':'')+' role="application"'+' aria-labelledby="cke_',d,'_arialbl"'+(l?' style="'+l+'"':'')+'>'+'<span id="cke_',d,'_arialbl" class="cke_voice_label">'+b.lang.editor+'</span>'+'<span class="',CKEDITOR.env.cssClass,'" role="presentation"><span class="cke_wrapper cke_',b.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',g?'':' style="display:none"',' role="presentation"><td id="cke_top_',d,'" class="cke_top" role="presentation">',g,'</td></tr><tr',h?'':' style="display:none"',' role="presentation"><td id="cke_contents_',d,'" class="cke_contents" style="height:',j,'" role="presentation">',h,'</td></tr><tr',i?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',d,'" class="cke_bottom" role="presentation">',i,'</td></tr></tbody></table><style>.',b.skinClass,'{visibility:hidden;}</style></span></span></span>'].join(''));
-p.getChild([1,0,0,0,0]).unselectable();p.getChild([1,0,0,0,2]).unselectable();if(f==CKEDITOR.ELEMENT_MODE_REPLACE)p.insertAfter(e);else e.append(p);b.container=p;p.disableContextMenu();b.fireOnce('themeLoaded');b.fireOnce('uiReady');},buildDialog:function(b){var c=CKEDITOR.tools.getNextNumber(),d=CKEDITOR.dom.element.createFromHtml(['<div class="',b.id,'_dialog cke_editor_',b.name.replace('.','\\.'),'_dialog cke_skin_',b.skinName,'" dir="',b.lang.dir,'" lang="',b.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+CKEDITOR.env.cssClass,' cke_',b.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+b.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',CKEDITOR.env.ie?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+c).replace(/%/g,'cke_dialog_')),e=d.getChild([0,0,0,0,0]),f=e.getChild(0),g=e.getChild(1);f.unselectable();g.unselectable();return{element:d,parts:{dialog:d.getChild(0),title:f,close:g,tabs:e.getChild(2),contents:e.getChild([3,0,0,0]),footer:e.getChild([3,0,1,0])}};},destroy:function(b){var c=b.container,d=b.element;if(c){c.clearCustomData();c.remove();}if(d){d.clearCustomData();b.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&d.show();delete b.element;}}};})());CKEDITOR.editor.prototype.getThemeSpace=function(a){var b='cke_'+a,c=this._[b]||(this._[b]=CKEDITOR.document.getById(b+'_'+this.name));return c;};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var e=this.container,f=CKEDITOR.document.getById('cke_contents_'+this.name),g=d?e.getChild(1):e;CKEDITOR.env.webkit&&g.setStyle('display','none');g.setSize('width',a,true);if(CKEDITOR.env.webkit){g.$.offsetWidth;g.setStyle('display','');
-}var h=c?0:(g.$.offsetHeight||0)-(f.$.clientHeight||0);f.setStyle('height',Math.max(b-h,0)+'px');this.fire('resize');};CKEDITOR.editor.prototype.getResizable=function(){return this.container;};
+CKEDITOR.themes.add('default',(function(){var a={};function b(c,d){var e,f;f=c.config.sharedSpaces;f=f&&f[d];f=f&&CKEDITOR.document.getById(f);if(f){var g='<span class="cke_shared " dir="'+c.lang.dir+'"'+'>'+'<span class="'+c.skinClass+' '+c.id+' cke_editor_'+c.name+'">'+'<span class="'+CKEDITOR.env.cssClass+'">'+'<span class="cke_wrapper cke_'+c.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+d+'">'+'</div></span></span></span></span></span>',h=f.append(CKEDITOR.dom.element.createFromHtml(g,f.getDocument()));if(f.getCustomData('cke_hasshared'))h.hide();else f.setCustomData('cke_hasshared',1);e=h.getChild([0,0,0,0]);!c.sharedSpaces&&(c.sharedSpaces={});c.sharedSpaces[d]=e;c.on('focus',function(){for(var i=0,j,k=f.getChildren();j=k.getItem(i);i++){if(j.type==CKEDITOR.NODE_ELEMENT&&!j.equals(h)&&j.hasClass('cke_shared'))j.hide();}h.show();});c.on('destroy',function(){h.remove();});}return e;};return{build:function(c,d){var e=c.name,f=c.element,g=c.elementMode;if(!f||g==CKEDITOR.ELEMENT_MODE_NONE)return;if(g==CKEDITOR.ELEMENT_MODE_REPLACE)f.hide();var h=c.fire('themeSpace',{space:'top',html:''}).html,i=c.fire('themeSpace',{space:'contents',html:''}).html,j=c.fireOnce('themeSpace',{space:'bottom',html:''}).html,k=i&&c.config.height,l=c.config.tabIndex||c.element.getAttribute('tabindex')||0;if(!i)k='auto';else if(!isNaN(k))k+='px';var m='',n=c.config.width;if(n){if(!isNaN(n))n+='px';m+='width: '+n+';';}var o=h&&b(c,'top'),p=b(c,'bottom');o&&(o.setHtml(h),h='');p&&(p.setHtml(j),j='');var q='<style>.'+c.skinClass+'{visibility:hidden;}</style>';if(a[c.skinClass])q='';else a[c.skinClass]=1;var r=CKEDITOR.dom.element.createFromHtml(['<span id="cke_',e,'" class="',c.skinClass,' ',c.id,' cke_editor_',e,'" dir="',c.lang.dir,'" title="',CKEDITOR.env.gecko?' ':'','" lang="',c.langCode,'"'+(CKEDITOR.env.webkit?' tabindex="'+l+'"':'')+' role="application"'+' aria-labelledby="cke_',e,'_arialbl"'+(m?' style="'+m+'"':'')+'>'+'<span id="cke_',e,'_arialbl" class="cke_voice_label">'+c.lang.editor+'</span>'+'<span class="',CKEDITOR.env.cssClass,'" role="presentation"><span class="cke_wrapper cke_',c.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',h?'':' style="display:none"',' role="presentation"><td id="cke_top_',e,'" class="cke_top" role="presentation">',h,'</td></tr><tr',i?'':' style="display:none"',' role="presentation"><td id="cke_contents_',e,'" class="cke_contents" style="height:',k,'" role="presentation">',i,'</td></tr><tr',j?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',e,'" class="cke_bottom" role="presentation">',j,'</td></tr></tbody></table>'+q+'</span>'+'</span>'+'</span>'].join(''));
+r.getChild([1,0,0,0,0]).unselectable();r.getChild([1,0,0,0,2]).unselectable();if(g==CKEDITOR.ELEMENT_MODE_REPLACE)r.insertAfter(f);else f.append(r);c.container=r;r.disableContextMenu();c.on('contentDirChanged',function(s){var t=(c.lang.dir!=s.data?'add':'remove')+'Class';r.getChild(1)[t]('cke_mixed_dir_content');var u=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];u&&u.getParent().getParent()[t]('cke_mixed_dir_content');});c.fireOnce('themeLoaded');c.fireOnce('uiReady');},buildDialog:function(c){var d=CKEDITOR.tools.getNextNumber(),e=CKEDITOR.dom.element.createFromHtml(['<div class="',c.id,'_dialog cke_editor_',c.name.replace('.','\\.'),'_dialog cke_skin_',c.skinName,'" dir="',c.lang.dir,'" lang="',c.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+CKEDITOR.env.cssClass,' cke_',c.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+c.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',CKEDITOR.env.ie?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+d).replace(/%/g,'cke_dialog_')),f=e.getChild([0,0,0,0,0]),g=f.getChild(0),h=f.getChild(1);g.unselectable();h.unselectable();return{element:e,parts:{dialog:e.getChild(0),title:g,close:h,tabs:f.getChild(2),contents:f.getChild([3,0,0,0]),footer:f.getChild([3,0,1,0])}};},destroy:function(c){var d=c.container,e=c.element;if(d){d.clearCustomData();d.remove();}if(e){e.clearCustomData();c.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&e.show();delete c.element;}}};})());CKEDITOR.editor.prototype.getThemeSpace=function(a){var b='cke_'+a,c=this._[b]||(this._[b]=CKEDITOR.document.getById(b+'_'+this.name));return c;};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var e=this.container,f=CKEDITOR.document.getById('cke_contents_'+this.name),g=d?e.getChild(1):e;
+CKEDITOR.env.webkit&&g.setStyle('display','none');g.setSize('width',a,true);if(CKEDITOR.env.webkit){g.$.offsetWidth;g.setStyle('display','');}var h=c?0:(g.$.offsetHeight||0)-(f.$.clientHeight||0);f.setStyle('height',Math.max(b-h,0)+'px');this.fire('resize');};CKEDITOR.editor.prototype.getResizable=function(a){return a?CKEDITOR.document.getById('cke_contents_'+this.name):this.container;};
diff --git a/appsrc/ODS-Framework/common.css b/appsrc/ODS-Framework/common.css
new file mode 100644
index 0000000..eecc5ba
--- /dev/null
+++ b/appsrc/ODS-Framework/common.css
@@ -0,0 +1,357 @@
+/*
+ *  $Id: common.css,v 1.1.4.9 2012/03/08 10:46:17 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+/* Footer */
+#FT {
+  width: 100%;
+  position: relative;
+  bottom: 0px;
+  font-size: 8pt;
+  float: left;
+  clear: both;
+  text-align: right;
+  border-top: 2px solid #fff;
+  margin-right: 10px;
+  background-color: #fff;
+  background-image: url(/ods/images/ods_main_footer.png);
+}
+
+#FT_L {
+  float: left;
+  clear: left;
+  margin-top: 10px;
+  margin-left: 8px;
+  border: 1px solid #788;
+}
+
+#FT_R {
+  float: right;
+  clear: right;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  margin-right: 5px;
+  color: #788;
+}
+
+#FT_R a {
+  text-decoration: none;
+  color: inherit;
+}
+
+/* ODS grids */
+table.ODS_grid {
+  width: 100%;
+  background-color: white;
+  border: solid #7f94a5;
+  border-width: 1px 1px 1px 1px;
+  border-spacing: 0;
+}
+
+table.ODS_grid thead tr {
+  background-color: #b0cde4;
+}
+
+table.ODS_grid tbody tr:nth-child(odd) {
+  background-color:#fff;
+}
+
+table.ODS_grid tbody tr:nth-child(even) {
+  background-color:#f0f0f0;
+}
+
+table.ODS_grid thead tr th {
+  height: 20px;
+  text-align: left !important;
+  white-space: nowrap;
+  padding: 0px 2px 1px 2px !important;
+  border: solid #7f94a5;
+  border-width: 0px 1px 1px 0px;
+  background-image: url(/ods/images/stl_blu1_grad.gif);
+  background-repeat: repeat-x;
+}
+
+table.ODS_grid thead tr th[onclick] {
+  cursor: pointer;
+}
+
+table.ODS_grid thead tr th:last-child {
+  border-width: 0px 0px 1px 0px;
+}
+
+
+table.ODS_grid tbody tr.selected {
+  background-color: #FFFFCC;
+}
+
+table.ODS_grid th.checkbox, table.ODS_grid td.checkbox {
+  width: 1px;
+  text-align: center;
+  margin: 0;
+  padding: 0.5px;
+}
+
+table.ODS_grid th.action, table.ODS_grid td.action {
+  width: 1px;
+  white-space: nowrap;
+}
+
+table.ODS_grid tbody tr:hover {
+ 	background-color: #eec;
+}
+
+table.ODS_grid td {
+  vertical-align: top;
+  padding: 2px 3px;
+}
+
+table.ODS_grid tfoot td {
+  padding: 2px 3px 3px 3px;
+  border: solid #7f94a5;
+  border-width: 1px 0px 0px 0px;
+}
+
+/* Annotation grids */
+table.ANN_grid {
+  width: 100%;
+  border-width: 0px;
+  border-spacing: 0;
+}
+
+table.ANN_grid tr td {
+  border-bottom: 1px solid #ccc;
+}
+
+/* Navigation buttons */
+.navi-button {
+  font-size: .8em;
+  font-family: verdana, sans-serif;
+  color: #ffffff;
+  font-weight: bold;
+  text-decoration: none;
+  margin-right: 2px;
+  padding: 0.1em 0.3em 0.1em 0.3em ;
+  border: solid 1px;
+  border-color: #7f94a5;
+  background: #99b3c5;
+	cursor: pointer;
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+}
+
+.navi-button:hover {
+  text-decoration: none;
+}
+
+/* Popup Calendar */
+.calendar {
+	border: 1px solid #000;
+	background-color: #FFF;
+  z-index: 101;
+}
+
+.calendar_year, .calendar_month {
+	text-align: center;
+	border-bottom: 1px solid #aaa;
+	padding: 2px 0px;
+}
+
+.calendar table {
+	margin-top: 2px;
+}
+
+.calendar thead {
+	font-weight: bold;
+}
+
+.calendar thead td {
+	padding: 0px 2px;
+}
+
+.calendar td {
+	font-size: 75%;
+	text-align: center;
+}
+
+td.calendar_selected {
+	background-color: #faa;
+}
+
+.calendar_special {
+	color: #c55;
+}
+
+/* ComboList */
+.combo_list_list {
+  background-color: white;
+  border: 1px solid black;
+  padding: 5px 10px 5px 10px;
+  height: 100px;
+  overflow: auto;
+}
+
+.combo_list_option:hover {
+  background-color: #99b3c5;
+  color: white;
+}
+
+.oat_winrect_container {
+  -moz-border-radius: 5px;
+  -webkit-border-radius: 5px;
+}
+
+.oat_winrect_title {
+  background-image: url(/ods/images/stl_blu1_grad.gif);
+  background-repeat: repeat-x;
+}
+
+.app_item:hover {
+ 	background-color: #eec;
+}
+
+/* Tabs */
+div.ODS_tabMain {
+  width: 100%;
+}
+
+div.ODS_tabs {
+  top: 0px;
+  font-size: 100%;
+  padding: 0px 0px 3px 0px;
+}
+
+div.ODS_tabContents {
+  padding: 0.5em;
+  border: 1px solid #7f94a5;
+  background-color: #EFEFEF;
+}
+
+div.ODS_tabContent {
+  border: 0px;
+  font-size: 1em;
+  padding: 6px;
+}
+
+div.ODS_tabLabel {
+  cursor: pointer;
+  display: inline;
+  font-weight: bold;
+  background-color: #b0cde4;
+  border: 1px solid #000;
+  border-bottom-width: 0px;
+  border-color: #7f94a5;
+  -moz-border-radius-topleft: 3px;
+  -moz-border-radius-topright: 3px;
+  -webkit-border-top-left-radius: 3px;
+  -webkit-border-top-right-radius: 3px;
+  padding: 2px 10px 2px 10px;
+  margin-right: 3px;
+  position: relative;
+  text-decoration: none;
+  top: 2px;
+  z-index: 100;
+}
+
+div.ODS_tabLabelActive {
+  background-color: #EFEFEF;
+  border-color: #7f94a5;
+}
+
+/* Forms */
+.ODS_formHeader
+{
+  font-size: 13px;
+  font-weight: bold;
+  margin: 0 0 8px 0;
+  padding: 0px 0px 3px 4px;
+  border: solid #7f94a5;
+  border-width: 1px 1px 1px 10px;
+  background-color: #B0CDE4;
+}
+
+.ODS_formFooter
+{
+  margin: 6px 0px;
+  text-align: center;
+  border: solid 1px #7f94a5;
+  background-color: #B0CDE4;
+  height: 20px;
+  padding-top: 0px;
+  padding-bottom: 2px;
+}
+
+.ODS_formBody {
+  font-size: 1em;
+  padding: 6px;
+  border: solid #7f94a5;
+  border-width: 1px 1px 1px 1px;
+  background-color: #EFEFEF;
+}
+
+.ODS_formBody table {
+  width: 100%;
+  background-color: #EFEFEF;
+}
+
+.ODS_formBody table td {
+  padding: 2px;
+}
+
+.ODS_formBody table th {
+  text-align: right;
+  white-space: nowrap;
+  padding: 2px 4px 2px 4px;
+}
+
+.ODS_formList {
+  width: 100%;
+  border: solid #7f94a5;
+  border-width: 1px 1px 1px 1px;
+  background-color: #fff;
+}
+
+.ODS_formList tr th {
+  text-align: center;
+  white-space: nowrap;
+  font-size: 1em;
+  font-weight: bold;
+  padding: 2px 4px 2px 4px;
+  border: solid #7f94a5;
+  background-color: #b0cde4;
+  border-width: 0px 1px 1px 0px;
+}
+
+.ODS_formList th:last-child {
+  border-width: 0px 0px 1px 0px;
+}
+
+.ODS_formList td {
+  border: solid #7f94a5;
+  border-width: 0px 0px 0px 0px;
+  padding: 2px 4px 2px 4px;
+  background-color: #FFF;
+}
+
+/* OAT patches */
+div.oat_winms_close_b {
+  background-image: url("/ods/images/oat/MsWin_close.png");
+}
\ No newline at end of file
diff --git a/appsrc/ODS-Framework/common.js b/appsrc/ODS-Framework/common.js
index 11e8ea4..1a80cfe 100644
--- a/appsrc/ODS-Framework/common.js
+++ b/appsrc/ODS-Framework/common.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: common.js,v 1.13.2.40 2011/03/26 14:22:25 source Exp $
+ *  $Id: common.js,v 1.13.2.45 2012/03/08 10:46:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -26,35 +26,42 @@ function showError(msg) {
   return false;
 }
 
-function toggleControl (ctr1, val, ctr2)
-{
-  if (ctr2 == null)
-    return;
-
-  if (ctr1 && ctr1.value == val)
-    {
-      ctr2.disabled = true;
+function findParent(obj, tag) {
+  var obj = obj.parentNode;
+  if (obj.tagName.toLowerCase() == tag)
+    return obj;
+  return findParent(obj, tag);
     }
-  else
+
+function odsPost(obj, fields, button) {
+  var form = findParent (obj, 'form');
+  for (var i = 0; i < fields.length; i += 2)
+    hiddenCreate(fields[i], form, fields[i+1]);
+
+  if (button) {
+    doPost(form.name, button);
+  } else {
+    form.submit();
+  }
+}
+
+function toggleControl (ctr1, val, ctr2)
     {
-      ctr2.disabled = false;
-    }
+  if (ctr2 != null)
+    ctr2.disabled = (ctr1 && ctr1.value == val);
 }
 
 function setSelectLists (val, form, pref)
 {
-  var i;
   if (val == 0 || form == null || pref == null)
     return;
-  for (i = 0; i < form.elements.length; i++)
+  for (var i = 0; i < form.elements.length; i++)
     {
       var contr = form.elements[i];
       if (contr != null && contr.type == 'select-one' && contr.name.indexOf (pref) != -1)
-        {
           contr.value = val;
         }
     }
-}
 
 function dateFormat(date, format)
 {
@@ -308,6 +315,18 @@ function divs_switch ( showhide, divname_a, divname_b)
   }
 }
 
+function readCookie(name) {
+	var cookies = document.cookie.split(';');
+
+	for ( var i = 0; i < cookies.length; i++) {
+		cookies[i] = cookies[i].trim();
+
+		if (cookies[i].indexOf(name + '=') == 0)
+			return cookies[i].substring (name.length + 1, cookies[i].length);
+	}
+	return false;
+}
+
 function windowShow(sPage, width, height)
 {
   if (width == null)
@@ -488,6 +507,7 @@ function updateGeodata(mode)
 
 function initLoadProfile()
 {
+  def_btn = null;
   if (top.location == self.location)
     return true;
   parent.nav.showUserProfile();
@@ -550,8 +570,28 @@ function pageFocus(tab) {
   }
 }
 
+function accountDisable(userName)
+{
+  var S = '/ods/api/user.disable?name='+encodeURIComponent($v(userName))
+        + '&sid=' + document.forms[0].elements['sid'].value
+        + '&realm=' + document.forms[0].elements['realm'].value;
+	var x = function(data) {
+    var xml = OAT.Xml.createXmlDoc(data);
+    if (!hasError(xml, false)) {
+      alert('User\'s account is disabled!');
+      if (parent) {
+			  parent.document.location = document.location.protocol + '//' + document.location.host + '/ods';
+			} else {
+			  document.location = document.location.protocol + '//' + document.location.host + '/ods';
+			}
+    }
+	}
+  OAT.AJAX.GET(S, '', x);
+}
+
 // RDF Relations
 // ---------------------------------------------------------------------------
+var rdfDialog
 var RDF = new Object();
 RDF.tablePrefix = 'r';
 RDF.itemTypes = new Object();
@@ -633,7 +673,6 @@ RDF.ontologies['xsd'] = {"name": 'http://www.w3.org/2001/XMLSchema#', "hidden":
 RDF.loadOntology = function (ontologyName, cb, options)
 {
   var ontology = this.getOntologyByName(ontologyName);
-  var dependent = ontology.dependent;
   var prefix = this.ontologyPrefix(ontologyName);
   if (!prefix) {
     var N = 0;
@@ -646,9 +685,12 @@ RDF.loadOntology = function (ontologyName, cb, options)
   }
 
   // load ontology classes
-  var S = '/ods/api/ontology.classes?ontology='+encodeURIComponent(ontologyName);
-  if (dependent)
+  var S = '/ods/api/ontology.classes?ontology='+encodeURIComponent(ontologyName)+ '&prefix='+encodeURIComponent(prefix);
+  var dependent;
+  if (ontology && ontology.dependent) {
+    dependent = ontology.dependent;
     S += '&dependentOntology='+encodeURIComponent(this.getOntologyByPrefix(dependent).name);
+  }
   var x = function(data) {
     var o = null;
     try {
@@ -698,11 +740,9 @@ RDF.getOntologyByClass = function(className)
 RDF.getOntologyClass = function(className)
 {
   var ontology = this.getOntologyByClass(className);
-  if (ontology)
-  {
+  if (ontology) {
     var classes = ontology.classes;
-    for (var i = 0; i < classes.length; i++)
-    {
+    for (var i = 0; i < classes.length; i++) {
       if (classes[i].name == className)
         return classes[i];
     }
@@ -726,8 +766,13 @@ RDF.getOntologyClassProperty = function(className, propertyName)
       if (properties[i].name == propertyName)
         return properties[i];
     }
-    if (ontologyClass.subClassOf)
-      return this.getOntologyClassProperty(ontologyClass.subClassOf, propertyName)
+
+      if (ontologyClass.subClassOf instanceof Array)
+        for (var i=0; i<ontologyClass.subClassOf.length; i++) {
+          var property = this.getOntologyClassProperty(ontologyClass.subClassOf[i], propertyName);
+          if (property)
+            return property;
+        }
   }
   }
   return null;
@@ -757,8 +802,11 @@ RDF.isKindOfClass = function(objectClassName, propertyClassName)
     return true;
 
   var ontologyClass = this.getOntologyClass(objectClassName);
-  if (ontologyClass && ontologyClass.subClassOf)
-    return this.isKindOfClass (ontologyClass.subClassOf, propertyClassName);
+  if (ontologyClass && (ontologyClass.subClassOf instanceof Array))
+    for (var i = 0; i < ontologyClass.subClassOf; i++) {
+      if (this.hasClassProperties(ontologyClass.subClassOf[i]))
+        return true;
+    }
 
   return false;
 }
@@ -771,18 +819,23 @@ RDF.loadClassProperties = function(ontologyClass, cbFunction)
   }
   var ontologyName = RDF.getOntologyByClass(ontologyClass.name).name;
   var prefix = RDF.ontologyPrefix(ontologyName);
-  var S = '/ods/api/ontology.classProperties?ontologyClass='+encodeURIComponent(ontologyClass.name)+'&ontology='+encodeURIComponent(ontologyName)+'&prefix='+prefix;
+  var S = '/ods/api/ontology.classProperties?ontology='+encodeURIComponent(ontologyName)+'&prefix='+prefix+'&ontologyClass='+encodeURIComponent(ontologyClass.name);
   var x = function(data) {
     var o = null;
     try {
       o = OAT.JSON.parse(data);
     } catch (e) { o = null; }
     ontologyClass.properties = o;
-    var ontologySubClass = RDF.getOntologyClass(ontologyClass.subClassOf);
+    if (ontologyClass.subClassOf instanceof Array) {
+      for (var i = 0; i < ontologyClass.subClassOf.length; i++) {
+        var ontologySubClass = RDF.getOntologyClass(ontologyClass.subClassOf[i]);
     if (ontologySubClass) {
       RDF.loadClassProperties(ontologySubClass, cbFunction)
-      return;
+          cbFunction = null;
+        }
     }
+    }
+    if (cbFunction)
     cbFunction();
   }
   OAT.AJAX.GET(S, '', x, {});
@@ -804,8 +857,11 @@ RDF.hasClassProperties = function(className)
     if (ontologyClass.properties.length)
       return true;
 
-    if (ontologyClass.subClassOf)
-      return this.hasClassProperties(ontologyClass.subClassOf);
+    if (ontologyClass.subClassOf instanceof Array)
+      for (var i = 0; i < ontologyClass.subClassOf.length; i++) {
+        if (this.hasClassProperties(ontologyClass.subClassOf[i]))
+          return true;
+      }
   }
   return false;
 }
@@ -834,6 +890,87 @@ RDF.clearTable = function()
 }
 
 // Item Types functions
+RDF.showRDF = function(prefix, format)
+{
+  function preparePropertiesWork(prefix, ontologyNo, itemNo) {
+    var form = document.forms['page_form'];
+    var itemProperties = [];
+    for (var L = 0; L < form.elements.length; L++) {
+      if (!form.elements[L])
+        continue;
+
+      var ctrl = form.elements[L];
+      if (typeof(ctrl.type) == 'undefined')
+        continue;
+
+      if (ctrl.name.indexOf(prefix+"_item_"+ontologyNo+"_prop_"+itemNo+"_fld_1_") != 0)
+        continue;
+
+      var propertyNo = ctrl.name.replace(prefix+"_item_"+ontologyNo+"_prop_"+itemNo+"_fld_1_", "");
+      var propertyName = ctrl.value;
+      var propertyType = $v(prefix+"_item_"+ontologyNo+"_prop_"+itemNo+"_fld_2_"+propertyNo);
+      var propertyValue = $v(prefix+"_item_"+ontologyNo+"_prop_"+itemNo+"_fld_3_"+propertyNo);
+      var propertyLanguage = $v(prefix+"_item_"+ontologyNo+"_prop_"+itemNo+"_fld_4_"+propertyNo);
+      if (propertyType == 'object') {
+        var item = RDF.getItemByName(propertyValue);
+        if (item)
+          propertyValue = item.id;
+      }
+      itemProperties.push({"name": propertyName, "value": propertyValue, "type": propertyType, "language": propertyLanguage});
+    }
+    return itemProperties;
+  }
+
+  var L = 0;
+  var form = document.forms['page_form'];
+  var ontologies = [];
+  for (var N = 0; N < form.elements.length; N++)
+  {
+    if (!form.elements[N])
+      continue;
+
+    var ctrl = form.elements[N];
+    if (typeof(ctrl.type) == 'undefined')
+      continue;
+
+    if (ctrl.name.indexOf(prefix+"_fld_2_") != 0)
+      continue;
+
+    var ontologyNo = ctrl.name.replace(prefix+"_fld_2_", "");
+    var ontologyName = ctrl.value;
+    var ontologyItems = [];
+    for (var M = 0; M < form.elements.length; M++)
+    {
+      if (!form.elements[M])
+        continue;
+
+      var ctrl = form.elements[M];
+      if (typeof(ctrl.type) == 'undefined')
+        continue;
+
+      if (ctrl.name.indexOf(prefix+"_item_"+ontologyNo+"_fld_2_") != 0)
+        continue;
+
+      var itemNo = ctrl.name.replace(prefix+"_item_"+ontologyNo+"_fld_2_", "");
+      var itemName = ctrl.value;
+      var itemProperties = preparePropertiesWork(prefix, ontologyNo, itemNo);
+      ontologyItems.push({"id": itemNo, "className": itemName, "properties": itemProperties});
+    }
+    ontologies.push({"id": ''+L++, "ontology": ontologyName, "items": ontologyItems});
+  }
+  var items = OAT.JSON.stringify(ontologies);
+	var x = function(data) {
+    if (!rdfDialog) {
+      rdfDialog = new OAT.Dialog("Show Data", "rdfDiv", {width: 800, height: 500, resize: 0, modal: 1, buttons: 1});
+      OAT.Dom.show('rdfDiv');
+    }
+    $('rdfData').innerHTML = data;
+		rdfDialog.show();
+	}
+  OAT.AJAX.GET('/ods/api/objects.rdf', 'items='+encodeURIComponent(items)+'&format='+format, x);
+}
+
+// Item Types functions
 RDF.showItemTypes = function()
 {
   var prefix = this.tablePrefix;
@@ -1020,13 +1157,14 @@ RDF.showItemsTable = function(itemType)
     var prefixItem = prefix + '_item_' + No;
 
     var fld = OAT.Dom.create('span');
+    fld.title = 'Add Element';
     fld.onclick = function(){var id = RDF.newItemId(); TBL.createRow(prefixItem, null, {No: id, fld_1: {mode: 45, cssText: 'display: none;'}, fld_2: {mode: 44, itemType: itemType, labelValue: 'New Item: '}, btn_1: {mode: 42}, btn_2: {mode: 43}});};
     OAT.Dom.addClass(fld, 'button pointer');
 
     var img = OAT.Dom.create('img');
     img.src = '/ods/images/icons/add_16.png';
-    img.alt = 'Add row';
-    img.title = fld.alt;
+    img.alt = 'Add Element';
+    img.title = img.alt;
     OAT.Dom.addClass(img, 'button');
 
     fld.appendChild(img);
@@ -1168,11 +1306,10 @@ RDF.addItemToSelects = function(item)
   var tbl = $(this.tablePrefix+'_tbl');
   if (!tbl) {return;}
 
-  var selects = tbl.getElementsByTagName('select');
-  if (!selects) {return;}
-  for (var i = 0; i < selects.length; i++)
-  {
-    var obj = selects[i];
+  var combolists = tbl.getElementsByTagName('input');
+  if (!combolists) {return;}
+  for (var i = 0; i < combolists.length; i++) {
+    var obj = combolists[i];
     if ((obj.id.indexOf('_prop_') != -1) && (obj.id.indexOf('_fld_1_') != -1) && (obj.value != ''))
     {
       var ontologyClassProperty = this.getOntologyClassProperty(obj.item.className, obj.value);
@@ -1182,7 +1319,7 @@ RDF.addItemToSelects = function(item)
         {
           if (item.className == ontologyClassProperty.objectProperties[j])
           {
-      	    var fld = $(obj.id.replace(/_fld_1_/, '_fld_2_'));
+      	    var fld = $(obj.id.replace(/_fld_1_/, '_fld_3_'));
             if (fld && fld.combolist)
               fld.combolist.addOption(RDF.getItemName(item));
     	    }
@@ -1207,16 +1344,16 @@ RDF.itemInSelects = function(item, mode)
   var tbl = $(this.tablePrefix+'_tbl');
   if (!tbl) {return;}
 
-  var selects = tbl.getElementsByTagName('select');
-  if (!selects) {return;}
-  for (var i = 0; i < selects.length; i++) {
-    var obj = selects[i];
+  var combolists = tbl.getElementsByTagName('input');
+  if (!combolists) {return;}
+  for (var i = 0; i < combolists.length; i++) {
+    var obj = combolists[i];
     if ((obj.id.indexOf('_prop_') != -1) && (obj.id.indexOf('_fld_1_') != -1) && (obj.value != '')) {
       var ontologyClassProperty = this.getOntologyClassProperty(obj.item.className, obj.value);
       if (ontologyClassProperty.objectProperties) {
         for (var j = 0; j < ontologyClassProperty.objectProperties.length; j++) {
           if (item.className == ontologyClassProperty.objectProperties[j]) {
-      	    var fld = $(obj.id.replace(/_fld_1_/, '_fld_2_'));
+      	    var fld = $(obj.id.replace(/_fld_1_/, '_fld_3_'));
             if (fld && fld.combolist) {
               if ((fld.value == RDF.getItemName(item)) && (mode == 'check'))
                     return confirm ('The selected object is used. Delete?');
@@ -1310,13 +1447,14 @@ RDF.showPropertiesTable = function(item)
       var prefixProp = prefix + '_prop_' + No;
 
       var fld = OAT.Dom.create('span');
+      fld.title = 'Add Property';
       fld.onclick = function(){TBL.createRow(prefixProp, null, {fld_1: {mode: 46, item: item}, fld_2: {mode: 48, item: item}, fld_3: {mode: 47, item: item}, fld_4: {mode: 49, item: item}});};
       OAT.Dom.addClass(fld, 'button pointer');
 
       var img = OAT.Dom.create('img');
       img.src = '/ods/images/icons/add_16.png';
-      img.alt = 'Add row';
-      img.title = fld.alt;
+      img.alt = 'Add Property';
+      img.title = img.alt;
       OAT.Dom.addClass(img, 'button');
 
       fld.appendChild(img);
@@ -1343,17 +1481,19 @@ RDF.showPropertiesTable = function(item)
 
 RDF.changePropertyValue = function(obj)
 {
-  var S = obj.parentNode.id;
+  var fld = obj.input;
+  var fldTd = findParent(fld, 'td');
+  var S = fldTd.id;
 
-  var fldName = (obj.id).replace(/fld_1/, 'fld_2');
+  var fldName = (fld.id).replace(/fld_1/, 'fld_2');
   var td = $(S.substr(0,S.lastIndexOf('_')+1)+'2');
-  TBL.createCell48(td, '', fldName, 0, {item: obj.item, value: {name: obj.value}});
+  TBL.createCell48(td, '', fldName, 0, {item: fld.item, value: {name: fld.value}});
 
-  var fldName = (obj.id).replace(/fld_1/, 'fld_3');
+  var fldName = (fld.id).replace(/fld_1/, 'fld_3');
   var td = $(S.substr(0,S.lastIndexOf('_')+1)+'3');
-  TBL.createCell47(td, '', fldName, 0, {item: obj.item, value: {name: obj.value}});
+  TBL.createCell47(td, '', fldName, 0, {item: fld.item, value: {name: fld.value}});
 
-  var fldName = (obj.id).replace(/fld_1/, 'fld_4');
+  var fldName = (fld.id).replace(/fld_1/, 'fld_4');
   var td = $(S.substr(0,S.lastIndexOf('_')+1)+'4');
-  TBL.createCell49(td, '', fldName, 0, {item: obj.item, value: {name: obj.value}});
+  TBL.createCell49(td, '', fldName, 0, {item: fld.item, value: {name: fld.value}});
 }
diff --git a/appsrc/ODS-Framework/community.vspx b/appsrc/ODS-Framework/community.vspx
index 61d7ce3..703a1ef 100644
--- a/appsrc/ODS-Framework/community.vspx
+++ b/appsrc/ODS-Framework/community.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: community.vspx,v 1.4.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: community.vspx,v 1.4.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/app_inst_menu.xsl b/appsrc/ODS-Framework/comp/app_inst_menu.xsl
index cbc3ce0..c9b87de 100644
--- a/appsrc/ODS-Framework/comp/app_inst_menu.xsl
+++ b/appsrc/ODS-Framework/comp/app_inst_menu.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: app_inst_menu.xsl,v 1.6.2.1 2010/09/20 10:15:32 source Exp $
+ -  $Id: app_inst_menu.xsl,v 1.6.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/app_search.xsl b/appsrc/ODS-Framework/comp/app_search.xsl
index 4c1a3f1..a16a913 100644
--- a/appsrc/ODS-Framework/comp/app_search.xsl
+++ b/appsrc/ODS-Framework/comp/app_search.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: app_search.xsl,v 1.4.2.1 2010/09/20 10:15:32 source Exp $
+ -  $Id: app_search.xsl,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/apps.xsl b/appsrc/ODS-Framework/comp/apps.xsl
index 76c1754..2f333c4 100644
--- a/appsrc/ODS-Framework/comp/apps.xsl
+++ b/appsrc/ODS-Framework/comp/apps.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: apps.xsl,v 1.8.2.1 2010/09/20 10:15:32 source Exp $
+ -  $Id: apps.xsl,v 1.8.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/check.xsl b/appsrc/ODS-Framework/comp/check.xsl
index 3004b50..8125977 100644
--- a/appsrc/ODS-Framework/comp/check.xsl
+++ b/appsrc/ODS-Framework/comp/check.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: check.xsl,v 1.3.2.1 2010/09/20 10:15:32 source Exp $
+ -  $Id: check.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/check_register.xsl b/appsrc/ODS-Framework/comp/check_register.xsl
index b9dc2c7..c9882be 100644
--- a/appsrc/ODS-Framework/comp/check_register.xsl
+++ b/appsrc/ODS-Framework/comp/check_register.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: check_register.xsl,v 1.3.2.1 2010/09/20 10:15:33 source Exp $
+ -  $Id: check_register.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/dashboard.xsl b/appsrc/ODS-Framework/comp/dashboard.xsl
index e21f193..c51994f 100644
--- a/appsrc/ODS-Framework/comp/dashboard.xsl
+++ b/appsrc/ODS-Framework/comp/dashboard.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dashboard.xsl,v 1.39.2.7 2011/03/29 20:23:14 source Exp $
+ -  $Id: dashboard.xsl,v 1.39.2.12 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -59,7 +59,7 @@
           <h3>Recently Signed In</h3>
           <ul class="w_act_lst">
 <?vsp
-  for select top 3  nu_name, u_full_name from wa_new_user join sys_users on (u_id = nu_u_id) join wa_user_info on (u_id=WAUI_U_ID) where WAUI_SHOWACTIVE=1 order by nu_row_id desc do
+            for (select distinct top 3 nu_name, u_full_name from wa_new_user join sys_users on (u_id = nu_u_id) join wa_user_info on (u_id=WAUI_U_ID) where WAUI_SHOWACTIVE=1 order by nu_row_id desc) do
     {
     if (not length (u_full_name))
       u_full_name := null;
@@ -68,20 +68,20 @@
 <?vsp
     }
 ?>
-          <li/></ul>
+          <li/>
+        </ul>
           <h3>New Users</h3>
         <ul class="w_act_lst">
 <?vsp
-  for select top 3  nr_name, u_full_name from wa_new_reg join sys_users on (u_id = nr_u_id) join wa_user_info on (u_id=WAUI_U_ID) where WAUI_SHOWACTIVE=1 order by nr_row_id desc do
+            for (select distinct top 3 nr_name, u_full_name from wa_new_reg join sys_users on (u_id = nr_u_id) join wa_user_info on (u_id=WAUI_U_ID) where WAUI_SHOWACTIVE=1 order by nr_row_id desc) do
     {
 ?>
-        <li>
-          <a href="<?V wa_expand_url('/dataspace/'|| wa_identity_dstype(nr_name) ||'/'|| nr_name ||'#this', self.login_pars)?>"><?V wa_utf8_to_wide (coalesce (u_full_name, nr_name)) ?></a>
-        </li>
+          <li><a href="<?V wa_expand_url('/dataspace/'|| wa_identity_dstype(nr_name) ||'/'|| nr_name ||'#this', self.login_pars)?>"><?V wa_utf8_to_wide (coalesce (u_full_name, nr_name)) ?></a></li>
 <?vsp
     }
 ?>
-        <li/></ul>
+          <li/>
+        </ul>
       </div> <!-- pane content_pane -->
       <div class="w_footer">
         <a href="search.vspx?newest=users<?V self.login_pars ?>">More&#8230;</a>
@@ -90,7 +90,7 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-new-blogs">
-    <div class="widget w_db_summary w_blog_summary">
+    <div class="widget w_app_summary">
       <div class="w_title_bar">
         <div class="w_title_text_ctr">
           <img class="w_title_icon"
@@ -102,7 +102,7 @@
       <div class="w_pane content_pane">
         <ul>
 <?vsp
-  for select top 10 wnb_title, wnb_link from wa_new_blog order by wnb_row_id desc do
+            for (select top 10 wnb_title, wnb_link from wa_new_blog order by wnb_row_id desc) do
   {
 ?>
           <li><a href="<?V wa_expand_url (wnb_link, self.login_pars) ?>"><?V wa_utf8_to_wide (wnb_title, 1, 55) ?></a></li>
@@ -118,7 +118,7 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-new-news">
-    <div class="widget w_db_summary w_news_summary">
+    <div class="widget w_app_summary">
       <div class="w_title_bar">
         <div class="w_title_text_ctr">
           <img class="w_title_icon"
@@ -130,12 +130,10 @@
       <div class="w_pane content_pane">
         <ul>
   <?vsp
-  for select top 10 wnn_efi_id, wnn_title, wnn_link from wa_new_news order by wnn_row_id desc do
+            for (select top 10 wnn_efi_id, wnn_title, wnn_link from wa_new_news order by wnn_row_id desc) do
   {
   ?>
-    <li>
-            <a href="<?V wa_expand_url (SIOC..feed_item_iri2 (wnn_efi_id), self.login_pars) ?>"><?V wa_utf8_to_wide (wnn_title, 1, 55) ?></a>
-          </li>
+          <li><a href="<?V wa_expand_url (SIOC..feed_item_iri2 (wnn_efi_id), self.login_pars) ?>"><?V wa_utf8_to_wide (wnn_title, 1, 55) ?></a></li>
   <?vsp
   }
   ?>
@@ -148,26 +146,22 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-new-wiki">
-    <div class="widget w_db_summary w_wiki_summary">
+    <div class="widget w_app_summary">
       <div class="w_title_bar">
         <div class="w_title_text_ctr">
           <img class="w_title_icon"
                src="images/icons/ods_wiki_16.png"
-               alt="ODS-Weblog icon"/>
+               alt="ODS-Wiki icon"/>
           <span class="w_title_text">Wiki Activity</span>
         </div>
       </div> <!-- w_title_bar -->
       <div class="w_pane content_pane">
         <ul>
 <?vsp
-  for select top 10 wnw_title, wnw_topic_id from wa_new_wiki order by wnw_row_id desc do
+          for (select top 10 wnw_title, wnw_topic_id from wa_new_wiki order by wnw_row_id desc) do
     {
 ?>
-    <li>
-            <a href="<?V wa_expand_url (WV.WIKI.post_topic_uri (wnw_topic_id), self.login_pars) ?>">
-              <?V wa_utf8_to_wide (wnw_title, 1, 55) ?>
-            </a>
-          </li>
+          <li><a href="<?V wa_expand_url (WV.WIKI.post_topic_uri (wnw_topic_id), self.login_pars) ?>"><?V wa_utf8_to_wide (wnw_title, 1, 55) ?></a></li>
 <?vsp
      }
 ?>
@@ -180,7 +174,7 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-blog-summary">
-    <div class="widget w_app_summary w_blog_summary">
+    <div class="widget w_app_summary">
       <div class="w_title_bar">
         <div class="w_title_text_ctr">
           <img class="w_title_icon"
@@ -1257,7 +1251,7 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-my-dataspaces">
-    <div class="widget w_my_dataspaces">
+    <div class="widget w_my_instance">
       <div class="w_title_bar">
         <div class="w_title_text_ctr">
           <img class="w_title_icon"
@@ -1405,7 +1399,7 @@
 
   			function generateDSLinks()
         {
-          OAT.Preferences.stylePath = '/ods/';
+          OAT.Preferences.stylePath = '/ods/oat/styles/';
           OAT.Anchor.imagePath = '/ods/images/oat/';
           OAT.Anchor.zIndex = 1001;
 
@@ -1573,32 +1567,24 @@
   <xsl:template match="vm:dash-my-blog">
 <?vsp
   declare has_blog_app int;
-  has_blog_app := 0;
-  if (wa_check_package('blog2') and
-      exists (select 1 from wa_member
-                where WAM_APP_TYPE='WEBLOG2' and
-                      WAM_MEMBER_TYPE=1 and
-                      WAM_USER=self.u_id))
-    {
-      has_blog_app := 1;
-    }
+
+      has_blog_app := wa_check_owner_app ('blog2', 'WEBLOG2', self.u_id);
 ?>
     <vm:if test="not has_blog_app">
       <div class="app_ad">
-        <!-- TODO create app ad button and call template to create-->
-        <!--vm:url value="Foo" url="index_inst.vspx?wa_name=WEBLOG2&fr=promo"-->
         <a href="index_inst.vspx?<?V 'wa_name=WEBLOG2&fr=promo' || '&' || trim (self.login_pars, '&') ?>">
           <img border="0" src="images/app_ads/ods_bann_blog.jpg" alt="Your Own Blog IS Just 3 Clicks Away!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="blog_app_ad_nuke"/>
-          <label for="blog_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div>
     </vm:if>
     <vm:if test="has_blog_app">
-      <div class="widget w_my_blog">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -1622,17 +1608,11 @@
     </vm:if>
   </xsl:template>
 
-<!--vm:url value="Start using Wiki" url="index_inst.vspx?wa_name=oWiki&fr=promo" /-->
-
   <xsl:template match="vm:dash-my-wiki">
 <?vsp
   declare has_wiki_app int;
-  has_wiki_app := 0;
-  if (wa_check_package('wiki') and
-      exists (select 1 from wa_member where WAM_APP_TYPE='oWiki' and WAM_MEMBER_TYPE=1 and WAM_USER=self.u_id))
-        {
-          has_wiki_app := 1;
-        }
+
+      has_wiki_app := wa_check_owner_app ('wiki', 'oWiki', self.u_id);
 ?>
     <vm:if test="not has_wiki_app">
       <div class="app_ad">
@@ -1640,14 +1620,15 @@
           <img border="0" src="images/app_ads/ods_bann_wiki.jpg" alt="Share Information, Collaborate With ODS-Wiki!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="wiki_app_ad_nuke"/>
-          <label for="wiki_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div>
     </vm:if>
     <vm:if test="has_wiki_app">
-      <div class="widget w_my_wiki">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -1656,7 +1637,7 @@
             <span class="w_title_text">My Wiki</span>
           </div>
         </div>
-        <div class="pane content_pane">
+        <div class="w_pane content_pane">
           <ul>
             <xsl:call-template name="user-dashboard-my-item">
               <xsl:with-param name="app">oWiki</xsl:with-param>
@@ -1674,17 +1655,10 @@
   <!--vm:url value="Create your personalized news desk now!" url="index_inst.vspx?wa_name=eNews2&fr=promo" /-->
 
   <xsl:template match="vm:dash-my-news">
-
 <?vsp
   declare has_news_app int;
-  has_news_app := 0;
-  if (wa_check_package('enews2') and
-      exists (select 1 from wa_member
-                       where WAM_APP_TYPE='eNews2' and
-                             WAM_MEMBER_TYPE=1 and WAM_USER=self.u_id) )
-    {
-      has_news_app := 1;
-    }
+
+      has_news_app := wa_check_owner_app ('enews2', 'eNews2', self.u_id);
 ?>
     <vm:if test="not has_news_app">
       <div class="app_ad">
@@ -1692,14 +1666,15 @@
           <img border="0" src="images/app_ads/ods_bann_feeds.jpg" alt="Create Your Own Personalized News Desk!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="news_app_ad_nuke"/>
-          <label for="news_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div>
     </vm:if>
     <vm:if test="has_news_app">
-      <div class="widget w_my_news">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -1724,24 +1699,13 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-my-bookmarks">
-
 <?vsp
-
   declare has_bookmarks integer;
 
-  has_bookmarks := 0;
-
-  if (wa_check_package ('bookmark') and
-      exists (select 1
-                from wa_member
-                where WAM_APP_TYPE='Bookmark' and
-                      WAM_MEMBER_TYPE = 1 and
-                      WAM_USER = self.u_id))
-    has_bookmarks := 1;
-
+      has_bookmarks := wa_check_owner_app ('bookmark', 'Bookmark', self.u_id);
 ?>
     <vm:if test="has_bookmarks">
-      <div class="widget w_my_bookmarks">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -1787,14 +1751,8 @@
                      wa_expand_url (_inst_url, self.login_pars),
                      '&tab=shared',
                      dta[0],
-                     case when dta[0] > 1
-                       then 's'
-                       else ''
-                     end,
-                     case when dta[0] > 1
-                       then 's'
-                       else ''
-                     end));
+                     case when dta[0] > 1 then 's' else '' end,
+                     case when dta[0] > 1 then 's' else '' end));
     }
 ?>
 
@@ -1807,8 +1765,9 @@
           <img border="0" src="images/app_ads/ods_bann_bookmarks.jpg" alt="Let us help you organize and share your bookmarks!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="bookmarks_app_ad_nuke"/>
-          <label for="bookmarks_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div> <!-- app_ad -->
@@ -1816,24 +1775,13 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-my-contacts">
-
 <?vsp
-
   declare has_addressbook integer;
 
-  has_addressbook := 0;
-
-  if (wa_check_package ('addressbook') and
-      exists (select 1
-                from wa_member
-                where WAM_APP_TYPE='AddressBook' and
-                      WAM_MEMBER_TYPE = 1 and
-                      WAM_USER = self.u_id))
-    has_addressbook := 1;
-
+      has_addressbook := wa_check_owner_app ('addressbook', 'AddressBook', self.u_id);
 ?>
     <vm:if test="has_addressbook">
-      <div class="widget w_my_addressbook">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -1879,10 +1827,7 @@
                      wa_expand_url (_inst_url, self.login_pars),
                      '&tab=shared',
                      dta[0],
-                     case when dta[0] > 1
-                       then 's'
-                       else ''
-                     end ));
+                     case when dta[0] > 1 then 's' else '' end ));
     }
 ?>
 
@@ -1895,8 +1840,9 @@
           <img border="0" src="images/app_ads/ods_bann_addressbook.jpg" alt="Let us help you organize and share your contacts!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="addressbook_app_ad_nuke"/>
-          <label for="addressbook_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div> <!-- app_ad -->
@@ -2064,7 +2010,7 @@
   </xsl:template>
 
   <xsl:template match="vm:dash-my-community">
-    <div class="widget w_my_communities">
+    <div class="widget w_my_instance">
       <div class="w_title_bar">
         <div class="w_title_text_ctr">
           <img class="w_title_icon"
@@ -2109,12 +2055,9 @@
 
   <xsl:template match="vm:dash-my-photos">
     <?vsp
-
       declare has_gallery integer;
 
-      has_gallery := 0;
-      if (exists (select 1 from wa_member where WAM_APP_TYPE='oGallery' and WAM_MEMBER_TYPE = 1 and WAM_USER = self.u_id))
-        has_gallery := 1;
+      has_gallery := wa_check_owner_app ('Gallery', 'oGallery', self.u_id);;
     ?>
     <vm:if test="has_gallery">
     <div class="widget w_my_photos">
@@ -2262,8 +2205,9 @@
           <img border="0" src="images/app_ads/ods_bann_photos.jpg" alt="Let us help you organize and share your contacts!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="gallery_app_ad_nuke"/>
-          <label for="gallery_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div> <!-- app_ad -->
@@ -2447,20 +2391,10 @@
 <?vsp
   declare has_webmail int;
 
-  has_webmail := 0;
-
-  if (wa_check_package('oMail') and
-      exists (select 1
-                from wa_member
-                where WAM_APP_TYPE='oMail' and
-                      WAM_MEMBER_TYPE=1 and
-                      WAM_USER=self.u_id) )
-    {
-      has_webmail := 1;
-    }
+      has_webmail := wa_check_owner_app ('oMail', 'oMail', self.u_id);
 ?>
     <vm:if test="has_webmail">
-      <div class="widget w_my_mail">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -2471,16 +2405,10 @@
         </div>
         <div class="w_pane content_pane">
 <?vsp
-
   declare q_str, rc, dta, h any;
 
-  q_str := sprintf('select COUNT(*) as ALL_CNT,
-                           SUM(either(MSTATUS,0,1)) as NEW_CNT
-                      from OMAIL.WA.MESSAGES
-                      where USER_ID = %d',
-                   self.u_id);
-
-  rc := exec (q_str, null, null, vector (), 0, null, null, h);
+  q_str := 'select count (*) as ALL_CNT, sum (mod (MM_IS_READED+1,2)) as NEW_CNT from DB.DBA.MAIL_MESSAGE where MM_OWN = ?';
+  rc := exec (q_str, null, null, vector (self.u_name), 0, null, null, h);
   while (0 = exec_next (h, null, null, dta))
     {
       exec_result (dta);
@@ -2520,8 +2448,9 @@
           <img border="0" src="images/app_ads/ods_bann_webmail.jpg" alt="Webmail app ad banner" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="mail_app_ad_nuke"/>
-          <label for="mail_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div> <!-- app_ad -->
@@ -2535,20 +2464,10 @@
 <?vsp
   declare has_briefcase int;
 
-  has_briefcase := 0;
-
-  if (wa_check_package('Briefcase') and
-      exists (select 1
-                from wa_member
-                where WAM_APP_TYPE='oDrive' and
-                      WAM_MEMBER_TYPE=1 and
-                      WAM_USER=self.u_id) )
-    {
-      has_briefcase := 1;
-    }
+      has_briefcase := wa_check_owner_app ('Briefcase', 'oDrive', self.u_id);
 ?>
     <vm:if test="has_briefcase">
-      <div class="widget w_my_news">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon"
@@ -2629,8 +2548,9 @@
           <img border="0" src="images/app_ads/ods_bann_briefcase.jpg" alt="Briefcase app ad banner" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="briefcase_app_ad_nuke"/>
-          <label for="briefcase_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div> <!-- app_ad -->
@@ -2641,18 +2561,10 @@
     <?vsp
       declare has_calendar integer;
 
-      has_calendar := 0;
-
-      if (wa_check_package ('calendar') and
-          exists (select 1
-                    from wa_member
-                   where WAM_APP_TYPE='Calendar' and
-                         WAM_MEMBER_TYPE = 1 and
-                         WAM_USER = self.u_id))
-        has_calendar := 1;
+      has_calendar := wa_check_owner_app ('calendar', 'Calendar', self.u_id);
     ?>
     <vm:if test="has_calendar">
-      <div class="widget w_my_calendar">
+      <div class="widget w_my_instance">
         <div class="w_title_bar">
           <div class="w_title_text_ctr">
             <img class="w_title_icon" src="images/icons/ods_calendar_16.png" alt="ODS-Calendar icon"/>
@@ -2678,8 +2590,9 @@
           <img border="0" src="images/app_ads/ods_bann_calendar.jpg" alt="Let us help you organize your events!" />
         </a>
         <div class="app_ad_ft">
-          <input type="checkbox" id="calendar_app_ad_nuke"/>
-          <label for="calendar_app_ad_nuke">Do not show this next time</label>
+          <label>
+            <input type="checkbox"/> Do not show this next time
+          </label>
           <a href="#">Dismiss</a>
         </div>
       </div> <!-- app_ad -->
diff --git a/appsrc/ODS-Framework/comp/dashboard_style.xsl b/appsrc/ODS-Framework/comp/dashboard_style.xsl
index 5d72982..7a3bb9a 100644
--- a/appsrc/ODS-Framework/comp/dashboard_style.xsl
+++ b/appsrc/ODS-Framework/comp/dashboard_style.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dashboard_style.xsl,v 1.4.2.2 2010/09/20 10:15:33 source Exp $
+ -  $Id: dashboard_style.xsl,v 1.4.2.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/dav_browser.xsl b/appsrc/ODS-Framework/comp/dav_browser.xsl
index 912f84f..2bdc591 100644
--- a/appsrc/ODS-Framework/comp/dav_browser.xsl
+++ b/appsrc/ODS-Framework/comp/dav_browser.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: dav_browser.xsl,v 1.5.2.1 2010/09/20 10:15:33 source Exp $
+ -  $Id: dav_browser.xsl,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/help.xml b/appsrc/ODS-Framework/comp/help.xml
index 3189422..e8869df 100644
--- a/appsrc/ODS-Framework/comp/help.xml
+++ b/appsrc/ODS-Framework/comp/help.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" standalone="yes" ?>
 <!--
  -
- -  $Id: help.xml,v 1.4.2.1 2010/09/20 10:15:33 source Exp $
+ -  $Id: help.xml,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/help.xsl b/appsrc/ODS-Framework/comp/help.xsl
index 668931b..296363e 100644
--- a/appsrc/ODS-Framework/comp/help.xsl
+++ b/appsrc/ODS-Framework/comp/help.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: help.xsl,v 1.2.2.1 2010/09/20 10:15:33 source Exp $
+ -  $Id: help.xsl,v 1.2.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/home.xsl b/appsrc/ODS-Framework/comp/home.xsl
index 581e7fe..0a6b40f 100644
--- a/appsrc/ODS-Framework/comp/home.xsl
+++ b/appsrc/ODS-Framework/comp/home.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: home.xsl,v 1.21.2.6 2010/12/20 12:27:08 source Exp $
+ -  $Id: home.xsl,v 1.21.2.7 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/inst.xsl b/appsrc/ODS-Framework/comp/inst.xsl
index 0b6718e..4ccb922 100644
--- a/appsrc/ODS-Framework/comp/inst.xsl
+++ b/appsrc/ODS-Framework/comp/inst.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: inst.xsl,v 1.13.2.3 2010/11/11 12:38:19 source Exp $
+ -  $Id: inst.xsl,v 1.13.2.4 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/login.xsl b/appsrc/ODS-Framework/comp/login.xsl
index 3b301ca..6824547 100644
--- a/appsrc/ODS-Framework/comp/login.xsl
+++ b/appsrc/ODS-Framework/comp/login.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: login.xsl,v 1.21.2.9 2011/01/25 14:11:29 source Exp $
+ -  $Id: login.xsl,v 1.21.2.12 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -62,13 +62,13 @@
             <td valign="top">
               <div id="lf" class="form">
                 <div class="header">
-                  Identify Yourself <img id="lf_throbber" src="/ods/images/oat/Ajax_throbber.gif" style="float: right; margin-right: 10px; display: none" />
+                  Please identify yourself <img id="lf_throbber" src="/ods/images/oat/Ajax_throbber.gif" style="float: right; margin-right: 10px; display: none" />
                 </div>
                 <ul id="lf_tabs" class="tabs">
                   <li id="lf_tab_0" title="Digest">Digest</li>
+                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="lf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="lf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -127,8 +127,11 @@
 
                   <div id="lf_page_3" class="tabContent" style="display: none;">
                     <table id="lf_table_3" class="form" cellspacing="5">
-                      <tr>
+                      <tr id="lf_table_3_throbber">
+                        <th width="20%">
+                        </th>
                         <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
                         </td>
                       </tr>
                     </table>
diff --git a/appsrc/ODS-Framework/comp/make_sp.xsl b/appsrc/ODS-Framework/comp/make_sp.xsl
index 8578e12..f42e917 100644
--- a/appsrc/ODS-Framework/comp/make_sp.xsl
+++ b/appsrc/ODS-Framework/comp/make_sp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: make_sp.xsl,v 1.3.2.1 2010/09/20 10:15:33 source Exp $
+ -  $Id: make_sp.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/map_control.js b/appsrc/ODS-Framework/comp/map_control.js
index e64ccbb..7ca220a 100644
--- a/appsrc/ODS-Framework/comp/map_control.js
+++ b/appsrc/ODS-Framework/comp/map_control.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: map_control.js,v 1.5.2.1 2010/09/20 10:15:33 source Exp $
+ *  $Id: map_control.js,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/map_control.xsl b/appsrc/ODS-Framework/comp/map_control.xsl
index 520a47e..d1188c1 100644
--- a/appsrc/ODS-Framework/comp/map_control.xsl
+++ b/appsrc/ODS-Framework/comp/map_control.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: map_control.xsl,v 1.12.2.3 2010/09/20 10:15:34 source Exp $
+ -  $Id: map_control.xsl,v 1.12.2.4 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/members.xsl b/appsrc/ODS-Framework/comp/members.xsl
index 61c0c19..38ce404 100644
--- a/appsrc/ODS-Framework/comp/members.xsl
+++ b/appsrc/ODS-Framework/comp/members.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: members.xsl,v 1.3.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: members.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/membership.xsl b/appsrc/ODS-Framework/comp/membership.xsl
index 0cc7a03..56e0035 100644
--- a/appsrc/ODS-Framework/comp/membership.xsl
+++ b/appsrc/ODS-Framework/comp/membership.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: membership.xsl,v 1.3.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: membership.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/ods_bar.xsl b/appsrc/ODS-Framework/comp/ods_bar.xsl
index 616f378..52dc75e 100644
--- a/appsrc/ODS-Framework/comp/ods_bar.xsl
+++ b/appsrc/ODS-Framework/comp/ods_bar.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ods_bar.xsl,v 1.40.2.12 2011/03/08 13:28:18 source Exp $
+ -  $Id: ods_bar.xsl,v 1.40.2.14 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -236,11 +236,9 @@ if (typeof (OAT) == 'undefined')
       OAT.Loader.load(["ajax","xml"],function(){});
 
       OAT.Preferences.imagePath="<?V self.odsbar_ods_gpath ?>images/oat/";
-      OAT.Preferences.stylePath="<?V self.odsbar_ods_gpath ?>";
-
+  OAT.Preferences.stylePath="<?V self.odsbar_ods_gpath ?>oat/styles/";
       OAT.Style.include('winrect.css');
 
-
       if (typeof ODSInitArray != 'undefined')
         {
           for (var i = 0; i < ODSInitArray.length; i++)
diff --git a/appsrc/ODS-Framework/comp/page.xsl b/appsrc/ODS-Framework/comp/page.xsl
index 3044d71..29835c4 100644
--- a/appsrc/ODS-Framework/comp/page.xsl
+++ b/appsrc/ODS-Framework/comp/page.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: page.xsl,v 1.34.2.17 2011/01/25 14:11:29 source Exp $
+ -  $Id: page.xsl,v 1.34.2.19 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1306,157 +1306,64 @@
 
 <xsl:template match="vm:ds-navigation">
   <?vsp
+    declare n_start, n_end, n_total integer;
+    declare ds vspx_data_set;
+
+    ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
+    if (isnull (ds.ds_data_source))
    {
-    declare _prev, _next, _last, _first vspx_button;
-    declare d_prev, d_next, d_last, d_first, index_arr int;
-    d_prev := d_next := d_last := d_first := index_arr := 0;
-    _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-    _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
+      n_total := ds.ds_rows_total;
+      n_start := ds.ds_rows_offs + 1;
+      n_end   := n_start + ds.ds_nrows - 1;
+    } else {
+      n_total := ds.ds_data_source.ds_total_rows;
+      n_start := ds.ds_data_source.ds_rows_offs + 1;
+      n_end   := n_start + ds.ds_data_source.ds_rows_fetched - 1;
+    }
+    if (n_end > n_total)
+      n_end := n_total;
+
+    if (n_total)
+      http (sprintf ('Showing %d - %d of %d', n_start, n_end, n_total));
+
+    declare _prev, _next vspx_button;
+
     _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
     _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-    if (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled)
-      goto skipit;
-    index_arr := 1;
-    if (_first is not null and not _first.vc_enabled)
-    {
-      d_first := 1;
-    }
-    if (_next is not null and not _next.vc_enabled)
-    {
-      d_next := 1;
-    }
-    if (_prev is not null and not _prev.vc_enabled)
-    {
-      d_prev := 1;
-    }
-    if (_last is not null and not _last.vc_enabled)
-    {
-      d_last := 1;
-    }
-    skipit:;
+    if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
+      http (' | ');
   ?>
-  <!--
-  <xsl:if test="not(@type) or @type = 'set'">
-    <?vsp
-      if (d_first)
-      {
-  http ('<a href="#">first</a>');
-      }
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="url" value="first"
-        xhtml_alt="First" xhtml_title="First" text="First">
-    </v:button>
-  </xsl:if>
-  -->
-  <?vsp
-    http(' ');
-    if (d_prev)
-    {
-      http ('<a href="#"><<</a>');
-    }
-  ?>
-  <v:button name="{@data-set}_prev" action="simple" style="url" value="<<"
-    xhtml_alt="Previous" xhtml_title="Previous" text="Previous">
+  <v:button name="{@data-set}_first" action="simple" style="url" value="" xhtml_alt="First" xhtml_class="navi-button" >
+    <v:before-render>
+      <![CDATA[
+        control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/> First ';
+      ]]>
+    </v:before-render>
   </v:button>
-    <![CDATA[ ]]>
-    <![CDATA[ ]]>
-  <!-- an version of page numbering -->
-  <xsl:if test="not(@type) or @type = 'set'">
-    <v:text name="{@data-set}_offs" type="hidden" value="0" />
-    <?vsp
-    if (index_arr)
-    {
-      declare dsname, idx_offs, frm_name any;
-      declare frm vspx_control;
-frm := control.vc_find_parent_form (control);
-frm_name := '';
-if (frm is not null)
-  frm_name := frm.vc_name;
-      -- this button is just to trigger the post, no render at all
-      if (0)
-  {
-    ?>
-          <v:button name="{@data-set}_idx" action="simple" style="url" value="Submit">
-  <v:on-post><![CDATA[
-      declare ds vspx_data_set;
-      declare dss vspx_data_source;
-      declare offs int;
-      offs := atoi (get_keyword (replace (control.vc_name, '_idx', '_offs'), e.ve_params, '0'));
-      ds := control.vc_find_parent (control, 'vspx_data_set');
-      if (ds.ds_data_source is not null or isarray (ds.ds_row_data))
-        {
-	  ds.ds_rows_offs := ds.ds_nrows * offs;
-	  ds.vc_data_bind (e);
-        }
-      ]]></v:on-post>
+   
+  <v:button name="{@data-set}_prev" action="simple" style="url" value="" xhtml_alt="Previous" xhtml_class="navi-button">
+    <v:before-render>
+      <![CDATA[
+        control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/> Prev ';
+      ]]>
+    </v:before-render>
     </v:button>
-    <?vsp
-        }
-    ?>
-    <xsl:processing-instruction name="vsp">
-  dsname := '<xsl:value-of select="@data-set"/>';
-    </xsl:processing-instruction>
-    <?vsp
-    declare i, n, t, c integer;
-    declare _class varchar;
-    declare dss vspx_data_source;
-    declare ds vspx_data_set;
-    ds := control.vc_parent;
-    dss := null;
-    if (ds.ds_data_source is not null)
-      dss := ds.ds_data_source;
-    i := 0;
-    n := ds.ds_nrows;
-    t := 0;
-    if (dss is not null)
-     t := dss.ds_total_rows;
-    else if (isarray (ds.ds_row_data))
-      t := length (ds.ds_row_data);
-    if (ds.ds_rows_total > t)
-      t := ds.ds_rows_total;
-    c := ds.ds_rows_offs/ds.ds_nrows;
-    if ((t/n) > 20)
-      i := (t/n) - 20;
-    while (t and i < (t/n)+1)
-       {
-    ?>
-    | <a href="#" onclick="javascript: document.forms['<?V frm_name ?>'].<?V dsname ?>_offs.value = <?V i ?>; doPost ('<?V frm_name ?>', '<?V dsname ?>_idx'); return false"><?vsp http_value (i + 1, case when c = i then 'b' else null end); ?></a>
-    <?vsp
-        i := i + 1;
-}
-if (i > 0)
-  http (' | ');
-    }
-    ?>
-  </xsl:if>
-    <![CDATA[ ]]>
-    <![CDATA[ ]]>
-  <?vsp
-    if (d_next)
-    {
-    http ('<a href="#">>></a>');
-    }
-  ?>
-  <v:button name="{@data-set}_next" action="simple" style="url" value=">>"
-    xhtml_alt="Next" xhtml_title="Next" text="Next">
+   
+  <v:button name="{@data-set}_next" action="simple" style="url" value="" xhtml_alt="Next" xhtml_class="navi-button">
+    <v:before-render>
+      <![CDATA[
+        control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/> Next ';
+      ]]>
+    </v:before-render>
   </v:button>
-  <!--
-  <xsl:if test="not(@type) or @type = 'set'">
-    <?vsp
-      http(' ');
-      if (d_last)
-      {
-  http ('<a href="#">last</a>');
-      }
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="url" value="last"
-      xhtml_alt="Last" xhtml_title="Last" text="Last">
+   
+  <v:button name="{@data-set}_last" action="simple" style="url" value="" xhtml_alt="Last" xhtml_class="navi-button">
+    <v:before-render>
+      <![CDATA[
+        control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/> Last ';
+      ]]>
+    </v:before-render>
     </v:button>
-  </xsl:if>
-  -->
-  <?vsp
-    }
-  ?>
 </xsl:template>
 
 <xsl:template match="vm:site-member">
@@ -3176,71 +3083,4 @@ if (i > 0)
     <xsl:text>
</xsl:text>
 </xsl:template>
 
-  <!--=========================================================================-->
-  <xsl:template match="vm:ds-members-navigation">
-    <?vsp
-      {
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first int;
-
-        d_prev := d_next := d_last := d_first := 0;
-        _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-        _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
-        _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
-        _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled)
-          goto _skip;
-
-        if (_first is not null and not _first.vc_enabled)
-          d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-          d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-          d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-          d_last := 1;
-
-      _skip:;
-    ?>
-    <xsl:if test="not(@type) or @type = 'set'">
-    <?vsp
-      if (d_first)
-        http ('<img src="images/icons/first_16.png" alt="First" title="First" border="0" /> First');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="images/icons/first_16.png" xhtml_alt="First" text="First"/>
-    </xsl:if>
-    <?vsp
-      if (d_first or _first.vc_enabled)
-        http (' ');
-      if (d_prev)
-        http ('<img src="images/icons/previous_16.png" alt="Previous" title="Previous" border="0" /> Previous');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="images/icons/previous_16.png" xhtml_alt="Previous" text="Previous"/>
-    <?vsp
-      if (d_prev or _prev.vc_enabled)
-        http (' ');
-      if (d_next)
-        http ('<img src="images/icons/next_16.png" alt="Next" title="Next" border="0" /> Next');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="images/icons/next_16.png" xhtml_alt="Next" text="Next"/>
-    <xsl:if test="not(@type) or @type = 'set'">
-    <?vsp
-      if (d_next or _next.vc_enabled)
-        http (' ');
-      if (d_last)
-        http ('<img src="images/icons/last_16.png" alt="Last" title="Last" border="0" /> Last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="images/icons/last_16.png" xhtml_alt="Last" text="Last"/>
-    </xsl:if>
-    <?vsp
-      }
-    ?>
-  </xsl:template>
-
-
-
 </xsl:stylesheet>
diff --git a/appsrc/ODS-Framework/comp/register.xsl b/appsrc/ODS-Framework/comp/register.xsl
index ac6b91a..1052773 100644
--- a/appsrc/ODS-Framework/comp/register.xsl
+++ b/appsrc/ODS-Framework/comp/register.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: register.xsl,v 1.31.2.18 2011/02/16 20:56:52 source Exp $
+ -  $Id: register.xsl,v 1.31.2.20 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -105,9 +105,9 @@
         </div>
             <ul id="rf_tabs" class="tabs">
               <li id="rf_tab_0" title="Digest">Digest</li>
+              <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
               <li id="rf_tab_1" title="OpenID" style="display: none;">OpenID</li>
               <li id="rf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-              <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
               <li id="rf_tab_4" title="Twitter" style="display: none;">Twitter</li>
               <li id="rf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
             </ul>
@@ -118,18 +118,18 @@
                 <table id="rf_table_0" class="form" cellspacing="5">
                   <tr>
                     <th width="20%">
-                      <label for="rf_uid">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                      <label for="rf_uid_0">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                     </th>
                 <td nowrap="nowrap">
-                      <input type="text" name="rf_uid" value="" id="rf_uid" style="width: 150px;" />
+                      <input type="text" name="rf_uid_0" value="" id="rf_uid_0" style="width: 150px;" />
                 </td>
               </tr>
                   <tr>
                     <th>
-                      <label for="rf_email">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                      <label for="rf_email_0">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                     </th>
                 <td nowrap="nowrap">
-                      <input type="text" name="rf_email" value="" id="rf_email" style="width: 300px;" />
+                      <input type="text" name="rf_email_0" value="" id="rf_email_0" style="width: 300px;" />
                 </td>
               </tr>
                   <tr>
@@ -180,10 +180,11 @@
               </div>
               <div id="rf_page_3" class="tabContent" style="display: none;">
                 <table id="rf_table_3" class="form" cellspacing="5">
-              <tr>
+                  <tr id="rf_table_3_throbber">
                     <th width="20%">
                     </th>
-                <td nowrap="nowrap">
+                    <td>
+                      <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
                 </td>
               </tr>
                 </table>
@@ -227,6 +228,7 @@
             </table>
           </div>
             <div class="footer" id="rf_login_5">
+              <input type="button" id="rf_check" name="rf_check" value="Check Availabilty" onclick="javascript: return rfCheckAvalability();" />
               <input type="button" id="rf_signup" name="rf_signup" value="Sign Up" onclick="javascript: return rfSignupSubmit();" />
           </div>
           </div>
diff --git a/appsrc/ODS-Framework/comp/render.xsl b/appsrc/ODS-Framework/comp/render.xsl
index 5cb52b7..f448a14 100644
--- a/appsrc/ODS-Framework/comp/render.xsl
+++ b/appsrc/ODS-Framework/comp/render.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: render.xsl,v 1.3.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: render.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/rss2atom.xsl b/appsrc/ODS-Framework/comp/rss2atom.xsl
index 3a1b0e5..28a6b12 100644
--- a/appsrc/ODS-Framework/comp/rss2atom.xsl
+++ b/appsrc/ODS-Framework/comp/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.6.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: rss2atom.xsl,v 1.6.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/rss2rdf.xsl b/appsrc/ODS-Framework/comp/rss2rdf.xsl
index 83fedad..a128225 100644
--- a/appsrc/ODS-Framework/comp/rss2rdf.xsl
+++ b/appsrc/ODS-Framework/comp/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.2.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.2.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/rss2xbel.xsl b/appsrc/ODS-Framework/comp/rss2xbel.xsl
index d36cf89..d4f707a 100644
--- a/appsrc/ODS-Framework/comp/rss2xbel.xsl
+++ b/appsrc/ODS-Framework/comp/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/services.xsl b/appsrc/ODS-Framework/comp/services.xsl
index db9479e..12b1f68 100644
--- a/appsrc/ODS-Framework/comp/services.xsl
+++ b/appsrc/ODS-Framework/comp/services.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: services.xsl,v 1.7.2.2 2010/09/20 10:15:34 source Exp $
+ -  $Id: services.xsl,v 1.7.2.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/settings.xsl b/appsrc/ODS-Framework/comp/settings.xsl
index 7f56644..c99be0b 100644
--- a/appsrc/ODS-Framework/comp/settings.xsl
+++ b/appsrc/ODS-Framework/comp/settings.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: settings.xsl,v 1.4.2.1 2010/09/20 10:15:34 source Exp $
+ -  $Id: settings.xsl,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/site_home.xsl b/appsrc/ODS-Framework/comp/site_home.xsl
index 03bfb0f..79c00f1 100644
--- a/appsrc/ODS-Framework/comp/site_home.xsl
+++ b/appsrc/ODS-Framework/comp/site_home.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: site_home.xsl,v 1.4.2.1 2010/09/20 10:15:35 source Exp $
+ -  $Id: site_home.xsl,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/store.xsl b/appsrc/ODS-Framework/comp/store.xsl
index 760d25d..77e6d6e 100644
--- a/appsrc/ODS-Framework/comp/store.xsl
+++ b/appsrc/ODS-Framework/comp/store.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: store.xsl,v 1.3.2.1 2010/09/20 10:15:35 source Exp $
+ -  $Id: store.xsl,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/comp/tagging.xsl b/appsrc/ODS-Framework/comp/tagging.xsl
index e60f8e7..bb6114e 100644
--- a/appsrc/ODS-Framework/comp/tagging.xsl
+++ b/appsrc/ODS-Framework/comp/tagging.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tagging.xsl,v 1.9.2.2 2010/09/20 10:15:35 source Exp $
+ -  $Id: tagging.xsl,v 1.9.2.3 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/conf.vspx b/appsrc/ODS-Framework/conf.vspx
index 5d551db..60437b2 100644
--- a/appsrc/ODS-Framework/conf.vspx
+++ b/appsrc/ODS-Framework/conf.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conf.vspx,v 1.5.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: conf.vspx,v 1.5.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/conf_app.vspx b/appsrc/ODS-Framework/conf_app.vspx
index 29d9e27..58fabcd 100644
--- a/appsrc/ODS-Framework/conf_app.vspx
+++ b/appsrc/ODS-Framework/conf_app.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conf_app.vspx,v 1.5.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: conf_app.vspx,v 1.5.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/contact.html b/appsrc/ODS-Framework/contact.html
index 9e386b3..85bd565 100644
--- a/appsrc/ODS-Framework/contact.html
+++ b/appsrc/ODS-Framework/contact.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: contact.html,v 1.2.2.1 2010/09/20 10:15:18 source Exp $
+ -  $Id: contact.html,v 1.2.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/dashboard.sql b/appsrc/ODS-Framework/dashboard.sql
index cf59f92..0fd9eec 100644
--- a/appsrc/ODS-Framework/dashboard.sql
+++ b/appsrc/ODS-Framework/dashboard.sql
@@ -1,12 +1,12 @@
 --
---  $Id: dashboard.sql,v 1.13.2.3 2010/11/09 20:18:21 source Exp $
+--  $Id: dashboard.sql,v 1.13.2.4 2012/03/08 10:46:17 source Exp $
 --
 --  WA Dashboard support
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/dav.css b/appsrc/ODS-Framework/dav.css
index 6af0a52..fb364e3 100644
--- a/appsrc/ODS-Framework/dav.css
+++ b/appsrc/ODS-Framework/dav.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: dav.css,v 1.3.2.1 2010/09/20 10:15:19 source Exp $
+ *  $Id: dav.css,v 1.3.2.2 2012/03/08 10:46:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/default.css b/appsrc/ODS-Framework/default.css
index 7ffaf03..8b004b1 100644
--- a/appsrc/ODS-Framework/default.css
+++ b/appsrc/ODS-Framework/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.26.2.17 2011/03/08 13:28:13 source Exp $
+ *  $Id: default.css,v 1.26.2.22 2012/03/08 10:46:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -255,8 +255,7 @@ div.w_pane a {
 div.w_pane a:hover {
   color: #255}
 
-div.error_msg
-{
+div.error_msg {
   background-color: #FFF;
   color: red;
   padding-left:5px;
@@ -331,53 +330,38 @@ div.w_activity ul li a {
 
 
 /* welcome */
-div.w_welcome p { margin: 4px}
+div.w_welcome {}
+
+div.w_welcome p {
+  margin: 4px}
+
 div.w_welcome h3 {
   margin: 4px}
+
 div.w_welcome a {
   color: #224}
 
 /* Application summary on app tab page */
 
 /* Generic sizing overriding widget size */
-
 div.w_app_summary {
-  width: 600px;
-  margin: 5px;
   min-height: 300px;}
+
 div.w_app_summary div.w_title_bar {
   width: 595px}
+
 table.app_summary_listing {
   margin: 3px;
   font-size: 9pt}
 table.app_summary_listing th a {
   color: inherit}
 
-/* ODS-Weblog */
-
-div.w_blog_summary ul {
+div.w_db_summary ul {
   font-size: 8pt;
   list-style-type: none;
-  margin: 3px}
-div.w_blog_summary ul li a {
-  color: #444}
-
-/* ODS-Wiki */
-
-div.w_wiki_summary {}
-div.w_wiki_summary ul {
-  font-size: 8pt;
-  list-style-type: none}
-div.w_wiki_summary ul li a {
-  color: #444}
-
-/* ODS-Feed Reader */
+  padding: 0 0 0 1em;}
 
-div.w_news_summary ul {
-  font-size: 8pt;
-  list-style-type: none;
-  margin: 0}
-div.w_news_summary ul li a {
+div.w_db_summary ul li a {
   color: #444}
 
 /* User home page (myhome.vspx) */
@@ -399,103 +383,12 @@ div.w_whats_new .content_pane p {
 div.w_whats_new .w_title_bar {
   display: none}
 
-/* My Blog */
-
-div.w_my_blog {}
-div.w_my_blog ul {
-  font-size: 8pt;
-  list-style-type: none;
-  padding: 0 0 0 4px;}
-
-/* My Bookmarks */
-
-div.w_my_bookmarks {}
-div.w_my_bookmarks ul {
-  font-size: 8pt;
-  list-style-type: none;
-  padding: 0 0 0 4px;}
-
-/* My Contacts */
-
-div.w_my_addressbook {}
-div.w_my_addressbook ul {
-  font-size: 8pt;
-  list-style-type: none;
-  padding: 0 0 0 4px;}
-
-/* Feed reader */
-
-div.w_feed_reader {}
-div.w_feed_reader ul {
-  margin: 3px;
-  list-style-type: none}
-div.w_feed_reader ul li img {
-  border: 0}
-div.w_feed_reader div.footer {
-  background-color: #77d}
-table.feed_table { }
-
-/* Data Spaces */
-
-div.w_my_dataspaces {}
-div.w_my_dataspaces ul {
-  margin: 3px;
-  font-size: 8pt;
-  list-style-type: none}
-div.w_my_dataspaces ul li img {
-  border: 0}
-div.w_my_dataspaces div.footer {
-  background-color: #77d}
-
-/* Feed reader */
-
-div.w_my_news {}
-div.w_my_news ul {
-  margin: 3px;
-  font-size: 8pt;
-  list-style-type: none}
-div.w_my_news ul li img {
-  border: 0}
-div.w_my_news div.footer {
-  background-color: #77d}
-table.feed_table {}
-
-table.feed_table img { vertical-align: middle;
-  border: 0;
-  padding: 0 3px 0 0}
-
-table.feed_table td.time {
-  color: #8d9696}
-
-/* My Wiki */
-div.w_my_wiki { }
-
-div.w_my_wiki ul {
-  font-size: 8pt;
-  clear: both;
-  list-style-type: none;
-  padding: 3px}
-
-div.w_my_wiki .content_pane a {
-  color: #477}
-
-/* My Mail */
-div.w_my_mail {}
-div.w_my_mail ul {
-  font-size: 8pt;
-  clear: both;
-  list-style-type: none;
-  padding: 3px}
-div.w_my_mail p {
-  font-size: 8pt;
-  padding-left: 3px}
-
 /* My Profile */
 div.w_my_profile {
   background-color: #fff}
 div.w_my_profile table {
   border: 0;
-  margin: 8px;}
+  margin: 0.5em;}
 div.w_my_profile th {
   font-size: 8pt;
   color: #777;
@@ -525,13 +418,12 @@ div.w_my_photos ul {
   padding: 0;
   list-style-type: none}
 
-/* My Calendar */
-
-div.w_my_calendar {}
-div.w_my_calendar ul {
+/* My Instance */
+div.w_my_instance {}
+div.w_my_instance ul {
   font-size: 8pt;
   list-style-type: none;
-  padding: 0 0 0 4px;}
+  padding: 0 0 0 1em;}
 
 /* (transient) Message widget */
 
@@ -757,22 +649,24 @@ a.profile_tab {
   color: #888;
   text-decoration: none}
 
-#u_profile_r ul { list-style-type: none; padding: 0px; }
+#u_profile_r ul {
+  list-style-type: none; padding: 0px; }
 
 /* Contacts */
-
 div.contacts_ctr {
   margin: 5px;}
 
-div.contacts_ctr h2 { font-size: 12pt}
+div.contacts_ctr h2 {
+  font-size: 12pt}
+
 div.contacts_ctr ul {
   list-style-type: none;
   padding: 0;}
 
-ul.button_bar { margin: 5px; padding: 3px;}
+ul.button_bar {
+  margin: 5px; padding: 3px;}
 
 /* ODS Applications */
-
 div.app_page_hdr {
   width: 100%;
   float: left; clear: both}
@@ -795,31 +689,6 @@ div.google_map
   width: 800px;
   height: 400px}
 
-/* Site settings pages
-
-div.settings_form {
-  margin: 5px}
-
-div.settings_form label {
-  float: left;
-  clear: left;
-  width: 20em;
-  margin: 2px}
-
-div.settings_form label.rb_cb {
-  float: none;
-  clear: none;
-  width: 20em;
-  margin: 2px}
-
-div.settings_form input[type="text"]{
-  width: 40em;
-  margin: 2px;}
-
-div.settings_form input[type="radio"]{
-  clear: left;
-  margin: 2px}
-*/
 /* =BEGIN= Listing controls colorization returned back =BEGIN= */
 
 table.listing
@@ -829,50 +698,58 @@ table.listing
 
 table.listing th
 {
+  text-align: left !important;
   border-color: #FFFFFF;
   border-style: solid;
-  border-width: 0px 0px 0px 1px}
-
+  border-width: 0px 0px 0px 1px;
+}
 
-tr.listing_header_row
-{
+tr.listing_header_row {
   background-image: url(images/stl_blu1_grad.gif);
-  background-repeat: repeat-x}
+  background-repeat: repeat-x;
+}
 
-tr.listing_header_row th
-{
+tr.listing_header_row th {
   text-align: left;
-  white-space: nowrap
+  white-space: nowrap;
 }
 
-a.listing_header_row, a.listing_header_row:visited, a.listing_header_row:hover
-{
+a.listing_header_row, a.listing_header_row:visited, a.listing_header_row:hover {
   white-space: nowrap;
-  color: #000000
+  color: #000000;
 }
 
-tr.listing_row_even
-{ }
-
-tr.listing_row_odd
-{
-  background-color: #f0f0f0}
+tr.listing_row_even {
+}
 
-tr.listing_row_selected
-{
-  background-color: gray}
+tr.listing_row_odd {
+  background-color: #f0f0f0;
+}
 
-/* Listing controls colorization */
+tr.listing_row_selected {
+  background-color: gray;
+}
 
-/* ---------------- table -------------- */
+.listing_row_odd:hover, .listing_row_even:hover {
+ 	background-color: #eec;
+}
 
+tr.listing_navigation td {
+  border-color: #99B3C5;
+  border-style: solid;
+  border-width: 2px 0px 0px 0px;
+}
+/*
+tbody.colorize tr:nth-child(even)  { background-color:#fff; }
+tbody.colorize tr:nth-child(odd) { background-color:#f0f0f0; }
+*/
+/* table */
 table.grid {
 	border-collapse: collapse;
 	font: menu;
 }
 
-/* ---------------- rows -------------- */
-
+/* rows */
 .grid tr {
 	border-left: 1px solid #000;
 	border-right: 1px solid #000;
@@ -895,8 +772,7 @@ table.grid {
 	background-color: #aac;
 }
 
-/* ---------------- cols -------------- */
-
+/* cols  */
 .grid thead td {
 	background-color: #ebeadb;
 	font-weight: bold;
@@ -1054,7 +930,7 @@ a.img_button {
   color: #FFFFFF;
   font-size: 0.8em;
   font-weight: bold;
-  padding: 3px 4px 1px;
+  padding: 2px 2px 1px;
   text-decoration:none;
 }
 
@@ -1074,14 +950,35 @@ span.button {
   color: #FFFFFF;
   font-size: 0.8em;
   font-weight: bold;
-  padding: 3px 4px 1px;
+  padding: 2px 2px 1px;
   text-decoration:none;
+  margin-right: 1px;
 }
 
 img.button {
   margin-bottom: -3px;
 }
 
+.navi-button {
+  font-size: .8em;
+  font-family: verdana, sans-serif;
+  color: #ffffff;
+  font-weight: bold;
+  text-decoration: none;
+  margin-right: 2px;
+  padding: 0.1em 0.3em 0.1em 0.3em ;
+  border: solid 1px;
+  border-color: #7f94a5;
+  background: #99b3c5;
+	cursor: pointer;
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+}
+
+.navi-button:hover {
+  text-decoration: none;
+}
+
 div.form {
   width: 550px;
   background-color: #FFF;
@@ -1126,7 +1023,7 @@ table.form td {
 .tabs {
 	margin-top: 1.5em;
 	list-style-type: none;
-	padding-bottom: 1px;
+	padding-bottom: 0px;
 	padding-left: 0.5em;
 }
 
@@ -1187,3 +1084,75 @@ fieldset.form div label.form {
   font-weight: bold;
   text-align: right;
 }
+
+/* ODS grid */
+table.ODS_grid {
+  width: 100%;
+  background-color: white;
+  border: solid #7f94a5;
+  border-width: 1px 1px 1px 1px;
+  border-spacing: 0;
+}
+
+table.ODS_grid thead tr {
+  background-color: #b0cde4;
+}
+
+table.ODS_grid tbody tr:nth-child(odd) {
+  background-color:#f0f0f0;
+}
+
+table.ODS_grid tbody tr:nth-child(even) {
+  background-color:#fff;
+}
+
+table.ODS_grid thead tr th {
+  text-align: left !important;
+  white-space: nowrap;
+  padding-left: 3px;
+  border: solid #7f94a5;
+  border-width: 0px 1px 1px 0px;
+  background-image: url(/ods/images/stl_blu1_grad.gif);
+  background-repeat: repeat-x;
+}
+
+table.ODS_grid thead tr th[onclick] {
+  cursor: pointer;
+}
+
+table.ODS_grid thead tr th:last-child {
+  border-width: 0px 0px 1px 0px;
+}
+
+table.ODS_grid th.checkbox, table.ODS_grid td.checkbox {
+  width: 1px;
+  text-align: center;
+  margin: 0;
+  padding: 0.5px;
+}
+
+table.ODS_grid th.action, table.ODS_grid td.action {
+  width: 1px;
+  white-space: nowrap;
+}
+
+table.ODS_grid tbody tr:hover {
+ 	background-color: #eec;
+}
+
+table.ODS_grid td {
+  padding: 2px 3px;
+}
+
+table.ODS_grid tfoot td {
+  padding: 2px 3px 3px 3px;
+  border: solid #7f94a5;
+  border-width: 1px 0px 0px 0px;
+}
+
+img.resize {
+  width: auto;
+  height: auto;
+  max-height: 200px;
+  max-width: 150px;
+}
\ No newline at end of file
diff --git a/appsrc/ODS-Framework/delete_inst.vspx b/appsrc/ODS-Framework/delete_inst.vspx
index ca9416d..b820a9c 100644
--- a/appsrc/ODS-Framework/delete_inst.vspx
+++ b/appsrc/ODS-Framework/delete_inst.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: delete_inst.vspx,v 1.9.2.1 2010/09/20 10:15:19 source Exp $
+ -  $Id: delete_inst.vspx,v 1.9.2.3 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -34,32 +34,35 @@
     <v:on-init>
       <![CDATA[
         declare apps, v, i any;
+
         if (self.iid is not null)
+        {
+          select WAI_MEMBER_MODEL, WAI_IS_PUBLIC, WAI_MEMBERS_VISIBLE, WAI_INST, WAI_NAME, WAI_DESCRIPTION, WAI_TYPE_NAME
+            into self.imodel, self.is_public, self.is_visible, self.inst, self.iname, self.idesc, self.wa_type
+            from DB.DBA.WA_INSTANCE
+           where WAI_ID = self.iid;
+          self.instance_descr := self.idesc;
+          self.ihome := self.inst.wa_home_url();
+        }
+        v := null;
+        if (self.apps_ids is not null)
+        {
+          apps := split_and_decode (self.apps_ids, 0, '\0\0,');
+          v := make_array (length (apps), 'any');
+          i := 0;
+          foreach (any id in apps) do
           {
-	    select WAI_MEMBER_MODEL, WAI_IS_PUBLIC, WAI_MEMBERS_VISIBLE, WAI_INST, WAI_NAME, WAI_DESCRIPTION, WAI_TYPE_NAME into
-	    self.imodel, self.is_public, self.is_visible, self.inst, self.iname, self.idesc, self.wa_type from
-	    DB.DBA.WA_INSTANCE where WAI_ID = self.iid;
-	    self.instance_descr := self.idesc;
-	    self.ihome := self.inst.wa_home_url();
-	  }
-	v := null;
-	if (self.apps_ids is not null)
-	  {
-	    apps := split_and_decode (self.apps_ids, 0, '\0\0,');
-	    v := make_array (length (apps), 'any');
-	    i := 0;
-            foreach (any id in apps) do
-	      {
-                v[i] := atoi (id);
-	        i := i + 1;
-	      }
-	  }
-	self.apps := v;
+            v[i] := atoi (id);
+            i := i + 1;
+          }
+        }
+        self.apps := v;
       ]]>
     </v:on-init>
     <v:after-data-bind>
       <![CDATA[
         declare freeze varchar;
+
         freeze := (select WAI_IS_FROZEN from DB.DBA.WA_INSTANCE where WAI_ID = self.iid);
         if (freeze = 1 and not wa_user_is_dba (self.u_name, self.u_group))
         {
@@ -98,80 +101,107 @@
         <div class="box">
           <v:form type="simple" method="POST" name="eform1">
             <h3>You are about to delete following application(s). This operation cannot be undone. Please confirm.</h3>
-	       <?vsp if (self.iid is not null) { ?>
-	    <h2>Application Details</h2>
-	    <?vsp } else {
-	    declare wai_nam varchar;
-	    foreach (any v in self.apps) do
-	       {
-	         wai_nam := (select WAI_NAME from WA_INSTANCE where WAI_ID = v);
-	         http (wai_nam); http ('<br />');
-	       }
-	     } ?>
-	     <table  class="ctl_grp">
-	       <?vsp if (self.iid is not null) { ?>
-	       <vm:instance-settings readonly="yes"/>
-	       <?vsp } ?>
-	       <tr>
-		 <td colspan="2">
-	    <span class="fm_ctl_btn">
-                  <v:button action="simple" name="cancel1" value="Cancel">
-                    <v:on-post>
-                      <![CDATA[
-                        if (self.redir = 'security')
-                          self.vc_redirect ('security.vspx');
-                        else
-                          self.vc_redirect ('services.vspx');
-                      ]]>
-                    </v:on-post>
-                  </v:button>
-                  <v:button action="simple" name="accept1" value="Delete">
-                    <v:on-post>
-                      <![CDATA[
-                        declare inst web_app;
-                        declare h, id any;
-			declare freeze varchar;
+            <?vsp
+              if (self.iid is not null)
+              {
+            ?>
+            <h2>Application Details</h2>
+            <?vsp
+              }
+              else
+              {
+                declare wai_nam varchar;
+                foreach (any v in self.apps) do
+                {
+                  wai_nam := (select WAI_NAME from WA_INSTANCE where WAI_ID = v);
+                  http (wai_nam); http ('<br />');
+                }
+              }
+            ?>
+            <table  class="ctl_grp">
+              <?vsp
+                if (self.iid is not null)
+                {
+              ?>
+              <vm:instance-settings readonly="yes"/>
+              <?vsp
+                }
+              ?>
+              <?vsp
+                if (self.wa_type = 'oMail')
+                {
+              ?>
+              <tr>
+                <th>
+                  Do you like to delete a content of mailboxes?
+                </th>
+                <td>
+                  <v:check-box name="iDeleteAll" xhtml_id="iDeleteAll" value="1" />
+                </td>
+              </tr>
+              <?vsp
+                }
+              ?>
+              <tr>
+                <td colspan="2">
+                  <span class="fm_ctl_btn">
+                    <v:button action="simple" name="cancel1" value="Cancel">
+                      <v:on-post>
+                        <![CDATA[
+                          if (self.redir = 'security')
+                            self.vc_redirect ('security.vspx');
+                          else
+                            self.vc_redirect ('services.vspx');
+                        ]]>
+                      </v:on-post>
+                    </v:button>
+                    <v:button action="simple" name="accept1" value="Delete">
+                      <v:on-post>
+                        <![CDATA[
+                          declare inst web_app;
+                          declare h, id any;
+                          declare freeze varchar;
 
-			if (self.apps is null)
-			  self.apps := vector (self.iid);
+                          if (self.apps is null)
+                            self.apps := vector (self.iid);
 
-			foreach (any iid in self.apps) do
-			  {
-			    declare exit handler for not found {
+                          foreach (any iid in self.apps) do
+                          {
+                            declare exit handler for not found {
                               rollback work;
                               signal ('22023', 'No such application');
-			    };
+                            };
                             select WAI_IS_FROZEN, WAI_INST into freeze, inst from DB.DBA.WA_INSTANCE where WAI_ID = iid;
-
-			    if (freeze = 1 and not wa_user_is_dba (self.u_name, self.u_group))
-			    {
-			      self.vc_error_message := 'Application is frozen';
-			      self.vc_is_valid := 0;
-			      goto done;
-			    }
-			    h := udt_implements_method(inst, 'wa_drop_instance');
-			    declare exit handler for sqlstate '*'
-			    {
-			      self.vc_error_message := WA_RETRIEVE_MESSAGE(concat(__SQL_STATE,' ',__SQL_MESSAGE));
-			      self.vc_is_valid := 0;
-			      rollback work;
-			      return;
-			    };
-			    commit work;
-			    id := call (h) (inst);
-			  }
+                            if (freeze = 1 and not wa_user_is_dba (self.u_name, self.u_group))
+                            {
+                              self.vc_error_message := 'Application is frozen';
+                              self.vc_is_valid := 0;
+                              goto done;
+                            }
+                            h := udt_implements_method(inst, 'wa_drop_instance');
+                            declare exit handler for sqlstate '*'
+                            {
+                              self.vc_error_message := WA_RETRIEVE_MESSAGE (concat (__SQL_STATE, ' ', __SQL_MESSAGE));
+                              self.vc_is_valid := 0;
+                              rollback work;
+                              return;
+                            };
+                            commit work;
+                            connection_set ('deleteAll', self.iDeleteAll.ufl_selected);
+                            id := call (h) (inst);
+                          }
                         done:;
-                        if (self.redir = 'security')
-                          self.vc_redirect ('security.vspx');
-                        else
-                          self.vc_redirect ('services.vspx');
-                      ]]>
-                    </v:on-post>
-                  </v:button>
-		</span>
-	      </td>
-	    </tr>
-	      </table>
+                          if (self.redir = 'security')
+                            self.vc_redirect ('security.vspx');
+                          else
+                            self.vc_redirect ('services.vspx');
+                        ]]>
+                      </v:on-post>
+                    </v:button>
+                  </span>
+                </td>
+              </tr>
+            </table>
           </v:form>
         </div>
       </vm:body>
diff --git a/appsrc/ODS-Framework/drop.sql b/appsrc/ODS-Framework/drop.sql
index 60b5a04..7c3436e 100644
--- a/appsrc/ODS-Framework/drop.sql
+++ b/appsrc/ODS-Framework/drop.sql
@@ -1,10 +1,10 @@
 --
---  $Id: drop.sql,v 1.4.2.6 2010/09/20 10:15:19 source Exp $
+--  $Id: drop.sql,v 1.4.2.8 2012/03/08 10:46:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,7 @@ vhost_remove (lpath=>'/php/users');
 vhost_remove (lpath=>'/jsp/users');
 vhost_remove (lpath=>'/ruby/users');
 vhost_remove (lpath=>'/vsp/users');
+vhost_remove (lpath=>'/ods/webid');
 
 drop procedure WA_GET_EMAIL_TEMPLATE;
 drop procedure WA_SET_EMAIL_TEMPLATE;
diff --git a/appsrc/ODS-Framework/drop_sioc_proc.sql b/appsrc/ODS-Framework/drop_sioc_proc.sql
index 9b34c1d..6b98098 100644
--- a/appsrc/ODS-Framework/drop_sioc_proc.sql
+++ b/appsrc/ODS-Framework/drop_sioc_proc.sql
@@ -1,14 +1,14 @@
 --
 --  drop_sioc_proc
 --
---  $Id: drop_sioc_proc.sql,v 1.1.2.1 2010/09/20 10:15:19 source Exp $
+--  $Id: drop_sioc_proc.sql,v 1.1.2.2 2012/03/08 10:46:17 source Exp $
 --
 --  script to clean the old variant of the ODS RDF data support : triggers over the apps
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/drop_sioc_trig.sql b/appsrc/ODS-Framework/drop_sioc_trig.sql
index bba8e00..0dbdba0 100644
--- a/appsrc/ODS-Framework/drop_sioc_trig.sql
+++ b/appsrc/ODS-Framework/drop_sioc_trig.sql
@@ -1,14 +1,14 @@
 --
 --  sioc.sql
 --
---  $Id: drop_sioc_trig.sql,v 1.1.2.1 2010/09/20 10:15:19 source Exp $
+--  $Id: drop_sioc_trig.sql,v 1.1.2.2 2012/03/08 10:46:17 source Exp $
 --
 --  script to clean the old variant of the ODS RDF data support : triggers over the apps
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/edit_inst.vspx b/appsrc/ODS-Framework/edit_inst.vspx
index 3ed11d8..e2fef70 100644
--- a/appsrc/ODS-Framework/edit_inst.vspx
+++ b/appsrc/ODS-Framework/edit_inst.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: edit_inst.vspx,v 1.14.2.2 2010/09/20 10:15:19 source Exp $
+ -  $Id: edit_inst.vspx,v 1.14.2.3 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/edit_interests_popup.vspx b/appsrc/ODS-Framework/edit_interests_popup.vspx
index e8b7c48..c028f04 100644
--- a/appsrc/ODS-Framework/edit_interests_popup.vspx
+++ b/appsrc/ODS-Framework/edit_interests_popup.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: edit_interests_popup.vspx,v 1.2.2.1 2010/09/20 10:15:19 source Exp $
+ -  $Id: edit_interests_popup.vspx,v 1.2.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/edit_rule.vspx b/appsrc/ODS-Framework/edit_rule.vspx
index 1da184a..9d667c2 100644
--- a/appsrc/ODS-Framework/edit_rule.vspx
+++ b/appsrc/ODS-Framework/edit_rule.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: edit_rule.vspx,v 1.4.2.1 2010/09/20 10:15:19 source Exp $
+ -  $Id: edit_rule.vspx,v 1.4.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/error.vspx b/appsrc/ODS-Framework/error.vspx
index 7e72df3..26c9dac 100644
--- a/appsrc/ODS-Framework/error.vspx
+++ b/appsrc/ODS-Framework/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.5.2.1 2010/09/20 10:15:19 source Exp $
+ -  $Id: error.vspx,v 1.5.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/facebook.sql b/appsrc/ODS-Framework/facebook.sql
index 8b255b9..6741ca9 100644
--- a/appsrc/ODS-Framework/facebook.sql
+++ b/appsrc/ODS-Framework/facebook.sql
@@ -1,10 +1,10 @@
 --
---  $Id: facebook.sql,v 1.14.2.7 2010/12/10 16:04:14 source Exp $
+--  $Id: facebook.sql,v 1.14.2.10 2012/03/08 10:46:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -186,8 +186,9 @@ create method post_request(
     post_string:=string_output_string(aResult);
 
      declare ret_header, rq_header any;
-  rq_header := 'Content-type: application/x-www-form-urlencoded \r\nUser-Agent: Facebook API VSP Client 1.1';
 
+  commit work;
+  rq_header := 'Content-type: application/x-www-form-urlencoded \r\nUser-Agent: Facebook API VSP Client 1.1';
     _result:=http_get ('http://api.facebook.com/restserver.php', ret_header, 'POST', rq_header, post_string); --'127.0.0.1:8888'
      return _result;
 }
@@ -1151,27 +1152,14 @@ create procedure _get_cookie_vec (in lines any)
 ;
 
 create procedure _get_ods_fb_settings (
-  out fb_settings any,
-  in fb_user_id integer := 2)
+  out fb_settings any)
 {
-   declare dba_options,fb_dba_options any;
-   declare exit handler for sqlstate '*' {return 0;};
-
    fb_settings := null;
-  fb_dba_options := null;
-   dba_options := (select US_KEY from WA_USER_SVC where US_U_ID = fb_user_id and US_SVC = 'FBKey');
-   if(length(dba_options) >0)
+  for (select a_key, a_secret from OAUTH.DBA.APP_REG where a_owner = 0 and a_name = 'Facebook API') do
    {
-     fb_dba_options:=replace(dba_options,'\r\n','&');
-     fb_dba_options:=replace(fb_dba_options,'\n','&');
-     fb_dba_options:=split_and_decode(fb_dba_options);
-   }
-  if (fb_dba_options is not null and length(trim(get_keyword('key',fb_dba_options)))> 4 and length(trim(get_keyword('secret',fb_dba_options)))> 4)
-   {
-      fb_settings:=vector(trim(get_keyword('key',fb_dba_options)),trim(get_keyword('secret',fb_dba_options)));
+    fb_settings := vector (a_key, a_secret);
       return 1;
    }
-
    return 0;
 }
 ;
diff --git a/appsrc/ODS-Framework/facebook_helper.vsp b/appsrc/ODS-Framework/facebook_helper.vsp
index ec0487a..5aed350 100644
--- a/appsrc/ODS-Framework/facebook_helper.vsp
+++ b/appsrc/ODS-Framework/facebook_helper.vsp
@@ -1,14 +1,14 @@
 <?vsp
 --   search_ajax.vsp
 --
---   $Id: facebook_helper.vsp,v 1.6.2.1 2010/09/20 10:15:20 source Exp $
+--   $Id: facebook_helper.vsp,v 1.6.2.2 2012/03/08 10:46:17 source Exp $
 --
 --   AJAX Handler for the google map control
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/faq.html b/appsrc/ODS-Framework/faq.html
index 5dda372..ee5bace 100644
--- a/appsrc/ODS-Framework/faq.html
+++ b/appsrc/ODS-Framework/faq.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: faq.html,v 1.6.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: faq.html,v 1.6.2.2 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/fb_front.vspx b/appsrc/ODS-Framework/fb_front.vspx
index c102b5b..dcd9e51 100644
--- a/appsrc/ODS-Framework/fb_front.vspx
+++ b/appsrc/ODS-Framework/fb_front.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: fb_front.vspx,v 1.15.2.8 2010/09/20 10:15:20 source Exp $
+ -  $Id: fb_front.vspx,v 1.15.2.9 2012/03/08 10:46:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/fb_popup.vspx b/appsrc/ODS-Framework/fb_popup.vspx
index a6e82c1..7a8506f 100644
--- a/appsrc/ODS-Framework/fb_popup.vspx
+++ b/appsrc/ODS-Framework/fb_popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: fb_popup.vspx,v 1.2.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: fb_popup.vspx,v 1.2.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/foaf.xml b/appsrc/ODS-Framework/foaf.xml
index a75c1ed..ac4a1ec 100644
--- a/appsrc/ODS-Framework/foaf.xml
+++ b/appsrc/ODS-Framework/foaf.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: foaf.xml,v 1.3.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: foaf.xml,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/foaf.xsl b/appsrc/ODS-Framework/foaf.xsl
index cea3066..eec6e8a 100644
--- a/appsrc/ODS-Framework/foaf.xsl
+++ b/appsrc/ODS-Framework/foaf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: foaf.xsl,v 1.7.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: foaf.xsl,v 1.7.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/freeze.vspx b/appsrc/ODS-Framework/freeze.vspx
index cf08978..112cd29 100644
--- a/appsrc/ODS-Framework/freeze.vspx
+++ b/appsrc/ODS-Framework/freeze.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: freeze.vspx,v 1.4.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: freeze.vspx,v 1.4.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/gdata.sql b/appsrc/ODS-Framework/gdata.sql
index 57e2a76..bed1c21 100644
--- a/appsrc/ODS-Framework/gdata.sql
+++ b/appsrc/ODS-Framework/gdata.sql
@@ -1,13 +1,13 @@
 --
 --
---  $Id: gdata.sql,v 1.36.2.1 2010/09/20 10:15:20 source Exp $
+--  $Id: gdata.sql,v 1.36.2.2 2012/03/08 10:46:18 source Exp $
 --
 --  Atom publishing protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/generic.vspx b/appsrc/ODS-Framework/generic.vspx
index 5b2428b..27b6aad 100644
--- a/appsrc/ODS-Framework/generic.vspx
+++ b/appsrc/ODS-Framework/generic.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: generic.vspx,v 1.5.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: generic.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/get_tags_popup.vspx b/appsrc/ODS-Framework/get_tags_popup.vspx
index 133448c..952a97e 100644
--- a/appsrc/ODS-Framework/get_tags_popup.vspx
+++ b/appsrc/ODS-Framework/get_tags_popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: get_tags_popup.vspx,v 1.5.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: get_tags_popup.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/gtags.vspx b/appsrc/ODS-Framework/gtags.vspx
index 27871e5..3176e17 100644
--- a/appsrc/ODS-Framework/gtags.vspx
+++ b/appsrc/ODS-Framework/gtags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: gtags.vspx,v 1.6.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: gtags.vspx,v 1.6.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/help.vspx b/appsrc/ODS-Framework/help.vspx
index 5e97707..9f7121b 100644
--- a/appsrc/ODS-Framework/help.vspx
+++ b/appsrc/ODS-Framework/help.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: help.vspx,v 1.5.2.1 2010/09/20 10:15:20 source Exp $
+ -  $Id: help.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/home.vspx b/appsrc/ODS-Framework/home.vspx
index d84c5d9..c4957c7 100644
--- a/appsrc/ODS-Framework/home.vspx
+++ b/appsrc/ODS-Framework/home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: home.vspx,v 1.16.2.2 2010/09/20 10:15:21 source Exp $
+ -  $Id: home.vspx,v 1.16.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/home.xsl b/appsrc/ODS-Framework/home.xsl
index 67913da..7b123dc 100644
--- a/appsrc/ODS-Framework/home.xsl
+++ b/appsrc/ODS-Framework/home.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: home.xsl,v 1.3.2.1 2010/09/20 10:15:21 source Exp $
+ -  $Id: home.xsl,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/hosted_services.sql b/appsrc/ODS-Framework/hosted_services.sql
index 88e9834..bd0f438 100644
--- a/appsrc/ODS-Framework/hosted_services.sql
+++ b/appsrc/ODS-Framework/hosted_services.sql
@@ -1,10 +1,10 @@
 --
---  $Id: hosted_services.sql,v 1.79.2.39 2011/02/03 10:26:15 source Exp $
+--  $Id: hosted_services.sql,v 1.79.2.55 2012/03/12 17:41:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -251,6 +251,8 @@ wa_exec_no_error_log(
     WAU_ANSWER varchar,
     WAU_LAST_IP varchar,
     WAU_TEMPLATE varchar,
+    WAU_LOGON_DISABLE_UNTIL datetime,
+    WAU_PWD_RECOVER_DISABLE_UNTIL datetime,
     primary key (WAU_U_ID)
   )'
 )
@@ -308,7 +310,7 @@ wa_exec_no_error(
     WAT_REALM varchar,
     WAT_DESCRIPTION varchar,
      WAT_OPTIONS long varchar,
-
+    WAT_MAXINST integer,
       primary key (WAT_NAME)
     )'
 )
@@ -428,6 +430,7 @@ wa_exec_no_error(
      WAM_HOME_PAGE varchar,
      WAM_APP_TYPE varchar,
      WAM_DATA any, -- app dependent, e.g. last payment info, other.
+     WAM_STATUS int,
        primary key (WAM_USER, WAM_INST, WAM_MEMBER_TYPE)
     )'
 )
@@ -482,6 +485,21 @@ wa_member_upgrade()
 drop procedure wa_member_upgrade
 ;
 
+create procedure wa_instance_upgrade() {
+
+  if (registry_get ('__wa_instance_upgrade') = 'done')
+    return;
+
+  delete from DB.DBA.WA_INSTANCE where wai_name not in (select WAM_INST from  DB.DBA.WA_MEMBER);
+  registry_set ('__wa_instance_upgrade', 'done');
+}
+;
+
+wa_instance_upgrade()
+;
+drop procedure wa_instance_upgrade
+;
+
 
 wa_exec_no_error(
   'CREATE TABLE WA_MEMBER_INSTCOUNT
@@ -1706,6 +1724,15 @@ create procedure wa_check_app (
 }
 ;
 
+create procedure wa_check_owner_app (
+  in wad_type varchar,
+  in app_type varchar,
+  in user_id integer)
+{
+  return case when (wa_check_package (wad_type) and exists (select 1 from DB.DBA.WA_MEMBER where WAM_APP_TYPE = app_type and WAM_MEMBER_TYPE = 1 and WAM_USER = user_id)) then 1 else 0 end;
+}
+;
+
 create procedure wa_vad_check (in pname varchar)
 {
   declare nam varchar;
@@ -1720,12 +1747,24 @@ create procedure wa_vad_check (in pname varchar)
 }
 ;
 
+create trigger SYS_USERS_WA_AU after update on "DB"."DBA"."SYS_USERS" order 66 referencing old as O, new as N
+{
+  declare name varchar;
+
+  name := connection_get ('WA_USER_DISABLED');
+  if (not isnull (name))
+    return;
 
-create trigger SYS_USERS_ON_DELETE_WA_FK before delete
- on "DB"."DBA"."SYS_USERS" order 66 referencing old as O
+  if (O.U_ACCOUNT_DISABLED <> N.U_ACCOUNT_DISABLED)
+    DB.DBA.WA_USER_SETTING_SET (N.U_NAME, 'DISABLED_BY', 'dav');
+}
+;
+
+create trigger SYS_USERS_ON_DELETE_WA_FK before delete on "DB"."DBA"."SYS_USERS" order 66 referencing old as O
 {
-   ODS_DELETE_USER_DATA(O.U_NAME);
-};
+  ODS_DELETE_USER_DATA(O.U_NAME);
+}
+;
 
 insert soft WA_MEMBER_MODEL (WMM_ID, WMM_NAME) values (0, 'Open')
 ;
@@ -1999,7 +2038,7 @@ create procedure WA_MAIL_TEMPLATES(in templ varchar,
 }
 ;
 
-
+-- /* imitialize server settings */
 create procedure INIT_SERVER_SETTINGS ()
 {
   declare cnt integer;
@@ -2057,13 +2096,13 @@ create procedure INIT_SERVER_SETTINGS ()
 	     'Enter your User ID and Password',
 	     '',
 	     '',
-	     'Copyright © 1998-2011 OpenLink Software',
+	     'Copyright © 1998-2012 OpenLink Software',
 	     '',
 	     sys_stat ('st_host_name'),
 	     1
 	    );
   }
-  update WA_SETTINGS set WS_COPYRIGHT = 'Copyright © 1998-2011 OpenLink Software';
+  update WA_SETTINGS set WS_COPYRIGHT = 'Copyright © 1998-2012 OpenLink Software';
 
   update WA_SETTINGS
      set WS_WELCOME_MESSAGE =
@@ -3328,7 +3367,7 @@ wa_exec_no_error_log(
     WAUI_BORG_HOMEPAGE long varchar,  -- 20 same as BORG
     WAUI_OPENID_URL varchar,
     WAUI_OPENID_SERVER varchar,
-    WAUI_FACEBOOK_ID integer,
+    WAUI_FACEBOOK_ID integer,           -- XXX: obsolete, see WA_USER_OL_ACCOUNTS
     WAUI_IS_ORG	int default 0,
     WAUI_APP_ENABLE	int default 0,
     WAUI_SPB_ENABLE	int default 0,
@@ -3345,6 +3384,7 @@ wa_exec_no_error_log(
     WAUI_CERT long varbinary,		-- same as above
     WAUI_ACL LONG VARCHAR,
     WAUI_SALMON_KEY varchar, 
+    WAUI_SETTINGS LONG VARCHAR,
 
     primary key (WAUI_U_ID)
   )'
@@ -3398,6 +3438,8 @@ wa_add_col ('DB.DBA.WA_USER_INFO', 'WAUI_HPHONE_EXT', 'varchar(5)');
 wa_add_col ('DB.DBA.WA_USER_INFO', 'WAUI_ACL', 'LONG VARCHAR');
 wa_add_col ('DB.DBA.WA_USER_INFO', 'WAUI_SALMON_KEY', 'VARCHAR');
 
+wa_add_col ('DB.DBA.WA_USER_INFO', 'WAUI_SETTINGS', 'LONG VARCHAR');
+
 wa_exec_no_error ('create index WA_USER_INFO_CERT_FINGERPRINT on DB.DBA.WA_USER_INFO (WAUI_CERT_FINGERPRINT)');
 
 create procedure WA_USER_INFO_WAUI_FOAF_UPGRADE ()
@@ -3530,6 +3572,25 @@ create procedure WA_MAKE_NICK (in nick varchar)
 }
 ;
 
+create procedure WA_MAKE_NICK2 (
+  in nick varchar,
+  in name varchar := '',
+  in firstName varchar := '',
+  in familyName varchar := '')
+{
+  if (not is_empty_or_null (nick))
+    return nick;
+
+  nick := replace (name, ' ', '');
+  if (not is_empty_or_null (nick))
+    return nick;
+
+  nick := replace (firstName || familyName, ' ', '');
+
+  return WA_MAKE_NICK (nick);
+}
+;
+
 create trigger WA_USER_INFO_I after insert on WA_USER_INFO referencing new as N
 {
   if (N.WAUI_JOIN_DATE is null)
@@ -3700,6 +3761,18 @@ wa_add_col('DB.DBA.WA_USER_OL_ACCOUNTS', 'WUO_OAUTH_SID', 'varchar');
 
 wa_exec_no_error_log('ALTER TABLE DB.DBA.WA_USER_OL_ACCOUNTS ADD FOREIGN KEY (WUO_U_ID) REFERENCES DB.DBA.SYS_USERS (U_ID) ON DELETE CASCADE');
 
+create procedure WA_USER_OL_ACCOUNTS_FACEBOOK (in ID integer)
+{
+  return sprintf ('http://facebook.com/profile.php?id=%s', cast (ID as varchar));
+}
+;
+
+create procedure WA_USER_OL_ACCOUNTS_TWITTER (in ID integer)
+{
+  return sprintf ('http://twitter.com/%U', cast (ID as varchar));
+}
+;
+
 create procedure WA_USER_OL_ACCOUNTS_SET_UP ()
 {
   if (registry_get ('__WA_USER_OL_ACCOUNTS_SET_UP') = 'done')
@@ -3707,17 +3780,56 @@ create procedure WA_USER_OL_ACCOUNTS_SET_UP ()
   registry_set ('__WA_USER_OL_ACCOUNTS_SET_UP', 'done');
 
   update WA_USER_OL_ACCOUNTS set WUO_TYPE = 'P' where WUO_TYPE is null;
-};
+}
+;
 WA_USER_OL_ACCOUNTS_SET_UP ();
 
+create procedure WA_USER_OL_ACCOUNTS_URI (
+  in url varchar)
+{
+  declare rc varchar;
+
+  rc := null;
+  if (__proc_exists ('DB.DBA.RDF_PROXY_ENTITY_IRI'))
+    rc := DB.DBA.RDF_PROXY_ENTITY_IRI(url);
+  if (isnull (rc))
+    rc := url || '#this';
+
+  return rc;
+}
+;
+
 create procedure WA_USER_OL_ACCOUNTS_SET_UP ()
 {
   if (registry_get ('__WA_USER_OL_ACCOUNTS_SET_UP2') = 'done')
     return;
   registry_set ('__WA_USER_OL_ACCOUNTS_SET_UP2', 'done');
 
-  update WA_USER_OL_ACCOUNTS set WUO_URI = ODS.ODS_API."user.onlineAccounts.uri"(WUO_URL) where WUO_URI is null;
+  update WA_USER_OL_ACCOUNTS set WUO_URI = WA_USER_OL_ACCOUNTS_URI (WUO_URL) where WUO_URI is null;
+}
+;
+WA_USER_OL_ACCOUNTS_SET_UP ();
+
+create procedure WA_USER_OL_ACCOUNTS_SET_UP ()
+{
+  declare url varchar;
+
+  if (registry_get ('__WA_USER_OL_ACCOUNTS_SET_UP3') = 'done')
+    return;
+
+  registry_set ('__WA_USER_OL_ACCOUNTS_SET_UP3', 'done');
+
+  for (select WAUI_U_ID, WAUI_FACEBOOK_ID from DB.DBA.WA_USER_INFO where DB.DBA.is_empty_or_null (WAUI_FACEBOOK_ID) = 0) do
+  {
+    if (not exists (select 1 from DB.DBA.WA_USER_OL_ACCOUNTS where WUO_U_ID = WAUI_U_ID and WUO_TYPE = 'P' and lcase (WUO_NAME) = 'facebook'))
+    {
+      url := WA_USER_OL_ACCOUNTS_FACEBOOK (WAUI_FACEBOOK_ID);
+      insert into DB.DBA.WA_USER_OL_ACCOUNTS (WUO_U_ID, WUO_TYPE,  WUO_NAME, WUO_URL, WUO_URI)
+        values (WAUI_U_ID, 'P', 'Facebook', url, ODS.ODS_API."user.onlineAccounts.uri" (url));
+    }
+  }
 };
+WA_USER_OL_ACCOUNTS_SET_UP ();
 
 create procedure WA_USER_OL_ACCOUNTS_UPGRADE ()
 {
@@ -3732,8 +3844,6 @@ create procedure WA_USER_OL_ACCOUNTS_UPGRADE ()
 }
 ;
 
-WA_USER_OL_ACCOUNTS_UPGRADE ();
-
 wa_exec_no_error_log(
     'CREATE TABLE WA_USER_RELATED_RES (
       WUR_ID int identity,
@@ -4093,7 +4203,7 @@ create procedure WA_USER_SET_INFO (in _name varchar,in _fname varchar,in _lname
 }
 ;
 
-create procedure WA_USER_EDIT (in _name varchar,in _key varchar,in _data any)
+create procedure WA_USER_EDIT (in _name varchar, in _key varchar, in _data any)
 {
   declare _uid any;
   declare i int;
@@ -4257,20 +4367,17 @@ create procedure WA_USER_EDIT (in _name varchar,in _key varchar,in _data any)
     UPDATE WA_USER_INFO SET WAUI_OPENID_URL = _data WHERE WAUI_U_ID = _uid;
   else if (_key = 'WAUI_OPENID_SERVER')
     UPDATE WA_USER_INFO SET WAUI_OPENID_SERVER = _data WHERE WAUI_U_ID = _uid;
-  else if (_key = 'WAUI_FACEBOOK_ID')
-    UPDATE WA_USER_INFO SET WAUI_FACEBOOK_ID = _data WHERE WAUI_U_ID = _uid;
   else if (_key = 'WAUI_APP_ENABLE')
     UPDATE WA_USER_INFO SET WAUI_APP_ENABLE = _data WHERE WAUI_U_ID = _uid;
   else if (_key = 'WAUI_SPB_ENABLE')
     UPDATE WA_USER_INFO SET WAUI_SPB_ENABLE = _data WHERE WAUI_U_ID = _uid;
-  else if (_key = 'WAUI_CERT_LOGIN')
-    UPDATE WA_USER_INFO SET WAUI_CERT_LOGIN = _data WHERE WAUI_U_ID = _uid;
-  else if (_key = 'WAUI_CERT')
-    UPDATE WA_USER_INFO SET WAUI_CERT = _data WHERE WAUI_U_ID = _uid;
 
   else if (_key = 'WAUI_ACL')
     UPDATE WA_USER_INFO SET WAUI_ACL = _data WHERE WAUI_U_ID = _uid;
 
+  else if (_key = 'WAUI_SETTINGS')
+    UPDATE WA_USER_INFO SET WAUI_SETTINGS = _data WHERE WAUI_U_ID = _uid;
+
   return row_count ();
 
  nf:
@@ -4336,6 +4443,35 @@ create procedure WA_USER_VISIBILITY (in _name varchar, in _arr any default null,
 }
 ;
 
+create procedure WA_USER_SETTING_SET (in _name varchar, in _key varchar, in _data any)
+{
+  declare _uid any;
+  declare _settings any;
+
+  _uid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = _name);
+  _settings := (select deserialize (WAUI_SETTINGS) from DB.DBA.WA_USER_INFO where WAUI_U_ID = _uid);
+  if (isnull (_settings))
+    _settings := vector ();
+
+  ODS.ODS_API.set_keyword (_key, _settings, _data);
+  WA_USER_EDIT (_name, 'WAUI_SETTINGS', serialize (_data));
+}
+;
+
+create procedure WA_USER_SETTING_GET (in _name varchar, in _key varchar)
+{
+  declare _uid any;
+  declare _settings any;
+
+  _uid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = _name);
+  _settings := (select deserialize (WAUI_SETTINGS) from DB.DBA.WA_USER_INFO where WAUI_U_ID = _uid);
+  if (isnull(_settings))
+    return null;
+
+  return get_keyword (_key, _settings);
+}
+;
+
 create procedure WA_REPLACE_ARR ( inout _vector any, in _pos integer,in _val varchar )
 {
   declare _ind integer;
@@ -5716,7 +5852,35 @@ create procedure wa_wa_member_upgrade ()
 }
 ;
 
+create procedure WA_FOAF_UPGRADE ()
+{
+  declare tmp, access, uname, visibility any;
+
+  if (registry_get ('WA_FOAF_UPGRADE') = 'done')
+    return;
+
+  for (select WAUI_U_ID, WAUI_FOAF from DB.DBA.WA_USER_INFO) do
+  {
 
+  	uname := (select U_NAME from DB.DBA.SYS_USERS where U_ID = WAUI_U_ID);
+  	if (not isnull (uname))
+  	{
+      visibility := WA_USER_VISIBILITY (uname);
+      access := visibility[8];
+      tmp := '';
+      for (select interest from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar) P where txt = WAUI_FOAF) do
+      {
+         tmp := tmp || interest || ';' || cast (access as varchar) || '\n';
+      }
+      WA_USER_EDIT (uname, 'WAUI_FOAF', tmp);
+    }
+  }
+
+  registry_set ('WA_FOAF_UPGRADE', 'done');
+}
+;
+WA_FOAF_UPGRADE ()
+;
 
 create procedure wa_get_new_url (in app_type varchar, in asid varchar, in arealm varchar)
 {
@@ -5784,8 +5948,8 @@ create procedure wa_get_type_from_name (in _name varchar)
   return 0;
 }
 ;
-
-wa_wa_member_upgrade ();
+wa_wa_member_upgrade ()
+;
 
 create procedure wa_keywords_sift (inout pKW any, in pSiftList any,in pPrefix any,in pOut integer := 0)
 {
@@ -6987,7 +7151,7 @@ return get_keyword(type_name,arr,'');
 
 -- this function returns the name of the package that has defined a specific WA_TYPE
 -- it will make possible to check if package is installed on the system or the type is for custom applications that do not have package-build script.
--- it includes only the applications  created by Openlink Software developers
+-- it includes only the applications  created by OpenLink Software developers
 
 create procedure wa_get_package_name (in type_name varchar)
 { declare arr any;
@@ -7310,12 +7474,7 @@ WA_UPGRADE_USER_SVC ()
 
 create procedure http_s ()
 {
-
-  if(is_https_ctx ())
-     return 'https://';
-  else
-     return 'http://';
-
+  return case when (is_https_ctx ()) then 'https://' else 'http://' end;
 }
 ;
 
@@ -7358,7 +7517,7 @@ create procedure  ods_bar_css (in img_path varchar) {
 
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_user_home_rule',
     1,
-    '/~(.*)',
+    '^/~(.*)',
     vector('uname'),
     1,
     '/home/%s',
@@ -7391,6 +7550,18 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
 
 DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_user_home_rulelist', 1, vector ('ods_user_home_rule', 'ods_user_public_home_rule', 'ods_root_rule'));
 
+create procedure ods_mv_desc ()
+{
+  declare str any;
+  str := sprintf ('%U', 'describe ?o from <http://localhost/mv> 
+  where { ?s ?p ?o option (transitive, t_in (?o), t_out (?s)) . 
+    filter (?s = <http://HOST/mv/data/LOCAL> ) }');
+  str := replace (str, 'HOST', '^{URIQADefaultHost}^');
+  str := replace (str, '%', '%%');
+  str := replace (str, 'LOCAL', '%s');
+  return str;
+};
+    
 
 create procedure ods_define_common_vd (in _host varchar, in _lhost varchar, in isdav int := 1)
 {
@@ -7415,25 +7586,150 @@ create procedure ods_define_common_vd (in _host varchar, in _lhost varchar, in i
   DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/ods/users',
       ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
 
+  -- JS & HTML
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_javascript_users_rule',
+      1,
+      '/javascript/users',
+      vector('dummy'),
+      0,
+      '/javascript/users/users.html',
+      vector(),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_javascript_users_rule2',
+      1,
+      '/javascript/users/~([^/#\\?]*)',
+      vector('user'),
+      1,
+      '/javascript/users/users.html?userName=%U',
+      vector('user'),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_javascript_users_list', 1, vector('ods_javascript_users_rule', 'ods_javascript_users_rule2'));
   DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/javascript/users');
   DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/javascript/users',
-      ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
-
+      ppath=>'/vad/vsp/wa/users', def_page=>'users.html', vsp_user=>'dba', is_dav=>0, is_brws=>0, opts=>vector ('url_rewrite', 'ods_javascript_users_list'), sec=>_sec, auth_opts=>_opts);
+
+  -- PHP
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_php_users_rule',
+      1,
+      '/php/users',
+      vector('dummy'),
+      0,
+      '/php/users/users.php',
+      vector(),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_php_users_rule2',
+      1,
+      '/php/users/~([^/#\\?]*)',
+      vector('user'),
+      1,
+      '/php/users/users.php?userName=%U',
+      vector('user'),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_php_users_list', 1, vector('ods_php_users_rule', 'ods_php_users_rule2'));
   DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/php/users');
   DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/php/users',
-      ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
-
+      ppath=>'/vad/vsp/wa/users', def_page=>'users.php', vsp_user=>'dba', is_dav=>0, is_brws=>0, opts=>vector ('url_rewrite', 'ods_php_users_list'), sec=>_sec, auth_opts=>_opts);
+
+  -- JSP
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_jsp_users_rule',
+      1,
+      '/jsp/users',
+      vector('dummy'),
+      0,
+      '/jsp/users/users.jsp',
+      vector(),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_jsp_users_rule2',
+      1,
+      '/jsp/users/~([^/#\\?]*)',
+      vector('user'),
+      1,
+      '/jsp/users/users.jsp?userName=%U',
+      vector('user'),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_jsp_users_list', 1, vector('ods_jsp_users_rule', 'ods_jsp_users_rule2'));
   DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/jsp/users');
   DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/jsp/users',
-      ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
-
+      ppath=>'http://localhost:8080/users/jsp', def_page=>'users.jsp', vsp_user=>'dba', is_dav=>0, is_brws=>0, opts=>vector ('url_rewrite', 'ods_jsp_users_list'), sec=>_sec, auth_opts=>_opts);
+
+  -- Ruby
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_ruby_users_rule',
+      1,
+      '/ruby/users',
+      vector('dummy'),
+      0,
+      '/ruby/users/users.rb',
+      vector(),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_ruby_users_rule2',
+      1,
+      '/ruby/users/~([^/#\\?]*)',
+      vector('user'),
+      1,
+      '/ruby/users/users.rb?userName=%U',
+      vector('user'),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_ruby_users_list', 1, vector('ods_ruby_users_rule', 'ods_ruby_users_rule2'));
   DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/ruby/users');
   DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/ruby/users',
-      ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
-
+      ppath=>'/vad/vsp/wa/users', def_page=>'users.rb', vsp_user=>'dba', is_dav=>0, is_brws=>0, opts=>vector ('url_rewrite', 'ods_ruby_users_list'), sec=>_sec, auth_opts=>_opts);
+
+  -- VSP
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_vsp_users_rule',
+      1,
+      '/vsp/users',
+      vector('dummy'),
+      0,
+      '/vsp/users/users.vsp',
+      vector(),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
+      'ods_vsp_users_rule2',
+      1,
+      '/vsp/users/~([^/#\\?]*)',
+      vector('user'),
+      1,
+      '/vsp/users/users.vsp?userName=%U',
+      vector('user'),
+      NULL,
+      NULL,
+      2);
+  DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_vsp_users_list', 1, vector('ods_vsp_users_rule', 'ods_vsp_users_rule2'));
   DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/vsp/users');
   DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/vsp/users',
-      ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
+      ppath=>'/vad/vsp/wa/users', def_page=>'users.vsp', vsp_user=>'dba', is_dav=>0, is_brws=>0, opts=>vector ('url_rewrite', 'ods_vsp_users_list'), sec=>_sec, auth_opts=>_opts);
+
+  -- WebID pages
+  DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/ods/webid');
+  DB.DBA.VHOST_DEFINE (vhost=>_host,lhost=>_lhost,lpath=>'/ods/webid',
+      ppath=>'/vad/vsp/wa/webid', is_dav=>0, vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
 
   -- RDF folder
   DB.DBA.VHOST_REMOVE (vhost=>_host,lhost=>_lhost,lpath=>'/ods/data/rdf');
@@ -7480,6 +7776,18 @@ create procedure ods_define_common_vd (in _host varchar, in _lhost varchar, in i
   DB.DBA.VHOST_DEFINE (vhost=>_host, lhost=>_lhost, lpath=>'/about', ppath=>'/SOAP/Http/ext_http_proxy', soap_user=>'PROXY',
       opts=>vector('url_rewrite', 'ext_about_http_proxy_rule_list1'), sec=>_sec, auth_opts=>_opts);
 
+  -- mail verification service
+  DB.DBA.VHOST_REMOVE (vhost=>_host, lhost=>_lhost, lpath=>'/mv');
+  DB.DBA.VHOST_DEFINE (lhost=>_lhost, vhost=>_host, lpath=>'/mv', ppath=>'/DAV/VAD/wa/', is_dav=>isdav, def_page=>'mv.vsp', vsp_user=>'dba', sec=>_sec, auth_opts=>_opts);
+  DB.DBA.VHOST_REMOVE (vhost=>_host, lhost=>_lhost, lpath=>'/mv/data');
+  DB.DBA.VHOST_DEFINE (lhost=>_lhost, vhost=>_host, lpath=>'/mv/data', ppath=>'/DAV/VAD/wa/', is_dav=>isdav, def_page=>'', vsp_user=>'SPARQL', opts=>vector ('url_rewrite', 'ods_mv_rule_list_1'), sec=>_sec, auth_opts=>_opts);
+  DB.DBA.URLREWRITE_CREATE_RULELIST ( 'ods_mv_rule_list_1', 1, vector ('ods_mv_rule_1'));
+
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'ods_mv_rule_1', 1, '/mv/data/(.*)\x24', vector ('par_1'), 1,
+      '/sparql?query='||ods_mv_desc()||'&format=%U',
+      vector ('par_1', '*accept*'), NULL, NULL, 2, 303, '');
+
+
   if (exists (select 1 from DB.DBA.HTTP_PATH where HP_HOST = _host and HP_LISTEN_HOST = _lhost and HP_LPATH = '/DAV'))
     {
   if (not (exists (select 1 from DB.DBA.HTTP_PATH where HP_HOST = _host and HP_LISTEN_HOST = _lhost and HP_LPATH = '/')))
@@ -7977,3 +8285,57 @@ create procedure ods_user_keys (in username varchar)
 }
 ;
 
+create procedure wa_show_column_header (
+  in columnLabel varchar,
+  in columnName varchar,
+  in sortOrder varchar,
+  in sortDirection varchar := 'asc',
+  in columnProperties varchar := '')
+{
+  declare class, image, onclick any;
+
+  image := '';
+  onclick := sprintf ('onclick="javascript: odsPost(this, [\'sortColumn\', \'%s\']);"', columnName);
+  if (sortOrder = columnName)
+  {
+    if (sortDirection = 'desc')
+    {
+      image := ' <img src="/ods/images/icons/orderdown_16.png" border="0" alt="Down"/>';
+    }
+    else if (sortDirection = 'asc')
+    {
+      image := ' <img src="/ods/images/icons/orderup_16.png" border="0" alt="Up"/>';
+    }
+  }
+  return sprintf ('<th %s %s>%s%s</th>', columnProperties, onclick, columnLabel, image);
+}
+;
+
+create procedure wa_webid_users (
+  in user_id integer)
+{
+  declare S, st, msg, meta, rows any;
+  declare c1, c2, c3 varchar;
+
+  result_names (c1, c2, c3);
+  for (select 'Person' F1, SIOC..person_iri (SIOC..user_iri (U_ID)) F2, '' F3
+         from DB.DBA.SYS_USERS
+        where U_IS_ROLE = 0 and U_DAV_ENABLE = 1 and U_ACCOUNT_DISABLED = 0) do
+  {
+    result (F1, F2, F3);
+  }
+  if (DB.DBA.wa_check_app ('AddressBook', user_id))
+  {
+    S := sprintf ('select ''Person'' F1, a.P_IRI F2, a.P_NAME F3 from AB.WA.PERSONS a, DB.DBA.WA_MEMBER b, DB.DBA.WA_INSTANCE c where a.P_DOMAIN_ID = c.WAI_ID and c.WAI_TYPE_NAME = ''AddressBook'' and c.WAI_NAME = b.WAM_INST and B.WAM_MEMBER_TYPE = 1 and b.WAM_USER = %d and DB.DBA.is_empty_or_null (a.P_IRI) <> 1', user_id);
+    st := '00000';
+    exec (S, st, msg, vector(), 0, meta, rows);
+    if (st = '00000')
+    {
+      foreach (any row in rows) do
+      {
+        result (row[0], row[1], row[2]);
+      }
+    }
+  }
+}
+;
diff --git a/appsrc/ODS-Framework/href_export.xml b/appsrc/ODS-Framework/href_export.xml
index 5f34e26..f04b889 100644
--- a/appsrc/ODS-Framework/href_export.xml
+++ b/appsrc/ODS-Framework/href_export.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -  
- -  $Id: href_export.xml,v 1.1.2.1 2010/09/20 10:15:21 source Exp $
+ -  $Id: href_export.xml,v 1.1.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/image.vsp b/appsrc/ODS-Framework/image.vsp
index ed3a022..3538eba 100644
--- a/appsrc/ODS-Framework/image.vsp
+++ b/appsrc/ODS-Framework/image.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: image.vsp,v 1.3.2.1 2010/09/20 10:15:21 source Exp $
+--  $Id: image.vsp,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/images/yacutia_style_alt.htm b/appsrc/ODS-Framework/images/yacutia_style_alt.htm
index 5d42c52..d66697b 100644
--- a/appsrc/ODS-Framework/images/yacutia_style_alt.htm
+++ b/appsrc/ODS-Framework/images/yacutia_style_alt.htm
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <!--
  -
- -  $Id: yacutia_style_alt.htm,v 1.2.2.1 2010/09/20 10:15:35 source Exp $
+ -  $Id: yacutia_style_alt.htm,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/index.html b/appsrc/ODS-Framework/index.html
index 811b912..d5bd3b7 100644
--- a/appsrc/ODS-Framework/index.html
+++ b/appsrc/ODS-Framework/index.html
@@ -26,6 +26,7 @@
 
     <title>Personal Data Space Explorer</title>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+    <link rel="stylesheet" href="default.css" type="text/css"/>
     <link rel="stylesheet" href="nav_framework.css" type="text/css"/>
     <!-- #META# -->
     <script type="text/javascript">
@@ -368,6 +369,10 @@ if ((document.location.href.indexOf ('/dataspace/person/') >- 1 ||
 		    <ul class="im_contacts"></ul>
                   </div>
                   <div id="ciP4" class="tab_page ci_personal">
+                  <div class="sect ci_p_topicInterests">
+                    <h4>Interest topics</h4>
+                    <p id="interestTopicsCtr"></p>
+                  </div>
                     <div class="sect ci_p_interests">
                       <h4>Interests</h4>
                       <p id="interestsCtr"></p>
@@ -419,12 +424,12 @@ if ((document.location.href.indexOf ('/dataspace/person/') >- 1 ||
             </div> <!-- widget -->
    	  <!-- Profile Page end-->
           <!-- Connections Page start-->
-          <div id="contacts_interface" style="display:none;">
+          <div id="contacts_interface" style="display: none;">
             <div class="widget w_contact">
               <div class="w_content">
                 <ul class="tab_bar">
-                  <li id="csiT1"><a href="javascript:void(0)">Connections List</a></li>
-                  <li id="csiT2"><a href="javascript:void(0)">Status Updates</a></li>
+                  <li id="csiT1"><a href="javascript: void(0)">Connections List</a></li>
+                  <li id="csiT2"><a href="javascript: void(0)">Status Updates</a></li>
                 </ul>
                 <div class="tab_deck">
                   <div id="cisPCtr" class="tab_page">
@@ -443,17 +448,17 @@ if ((document.location.href.indexOf ('/dataspace/person/') >- 1 ||
                     <div id="connectionsTemplate" style="display:none;">
                       <table border="0" cellspacing="0" width="98%">
                         <tr>
-			  <td class="image" style="width:150px;">
-                  			    <img src="{connImgSRC}" style="width:40px;cursor:pointer"/>
+                  			  <td class="image" style="width: 150px;">
+                  			    <img src="images/profile.png" style="width: 40px; cursor: pointer"/>
                   			    <br/>
-			    <span style="cursor:pointer;text-decoration: underline;">{connProfileFullName}</span>
+                  			    <span style="cursor: pointer; text-decoration: underline;">{connProfileFullName}</span>
 			  </td>
                           <td class="info">
                           </td>
-                          <td class="actions" style="width:120px;text-align:left;">
-                            <a id="{sendMsg}" style="cursor:pointer;text-decoration:underline;">Send Message</a><br/>
-                            <a id="{viewConnections}" style="cursor:pointer;text-decoration:underline;">View Connections</a><br/>
-			    <a id="{doConnection}" style="cursor:pointer;text-decoration:underline;">Connection/Disconnect</a>
+                          <td class="actions" style="width: 120px; text-align: left;">
+                            <a id="{sendMsg}" style="cursor: pointer; text-decoration:underline;">Send Message</a><br/>
+                            <a id="{viewConnections}" style="cursor: pointer; text-decoration: underline;">View Connections</a><br/>
+			                      <a id="{doConnection}" style="cursor: pointer; text-decoration: underline;">Connection/Disconnect</a>
 			  </td>
                         </tr>
 		      </table>
@@ -882,7 +887,7 @@ if ((document.location.href.indexOf ('/dataspace/person/') >- 1 ||
         <div id="FT">
           <img alt="Powered by OpenLink Virtuoso" src="images/skin/default/virt_power_no_border.png"/>
           <div id="FT_RC">
-            Copyright © 1998-2011 OpenLink Software<br/>
+            Copyright © 1998-2012 OpenLink Software<br/>
             <a href="#">About</a> <a href="#">Privacy</a> <a href="#">FAQ</a> <a href="#">Developers</a>
           </div><!-- #FT_RC -->
         </div> <!-- #FT -->
@@ -1021,13 +1026,13 @@ if ((document.location.href.indexOf ('/dataspace/person/') >- 1 ||
           <td valign="top">
             <div id="lf" class="form">
               <div class="header">
-                Identify Yourself <img id="lf_throbber" src="/ods/images/oat/Ajax_throbber.gif" style="float: right; margin-right: 10px; display: none" />
+                Please identify yourself <img id="lf_throbber" src="/ods/images/oat/Ajax_throbber.gif" style="float: right; margin-right: 10px; display: none" />
               </div>
               <ul id="lf_tabs" class="tabs">
                 <li id="lf_tab_0" title="Digest">Digest</li>
+                <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                 <li id="lf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                 <li id="lf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                 <li id="lf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                 <li id="lf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
               </ul>
@@ -1084,8 +1089,11 @@ if ((document.location.href.indexOf ('/dataspace/person/') >- 1 ||
 
                 <div id="lf_page_3" class="tabContent" style="display: none;">
                   <table id="lf_table_3" class="form" cellspacing="5">
-                    <tr>
+                    <tr id="lf_table_3_throbber">
+                      <th width="20%">
+                      </th>
                       <td>
+                        <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
                       </td>
                     </tr>
                   </table>
diff --git a/appsrc/ODS-Framework/index.vsp b/appsrc/ODS-Framework/index.vsp
index 5c99c4d..a775488 100644
--- a/appsrc/ODS-Framework/index.vsp
+++ b/appsrc/ODS-Framework/index.vsp
@@ -1,14 +1,14 @@
 <?vsp
 --   search_ajax.vsp
 --
---   $Id: index.vsp,v 1.9.2.7 2010/09/20 10:15:21 source Exp $
+--   $Id: index.vsp,v 1.9.2.9 2012/03/08 10:46:18 source Exp $
 --
 --   AJAX Handler for the google map control
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -90,7 +90,7 @@
     else
       _country_code:=null;
 
-    https := ODS..getDefaultHttps ();
+    https := ODS.ODS_API.getDefaultHttps ();
     if (exists (select 1 from WA_SETTINGS where WS_HTTPS = 1) and https is not null)
       _openid_server := 'https://' || https;
     else
@@ -158,11 +158,11 @@ skip_meta:
   declare html_content, links varchar;
   declare exts any;
 
-  exts := 
+  exts :=
   vector (
-      	vector ('rdf',  'RDF/XML', 'application/rdf+xml'), 
-      	vector ('nt',   'N3/Turtle', 'text/n3'), 
-      	vector ('n3',   'N3/Turtle', 'text/rdf+n3'), 
+      	vector ('rdf',  'RDF/XML', 'application/rdf+xml'),
+      	vector ('nt',   'N3/Turtle', 'text/n3'),
+      	vector ('n3',   'N3/Turtle', 'text/rdf+n3'),
 	vector ('json', 'RDF/JSON', 'application/json')
 	);
 
@@ -185,7 +185,7 @@ skip_meta:
   links := links || sprintf (' <%s/sparql?default-graph-uri=%s/dataspace>; title="Public SPARQL Service"; rel="http://ontologi.es/sparql#fingerpoint", ', server_root, server_root);
   foreach (any ss in exts) do
     {
-       links := links || sprintf (' <%s%s%s/about.%s>; rel="alternate"; type="%s"; title="Structured Descriptor Document (%s format)",', 
+       links := links || sprintf (' <%s%s%s/about.%s>; rel="alternate"; type="%s"; title="Structured Descriptor Document (%s format)",',
        server_dataspace, utype, uname, ss[0], ss[2], ss[1]);
     }
   for select U_E_MAIL from DB.DBA.SYS_USERS where U_NAME = uname do
diff --git a/appsrc/ODS-Framework/index.vspx b/appsrc/ODS-Framework/index.vspx
index b2959a2..835ab72 100644
--- a/appsrc/ODS-Framework/index.vspx
+++ b/appsrc/ODS-Framework/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: index.vspx,v 1.4.2.1 2010/09/20 10:15:21 source Exp $
+ -  $Id: index.vspx,v 1.4.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/index.xsl b/appsrc/ODS-Framework/index.xsl
index 825d177..b72058a 100644
--- a/appsrc/ODS-Framework/index.xsl
+++ b/appsrc/ODS-Framework/index.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: index.xsl,v 1.4.2.2 2010/09/20 10:15:21 source Exp $
+ -  $Id: index.xsl,v 1.4.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/index_inst.vspx b/appsrc/ODS-Framework/index_inst.vspx
index 5440bde..34661e2 100644
--- a/appsrc/ODS-Framework/index_inst.vspx
+++ b/appsrc/ODS-Framework/index_inst.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: index_inst.vspx,v 1.6.2.2 2010/09/20 10:15:21 source Exp $
+ -  $Id: index_inst.vspx,v 1.6.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/init.sql b/appsrc/ODS-Framework/init.sql
index 0efe103..c1e0b53 100644
--- a/appsrc/ODS-Framework/init.sql
+++ b/appsrc/ODS-Framework/init.sql
@@ -1,10 +1,10 @@
 --
---  $Id: init.sql,v 1.5.2.1 2010/09/20 10:15:22 source Exp $
+--  $Id: init.sql,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/inst.vspx b/appsrc/ODS-Framework/inst.vspx
index 86e4c8d..1bf2051 100644
--- a/appsrc/ODS-Framework/inst.vspx
+++ b/appsrc/ODS-Framework/inst.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: inst.vspx,v 1.5.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: inst.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/inst_ping.vspx b/appsrc/ODS-Framework/inst_ping.vspx
index 1763e79..560d945 100644
--- a/appsrc/ODS-Framework/inst_ping.vspx
+++ b/appsrc/ODS-Framework/inst_ping.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inst_ping.vspx,v 1.1.2.2 2011/03/08 13:28:13 source Exp $
+ -  $Id: inst_ping.vspx,v 1.1.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/join.vspx b/appsrc/ODS-Framework/join.vspx
index 9f886fc..a7fd0c1 100644
--- a/appsrc/ODS-Framework/join.vspx
+++ b/appsrc/ODS-Framework/join.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: join.vspx,v 1.8.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: join.vspx,v 1.8.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/ldap.sql b/appsrc/ODS-Framework/ldap.sql
index 6efa54c..e107e10 100644
--- a/appsrc/ODS-Framework/ldap.sql
+++ b/appsrc/ODS-Framework/ldap.sql
@@ -1,12 +1,12 @@
 --
---  $Id: ldap.sql,v 1.5.2.2 2011/03/23 12:18:30 source Exp $
+--  $Id: ldap.sql,v 1.5.2.3 2012/03/08 10:46:18 source Exp $
 --
 --  OpenID protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/ldap_search.vspx b/appsrc/ODS-Framework/ldap_search.vspx
index ec533b8..ea5c936 100644
--- a/appsrc/ODS-Framework/ldap_search.vspx
+++ b/appsrc/ODS-Framework/ldap_search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ldap_search.vspx,v 1.5.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: ldap_search.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/login.js b/appsrc/ODS-Framework/login.js
index 4f24170..4308aff 100644
--- a/appsrc/ODS-Framework/login.js
+++ b/appsrc/ODS-Framework/login.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -21,18 +21,82 @@
  */
 
 var lfTab;
+var lfHeigh = 280;
+var lsRegData;
+var lfSslData;
 var lfFacebookData;
 var lfOptions;
 var lfAjaxs = 0;
 var lfNotReturn = true;
 var lfAttempts = 0;
+var lfSslLinks = {"in": [], "up": []};
+
+function lfPaneGrow (h) {
+  lfHeigh += h;
+  var loginPage = $('login_page');
+  if (loginPage)
+    loginPage.style.height = lfHeigh+'px';
+	OAT.Dom.center('loginDiv', 1, 1);
+}
+
+function lfRowText(tbl, txt, txtCSSText, h) {
+  var tr = OAT.Dom.create('tr');
+  var td = OAT.Dom.create('td');
+  td.colSpan = 2;
+  td.style.cssText = txtCSSText;
+  td.innerHTML = txt;
+  tr.appendChild(td);
+  tbl.appendChild(tr);
+  if (h) {lfPaneGrow (h);}
+
+  return td;
+}
+
+function lfRowButtonClick(obj) {
+  var interface = readCookie('interface');
+  if (interface == 'js') {
+    var ssl = $('ssl_link');
+    if (ssl) {
+      if      (obj.href.indexOf('login.vspx') != -1)
+        document.location = ssl.href + '&form=login';
+
+      else if (obj.href.indexOf('register.vspx') != -1)
+        document.location = ssl.href + '&form=register';
+
+      return false;
+    }
+  }
+  return true;
+}
+
+function lfRowButton(td, id) {
+  var a = OAT.Dom.create ("a");
+  a.id = id;
+  a.href = document.location.protocol + '//' + document.location.host + '/ods/login.vspx';
+  a.onclick = function(){return lfRowButtonClick(this);};
+  a.innerHTML = 'Sign In (SSL)';
+
+  td.appendChild(a);
+  lfSslLinks['in'].push(a);
+}
+
+function lfRowButton2(td, id) {
+  var a = OAT.Dom.create ("a");
+  a.id = id;
+  a.href = document.location.protocol + '//' + document.location.host + '/ods/register.vspx';
+  a.onclick = function(){return lfRowButtonClick(this);};
+  a.innerHTML = 'Sign Up (SSL)';
+
+  td.appendChild(a);
+  lfSslLinks['up'].push(a);
+}
 
 function lfRowValue(tbl, label, value, leftTag) {
-  if (!leftTag) {
+  if (!leftTag)
     leftTag = 'th';
-  }
+
   var tr = OAT.Dom.create('tr');
-  var th = OAT.Dom.create(leftTag);
+  var th = OAT.Dom.create(leftTag, {verticalAlign: 'top'});
   th.width = '20%';
   th.innerHTML = label;
   tr.appendChild(th);
@@ -44,29 +108,52 @@ function lfRowValue(tbl, label, value, leftTag) {
   tbl.appendChild(tr);
 }
 
+function lfRowImage(tbl, label, value, leftTag, h) {
+  if (!leftTag)
+    leftTag = 'th';
+
+  var tr = OAT.Dom.create('tr');
+  var th = OAT.Dom.create(leftTag, {verticalAlign: 'top'});
+  th.width = '20%';
+  th.innerHTML = label;
+  tr.appendChild(th);
+  if (value) {
+    var td = OAT.Dom.create('td');
+    var img = OAT.Dom.create('img', {}, 'resize');
+    img.src = value;
+    td.appendChild(img);
+    tr.appendChild(td);
+  }
+  tbl.appendChild(tr);
+  if (h) {lfPaneGrow (h);}
+}
+
 function lfInit() {
   if (!$("lf")) {return;}
 
   lfOptrions = {onstart: lfStart, onend: lfEnd};
-  var regData;
-  var x = function (data) {
-    try {
-      regData = OAT.JSON.parse(data);
-    } catch (e) { regData = {}; }
+  if (!lsRegData) {
+    var x = function (data) {
+      try {
+        lsRegData = OAT.JSON.parse(data);
+      } catch (e) { lsRegData = {}; }
+    }
+    OAT.AJAX.GET ('/ods/api/server.getInfo?info=regData', false, x, {async: false});
   }
-  OAT.AJAX.GET ('/ods/api/server.getInfo?info=regData', false, x, {async: false});
 
   lfTab = new OAT.Tab("lf_content", {goCallback: lfCallback});
   lfTab.add("lf_tab_0", "lf_page_0");
-  if (regData.openidEnable)
+  if (lsRegData.openidEnable)
     OAT.Dom.show('lf_tab_1');
   lfTab.add("lf_tab_1", "lf_page_1");
   lfTab.add("lf_tab_2", "lf_page_2");
+  if (lsRegData.sslEnable)
+    OAT.Dom.show('lf_tab_3');
   lfTab.add("lf_tab_3", "lf_page_3");
-  if (regData.twitterEnable)
+  if (lsRegData.twitterEnable)
     OAT.Dom.show('lf_tab_4');
   lfTab.add("lf_tab_4", "lf_page_4");
-  if (regData.linkedinEnable)
+  if (lsRegData.linkedinEnable)
     OAT.Dom.show('lf_tab_5');
   lfTab.add("lf_tab_5", "lf_page_5");
   lfTab.go(0);
@@ -83,21 +170,14 @@ function lfInit() {
       lfNotReturn = false;
       $('lf_login').click();
     }
-    else {
-      $('lf_openId').value = uriParams['openid.identity'];
+    else if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '') {
     lfTab.go(1);
-    if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '')
-    {
-      OAT.AJAX.POST("/ods/api/user.authenticate", lfOpenIdLoginURL(uriParams), $('lf_login').onclick);
-    }
-    else if (typeof (uriParams['openid.mode']) != 'undefined' && uriParams['openid.mode'] == 'cancel')
-    {
-      alert('OpenID Authentication Failed');
-    }
+      $('lf_openId').value = uriParams['openid.identity'];
+      $('lf_login').click();
     }
   }
 
-  if (regData.facebookEnable) {
+  if (lsRegData.facebookEnable) {
     lfLoadFacebookData(function() {
       if (lfFacebookData)
         FB.init(lfFacebookData.api_key, "/ods/fb_dummy.vsp", {
@@ -111,44 +191,101 @@ function lfInit() {
     });
   }
 
-  if ((document.location.protocol == 'https:') && regData.sslEnable) {
-    var x = function(data) {
-      var sslData;
-      try {
-        sslData = OAT.JSON.parse(data);
-      } catch (e) {
-        sslData = null;
-      }
-      if (sslData && sslData.iri && sslData.certLogin) {
-        var prefix = 'lf';
-        OAT.Dom.show(prefix+"_tab_3");
-        var tbl = $(prefix+'_table_3');
-        if (tbl) {
-          lfRowValue(tbl, 'WebID', sslData.iri);
-          if (sslData.firstName)
-            lfRowValue(tbl, 'First Name', sslData.firstName);
-          if (sslData.family_name)
-            lfRowValue(tbl, 'Family Name', sslData.family_name);
-          if (sslData.mbox)
-            lfRowValue(tbl, 'E-Mail', sslData.mbox);
-
+  if (lsRegData.sslEnable) {
+    var x1 = function(data) {
+      if (!lfSslData)
+        try {
+          lfSslData = OAT.JSON.parse(data);
+        } catch (e) {
+          lfSslData = null;
+        }
+      var prefix = 'lf';
+      var tbl = $(prefix+'_table_3');
+      if (tbl) {
+        OAT.Dom.unlink(prefix+'_table_3_throbber');
+        if (lfSslData && lfSslData.iri) {
+          OAT.Dom.show(prefix+"_tab_3");
+          lfRowValue(tbl, 'WebID', lfSslData.iri);
+          if (lfSslData.depiction)
+            lfRowImage(tbl, 'Photo', lfSslData.depiction, null, 150);
+
+          if (lfSslData.loginName)
+            lfRowValue(tbl, 'Login Name', lfSslData.loginName);
+
+          if (lfSslData.mbox)
+            lfRowValue(tbl, 'E-Mail', lfSslData.mbox);
+
+          if (lfSslData.firstName)
+            lfRowValue(tbl, 'First Name', lfSslData.firstName);
+
+          if (lfSslData.family_name)
+            lfRowValue(tbl, 'Family Name', lfSslData.family_name);
+
+          if (!lfSslData.certLogin) {
+            var td = lfRowText(tbl, 'Sign up for an ODS account using your existing WebID - ', 'font-weight: bold;', 17);
+            lfRowButton2(td, 'sign_up_1');
+          }
           lfTab.go(3);
+        } else {
+          lfRowText(tbl, 'You must have cerificate with WebID to use this option', 'font-weight: bold;', 17);
         }
       }
     }
-    OAT.AJAX.GET('/ods/api/user.getFOAFSSLData?sslFOAFCheck=1', '', x);
+    if (document.location.protocol == 'https:') {
+      if (!lfSslData) {
+        OAT.AJAX.GET('/ods/api/user.getFOAFSSLData?sslFOAFCheck=1', '', x1);
+      } else {
+        x1();
+      }
+    } else {
+      OAT.Dom.show('lf_tab_3');
+      var tbl = $('lf_table_3');
+      if (tbl) {
+        OAT.Dom.unlink('lf_table_3_throbber');
+        var td = lfRowText(tbl, 'Have you registered WebID? Sign in with it - ', 'font-weight: bold;', 17);
+        lfRowButton(td, 'sign_in_2');
+        var td2 = lfRowText(tbl, 'Sign up for an ODS account using your existing WebID - ', 'font-weight: bold;', 17);
+        lfRowButton2(td2, 'sign_up_2');
+      }
+    }
+  }
+  if (document.location.protocol != 'https:')
+  {
+    var x2 = function (data) {
+      var o = null;
+      try {
+        o = OAT.JSON.parse(data);
+      } catch (e) { o = null; }
+      if (o && o.sslPort)
+      {
+        var ref = 'https://' + document.location.hostname + ((o.sslPort != '443')? ':' + o.sslPort: '');
+
+        var links = lfSslLinks['in'];
+        for (var i = 0; i < links.length; i++)
+          links[i].href = ref + '/ods/login.vspx';
+
+        var links = lfSslLinks['up'];
+        for (var i = 0; i < links.length; i++)
+          links[i].href = ref + '/ods/register.vspx';
+      }
+    }
+    OAT.AJAX.GET ('/ods/api/server.getInfo?info=sslPort', false, x2);
   }
 }
 
 function lfCallback(oldIndex, newIndex) {
+  $('lf_login').disabled = false;
   if (newIndex == 0)
     $('lf_login').value = 'Login';
   else if (newIndex == 1)
     $('lf_login').value = 'OpenID Login';
   else if (newIndex == 2)
     $('lf_login').value = 'Facebook Login';
-  else if (newIndex == 3)
+  else if (newIndex == 3) {
     $('lf_login').value = 'WebID Login';
+    if ((document.location.protocol == 'http:') || (lfSslData && !lfSslData.certLogin))
+      $('lf_login').disabled = true;
+  }
   else if (newIndex == 4)
     $('lf_login').value = 'Twitter Login';
   else if (newIndex == 5)
@@ -290,7 +427,7 @@ function lfOpenIdAuthenticate(prefix) {
     var xml = OAT.Xml.createXmlDoc(data);
     var error = OAT.Xml.xpath (xml, '//error_response', {});
     if (error.length)
-      showError('Invalied OpenID Server');
+      showError('Invalid OpenID Server');
 
     var oidServer = OAT.Xml.textValue (OAT.Xml.xpath (xml, '/openIdServer_response/server', {})[0]);
     if (!oidServer || !oidServer.length)
diff --git a/appsrc/ODS-Framework/login.vspx b/appsrc/ODS-Framework/login.vspx
index 82275a1..49ce651 100644
--- a/appsrc/ODS-Framework/login.vspx
+++ b/appsrc/ODS-Framework/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: login.vspx,v 1.7.2.3 2010/09/22 13:55:52 source Exp $
+ -  $Id: login.vspx,v 1.7.2.4 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/login_keys.vspx b/appsrc/ODS-Framework/login_keys.vspx
index 9a8507f..5ca6b13 100644
--- a/appsrc/ODS-Framework/login_keys.vspx
+++ b/appsrc/ODS-Framework/login_keys.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: login_keys.vspx,v 1.1.4.3 2011/03/08 13:28:14 source Exp $
+ -  $Id: login_keys.vspx,v 1.1.4.5 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -110,8 +110,9 @@
               </th>
               <td>
                 <v:select-list name="a_name" value="" xhtml_id="a_name" error-glyph="*">
-                  <v:item name="Twitter API" value="Twitter API"/>
+                  <v:item name="Facebook API" value="Facebook API"/>
                   <v:item name="LinkedIn API" value="LinkedIn API"/>
+                  <v:item name="Twitter API" value="Twitter API"/>
                 </v:select-list>
               </td>
             </tr>
diff --git a/appsrc/ODS-Framework/mail.vspx b/appsrc/ODS-Framework/mail.vspx
index c4426b2..fe76c2c 100644
--- a/appsrc/ODS-Framework/mail.vspx
+++ b/appsrc/ODS-Framework/mail.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mail.vspx,v 1.5.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: mail.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/mail_preview.vspx b/appsrc/ODS-Framework/mail_preview.vspx
index 0452207..b631d29 100644
--- a/appsrc/ODS-Framework/mail_preview.vspx
+++ b/appsrc/ODS-Framework/mail_preview.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: mail_preview.vspx,v 1.5.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: mail_preview.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/make_ods_vad.xml b/appsrc/ODS-Framework/make_ods_vad.xml
index b81e483..15baf4a 100644
--- a/appsrc/ODS-Framework/make_ods_vad.xml
+++ b/appsrc/ODS-Framework/make_ods_vad.xml
@@ -5,12 +5,12 @@
   <name package="Framework">
     <prop name="Title" value="ODS Framework"/>
     <prop name="Developer" value="OpenLink Software"/>
-    <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+    <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
     <prop name="Download" value="http://www.openlinksw.com/virtuoso"/>
     <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso"/>
   </name>
-  <version package="1.80.92">
-    <prop name="Release Date" value="2011-03-30 01:46"/>
+  <version package="1.85.92">
+    <prop name="Release Date" value="2012-03-13 10:33"/>
     <prop name="Build" value="Release, optimized"/>
   </version>
 </caption>
@@ -49,8 +49,8 @@
     <![CDATA[
       declare rc any; 
       registry_set('_wa_path_', '/DAV/VAD/wa/');
-      registry_set('_wa_version_', '1.80.92');
-      registry_set('_wa_build_', '2011-03-30 01:46');
+      registry_set('_wa_version_', '1.85.92');
+      registry_set('_wa_build_', '2012-03-13 10:33');
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sn.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/hosted_services.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/registration_xml.sql', 1, 'report', 1);
@@ -64,6 +64,7 @@
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/gdata.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/openid.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ldap.sql', 1, 'report', 1);
+      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/oauth/oauth.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/facebook.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/nav_framework_api.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/semping.sql', 1, 'report', 1);
@@ -76,42 +77,28 @@
       DB.DBA.DAV_PROP_SET_INT ('/DAV/VAD/wa/afoaf.xml', 'xml-template', 'execute', http_dav_uid (), null, 0, 0, 1);
       DB.DBA.DAV_PROP_SET_INT ('/DAV/VAD/wa/sfoaf.xml', 'xml-template', 'execute', http_dav_uid (), null, 0, 0, 1);
       vhost_remove (lpath=>'/wa');
-      vhost_remove (lpath=>'/ods/users');
-      vhost_remove (lpath=>'/javascript/users');
-      vhost_remove (lpath=>'/php/users');
-      vhost_remove (lpath=>'/jsp/users');
-      vhost_remove (lpath=>'/ruby/users');
-      vhost_remove (lpath=>'/vsp/users');
-      vhost_define (lpath=>'/ods/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba');
-      vhost_define (lpath=>'/javascript/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.html');
-      vhost_define (lpath=>'/php/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.php');
-      vhost_define (lpath=>'/jsp/users', ppath=>'http://localhost:8080/users/jsp', is_dav=>0, vsp_user=>'dba');
-      vhost_define (lpath=>'/ruby/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.rb');
-      vhost_define (lpath=>'/vsp/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.vsp');
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/web_svc.sql', 1, 'report', 1);
+      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api.sql', 1, 'report', 1);
+      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api_users.sql', 1, 'report', 1);
+      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_controllers.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sioc.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/scot.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sql_rdf.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/user_rdf.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sioc_priv.sql', 1, 'report', 1);
-      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/DET_RDFData.sql', 1, 'report', 1);
       DB.DBA."RDFData_MAKE_DET_COL" ('/DAV/VAD/wa/RDFData/', sioc..get_graph (), NULL);
       DB.DBA.wa_users_rdf_data_det_upgrade ();
       DB.DBA.VHOST_REMOVE (lpath=>'/ods/data/rdf');
       DB.DBA.VHOST_DEFINE (lpath=>'/ods/data/rdf', ppath=>'/DAV/VAD/wa/RDFData/All/', is_dav=>1, vsp_user=>'dba');
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/opensocial.sql', 1, 'report', 1);
-      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/oauth/oauth.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/oauth/foaf_ssl.sql', 0, 'report', 1);
-      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api.sql', 1, 'report', 1);
-      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api_users.sql', 1, 'report', 1);
-      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_controllers.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/webfinger.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/salmon.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/SWD.sql', 1, 'report', 1);
       DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_upstream.sql', 1, 'report', 1);
       DB.DBA.VHOST_REMOVE (lpath=>'/oauth');
       DB.DBA.VHOST_DEFINE (lpath=>'/oauth', ppath=>'/DAV/VAD/wa/oauth/', vsp_user=>'dba', is_dav=>1, is_brws=>0, def_page=>'index.vsp');
-      if (server_https_port () is not null) 
+      if (ODS.ODS_API.getDefaultHttps () is not null) 
 	DB.DBA.wa_redefine_vhosts (); 
 	    DB.DBA.WA_USER_OL_ACCOUNTS_SET_UP (); 
     ]]>
@@ -123,7 +110,6 @@
   </sql>
 </ddls>
 <resources>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/DET_RDFData.sql" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/SWD.sql" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/aboutus.html" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/accounts.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
@@ -146,6 +132,7 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/LICENSE.html" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/ckeditor.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/config.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/contents.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/images/spacer.gif" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/lang/en.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/plugins/clipboard/dialogs/paste.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
@@ -223,6 +210,7 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/skins/kama/skin.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/skins/kama/templates.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/ckeditor/themes/default/theme.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/common.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/common.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/community.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/comp/app_inst_menu.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
@@ -809,6 +797,7 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/mail.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/mail_preview.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/map_svc.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/mc.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/member.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/member_edit.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/members.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
@@ -817,6 +806,7 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/moat.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/moat_ruleset_tags.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/moat_tags.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/mv.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/myhome.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/nav_framework.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/nav_framework.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
@@ -863,6 +853,7 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/layers.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/linechart.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/loader.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/location.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/macwin.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/map.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/oat/menu.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
@@ -1092,15 +1083,15 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/url_rule.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/user_rdf.sql" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/user_template.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/Readme.txt" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/css/users.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/js/users.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/users.html" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/users.jsp" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/users.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/users.rb" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/users.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
-  <file overwrite="yes" type="dav" source="data" target_uri="wa/users/users.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/Readme.txt" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/css/users.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/js/users.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/users.html" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/users.jsp" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/users.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/users.rb" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/users.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/users/users.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/users_select.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/users_select.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/validate.js" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
@@ -1116,7 +1107,16 @@
   <file overwrite="yes" type="dav" source="data" target_uri="wa/web_header.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/web_svc.sql" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/webfinger.sql" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/webid/webid_check.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/webid/webid_demo.html" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/webid/webid_demo.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/webid/webid_demo.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="data" target_uri="wa/webid/webid_verify.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/webid_check.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/webid_demo.html" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/webid_demo.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/webid_select.vspx" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="data" target_uri="wa/webid_verify.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/winrect.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/winround.css" dav_owner="dav" dav_grp="administrators" dav_perm="110100100NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="data" target_uri="wa/yadis.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
diff --git a/appsrc/ODS-Framework/make_vad.sh b/appsrc/ODS-Framework/make_vad.sh
index 6cbc79d..5ef590b 100755
--- a/appsrc/ODS-Framework/make_vad.sh
+++ b/appsrc/ODS-Framework/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.57.2.13 2011/02/03 10:26:15 source Exp $
+#  $Id: make_vad.sh,v 1.57.2.22 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -60,11 +60,6 @@ else
     LN="ln -fs"
     RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]
 then
@@ -85,7 +80,14 @@ else
   myrm=$RM
 fi
 
-VERSION_INIT()
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
 {
   if [ $VOS -eq 1 ]
   then
@@ -256,6 +258,7 @@ directory_init() {
   mkdir vad/data/wa/users
   mkdir vad/data/wa/users/css
   mkdir vad/data/wa/users/js
+  mkdir vad/data/wa/webid
   for dir in `find ckeditor -type d -print | LC_ALL=C sort | grep -v CVS`
   do
     mkdir vad/data/wa/$dir
@@ -274,7 +277,7 @@ directory_init() {
   cp *.css vad/data/wa
   cp *.html vad/data/wa
   cp *.sql vad/data/wa
-  cp $HOME/binsrc/dav/DET_RDFData.sql vad/data/wa
+  #cp $HOME/binsrc/dav/DET_RDFData.sql vad/data/wa
   cp *.js vad/data/wa
   cp comp/*.xsl vad/data/wa/comp
   cp comp/*.js vad/data/wa/comp
@@ -318,6 +321,10 @@ directory_init() {
   do
     cp $file vad/data/wa/$file
   done
+  cp webid_demo.php vad/data/wa/webid
+  cp vad/data/wa/webid_demo.* vad/data/wa/webid
+  cp vad/data/wa/webid_check.* vad/data/wa/webid
+  cp vad/data/wa/webid_verify.* vad/data/wa/webid
   cp oauth/* vad/data/wa/oauth
   cp oauth/images/* vad/data/wa/oauth/images
 }
@@ -337,7 +344,7 @@ sticker_init() {
   echo "  <name package=\"Framework\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Framework\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -399,6 +406,7 @@ sticker_init() {
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/gdata.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/openid.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ldap.sql', 1, 'report', 1);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/oauth/oauth.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/facebook.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/nav_framework_api.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/semping.sql', 1, 'report', 1);" >> $STICKER
@@ -411,42 +419,29 @@ sticker_init() {
   echo "      DB.DBA.DAV_PROP_SET_INT ('/DAV/VAD/wa/afoaf.xml', 'xml-template', 'execute', http_dav_uid (), null, 0, 0, 1);" >> $STICKER
   echo "      DB.DBA.DAV_PROP_SET_INT ('/DAV/VAD/wa/sfoaf.xml', 'xml-template', 'execute', http_dav_uid (), null, 0, 0, 1);" >> $STICKER
   echo "      vhost_remove (lpath=>'/wa');" >> $STICKER
-  echo "      vhost_remove (lpath=>'/ods/users');" >> $STICKER
-  echo "      vhost_remove (lpath=>'/javascript/users');" >> $STICKER
-  echo "      vhost_remove (lpath=>'/php/users');" >> $STICKER
-  echo "      vhost_remove (lpath=>'/jsp/users');" >> $STICKER
-  echo "      vhost_remove (lpath=>'/ruby/users');" >> $STICKER
-  echo "      vhost_remove (lpath=>'/vsp/users');" >> $STICKER
-  echo "      vhost_define (lpath=>'/ods/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba');" >> $STICKER
-  echo "      vhost_define (lpath=>'/javascript/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.html');" >> $STICKER
-  echo "      vhost_define (lpath=>'/php/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.php');" >> $STICKER
-  echo "      vhost_define (lpath=>'/jsp/users', ppath=>'http://localhost:8080/users/jsp', is_dav=>0, vsp_user=>'dba');" >> $STICKER
-  echo "      vhost_define (lpath=>'/ruby/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.rb');" >> $STICKER
-  echo "      vhost_define (lpath=>'/vsp/users', ppath=>'/vad/vsp/wa/users', is_dav=>0, vsp_user=>'dba', def_page=>'users.vsp');" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/web_svc.sql', 1, 'report', 1);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api.sql', 1, 'report', 1);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api_users.sql', 1, 'report', 1);" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_controllers.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sioc.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/scot.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sql_rdf.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/user_rdf.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/sioc_priv.sql', 1, 'report', 1);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/DET_RDFData.sql', 1, 'report', 1);" >> $STICKER
+  #echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/DET_RDFData.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.\"RDFData_MAKE_DET_COL\" ('/DAV/VAD/wa/RDFData/', sioc..get_graph (), NULL);" >> $STICKER
   echo "      DB.DBA.wa_users_rdf_data_det_upgrade ();" >> $STICKER
   echo "      DB.DBA.VHOST_REMOVE (lpath=>'/ods/data/rdf');" >> $STICKER
   echo "      DB.DBA.VHOST_DEFINE (lpath=>'/ods/data/rdf', ppath=>'/DAV/VAD/wa/RDFData/All/', is_dav=>1, vsp_user=>'dba');" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/opensocial.sql', 1, 'report', 1);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/oauth/oauth.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/oauth/foaf_ssl.sql', 0, 'report', 1);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api.sql', 1, 'report', 1);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_api_users.sql', 1, 'report', 1);" >> $STICKER
-  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_controllers.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/webfinger.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/salmon.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/SWD.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/wa/ods_upstream.sql', 1, 'report', 1);" >> $STICKER
   echo "      DB.DBA.VHOST_REMOVE (lpath=>'/oauth');" >> $STICKER
   echo "      DB.DBA.VHOST_DEFINE (lpath=>'/oauth', ppath=>'/DAV/VAD/wa/oauth/', vsp_user=>'dba', is_dav=>1, is_brws=>0, def_page=>'index.vsp');" >> $STICKER
-  echo "      if (server_https_port () is not null) " >> $STICKER
+  echo "      if (ODS.ODS_API.getDefaultHttps () is not null) " >> $STICKER
   echo "	DB.DBA.wa_redefine_vhosts (); " >> $STICKER
   echo "	    DB.DBA.WA_USER_OL_ACCOUNTS_SET_UP (); " >> $STICKER
   echo "    ]]>" >> $STICKER
@@ -474,8 +469,19 @@ sticker_init() {
      else
 	 perms="111101101NN"
      fi
+     if echo "$file" | grep -v "/users/" > /dev/null
+     then
+       if echo "$file" | grep -v "/webid/" > /dev/null
+       then
+   	     TYPE="dav"
+       else
+  	     TYPE="http"
+       fi
+     else
+	     TYPE="http"
+     fi
      name=`echo "$file" | cut -b10-`
-     echo "  <file overwrite=\"yes\" type=\"dav\" source=\"data\" target_uri=\"$name\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"$perms\" makepath=\"yes\"/>" >> $STICKER
+     echo "  <file overwrite=\"yes\" type=\"$TYPE\" source=\"data\" target_uri=\"$name\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"$perms\" makepath=\"yes\"/>" >> $STICKER
   done
 
   echo "</resources>" >> $STICKER
@@ -559,7 +565,7 @@ vad_create() {
 STOP_SERVER
 $myrm $LOGFILE 2>/dev/null
 directory_clean
-VERSION_INIT
+version_init
 directory_init
 virtuoso_init
 sticker_init
@@ -567,7 +573,6 @@ vad_create
 virtuoso_shutdown
 chmod 644 ods_framework_dav.vad
 #chmod 644 virtuoso.trx
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -577,5 +582,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Framework/map_svc.vspx b/appsrc/ODS-Framework/map_svc.vspx
index 6e16078..7272175 100644
--- a/appsrc/ODS-Framework/map_svc.vspx
+++ b/appsrc/ODS-Framework/map_svc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: map_svc.vspx,v 1.6.2.2 2011/03/08 13:28:14 source Exp $
+ -  $Id: map_svc.vspx,v 1.6.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/mc.vsp b/appsrc/ODS-Framework/mc.vsp
new file mode 100644
index 0000000..9023df0
--- /dev/null
+++ b/appsrc/ODS-Framework/mc.vsp
@@ -0,0 +1,89 @@
+<?vsp
+--
+--  $Id: mc.vsp,v 1.1.4.6 2012/03/08 10:46:18 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+
+   declare sid, mbox, digest, id, mu, rc, webid, accept, fmt, cb, ep any;
+
+   rc := 0;
+   accept := http_request_header_full (lines, 'Accept', '*/*');
+   fmt := DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q (accept); 
+   if (fmt = 'application/json')
+     http_header ('Content-Type: application/json\r\n');
+   if (not is_https_ctx ())
+     goto failed;
+   sid := {?'confirm'};
+   webid := FOAF_SSL_WEBID_GET ();
+   rc := WEBID_AUTH_GEN (null, 0, '', 1, 0);
+   mbox := (select VS_UID from VSPX_SESSION where VS_SID = sid and VS_REALM = 'mv');
+   cb := (select VS_STATE from VSPX_SESSION where VS_SID = sid and VS_REALM = 'mv');
+   if (cb is not null)
+     cb := get_keyword ('callback', deserialize (cb));
+   else
+     cb := null;
+   if (rc and mbox is not null)
+     {
+       digest := sha1_digest (mbox);
+       id := sprintf ('http://%{URIQADefaultHost}s/mv/data/') || bin2hex (cast (decode_base64 (digest) as varbinary));
+       mu := 'mailto:' || mbox;
+       ep := sprintf ('http://%{URIQADefaultHost}s/sparql/');
+       sparql insert into graph iri ('http://localhost/mv') 
+	  { 
+             `iri (?:id)` <http://vocab.deri.ie/void#inDataset> <http://localhost/mv> .
+             <http://localhost/mv> <http://rdfs.org/ns/void#sparqlEndpoint> `iri(?:ep)` .
+	     `iri (?:id)` foaf:primaryTopic `iri(?:webid)` . 
+             `iri(?:webid)` foaf:mbox_sha1sum ?:digest . 
+          };
+       if (length (cb))
+	 {
+	   declare c any;
+	   c := case when strchr (cb, '?') is null then '?' else '&' end;
+	   http_status_set (302);
+           http_header (sprintf ('Location: %s%sid=%U\r\n', cb, c, id));
+	   return;
+	 }	
+       if (fmt = 'application/json')
+	 {
+	   http (sprintf ('{"status":"verified", "document_url":"%s"}', id));
+           return;
+	 }
+     }
+failed:
+   if (fmt = 'application/json') -- failure
+     {
+        http_status_set (400);
+        http ('{"status":"failed"}');
+        return;
+     } 	
+?>
+<html>
+    <head>
+	<title>Mail confirmation service</title>
+    </head>
+    <body>
+	<?vsp if (rc and mbox is not null) { ?>
+	<h1>Your e-mail is confirmed</h1><div>The document descriptor can be seen at <a href="<?V id ?>"><?V id ?></a></div>
+	<?vsp } else { ?>
+	<h1>You are not authenticated.</h1>
+	<?vsp }?>
+    </body>
+</html>
+
diff --git a/appsrc/ODS-Framework/member.vspx b/appsrc/ODS-Framework/member.vspx
index 2ca2972..539c7b8 100644
--- a/appsrc/ODS-Framework/member.vspx
+++ b/appsrc/ODS-Framework/member.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: member.vspx,v 1.6.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: member.vspx,v 1.6.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/member_edit.vspx b/appsrc/ODS-Framework/member_edit.vspx
index 9ba1494..35a4b20 100644
--- a/appsrc/ODS-Framework/member_edit.vspx
+++ b/appsrc/ODS-Framework/member_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: member_edit.vspx,v 1.5.2.1 2010/09/20 10:15:22 source Exp $
+ -  $Id: member_edit.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/members.vspx b/appsrc/ODS-Framework/members.vspx
index 8f9fecf..25aba1b 100644
--- a/appsrc/ODS-Framework/members.vspx
+++ b/appsrc/ODS-Framework/members.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: members.vspx,v 1.12.2.6 2010/11/11 12:38:18 source Exp $
+ -  $Id: members.vspx,v 1.12.2.8 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -32,6 +32,8 @@
   <vm:page>
     <vm:header>
       <script type="text/javascript" src="tbl.js">;</script>
+      <script type="text/javascript" src="typeahead.js">;</script>
+      <link rel="stylesheet" href="typeahead.css" type="text/css" />
       <vm:title>Application Members</vm:title>
     </vm:header>
     <v:on-init>
@@ -46,14 +48,6 @@
         {
           self.ihome := self.inst.wa_home_url();
         }
-        else if (self.wa_type in ('oMail'))
-        {
-          declare tmp varchar;
-
-          tmp := self.iname;
-          self.iname := subseq(tmp, 0, strstr(tmp, '@'));
-          self.wa_domain := subseq(tmp, strstr(tmp, '@'));
-        }
       ]]>
     </v:on-init>
     <v:after-data-bind>
@@ -100,6 +94,7 @@
      			  self.vc_redirect ('services.vspx');
  		      </v:on-post>
   		  </v:button>
+  		  <br /><br />
         <v:template name="template_01" type="simple" enabled="--case when self.wa_type in ('oDrive', 'oMail', 'IM') or (self.imodel = 1) then 0 else 1 end">
           <fieldset>
             <legend><b>Members</b></legend>
diff --git a/appsrc/ODS-Framework/members_inv.vspx b/appsrc/ODS-Framework/members_inv.vspx
index a25aa9f..7590b1c 100644
--- a/appsrc/ODS-Framework/members_inv.vspx
+++ b/appsrc/ODS-Framework/members_inv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: members_inv.vspx,v 1.7.2.1 2010/09/20 10:15:23 source Exp $
+ -  $Id: members_inv.vspx,v 1.7.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/moat_ruleset_tags.vspx b/appsrc/ODS-Framework/moat_ruleset_tags.vspx
index 0a8f2ca..706540d 100644
--- a/appsrc/ODS-Framework/moat_ruleset_tags.vspx
+++ b/appsrc/ODS-Framework/moat_ruleset_tags.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: moat_ruleset_tags.vspx,v 1.1.2.1 2010/09/20 10:15:23 source Exp $
+ -  $Id: moat_ruleset_tags.vspx,v 1.1.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/moat_tags.vspx b/appsrc/ODS-Framework/moat_tags.vspx
index 89fb0f5..99cecd4 100644
--- a/appsrc/ODS-Framework/moat_tags.vspx
+++ b/appsrc/ODS-Framework/moat_tags.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: moat_tags.vspx,v 1.3.2.1 2010/09/20 10:15:23 source Exp $
+ -  $Id: moat_tags.vspx,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/mv.vsp b/appsrc/ODS-Framework/mv.vsp
new file mode 100644
index 0000000..6127631
--- /dev/null
+++ b/appsrc/ODS-Framework/mv.vsp
@@ -0,0 +1,83 @@
+<?vsp
+--
+--  $Id: mv.vsp,v 1.1.4.5 2012/03/08 10:46:18 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+
+   declare ms int;
+   ms := 0;
+   http_rewrite ();
+   if (length ({?'mbox'}))
+     {
+       declare mbox, digest, id, mu, https, sender, sid, accept, fmt, cb any;
+       accept := http_request_header_full (lines, 'Accept', '*/*');
+       fmt := DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q (accept);
+       if (fmt = 'application/json')
+         http_header ('Content-Type: application/json\r\n');
+       mbox := {?'mbox'};
+       cb := {?'cb'};
+       https := ODS.ODS_API.getDefaultHttps ();
+       sender := (select U_E_MAIL from SYS_USERS where U_NAME = 'dav');
+       sid := vspx_sid_generate ();
+       insert into VSPX_SESSION (VS_SID, VS_REALM, VS_UID, VS_EXPIRY, VS_STATE) values (sid, 'mv', mbox, now (), serialize (vector ('callback', cb)));
+       declare exit handler for sqlstate '*'
+	{
+	   if (fmt = 'application/json')
+	     {
+	       http_status_set (400);
+	       http ('{"status":"error", "message":"Error in processing your request."}');
+	       return;
+	     }
+           goto error;	  
+	};
+       smtp_send (null, sender, mbox,
+     	sprintf ('Subject: Mail verification service\r\nPlease click on the link below to confirm your email.\r\nhttps://%s/mv/mc.vsp?confirm=%U', https, sid));
+       ms := 1;
+       if (fmt = 'application/json')
+         {
+           http ('{"status":"ok", "message":"A confirmation mail was sent, please check your mail box."}');
+           return;
+         }
+     }
+?>
+<html>
+    <head>
+	<title>Mail verification service</title>
+    </head>
+    <body>
+	<?vsp if (ms = 0) { ?>
+	<h1>Enter your mail address</h1>
+	<form name="f" method="post" action="mv.vsp">
+	    <input type="text" size="70" name="mbox" value=""/>
+	    <input type="submit" value="Verify" name="go" />
+	</form>
+	<?vsp } else { ?>
+	<div>A confirmation mail was sent, please check your mail box.</div>
+	<?vsp }
+	   if (0)
+	     {
+		error:
+	?>
+	<div>Error in processing your request.</div>
+	<?vsp
+	     }
+	?>
+    </body>
+</html>
diff --git a/appsrc/ODS-Framework/myhome.vspx b/appsrc/ODS-Framework/myhome.vspx
index dca5edd..cfa81a9 100644
--- a/appsrc/ODS-Framework/myhome.vspx
+++ b/appsrc/ODS-Framework/myhome.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: myhome.vspx,v 1.15.2.3 2010/09/20 10:15:23 source Exp $
+ -  $Id: myhome.vspx,v 1.15.2.4 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/nav_framework.css b/appsrc/ODS-Framework/nav_framework.css
index a911aeb..f3ab88a 100644
--- a/appsrc/ODS-Framework/nav_framework.css
+++ b/appsrc/ODS-Framework/nav_framework.css
@@ -1095,37 +1095,6 @@ table.form td {
   white-space: nowrap;
 }
 
-.tabs {
-	margin-top: 24px;
-	list-style-type: none;
-	padding-bottom: 1px;
-	padding-left: 0.5em;
-}
-
-.tabs li {
-	display: inline;
-	padding: 1px 3px;
-	margin-left: 0.1em;
-	cursor: pointer;
-  border-top: 1px solid #aaa;
-  border-left: 1px solid #aaa;
-  border-right: 1px solid #aaa;
-  -moz-border-radius-topleft: 3px;
-  -moz-border-radius-topright: 3px;
-  -webkit-border-top-left-radius: 3px;
-  -webkit-border-top-right-radius: 3px;
-	background-color: #EFEFEF;
-	z-index: 10;
-}
-
-.tabs li.tab_selected {
-	background-color: #FFF;
-}
-
-.tabs li.tab:hover {
-	background-color: #FFF;
-}
-
 #lf_close {
   float: right;
   cursor: pointer;
diff --git a/appsrc/ODS-Framework/nav_framework.js b/appsrc/ODS-Framework/nav_framework.js
index 6098d40..bb58da0 100644
--- a/appsrc/ODS-Framework/nav_framework.js
+++ b/appsrc/ODS-Framework/nav_framework.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -55,12 +55,9 @@ function _getChildElemsByClassName(elm, class_name, max_depth,
   return elm_arr;
 }
 
-function getChildElemsByClassName(elm, class_name, max_depth,
-		stop_at_first_match) {
+function getChildElemsByClassName(elm, class_name, max_depth, stop_at_first_match) {
   var elm_arr = new Array ();
-  
-	return _getChildElemsByClassName(elm, class_name, max_depth,
-			stop_at_first_match, elm_arr);
+	return _getChildElemsByClassName(elm, class_name, max_depth, stop_at_first_match, elm_arr);
 }
 
 function replaceTemplateClass(elm, class_name, content) {
@@ -211,7 +208,7 @@ function inverseSelected(parentDiv) {
 }
 
 OAT.Preferences.imagePath = "/ods/images/oat/";
-OAT.Preferences.stylePath = "/ods/";
+OAT.Preferences.stylePath = "/ods/oat/styles/";
 
 window.ODS = {};
 
@@ -1066,11 +1063,12 @@ ODS.Nav = function(navOptions) {
 	this.initLeftBar = function() {
 	rootDiv = self.leftbar;
 	OAT.Dom.clear (rootDiv);
-    var odsHomeA = OAT.Dom.create ('a', {})
-    odsHomeA.id = 'ODS_HOME_LNK';
-	odsHomeA.innerHTML = '<img class="ods_logo" src="images/odslogosml_new.png" alt="Site Home"/>';
-	  OAT.Event.attach(odsHomeA, "click", function() {self.loadVspx(self.frontPage());});
-	OAT.Dom.append ([rootDiv, odsHomeA]);
+		var a = OAT.Dom.create('a', {})
+		a.href = '';
+		a.id = 'ODS_HOME_LNK';
+		a.innerHTML = '<img class="ods_logo" src="images/odslogosml_new.png" alt="Site Home"/>';
+	  OAT.Event.attach(a, "click", function() {self.loadVspx(self.frontPage());});
+		OAT.Dom.append( [ rootDiv, a ]);
     };
 
 	this.initRightBar = function() {
@@ -1098,7 +1096,7 @@ ODS.Nav = function(navOptions) {
 			}, 'menu_link profile_edit shortcut');
 		profileMenuAProfileEdit.innerHTML = 'edit';
       OAT.Event.attach (profileMenuAProfileEdit, "click", function () {
-				      self.loadVspx (self.expandURL (self.ods + 'uiedit.vspx'));
+				self.loadCheckedVspx(self.expandURL(self.ods + 'uiedit.vspx'));
 				  });
 
 		if (self.session.userName)
@@ -1234,11 +1232,9 @@ ODS.Nav = function(navOptions) {
 
 	    var messagesMenu = new OAT.Menu ();
 	    messagesMenu.noCloseFilter = 'menu_separator';
-
 	    messagesMenu.createFromUL ("messages_menu");
 
-	    OAT.Style.include ('dock.css');
-
+			OAT.Style.include(location.protocol + '//' + location.host + '/ods/dock.css');
 	    OAT.Dom.show ($('messages_menu').parentNode);
 
 			OAT.Loader.load( [ "dock" ], function() {
@@ -1550,20 +1546,17 @@ ODS.Nav = function(navOptions) {
 										"click",
 						  function (e) {
 						      var t = eTarget (e);
-											self
-													.userMessageStatusSet(
+											self.userMessageStatusSet(
 															t.msgId,
 															-1,
 										 function () {
-																OAT.Dom
-																		.unlink(t.parentNode);
+																OAT.Dom.unlink(t.parentNode);
 																var msgCount = $('newMsgCountSpan').innerHTML
 																		.substring(
 																				1,
 																				$('newMsgCountSpan').innerHTML.length - 1);
 																$('newMsgCountSpan').innerHTML = '(' + (msgCount - 1) + ')';
-																self
-																		.wait('hide');
+																self.wait('hide');
 										 });
 						  });
 
@@ -1875,7 +1868,7 @@ ODS.Nav = function(navOptions) {
 		var aSettings = OAT.Dom.create("a", {cursor: 'pointer'});
 
 		OAT.Event.attach(aSettings, "click", function() {
-			      self.loadVspx (self.expandURL (self.ods + 'app_settings.vspx'));
+			self.loadCheckedVspx(self.expandURL(self.ods + 'app_settings.vspx'));
 			  });
 
     aSettings.innerHTML = 'Application Settings';
@@ -1883,7 +1876,7 @@ ODS.Nav = function(navOptions) {
 		var aSiteSettings = OAT.Dom.create("a", {cursor: 'pointer'});
 
 		OAT.Event.attach(aSiteSettings, "click", function() {
-			      self.loadVspx (self.expandURL (self.ods + 'site_settings.vspx'));
+			self.loadCheckedVspx(self.expandURL(self.ods + 'site_settings.vspx'));
 			  });
 
 	aSiteSettings.innerHTML = 'Site Settings';
@@ -1949,6 +1942,8 @@ ODS.Nav = function(navOptions) {
       try {
         self.regData = OAT.JSON.parse(data);
       } catch (e) { self.regData = {}; }
+      if (!lsRegData)
+        lsRegData = self.regData;
     }
     OAT.AJAX.GET ('/ods/api/server.getInfo?info=regData', false, x, {async: false});
 
@@ -1987,6 +1982,9 @@ ODS.Nav = function(navOptions) {
 				} catch (e) {
 					o = null;
 				}
+        if (!lfSslData)
+         lfSslData = o;
+
 				if (o && o.iri) {
           self.sslData = o;
 					if (o.certLogin && !self.userLogged) {
@@ -1999,7 +1997,7 @@ ODS.Nav = function(navOptions) {
 		}
 	    }
         }
-			  OAT.AJAX.GET('/ods/api/user.getFOAFSSLData?sslFOAFCheck=1&sslLoginCheck=1', false, x);
+		  OAT.AJAX.GET('/ods/api/user.getFOAFSSLData?sslFOAFCheck=1', false, x, {async: false});
 			}
       }
 
@@ -2479,7 +2477,7 @@ ODS.Nav = function(navOptions) {
 
 		OAT.Dom.append ([$('search_listing'),resultLi]);
 	    }
-	self.showSearch ()
+		self.showSearch();
 	self.wait ('hide');
     };
 
@@ -2746,7 +2744,7 @@ ODS.Nav = function(navOptions) {
 
 		var connHTML = templateHtml;
 
-			connHTML = connHTML.replace('{connImgSRC}', conn.photo.length > 0 ? conn.photo : 'images/missing_profile_picture.png'); // images/profile.png
+			connHTML = connHTML.replace('images/profile.png', conn.photo.length > 0 ? conn.photo : 'images/profile.png');
 	connHTML = connHTML.replace ('{connProfileFullName}', conn.fullName);
 	connHTML = connHTML.replace ('{sendMsg}', 'sendMsg_' + conn.uid);
 	connHTML = connHTML.replace ('{viewConnections}', 'viewConnections_' + conn.uid);
@@ -3022,6 +3020,7 @@ ODS.Nav = function(navOptions) {
       img.src = userProfilePhoto;
       img.alt = userDisplayName;
       img.rel = 'foaf:depiction';
+      OAT.Dom.clear('userProfilePhoto');
       $('userProfilePhoto').appendChild(img);
   	} else {
       $('userProfilePhoto').innerHTML = '<br /><b>Photo Not Available</b><br /><br />';
@@ -3700,8 +3699,7 @@ ODS.Nav = function(navOptions) {
 		}
 
 			if ($('sm_foaf') && $('sm_foaf').tagName == 'A') {
-				$('sm_foaf').href = self.odsLink()
-						+ userProfileDataspace.replace('#this', '/foaf.rdf');
+				$('sm_foaf').href = self.odsLink() + userProfileDataspace.replace('#this', '/foaf.rdf');
 
 		    if (self.serverOptions.useRDFB)
 					$('sm_foaf').onclick = function(e) {
@@ -3714,8 +3712,7 @@ ODS.Nav = function(navOptions) {
 		}
 
 			if ($('sm_sioc') && $('sm_sioc').tagName == 'A') {
-				$('sm_sioc').href = self.odsLink()
-						+ userProfileDataspace.replace('#this', '/sioc.rdf');
+				$('sm_sioc').href = self.odsLink() + userProfileDataspace.replace('#this', '/sioc.rdf');
 
 		    if (self.serverOptions.useRDFB)
 					$('sm_sioc').onclick = function(e) {
@@ -3833,35 +3830,38 @@ ODS.Nav = function(navOptions) {
 	}
 
 		function renderPersonalInformationBlock(xmlDoc) {
-	    var interestsP = $('interestsCtr');
-	    OAT.Dom.clear (interestsP);
-
-	    var musicP = $('musicCtr');
-	    OAT.Dom.clear (musicP);
-
-			var interests = OAT.Xml.xpath(xmlDoc,
-					'//usersGetInfo_response/user/interests', {});
-	    interests = OAT.Xml.textValue (interests[0]).split ('\n');
-
-			for ( var i = 0; i < interests.length; i++) {
-				if (interests[i].length) {
-			    var iArr = interests[i].split (';');
-
-			    var interestA = OAT.Dom.create ('a');
-
-			    interestA.innerHTML = iArr[1];
-			    interestA.href = self.expandURL (iArr[0]);
-			    interestA.target = '_blank';
 
+		  function renderPersonalInformationBlockInternal(node, values) {
+  			OAT.Dom.clear(node);
+  			values = OAT.Xml.textValue(values[0]).split('\n');
+  			for ( var i = 0; i < values.length; i++) {
+  				if (values[i].length) {
+  					var iArr = values[i].split(';');
+
+  					var a = OAT.Dom.create('a');
+  					a.innerHTML = iArr[1];
+  					a.href = self.expandURL(iArr[0]);
+  					a.target = '_blank';
 			    if (i == 0)
-				OAT.Dom.append ([interestsP,interestA]);
+  						OAT.Dom.append( [ node, a ]);
 			    else
-						OAT.Dom.append( [ interestsP, OAT.Dom.text(', '), interestA ]);
+  						OAT.Dom.append( [ node, OAT.Dom.text(', '), a ]);
+  				}
 			}
 		}
 
-			var music = OAT.Xml.xpath(xmlDoc,
-					'//usersGetInfo_response/user/music', {});
+			var interestsP = $('interestTopicsCtr');
+			var interests = OAT.Xml.xpath(xmlDoc, '//usersGetInfo_response/user/interestTopics', {});
+			renderPersonalInformationBlockInternal(interestsP, interests);
+
+			var interestsP = $('interestsCtr');
+			var interests = OAT.Xml.xpath(xmlDoc, '//usersGetInfo_response/user/interests', {});
+			renderPersonalInformationBlockInternal(interestsP, interests);
+
+			var musicP = $('musicCtr');
+			OAT.Dom.clear(musicP);
+
+			var music = OAT.Xml.xpath(xmlDoc, '//usersGetInfo_response/user/music', {});
 	    musicP.innerHTML = OAT.Xml.textValue (music[0]);
 	}
 
@@ -3902,7 +3902,7 @@ ODS.Nav = function(navOptions) {
 				       renderContactInformationBlock (xmlDoc3);
 				   });
 
-		self.session.usersGetInfo(self.profile.userId, 'interests,music',
+		self.session.usersGetInfo(self.profile.userId, 'interestTopics,interests,music',
 				   function (xmlDoc3) {
 				       renderPersonalInformationBlock (xmlDoc3);
 				   });
@@ -4006,6 +4006,18 @@ ODS.Nav = function(navOptions) {
 		return this.expandURL(this.ods + 'sfront.vspx');
 	};
 
+	this.loadCheckedVspx = function(url) {
+    var x = function (data) {
+      var xml = OAT.Xml.createXmlDoc(data);
+      if (hasError(xml, false)) {
+				self.session.end();
+      } else {
+	      self.loadVspx(url);
+	    }
+    }
+    OAT.AJAX.GET('/ods/api/user.validate?sid='+self.session.sid+'&realm='+self.session.realm, false, x);
+	};
+
 	this.loadRDFB = function(url, useFrame) {
 		if (typeof (url) == 'undefined')
 			return;
@@ -4145,7 +4157,7 @@ ODS.Nav = function(navOptions) {
 	if (applicationType == 'FeedManager')
 	    applicationType = 'Feed Manager';
 
-	if (applicationType == 'InstantMessenger')
+		else if (applicationType == 'InstantMessenger')
 	    applicationType = 'Instant Messenger';
 
 		var data = 'sid=' + self.session.sid + '&application=' + encodeURIComponent(applicationType);
@@ -4155,7 +4167,8 @@ ODS.Nav = function(navOptions) {
 		    if (typeof (callbackFunction) == "function")
 			callbackFunction (xmlDoc);
 			} else {
-		    self.wait();
+				self.session.end();
+				// self.wait();
 		}
     }
 		OAT.AJAX.POST(self.session.endpoint + "checkApplication", data, callback, ajaxOptions);
@@ -4735,11 +4748,20 @@ ODS.Nav = function(navOptions) {
 	return odsLink;
     };
 
-    self.serverSettings ()
+	self.serverSettings();
     var uriParams = OAT.Dom.uriParams();
     var cookieSid = this.readCookie ('sid');
 
-	if (!self.session.sid && typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '')
+	if (typeof (uriParams['form']) != 'undefined' && uriParams['form'] == 'login')
+	{
+    self.loadVspx(self.frontPage());
+	  self.logIn();
+	}
+	else if (typeof (uriParams['form']) != 'undefined' && uriParams['form'] == 'register')
+	{
+		self.loadVspx(self.expandURL(self.ods + 'register.vspx'));
+	}
+	else if (!self.session.sid && typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '')
 	{
 	  self.logIn();
 		lfTab.go(1);
diff --git a/appsrc/ODS-Framework/nav_framework_api.sql b/appsrc/ODS-Framework/nav_framework_api.sql
index 78bcd3b..c265a46 100644
--- a/appsrc/ODS-Framework/nav_framework_api.sql
+++ b/appsrc/ODS-Framework/nav_framework_api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nav_framework_api.sql,v 1.23.2.19 2011/01/25 14:11:28 source Exp $
+--  $Id: nav_framework_api.sql,v 1.23.2.21 2012/03/08 10:46:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -395,12 +395,9 @@ create procedure usersGetInfo (
 
         http('<user>',resXml);
 
-          cursor_uname := '';
           cursor_uname := cast (userid2name (rset[i][0]) as varchar);
-
         for(k:=0;k<length(metas[0]);k:=k+1)
         {
-
           declare visibility_arr any;
           declare is_friend,visibility_pos,is_visible integer;
 
@@ -412,8 +409,7 @@ create procedure usersGetInfo (
               if (isSessionValid (sid, 'wa', _uname))
           {
 
-                  is_friend := DB.DBA.WA_USER_IS_FRIEND (username2id (_uname), 
-		                                         username2id (cursor_uname));
+                  is_friend := DB.DBA.WA_USER_IS_FRIEND (username2id (_uname), username2id (cursor_uname));
 
             --3 private;2 friends;1 public
 
@@ -2443,6 +2439,7 @@ create procedure xml_nodename(in dbfield_name varchar)
  if(dbfield_name='U_MUSIC')        return 'music';
  if(dbfield_name='U_BOOKS')        return 'books';
  if(dbfield_name='U_MOVIES')       return 'movies';
+ if(dbfield_name='U_INTEREST_TOPICS') return 'interestTopics';
  if(dbfield_name='U_INTERESTS')    return 'interests';
  if(dbfield_name='U_DATASPACE')    return 'dataspace';
  if(dbfield_name='H_COUNTRY')      return 'home_country';
@@ -2492,7 +2489,8 @@ create procedure visibility_posinarr(in dbfield_name varchar)
  if(dbfield_name='U_MUSIC')        return 24;
  if(dbfield_name='U_BOOKS')        return 44;
  if(dbfield_name='U_MOVIES')       return 46;
- if(dbfield_name='U_INTERESTS')    return 48;
+ if(dbfield_name='U_INTEREST_TOPICS') return 48;
+ if(dbfield_name='U_INTERESTS')       return 49;
  if(dbfield_name='U_DATASPACE')    return -1;
  if(dbfield_name='H_COUNTRY')      return 16;
  if(dbfield_name='H_STATE')        return 16;
@@ -2531,7 +2529,7 @@ create procedure constructFieldsNameStr (
   in fieldsname_str varchar)
 {
   declare correctfields_name_str varchar;
-  correctfields_name_str := 'userName,fullName,firstName,lastName,photo,title,gender,home,homeLocation,business,businessLocation,businessJobPosition,im,music,interests,dataspace,foaf_ds,sioc_ds';
+  correctfields_name_str := 'userName,fullName,firstName,lastName,photo,title,gender,home,homeLocation,business,businessLocation,businessJobPosition,im,music,interestTopics,interests,dataspace,foaf_ds,sioc_ds';
 
   declare res_str varchar;
   declare fields_name any;
@@ -2554,7 +2552,6 @@ create procedure constructFieldsNameStr (
               res_str:=res_str||'U.U_NAME as U_NAME';
 
            if(fields_name[i]='fullName')
---              res_str:=res_str||'coalesce(U.U_FULL_NAME,trim(concat(I.WAUI_FIRST_NAME,\' \',I.WAUI_LAST_NAME)),U.U_NAME) as U_FULL_NAME';
                 res_str:=res_str || '(case when length (trim (U.U_FULL_NAME)) > 0 ' ||
                                     '      then U_FULL_NAME '||
                                     '      when (length (trim (I.WAUI_FIRST_NAME)) > 0 or length (trim (I.WAUI_LAST_NAME))) '||
@@ -2628,6 +2625,9 @@ create procedure constructFieldsNameStr (
            if(fields_name[i]='interests')
               res_str:=res_str||'I.WAUI_INTERESTS as U_INTERESTS';
 
+              if (fields_name[i] = 'interestTopics')
+                res_str := res_str || 'I.WAUI_INTEREST_TOPICS as U_INTEREST_TOPICS';
+
            if(fields_name[i]='dataspace')
               res_str:=res_str||'DB.DBA.WA_USER_DATASPACE(U.U_NAME) as U_DATASPACE';
 
@@ -2712,20 +2712,11 @@ create procedure usersinfo_sql(in usersStr varchar,in fieldsStr varchar)
   declare qry varchar;
 
   declare fields_name_str varchar;
-  fields_name_str:='';
-  fields_name_str:=constructFieldsNameStr(fieldsStr);
-
   declare users_id_str varchar;
-  users_id_str:='';
-  users_id_str:=constructUsersIdStr(usersStr);
-
 
---  qry:=sprintf('select U.U_NAME as U_NAME,%s from DB.DBA.WA_USER_INFO I, DB.DBA.SYS_USERS U '||
---               ' where I.WAUI_U_ID=U.U_ID and U.U_ID in (%s)',
---               fields_name_str,users_id_str);
---
-  qry:=sprintf('select U.U_ID,%s  from DB.DBA.SYS_USERS U left join DB.DBA.WA_USER_INFO I on (U.U_ID=I.WAUI_U_ID)'||
-               ' where U.U_ID in (%s)',
+  fields_name_str := constructFieldsNameStr (fieldsStr);
+  users_id_str := constructUsersIdStr (usersStr);
+  qry := sprintf ('select U.U_ID,%s  from DB.DBA.SYS_USERS U left join DB.DBA.WA_USER_INFO I on (U.U_ID=I.WAUI_U_ID) where U.U_ID in (%s)',
                fields_name_str,users_id_str);
 
   return qry;
diff --git a/appsrc/ODS-Framework/new_inst.vspx b/appsrc/ODS-Framework/new_inst.vspx
index 481d086..49f19be 100644
--- a/appsrc/ODS-Framework/new_inst.vspx
+++ b/appsrc/ODS-Framework/new_inst.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: new_inst.vspx,v 1.21.2.4 2010/09/20 10:15:23 source Exp $
+ -  $Id: new_inst.vspx,v 1.21.2.5 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/default.css b/appsrc/ODS-Framework/oauth/default.css
index 4dbec62..08cec36 100644
--- a/appsrc/ODS-Framework/oauth/default.css
+++ b/appsrc/ODS-Framework/oauth/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.1.2.1 2010/09/20 10:15:35 source Exp $
+ *  $Id: default.css,v 1.1.2.2 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/error.vspx b/appsrc/ODS-Framework/oauth/error.vspx
index 59ad67f..0935c01 100644
--- a/appsrc/ODS-Framework/oauth/error.vspx
+++ b/appsrc/ODS-Framework/oauth/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.1.2.1 2010/09/20 10:15:35 source Exp $
+ -  $Id: error.vspx,v 1.1.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/foaf_ssl.sql b/appsrc/ODS-Framework/oauth/foaf_ssl.sql
index 7264010..a78f503 100644
--- a/appsrc/ODS-Framework/oauth/foaf_ssl.sql
+++ b/appsrc/ODS-Framework/oauth/foaf_ssl.sql
@@ -1,21 +1,43 @@
 DB.DBA.EXEC_STMT ('create table FOAF_SSL_ACL (FS_URI varchar primary key, FS_UID varchar not null)', 0)
 ;
 
-create procedure FOAF_SSL_QR (in gr varchar, in agent varchar)
+create procedure FOAF_WEBID_USER (
+  inout webID varchar,
+  inout createMode integer := 0)
 {
-  declare qr any;
-  qr := sprintf (
-        'sparql define input:storage "" '||
-	' prefix cert: <http://www.w3.org/ns/auth/cert#> '||
-	' prefix rsa: <http://www.w3.org/ns/auth/rsa#> ' ||
-  	' select (str (bif:coalesce (?exp_val, ?exp))) (str (bif:coalesce (?mod_val, ?mod))) '||
-	' from <%S> '||
-  	' where { '||
-	' 	  ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod . ' ||
-	' 	  optional { ?exp cert:decimal ?exp_val . ?mod cert:hex ?mod_val . } '||
-	'       } ',
-	gr, agent);
-  return qr;      
+  declare uid varchar;
+
+  uid := (select FS_UID from DB.DBA.FOAF_SSL_ACL where FS_URI = webID);
+  if (createMode and isnull (uid))
+  {
+    uid := sprintf ('SPUID%d', sequence_next ('__SPUID'));
+    USER_CREATE (uid, uuid());
+    USER_GRANT_ROLE (uid, 'SPARQL_SELECT');
+    USER_SET_OPTION (uid, 'DISABLED', 1);
+    insert into DB.DBA.FOAF_SSL_ACL (FS_URI, FS_UID)
+      values (webID, uid);
+  }
+  return uid;
+}
+;
+
+create procedure FOAF_SSL_QR (in gr varchar, in uri varchar)
+{
+    return sprintf ('sparql
+    define input:storage ""
+    define input:same-as "yes"
+    prefix cert: <http://www.w3.org/ns/auth/cert#>
+    prefix rsa: <http://www.w3.org/ns/auth/rsa#>
+    select (str (?exp)) (str (?mod))
+    from <%S>
+    where
+    {
+      { ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod .  }
+      union
+      { ?id cert:identity <%S> ; rsa:public_exponent ?exp1 ; rsa:modulus ?mod1 . ?exp1 cert:decimal ?exp . ?mod1 cert:hex ?mod . }
+      union
+      { <%S> cert:key ?key . ?key cert:exponent ?exp . ?key cert:modulus ?mod .  }
+    }', gr, uri, uri, uri);
 }
 ;
 
@@ -30,14 +52,14 @@ create procedure FOAF_SSL_QR_BY_ACCOUNT (in gr varchar, in agent varchar)
   	' where { <%S> <http://xmlns.com/foaf/0.1/holdsAccount> ?acc . ?id cert:identity ?acc ; rsa:public_exponent ?exp ; rsa:modulus ?mod . '||
 	' optional { ?exp cert:decimal ?exp_val . ?mod cert:hex ?mod_val . } } ',
 	gr, agent);
-  return qr;      
+  return qr;
 }
 ;
 
-create procedure FOAF_SSL_WEBID_GET (in cert any := null)
+create procedure FOAF_SSL_WEBID_GET (in cert any := null, in cert_type int := 0)
 {
   declare agent, alts any;
-  agent := get_certificate_info (7, cert, 0, '', '2.5.29.17');
+  agent := get_certificate_info (7, cert, cert_type, '', '2.5.29.17');
   if (agent is not null)
     {
       alts := regexp_replace (agent, ',[ ]*', ',', 1, null);
@@ -50,13 +72,34 @@ create procedure FOAF_SSL_WEBID_GET (in cert any := null)
 }
 ;
 
-create procedure FOAF_SSL_MAIL_GET (in cert any := null)
+create procedure FOAF_SSL_WEBID_GET_ALL (in cert any := null, in cert_type int := 0)
+{
+  declare agents, agent, tmp, alts any;
+  agent := get_certificate_info (7, cert, cert_type, '', '2.5.29.17');
+  agents := null;
+  if (agent is not null)
+    {
+      declare inx int;
+      alts := regexp_replace (agent, ',[ ]*', ',', 1, null);
+      alts := split_and_decode (alts, 0, '\0\0,:');
+      if (alts is null)
+	return null;
+      while (0 <> (tmp := adm_next_keyword ('URI', alts, inx)))
+	{
+	  agents := vector_concat (agents, vector (tmp));
+	}
+    }
+  return agents;
+}
+;
+
+create procedure FOAF_SSL_MAIL_GET (in cert any := null, in cert_type int := 0)
 {
   declare alts, mail any;
-  mail := get_certificate_info (10, cert, 0, '', 'emailAddress');
+  mail := get_certificate_info (10, cert, cert_type, '', 'emailAddress');
   if (mail is null)
     {
-      alts := get_certificate_info (7, cert, 0, '', '2.5.29.17');
+      alts := get_certificate_info (7, cert, cert_type, '', '2.5.29.17');
       if (alts is not null)
 	{
 	  alts := regexp_replace (alts, ',[ ]*', ',', 1, null);
@@ -68,18 +111,36 @@ create procedure FOAF_SSL_MAIL_GET (in cert any := null)
 }
 ;
 
+create procedure FOAF_SSL_MAIL_GET_ALL (in cert any := null, in cert_type int := 0)
+{
+  declare alts, mail, ret any;
+  ret := vector ();
+  mail := get_certificate_info (10, cert, cert_type, '', 'emailAddress');
+  if (mail is not null)
+    ret := vector_concat (ret, vector (mail));
+  alts := get_certificate_info (7, cert, cert_type, '', '2.5.29.17');
+  if (alts is not null)
+    {
+      alts := regexp_replace (alts, ',[ ]*', ',', 1, null);
+      alts := split_and_decode (alts, 0, '\0\0,:');
+      mail := get_keyword ('email', alts);
+      if (mail is not null and not position (mail, ret)) 
+        ret := vector_concat (ret, vector (mail));
+    }
+  return ret;
+}
+;
+
 
 --
 -- WHEN USE try_loading_webid must clear the graph named as webid
--- 
-create procedure FOAF_SSL_WEBFINGER (in cert any := null, in try_loading_webid int := 0)
+--
+create procedure FOAF_SSL_WEBFINGER (in cert any := null, in try_loading_webid int := 0, in cert_type int := 0)
 {
-  declare mail, webid, domain, host_info, xrd, template, url any;
+  declare mails, webid, domain, host_info, xrd, template, url, h any;
   declare xt, xd, tmpcert any;
 
-  mail := FOAF_SSL_MAIL_GET (cert);
-  if (mail is null)
-    return null;
+  mails := FOAF_SSL_MAIL_GET_ALL (cert, cert_type);
 
   declare exit handler for sqlstate '*'
     {
@@ -87,40 +148,47 @@ create procedure FOAF_SSL_WEBFINGER (in cert any := null, in try_loading_webid i
       return null;
     };
 
-  domain := subseq (mail, position ('@', mail));
-  host_info := http_get (sprintf ('http://%s/.well-known/host-meta', domain));
-  xd := xtree_doc (host_info);
-  template := cast (xpath_eval ('/XRD/Link[@rel="lrdd"]/@template', xd) as varchar);
-  url := replace (template, '{uri}', 'acct:' || mail);
-  xrd := http_get (url);
-  xd := xtree_doc (xrd);
-  xt := xpath_eval ('/XRD/Property[@type="certificate"]/@href', xd, 0);
-  foreach (any x in xt) do
-    {
-      x := cast (x as varchar);
-      tmpcert := http_get (x);
-      if (get_certificate_info (6, cert, 0, '') = get_certificate_info (6, tmpcert, 0, ''))
+  foreach (varchar mail in mails) do
+    {
+      domain := subseq (mail, position ('@', mail));
+      h := null;
+      host_info := http_get (sprintf ('http://%s/.well-known/host-meta', domain), h, 'GET', null, null, null, 10, 15);
+      if (h is null or h[0] not like 'HTTP/1._ 200')
+	goto next_mail;
+      xd := xtree_doc (host_info);
+      template := cast (xpath_eval ('/XRD/Link[@rel="lrdd"]/@template', xd) as varchar);
+      url := replace (template, '{uri}', 'acct:' || mail);
+      xrd := http_get (url);
+      xd := xtree_doc (xrd);
+      xt := xpath_eval ('/XRD/Property[@type="certificate"]/@href', xd, 0);
+      foreach (any x in xt) do
 	{
-	  webid := null;
-	  if (try_loading_webid)
+	  x := cast (x as varchar);
+	  tmpcert := http_get (x);
+	  if (get_certificate_info (6, cert, cert_type, '') = get_certificate_info (6, tmpcert, 0, ''))
 	    {
-	      declare hf, gr, graph, qr, stat, msg any;
-	  webid := cast (xpath_eval ('/XRD/Property[@type="webid"]/@href', xd) as varchar);
-	      hf := rfc1808_parse_uri (webid);
-	      hf[5] := '';
-	      gr := DB.DBA.vspx_uri_compose (hf);
-	      graph := uuid ();
-	      qr := sprintf ('sparql load <%S> into graph <%S>', gr, graph);
-	      stat := '00000';
-	      exec (qr, stat, msg);
-	      commit work;
-	      if (stat = '00000')
-		return graph;
-	      else
-		return null;
+	      webid := null;
+	      if (try_loading_webid)
+		{
+		  declare hf, gr, graph, qr, stat, msg any;
+		  webid := cast (xpath_eval ('/XRD/Property[@type="webid"]/@href', xd) as varchar);
+		  hf := rfc1808_parse_uri (webid);
+		  hf[5] := '';
+		  gr := DB.DBA.vspx_uri_compose (hf);
+		  graph := uuid ();
+		  qr := sprintf ('sparql load <%S> into graph <%S>', gr, graph);
+		  stat := '00000';
+		  exec (qr, stat, msg);
+		  commit work;
+		  if (stat = '00000')
+		    return graph;
+		  else
+		    return null;
+		}
+	      return coalesce (webid, 'acct:' || mail);
 	    }
-	  return coalesce (webid, 'acct:' || mail);
 	}
+      next_mail:;
     }
   return null;
 }
@@ -129,24 +197,31 @@ create procedure FOAF_SSL_WEBFINGER (in cert any := null, in try_loading_webid i
 create procedure DB.DBA.FOAF_MOD (in m any)
 {
   declare modulus any;
-  modulus := lower (regexp_replace (m, '[^A-Z0-9a-f]', '', 1, null));	      
+  modulus := lower (regexp_replace (m, '[^A-Z0-9a-f]', '', 1, null));
   --dbg_obj_print_vars (modulus);
   return modulus;
 }
 ;
 
+grant execute on DB.DBA.FOAF_MOD to SPARQL_SELECT
+;
+
 create procedure FOAF_SSL_AUTH (in realm varchar)
 {
   return FOAF_SSL_AUTH_GEN (realm, 0);
 }
 ;
 
-create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0)
+create procedure WEBID_AUTH_GEN (in cert any, in ctype int, in realm varchar, in allow_nobody int := 0, in use_session int := 1)
 {
-  declare stat, msg, meta, data, info, qr, hf, graph, fing, gr, modulus, alts any;
+  declare stat, msg, meta, data, info, qr, hf, graph, fing, gr, modulus, alts, dummy any;
   declare agent varchar;
   declare acc int;
+  declare ret_code, done int;
+
+  ret_code := 0;
   acc := 0;
+  done := 0;
   declare exit handler for sqlstate '*'
     {
       rollback work;
@@ -155,22 +230,22 @@ create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0)
   ;
 
   gr := uuid ();
-  info := get_certificate_info (9);
-  fing := get_certificate_info (6);
-  agent := FOAF_SSL_WEBID_GET ();
+  info := get_certificate_info (9, cert, ctype);
+  fing := get_certificate_info (6, cert, ctype);
+  agent := FOAF_SSL_WEBID_GET (cert, ctype);
 
   if (not isarray (info))
     return 0;
   if (agent is null)
     {
-      agent := FOAF_SSL_WEBFINGER ();
+      agent := FOAF_SSL_WEBFINGER (cert, 0, ctype);
       if (agent is not null)
 	{
 	  goto authenticated;
 	}
       else
 	{
-	  agent := ODS..FINGERPOINT_WEBID_GET ();
+	  agent := ODS..FINGERPOINT_WEBID_GET (cert, null, ctype);
 	}
     }
   if (agent is null)
@@ -181,6 +256,10 @@ create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0)
       connection_set ('SPARQLUserId', VS_UID);
       return 1;
     }
+
+  if (agent like 'ldap://%' and DB.DBA.FOAF_SSL_LDAP_CHECK_CERT_INT (agent, cert, ctype, dummy))
+    goto authenticated;
+
   hf := rfc1808_parse_uri (agent);
   hf[5] := '';
   graph := DB.DBA.vspx_uri_compose (hf);
@@ -188,7 +267,7 @@ create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0)
   stat := '00000';
   exec (qr, stat, msg);
   commit work;
-  qr := FOAF_SSL_QR (gr, agent);    
+  qr := FOAF_SSL_QR (gr, agent);
   stat := '00000';
 --  dbg_printf ('%s', qr);
   exec (qr, stat, msg, vector (), 0, meta, data);
@@ -201,10 +280,11 @@ create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0)
     {
       declare arr, uid any;
 	      authenticated:
-      uid := coalesce ((select FS_UID from FOAF_SSL_ACL where FS_URI = agent), 'nobody');
+	      uid := coalesce ((select FS_UID from FOAF_SSL_ACL where agent like FS_URI), 'nobody');
       if ('nobody' = uid and allow_nobody = 0)
 	goto err_ret;
       connection_set ('SPARQLUserId', uid);
+	      if (use_session)
       insert into VSPX_SESSION (VS_SID, VS_REALM, VS_UID, VS_EXPIRY) values (fing, 'FOAF+SSL', uid, now ());
       exec (sprintf ('sparql clear graph <%S>', gr), stat, msg);
       commit work;
@@ -222,10 +302,433 @@ create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0)
       goto again_check;
     }
   err_ret:
+--  dbg_obj_print (stat, data);
   exec (sprintf ('sparql clear graph <%S>', gr), stat, msg);
   commit work;
---  dbg_obj_print (stat, data);
-  return 0;
+  {
+    declare page, xt, xp varchar;
+    declare exit handler for sqlstate '*'
+      {
+	goto ret;
+      };
+    page := http_client (url=>graph, n_redirects=>15);
+    verify:
+    xt := xtree_doc (page, 2);
+    xp := xpath_eval ('string (.)', xt);
+    xp := cast (xp as varchar);
+    -- try DI
+    if (strstr (xp, '#SHA1') is not null)
+      fing := get_certificate_info (6, cert, ctype, null, 'sha1');
+    fing := replace (fing, ':', '');
+    if (strstr (xp, sprintf ('Fingerprint:%s', fing)) is not null)
+      {
+	ret_code := 1;
+        goto ret;
+      }
+    if (graph like 'http://twitter.com/%')
+      {
+	declare acco, arr, json, res any;
+	arr := sprintf_inverse (graph, 'http://twitter.com/%s', 1);
+	acco := arr[0];
+        json := http_get (sprintf ('http://search.twitter.com/search.json?q=%%40Fingerprint%%3A%U%%20from%%3A%U', fing, acco));
+	arr := json_parse (json);
+        res := get_keyword ('results', arr);
+	if (length (res) > 0)
+	  {
+	    ret_code := 1;
+	    goto ret;
+	  }
+	fing := get_certificate_info (6, cert, ctype, null, 'sha1');
+	fing := replace (fing, ':', '');
+        json := http_get (sprintf ('http://search.twitter.com/search.json?q=%%40Fingerprint%%3A%U%%20from%%3A%U', fing, acco));
+	arr := json_parse (json);
+        res := get_keyword ('results', arr);
+	if (length (res) > 0)
+	  {
+	    ret_code := 1;
+	    goto ret;
+	  }
+      }
+    if (not done and graph like 'http://graph.facebook.com/%')
+      {
+	declare tok, og_id, tree, nick any;
+	tree := json_parse (page);
+	og_id := get_keyword ('id', tree);
+	nick := get_keyword ('username', tree);
+	tok := DB.DBA.OPENGRAPH_GET_ACCESS_TOKEN (og_id);
+	if (tok is null)
+	  goto ret;
+	page := http_get (sprintf ('https://graph.facebook.com/%U/feed?access_token=%U', nick, tok));
+	done := 1;
+	goto verify;
+      }
+    if (not done and graph like 'http://%.linkedin.com/in/%')
+      {
+	declare oauth_keys, arr, opts, url, api_url, cnt any;
+	declare consumer_key, consumer_secret, oauth_token, oauth_secret, person_id varchar;
+	opts := (select RM_OPTIONS from DB..SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_LINKEDIN');
+	oauth_keys := DB.DBA.LINKEDIN_GET_ACCESS_TOKEN (graph);
+	oauth_token := oauth_keys[0];
+	oauth_secret := oauth_keys[1];
+	consumer_key := get_keyword ('consumer_key', opts);
+	consumer_secret := get_keyword ('consumer_secret', opts);
+	api_url := sprintf ('https://api.linkedin.com/v1/people/url=%U:(id)', graph);
+	url := DB.DBA.sign_request ('GET', api_url, '', consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+	cnt := http_get (url);
+	xt := xtree_doc (cnt);
+        person_id := cast (xpath_eval ('/person/id/text()', xt) as varchar);
+	url := DB.DBA.sign_request ('GET', sprintf ('http://api.linkedin.com/v1/people/%s/network', person_id), 'type=SHAR&scope=self', consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+	page := http_get (url);
+	done := 1;
+	goto verify;
+      }
+    exec (sprintf (
+    'sparql define get:soft "add" prefix opl: <http://www.openlinksw.com/schemas/cert#> select ?f ?dgst from <%S> { ?s opl:hasCertificate ?c . ?c opl:fingerprint ?f ; opl:fingerprint-digest ?dgst . }',
+    	graph), stat, msg, vector (), 0, meta, data);
+    if (length (data))
+     {
+       foreach (any x in data) do
+    	 {
+	   declare fng, fng2 any;
+	   fng := get_certificate_info (6, cert, ctype, null, x[1]);
+	   fng := replace (fng, ':', '');
+	   fng2 := x[0];
+	   fng2 := replace (fng2, ':', '');
+    	   if (lower (fng2) = lower (fng))
+    	     {
+    	       ret_code := 1;
+    	       goto ret;
+    	     }
+    	 }
+      }
+
+  }
+  ret:
+  return ret_code;
+}
+;
+
+create procedure WEBID_DI_SPLIT (in str varchar)
+{
+  declare di, h, dgst varchar;
+  declare ret any;
+  ret := vector ();
+  while (di := regexp_match ('di:[^ <>]+', str, 1) is not null)
+    {
+      h := WS.WS.PARSE_URI (di);
+      dgst := bin2hex (cast (decode_base64 (replace (replace (h[3], '-', '+'), '_', '/')) as varbinary));
+      ret := vector_concat (ret, vector (vector (h[2], dgst)));
+    }
+  return ret;
+}
+;
+
+create procedure DB.DBA.X509_STRING_DATE (in val varchar)
+{
+  declare ret, tmp any;
+  ret := NULL;
+  declare exit handler for sqlstate '*'
+    {
+      return null;
+    };
+  val := regexp_replace (val, '[ ]+', ' ', 1, null);
+  -- Jan 11 14:36:33 2012 GMT
+  if (val is not null and regexp_match ('[[:upper:]][[:lower:]]{2} [0-9]{1,} [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4,} GMT', val) is not null)
+    {
+      tmp := sprintf_inverse (val, '%s %s %s %s GMT', 0);
+      if (tmp is not null and length (tmp) > 3)
+	{
+	  ret := http_string_date (sprintf ('Wee, %s %s %s %s GMT', tmp[1], tmp[0], tmp[3], tmp[2]));
+	  ret := dt_set_tz (ret, 0);
+	}
+    }    
+  return ret;
+}
+;
+
+create procedure WEBID_AUTH_GEN_2 (
+	in cert any,    		-- certificate
+	in ctype int, 			-- certificate type see get_certificate_info for details 
+	in realm varchar, 		-- application realm
+	in allow_nobody int := 0, 	-- anonymous access
+	in use_session int := 1, 	-- use session table
+	out ag any,   			-- detected webid URI
+	inout _gr any,			-- if non null data from webid URI will be loaded in the graph name in _gr
+	in check_expiration int := 0,
+	out validation_type int		-- if valid, the way it was done : 0 - rdf graph, 1 - webfinger, 2 - DI, 3 - search, 4 - sponge
+	)			
+{
+  declare stat, msg, meta, data, info, qr, hf, graph, fing, gr, modulus, alts, dummy any;
+  declare agent varchar;
+  declare acc int;
+  declare ret_code, done, is_di int;
+  declare agents, di_arr, dgst, dhash, fing_b64u any;
+  declare valid_from, valid_to datetime;
+
+  ret_code := 0;
+  acc := 0;
+  done := 0;
+  is_di := 0;
+  ag := null;
+  validation_type := null;
+  declare exit handler for sqlstate '*'
+    {
+      rollback work;
+      goto ret;
+    }
+  ;
+
+  if (cert is null and client_attr ('client_certificate') = 0)
+    return 0;
+
+  if (_gr is null)
+    gr := 'http:' || uuid ();
+  else
+    gr := _gr;
+  info := get_certificate_info (9, cert, ctype);
+  fing := get_certificate_info (6, cert, ctype);
+  valid_from := X509_STRING_DATE (get_certificate_info (4, cert, ctype)); 
+  valid_to := X509_STRING_DATE (get_certificate_info (5, cert, ctype)); 
+  if (check_expiration = 1 and (valid_to < now () or valid_from > now ()))
+    return 0;
+  agents := FOAF_SSL_WEBID_GET_ALL (cert, ctype);
+  if (not isarray (info))
+    return 0;
+  if (use_session)
+    {
+      for select VS_UID, VS_STATE from VSPX_SESSION where VS_SID = fing and VS_REALM = 'FOAF+SSL' do
+	{
+	  declare st any;
+	  st := deserialize (VS_STATE);
+	  ag := get_keyword ('agent', st);
+	  validation_type := get_keyword ('vtype', st);
+	  connection_set ('SPARQLUserId', VS_UID);
+	  return 1;
+	}
+    }
+
+  if (agents is null)
+    goto verify_mails;
+
+  foreach (any _agent in agents) do
+    {
+      agent := _agent;
+      agent_fp:
+      ag := agent;
+      if (agent like 'ldap://%' and DB.DBA.FOAF_SSL_LDAP_CHECK_CERT_INT (agent, cert, ctype, dummy))
+	{
+	  validation_type := 5;
+	  goto authenticated;
+	}
+
+      hf := rfc1808_parse_uri (agent);
+      hf[5] := '';
+      graph := DB.DBA.vspx_uri_compose (hf);
+      qr := sprintf ('sparql define get:soft "add" define get:uri <%S> select count(*) from <%S> { ?s ?p ?o }', graph, gr);
+      stat := '00000';
+      exec (qr, stat, msg);
+      commit work;
+      qr := FOAF_SSL_QR (gr, agent);    
+      stat := '00000';
+    --  dbg_printf ('%s', qr);
+      exec (qr, stat, msg, vector (), 0, meta, data);
+      validation_type := 0;
+      again_check:; 
+      if (stat = '00000' and length (data))
+	{
+	  foreach (any _row in data) do
+	    {
+	      declare mod any;
+	      mod := bin2hex (info[2]);
+	      --dbg_obj_print (_row[0], cast (info[1] as varchar), DB.DBA.FOAF_MOD (_row[1]), bin2hex (info[2]));
+	      if (_row[0] = cast (info[1] as varchar) and DB.DBA.FOAF_MOD (_row[1]) = bin2hex (info[2]))
+		{
+		  declare arr, uid any;
+		  authenticated:
+		  ag := agent;
+		  --_gr := graph;
+		  uid := coalesce ((select FS_UID from FOAF_SSL_ACL where agent like FS_URI), 'nobody');
+		  if ('nobody' = uid and allow_nobody = 0)
+		    goto ret;
+		  connection_set ('SPARQLUserId', uid);
+		  if (use_session)
+		    insert replacing VSPX_SESSION (VS_SID, VS_REALM, VS_UID, VS_EXPIRY, VS_STATE) 
+			values (fing, 'FOAF+SSL', uid, now (), serialize (vector ('agent', ag, 'vtype', validation_type)));
+		  if (_gr is null)
+		    exec (sprintf ('sparql clear graph <%S>', gr), stat, msg);
+		  commit work;
+		  return 1;
+		}
+	    }
+	}
+      else if (acc = 0)
+	{
+	  qr := FOAF_SSL_QR_BY_ACCOUNT (gr, agent);
+	  stat := '00000';
+	  --  dbg_printf ('%s', qr);
+	  exec (qr, stat, msg, vector (), 0, meta, data);
+	  acc := 1;
+	  goto again_check;
+	}
+    }
+  verify_mails:
+  agent := FOAF_SSL_WEBFINGER (cert, 0, ctype);
+  if (agent is not null)
+    {
+      validation_type := 1;
+      goto authenticated;
+    }
+  validation_type := null;
+  {
+    ag := graph;
+    declare page, xt, xp varchar;
+    declare exit handler for sqlstate '*'
+      {
+	goto ret;
+      };
+    page := http_client (url=>graph, n_redirects=>15);
+
+    verify:
+    xt := xtree_doc (page, 2);
+    xp := xpath_eval ('string (.)', xt);
+    xp := cast (xp as varchar);
+    di_arr := WEBID_DI_SPLIT (xp);
+    if (length (di_arr) > 1)
+      {
+	foreach (any elm in di_arr) do
+	  {
+	    dgst := elm [0];
+	    dhash := elm [1]; 
+	    fing := get_certificate_info (6, cert, ctype, null, dgst);
+	    fing := lower (replace (fing, ':', ''));
+	    fing_b64u := encode_base64url (cast (hex2bin (fing) as varchar));
+	    if (fing = dhash)
+	      {
+		validation_type := 2;
+		ret_code := 1;
+		goto ret;	
+	      }
+	    is_di := 1;
+	  }
+      }
+    else
+      {
+	if (strstr (xp, '#SHA1') is not null)
+	  fing := get_certificate_info (6, cert, ctype, null, 'sha1');
+	fing := replace (fing, ':', '');  
+      }
+    if (strstr (xp, sprintf ('Fingerprint:%s', fing)) is not null)
+      {
+	validation_type := 2;
+	ret_code := 1;
+        goto ret;	
+      }
+    if (graph like 'http://twitter.com/%')
+      {
+	declare acco, arr, json, res, url any;
+	arr := sprintf_inverse (graph, 'http://twitter.com/%s', 1);
+	acco := arr[0];
+	if (is_di)
+	  {
+	    url := sprintf ('http://search.twitter.com/search.json?q=%%40%%23X509Cert%%20di:%s;%s%%20from%%3A%U', dgst, fing_b64u, acco);
+	  }
+	else
+	  {
+	    url := sprintf ('http://search.twitter.com/search.json?q=%%40Fingerprint%%3A%U%%20from%%3A%U', fing, acco);
+	  }
+        json := http_get (url);
+	arr := json_parse (json);
+        res := get_keyword ('results', arr);
+	if (length (res) > 0)
+	  {
+	    validation_type := 3;
+	    ret_code := 1;
+	    goto ret;	
+	  }
+	if (not is_di)
+	  {
+	    fing := get_certificate_info (6, cert, ctype, null, 'sha1');
+	    fing := replace (fing, ':', '');  
+	    json := http_get (sprintf ('http://search.twitter.com/search.json?q=%%40Fingerprint%%3A%U%%20from%%3A%U', fing, acco));
+	    arr := json_parse (json);
+	    res := get_keyword ('results', arr);
+	    if (length (res) > 0)
+	      {
+		validation_type := 3;
+		ret_code := 1;
+		goto ret;	
+	      }
+	  }
+      }
+    if (not done and graph like 'http://graph.facebook.com/%')
+      {
+	declare tok, og_id, tree, nick any;
+	tree := json_parse (page);
+	og_id := get_keyword ('id', tree);
+	nick := get_keyword ('username', tree);
+	tok := DB.DBA.OPENGRAPH_GET_ACCESS_TOKEN (og_id);
+	if (tok is null)
+	  goto ret;
+	page := http_get (sprintf ('https://graph.facebook.com/%U/feed?access_token=%U', nick, tok));
+	done := 1;
+	goto verify;
+      }
+    if (not done and graph like 'http://%.linkedin.com/in/%')
+      {
+	declare oauth_keys, arr, opts, url, api_url, cnt any;
+	declare consumer_key, consumer_secret, oauth_token, oauth_secret, person_id varchar;
+	opts := (select RM_OPTIONS from DB..SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_LINKEDIN');
+	oauth_keys := DB.DBA.LINKEDIN_GET_ACCESS_TOKEN (graph);
+	oauth_token := oauth_keys[0];
+	oauth_secret := oauth_keys[1];
+	consumer_key := get_keyword ('consumer_key', opts);
+	consumer_secret := get_keyword ('consumer_secret', opts);
+	api_url := sprintf ('https://api.linkedin.com/v1/people/url=%U:(id)', graph);
+	url := DB.DBA.sign_request ('GET', api_url, '', consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+	cnt := http_get (url);
+	xt := xtree_doc (cnt);
+        person_id := cast (xpath_eval ('/person/id/text()', xt) as varchar);
+	url := DB.DBA.sign_request ('GET', sprintf ('http://api.linkedin.com/v1/people/%s/network', person_id), 'type=SHAR&scope=self', consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+	page := http_get (url);
+	done := 1;
+	goto verify;
+      }
+    exec (sprintf (
+    'sparql define get:soft "add" prefix opl: <http://www.openlinksw.com/schemas/cert#> select ?f ?dgst from <%S> { ?s opl:hasCertificate ?c . ?c opl:fingerprint ?f ; opl:fingerprint-digest ?dgst . }', 
+    	graph), stat, msg, vector (), 0, meta, data);
+    if (length (data))
+     {
+       foreach (any x in data) do
+    	 {
+	   declare fng, fng2 any;
+	   fng := get_certificate_info (6, cert, ctype, null, x[1]);
+	   fng := replace (fng, ':', '');  
+	   fng2 := x[0];
+	   fng2 := replace (fng2, ':', '');  
+    	   if (lower (fng2) = lower (fng))
+    	     {
+	       validation_type := 4;
+    	       ret_code := 1;
+    	       goto ret;
+    	     }
+    	 }
+      }
+
+  }
+  ret:
+  if (_gr is null)
+    exec (sprintf ('sparql clear graph <%S>', gr), stat, msg);
+  commit work;
+  return ret_code;
+}
+;
+
+create procedure FOAF_SSL_AUTH_GEN (in realm varchar, in allow_nobody int := 0, in use_session int := 1)
+{
+  declare cert, gr, w, vtype any;
+  cert := client_attr ('client_certificate');
+  gr := null;
+  return WEBID_AUTH_GEN_2 (cert, 0, realm, allow_nobody, use_session, w, gr, 0, vtype);
 }
 ;
 
@@ -242,6 +745,9 @@ create procedure FOAF_CHECK_WEBID (in agent varchar)
     }
   ;
 
+  if (agent like 'ldap://%')
+   return DB.DBA.FOAF_SSL_LDAP_CHECK (agent);
+
   hf := rfc1808_parse_uri (agent);
   hf[5] := '';
   graph := DB.DBA.vspx_uri_compose (hf);
@@ -252,7 +758,7 @@ create procedure FOAF_CHECK_WEBID (in agent varchar)
   stat := '00000';
   exec (qr, stat, msg);
   commit work;
-  qr := FOAF_SSL_QR (gr, agent);    
+  qr := FOAF_SSL_QR (gr, agent);
   stat := '00000';
 --  dbg_printf ('%s', qr);
   exec (qr, stat, msg, vector (), 0, meta, data);
@@ -284,6 +790,10 @@ DB.DBA.VHOST_REMOVE (vhost=>'*sslini*', lhost=>'*sslini*', lpath=>'/sparql-ssl')
 DB.DBA.VHOST_DEFINE (vhost=>'*sslini*', lhost=>'*sslini*', lpath=>'/sparql-ssl',
     ppath => '/!sparql/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1), auth_fn=>'DB.DBA.FOAF_SSL_AUTH');
 
+DB.DBA.VHOST_REMOVE (vhost=>'*sslini*', lhost=>'*sslini*', lpath=>'/sparql-webid');
+DB.DBA.VHOST_DEFINE (vhost=>'*sslini*', lhost=>'*sslini*', lpath=>'/sparql-webid',
+    ppath => '/!sparql/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1), auth_fn=>'DB.DBA.FOAF_SSL_AUTH');
+
 create procedure FOAF_SSL_AUTH_ACL (in acl varchar, in realm varchar)
 {
   declare stat, msg, meta, data, info, qr, hf, graph, fing, gr, modulus, alts any;
@@ -325,7 +835,7 @@ create procedure FOAF_SSL_AUTH_ACL (in acl varchar, in realm varchar)
 
   gr := uuid ();
 
-  if (wf) 
+  if (wf)
     goto authenticated;
 
   hf := rfc1808_parse_uri (agent);
@@ -335,11 +845,11 @@ create procedure FOAF_SSL_AUTH_ACL (in acl varchar, in realm varchar)
   stat := '00000';
   exec (qr, stat, msg);
   commit work;
-  qr := FOAF_SSL_QR (gr, agent);    
+  qr := FOAF_SSL_QR (gr, agent);
   stat := '00000';
   exec (qr, stat, msg, vector (), 0, meta, data);
-  again_check:; 
-  if (stat = '00000' and length (data)) 
+  again_check:;
+  if (stat = '00000' and length (data))
     {
       foreach (any _row in data) do
         {
@@ -366,3 +876,63 @@ create procedure FOAF_SSL_AUTH_ACL (in acl varchar, in realm varchar)
   return rc;
 }
 ;
+
+create procedure DB.DBA.FOAF_SSL_LDAP_CHECK (in agent varchar := null)
+{
+  declare dummy any;
+  return DB.DBA.FOAF_SSL_LDAP_CHECK_INT (agent, dummy);
+}
+;
+
+create procedure DB.DBA.FOAF_SSL_LDAP_CHECK_INT (in agent varchar := null, out data any)
+{
+  return DB.DBA.FOAF_SSL_LDAP_CHECK_CERT_INT (agent, null, 0, data);
+}
+;
+
+create procedure DB.DBA.FOAF_SSL_LDAP_CHECK_CERT_INT (in agent varchar := null, in incert any := null, in incert_type int := 0, out data any)
+{
+  declare host, str, ss varchar;
+  declare arr, rc, cert, res any;
+  declare i int;
+  res := 0;
+  data := null;
+  if (incert is null)
+    incert := client_attr ('client_certificate');
+  if (agent is null)
+    agent := FOAF_SSL_WEBID_GET (incert, incert_type);
+  if (agent is null or agent not like 'ldap://%')
+    goto failed;
+  arr := sprintf_inverse (agent, 'ldap://%s/%s', 1);
+  if (length (arr) <> 2)
+    goto failed;
+  host := arr[0];
+  if (strchr (host, ':') is null)
+    host := host || ':389';
+  host := 'ldap://' || host;
+  arr[1] := replace (arr[1], '%2C', ',');
+  str := split_and_decode (arr[1], 0, '%+,=');
+  ss := '(&';
+  for (i := 0; i < length (str); i := i + 2)
+    {
+      ss := ss || sprintf ('(%s=%s)', str[i], str[i+1]);
+    }
+  ss := ss || ')';
+  for select * from SYS_LDAP_SERVERS where LS_ADDRESS = host do
+    {
+      declare exit handler for sqlstate '*' { goto failed; };
+      rc := ldap_search (host, LS_TRY_SSL, LS_BASE, ss, sprintf('%s=%s, %s', LS_UID_FLD, LS_ACCOUNT, LS_BIND_DN), LS_PASSWORD);
+      if (isvector (rc) and length (rc) > 1)
+        {
+          cert := get_keyword ('userCertificate;binary', rc[1]);
+          if (isvector (cert) and length (cert) and get_certificate_info (6, incert, incert_type) = get_certificate_info (6, cert[0], 1))
+	    {
+	    res := 1;
+	      data := rc;
+	    }
+        }
+    }
+failed:
+  return res;
+}
+;
diff --git a/appsrc/ODS-Framework/oauth/login.vspx b/appsrc/ODS-Framework/oauth/login.vspx
index 9fe1086..2a2435b 100644
--- a/appsrc/ODS-Framework/oauth/login.vspx
+++ b/appsrc/ODS-Framework/oauth/login.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: login.vspx,v 1.1.2.2 2010/09/20 10:15:35 source Exp $
+ -  $Id: login.vspx,v 1.1.2.3 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/make_vad.sh b/appsrc/ODS-Framework/oauth/make_vad.sh
index 0b4ab7f..c716ffd 100755
--- a/appsrc/ODS-Framework/oauth/make_vad.sh
+++ b/appsrc/ODS-Framework/oauth/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.7.2.4 2011/02/03 10:26:15 source Exp $
+#  $Id: make_vad.sh,v 1.7.2.7 2012/03/08 10:46:20 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -252,7 +252,7 @@ sticker_init() {
   echo "  <name package=\"$VAD_NAME\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"$VAD_DESC\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -294,14 +294,14 @@ fi
   # OAuth server endpoint
   echo "    DB.DBA.VHOST_REMOVE (lpath=>'/oauth');" >> $STICKER
   echo "    DB.DBA.VHOST_DEFINE (lpath=>'/oauth', ppath=>_ppath, vsp_user=>'dba', is_dav=>$ISDAV, is_brws=>0, def_page=>'index.vsp');" >> $STICKER
-  # SPARQL + OAUTH 
-  echo "    DB.DBA.VHOST_REMOVE (lpath=>'/sparql-oauth');" >> $STICKER
-  echo "    DB.DBA.VHOST_DEFINE (lpath=>'/sparql-oauth', ppath=>_ppath, vsp_user=>'dba', is_dav=>$ISDAV, is_brws=>0, def_page=>'sparql.vsp');" >> $STICKER
   # UI for settings etc.
   echo "    DB.DBA.VHOST_REMOVE (lpath=>'/$VAD_NAME');" >> $STICKER
   echo "    DB.DBA.VHOST_DEFINE (lpath=>'/$VAD_NAME', ppath=>_ppath, vsp_user=>'dba', is_dav=>$ISDAV, is_brws=>0, def_page=>'index.vsp');" >> $STICKER
   echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/oauth.sql', 0, 'report', $ISDAV);" >> $STICKER
   echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/foaf_ssl.sql', 0, 'report', $ISDAV);" >> $STICKER
+  # SPARQL + OAUTH 
+  echo "    DB.DBA.VHOST_REMOVE (lpath=>'/sparql-oauth');" >> $STICKER
+  echo "    DB.DBA.VHOST_DEFINE (lpath=>'/sparql-oauth', ppath=>_ppath, vsp_user=>'dba', is_dav=>$ISDAV, is_brws=>0, def_page=>'sparql.vsp');" >> $STICKER
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
   echo "  <sql purpose='pre-uninstall'>" >> $STICKER
diff --git a/appsrc/ODS-Framework/oauth/oauth.sql b/appsrc/ODS-Framework/oauth/oauth.sql
index 960bd8d..75bbae0 100644
--- a/appsrc/ODS-Framework/oauth/oauth.sql
+++ b/appsrc/ODS-Framework/oauth/oauth.sql
@@ -1,12 +1,12 @@
 --
---  $Id: oauth.sql,v 1.2.2.4 2010/09/20 10:15:35 source Exp $
+--  $Id: oauth.sql,v 1.2.2.8 2012/03/08 10:46:20 source Exp $
 --
 --  OAuth protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -97,6 +97,9 @@ create procedure OAUTH..OAUTH_INIT ()
 DB.DBA.VHOST_REMOVE (lpath=>'/OAuth');
 DB.DBA.VHOST_DEFINE (lpath=>'/OAuth', ppath=>'/SOAP/Http', soap_user=>'OAuth');
 
+DB.DBA.VHOST_REMOVE (lpath=>'/sparql-oauth');
+DB.DBA.VHOST_DEFINE (lpath=>'/sparql-oauth', ppath=>'/DAV/VAD/wa/oauth/', vsp_user=>'dba', is_dav=>1, is_brws=>0, def_page=>'sparql.vsp');
+
 OAUTH..OAUTH_INIT ();
 
 create procedure OAUTH..normalize_params (
@@ -722,4 +725,34 @@ web_user_password_check (in name varchar, in pass varchar)
   return rc;
 }
 ;
+
 use DB;
+
+create procedure WA_USER_OAUTH_UPGRADE ()
+{
+  declare params any;
+
+  if (registry_get ('__WA_USER_OAUTH_UPGRADE') = 'done')
+    return;
+
+  declare exit handler for sqlstate '*' {return; };
+
+  params := (select US_KEY from WA_USER_SVC where US_U_ID = 2 and US_SVC = 'FBKey');
+  if (length (params))
+  {
+    params := replace (params, '\r\n', '&');
+    params := replace (params, '\n', '&');
+    params := split_and_decode (params);
+    if (params is not null and length (trim (get_keyword ('key', params))) > 4 and length (trim (get_keyword ('secret', params))) > 4)
+    {
+      insert into OAUTH..APP_REG (A_OWNER, A_NAME, A_KEY, A_SECRET)
+        values (0, 'Facebook API', trim(get_keyword('key', params)), trim (get_keyword ('secret', params)));
+
+      delete from WA_USER_SVC where US_SVC = 'FBKey';
+    }
+  }
+  registry_set ('__WA_USER_OAUTH_UPGRADE', 'done');
+}
+;
+WA_USER_OAUTH_UPGRADE ();
+
diff --git a/appsrc/ODS-Framework/oauth/oauth_apps.vspx b/appsrc/ODS-Framework/oauth/oauth_apps.vspx
index c4c49f1..933d03f 100644
--- a/appsrc/ODS-Framework/oauth/oauth_apps.vspx
+++ b/appsrc/ODS-Framework/oauth/oauth_apps.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: oauth_apps.vspx,v 1.1.2.2 2010/09/20 10:15:35 source Exp $
+ -  $Id: oauth_apps.vspx,v 1.1.2.3 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/oauth_authorize.vspx b/appsrc/ODS-Framework/oauth/oauth_authorize.vspx
index ccc1c71..772de88 100644
--- a/appsrc/ODS-Framework/oauth/oauth_authorize.vspx
+++ b/appsrc/ODS-Framework/oauth/oauth_authorize.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: oauth_authorize.vspx,v 1.1.2.3 2010/09/20 10:15:35 source Exp $
+ -  $Id: oauth_authorize.vspx,v 1.1.2.4 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/oauth_error.vspx b/appsrc/ODS-Framework/oauth/oauth_error.vspx
index 66b54b6..4dc2e9a 100644
--- a/appsrc/ODS-Framework/oauth/oauth_error.vspx
+++ b/appsrc/ODS-Framework/oauth/oauth_error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: oauth_error.vspx,v 1.1.2.1 2010/09/20 10:15:35 source Exp $
+ -  $Id: oauth_error.vspx,v 1.1.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/sel_user.vspx b/appsrc/ODS-Framework/oauth/sel_user.vspx
index 8db41de..154e832 100644
--- a/appsrc/ODS-Framework/oauth/sel_user.vspx
+++ b/appsrc/ODS-Framework/oauth/sel_user.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: sel_user.vspx,v 1.1.2.1 2010/09/20 10:15:35 source Exp $
+ -  $Id: sel_user.vspx,v 1.1.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/sparql_acl.vspx b/appsrc/ODS-Framework/oauth/sparql_acl.vspx
index e0b79d7..4fc65e8 100644
--- a/appsrc/ODS-Framework/oauth/sparql_acl.vspx
+++ b/appsrc/ODS-Framework/oauth/sparql_acl.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sparql_acl.vspx,v 1.3.2.4 2010/09/20 10:15:36 source Exp $
+ -  $Id: sparql_acl.vspx,v 1.3.2.5 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth/vad_version b/appsrc/ODS-Framework/oauth/vad_version
index 01c08cf..9ea63db 100644
--- a/appsrc/ODS-Framework/oauth/vad_version
+++ b/appsrc/ODS-Framework/oauth/vad_version
@@ -1 +1 @@
-1.0.68
+1.1.13
diff --git a/appsrc/ODS-Framework/oauth_apps.vspx b/appsrc/ODS-Framework/oauth_apps.vspx
index e684796..5b7c42d 100644
--- a/appsrc/ODS-Framework/oauth_apps.vspx
+++ b/appsrc/ODS-Framework/oauth_apps.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: oauth_apps.vspx,v 1.3.2.2 2011/03/08 13:28:14 source Exp $
+ -  $Id: oauth_apps.vspx,v 1.3.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/oauth_sid.vsp b/appsrc/ODS-Framework/oauth_sid.vsp
index fdebdd1..644d5d9 100644
--- a/appsrc/ODS-Framework/oauth_sid.vsp
+++ b/appsrc/ODS-Framework/oauth_sid.vsp
@@ -146,7 +146,7 @@
           <a href="/ods/privacy.html">Privacy</a> |
           <a href="/ods/rabuse.vspx">Report Abuse</a>
           <div class="copyright">
-            Copyright © 1998-2011 OpenLink Software
+            Copyright © 1998-2012 OpenLink Software
           </div>
         </div>
       </div>
diff --git a/appsrc/ODS-Framework/ods_api.sql b/appsrc/ODS-Framework/ods_api.sql
index a12c15c..01040df 100644
--- a/appsrc/ODS-Framework/ods_api.sql
+++ b/appsrc/ODS-Framework/ods_api.sql
@@ -312,8 +312,7 @@ create procedure ODS_CREATE_USER (
                  'DAV_ENABLE' , 1,
                  'SQL_ENABLE', 0));
    update SYS_USERS set U_ACCOUNT_DISABLED = _mail_verify_on where U_ID = uid;
-   DAV_MAKE_DIR ('/DAV/home/', http_dav_uid (), http_admin_gid (), '110100100R');
-  DAV_MAKE_DIR ('/DAV/home/' || _username || '/', uid, http_nogroup_gid (), '110100000R');
+  DB.DBA.DAV_HOME_DIR_CREATE (_username);
 
   declare _det_col_id integer;
   _det_col_id := DB.DBA.DAV_MAKE_DIR ('/DAV/home/'||_username||'/RDFData/', uid, http_nogroup_gid (), '110100100N');
@@ -325,7 +324,7 @@ create procedure ODS_CREATE_USER (
 
    WA_USER_EDIT (_username, 'WAUI_SEARCHABLE', _is_searchable);
    WA_USER_EDIT (_username, 'WAUI_SHOWACTIVE', _show_activity);
-
+  if (0) -- don't use IP location service, since this api can be run locally
    {
      declare coords any;
      declare exit handler for sqlstate '*';
diff --git a/appsrc/ODS-Framework/ods_bar.vspx b/appsrc/ODS-Framework/ods_bar.vspx
index d9dab29..b571e2f 100644
--- a/appsrc/ODS-Framework/ods_bar.vspx
+++ b/appsrc/ODS-Framework/ods_bar.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ods_bar.vspx,v 1.4.2.1 2010/09/20 10:15:23 source Exp $
+ -  $Id: ods_bar.vspx,v 1.4.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/ods_controllers.sql b/appsrc/ODS-Framework/ods_controllers.sql
index f179ed4..3f6a63d 100644
--- a/appsrc/ODS-Framework/ods_controllers.sql
+++ b/appsrc/ODS-Framework/ods_controllers.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ods_controllers.sql,v 1.19.2.61 2011/03/26 14:22:25 source Exp $
+--  $Id: ods_controllers.sql,v 1.19.2.85 2012/03/11 13:26:24 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -63,6 +63,8 @@ create procedure ods_serialize_int_res (in rc any, in msg varchar := '')
 
 create procedure ods_serialize_sql_error (in state varchar, in message varchar)
 {
+  message := substring (message, 1, coalesce (strstr (message, '<>'), length (message)));
+  message := substring (message, 1, coalesce (strstr (message, '\nin'), length (message)));
   return sprintf ('<failed><code>%s</code><message>%V</message></failed>', state, message);
 }
 ;
@@ -455,6 +457,13 @@ create procedure params2json (in o any)
 }
 ;
 
+create procedure json2obj (
+  in o any)
+{
+  return json_parse (o);
+}
+;
+
 create procedure dav_path_normalize (
   in path varchar,
   in path_type varchar := 'P')
@@ -509,7 +518,7 @@ create procedure ODS.ODS_API."qrcode" (
   in data any,
   in width int := 120,
   in height int := 120,
-  in scale int := 4) __soap_http 'text/plain'
+  in scale int := 3) __soap_http 'text/plain'
 {
   declare qrcode_bytes, mixed_content, content varchar;
   declare qrcode any;
@@ -530,13 +539,21 @@ create procedure ODS.ODS_API."qrcode" (
 }
 ;
 
+create procedure ODS.ODS_API."iri2proxy" (
+  in iri any) __soap_http 'text/plain'
+{
+  return DB.DBA.RDF_PROXY_ENTITY_IRI (rtrim (iri, '#this'));
+}
+;
+
 -- Ontology Info
 create procedure ODS.ODS_API."ontology.classes" (
   in ontology varchar,
+  in prefix varchar,
   in dependentOntology varchar := null) __soap_http 'application/json'
 {
   declare S, data any;
-  declare tmp, classes, retValue, dependency any;
+  declare tmp, classes, clazz, subClasses, retValue, dependency any;
 
   set_user_id ('dba');
   -- load ontology
@@ -584,10 +601,26 @@ create procedure ODS.ODS_API."ontology.classes" (
          ontology,
          dependency,
          ontology);
+  clazz := '';
+  subClasses := vector ();
   data := ODS.ODS_API."ontology.sparql" (S);
   foreach (any item in data) do
   {
-    tmp := vector_concat (jsonObject (), vector ('name', ODS.ODS_API."ontology.normalize" (item[0]), 'subClassOf', case when isnull (item[1]) then 'rdfs:Class' else ODS.ODS_API."ontology.normalize" (item[1]) end));
+    if (clazz <> ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[0]))
+    {
+      if (clazz <> '')
+      {
+        tmp := vector_concat (jsonObject (), vector ('name', clazz, 'subClassOf', subClasses));
+        classes := vector_concat (classes, vector (tmp));
+      }
+      clazz := ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[0]);
+      subClasses := vector ();
+    }
+    subClasses := vector_concat (subClasses, vector (case when isnull (item[1]) then 'rdfs:Class' else ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[1]) end));
+  }
+  if (clazz <> '')
+  {
+    tmp := vector_concat (jsonObject (), vector ('name', clazz, 'subClassOf', subClasses));
     classes := vector_concat (classes, vector (tmp));
   }
   retValue := vector_concat (jsonObject (), vector ('name', ontology, 'classes', classes));
@@ -596,15 +629,15 @@ create procedure ODS.ODS_API."ontology.classes" (
 ;
 
 create procedure ODS.ODS_API."ontology.classProperties" (
+  in ontology varchar,
+  in prefix varchar,
   in ontologyClass varchar) __soap_http 'application/json'
 {
   declare N integer;
   declare S, data any;
-  declare prefix, ontology, tmp, property, properties any;
+  declare tmp, property, properties any;
 
   -- select class properties ontology
-    prefix := ODS.ODS_API."ontology.prefix" (ontologyClass);
-  ontology := ODS.ODS_API."ontology.byPrefix" (prefix);
   properties := vector ();
   S := sprintf(
          '\n SPARQL' ||
@@ -659,13 +692,13 @@ create procedure ODS.ODS_API."ontology.classProperties" (
     if (property[0] <> item[0])
     {
       if (property[0] <> '')
-          properties := vector_concat (properties, vector (ODS.ODS_API."ontology.objectProperty" (property)));
+        properties := vector_concat (properties, vector (ODS.ODS_API."ontology.objectProperty" (ontology, prefix, property)));
       property := vector (item[0], vector (), vector ());
     }
-    tmp := ODS.ODS_API."ontology.normalize"(item[1]);
+    tmp := ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[1]);
     if (tmp = 'owl:ObjectProperty')
     {
-      tmp := ODS.ODS_API."ontology.normalize"(item[2]);
+      tmp := ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[2]);
       if (tmp not like 'nodeID:%')
       {
         property[1] := vector_concat (property[1], vector (tmp));
@@ -675,17 +708,18 @@ create procedure ODS.ODS_API."ontology.classProperties" (
     }
     else if (tmp = 'owl:DatatypeProperty')
     {
-      property[2] := vector_concat (property[2], vector (ODS.ODS_API."ontology.normalize" (coalesce (item[2], 'xsd:string'))));
+      property[2] := vector_concat (property[2], vector (ODS.ODS_API."ontology.normalize2" (ontology, prefix, coalesce (item[2], 'xsd:string'))));
     }
   }
   if (property[0] <> '')
-      properties := vector_concat (properties, vector (ODS.ODS_API."ontology.objectProperty" (property)));
+    properties := vector_concat (properties, vector (ODS.ODS_API."ontology.objectProperty" (ontology, prefix, property)));
   return obj2json (properties, 10);
 }
 ;
 
 create procedure ODS.ODS_API."ontology.objects" (
-  in ontology varchar) __soap_http 'application/json'
+  in ontology varchar,
+  in prefix varchar) __soap_http 'application/json'
 {
   declare S, data any;
   declare tmp, objects any;
@@ -708,7 +742,7 @@ create procedure ODS.ODS_API."ontology.objects" (
   data := ODS.ODS_API."ontology.sparql" (S);
   foreach (any item in data) do
   {
-    tmp := vector_concat (jsonObject (), vector ('id', ODS.ODS_API."ontology.normalize" (item[0]), 'class', ODS.ODS_API."ontology.normalize" (item[1])));
+    tmp := vector_concat (jsonObject (), vector ('id', ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[0]), 'class', ODS.ODS_API."ontology.normalize2" (ontology, prefix, item[1])));
     objects := vector_concat (objects , vector (tmp));
   }
   return obj2json (objects , 10);
@@ -728,7 +762,6 @@ create procedure ODS.ODS_API."ontology.sparql" (
   commit work;
   st := '00000';
   exec (S, st, msg, V, vector ('use_cache', 1), meta, data);
-  --exec (S, st, msg, V, 0, meta, data);
   if (debug)
     dbg_obj_princ (S, st, msg);
   if (st = '00000')
@@ -763,11 +796,13 @@ create procedure ODS.ODS_API."ontology.load" (
 ;
 
 create procedure ODS.ODS_API."ontology.objectProperty" (
+  in ontology varchar,
+  in prefix varchar,
   in property any)
 {
   declare retValue any;
 
-  retValue := vector_concat (jsonObject (), vector ('name', ODS.ODS_API."ontology.normalize"(property[0])));
+  retValue := vector_concat (jsonObject (), vector ('name', ODS.ODS_API."ontology.normalize2" (ontology, prefix, property[0])));
   if (length (property[1]))
     retValue := vector_concat (retValue, vector ('objectProperties', property[1]));
   if (length (property[2]))
@@ -833,12 +868,14 @@ create procedure ODS.ODS_API."ontology.byPrefix" (
 ;
 
 create procedure ODS.ODS_API."ontology.normalize" (
-  in inValue varchar)
+  in inValue varchar,
+  in ontologies any := null)
 {
   if (not isnull (inValue))
   {
-    declare N, ontologies any;
+    declare N integer;
 
+    if (isnull (ontologies))
     ontologies := ODS.ODS_API."ontology.array" ();
     for (N := 0; N < length (ontologies); N := N + 2)
     {
@@ -850,13 +887,29 @@ create procedure ODS.ODS_API."ontology.normalize" (
 }
 ;
 
-create procedure ODS.ODS_API."ontology.denormalize" (
+create procedure ODS.ODS_API."ontology.normalize2" (
+  in ontology varchar,
+  in prefix varchar,
   in inValue varchar)
 {
   if (not isnull (inValue))
   {
-    declare N, pos, tmp, ontologies any;
+    if (inValue like (ontology || '%'))
+      return prefix || ':' || subseq (inValue, length (ontology));
+  }
+  return ODS.ODS_API."ontology.normalize" (inValue);
+}
+;
+
+create procedure ODS.ODS_API."ontology.denormalize" (
+  in inValue varchar,
+  in ontologies any := null)
+{
+  if (not isnull (inValue))
+  {
+    declare N, pos, tmp any;
 
+    if (isnull (ontologies))
     ontologies := ODS.ODS_API."ontology.array" ();
     pos := strrchr (inValue, ':');
     if (pos is not null)
@@ -873,6 +926,20 @@ create procedure ODS.ODS_API."ontology.denormalize" (
 }
 ;
 
+create procedure ODS.ODS_API."ontology.denormalize2" (
+  in ontology varchar,
+  in prefix varchar,
+  in inValue varchar)
+{
+  if (not isnull (inValue))
+  {
+    if (inValue like (prefix || ':%'))
+      return ontology || subseq (inValue, length (prefix)+1);
+  }
+  return ODS.ODS_API."ontology.denormalize" (inValue);
+}
+;
+
 create procedure ODS.ODS_API."ontology.collection" (
   in ontology varchar,
   in inValue varchar)
@@ -924,6 +991,49 @@ _again:
 }
 ;
 
+create procedure ODS.ODS_API."objects.rdf" (
+  in items varchar,
+  in format varchar := 'TTL')  __soap_http 'text/plain'
+{
+  declare accept, graph_iri, forum_iri, user_iri varchar;
+  declare S, state, msg, accept, sStream any;
+  declare ontologies, rows, meta any;
+
+  graph_iri := ODS.ODS_API.graph_create ();
+  forum_iri := graph_iri || '/forum';
+  user_iri := graph_iri || '/user';
+
+  ontologies := json_parse (items);
+  foreach (any ontology in ontologies) do
+  {
+    SIOC..sioc_user_item_create (graph_iri, forum_iri, user_iri, get_keyword ('items', ontology, vector ()));
+  }
+
+  sStream := string_output();
+  S := sprintf ('SPARQL select * from <%s> where {?s ?p ?o}', graph_iri);
+  state := '00000';
+  set_user_id ('dba');
+  exec (S, state, msg, vector (), 0, meta, rows);
+  if (state = '00000')
+  {
+    declare dict any;
+
+    dict := dict_new (10);
+    for (select S, P, O from DB.DBA.RDF_QUAD where G = iri_to_id (graph_iri)) do
+      dict_put (dict, vector (S, P, O), 1);
+
+    if (format = 'TTL')
+    {
+      sStream := DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TTL (dict);
+    } else {
+      sStream := DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML (dict);
+    }
+  }
+  ODS.ODS_API.graph_clear (graph_iri);
+  return sprintf ('%V', string_output_string (sStream));
+}
+;
+
 create procedure ODS.ODS_API."lookup.list" (
   in "key" varchar,
   in "param" varchar := '',
@@ -1009,9 +1119,14 @@ create procedure ODS.ODS_API."lookup.list" (
       uid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = uname);
       paramTest := '';
       if ("param" <> '')
-        paramTest := sprintf (' and a.P_IRI like ''%%%s%%''', "param");
+        paramTest := sprintf (' and lcase (x.F2) like ''%%%s%%''', lcase("param"));
+
+      if ("depend" = '' or "depend" = 'p')
+        sql := sprintf ('select x.F1, x.F2, x.F3 from DB.DBA.wa_webid_users(user_id) (F1 varchar, F2 varchar, F3 varchar) x where x.user_id = %d %s', uid, paramTest);
+
+      if ("depend" = 'g')
+        sql := sprintf ('select x.* from (select ''Group'' F1, SIOC..acl_group_iri (%d, WACL_NAME) F2, WACL_DESCRIPTION F3 from WA_GROUPS_ACL where WACL_USER_ID = %d) x where 1=1 %s', uid, uid, paramTest);
 
-      sql := sprintf ('select ''Person'' F1, a.P_IRI F2, a.P_NAME F3 from AB.WA.PERSONS a, DB.DBA.WA_MEMBER b, DB.DBA.WA_INSTANCE c where a.P_DOMAIN_ID = c.WAI_ID and c.WAI_TYPE_NAME = ''AddressBook'' and c.WAI_NAME = b.WAM_INST and B.WAM_MEMBER_TYPE = 1 and b.WAM_USER = %d and DB.DBA.is_empty_or_null (a.P_IRI) <> 1 %s', uid, paramTest);
       set_user_id ('dba');
       st := '00000';
       exec (sql, st, msg, vector (), 0, meta, rows);
@@ -1097,36 +1212,45 @@ create procedure ODS.ODS_API."lookup.list" (
 }
 ;
 
-create procedure ODS..getDefaultHttps ()
+create procedure ODS.ODS_API.getDefaultHttps () __SOAP_HTTP 'text/plain'
 {
   declare host, port, tmp varchar;
-  host := null; port := null;
-  for select top 1 HP_HOST, HP_LISTEN_HOST from  DB.DBA.HTTP_PATH, DB.DBA.WA_DOMAINS
-    where HP_PPATH like '/DAV/VAD/wa/%' and WD_HOST = HP_HOST and WD_LISTEN_HOST = HP_LISTEN_HOST
-	and WD_LPATH = HP_LPATH and HP_HOST not like '*sslini*' and HP_SECURITY = 'SSL' and length (HP_HOST) do
-	 {
-	    tmp := split_and_decode (HP_LISTEN_HOST, 0, '\0\0:');
-	    if (length (tmp) = 2)
-	      tmp := tmp[1];
-	    else
-	      tmp := HP_LISTEN_HOST;
-	    host := HP_HOST;
-	    port := tmp;  
-	    if (port <> '443')
-	      host := host || ':' || port;
-	 }
+
+  host := null;
+  port := null;
+  for select top 1 HP_HOST, HP_LISTEN_HOST
+        from DB.DBA.HTTP_PATH, DB.DBA.WA_DOMAINS
+       where HP_PPATH like '/DAV/VAD/wa/%'
+         and WD_HOST = HP_HOST
+         and WD_LISTEN_HOST = HP_LISTEN_HOST
+	       and WD_LPATH = HP_LPATH
+	       and HP_HOST not like '*sslini*'
+	       and HP_SECURITY = 'SSL'
+	       and length (HP_HOST) do
+	{
+	  tmp := split_and_decode (HP_LISTEN_HOST, 0, '\0\0:');
+	  if (length (tmp) = 2)
+	    tmp := tmp[1];
+	  else
+	    tmp := HP_LISTEN_HOST;
+	  host := HP_HOST;
+	  port := tmp;
+	  if (port <> '443')
+	    host := host || ':' || port;
+	}
   if (server_https_port () is not null and host is null)
-    {
-      host := registry_get ('URIQADefaultHost');
-      tmp := split_and_decode (host, 0, '\0\0:');
-      if (length (tmp) = 2)
-	tmp := tmp[0];
-      else
-	tmp := host;
-      port := server_https_port (); 
-      if (port <> '443')
-	host := host || ':' || port;
-    }
+  {
+    host := registry_get ('URIQADefaultHost');
+    tmp := split_and_decode (host, 0, '\0\0:');
+    if (length (tmp) = 2)
+	    tmp := tmp[0];
+    else
+	    tmp := host;
+
+    port := server_https_port ();
+    if (port <> '443')
+	    host := tmp || ':' || port;
+  }
   return host;
 }
 ;
@@ -1225,6 +1349,37 @@ create procedure ODS.ODS_API."address.geoData" (
 
 -- User account activity
 
+create procedure ODS.ODS_API."user.checkAvalability" (
+  in name varchar := null,
+	in email varchar := null) __soap_http 'text/xml'
+{
+  declare exit handler for sqlstate '*'
+  {
+    rollback work;
+    return ods_serialize_sql_error (__SQL_STATE, __SQL_MESSAGE);
+  };
+  if (name is null or length (name) < 1 or length (name) > 20)
+    signal ('23023', 'Login name cannot be empty or longer then 20 chars');
+
+  if (regexp_match ('^[A-Za-z0-9_. at -]+\$', name) is null)
+    signal ('23023', 'The login name contains invalid characters');
+
+  if (exists (select 1 from DB.DBA.SYS_USERS where U_NAME = name))
+    signal ('23023', 'This login name is already registered');
+
+  if (email is null or length (email) < 1 or length (email) > 40)
+    signal ('23023', 'E-mail address cannot be empty or longer then 40 chars');
+
+  if (regexp_match ('[^@ ]+@([^\. ]+\.)+[^\. ]+', email) is null)
+    signal ('23023', 'Invalid E-mail address');
+
+  if (exists (select 1 from DB.DBA.SYS_USERS where U_E_MAIL = email) and exists (select 1 from DB.DBA.WA_SETTINGS where WS_UNIQUE_MAIL = 1))
+    signal ('23023', 'This e-mail address is already registered');
+
+  return ods_serialize_int_res (1);
+}
+;
+
 --! User registration
 --! name: desired user account name
 --! password: desired password
@@ -1236,7 +1391,7 @@ create procedure ODS.ODS_API."user.register" (
 	in mode integer := 0,
 	in data any := null) __soap_http 'text/xml'
 {
-  declare sid, rc, xmlData any;
+  declare sid, rc, tmp, name2, xmlData any;
   declare exit handler for sqlstate '*'
   {
     rollback work;
@@ -1246,28 +1401,18 @@ create procedure ODS.ODS_API."user.register" (
 	{
 	  -- OpenID
 	  data := json_parse (data);
-	  if (isnull (name))
-    name := DB.DBA.WA_MAKE_NICK (coalesce (get_keyword ('nick', data), replace (get_keyword ('name', data), ' ', '')));
-	  if (isnull ("email"))
-    "email" := get_keyword ('mbox', data);
     "password" := uuid ();
 	}
 	else if (mode = 2)
 	{
 	  -- Facebook
 	  data := json_parse (data);
-    name := DB.DBA.WA_MAKE_NICK (coalesce (get_keyword ('nick', data), replace (get_keyword ('name', data), ' ', '')));
-    "email" := null;
     "password" := uuid ();
 	}
 	else if (mode = 3)
 	{
 	  -- FOAF+SSL
 	  data := json_parse (data);
-	  if (isnull (name))
-    name := DB.DBA.WA_MAKE_NICK (coalesce (get_keyword ('nick', data), replace (get_keyword ('name', data), ' ', '')));
-	  if (isnull ("email"))
-    "email" := get_keyword ('mbox', data);
     "password" := uuid ();
 	}
 	else if (mode = 4)
@@ -1275,7 +1420,10 @@ create procedure ODS.ODS_API."user.register" (
 	  -- Twitter
     xmlData := xml_tree_doc (data);
     if (xpath_eval ('string(/users/user/id)', xmlData))
-      name := cast (xpath_eval ('string(/users/user/screen_name)', xmlData) as varchar);
+      name2 := cast (xpath_eval ('string(/users/user/screen_name)', xmlData) as varchar);
+
+    if (isnull (name))
+      name := name2;
 
     "password" := uuid ();
 	}
@@ -1284,7 +1432,10 @@ create procedure ODS.ODS_API."user.register" (
 	  -- LinkedIn
     xmlData := xml_tree_doc (data);
     if (xpath_eval ('string(/person/first-name)', xmlData))
-      name := cast (xpath_eval ('string(/person/first-name)', xmlData) as varchar);
+      name2 := cast (xpath_eval ('string(/person/first-name)', xmlData) as varchar);
+
+    if (isnull (name))
+      name := name2;
 
     "password" := uuid ();
 	}
@@ -1303,19 +1454,24 @@ create procedure ODS.ODS_API."user.register" (
       signal ('23023', 'Invalid E-mail address');
   }
   if (exists (select 1 from DB.DBA.SYS_USERS where U_E_MAIL = "email") and exists (select 1 from DB.DBA.WA_SETTINGS where WS_UNIQUE_MAIL = 1))
-    signal ('23023', 'This e-mail address is already registered.');
+    signal ('23023', 'This e-mail address is already registered');
 
   if ("password" is null or length ("password") < 1 or length ("password") > 40)
     signal ('23023', 'Password cannot be empty or longer then 40 chars');
 
   if ((mode = 1) and get_keyword ('openid_url', data) is not null and exists (select 1 from DB.DBA.WA_USER_INFO where WAUI_OPENID_URL = get_keyword ('openid_url', data)))
-    signal ('23023', 'This OpenID identity is already registered.');
+    signal ('23023', 'This OpenID identity is already registered');
 
-  if ((mode = 2) and exists (select 1 from DB.DBA.WA_USER_INFO where WAUI_FACEBOOK_ID = get_keyword ('uid', data)))
-    signal ('23023', 'This Facebook identity is already registered.');
+  if ((mode = 2) and exists (select 1 from DB.DBA.WA_USER_OL_ACCOUNTS where WUO_TYPE = 'P' and WUO_NAME = 'Facebook' and WUO_URL = DB.DBA.WA_USER_OL_ACCOUNTS_FACEBOOK (get_keyword ('uid', data))))
+    signal ('23023', 'This Facebook identity is already registered');
+
+  if ((mode = 4) and exists (select 1 from DB.DBA.WA_USER_OL_ACCOUNTS where WUO_TYPE = 'P' and WUO_NAME = 'Twitter' and WUO_URL = DB.DBA.WA_USER_OL_ACCOUNTS_TWITTER (name2)))
+    signal ('23023', 'This Twitter identity is already registered');
+
+  if ((mode = 5) and exists (select 1 from DB.DBA.WA_USER_OL_ACCOUNTS where WUO_TYPE = 'P' and WUO_NAME = 'LinkedIn' and WUO_URL = cast (xpath_eval ('string(/person/public-profile-url)', xmlData) as varchar)))
+    signal ('23023', 'This LinkedIn identity is already registered');
 
   rc := DB.DBA.ODS_CREATE_USER (name, "password", "email");
-  -- rc := 'xxx';
   if (not isinteger (rc))
     signal ('23023', rc);
 
@@ -1338,7 +1494,10 @@ create procedure ODS.ODS_API."user.register" (
     DB.DBA.WA_USER_EDIT (name, 'WAUI_FIRST_NAME'   , get_keyword ('firstName', data));
     DB.DBA.WA_USER_EDIT (name, 'WAUI_LAST_NAME'    , get_keyword ('family_name', data));
     DB.DBA.WA_USER_EDIT (name, 'WAUI_GENDER'       , get_keyword ('gender', data));
-    DB.DBA.WA_USER_EDIT (name, 'WAUI_FACEBOOK_ID', get_keyword ('uid', data));
+
+    tmp := DB.DBA.WA_USER_OL_ACCOUNTS_FACEBOOK (get_keyword ('uid', data));
+    insert into DB.DBA.WA_USER_OL_ACCOUNTS (WUO_U_ID, WUO_TYPE,  WUO_NAME, WUO_URL, WUO_URI)
+      values (rc, 'P', 'Facebook', tmp, ODS.ODS_API."user.onlineAccounts.uri" (tmp));
   }
   else if (mode = 3)
   {
@@ -1359,6 +1518,7 @@ create procedure ODS.ODS_API."user.register" (
     DB.DBA.WA_USER_EDIT (name, 'WAUI_BORG_HOMEPAGE', get_keyword ('organizationHomepage', data));
     DB.DBA.WA_USER_EDIT (name, 'WAUI_BORG'         , get_keyword ('organizationTitle', data));
     DB.DBA.WA_USER_EDIT (name, 'WAUI_FOAF'         , get_keyword ('iri', data));
+    DB.DBA.WA_USER_EDIT (name, 'WAUI_PHOTO_URL'    , get_keyword ('depiction', data));
 
     declare cert any;
     cert := client_attr ('client_certificate');
@@ -1368,15 +1528,17 @@ create procedure ODS.ODS_API."user.register" (
   else if (mode = 4)
   {
     DB.DBA.WA_USER_EDIT (name, 'WAUI_FULL_NAME'    , xpath_eval ('string(/users/user/name)', xmlData));
-    insert into DB.DBA.WA_USER_OL_ACCOUNTS (WUO_U_ID, WUO_TYPE, WUO_NAME, WUO_URL)
-      values (rc, 'P', 'Twitter', sprintf ('http://twitter.com/%U', name));
+    tmp := DB.DBA.WA_USER_OL_ACCOUNTS_TWITTER (name2);
+    insert into DB.DBA.WA_USER_OL_ACCOUNTS (WUO_U_ID, WUO_TYPE, WUO_NAME, WUO_URL, WUO_URI)
+      values (rc, 'P', 'Twitter', tmp, ODS.ODS_API."user.onlineAccounts.uri" (tmp));
   }
   else if (mode = 5)
   {
     DB.DBA.WA_USER_EDIT (name, 'WAUI_FIRST_NAME'    , xpath_eval ('string(/person/first-name)', xmlData));
     DB.DBA.WA_USER_EDIT (name, 'WAUI_LAST_NAME'     , xpath_eval ('string(/person/last-name)', xmlData));
-    insert into DB.DBA.WA_USER_OL_ACCOUNTS (WUO_U_ID, WUO_TYPE, WUO_NAME, WUO_URL)
-      values (rc, 'P', 'LinkedIn', cast (xpath_eval ('string(/person/public-profile-url)', xmlData) as varchar));
+    tmp := cast (xpath_eval ('string(/person/public-profile-url)', xmlData) as varchar);
+    insert into DB.DBA.WA_USER_OL_ACCOUNTS (WUO_U_ID, WUO_TYPE, WUO_NAME, WUO_URL, WUO_URI)
+      values (rc, 'P', 'LinkedIn', tmp, ODS.ODS_API."user.onlineAccounts.uri" (tmp));
   }
 
   sid := DB.DBA.vspx_sid_generate ();
@@ -1495,23 +1657,30 @@ create procedure ODS.ODS_API."user.authenticate" (
   in oauthToken varchar := null) __soap_http 'text/xml'
 {
   declare uname varchar;
-  declare sid, tmp varchar;
+  declare sid, tmp, profile_url varchar;
   declare exit handler for sqlstate '*'
   {
     rollback work;
-    return ods_serialize_sql_error (__SQL_STATE, substring(__SQL_MESSAGE, 1, coalesce(strstr(__SQL_MESSAGE, '<>'), length(__SQL_MESSAGE))));
+    return ods_serialize_sql_error (__SQL_STATE, __SQL_MESSAGE);
   };
 
   tmp := (select WAB_DISABLE_UNTIL from DB.DBA.WA_BLOCKED_IP where WAB_IP = http_client_ip ());
   --if (tmp is not null and tmp > now ())
-  --  signal ('22023', 'Too many failed attempts. Try again in an hour.<>');
+  --  signal ('22023', 'Too many failed attempts. Try again in an hour<>');
 
   uname := null;
     if (not isnull (facebookUID))
     {
-    uname := (select U_NAME from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and WAUI_FACEBOOK_ID = facebookUID);
-    if (isnull (uname) and (oauthMode = 'linkedin'))
-      signal ('22023', 'The Facebook account is not registered.<>');
+    profile_url := DB.DBA.WA_USER_OL_ACCOUNTS_FACEBOOK (facebookUID);
+    uname := (select U_NAME
+                from DB.DBA.SYS_USERS,
+                     DB.DBA.WA_USER_OL_ACCOUNTS
+               where WUO_U_ID = U_ID
+                 and WUO_TYPE = 'P'
+                 and WUO_URL = profile_url);
+
+    if (isnull (uname))
+      signal ('22023', 'The Facebook account is not registered.\nPlease enter your Facebook account data in ODS ''Edit Profile/Personal/Online Accounts'' \nfor a successful authentication<>');
     }
   else if (not isnull (openIdUrl))
     {
@@ -1520,13 +1689,15 @@ create procedure ODS.ODS_API."user.authenticate" (
       commit work;
       vResult := http_client (openIdUrl);
       if (vResult not like '%is_valid:%true\n%')
-      signal ('22023', 'OpenID Authentication Failed.<>');
+      signal ('22023', 'OpenID Authentication Failed<>');
 
     uname := (select U_NAME from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and rtrim (WAUI_OPENID_URL, '/') = rtrim (openIdIdentity, '/'));
+    if (isnull (uname))
+      signal ('22023', 'The OpenID account is not registered.\nPlease enter your OpenID account data in ODS ''Edit Profile/Security/OpenID'' \nfor a successful authentication<>');
     }
   else if (not isnull (oauthMode))
   {
-    declare tmp, url, token, result, screen_name, profile_url any;
+    declare tmp, url, token, result, screen_name any;
 
     if (oauthMode = 'twitter')
     {
@@ -1546,7 +1717,8 @@ create procedure ODS.ODS_API."user.authenticate" (
                 from DB.DBA.SYS_USERS,
                      DB.DBA.WA_USER_OL_ACCOUNTS
                where WUO_U_ID = U_ID
-                 and WUO_URL = sprintf ('http://twitter.com/%U', screen_name));
+                   and WUO_TYPE = 'P'
+                   and WUO_URL = DB.DBA.WA_USER_OL_ACCOUNTS_TWITTER (screen_name));
   }
     else if (oauthMode = 'linkedin')
     {
@@ -1567,15 +1739,16 @@ create procedure ODS.ODS_API."user.authenticate" (
                   from DB.DBA.SYS_USERS,
                        DB.DBA.WA_USER_OL_ACCOUNTS
                  where WUO_U_ID = U_ID
+                   and WUO_TYPE = 'P'
                    and WUO_URL = profile_url);
     }
     OAUTH..session_terminate (oauthSid);
 
     if (isnull (uname) and (oauthMode = 'twitter'))
-      signal ('22000', 'The Twitter account is not registered.\n Please enter your Twitter account data in ODS ''Edit Profile/Personal/Online Accounts'' \nfor a successful authentication.<>');
+      signal ('22000', 'The Twitter account is not registered.\nPlease enter your Twitter account data in ODS ''Edit Profile/Personal/Online Accounts'' \nfor a successful authentication<>');
 
     if (isnull (uname) and (oauthMode = 'linkedin'))
-      signal ('22000', 'The LinkedIn account is not registered.\n Please enter your LinkedIn account data in ODS ''Edit Profile/Personal/Online Accounts'' \nfor a successful authentication.<>');
+      signal ('22000', 'The LinkedIn account is not registered.\nPlease enter your LinkedIn account data in ODS ''Edit Profile/Personal/Online Accounts'' \nfor a successful authentication<>');
   }
   else
   {
@@ -1585,6 +1758,10 @@ create procedure ODS.ODS_API."user.authenticate" (
   if (isnull (uname))
     return ods_auth_failed ();
 
+
+  if ((select U_ACCOUNT_DISABLED from DB.DBA.SYS_USERS where U_NAME = uname) = 1)
+    signal ('22000', 'The ODS account is deactivated<>');
+
   sid := DB.DBA.vspx_sid_generate ();
   insert into DB.DBA.VSPX_SESSION (VS_SID, VS_REALM, VS_UID, VS_STATE, VS_EXPIRY)
     values (sid, 'wa', uname, serialize (vector ('vspx_user', uname)), now ());
@@ -1888,7 +2065,7 @@ create procedure ODS.ODS_API."user.update.fields" (
   if (not DB.DBA.is_empty_or_null (securityFacebookID))
   {
     if (exists (select 1 from DB.DBA.WA_USER_INFO where WAUI_U_ID <> uid and WAUI_FACEBOOK_ID = securityFacebookID))
-      signal ('23023', 'This Facebook identity is already registered.');
+      signal ('23023', 'This Facebook identity is already registered');
   }
   ODS.ODS_API."user.update.field" (uname, 'WAUI_FACEBOOK_ID', securityFacebookID);
 
@@ -2104,7 +2281,7 @@ create procedure ODS.ODS_API."user.upload.internal" (
 
     ext := split_and_decode (photo, 0, '\0\0.');
     if (ext is not null and ext[length(ext)-1] is not null and lcase(ext[length(ext)-1]) not in ('jpg', 'png', 'gif'))
-      signal ('23023', 'Invalid image type. Please use jpg, png or gif for browser compatibility.');
+      signal ('23023', 'Invalid image type. Please use jpg, png or gif for browser compatibility');
 
     uid := (select U_ID from DB.DBA.SYS_USERS where U_NAME = uname);
     dir := rtrim (DB.DBA.DAV_HOME_DIR (uname), '/')||'/wa/images/';
@@ -2144,6 +2321,10 @@ create procedure ODS.ODS_API."user.upload.internal" (
       path := subseq (path, 4);
     ODS.ODS_API."user.update.field" (uname, 'WAUI_PHOTO_URL', path);
   }
+  else if (length(photo))
+  {
+    ODS.ODS_API."user.update.field" (uname, 'WAUI_PHOTO_URL', photo);
+  }
   else if (photo = '')
   {
     ODS.ODS_API."user.update.field" (uname, 'WAUI_PHOTO_URL', '');
@@ -2208,22 +2389,34 @@ create procedure ODS.ODS_API."user.delete" (
 create procedure ODS.ODS_API."user.enable" (
   in name varchar) __soap_http 'text/xml'
 {
+  declare rc, allow integer;
   declare uname varchar;
-  declare rc integer;
   declare exit handler for sqlstate '*'
   {
     rollback work;
     return ods_serialize_sql_error (__SQL_STATE, __SQL_MESSAGE);
   };
+
   if (not ods_check_auth (uname))
     return ods_auth_failed ();
+
   if (not exists (select 1 from DB.DBA.SYS_USERS where U_NAME = name))
     return ods_serialize_sql_error ('37000', 'The item is not found');
+
+  allow := 0;
   if (uname in ('dav', 'dba'))
+    allow := 1;
+
+  if ((not allow) and (uname = DB.DBA.WA_USER_SETTING_GET (name, 'DISABLED_BY')))
+    allow := 1;
+
+  if (allow)
     {
     update DB.DBA.WA_INSTANCE
        set WAI_IS_FROZEN = 0
      where WAI_NAME in (select WAM_INST from DB.DBA.WA_MEMBER, DB.DBA.SYS_USERS where WAM_USER = U_ID and U_NAME = name and WAM_MEMBER_TYPE = 1);
+    DB.DBA.WA_USER_SETTING_SET (name, 'DISABLED_BY', null);
+    connection_set ('WA_USER_DISABLED', name);
       DB.DBA.USER_SET_OPTION (name, 'DISABLED', 0);
       rc := 1;
   } else {
@@ -2236,23 +2429,28 @@ create procedure ODS.ODS_API."user.enable" (
 create procedure ODS.ODS_API."user.disable" (
   in name varchar) __soap_http 'text/xml'
 {
-  declare uname varchar;
   declare rc integer;
+  declare uname varchar;
   declare exit handler for sqlstate '*'
   {
     rollback work;
     return ods_serialize_sql_error (__SQL_STATE, __SQL_MESSAGE);
   };
+
   if (not ods_check_auth (uname))
     return ods_auth_failed ();
+
   if (not exists (select 1 from DB.DBA.SYS_USERS where U_NAME = name))
     return ods_serialize_sql_error ('37000', 'The item is not found');
-  if (uname in ('dav', 'dba'))
+
+  if ((uname in ('dav', 'dba')) or (uname = name))
     {
     delete from DB.DBA.VSPX_SESSION where VS_UID = name;
     update DB.DBA.WA_INSTANCE
        set WAI_IS_FROZEN = 1
      where WAI_NAME in (select WAM_INST from DB.DBA.WA_MEMBER, DB.DBA.SYS_USERS where WAM_USER = U_ID and U_NAME = name and WAM_MEMBER_TYPE = 1);
+    DB.DBA.WA_USER_SETTING_SET (name, 'DISABLED_BY', uname);
+    connection_set ('WA_USER_DISABLED', name);
     DB.DBA.USER_SET_OPTION (name, 'DISABLED', 1);
       rc := 1;
   } else {
@@ -2271,6 +2469,7 @@ create procedure ODS.ODS_API."user.get" (
     rollback work;
     return ods_serialize_sql_error (__SQL_STATE, __SQL_MESSAGE);
   };
+
   q := sprintf ('select * from <%s> where { ?user a sioc:User ; sioc:id "%s" ; ?property ?value } ', ods_graph(), name);
   exec_sparql (q);
   return '';
@@ -2722,7 +2921,7 @@ create procedure ODS.ODS_API."user.invite" (
 	    {
 	      rollback work;
 	      if (__SQL_STATE not like 'WA%')
-		msg := 'The e-mail address(es) is not valid and mail cannot be sent.';
+      		msg := 'The e-mail address(es) is not valid and mail cannot be sent';
 	      else
 		msg := __SQL_MESSAGE;
               rc := -1;
@@ -3100,7 +3299,7 @@ create procedure ODS.ODS_API."user.topicOfInterest.new" (
   topicURI := trim (topicURI);
   topicLabel := coalesce (trim (topicLabel), '');
   newData := '';
-  oldData := (select WAUI_INTERESTS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
+  oldData := (select WAUI_INTEREST_TOPICS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
   for (select property, label from DB.DBA.WA_USER_INTERESTS (txt) (property varchar, label varchar) P where txt = oldData) do
   {
     if (property = topicURI)
@@ -3113,7 +3312,7 @@ create procedure ODS.ODS_API."user.topicOfInterest.new" (
   }
   if (notFound)
     newData := newData || topicURI || ';' || topicLabel || '\n';
-  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTERESTS', newData);
+  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTEREST_TOPICS', newData);
   return ods_serialize_int_res (1);
 }
 ;
@@ -3136,13 +3335,13 @@ create procedure ODS.ODS_API."user.topicOfInterest.delete" (
 
   topicURI := trim (topicURI);
   newData := '';
-  oldData := (select WAUI_INTERESTS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
+  oldData := (select WAUI_INTEREST_TOPICS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
   for (select property, label from DB.DBA.WA_USER_INTERESTS (txt) (property varchar, label varchar) P where txt = oldData) do
   {
     if (property <> topicURI)
       newData := newData || property || ';' || label || '\n';
   }
-  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTERESTS', newData);
+  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTEREST_TOPICS', newData);
   return ods_serialize_int_res (1);
 }
 ;
@@ -3167,7 +3366,7 @@ create procedure ODS.ODS_API."user.thingOfInterest.new" (
   thingURI := trim (thingURI);
   thingLabel := coalesce (trim (thingLabel), '');
   newData := '';
-  oldData := (select WAUI_INTEREST_TOPICS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
+  oldData := (select WAUI_INTERESTS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
   for (select property, label from DB.DBA.WA_USER_INTERESTS (txt) (property varchar, label varchar) P where txt = oldData) do
   {
     if (property = thingURI)
@@ -3180,7 +3379,7 @@ create procedure ODS.ODS_API."user.thingOfInterest.new" (
   }
   if (notFound)
     newData := newData || thingURI || ';' || thingLabel || '\n';
-  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTEREST_TOPICS', newData);
+  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTERESTS', newData);
   return ods_serialize_int_res (1);
 }
 ;
@@ -3202,13 +3401,13 @@ create procedure ODS.ODS_API."user.thingOfInterest.delete" (
 
   thingURI := trim (thingURI);
   newData := '';
-  oldData := (select WAUI_INTEREST_TOPICS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
+  oldData := (select WAUI_INTERESTS from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname);
   for (select property, label from DB.DBA.WA_USER_INTERESTS (txt) (property varchar, label varchar) P where txt = oldData) do
   {
     if (property <> thingURI)
       newData := newData || property || ';' || label || '\n';
   }
-  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTEREST_TOPICS', newData);
+  DB.DBA.WA_USER_EDIT (uname, 'WAUI_INTERESTS', newData);
   return ods_serialize_int_res (1);
 }
 ;
@@ -3685,7 +3884,7 @@ create procedure ODS.ODS_API."user.mades.update" (
   {
     declare exit handler for sqlstate '*'
     {
-      exec (sprintf ('sparql clear graph <%s>', tmp), stat, msg);
+      SPARQL clear graph ?:tmp;
       goto _next;
     };
     qrs := vector (0,0,0);
@@ -3732,7 +3931,7 @@ create procedure ODS.ODS_API."user.mades.update" (
     	}
     }
   _found:
-    exec (sprintf ('sparql clear graph <%s>', tmp), stat, msg);
+    SPARQL clear graph ?:tmp;
   }
 _next:;
 
@@ -3802,6 +4001,22 @@ create procedure ODS.ODS_API."user.mades.delete" (
 }
 ;
 
+create procedure ODS.ODS_API."user.products.fix" (
+  in products any,
+  in ontologyURI varchar := 'http://purl.org/goodrelations/v1#')
+{
+  if (get_keyword ('version', products) = '2.0')
+  {
+    products := get_keyword ('ontologies', products, vector ());
+  }
+  else
+  {
+    products := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', ontologyURI, 'items', get_keyword ('products', products, vector ()))));
+  }
+  return products;
+}
+;
+
 create procedure ODS.ODS_API."user.offers.list" (
   in type varchar := '1') __soap_http 'application/json'
   {
@@ -3856,7 +4071,7 @@ create procedure ODS.ODS_API."user.offers.get" (
                                      'flag', flag,
                                      'name', name,
                                      'comment', comment,
-                                     'properties', vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', get_keyword ('products', products, vector ()))))
+                                     'properties', ODS.ODS_API."user.products.fix" (products)
                                     )
                             );
   return obj2json (retValue);
@@ -3882,15 +4097,12 @@ create procedure ODS.ODS_API."user.offers.update" (
     return ods_auth_failed ();
 
   _u_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = uname);
-  products := vector();
   ontologies := json_parse (properties);
-  if (length(ontologies))
-    products := get_keyword ('items', ontologies[0], vector());
-  properties := vector_concat (ODS..jsonObject (), vector ('version', '1.0', 'products', products));
+  products := vector_concat (ODS..jsonObject (), vector ('version', '2.0', 'ontologies', ontologies));
   if (isnull (id))
   {
     insert into DB.DBA.WA_USER_OFFERLIST (WUOL_U_ID, WUOL_TYPE, WUOL_FLAG, WUOL_OFFER, WUOL_COMMENT, WUOL_PROPERTIES)
-      values (_u_id, type, flag, name, comment, serialize (properties));
+      values (_u_id, type, flag, name, comment, serialize (products));
     id := (select max (WUOL_ID) from DB.DBA.WA_USER_OFFERLIST);
   }
   else
@@ -3899,7 +4111,7 @@ create procedure ODS.ODS_API."user.offers.update" (
        set WUOL_FLAG = flag,
            WUOL_OFFER = name,
            WUOL_COMMENT = comment,
-           WUOL_PROPERTIES = serialize (properties)
+           WUOL_PROPERTIES = serialize (products)
      where WUOL_ID = id;
   }
   return ods_serialize_int_res (id);
@@ -4098,7 +4310,7 @@ create procedure ODS.ODS_API."user.likes.get" (
                                      'type', type,
                                      'name', name,
                                      'comment', comment,
-                                     'properties', vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://ontologi.es/like#', 'items', get_keyword ('products', products, vector ()))))
+                                     'properties', ODS.ODS_API."user.products.fix" (products, 'http://ontologi.es/like#')
                                     )
                             );
   return obj2json (retValue);
@@ -4125,15 +4337,12 @@ create procedure ODS.ODS_API."user.likes.update" (
     return ods_auth_failed ();
 
   _u_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = uname);
-  products := vector();
   ontologies := json_parse (properties);
-  if (length(ontologies))
-    products := get_keyword ('items', ontologies[0], vector());
-  properties := vector_concat (ODS..jsonObject (), vector ('version', '1.0', 'products', products));
+  products := vector_concat (ODS..jsonObject (), vector ('version', '2.0', 'ontologies', ontologies));
   if (isnull (id))
   {
     insert into DB.DBA.WA_USER_LIKES (WUL_U_ID, WUL_FLAG, WUL_URI, WUL_TYPE, WUL_NAME, WUL_COMMENT, WUL_PROPERTIES)
-      values (_u_id, flag, uri, type, name, comment, serialize (properties));
+      values (_u_id, flag, uri, type, name, comment, serialize (products));
     id := (select max (WUL_ID) from DB.DBA.WA_USER_LIKES);
   }
   else
@@ -4144,7 +4353,7 @@ create procedure ODS.ODS_API."user.likes.update" (
            WUL_TYPE = type,
            WUL_NAME = name,
            WUL_COMMENT = comment,
-           WUL_PROPERTIES = serialize (properties)
+           WUL_PROPERTIES = serialize (products)
      where WUL_ID = id;
   }
   return ods_serialize_int_res (id);
@@ -4380,7 +4589,7 @@ create procedure ODS.ODS_API."user.certificates.get" (
   for (select UC_ID, UC_CERT, UC_LOGIN, UC_FINGERPRINT from DB.DBA.WA_USER_CERTS where UC_ID = id and UC_U_ID = _u_id) do
   {
     subject := get_certificate_info (2, UC_CERT, 0, '');
-    agentID := ODS.ODS_API.SSL_WEBID_GET (UC_CERT);
+    agentID := DB.DBA.FOAF_SSL_WEBID_GET (UC_CERT);
     fingerPrint := get_certificate_info (6, UC_CERT, 0, '');
     certificate := UC_CERT;
     enableLogin := UC_LOGIN;
@@ -4415,7 +4624,7 @@ create procedure ODS.ODS_API."user.certificates.update" (
 
   _u_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = uname);
 
-  agent := ODS.ODS_API.SSL_WEBID_GET (certificate);
+  agent := DB.DBA.FOAF_SSL_WEBID_GET (certificate);
   if ((agent is null and length (certificate)) or (0 = length (certificate)))
 	  signal ('', 'The certificate must be in PEM format and must have Alternate Name attribute.');
 
@@ -4656,7 +4865,7 @@ create procedure ODS.ODS_API.graph_clear (
   in graph varchar)
 {
   commit work;
-  exec (sprintf ('SPARQL clear graph <%s>', graph));
+  SPARQL clear graph ?:graph;
 }
 ;
 
@@ -4668,7 +4877,7 @@ create procedure ODS.ODS_API.getFOAFDataArray (
   declare N integer;
   declare S, SQLs, IRI, foafGraph, _identity, _loc_idn varchar;
   declare V, st, msg, rows, meta any;
-  declare certLogin, certLoginEnable any;
+  declare loginName, certLogin, certLoginEnable any;
   declare personUri any;
   declare host, port, arr any;
   declare info any;
@@ -4711,7 +4920,8 @@ create procedure ODS.ODS_API.getFOAFDataArray (
                             select ?iri
           		                from <%s>
                              where {
-                                     ?iri a foaf:Person.
+			     	     [] foaf:primaryTopic ?iri .
+                                     ?iri a foaf:Person .
                                    } ', foafGraph)
                  );
 
@@ -4756,20 +4966,23 @@ create procedure ODS.ODS_API.getFOAFDataArray (
       }
       goto _exit;
   }
+
 _loginIn:
+  loginName := '';
   certLogin := 0;
   certLoginEnable := 0;
   if (is_https_ctx ())
   {
-    for (select UC_LOGIN from DB.DBA.WA_USER_CERTS where UC_FINGERPRINT = get_certificate_info (6)) do
+    for (select UC_U_ID, UC_LOGIN from DB.DBA.WA_USER_CERTS where UC_FINGERPRINT = get_certificate_info (6)) do
     {
       certLogin := 1;
       certLoginEnable := coalesce (UC_LOGIN, 0);
+      loginName := (select U_NAME from DB.DBA.SYS_USERS where U_ID = UC_U_ID);
   }
   }
   V := ODS.ODS_API.extractFOAFDataArray (personUri, foafGraph);
 
-  if (is_https_ctx () and isnull (get_keyword (V, 'mbox')))
+  if (is_https_ctx () and isnull (get_keyword ('mbox', V)))
   {
     declare X, Y any;
 
@@ -4785,9 +4998,14 @@ _loginIn:
   if (certLogin and length (V))
     appendProperty (V, 'certLogin', cast (certLogin as varchar));
 
+  if (loginName = '')
+    loginName := DB.DBA.WA_MAKE_NICK2 (get_keyword ('nick', V), get_keyword ('name', V), get_keyword ('firstName', V), get_keyword ('family_name', V));
+
+  if (loginName <> '')
+    appendProperty (V, 'loginName', loginName);
+
 _exit:;
   ODS.ODS_API.graph_clear (foafGraph);
-  -- dbg_obj_print ('V', V);
   return V;
 }
 ;
@@ -4827,9 +5045,23 @@ create procedure ODS.ODS_API.extractFOAFDataArray (
   in iri varchar,
   in graph varchar)
 {
+  declare V any;
+
+  V := vector ();
+  ODS.ODS_API.extractPersonData (V, iri, graph);
+
+  return V;
+}
+;
+
+
+create procedure ODS.ODS_API.extractPersonData (
+  inout V any,
+  in iri varchar,
+  in graph varchar)
+{
   declare N integer;
-  declare S varchar;
-  declare V, S, st, msg, rows, meta any;
+  declare S, st, msg, rows, meta any;
 
   S := sprintf ('sparql
                  define input:storage ""
@@ -4873,6 +5105,7 @@ create procedure ODS.ODS_API.extractFOAFDataArray (
                         ?onlineAccount_url
                         ?sameAs_array
                         ?knows_array
+                        ?knows_name
                         ?knows_nick
 		               from <%s>
                    where {
@@ -4923,13 +5156,12 @@ create procedure ODS.ODS_API.extractFOAFDataArray (
                                      } .
                           filter (?iri = iri(?::0)).
                         }', graph);
-  V := vector ();
   st := '00000';
   commit work;
   exec (S, st, msg, vector (iri), vector ('use_cache', 1), meta, rows);
   if (st = '00000')
   {
-  meta := ODS.ODS_API.simplifyMeta(meta);
+    meta := ODS.ODS_API.simplifyMeta (meta);
   foreach (any row in rows) do
   {
     N := 0;
@@ -4945,7 +5177,6 @@ create procedure ODS.ODS_API.extractFOAFDataArray (
     }
   }
   }
- return V;
   }
 ;
 
@@ -4966,9 +5197,33 @@ create procedure ODS.ODS_API."user.getFOAFData" (
 }
 ;
 
-create procedure ODS.ODS_API.SSL_WEBID_GET (in cert any := null)
+create procedure ODS.ODS_API.SSL_WEBID_GET (
+  in cert any := null)
+{
+  declare rc, webid, webidType, graph any;
+
+  graph := null;
+  rc := ODS.ODS_API.SSL_WEBID_GET_2 (cert, webid, webidType, graph);
+  if (rc)
+    return webid;
+
+  return null;
+}
+;
+
+create procedure ODS.ODS_API.SSL_WEBID_GET_2 (
+  in cert any,
+  inout webid varchar,
+  inout webidType integer,
+  inout graph varchar)
 {
-  return DB.DBA.FOAF_SSL_WEBID_GET (cert);
+  declare rc any;
+
+  if (isnull (cert))
+    cert := client_attr ('client_certificate');
+
+  rc := DB.DBA.WEBID_AUTH_GEN_2 (cert, 0, null, 1, 0, webid, graph, 0, webidType);
+  return rc;
 }
 ;
 
@@ -4977,46 +5232,82 @@ create procedure ODS.ODS_API."user.getFOAFSSLData" (
   in outputMode integer := 1,
   in sslLoginCheck integer := 0) __soap_http 'application/json'
 {
-  declare foafIRI, alts any;
+  declare rc, webid, webidType, graph, alts any;
   declare V any;
+  declare cert, loginName, certLogin, certLoginEnable any;
 
-  foafIRI := ODS.ODS_API.SSL_WEBID_GET ();
-  if (not isnull (foafIRI))
+  set_user_id ('dba');
+  graph := 'http://' || uuid ();
+  cert := client_attr ('client_certificate');
+  rc := ODS.ODS_API.SSL_WEBID_GET_2 (cert, webid, webidType, graph);
+  if (not rc)
+    return obj2json (null);
+
+ 	V := vector ();
+  appendProperty (V, 'iri', webid);
+
+ 	loginName := '';
+ 	certLogin := 0;
+  certLoginEnable := 0;
+  for (select UC_U_ID, UC_LOGIN from DB.DBA.WA_USER_CERTS where UC_FINGERPRINT = get_certificate_info (6, cert, 0, '')) do
+	{
+	  certLogin := 1;
+    certLoginEnable := coalesce (UC_LOGIN, 0);
+    loginName := (select U_NAME from DB.DBA.SYS_USERS where U_ID = UC_U_ID);
+	  appendProperty (V, 'certLogin', cast (certLogin as varchar));
+	  appendProperty (V, 'certLoginEnable', cast (certLoginEnable as varchar));
+	}
+  if (webidType = 0)
+  {
+    -- FOAF
+    ODS.ODS_API.extractPersonData (V, webid, graph);
+  }
+  else if (webidType = 1)
+  {
+    -- WEBFINGER
+    appendProperty (V, 'mbox', get_certificate_info (10, cert, 0, '', 'emailAddress'));
+	  appendProperty (V, 'name', get_certificate_info (10, cert, 0, '', 'CN'));
+  }
+  else if (webidType = 2)
+  {
+    -- DI
+    ;
+  }
+  else if (webidType = 3)
   {
-    try_auth:
-    V := ODS.ODS_API.getFOAFDataArray (foafIRI, sslFOAFCheck, sslLoginCheck);
-    return case when outputMode then params2json (V) else V end;
+    -- SEARCH
+    ;
   }
-  else if (is_https_ctx ()) -- try webfinger
+  else if (webidType = 4)
   {
-    declare agent any;
-    agent := DB.DBA.FOAF_SSL_WEBFINGER ();
-    if (agent is not null)
+    -- SPONGE
+    ODS.ODS_API.extractPersonData (V, webid, graph);
+  }
+  else if (webidType = 5)
+  {
+    -- LDAP
+    declare i, items any;
+
+  	if (DB.DBA.FOAF_SSL_LDAP_CHECK_INT (webid, items))
+  	{
+    	items := items[1];
+    	for (i := 0; i < length (items); i := i + 2)
       {
-	declare certLogin, certLoginEnable any;
-	certLogin := 0;
-	certLoginEnable := 0;
-	V := vector ();
-	for (select UC_LOGIN from DB.DBA.WA_USER_CERTS where UC_FINGERPRINT = get_certificate_info (6)) do
-	  {
-	    certLogin := 1;
-	    certLoginEnable := coalesce (UC_LOGIN, 0);
-	    appendProperty (V, 'certLogin', certLogin);
-	    appendProperty (V, 'certLoginEnable', certLoginEnable);
-	    appendProperty (V, 'iri', agent);
-	    appendProperty (V, 'mbox', get_certificate_info (10, null, 0, '', 'emailAddress'));
-	    appendProperty (V, 'name', get_certificate_info (10, null, 0, '', 'CN'));
-	    return case when outputMode then params2json (V) else V end;
-	  }
+        if (items[i] = 'mail')
+          appendProperty (V, 'mbox', cast (items[i+1][0] as varchar));
+        else if (items[i] = 'cn')
+          appendProperty (V, 'name', cast (items[i+1][0] as varchar));
       }
-    else
-      {
-	foafIRI := ODS..FINGERPOINT_WEBID_GET ();
-	if (foafIRI is not null)
-	  goto try_auth;
       }
   }
-  return case when outputMode then obj2json (null) else null end;
+  if (loginName = '')
+    loginName := DB.DBA.WA_MAKE_NICK2 (get_keyword ('nick', V), get_keyword ('name', V), get_keyword ('firstName', V), get_keyword ('family_name', V));
+
+  if (loginName <> '')
+    appendProperty (V, 'loginName', loginName);
+
+
+  return params2json (V);
 }
 ;
 
@@ -5161,7 +5452,7 @@ create procedure ODS.ODS_API."user.getKnowsData" (
   }
 
 _exit:;
-  exec (sprintf ('SPARQL clear graph <%s>', foafGraph), st, msg, vector (), 0);
+  SPARQL clear graph ?:foafGraph;
   return obj2json (V);
 }
 ;
@@ -5574,17 +5865,22 @@ create procedure ODS.ODS_API.error_handler () __soap_http 'text/xml'
 ;
 
 DB.DBA.USER_CREATE ('ODS_API', uuid(), vector ('DISABLED', 1, 'LOGIN_QUALIFIER', 'ODS'));
+DB.DBA.EXEC_STMT ('grant SPARQL_UPDATE to ODS_API', 0);
 DB.DBA.VHOST_REMOVE (lpath=>'/ods/api');
 DB.DBA.VHOST_DEFINE (lpath=>'/ods/api', ppath=>'/SOAP/Http', soap_user=>'ODS_API', opts=>vector ('500_page', 'error_handler'));
 
 grant execute on ODS.ODS_API.error_handler to ODS_API;
 
+grant execute on ODS.ODS_API."iri2proxy" to ODS_API;
+
 grant execute on ODS.ODS_API."qrcode" to ODS_API;
+grant execute on ODS.ODS_API."getDefaultHttps" to ODS_API;
 
 grant execute on ODS.ODS_API."ontology.classes" to ODS_API;
 grant execute on ODS.ODS_API."ontology.classProperties" to ODS_API;
 grant execute on ODS.ODS_API."ontology.objects" to ODS_API;
 
+grant execute on ODS.ODS_API."objects.rdf" to ODS_API;
 grant execute on ODS.ODS_API."lookup.list" to ODS_API;
 
 grant execute on ODS.ODS_API."server.getInfo" to ODS_API;
@@ -5596,6 +5892,7 @@ grant execute on ODS.ODS_API."twitterVerify" to ODS_API;
 grant execute on ODS.ODS_API."linkedinServer" to ODS_API;
 grant execute on ODS.ODS_API."linkedinVerify" to ODS_API;
 
+grant execute on ODS.ODS_API."user.checkAvalability" to ODS_API;
 grant execute on ODS.ODS_API."user.register" to ODS_API;
 grant execute on ODS.ODS_API."user.authenticate" to ODS_API;
 grant execute on ODS.ODS_API."user.login" to ODS_API;
diff --git a/appsrc/ODS-Framework/ods_ubiquity.html b/appsrc/ODS-Framework/ods_ubiquity.html
index 3bab0c3..e51d8f1 100644
--- a/appsrc/ODS-Framework/ods_ubiquity.html
+++ b/appsrc/ODS-Framework/ods_ubiquity.html
@@ -18,7 +18,7 @@
      </p>
     </div>
     <div id="footer">
-      <div id="ft_t">Copyright © 1998-2011 OpenLink Software</div>
+      <div id="ft_t">Copyright © 1998-2012 OpenLink Software</div>
       <div id="ft_b">
         <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="/ods/images/PoweredByVirtuoso.gif" alt="Powered by OpenLink Virtuoso"/></a>
       </div>
diff --git a/appsrc/ODS-Framework/ods_ubiquity.js b/appsrc/ODS-Framework/ods_ubiquity.js
index e5e30bd..cfd17d1 100644
--- a/appsrc/ODS-Framework/ods_ubiquity.js
+++ b/appsrc/ODS-Framework/ods_ubiquity.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: ods_ubiquity.js,v 1.23.2.7 2010/09/20 10:15:23 source Exp $
+ *  $Id: ods_ubiquity.js,v 1.23.2.8 2012/03/08 10:46:18 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/openid.js b/appsrc/ODS-Framework/openid.js
index d2ff19c..77469dd 100644
--- a/appsrc/ODS-Framework/openid.js
+++ b/appsrc/ODS-Framework/openid.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/openid.sql b/appsrc/ODS-Framework/openid.sql
index 5d73996..44d7338 100644
--- a/appsrc/ODS-Framework/openid.sql
+++ b/appsrc/ODS-Framework/openid.sql
@@ -1,12 +1,12 @@
 --
---  $Id: openid.sql,v 1.17.2.6 2010/09/20 10:15:24 source Exp $
+--  $Id: openid.sql,v 1.17.2.8 2012/03/08 10:46:18 source Exp $
 --
 --  OpenID protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -62,10 +62,10 @@ create procedure yadis (in uname varchar, in tp varchar := null)
   if (tp not in ('person/', 'organization/'))
     tp := '';
   url := db.dba.wa_link (1, '/dataspace/'||tp||uname);
-  ssl := ODS..getDefaultHttps ();
+  ssl := ODS.ODS_API.getDefaultHttps ();
   if (exists (select 1 from DB..WA_SETTINGS where WS_HTTPS = 1) and ssl is not null)
     srv := 'https://' || ssl || '/openid';
-  else  
+  else
   srv := db.dba.wa_link (1, '/openid');
   for select WAUI_OPENID_URL, WAUI_OPENID_SERVER, WAUI_NICK
     from DB.DBA.WA_USER_INFO, DB.DBA.SYS_USERS where WAUI_U_ID = U_ID and U_NAME = uname
@@ -151,7 +151,7 @@ create procedure server
   cookies_vec := DB.DBA.vsp_ua_get_cookie_vec (lines);
   oid_sid := get_keyword ('openid.sid', cookies_vec);
   ns := get_keyword ('openid.ns', params, 'http://openid.net/signon/1.1');
-  oauth_ns := 'openid.oauth.';	
+  oauth_ns := 'openid.oauth.';
   pos := position (oauth_ns (), params);
   if (pos > 1)
     {
@@ -168,7 +168,7 @@ create procedure server
     ver := 1;
   if (is_https_ctx ())
     op := sprintf ('https://%{WSHost}s/openid');
-  else  
+  else
     op := sprintf ('http://%{WSHost}s/openid');
 
   if ("openid.mode" = 'associate')
@@ -431,7 +431,7 @@ create procedure get_user_details (in gr varchar, in _identity varchar)
 	  if (regexp_match ('http://[^/]+/dataspace/(person|organization)/.+', _identity) is not null)
 	    {
 	      arr1 := sprintf_inverse (_identity, '%s://%s/dataspace/%s/%s', 1);
-	      if (length (arr1) = 4 and length (arr2) = 3 and arr1[0] = arr2[0] and arr1[1] = arr2[1] and 
+	      if (length (arr1) = 4 and length (arr2) = 3 and arr1[0] = arr2[0] and arr1[1] = arr2[1] and
 		  exists (select 1 from DB.DBA.SYS_USERS, DB.DBA.WA_USER_INFO where WAUI_U_ID = U_ID and U_NAME = arr1[3]))
 		goto verified;
 	    }
@@ -510,7 +510,7 @@ create procedure checkid_immediate
   --dbg_obj_print_vars ('checkid_immediate', sid, ver);
   ns := '';
   ns_sign := '';
-  oauthf := ''; 
+  oauthf := '';
   oauth_resp := '';
   if (isstring (ver))
     ver := atoi (ver);
@@ -535,7 +535,7 @@ create procedure checkid_immediate
       if (length (oauth_consumer))
         {
           login := login || sprintf ('&oauth_consumer=%U&oauth_scope=%U', oauth_consumer, oauth_scope);
-        }	  
+        }
       --dbg_obj_print (sprintf ('Location: %s?openid.mode=id_res&openid.user_setup_url=%U\r\n', return_to, login));
       http_header (http_header_get () || sprintf ('Location: %s%sopenid.mode=id_res%s&openid.user_setup_url=%U\r\n',
 	    return_to, delim, ns, login));
@@ -631,11 +631,11 @@ create procedure checkid_immediate
 		  values (assoc_handle, ss_key, ss_key_data, '3DES', dateadd ('hour', 1, now()));
 	    }
 	}
-      -- make OAuth request_token call 
-      if (length (oauth_consumer) > 0)	  
-	tok := OAUTH..hybrid_request_token (sid, oauth_consumer);	  
+      -- make OAuth request_token call
+      if (length (oauth_consumer) > 0)
+	tok := OAUTH..hybrid_request_token (sid, oauth_consumer);
       else
-        tok := null;	
+        tok := null;
 
       rhf := WS.WS.PARSE_URI (return_to);
       if (rhf[4] <> '')
@@ -660,7 +660,7 @@ create procedure checkid_immediate
 	    {
 	  if (is_https_ctx ())
 	    op := sprintf ('https://%{WSHost}s/openid');
-	  else  
+	      else
 	    op := sprintf ('http://%{WSHost}s/openid');
 	    }
 	  nonce := DB.DBA.date_iso8601 (dt_set_tz (curdatetime (0), 0)) || cast (msec_time () as varchar);
@@ -706,7 +706,7 @@ create procedure checkid_immediate
 	      http (sprintf ('oauth.scope:%s\x0A', oauth_scope), ses);
 	      oauth_resp := oauth_resp || sprintf ('&openid.oauth.scope=%U', oauth_scope);
 	    }
-        }	  
+        }
 
       if (user <> 'OpenID')
         set_user_id ('OpenID');
@@ -764,12 +764,12 @@ create procedure checkid_setup
       if (length (oauth_consumer))
         {
           login := login || sprintf ('&oauth_consumer=%U&oauth_scope=%U', oauth_consumer, oauth_scope);
-        }	  
+        }
       http_header (http_header_get () || sprintf ('Location: %s\r\n', login));
       --http_header (http_header_get () || sprintf ('Location: %s%sopenid.mode=cancel\r\n', return_to, delim));
       return '';
     }
-  return checkid_immediate (ver, _identity, assoc_handle, return_to, trust_root, sid, 1, sreg_required, sreg_optional, policy_url, 
+  return checkid_immediate (ver, _identity, assoc_handle, return_to, trust_root, sid, 1, sreg_required, sreg_optional, policy_url,
       oauth_consumer, oauth_scope, op);
 };
 
@@ -813,19 +813,19 @@ create procedure oid_set_sid (in sid varchar, in pars any)
 create procedure oid_get_user_id (in _identity any)
 {
   declare iarr, uname, webid any;
-  declare webid, gr varchar;    
+  declare webid, gr varchar;
   uname := null;
   --dbg_obj_print_vars (_identity);
   if (strchr (_identity, '@') is not null)
-    { 
+    {
       gr := sioc..get_graph ();
-      webid := (SPARQL 
-	       PREFIX owl: <http://www.w3.org/2002/07/owl#> 
-	       PREFIX foaf: <http://xmlns.com/foaf/0.1/>	 
+      webid := (SPARQL
+	       PREFIX owl: <http://www.w3.org/2002/07/owl#>
+	       PREFIX foaf: <http://xmlns.com/foaf/0.1/>
 	       SELECT ?openid WHERE { graph `iri(?:gr)` { ?webid owl:sameAs `iri(?:_identity)` ; foaf:openid ?openid . }});
       if (webid is not null)
-        _identity := webid;	
-    }	 
+        _identity := webid;
+    }
   if (regexp_match ('http://[^/]+/dataspace/(person|organization)/.+', _identity) is not null)
     {
       iarr := sprintf_inverse (_identity, 'http://%s/dataspace/%s/%s', 1);
diff --git a/appsrc/ODS-Framework/openid_helper.vsp b/appsrc/ODS-Framework/openid_helper.vsp
index 602ec02..483b0e9 100644
--- a/appsrc/ODS-Framework/openid_helper.vsp
+++ b/appsrc/ODS-Framework/openid_helper.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: openid_helper.vsp,v 1.3.2.1 2010/09/20 10:15:24 source Exp $
+--  $Id: openid_helper.vsp,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/openid_login.vspx b/appsrc/ODS-Framework/openid_login.vspx
index 8c9b43b..8efc4bd 100644
--- a/appsrc/ODS-Framework/openid_login.vspx
+++ b/appsrc/ODS-Framework/openid_login.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: openid_login.vspx,v 1.8.2.8 2011/02/03 10:26:15 source Exp $
+ -  $Id: openid_login.vspx,v 1.8.2.12 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -53,6 +53,7 @@
   <v:on-init><![CDATA[
     declare cookie_vec, sid any;
     declare pos, tmp any;
+    declare real_uid varchar;
 
     set http_charset='UTF-8';
 
@@ -60,6 +61,14 @@
       {
         signal ('42000', 'Unknown identity.');
       }
+    if (self._identity = 'http://specs.openid.net/auth/2.0/identifier_select' and get_keyword ('username', self.vc_event.ve_params) is not null)  
+      {
+        for select U_NAME, WAUI_IS_ORG from SYS_USERS join WA_USER_INFO on (WAUI_U_ID = U_ID) where WAUI_NICK = self._uname do
+          {
+	    self._uname := U_NAME;	
+	    self._identity := db.dba.wa_link (1, '/dataspace/' || case WAUI_IS_ORG when 1 then 'organization/' else 'person/' end || U_NAME);  
+	  }  
+      }
     if (self._uname is null)
       {
         tmp := self._identity;
@@ -68,11 +77,12 @@
         pos := strrchr (tmp, '/');
         if (pos is not null)
 	  {
-            declare real_uid varchar;
 	    self._uname := subseq (tmp, pos + 1);
 	    real_uid := (select U_NAME from SYS_USERS join WA_USER_INFO on (WAUI_U_ID = U_ID) where WAUI_NICK = self._uname);
 	    if (length (real_uid))
 	      self._uname := real_uid;
+            else 
+	      self._uname := null;
 	  }
 	else if (strchr (tmp, '@') is not null)  
 	  {
@@ -102,14 +112,12 @@
 	  }
     if (get_keyword ('sid', self.vc_event.ve_params) is null and is_https_ctx ())
           {
-	declare gr, stat, msg varchar;
+	declare gr, stat, msg, webid, vtype varchar;
 	declare rc int;
 	declare vec any;
-	gr := null;
-	rc := sioc.DBA.foaf_check_ssl_int (null, gr);
-	if (not rc)
-	gr := FOAF_SSL_WEBFINGER (null, 1);
-	if (gr is not null)
+	gr := 'http:' || uuid ();
+	rc := WEBID_AUTH_GEN_2 (null, 0, null, 1, 0, webid, gr, 0, vtype);
+	if (rc)
 	  {
 	    vec := OPENID.DBA.get_user_details (gr, self._identity);
 	    if (vec is not null)
@@ -157,7 +165,12 @@
               <div id="login_form">
                 <form> <!-- just to keep validator happy on this mockup -->
 		  <label for="login_frm_username">User ID</label>
-		  <v:text name="username" type="hidden" value="--self._uname" xhtml_id="login_frm_username" /><?V self._uname ?><br />
+		  <?vsp if (self._identity <> 'http://specs.openid.net/auth/2.0/identifier_select') { ?>
+		  <input type="hidden" name="username" value="<?V self._uname ?>" id="login_frm_username" /><?V self._uname ?><?vsp 
+		  	} else { 
+		  ?><v:text name="username" value="--self._uname" xhtml_id="login_frm_username" />
+		  <?vsp } ?>
+		  <br />
 		  <label for="password">Password</label>
 		  <v:text name="password" value="" xhtml_id="login_frm_password" type="password" />
 		  <div class="login_frm_button_row">
@@ -280,7 +293,7 @@
           <a href="/ods/privacy.html">Privacy</a> |
           <a href="/ods/rabuse.vspx">Report Abuse</a>
           <div class="copyright">
-            Copyright © 1998-2011 OpenLink Software
+            Copyright © 1998-2012 OpenLink Software
           </div>
         </div> <!-- FT_R -->
       </div>
diff --git a/appsrc/ODS-Framework/opensocial.sql b/appsrc/ODS-Framework/opensocial.sql
index ff51d73..5191198 100644
--- a/appsrc/ODS-Framework/opensocial.sql
+++ b/appsrc/ODS-Framework/opensocial.sql
@@ -483,3 +483,5 @@ create trigger sn_related_opensocial_D after delete on DB.DBA.sn_related referen
   return;
 }
 ;
+
+use DB;
diff --git a/appsrc/ODS-Framework/pass_recovery.vspx b/appsrc/ODS-Framework/pass_recovery.vspx
index 165d86a..e934b88 100644
--- a/appsrc/ODS-Framework/pass_recovery.vspx
+++ b/appsrc/ODS-Framework/pass_recovery.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: pass_recovery.vspx,v 1.5.2.1 2010/09/20 10:15:24 source Exp $
+ -  $Id: pass_recovery.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/ping_log.vspx b/appsrc/ODS-Framework/ping_log.vspx
index b32bf60..b5f3d37 100644
--- a/appsrc/ODS-Framework/ping_log.vspx
+++ b/appsrc/ODS-Framework/ping_log.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ping_log.vspx,v 1.2.2.1 2010/09/20 10:15:24 source Exp $
+ -  $Id: ping_log.vspx,v 1.2.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/ping_svc.vspx b/appsrc/ODS-Framework/ping_svc.vspx
index dff8f92..a812a18 100644
--- a/appsrc/ODS-Framework/ping_svc.vspx
+++ b/appsrc/ODS-Framework/ping_svc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ping_svc.vspx,v 1.3.2.4 2011/03/08 13:28:15 source Exp $
+ -  $Id: ping_svc.vspx,v 1.3.2.5 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/popup_browser.vspx b/appsrc/ODS-Framework/popup_browser.vspx
index 3eb42f0..f4c5b1a 100644
--- a/appsrc/ODS-Framework/popup_browser.vspx
+++ b/appsrc/ODS-Framework/popup_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: popup_browser.vspx,v 1.5.2.1 2010/09/20 10:15:24 source Exp $
+ -  $Id: popup_browser.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/privacy.html b/appsrc/ODS-Framework/privacy.html
index c555b0b..167d66a 100644
--- a/appsrc/ODS-Framework/privacy.html
+++ b/appsrc/ODS-Framework/privacy.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: privacy.html,v 1.6.2.1 2010/09/20 10:15:24 source Exp $
+ -  $Id: privacy.html,v 1.6.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/provinces.sql b/appsrc/ODS-Framework/provinces.sql
index 51128ab..75c69d3 100644
--- a/appsrc/ODS-Framework/provinces.sql
+++ b/appsrc/ODS-Framework/provinces.sql
@@ -1,5 +1,5 @@
 --
---  $Id: provinces.sql,v 1.4.2.2 2010/12/10 16:04:14 source Exp $
+--  $Id: provinces.sql,v 1.4.2.3 2012/03/08 10:46:18 source Exp $
 --
 --  Provinces list
 
@@ -7,7 +7,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/rabuse.vspx b/appsrc/ODS-Framework/rabuse.vspx
index b136f10..f0c13d3 100644
--- a/appsrc/ODS-Framework/rabuse.vspx
+++ b/appsrc/ODS-Framework/rabuse.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rabuse.vspx,v 1.4.2.1 2010/09/20 10:15:25 source Exp $
+ -  $Id: rabuse.vspx,v 1.4.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/rdf_storage.vspx b/appsrc/ODS-Framework/rdf_storage.vspx
index 35bd121..4110852 100644
--- a/appsrc/ODS-Framework/rdf_storage.vspx
+++ b/appsrc/ODS-Framework/rdf_storage.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_storage.vspx,v 1.5.2.1 2010/09/20 10:15:25 source Exp $
+ -  $Id: rdf_storage.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/rdfb.css b/appsrc/ODS-Framework/rdfb.css
index 3478cd9..c980ad5 100644
--- a/appsrc/ODS-Framework/rdfb.css
+++ b/appsrc/ODS-Framework/rdfb.css
@@ -3,7 +3,7 @@
 *
 *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
 *
-*  Copyright (C) 2005-2007 OpenLink Software
+*  Copyright (C) 2005-2012 OpenLink Software
 *
 *  See LICENSE file for details.
 */
diff --git a/appsrc/ODS-Framework/rdfb.js b/appsrc/ODS-Framework/rdfb.js
index d88e949..419b31a 100644
--- a/appsrc/ODS-Framework/rdfb.js
+++ b/appsrc/ODS-Framework/rdfb.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rdfb.js,v 1.13.2.5 2010/10/13 12:16:48 source Exp $
+ *  $Id: rdfb.js,v 1.13.2.6 2012/03/08 10:46:18 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2007 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -289,7 +289,7 @@ OAT.Dereference = {
 		IO.doLoadWQX(obj.load,true);
 	} else {
 		$('about_oat_version').innerHTML = OAT.Preferences.version;
-		var ver = "$Id: rdfb.js,v 1.13.2.5 2010/10/13 12:16:48 source Exp $";
+		var ver = "$Id: rdfb.js,v 1.13.2.6 2012/03/08 10:46:18 source Exp $";
 		var r = ver.match(/main\.js,v ([^ ]+)/);
 		$('about_version').innerHTML = r[1];
 		dialogs.connection.show();
diff --git a/appsrc/ODS-Framework/register.js b/appsrc/ODS-Framework/register.js
index 8ec7a7d..84fa7c0 100644
--- a/appsrc/ODS-Framework/register.js
+++ b/appsrc/ODS-Framework/register.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -25,13 +25,65 @@ var rfFacebookData;
 var rfSslData;
 var rfOptions;
 var rfAjaxs = 0;
+var rfSslLinks = {"in": [], "up": []};
+
+function rfRowText(tbl, txt, txtCSSText) {
+  var tr = OAT.Dom.create('tr');
+  var td = OAT.Dom.create('td');
+  td.colSpan = 2;
+  td.style.cssText = txtCSSText;
+  td.innerHTML = txt;
+  tr.appendChild(td);
+  tbl.appendChild(tr);
+
+  return td;
+}
+
+function rfRowButtonClick(obj) {
+  var interface = readCookie('interface');
+  if (interface == 'js') {
+    var ssl = parent.document.getElementById('ssl_link');
+    if (ssl) {
+      if      (obj.href.indexOf('login.vspx') != -1)
+        parent.document.location = ssl.href + '&form=login';
+
+      else if (obj.href.indexOf('register.vspx') != -1)
+        parent.document.location = ssl.href + '&form=register';
+
+      return false;
+    }
+  }
+  return true;
+}
+
+function rfRowButton(td, id) {
+  var a = OAT.Dom.create ("a");
+  a.id = id;
+  a.href = document.location.protocol + '//' + document.location.host + '/ods/login.vspx';
+  a.onclick = function(){return rfRowButtonClick(this);};
+  a.innerHTML = 'Sign In (SSL)';
+
+  td.appendChild(a);
+  rfSslLinks['in'].push(a);
+}
+
+function rfRowButton2(td, id) {
+  var a = OAT.Dom.create ("a");
+  a.id = id;
+  a.href = document.location.protocol + '//' + document.location.host + '/ods/register.vspx';
+  a.onclick = function(){return rfRowButtonClick(this);};
+  a.innerHTML = 'Sign Up (SSL)';
+
+  td.appendChild(a);
+  rfSslLinks['up'].push(a);
+}
 
 function rfRowValue(tbl, label, value, leftTag) {
-  if (!leftTag) {
+  if (!leftTag)
     leftTag = 'th';
-  }
+
   var tr = OAT.Dom.create('tr');
-  var th = OAT.Dom.create(leftTag);
+  var th = OAT.Dom.create(leftTag, {verticalAlign: 'top'});
   th.width = '20%';
   th.innerHTML = label;
   tr.appendChild(th);
@@ -43,22 +95,43 @@ function rfRowValue(tbl, label, value, leftTag) {
   tbl.appendChild(tr);
 }
 
-function rfRowInput(tbl, label, fName) {
+function rfRowImage(tbl, label, value, leftTag) {
+  if (!leftTag)
+    leftTag = 'th';
+
+  var tr = OAT.Dom.create('tr');
+  var th = OAT.Dom.create(leftTag, {verticalAlign: 'top'});
+  th.width = '20%';
+  th.innerHTML = label;
+  tr.appendChild(th);
+  if (value) {
+    var td = OAT.Dom.create('td');
+    var img = OAT.Dom.create('img', {}, 'resize');
+    img.src = value;
+    td.appendChild(img);
+    tr.appendChild(td);
+  }
+  tbl.appendChild(tr);
+}
+
+function rfRowInput(tbl, label, fName, fOptions) {
   var tr = OAT.Dom.create('tr');
   tr.id = 'tr+'+fName;
 
   var th = OAT.Dom.create('th');
-  th.width = '30%';
+  th.width = '20%';
   th.innerHTML = label + '<div style="font-weight: normal; display: inline; color: red;"> *</div>';
   tr.appendChild(th);
 
   var td = OAT.Dom.create('td');
   tr.appendChild(td);
 
-  var fld = OAT.Dom.create('input');
-  fld.type = 'type';
+  var fld = OAT.Dom.create('input', fOptions);
+  fld.type = 'text';
   fld.id = fName;
   fld.name = fld.id;
+  if (fld.value == 'undefined')
+    fld.value = '';
   td.appendChild(fld);
 
   tbl.appendChild(tr);
@@ -81,6 +154,8 @@ function rfInit() {
     OAT.Dom.show('rf_tab_1');
   rfTab.add("rf_tab_1", "rf_page_1");
   rfTab.add("rf_tab_2", "rf_page_2");
+  if (regData.sslEnable)
+    OAT.Dom.show('rf_tab_3');
   rfTab.add("rf_tab_3", "rf_page_3");
   rfTab.add("rf_tab_4", "rf_page_4");
   rfTab.add("rf_tab_5", "rf_page_5");
@@ -98,8 +173,9 @@ function rfInit() {
         if (user && user.getElementsByTagName('id')[0]) {
           hiddenCreate('twitter-data', null, data);
           var tbl = $('rf_table_4');
-          rfRowValue(tbl, 'Login Name', OAT.Xml.textValue(user.getElementsByTagName('screen_name')[0]));
-          rfRowInput(tbl, 'E-Mail', 'rf_twitter_email');
+          rfRowInput(tbl, 'Login Name', 'rf_uid_4', {value: OAT.Xml.textValue(user.getElementsByTagName('screen_name')[0]), width: '150px'});
+          rfRowInput(tbl, 'E-Mail', 'rf_email_4', {width: '300px'});
+          rfCheckUpdate(4);
         }
         else
         {
@@ -112,7 +188,8 @@ function rfInit() {
         '&oauth_token=' + encodeURIComponent(uriParams['oauth_token']);
 
       OAT.AJAX.POST (S, null, x);
-    } else if (uriParams['oid-mode'] == 'linkedin') {
+    }
+    else if (uriParams['oid-mode'] == 'linkedin') {
       rfTab.go(5);
       $('rf_is_agreed').checked = true;
       var x = function (data) {
@@ -121,8 +198,9 @@ function rfInit() {
         if (user && user.getElementsByTagName('id')[0]) {
           hiddenCreate('linkedin-data', null, data);
           var tbl = $('rf_table_5');
-          rfRowValue(tbl, 'Login Name', OAT.Xml.textValue(user.getElementsByTagName('first-name')[0]));
-          rfRowInput(tbl, 'E-Mail', 'rf_linkedin_email');
+          rfRowInput(tbl, 'Login Name', 'rf_uid_5', {value: OAT.Xml.textValue(user.getElementsByTagName('first-name')[0]), width: '150px'});
+          rfRowInput(tbl, 'E-Mail', 'rf_email_5', {width: '300px'});
+          rfCheckUpdate(5);
         }
         else
         {
@@ -135,11 +213,12 @@ function rfInit() {
         '&oauth_token=' + encodeURIComponent(uriParams['oauth_token']);
 
       OAT.AJAX.POST (S, null, x);
-    } else {
+    }
+    else {
     rfTab.go(1);
     if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '') {
       var x = function (params, param, data, property) {
-        if (params[param] && params[param].length != 0)
+          if (params[param] && params[param].length != 0 &&  params[param] != 'undefined')
           data[property] = params[param];
       }
       var data = {};
@@ -155,6 +234,7 @@ function rfInit() {
         x(uriParams, 'openid.'+ns+'.value.email', data, 'mbox');
         x(uriParams, 'openid.'+ns+'.value.firstname', data, 'firstName');
         x(uriParams, 'openid.'+ns+'.value.fname', data, 'name');
+          x(uriParams, 'openid.'+ns+'.value.fullname', data, 'name');
         x(uriParams, 'openid.'+ns+'.value.language', data, 'language');
         x(uriParams, 'openid.'+ns+'.value.lastname', data, 'family_name');
         x(uriParams, 'openid.'+ns+'.value.fname', data, 'nick');
@@ -178,10 +258,11 @@ function rfInit() {
       if (!data['nick'] || !data['mbox']) {
         hiddenCreate('oid-data', null, OAT.JSON.stringify(data));
         var tbl = $('rf_table_1');
-        if (!data['nick'])
-          rfRowInput(tbl, 'Login Name', 'rf_openid_uid');
-        if (!data['mbox'])
-          rfRowInput(tbl, 'E-Mail', 'rf_openid_email');
+          rfRowInput(tbl, 'Login Name', 'rf_uid_1', {value: data['nick'], width: '150px'});
+          rfRowInput(tbl, 'E-Mail', 'rf_email_1', {value: data['mbox'], width: '300px'});
+          if (data['name'])
+            rfRowValue(tbl, 'Full Name', data['name']);
+          rfCheckUpdate(1);
       } else {
         var q = 'mode=1&data=' + encodeURIComponent(OAT.JSON.stringify(data));
         OAT.AJAX.POST ("/ods/api/user.register", q, rfAfterSignup);
@@ -213,52 +294,117 @@ function rfInit() {
     OAT.Dom.show("rf_tab_5");
   }
 
-  if ((document.location.protocol == 'https:') && regData.sslEnable) {
+  if (regData.sslEnable) {
     var x = function(data) {
       try {
         rfSslData = OAT.JSON.parse(data);
       } catch (e) {
         rfSslData = null;
       }
-      if (rfSslData && rfSslData.iri && !rfSslData.certLogin) {
+      if (rfSslData && rfSslData.iri) {
         var prefix = 'rf';
         OAT.Dom.show(prefix+"_tab_3");
         var tbl = $(prefix+'_table_3');
         if (tbl) {
+          OAT.Dom.unlink(prefix+'_table_3_throbber');
           rfRowValue(tbl, 'WebID', rfSslData.iri);
+          if (rfSslData.depiction)
+            rfRowImage(tbl, 'Photo', rfSslData.depiction);
+
+          if (!rfSslData.certLogin)
+            rfRowInput(tbl, 'Login Name', 'rf_uid_3', {value: rfSslData.loginName, width: '150px'});
+
+          if (rfSslData.mbox && rfSslData.certLogin)
+            rfRowValue(tbl, 'E-Mail', rfSslData.mbox);
+
+          if (!rfSslData.certLogin)
+            rfRowInput(tbl, 'E-Mail', 'rf_email_3', {value: rfSslData.mbox, width: '300px'});
+
           if (rfSslData.firstName)
             rfRowValue(tbl, 'First Name', rfSslData.firstName);
+
           if (rfSslData.family_name)
             rfRowValue(tbl, 'Family Name', rfSslData.family_name);
-          if (rfSslData.mbox)
-            rfRowValue(tbl, 'E-Mail', rfSslData.mbox);
+
+          if (rfSslData.certLogin) {
+            var td = rfRowText(tbl, 'You have registered WebID and can sign in with it - ', 'font-weight: bold; ');
+            rfRowButton(td, 'sign_in_1');
+          }
+          rfCheckUpdate(3);
           rfTab.go(3);
         }
       }
     }
+    if (document.location.protocol == 'https:') {
     OAT.AJAX.GET('/ods/api/user.getFOAFSSLData?sslFOAFCheck=1', '', x);
+    } else {
+      OAT.Dom.show('rf_tab_3');
+      var tbl = $('rf_table_3');
+      if (tbl) {
+        OAT.Dom.unlink('rf_table_3_throbber');
+        var td3 = rfRowText(tbl, 'Sign up for an ODS account using your existing WebID - ', 'font-weight: bold;');
+        rfRowButton2(td3, 'sign_up_3');
+      }
+    }
+  }
+  if (document.location.protocol != 'https:') {
+    var x = function (data) {
+      var o = null;
+      try {
+        o = OAT.JSON.parse(data);
+      } catch (e) { o = null; }
+      if (o && o.sslPort)
+      {
+        var ref = 'https://' + document.location.hostname + ((o.sslPort != '443')? ':' + o.sslPort: '');
+
+        var links = rfSslLinks['in'];
+        for (var i = 0; i < links.length; i++)
+          links[i].href = ref + '/ods/login.vspx';
+
+        var links = rfSslLinks['up'];
+        for (var i = 0; i < links.length; i++)
+          links[i].href = ref + '/ods/register.vspx';
+      }
+    }
+    OAT.AJAX.GET ('/ods/api/server.getInfo?info=sslPort', false, x);
   }
 }
 
 function rfCallback(oldIndex, newIndex) {
+  $('rf_signup').disabled = false;
   if (newIndex == 0)
     $('rf_signup').value = 'Sign Up';
   else if (newIndex == 1)
     $('rf_signup').value = 'OpenID Sign Up';
   else if (newIndex == 2)
     $('rf_signup').value = 'Facebook Sign Up';
-  else if (newIndex == 3)
+  else if (newIndex == 3) {
     $('rf_signup').value = 'WebID Sign Up';
+    if ((document.location.protocol == 'http:') || (rfSslData && rfSslData.certLogin))
+      $('rf_signup').disabled = true;
+  }
   else if (newIndex == 4)
     $('rf_signup').value = 'Twitter Sign Up';
   else if (newIndex == 5)
     $('rf_signup').value = 'LinkedIn Sign Up';
 
+  rfCheckUpdate(newIndex, true);
+
   pageFocus('rf_page_'+newIndex);
 }
 
+function rfCheckUpdate(idx, mode) {
+  if (!mode && (rfTab.selectedIndex != idx))
+    return;
+
+  $('rf_check').disabled = true;
+  if ($('rf_uid_'+idx))
+    $('rf_check').disabled = false;
+}
+
 function rfStart() {
   rfAjaxs++;
+  $('rf_check').disabled = true;
   $('rf_signup').disabled = true;
 	OAT.Dom.hide('rf_close');
 	OAT.Dom.show('rf_throbber');
@@ -269,15 +415,16 @@ function rfEnd() {
   if (rfAjaxs == 0) {
     OAT.Dom.hide('rf_throbber');
   	OAT.Dom.show('rf_close');
+    $('rf_check').disabled = false;
     $('rf_signup').disabled = false;
   }
 }
 
 function rfSignupSubmit(event) {
   if (rfTab.selectedIndex == 0) {
-    if ($v('rf_uid') == '')
+    if ($v('rf_uid_0') == '')
       return showError('Bad username. Please correct!');
-    if ($v('rf_email') == '')
+    if ($v('rf_email_0') == '')
       return showError('Bad mail. Please correct!');
     if ($v('rf_password') == '')
       return showError('Bad password. Please correct!');
@@ -298,48 +445,46 @@ function rfSignupSubmit(event) {
 
   var q = 'mode=' + encodeURIComponent(rfTab.selectedIndex);
   if (rfTab.selectedIndex == 0) {
-    q +='&name=' + encodeURIComponent($v('rf_uid'))
-      + '&password=' + encodeURIComponent($v('rf_password'))
-      + '&email=' + encodeURIComponent($v('rf_email'));
+    q +='&name=' + encodeURIComponent($v('rf_uid_0'))
+      + '&email=' + encodeURIComponent($v('rf_email_0'))
+      + '&password=' + encodeURIComponent($v('rf_password'));
   }
   else if (rfTab.selectedIndex == 1) {
     if (!$('oid-data')) {
       rfOpenIdAuthenticate('rf');
       return false;
     }
-    q += '&data=' + encodeURIComponent($v('oid-data'));
-    if ($('rf_openid_uid'))
-      q +='&name=' + encodeURIComponent($v('rf_openid_uid'));
-    if ($('rf_openid_email'))
-      q +='&email=' + encodeURIComponent($v('rf_openid_email'));
+    q +='&data=' + encodeURIComponent($v('oid-data'))
+      + '&name=' + encodeURIComponent($v('rf_uid_1'))
+      + '&email=' + encodeURIComponent($v('rf_email_1'));
   }
   else if (rfTab.selectedIndex == 2) {
     q += '&data=' + encodeURIComponent(OAT.JSON.stringify(rfFacebookData))
+      + '&name=' + encodeURIComponent($v('rf_uid_2'));
+      + '&email=' + encodeURIComponent($v('rf_email_2'));
   }
   else if (rfTab.selectedIndex == 3) {
-    q +='&data=' + encodeURIComponent(OAT.JSON.stringify(rfSslData));
-    if ($('rf_webid_uid'))
-      q +='&name=' + encodeURIComponent($v('rf_webid_uid'));
-    if ($('rf_webid_email'))
-      q +='&email=' + encodeURIComponent($v('rf_webid_email'));
+    q +='&data=' + encodeURIComponent(OAT.JSON.stringify(rfSslData))
+      + '&name=' + encodeURIComponent($v('rf_uid_3'))
+      + '&email=' + encodeURIComponent($v('rf_email_3'));
   }
   else if (rfTab.selectedIndex == 4) {
     if (!$('twitter-data')) {
       twitterAuthenticate('rf');
       return false;
     }
-    q +='&data=' + encodeURIComponent($v('twitter-data'));
-    if ($('rf_twitter_email'))
-      q +='&email=' + encodeURIComponent($v('rf_twitter_email'));
+    q +='&data=' + encodeURIComponent($v('twitter-data'))
+      + '&name=' + encodeURIComponent($v('rf_uid_4'));
+      + '&email=' + encodeURIComponent($v('rf_email_4'));
   }
   else if (rfTab.selectedIndex == 5) {
     if (!$('linkedin-data')) {
       linkedinAuthenticate('rf');
       return false;
     }
-    q +='&data=' + encodeURIComponent($v('linkedin-data'));
-    if ($('rf_linkedin_email'))
-      q +='&email=' + encodeURIComponent($v('rf_linkedin_email'));
+    q +='&data=' + encodeURIComponent($v('linkedin-data'))
+      + '&name=' + encodeURIComponent($v('rf_uid_5'))
+      + '&email=' + encodeURIComponent($v('rf_email_5'));
   }
   OAT.AJAX.POST("/ods/api/user.register", q, rfAfterSignup, rfOptions);
   return false;
@@ -356,13 +501,33 @@ function rfAfterSignup(data) {
   return false;
 }
 
+function rfCheckAvalability(event) {
+  var name = $v('rf_uid_'+rfTab.selectedIndex);
+  if (!name)
+    return showError('Bad username. Please correct!');
+
+  var email = $v('rf_email_'+rfTab.selectedIndex);
+  if (!email)
+    return showError('Bad Email. Please correct!');
+
+  var x = function (data) {
+    var xml = OAT.Xml.createXmlDoc(data);
+    if (!hasError(xml))
+      alert('Login name and Email are available!');
+  }
+
+  var q = '&name=' + encodeURIComponent(name) + '&email=' + encodeURIComponent(email);
+  OAT.AJAX.POST("/ods/api/user.checkAvalability", q, x);
+  return false;
+}
+
 function rfOpenIdAuthenticate(prefix) {
   var q = 'openIdUrl=' + encodeURIComponent($v(prefix+'_openId'));
   var x = function (data) {
     var xml = OAT.Xml.createXmlDoc(data);
     var error = OAT.Xml.xpath (xml, '//error_response', {});
     if (error.length)
-      showError('Invalied OpenID Server');
+      showError('Invalid OpenID Server');
 
     var oidServer = OAT.Xml.textValue (OAT.Xml.xpath (xml, '/openIdServer_response/server', {})[0]);
     if (!oidServer || !oidServer.length)
@@ -469,6 +634,10 @@ function rfShowFacebookData(skip) {
     rfLabel.innerHTML = '';
     if (rfFacebookData && rfFacebookData.name) {
       rfLabel.innerHTML = 'Connected as <b><i>' + rfFacebookData.name + '</i></b></b>';
+      var tbl = $('rf_table_2');
+      rfRowInput(tbl, 'Login Name', 'rf_uid_2', {value: (rfFacebookData.name).replace(' ', ''), width: '150px'});
+      rfRowInput(tbl, 'E-Mail', 'rf_email_2', {value: '', width: '300px'});
+      rfCheckUpdate(2);
     } else if (!skip) {
       rfLoadFacebookData(function() {self.rfShowFacebookData(true);});
     }
diff --git a/appsrc/ODS-Framework/register.vspx b/appsrc/ODS-Framework/register.vspx
index 4bac869..2bcbf33 100644
--- a/appsrc/ODS-Framework/register.vspx
+++ b/appsrc/ODS-Framework/register.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: register.vspx,v 1.6.2.3 2010/09/22 13:55:52 source Exp $
+ -  $Id: register.vspx,v 1.6.2.4 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/registration_xml.sql b/appsrc/ODS-Framework/registration_xml.sql
index bcd40e5..e9c7db6 100644
--- a/appsrc/ODS-Framework/registration_xml.sql
+++ b/appsrc/ODS-Framework/registration_xml.sql
@@ -1,10 +1,10 @@
 --
---  $Id: registration_xml.sql,v 1.3.2.1 2010/09/20 10:15:25 source Exp $
+--  $Id: registration_xml.sql,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/related_apps.vspx b/appsrc/ODS-Framework/related_apps.vspx
index 52a42fd..58d9cce 100644
--- a/appsrc/ODS-Framework/related_apps.vspx
+++ b/appsrc/ODS-Framework/related_apps.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: related_apps.vspx,v 1.1.2.2 2010/11/11 12:38:18 source Exp $
+ -  $Id: related_apps.vspx,v 1.1.2.3 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/salmon.sql b/appsrc/ODS-Framework/salmon.sql
index ddf501c..522ff3c 100644
--- a/appsrc/ODS-Framework/salmon.sql
+++ b/appsrc/ODS-Framework/salmon.sql
@@ -210,6 +210,17 @@ create procedure sp_load_rsa_keys (in x any)
       if (n is not null)
 	vectorbld_acc (ret, n);
     }
+  if (is_https_ctx ())
+    {
+      declare k, kn any;
+      k := client_attr ('client_certificate');
+      if (k is not null)
+	{ 
+	  kn := xenc_rand_bytes (8, 1);
+	  xenc_key_create_cert (kn, k, 'X.509');
+	  vectorbld_acc (ret, kn);
+	}
+    } 
   vectorbld_final (ret);
   return ret;
 }
diff --git a/appsrc/ODS-Framework/scot.sql b/appsrc/ODS-Framework/scot.sql
index 8354b3d..3759ae8 100644
--- a/appsrc/ODS-Framework/scot.sql
+++ b/appsrc/ODS-Framework/scot.sql
@@ -1,14 +1,14 @@
 --
 --  scot.sql
 --
---  $Id: scot.sql,v 1.7.2.2 2010/09/20 10:15:25 source Exp $
+--  $Id: scot.sql,v 1.7.2.3 2012/03/08 10:46:18 source Exp $
 --
 --  Procedures to support the SCOT Ontology RDF data in ODS.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/search.vspx b/appsrc/ODS-Framework/search.vspx
index 58146a7..7c635ef 100644
--- a/appsrc/ODS-Framework/search.vspx
+++ b/appsrc/ODS-Framework/search.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: search.vspx,v 1.28.2.7 2010/10/13 12:16:48 source Exp $
+ -  $Id: search.vspx,v 1.28.2.9 2012/03/08 13:13:47 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1675,7 +1675,7 @@ if (self.on_type = 'discussion' or self.on_type = 'nntpf')
                 end) ?></SampleSearch>
   <Developer>OpenLink Software</Developer>
   <Contact>OpenLink Software</Contact>
-  <Attribution>Copyright OpenLink Software</Attribution>
+  <Attribution>Copyright (C) 1998-2012 OpenLink Software</Attribution>
   <SyndicationRight>open</SyndicationRight>
   <AdultContent>false</AdultContent>
 </OpenSearchDescription><?vsp
diff --git a/appsrc/ODS-Framework/search_ajax.vsp b/appsrc/ODS-Framework/search_ajax.vsp
index 25c5875..419dcac 100644
--- a/appsrc/ODS-Framework/search_ajax.vsp
+++ b/appsrc/ODS-Framework/search_ajax.vsp
@@ -1,13 +1,13 @@
 <?vsp
 --
---   $Id: search_ajax.vsp,v 1.5.2.1 2010/09/20 10:15:25 source Exp $
+--   $Id: search_ajax.vsp,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
 --
 --   AJAX Handler for the google map control
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/security.vspx b/appsrc/ODS-Framework/security.vspx
index b5cbc48..bbbab07 100644
--- a/appsrc/ODS-Framework/security.vspx
+++ b/appsrc/ODS-Framework/security.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: security.vspx,v 1.4.2.1 2010/09/20 10:15:25 source Exp $
+ -  $Id: security.vspx,v 1.4.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/semping.sql b/appsrc/ODS-Framework/semping.sql
index ccb9c5d..666e3e2 100644
--- a/appsrc/ODS-Framework/semping.sql
+++ b/appsrc/ODS-Framework/semping.sql
@@ -111,7 +111,7 @@ create procedure CLI_PING_SRV (in src varchar, in tgt varchar)
       pserv := (sparql prefix pingback: <http://purl.org/net/pingback/> select ?ps where { graph ?:gr { ?:tgt pingback:to ?ps }});
       proto := 'RPC';  
     }
-  sparql clear ?:gr;  
+  sparql clear graph ?:gr;
   update CLI_QUEUE set CQ_SERVER = pserv, CQ_PROTO = proto, CQ_STATE = 1 where CQ_SOURCE = src and CQ_TARGET = tgt;
   commit work;
   if (pserv is not null)
diff --git a/appsrc/ODS-Framework/semping_app.vspx b/appsrc/ODS-Framework/semping_app.vspx
index b7dc4f9..6eeecb7 100644
--- a/appsrc/ODS-Framework/semping_app.vspx
+++ b/appsrc/ODS-Framework/semping_app.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: semping_app.vspx,v 1.1.4.6 2011/03/08 13:28:16 source Exp $
+ -  $Id: semping_app.vspx,v 1.1.4.7 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/semping_log.vspx b/appsrc/ODS-Framework/semping_log.vspx
index f36002f..871b076 100644
--- a/appsrc/ODS-Framework/semping_log.vspx
+++ b/appsrc/ODS-Framework/semping_log.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: semping_log.vspx,v 1.1.4.3 2010/09/20 10:15:26 source Exp $
+ -  $Id: semping_log.vspx,v 1.1.4.4 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/server.vspx b/appsrc/ODS-Framework/server.vspx
index ff8a823..90f5358 100644
--- a/appsrc/ODS-Framework/server.vspx
+++ b/appsrc/ODS-Framework/server.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: server.vspx,v 1.5.2.1 2010/09/20 10:15:26 source Exp $
+ -  $Id: server.vspx,v 1.5.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/services.vspx b/appsrc/ODS-Framework/services.vspx
index 23fd767..ba5fa20 100644
--- a/appsrc/ODS-Framework/services.vspx
+++ b/appsrc/ODS-Framework/services.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: services.vspx,v 1.9.2.4 2010/11/11 12:38:18 source Exp $
+ -  $Id: services.vspx,v 1.9.2.6 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -454,8 +454,7 @@
                   <v:after-data-bind>
                     <![CDATA[
                       control.ufl_value := '<img src="images/icons/group_16.png" border="0" alt="Members (application)" title="Members (application)"/> Members';
-		      if ((control.vc_parent as vspx_row_template).te_rowset[7] = 1 or
-                                    (control.vc_parent as vspx_row_template).te_rowset[6] in ('oMail', 'IM'))
+                                if ((control.vc_parent as vspx_row_template).te_rowset[7] = 1)
 		        control.vc_enabled := 0;
                     ]]>
                   </v:after-data-bind>
diff --git a/appsrc/ODS-Framework/settings.vspx b/appsrc/ODS-Framework/settings.vspx
index 8aed575..aef7133 100644
--- a/appsrc/ODS-Framework/settings.vspx
+++ b/appsrc/ODS-Framework/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: settings.vspx,v 1.4.2.1 2010/09/20 10:15:26 source Exp $
+ -  $Id: settings.vspx,v 1.4.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sfoaf.xml b/appsrc/ODS-Framework/sfoaf.xml
index fc50daa..491d896 100644
--- a/appsrc/ODS-Framework/sfoaf.xml
+++ b/appsrc/ODS-Framework/sfoaf.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: sfoaf.xml,v 1.3.2.1 2010/09/20 10:15:26 source Exp $
+ -  $Id: sfoaf.xml,v 1.3.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sfront.vspx b/appsrc/ODS-Framework/sfront.vspx
index 53ba84a..37958c7 100644
--- a/appsrc/ODS-Framework/sfront.vspx
+++ b/appsrc/ODS-Framework/sfront.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sfront.vspx,v 1.6.2.1 2010/09/20 10:15:26 source Exp $
+ -  $Id: sfront.vspx,v 1.6.2.2 2012/03/08 10:46:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sioc.sql b/appsrc/ODS-Framework/sioc.sql
index a9c6ce9..3d2679d 100644
--- a/appsrc/ODS-Framework/sioc.sql
+++ b/appsrc/ODS-Framework/sioc.sql
@@ -1,14 +1,14 @@
 --
 --  sioc.sql
 --
---  $Id: sioc.sql,v 1.79.2.45 2011/03/08 13:28:16 source Exp $
+--  $Id: sioc.sql,v 1.79.2.66 2012/03/12 17:41:17 source Exp $
 --
 --  Procedures to support the SIOC Ontology RDF data in ODS.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -41,7 +41,8 @@ create procedure get_graph ()
   return sprintf ('http://%s%s', get_cname (), get_base_path ());
 };
 
-create procedure get_graph_ext (in access_mode integer)
+create procedure get_graph_ext (
+  in access_mode integer)
 {
   declare graph varchar;
 
@@ -53,32 +54,18 @@ create procedure get_graph_ext (in access_mode integer)
 };
 
 create procedure get_graph_new (
-  in instance_id integer := null,
   in access_mode integer := null,
   in object_iri varchar := null)
 {
-  declare arr any;
-  declare exit handler for not found { return null; };
-
-  if (isnull (access_mode))
-    access_mode := coalesce((select WAI_IS_PUBLIC from DB.DBA.WA_INSTANCE where WAI_ID = instance_id), 0);
-
-  if (access_mode = 0)
-    return null;
+  declare V any;
 
   if (access_mode = 1)
     return get_graph ();
 
-  if (access_mode = 2)
-  {
-    if (isnull (object_iri))
-      object_iri := get_graph ();
-    arr := sprintf_inverse (object_iri, 'http://%s/dataspace/%s', 1);
-    if (length (arr) <> 2)
-      return null;
-    return sprintf ('http://%s/dataspace/protected/%s',arr[0],arr[1]);
-  }
-  return null;
+  V := sprintf_inverse (object_iri, 'http://%s/dataspace/%s', 1);
+  if (length (V) <> 2)
+    return null;
+  return sprintf ('http://%s/dataspace/protected/%s', V[0], V[1]);
 };
 
 create procedure get_ods_link ()
@@ -224,11 +211,21 @@ create procedure opl_iri (in s varchar)
 };
 
 
+create procedure oplmail_iri (in s varchar)
+{
+  return concat ('http://www.openlinksw.com/schemas/mail#', s);
+};
+
 create procedure cert_iri (in s varchar)
 {
   return concat ('http://www.w3.org/ns/auth/cert#', s);
 };
 
+create procedure xsd_iri (in s varchar)
+{
+  return concat ('http://www.w3.org/2001/XMLSchema#', s);
+};
+
 create procedure rev_iri (in s varchar)
 {
   return concat ('http://purl.org/stuff/rev#', s);
@@ -753,7 +750,7 @@ create procedure sioc_user (in graph_iri varchar, in iri varchar, in u_name varc
 
 };
 
-create procedure wa_user_check (inout txt varchar, inout flags varchar, in fld integer)
+create procedure wa_user_check (inout txt any, inout flags varchar, in fld integer)
 {
   declare exit handler for sqlstate '*' { return 0; };
 
@@ -820,11 +817,11 @@ create procedure sioc_user_cert (in graph_iri varchar, in person_iri varchar, in
       modulus := info[2];
       exponent := info[1];
       crt_iri := replace (person_iri, '#this', sprintf ('#cert%d', cert_id));
-      DB.DBA.ODS_QUAD_URI (graph_iri, crt_iri, cert_iri ('identity'), person_iri);
-      DB.DBA.ODS_QUAD_URI (graph_iri, crt_iri, rdf_iri ('type'), rsa_iri ('RSAPublicKey'));
+      DB.DBA.ODS_QUAD_URI (graph_iri, person_iri, cert_iri ('key'), crt_iri);
+      DB.DBA.ODS_QUAD_URI (graph_iri, crt_iri, rdf_iri ('type'), cert_iri ('RSAPublicKey'));
 
-      DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri,crt_iri, rsa_iri ('modulus'), bin2hex (modulus), cert_iri ('hex'), null);
-      DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri,crt_iri, rsa_iri ('public_exponent'), cast (exponent as varchar), cert_iri ('int'), null);
+      DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri,crt_iri, cert_iri ('modulus'), bin2hex (modulus), xsd_iri ('hexBinary'), null);
+      DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri,crt_iri, cert_iri ('exponent'), cast (exponent as varchar), xsd_iri ('int'), null);
     }
   return;
 }
@@ -977,7 +974,7 @@ create procedure sioc_user_info (
 	{
 	  if (length (interest))
 	    {
-  	      DB.DBA.ODS_QUAD_URI (public_graph_iri, iri, foaf_iri ('interest'), interest);
+  	      DB.DBA.ODS_QUAD_URI (public_graph_iri, iri, foaf_iri ('topic_interest'), interest);
 	      if (length (label))
   		      DB.DBA.ODS_QUAD_URI_L (public_graph_iri, interest, rdfs_iri ('label'), label);
 	    }
@@ -990,7 +987,7 @@ create procedure sioc_user_info (
   	  {
   	    if (length (interest))
   	    {
-  	      DB.DBA.ODS_QUAD_URI (public_graph_iri, iri, foaf_iri ('topic_interest'), interest);
+  	      DB.DBA.ODS_QUAD_URI (public_graph_iri, iri, foaf_iri ('interest'), interest);
   	      if (length (label))
   		      DB.DBA.ODS_QUAD_URI_L (public_graph_iri, interest, rdfs_iri ('label'), label);
   	    }
@@ -1054,17 +1051,14 @@ create procedure sioc_user_info (
   if (wa_user_check (webpage, flags, 7))
     DB.DBA.ODS_QUAD_URI (wa_user_graph (flags, 7, public_graph_iri, protected_graph_iri), iri, foaf_iri ('homepage'), webpage);
 
-  if (wa_user_check (ext_urls, flags, 8))
+  --  external IRIs
+  for (select u, flag from DB.DBA.WA_USER_INTERESTS (txt) (u varchar, flag varchar) P where txt = ext_urls) do
     {
-      declare arr any;
-      ext_urls := blob_to_string (ext_urls);
-      ext_urls := replace (ext_urls, '\r', '\n');
-      ext_urls := replace (ext_urls, '\n\n', '\n');
-      arr := split_and_decode (ext_urls, 0, '\0\0\n');
-      foreach (any u in arr) do
+      if (length (u))
 	{
-	  if (length (trim (u)))
-   	      DB.DBA.ODS_QUAD_URI (wa_user_graph (flags, 8, public_graph_iri, protected_graph_iri), iri, owl_iri ('sameAs'), u);
+          if (length (flag) = 0)
+            flag := '1';
+          DB.DBA.ODS_QUAD_URI (wa_user_graph (flag, 0, public_graph_iri, protected_graph_iri), iri, owl_iri ('sameAs'), u);
 	}
     }
 
@@ -1111,26 +1105,8 @@ create procedure sioc_user_info (
   if (protected is not null)
     DB.DBA.ODS_QUAD_URI (public_graph_iri, iri, rdfs_iri ('seeAlso'), protected);
 
-  -- disabled, see above function
-  if (0 and length (cert))
-	{
-	  declare info, modulus, exponent any;
-
-	  info := get_certificate_info (9, cast (cert as varchar), 0);
-	  if (info is not null and isarray (info) and cast (info[0] as varchar) = 'RSAPublicKey')
-	    {
-    	  DB.DBA.ODS_QUAD_URI (public_graph_iri, crt_iri, cert_iri ('identity'), iri);
-	      modulus := info[2];
-	      exponent := info[1];
-    	  DB.DBA.ODS_QUAD_URI (public_graph_iri, crt_iri, rdf_iri ('type'), rsa_iri ('RSAPublicKey'));
-    	  DB.DBA.ODS_QUAD_URI_L_TYPED (public_graph_iri, crt_iri, rsa_iri ('modulus'), bin2hex (modulus), cert_iri ('hex'), null);
-    	  DB.DBA.ODS_QUAD_URI_L_TYPED (public_graph_iri, crt_iri, rsa_iri ('public_exponent'), cast (exponent as varchar), cert_iri ('int'), null);
-    	  --DB.DBA.ODS_QUAD_URI (graph_iri, crt_iri, rsa_iri ('modulus'), crt_mod);
-    	  --DB.DBA.ODS_QUAD_URI (graph_iri, crt_iri, rsa_iri ('public_exponent'), crt_exp);
-    	  --DB.DBA.ODS_QUAD_URI_L (graph_iri, crt_mod, cert_iri ('hex'), bin2hex (modulus));
-    	  --DB.DBA.ODS_QUAD_URI_L (graph_iri, crt_exp, cert_iri ('decimal'), cast (exponent as varchar));
-	    }
-	}
+  -- contact services
+  SIOC..ods_object_services_attach (public_graph_iri, iri, 'user');
 };
 
 create procedure sioc_user_info_delete (
@@ -1187,6 +1163,9 @@ create procedure sioc_user_info_delete (
     delete_quad_s_or_o (graph_iri, crt_iri, crt_iri);
     delete_quad_s_or_o (graph_iri, crt_exp, crt_exp);
     delete_quad_s_or_o (graph_iri, crt_mod, crt_mod);
+
+    -- contact services
+    SIOC..ods_object_services_dettach (graph_iri, iri, 'user');
     	}
     }
 ;
@@ -1255,45 +1234,6 @@ create procedure sioc_user_bioevent (in graph_iri varchar, in user_iri varchar,
     DB.DBA.ODS_QUAD_URI_L (graph_iri, bio_iri, bio_iri ('place'), bioPlace);
 };
 
-create procedure sioc_goodRelation_details (in graph_iri varchar, in forum_iri varchar, in user_iri varchar, in obj any)
-{
-  declare N integer;
-  declare tmp, products, properties, iri any;
-
-  products := get_keyword ('products', obj);
-  foreach (any product in products) do
-  {
-    iri := offerlist_item_iri (forum_iri, get_keyword ('id', product));
-	  DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc_iri ('has_container'), forum_iri);
-	  DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('container_of'), iri);
-    DB.DBA.ODS_QUAD_URI (graph_iri, iri, rdf_iri ('type'), ODS.ODS_API."ontology.denormalize" (get_keyword ('className', product)));
-
-    properties := get_keyword ('properties', product);
-    foreach (any property in properties) do
-    {
-      declare propertyType, propertyName, propertyValue, propertyLanguage any;
-
-      propertyType := get_keyword ('type', property);
-      propertyValue := get_keyword ('value', property);
-      propertyName := ODS.ODS_API."ontology.denormalize" (get_keyword ('name', property));
-      if (propertyType = 'object')
-      {
-        DB.DBA.ODS_QUAD_URI (graph_iri, iri, propertyName, ODS.ODS_API."ontology.denormalize" (propertyValue));
-      }
-      else if (propertyType = 'data')
-      {
-        DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, propertyName, propertyValue);
-      }
-      else
-      {
-        propertyLanguage := get_keyword ('language', property);
-        DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri, iri, propertyName, propertyValue, ODS.ODS_API."ontology.denormalize" (propertyType), propertyLanguage);
-  }
-    }
-  }
-}
-;
-
 create procedure sioc_user_offerlist (in user_id integer, in ol_id integer, in ol_type varchar, in ol_flag varchar, in ol_offer varchar, in ol_comment varchar, in ol_properties varchar)
 {
   declare user_name, forum_type any;
@@ -1303,7 +1243,7 @@ create procedure sioc_user_offerlist (in user_id integer, in ol_id integer, in o
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
-  user_iri := user_iri (user_id);
+  user_iri := person_iri (user_iri (user_id));
   user_name := (select U_NAME from DB.DBA.SYS_USERS where U_ID = user_id);
   graph_iri := sioc_user_graph (user_name, ol_flag);
   if (isnull (graph_iri))
@@ -1324,14 +1264,14 @@ create procedure sioc_user_offerlist (in user_id integer, in ol_id integer, in o
   sioc_forum (graph_iri, graph_iri, forum_iri, ol_offer, forum_type, ol_comment, null, user_name);
 
   obj := deserialize (ol_properties);
-  sioc_goodRelation_details (graph_iri, forum_iri, user_iri, obj);
+  sioc_user_items_create (graph_iri, forum_iri, user_iri, obj);
 };
 
 create procedure sioc_user_offerlist_delete (in user_id integer, in ol_id integer, in ol_type varchar, in ol_flag varchar, in ol_offer varchar, in ol_comment varchar, in ol_properties varchar)
 {
-  declare N integer;
+  declare N, M integer;
   declare user_name any;
-  declare graph_iri, forum_iri, iri, obj, products any;
+  declare graph_iri, forum_iri, iri, obj, ontologies, products any;
   declare exit handler for sqlstate '*'
   {
     sioc_log_message (__SQL_MESSAGE);
@@ -1351,14 +1291,9 @@ create procedure sioc_user_offerlist_delete (in user_id integer, in ol_id intege
   }
   delete_quad_s_or_o (graph_iri, forum_iri, forum_iri);
 
-  obj := deserialize (ol_properties);
-  products := get_keyword ('products', obj);
-  for (N := 0; N < length (products); N := N + 1)
-  {
-    iri := offerlist_item_iri (forum_iri, N+1);
-    delete_quad_s_or_o (graph_iri, iri, iri);
+  sioc_user_items_delete (graph_iri, forum_iri, deserialize (ol_properties));
   }
-};
+;
 
 create procedure sioc_user_graph (in user_name varchar, in flag varchar)
 {
@@ -1389,7 +1324,7 @@ create procedure sioc_user_likes (in user_id integer, in l_id integer, in l_flag
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
-  user_iri := user_iri (user_id);
+  user_iri := person_iri (user_iri (user_id));
   user_name := (select U_NAME from DB.DBA.SYS_USERS where U_ID = user_id);
   graph_iri := sioc_user_graph (user_name, l_flag);
   if (isnull (graph_iri))
@@ -1411,37 +1346,7 @@ create procedure sioc_user_likes (in user_id integer, in l_id integer, in l_flag
   DB.DBA.ODS_QUAD_URI (graph_iri, user_iri, like_iri (like_property), forum_iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, rdfs_iri ('seeAlso'), l_uri);
 
-  declare N integer;
-  declare tmp, products, properties, iri any;
-
-  products := get_keyword ('products', deserialize (l_properties));
-  foreach (any product in products) do
-  {
-    iri := likes_item_iri (forum_iri, get_keyword ('id', product));
-	  DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc_iri ('has_container'), forum_iri);
-	  DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('container_of'), iri);
-    DB.DBA.ODS_QUAD_URI (graph_iri, iri, rdf_iri ('type'), ODS.ODS_API."ontology.denormalize" (get_keyword ('className', product)));
-
-    properties := get_keyword ('properties', product);
-    foreach (any property in properties) do
-    {
-      declare propertyType, propertyName, propertyValue any;
-
-      propertyType := get_keyword ('type', property);
-      propertyValue := get_keyword ('value', property);
-      propertyName := ODS.ODS_API."ontology.denormalize" (get_keyword ('name', property));
-      if (propertyType = 'data')
-      {
-        --dbg_obj_princ ('data: ', iri, propertyName, propertyValue);
-        DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, propertyName, propertyValue);
-      }
-      else if (propertyType = 'object')
-      {
-        --dbg_obj_princ ('obj: ', iri, propertyName, ODS.ODS_API."ontology.denormalize" (propertyValue));
-        DB.DBA.ODS_QUAD_URI (graph_iri, iri, propertyName, ODS.ODS_API."ontology.denormalize" (propertyValue));
-      }
-    }
-  }
+  sioc_user_items_create (graph_iri, forum_iri, user_iri, deserialize (l_properties));
 }
 ;
 
@@ -1468,12 +1373,7 @@ create procedure sioc_user_likes_delete (in user_id integer, in l_id integer, in
   }
   delete_quad_s_or_o (graph_iri, forum_iri, forum_iri);
 
-  products := get_keyword ('products', deserialize (l_properties));
-  for (N := 0; N < length (products); N := N + 1)
-  {
-    iri := likes_item_iri (forum_iri, N+1);
-    delete_quad_s_or_o (graph_iri, iri, iri);
-  }
+  sioc_user_items_delete (graph_iri, forum_iri, deserialize (l_properties));
 }
 ;
 
@@ -1486,7 +1386,7 @@ create procedure sioc_user_knows (in user_id integer, in k_id integer, in k_flag
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
-  user_iri := user_iri (user_id);
+  user_iri := person_iri (user_iri (user_id));
   user_name := (select U_NAME from DB.DBA.SYS_USERS where U_ID = user_id);
   graph_iri := sioc_user_graph (user_name, k_flag);
   if (isnull (graph_iri))
@@ -1505,7 +1405,7 @@ create procedure sioc_user_knows_delete (in user_id integer, in k_id integer, in
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
-  user_iri := user_iri (user_id);
+  user_iri := person_iri (user_iri (user_id));
   user_name := (select U_NAME from DB.DBA.SYS_USERS where U_ID = user_id);
   graph_iri := sioc_user_graph (user_name, k_flag);
   if (isnull (graph_iri))
@@ -1525,7 +1425,7 @@ create procedure sioc_user_favorite (in user_id integer, in f_id integer, in f_f
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
-  user_iri := user_iri (user_id);
+  user_iri := person_iri (user_iri (user_id));
   user_name := (select U_NAME from DB.DBA.SYS_USERS where U_ID = user_id);
 
   forum_name := forum_name (user_name, 'FavoriteThings');
@@ -1544,28 +1444,14 @@ create procedure sioc_user_favorite (in user_id integer, in f_id integer, in f_f
   DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('container_of'), iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, iri, rdf_iri ('type'), ODS.ODS_API."ontology.denormalize" (f_class));
   DB.DBA.ODS_QUAD_URI (graph_iri, user_iri, sioct_iri ('likes'), iri);
-  f_properties := deserialize (f_properties);
-  foreach (any property in f_properties) do
-  {
-    declare propertyType, propertyName, propertyValue any;
 
-    propertyType := get_keyword ('type', property);
-    propertyValue := get_keyword ('value', property);
-    propertyName := ODS.ODS_API."ontology.denormalize" (get_keyword ('name', property));
-    if (propertyType = 'data')
-    {
-      DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, propertyName, propertyValue);
-    }
-    else if (propertyType = 'object')
-    {
-      DB.DBA.ODS_QUAD_URI (graph_iri, iri, propertyName, ODS.ODS_API."ontology.denormalize" (propertyValue));
-    }
+  sioc_user_item_properies_create (graph_iri, iri, deserialize (f_properties));
   }
-};
+;
 
 create procedure sioc_user_favorite_delete (in user_id integer, in f_id integer, in f_flag varchar, in f_type varchar, in f_label varchar, in f_uri varchar, in f_class varchar, in f_properties any)
 {
-  declare user_id, user_name any;
+  declare user_name any;
   declare graph_iri, forum_iri, iri any;
   declare exit handler for sqlstate '*'
   {
@@ -1584,15 +1470,109 @@ create procedure sioc_user_favorite_delete (in user_id integer, in f_id integer,
 
   iri := favorite_item_iri (forum_iri, f_id);
   delete_quad_s_or_o (graph_iri, iri, iri);
-};
+}
+;
+
+create procedure sioc_user_items_create (in graph_iri varchar, in forum_iri varchar, in user_iri varchar, in obj any)
+{
+  declare N integer;
+  declare ontologies any;
+
+  if (get_keyword ('version', obj) = '1.0')
+  {
+    sioc_user_item_create (graph_iri, forum_iri, user_iri, get_keyword ('products', obj, vector ()));
+  }
+  else if (get_keyword ('version', obj) = '2.0')
+  {
+    ontologies := get_keyword ('ontologies', obj, vector ());
+    foreach (any ontology in ontologies) do
+    {
+      sioc_user_item_create (graph_iri, forum_iri, user_iri, get_keyword ('items', ontology, vector ()));
+    }
+  }
+}
+;
 
+create procedure sioc_user_item_create (in graph_iri varchar, in forum_iri varchar, in user_iri varchar, in items any)
+{
+  declare properties, iri any;
+
+  foreach (any item in items) do
+  {
+    iri := offerlist_item_iri (forum_iri, get_keyword ('id', item));
+	  DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc_iri ('has_container'), forum_iri);
+	  DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('container_of'), iri);
+    DB.DBA.ODS_QUAD_URI (graph_iri, iri, rdf_iri ('type'), ODS.ODS_API."ontology.denormalize" (get_keyword ('className', item)));
+
+    properties := get_keyword ('properties', item);
+    sioc_user_item_properies_create (graph_iri, iri, properties);
+  }
+}
+;
+
+create procedure sioc_user_item_properies_create (in graph_iri varchar, in iri varchar, in properties any)
+{
+  declare propertyType, propertyName, propertyValue, propertyLanguage any;
+
+  foreach (any property in properties) do
+  {
+    propertyType := get_keyword ('type', property);
+    propertyValue := get_keyword ('value', property);
+    propertyName := ODS.ODS_API."ontology.denormalize" (get_keyword ('name', property));
+    if (propertyType = 'object')
+    {
+      DB.DBA.ODS_QUAD_URI (graph_iri, iri, propertyName, ODS.ODS_API."ontology.denormalize" (propertyValue));
+    }
+    else if (propertyType = 'data')
+    {
+      DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, propertyName, propertyValue);
+    }
+    else
+    {
+      propertyLanguage := get_keyword ('language', property);
+      DB.DBA.ODS_QUAD_URI_L_TYPED (graph_iri, iri, propertyName, propertyValue, ODS.ODS_API."ontology.denormalize" (propertyType), propertyLanguage);
+    }
+  }
+}
+;
+
+create procedure sioc_user_items_delete (in graph_iri varchar, in forum_iri varchar, in obj any)
+{
+  declare N integer;
+  declare iri varchar;
+  declare ontologies, products any;
+
+  if (get_keyword ('version', obj) = '1.0')
+  {
+    products := get_keyword ('products', obj, vector ());
+    for (N := 0; N < length (products); N := N + 1)
+    {
+      iri := offerlist_item_iri (forum_iri, N+1);
+      delete_quad_s_or_o (graph_iri, iri, iri);
+    }
+  }
+  else if (get_keyword ('version', obj) = '2.0')
+  {
+    ontologies := get_keyword ('ontologies', obj, vector ());
+    foreach (any ontology in ontologies) do
+    {
+      products := get_keyword ('items', ontology, vector ());
+      for (N := 0; N < length (products); N := N + 1)
+      {
+        iri := offerlist_item_iri (forum_iri, N+1);
+        delete_quad_s_or_o (graph_iri, iri, iri);
+      }
+    }
+  }
+}
+;
 
 create procedure sioc_user_account (in graph_iri varchar, in iri varchar, in name varchar, in url varchar, in uri varchar := null)
 {
   declare pers_iri any;
 
   pers_iri := person_iri (iri);
-  if (isnull (uri))
+  if (not length (uri))
     uri := person_ola_iri (iri, name);
   -- XXX, have to know if this is URL
   DB.DBA.ODS_QUAD_URI (graph_iri, uri, rdf_iri ('type'), foaf_iri ('OnlineAccount'));
@@ -1720,6 +1700,10 @@ create procedure sioc_forum (
     }
   if (wai_type_name = 'AddressBook')
     {
+      -- attach instance services
+      ods_object_services_attach (graph_iri, iri, 'instance');
+      ods_object_services_attach (graph_iri, iri, DB.DBA.wa_type_to_app (wai_type_name));
+
       iri := forum_iri ('SocialNetwork', _wai_name);
       sioc_forum (graph_iri, site_iri, iri, _wai_name, 'SocialNetwork', wai_description);
     }
@@ -1729,6 +1713,10 @@ create procedure sioc_forum (
       DB.DBA.ODS_QUAD_URI (graph_iri, iri, foaf_iri ('maker'), pers_iri);
       DB.DBA.ODS_QUAD_URI (graph_iri, pers_iri, foaf_iri ('made'), iri);
     }
+
+  -- attach instance services
+  ods_object_services_attach (graph_iri, iri, 'instance');
+  ods_object_services_attach (graph_iri, iri, DB.DBA.wa_type_to_app (wai_type_name));
 };
 
 create procedure cc_gen_rdf (in iri varchar, in lic_iri varchar)
@@ -1960,11 +1948,11 @@ create procedure ods_sioc_post (
       if (__tag (content) = __tag of XML)
 	content := serialize_to_UTF8_xml (content);
       content := subseq (content, 0, 10000000);
-      content := regexp_replace (content, '<[^>]+>', '', 1, null);
-	  ses := string_output ();
-	  http_value (content, null, ses);
-	  ses := string_output_string (ses);
-	  DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, sioc_iri ('content'), ses);
+      --content := regexp_replace (content, '<[^>]+>', '', 1, null);
+      --ses := string_output ();
+      --http_value (content, null, ses);
+      --ses := string_output_string (ses);
+      DB.DBA.ODS_QUAD_URI_L (graph_iri, iri, sioc_iri ('content'), content);
 	}
       if (do_ann)
 	{
@@ -2061,6 +2049,102 @@ create procedure ods_sioc_service (
   commit work;
 };
 
+
+
+use sioc;
+
+-------------------------------------------------------------------------------
+--
+create procedure ods_object_services_iri (
+  in object_name varchar)
+{
+  return sprintf ('http://%s%s/services/%s', get_cname (), get_base_path (), object_name);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ods_object_service_iri (
+  in object_name varchar,
+  in service_name varchar)
+{
+  return sprintf ('http://%s%s/service/%s/%s', get_cname (), get_base_path (), object_name, service_name);
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ods_object_service_url (
+  in service_name varchar,
+  in shortMode integer := 0)
+{
+  declare service_url varchar;
+  declare params any;
+  declare delimiter varchar;
+
+  service_url := sprintf ('http://%s/ods/api/%s', get_cname(), service_name);
+  if (not shortMode)
+  {
+    delimiter := '?';
+    params := procedure_cols ('ODS..' || service_name);
+    foreach (any param in params) do
+    {
+      service_url := sprintf ('%s%s%s={%s}', service_url, delimiter, param[3], param[3]);
+      delimiter := '&';
+    }
+  }
+  return service_url;
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure ods_object_services (
+  in graph_iri varchar,
+  in svc_object varchar,
+  in svc_object_title varchar,
+  in svc_functions any)
+{
+  declare services_iri, service_iri, service_url varchar;
+
+  services_iri := ods_object_services_iri (svc_object);
+  DB.DBA.ODS_QUAD_URI (graph_iri, services_iri, rdf_iri ('type'), services_iri ('Services'));
+  DB.DBA.ODS_QUAD_URI_L (graph_iri, services_iri, dc_iri ('title'), svc_object_title);
+  foreach (any svc_function in svc_functions) do
+  {
+    service_iri := ods_object_service_iri (svc_object, svc_function);
+    service_url := ods_object_service_url (svc_function);
+    ods_sioc_service (graph_iri, service_iri, services_iri, null, null, null, service_url, 'REST');
+  }
+}
+;
+
+create procedure ods_object_services_attach (
+  in graph_iri varchar,
+  in iri varchar,
+  in svc_object varchar)
+{
+  declare services_iri varchar;
+
+  services_iri := ods_object_services_iri (svc_object);
+  DB.DBA.ODS_QUAD_URI (graph_iri, services_iri, services_iri ('services_of'), iri);
+  DB.DBA.ODS_QUAD_URI (graph_iri, iri, services_iri ('has_services'), services_iri);
+}
+;
+
+create procedure ods_object_services_dettach (
+  in graph_iri varchar,
+  in iri varchar,
+  in svc_object varchar)
+{
+  declare services_iri varchar;
+
+  services_iri := ods_object_services_iri (svc_object);
+  delete_quad_s_p_o (graph_iri, services_iri, services_iri ('services_of'), iri);
+  delete_quad_s_p_o (graph_iri, iri, services_iri ('has_services'), services_iri);
+}
+;
+
 -- the ods_sioc_tags* is used for text indexing the NNTP data
 -- the SKOS & SCOT tags are produced by scot_tags_insert & scot_tags_delete
 create procedure ods_sioc_tags_delete (in graph_iri any, in post_iri any, in _tags any)
@@ -2164,7 +2248,7 @@ create procedure fill_ods_sioc_online (in doall int := 0, in iri_result int := 1
 
 create procedure fill_ods_sioc (in doall int := 0)
 {
-  declare iri, site_iri, graph_iri, sioc_version varchar;
+  declare iri, site_iri, graph_iri, tmp_graph_iri, forum_iri, sioc_version varchar;
   declare fCreate, cpt, deadl, cnt int;
 
   declare exit handler for sqlstate '*', not found
@@ -2196,14 +2280,38 @@ create procedure fill_ods_sioc (in doall int := 0)
     
     l0:
     delete from DB.DBA.RDF_QUAD where G = DB.DBA.RDF_IID_OF_QNAME (fix_graph (graph_iri));
+
+    -- clean private graphs
+	  for select WAI_ID,
+	             WAI_TYPE_NAME,
+	             WAI_NAME,
+               WAI_IS_PUBLIC
+		      from DB.DBA.WA_INSTANCE
+		     where WAI_IS_PUBLIC = 0 do
+		{
+      forum_iri := forum_iri (WAI_TYPE_NAME, WAI_NAME);
+      tmp_graph_iri := get_graph_new (WAI_IS_PUBLIC, forum_iri);
+      if (length (tmp_graph_iri))
+      {
+        delete from DB.DBA.RDF_QUAD where G = DB.DBA.RDF_IID_OF_QNAME (tmp_graph_iri);
+
+        -- remove user's rights for private graphs
+    	  for select WAM_USER
+    		      from DB.DBA.WA_MEMBER
+  		     where WAM_INST = WAI_NAME do
+    		{
+          SIOC..private_user_remove (tmp_graph_iri, WAM_USER);
+        }
+      }
+		}
     commit work;
     set isolation='committed';
     ods_graph_init ();
   }
 
   ods_ping_svc_init (graph_iri, site_iri);
-
   scot_tags_init ();
+  fill_ods_services ();
 
   -- init users
   {
@@ -2233,7 +2341,7 @@ create procedure fill_ods_sioc (in doall int := 0)
       else -- sioc:User
 	{
 	  declare u_site_iri, person_iri any;
-	  declare forum_name, forum_iri any;
+    	  declare forum_name any;
 
 	  iri := user_iri (u_id);
 	  if (iri is not null)
@@ -2392,7 +2500,7 @@ create procedure fill_ods_sioc (in doall int := 0)
 		           DB.DBA.WA_INSTANCE
 		     where WAM_USER = U_ID 
 		       and WAM_INST = WAI_NAME 
-		       and ((WAI_IS_PUBLIC = 1) or (WAI_TYPE_NAME = 'oDrive')) do
+		       and SIOC..instance_sioc_check (WAI_IS_PUBLIC, WAI_TYPE_NAME) = 1 do
 		{
 		  instance_sioc_data (
                           WAM_INST,
@@ -2430,11 +2538,13 @@ create procedure fill_ods_sioc (in doall int := 0)
     commit work;
   }
 
-  declare ep varchar;
+  declare ep, ep2 varchar;
   ep := sprintf ('http://%s/semping', sioc..get_cname ());
+  ep2 := ep || '/rest';
   for select * from SEMPING.DBA.PING_RULES where PR_GRAPH = graph_iri do
     {
-      sparql insert into graph iri(?:PR_GRAPH) { `iri(?:PR_IRI)` <http://purl.org/net/pingback/to> `iri(?:ep)` . };
+      sparql insert into graph iri(?:PR_GRAPH) { `iri(?:PR_IRI)` <http://purl.org/net/pingback/to> `iri(?:ep2)` . };
+      sparql insert into graph iri(?:PR_GRAPH) { `iri(?:PR_IRI)` <http://purl.org/net/pingback/service> `iri(?:ep)` . };
     }
 
   {
@@ -2583,8 +2693,25 @@ create procedure fill_ods_sioc (in doall int := 0)
   ods_sioc_result ('The RDF data is reloaded');
   --checkpoint_interval (cpt);
   log_enable (1);
-  return;
-};
+}
+;
+
+create procedure fill_ods_services ()
+{
+  declare graph_iri varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('instance.create', 'instance.update', 'instance.delete', 'instance.join', 'instance.disjoin', 'instance.join_approve', 'instance.search', 'instance.get', 'instance.get.id', 'instance.freeze', 'instance.unfreeze' );
+  ods_object_services (graph_iri, 'instance', 'ODS instance services', svc_functions);
+
+  -- user
+  svc_functions := vector ('user.login', 'user.validate', 'user.logout', 'user.update', 'user.password_change', 'user.delete', 'user.enable', 'user.disable', 'user.get', 'user.info', 'user.info.webID', 'user.search');
+  ods_object_services (graph_iri, 'user', 'ODS user services', svc_functions);
+}
+;
 
 create procedure ods_sioc_version_reset (in ver any := '0')
 {
@@ -2974,7 +3101,8 @@ create trigger WA_USER_INFO_SIOC_I after insert on DB.DBA.WA_USER_INFO referenci
   if (N.WAUI_SITE_NAME is not null)
     DB.DBA.ODS_QUAD_URI_L (graph_iri, u_site_iri, dc_iri ('title'), N.WAUI_SITE_NAME);
   sioc_user_info (graph_iri, iri, null, N.WAUI_VISIBLE, N.WAUI_FIRST_NAME, N.WAUI_LAST_NAME, N.WAUI_TITLE, _u_full_name, _u_e_mail);
-};
+}
+;
 
 create trigger WA_USER_INFO_SIOC_U after update on DB.DBA.WA_USER_INFO referencing old as O, new as N
 {
@@ -3500,14 +3628,24 @@ create trigger WA_RELATED_APPS_SIOC_D after delete on DB.DBA.WA_RELATED_APPS ref
 };
 
 
+create procedure instance_sioc_check (
+  in _WA_IS_PUBLIC integer,
+  in _WA_TYPE varchar)
+{
+  if ((_WA_IS_PUBLIC > 0) or (_WA_TYPE in ('oDrive', 'oMail')))
+    return 1;
+
+  return 0;
+};
+
 create procedure instance_sioc_data (
-  in N_WAM_INST varchar,
-  in N_WAM_APP_TYPE varchar,
-  in N_WAM_USER integer,
-  in N_WAM_MEMBER_TYPE integer,
-  in N_WAM_IS_PUBLIC integer,
-  in N_WAM_DESCRIPTION varchar := null,
-  in N_WAM_LICENSE varchar := null)
+  in _WAM_INST varchar,
+  in _WAM_APP_TYPE varchar,
+  in _WAM_USER integer,
+  in _WAM_MEMBER_TYPE integer,
+  in _WAM_IS_PUBLIC integer,
+  in _WAM_DESCRIPTION varchar := null,
+  in _WAM_LICENSE varchar := null)
 {
   declare graph_iri, user_iri, role_iri, forum_iri, site_iri, svc_proc_name varchar;
   declare exit handler for sqlstate '*'
@@ -3516,28 +3654,37 @@ create procedure instance_sioc_data (
     return;
   };
 
-  if ((N_WAM_MEMBER_TYPE = 1) and ((N_WAM_IS_PUBLIC > 0) or (N_WAM_APP_TYPE = 'oDrive')))
+  if (not SIOC..instance_sioc_check (_WAM_IS_PUBLIC, _WAM_APP_TYPE))
+    return;
+
+  forum_iri := forum_iri (_WAM_APP_TYPE, _WAM_INST);
+  graph_iri := get_graph_new (_WAM_IS_PUBLIC, forum_iri);
+  if (_WAM_MEMBER_TYPE = 1)
+    {
+    if (not _WAM_IS_PUBLIC)
     {
+      SIOC..private_init ();
+      SIOC..private_graph_add (graph_iri);
+    }
+
     site_iri := get_graph ();
-    forum_iri := forum_iri (N_WAM_APP_TYPE, N_WAM_INST);
-    graph_iri := get_graph_new (null, N_WAM_IS_PUBLIC, forum_iri);
-    sioc_forum (graph_iri, site_iri, forum_iri, N_WAM_INST, N_WAM_APP_TYPE, N_WAM_DESCRIPTION);
-    if (not isnull (N_WAM_LICENSE))
-      cc_work_lic (graph_iri, forum_iri, N_WAM_LICENSE);
+    sioc_forum (graph_iri, site_iri, forum_iri, _WAM_INST, _WAM_APP_TYPE, _WAM_DESCRIPTION);
+    if (not isnull (_WAM_LICENSE))
+      cc_work_lic (graph_iri, forum_iri, _WAM_LICENSE);
 
       -- add services here
-    svc_proc_name := sprintf ('SIOC.DBA.ods_%s_services', DB.DBA.wa_type_to_app (N_WAM_APP_TYPE));
+    svc_proc_name := sprintf ('SIOC.DBA.ods_%s_services', DB.DBA.wa_type_to_app (_WAM_APP_TYPE));
     if (__proc_exists (svc_proc_name))
-	    call (svc_proc_name) (graph_iri, forum_iri, N_WAM_USER, N_WAM_INST);
+	    call (svc_proc_name) (graph_iri, forum_iri, _WAM_USER, _WAM_INST);
     }
+  if (not _WAM_IS_PUBLIC)
+    SIOC..private_user_add (graph_iri, _WAM_USER);
 
-  user_iri := user_iri (N_WAM_USER);
-  role_iri := role_iri_by_name (N_WAM_INST, N_WAM_USER);
+  user_iri := user_iri (_WAM_USER);
+  role_iri := role_iri_by_name (_WAM_INST, _WAM_USER);
 
-  do_social:
-  forum_iri := forum_iri (N_WAM_APP_TYPE, N_WAM_INST);
-  graph_iri := get_graph_new (null, N_WAM_IS_PUBLIC, forum_iri);
-  if (user_iri is not null and role_iri is not null and forum_iri is not null and ((N_WAM_IS_PUBLIC > 0) or (N_WAM_APP_TYPE = 'oDrive')))
+_social:
+  if ((user_iri is not null) and (role_iri is not null) and (forum_iri is not null))
   {
     DB.DBA.ODS_QUAD_URI (graph_iri, user_iri, sioc_iri ('has_function'), role_iri);
     DB.DBA.ODS_QUAD_URI (graph_iri, role_iri, sioc_iri ('function_of'), user_iri);
@@ -3548,33 +3695,26 @@ create procedure instance_sioc_data (
 	    DB.DBA.ODS_QUAD_URI (graph_iri, forum_iri, sioc_iri ('has_owner'), user_iri);
 	    DB.DBA.ODS_QUAD_URI (graph_iri, user_iri, sioc_iri ('owner_of'), forum_iri);
 	}
-    if (N_WAM_APP_TYPE = 'Community')
-	{
-	  declare person_iri any;
+    if (_WAM_APP_TYPE = 'Community')
+	    DB.DBA.ODS_QUAD_URI (graph_iri, group_iri (forum_iri), foaf_iri ('member'), person_iri (user_iri));
 
-	    person_iri := person_iri (user_iri);
-	    DB.DBA.ODS_QUAD_URI (graph_iri, group_iri (forum_iri), foaf_iri ('member'), person_iri);
-    }
-    if (N_WAM_APP_TYPE = 'AddressBook')
+    if (_WAM_APP_TYPE = 'AddressBook')
     {
-      N_WAM_APP_TYPE := 'SocialNetwork';
-      goto do_social;
+      _WAM_APP_TYPE := 'SocialNetwork';
+      forum_iri := forum_iri ('SocialNetwork', _WAM_INST);
+      graph_iri := get_graph_new (_WAM_IS_PUBLIC, forum_iri);
+      goto _social;
     }
   }
-};
-
--- DB.DBA.WA_MEMBER
-create trigger WA_MEMBER_SIOC_I after insert on DB.DBA.WA_MEMBER referencing new as N
-{
-  SIOC..instance_sioc_data (
-    N.WAM_INST,
-    N.WAM_APP_TYPE,
-    N.WAM_USER,
-    N.WAM_MEMBER_TYPE,
-    N.WAM_IS_PUBLIC);
-};
+}
+;
 
-create trigger WA_MEMBER_SIOC_D before delete on DB.DBA.WA_MEMBER referencing old as O
+create procedure instance_sioc_data_delete (
+  in _WAM_INST varchar,
+  in _WAM_APP_TYPE varchar,
+  in _WAM_USER integer,
+  in _WAM_MEMBER_TYPE integer,
+  in _WAM_IS_PUBLIC integer)
 {
   declare p_name varchar;
   declare user_iri, graph_iri, role_iri, forum_iri varchar;
@@ -3584,126 +3724,272 @@ create trigger WA_MEMBER_SIOC_D before delete on DB.DBA.WA_MEMBER referencing ol
     return;
   };
 
-  forum_iri := SIOC..forum_iri (O.WAM_APP_TYPE, O.WAM_INST);
-  graph_iri := SIOC..get_graph_new (null, O.WAM_IS_PUBLIC, forum_iri);
-  if ((O.WAM_MEMBER_TYPE = 1) and (O.WAM_IS_PUBLIC > 0)) -- instance drop
+  if (not SIOC..instance_sioc_check (_WAM_IS_PUBLIC, _WAM_APP_TYPE))
+    return;
+
+  forum_iri := SIOC..forum_iri (_WAM_APP_TYPE, _WAM_INST);
+  graph_iri := SIOC..get_graph_new (_WAM_IS_PUBLIC, forum_iri);
+  if (_WAM_MEMBER_TYPE = 1)
     {
+    if (not _WAM_IS_PUBLIC)
+      SIOC..private_graph_remove (graph_iri);
+
+    -- instance drop
     SIOC..delete_quad_s_or_o (graph_iri, forum_iri, forum_iri);
-    p_name := sprintf ('SIOC.DBA.clean_ods_%s_sioc2', DB.DBA.wa_type_to_app (O.WAM_APP_TYPE));
+    p_name := sprintf ('SIOC.DBA.clean_ods_%s_sioc', DB.DBA.wa_type_to_app (_WAM_APP_TYPE));
     if (__proc_exists (p_name))
-	    call (p_name) (O.WAM_INST, O.WAM_IS_PUBLIC);
+	    call (p_name) (_WAM_INST, _WAM_IS_PUBLIC);
+
+    SIOC..ods_object_services_dettach (graph_iri, forum_iri, 'instance');
+    SIOC..ods_object_services_dettach (graph_iri, forum_iri, DB.DBA.wa_type_to_app (_WAM_APP_TYPE));
     }
 
-  user_iri := user_iri (O.WAM_USER);
-  role_iri := role_iri_by_name (O.WAM_INST, O.WAM_USER);
+  if (not _WAM_IS_PUBLIC)
+    SIOC..private_user_remove (graph_iri, _WAM_USER);
+
+  user_iri := user_iri (_WAM_USER);
+  role_iri := role_iri_by_name (_WAM_INST, _WAM_USER);
   if (user_iri is not null and role_iri is not null)
-    {
     delete_quad_s_or_o (graph_iri, role_iri, role_iri);
-    }
-  if (O.WAM_APP_TYPE = 'Community')
-    {
-      declare person_iri any;
 
-    person_iri := person_iri (user_iri);
-      delete_quad_po (graph_iri, foaf_iri ('member'), person_iri);
-    }
-};
+  if (_WAM_APP_TYPE = 'Community')
+    delete_quad_po (graph_iri, foaf_iri ('member'), person_iri (user_iri));
+}
+;
 
--- DB.DBA.WA_INSTANCE
--- INSERT and delete are DONE IN THE WA_MEMBER WHEN INSERT THE OWNER
-create trigger WA_INSTANCE_SIOC_U before update on DB.DBA.WA_INSTANCE referencing old as O, new as N
+-- DB.DBA.WA_MEMBER
+create trigger WA_MEMBER_SIOC_I after insert on DB.DBA.WA_MEMBER referencing new as N
 {
-  declare p_name varchar;
-  declare o_graph_iri, n_graph_iri, site_iri, o_forum_iri, n_forum_iri, role_iri, o_role_iri varchar;
+  SIOC..instance_sioc_data (
+    N.WAM_INST,
+    N.WAM_APP_TYPE,
+    N.WAM_USER,
+    N.WAM_MEMBER_TYPE,
+    N.WAM_IS_PUBLIC);
+}
+;
+
+create trigger WA_MEMBER_SIOC_D before delete on DB.DBA.WA_MEMBER referencing old as O
+{
+  SIOC..instance_sioc_data_delete (
+    O.WAM_INST,
+    O.WAM_APP_TYPE,
+    O.WAM_USER,
+    O.WAM_MEMBER_TYPE,
+    O.WAM_IS_PUBLIC);
+}
+;
+
+-- DB.DBA.WA_INSTANCE
+-- INSERT and delete are DONE IN THE WA_MEMBER WHEN INSERT THE OWNER
+create trigger WA_INSTANCE_SIOC_U before update on DB.DBA.WA_INSTANCE referencing old as O, new as N
+{
+  declare p_name, wam_user varchar;
+  declare site_iri, o_graph_iri, n_graph_iri, o_forum_iri, n_forum_iri, n_role_iri, o_role_iri varchar;
   declare exit handler for sqlstate '*'
   {
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
 
-  if ((N.WAI_IS_PUBLIC = 0) and (O.WAI_IS_PUBLIC = 0))
-    return;
-
   n_forum_iri := SIOC..forum_iri_n (O.WAI_TYPE_NAME, O.WAI_NAME, N.WAI_NAME);
-  n_graph_iri := SIOC..get_graph_new (null, N.WAI_IS_PUBLIC, n_forum_iri);
+  n_graph_iri := SIOC..get_graph_new (N.WAI_IS_PUBLIC, n_forum_iri);
   o_forum_iri := SIOC..forum_iri (O.WAI_TYPE_NAME, O.WAI_NAME);
-  o_graph_iri := SIOC..get_graph_new (null, O.WAI_IS_PUBLIC, o_forum_iri);
-  if (N.WAI_TYPE_NAME = 'Community')
-    {
-    declare group_iri any;
+  o_graph_iri := SIOC..get_graph_new (O.WAI_IS_PUBLIC, o_forum_iri);
 
-    group_iri := group_iri (o_forum_iri);
-    delete_quad_sp (o_graph_iri, group_iri, foaf_iri ('name'));
-    }
+  -- no SIOC related changes
+  if ((n_graph_iri = o_graph_iri) and (n_forum_iri = o_forum_iri))
+    return;
 
-  -- new: private data
-  if (N.WAI_IS_PUBLIC = 0)
-    {
-    for select O as post
-          from DB.DBA.RDF_QUAD
-         where G = DB.DBA.RDF_IID_OF_QNAME (o_graph_iri)
-           and S = DB.DBA.RDF_IID_OF_QNAME (o_forum_iri)
-           and P = DB.DBA.RDF_IID_OF_QNAME (sioc_iri ('container_of')) do
-	  {
-	    SIOC..delete_quad_s_or_o (o_graph_iri, post, post);
-	  }
-    SIOC..delete_quad_s_or_o (o_graph_iri, o_forum_iri, o_forum_iri);
-    p_name := sprintf ('sioc.DBA.clean_ods_%s_sioc', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
-    if (__proc_exists (p_name))
-	    call (p_name) (O.WAI_NAME, O.WAI_IS_PUBLIC);
+  -- delete old
+  wam_user := (select WAM_USER from DB.DBA.WA_MEMBER where WAM_INST = O.WAI_NAME and WAM_MEMBER_TYPE = 1);
+  SIOC..instance_sioc_data_delete (
+      O.WAI_NAME,
+      O.WAI_TYPE_NAME,
+      wam_user,
+      1,
+      O.WAI_IS_PUBLIC);
+
+  if (not SIOC..instance_sioc_check (N.WAI_IS_PUBLIC, N.WAI_TYPE_NAME))
     return;
-    }
 
-  -- old: private data - must be created forum
-  if (O.WAI_IS_PUBLIC = 0)
+  -- create new
+  SIOC..instance_sioc_data (
+    N.WAI_NAME,
+    N.WAI_TYPE_NAME,
+    wam_user,
+    1,
+    N.WAI_IS_PUBLIC,
+    N.WAI_DESCRIPTION,
+    N.WAI_LICENSE);
+
+  delete_quad_sp (o_graph_iri, o_forum_iri, sioc_iri ('id'));
+  delete_quad_sp (o_graph_iri, o_forum_iri, sioc_iri ('link'));
+  DB.DBA.ODS_QUAD_URI_L (n_graph_iri, n_forum_iri, sioc_iri ('id'), N.WAI_NAME);
+  DB.DBA.ODS_QUAD_URI (n_graph_iri, n_forum_iri, sioc_iri ('link'), n_forum_iri);
+  update_quad_g_s_o (o_graph_iri, n_graph_iri, o_forum_iri, n_forum_iri);
+
+  delete_quad_sp (o_graph_iri, o_forum_iri, cc_iri ('license'));
+  cc_work_lic (n_graph_iri, n_forum_iri, N.WAI_LICENSE);
+
+  if (o_graph_iri <> n_graph_iri)
   {
-    SIOC..instance_sioc_data (
-      N.WAI_NAME,
-      N.WAI_TYPE_NAME,
-      (select WAM_USER from DB.DBA.WA_MEMBER where WAM_INST = O.WAI_NAME and WAM_MEMBER_TYPE = 1),
-      1,
-      N.WAI_IS_PUBLIC,
-      N.WAI_DESCRIPTION,
-      N.WAI_LICENSE);
-    }
-  else if (N.WAI_IS_PUBLIC <> O.WAI_IS_PUBLIC)
+    for select distinct WAM_MEMBER_TYPE as tp from DB.DBA.WA_MEMBER where WAM_INST = O.WAI_NAME and SIOC..instance_sioc_check (WAM_IS_PUBLIC, WAM_APP_TYPE) = 1 do
     {
-    delete_quad_sp (o_graph_iri, o_forum_iri, sioc_iri ('id'));
-    delete_quad_sp (o_graph_iri, o_forum_iri, sioc_iri ('link'));
-    update_quad_g_s_o (o_graph_iri, n_graph_iri, o_forum_iri, n_forum_iri);
-    delete_quad_sp (o_graph_iri, o_forum_iri, cc_iri ('license'));
-    cc_work_lic (n_graph_iri, n_forum_iri, N.WAI_LICENSE);
+      declare _role varchar;
 
-    for select distinct WAM_MEMBER_TYPE as tp from DB.DBA.WA_MEMBER where WAM_INST = O.WAI_NAME and ((WAM_IS_PUBLIC > 0) or (WAM_APP_TYPE = 'oDrive')) do
-	{
-	  declare _role varchar;
+      _role := (select WMT_NAME from DB.DBA.WA_MEMBER_TYPE where WMT_APP = O.WAI_NAME and WMT_ID = tp);
+      if (_role is null and tp = 1)
+        _role := 'owner';
 
-	    _role := (select WMT_NAME from DB.DBA.WA_MEMBER_TYPE where WMT_APP = O.WAI_NAME and WMT_ID = tp);
-	  if (_role is null and tp = 1)
-	    _role := 'owner';
+      n_role_iri := n_forum_iri || '#' || _role;
+      o_role_iri := o_forum_iri || '#' || _role;
+      update_quad_g_s_o (o_graph_iri, n_graph_iri, o_role_iri, n_role_iri);
+    }
+    }
 
-	    role_iri := n_forum_iri || '#' || _role;
-	    o_role_iri := o_forum_iri || '#' || _role;
-	    update_quad_g_s_o (o_graph_iri, n_graph_iri, o_role_iri, role_iri);
-	  }
-    DB.DBA.ODS_QUAD_URI_L (n_graph_iri, n_forum_iri, sioc_iri ('id'), N.WAI_NAME);
-    DB.DBA.ODS_QUAD_URI (n_graph_iri, n_forum_iri, sioc_iri ('link'), n_forum_iri);
-	}
+  -- update instanse item's data
+  p_name := sprintf ('sioc.DBA.clean_ods_%s_sioc', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
+  if (__proc_exists (p_name))
+    call (p_name) (O.WAI_NAME, O.WAI_IS_PUBLIC);
+  p_name := sprintf ('sioc.DBA.fill_ods_%s_sioc', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
+  if (__proc_exists (p_name))
+    call (p_name) (n_graph_iri, site_iri, N.WAI_NAME);
+  p_name := sprintf ('sioc.DBA.fill_ods_%s_sioc2', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
+  if (__proc_exists (p_name))
+    call (p_name) (N.WAI_NAME, N.WAI_IS_PUBLIC);
+}
+;
+
+--
+-- Private graphs
+--
+create procedure SIOC..private_graph ()
+{
+  return 'http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs';
+}
+;
+
+create procedure SIOC..private_init ()
+{
+  -- create private graph group (if not exists)
+  DB.DBA.RDF_GRAPH_GROUP_CREATE (SIOC..private_graph (), 1);
+
+  -- set default rights for private graphs
+  DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('nobody', 0, 1);
+  DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('dba', 511, 1);
+}
+;
+
+create procedure SIOC..private_graph_add (
+  inout graph_iri varchar)
+{
+  DB.DBA.RDF_GRAPH_GROUP_INS (SIOC..private_graph (), graph_iri);
+}
+;
+
+create procedure SIOC..private_graph_remove (
+  inout graph_iri varchar)
+{
+  DB.DBA.RDF_GRAPH_GROUP_DEL (SIOC..private_graph (), graph_iri);
+}
+;
+
+create procedure SIOC..private_user_add (
+  in graph_iri varchar,
+  in uid any,
+  in rights integer := 1)
+{
+  declare exit handler for sqlstate '*' {return 0;};
+
+  if (isinteger (uid))
+    uid := (select U_NAME from DB.DBA.SYS_USERS where U_ID = uid);
+  DB.DBA.RDF_GRAPH_USER_PERMS_SET (graph_iri, uid, rights);
+}
+;
+
+create procedure SIOC..private_user_remove (
+  in graph_iri varchar,
+  in uid any)
+{
+  declare exit handler for sqlstate '*' {return 0;};
+
+  if (isinteger (uid))
+    uid := (select U_NAME from DB.DBA.SYS_USERS where U_ID = uid);
+  DB.DBA.RDF_GRAPH_USER_PERMS_DEL (graph_iri, uid);
+}
+;
+
+--
+-- Private WebID rights
+--
+create procedure SIOC..private_acl_insert (
+  inout graph_iri varchar,
+  inout acl any)
+{
+  declare uid, rights any;
+  declare N, aclArray any;
 
-  -- refresh be created forum
-  if (N.WAI_IS_PUBLIC <> O.WAI_IS_PUBLIC)
+  aclArray := deserialize (acl);
+  for (N := 0; N < length (aclArray); N := N + 1)
   {
-    p_name := sprintf ('sioc.DBA.clean_ods_%s_sioc', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
-    if (__proc_exists (p_name))
-	    call (p_name) (O.WAI_NAME, O.WAI_IS_PUBLIC);
-    p_name := sprintf ('sioc.DBA.fill_ods_%s_sioc', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
-    if (__proc_exists (p_name))
-	    call (p_name) (n_graph_iri, site_iri, N.WAI_NAME);
-    p_name := sprintf ('sioc.DBA.fill_ods_%s_sioc2', DB.DBA.wa_type_to_app (N.WAI_TYPE_NAME));
-    if (__proc_exists (p_name))
-	    call (p_name) (N.WAI_NAME, N.WAI_IS_PUBLIC);
+    uid := null;
+    if (aclArray[N][2] = 'person')
+    {
+      uid := DB.DBA.FOAF_WEBID_USER (aclArray[N][1], 1);
     }
-};
+    else if (aclArray[N][2] = 'group')
+    {
+      ;
+    }
+    else if (aclArray[N][2] = 'public')
+    {
+      uid := 'nobody';
+    }
+    if (not isnull (uid))
+    {
+      rights := 0;
+      -- read
+      if (aclArray[N][3])
+        rights := rights + 1;
+      -- write
+      if (aclArray[N][4])
+        rights := rights + 2;
+
+      SIOC..private_user_add (graph_iri, uid, rights);
+    }
+  }
+}
+;
+
+create procedure SIOC..private_acl_delete (
+  inout graph_iri varchar,
+  inout acl any)
+{
+  declare uid any;
+  declare N, aclArray any;
+
+  aclArray := deserialize (acl);
+  for (N := 0; N < length (aclArray); N := N + 1)
+  {
+    uid := null;
+    if (aclArray[N][2] = 'person')
+    {
+      uid := DB.DBA.FOAF_WEBID_USER (aclArray[N][1]);
+    }
+    else if (aclArray[N][2] = 'group')
+    {
+      ;
+    }
+    else if (aclArray[N][2] = 'public')
+    {
+      uid := 'nobody';
+    }
+    if (not isnull (uid))
+      SIOC..private_user_remove (graph_iri, uid);
+  }
+}
+;
 
 --
 -- ACL
@@ -3812,96 +4098,33 @@ create procedure SIOC..acl_delete (
 }
 ;
 
-create procedure SIOC..acl_webID ()
+create procedure SIOC..acl_webid ()
 {
-  declare retIRI varchar;
-  declare foafIRI, foafGraph, loadIRI, localIRI any;
-  declare S, V, info, st, msg, data, meta any;
+  declare webid varchar;
+  declare cert, dummy, vtype any;
 
   if (not is_https_ctx ())
   {
-    retIRI := null;
+    webid := null;
     goto _exit;
   }
 
-  retIRI := connection_get ('vspx_vebid');
-  if (not isnull (retIRI))
+  webid := connection_get ('vspx_vebid');
+  if (not isnull (webid))
   {
-    if (retIRI = '')
-      retIRI := null;
+    if (webid = '')
+      webid := null;
     goto _exit;
   }
 
-  foafIRI := trim (get_certificate_info (7, null, null, null, '2.5.29.17'));
-  V := regexp_replace (foafIRI, ',[ ]*', ',', 1, null);
-  V := split_and_decode (V, 0, '\0\0,:');
-  if (V is null)
-    V := vector ();
-  foafIRI := get_keyword ('URI', V);
-  if (isnull (foafIRI))
-  {
-    retIRI := DB.DBA.FOAF_SSL_WEBFINGER ();
-    if (not isnull (retIRI))
-      goto _set;
-    retIRI := ODS.DBA.FINGERPOINT_WEBID_GET ();
-    goto _set;
-  }
-
-  foafGraph := 'http://local.virt/FOAF/' || cast (rnd (1000) as varchar);
-  localIRI := foafIRI;
-  V := rfc1808_parse_uri (localIRI);
-  if (cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DynamicLocal') = '1' and V[1] = registry_get ('URIQADefaultHost'))
-  {
-    V [0] := 'local';
-    V [1] := '';
-    localIRI := db.dba.vspx_uri_compose (V);
-  }
-  V := rfc1808_parse_uri (foafIRI);
-  V[5] := '';
-  loadIRI := DB.DBA.vspx_uri_compose (V);
-
-  S := sprintf ('sparql load <%s> into graph <%s>', loadIRI, foafGraph);
-  st := '00000';
-  exec (S, st, msg, vector (), 0);
-  if (st = '00000')
-  {
-  S := sprintf (' sparql define input:storage "" ' ||
-                ' prefix cert: <http://www.w3.org/ns/auth/cert#> ' ||
-                ' prefix rsa: <http://www.w3.org/ns/auth/rsa#> ' ||
-                ' select (str (bif:coalesce (?exp_val, ?exp))) ' ||
-                '        (str (bif:coalesce (?mod_val, ?mod))) ' ||
-                '   from <%s> ' ||
-                '  where { ' ||
-                '          ?id cert:identity <%s> ; ' ||
-                '              rsa:public_exponent ?exp ; ' ||
-                '              rsa:modulus ?mod . ' ||
-                '          optional { ?exp cert:decimal ?exp_val . ' ||
-                '          ?mod cert:hex ?mod_val . } ' ||
-                '        }',
-                foafGraph,
-                localIRI);
-  exec (S, st, msg, vector (), 0, meta, data);
-    if (st = '00000')
-    {
-      info := get_certificate_info (9);
-  foreach (any _row in data) do
-  {
-    if (_row[0] = cast (info[1] as varchar) and lower (regexp_replace (_row[1], '[^A-Z0-9a-f]', '', 1, null)) = bin2hex (info[2]))
-    {
-          retIRI := foafIRI;
-          goto _break;
-        }
-      }
-    }
-  }
-_break:;
-  exec (sprintf ('SPARQL clear graph <%s>', foafGraph), st, msg, vector (), 0);
-
-_set:;
-  connection_set ('vspx_vebid', coalesce (retIRI, ''));
+  set_user_id ('dba');
+  cert := client_attr ('client_certificate');
+  dummy := null;
+  DB.DBA.WEBID_AUTH_GEN_2 (cert, 0, null, 1, 0, webid, dummy, 0, vtype);
+  connection_set ('vspx_vebid', coalesce (webid, ''));
 
 _exit:;
-  return retIRI;
+  return webid;
 }
 ;
 
@@ -4125,6 +4348,7 @@ create procedure SIOC..acl_ping2 (
 ;
 
 create procedure SIOC..wa_instance_acl_insert (
+  inout is_public integer,
   inout type_name varchar,
   inout name varchar,
   inout acl any)
@@ -4139,10 +4363,14 @@ create procedure SIOC..wa_instance_acl_insert (
   graph_iri := SIOC..acl_graph (type_name, name);
 
   SIOC..acl_insert (graph_iri, iri, acl);
+
+  if (not is_public and SIOC..instance_sioc_check (is_public, type_name))
+    SIOC..private_acl_insert (SIOC..get_graph_new (is_public, iri), acl);
 }
 ;
 
 create procedure SIOC..wa_instance_acl_delete (
+  inout is_public integer,
   inout type_name varchar,
   inout name varchar,
   inout acl any)
@@ -4158,29 +4386,32 @@ create procedure SIOC..wa_instance_acl_delete (
   graph_iri := SIOC..acl_graph (type_name, name);
 
   SIOC..acl_delete (graph_iri, iri, acl);
+
+  if (not is_public and SIOC..instance_sioc_check (is_public, type_name))
+    SIOC..private_acl_delete (SIOC..get_graph_new (is_public, iri), acl);
 }
 ;
 
 create trigger WA_INSTANCE_ACL_I after insert on DB.DBA.WA_INSTANCE order 100 referencing new as N
 {
   if (coalesce (N.WAI_ACL, '') <> '')
-    SIOC..wa_instance_acl_insert (N.WAI_TYPE_NAME, N.WAI_NAME, N.WAI_ACL);
+    SIOC..wa_instance_acl_insert (N.WAI_IS_PUBLIC, N.WAI_TYPE_NAME, N.WAI_NAME, N.WAI_ACL);
 }
 ;
 
 create trigger WA_INSTANCE_ACL_U after update on DB.DBA.WA_INSTANCE order 100 referencing old as O, new as N
 {
   if ((coalesce (O.WAI_ACL, '') <> '') and (coalesce (O.WAI_ACL, '') <> coalesce (N.WAI_ACL, '')))
-    SIOC..wa_instance_acl_delete (O.WAI_TYPE_NAME, O.WAI_NAME, O.WAI_ACL);
+    SIOC..wa_instance_acl_delete (O.WAI_IS_PUBLIC, O.WAI_TYPE_NAME, O.WAI_NAME, O.WAI_ACL);
   if ((coalesce (N.WAI_ACL, '') <> '') and (coalesce (O.WAI_ACL, '') <> coalesce (N.WAI_ACL, '')))
-    SIOC..wa_instance_acl_insert (N.WAI_TYPE_NAME, N.WAI_NAME, N.WAI_ACL);
+    SIOC..wa_instance_acl_insert (N.WAI_IS_PUBLIC, N.WAI_TYPE_NAME, N.WAI_NAME, N.WAI_ACL);
 }
 ;
 
 create trigger WA_INSTANCE_ACL_D before delete on DB.DBA.WA_INSTANCE order 100 referencing old as O
 {
   if (coalesce (O.WAI_ACL, '') <> '')
-    SIOC..wa_instance_acl_delete (O.WAI_TYPE_NAME, O.WAI_NAME, O.WAI_ACL);
+    SIOC..wa_instance_acl_delete (O.WAI_IS_PUBLIC, O.WAI_TYPE_NAME, O.WAI_NAME, O.WAI_ACL);
 }
 ;
 
@@ -4801,7 +5032,8 @@ create procedure std_pref_declare ()
          ' prefix bio: <http://vocab.org/bio/0.1/> \n' ||
 	 ' prefix cert: <' || cert_iri ('') || '> \n' ||
 	 ' prefix rsa: <' || rsa_iri ('') || '> \n' ||
-	 ' prefix gr: <' || offer_iri ('') || '> \n'
+	 ' prefix gr: <' || offer_iri ('') || '> \n' ||
+	 ' prefix svc: <http://rdfs.org/sioc/services#> \n'
 	 ;
 };
 
@@ -4834,35 +5066,13 @@ create procedure foaf_check_friend (in iri varchar, in agent varchar)
 }
 ;
 
-create procedure foaf_check_ssl_int (in iri varchar, out graph varchar)
-{
-  declare stat, msg, meta, data, info, qr, hf, gr any;
-  declare agent varchar;
-  declare rc int;
-  declare groups_iri, arr any;
-
-  graph := null;
-  rc := 0;
-  declare exit handler for sqlstate '*'
+create procedure foaf_check_ssl (in iri varchar)
     {
-      rollback work;
-      return 0;
-  };
+  declare arr, groups_iri, msg, webid varchar;
 
   set_user_id ('dba');
-  info := get_certificate_info (9);
-  agent := ODS.ODS_API.SSL_WEBID_GET (); 
-  if (agent is null)
-    agent := ODS..FINGERPOINT_WEBID_GET ();
-
---  dbg_obj_print (info, agent);
-  if (not isarray (info) or agent is null)
-    return 0;
-
-  -- old check
-  -- if (iri is not null and not foaf_check_friend (iri, agent))
-  --  return 0;
-
+  if (iri is not null)
+  {
   -- ACL check
   arr := sprintf_inverse (iri, 'http://%s/dataspace/person/%s#this', 1);
   if (length (arr) <> 2)
@@ -4871,45 +5081,15 @@ create procedure foaf_check_ssl_int (in iri varchar, out graph varchar)
   groups_iri := sprintf ('http://%s/dataspace/private/%s', arr[0], arr[1]);
   if (SIOC..acl_check (SIOC..acl_clean_iri (iri) || '/webaccess', groups_iri, vector (iri)) = '')
     return 0;
-
-  -- agent := fix_uri (agent);
-  hf := rfc1808_parse_uri (agent);
-  hf[5] := '';
-  gr := DB.DBA.vspx_uri_compose (hf);
-  graph := uuid ();
-  qr := sprintf ('sparql load <%S> into graph <%S>', gr, graph);
-  stat := '00000';
-  exec (qr, stat, msg);
+  }
+  webid := SIOC..acl_webid ();
   commit work;
-  qr := DB.DBA.FOAF_SSL_QR (graph, agent);      
-  stat := '00000';
---  dbg_printf ('%s', qr);
-  exec (qr, stat, msg, vector (), 0, meta, data);
---  dbg_obj_print (data);
-  if (stat = '00000' and length (data))
-    {
-      foreach (any _row in data) do
-	{
-	  if (_row[0] = cast (info[1] as varchar) and DB.DBA.FOAF_MOD (_row[1]) = bin2hex (info[2]))
-    rc := 1;
-	}
-    }
-  return rc;
+  if (isnull (webid))
+    return 0;
+  return 1;
 }
 ;
 
-create procedure foaf_check_ssl (in iri varchar)
-{
-  declare rc int;
-  declare graph, stat, msg varchar;
-
-  set_user_id ('dba');
-  rc := foaf_check_ssl_int (iri, graph);
-  exec (sprintf ('sparql clear graph <%S>', graph), stat, msg);
-  commit work;
-  return rc;
-}
-;
 
 create procedure compose_foaf (in u_name varchar, in fmt varchar := 'n3', in p int := 0)
 {
@@ -5020,6 +5200,9 @@ create procedure compose_foaf (in u_name varchar, in fmt varchar := 'n3', in p i
 	    ?org dc:title ?orgtit .
 	    ?person foaf:depiction ?depiction .
 	    ?person foaf:homepage ?homepage .
+	    ?person svc:has_services ?svc .
+	    ?svc svc:services_of ?person .
+	    ?svc rdf:type svc:Services .
 	  }
 	  WHERE
 	  {
@@ -5055,6 +5238,7 @@ create procedure compose_foaf (in u_name varchar, in fmt varchar := 'n3', in p i
 	      optional { ?org foaf:homepage ?wphome . ?org a foaf:Organization ; dc:title ?orgtit . } .
 	      optional { ?person foaf:depiction ?depiction } .
 	      optional { ?person foaf:homepage ?homepage } .
+        optional { ?person svc:has_services ?svc } .
 	      }
 	    }
 	  }',
@@ -5152,14 +5336,15 @@ create procedure compose_foaf (in u_name varchar, in fmt varchar := 'n3', in p i
 	    ?interest rdfs:label ?interest_label .
 	    ?person foaf:topic_interest ?topic_interest .
 	    ?topic_interest rdfs:label ?topic_interest_label .
-	    ?idn cert:identity ?person .
-	    ?idn rdf:type rsa:RSAPublicKey .
-	    ?idn rsa:public_exponent ?exp .
-	    ?idn rsa:modulus ?mod .
+	    ?person cert:key ?key .
+	    ?key rdf:type cert:RSAPublicKey .
+	    ?key cert:exponent ?exp .
+	    ?key cert:modulus ?mod .
 	    ?event_iri rdf:type ?bioEvent .
 	    ?event_iri bio:date ?bioDate .
 	    ?event_iri bio:place ?bioPlace .
 	    ?person pingback:to ?pb .
+	    ?person pingback:service ?psvc .
 	    ?person foaf:made `iri (bif:sprintf (''http://%%{WSHost}s/ods/describe?uri=%%U'', ?mbox))` .
 	  }
 	  WHERE
@@ -5174,9 +5359,10 @@ create procedure compose_foaf (in u_name varchar, in fmt varchar := 'n3', in p i
 	      optional { ?interest rdfs:label ?interest_label  } .
 	      optional { ?person foaf:topic_interest ?topic_interest } .
 	      optional { ?topic_interest rdfs:label ?topic_interest_label  } .
-	        optional { ?idn cert:identity ?person ; rsa:public_exponent ?exp ; rsa:modulus ?mod . } .
+	        optional { ?person cert:key ?key . ?key cert:exponent ?exp ; cert:modulus ?mod . } .
 	      optional { ?person bio:event ?event_iri . ?event_iri rdf:type ?bioEvent . ?event_iri bio:date ?bioDate . ?event_iri bio:place ?bioPlace } .
 		optional { ?person pingback:to ?pb } .
+		optional { ?person pingback:service ?psvc } .
 	      }
 	    }
 	  }', graph, iri_pref, u_name);
@@ -5418,6 +5604,7 @@ execute_qr:
 }
 ;
 
+-- XXX: obsolete : see ods_obj_describe
 create procedure ods_sioc_obj_describe (in u_name varchar, in fmt varchar := 'n3', in p int := 0)
 {
   declare iri, graph, ses any;
@@ -5427,7 +5614,7 @@ create procedure ods_sioc_obj_describe (in u_name varchar, in fmt varchar := 'n3
 
 --  dbg_obj_print (u_name, fmt);
   set http_charset='utf-8';
-  if (fmt = 'text/rdf+n3')
+  if (fmt = 'text/rdf+n3' or fmt = 'text/n3')
     fmt := 'n3';
   else if (fmt = 'application/rdf+xml')
     fmt := 'rdf';
@@ -5469,6 +5656,7 @@ create procedure ods_sioc_obj_describe (in u_name varchar, in fmt varchar := 'n3
 }
 ;
 
+-- XXX: obsolete : see ods_obj_describe
 create procedure ods_sioc_print_rset (in iri any, inout rset any, inout ses any, inout fmt any, inout maybe_more int)
 {
   declare triples any;
@@ -5522,6 +5710,8 @@ create procedure ods_sioc_print_rset (in iri any, inout rset any, inout ses any,
     }
 };
 
+
+-- XXX: obsolete : see ods_obj_describe
 create procedure ods_sioc_container_obj_describe (in iri varchar, in fmt varchar := 'n3', in p int := 0)
 {
   declare graph, ses any;
@@ -5530,10 +5720,9 @@ create procedure ods_sioc_container_obj_describe (in iri varchar, in fmt varchar
   declare triples any;
   declare lim, offs, maybe_more int;
 
---  dbg_obj_print (u_name, fmt);
   set http_charset='utf-8';
   maybe_more := 1;
-  if (fmt = 'text/rdf+n3')
+  if (fmt = 'text/rdf+n3' or fmt = 'text/n3')
     fmt := 'n3';
   else if (fmt = 'application/rdf+xml')
     fmt := 'rdf';
@@ -5636,6 +5825,127 @@ create procedure ods_sioc_container_obj_describe (in iri varchar, in fmt varchar
 }
 ;
 
+create procedure ods_dict_merge (inout dict any, inout rset_dict any)
+{
+  declare triples any;
+  triples := dict_list_keys (rset_dict, 1);
+  foreach (any tr in triples) do
+    {
+      dict_put (dict, tr, 0);
+    }
+}
+;
+
+create procedure ods_obj_describe (in iri varchar, in fmt varchar := 'n3', in p int := 0)
+{
+  declare graph, ses any;
+  declare qrs, stat, msg, accept, pref any;
+  declare rset, metas any;
+  declare triples, path, dict any;
+  declare lim, offs, maybe_more int;
+  declare ss, sa_dict any;
+
+  path := http_path ();
+  dict := dict_new ();
+--  dbg_obj_print_vars (iri, fmt, path, http_header_get ());
+  set http_charset='utf-8';
+  maybe_more := 1;
+
+  if (path like '%.rdf')
+    accept := 'application/rdf+xml';
+  if (path like '%.nt')
+     accept := 'text/n3';
+  if (path like '%.n3')
+     accept := 'text/rdf+n3';
+  if (path like '%.ttl')
+     accept := 'text/rdf+ttl';
+  if (path like '%.txt')
+     accept := 'text/plain';
+  if (path like '%.json')
+     accept := 'application/json';
+  if (path like '%.jmd')
+     accept := 'application/microdata+json';
+  if (path like '%.jld')
+     accept := 'application/x-json+ld';
+  if (path like '%.turtle')
+     accept := 'text/turtle';
+
+
+  graph := fix_graph (get_graph ());
+  iri := fix_uri (iri);
+  ses := string_output ();
+  lim := 20;
+  offs := coalesce (p, 0) * lim;
+  qrs := vector (0,0,0);
+  pref := 'sparql prefix sioc: <http://rdfs.org/sioc/ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dct: <http://purl.org/dc/terms/> prefix atom: <http://atomowl.org/ontologies/atomrdf#> ';
+  if (offs = 0)
+    {
+      qrs[0] := sprintf ('CONSTRUCT { <%s> ?p ?o . } '||
+      ' FROM <%s> WHERE { <%s> ?p ?o . filter (?p != sioc:container_of && ?p != atom:entry && ?p != atom:contains) }',
+      iri, graph, iri);
+      qrs[1] := sprintf ('CONSTRUCT { ?s ?p <%s> . } '||
+      ' FROM <%s> WHERE { ?s ?p <%s> . filter (?p != sioc:has_container && ?p != atom:source ) }',
+      iri, graph, iri);
+    }
+  qrs[2] := sprintf (
+    'CONSTRUCT { <%s> sioc:container_of ?o . ?o sioc:has_container <%s> . ?o a ?t . ?o rdfs:label ?l . ?o rdfs:seeAlso ?sa . } '||
+    ' FROM <%s> WHERE { <%s> sioc:container_of ?o . optional { ?o a ?t } . optional { ?o rdfs:label ?l } . '||
+    ' optional { ?o rdfs:seeAlso ?sa } . optional { ?o dct:created ?cr } } order by desc (?cr) LIMIT %d OFFSET %d',
+    iri, iri, graph, iri, lim, offs);
+
+  set_user_id ('dba');
+
+  metas := null;
+  foreach (any qr in qrs) do
+    {
+      if (qr <> 0)
+    	{
+    	  qr := pref || qr;
+        -- dbg_printf ('%s', qr);
+    	  stat := '00000';
+    	  exec (qr, stat, msg, vector (), 0, metas, rset);
+    	  if (stat <> '00000')
+    	    signal (stat, msg);
+	  ods_dict_merge (dict, rset[0][0]);
+    	}
+    }
+  if (p > 0)
+    {
+      ss := string_output ();
+      rdf_head (ss);
+      http (sprintf ('<rdf:Description rdf:about="%s/page/%d">', iri, coalesce (p, 0)), ss);
+      http (sprintf ('<foaf:primaryTopic xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="%s" />', iri), ss);
+      http ('</rdf:Description>', ss);
+      rdf_tail (ss);
+      ss := string_output_string (ss);
+      sa_dict := DB.DBA.RDF_RDFXML_TO_DICT (ss, iri, graph);
+      ods_dict_merge (dict, sa_dict);
+    }
+  if (maybe_more)
+    {
+      ss := string_output ();
+      rdf_head (ss);
+      http (sprintf ('<rdf:Description rdf:about="%s">', iri), ss);
+      http (sprintf ('<rdfs:seeAlso xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" rdf:resource="%s/page/%d" />', iri, coalesce (p, 0) + 1), ss);
+      http ('</rdf:Description>', ss);
+      http (sprintf ('<rdf:Description rdf:about="%s/page/%d">', iri, coalesce (p, 0) + 1), ss);
+      http (sprintf ('<rdfs:label>page %d</rdfs:label>', coalesce (p, 0) + 1), ss);
+      http ('</rdf:Description>', ss);
+
+      rdf_tail (ss);
+      ss := string_output_string (ss);
+      sa_dict := DB.DBA.RDF_RDFXML_TO_DICT (ss, iri, graph);
+      ods_dict_merge (dict, sa_dict);
+    }
+  if (metas is not null)
+    {
+      rset := vector (vector (dict));
+      DB.DBA.SPARQL_RESULTS_WRITE (ses, metas, rset, accept, 1);
+    }
+  return ses;
+}
+;
+
 create procedure sioc_compose_xml (in u_name varchar, in wai_name varchar, in inst_type varchar, in postid varchar := null,
 				   in p int := null, in fmt varchar := 'RDF/XML', in kind int := 0)
 {
@@ -5890,11 +6200,9 @@ create procedure sioc_compose_xml (in u_name varchar, in wai_name varchar, in in
 			?member rdfs:seeAlso ?see_also .
 			?forum sioc:has_space ?host .
 			?forum sioc:type ?type .
-			?forum svc:has_service ?svc .
-			?svc svc:service_endpoint ?endp .
-			?svc svc:service_protocol ?proto .
-			?svc svc:service_of ?forum .
-			?svc rdf:type svc:Service .
+                 			   ?forum svc:has_services ?svc .
+                 			   ?svc svc:services_of ?forum .
+                 			   ?svc rdf:type svc:Services .
                  		   }
                  		   where
             	{
@@ -5909,11 +6217,7 @@ create procedure sioc_compose_xml (in u_name varchar, in wai_name varchar, in in
 		    sioc:scope_of ?role .
 		    ?role sioc:function_of ?member .
 		    ?member rdfs:seeAlso ?see_also .
-   		    optional {
-  		      ?forum svc:has_service ?svc .
-  		      ?svc svc:service_endpoint ?endp .
-  		      ?svc svc:service_protocol ?proto .
-		    }
+                           optional { ?forum svc:has_services ?svc . }
 		  }
                  		   }', wai_name, graph, wai_name);
       rset := null;
@@ -6150,10 +6454,134 @@ ret:
 };
 
 
+-----------------------------------------------------------------------------------------
+--
+create procedure SIOC..rdf_links_header (in iri any)
+{
+  declare links, desc_link varchar;
+
+  if (iri is null)
+    return;
+
+  desc_link := sprintf ('http://%{WSHost}s/sparql?default-graph-uri=%U&query=%U', SIOC..get_graph (), sprintf ('DESCRIBE <%s>', iri));
+
+  links := 'Link: ' ||
+    sprintf ('<%s&output=application%%2Frdf%%2Bxml>; rel="alternate"; type="application/rdf+xml"; title="Structured Descriptor Document (RDF/XML format)",', desc_link);
+  links := links ||
+    sprintf ('<%s&output=text%%2Fn3>; rel="alternate"; type="text/n3"; title="Structured Descriptor Document (N3/Turtle format)",', desc_link);
+  links := links ||
+    sprintf ('<%s&output=application%%2Frdf%%2Bjson>; rel="alternate"; type="application/rdf+json"; title="Structured Descriptor Document (RDF/JSON format)",', desc_link);
+  links := links ||
+    sprintf ('<%s&output=application%%2Fatom%%2Bxml>; rel="alternate"; type="application/atom+xml"; title="Structured Descriptor Document (OData/Atom format)",', desc_link);
+  links := links ||
+    sprintf ('<%s&output=application%%2Fodata%%2Bjson>; rel="alternate"; type="application/odata+json"; title="Structured Descriptor Document (OData/JSON format)",', desc_link);
+  links := links ||
+    sprintf ('<%s&output=text%%2Fcxml>; rel="alternate"; type="text/cxml"; title="Structured Descriptor Document (CXML format)",', desc_link);
+  links := links ||
+    sprintf ('<%s&output=text%%2Fcsv>; rel="alternate"; type="text/csv"; title="Structured Descriptor Document (CSV format)",', desc_link);
+  links := links ||
+    sprintf ('<%s>; rel="http://xmlns.com/foaf/0.1/primaryTopic",', iri);
+  links := links ||
+    sprintf ('<%s>; rev="describedby"\r\n', iri);
+
+  http_header (http_header_get () || links);
+}
+;
+
+-----------------------------------------------------------------------------------------
+--
+create procedure SIOC..rdf_links_head_internal (in iri any)
+{
+  declare links, blank, desc_link varchar;
+
+  if (iri is null)
+    return '';
+
+  blank := repeat (' ', 4);
+  desc_link := sprintf ('http://%{WSHost}s/sparql?default-graph-uri=%U&query=%U', SIOC..get_graph (), sprintf ('DESCRIBE <%s>', iri));
+
+  links := '\n' ||
+    blank ||
+    sprintf ('<link href="%V&output=application%%2Frdf%%2Bxml" rel="alternate" type="application/rdf+xml" title="Structured Descriptor Document (RDF/XML format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V&output=text%%2Fn3" rel="alternate" type="text/n3" title="Structured Descriptor Document (N3/Turtle format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V&output=application%%2Frdf%%2Bjson" rel="alternate" type="application/rdf+json" title="Structured Descriptor Document (RDF/JSON format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V&output=application%%2Fatom%%2Bxml" rel="alternate" type="application/atom+xml" title="Structured Descriptor Document (OData/Atom format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V&output=application%%2Fatom%%2Bjson" rel="alternate" type="application/atom+json" title="Structured Descriptor Document (OData/JSON format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V&output=text%%2Fcxml" rel="alternate" type="text/cxml" title="Structured Descriptor Document (CXML format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V&output=text%%2Fcsv" rel="alternate" type="text/csv" title="Structured Descriptor Document (CSV format)" />\n', desc_link);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V" rel="http://xmlns.com/foaf/0.1/primaryTopic" />\n', iri);
+  links := links ||
+    blank ||
+    sprintf ('<link href="%V" rev="describedby" />\n', iri);
+
+  return links;
+}
+;
+
+-----------------------------------------------------------------------------------------
+--
+create procedure SIOC..rdf_links_head (in iri any)
+{
+  if (iri is null)
+    return;
+
+  http (SIOC..rdf_links_head_internal(iri));
+}
+;
+
 use DB;
 
-DB.DBA."RDFData_MAKE_DET_COL" ('/DAV/VAD/wa/RDFData/', sioc..get_graph ());
+create procedure WA_INTEREST_UPGRADE ()
+{
+  declare tmp, access, uname, visibility any;
 
+  if (registry_get ('WA_INTEREST_UPGRADE') = 'done')
+    return;
+
+  for (select WAUI_U_ID, WAUI_INTERESTS as F1, WAUI_INTEREST_TOPICS as F2 from DB.DBA.WA_USER_INFO) do
+  {
+  	 uname := (select U_NAME from DB.DBA.SYS_USERS where U_ID = WAUI_U_ID);
+  	 if (not isnull (uname))
+  	 {
+       WA_USER_EDIT (uname, 'WAUI_INTERESTS', F2);
+       WA_USER_EDIT (uname, 'WAUI_INTEREST_TOPICS', F1);
+     }
+  }
+
+  registry_set ('WA_INTEREST_UPGRADE', 'done');
+}
+;
+WA_INTEREST_UPGRADE ()
+;
+
+create procedure ods_object_services_update ()
+{
+  if (registry_get ('ods_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_services ();
+  registry_set ('ods_services_update', '1');
+}
+;
+
+ods_object_services_update ()
+;
+
+DB.DBA."RDFData_MAKE_DET_COL" ('/DAV/VAD/wa/RDFData/', sioc..get_graph ());
 
 delete from DB.DBA.SYS_SCHEDULED_EVENT where SE_NAME = 'ODS_SIOC_RDF';
 delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI = sioc.DBA.get_graph ();
diff --git a/appsrc/ODS-Framework/site_settings.vspx b/appsrc/ODS-Framework/site_settings.vspx
index fa8c12c..f5cc704 100644
--- a/appsrc/ODS-Framework/site_settings.vspx
+++ b/appsrc/ODS-Framework/site_settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: site_settings.vspx,v 1.8.2.3 2011/01/31 11:17:30 source Exp $
+ -  $Id: site_settings.vspx,v 1.8.2.4 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn.sql b/appsrc/ODS-Framework/sn.sql
index aa68acd..755bcf6 100644
--- a/appsrc/ODS-Framework/sn.sql
+++ b/appsrc/ODS-Framework/sn.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sn.sql,v 1.6.2.3 2010/09/20 10:15:26 source Exp $
+--  $Id: sn.sql,v 1.6.2.4 2012/03/08 10:46:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_connections.vspx b/appsrc/ODS-Framework/sn_connections.vspx
index 0a3375b..c8987ca 100644
--- a/appsrc/ODS-Framework/sn_connections.vspx
+++ b/appsrc/ODS-Framework/sn_connections.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: sn_connections.vspx,v 1.9.2.1 2010/09/20 10:15:26 source Exp $
+ -  $Id: sn_connections.vspx,v 1.9.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_delete.vspx b/appsrc/ODS-Framework/sn_delete.vspx
index e932da4..a81ecd4 100644
--- a/appsrc/ODS-Framework/sn_delete.vspx
+++ b/appsrc/ODS-Framework/sn_delete.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sn_delete.vspx,v 1.4.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_delete.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_export.vspx b/appsrc/ODS-Framework/sn_export.vspx
index f36b6da..06503f8 100644
--- a/appsrc/ODS-Framework/sn_export.vspx
+++ b/appsrc/ODS-Framework/sn_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sn_export.vspx,v 1.5.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_export.vspx,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_make_inv.vspx b/appsrc/ODS-Framework/sn_make_inv.vspx
index 5b68bf3..ff26f9d 100644
--- a/appsrc/ODS-Framework/sn_make_inv.vspx
+++ b/appsrc/ODS-Framework/sn_make_inv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sn_make_inv.vspx,v 1.5.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_make_inv.vspx,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_profile.vspx b/appsrc/ODS-Framework/sn_profile.vspx
index facabcb..13da60b 100644
--- a/appsrc/ODS-Framework/sn_profile.vspx
+++ b/appsrc/ODS-Framework/sn_profile.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sn_profile.vspx,v 1.4.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_profile.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_rec_inv.vspx b/appsrc/ODS-Framework/sn_rec_inv.vspx
index ed11abe..0a34432 100644
--- a/appsrc/ODS-Framework/sn_rec_inv.vspx
+++ b/appsrc/ODS-Framework/sn_rec_inv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sn_rec_inv.vspx,v 1.5.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_rec_inv.vspx,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_sent_inv.vspx b/appsrc/ODS-Framework/sn_sent_inv.vspx
index 6109dc0..e884db0 100644
--- a/appsrc/ODS-Framework/sn_sent_inv.vspx
+++ b/appsrc/ODS-Framework/sn_sent_inv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sn_sent_inv.vspx,v 1.5.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_sent_inv.vspx,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_settings.vspx b/appsrc/ODS-Framework/sn_settings.vspx
index 9fe98e2..52ce0a5 100644
--- a/appsrc/ODS-Framework/sn_settings.vspx
+++ b/appsrc/ODS-Framework/sn_settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sn_settings.vspx,v 1.4.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_settings.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sn_user_export.vspx b/appsrc/ODS-Framework/sn_user_export.vspx
index 727043a..debc1fa 100644
--- a/appsrc/ODS-Framework/sn_user_export.vspx
+++ b/appsrc/ODS-Framework/sn_user_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sn_user_export.vspx,v 1.6.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sn_user_export.vspx,v 1.6.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sparql_load.vspx b/appsrc/ODS-Framework/sparql_load.vspx
index 6ae2e45..bd10e5c 100644
--- a/appsrc/ODS-Framework/sparql_load.vspx
+++ b/appsrc/ODS-Framework/sparql_load.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: sparql_load.vspx,v 1.7.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sparql_load.vspx,v 1.7.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sparql_save.vspx b/appsrc/ODS-Framework/sparql_save.vspx
index 13279f3..219f2e5 100644
--- a/appsrc/ODS-Framework/sparql_save.vspx
+++ b/appsrc/ODS-Framework/sparql_save.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: sparql_save.vspx,v 1.5.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: sparql_save.vspx,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/sql_rdf.sql b/appsrc/ODS-Framework/sql_rdf.sql
index 8c53b34..77b08ab 100644
--- a/appsrc/ODS-Framework/sql_rdf.sql
+++ b/appsrc/ODS-Framework/sql_rdf.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sql_rdf.sql,v 1.18.2.1 2010/09/20 10:15:27 source Exp $
+--  $Id: sql_rdf.sql,v 1.18.2.2 2012/03/08 10:46:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/stat.vspx b/appsrc/ODS-Framework/stat.vspx
index 2933917..6667123 100644
--- a/appsrc/ODS-Framework/stat.vspx
+++ b/appsrc/ODS-Framework/stat.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: stat.vspx,v 1.4.2.1 2010/09/20 10:15:27 source Exp $
+ -  $Id: stat.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/tags.sql b/appsrc/ODS-Framework/tags.sql
index ddbbebd..7a76950 100644
--- a/appsrc/ODS-Framework/tags.sql
+++ b/appsrc/ODS-Framework/tags.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tags.sql,v 1.7.2.1 2010/09/20 10:15:27 source Exp $
+--  $Id: tags.sql,v 1.7.2.2 2012/03/08 10:46:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/tags.vspx b/appsrc/ODS-Framework/tags.vspx
index 87ea615..05a4165 100644
--- a/appsrc/ODS-Framework/tags.vspx
+++ b/appsrc/ODS-Framework/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.4.2.1 2010/09/20 10:15:28 source Exp $
+ -  $Id: tags.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/tbl.js b/appsrc/ODS-Framework/tbl.js
index 184f880..94236a9 100644
--- a/appsrc/ODS-Framework/tbl.js
+++ b/appsrc/ODS-Framework/tbl.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: tbl.js,v 1.2.2.24 2011/03/08 13:28:16 source Exp $
+ *  $Id: tbl.js,v 1.2.2.33 2012/03/08 10:46:19 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -123,12 +123,22 @@ TBL.No = function (tbl, prefix, options)
   return parseInt(No)
 }
 
-TBL.createRow = function (prefix, No, optionObject)
-{
+TBL.parent = function (obj, tag) {
+  var obj = obj.parentNode;
+  if (obj.tagName.toLowerCase() == tag)
+    return obj;
+  return TBL.parent(obj, tag);
+}
+
+TBL.createRow = function (prefix, No, optionObject, viewMode) {
   if (No != null)
   {
     TBL.deleteRow(prefix, No);
   }
+  else if (viewMode)
+  {
+    TBL.createViewRow(prefix, optionObject);
+  }
   else
   {
     var tbl = $(prefix+'_tbody');
@@ -167,7 +177,7 @@ TBL.createRow = function (prefix, No, optionObject)
       // actions
       var td = OAT.Dom.create('td');
       td.id = prefix+'_td_'+ No+'_btn';
-      td.style.whiteSpace = 'nowrap';
+      td.style.cssText = 'white-space: nowrap; verical-align: top;';
       tr.appendChild(td);
       if (options.id) {
       	var fld = OAT.Dom.create("input");
@@ -265,10 +275,25 @@ TBL.clean = function (prefix) {
   return true;
 }
 
-TBL.createCellSelect = function (fldName) {
+TBL.createCellOptions = function (fld, fldOptions) {
+  if (fldOptions) {
+    if (fldOptions.className)
+      fld.className = fldOptions.className;
+    if (fldOptions.onblur)
+      fld.onblur = fldOptions.onblur;
+    if (fldOptions.cssText)
+      fld.style.cssText = fldOptions.cssText;
+    if (fldOptions.readOnly)
+      fld.readOnly = fldOptions.readOnly;
+  }
+}
+
+TBL.createCellSelect = function (fldName, fldOptions) {
 	var fld = OAT.Dom.create("select");
   fld.name = fldName;
   fld.id = fldName;
+  TBL.createCellOptions(fld, fldOptions);
+
   return fld;
 }
 
@@ -293,15 +318,8 @@ TBL.createCell0 = function (td, prefix, fldName, No, fldOptions) {
     fld.value = fldOptions.value;
     fld.defaultValue = fld.value;
   }
-  if (fldOptions.className)
-    fld.className = fldOptions.className;
-  if (fldOptions.onblur)
-    fld.onblur = fldOptions.onblur;
+  TBL.createCellOptions(fld, fldOptions);
   fld.style.width = '95%';
-  if (fldOptions.cssText)
-    fld.style.cssText = fldOptions.cssText;
-  if (fldOptions.readOnly)
-    fld.readOnly = fldOptions.readOnly;
 
   td.appendChild(fld);
   return fld;
@@ -314,9 +332,12 @@ TBL.createCell1 = function (td, prefix, fldName, No, fldOptions) {
   var img = OAT.Dom.create('img');
   img.src = '/ods/images/select.gif';
   img.className = "pointer";
-    var F = (fldOptions.form)? '&form='+fldOptions.form: '';
+
+    var frm = TBL.parent(fld, 'form');
+    var F = '&form='+frm.name;
     var M = (fldOptions.formMode)? '&mode='+fldOptions.formMode: '';
-    img.onclick = function (){TBL.windowShow('/ods/users_select.vspx?dst=mc&params='+fldName+':s1;'+F+M)};
+    var N = (fldOptions.nrows)? '&nrows='+fldOptions.nrows: '';
+    img.onclick = function (){TBL.windowShow('/ods/users_select.vspx?dst=mc&params='+fldName+':s1;'+F+M+N, 'ods_select_users')};
 
   td.appendChild(img);
   }
@@ -416,8 +437,10 @@ TBL.createCell20 = function (td, prefix, fldName, No, fldOptions) {
 
 TBL.selectOption = function(fld, fldValue, optionName, optionValue) {
 	var o = OAT.Dom.option(optionName, optionValue, fld);
-	if (fldValue == optionValue)
+  if (fldValue == optionValue) {
 		o.selected = true;
+    o.defaultSelected = true;
+  }
 }
 
 TBL.createCell30 = function (td, prefix, fldName, No, fldOptions) {
@@ -546,36 +569,40 @@ TBL.createCell45 = function (td, prefix, fldName, No, fldOptions) {
 }
 
 TBL.createCell46 = function (td, prefix, fldName, No, fldOptions) {
-  function xSelectOption(fld, fldValue, ontologyClassName)
+  function selectOption46(options, fldValue, ontologyClassName)
   {
     var ontologyClass = RDF.getOntologyClass(ontologyClassName);
     if (ontologyClass && ontologyClass.properties)
     {
       var properties = ontologyClass.properties;
-      if (!properties) {return;}
+      if (!properties)
+        return;
 
       for (i = 0; i < properties.length; i++)
-        TBL.selectOption(fld, fldValue, properties[i].name, properties[i].name);
-      xSelectOption(fld, fldValue, ontologyClass.subClassOf);
+        options.push(properties[i].name);
+
+      if (ontologyClass.subClassOf instanceof Array)
+        for (var i=0; i<ontologyClass.subClassOf.length; i++)
+          selectOption46(options, fldValue, ontologyClass.subClassOf[i]);
     }
   }
 
-	var fld = TBL.createCellSelect(fldName);
-  fld.style.width = '95%';
-  fld.item = fldOptions.item;
-  var fldValue;
-  if (fldOptions.value)
+  var fldValue = '';
+  if (fldOptions.value && fldOptions.value.name)
     fldValue = fldOptions.value.name;
-  TBL.selectOption(fld, null, '', '');
-  xSelectOption(fld, null, fld.item.className);
-  fld.onchange = function(){RDF.changePropertyValue(fld);};
-  sortSelect (fld);
-  fld.value = fldValue;
-  if (fld.selectedIndex != -1)
-    fld.options[fld.selectedIndex].defaultSelected = true;
-
-  td.appendChild(fld);
-  return fld;
+  var fld = TBL.createCellCombolist(td, fldValue, {name: fldName, onchange: RDF.changePropertyValue});
+  var fldInput = fld.input;
+  fldInput.setAttribute("autocomplete", "off");
+  fldInput.onchange = RDF.changePropertyValue;
+  fldInput.item = fldOptions.item;
+
+  var options = [];
+  selectOption46(options, null, fldInput.item.className);
+  options.sort();
+  for (i = 0; i < options.length; i++)
+    fld.addOption(options[i]);
+
+  return fldInput;
 }
 
 TBL.createCell47 = function (td, prefix, fldName, No, fldOptions) {
@@ -628,10 +655,11 @@ TBL.createCell47 = function (td, prefix, fldName, No, fldOptions) {
     }
     td.appendChild(fld.div);
     propertyType = 'object';
-  }
-  else if (ontologyClassProperty && ontologyClassProperty.datatypeProperties) {
-    var fldClassName = '';
+  } else {
+    if (ontologyClassProperty && ontologyClassProperty.datatypeProperties)
     propertyType = ontologyClassProperty.datatypeProperties;
+
+    var fldClassName = '';
     if ((propertyType == 'xsd:byte')    ||
         (propertyType == 'xsd:short')   ||
         (propertyType == 'xsd:int')     ||
@@ -651,7 +679,6 @@ TBL.createCell47 = function (td, prefix, fldName, No, fldOptions) {
       propertyType = 'data';
     }
   	var fld;
-  	var fldLanguage;
     if (propertyType == 'xsd:boolean') {
     	fld = TBL.createCellSelect(fldName);
       TBL.selectOption(fld, property.value, 'Yes', 'true');
@@ -673,10 +700,6 @@ TBL.createCell47 = function (td, prefix, fldName, No, fldOptions) {
         fld.className = fldClassName;
     }
     td.appendChild(fld);
-    if (fldLanguage) {
-      td.appendChild(OAT.Dom.text(' '));
-      td.appendChild(fldLanguage);
-    }
   }
   var fld = OAT.Dom.create('input');
   fld.type = 'hidden';
@@ -707,7 +730,8 @@ TBL.createCell48 = function (td, prefix, fldName, No, fldOptions) {
   if (ontologyClassProperty && ontologyClassProperty.objectProperties) {
     td.innerHTML = 'URI';
   }
-  else if (ontologyClassProperty && ontologyClassProperty.datatypeProperties) {
+  else if (ontologyClassProperty && ontologyClassProperty.datatypeProperties)
+  {
     if (ontologyClassProperty.datatypeProperties == 'xsd:byte')  {
       td.innerHTML = 'Byte';
     } else if (ontologyClassProperty.datatypeProperties == 'xsd:short')  {
@@ -728,7 +752,10 @@ TBL.createCell48 = function (td, prefix, fldName, No, fldOptions) {
     } else {
     td.innerHTML = 'Literal';
   }
+  } else {
+    td.innerHTML = 'Literal';
 }
+
 }
 
 TBL.createCell49 = function (td, prefix, fldName, No, fldOptions) {
@@ -768,6 +795,7 @@ TBL.createCell49 = function (td, prefix, fldName, No, fldOptions) {
         fld.value = '';
       }
       fld.defaultValue = fld.value;
+      fld.title = 'Language';
       fld.style.width = '20px';
     }
   }
@@ -820,17 +848,22 @@ TBL.createCell50 = function (td, prefix, fldName, No, fldOptions) {
 TBL.createCell51 = function (td, prefix, fldName, No, fldOptions)
 {
   var fld = TBL.createCell0 (td, prefix, fldName, No, fldOptions)
-  if (document.forms[0].elements['sid']) {
+
   td.appendChild(OAT.Dom.text(' '));
   var img = OAT.Dom.image('/ods/images/select.gif');
   img.id = fldName+'_img';
   img.className = "pointer";
-  img.onclick = function (){TBL.webidShow(fld, fldOptions.form)};
+    img.onclick = function (){TBL.webidShow(fld, fldOptions)};
   if (fldOptions.imgCssText)
     img.style.cssText = fldOptions.imgCssText;
 
   td.appendChild(img);
-  }
+
+  var ta = new TypeAhead(fld.id, 'webIDs', {checkMode: 1, userParams: TBL.typeheadProperty});
+  fld.setAttribute('autocomplete', 'off');
+  fld.form.onsubmit = CheckSubmit;
+  taVars[taVars.length] = ta;
+
   return fld;
 }
 
@@ -854,7 +887,8 @@ TBL.createCell52 = function (td, prefix, fldName, No, fldOptions, disabled) {
     suffix = fldOptions.suffix;
   cb(td, prefix, fldName+'_r'+suffix, No, fldOptions, disabled, 0);
   cb(td, prefix, fldName+'_w'+suffix, No, fldOptions, disabled, 1);
-  // cb(td, prefix, fldName+'_x'+suffix, No, fldOptions, disabled, 2);
+  if (fldOptions.execute)
+    cb(td, prefix, fldName+'_x'+suffix, No, fldOptions, disabled, 2);
 }
 
 TBL.viewCell52 = function (td, prefix, fldName, No, fldOptions) {
@@ -875,45 +909,18 @@ TBL.clickCell52 = function (fld)
   $(fldName).checked = false;
 }
 
-TBL.createCell53 = function (td, prefix, fldName, No, fldOptions)
-{
-  var fld = TBL.createCell0 (td, prefix, fldName, No, fldOptions)
-  td.appendChild(OAT.Dom.text(' '));
-  var img = OAT.Dom.image('/ods/images/select.gif');
-  img.id = fldName+'_img';
-  img.className = "pointer";
-  img.onclick = function (){TBL.webidShow(fld)};
-  if (fldOptions.imgCssText)
-    img.style.cssText = fldOptions.imgCssText;
-
-  td.appendChild(img);
-  return fld;
-}
-
-
-TBL.createCell54 = function (td, prefix, fldName, No, fldOptions)
-{
-  var fld = TBL.createCell53 (td, prefix, fldName, No, fldOptions);
-
-	var ta = new TypeAhead(fld.id, 'webIDs', {checkMode: 1});
-	fld.setAttribute('autocomplete', 'off');
-	fld.form.onsubmit = CheckSubmit;
-	taVars[taVars.length] = ta;
-
-  return fld;
-}
-
 TBL.createButton0 = function (td, prefix, fldName, No, fldOptions)
 {
   var fld = OAT.Dom.create('span');
   fld.id = fldName;
+  fld.title = 'Delete row';
   fld.onclick = function(){TBL.deleteRow(prefix, No);};
   OAT.Dom.addClass(fld, 'button pointer');
 
   var img = OAT.Dom.create('img');
   img.src = '/ods/images/icons/trash_16.png';
   img.alt = 'Delete row';
-  img.title = fld.alt;
+  img.title = img.alt;
   OAT.Dom.addClass(img, 'button');
 
   fld.appendChild(img);
@@ -957,16 +964,20 @@ TBL.createButtonAdd = function (td, prefix, fldName, No, fldOptions)
 {
   var fld = OAT.Dom.create('span');
   fld.id = fldName;
+  fld.title = 'Add Element';
   OAT.Dom.addClass(fld, 'button pointer');
 
   var img = OAT.Dom.create('img');
   img.src = '/ods/images/icons/add_16.png';
-  img.alt = 'Add row';
-  img.title = fld.alt;
+  img.alt = 'Add Element';
+  img.title = img.alt;
   OAT.Dom.addClass(img, 'button');
 
   fld.appendChild(img);
-  fld.appendChild(OAT.Dom.text(' Add'));
+  var titleText = fldOptions.title;
+  if (!titleText)
+    titleText = 'Add';
+  fld.appendChild(OAT.Dom.text(' '+titleText));
 
   td.appendChild(fld);
   return fld;
@@ -1027,18 +1038,15 @@ TBL.createButton44 = function (td, prefix, fldName, No, fldOptions)
 
   var img = OAT.Dom.create('img');
   var txt;
-  if (!fldOptions["oauth_sid"] || !fldOptions["oauth_sid"].length)
-    {
+  if (!fldOptions["oauth_sid"] || !fldOptions["oauth_sid"].length) {
       img.src = '/ods/images/icons/link_16.png';
       img.alt = 'Link';
-      img.title = fld.alt;
+    img.title = img.alt;
       txt = OAT.Dom.text(' Link');
-    }
-  else
-    {
+  } else {
       img.src = '/ods/images/icons/disconnect_16.png';
       img.alt = 'Unlink';
-      img.title = fld.alt;
+    img.title = img.alt;
       txt = OAT.Dom.text(' Unlink');
     }
   OAT.Dom.addClass(img, 'button');
@@ -1046,66 +1054,66 @@ TBL.createButton44 = function (td, prefix, fldName, No, fldOptions)
   fld.appendChild(txt);
 
   td.appendChild(fld);
-  fld.onclick = function() 
-    { 
+  fld.onclick = function() {
       var url, x;
-      if (!fldOptions["oauth_sid"] || !fldOptions["oauth_sid"].length)
-	{
+    if (!fldOptions["oauth_sid"] || !fldOptions["oauth_sid"].length) {
 	  url = '/ods/api/oauth_connect?uri=' + encodeURIComponent(fldOptions["profile_url"]) + 
 	      '&login=1&oauth_sid=' + encodeURIComponent(fldOptions["oauth_sid"]);
-	  x = function (data)
-	    {
-	      if (data.length)
-		{
-		  var win = window.open (
-		      data, 
-		      null, 
-		      "width=700,height=420,top=100,left=100,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
+      x = function (data) {
+        if (data.length) {
+          var win = window.open(data, null, "width=700,height=420,top=100,left=100,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
 		  win.window.focus();
-		}
-	      else
-		{
+        } else {
 		  alert ("This service cannot be linked.");
 		}
 	    }
-	}
-      else
-	{
+    } else {
 	  if (!confirm('Please confirm removal of associated session'))
 	    return;
 	  url = '/ods/api/oauth_disconnect?uri=' + encodeURIComponent(fldOptions["profile_url"]);
-	  x = function (data) 
-	    {
+      x = function (data) {
 	      window.location.reload ();
-	    };
+      }
 	}
       OAT.AJAX.GET(url, '', x);
-    };
+  }
 }
 
-TBL.webidShow = function(obj, frmName)
+TBL.webidProperty = function(obj)
 {
   var S = 'p';
   if (obj.id.replace('fld_2', 'fld_1') != obj.id)
-    S = $v(obj.id.replace('fld_2', 'fld_1'));
+    S = $v(obj.id.replace('fld_2', 'fld_1'))[0];
+
+  return S;
+}
 
-  var F = '';
-  if (frmName)
-    F = '&form='+frmName;
+TBL.typeheadProperty = function(obj)
+{
+  return '&depend=' + TBL.webidProperty(obj);
+}
+
+TBL.webidShow = function(obj, fldOptions)
+{
+  var S = TBL.webidProperty(obj);
+  var frm = TBL.parent(obj, 'form');
+  var F = '&form='+frm.name;
+  var M = '&mode='+((fldOptions.formMode)? fldOptions.formMode: S);
+  var N = (fldOptions.nrows)? '&nrows='+fldOptions.nrows: '';
 
-  TBL.windowShow('/ods/webid_select.vspx?mode='+S.charAt(0)+'&params='+obj.id+':s1;'+F);
+  TBL.windowShow('/ods/webid_select.vspx?params='+obj.id+':s1;'+F+M+N, 'ods_select_webid');
 }
 
-TBL.windowShow = function(sPage, width, height)
+TBL.windowShow = function(sPage, sPageName, width, height)
 {
   if (!width)
     width = 700;
   if (!height)
-    height = 420;
+    height = 500;
   if (document.forms[0].elements['sid'])
     sPage += '&sid=' + document.forms[0].elements['sid'].value;
   if (document.forms[0].elements['realm'])
     sPage += '&realm=' + document.forms[0].elements['realm'].value;
-  win = window.open(sPage, null, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
diff --git a/appsrc/ODS-Framework/terms.html b/appsrc/ODS-Framework/terms.html
index ea83148..eed03fb 100644
--- a/appsrc/ODS-Framework/terms.html
+++ b/appsrc/ODS-Framework/terms.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: terms.html,v 1.5.2.1 2010/09/20 10:15:28 source Exp $
+ -  $Id: terms.html,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/tools.vspx b/appsrc/ODS-Framework/tools.vspx
index ed7a7ba..4e2e097 100644
--- a/appsrc/ODS-Framework/tools.vspx
+++ b/appsrc/ODS-Framework/tools.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tools.vspx,v 1.4.2.1 2010/09/20 10:15:28 source Exp $
+ -  $Id: tools.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/trs_export.xml b/appsrc/ODS-Framework/trs_export.xml
index 4f026a1..9e364c6 100644
--- a/appsrc/ODS-Framework/trs_export.xml
+++ b/appsrc/ODS-Framework/trs_export.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: trs_export.xml,v 1.3.2.1 2010/09/20 10:15:28 source Exp $
+ -  $Id: trs_export.xml,v 1.3.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/trs_export_all.xml b/appsrc/ODS-Framework/trs_export_all.xml
index 5dc11cb..bcef35f 100644
--- a/appsrc/ODS-Framework/trs_export_all.xml
+++ b/appsrc/ODS-Framework/trs_export_all.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -  
- -  $Id: trs_export_all.xml,v 1.1.2.1 2010/09/20 10:15:28 source Exp $
+ -  $Id: trs_export_all.xml,v 1.1.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/typeahead.js b/appsrc/ODS-Framework/typeahead.js
index 9d4cc56..f26aaa3 100644
--- a/appsrc/ODS-Framework/typeahead.js
+++ b/appsrc/ODS-Framework/typeahead.js
@@ -82,7 +82,9 @@ function TypeAhead (id, key, optObj)
 							self.divScroll();
 							break;
 						case 38:	// arrow up
-							if(suggestedIndex > 1) suggestedIndex --;
+					if (suggestedIndex > 1)
+					  suggestedIndex --;
+
 							self.suggest();
 							self.divScroll();
 							break;
@@ -145,14 +147,13 @@ function TypeAhead (id, key, optObj)
 		  if(isWaitingForSuggestions) self.showSuggestionList();
 	  }
 		var S = self.typeAheadServiceURL + "&param="+encodeURIComponent(self.userText);
+		if (self.options.userParams)
+		  S += self.options.userParams(self.inputElement);
 
     var inputForm = self.inputElement.form;
     if (inputForm && inputForm.sid)
 		  S += "&realm=" + encodeURIComponent(inputForm.realm.value) + "&sid="+encodeURIComponent(inputForm.sid.value);
 
-		if (self.options.depend)
-		  S += "&depend="+encodeURIComponent(self.options.depend.value);
-
     OAT.AJAX.GET (S, false, x);
 		debug("request sent: " + S);
 	}
diff --git a/appsrc/ODS-Framework/ufoaf.xml b/appsrc/ODS-Framework/ufoaf.xml
index 2cdfcf1..a4a8e94 100644
--- a/appsrc/ODS-Framework/ufoaf.xml
+++ b/appsrc/ODS-Framework/ufoaf.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: ufoaf.xml,v 1.14.2.1 2010/09/20 10:15:28 source Exp $
+ -  $Id: ufoaf.xml,v 1.14.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uhome.vspx b/appsrc/ODS-Framework/uhome.vspx
index a3a896c..fcc46bc 100644
--- a/appsrc/ODS-Framework/uhome.vspx
+++ b/appsrc/ODS-Framework/uhome.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: uhome.vspx,v 1.7.2.3 2010/09/20 10:15:28 source Exp $
+ -  $Id: uhome.vspx,v 1.7.2.4 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit.vspx b/appsrc/ODS-Framework/uiedit.vspx
index f299015..89f3ca5 100644
--- a/appsrc/ODS-Framework/uiedit.vspx
+++ b/appsrc/ODS-Framework/uiedit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit.vspx,v 1.23.2.21 2010/12/07 11:11:30 source Exp $
+ -  $Id: uiedit.vspx,v 1.23.2.23 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -130,7 +130,7 @@ function checkRest (form, sel)
     }
 }
             ODSInitArray.push ( function () {
-              OAT.Loader.load(["json", "ws", "calendar", "combolist"], function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){(<?V self.is_org ?>)? swPersHide(): swPersShow();}); OAT.MSG.send(OAT, 'PAGE_LOADED');});
+              OAT.Loader.load(["json", "ws", "calendar", "combolist", "anchor", "dialog"], function(){OAT.Preferences.imagePath = '/ods/images/oat/'; OAT.Preferences.stylePath = '/ods/oat/styles/'; OAT.Preferences.showAjax = false; OAT.MSG.attach(OAT, "PAGE_LOADED", function(){(<?V self.is_org ?>)? swPersHide(): swPersShow();}); OAT.MSG.send(OAT, 'PAGE_LOADED');});
             });
           ]]>
         </script>
diff --git a/appsrc/ODS-Framework/uiedit_acl.vspx b/appsrc/ODS-Framework/uiedit_acl.vspx
index 2ab2d31..750ef06 100644
--- a/appsrc/ODS-Framework/uiedit_acl.vspx
+++ b/appsrc/ODS-Framework/uiedit_acl.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_acl.vspx,v 1.1.4.2 2010/11/09 20:18:23 source Exp $
+ -  $Id: uiedit_acl.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_acls.vspx b/appsrc/ODS-Framework/uiedit_acls.vspx
index 354b36f..22bb6db 100644
--- a/appsrc/ODS-Framework/uiedit_acls.vspx
+++ b/appsrc/ODS-Framework/uiedit_acls.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_acls.vspx,v 1.1.4.2 2010/11/09 20:18:23 source Exp $
+ -  $Id: uiedit_acls.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_ann.vspx b/appsrc/ODS-Framework/uiedit_ann.vspx
index ae1ee54..91da3dd 100644
--- a/appsrc/ODS-Framework/uiedit_ann.vspx
+++ b/appsrc/ODS-Framework/uiedit_ann.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_ann.vspx,v 1.1.4.2 2010/09/27 14:45:39 source Exp $
+ -  $Id: uiedit_ann.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_buss.vspx b/appsrc/ODS-Framework/uiedit_buss.vspx
index a2e9fb0..91bb85d 100644
--- a/appsrc/ODS-Framework/uiedit_buss.vspx
+++ b/appsrc/ODS-Framework/uiedit_buss.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_buss.vspx,v 1.19.2.7 2010/09/27 14:45:39 source Exp $
+ -  $Id: uiedit_buss.vspx,v 1.19.2.8 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_buss_0.vspx b/appsrc/ODS-Framework/uiedit_buss_0.vspx
index 0d1a289..a446761 100644
--- a/appsrc/ODS-Framework/uiedit_buss_0.vspx
+++ b/appsrc/ODS-Framework/uiedit_buss_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_buss_0.vspx,v 1.1.2.4 2010/11/09 20:18:23 source Exp $
+ -  $Id: uiedit_buss_0.vspx,v 1.1.2.5 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_buss_1.vspx b/appsrc/ODS-Framework/uiedit_buss_1.vspx
index 5d13957..6c010af 100644
--- a/appsrc/ODS-Framework/uiedit_buss_1.vspx
+++ b/appsrc/ODS-Framework/uiedit_buss_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_buss_1.vspx,v 1.2.2.8 2011/01/25 14:11:28 source Exp $
+ -  $Id: uiedit_buss_1.vspx,v 1.2.2.9 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_buss_2.vspx b/appsrc/ODS-Framework/uiedit_buss_2.vspx
index 6fc5046..aac11d3 100644
--- a/appsrc/ODS-Framework/uiedit_buss_2.vspx
+++ b/appsrc/ODS-Framework/uiedit_buss_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_buss_2.vspx,v 1.1.2.11 2010/09/21 11:46:16 source Exp $
+ -  $Id: uiedit_buss_2.vspx,v 1.1.2.12 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_buss_3.vspx b/appsrc/ODS-Framework/uiedit_buss_3.vspx
index dfd12ac..fea8aa7 100644
--- a/appsrc/ODS-Framework/uiedit_buss_3.vspx
+++ b/appsrc/ODS-Framework/uiedit_buss_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_buss_3.vspx,v 1.1.2.7 2010/11/09 20:18:23 source Exp $
+ -  $Id: uiedit_buss_3.vspx,v 1.1.2.8 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_bz.vspx b/appsrc/ODS-Framework/uiedit_bz.vspx
index ae8c87a..a05cd9d 100644
--- a/appsrc/ODS-Framework/uiedit_bz.vspx
+++ b/appsrc/ODS-Framework/uiedit_bz.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_bz.vspx,v 1.1.4.2 2010/09/27 14:45:40 source Exp $
+ -  $Id: uiedit_bz.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_groups.vspx b/appsrc/ODS-Framework/uiedit_groups.vspx
index b58c32b..e5af8e7 100644
--- a/appsrc/ODS-Framework/uiedit_groups.vspx
+++ b/appsrc/ODS-Framework/uiedit_groups.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_groups.vspx,v 1.1.4.7 2011/03/08 13:28:17 source Exp $
+ -  $Id: uiedit_groups.vspx,v 1.1.4.9 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -519,7 +519,7 @@
                       for (N := 0; N < length (self.fg_members); N := N + 1)
                       {
                         if (length (self.fg_members[N]))
-                          http (sprintf ('ODSInitArray.push(function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x", null, {fld_1: {mode: 54, className: "_validate_ _uri_", value: "%s"}});});});', self.fg_members[N]));
+                          http (sprintf ('ODSInitArray.push(function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x", null, {fld_1: {mode: 51, className: "_validate_ _uri_", value: "%s"}});});});', self.fg_members[N]));
                       }
                     ?>
             		    </script>
@@ -528,7 +528,7 @@
                 </table>
               </td>
               <td valign="top" nowrap="nowrap">
-                <span class="button pointer" onclick="javascript: TBL.createRow('x', null, {fld_1: {mode: 54, className: '_validate_ _uri_'}});"><img src="/ods/images/icons/add_16.png" border="0" class="button" alt="Add Security" title="Add Security" /> Add</span>
+                <span class="button pointer" onclick="javascript: TBL.createRow('x', null, {fld_1: {mode: 51, className: '_validate_ _uri_'}});"><img src="/ods/images/icons/add_16.png" border="0" class="button" alt="Add Security" title="Add Security" /> Add</span>
               </td>
             </tr>
           </table>
diff --git a/appsrc/ODS-Framework/uiedit_grp.vspx b/appsrc/ODS-Framework/uiedit_grp.vspx
index a28484b..dfecd2e 100644
--- a/appsrc/ODS-Framework/uiedit_grp.vspx
+++ b/appsrc/ODS-Framework/uiedit_grp.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_grp.vspx,v 1.1.4.2 2010/09/27 14:45:40 source Exp $
+ -  $Id: uiedit_grp.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_knows.vspx b/appsrc/ODS-Framework/uiedit_knows.vspx
index 90fd70e..56294c1 100644
--- a/appsrc/ODS-Framework/uiedit_knows.vspx
+++ b/appsrc/ODS-Framework/uiedit_knows.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_knows.vspx,v 1.1.4.2 2010/12/07 11:11:31 source Exp $
+ -  $Id: uiedit_knows.vspx,v 1.1.4.5 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -90,7 +90,7 @@
 	                sql="select WUK_ID, WUK_URI, WUK_LABEL from DB.DBA.WA_USER_KNOWS where WUK_U_ID = :self.u_id"
 		              scrollable="1"
 		              editable="1"
-		              nrows="10">
+		              nrows="0">
 
         <v:template name="k_ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
       	  <table class="listing" rules="groups">
@@ -197,7 +197,7 @@
 		        </th>
             <td>
               <input type="text" name="k_import" id="k_import" value="" size="100" class="_validate_ _uri_" />
-              <input type="button" value="Download" onclick="javascript: knowsData(); return false;" class="button" />
+              <input type="button" value="Retrieve" onclick="javascript: knowsData(); return false;" class="button" />
               <img id="k_import_image" alt="Import knows URIs" src="/ods/images/oat/Ajax_throbber.gif" style="display: none" />
             </td>
           </tr>
@@ -221,7 +221,7 @@
                     </th>
                   </tr>
                 </thead>
-                <tr id="k_tr_no"><td colspan="3"><b>No downloaded items</b></td></tr>
+                <tr id="k_tr_no"><td colspan="3"><b>No retrieved items</b></td></tr>
               </table>
             </td>
           </tr>
diff --git a/appsrc/ODS-Framework/uiedit_ldap.vspx b/appsrc/ODS-Framework/uiedit_ldap.vspx
index cb1b972..aaea227 100644
--- a/appsrc/ODS-Framework/uiedit_ldap.vspx
+++ b/appsrc/ODS-Framework/uiedit_ldap.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_ldap.vspx,v 1.5.2.7 2010/09/27 14:45:40 source Exp $
+ -  $Id: uiedit_ldap.vspx,v 1.5.2.8 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_ldap_include.vspx b/appsrc/ODS-Framework/uiedit_ldap_include.vspx
index 2b6e5b0..f6ff7f5 100644
--- a/appsrc/ODS-Framework/uiedit_ldap_include.vspx
+++ b/appsrc/ODS-Framework/uiedit_ldap_include.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_ldap_include.vspx,v 1.1.4.3 2010/12/07 11:11:31 source Exp $
+ -  $Id: uiedit_ldap_include.vspx,v 1.1.4.5 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -101,7 +101,7 @@
 
   <h3>LDAP Servers Addministration</h3>
   <vm:if test="self.v_mode = 'LDAP/browse'">
-    <v:data-source name="dsrc" expression-type="sql" nrows="10" initial-offset="0">
+    <v:data-source name="dsrc" expression-type="sql" nrows="0" initial-offset="0">
       <v:before-data-bind>
         <![CDATA[
           control.ds_sql := sprintf ('select * from LDAP..LDAP_SERVERS where LS_USER_ID = %d', self.u_id);
diff --git a/appsrc/ODS-Framework/uiedit_likes.vspx b/appsrc/ODS-Framework/uiedit_likes.vspx
index b879bb3..650a224 100644
--- a/appsrc/ODS-Framework/uiedit_likes.vspx
+++ b/appsrc/ODS-Framework/uiedit_likes.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_likes.vspx,v 1.1.4.3 2010/12/07 11:11:31 source Exp $
+ -  $Id: uiedit_likes.vspx,v 1.1.4.5 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -70,7 +70,7 @@
               self.ld_name.ufl_value := null;
               self.ld_comment.ufl_value := null;
               self.ld_properties := ODS..jsonObject ();
-              self.ld_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://ontologi.es/like#', 'items', get_keyword ('products', self.ld_properties, vector ()))));
+              self.ld_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://ontologi.es/like#', 'items', vector ())));
 
               self.vc_data_bind(e);
             ]]>
@@ -128,6 +128,8 @@
                       <![CDATA[
                         self.ld_mode := 'LD/edit';
                         self.ld_id := (control.vc_parent as vspx_row_template).te_column_value('WUL_ID');
+                        self.ld_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://ontologi.es/like#', 'items', vector ())));
+
                         select WUL_FLAG,
                                WUL_URI,
                                WUL_TYPE,
@@ -143,7 +145,12 @@
                           from DB.DBA.WA_USER_LIKES
                          where WUL_ID = self.ld_id;
 
+                        if (get_keyword ('version', self.ld_properties) = '1.0')
                         self.ld_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://ontologi.es/like#', 'items', get_keyword ('products', self.ld_properties, vector ()))));
+
+                        if (get_keyword ('version', self.ld_properties) = '2.0')
+                          self.ld_newProperties := get_keyword ('ontologies', self.ld_properties, vector ());
+
                         self.vc_data_bind(e);
                       ]]>
                     </v:on-post>
@@ -220,15 +227,33 @@
 		          Properties
 		        </th>
 		        <td width="800px">
+              <table class="ctl_grp">
+                <tr>
+                  <td width="800px">
               <table id="ld_tbl" class="listing">
-                <tbody id="ld_tbody">
-                  <tr id="ld_throbber">
-                    <td>
-                      <img src="/ods/images/oat/Ajax_throbber.gif" />
-                    </td>
+                      <thead>
+                        <tr class="listing_header_row">
+                          <th>
+                            <div style="width: 16px;"><![CDATA[ ]]></div>
+                          </th>
+                          <th width="100%">
+                            Ontology
+                          </th>
+                          <th width="80px">
+                            Action
+                          </th>
                   </tr>
+                      </thead>
+                      <tbody id="ld_tbody" class="colorize">
+                        <tr id="ld_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                 </tbody>
               </table>
+                  </td>
+                  <td valign="top" nowrap="nowrap">
+                    <span class="button pointer" onclick="TBL.createRow('ld', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                  </td>
+                </tr>
+              </table>
               <input type="hidden" id="ld_no" name="ld_no" value="1" />
               <script type="text/javascript">
                 <![CDATA[
@@ -265,11 +290,7 @@
                   IDs := vector ();
                   ontologies := vector ();
                   self.getItems ('ld', 'gr', ontologies, IDs);
-                  products := vector ();
-                  if (length (ontologies))
-                    products := get_keyword ('items', ontologies[0], vector());
-
-                  self.ld_properties := vector_concat (ODS..jsonObject (), vector ('version', '1.0', 'products', products));
+                  self.ld_properties := vector_concat (ODS..jsonObject (), vector ('version', '2.0', 'ontologies', ontologies));
                   if (self.ld_mode = 'LD/add')
                   {
                     if (exists (select 1 from DB.DBA.WA_USER_LIKES where WUL_U_ID = self.u_id and WUL_NAME = self.ld_name.ufl_value))
diff --git a/appsrc/ODS-Framework/uiedit_offerlist.vspx b/appsrc/ODS-Framework/uiedit_offerlist.vspx
index 5853b73..077eb9f 100644
--- a/appsrc/ODS-Framework/uiedit_offerlist.vspx
+++ b/appsrc/ODS-Framework/uiedit_offerlist.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_offerlist.vspx,v 1.1.2.13 2011/02/16 20:58:16 source Exp $
+ -  $Id: uiedit_offerlist.vspx,v 1.1.2.17 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -37,7 +37,7 @@
 	<v:variable name="ol_newProperties" type="any" default="null" />
 
 	<v:form name="usr_personal_054" type="simple" method="POST" xhtml_enctype="multipart/form-data">
-    <h3>My Offers (GoodRelations Ontologies)</h3>
+    <h3>My Offers</h3>
     <vm:if test="self.ol_mode = 'OL/browse'">
       <?vsp
         if (0)
@@ -69,7 +69,7 @@
               self.ol_offer.ufl_value := null;
               self.ol_comment.ufl_value := null;
               self.ol_properties := ODS..jsonObject ();
-              self.ol_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', get_keyword ('products', self.ol_properties, vector ()))));
+              self.ol_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', vector ())));
 
               self.vc_data_bind(e);
             ]]>
@@ -81,7 +81,7 @@
 	                sql="select WUOL_ID, WUOL_OFFER, WUOL_COMMENT from DB.DBA.WA_USER_OFFERLIST where WUOL_U_ID = :self.u_id and WUOL_TYPE = :self.ol_type"
 		              scrollable="1"
 		              editable="1"
-		              nrows="10">
+		              nrows="0">
 
         <v:template name="ol_ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
 	  <table class="listing" rules="groups">
@@ -119,6 +119,8 @@
                       <![CDATA[
                         self.ol_mode := 'OL/edit';
                         self.ol_id := (control.vc_parent as vspx_row_template).te_column_value('WUOL_ID');
+                        self.ol_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', vector ())));
+
                         select WUOL_FLAG,
                                WUOL_OFFER,
                                WUOL_COMMENT,
@@ -130,8 +132,12 @@
                           from DB.DBA.WA_USER_OFFERLIST
                          where WUOL_ID = self.ol_id;
 
+                        if (get_keyword ('version', self.ol_properties) = '1.0')
                         self.ol_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', get_keyword ('products', self.ol_properties, vector ()))));
 
+                        if (get_keyword ('version', self.ol_properties) = '2.0')
+                          self.ol_newProperties := get_keyword ('ontologies', self.ol_properties, vector ());
+
                         self.vc_data_bind(e);
                       ]]>
                     </v:on-post>
@@ -189,15 +195,37 @@
   		          Products
   		        </th>
               <td width="800px">
+              <table class="ctl_grp">
+                <tr>
+                  <td width="800px">
                 <table id="ol_tbl" class="listing">
-                  <tbody id="ol_tbody">
-                  <tr id="ol_throbber">
-                    <td>
-                      <img src="/ods/images/oat/Ajax_throbber.gif" />
-                    </td>
+                      <thead>
+                        <tr class="listing_header_row">
+                          <th>
+                            <div style="width: 16px;"><![CDATA[ ]]></div>
+                          </th>
+                          <th width="100%">
+                            Ontology
+                          </th>
+                          <th width="80px">
+                            Action
+                          </th>
                   </tr>
+                      </thead>
+                      <tbody id="ol_tbody" class="colorize">
+                        <tr id="ol_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                   </tbody>
 			  </table>
+                  </td>
+                  <td valign="top" nowrap="nowrap">
+                    <span class="button pointer" onclick="TBL.createRow('ol', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                    <br /><br />
+                    <span class="button pointer" onclick="RDF.showRDF('ol', 'RDF');"><img class="button" src="/ods/images/icons/rdf_11.png" border="0" alt="Show RDF Data" title="Show RDF Data" /> RDF</span>
+                    <br /><br />
+                    <span class="button pointer" onclick="RDF.showRDF('ol', 'TTL');"><img class="button" src="/ods/images/icons/rdf_11.png" border="0" alt="Show RDF Data" title="Show RDF Data" /> TTL</span>
+                  </td>
+                </tr>
+              </table>
                 <input type="hidden" id="ol_no" name="ol_no" value="1" />
           <script type="text/javascript">
             <![CDATA[
@@ -229,16 +257,11 @@
                   return;
 
                 declare ontologies, IDs any;
-                declare products any;
 
                 IDs := vector ();
                 ontologies := vector ();
                 self.getItems ('ol', 'gr', ontologies, IDs);
-                products := vector ();
-                if (length (ontologies))
-                  products := get_keyword ('items', ontologies[0], vector());
-
-                self.ol_properties := vector_concat (ODS..jsonObject (), vector ('version', '1.0', 'products', products));
+                  self.ol_properties := vector_concat (ODS..jsonObject (), vector ('version', '2.0', 'ontologies', ontologies));
                 if (self.ol_mode = 'OL/add')
               {
                     if (exists (select 1 from DB.DBA.WA_USER_OFFERLIST where WUOL_U_ID = self.u_id and WUOL_TYPE = self.ol_type and WUOL_OFFER = self.ol_offer.ufl_value))
@@ -268,6 +291,10 @@
           </tr>
         </table>
     </div>
+      <div id="rdfDiv" style="display: none;">
+        <pre id="rdfData">
+        </pre>
+      </div>
     </vm:if>
 	</v:form>
 </v:page>
diff --git a/appsrc/ODS-Framework/uiedit_others.vspx b/appsrc/ODS-Framework/uiedit_others.vspx
index 2e2aef5..8384a4c 100644
--- a/appsrc/ODS-Framework/uiedit_others.vspx
+++ b/appsrc/ODS-Framework/uiedit_others.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_others.vspx,v 1.1.4.2 2010/12/07 11:11:31 source Exp $
+ -  $Id: uiedit_others.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_owns.vspx b/appsrc/ODS-Framework/uiedit_owns.vspx
index ff10bc1..66fb852 100644
--- a/appsrc/ODS-Framework/uiedit_owns.vspx
+++ b/appsrc/ODS-Framework/uiedit_owns.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_owns.vspx,v 1.1.4.3 2011/02/16 20:58:17 source Exp $
+ -  $Id: uiedit_owns.vspx,v 1.1.4.5 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -81,7 +81,7 @@
 	                sql="select WUOL_ID, WUOL_OFFER, WUOL_COMMENT from DB.DBA.WA_USER_OFFERLIST where WUOL_U_ID = :self.u_id and WUOL_TYPE = :self.ow_type"
 		              scrollable="1"
 		              editable="1"
-		              nrows="10">
+		              nrows="0">
 
         <v:template name="ow_ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
       	  <table class="listing" rules="groups">
diff --git a/appsrc/ODS-Framework/uiedit_personal.vspx b/appsrc/ODS-Framework/uiedit_personal.vspx
index 37c7371..22d4fff 100644
--- a/appsrc/ODS-Framework/uiedit_personal.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal.vspx,v 1.33.2.24 2011/02/18 15:42:45 source Exp $
+ -  $Id: uiedit_personal.vspx,v 1.33.2.26 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,12 +33,13 @@
   <v:method name="getItems" arglist="in prefix varchar, in mode varchar, inout ontologies any, inout IDs any">
     <![CDATA[
       declare params any;
-      declare N, M integer;
+      declare N, M, L integer;
       declare re, reParts any;
       declare ontology, ontologyNo, ontologyName, ontologyItems any;
       declare item, itemID, itemNo, itemClass, itemProperties any;
 
       params := self.vc_page.vc_event.ve_params;
+      L := 0;
       IDs := vector ();
       ontologies := vector ();
       for (N := 0; N < length (params); N := N + 4)
@@ -73,7 +74,8 @@
             }
           _skip2:;
           }
-          ontology := vector ('ontology', ontologyName, 'items', ontologyItems);
+          ontology := vector_concat (ODS..jsonObject (), vector ('id', cast (L as varchar), 'ontology', ontologyName, 'items', ontologyItems));
+          L := L + 1;
           ontologies := vector_concat (ontologies, vector (ontology));
         }
       _skip:;
@@ -86,7 +88,7 @@
       declare L integer;
       declare re, reParts any;
       declare itemProperties any;
-      declare property, propNo, propName, propValue, propType, propLanguage any;
+      declare tmp, property, propNo, propName, propValue, propType, propLanguage any;
 
 
               itemProperties := vector ();
@@ -100,10 +102,13 @@
                   reParts := regexp_parse(re, params[L], 0);
                   propNo := subseq (params[L], reParts[2], reParts[3]);
                   propName := trim (params[L+1]);
-          propType := get_keyword (prefix || '_item_'||ontologyNo||'_prop_'||itemNo||'_fld_2_'||propNo, params, 'data');
-          propValue := get_keyword (prefix || '_item_'||ontologyNo||'_prop_'||itemNo||'_fld_3_'||propNo, params);
-          propLanguage := get_keyword (prefix || '_item_'||ontologyNo||'_prop_'||itemNo||'_fld_4_'||propNo, params);
-          property := vector_concat (ODS..jsonObject (), vector ('name', propName, 'value', propValue, 'type', propType, 'language', propLanguage));
+          tmp := prefix || '_item_'||ontologyNo||'_prop_'||itemNo;
+          propType := get_keyword (tmp||'_fld_2_'||propNo, params, 'data');
+          propValue := get_keyword (tmp||'_fld_3_'||propNo, params);
+          property := vector_concat (ODS..jsonObject (), vector ('name', propName, 'value', propValue, 'type', propType));
+          propLanguage := get_keyword (tmp||'_fld_4_'||propNo, params, '');
+          if (propLanguage <> '')
+            property := vector_concat (property, vector ('language', propLanguage));
                   itemProperties := vector_concat (itemProperties, vector (property));
                 }
       _skip:;
diff --git a/appsrc/ODS-Framework/uiedit_personal_0.vspx b/appsrc/ODS-Framework/uiedit_personal_0.vspx
index f361819..dbc78c5 100644
--- a/appsrc/ODS-Framework/uiedit_personal_0.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_0.vspx,v 1.1.2.8 2011/01/25 14:11:29 source Exp $
+ -  $Id: uiedit_personal_0.vspx,v 1.1.2.11 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -145,6 +145,7 @@
             self.vc_is_valid := 0;
             return;
           }
+          self.iPhoto := get_keyword ('depiction', data);
           self.iTitle := get_keyword ('title', data);
           self.iName := get_keyword ('name', data);
           self.iFirstName := coalesce (get_keyword ('firstName', data), get_keyword ('givenName', data));
@@ -259,6 +260,8 @@
           return;
         }
         --DB.DBA.WA_USER_EDIT (self.u_name, 'WAUI_BIRTHDAY', dt);
+        if (get_keyword ('cb_item_iPhoto', params, '0') = '1')
+          ODS.ODS_API."user.update.field" (self.u_name, 'WAUI_PHOTO_URL', self.iPhoto);
         if (get_keyword ('cb_item_iTitle', params, '0') = '1')
           DB.DBA.WA_USER_EDIT (self.u_name, 'WAUI_TITLE', self.iTitle);
         if (get_keyword ('cb_item_iFirstName', params, '0') = '1')
@@ -358,6 +361,7 @@
   <v:variable name="iMode" type="integer" default="0"/>
   <v:variable name="iLDAP" type="integer" default="0"/>
 
+  <v:variable name="iPhoto" type="varchar" default="null" />
   <v:variable name="iTitle" type="varchar" default="null" />
   <v:variable name="iName" type="varchar" default="null" />
   <v:variable name="iFirstName" type="varchar" default="null" />
@@ -457,6 +461,13 @@
             <th>Field</th>
             <th>Value</th>
           </tr>
+          <v:template name="iTemplate_01_0" type="simple" condition="length (self.iPhoto)">
+            <tr>
+              <td valign="top"><input type="checkbox" name="cb_item_iPhoto" id="cb_item_iPhoto" value="1" /></td>
+              <td valign="top">Photo</td>
+              <td><img src="<?V self.iPhoto ?>"/></td>
+            </tr>
+          </v:template>
           <v:template name="iTemplate_01" type="simple" condition="length (self.iTitle)">
             <tr>
               <td><input type="checkbox" name="cb_item_iTitle" id="cb_item_iTitle" value="1" /></td>
@@ -608,7 +619,7 @@
             <tr>
               <td valign="top"><input type="checkbox" name="cb_item_iKnows" id="cb_item_iKnows" value="1" /></td>
               <td valign="top">Knows URIs</td>
-              <td><?vsp self.show_data (self.iKnows, vector ('value')); ?></td>
+              <td><?vsp self.show_data (self.iKnows, vector ('value', 'name')); ?></td>
             </tr>
           </v:template>
         </table>
diff --git a/appsrc/ODS-Framework/uiedit_personal_1.vspx b/appsrc/ODS-Framework/uiedit_personal_1.vspx
index 80f1117..84c67af 100644
--- a/appsrc/ODS-Framework/uiedit_personal_1.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_1.vspx,v 1.1.2.16 2011/01/25 14:11:29 source Exp $
+ -  $Id: uiedit_personal_1.vspx,v 1.1.2.21 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -43,7 +43,8 @@
       {
         if ((params [N] like 'x1_fld_1_%') and (trim (params [N+1]) <> ''))
         {
-          tmp_e := tmp_e || trim (params [N+1]) || '\n';
+          suffix := replace (params [N], 'x1_fld_1_', '');
+          tmp_e := tmp_e || trim (params [N+1]) || ';' || trim (get_keyword ('x1_fld_2_'||suffix, params, '')) || '\n';
         }
         else if ((params [N] like 'x2_fld_1_%') and (trim (params [N+1]) <> ''))
         {
@@ -56,8 +57,8 @@
           tmp_b := tmp_b || trim (params [N+1]) || ';' || trim (get_keyword ('x3_fld_2_'||suffix, params, '')) || '\n';
         }
       }
-      self.interests := tmp_a;
-      self.interestTopics := tmp_b;
+      self.interestTopics := tmp_a;
+      self.interests := tmp_b;
       self.efoaf := tmp_e;
 	  ]]>
 	</v:method>
@@ -132,7 +133,7 @@
         self.s_photo.ufl_value := '';
         return;
       }
-      if (get_keyword ('up_photo', params, '') <> '' or (self.previe_path <> '' and self.s_photo.ufl_value <> ''))
+      if ((get_keyword ('up_photo', params, '') <> '') or (self.previe_path <> '' and self.s_photo.ufl_value <> ''))
       {
         declare dir, p_path, p_path_org, dotpos, up_cont any;
         declare p_path_size2 any;
@@ -194,10 +195,13 @@
           p_path := subseq (p_path, 4);
         WA_USER_EDIT (self.u_name, 'WAUI_PHOTO_URL', p_path);
       }
-      else
+      else if ((get_keyword ('s_photo', params) like 'http://%') or (get_keyword ('s_photo', params) like 'https://%'))
       {
-        if (get_keyword ('s_photo', params, '') = '')
-          WA_USER_EDIT (self.u_name, 'WAUI_PHOTO_URL', '');
+        WA_USER_EDIT (self.u_name, 'WAUI_PHOTO_URL', get_keyword ('s_photo', params));
+      }
+      else if (get_keyword ('s_photo', params) = '')
+      {
+        WA_USER_EDIT (self.u_name, 'WAUI_PHOTO_URL', '');
       }
       if (get_keyword ('up_audio', params, '') <> '')
       {
@@ -251,8 +255,8 @@
       WA_USER_EDIT (self.u_name, 'WAUI_SHOWACTIVE', self.show_active.ufl_selected);
 
       self.storePersonal_1();
-      WA_USER_EDIT (self.u_name, 'WAUI_INTERESTS', self.interests);
       WA_USER_EDIT (self.u_name, 'WAUI_INTEREST_TOPICS', self.interestTopics);
+      WA_USER_EDIT (self.u_name, 'WAUI_INTERESTS', self.interests);
       WA_USER_EDIT (self.u_name, 'WAUI_FOAF', self.efoaf);
 
       WA_USER_EDIT (self.u_name, 'WAUI_APP_ENABLE', atoi (self.app_enable.ufl_value));
@@ -262,28 +266,28 @@
     ]]>
   </v:method>
 
-  <v:variable persist="0" name="utitle" type="varchar" default="''"/>
-  <v:variable persist="0" name="nick" type="varchar" default="''"/>
-  <v:variable persist="0" name="ftname" type="varchar" default="''"/>
-  <v:variable persist="0" name="lname" type="varchar" default="''"/>
-  <v:variable persist="0" name="fullname" type="varchar" default="''"/>
-  <v:variable persist="0" name="gender" type="varchar" default="''"/>
-  <v:variable persist="0" name="bdate" type="datetime" default="null"/>
-
-  <v:variable persist="0" name="wpage" type="varchar" default="''"/>
-  <v:variable persist="0" name="efoaf" type="varchar" default="''"/>
-  <v:variable persist="0" name="msign" type="varchar" default="''"/>
-  <v:variable persist="0" name="summ" type="varchar" default="''"/>
-  <v:variable persist="0" name="email" type="varchar" default="''"/>
-  <v:variable persist="0" name="photo" type="varchar" default="''"/>
-  <v:variable persist="0" name="audio" type="varchar" default="''"/>
-
-  <v:variable persist="0" name="inSearch" type="int" default="1"/>
-  <v:variable persist="0" name="showactive" type="int" default="1"/>
-  <v:variable persist="0" name="interests" type="varchar" default="''"/>
-  <v:variable persist="0" name="interestTopics" type="varchar" default="''"/>
-  <v:variable persist="0" name="appEnable" type="integer" default="0"/>
-  <v:variable persist="0" name="spbEnable" type="integer" default="0"/>
+  <v:variable persist="0" name="utitle" type="varchar" default="''" />
+  <v:variable persist="0" name="nick" type="varchar" default="''" />
+  <v:variable persist="0" name="ftname" type="varchar" default="''" />
+  <v:variable persist="0" name="lname" type="varchar" default="''" />
+  <v:variable persist="0" name="fullname" type="varchar" default="''" />
+  <v:variable persist="0" name="gender" type="varchar" default="''" />
+  <v:variable persist="0" name="bdate" type="datetime" default="null" />
+
+  <v:variable persist="0" name="wpage" type="varchar" default="''" />
+  <v:variable persist="0" name="efoaf" type="varchar" default="''" />
+  <v:variable persist="0" name="msign" type="varchar" default="''" />
+  <v:variable persist="0" name="summ" type="varchar" default="''" />
+  <v:variable persist="0" name="email" type="varchar" default="''" />
+  <v:variable persist="0" name="photo" type="varchar" default="''" />
+  <v:variable persist="0" name="audio" type="varchar" default="''" />
+
+  <v:variable persist="0" name="inSearch" type="int" default="1" />
+  <v:variable persist="0" name="showactive" type="int" default="1" />
+  <v:variable persist="0" name="interests" type="varchar" default="''" />
+  <v:variable persist="0" name="interestTopics" type="varchar" default="''" />
+  <v:variable persist="0" name="appEnable" type="integer" default="0" />
+  <v:variable persist="0" name="spbEnable" type="integer" default="0" />
 
   <v:variable name="sav0" type="varchar" default="'1'" />
   <v:variable name="sav1" type="varchar" default="'1'" />
@@ -293,7 +297,6 @@
   <v:variable name="sav5" type="varchar" default="'1'" />
   <v:variable name="sav6" type="varchar" default="'1'" />
   <v:variable name="sav7" type="varchar" default="'1'" />
-  <v:variable name="sav8" type="varchar" default="'1'" />
   <v:variable name="sav9" type="varchar" default="'3'" />
 
   <v:variable name="sav33" type="varchar" default="'1'" />
@@ -370,7 +373,6 @@
         self.sav5 := tmp[5];
         self.sav6 := tmp[6];
         self.sav7 := tmp[7];
-        self.sav8 := tmp[8];
 
         self.sav33 := tmp[33];
         self.sav37 := tmp[37];
@@ -407,16 +409,23 @@
     <div>
       <table class="ctl_grp">
         <tr>
+          <th>Account deactivation</th>
+          <td class="listing_col" nowrap="1">
+            <input type="button" value="Deactivate" onclick="return accountDisable('x_name');" />
+          </td>
+        </tr>
+        <tr>
           <th><label for="labelww">Login name</label></th>
           <td class="listing_col" nowrap="1">
-            <v:label value="--self.u_name" format="%s"/>
+            <v:label value="--self.u_name" format="%s" />
+            <v:text name="x_name" xhtml_id="x_name" type="hidden" value="--self.u_name" />
           </td>
         </tr>
         <tr>
           <th><label for="labelwwn">Nick name</label></th>
           <td class="listing_col" nowrap="1">
             <v:text name="nickn" value="--self.nick" format="%s">
-              <v:validator test="length" min="3" max="100" name="vv_nickn" message="Nick name cannot be shorter than 3 chars or longer than 100 chars"/>
+              <v:validator test="length" min="3" max="100" name="vv_nickn" message="Nick name cannot be shorter than 3 chars or longer than 100 chars" />
             </v:text>
           </td>
         </tr>
@@ -438,12 +447,12 @@
           <th><label for="regtitle">Title</label></th>
           <td class="listing_col" nowrap="1">
             <v:select-list name="regtitle">
-              <v:item name="" value=""/>
-              <v:item name="Mr" value="Mr"/>
-              <v:item name="Mrs" value="Mrs"/>
-              <v:item name="Dr" value="Dr"/>
-              <v:item name="Ms" value="Ms"/>
-              <v:item name="Sir" value="Sir"/>
+              <v:item name="" value="" />
+              <v:item name="Mr" value="Mr" />
+              <v:item name="Mrs" value="Mrs" />
+              <v:item name="Dr" value="Dr" />
+              <v:item name="Ms" value="Ms" />
+              <v:item name="Sir" value="Sir" />
 
               <v:before-data-bind>
                 <![CDATA[
@@ -459,8 +468,8 @@
           <th><label for="f_name">First Name</label></th>
           <td class="listing_col" nowrap="1">
             <v:text name="f_name" error-glyph="*" value="--self.ftname" xhtml_style="width:216px" fmt-function="wa_utf8_to_wide" xhtml_onblur="javascript: fillFullName (this.form.full_name, this.form.f_name, this.form.l_name, false)">
-              <v:validator test="length" min="0" max="50" name="vv_f_name1" message="First name cannot be longer then 50 chars" empty-allowed="1"/>
-              <v:validator test="sql" name="vv_f_name2" expression="length(trim(self.f_name.ufl_value)) > 50" message="First name cannot be longer then 50 chars" empty-allowed="1"/>
+              <v:validator test="length" min="0" max="50" name="vv_f_name1" message="First name cannot be longer then 50 chars" empty-allowed="1" />
+              <v:validator test="sql" name="vv_f_name2" expression="length(trim(self.f_name.ufl_value)) > 50" message="First name cannot be longer then 50 chars" empty-allowed="1" />
             </v:text>
             <div style="display:inline; color:red;"><v:error-summary match="f_name" /></div>
             <vm:u-prop-select name="sel_1" value="self.sav1" />
@@ -470,8 +479,8 @@
           <th><label for="l_name">Last Name</label></th>
           <td class="listing_col" nowrap="1">
             <v:text name="l_name" error-glyph="*" value="--self.lname" xhtml_style="width:216px" fmt-function="wa_utf8_to_wide" xhtml_onblur="javascript: fillFullName (this.form.full_name, this.form.f_name, this.form.l_name, false)">
-              <v:validator test="length" min="0" max="50" message="Last name cannot be longer then 50 chars" empty-allowed="1" name="vv_lname1"/>
-              <v:validator test="sql" expression="length(trim(self.l_name.ufl_value)) > 50" name="vv_lname2" message="Last name cannot be longer then 50 chars" empty-allowed="1"/>
+              <v:validator test="length" min="0" max="50" message="Last name cannot be longer then 50 chars" empty-allowed="1" name="vv_lname1" />
+              <v:validator test="sql" expression="length(trim(self.l_name.ufl_value)) > 50" name="vv_lname2" message="Last name cannot be longer then 50 chars" empty-allowed="1" />
             </v:text>
             <div style="display:inline; color:red;"><v:error-summary match="l_name" /></div>
             <vm:u-prop-select name="sel_2" value="self.sav2" />
@@ -482,7 +491,7 @@
           <td class="listing_col" nowrap="1">
             <v:text name="full_name" error-glyph="*" value="--self.fullname" xhtml_style="width:216px" fmt-function="wa_utf8_to_wide" xhtml_onfocus="javascript: fillFullName (this.form.full_name, this.form.f_name, this.form.l_name, true)">
               <v:validator test="length" min="0" max="100" name="vv_fulname1" message="Full name cannot be longer then 100 chars" empty-allowed="1" />
-              <v:validator test="sql" expression="length(trim(self.full_name.ufl_value)) > 100" name="vv_fulname2" message="Full name cannot be longer then 100 chars" mpty-allowed="1"/>
+              <v:validator test="sql" expression="length(trim(self.full_name.ufl_value)) > 100" name="vv_fulname2" message="Full name cannot be longer then 100 chars" mpty-allowed="1" />
             </v:text>
             <div style="display:inline; color:red;"><v:error-summary match="full_name" /></div>
             <vm:u-prop-select name="sel_3" value="self.sav3" />
@@ -501,9 +510,9 @@
           <th><label for="regender">Gender</label></th>
           <td class="listing_col" nowrap="1">
             <v:select-list name="regender">
-              <v:item name="Not Specified" value="unknown"/>
-              <v:item name="Male" value="male"/>
-              <v:item name="Female" value="female"/>
+              <v:item name="Not Specified" value="unknown" />
+              <v:item name="Male" value="male" />
+              <v:item name="Female" value="female" />
               <v:before-data-bind>
                 <v:script><![CDATA[
                   control.ufl_value := self.gender;
@@ -517,14 +526,14 @@
         <tr id="pers_5" class="initial_hidden">
           <th><label for="regbday">Birthday</label></th>
           <td class="listing_col" nowrap="1">
-            <v:text name="regbdate" xhtml_id="regbdate" value="--case when isnull (self.bdate) then '' else left (datestring (self.bdate), 10) end" xhtml_size="10" xhtml_onclick="javascript: datePopup(\'regbdate\');"/>
+            <v:text name="regbdate" xhtml_id="regbdate" value="--case when isnull (self.bdate) then '' else left (datestring (self.bdate), 10) end" xhtml_size="10" xhtml_onclick="javascript: datePopup(\'regbdate\');" />
             <vm:u-prop-select name="sel_6" value="self.sav6" />
           </td>
         </tr>
          <tr>
            <th><label for="w_page" id="lb_1">Personal Webpage</label></th>
            <td class="listing_col" nowrap="1">
-             <v:text name="w_page" value="--self.wpage" xhtml_class="_validate_ _url_ _canEmpty_" xhtml_style="width:216px" xhtml_onblur="javascript: validateField(this);"/>
+             <v:text name="w_page" value="--self.wpage" xhtml_class="_validate_ _url_ _canEmpty_" xhtml_style="width:216px" xhtml_onblur="javascript: validateField(this);" />
              <vm:u-prop-select name="sel_7" value="self.sav7" />
            </td>
          </tr>
@@ -542,6 +551,9 @@
                          <th>
                            URI
                          </th>
+                         <th width="10%">
+                           Access
+                         </th>
                          <th width="65px">
                            Action
                          </th>
@@ -550,19 +562,18 @@
                		   <![CDATA[
                 		   <script type="text/javascript">
                      <?vsp
-                       for (select interest from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar) P where txt = self.efoaf) do
+                         for (select interest, label from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar, label varchar) P where txt = self.efoaf) do
                        {
-                           http (sprintf ('ODSInitArray.push(function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x1", null, {fld_1: {value: "%s", className: "_validate_ _webid_ _canEmpty_"}});});});', interest));
+                           http (sprintf ('ODSInitArray.push(function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x1", null, {fld_1: {value: "%s", className: "_validate_ _webid_ _canEmpty_"}, fld_2: {mode: 4, value: "%s"}});});});', interest, label));
                        }
                      ?>
                 		   </script>
                   	 ]]>
-                     <tr id="x1_tr_no"><td colspan="2"><b>No Personal URIs</b></td></tr>
+                     <tr id="x1_tr_no"><td colspan="3"><b>No Personal URIs</b></td></tr>
                    </table>
                  </td>
                  <td valign="top" nowrap="1">
-                   <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                   <vm:u-prop-select name="sel_8" value="self.sav8" />
+                   <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                  </td>
                </tr>
              </table>
@@ -572,15 +583,15 @@
            <th><label for="m_sign">Mail Signature<span class="small">Automatically added to mails sent by you</span></label></th>
            <td class="listing_col" nowrap="1">
              <v:textarea name="m_sign" value="--self.msign" xhtml_rows="4" xhtml_cols="80" fmt-function="wa_utf8_to_wide" error-glyph="*">
-               <v:validator test="length" min="0" max="255" name="vv_m_sign1" message="Mail Signature cannot be longer then 255 chars" empty-allowed="1"/>
+               <v:validator test="length" min="0" max="255" name="vv_m_sign1" message="Mail Signature cannot be longer then 255 chars" empty-allowed="1" />
              </v:textarea>
-             <v:text type="hidden" name="sel_9" value="3"/>
+             <v:text type="hidden" name="sel_9" value="3" />
            </td>
          </tr>
          <tr>
            <th><label for="s_summ">Summary</label></th>
            <td class="listing_col" nowrap="1">
-             <v:textarea name="s_summ" value="--self.summ" xhtml_rows="4" xhtml_cols="80" fmt-function="wa_utf8_to_wide" error-glyph="*"/>
+             <v:textarea name="s_summ" value="--self.summ" xhtml_rows="4" xhtml_cols="80" fmt-function="wa_utf8_to_wide" error-glyph="*" />
              <vm:u-prop-select name="sel_33" value="self.sav33" />
            </td>
          </tr>
@@ -591,7 +602,7 @@
           <td class="listing_col" nowrap="1">
             <v:textarea name="s_tag" value="--WA_USER_TAG_GET(self.u_name)" xhtml_cols="50" xhtml_rows="5" />
             <v:button action="browse" name="tagsbt" value="Import Tags..." selector="get_tags_popup.vspx" child-window-options="scrollbar=yes,resizable=yes,menubar=no,height=600,width=800">
-              <v:field name="s_tag"/>
+              <v:field name="s_tag" />
             </v:button>
           </td>
          </tr>
@@ -620,7 +631,7 @@
                		   <![CDATA[
                 		   <script type="text/javascript">
                      <?vsp
-                       for (select interest, label from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar, label varchar) P where txt = self.interests) do
+                         for (select interest, label from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar, label varchar) P where txt = self.interestTopics) do
                        {
                            http (sprintf ('ODSInitArray.push(function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x2", null, {fld_1: {value: "%s", className: "_validate_ _url_ _canEmpty_"}, fld_2: {value: "%s"}});});});', interest, label));
                        }
@@ -663,7 +674,7 @@
                		   <![CDATA[
                 		   <script type="text/javascript">
                      <?vsp
-                       for (select interest, label from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar, label varchar) P where txt = self.interestTopics) do
+                         for (select interest, label from DB.DBA.WA_USER_INTERESTS (txt) (interest varchar, label varchar) P where txt = self.interests) do
                        {
                            http (sprintf ('ODSInitArray.push(function(){OAT.MSG.attach(OAT, "PAGE_LOADED", function(){TBL.createRow("x3", null, {fld_1: {value: "%s", className: "_validate_ _url_ _canEmpty_"}, fld_2: {value: "%s"}});});});', interest, label));
                        }
@@ -788,9 +799,9 @@
            </th>
            <td>
              <v:select-list xhtml_class="select" name="app_enable" xhtml_id="app_enable">
-               <v:item value="0" name="disabled"/>
-               <v:item value="1" name="click"/>
-               <v:item value="2" name="hover"/>
+               <v:item value="0" name="disabled" />
+               <v:item value="1" name="click" />
+               <v:item value="2" name="hover" />
                <v:before-data-bind>
                  <v:script>
                    <![CDATA[
@@ -846,7 +857,7 @@
         <tr>
           <th><label for="set_personal_1">Set access for all fields as </label></th>
           <td class="ctrl">
-            <v:select-list name="set_personal_1" xhtml_id="set_personal_1" value="0" xhtml_onchange='javascript: setSelectLists (this.value, this.form, "sel_")'>
+            <v:select-list name="set_personal_1" xhtml_id="set_personal_1" value="0" xhtml_onchange='javascript: setSelectLists (this.value, this.form, "sel_"); setSelectLists (this.value, this.form, "x1_fld_2_");'>
               <v:item name="*no change*"  value="0" />
               <v:item name="public"  value="1" />
               <v:item name="acl" value="2" />
diff --git a/appsrc/ODS-Framework/uiedit_personal_2.vspx b/appsrc/ODS-Framework/uiedit_personal_2.vspx
index 3d12873..9901fd5 100644
--- a/appsrc/ODS-Framework/uiedit_personal_2.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_2.vspx,v 1.2.2.7 2011/01/25 14:11:29 source Exp $
+ -  $Id: uiedit_personal_2.vspx,v 1.2.2.8 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_personal_3.vspx b/appsrc/ODS-Framework/uiedit_personal_3.vspx
index 793214a..ad26c11 100644
--- a/appsrc/ODS-Framework/uiedit_personal_3.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_3.vspx,v 1.1.2.11 2010/10/07 13:22:38 source Exp $
+ -  $Id: uiedit_personal_3.vspx,v 1.1.2.12 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_personal_4.vspx b/appsrc/ODS-Framework/uiedit_personal_4.vspx
index 973e2dc..1198486 100644
--- a/appsrc/ODS-Framework/uiedit_personal_4.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_4.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_4.vspx,v 1.1.2.10 2010/11/09 20:18:23 source Exp $
+ -  $Id: uiedit_personal_4.vspx,v 1.1.2.11 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_personal_5.vspx b/appsrc/ODS-Framework/uiedit_personal_5.vspx
index 3ce2fa0..bb9b2f3 100644
--- a/appsrc/ODS-Framework/uiedit_personal_5.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_5.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_5.vspx,v 1.1.2.9 2010/09/20 10:15:30 source Exp $
+ -  $Id: uiedit_personal_5.vspx,v 1.1.2.10 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_personal_6.vspx b/appsrc/ODS-Framework/uiedit_personal_6.vspx
index d7b028d..d90c863 100644
--- a/appsrc/ODS-Framework/uiedit_personal_6.vspx
+++ b/appsrc/ODS-Framework/uiedit_personal_6.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_personal_6.vspx,v 1.1.2.10 2010/12/07 11:11:31 source Exp $
+ -  $Id: uiedit_personal_6.vspx,v 1.1.2.12 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -78,7 +78,7 @@
 	                sql="select WUF_ID, WUF_LABEL, WUF_URI from DB.DBA.WA_USER_FAVORITES where WUF_U_ID = :self.u_id"
 		              scrollable="1"
 		              editable="1"
-		              nrows="10">
+		              nrows="0">
 
         <v:template name="r_ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
       	  <table class="listing" rules="groups">
diff --git a/appsrc/ODS-Framework/uiedit_prj.vspx b/appsrc/ODS-Framework/uiedit_prj.vspx
index 1b4f727..f21318b 100644
--- a/appsrc/ODS-Framework/uiedit_prj.vspx
+++ b/appsrc/ODS-Framework/uiedit_prj.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_prj.vspx,v 1.12.2.6 2010/09/20 10:15:30 source Exp $
+ -  $Id: uiedit_prj.vspx,v 1.12.2.9 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -64,7 +64,7 @@
               self.m_mode := 'M/add';
               self.m_name := 'foaf:made';
               self.m_url.ufl_value := null;
-              self.m_desc.ufl_value := null;
+              self.m_descr.ufl_value := null;
 
               self.vc_data_bind (e);
             ]]>
@@ -76,7 +76,7 @@
 	                sql="select WUP_ID, WUP_NAME, WUP_URL, WUP_DESC from DB.DBA.WA_USER_PROJECTS where WUP_U_ID = :self.u_id"
 		              scrollable="1"
 		              editable="1"
-		              nrows="10">
+                  nrows="0">
 
         <v:template name="m_ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
 	  <table class="listing" rules="groups">
@@ -123,7 +123,7 @@
                                WUP_DESC
                           into self.m_name,
                                self.m_url.ufl_value,
-                               self.m_desc.ufl_value
+                               self.m_descr.ufl_value
                           from DB.DBA.WA_USER_PROJECTS
                          where WUP_ID = self.m_id;
 
@@ -186,7 +186,7 @@
 		          Description (*)
 		        </th>
 		        <td>
-  		    <v:textarea name="m_desc" value="" xhtml_id="m_desc" xhtml_rows="4" xhtml_cols="80"/>
+              <v:textarea name="m_descr" value="" xhtml_id="m_descr" xhtml_rows="4" xhtml_cols="80"/>
 		  <br />
 		  <label>Note: The fields designated with '*' will be fetched from the source document if empty</label>
             </td>
@@ -212,7 +212,7 @@ if (not self.vc_is_valid)
                   params := e.ve_params;
                   self.m_name := get_keyword ('m_name', params);
                   url := self.m_url.ufl_value;
-                  descr := self.m_desc.ufl_value;
+                    descr := self.m_descr.ufl_value;
                   name := self.m_name;
 iri := url;
 tmp := uuid ();
@@ -272,6 +272,9 @@ nexts:;
 
                   if (length (self.m_name))
                     name := self.m_name;
+
+                    name := cast (name as varchar);
+                    descr := cast (descr as varchar);
 if (not length (name))
   {
     self.vc_error_message := 'The title of item made is not specified nor can be retrieved from source URI, please specify.';
diff --git a/appsrc/ODS-Framework/uiedit_pwd.vspx b/appsrc/ODS-Framework/uiedit_pwd.vspx
index 80b6388..9d2dddd 100644
--- a/appsrc/ODS-Framework/uiedit_pwd.vspx
+++ b/appsrc/ODS-Framework/uiedit_pwd.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_pwd.vspx,v 1.15.2.15 2011/03/08 13:28:17 source Exp $
+ -  $Id: uiedit_pwd.vspx,v 1.15.2.21 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,12 +33,10 @@
     <v:variable persist="0" name="secretq" type="varchar" default="''"/>
     <v:variable persist="0" name="secreta" type="varchar" default="''"/>
     <v:variable persist="0" name="oid_urlv" type="varchar" default="''"/>
-  <v:variable persist="0" name="certificate_login" type="integer" default="0"/>
+  <v:variable persist="0" name="certificate_login" type="integer" default="1"/>
   <v:variable persist="0" name="certificate_content" type="varchar" default="null"/>
     <v:variable persist="0" name="sioc_limit" type="int" default="10"/>
     <v:variable persist="0" name="no_pwd" type="int" default="0"/>
-  <v:variable persist="0" name="fb" type="DB.DBA.Facebook" default="null" />
-  <v:variable persist="0" name="fbLoginID" type="varchar" default="''"/>
   <v:variable persist="0" name="tab_no" type="int" default="0" param-name="tabNo"/>
   <v:variable persist="temp" name="cert_del"  type="int" default="0" param-name="cert_del"/>
   <v:variable persist="temp" name="key_del"  type="varchar" default="null" param-name="key_del"/>
@@ -50,13 +48,11 @@
       SELECT WAUI_SEC_QUESTION,
              WAUI_SEC_ANSWER,
              pwd_magic_calc (U_NAME, U_PASSWORD, 1),
-	     WAUI_OPENID_URL,
-		         WAUI_FACEBOOK_ID
+             WAUI_OPENID_URL
         INTO self.secretq,
              self.secreta,
              pwd,
-	     self.oid_urlv,
-		   self.fbLoginID
+             self.oid_urlv
         FROM WA_USER_INFO,
              DB.DBA.SYS_USERS
        where WAUI_U_ID = U_ID
@@ -78,9 +74,6 @@
 	  self.no_pwd := 1;
         else
 	  self.no_pwd := 0;
-      declare fb_options any;
-      if (_get_ods_fb_settings (fb_options))
-        self.fb := new Facebook(fb_options[0], fb_options[1], self.vc_event.ve_params, self.vc_event.ve_lines);
       ]]>
     </v:before-data-bind>
  <br/>
@@ -89,9 +82,6 @@
       <v:url name="sec_url_0" value="Password" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=0')" xhtml_class="--case when self.tabNo = 0 then 'tabX activeTabX' else 'tabX' end"/>
       <v:url name="sec_url_3" value="Password recovery" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=3')" xhtml_class="--case when self.tabNo = 3 then 'tabX activeTabX' else 'tabX' end"/>
       <v:url name="sec_url_1" value="OpenID" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=1')" xhtml_class="--case when self.tabNo = 1 then 'tabX activeTabX' else 'tabX' end"/>
-    <vm:if test="not isnull (self.fb)">
-	<v:url name="sec_url_2" value="Facebook" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=2')" xhtml_class="--case when self.tabNo = 2 then 'tabX activeTabX' else 'tabX' end"/>
-    </vm:if>
       <v:url name="sec_url_4" value="Limits" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=4')" xhtml_class="--case when self.tabNo = 4 then 'tabX activeTabX' else 'tabX' end"/>
   <?vsp 
        declare ua any;
@@ -118,9 +108,11 @@
 	     }
 	   }
 	  else if (regexp_match ('Mozilla.*Windows.*Firefox.*\.NET CLR .*', ua) is not null)
+	        {
 	  goto no_gen_svc;
 	 }
-	 else
+        }
+        else if (not ((coalesce (strstr (ua, 'Windows'), -1) > 0) and (coalesce (strstr (ua, 'Safari'), -1) > 0) and (coalesce (strstr (ua, 'Chrome'), -1) <= 0)))
         {
 	  no_gen_svc:;
       ?>
@@ -129,7 +121,7 @@
           }
        ?>
       <v:url name="sec_url_5" value="X.509 Certificates" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=5')" xhtml_class="--case when self.tabNo = 5 then 'tabX activeTabX' else 'tabX' end"/>
-      <v:url name="sec_url_6" value="Private Keys" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=7')" xhtml_class="--case when self.tabNo = 7 then 'tabX activeTabX' else 'tabX' end"/>
+      <v:url name="sec_url_6" value="Certificate & Private Key" url="--sprintf('uiedit_sec.vspx?page=3&tabNo=7')" xhtml_class="--case when self.tabNo = 7 then 'tabX activeTabX' else 'tabX' end"/>
     </div>
     <div class="contents">
   <v:form name="usr_pwd" type="simple" method="POST" action="uiedit_sec.vspx?page=3">
@@ -267,90 +259,6 @@
               </tr>
       </table>
       </v:template>
-    <vm:if test="not isnull (self.fb)">
-      <v:template name="sec_tmpl_2" type="simple" enabled="-- equ (self.tab_no, 2)">
-	  <input type="hidden" value="2" name="tabNo" /> 
-            <br />
-  			<table>
-        <tr>
-                <th width="135px">
-                  <label>Saved Facebook ID</label>
-                </th>
-          <td nowrap="nowrap">
-            <?vsp
-              if (DB.DBA.is_empty_or_null (self.fbLoginID))
-              {
-                http ('not yet');
-              } else {
-                {
-                  declare exit handler for sqlstate '*'
-                	{
-                    http ('bad connection/user');
-                	  goto _next;
-                	};
-                declare _res any;
-
-                  _res := serialize_to_UTF8_xml (xpath_eval('string(/users_getInfo_response/user/name)', self.fb.api_client.users_getInfo(self.fbLoginID, 'name')));
-                  if (DB.DBA.is_empty_or_null (_res))
-                    signal ('23023', '');
-
-                  http (_res);
-                }
-              _next:;
-              }
-            ?>
-          </td>
-        </tr>
-        <?vsp
-          if (self.fb is not null and  length (self.fb._user))
-          {
-            declare _res any;
-            _res := self.fb.api_client.users_getInfo(self.fb._user, 'name');
-            http (sprintf ('<tr><th></th><td>Connected as <b><i>%s</i><b></td></tr>', serialize_to_UTF8_xml (xpath_eval('string(/users_getInfo_response/user/name)', _res))));
-          }
-          http (         '<tr><th></th><td>');
-          http (         '<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>');
-          http (         '<fb:login-button autologoutlink="true" onlogin1="window.location=\'/ods/login.vspx\'"></fb:login-button>');
-          http (sprintf ('<script type="text/javascript">FB.init("%s", "fb_dummy.vsp", {"reloadIfSessionStateChanged": true});</script>', self.fb.api_key));
-          http (         '</td></tr>');
-        ?>
-              <tr>
-          <td colspan="2" class="ctrl">
-            <span class="fm_ctl_btn">
-              <v:button name="bt_fb1" value="Update" action="simple" enabled="--case when isnull (self.fb) then 0 else 1 end">
-                <v:on-post>
-                  <![CDATA[
-                    if (self.vc_is_valid = 0)
-                      return;
-
-                    if (exists (select 1 from WA_USER_INFO where WAUI_U_ID <> self.u_id and WAUI_FACEBOOK_ID = self.fb._user))
-                    {
-                      self.vc_error_message := 'This Facebook identity is already registered.';
-                      self.vc_is_valid := 0;
-                      return;
-                    }
-                    WA_USER_EDIT (self.u_name, 'WAUI_FACEBOOK_ID', self.fb._user);
-                    self.vc_redirect ('uiedit_sec.vspx?page=3&tabNo=2');
-                  ]]>
-                </v:on-post>
-              </v:button>
-              <v:button name="bt_fb2" value="Clear" action="simple" enabled="--case when isnull (self.fbLoginID) then 0 else 1 end">
-                <v:on-post>
-                  <![CDATA[
-                    if (self.vc_is_valid = 0)
-                      return;
-
-                    WA_USER_EDIT (self.u_name, 'WAUI_FACEBOOK_ID', null);
-                    self.vc_redirect ('uiedit_sec.vspx?page=3&tabNo=2');
-                  ]]>
-                </v:on-post>
-              </v:button>
-            </span>
-                </td>
-              </tr>
-        </table>
-</v:template>
-    </vm:if>
       <v:template name="sec_tmpl_3" type="simple" enabled="-- equ (self.tab_no, 3)">
 	  <input type="hidden" value="3" name="tabNo" /> 
           <h2>Password recovery questions</h2>
@@ -656,7 +564,7 @@
             <table>
         <tr>
                 <th width="135px">
-		Key Name
+                  Key Name (*)
                 </th>
 	      <td align="left">
 		  <v:text name="kn" value="">
@@ -737,8 +645,6 @@
               <v:button name="bt_gen7" value="Generate Key" action="simple" enabled="--equ (self.inpsel.ufl_selected, 0)">
                 <v:on-post>
                   <![CDATA[
-  		    declare agent, mail varchar;
-
                     if (self.vc_is_valid = 0)
 		      return;
 
@@ -748,14 +654,16 @@
 		       self.vc_is_valid := 0;
 		       return;
 		    };
-		    if (not length (self.kn.ufl_value))
+                          declare kn varchar;
+                          declare kl integer;
+
+                          kn := trim (self.kn.ufl_value);
+                          if (not length (kn))
                       {
-		        self.vc_error_message := 'You must specify key name';
+                            self.vc_error_message := 'Please specify Key Name';
 			self.vc_is_valid := 0;
 			return;
 		      }  
-		    declare kl int;
-                    
 		    kl := atoi (self.kl.ufl_value);
 		    set_user_id (self.u_name); 
 		    set_qualifier ('DB');
@@ -767,7 +675,7 @@
 		      { 
 		        xenc_key_DSA_create (self.kn.ufl_value, kl);
 		      }
-		    USER_KEY_STORE (self.u_name, self.kn.ufl_value, self.kt.ufl_value, 'DER', '');
+                          USER_KEY_STORE (self.u_name, kn, self.kt.ufl_value, 'DER', '');
                     set_user_id ('dba');
                     self.vc_redirect ('uiedit_sec.vspx?page=3&tabNo=7');
                   ]]>
@@ -776,18 +684,32 @@
               <v:button name="bt_set7" value="Import Key" action="simple" enabled="--equ (self.inpsel.ufl_selected, 1)">
                 <v:on-post>
                   <![CDATA[
-  		    declare agent, mail varchar;
-
                     if (self.vc_is_valid = 0)
                       return;
+
 		    declare exit handler for sqlstate '*', not found
 		    {
 		       self.vc_error_message := __SQL_MESSAGE;
 		       self.vc_is_valid := 0;
 		       return;
 		    };
+                          declare kn varchar;
+
+                          kn := trim (self.kn.ufl_value);
+                          if (not length (kn))
+                          {
+                            self.vc_error_message := 'Please specify Key Name';
+                            self.vc_is_valid := 0;
+                            return;
+                          }
+                          if (not length (get_keyword ('k_value', e.ve_params)))
+                          {
+                            self.vc_error_message := 'Please specify file to import';
+                            self.vc_is_valid := 0;
+                            return;
+                          }
 		    set_user_id (self.u_name);
-		    USER_KEY_LOAD (self.kn.ufl_value, get_keyword ('k_value', e.ve_params), 'X.509', 'PKCS12', self.k_pwd.ufl_value, null, 1);
+                          USER_KEY_LOAD (kn, get_keyword ('k_value', e.ve_params), 'X.509', 'PKCS12', self.k_pwd.ufl_value, null, 1);
                     self.vc_redirect ('uiedit_sec.vspx?page=3&tabNo=7');
                   ]]>
                 </v:on-post>
diff --git a/appsrc/ODS-Framework/uiedit_related.vspx b/appsrc/ODS-Framework/uiedit_related.vspx
index 85b94a1..1e50780 100644
--- a/appsrc/ODS-Framework/uiedit_related.vspx
+++ b/appsrc/ODS-Framework/uiedit_related.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_related.vspx,v 1.9.2.6 2010/09/27 14:45:40 source Exp $
+ -  $Id: uiedit_related.vspx,v 1.9.2.8 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -43,7 +43,7 @@
 		  sql="select WUR_ID, WUR_LABEL, WUR_SEEALSO_IRI, WUR_P_IRI from WA_USER_RELATED_RES where WUR_U_ID = :self.u_id"
                   scrollable="1"
                   editable="1"
-                  nrows="1000">
+                  nrows="0">
 		  <v:before-data-bind>
 if (not e.ve_is_post and self.del_related is not null)
 {
@@ -135,7 +135,7 @@ if (not e.ve_is_post and control.te_rowset[0] = self.edit_related)
 		      <v:validator test="sql" expression="length(trim(control.ufl_value)) < 2" message="Label can not be empty"/>
 		  </v:text>
 		  <br/>
-	<v:check-box name="spb" value="1" xhtml_id="spb"/> 
+	<v:check-box name="spb" value="1" xhtml_id="spb"/>
 	<label for="spb">Issue Semantic Pingback</label>
         <br/>
 	      <span class="fm_ctl_btn">
diff --git a/appsrc/ODS-Framework/uiedit_sec.vspx b/appsrc/ODS-Framework/uiedit_sec.vspx
index afee9ad..5600165 100644
--- a/appsrc/ODS-Framework/uiedit_sec.vspx
+++ b/appsrc/ODS-Framework/uiedit_sec.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_sec.vspx,v 1.1.4.2 2010/09/27 14:45:40 source Exp $
+ -  $Id: uiedit_sec.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_svc.vspx b/appsrc/ODS-Framework/uiedit_svc.vspx
index f99b7d1..b8f93bf 100644
--- a/appsrc/ODS-Framework/uiedit_svc.vspx
+++ b/appsrc/ODS-Framework/uiedit_svc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_svc.vspx,v 1.14.2.6 2010/09/27 14:45:40 source Exp $
+ -  $Id: uiedit_svc.vspx,v 1.14.2.9 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -39,7 +39,7 @@
 		  <th>URI</th>
 		    <th width="50px">Action</th>
 	      </tr>
-      <v:data-set name="svc" sql="select US_ID, US_SVC, US_IRI, US_KEY from WA_USER_SVC where US_U_ID = :self.u_id" scrollable="1" editable="1" nrows="1000">
+      <v:data-set name="svc" sql="select US_ID, US_SVC, US_IRI, US_KEY from WA_USER_SVC where US_U_ID = :self.u_id" scrollable="1" editable="1" nrows="0">
 		  <v:before-data-bind>
 if (not e.ve_is_post and self.del_svc is not null)
 {
@@ -103,8 +103,8 @@ if (not e.ve_is_post and control.te_rowset[0] = self.edit_svc)
 declare v any;
 declare sel, val any;
 
-              control.vsl_items := vector ('Amazon API', 'Amazon WishList', 'Ebay', 'FaceBook', 'Flickr', 'Google Associates', 'Google API');
-              control.vsl_item_values := vector ('AmazonKey', 'AmazonID', 'EbayID', 'FBKey', 'FlickrKey', 'GoogleAdsenseID', 'GoogleKey');
+              control.vsl_items := vector ('Amazon API', 'Amazon WishList', 'Ebay', 'Flickr', 'Google Associates', 'Google API');
+              control.vsl_item_values := vector ('AmazonKey', 'AmazonID', 'EbayID', 'FlickrKey', 'GoogleAdsenseID', 'GoogleKey');
 
 val := control.vsl_items;
 sel := control.vsl_item_values;
@@ -131,13 +131,10 @@ for (declare i, l int, i := 0, l := length (sel); i < l; i := i + 1)
   {
      if (position (sel[i], ex) = 0 or sel[i] = self.svc_name.ufl_value)
        {
-                  if ((sel[i] <> 'FBKey') or (self.u_id = http_dav_uid ()))
-                  {
          newn := vector_concat (newn, vector (val[i]));
          newv := vector_concat (newv, vector (sel[i]));
        }
   }
-              }
 control.vsl_items := newn;
 control.vsl_item_values := newv;
 control.vs_set_selected ();
@@ -152,16 +149,6 @@ control.vs_set_selected ();
 		  <label for="svc_keys">Keys</label>
         <br />
         <v:textarea name="svc_keys" value="" xhtml_id="svc_keys" xhtml_rows="5" xhtml_cols="50" default_value="key=\nsecret=\nsession="/>
-        <?vsp
-          if (__proc_exists ('DB.DBA.FB_SIG') is not null)
-          {
-        ?>
-        <v:template name="template_fb2" type="simple" enabled="--equ(self.u_id, http_dav_uid ())">
-          <v:browse-button name="fbt1" xhtml_id="fbt1" value="Get FaceBook session" child-window-options="scrollbars=yes, resizable=yes, menubar=no, height=800, width=800" selector="fb_popup.vspx" style="button"/>
-        </v:template>
-        <?vsp
-          }
-        ?>
 		  <br />
 	      <span class="fm_ctl_btn">
 		  <v:button name="cancel2" value="Cancel" action="simple" enabled="--equ(isnull(self.edit_svc),0)">
diff --git a/appsrc/ODS-Framework/uiedit_val.vspx b/appsrc/ODS-Framework/uiedit_val.vspx
index 719dacc..e7b138e 100644
--- a/appsrc/ODS-Framework/uiedit_val.vspx
+++ b/appsrc/ODS-Framework/uiedit_val.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_val.vspx,v 1.1.4.2 2010/09/27 14:45:41 source Exp $
+ -  $Id: uiedit_val.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_validation.vspx b/appsrc/ODS-Framework/uiedit_validation.vspx
index b99c6ce..a0ffa27 100644
--- a/appsrc/ODS-Framework/uiedit_validation.vspx
+++ b/appsrc/ODS-Framework/uiedit_validation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_validation.vspx,v 1.3.2.5 2011/03/23 12:18:30 source Exp $
+ -  $Id: uiedit_validation.vspx,v 1.3.2.6 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_visb.vspx b/appsrc/ODS-Framework/uiedit_visb.vspx
index 19b45eb..69cacc9 100644
--- a/appsrc/ODS-Framework/uiedit_visb.vspx
+++ b/appsrc/ODS-Framework/uiedit_visb.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_visb.vspx,v 1.4.2.2 2010/11/09 20:18:23 source Exp $
+ -  $Id: uiedit_visb.vspx,v 1.4.2.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/uiedit_wishlist.vspx b/appsrc/ODS-Framework/uiedit_wishlist.vspx
index 9c4890a..ebc4b36 100644
--- a/appsrc/ODS-Framework/uiedit_wishlist.vspx
+++ b/appsrc/ODS-Framework/uiedit_wishlist.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uiedit_wishlist.vspx,v 1.1.2.14 2011/02/16 20:58:17 source Exp $
+ -  $Id: uiedit_wishlist.vspx,v 1.1.2.18 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -37,7 +37,7 @@
 	<v:variable name="wl_newProperties" type="any" default="null" />
 
 	<v:form name="usr_personal_055" type="simple" method="POST" xhtml_enctype="multipart/form-data">
-    <h3>My Offers (GoodRelations Ontologies)</h3>
+    <h3>I Want, Seek, or Need</h3>
     <vm:if test="self.wl_mode = 'WL/browse'">
       <?vsp
         if (0)
@@ -69,7 +69,7 @@
               self.wl_offer.ufl_value := null;
               self.wl_comment.ufl_value := null;
               self.wl_properties := ODS..jsonObject ();
-              self.wl_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', get_keyword ('products', self.wl_properties, vector ()))));
+              self.wl_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', vector ())));
 
               self.vc_data_bind(e);
     ]]>
@@ -81,7 +81,7 @@
 	                sql="select WUOL_ID, WUOL_OFFER, WUOL_COMMENT from DB.DBA.WA_USER_OFFERLIST where WUOL_U_ID = :self.u_id and WUOL_TYPE = :self.wl_type"
 		              scrollable="1"
 		              editable="1"
-		              nrows="10">
+		              nrows="0">
 
         <v:template name="wl_ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
 	  <table class="listing" rules="groups">
@@ -119,6 +119,8 @@
                       <![CDATA[
                         self.wl_mode := 'WL/edit';
                         self.wl_id := (control.vc_parent as vspx_row_template).te_column_value('WUOL_ID');
+                        self.wl_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', vector ())));
+
                         select WUOL_FLAG,
                                WUOL_OFFER,
                                WUOL_COMMENT,
@@ -130,7 +132,12 @@
                           from DB.DBA.WA_USER_OFFERLIST
                          where WUOL_ID = self.wl_id;
 
+                        if (get_keyword ('version', self.wl_properties) = '1.0')
                         self.wl_newProperties := vector (vector_concat (ODS..jsonObject (), vector ('id', '0', 'ontology', 'http://purl.org/goodrelations/v1#', 'items', get_keyword ('products', self.wl_properties, vector ()))));
+
+                        if (get_keyword ('version', self.wl_properties) = '2.0')
+                          self.wl_newProperties := get_keyword ('ontologies', self.wl_properties, vector ());
+
                         self.vc_data_bind(e);
                       ]]>
                     </v:on-post>
@@ -189,15 +196,33 @@
   		          Products
   		        </th>
               <td width="800px">
+              <table class="ctl_grp">
+                <tr>
+                  <td width="800px">
                 <table id="wl_tbl" class="listing">
-                  <tbody id="wl_tbody">
-                  <tr id="wl_throbber">
-                    <td>
-                      <img src="/ods/images/oat/Ajax_throbber.gif" />
-                    </td>
+                      <thead>
+                        <tr class="listing_header_row">
+                          <th>
+                            <div style="width: 16px;"><![CDATA[ ]]></div>
+                          </th>
+                          <th width="100%">
+                            Ontology
+                          </th>
+                          <th width="80px">
+                            Action
+                          </th>
                   </tr>
+                      </thead>
+                      <tbody id="wl_tbody" class="colorize">
+                        <tr id="wl_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                   </tbody>
 			  </table>
+                  </td>
+                  <td valign="top" nowrap="nowrap">
+                    <span class="button pointer" onclick="TBL.createRow('wl', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                  </td>
+                </tr>
+              </table>
                 <input type="hidden" id="wl_no" name="wl_no" value="1" />
           <script type="text/javascript">
             <![CDATA[
@@ -234,11 +259,7 @@
                 IDs := vector ();
                 ontologies := vector ();
                 self.getItems ('wl', 'gr', ontologies, IDs);
-                products := vector ();
-                if (length (ontologies))
-                  products := get_keyword ('items', ontologies[0], vector());
-
-                  self.wl_properties := vector_concat (ODS..jsonObject (), vector ('version', '1.0', 'products', products));
+                  self.wl_properties := vector_concat (ODS..jsonObject (), vector ('version', '2.0', 'ontologies', ontologies));
                 if (self.wl_mode = 'WL/add')
               {
                     if (exists (select 1 from DB.DBA.WA_USER_OFFERLIST where WUOL_U_ID = self.u_id and WUOL_TYPE = self.wl_type and WUOL_OFFER = self.wl_offer.ufl_value))
diff --git a/appsrc/ODS-Framework/uiedit_ws.vspx b/appsrc/ODS-Framework/uiedit_ws.vspx
index caf1cf2..a56a44c 100644
--- a/appsrc/ODS-Framework/uiedit_ws.vspx
+++ b/appsrc/ODS-Framework/uiedit_ws.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: uiedit_ws.vspx,v 1.1.4.2 2010/09/27 14:45:41 source Exp $
+ -  $Id: uiedit_ws.vspx,v 1.1.4.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/url_rew.sql b/appsrc/ODS-Framework/url_rew.sql
index 27b7b9b..cb5a87f 100644
--- a/appsrc/ODS-Framework/url_rew.sql
+++ b/appsrc/ODS-Framework/url_rew.sql
@@ -1,14 +1,14 @@
 --
 --  url_rev.sql
 --
---  $Id: url_rew.sql,v 1.35.2.8 2010/09/21 11:46:16 source Exp $
+--  $Id: url_rew.sql,v 1.35.2.14 2012/03/08 10:46:19 source Exp $
 --
 --  URL rewrite rules for ODS
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -201,6 +201,8 @@ create procedure DB.DBA.ODS_DET_REF (in par varchar, in fmt varchar, in val varc
 	return sprintf (fmt, 'n3');
     }
 
+  if (val like 'raw/%')
+    val := subseq (val, 4);
   iri := sioc..get_graph () ||'/'|| val;
   -- when an about, sioc or foaf is requested, we just remove. the IRI MUST be preceding path
   if (regexp_match ('http://([^/]*)/dataspace/(.*)/(about|sioc|foaf)\\.(rdf|n3|ttl)', iri) is not null)
@@ -256,7 +258,7 @@ create procedure DB.DBA.ODS_URLREW_XRDS (in path varchar)
 
 -- Person IRI as HTML
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_person_html', 1,
-    '/dataspace/(person/|organization/)?([^/#\\?]*)', vector('type', 'uname'), 1,
+    '/dataspace/(person/|organization/)([^/#\\?]*)', vector('type', 'uname'), 1,
 --    '/ods/uhome.vspx?page=1&ufname=%U&utype=%U', vector('uname', 'type'),
     '/ods/index.vsp?uname=%U&utype=%U', vector( 'uname','type'), --this line is related to the new UI. without it will not work correct. Old UI will keep working as expected.
     NULL,
@@ -275,7 +277,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_person_yadis', 1,
 
 -- Application instances page as HTML
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_apps_html', 1,
-    '/dataspace/((?!person)(?!organization)(?!all)[^/]*)/([^\\./\\?]*)/?', vector('uname', 'app'), 2,
+    '/dataspace/((?!person)(?!organization)(?!all)(?!doc)[^/]*)/([^\\./\\?]*)/?', vector('uname', 'app'), 2,
     '/ods/app_my_inst.vspx?app=%s&ufname=%s&l=1', vector('app', 'uname'),
     'DB.DBA.ODS_APPS_PAGE',
     NULL,
@@ -294,7 +296,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_yadis', 1,
     '/ods/yadis.vsp?uname=%U&type=%U', vector('uname', 'type'),
     NULL,
     NULL,
-    2);
+    1);
 
 -- APML file
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_apml', 1,
@@ -302,15 +304,16 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_apml', 1,
     '/ods/apml.vsp?uname=%U', vector('uname'),
     NULL,
     NULL,
-    2);
+    1);
 
+-- START Feeds
 -- A feed page
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_feed_html', 1,
     '/dataspace/feed/([^/\\?]*)', vector('fid'), 1,
     '/subscriptions/news.vspx?feed=%U', vector('fid'),
     NULL,
     NULL,
-    2);
+    1);
 
 -- Feed item page
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_feed_item_html', 1,
@@ -318,7 +321,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_feed_item_html', 1,
     '/subscriptions/news.vspx?feed=%s&link=%s', vector('fid', 'link'),
     NULL,
     NULL,
-    2);
+    1);
 
 
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_feed_item_html2', 1,
@@ -326,18 +329,20 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_feed_item_html2', 1,
     '/enews2/%U/news.vspx?feed=%s&link=%s', vector('instance', 'fid', 'link'),
     NULL,
     NULL,
-    2);
+    1);
 
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_feed_item_html3', 1,
     '/dataspace/([^/]*)/subscriptions/([^/]*)/news.vspx', vector('uname', 'inst'), 1,
     '/enews2/%U/news.vspx', vector('inst'),
     'DB.DBA.ODS_ATOM_PAGE',
     NULL,
-    2);
+    1);
+
+-- END Feeds
 
 -- A rule returning home page for a given instance.
 -- NB: all instances have a <home url> except discussion
-DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_inst_html', 1,
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_inst_html_post', 1,
     '/dataspace/([^/]*)/(weblog|ecrm|wiki|addressbook|socialnetwork|bookmark|briefcase|eCRM|calendar|community|subscriptions|photos|polls|mail|IM)/([^/\\?]+)',
     vector('ufname', 'app', 'inst'), 3,
     '%s', vector('inst'),
@@ -345,6 +350,14 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_inst_html', 1,
     NULL,
     2);
 
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_inst_html', 1,
+    '/dataspace/doc/([^/]*)/(weblog|ecrm|wiki|addressbook|socialnetwork|bookmark|briefcase|eCRM|calendar|community|subscriptions|photos|polls|mail|IM)/([^/\\?]+)\x24',
+    vector('ufname', 'app', 'inst'), 3,
+    '%s', vector('inst'),
+    'DB.DBA.ODS_INST_HOME_PAGE',
+    NULL,
+    1);
+
 -- Discussion home
 
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_discussion_home_html', 1,
@@ -382,15 +395,31 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_apps_page', 1,
 
 -- A rule returning home page for a given item within instance all of these having a form of <home>?id=<item id>
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_item_html', 1,
-    '/dataspace/([^/]*)/(weblog|addressbook|ecrm|bookmark|briefcase|community|subscriptions|polls|mail|eCRM|IM)/([^/]*)/((?!gems)(?!tag)[^/\\?]*)',
+    '/dataspace/doc/([^/]*)/(weblog|addressbook|ecrm|socialnetwork|bookmark|briefcase|community|subscriptions|polls|mail|eCRM|IM)/([^/]*)/((?!gems)(?!tag)[^/\\?]*)',
     vector('uname', 'app', 'inst', 'item'), 3,
     '%s?id=%s', vector('inst', 'item'),
     'DB.DBA.ODS_ITEM_PAGE',
     NULL,
     2);
 
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_item_briefcase_html', 1,
+    '/dataspace/doc/([^/]*)/(briefcase)/([^/]*)/folder/([^/\\?]*)',
+    vector('uname', 'app', 'inst', 'item'), 3,
+    '%s?id=%s&what=c', vector('inst', 'item'),
+    'DB.DBA.ODS_ITEM_PAGE',
+    NULL,
+    2);
+
 -- Wiki item is special case
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_wiki_item_html', 1,
+    '/dataspace/doc/([^/]*)/wiki/([^/]*)/([^\\?]*)',
+    vector('uname', 'inst', 'item'), 3,
+    '%s%s', vector('inst', 'item'),
+    'DB.DBA.ODS_WIKI_ITEM_PAGE',
+    NULL,
+    2);
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_wiki_item_html_post', 1,
     '/dataspace/([^/]*)/wiki/([^/]*)/([^\\?]*)',
     vector('uname', 'inst', 'item'), 3,
     '%s%s', vector('inst', 'item'),
@@ -400,7 +429,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_wiki_item_html', 1,
 
 -- Wiki item is special case
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_ecrm_item_html1', 1,
-    '/dataspace/([^/]*)/ecrm/([^/]*)/([^\\?]*)',
+    '/dataspace/doc/([^/]*)/ecrm/([^/]*)/([^\\?]*)',
     vector('uname', 'inst', 'item'), 3,
     '%s%s', vector('inst', 'item'),
     'DB.DBA.ODS_WIKI_ITEM_PAGE',
@@ -409,7 +438,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_ecrm_item_html1', 1,
 
 -- Wiki item is special case
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_ecrm_item_html2', 1,
-    '/dataspace/([^/]*)/eCRM/([^/]*)/([^\\?]*)',
+    '/dataspace/doc/([^/]*)/eCRM/([^/]*)/([^\\?]*)',
     vector('uname', 'inst', 'item'), 3,
     '%s%s', vector('inst', 'item'),
     'DB.DBA.ODS_WIKI_ITEM_PAGE',
@@ -419,7 +448,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_ecrm_item_html2', 1,
 
 -- Wiki atop-pub is special case
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_wiki_atom_html', 1,
-    '/dataspace/([^/]*)/wiki/([^/]*)/atom-pub([^\\?]*)',
+    '/dataspace/doc/([^/]*)/wiki/([^/]*)/atom-pub([^\\?]*)',
     vector('uname', 'inst', 'action'), 3,
     '/wiki/Atom/%s%s', vector('inst', 'action'),
     'DB.DBA.ODS_ATOM_PAGE',
@@ -428,7 +457,7 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_wiki_atom_html', 1,
 
 -- Photo item is special case
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_photo_item_html', 1,
-    '/dataspace/([^/]*)/photos/([^/]*)/([^/\\?]*)',
+    '/dataspace/doc/([^/]*)/photos/([^/]*)/([^/\\?]*)',
     vector('uname', 'inst', 'item'), 3,
     '/photos/%s/%s', vector('uname','item'),
     'DB.DBA.ODS_PHOTO_ITEM_PAGE',
@@ -442,10 +471,9 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_photo_gems_html', 1,
     NULL,
     2);
 
-
 -- Calendar item is special case
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_cal_item_html', 1,
-    '/dataspace/([^/]*)/calendar/([^/]*)/(Task|Event)/([^/\\?]*)',
+    '/dataspace/doc/([^/]*)/calendar/([^/]*)/(Task|Event)/([^/\\?]*)',
     vector('uname', 'inst', 'item_type', 'item'), 4,
     '%s?id=%s', vector('inst', 'item'),
     'DB.DBA.ODS_ITEM_PAGE',
@@ -522,6 +550,46 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_ecrm_rdf', 1,
     2,
     303);
 
+-- A rule returning home page for a given discussion within instance all of these having a form of <home>/conversation.vspx?id=<item id>
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_item_discussion_html', 1,
+    '/dataspace/([^/]*)/(addressbook|bookmark|subscriptions|polls)/([^/]*)/([0-9]*)/([0-9]*)',
+    vector('uname', 'app', 'inst', 'item', 'discussion'), 5,
+    '/dataspace/%s/%s/%s/conversation.vspx?id=%s', vector('uname', 'app', 'inst', 'item'),
+    NULL,
+    NULL,
+    2,
+    303);
+
+-- A rule returning home page for a given discussion within instance all of these having a form of <home>/conversation.vspx?id=<item id>
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_cal_item_discussion_html', 1,
+    '/dataspace/([^/]*)/calendar/([^/]*)/(Task|Event)/([0-9]*)/([0-9]*)',
+    vector('uname', 'inst', 'item_type', 'item', 'discussion'), 5,
+    '/dataspace/%s/calendar/%s/conversation.vspx?id=%s', vector('uname', 'inst', 'item'),
+    NULL,
+    NULL,
+    2,
+    303);
+
+-- A rule returning home page for a given annotation within instance all of these having a form of <home>/annotea.vspx?id=<item id>
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_item_annotation_html', 1,
+    '/dataspace/([^/]*)/(addressbook|bookmark|subscriptions|polls)/([^/]*)/([0-9]*)/annotation/([0-9]*)',
+    vector('uname', 'app', 'inst', 'item', 'annotation'), 5,
+    '/dataspace/%s/%s/%s/annotea.vspx?oid=%s&id=%s', vector('uname', 'app', 'inst', 'item', 'annotation'),
+    NULL,
+    NULL,
+    2,
+    303);
+
+-- A rule returning home page for a given discussion within instance all of these having a form of <home>/conversation.vspx?id=<item id>
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_cal_item_annotation_html', 1,
+    '/dataspace/([^/]*)/calendar/([^/]*)/(Task|Event)/([0-9]*)/annotation/([0-9]*)',
+    vector('uname', 'inst', 'item_type', 'item', 'annotation'), 5,
+    '/dataspace/%s/calendar/%s/annotea.vspx?oid=%s&id=%s', vector('uname', 'inst', 'item', 'annotation'),
+    NULL,
+    NULL,
+    2,
+    303);
+
 --DB.DBA.VHOST_REMOVE (lpath=>'/ods/data/rdf');
 --DB.DBA.VHOST_DEFINE (lpath=>'/ods/data/rdf', ppath=>'/DAV/VAD/wa/RDFData/All/', is_dav=>1, vsp_user=>'dba',
 --    opts=>vector ('url_rewrite', 'ods_rule_tcn_list'));
@@ -542,20 +610,15 @@ create procedure DB.DBA.ODS_RDF_URI_LOC (in id int, in variant varchar)
 ;
 
 delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'ods_rule_list1';
-DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.rdf', 'application/rdf+xml', 0.95,
-    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
-DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.n3', 'text/rdf+n3', 0.80,
-    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
-DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.nt', 'text/n3', 0.80,
-    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
-DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.turtle', 'text/turtle', 0.70,
-    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
-DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.ttl', 'text/rdf+ttl', 0.70,
-    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
---DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.txt', 'text/plain', 0.65,
---    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
-DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'iid%20%28([0-9]*)%29\x24', 'iid%20%28\x241%29.json', 'application/json', 0.80,
-    location_hook=>'DB.DBA.ODS_RDF_URI_LOC');
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.json',   'application/json',    1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.txt',    'text/plain',          1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.turtle', 'text/turtle',         1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.ttl',    'text/rdf+ttl',        1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.n3',     'text/rdf+n3',         1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.nt',     'text/n3',             1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.rdf',    'application/rdf+xml', 1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.jmd',    'application/microdata+json', 1.0, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('ods_rule_list1', 'sioc\x24', 'sioc.jld',    'application/ld+json', 1.0, location_hook=>null);
 
 create procedure DB.DBA.ODS_URLREW_HDR (in in_path varchar)
 {
@@ -573,7 +636,12 @@ create procedure DB.DBA.ODS_URLREW_HDR (in in_path varchar)
       	vector ('rdf',  'RDF/XML', 'application/rdf+xml'), 
       	vector ('nt',   'N3/Turtle', 'text/n3'), 
       	vector ('n3',   'N3/Turtle', 'text/rdf+n3'), 
-	vector ('json', 'RDF/JSON', 'application/json')
+	vector ('json', 'RDF/JSON', 'application/json'),
+	vector ('txt', 	'N-Triples', 'text/plain'),
+	vector ('turtle','N3/Turtle', 'text/turtle'),
+	vector ('ttl', 	'N3/Turtle', 'text/rdf+ttl'),
+	vector ('jmd', 	'Microdata+JSON', 'application/microdata+json'),
+	vector ('jld', 	'JSON-LD', 'application/ld+json')
 	);
   path := regexp_replace (in_path, '/(about|foaf|sioc)\\.([a-z0-9]+)\x24', '', 1, null);	
   if (regexp_match ('/dataspace/(person|organization)/([^/]+)\x24', path) is not null)
@@ -619,28 +687,49 @@ create procedure DB.DBA.ODS_URLREW_HDR (in in_path varchar)
 }
 ;
 
--- RDF data rules - these was returning 303
+-- RDF data rules - these returns 303
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_html', 1,
+    '/dataspace/((?!(doc|person|organization|raw)/)[^\\?]*)\x24', vector('path'), 1,
+    '/dataspace/doc/%s', vector('path'),
+    null, --'DB.DBA.ODS_DET_REF',
+    '(text/html)|(\\*/\\*)',
+    2,
+    303,
+    null --'^{sql:DB.DBA.ODS_URLREW_HDR}^'
+    );
+
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_rdf', 1,
     '/dataspace/([^\\?]*)', vector('path'), 1,
-    '/ods/data/rdf/%U', vector('path'),
-    'DB.DBA.ODS_DET_REF',
-    '(application/rdf.xml)|(text/rdf.n3)|(text/rdf.turtle)|(text/rdf.ttl)|([a-z]+/turtle)|(application/x-turtle)|(text/n3)|(application/json)',
+    '/dataspace/raw/%s/sioc', vector('path'),
+    null, --'DB.DBA.ODS_DET_REF',
+    '(application/rdf.xml)|(text/rdf.n3)|(text/rdf.turtle)|(text/rdf.ttl)|([a-z]+/turtle)|(application/x-turtle)|(text/n3)|(application/json)|(application/microdata+json)|(application/ld+json)',
     2,
-    null,
-    '^{sql:DB.DBA.ODS_URLREW_HDR}^');
+    303,
+    null --'^{sql:DB.DBA.ODS_URLREW_HDR}^'
+    );
 
--- RDF data rule
+-- XXX: RDF data rule
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_rdf_next', 1,
     '/dataspace/(.*)/page/([0-9]*)', vector('path', 'page'), 1,
     '/ods/data/rdf/%U.%U?page=%U', vector('path', '*accept*', 'page'),
     'DB.DBA.ODS_DET_REF',
-    '(application/rdf.xml)|(text/rdf.n3)|(text/rdf.turtle)|(text/rdf.ttl)|([a-z]+/turtle)|(application/x-turtle)|(text/n3)|(application/json)',
+    '(application/rdf.xml)|(text/rdf.n3)|(text/rdf.turtle)|(text/rdf.ttl)|([a-z]+/turtle)|(application/x-turtle)|(text/n3)|(application/json)|(application/microdata+json)|(application/ld+json)',
     2,
-    null,
-    '^{sql:DB.DBA.ODS_URLREW_HDR}^');
+    303,
+    null --'^{sql:DB.DBA.ODS_URLREW_HDR}^'
+    );
 
 -- Rule for about, sioc, foaf etc. RDF resources
 DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_rdf_res', 1,
+    '/dataspace/raw/(.*)/(about|foaf|sioc)\\.([^\\?]*)', vector('path', 'dummy', 'ext'), 1,
+    '/ods/data/rdf/%U.%U', vector('path', 'ext'),
+    'DB.DBA.ODS_DET_REF',
+    NULL,
+    2,
+    null,
+    '^{sql:DB.DBA.ODS_URLREW_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ods_rdf_res_2', 1,
     '/dataspace/(.*)/(about|foaf|sioc)\\.([^\\?]*)', vector('path', 'dummy', 'ext'), 1,
     '/ods/data/rdf/%U.%U', vector('path', 'ext'),
     'DB.DBA.ODS_DET_REF',
@@ -675,33 +764,42 @@ DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_rule_list1', 1,
 	  'ods_all_apps_html',
 	  'ods_yadis',
 	  'ods_apml',
+	  'ods_feed_item_html2',
+	  'ods_feed_item_html3',
+	  'ods_feed_item_html',
 	  'ods_feed_html',
+	  'ods_inst_html_post',
 	  'ods_inst_html',
 	  'ods_discussion_page',
 	  'ods_discussion_home_html',
 	  'ods_discussion_html',
 	  'ods_item_html',
+    'ods_item_briefcase_html',
+    'ods_item_discussion_html',
+    'ods_item_annotation_html',
 	  'ods_wiki_item_html',
+	  'ods_wiki_item_html_post',
 	  'ods_wiki_atom_html',
 	  'ods_ecrm_item_html1',
 	  'ods_ecrm_item_html2',
-	  'ods_feed_item_html',
-	  'ods_feed_item_html2',
-	  'ods_feed_item_html3',
 	  'ods_photo_item_html',
 	  'ods_photo_gems_html',
 	  'ods_cal_item_html',
+    'ods_cal_item_discussion_html',
+    'ods_cal_item_annotation_html',
 	  'ods_cal_atom_html',
 	  'ods_apps_gems_html',
 	  'ods_apps_tags_html',
-	  'ods_apps_page',
 	  'ods_discussion_item_html',
 	  'ods_blog_tag',
 	  'ods_main',
 	  'ods_space_html',
+	  'ods_html',
+	  'ods_apps_page',
 	  'ods_rdf',
-	  'ods_rdf_next',
+	  --'ods_rdf_next',
 	  'ods_rdf_res',
+	  'ods_rdf_res_2',
 	  'ods_moat_res',
 	  'ods_ecrm_rdf',
 	  'ods_error'
diff --git a/appsrc/ODS-Framework/url_rule.vspx b/appsrc/ODS-Framework/url_rule.vspx
index 2994bd3..d94c05c 100644
--- a/appsrc/ODS-Framework/url_rule.vspx
+++ b/appsrc/ODS-Framework/url_rule.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: url_rule.vspx,v 1.2.2.2 2011/01/25 14:11:29 source Exp $
+ -  $Id: url_rule.vspx,v 1.2.2.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/user_rdf.sql b/appsrc/ODS-Framework/user_rdf.sql
index 8829dfe..83929e9 100644
--- a/appsrc/ODS-Framework/user_rdf.sql
+++ b/appsrc/ODS-Framework/user_rdf.sql
@@ -1,10 +1,10 @@
 --
---  $Id: user_rdf.sql,v 1.8.2.1 2010/09/20 10:15:31 source Exp $
+--  $Id: user_rdf.sql,v 1.8.2.2 2012/03/08 10:46:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/user_template.vspx b/appsrc/ODS-Framework/user_template.vspx
index 8f41751..c831e3f 100644
--- a/appsrc/ODS-Framework/user_template.vspx
+++ b/appsrc/ODS-Framework/user_template.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: user_template.vspx,v 1.6.2.1 2010/09/20 10:15:31 source Exp $
+ -  $Id: user_template.vspx,v 1.6.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/users/css/users.css b/appsrc/ODS-Framework/users/css/users.css
index e73d441..573247c 100644
--- a/appsrc/ODS-Framework/users/css/users.css
+++ b/appsrc/ODS-Framework/users/css/users.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: users.css,v 1.2.2.9 2010/12/20 12:27:09 source Exp $
+ *  $Id: users.css,v 1.2.2.10 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/users/js/users.js b/appsrc/ODS-Framework/users/js/users.js
index 8586f85..7e55e76 100644
--- a/appsrc/ODS-Framework/users/js/users.js
+++ b/appsrc/ODS-Framework/users/js/users.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -486,9 +486,9 @@ function buildObjByChildNodes(elm) {
 	return obj;
 }
 
-
 // publics
 var lfTab;
+var lfNotReturn = true;
 var rfTab;
 var ufTab;
 var pfPages = [['pf_page_0_0', 'pf_page_0_1', 'pf_page_0_2', 'pf_page_0_3', 'pf_page_0_4', 'pf_page_0_5', 'pf_page_0_6', 'pf_page_0_7', 'pf_page_0_8', 'pf_page_0_9', 'pf_page_0_10'], ['pf_page_1_0', 'pf_page_1_1', 'pf_page_1_2', 'pf_page_1_3'], ['pf_page_2_0', 'pf_page_2_1', 'pf_page_2_2', 'pf_page_2_3', 'pf_page_2_4', 'pf_page_2_5', 'pf_page_2_6']];
@@ -501,6 +501,7 @@ var userData;
 var sslData;
 var aclData;
 var facebookData;
+var sslLinks = {"in": [], "up": []};
 var validateSession = false;
 
 // init
@@ -524,7 +525,7 @@ function init()
     var S = '/ods/api/user.validate?sid=' + encodeURIComponent($v('sid')) + '&realm=' + encodeURIComponent($v('realm'));
     var x = function (data) {
       var xml = OAT.Xml.createXmlDoc(data);
-      if (!hasError(xml)) {
+      if (!hasError(xml, false)) {
         validateSession = true;
       }
     }
@@ -537,6 +538,8 @@ function init()
       OAT.Dom.show('lf_tab_1');
 		lfTab.add("lf_tab_1", "lf_page_1");
 		lfTab.add("lf_tab_2", "lf_page_2");
+    if (regData.sslEnable)
+      OAT.Dom.show('lf_tab_3');
 		lfTab.add("lf_tab_3", "lf_page_3");
     if (regData.twitterEnable)
       OAT.Dom.show('lf_tab_4');
@@ -551,30 +554,18 @@ function init()
       OAT.Dom.hide('rf');
       if (uriParams['oid-mode'] == 'twitter') {
         lfTab.go(4);
-        OAT.AJAX.POST ('/ods/api/user.authenticate' +
-          '?oauthMode=twitter' +
-          '&oauthSid=' + encodeURIComponent(uriParams['sid']) +
-          '&oauthVerifier=' + encodeURIComponent(uriParams['oauth_verifier']) +
-          '&oauthToken=' + encodeURIComponent(uriParams['oauth_token']), null, afterLogin);
+        lfNotReturn = false;
+        loginSubmit(4, 'lf');
       }
-      else if (uriParams['oid-mode'] == 'linkedin')
-      {
+      else if (uriParams['oid-mode'] == 'linkedin') {
         lfTab.go(5);
-        OAT.AJAX.POST ('/ods/api/user.authenticate' +
-          '?oauthMode=linkedin' +
-          '&oauthSid=' + encodeURIComponent(uriParams['sid']) +
-          '&oauthVerifier=' + encodeURIComponent(uriParams['oauth_verifier']) +
-          '&oauthToken=' + encodeURIComponent(uriParams['oauth_token']), null, afterLogin);
+        lfNotReturn = false;
+        loginSubmit(5, 'lf');
       }
-      else
-      {
-        $('lf_openId').value = uriParams['openid.identity'];
+      else if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '') {
       lfTab.go(1);
-      if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '') {
-          OAT.AJAX.POST ('/ods/api/user.authenticate', openIdLoginURL(uriParams), afterLogin);
-      } else if (typeof (uriParams['openid.mode']) != 'undefined' && uriParams['openid.mode'] == 'cancel') {
-      alert('OpenID Authentication Failed');
-    }
+        $('lf_openId').value = uriParams['openid.identity'];
+        loginSubmit(1, 'lf');
       }
 				}
 	}
@@ -585,6 +576,8 @@ function init()
       OAT.Dom.show('rf_tab_1');
 		rfTab.add("rf_tab_1", "rf_page_1");
 		rfTab.add("rf_tab_2", "rf_page_2");
+    if (regData.sslEnable)
+      OAT.Dom.show('rf_tab_3');
 		rfTab.add("rf_tab_3", "rf_page_3");
     if (regData.twitterEnable)
       OAT.Dom.show('rf_tab_4');
@@ -607,8 +600,9 @@ function init()
           if (user && user.getElementsByTagName('id')[0]) {
             hiddenCreate('twitter-data', null, data);
             var tbl = $('rf_table_4');
-            addProfileRowValue(tbl, 'Login Name', tagValue(user, 'screen_name'));
-            addProfileRowInput(tbl, 'E-Mail', 'rf_twitter_email');
+            addProfileRowInput(tbl, 'Login Name', 'rf_uid_4', {width: '150px', value: tagValue(user, 'screen_name')});
+            addProfileRowInput(tbl, 'E-Mail', 'rf_email_4', {width: '300px'});
+            rfCheckUpdate(4);
           }
           else
           {
@@ -632,8 +626,9 @@ function init()
           if (user && user.getElementsByTagName('id')[0]) {
             hiddenCreate('linkedin-data', null, data);
             var tbl = $('rf_table_5');
-            rfRowValue(tbl, 'Login Name', OAT.Xml.textValue(user.getElementsByTagName('first-name')[0]));
-            rfRowInput(tbl, 'E-Mail', 'rf_linkedin_email');
+            addProfileRowInput(tbl, 'Login Name', 'rf_uid_5', {width: '150px', value: OAT.Xml.textValue(user.getElementsByTagName('first-name')[0])});
+            addProfileRowInput(tbl, 'E-Mail', 'rf_email_5', {width: '300px'});
+            rfCheckUpdate(5);
           }
           else
           {
@@ -652,14 +647,14 @@ function init()
 	    rfTab.go(1);
       if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '') {
         var x = function (params, param, data, property) {
-          if (params[param] && params[param].length != 0)
+            if (params[param] && params[param].length != 0 &&  params[param] != 'undefined')
             data[property] = params[param];
         }
         var data = {};
         var ns;
         for (var prop in uriParams) {
           if (uriParams.hasOwnProperty(prop) && (uriParams[prop] == 'http://openid.net/srv/ax/1.0')) {
-            ns = prop.replace('openid.ax.', '');
+              ns = prop.replace('openid.ns.', '');
             break;
           }
         }
@@ -668,6 +663,7 @@ function init()
           x(uriParams, 'openid.'+ns+'.value.email', data, 'mbox');
           x(uriParams, 'openid.'+ns+'.value.firstname', data, 'firstName');
           x(uriParams, 'openid.'+ns+'.value.fname', data, 'name');
+            x(uriParams, 'openid.'+ns+'.value.fullname', data, 'name');
           x(uriParams, 'openid.'+ns+'.value.language', data, 'language');
           x(uriParams, 'openid.'+ns+'.value.lastname', data, 'family_name');
           x(uriParams, 'openid.'+ns+'.value.fname', data, 'nick');
@@ -688,17 +684,14 @@ function init()
 
         $('rf_openId').value = uriParams['openid.identity'];
         $('rf_is_agreed').checked = true;
-        if (!data['nick'] || !data['mbox']) {
           hiddenCreate('oid-data', null, OAT.JSON.stringify(data));
+
           var tbl = $('rf_table_1');
-          if (!data['nick'])
-            addProfileRowInput(tbl, 'Login Name', 'rf_openid_uid');
-          if (!data['mbox'])
-            addProfileRowInput(tbl, 'E-Mail', 'rf_openid_email');
-        } else {
-        var q = 'mode=1&data=' + encodeURIComponent(OAT.JSON.stringify(data));
-        OAT.AJAX.POST ("/ods/api/user.register", q, afterSignup);
-      }
+          addProfileRowInput(tbl, 'Login Name', 'rf_uid_1', {value: data['nick'], width: '150px'});
+          addProfileRowInput(tbl, 'E-Mail', 'rf_email_1', {value: data['mbox'], width: '300px'});
+          if (data['name'])
+            addProfileRowValue(tbl, 'Full Name', data['name']);
+          rfCheckUpdate(1);
       }
       else if (typeof (uriParams['openid.mode']) != 'undefined' && uriParams['openid.mode'] == 'cancel')
       {
@@ -707,6 +700,9 @@ function init()
       }
 			}
 		}
+	if (($v('mode') == 'html') && typeof (uriParams['form']) != 'undefined' && uriParams['form'] == 'register')
+    lfRegisterSubmit(null, true);
+
 	if ($("lf") || $("rf") || $("pf")) {
 		loadFacebookData(function() {
 			if (facebookData)
@@ -720,29 +716,52 @@ function init()
 				});
 		});
 	}
-	if (($("lf") || $("rf")) && (document.location.protocol == 'https:') && regData.sslEnable) {
+  if (($("lf") || $("rf")) && regData.sslEnable) {
 		var x = function(data) {
 		  var x2 = function(prefix) {
 		  	OAT.Dom.show(prefix+"_tab_3");
 				var tbl = $(prefix+'_table_3');
 				if (tbl) {
+          OAT.Dom.unlink(prefix+'_table_3_throbber');
 					addProfileRowValue(tbl, 'WebID', sslData.iri);
+          if (sslData.depiction)
+            addProfileRowImage(tbl, 'Photo', sslData.depiction);
+
+          if (sslData.loginName && sslData.certLogin)
+            addProfileRowValue(tbl, 'Login Name', sslData.loginName);
+
+          if ((prefix == "rf") && !sslData.certLogin)
+            addProfileRowInput(tbl, 'Login Name', 'rf_uid_3', {value: sslData.loginName, width: '150px'});
+
+          if (sslData.mbox && ((prefix == "lf") || ((prefix == "rf") && sslData.certLogin)))
+            addProfileRowValue(tbl, 'E-Mail', sslData.mbox);
+
+          if ((prefix == "rf") && !sslData.certLogin)
+            addProfileRowInput(tbl, 'E-Mail', 'rf_email_3', {value: sslData.mbox, width: '300px'});
+
 					if (sslData.firstName)
 						addProfileRowValue(tbl, 'First Name', sslData.firstName);
+
 					if (sslData.family_name)
 						addProfileRowValue(tbl, 'Family Name', sslData.family_name);
-					if (sslData.mbox)
-						addProfileRowValue(tbl, 'E-Mail', sslData.mbox);
+
           if (prefix == "lf") {
+            if (!sslData.certLogin) {
+              var td = addProfileRowText(tbl, 'Sign up for an ODS account using your existing WebID - ', 'font-weight: bold;');
+              addProfileRowButton2(td, 'sign_up_1');
+            } else {
             lfTab.go(3);
-          } else if (prefix == "rf") {
-					  if (!sslData.nick && !sslData.name)
-              addProfileRowInput(tbl, 'Login Name', 'rf_webid_uid');
-					  if (!sslData.mbox)
-              addProfileRowInput(tbl, 'E-Mail', 'rf_webid_email');
+            }
+          }
+          else if (prefix == "rf")
+          {
+            if (sslData.certLogin) {
+              var td = addProfileRowText(tbl, 'You have registered WebID. You can sign in with it! - ', 'font-weight: bold; ');
+              addProfileRowButton(td, 'sign_in_1');
+            } else {
+              rfCheckUpdate(3);
             rfTab.go(3);
-            if (!$("lf"))
-              rfSSLAutomaticLogin();
+            }
           }
 			  }
 		  }
@@ -753,13 +772,30 @@ function init()
 				sslData = null;
 			}
 			if (sslData && sslData.iri) {
-			  if (sslData.certLogin)
 			  x2('lf');
-			  if (!sslData.certLogin)
 			  x2('rf');
 			}
 		}
+    if (document.location.protocol == 'https:') {
 		OAT.AJAX.GET('/ods/api/user.getFOAFSSLData?sslFOAFCheck=1', '', x);
+    } else {
+      OAT.Dom.show('lf_tab_3');
+      var tbl = $('lf_table_3');
+      if (tbl) {
+        OAT.Dom.unlink('lf_table_3_throbber');
+        var td = addProfileRowText(tbl, 'Have you registered WebID? Sign in with it - ', 'font-weight: bold;');
+        addProfileRowButton(td, 'sign_in_2');
+        var td2 = addProfileRowText(tbl, 'Sign up for an ODS account using your existing WebID - ', 'font-weight: bold;');
+        addProfileRowButton2(td2, 'sign_up_2');
+      }
+      OAT.Dom.show('rf_tab_3');
+      var tbl = $('rf_table_3');
+      if (tbl) {
+        OAT.Dom.unlink('rf_table_3_throbber');
+        var td3 = addProfileRowText(tbl, 'Sign up for an ODS account using your existing WebID - ', 'font-weight: bold;');
+        addProfileRowButton2(td3, 'sign_up_3');
+      }
+    }
 	}
   if (document.location.protocol != 'https:')
   {
@@ -771,6 +807,7 @@ function init()
       if (o && o.sslPort)
       {
         var a = OAT.Dom.create ("a");
+        a.id = 'span_ssl';
         a.href = 'https://' + document.location.hostname + ((o.sslPort != '443')? ':' + o.sslPort: '') + document.location.pathname;
 
         var img = OAT.Dom.image('/ods/images/icons/lock_16.png');
@@ -778,6 +815,14 @@ function init()
         img.alt = 'ODS Users SSL Link';
 
         OAT.Dom.append([a, img], ['ob_right', a]);
+
+        var links = sslLinks['in'];
+        for (var i = 0; i < links.length; i++)
+          links[i].href = a.href;
+
+        var links = sslLinks['up'];
+        for (var i = 0; i < links.length; i++)
+          links[i].href = a.href + '?form=register';
       }
     }
     OAT.AJAX.GET ('/ods/api/server.getInfo?info=sslPort', false, x);
@@ -824,27 +869,8 @@ function init()
     OAT.Event.attach("pf_tab_2_2", 'click', function(){pfTabSelect('pf_tab_2_', 2, 2);});
     OAT.Event.attach("pf_tab_2_3", 'click', function(){pfTabSelect('pf_tab_2_', 2, 3);});
     OAT.Event.attach("pf_tab_2_4", 'click', function(){pfTabSelect('pf_tab_2_', 2, 4);});
-    var x = function (data) {
-      var url;
-      try {
-        var url = OAT.JSON.parse(data);
-      } catch (e) { url = null; }
-      if (url != null) {
-        if (url != '') {
-          var a = OAT.Dom.create('a');
-          a.href = url;
-          a.innerHTML = 'Certificate Generator';
-          a.style.cssText = 'color: #000; text-decoration: none;';
-          $("pf_tab_2_5").innerHTML = '';
-          $("pf_tab_2_5").appendChild(a);
-          OAT.Dom.show("pf_tab_2_5");
-        }
-      } else {
-        OAT.Event.attach("pf_tab_2_5", 'click', function(){pfTabSelect('pf_tab_2_', 2, 5);});
-      OAT.Dom.show("pf_tab_2_5");
-      }
-    }
-    OAT.AJAX.GET ('/ods/api/user.certificateUrl?sid='+encodeURIComponent($v('sid'))+'&realm='+encodeURIComponent($v('realm')), false, x, {async: false});
+    // pf_tab_2_5
+    ufCertificateGenerator();
     OAT.Event.attach("pf_tab_2_6", 'click', function(){pfTabSelect('pf_tab_2_', 2, 6);});
 
     pfTabInit('pf_tab_2_', $v('formTab2'));
@@ -854,6 +880,15 @@ function init()
     if (typeof (uriParams['userName']) != 'undefined' && uriParams['userName'] != '')
       userName = uriParams['userName'];
 
+    if (!userName) {
+      var path = document.location.pathname.split('/');
+      if (path.length > 3) {
+        var tmp = path[3];
+        if (tmp.indexOf('~') == 0)
+          userName = tmp.substring(1);
+      }
+    }
+
     if (validateSession || userName)
       selectProfile(userName);
   }
@@ -863,14 +898,18 @@ function init()
 
 function lfCallback(oldIndex, newIndex)
 {
+  $('lf_login').disabled = false;
   if (newIndex == 0)
     $('lf_login').value = 'Login';
   else if (newIndex == 1)
     $('lf_login').value = 'OpenID Login';
   else if (newIndex == 2)
     $('lf_login').value = 'Facebook Login';
-  else if (newIndex == 3)
+  else if (newIndex == 3) {
     $('lf_login').value = 'WebID Login';
+    if ((document.location.protocol == 'http:') || (sslData && !sslData.certLogin))
+      $('lf_login').disabled = true;
+  }
   else if (newIndex == 4)
     $('lf_login').value = 'Twitter Login';
   else if (newIndex == 5)
@@ -881,22 +920,37 @@ function lfCallback(oldIndex, newIndex)
 
 function rfCallback(oldIndex, newIndex)
 {
+  $('rf_signup').disabled = false;
   if (newIndex == 0)
     $('rf_signup').value = 'Sign Up';
   else if (newIndex == 1)
     $('rf_signup').value = 'OpenID Sign Up';
   else if (newIndex == 2)
     $('rf_signup').value = 'Facebook Sign Up';
-  else if (newIndex == 3)
+  else if (newIndex == 3) {
     $('rf_signup').value = 'WebID Sign Up';
+    if ((document.location.protocol == 'http:') || (sslData && sslData.certLogin))
+      $('rf_signup').disabled = true;
+  }
   else if (newIndex == 4)
     $('rf_signup').value = 'Twitter Sign Up';
   else if (newIndex == 5)
     $('rf_signup').value = 'LinkedIn Sign Up';
 
+  rfCheckUpdate(newIndex, true);
+
   pageFocus('rf_page_'+newIndex);
 }
 
+function rfCheckUpdate(idx, mode) {
+  if (!mode && (rfTab.selectedIndex != idx))
+    return;
+
+  $('rf_check').disabled = true;
+  if ($('rf_uid_'+idx))
+    $('rf_check').disabled = false;
+}
+
 function myCancel(prefix)
 {
   needToConfirm = false;
@@ -1047,8 +1101,7 @@ function myValidateInputs(fld)
   var formTab2 = parseInt($v('formTab2'));
   var div = $(pfPages[formTab][formTab2]);
 
-  for (var i = 0; i < form.elements.length; i++)
-  {
+  for (var i = 0; i < form.elements.length; i++) {
     if (!form.elements[i])
       continue;
 
@@ -1173,7 +1226,7 @@ function pfSetACLSelects (obj)
     if (ctrl.disabled)
       continue;
 
-   	if (ctrl.name.indexOf('pf_acl_') != 0)
+     if ((ctrl.name.indexOf('pf_acl_') != 0) && (ctrl.name.indexOf('x1_fld_2_') != 0))
       continue;
 
    	if (!OAT.Dom.isChild(ctrl, div))
@@ -1313,7 +1366,7 @@ function pfShowOnlineAccounts(prefix, accountType, showRow)
 		if (o) {
       var tbl = prefix+'_tbl';
     	for (var N = 0; N < o.length; N++) {
-   			showRow(prefix, o[N][0], o[N][1], o[N][2]);
+         showRow(prefix, o[N][0], o[N][1], o[N][2], o[N][3]);
         rowCount++;
     	}
     }
@@ -1376,7 +1429,7 @@ function pfShowList(api, prefix, noMsg, cols, idIndex, cb)
 			o = null;
 		}
 		var tbody = $(prefix+'_tbody');
-		tbody.innerHTML = '';
+    OAT.Dom.clear(tbody);
 		if (o) {
     	for (var N = 0; N < o.length; N++) {
     	  var id = o[N][idIndex];
@@ -1462,7 +1515,7 @@ function pfShowOwn(mode, id)
 {
   pfShowMode('pf051', mode, id);
   var x = function (obj) {
-    $('ow_tbody').innerHTML = '';
+    OAT.Dom.clear('ow_tbody');
     RDF.tablePrefix = 'ow';
     RDF.tableOptions = {itemType: {fld_1: {cssText: "display: none;"}, btn_1: {cssText: "display: none;"}}};
     RDF.itemTypes = obj.properties;
@@ -1501,7 +1554,7 @@ function pfShowOffer(mode, id)
 {
   pfShowMode('pf054', mode, id);
   var x = function (obj) {
-    $('ol_tbody').innerHTML = '';
+    OAT.Dom.clear('ol_tbody');
     RDF.tablePrefix = 'ol';
     RDF.tableOptions = {itemType: {fld_1: {cssText: "display: none;"}, btn_1: {cssText: "display: none;"}}};
     RDF.itemTypes = obj.properties;
@@ -1514,7 +1567,7 @@ function pfShowSeek(mode, id)
 {
   pfShowMode('pf055', mode, id);
   var x = function(obj) {
-    $('wl_tbody').innerHTML = '';
+    OAT.Dom.clear('wl_tbody');
     RDF.tablePrefix = 'wl';
     RDF.tableOptions = {itemType: {fld_1: {cssText: "display: none;"}, btn_1: {cssText: "display: none;"}}};
     RDF.itemTypes = obj.properties;
@@ -1527,7 +1580,7 @@ function pfShowLike(mode, id)
 {
   pfShowMode('pf056', mode, id);
   var x = function(obj) {
-    $('ld_tbody').innerHTML = '';
+    OAT.Dom.clear('ld_tbody');
     RDF.tablePrefix = 'ld';
     RDF.tableOptions = {itemType: {fld_1: {cssText: "display: none;"}, btn_1: {cssText: "display: none;"}}};
     RDF.itemTypes = obj.properties;
@@ -1604,7 +1657,6 @@ function loadFacebookData(cb) {
 		if (facebookData && regData.facebookEnable) {
 			OAT.Dom.show("lf_tab_2");
 			OAT.Dom.show("rf_tab_2");
-      OAT.Dom.show("pf_tab_2_3");
 		}
 		if (cb) {cb()};
 	}
@@ -1625,8 +1677,13 @@ function showFacebookData(skip) {
   	if (facebookData && facebookData.name) {
       if (lfLabel)
         lfLabel.innerHTML = 'Connected as <b><i>' + facebookData.name + '</i></b></b>';
-      if (rfLabel)
+      if (rfLabel) {
         rfLabel.innerHTML = 'Connected as <b><i>' + facebookData.name + '</i></b></b>';
+        var tbl = $('rf_table_2');
+        addProfileRowInput(tbl, 'Login Name', 'rf_uid_2', {value: (facebookData.name).replace(' ', ''), width: '150px'});
+        addProfileRowInput(tbl, 'E-Mail', 'rf_email_2', {value: '', width: '300px'});
+        rfCheckUpdate(2);
+      }
       if (pfLabel) {
         pfLabel.innerHTML = 'Connected as <b><i>' + facebookData.name + '</i></b></b>'
         hiddenCreate('pf_securityFacebookID', null, facebookData.uid);
@@ -1646,8 +1703,9 @@ function hideFacebookData() {
 	if (label)
   	label.innerHTML = '';
   var label = $('pf_facebookData');
-  if (label)
+  if (label) {
     label.innerHTML = '';
+  }
 	if (facebookData) {
 	var o = {}
 	o.api_key = facebookData.api_key;
@@ -1850,7 +1908,7 @@ function showProfileNew(xmlDoc) {
         div.innerHTML = OAT.Xml.serializeXmlDoc(result);
     }
     }
-    OAT.AJAX.GET('users.xsl', false, x);
+    OAT.AJAX.GET('/ods/users/users.xsl', false, x);
   }
 }
 
@@ -1913,7 +1971,7 @@ function showProfile(user) {
         addProfileRow(tbl, user, 'gender',    'Gender');
         addProfileRow(tbl, user, 'birthday',  'Birthday');
         addProfileRow(tbl, user, 'homepage',  'Personal Webpage');
-				addProfileTableValues(tbl, 'Personal URIs (Web IDs)', tagValue(user, 'webIDs'), [ 'URL' ], [ '\n' ])
+    addProfileTableValues(tbl, 'Other Personal URIs (WebIDs)', tagValue(user, 'webIDs'), [ 'URL', 'Access' ], [ '\n', ';' ])
 				addProfileTableValues(tbl, 'Topic of Interests', tagValue(user, 'interests'), [ 'URL', 'Label' ], [ '\n', ';' ])
 				addProfileTableValues(tbl, 'Thing of Interests', tagValue(user, 'topicInterests'), [ 'URL', 'Label' ], [ '\n', ';' ])
       }
@@ -1979,6 +2037,38 @@ function showProfile(user) {
   		OAT.AJAX.POST('/ods_services/Http/connectionsGet?scope=own&sid='+$v('sid'), false, renderConnectionsWidget);
     }
 
+function addProfileRowText(tbl, txt, txtCSSText) {
+  var tr = OAT.Dom.create('tr');
+  var td = OAT.Dom.create('td');
+  td.colSpan = 2;
+  td.style.cssText = txtCSSText;
+  td.innerHTML = txt;
+  tr.appendChild(td);
+  tbl.appendChild(tr);
+
+  return td;
+}
+
+function addProfileRowButton(td, id) {
+  var a = OAT.Dom.create ("a");
+  a.id = id;
+  a.href = document.location.protocol + '//' + document.location.host + document.location.pathname;
+  a.innerHTML = 'Sign In (SSL)';
+
+  td.appendChild(a);
+  sslLinks['in'].push(a);
+}
+
+function addProfileRowButton2(td, id) {
+  var a = OAT.Dom.create ("a");
+  a.id = id;
+  a.href = document.location.protocol + '//' + document.location.host + document.location.pathname + '?form=register';
+  a.innerHTML = 'Sign Up (SSL)';
+
+  td.appendChild(a);
+  sslLinks['up'].push(a);
+}
+
 function addProfileRow(tbl, xml, tagLabel, label) {
   var value = tagValue(xml, tagLabel);
   if (value)
@@ -1986,12 +2076,12 @@ function addProfileRow(tbl, xml, tagLabel, label) {
 }
 
 function addProfileRowValue(tbl, label, value, leftTag) {
-	if (!leftTag) {
+  if (!leftTag)
 		leftTag = 'th';
-	}
+
   var tr = OAT.Dom.create('tr');
-  var th = OAT.Dom.create(leftTag);
-  th.width = '30%';
+  var th = OAT.Dom.create(leftTag, {verticalAlign: 'top'});
+  th.width = '20%';
   th.innerHTML = label;
   tr.appendChild(th);
 	if (value) {
@@ -2002,22 +2092,43 @@ function addProfileRowValue(tbl, label, value, leftTag) {
   tbl.appendChild(tr);
 }
 
-function addProfileRowInput(tbl, label, fName) {
+function addProfileRowImage(tbl, label, value, leftTag) {
+  if (!leftTag)
+    leftTag = 'th';
+
+  var tr = OAT.Dom.create('tr');
+  var th = OAT.Dom.create(leftTag, {verticalAlign: 'top'});
+  th.width = '20%';
+  th.innerHTML = label;
+  tr.appendChild(th);
+  if (value) {
+    var td = OAT.Dom.create('td');
+    var img = OAT.Dom.create('img', {}, 'resize');
+    img.src = value;
+    td.appendChild(img);
+    tr.appendChild(td);
+  }
+  tbl.appendChild(tr);
+}
+
+function addProfileRowInput(tbl, label, fName, fOptions) {
 	var tr = OAT.Dom.create('tr');
   tr.id = 'tr+'+fName;
 
-	var th = OAT.Dom.create('th');
-	th.width = '30%';
+  var th = OAT.Dom.create('th', {verticalAlign: 'top'});
+  th.width = '20%';
 	th.innerHTML = label + '<div style="font-weight: normal; display: inline; color: red;"> *</div>';
 	tr.appendChild(th);
 
 	var td = OAT.Dom.create('td');
   tr.appendChild(td);
 
-  var fld = OAT.Dom.create('input');
+  var fld = OAT.Dom.create('input', fOptions);
   fld.type = 'type';
   fld.id = fName;
   fld.name = fld.id;
+  if (fld.value == 'undefined')
+    fld.value = '';
   td.appendChild(fld);
 
 	tbl.appendChild(tr);
@@ -2028,7 +2139,7 @@ function addProfileTableValues(tbl, label, values, headers, delimiters) {
     var tr = OAT.Dom.create('tr');
     var th = OAT.Dom.create('th');
     th.vAlign = 'top';
-    th.width = '30%';
+    th.width = '20%';
     th.innerHTML = label;
     tr.appendChild(th);
 
@@ -2055,9 +2166,9 @@ function addProfileTableValues(tbl, label, values, headers, delimiters) {
 }
 
 function addProfileTableRowValue(tbl, values, delimiters, leftTag) {
-	if (!leftTag) {
+  if (!leftTag)
 		leftTag = 'td';
-	}
+
   var tmpLines = values.split(delimiters[0]);
 	for ( var N = 0; N < tmpLines.length; N++) {
 		if (delimiters.length == 1) {
@@ -2069,9 +2180,15 @@ function addProfileTableRowValue(tbl, values, delimiters, leftTag) {
   }
 }
 
+
+function logoutUrl() {
+  var path = document.location.pathname.split('/');
+  document.location = document.location.protocol + '//' + document.location.host + '/' + path[1] + '/' + path[2];
+}
+
 function logoutSubmit() {
 		var S = '/ods/api/user.logout?sid=' + encodeURIComponent($v('sid')) + '&realm=' + encodeURIComponent($v('realm'));
-	OAT.AJAX.GET(S, '', function (){document.location = document.location.protocol + '//' + document.location.host + document.location.pathname;});
+  OAT.AJAX.GET(S, '', logoutUrl);
   return false;
 }
 
@@ -2081,9 +2198,11 @@ function lfLoginSubmit() {
 }
 
 function loginSubmit(mode, prefix) {
+  var uriParams = OAT.Dom.uriParams();
+  var notReturn = lfNotReturn;
+  lfNotReturn = true;
 	var q = '';
 	if (mode == 1) {
-    var uriParams = OAT.Dom.uriParams();
     if (typeof (uriParams['openid.signed']) != 'undefined' && uriParams['openid.signed'] != '') {
       q += openIdLoginURL(uriParams);
     } else {
@@ -2093,19 +2212,36 @@ function loginSubmit(mode, prefix) {
   	  openIdAuthenticate(prefix);
     return false;
   	}
-	} else if (mode == 2) {
+  }
+  else if (mode == 2) {
 		if (!facebookData || !facebookData.uid)
 			return showError('Invalid Facebook UserID');
 
 		q += '&facebookUID=' + facebookData.uid;
-	} else if (mode == 3) {
-  } else if (mode == 4) {
+  }
+  else if (mode == 3) {
+  }
+  else if (mode == 4) {
+	  if (notReturn || (typeof (uriParams['oauth_verifier']) == 'undefined') || (typeof (uriParams['oauth_token']) == 'undefined')) {
     twitterAuthenticate('lf');
     return false;
-  } else if (mode == 5) {
+    }
+    q +='oauthMode=twitter'
+      + '&oauthSid=' + encodeURIComponent(uriParams['sid'])
+      + '&oauthVerifier=' + encodeURIComponent(uriParams['oauth_verifier'])
+      + '&oauthToken=' + encodeURIComponent(uriParams['oauth_token']);
+  }
+  else if (mode == 5) {
+	  if ((notReturn || typeof (uriParams['oauth_verifier']) == 'undefined') || (typeof (uriParams['oauth_token']) == 'undefined')) {
     linkedinAuthenticate('lf');
     return false;
-  } else {
+    }
+    q +='oauthMode=linkedin'
+      + '&oauthSid=' + encodeURIComponent(uriParams['sid'])
+      + '&oauthVerifier=' + encodeURIComponent(uriParams['oauth_verifier'])
+      + '&oauthToken=' + encodeURIComponent(uriParams['oauth_token']);
+  }
+  else {
 		if (($(prefix+'_uid').value.length == 0) || ($(prefix+'_password').value.length == 0))
       return showError('Invalid User ID or Password');
 
@@ -2116,34 +2252,33 @@ function loginSubmit(mode, prefix) {
 	return false;
 }
 
-function afterLogin(data, prefix) {
+function loginUrl() {
+  var x = function (data) {
 	var xml = OAT.Xml.createXmlDoc(data);
 	if (!hasError(xml)) {
 		/* user data */
-		$('sid').value = OAT.Xml.textValue(xml.getElementsByTagName('sid')[0]);
-		$('realm').value = 'wa';
-    validateSession = true;
-		var T = $('form');
-		if (T) {
-			T.value = ((prefix == 'rf')? 'profile': 'user');
-			T.form.submit();
-		} else {
-			OAT.Dom.show("ob_right_logout");
-			OAT.Dom.hide("ob_links");
-			OAT.Dom.hide("lf");
-			OAT.Dom.hide("rf");
-			OAT.Dom.hide("uf");
-			OAT.Dom.hide("pf");
-			if (prefix == 'rf') {
-			OAT.Dom.show("pf");
-			ufProfileSubmit();
+      var user = xml.getElementsByTagName('user')[0];
+      if (user) {
+        var userName = tagValue(user, 'name');
+        var path = document.location.pathname.split('/');
+        document.location = document.location.protocol + '//' + document.location.host + '/' + path[1] + '/' + path[2]+ '/~' + userName + '?sid='+encodeURIComponent($v('sid'))+'&realm='+encodeURIComponent($v('realm'));
+      }
 			} else {
-			  pfCancelSubmit();
+      logoutUrl();
 			}
 		}
+  var S = '/ods/api/user.info?sid='+encodeURIComponent($v('sid'))+'&realm='+encodeURIComponent($v('realm'))+'&short=1';
+  OAT.AJAX.GET(S, '', x);
+}
+
+function afterLogin(data, prefix) {
+  var xml = OAT.Xml.createXmlDoc(data);
+  if (!hasError(xml)) {
+    $('sid').value = OAT.Xml.textValue(xml.getElementsByTagName('sid')[0]);
+    $('realm').value = 'wa';
+    loginUrl();
 	} else {
-		$('sid').value = '';
-		$('realm').value = '';
+    logoutUrl();
 	}
 	return false;
 }
@@ -2171,6 +2306,29 @@ function inputParameter(inputField) {
   return '';
 }
 
+function ufCertificateGenerator() {
+  var x = function (data) {
+    var url;
+    try {
+      var url = OAT.JSON.parse(data);
+    } catch (e) { url = null; }
+    if (url && url.indexOf('<failed>') == -1) {
+      var a = OAT.Dom.create('a');
+      a.href = url;
+      a.innerHTML = 'Certificate Generator';
+      a.style.cssText = 'color: #000; text-decoration: none;';
+      $("pf_tab_2_5").innerHTML = '';
+      $("pf_tab_2_5").appendChild(a);
+      OAT.Dom.show("pf_tab_2_5");
+    } else {
+      $("pf_tab_2_5").innerHTML = 'Certificate Generator';
+      OAT.Event.attach("pf_tab_2_5", 'click', function(){pfTabSelect('pf_tab_2_', 2, 5);});
+      OAT.Dom.show("pf_tab_2_5");
+    }
+  }
+  OAT.AJAX.GET ('/ods/api/user.certificateUrl?sid='+encodeURIComponent($v('sid'))+'&realm='+encodeURIComponent($v('realm')), false, x, {async: false});
+}
+
 function ufCleanTablesData(prefix) {
   var tbl = $(prefix+"_tbl");
   if (!tbl) {return;}
@@ -2265,7 +2423,6 @@ function ufProfileCallback(data) {
 			// main
       hiddenCreate('c_nick', null, tagValue(user, 'nickName'));
       $('ob_left_name').innerHTML = tagValue(user, 'fullName');
-      fieldUpdate(user, 'nickName', 'pf_nickName');
 			fieldUpdate(user, 'name', 'pf_loginName');
 			fieldUpdate(user, 'nickName', 'pf_nickName');
 			fieldUpdate(user, 'mail', 'pf_mail', aclData);
@@ -2276,7 +2433,7 @@ function ufProfileCallback(data) {
 			fieldUpdate(user, 'gender', 'pf_gender', aclData);
 			fieldUpdate(user, 'birthday', 'pf_birthday', aclData);
 			fieldUpdate(user, 'homepage', 'pf_homepage', aclData);
-      pfShowRows("x1", tagValue(user, "webIDs"), ["\n"], function(prefix, val1){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}});}, aclData, 'pf_acl_webIDs');
+      pfShowRows("x1", tagValue(user, "webIDs"), ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4, value: val2}});}, aclData, 'pf_acl_webIDs');
 			fieldUpdate(user, 'mailSignature', 'pf_mailSignature');
 			fieldUpdate(user, 'summary', 'pf_summary', aclData);
 			fieldUpdate(user, 'photo', 'pf_photo', aclData);
@@ -2287,8 +2444,8 @@ function ufProfileCallback(data) {
       fieldUpdate(user, 'spbEnable', 'pf_spbEnable');
       fieldUpdate(user, 'inSearch', 'pf_inSearch');
       fieldUpdate(user, 'showActive', 'pf_showActive');
-      pfShowRows("x2", tagValue(user, "interests"), ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});}, aclData, 'pf_acl_interests');
-      pfShowRows("x3", tagValue(user, "topicInterests"), ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});}, aclData, 'pf_acl_topicInterests');
+      pfShowRows("x2", tagValue(user, "topicInterests"), ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});}, aclData, 'pf_acl_topicInterests');
+      pfShowRows("x3", tagValue(user, "interests"), ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});}, aclData, 'pf_acl_interests');
 
 			// address
 			fieldUpdate(user, 'homeCountry', 'pf_homecountry', aclData);
@@ -2307,7 +2464,7 @@ function ufProfileCallback(data) {
       fieldUpdate(user, 'homeMobile',             'pf_homeMobile');
 
 			// online accounts
-      pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}});});
+      pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2, val3){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}, fld_3: {value: val3}});});
 
       // bio events
       pfShowBioEvents("x5", function(prefix, val0, val1, val2, val3){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 11, value: val1}, fld_2: {value: val2}, fld_3: {value: val3}});});
@@ -2383,7 +2540,7 @@ function ufProfileCallback(data) {
       fieldUpdate(user, 'businessMobile',         'pf_businessMobile');
 
 			// online accounts
-      pfShowOnlineAccounts("y1", "B", function(prefix, val0, val1, val2){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}});});
+      pfShowOnlineAccounts("y1", "B", function(prefix, val0, val1, val2, val3){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}, fld_3: {value: val3}});});
 
 			// contact
 			fieldUpdate(user, 'businessIcq', 'pf_businessIcq', aclData);
@@ -2485,7 +2642,7 @@ function encodeTableData(prefix, delimiters)
         retValue += $v(prefix+"_fld_1_"+N) + delimiters[1] + $v(prefix+"_fld_2_"+N) + delimiters[0];
     }
   }
-  return retValue;
+  return encodeURIComponent(retValue);
 }
 
 function updateOnlineAccounts(prefix, accountType)
@@ -2539,6 +2696,7 @@ function updateBioEvents(prefix)
 }
 
 function prepareItems(prefix) {
+  var L = 0;
   var ontologies = [];
   var form = $('page_form');
   for (var N = 0; N < form.elements.length; N++)
@@ -2573,7 +2731,7 @@ function prepareItems(prefix) {
       var itemProperties = preparePropertiesWork(prefix, ontologyNo, itemNo);
       ontologyItems.push({"id": itemNo, "className": itemName, "properties": itemProperties});
     }
-    ontologies.push(["ontology", ontologyName, "items", ontologyItems]);
+    ontologies.push({"id": ''+L++, "ontology": ontologyName, "items": ontologyItems});
   }
   return OAT.JSON.stringify(ontologies);
 }
@@ -2646,6 +2804,8 @@ function pfUpdateSubmit(No) {
       if (formTab2 == 0)
       {
         // Import
+        if ($v('cb_item_i_photo') == '1')
+          S += '&photo=' + encodeURIComponent($v('i_photo'));
         if ($v('cb_item_i_name') == '1')
           S += '&nickName=' + encodeURIComponent($v('i_nickName'));
         if ($v('cb_item_i_title') == '1')
@@ -2690,10 +2850,10 @@ function pfUpdateSubmit(No) {
           S += '&tags=' + encodeURIComponent($v('i_tags'));
         if ($v('cb_item_i_sameAs') == '1')
           S += '&webIDs=' + encodeURIComponent($v('i_sameAs'));
-        if ($v('cb_item_i_interests') == '1')
-          S += '&interests=' + encodeURIComponent($v('i_interests'));
         if ($v('cb_item_i_topicInterests') == '1')
           S += '&topicInterests=' + encodeURIComponent($v('i_topicInterests'));
+        if ($v('cb_item_i_interests') == '1')
+          S += '&interests=' + encodeURIComponent($v('i_interests'));
         if ($v('cb_item_i_onlineAccounts') == '1')
           S += '&onlineAccounts=' + encodeURIComponent($v('i_onlineAccounts'));
       }
@@ -2714,9 +2874,9 @@ function pfUpdateSubmit(No) {
           + '&spbEnable=' + encodeURIComponent($('pf_spbEnable').checked? '1': '0')
           + '&inSearch=' + encodeURIComponent($('pf_inSearch').checked? '1': '0')
           + '&showActive=' + encodeURIComponent($('pf_showActive').checked? '1': '0')
-        + '&webIDs=' + encodeTableData("x1", ["\n"])
-        + '&interests=' + encodeTableData("x2", ["\n", ";"])
-        + '&topicInterests=' + encodeTableData("x3", ["\n", ";"]);
+          + '&webIDs=' + encodeTableData("x1", ["\n", ";"])
+          + '&topicInterests=' + encodeTableData("x2", ["\n", ";"])
+          + '&interests=' + encodeTableData("x3", ["\n", ";"]);
         A +='title=' + $v('pf_acl_title')
           + '&firstName=' + $v('pf_acl_firstName')
           + '&lastName=' + $v('pf_acl_lastName')
@@ -2727,8 +2887,8 @@ function pfUpdateSubmit(No) {
           + '&homepage=' + $v('pf_acl_homepage')
           + '&summary=' + $v('pf_acl_summary')
           + '&webIDs=' +  $v('pf_acl_webIDs')
-          + '&interests=' + $v('pf_acl_interests')
           + '&topicInterests=' + $v('pf_acl_topicInterests')
+          + '&interests=' + $v('pf_acl_interests')
           + '&audio=' + $v('pf_acl_audio')
           + '&photo=' + $v('pf_acl_photo');
       }
@@ -2920,7 +3080,7 @@ function pfCleanFOAFData() {
   $('pf_foaf').defaultValue = '';
   $('cb_all').checked = false;
   $('cb_all').defaultChecked = false;
-	$('i_tbody').innerHTML = '';
+  OAT.Dom.clear('i_tbody');
 	OAT.Dom.hide('i_tbl');
 }
 
@@ -2938,6 +3098,7 @@ function pfGetFOAFData(iri) {
   	  var tbody = $('i_tbody');
 
 			pfSetFOAFValue(tbody, o.iri,                  'Personal WebID',        'i_iri');
+      pfSetFOAFValue(tbody, o.depiction,            'Photo',                        'i_photo');
 			pfSetFOAFValue(tbody, o.nick,                 'Nick Name',             'i_nickName');
 			pfSetFOAFValue(tbody, o.title,                'Title',                 'i_title');
 			pfSetFOAFValue(tbody, o.firstName,            'First Name',            'i_firstName');
@@ -2960,8 +3121,8 @@ function pfGetFOAFData(iri) {
 			pfSetFOAFValue(tbody, o.resume,               'Resume',                       'i_summary');
 			pfSetFOAFValue(tbody, o.tags,                 'Tags',                  'i_tags');
       pfSetFOAFValue(tbody, o.sameAs,               'Other Personal URIs (WebIDs)', 'i_sameAs', ['URI'], ['value']);
-      pfSetFOAFValue(tbody, o.interest,             'Topic of Interest',            'i_interests', ['URL', 'Label'], ['value', 'label']);
-      pfSetFOAFValue(tbody, o.topic_interest,       'Thing of Interest',            'i_topicInterests', ['URI', 'Label'], ['value', 'label']);
+      pfSetFOAFValue(tbody, o.topic_interest,       'Topic of Interest',            'i_topicInterests', ['URL', 'Label'], ['value', 'label']);
+      pfSetFOAFValue(tbody, o.interest,             'Thing of Interest',            'i_interests', ['URI', 'Label'], ['value', 'label']);
       pfSetFOAFValue(tbody, o.onlineAccounts,       'Online Accounts',              'i_onlineAccounts', ['Label', 'URI'], ['value', 'uri']);
       pfSetFOAFValue(tbody, o.knows,                'Social Network',               'i_knows', ['URI', 'Name'], ['value', 'name']);
 		} else {
@@ -3035,8 +3196,14 @@ function pfSetFOAFValue(tbody, fValue, fTitle, fName, fHeaders, fLabels) {
       	}
       fValue = tmp;
     } else {
+      if (fName == 'i_photo') {
+        var img = OAT.Dom.create('img', {}, 'resize');
+        img.src = fValue;
+        td.appendChild(img);
+      } else {
       td.appendChild(OAT.Dom.text(fValue));
     }
+    }
     var fld = OAT.Dom.create('input');
     fld.type = 'hidden';
     fld.id = fName;
@@ -3060,7 +3227,7 @@ function setSecretQuestion() {
 
 // ------------------------------------------
 
-function lfRegisterSubmit(event) {
+function lfRegisterSubmit(event, no) {
   $('sid').value = '';
   $('realm').value = '';
 
@@ -3073,31 +3240,27 @@ function lfRegisterSubmit(event) {
   OAT.Dom.show("rf");
 
   rfResetData();
-  if (document.location.protocol == 'https:')
+  if (!no && (document.location.protocol == 'https:'))
   rfSSLAutomaticLogin();
 
   return false;
 }
 
 function rfResetData() {
-  $('rf_uid').value = '';
-  $('rf_email').value = '';
   $('rf_password').value = '';
   $('rf_password2').value = '';
   $('rf_openId').value = '';
   $('rf_is_agreed').checked = false;
-  if ($('tr_rf_openid_uid'))
-    $('tr_rf_openid_uid').value = '';
-  if ($('rf_openid_email'))
-    $('tr_rf_openid_email').value = '';
-  if ($('tr_rf_webid_uid'))
-    $('tr_rf_webid_uid').value = '';
-  if ($('rf_webid_email'))
-    $('tr_rf_webid_email').value = '';
+  for (var N = 0; N < 5; N++) {
+    if ($('rf_uid_'+N))
+      $('rf_uid_'+N).value = '';
+    if ($('rf_email_'+N))
+      $('rf_email_'+N).value = '';
+  }
 }
 
 function rfSSLAutomaticLogin() {
-  if (regData.sslAutomaticEnable && !$("rf_webid_uid") && !$("rf_webid_email")) {
+  if (regData.sslAutomaticEnable && !$("rf_uid_3") && !$("rf_email_3")) {
     $('rf_is_agreed').checked = true;
     rfTab.go(3);
     rfSignupSubmit();
@@ -3106,9 +3269,9 @@ function rfSSLAutomaticLogin() {
 
 function rfSignupSubmit(event) {
 	if (rfTab.selectedIndex == 0) {
-    if ($v('rf_uid') == '')
+    if ($v('rf_uid_0') == '')
       return showError('Bad username. Please correct!');
-    if ($v('rf_email') == '')
+    if ($v('rf_email_0') == '')
       return showError('Bad mail. Please correct!');
     if ($v('rf_password') == '')
       return showError('Bad password. Please correct!');
@@ -3129,48 +3292,46 @@ function rfSignupSubmit(event) {
 
 	var q = 'mode=' + encodeURIComponent(rfTab.selectedIndex);
 	if (rfTab.selectedIndex == 0) {
-		q +='&name=' + encodeURIComponent($v('rf_uid'))
-			+ '&password=' + encodeURIComponent($v('rf_password'))
-			+ '&email=' + encodeURIComponent($v('rf_email'));
+    q +='&name=' + encodeURIComponent($v('rf_uid_0'))
+      + '&email=' + encodeURIComponent($v('rf_email_0'))
+      + '&password=' + encodeURIComponent($v('rf_password'));
 	}
 	else if (rfTab.selectedIndex == 1) {
     if (!$('oid-data')) {
 	  openIdAuthenticate('rf');
 		return false;
 	}
-    q += '&data=' + encodeURIComponent($v('oid-data'));
-    if ($('rf_openid_uid'))
-      q +='&name=' + encodeURIComponent($v('rf_openid_uid'));
-    if ($('rf_openid_email'))
-      q +='&email=' + encodeURIComponent($v('rf_openid_email'));
+    q +='&data=' + encodeURIComponent($v('oid-data'))
+      + '&name=' + encodeURIComponent($v('rf_uid_1'))
+      + '&email=' + encodeURIComponent($v('rf_email_1'));
   }
 	else if (rfTab.selectedIndex == 2) {
 		q += '&data=' + encodeURIComponent(OAT.JSON.stringify(facebookData))
+      + '&name=' + encodeURIComponent($v('rf_uid_2'))
+      + '&email=' + encodeURIComponent($v('rf_email_2'));
 	}
 	else if (rfTab.selectedIndex == 3) {
-		q +='&data=' + encodeURIComponent(OAT.JSON.stringify(sslData));
-		if ($('rf_webid_uid'))
-		  q +='&name=' + encodeURIComponent($v('rf_webid_uid'));
-		if ($('rf_webid_email'))
-		  q +='&email=' + encodeURIComponent($v('rf_webid_email'));
+    q +='&data=' + encodeURIComponent(OAT.JSON.stringify(sslData))
+      + '&name=' + encodeURIComponent($v('rf_uid_3'))
+      + '&email=' + encodeURIComponent($v('rf_email_3'));
 	}
   else if (rfTab.selectedIndex == 4) {
     if (!$('twitter-data')) {
       twitterAuthenticate('rf');
       return false;
     }
-    q +='&data=' + encodeURIComponent($v('twitter-data'));
-    if ($('rf_twitter_email'))
-      q +='&email=' + encodeURIComponent($v('rf_twitter_email'));
+    q +='&data=' + encodeURIComponent($v('twitter-data'))
+      + '&name=' + encodeURIComponent($v('rf_uid_4'))
+      + '&email=' + encodeURIComponent($v('rf_email_4'));
   }
   else if (rfTab.selectedIndex == 5) {
     if (!$('linkedin-data')) {
       linkedinAuthenticate('rf');
       return false;
     }
-    q +='&data=' + encodeURIComponent($v('linkedin-data'));
-    if ($('rf_linkedin_email'))
-      q +='&email=' + encodeURIComponent($v('rf_linkedin_email'));
+    q +='&data=' + encodeURIComponent($v('linkedin-data'))
+      + '&name=' + encodeURIComponent($v('rf_uid_5'))
+      + '&email=' + encodeURIComponent($v('rf_email_5'));
   }
 	OAT.AJAX.POST("/ods/api/user.register", q, afterSignup);
 	return false;
@@ -3184,6 +3345,26 @@ function afterSignup(data) {
   }
 }
 
+function rfCheckAvalability(event) {
+  var name = $v('rf_uid_'+rfTab.selectedIndex);
+  if (!name)
+    return showError('Bad username. Please correct!');
+
+  var email = $v('rf_email_'+rfTab.selectedIndex);
+  if (!email)
+    return showError('Bad Email. Please correct!');
+
+  var x = function (data) {
+    var xml = OAT.Xml.createXmlDoc(data);
+    if (!hasError(xml))
+      alert('Login name and Email are available!');
+  }
+
+  var q = '&name=' + encodeURIComponent(name) + '&email=' + encodeURIComponent(email);
+  OAT.AJAX.POST("/ods/api/user.checkAvalability", q, x);
+  return false;
+}
+
 function openIdLoginURL(uriParams) {
   var openIdServer       = uriParams['oid-srv'];
   var openIdSig          = uriParams['openid.sig'];
@@ -3350,3 +3531,17 @@ function knowsData() {
 	}
 	OAT.AJAX.GET(S, '', x, {onstart : function() {OAT.Dom.show('k_import_image')}, onend : function() {OAT.Dom.hide('k_import_image')}});
 }
+
+function userDisable(userName)
+{
+  var S = '/ods/api/user.disable?name='+encodeURIComponent($v(userName)) + '&sid=' + $v('sid') + '&realm=wa';
+	var x = function(data) {
+    var xml = OAT.Xml.createXmlDoc(data);
+    if (!hasError(xml, false)) {
+      alert('User\'s account is disabled!');
+      logoutUrl();
+    }
+	}
+  OAT.AJAX.GET(S, '', x);
+}
+
diff --git a/appsrc/ODS-Framework/users/users.html b/appsrc/ODS-Framework/users/users.html
index 02c6518..3c95c99 100644
--- a/appsrc/ODS-Framework/users/users.html
+++ b/appsrc/ODS-Framework/users/users.html
@@ -51,7 +51,7 @@
       <input type="hidden" name="formMode" id="formMode" value="" />
       <div id="ob">
         <div id="ob_left" style="display: none;">
-          <span id="ob_left_01"><b>User</b>: <span id="ob_left_name"></span></span><span id="ob_left_02">, <b>Profile</b>: <a href="#" onclick="javascript: return ufProfileSubmit();">Edit</a> / <a href="#" onclick="javascript: return pfCancelSubmit();">View</a></span>
+          <span id="ob_left_01"><b>User</b>: <span id="ob_left_name"></span></span><span id="ob_left_02">, <b>Profile</b>: <a href="#" onclick="javascript: return ufProfileSubmit();">Edit</a> / <a href="#" onclick="javascript: return loginUrl();">View</a></span>
         </div>
         <div id="ob_right"><a href="#" id="ob_right_logout" onclick="javascript: return logoutSubmit();" style="display: none;">Logout</a></div>
       </div>
@@ -68,9 +68,9 @@
                 </div>
                 <ul id="lf_tabs" class="tabs">
                   <li id="lf_tab_0" title="Digest">Digest</li>
+                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="lf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="lf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -79,7 +79,7 @@
                   <div id="lf_page_0" class="tabContent" >
                 <table class="form" cellspacing="5">
                   <tr>
-                    <th width="30%">
+                        <th width="20%">
                           <label for="lf_uid">User ID</label>
                     </th>
                     <td nowrap="nowrap">
@@ -99,7 +99,7 @@
                   <div id="lf_page_1" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="lf_openId">OpenID URL</label>
                     </th>
                         <td nowrap="nowrap">
@@ -111,7 +111,7 @@
                   <div id="lf_page_2" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                     </th>
                     <td nowrap="nowrap">
                           <span id="lf_facebookData" style="min-height: 20px;"></span>
@@ -124,12 +124,19 @@
                   </div>
                   <div id="lf_page_3" class="tabContent" style="display: none">
                     <table id="lf_table_3" class="form" cellspacing="5">
+                      <tr id="lf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="lf_page_4" class="tabContent" style="display: none">
                     <table id="lf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="lf_twitter" style="min-height: 20px;"></span>
@@ -165,9 +172,9 @@
                 </div>
                 <ul id="rf_tabs" class="tabs">
                   <li id="rf_tab_0" title="Digest">Digest</li>
+                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="rf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="rf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -177,18 +184,18 @@
                     <table id="rf_table_0" class="form" cellspacing="5">
                       <tr>
                         <th>
-                          <label for="rf_uid">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                          <label for="rf_uid_0">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td nowrap="nowrap">
-                          <input type="text" name="rf_uid" value="" id="rf_uid" style="width: 150px;" />
+                          <input type="text" name="rf_uid_0" value="" id="rf_uid_0" style="width: 150px;" />
                         </td>
                       </tr>
                       <tr>
                         <th>
-                          <label for="rf_email">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                          <label for="rf_email_0">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td nowrap="nowrap">
-                          <input type="text" name="rf_email" value="" id="rf_email" size="40"/>
+                          <input type="text" name="rf_email_0" value="" id="rf_email_0" style="width: 300px;" />
                         </td>
                       </tr>
                       <tr>
@@ -212,7 +219,7 @@
                   <div id="rf_page_1" class="tabContent" >
                     <table id="rf_table_1" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="rf_openId">OpenID</label>
                         </th>
                         <td nowrap="nowrap">
@@ -224,7 +231,7 @@
                   <div id="rf_page_2" class="tabContent" >
                     <table id="rf_table_2" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td nowrap="nowrap">
                           <span id="rf_facebookData" style="min-height: 20px;"></span>
@@ -237,12 +244,19 @@
                   </div>
                   <div id="rf_page_3" class="tabContent" >
                     <table id="rf_table_3" class="form" cellspacing="5">
+                      <tr id="rf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="rf_page_4" class="tabContent" style="display: none">
                     <table id="rf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_twitter" style="min-height: 20px;"></span>
@@ -269,7 +283,7 @@
                 <div>
                   <table class="form" cellspacing="5">
                     <tr>
-                      <th width="30%">
+                      <th width="20%">
                       </th>
                       <td nowrap="nowrap">
                         <input type="checkbox" name="rf_is_agreed" value="1" id="rf_is_agreed"/><label for="rf_is_agreed">I agree to the <a href="/ods/terms.html" target="_blank">Terms of Service</a>.</label>
@@ -278,6 +292,7 @@
                   </table>
                 </div>
                 <div class="footer" id="rf_login_5">
+                  <input type="button" id="rf_check" name="rf_check" value="Check Availabilty" onclick="javascript: return rfCheckAvalability();" />
                   <input type="button" id="rf_signup" name="rf_signup" value="Sign Up" onclick="javascript: return rfSignupSubmit();" />
                 </div>
               </div>
@@ -339,6 +354,12 @@
                       <div id="pf_page_0_1" class="tabContent" style="display:none;">
                         <table class="form" cellspacing="5">
                           <tr>
+                            <th>Account deactivation</th>
+                            <td>
+                              <input type="button" value="Deactivate" onclick="return userDisable('pf_loginName');" />
+                            </td>
+                          </tr>
+                          <tr>
                             <th>
                               <label for="pf_loginName">Login Name</label>
                             </th>
@@ -459,18 +480,19 @@
                                           <th>
                                             URI
                                           </th>
+                                          <th width="10%">
+                                            Access
+                                          </th>
                                           <th width="65px">
                                             Action
                                           </th>
                                         </tr>
                                       </thead>
-                                      <tr id="x1_tr_no" style="display: none;"><td colspan="2"><b>No Personal URIs</b></td></tr>
+                                      <tr id="x1_tr_no" style="display: none;"><td colspan="3"><b>No Personal URIs</b></td></tr>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
-                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_webIDs" id="pf_acl_webIDs">
-                                    </select>
+                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                                   </td>
                                 </tr>
                               </table>
@@ -521,7 +543,7 @@
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x2', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_interests" id="pf_acl_interests">
+                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
                                     </select>
                                   </td>
                                 </tr>
@@ -555,7 +577,7 @@
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x3', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
+                                    <select name="pf_acl_interests" id="pf_acl_interests">
                                     </select>
                                   </td>
                                 </tr>
@@ -812,7 +834,7 @@
                       <div id="pf_page_0_3" class="tabContent" style="display:none;">
                         <table class="form" cellspacing="5">
                           <tr>
-                            <td width="600px">
+                            <td width="800px">
                               <table id="x4_tbl" class="listing">
                                 <thead>
                                   <tr class="listing_header_row">
@@ -822,6 +844,9 @@
                                     <th>
                                       Member Home Page URI
                                     </th>
+                                    <th>
+                                      Account URI
+                                    </th>
                                     <th width="65px">
                                       Action
                                     </th>
@@ -831,7 +856,7 @@
                               </table>
                             </td>
                             <td valign="top" nowrap="1">
-                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
+                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}, fld_3: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                             </td>
                           </tr>
                         </table>
@@ -1215,10 +1240,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ol_tbl" class="listing">
-                                  <tbody id="ol_tbody">
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
+                                              </tr>
+                                            </thead>
+                                            <tbody id="ol_tbody" class="colorize">
+                                              <tr id="ol_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ol', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ol_no" name="ol_no" value="1" />
                               </td>
                             </tr>
@@ -1283,10 +1331,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="wl_tbl" class="listing">
-                                  <tbody id="wl_tbody">
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
+                                              </tr>
+                                            </thead>
+                                            <tbody id="wl_tbody" class="colorize">
+                                              <tr id="wl_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('wl', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ol_no" name="ol_no" value="1" />
                               </td>
                             </tr>
@@ -1371,10 +1442,33 @@
 		                            Properties
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ld_tbl" class="listing">
-                                  <tbody id="ld_tbody">
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
+                                              </tr>
+                                            </thead>
+                                            <tbody id="ld_tbody" class="colorize">
+                                              <tr id="ld_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ld', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ld_no" name="ld_no" value="1" />
                               </td>
                             </tr>
@@ -1413,7 +1507,7 @@
                       		        </th>
                                   <td>
                                     <input type="text" class="_validate_ _uri_" size="100" value="" id="k_import" name="k_import">
-                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Download">
+                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Retrieve">
                                     <img style="display: none;" src="/ods/images/oat/Ajax_throbber.gif" alt="Import knows URIs" id="k_import_image">
                                   </td>
                                 </tr>
@@ -1440,7 +1534,7 @@
                                       <tbody>
                                         <tr id="k_tr_no">
                                            <td colspan="3">
-                                             <b>No downloaded items</b>
+                                             <b>No retrieved items</b>
                                            </td>
                                         </tr>
                                       </tbody>
@@ -2037,26 +2131,6 @@
                         </table>
                       </div>
                       <div id="pf_page_2_3" class="tabContent" style="display:none;">
-                        <table class="form" cellspacing="5">
-                      <tr>
-                            <th>
-                              Saved Facebook ID
-                        </th>
-                            <td>
-                              <span id="span_facebookName"></span>
-                            </td>
-                      </tr>
-                      <tr>
-                        <th>
-                        </th>
-                            <td>
-                              <span id="pf_facebookData" style="min-height: 20px;"></span>
-                              <br />
-                              <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
-                              <fb:login-button autologoutlink="true"></fb:login-button>
-                        </td>
-                      </tr>
-                        </table>
                       </div>
                       <div id="pf_page_2_4" class="tabContent" style="display:none;">
                         <table class="form" cellspacing="5">
@@ -2176,7 +2250,7 @@
      <div id="FT_R">
        <a href="/ods/faq.html">FAQ</a> | <a href="/ods/privacy.html">Privacy</a> | <a href="/ods/rabuse.vspx">Report Abuse</a>
        <div>
-            Copyright © 1999-2011 OpenLink Software
+            Copyright © 1999-2012 OpenLink Software
        </div>
      </div>
     </div>
diff --git a/appsrc/ODS-Framework/users/users.jsp b/appsrc/ODS-Framework/users/users.jsp
index 6c0126e..5978e0d 100644
--- a/appsrc/ODS-Framework/users/users.jsp
+++ b/appsrc/ODS-Framework/users/users.jsp
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: users.jsp,v 1.5.2.38 2011/03/26 14:22:25 source Exp $
+ -  $Id: users.jsp,v 1.5.2.48 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -311,6 +311,7 @@
     String $_userName = getParameter(items, request, "userName");
     String $_sid = getParameter(items, request, "sid");
     String $_realm = "wa";
+    // System.out.println($_sid);
     if ($_sid != null) {
       params = httpParam( "", "sid", $_sid) +
                httpParam("&", "realm", $_realm);
@@ -634,6 +635,8 @@
                 if ($_formTab2 == 0)
                 {
                   // Import
+                  if ("1".equals(getParameter(items, request, "cb_item_i_photo")))
+                    params += httpParam ("&", "photo", getParameter(items, request, "i_photo"));
                   if ("1".equals(getParameter(items, request, "cb_item_i_name")))
                     params += httpParam ("&", "nickName", getParameter(items, request, "i_nickName"));
                   if ("1".equals(getParameter(items, request, "cb_item_i_title")))
@@ -678,10 +681,10 @@
                     params += httpParam ("&", "tags", getParameter(items, request, "i_tags"));
                   if ("1".equals(getParameter(items, request, "cb_item_i_sameAs")))
                     params += httpParam ("&", "webIDs", getParameter(items, request, "i_sameAs"));
-                  if ("1".equals(getParameter(items, request, "cb_item_i_interests")))
-                    params += httpParam ("&", "interests", getParameter(items, request, "i_interests"));
                   if ("1".equals(getParameter(items, request, "cb_item_i_topicInterests")))
                     params += httpParam ("&", "topicInterests", getParameter(items, request, "i_topicInterests"));
+                  if ("1".equals(getParameter(items, request, "cb_item_i_interests")))
+                    params += httpParam ("&", "interests", getParameter(items, request, "i_interests"));
                   if ("1".equals(getParameter(items, request, "cb_item_i_onlineAccounts")))
                     params += httpParam ("&", "onlineAccounts", getParameter(items, request, "i_onlineAccounts"));
                 }
@@ -714,8 +717,10 @@
                     while (iterator.hasNext()) {
                       FileItem item = (FileItem) iterator.next();
                       if (item.isFormField()) {
-                        if (item.getFieldName().indexOf("x1_fld_1_") == 0)
-                          tmp += item.getString() + "\n";
+                        if (item.getFieldName().indexOf("x1_fld_1_") == 0) {
+                          suffix = item.getFieldName().replace("x1_fld_1_", "");
+                          tmp += item.getString() + ";" + getParameter(items, request, "x1_fld_2_"+suffix) + "\n";
+                        }
                       }
                     }
                   } else {
@@ -752,7 +757,7 @@
                     }
           		    }
             		  }
-                  params += httpParam ("&", "interests", tmp);
+                  params += httpParam ("&", "topicInterests", tmp);
                   tmp = "";
                   if (ServletFileUpload.isMultipartContent(request)) {
                     Iterator iterator = items.iterator();
@@ -777,7 +782,7 @@
                     }
           		    }
             		  }
-                  params += httpParam ("&", "topicInterests", tmp);
+                  params += httpParam ("&", "interests", tmp);
                 }
                 if ($_formTab2 == 2)
                 {
@@ -885,18 +890,6 @@
                   params +=
                        httpParam ("&", "securityOpenID", getParameter(items, request, "pf_securityOpenID"));
 
-                if ($_formTab2 == 3)
-                {
-                  if (getParameter(items, request, "pf_clear") != null)
-                  {
-                    params +=
-                         httpParam ("&", "securityFacebookID", "");
-                  } else {
-                  params +=
-                       httpParam ("&", "securityFacebookID", getParameter(items, request, "pf_securityFacebookID"));
-                  }
-                }
-
                 if ($_formTab2 == 4)
                   params +=
                        httpParam ("&", "securitySiocLimit", getParameter(items, request, "pf_securitySiocLimit"));
@@ -1023,7 +1016,7 @@
     }
   %>
   <body>
-    <form name="page_form" id="page_form" method="post" enctype="<% out.print(($_form.equals("profile") && ($_formTab == 0) && ($_formTab2 == 1))? "multipart/form-data": "application/x-www-form-urlencoded"); %>" action="users.jsp">
+    <form name="page_form" id="page_form" method="post" enctype="<% out.print(($_form.equals("profile") && ($_formTab == 0) && ($_formTab2 == 1))? "multipart/form-data": "application/x-www-form-urlencoded"); %>">
       <input type="hidden" name="mode" id="mode" value="jsp" />
       <input type="hidden" name="sid" id="sid" value="<% out.print($_sid); %>" />
       <input type="hidden" name="realm" id="realm" value="<% out.print($_realm); %>" />
@@ -1037,10 +1030,10 @@
       <div id="ob">
         <div id="ob_left">
         <%
-          if ($_form.equals("profile") || $_form.equals("user"))
+          if (($_validate) && ($_form.equals("profile") || $_form.equals("user")))
           {
         %>
-          <b>User: </b><% out.print(xpathEvaluate($_document, "/user/fullName")); %>, <b>Profile: </b><a href="#" onclick="javascript: return profileSubmit();">Edit</a> / <a href="#" onclick="javascript: return userSubmit();">View</a>
+          <b>User: </b><% out.print(xpathEvaluate($_document, "/user/fullName")); %>, <b>Profile: </b><a href="#" onclick="javascript: return profileSubmit();">Edit</a> / <a href="#" onclick="javascript: return loginUrl();">View</a>
         <%
           }
         %>
@@ -1086,9 +1079,9 @@
                 </div>
                 <ul id="lf_tabs" class="tabs">
                   <li id="lf_tab_0" title="Digest">Digest</li>
+                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="lf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="lf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -1097,7 +1090,7 @@
                   <div id="lf_page_0" class="tabContent" >
                 <table class="form" cellspacing="5">
                   <tr>
-                    <th width="30%">
+                        <th width="20%">
                           <label for="lf_uid">User ID</label>
                     </th>
                         <td>
@@ -1117,7 +1110,7 @@
                   <div id="lf_page_1" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="lf_openId">OpenID URL</label>
                     </th>
                         <td>
@@ -1129,7 +1122,7 @@
                   <div id="lf_page_2" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                     </th>
                         <td>
                           <span id="lf_facebookData" style="min-height: 20px;"></span>
@@ -1142,12 +1135,19 @@
                   </div>
                   <div id="lf_page_3" class="tabContent" style="display: none">
                     <table id="lf_table_3" class="form" cellspacing="5">
+                      <tr id="lf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="lf_page_4" class="tabContent" style="display: none">
                     <table id="lf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="lf_twitter" style="min-height: 20px;"></span>
@@ -1187,9 +1187,9 @@
                 </div>
                 <ul id="rf_tabs" class="tabs">
                   <li id="rf_tab_0" title="Digest">Digest</li>
+                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="rf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="rf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -1198,19 +1198,19 @@
                   <div id="rf_page_0" class="tabContent" >
                     <table id="rf_table_0" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
-                          <label for="rf_uid">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                        <th width="20%">
+                          <label for="rf_uid_0">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td>
-                          <input type="text" name="rf_uid" value="" id="rf_uid" style="width: 150px;" />
+                          <input type="text" name="rf_uid_0" value="" id="rf_uid_0" style="width: 150px;" />
                         </td>
                       </tr>
                       <tr>
                         <th>
-                          <label for="rf_email">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                          <label for="rf_email_0">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td>
-                          <input type="text" name="rf_email" value="" id="rf_email" size="40"/>
+                          <input type="text" name="rf_email_0" value="" id="rf_email_0" style="width: 300px;" />
                         </td>
                       </tr>
                       <tr>
@@ -1234,7 +1234,7 @@
                   <div id="rf_page_1" class="tabContent" style="display: none">
                     <table id="rf_table_1" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="rf_openId">OpenID</label>
                         </th>
                         <td>
@@ -1246,7 +1246,7 @@
                   <div id="rf_page_2" class="tabContent" style="display: none">
                     <table id="rf_table_2" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_facebookData" style="min-height: 20px;"></span>
@@ -1259,12 +1259,19 @@
                   </div>
                   <div id="rf_page_3" class="tabContent" style="display: none">
                     <table id="rf_table_3" class="form" cellspacing="5">
+                      <tr id="rf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="rf_page_4" class="tabContent" style="display: none">
                     <table id="rf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_twitter" style="min-height: 20px;"></span>
@@ -1291,7 +1298,7 @@
                 <div>
                   <table class="form" cellspacing="5">
                     <tr>
-                      <th width="30%">
+                      <th width="20%">
                       </th>
                       <td>
                         <input type="checkbox" name="rf_is_agreed" value="1" id="rf_is_agreed"/><label for="rf_is_agreed">I agree to the <a href="/ods/terms.html" target="_blank">Terms of Service</a>.</label>
@@ -1300,6 +1307,7 @@
                   </table>
                 </div>
                 <div class="footer" id="rf_login_5">
+                  <input type="button" id="rf_check" name="rf_check" value="Check Availabilty" onclick="javascript: return rfCheckAvalability();" />
                   <input type="button" id="rf_signup" name="rf_signup" value="Sign Up" onclick="javascript: return rfSignupSubmit();" />
                 </div>
               </div>
@@ -1392,6 +1400,12 @@
                       <div id="pf_page_0_1" class="tabContent" style="display:none;">
                         <table class="form" cellspacing="5">
                           <tr>
+                            <th>Account deactivation</th>
+                            <td>
+                              <input type="button" value="Deactivate" onclick="return userDisable('pf_loginName');" />
+                            </td>
+                          </tr>
+                          <tr>
                             <th>
                               <label for="pf_loginName">Login Name</label>
                             </th>
@@ -1546,6 +1560,9 @@
                                           <th>
                                             URI
                                           </th>
+                                          <th width="10%">
+                                            Access
+                                          </th>
                                           <th width="65px">
                                             Action
                                           </th>
@@ -1553,21 +1570,12 @@
                                       </thead>
                                       <tr id="x1_tr_no" style="display: none;"><td colspan="2"><b>No Personal URIs</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x1", '<% out.print(xpathEvaluate($_document, "/user/webIDs").replace("\n", "\\n")); %>', ["\n"], function(prefix, val1){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x1", '<% out.print(xpathEvaluate($_document, "/user/webIDs").replace("\n", "\\n")); %>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4, value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
-                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_webIDs" id="pf_acl_webIDs">
-                                      <%
-                                        {
-                                          String S = xpathEvaluate($_acl, "/acl/webIDs");
-                                          for (int N = 0; N < $_ACL.length; N += 2)
-                                            out.print("<option value=\"" + $_ACL[N+1] + "\" " + (($_ACL[N+1].equals(S)) ? (" selected=\"selected\""): ("")) + ">" + $_ACL[N] + "</option>");
-                                        }
-                                      %>
-                                    </select>
+                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                                   </td>
                                 </tr>
                               </table>
@@ -1618,16 +1626,16 @@
                                       </thead>
                                       <tr id="x2_tr_no" style="display: none;"><td colspan="3"><b>No Topic of Interests</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x2", '<% out.print(xpathEvaluate($_document, "/user/interests").replace("\n", "\\n")); %>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x2", '<% out.print(xpathEvaluate($_document, "/user/topicInterests").replace("\n", "\\n")); %>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x2', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_interests" id="pf_acl_interests">
+                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
                                       <%
                                         {
-                                          String S = xpathEvaluate($_acl, "/acl/interests");
+                                          String S = xpathEvaluate($_acl, "/acl/topicInterests");
                                           for (int N = 0; N < $_ACL.length; N += 2)
                                             out.print("<option value=\"" + $_ACL[N+1] + "\" " + (($_ACL[N+1].equals(S)) ? (" selected=\"selected\""): ("")) + ">" + $_ACL[N] + "</option>");
                                         }
@@ -1662,16 +1670,16 @@
                                       </thead>
                                       <tr id="x3_tr_no" style="display: none;"><td colspan="3"><b>No Thing of Interests</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x3", '<% out.print(xpathEvaluate($_document, "/user/topicInterests").replace("\n", "\\n")); %>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x3", '<% out.print(xpathEvaluate($_document, "/user/interests").replace("\n", "\\n")); %>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x3', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
+                                    <select name="pf_acl_interests" id="pf_acl_interests">
                                       <%
                                         {
-                                          String S = xpathEvaluate($_acl, "/acl/topicInterests");
+                                          String S = xpathEvaluate($_acl, "/acl/interests");
                                           for (int N = 0; N < $_ACL.length; N += 2)
                                             out.print("<option value=\"" + $_ACL[N+1] + "\" " + (($_ACL[N+1].equals(S)) ? (" selected=\"selected\""): ("")) + ">" + $_ACL[N] + "</option>");
                                         }
@@ -1974,7 +1982,7 @@
                         <input type="hidden" name="c_nick" value="<% out.print(xpathEvaluate($_document, "/user/nickName")); %>" id="c_nick" />
                     <table class="form" cellspacing="5">
                       <tr>
-                            <td width="600px">
+                            <td width="800px">
                               <table id="x4_tbl" class="listing">
                                 <thead>
                                   <tr class="listing_header_row">
@@ -1984,6 +1992,9 @@
                                     <th>
                                       Member Home Page URI
                                     </th>
+                                    <th>
+                                      Account URI
+                                    </th>
                                     <th width="65px">
                                       Action
                                     </th>
@@ -1991,12 +2002,12 @@
                                 </thead>
                                 <tr id="x4_tr_no" style="display: none;"><td colspan="3"><b>No Services</b></td></tr>
                                 <script type="text/javascript">
-                                  OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}});});});
+                                  OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2, val3){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}, fld_3: {value: val3}});});});
                                 </script>
                               </table>
                             </td>
                             <td valign="top" nowrap="1">
-                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
+                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}, fld_3: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                         </td>
                       </tr>
                         </table>
@@ -2504,15 +2515,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ol_tbl" class="listing">
-                                  <tbody id="ol_tbody">
-                                    <tr id="ol_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="ol_tbody" class="colorize">
+                                              <tr id="ol_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ol', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ol_no" name="ol_no" value="1" />
                               </td>
                             </tr>
@@ -2600,15 +2629,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="wl_tbl" class="listing">
-                                  <tbody id="wl_tbody">
-                                    <tr id="wl_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="wl_tbody" class="colorize">
+                                              <tr id="wl_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('wl', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="wl_no" name="wl_no" value="1" />
                               </td>
                             </tr>
@@ -2716,15 +2763,33 @@
                   		          Properties
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ld_tbl" class="listing">
-                                  <tbody id="ld_tbody">
-                                    <tr id="ld_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="ld_tbody" class="colorize">
+                                              <tr id="ld_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ld', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ld_no" name="ld_no" value="1" />
                               </td>
                             </tr>
@@ -2785,7 +2850,7 @@
                       		        </th>
                                   <td>
                                     <input type="text" class="_validate_ _uri_" size="100" value="" id="k_import" name="k_import">
-                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Download">
+                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Retrieve">
                                     <img style="display: none;" src="/ods/images/oat/Ajax_throbber.gif" alt="Import knows URIs" id="k_import_image">
                                   </td>
                                 </tr>
@@ -2812,7 +2877,7 @@
                                       <tbody>
                                         <tr id="k_tr_no">
                                            <td colspan="3">
-                                             <b>No downloaded items</b>
+                                             <b>No retrieved items</b>
                                            </td>
                                         </tr>
                                       </tbody>
@@ -3574,33 +3639,6 @@
                       {
                       %>
                       <div id="pf_page_2_3" class="tabContent" style="display:none;">
-                        <table class="form" cellspacing="5">
-                      <tr>
-                            <th>
-                              Saved Facebook ID
-                        </th>
-                            <td>
-                              <%
-                                if ((xpathEvaluate($_document, "/user/securityFacebookID") != null) && (xpathEvaluate($_document, "/user/securityFacebookID") != ""))
-                                {
-                                  out.print(xpathEvaluate($_document, "/user/securityFacebookName"));
-                                } else {
-                                  out.print("not yet");
-                                }
-                              %>
-                            </td>
-                      </tr>
-                      <tr>
-                        <th>
-                        </th>
-                        <td>
-                              <span id="pf_facebookData" style="min-height: 20px;"></span>
-                              <br />
-                              <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
-                              <fb:login-button autologoutlink="true"></fb:login-button>
-                        </td>
-                      </tr>
-                        </table>
                       </div>
                       <%
                       }
@@ -3737,14 +3775,6 @@
                       %>
                     <div class="footer">
                       <input type="submit" name="pf_cancel" value="Cancel" onclick="needToConfirm = false;"/>
-                        <%
-                        if (($_formTab2 == 3) && (xpathEvaluate($_document, "/user/securityFacebookID") != null))
-                          {
-                        %>
-                        <input type="submit" name="pf_clear" value="Clear" onclick="myBeforeSubmit(); return myValidateInputs(this);"/>
-                        <%
-                          }
-                        %>
                         <input type="submit" name="pf_update" value="Save" onclick="myBeforeSubmit(); return myValidateInputs(this);"/>
                         <input type="submit" name="pf_next" value="Save & Next" onclick="myBeforeSubmit(); return myValidateInputs(this);"/>
                       </div>
@@ -3773,7 +3803,7 @@
       <div id="FT_R">
         <a href="/ods/faq.html">FAQ</a> | <a href="/ods/privacy.html">Privacy</a> | <a href="/ods/rabuse.vspx">Report Abuse</a>
         <div>
-          Copyright © 1999-2011 OpenLink Software
+          Copyright © 1999-2012 OpenLink Software
         </div>
       </div>
      </div>
diff --git a/appsrc/ODS-Framework/users/users.php b/appsrc/ODS-Framework/users/users.php
index 00e1c09..ba4f908 100644
--- a/appsrc/ODS-Framework/users/users.php
+++ b/appsrc/ODS-Framework/users/users.php
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: users.php,v 1.6.2.40 2011/03/26 14:22:26 source Exp $
+ -  $Id: users.php,v 1.6.2.50 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2008 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -189,6 +189,7 @@
         }
       }
     }
+
     $_formTab = intval((isset ($_REQUEST['formTab'])) ? $_REQUEST['formTab'] : "0");
     $_formTab2 = intval((isset ($_REQUEST['formTab2'])) ? $_REQUEST['formTab2'] : "0");
     $_formTab3 = intval((isset ($_REQUEST['formTab3'])) ? $_REQUEST['formTab3'] : "0");
@@ -531,6 +532,8 @@
             if ($_formTab2 == 0)
             {
               // Import
+              if ($_REQUEST['cb_item_i_photo'] == '1')
+                $_params .= '&photo' . myUrlencode ($_REQUEST['i_photo']);
               if ($_REQUEST['cb_item_i_name'] == '1')
                 $_params .= '&nickName' . myUrlencode ($_REQUEST['i_nickName']);
               if ($_REQUEST['cb_item_i_title'] == '1')
@@ -575,10 +578,10 @@
                 $_params .= '&tags=' . myUrlencode ($_REQUEST['i_tags']);
               if ($_REQUEST['cb_item_i_sameAs'] == '1')
                 $_params .= '&webIDs=' . myUrlencode ($_REQUEST['i_sameAs']);
-              if ($_REQUEST['cb_item_i_interests'] == '1')
-                $_params .= '&interests=' . myUrlencode ($_REQUEST['i_interests']);
               if ($_REQUEST['cb_item_i_topicInterests'] == '1')
                 $_params .= '&topicInterests=' . myUrlencode ($_REQUEST['i_topicInterests']);
+              if ($_REQUEST['cb_item_i_interests'] == '1')
+                $_params .= '&interests=' . myUrlencode ($_REQUEST['i_interests']);
               if ($_REQUEST['cb_item_i_onlineAccounts'] == '1')
                 $_params .= '&onlineAccounts=' . myUrlencode ($_REQUEST['i_onlineAccounts']);
             }
@@ -623,7 +626,10 @@
               foreach($_REQUEST as $name => $value)
               {
                 if (substr_count($name, 'x1_fld_1_') <> 0)
-                  $_tmp = $_tmp . $value . '\n';
+                {
+                  $_sufix = str_replace("x1_fld_1_", "", $name);
+                  $_tmp = $_tmp . $value . ";" . $_REQUEST['x1_fld_2_'.$_sufix] . "\n";
+                }
               }
               $_params .= "&webIDs=" . myUrlencode ($_tmp);
               $_tmp = "";
@@ -632,20 +638,20 @@
                 if (substr_count($name, 'x2_fld_1_') <> 0)
                 {
                   $_sufix = str_replace("x2_fld_1_", "", $name);
-                  $_tmp = $_tmp . $value . ";" . $_REQUEST['x2_fld_2_'.$_sufix] . "\n";
+                  $_tmp = $_tmp . $value . ";" . $_REQUEST['x2_fld_2_'.$_sufix] . '\n';
                 }
               }
-              $_params .= "&interests=" . myUrlencode ($_tmp);
+              $_params .= "&topicInterests=" . myUrlencode ($_tmp);
               $_tmp = "";
               foreach($_REQUEST as $name => $value)
               {
                 if (substr_count($name, 'x3_fld_1_') <> 0)
                 {
                   $_sufix = str_replace("x3_fld_1_", "", $name);
-                  $_tmp = $_tmp . $value . ";" . $_REQUEST['x3_fld_2_'.$_sufix] . '\n';
+                  $_tmp = $_tmp . $value . ";" . $_REQUEST['x3_fld_2_'.$_sufix] . "\n";
                 }
               }
-              $_params .= "&topicInterests=" . myUrlencode ($_tmp);
+              $_params .= "&interests=" . myUrlencode ($_tmp);
             }
             if ($_formTab2 == 2)
             {
@@ -749,18 +755,6 @@
               $_params .=
                   "&securityOpenID=" . myUrlencode ($_REQUEST['pf_securityOpenID']);
 
-            if ($_formTab2 == 3)
-            {
-              if (isset ($_REQUEST['pf_clear']) && ($_REQUEST['pf_clear'] <> ""))
-              {
-                $_params .=
-                    "&securityFacebookID=";
-              } else {
-              $_params .=
-                  "&securityFacebookID=" . myUrlencode ($_REQUEST['pf_securityFacebookID']);
-              }
-            }
-
             if ($_formTab2 == 4)
               $_params .=
                   "&securitySiocLimit=" . myUrlencode ($_REQUEST['pf_securitySiocLimit']);
@@ -848,7 +842,7 @@
       }
   ?>
   <body onunload="myCheckLeave (document.forms['page_form'])">
-    <form name="page_form" id="page_form" method="post" enctype="multipart/form-data" action="users.php">
+    <form name="page_form" id="page_form" method="post" enctype="multipart/form-data">
       <input type="hidden" name="mode" id="mode" value="php" />
       <input type="hidden" name="sid" id="sid" value="<?php print($_sid); ?>" />
       <input type="hidden" name="realm" id="realm" value="<?php print($_realm); ?>" />
@@ -866,7 +860,7 @@
               print sprintf ('<b>User</b>: %s', $_xml->fullName);
 
             if ($_validate == 1)
-              print sprintf (', <b>Profile</b>: <a href="#" onclick="javascript: return profileSubmit();">Edit</a> / <a href="#" onclick="javascript: return userSubmit();">View</a>');
+              print sprintf (', <b>Profile</b>: <a href="#" onclick="javascript: return profileSubmit();">Edit</a> / <a href="#" onclick="javascript: return loginUrl();">View</a>');
           ?>
         </div>
         <div id="ob_right">
@@ -910,9 +904,9 @@
                 </div>
                 <ul id="lf_tabs" class="tabs">
                   <li id="lf_tab_0" title="Digest">Digest</li>
+                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="lf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="lf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -921,7 +915,7 @@
                   <div id="lf_page_0" class="tabContent" >
                 <table class="form" cellspacing="5">
                   <tr>
-                    <th width="30%">
+                        <th width="20%">
                           <label for="lf_uid">User ID</label>
                     </th>
                         <td>
@@ -941,7 +935,7 @@
                   <div id="lf_page_1" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="lf_openId">OpenID URL</label>
                     </th>
                         <td>
@@ -953,7 +947,7 @@
                   <div id="lf_page_2" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                     </th>
                         <td>
                           <span id="lf_facebookData" style="min-height: 20px;"></span>
@@ -966,12 +960,19 @@
                   </div>
                   <div id="lf_page_3" class="tabContent" style="display: none">
                     <table id="lf_table_3" class="form" cellspacing="5">
+                      <tr id="lf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="lf_page_4" class="tabContent" style="display: none">
                     <table id="lf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="lf_twitter" style="min-height: 20px;"></span>
@@ -1011,9 +1012,9 @@
                 </div>
                 <ul id="rf_tabs" class="tabs">
                   <li id="rf_tab_0" title="Digest">Digest</li>
+                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="rf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="rf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -1022,19 +1023,19 @@
                   <div id="rf_page_0" class="tabContent" style="display: none">
                     <table id="rf_table_0" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
-                          <label for="rf_uid">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                        <th width="20%">
+                          <label for="rf_uid_0">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td>
-                          <input type="text" name="rf_uid" value="" id="rf_uid" style="width: 150px;" />
+                          <input type="text" name="rf_uid_0" value="" id="rf_uid_0" style="width: 150px;" />
                         </td>
                       </tr>
                       <tr>
                         <th>
-                          <label for="rf_email">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                          <label for="rf_email_0">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td>
-                          <input type="text" name="rf_email" value="" id="rf_email" size="40"/>
+                          <input type="text" name="rf_email_0" value="" id="rf_email_0" style="width: 300px;" />
                         </td>
                       </tr>
                       <tr>
@@ -1058,7 +1059,7 @@
                   <div id="rf_page_1" class="tabContent" style="display: none">
                     <table id="rf_table_1" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="rf_openId">OpenID</label>
                         </th>
                         <td>
@@ -1070,7 +1071,7 @@
                   <div id="rf_page_2" class="tabContent" style="display: none">
                     <table id="rf_table_2" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_facebookData" style="min-height: 20px;"></span>
@@ -1083,12 +1084,19 @@
                   </div>
                   <div id="rf_page_3" class="tabContent" style="display: none">
                     <table id="rf_table_3" class="form" cellspacing="5">
+                      <tr id="rf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="rf_page_4" class="tabContent" style="display: none">
                     <table id="rf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_twitter" style="min-height: 20px;"></span>
@@ -1115,7 +1123,7 @@
                 <div>
                   <table class="form" cellspacing="5">
                     <tr>
-                      <th width="30%">
+                      <th width="20%">
                       </th>
                       <td>
                         <input type="checkbox" name="rf_is_agreed" value="1" id="rf_is_agreed"/><label for="rf_is_agreed">I agree to the <a href="/ods/terms.html" target="_blank">Terms of Service</a>.</label>
@@ -1124,6 +1132,7 @@
                   </table>
                 </div>
                 <div class="footer" id="rf_login_5">
+                  <input type="button" id="rf_check" name="rf_check" value="Check Availabilty" onclick="javascript: return rfCheckAvalability();" />
                   <input type="button" id="rf_signup" name="rf_signup" value="Sign Up" onclick="javascript: return rfSignupSubmit();" />
                 </div>
               </div>
@@ -1217,11 +1226,18 @@
                       <div id="pf_page_0_1" class="tabContent" style="display:none;">
                         <table class="form" cellspacing="5">
                           <tr>
-                            <th>
+                            <th>Account deactivation</th>
+                            <td>
+                              <input type="button" value="Deactivate" onclick="return userDisable('pf_loginName');" />
+                            </td>
+                          </tr>
+                          <tr>
+                            <th width="30%">
                               <label for="pf_loginName">Login Name</label>
                             </th>
                             <td>
                               <?php print($_xml->name); ?>
+                              <input type="hidden" name="pf_loginName" value="<?php print($_xml->name); ?>" id="pf_loginName" />
                             </td>
                           </tr>
                           <tr>
@@ -1233,7 +1249,7 @@
                             </td>
                           </tr>
                           <tr>
-                            <th width="30%">
+                            <th>
                           <label for="pf_title">Title</label>
                         </th>
                         <td>
@@ -1372,6 +1388,9 @@
                                           <th>
                                             URI
                                           </th>
+                                          <th width="10%">
+                                            Access
+                                          </th>
                                           <th width="65px">
                                             Action
                                           </th>
@@ -1379,18 +1398,12 @@
                                       </thead>
                                       <tr id="x1_tr_no" style="display: none;"><td colspan="2"><b>No Personal URIs</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x1", '<?php print(str_replace("\n", "\\n", $_xml->webIDs)); ?>', ["\n"], function(prefix, val1){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x1", '<?php print(str_replace("\n", "\\n", $_xml->webIDs)); ?>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4, value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
-                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_webIDs" id="pf_acl_webIDs">
-                                      <?php
-                                        for ($N = 0; $N < count ($ACL); $N += 2)
-                                          print sprintf("<option value=\"%s\" %s>%s</option>", $ACL[$N+1], ((strcmp($ACL[$N+1], $_acl->webIDs) == 0) ? "selected=\"selected\"" : ""), $ACL[$N]);
-                                      ?>
-                                    </select>
+                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                                   </td>
                                 </tr>
                               </table>
@@ -1442,16 +1455,16 @@
                                       </thead>
                                       <tr id="x2_tr_no" style="display: none;"><td colspan="3"><b>No Topic of Interests</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x2", '<?php print(str_replace("\n", "\\n", $_xml->interests)); ?>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x2", '<?php print(str_replace("\n", "\\n", $_xml->topicInterests)); ?>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x2', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_interests" id="pf_acl_interests">
+                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
                                       <?php
                                         for ($N = 0; $N < count ($ACL); $N += 2)
-                                          print sprintf("<option value=\"%s\" %s>%s</option>", $ACL[$N+1], ((strcmp($ACL[$N+1], $_acl->interests) == 0) ? "selected=\"selected\"" : ""), $ACL[$N]);
+                                          print sprintf("<option value=\"%s\" %s>%s</option>", $ACL[$N+1], ((strcmp($ACL[$N+1], $_acl->topicInterests) == 0) ? "selected=\"selected\"" : ""), $ACL[$N]);
                                       ?>
                                     </select>
                                   </td>
@@ -1483,16 +1496,16 @@
                                       </thead>
                                       <tr id="x3_tr_no" style="display: none;"><td colspan="3"><b>No Thing of Interests</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x3", '<?php print(str_replace("\n", "\\n", $_xml->topicInterests)); ?>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x3", '<?php print(str_replace("\n", "\\n", $_xml->interests)); ?>', ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x3', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
+                                    <select name="pf_acl_interests" id="pf_acl_interests">
                                       <?php
                                         for ($N = 0; $N < count ($ACL); $N += 2)
-                                          print sprintf("<option value=\"%s\" %s>%s</option>", $ACL[$N+1], ((strcmp($ACL[$N+1], $_acl->topicInterests) == 0) ? "selected=\"selected\"" : ""), $ACL[$N]);
+                                          print sprintf("<option value=\"%s\" %s>%s</option>", $ACL[$N+1], ((strcmp($ACL[$N+1], $_acl->interests) == 0) ? "selected=\"selected\"" : ""), $ACL[$N]);
                                       ?>
                                     </select>
                                   </td>
@@ -1804,6 +1817,9 @@
                                     <th>
                                       Member Home Page URI
                                     </th>
+                                    <th>
+                                      Account URI
+                                    </th>
                                     <th width="65px">
                                       Action
                                     </th>
@@ -1811,12 +1827,12 @@
                                 </thead>
                                 <tr id="x4_tr_no" style="display: none;"><td colspan="3"><b>No Services</b></td></tr>
                                 <script type="text/javascript">
-                                  OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}});});});
+                                  OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2, val3){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}, fld_3: {value: val3}});});});
                                 </script>
                               </table>
                             </td>
                             <td valign="top" nowrap="1">
-                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
+                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}, fld_3: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                             </td>
                           </tr>
                         </table>
@@ -2329,15 +2345,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ol_tbl" class="listing">
-                                  <tbody id="ol_tbody">
-                                    <tr id="ol_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="ol_tbody" class="colorize">
+                                              <tr id="ol_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ol', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ol_no" name="ol_no" value="1" />
                               </td>
                             </tr>
@@ -2425,15 +2459,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="wl_tbl" class="listing">
-                                  <tbody id="wl_tbody">
-                                    <tr id="wl_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="wl_tbody" class="colorize">
+                                              <tr id="wl_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('wl', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="wl_no" name="wl_no" value="1" />
                               </td>
                             </tr>
@@ -2541,15 +2593,33 @@
 		                            Properties
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ld_tbl" class="listing">
-                                  <tbody id="ld_tbody">
-                                    <tr id="ld_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="ld_tbody" class="colorize">
+                                              <tr id="ld_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ld', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ld_no" name="ld_no" value="1" />
                               </td>
                             </tr>
@@ -2610,7 +2680,7 @@
                       		        </th>
                                   <td>
                                     <input type="text" class="_validate_ _uri_" size="100" value="" id="k_import" name="k_import">
-                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Download">
+                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Retrieve">
                                     <img style="display: none;" src="/ods/images/oat/Ajax_throbber.gif" alt="Import knows URIs" id="k_import_image">
                                   </td>
                                 </tr>
@@ -2637,7 +2707,7 @@
                                       <tbody>
                                         <tr id="k_tr_no">
                                            <td colspan="3">
-                                             <b>No downloaded items</b>
+                                             <b>No retrieved items</b>
                                            </td>
                                         </tr>
                                       </tbody>
@@ -3410,33 +3480,6 @@
                       {
                       ?>
                       <div id="pf_page_2_3" class="tabContent" style="display:none;">
-                        <table class="form" cellspacing="5">
-                      <tr>
-                            <th>
-                              Saved Facebook ID
-                        </th>
-                            <td>
-                              <?php
-                                if (isset ($_xml->securityFacebookID))
-                                {
-                                  print ($_xml->securityFacebookName);
-                                } else {
-                                  print ('not yet');
-                                }
-                              ?>
-                            </td>
-                      </tr>
-                      <tr>
-                        <th>
-                        </th>
-                        <td>
-                              <span id="pf_facebookData" style="min-height: 20px;"></span>
-                              <br />
-                              <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
-                              <fb:login-button autologoutlink="true"></fb:login-button>
-                        </td>
-                      </tr>
-                        </table>
                       </div>
                       <?php
                       }
@@ -3609,7 +3652,7 @@
       <div id="FT_R">
         <a href="/ods/faq.html">FAQ</a> | <a href="/ods/privacy.html">Privacy</a> | <a href="/ods/rabuse.vspx">Report Abuse</a>
         <div>
-          Copyright © 1999-2011 OpenLink Software
+          Copyright © 1999-2012 OpenLink Software
         </div>
       </div>
      </div>
diff --git a/appsrc/ODS-Framework/users/users.rb b/appsrc/ODS-Framework/users/users.rb
index 93441bf..019beb3 100644
--- a/appsrc/ODS-Framework/users/users.rb
+++ b/appsrc/ODS-Framework/users/users.rb
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -1012,7 +1012,7 @@ def main()
       <div id="FT_R">
         <a href="/ods/faq.html">FAQ</a> | <a href="/ods/privacy.html">Privacy</a> | <a href="/ods/rabuse.vspx">Report Abuse</a>
         <div>
-          Copyright © 1999-2011 OpenLink Software
+          Copyright © 1999-2012 OpenLink Software
         </div>
       </div>
      </div>
diff --git a/appsrc/ODS-Framework/users/users.vsp b/appsrc/ODS-Framework/users/users.vsp
index 8076da9..1a1f82e 100644
--- a/appsrc/ODS-Framework/users/users.vsp
+++ b/appsrc/ODS-Framework/users/users.vsp
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
  -
- -  $Id: users.vsp,v 1.1.2.39 2011/03/26 14:22:26 source Exp $
+ -  $Id: users.vsp,v 1.1.2.49 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2008 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -589,6 +589,8 @@
             if (vFormTab2 = 0)
             {
               -- Import
+              if (get_keyword ('cb_item_i_photo', params, '') = '1')
+                vParams := vParams || sprintf ('&photo=%U', get_keyword ('i_photo', params, ''));
               if (get_keyword ('cb_item_i_name', params, '') = '1')
                 vParams := vParams || sprintf ('&nickName=%U', get_keyword ('i_nickName', params, ''));
               if (get_keyword ('cb_item_i_title', params, '') = '1')
@@ -633,10 +635,10 @@
                 vParams := vParams || sprintf ('&tags=%U', get_keyword ('i_tags', params, ''));
               if (get_keyword ('cb_item_i_sameAs', params, '') = '1')
                 vParams := vParams || sprintf ('&webIDs=%U', get_keyword ('i_sameAs', params, ''));
-              if (get_keyword ('cb_item_i_interests', params, '') = '1')
-                vParams := vParams || sprintf ('&interests=%U', get_keyword ('i_interests', params, ''));
               if (get_keyword ('cb_item_i_topicInterests', params, '') = '1')
                 vParams := vParams || sprintf ('&topicInterests=%U', get_keyword ('i_topicInterests', params, ''));
+              if (get_keyword ('cb_item_i_interests', params, '') = '1')
+                vParams := vParams || sprintf ('&interests=%U', get_keyword ('i_interests', params, ''));
               if (get_keyword ('cb_item_i_onlineAccounts', params, '') = '1')
                 vParams := vParams || sprintf ('&onlineAccounts=%U', get_keyword ('i_onlineAccounts', params, ''));
             }
@@ -670,7 +672,7 @@
                 if ((params [N] like 'x1_fld_1_%') and (trim (params [N+1]) <> ''))
                 {
                   suffix := replace (params [N], 'x1_fld_1_', '');
-                  tmp := tmp || trim (params [N+1]) || '\n';
+                  tmp := tmp || trim (params [N+1]) || ';' || trim (get_keyword ('x1_fld_2_'||suffix, params, '')) || '\n';
                 }
               }
               vParams := vParams || sprintf ('&webIDs=%U', tmp);
@@ -683,7 +685,7 @@
                   tmp := tmp || trim (params [N+1]) || ';' || trim (get_keyword ('x2_fld_2_'||suffix, params, '')) || '\n';
                 }
               }
-              vParams := vParams || sprintf ('&interests=%U', tmp);
+              vParams := vParams || sprintf ('&topicInterests=%U', tmp);
               tmp := '';
               for (N := 0; N < length (params); N := N + 2)
               {
@@ -693,7 +695,7 @@
                   tmp := tmp || trim (params [N+1]) || ';' || trim (get_keyword ('x3_fld_2_'||suffix, params, '')) || '\n';
                 }
               }
-              vParams := vParams || sprintf ('&topicInterests=%U', tmp);
+              vParams := vParams || sprintf ('&interests=%U', tmp);
             }
             if (vFormTab2 = 2)
             {
@@ -798,17 +800,6 @@
             if (vFormTab2 = 2)
               vParams := vParams || '&securityOpenID=' || sprintf ('%U', get_keyword ('pf_openID', params, ''));
 
-            -- Facebook
-            if (vFormTab2 = 3)
-            {
-              if (get_keyword ('pf_clear', params, '') <> '')
-              {
-                vParams := vParams || '&securityFacebookID=';
-              } else {
-              vParams := vParams || '&securityFacebookID=' || sprintf ('%U', get_keyword ('pf_securityFacebookID', params, ''));
-              }
-            }
-
             -- Limits
             if (vFormTab2 = 4)
               vParams := vParams || '&securitySiocLimit=' || sprintf ('%U', get_keyword ('pf_securitySiocLimit', params, ''));
@@ -985,7 +976,7 @@
     }
   ?>
   <body onunload="myCheckLeave (document.forms['page_form'])">
-    <form name="page_form" id="page_form" method="post" enctype="multipart/form-data" action="users.vsp">
+    <form name="page_form" id="page_form" method="post" enctype="multipart/form-data">
       <input type="hidden" name="mode" id="mode" value="vsp" />
       <input type="hidden" name="sid" id="sid" value="<?V vSid ?>" />
       <input type="hidden" name="realm" id="realm" value="<?V vRealm ?>" />
@@ -1003,7 +994,7 @@
             {
               http (sprintf ('<b>User</b>: %s', xpath_eval ('string (/user/fullName)', vXml)));
               if (vValidate)
-                http (sprintf (', <b>Profile</b>: <a href="#" onclick="javascript: return profileSubmit();">Edit</a> / <a href="#" onclick="javascript: return userSubmit();">View</a>'));
+                http (sprintf (', <b>Profile</b>: <a href="#" onclick="javascript: return profileSubmit();">Edit</a> / <a href="#" onclick="javascript: return loginUrl();">View</a>'));
             }
           ?>
         </div>
@@ -1046,9 +1037,9 @@
                 </div>
                 <ul id="lf_tabs" class="tabs">
                   <li id="lf_tab_0" title="Digest">Digest</li>
+                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="lf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="lf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="lf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="lf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
@@ -1057,7 +1048,7 @@
                   <div id="lf_page_0" class="tabContent" >
                 <table class="form" cellspacing="5">
                   <tr>
-                    <th width="30%">
+                        <th width="20%">
                           <label for="lf_uid">User ID</label>
                     </th>
                         <td>
@@ -1077,7 +1068,7 @@
                   <div id="lf_page_1" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="lf_openId">OpenID URL</label>
                     </th>
                         <td>
@@ -1089,7 +1080,7 @@
                   <div id="lf_page_2" class="tabContent" style="display: none">
                     <table class="form" cellspacing="5">
                   <tr>
-                        <th width="30%">
+                        <th width="20%">
                     </th>
                         <td>
                           <span id="lf_facebookData" style="min-height: 20px;"></span>
@@ -1102,12 +1093,19 @@
                   </div>
                   <div id="lf_page_3" class="tabContent" style="display: none">
                     <table id="lf_table_3" class="form" cellspacing="5">
+                      <tr id="lf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="lf_page_4" class="tabContent" style="display: none">
                     <table id="lf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="lf_twitter" style="min-height: 20px;"></span>
@@ -1147,30 +1145,30 @@
                 </div>
                 <ul id="rf_tabs" class="tabs">
                   <li id="rf_tab_0" title="Digest">Digest</li>
+                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_1" title="OpenID" style="display: none;">OpenID</li>
                   <li id="rf_tab_2" title="Facebook" style="display: none;">Facebook</li>
-                  <li id="rf_tab_3" title="WebID" style="display: none;">WebID</li>
                   <li id="rf_tab_4" title="Twitter" style="display: none;">Twitter</li>
                   <li id="rf_tab_5" title="LinkedIn" style="display: none;">LinkedIn</li>
                 </ul>
-                <div style="min-height: 135px; border: 1px solid #aaa; margin: -13px 5px 5px 5px;">
+                <div style="min-height: 140px; border: 1px solid #aaa; margin: -13px 5px 5px 5px;">
                   <div id="rf_content"></div>
                   <div id="rf_page_0" class="tabContent" >
                     <table id="rf_table_0" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
-                          <label for="rf_uid">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                        <th width="20%">
+                          <label for="rf_uid_0">Login Name<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td>
-                          <input type="text" name="rf_uid" value="" id="rf_uid" style="width: 150px;" />
+                          <input type="text" name="rf_uid_0" id="rf_uid_0" value="" style="width: 150px;" />
                         </td>
                       </tr>
                       <tr>
                         <th>
-                          <label for="rf_email">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
+                          <label for="rf_email_0">E-mail<div style="font-weight: normal; display:inline; color:red;"> *</div></label>
                         </th>
                         <td>
-                          <input type="text" name="rf_email" value="" id="rf_email" style="width: 300px;" />
+                          <input type="text" name="rf_email_0" id="rf_email_0" value="" style="width: 300px;" />
                         </td>
                       </tr>
                       <tr>
@@ -1194,7 +1192,7 @@
                   <div id="rf_page_1" class="tabContent" style="display: none">
                     <table id="rf_table_1" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                           <label for="rf_openId">OpenID</label>
                         </th>
                         <td>
@@ -1206,7 +1204,7 @@
                   <div id="rf_page_2" class="tabContent" style="display: none">
                     <table id="rf_table_2" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_facebookData" style="min-height: 20px;"></span>
@@ -1219,12 +1217,19 @@
                   </div>
                   <div id="rf_page_3" class="tabContent" style="display: none">
                     <table id="rf_table_3" class="form" cellspacing="5">
+                      <tr id="rf_table_3_throbber">
+                        <th width="20%">
+                        </th>
+                        <td>
+                          <img alt="Import WebID Data" src="/ods/images/oat/Ajax_throbber.gif" />
+                        </td>
+                      </tr>
                     </table>
                   </div>
                   <div id="rf_page_4" class="tabContent" style="display: none">
                     <table id="rf_table_4" class="form" cellspacing="5">
                       <tr>
-                        <th width="30%">
+                        <th width="20%">
                         </th>
                         <td>
                           <span id="rf_twitter" style="min-height: 20px;"></span>
@@ -1251,7 +1256,7 @@
                 <div>
                   <table class="form" cellspacing="5">
                     <tr>
-                      <th width="30%">
+                      <th width="20%">
                       </th>
                       <td>
                         <input type="checkbox" name="rf_is_agreed" value="1" id="rf_is_agreed"/><label for="rf_is_agreed">I agree to the <a href="/ods/terms.html" target="_blank">Terms of Service</a>.</label>
@@ -1260,6 +1265,7 @@
                   </table>
                 </div>
                 <div class="footer" id="rf_login_5">
+                  <input type="button" id="rf_check" name="rf_check" value="Check Availabilty" onclick="javascript: return rfCheckAvalability();" />
                   <input type="button" id="rf_signup" name="rf_signup" value="Sign Up" onclick="javascript: return rfSignupSubmit();" />
                 </div>
               </div>
@@ -1367,11 +1373,18 @@
                       <div id="pf_page_0_1" class="tabContent" style="display:none;">
                         <table class="form" cellspacing="5">
                           <tr>
-                            <th>
+                            <th>Account deactivation</th>
+                            <td>
+                              <input type="button" value="Deactivate" onclick="return userDisable('pf_loginName');" />
+                            </td>
+                          </tr>
+                          <tr>
+                            <th width="30%">
                               <label for="pf_loginName">Login Name</label>
                             </th>
                             <td>
                               <?V xpath_eval ('string (/user/name)', vXml) ?>
+                              <input type="hidden" name="pf_loginName" value="<?V xpath_eval ('string (/user/name)', vXml) ?>" id="pf_loginName" />
                             </td>
                           </tr>
                           <tr>
@@ -1383,7 +1396,7 @@
                             </td>
                           </tr>
                           <tr>
-                        <th width="30%">
+                            <th>
                           <label for="pf_title">Title</label>
                         </th>
                         <td>
@@ -1522,6 +1535,9 @@
                                           <th>
                                             URI
                                           </th>
+                                          <th width="10%">
+                                            Access
+                                          </th>
                                           <th width="65px">
                                             Action
                                           </th>
@@ -1529,18 +1545,12 @@
                                       </thead>
                                       <tr id="x1_tr_no" style="display: none;"><td colspan="2"><b>No Personal URIs</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x1", "<?V replace(cast (xpath_eval ('string (/user/webIDs)', vXml) as varchar), '\n', '\\n') ?>", ["\n"], function(prefix, val1){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x1", "<?V replace(cast (xpath_eval ('string (/user/webIDs)', vXml) as varchar), '\n', '\\n') ?>", ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4, value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
-                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_webIDs" id="pf_acl_webIDs">
-                                      <?vsp
-                                        for (N := 0; N < length (xAcl); N := N + 2)
-                                          http (sprintf('<option value="%s" %s>%s</option>', xAcl[N+1], case when (xAcl[N+1] = xpath_eval ('string (/acl/webIDs)', vAcl)) then 'selected="selected"' else '' end, xAcl[N]));
-                                      ?>
-                                    </select>
+                                    <span class="button pointer" onclick="TBL.createRow('x1', null, {fld_1: {className: '_validate_ _webid_ _canEmpty_'}, fld_2: {mode: 4}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                                   </td>
                                 </tr>
                               </table>
@@ -1592,16 +1602,16 @@
                                       </thead>
                                       <tr id="x2_tr_no" style="display: none;"><td colspan="3"><b>No Topic of Interests</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x2", "<?V replace(cast (xpath_eval ('string (/user/interests)', vXml) as varchar), '\n', '\\n') ?>", ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x2", "<?V replace(cast (xpath_eval ('string (/user/topicInterests)', vXml) as varchar), '\n', '\\n') ?>", ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x2', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_interests" id="pf_acl_interests">
+                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
                                       <?vsp
                                         for (N := 0; N < length (xAcl); N := N + 2)
-                                          http (sprintf('<option value="%s" %s>%s</option>', xAcl[N+1], case when (xAcl[N+1] = xpath_eval ('string (/acl/interests)', vAcl)) then 'selected="selected"' else '' end, xAcl[N]));
+                                          http (sprintf('<option value="%s" %s>%s</option>', xAcl[N+1], case when (xAcl[N+1] = xpath_eval ('string (/acl/topicInterests)', vAcl)) then 'selected="selected"' else '' end, xAcl[N]));
                                       ?>
                                     </select>
                                   </td>
@@ -1633,16 +1643,16 @@
                                       </thead>
                                       <tr id="x3_tr_no" style="display: none;"><td colspan="3"><b>No Thing of Interests</b></td></tr>
                                       <script type="text/javascript">
-                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x3", "<?V replace(cast (xpath_eval ('string (/user/topicInterests)', vXml) as varchar), '\n', '\\n') ?>", ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
+                                        OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowRows("x3", "<?V replace(cast (xpath_eval ('string (/user/interests)', vXml) as varchar), '\n', '\\n') ?>", ["\n", ";"], function(prefix, val1, val2){TBL.createRow(prefix, null, {fld_1: {value: val1, className: '_validate_ _url_ _canEmpty_'}, fld_2: {value: val2}});});});
                                       </script>
                                     </table>
                                   </td>
                                   <td valign="top" nowrap="nowrap">
                                     <span class="button pointer" onclick="TBL.createRow('x3', null, {fld_1: {className: '_validate_ _url_ _canEmpty_'}, fld_2: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
-                                    <select name="pf_acl_topicInterests" id="pf_acl_topicInterests">
+                                    <select name="pf_acl_interests" id="pf_acl_interests">
                                       <?vsp
                                         for (N := 0; N < length (xAcl); N := N + 2)
-                                          http (sprintf('<option value="%s" %s>%s</option>', xAcl[N+1], case when (xAcl[N+1] = xpath_eval ('string (/acl/topicInterests)', vAcl)) then 'selected="selected"' else '' end, xAcl[N]));
+                                          http (sprintf('<option value="%s" %s>%s</option>', xAcl[N+1], case when (xAcl[N+1] = xpath_eval ('string (/acl/interests)', vAcl)) then 'selected="selected"' else '' end, xAcl[N]));
                                       ?>
                                     </select>
                                   </td>
@@ -1948,7 +1958,7 @@
                         <input type="hidden" name="c_nick" value="<?V xpath_eval ('string (/user/nickName)', vXml) ?>" id="c_nick" />
                     <table class="form" cellspacing="5">
                       <tr>
-                            <td width="600px">
+                            <td width="800px">
                               <table id="x4_tbl" class="listing">
                                 <thead>
                                   <tr class="listing_header_row">
@@ -1958,6 +1968,9 @@
                                     <th>
                                       Member Home Page URI
                                     </th>
+                                    <th>
+                                      Account URI
+                                    </th>
                                     <th width="65px">
                                       Action
                                     </th>
@@ -1965,12 +1978,12 @@
                                 </thead>
                                 <tr id="x4_tr_no" style="display: none;"><td colspan="3"><b>No Services</b></td></tr>
                                 <script type="text/javascript">
-                                  OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}});});});
+                                  OAT.MSG.attach(OAT, "PAGE_LOADED", function (){pfShowOnlineAccounts("x4", "P", function(prefix, val0, val1, val2, val3){TBL.createRow(prefix, null, {id: val0, fld_1: {mode: 10, value: val1}, fld_2: {value: val2, className: '_validate_ _uri_ _canEmpty_'}, fld_3: {value: val3}});});});
                                 </script>
                               </table>
                             </td>
                             <td valign="top" nowrap="1">
-                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
+                              <span class="button pointer" onclick="TBL.createRow('x4', null, {fld_1: {mode: 10}, fld_2: {className: '_validate_ _uri_ _canEmpty_'}, fld_3: {}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Row" title="Add Row" /> Add</span>
                             </td>
                           </tr>
                         </table>
@@ -2483,15 +2496,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ol_tbl" class="listing">
-                                  <tbody id="ol_tbody">
-                                    <tr id="ol_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="ol_tbody" class="colorize">
+                                              <tr id="ol_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ol', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ol_no" name="ol_no" value="1" />
                               </td>
                             </tr>
@@ -2579,15 +2610,33 @@
                   		          Products
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="wl_tbl" class="listing">
-                                  <tbody id="wl_tbody">
-                                    <tr id="wl_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="wl_tbody" class="colorize">
+                                              <tr id="wl_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('wl', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="wl_no" name="wl_no" value="1" />
                               </td>
                             </tr>
@@ -2695,15 +2744,33 @@
 		                            Properties
                   		        </th>
                   		        <td width="800px">
+                                    <table class="ctl_grp">
+                                      <tr>
+                                        <td width="800px">
                                 <table id="ld_tbl" class="listing">
-                                  <tbody id="ld_tbody">
-                                    <tr id="ld_throbber">
-                                      <td>
-                                        <img src="/ods/images/oat/Ajax_throbber.gif" />
-                                      </td>
+                                            <thead>
+                                              <tr class="listing_header_row">
+                                                <th>
+                                                  <div style="width: 16px;"><![CDATA[ ]]></div>
+                                                </th>
+                                                <th width="100%">
+                                                  Ontology
+                                                </th>
+                                                <th width="80px">
+                                                  Action
+                                                </th>
                                     </tr>
+                                            </thead>
+                                            <tbody id="ld_tbody" class="colorize">
+                                              <tr id="ld_tr_no"><td colspan="3"><b>No Attached Ontologies</b></td></tr>
                                   </tbody>
                                 </table>
+                                        </td>
+                                        <td valign="top" nowrap="nowrap">
+                                          <span class="button pointer" onclick="TBL.createRow('ld', null, {fld_1: {mode: 40, cssText: 'display: none;'}, fld_2: {mode: 41, labelValue: 'Ontology: ', cssText: 'width: 95%;'}, btn_1: {mode: 40}, btn_2: {mode: 41, title: 'Attach'}});"><img class="button" src="/ods/images/icons/add_16.png" border="0" alt="Add Ontology" title="Add Ontology" /> Add</span>
+                                        </td>
+                                      </tr>
+                                    </table>
                                 <input type="hidden" id="ld_no" name="ld_no" value="1" />
                               </td>
                             </tr>
@@ -2764,7 +2831,7 @@
                       		        </th>
                                   <td>
                                     <input type="text" class="_validate_ _uri_" size="100" value="" id="k_import" name="k_import">
-                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Download">
+                                    <input type="button" class="button" onclick="javascript: knowsData(); return false;" value="Retrieve">
                                     <img style="display: none;" src="/ods/images/oat/Ajax_throbber.gif" alt="Import knows URIs" id="k_import_image">
                                   </td>
                                 </tr>
@@ -2791,7 +2858,7 @@
                                       <tbody>
                                         <tr id="k_tr_no">
                                            <td colspan="3">
-                                             <b>No downloaded items</b>
+                                             <b>No retrieved items</b>
                                            </td>
                                         </tr>
                                       </tbody>
@@ -3564,33 +3631,6 @@
                       {
                       ?>
                       <div id="pf_page_2_3" class="tabContent" style="display:none;">
-                        <table class="form" cellspacing="5">
-                      <tr>
-                            <th>
-                              Saved Facebook ID
-                        </th>
-                            <td>
-                              <?vsp
-                                if (isnull (xpath_eval ('/user/securityFacebookID', vXml)))
-                                {
-                                  http ('not yet');
-                                } else {
-                                  http (xpath_eval ('string (/user/securityFacebookName)', vXml));
-                                }
-                              ?>
-                            </td>
-                      </tr>
-                      <tr>
-                        <th>
-                        </th>
-                        <td>
-                              <span id="pf_facebookData" style="min-height: 20px;"></span>
-                              <br />
-                              <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
-                              <fb:login-button autologoutlink="true"></fb:login-button>
-                        </td>
-                      </tr>
-                        </table>
                       </div>
                       <?vsp
                       }
@@ -3727,14 +3767,6 @@
                       ?>
                     <div class="footer">
                       <input type="submit" name="pf_cancel" value="Cancel" onclick="needToConfirm = false;"/>
-                        <?vsp
-                        if ((vFormTab2 = 3) and not isnull (xpath_eval ('/user/securityFacebookID', vXml)))
-                        {
-                        ?>
-                        <input type="submit" name="pf_clear" value="Clear" onclick="myBeforeSubmit(); return myValidateInputs(this);"/>
-                        <?vsp
-                        }
-                        ?>
                         <input type="submit" name="pf_update" value="Save" onclick="myBeforeSubmit(); return myValidateInputs(this);"/>
                         <input type="submit" name="pf_next" value="Save & Next" onclick="myBeforeSubmit(); return myValidateInputs(this);"/>
                       </div>
@@ -3763,7 +3795,7 @@
       <div id="FT_R">
         <a href="/ods/faq.html">FAQ</a> | <a href="/ods/privacy.html">Privacy</a> | <a href="/ods/rabuse.vspx">Report Abuse</a>
         <div>
-          Copyright © 1999-2011 OpenLink Software
+          Copyright © 1999-2012 OpenLink Software
         </div>
       </div>
     </div>
diff --git a/appsrc/ODS-Framework/users/users.xsl b/appsrc/ODS-Framework/users/users.xsl
index 40f7364..8c1ae15 100644
--- a/appsrc/ODS-Framework/users/users.xsl
+++ b/appsrc/ODS-Framework/users/users.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: users.xsl,v 1.1.4.6 2010/12/20 12:27:09 source Exp $
+ -  $Id: users.xsl,v 1.1.4.8 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -200,11 +200,11 @@
     <tr>
       <th><xsl:value-of select="$label"/></th>
       <td>
-        <image>
+        <img border="0" width="64" class="resize">
           <xsl:attribute name="src">
             <xsl:value-of select="$value"/>
           </xsl:attribute>
-        </image>
+        </img>
       </td>
     </tr>
   </xsl:template>
diff --git a/appsrc/ODS-Framework/users_select.js b/appsrc/ODS-Framework/users_select.js
index f7e1f7b..330b28f 100644
--- a/appsrc/ODS-Framework/users_select.js
+++ b/appsrc/ODS-Framework/users_select.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: users_select.js,v 1.3.2.4 2010/10/13 12:16:49 source Exp $
+ *  $Id: users_select.js,v 1.3.2.5 2012/03/08 10:46:19 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/users_select.vspx b/appsrc/ODS-Framework/users_select.vspx
index 7c609f2..06b6ab0 100644
--- a/appsrc/ODS-Framework/users_select.vspx
+++ b/appsrc/ODS-Framework/users_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: users_select.vspx,v 1.5.2.7 2010/11/19 16:50:50 source Exp $
+ -  $Id: users_select.vspx,v 1.5.2.9 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,24 +33,9 @@
 
   <vm:page>
     <vm:header>
-      <vm:title>Select users to invite</vm:title>
+      <vm:title>Select user/group</vm:title>
   <link rel="stylesheet" type="text/css" href="default.css" />
 <style type="text/css">
-        a {
-          text-decoration: none;
-        }
-        a:active {
-          text-decoration: none;
-        }
-        a:visited {
-          text-decoration: none;
-        }
-        a:hover {
-          text-decoration: none;
-        }
-        .listing_row_odd:hover, .listing_row_even:hover {
-         	background-color: #eec;
-        }
 div.boxHeader {
   background-color: #EFEFEF;
   margin: 0 0 0.5em 0;
@@ -58,54 +43,16 @@ div.boxHeader {
   border: 1px solid #7F94A5;
   vertical-align: middle;
 }
-
-input.button {
-  margin: .2em 0 .1em 0;
-  font-size: .8em;
-	font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  border: solid 1px;
-  border-color: #7F94A5;
-  background: #99b3c5;
+      </style>
+      <script type="text/javascript">
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
 }
-
-
-.button2 {
-  font-size: .8em;
-	font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  padding: 0.1em 1em 0.1em 1em ;
-  border: solid 1px;
-  border-color: #7F94A5;
-  background: #99b3c5;
 }
-
-</style>
-
-
+      </script>
     </vm:header>
 
-  <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-    <![CDATA[
-      declare altStr, directionStr, imageStr varchar;
-
-      if (self.v_order = columnName and self.v_direction = 'desc') {
-        directionStr := 'Ascending';
-        imageStr := ' <img src="images/icons/orderdown_16.png" border="0" alt="Down"/>';
-      } else if (self.v_order = columnName and self.v_direction = 'asc') {
-        directionStr := 'Descending';
-        imageStr := ' <img src="images/icons/orderup_16.png" border="0" alt="Up"/>';
-      } else {
-        directionStr := 'Ascending';
-        imageStr := '  ';
-      }
-      altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-      http(sprintf('<a href="#" onClick="javascript: myPost(''page_form'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-    ]]>
-  </v:method>
-
   <v:method name="sortChange" arglist="in columnName varchar">
     <![CDATA[
         if (columnName <> '')
@@ -156,6 +103,7 @@ input.button {
       <v:variable name="v_how" persist="0" type="varchar" default="'1'"/>
       <v:variable name="v_order" persist="0" type="varchar" default="'U_NAME'" />
       <v:variable name="v_direction" persist="0" type="varchar" default="'asc'" />
+        <v:variable name="v_nrows" persist="0" param-name="nrows" type="varchar" default="'10'" />
         <v:variable name="v_src" persist="0" param-name="src" type="varchar" default="''" />
         <v:variable name="v_dst" persist="0" param-name="dst" type="varchar" default="'sc'" />
         <v:variable name="v_s1" persist="0" param-name="s1" type="varchar" default="''" />
@@ -163,6 +111,7 @@ input.button {
     </vm:variables>
   <vm:body>
         <vm:login redirect="index.vspx"/>
+        <?vsp http(sprintf('<input type="hidden" name="nrows" id="nrows" value="%s"/>', get_keyword('nrows', self.vc_page.vc_event.ve_params, '10'))); ?>
       <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s"/>', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
       <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s"/>', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
         <?vsp http(sprintf('<input type="hidden" name="form"  id="form"  value="%s"/>', get_keyword('form', self.vc_page.vc_event.ve_params, 'page_form'))); ?>
@@ -196,6 +145,8 @@ input.button {
                   self.v_filter := get_keyword('filter', e.ve_params, self.v_filter);
                 self.v_how := self.how.ufl_value;
                 self.v_value := trim(self.value.ufl_value);
+
+                  self.ds.vc_reset();
                 self.vc_data_bind (e);
               ]]>
             </v:on-post>
@@ -205,12 +156,16 @@ input.button {
               <![CDATA[
                 self.v_how := '1';
                 self.v_value := '';
+
+                  self.ds.vc_reset();
                 self.vc_data_bind (e);
               ]]>
             </v:on-post>
           </v:button>
+            <label>
             <v:check-box auto-submit="1" name="show_all_cbx" xhtml_id="show_all_cbx" initial-checked="--0" value="--1"/>
-          show all
+              Show all
+            </label>
         </div>
           <v:data-source name="dsrc" expression-type="sql" nrows="0" initial-offset="0">
           <v:before-data-bind>
@@ -263,13 +218,14 @@ input.button {
               control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
                 if (get_keyword('show_all_cbx', self.vc_page.vc_event.ve_params, 0))
                 {
+                  self.ds.vc_reset();
                   control.ds_nrows := 1000;
                   control.ds_rows_fetched := 0;
                   control.ds_rows_offs := 0;
                 }
                 else
                 {
-                  control.ds_nrows := 10;
+                  control.ds_nrows := cast (self.v_nrows as integer);
                 }
             ]]>
           </v:before-data-bind>
@@ -279,25 +235,21 @@ input.button {
         </v:data-source>
         <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
             <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-              <table id="users" class="listing" cellspacing="0">
-                <tr class="listing_header_row">
+              <table class="ODS_grid">
+                <thead>
+                  <tr>
                   <vm:if test="self.isMultiple(self.v_dst)">
-                    <th class="checkbox" width="1%">
+                      <th class="checkbox">
                       <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item'); updateChecked(this, 'cb_item'); "/>
                     </th>
                   </vm:if>
                   <vm:if test="self.v_mode = ''">
-                    <th>
-                      Type
-                    </th>
+                      <th>Type</th>
                   </vm:if>
-                  <th>
-                    <?vsp self.sortColumn('Name', 'U_NAME'); ?>
-                  </th>
-                  <th>
-                    <?vsp self.sortColumn('Description', 'U_FULL_NAME'); ?>
-                  </th>
+                    <?vsp http (DB.DBA.wa_show_column_header('Name', 'U_NAME', self.v_order, self.v_direction, 'width="50%"')); ?>
+                    <?vsp http (DB.DBA.wa_show_column_header('Description', 'U_FULL_NAME', self.v_order, self.v_direction, 'width="50%"')); ?>
                 </tr>
+                </thead>
             </table>
           </v:template>
 
@@ -315,9 +267,9 @@ input.button {
 
             <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
                 <table>
-                  <tr onclick="rowSelected(this);" class="pointer <?V case when mod(control.te_ctr+1,2) = 0 then 'listing_row_odd' else 'listing_row_even' end ?>">
+                  <tr onclick="rowSelected(this);" class="pointer">
                     <vm:if test="self.isMultiple(self.v_dst)">
-                    <td  align="center">
+                      <td class="checkbox">
                       <?vsp
                         declare S, name any;
 
@@ -332,11 +284,11 @@ input.button {
                         <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_TYPE')" format="%s"/>
                     </td>
                     </vm:if>
-                  <td nowrap="nowrap">
+                    <td width="50%" nowrap="nowrap">
                       <input name="s1_item" type="hidden" value="<?V (control as vspx_row_template).te_column_value('U_NAME') ?>" />
                     <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_NAME')" format="%s"/>
                   </td>
-                  <td nowrap="nowrap">
+                    <td width="50%" nowrap="nowrap">
                       <input name="s2_item" type="hidden" value="<?V (control as vspx_row_template).te_column_value('U_FULL_NAME') ?>" />
                     <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('U_FULL_NAME')" format="%s"/>
                   </td>
@@ -348,11 +300,13 @@ input.button {
 
           <v:template type="simple" name-to-remove="table" set-to-remove="top">
             <table>
-              <tr align="center">
-                  <td colspan="<?V either(equ(self.v_mode,''),3,2)+self.isMultiple(self.v_dst) ?>">
-                  <vm:ds-members-navigation data-set="ds"/>
+                <tfoot>
+                  <tr>
+                    <td style="text-align: right;" colspan="<?V either(equ(self.v_mode,''),3,2)+self.isMultiple(self.v_dst) ?>">
+                      <vm:ds-navigation data-set="ds"/>
                   </td>
               </tr>
+                </tfoot>
             </table>
           </v:template>
 
@@ -360,7 +314,7 @@ input.button {
           <vm:if test="self.isMultiple(self.v_dst)">
           <div style="padding: 0 0 0.5em 0;">
             <hr />
-              <a href="#" onclick="javascript: return addChecked(document.forms['page_form'], 'cb_item', 'No users were selected for addition. No groups were selected for addition.');" class="button2">&nbsp;Add selected</a>
+              <a href="#" onclick="javascript: return addChecked(document.forms['page_form'], 'cb_item', 'No users were selected for addition. No groups were selected for addition.');" class="navi-button">&nbsp;Add selected</a>
           </div>
           </vm:if>
       </div>
diff --git a/appsrc/ODS-Framework/vad_version b/appsrc/ODS-Framework/vad_version
index 5debac5..6186365 100644
--- a/appsrc/ODS-Framework/vad_version
+++ b/appsrc/ODS-Framework/vad_version
@@ -1 +1 @@
-1.80.92
+1.85.92
diff --git a/appsrc/ODS-Framework/validate.js b/appsrc/ODS-Framework/validate.js
index a886d6a..0efbc53 100644
--- a/appsrc/ODS-Framework/validate.js
+++ b/appsrc/ODS-Framework/validate.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/version.base b/appsrc/ODS-Framework/version.base
deleted file mode 100644
index 7facc89..0000000
--- a/appsrc/ODS-Framework/version.base
+++ /dev/null
@@ -1 +0,0 @@
-36
diff --git a/appsrc/ODS-Framework/version.curr b/appsrc/ODS-Framework/version.curr
deleted file mode 100644
index 5b6e52f..0000000
--- a/appsrc/ODS-Framework/version.curr
+++ /dev/null
@@ -1 +0,0 @@
-8092
diff --git a/appsrc/ODS-Framework/vhost.vspx b/appsrc/ODS-Framework/vhost.vspx
index 0b91419..ed54354 100644
--- a/appsrc/ODS-Framework/vhost.vspx
+++ b/appsrc/ODS-Framework/vhost.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vhost.vspx,v 1.10.2.1 2010/09/20 10:15:31 source Exp $
+ -  $Id: vhost.vspx,v 1.10.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/vhost_simple.vspx b/appsrc/ODS-Framework/vhost_simple.vspx
index 3ff94dc..fd31c09 100644
--- a/appsrc/ODS-Framework/vhost_simple.vspx
+++ b/appsrc/ODS-Framework/vhost_simple.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vhost_simple.vspx,v 1.4.2.1 2010/09/20 10:15:31 source Exp $
+ -  $Id: vhost_simple.vspx,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/view.vspx b/appsrc/ODS-Framework/view.vspx
index 994683d..0959f14 100644
--- a/appsrc/ODS-Framework/view.vspx
+++ b/appsrc/ODS-Framework/view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: view.vspx,v 1.5.2.1 2010/09/20 10:15:31 source Exp $
+ -  $Id: view.vspx,v 1.5.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/view_file.vspx b/appsrc/ODS-Framework/view_file.vspx
index fcf4f6b..24d3cbe 100644
--- a/appsrc/ODS-Framework/view_file.vspx
+++ b/appsrc/ODS-Framework/view_file.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: view_file.vspx,v 1.6.2.1 2010/09/20 10:15:31 source Exp $
+ -  $Id: view_file.vspx,v 1.6.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/wa_login.vspx b/appsrc/ODS-Framework/wa_login.vspx
index e328fb2..e5d182d 100644
--- a/appsrc/ODS-Framework/wa_login.vspx
+++ b/appsrc/ODS-Framework/wa_login.vspx
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: wa_login.vspx,v 1.4.2.2 2011/03/23 12:18:30 source Exp $
+ -  $Id: wa_login.vspx,v 1.4.2.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/wa_maps.sql b/appsrc/ODS-Framework/wa_maps.sql
index d4295da..ff81b48 100644
--- a/appsrc/ODS-Framework/wa_maps.sql
+++ b/appsrc/ODS-Framework/wa_maps.sql
@@ -1,12 +1,12 @@
 --
---  $Id: wa_maps.sql,v 1.7.2.3 2010/12/10 16:04:14 source Exp $
+--  $Id: wa_maps.sql,v 1.7.2.4 2012/03/08 10:46:19 source Exp $
 --
 --  Procedures to support the WA maps handling.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/wa_maps.vspx b/appsrc/ODS-Framework/wa_maps.vspx
index 5df9ce8..765deb1 100644
--- a/appsrc/ODS-Framework/wa_maps.vspx
+++ b/appsrc/ODS-Framework/wa_maps.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wa_maps.vspx,v 1.8.2.1 2010/09/20 10:15:32 source Exp $
+ -  $Id: wa_maps.vspx,v 1.8.2.2 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/wa_search_procs.sql b/appsrc/ODS-Framework/wa_search_procs.sql
index 3fbf2f3..06b1e73 100644
--- a/appsrc/ODS-Framework/wa_search_procs.sql
+++ b/appsrc/ODS-Framework/wa_search_procs.sql
@@ -1,12 +1,12 @@
 --
---  $Id: wa_search_procs.sql,v 1.25.2.1 2010/09/20 10:15:32 source Exp $
+--  $Id: wa_search_procs.sql,v 1.25.2.3 2012/03/08 10:46:19 source Exp $
 --
 --  Procedures to support the WA search.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -2160,7 +2160,7 @@ where WAUI_PHOTO_URL is not null and length (WAUI_PHOTO_URL) = 0
 update WA_USER_INFO set
   WAUI_PHOTO_URL =
     DAV_HOME_DIR ((select U_NAME from SYS_USERS where U_ID = WAUI_U_ID))||'/wa/images/'||WAUI_PHOTO_URL
-where WAUI_PHOTO_URL is not null and blob_to_string (WAUI_PHOTO_URL) not like '/%'
+where WAUI_PHOTO_URL is not null and blob_to_string (WAUI_PHOTO_URL) not like '/%' and blob_to_string (WAUI_PHOTO_URL) not like 'http://%'
 ;
 
 create function WA_SEARCH_CHECK_FT_QUERY (in text varchar, in is_tags integer := 0) returns varchar
diff --git a/appsrc/ODS-Framework/wa_template.sql b/appsrc/ODS-Framework/wa_template.sql
index f3764f9..2448716 100644
--- a/appsrc/ODS-Framework/wa_template.sql
+++ b/appsrc/ODS-Framework/wa_template.sql
@@ -1,10 +1,10 @@
 --
---  $Id: wa_template.sql,v 1.4.2.1 2010/09/20 10:15:32 source Exp $
+--  $Id: wa_template.sql,v 1.4.2.2 2012/03/08 10:46:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/web_header.vspx b/appsrc/ODS-Framework/web_header.vspx
index 8301205..cef44d0 100644
--- a/appsrc/ODS-Framework/web_header.vspx
+++ b/appsrc/ODS-Framework/web_header.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: web_header.vspx,v 1.5.2.2 2010/09/20 10:15:32 source Exp $
+ -  $Id: web_header.vspx,v 1.5.2.3 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/web_svc.sql b/appsrc/ODS-Framework/web_svc.sql
index aa8e7ab..a2168d6 100644
--- a/appsrc/ODS-Framework/web_svc.sql
+++ b/appsrc/ODS-Framework/web_svc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: web_svc.sql,v 1.7.2.6 2010/11/19 16:50:50 source Exp $
+--  $Id: web_svc.sql,v 1.7.2.7 2012/03/08 10:46:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Framework/webfinger.sql b/appsrc/ODS-Framework/webfinger.sql
index 79b7fed..e50b0bf 100644
--- a/appsrc/ODS-Framework/webfinger.sql
+++ b/appsrc/ODS-Framework/webfinger.sql
@@ -1,12 +1,12 @@
 --
---  $Id: webfinger.sql,v 1.1.4.13 2011/02/18 15:42:46 source Exp $
+--  $Id: webfinger.sql,v 1.1.4.15 2012/03/08 10:46:19 source Exp $
 --
 --  Webfinger & fingerpoint protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -226,7 +226,8 @@ create procedure WF_PROFILE_GET (in acct varchar)
 }
 ;
 
-create procedure FINGERPOINT_WEBID_GET (in cert varchar := null, in mail varchar := null)
+-- /* take webid using fingerpoint prtocol */
+create procedure FINGERPOINT_WEBID_GET (in cert varchar := null, in mail varchar := null, in cert_type int := 0)
 {
   declare webid, domain, page, template, url, fp, links, head, xd, tmpcert, res, tmp, link, qr, xp any;
 
@@ -238,7 +239,7 @@ create procedure FINGERPOINT_WEBID_GET (in cert varchar := null, in mail varchar
     };
 
   if (mail is null)
-    mail := DB.DBA.FOAF_SSL_MAIL_GET (cert);
+    mail := DB.DBA.FOAF_SSL_MAIL_GET (cert, cert_type);
   else
     {
       declare h any;
diff --git a/appsrc/ODS-Framework/webid_check.vsp b/appsrc/ODS-Framework/webid_check.vsp
new file mode 100644
index 0000000..d37a111
--- /dev/null
+++ b/appsrc/ODS-Framework/webid_check.vsp
@@ -0,0 +1,87 @@
+<?vsp
+  declare info, res, cb, mod, exp, webid, ret_url any;
+  cb := {?'callback'};
+  if (not length (cb))
+    {
+      goto html;
+    }
+  if (strchr (cb, '?') is null)
+    cb := cb || '?';
+  else
+    cb := cb || '&';
+  mod := exp := '';
+  if (not is_http_ctx ())
+    res := 'noCert';
+  else
+    { 
+      info := get_certificate_info (9);
+      if (info is null)
+        res := 'noCert';
+      else if (FOAF_SSL_AUTH_GEN (null, 1, 0))
+        {
+          webid := FOAF_SSL_WEBID_GET ();
+	  res := 'success'; 
+        }
+      else
+	res := 'noVerified';
+      if (info is not null)
+        { 
+      	  mod := info[1];
+          exp := bin2hex (info[2]);
+	}
+    }
+   if (res = 'success')
+     {
+       ret_url := sprintf ('%swebid=%U', cb, webid);
+     }
+   else
+     {
+       ret_url := sprintf ('%serror=%U', cb, res);
+     }
+   ret_url := ret_url || sprintf ('&ts=%U', date_iso8601 (now ()));  
+   ret_url := ret_url || sprintf ('&signature=%U', sha1_digest (ret_url));  
+   http_status_set (302);
+   http_header (sprintf ('Location: %s\r\n', ret_url));
+   return;
+html:
+?>
+<html>
+  <head>
+   <title>WebId Identity Provider</title>
+   <style type="text/css">
+      #qrcode {
+        float: right;
+        clear: right;
+        margin-right: 20px;
+      }
+    </style>      
+  </head>
+  <body>
+    <h1>WebId Identity Provider</h1>
+    <?vsp declare qrimg, ua any;
+     ua := http_request_header (lines, 'User-Agent');
+     qrimg := ODS.ODS_API.qrcode (sprintf ('http://%{WSHost}s%s', http_path ()));
+     if (qrimg is not null and strcasestr (ua, 'Mobile') is null) {
+    ?>
+    <div id="qrcode"><img alt="QRcode image" src="data:image/jpg;base64,<?V qrimg ?>"/></div>
+    <?vsp
+      } ?>
+    <div>
+      This will send a redirection to the URL you have specified in the input, including a signed assertion by this service about your WebID.
+    </div>
+    <div>
+    <form method="get">
+    Requesting service endpoint: <input type="text" value="" size="120" name="callback" /> <input type="submit" name="Log in" value="go"/>
+    </form>
+    </div>
+    <div>
+	The return values are:
+	<ul>
+	  <li>webid: the webid have been verified</li>
+	  <li>error: error code if verification fails </li>
+	  <li>ts: timestamp in ISO 8601 format</li>
+	  <li>signature: SHA1 digest over returning URL</li>
+	</ul>
+    </div>
+  </body>
+</html>
diff --git a/appsrc/ODS-Framework/webid_demo.html b/appsrc/ODS-Framework/webid_demo.html
new file mode 100644
index 0000000..7dfa243
--- /dev/null
+++ b/appsrc/ODS-Framework/webid_demo.html
@@ -0,0 +1,139 @@
+<html>
+  <head>
+    <title>WebID Verification Demo</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+      #qrcode {
+        float: right;
+        clear: right;
+        margin-right: 20px;
+      }
+    </style>
+    <script type="text/javascript" src="/ods/oat/loader.js"></script>
+    <script type="text/javascript">
+      OAT.Preferences.imagePath = '/ods/images/oat/';
+      OAT.Preferences.stylePath = '/ods/oat/styles/';
+      OAT.Preferences.showAjax = false;
+
+      var featureList=["ajax", "json"];
+      OAT.Loader.load(featureList);
+    </script>
+    <script type="text/javascript">
+      function check() {
+        var x = function (data) {
+	  var expiration = $('expiration').checked ? '&expiration=true' : '';
+          var callback = document.location.protocol + '//' + document.location.host + document.location.pathname;
+          document.location = 'https://' + data + '/ods/webid_verify.vsp?callback=' + encodeURIComponent(callback) + expiration;
+        }
+        OAT.AJAX.GET ('/ods/api/getDefaultHttps', false, x, {async: false});
+      }
+      function getObject(id) {
+        return document.getElementById(id)
+      }
+      function hide(id) {
+        var obj = getObject(id);
+        obj.style.display = "none";
+      }
+      function show(id) {
+        var obj = getObject(id);
+        obj.style.display = "";
+      }
+      function getParam(name)
+      {
+        name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+        var regexS = "[\\?&]"+name+"=([^&#]*)";
+        var regex = new RegExp( regexS );
+        var results = regex.exec( window.location.href );
+        if( results == null )
+          return "";
+        else
+          return decodeURIComponent(results[1]);
+      }
+      function showQR()
+      {
+        var hostURL = document.location.protocol + '//' + document.location.host + document.location.pathname;
+        var x = function (data) {
+          var img = getObject('qrcodeImg');
+          img.src = 'data:image/jpg;base64,'+data;
+          show(img);
+        }
+        OAT.AJAX.GET ('/ods/api/qrcode?data='+encodeURIComponent(hostURL), false, x, {async: false});
+      }
+    </script>
+  </head>
+  <body>
+    <h1>WebID Verification Demo</h1>
+    <div id="qrcode"><img id="qrcodeImg" alt="QRcode image" src="" /></div>
+    <script type="text/javascript">
+  	  OAT.Loader.load(['ajax'], showQR);
+  	</script>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+	<input type="checkbox" value="true" name="expiration" id="expiration" />  <label for="expiration">Check Certificate Expiration</label><br /> 
+        <input type="button" name="go" value="Check" id="go" onclick="javascript: return check();" />
+      </form>
+    </div>
+    <div id="result" style="display: none;">
+    	The return values are:
+	    <ul id="result_webid" style="display: none;">
+	      <li>WebID - <script language="javascript" type="text/javascript">
+            document.write('<a href="" id="link"><span id="webid"></span><\/a>')
+          </script></li>
+	      <li>Subject - <span id="subj"></span></li>
+	      <li>MD5 - <span id="md5"></span></li>
+	      <li>SHA1 - <span id="sha1"></span></li>
+	      <li>Timestamp in ISO 8601 format - <span id="ts"></span></li>
+	    </ul>
+	    <ul id="result_error" style="display: none;">
+	      <li>Error - <span id="error"></span></li>
+	    </ul>
+    </div>
+    <script type="text/javascript">
+      var webid = getParam('webid');
+      var error = getParam('error');
+      if ((webid != '') || (error != '')) {
+        show('result');
+        if (webid != '') {
+          show('result_webid');
+          getObject('webid').innerHTML = getParam('webid');
+          getObject('link').href = getParam('webid');
+          getObject('ts').innerHTML = getParam('ts');
+          getObject('md5').innerHTML = getParam('md5');
+          getObject('sha1').innerHTML = getParam('sha1');
+          getObject('subj').innerHTML = getParam('subj');
+        } else {
+          hide('result_webid');
+        }
+        if (error != '') {
+          show('result_error');
+          getObject('error').innerHTML = getParam('error');;
+        } else {
+          hide('result_error');
+        }
+      } else {
+        hide('result');
+      }
+  	</script>
+  </body>
+</html>
diff --git a/appsrc/ODS-Framework/webid_demo.php b/appsrc/ODS-Framework/webid_demo.php
new file mode 100644
index 0000000..d46cb37
--- /dev/null
+++ b/appsrc/ODS-Framework/webid_demo.php
@@ -0,0 +1,160 @@
+<?php
+  function parseUrl($url)
+  {
+    // parse the given URL
+    $url = parse_url($url);
+    if (!isset($url['port'])) {
+      if ($url['scheme'] == 'http') {
+        $url['port'] = 80;
+      }
+      elseif ($url['scheme'] == 'https') {
+        $url['port'] = 443;
+      }
+    }
+    if ($url['scheme'] == 'https')
+      $url['scheme'] = 'ssl';
+
+    elseif ($url['scheme'] == 'http')
+      $url['scheme'] = 'tcp';
+
+    $url['query'] = isset($url['query'])? $url['query']: '';
+    $url['protocol'] = $url['scheme'] . '://';
+
+    return $url;
+  }
+  function makeRequest($url, $headers) {
+    // parse the given URL
+    $content = "";
+    $fp = fsockopen($url['protocol'] . $url['host'], $url['port'], $errno, $errstr, 30);
+    if ($fp) {
+      if (fwrite($fp, $headers)) {
+        while (!feof($fp)) {
+          $result .= fgets($fp, 128);
+        }
+        fclose($fp);
+
+        // split the result header from the content
+        $result = explode("\r\n\r\n", $result, 2);
+
+        $header = isset($result[0]) ? $result[0] : '';
+        $content = isset($result[1]) ? $result[1] : '';
+      } else {
+        fclose($fp);
+      }
+    }
+    return $content;
+  }
+  function getRequest($url)
+  {
+    $url = parseUrl($url);
+    $eol = "\r\n";
+    $headers = "GET " . $url['path'] . "?" . $url['query'] . " HTTP/1.1" . $eol .
+               "Host: " . $url['host'].":".$url['port'] . $eol .
+               "Connection: close"  . $eol . $eol;
+    return makeRequest ($url, $headers);
+  }
+  function apiURL()
+  {
+    $pageURL = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
+    $pageURL .= $_SERVER['SERVER_PORT'] <> '80' ? $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"] : $_SERVER['SERVER_NAME'];
+    return $pageURL.'/ods/api';
+  }
+  function httpURL()
+  {
+    $pageURL = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
+    $pageURL .= $_SERVER['SERVER_PORT'] <> '80' ? $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] : $_SERVER['SERVER_NAME'];
+    return $pageURL . '/ods/webid/webid_demo.php';
+  }
+	$_webid = isset ($_REQUEST['webid']) ? $_REQUEST['webid'] : '';
+	$_error = isset ($_REQUEST['error']) ? $_REQUEST['error'] : '';
+	$_action = isset ($_REQUEST['go']) ? $_REQUEST['go'] : '';
+  if (($_webid == '') && ($_error == ''))
+  {
+    if ($_action <> '')
+    {
+      $_url = getRequest (sprintf ("%s/getDefaultHttps", apiURL()));
+      $_url = sprintf ('https://%s/ods/webid_verify.vsp?callback=%s', $_url, urlencode(httpURL()));
+      header (sprintf ('Location: %s', $_url));
+      return;
+    }
+  }
+?>
+<html>
+  <head>
+    <title>WebID Verification Demo</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+      #qrcode {
+        float: right;
+        clear: right;
+        margin-right: 20px;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Demo</h1>
+    <?php
+      $_QR = getRequest (sprintf ("%s/qrcode?data=%s", apiURL(), urlencode(httpURL())));
+      if ($_QR <> '')
+      {
+    ?>
+    <div id="qrcode"><img alt="QRcode image" src="data:image/jpg;base64,<?php print ($_QR); ?>" /></div>
+    <?php
+      }
+    ?>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+        <input type="submit" name="go" value="Check"/>
+      </form>
+    </div>
+    <?php
+      if (($_webid <> '') || ($_error <> ''))
+      {
+    ?>
+      <div>
+      	The return values are:
+  	    <ul>
+          <?php
+            if ($_webid <> '')
+            {
+	            $_proxyIri = getRequest (sprintf ("%s/iri2proxy?iri=%s", apiURL(), urlencode($_webid)));
+          ?>
+  	      <li>WebID -  <?php print (sprintf('<a href="%s">%s</a>', $_proxyIri, $_proxyIri)); ?></li>
+  	      <li>Timestamp in ISO 8601 format - <?php print ($_REQUEST['ts']); ?></li>
+          <?php
+            }
+            else if ($_error <> '')
+            {
+          ?>
+  	      <li>Error - <?php print ($_error); ?></li>
+          <?php
+            }
+          ?>
+  	    </ul>
+      </div>
+    <?php
+      }
+    ?>
+  </body>
+</html>
diff --git a/appsrc/ODS-Framework/webid_demo.vsp b/appsrc/ODS-Framework/webid_demo.vsp
new file mode 100644
index 0000000..5954df8
--- /dev/null
+++ b/appsrc/ODS-Framework/webid_demo.vsp
@@ -0,0 +1,121 @@
+<?vsp
+  declare webid, error, action, hostUrl, httpsUrl, url, callback, certificate any;
+
+	webid := get_keyword ('webid', params);
+	error := get_keyword ('error', params);
+	action := get_keyword ('go', params);
+  if (length (webid) or length (error))
+    goto html;
+
+  if (not length (action))
+    goto html;
+
+  if (is_https_ctx ())
+  {
+    hostUrl := 'https://' || ODS.ODS_API.getDefaultHttps ();
+  }
+  else
+  {
+    hostUrl := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+    if (hostUrl is null)
+    {
+      hostUrl := sys_stat ('st_host_name');
+      if (server_http_port () <> '80')
+        hostUrl := hostUrl || ':' || server_http_port ();
+    }
+    hostUrl := 'http://' || hostUrl;
+  }
+  if (isnull (hostUrl))
+  {
+    error := 'No certificate';
+    goto html;
+  }
+  httpsUrl := ODS..getDefaultHttps();
+  if (isnull (httpsUrl))
+    httpsUrl := 'id.myopenlink.net';
+
+  callback := hostUrl || '/ods/webid/webid_demo.vsp';
+  url := sprintf ('https://%s/ods/webid_verify.vsp?callback=%U', httpsUrl, callback);
+  http_status_set (302);
+  http_header (sprintf ('Location: %s\r\n', url));
+  return;
+
+html:
+?>
+<html>
+  <head>
+    <title>WebID Verification Demo</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+      #qrcode {
+        float: right;
+        clear: right;
+        margin-right: 20px;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Demo</h1>
+    <?vsp declare qrimg, ua any;
+     ua := http_request_header (lines, 'User-Agent');
+     qrimg := ODS.ODS_API.qrcode (sprintf ('http://%{WSHost}s%s', http_path ()));
+     if (qrimg is not null and strcasestr (ua, 'Mobile') is null) {
+    ?>
+    <div id="qrcode"><img alt="QRcode image" src="data:image/jpg;base64,<?V qrimg ?>"/></div>
+    <?vsp
+      } ?>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+        <input type="submit" name="go" value="Check"/>
+      </form>
+    </div>
+    <?vsp
+      if (length (webid) or length (error))
+      {
+    ?>
+      <div>
+      	The return values are:
+  	    <ul>
+          <?vsp
+            if (length (webid))
+            {
+          ?>
+  	      <li>WebID - <?vsp http(sprintf('<a href="%s">%s</a>', DB.DBA.RDF_PROXY_ENTITY_IRI (rtrim (webid, '#this')), DB.DBA.RDF_PROXY_ENTITY_IRI (rtrim (webid, '#this')) )); ?></li>
+  	      <li>Timestamp in ISO 8601 format - <?V get_keyword ('ts', params) ?></li>
+          <?vsp
+            }
+            if (length (error))
+            {
+          ?>
+  	      <li>Error - <?V error ?></li>
+          <?vsp
+            }
+          ?>
+  	    </ul>
+      </div>
+    <?vsp
+      }
+    ?>
+  </body>
+</html>
diff --git a/appsrc/ODS-Framework/webid_select.vspx b/appsrc/ODS-Framework/webid_select.vspx
index 3932dd1..88f56b2 100644
--- a/appsrc/ODS-Framework/webid_select.vspx
+++ b/appsrc/ODS-Framework/webid_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: webid_select.vspx,v 1.1.4.5 2010/10/13 12:16:49 source Exp $
+ -  $Id: webid_select.vspx,v 1.1.4.9 2012/03/08 10:46:19 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,24 +33,9 @@
 
   <vm:page>
     <vm:header>
-      <vm:title>Select users to invite</vm:title>
+      <vm:title>Select WebID</vm:title>
       <link rel="stylesheet" type="text/css" href="default.css" />
       <style type="text/css">
-        a {
-          text-decoration: none;
-        }
-        a:active {
-          text-decoration: none;
-        }
-        a:visited {
-          text-decoration: none;
-        }
-        a:hover {
-          text-decoration: none;
-        }
-        .listing_row_odd:hover, .listing_row_even:hover {
-         	background-color: #eec;
-        }
         div.boxHeader {
           background-color: #EFEFEF;
           margin: 0 0 0.5em 0;
@@ -58,47 +43,15 @@
           border: 1px solid #7F94A5;
           vertical-align: middle;
         }
-        input.button {
-          margin: .2em 0 .1em 0;
-          font-size: .8em;
-          font-family: verdana, sans-serif;
-          color: #ffffff;
-          font-weight: bold;
-          border: solid 1px;
-          border-color: #7F94A5;
-          background: #99b3c5;
-        }
-        .button2 {
-          font-size: .8em;
-          font-family: verdana, sans-serif;
-          color: #ffffff;
-          font-weight: bold;
-          padding: 0.1em 1em 0.1em 1em ;
-          border: solid 1px;
-          border-color: #7F94A5;
-          background: #99b3c5;
-        }
       </style>
-    </vm:header>
-
-    <v:method name="sortColumn" arglist="in titleName varchar, in columnName varchar">
-      <![CDATA[
-        declare altStr, directionStr, imageStr varchar;
-
-        if (self.v_order = columnName and self.v_direction = 'desc') {
-          directionStr := 'Ascending';
-          imageStr := ' <img src="images/icons/orderdown_16.png" border="0" alt="Down"/>';
-        } else if (self.v_order = columnName and self.v_direction = 'asc') {
-          directionStr := 'Descending';
-          imageStr := ' <img src="images/icons/orderup_16.png" border="0" alt="Up"/>';
-        } else {
-          directionStr := 'Ascending';
-          imageStr := '  ';
+      <script type="text/javascript">
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
         }
-        altStr := sprintf('Sort Rows on %s in %s Order', titleName, directionStr);
-        http(sprintf('<a href="#" onClick="javascript: myPost(''page_form'', ''sortColumn'', ''%s''); return false;" alt="%s" title="%s">%s%s</a>', columnName, altStr, altStr, titleName, imageStr));
-      ]]>
-    </v:method>
+      	}
+      </script>
+    </vm:header>
 
     <v:method name="sortChange" arglist="in columnName varchar">
       <![CDATA[
@@ -137,6 +90,7 @@
         <v:variable name="v_filter" persist="0" type="varchar" default="null"/>
         <v:variable name="v_order" persist="0" type="varchar" default="'F2'" />
         <v:variable name="v_direction" persist="0" type="varchar" default="'asc'" />
+        <v:variable name="v_nrows" persist="0" param-name="nrows" type="varchar" default="'10'" />
         <v:variable name="v_src" persist="0" param-name="src" type="varchar" default="''" />
         <v:variable name="v_dst" persist="0" param-name="dst" type="varchar" default="'sc'" />
         <v:variable name="v_s1" persist="0" param-name="s1" type="varchar" default="''" />
@@ -144,9 +98,11 @@
       </vm:variables>
       <vm:body>
         <vm:login redirect="index.vspx"/>
+        <input type="hidden" name="nrows" id="sid"   value="<?V get_keyword('nrows', self.vc_page.vc_event.ve_params, '10') ?>" />
         <input type="hidden" name="sid"   id="sid"   value="<?V get_keyword('sid', self.vc_page.vc_event.ve_params) ?>" />
         <input type="hidden" name="realm" id="realm" value="<?V get_keyword('realm', self.vc_page.vc_event.ve_params) ?> " />
         <input type="hidden" name="form"  id="form"  value="<?V get_keyword('form', self.vc_page.vc_event.ve_params, 'page_form') ?> " />
+        <input type="hidden" name="mode"  id="mode"  value="<?V get_keyword('mode', self.vc_page.vc_event.ve_params, '') ?> " />
         <input type="hidden" name="src"   id="src"   value="<?V get_keyword('src', self.vc_page.vc_event.ve_params, '') ?>" />
         <input type="hidden" name="dst"   id="dst"   value="<?V get_keyword('dst', self.vc_page.vc_event.ve_params, 'sc') ?>" />
         <input type="hidden" name="s1"    id="s1"    value="<?V get_keyword('s1', self.vc_page.vc_event.ve_params, '') ?>" />
@@ -173,18 +129,19 @@
 
                 user_sql := '';
                 group_sql := '';
+                if (self.v_filter = 'u')
+                {
+                  control.ds_sql := 'select ''Person'' F1, SIOC..person_iri (SIOC..user_iri (U_ID)) F2, '''' F3 from DB.DBA.SYS_USERS where U_IS_ROLE = 0 and U_DAV_ENABLE = 1 and U_ACCOUNT_DISABLED = 0';
+                }
+                else
+                {
                 if (self.v_filter <> 'p')
                 {
                   group_sql := sprintf ('select ''Group'' F1, SIOC..acl_group_iri (%d, WACL_NAME) F2, WACL_DESCRIPTION F3 from WA_GROUPS_ACL where WACL_USER_ID = %d', self.u_id, self.u_id);
                 }
                 if (self.v_filter <> 'g')
                 {
-                  if (DB.DBA.wa_check_app ('AddressBook', self.u_id))
-                  {
-                    user_sql := sprintf ('select ''Person'' F1, a.P_IRI F2, a.P_NAME F3 from AB.WA.PERSONS a, DB.DBA.WA_MEMBER b, DB.DBA.WA_INSTANCE c where a.P_DOMAIN_ID = c.WAI_ID and c.WAI_TYPE_NAME = ''AddressBook'' and c.WAI_NAME = b.WAM_INST and B.WAM_MEMBER_TYPE = 1 and b.WAM_USER = %d and DB.DBA.is_empty_or_null (a.P_IRI) <> 1', self.u_id);
-                  } else {
-                    user_sql := 'select ''Person'' F1, '''' F2, '''' F3 from DB.DBA.SYS_USERS where 0 = 1';
-                  }
+                    user_sql := sprintf ('select x.F1, x.F2, x.F3 from DB.DBA.wa_webid_users(user_id) (F1 varchar, F2 varchar, F3 varchar) x where x.user_id = %d', self.u_id);;
                 }
                 if (user_sql = '')
                 {
@@ -198,8 +155,10 @@
                 {
                   control.ds_sql := concat('select F1, F2, F3 from (', user_sql, ' union ' , group_sql, ') x ');
                 }
+                }
                 self.sortChange(get_keyword('sortColumn', e.ve_params, ''));
                 control.ds_sql := concat(control.ds_sql, ' order by ', self.v_order, ' ', self.v_direction);
+                control.ds_nrows := cast (self.v_nrows as integer);
               ]]>
             </v:before-data-bind>
             <v:after-data-bind>
@@ -208,25 +167,21 @@
           </v:data-source>
           <v:data-set name="ds" data-source="self.dsrc" scrollable="1">
             <v:template name="ds_header" type="simple" name-to-remove="table" set-to-remove="bottom">
-              <table id="webids" class="listing" cellspacing="0">
-                <tr class="listing_header_row">
+              <table class="ODS_grid">
+                <thead>
+                  <tr>
                   <vm:if test="self.isMultiple(self.v_dst)">
-                    <th class="checkbox" width="1%">
+                      <th class="checkbox">
                       <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item'); updateChecked(this, 'cb_item'); "/>
                     </th>
                   </vm:if>
                   <vm:if test="self.v_mode = ''">
-                    <th>
-                      Type
-                    </th>
+                      <th>Type</th>
                   </vm:if>
-                  <th>
-                    <?vsp self.sortColumn('WebID', 'F2'); ?>
-                  </th>
-                  <th>
-                    <?vsp self.sortColumn('Description', 'F3'); ?>
-                  </th>
+                    <?vsp http (DB.DBA.wa_show_column_header('WebID', 'F2', self.v_order, self.v_direction, 'width="50%"')); ?>
+                    <?vsp http (DB.DBA.wa_show_column_header('Description', 'F3', self.v_order, self.v_direction, 'width="50%"')); ?>
                 </tr>
+                </thead>
               </table>
             </v:template>
 
@@ -242,9 +197,9 @@
 
               <v:template name="ds_browse" type="browse" name-to-remove="table" set-to-remove="both">
                 <table>
-                  <tr onclick="rowSelected(this);" class="pointer <?V case when mod(control.te_ctr,2) = 0 then 'listing_row_odd' else 'listing_row_even' end ?>">
+                  <tr onclick="rowSelected(this);" class="pointer">
                     <vm:if test="self.isMultiple(self.v_dst)">
-                      <td  align="center">
+                      <td class="checkbox">
                         <?vsp
                           declare S, name any;
 
@@ -256,7 +211,7 @@
                     </vm:if>
                     <vm:if test="self.v_mode = ''">
                       <td nowrap="nowrap">
-                        <v:label value="--((control.vc_parent).vc_parent as vspx_row_template).te_column_value('F1')" format="%s"/>
+                        <v:label value="--(control.vc_parent as vspx_row_template).te_column_value('F1')" format="%s"/>
                       </td>
                     </vm:if>
                     <td nowrap="nowrap">
@@ -275,11 +230,13 @@
 
             <v:template type="simple" name-to-remove="table" set-to-remove="top">
               <table>
-                <tr align="center">
-                  <td colspan="<?V either(equ(self.v_mode,''),3,2)+self.isMultiple(self.v_dst) ?>">
+                <tfoot>
+                  <tr>
+                    <td style="text-align: right;" colspan="<?V either(equ(self.v_mode,''),3,2)+self.isMultiple(self.v_dst) ?>">
                     <vm:ds-navigation data-set="ds"/>
                   </td>
                 </tr>
+                </tfoot>
               </table>
             </v:template>
 
@@ -287,7 +244,7 @@
           <vm:if test="self.isMultiple(self.v_dst)">
             <div style="padding: 0 0 0.5em 0;">
               <hr />
-              <a href="#" onclick="javascript: addChecked(document.forms['page_form'], 'cb_item', 'No users were selected for addition. No groups were selected for addition.');" class="button2">&nbsp;Add selected</a>
+              <a href="#" onclick="javascript: addChecked(document.forms['page_form'], 'cb_item', 'No users were selected for addition. No groups were selected for addition.');" class="navi-button">&nbsp;Add selected</a>
             </div>
           </vm:if>
         </div>
diff --git a/appsrc/ODS-Framework/webid_verify.vsp b/appsrc/ODS-Framework/webid_verify.vsp
new file mode 100644
index 0000000..68baacd
--- /dev/null
+++ b/appsrc/ODS-Framework/webid_verify.vsp
@@ -0,0 +1,144 @@
+<?vsp
+  declare info, res, cb, mod, exp, webid, ret_url, cert, ctype, err, dummy, expiry_verify, vtype, md5, sha1, subj any;
+  cb := {?'callback'};
+  cert := {?'certificate'};
+  err := '';
+  dummy := null;
+  if (not xenc_key_exists ('id_rsa'))
+    {
+      err := 'Must configure CA on this host.';
+      goto html;
+    }
+  if ((length (cb) = 0) or ((length (cert) = 0) and not is_http_ctx ()))
+    {
+      goto html;
+    }
+  ctype := 1;
+  if (not length (cert))
+    {
+      cert := client_attr ('client_certificate');
+      ctype := 0;
+    } 
+  else 
+    {
+      if (strstr (cert, '-----BEGIN CERTIFICATE-----') is null)
+    cert := decode_base64 (cert);
+  else
+    ctype := 0;
+    }
+  if ({?'expiration'} = 'true')
+    expiry_verify := 1;
+  else 
+    expiry_verify := 0;
+
+  if (strchr (cb, '?') is null)
+    cb := cb || '?';
+  else
+    cb := cb || '&';
+  mod := exp := '';
+  md5 := ''; sha1 := ''; subj := '';
+  if (not is_http_ctx () or cert = 0)
+    res := 'noCert';
+  else
+    { 
+      info := get_certificate_info (9, cert, ctype);
+      if (info is null)
+        res := 'noCert';
+      else if (WEBID_AUTH_GEN_2 (cert, ctype, null, 1, 0, webid, dummy, expiry_verify, vtype))
+	res := 'success';
+      else
+	res := 'noVerified';
+      if (info is not null)
+        { 
+      	  mod := info[1];
+          exp := bin2hex (info[2]);
+          md5 := get_certificate_info (6, cert, ctype, null, 'md5');
+          sha1 := get_certificate_info (6, cert, ctype, null, 'sha1');
+          subj := get_certificate_info (2, cert, ctype);
+	}
+    }
+   if (res = 'success')
+     {
+       ret_url := sprintf ('%swebid=%U', cb, webid);
+     }
+   else
+     {
+       ret_url := sprintf ('%serror=%U', cb, res);
+     }
+   ret_url := ret_url || sprintf ('&ts=%U&md5=%U&sha1=%U&subj=%U', date_iso8601 (now ()), md5, sha1, subj);
+   ret_url := ret_url || sprintf ('&signature=%U', xenc_dsig_sign (ret_url, 'id_rsa', xenc_get_key_algo ('id_rsa')));  
+   http_status_set (302);
+   http_header (sprintf ('Location: %s\r\n', ret_url));
+   return;
+html:
+?>
+<html>
+  <head>
+   <title>WebID Verification Service</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+      #qrcode {
+        float: right;
+        clear: right;
+        margin-right: 20px;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Service</h1>
+    <div class="msg"><?V err ?></div>
+        <?vsp declare qrimg, ua any;
+     ua := http_request_header (lines, 'User-Agent');
+     qrimg := ODS.ODS_API.qrcode (sprintf ('http://%{WSHost}s%s', http_path ()));
+     if (qrimg is not null and strcasestr (ua, 'Mobile') is null) {
+    ?>
+    <div id="qrcode"><img alt="QRcode image" src="data:image/jpg;base64,<?V qrimg ?>"/></div>
+    <?vsp
+      } ?>
+    <div>
+      This will send a redirection to the URL you have specified in the input, including a signed assertion by this service about your X.509 Certificate's WebID watermark.
+      <br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>ldap</b>, for e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>http</b>, for e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+
+      	<li>* <b>mailto</b>, for e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      	<li>* <b>acct</b>, for e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+    <form method="get">
+    Requesting service endpoint: <br/> 
+    <input type="text" value="" size="120" name="callback" /> <br/>
+    X.509 certificate (PEM or DER base64 encoded) <br />
+    <textarea name="certificate" rows="20" cols="80"></textarea><br/>
+    <input type="submit" name="go" value="Verify"/>
+    </form>
+    </div>
+    <div>
+	The return values are:
+	<ul>
+	  <li>webid: the webid have been verified</li>
+	  <li>error: error code if verification fails </li>
+	  <li>ts: timestamp in ISO 8601 format</li>
+	  <li>signature: RSA-SHA1 digest on returning URL</li>
+	</ul>
+    </div>
+    <div>
+    Server Public Key:<br/>
+    <pre><?vsp http_value (xenc_pubkey_pem_export ('id_rsa'), null); ?></pre>		 
+    </div>
+  </body>
+</html>
diff --git a/appsrc/ODS-Gallery/Makefile.am b/appsrc/ODS-Gallery/Makefile.am
index 36d2ecb..64311b0 100644
--- a/appsrc/ODS-Gallery/Makefile.am
+++ b/appsrc/ODS-Gallery/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -47,6 +47,7 @@ EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
 	sql/procedures/*.sql \
+	vad_version \
 	www-root/*.vsp \
 	www-root/*.vspx \
 	www-root/css/*.css \
diff --git a/appsrc/ODS-Gallery/Makefile.in b/appsrc/ODS-Gallery/Makefile.in
index 10a3d10..db5f0a3 100644
--- a/appsrc/ODS-Gallery/Makefile.in
+++ b/appsrc/ODS-Gallery/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -310,6 +312,7 @@ EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
 	sql/procedures/*.sql \
+	vad_version \
 	www-root/*.vsp \
 	www-root/*.vspx \
 	www-root/css/*.css \
diff --git a/appsrc/ODS-Gallery/make_vad.sh b/appsrc/ODS-Gallery/make_vad.sh
index 010088d..a9a268b 100755
--- a/appsrc/ODS-Gallery/make_vad.sh
+++ b/appsrc/ODS-Gallery/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.22.2.9 2011/02/03 10:26:16 source Exp $
+#  $Id: make_vad.sh,v 1.22.2.12 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -28,9 +28,8 @@ LANG=C
 LC_ALL=POSIX
 export LANG LC_ALL
 
-
 LOGDIR=`pwd`
-VERSION="0.3.58"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/make_vad.log"
 STICKER="make_vad.xml"
 PACKDATE=`date +"%Y-%m-%d %H:%M"`
@@ -59,21 +58,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
-
-if [ "z$SERVER" = "z" ]  
-then
-    if [ "x$HOST_OS" != "x" ]
-    then
-	SERVER=virtuoso-odbc-t.exe
-    else
-	SERVER=virtuoso
-    fi
-fi
 
 rm -rf vad
 
@@ -86,14 +70,55 @@ else
   myrm=$RM
 fi
 
-VERSION_INIT() 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init() 
 {
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
   rm -f version.tmp
-  for i in `find . -name 'Entries' | grep -v "vad/"`; do
-        cat $i | grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
   done
-  VERSION=`cat version.tmp | awk ' BEGIN { cnt=78 } { cnt = cnt + $1} END { printf "1.%02.02f", cnt/100 + 1}'`
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
   rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
 }
 
 virtuoso_start() {
@@ -226,7 +251,7 @@ sticker_init() {
   echo "  <name package=\"Gallery\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Gallery\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -239,8 +264,8 @@ sticker_init() {
   echo "  <require>" >> $STICKER
   echo "   <name package=\"Framework\">" >> $STICKER
   echo "   </name>" >> $STICKER
-  echo "    <versions_later package=\"1.71.75\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-06-02 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.81.91\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-05-16 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "   </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -401,7 +426,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
-VERSION_INIT
+version_init
 directory_init
 virtuoso_init
 sticker_init
@@ -409,7 +434,6 @@ vad_create
 virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_gallery_dav.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -419,5 +443,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Gallery/sql/create_tables.sql b/appsrc/ODS-Gallery/sql/create_tables.sql
index 653e9dc..07572d4 100644
--- a/appsrc/ODS-Gallery/sql/create_tables.sql
+++ b/appsrc/ODS-Gallery/sql/create_tables.sql
@@ -1,10 +1,10 @@
 --
---  $Id: create_tables.sql,v 1.9.2.1 2010/09/20 10:15:36 source Exp $
+--  $Id: create_tables.sql,v 1.9.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/create_triggers.sql b/appsrc/ODS-Gallery/sql/create_triggers.sql
index a8baa67..b048146 100644
--- a/appsrc/ODS-Gallery/sql/create_triggers.sql
+++ b/appsrc/ODS-Gallery/sql/create_triggers.sql
@@ -1,10 +1,10 @@
 --
---  $Id: create_triggers.sql,v 1.4.2.2 2010/09/20 10:15:36 source Exp $
+--  $Id: create_triggers.sql,v 1.4.2.3 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/photo-wa-install.sql b/appsrc/ODS-Gallery/sql/photo-wa-install.sql
index 32b3277..184ce26 100644
--- a/appsrc/ODS-Gallery/sql/photo-wa-install.sql
+++ b/appsrc/ODS-Gallery/sql/photo-wa-install.sql
@@ -1,10 +1,10 @@
 --
---  $Id: photo-wa-install.sql,v 1.16.2.2 2010/09/20 10:15:36 source Exp $
+--  $Id: photo-wa-install.sql,v 1.16.2.4 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -132,6 +132,12 @@ create procedure PHOTO.WA.photo_install()
   PHOTO.WA._exec_no_error('grant execute on SOAP_album TO SOAPGallery');
   PHOTO.WA._exec_no_error('grant execute on SOAP_external_album TO SOAPGallery');
   PHOTO.WA._exec_no_error('grant execute on SOAP_gallery TO SOAPGallery');
+
+  if (registry_get ('gallery_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_photos_services();
+  registry_set ('gallery_services_update', '1');
 }
 ;
 
diff --git a/appsrc/ODS-Gallery/sql/photo-wa-uninstall.sql b/appsrc/ODS-Gallery/sql/photo-wa-uninstall.sql
index 63ed3b1..367aeac 100644
--- a/appsrc/ODS-Gallery/sql/photo-wa-uninstall.sql
+++ b/appsrc/ODS-Gallery/sql/photo-wa-uninstall.sql
@@ -1,10 +1,10 @@
 --
---  $Id: photo-wa-uninstall.sql,v 1.8.2.1 2010/09/20 10:15:36 source Exp $
+--  $Id: photo-wa-uninstall.sql,v 1.8.2.3 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -118,7 +118,7 @@ PHOTO.WA._exec_no_error('delete from DB.DBA.WA_TYPES where WAT_NAME = \'oGallery
 PHOTO.WA._exec_no_error('delete from DB.DBA.WA_TYPES where WAT_NAME = \'oGallery\'');
 
 -- Registry
-
+registry_remove ('gallery_services_update');
 
 PHOTO.WA._exec_no_error('drop procedure PHOTO.WA._drop_procedures');
 PHOTO.WA._exec_no_error('drop procedure PHOTO.WA._exec_no_error');
diff --git a/appsrc/ODS-Gallery/sql/procedures/comments.sql b/appsrc/ODS-Gallery/sql/procedures/comments.sql
index 3953fe6..574bbb5 100644
--- a/appsrc/ODS-Gallery/sql/procedures/comments.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/comments.sql
@@ -1,10 +1,10 @@
 --
---  $Id: comments.sql,v 1.10.2.1 2010/09/20 10:15:37 source Exp $
+--  $Id: comments.sql,v 1.10.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/procedures/common.sql b/appsrc/ODS-Gallery/sql/procedures/common.sql
index 3753377..b2e00f2 100644
--- a/appsrc/ODS-Gallery/sql/procedures/common.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/common.sql
@@ -1,10 +1,10 @@
 --
---  $Id: common.sql,v 1.5.2.1 2010/09/20 10:15:37 source Exp $
+--  $Id: common.sql,v 1.5.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/procedures/dav_api.sql b/appsrc/ODS-Gallery/sql/procedures/dav_api.sql
index c407380..ac84f8f 100644
--- a/appsrc/ODS-Gallery/sql/procedures/dav_api.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/dav_api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_api.sql,v 1.13.2.2 2010/09/20 10:15:37 source Exp $
+--  $Id: dav_api.sql,v 1.13.2.4 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -367,7 +367,6 @@ create procedure PHOTO.WA.edit_album(
   in old_name varchar,
   in new_name varchar,
   in visibility integer,
---  in pub_date datetime,
   in start_date datetime,
   in end_date datetime,
   in description varchar,
@@ -401,14 +400,13 @@ create procedure PHOTO.WA.edit_album(
 
   if(col_id > 0){
     declare res any;
---    DB.DBA.DAV_PROP_REMOVE (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'pub_date',current_user.auth_uid,current_user.auth_pwd);
+
     DB.DBA.DAV_PROP_REMOVE (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'start_date',current_user.auth_uid,current_user.auth_pwd);
     DB.DBA.DAV_PROP_REMOVE (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'end_date',current_user.auth_uid,current_user.auth_pwd);
     DB.DBA.DAV_PROP_REMOVE (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'description',current_user.auth_uid,current_user.auth_pwd);
     DB.DBA.DAV_PROP_REMOVE (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'geolocation',current_user.auth_uid,current_user.auth_pwd);
     DB.DBA.DAV_PROP_REMOVE (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'obsolete',current_user.auth_uid,current_user.auth_pwd);
 
---    res := DB.DBA.DAV_PROP_SET (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'pub_date',cast(pub_date as varchar),current_user.auth_uid,current_user.auth_pwd);
     res := DB.DBA.DAV_PROP_SET (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'start_date',cast(start_date as varchar),current_user.auth_uid,current_user.auth_pwd);
     res := DB.DBA.DAV_PROP_SET (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'end_date',cast(end_date as varchar),current_user.auth_uid,current_user.auth_pwd);
     res := DB.DBA.DAV_PROP_SET (DB.DBA.DAV_SEARCH_PATH (col_id,'C'),'description',description,current_user.auth_uid,current_user.auth_pwd);
diff --git a/appsrc/ODS-Gallery/sql/procedures/exec_no_error.sql b/appsrc/ODS-Gallery/sql/procedures/exec_no_error.sql
index b425a86..2a1c074 100644
--- a/appsrc/ODS-Gallery/sql/procedures/exec_no_error.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/exec_no_error.sql
@@ -1,10 +1,10 @@
 --
---  $Id: exec_no_error.sql,v 1.5.2.1 2010/09/20 10:15:37 source Exp $
+--  $Id: exec_no_error.sql,v 1.5.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/procedures/images.sql b/appsrc/ODS-Gallery/sql/procedures/images.sql
index d817496..0a4db34 100644
--- a/appsrc/ODS-Gallery/sql/procedures/images.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/images.sql
@@ -1,10 +1,10 @@
 --
---  $Id: images.sql,v 1.9.2.1 2010/09/20 10:15:37 source Exp $
+--  $Id: images.sql,v 1.9.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/procedures/nntp.sql b/appsrc/ODS-Gallery/sql/procedures/nntp.sql
index cf341b3..5c9360c 100644
--- a/appsrc/ODS-Gallery/sql/procedures/nntp.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/nntp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nntp.sql,v 1.2.2.1 2010/09/20 10:15:37 source Exp $
+--  $Id: nntp.sql,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/procedures/photo_api.sql b/appsrc/ODS-Gallery/sql/procedures/photo_api.sql
index 923b0da..59a902e 100644
--- a/appsrc/ODS-Gallery/sql/procedures/photo_api.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/photo_api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: photo_api.sql,v 1.4.2.3 2010/09/20 10:15:37 source Exp $
+--  $Id: photo_api.sql,v 1.4.2.5 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,6 @@
 --  with this program; if not, write to the Free Software Foundation, Inc.,
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
------------------------------------------------------------------------------------------
 
 use ODS;
 
@@ -125,7 +124,7 @@ create procedure ODS.ODS_API."photo.album.new" (
 
 -------------------------------------------------------------------------------
 --
-create procedure ODS.ODS_API."photo.album.update" (
+create procedure ODS.ODS_API."photo.album.edit" (
   in inst_id integer,
   in name varchar,
   in new_name varchar := null,
@@ -276,7 +275,7 @@ create procedure ODS.ODS_API."photo.image.newUrl" (
 
 -------------------------------------------------------------------------------
 --
-create procedure ODS.ODS_API."photo.image.update" (
+create procedure ODS.ODS_API."photo.image.edit" (
   in inst_id integer,
   in album varchar,
   in name varchar,
@@ -547,14 +546,14 @@ create procedure ODS.ODS_API."photo.options.get" (
 ;
 
 grant execute on ODS.ODS_API."photo.album.new" to ODS_API;
-grant execute on ODS.ODS_API."photo.album.update" to ODS_API;
+grant execute on ODS.ODS_API."photo.album.edit" to ODS_API;
 grant execute on ODS.ODS_API."photo.album.delete" to ODS_API;
 
 grant execute on ODS.ODS_API."photo.image.get" to ODS_API;
 grant execute on ODS.ODS_API."photo.image.new" to ODS_API;
 grant execute on ODS.ODS_API."photo.image.newUrl" to ODS_API;
 grant execute on ODS.ODS_API."photo.image.delete" to ODS_API;
-grant execute on ODS.ODS_API."photo.image.update" to ODS_API;
+grant execute on ODS.ODS_API."photo.image.edit" to ODS_API;
 
 grant execute on ODS.ODS_API."photo.comment.get" to ODS_API;
 grant execute on ODS.ODS_API."photo.comment.new" to ODS_API;
diff --git a/appsrc/ODS-Gallery/sql/procedures/procedures.sql b/appsrc/ODS-Gallery/sql/procedures/procedures.sql
index c92acc7..fe1fa28 100644
--- a/appsrc/ODS-Gallery/sql/procedures/procedures.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/procedures.sql
@@ -1,10 +1,10 @@
 --
---  $Id: procedures.sql,v 1.14.2.1 2010/09/20 10:15:37 source Exp $
+--  $Id: procedures.sql,v 1.14.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/sql/procedures/rss.sql b/appsrc/ODS-Gallery/sql/procedures/rss.sql
index 8f765f5..f272f20 100644
--- a/appsrc/ODS-Gallery/sql/procedures/rss.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/rss.sql
@@ -1,10 +1,10 @@
 --
---  $Id: rss.sql,v 1.3.2.3 2010/09/20 10:15:37 source Exp $
+--  $Id: rss.sql,v 1.3.2.5 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -55,7 +55,6 @@ create procedure PHOTO.WA.rss_output(in current_instance photo_instance,inout pa
 
   http_value(XMLELEMENT('rss',
              XMLATTRIBUTES('2.0' 'version'),
---             XMLELEMENT("ttl",40),
              XMLELEMENT("channel",
                          XMLELEMENT("title",current_instance.name),
                          XMLELEMENT("link",sprintf('http://%s%s',_host,concat(current_instance.home_url,_current_folder))),
diff --git a/appsrc/ODS-Gallery/sql/procedures/sioc.sql b/appsrc/ODS-Gallery/sql/procedures/sioc.sql
index be3f171..eed5d17 100644
--- a/appsrc/ODS-Gallery/sql/procedures/sioc.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/sioc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc.sql,v 1.19.2.4 2010/09/20 10:15:37 source Exp $
+--  $Id: sioc.sql,v 1.19.2.7 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -26,7 +26,13 @@ create procedure SIOC..fill_ods_photos_sioc (in graph_iri varchar, in site_iri v
   declare post_iri, forum_iri, creator_iri,private_tags,tags,user_pwd,cm_iri,title,links_to,c_link varchar;
   declare pos,dir,album,_ind,ts,modf,link, svc_iri any;
 
-  for select p.WAI_NAME as WAI_NAME, p.HOME_PATH as HOME_PATH,p.HOME_URL as HOME_URL, WAI_ID
+  -- init services
+  SIOC..fill_ods_photos_services ();
+
+  for select p.WAI_NAME as WAI_NAME,
+             p.HOME_PATH as HOME_PATH,
+             p.HOME_URL as HOME_URL,
+             WAI_ID
         from PHOTO..SYS_INFO p,
              DB.DBA.WA_INSTANCE i
       where p.WAI_NAME = i.WAI_NAME
@@ -64,6 +70,33 @@ create procedure SIOC..fill_ods_photos_sioc (in graph_iri varchar, in site_iri v
   }
 ;
 
+-------------------------------------------------------------------------------
+--
+create procedure SIOC..fill_ods_photos_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('photo.album.new', 'photo.image.new', 'photo.image.newUrl', 'photo.options.set',  'photo.options.get');
+  ods_object_services (graph_iri, 'photo', 'ODS Gallery instance services', svc_functions);
+
+  -- album
+  svc_functions := vector ('photo.album.edit', 'photo.album.delete');
+  ods_object_services (graph_iri, 'photo/item', 'ODS Gallery item services', svc_functions);
+
+  -- image
+  svc_functions := vector ('photo.image.get', 'photo.image.edit', 'photo.image.delete', 'photo.comment.new');
+  ods_object_services (graph_iri, 'photo/item', 'ODS Gallery item services', svc_functions);
+
+  -- item comment
+  svc_functions := vector ('photo.comment.get', 'photo.comment.delete');
+  ods_object_services (graph_iri, 'photo/item/comment', 'ODS Gallery comment services', svc_functions);
+}
+;
+
 create procedure SIOC..ods_photo_services (
   in graph_iri varchar, 
   in forum_iri varchar,
@@ -131,6 +164,9 @@ create procedure SIOC..photo_insert (
     tags := DB.DBA.DAV_PROP_GET_INT (res_id, 'R', ':virtprivatetags', 0);
     if (not (isinteger(tags) and (tags < 0)))
       SIOC..scot_tags_insert (GALLERY_ID, post_iri, tags);
+
+    -- item services
+    SIOC..ods_object_services_attach (graph_iri, post_iri, 'photo/item');
   }
 }
 ;
@@ -171,6 +207,8 @@ create procedure SIOC..photo_delete (
       forum_iri     := photo_iri (WAI_NAME);
     post_iri    := post_iri_ex (forum_iri, res_id);
     SIOC..delete_quad_s_or_o (graph_iri, post_iri, post_iri);
+    -- item services
+    SIOC..ods_object_services_dettach (graph_iri, post_iri, 'photo/item');
   }
 }
 ;
@@ -279,6 +317,8 @@ create procedure SIOC..comment_insert (
     SIOC..ods_sioc_post (graph_iri, cm_iri, forum_iri, null, _res_name , _create_date, _modify_date, c_link, _text);
     DB.DBA.ODS_QUAD_URI (graph_iri, post_iri, 'http://rdfs.org/sioc/ns#has_reply', cm_iri);
     DB.DBA.ODS_QUAD_URI (graph_iri, cm_iri, 'http://rdfs.org/sioc/ns#reply_of', post_iri);
+    -- services
+    SIOC..ods_object_services_attach (graph_iri, cm_iri, 'photo/item/comment');
   }
 }
 ;
@@ -303,6 +343,8 @@ create procedure SIOC..comment_delete (
   post_iri  := post_iri_ex (forum_iri, _res_id);
     cm_iri   := gallery_comment_iri (post_iri, _comment_id);
     SIOC..delete_quad_s_or_o (graph_iri, cm_iri, cm_iri);
+    -- services
+    SIOC..ods_object_services_dettach (graph_iri, cm_iri, 'photo/item/comment');
   }
 }
 ;
@@ -383,13 +425,14 @@ create procedure SIOC..gallery_comment_iri (in iri varchar, in comment_id int)
 }
 ;
 
-
-create procedure gallery_comment_url(in iri varchar, in comment_id int)
+create procedure SIOC..gallery_comment_url (in iri varchar, in comment_id int)
 {
   return sprintf ('%s:comment_%s',iri,cast(comment_id as varchar));
 }
 ;
 
+-------------------------------------------------------------------------------
+--
 use DB;
 -- PHOTO
 
diff --git a/appsrc/ODS-Gallery/sql/procedures/types.sql b/appsrc/ODS-Gallery/sql/procedures/types.sql
index 98ba241..1bd7a4b 100644
--- a/appsrc/ODS-Gallery/sql/procedures/types.sql
+++ b/appsrc/ODS-Gallery/sql/procedures/types.sql
@@ -1,10 +1,10 @@
 --
---  $Id: types.sql,v 1.8.2.2 2010/09/20 10:15:37 source Exp $
+--  $Id: types.sql,v 1.8.2.3 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/vad_version b/appsrc/ODS-Gallery/vad_version
new file mode 100644
index 0000000..0604715
--- /dev/null
+++ b/appsrc/ODS-Gallery/vad_version
@@ -0,0 +1 @@
+1.10.65
diff --git a/appsrc/ODS-Gallery/www-root/css/gallery.css b/appsrc/ODS-Gallery/www-root/css/gallery.css
index 93ba432..e9afdb9 100644
--- a/appsrc/ODS-Gallery/www-root/css/gallery.css
+++ b/appsrc/ODS-Gallery/www-root/css/gallery.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: gallery.css,v 1.13.2.1 2010/09/20 10:15:38 source Exp $
+ *  $Id: gallery.css,v 1.13.2.2 2012/03/08 10:46:20 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/css/timeline.css b/appsrc/ODS-Gallery/www-root/css/timeline.css
index c105a20..683b897 100644
--- a/appsrc/ODS-Gallery/www-root/css/timeline.css
+++ b/appsrc/ODS-Gallery/www-root/css/timeline.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: timeline.css,v 1.2.2.1 2010/09/20 10:15:38 source Exp $
+ *  $Id: timeline.css,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2007 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/appsrc/ODS-Gallery/www-root/css/upload.css b/appsrc/ODS-Gallery/www-root/css/upload.css
index f9c099e..9dbb4c0 100644
--- a/appsrc/ODS-Gallery/www-root/css/upload.css
+++ b/appsrc/ODS-Gallery/www-root/css/upload.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: upload.css,v 1.2.2.1 2010/09/20 10:15:38 source Exp $
+ *  $Id: upload.css,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/image.vsp b/appsrc/ODS-Gallery/www-root/image.vsp
index bae7120..19a0e6f 100644
--- a/appsrc/ODS-Gallery/www-root/image.vsp
+++ b/appsrc/ODS-Gallery/www-root/image.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: image.vsp,v 1.5.2.1 2010/09/20 10:15:38 source Exp $
+--  $Id: image.vsp,v 1.5.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/index.vspx b/appsrc/ODS-Gallery/www-root/index.vspx
index 21ac1d3..788b428 100644
--- a/appsrc/ODS-Gallery/www-root/index.vspx
+++ b/appsrc/ODS-Gallery/www-root/index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: index.vspx,v 1.4.2.1 2010/09/20 10:15:38 source Exp $
+ -  $Id: index.vspx,v 1.4.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/js/calendar.js b/appsrc/ODS-Gallery/www-root/js/calendar.js
index 7d991fa..cd42edf 100644
--- a/appsrc/ODS-Gallery/www-root/js/calendar.js
+++ b/appsrc/ODS-Gallery/www-root/js/calendar.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: calendar.js,v 1.1.2.3 2010/09/20 10:15:38 source Exp $
+ *  $Id: calendar.js,v 1.1.2.4 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/js/dataset.js b/appsrc/ODS-Gallery/www-root/js/dataset.js
index a41e1e3..99d6d8d 100644
--- a/appsrc/ODS-Gallery/www-root/js/dataset.js
+++ b/appsrc/ODS-Gallery/www-root/js/dataset.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: dataset.js,v 1.6.2.1 2010/09/20 10:15:38 source Exp $
+ *  $Id: dataset.js,v 1.6.2.2 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/js/gallery.js b/appsrc/ODS-Gallery/www-root/js/gallery.js
index e053c4f..3ba8f68 100644
--- a/appsrc/ODS-Gallery/www-root/js/gallery.js
+++ b/appsrc/ODS-Gallery/www-root/js/gallery.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: gallery.js,v 1.23.2.3 2010/09/20 10:15:38 source Exp $
+ *  $Id: gallery.js,v 1.23.2.4 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/js/map.js b/appsrc/ODS-Gallery/www-root/js/map.js
index 133cc23..73e8e68 100644
--- a/appsrc/ODS-Gallery/www-root/js/map.js
+++ b/appsrc/ODS-Gallery/www-root/js/map.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: map.js,v 1.3.2.2 2010/09/20 10:15:38 source Exp $
+ *  $Id: map.js,v 1.3.2.3 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/js/ui.js b/appsrc/ODS-Gallery/www-root/js/ui.js
index 62d3897..d7032af 100644
--- a/appsrc/ODS-Gallery/www-root/js/ui.js
+++ b/appsrc/ODS-Gallery/www-root/js/ui.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: ui.js,v 1.10.2.1 2010/09/20 10:15:38 source Exp $
+ *  $Id: ui.js,v 1.10.2.2 2012/03/08 10:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/portal/index.vsp b/appsrc/ODS-Gallery/www-root/portal/index.vsp
index 7d34317..f24c760 100644
--- a/appsrc/ODS-Gallery/www-root/portal/index.vsp
+++ b/appsrc/ODS-Gallery/www-root/portal/index.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: index.vsp,v 1.19.2.2 2010/09/20 10:15:38 source Exp $
+--  $Id: index.vsp,v 1.19.2.5 2012/03/08 11:41:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -174,7 +174,7 @@
   http(sprintf('<aplus>%d</aplus>',DB.DBA.WA_USER_APP_ENABLE (current_instance.owner_id)),_xml);
   http(sprintf('<instance>%U</instance>', current_instance.name),_xml);
   http(sprintf('<home_url>%s</home_url>',current_instance.home_url),_xml);
-  http(sprintf('<wa_home_title>%s</wa_home_title>',wa_home_title),_xml);
+  http (sprintf ('<wa_home_title>%V</wa_home_title>', wa_home_title), _xml);
   http(sprintf('<wa_home_link>%s</wa_home_link>',wa_home_link),_xml);
   http(sprintf('<gallery_id>%d</gallery_id>',current_instance.gallery_id),_xml);
   http(sprintf('<instance_owner>%s</instance_owner>',current_instance.owner_name),_xml);
@@ -185,10 +185,7 @@
   http(sprintf('<dc_instance_description>%V</dc_instance_description>', PHOTO.WA.xml2string (current_instance.description)), _xml);
   http(sprintf('<map>%d</map>',PHOTO.WA.gallery_show_map (current_instance.gallery_id)),_xml);
   http(sprintf('<is_discussion>%d</is_discussion>', PHOTO.WA.discussion_check ()),_xml);
-
---  if(PHOTO.WA.isDav()){
     http(sprintf('<bar><![CDATA[%s]]></bar>',ODS.BAR._EXEC('oGallery', params, lines)),_xml);
---  }
   http(user_gallery,_xml);
   http(PHOTO.WA.get_lastest_users(current_user),_xml);
   http('</root>',_xml);
diff --git a/appsrc/ODS-Gallery/www-root/proxy.vsp b/appsrc/ODS-Gallery/www-root/proxy.vsp
index e9d5c4d..cca47ea 100644
--- a/appsrc/ODS-Gallery/www-root/proxy.vsp
+++ b/appsrc/ODS-Gallery/www-root/proxy.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: proxy.vsp,v 1.4.2.1 2010/09/20 10:15:38 source Exp $
+--  $Id: proxy.vsp,v 1.4.2.2 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/www-root/upload.vspx b/appsrc/ODS-Gallery/www-root/upload.vspx
index bc28029..9b46de9 100644
--- a/appsrc/ODS-Gallery/www-root/upload.vspx
+++ b/appsrc/ODS-Gallery/www-root/upload.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: upload.vspx,v 1.9.2.2 2010/09/20 10:15:38 source Exp $
+ -  $Id: upload.vspx,v 1.9.2.3 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/index.xsl b/appsrc/ODS-Gallery/xslt/index.xsl
index 5372471..2a7bcb1 100644
--- a/appsrc/ODS-Gallery/xslt/index.xsl
+++ b/appsrc/ODS-Gallery/xslt/index.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: index.xsl,v 1.20.2.3 2010/09/20 10:15:39 source Exp $
+ -  $Id: index.xsl,v 1.20.2.4 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss11.xsl b/appsrc/ODS-Gallery/xslt/rss11.xsl
index 001b1cb..f0b732c 100644
--- a/appsrc/ODS-Gallery/xslt/rss11.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss11.xsl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss2atom.xsl b/appsrc/ODS-Gallery/xslt/rss2atom.xsl
index bb2537d..ba11e62 100644
--- a/appsrc/ODS-Gallery/xslt/rss2atom.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.3.2.2 2010/09/20 10:15:39 source Exp $
+ -  $Id: rss2atom.xsl,v 1.3.2.3 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss2atom03.xsl b/appsrc/ODS-Gallery/xslt/rss2atom03.xsl
index 831f2e6..85c2a67 100644
--- a/appsrc/ODS-Gallery/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.2.2.2 2010/09/20 10:15:39 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.2.2.3 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss2mrss.xsl b/appsrc/ODS-Gallery/xslt/rss2mrss.xsl
index b47f42b..7e1b96f 100644
--- a/appsrc/ODS-Gallery/xslt/rss2mrss.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss2mrss.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2mrss.xsl,v 1.2.2.1 2010/09/20 10:15:39 source Exp $
+ -  $Id: rss2mrss.xsl,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss2rdf.xsl b/appsrc/ODS-Gallery/xslt/rss2rdf.xsl
index 217b089..8c66cf7 100644
--- a/appsrc/ODS-Gallery/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.2.2.1 2010/09/20 10:15:39 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss2wml.xsl b/appsrc/ODS-Gallery/xslt/rss2wml.xsl
index 865d718..28ae8fb 100644
--- a/appsrc/ODS-Gallery/xslt/rss2wml.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss2wml.xsl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/rss2xbel.xsl b/appsrc/ODS-Gallery/xslt/rss2xbel.xsl
index 854bfd2..15744aa 100644
--- a/appsrc/ODS-Gallery/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-Gallery/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:15:39 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/upload.xsl b/appsrc/ODS-Gallery/xslt/upload.xsl
index 6c7b72a..da5d4d3 100644
--- a/appsrc/ODS-Gallery/xslt/upload.xsl
+++ b/appsrc/ODS-Gallery/xslt/upload.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: upload.xsl,v 1.3.2.1 2010/09/20 10:15:39 source Exp $
+ -  $Id: upload.xsl,v 1.3.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Gallery/xslt/wsdl2js.xsl b/appsrc/ODS-Gallery/xslt/wsdl2js.xsl
index 6cada8a..dd4a361 100644
--- a/appsrc/ODS-Gallery/xslt/wsdl2js.xsl
+++ b/appsrc/ODS-Gallery/xslt/wsdl2js.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -
- -  $Id: wsdl2js.xsl,v 1.3.2.1 2010/09/20 10:15:39 source Exp $
+ -  $Id: wsdl2js.xsl,v 1.3.2.2 2012/03/08 10:46:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/Makefile.am b/appsrc/ODS-Polls/Makefile.am
index 7c68d2e..6266ee0 100644
--- a/appsrc/ODS-Polls/Makefile.am
+++ b/appsrc/ODS-Polls/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -46,6 +46,7 @@ clean-local:
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Polls/Makefile.in b/appsrc/ODS-Polls/Makefile.in
index 76ce073..9e8ecf1 100644
--- a/appsrc/ODS-Polls/Makefile.in
+++ b/appsrc/ODS-Polls/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -309,6 +311,7 @@ CLEANFILES = \
 EXTRA_DIST = \
 	make_vad.sh \
 	sql/*.sql \
+	vad_version \
 	www/*.vsp \
 	www/*.vspx \
 	www/css/*.css \
diff --git a/appsrc/ODS-Polls/make_vad.sh b/appsrc/ODS-Polls/make_vad.sh
index 4f62096..00e008e 100755
--- a/appsrc/ODS-Polls/make_vad.sh
+++ b/appsrc/ODS-Polls/make_vad.sh
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -28,7 +28,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.1.33"
+VERSION="1.0.0"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -62,22 +62,6 @@ else
   RM="rm -f"
 fi
 
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
-
-if [ "z$SERVER" = "z" ]  
-then
-    if [ "x$HOST_OS" != "x" ]
-    then
-	SERVER=virtuoso-odbc-t.exe
-    else
-	SERVER=virtuoso
-    fi
-fi
-
 rm -rf vad
 
 . $HOME/binsrc/tests/suite/test_fn.sh
@@ -89,6 +73,57 @@ else
   myrm=$RM
 fi
 
+
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -224,7 +259,7 @@ sticker_init() {
   echo "  <name package=\"Polls\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Polls Manager\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -236,8 +271,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.76.62\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-09-27 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.85.05\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-12-29 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -365,6 +400,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -381,7 +417,6 @@ virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_polls_dav.vad
 chmod 644 ods_polls_filesystem.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -391,5 +426,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Polls/sql/polls-a-api.sql b/appsrc/ODS-Polls/sql/polls-a-api.sql
index 0b8c4d9..b3f6231 100644
--- a/appsrc/ODS-Polls/sql/polls-a-api.sql
+++ b/appsrc/ODS-Polls/sql/polls-a-api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: polls-a-api.sql,v 1.8.2.4 2010/10/07 13:22:06 source Exp $
+--  $Id: polls-a-api.sql,v 1.8.2.6 2012/03/08 10:46:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -67,6 +67,10 @@ create procedure ODS.ODS_API."poll.get" (
   inst_id := (select P_DOMAIN_ID from POLLS.WA.POLL where P_ID = poll_id);
   if (not ods_check_auth (uname, inst_id, 'author'))
     return ods_auth_failed ();
+
+  if (not exists (select 1 from DB.DBA.WA_INSTANCE where WAI_ID = inst_id and WAI_TYPE_NAME = 'Polls'))
+    return ods_serialize_sql_error ('37000', 'The instance is not found');
+
   ods_describe_iri (SIOC..poll_post_iri (inst_id, poll_id));
   return '';
 }
diff --git a/appsrc/ODS-Polls/sql/polls-a-code.sql b/appsrc/ODS-Polls/sql/polls-a-code.sql
index 07d333a..c0d2f4d 100644
--- a/appsrc/ODS-Polls/sql/polls-a-code.sql
+++ b/appsrc/ODS-Polls/sql/polls-a-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: polls-a-code.sql,v 1.20.2.15 2010/11/09 20:11:18 source Exp $
+--  $Id: polls-a-code.sql,v 1.20.2.18 2012/03/08 11:44:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -1209,6 +1209,20 @@ _error:
 }
 ;
 
+-----------------------------------------------------------------------------
+--
+create procedure POLLS.WA.dav_logical_home (
+  inout account_id integer) returns varchar
+{
+  declare home any;
+
+  home := POLLS.WA.dav_home (account_id);
+  if (not isnull (home))
+    home := replace (home, '/DAV', '');
+  return home;
+}
+;
+
 -------------------------------------------------------------------------------
 --
 create procedure POLLS.WA.host_protocol ()
@@ -2144,9 +2158,10 @@ create procedure POLLS.WA.dt_iso8601 (
 create procedure POLLS.WA.test_clear (
   in S any)
 {
-  declare N integer;
+  S := substring (S, 1, coalesce (strstr (S, '<>'), length (S)));
+  S := substring (S, 1, coalesce (strstr (S, '\nin'), length (S)));
 
-  return substring(S, 1, coalesce(strstr(S, '<>'), length(S)));
+  return S;
 }
 ;
 
@@ -2291,7 +2306,7 @@ create procedure POLLS.WA.validate2 (
     if (isnull(regexp_match('^[^\\\/\?\*\"\'\>\<\:\|]*\$', propertyValue)))
       goto _error;
   } else if ((propertyType = 'uri') or (propertyType = 'anyuri')) {
-    if (isnull(regexp_match('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:]*)?\$', propertyValue)))
+    if (isnull (regexp_match ('^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=:~]*)?\$', propertyValue)))
       goto _error;
   } else if (propertyType = 'email') {
     if (isnull(regexp_match('^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))\$', propertyValue)))
diff --git a/appsrc/ODS-Polls/sql/polls-a-table.sql b/appsrc/ODS-Polls/sql/polls-a-table.sql
index 41fb4a8..d84a9f0 100644
--- a/appsrc/ODS-Polls/sql/polls-a-table.sql
+++ b/appsrc/ODS-Polls/sql/polls-a-table.sql
@@ -1,10 +1,10 @@
 --
---  $Id: polls-a-table.sql,v 1.5.2.2 2010/09/22 13:57:04 source Exp $
+--  $Id: polls-a-table.sql,v 1.5.2.3 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/sql/polls-a-wa.sql b/appsrc/ODS-Polls/sql/polls-a-wa.sql
index da1713e..4a5ffc2 100644
--- a/appsrc/ODS-Polls/sql/polls-a-wa.sql
+++ b/appsrc/ODS-Polls/sql/polls-a-wa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: polls-a-wa.sql,v 1.3.2.4 2010/09/22 13:57:04 source Exp $
+--  $Id: polls-a-wa.sql,v 1.3.2.5 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/sql/polls-d.sql b/appsrc/ODS-Polls/sql/polls-d.sql
index 38b0b07..378616e 100644
--- a/appsrc/ODS-Polls/sql/polls-d.sql
+++ b/appsrc/ODS-Polls/sql/polls-d.sql
@@ -1,10 +1,10 @@
 --
---  $Id: polls-d.sql,v 1.6.2.3 2010/09/20 10:15:39 source Exp $
+--  $Id: polls-d.sql,v 1.6.2.5 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -65,6 +65,7 @@ registry_remove ('polls_settings_update');
 registry_remove ('polls_index_version');
 registry_remove ('polls_path_upgrade2');
 registry_remove ('__ods_polls_sioc_init');
+registry_remove ('polls_services_update');
 
 -- Procedures
 create procedure POLLS.WA.drop_procedures()
diff --git a/appsrc/ODS-Polls/sql/sioc_polls.sql b/appsrc/ODS-Polls/sql/sioc_polls.sql
index 43ad6b9..1511593 100644
--- a/appsrc/ODS-Polls/sql/sioc_polls.sql
+++ b/appsrc/ODS-Polls/sql/sioc_polls.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_polls.sql,v 1.9.2.7 2010/10/13 12:15:33 source Exp $
+--  $Id: sioc_polls.sql,v 1.9.2.12 2012/03/08 11:44:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -58,13 +58,20 @@ create procedure poll_comment_iri (
 
 -------------------------------------------------------------------------------
 --
-create procedure fill_ods_polls_sioc (in graph_iri varchar, in site_iri varchar, in _wai_name varchar := null)
+create procedure fill_ods_polls_sioc (
+  in graph_iri varchar,
+  in site_iri varchar,
+  in _wai_name varchar := null)
 {
   declare id, deadl, cnt integer;
-  declare c_iri, creator_iri varchar;
+  declare acl_graph_iri, c_iri, creator_iri varchar;
 
   {
+    -- init services
+    SIOC..fill_ods_polls_services ();
+
     for (select WAI_ID,
+                WAI_IS_PUBLIC,
                 WAI_TYPE_NAME,
                 WAI_NAME,
                 WAI_ACL
@@ -72,9 +79,9 @@ create procedure fill_ods_polls_sioc (in graph_iri varchar, in site_iri varchar,
           where ((_wai_name is null) or (WAI_NAME = _wai_name))
             and WAI_TYPE_NAME = 'Polls') do
     {
-      graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
-      exec (sprintf ('sparql clear graph <%s>', graph_iri));
-      SIOC..wa_instance_acl_insert (WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
+      acl_graph_iri := SIOC..acl_graph (WAI_TYPE_NAME, WAI_NAME);
+      exec (sprintf ('sparql clear graph <%s>', acl_graph_iri));
+      SIOC..wa_instance_acl_insert (WAI_IS_PUBLIC, WAI_TYPE_NAME, WAI_NAME, WAI_ACL);
       for (select P_DOMAIN_ID, P_ID, P_ACL
              from POLLS.WA.POLL
             where P_DOMAIN_ID = WAI_ID and P_ACL is not null) do
@@ -166,6 +173,29 @@ create procedure fill_ods_polls_sioc (in graph_iri varchar, in site_iri varchar,
 
 -------------------------------------------------------------------------------
 --
+create procedure fill_ods_polls_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('poll.new', 'poll.options.set',  'poll.options.get');
+  ods_object_services (graph_iri, 'polls', 'ODS Polls instance services', svc_functions);
+
+  -- item
+  svc_functions := vector ('poll.get', 'poll.edit', 'poll.delete', 'poll.activate', 'poll.close', 'poll.result', 'poll.vote', 'poll.question.new', 'poll.question.delete', 'poll.comment.new');
+  ods_object_services (graph_iri, 'polls/item', 'ODS Polls item services', svc_functions);
+
+  -- item comment
+  svc_functions := vector ('poll.comment.get', 'poll.comment.delete');
+  ods_object_services (graph_iri, 'polls/item/comment', 'ODS Polls comment services', svc_functions);
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure polls_insert (
   in graph_iri varchar,
   in c_iri varchar,
@@ -211,13 +241,15 @@ create procedure polls_insert (
       foaf_maker (graph_iri, person_iri (creator_iri), U_FULL_NAME, U_E_MAIL);
     }
 
-  if (not isnull (graph_iri))
-  {
+  if (isnull (graph_iri))
+    return;
+
     iri := poll_post_iri (domain_id, poll_id);
     ods_sioc_post (graph_iri, iri, c_iri, creator_iri, name, created, updated, POLLS.WA.poll_url (domain_id, poll_id), description);
     scot_tags_insert (inst_id, iri, tags);
-  }
-  return;
+
+  -- item services
+  SIOC..ods_object_services_attach (graph_iri, iri, 'polls/item');
 }
 ;
 
@@ -240,6 +272,9 @@ create procedure polls_delete (
   iri := poll_post_iri (domain_id, poll_id);
   scot_tags_delete (domain_id, iri, tags);
   delete_quad_s_or_o (graph_iri, iri, iri);
+
+  -- item services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'polls/item');
 }
 ;
 
@@ -416,38 +451,48 @@ create procedure polls_comment_insert (
       forum_iri := polls_iri (WAI_NAME);
 		}
 
-	if (not isnull (graph_iri))
-	{
+	if (isnull (graph_iri))
+	  return;
+
 		comment_iri := poll_comment_iri (domain_id, master_id, comment_id);
-    if (not isnull (comment_iri))
-    {
-		  master_iri := poll_post_iri (domain_id, master_id);
+  if (isnull (comment_iri))
+	  return;
+
+  master_iri := SIOC..poll_post_iri (domain_id, master_id);
       foaf_maker (graph_iri, u_url, u_name, u_mail);
       ods_sioc_post (graph_iri, comment_iri, forum_iri, null, title, last_update, last_update, null, comment, null, null, u_url);
       DB.DBA.ODS_QUAD_URI (graph_iri, master_iri, sioc_iri ('has_reply'), comment_iri);
       DB.DBA.ODS_QUAD_URI (graph_iri, comment_iri, sioc_iri ('reply_of'), master_iri);
-    }
-  }
+  -- item services
+  SIOC..ods_object_services_attach (graph_iri, comment_iri, 'polls/item/comment');
 }
 ;
 
 -------------------------------------------------------------------------------
 --
 create procedure polls_comment_delete (
+  in graph_iri varchar,
   inout domain_id integer,
-  inout item_id integer,
-  inout id integer)
+  inout master_id integer,
+  inout comment_id integer)
 {
+  declare master_iri, comment_iri varchar;
   declare exit handler for sqlstate '*'
   {
     sioc_log_message (__SQL_MESSAGE);
     return;
   };
+  master_iri := SIOC..poll_post_iri (domain_id, master_id);
+  if (isnull (graph_iri))
+    graph_iri := SIOC..get_graph_new (domain_id, null, master_iri);
 
-  declare iri varchar;
+  if (isnull (graph_iri))
+    return;
 
-  iri := poll_comment_iri (domain_id, item_id, id);
-  delete_quad_s_or_o (get_graph (), iri, iri);
+  comment_iri := poll_comment_iri (domain_id, master_id, comment_id);
+  delete_quad_s_or_o (get_graph (), comment_iri, comment_iri);
+  -- item services
+  SIOC..ods_object_services_dettach (graph_iri, comment_iri, 'polls/item/comment');
 }
 ;
 
@@ -525,6 +570,20 @@ create procedure ods_polls_sioc_init ()
 
 -------------------------------------------------------------------------------
 --
+create procedure POLLS.WA.tmp_update ()
+{
+  if (registry_get ('polls_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_polls_services();
+  registry_set ('polls_services_update', '1');
+}
+;
+
+POLLS.WA.tmp_update ();
+
+-------------------------------------------------------------------------------
+--
 -- Polls RDF Views
 --
 -------------------------------------------------------------------------------
@@ -726,5 +785,5 @@ grant select on ODS_POLLS_POSTS to SPARQL_SELECT;
 grant select on ODS_POLLS_TAGS to SPARQL_SELECT;
 grant execute on ODS_POLLS_TAGS to SPARQL_SELECT;
 
--- END BOOKMARK
+-- END POLLS
 ODS_RDF_VIEW_INIT ();
diff --git a/appsrc/ODS-Polls/vad_version b/appsrc/ODS-Polls/vad_version
new file mode 100644
index 0000000..a7ccabd
--- /dev/null
+++ b/appsrc/ODS-Polls/vad_version
@@ -0,0 +1 @@
+1.5.20
diff --git a/appsrc/ODS-Polls/www/ajax.vsp b/appsrc/ODS-Polls/www/ajax.vsp
index 5a53ec9..762d02e 100644
--- a/appsrc/ODS-Polls/www/ajax.vsp
+++ b/appsrc/ODS-Polls/www/ajax.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: ajax.vsp,v 1.1.2.1 2010/09/20 10:15:40 source Exp $
+--  $Id: ajax.vsp,v 1.1.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/www/conversation.vspx b/appsrc/ODS-Polls/www/conversation.vspx
index abe9ace..7c60dfa 100644
--- a/appsrc/ODS-Polls/www/conversation.vspx
+++ b/appsrc/ODS-Polls/www/conversation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: conversation.vspx,v 1.3.2.2 2010/09/20 10:15:40 source Exp $
+ -  $Id: conversation.vspx,v 1.3.2.4 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -64,10 +64,10 @@
       <v:variable persist="0" name="openid_name" type="varchar" default="null" param-name="openid.sreg.fullname" />
     </vm:variables>
     <vm:pagebody>
-      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params))); ?>
-      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="sid"   id="sid"   value="%s" />', get_keyword('sid', self.vc_page.vc_event.ve_params, ''))); ?>
+      <?vsp http(sprintf('<input type="hidden" name="realm" id="realm" value="%s" />', get_keyword('realm', self.vc_page.vc_event.ve_params, ''))); ?>
       <?vsp http(sprintf('<input type="hidden" name="user_name" id="user_name" value="%s" />', POLLS.WA.account_name (self.account_id))); ?>
-      <div class="new-form-header">
+      <div class="form-header">
         Discussion
       </div>
       <div class="new-form-body">
@@ -107,7 +107,7 @@
                   <div class="<?V case when control.tn_level = 0 then 'cm_node_top' else 'cm_node' end ?>">
                     <?vsp
                       {
-                        declare id, comment, title, u_name, last_update any;
+                        declare id, comment, title, iri, u_name, last_update any;
 
                         id := cast (control.tn_value as integer);
                         declare exit handler for not found;
@@ -115,6 +115,7 @@
                           into title, comment, u_name, last_update
                           from POLLS.WA.POLL_COMMENT
                          where PC_ID = id;
+                        iri := POLLS.WA.url_fix (SIOC..poll_comment_iri (self.domain_id, self.v_id, id), get_keyword ('sid', self.vc_page.vc_event.ve_params), get_keyword ('realm', self.vc_page.vc_event.ve_params));
 
                         declare parsed_message any;
                         declare d_name varchar;
@@ -147,7 +148,8 @@
                     ?>
                     <div class="comment" id="msg_<?V id ?>">
                       <div class="comment-header">
-                        <span class="comment-subj"><?V POLLS.WA.utf2wide (title) ?></span> <br />
+                        <?vsp http (sprintf ('<a href="%V">%s</a>', iri, title)); ?>
+                        <br />
                       </div>
                       <div class="comment-msg">
                         <?vsp
diff --git a/appsrc/ODS-Polls/www/css/style.css b/appsrc/ODS-Polls/www/css/style.css
index b3383f6..08eb69d 100644
--- a/appsrc/ODS-Polls/www/css/style.css
+++ b/appsrc/ODS-Polls/www/css/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.8.2.7 2010/10/07 13:22:06 source Exp $
+ *  $Id: style.css,v 1.8.2.11 2012/03/08 11:44:22 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,23 @@ body {
   font-size: 9pt;
 }
 
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+form {
+  margin: 0;
+  padding: 0;
+}
+
+abbr {
+  border: none;
+}
+
 a {
   text-decoration: none;
 }
@@ -65,43 +82,6 @@ a:hover {
   vertical-align: top;
 }
 
-/* Footer */
-#FT {
-  width: 100%;
-  position: relative;
-  bottom: 0px;
-  font-size: 8pt;
-  float: left;
-  clear: both;
-  text-align: right;
-  border-top: 2px solid #fff;
-  margin-right: 10px;
-  background-color: #fff;
-  background-image: url(../image/ods_main_footer.png);
-}
-
-#FT_L {
-  float: left;
-  clear: left;
-  margin-top: 10px;
-  margin-left: 8px;
-  border: 1px solid #788;
-}
-
-#FT_R {
-  float: right;
-  clear: right;
-  margin-top: 10px;
-  margin-bottom: 10px;
-  margin-right: 5px;
-  color: #788;
-}
-
-#FT_R a {
-  text-decoration: none;
-  color: inherit;
-}
-
 /* Left side within MT */
 .page_head {
   width: 100%;
@@ -307,6 +287,25 @@ input.button {
   background: #99b3c5;
 }
 
+.navi-button {
+  font-size: .8em;
+  font-family: verdana, sans-serif;
+  color: #ffffff;
+  font-weight: bold;
+  margin-right: 2px;
+  padding: 0.1em 0.3em 0.1em 0.3em ;
+  border: solid 1px;
+  border-color: #7f94a5;
+  background: #99b3c5;
+	cursor: pointer;
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+}
+
+.navi-button:hover {
+  text-decoration: none;
+}
+
 input.nolink {
   text-align: left;
   margin: 0px;
@@ -328,23 +327,6 @@ input.nolink2 {
   background-color: #EFEFEF;
 }
 
-.nolink3 {
-  font-size: 1em;
-  font-weight: bold;
-  color: #000;
-  background-color: inherit;
-}
-
-input.nolink4 {
-  text-align: left;
-  margin: 0px;
-  padding: 0px;
-  font-size: 1em;
-  font-weight: bold;
-  border: 0px;
-  background-color: #b0cde4;
-}
-
 .nolink_a {
   color: #000;
   background-color: #F0F0F0;
@@ -366,17 +348,6 @@ input.nolink4 {
   right: 5px;
 }
 
-.button2 {
-  font-size: .8em;
-  font-family: verdana, sans-serif;
-  color: #ffffff;
-  font-weight: bold;
-  padding: 0.1em 1em 0.1em 1em ;
-  border: solid 1px;
-  border-color: #7f94a5;
-  background: #99b3c5;
-}
-
 .pane {
   color: black;
   background-color: #EFEFEF;
@@ -610,9 +581,6 @@ div.activeTab {
 }
 
 /* Toolbars */
-div.toolbar {
-}
-
 img.toolbar {
   display: block;
   float: left;
@@ -620,18 +588,6 @@ img.toolbar {
   background-color: #7F94A5;
 }
 
-a.toolbar {
-  display: block;
-  float: left;
-  width: 70px;
-  padding: 10px 0 10px 0;
-  color: #4F56A6;
-  font-weight: bold;
-  font-size: 12px;
-  text-decoration: none;
-  text-align: center;
-}
-
 span.toolbar {
   display: block;
   float: left;
diff --git a/appsrc/ODS-Polls/www/error.vspx b/appsrc/ODS-Polls/www/error.vspx
index bac2697..9e56f00 100644
--- a/appsrc/ODS-Polls/www/error.vspx
+++ b/appsrc/ODS-Polls/www/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: error.vspx,v 1.2.2.1 2010/09/20 10:15:40 source Exp $
+  -  $Id: error.vspx,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/www/export.vspx b/appsrc/ODS-Polls/www/export.vspx
index 9e6ff99..09a9d31 100644
--- a/appsrc/ODS-Polls/www/export.vspx
+++ b/appsrc/ODS-Polls/www/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: export.vspx,v 1.4.2.4 2010/10/07 13:22:06 source Exp $
+  -  $Id: export.vspx,v 1.4.2.5 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/www/gems.vsp b/appsrc/ODS-Polls/www/gems.vsp
index 40f55f2..b487894 100644
--- a/appsrc/ODS-Polls/www/gems.vsp
+++ b/appsrc/ODS-Polls/www/gems.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: gems.vsp,v 1.1.2.3 2010/10/07 13:22:06 source Exp $
+--  $Id: gems.vsp,v 1.1.2.4 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Addressbook/www/image/c.gif b/appsrc/ODS-Polls/www/image/c.gif
similarity index 100%
copy from appsrc/ODS-Addressbook/www/image/c.gif
copy to appsrc/ODS-Polls/www/image/c.gif
diff --git a/appsrc/ODS-Polls/www/js/polls.js b/appsrc/ODS-Polls/www/js/polls.js
index a926320..3bbee00 100644
--- a/appsrc/ODS-Polls/www/js/polls.js
+++ b/appsrc/ODS-Polls/www/js/polls.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -36,6 +36,13 @@ function urlParam(fldName)
   return '';
 }
 
+function myA(obj) {
+  if (obj.href) {
+    document.location = obj.href + '?' + urlParam('sid') + urlParam('realm');
+    return false;
+  }
+}
+
 function myPost(frm_name, fld_name, fld_value) {
   createHidden(frm_name, fld_name, fld_value);
   document.forms[frm_name].submit();
@@ -350,15 +357,18 @@ function showTab(tabs, tabsCount, tabNo) {
   }
 }
 
-function windowShow(sPage, width, height) {
+function windowShow(sPage, sPageName, width, height) {
   if (width == null)
-    width = 500;
+		width = 700;
   if (height == null)
-    height = 420;
-	sPage = sPage + '&sid=' + document.forms[0].elements['sid'].value
-			+ '&realm=' + document.forms[0].elements['realm'].value;
-	win = window.open(sPage, null, "width=" + width + ",height=" + height
-			+ ", top=100, left=100, scrollbars=yes, resize=yes, menubar=no");
+		height = 500;
+  if (sPage.indexOf('form=') == -1)
+    sPage += '&form=F1';
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
 
@@ -744,10 +754,10 @@ POLLS.trim = function(sString, sChar) {
 
 POLLS.aboutDialog = function() {
   var aboutDiv = $('aboutDiv');
-	if (aboutDiv) {
+  if (aboutDiv)
 		OAT.Dom.unlink(aboutDiv);
-	}
-	aboutDiv = OAT.Dom.create('div', {width : '430px', height : '150px'});
+
+  aboutDiv = OAT.Dom.create('div', {height: '160px', overflow: 'hidden'});
   aboutDiv.id = 'aboutDiv';
 	aboutDialog = new OAT.Dialog('About ODS Polls', aboutDiv, {width: 445, buttons: 0, resize: 0, modal: 1});
 	aboutDialog.cancel = aboutDialog.hide;
diff --git a/appsrc/ODS-Polls/www/polls.vspx b/appsrc/ODS-Polls/www/polls.vspx
index 2eb63c6..d362630 100644
--- a/appsrc/ODS-Polls/www/polls.vspx
+++ b/appsrc/ODS-Polls/www/polls.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: polls.vspx,v 1.18.2.6 2010/10/13 12:15:33 source Exp $
+ -  $Id: polls.vspx,v 1.18.2.9 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -242,7 +242,7 @@
 
   <v:method name="windowOpen" arglist="in p_url varchar, in p_name varchar, in p_title varchar">
     <![CDATA[
-      return  sprintf ('<spam onclick="javascript: window.open (\'%s\', \'polls_%s_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=500, width=600\'); return false;" title="%s %s" class="link">%s</span>', POLLS.WA.url_fix (sprintf ('%s%s', POLLS.WA.polls_url (self.domain_id), p_url), self.sid, self.realm), p_name, p_name, p_title, p_name);
+      return  sprintf ('<spam onclick="javascript: window.open (\'%s\', \'polls_%s_window\', \'top=100, left=100, scrollbars=yes, resize=yes, menubar=no, height=600, width=800\'); return false;" title="%s %s" class="link">%s</span>', POLLS.WA.page_url (self.domain_id, p_url, self.sid, self.realm), p_name, p_name, p_title, p_name);
     ]]>
   </v:method>
 
@@ -673,11 +673,13 @@
 
               <v:template name="ds_footer" type="simple" name-to-remove="table" set-to-remove="top">
                 <table>
-                  <tr align="center">
-                    <td align="center" colspan="2">
+                  <tfoot>
+                    <tr>
+                      <td align="right" colspan="2">
                       <vm:ds-navigation data-set="ds"/>
                     </td>
                   </tr>
+                  </tfoot>
                 </table>
               </v:template>
 
@@ -764,6 +766,9 @@
                 declare N integer;
                 params := self.vc_page.vc_event.ve_params;
 
+                if (self.pAction = 'edit')
+                  self.rdf_iri := SIOC..poll_post_iri (self.domain_id, self.v_id);
+
                 if ((self.pAction = 'edit') and (self.v_step = ''))
                 {
                   select P_NAME,
@@ -1698,6 +1703,7 @@
                   }
                   http ('</p>');
                 }
+                self.rdf_iri := SIOC..poll_post_iri (self.domain_id, self.v_id);
               ?>
             </div>
             <div class="form-footer">
@@ -1891,6 +1897,7 @@
                   http ('</p>');
                 }
               _end:;
+                self.rdf_iri := SIOC..poll_post_iri (self.domain_id, self.v_id);
               ?>
             </div>
             <div class="form-footer">
diff --git a/appsrc/ODS-Polls/www/polls_login.vspx b/appsrc/ODS-Polls/www/polls_login.vspx
index 12d6215..9ba4341 100644
--- a/appsrc/ODS-Polls/www/polls_login.vspx
+++ b/appsrc/ODS-Polls/www/polls_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: polls_login.vspx,v 1.2.2.3 2010/10/07 13:22:06 source Exp $
+  -  $Id: polls_login.vspx,v 1.2.2.4 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/www/search.vspx b/appsrc/ODS-Polls/www/search.vspx
index 93536fa..4d90608 100644
--- a/appsrc/ODS-Polls/www/search.vspx
+++ b/appsrc/ODS-Polls/www/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.vspx,v 1.12.2.7 2010/10/13 12:15:34 source Exp $
+ -  $Id: search.vspx,v 1.12.2.9 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -371,11 +371,13 @@
 
                 <v:template name="ds_footer" type="simple" name-to-remove="table" set-to-remove="top">
                   <table>
+                    <tfoot>
                     <tr>
-                      <td align="center" colspan="1">
+                        <td align="right" colspan="1">
                         <vm:ds-navigation data-set="ds"/>
                       </td>
                     </tr>
+                    </tfoot>
                   </table>
                 </v:template>
 
diff --git a/appsrc/ODS-Polls/www/settings.vspx b/appsrc/ODS-Polls/www/settings.vspx
index b93450f..3d94735 100644
--- a/appsrc/ODS-Polls/www/settings.vspx
+++ b/appsrc/ODS-Polls/www/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: settings.vspx,v 1.6.2.5 2010/10/13 12:15:34 source Exp $
+  -  $Id: settings.vspx,v 1.6.2.7 2012/03/08 11:44:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -215,7 +215,7 @@
             ]]>
           </v:on-post>
         </v:button>
-        <v:button action="simple" value="Clear" xhtml_class="form-button">
+        <v:button action="simple" value="Clear"  xhtml_onclick="javascript: return confirm (\'Do you want to reset settings to default?\');" xhtml_class="form-button">
           <v:on-post>
             <![CDATA[
               delete from POLLS.WA.SETTINGS where S_DOMAIN_ID = self.domain_id;
diff --git a/appsrc/ODS-Polls/www/tags.vspx b/appsrc/ODS-Polls/www/tags.vspx
index c5d2a6b..31144d0 100644
--- a/appsrc/ODS-Polls/www/tags.vspx
+++ b/appsrc/ODS-Polls/www/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.2.2.2 2010/09/20 10:15:40 source Exp $
+ -  $Id: tags.vspx,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/www/template/popup.vspx b/appsrc/ODS-Polls/www/template/popup.vspx
index cb98c52..a670974 100644
--- a/appsrc/ODS-Polls/www/template/popup.vspx
+++ b/appsrc/ODS-Polls/www/template/popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: popup.vspx,v 1.4.2.5 2010/10/07 13:22:07 source Exp $
+ -  $Id: popup.vspx,v 1.4.2.9 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <html xmlns:v="http://www.openlinksw.com/vspx/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
   <head profile="http://internetalchemy.org/2003/02/profile">
+    <base href="<?V POLLS.WA.host_url () || http_path () ?>" /><![CDATA[<!--[if IE]></base><![endif]-->]]>
+    <?vsp
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
+    ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <![CDATA[
       <script type="text/javascript">
@@ -36,6 +43,7 @@
       </script>
       <script type="text/javascript" src="/ods/oat/loader.js"></script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="js/polls.js"></script>
       <script type="text/javascript">
         function myInit()
@@ -49,18 +57,22 @@
         }
         OAT.MSG.attach(OAT, 'PAGE_LOADED', myInit);
         window.onload = function(){OAT.MSG.send(OAT, 'PAGE_LOADED');};
+      	window.onkeyup = function (event) {
+      		if (event.keyCode == 27) {
+      			window.close ();
+      		}
+      	}
       </script>
     ]]>
     <title></title>
   </head>
   <body>
     <v:page xmlns:v="http://www.openlinksw.com/vspx/">
-      <vm:variables>
         <v:variable persist="0" name="domain_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_id" type="integer" default="-1"/>
         <v:variable persist="0" name="account_rights" type="varchar" default="''"/>
         <v:variable persist="0" name="settings" type="any" />
-      </vm:variables>
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -71,8 +83,8 @@
 
           aSessInfo := POLLS.WA.session_restore (params);
           self.domain_id := cast(get_keyword('domain_id', aSessInfo, '-1') as integer);
-          self.account_id := cast(get_keyword('user_id', aSessInfo, '-1') as integer);
-          self.account_rights := get_keyword ('account_rights', aSessInfo);
+          self.account_id := cast (get_keyword ('account_id', aSessInfo, '-1') as integer);
+          self.account_rights := get_keyword ('account_rights', aSessInfo, '');
           self.settings := POLLS.WA.settings (self.domain_id);
         ]]>
       </v:on-init>
diff --git a/appsrc/ODS-Polls/www/template/template.vspx b/appsrc/ODS-Polls/www/template/template.vspx
index eac041c..f81a267 100644
--- a/appsrc/ODS-Polls/www/template/template.vspx
+++ b/appsrc/ODS-Polls/www/template/template.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: template.vspx,v 1.17.2.8 2010/10/07 13:22:07 source Exp $
+ -  $Id: template.vspx,v 1.17.2.14 2012/03/08 11:44:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -39,36 +39,49 @@
       http (sprintf ('\n    <link rel="alternate" type="application/rss+xml" title="%V RSS" href="%s" />', domainName, POLLS.WA.gems_url (self.domain_id)||'Polls.rss'));
       http (sprintf ('\n    <link rel="alternate" type="application/atom+xml" title="%V Atom" href="%s" />', domainName, POLLS.WA.gems_url (self.domain_id)||'Polls.atom'));
       http (POLLS.WA.geo_url (self.domain_id, self.account_id));
+
+      SIOC..rdf_links_header (self.rdf_iri);
+      SIOC..rdf_links_head (self.rdf_iri);
     ?>
     <link rel="stylesheet" href="css/style.css" type="text/css"/>
+    <link rel="stylesheet" href="/ods/common.css" type="text/css" />
+    <link rel="stylesheet" href="/ods/typeahead.css" type="text/css" />
     <meta name="dc.description" content="<?V POLLS.WA.utf2wide (POLLS.WA.domain_description (self.domain_id)) ?>" />
     <meta name="dc.title" content="<?V POLLS.WA.utf2wide (POLLS.WA.domain_description (self.domain_id)) ?>" />
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
       <![CDATA[
+      <script type="text/javascript" src="/ods/oat/loader.js"></script>
       <script type="text/javascript">
-        var toolkitPath="/ods/oat";
-        var imagePath="/ods/images/oat/";
+        OAT.Preferences.imagePath = '/ods/images/oat/';
+        OAT.Preferences.stylePath = '/ods/oat/styles/';
+        OAT.Preferences.showAjax = false;
         
-        var featureList=["ajax", "xml", "anchor", "dialog", "barchart", "piechart", "calendar"];
+        // DAV
+        var davOptions = {
+          imagePath: OAT.Preferences.imagePath,
+          pathHome: '/home/',
+          path: '<?V POLLS.WA.dav_logical_home (self.account_id) ?>',
+          user: '<?V POLLS.WA.account_name (self.account_id) ?>',
+          connectionHeaders: {Authorization: '<?V POLLS.WA.account_basicAuthorization (self.account_id) ?>'}
+        };
+
+      	/* load stylesheets */
+      	OAT.Style.include("grid.css");
+      	OAT.Style.include("webdav.css");
+
+        var featureList=["ajax", "json", "anchor", "dialog", "barchart", "piechart", "calendar"];
+        OAT.Loader.load(featureList);
     </script>
-      <script type="text/javascript" src="/ods/oat/loader.js"></script>
       <script type="text/javascript" src="/ods/tbl.js"></script>
+      <script type="text/javascript" src="/ods/typeahead.js"></script>
       <script type="text/javascript" src="/ods/app.js"></script>
       <script type="text/javascript" src="js/polls.js"></script>
       <script type="text/javascript">
         function myInit() {
           if (!OAT._loaded) {
-            setTimeout(myInit, 50);
+            setTimeout(myInit, 100);
             return;
           }
-          OAT.Preferences.imagePath = '/ods/images/oat/';
-          OAT.Preferences.stylePath = '/ods/oat/styles/';
-          OAT.Preferences.showAjax = false;
-
-        	OAT.Style.include("winms.css");
-
-          OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-          OAT.Anchor.zIndex = 1001;
         
           if (<?V cast (get_keyword ('app', self.settings, '0') as integer) ?> > 0)
             generateAPP('app_area', {appActivation: "<?V case when cast (get_keyword ('app', self.settings, '1') as integer) = 2 then 'hover' else 'click' end ?>"});
@@ -95,6 +108,7 @@
       <v:variable persist="0" name="account_rights" type="varchar" default="''" />
       <v:variable persist="0" name="owner_id" type="integer" default="null" />
         <v:variable persist="0" name="settings" type="any" />
+      <v:variable persist="0" name="rdf_iri" type="varchar" default="null" />
       <v:on-init>
         <![CDATA[
           set ISOLATION = 'Committed';
@@ -105,7 +119,7 @@
 
           aSessInfo := POLLS.WA.session_restore (params);
           self.domain_id := cast(get_keyword('domain_id', aSessInfo, '-1') as integer);
-          self.account_id := cast(get_keyword('user_id', aSessInfo, '-1') as integer);
+          self.account_id := cast (get_keyword ('account_id', aSessInfo, '-1') as integer);
           self.account_rights := get_keyword ('account_rights', aSessInfo);
           self.owner_id := POLLS.WA.domain_owner_id (self.domain_id);
           self.settings := vector_concat (vector ('app', DB.DBA.WA_USER_APP_ENABLE (self.account_id)), POLLS.WA.settings (self.domain_id));
diff --git a/appsrc/ODS-Polls/www/template/template.xsl b/appsrc/ODS-Polls/www/template/template.xsl
index 34d0355..1e6a76b 100644
--- a/appsrc/ODS-Polls/www/template/template.xsl
+++ b/appsrc/ODS-Polls/www/template/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
-  -  $Id: template.xsl,v 1.15.2.6 2010/10/13 12:15:34 source Exp $
+  -  $Id: template.xsl,v 1.15.2.8 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -109,8 +109,7 @@
     </xsl:for-each>
     <div style="padding: 0.5em;">
       <div style="padding: 0 0 0.5em 0;">
-        &nbsp;<a href="#" onClick="javascript: if (opener != null) opener.focus(); window.close();"><img src="image/close_16.png" border="0" alt="Close" title="Close" />&nbsp;Close</a>
-        <hr />
+        <span class="button pointer" onclick="javascript: if (opener != null) opener.focus(); window.close();"><img class="button" src="/ods/images/icons/close_16.png" border="0" alt="Close" title="Close" /> Close</span>
       </div>
       <v:form name="F1" type="simple" method="POST">
         <xsl:apply-templates select="vm:pagebody" />
@@ -277,11 +276,10 @@
   <!--=========================================================================-->
   <xsl:template match="vm:ds-navigation">
     <?vsp
-      {
         declare n_start, n_end, n_total integer;
         declare ds vspx_data_set;
 
-        ds := self.vc_find_descendant_control ('<xsl:value-of select="@data-set" />');
+      ds := case when (udt_instance_of (control, fix_identifier_case ('vspx_data_set'))) then control else control.vc_find_parent (control, 'vspx_data_set') end;
         if (isnull (ds.ds_data_source))
         {
           n_total := ds.ds_rows_total;
@@ -296,57 +294,46 @@
           n_end := n_total;
 
         if (n_total)
-          http (sprintf ('%d - %d of %d', n_start, n_end, n_total));
+        http (sprintf ('Showing %d - %d of %d', n_start, n_end, n_total));
 
-        declare _prev, _next, _last, _first vspx_button;
-        declare d_prev, d_next, d_last, d_first integer;
+      declare _prev, _next vspx_button;
 
-        d_prev := d_next := d_last := d_first := 0;
-        _first := control.vc_find_control ('<xsl:value-of select="@data-set"/>_first');
-        _last := control.vc_find_control ('<xsl:value-of select="@data-set"/>_last');
         _next := control.vc_find_control ('<xsl:value-of select="@data-set"/>_next');
         _prev := control.vc_find_control ('<xsl:value-of select="@data-set"/>_prev');
-
-        if (not (_next is not null and not _next.vc_enabled and _prev is not null and not _prev.vc_enabled))
-        {
-          if (n_total)
+      if ((_next is not null and _next.vc_enabled) or (_prev is not null and _prev.vc_enabled))
             http (' | ');
-        if (_first is not null and not _first.vc_enabled)
-          d_first := 1;
-
-        if (_next is not null and not _next.vc_enabled)
-          d_next := 1;
-
-        if (_prev is not null and not _prev.vc_enabled)
-          d_prev := 1;
-
-        if (_last is not null and not _last.vc_enabled)
-          d_last := 1;
-        }
     ?>
-    <?vsp
-      if (d_first)
-        http ('<img src="/ods/images/skin/pager/p_first_gr.png" alt="First Page" title="First Page" border="0" />first ');
-    ?>
-    <v:button name="{@data-set}_first" action="simple" style="image" value="/ods/images/skin/pager/p_first.png" xhtml_alt="First" text="first&nbsp;" />
-    <?vsp
-      if (d_prev)
-        http ('<img src="/ods/images/skin/pager/p_prev_gr.png" alt="Previous Page" title="Previous Page" border="0" />prev ');
-    ?>
-    <v:button name="{@data-set}_prev" action="simple" style="image" value="/ods/images/skin/pager/p_prev.png" xhtml_alt="Previous" text="prev&nbsp;" />
-    <?vsp
-      if (d_next)
-        http ('<img src="/ods/images/skin/pager/p_next_gr.png" alt="Next Page" title="Next Page" border="0" />next ');
-    ?>
-    <v:button name="{@data-set}_next" action="simple" style="image" value="/ods/images/skin/pager/p_next.png" xhtml_alt="Next" text="next&nbsp;" />
-    <?vsp
-      if (d_last)
-        http ('<img src="/ods/images/skin/pager/p_last_gr.png" alt="Last Page" title="Last Page" border="0" />last');
-    ?>
-    <v:button name="{@data-set}_last" action="simple" style="image" value="/ods/images/skin/pager/p_last.png" xhtml_alt="Last" text="last" />
-    <?vsp
-      }
-    ?>
+    <v:button name="{@data-set}_first" action="simple" style="url" value="" xhtml_alt="First" xhtml_class="navi-button" >
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_first.png" border="0" alt="First" title="First"/> First ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_prev" action="simple" style="url" value="" xhtml_alt="Previous" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_prev.png" border="0" alt="Previous" title="Previous"/> Prev ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_next" action="simple" style="url" value="" xhtml_alt="Next" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_next.png" border="0" alt="Next" title="Next"/> Next ';
+        ]]>
+      </v:before-render>
+    </v:button>
+     
+    <v:button name="{@data-set}_last" action="simple" style="url" value="" xhtml_alt="Last" xhtml_class="navi-button">
+      <v:before-render>
+        <![CDATA[
+          control.ufl_value := '<img src="/ods/images/skin/pager/p_last.png" border="0" alt="Last" title="Last"/> Last ';
+        ]]>
+      </v:before-render>
+    </v:button>
   </xsl:template>
 
   <!--=========================================================================-->
diff --git a/appsrc/ODS-Polls/xslt/rss2atom.xsl b/appsrc/ODS-Polls/xslt/rss2atom.xsl
index d23445d..4e1803f 100644
--- a/appsrc/ODS-Polls/xslt/rss2atom.xsl
+++ b/appsrc/ODS-Polls/xslt/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.2.2.2 2010/09/20 10:15:41 source Exp $
+ -  $Id: rss2atom.xsl,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/xslt/rss2atom03.xsl b/appsrc/ODS-Polls/xslt/rss2atom03.xsl
index 8dfd327..dd53d5b 100644
--- a/appsrc/ODS-Polls/xslt/rss2atom03.xsl
+++ b/appsrc/ODS-Polls/xslt/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.2.2.1 2010/09/20 10:15:41 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/xslt/rss2rdf.xsl b/appsrc/ODS-Polls/xslt/rss2rdf.xsl
index 1620653..f55bf84 100644
--- a/appsrc/ODS-Polls/xslt/rss2rdf.xsl
+++ b/appsrc/ODS-Polls/xslt/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
-  -  $Id: rss2rdf.xsl,v 1.2.2.1 2010/09/20 10:15:41 source Exp $
+  -  $Id: rss2rdf.xsl,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Polls/xslt/rss2xbel.xsl b/appsrc/ODS-Polls/xslt/rss2xbel.xsl
index 408ccf1..a265cb5 100644
--- a/appsrc/ODS-Polls/xslt/rss2xbel.xsl
+++ b/appsrc/ODS-Polls/xslt/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
-  -  $Id: rss2xbel.xsl,v 1.1.2.1 2010/09/20 10:15:41 source Exp $
+  -  $Id: rss2xbel.xsl,v 1.1.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/Makefile.am b/appsrc/ODS-WebMail/Makefile.am
index 607b6d4..40a5649 100644
--- a/appsrc/ODS-WebMail/Makefile.am
+++ b/appsrc/ODS-WebMail/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -49,6 +49,7 @@ EXTRA_DIST = \
 	sql/eml/*.sql \
 	sql/res/*.sql \
 	sql/utl/*.sql \
+	vad_version \
 	www-root/*.vsp \
 	www-root/mail/i/*.gif \
 	www-root/mail/i/*.jpg \
diff --git a/appsrc/ODS-WebMail/Makefile.in b/appsrc/ODS-WebMail/Makefile.in
index 771ffc8..424fcb8 100644
--- a/appsrc/ODS-WebMail/Makefile.in
+++ b/appsrc/ODS-WebMail/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -312,6 +314,7 @@ EXTRA_DIST = \
 	sql/eml/*.sql \
 	sql/res/*.sql \
 	sql/utl/*.sql \
+	vad_version \
 	www-root/*.vsp \
 	www-root/mail/i/*.gif \
 	www-root/mail/i/*.jpg \
diff --git a/appsrc/ODS-WebMail/install/odbc_mail.ini b/appsrc/ODS-WebMail/install/odbc_mail.ini
index 1231fbd..9ff46e2 100644
--- a/appsrc/ODS-WebMail/install/odbc_mail.ini
+++ b/appsrc/ODS-WebMail/install/odbc_mail.ini
@@ -3,7 +3,7 @@
 ;
 ;  Configuration file for the ODBC Mail Delivery Agent
 ;
-;  (C)Copyright 2002 OpenLink Software.
+;  Copyright (C) 1998-2012 OpenLink Software.
 ;
 ;  To learn more about this product, or any other product in our
 ;  portfolio, please check out our web site at:
diff --git a/appsrc/ODS-WebMail/make_vad.sh b/appsrc/ODS-WebMail/make_vad.sh
index 1454b3d..c25f51f 100755
--- a/appsrc/ODS-WebMail/make_vad.sh
+++ b/appsrc/ODS-WebMail/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.34.2.25 2011/03/28 16:04:22 source Exp $
+#  $Id: make_vad.sh,v 1.34.2.31 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ export LANG LC_ALL
 
 MODE=$1
 LOGDIR=`pwd`
-VERSION="1.5.117"
+VERSION="1.5.122"
 LOGFILE="${LOGDIR}/vad_make.log"
 STICKER_DAV="vad_dav.xml"
 STICKER_FS="vad_filesystem.xml"
@@ -63,11 +63,6 @@ else
   LN="ln -fs"
   RM="rm -f"
 fi
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
 
 if [ "z$SERVER" = "z" ]  
 then
@@ -90,6 +85,56 @@ else
   myrm=$RM
 fi
 
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
+
+version_init()
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+	  VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"
+	exit 1
+      fi
+  else
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      LANG=POSIX
+      export LANG
+
+      BASE="0"
+#      echo $BASE
+      if [ -f version.base ] ; then
+	  BASE=`cat version.base`
+      fi
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
+      VERSION=`expr $BASE + $VERSION`
+      CURR_VERSION=$VERSION
+      if [ -f version.curr ] ; then
+	  CURR_VERSION=`cat version.curr`
+      fi
+      if [ $CURR_VERSION -gt $VERSION ] ; then
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
+	  echo $BASE > version.base
+	  VERSION=$CURR_VERSION
+      fi
+      echo $VERSION > version.curr
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
 virtuoso_start() {
   echo "Starting $SERVER"
   echo $BUILD
@@ -225,7 +270,7 @@ sticker_init() {
   echo "  <name package=\"Mail\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Mail\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -237,8 +282,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.77.42\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-11-01 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.82.09\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-05-20 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -385,6 +430,7 @@ echo '----------------------'
 
 STOP_SERVER
 directory_clean
+version_init
 directory_init
 virtuoso_init
 if [ "$MODE" = "" ] || [ "$MODE" = "1" ]
@@ -401,7 +447,6 @@ virtuoso_shutdown
 STOP_SERVER
 chmod 644 ods_webmail_dav.vad
 chmod 644 ods_webmail_filesystem.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -411,5 +456,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-WebMail/sql/DET_oMail.sql b/appsrc/ODS-WebMail/sql/DET_oMail.sql
index b0c5d1c..4d20568 100644
--- a/appsrc/ODS-WebMail/sql/DET_oMail.sql
+++ b/appsrc/ODS-WebMail/sql/DET_oMail.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_oMail.sql,v 1.6.2.2 2010/09/20 10:15:41 source Exp $
+--  $Id: DET_oMail.sql,v 1.6.2.3 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/eml/eml-create-code.sql b/appsrc/ODS-WebMail/sql/eml/eml-create-code.sql
index 69789de..50bfa46 100644
--- a/appsrc/ODS-WebMail/sql/eml/eml-create-code.sql
+++ b/appsrc/ODS-WebMail/sql/eml/eml-create-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: eml-create-code.sql,v 1.42.2.23 2011/02/14 13:03:13 source Exp $
+--  $Id: eml-create-code.sql,v 1.42.2.28 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -368,7 +368,7 @@ create procedure OMAIL.WA.array2xml(
         node := lcase (node);
       if (isarray(V[N+1]) and not isstring(V[N+1]))
       {
-  	    value := OMAIL.WA.array2xml(V[N+1]) ;
+        value := OMAIL.WA.array2xml(V[N+1], lowerCase) ;
       }
       else if (isnull (V[N+1]))
       {
@@ -977,7 +977,6 @@ create procedure OMAIL.WA.external_account_check (
             {
               _checked := vector_concat (_checked, vector (_folderName));
               _messages := imap_get (_server, EA_USER, _password, _buffer, 'select', _folderName);
-              -- dbg_obj_print ('', _folderName, length (_messages));
               foreach (any _message in _messages) do
               {
                 _msgId := (select MSG_ID from OMAIL.WA.MESSAGES where DOMAIN_ID = EA_DOMAIN_ID and USER_ID = EA_USER_ID and MSG_SOURCE = EA_ID and UNIQ_MSG_ID = _message[0]);
@@ -1764,7 +1763,6 @@ create procedure OMAIL.WA.imap_folder_erase (
 
   _buffer := 10000000;
   _retCode := imap_get (_server, _user, _password, _buffer, 'delete', _folder);
-  -- dbg_obj_print ('imap_folder_erase', _retCode);
 
   return 1;
 }
@@ -1798,7 +1796,6 @@ create procedure OMAIL.WA.imap_folder_move (
   _newFolder := _folder2 || '.' || OMAIL.WA.folder_name (_domain_id, _user_id, _folder_id);
   _buffer := 10000000;
   _retCode := imap_get (_server, _user, _password, _buffer, 'rename', '', vector (_folder, _newFolder));
-  -- dbg_obj_print ('imap_folder_move', _retCode);
 
   return 1;
 }
@@ -1825,7 +1822,6 @@ create procedure OMAIL.WA.imap_folder_rename (
   _newFolder := _folder || '.' || _name;
   _buffer := 10000000;
   _retCode := imap_get (_server, _user, _password, _buffer, 'rename', '', vector (_folder, _newFolder));
-  -- dbg_obj_print ('imap_folder_rename', _retCode);
 
   return 1;
 }
@@ -3246,7 +3242,6 @@ create procedure OMAIL.WA.imap_message_erase (
 
   _buffer := 10000000;
   _retCode := imap_get (_server, _user, _password, _buffer, 'message_delete', _folder, vector (cast (_unique_id as integer)));
-  -- dbg_obj_print ('imap_message_erase', _retCode);
 
   return 1;
     }
@@ -5781,7 +5776,6 @@ create procedure OMAIL.WA.omail_receive_message(
       {
         declare continue handler for SQLSTATE '*'
         {
-          -- dbg_obj_print ('', __SQL_STATE, __SQL_MESSAGE);
           _options := vector ();
           goto _1;
         };
@@ -6016,8 +6010,8 @@ create procedure OMAIL.WA.omail_save_msg(
   in _msg_id    integer,
   out _error    integer)
 {
-  declare _address,_subject,_tags,_mheader,_mstatus,_from,_to,_cc,_bcc,_dcc,_address_info,_pdata,_aparams,_ref_id varchar;
-  declare _folder_id,_priority,_dsize,_attached,_part_id,_type_id,_dsize,_pdefault,_freetext_id,_msg_source integer;
+  declare _address, _subject, _tags, _mheader, _mstatus, _from, _to, _cc, _bcc, _dcc, _address_info, _certificates, _certificate, _mail, _pdata, _aparams, _ref_id varchar;
+  declare N, _folder_id, _priority, _dsize, _attached, _part_id, _type_id, _dsize, _pdefault, _freetext_id, _msg_source integer;
   declare _rcv_date, _snd_date any;
   declare _options, _rfc_id, _rfc_references any;
 
@@ -6088,10 +6082,23 @@ create procedure OMAIL.WA.omail_save_msg(
   _rfc_references := get_keyword('rfc_references', _params,'');
 
   _options := vector ();
+
   OMAIL.WA.omail_setparam ('securitySign', _options, get_keyword ('ssign', _params, '0'));
-  if (not isnull (VAD_CHECK_VERSION ('Addressbook')))
   OMAIL.WA.omail_setparam ('securityEncrypt', _options, get_keyword ('sencrypt', _params, '0'));
 
+  _certificates := vector ();
+  for (N := 0; N < length (_params); N := N + 2)
+  {
+    if (_params[N] like 'modulus_%')
+    {
+      _mail := replace (_params[N], 'modulus_', '');
+      _certificate := vector ('mail', OMAIL.WA.omail_address2xml ('to', _mail, 2), 'modulus', _params[N+1], 'public_exponent', get_keyword ('public_exponent_' || _mail, _params));
+      _certificates := vector_concat (_certificates, vector ('certificate', _certificate));
+    }
+  }
+  if (length (_certificates))
+    OMAIL.WA.omail_setparam ('certificates', _options, _certificates);
+
   if (_msg_id = 0)
   {
     _msg_id      := sequence_next ('OMAIL.WA.omail_seq_eml_msg_id');
@@ -6570,7 +6577,7 @@ create procedure OMAIL.WA.omail_send_msg(
 {
   declare _sql_result1, _sql_result2, _xslt_url, _xslt_url2, _xslt_url3, _tmp, _body any;
   declare _sender, _rec, _smtp_server any;
-  declare _sid, _realm, _fields, _settings, _signed, _sencrypt, _type_id, _replyTo, _displayName, _dloadUrl any;
+  declare _sid, _realm, _fields, _options, _settings, _signed, _sencrypt, _type_id, _replyTo, _displayName, _dloadUrl any;
   declare exit handler for SQLSTATE '2E000'
   {
     _error := 1901;
@@ -6582,6 +6589,18 @@ create procedure OMAIL.WA.omail_send_msg(
     return;
   };
 
+  declare exit handler for SQLSTATE '01903'
+  {
+    _error := 1903;
+    return;
+  };
+
+  declare exit handler for SQLSTATE '01904'
+  {
+    _error := 1904;
+    return;
+  };
+
   _error     := 0;
   _xslt_url  := OMAIL.WA.omail_xslt_full('construct_mail.xsl');
   _xslt_url2 := OMAIL.WA.omail_xslt_full('construct_recip.xsl');
@@ -6592,6 +6611,15 @@ create procedure OMAIL.WA.omail_send_msg(
   _fields    := OMAIL.WA.omail_get_message(_domain_id, _user_id, _msg_id, 1);
   _type_id   := OMAIL.WA.omail_getp ('type_id', _fields);
 
+  _sender := cast (xslt (_xslt_url2, xml_tree_doc (xml_tree (sprintf ('<fr><address>%s</address></fr>', get_keyword ('address', _fields))))) as varchar);
+  _rec    := cast (xslt (_xslt_url2, xml_tree_doc (xml_tree (sprintf ('<to><address>%s</address></to>', get_keyword ('address', _fields))))) as varchar);
+  if (not isnull (_skip))
+  {
+    _rec := replace (_rec, sprintf ('<%s>', _skip), '');
+    _rec := trim (trim (_rec), ',');
+  }
+  _rec := trim (_rec);
+
   -- Get Settings
   _settings := OMAIL.WA.omail_get_settings(_domain_id, _user_id, 'base_settings');
 
@@ -6630,13 +6658,13 @@ create procedure OMAIL.WA.omail_send_msg(
   _signed := OMAIL.WA.omail_getp ('ssign', _params);
   if (_signed = '1')
   {
-    declare _certificate any;
+    declare _cert any;
 
     set_user_id (OMAIL.WA.account_name (_user_id));
-    _certificate := xenc_pem_export (get_keyword ('security_sign', _settings), 1);
+    _cert := xenc_pem_export (get_keyword ('security_sign', _settings), 1);
     set_user_id ('dba');
-    if (isnull (_certificate))
-      signal ('08006', '');
+    if (isnull (_cert))
+      signal ('01903', '');
 
     _tmp := '<message>' ||
             sprintf ('<boundary>%s</boundary>', '------_NextPart_' || md5 (cast (now() as varchar))) ||
@@ -6648,7 +6676,7 @@ create procedure OMAIL.WA.omail_send_msg(
             '</message>';
     _tmp := xslt (_xslt_url3, xml_tree_doc (xml_tree (_tmp)));
     _tmp := replace (cast (_tmp as varchar), CHR(10), '\r\n');
-    _body := smime_sign (_tmp, _certificate, _certificate, '', vector (), flags=>4*16);
+    _body := smime_sign (_tmp, _cert, _cert, '', vector (), flags=>4*16);
 
     _sql_result2 := '';
   } else {
@@ -6668,33 +6696,35 @@ create procedure OMAIL.WA.omail_send_msg(
   _body := xslt(_xslt_url, xml_tree_doc(xml_tree(_body)));
   _body := replace (cast (_body as varchar), CHR(10), '\r\n');
 
-  _sender := cast (xslt (_xslt_url2, xml_tree_doc (xml_tree (concat ('<fr>', sprintf ('<address>%s</address>\n', get_keyword ('address', _fields)), '</fr>')))) as varchar);
-  _rec    := cast (xslt (_xslt_url2, xml_tree_doc (xml_tree (concat ('<to>', sprintf ('<address>%s</address>\n', get_keyword ('address', _fields)), '</to>')))) as varchar);
-  if (not isnull (_skip))
-  {
-    _rec := replace(_rec, sprintf('<%s>', _skip), '');
-    _rec := trim (trim (_rec), ',');
-  }
-  _rec := trim (_rec);
   _sencrypt := OMAIL.WA.omail_getp ('sencrypt', _params);
   if (_sencrypt = '1')
   {
     declare N integer;
-    declare _addr, _addrs, _cert, _certs any;
+    declare _addr, _addrs, _cert, _certs, _key, _modulus, _modulusBin, _public_exponent  any;
+
+    --_options := OMAIL.WA.omail_getp ('options', _fields);
+    --if (not isnull (_options))
+    --  _options := xml_tree_doc (xml_tree (_options));
 
     _certs := vector ();
     _addrs := split_and_decode (_rec, 0, '\0\0,');
     for (N := 0; N < length (_addrs); N := N + 1)
     {
-      _addr := _addrs[N];
-      _addr := replace (_addr, '<', '');
-      _addr := replace (_addr, '>', '');
-      _addr := replace (_addr, '\t', '');
-      _addr := trim (_addr);
-      _cert := AB.WA.contact_certificate (_user_id, _addr);
-      if (isnull (_cert) or (get_certificate_info (10, _cert, 0, '', 'emailAddress') <> _addr))
-        signal ('08006', '');
-
+      _addr := OMAIL.WA.omail_address2xml ('to', _addrs[N], 2);
+      _cert := OMAIL.WA.contact_certificate (_user_id, _addr);
+      if (isnull (_cert))
+      {
+--        if (not isnull (_options))
+--        {
+--          _key := xenc_rand_bytes (8, 1);
+--          _modulus := cast (xpath_eval (sprintf ('//certificate[mail = "%s"]/modulus', _addr), _options, 1) as varchar);
+--          _public_exponent := cast (xpath_eval (sprintf ('//certificate[mail = "%s"]/public_exponent', _addr), _options, 1) as integer);
+--          xenc_key_RSA_construct (_key, OMAIL.WA.hex2bin (_modulus),  OMAIL.WA.hex2bin (sprintf ('%02X', _public_exponent)));
+--          _cert :=  xenc_pubkey_pem_export (_key);
+--        }
+--        if (isnull (_cert))
+        signal ('01904', '');
+      }
       _certs := vector_concat (_certs, vector (_cert));
     }
     _body := smime_encrypt (_body, _certs, 'aes256');
@@ -6722,6 +6752,51 @@ create procedure OMAIL.WA.omail_send_msg(
 
 -------------------------------------------------------------------------------
 --
+create procedure OMAIL.WA.contact_certificate (
+  in _user_id integer,
+  in _addr varchar)
+{
+  declare _cert, webid, domain, host_info, xrd, template, url any;
+  declare xt, xd, tmpcert any;
+
+  _cert := null;
+  if (__proc_exists ('AB.WA.contact_certificate'))
+    _cert := AB.WA.contact_certificate (_user_id, _addr);
+
+  if (is_empty_or_null (_cert))
+  {
+    declare exit handler for sqlstate '*'
+    {
+      -- connection error or parse error
+      return null;
+    };
+
+    domain := subseq (_addr, position ('@', _addr));
+    host_info := http_get (sprintf ('http://%s/.well-known/host-meta', domain));
+    xd := xtree_doc (host_info);
+    template := cast (xpath_eval ('/XRD/Link[@rel="lrdd"]/@template', xd) as varchar);
+    url := replace (template, '{uri}', 'acct:' || _addr);
+    xrd := http_get (url);
+    xd := xtree_doc (xrd);
+    xt := xpath_eval ('/XRD/Property[@type="certificate"]/@href', xd, 0);
+    foreach (any x in xt) do
+    {
+      _cert := http_get (cast (x as varchar));
+      if ((DB.DBA.FOAF_SSL_MAIL_GET (_cert) = _addr))
+        return _cert;
+    }
+  }
+  else
+  {
+    if ((DB.DBA.FOAF_SSL_MAIL_GET (_cert) = _addr))
+      return _cert;
+  }
+  return null;
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure OMAIL.WA.omail_sendok(
   inout path any,
   inout lines any,
@@ -7617,7 +7692,7 @@ create procedure OMAIL.WA.omail_write(
       OMAIL.WA.utl_redirect(sprintf('err.vsp?sid=%s&realm=%s&err=%d',_sid,_realm,_error));
     return;
   }
-  else if (_faction = 'DAV')
+  if (_faction = 'DAV')
   {
     -- > save new /update/ message and attached into 'Draft'
     _msg_id := OMAIL.WA.omail_save_msg(_domain_id,_user_id, params, OMAIL.WA.omail_getp('msg_id',_params), _error);
@@ -7647,7 +7722,7 @@ create procedure OMAIL.WA.omail_write(
       OMAIL.WA.utl_redirect(sprintf('err.vsp?sid=%s&realm=%s&err=%d',_sid,_realm,_error));
     return;
   }
-  else if (_faction = 'preview')
+  if (_faction = 'preview')
   {
     -- > 'HTML preview'
     _msg_id := OMAIL.WA.omail_save_msg(_domain_id,_user_id,params,OMAIL.WA.omail_getp('msg_id',_params),_error);
@@ -7658,7 +7733,7 @@ create procedure OMAIL.WA.omail_write(
       OMAIL.WA.utl_redirect(sprintf('err.vsp?sid=%s&realm=%s&err=%d',_sid,_realm,_error));
     return;
   }
-  else if (_faction = 'attach')
+  if (_faction = 'attach')
   {
     -- > 'save new /update/  message into Draft and goto Attachment page'
     _msg_id := OMAIL.WA.omail_save_msg(_domain_id, _user_id, params, OMAIL.WA.omail_getp('msg_id',_params), _error);
@@ -7681,14 +7756,8 @@ create procedure OMAIL.WA.omail_write(
   else
   {
     if (_to <> '' or _cc <> '' or _bcc <> '' or _dcc <> '')
-    {
-      _sql_result1 := '<address><addres_list>\n';
-      _sql_result1 := sprintf('%s<to><email><![CDATA[%s]]></email></to>\n',_sql_result1,_to);
-      _sql_result1 := sprintf('%s<cc><email><![CDATA[%s]]></email></cc>\n',_sql_result1,_cc);
-      _sql_result1 := sprintf('%s<bcc><email><![CDATA[%s]]></email></bcc>\n',_sql_result1,_bcc);
-      _sql_result1 := sprintf('%s<dcc><email><![CDATA[%s]]></email></dcc>\n',_sql_result1,_dcc);
-      _sql_result1 := sprintf('%s</addres_list></address>\n',_sql_result1);
-    }
+      _sql_result1 := sprintf ('<address><addres_list>\n<to><email>%V</email></to>\n<cc><email>%V</email></cc>\n<bcc><email>%V</email></bcc>\n<dcc><email>%V</email></dcc>\n</addres_list></address>\n', _to, _cc, _bcc, _dcc);
+
     if (_subject <> '')
       _sql_result1 := sprintf('%s<subject>%s</subject>\n',_sql_result1,_subject);
 
@@ -7968,70 +8037,96 @@ create procedure OMAIL.WA.omail_mails (
   -- www procedure
 
   declare _user_id, _domain_id integer;
-  declare _rs, _sid, _realm, _set varchar;
+  declare _rs, _sid, _realm, _set, _return, _certificate, _where, _what varchar;
   declare _page_params, _user_info any;
 
   _sid       := get_keyword ('sid', params, '');
   _realm     := get_keyword ('realm', params, '');
   _user_info := get_keyword ('user_info', params);
   _set       := get_keyword ('set', params, '');
+  _return      := get_keyword ('return', params, '');
+  _certificate := get_keyword ('certificate', params, '0');
+  _where       := get_keyword ('where', params, '1');
+  _what        := get_keyword ('what', params, '');
 
   -- TEMP constants -------------------------------------------------------------------
   _user_id   := get_keyword ('user_id',_user_info);
   _domain_id := 1;
 
   -- Page Params---------------------------------------------------------------------
-  _page_params := vector (0,0,0,0);
+  _page_params := vector (0,0,0,0,0,0,0,0);
   aset (_page_params, 0, vector ('sid', _sid));
   aset (_page_params, 1, vector ('realm', _realm));
   aset (_page_params, 2, vector ('user_info', OMAIL.WA.array2xml(_user_info)));
   aset (_page_params, 3, vector ('set', _set));
+  aset (_page_params, 4, vector ('return', _return));
+  aset (_page_params, 5, vector ('certificate', _certificate));
+  aset (_page_params, 6, vector ('where', _where));
+  aset (_page_params, 7, vector ('what', _what));
 
   -- XML structure-------------------------------------------------------------------
   _rs := OMAIL.WA.omail_page_params(_page_params);
   _rs := sprintf ('%s<mails>', _rs);
 
-  declare S, name varchar;
+  declare S, C, Cname, name, mail, certificate varchar;
   declare IRIs, st, msg, meta, rows any;
 
-  IRIs := vector ();
+  if (_certificate = '1')
+  {
+    cName := ', ?modulus, ?public_exponent';
+    C := '?identity cert:identity ?x ; rsa:public_exponent ?public_exponent ; rsa:modulus ?modulus .';
+  } else {
+    cName := '';
+    C := '';
+  }
+
+  -- Local contacts
+  if (_where = '1')
+  {
   S := 'sparql
         prefix foaf: <http://xmlns.com/foaf/0.1/>
-        select ?nick, ?firstName, ?family_name, ?mbox, ?mbox_sha1sum, ?x
+          prefix cert: <http://www.w3.org/ns/auth/cert#>
+          prefix rsa: <http://www.w3.org/ns/auth/rsa#>
+          select ?nick, ?firstName, ?family_name, ?mbox, ?x
         from <%s>
         where
         {
           <%s> foaf:knows ?x.
+            ?x foaf:mbox ?mbox.
+            %s
           optional { ?x foaf:nick ?nick}.
           optional { ?x foaf:firstName ?firstName}.
           optional { ?x foaf:family_name ?family_name}.
-          optional { ?x foaf:mbox ?mbox}.
-          optional { ?x foaf:mbox_sha1sum ?mbox_sha1sum}.
         }';
-	S := sprintf (S, SIOC..get_graph (), SIOC..person_iri (SIOC..user_iri (_user_id)));
+    S := sprintf (S, SIOC..get_graph (), SIOC..person_iri (SIOC..user_iri (_user_id)), C);
+
+    IRIs := vector ();
   st := '00000';
   exec (S, st, msg, vector (), 0, meta, rows);
   if ('00000' = st)
   {
     foreach (any row in rows) do
     {
+        mail := row[3];
+        if (isnull (mail))
+          goto _skip;
+
       name := '';
       if (not isnull (row[0]))
         name := row[0];
       if ((not isnull (row[1])) and (not isnull (row[2])))
         name := row[1] || ' ' || row[2];
-      if (not isnull (row[3]))
-      {
-        _rs := sprintf ('%s<mail><name>%s</name><email>%s</email></mail>', _rs, name, OMAIL.WA.xml2string (OMAIL.WA.omail_composeAddr (name, row[3])));
-      }
-      else if (not isnull (row[4]))
-      {
-        _rs := sprintf ('%s<mail><name>%s</name><email>%s</email></mail>', _rs, name, OMAIL.WA.xml2string (OMAIL.WA.omail_composeAddr (name, row[4])));
-    }
-      IRIs := vector_concat (IRIs, vector (row[5]));
+
+        if ((_what <> '') and (lcase (name) not like ('%' || lcase(_what) || '%')))
+          goto _skip;
+
+        _rs := sprintf ('%s<mail><name>%s</name><email>%s</email></mail>', _rs, name, OMAIL.WA.xml2string (OMAIL.WA.omail_composeAddr (name, mail)));
+        IRIs := vector_concat (IRIs, vector (row[4]));
+
+      _skip:;
     }
   }
-  S := 'select P_NAME, P_FIRST_NAME, P_LAST_NAME, P_MAIL, P_ID, P_DOMAIN_ID
+    S := 'select P_NAME, P_FIRST_NAME, P_LAST_NAME, P_MAIL, P_CERTIFICATE, P_ID, P_DOMAIN_ID
           from AB.WA.PERSONS
          where DB.DBA.is_empty_or_null (P_MAIL) = 0
            and P_DOMAIN_ID in (select WAI_ID
@@ -8047,17 +8142,79 @@ create procedure OMAIL.WA.omail_mails (
   {
     foreach (any row in rows) do
     {
-      if (not OMAIL.WA.vector_contains (IRIs, SIOC..socialnetwork_contact_iri (row[5], row[4])))
-      {
+        name := '';
+        mail := '';
+        if ((_certificate = '1') and (length (row[4]) = 0))
+          goto _skip2;
+
+        if (OMAIL.WA.vector_contains (IRIs, SIOC..socialnetwork_contact_iri (row[6], row[5])))
+          goto _skip2;
+
         name := '';
         if (not DB.DBA.is_empty_or_null (row[0]))
           name := row[0];
         if ((not DB.DBA.is_empty_or_null (row[1])) and (not DB.DBA.is_empty_or_null (row[2])))
           name := row[1] || ' ' || row[2];
+
+        if ((_what <> '') and (lcase (name) not like ('%' || lcase(_what) || '%')))
+          goto _skip2;
+
+        mail := row[3];
+
         _rs := sprintf ('%s<mail><name>%s</name><email>%s</email></mail>', _rs, name, OMAIL.WA.xml2string (OMAIL.WA.omail_composeAddr (name, row[3])));
+
+      _skip2:;
+      }
+    }
+  }
+
+  -- LOD contacts
+  if (_where = '2')
+  {
+    S := 'prefix foaf: <http://xmlns.com/foaf/0.1/>
+          prefix cert: <http://www.w3.org/ns/auth/cert#>
+          prefix rsa: <http://www.w3.org/ns/auth/rsa#>
+          select DISTINCT ?firstName, ?family_name, ?mbox
+          where
+          {
+            ?x a foaf:Person.
+            ?x foaf:mbox ?mbox.
+            %s
+            optional { ?x foaf:firstName ?firstName}.
+            optional { ?x foaf:family_name ?family_name}.
+            filter (?mbox = iri("mailto:%s"))
+          }
+          limit 10 offset 0';
+    S := sprintf (S, cName, C, _what);
+    {
+      declare exit handler for sqlstate '*'
+      {
+        goto _end;
+      };
+      declare xmlData, xmlItems, tmp any;
+
+      rows := http_client (url=>sprintf ('http://lod.openlinksw.com/sparql?query=%U&format=xml', S), timeout=>30);
+      xmlData := xml_tree_doc (rows);
+      xmlItems := xpath_eval ('//results/result', xmlData, 0);
+      foreach (any xmlItem in xmlItems) do
+      {
+        name := '';
+        tmp := trim (serialize_to_UTF8_xml (xpath_eval ('string(binding[@name="firstName"]/literal)', xmlItem, 1)));
+        if (not DB.DBA.is_empty_or_null (tmp))
+          name := tmp;
+        tmp := trim (serialize_to_UTF8_xml (xpath_eval ('string(binding[@name="family_name"]/literal)', xmlItem, 1)));
+        if (not DB.DBA.is_empty_or_null (tmp))
+          name := name || ' ' || tmp;
+        name := trim (name);
+
+        mail := replace (serialize_to_UTF8_xml (xpath_eval ('string(binding[@name="mbox"]/uri)', xmlItem, 1)), 'mailto:', '');
+
+        _rs := sprintf ('%s<mail><name>%s</name><email>%s</email></mail>', _rs, name, OMAIL.WA.xml2string (OMAIL.WA.omail_composeAddr (name, mail)));
       }
     }
   }
+
+_end:;
   _rs := sprintf ('%s</mails>', _rs);
   return _rs;
 }
@@ -8476,8 +8633,8 @@ create procedure OMAIL.WA.test (
   {
     return value;
   }
-  value := OMAIL.WA.validate2 (valueClass, value);
 
+  value := OMAIL.WA.validate2 (valueClass, cast (value as varchar));
   if (valueType = 'integer')
   {
     tmp := get_keyword('minValue', params);
@@ -8487,8 +8644,9 @@ create procedure OMAIL.WA.test (
     tmp := get_keyword('maxValue', params);
     if (not isnull(tmp) and (value > tmp))
       signal('MAX', cast(tmp as varchar));
-
-  } else if (valueType = 'float') {
+  }
+  else if (valueType = 'float')
+  {
     tmp := get_keyword('minValue', params);
     if (not isnull(tmp) and (value < tmp))
       signal('MIN', cast(tmp as varchar));
@@ -8496,8 +8654,9 @@ create procedure OMAIL.WA.test (
     tmp := get_keyword('maxValue', params);
     if (not isnull(tmp) and (value > tmp))
       signal('MAX', cast(tmp as varchar));
-
-  } else if (valueType = 'varchar') {
+  }
+  else if (valueType = 'varchar')
+  {
     tmp := get_keyword('minLength', params);
     if (not isnull(tmp) and (length(value) < tmp))
       signal('MINLENGTH', cast(tmp as varchar));
@@ -9564,6 +9723,36 @@ create procedure OMAIL.WA.dt_BeginOfYear (
 
 -----------------------------------------------------------------------------------------
 --
+create procedure OMAIL.WA.hex2number (
+  in S varchar)
+{
+  if (S <= '9')
+    return cast (S as integer);
+
+  S := lcase (S);
+  return 10 + S[0] - ascii('a');
+}
+;
+
+-----------------------------------------------------------------------------------------
+--
+create procedure OMAIL.WA.hex2bin (
+  in S varchar)
+{
+  declare N integer;
+  declare retValue varchar;
+
+  retValue := repeat (' ', length (S) / 2);
+  for (N := 0; N < length (retValue); N := N + 1)
+  {
+    retValue[N] := OMAIL.WA.hex2number (substring(S, 2*N+1, 1))*16 + OMAIL.WA.hex2number (substring(S, 2*N+2, 1));
+  }
+  return retValue;
+}
+;
+
+-----------------------------------------------------------------------------------------
+--
 -- DCC procedures
 --
 -----------------------------------------------------------------------------------------
@@ -9607,7 +9796,8 @@ _skip:
   insert into OMAIL.WA.CONVERSATION (C_DOMAIN_ID, C_USER_ID, C_ADDRESS, C_ADDRESSES, C_DESCRIPTION, C_TS)
     values (domain_id, user_id, dcc_address, _from, _dcc, now());
 
-  insert soft OMAIL.WA.FOLDERS(DOMAIN_ID, USER_ID, FOLDER_ID, NAME) values (domain_id, user_id, 100, 'Inbox');
+  insert soft OMAIL.WA.FOLDERS(DOMAIN_ID, USER_ID, FOLDER_ID, NAME)
+    values (domain_id, user_id, 100, 'Inbox');
 
   return connection_get('conversation_address');
 }
@@ -10046,8 +10236,6 @@ create procedure DB.DBA.MAIL_NEWS_MSG_I (
 
   if (not isnull (N_NM_REF))
   {
-    --declare exit handler for sqlstate '*' { return dbg_obj_print(__SQL_MESSAGE);};
-
     refs := split_and_decode (N_NM_REF, 0, '\0\0 ');
     if (length (refs))
     {
diff --git a/appsrc/ODS-WebMail/sql/eml/eml-create-tables.sql b/appsrc/ODS-WebMail/sql/eml/eml-create-tables.sql
index e9ea418..e2995b8 100644
--- a/appsrc/ODS-WebMail/sql/eml/eml-create-tables.sql
+++ b/appsrc/ODS-WebMail/sql/eml/eml-create-tables.sql
@@ -1,10 +1,10 @@
 --
---  $Id: eml-create-tables.sql,v 1.9.2.6 2011/01/25 14:12:06 source Exp $
+--  $Id: eml-create-tables.sql,v 1.9.2.7 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/eml/eml-dev-code.sql b/appsrc/ODS-WebMail/sql/eml/eml-dev-code.sql
index 8bcd3a2..58883cc 100644
--- a/appsrc/ODS-WebMail/sql/eml/eml-dev-code.sql
+++ b/appsrc/ODS-WebMail/sql/eml/eml-dev-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: eml-dev-code.sql,v 1.2.2.1 2010/09/20 10:15:42 source Exp $
+--  $Id: eml-dev-code.sql,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/omail-api.sql b/appsrc/ODS-WebMail/sql/omail-api.sql
index 12885b7..5103d93 100644
--- a/appsrc/ODS-WebMail/sql/omail-api.sql
+++ b/appsrc/ODS-WebMail/sql/omail-api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: omail-api.sql,v 1.2.2.2 2010/09/20 10:15:41 source Exp $
+--  $Id: omail-api.sql,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2008 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/omail-wa-install.sql b/appsrc/ODS-WebMail/sql/omail-wa-install.sql
index a838be2..880b198 100644
--- a/appsrc/ODS-WebMail/sql/omail-wa-install.sql
+++ b/appsrc/ODS-WebMail/sql/omail-wa-install.sql
@@ -1,10 +1,10 @@
 --
---  $Id: omail-wa-install.sql,v 1.6.2.4 2011/01/25 14:12:05 source Exp $
+--  $Id: omail-wa-install.sql,v 1.6.2.5 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/omail-wa-uninstall.sql b/appsrc/ODS-WebMail/sql/omail-wa-uninstall.sql
index 1dda50f..a751394 100644
--- a/appsrc/ODS-WebMail/sql/omail-wa-uninstall.sql
+++ b/appsrc/ODS-WebMail/sql/omail-wa-uninstall.sql
@@ -1,10 +1,10 @@
 --
---  $Id: omail-wa-uninstall.sql,v 1.11.2.4 2011/01/25 14:12:05 source Exp $
+--  $Id: omail-wa-uninstall.sql,v 1.11.2.6 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -97,6 +97,7 @@ registry_remove ('omail_version_upgrade');
 registry_remove ('omail_path_upgrade2');
 registry_remove ('mail_index_version');
 registry_remove ('__ods_mail_sioc_init');
+registry_remove ('omail_services_update');
 
 -- Procedures
 create procedure OMAIL.WA.omail_drop_procedures()
diff --git a/appsrc/ODS-WebMail/sql/res/res-create-code-data.sql b/appsrc/ODS-WebMail/sql/res/res-create-code-data.sql
index e5db713..494fae5 100644
--- a/appsrc/ODS-WebMail/sql/res/res-create-code-data.sql
+++ b/appsrc/ODS-WebMail/sql/res/res-create-code-data.sql
@@ -1,10 +1,10 @@
 --
---  $Id: res-create-code-data.sql,v 1.3.2.3 2011/03/08 13:25:12 source Exp $
+--  $Id: res-create-code-data.sql,v 1.3.2.4 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/res/res-create-code.sql b/appsrc/ODS-WebMail/sql/res/res-create-code.sql
index 77eb772..4b7d893 100644
--- a/appsrc/ODS-WebMail/sql/res/res-create-code.sql
+++ b/appsrc/ODS-WebMail/sql/res/res-create-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: res-create-code.sql,v 1.3.2.1 2010/09/20 10:15:42 source Exp $
+--  $Id: res-create-code.sql,v 1.3.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/res/res-create-tables.sql b/appsrc/ODS-WebMail/sql/res/res-create-tables.sql
index d11393e..f64fe2a 100644
--- a/appsrc/ODS-WebMail/sql/res/res-create-tables.sql
+++ b/appsrc/ODS-WebMail/sql/res/res-create-tables.sql
@@ -1,10 +1,10 @@
 --
---  $Id: res-create-tables.sql,v 1.2.2.1 2010/09/20 10:15:42 source Exp $
+--  $Id: res-create-tables.sql,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/sioc_mail.sql b/appsrc/ODS-WebMail/sql/sioc_mail.sql
index 0172550..2fa4d93 100644
--- a/appsrc/ODS-WebMail/sql/sioc_mail.sql
+++ b/appsrc/ODS-WebMail/sql/sioc_mail.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc_mail.sql,v 1.7.2.2 2010/09/20 10:15:41 source Exp $
+--  $Id: sioc_mail.sql,v 1.7.2.5 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -19,8 +19,11 @@
 --  with this program; if not, write to the Free Software Foundation, Inc.,
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
+
 use sioc;
 
+-------------------------------------------------------------------------------
+--
 create procedure mail_post_iri (in user_id int, in msg_id int)
 {
   declare _member, _instance varchar;
@@ -44,17 +47,24 @@ create procedure mail_post_iri (in user_id int, in msg_id int)
 }
 ;
 
+-------------------------------------------------------------------------------
+--
 create procedure fill_ods_mail_sioc (in graph_iri varchar, in site_iri varchar, in _wai_name varchar := null)
 {
   declare iri, c_iri varchar;
   declare do_post int;
 
+  -- init services
+  SIOC..fill_ods_mail_services ();
+
   for (select DOMAIN_ID, USER_ID, MSG_ID, SUBJECT, SND_DATE, UNIQ_MSG_ID from OMAIL..MESSAGES) do
     {
       do_post := 1;
     for (select WAM_INST
            from DB.DBA.WA_MEMBER
-          where WAM_USER = USER_ID and WAM_MEMBER_TYPE = 1 and  WAM_APP_TYPE = 'oMail'
+         where WAM_USER = USER_ID
+           and WAM_MEMBER_TYPE = 1
+           and WAM_APP_TYPE = 'oMail'
  	   and ((WAM_IS_PUBLIC = 1 and _wai_name is null) or WAM_INST = _wai_name)) do
 	  {
           if (do_post = 1)
@@ -73,6 +83,28 @@ create procedure fill_ods_mail_sioc (in graph_iri varchar, in site_iri varchar,
 }
 ;
 
+-------------------------------------------------------------------------------
+--
+create procedure fill_ods_mail_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('mail.message.new', 'mail.options.set',  'mail.options.get');
+  ods_object_services (graph_iri, 'mail', 'ODS mail instance services', svc_functions);
+
+  -- item
+  svc_functions := vector ('mail.message.get', 'mail.message.delete', 'mail.message.move');
+  ods_object_services (graph_iri, 'mail/item', 'ODS Mail item services', svc_functions);
+
+}
+;
+
+-------------------------------------------------------------------------------
+--
 create procedure message_insert (
   inout domain_id integer,
   inout user_id integer,
@@ -100,16 +132,21 @@ create procedure message_insert (
       for (select coalesce(U_FULL_NAME, U_NAME) full_name, U_E_MAIL e_mail from DB.DBA.SYS_USERS where U_ID = user_id) do
         foaf_maker (graph_iri, person_iri (creator_iri), full_name, e_mail);
       ods_sioc_post (graph_iri, iri, null, creator_iri, subject, send_date, null);
+
+      -- item services
+      SIOC..ods_object_services_attach (graph_iri, iri, 'mail/item');
+
           do_post := 0;
         }
       c_iri := mail_iri (WAM_INST);
     DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc_iri ('has_container'), c_iri);
     DB.DBA.ODS_QUAD_URI (graph_iri, c_iri, sioc_iri ('container_of'), iri);
     }
-  return;
 }
 ;
 
+-------------------------------------------------------------------------------
+--
 create procedure message_delete (
   in domain_id integer,
   in user_id integer,
@@ -125,16 +162,22 @@ create procedure message_delete (
   graph_iri := get_graph ();
   iri := mail_post_iri (user_id, message_id);
   delete_quad_s_or_o (graph_iri, iri, iri);
+
+  -- event services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'mail/item');
 }
 ;
 
--- OMAIL..MESSAGES
+-------------------------------------------------------------------------------
+--
 create trigger MESSAGES_SIOC_I after insert on OMAIL..MESSAGES referencing new as N
 {
   message_insert (N.DOMAIN_ID, N.USER_ID, N.MSG_ID, N.SUBJECT, N.SND_DATE);
 }
 ;
 
+-------------------------------------------------------------------------------
+--
 create trigger MESSAGES_SIOC_U after update on OMAIL..MESSAGES referencing old as O, new as N
     {
   message_delete (O.DOMAIN_ID, O.USER_ID, O.MSG_ID);
@@ -142,12 +185,16 @@ create trigger MESSAGES_SIOC_U after update on OMAIL..MESSAGES referencing old a
 }
 ;
 
+-------------------------------------------------------------------------------
+--
 create trigger MESSAGES_SIOC_D before delete on OMAIL..MESSAGES referencing old as O
         {
   message_delete (O.DOMAIN_ID, O.USER_ID, O.MSG_ID);
 }
 ;
 
+-------------------------------------------------------------------------------
+--
 create procedure ods_mail_sioc_init ()
 {
   declare sioc_version any;
@@ -165,4 +212,18 @@ create procedure ods_mail_sioc_init ()
 
 --OMAIL.WA.exec_no_error ('ods_mail_sioc_init ()');
 
+-------------------------------------------------------------------------------
+--
+create procedure OMAIL.WA.tmp_update ()
+{
+  if (registry_get ('omail_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_mail_services();
+  registry_set ('omail_services_update', '1');
+}
+;
+
+OMAIL.WA.tmp_update ();
+
 use DB;
diff --git a/appsrc/ODS-WebMail/sql/utl/utl-create-code.sql b/appsrc/ODS-WebMail/sql/utl/utl-create-code.sql
index 0ae703c..5f4365c 100644
--- a/appsrc/ODS-WebMail/sql/utl/utl-create-code.sql
+++ b/appsrc/ODS-WebMail/sql/utl/utl-create-code.sql
@@ -1,10 +1,10 @@
 --
---  $Id: utl-create-code.sql,v 1.4.2.4 2010/09/20 10:15:42 source Exp $
+--  $Id: utl-create-code.sql,v 1.4.2.5 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/sql/wa_search_mail.sql b/appsrc/ODS-WebMail/sql/wa_search_mail.sql
index 982217e..4ce01e0 100644
--- a/appsrc/ODS-WebMail/sql/wa_search_mail.sql
+++ b/appsrc/ODS-WebMail/sql/wa_search_mail.sql
@@ -1,10 +1,10 @@
 --
---  $Id: wa_search_mail.sql,v 1.3.2.1 2010/09/20 10:15:42 source Exp $
+--  $Id: wa_search_mail.sql,v 1.3.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/vad_version b/appsrc/ODS-WebMail/vad_version
new file mode 100644
index 0000000..295fd07
--- /dev/null
+++ b/appsrc/ODS-WebMail/vad_version
@@ -0,0 +1 @@
+1.5.122
diff --git a/appsrc/ODS-WebMail/www-root/mail/i/css/print.css b/appsrc/ODS-WebMail/www-root/mail/i/css/print.css
index 44e59a9..e8dfefb 100644
--- a/appsrc/ODS-WebMail/www-root/mail/i/css/print.css
+++ b/appsrc/ODS-WebMail/www-root/mail/i/css/print.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: print.css,v 1.2.2.1 2010/09/20 10:15:43 source Exp $
+ *  $Id: print.css,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/mail/i/css/styles.css b/appsrc/ODS-WebMail/www-root/mail/i/css/styles.css
index e582e43..50d08c1 100644
--- a/appsrc/ODS-WebMail/www-root/mail/i/css/styles.css
+++ b/appsrc/ODS-WebMail/www-root/mail/i/css/styles.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: styles.css,v 1.9.2.5 2010/09/20 10:15:43 source Exp $
+ *  $Id: styles.css,v 1.9.2.6 2012/03/08 10:46:21 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/mail/i/js/script.js b/appsrc/ODS-WebMail/www-root/mail/i/js/script.js
index 0ca01b2..a6bf71a 100644
--- a/appsrc/ODS-WebMail/www-root/mail/i/js/script.js
+++ b/appsrc/ODS-WebMail/www-root/mail/i/js/script.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: script.js,v 1.11.2.11 2011/02/14 13:03:14 source Exp $
+ *  $Id: script.js,v 1.11.2.15 2012/03/08 10:46:21 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -361,14 +361,24 @@ function coloriseRow(obj, checked) {
     obj.className = obj.className + ' ' + 'tr_select';
 }
 
-function windowShow(sPage, width, height)
-{
+function mailsShow(sPage, sPageName, width, height) {
+  if ($('sencrypt').checked)
+    sPage += '&certificate=1';
+
+	windowShow(sPage, sPageName, width, height);
+}
+
+function windowShow(sPage, sPageName, width, height) {
   if (width == null)
-    width = 520;
+		width = 700;
   if (height == null)
-    height = 420;
-  sPage = sPage + '&return=F1&sid=' + document.forms[0].elements['sid'].value + '&realm=' + document.forms[0].elements['realm'].value;
-  win = window.open(sPage, null, "width="+width+",height="+height+", top=100, left=100, scrollbars=yes, resize=yes, menubar=no");
+		height = 500;
+  if (sPage.indexOf('sid=') == -1)
+    sPage += urlParam('sid');
+  if (sPage.indexOf('realm=') == -1)
+    sPage += urlParam('realm');
+  sPage += '&return=F1';
+  win = window.open(sPage, sPageName, "width="+width+",height="+height+",top=100,left=100,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
   win.window.focus();
 }
 
@@ -401,10 +411,9 @@ function initTab2(tabs, defaultNo)
 {
   var divNo = document.getElementById('tabNo');
   var tab = defaultNo;
-  if (divNo != null)
-  {
+  if (divNo) {
     var divTab = document.getElementById('tab_'+divNo.value);
-    if (divTab != null)
+    if (divTab)
       tab = divNo.value;
   }
   showTab2(tab, tabs);
@@ -413,10 +422,9 @@ function initTab2(tabs, defaultNo)
 function addChecked (objForm, objName, selectionMsq)
 {
   if (!anySelected (objForm, objName, selectionMsq, 'confirm'))
-    return;
+    return false;
 
-  if (window.opener.document.f1.elements[objForm.elements["set"].value])
-  {
+  if (window.opener.document.f1.elements[objForm.elements["set"].value]) {
     var destField = window.opener.document.f1.elements[objForm.elements["set"].value];
 
     destField.value = (destField.value).replace(';', ',');
@@ -424,17 +432,17 @@ function addChecked (objForm, objName, selectionMsq)
     destField.value = OMAIL.trim(destField.value, ',');
     destField.value = OMAIL.trim(destField.value);
     destField.value = destField.value + ',';
-    for (var i = 0; i < objForm.elements.length; i = i + 1)
-    {
+    for (var i = 0; i < objForm.elements.length; i = i + 1) {
       var obj = objForm.elements[i];
-      if (obj != null && obj.type == "checkbox" && obj.name == objName)
-      {
-        if (obj.checked)
-        {
-          if (destField.value.indexOf(obj.value+',') == -1)
-            destField.value = destField.value + obj.value+',';
-        } else {
-          destField.value = (destField.value).replace(obj.value+',', '');
+      if (obj && obj.type == "checkbox" && obj.name == objName) {
+        if (obj.checked && (destField.value.indexOf(obj.value+',') == -1)) {
+          destField.value += obj.value + ',';
+          objSibling = obj.nextSibling;
+          if (objSibling && objSibling.type == "hidden")
+            createHidden (window.opener.document, 'modulus_'+obj.value, objSibling.value);
+          objSibling = objSibling.nextSibling;
+          if (objSibling && objSibling.type == "hidden")
+            createHidden (window.opener.document, 'public_exponent_'+obj.value, objSibling.value);
         }
       }
     }
@@ -445,8 +453,9 @@ function addChecked (objForm, objName, selectionMsq)
 
 function davBrowse (fld)
 {
-  var options = { mode: 'browser',
-                  onConfirmClick: function(path, fname) {$(fld).value = path + fname;}
+  var options = {
+    mode: 'browser',
+    onConfirmClick: function(path, fname) {$(fld).value = '/DAV' + path + fname;}
                 };
   OAT.WebDav.open(options);
 }
@@ -481,6 +490,30 @@ function accountChange (obj)
   }
 }
 
+function whatLabelChange(obj)
+{
+  if (obj.value == '1')
+    $('whatLabel').innerHTML = 'Name';
+
+  if (obj.value == '2')
+    $('whatLabel').innerHTML = 'Mail';
+}
+
+function toggleDisabled(obj, toggles)
+{
+  for (var i = 0; i < toggles.length; i = i + 1) {
+    if (obj.value) {
+      $(toggles[i]).disabled = false;
+    } else {
+      $(toggles[i]).disabled = 'disabled';
+    }
+    if (i == 0)
+      $(toggles[i]).checked = true;
+    if (i == (toggles.length-1))
+      $(toggles[i]).checked = false;
+  }
+}
+
 var OMAIL = new Object();
 OMAIL.forms = new Object();
 
@@ -685,7 +718,11 @@ OMAIL.aboutDialog = function ()
 {
   var aboutDiv = $('aboutDiv');
   if (aboutDiv) {OAT.Dom.unlink(aboutDiv);}
-  aboutDiv = OAT.Dom.create('div', {width:'430px', height:'150px'});
+  aboutDiv = OAT.Dom.create('div', {
+    width:'430px',
+    height: '170px',
+    overflow: 'hidden'
+  });
   aboutDiv.id = 'aboutDiv';
   aboutDialog = new OAT.Dialog('About ODS Webmail', aboutDiv, {width:445, buttons: 0, resize:0, modal:1});
 	aboutDialog.cancel = aboutDialog.hide;
diff --git a/appsrc/ODS-WebMail/www-root/mail/i/js/tbl.js b/appsrc/ODS-WebMail/www-root/mail/i/js/tbl.js
index fab74bf..6641b61 100644
--- a/appsrc/ODS-WebMail/www-root/mail/i/js/tbl.js
+++ b/appsrc/ODS-WebMail/www-root/mail/i/js/tbl.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: tbl.js,v 1.1.4.3 2010/09/20 10:15:43 source Exp $
+ *  $Id: tbl.js,v 1.1.4.4 2012/03/08 10:46:21 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/mail/p/p.vsp b/appsrc/ODS-WebMail/www-root/mail/p/p.vsp
index 93889ab..352d77c 100644
--- a/appsrc/ODS-WebMail/www-root/mail/p/p.vsp
+++ b/appsrc/ODS-WebMail/www-root/mail/p/p.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: p.vsp,v 1.3.2.1 2010/09/20 10:15:43 source Exp $
+--  $Id: p.vsp,v 1.3.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/mail/p/tags.xml b/appsrc/ODS-WebMail/www-root/mail/p/tags.xml
index e6c1ad0..693f106 100644
--- a/appsrc/ODS-WebMail/www-root/mail/p/tags.xml
+++ b/appsrc/ODS-WebMail/www-root/mail/p/tags.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tags.xml,v 1.2.2.1 2010/09/20 10:15:43 source Exp $
+ -  $Id: tags.xml,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/mail/p/tags.xsl b/appsrc/ODS-WebMail/www-root/mail/p/tags.xsl
index ef13f96..af64b1c 100644
--- a/appsrc/ODS-WebMail/www-root/mail/p/tags.xsl
+++ b/appsrc/ODS-WebMail/www-root/mail/p/tags.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tags.xsl,v 1.2.2.1 2010/09/20 10:15:43 source Exp $
+ -  $Id: tags.xsl,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/portal.vsp b/appsrc/ODS-WebMail/www-root/portal.vsp
index bc76bff..69ad72c 100644
--- a/appsrc/ODS-WebMail/www-root/portal.vsp
+++ b/appsrc/ODS-WebMail/www-root/portal.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: portal.vsp,v 1.21.2.2 2010/09/20 10:15:42 source Exp $
+--  $Id: portal.vsp,v 1.21.2.4 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -152,7 +152,7 @@ exec_start:;
     _page_mode := concat(' mode="popup"');
 
   _xml := call (procName)(path, lines, params);
-  _xml := sprintf('<page id="%s"%s><ods><name>%s</name><link>%s</link><bar><![CDATA[%s]]></bar></ods>%s</page>', procID, _page_mode, wa_home_title, wa_home_link, ODS.BAR._EXEC('oMail', params, lines), _xml);
+  _xml := sprintf('<page id="%s"%s><ods><name>%V</name><link>%s</link><bar><![CDATA[%s]]></bar></ods>%s</page>', procID, _page_mode, wa_home_title, wa_home_link, ODS.BAR._EXEC('oMail', params, lines), _xml);
 
   -- XSL Transformation--------------------------------------------------------------
   OMAIL.WA.utl_myhttp (_xml, null, get_keyword ('vv', params), hParams, hLines, path);
diff --git a/appsrc/ODS-WebMail/www-root/res/export.vsp b/appsrc/ODS-WebMail/www-root/res/export.vsp
index f28bfd2..3938a75 100644
--- a/appsrc/ODS-WebMail/www-root/res/export.vsp
+++ b/appsrc/ODS-WebMail/www-root/res/export.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: export.vsp,v 1.5.2.1 2010/09/20 10:15:43 source Exp $
+--  $Id: export.vsp,v 1.5.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/res/flush.vsp b/appsrc/ODS-WebMail/www-root/res/flush.vsp
index 5073770..45f1238 100644
--- a/appsrc/ODS-WebMail/www-root/res/flush.vsp
+++ b/appsrc/ODS-WebMail/www-root/res/flush.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: flush.vsp,v 1.5.2.1 2010/09/20 10:15:43 source Exp $
+--  $Id: flush.vsp,v 1.5.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/www-root/res/image.vsp b/appsrc/ODS-WebMail/www-root/res/image.vsp
index f68e30a..2c509ac 100644
--- a/appsrc/ODS-WebMail/www-root/res/image.vsp
+++ b/appsrc/ODS-WebMail/www-root/res/image.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: image.vsp,v 1.3.2.1 2010/09/20 10:15:43 source Exp $
+--  $Id: image.vsp,v 1.3.2.2 2012/03/08 10:46:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/addr.xsl b/appsrc/ODS-WebMail/xslt/addr.xsl
index b412fb9..9f6dded 100644
--- a/appsrc/ODS-WebMail/xslt/addr.xsl
+++ b/appsrc/ODS-WebMail/xslt/addr.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: addr.xsl,v 1.2.2.2 2010/09/20 10:15:43 source Exp $
+ -  $Id: addr.xsl,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/attach.xsl b/appsrc/ODS-WebMail/xslt/attach.xsl
index 298692a..818e995 100644
--- a/appsrc/ODS-WebMail/xslt/attach.xsl
+++ b/appsrc/ODS-WebMail/xslt/attach.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: attach.xsl,v 1.3.2.2 2010/09/20 10:15:43 source Exp $
+ -  $Id: attach.xsl,v 1.3.2.5 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,13 +28,6 @@
   <xsl:template match="page">
     <form method="post" enctype="multipart/form-data" name="f1">
       <xsl:attribute name="action"><xsl:value-of select="$iri" />/attach.vsp</xsl:attribute>
-      <script>
-        function windowShow(sPage)
-        {
-          win = window.open(sPage, 'blank', "width=600,height=525,top=100,left=100,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
-          win.window.focus();
-        };
-      </script>
       <xsl:call-template name="hid_sid"/>
       <input type="hidden" name="ap">
         <xsl:attribute name="value"><xsl:value-of select="ap"/></xsl:attribute>
@@ -78,6 +71,9 @@
           <input type="button" name="att_2_button" value="Browse...">
             <xsl:attribute name="onclick">javascript: f1.att_source[1].checked = true; davBrowse ('att_2'); </xsl:attribute>
           </input>
+  		    <script type="text/javascript">
+            OAT.Loader.load(['dav'], function(){OAT.WebDav.init(davOptions);});
+  		    </script>
         </td>
       </tr>
       <tfoot>
diff --git a/appsrc/ODS-WebMail/xslt/base.xsl b/appsrc/ODS-WebMail/xslt/base.xsl
index 53b21d9..650ba56 100644
--- a/appsrc/ODS-WebMail/xslt/base.xsl
+++ b/appsrc/ODS-WebMail/xslt/base.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: base.xsl,v 1.3.2.4 2011/01/25 14:12:06 source Exp $
+ -  $Id: base.xsl,v 1.3.2.6 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -148,7 +148,7 @@
 
     <xsl:choose>
       <xsl:when test="$target = 'help-popup'">
-        <xsl:variable name="onclick">javascript:window.open('<xsl:value-of select="$url"/><xsl:value-of select="$pparams"/>','help','width=300, height=300, left=100,top=100')</xsl:variable>
+        <xsl:variable name="onclick">javascript: windowShow('<xsl:value-of select="$url" /><xsl:value-of select="$pparams" />', 'help');</xsl:variable>
         <xsl:variable name="href">#</xsl:variable>
         <xsl:variable name="target"></xsl:variable>
       </xsl:when>
diff --git a/appsrc/ODS-WebMail/xslt/box.xsl b/appsrc/ODS-WebMail/xslt/box.xsl
index bb544d5..49820c0 100644
--- a/appsrc/ODS-WebMail/xslt/box.xsl
+++ b/appsrc/ODS-WebMail/xslt/box.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: box.xsl,v 1.5.2.8 2011/02/14 13:03:14 source Exp $
+ -  $Id: box.xsl,v 1.5.2.9 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/ch_pop3.xsl b/appsrc/ODS-WebMail/xslt/ch_pop3.xsl
index 433a732..37e5c55 100644
--- a/appsrc/ODS-WebMail/xslt/ch_pop3.xsl
+++ b/appsrc/ODS-WebMail/xslt/ch_pop3.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ch_pop3.xsl,v 1.6.2.6 2011/01/25 14:12:06 source Exp $
+ -  $Id: ch_pop3.xsl,v 1.6.2.7 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/common.xsl b/appsrc/ODS-WebMail/xslt/common.xsl
index 7bae5bf..dfca527 100644
--- a/appsrc/ODS-WebMail/xslt/common.xsl
+++ b/appsrc/ODS-WebMail/xslt/common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: common.xsl,v 1.25.2.10 2011/02/14 13:03:14 source Exp $
+ -  $Id: common.xsl,v 1.25.2.15 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -238,49 +238,47 @@
   <xsl:template name="css">
     <link type="text/css" rel="stylesheet" href="/oMail/i/css/styles.css" />
     <link type="text/css" rel="stylesheet" href="/oMail/i/css/print.css" media="print" />
+    <link type="text/css" rel="stylesheet" href="/ods/common.css" />
+    <link type="text/css" rel="stylesheet" href="/ods/typeahead.css" />
     <link type="text/css" rel="stylesheet" href="/ods/oat/styles/webdav.css" />
   </xsl:template>
 
   <!-- ========================================================================== -->
   <xsl:template name="javaScript">
-    <script type="text/javascript" src="/oMail/i/js/script.js"></script>
-    <script type="text/javascript">
-      var toolkitPath="/ods/oat";
-      var imagePath="/ods/images/oat/";
-
-      var featureList=["ajax", "json", "anchor", "dialog", "dav", "combolist", "calendar"];
-    </script>
     <script type="text/javascript" src="/ods/oat/loader.js"></script>
-    <script type="text/javascript" src="/ods/tbl.js"></script>
-    <script type="text/javascript" src="/oMail/i/js/tbl.js"></script>
-    <script type="text/javascript" src="/ods/app.js"></script>
     <script type="text/javascript">
-      function myInit() {
-        if (!OAT._loaded) {
-          setTimeout(myInit, 50);
-          return;
-        }
         OAT.Preferences.imagePath = '/ods/images/oat/';
         OAT.Preferences.stylePath = '/ods/oat/styles/';
         OAT.Preferences.showAjax = false;
 
-      	/* Load Stylesheets */
-      	OAT.Style.include("grid.css");
-      	OAT.Style.include("webdav.css");
-
-        // WebDAV
-        var options = { imagePath: OAT.Preferences.imagePath,
+        // DAV
+        var davOptions = {
+          imagePath: OAT.Preferences.imagePath,
                         pathHome: '/home/',
                         path: '/home/<xsl:value-of select="//user_info/user_name" />/',
                         user: '<xsl:value-of select="//user_info/user_name" />',
                         connectionHeaders: {Authorization: '<xsl:value-of select="//user_info/user_basic_authorization" />'}
                       };
-        OAT.WebDav.init(options);
 
-        // a++
-        OAT.Preferences.imagePath = '/ods/images/oat/';
-        OAT.Anchor.imagePath = OAT.Preferences.imagePath;
-        OAT.Anchor.zIndex = 1001;
+      	/* load stylesheets */
+      	OAT.Style.include("grid.css");
+      	OAT.Style.include("webdav.css");
+      	OAT.Style.include("winms.css");
+
+        var featureList=["ajax", "json", "anchor", "dialog", "tree", "calendar"];
+        OAT.Loader.load(featureList);
+      </script>
+    <script type="text/javascript" src="/oMail/i/js/script.js"></script>
+    <script type="text/javascript" src="/ods/tbl.js"></script>
+    <script type="text/javascript" src="/oMail/i/js/tbl.js"></script>
+    <script type="text/javascript" src="/ods/typeahead.js"></script>
+    <script type="text/javascript" src="/ods/app.js"></script>
+    <script type="text/javascript">
+      function myInit() {
+        if (!OAT._loaded) {
+          setTimeout(myInit, 100);
+          return;
+        }
 
         if (<xsl:value-of select="//user_info/app" /> == 1)
         {
diff --git a/appsrc/ODS-WebMail/xslt/common_folders.xsl b/appsrc/ODS-WebMail/xslt/common_folders.xsl
index c173996..f84f15a 100644
--- a/appsrc/ODS-WebMail/xslt/common_folders.xsl
+++ b/appsrc/ODS-WebMail/xslt/common_folders.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: common_folders.xsl,v 1.3.2.6 2011/01/25 14:12:06 source Exp $
+ -  $Id: common_folders.xsl,v 1.3.2.7 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/construct_body.xsl b/appsrc/ODS-WebMail/xslt/construct_body.xsl
index 581694b..e84d56c 100644
--- a/appsrc/ODS-WebMail/xslt/construct_body.xsl
+++ b/appsrc/ODS-WebMail/xslt/construct_body.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: construct_body.xsl,v 1.1.4.2 2010/11/09 20:12:59 source Exp $
+ -  $Id: construct_body.xsl,v 1.1.4.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/construct_mail.xsl b/appsrc/ODS-WebMail/xslt/construct_mail.xsl
index 2cd0957..f04fd58 100644
--- a/appsrc/ODS-WebMail/xslt/construct_mail.xsl
+++ b/appsrc/ODS-WebMail/xslt/construct_mail.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: construct_mail.xsl,v 1.2.2.2 2010/11/09 20:12:59 source Exp $
+ -  $Id: construct_mail.xsl,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/construct_mail_pop3.xsl b/appsrc/ODS-WebMail/xslt/construct_mail_pop3.xsl
index 06ce1f1..272f573 100644
--- a/appsrc/ODS-WebMail/xslt/construct_mail_pop3.xsl
+++ b/appsrc/ODS-WebMail/xslt/construct_mail_pop3.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: construct_mail_pop3.xsl,v 1.2.2.1 2010/09/20 10:15:44 source Exp $
+ -  $Id: construct_mail_pop3.xsl,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/construct_recip.xsl b/appsrc/ODS-WebMail/xslt/construct_recip.xsl
index 1ca1e61..c78c5ba 100644
--- a/appsrc/ODS-WebMail/xslt/construct_recip.xsl
+++ b/appsrc/ODS-WebMail/xslt/construct_recip.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: construct_recip.xsl,v 1.2.2.1 2010/09/20 10:15:44 source Exp $
+ -  $Id: construct_recip.xsl,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/date_time.xsl b/appsrc/ODS-WebMail/xslt/date_time.xsl
index 60f5448..f6d9591 100644
--- a/appsrc/ODS-WebMail/xslt/date_time.xsl
+++ b/appsrc/ODS-WebMail/xslt/date_time.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: date_time.xsl,v 1.2.2.1 2010/09/20 10:15:44 source Exp $
+ -  $Id: date_time.xsl,v 1.2.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/err.xsl b/appsrc/ODS-WebMail/xslt/err.xsl
index 6fb8b16..7ff2788 100644
--- a/appsrc/ODS-WebMail/xslt/err.xsl
+++ b/appsrc/ODS-WebMail/xslt/err.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: err.xsl,v 1.3.2.1 2010/09/20 10:15:44 source Exp $
+ -  $Id: err.xsl,v 1.3.2.2 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/errors.xml b/appsrc/ODS-WebMail/xslt/errors.xml
index b718f6d..0608d3c 100644
--- a/appsrc/ODS-WebMail/xslt/errors.xml
+++ b/appsrc/ODS-WebMail/xslt/errors.xml
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: errors.xml,v 1.5.2.2 2011/01/25 14:12:06 source Exp $
+ -  $Id: errors.xml,v 1.5.2.4 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -107,6 +107,18 @@
     <decision>Please, go <back page="write.vsp" p="wp"/>, check or correct the email address in one of the address fields and re-send..</decision>
     <button page="write.vsp" p="wp"/>
   </error>
+  <error id="1903">
+    <title>Bad sender certificate is used</title>
+    <descr>You tried to send an signed email with bad certificate.</descr>
+    <decision>Please, go <back page="write.vsp" p="wp"/>, check yours settings and re-send..</decision>
+    <button page="write.vsp" p="wp"/>
+  </error>
+  <error id="1904">
+    <title>Bad recipient(s) e-mail address specified</title>
+    <descr>You have typed an invalid email address in one of the address fields (TO, CC or BCC). In order to send encrypted message, create a contact (using an Addressbook instance) which should contain receiver's email and public key.</descr>
+    <decision>Please, go <back page="write.vsp" p="wp"/>, check or correct the email address in one of the address fields or update contact's data and re-send.</decision>
+    <button page="write.vsp" p="wp"/>
+  </error>
   <error id="3001">
     <title>Unknown error when uploading file</title>
     <decision>Please, go <back/> and try again with other file. </decision>
diff --git a/appsrc/ODS-WebMail/xslt/export/rss2atom.xsl b/appsrc/ODS-WebMail/xslt/export/rss2atom.xsl
index f70655f..e23cb3a 100644
--- a/appsrc/ODS-WebMail/xslt/export/rss2atom.xsl
+++ b/appsrc/ODS-WebMail/xslt/export/rss2atom.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom.xsl,v 1.3.2.2 2010/09/20 10:15:46 source Exp $
+ -  $Id: rss2atom.xsl,v 1.3.2.3 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/export/rss2atom03.xsl b/appsrc/ODS-WebMail/xslt/export/rss2atom03.xsl
index 9c19759..0b094cb 100644
--- a/appsrc/ODS-WebMail/xslt/export/rss2atom03.xsl
+++ b/appsrc/ODS-WebMail/xslt/export/rss2atom03.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2atom03.xsl,v 1.3.2.1 2010/09/20 10:15:46 source Exp $
+ -  $Id: rss2atom03.xsl,v 1.3.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/export/rss2rdf.xsl b/appsrc/ODS-WebMail/xslt/export/rss2rdf.xsl
index 1120bf7..506f610 100644
--- a/appsrc/ODS-WebMail/xslt/export/rss2rdf.xsl
+++ b/appsrc/ODS-WebMail/xslt/export/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.5.2.1 2010/09/20 10:15:46 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.5.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/export/rss2xbel.xsl b/appsrc/ODS-WebMail/xslt/export/rss2xbel.xsl
index b3ae4c6..6057e73 100644
--- a/appsrc/ODS-WebMail/xslt/export/rss2xbel.xsl
+++ b/appsrc/ODS-WebMail/xslt/export/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rss2xbel.xsl,v 1.2.2.1 2010/09/20 10:15:46 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/filters.xsl b/appsrc/ODS-WebMail/xslt/filters.xsl
index e4e1c0b..c5b18b2 100644
--- a/appsrc/ODS-WebMail/xslt/filters.xsl
+++ b/appsrc/ODS-WebMail/xslt/filters.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: filters.xsl,v 1.1.2.5 2010/09/20 10:15:44 source Exp $
+ -  $Id: filters.xsl,v 1.1.2.6 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/folders.xsl b/appsrc/ODS-WebMail/xslt/folders.xsl
index 01dd3b4..dd2970a 100644
--- a/appsrc/ODS-WebMail/xslt/folders.xsl
+++ b/appsrc/ODS-WebMail/xslt/folders.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: folders.xsl,v 1.3.2.5 2010/09/20 10:15:44 source Exp $
+ -  $Id: folders.xsl,v 1.3.2.6 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/handlers.xsl b/appsrc/ODS-WebMail/xslt/handlers.xsl
index cfec7dc..bf3721d 100644
--- a/appsrc/ODS-WebMail/xslt/handlers.xsl
+++ b/appsrc/ODS-WebMail/xslt/handlers.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: handlers.xsl,v 1.2.2.1 2010/09/20 10:15:45 source Exp $
+ -  $Id: handlers.xsl,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -129,7 +129,7 @@
   <!-- ====================================================================================== -->
   <xsl:template match="handlers/handler_objects/actions/action">
     <xsl:call-template name="make_href">
-      <xsl:with-param name="url">javascript:var newwin=window.open('','blank');newwin.focus();</xsl:with-param>
+      <xsl:with-param name="url">javascript: windowShow('', 'blank');</xsl:with-param>
       <xsl:with-param name="target">_blank</xsl:with-param>
       <xsl:with-param name="params">mid=<xsl:value-of select="/page/message/msg_id"/>&pid=<xsl:value-of select="../../../../part_id"/></xsl:with-param>
       <xsl:with-param name="img"><xsl:call-template name="handler_action"/></xsl:with-param>
diff --git a/appsrc/ODS-WebMail/xslt/html_parse.xsl b/appsrc/ODS-WebMail/xslt/html_parse.xsl
index 55811a7..687d52f 100644
--- a/appsrc/ODS-WebMail/xslt/html_parse.xsl
+++ b/appsrc/ODS-WebMail/xslt/html_parse.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: html_parse.xsl,v 1.3.2.2 2011/03/08 13:25:12 source Exp $
+ -  $Id: html_parse.xsl,v 1.3.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/html_parse2.xsl b/appsrc/ODS-WebMail/xslt/html_parse2.xsl
index 11a03f6..c6c97e8 100644
--- a/appsrc/ODS-WebMail/xslt/html_parse2.xsl
+++ b/appsrc/ODS-WebMail/xslt/html_parse2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: html_parse2.xsl,v 1.2.2.2 2011/03/08 13:25:12 source Exp $
+ -  $Id: html_parse2.xsl,v 1.2.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/mails.xsl b/appsrc/ODS-WebMail/xslt/mails.xsl
index b1e7b1f..59f1d6c 100644
--- a/appsrc/ODS-WebMail/xslt/mails.xsl
+++ b/appsrc/ODS-WebMail/xslt/mails.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: mails.xsl,v 1.1.2.1 2010/09/20 10:15:45 source Exp $
+ -  $Id: mails.xsl,v 1.1.2.3 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -31,10 +31,46 @@
       <input type="hidden" name="set">
         <xsl:attribute name="value"><xsl:value-of select="set"/></xsl:attribute>
       </input>
-      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content">
+      <input type="hidden" name="return">
+        <xsl:attribute name="value"><xsl:value-of select="return"/></xsl:attribute>
+      </input>
+      <div class="boxHeader">
+        <!--
+        <b>Show</b>
+        <xsl:call-template name="make_select">
+          <xsl:with-param name="name">where</xsl:with-param>
+          <xsl:with-param name="id">where</xsl:with-param>
+          <xsl:with-param name="selected"><xsl:value-of select="where" /></xsl:with-param>
+          <xsl:with-param name="list">1:Local contacts;2:LOD contacts;</xsl:with-param>
+          <xsl:with-param name="onchange">javascript: whatLabelChange(this); </xsl:with-param>
+        </xsl:call-template>
+        |
+        -->
+        <label>
+	        <xsl:call-template name="make_checkbox">
+	          <xsl:with-param name="name">certificate</xsl:with-param>
+	          <xsl:with-param name="value">1</xsl:with-param>
+	          <xsl:with-param name="checked"><xsl:if test="certificate = 1">1</xsl:if></xsl:with-param>
+	        </xsl:call-template>
+          With certificate
+        </label>
+        |
+        <b>
+          <span id="whatLabel">
+            <xsl:choose><xsl:when test="./where = 1">Name</xsl:when><xsl:otherwise>Mail</xsl:otherwise></xsl:choose>
+          </span>
+        </b>
+         
+        <input type="text" name="what" size="20">
+          <xsl:attribute name="value"><xsl:value-of select="what"/></xsl:attribute>
+        </input>
+         
+        <input type="submit" value="Filter" class="button" />
+      </div>
+      <table class="ODS_grid">
         <thead>
           <tr>
-            <th style="text-align: center; padding: 0;" width="1%">
+            <th class="checkbox">
               <input type="checkbox" name="cb_all" value="Select All" onclick="selectAllCheckboxes(this, 'cb_item'); "/>
             </th>
             <th>
@@ -46,12 +82,23 @@
           </tr>
         </thead>
         <tbody>
+          <xsl:choose>
+            <xsl:when test="count(mails/mail) > 0">
           <xsl:apply-templates select="mails" />
+            </xsl:when>
+            <xsl:otherwise>
+              <tr>
+                <td colspan="3">
+                  No contacts founded
+                </td>
+              </tr>
+            </xsl:otherwise>
+          </xsl:choose>
         </tbody>
       </table>
       <div style="padding: 0 0 0.5em 0;">
         <hr />
-        <a href="#" onclick="javascript: addChecked(document.forms['f1'], 'cb_item', 'No contacts were selected for addition.');" class="button2">Add selected</a>
+        <a href="#" onclick="javascript: return addChecked(document.forms['f1'], 'cb_item', 'No contacts were selected for addition.');" class="navi-button">Add selected</a>
       </div>
     </form>
   </xsl:template>
@@ -59,10 +106,18 @@
   <xsl:template match="mails">
     <xsl:for-each select="mail">
       <tr>
-        <td align="center">
+        <td class="checkbox">
           <input type="checkbox" name="cb_item">
             <xsl:attribute name="value"><xsl:value-of select="email"/></xsl:attribute>
           </input>
+          <xsl:if test="certificate/modulus != ''">
+            <input type="hidden">
+              <xsl:attribute name="value"><xsl:value-of select="certificate/modulus"/></xsl:attribute>
+            </input>
+            <input type="hidden">
+              <xsl:attribute name="value"><xsl:value-of select="certificate/public_exponent"/></xsl:attribute>
+            </input>
+          </xsl:if>
         </td>
         <td>
           <xsl:value-of select="name"/>
diff --git a/appsrc/ODS-WebMail/xslt/open.xsl b/appsrc/ODS-WebMail/xslt/open.xsl
index edab24d..c966419 100644
--- a/appsrc/ODS-WebMail/xslt/open.xsl
+++ b/appsrc/ODS-WebMail/xslt/open.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: open.xsl,v 1.11.2.6 2011/01/25 14:12:06 source Exp $
+ -  $Id: open.xsl,v 1.11.2.7 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/search.xsl b/appsrc/ODS-WebMail/xslt/search.xsl
index 6cc2018..f6dbeef 100644
--- a/appsrc/ODS-WebMail/xslt/search.xsl
+++ b/appsrc/ODS-WebMail/xslt/search.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.xsl,v 1.6.2.7 2010/09/20 10:15:45 source Exp $
+ -  $Id: search.xsl,v 1.6.2.8 2012/03/08 10:46:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/sendok.xsl b/appsrc/ODS-WebMail/xslt/sendok.xsl
index fcd36dd..a00bfb2 100644
--- a/appsrc/ODS-WebMail/xslt/sendok.xsl
+++ b/appsrc/ODS-WebMail/xslt/sendok.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sendok.xsl,v 1.2.2.1 2010/09/20 10:15:45 source Exp $
+ -  $Id: sendok.xsl,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/set_mail.xsl b/appsrc/ODS-WebMail/xslt/set_mail.xsl
index dffd15d..fb99121 100644
--- a/appsrc/ODS-WebMail/xslt/set_mail.xsl
+++ b/appsrc/ODS-WebMail/xslt/set_mail.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: set_mail.xsl,v 1.9.2.4 2010/11/09 20:12:59 source Exp $
+ -  $Id: set_mail.xsl,v 1.9.2.7 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -83,12 +83,30 @@
     <xsl:apply-templates select="spam"/>
     <tr>
       <th style="background-color: #EAEAEE;" />
-      <th style="background-color: #EAEAEE; text-align: left;">Security</th>
+      <th style="background-color: #EAEAEE; text-align: left;">Digitaly Signing</th>
     </tr>
+    <xsl:choose>
+      <xsl:when test="count(//certificates/certificate) > 0">
     <xsl:apply-templates select="security_sign"/>
     <xsl:apply-templates select="security_sign_mode"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="noCertificates" />
+      </xsl:otherwise>
+    </xsl:choose>
+    <tr>
+      <th style="background-color: #EAEAEE;" />
+      <th style="background-color: #EAEAEE; text-align: left;">Encryption</th>
+    </tr>
+    <xsl:choose>
+      <xsl:when test="count(//certificates/certificate) > 0">
     <xsl:apply-templates select="security_encrypt"/>
     <xsl:apply-templates select="security_encrypt_mode"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="noCertificates" />
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
   <!-- ====================================================================================== -->
   <xsl:template match="msg_name">
@@ -326,9 +344,9 @@
   <!-- ====================================================================================== -->
   <xsl:template match="security_sign">
     <tr>
-      <th>Digitally signing (with certificate)</th>
+      <th nowrap="nowrap">Use this certificate to digitally sign messages you send</th>
       <td>
-        <select name="security_sign">
+        <select name="security_sign" onchange="toggleDisabled(this, ['security_sign_mode']);">
           <option></option>
           <xsl:apply-templates select="certificates/certificate" />
         </select>
@@ -343,8 +361,10 @@
         <label>
           <xsl:call-template name="make_checkbox">
             <xsl:with-param name="name">security_sign_mode</xsl:with-param>
+            <xsl:with-param name="id">security_sign_mode</xsl:with-param>
             <xsl:with-param name="value">1</xsl:with-param>
             <xsl:with-param name="checked"><xsl:if test=". = 1">1</xsl:if></xsl:with-param>
+            <xsl:with-param name="disabled"><xsl:if test="count(../security_sign/certificates/certificate[@selected]) = 0">1</xsl:if></xsl:with-param>
           </xsl:call-template>
           Digitally sign messages (by default)
         </label>
@@ -354,9 +374,9 @@
   <!-- ====================================================================================== -->
   <xsl:template match="security_encrypt">
     <tr>
-      <th>Encryption (with certificate)</th>
+      <th nowrap="nowrap">Use this certificate to encrypt/decript messages sent to you</th>
       <td>
-        <select name="security_encrypt">
+        <select name="security_encrypt" onchange="toggleDisabled(this, ['security_encrypt_mode_0', 'security_encrypt_mode_1']);">
           <option></option>
           <xsl:apply-templates select="certificates/certificate" />
         </select>
@@ -366,24 +386,34 @@
   <!-- ====================================================================================== -->
   <xsl:template match="security_encrypt_mode">
     <tr>
-      <th></th>
+      <th nowrap="nowrap">Default encryption setting when sending messages</th>
       <td>
         <label>
-          <input type="radio" name="security_encrypt_mode" value="0">
+          <input type="radio" id="security_encrypt_mode_0" name="security_encrypt_mode" value="0">
             <xsl:if test="../security_encrypt_mode = 0">
               <xsl:attribute name="checked"/>
             </xsl:if>
+            <xsl:if test="count(../security_encrypt/certificates/certificate[@selected]) = 0">
+              <xsl:attribute name="disabled" />
+            </xsl:if>
           </input>
   			  Never (do not use encryption)
   	    </label>
-  	    <br />
+      </td>
+    </tr>
+    <tr>
+      <th></th>
+      <td>
         <label>
-          <input type="radio" name="security_encrypt_mode" value="1">
+          <input type="radio" id="security_encrypt_mode_1" name="security_encrypt_mode" value="1">
             <xsl:if test="../security_encrypt_mode = 1">
               <xsl:attribute name="checked"/>
             </xsl:if>
+            <xsl:if test="count(../security_encrypt/certificates/certificate[@selected]) = 0">
+              <xsl:attribute name="disabled" />
+            </xsl:if>
           </input>
-  			  Required (can't send message unless all recipeints have certificates)
+  			  Required (can't send message unless all recipients have certificates)
   	    </label>
       </td>
     </tr>
@@ -399,4 +429,13 @@
     <xsl:apply-templates select="certificates/certificate" />
   </xsl:template>
   <!-- ====================================================================================== -->
+  <xsl:template name="noCertificates">
+    <tr>
+      <th></th>
+      <td class="error_text">
+        Please import/create first your private certificate(s) with user's profile to use this feature.
+      </td>
+    </tr>
+  </xsl:template>
+  <!-- ====================================================================================== -->
 </xsl:stylesheet>
diff --git a/appsrc/ODS-WebMail/xslt/tools.xsl b/appsrc/ODS-WebMail/xslt/tools.xsl
index 8b888ba..a5393ae 100644
--- a/appsrc/ODS-WebMail/xslt/tools.xsl
+++ b/appsrc/ODS-WebMail/xslt/tools.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tools.xsl,v 1.2.2.3 2010/09/20 10:15:45 source Exp $
+ -  $Id: tools.xsl,v 1.2.2.4 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-WebMail/xslt/write.xsl b/appsrc/ODS-WebMail/xslt/write.xsl
index d880e68..720224d 100644
--- a/appsrc/ODS-WebMail/xslt/write.xsl
+++ b/appsrc/ODS-WebMail/xslt/write.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: write.xsl,v 1.8.2.6 2010/11/09 20:12:59 source Exp $
+ -  $Id: write.xsl,v 1.8.2.8 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -106,6 +106,7 @@
         <xsl:attribute name="value"><xsl:value-of select="string(//save_copy)"/></xsl:attribute>
       </input>
       <xsl:apply-templates select="message/eparams"/>
+      <xsl:apply-templates select="message/options/certificates/certificate"/>
       <xsl:call-template name="write_form"/>
     </form>
   </xsl:template>
@@ -179,7 +180,7 @@
             <xsl:attribute name="value"><xsl:apply-templates select="message/address/addres_list/to"/></xsl:attribute>
           </input>
           <xsl:call-template name="nbsp"/>
-          <input type="button" value="Select" onclick="javascript: windowShow('mails.vsp?set=to')" class="button" />
+          <input type="button" value="Select" onclick="javascript: mailsShow('mails.vsp?set=to')" class="button" />
         </td>
       </tr>
       <tr id="row_cc" style="display: none;">
@@ -191,7 +192,7 @@
             <xsl:attribute name="value"><xsl:apply-templates select="message/address/addres_list/cc"/></xsl:attribute>
           </input>
           <xsl:call-template name="nbsp"/>
-          <input type="button" value="Select" onclick="javascript: windowShow('mails.vsp?set=cc')" class="button" />
+          <input type="button" value="Select" onclick="javascript: mailsShow('mails.vsp?set=cc')" class="button" />
         </td>
       </tr>
       <tr id="row_bcc" style="display: none;">
@@ -203,7 +204,7 @@
             <xsl:attribute name="value"><xsl:apply-templates select="message/address/addres_list/bcc"/></xsl:attribute>
           </input>
           <xsl:call-template name="nbsp"/>
-          <input type="button" value="Select" onclick="javascript: windowShow('mails.vsp?set=bcc')" class="button" />
+          <input type="button" value="Select" onclick="javascript: mailsShow('mails.vsp?set=bcc')" class="button" />
         </td>
       </tr>
       <xsl:if test="//conversation = 1">
@@ -298,10 +299,10 @@
           </input>
             Save copy in "Sent" folder
           </label>
-          <xsl:if test="//security_sign_mode = 1">
+          <xsl:if test="//security_sign != ''">
             |
             <label>
-              <input type="checkbox" name="ssign" value="1">
+              <input type="checkbox" name="ssign" id="ssign" value="1">
                 <xsl:choose>
                   <xsl:when test="message/options/securitySign">
                     <xsl:if test="message/options/securitySign = 1">
@@ -309,17 +310,19 @@
                     </xsl:if>
                   </xsl:when>
                   <xsl:otherwise>
+                    <xsl:if test="//security_sign_mode = 1">
                     <xsl:attribute name="checked">checked</xsl:attribute>
+                    </xsl:if>
                   </xsl:otherwise>
                 </xsl:choose>
               </input>
               Digitally sign
             </label>
           </xsl:if>
-          <xsl:if test="//security_encrypt_mode = 1">
+          <xsl:if test="//security_encrypt != ''">
             |
             <label>
-              <input type="checkbox" name="sencrypt" value="1">
+              <input type="checkbox" name="sencrypt" id="sencrypt" value="1">
                 <xsl:choose>
                   <xsl:when test="message/options/securityEncrypt">
                     <xsl:if test="message/options/securityEncrypt = 1">
@@ -327,7 +330,9 @@
                     </xsl:if>
                   </xsl:when>
                   <xsl:otherwise>
+                    <xsl:if test="//security_encrypt_mode = 1">
                     <xsl:attribute name="checked">checked</xsl:attribute>
+                    </xsl:if>
                   </xsl:otherwise>
                 </xsl:choose>
               </input>
@@ -510,4 +515,17 @@ Sent: <xsl:value-of select="rcv_date"/>
     </xsl:if>
   </xsl:template>
   <!-- ====================================================================================== -->
+  <xsl:template match="certificate">
+    <input type="hidden">
+      <xsl:attribute name="name">modulus_<xsl:value-of select="./mail"/></xsl:attribute>
+      <xsl:attribute name="id">modulus_<xsl:value-of select="./mail"/></xsl:attribute>
+      <xsl:attribute name="value"><xsl:value-of select="./modulus"/></xsl:attribute>
+    </input>
+    <input type="hidden">
+      <xsl:attribute name="name">public_exponent_<xsl:value-of select="./mail"/></xsl:attribute>
+      <xsl:attribute name="id">public_exponent_<xsl:value-of select="./mail"/></xsl:attribute>
+      <xsl:attribute name="value"><xsl:value-of select="./public_exponent"/></xsl:attribute>
+    </input>
+  </xsl:template>
+  <!-- ====================================================================================== -->
 </xsl:stylesheet>
diff --git a/appsrc/ODS-Wiki/Makefile.am b/appsrc/ODS-Wiki/Makefile.am
index a491046..04c6c3e 100644
--- a/appsrc/ODS-Wiki/Makefile.am
+++ b/appsrc/ODS-Wiki/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -77,6 +77,4 @@ EXTRA_DIST =  \
 	Skins/default/*.png \
 	Skins/default/*.xslt \
 	Template/*.txt \
-	version.base \
-	version.curr \
 	vad_version
diff --git a/appsrc/ODS-Wiki/Makefile.in b/appsrc/ODS-Wiki/Makefile.in
index 1407247..a0b459e 100644
--- a/appsrc/ODS-Wiki/Makefile.in
+++ b/appsrc/ODS-Wiki/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -163,6 +163,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -211,6 +212,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -262,6 +264,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -308,7 +311,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -379,8 +381,6 @@ EXTRA_DIST = \
 	Skins/default/*.png \
 	Skins/default/*.xslt \
 	Template/*.txt \
-	version.base \
-	version.curr \
 	vad_version
 
 all: all-recursive
diff --git a/appsrc/ODS-Wiki/Skins/default/PostProcess.xslt b/appsrc/ODS-Wiki/Skins/default/PostProcess.xslt
index 7355730..387d4da 100644
--- a/appsrc/ODS-Wiki/Skins/default/PostProcess.xslt
+++ b/appsrc/ODS-Wiki/Skins/default/PostProcess.xslt
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,7 +28,7 @@
                 xmlns:wv="http://www.openlinksw.com/Virtuoso/WikiV/"
                 xmlns:fn2="http://www.w3.org/2004/07/xpath-functions">
 
-<!-- $Id: PostProcess.xslt,v 1.20.2.1 2010/09/20 10:15:48 source Exp $ -->
+<!-- $Id: PostProcess.xslt,v 1.20.2.3 2012/03/08 10:46:22 source Exp $ -->
 
   <xsl:output
     method="html"
@@ -80,7 +80,7 @@
       <link rel="alternate"
             type="application/atomserv+xml"
             href="{wv:atom_pub_uri($ti_cluster_name)}/intro"/>
-
+      <xsl:value-of select="wv:rdfLinksHead($ti_cluster_name, $ti_local_name)" disable-output-escaping="yes" />
 	<xsl:copy-of select="$ods-app"/>
     </head>
       <body>
diff --git a/appsrc/ODS-Wiki/Skins/default/default.css b/appsrc/ODS-Wiki/Skins/default/default.css
index fb5ce7d..418f8b0 100644
--- a/appsrc/ODS-Wiki/Skins/default/default.css
+++ b/appsrc/ODS-Wiki/Skins/default/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.9.2.7 2011/03/26 14:21:52 source Exp $
+ *  $Id: default.css,v 1.9.2.9 2012/03/08 10:46:22 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -943,6 +943,7 @@ div.working-area
   height: 500px;
   margin-bottom: 5px;
   width: 100%;
+  font-family: monospace;
 }
 #page_help_ctr
 {
diff --git a/appsrc/ODS-Wiki/atom.sql b/appsrc/ODS-Wiki/atom.sql
index a5d5be6..522cc6f 100644
--- a/appsrc/ODS-Wiki/atom.sql
+++ b/appsrc/ODS-Wiki/atom.sql
@@ -1,14 +1,14 @@
 --
 --  atom.sql
 --
---  $Id: atom.sql,v 1.9.2.7 2011/03/26 14:21:51 source Exp $
+--  $Id: atom.sql,v 1.9.2.8 2012/03/08 10:46:22 source Exp $
 --
 --  Atom publishing protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/conv.sql b/appsrc/ODS-Wiki/conv.sql
index 068f4c1..3b91bbf 100644
--- a/appsrc/ODS-Wiki/conv.sql
+++ b/appsrc/ODS-Wiki/conv.sql
@@ -1,10 +1,10 @@
 --
---  $Id: conv.sql,v 1.10.2.1 2010/09/20 10:15:46 source Exp $
+--  $Id: conv.sql,v 1.10.2.2 2012/03/08 10:46:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/drop.sql b/appsrc/ODS-Wiki/drop.sql
index 2523de5..4de4f5c 100644
--- a/appsrc/ODS-Wiki/drop.sql
+++ b/appsrc/ODS-Wiki/drop.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: drop.sql,v 1.16.2.2 2011/01/31 11:17:53 source Exp $
+--  $Id: drop.sql,v 1.16.2.5 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -67,6 +67,7 @@ xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:TextFormattingR
 xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:UserByEmail', 'WV.WIKI.USER_BY_EMAIL');
 xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:atom_pub_uri', 'WV.WIKI.ATOM_PUB_URI');
 xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:collect_pairs', 'WV.WIKI.COLLECT_PAIRS');
+xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:rdfLinksHead', 'WV.WIKI.RDF_LINKS_HEAD');
 xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:email_obfuscate', 'WV.WIKI.EMAIL_OBFUSCATE');
 xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:expandWikiText', 'WV.WIKI.EXPAND_WIKI_TEXT');
 xpf_extension_remove ('http://www.openlinksw.com/Virtuoso/WikiV/:funcall0', 'WV.WIKI.FUNCALL0');
@@ -181,7 +182,9 @@ DB.DBA.VHOST_REMOVE(lpath=>'/wiki/wikix');
 DB.DBA.VHOST_REMOVE(lpath=>'/wikiview');
 DB.DBA.VHOST_REMOVE(lpath=>'/DAV/wikiview');
 
+-- Registry
 registry_remove('wiki default uri');
+registry_remove('wiki_services_update');
 
 -- NNTP
 DROP procedure DB.DBA.oWiki_NEWS_MSG_I;
diff --git a/appsrc/ODS-Wiki/export.sql b/appsrc/ODS-Wiki/export.sql
index febd8c6..cb0991a 100644
--- a/appsrc/ODS-Wiki/export.sql
+++ b/appsrc/ODS-Wiki/export.sql
@@ -1,10 +1,10 @@
 --
---  $Id: export.sql,v 1.8.2.1 2010/09/20 10:15:46 source Exp $
+--  $Id: export.sql,v 1.8.2.2 2012/03/08 10:46:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/generate_drop_proc.sh b/appsrc/ODS-Wiki/generate_drop_proc.sh
index 8110367..2fe1991 100755
--- a/appsrc/ODS-Wiki/generate_drop_proc.sh
+++ b/appsrc/ODS-Wiki/generate_drop_proc.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: generate_drop_proc.sh,v 1.3.2.2 2010/09/20 10:15:46 source Exp $
+#  $Id: generate_drop_proc.sh,v 1.3.2.3 2012/03/08 10:46:22 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/HTMLtoWiki.xslt b/appsrc/ODS-Wiki/http/HTMLtoWiki.xslt
index 2912633..7c7f234 100644
--- a/appsrc/ODS-Wiki/http/HTMLtoWiki.xslt
+++ b/appsrc/ODS-Wiki/http/HTMLtoWiki.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: HTMLtoWiki.xslt,v 1.2.2.1 2010/09/20 10:15:48 source Exp $
+ -  $Id: HTMLtoWiki.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspAttachmentDeleteConfirm.xslt b/appsrc/ODS-Wiki/http/VspAttachmentDeleteConfirm.xslt
index 804cf8e..8d0b859 100644
--- a/appsrc/ODS-Wiki/http/VspAttachmentDeleteConfirm.xslt
+++ b/appsrc/ODS-Wiki/http/VspAttachmentDeleteConfirm.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspAttachmentDeleteConfirm.xslt,v 1.2.2.1 2010/09/20 10:15:48 source Exp $
+ -  $Id: VspAttachmentDeleteConfirm.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspChangeLog.xslt b/appsrc/ODS-Wiki/http/VspChangeLog.xslt
index f31f80f..177ca56 100644
--- a/appsrc/ODS-Wiki/http/VspChangeLog.xslt
+++ b/appsrc/ODS-Wiki/http/VspChangeLog.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspChangeLog.xslt,v 1.3.2.1 2010/09/20 10:15:48 source Exp $
+ -  $Id: VspChangeLog.xslt,v 1.3.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspMail.xslt b/appsrc/ODS-Wiki/http/VspMail.xslt
index b2a0cc2..ab3e220 100644
--- a/appsrc/ODS-Wiki/http/VspMail.xslt
+++ b/appsrc/ODS-Wiki/http/VspMail.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspMail.xslt,v 1.2.2.1 2010/09/20 10:15:48 source Exp $
+ -  $Id: VspMail.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspNoteCompile.xslt b/appsrc/ODS-Wiki/http/VspNoteCompile.xslt
index a3e0aaa..1d5cc57 100644
--- a/appsrc/ODS-Wiki/http/VspNoteCompile.xslt
+++ b/appsrc/ODS-Wiki/http/VspNoteCompile.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspNoteCompile.xslt,v 1.2.2.1 2010/09/20 10:15:48 source Exp $
+ -  $Id: VspNoteCompile.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspReportError.xslt b/appsrc/ODS-Wiki/http/VspReportError.xslt
index faf37ed..806f6bf 100644
--- a/appsrc/ODS-Wiki/http/VspReportError.xslt
+++ b/appsrc/ODS-Wiki/http/VspReportError.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspReportError.xslt,v 1.4.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspReportError.xslt,v 1.4.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspSearch.xslt b/appsrc/ODS-Wiki/http/VspSearch.xslt
index f1e050a..a5aa78e 100644
--- a/appsrc/ODS-Wiki/http/VspSearch.xslt
+++ b/appsrc/ODS-Wiki/http/VspSearch.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspSearch.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspSearch.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicAttach.xslt b/appsrc/ODS-Wiki/http/VspTopicAttach.xslt
index 986ecbf..2981575 100644
--- a/appsrc/ODS-Wiki/http/VspTopicAttach.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicAttach.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicAttach.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicAttach.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicAttachManage.xslt b/appsrc/ODS-Wiki/http/VspTopicAttachManage.xslt
index 9fb4b00..d995eec 100644
--- a/appsrc/ODS-Wiki/http/VspTopicAttachManage.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicAttachManage.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicAttachManage.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicAttachManage.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicCreate.xslt b/appsrc/ODS-Wiki/http/VspTopicCreate.xslt
index 272023e..2541420 100644
--- a/appsrc/ODS-Wiki/http/VspTopicCreate.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicCreate.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicCreate.xslt,v 1.3.2.2 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicCreate.xslt,v 1.3.2.3 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicDelete.xslt b/appsrc/ODS-Wiki/http/VspTopicDelete.xslt
index 7866055..d5bf97a 100644
--- a/appsrc/ODS-Wiki/http/VspTopicDelete.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicDelete.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicDelete.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicDelete.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicEdit.xslt b/appsrc/ODS-Wiki/http/VspTopicEdit.xslt
index 2c10952..aec720d 100644
--- a/appsrc/ODS-Wiki/http/VspTopicEdit.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicEdit.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicEdit.xslt,v 1.2.2.2 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicEdit.xslt,v 1.2.2.3 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicHistory.xslt b/appsrc/ODS-Wiki/http/VspTopicHistory.xslt
index 79ed5a8..c4af8db 100644
--- a/appsrc/ODS-Wiki/http/VspTopicHistory.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicHistory.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicHistory.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicHistory.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicMoreOps.xslt b/appsrc/ODS-Wiki/http/VspTopicMoreOps.xslt
index f75e558..4cb35b9 100644
--- a/appsrc/ODS-Wiki/http/VspTopicMoreOps.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicMoreOps.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicMoreOps.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicMoreOps.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicRename.xslt b/appsrc/ODS-Wiki/http/VspTopicRename.xslt
index 3ed769f..d58dcd3 100644
--- a/appsrc/ODS-Wiki/http/VspTopicRename.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicRename.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicRename.xslt,v 1.2.2.1 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicRename.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicReports.xslt b/appsrc/ODS-Wiki/http/VspTopicReports.xslt
index 752229e..3a9a70e 100644
--- a/appsrc/ODS-Wiki/http/VspTopicReports.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicReports.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicReports.xslt,v 1.3.2.4 2011/01/05 14:01:13 source Exp $
+ -  $Id: VspTopicReports.xslt,v 1.3.2.5 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/VspTopicView.xslt b/appsrc/ODS-Wiki/http/VspTopicView.xslt
index 4c7d184..dacac2e 100644
--- a/appsrc/ODS-Wiki/http/VspTopicView.xslt
+++ b/appsrc/ODS-Wiki/http/VspTopicView.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: VspTopicView.xslt,v 1.21.2.2 2010/09/20 10:15:49 source Exp $
+ -  $Id: VspTopicView.xslt,v 1.21.2.3 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/XmlAtomFeed.xslt b/appsrc/ODS-Wiki/http/XmlAtomFeed.xslt
index b6eeee7..737c8f2 100644
--- a/appsrc/ODS-Wiki/http/XmlAtomFeed.xslt
+++ b/appsrc/ODS-Wiki/http/XmlAtomFeed.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: XmlAtomFeed.xslt,v 1.3.2.3 2011/02/03 10:26:17 source Exp $
+ -  $Id: XmlAtomFeed.xslt,v 1.3.2.5 2012/03/08 10:49:48 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -41,7 +41,7 @@
      <title >oWiki <xsl:value-of select="@cluster"/> Weblog</title>
     </xsl:if>
     <link  rel="alternate"><xsl:value-of select="@home"/></link>
-    <copyright >Copyright (c) 1998-2011, OpenLink Software</copyright>
+    <copyright >Copyright (c) 1998-2012, OpenLink Software</copyright>
     <author >
       <name><xsl:value-of select="@name"/></name>
       <email><xsl:value-of select="@email"/></email>
diff --git a/appsrc/ODS-Wiki/http/XmlRDFFeed.xslt b/appsrc/ODS-Wiki/http/XmlRDFFeed.xslt
index bff9695..35c1d13 100644
--- a/appsrc/ODS-Wiki/http/XmlRDFFeed.xslt
+++ b/appsrc/ODS-Wiki/http/XmlRDFFeed.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: XmlRDFFeed.xslt,v 1.2.2.1 2010/09/20 10:15:50 source Exp $
+ -  $Id: XmlRDFFeed.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/XmlRssFeed.xslt b/appsrc/ODS-Wiki/http/XmlRssFeed.xslt
index 7544d48..6535ddd 100644
--- a/appsrc/ODS-Wiki/http/XmlRssFeed.xslt
+++ b/appsrc/ODS-Wiki/http/XmlRssFeed.xslt
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: XmlRssFeed.xslt,v 1.2.2.1 2010/09/20 10:15:50 source Exp $
+ -  $Id: XmlRssFeed.xslt,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/advanced_search.vspx b/appsrc/ODS-Wiki/http/advanced_search.vspx
index d93a170..bb986d9 100644
--- a/appsrc/ODS-Wiki/http/advanced_search.vspx
+++ b/appsrc/ODS-Wiki/http/advanced_search.vspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -23,7 +23,7 @@
 <?vsp WV.WIKI.VSPHEADER (path,params,lines, 'Advanced Search');
 
 ?>
-<!-- $Id: advanced_search.vspx,v 1.15.2.2 2010/09/20 10:15:50 source Exp $ -->
+<!-- $Id: advanced_search.vspx,v 1.15.2.3 2012/03/08 10:46:22 source Exp $ -->
  <v:page name="main" 
 	style="comp.xsl" 
 	on-error-redirect="../main/" 
diff --git a/appsrc/ODS-Wiki/http/attachment.vsp b/appsrc/ODS-Wiki/http/attachment.vsp
index 3ffe8e8..5445f90 100644
--- a/appsrc/ODS-Wiki/http/attachment.vsp
+++ b/appsrc/ODS-Wiki/http/attachment.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: attachment.vsp,v 1.1.2.1 2010/09/20 10:15:50 source Exp $
+--  $Id: attachment.vsp,v 1.1.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/common.css b/appsrc/ODS-Wiki/http/common.css
index a6a3bd5..05f5240 100644
--- a/appsrc/ODS-Wiki/http/common.css
+++ b/appsrc/ODS-Wiki/http/common.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: common.css,v 1.6.2.1 2010/09/20 10:15:50 source Exp $
+ *  $Id: common.css,v 1.6.2.2 2012/03/08 10:46:22 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/common.xsl b/appsrc/ODS-Wiki/http/common.xsl
index d6869e9..af50e34 100644
--- a/appsrc/ODS-Wiki/http/common.xsl
+++ b/appsrc/ODS-Wiki/http/common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: common.xsl,v 1.14.2.3 2011/01/25 14:13:52 source Exp $
+ -  $Id: common.xsl,v 1.14.2.4 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/comp.xsl b/appsrc/ODS-Wiki/http/comp.xsl
index ac7792a..8de3aff 100644
--- a/appsrc/ODS-Wiki/http/comp.xsl
+++ b/appsrc/ODS-Wiki/http/comp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: comp.xsl,v 1.14.2.1 2010/09/20 10:15:50 source Exp $
+ -  $Id: comp.xsl,v 1.14.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/conversation.vspx b/appsrc/ODS-Wiki/http/conversation.vspx
index 7b0c977..0a80a5f 100644
--- a/appsrc/ODS-Wiki/http/conversation.vspx
+++ b/appsrc/ODS-Wiki/http/conversation.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?> 
 <!--  
  -
- -  $Id: conversation.vspx,v 1.10.2.1 2010/09/20 10:15:50 source Exp $
+ -  $Id: conversation.vspx,v 1.10.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/default.css b/appsrc/ODS-Wiki/http/default.css
index e385e95..f54c7de 100644
--- a/appsrc/ODS-Wiki/http/default.css
+++ b/appsrc/ODS-Wiki/http/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2.2.1 2010/09/20 10:15:50 source Exp $
+ *  $Id: default.css,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/export.vspx b/appsrc/ODS-Wiki/http/export.vspx
index c7e5b7b..3261a86 100644
--- a/appsrc/ODS-Wiki/http/export.vspx
+++ b/appsrc/ODS-Wiki/http/export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: export.vspx,v 1.7.2.1 2010/09/20 10:15:51 source Exp $
+ -  $Id: export.vspx,v 1.7.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/export.xsl b/appsrc/ODS-Wiki/http/export.xsl
index ae6efc8..083c12e 100644
--- a/appsrc/ODS-Wiki/http/export.xsl
+++ b/appsrc/ODS-Wiki/http/export.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: export.xsl,v 1.2.2.1 2010/09/20 10:15:51 source Exp $
+ -  $Id: export.xsl,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/fault.vspx b/appsrc/ODS-Wiki/http/fault.vspx
index a66a7dd..85bc43c 100644
--- a/appsrc/ODS-Wiki/http/fault.vspx
+++ b/appsrc/ODS-Wiki/http/fault.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: fault.vspx,v 1.1.2.1 2010/09/20 10:15:51 source Exp $
+ -  $Id: fault.vspx,v 1.1.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/gems.vsp b/appsrc/ODS-Wiki/http/gems.vsp
index 40714c4..2b41e6d 100644
--- a/appsrc/ODS-Wiki/http/gems.vsp
+++ b/appsrc/ODS-Wiki/http/gems.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: gems.vsp,v 1.10.2.1 2010/09/20 10:15:51 source Exp $
+--  $Id: gems.vsp,v 1.10.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/history.vspx b/appsrc/ODS-Wiki/http/history.vspx
index 32b9189..7a02d4d 100644
--- a/appsrc/ODS-Wiki/http/history.vspx
+++ b/appsrc/ODS-Wiki/http/history.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: history.vspx,v 1.6.2.2 2010/09/20 10:15:51 source Exp $
+ -  $Id: history.vspx,v 1.6.2.3 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/html2docbook.xsl b/appsrc/ODS-Wiki/http/html2docbook.xsl
index a16b641..8f1a283 100644
--- a/appsrc/ODS-Wiki/http/html2docbook.xsl
+++ b/appsrc/ODS-Wiki/http/html2docbook.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?> 
 <!--  
  -
- -  $Id: html2docbook.xsl,v 1.6.2.1 2010/09/20 10:15:51 source Exp $
+ -  $Id: html2docbook.xsl,v 1.6.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/login.vsp b/appsrc/ODS-Wiki/http/login.vsp
index 53de825..4b87aa8 100644
--- a/appsrc/ODS-Wiki/http/login.vsp
+++ b/appsrc/ODS-Wiki/http/login.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: login.vsp,v 1.5.2.1 2010/09/20 10:15:51 source Exp $
+--  $Id: login.vsp,v 1.5.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/login.vspx b/appsrc/ODS-Wiki/http/login.vspx
index 0a7977c..12b66d6 100644
--- a/appsrc/ODS-Wiki/http/login.vspx
+++ b/appsrc/ODS-Wiki/http/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: login.vspx,v 1.4.2.1 2010/09/20 10:15:51 source Exp $
+ -  $Id: login.vspx,v 1.4.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/macros.xml b/appsrc/ODS-Wiki/http/macros.xml
index 3b032c1..43aaccf 100644
--- a/appsrc/ODS-Wiki/http/macros.xml
+++ b/appsrc/ODS-Wiki/http/macros.xml
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: macros.xml,v 1.2.2.1 2010/09/20 10:15:51 source Exp $
+ -  $Id: macros.xml,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/main.vsp b/appsrc/ODS-Wiki/http/main.vsp
index a4acccf..b550a0c 100644
--- a/appsrc/ODS-Wiki/http/main.vsp
+++ b/appsrc/ODS-Wiki/http/main.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: main.vsp,v 1.26.2.5 2011/03/26 14:21:52 source Exp $
+--  $Id: main.vsp,v 1.26.2.10 2012/03/08 10:49:48 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,7 @@
   declare _sid, _realm, _user varchar;
   declare cookie_vec any;
   declare _parent varchar;
+  declare _filename varchar;
 
   _parent := get_keyword ('parent', params, '');
   if (_parent <> '')
@@ -155,7 +156,7 @@ again:
   declare deadlock_cnt int;
   deadlock_cnt := 5;
  
-  declare exit handler for sqlstate '*', not found {
+  declare exit handler for sqlstate '*', NOT FOUND {
 major_exit_handler:
 	  if ( (__SQL_STATE = '42001') and (deadlock_cnt > 0))
 	    {
@@ -312,16 +313,15 @@ cont:
 	  goto major_exit_handler;
   	http_rewrite();
         WV.WIKI.redirect (sprintf ('%s/login.vspx?URL=%U',  WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || sprintf ('?command=save&text=%U', _text)));
---        http_request_status ('HTTP/1.1 302 Found');
---        http_header (http_header_get() || sprintf('Location: %s/login.vspx?URL=%U\r\n',  WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || sprintf ('?command=save&text=%U', _text)));
         return;
       };
 
-      declare _filename, _retval any;
+      declare _retval any;
+
       _text := coalesce(_text, '');
-      if (length (_text) > 0)
-        if (_text[length (_text)-1] = ascii('\n'))
+      if ((length (_text) > 0) and (_text[length (_text)-1] = ascii('\n')))
           _text := subseq(_text, 0, length (_text)- 2);
+
       _text := WV.WIKI.DELETE_SYSINFO_FOR (_text, NULL);      
       _topic.ti_text := _text;
       _filename := coalesce ((select RES_NAME from WS.WS.SYS_DAV_RES where RES_ID = _topic.ti_res_id), concat (_topic.ti_local_name,'.txt'));
@@ -347,7 +347,8 @@ cont:
     }
   WV.WIKI.VSPHEADER (path,params,lines, _topic, _base_adjust);
 content:
-  if (_error is not null) {
+  if (_error is not null)
+    {
     http ('<div class="error"><span>' || _error || '</span></div>');
   }
   _error := null;
@@ -400,8 +401,6 @@ content:
 	  goto major_exit_handler;
   	http_rewrite();
         WV.WIKI.redirect (sprintf ('%s/login.vspx?URL=%U',  WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || '?command=attach'));
---        http_request_status ('HTTP/1.1 302 Found');
---        http_header (http_header_get() || sprintf('Location: %s/login.vspx?URL=%U\r\n',  WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || '?command=attach'));
         return;
       };
 	WV.WIKI.VSPTOPICATTACH (path, lines, _topic,
@@ -411,7 +410,9 @@ content:
   if (_attachment is not null)
     {
       if (_cmd = 'manage')
+        {
         WV.WIKI.VSPATTACHMENTMANAGE (path, lines, _topic,_attachment, WV.WIKI.MAKE_PARAMS (_user, _uid, params, _base_adjust));
+        }
       else if (_cmd = 'delete')
 	{
 	  if ({?'submit'} = 'Yes')
@@ -451,26 +452,28 @@ content:
 
   if (_cmd = 'edit')
     {
-      declare exit handler for sqlstate '42WV9' {
+      declare exit handler for sqlstate '42WV9'
+      {
 	if (_user <> 'WikiGuest')
 	  goto major_exit_handler;
+
   	http_rewrite();
         WV.WIKI.redirect (sprintf ('%s/login.vspx?URL=%U', WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || '?command=edit&' || _parent));
 --        http_request_status ('HTTP/1.1 302 Found');
 --        http_header (http_header_get() || sprintf('Location: %s/login.vspx?URL=%U\r\n',  WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || '?command=edit&' || _parent));
         return;
       };
-      declare _filename varchar;
       _topic.ti_text := _text;
       _filename := coalesce ((select RES_NAME from WS.WS.SYS_DAV_RES where RES_ID = _topic.ti_res_id), concat (_topic.ti_local_name,'.txt'));
       WV.WIKI.CHECKWRITEACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id, 'Edit is not allowed by owner of this cluster.');
 
-      declare _lock_uid int;
       if (_topic.ti_id = 0)
+        {
         WV.WIKI.VSPTOPICCREATE (path, lines, _cluster, _topic.ti_raw_title, WV.WIKI.MAKE_PARAMS (_user, _uid, params, _base_adjust));
+        }
       else
 	{
-	  if (0 = (_lock_uid := WV.WIKI.GETLOCK (WS.WS.COL_PATH(_topic.ti_col_id) || _filename, _user)))
+          if (0 = WV.WIKI.GETLOCK (WS.WS.COL_PATH(_topic.ti_col_id) || _filename, _user))
             WV.WIKI.VSPTOPICEDIT (path, lines, _topic, WV.WIKI.MAKE_PARAMS (_user, _uid, params, _base_adjust));
 	  else
 		WV.WIKI.APPSIGNAL (11001, 'The resource &path; is locked', vector ('path', WS.WS.COL_PATH(_topic.ti_col_id) || _filename));
@@ -478,7 +481,8 @@ content:
       goto make_footer;
     }
 
-  if (_cmd = 'upstream_now') {
+  if (_cmd = 'upstream_now')
+    {
     declare exit handler for sqlstate '42WV9'
     {
       if (_user <> 'WikiGuest')
@@ -488,25 +492,27 @@ content:
       WV.WIKI.redirect (sprintf('%s/login.vspx?URL=%U', WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || '?command=upstream_now&' || _parent));
       return;
     };
-    declare _filename varchar;
---    _topic.ti_text := _text;
     _filename := coalesce ((select RES_NAME from WS.WS.SYS_DAV_RES where RES_ID = _topic.ti_res_id), concat (_topic.ti_local_name,'.txt'));
     WV.WIKI.CHECKWRITEACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id, 'Upstream is not allowed by owner of this cluster.');
-    declare _lock_uid int;
     if (_topic.ti_id <> 0)
       {
-        if (0 = (_lock_uid := WV.WIKI.GETLOCK (WS.WS.COL_PATH(_topic.ti_col_id) || _filename, _user)))
+          if (0 = WV.WIKI.GETLOCK (WS.WS.COL_PATH(_topic.ti_col_id) || _filename, _user))
         {
           if (WV.WIKI.VSPTOPICVIEW (path, lines, _topic, WV.WIKI.MAKE_PARAMS (_user, _uid, params, _base_adjust)))
             WV.WIKI.VSPFOOTER (path, params, lines);
+
           http_flush();
+              commit work;
+
           WV.WIKI.UPSTREAM_TOPIC_NOW (_topic.ti_id);
           WV.WIKI.RELEASELOCK (WS.WS.COL_PATH(_topic.ti_col_id) || _filename, _user);
           return;
         }
         else
+            {
           WV.WIKI.APPSIGNAL (11001, 'The resource &path; is locked', vector ('path', WS.WS.COL_PATH(_topic.ti_col_id) || _filename));
       }
+        }
       goto make_footer;
     }
 
@@ -588,9 +594,11 @@ content:
     }
 	
 create_or_view:
+
   if (_topic.ti_id = 0)
     {
-      declare exit handler for sqlstate '42WV9' {
+      declare exit handler for sqlstate '42WV9'
+      {
 	if (_user <> 'WikiGuest')
 	  goto major_exit_handler;
 
@@ -606,7 +614,8 @@ create_or_view:
   else
    {
      if (WV.WIKI.VSPTOPICVIEW (path, lines, _topic, WV.WIKI.MAKE_PARAMS (_user, _uid, params, _base_adjust)))
-	   WV.WIKI.VSPFOOTER (path, params, lines);
+        goto make_footer;
+
 	 return;
    }
 make_footer:    
diff --git a/appsrc/ODS-Wiki/http/ops.vspx b/appsrc/ODS-Wiki/http/ops.vspx
index 2e279ad..8095c62 100644
--- a/appsrc/ODS-Wiki/http/ops.vspx
+++ b/appsrc/ODS-Wiki/http/ops.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ops.vspx,v 1.12.2.3 2011/01/25 14:13:52 source Exp $
+ -  $Id: ops.vspx,v 1.12.2.4 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/owiki.css b/appsrc/ODS-Wiki/http/owiki.css
index ba7647d..1ca53ee 100644
--- a/appsrc/ODS-Wiki/http/owiki.css
+++ b/appsrc/ODS-Wiki/http/owiki.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: owiki.css,v 1.3.2.1 2010/09/20 10:15:52 source Exp $
+ *  $Id: owiki.css,v 1.3.2.2 2012/03/08 10:46:22 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/permissions.vspx b/appsrc/ODS-Wiki/http/permissions.vspx
index bbf0ad9..5513ba5 100644
--- a/appsrc/ODS-Wiki/http/permissions.vspx
+++ b/appsrc/ODS-Wiki/http/permissions.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: permissions.vspx,v 1.4.2.1 2010/09/20 10:15:52 source Exp $
+ -  $Id: permissions.vspx,v 1.4.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/redirect.vsp b/appsrc/ODS-Wiki/http/redirect.vsp
index ac8516a..fa81510 100644
--- a/appsrc/ODS-Wiki/http/redirect.vsp
+++ b/appsrc/ODS-Wiki/http/redirect.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: redirect.vsp,v 1.4.2.1 2010/09/20 10:15:52 source Exp $
+--  $Id: redirect.vsp,v 1.4.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/remove_tag.vspx b/appsrc/ODS-Wiki/http/remove_tag.vspx
index f2c8eae..876f2df 100644
--- a/appsrc/ODS-Wiki/http/remove_tag.vspx
+++ b/appsrc/ODS-Wiki/http/remove_tag.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: remove_tag.vspx,v 1.1.2.1 2010/09/20 10:15:52 source Exp $
+ -  $Id: remove_tag.vspx,v 1.1.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/revision_delete.vspx b/appsrc/ODS-Wiki/http/revision_delete.vspx
index 6dc649a..dad770f 100644
--- a/appsrc/ODS-Wiki/http/revision_delete.vspx
+++ b/appsrc/ODS-Wiki/http/revision_delete.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: revision_delete.vspx,v 1.5.2.1 2010/09/20 10:15:52 source Exp $
+ -  $Id: revision_delete.vspx,v 1.5.2.2 2012/03/08 10:46:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/revision_rollback.vspx b/appsrc/ODS-Wiki/http/revision_rollback.vspx
index 6f51a7f..4b7b89b 100644
--- a/appsrc/ODS-Wiki/http/revision_rollback.vspx
+++ b/appsrc/ODS-Wiki/http/revision_rollback.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: revision_rollback.vspx,v 1.6.2.1 2010/09/20 10:15:52 source Exp $
+ -  $Id: revision_rollback.vspx,v 1.6.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/search.vsp b/appsrc/ODS-Wiki/http/search.vsp
index 36b67ed..7da5c37 100644
--- a/appsrc/ODS-Wiki/http/search.vsp
+++ b/appsrc/ODS-Wiki/http/search.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: search.vsp,v 1.3.2.1 2010/09/20 10:15:52 source Exp $
+--  $Id: search.vsp,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/search.vspx b/appsrc/ODS-Wiki/http/search.vspx
index dadbc63..a78d206 100644
--- a/appsrc/ODS-Wiki/http/search.vspx
+++ b/appsrc/ODS-Wiki/http/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: search.vspx,v 1.3.2.1 2010/09/20 10:15:52 source Exp $
+ -  $Id: search.vspx,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/settings.vspx b/appsrc/ODS-Wiki/http/settings.vspx
index 611d79a..daf5d89 100644
--- a/appsrc/ODS-Wiki/http/settings.vspx
+++ b/appsrc/ODS-Wiki/http/settings.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: settings.vspx,v 1.17.2.3 2011/03/26 14:21:52 source Exp $
+ -  $Id: settings.vspx,v 1.17.2.4 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/tag.vspx b/appsrc/ODS-Wiki/http/tag.vspx
index aef31cc..f847a0b 100644
--- a/appsrc/ODS-Wiki/http/tag.vspx
+++ b/appsrc/ODS-Wiki/http/tag.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tag.vspx,v 1.6.2.1 2010/09/20 10:15:53 source Exp $
+ -  $Id: tag.vspx,v 1.6.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/tags.vspx b/appsrc/ODS-Wiki/http/tags.vspx
index a53b5d4..18e74d4 100644
--- a/appsrc/ODS-Wiki/http/tags.vspx
+++ b/appsrc/ODS-Wiki/http/tags.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tags.vspx,v 1.7.2.1 2010/09/20 10:15:53 source Exp $
+ -  $Id: tags.vspx,v 1.7.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  -
 -->
-<!-- $Id: tags.vspx,v 1.7.2.1 2010/09/20 10:15:53 source Exp $ -->
+<!-- $Id: tags.vspx,v 1.7.2.2 2012/03/08 10:46:23 source Exp $ -->
     <v:page 
 	  name="main" 
 	  style="comp.xsl"
diff --git a/appsrc/ODS-Wiki/http/template.xsl b/appsrc/ODS-Wiki/http/template.xsl
index 42fcbc8..6ad8d83 100644
--- a/appsrc/ODS-Wiki/http/template.xsl
+++ b/appsrc/ODS-Wiki/http/template.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: template.xsl,v 1.3.2.1 2010/09/20 10:15:53 source Exp $
+ -  $Id: template.xsl,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/toolbar.vspx b/appsrc/ODS-Wiki/http/toolbar.vspx
index 79bc1d5..07f8809 100644
--- a/appsrc/ODS-Wiki/http/toolbar.vspx
+++ b/appsrc/ODS-Wiki/http/toolbar.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: toolbar.vspx,v 1.3.2.1 2010/09/20 10:15:53 source Exp $
+ -  $Id: toolbar.vspx,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/wiki_decor.vspx b/appsrc/ODS-Wiki/http/wiki_decor.vspx
index fcf5e1f..a3e6945 100644
--- a/appsrc/ODS-Wiki/http/wiki_decor.vspx
+++ b/appsrc/ODS-Wiki/http/wiki_decor.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: wiki_decor.vspx,v 1.3.2.1 2010/09/20 10:15:53 source Exp $
+ -  $Id: wiki_decor.vspx,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/http/wiki_style.xsl b/appsrc/ODS-Wiki/http/wiki_style.xsl
index 64b8ef5..bd5cfe2 100644
--- a/appsrc/ODS-Wiki/http/wiki_style.xsl
+++ b/appsrc/ODS-Wiki/http/wiki_style.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -
- -  $Id: wiki_style.xsl,v 1.2.2.4 2011/02/03 10:26:17 source Exp $
+ -  $Id: wiki_style.xsl,v 1.2.2.5 2012/03/08 10:46:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -107,7 +107,7 @@
                  </tr>
               </table>
          </table>
-	 <div class="copyright">Copyright &copy; 1998-2011 OpenLink Software</div>-->
+	 <div class="copyright">Copyright &copy; 1998-2012 OpenLink Software</div>-->
 	 <xsl:processing-instruction name="vsp">
 		declare ht_stat varchar;
 		ht_stat := http_request_status_get ();
diff --git a/appsrc/ODS-Wiki/http/wikiview.vsp b/appsrc/ODS-Wiki/http/wikiview.vsp
index 2f593a5..95e81f9 100644
--- a/appsrc/ODS-Wiki/http/wikiview.vsp
+++ b/appsrc/ODS-Wiki/http/wikiview.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: wikiview.vsp,v 1.3.2.1 2010/09/20 10:15:53 source Exp $
+--  $Id: wikiview.vsp,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/make_vad.sh b/appsrc/ODS-Wiki/make_vad.sh
index 285d529..93ce174 100755
--- a/appsrc/ODS-Wiki/make_vad.sh
+++ b/appsrc/ODS-Wiki/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.30.2.7 2011/02/03 10:26:16 source Exp $
+#  $Id: make_vad.sh,v 1.30.2.10 2012/03/08 11:19:38 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -68,13 +68,6 @@ then
     fi
 fi
 
-
-VOS=0
-if [ -f ../../autogen.sh ]
-then
-    VOS=1
-fi
-
 . $HOME/binsrc/tests/suite/test_fn.sh
 
 if [ -f /usr/xpg4/bin/rm ]
@@ -85,8 +78,14 @@ else
 fi
 
 
+VOS=0
+if [ -f ../../autogen.sh ]
+then
+    VOS=1
+fi
 
-version_init() {
+version_init()
+{
   if [ $VOS -eq 1 ]
   then
       if [ -f vad_version ]
@@ -98,32 +97,34 @@ version_init() {
       fi
   else
       rm -f version.tmp
-      file_list=`find ./ -name Entries`
-      for i in $file_list; do
-	  cat $i | grep -v "version\." | grep '^/' | cut -d '/' -f 3 | sed -e 's/1\.//g' >> version.tmp
-	    echo $i
+      for i in `find . -name 'Entries' | grep -v "vad/" | grep -v "/tests/"`; do
+	  cat "$i" | grep -v "version\."| grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
       done
+      LANG=POSIX
+      export LANG
+
       BASE="0"
+#      echo $BASE
       if [ -f version.base ] ; then
 	  BASE=`cat version.base`
       fi
-      VERSION=`cat version.tmp | awk ' BEGIN { cnt=0 } { cnt = cnt + $1 } END { print cnt }'`
-      CALC_VERSION=$VERSION
+
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=10 } { cnt = cnt + $1 } END { print cnt }'`
+
       VERSION=`expr $BASE + $VERSION`
       CURR_VERSION=$VERSION
       if [ -f version.curr ] ; then
 	  CURR_VERSION=`cat version.curr`
       fi
       if [ $CURR_VERSION -gt $VERSION ] ; then
-	  BASE=`expr $CURR_VERSION - $CALC_VERSION + 1`
-	  echo "new base: " $BASE
+	  BASE=`expr $CURR_VERSION - $VERSION + 1`
 	  echo $BASE > version.base
 	  VERSION=$CURR_VERSION
       fi
       echo $VERSION > version.curr
-      VERSION="1.05.$VERSION"
-      echo $VERSION > vad_version
-      # rm -f version.tmp
+      VERSION=`echo $VERSION | awk ' { printf "1.%02.02f", $1/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
   fi
 }
 
@@ -255,7 +256,7 @@ sticker_init() {
   echo "  <name package=\"Wiki\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"ODS Wiki\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -267,8 +268,8 @@ sticker_init() {
   echo "<dependencies>" >> $STICKER
   echo "  <require>" >> $STICKER
   echo "    <name package=\"Framework\"/>" >> $STICKER
-  echo "    <versions_later package=\"1.67.12\">" >> $STICKER
-  echo "      <prop name=\"Date\" value=\"2010-03-29 12:00\" />" >> $STICKER
+  echo "    <versions_later package=\"1.83.00\">" >> $STICKER
+  echo "      <prop name=\"Date\" value=\"2011-07-27 12:00\" />" >> $STICKER
   echo "      <prop name=\"Comment\" value=\"An incompatible version of the ODS Framework\" />" >> $STICKER
   echo "    </versions_later>" >> $STICKER
   echo "  </require>" >> $STICKER
@@ -504,15 +505,14 @@ vad_check() {
 
 virtuoso_shutdown
 directory_clean
+version_init
 directory_init
 virtuoso_init
-version_init
 sticker_init
 vad_create
 virtuoso_shutdown
 echo `pwd`
 chmod 644 ods_wiki_dav.vad
-directory_clean
 
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
@@ -522,5 +522,7 @@ then
 	exit 1
 fi
 
+directory_clean
+
 BANNER "COMPLETED VAD PACKAGING"
 exit 0
diff --git a/appsrc/ODS-Wiki/plugin/Makefile.am b/appsrc/ODS-Wiki/plugin/Makefile.am
index 9b79c90..6b03504 100644
--- a/appsrc/ODS-Wiki/plugin/Makefile.am
+++ b/appsrc/ODS-Wiki/plugin/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/Makefile.in b/appsrc/ODS-Wiki/plugin/Makefile.in
index a8bb96a..e8650aa 100644
--- a/appsrc/ODS-Wiki/plugin/Makefile.in
+++ b/appsrc/ODS-Wiki/plugin/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -166,6 +166,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -214,6 +215,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -265,6 +267,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -311,7 +314,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/appsrc/ODS-Wiki/plugin/creole_maclex.c b/appsrc/ODS-Wiki/plugin/creole_maclex.c
index 59a591d..bfeb0fe 100644
--- a/appsrc/ODS-Wiki/plugin/creole_maclex.c
+++ b/appsrc/ODS-Wiki/plugin/creole_maclex.c
@@ -503,12 +503,12 @@ char *creolemacyytext;
 #line 1 "./creole_maclex.l"
 #line 2 "./creole_maclex.l"
 /*
- *  $Id: creole_maclex.l,v 1.2.2.1 2010/09/20 10:15:53 source Exp $
+ *  $Id: creole_maclex.l,v 1.2.2.2 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/creole_maclex.l b/appsrc/ODS-Wiki/plugin/creole_maclex.l
index b03d622..68ee7bd 100644
--- a/appsrc/ODS-Wiki/plugin/creole_maclex.l
+++ b/appsrc/ODS-Wiki/plugin/creole_maclex.l
@@ -1,11 +1,11 @@
 %{
 /*
- *  $Id: creole_maclex.l,v 1.2.2.1 2010/09/20 10:15:53 source Exp $
+ *  $Id: creole_maclex.l,v 1.2.2.2 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/creole_wikilex.c b/appsrc/ODS-Wiki/plugin/creole_wikilex.c
index 2be8ff1..13e79ca 100644
--- a/appsrc/ODS-Wiki/plugin/creole_wikilex.c
+++ b/appsrc/ODS-Wiki/plugin/creole_wikilex.c
@@ -11459,12 +11459,12 @@ char *creolewikiyytext;
 #line 1 "./creole_wikilex.l"
 #line 2 "./creole_wikilex.l"
 /*
- *  $Id: creole_wikilex.l,v 1.4.2.2 2010/09/20 10:15:53 source Exp $
+ *  $Id: creole_wikilex.l,v 1.4.2.3 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/creole_wikilex.l b/appsrc/ODS-Wiki/plugin/creole_wikilex.l
index ff7fad9..71db429 100644
--- a/appsrc/ODS-Wiki/plugin/creole_wikilex.l
+++ b/appsrc/ODS-Wiki/plugin/creole_wikilex.l
@@ -1,11 +1,11 @@
 %{
 /*
- *  $Id: creole_wikilex.l,v 1.4.2.2 2010/09/20 10:15:53 source Exp $
+ *  $Id: creole_wikilex.l,v 1.4.2.3 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/creolewiki.c b/appsrc/ODS-Wiki/plugin/creolewiki.c
index d5dff6e..29cb55a 100644
--- a/appsrc/ODS-Wiki/plugin/creolewiki.c
+++ b/appsrc/ODS-Wiki/plugin/creolewiki.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/maclex.c b/appsrc/ODS-Wiki/plugin/maclex.c
index 7164dad..95c5d5e 100644
--- a/appsrc/ODS-Wiki/plugin/maclex.c
+++ b/appsrc/ODS-Wiki/plugin/maclex.c
@@ -503,12 +503,12 @@ char *macyytext;
 #line 1 "./maclex.l"
 #line 2 "./maclex.l"
 /*
- *  $Id: maclex.l,v 1.4.2.1 2010/09/20 10:15:53 source Exp $
+ *  $Id: maclex.l,v 1.4.2.2 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/maclex.l b/appsrc/ODS-Wiki/plugin/maclex.l
index 8128586..51212d8 100644
--- a/appsrc/ODS-Wiki/plugin/maclex.l
+++ b/appsrc/ODS-Wiki/plugin/maclex.l
@@ -1,11 +1,11 @@
 %{
 /*
- *  $Id: maclex.l,v 1.4.2.1 2010/09/20 10:15:53 source Exp $
+ *  $Id: maclex.l,v 1.4.2.2 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/media_maclex.c b/appsrc/ODS-Wiki/plugin/media_maclex.c
index 454c475..4ee74d6 100644
--- a/appsrc/ODS-Wiki/plugin/media_maclex.c
+++ b/appsrc/ODS-Wiki/plugin/media_maclex.c
@@ -503,12 +503,12 @@ char *mediamacyytext;
 #line 1 "./media_maclex.l"
 #line 2 "./media_maclex.l"
 /*
- *  $Id: media_maclex.l,v 1.3.2.1 2010/09/20 10:15:53 source Exp $
+ *  $Id: media_maclex.l,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/media_maclex.l b/appsrc/ODS-Wiki/plugin/media_maclex.l
index 0d1591a..ba3fb4c 100644
--- a/appsrc/ODS-Wiki/plugin/media_maclex.l
+++ b/appsrc/ODS-Wiki/plugin/media_maclex.l
@@ -1,11 +1,11 @@
 %{
 /*
- *  $Id: media_maclex.l,v 1.3.2.1 2010/09/20 10:15:53 source Exp $
+ *  $Id: media_maclex.l,v 1.3.2.2 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/media_wikilex.c b/appsrc/ODS-Wiki/plugin/media_wikilex.c
index 9639ee9..8907753 100644
--- a/appsrc/ODS-Wiki/plugin/media_wikilex.c
+++ b/appsrc/ODS-Wiki/plugin/media_wikilex.c
@@ -14450,12 +14450,12 @@ char *mediawikiyytext;
 #line 1 "./media_wikilex.l"
 #line 2 "./media_wikilex.l"
 /*
- *  $Id: media_wikilex.l,v 1.7.2.2 2010/09/20 10:15:54 source Exp $
+ *  $Id: media_wikilex.l,v 1.7.2.3 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/media_wikilex.l b/appsrc/ODS-Wiki/plugin/media_wikilex.l
index 6139eee..d178ecc 100644
--- a/appsrc/ODS-Wiki/plugin/media_wikilex.l
+++ b/appsrc/ODS-Wiki/plugin/media_wikilex.l
@@ -1,11 +1,11 @@
 %{
 /*
- *  $Id: media_wikilex.l,v 1.7.2.2 2010/09/20 10:15:54 source Exp $
+ *  $Id: media_wikilex.l,v 1.7.2.3 2012/03/08 10:46:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/mediawiki.c b/appsrc/ODS-Wiki/plugin/mediawiki.c
index 640271d..b2c9914 100644
--- a/appsrc/ODS-Wiki/plugin/mediawiki.c
+++ b/appsrc/ODS-Wiki/plugin/mediawiki.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: mediawiki.c,v 1.5.2.1 2010/09/20 10:15:54 source Exp $
+ *  $Id: mediawiki.c,v 1.5.2.2 2012/03/08 10:46:23 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugin/wikilex.c b/appsrc/ODS-Wiki/plugin/wikilex.c
index cfa6f28..f1da0e8 100644
--- a/appsrc/ODS-Wiki/plugin/wikilex.c
+++ b/appsrc/ODS-Wiki/plugin/wikilex.c
@@ -11348,12 +11348,12 @@ char *wikiyytext;
 #line 1 "./wikilex.l"
 #line 2 "./wikilex.l"
 /*
- *  $Id: wikilex.l,v 1.15.2.2 2010/09/20 10:15:54 source Exp $
+ *  $Id: wikilex.l,v 1.15.2.4 2012/03/08 11:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -11367,7 +11367,6 @@ char *wikiyytext;
  *  You should have received a copy of the GNU General Public License along
  *  with this program; if not, write to the Free Software Foundation, Inc.,
  *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 #include <ctype.h>
@@ -11931,7 +11930,7 @@ int wlex_count_header_level (char * line)
 
 
 /* Wiktology */
-#line 11935 "wikilex.c"
+#line 11934 "wikilex.c"
 
 #define INITIAL 0
 #define VERBATIM 1
@@ -12121,11 +12120,11 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 650 "./wikilex.l"
+#line 649 "./wikilex.l"
 
 
 	/* Verbatim */
-#line 12129 "wikilex.c"
+#line 12128 "wikilex.c"
 
 	if ( !(yy_init) )
 		{
@@ -12241,346 +12240,346 @@ do_action:	/* This label is used only to access EOF actions. */
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 653 "./wikilex.l"
+#line 652 "./wikilex.l"
 { BEGIN(VERBATIM); wlex_verbatim(1); }
 	YY_BREAK
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 654 "./wikilex.l"
+#line 653 "./wikilex.l"
 { BEGIN(INITIAL); wlex_verbatim(0); }
 	YY_BREAK
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 655 "./wikilex.l"
+#line 654 "./wikilex.l"
 { BEGIN(INITIAL); wlex_verbatim(0); }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 656 "./wikilex.l"
+#line 655 "./wikilex.l"
 { PRINT ("<"); }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 657 "./wikilex.l"
+#line 656 "./wikilex.l"
 { PRINT (">"); }
 	YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 658 "./wikilex.l"
+#line 657 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 7:
 /* rule 7 can match eol */
 YY_RULE_SETUP
-#line 659 "./wikilex.l"
+#line 658 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 660 "./wikilex.l"
+#line 659 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 661 "./wikilex.l"
+#line 660 "./wikilex.l"
 { PRINT ("<?"); }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 662 "./wikilex.l"
+#line 661 "./wikilex.l"
 { PRINT(wikiyytext); }
 	YY_BREAK
 /* Wiktology */
 case 11:
 /* rule 11 can match eol */
 YY_RULE_SETUP
-#line 665 "./wikilex.l"
+#line 664 "./wikilex.l"
 { PRINT("<p><b>Wikitology detected:</b><br><div id='wiktology'>"); BEGIN(WIKTOLOGY); wlex_verbatim(1); }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 666 "./wikilex.l"
+#line 665 "./wikilex.l"
 { PRINT ("<"); }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 667 "./wikilex.l"
+#line 666 "./wikilex.l"
 { PRINT (">"); }
 	YY_BREAK
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
-#line 668 "./wikilex.l"
+#line 667 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 15:
 /* rule 15 can match eol */
 YY_RULE_SETUP
-#line 669 "./wikilex.l"
+#line 668 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 670 "./wikilex.l"
+#line 669 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 671 "./wikilex.l"
+#line 670 "./wikilex.l"
 { PRINT ("<?"); }
 	YY_BREAK
 case 18:
 /* rule 18 can match eol */
 YY_RULE_SETUP
-#line 672 "./wikilex.l"
+#line 671 "./wikilex.l"
 { PRINT("</div></p><b>End of Wikitology</b><br>"); BEGIN(INITIAL); wlex_verbatim(0); }
 	YY_BREAK
 /* WikiLinks. This is the core :) They are of highest possible priority */
 case 19:
 YY_RULE_SETUP
-#line 676 "./wikilex.l"
+#line 675 "./wikilex.l"
 { if (STATE(wlex_noautolink)) COPYTEXT; else wlex_ahref (wlex_wikiwordnorm (STATEPTR, wikiyytext), "wikiword", wikiyytext); }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 677 "./wikilex.l"
+#line 676 "./wikilex.l"
 { if (STATE(wlex_noautolink)) COPYTEXT; else wlex_ahref (wlex_wikiwordnorm (STATEPTR, wikiyytext), "qwikiword", strchr (wikiyytext, '.') + 1); }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 678 "./wikilex.l"
+#line 677 "./wikilex.l"
 { if (STATE(wlex_noautolink)) COPYTEXT; else wlex_ahref (wlex_wikiwordnorm (STATEPTR, wikiyytext), "interwiki", wikiyytext); }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 679 "./wikilex.l"
+#line 678 "./wikilex.l"
 { PRINT("<NOP />"); PRINTTEXT(strchr(wikiyytext,'>')+1); }
 	YY_BREAK
 /* xmlns must be removed for <html tag. this is workaround and must be replaced by proper handling XHTML */
 case 23:
 YY_RULE_SETUP
-#line 682 "./wikilex.l"
+#line 681 "./wikilex.l"
 { PRINT ("<html>"); BEGIN(PLAINHTML); }
 	YY_BREAK
 case 24:
 /* rule 24 can match eol */
 YY_RULE_SETUP
-#line 683 "./wikilex.l"
+#line 682 "./wikilex.l"
 { ; }
 	YY_BREAK
 /* PlainHtml */
 case 25:
 /* rule 25 can match eol */
 YY_RULE_SETUP
-#line 688 "./wikilex.l"
+#line 687 "./wikilex.l"
 { BEGIN(PLAINHTML); }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 689 "./wikilex.l"
+#line 688 "./wikilex.l"
 { BEGIN(PLAINHTML); STATE(wlex_noautolink) = 1; STATE(wlex_nowiki) = 1;  STATE(wlex_in_any_text) = 1; STATE(wlex_prevst) = INITIAL; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 690 "./wikilex.l"
+#line 689 "./wikilex.l"
 { BEGIN(PLAINHTML); STATE(wlex_noautolink) = 1; STATE(wlex_nowiki) = 1;  STATE(wlex_in_any_text) = 1; STATE(wlex_prevst) = TABLELINE; }
 	YY_BREAK
 case 28:
 /* rule 28 can match eol */
 YY_RULE_SETUP
-#line 691 "./wikilex.l"
+#line 690 "./wikilex.l"
 { BEGIN(INITIAL); }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 692 "./wikilex.l"
+#line 691 "./wikilex.l"
 { if ((STATE(wlex_prevst)) == TABLELINE) { BEGIN(TABLELINE);} else { BEGIN(INITIAL);} STATE(wlex_noautolink) = 0; STATE (wlex_nowiki) = 0; }
 	YY_BREAK
 case 30:
 /* rule 30 can match eol */
 YY_RULE_SETUP
-#line 693 "./wikilex.l"
+#line 692 "./wikilex.l"
 { BEGIN(INITIAL); }
 	YY_BREAK
 case 31:
 /* rule 31 can match eol */
 YY_RULE_SETUP
-#line 694 "./wikilex.l"
+#line 693 "./wikilex.l"
 { if (STATE(wlex_nowiki)) PRINT ("<BR/>"); }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 695 "./wikilex.l"
+#line 694 "./wikilex.l"
 { PRINT (wikiyytext); }
 	YY_BREAK
 case 33:
 /* rule 33 can match eol */
 YY_RULE_SETUP
-#line 697 "./wikilex.l"
+#line 696 "./wikilex.l"
 { STATE(wlex_noautolink) = 1; }
 	YY_BREAK
 case 34:
 /* rule 34 can match eol */
 YY_RULE_SETUP
-#line 698 "./wikilex.l"
+#line 697 "./wikilex.l"
 { STATE(wlex_noautolink) = 0; }
 	YY_BREAK
 /* Other links. Their priorities are higher than anything else except <verbatim> */
 case 35:
 YY_RULE_SETUP
-#line 701 "./wikilex.l"
+#line 700 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) wlex_ahref (wikiyytext, "mailto", wikiyytext+7); else COPYTEXT; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 702 "./wikilex.l"
+#line 701 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) wlex_ahref (wikiyytext, "mailto", wikiyytext); else COPYTEXT; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 703 "./wikilex.l"
+#line 702 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) wlex_ahref (wikiyytext, "absuri", wikiyytext); else COPYTEXT; }
 	YY_BREAK
 case 38:
 /* rule 38 can match eol */
 YY_RULE_SETUP
-#line 704 "./wikilex.l"
+#line 703 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, NULL, 1, "forcedwikiword");  }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 705 "./wikilex.l"
+#line 704 "./wikilex.l"
 { wlex_forced_link_with_pred (STATEPTR, wikiyytext, "::", NULL, "forcedwikiword");  }
 	YY_BREAK
 case 40:
 /* rule 40 can match eol */
 YY_RULE_SETUP
-#line 706 "./wikilex.l"
+#line 705 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, " ", 0, "mailto"); }
 	YY_BREAK
 case 41:
 /* rule 41 can match eol */
 YY_RULE_SETUP
-#line 707 "./wikilex.l"
+#line 706 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "mailto");  }
 	YY_BREAK
 case 42:
 /* rule 42 can match eol */
 YY_RULE_SETUP
-#line 708 "./wikilex.l"
+#line 707 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, " ", 0, "wikiword"); }
 	YY_BREAK
 case 43:
 /* rule 43 can match eol */
 YY_RULE_SETUP
-#line 709 "./wikilex.l"
+#line 708 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "wikiword");  }
 	YY_BREAK
 case 44:
 /* rule 44 can match eol */
 YY_RULE_SETUP
-#line 710 "./wikilex.l"
+#line 709 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, " ", 0, "qwikiword");  }
 	YY_BREAK
 case 45:
 /* rule 45 can match eol */
 YY_RULE_SETUP
-#line 711 "./wikilex.l"
+#line 710 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "qwikiword");  }
 	YY_BREAK
 case 46:
 /* rule 46 can match eol */
 YY_RULE_SETUP
-#line 712 "./wikilex.l"
+#line 711 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, " ", 0, "interwiki");  }
 	YY_BREAK
 case 47:
 /* rule 47 can match eol */
 YY_RULE_SETUP
-#line 713 "./wikilex.l"
+#line 712 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "interwiki");  }
 	YY_BREAK
 case 48:
 /* rule 48 can match eol */
 YY_RULE_SETUP
-#line 714 "./wikilex.l"
+#line 713 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, " ", 0, "absuri"); }
 	YY_BREAK
 case 49:
 /* rule 49 can match eol */
 YY_RULE_SETUP
-#line 715 "./wikilex.l"
+#line 714 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "absuri"); }
 	YY_BREAK
 case 50:
 /* rule 50 can match eol */
 YY_RULE_SETUP
-#line 716 "./wikilex.l"
+#line 715 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, " ", 0, "anchorhere"); }
 	YY_BREAK
 case 51:
 /* rule 51 can match eol */
 YY_RULE_SETUP
-#line 717 "./wikilex.l"
+#line 716 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "anchorhere");  }
 	YY_BREAK
 case 52:
 /* rule 52 can match eol */
 YY_RULE_SETUP
-#line 718 "./wikilex.l"
+#line 717 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, NULL, 1, "forcedwikiword");  }
 	YY_BREAK
 case 53:
 /* rule 53 can match eol */
 YY_RULE_SETUP
-#line 719 "./wikilex.l"
+#line 718 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 1, "forcedwikiword");  }
 	YY_BREAK
 case 54:
 /* rule 54 can match eol */
 YY_RULE_SETUP
-#line 720 "./wikilex.l"
+#line 719 "./wikilex.l"
 { wlex_forced_link (STATEPTR, wikiyytext, "][", 0, "reluri");  }
 	YY_BREAK
 case 55:
 /* rule 55 can match eol */
 YY_RULE_SETUP
-#line 721 "./wikilex.l"
+#line 720 "./wikilex.l"
 { wlex_forced_link_with_pred (STATEPTR, wikiyytext, "::", "|", "forcedwikiword");  }
 	YY_BREAK
 case 56:
 /* rule 56 can match eol */
 YY_RULE_SETUP
-#line 722 "./wikilex.l"
+#line 721 "./wikilex.l"
 { wlex_div_with_pred (STATEPTR, wikiyytext, ":=", "|", "semanticvalue");  }
 	YY_BREAK
 /* HTML tags */
 case 57:
 YY_RULE_SETUP
-#line 725 "./wikilex.l"
+#line 724 "./wikilex.l"
 { if (!STATE(wlex_xmp_depth)) STATE(wlex_format_lock) += 1; PRINT(wikiyytext); }
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 726 "./wikilex.l"
+#line 725 "./wikilex.l"
 { if (!STATE(wlex_xmp_depth) && (0 < STATE(wlex_format_lock))) STATE(wlex_format_lock) -= 1; PRINT(wikiyytext); }
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 727 "./wikilex.l"
+#line 726 "./wikilex.l"
 { STATE(wlex_xmp_depth) += 1; STATE(wlex_format_lock) += 1; PRINT(wikiyytext); }
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 728 "./wikilex.l"
+#line 727 "./wikilex.l"
 { if (0 < STATE(wlex_xmp_depth)) { STATE(wlex_xmp_depth) -= 1; STATE(wlex_format_lock) -= 1; } PRINT(wikiyytext); }
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 729 "./wikilex.l"
+#line 728 "./wikilex.l"
 {
         if (!STATE(wlex_in_para) && !STATE(wlex_in_any_text))
 	  STATE(wlex_in_para) = STATE(wlex_in_any_text) = STATE(wlex_para_depressed) = 1;
@@ -12589,25 +12588,25 @@ YY_RULE_SETUP
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 734 "./wikilex.l"
+#line 733 "./wikilex.l"
 { PRINT(wikiyytext); }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 735 "./wikilex.l"
+#line 734 "./wikilex.l"
 { PRINT("<!-- nop -->"); }
 	YY_BREAK
 /* Ends of lines and ends of paragraphs */
 case 64:
 /* rule 64 can match eol */
 YY_RULE_SETUP
-#line 738 "./wikilex.l"
+#line 737 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock)) PRINT(wikiyytext); else PRINTTEXT("."); wlex_reset (~0); }
 	YY_BREAK
 case 65:
 /* rule 65 can match eol */
 YY_RULE_SETUP
-#line 739 "./wikilex.l"
+#line 738 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock)) PRINT(wikiyytext); else PRINTTEXT(".\n"); }
 	YY_BREAK
 case 66:
@@ -12616,7 +12615,7 @@ case 66:
 (yy_c_buf_p) = yy_cp = yy_bp + 2;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 740 "./wikilex.l"
+#line 739 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock)) PRINT(wikiyytext); else PRINTTEXT(".\n"); }
 	YY_BREAK
 case 67:
@@ -12625,24 +12624,24 @@ case 67:
 (yy_c_buf_p) = yy_cp = yy_bp + 1;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 741 "./wikilex.l"
+#line 740 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock)) PRINT(wikiyytext); else PRINTTEXT(".\n"); }
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 742 "./wikilex.l"
+#line 741 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock)) PRINT(wikiyytext); else COPYTEXT; }
 	YY_BREAK
 case 69:
 /* rule 69 can match eol */
 YY_RULE_SETUP
-#line 743 "./wikilex.l"
+#line 742 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock)) PRINT(wikiyytext); else wlex_reset (~0); }
 	YY_BREAK
 case 70:
 /* rule 70 can match eol */
 YY_RULE_SETUP
-#line 744 "./wikilex.l"
+#line 743 "./wikilex.l"
 { if (0 < STATE(wlex_format_lock))
  				    PRINT(wikiyytext);
 				  else
@@ -12656,157 +12655,157 @@ YY_RULE_SETUP
 /* Titles */
 case 71:
 YY_RULE_SETUP
-#line 755 "./wikilex.l"
+#line 754 "./wikilex.l"
 { BEGIN(INITIAL); wlex_headerlevel (wlex_count_header_level(wikiyytext)); }
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 756 "./wikilex.l"
+#line 755 "./wikilex.l"
 { BEGIN(INITIAL); wlex_headerlevel (1); }
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 757 "./wikilex.l"
+#line 756 "./wikilex.l"
 { BEGIN(INITIAL); wlex_headerlevel (wlex_count_header_level(wikiyytext)); }
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 758 "./wikilex.l"
+#line 757 "./wikilex.l"
 { BEGIN(INITIAL); wlex_headerlevel (1); }
 	YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 759 "./wikilex.l"
+#line 758 "./wikilex.l"
 { BEGIN(INITIAL); wlex_headerlevel (wlex_count_header_level(wikiyytext)); }
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 760 "./wikilex.l"
+#line 759 "./wikilex.l"
 { BEGIN(INITIAL); wlex_headerlevel (1); }
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 761 "./wikilex.l"
+#line 760 "./wikilex.l"
 { if (STATE(wlex_headerlevel)) PRINT("<NOTOC />"); else PRINT(wikiyytext); }
 	YY_BREAK
 /* Lists */
 case 78:
 YY_RULE_SETUP
-#line 764 "./wikilex.l"
+#line 763 "./wikilex.l"
 { BEGIN(INITIAL); wlex_list ((strchr(wikiyytext, '*') - wikiyytext) / 3, WLEX_LIST_UL, NULL); }
 	YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 765 "./wikilex.l"
+#line 764 "./wikilex.l"
 { BEGIN(INITIAL); wlex_list ((strdigit(wikiyytext) - wikiyytext) / 3, WLEX_LIST_OL, NULL); }
 	YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 766 "./wikilex.l"
+#line 765 "./wikilex.l"
 { BEGIN(INITIAL); wlex_list ((strnonws(wikiyytext) - wikiyytext) / 3, WLEX_LIST_DL, wikiyytext); }
 	YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 767 "./wikilex.l"
+#line 766 "./wikilex.l"
 { BEGIN(INITIAL); wlex_list (strchr(wikiyytext, '*') - wikiyytext, WLEX_LIST_UL, NULL); }
 	YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 768 "./wikilex.l"
+#line 767 "./wikilex.l"
 { BEGIN(INITIAL); wlex_list (strdigit(wikiyytext) - wikiyytext, WLEX_LIST_OL, NULL); }
 	YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 769 "./wikilex.l"
+#line 768 "./wikilex.l"
 { BEGIN(INITIAL); wlex_list (strnonws(wikiyytext) - wikiyytext, WLEX_LIST_DL, wikiyytext); }
 	YY_BREAK
 /* Font processing */
 case 84:
 YY_RULE_SETUP
-#line 772 "./wikilex.l"
+#line 771 "./wikilex.l"
 { COPYTEXT; }
 	YY_BREAK
 case 85:
 /* rule 85 can match eol */
 YY_RULE_SETUP
-#line 774 "./wikilex.l"
+#line 773 "./wikilex.l"
 { if (WLEX_FONT_BU == STATE(wlex_font)) wlex_font (WLEX_FONT_DEFAULT); else COPYTEXT;}
 	YY_BREAK
 case 86:
 /* rule 86 can match eol */
 YY_RULE_SETUP
-#line 775 "./wikilex.l"
+#line 774 "./wikilex.l"
 { if (WLEX_FONT_B == STATE(wlex_font)) wlex_font (WLEX_FONT_DEFAULT); else COPYTEXT;}
 	YY_BREAK
 case 87:
 /* rule 87 can match eol */
 YY_RULE_SETUP
-#line 776 "./wikilex.l"
+#line 775 "./wikilex.l"
 { if (WLEX_FONT_U == STATE(wlex_font)) wlex_font (WLEX_FONT_DEFAULT); else COPYTEXT;}
 	YY_BREAK
 case 88:
 /* rule 88 can match eol */
 YY_RULE_SETUP
-#line 777 "./wikilex.l"
+#line 776 "./wikilex.l"
 { if (WLEX_FONT_BTT == STATE(wlex_font)) wlex_font (WLEX_FONT_DEFAULT); else COPYTEXT;}
 	YY_BREAK
 case 89:
 /* rule 89 can match eol */
 YY_RULE_SETUP
-#line 778 "./wikilex.l"
+#line 777 "./wikilex.l"
 { if (WLEX_FONT_TT == STATE(wlex_font)) wlex_font (WLEX_FONT_DEFAULT); else COPYTEXT;}
 	YY_BREAK
 case 90:
 /* rule 90 can match eol */
 YY_RULE_SETUP
-#line 779 "./wikilex.l"
+#line 778 "./wikilex.l"
 { if (WLEX_FONT_I == STATE(wlex_font)) wlex_font (WLEX_FONT_DEFAULT); else COPYTEXT;}
 	YY_BREAK
 case 91:
 YY_RULE_SETUP
-#line 781 "./wikilex.l"
+#line 780 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) { PRINT(" "); wlex_font (WLEX_FONT_BU); } else COPYTEXT; }
 	YY_BREAK
 case 92:
 YY_RULE_SETUP
-#line 782 "./wikilex.l"
+#line 781 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) { PRINT(" "); wlex_font (WLEX_FONT_B); } else COPYTEXT; }
 	YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 783 "./wikilex.l"
+#line 782 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) { PRINT(" "); wlex_font (WLEX_FONT_U); } else COPYTEXT; }
 	YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 784 "./wikilex.l"
+#line 783 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) { PRINT(" "); wlex_font (WLEX_FONT_BTT); } else COPYTEXT; }
 	YY_BREAK
 case 95:
 YY_RULE_SETUP
-#line 785 "./wikilex.l"
+#line 784 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) { PRINT(" "); wlex_font (WLEX_FONT_TT); } else COPYTEXT; }
 	YY_BREAK
 case 96:
 /* rule 96 can match eol */
 YY_RULE_SETUP
-#line 786 "./wikilex.l"
+#line 785 "./wikilex.l"
 { if (WLEX_FONT_DEFAULT == STATE(wlex_font)) { PRINT(" "); wlex_font (WLEX_FONT_I); } else COPYTEXT; }
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 788 "./wikilex.l"
+#line 787 "./wikilex.l"
 { STATE(wlex_in_any_text) = 1; }
 	YY_BREAK
 /* Other formatting */
 case 98:
 YY_RULE_SETUP
-#line 791 "./wikilex.l"
+#line 790 "./wikilex.l"
 { PRINT("<HR />"); }
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 792 "./wikilex.l"
+#line 791 "./wikilex.l"
 {
 	PRINT("<A NAME=\"");
 	PRINT(strchr (wikiyytext, '#')+1);
@@ -12816,13 +12815,13 @@ YY_RULE_SETUP
 /* Variables and macro calls */
 case 100:
 YY_RULE_SETUP
-#line 799 "./wikilex.l"
+#line 798 "./wikilex.l"
 { PRINT("<?"); NPRINT(wikiyytext+1,strlen(wikiyytext)-2); PRINT("?>"); }
 	YY_BREAK
 case 101:
 /* rule 101 can match eol */
 YY_RULE_SETUP
-#line 800 "./wikilex.l"
+#line 799 "./wikilex.l"
 {
 	char *lbrace = strchr (wikiyytext, '{');
 	char *rbrace = strchr (wikiyytext, '}');
@@ -12833,7 +12832,7 @@ YY_RULE_SETUP
 case 102:
 /* rule 102 can match eol */
 YY_RULE_SETUP
-#line 806 "./wikilex.l"
+#line 805 "./wikilex.l"
 {
 	char *lbrace = strchr (wikiyytext, '{');
 	char *rbrace = strchr (wikiyytext, '}');
@@ -12844,31 +12843,31 @@ YY_RULE_SETUP
 case 103:
 /* rule 103 can match eol */
 YY_RULE_SETUP
-#line 812 "./wikilex.l"
+#line 811 "./wikilex.l"
 { COPYTEXT; }
 	YY_BREAK
 /* Tables */
 case 104:
 /* rule 104 can match eol */
 YY_RULE_SETUP
-#line 816 "./wikilex.l"
+#line 815 "./wikilex.l"
 { wlex_reset(~WLEX_RESET_LIST); BEGIN(TABLEHEADER);  STATE(wlex_in_any_text) = 1; PRINT("\n<TABLE class=\"wikitable\">"); }
 	YY_BREAK
 case 105:
 YY_RULE_SETUP
-#line 817 "./wikilex.l"
+#line 816 "./wikilex.l"
 { PRINT("\n<TR><TH"); wlex_id_print (STATEPTR); PRINT (">"); }
 	YY_BREAK
 case 106:
 /* rule 106 can match eol */
 YY_RULE_SETUP
-#line 818 "./wikilex.l"
+#line 817 "./wikilex.l"
 { PRINT("</TH></TR>"); BEGIN(TABLELINE); }
 	YY_BREAK
 case 107:
 /* rule 107 can match eol */
 YY_RULE_SETUP
-#line 819 "./wikilex.l"
+#line 818 "./wikilex.l"
 { PRINT("</TH></TR>"); }
 	YY_BREAK
 case 108:
@@ -12877,33 +12876,33 @@ case 108:
 (yy_c_buf_p) = yy_cp = yy_bp + 1;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 820 "./wikilex.l"
+#line 819 "./wikilex.l"
 { PRINT("</TH></TR>\n</TABLE>\n"); BEGIN(INITIAL); wlex_reset(~WLEX_RESET_LIST); }
 	YY_BREAK
 case 109:
 YY_RULE_SETUP
-#line 821 "./wikilex.l"
+#line 820 "./wikilex.l"
 { PRINT("</TH><TH"); wlex_id_print (STATEPTR); PRINT (">"); }
 	YY_BREAK
 case 110:
 YY_RULE_SETUP
-#line 822 "./wikilex.l"
+#line 821 "./wikilex.l"
 { PRINT("<"); }
 	YY_BREAK
 case 111:
 YY_RULE_SETUP
-#line 823 "./wikilex.l"
+#line 822 "./wikilex.l"
 { ; }
 	YY_BREAK
 case 112:
 YY_RULE_SETUP
-#line 824 "./wikilex.l"
+#line 823 "./wikilex.l"
 { PRINT(wikiyytext); }
 	YY_BREAK
 case 113:
 /* rule 113 can match eol */
 YY_RULE_SETUP
-#line 827 "./wikilex.l"
+#line 826 "./wikilex.l"
 { wlex_reset(~WLEX_RESET_LIST); BEGIN(TABLELINE); STATE(wlex_in_any_text) = 1; PRINT("\n<TABLE class=\"wikitable\">"); }
 	YY_BREAK
 case 114:
@@ -12911,18 +12910,18 @@ case 114:
 (yy_c_buf_p) = yy_cp -= 2;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 828 "./wikilex.l"
+#line 827 "./wikilex.l"
 { PRINT("\n<TR><TD ALIGN=\"center\">"); }
 	YY_BREAK
 case 115:
 YY_RULE_SETUP
-#line 829 "./wikilex.l"
+#line 828 "./wikilex.l"
 { PRINT("\n<TR><TD>"); }
 	YY_BREAK
 case 116:
 /* rule 116 can match eol */
 YY_RULE_SETUP
-#line 830 "./wikilex.l"
+#line 829 "./wikilex.l"
 { PRINT("</TD></TR>"); }
 	YY_BREAK
 case 117:
@@ -12931,7 +12930,7 @@ case 117:
 (yy_c_buf_p) = yy_cp = yy_bp + 1;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 831 "./wikilex.l"
+#line 830 "./wikilex.l"
 { PRINT("</TD></TR>\n</TABLE>\n"); BEGIN(INITIAL); wlex_reset(~WLEX_RESET_LIST); }
 	YY_BREAK
 case 118:
@@ -12939,7 +12938,7 @@ case 118:
 (yy_c_buf_p) = yy_cp = yy_bp + 1;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 832 "./wikilex.l"
+#line 831 "./wikilex.l"
 { PRINT("</TD><TD ALIGN=\"center\">"); }
 	YY_BREAK
 case 119:
@@ -12947,33 +12946,33 @@ case 119:
 (yy_c_buf_p) = yy_cp = yy_bp + 1;
 YY_DO_BEFORE_ACTION; /* set up wikiyytext again */
 YY_RULE_SETUP
-#line 833 "./wikilex.l"
+#line 832 "./wikilex.l"
 { PRINT("</TD><TD STYLE=\"colspanstub\">"); }
 	YY_BREAK
 case 120:
 YY_RULE_SETUP
-#line 834 "./wikilex.l"
+#line 833 "./wikilex.l"
 { PRINT("</TD><TD>"); }
 	YY_BREAK
 case 121:
 YY_RULE_SETUP
-#line 835 "./wikilex.l"
+#line 834 "./wikilex.l"
 { PRINT("</TD><TD>"); }
 	YY_BREAK
 case 122:
 /* rule 122 can match eol */
 YY_RULE_SETUP
-#line 836 "./wikilex.l"
+#line 835 "./wikilex.l"
 { ; }
 	YY_BREAK
 case 123:
 YY_RULE_SETUP
-#line 837 "./wikilex.l"
+#line 836 "./wikilex.l"
 { PRINT("<"); }
 	YY_BREAK
 case 124:
 YY_RULE_SETUP
-#line 838 "./wikilex.l"
+#line 837 "./wikilex.l"
 { PRINT(wikiyytext); }
 	YY_BREAK
 /* Inlined verbatims
@@ -12984,22 +12983,22 @@ YY_RULE_SETUP
 /* Others */
 case 125:
 YY_RULE_SETUP
-#line 848 "./wikilex.l"
+#line 847 "./wikilex.l"
 { COPYTEXT; }
 	YY_BREAK
 case 126:
 YY_RULE_SETUP
-#line 849 "./wikilex.l"
+#line 848 "./wikilex.l"
 { COPYTEXT; }
 	YY_BREAK
 case 127:
 YY_RULE_SETUP
-#line 850 "./wikilex.l"
+#line 849 "./wikilex.l"
 { PRINTTEXT("<"); }
 	YY_BREAK
 case 128:
 YY_RULE_SETUP
-#line 851 "./wikilex.l"
+#line 850 "./wikilex.l"
 { COPYTEXT; }
 	YY_BREAK
 case YY_STATE_EOF(INITIAL):
@@ -13008,15 +13007,15 @@ case YY_STATE_EOF(PLAINHTML):
 case YY_STATE_EOF(TABLELINE):
 case YY_STATE_EOF(TABLEHEADER):
 case YY_STATE_EOF(WIKTOLOGY):
-#line 852 "./wikilex.l"
+#line 851 "./wikilex.l"
 { wlex_reset (~0); return 0; }
 	YY_BREAK
 case 129:
 YY_RULE_SETUP
-#line 854 "./wikilex.l"
+#line 853 "./wikilex.l"
 ECHO;
 	YY_BREAK
-#line 13020 "wikilex.c"
+#line 13019 "wikilex.c"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -13989,7 +13988,7 @@ void wikiyyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 854 "./wikilex.l"
+#line 853 "./wikilex.l"
 
 
 /*<INITIAL>.([^ \t\r\n\[\]#*_=<A-Z1-9-]*)	{ COPYTEXT; }*/
diff --git a/appsrc/ODS-Wiki/plugin/wikilex.l b/appsrc/ODS-Wiki/plugin/wikilex.l
index 2a34ab9..913255a 100644
--- a/appsrc/ODS-Wiki/plugin/wikilex.l
+++ b/appsrc/ODS-Wiki/plugin/wikilex.l
@@ -1,11 +1,11 @@
 %{
 /*
- *  $Id: wikilex.l,v 1.15.2.2 2010/09/20 10:15:54 source Exp $
+ *  $Id: wikilex.l,v 1.15.2.4 2012/03/08 11:46:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,6 @@
  *  You should have received a copy of the GNU General Public License along
  *  with this program; if not, write to the Free Software Foundation, Inc.,
  *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 #include <ctype.h>
diff --git a/appsrc/ODS-Wiki/plugin/wikiv.c b/appsrc/ODS-Wiki/plugin/wikiv.c
index 3a64f6e..5657478 100644
--- a/appsrc/ODS-Wiki/plugin/wikiv.c
+++ b/appsrc/ODS-Wiki/plugin/wikiv.c
@@ -1,10 +1,10 @@
 /*
- * $Id: wikiv.c,v 1.6.2.1 2010/09/20 10:15:54 source Exp $
+ * $Id: wikiv.c,v 1.6.2.2 2012/03/08 10:46:23 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/plugins.sql b/appsrc/ODS-Wiki/plugins.sql
index bf8b6e0..6fe521d 100644
--- a/appsrc/ODS-Wiki/plugins.sql
+++ b/appsrc/ODS-Wiki/plugins.sql
@@ -1,12 +1,12 @@
 --
---  $Id: plugins.sql,v 1.4.2.1 2010/09/20 10:15:46 source Exp $
+--  $Id: plugins.sql,v 1.4.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  Atom publishing protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/postinstall.sql b/appsrc/ODS-Wiki/postinstall.sql
index 1719446..d6a5efa 100644
--- a/appsrc/ODS-Wiki/postinstall.sql
+++ b/appsrc/ODS-Wiki/postinstall.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: postinstall.sql,v 1.15.2.1 2010/09/20 10:15:46 source Exp $
+--  $Id: postinstall.sql,v 1.15.2.4 2012/03/08 10:49:48 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -42,7 +42,7 @@ WV.WIKI.SET_WIKI_MAIN();
 WV.WIKI.SANITY_CHECK();
 WV.WIKI.CREATEINSTANCE('Main', http_dav_uid(), WV.Wiki.WikiAdminGId(), 0);
 WV.WIKI.CREATEINSTANCE('Doc', http_dav_uid(), WV.Wiki.WikiAdminGId(), 0);
-sioc..fill_comments();
+SIOC..fill_comments();
 WV.WIKI.PUT_NEW_FILES('Main');
 WV.WIKI.PUT_NEW_FILES('Doc',1);
 WV.WIKI.PUT_NEW_FILES('Main',1,'WikiUsers');
@@ -57,7 +57,8 @@ create procedure WV.WIKI.temp ()
   declare _content, _type any;
 
   _topic_id := (select TopicId from WV.Wiki.CLUSTERS a, WV.Wiki.TOPIC b where a.ClusterId = b.ClusterId and a.ClusterName = 'Main' and b.LocalName = 'WMacros');
-  if (not isnull (_topic_id)) {
+  if (not isnull (_topic_id))
+  {
   DB.DBA.DAV_RES_CONTENT_INT (DAV_SEARCH_ID ('/DAV/VAD/wiki/Main/Attachments/WikiMacroSources.sql', 'R'), _content, _type, 0, 0);
   WV.WIKI.ATTACH2 (http_dav_uid(), 'WikiMacroSources.sql', _type, _topic_id, _content, '');
 }
@@ -65,4 +66,34 @@ create procedure WV.WIKI.temp ()
 ;
 
 WV.WIKI.temp ();
+
+create procedure WV.WIKI.temp ()
+{
+  if (registry_get ('wiki_services_update') = '1')
+    return;
+
+  SIOC..fill_ods_wiki_services();
+  registry_set ('wiki_services_update', '1');
+}
+;
+WV.WIKI.temp ();
+
+create procedure WV.WIKI.temp ()
+{
+  if (registry_get ('wiki_acl_update') = '1')
+    return;
+
+  for (select ClusterId as _ClusterId, ClusterName as _ClusterName, ColId as _ColId from WV.WIKI.CLUSTERS) do
+  {
+    for (select TopicId as _TopicId, ResId as _ResId from WV.WIKI.TOPIC where ClusterId = _ClusterId) do
+    {
+      WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL (_ClusterName, _ResId, 'R', 0);
+    }
+    WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL (_ClusterName, _ColId, 'C', 0);
+  }
+  registry_set ('wiki_acl_update', '1');
+}
+;
+WV.WIKI.temp ();
+
 drop procedure WV.WIKI.temp;
diff --git a/appsrc/ODS-Wiki/proc_on.sql b/appsrc/ODS-Wiki/proc_on.sql
index 89dd649..5cfaff1 100644
--- a/appsrc/ODS-Wiki/proc_on.sql
+++ b/appsrc/ODS-Wiki/proc_on.sql
@@ -1,10 +1,10 @@
 --
---  $Id: proc_on.sql,v 1.44.2.13 2011/03/26 14:21:51 source Exp $
+--  $Id: proc_on.sql,v 1.44.2.17 2012/03/08 10:49:48 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -694,11 +694,16 @@ create function WV.WIKI.POSTPROCESS_LINKS (in _cluster_id integer)
 -- _total - number of version in report, 0 means not such constraint
 create method ti_revisions(in _res_is_vect integer, in _total integer) returns any for WV.WIKI.TOPICINFO
 {
-  declare exit handler for sqlstate '*' {
+  declare exit handler for NOT FOUND
+  {
+    return null;
+  };
+  declare exit handler for sqlstate '*'
+  {
     --dbg_obj_print (__SQL_STATE, __SQL_MESSAGE);
     resignal;
-  }
-  ;
+  };
+
   declare _res, _ent any;
   declare path, revs varchar;
   if (_res_is_vect)
@@ -1060,7 +1065,8 @@ wiki_exec_no_error ('drop trigger WS.WS.Wiki_AttachmentDelete')
 -- new triggers
 wiki_exec_no_error ('drop trigger WS.WS.WIKI_SYS_DAV_RES_AI')
 ;
-create trigger "WIKI_SYS_DAV_RES_AI" after insert on WS.WS.SYS_DAV_RES order 1 referencing new as N
+
+create trigger "WIKI_SYS_DAV_RES_AI" after insert on WS.WS.SYS_DAV_RES order 10 referencing new as N
 {
   declare _id any;
   declare _cluster_name varchar;
@@ -1103,9 +1109,9 @@ create trigger "WIKI_SYS_DAV_RES_AI" after insert on WS.WS.SYS_DAV_RES order 1 r
       }
 
       -- Topic Update Permissions
-  SET TRIGGERS OFF;
-  WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL ( _cluster_name, N.RES_ID, 'R');
-  SET TRIGGERS ON;
+      -- SET TRIGGERS OFF;
+      -- WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL ( _cluster_name, N.RES_ID, 'R');
+      -- SET TRIGGERS ON;
 
       -- Topic Sparql
       if (N.RES_TYPE = 'application/sparql-query')
@@ -1131,12 +1137,29 @@ create trigger "WIKI_SYS_DAV_RES_AI" after insert on WS.WS.SYS_DAV_RES order 1 r
 }
 ;
 
+wiki_exec_no_error ('drop trigger WS.WS.WIKI_SYS_DAV_RES_BU')
+;
+
+create trigger "WIKI_SYS_DAV_RES_BU" before update on WS.WS.SYS_DAV_RES order 1 referencing old as O, new as N
+{
+  declare exit handler for sqlstate '*'
+  {
+    --dbg_obj_princ (__SQL_STATE, __SQL_MESSAGE);
+    resignal;
+  };
+  if (O.RES_NAME like '%.txt' and O.RES_CONTENT is not null)
+    connection_set ('DAV_RES_CONTENT_MD5', md5 (cast (O.RES_CONTENT as varchar)));
+}
+;
+
+
 wiki_exec_no_error ('drop trigger WS.WS.WIKI_SYS_DAV_RES_AU')
 ;
-create trigger "WIKI_SYS_DAV_RES_AU" after update on WS.WS.SYS_DAV_RES order 1 referencing old as O, new as N
+
+create trigger "WIKI_SYS_DAV_RES_AU" after update on WS.WS.SYS_DAV_RES order 10 referencing old as O, new as N
 {
   declare _id integer;
-  declare _cluster_name, _local_name varchar;
+  declare _o_res_content_md5, _cluster_name, _local_name varchar;
   declare _topic WV.WIKI.TOPICINFO;
   declare exit handler for sqlstate '*'
   {
@@ -1152,7 +1175,8 @@ create trigger "WIKI_SYS_DAV_RES_AU" after update on WS.WS.SYS_DAV_RES order 1 r
     _cluster_name := (select ClusterName from WV.WIKI.CLUSTERS where ColId = N.RES_COL);
     if (not isnull (_cluster_name))
 {
-      if (O.RES_CONTENT <> N.RES_CONTENT)
+      _o_res_content_md5 := connection_get ('DAV_RES_CONTENT_MD5');
+      if (_o_res_content_md5 <> md5 (cast (N.RES_CONTENT as varchar)))
     {
       _topic := WV.WIKI.TOPICINFO();
         _topic.ti_cluster_name := _cluster_name;
@@ -1167,7 +1191,7 @@ create trigger "WIKI_SYS_DAV_RES_AU" after update on WS.WS.SYS_DAV_RES order 1 r
         else
         {
           _topic.ti_e_mail := (select MailBox from WV.WIKI.TOPIC where TopicId = _id);
-          WV..ADD_HIST_ENTRY(_cluster_name, _local_name, 'U', sprintf ('1.%d', (select max(RV_ID) from ws.ws.sys_dav_res_version where RV_RES_ID = N.RES_ID)));
+          WV..ADD_HIST_ENTRY(_cluster_name, _local_name, 'U', sprintf ('1.%d', coalesce((select max(RV_ID) from ws.ws.sys_dav_res_version where RV_RES_ID = N.RES_ID), 1)));
     }
         _topic.ti_id := _id;
         _topic.ti_res_id := N.RES_ID;
@@ -1179,9 +1203,9 @@ create trigger "WIKI_SYS_DAV_RES_AU" after update on WS.WS.SYS_DAV_RES order 1 r
 }
 
       -- Topic Update Permissions
-  SET TRIGGERS OFF;
-  WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL ( _cluster_name, N.RES_ID, 'R');
-  SET TRIGGERS ON;
+      -- SET TRIGGERS OFF;
+      -- WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL ( _cluster_name, N.RES_ID, 'R');
+      -- SET TRIGGERS ON;
 
       -- Topic Sparql
       if (N.RES_TYPE = 'application/sparql-query')
@@ -1271,8 +1295,8 @@ create function WV.WIKI.READONLYWIKIWORDLINK (
   _topic.ti_parse_raw_name ();
   if (_topic.ti_cluster_name = '')
     return '';
+
   return _topic.ti_cluster_name || '/' || _topic.ti_local_name;
---  return '?WikiCluster=' || _topic.ti_cluster_name || '&WikiWord=' || _topic.ti_local_name;
 }
 ;
 
@@ -1765,97 +1789,102 @@ create procedure WV.WIKI.CREATEROLES (in _cname varchar)
 }
 ;
 
-create procedure WV.WIKI.UPDATEACL (in _article varchar, in _gid integer, in _bitmask integer, in _auth_name varchar, in _auth_pwd varchar)
+create procedure WV.WIKI.UPDATEACL (
+  in _path varchar,
+  in _type varchar,
+  in _gid integer,
+  in _bitmask integer,
+  in _auth_name varchar,
+  in _auth_pwd varchar)
 {
-  --dbg_obj_princ ('UPDATEACL: ', _article, ' ', _gid, ' ', '_bitmask', ' ');
   declare _acl any;
-  _acl := DB.DBA.DAV_PROP_GET(_article, ':virtacl', _auth_name, _auth_pwd);
+  declare _res integer;
+  declare _new_acl any;
+
+  _acl := DB.DBA.DAV_PROP_GET_INT (DB.DBA.DAV_SEARCH_ID (_path, _type), _type, ':virtacl', 0);
   if (not isinteger (_acl))
     {
-      declare _res integer;
-      declare _new_acl, _old_acl any;
       _acl := cast (_acl as varbinary);
-      _old_acl := _acl;
-      _new_acl := WS.WS.ACL_ADD_ENTRY(_old_acl, _gid, _bitmask, 1);
-      --dbg_obj_print (ws.ws.ACL_PARSE(_acl), ws.ws.acl_parse(_new_acl));
+    _new_acl := _acl;
+    WS.WS.ACL_REMOVE_ENTRY(_new_acl, _gid, _bitmask, 0);
+    if (_type = 'C')
+      WS.WS.ACL_ADD_ENTRY(_new_acl, _gid, _bitmask, 1, 1);
       if (1 or _acl <> _new_acl)
         {
-	  _acl := _new_acl;
-	  --dbg_obj_princ (_article, _gid, _auth_name, _auth_pwd, _acl);
-      	  _res := DB.DBA.DAV_PROP_SET_INT(_article, ':virtacl',  _acl, null, null, 0, 0, 0, http_dav_uid ());
+      _res := DB.DBA.DAV_PROP_SET_INT (_path, ':virtacl', _new_acl, null, null, 0, 0, 0, http_dav_uid ());
       	  if (_res < 0)
-        	signal ('WIKI00', sprintf ('Can not update ACL: %d %d',_res,coalesce ((select top 1 RES_OWNER from WS.WS.SYS_DAV_RES where RES_ID = (select RES_ID from WS.WS.SYS_DAV_RES where RES_FULL_PATH = _article)), 0))); 
+        signal ('WIKI00', sprintf ('Can not update ACL: %d %d', _res, coalesce ((select top 1 RES_OWNER from WS.WS.SYS_DAV_RES where RES_ID = (select RES_ID from WS.WS.SYS_DAV_RES where RES_FULL_PATH = _path)), 0)));
 	}
     }
-  else
-    signal ('WIKI01', ':virtacl property retrieval failed: ' || DAV_PERROR (_acl));
 }
 ;
 
-create procedure WV.WIKI.UPDATEGRANTS (in _cname varchar, in signalerror int:=0)
+create procedure WV.WIKI.UPDATEGRANTS (
+  in _cname varchar,
+  in _signal integer := 0)
 {
   declare _readers, _writers integer;
-  _readers := ( select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Readers'
-  			and U_IS_ROLE = 1 );
-  _writers := ( select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Writers'
-  			and U_IS_ROLE = 1 );
+
+  _readers := (select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Readers' and U_IS_ROLE = 1);
+  _writers := (select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Writers' and U_IS_ROLE = 1);
   if ( (_readers is null) or (_writers is null) )
     {
-      if (signalerror)
+    if (_signal)
     signal ('WK002', 'No readers or writers group for ' || _cname);
-      else
+
 	 return;
     }
-  for select DAV_HIDE_ERROR (DB.DBA.DAV_SEARCH_PATH (ResId, 'R')) as _path
-    from WV.WIKI.TOPIC natural inner join WV.WIKI.CLUSTERS
-    where clustername = _cname
-  do {
+  for (select DAV_HIDE_ERROR (DB.DBA.DAV_SEARCH_PATH (ResId, 'R')) as _path
+         from WV.WIKI.TOPIC natural
+                inner join WV.WIKI.CLUSTERS
+        where clustername = _cname) do
+  {
     if (_path is not null) 
       {
     declare _owner, _pwd varchar;
+
         _owner := WV.WIKI.CLUSTERPARAM (_cname, 'creator', 'dav');
-    select U_NAME, pwd_magic_calc (U_NAME, U_PASSWORD, 1) into _owner, _pwd
-            from DB.DBA.SYS_USERS 
-	    where U_NAME = _owner;
+      select U_NAME, pwd_magic_calc (U_NAME, U_PASSWORD, 1) into _owner, _pwd from DB.DBA.SYS_USERS where U_NAME = _owner;
 
-    WV.WIKI.UPDATEACL (_path, _writers, 6, _owner, _pwd);
-    WV.WIKI.UPDATEACL (_path, _readers, 4, _owner, _pwd);
+      WV.WIKI.UPDATEACL (_path, 'R', _writers, 6, _owner, _pwd);
+      WV.WIKI.UPDATEACL (_path, 'R', _readers, 4, _owner, _pwd);
   }
   }
 }
 ;
 
-create procedure WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL (in _cname varchar, in _res_id integer, in _type varchar(1):='R')
+create procedure WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL (
+  in _cname varchar,
+  in _id integer,
+  in _type varchar(1) := 'R',
+  in _signal integer := 1)
 {
   declare _readers, _writers integer;
   declare _path varchar;
   declare _owner, _pwd varchar;
   
-  _readers := ( select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Readers'
-  			and U_IS_ROLE = 1 );
-  _writers := ( select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Writers'
-  			and U_IS_ROLE = 1 );
+  _readers := ( select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Readers' and U_IS_ROLE = 1 );
+  _writers := ( select U_ID from DB.DBA.SYS_USERS where U_NAME = _cname || 'Writers' and U_IS_ROLE = 1 );
   if ( (_readers is null) or (_writers is null) )
+  {
+    if (_signal)
     signal ('XXXXX', 'No readers or writers group for ' || _cname);
-  _path := DB.DBA.DAV_SEARCH_PATH (_res_id, _type);
-  --dbg_obj_princ (':::' , _path);
-  if (not isinteger (_path))
+    return;
+  }
+
+  _path := DB.DBA.DAV_SEARCH_PATH (_id, _type);
+  if (isinteger (_path))
     {
-      _owner := WV.WIKI.CLUSTERPARAM (_cname, 'creator', 'dav');
-      select U_NAME, pwd_magic_calc (U_NAME, U_PASSWORD, 1) into _owner, _pwd
-        from DB.DBA.SYS_USERS 
-	where U_NAME = _owner;
-
-
---      declare _cluster_id integer;
---      _cluster_id := (select ClusterId from WV.WIKI.CLUSTERS where ClusterName = _cname);
---     update WS.WS.SYS_DAV_COL set COL_PERMS = WV.WIKI.GETDEFAULTPERMS (_cluster_id)
---      	where COL_ID = _res_id;
-      WV.WIKI.UPDATEACL (_path, _writers, 6, _owner, _pwd);
-      WV.WIKI.UPDATEACL (_path, _readers, 4, _owner, _pwd);
-    }
-  else
-    signal ('XXXX', 'path is unknown');
+    if (_signal)
+      signal ('XXXXX', 'path is unknown');
+    return;
+  }
+
+  _owner := WV.WIKI.CLUSTERPARAM (_cname, 'creator', 'dav');
+  select U_NAME, pwd_magic_calc (U_NAME, U_PASSWORD, 1) into _owner, _pwd from DB.DBA.SYS_USERS where U_NAME = _owner;
+
+  WV.WIKI.UPDATEACL (_path, _type, _writers, 6, _owner, _pwd);
+  WV.WIKI.UPDATEACL (_path, _type, _readers, 4, _owner, _pwd);
 }
 ;
   
@@ -1863,14 +1892,14 @@ create procedure WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL (in _cname varchar, in _res
 -- create all parent collections
 create procedure WV.WIKI.ENSURE_DIR_REC (in _paths any, in _last_index integer)
 {
-  --dbg_obj_princ ('WV.WIKI.ENSURE_DIR_REC ', _paths, _last_index);
   if (_last_index <= 2) -- /DAV
     return 1;
+
   declare _col_id integer;
   declare _full_path varchar;
+
   _full_path := WV.WIKI.STRJOIN ('/', subseq (_paths, 0, _last_index)) || '/';
   _col_id := DAV_SEARCH_ID (_full_path, 'C');
-  --dbg_obj_princ ('col_id: ', _col_id, _full_path);
   if (DAV_HIDE_ERROR(_col_id) is null)
     {
       if (WV.WIKI.ENSURE_DIR_REC (_paths, _last_index - 1) < 0)
@@ -1881,8 +1910,6 @@ create procedure WV.WIKI.ENSURE_DIR_REC (in _paths any, in _last_index integer)
 }
 ;
       
-  
-
 create procedure WV.WIKI.DAV_HOME_CREATE(in user_name varchar) returns varchar
 {
   declare user_id varchar;
@@ -1931,9 +1958,7 @@ error:
 
 create procedure WV.WIKI.CREATECLUSTER (in _cname varchar, in _src_col integer, in _owner integer, in _group integer, in signal_err int:=1)
 {
-  --dbg_obj_print ('1');
   declare exit handler for sqlstate '42WV9' {
-  --dbg_obj_print ('1err');
 	if (signal_err = 1)
 	   resignal;
 	return;
@@ -1945,33 +1970,27 @@ create procedure WV.WIKI.CREATECLUSTER (in _cname varchar, in _src_col integer,
 -- Preparing user name
   _uname := coalesce ((select U_NAME from DB.DBA.SYS_USERS where U_ID = _owner and U_IS_ROLE = 0), NULL);
   if (_uname is null)
-    WV.WIKI.APPSIGNAL (11001, 'User ID "&UId;" is invalid; can not create cluster "&ClusterName;"',
-      vector ('UId', _owner, 'ClusterName', _cname) );
-  --dbg_obj_print ('2');
+    WV.WIKI.APPSIGNAL (11001, 'User ID "&UId;" is invalid; can not create cluster "&ClusterName;"', vector ('UId', _owner, 'ClusterName', _cname) );
 
   if (exists (select 1 from DB.DBA.SYS_USERS where U_ID = _owner and U_ACCOUNT_DISABLED <> 0))
-    WV.WIKI.APPSIGNAL (11001, 'Account "&UName;" is disabled; can not create cluster "&ClusterName;"',
-      vector ('UName', _uname, 'ClusterName', _cname) );
-  --dbg_obj_print ('4');
+    WV.WIKI.APPSIGNAL (11001, 'Account "&UName;" is disabled; can not create cluster "&ClusterName;"', vector ('UName', _uname, 'ClusterName', _cname) );
 
   if (exists (select 1 from DB.DBA.SYS_USERS where U_ID = _owner and U_DAV_ENABLE = 0))
-    WV.WIKI.APPSIGNAL (11001, 'Account "&UName;" has no right to use DAV; can not create cluster "&ClusterName;"',
-      vector ('UName', _uname, 'ClusterName', _cname) );	
+    WV.WIKI.APPSIGNAL (11001, 'Account "&UName;" has no right to use DAV; can not create cluster "&ClusterName;"', vector ('UName', _uname, 'ClusterName', _cname) );
+
   _wikiuname := coalesce ((select UserName from WV.WIKI.USERS where UserId = _owner), NULL);
   if (_wikiuname is null)
-    WV.WIKI.APPSIGNAL (11001, 'User "&UserName;" is not a registered Wiki user; can not create cluster "&ClusterName;"',
-      vector ('UserName', _uname, 'ClusterName', _cname) );
+    WV.WIKI.APPSIGNAL (11001, 'User "&UserName;" is not a registered Wiki user; can not create cluster "&ClusterName;"', vector ('UserName', _uname, 'ClusterName', _cname) );
+
 -- Preparing group name
   _gname := coalesce ((select U_NAME from DB.DBA.SYS_USERS where U_ID = _group and U_IS_ROLE = 1), NULL);
   if (_gname is null)
-    WV.WIKI.APPSIGNAL (11001, 'Group ID "&GId;" is invalid; can not create cluster "&ClusterName;"',
-      vector ('GId', _group, 'ClusterName', _cname) );
-  --dbg_obj_print ('5');
+    WV.WIKI.APPSIGNAL (11001, 'Group ID "&GId;" is invalid; can not create cluster "&ClusterName;"', vector ('GId', _group, 'ClusterName', _cname) );
 
   _wikigname := coalesce ((select GroupName from WV.WIKI.GROUPS where GroupId = _group), NULL);
   if (_wikigname is null)
-    WV.WIKI.APPSIGNAL (11001, 'Group "&UserName;" is not a valid Wiki group; can not create cluster "&ClusterName;"',
-      vector ('GName', _gname, 'ClusterName', _cname) );
+    WV.WIKI.APPSIGNAL (11001, 'Group "&UserName;" is not a valid Wiki group; can not create cluster "&ClusterName;"', vector ('GName', _gname, 'ClusterName', _cname) );
+
 -- Preparing parent for internal files
   _home := (select U_HOME from DB.DBA.SYS_USERS where U_ID = _owner and U_IS_ROLE = 0);
   if (_home is not null)
@@ -1987,11 +2006,8 @@ create procedure WV.WIKI.CREATECLUSTER (in _cname varchar, in _src_col integer,
 -- Check if a cluster is already registered.
   if (exists (select * from WV.WIKI.CLUSTERS where ClusterName = _cname))
     {
-  --dbg_obj_print ('7');
-
       if (signal_err = 1)
-	WV.WIKI.APPSIGNAL (11001, 'Cluster "&ClusterName;" already exists',
-				 vector ('ClusterName', _cname) );
+        WV.WIKI.APPSIGNAL (11001, 'Cluster "&ClusterName;" already exists', vector ('ClusterName', _cname) );
       else
 	return;
     }
@@ -1999,27 +2015,23 @@ create procedure WV.WIKI.CREATECLUSTER (in _cname varchar, in _src_col integer,
   if (_src_col <> 0)
     {
       if (DB.DBA.DAV_SEARCH_PATH (_src_col, 'C') < 0)
-	WV.WIKI.APPSIGNAL (11001, 'Invalid DAV collection ID "&ColId;"; can not create cluster "&ClusterName;"',
-	  vector ('ColId', _src_col, 'ClusterName', _cname) );
+        WV.WIKI.APPSIGNAL (11001, 'Invalid DAV collection ID "&ColId;"; can not create cluster "&ClusterName;"', vector ('ColId', _src_col, 'ClusterName', _cname) );
       _main := _src_col;
     }
   else
     {
       _main := WV.WIKI.CREATEDAVCOLLECTION (_parent, _cname, _owner, _group);
     }
-  --dbg_obj_print ('8');
 
   if (__proc_exists('DB.DBA.Versioning_DAV_SEARCH_ID'))
     {
       _histcol := WV.WIKI.CREATEDAVCOLLECTION (_main, 'VVC', _owner, _group);
       DB.DBA.DAV_SET_VERSIONING_CONTROL (DAV_SEARCH_PATH (_main, 'C'), NULL, 'A', 'dav', (select pwd_magic_calc (U_NAME, U_PWD, 1) from WS.WS.SYS_DAV_USER where U_ID = http_dav_uid() ));
     }
-next:
-    --dbg_obj_print ('9');
 
-  _xmlcol := WV.WIKI.CREATEDAVCOLLECTION (_main, 'xml', _owner, _group);
-  _attachcol := WV.WIKI.CREATEDAVCOLLECTION (_main, 'attach', _owner, _group);
+next:
   declare _cluster_id integer;
+
   _cluster_id := WV.WIKI.NEWCLUSTERID();
   insert into WV.WIKI.CLUSTERS (ClusterId, ClusterName, ColId, ColHistoryId, ColXmlId, ColAttachId, AdminId, C_NEWS_ID)
     values (_cluster_id, _cname, _main, _histcol, _xmlcol, _attachcol, _owner, 'oWiki-' || _cname);
@@ -2039,21 +2051,15 @@ next:
 	NULL,
 	NULL);
     WV.WIKI.GETLOCK (_full_path, 'dav');
-    _res := WV.WIKI.UPLOADPAGE (_col_id, _name, blob_to_string (_content) || ' ',
-       _uname, _cluster_id, 'dav');
---    DB.DBA.DAV_CHECKIN_INT (_full_path, null, null, 0);
+    _res := WV.WIKI.UPLOADPAGE (_col_id, _name, blob_to_string (_content) || ' ', _uname, _cluster_id, 'dav');
     WV.WIKI.RELEASELOCK (_full_path, 'dav');
   }
   WV.WIKI.CREATEROLES (_cname);
-  --dbg_obj_print ('11');
 
-  if ( (_cname <> 'Main') and
-       (_cname <> 'Doc'))
+  if ((_cname <> 'Main') and (_cname <> 'Doc'))
     {
       WV.WIKI.UPDATEGRANTS_FOR_RES_OR_COL (_cname, _main, 'C');
       WV.WIKI.IMPORT(_cname, '/DAV/VAD/wiki/Template/', '/DAV/VAD/wiki/Template/', 'dav');
---      WV.WIKI.CREATEINITIALPAGE ('ClusterSummary.txt', _main, _owner, 'Template');
---      WV.WIKI.CREATEINITIALPAGE ('WelcomeVisitors.txt', _main, _owner, 'Template');
     }
   else
     {
@@ -2065,8 +2071,6 @@ next:
     }
 	  
   WV.WIKI.SETCLUSTERPARAM (_cname, 'creator', _uname);
-  --dbg_obj_print ('12');
-
 }
 ;
 
@@ -2104,15 +2108,16 @@ create procedure WV.WIKI.UPLOADPAGE (
   connection_set ('oWiki_cluster_id', null);
   declare wiki_user varchar;
   declare user_id integer;
+
   user_id := (select U_ID from DB.DBA.SYS_USERS where U_NAME = _user);
   wiki_user := WV.WIKI.USER_WIKI_NAME_2 (user_id);
-  update WV.WIKI.TOPIC set AuthorName = 'Main.' || wiki_user 
-  	, AuthorId = user_id
+  update WV.WIKI.TOPIC
+     set AuthorName = 'Main.' || wiki_user,
+         AuthorId = user_id
      where ResId = _res_id;
      
   if (_res_id < 0)
     WV.WIKI.APPSIGNAL (11001, 'Cannot upload content at &path;', vector ('path', _path));
-   --dbg_obj_princ ('perms=', _perms, ' res= ', _res_id);
   return _res_id;
 }
 ;
@@ -2133,19 +2138,15 @@ create procedure WV.WIKI.CREATEINITIALPAGE (in _page varchar,
     {
       declare _fullpath varchar;
       _fullpath := DB.DBA.DAV_SEARCH_PATH (_main, 'C') || _page;
---      WV.WIKI.GETLOCK (_fullpath, 'dav');
       WV.WIKI.UPLOADPAGE (_main, _page, _content, _owner, 0, 'dav', _overwrite);
---      DB.DBA.DAV_CHECKIN_INT (_fullpath, null, null, 0);
---      WV.WIKI.RELEASELOCK (_fullpath, 'dav');
     }
-fin:
-	;
+fin:;
 }
 ;
 
+
 create procedure WV.WIKI.DELETETOPIC (in _id integer)
 {
-  --dbg_obj_princ ('DELETETOPIC: ', _id);
   delete from WV.WIKI.TOPIC where TopicId = _id;
   if (__proc_exists ('DB.DBA.WA_NEW_WIKI_RM'))
      WA_NEW_WIKI_RM (_id);
diff --git a/appsrc/ODS-Wiki/proc_on_api.sql b/appsrc/ODS-Wiki/proc_on_api.sql
index 96b4afc..a9990d0 100644
--- a/appsrc/ODS-Wiki/proc_on_api.sql
+++ b/appsrc/ODS-Wiki/proc_on_api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: proc_on_api.sql,v 1.1.2.6 2011/03/26 14:21:51 source Exp $
+--  $Id: proc_on_api.sql,v 1.1.2.7 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/proc_on_macro.sql b/appsrc/ODS-Wiki/proc_on_macro.sql
index 9344a03..80c9176 100644
--- a/appsrc/ODS-Wiki/proc_on_macro.sql
+++ b/appsrc/ODS-Wiki/proc_on_macro.sql
@@ -1,10 +1,10 @@
 --
---  $Id: proc_on_macro.sql,v 1.22.2.5 2011/01/31 11:17:53 source Exp $
+--  $Id: proc_on_macro.sql,v 1.22.2.7 2012/03/08 13:13:48 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -914,7 +914,7 @@ create function WV.WIKI.MACRO_COMMUNITYTABS (inout _data varchar, inout _context
 };
 
 create function WV.WIKI.MACRO_BLOGNAV (inout _data varchar, inout _context any, inout _env any) {
-  return '<div style="width: 100%; clear: both; float: none; margin-top:  5em"><hr /></div><div id="blognav" style="width: 100%; padding: 3px;  background: #2CBCEF; color: white; font-family: helvetica; font-size:  10pt; text-align: left; float:none; clear:both">Copyright (C) 1998-2010 [[http://www.openlinksw.com/][OpenLink Software]]</div>';
+  return '<div style="width: 100%; clear: both; float: none; margin-top:  5em"><hr /></div><div id="blognav" style="width: 100%; padding: 3px;  background: #2CBCEF; color: white; font-family: helvetica; font-size:  10pt; text-align: left; float:none; clear:both">Copyright (C) 1998-2012 [[http://www.openlinksw.com/][OpenLink Software]]</div>';
 };
 
 create function WV.WIKI.MACRO_VSREALM (inout _data varchar, inout _context any, inout _env any) {
diff --git a/appsrc/ODS-Wiki/proc_on_vsp.sql b/appsrc/ODS-Wiki/proc_on_vsp.sql
index 0d83432..a5088a8 100644
--- a/appsrc/ODS-Wiki/proc_on_vsp.sql
+++ b/appsrc/ODS-Wiki/proc_on_vsp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: proc_on_vsp.sql,v 1.44.2.9 2011/03/26 14:21:51 source Exp $
+--  $Id: proc_on_vsp.sql,v 1.44.2.13 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -75,12 +75,6 @@ create function WV.WIKI.VSPTOPICCREATE (
   _topic.ti_fill_cluster_by_name();
   WV.WIKI.CHECKWRITEACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id, 'Owner of this cluster does not allow you to create new topics');
 
---  _topic.ti_http_debug_print('VspTopicCreate: info about current topic');
---  if (0 = WS.WS.CHECK_READ_ACCESS (_uid, _topic.ti_res_id))
---    {
---      VspReportFailedReadAccess (path, params, lines, _topic.ti_cluster_name, _topic.ti_local_name, '');
---      return;
---    }
   declare _ext_params any;
   declare _template varchar;
   if (_topic.ti_local_name like 'Category%')
@@ -116,12 +110,15 @@ create function WV.WIKI.VSPTOPICVIEW (
 --  dbg_obj_print ('ot WV.WIKI.VSPTOPICVIEW, uid: ', get_keyword ('uid', params));
 --  dbg_obj_print (_topic);
   declare _uid int;
-  declare _base_adjust, _command varchar;
+  declare _iri, _base_adjust, _command varchar;
+
+  _iri := SIOC..wiki_post_iri_2 (_topic.ti_id);
   _uid := get_keyword ('uid', params);
   _base_adjust := get_keyword ('baseadjust', params);
   _command := WV.WIKI.GET_COMMAND(params);
   declare _text, _is_hist varchar;  
-  declare exit handler for sqlstate '42WV9' {
+  declare exit handler for sqlstate '42WV9'
+  {
     --dbg_obj_princ ('WV.WIKI.VSPTOPICVIEW ', params);
     if (get_keyword ('lastop', params) is not null 
         or (get_keyword ('lastop', params) = 'Logout'))
@@ -138,11 +135,11 @@ create function WV.WIKI.VSPTOPICVIEW (
       WV.WIKI.redirect (sprintf ('%s/login.vspx?URL=%U',  WV..ODS_LINK(lines), 'http://' || DB.DBA.WA_GET_HOST() || http_path() || '?command=null'));
       return;
     }
-  }
-  ;
+  };
+
   whenever sqlstate '22005' goto wrong_rev;
+
   _topic.ti_rev_id := cast (get_keyword ('rev', params, 0) as integer);
-  --dbg_obj_print ('{{{{', _topic.ti_rev_id);
   if (0)
     {
       wrong_rev: 
@@ -152,12 +149,9 @@ create function WV.WIKI.VSPTOPICVIEW (
   _topic.ti_base_adjust := _base_adjust;
   
   _is_hist := '';
-  if (0 < DB.DBA.DAV_SEARCH_ID ( DB.DBA.DAV_SEARCH_PATH (_topic.ti_col_id, 'C') ||
-  	'VVC/' || _topic.ti_local_name || '.txt/', 'C' ))
+  if (0 < DB.DBA.DAV_SEARCH_ID ( DB.DBA.DAV_SEARCH_PATH (_topic.ti_col_id, 'C') || 'VVC/' || _topic.ti_local_name || '.txt/', 'C' ))
     _is_hist := 't';
-  --dbg_obj_print ( 101 );
     
---  _topic.ti_http_debug_print('VspTopicView: info about current topic');
   _topic.ti_curuser_wikiname := coalesce ((select UserName from WV.WIKI.USERS where UserId=_uid), '?');
   _topic.ti_curuser_username := coalesce ((select U_NAME from DB.DBA.SYS_USERS where U_ID=_uid), '?');
   _topic.ti_base_adjust := _base_adjust;
@@ -170,7 +164,8 @@ create function WV.WIKI.VSPTOPICVIEW (
   whenever not found goto ins;
   open cr (prefetch 1);
   fetch cr into _cnt;
-  update WV.WIKI.HITCOUNTER set Cnt = _cnt + 1
+  update WV.WIKI.HITCOUNTER
+     set Cnt = _cnt + 1
   	where current of cr;
   close cr;
   if (0)
@@ -193,17 +188,6 @@ ins:
 
   _tree := 'hide';
   _ext_params := vector_concat (_ext_params, vector ('tree', _tree));
-  _xhtml := _topic.ti_get_entity(null, 1);
-  if (_command not in ('docbook'))
-  {
-   _xhtml := WV.WIKI.VSPXSLT ( 'VspTopicView.xslt', _xhtml, _ext_params);
-  }
-  if (_command = 'xmlraw')
-    {
-      http_rewrite ();
-      http_value (_xhtml); 
-      return 0;
-    }
   if (_command = 'docbook')
 	{
     _xhtml :=
@@ -220,25 +204,35 @@ ins:
 	  return 0;
     }
 
+  _xhtml := _topic.ti_get_entity(null, 1);
+  _xhtml := WV.WIKI.VSPXSLT ( 'VspTopicView.xslt', _xhtml, _ext_params);
+  if (_command = 'xmlraw')
+  {
+    http_rewrite ();
+    http_value (_xhtml);
+    return 0;
+  }
   declare _creator varchar;
+  declare _ods_bar, _app_js any;
+
   _creator := WV.WIKI.CLUSTERPARAM (_topic.ti_cluster_id, 'creator', 'dav');  
   _ext_params := WV.WIKI.USER_PARAMS (_ext_params, _creator, _topic); 
-
-
   http_rewrite ();
   if (get_keyword  ('skin2', params) is not null)
     ODS.BAR._EXEC(null,vector_concat (params, vector ('explicit-host', 1)), lines);
   else
     ODS.BAR._EXEC(null,params, lines);
-  declare _ods_bar, _app_js any;
+
   _ods_bar := http_get_string_output();
   _ods_bar := xtree_doc(_ods_bar);
   _app_js := xtree_doc (WV.Wiki.WIKI_APLUSLINK (_uid), 0);
   _ext_params := vector_concat (_ext_params, vector ('ods-bar', _ods_bar, 'ods-app', _app_js));
   http_rewrite ();
   http_header ('Content-Type: text/html; charset=UTF-8\r\n');
+
   _xhtml := WV.WIKI.VSPXSLT ( 'PostProcess.xslt', _xhtml, vector_concat (_ext_params), WV.WIKI.SKIN_PARAMS (_topic.ti_cluster_id, params));
   http_header ('Content-Type: text/html; charset=UTF-8\r\n');
+  SIOC..rdf_links_header (_iri);
   if (WV.WIKI.CLUSTERPARAM (_topic.ti_cluster_id, 'email-obfuscate') is not null)
   {
   http_value (_xhtml);
@@ -335,11 +329,10 @@ create function WV.WIKI.VSPTOPICEDIT (
 {
   declare _text varchar;
   declare _uid int;
-  declare _base_adjust varchar;
+  declare _iri, _base_adjust varchar;
   _uid := get_keyword ('uid', params);
   _base_adjust := get_keyword ('baseadjust', params);
        
---  _topic.ti_http_debug_print('VspTopicView: info about current topic');
   WV.WIKI.CHECKWRITEACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id);
   WV.WIKI.CHECKREADACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id);
   _topic.ti_curuser_wikiname := coalesce ((select UserName from WV.WIKI.USERS where UserId=_uid), '?');
@@ -357,6 +350,8 @@ create function WV.WIKI.VSPTOPICEDIT (
 	WV.WIKI.DELETE_SYSINFO_FOR (coalesce (get_keyword ('temp-text', params), _topic.ti_text), NULL),
 	params);
 
+  _iri := SIOC..wiki_post_iri_2 (_topic.ti_id);
+  SIOC..rdf_links_header (_iri);
   _xhtml := WV.WIKI.VSPXSLT ( 'VspTopicEdit.xslt', _topic.ti_get_entity (null,1), _ext_params);
   http_value (_xhtml);
 }
@@ -373,7 +368,8 @@ create function WV.WIKI.VSPTOPICPREVIEW (
   returns varchar
 {
   declare _uid integer;
-  declare _base_adjust varchar;
+  declare _iri, _base_adjust varchar;
+
   _uid := get_keyword ('uid', params);
   _base_adjust := get_keyword ('baseadjust', params);
   declare _topic WV.WIKI.TOPICINFO;
@@ -406,8 +402,10 @@ create function WV.WIKI.VSPTOPICPREVIEW (
   WV.WIKI.CHECKWRITEACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id);
   WV.WIKI.CHECKREADACCESS (_uid, _topic.ti_res_id, _topic.ti_cluster_id, _topic.ti_col_id);
   declare _ext_params any;
-  _ext_params := _topic.ti_xslt_vector(
-	vector_concat(params, vector ('preview_mode', 1)));
+  _ext_params := _topic.ti_xslt_vector (vector_concat (params, vector ('preview_mode', 1)));
+
+  _iri := SIOC..wiki_post_iri_2 (_topic.ti_id);
+  SIOC..rdf_links_header (_iri);
   http_value (WV.WIKI.VSPXSLT ( 'VspTopicView.xslt', _topic.ti_get_entity (null,1), _ext_params));
 }
 ;
@@ -418,7 +416,7 @@ create function WV.WIKI.VSPTOPICREFERERS (
   in params any )
 {
   declare _uid integer;
-  declare _base_adjust varchar;
+  declare _iri, _base_adjust varchar;
   declare _report any;
   declare _text varchar;
   declare _ext_params any;
@@ -474,6 +472,8 @@ create function WV.WIKI.VSPTOPICREFERERS (
                         inner join DB.DBA.SYS_USERS as u2 on (u2.U_ID = r.RES_OWNER)
                  order by c.ClusterName desc, n.LocalName desc);
     }
+  _iri := SIOC..wiki_post_iri_2 (_topic.ti_id);
+  SIOC..rdf_links_header (_iri);
   _ext_params := vector_concat (_topic.ti_xslt_vector(params), vector ('donotresolve', 1));
   http_value (
     WV.WIKI.VSPXSLT (
@@ -1016,20 +1016,10 @@ create procedure WV.WIKI.VSPHEADER (
     http ('<script type="text/javascript">\n');
     http ('  // OAT\n');
     http ('  var toolkitPath="/ods/oat";\n');
---    http ('  var featureList=["dialog"];\n');
     http ('</script>\n');
     http ('<script type="text/javascript" src="/ods/oat/loader.js"></script>\n');
     http ('<script type="text/javascript" src="js/wiki.js"></script>\n');
---    http ('<script type="text/javascript">\n');
---    http (' 	var showInfo;\n');
---    http (' 	function myInit ()\n');
---    http (' 	{\n');
---    http (' 	  showInfo = new OAT.Dialog("Secondary Skin", "infoDiv", {width:400, modal:1, buttons:0});\n');
---    http (' 	}\n');
---    http ('   OAT.MSG.attach(OAT,"OAT_LOAD",myInit);\n');
---    http ('</script>\n');
   }
-
   if (topic_or_title <> 'Settings')
     {
       http ('</head>');
@@ -2660,6 +2650,26 @@ create function WV.WIKI.COLLECT_PAIRS (in _value varchar, in _rest varchar)
 }
 ;
 
+create function WV.WIKI.RDF_LINKS_HEAD (in _clusterName varchar, in _topicName varchar)
+{
+  declare _iri varchar;
+  declare _topic WV.WIKI.TOPICINFO;
+
+  _topic := WV.WIKI.TOPICINFO();
+  _topic.ti_default_cluster := _clusterName;
+  _topic.ti_raw_name := _topicName;
+  _topic.ti_parse_raw_name ();
+  _topic.ti_fill_cluster_by_name ();
+  _topic.ti_find_id_by_local_name ();
+  if (_topic.ti_id)
+  {
+    _iri := SIOC..wiki_post_iri_2 (_topic.ti_id);
+    return SIOC..rdf_links_head_internal (_iri);
+  }
+
+  return '';
+}
+;
 
 grant execute on WV.WIKI.RESOURCEHREF to public
 ;
@@ -2675,6 +2685,8 @@ grant execute on WV.WIKI.PAIR to public
 ;
 grant execute on WV.WIKI.COLLECT_PAIRS to public
 ;
+grant execute on WV.WIKI.RDF_LINKS_HEAD to public
+;
 
 xpf_extension ('http://www.openlinksw.com/Virtuoso/WikiV/:ResourceHREF', 'WV.WIKI.RESOURCEHREF')
 ;
@@ -2690,6 +2702,8 @@ xpf_extension ('http://www.openlinksw.com/Virtuoso/WikiV/:pair', 'WV.WIKI.PAIR')
 ;
 xpf_extension ('http://www.openlinksw.com/Virtuoso/WikiV/:collect_pairs', 'WV.WIKI.COLLECT_PAIRS')
 ;
+xpf_extension ('http://www.openlinksw.com/Virtuoso/WikiV/:rdfLinksHead', 'WV.WIKI.RDF_LINKS_HEAD')
+;
 
 
 --* fixes DAV path name
diff --git a/appsrc/ODS-Wiki/proc_tmp.sql b/appsrc/ODS-Wiki/proc_tmp.sql
index 6fc975c..265be23 100644
--- a/appsrc/ODS-Wiki/proc_tmp.sql
+++ b/appsrc/ODS-Wiki/proc_tmp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: proc_tmp.sql,v 1.6.2.1 2010/09/20 10:15:47 source Exp $
+--  $Id: proc_tmp.sql,v 1.6.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/retry.sh b/appsrc/ODS-Wiki/retry.sh
index 26c89f1..bfe35bb 100755
--- a/appsrc/ODS-Wiki/retry.sh
+++ b/appsrc/ODS-Wiki/retry.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: retry.sh,v 1.2.2.1 2010/09/20 10:15:47 source Exp $
+#  $Id: retry.sh,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/schema_on.sql b/appsrc/ODS-Wiki/schema_on.sql
index 3303402..bfa629b 100644
--- a/appsrc/ODS-Wiki/schema_on.sql
+++ b/appsrc/ODS-Wiki/schema_on.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: schema_on.sql,v 1.16.2.2 2011/01/31 11:17:53 source Exp $
+--  $Id: schema_on.sql,v 1.16.2.3 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/semantics.sql b/appsrc/ODS-Wiki/semantics.sql
index 02a33ff..7d17a60 100644
--- a/appsrc/ODS-Wiki/semantics.sql
+++ b/appsrc/ODS-Wiki/semantics.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: semantics.sql,v 1.3.2.1 2010/09/20 10:15:47 source Exp $
+--  $Id: semantics.sql,v 1.3.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/setup.isql b/appsrc/ODS-Wiki/setup.isql
index c76a689..0471f90 100644
--- a/appsrc/ODS-Wiki/setup.isql
+++ b/appsrc/ODS-Wiki/setup.isql
@@ -1,10 +1,10 @@
 --  
---  $Id: setup.isql,v 1.2.2.1 2010/09/20 10:15:47 source Exp $
+--  $Id: setup.isql,v 1.2.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/setup_vad.sql b/appsrc/ODS-Wiki/setup_vad.sql
index cac09f3..72205e1 100644
--- a/appsrc/ODS-Wiki/setup_vad.sql
+++ b/appsrc/ODS-Wiki/setup_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: setup_vad.sql,v 1.7.2.2 2011/01/31 11:17:53 source Exp $
+--  $Id: setup_vad.sql,v 1.7.2.4 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -34,8 +34,6 @@ create procedure WV.WIKI.USERROLE_DROP (in _role varchar)
   }
 };
 
--- WV.WIKI.SILENT_EXEC ('DB.DBA.USER_ROLE_DROP (\'WikiAdmin\')');
--- WV.WIKI.SILENT_EXEC ('DB.DBA.USER_ROLE_DROP (\'WikiUser\')');
 WV.WIKI.SILENT_EXEC ('DB.DBA.USER_ROLE_CREATE (\'WikiAdmin\', 1)');
 WV.WIKI.SILENT_EXEC ('DB.DBA.USER_ROLE_CREATE (\'WikiUser\', 1)');
 WV.WIKI.SILENT_EXEC('drop trigger WV.Wiki.WIKI_USERS_U');
diff --git a/appsrc/ODS-Wiki/sioc.sql b/appsrc/ODS-Wiki/sioc.sql
index 2908341..c70d4b0 100644
--- a/appsrc/ODS-Wiki/sioc.sql
+++ b/appsrc/ODS-Wiki/sioc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sioc.sql,v 1.14.2.3 2010/09/20 10:15:47 source Exp $
+--  $Id: sioc.sql,v 1.14.2.6 2012/03/08 10:49:48 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -72,6 +72,9 @@ create procedure user_iri_by_uname (in uname varchar)
 create procedure fill_ods_wiki_sioc (in graph_iri varchar, in site_iri varchar, in _wai_name varchar := null)
 {
   declare iri, c_iri varchar;
+
+  fill_ods_wiki_services ();
+
   for select c.CLUSTERID as CLUSTERID, CLUSTERNAME, TOPICID, LOCALNAME, TITLETEXT, U_NAME, U_E_MAIL, T_OWNER_ID, T_CREATE_TIME, T_PUBLISHED, RES_CONTENT, RES_MOD_TIME, RES_ID, U_ID, WAI_ID
         from WV.WIKI.TOPIC t,
              WV.WIKI.CLUSTERS c,
@@ -145,7 +148,7 @@ create procedure fill_ods_wiki_sioc (in graph_iri varchar, in site_iri varchar,
           order by WAI_ID) do
     {
       w_iri := wiki_iri (WAI_NAME);
-      iri := sprintf ('http://%s/dataspace/%s/wiki/%s/atom-pub/', get_cname(), U_NAME, WAI_NAME);
+      iri := sprintf ('http://%s/dataspace/doc/%s/wiki/%s/atom-pub/', get_cname(), U_NAME, WAI_NAME);
       ods_sioc_service (graph_iri, iri, w_iri, null, null, null, iri, 'Atom');
       cnt := cnt + 1;
       if (mod (cnt, 500) = 0)
@@ -156,6 +159,29 @@ create procedure fill_ods_wiki_sioc (in graph_iri varchar, in site_iri varchar,
     }
   commit work;
  }
+}
+;
+
+-------------------------------------------------------------------------------
+--
+create procedure fill_ods_wiki_services ()
+{
+  declare graph_iri, services_iri, service_iri, service_url varchar;
+  declare svc_functions any;
+
+  graph_iri := get_graph ();
+
+  -- instance
+  svc_functions := vector ('wiki.topic.new', 'wiki.upstream.new', 'wiki.options.set',  'wiki.options.get');
+  ods_object_services (graph_iri, 'wiki', 'ODS Wiki instance services', svc_functions);
+
+  -- item
+  svc_functions := vector ('wiki.topic.get', 'wiki.topic.edit', 'wiki.topic.delete', 'wiki.topic.sync', 'wiki.topic.versions', 'wiki.topic.versions.get', 'wiki.topic.versions.diff', 'wiki.comment.new');
+  ods_object_services (graph_iri, 'wiki/item', 'ODS Wiki item services', svc_functions);
+
+  -- item comment
+  svc_functions := vector ('wiki.comment.get', 'wiki.comment.delete');
+  ods_object_services (graph_iri, 'wiki/item/comment', 'ODS Wiki comment services', svc_functions);
 
 }
 ;
@@ -203,6 +229,9 @@ create procedure wiki_sioc_post (inout _topic WV.WIKI.TOPICINFO)
 	null,
 	person_iri(uname));
   DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc..sioc_iri ('topic'), c_iri);
+  -- services
+  SIOC..ods_object_services_attach (graph_iri, iri, 'wiki/item');
+
 }
 ;
 
@@ -265,6 +294,8 @@ create procedure wiki_sioc_post_delete (inout _topic WV.WIKI.TOPICINFO)
   graph_iri := get_graph ();
   iri := wiki_post_iri (_topic.ti_cluster_name, _topic.ti_cluster_id, _topic.ti_local_name);
   delete_quad_s_or_o (graph_iri, iri, iri);
+  -- services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'wiki/item');
 }
 ;
 
@@ -300,6 +331,8 @@ create procedure wiki_sioc_comment_insert (
   DB.DBA.ODS_QUAD_URI (graph_iri, iri, sioc..sioc_iri ('reply_of'), c_iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, c_iri, sioc..sioc_iri ('has_reply'), iri);
   DB.DBA.ODS_QUAD_URI (graph_iri, cluster_iri, sioc..sioc_iri ('container_of'), iri);
+  -- services
+  SIOC..ods_object_services_attach (graph_iri, iri, 'wiki/item/comment');
 }
 ;
 
@@ -316,6 +349,8 @@ create procedure wiki_sioc_comment_delete (
     graph_iri := get_graph ();
   iri := wiki_comment_iri (topic_id, comment_id);
   delete_quad_s_or_o (graph_iri, iri, iri);
+  -- services
+  SIOC..ods_object_services_dettach (graph_iri, iri, 'wiki/item/comment');
 }
 ;
 
diff --git a/appsrc/ODS-Wiki/upstream.sql b/appsrc/ODS-Wiki/upstream.sql
index 618f98a..5156675 100644
--- a/appsrc/ODS-Wiki/upstream.sql
+++ b/appsrc/ODS-Wiki/upstream.sql
@@ -1,14 +1,14 @@
 --
 --  upstream.sql
 --
---  $Id: upstream.sql,v 1.9.2.8 2011/01/31 11:17:53 source Exp $
+--  $Id: upstream.sql,v 1.9.2.9 2012/03/08 10:46:22 source Exp $
 --
 --  Atom publishing protocol support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/vad_version b/appsrc/ODS-Wiki/vad_version
index dbe0684..d03b9b9 100644
--- a/appsrc/ODS-Wiki/vad_version
+++ b/appsrc/ODS-Wiki/vad_version
@@ -1 +1 @@
-1.05.4514
+1.05.4550
diff --git a/appsrc/ODS-Wiki/version.base b/appsrc/ODS-Wiki/version.base
deleted file mode 100644
index b9e5dd7..0000000
--- a/appsrc/ODS-Wiki/version.base
+++ /dev/null
@@ -1 +0,0 @@
-540
diff --git a/appsrc/ODS-Wiki/version.curr b/appsrc/ODS-Wiki/version.curr
deleted file mode 100644
index bc14fa0..0000000
--- a/appsrc/ODS-Wiki/version.curr
+++ /dev/null
@@ -1 +0,0 @@
-4514
diff --git a/appsrc/ODS-Wiki/wa_integration.sql b/appsrc/ODS-Wiki/wa_integration.sql
index 97a69b6..6db6ce5 100644
--- a/appsrc/ODS-Wiki/wa_integration.sql
+++ b/appsrc/ODS-Wiki/wa_integration.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_integration.sql,v 1.26.2.2 2010/09/20 10:15:48 source Exp $
+--  $Id: wa_integration.sql,v 1.26.2.4 2012/03/08 10:49:48 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -278,7 +278,7 @@ create method wa_new_inst (in login varchar) for wa_wikiv {
   --  SIOC service
   declare  graph_iri, iri, w_iri varchar;
   graph_iri := SIOC..get_graph ();
-  iri := sprintf ('http://%s/dataspace/%s/wiki/%s/atom-pub/', SIOC..get_cname(), login, inst_name);
+  iri := sprintf ('http://%s/dataspace/doc/%s/wiki/%s/atom-pub/', SIOC..get_cname(), login, inst_name);
   w_iri := SIOC..wiki_iri (inst_name);
   SIOC..ods_sioc_service (graph_iri, iri, w_iri, null, null, null, iri, 'Atom');
 
diff --git a/appsrc/ODS-Wiki/wa_search_wiki.sql b/appsrc/ODS-Wiki/wa_search_wiki.sql
index 7456cef..174cd60 100644
--- a/appsrc/ODS-Wiki/wa_search_wiki.sql
+++ b/appsrc/ODS-Wiki/wa_search_wiki.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_search_wiki.sql,v 1.4.2.1 2010/09/20 10:15:48 source Exp $
+--  $Id: wa_search_wiki.sql,v 1.4.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/appsrc/ODS-Wiki/webmail.sql b/appsrc/ODS-Wiki/webmail.sql
index 0b7fd24..f7c5e1f 100644
--- a/appsrc/ODS-Wiki/webmail.sql
+++ b/appsrc/ODS-Wiki/webmail.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: webmail.sql,v 1.5.2.1 2010/09/20 10:15:48 source Exp $
+--  $Id: webmail.sql,v 1.5.2.2 2012/03/08 10:46:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/autogen.sh b/autogen.sh
index 4512168..46f83df 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,7 +8,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/bin/generate b/bin/generate
index 805b493..24cd416 100755
--- a/bin/generate
+++ b/bin/generate
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: generate,v 1.3 2008/09/17 08:35:51 source Exp $
+#  $Id: generate,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/bin/makever b/bin/makever
index 920d799..ece4326 100755
--- a/bin/makever
+++ b/bin/makever
@@ -5,7 +5,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -93,7 +93,7 @@ then
 	OpenLink Version Information
 	Version $PRODUCT_VERSION as of $DATE.
 	Compiled for $UNAME_SYSTEM $UNAME_RELEASE
-	Copyright (C) OpenLink Software.
+	Copyright (C) 1998-2012 OpenLink Software.
 
 	Usage: makever [OPTIONS]
 
@@ -118,7 +118,7 @@ cat >$OUTPUT_FILE <<-EOF_VERSION
 	$PRODUCT_NAME\\n\\
 	Version $PRODUCT_VERSION as of $DATE.\\n\\
 	Compiled for $UNAME_SYSTEM $UNAME_RELEASE\\n\\
-	Copyright (C) OpenLink Software.\\n";
+	Copyright (C) 1998-2012 OpenLink Software.\\n";
 EOF_VERSION
 
 exit 0
diff --git a/binsrc/Makefile.am b/binsrc/Makefile.am
index 275c481..f8225fc 100644
--- a/binsrc/Makefile.am
+++ b/binsrc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 #  
 #  
 
-SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel b3s tutorial yacutia samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql jena sesame sesame2 sesame3 redland hibernate
+SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel b3s tutorial yacutia samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql jena sesame sesame2 sesame3 redland hibernate dbpedia
 
 
 # ----------------------------------------------------------------------
diff --git a/binsrc/Makefile.in b/binsrc/Makefile.in
index 98c4828..18c4fa8 100644
--- a/binsrc/Makefile.in
+++ b/binsrc/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -139,6 +139,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -187,6 +188,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -238,6 +240,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -284,7 +287,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -309,7 +311,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 vaddir = @vaddir@
-SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel b3s tutorial yacutia samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql jena sesame sesame2 sesame3 redland hibernate
+SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel b3s tutorial yacutia samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql jena sesame sesame2 sesame3 redland hibernate dbpedia
 
 # ----------------------------------------------------------------------
 #
diff --git a/binsrc/VirtuosoClient.Net/ArrayOfLongPacked.cs b/binsrc/VirtuosoClient.Net/ArrayOfLongPacked.cs
index d1335cb..1c2c7e4 100644
--- a/binsrc/VirtuosoClient.Net/ArrayOfLongPacked.cs
+++ b/binsrc/VirtuosoClient.Net/ArrayOfLongPacked.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ArrayOfLongPacked.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: ArrayOfLongPacked.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/AssemblyInfo.cs b/binsrc/VirtuosoClient.Net/AssemblyInfo.cs
index 57489bc..08422e7 100644
--- a/binsrc/VirtuosoClient.Net/AssemblyInfo.cs
+++ b/binsrc/VirtuosoClient.Net/AssemblyInfo.cs
@@ -1,5 +1,5 @@
 // 
-// $Id: AssemblyInfo.cs,v 1.3 2007/05/29 12:13:12 source Exp $
+// $Id: AssemblyInfo.cs,v 1.3.2.1 2012/03/08 13:13:48 source Exp $
 //
 
 using System.Reflection;
@@ -25,7 +25,7 @@ using System.Runtime.CompilerServices;
 #endif
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("OpenLink Software")]
-[assembly: AssemblyCopyright("Copyright (C) OpenLink Software 2007. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright (C) 1998-2012 OpenLink Software. All rights reserved.")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]		
 
diff --git a/binsrc/VirtuosoClient.Net/BlobHandle.cs b/binsrc/VirtuosoClient.Net/BlobHandle.cs
index 2328d0d..54bb5aa 100644
--- a/binsrc/VirtuosoClient.Net/BlobHandle.cs
+++ b/binsrc/VirtuosoClient.Net/BlobHandle.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: BlobHandle.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: BlobHandle.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/BufferType.cs b/binsrc/VirtuosoClient.Net/BufferType.cs
index 57a1a37..ac524e2 100644
--- a/binsrc/VirtuosoClient.Net/BufferType.cs
+++ b/binsrc/VirtuosoClient.Net/BufferType.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: BufferType.cs,v 1.3.2.2 2011/03/14 15:53:52 source Exp $
+// $Id: BufferType.cs,v 1.3.2.4 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -118,6 +118,15 @@ namespace OpenLink.Data.Virtuoso
 				return value;
             if (value is SqlRdfBox)
 				return value;
+            if (value is VirtuosoDateTime)
+                return value;
+            if (value is VirtuosoTimeSpan)
+                return value;
+#if ADONET3
+            if (value is VirtuosoDateTimeOffset)
+                return value;
+#endif
+
             if (value is System.Byte[] && type != value.GetType())
                 return value;
 			if (type == typeof (string))
@@ -650,6 +659,14 @@ namespace OpenLink.Data.Virtuoso
 						return ((IConvertData) value).GetDataType ();
 					if (type == typeof (System.TimeSpan))
 						return Time;
+					if (type == typeof (VirtuosoTimeSpan))
+						return Time;
+					if (type == typeof (VirtuosoDateTime))
+						return DateTime;
+#if ADONET3
+					if (type == typeof (VirtuosoDateTimeOffset))
+						return DateTime;
+#endif
 					if (type == typeof (byte[]))
 						return Binary;
 					if (type == typeof (SqlXml))
diff --git a/binsrc/VirtuosoClient.Net/CLI.cs b/binsrc/VirtuosoClient.Net/CLI.cs
index 65872e6..7dd3f96 100644
--- a/binsrc/VirtuosoClient.Net/CLI.cs
+++ b/binsrc/VirtuosoClient.Net/CLI.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: CLI.cs,v 1.3.2.1 2009/06/15 13:24:12 source Exp $
+// $Id: CLI.cs,v 1.3.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ConnectionOptions.cs b/binsrc/VirtuosoClient.Net/ConnectionOptions.cs
index d2b5700..895e4ea 100644
--- a/binsrc/VirtuosoClient.Net/ConnectionOptions.cs
+++ b/binsrc/VirtuosoClient.Net/ConnectionOptions.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ConnectionOptions.cs,v 1.3.2.4 2010/12/21 12:29:58 source Exp $
+// $Id: ConnectionOptions.cs,v 1.3.2.5 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ConnectionPool.cs b/binsrc/VirtuosoClient.Net/ConnectionPool.cs
index 8762237..afbeb85 100644
--- a/binsrc/VirtuosoClient.Net/ConnectionPool.cs
+++ b/binsrc/VirtuosoClient.Net/ConnectionPool.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ConnectionPool.cs,v 1.2 2007/02/01 12:11:57 source Exp $
+// $Id: ConnectionPool.cs,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ConnectionStringParser.cs b/binsrc/VirtuosoClient.Net/ConnectionStringParser.cs
index 400f4eb..afd5191 100644
--- a/binsrc/VirtuosoClient.Net/ConnectionStringParser.cs
+++ b/binsrc/VirtuosoClient.Net/ConnectionStringParser.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: ConnectionStringParser.cs,v 1.2 2008/12/15 10:10:45 source Exp $
+// $Id: ConnectionStringParser.cs,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/DTC.cs b/binsrc/VirtuosoClient.Net/DTC.cs
index 00ee69d..bf30777 100644
--- a/binsrc/VirtuosoClient.Net/DTC.cs
+++ b/binsrc/VirtuosoClient.Net/DTC.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: DTC.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: DTC.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/DataType.cs b/binsrc/VirtuosoClient.Net/DataType.cs
index 98dc078..314cffd 100644
--- a/binsrc/VirtuosoClient.Net/DataType.cs
+++ b/binsrc/VirtuosoClient.Net/DataType.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: DataType.cs,v 1.3.2.1 2009/06/15 13:24:12 source Exp $
+// $Id: DataType.cs,v 1.3.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/DateTimeMarshaler.cs b/binsrc/VirtuosoClient.Net/DateTimeMarshaler.cs
index 6035146..10bba68 100644
--- a/binsrc/VirtuosoClient.Net/DateTimeMarshaler.cs
+++ b/binsrc/VirtuosoClient.Net/DateTimeMarshaler.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: DateTimeMarshaler.cs,v 1.3 2009/02/10 12:58:27 source Exp $
+// $Id: DateTimeMarshaler.cs,v 1.3.2.4 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -132,7 +132,7 @@ namespace OpenLink.Data.Virtuoso
 					hour = dt.Hour;
 					minute = dt.Minute;
 					second = dt.Second;
-					fraction = dt.Millisecond * Values.MicrosPerMilliSec;
+					fraction = (int)(dt.Ticks % TimeSpan.TicksPerSecond / 10L);// dt.Millisecond * Values.MicrosPerMilliSec;
 				}
 				else if (type == DateTimeType.DT_TYPE_DATE)
 				{
@@ -153,8 +153,83 @@ namespace OpenLink.Data.Virtuoso
 				hour = ts.Hours;
 				minute = ts.Minutes;
 				second = ts.Seconds;
-				fraction = ts.Milliseconds * Values.MicrosPerMilliSec;
+				fraction = (int)(ts.Ticks % TimeSpan.TicksPerSecond / 10L); //ts.Milliseconds * Values.MicrosPerMilliSec;
 			}
+			else if (value is VirtuosoDateTime)
+			{
+				VirtuosoDateTime dt = (VirtuosoDateTime) value;
+
+				TimeZone tz = TimeZone.CurrentTimeZone;
+				TimeSpan tz_offset = tz.GetUtcOffset (dt.Value);
+				tz_offset_minutes = (int) (tz_offset.Hours * 60) + tz_offset.Minutes;
+
+                long ticks = dt.Ticks - tz_offset.Ticks;
+                dt = new VirtuosoDateTime(ticks);
+
+				int year = dt.Year;
+				int month = dt.Month;
+				int day_of_month = dt.Day;
+				days = GetDays (year, month, day_of_month);
+
+				if (type == DateTimeType.DT_TYPE_DATETIME)
+				{
+					hour = dt.Hour;
+					minute = dt.Minute;
+					second = dt.Second;
+                    fraction = (int)dt.Microsecond;
+				}
+				else if (type == DateTimeType.DT_TYPE_DATE)
+				{
+					hour = minute = second = fraction = 0;
+				}
+				else
+					throw new InvalidCastException ();
+			}
+#if ADONET3
+            else if (value is VirtuosoDateTimeOffset)
+            {
+                VirtuosoDateTimeOffset dt = (VirtuosoDateTimeOffset)value;
+
+                TimeSpan tz_offset = dt.Offset;
+                tz_offset_minutes = (int)(tz_offset.Hours * 60) + tz_offset.Minutes;
+
+                long ticks = dt.Ticks - tz_offset.Ticks;
+                dt = new VirtuosoDateTimeOffset(ticks, new TimeSpan(0));
+
+                int year = dt.Year;
+                int month = dt.Month;
+                int day_of_month = dt.Day;
+                days = GetDays(year, month, day_of_month);
+
+                if (type == DateTimeType.DT_TYPE_DATETIME)
+                {
+                    hour = dt.Hour;
+                    minute = dt.Minute;
+                    second = dt.Second;
+                    fraction = (int)dt.Microsecond;
+                }
+                else if (type == DateTimeType.DT_TYPE_DATE)
+                {
+                    hour = minute = second = fraction = 0;
+                }
+                else
+                    throw new InvalidCastException();
+            }
+#endif
+            else if (value is VirtuosoTimeSpan)
+            {
+                if (type != DateTimeType.DT_TYPE_TIME)
+                    throw new InvalidCastException();
+
+                days = Values.DAY_ZERO;
+                tz_offset_minutes = 0;
+
+                VirtuosoTimeSpan ts = (VirtuosoTimeSpan)value;
+                hour = ts.Hours;
+                minute = ts.Minutes;
+                second = ts.Seconds;
+                fraction = (int)ts.Microseconds;
+            }
 			else
 				throw new InvalidCastException ();
 
@@ -181,7 +256,7 @@ namespace OpenLink.Data.Virtuoso
 			int hour = bytes[3];
 			int minute = bytes[4] >> 2;
 			int second = ((bytes[4] & 0x03) << 4) | (bytes[5] >> 4);
-			int fraction = ((bytes[5] & 0x0f) << 16) | (bytes[6] << 8) | bytes[7];
+			long fraction = ((bytes[5] & 0x0f) << 16) | (bytes[6] << 8) | bytes[7];
 			DateTimeType type = (DateTimeType) (bytes[8] >> 5);
 			int tz_offset_minutes = ((bytes[8] & 0x03) << 8) | bytes[9];
 			if ((bytes[8] & 0x04) != 0)
@@ -191,21 +266,43 @@ namespace OpenLink.Data.Virtuoso
 
 			if (type == DateTimeType.DT_TYPE_TIME)
 			{
-				TimeSpan ts = new TimeSpan (0, hour, minute, second, fraction / Values.MicrosPerMilliSec);
+				VirtuosoTimeSpan ts = new VirtuosoTimeSpan (0, hour, minute, second, fraction);
 				Debug.WriteLineIf (Marshaler.marshalSwitch.Enabled, "TimeSpan: " + ts);
 				return ts;
 			}
-			else if (type == DateTimeType.DT_TYPE_DATETIME || type == DateTimeType.DT_TYPE_DATE)
-			{
+#if ADONET3
+			else if (type == DateTimeType.DT_TYPE_DATETIME)
+                        {
 				int year, month, day_of_month;
 				GetDate (days, out year, out month, out day_of_month);
 				TimeSpan tz_offset = new TimeSpan (0, tz_offset_minutes, 0);
 
-				DateTime dt = new DateTime (year, month, day_of_month, hour, minute, second, fraction / Values.MicrosPerMilliSec);
-				dt += tz_offset;
+				VirtuosoDateTimeOffset dt = new VirtuosoDateTimeOffset (year, month, day_of_month, hour, minute, second, fraction, tz_offset);
+				dt = dt.AddMinutes(tz_offset_minutes);
 				Debug.WriteLineIf (Marshaler.marshalSwitch.Enabled, "DateTime: " + dt);
 				return dt;
 			}
+                        else if (type == DateTimeType.DT_TYPE_DATE)
+			{
+				int year, month, day_of_month;
+				GetDate (days, out year, out month, out day_of_month);
+
+				VirtuosoDateTime dt = new VirtuosoDateTime (year, month, day_of_month, hour, minute, second, fraction);
+				Debug.WriteLineIf (Marshaler.marshalSwitch.Enabled, "DateTime: " + dt);
+				return dt;
+			}
+#else
+                        else if (type == DateTimeType.DT_TYPE_DATETIME || type == DateTimeType.DT_TYPE_DATE)
+			{
+				int year, month, day_of_month;
+				GetDate (days, out year, out month, out day_of_month);
+
+				VirtuosoDateTime dt = new VirtuosoDateTime (year, month, day_of_month, hour, minute, second, fraction);
+				dt = dt.AddMinutes(tz_offset_minutes);
+				Debug.WriteLineIf (Marshaler.marshalSwitch.Enabled, "DateTime: " + dt);
+				return dt;
+			}
+#endif
 			else
 				throw new InvalidCastException ();
 		}
diff --git a/binsrc/VirtuosoClient.Net/Diagnostics.cs b/binsrc/VirtuosoClient.Net/Diagnostics.cs
index c16c0fe..76b6386 100644
--- a/binsrc/VirtuosoClient.Net/Diagnostics.cs
+++ b/binsrc/VirtuosoClient.Net/Diagnostics.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Diagnostics.cs,v 1.3 2007/05/21 15:45:43 source Exp $
+// $Id: Diagnostics.cs,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ExplicitString.cs b/binsrc/VirtuosoClient.Net/ExplicitString.cs
index 468ab10..c746ea1 100644
--- a/binsrc/VirtuosoClient.Net/ExplicitString.cs
+++ b/binsrc/VirtuosoClient.Net/ExplicitString.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ExplicitString.cs,v 1.1.1.1.2.2 2010/02/11 16:25:01 source Exp $
+// $Id: ExplicitString.cs,v 1.1.1.1.2.3 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/Future.cs b/binsrc/VirtuosoClient.Net/Future.cs
index 70222ff..8016e24 100644
--- a/binsrc/VirtuosoClient.Net/Future.cs
+++ b/binsrc/VirtuosoClient.Net/Future.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Future.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: Future.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/FutureList.cs b/binsrc/VirtuosoClient.Net/FutureList.cs
index 6fbf2ce..5ed8db3 100644
--- a/binsrc/VirtuosoClient.Net/FutureList.cs
+++ b/binsrc/VirtuosoClient.Net/FutureList.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: FutureList.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: FutureList.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/IConvertData.cs b/binsrc/VirtuosoClient.Net/IConvertData.cs
index d92dbde..6fc4bb8 100644
--- a/binsrc/VirtuosoClient.Net/IConvertData.cs
+++ b/binsrc/VirtuosoClient.Net/IConvertData.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: IConvertData.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: IConvertData.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ICreateErrors.cs b/binsrc/VirtuosoClient.Net/ICreateErrors.cs
index edf1b46..234e0bb 100644
--- a/binsrc/VirtuosoClient.Net/ICreateErrors.cs
+++ b/binsrc/VirtuosoClient.Net/ICreateErrors.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ICreateErrors.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: ICreateErrors.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/IInnerCommand.cs b/binsrc/VirtuosoClient.Net/IInnerCommand.cs
index 5f4a95e..f52446f 100644
--- a/binsrc/VirtuosoClient.Net/IInnerCommand.cs
+++ b/binsrc/VirtuosoClient.Net/IInnerCommand.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: IInnerCommand.cs,v 1.2 2007/02/01 12:11:57 source Exp $
+// $Id: IInnerCommand.cs,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/IInnerConnection.cs b/binsrc/VirtuosoClient.Net/IInnerConnection.cs
index 01a02ad..3b675fc 100644
--- a/binsrc/VirtuosoClient.Net/IInnerConnection.cs
+++ b/binsrc/VirtuosoClient.Net/IInnerConnection.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: IInnerConnection.cs,v 1.3.2.2 2010/12/17 17:40:44 source Exp $
+// $Id: IInnerConnection.cs,v 1.3.2.3 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/IMarshal.cs b/binsrc/VirtuosoClient.Net/IMarshal.cs
index f2e92cd..846a89b 100644
--- a/binsrc/VirtuosoClient.Net/IMarshal.cs
+++ b/binsrc/VirtuosoClient.Net/IMarshal.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: IMarshal.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: IMarshal.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ISession.cs b/binsrc/VirtuosoClient.Net/ISession.cs
index 7ffd605..74b3b52 100644
--- a/binsrc/VirtuosoClient.Net/ISession.cs
+++ b/binsrc/VirtuosoClient.Net/ISession.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ISession.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: ISession.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/IVirtuosoError.cs b/binsrc/VirtuosoClient.Net/IVirtuosoError.cs
index 881c3d5..cbcd430 100644
--- a/binsrc/VirtuosoClient.Net/IVirtuosoError.cs
+++ b/binsrc/VirtuosoClient.Net/IVirtuosoError.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: IVirtuosoError.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: IVirtuosoError.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/InnerConnectionBase.cs b/binsrc/VirtuosoClient.Net/InnerConnectionBase.cs
index 80f2314..aff8d32 100644
--- a/binsrc/VirtuosoClient.Net/InnerConnectionBase.cs
+++ b/binsrc/VirtuosoClient.Net/InnerConnectionBase.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: InnerConnectionBase.cs,v 1.3.2.2 2010/12/17 17:40:44 source Exp $
+// $Id: InnerConnectionBase.cs,v 1.3.2.3 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/MD5.cs b/binsrc/VirtuosoClient.Net/MD5.cs
index ae1fe8e..9785921 100644
--- a/binsrc/VirtuosoClient.Net/MD5.cs
+++ b/binsrc/VirtuosoClient.Net/MD5.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: MD5.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: MD5.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/Makefile.am b/binsrc/VirtuosoClient.Net/Makefile.am
index 50775b6..ad2c69a 100644
--- a/binsrc/VirtuosoClient.Net/Makefile.am
+++ b/binsrc/VirtuosoClient.Net/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -26,79 +26,11 @@
 #
 # ----------------------------------------------------------------------
 EXTRA_DIST = \
-	ArrayOfLongPacked.cs \
-	AssemblyInfo.cs \
-	BlobHandle.cs \
-	BufferType.cs \
-	CLI.cs \
-	ConnectionOptions.cs \
-	ConnectionPool.cs \
-	ConnectionStringParser.cs \
-	DataType.cs \
-	DateTimeMarshaler.cs \
-	design/AssemblyInfo.cs \
-	design/VirtuosoConnectionStringEditor.cs \
-	design/VirtuosoDataAdapterDesigner.cs \
-	design/VirtuosoDotNetDSNForm.cs \
-	design/VirtuosoDotNetDSNForm.resx \
-	design/VirtuosoGenerateDataSet.cs \
-	Diagnostics.cs \
-	DTC.cs \
-	ExplicitString.cs \
-	Future.cs \
-	FutureList.cs \
-	IConvertData.cs \
-	ICreateErrors.cs \
-	IInnerCommand.cs \
-	IInnerConnection.cs \
-	IMarshal.cs \
-	InnerConnectionBase.cs \
-	ISession.cs \
-	IVirtuosoError.cs \
+	*.bmp \
+	*.cs \
 	Makefile.mono \
-	ManagedCommand.cs \
-	ManagedConnection.cs \
-	ManagedErrors.cs \
-	Marshaler.cs \
-	MD5.cs \
-	MemoryHandle.cs \
-	OdbcCommand.cs \
-	OdbcConnection.cs \
-	OdbcErrors.cs \
-	OpenLink.Data.VirtuosoClient.VirtuosoCommand.bmp \
-	OpenLink.Data.VirtuosoClient.VirtuosoConnection.bmp \
-	OpenLink.Data.VirtuosoClient.VirtuosoDataAdapter.bmp \
-	ParameterData.cs \
-	Platform.cs \
-	RPC.cs \
-	Service.cs \
-	SqlExtendedString.cs \
-	SqlRdfBox.cs \
-	SqlXml.cs \
-	StatementList.cs \
-	TcpConnection.cs \
-	TcpSession.cs \
-	Unix.cs \
-	VirtDbType.cs \
+	design/*.cs \
+	design/VirtuosoDotNetDSNForm.resx \
 	VirtuosoClient.NET.csproj \
 	VirtuosoClient.NET.vc2005.csproj \
-	VirtuosoClient.snk \
-	VirtuosoClientFactory.cs \
-	VirtuosoCodeAccessPermission.cs \
-	VirtuosoCommand.cs \
-	VirtuosoCommandBuilder.cs \
-	VirtuosoConnection.cs \
-	VirtuosoConnectionStringBuilder.cs \
-	VirtuosoDataAdapter.cs \
-	VirtuosoDataReader.cs \
-	VirtuosoError.cs \
-	VirtuosoErrorCollection.cs \
-	VirtuosoException.cs \
-	VirtuosoInfoMessage.cs \
-	VirtuosoParameter.cs \
-	VirtuosoParameterCollection.cs \
-	VirtuosoPermission.cs \
-	VirtuosoPermissionAttribute.cs \
-	VirtuosoTransaction.cs \
-	VirtuosoWarning.cs \
-	Win32.cs
+	VirtuosoClient.snk
diff --git a/binsrc/VirtuosoClient.Net/Makefile.in b/binsrc/VirtuosoClient.Net/Makefile.in
index 0f7cff3..7dae565 100644
--- a/binsrc/VirtuosoClient.Net/Makefile.in
+++ b/binsrc/VirtuosoClient.Net/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -276,82 +278,14 @@ vaddir = @vaddir@
 #
 # ----------------------------------------------------------------------
 EXTRA_DIST = \
-	ArrayOfLongPacked.cs \
-	AssemblyInfo.cs \
-	BlobHandle.cs \
-	BufferType.cs \
-	CLI.cs \
-	ConnectionOptions.cs \
-	ConnectionPool.cs \
-	ConnectionStringParser.cs \
-	DataType.cs \
-	DateTimeMarshaler.cs \
-	design/AssemblyInfo.cs \
-	design/VirtuosoConnectionStringEditor.cs \
-	design/VirtuosoDataAdapterDesigner.cs \
-	design/VirtuosoDotNetDSNForm.cs \
-	design/VirtuosoDotNetDSNForm.resx \
-	design/VirtuosoGenerateDataSet.cs \
-	Diagnostics.cs \
-	DTC.cs \
-	ExplicitString.cs \
-	Future.cs \
-	FutureList.cs \
-	IConvertData.cs \
-	ICreateErrors.cs \
-	IInnerCommand.cs \
-	IInnerConnection.cs \
-	IMarshal.cs \
-	InnerConnectionBase.cs \
-	ISession.cs \
-	IVirtuosoError.cs \
+	*.bmp \
+	*.cs \
 	Makefile.mono \
-	ManagedCommand.cs \
-	ManagedConnection.cs \
-	ManagedErrors.cs \
-	Marshaler.cs \
-	MD5.cs \
-	MemoryHandle.cs \
-	OdbcCommand.cs \
-	OdbcConnection.cs \
-	OdbcErrors.cs \
-	OpenLink.Data.VirtuosoClient.VirtuosoCommand.bmp \
-	OpenLink.Data.VirtuosoClient.VirtuosoConnection.bmp \
-	OpenLink.Data.VirtuosoClient.VirtuosoDataAdapter.bmp \
-	ParameterData.cs \
-	Platform.cs \
-	RPC.cs \
-	Service.cs \
-	SqlExtendedString.cs \
-	SqlRdfBox.cs \
-	SqlXml.cs \
-	StatementList.cs \
-	TcpConnection.cs \
-	TcpSession.cs \
-	Unix.cs \
-	VirtDbType.cs \
+	design/*.cs \
+	design/VirtuosoDotNetDSNForm.resx \
 	VirtuosoClient.NET.csproj \
 	VirtuosoClient.NET.vc2005.csproj \
-	VirtuosoClient.snk \
-	VirtuosoClientFactory.cs \
-	VirtuosoCodeAccessPermission.cs \
-	VirtuosoCommand.cs \
-	VirtuosoCommandBuilder.cs \
-	VirtuosoConnection.cs \
-	VirtuosoConnectionStringBuilder.cs \
-	VirtuosoDataAdapter.cs \
-	VirtuosoDataReader.cs \
-	VirtuosoError.cs \
-	VirtuosoErrorCollection.cs \
-	VirtuosoException.cs \
-	VirtuosoInfoMessage.cs \
-	VirtuosoParameter.cs \
-	VirtuosoParameterCollection.cs \
-	VirtuosoPermission.cs \
-	VirtuosoPermissionAttribute.cs \
-	VirtuosoTransaction.cs \
-	VirtuosoWarning.cs \
-	Win32.cs
+	VirtuosoClient.snk
 
 all: all-am
 
diff --git a/binsrc/VirtuosoClient.Net/Makefile.mono b/binsrc/VirtuosoClient.Net/Makefile.mono
index 0736a41..89ec514 100644
--- a/binsrc/VirtuosoClient.Net/Makefile.mono
+++ b/binsrc/VirtuosoClient.Net/Makefile.mono
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.mono,v 1.5 2009/02/10 12:58:53 source Exp $
+# $Id: Makefile.mono,v 1.5.2.1 2011/10/13 18:26:27 source Exp $
 #
 
 ADONETVERSION=ADONET2
@@ -50,6 +50,8 @@ SOURCES1= \
 	VirtuosoConnection.cs \
 	VirtuosoDataAdapter.cs \
 	VirtuosoDataReader.cs \
+	VirtuosoDateTime.cs \
+	VirtuosoDateTimeOffset.cs \
 	VirtuosoErrorCollection.cs \
 	VirtuosoError.cs \
 	VirtuosoException.cs \
@@ -58,6 +60,7 @@ SOURCES1= \
 	VirtuosoParameter.cs \
 	VirtuosoPermissionAttribute.cs \
 	VirtuosoPermission.cs \
+	VirtuosoTimeSpan.cs \
 	VirtuosoTransaction.cs \
 	VirtuosoWarning.cs \
 	Win32.cs
diff --git a/binsrc/VirtuosoClient.Net/ManagedCommand.cs b/binsrc/VirtuosoClient.Net/ManagedCommand.cs
index c600371..4e6c226 100644
--- a/binsrc/VirtuosoClient.Net/ManagedCommand.cs
+++ b/binsrc/VirtuosoClient.Net/ManagedCommand.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ManagedCommand.cs,v 1.3.2.4 2011/02/16 20:44:35 source Exp $
+// $Id: ManagedCommand.cs,v 1.3.2.6 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -815,6 +815,17 @@ namespace OpenLink.Data.Virtuoso
 				CloseCursor ();
 			}
 			*/
+			Future future = new Future (Service.FreeStmt, GetId (), (int) CLI.FreeStmtOption.SQL_DROP);
+			try
+			{
+			        connection.futures.Add (future);
+			        future.SendRequest (connection.Session);
+			        future.GetResult (connection.Session, connection.futures);
+			}
+			finally
+			{
+			        connection.futures.Remove (future);
+			}
 		}
 	}
 }
diff --git a/binsrc/VirtuosoClient.Net/ManagedConnection.cs b/binsrc/VirtuosoClient.Net/ManagedConnection.cs
index 7e7b36a..87f0f6d 100644
--- a/binsrc/VirtuosoClient.Net/ManagedConnection.cs
+++ b/binsrc/VirtuosoClient.Net/ManagedConnection.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ManagedConnection.cs,v 1.5.2.3 2010/12/17 17:40:44 source Exp $
+// $Id: ManagedConnection.cs,v 1.5.2.4 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ManagedErrors.cs b/binsrc/VirtuosoClient.Net/ManagedErrors.cs
index 3238dff..dc02357 100644
--- a/binsrc/VirtuosoClient.Net/ManagedErrors.cs
+++ b/binsrc/VirtuosoClient.Net/ManagedErrors.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ManagedErrors.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: ManagedErrors.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/Marshaler.cs b/binsrc/VirtuosoClient.Net/Marshaler.cs
index d54e857..78ef399 100644
--- a/binsrc/VirtuosoClient.Net/Marshaler.cs
+++ b/binsrc/VirtuosoClient.Net/Marshaler.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Marshaler.cs,v 1.5.2.4 2010/04/14 10:48:48 source Exp $
+// $Id: Marshaler.cs,v 1.5.2.7 2012/03/08 12:54:55 source Exp $
 //
 
 //#define IGNORE_ENCODING
@@ -195,6 +195,20 @@ namespace OpenLink.Data.Virtuoso
 				{
 					DateTimeMarshaler.MarshalDate (stream, value, DateTimeType.DT_TYPE_TIME);
 				}
+				else if (type == typeof (VirtuosoTimeSpan))
+				{
+					DateTimeMarshaler.MarshalDate (stream, value, DateTimeType.DT_TYPE_TIME);
+				}
+				else if (type == typeof(VirtuosoDateTime))
+				{
+					DateTimeMarshaler.MarshalDate (stream, value, DateTimeType.DT_TYPE_DATETIME);
+				}
+#if ADONET3
+				else if (type == typeof(VirtuosoDateTimeOffset))
+				{
+					DateTimeMarshaler.MarshalDate (stream, value, DateTimeType.DT_TYPE_DATETIME);
+				}
+#endif
 				else if (type == typeof (int[]))
 				{
 					stream.WriteByte ((byte) BoxTag.DV_ARRAY_OF_LONG);
diff --git a/binsrc/VirtuosoClient.Net/MemoryHandle.cs b/binsrc/VirtuosoClient.Net/MemoryHandle.cs
index 9f71f6b..b3533c3 100644
--- a/binsrc/VirtuosoClient.Net/MemoryHandle.cs
+++ b/binsrc/VirtuosoClient.Net/MemoryHandle.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: MemoryHandle.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: MemoryHandle.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/OdbcCommand.cs b/binsrc/VirtuosoClient.Net/OdbcCommand.cs
index ed620d6..c216cf5 100644
--- a/binsrc/VirtuosoClient.Net/OdbcCommand.cs
+++ b/binsrc/VirtuosoClient.Net/OdbcCommand.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: OdbcCommand.cs,v 1.2 2007/02/01 12:11:57 source Exp $
+// $Id: OdbcCommand.cs,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/OdbcConnection.cs b/binsrc/VirtuosoClient.Net/OdbcConnection.cs
index 9ea2408..4f4da92 100644
--- a/binsrc/VirtuosoClient.Net/OdbcConnection.cs
+++ b/binsrc/VirtuosoClient.Net/OdbcConnection.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: OdbcConnection.cs,v 1.3 2008/12/15 10:10:45 source Exp $
+// $Id: OdbcConnection.cs,v 1.3.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -606,6 +606,8 @@ namespace OpenLink.Data.Virtuoso
 		protected override void Dispose (bool disposing)
 		{
 		  Debug.WriteLineIf (CLI.FnTrace.Enabled, "OdbcConnection.Dispose ()");
+			try
+			{
 			if (disposing)
 			{
 				Close ();
@@ -619,11 +621,18 @@ namespace OpenLink.Data.Virtuoso
 				OnDisconnect ();
 			}
 
-#if WIN32_FINALIZERS
+#if WIN3#if WIN32_FINALIZERS
 			//statementList.Unreference ();
 			Unreference ();
 #endif
 		}
+			catch (Exception e)
+			{
+				// Dispose method should never throw an exception
+				Debug.WriteLineIf(CLI.FnTrace.Enabled,
+					"OdbcConnection.Dispose caught exception: " + e.Message);
+			}
+		}
 
 		internal void Add (IntPtr hstmt, VirtuosoCommand command)
 		{
diff --git a/binsrc/VirtuosoClient.Net/OdbcErrors.cs b/binsrc/VirtuosoClient.Net/OdbcErrors.cs
index 170c5e3..9fe1d44 100644
--- a/binsrc/VirtuosoClient.Net/OdbcErrors.cs
+++ b/binsrc/VirtuosoClient.Net/OdbcErrors.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: OdbcErrors.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: OdbcErrors.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/ParameterData.cs b/binsrc/VirtuosoClient.Net/ParameterData.cs
index 120745c..d70b9b3 100644
--- a/binsrc/VirtuosoClient.Net/ParameterData.cs
+++ b/binsrc/VirtuosoClient.Net/ParameterData.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: ParameterData.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: ParameterData.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/Platform.cs b/binsrc/VirtuosoClient.Net/Platform.cs
index 01382f3..078575f 100644
--- a/binsrc/VirtuosoClient.Net/Platform.cs
+++ b/binsrc/VirtuosoClient.Net/Platform.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Platform.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: Platform.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/RPC.cs b/binsrc/VirtuosoClient.Net/RPC.cs
index efb8a4a..044ab1f 100644
--- a/binsrc/VirtuosoClient.Net/RPC.cs
+++ b/binsrc/VirtuosoClient.Net/RPC.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: RPC.cs,v 1.5.2.1 2011/02/16 20:44:36 source Exp $
+// $Id: RPC.cs,v 1.5.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/Service.cs b/binsrc/VirtuosoClient.Net/Service.cs
index 5dd9106..96fd7c7 100644
--- a/binsrc/VirtuosoClient.Net/Service.cs
+++ b/binsrc/VirtuosoClient.Net/Service.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Service.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: Service.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/SqlExtendedString.cs b/binsrc/VirtuosoClient.Net/SqlExtendedString.cs
index 0521389..06e54c4 100644
--- a/binsrc/VirtuosoClient.Net/SqlExtendedString.cs
+++ b/binsrc/VirtuosoClient.Net/SqlExtendedString.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: SqlExtendedString.cs,v 1.1 2009/02/06 15:37:37 source Exp $
+// $Id: SqlExtendedString.cs,v 1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/SqlRdfBox.cs b/binsrc/VirtuosoClient.Net/SqlRdfBox.cs
index 3d436dc..0908d1f 100644
--- a/binsrc/VirtuosoClient.Net/SqlRdfBox.cs
+++ b/binsrc/VirtuosoClient.Net/SqlRdfBox.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: SqlRdfBox.cs,v 1.1 2009/02/06 15:37:37 source Exp $
+// $Id: SqlRdfBox.cs,v 1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/SqlXml.cs b/binsrc/VirtuosoClient.Net/SqlXml.cs
index 23f1228..da98020 100644
--- a/binsrc/VirtuosoClient.Net/SqlXml.cs
+++ b/binsrc/VirtuosoClient.Net/SqlXml.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: SqlXml.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: SqlXml.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/StatementList.cs b/binsrc/VirtuosoClient.Net/StatementList.cs
index b184e3f..d9b9ba0 100644
--- a/binsrc/VirtuosoClient.Net/StatementList.cs
+++ b/binsrc/VirtuosoClient.Net/StatementList.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: StatementList.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: StatementList.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 #if false
diff --git a/binsrc/VirtuosoClient.Net/TcpConnection.cs b/binsrc/VirtuosoClient.Net/TcpConnection.cs
index d6a8cc9..0624563 100644
--- a/binsrc/VirtuosoClient.Net/TcpConnection.cs
+++ b/binsrc/VirtuosoClient.Net/TcpConnection.cs
@@ -1,10 +1,10 @@
 //  
-// $Id: TcpConnection.cs,v 1.2.2.3 2010/02/09 16:13:47 source Exp $
+// $Id: TcpConnection.cs,v 1.2.2.5 2012/03/08 12:54:55 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -21,6 +21,7 @@
 //  
 //  
 //
+// $Id: TcpConnection.cs,v 1.2.2.5 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -109,6 +110,7 @@ namespace OpenLink.Data.Virtuoso
 			try
 			{
 				session = new TcpSession (this, socket);
+                		socket.NoDelay = true;
 
 #if MONO
 				Future future = new Future (Service.CallerId, new object[] { null });
diff --git a/binsrc/VirtuosoClient.Net/TcpSession.cs b/binsrc/VirtuosoClient.Net/TcpSession.cs
index 66b7b63..042c0cd 100644
--- a/binsrc/VirtuosoClient.Net/TcpSession.cs
+++ b/binsrc/VirtuosoClient.Net/TcpSession.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: TcpSession.cs,v 1.2 2009/02/06 15:37:37 source Exp $
+// $Id: TcpSession.cs,v 1.2.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -308,7 +308,10 @@ namespace OpenLink.Data.Virtuoso
 				{
 					try
 					{
-						return socket.Receive (buffer, offset, size, flags);
+                                                int len = socket.Receive(buffer, offset, size, flags);
+                                                if (len == 0 && socket.Blocking)
+                                                    throw new EndOfStreamException ();
+                                                return len;
 					}
 					catch (SocketException e)
 					{
diff --git a/binsrc/VirtuosoClient.Net/Unix.cs b/binsrc/VirtuosoClient.Net/Unix.cs
index f262d77..1ac9355 100644
--- a/binsrc/VirtuosoClient.Net/Unix.cs
+++ b/binsrc/VirtuosoClient.Net/Unix.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Unix.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: Unix.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtDbType.cs b/binsrc/VirtuosoClient.Net/VirtDbType.cs
index 6c6cf04..63ca394 100644
--- a/binsrc/VirtuosoClient.Net/VirtDbType.cs
+++ b/binsrc/VirtuosoClient.Net/VirtDbType.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtDbType.cs,v 1.1.1.1.2.1 2009/06/15 13:24:12 source Exp $
+// $Id: VirtDbType.cs,v 1.1.1.1.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 #if ODBC_CLIENT
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoClient.NET.vc2005.csproj b/binsrc/VirtuosoClient.Net/VirtuosoClient.NET.vc2005.csproj
index b934564..e4f9a2b 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoClient.NET.vc2005.csproj
+++ b/binsrc/VirtuosoClient.Net/VirtuosoClient.NET.vc2005.csproj
@@ -1,7 +1,8 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{50E2DD3F-5B5E-4E62-9206-A41824905CD7}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -25,7 +26,8 @@
     </FileUpgradeFlags>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
-    <OldToolsVersion>2.0</OldToolsVersion>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <OutputPath>.\</OutputPath>
@@ -51,13 +53,13 @@
     <ErrorReport>prompt</ErrorReport>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <OutputPath>.\</OutputPath>
+    <OutputPath>..\..\win64\Release\</OutputPath>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <BaseAddress>285212672</BaseAddress>
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>FROMIDE</DefineConstants>
+    <DefineConstants>FROMIDE;ADONET2;ADONET3</DefineConstants>
     <DocumentationFile>
     </DocumentationFile>
     <DebugSymbols>false</DebugSymbols>
@@ -84,7 +86,7 @@
     <ErrorReport>prompt</ErrorReport>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <OutputPath>bin\x64\Release\</OutputPath>
+    <OutputPath>..\..\win64\Release\</OutputPath>
     <DefineConstants>FROMIDE</DefineConstants>
     <BaseAddress>285212672</BaseAddress>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -106,7 +108,7 @@
     <ErrorReport>prompt</ErrorReport>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <OutputPath>bin\x86\Release\</OutputPath>
+    <OutputPath>..\..\win64\Release\</OutputPath>
     <DefineConstants>FROMIDE</DefineConstants>
     <BaseAddress>285212672</BaseAddress>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -122,6 +124,9 @@
       <Name>System</Name>
     </Reference>
     <Reference Include="System.configuration" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
     <Reference Include="System.Data">
       <Name>System.Data</Name>
     </Reference>
@@ -264,6 +269,8 @@
     <Compile Include="VirtuosoDataReader.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="VirtuosoDateTime.cs" />
+    <Compile Include="VirtuosoDateTimeOffset.cs" />
     <Compile Include="VirtuosoError.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -288,6 +295,7 @@
     <Compile Include="VirtuosoPermissionAttribute.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="VirtuosoTimeSpan.cs" />
     <Compile Include="VirtuosoTransaction.cs">
       <SubType>Code</SubType>
     </Compile>
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoClientFactory.cs b/binsrc/VirtuosoClient.Net/VirtuosoClientFactory.cs
index 0c14006..c478769 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoClientFactory.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoClientFactory.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,11 +19,12 @@
 //  
 //  
 //
-// $Id: VirtuosoClientFactory.cs,v 1.2 2007/02/01 12:11:57 source Exp $
+// $Id: VirtuosoClientFactory.cs,v 1.2.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
 using System.Data;
+using System.Diagnostics;
 #if ADONET2
 using System.Data.Common;
 using System.Security;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoCodeAccessPermission.cs b/binsrc/VirtuosoClient.Net/VirtuosoCodeAccessPermission.cs
index 497112f..a9325d6 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoCodeAccessPermission.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoCodeAccessPermission.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoCodeAccessPermission.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoCodeAccessPermission.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoCommand.cs b/binsrc/VirtuosoClient.Net/VirtuosoCommand.cs
index e55f73f..2725555 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoCommand.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoCommand.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoCommand.cs,v 1.7.2.2 2011/02/21 13:36:39 source Exp $
+// $Id: VirtuosoCommand.cs,v 1.7.2.5 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -459,17 +459,19 @@ namespace OpenLink.Data.Virtuoso
 
 			bool schemaOnly = SchemaOnlyDataReader (behavior);
 			string text = GetCommandText ();
+		        bool isSparql = text.TrimStart(null).StartsWith("sparql", StringComparison.OrdinalIgnoreCase);
 			if (schemaOnly)
 			{
 				if (!isPrepared)
 				{
-					text = replaceNamedParams (text);
+                    			if (!isSparql)
+						text = replaceNamedParams (text);
 					innerCommand.Prepare (text);
 				}
 			}
 			else
 			{
-				if (parameters != null && parameters.Count > 0)
+				if (!isSparql && parameters != null && parameters.Count > 0)
 				{
 					VirtuosoParameterCollection _parameters = handleNamedParams (text, parameters);
 					Debug.Assert (_parameters.Count == parameters.Count, "Count mismatch in reordered parameter array");
@@ -560,6 +562,8 @@ namespace OpenLink.Data.Virtuoso
 
 		protected override void Dispose (bool disposing)
 		{
+			try
+			{
 			if (disposing)
 			{
 				DisposeStatement ();
@@ -571,6 +575,12 @@ namespace OpenLink.Data.Virtuoso
 			connection = null;
 			transaction = null;
 		}
+			catch (Exception e)
+			{
+				Debug.WriteLineIf(CLI.FnTrace.Enabled,
+					"VirtuosoCommand.Dispose caught exception: " + e.Message);
+			}
+		}
 
 		internal void OnConnectionClose ()
 		{
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoCommandBuilder.cs b/binsrc/VirtuosoClient.Net/VirtuosoCommandBuilder.cs
index f01304d..ef88597 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoCommandBuilder.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoCommandBuilder.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoCommandBuilder.cs,v 1.2 2007/02/01 12:11:57 source Exp $
+// $Id: VirtuosoCommandBuilder.cs,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoConnection.cs b/binsrc/VirtuosoClient.Net/VirtuosoConnection.cs
index 693f533..69579c6 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoConnection.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoConnection.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoConnection.cs,v 1.10.2.4 2010/12/17 17:40:44 source Exp $
+// $Id: VirtuosoConnection.cs,v 1.10.2.7 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -319,6 +319,9 @@ namespace OpenLink.Data.Virtuoso
                 case IsolationLevel.Serializable:
                     isolation = CLI.IsolationLevel.SQL_TXN_SERIALIZABLE;
                     break;
+                case IsolationLevel.Unspecified:
+                    isolation = CLI.IsolationLevel.SQL_TXN_READ_COMMITED;
+                    break;
                 default:
                     throw new Exception ("Unknown or unsupported isolation level");
             }
@@ -569,6 +572,8 @@ namespace OpenLink.Data.Virtuoso
 
         protected override void Dispose (bool disposing)
         {
+	    try
+	    {
             if (disposed)
                 return;
 
@@ -583,6 +588,12 @@ namespace OpenLink.Data.Virtuoso
 
             base.Dispose (disposing);
         }
+	    catch (Exception e)
+	    {
+	        Debug.WriteLineIf(CLI.FnTrace.Enabled,
+		    "VirtuosoConnection.Dispose caught exception: " + e.Message);
+	    }
+        }
 
         private ConnectionOptions ParseConnectionString (string connectionString)
         {
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoConnectionStringBuilder.cs b/binsrc/VirtuosoClient.Net/VirtuosoConnectionStringBuilder.cs
index 20de9b9..c6f0e0d 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoConnectionStringBuilder.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoConnectionStringBuilder.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoConnectionStringBuilder.cs,v 1.3.2.2 2010/12/17 17:40:44 source Exp $
+// $Id: VirtuosoConnectionStringBuilder.cs,v 1.3.2.3 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoDataAdapter.cs b/binsrc/VirtuosoClient.Net/VirtuosoDataAdapter.cs
index e20de4f..cb4f599 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoDataAdapter.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoDataAdapter.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoDataAdapter.cs,v 1.4.2.1 2010/12/07 11:31:19 source Exp $
+// $Id: VirtuosoDataAdapter.cs,v 1.4.2.2 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoDataReader.cs b/binsrc/VirtuosoClient.Net/VirtuosoDataReader.cs
index 4da9cba..97448ca 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoDataReader.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoDataReader.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoDataReader.cs,v 1.7.2.4 2011/03/14 15:53:52 source Exp $
+// $Id: VirtuosoDataReader.cs,v 1.7.2.6 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
@@ -867,7 +867,11 @@ namespace OpenLink.Data.Virtuoso
                                 case "System.Double":
                                 case "System.Decimal":
                                 case "System.DateTime":
+                                case "OpenLink.Data.Virtuoso.VirtuosoDateTime":
+                                case "System.DateTimeOffset":
+                                case "OpenLink.Data.Virtuoso.VirtuosoDateTimeOffset":
                                 case "System.TimeSpan":
+                                case "OpenLink.Data.Virtuoso.VirtuosoTimeSpan":
                                     return column.data;
                                 default:
                     			return Convert.ChangeType(column.data, type);
@@ -882,8 +886,11 @@ namespace OpenLink.Data.Virtuoso
                             switch (column.data.GetType().FullName)
                             {
                                 case "System.DateTime":
+                                case "OpenLink.Data.Virtuoso.VirtuosoDateTime":
                                 case "System.DateTimeOffset":
+                                case "OpenLink.Data.Virtuoso.VirtuosoDateTimeOffset":
                                 case "System.TimeSpan":
+                                case "OpenLink.Data.Virtuoso.VirtuosoTimeSpan":
                                 case "System.Byte[]":
                                     return column.data;
                                 default:
@@ -909,10 +916,18 @@ namespace OpenLink.Data.Virtuoso
 		private void Dispose (bool disposing)
 #endif
 		{
+			try
+			{
 			if (disposing)
 				Close ();
 			connection = null;
         }
+			catch (Exception e)
+			{
+				Debug.WriteLineIf(CLI.FnTrace.Enabled,
+				"VirtousoDataReader.Dispose caught exception: " + e.Message);
+			}
+        	}
         #region ADO.NET 2.0
 #if ADONET2
         public override bool  HasRows
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoDateTime.cs b/binsrc/VirtuosoClient.Net/VirtuosoDateTime.cs
new file mode 100644
index 0000000..0d8d005
--- /dev/null
+++ b/binsrc/VirtuosoClient.Net/VirtuosoDateTime.cs
@@ -0,0 +1,449 @@
+//  
+//  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+//  project.
+//  
+//  Copyright (C) 1998-2012 OpenLink Software
+//  
+//  This project 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; only version 2 of the License, dated June 1991.
+//  
+//  This program 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
+//  General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License along
+//  with this program; if not, write to the Free Software Foundation, Inc.,
+//  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//  
+//  
+//
+// $Id: VirtuosoDateTime.cs,v 1.1.4.4 2012/03/08 12:54:55 source Exp $
+//
+
+using System;
+using System.Data;
+using System.Data.Common;
+using System.Text;
+using System.Globalization;
+
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Collections;
+
+#if ODBC_CLIENT
+namespace OpenLink.Data.VirtuosoOdbcClient
+#elif CLIENT
+namespace OpenLink.Data.VirtuosoClient
+#else
+namespace OpenLink.Data.Virtuoso
+#endif
+{
+
+	[Serializable]
+	[StructLayout (LayoutKind.Auto)]
+	public struct VirtuosoDateTime : IFormattable, IComparable
+		, IComparable<VirtuosoDateTime>, IEquatable <VirtuosoDateTime>
+	{
+		private DateTime value;
+
+		private VirtuosoDateTime (DateTime val)
+		{
+			this.value = val;
+		}
+
+		public VirtuosoDateTime (long ticks)
+		{
+			this.value = new DateTime(ticks);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day)
+		{
+			this.value = new DateTime(year, month, day);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day, int hour, int minute, int second)
+		{
+			this.value = new DateTime(year, month, day, hour, minute, second);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day, int hour, int minute, int second, long microsecond)
+		{
+			if (microsecond < 0 || microsecond > 999999)
+				throw new ArgumentOutOfRangeException ("Microsecond parameters describe an " +
+									"unrepresentable VirtuosoDateTime.");
+			DateTime t = new DateTime(year, month, day, hour, minute, second);
+			
+			long dateTick = (long) (t.Ticks + microsecond * 10);
+			this.value = new DateTime (dateTick);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day, Calendar calendar)
+		{
+			this.value = new DateTime(year, month, day, calendar);
+		}
+		
+		public VirtuosoDateTime (int year, int month, int day, int hour, int minute, int second, Calendar calendar)
+		{
+			this.value = new DateTime(year, month, day, hour, minute, second, calendar);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day, int hour, int minute, int second, long microsecond, Calendar calendar)
+		{
+			if (microsecond < 0 || microsecond > 999999)
+				throw new ArgumentOutOfRangeException ("Microsecond parameters describe an " +
+									"unrepresentable VirtuosoDateTime.");
+			DateTime t = new DateTime(year, month, day, hour, minute, second, calendar);
+			
+			long dateTick = (long) (t.Ticks + microsecond * 10);
+			this.value = new DateTime (dateTick);
+		}
+
+
+		public VirtuosoDateTime (long ticks, DateTimeKind kind)
+		{
+			this.value = new DateTime(ticks, kind);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day, int hour, int minute, int second, DateTimeKind kind)
+		{
+			this.value = new DateTime(year, month, day, hour, minute, second, kind);
+		}
+
+		public VirtuosoDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, DateTimeKind kind)
+		{
+			this.value = new DateTime(year, month, day, hour, minute, second, millisecond, kind);
+		}
+
+                public VirtuosoDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, Calendar calendar, DateTimeKind kind)
+		{
+			this.value = new DateTime(year, month, day, hour, minute, second, millisecond, calendar, kind);
+		}			
+
+
+		public DateTime Date 
+		{
+			get	
+			{ 
+				return value.Date;
+			}
+		}
+        
+		public int Month 
+		{
+			get	
+			{ 
+				return value.Month; 
+			}
+		}
+
+	       
+		public int Day
+		{
+			get 
+			{ 
+				return value.Day; 
+			}
+		}
+
+		public DayOfWeek DayOfWeek 
+		{
+			get 
+			{ 
+				return value.DayOfWeek;
+			}
+		}
+
+		public int DayOfYear 
+		{
+			get 
+			{ 
+				return value.DayOfYear; 
+			}
+		}
+
+		public TimeSpan TimeOfDay 
+		{
+			get	
+			{ 
+				return value.TimeOfDay;
+			}
+			
+		}
+
+		public int Hour 
+		{
+			get 
+			{ 
+				return value.Hour;
+			}
+		}
+
+		public int Minute 
+		{
+			get 
+			{ 
+				return value.Minute;
+			}
+		}
+
+		public int Second 
+		{
+			get	
+			{ 
+				return value.Second;
+			}
+		}
+
+		public int Millisecond 
+		{
+			get 
+			{ 
+				return value.Millisecond;
+			}
+		}
+		
+		public long Microsecond 
+		{
+			get 
+			{ 
+			        return (int) (value.Ticks % TimeSpan.TicksPerSecond / 10L);
+			}
+		}
+		
+		public long Ticks
+		{ 
+			get	
+			{ 
+				return value.Ticks;
+			}
+		}
+	
+		public int Year 
+		{
+			get 
+			{ 
+				return value.Year; 
+			}
+		}
+
+		public DateTimeKind Kind {
+			get {
+				return value.Kind;
+			}
+		}
+
+		public DateTime Value {
+			get {
+				return value;
+			}
+		}
+
+		/* methods */
+
+		public VirtuosoDateTime Add (TimeSpan ts)
+		{
+			return new VirtuosoDateTime(value.Add(ts));
+		}
+
+		public VirtuosoDateTime AddDays (double days)
+		{
+			return new VirtuosoDateTime(value.AddDays(days));
+		}
+		
+		public VirtuosoDateTime AddTicks (long t)
+		{
+			return new VirtuosoDateTime(value.AddTicks(t));
+		}
+
+		public VirtuosoDateTime AddHours (double hours)
+		{
+			return new VirtuosoDateTime(value.AddHours(hours));
+		}
+
+		public VirtuosoDateTime AddMilliseconds (double ms)
+		{
+			return new VirtuosoDateTime(value.AddMilliseconds(ms));
+		}
+
+		public VirtuosoDateTime AddMinutes (double minutes)
+		{
+			return new VirtuosoDateTime(value.AddMinutes(minutes));
+		}
+		
+		public VirtuosoDateTime AddMonths (int months)
+		{
+			return new VirtuosoDateTime(value.AddMonths(months));
+		}
+
+		public VirtuosoDateTime AddSeconds (double seconds)
+		{
+			return new VirtuosoDateTime(value.AddSeconds(seconds));
+		}
+
+		public VirtuosoDateTime AddYears (int years )
+		{
+			return new VirtuosoDateTime(value.AddYears(years));
+		}
+
+		public int CompareTo (object v)
+		{
+			if ( v == null)
+				return 1;
+
+			if (!(v is System.DateTime) || !(v is VirtuosoDateTime))
+				throw new ArgumentException ("Value is not a System.DateTime or VirtuosoDateTime");
+
+			if (v is VirtuosoDateTime)
+			  return DateTime.Compare (value, ((VirtuosoDateTime) v).value);
+			else
+			  return DateTime.Compare (value, (DateTime) v);
+		}
+
+		public int CompareTo (VirtuosoDateTime v)
+		{
+			if (!(v is VirtuosoDateTime))
+				throw new ArgumentException ("Value is not a VirtuosoDateTime");
+
+			return DateTime.Compare (value, (DateTime) v.value);
+		}
+
+		public bool IsDaylightSavingTime ()
+		{
+		        return value.IsDaylightSavingTime ();
+		}
+
+		public int CompareTo (DateTime value)
+		{
+			return value.CompareTo (value);
+		}
+
+		public bool Equals (DateTime value)
+		{
+			return value.Equals(value);
+		}
+
+		public bool Equals (VirtuosoDateTime val)
+		{
+			return value.Equals(val.value);
+		}
+
+		public override bool Equals (object o)
+		{
+			if (!(o is System.DateTime) && !(o is VirtuosoDateTime))
+				return false;
+
+                        if (o is VirtuosoDateTime)
+			   return ((VirtuosoDateTime) o).Ticks == Ticks;
+			else
+			   return ((DateTime) o).Ticks == Ticks;
+		}
+
+
+		public string[] GetDateTimeFormats() 
+		{
+			return value.GetDateTimeFormats();
+		}
+
+		public string[] GetDateTimeFormats(char format)
+		{
+			return value.GetDateTimeFormats(format);
+		}
+		
+		public string[] GetDateTimeFormats(IFormatProvider provider)
+		{
+			return value.GetDateTimeFormats(provider);
+		}
+
+		public string[] GetDateTimeFormats(char format,IFormatProvider provider	)
+		{
+			return value.GetDateTimeFormats(format, provider);
+		}
+
+		public override int GetHashCode ()
+		{
+			return value.GetHashCode ();
+		}
+
+		public TimeSpan Subtract(DateTime dt)
+		{   
+			return value.Subtract(dt);
+		}
+
+		public VirtuosoDateTime Subtract(TimeSpan ts)
+		{
+			return new VirtuosoDateTime(value.Subtract(ts));
+		}
+
+		public long ToFileTime()
+		{
+			return value.ToFileTime();
+		}
+
+		public long ToFileTimeUtc()
+		{
+			return value.ToFileTimeUtc();
+		}
+
+		public string ToLongDateString()
+		{
+			return value.ToString ("D");
+		}
+
+		public string ToLongTimeString()
+		{
+			return value.ToString ("T");
+		}
+
+		public double ToOADate ()
+		{
+			return value.ToOADate ();
+		}
+
+		public string ToShortDateString()
+		{
+			return value.ToShortDateString();
+		}
+
+		public string ToShortTimeString()
+		{
+			return value.ToShortTimeString();
+		}
+		
+		public override string ToString ()
+		{
+			return value.ToString ("o");
+		}
+
+		public string ToString (IFormatProvider fp)
+		{
+			return value.ToString (fp);
+		}
+
+		public string ToString (string format)
+		{
+			return value.ToString (format);
+		}
+
+
+		
+		public string ToString (string format, IFormatProvider fp)
+
+		{
+			return value.ToString (format, fp);
+		}
+
+		public VirtuosoDateTime ToLocalTime ()
+		{
+			return new VirtuosoDateTime(value.ToLocalTime ());
+		}
+
+		public VirtuosoDateTime ToUniversalTime()
+		{
+			return new VirtuosoDateTime(value.ToUniversalTime());
+		}
+
+
+    }
+}
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoDateTimeOffset.cs b/binsrc/VirtuosoClient.Net/VirtuosoDateTimeOffset.cs
new file mode 100644
index 0000000..3c28418
--- /dev/null
+++ b/binsrc/VirtuosoClient.Net/VirtuosoDateTimeOffset.cs
@@ -0,0 +1,426 @@
+//  
+//  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+//  project.
+//  
+//  Copyright (C) 1998-2012 OpenLink Software
+//  
+//  This project 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; only version 2 of the License, dated June 1991.
+//  
+//  This program 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
+//  General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License along
+//  with this program; if not, write to the Free Software Foundation, Inc.,
+//  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//  
+//  
+//
+// $Id: VirtuosoDateTimeOffset.cs,v 1.1.4.4 2012/03/08 12:54:55 source Exp $
+//
+
+#if ADONET3
+
+using System;
+using System.Data;
+using System.Data.Common;
+using System.Text;
+using System.Globalization;
+
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Collections;
+
+#if ODBC_CLIENT
+namespace OpenLink.Data.VirtuosoOdbcClient
+#elif CLIENT
+namespace OpenLink.Data.VirtuosoClient
+#else
+namespace OpenLink.Data.Virtuoso
+#endif
+{
+
+	[Serializable]
+	[StructLayout (LayoutKind.Auto)]
+	public struct VirtuosoDateTimeOffset : IFormattable, IComparable
+		, IComparable<VirtuosoDateTimeOffset>, IEquatable <VirtuosoDateTimeOffset>
+	{
+		private DateTimeOffset value;
+
+		private VirtuosoDateTimeOffset (DateTimeOffset dt)
+		{
+			this.value = dt;
+		}
+
+		public VirtuosoDateTimeOffset (long ticks, TimeSpan offset)
+		{
+			this.value = new DateTimeOffset(ticks, offset);
+		}
+
+		public VirtuosoDateTimeOffset (DateTime dt)
+		{
+			this.value = new DateTimeOffset(dt);
+		}
+
+		public VirtuosoDateTimeOffset (DateTime dt, TimeSpan offset)
+		{
+			this.value = new DateTimeOffset(dt, offset);
+		}
+
+		public VirtuosoDateTimeOffset (int year, int month, int day, int hour, int minute, int second, TimeSpan offset)
+		{
+			this.value = new DateTimeOffset(year, month, day, hour, minute, second, offset);
+		}
+
+		public VirtuosoDateTimeOffset (int year, int month, int day, int hour, int minute, int second, long microsecond, TimeSpan offset)
+		{
+			if (microsecond < 0 || microsecond > 999999)
+				throw new ArgumentOutOfRangeException ("Microsecond parameters describe an " +
+									"unrepresentable VirtuosoDateTimeOffset.");
+			DateTimeOffset t = new DateTimeOffset(year, month, day, hour, minute, second, offset);
+			
+			long dateTick = (long) (t.Ticks + microsecond * 10L);
+			this.value = new DateTimeOffset (dateTick, offset);
+		}
+
+		public VirtuosoDateTimeOffset (int year, int month, int day, int hour, int minute, int second, int millisecond, Calendar calendar, TimeSpan offset)
+		{
+			this.value = new DateTimeOffset(year, month, day, hour, minute, second, millisecond, calendar, offset);
+		}
+
+		public VirtuosoDateTimeOffset (int year, int month, int day, int hour, int minute, int second, long microsecond, Calendar calendar, TimeSpan offset)
+		{
+			if (microsecond < 0 || microsecond > 999999)
+				throw new ArgumentOutOfRangeException ("Microsecond parameters describe an " +
+									"unrepresentable VirtuosoDateTime.");
+			DateTimeOffset t = new DateTimeOffset(year, month, day, hour, minute, second, 0, calendar, offset);
+			
+			long dateTick = (long) (t.Ticks + microsecond * 10);
+			this.value = new DateTimeOffset (dateTick, offset);
+		}
+
+
+
+		public DateTime Date 
+		{
+			get	
+			{ 
+				return value.Date;
+			}
+		}
+        
+		public DateTime DateTime 
+		{
+			get	
+			{ 
+				return value.DateTime;
+			}
+		}
+        
+		public int Day 
+		{
+			get	
+			{ 
+				return value.Day;
+			}
+		}
+        
+		public DayOfWeek DayOfWeek 
+		{
+			get 
+			{ 
+				return value.DayOfWeek;
+			}
+		}
+
+		public int DayOfYear 
+		{
+			get 
+			{ 
+				return value.DayOfYear; 
+			}
+		}
+
+		public int Hour 
+		{
+			get 
+			{ 
+				return value.Hour;
+			}
+		}
+
+		public DateTime LocalDateTime 
+		{
+			get 
+			{ 
+				return value.LocalDateTime;
+			}
+		}
+
+		public int Millisecond 
+		{
+			get 
+			{ 
+				return value.Millisecond;
+			}
+		}
+		
+		public long Microsecond 
+		{
+			get 
+			{ 
+			        return (int) (value.Ticks % TimeSpan.TicksPerSecond / 10L);
+			}
+		}
+		
+		public int Minute 
+		{
+			get 
+			{ 
+				return value.Minute;
+			}
+		}
+
+		public int Month 
+		{
+			get	
+			{ 
+				return value.Month; 
+			}
+		}
+
+	       
+		public TimeSpan Offset 
+		{
+			get	
+			{ 
+				return value.Offset; 
+			}
+		}
+
+		public int Second 
+		{
+			get	
+			{ 
+				return value.Second;
+			}
+		}
+
+		public long Ticks
+		{ 
+			get	
+			{ 
+				return value.Ticks;
+			}
+		}
+	
+		public TimeSpan TimeOfDay 
+		{
+			get	
+			{ 
+				return value.TimeOfDay;
+			}
+			
+		}
+
+		public DateTime UtcDateTime
+		{
+			get	
+			{ 
+				return value.UtcDateTime;
+			}
+			
+		}
+
+		public long UtcTicks
+		{ 
+			get	
+			{ 
+				return value.UtcTicks;
+			}
+		}
+	
+		public int Year 
+		{
+			get 
+			{ 
+				return value.Year; 
+			}
+		}
+
+
+		public DateTimeOffset Value {
+			get {
+				return value;
+			}
+		}
+
+
+		public VirtuosoDateTimeOffset Add (TimeSpan ts)
+		{
+			return new VirtuosoDateTimeOffset(value.Add(ts));
+		}
+
+		public VirtuosoDateTimeOffset AddDays (double days)
+		{
+			return new VirtuosoDateTimeOffset(value.AddDays(days));
+		}
+		
+		public VirtuosoDateTimeOffset AddHours (double hours)
+		{
+			return new VirtuosoDateTimeOffset(value.AddHours(hours));
+		}
+
+		public VirtuosoDateTimeOffset AddMilliseconds (double ms)
+		{
+			return new VirtuosoDateTimeOffset(value.AddMilliseconds(ms));
+		}
+
+		public VirtuosoDateTimeOffset AddMinutes (double minutes)
+		{
+			return new VirtuosoDateTimeOffset(value.AddMinutes(minutes));
+		}
+		
+		public VirtuosoDateTimeOffset AddMonths (int months)
+		{
+			return new VirtuosoDateTimeOffset(value.AddMonths(months));
+		}
+
+		public VirtuosoDateTimeOffset AddSeconds (double seconds)
+		{
+			return new VirtuosoDateTimeOffset(value.AddSeconds(seconds));
+		}
+
+		public VirtuosoDateTimeOffset AddTicks (long t)
+		{
+			return new VirtuosoDateTimeOffset(value.AddTicks(t));
+		}
+
+		public VirtuosoDateTimeOffset AddYears (int years )
+		{
+			return new VirtuosoDateTimeOffset(value.AddYears(years));
+		}
+
+		public int CompareTo (object v)
+		{
+			if ( v == null)
+				return 1;
+
+			if (!(v is System.DateTimeOffset) || !(v is VirtuosoDateTimeOffset))
+				throw new ArgumentException ("Value is not a System.DateTimeOffset or VirtuosoDateTimeOffset");
+
+			if (v is VirtuosoDateTimeOffset)
+			  return DateTimeOffset.Compare (value, ((VirtuosoDateTimeOffset) v).value);
+			else
+			  return DateTimeOffset.Compare (value, (DateTimeOffset) v);
+		}
+
+		public int CompareTo (VirtuosoDateTimeOffset v)
+		{
+			if (!(v is VirtuosoDateTimeOffset))
+				throw new ArgumentException ("Value is not a VirtuosoDateTimeOffset");
+
+			return DateTimeOffset.Compare (value, (DateTimeOffset) v.value);
+		}
+
+		public int CompareTo (DateTimeOffset val)
+		{
+			return value.CompareTo (val);
+		}
+
+		public bool Equals (DateTimeOffset val)
+		{
+			return value.Equals(val);
+		}
+
+		public bool Equals (VirtuosoDateTimeOffset val)
+		{
+			return value.Equals(val.value);
+		}
+
+		public override bool Equals (object o)
+		{
+			if (!(o is System.DateTimeOffset) && !(o is VirtuosoDateTimeOffset))
+				return false;
+
+                        if (o is VirtuosoDateTimeOffset)
+			   return ((VirtuosoDateTimeOffset) o).Ticks == Ticks;
+			else
+			   return ((DateTimeOffset) o).Ticks == Ticks;
+		}
+
+
+		public bool EqualsExact (DateTimeOffset val)
+		{
+			return value.EqualsExact(val);
+		}
+
+		public bool EqualsExact (VirtuosoDateTimeOffset val)
+		{
+			return value.EqualsExact(val.value);
+		}
+
+		public override int GetHashCode ()
+		{
+			return value.GetHashCode ();
+		}
+
+		public TimeSpan Subtract(DateTimeOffset dt)
+		{   
+			return value.Subtract(dt);
+		}
+
+		public VirtuosoDateTimeOffset Subtract(TimeSpan ts)
+		{
+			return new VirtuosoDateTimeOffset(value.Subtract(ts));
+		}
+
+		public long ToFileTime()
+		{
+			return value.ToFileTime();
+		}
+
+		public VirtuosoDateTimeOffset ToLocalTime()
+		{
+			return new VirtuosoDateTimeOffset(value.ToLocalTime());
+		}
+
+		public VirtuosoDateTimeOffset ToOffset(TimeSpan offset)
+		{
+			return new VirtuosoDateTimeOffset(value.ToOffset (offset));
+		}
+
+		public override string ToString ()
+		{
+			return value.ToString ("o");
+		}
+
+		public string ToString (IFormatProvider fp)
+		{
+			return value.ToString (fp);
+		}
+
+		public string ToString (string format)
+		{
+			return value.ToString (format);
+		}
+
+		public string ToString (string format, IFormatProvider fp)
+
+		{
+			return value.ToString (format, fp);
+		}
+
+		public VirtuosoDateTimeOffset ToUniversalTime ()
+		{
+			return new VirtuosoDateTimeOffset(value.ToUniversalTime());
+		}
+
+
+
+    }
+}
+#endif
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoError.cs b/binsrc/VirtuosoClient.Net/VirtuosoError.cs
index 316b6fe..09ce572 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoError.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoError.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoError.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoError.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoErrorCollection.cs b/binsrc/VirtuosoClient.Net/VirtuosoErrorCollection.cs
index 419fe07..66980ce 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoErrorCollection.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoErrorCollection.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoErrorCollection.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoErrorCollection.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoException.cs b/binsrc/VirtuosoClient.Net/VirtuosoException.cs
index e8dccf4..f42d9c3 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoException.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoException.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoException.cs,v 1.2 2007/02/01 12:11:57 source Exp $
+// $Id: VirtuosoException.cs,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoInfoMessage.cs b/binsrc/VirtuosoClient.Net/VirtuosoInfoMessage.cs
index 677db91..47696f4 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoInfoMessage.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoInfoMessage.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoInfoMessage.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoInfoMessage.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoParameter.cs b/binsrc/VirtuosoClient.Net/VirtuosoParameter.cs
index 8874dd2..d464462 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoParameter.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoParameter.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoParameter.cs,v 1.3 2008/09/30 16:30:56 source Exp $
+// $Id: VirtuosoParameter.cs,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoParameterCollection.cs b/binsrc/VirtuosoClient.Net/VirtuosoParameterCollection.cs
index 236eb22..f6b9aa5 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoParameterCollection.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoParameterCollection.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoParameterCollection.cs,v 1.3 2008/09/30 16:30:56 source Exp $
+// $Id: VirtuosoParameterCollection.cs,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoPermission.cs b/binsrc/VirtuosoClient.Net/VirtuosoPermission.cs
index 460f66a..c3472c6 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoPermission.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoPermission.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoPermission.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoPermission.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoPermissionAttribute.cs b/binsrc/VirtuosoClient.Net/VirtuosoPermissionAttribute.cs
index e624ef3..aeb35da 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoPermissionAttribute.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoPermissionAttribute.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoPermissionAttribute.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoPermissionAttribute.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoTimeSpan.cs b/binsrc/VirtuosoClient.Net/VirtuosoTimeSpan.cs
new file mode 100644
index 0000000..41198a5
--- /dev/null
+++ b/binsrc/VirtuosoClient.Net/VirtuosoTimeSpan.cs
@@ -0,0 +1,269 @@
+//  
+//  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+//  project.
+//  
+//  Copyright (C) 1998-2012 OpenLink Software
+//  
+//  This project 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; only version 2 of the License, dated June 1991.
+//  
+//  This program 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
+//  General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License along
+//  with this program; if not, write to the Free Software Foundation, Inc.,
+//  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//  
+//  
+//
+// $Id: VirtuosoTimeSpan.cs,v 1.1.4.4 2012/03/08 12:54:55 source Exp $
+//
+
+using System;
+using System.Data;
+using System.Data.Common;
+using System.Text;
+using System.Globalization;
+
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Collections;
+
+#if ODBC_CLIENT
+namespace OpenLink.Data.VirtuosoOdbcClient
+#elif CLIENT
+namespace OpenLink.Data.VirtuosoClient
+#else
+namespace OpenLink.Data.Virtuoso
+#endif
+{
+
+	[Serializable]
+	public struct VirtuosoTimeSpan : IComparable
+		, IComparable<VirtuosoTimeSpan>, IEquatable <VirtuosoTimeSpan>
+	{
+		private TimeSpan value;
+
+		public VirtuosoTimeSpan (long val)
+		{
+			this.value = new TimeSpan(val);
+		}
+
+		public VirtuosoTimeSpan (int hours, int minutes, int seconds)
+		{
+			this.value = new TimeSpan(hours, minutes, seconds);
+		}
+
+		public VirtuosoTimeSpan (int days, int hours, int minutes, int seconds)
+		{
+			this.value = new TimeSpan(days, hours, minutes, seconds);
+		}
+
+		public VirtuosoTimeSpan (int days, int hours, int minutes, int seconds, long microseconds)
+		{
+			if (microseconds < 0 || microseconds > 999999)
+				throw new ArgumentOutOfRangeException ("Microseconds parameters describe an " +
+									"unrepresentable VirtuosoTimeSpan.");
+			TimeSpan t = new TimeSpan(days, hours, minutes, seconds);
+			
+			long dateTick = (long) (t.Ticks + microseconds * 10);
+			this.value = new TimeSpan (dateTick);
+		}
+
+
+		public int Days {
+			get {
+				return value.Days;
+			}
+		}
+
+		public int Hours {
+			get {
+				return value.Hours;
+			}
+		}
+
+		public int Milliseconds {
+			get {
+				return value.Milliseconds;
+			}
+		}
+
+		public long Microseconds {
+			get {
+				return (long) (value.Ticks % TimeSpan.TicksPerSecond / 10L);
+			}
+		}
+
+		public int Minutes {
+			get {
+				return value.Minutes;
+			}
+		}
+
+		public int Seconds {
+			get {
+				return value.Seconds;
+			}
+		}
+
+		public long Ticks {
+			get {
+				return value.Ticks;
+			}
+		}
+
+		public double TotalDays {
+			get {
+				return value.TotalDays;
+			}
+		}
+
+		public double TotalHours {
+			get {
+				return value.TotalHours;
+			}
+		}
+
+		public double TotalMilliseconds {
+			get {
+				return value.TotalMilliseconds;
+			}
+		}
+
+		public double TotalMinutes {
+			get {
+				return value.TotalMinutes;
+			}
+		}
+
+		public double TotalSeconds {
+			get {
+				return value.TotalSeconds;
+			}
+		}
+
+		public TimeSpan Value {
+			get {
+				return value;
+			}
+		}
+
+	
+		
+		public TimeSpan Add (TimeSpan ts)
+		{
+			return value.Add(ts);
+		}
+
+
+		public static int Compare (VirtuosoTimeSpan t1, VirtuosoTimeSpan t2)
+		{
+			if (t1.Ticks < t2.Ticks)
+				return -1;
+			if (t1.Ticks > t2.Ticks)
+				return 1;
+			return 0;
+		}
+
+		public int CompareTo (object val)
+		{
+			if (val == null)
+				return 1;
+
+			if (!(val is TimeSpan) || !(val is VirtuosoTimeSpan)) {
+				throw new ArgumentException ("Argument has to be a TimeSpan.", "value");
+			}
+
+			if (val is VirtuosoTimeSpan)
+			   return Compare (this, (VirtuosoTimeSpan) val);
+			else
+			   return TimeSpan.Compare (this.value, (TimeSpan) val);
+		}
+
+	        public int CompareTo(VirtuosoTimeSpan value)
+        	{
+	            return Compare(this, value);
+	        }
+
+	        public bool Equals(TimeSpan val)
+		{
+			return value.Ticks == val.Ticks;
+		}
+
+		public bool Equals (VirtuosoTimeSpan val)
+		{
+			return value.Ticks == val.Ticks;
+		}
+
+		public TimeSpan Duration ()
+		{
+			return value.Duration();
+		}
+
+		public override bool Equals (object val)
+		{
+			if (!(val is TimeSpan) || !(val is VirtuosoTimeSpan))
+				return false;
+
+			if (val is VirtuosoTimeSpan)
+			  return value.Ticks == ((VirtuosoTimeSpan) val).Ticks;
+			else
+			  return value.Ticks == ((TimeSpan) val).Ticks;
+		}
+
+		public static VirtuosoTimeSpan FromDays (double val)
+		{
+			return new VirtuosoTimeSpan(TimeSpan.FromDays (val).Ticks);
+		}
+
+		public static VirtuosoTimeSpan FromHours (double val)
+		{
+			return new VirtuosoTimeSpan(TimeSpan.FromHours (val).Ticks);
+		}
+
+		public static VirtuosoTimeSpan FromMinutes (double val)
+		{
+			return new VirtuosoTimeSpan(TimeSpan.FromMinutes (val).Ticks);
+		}
+
+		public static VirtuosoTimeSpan FromSeconds (double val)
+		{
+			return new VirtuosoTimeSpan(TimeSpan.FromSeconds(val).Ticks);
+		}
+
+		public static VirtuosoTimeSpan FromMilliseconds (double val)
+		{
+			return new VirtuosoTimeSpan(TimeSpan.FromMilliseconds (val).Ticks);
+		}
+
+		public static VirtuosoTimeSpan FromTicks (long value)
+		{
+			return new VirtuosoTimeSpan(TimeSpan.FromTicks(value).Ticks);
+		}
+
+		public override int GetHashCode ()
+		{
+			return value.Ticks.GetHashCode ();
+		}
+
+		public VirtuosoTimeSpan Negate ()
+		{
+		        return new VirtuosoTimeSpan(value.Negate().Ticks);
+		}
+
+		public VirtuosoTimeSpan Subtract (TimeSpan ts)
+		{
+		        return new VirtuosoTimeSpan(value.Subtract(ts).Ticks);
+		}
+
+		public override string ToString ()
+		{
+		        return value.ToString();
+		}
+
+    }
+}
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoTransaction.cs b/binsrc/VirtuosoClient.Net/VirtuosoTransaction.cs
index 80d1c34..7ef0fc5 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoTransaction.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoTransaction.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,12 +19,13 @@
 //  
 //  
 //
-// $Id: VirtuosoTransaction.cs,v 1.3.2.2 2010/12/17 17:40:44 source Exp $
+// $Id: VirtuosoTransaction.cs,v 1.3.2.5 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
 using System.Data;
 using System.Data.Common;
+using System.Diagnostics;
 
 #if ODBC_CLIENT
 namespace OpenLink.Data.VirtuosoOdbcClient
@@ -135,8 +136,19 @@ namespace OpenLink.Data.Virtuoso
 			if (disposing)
 			{
 				if (!ended)
+                {
+                    try
+                    {
 					Rollback ();
 			}
+                    catch (Exception e)
+                    {
+                        // Dispose method should never throw an exception.
+                        // So just log any messages.
+                        Debug.WriteLineIf(CLI.FnTrace.Enabled, "VirtuosoTransaction.Dispose caught exception: " + e.Message);
+                    }
+                }
+			}
 			connection = null;
 #if ADONET2
             base.Dispose(disposing);
diff --git a/binsrc/VirtuosoClient.Net/VirtuosoWarning.cs b/binsrc/VirtuosoClient.Net/VirtuosoWarning.cs
index 0ba8b8d..3ea2373 100644
--- a/binsrc/VirtuosoClient.Net/VirtuosoWarning.cs
+++ b/binsrc/VirtuosoClient.Net/VirtuosoWarning.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: VirtuosoWarning.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoWarning.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/Win32.cs b/binsrc/VirtuosoClient.Net/Win32.cs
index c596cf3..2cd51d8 100644
--- a/binsrc/VirtuosoClient.Net/Win32.cs
+++ b/binsrc/VirtuosoClient.Net/Win32.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 //
-// $Id: Win32.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: Win32.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/VirtuosoClient.Net/design/AssemblyInfo.cs b/binsrc/VirtuosoClient.Net/design/AssemblyInfo.cs
index 9fbac19..f4fffa0 100644
--- a/binsrc/VirtuosoClient.Net/design/AssemblyInfo.cs
+++ b/binsrc/VirtuosoClient.Net/design/AssemblyInfo.cs
@@ -1,5 +1,5 @@
 // 
-// $Id: AssemblyInfo.cs,v 1.2 2007/05/29 12:13:12 source Exp $
+// $Id: AssemblyInfo.cs,v 1.2.2.1 2012/03/08 13:13:48 source Exp $
 //
 
 using System.Reflection;
@@ -25,7 +25,7 @@ using System.Runtime.CompilerServices;
 #endif
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("OpenLink Software")]
-[assembly: AssemblyCopyright("Copyright (C) OpenLink Software 2007. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright (C) 1998-2012 OpenLink Software. All rights reserved.")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]		
 
diff --git a/binsrc/VirtuosoClient.Net/design/VirtuosoConnectionStringEditor.cs b/binsrc/VirtuosoClient.Net/design/VirtuosoConnectionStringEditor.cs
index 5b62014..d34d224 100644
--- a/binsrc/VirtuosoClient.Net/design/VirtuosoConnectionStringEditor.cs
+++ b/binsrc/VirtuosoClient.Net/design/VirtuosoConnectionStringEditor.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoConnectionStringEditor.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoConnectionStringEditor.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 #if (!MONO)
diff --git a/binsrc/VirtuosoClient.Net/design/VirtuosoDataAdapterDesigner.cs b/binsrc/VirtuosoClient.Net/design/VirtuosoDataAdapterDesigner.cs
index 01601a2..78f4ff9 100644
--- a/binsrc/VirtuosoClient.Net/design/VirtuosoDataAdapterDesigner.cs
+++ b/binsrc/VirtuosoClient.Net/design/VirtuosoDataAdapterDesigner.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoDataAdapterDesigner.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoDataAdapterDesigner.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 #if (!MONO)
diff --git a/binsrc/VirtuosoClient.Net/design/VirtuosoDotNetDSNForm.cs b/binsrc/VirtuosoClient.Net/design/VirtuosoDotNetDSNForm.cs
index 8785d44..dc50f1e 100644
--- a/binsrc/VirtuosoClient.Net/design/VirtuosoDotNetDSNForm.cs
+++ b/binsrc/VirtuosoClient.Net/design/VirtuosoDotNetDSNForm.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/VirtuosoClient.Net/design/VirtuosoGenerateDataSet.cs b/binsrc/VirtuosoClient.Net/design/VirtuosoGenerateDataSet.cs
index a9d4fff..62863a6 100644
--- a/binsrc/VirtuosoClient.Net/design/VirtuosoGenerateDataSet.cs
+++ b/binsrc/VirtuosoClient.Net/design/VirtuosoGenerateDataSet.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 //  
 //  
 // 
-// $Id: VirtuosoGenerateDataSet.cs,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+// $Id: VirtuosoGenerateDataSet.cs,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 //
 
 using System;
diff --git a/binsrc/b3s/Makefile.am b/binsrc/b3s/Makefile.am
index eadad28..2bfdd03 100644
--- a/binsrc/b3s/Makefile.am
+++ b/binsrc/b3s/Makefile.am
@@ -1,10 +1,10 @@
 #
-#  $Id: Makefile.am,v 1.1.2.4 2009/07/09 13:24:35 source Exp $
+#  $Id: Makefile.am,v 1.1.2.5 2012/03/05 12:08:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/Makefile.in b/binsrc/b3s/Makefile.in
index 72dbf57..f08998e 100644
--- a/binsrc/b3s/Makefile.in
+++ b/binsrc/b3s/Makefile.in
@@ -16,12 +16,12 @@
 @SET_MAKE@
 
 #
-#  $Id: Makefile.am,v 1.1.2.4 2009/07/09 13:24:35 source Exp $
+#  $Id: Makefile.am,v 1.1.2.5 2012/03/05 12:08:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -125,6 +125,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -173,6 +174,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -224,6 +226,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -270,7 +273,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/b3s/VirtTripleLoader/.classpath b/binsrc/b3s/VirtTripleLoader/.classpath
index c35fe25..f1887fa 100644
--- a/binsrc/b3s/VirtTripleLoader/.classpath
+++ b/binsrc/b3s/VirtTripleLoader/.classpath
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 --
---  $Id: .classpath,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: .classpath,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/VirtTripleLoader/.project b/binsrc/b3s/VirtTripleLoader/.project
index 3cdd176..7b40835 100644
--- a/binsrc/b3s/VirtTripleLoader/.project
+++ b/binsrc/b3s/VirtTripleLoader/.project
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 --
---  $Id: .project,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: .project,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/Logger.java b/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/Logger.java
index adab9cf..3791c0f 100644
--- a/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/Logger.java
+++ b/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/Logger.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Logger.java,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+ *  $Id: Logger.java,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/VirtTripleLoaderInit.java b/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/VirtTripleLoaderInit.java
index c0b2426..29ad3fe 100644
--- a/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/VirtTripleLoaderInit.java
+++ b/binsrc/b3s/VirtTripleLoader/src/virtTripleLoaderInit/VirtTripleLoaderInit.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtTripleLoaderInit.java,v 1.1.2.3 2011/03/08 15:43:44 source Exp $
+ *  $Id: VirtTripleLoaderInit.java,v 1.1.2.5 2012/03/05 17:38:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -84,7 +84,7 @@ public class VirtTripleLoaderInit {
 	private static final Integer myMajorVer = 0;
 	private static final Integer myMinorVer = 1;
 	private static final Integer myBuild = 0;
-	private static final String myCopyright = "Copyright (c) 2008-2011 OpenLink Software";
+	private static final String myCopyright = "Copyright (c) 2008-2012 OpenLink Software";
 
 	private static final String virtConnectUrlDef = "jdbc:virtuoso://neo:1111";
 	private static final String virtUserDef = "dba";
@@ -126,7 +126,7 @@ public class VirtTripleLoaderInit {
 			while ((c = _block.read()) != -1) {
 
 				bytesInFile ++;
-				outStream.write(c); 
+				outStream.write(c);
 
 			}
 
diff --git a/binsrc/b3s/b3s_cl_rexec.sql b/binsrc/b3s/b3s_cl_rexec.sql
index 75cb776..a1a3966 100644
--- a/binsrc/b3s/b3s_cl_rexec.sql
+++ b/binsrc/b3s/b3s_cl_rexec.sql
@@ -1,12 +1,12 @@
 --
---  $Id: b3s_cl_rexec.sql,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: b3s_cl_rexec.sql,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  Executes query on b3s cluster and returns serialized array
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/b3sq.sql b/binsrc/b3s/b3sq.sql
index 562dd25..244b37e 100644
--- a/binsrc/b3s/b3sq.sql
+++ b/binsrc/b3s/b3sq.sql
@@ -1,10 +1,10 @@
 --
---  $Id: b3sq.sql,v 1.1.2.3 2009/08/27 22:15:49 source Exp $
+--  $Id: b3sq.sql,v 1.1.2.5 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -760,7 +760,7 @@ where
 
 
 
-select "path", xmlelement ('path', xmlagg (xmlelement ('step', "via"))) from 
+select "path", xmlelement ('path', xmlagg (xmlelement ('step', "via"))) from
 (sparql select ?o ?via ?dist ?path where
   {
     {select ?s ?o
diff --git a/binsrc/b3s/bbc_demo_queries.vsp b/binsrc/b3s/bbc_demo_queries.vsp
index 60eff72..0517ac4 100644
--- a/binsrc/b3s/bbc_demo_queries.vsp
+++ b/binsrc/b3s/bbc_demo_queries.vsp
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC
-  "-//W3C//DTD XHTML 1.0 Strict//EN"	
+  "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
@@ -33,7 +33,7 @@ function get_and_encode_query (q_elm)
 
 </script>
 </head>
-<body>  
+<body>
   <div id="PG">
     <div id="HD">
       <a class="logo" href="/fct/facet.vsp">
@@ -43,7 +43,7 @@ function get_and_encode_query (q_elm)
     <div id="MD">
       <div id="demo_queries_ctr">
         <h1>BBC Dataset Sample Queries</h1>
-        <p>These queries demonstrate some of the types of queries that can be done over the BBC dataset</p> 
+        <p>These queries demonstrate some of the types of queries that can be done over the BBC dataset</p>
         <ul class="demo_qry_list">
           <li>
             <h2>EastEnders episodes</h2>
@@ -52,18 +52,18 @@ function get_and_encode_query (q_elm)
               <pre id="q1">
 PREFIX po: <http://purl.org/ontology/po/>
 PREFIX dc: <http://purl.org/dc/elements/1.1/>
-              
-select distinct ?title ?short_syn 
-where { 
-  <http://www.bbc.co.uk/programmes/b006m86d#programme> po:episode ?e .  
-  ?e a po:Episode .  
+
+select distinct ?title ?short_syn
+where {
+  <http://www.bbc.co.uk/programmes/b006m86d#programme> po:episode ?e .
+  ?e a po:Episode .
   ?e po:short_synopsis ?short_syn .
   ?e dc:title ?title
 }
               </pre>
             </div>
             <div class="actions">
-              <a onclick="javascript:sparql_qry('q1');" href="#">Run in SPARQL endpoint</a> 
+              <a onclick="javascript:sparql_qry('q1');" href="#">Run in SPARQL endpoint</a>
               <a onclick="javascript:isparql_qry('q1');" href="#">Open in iSPARQL</a>
             </div>
           </li>
@@ -92,7 +92,7 @@ where {
               </pre>
             </div>
             <div class="actions">
-              <a onclick="javascript:sparql_qry('q2');" href="#">Run in SPARQL endpoint</a> 
+              <a onclick="javascript:sparql_qry('q2');" href="#">Run in SPARQL endpoint</a>
               <a onclick="javascript:isparql_qry('q2');" href="#">Open in iSPARQL</a>
             </div>
           </li>
@@ -108,8 +108,8 @@ PREFIX rev:  <http://purl.org/stuff/rev#>
 PREFIX po:   <http://purl.org/ontology/po/>
 
 select distinct ?r_name, ?rev
-where {  
-        {    
+where {
+        {
           <http://www.bbc.co.uk/music/artists/4490113a-3880-4f5b-a39b-105bfceaed04#artist> foaf:made ?r1 .
           ?r1 a mo:Record .
           ?r1 dc:title ?r_name .
@@ -121,11 +121,11 @@ where {
           ?r1 dc:title ?r_name .
           ?r1 rev:hasReview ?rev
         }
-      }  
+      }
               </pre>
             </div>
             <div class="actions">
-              <a onclick="javascript:sparql_qry('q3');" href="#">Run in SPARQL endpoint</a> 
+              <a onclick="javascript:sparql_qry('q3');" href="#">Run in SPARQL endpoint</a>
               <a onclick="javascript:isparql_qry('q3');" href="#">Open in iSPARQL</a>
             </div>
           </li>
@@ -140,7 +140,7 @@ where {
         <img alt="Linked Data" src="/fct/images/LoDLogo.gif"/>
       </a>
       <br/>
-      <span class="copyright">Copyright © 2009-2011 OpenLink Software</span>
+      <span class="copyright">Copyright © 2009-2012 OpenLink Software</span>
       <div id="FT_L"/>
       <div id="FT_R"/>
     </div> <!-- #FT -->
diff --git a/binsrc/b3s/cl_prx.sql b/binsrc/b3s/cl_prx.sql
index 862675b..e37fdac 100644
--- a/binsrc/b3s/cl_prx.sql
+++ b/binsrc/b3s/cl_prx.sql
@@ -1,10 +1,10 @@
 --
---  $Id: cl_prx.sql,v 1.1.2.5 2010/09/20 09:51:10 source Exp $
+--  $Id: cl_prx.sql,v 1.1.2.7 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -242,10 +242,10 @@ DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_fctabout_http_proxy_rule_5', 1,
     '/describe/\\?uri=([^\&]*)\&graph=([^\&]*)', vector ('g', 'graph'), 2,
     '/fct/rdfdesc/description.vsp?g=%s&graph=%s', vector ('g', 'graph'), null, null, 2);
 
-DB.DBA.URLREWRITE_CREATE_RULELIST ('ext_fctabout_http_proxy_rule_list1', 1, 
-    vector ('ext_fctabout_http_proxy_rule_1', 
-      	    'ext_fctabout_http_proxy_rule_2', 
-	    'ext_fctabout_http_proxy_rule_3', 
+DB.DBA.URLREWRITE_CREATE_RULELIST ('ext_fctabout_http_proxy_rule_list1', 1,
+    vector ('ext_fctabout_http_proxy_rule_1',
+      	    'ext_fctabout_http_proxy_rule_2',
+	    'ext_fctabout_http_proxy_rule_3',
 	    'ext_fctabout_http_proxy_rule_4',
 	    'ext_fctabout_http_proxy_rule_5'
 	    ));
diff --git a/binsrc/b3s/complete.sql b/binsrc/b3s/complete.sql
index 9b7fab8..dbd4420 100644
--- a/binsrc/b3s/complete.sql
+++ b/binsrc/b3s/complete.sql
@@ -1,10 +1,10 @@
 --
---  $Id: complete.sql,v 1.1.2.8 2011/03/24 15:50:37 source Exp $
+--  $Id: complete.sql,v 1.1.2.11 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,9 +20,9 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 
--- URI completion 
+-- URI completion
 
-create procedure 
+create procedure
 num_str (in n int)
 {
   declare s varchar;
@@ -38,7 +38,7 @@ num_str (in n int)
 }
 ;
 
-create procedure 
+create procedure
 str_inc (in str varchar, in pref int := 0)
 {
   -- increment by one for range cmp
@@ -66,7 +66,7 @@ str_inc (in str varchar, in pref int := 0)
 --}
 
 
-create procedure 
+create procedure
 cmp_find_iri (in str varchar, in no_name int := 0)
 {
   /* We look for iris, assuming the full ns is in the name  */
@@ -80,11 +80,11 @@ cmp_find_iri (in str varchar, in no_name int := 0)
       pref := str;
       name := '1111';
     }
-  else 
+  else
     pref := iri_split (str, name, 1);
 
-  id := (select rp_id 
-           from rdf_prefix 
+  id := (select rp_id
+           from rdf_prefix
            where rp_name = pref);
 
   if (id is null)
@@ -98,34 +98,34 @@ cmp_find_iri (in str varchar, in no_name int := 0)
 
   if (no_name)
     {
-      iris :=  (select vector_agg (ri_name) 
-                from (select top 20 ri_name 
-                        from rdf_iri 
-                        where ri_name >= name and 
+      iris :=  (select vector_agg (ri_name)
+                from (select top 20 ri_name
+                        from rdf_iri
+                        where ri_name >= name and
                               ri_name < num_str (id + 1)) ir);
 
       if (length (iris) < 20 and length (iris) > 1)
-        iris := (select vector_agg (ri_name) 
-                 from (select ri_name 
-                         from rdf_iri 
-                         where ri_name >= name and 
+        iris := (select vector_agg (ri_name)
+                 from (select ri_name
+                         from rdf_iri
+                         where ri_name >= name and
                                ri_name < num_str (id + 1)
                          order by iri_rank (ri_id) desc) ir);
     }
-  else 
+  else
     {
-      iris :=  (select vector_agg (ri_name) 
-                  from (select top 20 ri_name 
-                          from rdf_iri 
-                          where ri_name >= name and 
+      iris :=  (select vector_agg (ri_name)
+                  from (select top 20 ri_name
+                          from rdf_iri
+                          where ri_name >= name and
                                 ri_name < str_inc (name, 4)) ir);
 
       if (length (iris) < 20 and length (iris) > 1)
-        iris := (select vector_agg (ri_name) 
-                 from (select ri_name 
-                         from rdf_iri 
-                         where ri_name >= name and 
-                               ri_name < str_inc (name, 4) 
+        iris := (select vector_agg (ri_name)
+                 from (select ri_name
+                         from rdf_iri
+                         where ri_name >= name and
+                               ri_name < str_inc (name, 4)
                          order by iri_rank (ri_id) desc) ir);
     }
 
@@ -138,15 +138,14 @@ cmp_find_iri (in str varchar, in no_name int := 0)
 }
 ;
 
-create procedure 
+create procedure
 cmp_find_ns (in str varchar)
 {
   declare nss any;
-
-  nss := (select vector_agg (rp_name) 
-            from (select top 20 rp_name 
-                    from rdf_prefix 
-                    where rp_name >= str and 
+  nss := (select vector_agg (rp_name)
+            from (select top 20 rp_name
+                    from rdf_prefix
+                    where rp_name >= str and
                           rp_name < str_inc (str)) ns);
 
   return nss;
@@ -154,7 +153,7 @@ cmp_find_ns (in str varchar)
 ;
 
 
-create procedure 
+create procedure
 cmp_with_ns (in str varchar)
 {
   declare pref_str varchar;
@@ -165,8 +164,8 @@ cmp_with_ns (in str varchar)
   if (col = 0)
     return null;
 
-  pref_str := (select ns_url 
-                 from SYS_XML_PERSISTENT_NS_DECL 
+  pref_str := (select ns_url
+                 from SYS_XML_PERSISTENT_NS_DECL
                  where ns_prefix = subseq (str, 0, col - 1));
   if (pref_str is null)
     return null;
@@ -177,7 +176,7 @@ cmp_with_ns (in str varchar)
 ;
 
 
-create procedure 
+create procedure
 cmp_uri (in str varchar)
 {
   declare with_ns varchar;
@@ -193,6 +192,7 @@ cmp_uri (in str varchar)
 	return cmp_find_iri (with_ns);
 
       -- no protocol and no known prefix
+      if (strstr (str, ':') is null)
 	str := 'http://' || str;
     }
 
@@ -217,7 +217,7 @@ cmp_uri (in str varchar)
 }
 ;
 
-create procedure 
+create procedure
 urilbl_ac_ruin_label (in lbl varchar)
 {
   declare tmp any;
@@ -229,7 +229,7 @@ urilbl_ac_ruin_label (in lbl varchar)
 }
 ;
 
-create procedure 
+create procedure
 urilbl_ac_init_log (in msg varchar)
 {
 --  dbg_printf(msg);
@@ -241,7 +241,7 @@ urilbl_ac_init_log (in msg varchar)
 -- Originally from rdf_mappers/rdfdesc.sql
 -- Determine q of given lang based on value of Accept-Language hdr
 
-create procedure 
+create procedure
 cmp_get_lang_by_q (in accept varchar, in lang varchar)
 {
   declare format, itm, q varchar;
diff --git a/binsrc/b3s/complete_cl.sql b/binsrc/b3s/complete_cl.sql
index e678ce2..b54f76e 100644
--- a/binsrc/b3s/complete_cl.sql
+++ b/binsrc/b3s/complete_cl.sql
@@ -1,6 +1,6 @@
 
 create procedure
-urilbl_ac_init_db () 
+urilbl_ac_init_db ()
 {
   --pl_debug+
   declare n, n_ins, n_strange integer;
@@ -21,24 +21,24 @@ urilbl_ac_init_db ()
 -- XXX check if the unresolved literal problem still needs a workaround
 
   daq := daq (1);
-  for (sparql 
-        define output:valmode 'LONG' 
-        define input:inference 'facets' 
-        select ?s ?o where { ?s virtrdf:label ?o }) do 
+  for (sparql
+        define output:valmode 'LONG'
+        define input:inference 'facets'
+        select ?s ?o where { ?s virtrdf:label ?o }) do
     {
       declare lng, id int;
       lng := 257;
-      if (__tag of rdf_box = __tag(o)) 
-	{ 
+      if (__tag of rdf_box = __tag(o))
+        {
 	  o_str := cast (o as varchar);
 	  lng := rdf_box_lang (o);
 	  id := rdf_box_ro_id (o);
-        }
+	}
       else
 	{
           n_strange := n_strange + 1;
 	  goto cont;
-        } 
+        }
 
       n_ins := n_ins + 1;
 
@@ -48,15 +48,15 @@ urilbl_ac_init_db ()
 	--insert into rdf_label option (into daq) (rl_o, rl_ro_id, rl_text, rl_lang) values (o, id, urilbl_ac_ruin_label (o_str), lng);
       insert soft rdf_label (rl_o, rl_ro_id, rl_text, rl_lang) values (o, id, urilbl_ac_ruin_label (o_str), lng);
 
-     cont:;
+      cont:;
       n := n + 1;
-      if (mod (n, 1000000) = 0) 
-        urilbl_ac_init_log (sprintf ('urilbl_ac_init_db: %d rows, %d ins, %d strange...\n', 
-                                      n, n_ins, n_strange));
+      if (mod (n, 1000000) = 0)
+	urilbl_ac_init_log (sprintf ('urilbl_ac_init_db: %d rows, %d ins, %d strange...\n',
+	      n, n_ins, n_strange));
       if (0 = mod (n, 10000))
 	{
 	  daq_results (daq);
-	daq := daq (1);
+	  daq := daq (1);
 	  commit work;
 	}
     }
@@ -85,11 +85,11 @@ cmp_label (in lbl_str varchar, in langs varchar)
   best_q := 0;
 
   {
-    declare exit handler for sqlstate 'S1TAT' { 
+    declare exit handler for sqlstate 'S1TAT' {
       goto done;
     };
 
-    for (select rl_lang, s as ull_iid, __ro2sq (o) as ull_label from rdf_label, rdf_quad  
+    for (select rl_lang, s as ull_iid, __ro2sq (o) as ull_label from rdf_label, rdf_quad
 	where rl_text like urilbl_ac_ruin_label (lbl_str) || '%' and rl_o = o) do
       {
 	declare ull_label_lang varchar;
@@ -107,7 +107,7 @@ cmp_label (in lbl_str varchar, in langs varchar)
         cur_iid := ull_iid;
         q := cmp_get_lang_by_q (langs, ull_label_lang);
 
-        if (q >= best_q) 
+        if (q >= best_q)
           {
             best_q := q;
 	    if (__tag (ull_label) = 246)
diff --git a/binsrc/b3s/complete_ddl.sql b/binsrc/b3s/complete_ddl.sql
index ab15032..895adec 100644
--- a/binsrc/b3s/complete_ddl.sql
+++ b/binsrc/b3s/complete_ddl.sql
@@ -1,10 +1,10 @@
 --
---  $Id: complete_ddl.sql,v 1.1.2.5 2009/10/07 10:27:20 source Exp $
+--  $Id: complete_ddl.sql,v 1.1.2.7 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -34,7 +34,7 @@ urilbl_complete_lookup_2 (
 EXEC_STMT ('alter index urilbl_complete_lookup_2 on urilbl_complete_lookup_2 partition (ull_label_ruined varchar (6,0hexffff))', 0);
 
 EXEC_STMT (
-'create table 
+'create table
 urilbl_cpl_log (
   ullog_ts timestamp,
   ullog_msg varchar,
diff --git a/binsrc/b3s/complete_single.sql b/binsrc/b3s/complete_single.sql
index 34c9649..7d7f623 100644
--- a/binsrc/b3s/complete_single.sql
+++ b/binsrc/b3s/complete_single.sql
@@ -1,6 +1,6 @@
 
 create procedure
-urilbl_ac_init_db () 
+urilbl_ac_init_db ()
 {
   declare n, n_ins, n_strange integer;
   declare o_str varchar;
@@ -18,35 +18,35 @@ urilbl_ac_init_db ()
 -- XXX test that this inference graph exists a priori
 -- XXX check if the unresolved literal problem still needs a workaround
 
-  for (sparql 
-        define output:valmode 'LONG' 
-        define input:inference 'facets' 
-        select ?s ?o (lang(?o)) as ?lng where { ?s virtrdf:label ?o }) do 
+  for (sparql
+        define output:valmode 'LONG'
+        define input:inference 'facets'
+        select ?s ?o (lang(?o)) as ?lng where { ?s virtrdf:label ?o }) do
     {
-      if (__tag of rdf_box = __tag(o)) 
+      if (__tag of rdf_box = __tag(o))
 	o_str := cast (o as varchar);
       else if (isstring(o) and o not like 'Unresolved literal for ID%')
-	{ 
+	{
 	  o_str := o;
         }
       else
 	{
           n_strange := n_strange + 1;
 	  goto cont;
-        } 
+        }
 
       n_ins := n_ins + 1;
 
       o_str := "LEFT"(o_str, 512);
 
-      insert soft urilbl_complete_lookup_2 
-           (ull_label_lang, ull_label_ruined, ull_iid, ull_label) 
+      insert soft urilbl_complete_lookup_2
+           (ull_label_lang, ull_label_ruined, ull_iid, ull_label)
           values (lng, urilbl_ac_ruin_label (o_str), s, o_str);
 
      cont:;
       n := n + 1;
-      if (mod (n, 1000000) = 0) 
-        urilbl_ac_init_log (sprintf ('urilbl_ac_init_db: %d rows, %d ins, %d strange...\n', 
+      if (mod (n, 1000000) = 0)
+        urilbl_ac_init_log (sprintf ('urilbl_ac_init_db: %d rows, %d ins, %d strange...\n',
                                       n, n_ins, n_strange));
       if (0 = mod (n, 10000))
 	{
@@ -77,12 +77,12 @@ cmp_label (in lbl_str varchar, in langs varchar)
   best_q := 0;
 
   {
-    declare exit handler for sqlstate 'S1TAT' { 
+    declare exit handler for sqlstate 'S1TAT' {
       goto done;
     };
 
     for (select ull_label_lang, ull_label, ull_iid
-         from urilbl_complete_lookup_2 
+         from urilbl_complete_lookup_2
          where ull_label_ruined like urilbl_ac_ruin_label (lbl_str) || '%') do
       {
         if (cur_iid is not null and ull_iid <> cur_iid)
@@ -96,7 +96,7 @@ cmp_label (in lbl_str varchar, in langs varchar)
         cur_iid := ull_iid;
         q := cmp_get_lang_by_q (langs, ull_label_lang);
 
-        if (q >= best_q) 
+        if (q >= best_q)
           {
             best_q := q;
             cur_lbl := ull_label;
diff --git a/binsrc/b3s/complete_svc.sql b/binsrc/b3s/complete_svc.sql
index bf318e7..000f854 100644
--- a/binsrc/b3s/complete_svc.sql
+++ b/binsrc/b3s/complete_svc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: complete_svc.sql,v 1.1.2.5 2010/05/16 18:56:48 source Exp $
+--  $Id: complete_svc.sql,v 1.1.2.7 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,7 +20,7 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 
-create procedure 
+create procedure
 isvector (in x any)
 {
   if (x is null) return null;
@@ -42,19 +42,19 @@ json_out_vec_tst (in v any)
 }
 ;
 
-create procedure 
+create procedure
 json_esc_str (in s any)
 {
   return sprintf ('"%s"', replace (replace (replace (s, '\\', '\\\\'), '"', '\\"'), '\n', '\\n'));
 }
 ;
 
-create procedure 
+create procedure
 json_out_vec (in v any, inout ses any)
 {
   declare s varchar;
   s := string_output();
-	
+
   http ('[', s);
 
 --  dbg_obj_print (v[0]);
@@ -80,10 +80,10 @@ json_out_vec (in v any, inout ses any)
 ;
 
 DB.DBA.VHOST_REMOVE (lpath=>'/services/rdf/iriautocomplete.get');
-DB.DBA.VHOST_DEFINE (lpath=>'/services/rdf/iriautocomplete.get', 
+DB.DBA.VHOST_DEFINE (lpath=>'/services/rdf/iriautocomplete.get',
                      ppath=>'/SOAP/Http/IRI_AUTOCOMPLETE', soap_user=>'PROXY');
 
-create procedure 
+create procedure
 DB.DBA.IRI_AUTOCOMPLETE () __SOAP_HTTP 'text/json'
 {
   declare params any;
@@ -92,7 +92,7 @@ DB.DBA.IRI_AUTOCOMPLETE () __SOAP_HTTP 'text/json'
   declare len int;
   declare iri_str, lbl_str varchar;
   declare langs varchar;
-  
+
   iri_str := lbl_str := null;
 
   ses := string_output();
@@ -129,11 +129,11 @@ DB.DBA.IRI_AUTOCOMPLETE () __SOAP_HTTP 'text/json'
     }
 
   {
-    declare exit handler for sqlstate '*' 
+    declare exit handler for sqlstate '*'
     {
-      http ('{"error": {"sqlstate" : ' || 
-            json_esc_str(__SQL_STATE) || 
-            ',"sqlmessage":' || 
+      http ('{"error": {"sqlstate" : ' ||
+            json_esc_str(__SQL_STATE) ||
+            ',"sqlmessage":' ||
             json_esc_str(__SQL_MESSAGE) || '},"results":[]}', ses);
       return ses;
     };
@@ -142,7 +142,7 @@ DB.DBA.IRI_AUTOCOMPLETE () __SOAP_HTTP 'text/json'
       res := DB.DBA.cmp_uri (iri_str);
     else if (lbl_str is not null)
       res := DB.DBA.cmp_label (lbl_str, langs);
-    else 
+    else
       goto empty;
 
 --  dbg_obj_print (res);
@@ -153,7 +153,7 @@ DB.DBA.IRI_AUTOCOMPLETE () __SOAP_HTTP 'text/json'
 
           if (isvector (res[0]))
             http ('"restype":"multiple",', ses);
-          else 
+          else
             http ('"restype":"single",', ses);
 
           if (iri_str)
diff --git a/binsrc/b3s/demo_queries.vsp b/binsrc/b3s/demo_queries.vsp
index 416548e..2d4cf33 100644
--- a/binsrc/b3s/demo_queries.vsp
+++ b/binsrc/b3s/demo_queries.vsp
@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC
-  "-//W3C//DTD XHTML 1.0 Strict//EN"	
+  "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>BBC demo queries</title>
 <link rel="stylesheet" type="text/css" href="styles/default.css"/>
-<script type="text/javascript" src="s/main.js"></script>
 <script type="text/javascript" src="oat/toolkit/loader.js"></script>
 
 <!--
@@ -15,13 +14,13 @@ FACET DEMO PAGE CUSTOMIZATION:
 
 Registry keys:
 
-'fct_demo_uri' controls generation of "Demo Queries" link on Facet Browser's front page. If not set, this page is used. 
+'fct_demo_uri' controls generation of "Demo Queries" link on Facet Browser's front page. If not set, this page is used.
 See facet_view.sql.
 
-'sparql_demo_query_path' should point to a DAV collection with .isparql files to display. If not set, 
+'sparql_demo_query_path' should point to a DAV collection with .isparql files to display. If not set,
 '/DAV/home/dav/sparql_demo_queries' will be used.
 
-'sparql_demo_xsl_uri' should point to XSL used to extract information and display entries in the list of queries. 
+'sparql_demo_xsl_uri' should point to XSL used to extract information and display entries in the list of queries.
 If not set, '/fct/isparql_describe.xsl' is used.
 
 -->
@@ -77,32 +76,40 @@ function get_and_encode_query (q_elm)
 
 </script>
 </head>
-<body>  
+<body>
   <div id="PG">
     <div id="HD">
       <a class="logo" href="/fct/facet.vsp">
         <img id="opl_logo" alt="OpenLink Software" src="/fct/images/openlink_site_logo.png"/>
       </a>
+      <h2>Demo SPARQL Queries</h2>
     </div> <!-- #HD -->
     <div id="MD">
       <div id="demo_queries_ctr">
-        <ul class="demo_qry_list">
+        <table class="demo_qry_list">
 <?vsp
   declare ct_tree,xst any;
+  declare num_r int;
+  num_r := 0;
 
-  for select res_content, res_name, res_full_path 
-        from WS.WS.SYS_DAV_RES 
+  for select res_content, res_name, res_full_path
+        from WS.WS.SYS_DAV_RES
         where RES_FULL_PATH like demo_dav_path || '%.isparql' do
     {
-	
+
 	ct_tree := xml_tree_doc (xml_tree (res_content));
 	http_value (xslt (demo_xsl_uri,
 		    	  ct_tree,
                      	  vector ('name', res_name, 'full_path', 'http://' || uriqa_str || res_full_path)));
 
+        num_r := num_r + 1;
+    }
+  if (0 = num_r)
+    {
+      http ('<tr><td colspan="3"><span class="advisory">No demo queries available on this server.</span></td></tr>');
     }
 ?>
-        </ul>
+        </table>
       </div> <!-- #demo_queries_ctr -->
     </div> <!-- #MD -->
     <div id="FT">
@@ -113,7 +120,7 @@ function get_and_encode_query (q_elm)
         <img alt="Linked Data" src="/fct/images/LoDLogo.gif"/>
       </a>
       <br/>
-      <span class="copyright">Copyright © 2009-2011 OpenLink Software</span>
+      <span class="copyright">Copyright © 2009-2012 OpenLink Software</span>
       <div id="FT_L"/>
       <div id="FT_R"/>
     </div> <!-- #FT -->
diff --git a/binsrc/b3s/facet.js b/binsrc/b3s/facet.js
index ac1a93c..a7b7c1f 100644
--- a/binsrc/b3s/facet.js
+++ b/binsrc/b3s/facet.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: facet.js,v 1.1.2.11 2011/01/05 20:58:19 source Exp $
+ *  $Id: facet.js,v 1.1.2.26 2012/03/05 17:38:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -33,6 +33,26 @@ function fct_nav_to (url)
   document.location = url;
 }
 
+function fct_pager_next (form_pfx)
+{
+    if ($(form_pfx+'_goto').value == '')
+      $(form_pfx + '_cmd').value = 'next';
+    $(form_pfx).submit();
+}
+
+function fct_pager_prev (form_pfx)
+{
+    if ($(form_pfx+'_goto').value == '')
+      $(form_pfx + '_cmd').value = 'prev';
+    $(form_pfx).submit();
+}
+
+function fct_pager_go_to (form_pfx)
+{
+    $(form_pfx + '_cmd').value = 'go_to';
+    $(form_pfx).submit();
+}
+
 var c_thr;
 
 function fct_uri_ac_get_matches (ac_ctl)
@@ -44,8 +64,8 @@ function fct_uri_ac_get_matches (ac_ctl)
 
     c_thr = $('new_uri_txt');
 
-    OAT.AJAX.GET("/services/rdf/iriautocomplete.get?uri" + "=" + escape (val), 
-                 false, 
+    OAT.AJAX.GET("/services/rdf/iriautocomplete.get?uri" + "=" + escape (val),
+                 false,
                  fct_uri_ac_ajax_handler,{});
 }
 
@@ -58,8 +78,8 @@ function fct_lbl_ac_get_matches (ac_ctl)
 
     c_thr = $('new_lbl_txt');
 
-    OAT.AJAX.GET("/services/rdf/iriautocomplete.get?lbl" + "=" + escape (val), 
-                 false, 
+    OAT.AJAX.GET("/services/rdf/iriautocomplete.get?lbl" + "=" + escape (val),
+                 false,
                  fct_lbl_ac_ajax_handler,{});
 }
 
@@ -80,7 +100,7 @@ function fct_uri_ac_ajax_handler (resp)
 
       if (resp_obj.restype == "single")
 	uri_ac.set_uri_opts (resp_obj.results);
-      else 
+      else
 	uri_ac.set_uri_opts (resp_obj.results[0].concat(resp_obj.results[1]));
 
     uri_ac.show_popup ();
@@ -102,18 +122,18 @@ function fct_lbl_ac_ajax_handler (resp)
 
       if (resp_obj.restype == "single")
 	lbl_ac.set_opts (resp_obj.results);
-      else 
+      else
 	lbl_ac.set_opts (resp_obj.results[0].concat(resp_obj.results[1]));
 
     lbl_ac.show_popup ();
 }
 
-function ac_show_thr () 
+function ac_show_thr ()
 {
   OAT.Dom.addClass (c_thr, 'thr');
 }
 
-function ac_hide_thr () 
+function ac_hide_thr ()
 {
   OAT.Dom.removeClass (c_thr, 'thr');
 }
@@ -129,50 +149,615 @@ function resize_handler ()
 {
     var wp_width = OAT.Dom.getViewport ()[0];
 
-    if ($('res')) 
+    if ($('res'))
       {
         var _w = (wp_width-230)+'px';
         $('res').style.width = _w;
       }
 }
 
-function init()
+// Handle click in property values
+
+function prop_val_click_h (e) {
+}
+
+function prop_a_compare_fun (a, b) {
+    return b[1]-a[1];
+}
+
+numeric_s = {
+    'http://www.w3.org/2001/XMLSchema#double': true,
+    'http://www.w3.org/2001/XMLSchema#float': true,
+    'http://www.w3.org/2001/XMLSchema#decimal': true,
+    'http://www.w3.org/2001/XMLSchema#integer': true,
+};
+
+date_s = {
+    'http://www.w3.org/2001/XMLSchema#date': true,
+    'http://www.w3.org/2001/XMLSchema#dateTime': true,
+};
+
+g_dtp_s = {
+    'http://www.w3.org/2001/XMLSchema#boolean':  0,
+    'http://www.w3.org/2001/XMLSchema#string':   0,
+    'http://www.w3.org/2001/XMLSchema#double':   0,
+    'http://www.w3.org/2001/XMLSchema#float':    0,
+    'http://www.w3.org/2001/XMLSchema#decimal':  0,
+    'http://www.w3.org/2001/XMLSchema#integer':  0,
+    'http://www.w3.org/2001/XMLSchema#date':     0,
+    'http://www.w3.org/2001/XMLSchema#dateTime': 0,
+};
+
+lat_dtp_s = {
+
+};
+
+lon_dtp_s = {
+
+};
+
+point_dtp_s = {
+
+};
+
+loc_prop_s = {
+
+};
+
+point_prop_s = {
+
+};
+
+function shorten_dt (dt_val) {
+    var i = dt_val.indexOf('#')+1;
+    if (i == -1 || i >= dt_val.length) return dt_val;
+    return dt_val.substring(i);
+}
+
+function is_numeric_dt (dt) {
+    return (dt in numeric_s);
+}
+
+function is_date_dt (dt) {
+    return (dt in date_s);
+}
+
+// Not great but speedy enough for 20 or so items at a time
+//
+// Datatype selector with most frequent (on current page) first.
+//
+
+function prop_val_dt_sel_init () {
+    var xsd_pfx = 'http://www.w3.org/2001/XMLSchema#';
+
+    dt_s = g_dtp_s;
+
+    var dv_v_a = $$('val_dt','result_t');
+
+    var fnd = false;
+
+    // Dear future me: I'm sorry.
+
+    for (var i=0;i<dv_v_a.length;i++) {
+	var v = dv_v_a[i].innerHTML;
+
+	if (v in dt_s)
+	    dt_s[v]++;
+	else
+	    dt_s[v]=1;
+    }
+
+    var dt_a = [];
+
+    for (i in dt_s) {
+	dt_a.push ([i, dt_s[i]]);
+    };
+
+    dt_a.sort(prop_a_compare_fun);
+
+    var opts_a=[];
+
+    for (i=0;i<dt_a.length;i++) {
+	opts_a.push(new Option(shorten_dt (dt_a[i][0]), dt_a[i][0], false));
+    }
+
+    var num_opt  = new Option ('Numeric',     '##numeric', false);
+    var none_opt = new Option ('No datatype', '##none',    false);
+
+    if (is_numeric_dt (dt_a[0][0])) {
+	opts_a.unshift (num_opt);
+	opts_a.push (none_opt);
+    }
+    else {
+	opts_a.push (num_opt);
+	opts_a.push (none_opt);
+    }
+
+    for (i=0;i<opts_a.length;i++)
+	$('cond_dt').options[i] = opts_a[i];
+
+    $('cond_dt').options[0].selected = true;
+
+    OAT.Event.attach ('set_cond', 'click', function (e) {
+	var ct = $v('cond_type');
+	var v_l = $v('cond_lo');
+	var v_h = $v('cond_hi');
+
+	if (v_l == '') return;
+
+	if ((ct == 'range' || ct == 'neg_range') && (v_h == '' || v_l == '')) return;
+
+	if ($('cond_dt').value != '##numeric' && $('cond_dt').value != '##none' && ct != 'contains') {
+	    if ($v('out_lang') == '') {
+		if (v_h != '' && v_h.match (/\".*\"\^\^\<.*\>/) === null) {
+                    if ($v('cond_dt') == '' || $v('cond_dt') == 'http://www.openlinksw.com/schemas/facets/dtp/plainstring')
+			v_h = '"'+ v_h +'"';
+  		    else
+  			v_h = '"' + v_h + '"^^<' + $v('cond_dt') + '>';
+		}
+		if (v_l != '' && v_l.match (/\".*\"\^\^\<.*\>/) === null) {
+		    if ($v('cond_dt') == '' || $v('cond_dt') == 'http://www.openlinksw.com/schemas/facets/dtp/plainstring')
+			v_l = '"'+ v_l +'"';
+		    else
+  			v_l = '"' + v_l + '"^^<' + $v('cond_dt') + '>';
+		}
+	    } else {
+		if (v_l != '')
+		    v_l = '"""' + v_l + '"""@' + $v('out_lang');
+
+		if (v_h != '')
+		    v_h = '"""' + v_h + '"""@' + $v('out_lang');
+	    }
+	}
+
+	if (ct == 'gt' ||
+            ct == 'lt' ||
+            ct == 'gte' ||
+            ct == 'lte' ||
+            ct == 'eq' ||
+            ct == 'neq' ||
+            ct == 'contains') {
+	    $('out_hi').value = '';
+	}
+
+        if (ct == 'range' || ct == 'neg_range') {
+          $("out_hi").value = v_h;
+	  $("out_lo").value = v_l;
+        } else
+          $("out_val").value = v_l;
+
+        $('out_dtp').value = '';
+        $('out_lang').value = '';
+
+	$('cond_form').submit();
+    });
+
+    OAT.Dom.show ('cond_form');
+}
+
+
+function fct_add_loc_marker () {
+    var loc_lat = $$('loc_lat');
+    var loc_lon = $$('loc_lon');
+
+    if (loc_lat.length && loc_lon.length) {
+	var lat = parseFloat (loc_lat[0].innerHTML);
+	var lon = parseFloat (loc_lon[0].innerHTML);
+
+
+	window.loc_marker = window.cMap.addMarker (lat,
+	  					   lon,
+						   false,
+						   {image: 'oat/images/markers/house.png',
+						    imageSize: [18,41],
+						    title: 'Origin',
+						    custData: {__fct_bubble_content: ["Current Location"]}});
+    }
+}
+
+Geo_ui = function (form) {
+    var self=this;
+
+    this.form = $(form);
+    this.lc = new OAT.LocationCache (5, [], false);
+    this.update = false;
+
+
+    this.refresh = function () {
+	return;
+    }
+
+    this.loc_marker = null;
+
+
+    this.loc_acq_h = function (s,m,l) {
+	OAT.Dom.hide (self.loc_acq_thr_i);
+	OAT.Dom.hide (self.loc_ctr);
+	self.lat_i.value = l.getLat();
+	self.lon_i.value = l.getLon();
+        self.acc_i.value = l.getAcc();
+	OAT.Dom.hide (self.loc_ctr);
+        OAT.Dom.show (self.coord_ctr);
+        OAT.Dom.show (self.loc_use_b);
+
+        if (self.update !== false) {
+	    self.cmd_i.value = 'set_loc';
+            self.cno_i.value = self.update;
+	    self.update = false;
+	    self.form.submit();
+        }
+    }
+
+    this.loc_to_h = function () {
+	OAT.Dom.hide (self.loc_acq_thr_i);
+        alert ('Timeout while acquiring location.');
+    }
+
+    this.loc_err_h = function () {
+	OAT.Dom.hide (self.loc_acq_thr_i);
+	alert ('Failed to acquire location.\nDid you allow the client to locate you?\nYou also may have geolocation, or WiFi disabled - \nif so, try enabling them and reload.');
+    }
+
+    this.acq_b_h = function (e) {
+	OAT.Event.prevent(e);
+	OAT.Dom.show (self.loc_acq_thr_i);
+	self.lc.acquireCurrent();
+    }
+
+    this.loc_use_h = function (e) {
+	OAT.Event.prevent(e);
+        if ((self.lat_i.value == '' || self.lon_i.value == '') && self.loc_trig_sel.selectedIndex == 0)
+	    return;
+        if ($('cond_dist').value == '')
+            return;
+	if (self.loc_trig_sel.selectedIndex == 1) {
+	    self.lat_i.value='';
+	    self.lon_i.value='';
+	}
+        self.form.submit();
+    }
+
+    this.loc_update = function (cno) {
+	self.update = cno;
+	self.lc.acquireCurrent();
+    }
+
+    this.loc_trig_sel_h = function (e) {
+	if (e.target.selectedIndex == 1) {
+            OAT.Dom.hide (self.coord_ctr);
+	    OAT.Dom.hide (self.acq_b);
+        } else {
+	    OAT.Dom.show (self.coord_ctr);
+            OAT.Dom.show (self.acq_b);
+	}
+    }
+
+    this.init = function () {
+	self.loc_acq_thr_i = $('loc_acq_thr_i');
+	self.loc_i = $('cond_loc');
+	self.lat_i = $('cond_lat');
+	self.lon_i = $('cond_lon');
+	self.acc_i = $('cond_acc');
+	self.cmd_i = $('cmd');
+	self.cno_i = $('cno');
+	self.acq_b = $('cond_loc_acq_b');
+        self.coord_ctr = $('coord_ctr');
+
+	OAT.Event.attach (self.acq_b, 'click', self.acq_b_h);
+
+	self.loc_use_b = $('cond_loc_use_b')
+	OAT.Event.attach (self.loc_use_b, 'click', self.loc_use_h);
+
+	self.loc_trig_sel = $('loc_trig_sel');
+        OAT.Event.attach (self.loc_trig_sel, 'change', self.loc_trig_sel_h);
+
+        OAT.MSG.attach (self.lc, "LOCATION_ACQUIRED", self.loc_acq_h);
+        OAT.MSG.attach (self.lc, "LOCATION_ERROR", self.loc_err_h);
+        OAT.MSG.attach (self.lc, "LOCATION_TIMEOUT", self.loc_to_h);
+//        OAT.MSG.attach (self.lc, "GEOCODE_RESULT", self.loc_gc_h);
+//        OAT.MSG.attach (self.lc, "LOCATION_FAIL", self.gc_fail);
+//        OAT.MSG.attach (self.lc, "LOCATION_TIMEOUT", self.gc_to_h);
+    }
+
+    this.init();
+}
+
+In_ui = function (dom_ctr, form) {
+    var self=this;
+
+    this.data = [];
+    this.form = $(form);
+    this.dom_ctr = $(dom_ctr);
+
+    this.show = function () {
+      OAT.Dom.show (dom_ctr);
+    }
+
+    this.hide = function () {
+      OAT.Dom.hide (dom_ctr);
+    }
+
+    this.find_val = function (_val, _dt, _lang) {
+	for (var i = 0;i < self.data.length;i++) {
+	    if (self.data[i].val  == _val &&
+		self.data[i].dt   == _dt &&
+		self.data[i].lang == _lang)
+		return i;
+	}
+	return false;
+    }
+
+    this.add_val = function (_val, _dt, _lang) {
+
+	if (false === self.find_val (_val, _dt, _lang))
+	    self.data.append ({val: _val, dt: _dt, lang: _lang});
+
+	self.refresh ();
+    }
+
+    this.del_val = function (i) {
+	self.data.splice (i, 1);
+        self.refresh();
+    }
+
+    this.val_add_h = function (e) {
+	OAT.Event.prevent(e);
+	var _val  = self.new_val_i.value;
+	var _dt   = self.new_dt_i.value;
+        var _lang = self.new_lang_i.value;
+
+	_val = _val.trim();
+
+        if (_val == '') return;
+
+        if (isNaN (parseInt(_val)) && (isNaN (parseFloat(_val))))
+            _val = '"'+_val+'"';
+
+	self.add_val (_val, _dt, _lang);
+    }
+
+    this.val_change_h = function (e) {
+
+    }
+
+    this.make_val_row = function (d, i) {
+	var new_r = OAT.Dom.create ('tr');
+        var new_val_col  = OAT.Dom.create ('td', {}, 'in_val');
+	var new_dt_col   = OAT.Dom.create ('td', {}, 'in_dt');
+        var new_lang_col = OAT.Dom.create ('td', {}, 'in_lang');
+        var new_cmd_col  = OAT.Dom.create ('td', {}, 'in_cmd');
+
+	new_val_col.innerHTML  = d.val;
+	new_dt_col.innerHTML   = d.dt;
+	new_lang_col.innerHTML = d.lang;
+
+        var del_a = OAT.Dom.create ('a', {}, 'in_del');
+	del_a.innerHTML = 'Delete';
+
+	OAT.Event.attach (del_a, 'click', function () {
+	    self.del_val (i);
+	});
+
+	OAT.Dom.append ([new_cmd_col, del_a]);
+	OAT.Dom.append ([new_r, new_val_col, new_dt_col, new_lang_col, new_cmd_col]);
+        return new_r;
+    }
+
+    this.sort_fun = function (a,b) {
+	return (a.val > b.val);
+    }
+
+    this.sort = function () {
+	self.data.sort (self.sort_fun);
+    }
+
+    this.refresh = function () {
+	OAT.Dom.clear (self.val_list_tbody);
+
+	self.sort ();
+
+	for (var i=0;i < self.data.length;i++) {
+            OAT.Dom.append ([self.val_list_tbody, self.make_val_row (self.data[i],i)]);
+	}
+
+	OAT.Dom.append ([self.val_list_tbody, self.make_manual_fm_row()])
+    }
+
+    this.mk_attr = function (att_s, val) {
+	var val_ck;
+        if (typeof val == 'undefined') val_ck = '';
+	else val_ck = val;
+	return (att_s + '="' + val_ck + '"');
+    }
+
+    this.mk_cond_parm = function (d) {
+	var elm = '<cond-parm ' +
+	    self.mk_attr ('datatype', d.dt) +
+	    ' ' +
+	    self.mk_attr ('lang', d.lang) + '>';
+
+	return (elm.concat(OAT.Dom.toSafeXML(d.val),'</cond-parm>'));
+    }
+
+    this.submit = function (e) {
+	OAT.Event.prevent(e);
+	var val_s = '';
+        if (!self.data.length) return;
+
+        for (var i=0;i < self.data.length;i++) {
+	    val_s = val_s.concat(self.mk_cond_parm (self.data[i]));
+	}
+
+        self.cond_parms.value = val_s;
+        self.form.submit();
+    }
+
+    this.make_manual_fm_row = function () {
+        self.manual_r      = OAT.Dom.create ('tr');
+	var new_val_c     = OAT.Dom.create ('td', {}, 'in_new_val_c');
+        self.new_val_i     = OAT.Dom.create ('input');
+	var new_dt_c      = OAT.Dom.create ('td', {}, 'in_new_lang_c');
+        self.new_dt_i      = OAT.Dom.create ('input');
+	var new_lang_c    = OAT.Dom.create ('td', {}, 'in_new_lang_c');
+        self.new_lang_i    = OAT.Dom.create ('input');
+
+        var new_val_add_c = OAT.Dom.create ('td', {}, 'in_new_val_add_c');
+        var new_add_btn           = OAT.Dom.create ('button', {}, 'in_new_add_b');
+
+        new_add_btn.innerHTML = "Add value"
+
+	OAT.Dom.append ([new_val_c, self.new_val_i]);
+	OAT.Dom.append ([new_dt_c, self.new_dt_i]);
+	OAT.Dom.append ([new_lang_c, self.new_lang_i]);
+	OAT.Dom.append ([new_val_add_c, new_add_btn]);
+
+	OAT.Dom.append ([self.manual_r, new_val_c, new_dt_c, new_lang_c, new_val_add_c]);
+
+ 	OAT.Event.attach (new_add_btn, 'click', self.val_add_h);
+        return self.manual_r;
+    }
+
+    this.init = function () {
+        self.val_list_t     = OAT.Dom.create ('table', {}, 'val_list_ctr');
+
+	self.val_list_thead = OAT.Dom.create ('thead', {}, 'val_list_head');
+	self.val_list_thead.innerHTML = '<tr><th>Value</th><th>Datatype</th><th>Language</th></tr>';
+
+	self.val_list_tbody = OAT.Dom.create ('tbody', {}, 'val_list_body');
+
+	self.set_cond_btn = OAT.Dom.create ('button', {}, 'in_set_cond_b');
+        self.set_cond_btn.innerHTML = "Set IN Condition"
+
+ 	self.cond_parms            = $('cond_parms');
+
+ 	OAT.Event.attach (self.new_add_btn, 'click', self.val_add_h);
+ 	OAT.Event.attach (self.set_cond_btn, 'click', self.submit);
+
+        OAT.Dom.append ([self.val_list_t,
+			 self.val_list_thead,
+			 self.val_list_tbody]);
+
+        OAT.Dom.append ([self.dom_ctr,
+			 self.val_list_t,
+			 self.set_cond_btn]);
+
+	self.refresh();
+    }
+
+    this.init ();
+}
+
+function handle_val_anchor_click (e) {
+    var iri = e.target.href.split('?')[1].match(/&iri=(.*)/);
+    var val = e.target.href.split('?')[1].match(/&val=(.*)/);
+
+    if (val)
+	val = val[1].split('&')[0];
+    else if (iri)
+	val = iri[1].split('&')[0];
+
+    val = decodeURIComponent (val)
+
+    var dtp = decodeURIComponent(e.target.href.split('?')[1].match(/&datatype=(.*)/)[1].split('&')[0]);
+    var lang = e.target.href.split('?')[1].match(/&lang=(.*)/)[1].split('&')[0];
+
+    switch($('cond_type').value) {
+    case "cond_none":
+	return;
+    case "lt":
+    case "gt":
+    case "lte":
+    case "gte":
+    case "eq":
+    case "neq":
+    case "contains":
+        OAT.Event.prevent(e);
+	$('cond_lo').value = val;
+	break;
+    case "range":
+    case "neg_range":
+        OAT.Event.prevent(e);
+	if ($v('cond_lo') != '')
+	    $('cond_hi').value = val;
+	else
+	    $('cond_lo').value = val;
+	break;
+    case "in":
+	OAT.Event.prevent(e);
+        in_ui.add_val (val, dtp, lang);
+        break;
+    }
+    // XXX should warn user if setting range option with values of different dtp
+
+    $('out_dtp').value = dtp;
+
+    for (i=0;i<$('cond_dt').options.length;i++) {
+	var opt = $('cond_dt').options[i];
+	if (opt.value == dtp)
+	    opt.selected = true;
+        else
+	    opt.selected = false;
+    }
+
+    $('out_lang').value = lang;
+}
+
+function prop_val_anchors_init () {
+    var val_a = $$('sel_val','result_t');
+
+    for (var i=0;i<val_a.length;i++) {
+	OAT.Event.attach (val_a[i],'click', handle_val_anchor_click);
+    }
+}
+
+function prop_cond_sel_init () {
+    return;
+}
+
+var in_ui = false;
+var geo_ui = false;
+
+function init () {
+    fct_init_ui (); // Yes, the xsl sheet overrides ini, but this hack needs to be here in order for the main query page to work.
+}
+
+function fct_init_ui ()
 {
     resize_handler ();
     OAT.Event.attach (window, 'resize', resize_handler);
 
     if ($('main_srch')) {
-    uri_ac = new OAT.Autocomplete('new_uri_txt',
-			          'new_uri_val',
-                                  'new_uri_btn', 
-                                  'new_uri_fm', 
-                                  {get_ac_matches: fct_uri_ac_get_matches});
+	uri_ac = new OAT.Autocomplete('new_uri_txt',
+			              'new_uri_val',
+                                      'new_uri_btn',
+                                      'new_uri_fm',
+                                      {get_ac_matches: fct_uri_ac_get_matches});
+
+	lbl_ac = new OAT.Autocomplete('new_lbl_txt',
+				      'new_lbl_val',
+				      'new_lbl_btn',
+				      'new_lbl_fm',
+                                      {get_ac_matches: fct_lbl_ac_get_matches});
 
-    lbl_ac = new OAT.Autocomplete('new_lbl_txt',
-				  'new_lbl_val',
-				  'new_lbl_btn',
-				  'new_lbl_fm',
-                                  {get_ac_matches: fct_lbl_ac_get_matches});
-				  
 
-    var tabs = new OAT.Tab ('TAB_CTR', {dockMode: false});
+	var tabs = new OAT.Tab ('TAB_CTR', {dockMode: false});
 
-    tabs.add ('TAB_TXT', 'TAB_PAGE_TXT');
-    tabs.add ('TAB_URI', 'TAB_PAGE_URI');
-    tabs.add ('TAB_URILBL', 'TAB_PAGE_URILBL');
+	tabs.add ('TAB_TXT', 'TAB_PAGE_TXT');
+	tabs.add ('TAB_URI', 'TAB_PAGE_URI');
+	tabs.add ('TAB_URILBL', 'TAB_PAGE_URILBL');
 
-    tabs.go (0);
+	tabs.go (0);
 
 	OAT.MSG.attach ('*', 'AJAX_START', function () { ac_show_thr () });
 
-    OAT.Dom.show ('main_srch');  
-	
-        if ((typeof window.external =="object") && 
-            ((typeof window.external.AddSearchProvider == "unknown") || 
-             (typeof window.external.AddSearchProvider == "function"))) 
+	OAT.Dom.show ('main_srch');
+
+        if ((typeof window.external =="object") &&
+            ((typeof window.external.AddSearchProvider == "unknown") ||
+             (typeof window.external.AddSearchProvider == "function")))
           {
-              OAT.Event.attach ('opensearch_link', 
-                                'click', 
+              OAT.Event.attach ('opensearch_link',
+                                'click',
                                 function () { window.external.AddSearchProvider(location.protocol+'//'+location.host+'/fct/opensearchdescription.vsp'); });
           }
     }
@@ -180,14 +765,78 @@ function init()
         var ct = $('fct_ft_fm');
 	OAT.Anchor.assign ('fct_ft', {content: ct});
     }
+
+    //
+    // values list mode - enable UI for adding conds
+    //
+
+    if ($$('list', 'result_t').length > 0) {
+	prop_val_dt_sel_init();
+	prop_val_anchors_init();
+        prop_cond_sel_init();
+
+	if (!in_ui)
+	    in_ui = new In_ui ('in_ctr','cond_form');
+
+
+
+	OAT.Dom.hide('cond_hi_ctr');
+
+	OAT.Event.attach('cond_type', 'change', function (e) {
+	    switch ($v(this)) {
+	    case "none":
+                in_ui.hide ();
+		OAT.Dom.hide ('cond_inp_ctr');
+		break;
+	    case "lt":
+            case "lte":
+            case "gt":
+            case "gte":
+            case "eq":
+            case "neq":
+                in_ui.hide ();
+		OAT.Dom.show ('cond_inp_ctr');
+		OAT.Dom.show ('cond_dt');
+		OAT.Dom.hide ('cond_hi_ctr');
+                break;
+            case "contains":
+                in_ui.hide ();
+		OAT.Dom.show ('cond_inp_ctr');
+		OAT.Dom.hide ('cond_hi_ctr');
+                OAT.Dom.hide ('cond_dt');
+		break;
+	    case "range":
+            case "neg_range":
+                in_ui.hide();
+		OAT.Dom.show ('cond_inp_ctr');
+		OAT.Dom.show ('cond_hi_ctr');
+		OAT.Dom.show ('cond_dt');
+		break;
+            case "in":
+                OAT.Dom.hide ('cond_inp_ctr');
+                OAT.Dom.hide ('cond_hi_ctr');
+                in_ui.show();
+                break;
+/*            case "near":
+                in_ui.hide();
+                OAT.Dom.hide ('cond_inp_ctr');
+                OAT.Dom.hide ('cond_hi_ctr');
+                geo_ui.show(); */
+	    }
+        });
+    }
 }
 
+
 // opts = { loader: function  - function gets called when user hits tab or stops entering text
 //          timer_interval: timer interval in msec };
+//
+// XXX (ghard) move to, and finish integration with, OAT
+//
 
 OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
     var self = this;
-    
+
     this.timer = 0;
     this.value = 0;
 
@@ -196,17 +845,17 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	timer_interval:1000,
 	onchange:function() {}
     }
-	
+
     for (var p in optObj) { self.options[p] = optObj[p]; }
-    
+
     this.div = OAT.Dom.create("div", {}, "autocomplete");
-    
+
     this.list = OAT.Dom.create("div",
 			       {position:"absolute",left:"0px",top:"0px",zIndex:1001},
 			       "autocomplete_list");
-    
+
     self.instant = new OAT.Instant (self.list);
-    
+
     this.submit_form = function() {
 	if (self.value) {
 	    self.val_inp.value = self.value;
@@ -236,7 +885,7 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 
     this.keydown_handler = function (e)
     {
-	if ((e.keyCode && e.keyCode == 13) || 
+	if ((e.keyCode && e.keyCode == 13) ||
             (e.which && e.which == 13)) {
 	    self.val_inp.value = '';
 	    if (self.timer)
@@ -248,7 +897,7 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	}
     }
 
-    this.blur_handler = function (e) 
+    this.blur_handler = function (e)
     {
 	if (self.timer) {
 	    window.clearTimeout (self.timer);
@@ -256,18 +905,18 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	}
     }
 
-    this.btn_handler = function(e) 
+    this.btn_handler = function(e)
     {
 	self.submit_form();
     }
 
-    
-    this.clear_opts = function() 
+
+    this.clear_opts = function()
     {
 	OAT.Dom.clear(self.list);
     }
-	
-    this.add_option = function(name, value) 
+
+    this.add_option = function(name, value)
     {
 	var n = name;
 	var v = name;
@@ -279,7 +928,7 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	var opt_lbl = OAT.Dom.create ("span", {}, "opt_lbl");
         opt_lbl.innerHTML = n;
 
-	var opt_iri = OAT.Dom.create ("span", {}, "opt_iri"); 
+	var opt_iri = OAT.Dom.create ("span", {}, "opt_iri");
 	opt_iri.innerHTML = v;
 
 	opt.value = v;
@@ -290,7 +939,7 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	self.list.appendChild(opt);
     }
 
-    this.attach = function(option) 
+    this.attach = function(option)
     {
 	var ref = function(event) {
 	    self.value       = option.value;
@@ -305,7 +954,7 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
     }
 
     this.set_opts = function (opt_list)
-    {	
+    {
 	if (opt_list.length) {
 	    for (var i=0;i<opt_list.length;i=i+2) {
 		this.add_option(opt_list[i], opt_list[i+1]);
@@ -315,9 +964,9 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	else
 	    self.btn.disabled = true;
     }
-	
+
     this.set_uri_opts = function (opt_list)
-    {	
+    {
 	if (opt_list.length) {
 	    for (var i=0;i<opt_list.length;i=i+1) {
 		this.add_option(opt_list[i]);
@@ -327,7 +976,7 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 	else
 	    self.btn.disabled = true;
     }
-	
+
     this.show_popup = function ()
     {
 	self.instant.show();
@@ -337,8 +986,8 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
     {
 	self.instant.hide();
     }
-	
-    self.instant.options.showCallback = function() 
+
+    self.instant.options.showCallback = function()
     {
 	var coords = OAT.Dom.position(self.input);
 	var dims = OAT.Dom.getWH(self.input);
@@ -365,6 +1014,8 @@ OAT.Autocomplete = function (_input, _value_input, _button, _form, optObj) {
 function fct_sel_neg (cb)
 {
   var a = $('a_' + cb.value);
+  if (0 == a.href.length)
+    return;
   if (cb.checked == true)
     {
       var pos = a.href.lastIndexOf ('&exclude=yes');
@@ -418,3 +1069,4 @@ function fct_set_pivot_href_opt()
   href = href.replace(/CXML_redir_for_hrefs=[^&]*&/, 'CXML_redir_for_hrefs='+opt+'&');
   a.setAttribute("href", href);
 }
+
diff --git a/binsrc/b3s/facet.sql b/binsrc/b3s/facet.sql
index b6d9607..3772578 100644
--- a/binsrc/b3s/facet.sql
+++ b/binsrc/b3s/facet.sql
@@ -1,10 +1,10 @@
 --
---  $Id: facet.sql,v 1.1.2.25 2011/03/24 15:50:37 source Exp $
+--  $Id: facet.sql,v 1.1.2.38 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,6 +22,62 @@
 
 -- Facet web service
 
+
+create procedure
+fct_dbg_msg (in str varchar, in lvl int := 666)
+{
+  declare d_lvl int;
+  declare d_mode varchar;
+
+  d_lvl := connection_get ('fct_dbg_lvl');
+  d_mode := connection_get ('fct_dbg_mode');
+
+  if (lvl < d_lvl) return;
+
+  if (d_lvl)
+    {
+      if (d_mode = 'stderr')
+        {
+          dbg_printf ('%s', str);
+	  return;
+        }
+      if (d_mode = 'page')
+        {
+          declare d_out_s any;
+          d_out_s := connection_get ('__fct_dbg_out');
+          if (d_out_s)
+            http (str || '\n', d_out_s);
+        }
+    }
+}
+;
+
+create procedure
+fct_render_dbg_out ()
+{
+  declare d_lvl int;
+  declare d_out varchar;
+
+  d_lvl := connection_get ('fct_dbg_lvl');
+  d_out := connection_get ('fct_dbg_out');
+
+  if (not d_lvl) return;
+  if (not d_out) { dbg_printf ('fct_render_dbg_out: no d_out'); return; }
+
+  declare d_ses any;
+  d_ses := connection_get ('__fct_dbg_out');
+
+  if (d_ses)
+    {
+      http('<div id="dbg_output"><pre>');
+      http_value (d_ses);
+      http('</pre></div>');
+    }
+  else
+    dbg_printf ('fct_render_dbg_out: no string session to write to!');
+}
+;
+
 create procedure
 fct_uri_curie (in uri varchar)
 {
@@ -139,7 +195,7 @@ fct_long_uri (in x any)
 cl_exec ('registry_set (''fct_label_iri'', ?)',
          vector (cast (iri_id_num (__i2id ('http://www.openlinksw.com/schemas/virtrdf#label')) as varchar)));
 
-cl_exec ('registry_set (''fct_timeout_min'',''2000'')');
+cl_exec ('registry_set (''fct_timeout_min'',''8000'')');
 cl_exec ('registry_set (''fct_timeout_max'',''40000'')');
 
 create procedure
@@ -154,7 +210,9 @@ FCT_LABEL (in x any, in g_id iri_id_8, in ctx varchar)
   label_iri := iri_id_from_num (atoi (registry_get ('fct_label_iri')));
   best_str := null;
   best_l := 0;
-  for select o, p from rdf_quad table option (index primary key) where s = x and p in (rdf_super_sub_list (ctx, label_iri, 3)) do
+  for select o, p
+    from rdf_quad table option (index primary key)
+    where s = x and p in (rdf_super_sub_list (ctx, label_iri, 3)) do
     {
       if (is_rdf_box (o) or isstring (o))
 	{
@@ -164,8 +222,8 @@ FCT_LABEL (in x any, in g_id iri_id_8, in ctx varchar)
 	    l := length (o);
 	  if (l > best_l)
 	    {
-	    best_str := o;
-	    best_l := l;
+	      best_str := o;
+	      best_l := l;
 	    }
 	}
     }
@@ -205,7 +263,7 @@ FCT_LABEL_DP_L (in x any, in g_id iri_id_8, in ctx varchar, in lng varchar)
 	  str_lang := (select RL_ID from RDF_LANGUAGE where RL_TWOBYTE = lng_pref);
 	}
       else
-        str_lang := 'en';	
+        str_lang := 'en';
       q := cmp_get_lang_by_q (lng, str_lang);
 
       if (is_rdf_box (o) or isstring (o))
@@ -225,8 +283,8 @@ FCT_LABEL_DP_L (in x any, in g_id iri_id_8, in ctx varchar, in lng varchar)
 	    l := length (o);
 	  if (l > best_l)
 	    {
-	    best_str := o;
-	    best_l := l;
+	      best_str := o;
+	      best_l := l;
 	    }
 	}
     }
@@ -236,6 +294,47 @@ FCT_LABEL_DP_L (in x any, in g_id iri_id_8, in ctx varchar, in lng varchar)
 }
 ;
 
+
+create procedure
+FCT_LABEL_NP (in x any, in g_id iri_id_8, in ctx varchar, in lng varchar := 'en')
+{
+  declare best_str any;
+  declare best_l, l int;
+  declare label_iri iri_id_8;
+  declare q, best_q, str_lang, lang_id any;
+
+  if (not isiri_id (x))
+    return null;
+  rdf_check_init ();
+  label_iri := iri_id_from_num (atoi (registry_get ('fct_label_iri')));
+  best_str := '';
+  best_l := 0;
+  best_q := 0;
+  for select o
+        from rdf_quad table option (index rdf_quad)
+        where s = x and p in (rdf_super_sub_list (ctx, label_iri, 3)) order by cast (b3s_lbl_order (P) as int) do
+    {
+      o := __ro2sq (o);
+      lang_id := rdf_box_lang (o);
+      if (lang_id > 257)
+	str_lang := (select RL_ID from RDF_LANGUAGE where RL_TWOBYTE = lang_id);
+      else
+        str_lang := 'en';
+      q := cmp_get_lang_by_q (lng, str_lang);
+      if (is_rdf_box (o) or isstring (o))
+	{
+	  if (q > best_q)
+	    {
+	      best_str := o;
+	      best_q := q;
+	    }
+	}
+    }
+  return best_str;
+}
+;
+
+
 create procedure
 FCT_LABEL_S (in x any, in g_id iri_id_8, in ctx varchar, in lng varchar)
 {
@@ -261,7 +360,7 @@ FCT_LABEL_S (in x any, in g_id iri_id_8, in ctx varchar, in lng varchar)
 	  str_lang := (select RL_ID from RDF_LANGUAGE where RL_TWOBYTE = lng_pref);
 	}
       else
-        str_lang := 'en';	
+        str_lang := 'en';
       q := cmp_get_lang_by_q (lng, str_lang);
 
       if (is_rdf_box (o) or isstring (o))
@@ -358,9 +457,14 @@ og:longitude rdfs:subPropertyOf geo:long .
 <http://uberblic.org/ontology/longitude> rdfs:subPropertyOf geo:long .
 <http://linkedopencommerce.com/schemas/icecat/v1/hasCategory> rdfs:subPropertyOf rdf:type .
 <http://poolparty.punkt.at/demozone/ont#title> rdfs:subPropertyOf virtrdf:label .
+<http://purl.uniprot.org/core/scientificName> rdfs:subPropertyOf virtrdf:label .
+<http://www.openlinksw.com/schemas/googleplus#activity_title> rdfs:subPropertyOf virtrdf:label .
+<http://linkedopencommerce.com/schemas/icecat/v1/hasShortSummaryDescription> rdfs:subPropertyOf virtrdf:label .
+<http://yago-knowledge.org/resource/hasPreferredName> rdfs:subPropertyOf virtrdf:label .
 ', 'xx', 'facets');
 
 rdfs_rule_set ('facets', 'facets');
+rdfs_rule_set ('facets', 'virtrdf-label');
 
 
 create procedure
@@ -368,11 +472,11 @@ fct_inf_val (in tree any)
 {
   declare i varchar;
 
- i := cast (xpath_eval ('/query/@inference', tree) as varchar);
+  i := cast (xpath_eval ('/query/@inference', tree) as varchar);
 
   if (i is null or '' = i)
     return null;
-  return i;  
+  return i;
 }
 ;
 
@@ -385,7 +489,7 @@ fct_inf_clause (in tree any)
 
   if (i is not null)
     return sprintf (' define input:inference "%s" ', i);
-    return '';
+  return '';
 }
 ;
 
@@ -394,7 +498,7 @@ fct_sas_val (in tree any)
 {
   declare i varchar;
 
- i := cast (xpath_eval ('/query/@same-as', tree) as varchar);
+  i := cast (xpath_eval ('/query/@same-as', tree) as varchar);
 
   if (i is null or '' = i)
     return null;
@@ -411,7 +515,7 @@ fct_sas_clause (in tree any)
 
   if (i is not null)
     return sprintf (' define input:same-as "%s" ', i);
-    return '';
+  return '';
 }
 ;
 
@@ -440,12 +544,15 @@ create procedure
 fct_dtp (in x any)
 {
   if (isiri_id (x) or __box_flags (x) = 1)
-    return 'url';
-  return id_to_iri (rdf_datatype_of_long (x));
+    return 'uri';
+
+  declare dtp any;
+
+  dtp := rdf_datatype_of_long (x, UNAME'http://www.openlinksw.com/schemas/facets/dtp/plainstring');
+  return (id_to_iri (dtp));
 }
 ;
 
-
 --
 -- Handle any DTs which need special serialization in FILTER, etc.
 --
@@ -459,7 +566,7 @@ fct_sparql_ser (in x any)
   return '';
 }
 ;
-	
+
 create procedure
 fct_lang (in x any)
 {
@@ -471,14 +578,16 @@ fct_lang (in x any)
 }
 ;
 
-create procedure 
+create procedure
 fct_get_mode (in tree any, in xp any)
 {
   declare view_type varchar;
   view_type := cast (xpath_eval (xp, tree, 1) as varchar);
+
   if (0 and sys_stat ('cl_run_local_only') and view_type = 'text-d')
     view_type := 'text';
-  return view_type;  
+
+  return view_type;
 }
 ;
 
@@ -494,11 +603,11 @@ fct_xml_wrap (in tree any, in txt any)
   declare n_cols int;
   n_cols := fct_n_cols(tree);
 
---  dbg_printf ('fct_xml_wrap: view_type: %s', view_type);
---  dbg_printf ('n_cols: %d', n_cols);
+  fct_dbg_msg (sprintf ('fct_xml_wrap: view_type: %s', view_type));
+  fct_dbg_msg (sprintf ('              n_cols   : %d', n_cols));
 
 --  dbg_obj_print (xpath_eval ('//query/text', tree, 1));
- 
+
   if (n_cols = 2)
     {
       if (view_type = 'text')
@@ -520,7 +629,7 @@ fct_xml_wrap (in tree any, in txt any)
                                                                              fct_short_form(__ro2sq("c1")) as "shortform"),
                                                               __ro2sq ("c1")),
                                                   xmlelement ("column",
-                                                              fct_label ("c1", 0, ''facets'' )),
+                                                              fct_label_np ("c1", 0, ''facets'' )),
                                                   xmlelement ("column",
                                                               fct_bold_tags("c2")))))
              from (sparql define output:valmode "LONG" ', view_type), ntxt);
@@ -528,9 +637,9 @@ fct_xml_wrap (in tree any, in txt any)
       else if (view_type = 'text-d')
 	{
 	  texp := cast (xpath_eval ('string (//query/text)', tree, 1) as varchar);
-	  http ('select  xmlelement (\'result\', 
-	  			     xmlattributes (\'text-d\' as "type"), 
-				     "res") 
+	  http ('select  xmlelement (\'result\',
+	  			     xmlattributes (\'text-d\' as "type"),
+				     "res")
 				     from (sparql ', ntxt);
 	}
       else if (view_type = 'entities-list' or view_type = 'list' or view_type = 'propval-list')
@@ -543,7 +652,7 @@ fct_xml_wrap (in tree any, in txt any)
                                                                          fct_short_form(__ro2sq("c1")) as "shortform"),
                                                           __ro2sq ("c1")),
                                               xmlelement ("column",
-                                                          fct_label ("c1", 0, ''facets'' )))))
+                                                          fct_label_np ("c1", 0, ''facets'' )))))
               from (sparql define output:valmode "LONG" ', view_type), ntxt);
         }
       else
@@ -556,7 +665,7 @@ fct_xml_wrap (in tree any, in txt any)
                                                                              fct_short_form(__ro2sq("c1")) as "shortform"),
                                                               __ro2sq ("c1")),
                                                   xmlelement ("column",
-                                                              fct_label ("c1", 0, ''facets'' )),
+                                                              fct_label_np ("c1", 0, ''facets'' )),
                                                   xmlelement ("column",
                                                               fct_bold_tags("c2")))))
              from (sparql define output:valmode "LONG" ', view_type), ntxt);
@@ -572,10 +681,10 @@ fct_xml_wrap (in tree any, in txt any)
 							       fct_short_form(__ro2sq("c1")) as "shortform",
                                                                fct_sparql_ser ("c1") as "sparql_ser"),
 							       __ro2sq ("c1")),
-				xmlelement ("column", fct_label ("c1", 0, ''facets'' )))))
+				xmlelement ("column", fct_label_np ("c1", 0, ''facets'' )))))
 	     from (sparql define output:valmode "LONG"', view_type), ntxt);
   if (n_cols = 3)
-    http ('select xmlelement ("result", xmlattributes ('''' as "type"),
+    http (sprintf ('select xmlelement ("result", xmlattributes (''%s'' as "type"),
                               xmlagg (xmlelement ("row",
                                                   xmlelement ("column",
                                                               xmlattributes (fct_lang ("c1") as "xml:lang",
@@ -583,11 +692,11 @@ fct_xml_wrap (in tree any, in txt any)
                                                                              fct_short_form(__ro2sq("c1")) as "shortform"),
                                                               __ro2sq ("c1")),
                                                   xmlelement ("column",
-                                                              fct_label ("c1", 0, ''facets'' )),
+                                                              fct_label_np ("c1", 0, ''facets'' )),
                                                   xmlelement ("column", __ro2sq ("c2")),
                                                   xmlelement ("column", __ro2sq ("c3"))
 						  	)))
-             from (sparql define output:valmode "LONG" ', ntxt);
+             from (sparql define output:valmode "LONG" ', view_type), ntxt);
 
 
   http (txt, ntxt);
@@ -602,10 +711,10 @@ fct_n_cols (in tree any)
 {
   declare tp varchar;
   tp := cast (xpath_eval ('//view/@type', tree, 1) as varchar);
---  dbg_printf ('fct_n_cols: tp: %s', tp);
+--  fct_dbg_msg (sprintf ('fct_n_cols: tp: %s', tp));
   if ('list' = tp)
     return 1;
-  else if ('geo' = tp)
+  else if ('geo' = tp or 'geo-list' = tp)
     return 3;
   return 2;
   signal ('FCT00', 'Unknown facet view type');
@@ -650,7 +759,7 @@ element_split (in val any)
 ;
 
 create procedure
-fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in plain integer := 0)
+fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in full_tree any, in plain integer := 0)
 {
   declare lim, offs int;
   declare mode varchar;
@@ -662,7 +771,17 @@ fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in pl
 
   mode := fct_get_mode (tree, './@type');
 
---  dbg_printf('fct_view: view mode: %s', mode);
+-- geo-based conditionals force geo-list generation unless the old map mode is used
+
+-- dbg_obj_print(full_tree);
+
+  declare geo_conds any;
+  geo_conds := xpath_eval ('//cond/@cond_t = ''near''', full_tree);
+
+  if (0 <> geo_conds and mode <> 'geo')
+    mode := 'geo-list';
+
+  fct_dbg_msg (sprintf('fct_view: view mode: %s', mode));
 
   if ('list' = mode or 'propval-list' = mode)
     {
@@ -675,17 +794,20 @@ fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in pl
       http (sprintf ('select ?s%d as ?c1 count (*) as ?c2 ', this_s), pre);
       http (sprintf (' group by ?s%d order by desc 2', this_s), post);
     }
+
   if ('entities-list' = mode)
     {
       http (sprintf ('select distinct ?s%d as ?c1 ', this_s), pre);
       http (sprintf (' order by desc (<LONG::IRI_RANK> (?s%d)) ', this_s), post);
     }
+
   if ('properties' = mode)
     {
       if (length (fct_inf_clause (tree)) > 0)
 	http (sprintf ('select ?s%dp as ?c1 count (distinct (?s%d)) as ?c2 ', this_s, this_s), pre);
       else
 	http (sprintf ('select ?s%dp as ?c1 count (*) as ?c2 ', this_s), pre);
+
       http (sprintf (' ?s%d ?s%dp ?s%do .', this_s, this_s, this_s), txt);
       http (sprintf (' group by ?s%dp order by desc 2', this_s), post);
     }
@@ -712,6 +834,7 @@ fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in pl
       http (sprintf (' ?s%d a ?s%dc .', this_s, this_s), txt);
       http (sprintf (' group by ?s%dc order by desc 2', this_s), post);
     }
+
   if ('text' = mode or ('text-d' = mode and plain = 1))
     {
       declare exp any;
@@ -731,28 +854,28 @@ fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in pl
   if ('text-d' = mode)
     {
       declare exp any;
+
       exp := charset_recode (xpath_eval ('string (//text)', tree), '_WIDE_', 'UTF-8');
-      http (sprintf ('select 
-		  	(<sql:s_sum_page> (<sql:vector_agg> (<bif:vector> (?c1, ?sm)), <bif:vector> (%s)))  as ?res where { { 
+
+      http (sprintf ('select
+		  	(<sql:s_sum_page> (<sql:vector_agg> (<bif:vector> (?c1, ?sm)), <bif:vector> (%s))) as ?res where { {
       select (<SHORT_OR_LONG::>(?s%d)) as ?c1,  (<sql:S_SUM> ( <SHORT_OR_LONG::IRI_RANK> (?s%d), <SHORT_OR_LONG::>(?s%dtextp), <SHORT_OR_LONG::>(?o%d), ?sc ) ) as ?sm ', element_split (exp), this_s, this_s, this_s, this_s), pre);
 
-      http (sprintf ('order by desc (<sql:sum_rank> ((<sql:S_SUM> ( <SHORT_OR_LONG::IRI_RANK> (?s%d), <SHORT_OR_LONG::>(?s%dtextp), <SHORT_OR_LONG::>(?o%d), ?sc ) ) ) )', this_s, this_s, this_s), post);	    
+      http (sprintf ('order by desc (<sql:sum_rank> ((<sql:S_SUM> ( <SHORT_OR_LONG::IRI_RANK> (?s%d), <SHORT_OR_LONG::>(?s%dtextp), <SHORT_OR_LONG::>(?o%d), ?sc ) ) ) )', this_s, this_s, this_s), post);
       fct_post (tree, post, lim, offs);
       http ('}}', post);
       return;
     }
-
-
   if ('graphs' = mode)
     {
       http ('select ?g as ?c1, count(*) as ?c2 ', pre);
       http (' order by desc (2) ' , post);
     }
-
-  if ('geo' = mode)
+  if ('geo' = mode or 'geo-list' = mode)
     {
       declare loc any;
       loc := xpath_eval ('@location-prop', tree);
+
       if (loc = 'any')
 	{
 	  loc := '?anyloc';
@@ -760,85 +883,257 @@ fct_view (in tree any, in this_s int, in txt any, in pre any, in post any, in pl
 	}
       else
         http (sprintf ('select distinct ?s%d as ?c1 ?lat%d as ?c2 ?lng%d as ?c3 ', this_s, this_s, this_s), pre);
+
       if (length (loc) < 2)
          http (sprintf (' ?s%d geo:lat ?lat%d ; geo:long ?lng%d .', this_s, this_s, this_s), txt);
       else
          http (sprintf (' ?s%d %s ?location . ?location geo:lat ?lat%d ; geo:long ?lng%d .', this_s, loc, this_s, this_s), txt);
-
     }
 
   fct_post (tree, post, lim, offs);
-
 }
 ;
 
 create procedure
 fct_literal (in tree any)
 {
-  declare lit, dtp, lang varchar;
+  declare val, dtp, lang varchar;
 
   dtp := cast (xpath_eval ('./@datatype', tree) as varchar);
   lang := cast (xpath_eval ('./@xml:lang', tree) as varchar);
 
+  val := cast (xpath_eval ('./@val', tree) as varchar);
+  if (0 = val or val is null) val := cast (tree as varchar);
+
+  fct_dbg_msg (sprintf('fct_literal: val:%s, dtp:%s, lang:%s', val, dtp, lang));
+
   if (lang is not null and lang <> '')
-    lit := sprintf ('"""%s"""@%s', cast (tree as varchar), lang);
-  else if ('uri' = dtp or 'url' = dtp or 'iri' = dtp)
-    lit := sprintf ('<%s>', cast (tree as varchar));
-  else if (dtp like '%tring')
-    lit := sprintf ('"""%s"""', cast (tree as varchar));
-  else if (dtp = '' or dtp is null or dtp like '%nteger' or dtp like '%ouble' or dtp like '%loat' or dtp like '%nt')
-    lit := cast (tree as varchar);
-  else
-    lit := sprintf ('"%s"^^<%s>', cast (tree as varchar), dtp);
-  return lit;
+    return sprintf ('"""%s"""@%s', val, lang);
+
+  if (dtp = 'http://www.openlinksw.com/schemas/facets/dtp/plainstring')
+    return sprintf ('"""%s"""', val);
+
+  if (dtp = '' or dtp is null or dtp like '%nteger' or dtp like '%ouble' or dtp like '%loat' or dtp like '%nt')
+    return val;
+
+  if ('uri' = dtp or 'url' = dtp or 'iri' = dtp) {
+      return sprintf ('<%s>', val);
+  }
+
+  return sprintf ('"%s"^^<%s>', val, dtp);
 }
 ;
 
--- XXX (ghard) should ensure the literal is correctly quoted in the SPARQL statement
-
 create procedure
 fct_cond (in tree any, in this_s int, in txt any)
 {
-  declare lit, op varchar;
+  declare val, dtp, lang, neg, cond_t any;
+
+  val := fct_literal (tree);
+  cond_t := xpath_eval ('./@type', tree);
+
+  fct_dbg_msg (sprintf ('fct_cond: type: %s', cond_t));
 
-  lit := fct_literal (tree);
+  if ('range' = cond_t or 'neg_range' = cond_t) {
+    return fct_cond_range (tree, this_s, txt); -- ranges are handled elsewhere
+  }
+
+  if ('in' = cond_t) {
+    return fct_cond_in (tree, this_s, txt); -- so is IN
+  }
+
+  if ('near' = cond_t) {
+    return fct_cond_near (tree, this_s, txt); -- and NEAR
+  }
+
+  if ('contains' = cond_t) {
+    return fct_cond_contains (tree, this_s, txt);
+  }
 
-  op := coalesce (cast (xpath_eval ('./@op', tree) as varchar), '=');
+  declare t_s varchar;
+  t_s := sprintf ('?s%d', this_s);
 
- -- Op is Op :)
+  declare flt_inner varchar;
+  flt_inner := sprintf (fct_cond_fmt(cond_t), t_s, val);
 
-  if (0 = op)
+--  dbg_printf ('fct_cond: inner: %s', flt_inner);
+
+  if (neg = 'on')
+    http (sprintf (' filter (! (%s)) . ', flt_inner), txt);
+  else
+    http (sprintf (' filter (%s) . ', flt_inner), txt);
+
+  return;
+}
+;
+
+create procedure
+fct_value (in tree any, in this_s int, in txt any)
+{
+  declare val, dtp, op any;
+
+  val := fct_literal (tree);
+  op := xpath_eval ('./@op', tree);
+
+  if (0 = op or op is null)
     op := '=';
 
-  http (sprintf (' filter (?s%d %s %s) . ', this_s, op, lit), txt);
+  declare t_s varchar;
+  t_s := sprintf ('?s%d', this_s);
+
+  http (sprintf (' filter (%s %s %s) .', t_s, op, val));
+
+  return;
+}
+;
+
+-- side effect warning: unrecognized conds become eq
+
+create procedure
+fct_cond_fmt (in cond_t varchar)
+{
+  if (cond_t = 'eq')  return '%s = %s';
+  if (cond_t = 'neq') return '%s != %s';
+  if (cond_t = 'lt')  return '%s < %s';
+  if (cond_t = 'gt')  return '%s > %s';
+  if (cond_t = 'gte') return '%s >= %s';
+  if (cond_t = 'lte') return '%s <= %s';
+  return '%s = %s';
 }
 ;
 
 create procedure
 fct_cond_range (in tree any, in this_s int, in txt any)
 {
-  declare hi, lo varchar;
+  declare cond_t, neg, lo, hi any;
 
-  lo := xpath_eval ('./@lo', tree);
-  hi := xpath_eval ('./@hi', tree);
+  cond_t := xpath_eval ('./@type', tree);
+  neg    := xpath_eval ('./@neg',    tree);
+  lo     := xpath_eval ('./@lo',     tree);
+  hi     := xpath_eval ('./@hi',     tree);
 
-  if (lo <> '' and hi <> '') { 
-    http(sprintf (' filter (?s%d >= %s && ?s%d <= %s) .', this_s, lo, this_s, hi), txt);
-  }
-  else if (lo <> '') 
-  {
-    http(sprintf (' filter (?s%d >= %s) .', this_s, lo), txt);
-  }
-  else if (hi <> '') 
-  {
-    http(sprintf (' filter (?s%d <= %s) .', this_s, hi), txt);
+  declare flt_inner, flt_cl varchar;
+
+--  fct_dbg_msg (sprintf ('fct_cond_range: got lo: %s, hi: %s, neg: %s', lo, hi, cast (neg as varchar)));
+
+  if (lo <> '' and hi <> '') {
+    flt_inner := sprintf ('(?s%d >= %s && ?s%d <= %s)', this_s, lo, this_s, hi);
   }
-  else return;
+
+  if (neg = 'on')
+    flt_cl := sprintf (' filter (! %s) .', flt_inner);
+  else
+    flt_cl := sprintf (' filter %s .', flt_inner);
+
+  http (flt_cl, txt);
+
+  return;
+}
+;
+
+create procedure
+fct_cond_contains (in tree any, in this_s int, in txt any)
+{
+  declare val, neg, cond_t, txs_qr varchar;
+  declare wlimit int;
+  declare txs_arr any;
+
+  neg := xpath_eval ('./@neg', tree);
+
+  val := cast (xpath_eval ('.', tree) as varchar);
+
+  if (val <> '')
+    {
+      wlimit := registry_get ('fct_text_query_limit');
+
+      if (isstring (wlimit))
+        wlimit := atoi (wlimit);
+      if (0 = wlimit)
+        wlimit := 100;
+
+      txs_qr := fti_make_search_string_inner (charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8'), txs_arr);
+
+      if (length (txs_arr) > wlimit)
+	signal ('22023', 'The request is too large');
+
+      if ('no' <> neg)
+        {
+          http (sprintf (' ?s%d bif:contains ''%s'' .', this_s, txs_qr), txt);
+        }
+      else
+        {
+          http (sprintf (' filter (! bif:contains (?s%d, ''"%s"'')) .', this_s, val), txt);
+        }
+    }
+}
+;
+
+create procedure
+fct_cond_in (in tree any, in this_s int, in txt any) {
+
+  declare v any;
+  declare v_str varchar;
+  declare i int;
+
+  v := xpath_eval ('./cond-parm', tree, 0);
+
+  if (0 = length(v)) return;
+
+  for (i := 0; i < length(v); i := i + 1) {
+    fct_dbg_msg (sprintf ('val: %s\n', cast (xpath_eval ('./text()', v[i]) as varchar)));
+
+    if (i = 0) {
+     v_str := fct_literal (v[i]);
+    }
+    else
+      v_str := v_str || ',' || fct_literal (v[i]);
+  };
+
+  fct_dbg_msg (sprintf ('fct_cond_in: v_str: %s', v_str));
+
+  http (sprintf (' filter (?s%d in (%s)).', this_s, v_str), txt);
 }
 ;
 
+create procedure
+fct_cond_near (in tree any, in this_s int, in txt any) {
+
+  declare v any;
+  declare v_str varchar;
+  declare i int;
+  declare lon, lat float;
+  declare d int;
+  declare prop varchar;
+
+  fct_dbg_msg (sprintf ('fct_cond_near.', lon, lat, d));
+
+  lon  := xpath_eval ('./@lon', tree, 0);
+  lat  := xpath_eval ('./@lat', tree, 0);
+  d    := xpath_eval ('./@d',   tree, 0);
+  prop := xpath_eval ('./@location-prop', tree, 0);
 
-create procedure 
+  if (length(lon) = 0 or length(lat) = 0 or length (d) = 0) return;
+
+  lon  := aref (lon, 0);
+  lat  := aref (lat, 0);
+  d    := cast (aref (d, 0) as int);
+  prop := aref (prop, 0);
+
+  if (lon = '' or lat = '') return;
+
+  fct_dbg_msg (sprintf ('fct_cond_near: lon:%s, lat:%s, dist: %d', lon, lat, d));
+
+  if (length (prop) < 2)
+    http (sprintf (' ?s%d geo:lat ?lat%d ; geo:long ?lng%d .', this_s, this_s, this_s), txt);
+  else
+    http (sprintf (' ?s%d %s ?location . ?location geo:lat ?lat%d ; geo:long ?lng%d .', this_s, prop, this_s, this_s), txt);
+
+  http (sprintf (' filter (bif:st_intersects (bif:st_point (xsd:float(?lng%d),xsd:float(?lat%d)), bif:st_point (%s,%s), %d)).',
+                 this_s, this_s, lon, lat, d), txt);
+}
+;
+
+create procedure
 fct_curie_iri (in curie varchar)
 {
   declare pos int;
@@ -849,14 +1144,14 @@ fct_curie_iri (in curie varchar)
     return null;
   pref := subseq (curie, 0, pos);
   loc := subseq (curie, pos + 1);
-  ns := __xml_get_ns_uri (pref, 2); 
+  ns := __xml_get_ns_uri (pref, 2);
   if (ns is null)
     return null;
   return ns || loc;
 }
 ;
 
-create procedure 
+create procedure
 fct_curie (in curie varchar)
 {
   if (curie like '\\[%:%\\]')
@@ -867,7 +1162,7 @@ fct_curie (in curie varchar)
       if (tmp is not null)
 	curie := tmp;
     }
-  return curie; 
+  return curie;
 }
 ;
 
@@ -878,6 +1173,7 @@ fct_text_1 (in tree any,
 	    in txt any,
 	    in pre any,
 	    in post any,
+            in full_tree any,
             in plain integer := 0)
 {
   declare c any;
@@ -887,7 +1183,7 @@ fct_text_1 (in tree any,
 
   for (i := 0; i < length (c); i := i + 1)
     {
-      fct_text (c[i], this_s, max_s, txt, pre, post, plain);
+      fct_text (c[i], this_s, max_s, txt, pre, post, full_tree, plain);
     }
 }
 ;
@@ -899,27 +1195,31 @@ fct_text (in tree any,
 	  in txt any,
 	  in pre any,
 	  in post any,
+          in full_tree any,
 	  in plain integer := 0)
 {
   declare n varchar;
 
   n := cast (xpath_eval ('name ()', tree, 1) as varchar);
 
---  dbg_printf('fct_text pre: %s, post: %s', string_output_string(pre), string_output_string(post));
---  dbg_printf('           n: %s', n);
+--  fct_dbg_msg (sprintf('fct_text pre: %s, post: %s', string_output_string(pre), string_output_string(post)));
+--  fct_dbg_msg (sprintf('           n: %s', n));
 --  dbg_obj_print (tree);
 
   if ('class' = n)
     {
       declare ciri varchar;
       ciri := fct_curie (cast (xpath_eval ('./@iri', tree) as varchar));
+
+      fct_dbg_msg (sprintf ('class: %s', cast (ciri as varchar)));
+
       if (cast (xpath_eval ('./@exclude', tree) as varchar) = 'yes')
 	{
 	  http (sprintf (' filter (!bif:exists ((select (1) where { ?s%d a <%s> } ))) .', this_s, ciri), txt);
 	}
-      else if (ciri is null) 
+      else if (ciri is null)
         {
-	  http (sprintf ('?s%d a ?s%d .', this_s, this_s+1), txt); 
+	  http (sprintf ('?s%d a ?s%d .', this_s, this_s + 1), txt);
         }
       else
 	{
@@ -931,7 +1231,7 @@ fct_text (in tree any,
   if ('query' = n)
     {
       max_s := 1;
-      fct_text_1 (tree, 1, max_s, txt, pre, post, plain);
+      fct_text_1 (tree, 1, max_s, txt, pre, post, full_tree, plain);
       return;
     }
 
@@ -944,10 +1244,13 @@ fct_text (in tree any,
       v := cast (xpath_eval ('//view/@type', tree) as varchar);
       prop := cast (xpath_eval ('./@property', tree, 1) as varchar);
 
+--      fct_dbg_msg (printf ('prop: %s', coalesce(prop, 'NULL')));
+
       if ('text' = v or 'text-d' = v)
         sc_opt := ' option (score ?sc) ';
       else
         sc_opt := '';
+
       if (prop is not null)
 	prop := '<' || prop || '>';
       else
@@ -957,8 +1260,8 @@ fct_text (in tree any,
       if (isstring (wlimit))
         wlimit := atoi (wlimit);
       if (0 = wlimit)
-        wlimit := 100;	
-      txs_qr := fti_make_search_string_inner (charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8'), txs_arr);	
+        wlimit := 100;
+      txs_qr := fti_make_search_string_inner (charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8'), txs_arr);
       if (length (txs_arr) > wlimit)
 	signal ('22023', 'The request is too large');
       http (sprintf (' ?s%d %s ?o%d . ?o%d bif:contains  ''%s'' %s .', this_s, prop, this_s, this_s, txs_qr, sc_opt), txt);
@@ -975,18 +1278,20 @@ fct_text (in tree any,
 
       piri := fct_curie (cast (xpath_eval ('./@iri', tree, 1) as varchar));
 
+--      fct_dbg_msg (sprintf ('property: <%s>', piri));
+
       if (cast (xpath_eval ('./@exclude', tree) as varchar) = 'yes')
 	{
 	  http (sprintf (' filter (!bif:exists ((select (1) where { ?s%d <%s> ?v%d } ))) .', this_s, piri, new_s), txt);
 	  max_s := max_s - 1;
 	  new_s := max_s;
-	  fct_text_1 (tree, new_s, max_s, txt, pre, post, plain);
+	  fct_text_1 (tree, new_s, max_s, txt, pre, post, full_tree, plain);
 	  return;
 	}
       else
 	{
 	  http (sprintf (' ?s%d <%s> ?s%d .', this_s, piri, new_s), txt);
-	  fct_text_1 (tree, new_s, max_s, txt, pre, post, plain);
+	  fct_text_1 (tree, new_s, max_s, txt, pre, post, full_tree, plain);
 	}
     }
 
@@ -996,22 +1301,47 @@ fct_text (in tree any,
       max_s := max_s + 1;
       new_s := max_s;
       http (sprintf (' ?s%d <%s> ?s%d .', new_s, fct_curie (cast (xpath_eval ('./@iri', tree, 1) as varchar)), this_s), txt);
-      fct_text_1 (tree, new_s, max_s, txt, pre, post, plain);
+      fct_text_1 (tree, new_s, max_s, txt, pre, post, full_tree, plain);
     }
 
   if ('value' = n)
     {
+      fct_value (tree, this_s, txt);
+    }
+
+  if ('cond' = n)
+    {
+      fct_chk_any_prop (tree, this_s, max_s, txt);
       fct_cond (tree, this_s, txt);
     }
 
-  if ('value-range' = n)
+  if ('cond-range' = n)
     {
+      fct_chk_any_prop (tree, this_s, max_s, txt);
       fct_cond_range (tree, this_s, txt);
     }
 
   if ('view' = n)
     {
-      fct_view (tree, this_s, txt, pre, post, plain);
+      fct_view (tree, this_s, txt, pre, post, full_tree, plain);
+    }
+}
+;
+
+create procedure
+fct_chk_any_prop (in tree any, inout this_s int, inout max_s int, in txt any)
+{
+  if (0 = xpath_eval ('count (./ancestor::*[name()=''property''])+ count(./ancestor::*[name()=''property-of''])', tree, 1))
+    {
+      declare dtp varchar;
+      dtp := xpath_eval ('./@dtp', tree, 1);
+
+      declare new_s int;
+      max_s := max_s + 1;
+      new_s := max_s;
+
+      http (sprintf ('?s%d ?s%dcondp ?s%d .', this_s, this_s, new_s), txt);
+      this_s := max_s;
     }
 }
 ;
@@ -1020,7 +1350,7 @@ create procedure
 fct_query (in tree any, in plain integer := 0)
 {
   declare s, add_graph int;
-  declare txt, pre, post any;
+	  declare txt, pre, post any;
 
   txt := string_output ();
   pre := string_output ();
@@ -1032,7 +1362,7 @@ fct_query (in tree any, in plain integer := 0)
   if (xpath_eval ('//view[@type="graphs"]', tree) is not null)
     add_graph := 1;
 
-  fct_text (xpath_eval ('//query', tree), 0, s, txt, pre, post, plain);
+  fct_text (xpath_eval ('//query', tree), 0, s, txt, pre, post, tree, plain);
 
   http (' where {', pre);
   if (add_graph) http (' graph ?g { ', pre);
@@ -1082,14 +1412,25 @@ fct_test (in str varchar, in timeout int := 0)
 }
 ;
 
-create procedure _min (in n1 int, in n2 int) {
-  if (n1 < n2) return n1;
-  else return n2;
+create procedure
+fct_view_pos (in tree any)
+{
+  declare c any;
+  declare i int;
+  c := xpath_eval ('//*[name() = "query" or
+	           name () = "property" or
+	           name () = "property-of"]', tree, 0);
+  for (i := 0; i < length (c); i := i + 1)
+    {
+      if (xpath_eval ('./view', c[i]) is not null)
+	return i;
+    }
+  return 0;
 }
 ;
 
 create procedure
-fct_exec (in tree any, 
+fct_exec (in tree any,
           in timeout int)
 {
   declare start_time, view3, inx, n_rows int;
@@ -1098,7 +1439,7 @@ fct_exec (in tree any,
   declare tmp any;
   declare offs, lim int;
 
-  set result_timeout = _min (timeout, atoi (registry_get ('fct_timeout_max')));
+  set result_timeout = __min (timeout, atoi (registry_get ('fct_timeout_max')));
 
   offs := xpath_eval ('//view/@offset', tree);
   lim := xpath_eval ('//view/@limit', tree);
@@ -1112,7 +1453,9 @@ fct_exec (in tree any,
     }
 
   sqls := '00000';
+
   qr := fct_query (xpath_eval ('//query', tree, 1));
+
   query := qr;
 
   qr2 := fct_xml_wrap (tree, qr);
@@ -1121,7 +1464,10 @@ fct_exec (in tree any,
 
   connection_set ('sparql_query', qr2);
 
+--  dbg_obj_print (qr2);
+
   exec (qr2, sqls, msg, vector (), 0, md, res);
+
   n_rows := row_count ();
   act := db_activity ();
   set result_timeout = 0;
@@ -1140,7 +1486,7 @@ fct_exec (in tree any,
       qr := fct_query (xpath_eval ('//query', tree, 1));
       qr2 := fct_xml_wrap (tree, qr);
       sqls := '00000';
-      set result_timeout = _min (timeout, atoi (registry_get ('fct_timeout_max')));
+      set result_timeout = __min (timeout, atoi (registry_get ('fct_timeout_max')));
       exec (qr2, sqls, msg, vector (), 0, md, res);
       n_rows := row_count ();
       act := db_activity ();
@@ -1156,15 +1502,16 @@ fct_exec (in tree any,
       inx := inx + 1;
     }
 
+  declare v_pos integer;
+  v_pos := fct_view_pos(tree);
 
-
-  res := xmlelement ("facets", xmlelement ("sparql", query), 
+  res := xmlelement ("facets", xmlelement ("sparql", query),
                                xmlelement ("time", msec_time () - start_time),
 		               xmlelement ("complete", case when sqls = 'S1TAT' then 'no' else 'yes' end),
-		               xmlelement ("timeout", _min (timeout * 2, atoi (registry_get ('fct_timeout_max')))),
+		               xmlelement ("timeout", __min (timeout * 2, atoi (registry_get ('fct_timeout_max')))),
 		               xmlelement ("db-activity", act),
-		               xmlelement ("processed", n_rows), 
-                               xmlelement ("view", xmlattributes (offs as "offset", lim as "limit")),
+		               xmlelement ("processed", n_rows),
+                               xmlelement ("view", xmlattributes (offs as "offset", lim as "limit", v_pos as "position")),
                                results[0], results[1], results[2]);
 
   --String_to_file ('ret.xml', serialize_to_UTF8_xml (res), -2);
diff --git a/binsrc/b3s/facet.vsp b/binsrc/b3s/facet.vsp
index f344861..3a6fea7 100644
--- a/binsrc/b3s/facet.vsp
+++ b/binsrc/b3s/facet.vsp
@@ -1,69 +1,87 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html 
+<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Precision Search & Find</title>
 
-<link id="ss" rel="stylesheet" media="screen" type="text/css" href="styles/default.css"/>
+<?vsp
+  declare main_ss varchar;
+  main_ss := registry_get ('fct_main_ss');
+  if (not isstring (main_ss)) main_ss := 'styles/default.css';
+?>
+  <link rel="stylesheet" type="text/css" href="<?=main_ss?>"  charset="utf-8" />
 
 <?vsp
   fct_gen_opensearch_link();
 ?>
 
 <script type="text/javascript" >
-    var featureList=["map", "combolist", "ajax", "tab", "json"];
+    var featureList=["map", "combolist", "ajax", "tab", "json", "location"];
 </script>
 <script type="text/javascript" src="oat/toolkit/loader.js"></script>
 <script type="text/javascript" src="facet.js"></script>
 
-<?vsp 
+<?vsp
   declare sid, _S, ses_parms varchar;
 
   b3s_handle_ses (path, lines, params);
 
   sid := connection_get ('sid');
+
+  declare dbg_out any;
+  declare dbg_mode varchar;
+  declare dbg_lvl int;
+
+  dbg_mode := registry_get ('fct_dbg_mode');
+  dbg_lvl := registry_get ('fct_dbg_lvl');
+
+  if (not isstring (dbg_lvl))
+    dbg_lvl := http_param ('dbg');
+
+  if (not isstring (dbg_lvl))
+      dbg_lvl := 0;
+    else
+      dbg_lvl := atoi (dbg_lvl);
+
+  connection_set ('fct_dbg_lvl', dbg_lvl);
+
+  if (not isstring(dbg_mode))
+    dbg_mode := http_param ('dbg_mode');
+
+  if (not isstring (dbg_mode))
+    dbg_mode := 'page';
+
+  connection_set ('fct_dbg_mode', dbg_mode);
+
+  if (dbg_mode := 'page')
+    {
+      dbg_out := string_output();
+      connection_set ('__fct_dbg_out', dbg_out);
+    }
+
 --  dbg_obj_print (path);
 --  dbg_obj_print (lines);
-  
+
 ?>
 
 </head>
 <body>
 <div id="PG">
 <div id="HD">
-  <?vsp fct_page_head (); ?>  
-  <ul id="main_menu">
-    <?vsp if (sid is not null) { ?>
-      <!--li class="sel"><a href="<?= b3s_render_fct_link() ?>" class="sel">Facets</a></li-->
-    <?vsp } ?>
-    <!--li id="mnu_settings"><a href="settings.vsp?g=<?U _S ?><?V ses_parms ?>">Settings</a>
-      <div id="settings_popup" style="display: none">
-        <ul>
-          <li>
-            <input id="sas_ckb" type="checkbox" <?= b3s_sas_selected() ?> onchange="javascript:sas_cb();"/> 
-            <label for="sas_ckb">owl:sameAs</label>
-          </li>
-          <li>
-            <label for="inf_sel">IFP rule:</label>
-            <select id="inf_sel" onchange="javascript:inf_cb();"><?vsp b3s_render_inf_opts (); ?></select><br/>
-          </li>
-        </ul>
-      </div> 
-    </li--><!--settings-popup-->
-  </ul>
+  <?vsp fct_page_head (); ?>
 </div><!-- #HD -->
 <div id="MD">
-<?vsp 
+<?vsp
 --
--- 
---  $Id: facet.vsp,v 1.1.2.13 2011/03/08 15:43:44 source Exp $
+--
+--  $Id: facet.vsp,v 1.1.2.24 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -99,11 +117,11 @@ if ('load' = cmd)
 
     _fsq_id := http_param ('fsq_id');
 
-    if (_fsq_id) 
+    if (_fsq_id)
       {
         _sid := fct_load (_fsq_id);
 	if (_sid is not null)
-          { 
+          {
             http_rewrite ();
 	    http_request_status ('HTTP/1.1 302 Found');
 	    http_header (sprintf ('Location: /fct/facet.vsp?sid=%d&cmd=refresh\r\n', _sid));
@@ -118,50 +136,86 @@ sq := connection_get ('sparql_query');
 
 declare exit handler for sqlstate '*'
 {
+  commit work;
+  declare _state, _out any;
+  declare _xmlser varchar;
+
+  if (isstring (http_param ('sid')))
+    select fct_state into _state from fct_state where fct_sid = http_param ('sid');
+  else
+    _state := null;
+
+  _out := string_output();
+
+  http_value (_state, 0, _out);
+  _xmlser := string_output_string (_out);
+
   http('<div class="error_msg dlg">\n');
   http('  <div class="title"><h2>Error</h2></div>\n');
-  http('  <div class="body">An unexpected error was encountered while processing your request.</div>\n');
+  http('  <div class="body">');
+  http('<p>Could not process your request because of an unexpected error.</p>');
+  http('  </div>\n');
   http('  <div class="diag">\n');
   http('  <h3>Diagnostics</h3>\n');
-  http(sprintf ('<pre>SQLSTATE: %s</pre><br/>\n', __SQL_STATE));
-  http(sprintf ('<pre>SQLMSG  : %s</pre><br/>\n', __SQL_MESSAGE));
+  http(sprintf ('<pre class="sqlstate">SQLSTATE: %s</pre><br/>\n', __SQL_STATE));
+  http(sprintf ('<pre class="sqlmsg">SQLMSG  : %s</pre><br/>\n', __SQL_MESSAGE));
+  http('<a href="#" id="err_det_toggle" onclick="javascript: OAT.Dom.show (err_details);">More info…</a>');
+  http('  <div id="err_details" style="display:none">');
+
   if (connection_get ('sparql_query') is not null)
-    http(sprintf ('<pre>SPARQL  : %s</pre><br/>\n', connection_get ('sparql_query')));
-  http('  </div>\n');
-  http('  <div class="btn_bar"><button onclick="document.location=''/fct/facet.vsp?qq=ww''">New Search</button></div>\n');  
-  http('  </div>\n');
+    {
+      http('<pre class="sparqlqry">SPARQL:\n');
+      http_value(connection_get ('sparql_query'));
+      http('</pre><br/>\n');
+    }
+
+  http(sprintf ('<p><a href="/fct/facet.vsp?qxml=%U" title="Permalink">Permalink</a></p>', _xmlser));
 
   commit work;
-  declare _state any;
-  select fct_state into _state from fct_state where fct_sid = http_param ('sid');
   insert into fct_log (fl_sid, fl_cli_ip, fl_state, fl_where, fl_cmd, fl_sqlstate, fl_sqlmsg, fl_parms)
-         values (http_param('sid'), 
+         values (http_param('sid'),
 	         http_client_ip (),
 		 _state,
 		 'ERR_HANDLER',
-		 http_param('cmd'), 
+		 http_param('cmd'),
 		 __SQL_STATE,
 		 __SQL_MESSAGE,
 		 serialize(params));
+
+  http('    <pre class="facet_state">STATE:\n');
+  http_value(_xmlser);
+  http('</pre><br/>');
+
+  http('  </div>\n');
+  http('  </div>\n');
+  http('  <div class="btn_bar"><button onclick="document.location=''/fct/facet.vsp?qq=ww''">New Search</button></div>\n');
+  http('</div>\n');
+
   goto footer;
-  
+
 };
 fct_vsp ();
 footer:;
 
 ?>
-<div class="dbg" style="display: none"><pre><![CDATA[<?vsp if (sq is not null) http(sq); ?>]]></div>
+<?vsp if (dbg_lvl) { ?>
+<div class="dbg">
+  <pre><![CDATA[<?vsp if (sq is not null) http(sq); ?>]]></pre>
+<?vsp fct_render_dbg_out ();?>
+</div>
+<?vsp } ?>
+
 </div><!-- #MD -->
 <div id="FT">
-  Faceted Search & Find service<br/>
+  Faceted Search & Find service v<?vsp http(DB.DBA.VAD_CHECK_VERSION('fct')); ?><br/>
   <a href="http://virtuoso.openlinksw.com/"><img src="/fct/images/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
   <a href="http://linkeddata.org"><img src="/fct/images/LoDLogo.gif" alt="Linked Data"/></a>
-  <?vsp 
+  <?vsp
     if (isstring (registry_get ('fst_hosted'))) { http (registry_get ('fst_hosted')); }
   ?>
   <br/>
-  <?vsp fct_virt_info (); ?><br /> 
-  <span class="copyright">Copyright © 2009-2011 OpenLink Software</span>
+  <?vsp fct_virt_info (); ?><br />
+  <span class="copyright">Data on this page is owned by its respective rights holders.<br/>Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software</span>
   <div id="FT_L"></div>
   <div id="FT_R"></div>
 </div>
diff --git a/binsrc/b3s/facet_doc.html b/binsrc/b3s/facet_doc.html
index 1497033..c4949fb 100644
--- a/binsrc/b3s/facet_doc.html
+++ b/binsrc/b3s/facet_doc.html
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: facet_doc.html,v 1.1.2.8 2011/03/08 15:43:44 source Exp $
+--  $Id: facet_doc.html,v 1.1.2.10 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 -->
-<!DOCTYPE html 
+<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <?vsp set http_charset='utf-8'; ?>
@@ -42,7 +42,7 @@
       <h1>
         <div id="logo">
           <a href="/fct/facet.vsp">
-            <img src="/fct/images/openlink_site_logo.png" 
+            <img src="/fct/images/openlink_site_logo.png"
                  alt="OpenLink Software"/>
           </a>
         </div>
@@ -50,7 +50,7 @@
     <div id="homelink"></div>
   </div> <!-- hd_l -->
   <div id="hd_r">
-    <a href="http://data.openlinksw.com/about/html/http://data.openlinksw.com/oplweb/product_family/virtuoso" 
+    <a href="http://data.openlinksw.com/about/html/http://data.openlinksw.com/oplweb/product_family/virtuoso"
        title="OpenLink Virtuoso">
       <img class="powered_by" src="/fct/images/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/>
     </a>
@@ -61,35 +61,35 @@
     <h1>Entity Search, Find, and Explore - Documentation</h1>
     <p></p>
     <h2>Text Search</h2>
-    <p>Enter a text pattern to look for. Finder will show a listing of entities with the text 
-       occurring in any literal property value or label. You may then continue to refine your search 
+    <p>Enter a text pattern to look for. Finder will show a listing of entities with the text
+       occurring in any literal property value or label. You may then continue to refine your search
        by filtering by type, property value, etc.</p>
     <h2>Entity URI (ID) Lookup</h2>
-    <p>You can lookup an Entity URI using the autocomplete feature which performs lookups as you type. 
+    <p>You can lookup an Entity URI using the autocomplete feature which performs lookups as you type.
        The OpenLink Finder recognizes some well-known namespace prefixes. For example: "dbpedia:"</p>
     <h2>Results Order & Ranking</h2>
-    <p>On some listings, results are sorted using a combination of text match score and entity-attribute-value 
-       link coefficients. Thus, a small indicator graphic (horizontal bars in leftmost column) is used to unveil 
-       metrics for both rankings per entity; the top bar indicates the text score while the bottom covers the entity 
+    <p>On some listings, results are sorted using a combination of text match score and entity-attribute-value
+       link coefficients. Thus, a small indicator graphic (horizontal bars in leftmost column) is used to unveil
+       metrics for both rankings per entity; the top bar indicates the text score while the bottom covers the entity
        ranking. Hovering on either will reveal the actual value.</p>
     <h3>Text Scores</h3>
-    <p>These are proportional to the frequency of the search terms in the match and if many terms are present, 
+    <p>These are proportional to the frequency of the search terms in the match and if many terms are present,
        the score weight is increased by a proximity factor.
     <h3>Entity Rank</h3>
-    <p>Entity matches are ranked based on how frequently they are referenced by other entities. Rankings 
-       are increased as a function of the score of the referencing entity.</p> 
+    <p>Entity matches are ranked based on how frequently they are referenced by other entities. Rankings
+       are increased as a function of the score of the referencing entity.</p>
     <a name="timeout"></a><h2>Timeouts</h2>
-    <p>The Virtuoso 6.x engine includes a new "Anytime Query" feature that enables the optional use of a configurable 
+    <p>The Virtuoso 6.x engine includes a new "Anytime Query" feature that enables the optional use of a configurable
        response time threshold (timeout) when executing queries over large
-       datasets. This feature protects against deliberate or inadvertent denial-of-service style resource-hogging 
-       that can arise from badly written or complex queries. 
-       When enabled, this feature lets you to set hard limit for resource usage per query associated with 
-       unauthenticated users. Queries execute until the response time limit threshold is reached, and, if partial 
-       results are available, they are returned with additional result set diagnostics flagging the partial nature 
-       of the result set. All query handling is partitioned thereby protecting against cross-client resource 
+       datasets. This feature protects against deliberate or inadvertent denial-of-service style resource-hogging
+       that can arise from badly written or complex queries.
+       When enabled, this feature lets you to set hard limit for resource usage per query associated with
+       unauthenticated users. Queries execute until the response time limit threshold is reached, and, if partial
+       results are available, they are returned with additional result set diagnostics flagging the partial nature
+       of the result set. All query handling is partitioned thereby protecting against cross-client resource
        contention.</p>
-       <p>This service currently enforces a 20 second hard time limit for queries. Each query is first run with a 2 second timeout - 
-       if only a partial result or no results are received, the user is prompted to retry with double the previous time limit until 
+       <p>This service currently enforces a 20 second hard time limit for queries. Each query is first run with a 2 second timeout -
+       if only a partial result or no results are received, the user is prompted to retry with double the previous time limit until
        the hard limit is reached.</p>
     <h2>OpenSearch</h2>
     <p>You can add this service as a search engine plugin in OpenSearch capable browsers. You can do this in Firefox by using the pulldown
@@ -115,7 +115,7 @@
 <div id="FT">
   <a href="http://virtuoso.openlinksw.com/"><img src="/fct/images/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
   <a href="http://linkeddata.org"><img src="/fct/images/LoDLogo.gif" alt="Linked Data"/></a><br/>
-  <span class="copyright">Copyright © 2009-2011 OpenLink Software</span>
+  <span class="copyright">Copyright © 2009-2012 OpenLink Software</span>
   <div id="FT_L"></div>
   <div id="FT_R"></div>
 </div>
diff --git a/binsrc/b3s/facet_svc.sql b/binsrc/b3s/facet_svc.sql
index 58474a4..393161f 100644
--- a/binsrc/b3s/facet_svc.sql
+++ b/binsrc/b3s/facet_svc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: facet_svc.sql,v 1.1.2.9 2011/01/05 20:58:19 source Exp $
+--  $Id: facet_svc.sql,v 1.1.2.12 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -31,7 +31,7 @@ create procedure fct_init ()
     {
       WS.WS.host_meta_add ('FCT.service', '<Link rel="http://openlinksw.com/virtuoso/fct/service" href="http://%{WSHost}s/fct/service"/>');
       WS.WS.host_meta_add ('FCT.browser', '<Link rel="http://openlinksw.com/virtuoso/fct/browser" href="http://%{WSHost}s/fct/"/>');
-      WS.WS.host_meta_add ('FCT.describe', 
+      WS.WS.host_meta_add ('FCT.describe',
       	'<Link rel="http://openlinksw.com/virtuoso/fct/resource-descriptor" template="http://%{WSHost}s/describe/?url={uri}"/>');
     }
 }
@@ -50,7 +50,7 @@ create procedure fct_svc_log (in qr varchar, in lines varchar)
 }
 ;
 
-create procedure 
+create procedure
 fct_svc_exec (in tree any, in timeout int, in accept varchar, in lines any)
 {
   declare start_time int;
@@ -84,7 +84,7 @@ fct_svc_exec (in tree any, in timeout int, in accept varchar, in lines any)
       if (not isarray (res) or 0 = length (res) or not isarray (res[0]) or 0 = length (res[0]))
 	res := xtree_doc ('<result/>');
       else
-        res := res[0][0];	
+        res := res[0][0];
 
       ret := xmlelement ("facets", xmlelement ("sparql", qr), xmlelement ("time", msec_time () - start_time),
 			   xmlelement ("complete", case when sqls = 'S1TAT' then 'no' else 'yes' end),
@@ -140,11 +140,11 @@ create procedure fct_svc () __soap_http 'text/xml'
 
   tmp := cast (xpath_eval ('//query/@timeout', xslt) as varchar);
   if (tmp is null)
-    timeout := atoi (registry_get ('fct_timeout'));
+    timeout := atoi (registry_get ('fct_timeout_min'));
   else
     timeout := atoi (tmp);
 
-  maxt := atoi (registry_get ('fct_max_timeout'));
+  maxt := atoi (registry_get ('fct_timeout_max'));
   if (0 >= timeout or timeout > maxt)
     timeout := maxt;
   ret := fct_svc_exec (xslt, timeout, accept, lines);
diff --git a/binsrc/b3s/facet_test.sql b/binsrc/b3s/facet_test.sql
index 6c7a452..fbf442f 100644
--- a/binsrc/b3s/facet_test.sql
+++ b/binsrc/b3s/facet_test.sql
@@ -1,10 +1,10 @@
 --
---  $Id: facet_test.sql,v 1.1.2.2 2009/05/05 15:25:19 source Exp $
+--  $Id: facet_test.sql,v 1.1.2.5 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,7 +20,7 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 
--- Sample facet queries 
+-- Sample facet queries
 
 
 <query> <class iri="http://xmlns.com/foaf/0.1/Person" /><view type="list" limit="10" /></query>
@@ -35,24 +35,18 @@ select fct_query (xtree_doc ('
 
 select fct_query (xtree_doc ('
 <query> <class iri="http://xmlns.com/foaf/0.1/Person" />
-<property iri="foaf:knows"><property iri="foaf:name"><value>"Joe"</value>  </property>
+<property iri="foaf:knows"><property iri="foaf:name"><value>"Joe"</value></property>
 </property>
 <view type="properties" limit="10" /></query>
  '));
 
-
-
 select fct_query (xtree_doc ('
 <query><text>semantic</text> <view type="text" limit="10" />
 </query>'));
 
-
-
-
-
-
 select fct_test ('
-<query> <class iri="http://xmlns.com/foaf/0.1/Person" />
+<query>
+  <class iri="http://xmlns.com/foaf/0.1/Person" />
 <view type="properties" limit="10" /></query>
  ', 1000);
 
@@ -60,16 +54,15 @@ select fct_test ('
 
 select fct_query (xtree_doc ('<query><class iri="http://xmlns.com/foaf/0.1/Person"/> <view type="list" limit="10"/></query>'));
 
-select fct_test  ('<query> <text>semantic web</text><view type="text" limit="20"/></query>');
-
-select fct_test  ('<query> <text>hottie</text><view type="text-properties" limit="20"/></query>');
-
-select fct_test  ('<query> <text property="http://purl.org/dc/elements/1.1/description">hottie</text><view type="text" limit="20"/></query>');
-
+select fct_test ('<query> <text>semantic web</text><view type="text" limit="20"/></query>');
 
+select fct_test ('<query> <text>hottie</text><view type="text-properties" limit="20"/></query>');
 
-select xslt ('file://fct/fct_vsp.xsl', xtree_doc ('<facets><result><row><column>http://xyz.com/xyz.htm</column></row></result></facets>'), vector ('sid', 2, 'type', 'properties'))
+select fct_test ('<query> <text property="http://purl.org/dc/elements/1.1/description">hottie</text><view type="text" limit="20"/></query>');
 
+select xslt ('file://fct/fct_vsp.xsl',
+             xtree_doc ('<facets><result><row><column>http://xyz.com/xyz.htm</column></row></result></facets>'),
+             vector ('sid', 2, 'type', 'properties'))
 
 create procedure fct_exp (in str varchar)
 {
diff --git a/binsrc/b3s/facet_text.xsl b/binsrc/b3s/facet_text.xsl
index ae4ae46..a41ff03 100644
--- a/binsrc/b3s/facet_text.xsl
+++ b/binsrc/b3s/facet_text.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: facet_text.xsl,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: facet_text.xsl,v 1.1.2.3 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -27,14 +27,14 @@
 <xsl:output method="text"/>
 <xsl:template match="facets">
 <xsl:for-each select="result/row">
-  <xsl:for-each select="column"> 
-    <xsl:value-of select="." />  
+  <xsl:for-each select="column">
+    <xsl:value-of select="." />
     <xsl:text></xsl:text>
   </xsl:for-each>
   <xsl:text>
-  </xsl:text> 
+  </xsl:text>
 </xsl:for-each>
-<xsl:text> Complete = </xsl:text> <xsl:value-of select="complete"/> 
+<xsl:text> Complete = </xsl:text> <xsl:value-of select="complete"/>
 <xsl:text> Activity = </xsl:text> <xsl:value-of select="db-activity"/>
 </xsl:template>
 </xsl:stylesheet>
diff --git a/binsrc/b3s/facet_view.sql b/binsrc/b3s/facet_view.sql
index 0a302a5..de1df84 100644
--- a/binsrc/b3s/facet_view.sql
+++ b/binsrc/b3s/facet_view.sql
@@ -1,10 +1,10 @@
 --
---  $Id: facet_view.sql,v 1.1.2.32 2011/03/24 15:50:37 source Exp $
+--  $Id: facet_view.sql,v 1.1.2.48 2012/03/15 16:35:35 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -23,25 +23,9 @@
 --set ignore_params=on;
 -- Facets web page
 
-registry_set ('_fct_xslt_', 
+registry_set ('_fct_xslt_',
               case when registry_get('_fct_url_') = 0 then 'file://fct/' else registry_get('_fct_url_') end);
 
-create procedure
-fct_view_pos (in tree any)
-{
-  declare c any;
-  declare i int;
-  c := xpath_eval ('//*[name() = "query" or 
-	           name () = "property" or 
-	           name () = "property-of"]', tree, 0);
-  for (i := 0; i < length (c); i := i + 1)
-    {
-      if (xpath_eval ('./view', c[i]) is not null)
-	return i;
-    }
-  return null;
-}
-;
 
 create procedure
 fct_view_info (in tree any, in ctx int, in txt any)
@@ -51,7 +35,9 @@ fct_view_info (in tree any, in ctx int, in txt any)
 
   pos := 1 + fct_view_pos (tree);
   tree := xpath_eval ('//view', tree);
+
   mode := cast (xpath_eval ('./@type', tree, 1) as varchar);
+
   lim := atoi (cast (xpath_eval ('./@limit', tree, 1) as varchar));
   offs := atoi (cast (xpath_eval ('./@offset', tree, 1) as varchar));
 
@@ -72,6 +58,10 @@ fct_view_info (in tree any, in ctx int, in txt any)
     {
       http ('Displaying Places associated with Entities', txt);
     }
+  if ('geo-list' = mode)
+    {
+      http ('Displaying Entities with Geographical location');
+    }
   if ('properties' = mode)
     {
       http ('Displaying Attributes of Entities', txt);
@@ -80,7 +70,6 @@ fct_view_info (in tree any, in ctx int, in txt any)
     {
       http ('Displaying Attributes with Entity Reference Values', txt);
     }
-
   if ('text-properties' = mode)
     {
       http (sprintf ('showing properties of %s%d containing "%s"',
@@ -97,9 +86,13 @@ fct_view_info (in tree any, in ctx int, in txt any)
     {
       http ('Displaying Ranked Entity Names and Text summaries', txt);
     }
+  if ('propval-list' = mode)
+    {
+      http ('Displaying property values', txt);
+    }
 --  if (offs)
 --    http (sprintf ('  values %d - %d', 1 + offs, lim), txt);
-  
+
 
   http (' where:</h3>', txt);
 }
@@ -144,16 +137,77 @@ create procedure fct_t_term ()
 create procedure
 fct_var_tag (in this_s int, in ctx int)
 {
-  if (ctx)
-    return sprintf ('<a href="/fct/facet.vsp?cmd=set_focus&sid=%d&n=%d" title="Focus on %s%d">%s%d</a>',
+  declare cl varchar;
+
+  if (this_s <> ctx)
+    cl := '';
+  else
+    cl := 'focus';
+
+  return sprintf ('<a class="%s" href="/fct/facet.vsp?cmd=set_focus&sid=%d&n=%d" title="Focus on %s%d">%s%d</a>',
+                    cl,
                     connection_get ('sid'),
 		    this_s,
 		    fct_s_term (),
 		    this_s,
 		    fct_s_term (),
 		    this_s);
-  else
-    return sprintf ('%s%d', connection_get ('s_term'), this_s);
+}
+;
+
+create procedure
+fct_space (in n int)
+{
+  declare i int;
+  declare t varchar;
+
+  t := '';
+
+  for (i := 0; i < n; i := i + 1) {
+    concat (t, ' ');
+  }
+
+  return t;
+}
+;
+
+create procedure
+fct_cond_name (in cond varchar)
+{
+  if ('eq' = cond)        return '==';
+  if ('neq' = cond)       return '!=';
+  if ('lt' = cond)        return '<';
+  if ('lte' = cond)       return '<=';
+  if ('gt' = cond)        return '>';
+  if ('gte' = cond)       return '>=';
+  if ('contains' = cond)  return 'contains';
+}
+;
+
+create procedure
+fct_li (in out_str varchar, in txt any) {
+  http ('<li>', txt);
+  http (out_str, txt);
+  http ('</li>\n', txt);
+}
+;
+
+create procedure
+fct_val_fmt_enc (in val varchar, in lang varchar, in dtp varchar)
+{
+--  fct_dbg_msg (sprintf ('fct_val_fmt_enc: %s, %s, %s', val, lang, dtp));
+
+  if (lang <> '')
+    return sprintf ('"%V"@%V', val, lang);
+
+  if (dtp <> '') {
+    if (dtp <> 'uri')
+      return sprintf ('"%V"^^%V', val, dtp);
+    else
+      return sprintf ('<%V>', val);
+  }
+
+  return sprintf ('"%V"', val);
 }
 ;
 
@@ -169,26 +223,15 @@ fct_query_info_1 (in tree any,
   declare c any;
   declare i, len int;
   c := xpath_eval ('./node()', tree, 0);
+
+  http (sprintf ('<ul class="qry_nfo_lvl_%d">', level),txt);
+
   for (i := 0; i < length (c); i := i + 1)
     {
       fct_query_info (c[i], this_s, max_s, level + 1, ctx, txt, cno);
     }
-}
-;
 
-create procedure
-fct_space (in n int)
-{
-  declare i int;
-  declare t varchar;
-
-  t := '';
-
-  for (i := 0; i < n; i := i + 1) {
-    concat (t, ' ');
-  }
-
-  return t;
+  http ('</ul>', txt);
 }
 ;
 
@@ -205,27 +248,29 @@ fct_query_info (in tree any,
 
   n := cast (xpath_eval ('name ()', tree, 1) as varchar);
 
+  fct_dbg_msg (sprintf ('fct_query_info: cno: %d, level: %d, n: %s, ctx: %d', cno, level, n, ctx));
+
   http (fct_space (2 * level), txt);
 
   if ('class' = n)
     {
       if (cast (xpath_eval ('./@exclude', tree) as varchar) = 'yes')
 	{
-	  http (sprintf ('%s  is not a <span class="iri">%s</span> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
-		fct_var_tag (this_s, ctx),
-		fct_short_form (cast (xpath_eval ('./@iri', tree) as varchar)),
-		connection_get ('sid'),
-		cno),
-	      txt);
+	  fct_li (sprintf ('%s is not a <span class="iri">%s</span> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
+		           fct_var_tag (this_s, ctx),
+		           fct_short_form (cast (xpath_eval ('./@iri', tree) as varchar)),
+		           connection_get ('sid'),
+		           cno),
+	          txt);
 	}
       else
 	{
-	  http (sprintf ('%s is a <span class="iri">%s</span> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
-		fct_var_tag (this_s, ctx),
-		fct_short_form (cast (xpath_eval ('./@iri', tree) as varchar)),
-		connection_get ('sid'),
-		cno),
-	      txt);
+	  fct_li (sprintf ('%s is a <span class="iri">%s</span> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
+		           fct_var_tag (this_s, ctx),
+		           fct_short_form (cast (xpath_eval ('./@iri', tree) as varchar)),
+		           connection_get ('sid'),
+		           cno),
+	          txt);
 	}
       cno := cno + 1;
     }
@@ -241,21 +286,22 @@ fct_query_info (in tree any,
       prop := cast (xpath_eval ('./@property', tree, 1) as varchar);
 
       if (prop is not null)
-        http (sprintf (' %s has <span class="iri"><a href="#"/fct/facet.vsp?sid=%d&cmd=drop_text_prop">%s</a></span> containing text <span class="value">"%s"</span>. ', 
-                     fct_var_tag (this_s, ctx),
-                       connection_get ('sid'),
-                       fct_short_form (prop),
-                       charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8')), txt);
+        fct_li (sprintf (' %s has <span class="iri"><a href="#"/fct/facet.vsp?sid=%d&cmd=drop_text_prop">%s</a></span> containing text <span class="value">"%s"</span>. ',
+                         fct_var_tag (this_s, ctx),
+                         connection_get ('sid'),
+                         fct_short_form (prop),
+                         charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8')),
+                txt);
       else
-        http(sprintf (' %s has <a class="qry_info_cmd" href="/fct/facet.vsp?sid=%d&cmd=set_view&type=text-properties&limit=20&offset=0&cno=%d">any %s</a> with %s <span class="value">"%s"</span> <a href="/fct/facet.vsp?sid=%d&cmd=drop_text">Drop</a>. ', 
-                      fct_var_tag (this_s, ctx), 
-                      connection_get('sid'), 
-                      cno,
-		      fct_p_term (),
-		      fct_o_term (),
-		      charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8'),
-                      connection_get('sid')), 
-             txt);
+        fct_li (sprintf (' %s has <a class="qry_info_cmd" href="/fct/facet.vsp?sid=%d&cmd=set_view&type=text-properties&limit=20&offset=0&cno=%d">any %s</a> with %s <span class="value">"%s"</span> <a href="/fct/facet.vsp?sid=%d&cmd=drop_text">Drop</a>. ',
+                         fct_var_tag (this_s, ctx),
+                         connection_get ('sid'),
+                         cno,
+		         fct_p_term (),
+		         fct_o_term (),
+		         charset_recode (xpath_eval ('string (.)', tree), '_WIDE_', 'UTF-8'),
+                         connection_get ('sid')),
+                 txt);
 
     }
   else if ('property' = n)
@@ -263,30 +309,41 @@ fct_query_info (in tree any,
       declare new_s int;
       max_s := max_s + 1;
       new_s := max_s;
+      http ('<li>', txt);
       if (cast (xpath_eval ('./@exclude', tree) as varchar) = 'yes')
 	{
 	  http (sprintf (' %s does not have property <span class="iri">%s</span> %s . ',
-                     fct_var_tag (this_s, ctx),
-		     fct_short_form (cast (xpath_eval ('./@iri', tree, 1) as varchar)), 
-                     fct_var_tag (new_s, ctx)), txt);
+                         fct_var_tag (this_s, ctx),
+		         fct_short_form (cast (xpath_eval ('./@iri', tree, 1) as varchar)),
+                         fct_var_tag (new_s, ctx)),
+                txt);
 	}
       else
 	{
 	  http (sprintf (' %s <span class="iri">%s</span> %s . ',
-                     fct_var_tag (this_s, ctx),
-		     fct_short_form (cast (xpath_eval ('./@iri', tree, 1) as varchar)), 
-                     fct_var_tag (new_s, ctx)), txt);
+                         fct_var_tag (this_s, ctx),
+		         fct_short_form (cast (xpath_eval ('./@iri', tree, 1) as varchar)),
+                         fct_var_tag (new_s, ctx)),
+                txt);
 	}
       if (ctx)
 	http (sprintf ('<a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop&n=%d">Drop %s%d</a> ',
-	               connection_get ('sid'), new_s, fct_s_term (), new_s), txt);
+	               connection_get ('sid'),
+                       new_s,
+                       fct_s_term (),
+                       new_s),
+              txt);
+
       fct_query_info_1 (tree, new_s, max_s, level, ctx, txt, cno);
+      http ('</li>\n', txt);
     }
   else if ('property-of' = n)
     {
       declare new_s int;
       max_s := max_s + 1;
       new_s := max_s;
+
+      http ('<li>', txt);
       http (sprintf (' %s <span class="iri">%s</span> %s . ',
                      fct_var_tag (new_s, ctx),
 		     fct_short_form (cast (xpath_eval ('./@iri', tree, 1) as varchar), 1),
@@ -295,70 +352,183 @@ fct_query_info (in tree any,
 
       if (ctx)
 	http (sprintf ('<a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop&n=%d">Drop %s%d</a> ',
-	connection_get ('sid'),
-	new_s, fct_s_term (), new_s), txt);
+	               connection_get ('sid'),
+	               new_s,
+                       fct_s_term (),
+                       new_s), txt);
+
       fct_query_info_1 (tree, new_s, max_s, ctx, level, txt, cno);
+      http ('</li>\n', txt);
     }
   if ('value' = n)
     {
-      http (sprintf (' %s %s %V . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
-                     fct_var_tag (this_s, ctx),
-		     cast (xpath_eval ('./@op', tree) as varchar),
-		     fct_literal (tree),
-		     connection_get ('sid'),
-		     cno),
+      fct_li (sprintf (' %s %s %V . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
+                       fct_var_tag (this_s, ctx),
+		       cast (xpath_eval ('./@op', tree) as varchar),
+		       fct_literal (tree),
+		       connection_get ('sid'),
+		       cno),
+              txt);
+      cno := cno + 1;
+    }
+  if ('cond-parm' = n)
+    {
+      fct_li (sprintf ('%V',
+                       fct_literal (tree)),
+              txt);
+    }
+  if ('cond' = n)
+    {
+      declare cond_t, lang, dtp, neg, val any;
+      declare prop_qual varchar;
+
+      cond_t := xpath_eval ('./@type',  tree);
+      lang   := xpath_eval ('./@lang',    tree);
+      dtp    := xpath_eval ('./@datatype',tree);
+      val    := cast (xpath_eval ('.', tree) as varchar);
+
+      if (0 = xpath_eval ('count (./ancestor::*[name()=''property''])+ count(./ancestor::*[name()=''property-of''])', tree, 1))
+        prop_qual := ' (any property) ';
+      else
+        prop_qual := '';
+
+      fct_dbg_msg (sprintf ('fct_qry_info: cond: type:%s dtp:%s lang:%s val:%s',
+                            cast (cond_t as varchar),
+                            cast (dtp as varchar),
+                            cast (lang as varchar),
+                            val));
+
+      if (0 = lang) lang := '';
+      if (0 = dtp)  dtp  := '';
+
+      http ('<li>', txt);
+
+      if (cond_t = 'eq' or
+          cond_t = 'neq' or
+          cond_t = 'lt' or
+          cond_t = 'lte' or
+          cond_t = 'gt' or
+          cond_t = 'gte')
+        {
+ --val_fmt_enc (val, lang, dtp)),
+          http (sprintf ('%s %s%s %V',
+                          fct_var_tag (this_s, ctx),
+                          prop_qual,
+                          fct_cond_name (cond_t),
+	                  fct_literal (xpath_eval ('.', tree))),
+                txt);
+        }
+        else if ('contains' = cond_t)
+          {
+            http (sprintf (' %s %scontains "%s" .',
+                           fct_var_tag (this_s, ctx),
+                           prop_qual,
+                           val),
+                  txt);
+          }
+        else if ('in' = cond_t)
+          {
+            declare this_cno int;
+            this_cno := cno;
+            http (sprintf ('%s %sis IN: ', fct_var_tag (this_s, ctx), prop_qual), txt);
+            fct_query_info_1 (tree, this_s, max_s, level, ctx, txt, cno);
+            http (sprintf (' <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
+                           connection_get ('sid'),
+                           this_cno),
+                  txt);
+
+            http ('</li>\n', txt);
+            cno := cno + 1;
+            return;
+          }
+        else if ('near' = cond_t)
+          {
+            declare lat, lon float;
+            declare d integer;
+            declare prop varchar;
+            declare prop_info varchar;
+            declare acq_l integer;
+
+            lat   := xpath_eval ('./@lat', tree);
+            lon   := xpath_eval ('./@lon', tree);
+            d     := xpath_eval ('./@d', tree);
+            acq_l := xpath_eval ('./@acquire', tree);
+            prop  := xpath_eval ('./@location-prop', tree);
+
+            prop_info := '.';
+
+            if (prop <> '') {
+              prop_info := sprintf (' by %s property.', prop);
+            }
+
+            if (acq_l is not null and (length(lat) = 0 or length(lon) = 0))
+              {
+	          fct_dbg_msg ('Triggering autolocation');
+        	  http (sprintf ('<span class="acq_l_ind" id="acq_l_ind">Locating...</span><span class="acq_l_trig" id="acq_l_trig" style="display:none">%d</span>', cno), txt);
+              }
+
+            if (length(lat) and length(lon))
+              {
+                http (sprintf ('%s is within %s km radius of lat:<span class="loc_lat">%s</span>, lon:<span class="loc_lon">%s</span>%s',
+                               fct_var_tag(this_s, ctx),
+                               d,
+                               lat,
+                               lon,
+                               prop_info),
+                      txt);
+                if (acq_l is not null)
+                  http ('<span class="autoloc_ind">Location acquired.</span>', txt);
+              }
+          }
+      http (sprintf (' <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
+                      connection_get ('sid'),
+                      cno),
             txt);
+
+      http ('</li>\n', txt);
+      cno := cno + 1;
     }
-  if ('value-range' = n)
+  if ('cond-range' = n)
     {
-      declare hi, lo any;	
-      hi := xpath_eval ('./@hi', tree);
-      lo := xpath_eval ('./@lo', tree);
+      declare hi, lo, neg, cond_t any;
 
-      if (hi <> '' and lo <> '') {
---	http (sprintf (' %s is between <a class="edit_lo" href="#">%s</a> and <a href="edit_hi" href="#">%s</a> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>', 
+      cond_t := xpath_eval ('./@type', tree);
+      hi     := xpath_eval ('./@hi', tree);
+      lo     := xpath_eval ('./@lo', tree);
+      neg    := xpath_eval ('./@neg', tree);
 
-	http (sprintf (' %s is between <a class="edit_lo" href="#">%s</a> and <a href="edit_hi" href="#">%s</a> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>', 
-                       fct_var_tag (this_s, ctx), 
-                       cast (lo as varchar),
-                       cast (hi as varchar),
-		       connection_get ('sid'),
-                       cno),
-              txt);
-      }
-      else if (hi <> '') {
-       	http (sprintf (' %s <= <a class="edit_lo" href="#">%s</a> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>', 
-                       fct_var_tag (this_s, ctx), 
-                       cast (hi as varchar),
-		       connection_get ('sid'),
-                       cno),
-              txt);
-	
-      }
-      else if (lo <> '') {
-       	http (sprintf (' %s >= <a class="edit_lo" href="#">%s</a> . <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>', 
-                       fct_var_tag (this_s, ctx), 
-                       cast (lo as varchar),
-		       connection_get ('sid'),
-                       cno),
-              txt);
-      }
+      http ('<li>', txt);
+
+      if (neg = 'on' or 'neg_range' = cond_t)
+        neg := ' not ';
+      else
+        neg := '';
+
+      http (sprintf (' %s is %s between %V and %V .',
+                     fct_var_tag (this_s, ctx),
+                     neg,
+                     cast (lo as varchar),
+                     cast (hi as varchar)),
+                txt);
+
+      http (sprintf (' <a class="qry_nfo_cmd" href="/fct/facet.vsp?sid=%d&cmd=drop_cond&cno=%d">Drop</a>',
+                      connection_get ('sid'),
+                      cno),
+            txt);
+      http ('</li>\n', txt);
+      cno := cno + 1;
     }
-  if (ctx)
-    http ('<br/>', txt);
-  else
-    http ('\n', txt);
 }
 ;
 
 VHOST_REMOVE (lpath=>'/fct');
 VHOST_DEFINE (lpath=>'/fct',
-    	ppath=>case when registry_get('_fct_path_') = 0 then '/fct/' else registry_get('_fct_path_') end, 
+    	ppath=>case when registry_get('_fct_path_') = 0 then '/fct/' else registry_get('_fct_path_') end,
 	is_dav=>atoi (case when registry_get('_fct_dav_') = 0 then '0' else registry_get('_fct_dav_') end),
     	vsp_user=>'dba', def_page=>'facet.vsp');
 VHOST_REMOVE (lpath=>'/b3s');
 VHOST_DEFINE (lpath=>'/b3s',
-    	ppath=>case when registry_get('_fct_path_') = 0 then '/fct/' else registry_get('_fct_path_') end || 'www/', 
+    	ppath=>case when registry_get('_fct_path_') = 0 then '/fct/' else registry_get('_fct_path_') end || 'www/',
 	is_dav=>atoi (case when registry_get('_fct_dav_') = 0 then '0' else registry_get('_fct_dav_') end),
     	vsp_user=>'dba', def_page=>'listall.vsp');
 
@@ -372,8 +542,11 @@ fct_top (in tree any, in txt any)
   declare cno int;
   cno := 0;
 
-  fct_query_info (xpath_eval ('/query', tree), 1, max_s, 1, 1, txt, cno);
+  declare ctx int;
+  ctx := fct_view_pos (tree)+1;
+  fct_dbg_msg (sprintf ('fct_top: ctx: %d', ctx));
 
+  fct_query_info (xpath_eval ('/query', tree), 1, max_s, 1, ctx, txt, cno);
 }
 ;
 
@@ -382,6 +555,7 @@ fct_view_link (in tp varchar, in msg varchar, in txt any, in tip any := null)
 {
   if (tip is null)
     tip := msg;
+
   http (sprintf ('<li><a href="/fct/facet.vsp?cmd=set_view&sid=%d&type=%s&limit=20&offset=0" title="%V">%s</a></li>',
                  connection_get ('sid'), tp, tip, msg), txt);
 }
@@ -390,8 +564,8 @@ fct_view_link (in tp varchar, in msg varchar, in txt any, in tip any := null)
 create procedure
 fct_ft_a (in txt any)
 {
-  http(sprintf ('<li><form><label for="ft_q">Text</label><input type="hidden" name="cmd" value="text"/><input type="hidden" name="sid" value="%d"/><input type="text" name="q"/><input type="submit" value="Set"/></li>', 
-                 connection_get('sid')), 
+  http(sprintf ('<li><form><label for="ft_q">Text</label><input type="hidden" name="cmd" value="text"/><input type="hidden" name="sid" value="%d"/><input type="text" name="q"/><input type="submit" value="Set"/></li>',
+                 connection_get('sid')),
                  txt);
 }
 ;
@@ -436,41 +610,41 @@ fct_nav (in tree any,
     }
 
   if ('classes' <> tp)
-    if (connection_get('c_term') = 'class') 
+    if (connection_get('c_term') = 'class')
 	fct_view_link ('classes', 'Classes', txt);
-    else 
+    else
 	fct_view_link ('classes', 'Types', txt, 'Entity Category or Class');
 
   if ('properties' <> tp)
-    if (connection_get('s_term') = 's') 
+    if (connection_get('s_term') = 's')
       fct_view_link ('properties', 'Properties', txt, 'Entity Characteristic or Property');
     else
-    fct_view_link ('properties', 'Attributes', txt, 'Entity Characteristic or Property');
+      fct_view_link ('properties', 'Attributes', txt, 'Entity Characteristic or Property');
 
   if ('text' = tp and pos = 0)
     fct_view_link ('text-properties', 'Properties containing the text', txt);
 
   if ('properties-in' <> tp)
-    if (connection_get('s_term') = 's') 
+    if (connection_get('s_term') = 's')
       fct_view_link ('properties-in', 'Referencing Properties', txt, 'Characteristics or Properties with Entity References as values');
     else
-    fct_view_link ('properties-in', 'Referencing Attributes', txt, 'Characteristics or Properties with Entity References as values');
+      fct_view_link ('properties-in', 'Referencing Attributes', txt, 'Characteristics or Properties with Entity References as values');
 
   if ('text' <> tp and tp <> 'text-d')
     {
       if (tp <> 'list-count')
-	if (connection_get('s_term') = 's') 
+	if (connection_get('s_term') = 's')
 	  fct_view_link ('list-count', 'Distinct objects (Aggregated)', txt, 'Displaying List of Distinct Entity Names ordered by Count');
 	else
-	fct_view_link ('list-count', 'Distinct values (Aggregated)', txt, 'Displaying List of Distinct Entity Names ordered by Count');
+	  fct_view_link ('list-count', 'Distinct values (Aggregated)', txt, 'Displaying List of Distinct Entity Names ordered by Count');
       if (tp <> 'list')
-	if (connection_get('s_term') = 's') 
+	if (connection_get('s_term') = 's')
 	  fct_view_link ('list', 'Show Matching Objects', txt, 'Displaying Ranked Enitity Names and Text summaries');
 	else
-	fct_view_link ('list', 'Show Matching Values', txt, 'Displaying Ranked Enitity Names and Text summaries');
+	  fct_view_link ('list', 'Show Matching Values', txt, 'Displaying Ranked Enitity Names and Text summaries');
     }
 
-  if ('full-text' <> tp and not xpath_eval ('//query/text', tree)) 
+  if ('full-text' <> tp and not xpath_eval ('//query/text', tree))
     {
       fct_view_link ('full-text', 'Text', txt,'Add full-text constraint');
     }
@@ -480,8 +654,8 @@ fct_nav (in tree any,
       --fct_view_link ('geo', 'Map', txt);
       http (sprintf ('<li><a id="map_link" href="/fct/facet.vsp?cmd=set_view&sid=%d&type=%s&limit=20&offset=0" title="%V">%s</a> '||
 	    		'<select name="map_of" onchange="javascript:link_change(this.value)">'||
-	    		'<option value="">Shown items</option>'||
 	    		'<option value="any">Any location</option>'||
+	    		'<option value="">Shown items</option>'||
 	    		'<option value="dbpprop:location">dbpedia:location</option>'||
 	    		'<option value="dbpprop:place">dbpedia:place</option>'||
 	    		'<option value="foaf:based_near">foaf:based_near</option>'||
@@ -497,14 +671,14 @@ fct_nav (in tree any,
     }
 
   http ('</ul><ul class="n2">', txt);
-  http (sprintf ('<li><a href="/fct/facet.vsp?cmd=set_inf&sid=%d">Options</a></li>', 
-	connection_get ('sid')), txt);
-  http (sprintf ('<li><a href="/fct/facet.vsp?cmd=save_init&sid=%d">Save</a></li>', 
-	connection_get ('sid')), txt);
-  http (sprintf ('<li><a href="/fct/facet.vsp?cmd=featured&sid=%d">Featured Queries</a></li>', 
-	connection_get ('sid')), txt);
-  http (sprintf ('<li><a href="/fct/facet.vsp?sid=%d">New Search</a></li>', 
-	connection_get ('sid')), txt);
+  http (sprintf ('<li><a href="/fct/facet.vsp?cmd=set_inf&sid=%d">Options</a></li>',
+                 connection_get ('sid')), txt);
+  http (sprintf ('<li><a href="/fct/facet.vsp?cmd=save_init&sid=%d">Save</a></li>',
+                 connection_get ('sid')), txt);
+  http (sprintf ('<li><a href="/fct/facet.vsp?cmd=featured&sid=%d">Featured Queries</a></li>',
+                 connection_get ('sid')), txt);
+  http (sprintf ('<li><a href="/fct/facet.vsp?sid=%d">New Search</a></li>',
+                 connection_get ('sid')), txt);
   http ('</ul>', txt);
   http ('</div> <!-- #fct_nav -->', txt);
 }
@@ -513,11 +687,16 @@ fct_nav (in tree any,
 create procedure
 fct_view_type (in vt varchar)
 {
-  if (vt in ('properties', 'classes', 'properties-in', 'text-properties', 'list', 'list-count', 'propval-list'))
+  if (vt in ('properties',
+             'classes',
+             'properties-in',
+             'text-properties',
+             'list',
+             'list-count',
+             'propval-list',
+             'geo',
+             'geo-list'))
     return vt;
--- return 'properties';
-  if (vt = 'geo')
-    return 'geo';
 
   return 'default';
 }
@@ -526,6 +705,8 @@ fct_view_type (in vt varchar)
 create procedure
 fct_view_cmd (in tp varchar)
 {
+  fct_dbg_msg (sprintf ('fct_view_cmd: tp=%s', tp));
+
   if ('text-properties' = tp)
     return 'set_text_property';
 
@@ -541,7 +722,10 @@ fct_view_cmd (in tp varchar)
   if ('full-text' = tp)
     return 'set_text';
 
-  return 'select_value';
+  if ('list-count' = tp or 'geo-list' = tp)
+    return 'select_value';
+
+  return 'cond';
 }
 ;
 
@@ -560,6 +744,111 @@ fct_set_default_qry (inout tree any)
 ;
 
 create procedure
+fct_print_space_1 (inout ses any, in n int)
+{
+  for (declare i int, i := 0; i < n;  i := i + 1)
+    http (' ', ses);
+}
+;
+
+create procedure
+fct_pretty_sparql_1 (inout arr any, inout inx int, in len int, inout ses any, in lev int := 0)
+{
+  declare nbsp, was_open, was_close, num_open int;
+  nbsp := 0;
+  was_open := 0;
+  was_close := 0;
+  num_open := 0;
+  for (;inx < len; inx := inx + 1)
+    {
+      declare elm varchar;
+      elm := arr[inx];
+      if (elm = 'sparql')
+        goto skipit;
+
+      if (elm = '(')
+	num_open := num_open + 1;
+      if (elm = ')')
+	num_open := num_open - 1;
+
+      if (num_open = 0)
+        {
+	  if (elm = '{')
+	    {
+	      nbsp := nbsp + 2;
+	      http ('\n', ses);
+	      fct_print_space_1 (ses, nbsp);
+	      was_open := 1;
+	      was_close := 0;
+	    }
+	  else if (was_open = 1)
+	    {
+	      was_open := 0;
+	      was_close := 0;
+	      http ('\n', ses);
+	      fct_print_space_1 (ses, nbsp + 2);
+	    }
+	  else if (elm = '}')
+	    {
+	      if (not was_close)
+		{
+		  http ('\n', ses);
+		  fct_print_space_1 (ses, nbsp);
+		}
+	    }
+	  else
+	    was_close := 0;
+	}
+
+
+      http (elm, ses);
+
+      if (num_open = 0)
+        {
+	  if (elm = '}')
+	    {
+	      was_close := 1;
+	      nbsp := nbsp - 2;
+	      http ('\n', ses);
+	      fct_print_space_1 (ses, nbsp);
+	    }
+	  else if (elm = '.')
+	    {
+	      http ('\n', ses);
+	      fct_print_space_1 (ses, nbsp + 1);
+	    }
+	}
+
+      if (elm = 'sparql')
+	http ('\n');
+      http (' ', ses);
+      skipit:;
+    }
+}
+;
+
+create procedure
+fct_pretty_sparql (in q varchar, in lev int := 0)
+{
+  declare ses, arr any;
+  declare inx int;
+  ses := string_output ();
+  --q := sprintf ('%V', q);
+  q := replace (q, '\n', ' ');
+  q := replace (q, '}', ' } ');
+  q := replace (q, '{', ' { ');
+  q := replace (q, ')', ' ) ');
+  q := replace (q, '(', ' ( ');
+  q := regexp_replace (q, '\\s\\s+', ' ', 1, null);
+  arr := split_and_decode (q, 0, '\0\0 ');
+  inx := 0;
+  fct_pretty_sparql_1 (arr, inx, length (arr), ses, lev);
+  return string_output_string (ses);
+}
+;
+
+
+create procedure
 fct_web (in tree any)
 {
   declare sqls, msg, tp varchar;
@@ -567,10 +856,10 @@ fct_web (in tree any)
   declare reply, md, res, qr, qr2, txt any;
   declare p_qry varchar;
   declare timeout int;
- 
+
   timeout := connection_get ('timeout');
 
-  if (not isinteger(timeout)) 
+  if (not isinteger(timeout))
     timeout := atoi(timeout);
 
 --
@@ -578,13 +867,15 @@ fct_web (in tree any)
 --
 
   if (xpath_eval('/query/*[not(name()=''view'')]', tree) is null)
-    { 
+    {
       if (xpath_eval('/query/view[@type=''classes'']', tree) is null)
 	fct_set_default_qry (tree);
     }
 
   reply := fct_exec (tree, timeout);
+
   p_qry := fct_query (tree, 1); -- get "plain" query text
+  p_qry := fct_pretty_sparql (p_qry);
 
 --  dbg_obj_print (reply);
 
@@ -604,6 +895,29 @@ fct_web (in tree any)
 
   tp := cast (xpath_eval ('//view/@type', tree) as varchar);
 
+  declare p_ses, r_ses any;
+  declare p_xml varchar;
+  declare p_xml_tree any;
+
+  p_xml_tree := xslt (registry_get ('_fct_xslt_') || 'fct_strip_loc.xsl', tree, vector());
+
+  p_ses := string_output();
+  http_value (p_xml_tree, null, p_ses);
+
+  p_xml := cast (p_ses as varchar);
+
+  r_ses := string_output ();
+  http_value (reply, null, r_ses);
+
+  fct_dbg_msg (sprintf ('reply: %s', cast (r_ses as varchar)));
+
+  declare _addthis_key varchar;
+  _addthis_key := registry_get ('fct_addthis_key');
+  if (not isstring(_addthis_key)) _addthis_key := null;
+  if ('1' = _addthis_key) _addthis_key := 'xa-4ce13e0065cdadc0';
+
+  --dbg_printf('addthis_key: %s', _addthis_key);
+
   http_value (xslt (registry_get ('_fct_xslt_') || 'fct_vsp.xsl',
                     reply,
 		    vector ('sid',
@@ -613,19 +927,25 @@ fct_web (in tree any)
 			    'type',
 			    fct_view_type (tp),
 			    'timeout',
-			    _min (timeout*2, atoi (registry_get ('fct_timeout_max'))),
+			    __min (timeout*2, atoi (registry_get ('fct_timeout_max'))),
 			    'query',
 			    tree,
-			    's_term', 
+			    's_term',
 			    fct_s_term (),
-			    'p_term', 
+			    'p_term',
 			    fct_p_term (),
-			    'o_term', 
+			    'o_term',
 			    fct_o_term (),
-			    't_term', 
+			    't_term',
 			    fct_t_term (),
                             'p_qry',
-                            p_qry
+                            p_qry,
+                            'p_xml',
+                            p_xml,
+                            'addthis_key',
+                            _addthis_key,
+                            'tree',
+                            tree
 			    )),
 	      null, txt);
 
@@ -664,8 +984,10 @@ fct_set_text_property (in tree any, in sid int, in iri varchar)
   declare new_tree, txt any;
 
   txt := cast (xpath_eval ('//text', tree) as varchar);
-  new_tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_text.xsl', tree, vector ('text', txt, 'prop', iri));
-  new_tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl', new_tree, vector ('pos', 0, 'type', 'text-d', 'limit', 20, 'op', 'view'));
+  new_tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_text.xsl',
+                    tree, vector ('text', txt, 'prop', iri));
+  new_tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                    new_tree, vector ('pos', 0, 'type', 'text-d', 'limit', 20, 'op', 'view'));
 
   update fct_state set fct_state = new_tree where fct_sid = sid;
   commit work;
@@ -682,17 +1004,20 @@ fct_set_focus (in tree any, in sid int, in pos int)
 		vector ('pos', pos - 1, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
   update fct_state set fct_state = tree where fct_sid = sid;
   commit work;
+
   fct_web (tree);
 }
 ;
 
-create procedure 
+create procedure
 fct_drop (in tree any, in sid int, in pos int)
 {
-  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl', tree, vector ('pos', pos - 1, 'op', 'close'));
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree, vector ('pos', pos - 1, 'op', 'close'));
 
   if (xpath_eval ('//view', tree) is null)
-    tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl', tree, vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
+    tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                  tree, vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
 
   update fct_state set fct_state = tree where fct_sid = sid;
   commit work;
@@ -704,6 +1029,7 @@ fct_drop (in tree any, in sid int, in pos int)
 create procedure
 fct_drop_cond (in tree any, in sid int, in cno int)
 {
+  fct_dbg_msg (sprintf ('fct_drop_cond: cno: %d', cno));
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_drop_cond.xsl', tree, vector ('cno', cno));
 
   update fct_state set fct_state = tree where fct_sid = sid;
@@ -718,7 +1044,7 @@ fct_drop_text (in tree any, in sid int)
 {
   declare txt varchar;
   txt := xpath_eval ('//text', tree);
-  
+
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_drop_text.xsl', tree, vector ('text', txt, 'prop', 'none'));
 
   update fct_state set fct_state = tree where fct_sid = sid;
@@ -733,7 +1059,7 @@ fct_drop_text_prop (in tree any, in sid int)
 {
   declare txt varchar;
   txt := xpath_eval ('//text', tree);
-  
+
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_text.xsl', tree, vector ('text', txt, 'prop', 'none'));
 
   update fct_state set fct_state = tree where fct_sid = sid;
@@ -744,11 +1070,11 @@ fct_drop_text_prop (in tree any, in sid int)
 ;
 
 create procedure
-fct_set_view (in tree     any, 
-              in sid      int, 
-              in tp       varchar, 
-              in lim      int, 
-              in offs     int, 
+fct_set_view (in tree     any,
+              in sid      int,
+              in tp       varchar,
+              in lim      int,
+              in offs     int,
               in loc_prop varchar := null)
 {
 
@@ -782,52 +1108,92 @@ fct_set_view (in tree     any,
 ;
 
 create procedure
-fct_next (in tree any, in sid int)
+fct_next (in tree any, in sid int, in offset varchar, in limit varchar)
 {
   declare tp varchar;
   declare lim, offs int;
 
-  tp   := cast       (xpath_eval ('//view/@type',  tree) as varchar);
-  lim  := atoi (cast (xpath_eval ('//view/@limit', tree) as varchar));
-  offs := atoi (cast (xpath_eval ('//view/@offset',tree) as varchar));
+  tp := cast (xpath_eval ('//view/@type',  tree) as varchar);
+
+  if (isstring (limit) and limit <> '')
+    lim := atoi (limit);
+  else
+    lim  := atoi (cast (xpath_eval ('//view/@limit', tree) as varchar));
+
+  if (isstring (offset) and offset <> '')
+    offs := atoi (offset);
+  else
+    offs := atoi (cast (xpath_eval ('//view/@offset',tree) as varchar));
 
-  fct_set_view  (tree, sid, tp, lim, offs + 20);
+  fct_set_view  (tree, sid, tp, lim, offs + lim);
 }
 ;
 
 create procedure
-fct_prev (in tree any, in sid int)
+fct_prev (in tree any, in sid int, in offset varchar, in limit varchar)
 {
   declare tp varchar;
   declare lim, offs int;
 
-  tp   := cast       (xpath_eval ('//view/@type',  tree) as varchar);
-  lim  := atoi (cast (xpath_eval ('//view/@limit', tree) as varchar));
-  offs := atoi (cast (xpath_eval ('//view/@offset',tree) as varchar));
+  tp := cast (xpath_eval ('//view/@type',  tree) as varchar);
 
-  offs := offs - 20;
-  if (offs < 0) offs := 0;
+  if (isstring (limit) and limit <> '')
+    lim := atoi (limit);
+  else
+    lim := atoi (cast (xpath_eval ('//view/@limit', tree) as varchar));
+
+  if (isstring (offset) and offset <> '')
+    offs := atoi (offset);
+  else {
+    offs := atoi (cast (xpath_eval ('//view/@offset',tree) as varchar));
+    offs := offs - lim;
+    if (offs < 0) offs := 0;
+  }
+  fct_set_view  (tree, sid, tp, lim, offs);
+}
+;
+
+create procedure
+fct_go_to (in tree any, in sid int, in _offs varchar, in _lim varchar)
+{
+  declare tp varchar;
+  declare offs, lim int;
+
+  if (isstring (_offs) and _offs <> '')
+    offs := atoi (_offs);
+
+  if (isstring (_lim) and _lim <> '')
+    lim  := atoi (_lim);
+  else
+    lim := atoi (cast (xpath_eval ('//view/@limit', tree) as varchar));
+
+  if (offs is null) offs := 0;
+
+  fct_dbg_msg (sprintf ('fct_go_to offs: %d, lim: %d', offs, lim));
+
+  tp := cast (xpath_eval ('//view/@type',  tree) as varchar);
 
   fct_set_view  (tree, sid, tp, lim, offs);
 }
 ;
 
 create procedure
-fct_open_property  (in tree any, 
-                    in sid int, 
-                    in iri varchar, 
-                    in name varchar, 
+fct_open_property  (in tree any,
+                    in sid int,
+                    in iri varchar,
+                    in name varchar,
                     in exclude varchar := null)
 {
   declare pos int;
   pos := fct_view_pos (tree);
+
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
                 tree,
 		vector ('pos', pos,
 		        'op', 'prop',
 			'name', name,
 			'iri', iri,
-			'type', 'propval-list',
+			'type', 'list',
 			'limit', 20,
 			'offset', 0,
 			'exclude', exclude));
@@ -835,12 +1201,12 @@ fct_open_property  (in tree any,
   if (xpath_eval ('//view', tree) is null)
     {
 
-    tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl', tree, 
-                  vector ('pos', pos, 
-                  'op', 'view', 
-                  'type', 'properties', 
-                  'limit', 20, 
-                  'offset', 0));
+      tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl', tree,
+                    vector ('pos', pos,
+                    'op', 'view',
+                    'type', 'properties',
+                    'limit', 20,
+                    'offset', 0));
     }
 
   update fct_state
@@ -860,18 +1226,22 @@ fct_set_class (in tree any,
 {
   declare pos int;
 
-  pos := fct_view_pos (tree);
+  fct_dbg_msg (sprintf ('fct_set_class: sid: %d, iri: %s, pos: %d', sid, iri, pos));
 
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
                 tree,
-                vector ('pos'   , pos,
-		        'op'    , 'class',
-			'iri'   , iri,
-			'type'  , 'list',
-			'limit' , 20,
-			'offset', 0,
+                vector ('pos',     pos,
+		        'op',      'class',
+			'iri',     iri,
+			'type',    'list',
+			'limit',   20,
+			'offset',  0,
 			'exclude', exclude));
 
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
+
   update fct_state
     set fct_state = tree
     where fct_sid = sid;
@@ -895,11 +1265,11 @@ http ('
 	cnt := 0;
 	no_qry := http_param ('no_qry');
 
-        for (select fsq_id, 
-                    fsq_title, 
-                    fsq_expln 
-               from fct_stored_qry 
-               where fsq_featured is not null 
+        for (select fsq_id,
+                    fsq_title,
+                    fsq_expln
+               from fct_stored_qry
+               where fsq_featured is not null
                order by fsq_featured desc) do
           {
             cnt := cnt + 1;
@@ -910,7 +1280,7 @@ http ('
             </tr>
 ');
           }
-	if (0 = cnt) 
+	if (0 = cnt)
           {
 http ('
 	    <tr><td>There are currently no featured views.</td></td>
@@ -979,8 +1349,8 @@ function get_and_encode_query (q_elm)
 
   ctr := 0;
 
-  for select res_content, res_name, res_full_path 
-        from WS.WS.SYS_DAV_RES 
+  for select res_content, res_name, res_full_path
+        from WS.WS.SYS_DAV_RES
         where RES_FULL_PATH like demo_dav_path || '%.isparql' do
     {
 	ctr := ctr + 1;
@@ -993,14 +1363,14 @@ function get_and_encode_query (q_elm)
 
 http('</table>');
 
-  if (0 = ctr) 
+  if (0 = ctr)
     {
       http ('<p class="empty_indicator">There are currently no saved SPARQL queries.</p>');
     }
 http('
     </div> <!-- .fm_sect -->
     <a href="/fct/facet.vsp?cmd=refresh&sid='); http_value ( case when no_qry then 0 else sid end ); http ('">Go Back</a>
-    </div>
+  </div>
   </div> <!-- featured -->
 ');
 }
@@ -1036,15 +1406,15 @@ http ('
 ;
 
 create procedure
-fct_save (in tree xmltype, 
-          in sid int, 
-          in title varchar, 
+fct_save (in tree xmltype,
+          in sid int,
+          in title varchar,
           in _desc varchar)
 {
   declare _fsq_id int;
 
   _fsq_id := sequence_next ('fsq_seq');
-  
+
   insert into fct_stored_qry (fsq_id, fsq_title, fsq_expln, fsq_state)
     values (_fsq_id, title, _desc, tree);
 
@@ -1063,17 +1433,17 @@ fct_save (in tree xmltype,
 }
 ;
 
-create procedure 
+create procedure
 fct_load (in from_stored int)
 {
   declare sid int;
-  
+
   sid := sequence_next ('fct_seq');
   declare tree any;
 
   whenever not found goto no_ses;
 
-  select fsq_state 
+  select fsq_state
     into tree
     from fct_stored_qry
     where fsq_id = from_stored;
@@ -1089,14 +1459,32 @@ fct_load (in from_stored int)
 }
 ;
 
-create procedure 
-fct_create_ses () 
+create procedure
+fct_ses_from_xml (in xml_d varchar)
+{
+  declare tree any;
+  declare sid int;
+
+  sid := sequence_next ('fct_seq');
+
+  tree := xtree_doc (xml_d);
+
+  insert into fct_state (fct_sid, fct_state)
+         values (sid, tree);
+
+  return sid;
+}
+;
+
+create procedure
+fct_create_ses ()
 {
   declare sid int;
   declare new_tree any;
 
   sid := sequence_next ('fct_seq');
-  new_tree := xtree_doc('<query inference="" same-as="" view3="" s-term="" c-term=""/>');
+  new_tree := xtree_doc('<?xml version="1.0" encoding="UTF-8"?>\n' ||
+                        '<query inference="" same-as="" view3="" s-term="" c-term=""/>');
 
   insert into fct_state (fct_sid, fct_state)
          values (sid, new_tree);
@@ -1105,7 +1493,7 @@ fct_create_ses ()
 }
 ;
 
-create procedure 
+create procedure
 fct_new ()
 {
   declare sid int;
@@ -1115,8 +1503,8 @@ fct_new ()
 
   if (0 = sid)
     {
-      no_ses:
-      r_v := fct_create_ses (); 
+     no_ses:
+      r_v := fct_create_ses ();
       sid := r_v[0];
     }
   else
@@ -1147,8 +1535,8 @@ fct_new ()
   <div id="main_srch" style="display: none">
     <div id="TAB_ROW">
       <div class="tab" id="TAB_TXT">Text Search</div>
-      <div class="tab" id="TAB_URILBL">URI Lookup (by Label)</div>
-      <div class="tab" id="TAB_URI">URI Lookup</div>
+      <div class="tab" id="TAB_URILBL">Entity Label Lookup</div>
+      <div class="tab" id="TAB_URI">Entity URI Lookup</div>
       <div class="tab_act">
         <a href="/fct/facet.vsp?cmd=featured&sid='); http_value ( sid ); http ('&no_qry=1">Featured</a>
          | 
@@ -1158,8 +1546,8 @@ fct_new ()
          | 
         <a href="facet_doc.html">About</a>
         <!--span id="opensearch_container" style="display:none"> | 
-        <a href="" 
-           id="opensearch_link" 
+        <a href=""
+           id="opensearch_link"
            title="Install OpenSearch Plugin">Search from browser</a></span-->
       </div>
     </div> <!-- #TAB_ROW -->
@@ -1168,17 +1556,29 @@ fct_new ()
     <div id="TAB_PAGE_TXT" class="tab_page" style="display: none">
       <h2>Precision Search & Find</h2>
       <form method="post"
-            action="/fct/facet.vsp?cmd=text&sid='); 
-  http_value ( sid ); 
+            action="/fct/facet.vsp?cmd=text&sid=');
+  http_value ( sid );
   http ('" >
         <div id="new_srch">
           <label class="left_txt"
                  for="new_search_txt">Search Text</label>
-          <input id=  "new_search_txt" 
-                 size="60" 
-                 type="text" 
-                 name="q"/>
-          <input type=submit  value="Search"><br/>
+          <input id=  "new_search_txt"
+                 size="60"
+                 type="text"
+                 name="q"/>');
+if (isstring (http_param ('dbg')))
+  {
+    http('<input type="hidden" name="dbg" value="');
+    http_value (http_param('dbg'));
+    http ('">');
+  }
+if (isstring (http_param ('dbg_out')))
+  {
+    http('<input type="hidden" name="dbg_out" value="');
+    http_value (http_param('dbg_out'));
+    http ('">');
+  }
+  http('<input type=submit  value="Search"><br/>
         </div>
       </form>
     </div> <!-- #TAB_PAGE_TXT -->
@@ -1193,9 +1593,9 @@ fct_new ()
         <label class="left_txt"
                for=  "new_lbl_txt">Label</label>
 
-        <input id=  "new_lbl_txt" 
-               size="60" 
-               type="text" 
+        <input id=  "new_lbl_txt"
+               size="60"
+               type="text"
                autocomplete="off"/>
 
         <button id="new_lbl_btn">Describe</button><br/>
@@ -1218,9 +1618,9 @@ fct_new ()
         <label class="left_txt"
                for=  "new_uri_txt">URI</label>
 
-        <input id=  "new_uri_txt" 
-               size="60" 
-               type="text" 
+        <input id=  "new_uri_txt"
+               size="60"
+               type="text"
                autocomplete="off"/>
         <button id="new_uri_btn">Describe</button><br/>
       </div>
@@ -1245,7 +1645,6 @@ fct_set_inf (in tree any, in sid int)
   if (view3 = 0) view3 := '';
   tlogy := http_param ('tlogy');
 
-
   if (0 = sas or 0 = inf or 0 = tlogy)
     {
       declare selected_inf, selected_sas, selected_view3, sel_c_term, sel_s_term  varchar;
@@ -1268,17 +1667,17 @@ fct_set_inf (in tree any, in sid int)
                  <select name="inference">
 	           <option value="">none</option>
 	           '); for select RS_NAME from SYS_RDF_SCHEMA do { http ('
-		     <option value="'); http_value ( RS_NAME ); http ('" 
+		     <option value="'); http_value ( RS_NAME ); http ('"
 	                     '); http_value ( case when selected_inf = RS_NAME then 'selected' else '' end ); http ('>
                        '); http_value ( RS_NAME ); http ('
                      </option>
 		   '); } http ('
 	         </select>
                  <br>
-                 <input type="checkbox" 
-                        name="same-as" 
-                        value="yes" 
-                        id="same-as" '); http_value ( case when selected_sas = 'yes' then 'checked="true"' end  ); http ('> 
+                 <input type="checkbox"
+                        name="same-as"
+                        value="yes"
+                        id="same-as" '); http_value ( case when selected_sas = 'yes' then 'checked="true"' end  ); http ('>
                  <label class="rt_ckb" for="same-as">Same As</label><br>
                </div>
                <div class="fm_sect">
@@ -1288,11 +1687,11 @@ fct_set_inf (in tree any, in sid int)
 	           <option value="eav" '); http_value ( case when sel_s_term = 'e' then 'selected="true"' else '' end ); http ('>Entity-Attribute-Value</option>
 	           <option value="spo" '); http_value ( case when sel_s_term = 's' then 'selected="true"' else '' end ); http ('>Subject-Predicate-Object</option>
 	       	 </select><br/>
-<!--		 
-                 <input type="checkbox" 
-                        name="view3" 
-                        value="yes" 
-                        id="view3" '); http_value ( case when selected_view3 = 'yes' then 'checked="true"' end  ); http ('> 
+<!--
+                 <input type="checkbox"
+                        name="view3"
+                        value="yes"
+                        id="view3" '); http_value ( case when selected_view3 = 'yes' then 'checked="true"' end  ); http ('>
                  <label class="rt_ckb" for="view3">Show Values, Types, Properties simultaneously</label><br> -->
                </div>
 <!--               <div class="fm_sect">
@@ -1323,11 +1722,11 @@ fct_set_inf (in tree any, in sid int)
       s_term := case when 'eav' = tlogy then 'e' else 's' end;
 
       tree := XMLUpdate (tree,
-      	         '/query/@inference', inf,
-		         '/query/@same-as',   sas,
-		         '/query/@view3',     view3,
-			 '/query/@s-term',    s_term,
-			 '/query/@c-term',    c_term);
+                         '/query/@inference', inf,
+                         '/query/@same-as',   sas,
+                         '/query/@view3',     view3,
+                         '/query/@s-term',    s_term,
+                         '/query/@c-term',    c_term);
 
       connection_set ('c_term', c_term);
       connection_set ('s_term', s_term);
@@ -1402,25 +1801,28 @@ fct_select_value (in tree any,
 		  in val varchar,
 		  in lang varchar,
 		  in dtp varchar,
-		  in op varchar)
+		  in cond_t varchar)
 {
   declare pos int;
 
-  if (op is null or op = '' or op = 0)
-    op := '=';
+--  fct_dbg_msg (sprintf ('fct_select_value: val: %s, lang: %s, dtp: %s, op: %s',
+--              cast (val as varchar),
+--              cast (lang as varchar),
+--              cast (dtp as varchar),
+--              cast (cond_t as varchar)));
 
   pos := fct_view_pos (tree);
 
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
                 tree,
-		vector ('pos', pos, 'op', 'value', 'iri', val, 'lang', lang, 'datatype', dtp, 'cmp', op));
+		vector ('pos', pos, 'op', 'cond', 'val', val, 'lang', lang, 'datatype', dtp, 'cond_t', cond_t));
 
-  if (op = '=')
-    {
-    tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
-                  tree,
-		  vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
-    }
+--  if (cond_t = 'eq')
+--    {
+      tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                    tree,
+	            vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
+--    }
 
   update fct_state set fct_state = tree where fct_sid = sid;
 
@@ -1429,13 +1831,14 @@ fct_select_value (in tree any,
 }
 ;
 
-create procedure 
-fct_validate_xsd_float (in str varchar) {
+create procedure
+fct_validate_xsd_float (in str varchar)
+{
   declare ret varchar;
 
   ret := regexp_match ('^[-+]?([0-9]+(\.[0-9]*)?|\.[0-9]+)([eE][-+]?[0-9]+)$', str); -- simple case
 
-  if (ret is not null) 
+  if (ret is not null)
   {
     return ret;
   }
@@ -1445,19 +1848,20 @@ fct_validate_xsd_float (in str varchar) {
 }
 ;
 
-create procedure 
-fct_validate_xsd_decimal (in str varchar) { 
+create procedure
+fct_validate_xsd_decimal (in str varchar)
+{
   return regexp_match ('^"([^\\"]|\\.|[-+]?([0-9]+(\.[0-9]*)?|\.[0-9]+)?)"\\^\\^xsd\\:decimal',str);
 }
 ;
 
 create procedure
-fct_validate_xsd_int (in str varchar) 
+fct_validate_xsd_int (in str varchar)
 {
   declare ret varchar;
 
   ret := regexp_match ('^[-+]?[0-9]+$', str); -- simple integers
-  if (ret is not null) 
+  if (ret is not null)
   {
     return ret;
   }
@@ -1467,14 +1871,15 @@ fct_validate_xsd_int (in str varchar)
 }
 ;
 
-create procedure 
-fct_validate_xsd_date (in str varchar) {
+create procedure
+fct_validate_xsd_date (in str varchar)
+{
   return regexp_match ('^"-?[0-9][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9](Z|[-+]?[0-2][0-9]\\:[0-5][0-9])?"\\^\\^xsd\\:date$', str);
 }
 ;
 
 create procedure
-fct_validate_xsd_datetime (in str varchar) 
+fct_validate_xsd_datetime (in str varchar)
 {
   declare retval varchar;
 
@@ -1483,7 +1888,7 @@ fct_validate_xsd_datetime (in str varchar)
 }
 ;
 
-create procedure 
+create procedure
 fct_validate_xsd_str (in str varchar) {
   declare retval varchar;
 
@@ -1496,12 +1901,12 @@ fct_validate_xsd_str (in str varchar) {
 }
 ;
 
-create procedure 
-fct_validate_cond_input (in str varchar) 
+create procedure
+fct_validate_cond_input (in str varchar)
 {
   declare retval varchar;
 
-  retval := coalesce (fct_validate_xsd_int(str), 
+  retval := coalesce (fct_validate_xsd_int(str),
                       fct_validate_xsd_float (str),
                       fct_validate_xsd_decimal(str),
                       fct_validate_xsd_datetime(str),
@@ -1512,13 +1917,13 @@ fct_validate_cond_input (in str varchar)
 }
 ;
 
-create procedure 
+create procedure
 fct_validate_xsd_float (in str varchar) {
   declare ret varchar;
 
   ret := regexp_match ('^[-+]?([0-9]+(\.[0-9]*)?|\.[0-9]+)([eE][-+]?[0-9]+)$', str); -- simple case
 
-  if (ret is not null) 
+  if (ret is not null)
   {
     return ret;
   }
@@ -1528,19 +1933,19 @@ fct_validate_xsd_float (in str varchar) {
 }
 ;
 
-create procedure 
-fct_validate_xsd_decimal (in str varchar) { 
+create procedure
+fct_validate_xsd_decimal (in str varchar) {
   return regexp_match ('^"([^\\"]|\\.|[-+]?([0-9]+(\.[0-9]*)?|\.[0-9]+)?)"\\^\\^xsd\\:decimal',str);
 }
 ;
 
 create procedure
-fct_validate_xsd_int (in str varchar) 
+fct_validate_xsd_int (in str varchar)
 {
   declare ret varchar;
 
   ret := regexp_match ('^[-+]?[0-9]+$', str); -- simple integers
-  if (ret is not null) 
+  if (ret is not null)
   {
     return ret;
   }
@@ -1550,14 +1955,14 @@ fct_validate_xsd_int (in str varchar)
 }
 ;
 
-create procedure 
+create procedure
 fct_validate_xsd_date (in str varchar) {
   return regexp_match ('^"-?[0-9][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9](Z|[-+]?[0-2][0-9]\\:[0-5][0-9])?"\\^\\^xsd\\:date$', str);
 }
 ;
 
 create procedure
-fct_validate_xsd_datetime (in str varchar) 
+fct_validate_xsd_datetime (in str varchar)
 {
   declare retval varchar;
 
@@ -1566,7 +1971,7 @@ fct_validate_xsd_datetime (in str varchar)
 }
 ;
 
-create procedure 
+create procedure
 fct_validate_xsd_str (in str varchar) {
   declare retval varchar;
 
@@ -1579,12 +1984,12 @@ fct_validate_xsd_str (in str varchar) {
 }
 ;
 
-create procedure 
-fct_validate_cond_input (in str varchar) 
+create procedure
+fct_validate_cond_input (in str varchar)
 {
   declare retval varchar;
 
-  retval := coalesce (fct_validate_xsd_int(str), 
+  retval := coalesce (fct_validate_xsd_int(str),
                       fct_validate_xsd_float (str),
                       fct_validate_xsd_decimal(str),
                       fct_validate_xsd_datetime(str),
@@ -1595,22 +2000,25 @@ fct_validate_cond_input (in str varchar)
 }
 ;
 
-create procedure 
-fct_value_range (in tree any, 
-                 in sid int, 
-                 in lang varchar, 
-                 in dtp varchar,
-                 in lo varchar,
-                 in hi varchar)
+create procedure
+fct_set_cond_range (in tree any,
+                    in sid int,
+                    in lang varchar,
+                    in dtp varchar,
+                    in lo varchar,
+                    in hi varchar,
+                    in neg varchar)
 {
   declare pos int;
 
   pos := fct_view_pos (tree);
 
-  lo := fct_validate_cond_input (lo);
-  hi := fct_validate_cond_input (hi);
+--  lo := fct_validate_cond_input (lo);
+--  hi := fct_validate_cond_input (hi);
+
+--  fct_dbg_msg (sprintf ('fct_set_cond_range: %s, %s', lo, hi));
 
-  if (lo is null and hi is null) 
+  if (lo is null and hi is null)
   {
     fct_web (tree);
     return;
@@ -1619,7 +2027,13 @@ fct_value_range (in tree any,
   {
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
                 tree,
-		vector ('pos', pos, 'op', 'value-range', 'hi', hi, 'lo', lo, 'lang', lang, 'datatype', dtp));
+		vector ('pos', pos,
+                        'op', 'cond-range',
+                        'hi', hi,
+                        'lo', lo,
+                        'neg', neg,
+                        'lang', lang,
+                        'datatype', dtp));
 
   tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
                 tree,
@@ -1628,14 +2042,175 @@ fct_value_range (in tree any,
   update fct_state set fct_state = tree where fct_sid = sid;
 
   commit work;
-  } 
+  }
 
   fct_web (tree);
 }
 ;
 
+create procedure
+fct_set_cond (in tree any,
+              in sid int,
+              in cond_t varchar,
+              in lang varchar,
+              in dtp varchar,
+              in val varchar,
+              in neg varchar)
+{
+  declare pos int;
+
+  pos := fct_view_pos (tree);
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', pos,
+                        'op','cond',
+                        'cond_t', cond_t,
+                        'neg', neg,
+                        'val', val,
+                        'lang', lang,
+                        'datatype', dtp));
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
+
+  update fct_state set fct_state = tree where fct_sid = sid;
+
+  commit work;
+
+  fct_web (tree);
+}
+;
+
+create procedure
+fct_set_cond_in (in tree any,
+                 in sid int,
+                 in neg varchar,
+                 in parms varchar)
+{
+  if (0 = parms or '' = parms) {
+    fct_dbg_msg ('fct_set_cond_in: no params');
+    return;
+  }
 
-create procedure 
+  fct_dbg_msg (sprintf ('fct_set_cond_in: got params: %s', parms));
+
+  declare parm_tree any;
+  parm_tree := xtree_doc (parms);
+
+  declare pos int;
+  pos := fct_view_pos (tree);
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', pos,
+                        'op','cond',
+                        'cond_t', 'in',
+                        'neg', neg,
+                        'parms', parm_tree));
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', 0, 'op', 'view', 'type', 'list', 'limit', 20, 'offset', 0));
+
+  update fct_state set fct_state = tree where fct_sid = sid;
+
+  commit work;
+
+  fct_web (tree);
+}
+;
+
+create procedure
+fct_set_cond_near (in tree any,
+                   in sid int,
+                   in lat varchar,
+                   in lon varchar,
+                   in dist varchar,
+                   in acquire varchar,
+                   in prop varchar)
+{
+  fct_dbg_msg (sprintf ('fct_set_cond_near: lat:%s, lon:%s, d:%s, acquire:%s',
+                        cast (lat as varchar),
+                        cast (lon as varchar),
+                        dist,
+                        cast (acquire as varchar)));
+
+  declare pos int;
+  pos := fct_view_pos (tree);
+
+  declare acq varchar;
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', pos,
+                        'op','cond',
+                        'cond_t', 'near',
+                        'lat', lat,
+                        'lon', lon,
+                        'loc_acq', acquire,
+                        'd', dist));
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', 0,
+                        'op', 'view',
+                        'type', 'geo',
+                        'limit', 20,
+                        'offset', 0,
+                        'location-prop', prop));
+
+  update fct_state set fct_state = tree where fct_sid = sid;
+
+  commit work;
+
+  fct_web (tree);
+}
+;
+
+create procedure
+fct_set_loc (in tree any,
+             in sid int,
+             in cno int)
+{
+  declare lon, lat float;
+  declare acc int;
+
+  lon := http_param ('lon');
+  lat := http_param ('lat');
+
+  fct_dbg_msg (sprintf ('fct_set_loc: cno:%d, lon:%s, lat:%s', cno, lon, lat));
+
+  if (0 = lon or 0 = lat) {
+    http_request_status ('HTTP/1.1 400 Bad request');
+    http('FCT002: Missing location data\n');
+    return;
+  }
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_loc.xsl',
+                tree,
+                vector ('cno', cno,
+                        'lat', lat,
+                        'lon', lon));
+
+  tree := xslt (registry_get ('_fct_xslt_') || 'fct_set_view.xsl',
+                tree,
+                vector ('pos', 0,
+                        'op', 'view',
+                        'type', 'geo',
+                        'limit', 20,
+                        'offset', 0));
+
+  update fct_state set fct_state = tree where fct_sid = sid;
+
+  commit work;
+
+  fct_web (tree);
+}
+;
+
+create procedure
 fct_gen_opensearch_link ()
 {
   declare uriqa_str varchar;
@@ -1662,13 +2237,15 @@ fct_vsp ()
   declare sid, start_time int;
   declare _to int;
   declare s_for varchar;
+  declare xml_d varchar;
 
   cmd := http_param ('cmd');
   s_for := http_param ('q');
+  xml_d := http_param ('qxml');
 
   if (s_for = 0 or trim (s_for) = '') s_for := null;
 
-  if (0 = cmd and s_for is null)
+  if (0 = cmd and s_for is null and 0 = xml_d)
     {
       fct_new ();
       return;
@@ -1676,32 +2253,51 @@ fct_vsp ()
 
   sid := http_param ('sid');
 
-  if (0 <> sid) { sid := atoi (sid); }
+  if (0 <> sid) {
+    sid := atoi (sid);
+  }
+  else {
+    fct_dbg_msg ('fct_vsp: looking for xml');
+    declare xml_d varchar;
+    declare r_v any;
+
+    xml_d := http_param ('qxml');
+    fct_dbg_msg (sprintf ('fct_vsp: got %s', cast (xml_d as varchar)));
+
+    if (0 <> xml_d) {
+      sid := fct_ses_from_xml (xml_d);
+      cmd := 'refresh';
+    }
+  }
 
   _to := http_param ('timeout');
 
   if (_to = 0) _to := atoi (registry_get ('fct_timeout_min'));
-  else _to := _min (atoi (registry_get ('fct_timeout_max')), atoi(_to));
+  else _to := __min (atoi (registry_get ('fct_timeout_max')), atoi(_to));
 
   connection_set ('timeout', _to);
 
   whenever not found goto no_ses;
 
+  fct_dbg_msg ('fct_vsp: select on sid');
+
   select fct_state into tree from fct_state where fct_sid = sid;
+  fct_dbg_msg ('fct_vsp: got ses');
   goto exec;
 
-  no_ses:
+ no_ses:
+  fct_dbg_msg ('fct_vsp: no ses found');
   declare r_v any;
 
-  if (s_for is not null) 
+  if (s_for is not null)
     {
       r_v := fct_create_ses();
       sid := r_v[0];
       tree := r_v[1];
 
-    cmd := 'text';
+      cmd := 'text';
     }
-  else if ('new_with_class' = cmd) 
+  else if ('new_with_class' = cmd)
     {
       r_v := fct_create_ses();
       sid := r_v[0];
@@ -1711,7 +2307,7 @@ fct_vsp ()
   else
     goto do_new_ses;
 
-exec:;  
+exec:;
   declare s_term varchar;
 
   connection_set ('sid', sid);
@@ -1725,12 +2321,16 @@ exec:;
   if ('' = c_term) c_term := 'class';
   connection_set ('c_term', c_term);
 
-  insert into fct_log (fl_sid, fl_cli_ip, fl_where, fl_state, fl_cmd)
+  if (registry_get ('fct_log_enable') = 1)
+    insert into fct_log (fl_sid, fl_cli_ip, fl_where, fl_state, fl_cmd)
          values (sid, http_client_ip(), 'DISPATCH', tree, cmd);
+
   commit work;
 
   start_time := msec_time ();
 
+  fct_dbg_msg (sprintf ('fct_vsp: cmd: %s, sid: %d', cmd, sid));
+
   if ('text' = cmd)
     {
       if (s_for is null)
@@ -1751,9 +2351,11 @@ exec:;
 		  atoi (http_param ('offset')),
 		  http_param ('location-prop'));
   else if ('next' = cmd)
-    fct_next (tree, sid);
+    fct_next (tree, sid, http_param ('offset'), http_param ('limit'));
   else if ('prev' = cmd)
-    fct_prev (tree, sid);
+    fct_prev (tree, sid, http_param ('offset'), http_param ('limit'));
+  else if ('go_to' = cmd)
+    fct_go_to (tree, sid, http_param ('offset'), http_param ('limit'));
   else if ('set_text_property' = cmd)
     fct_set_text_property (tree, sid, http_param ('iri'));
   else if ('open_property' = cmd)
@@ -1764,7 +2366,7 @@ exec:;
     fct_drop (tree, sid, atoi (http_param ('n')));
   else if ('drop_cond' = cmd)
     fct_drop_cond (tree, sid, atoi (http_param ('cno')));
-  else if ('drop_text_prop' = cmd) 
+  else if ('drop_text_prop' = cmd)
     fct_drop_text_prop (tree, sid);
   else if ('drop_text' = cmd)
     fct_drop_text (tree, sid);
@@ -1783,22 +2385,77 @@ exec:;
     }
   else if ('set_inf' = cmd)
     fct_set_inf (tree, sid);
-  else if ('select_value' = cmd)
+  else if ('select_value' = cmd) {
     fct_select_value (tree,
     		      sid,
 		      http_param ('iri'),
 		      http_param ('lang'),
 		      http_param ('datatype'),
 		      http_param ('op'));
-  else if ('value_range' = cmd)
-    fct_value_range (tree, 
-                     sid, 
-                     http_param('lang'),
-                     http_param('datatype'),
-                     http_param('lo'),
-                     http_param('hi'));
+    fct_dbg_msg (sprintf ('select_value: iri=%s, val=%s',
+                          cast (http_param('iri') as varchar),
+                          cast (http_param('val') as varchar)));
+  }
+  else if ('cond' = cmd) {
+    declare cond_t varchar;
+    cond_t := http_param ('cond_t');
+
+    if ('range' = cond_t) {
+      fct_set_cond_range (tree,
+                          sid,
+                          http_param('lang'),
+                          http_param('datatype'),
+                          http_param('lo'),
+                          http_param('hi'),
+                          '');
+      fct_dbg_msg (sprintf ('range: %s-%s', http_param('lo'), http_param('hi')));
+    } else if ('neg_range' = cond_t) {
+      fct_set_cond_range (tree,
+                          sid,
+                          http_param('lang'),
+                          http_param('datatype'),
+                          http_param('lo'),
+                          http_param('hi'),
+                          'on');
+      fct_dbg_msg (sprintf ('neg-range: %s-%s', http_param('lo'), http_param('hi')));
+    } else if ('in' = cond_t) {
+      fct_set_cond_in (tree,
+                       sid,
+                       http_param('neg'),
+                       http_param('cond_parms'));
+    } else if ('near' = cond_t) {
+      declare i_lat, i_lon, i_loc_trig_sel varchar;
+
+      i_lat := http_param ('lat');
+      i_lon := http_param ('lon');
+      i_loc_trig_sel := http_param ('loc_trig_sel');
+
+      if (i_lat = 0) i_lat := null;
+      if (i_lon = 0) i_lon := null;
+      if (i_loc_trig_sel = 0) i_loc_trig_sel := null;
+
+      fct_set_cond_near (tree,
+                         sid,
+                         i_lat,
+                         i_lon,
+                         http_param ('dist'),
+                         i_loc_trig_sel,
+                         http_param ('location-prop'));
+    } else {
+      declare iri,val any;
+      fct_set_cond (tree,
+                    sid,
+                    cond_t,
+                    http_param('lang'),
+                    http_param('datatype'),
+                    http_param('val'),
+                    '');
+--      fct_dbg_msg (sprintf ('set_cond: val=%s, cond_t=%s',
+--                  cast (http_param('val') as varchar), cast (http_param('cond_t') as varchar)));
+    }
+  }
   else if ('save' = cmd)
-    fct_save (tree, 
+    fct_save (tree,
 	      sid,
               http_param ('title'),
               http_param ('desc'));
@@ -1806,23 +2463,27 @@ exec:;
     fct_save_init (tree, sid);
   else if ('featured' = cmd)
     fct_featured (tree, sid);
+  else if ('set_loc' = cmd)
+    fct_set_loc (tree, sid, cast (http_param('cno') as int));
   else
     {
-      http ('Unrecognized command');
-      return;
+      http_request_status ('HTTP/1.1 400 Bad request');
+      http ('FCT001: Unrecognized command\n');
     }
 
   declare _state any;
 
   select fct_state into _state from fct_state where fct_sid = sid;
 
-  insert into fct_log (fl_sid, fl_cli_ip, fl_where, fl_state, fl_cmd, fl_msec)
+  if (registry_get ('fct_log_enable') = 1)
+    insert into fct_log (fl_sid, fl_cli_ip, fl_where, fl_state, fl_cmd, fl_msec)
          values (sid, http_client_ip(), 'RETURN', _state, cmd, msec_time () - start_time);
+
   commit work;
 
   return;
 
-  do_new_ses:
+ do_new_ses:
   http (sprintf ('<div class="ses_info">Session id %d lost. New search started</div>', sid));
   fct_new ();
 }
@@ -1830,12 +2491,12 @@ exec:;
 
 create procedure fct_virt_info ()
 {
-  http ('<a href="http://www.openlinksw.com/virtuoso/">OpenLink Virtuoso</a> version '); 
-  http (sys_stat ('st_dbms_ver')); 
+  http ('<a href="http://www.openlinksw.com/virtuoso/">OpenLink Virtuoso</a> version ');
+  http (sys_stat ('st_dbms_ver'));
   http (', on ');
-  http (sys_stat ('st_build_opsys_id')); http (sprintf (' (%s), ', host_id ())); 
+  http (sys_stat ('st_build_opsys_id')); http (sprintf (' (%s), ', host_id ()));
   http (case when sys_stat ('cl_run_local_only') = 1 then 'Standard Edition' else 'Cluster Edition' end);
-  http (case when sys_stat ('cl_run_local_only') = 0 then sprintf ('(%d server processes)', sys_stat ('cl_n_hosts')) else '' end); 
+  http (case when sys_stat ('cl_run_local_only') = 0 then sprintf ('(%d server processes)', sys_stat ('cl_n_hosts')) else '' end);
 }
 ;
 
@@ -1852,10 +2513,28 @@ create procedure fct_page_head ()
     <div id="homelink"></div>
   </div> <!-- hd_l -->
   <div id="hd_r">
-    <a href="http://data.openlinksw.com/about/html/http://data.openlinksw.com/oplweb/product_family/virtuoso"
-    title="OpenLink Virtuoso">
-    <img class="powered_by" src="/fct/images/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/>
-    </a>
+    <div class="addthis_toolbox addthis_default_style">
+      <a class="addthis_button_compact"></a>
+      <a class="addthis_button_preferred_1"></a>
+      <a class="addthis_button_preferred_2"></a>
+      <a class="addthis_button_preferred_3"></a>
+      <a class="addthis_button_preferred_4"></a>
+      <a class="addthis_button_google_plusone"></a>
+    </div>
   </div> <!-- hd_r -->');
 }
 ;
+
+create procedure fct_desc_page_head ()
+{
+  http ('<div id="hd_l">
+    <h1 id="logo">
+        <a href="/fct/facet.vsp">
+	   <img src="/fct/images/openlink_site_logo.png" alt="OpenLink Software"/>
+        </a>
+    </h1>
+    <div id="homelink"></div>
+  </div> <!-- hd_l -->
+  <div id="hd_r"></div> <!-- hd_r -->');
+}
+;
diff --git a/binsrc/b3s/fct_drop_cond.xsl b/binsrc/b3s/fct_drop_cond.xsl
index 8e1f6b1..1962f55 100644
--- a/binsrc/b3s/fct_drop_cond.xsl
+++ b/binsrc/b3s/fct_drop_cond.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_drop_cond.xsl,v 1.1.2.2 2010/10/06 21:39:50 source Exp $
+--  $Id: fct_drop_cond.xsl,v 1.1.2.5 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,34 +22,29 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 -->
-<xsl:stylesheet version="1.0" 
+<xsl:stylesheet version="1.0"
 		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-<xsl:param name="pos"/>
-<xsl:param name="op"/>
-<xsl:param name="type"/>
-<xsl:param name="limit"/>
-<xsl:param name="offset"/>
-<xsl:param name="iri"/>
-<xsl:param name="name"/>
-<xsl:param name="timeout"/>
 <xsl:param name="cno"/>
 
-
-<xsl:template match = "class | value | value-range">
-
-  <xsl:if test="$cno != count (./ancestor::*[name () = 'class' or
-	                                     name () = 'value' or
-                                             name () = 'value-range']) +
-                      count (./preceding::*[name () = 'class' or 
-                                            name () = 'value' or
-                                            name () = 'value-range'])">
+<xsl:template match="class | value | value-range | cond-range | cond">
+  <xsl:if test="$cno != (count (./ancestor::*[name () = 'class' or
+                                             name () = 'value' or
+                                             name () = 'value-range' or
+                                             name () = 'cond-range' or
+                                             name () = 'cond']) +
+                         count (./ancestor-or-self::*/preceding-sibling::*/descendant-or-self::*[name () = 'class' or
+                                              name () = 'value' or
+                                              name () = 'value-range' or
+                                              name () = 'cond-range' or
+                                              name () = 'cond']))">
     <xsl:copy>
       <xsl:apply-templates select="@* | node()"/>
     </xsl:copy>
   </xsl:if>
+
 </xsl:template>
- 
+
 <xsl:template match="@* | node()">
   <xsl:copy>
     <xsl:apply-templates select="@* | node()"/>
diff --git a/binsrc/b3s/fct_drop_text.xsl b/binsrc/b3s/fct_drop_text.xsl
index 5603c97..5b0988b 100644
--- a/binsrc/b3s/fct_drop_text.xsl
+++ b/binsrc/b3s/fct_drop_text.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_drop_text.xsl,v 1.1.2.1 2010/12/12 18:09:27 source Exp $
+--  $Id: fct_drop_text.xsl,v 1.1.2.3 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 -->
-<xsl:stylesheet version="1.0" 
+<xsl:stylesheet version="1.0"
 		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:template match="text">
diff --git a/binsrc/b3s/fct_inx.sql b/binsrc/b3s/fct_inx.sql
index c0cdd90..d96fdaf 100644
--- a/binsrc/b3s/fct_inx.sql
+++ b/binsrc/b3s/fct_inx.sql
@@ -1,12 +1,12 @@
 --
---  $Id: fct_inx.sql,v 1.1.2.1 2009/05/08 11:18:40 source Exp $
+--  $Id: fct_inx.sql,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  Alternate RDF index scheme for cases where G unspecified
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/fct_req.xsl b/binsrc/b3s/fct_req.xsl
index 44fcfc8..00fe3be 100644
--- a/binsrc/b3s/fct_req.xsl
+++ b/binsrc/b3s/fct_req.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_req.xsl,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: fct_req.xsl,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/fct_resp.xsl b/binsrc/b3s/fct_resp.xsl
index bae6962..a2fa0cd 100644
--- a/binsrc/b3s/fct_resp.xsl
+++ b/binsrc/b3s/fct_resp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_resp.xsl,v 1.1.2.2 2009/05/01 19:39:36 source Exp $
+--  $Id: fct_resp.xsl,v 1.1.2.3 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/fct_set_default.xsl b/binsrc/b3s/fct_set_default.xsl
index d5aa92a..30a33fe 100644
--- a/binsrc/b3s/fct_set_default.xsl
+++ b/binsrc/b3s/fct_set_default.xsl
@@ -1,25 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- -  
+ -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
- -  
- -  Copyright (C) 1998-2009 OpenLink Software
- -  
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
  -  This project 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; only version 2 of the License, dated June 1991.
- -  
+ -
  -  This program 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
  -  General Public License for more details.
- -  
+ -
  -  You should have received a copy of the GNU General Public License along
  -  with this program; if not, write to the Free Software Foundation, Inc.,
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- -  
- -  
+ -
+ -
 -->
 <xsl:stylesheet version="1.0"
 		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
diff --git a/binsrc/b3s/fct_set_loc.xsl b/binsrc/b3s/fct_set_loc.xsl
new file mode 100644
index 0000000..89c6466
--- /dev/null
+++ b/binsrc/b3s/fct_set_loc.xsl
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+--
+--  $Id: fct_set_loc.xsl,v 1.1.2.2 2012/03/05 17:38:05 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+-->
+<xsl:stylesheet version="1.0"
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:param name="cno"/>
+<xsl:param name="lat"/>
+<xsl:param name="lon"/>
+
+<xsl:template match="cond[@type = 'near']">
+  <xsl:choose>
+    <xsl:when test="$cno != (count (./ancestor::*[name () = 'class' or
+                                                  name () = 'value' or
+                                                  name () = 'value-range' or
+                                                  name () = 'cond-range' or
+                                                  name () = 'cond']) +
+                             count (./ancestor-or-self::*/preceding-sibling::*/descendant-or-self::*[name () = 'class' or
+                                              name () = 'value' or
+                                              name () = 'value-range' or
+                                              name () = 'cond-range' or
+                                              name () = 'cond']))">
+      <xsl:copy>
+        <xsl:apply-templates select="@* | node()"/>
+      </xsl:copy>
+    </xsl:when>
+    <xsl:otherwise>
+      <cond type="near">
+        <xsl:attribute name="neg">
+          <xsl:value-of select="./@neg"/>
+        </xsl:attribute>
+        <xsl:attribute name="location-prop">
+          <xsl:value-of select="./@location-prop"/>
+        </xsl:attribute>
+        <xsl:attribute name="d">
+          <xsl:value-of select="./@d"/>
+        </xsl:attribute>
+        <xsl:attribute name="acquire">
+          <xsl:value-of select="./@acquire"/>
+        </xsl:attribute>
+        <xsl:attribute name="lat"><xsl:value-of select="$lat"/></xsl:attribute>
+        <xsl:attribute name="lon"><xsl:value-of select="$lon"/></xsl:attribute>
+      </cond>
+      <xsl:apply-templates select="@* | node()"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="@* | node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@* | node()"/>
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/binsrc/b3s/fct_set_text.xsl b/binsrc/b3s/fct_set_text.xsl
index e246249..1799d21 100644
--- a/binsrc/b3s/fct_set_text.xsl
+++ b/binsrc/b3s/fct_set_text.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_set_text.xsl,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: fct_set_text.xsl,v 1.1.2.3 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -46,7 +46,7 @@
 
 <xsl:template match="text">
 </xsl:template>
- 
+
 <xsl:template match="@* | node()">
   <xsl:copy>
     <xsl:apply-templates select="@* | node()"/>
diff --git a/binsrc/b3s/fct_set_view.xsl b/binsrc/b3s/fct_set_view.xsl
index 7ffaac3..6564ef8 100644
--- a/binsrc/b3s/fct_set_view.xsl
+++ b/binsrc/b3s/fct_set_view.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_set_view.xsl,v 1.1.2.6 2010/10/22 21:12:24 source Exp $
+--  $Id: fct_set_view.xsl,v 1.1.2.11 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -34,132 +34,181 @@
 <xsl:param name="name"/>
 <xsl:param name="timeout"/>
 <xsl:param name="location-prop"/>
+<xsl:param name="dtp"/>
+<xsl:param name="cond_t"/>
 <xsl:param name="lo"/>
 <xsl:param name="hi"/>
+<xsl:param name="neg"/>
+<xsl:param name="lang"/>
+<xsl:param name="val"/>
+<xsl:param name="lat"/>
+<xsl:param name="lon"/>
+<xsl:param name="d"/>
+<xsl:param name="loc_acq"/>
 
-<xsl:template match = "query | property |property-of">
+<xsl:template match = "query | property | property-of">
 
-<xsl:if test="not ($op = 'close') or
-	      not ($pos = count (./ancestor::*[name () = 'query' or
-	                                       name () = 'property' or
-					       name () = 'property-of']) +
-			  count (./preceding::*[name () = 'query' or
-			                        name () = 'property' or
-						name () = 'property-of']))">
-  <xsl:copy>
-    <xsl:apply-templates select="@* | node()" />
-
-    <xsl:if test="$op = 'view' and
-		  $pos = count (./ancestor::*[name () = 'query' or
-		                              name () = 'property' or
-					      name () = 'property-of']) +
-			 count (./preceding::*[name () = 'query' or
-			                       name () = 'property' or
-					       name () = 'property-of'])">
-      <xsl:element name="view">
-        <xsl:attribute name="type">
-          <xsl:choose>
-            <xsl:when test="'list' = $type and ./text">text-d</xsl:when>
-            <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-        <xsl:attribute name="limit"> <xsl:value-of select="$limit"/></xsl:attribute>
-	<xsl:attribute name="offset"> <xsl:value-of select="$offset"/></xsl:attribute>
-	<xsl:if test="$location-prop">
-	    <xsl:attribute name="location-prop"> 
-	        <xsl:value-of select="$location-prop"/>
+  <xsl:if test="not ($op = 'close') or
+	        not ($pos = count (./ancestor::*[name () = 'query' or
+	                                         name () = 'property' or
+			                         name () = 'property-of']) +
+			    count (./preceding::*[name () = 'query' or
+			                          name () = 'property' or
+						  name () = 'property-of']))">
+    <xsl:copy>
+      <xsl:apply-templates select="@* | node()" />
+
+      <xsl:if test="$op = 'view' and
+	            $pos = count (./ancestor::*[name () = 'query' or
+		                                name () = 'property' or
+			                        name () = 'property-of']) +
+			   count (./preceding::*[name () = 'query' or
+			                         name () = 'property' or
+					         name () = 'property-of'])">
+        <xsl:element name="view">
+          <xsl:attribute name="type">
+            <xsl:choose>
+              <xsl:when test="'list' = $type and ./text">text-d</xsl:when>
+              <xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
+            </xsl:choose>
+          </xsl:attribute>
+          <xsl:attribute name="limit"><xsl:value-of select="$limit"/></xsl:attribute>
+	  <xsl:attribute name="offset"><xsl:value-of select="$offset"/></xsl:attribute>
+	  <xsl:if test="$location-prop">
+	    <xsl:attribute name="location-prop">
+	      <xsl:value-of select="$location-prop"/>
             </xsl:attribute>
-	</xsl:if>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:if test="$op = 'prop' and
-		  $pos = count (./ancestor::*[name () = 'query' or
-		                              name () = 'property' or
-					      name () = 'property-of']) +
-                         count (./preceding::*[name () = 'query' or
-			                       name () = 'property' or
-					       name () = 'property-of'])">
-      <xsl:element name="{$name}">
-	<xsl:attribute name="iri">
-	  <xsl:value-of select="$iri"/>
-	</xsl:attribute>
-	<xsl:if test="$exclude = 'yes'">
+	  </xsl:if>
+        </xsl:element>
+      </xsl:if>
+
+      <xsl:if test="$op = 'prop' and
+                    $pos = count (./ancestor::*[name () = 'query' or
+		                                name () = 'property' or
+			                        name () = 'property-of']) +
+                           count (./preceding::*[name () = 'query' or
+			                         name () = 'property' or
+				                 name () = 'property-of'])">
+        <xsl:element name="{$name}">
+	  <xsl:attribute name="iri">
+	    <xsl:value-of select="$iri"/>
+	  </xsl:attribute>
+	  <xsl:if test="$exclude = 'yes'">
 	    <xsl:attribute name="exclude">yes</xsl:attribute>
-	</xsl:if>
-	<xsl:element name="view">
-	  <xsl:attribute name="type"> <xsl:value-of select="$type"/></xsl:attribute>
-	  <xsl:attribute name="limit"> <xsl:value-of select="$limit"/></xsl:attribute>
-	  <xsl:attribute name="offset"> <xsl:value-of select="$offset"/></xsl:attribute>
-	</xsl:element>
-      </xsl:element>
-    </xsl:if>
-
-    <xsl:choose>
-      <xsl:when test="$op = 'class' and
-		      $pos = count (./ancestor::*[name () = 'query' or
-		                                  name () = 'property' or
-			                          name () = 'property-of']) +
-			     count (./preceding::*[name () = 'query' or
-			                           name () = 'property' or
-					           name () = 'property-of'])">
-        <class iri="{$iri}">
+	  </xsl:if>
+	  <xsl:element name="view">
+	    <xsl:attribute name="type"><xsl:value-of select="$type"/></xsl:attribute>
+	    <xsl:attribute name="limit"><xsl:value-of select="$limit"/></xsl:attribute>
+	    <xsl:attribute name="offset"><xsl:value-of select="$offset"/></xsl:attribute>
+	  </xsl:element>
+        </xsl:element>
+      </xsl:if>
+
+      <xsl:choose>
+
+        <xsl:when test="$op = 'class' and
+	                $pos = count (./ancestor::*[name () = 'query' or
+		                                    name () = 'property' or
+			                            name () = 'property-of']) +
+			       count (./preceding::*[name () = 'query' or
+			                             name () = 'property' or
+				                     name () = 'property-of'])">
+          <class iri="{$iri}">
 	    <xsl:if test="$exclude = 'yes'">
-		<xsl:attribute name="exclude">yes</xsl:attribute>
+	      <xsl:attribute name="exclude">yes</xsl:attribute>
 	    </xsl:if>
-	</class>
-      </xsl:when>
+	  </class>
+        </xsl:when>
 
-      <xsl:when test="$op = 'class'">
-        <class iri="{$iri}"/>
-        <xsl:element name="view">
+        <!-- xsl:when test="$op = 'class'">
+          <class iri="{$iri}"/>
+          <xsl:element name="view">
             <xsl:attribute name="type">list</xsl:attribute>
-	  <xsl:attribute name="limit"> <xsl:value-of select="$limit"/></xsl:attribute>
-	  <xsl:attribute name="offset"> <xsl:value-of select="$offset"/></xsl:attribute>
-	</xsl:element>
-      </xsl:when>
-    </xsl:choose>
-    
-
-    <xsl:if test="$op = 'value' and
-		  $pos = count (./ancestor::*[name () = 'query' or
-		                              name () = 'property' or
-					      name () = 'property-of']) +
-		         count (./preceding::*[name () = 'query' or
-			                       name () = 'property' or
-					       name () = 'property-of'])">
-      <value xml:lang="{$lang}"
-	     datatype="{$datatype}"
-	     op="{$cmp}">
-        <xsl:value-of select="$iri"/>
-      </value>
-    </xsl:if>
-
-      <xsl:if test="$op = 'value-range' and
+	    <xsl:attribute name="limit"><xsl:value-of select="$limit"/></xsl:attribute>
+	    <xsl:attribute name="offset"><xsl:value-of select="$offset"/></xsl:attribute>
+	  </xsl:element>
+        </xsl:when -->
+      </xsl:choose>
+
+      <xsl:if test="$op = 'value' and
 	            $pos = count (./ancestor::*[name () = 'query' or
 		                                name () = 'property' or
 			                        name () = 'property-of']) +
                            count (./preceding::*[name () = 'query' or
 			                         name () = 'property' or
 				                 name () = 'property-of'])">
-        <value-range xml:lang="{$lang}"
+        <value xml:lang="{$lang}"
+	       datatype="{$datatype}"
+               op="{$cmp}">
+          <xsl:value-of select="$val"/>
+        </value>
+      </xsl:if>
+
+      <xsl:if test="$op = 'cond-range' and
+	            $pos = count (./ancestor::*[name () = 'query' or
+		                                name () = 'property' or
+			                        name () = 'property-of']) +
+                           count (./preceding::*[name () = 'query' or
+			                         name () = 'property' or
+				                 name () = 'property-of'])">
+        <cond-range xml:lang="{$lang}"
 	       datatype="{$datatype}"
                hi="{$hi}"
-               lo="{$lo}">
-        </value-range>
+               lo="{$lo}"
+               neg="{$neg}">
+        </cond-range>
       </xsl:if>
 
-  </xsl:copy>
-</xsl:if>
+      <xsl:if test="$op = 'cond' and
+	            $pos = count (./ancestor::*[name () = 'query' or
+		                                name () = 'property' or
+			                        name () = 'property-of']) +
+                           count (./preceding::*[name () = 'query' or
+			                         name () = 'property' or
+				                 name () = 'property-of'])">
+        <xsl:choose>
+          <xsl:when test="$cond_t = 'in'">
+            <cond type="{$cond_t}" neg="{$neg}">
+              <xsl:copy-of select="$parms"/>
+            </cond>
+          </xsl:when>
+          <xsl:when test="$cond_t = 'near'">
+            <cond type="{$cond_t}" neg="{$neg}" lat="{$lat}" lon="{$lon}" d="{$d}" location-prop="{$location-prop}">
+              <xsl:if test="$loc_acq = 'on'">
+                <xsl:attribute name="acquire">true</xsl:attribute>
+              </xsl:if>
+            </cond>
+          </xsl:when>
+          <xsl:otherwise>
+            <cond type="{$cond_t}"
+                  xml:lang="{$lang}"
+	          datatype="{$datatype}"
+                  neg="{$neg}">
+              <xsl:value-of select="$val"/>
+            </cond>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:if>
+
+    </xsl:copy>
+  </xsl:if>
 
 </xsl:template>
 
 <xsl:template match="view">
-  <xsl:if test="'class' = $op or 'value' = $op or '' = $op" >
-  <xsl:copy>
-    <xsl:apply-templates select="@* | node()" />
-  </xsl:copy>
-</xsl:if>
+  <xsl:choose>
+    <xsl:when test="'class' = $op" >
+      <xsl:copy>
+        <xsl:attribute name="offset"><xsl:value-of select="$offset"/></xsl:attribute>
+        <xsl:apply-templates select="@*[local-name () != 'offset'] | node()" />
+      </xsl:copy>
+    </xsl:when>
+    <xsl:when test="'value' = $op or '' = $op" >
+      <xsl:copy>
+        <xsl:apply-templates select="@* | node()" />
+      </xsl:copy>
+    </xsl:when>
+  </xsl:choose>
 </xsl:template>
 
 <xsl:template match="@* | node()">
diff --git a/binsrc/b3s/fct_strip_loc.xsl b/binsrc/b3s/fct_strip_loc.xsl
new file mode 100644
index 0000000..fc80d72
--- /dev/null
+++ b/binsrc/b3s/fct_strip_loc.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+--
+--  $Id: fct_strip_loc.xsl,v 1.1.2.3 2012/03/05 17:38:05 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+-->
+<xsl:stylesheet version="1.0"
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- strip "temporary" location data off any cond with auto-acquire enabled for permalinks -->
+
+<xsl:template match="cond[@acquire='true']">
+  <cond type="near">
+    <xsl:attribute name="neg">
+      <xsl:value-of select="./@neg"/>
+    </xsl:attribute>
+    <xsl:attribute name="location-prop">
+      <xsl:value-of select="./@location-prop"/>
+    </xsl:attribute>
+    <xsl:attribute name="d">
+      <xsl:value-of select="./@d"/>
+    </xsl:attribute>
+    <xsl:attribute name="acquire">
+      <xsl:value-of select="./@acquire"/>
+    </xsl:attribute>
+  </cond>
+</xsl:template>
+
+<xsl:template match="@* | node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@* | node()"/>
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/binsrc/b3s/fct_vsp.xsl b/binsrc/b3s/fct_vsp.xsl
index a366a81..cf0c34a 100644
--- a/binsrc/b3s/fct_vsp.xsl
+++ b/binsrc/b3s/fct_vsp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: fct_vsp.xsl,v 1.1.2.18 2011/03/24 15:50:37 source Exp $
+--  $Id: fct_vsp.xsl,v 1.1.2.35 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,203 +22,192 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 -->
-<xsl:stylesheet version ="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:addthis="http://www.addthis.com/help/api-spec">
 <xsl:output method="html" encoding="ISO-8859-1" indent="yes"/>
+<!-- Pager-related vars calculation -->
+
+<xsl:variable name="offs"
+              select="if(or(/facets/view/@offset = '', not(/facets/view/@offset)), 1, /facets/view/@offset + 1)"/>
+<xsl:variable name="limit" select="/facets/view/@limit"/>
 
-<xsl:variable name="page_len" select="20"/>
-<xsl:variable name="offs" select="if(or(/facets/view/@offset = '', not(/facets/view/@offset)), 1, /facets/view/@offset + 1)"/>
 <xsl:variable name="rowcnt" select="count(/facets/result/row)"/>
+
 <xsl:param name="s_term"/>
 <xsl:param name="p_term"/>
 <xsl:param name="o_term"/>
 <xsl:param name="t_term"/>
 <xsl:param name="p_qry"/>
+<xsl:param name="p_xml"/>
+<xsl:param name="tree"/>
+<xsl:param name="addthis_key"/>
+<xsl:param name="type"/>
 
-<xsl:template match = "facets">
-<div id="res">
-  <div class="btn_bar btn_bar_top"><xsl:comment><xsl:value-of select="$type"/></xsl:comment>
-    <xsl:call-template name="render-pager"/>
-  <xsl:if test="/facets/complete != 'yes'">
-    <span class="partial_res_expln">
-      <xsl:choose>
-        <xsl:when test="$rowcnt != 0">
-          The query timed out with partial result:
-        </xsl:when>
-        <xsl:otherwise>
-          The query timed out with no result:
-        </xsl:otherwise>
-      </xsl:choose>
-    </span>
-    <a class="partial_res_help" href="/fct/facet_doc.html#timeout">What's this?</a> 
-    <button>
-      <xsl:attribute name="onclick">
-        javascript:fct_nav_to('/fct/facet.vsp?cmd=refresh&sid=<xsl:value-of select="$sid"/>&timeout=<xsl:value-of select="$timeout"/>')
-      </xsl:attribute>Retry with <xsl:value-of select="($timeout div 1000)"/> seconds timeout
-    </button>
-  </xsl:if>
-</div> <!-- btn_bar -->
-<xsl:if test="/facets/complete = 'yes' and /facets/processed = 0 and $rowcnt = 0">
-  <div class="empty_result">
-    Nothing found.
-  </div>
-</xsl:if>
-<!--xsl:choose>
-  <xsl:when test="$type = 'text'"><h3>Text match results</h3></xsl:when>
-  <xsl:when test="$type = 'text-d'"><h3>Text match results</h3></xsl:when>
-  <xsl:when test="$type = 'text-properties'"><h3>List of Properties With Matching Text</h3></xsl:when>
-  <xsl:when test="$type = 'classes'"><h3>Types</h3></xsl:when>
-  <xsl:when test="$type = 'properties'"><h3>Properties</h3></xsl:when>
-  <xsl:when test="$type = 'properties-in'"><h3>Referencing Properties</h3></xsl:when>
-  <xsl:when test="$type = 'list'"><h3>List</h3></xsl:when>
-  <xsl:when test="$type = 'list-count'"><h3>Distinct values</h3></xsl:when>
-  <xsl:when test="$type = 'geo'"><h3>Location</h3></xsl:when>
-</xsl:choose-->
-<!--xsl:message terminate="no"><xsl:value-of select="$type"/></xsl:message-->
-<xsl:choose>
-  <xsl:when test="$type = 'geo'">
-    <script type="text/javascript" >
-<![CDATA[
-OAT.Preferences.imagePath = "oat/images/";
+<xsl:variable name="view-type">
+  <xsl:choose>
+    <xsl:when test="/facets/result/@type='list' and /facets/view/@position='0'">
+      <xsl:text>entities-list</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="/facets/result/@type"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
 
-function markerClickHandler (caller, msg, m) {
-  var c = m.__fct_bubble_content;
+<xsl:variable name="noresult">
+  <xsl:if test="/facets/complete = 'yes' and /facets/processed = 0 and $rowcnt = 0"><xsl:value-of select="1"/></xsl:if>
+</xsl:variable>
 
-        var x;
-  if (c[0].length > 0) {
-	  x = OAT.Dom.create ("a");
-    x.href = '/describe/?url='+escape (c[0]);
-    if (c[1].length > 0)
-      x.innerHTML = c[1];
-	  else
-      x.innerHTML = c[0];
-	}
-  else x = OAT.Dom.text(c[1]);
-  window.cMap.openWindow (m, x);
-      }
-
-function init(){
-  window.cMap = {};
-  var mapcb = function() {
-    window.cMap.init(OAT.Map.TYPE_G3);
-    window.cMap.centerAndZoom(0,0,0);
-    window.cMap.setMapType(OAT.Map.MAP_HYB);
-    OAT.MSG.attach ("*", "MAP_MARKER_CLICK", markerClickHandler);
-    var markersArr = [];
-]]>
-    <xsl:for-each select="result/row">
-      window.cMap.addMarker( <xsl:value-of select="column[3]"/>,
-                             <xsl:value-of select="column[4]"/>,
-                             false,
-                             {image: "oat/images/markers/01.png",
-                              imageSize: [18,41],
-                              custData: {__fct_bubble_content: ["<xsl:value-of select="column[1]"/>", 
-	                                                        "<xsl:value-of select='translate (normalize-space (column[2]), '"', '')'/>"]}});
-      markersArr.push([<xsl:value-of select="column[3]"/>,<xsl:value-of select="column[4]"/>]);
-    </xsl:for-each>
-<![CDATA[
-    window.cMap.optimalPosition(markersArr);
-    window.cMap.showMarkers(false);
-    return;
-  }
-  window.YMAPPID = "";
-  var providerType = OAT.Map.TYPE_G3;
-  window.cMap = new OAT.Map($('user_map'),providerType,{fix:OAT.Map.FIX_ROUND1});
-  OAT.Map.loadApi(providerType, {callback: mapcb});
-}
-]]>
-    </script>
-    <div id="user_map"></div>
-  </xsl:when>
-  <xsl:otherwise>
+<xsl:template match="facets">
+  <div id="res">
+    <div class="btn_bar btn_bar_top">
+      <xsl:comment><xsl:value-of select="$type"/></xsl:comment>
+      <xsl:call-template name="render-pager">
+        <xsl:with-param name="pfx">pager_top</xsl:with-param>
+      </xsl:call-template>
+      <xsl:if test="/facets/complete != 'yes'">
+        <span class="partial_res_expln">
+          <xsl:choose>
+            <xsl:when test="$rowcnt != 0">
+              <xsl:text>The query timed out with partial result:</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>The query timed out with no result:</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </span>
+        <a class="partial_res_help" href="/fct/facet_doc.html#timeout">What's this?</a> 
+        <button>
+          <xsl:attribute name="onclick">
+            javascript:fct_nav_to('/fct/facet.vsp?cmd=refresh&sid=<xsl:value-of select="$sid"/>&timeout=<xsl:value-of select="$timeout"/>')
+          </xsl:attribute>Retry with <xsl:value-of select="($timeout div 1000)"/> seconds timeout
+        </button>
+      </xsl:if>
+    </div> <!-- btn_bar -->
     <xsl:choose>
-      <xsl:when test="count (/facets/result) > 1">
-	<xsl:for-each select="result[@type = 'classes' or @type = 'properties']">
-	  <div class="facet_ctr">
-	    <xsl:choose>
-              <xsl:when test="@type='properties'">
-		<h4 class="facet_hd">Properties</h4>
-              </xsl:when>
+      <xsl:when test="$noresult = 1">
+        <div class="empty_result">
+          <h3>No Result</h3>
+          <p>This query did not produce any results.<br/>
+          Try dropping some of the conditions, to make the query less specific.</p>
+        </div>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <!--xsl:when test="$view-type = 'text'"><h3>Text match results</h3></xsl:when>
+          <xsl:when test="$view-type = 'text-d'"><h3>Text match results</h3></xsl:when>
+          <xsl:when test="$view-type = 'text-properties'"><h3>List of Properties With Matching Text</h3></xsl:when>
+          <xsl:when test="$view-type = 'classes'"><h3>Types</h3></xsl:when>
+          <xsl:when test="$view-type = 'properties'"><h3>Properties</h3></xsl:when>
+          <xsl:when test="$view-type = 'properties-in'"><h3>Referencing Properties</h3></xsl:when-->
+          <xsl:when test="$view-type = 'list'"><h3>Select a value or condition</h3></xsl:when>
+          <xsl:when test="$view-type = 'entities-list'"><h3>Entities found</h3></xsl:when>
+          <!--xsl:when test="$view-type = 'list-count'"><h3>Distinct values</h3></xsl:when>
+          <xsl:when test="$view-type = 'geo'"><h3>Location</h3></xsl:when-->
+        </xsl:choose>
+        <!-- xsl:message terminate="no"><xsl:value-of select="$type"/></xsl:message -->
+        <xsl:choose>
+          <xsl:when test="$view-type = 'geo' or $view-type = 'geo-list'">
+            <xsl:call-template name="render-geo-conds-ui">
+              <xsl:with-param name="result" select="/facets/result"/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:choose>
+              <xsl:when test="count (/facets/result) > 1">
+	        <xsl:for-each select="result[@type = 'classes' or @type = 'properties']">
+	          <div class="facet_ctr">
+	            <xsl:choose>
+                      <xsl:when test="@type='properties'">
+		        <h4 class="facet_hd">Properties</h4>
+                      </xsl:when>
+                      <xsl:otherwise>
+		        <h4 class="facet_hd">Types</h4>
+                      </xsl:otherwise>
+	            </xsl:choose>
+	            <div class="facet">
+                      <xsl:call-template name="render-result">
+                        <xsl:with-param name="view-type"><xsl:value-of select="$view-type"/></xsl:with-param>
+		        <xsl:with-param name="command">
+		          <xsl:choose>
+                            <xsl:when test="@type = 'classes'">set_class</xsl:when>
+                            <xsl:when test="@type = 'properties'">open_property</xsl:when>
+                            <xsl:otherwise><xsl:value-of select="$cmd"/></xsl:otherwise>
+                          </xsl:choose>
+                        </xsl:with-param>
+                      </xsl:call-template>
+	            </div>
+	          </div> <!-- facet_ctr -->
+	        </xsl:for-each>
+	        <xsl:for-each select="/facets/result [@type != 'classes' and @type != 'properties']">
+	          <xsl:call-template name="render-result">
+	            <xsl:with-param name="view-type"><xsl:value-of select="$view-type"/></xsl:with-param>
+	            <xsl:with-param name="command">
+	              <xsl:choose>
+                        <xsl:when test="@type = 'classes'">set_class</xsl:when>
+                        <xsl:when test="@type = 'properties'">open_property</xsl:when>
+                        <xsl:otherwise><xsl:value-of select="$cmd"/></xsl:otherwise>
+                      </xsl:choose>
+	            </xsl:with-param>
+	          </xsl:call-template>
+                </xsl:for-each>
+              </xsl:when> <!-- multiple results -->
               <xsl:otherwise>
-		<h4 class="facet_hd">Types</h4>
+                <xsl:for-each select="/facets/result">
+	          <xsl:call-template name="render-result">
+	            <xsl:with-param name="view-type"><xsl:value-of select="$view-type"/></xsl:with-param>
+	            <xsl:with-param name="command">
+	              <xsl:choose>
+                        <xsl:when test="@type = 'classes'">set_class</xsl:when>
+                        <xsl:when test="@type = 'properties'">open_property</xsl:when>
+	                <xsl:otherwise><xsl:value-of select="$cmd"/></xsl:otherwise>
+                      </xsl:choose>
+	            </xsl:with-param>
+	          </xsl:call-template>
+                </xsl:for-each>
               </xsl:otherwise>
-	    </xsl:choose>
-	    <div class="facet">
-              <xsl:call-template name="render-result">
-		<xsl:with-param name="view-type"><xsl:value-of select="@type"/></xsl:with-param>
-		<xsl:with-param name="command">
-		  <xsl:choose>
-		    <xsl:when test="@type = 'classes'">set_class</xsl:when>
-		    <xsl:when test="@type = 'properties'">open_property</xsl:when>
-		    <xsl:otherwise><xsl:value-of select="$cmd"/></xsl:otherwise>
-                  </xsl:choose>
-		</xsl:with-param>
-              </xsl:call-template>
-	    </div>
-	  </div> <!-- facet_ctr -->
-	</xsl:for-each>
-	<xsl:for-each select="/facets/result [@type != 'classes' and @type != 'properties']">
-	  <xsl:call-template name="render-result">
-	    <xsl:with-param name="view-type"><xsl:value-of select="$type"/></xsl:with-param>
-	    <xsl:with-param name="command">
-	      <xsl:choose>
-                <xsl:when test="@type = 'classes'">set_class</xsl:when>
-                <xsl:when test="@type = 'properties'">open_property</xsl:when>
-                <xsl:otherwise><xsl:value-of select="$cmd"/></xsl:otherwise>
-              </xsl:choose>
-	    </xsl:with-param>
-	  </xsl:call-template>
-        </xsl:for-each>
-      </xsl:when> <!-- multiple results -->
-      <xsl:otherwise>
-        <xsl:if test="/facets/result/@type='propval-list'">
-          <!--form>
-            <input type="hidden" name="cmd" value="value_range"/>
-            <input type="hidden" name="sid"><xsl:attribute name="value"><xsl:value-of select="$sid"/></xsl:attribute></input>
-            Value range between <input name="lo" type="text"/>
-            and <input name="hi" type="text"/>
-            <input type="submit" value="set"/>
-            <span class="info">Plain integer, or RDF datatype (Ex: "1988-01-01"^^xsd:date, "Neubauten"@de)</span>
-          </form-->                
-        </xsl:if>
-        <xsl:for-each select="/facets/result">
-	  <xsl:call-template name="render-result">
-	    <xsl:with-param name="view-type"><xsl:value-of select="$type"/></xsl:with-param>
-	    <xsl:with-param name="command">
-	      <xsl:choose>
-                <xsl:when test="@type = 'classes'">set_class</xsl:when>
-                <xsl:when test="@type = 'properties'">open_property</xsl:when>
-	        <xsl:otherwise><xsl:value-of select="$cmd"/></xsl:otherwise>
-              </xsl:choose>
-	    </xsl:with-param>
-	  </xsl:call-template>
-        </xsl:for-each>
-      </xsl:otherwise>
+            </xsl:choose>
+          </xsl:otherwise>
+        </xsl:choose>
+        <div class="btn_bar">
+          <xsl:call-template name="render-pager">
+            <xsl:with-param name="pfx">pager_bottom</xsl:with-param>
+          </xsl:call-template>
+        </div> <!-- btn_bar -->
+      </xsl:otherwise> <!-- non-empty result -->
     </xsl:choose>
-  </xsl:otherwise>
-</xsl:choose>
-<div class="btn_bar">
-  <xsl:call-template name="render-pager"/>
-</div> <!-- btn_bar -->
-<div id="result_nfo">
-  <xsl:choose>
-    <xsl:when test="/facets/complete = 'yes'">Complete result - </xsl:when>
-    <xsl:otherwise>Partial result - </xsl:otherwise>
-  </xsl:choose>
-  <xsl:value-of select="if(/facets/processed > 0, /facets/processed, $rowcnt)"/> processed in <xsl:value-of select="/facets/time"/> msec.<br/>  Resource utilization:
-  <xsl:value-of select="/facets/db-activity"/> 
-</div> <!-- #result_nfo -->
-</div> <!-- #res -->
-<script type="text/javascript">
+    <div id="result_nfo">
+      <xsl:choose>
+        <xsl:when test="/facets/complete = 'yes'">
+          <xsl:text>Complete result - </xsl:text>
+        </xsl:when>
+        <xsl:otherwise>Partial result - </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="if(/facets/processed > 0, /facets/processed, $rowcnt)"/>
+      <xsl:text> processed in </xsl:text>
+      <xsl:value-of select="/facets/time"/>
+      <xsl:text> msec.</xsl:text>
+      <br/>
+      <xsl:text>  Resource utilization: </xsl:text>
+      <xsl:value-of select="/facets/db-activity"/>
+    </div> <!-- #result_nfo -->
+  </div> <!-- #res -->
+  <script type="text/javascript">
   var sparql_a = OAT.Dom.create('a',{}, 'sparql_a');
-  sparql_a.href='/sparql?qtxt=<xsl:value-of select="urlify ($p_qry)"/>'
+  sparql_a.href='/sparql?default-graph-uri=&qtxt=<xsl:value-of select="urlify ($p_qry)"/>&debug='
   sparql_a.innerHTML = 'View query as SPARQL';
-  OAT.Dom.append (['sparql_a_ctr',sparql_a]);
-</script>
-<xsl:if test="$type = 'default'">
-<script type="text/javascript">
+  var plink_a = OAT.Dom.create('a',{}, 'plink_a');
+  plink_a.href='/fct/facet.vsp?qxml=<xsl:value-of select="urlify ($p_xml)"/>'
+  plink_a.innerHTML = 'Facet permalink';
+  OAT.Dom.append (['sparql_a_ctr',sparql_a, plink_a]);
+  </script>
+  <!--xsl:message terminate="no">addthis_key:<xsl:value-of select="$addthis_key"/></xsl:message-->
+  <xsl:if test="$view-type = 'entities-list' or $type = 'default'">
+  <script type="text/javascript">
   if ($('pivot_a_ctr')) {
-	  var pivot_a = OAT.Dom.create('a',{}, 'pivot_a');
-      pivot_a.href='/pivot_collections/pivot.vsp?sid=<xsl:value-of select="$sid"/>&limit=75&qrcodes=0&CXML_redir_for_subjs=&CXML_redir_for_hrefs=&q=<xsl:value-of select="urlify (normalize-space(/facets/sparql))"/>'
+    var pivot_a = OAT.Dom.create('a', {}, 'pivot_a');
+    pivot_a.href='/pivot_collections/pivot.vsp?sid=<xsl:value-of select="$sid"/>&limit=75&qrcodes=0&CXML_redir_for_subjs=&CXML_redir_for_hrefs=&q=<xsl:value-of select="urlify (normalize-space(/facets/sparql))"/>'
 	  pivot_a.innerHTML = 'Make Pivot collection';
       pivot_a.id = 'pivot_a_mpc';
 
@@ -229,88 +218,147 @@ function init(){
 
 	  var pivot_link_opts = OAT.Dom.create('span', {}, 'pivot_link_opts');
 	  pivot_link_opts.innerHTML = '  \
-          <!--\
-	  <a href="#" title="Sets the CXML type of subject URIs to String or Link, optionally performing a DESCRIBE on the subject">Style for RDF subjects</a> \
+	  <a href="#" title="Sets the link-out behavior of subject URIs, optionally performing a DESCRIBE on the subject">Subject  link behavior</a> \
 	  <select id="CXML_redir_for_subjs" onchange="fct_set_pivot_subj_uri_opt()">\
-	  		<option value="" selected="true">Convert to string facets</option>\
-			<option value="121">Make plain links</option>\
-			<option value="LOCAL_PIVOT">Make SPARQL DESCRIBE Pivot links</option>\
-			<option value="LOCAL_TTL">Make SPARQL DESCRIBE download links (TTL)</option>\
-			<option value="LOCAL_CXML">Make SPARQL DESCRIBE download links (CXML)</option>\
+			<option value="121" selected="true">External resource link</option>\
+	  		<option value="">No link out</option>\
+			<!-- <option value="LOCAL_PIVOT">External faceted navigation links</option> -->\
+			<option value="LOCAL_TTL">External description resource (TTL)</option>\
+			<!-- <option value="LOCAL_CXML">External description resource (CXML)</option> -->\
+			<option value="LOCAL_NTRIPLES">External description resource (NTRIPLES)</option>\
+			<option value="LOCAL_JSON">External description resource (JSON)</option>\
+			<option value="LOCAL_XML">External description resource (RDF/XML)</option>\
 		</select>\
 		  \
-                -->\
-		<a href="#" title="Sets the CXML type of resource URIs to String or Link, optionally performing a DESCRIBE on the resource">CXML link behavior</a> \
+		<a href="#" title="Sets the CXML type of resource URIs to String or Link, optionally performing a DESCRIBE on the resource">Facet link behavior</a> \
 		<select id="CXML_redir_for_hrefs" onchange="fct_set_pivot_href_opt()">\
-			<option value="" selected="true">Local faceted navigation links</option>\
-			<option value="121">External resource links</option>\
+			<option value="" selected="true">Local faceted navigation link</option>\
+			<option value="121">External resource link</option>\
 			<option value="LOCAL_PIVOT">External faceted navigation links</option>\
 			<option value="LOCAL_TTL">External description resource (TTL)</option>\
 			<option value="LOCAL_CXML">External description resource (CXML)</option>\
+			<option value="LOCAL_NTRIPLES">External description resource (NTRIPLES)</option>\
+			<option value="LOCAL_JSON">External description resource (JSON)</option>\
+			<option value="LOCAL_XML">External description resource (RDF/XML)</option>\
 		</select>';
 
       OAT.Dom.append (['pivot_a_ctr',pivot_a,pivot_pg,pivot_qrcode_opts,pivot_link_opts]);
   }
-</script>
-</xsl:if>
+    </script>
+  </xsl:if>
+
+  <xsl:call-template name="render-init-func">
+    <xsl:with-param name="result" select="/facets/result"/>
+  </xsl:call-template>
+
+</xsl:template>
+
+<xsl:template name="render-limit-opts">
+  <xsl:param name="lim-list"/>
+  <xsl:param name="limit"/>
+  <xsl:variable name="new-lim-list" select="concat(normalize-space($lim-list), ' ')"/>
+  <xsl:variable name="first-val" select="substring-before($new-lim-list, ' ')" />
+  <xsl:variable name="remaining" select="substring-after($new-lim-list, ' ')" />
+  <option>
+    <xsl:attribute name="value"><xsl:value-of select="$first-val"/></xsl:attribute>
+    <xsl:if test="$first-val = $limit"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
+    <xsl:value-of select="$first-val"/>
+  </option>
+  <xsl:if test="$remaining">
+    <xsl:call-template name="render-limit-opts">
+      <xsl:with-param name="lim-list"><xsl:value-of select="$remaining"/></xsl:with-param>
+      <xsl:with-param name="limit"><xsl:value-of select="$limit"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template name="render-pager">
+  <xsl:param name="pfx"/>
   <xsl:if test="/facets/processed > 0">
-    <div class="pager">
-	<span class="stats"><xsl:text>Showing </xsl:text>
-	    <xsl:value-of select="$offs"/>-<!-- <xsl:value-of select="$offs + $page_len - 1"/>--><xsl:value-of select="$offs + $rowcnt - 1"/> <xsl:text> of </xsl:text>
-	    <xsl:value-of select="/facets/processed"/> <xsl:text>total </xsl:text>
+    <form class="pager">
+      <xsl:attribute name="id"><xsl:value-of select="$pfx"/></xsl:attribute>
+      <input type="hidden" name="sid">
+        <xsl:attribute name="value">
+          <xsl:value-of select="$sid"/>
+        </xsl:attribute>
+      </input>
+      <input type="hidden" name="cmd" value="go_to">
+        <xsl:attribute name="id"><xsl:value-of select="$pfx"/>_cmd</xsl:attribute>
+      </input>
+      <label>
+        <xsl:attribute name="for"><xsl:value-of select="$pfx"/>_goto</xsl:attribute>
+        Go to:
+      </label>
+
+      <input name="offset" type="text" class="pager_go" size="3">
+        <xsl:attribute name="id"><xsl:value-of select="$pfx"/>_goto</xsl:attribute>
+        <!--xsl:attribute name="value"><xsl:value-of select="$offs"/></xsl:attribute-->
+      </input>
+
+      <label>
+        <xsl:attribute name="for"><xsl:value-of select="$pfx"/>_nres</xsl:attribute>
+        Show
+      </label>
+      <select name="limit">
+        <xsl:attribute name="id"><xsl:value-of select="$pfx"/>_nres</xsl:attribute>
+        <xsl:call-template name="render-limit-opts">
+          <xsl:with-param name="lim-list">20 50 100 150 200 300 400 500</xsl:with-param>
+          <xsl:with-param name="limit" select="$limit"/>
+        </xsl:call-template>
+      </select>
+      <span class="pager_stats">
+        <xsl:value-of select="$offs"/> - <xsl:value-of select="$offs + $rowcnt - 1"/> <xsl:text> of </xsl:text>
+	<xsl:value-of select="/facets/processed"/> <xsl:text> total </xsl:text>
       </span>
-      <xsl:if test="$offs >= $page_len">
 	<button>
+          <xsl:if test="$offs <= 1">
+            <xsl:attribute name="disabled">true</xsl:attribute>
+          </xsl:if>
 	  <xsl:attribute name="class">pager</xsl:attribute>
-	  <xsl:attribute name="onclick">javascript:fct_nav_to('/fct/facet.vsp?cmd=prev&sid=<xsl:value-of select="$sid"/>')
-	  </xsl:attribute>◂ Prev
+	  <xsl:attribute name="onclick">javascript:fct_pager_prev('<xsl:value-of select="$pfx"/>');</xsl:attribute>
+          ◀
 	</button>
-      </xsl:if>
-      <xsl:if test="($offs + $page_len) < /facets/processed">
 	<button>
+          <xsl:if test="not(($offs + $limit) < /facets/processed)">
+            <xsl:attribute name="disabled">true</xsl:attribute>
+          </xsl:if>
 	  <xsl:attribute name="class">pager</xsl:attribute>
-	  <xsl:attribute name="onclick">javascript:fct_nav_to('/fct/facet.vsp?cmd=next&sid=<xsl:value-of select="$sid"/>')
-	  </xsl:attribute>▸ Next
+	  <xsl:attribute name="onclick">javascript:fct_pager_next('<xsl:value-of select="$pfx"/>');</xsl:attribute>
+          ▶
 	</button>
-      </xsl:if>
-    </div>
+    </form>
   </xsl:if>
 </xsl:template> <!-- render-pager -->
 
 <xsl:template name="render-result">
-<table class="result">
+<div class="dbg"><xsl:value-of select="$view-type"/></div>
+<table id="result_t">
+  <xsl:attribute name="class">result <xsl:value-of select="$view-type"/></xsl:attribute>
   <thead>
     <xsl:choose>
       <xsl:when test="$view-type = 'properties'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
-	<tr><th><xsl:value-of select="$p_term"/></th><!--th>Label</th--><th>Count</th></tr>
+	<tr><th></th><th><xsl:value-of select="$p_term"/></th><!--th>Label</th--><th></th><th>Count</th></tr>
       </xsl:when>
       <xsl:when test="$view-type = 'list-count'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
-	<tr><th><xsl:value-of select="$s_term"/></th><!--th>Title</th--><th>Count</th></tr>
+	<tr><th></th><th><xsl:value-of select="$s_term"/></th><!--th>Title</th--><th></th><th>Count</th></tr>
       </xsl:when>
       <xsl:when test="$view-type = 'text-properties'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
-	<tr><th><xsl:value-of select="$p_term"/></th><!--th>Label</th--><th>Count</th></tr>
+	<tr><th></th><th><xsl:value-of select="$p_term"/></th><!--th>Label</th--><th></th><th>Count</th></tr>
       </xsl:when>
       <xsl:when test="$view-type = 'properties-in'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
-	<tr><th><xsl:value-of select="$p_term"/></th><!--th>Label</th--><th>Count</th></tr>
+	<tr><th></th><th><xsl:value-of select="$p_term"/></th><!--th>Label</th--><th></th><th>Count</th></tr>
       </xsl:when>
       <xsl:when test="$view-type = 'list'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
 	<tr><th></th><th></th><th></th></tr>
       </xsl:when>
       <xsl:when test="$view-type = 'classes'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
-	<tr><th><xsl:value-of select="$t_term"/></th><!--th>Label</th--><th>Count</th></tr>
+	<tr><th></th><th><xsl:value-of select="$t_term"/></th><!--th>Label</th--><th></th><th>Count</th></tr>
       </xsl:when>
       <xsl:when test="$view-type = 'text' or $view-type = 'text-d'">
-	<div class="dbg"><xsl:value-of select="$view-type"/></div>
-	<tr><th><xsl:value-of select="$s_term"/></th><th>Title</th><th>Text excerpt</th></tr>
+	<tr><th></th><th></th><th></th><th><xsl:value-of select="$s_term"/></th><th>Title</th><th>Text excerpt</th></tr>
+      </xsl:when>
+      <xsl:when test="$view-type = 'text' or $view-type = 'propval-list'">
+	<tr><th>Value</th><th>Datatype</th></tr>
       </xsl:when>
     </xsl:choose>
   </thead>
@@ -318,89 +366,140 @@ function init(){
     <xsl:for-each select="row">
       <tr>
 	<xsl:choose>
+          <xsl:when test="$view-type = 'entities-list'">
+	    <xsl:if test="./@rank">
+              <td>
+                <xsl:value-of select="./@rank"/>
+              </td>
+            </xsl:if>
+            <td>
+              <xsl:call-template name="render-describe-link">
+                <xsl:with-param name="uri" select="column[1]"/>
+                <xsl:with-param name="content" select="column[2]"/>
+              </xsl:call-template>
+            </td>
+          </xsl:when>
 	  <xsl:when test="$view-type = 'properties' or
 			  $view-type = 'classes' or
 			  $view-type = 'properties-in' or
 			  $view-type = 'text-properties' or
 			  $view-type = 'list' or
 			  $view-type = 'list-count'">
-	  <xsl:if test="./@rank">
+	    <xsl:if test="./@rank">
+              <td>
+                <xsl:value-of select="./@rank"/>
+              </td>
+            </xsl:if>
             <td>
-              <xsl:value-of select="./@rank"/>
+              <xsl:if test="$view-type = 'properties' or $view-type = 'classes'">
+                <input type="checkbox" name="cb" value="{position (.)}" checked="true" onclick="javascript:fct_sel_neg (this)"/>
+              </xsl:if>
+
+              <!--xsl:message terminate="no">
+                <xsl:value-of select="$query/query/class/@iri"/><xsl:text> | </xsl:text><xsl:value-of select="column[1]"/>
+              </xsl:message-->
+              <xsl:variable name="current_iri" select="column[1]"/>
+              <xsl:variable name="use_iri">
+                <xsl:choose>
+                  <xsl:when test="not $query/query/class[@iri = $current_iri] and column[1]/@sparql_ser != ''">
+                    <xsl:value-of select="urlify(column[1]/@sparql_ser)"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="urlify($current_iri)"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:variable>
+              <xsl:comment><xsl:value-of select="$current_iri"/></xsl:comment>
+            </td>
+            <td>
+              <a id="a_{position (.)}">
+                <xsl:attribute name="class">sel_val</xsl:attribute>
+                <xsl:attribute name="href">
+                  <xsl:text>/fct/facet.vsp?cmd=</xsl:text>
+                  <xsl:value-of select="$command"/>
+                  <xsl:text>&</xsl:text>
+                  <xsl:choose>
+                    <xsl:when test="'cond' = $command">cond_t=eq&val=<xsl:value-of select="$use_iri"/></xsl:when>
+                    <xsl:otherwise>iri=<xsl:value-of select="$use_iri"/></xsl:otherwise>
+                  </xsl:choose>
+                  <xsl:text>&lang=</xsl:text>
+                  <xsl:value-of select="column[1]/@xml:lang"/>
+                  <xsl:text>&datatype=</xsl:text>
+                  <xsl:value-of select="urlify (column[1]/@datatype)"/>
+                  <xsl:text>&sid=</xsl:text>
+                  <xsl:value-of select="$sid"/>
+                </xsl:attribute> <!-- href -->
+                <xsl:attribute name="title">
+                  <xsl:value-of select="column[1]"/>
+                </xsl:attribute>
+                <xsl:choose>
+                  <xsl:when test="'' != string (column[2])">
+                    <xsl:value-of select="column[2]"/>
+                  </xsl:when>
+                  <xsl:when test="'' != column[1]/@shortform">
+                    <xsl:value-of select="column[1]/@shortform"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="column[1]"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </a>
+            </td>
+            <td>
+              <xsl:if test="'uri' = column[1]/@datatype or 'url' = column[1]/@datatype">
+                <xsl:call-template name="render-describe-link">
+                  <xsl:with-param name="uri" select="column[1]"/>
+                  <xsl:with-param name="shortform" select="column[1]/@shortform"/>
+                  <xsl:with-param name="content">Describe</xsl:with-param>
+                </xsl:call-template>
+              </xsl:if>
+            </td>
+            <xsl:if test="$view-type = 'list'">
+              <td class="val_dt">
+                <xsl:value-of select="column[1]/@datatype"/>
+              </td>
+            </xsl:if>
+          <!--td>
+            <xsl:choose>
+              <xsl:when test="'' != ./@shortform">
+                <xsl:value-of select="./@shortform"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="column[2]"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </td-->
+            <td>
+              <xsl:apply-templates select="column[3]"/>
             </td>
-	</xsl:if>
-	    <td>
-	      <xsl:if test="'url' = column[1]/@datatype">
-		<a><xsl:attribute name="href">
-		    /describe/?url=<xsl:value-of select="urlify (column[1])"/>&sid=<xsl:value-of select="$sid"/>
-		  </xsl:attribute>
-		  <xsl:attribute name="class">describe</xsl:attribute>Describe</a>
-	      </xsl:if>
-	      <xsl:if test="$view-type = 'properties' or $view-type = 'classes'">
-		  <input type="checkbox" name="cb" value="{position (.)}" checked="true" onclick="javascript:fct_sel_neg (this)"/>
-	      </xsl:if>
-	      <a id="a_{position (.)}">
-		  <!--xsl:message terminate="no"><xsl:value-of select="$query/query/class/@iri"/><xsl:value-of select="column[1]"/></xsl:message-->  
-	      <xsl:variable name="current_iri" select="column[1]"/> 
-	      <xsl:if test="not $query/query/class[@iri = $current_iri]" > 
-		<xsl:attribute name="href">/fct/facet.vsp?cmd=<xsl:value-of select="$command"/>&iri=<xsl:choose>
-                    <xsl:when test="column[1]/@sparql_ser != ''">
-                      <xsl:value-of select="urlify(column[1]/@sparql_ser)"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:value-of select="urlify (column[1])"/>
-                    </xsl:otherwise>
-                    </xsl:choose>&lang=<xsl:value-of select="column[1]/@xml:lang"/>&datatype=<xsl:value-of select="urlify (column[1]/@datatype)"/>&sid=<xsl:value-of select="$sid"/></xsl:attribute>
-	      </xsl:if>
-		<xsl:attribute name="title">
-		  <xsl:value-of select="column[1]"/>
-		</xsl:attribute>
-		<xsl:choose>
-		  <xsl:when test="'' != string (column[2])">
-		      <xsl:value-of select="column[2]"/>
-		  </xsl:when>
-		  <xsl:when test="'' != column[1]/@shortform">
-		    <xsl:value-of select="column[1]/@shortform"/>
-		  </xsl:when>
-		  <xsl:otherwise>
-		    <xsl:value-of select="column[1]"/>
-		  </xsl:otherwise>
-		</xsl:choose>
-	      </a>
-	    </td>
-	    <!--td>
-	      <xsl:choose>
-		  <xsl:when test="'' != ./@shortform">
-		      <xsl:value-of select="./@shortform"/>
-		  </xsl:when>
-		<xsl:otherwise>
-		  <xsl:value-of select="column[2]"/>
-		</xsl:otherwise>
-	      </xsl:choose>
-	    </td-->
-	    <td>
-	      <xsl:apply-templates select="column[3]"/>
-	    </td>
 	  </xsl:when>
-	  <xsl:otherwise>
+          <!--xsl:when test="$view-type = 'propval-list'">
+          <td class="val">
+            <xsl:value-of select="column[1]" />
+          </td>
+          <td class="val_dt">
+            <xsl:value-of select="column[1]/@datatype" />
+          </td>
+          </xsl:when-->
+          <xsl:otherwise> <!-- text matches view -->
             <td class="rnk">
               <xsl:for-each select="column[@datatype='trank' or @datatype='erank']">
                 <img class="rnk">
                   <xsl:attribute name="src">
-		      <xsl:text>images/r_</xsl:text><xsl:value-of select="min (floor(.), 10)"/><xsl:text>.png</xsl:text>
+                    <xsl:text>images/r_</xsl:text><xsl:value-of select="min (floor(.), 10)"/><xsl:text>.png</xsl:text>
                   </xsl:attribute>
-                    <xsl:attribute name="alt">
-                      <xsl:choose>
-                        <xsl:when test="./@datatype='trank'">Text Rank:</xsl:when>
-                        <xsl:when test="./@datatype='erank'">Entity Rank:</xsl:when> 
-		      </xsl:choose>
-                      <xsl:value-of select="."/>
-                    </xsl:attribute>
-                    <xsl:attribute name="title">
-                      <xsl:choose>
-                        <xsl:when test="./@datatype='trank'">Text Rank:</xsl:when>
-                        <xsl:when test="./@datatype='erank'">Entity Rank:</xsl:when> 
-                      </xsl:choose>
+                  <xsl:attribute name="alt">
+                    <xsl:choose>
+                      <xsl:when test="./@datatype='trank'">Text Rank:</xsl:when>
+                      <xsl:when test="./@datatype='erank'">Entity Rank:</xsl:when>
+                    </xsl:choose>
+                    <xsl:value-of select="."/>
+                  </xsl:attribute>
+                  <xsl:attribute name="title">
+                    <xsl:choose>
+                      <xsl:when test="./@datatype='trank'">Text Rank:</xsl:when>
+                      <xsl:when test="./@datatype='erank'">Entity Rank:</xsl:when>
+                    </xsl:choose>
                     <xsl:value-of select="."/>
                   </xsl:attribute>
                 </img>
@@ -408,31 +507,230 @@ function init(){
 	    </td>
 	    <xsl:for-each select="column">
 	      <td>
-		<xsl:choose>
-		  <xsl:when test="'url' = ./@datatype">
-		    <a>
-		      <xsl:attribute name="href">/describe/?url=<xsl:value-of select="urlify (.)"/></xsl:attribute>
-		      <xsl:attribute name="title"><xsl:value-of select="."/></xsl:attribute>
-		      <xsl:choose>
-			<xsl:when test="'' != ./@shortform"><xsl:value-of select="./@shortform"/></xsl:when>
-			<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
-		      </xsl:choose>
-		    </a>
+                <xsl:choose>
+		  <xsl:when test="'uri' = ./@datatype or 'url' = ./@datatype">
+                    <xsl:call-template name="render-describe-link">
+                      <xsl:with-param name="uri" select="."/>
+                      <xsl:with-param name="shortform" select="./@shortform"/>
+                    </xsl:call-template>
 		  </xsl:when>
                   <xsl:when test="'erank' = ./@datatype or 'trank' = ./@datatype">
-
                   </xsl:when>
-		  <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
-		</xsl:choose>
+		  <xsl:otherwise>
+                    <xsl:apply-templates select="."/>
+                  </xsl:otherwise>
+                </xsl:choose>
 	      </td>
 	    </xsl:for-each>
 	  </xsl:otherwise>
-	</xsl:choose>
+        </xsl:choose>
       </tr>
       <xsl:text></xsl:text>
     </xsl:for-each>
   </tbody>
 </table>
+
+<xsl:if test="/facets/result/@type='propval-list' or $view-type='list'">
+  <form id="cond_form">
+    <input type="hidden" name="sid"><xsl:attribute name="value"><xsl:value-of select="$sid"/></xsl:attribute></input>
+    <input type="hidden" name="hi" id="out_hi"/>
+    <input type="hidden" name="lo" id="out_lo"/>
+    <input type="hidden" name="lang" id="out_lang"/>
+    <input type="hidden" name="datatype" id="out_dtp"/>
+    <input type="hidden" name="val" id="out_val"/>
+    <input type="hidden" name="cmd" value="cond" id="cmd"/>
+    <input type="hidden" name="cond_parms" id="cond_parms"/>
+    Add condition:
+    <select id="cond_type" name="cond_t">
+      <option value="none">None</option>
+      <option value="eq">==</option>
+      <option value="neq">!=</option>
+      <option value="gte">>=</option>
+      <option value="gt">></option>
+      <option value="lte"><=</option>
+      <option value="lt"><</option>
+      <option value="range">Between</option>
+      <option value="neg_range">Not Between</option>
+      <option value="contains">Contains</option>
+      <option value="in">In</option>
+    </select>
+    <span id="cond_inp_ctr" style="display:none">
+      <!--label for="ckb_neg" class="ckb">Negation:</label><input type="checkbox" name="neg" id="ckb_neg"/-->
+      <input id="cond_lo" type="text"/>
+      <span id="cond_hi_ctr"> and <input id="cond_hi" type="text"/></span> <select id="cond_dt"></select>
+      <input type="button" id="set_cond" value="Set Condition"/>
+    </span>
+    <div id="in_ctr" style="display:none"></div>
+    <div id="geo_ctr" style="display:none"></div>
+  </form>
+</xsl:if>
+
+<xsl:call-template name="render-init-func">
+  <xsl:with-param name="result" select="/facets/result"/>
+</xsl:call-template>
+
+</xsl:template> <!-- render-result -->
+
+<xsl:template name="render-describe-link">
+  <xsl:param name="uri"/>
+  <xsl:param name="shortform"/>
+  <xsl:param name="content"/>
+  <xsl:param name="marker"/>
+  <!--xsl:message terminate="no">"<xsl:value-of select="content"/>"</xsl:message-->
+  <a>
+    <xsl:attribute name="href">
+      <xsl:text>/describe/?url=</xsl:text>
+      <xsl:value-of select="urlify ($uri)"/>
+      <xsl:text>&sid=</xsl:text>
+      <xsl:value-of select="$sid"/>
+    </xsl:attribute>
+    <xsl:attribute name="class">describe</xsl:attribute>
+    <xsl:attribute name="title">
+      <xsl:choose>
+        <xsl:when test="$shortform">
+          <xsl:value-of select="$shortform"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$uri"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="$content=''">
+        <xsl:choose>
+          <xsl:when test="$shortform != ''">
+            <xsl:value-of select="$shortform"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$uri"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$content"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:value-of select="$marker"/>
+  </a>
+</xsl:template> <!-- render-describe-link -->
+
+<xsl:template name="render-geo-conds-ui">
+  <!--xsl:message terminate="no">In render-geo-conds-ui. type=<xsl:value-of select="$type"/></xsl:message-->
+  <xsl:param name="result"/>
+  <xsl:if test="$type='geo' or $type='geo-list'">
+    <div id="user_map"></div>
+    <form id="cond_form">
+      <input type="hidden" name="sid"><xsl:attribute name="value"><xsl:value-of select="$sid"/></xsl:attribute></input>
+      <input type="hidden" name="cmd" value="cond" id="cmd"/>
+      <input type="hidden" name="cno" value="" id="cno"/>
+      <input type="hidden" name="cond_t" value="near" id="cond_t"/>
+      <label for="cond_distance">Within: </label>
+      <input name="dist" id="cond_dist" type="text" size="5"/> km of
+      <select name="loc_trig_sel" id="loc_trig_sel">
+        <option>Coordinates</option>
+        <option value="on">Autolocation</option>
+      </select>
+      <span id="loc_ctr">
+        <img src="images/notify-throbber.gif" alt="Locating..." id="loc_acq_thr_i" style="display:none"/>
+        <input id="cond_loc" type="text" style="display:none"/>
+      </span>
+      <span id="coord_ctr">
+        <!--label for="ckb_neg" class="ckb">Negation:</label><input type="checkbox" name="neg" id="ckb_neg"/-->
+        <label for="cond_lat">Lat:</label>
+        <input name="lat" id="cond_lat" type="text" size="9"/>
+        <label for="cond_lon">Lon:</label>
+        <input name="lon" id="cond_lon" type="text" size="9"/>
+        <label for="cond_acc">Accuracy</label>
+        <input id="cond_acc" type="text" size="6" disabled="true"/>
+      </span>
+      <button id="cond_loc_acq_b">Acquire</button>
+      <button id="cond_loc_use_b">Set condition</button>
+    </form>
+  </xsl:if>
+</xsl:template> <!-- render-geo-conds-ui -->
+
+<xsl:template name="render-init-func">
+  <xsl:param name="result"/>
+  <!--xsl:message terminate="no">In render-init-func: type=<xsl:value-of select="$type"/></xsl:message-->
+  <script type="text/javascript" >
+    <xsl:if test="$type='geo' or $type='geo-list'">
+OAT.Preferences.imagePath = "oat/images/";
+function markerClickHandler (caller, msg, m) {
+  var c = m.__fct_bubble_content;
+
+  var x;
+  if (c[0].length > 0) {
+    x = OAT.Dom.create ("a");
+    x.href = '/describe/?url='+escape (c[0]);
+    if (c[1].length > 0)
+      x.innerHTML = c[1];
+    else
+      x.innerHTML = c[0];
+    }
+    else x = OAT.Dom.text(c[1]);
+  window.cMap.openWindow (m, x);
+}
+    </xsl:if>
+
+function init() {
+
+    <xsl:if test="$type='geo' or $type='geo-list'">
+  window.cMap = {};
+  var mapcb = function() {
+    window.cMap.init(OAT.Map.TYPE_G3);
+    window.cMap.centerAndZoom(0,0,0);
+    window.cMap.setMapType(OAT.Map.MAP_HYB);
+    OAT.MSG.attach ("*", "MAP_MARKER_CLICK", markerClickHandler);
+    var markersArr = [];
+      <xsl:for-each select="$result/row">
+      <!--xsl:message terminate="no"><xsl:value-of select="."/></xsl:message-->
+        window.cMap.addMarker(<xsl:value-of select="column[3]"/>,
+                              <xsl:value-of select="column[4]"/>,
+                              false,
+                              {image: "oat/images/markers/01.png",
+                               imageSize: [18,41],
+                               custData: {__fct_bubble_content: ["<xsl:value-of select="column[1]"/>",
+	                                                         "<xsl:value-of select='translate (normalize-space (column[2]), '"', '')'/>"]}});
+        markersArr.push([<xsl:value-of select="column[3]"/>,<xsl:value-of select="column[4]"/>]);
+      </xsl:for-each>
+    fct_add_loc_marker ();
+    window.cMap.optimalPosition(markersArr);
+    window.cMap.showMarkers(false);
+    return;
+  }
+
+  window.YMAPPID = "";
+  var providerType = OAT.Map.TYPE_G3;
+  window.cMap = new OAT.Map($('user_map'),providerType,{fix:OAT.Map.FIX_ROUND1});
+  OAT.Map.loadApi(providerType, {callback: mapcb});
+  window.geo_ui = new Geo_ui ('cond_form');
+
+  var acq_trig = $('acq_l_trig');
+
+  if (acq_trig) {
+    window.geo_ui.loc_update(parseInt(acq_trig.innerHTML));
+  }
+    </xsl:if>
+    <xsl:if test="$addthis_key != ''">
+    </xsl:if>
+  fct_init_ui();
+}<!-- init -->
+  </script>
+  <xsl:if test="$addthis_key != ''">
+  <script type="text/javascript">
+  var addthis_config = {
+    "data_track_clickback":true,
+    ui_cobrand:"OpenLink Virtuoso",
+    pubid: "<xsl:value-of select="$addthis_key"/>"
+  };
+var addthis_share = {
+  url:  window.location.protocol + '//' + window.location.host + window.location.pathname + '?qxml=<xsl:value-of select="urlify ($p_xml)"/>',
+  title: "Faceted browser permalink",
+  Description: "This is a permalink to an OpenLink Faceted Browsing service page."
+};
+  </script>
+  <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template match="@* | node()">
@@ -441,5 +739,4 @@ function init(){
   </xsl:copy>
 </xsl:template>
 
-
 </xsl:stylesheet>
diff --git a/binsrc/b3s/images/link_16.png b/binsrc/b3s/images/link_16.png
new file mode 100644
index 0000000..9be575d
Binary files /dev/null and b/binsrc/b3s/images/link_16.png differ
diff --git a/binsrc/b3s/images/notify-throbber.gif b/binsrc/b3s/images/notify-throbber.gif
new file mode 100644
index 0000000..09d621e
Binary files /dev/null and b/binsrc/b3s/images/notify-throbber.gif differ
diff --git a/binsrc/b3s/install.html b/binsrc/b3s/install.html
index e3940f9..3d7c952 100644
--- a/binsrc/b3s/install.html
+++ b/binsrc/b3s/install.html
@@ -20,7 +20,7 @@ create bitmap index RDF_QUAD_POGS on RDF_QUAD (P, O, G, S) partition (O varchar
 create bitmap index RDF_QUAD_GPOS on RDF_QUAD (G, P, O, S) partition (O varchar (-1, 0hexffff));
 
 checkpoint;
-</pre>
+	</pre>
 	<p>Once the indexes are created, you must re-install the Faceted Browser VAD package.</p>
     </body>
 </html>
diff --git a/binsrc/b3s/isparql_describe.xsl b/binsrc/b3s/isparql_describe.xsl
new file mode 100644
index 0000000..6f825d7
--- /dev/null
+++ b/binsrc/b3s/isparql_describe.xsl
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+  $Id: isparql_describe.xsl,v 1.1.2.4 2012/03/05 17:38:05 source Exp $
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+-->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+                xmlns:dc="http://purl.org/dc/elements/1.1/"
+                xmlns:ex="http://example.org/stuff/1.0/">
+<xsl:output method="html"
+            omit-xml-declaration="yes"
+            encoding="utf-8"
+            indent="yes"/>
+
+<xsl:param name="full_path"/>
+<xsl:param name="name"/>
+
+<xsl:template match="iSPARQL">
+  <tr>
+    <td class="title"><xsl:value-of select="Description/title"/></td>
+    <td class="expln"><xsl:value-of select="Description/description"/></td>
+    <!-- td class="qry">
+      <code>
+        <xsl:value-of select="ISparqlDynamicPage/query"/>
+      </code>
+    </td --> <!-- .qry -->
+    <td class="actions">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:value-of select="$full_path"/>
+        </xsl:attribute>
+        Run with iSPARQL
+      </a> 
+      <a>
+        <xsl:attribute name="href">
+          <![CDATA[/sparql?]]>query=<xsl:value-of select="ISparqlDynamicPage/query"/>
+        </xsl:attribute>
+        Run in SPARQL endpoint
+      </a>
+    </td> <!-- .actions -->
+  </tr>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/binsrc/b3s/make_vad.sh b/binsrc/b3s/make_vad.sh
index e3682f0..f438d05 100755
--- a/binsrc/b3s/make_vad.sh
+++ b/binsrc/b3s/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.1.2.7 2011/03/08 15:43:44 source Exp $
+#  $Id: make_vad.sh,v 1.1.2.10 2012/03/05 17:38:05 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -47,7 +47,7 @@ VAD_NAME_DEVEL="$VAD_PKG_NAME"_filesystem.vad
 VAD_NAME_RELEASE="$VAD_PKG_NAME"_dav.vad
 NEED_VERSION=06.00.3117
 DSN="$HOST:$PORT"
-SQLDEPS="ns.sql facet.sql complete_ddl.sql"
+SQLDEPS="ns.sql virt_rdf_label.sql facet.sql complete_ddl.sql"
 EXCEPT="b3sq.sql facet_test.sql fct_inx.sql srank.sql srank_1.sql srank23.sql complete_cl.sql complete_single.sql"
 
 HOST_OS=`uname -s | grep WIN`
@@ -176,7 +176,7 @@ directory_init() {
 
   for d in `find . -type d | grep -v CVS | grep -v VirtTripleLoader`
   do
-     mkdir -p vad/vsp/fct/$d 
+     mkdir -p vad/vsp/fct/$d
   done
 
   for f in `find . -name '*.sql'`
@@ -192,6 +192,7 @@ directory_init() {
   # components which are not in their place
   cp -Rf $HOME/binsrc/oat vad/vsp/fct
   cp -Rf $HOME/binsrc/samples/dbpedia/vsp/statics vad/vsp/fct/rdfdesc
+  cp -Rf $HOME/binsrc/rdf_mappers/virt_rdf_label.sql vad/vsp/fct
   cp -Rf styles vad/vsp/fct/rdfdesc
   cp -Rf s vad/vsp/fct/rdfdesc
 
@@ -267,7 +268,7 @@ sticker_init() {
   echo "  <name package=\"$VAD_NAME\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"$VAD_DESC\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -316,13 +317,13 @@ fi
 
 
   for f in $SQLDEPS
-  do  
+  do
       echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/$f', 0, 'report', $ISDAV);" >> $STICKER
   done
 
   for f in `find vad/code/fct -type f -print | cut -b14-`
-  do  
-     exclude=0 
+  do
+     exclude=0
      if [ ! -z "$EXCEPT" -o ! -z "$SQLDEPS" ]
      then
 	 for ex in $EXCEPT $SQLDEPS
@@ -332,7 +333,7 @@ fi
 		 exclude=1
 	     fi
 	 done
-     fi 
+     fi
      if [ $exclude -eq 0 ]
      then
 	 echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/$f', 0, 'report', $ISDAV);" >> $STICKER
diff --git a/binsrc/b3s/ns.sql b/binsrc/b3s/ns.sql
index 2289804..b576204 100644
--- a/binsrc/b3s/ns.sql
+++ b/binsrc/b3s/ns.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ns.sql,v 1.1.2.6 2010/07/05 08:29:37 source Exp $
+--  $Id: ns.sql,v 1.1.2.9 2012/03/05 17:08:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -44,7 +44,9 @@ ttlp ('
 rdfs:label rdfs:subPropertyOf b3s:label .
 dc:title rdfs:subPropertyOf b3s:label .
 foaf:name rdfs:subPropertyOf b3s:label .
-foaf:nick rdfs:subPropertyOf b3s:label .', 'xx', 'b3sonto');
+foaf:nick rdfs:subPropertyOf b3s:label .
+<http://purl.uniprot.org/core/scientificName> rdfs:subPropertyOf b3s:label .
+', 'xx', 'b3sonto');
 
 
 
@@ -59,10 +61,10 @@ ttlp ('
 
 foaf:mbox_sha1sum a owl:InverseFunctionalProperty .
 foaf:mbox_sha1sum rdfs:subPropertyOf lod:ifp_like .
-foaf:name a owl:InverseFunctionalProperty .
-foaf:name rdfs:subPropertyOf lod:ifp_like .
-rdfs:label a owl:InverseFunctionalProperty .
-rdfs:label rdfs:subPropertyOf lod:ifp_like .
+foaf:mbox a owl:InverseFunctionalProperty .
+foaf:mbox rdfs:subPropertyOf lod:ifp_like .
+# rdfs:label a owl:InverseFunctionalProperty .
+# rdfs:label rdfs:subPropertyOf lod:ifp_like .
 <http://linkedopencommerce.com/schemas/icecat/v1/hasProductId> a owl:InverseFunctionalProperty .
 <http://linkedopencommerce.com/schemas/icecat/v1/hasProductId> rdfs:subPropertyOf lod:ifp_like .
 
@@ -77,3 +79,15 @@ INSERT INTO GRAPH <urn:rules.skos> { skos:broader rdfs:subPropertyOf skos:broade
 ;
 
 rdfs_rule_set ('skos-trans', 'urn:rules.skos');
+
+create procedure fct_load_oplweb ()
+{
+  for select RES_CONTENT as cnt from WS.WS.SYS_DAV_RES where RES_FULL_PATH = '/DAV/VAD/fct/oplweb.owl' do
+    {
+      DB.DBA.RDF_LOAD_RDFXML (cast (cnt as varchar), 'http://www.openlinksw.com/schemas/oplweb#', 'http://www.openlinksw.com/schemas/oplweb#');
+    }
+}
+;
+
+fct_load_oplweb ();
+rdfs_rule_set ('oplweb', 'http://www.openlinksw.com/schemas/oplweb#');
diff --git a/binsrc/b3s/nsdecl.sql b/binsrc/b3s/nsdecl.sql
index 72712e8..dfcd566 100644
--- a/binsrc/b3s/nsdecl.sql
+++ b/binsrc/b3s/nsdecl.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nsdecl.sql,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: nsdecl.sql,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/open.xsl b/binsrc/b3s/open.xsl
index 9d9bd1b..6294851 100644
--- a/binsrc/b3s/open.xsl
+++ b/binsrc/b3s/open.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 --
---  $Id: open.xsl,v 1.1.2.1 2009/04/17 11:07:29 source Exp $
+--  $Id: open.xsl,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/opensearchdescription.vsp b/binsrc/b3s/opensearchdescription.vsp
index ca19a5b..49137b2 100644
--- a/binsrc/b3s/opensearchdescription.vsp
+++ b/binsrc/b3s/opensearchdescription.vsp
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 -- 
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -34,16 +34,17 @@
 
   if (0 = sname)
     {
-      if (length (uriqa_str) > 16) 
+      if (length (uriqa_str) > 16)
         {
           log_message ('facets: ShortName from URIQA too long. Please set ''fct_opensearch_shortname'' in registry');
+          sname := 'OpenLink FCT';
         }
       else
         sname := uriqa_str;
     }
 
   sname := "LEFT" (sname, 16);
-  
+
   descr := registry_get ('fct_opensearch_desc');
 
   if (0 = descr)
@@ -61,17 +62,17 @@
 
   if (0 = url_reg)
     {
-      url_reg := 'http://' || uriqa_str || '/fct/facet.vsp';		
+      url_reg := 'http://' || uriqa_str || '/fct/facet.vsp';
     }
 
   url := sprintf ('%s?q={searchTerms}', url_reg);
-  
+
   favicon_path := registry_get ('fct_opensearch_favicon_url');
   search_image_path := registry_get ('fct_opensearch_image_url');
 
   http_rewrite ();
   http_header ('Content-Type: application/opensearchdescription+xml\r\n');
-  
+
   http ('<?xml version="1.0" encoding="UTF-8"?>');
   http ('<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">');
   http (sprintf ('<ShortName>%s</ShortName>', sname));
diff --git a/binsrc/b3s/rdfdesc/description.sql b/binsrc/b3s/rdfdesc/description.sql
index 94969cb..2d3633a 100644
--- a/binsrc/b3s/rdfdesc/description.sql
+++ b/binsrc/b3s/rdfdesc/description.sql
@@ -1,10 +1,10 @@
 --
---  $Id: description.sql,v 1.1.2.27 2011/03/25 16:19:26 source Exp $
+--  $Id: description.sql,v 1.1.2.46 2012/03/07 21:14:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -68,7 +68,7 @@ create procedure b3s_page_get_type (in val any)
 ;
 
 --
--- make a vector of languages and their quality 
+-- make a vector of languages and their quality
 --
 create procedure b3s_get_lang_acc (in lines any)
 {
@@ -123,53 +123,64 @@ create procedure b3s_str_lang_check (in lang any, in acc any)
 }
 ;
 
-create procedure 
+create procedure
 b3s_handle_ses (inout _path any, inout _lines any, inout _params any)
 {
    declare sid, refr varchar;
 
-   sid := get_keyword ('sid', _params); 
+   sid := get_keyword ('sid', _params);
 
    if (sid is null) {
      refr := http_request_header (http_request_header (), 'Referer', null, null);
 
      if (refr is not null)
        {
-         declare ht, pars any; 
+         declare ht, pars any;
          ht := WS.WS.PARSE_URI (refr);
          pars := ht[4];
          pars := split_and_decode (pars);
-         if (pars is not null) 
-         sid := get_keyword ('sid', pars);
+         if (pars is not null)
+           sid := get_keyword ('sid', pars);
        }
    }
 
-   if (sid is not null) connection_set ('sid', sid);
+   if (sid is not null and (regexp_match ('[0-9]*', sid) = sid)) connection_set ('sid', sid);
 }
 ;
 
 -- XXX should probably find the most specific if more than one class and inference rule is set
 
-create procedure b3s_type (in subj varchar, 
-                           in _from varchar, 
-                           out url varchar, 
-                           out c_iri varchar)
+create procedure
+b3s_type (in subj varchar,
+          in _from varchar,
+          out url varchar,
+          out c_iri varchar)
 {
   declare meta, data, ll any;
+  declare i int;
+
   ll := 'unknown';
   url := 'javascript:void()';
+  c_iri := 'http://www.w3.org/2002/07/owl#Thing';
+
   if (length (subj))
     {
-      exec (sprintf ('sparql select ?l ?tp %s where { <%S> a ?tp . optional { ?tp rdfs:label ?l } }', _from, subj), 
+      exec (sprintf ('sparql select ?l ?tp %s where { <%S> a ?tp . optional { ?tp rdfs:label ?l } }', _from, subj),
 	  null, null, vector (), 100, meta, data);
+
       if (length (data))
 	{
-	  if (data[0][0] is not null)
-  	    ll := data[0][0];
-	  else  
-	    ll := b3s_uri_local_part (data[0][1]);
-	  url := b3s_http_url (data[0][1]);
-          c_iri := data[0][1];
+	  for (i := 0; i < length (data); i := i + 1)
+            {
+              if (data[i][0] is not null)
+  	        ll := data[i][0];
+	      else
+	        ll := b3s_uri_local_part (data[i][1]);
+
+	      url := b3s_http_url (data[i][1]);
+
+              c_iri := data[i][1];
+            }
 	}
     }
   return ll;
@@ -192,40 +203,74 @@ create procedure b3s_uri_local_part (in uri varchar)
 ;
 
 create procedure
+b3s_render_iri_select (in _s varchar,
+                       in _from varchar,
+                       in ins_str varchar := '',
+                       in sel int := -1)
+{
+  declare stat, msg, meta, data any;
+  declare i int;
+
+  if (length (_s))
+    {
+      data := null;
+      exec (sprintf ('sparql select distinct ?tp %s where { <%S> a ?tp .}', _from, _s),
+	             stat, msg, vector (), 100, meta, data);
+      if (length (data))
+	{
+          if (sel = -1) sel := length(data)-1;
+
+          http (sprintf ('<select %s>', ins_str));
+
+	  for (i := 0; i < length(data); i := i + 1)
+            {
+              http (sprintf ('<option value="%s"%s>%s</option>',
+                             data[i][0],
+                             case when i = sel then 'selected="true"' else '' end,
+                             b3s_uri_curie(data[i][0])));
+            }
+          http ('</select>');
+        }
+    }
+  return i;
+}
+;
+
+create procedure
 b3s_render_fct_link ()
 {
   declare sid varchar;
   sid := connection_get ('sid');
 
   if (sid is not null)
-    return ('/fct/facet.vsp?sid='||sid||'&cmd=refresh');  
+    return ('/fct/facet.vsp?sid='||sid||'&cmd=refresh');
   else
     return '';
 }
 ;
 
 create procedure
-b3s_render_inf_opts () 
+b3s_render_inf_opts ()
 {
   declare inf varchar;
   declare f int;
   f := 0;
   inf := connection_get ('inf');
 
-  for select distinct RS_NAME as RS_NAME from SYS_RDF_SCHEMA do 
+  for select distinct RS_NAME as RS_NAME from SYS_RDF_SCHEMA do
     {
-      if (RS_NAME = inf) 
+      if (RS_NAME = inf)
         {
           http (sprintf ('<option value="%s" selected="selected">%s</option>', RS_NAME, RS_NAME));
           f := 1;
         }
-      else 
+      else
         http (sprintf ('<option value="%s">%s</option>', RS_NAME, RS_NAME));
     }
 
   if (f = 0)
     http ('<option value="**none**" selected="selected">None</option>');
-  else 
+  else
     http ('<option value="**none**">None</option>');
 }
 ;
@@ -233,22 +278,22 @@ b3s_render_inf_opts ()
 create procedure
 b3s_sas_selected ()
 {
-  if (connection_get ('sas') = 'yes') 
+  if (connection_get ('sas') = 'yes')
     return ' checked="true" ';
-  else 
-    return ''; 
+  else
+    return '';
 }
 ;
- 
-create procedure 
+
+create procedure
 b3s_parse_inf (in sid varchar, inout params any)
 {
   declare _sas, _inf varchar;
 
-  _sas := _inf := null; 
+  _sas := _inf := null;
 
   if (sid is not null)
-    { 
+    {
       for select fct_state from fct_state where fct_sid = sid do
         {
 	  declare i varchar;
@@ -277,7 +322,7 @@ b3s_parse_inf (in sid varchar, inout params any)
     {
       if (_sas = '1' or _sas = 'yes')
         connection_set ('sas', 'yes');
-      else 
+      else
         connection_set ('sas', null);
     }
 }
@@ -291,22 +336,22 @@ b3s_render_inf_clause ()
   _inf := connection_get ('inf');
   _sas := connection_get ('sas');
 
-  if (_inf is not null) 
-    _inf := sprintf (' define input:inference ''%s'' ', _inf);
-  else 
+  if (_inf is not null)
+    _inf := sprintf ('define input:inference ''%s'' ', _inf);
+  else
     _inf := '';
 
   if (_sas is not null)
-    _sas := sprintf (' define input:same-as "yes" ');
-  else 
+    _sas := sprintf ('define input:same-as "yes" ');
+  else
     _sas := '';
 
-  return (_inf || _sas); 
+  return (_inf || _sas);
 }
 ;
 
 create procedure
-b3s_render_ses_params () 
+b3s_render_ses_params ()
 {
   declare i,s,ifp,sid varchar;
 
@@ -323,7 +368,7 @@ b3s_render_ses_params ()
 }
 ;
 
-create procedure 
+create procedure
 b3s_dbg_out (inout ses any, in str any)
 {
   if (connection_get ('b3s_dbg'))
@@ -331,10 +376,10 @@ b3s_dbg_out (inout ses any, in str any)
 }
 ;
 
-create procedure 
+create procedure
 b3s_render_dbg_out (inout ses any)
 {
-  if (connection_get ('b3s_dbg')) 
+  if (connection_get ('b3s_dbg'))
     {
       http('<div id="dbg_output"><pre>');
       http_value (ses);
@@ -349,6 +394,8 @@ create procedure b3s_get_lang_by_q (in accept varchar, in lang varchar)
   declare arr any;
   declare i, l int;
 
+  if (not length (lang))
+    lang := 'en';
   arr := split_and_decode (accept, 0, '\0\0,;');
   q := 0;
   l := length (arr);
@@ -400,15 +447,20 @@ create procedure b3s_label_get (inout data any, in langs any)
 	    }
 	 }
      }
-   if (__tag of rdf_box = __tag (label))
-     label := rdf_box_data (label);
+   if (not isstring (label))
+     {
+       if (__tag of rdf_box = __tag (label)  and rdf_box_is_complete (label))
+	 label := rdf_box_data (label);
+       else
+	 label := __rdf_strsqlval (label);
+     }
    if (not isstring (label))
      label := cast (label as varchar);
-   --label := regexp_replace (label, '<[^>]+>', '', 1, null);  
+   --label := regexp_replace (label, '<[^>]+>', '', 1, null);
   if (0 and sys_stat ('cl_run_local_only'))
     {
-   label := xpath_eval ('string(.)', xtree_doc (label, 2));
-   label := charset_recode (label, '_WIDE_', 'UTF-8');
+      label := xpath_eval ('string(.)', xtree_doc (label, 2));
+      label := charset_recode (label, '_WIDE_', 'UTF-8');
     }
   else
     label := cast (xtree_doc (label, 2) as varchar);
@@ -416,7 +468,7 @@ create procedure b3s_label_get (inout data any, in langs any)
 }
 ;
 
-create procedure 
+create procedure
 b3s_rel_print (in val any, in rel any, in flag int := 0)
 {
   declare delim, delim1, delim2, delim3 integer;
@@ -454,7 +506,7 @@ b3s_rel_print (in val any, in rel any, in flag int := 0)
 ;
 
 
-create procedure 
+create procedure
 b3s_uri_curie (in uri varchar)
 {
   declare delim integer;
@@ -497,7 +549,7 @@ create procedure b3s_prop_label (in uri any)
   if (length (ll) = 0)
     ll := b3s_uri_curie (uri);
   if (isstring (ll) and ll like 'opl%:isDescribedUsing')
-    ll := 'Described Using Terms From';  
+    ll := 'Described Using Terms From';
   return ll;
 }
 ;
@@ -506,7 +558,7 @@ create procedure
 b3s_trunc_uri (in s varchar, in maxlen int := 80)
 {
   declare _s varchar;
-  declare _h int; 
+  declare _h int;
 
   _s := trim(s);
 
@@ -518,7 +570,7 @@ b3s_trunc_uri (in s varchar, in maxlen int := 80)
 }
 ;
 
-create procedure 
+create procedure
 b3s_http_url (in url varchar, in sid varchar := null, in _from varchar := null)
 {
   declare host, pref, more, i varchar;
@@ -533,29 +585,31 @@ b3s_http_url (in url varchar, in sid varchar := null, in _from varchar := null)
   i := b3s_render_ses_params();
   if (length (_from))
     i := sprintf ('%s&graph=%U', i, _from);
-  
+
   return sprintf ('/describe/?url=%U%s', url, i);
 };
 
-create procedure 
-b3s_http_print_l (in p_text any, inout odd_position int, in r int := 0, in sid varchar := null)
+create procedure
+b3s_http_print_l (in p_text any, inout odd_position int, in r int := 0, in sid varchar := null, in langs any := null)
 {
    declare short_p, p_prefix, int_redirect, url any;
 
-   odd_position :=  odd_position + 1;
-   p_prefix := b3s_prop_label (p_text);
+   odd_position := odd_position + 1;
+   p_prefix := b3s_label (p_text, langs);
+   if (not length (p_prefix))
+     p_prefix := b3s_uri_curie (p_text);
    url := b3s_http_url (p_text, sid);
 
    if (not length (p_text))
      return;
 
-   http (sprintf ('<tr class="%s"><td class="property">', either(mod (odd_position, 2), 'odd', 'even')));
+   http (sprintf ('<tr class="%s"><td class="property">', either (mod (odd_position, 2), 'odd', 'even')));
 
    if (r) http ('is ');
 
-   http (sprintf ('<a class="uri" href="%s" title="%s">%s</a>\n', 
-                  url, 
-                  p_prefix, 
+   http (sprintf ('<a class="uri" href="%s" title="%s">%s</a>\n',
+                  url,
+                  p_prefix,
                   b3s_trunc_uri (p_prefix, 40)));
 
    if (r) http (' of');
@@ -564,15 +618,18 @@ b3s_http_print_l (in p_text any, inout odd_position int, in r int := 0, in sid v
 }
 ;
 
-create procedure b3s_label (in _S any, in langs any)
+create procedure b3s_label (in _S any, in langs any, in lbl_order_pref_id int := 0)
 {
   declare best_str, meta, data any;
   declare best_q, q float;
   declare lang, stat, msg varchar;
 
   stat := '00000';
-  exec (sprintf ('sparql define input:inference "virtrdf-label" '||
-  'select ?o (lang(?o)) where { <%S> virtrdf:label ?o }', _S), stat, msg, vector (), 0, meta, data);
+  --exec (sprintf ('sparql define input:inference "facets" '||
+  --'select ?o (lang(?o)) where { <%S> virtrdf:label ?o }', _S), stat, msg, vector (), 0, meta, data);
+  exec (sprintf ('select __ro2sq (O), DB.DBA.RDF_LANGUAGE_OF_OBJ (__ro2sq (O)) , cast (b3s_lbl_order (P, %d) as int) from RDF_QUAD table option (with ''facets'')
+	where S = __i2id (?) and P = __i2id (''http://www.openlinksw.com/schemas/virtrdf#label'', 0) and not is_bnode_iri_id (O) order by 3', lbl_order_pref_id),
+	stat, msg, vector (_S), 0, meta, data);
   if (stat <> '00000')
     return '';
   best_str := '';
@@ -581,7 +638,7 @@ create procedure b3s_label (in _S any, in langs any)
     {
       for (declare i, l int, i := 0, l := length (data); i < l; i := i + 1)
 	{
-	  q := rdfdesc_get_lang_by_q (langs, data[i][1]);
+	  q := b3s_get_lang_by_q (langs, data[i][1]);
 	  --dbg_obj_print (data[i][0], langs, data[i][1], q);
           if (q > best_q)
 	    {
@@ -591,17 +648,23 @@ create procedure b3s_label (in _S any, in langs any)
 	}
     }
   if (__tag (best_str) = 246)
-    best_str := rdf_box_data (best_str);
+    {
+      best_str := __rdf_strsqlval (best_str);
+    }
+
+  if (isnumeric (best_str))
+    return (cast (best_str as varchar));
+
   return best_str;
 }
 ;
 
-create procedure 
+create procedure
 b3s_http_print_r (in _object any, in sid varchar, in prop any, in langs any, in rel int := 1, in acc any := null, in _from varchar := null)
 {
    declare lang, rdfs_type, rdfa, visible any;
 
-   if (_object is null) 
+   if (_object is null)
      return;
 
    if (__tag (_object) = 230)
@@ -644,29 +707,39 @@ again:
 	 _url := _object;
 
        if (not length (_url))
-         return;	 
+         return;
 
        http (sprintf ('<!-- %d -->', length (_url)));
 
        rdfa := b3s_rel_print (prop, rel, 0);
-       if (http_mime_type (_url) like 'image/%')
+       if (prop = 'http://bblfish.net/work/atom-owl/2006-06-06/#content' and _object like '%#content%')
+	 {
+	   declare src any;
+	   whenever not found goto usual_iri;
+	   select id_to_iri (O) into src from DB.DBA.RDF_QUAD where
+	   	S = iri_to_id (_object, 0) and P = iri_to_id ('http://bblfish.net/work/atom-owl/2006-06-06/#src', 0);
+	   http (sprintf ('<div id="x_content"><iframe src="%s" width="100%%" height="100%% frameborder="0"><p>Your browser does not support iframes.</p></iframe></div><br/>', src));
+	 }
+       else if (http_mime_type (_url) like 'image/%')
 	 http (sprintf ('<a class="uri" %s href="%s"><img src="%s" height="160" style="border-width:0" alt="External Image" /></a>', rdfa, b3s_http_url (_url, sid, _from), _url));
        else
 	 {
-	   declare lbl any;
+	   usual_iri:;
+	   declare lbl, vlbl any;
 	   lbl := '';
-	   if (registry_get ('fct_desc_value_labels') = '1' and (__tag (_object) = 243 or (isstring (_object) and __box_flags (_object) = 1)))
-	     lbl := b3s_label (_url, langs);
+	   if ((registry_get ('fct_desc_value_labels') = '1' or registry_get ('fct_desc_value_labels') = 0) and (__tag (_object) = 243 or (isstring (_object) and __box_flags (_object) = 1)))
+	     lbl := b3s_label (_url, langs, 1);
 	   if ((not isstring(lbl)) or length (lbl) = 0)
 	     lbl := b3s_uri_curie(_url);
-	   -- XXX: must encode as wide label to print correctly  
+	   -- XXX: must encode as wide label to print correctly
 	   --http (sprintf ('<a class="uri" %s href="%s">%V</a>', rdfa, b3s_http_url (_url, sid, _from), lbl));
 	   http (sprintf ('<a class="uri" %s href="%s">', rdfa, b3s_http_url (_url, sid, _from)));
-	   http_value (charset_recode (lbl, 'UTF-8', '_WIDE_'));
+	   vlbl := charset_recode (lbl, 'UTF-8', '_WIDE_');
+	   http_value (case when vlbl <> 0 then vlbl else lbl end);
 	   http (sprintf ('</a>'));
 	 }
        --if (registry_get ('fct_sponge') = '1' and _url like 'http://%' or _url like 'https://%')
-       --	 http (sprintf (' <a class="uri" href="%s&sp=1"><img src="/fct/images/goout.gif" title="Sponge" border="0"/></a>', 
+       --	 http (sprintf (' <a class="uri" href="%s&sp=1"><img src="/fct/images/goout.gif" title="Sponge" border="0"/></a>',
        --	       b3s_http_url (_url, sid)));
 
      }
@@ -692,8 +765,16 @@ again:
      }
    else if (__tag (_object) = 182)
      {
+       declare vlbl any;
        http (sprintf ('<span %s>', rdfa));
+       _object := regexp_replace (_object, ' (http://[^ ]+) ', ' <a href="\\1">\\1</a> ', 1, null);
+       vlbl := charset_recode (_object, 'UTF-8', '_WIDE_');
+       if (vlbl = 0)
+         vlbl := charset_recode (_object, current_charset (), '_WIDE_');
+       if (vlbl = 0)
        http (_object);
+       else
+         http_value (vlbl);
        http ('</span>');
        lang := '';
      }
@@ -715,7 +796,7 @@ again:
    else if (__tag (_object) = 225)
      {
        http (sprintf ('<span %s>', rdfa));
-     http (charset_recode (_object, '_WIDE_', 'UTF-8'));
+       http (charset_recode (_object, '_WIDE_', 'UTF-8'));
        http ('</span>');
      }
    else if (__tag (_object) = 238)
@@ -771,25 +852,35 @@ create procedure b3s_page_get_short (in val any)
 }
 ;
 
+create procedure fct_links_formats ()
+{
+  return vector (
+  	   vector ('application/rdf+xml','RDF/XML'),
+  	   vector ('text/n3','N3/Turtle'),
+  	   vector ('application/rdf+json','RDF/JSON'),
+  	   vector ('application/atom+xml','OData/Atom'),
+  	   vector ('application/odata+json','OData/JSON'),
+  	   vector ('text/cxml','CXML'),
+  	   vector ('text/csv','CSV'),
+  	   vector ('application/microdata+json','Microdata/JSON'),
+  	   vector ('text/html','HTML+Microdata'),
+  	   vector ('application/ld+json','JSON-LD')
+  	);
+}
+;
+
 create procedure fct_links_hdr (in subj any, in desc_link any)
 {
   declare links varchar;
+  declare vec any;
   desc_link := sprintf ('http://%{WSHost}s%s', desc_link);
   links := 'Link: ';
-  links := links || 
-  sprintf ('<%s&output=application%%2Frdf%%2Bxml>; rel="alternate"; type="application/rdf+xml"; title="Structured Descriptor Document (RDF/XML format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=text%%2Fn3>; rel="alternate"; type="text/n3"; title="Structured Descriptor Document (N3/Turtle format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=application%%2Frdf%%2Bjson>; rel="alternate"; type="application/rdf+json"; title="Structured Descriptor Document (RDF/JSON format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=application%%2Fatom%%2Bxml>; rel="alternate"; type="application/atom+xml"; title="Structured Descriptor Document (OData/Atom format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=application%%2Fodata%%2Bjson>; rel="alternate"; type="application/odata+json"; title="Structured Descriptor Document (OData/JSON format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=text%%2Fcxml>; rel="alternate"; type="text/cxml"; title="Structured Descriptor Document (CXML format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=text%%2Fcsv>; rel="alternate"; type="text/csv"; title="Structured Descriptor Document (CSV format)",', desc_link);
+  vec := fct_links_formats ();
+  foreach (any elm in vec) do
+    {
+      links := links ||
+      sprintf ('<%s&output=%U>; rel="alternate"; type="%s"; title="Structured Descriptor Document (%s format)",', desc_link, elm[0], elm[0], elm[1]);
+    }
   links := links || sprintf ('<%s>; rel="http://xmlns.com/foaf/0.1/primaryTopic",', subj);
   links := links || sprintf ('<%s>; rev="describedby"\r\n', subj);
   http_header (http_header_get () || links);
@@ -800,22 +891,15 @@ create procedure fct_links_hdr (in subj any, in desc_link any)
 create procedure fct_links_mup (in subj any, in desc_link any)
 {
   declare links varchar;
+  declare vec any;
   desc_link := sprintf ('http://%{WSHost}s%s', desc_link);
   links := '';
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Frdf%%2Bxml" rel="alternate" type="application/rdf+xml"  title="Structured Descriptor Document (RDF/XML format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=text%%2Fn3" rel="alternate" type="text/n3" title="Structured Descriptor Document (N3/Turtle format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Frdf%%2Bjson" rel="alternate" type="application/rdf+json" title="Structured Descriptor Document (RDF/JSON format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Fatom%%2Bxml" rel="alternate" type="application/atom+xml" title="Structured Descriptor Document (OData/Atom format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Fatom%%2Bjson" rel="alternate" type="application/atom+json" title="Structured Descriptor Document (OData/JSON format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=text%%2Fcxml" rel="alternate" type="text/cxml" title="Structured Descriptor Document (CXML format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=text%%2Fcsv" rel="alternate" type="text/csv" title="Structured Descriptor Document (CSV format)" />\n', desc_link);
+  vec := fct_links_formats ();
+  foreach (any elm in vec) do
+    {
+      links := links || repeat (' ', 5) ||
+      sprintf ('<link href="%V&output=%U" rel="alternate" type="%s"  title="Structured Descriptor Document (%s format)" />\n', desc_link, elm[0], elm[0], elm[1]);
+    }
   links := links || repeat (' ', 5) || sprintf ('<link href="%V" rel="http://xmlns.com/foaf/0.1/primaryTopic" />\n', subj);
   links := links || repeat (' ', 5) || sprintf ('<link href="%V" rev="describedby" />\n', subj);
   http (links);
@@ -823,13 +907,13 @@ create procedure fct_links_mup (in subj any, in desc_link any)
 ;
 
 create procedure
-fct_make_selector (in subj any, in sid integer) 
+fct_make_selector (in subj any, in sid integer)
 {
   return null;
-}	
+}
 ;
 
-create procedure fct_make_qr_code (in data_to_qrcode any, in src_width int := 120, in src_height int := 120, in qr_scale int := 4)
+create procedure fct_make_qr_code (in data_to_qrcode any, in src_width int := 120, in src_height int := 120, in qr_scale int := 3)
 {
   declare qrcode_bytes, mixed_content, content varchar;
   declare qrcode any;
@@ -842,7 +926,7 @@ create procedure fct_make_qr_code (in data_to_qrcode any, in src_width int := 12
   content := "IM CreateImageBlob" (src_width, src_height, 'white', 'jpg');
   qrcode := "QRcode encodeString8bit" (data_to_qrcode);
   qrcode_bytes := aref_set_0 (qrcode, 0);
-  mixed_content := "IM PasteQRcode" (qrcode_bytes, qrcode[1], qrcode[2], qr_scale, qr_scale, 0, 0, cast (content as varchar), length (content));
+  mixed_content := "IM PasteQRcode" (qrcode_bytes, qrcode[1], qrcode[2], qr_scale, qr_scale + 2, 0, 0, cast (content as varchar), length (content));
   mixed_content := encode_base64 (cast (mixed_content as varchar));
   mixed_content := replace (mixed_content, '\r\n', '');
   return mixed_content;
@@ -932,3 +1016,48 @@ create procedure DB.DBA.SPARQL_DESC_DICT_LOD (in subj_dict any, in consts any, i
 grant execute on DB.DBA.SPARQL_DESC_DICT_LOD_PHYSICAL to "SPARQL_SELECT";
 grant execute on DB.DBA.SPARQL_DESC_DICT_LOD to "SPARQL_SELECT";
 
+create procedure b3s_lbl_order (in p any, in lbl_order_pref_id int := 0)
+{
+  declare r int;
+  r := vector (
+  'http://www.w3.org/2000/01/rdf-schema#label',
+  'http://xmlns.com/foaf/0.1/name',
+  'http://purl.org/dc/elements/1.1/title',
+  'http://purl.org/dc/terms/title',
+  'http://xmlns.com/foaf/0.1/nick',
+  'http://usefulinc.com/ns/doap#name',
+  'http://rdf.data-vocabulary.org/name',
+  'http://www.w3.org/2002/12/cal/ical#summary',
+  'http://aims.fao.org/aos/geopolitical.owl#nameListEN',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.crunchbase.com/source_description',
+  'http://dbpedia.org/property/name',
+  'http://www.geonames.org/ontology#name',
+  'http://purl.org/ontology/bibo/shortTitle',
+  'http://www.w3.org/1999/02/22-rdf-syntax-ns#value',
+  'http://xmlns.com/foaf/0.1/accountName',
+  'http://www.w3.org/2004/02/skos/core#prefLabel',
+  'http://rdf.freebase.com/ns/type.object.name',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.w3.org/2008/05/skos#prefLabel',
+  'http://www.w3.org/2002/12/cal/icaltzd#summary',
+  'http://rdf.data-vocabulary.org/name',
+  'http://rdf.freebase.com/ns/common.topic.alias',
+  'http://opengraphprotocol.org/schema/title',
+  'http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema.rdf#Name',
+  'http://poolparty.punkt.at/demozone/ont#title',
+  'http://linkedopencommerce.com/schemas/icecat/v1/hasShortSummaryDescription',
+  'http://www.openlinksw.com/schemas/googleplus#displayName'
+   );
+
+  if (lbl_order_pref_id = 1)
+    -- Give skos:prefLabel precedence
+    -- NLP meta-cartridges use skos:prefLabel to include a prefix identifying the meta-cartridge which identified a named entity
+    r := vector_concat (vector ('http://www.w3.org/2004/02/skos/core#prefLabel'), r);
+
+  r := position (id_to_iri (p), r);
+  if (r = 0)
+    return 100;
+  return r;
+}
+;
diff --git a/binsrc/b3s/rdfdesc/description.vsp b/binsrc/b3s/rdfdesc/description.vsp
index ebbda4d..8117da3 100644
--- a/binsrc/b3s/rdfdesc/description.vsp
+++ b/binsrc/b3s/rdfdesc/description.vsp
@@ -1,15 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" version="XHTML+RDFa 1.0">
+<html
+    xmlns="http://www.w3.org/1999/xhtml"
+    xml:lang="en"
+    version="XHTML+RDFa 1.0"
+    xmlns:addthis="http://www.addthis.com/help/api-spec"
+    xmlns:fb="http://www.facebook.com/2008/fbml"
+>
 <?vsp
 --
 --
---  $Id: description.vsp,v 1.1.2.37 2011/03/25 16:19:26 source Exp $
+--  $Id: description.vsp,v 1.1.2.67 2012/03/15 16:35:35 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -25,59 +31,92 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 --
-   declare _S, odd_position any;
-   declare page_resource_uri, proxy_iri, rdf_link, label, true_label, _subject any;
-   declare white_page, arr, data, meta, h1, h2, inx, gr, host, refr, sid, inf, sas, langs, best_q any;
-   declare urilookup integer;
-   declare dbg_enable varchar;
-   declare qry_str varchar;
-   declare dbg_out any;
-   declare inf_parm varchar;
+
+--
+-- Registry keys:
+--
+-- fct_timeout_max - anytime query timeout for producing this page
+-- fct_addthis_key - addthis.com API key
+-- fct_license_text - markup designating a license for content on site
+--
+
+
+  declare _S, odd_position any;
+  declare page_resource_uri, proxy_iri, rdf_link, label, vlbl, _subject any;
+  declare white_page, arr, data, meta, h1, h2, inx, gr, host, refr, sid, inf, sas, langs, best_q any;
+  declare urilookup integer;
+  declare dbg_enable varchar;
+  declare qry_str varchar;
+  declare dbg_out any;
+  declare inf_parm varchar;
   declare ses_parms varchar;
   declare all_langs, lang_parm any;
-  declare c_iri, iri_type, iri_uri, _F, _from, topof varchar;
+  declare c_iri, iri_type, iri_type_label, iri_uri, _F, _from, topof varchar;
   declare page, n_per_page, lim, ofs, dis_next int;
   declare vis, printed, _skip, _last int;
   declare all_lang any;
   declare curr_pred any;
-  declare dt1, dt2, count_str, tbinf, ua varchar;
+  declare dt1, dt2, count_str, tbinf, tbsas, ua, doc, sp_mode, sp_accept varchar;
+  declare c_iri_a any;
+
+  declare continue handler for sqlstate 'S1TAT';
+  set result_timeout = atoi (registry_get ('fct_timeout_max'));
 
   n_per_page := 100;
   dis_next := 0;
-   dbg_enable := get_keyword ('dbg', params);
-   if (dbg_enable = '1') 
-     {
+  dbg_enable := get_keyword ('dbg', params);
+  if (dbg_enable = '1')
+    {
         dbg_printf ('Enabling b3s session debug.\n');
         connection_set ('b3s_dbg', 1);
         dbg_out := string_output ();
-     }
-   else connection_set ('b3s_dbg',0);
-     
+    }
+  else connection_set ('b3s_dbg',0);
+
   connection_set ('ns_ctr', 1); /* for unknown xmlns to print in RDFa */
 
   white_page := 1;
   sid := null;
   inf := '';
   iri_type := 'unknown';
+  sp_mode := 'add';
 
   b3s_handle_ses (path, lines, params);
   sid := connection_get ('sid');
 
-   b3s_parse_inf (sid, params);
-   inf := b3s_render_inf_clause ();
+  b3s_parse_inf (sid, params);
+  inf := b3s_render_inf_clause ();
   tbinf := connection_get ('inf');
+  tbsas := connection_get ('sas');
   if (tbinf is not null)
     tbinf := sprintf ('TABLE OPTION (WITH \'%s\')', tbinf);
   else
     tbinf := '';
-  
+
+  if (tbsas is not null)
+    tbsas := '';
+  else
+    tbsas := '';
+
+
+  --
+  -- Get AddthisKey from registry
+  --
+  --  if 0 then disable addthis support
+  --  if 1 use temp key to get basic social bookmarking
+  --  any other value should be a registered key
+  --
+  declare _addthis_key varchar;
+  _addthis_key := registry_get ('fct_addthis_key');
+  if (not isstring(_addthis_key)) _addthis_key := '0';
+  if ('1' = _addthis_key) _addthis_key := 'xa-4ce13e0065cdadc0';
 
   ses_parms := b3s_render_ses_params ();
 
-  host := http_request_header (http_request_header (), 'X-Forwarded-Host', null, null);  
+  host := http_request_header (http_request_header (), 'X-Forwarded-Host', null, null);
   if (host is null)
-   host := http_request_header (http_request_header (), 'Host');  
-   langs := http_request_header_full (lines, 'Accept-Language', 'en');
+    host := http_request_header (http_request_header (), 'Host');
+  langs := http_request_header_full (lines, 'Accept-Language', 'en');
   ua :=   http_request_header (lines, 'User-Agent');
   all_langs := b3s_get_lang_acc (lines);
   lang_parm := get_keyword ('lang', params, '');
@@ -86,78 +125,122 @@
       all_langs := vector (lang_parm, 1.0);
       langs := lang_parm;
     }
-   gr := get_keyword ('g', params, '');
+  gr := get_keyword ('g', params, '');
   _from := get_keyword ('graph', params, '');
---  dbg_obj_print_vars (gr, _F);
+  --  dbg_obj_print_vars (gr, _F);
   if (length (_from))
     _F := concat ('FROM <', _from, '>');
   else
     _F := '';
 
+
+  page := null;
+
    _last := atoi (get_keyword ('lp', params, '0'));
-  if ({?'prev'} is not null)  
+  if ({?'prev'} is not null)
     page := atoi (get_keyword ('op', params, '0'));
-  else if ({?'first'} is not null)  
-    page := 0; 
-  else if ({?'last'} is not null)  
+  else if ({?'first'} is not null)
+    page := 0;
+  else if ({?'last'} is not null)
     page := _last;
-  else if ({?'next'} is not null) 
+  else if ({?'next'} is not null)
     page := atoi (get_keyword ('p', params, '0'));
-  else if ({?'go'} is not null) 
+  else if ({?'go'} is not null)
     page := atoi (get_keyword ('gp', params, '1')) - 1;
-  else 
+  else
     page := atoi (get_keyword ('p', params, '1')) - 1;
   --topof := '';
   b3s_dbg_out (dbg_out, 'sid     : ' || sid);
   b3s_dbg_out (dbg_out, 'gr      : ' || gr);
 
-   arr := rfc1808_parse_uri (gr);
+  arr := rfc1808_parse_uri (gr);
+
+  if (arr[0] = '' and arr[1] = '' and arr[2] <> '')
+    gr := 'http://' || gr;
 
-   if (arr[0] = '' and arr[1] = '' and arr[2] <> '')
-     gr := 'http://' || gr;
+  arr := rfc1808_parse_uri (gr);
+  arr [5] := '';
+  doc := vspx_uri_compose (arr);
 
-   page_resource_uri := gr;
-   page_resource_uri := replace (page_resource_uri, '%23', '#');
+  page_resource_uri := gr;
+  page_resource_uri := replace (page_resource_uri, '%23', '#');
   page_resource_uri := replace (page_resource_uri, ' ', '%20');
-   
-   _S := page_resource_uri; 
-   proxy_iri := page_resource_uri;
+  page_resource_uri := replace (page_resource_uri, '"', '%22');
 
-  b3s_dbg_out (dbg_out, 'page_resource_uri: ' || page_resource_uri);
+  _S := page_resource_uri;
+  proxy_iri := page_resource_uri;
 
+  b3s_dbg_out (dbg_out, 'page_resource_uri: ' || page_resource_uri);
+  sp_mode := get_keyword ('sponger:get', params, 'add');
+  sp_accept := get_keyword ('sponger:accept', params, '');
+  if (length (sp_accept))
+    sp_accept := 'define get:accept "' || sp_accept || '"';
   if (get_keyword ('sp', params) = '1' and 0 = length (_F))
     {
-      DB.DBA.EXEC_AS (sprintf ('sparql define input:storage "" define get:soft "soft" SELECT * from <%S> where { ?x ?y ?z . }', gr), 'SPARQL');
+      DB.DBA.EXEC_AS (sprintf ('sparql define input:storage "" define get:soft "add" SELECT * from <%S> where { ?x ?y ?z . }', doc), 'SPARQL');
       DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ ();
     }
+  else if ((get_keyword ('sr', params) is not null or get_keyword ('sponger:get', params) is not null or length (sp_accept) > 0) and 0 = length (_F))
+    {
+      declare refr varchar;
+      if (get_keyword ('sr', params, '') = 'clean')
+	{
+	  refr := 0;
+	  if (exists (select 1 from SYS_HTTP_SPONGE where HS_ORIGIN_URI = doc))
+	    {
+	      sparql clear graph ?:doc;
+            }
+        }
+      else
+        refr := atoi (get_keyword ('sr', params, '0'));
+      DB.DBA.EXEC_AS (sprintf ('sparql define input:storage "" define get:refresh "%d" define get:soft "%s" %s SELECT * from <%S> where { ?x ?y ?z . }', refr, sp_mode, sp_accept, doc), 'SPARQL');
+      DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ ();
+    }
+
 
-   odd_position := 0;
-   set http_charset='utf-8';
-   set isolation = 'uncommitted';
-   http_header ('Cache-Control: no-cache, must-revalidate\r\nPragma: no-cache\r\n');
-   label := ''; _subject := '';
+  odd_position := 0;
+  set http_charset='utf-8';
+  set isolation = 'uncommitted';
 
-  qry_str := sprintf ('sparql define input:inference "facets" select ?o (lang(?o)) %s where { <%S> virtrdf:label ?o }', _F, _S);
-   b3s_dbg_out (dbg_out, 'qry: ' || qry_str);
+  http_header ('Cache-Control: no-cache, must-revalidate\r\nPragma: no-cache\r\n');
+  label := ''; _subject := '';
 
---dbg_obj_print (qry_str);
+  --qry_str := sprintf ('sparql define input:inference "facets" select ?o (lang(?o)) %s where { <%S> virtrdf:label ?o }', _F, _S);
+  --b3s_dbg_out (dbg_out, 'qry: ' || qry_str);
+  --dbg_obj_print (qry_str);
+  --exec (qry_str, null, null, vector (), 0, meta, data);
 
-   exec (qry_str, null, null, vector (), 0, meta, data);
+  --exec ('select __ro2sq (O), DB.DBA.RDF_LANGUAGE_OF_OBJ (__ro2sq (O)) , b3s_lbl_order (P) from RDF_QUAD table option (with ''facets'')
+  --	where S = __i2id (?) and P = __i2id (''http://www.openlinksw.com/schemas/virtrdf#label'', 0) and not is_bnode_iri_id (O)  order by 3',
+  --	null, null, vector (_S), 0, meta, data);
+
+  label := b3s_label (_S, langs);
+
+  if (iswidestring (label))
+    vlbl := label;
+  else
+    vlbl := charset_recode (label, 'UTF-8', '_WIDE_');
+  if (vlbl = 0)
+    vlbl := charset_recode (label, current_charset (), '_WIDE_');
+  if (vlbl = 0)
+    vlbl := label; 
+
+  b3s_dbg_out (dbg_out, 'label: "' || vlbl || '"');
 
-   label := b3s_label_get (data, langs);
-   true_label := label;
   iri_type := b3s_type (_S, _F, iri_uri, c_iri);
+  iri_type_label := b3s_label (c_iri, langs);
+  if (iri_type_label = '') iri_type_label := iri_type;
 
   qry_str := sprintf ('sparql %s prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dc: <http://purl.org/dc/elements/1.1/> select ?o (lang(?o)) %s where { <%S> rdfs:comment ?o }', inf, _F, _S);
 --    dbg_obj_print (qry_str);
 
-   b3s_dbg_out (dbg_out, 'qry: ' || qry_str);
+  b3s_dbg_out (dbg_out, 'qry: ' || qry_str);
 
-   exec (qry_str, null, null, vector (), 0, meta, data);
+  exec (qry_str, null, null, vector (), 0, meta, data);
 
-   _subject := b3s_label_get (data, langs);
+  _subject := b3s_label_get (data, langs);
 
-  rdf_link := sprintf ('/sparql?query=%U', sprintf ('define sql:describe-mode "LOD" %s DESCRIBE <%s>', b3s_render_inf_clause(), _S)); 
+  rdf_link := sprintf ('/sparql?query=%U', sprintf ('define sql:describe-mode "LOD" %s DESCRIBE <%s>', b3s_render_inf_clause(), _S));
 
   declare __res_desc, qs, qv, best_variant, accept varchar;
   declare best_q, curr float;
@@ -181,7 +264,7 @@
         {
 	  best_q := curr;
 	  best_variant := q;
-	} 
+	}
       inx := inx + 1;
     }
   if (best_variant is null)
@@ -198,27 +281,57 @@
           inx := inx + 1;
 	}
       http_header (http_header_get () || '\r\n');
-      return; 
+      return;
     }
   if (best_variant is not null and best_variant not in ('text/html', 'application/xhtml+xml'))
     {
       http_rewrite ();
       http_status_set (303);
       http_header (sprintf ('TCN: choice\r\nVary: negotiate,accept\r\nLocation: http://%{WSHost}s%s&format=%U\r\n', rdf_link, best_variant));
-      return; 
+      return;
     }
   __res_desc := b3s_uri_curie(page_resource_uri);
   fct_links_hdr (_S, rdf_link);
   if (not length (label))
     label := b3s_trunc_uri (page_resource_uri);
+  if (vlbl <> 0) label := vlbl;
+  declare desc_resource_uri varchar;
+  declare desc_qr varchar;
+  desc_qr := sprintf ('define sql:describe-mode "CBD" DESCRIBE <%s>', page_resource_uri);
+  desc_resource_uri := sprintf ('http://%{WSHost}s/sparql?query=%U&format=cxml', desc_qr);
   --http_flush (1);
+
+  declare plink_href varchar;
+
+  plink_href := sprintf ('/describe/?url=%U', page_resource_uri);
+
+  if (page is not null and page > 0)
+    {
+      plink_href := concat (plink_href, sprintf ('&gp=%d&go=', page+1));
+    }
+  if (connection_get ('inf') is not null)
+    {
+      plink_href := concat (plink_href, sprintf ('&inf=%U', connection_get ('inf')));
+    }
+  if (connection_get ('sas') is not null)
+    {
+      plink_href := concat (plink_href, sprintf ('&sas=%U', connection_get ('sas')));
+    }
+
+
 ?>
 <head>
     <base href="http://<?V host ?>/fct/rdfdesc/" />
-    <title>About: <?vsp http (label); ?></title>
+    <title>About: <?vsp if (length (label)) http_value (label); else http_value (b3s_uri_curie (page_resource_uri));?></title>
     <!--link rel="alternate" type="application/rdf+xml" href="<?=rdf_link?>" title="RDF" /-->
 
-    <link rel="stylesheet" type="text/css" href="styles/default.css"  charset="utf-8" />
+    <?vsp
+	declare main_ss varchar;
+        main_ss := registry_get ('fct_main_ss');
+        if (not isstring (main_ss)) main_ss := 'styles/default.css';
+    ?>
+    <link rel="stylesheet" type="text/css" href="<?=main_ss?>"  charset="utf-8" />
+
     <link rel="stylesheet" type="text/css" href="styles/highlighter.css" charset="utf-8" />
     <script type="text/javascript" >
       var featureList=["tab"];
@@ -227,23 +340,23 @@
     <script type="text/javascript" src="s/description.js"></script>
 <?vsp fct_links_mup (_S, rdf_link); ?>
 </head>
-  <body about="<?V page_resource_uri ?>">
-    <div id="PG">
-      <div id="HD">
-    <?vsp fct_page_head (); ?>
+<body about="<?V page_resource_uri ?>">
+  <div id="PG">
+    <div id="HD">
+    <?vsp fct_desc_page_head (); ?>
     <ul id="main_menu">
       <?vsp if (sid is not null) { ?>
         <li><a href="<?= b3s_render_fct_link() ?>">Facets</a></li>
       <?vsp } ?>
       <li id="mnu_descr" class="sel"><a href="/describe/?uri=<?V _S ?><?V ses_parms ?>" class="sel">Description</a></li>
       <li id="mnu_usage">
-        <a href="usage.vsp?g=<?U _S ?><?V ses_parms ?>">Usage Statistics</a>
+        <a href="usage.vsp?g=<?U _S ?><?V ses_parms ?>">Metadata</a>
       </li>
       <li id="mnu_settings"><a href="settings.vsp?g=<?U _S ?><?V ses_parms ?>">Settings</a>
         <div id="settings_popup" style="display: none">
           <ul>
             <li>
-              <input id="sas_ckb" type="checkbox" <?= b3s_sas_selected() ?> onchange="javascript:sas_cb();"/> 
+              <input id="sas_ckb" type="checkbox" <?= b3s_sas_selected() ?> onchange="javascript:sas_cb();"/>
               <label for="sas_ckb">owl:sameAs</label>
             </li>
             <li>
@@ -254,37 +367,70 @@
         </div> <!-- settings-popup -->
       </li>
     </ul>
-    </div> <!-- #HD -->
-    <div id="MD">
-        <div class="page_resource_info">
-	<h2>About: <a href="<?= case when page_resource_uri like 'nodeID://%' then b3s_http_url (page_resource_uri) else page_resource_uri end ?>"><?vsp http (label); ?></a>   <a href="/describe/?url=<?U page_resource_uri ?>&sid=<?V sid ?>&sp=1" title="Click to generate local descriptor data for this entity" id="sp_link" rel="nofollow"><img src="/fct/images/sponge.png" title="Click to generate local descriptor data for this entity" alt="Generate local descriptor data" /></a></h2>
-      <div class="ds_inf_info"> 
-	    An Entity of Type : <a href="<?V iri_uri ?>"><?V iri_type ?></a>, 
+  </div> <!-- #HD -->
+  <div id="MD">
+    <div class="page_resource_info">
+	<h2>About: <a href="<?= case when page_resource_uri like
+    'nodeID://%' then b3s_http_url (page_resource_uri) else
+    page_resource_uri end ?>"><?vsp if (length(label)) http_value
+    (label); else http_value(b3s_uri_curie (page_resource_uri));
+    ?></a>   <a class="desc_sponge_link"
+    href="/describe/?url=<?U page_resource_uri ?><?= case when sid is
+    not null then '&sid=' || sid end ?>&sponger:get=add"
+    title="Click to generate local descriptor data for this entity"
+    id="sp_link" rel="nofollow">Sponge</a> <a class="desc_permalink" href="<?= plink_href ?>">Permalink</a></h2>
+      <div class="ds_inf_info">
+	    An Entity of Type : <a href="<?V iri_uri ?>"><?V iri_type_label ?></a>,
 	    within Data Space : <a href="http://<?V host ?>"><?V host ?></a><br/>
-<?vsp 
+<?vsp
   declare _ciri varchar;
+  declare num_types int;
 
-  if (c_iri = 'http://www.w3.org/2000/01/rdf-schema#Class') {
-    _ciri := gr;
+  if (c_iri = 'http://www.w3.org/2000/01/rdf-schema#Class' or c_iri = 'http://www.w3.org/2002/07/owl#Class') {
+    _ciri := page_resource_uri;
   }
   else {
     _ciri := c_iri;
   }
 
-  if (sid) { 
+  if ('unknown' <> iri_type)
+    {
 ?>
+      <form id="fct_form" action="/fct/facet.vsp" method="get">
+        <label for="c_iri_sel">Type:</label>
+<?vsp
+      if (sid)
+        {
+?>
+          <input type="hidden" name="sid" value="<?V sid ?>"/>
+          <input type="hidden" name="cmd" value="set_class"/>
+<?vsp
+          num_types := b3s_render_iri_select (_S, _F, 'name="iri" id="c_iri_sel"');
+          if (num_types) {
+?>
+          <button class="fct_sel_as_type"
+             title="Add class constraint in current facet session">Constrain facet</button>
 
-  <a class="fct_sel_as_type" 
-     title="Use as class in facets" 
-     href="/fct/facet.vsp?sid=<?V sid ?>&cmd=set_class&iri=<?/ _ciri ?>">Constrain facet on this type</a>
-
-<?vsp 
-  } else { ?>
-  <a class="fct_sel_as_type" 
-     title="Start new facet session with type" 
-     href="/fct/facet.vsp?cmd=new_with_class&iri=<?/ _ciri ?>">Start faceted browsing from this Type</a>
 <?vsp
-  } 
+          }
+        }
+      else
+        {
+?>
+          <input type="hidden" name="cmd" value="new_with_class"/>
+<?vsp
+          num_types := b3s_render_iri_select (_S, _F, 'name="iri" id="c_iri_sel"');
+          if (num_types) {
+?>
+          <button class="fct_sel_as_type"
+             title="Start new facet session with type">Start faceted browsing</button>
+<?vsp
+          }
+        }
+?>
+      </form>
+<?vsp
+    }
   declare qrimg any;
   qrimg := fct_make_qr_code (fct_make_curie ('http://' || host || b3s_http_url (page_resource_uri), lines));
   if (qrimg is not null and strcasestr (ua, 'Mobile') is null) {
@@ -292,23 +438,23 @@
 	  <img id="qrcode" alt="QRcode image" src="data:image/jpg;base64,<?V qrimg ?>"/>
 <?vsp } ?>
       </div>
-        </div>
-<?vsp 
-if (_subject <> '') { 
+    </div>
+<?vsp
+if (_subject <> '') {
 ?>
-            <p class="subj_desc"><?vsp http (sprintf ('%s', _subject)); ?></p>
-<?vsp 
-} else { 
+  <p class="subj_desc"><?vsp http (sprintf ('%s', _subject)); ?></p>
+<?vsp
+} else {
 ?>
   <p class="subj_delim"></p>
-<?vsp 
-} 
+<?vsp
+}
 ?>
 <!--            <li><a href="/fct/facet.vsp?sid=<?V sid ?>&cmd=set_class&iri=<?V gr ?>">Choose <?V ''?> as Type</a></li>
                 <li><a href="/fct/facet.vsp?sid=<?V sid ?>&cmd=open_property">Choose <?V ''?> as Property (p)</a></li>
-                <li><a href="">Choose <?V ''?> as Value (o)</a></li> -->
+                <li><a href="">Choose <?V ''?> as Value (o)</a></li>-->
 <!-- proptable -->
-      <table class="description">
+    <table class="description">
 
 <?vsp
 
@@ -321,12 +467,12 @@ if (_subject <> '') {
       _skip := n_per_page * page;
 
       if (length (_F) or 1 = sys_stat ('cl_run_local_only'))
-      { 
+      {
       dt1 := sprintf ('select id_to_iri ("p") as PRED, __ro2sq ("o") as OBJECT LONG VARCHAR, 0 as FLAG int from (sparql %s define output:valmode "LONG" select distinct ?p ?o %s where { <%S> ?p ?o }  order by 1) sp1', inf, _F, _S);
       }
       else
       {
-      dt1 := sprintf ('select id_to_iri ("p") as PRED, __ro2sq ("o") as OBJECT LONG VARCHAR, 0 as FLAG int from (SELECT DISTINCT p, o FROM DB.DBA.RDF_QUAD %s where s = __i2idn (\'%s\' , 1) ORDER BY 1 ASC OPTION (QUIETCAST)) sp1', tbinf, _S);
+      dt1 := sprintf ('select id_to_iri ("p") as PRED, __ro2sq ("o") as OBJECT LONG VARCHAR, 0 as FLAG int from (SELECT DISTINCT p, o FROM DB.DBA.RDF_QUAD %s where s = __i2idn (\'%S\' , 1) ORDER BY 1 ASC OPTION (QUIETCAST %s)) sp1', tbinf, _S, tbsas);
       }
       dt2 := sprintf ('select id_to_iri ("p") as PRED, __ro2sq ("o") as OBJECT LONG VARCHAR, 1 as FLAG int from (sparql %s define output:valmode "LONG" select distinct ?p ?o %s where { ?o ?p <%S> } order by 1) sp2', inf, _F, _S);
 
@@ -334,32 +480,38 @@ if (_subject <> '') {
       qry_str := sprintf ('select %s PRED, OBJECT, FLAG from (%s UNION ALL %s) un0', topof, dt1, dt2);
       --dbg_printf ('%s', qry_str);
       if (_last = 0)
-        { 
+        {
 	  if (length (_F) or 1 = sys_stat ('cl_run_local_only'))
             {
 	      dt1 := sprintf ('select count(*) as cnt from (sparql %s define output:valmode "LONG" select distinct ?p ?o %s where { <%S> ?p ?o }  order by 1) sp1', inf, _F, _S);
 	    }
           else
 	    {
-              dt1 := sprintf ('select count(*) as cnt from (SELECT DISTINCT p, o FROM DB.DBA.RDF_QUAD %s where s = __i2idn (\'%s\' , 1) ORDER BY 1 ASC OPTION (QUIETCAST)) sp1', tbinf, _S);
+              dt1 := sprintf ('select count(*) as cnt from (SELECT DISTINCT p, o FROM DB.DBA.RDF_QUAD %s where s = __i2idn (\'%S\' , 1) ORDER BY 1 ASC OPTION (QUIETCAST %s)) sp1', tbinf, _S, tbsas);
 	    }
 	  dt2 := sprintf ('select count(*) as cnt from (sparql %s define output:valmode "LONG" select distinct ?p ?o %s where { ?o ?p <%S> } order by 1) sp2', inf, _F, _S);
 	  count_str := sprintf ('select sum (cnt) from (%s UNION ALL %s) un0', dt1, dt2);
 	  --dbg_printf ('%s', count_str);
 	  exec (count_str, null, null, vector (), 0, meta, data);
-	  _last := data[0][0]; -- sum is supposed to have always number
+	  if (length (data) and length (data[0]))
+	    _last := data[0][0]; -- sum is supposed to have always number
+          else
+	    _last := n_per_page;
 	  _last := _last / n_per_page;
         }
-      
-      exec (qry_str, null, null, vector (), 0, null, null, h1); 
+
+      exec (qry_str, null, null, vector (), 0, null, null, h1);
       curr_pred := '';
       inx := 0;
-      while (0 = exec_next (h1, null, null, data))	
+      data := null;
+      while (0 = exec_next (h1, null, null, data))
 	{
            declare PRED, OBJECT, FLAG any;
 	   --if (inx <= _skip)
 	   --  goto nxt1;
-	   pred := data[0];  
+           if (length (data) < 3)
+	     goto skip;
+	   pred := data[0];
            object := data[1];
            FLAG := data[2];
 	   if (not length (PRED))
@@ -368,12 +520,13 @@ if (_subject <> '') {
 	   if (curr_pred <> pred)
 	     {
                if (curr_pred <> '') http ('</ul></td></tr>');
-	       b3s_http_print_l (PRED, odd_position, flag, sid);
+	       b3s_http_print_l (PRED, odd_position, flag, sid, langs);
 	       curr_pred := pred;
 	     }
            vis := b3s_http_print_r (OBJECT, sid, PRED, langs, 1, all_langs, _from);
 	   nxt1:;
 	   inx := inx + 1;
+	   skip:;
 	}
       exec_close (h1);
       if (curr_pred <> '') http ('</ul></td></tr>');
@@ -381,8 +534,9 @@ if (_subject <> '') {
       if (inx < n_per_page)
         dis_next := 1;
 
-       if  (odd_position = 0)
+      if  (odd_position = 0)
 	 {
+	    http_request_status ('HTTP/1.1 404 Not found');
 	    http ('<tr><td colspan="2"><p>No further information is available.</p></td></tr>');
 	 }
 ?>
@@ -402,19 +556,19 @@ if (_subject <> '') {
 	      <input type="hidden" name="sid" value="<?V sid ?>"/>
 	      <?vsp } ?>
 	      <input type="hidden" name="lp" value="<?V _last ?>"/>
-	      <?vsp if (topof <> '' and _last > 0) {  if (1 or page > 0) { ?>   
+	      <?vsp if (topof <> '' and _last > 0) {  if (1 or page > 0) { ?>
 	      <button type="submit" value="" name="first" <?vsp if (page <= 0) { http ('disabled="disabled"'); } ?>>◂◂ First</button>
 	       
 	      <input type="hidden" name="op" value="<?V page - 1 ?>"/>
 	      <button type="submit" value="" name="prev" <?vsp if (page <= 0) { http ('disabled="disabled"'); } ?>>◂ Prev</button>
 	         
-	<?vsp } if (1 or not dis_next) { ?>   
+	<?vsp } if (1 or not dis_next) { ?>
 	      <button type="submit" value="" name="next" <?vsp if (dis_next) { http ('disabled="disabled"'); } ?>>Next ▸</button>
 	        
 	      <button type="submit" value="" name="last" <?vsp if (dis_next) { http ('disabled="disabled"'); } ?>>Last ▸▸</button>
 	          
 	       Page <?V page + 1 ?> of <?V _last + 1 ?>     
-	       <input type="text" value="<?V page + 1 ?>" size="5" name="gp" />   
+	       <input type="text" value="<?V page + 1 ?>" size="5" name="gp" />  
 	       <button type="submit" value="" name="go">Go</button>
 	<?vsp } } ?>
 	</div>
@@ -424,27 +578,66 @@ if (_subject <> '') {
     <?vsp b3s_render_dbg_out (dbg_out); ?>
 <!-- footer -->
     <div id="FT">
+<?vsp if (_addthis_key <> '0') { ?>
+  <div id="FT_share">
+    <!-- AddThis Button BEGIN -->
+	<div class="addthis_toolbox addthis_default_style ">
+	<a class="addthis_button_facebook_like" id="fb_like_id"></a>
+	<a class="addthis_button_tweet"></a>
+	<a class="addthis_button_google_plusone" id="g_plusone_id"></a>
+	<a class="addthis_counter addthis_pill_style"></a>
+	</div>
+    <script type="text/javascript">
+    /*<![CDATA[*/
+	var addthis_config = {"data_track_clickback":true, ui_cobrand:"Virtuoso"};
+	var addthis_share = { url_transforms : { clean: true, remove: ['sid'] } };
+    /*]]>*/
+    </script>
+    <script type="text/javascript">
+	var fb_like_id = document.getElementById('fb_like_id');
+	if (fb_like_id) fb_like_id.setAttribute('fb:like:layout', 'button_count');
+	var g_plusone_id = document.getElementById('g_plusone_id');
+	if (g_plusone_id) g_plusone_id.setAttribute('g:plusone:size', 'medium');
+    </script>
+    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=<?=_addthis_key?>"></script>
+    <!-- AddThis Button END -->
+  </div><!-- ft_s -->
+<?vsp } ?>
       <div id="ft_t">
-        Explore alternative Linked Data Views & Meshups using:
-        <a href="http://linkeddata.uriburner.com/ode/?uri=<?vsp http_url (page_resource_uri); ?>">OpenLink Data Explorer</a> 
+        Alternative Linked Data Views:
+	<?vsp if (VAD_CHECK_VERSION ('PivotViewer') is not null) { ?>
+	<a href="/PivotViewer/?url=<?vsp http_url (desc_resource_uri); ?>" title="PivotViewer page for exploring results and generating new queries" target="_blank">PivotViewer</a>
+	|
+	<?vsp } ?>
+	<?vsp if (VAD_CHECK_VERSION ('rdf_mappers') is not null) { ?>
+	<a href="<?vsp http (rdfdesc_http_url (page_resource_uri)); ?>" target="_blank">Sponger</a>
+	|
+	<?vsp } ?>
+	<?vsp if (VAD_CHECK_VERSION ('iSPARQL') is not null) { ?>
+	<a href="/isparql/view/?query=<?vsp http_url (desc_qr); ?>&resultview=browser" title="Interactive Query By Example oriented SPARQL UI" target="_blank">iSPARQL</a>
+	|
+	<?vsp } ?>
+	<a href="http://linkeddata.uriburner.com/ode/?uri=<?vsp http_url (page_resource_uri); ?>" title="Basic navigation and exploration" target="_blank">ODE</a>
+
             Raw Data in:
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/cxml')?>">CXML</a> |
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/csv')?>">CSV</a> | RDF (
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/plain') ?>">N-Triples</a>
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/rdf+n3') ?>">N3/Turtle</a>
-        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+json')?>">JSON</a> 
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+json')?>">JSON</a>
         <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+xml') ?>">XML</a> ) | OData (
-        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/atom+xml')?>">Atom</a> 
-        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/odata+json')?>">JSON</a> )
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/atom+xml')?>">Atom</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/odata+json')?>">JSON</a> ) | Microdata (
+	<a href="<?=rdf_link || sprintf ('&output=%U', 'application/microdata+json') ?>">JSON</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/html') ?>">HTML</a>) |
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/ld+json')?>">JSON-LD</a>
            <a href="/fct/facet_doc.html">About</a>   
       </div> <!-- #ft_t -->
       <div id="ft_b">
         <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="/fct/images/LoDLogo.gif" style="border-width:0"/></a>  
         <a href="http://dbpedia.org/sparql"><img alt="W3C Semantic Web Technology" src="/fct/images/sw-sparql-blue.png" style="border-width:0"/></a>
         <a href="<?=rdf_link?>" title="RDF data"><img src="/fct/images/sw-rdf-blue.png" alt="[RDF Data]" style="border-width:0"/></a>
-        <a href="http://www.opendefinition.org/"><img alt="This material is Open Knowledge" src="/fct/images/od_80x15_red_green.png" style="border-width:0"/></a>
-	<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" 
-	    src="/fct/images/creativecommons.png" /></a>
+
 	<span about=""
 	resource="http://www.w3.org/TR/rdfa-syntax"
 	rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/">
@@ -453,10 +646,18 @@ if (_subject <> '') {
 	    alt="Valid XHTML + RDFa" height="27" /></a>
 	</span>
 	<br />
-	This work is licensed under a 
-	<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />
-	<?vsp fct_virt_info (); ?><br /> 
-	Copyright © 2009-2011 OpenLink Software 
+	<?vsp fct_virt_info (); ?><br />
+	<?vsp
+          declare license_text varchar;
+          license_text := registry_get ('fct_license_text');
+
+          if (license_text) {
+            http(license_text);
+	  }
+
+        ?>
+	Data on this page belongs to its respective rights holders.<br/>
+        Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software
       </div> <!-- #ft_b -->
     </div> <!-- #FT -->
     </div> <!-- #PG -->
@@ -466,5 +667,5 @@ if (_subject <> '') {
       <div class="form_row"><label for=""></label><input type="text" class="prop_val_lo"/></div><br/>
       <div class="form_row"><label for=""></label><input type="text" class="prop_val_hi"/></div>
     </div -->
- </body>
+  </body>
 </html>
diff --git a/binsrc/b3s/rdfdesc/settings.vsp b/binsrc/b3s/rdfdesc/settings.vsp
index 704fdfe..0773fd8 100644
--- a/binsrc/b3s/rdfdesc/settings.vsp
+++ b/binsrc/b3s/rdfdesc/settings.vsp
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<?vsp 
+<?vsp
   declare host,gr,page_resource_uri,_S varhar;
   declare sid,ses_parms  varchar;
   declare arr any;
@@ -14,10 +14,10 @@
 
   page_resource_uri := gr;
   page_resource_uri := replace (page_resource_uri, '%23', '#');
-   
-  _S := page_resource_uri; 
 
-  host := http_request_header (http_request_header (), 'Host');  
+  _S := page_resource_uri;
+
+  host := http_request_header (http_request_header (), 'Host');
 
   b3s_handle_ses (path, lines, params);
   sid := connection_get ('sid');
@@ -40,14 +40,14 @@
 <body>
   <div id="PG">
     <div id="HD">
-      <?vsp fct_page_head (); ?>	
+      <?vsp fct_desc_page_head (); ?>
       <ul id="main_menu">
         <?vsp if (sid is not null) { ?>
           <li><a href="<?= b3s_render_fct_link() ?>">Facets</a></li>
-        <?vsp } ?>      
+        <?vsp } ?>
         <li id="mnu_descr"><a href="/describe/?uri=<?U _S ?><?V ses_parms ?>">Description</a></li>
         <li id="mnu_usage" class="sel">
-          <a href="usage.vsp?g=<?U _S ?><?V ses_parms ?>">Usage Statistics</a>
+          <a href="usage.vsp?g=<?U _S ?><?V ses_parms ?>">Metadata</a>
         </li>
         <li id="mnu_settings"><a href="settings.vsp?uri=<?V page_resource_uri ?><?V ses_parms ?>">Settings</a></li>
       </ul>
@@ -74,10 +74,10 @@
       <div id="ft_t">
       </div> <!-- #ft_t -->
       <div id="ft_b">
-	<?vsp fct_virt_info (); ?><br /> 
-	Copyright © 2009-2011 OpenLink Software | <a href="/fct/facet_doc.html">About</a>
+	<?vsp fct_virt_info (); ?><br />
+	Copyright © 2009-2012 OpenLink Software | <a href="/fct/facet_doc.html">About</a>
       </div> <!-- #ft_b -->
     </div> <!-- #FT -->
   </div> <!-- #PG -->
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/binsrc/b3s/rdfdesc/usage.vsp b/binsrc/b3s/rdfdesc/usage.vsp
index 280498b..fc1935f 100644
--- a/binsrc/b3s/rdfdesc/usage.vsp
+++ b/binsrc/b3s/rdfdesc/usage.vsp
@@ -1,15 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html
+    xmlns="http://www.w3.org/1999/xhtml"
+    xml:lang="en"
+    lang="en"
+    xmlns:addthis="http://www.addthis.com/help/api-spec"
+    xmlns:fb="http://www.facebook.com/2008/fbml"
+>
 <?vsp
 --
 --
---  $Id: usage.vsp,v 1.1.2.18 2011/03/24 15:47:56 source Exp $
+--  $Id: usage.vsp,v 1.1.2.26 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -26,86 +32,105 @@
 --
 --
 
-   declare _S, odd_position any;
-   declare page_resource_uri, proxy_iri, rdf_link, label, _subject any;
-   declare white_page, arr, data, meta, h1, h2, inx, gr, host, refr, sid, inf, langs, best_q, tp any;
-   declare orig_refr varchar;
-   declare urilookup integer;
-   declare dbg_enable varchar;
-   declare dbg_out any;
+  declare _S, odd_position any;
+  declare page_resource_uri, proxy_iri, rdf_link, label, _subject any;
+  declare white_page, arr, data, meta, h1, h2, inx, gr, host, refr, sid, inf, langs, best_q, tp any;
+  declare orig_refr varchar;
+  declare urilookup integer;
+  declare dbg_enable varchar;
+  declare dbg_out any;
   declare inf_rule varchar;
   declare ses_parms varchar;
 
-   white_page := 1;
+  white_page := 1;
 
   b3s_handle_ses (path, lines, params);
 
   sid := connection_get ('sid');
 
-   -- side-effect sets connection vars 'inf' and 'sas' - val or null
+  --
+  -- Get AddthisKey from registry
+  --
+  --  if 0 then disable addthis support
+  --  if 1 use temp key to get basic social bookmarking
+  --  any other value should be a registered key
+  --
+  declare _addthis_key varchar;
+  _addthis_key := registry_get ('fct_addthis_key');
+  if (not isstring(_addthis_key)) _addthis_key := '0';
+  if ('1' = _addthis_key) _addthis_key := 'xa-4ce13e0065cdadc0';
 
-   b3s_parse_inf (sid, params);
+  -- side-effect sets connection vars 'inf' and 'sas' - val or null
 
-   inf := b3s_render_inf_clause ();
+  b3s_parse_inf (sid, params);
+
+  inf := b3s_render_inf_clause ();
   inf_rule := connection_get ('inf');
 
   if (inf_rule is null) { inf_rule := 'b3sifp'; }
 
   ses_parms := b3s_render_ses_params();
 
-   host := http_request_header (http_request_header (), 'Host');  
-   langs := http_request_header_full (lines, 'Accept-Language', 'en');
-   gr := get_keyword ('g', params, '');
-   arr := rfc1808_parse_uri (gr);
-   if (arr[0] = '' and arr[1] = '' and arr[2] <> '')
-     gr := 'http://' || gr;
+  host := http_request_header (http_request_header (), 'Host');
+  langs := http_request_header_full (lines, 'Accept-Language', 'en');
+  gr := get_keyword ('g', params, '');
+  arr := rfc1808_parse_uri (gr);
+
+  if (arr[0] = '' and arr[1] = '' and arr[2] <> '')
+    gr := 'http://' || gr;
 
-   page_resource_uri := gr;
-   page_resource_uri := replace (page_resource_uri, '%23', '#');
+  page_resource_uri := gr;
+  page_resource_uri := replace (page_resource_uri, '%23', '#');
 
-   _S := page_resource_uri; 
+  _S := page_resource_uri;
 
-   proxy_iri := page_resource_uri;
+  proxy_iri := page_resource_uri;
 
-   odd_position := 0;
-   set http_charset='utf-8';
-   set isolation = 'uncommitted';
-   http_header ('Cache-Control: no-cache, must-revalidate\r\nPragma: no-cache\r\n');
-   label := ''; _subject := '';
+  odd_position := 0;
+  set http_charset='utf-8';
+  set isolation = 'uncommitted';
+  http_header ('Cache-Control: no-cache, must-revalidate\r\nPragma: no-cache\r\n');
+  label := ''; _subject := '';
 
-  exec (sprintf ('sparql  define input:inference "facets" select ?o (lang(?o)) where { <%S> virtrdf:label ?o }', _S), 
+  exec (sprintf ('sparql  define input:inference "facets" select ?o (lang(?o)) where { <%S> virtrdf:label ?o }', _S),
                  null, null, vector (), 0, meta, data);
 
-   label := b3s_label_get (data, langs);
+  label := b3s_label_get (data, langs);
 
-   exec (sprintf ('sparql %s prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dc: <http://purl.org/dc/elements/1.1/> 
-	select ?o (lang(?o)) where { <%S> rdfs:comment ?o }', inf, _S), null, null, vector (), 0, meta, data);
-   _subject := b3s_label_get (data, langs);
+  exec (sprintf ('sparql %s prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dc: <http://purl.org/dc/elements/1.1/>
+                  select ?o (lang(?o)) where { <%S> rdfs:comment ?o }', inf, _S), null, null, vector (), 0, meta, data);
+  _subject := b3s_label_get (data, langs);
 
-  rdf_link := sprintf ('/sparql?query=%U', sprintf ('%s DESCRIBE <%s>', b3s_render_inf_clause(), _S)); 
+  rdf_link := sprintf ('/sparql?query=%U', sprintf ('define sql:describe-mode "LOD" %s DESCRIBE <%s>', b3s_render_inf_clause(), _S));
 
   declare __res_desc varchar;
   __res_desc := b3s_uri_curie(page_resource_uri);
+
   if (not length (label))
     label := page_resource_uri;
-  tp := atoi (get_keyword ('tp', params, '1'));  
 
-   dbg_enable := get_keyword ('dbg', params);
+  tp := atoi (get_keyword ('tp', params, '1'));
 
-   if (dbg_enable = '1') 
-     {
-        dbg_printf ('Enabling b3s session debug.\n');
-        connection_set ('b3s_dbg', 1);
-        dbg_out := string_output ();
-     }
-   else connection_set ('b3s_dbg',0);
+  dbg_enable := get_keyword ('dbg', params);
 
+  if (dbg_enable = '1')
+    {
+       dbg_printf ('Enabling b3s session debug.\n');
+       connection_set ('b3s_dbg', 1);
+       dbg_out := string_output ();
+    }
+  else connection_set ('b3s_dbg',0);
+
+  declare desc_resource_uri varchar;
+  declare desc_qr varchar;
+  desc_qr := sprintf ('define sql:describe-mode "CBD" DESCRIBE <%s>', page_resource_uri);
+  desc_resource_uri := sprintf ('http://%{WSHost}s/sparql?query=%U&format=cxml', desc_qr);
 ?>
 
 <!-- header -->
 <head>
     <base href="http://<?V host ?>/fct/rdfdesc/" />
-    <title>Usage Statistics about: <?vsp http (sprintf ('%s', label)); ?></title>
+    <title>Metadata about: <?vsp http (sprintf ('%s', label)); ?></title>
     <link rel="alternate" type="application/rdf+xml" href="<?=rdf_link?>" title="RDF" />
     <link rel="stylesheet" type="text/css" href="styles/default.css" charset="utf-8" />
     <link rel="stylesheet" type="text/css" href="styles/highlighter.css" charset="utf-8" />
@@ -117,14 +142,14 @@
 </head>
 <body class="usage_page">
   <div id="HD">
-    <?vsp fct_page_head (); ?>
+    <?vsp fct_desc_page_head (); ?>
     <ul id="main_menu">
       <?vsp if (sid is not null) { ?>
         <li><a href="<?= b3s_render_fct_link() ?>">Facets</a></li>
-      <?vsp } ?>      
+      <?vsp } ?>
       <li id="mnu_descr"><a href="/describe/?uri=<?U page_resource_uri ?><?V ses_parms ?>">Description</a></li>
       <li id="mnu_usage" class="sel">
-        <a href="#" class="sel">Usage Statistics</a>
+        <a href="#" class="sel">Metadata</a>
       </li>
       <li id="mnu_settings"><a href="settings.vsp?g=<?U page_resource_uri ?><?V ses_parms ?>">Settings</a></li>
     </ul>
@@ -133,34 +158,43 @@
   <div id="MD">
     <div class="page_resource_info">
       <h2>Usage stats on <a href="<?= case when page_resource_uri like 'nodeID://%' then b3s_http_url (page_resource_uri) else page_resource_uri end ?>">
-        <?vsp http (sprintf ('%s', label)); ?></a></h2>
+        <?vsp http (sprintf ('%s', label)); ?></a></h2> <a class="desc_permalink" href="usage.vsp?g=<?U page_resource_uri ?>">Permalink</a>
       <p> an Entity in Data Space: <a href="http://<?V host ?>"><?V host ?></a></p>
     </div>
     <div class="subj_nav">
       <?vsp if (_subject <> '') { ?>
         <p class="subj_desc"><?vsp http (sprintf ('%s', _subject)); ?></p>
       <?vsp } ?>
+    <?vsp
+      declare qrimg, ua, qrd any;
+      qrd := HTTP_REQUESTED_URL () || '?' || http_request_get ('QUERY_STRING');
+      ua :=   http_request_header (lines, 'User-Agent');
+      qrimg := fct_make_qr_code (fct_make_curie (qrd, lines));
+      if (qrimg is not null and strcasestr (ua, 'Mobile') is null) {
+    ?>
+	      <img id="qrcode" alt="QRcode image" src="data:image/jpg;base64,<?V qrimg ?>"/>
+    <?vsp } ?>
     </div> <!-- .subj_nav -->
 
 <!-- proptable -->
     <div id="TAB_ROW">
-	<div class="tab <?vsp http (case when tp = 1 then ' tab_selected' else '' end); ?>">
+      <div class="tab <?vsp http (case when tp = 1 then ' tab_selected' else '' end); ?>">
         <a href="<?V http_path () ?>?g=<?U _S ?>&tp=1<?V ses_parms ?>">Source Graphs</a>
-        </div>
-	<div class="tab <?vsp http (case when tp = 2 then ' tab_selected' else '' end); ?>">
+      </div>
+      <div class="tab <?vsp http (case when tp = 2 then ' tab_selected' else '' end); ?>">
         <a href="<?V http_path () ?>?g=<?U _S ?>&tp=2<?V ses_parms ?>">Referenced by Graphs</a>
-        </div>
-	<div class="tab <?vsp http (case when tp = 3 then ' tab_selected' else '' end); ?>">
-          <a title="A list of other identifiers for the current entity."
+      </div>
+      <div class="tab <?vsp http (case when tp = 3 then ' tab_selected' else '' end); ?>">
+        <a title="A list of other identifiers for the current entity."
            href="<?V http_path () ?>?g=<?U _S ?>&tp=3<?V ses_parms ?>">Direct coreferences</a>
-        </div>
-	<div class="tab <?vsp http (case when tp = 4 then ' tab_selected' else '' end); ?>">
-          <a title="A list of indirect identifiers for the current entity based on Inverse Functional Property values."
+      </div>
+      <div class="tab <?vsp http (case when tp = 4 then ' tab_selected' else '' end); ?>">
+        <a title="A list of indirect identifiers for the current entity based on Inverse Functional Property values."
            href="<?V http_path () ?>?g=<?U _S ?>&tp=4<?V ses_parms ?>">Indirect coreferences</a>
-        </div>
-      </div> <!-- TAB_ROW -->
+      </div>
+    </div> <!-- TAB_ROW -->
 
-      <div id="TAB_CTR">
+    <div id="TAB_CTR">
       <div class="tab_page">
         <table class="description">
 	  <?vsp
@@ -178,7 +212,10 @@
 	    if (tp = 3) -- Expanded sas
 	      {
 	         qr := sprintf ('sparql select ?syn (sql:rnk_scale (<LONG::IRI_RANK> (?syn))) where {{ select ?s ?syn  where {{?syn owl:sameAs ?s } union {?s owl:sameAs ?syn}}} option (transitive, t_distinct, t_min (0), T_in (?s), t_out (?syn)) . filter (!isliteral (?syn) && ?s = <%S> ) } order by desc 2 limit 20', _S);
-                 http (sprintf ('<tr><th>%s</th><th>Rank</th></tr>\n', fct_s_term ()));
+		 http (sprintf ('<tr><th>%s</th><th>Rank</th></tr>\n',
+		'Identifier (URI)'
+		--fct_s_term ()
+		));
 	      }
 	    if (tp = 4) -- Expanded ifp
 	      {
@@ -188,28 +225,28 @@
 
             b3s_dbg_out(dbg_out, qr);
 
-	    exec (qr, null, null, vector (), 0, null, null, h1); 
-	    while (0 = exec_next (h1, null, null, data))	
+	    exec (qr, null, null, vector (), 0, null, null, h1);
+	    while (0 = exec_next (h1, null, null, data))
 	      {
 	         http ('<tr>');
                  if (tp = 1 or tp = 2)
-		   { 
+		   {
 		     --for (declare i, l int, i := 0, l := length (data); i < l; i := i + 1)
 		     --	{
 		     --	  http_value (data[i], 'td');
-	             -- }	    
+	             -- }
                      if (exists (select 1 from RDF_QUAD where G = iri_to_id ('http://lod.openlinksw.com/void/') and
 					S = iri_to_id (sprintf ('http://lod.openlinksw.com/void/%s/Dataset', rtrim (data[0], '/#')))))
 		     http (sprintf ('<td><a href="http://lod.openlinksw.com/void/%s/Dataset">%V</a></td>', rtrim (data[0], '/#'), data[0]));
 		     else
 		     http (sprintf ('<td>%V</td>', data[0]));
 		     http (sprintf ('<td align="right">%d</td>', data[1]));
-		   }   
+		   }
 		 else if (tp = 3)
 		  {
  		     http (sprintf ('<td><a href="/describe/?url=%U%s">%V</a></td>', data[0], b3s_render_ses_params(), b3s_uri_curie (data[0])));
 		     http (sprintf ('<td align="right">%.6g</td>', data[1]));
-		  } 
+		  }
                  else if (tp = 4)
 		  {
  		     http (sprintf ('<td><a href="/describe/?url=%U%s">%V</a></td>', data[0], b3s_render_ses_params(), b3s_uri_curie (data[0])));
@@ -222,48 +259,101 @@
 			 if (__tag (data[2]) = 246)
 			   tmp := __rdf_sqlval_of_obj (data[2], 1);
 			 else
-			   tmp := data[2];   
+			   tmp := data[2];
 		         if (isstring (tmp))
 			   http ('<td>' || tmp || '</td>');
-			 else  
+			 else
                            http_value (tmp, 'td');
-		       }	 
+		       }
 		     http (sprintf ('<td align="right">%.06g</td>', cast (data[3] as decimal)));
 		     --http (sprintf ('<td align="right">%s</td>', data[3]));
-		  } 
+		  }
 	         http ('</tr>\n');
 	      }
 	    exec_close (h1);
 	  ?>
-      </table>
+        </table>
       </div> <!-- .tab_page -->
-      </div> <!-- #TAB_CTR -->
-      <?vsp b3s_render_dbg_out(dbg_out); ?>
-    </div> <!--  #MD -->
+    </div> <!-- #TAB_CTR -->
+    <?vsp b3s_render_dbg_out(dbg_out); ?>
+  </div> <!--  #MD -->
 <!-- footer -->
-    <div id="FT">
+  <div id="FT">
+<?vsp if (_addthis_key <> '0') { ?>
+  <div id="FT_share">
+    <!-- AddThis Button BEGIN -->
+	<div class="addthis_toolbox addthis_default_style ">
+	<a class="addthis_button_facebook_like" id="fb_like_id"></a>
+	<a class="addthis_button_tweet"></a>
+	<a class="addthis_button_google_plusone" id="g_plusone_id"></a>
+	<a class="addthis_counter addthis_pill_style"></a>
+	</div>
+    <script type="text/javascript">
+    /*<![CDATA[*/
+	var addthis_config = {"data_track_clickback":true; ui_cobrand:"Virtuoso"};
+	var addthis_share = { url_transforms : { clean: true, remove: ['sid'] } };
+    /*]]>*/
+    </script>
+    <script type="text/javascript">
+	var fb_like_id = document.getElementById('fb_like_id');
+	if (fb_like_id) fb_like_id.setAttribute('fb:like:layout', 'button_count');
+	var g_plusone_id = document.getElementById('g_plusone_id');
+	if (g_plusone_id) g_plusone_id.setAttribute('g:plusone:size', 'medium');
+    </script>
+    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=<?=_addthis_key?>"></script>
+    <!-- AddThis Button END -->
+  </div><!-- ft_s -->
+<?vsp } ?>
       <div id="ft_t">
-        Explore using:
-        <a href="/ode/?uri=<?vsp http_url (page_resource_uri); ?>">OpenLink Data Explorer</a> |
-        <a href="http://dataviewer.zitgist.com/?uri=<?vsp http_url (proxy_iri); ?>">Zitgist Data Viewer</a> |
-        <a href="http://beckr.org/marbles?uri=<?vsp http_url (proxy_iri); ?>">Marbles</a> |
-        <a href="http://www4.wiwiss.fu-berlin.de/rdf_browser/?browse_uri=<?vsp http_url (proxy_iri); ?>">DISCO</a> |
-        <a href="http://dig.csail.mit.edu/2005/ajar/release/tabulator/0.8/tab.html?uri=<?vsp http_url (proxy_iri); ?>" >Tabulator</a>
+        Alternative Linked Data Views:
+	<?vsp if (VAD_CHECK_VERSION ('PivotViewer') is not null) { ?>
+	<a href="/PivotViewer/?url=<?vsp http_url (desc_resource_uri); ?>" title="PivotViewer page for exploring results and generating new queries" target="_blank">PivotViewer</a>
+	|
+	<?vsp } ?>
+	<?vsp if (VAD_CHECK_VERSION ('rdf_mappers') is not null) { ?>
+	<a href="<?vsp http (rdfdesc_http_url (page_resource_uri)); ?>" target="_blank">Sponger</a>
+	|
+	<?vsp } ?>
+	<?vsp if (VAD_CHECK_VERSION ('iSPARQL') is not null) { ?>
+	<a href="/isparql/view/?query=<?vsp http_url (desc_qr); ?>&resultview=browser" title="Interactive Query By Example oriented SPARQL UI" target="_blank">iSPARQL</a>
+	|
+	<?vsp } ?>
+	<a href="http://linkeddata.uriburner.com/ode/?uri=<?vsp http_url (page_resource_uri); ?>" title="Basic navigation and exploration" target="_blank">ODE</a>
+
             Raw Data in:
-        <a href="<?=rdf_link || '&output=n3'?>">N3</a> |
-        <a href="<?=rdf_link || '&output=xml'?>">RDF/XML</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/cxml')?>">CXML</a> |
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/csv')?>">CSV</a> | RDF (
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/plain') ?>">N-Triples</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/rdf+n3') ?>">N3/Turtle</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+json')?>">JSON</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+xml') ?>">XML</a> ) | OData (
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/atom+xml')?>">Atom</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/odata+json')?>">JSON</a> ) | Microdata (
+	<a href="<?=rdf_link || sprintf ('&output=%U', 'application/microdata+json') ?>">JSON</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/html') ?>">HTML</a>) |
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/ld+json')?>">JSON-LD</a>
            <a href="/fct/facet_doc.html">About</a>   
       </div> <!-- #ft_t -->
       <div id="ft_b">
-        <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="/fct/images/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
-      <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="/fct/images/LoDLogo.gif" style="border-width:0" /></a>  
-      <a href="http://dbpedia.org/sparql"><img alt="W3C Semantic Web Technology" src="/fct/images/sw-sparql-blue.png" style="border-width:0" /></a>
-      <a href="<?=rdf_link?>" title="RDF data"><img src="/fct/images/sw-rdf-blue.png" alt="[RDF Data]" style="border-width:0" /></a>
-      <a href="http://www.opendefinition.org/"><img alt="This material is Open Knowledge" src="/fct/images/od_80x15_red_green.png" style="border-width:0" /></a>
-      <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="/fct/images/creativecommons.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>. <br/>
-      <?vsp fct_virt_info (); ?><br /> 
-      <span class="copyright">Copyright © 2009-2011 OpenLink Software</span>
+        <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="/fct/images/LoDLogo.gif" style="border-width:0"/></a>  
+        <a href="http://dbpedia.org/sparql"><img alt="W3C Semantic Web Technology" src="/fct/images/sw-sparql-blue.png" style="border-width:0"/></a>
+        <a href="<?=rdf_link?>" title="RDF data"><img src="/fct/images/sw-rdf-blue.png" alt="[RDF Data]" style="border-width:0"/></a>
+        <a href="http://www.opendefinition.org/"><img alt="This material is Open Knowledge" src="/fct/images/od_80x15_red_green.png" style="border-width:0"/></a>
+	<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0"
+	    src="/fct/images/creativecommons.png"/></a>
+	<span about=""
+	resource="http://www.w3.org/TR/rdfa-syntax"
+	rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/">
+	<a href="http://validator.w3.org/check?uri=referer"><img
+	    src="http://www.w3.org/Icons/valid-xhtml-rdfa"
+	    alt="Valid XHTML + RDFa" height="27" /></a>
+	</span>
+	<br />
+	This work is licensed under a
+	<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />
+	<?vsp fct_virt_info (); ?><br />
+	Copyright © 2009-2012 OpenLink Software
       </div> <!-- #ft_b -->
-    </div> <!-- #FT -->
- </body>
+  </div> <!-- #FT -->
+</body>
 </html>
diff --git a/binsrc/b3s/s/description.js b/binsrc/b3s/s/description.js
index 1e9a8e5..e21d664 100644
--- a/binsrc/b3s/s/description.js
+++ b/binsrc/b3s/s/description.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: description.js,v 1.1.2.3 2010/10/22 21:12:25 source Exp $
+ *  $Id: description.js,v 1.1.2.5 2012/03/05 17:38:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -29,6 +29,7 @@ function init() {
 var long_literal_counter = 0;
 var long_literal_spans = {};
 var long_literal_texts = {};
+
 function init_long_literals() {
     var spans = document.getElementsByTagName('span');
     for (i = 0; i < spans.length; i++) {
@@ -55,10 +56,11 @@ function init_long_literals() {
 var long_ul_counter = 0;
 var long_uls = {};
 var long_uls_nodes = {};
-function init_long_list() 
+
+function init_long_list()
 {
     var uls = document.getElementsByTagName('ul');
-    for (i = 0; i < uls.length; i++) 
+    for (i = 0; i < uls.length; i++)
       {
 	if (uls[i].className != 'obj') continue;
 	if (uls[i].childNodes.length <= 10) continue;
@@ -106,7 +108,7 @@ function uri_parms_string (p_obj)
     return parms_s.substring(0,parms_s.length-1);
 }
 
-function inf_cb () 
+function inf_cb ()
 {
     var loc = window.location;
     var href = loc.protocol+'//'+loc.host+loc.pathname;
@@ -116,7 +118,7 @@ function inf_cb ()
     window.location = href+uri_parms_string(parms);
 }
 
-function sas_cb () 
+function sas_cb ()
 {
     var loc = window.location;
     var href = loc.protocol+'//'+loc.host+loc.pathname;
diff --git a/binsrc/b3s/sparql.vsp b/binsrc/b3s/sparql.vsp
index c384620..7e59dae 100644
--- a/binsrc/b3s/sparql.vsp
+++ b/binsrc/b3s/sparql.vsp
@@ -1,11 +1,11 @@
 <?vsp
--- 
---  $Id: sparql.vsp,v 1.1.2.3 2009/05/08 10:51:29 source Exp $
+--
+--  $Id: sparql.vsp,v 1.1.2.5 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -48,7 +48,7 @@ h1 { width: 100%; background-color: #86b9d9; font-size: 18pt; font-weight: norma
 var last_format = 1;
 function format_select(query_obg)
 {
-  var query = query_obg.value; 
+  var query = query_obg.value;
   var format = query_obg.form.format;
 
   if (query.match(/construct/i) && last_format == 1) {
@@ -79,9 +79,9 @@ function format_select(query_obg)
 		</div>
 		<div id="main">
 			<p>This query page is designed to help you test OpenLink Virtuoso SPARQL protocol endpoint. <br/>
-			Consult the <a href="http://virtuoso.openlinksw.com/wiki/main/Main/VOSSparqlProtocol">Virtuoso Wiki page</a> describing the service 
+			Consult the <a href="http://virtuoso.openlinksw.com/wiki/main/Main/VOSSparqlProtocol">Virtuoso Wiki page</a> describing the service
 			or the <a href="http://docs.openlinksw.com/virtuoso/">Online Virtuoso Documentation</a> section <a href="http://docs.openlinksw.com/virtuoso/rdfandsparql.html">RDF Database and SPARQL</a>.</p>
-			<p>There is also a rich Web based user interface with sample queries. 
+			<p>There is also a rich Web based user interface with sample queries.
 <?vsp if (DB.DBA.VAD_CHECK_VERSION('iSPARQL') is null) { ?>
   			In order to use it you must install the iSPARQL package (isparql_dav.vad).</p>
 <?vsp } else { ?>
@@ -117,7 +117,7 @@ declare host_ur varchar;
 DBA may wish to grant "SPARQL_SPONGE" privilege to "SPARQL" account to remove the restriction.
 In order to do this, please perform the following steps:</i>
 <br />
-1. Go to the Virtuoso Administration Conductor i.e. 
+1. Go to the Virtuoso Administration Conductor i.e.
 <?vsp
 if (not isstring (host_ur))
   {
@@ -144,7 +144,7 @@ else
 <?vsp  } ?>
 			  <label for="query">Query text</label>
 			  <br />
-			  <textarea rows="10" cols="60" name="query" id="query" onchange="format_select(this)" 
+			  <textarea rows="10" cols="60" name="query" id="query" onchange="format_select(this)"
 				onkeyup="format_select(this)"><?V coalesce (get_keyword ('q', params), def_qry, '') ?></textarea>
 			  <br /><br />
 			  <label for="format" class="n">Display Results As:</label>
diff --git a/binsrc/b3s/srank.sql b/binsrc/b3s/srank.sql
index 693acc6..076a8ec 100644
--- a/binsrc/b3s/srank.sql
+++ b/binsrc/b3s/srank.sql
@@ -1,10 +1,10 @@
 --
---  $Id: srank.sql,v 1.1.2.5 2009/06/25 14:00:33 source Exp $
+--  $Id: srank.sql,v 1.1.2.7 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -56,7 +56,7 @@ create procedure rnk_scale (in i int)
 
   ret := exp ((i - 0hex7fff) / 1e3);
 
-  if (ret < 1) 
+  if (ret < 1)
     {
       return (2 * atan (ret*5));
     }
@@ -66,7 +66,7 @@ create procedure rnk_scale (in i int)
       return 3 + ((atan (ret-1) * 4) / 3.14e0);
     }
 
-  else 
+  else
     {
       return 7 + (atan ((ret-10)/50) * 2);
     }
diff --git a/binsrc/b3s/srank23.sql b/binsrc/b3s/srank23.sql
index 1e25354..2a4978b 100644
--- a/binsrc/b3s/srank23.sql
+++ b/binsrc/b3s/srank23.sql
@@ -1,10 +1,10 @@
 --
---  $Id: srank23.sql,v 1.1.2.1 2010/02/01 12:44:31 source Exp $
+--  $Id: srank23.sql,v 1.1.2.3 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -37,7 +37,7 @@ create procedure f_s (in f double precision)
   declare i double precision;
   i := log (f) * 1000 + 0hex7fff;
   if (i > 0hexffff)
-	return 0hexffff;
+    return 0hexffff;
   return cast (i as int);
 }
 ;
@@ -56,7 +56,7 @@ create procedure rnk_scale (in i int)
 
   ret := exp ((i - 0hex7fff) / 1e3);
 
-  if (ret < 1) 
+  if (ret < 1)
     {
       return (2 * atan (ret*5));
     }
@@ -66,7 +66,7 @@ create procedure rnk_scale (in i int)
       return 3 + ((atan (ret-1) * 4) / 3.14e0);
     }
 
-  else 
+  else
     {
       return 7 + (atan ((ret-10)/50) * 2);
     }
@@ -105,7 +105,7 @@ create procedure DB.DBA.IRI_RANK (in iri iri_id_8)
     return 0;
   ni := iri_id_num (iri);
   n := bit_and (0hexffffffffffffff00, ni);
- nth := 2 * bit_and (ni, 0hexff);
+  nth := 2 * bit_and (ni, 0hexff);
   str := (select rnk_string from rdf_iri_rank where rnk_iri = iri_id_from_num (n));
   if (nth >= length (str))
     return 0;
@@ -119,7 +119,7 @@ grant execute on IRI_RANK to "SPARQL";
 create procedure rnk_store_w (inout first int, inout str varchar, inout fill int)
 {
   if (fill < 1000)
-  str := subseq (str, 0, fill);
+    str := subseq (str, 0, fill);
   insert replacing rdf_iri_stat option (no cluster)  values (iri_id_from_num (first), str);
   commit  work;
 }
@@ -154,27 +154,27 @@ create procedure rnk_count_refs_srv ()
       sn := iri_id_num (s);
       if (s_first is null)
 	{
-	s_first := bit_and (sn, 0hexffffffffffffff00);
-	s_prev := sn;
-	cnt := 0;
+	  s_first := bit_and (sn, 0hexffffffffffffff00);
+	  s_prev := sn;
+	  cnt := 0;
 	}
       if (sn = s_prev)
 	{
-	cnt := cnt + 1;
+	  cnt := cnt + 1;
 	}
       else
 	{
 	  if (not isstring (str))
 	    str := make_string (1536);
-	    nth := 6 * (s_prev - s_first);
-	    str[nth] := bit_shift (cnt, -8);
-	    str[nth + 1] := cnt;
-	    fill := nth + 6;
-	    cnt := 1;
-	    s_prev := sn;
+	  nth := 6 * (s_prev - s_first);
+	  str[nth] := bit_shift (cnt, -8);
+	  str[nth + 1] := cnt;
+	  fill := nth + 6;
+	  cnt := 1;
+	  s_prev := sn;
 	  if (sn - s_first > 255 or s_first > sn)
-	      {
-		rnk_store_w (s_first, str, fill);
+	    {
+	      rnk_store_w (s_first, str, fill);
 	      s_first := bit_and (sn, 0hexffffffffffffff00);
 	      --str := make_string (1536);
 	      str := rnk_get_stat (s_first);
@@ -182,14 +182,14 @@ create procedure rnk_count_refs_srv ()
 	    }
 	}
     }
- last:
+  last:
   if (not isstring (str))
-  str := make_string (1536);
- nth := 6 * (s_prev - s_first);
+    str := make_string (1536);
+  nth := 6 * (s_prev - s_first);
   str[nth] := bit_shift (cnt, -8);
-    str[nth + 1] := cnt;
- fill := nth + 6;
-    rnk_store_w (s_first, str, fill);
+  str[nth + 1] := cnt;
+  fill := nth + 6;
+  rnk_store_w (s_first, str, fill);
 }
 ;
 
@@ -201,8 +201,8 @@ create procedure DB.DBA.IST_SRV (in iri iri_id_8)
   declare n, nth, ni int;
   ni := iri_id_num (iri);
   n := bit_and (0hexffffffffffffff00, ni);
- nth := 6 * bit_and (ni, 0hexff);
- str := (select rst_string from rdf_iri_stat table option (no cluster) where rst_iri = iri_id_from_num (n));
+  nth := 6 * bit_and (ni, 0hexff);
+  str := (select rst_string from rdf_iri_stat table option (no cluster) where rst_iri = iri_id_from_num (n));
   if (str is null)
     return vector (0, 1);
   if (nth > length (str) - 6)
@@ -230,7 +230,7 @@ create procedure DB.DBA.IRI_STAT (in iri iri_id_8)
   declare n, nth, ni int;
   ni := iri_id_num (iri);
   n := bit_and (0hexffffffffffffff00, ni);
- nth := 6 * bit_and (ni, 0hexff);
+  nth := 6 * bit_and (ni, 0hexff);
   str := (select rst_string from rdf_iri_stat where rst_iri = iri_id_from_num (n));
   if (str is null)
     return 0;
@@ -275,7 +275,7 @@ create procedure rnk_store_sc (inout first int, inout str varchar, inout fill in
 create procedure rnk_get_ranks (in s_first int)
 {
   declare  str varchar;
- str := (select rnk_string  from rdf_iri_rank where rnk_iri = iri_id_from_num (s_first));
+  str := (select rnk_string  from rdf_iri_rank where rnk_iri = iri_id_from_num (s_first));
   if (str is null)
     return make_string (512);
   if (length (str) < 512)
@@ -286,9 +286,9 @@ create procedure rnk_get_ranks (in s_first int)
 
 create procedure rnk_score (in nth_iter int)
 {
-  -- use the POGS instead of OP index and check for lower value 
-  declare cr cursor for select o, p, iri_stat (s) 
-  	from rdf_quad table option (no cluster, index rdf_quad_pogs) 
+  -- use the POGS instead of OP index and check for lower value
+  declare cr cursor for select o, p, iri_stat (s)
+  	from rdf_quad table option (no cluster, index rdf_quad_pogs)
   	where o > #i0 and o < iri_id_from_num (0hexffffffffffffff00);
   declare s_first, s_prev, nth, sn, rnk, ssc, fill, n_iters int;
   declare sc double precision;
@@ -306,17 +306,17 @@ create procedure rnk_score (in nth_iter int)
       sn := iri_id_num (s);
       if (s_first is null)
 	{
-	s_first := bit_and (sn, 0hexffffffffffffff00);
+	  s_first := bit_and (sn, 0hexffffffffffffff00);
 	  if (nth_iter > 1)
 	    str := rnk_get_ranks (s_first);
 	  else
-	  str := make_string (512);
-	s_prev := sn;
-	sc := 0;
+	    str := make_string (512);
+	  s_prev := sn;
+	  sc := 0;
 	}
       if (sn = s_prev)
 	{
-	sc := sc + rnk_inc (rnk, nth_iter);
+	  sc := sc + rnk_inc (rnk, nth_iter);
 	  --dbg_obj_princ ('> sc of ', s, ' ', sc , ' rnk:', rnk, ' nth_iter:', nth_iter);
 	}
       else
@@ -324,32 +324,32 @@ create procedure rnk_score (in nth_iter int)
 	  declare dst int;
 	  if (not isstring (str))
 	    str := make_string (512);
-	    nth := 2 * (s_prev - s_first);
-	ssc := f_s (sc + s_f (str[nth] * 256 + str[nth + 1]));
-	    str[nth] := bit_shift (ssc, -8);
-	    str[nth + 1] := ssc;
-	    fill := nth + 2;
-	sc := rnk_inc (rnk, nth_iter);
-	    s_prev := sn;
+	  nth := 2 * (s_prev - s_first);
+	  ssc := f_s (sc + s_f (str[nth] * 256 + str[nth + 1]));
+	  str[nth] := bit_shift (ssc, -8);
+	  str[nth + 1] := ssc;
+	  fill := nth + 2;
+	  sc := rnk_inc (rnk, nth_iter);
+	  s_prev := sn;
 	  dst := sn - s_first;
 	  if (dst > 255 or dst < 0)
-	      {
-		rnk_store_sc (s_first, str, fill);
+	    {
+	      rnk_store_sc (s_first, str, fill);
 	      s_first := bit_and (sn, 0hexffffffffffffff00);
-		str := rnk_get_ranks (s_first);
+	      str := rnk_get_ranks (s_first);
 	      fill := 0;
 	    }
 	}
     }
  last:
   if (not isstring (str))
-  str := make_string (512);
- nth := 2 * (s_prev - s_first);
- ssc := f_s (sc);
+    str := make_string (512);
+  nth := 2 * (s_prev - s_first);
+  ssc := f_s (sc);
   str[nth] := bit_shift (ssc, -8);
-    str[nth + 1] := ssc;
- fill := nth + 2;
-    rnk_store_sc (s_first, str, fill);
+  str[nth + 1] := ssc;
+  fill := nth + 2;
+  rnk_store_sc (s_first, str, fill);
 }
 ;
 
@@ -375,21 +375,21 @@ create procedure rnk_next_cycle ()
   for (;;)
     {
       fetch cr into iri, stat;
-    rank := (select rnk_string from rdf_iri_rank where rnk_iri = iri);
+      rank := (select rnk_string from rdf_iri_rank where rnk_iri = iri);
       if (isstring (rank) and isstring (stat))
 	{
 	  declare nr, ns, inx, rnth, snth int;
-	nr := length (rank) /2;
-	ns := length (stat) /6;
+	  nr := length (rank) / 2;
+	  ns := length (stat) / 6;
 	  if (nr < ns)
-	  ns := nr;
+	    ns := nr;
 	  for (inx := 0; inx < ns; inx := inx + 1)
 	    {
-	    n_done := n_done + 1;
-	    rnth := inx * 2;
-	    snth := inx * 6;
-		stat[snth + 2] := rank [rnth];
-		stat[snth + 3] := rank[rnth + 1];
+	      n_done := n_done + 1;
+	      rnth := inx * 2;
+	      snth := inx * 6;
+	      stat[snth + 2] := rank[rnth];
+	      stat[snth + 3] := rank[rnth + 1];
 	      stat[snth + 4] := stat[snth + 2];
 	      stat[snth + 5] := stat[snth + 3];
 	    }
@@ -410,8 +410,8 @@ create procedure s_rank ()
 	cl_exec('__dbf_set(''cl_max_keep_alives_missed'',3000)');
     }
   log_enable (2);
-  delete from rdf_iri_stat;  
-  delete from rdf_iri_rank;  
+  delete from rdf_iri_stat;
+  delete from rdf_iri_rank;
   log_enable (1);
   cl_exec ('rnk_count_refs_srv ()');
   cl_exec ('rnk_score_srv (1)');
diff --git a/binsrc/b3s/styles/default.css b/binsrc/b3s/styles/default.css
index e54b9dd..3bcdce5 100644
--- a/binsrc/b3s/styles/default.css
+++ b/binsrc/b3s/styles/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.1.2.18 2011/01/05 20:58:20 source Exp $
+ *  $Id: default.css,v 1.1.2.29 2012/03/05 17:38:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -23,7 +23,7 @@
 
 html {}
 
-body { 
+body {
   margin: 0; padding: 0;
   font-family: Gill Sans, Verdana, Helvetica, sans-serif;
   font-size: 9pt; text-align: center}
@@ -34,40 +34,51 @@ a.describe {margin-right: 6px}
 tr:hover {
   background-color: #ddd;}
 
-#PG { width: 100%; 
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
+
+
+#PG { width: 100%;
       text-align: left;
       background-color: #fff;}
 
-#HD { 
-  width: 100%; 
-  float: left; 
+#HD {
+  width: 100%;
+  float: left;
   height: 70px;
-  text-align: center; 
+  text-align: center;
   background-image: url(/fct/images/bg_header.png);
   border-bottom: 1px solid #226;}
 
 #HD img { margin: 2px 0 0 0; padding: 0; vertical-align: middle; border: 0;}
 
-#HD h1 { 
-  font-size: 14pt; 
-  float:left; 
-  margin: 0 0 0 20px; 
-  vertical-align: top; 
-  color: #fff; 
+#HD h1 {
+  font-size: 14pt;
+  float:left;
+  margin: 0 0 0 20px;
+  vertical-align: top;
+  color: #fff;
   padding: 0}
 
 #HD h1 a { color: #fff}
 
+#HD h2 { font-size: 14pt; float: left; margin: 20px 0 0 20px; color: #fff; padding: 0;}
+
 #main_menu {
-  margin: 0; padding: 0;
+  margin: 40px 0; padding: 0;
   float: right;
-  clear: right;
+/*  clear: right;*/
   list-style-type: none;
   list-style-image: none;
   list-style-position: outside;
   list-style-type: none;
   margin-right: 12px;
-  min-width: 500px;
+/*  min-width: 500px; */
 }
 
 #main_menu li { float: left }
@@ -92,7 +103,7 @@ tr:hover {
   -moz-border-radius-topright:3px;
   background:#E4F2FD none repeat scroll 0 0;
   color:#555555;
-  text-shadow:1px 1px 1px #C6D9E9;	
+  text-shadow:1px 1px 1px #C6D9E9;
 }
 
 li#mnu_settings a {
@@ -116,23 +127,23 @@ li#mnu_settings ul li { }
 
 #hd_r { float: right; clear: right}
 
-#hd_r img { margin: 15px 10px 0 0; 
-            vertical-align: middle; 
-            padding-bottom: 3px; 
+#hd_r img { margin: 15px 10px 0 0;
+            vertical-align: middle;
+            padding-bottom: 3px;
             background-color: white; }
 
 a.logo { margin-left: 10px; float: left;}
 
 #opl_logo { border: 0; float: left;}
 
-#MD { width: 100%; 
-      float: left; 
-      margin-top: 0; 
-      background-color: #e9f2f7; 
-      padding-bottom: 10px; 
+#MD { width: 100%;
+      float: left;
+      margin-top: 0;
+      background-color: #e9f2f7;
+      padding-bottom: 10px;
       margin-left: auto; margin-right: auto;}
 
-#MD div#settings { 
+#MD div#settings {
   margin: 10px;
 }
 
@@ -143,7 +154,7 @@ a.logo { margin-left: 10px; float: left;}
 #MD div#settings ul li { padding: 0;}
 #MD div#settings td:hover {background: inherited}
 #MD div#settings tr:hover {background: inherited}
-#FT { width: 100%; float: left; 
+#FT { width: 100%; float: left;
       border-top: 1px solid #335;
       text-align: center;
       padding-top: 10px; }
@@ -155,7 +166,7 @@ span.copyright { font-size: 8pt; color: #888}
 div.page_resource_info {
   float: left; clear: left;
   text-align: left;
-  margin: 15px; 
+  margin: 15px;
 }
 
 div.page_resource_info h2 { display: inline; padding: 0;}
@@ -181,8 +192,8 @@ div.main_expln { float: left; clear: left; text-align: center; width: 100%;}
 
 #user_map { position: relative;width: 100%; height:650px; }
 
-input.thr { background-image: url(/fct/images/thrb.gif); 
-            background-repeat: no-repeat; 
+input.thr { background-image: url(/fct/images/thrb.gif);
+            background-repeat: no-repeat;
             background-position: right;}
 
 table.result { clear:left; width: 100%; margin: 3px; font-size: 9pt;}
@@ -199,10 +210,10 @@ p.subj_desc {
   float: left;
   clear: left;
   width: 750px;
-  text-align: left; 
-  font-style: italic; 
-  font-size: 12pt; 
-  margin: 10px; 
+  text-align: left;
+  font-style: italic;
+  font-size: 12pt;
+  margin: 10px;
   padding: 10px;
   background-color: #fff;
   border: 1px solid black;}
@@ -210,17 +221,17 @@ p.subj_desc {
 p.subj_delim {
   float: left;
   clear: left;
-  margin-left: 10px; 
+  margin-left: 10px;
   width: 750px;
   border-bottom: 1px solid black;}
 
-div.subj_nav div.nav { 
-  float: right; 
+div.subj_nav div.nav {
+  float: right;
   clear: right;
-  text-align: left; 
+  text-align: left;
   width: 200px;
-  margin-top: 10px; 
-  border-left: 1px solid #ddd; 
+  margin-top: 10px;
+  border-left: 1px solid #ddd;
 }
 
 div.subj_nav div.nav ul { list-style-type: none; padding: 0; margin-left: 10px;}
@@ -229,28 +240,28 @@ div.subj_nav div.nav h3 { text-align: left; margin-left: 10px; }
 table.description { text-align: left; margin: 10px; float: left;clear: left;}
 table.description td { vertical-align: top;}
 table.description td.property { white-space: nowrap;}
-table.description ul.obj { 
-  padding: 0; 
-  margin-top: 0; 
-  margin-left; 10px; 
+table.description ul.obj {
+  padding: 0;
+  margin-top: 0;
+  margin-left; 10px;
   list-style-type: none } /* list-style-type: none} */
 
-#main_srch { 
-  margin-top: 15px; 
+#main_srch {
+  margin-top: 15px;
   margin-left: auto;
   margin-right: auto}
 
 #TAB_ROW { width: 780px; margin-left: auto; margin-right: auto;}
 
 
-div.tab { 
+div.tab {
   float: left;
   min-width: 12em;
   padding-top: 10px;
   padding-left: 10px;
   padding-bottom: 4px;
-  cursor: pointer; 
-  background-image: url(/fct/images/tablv1default.png); 
+  cursor: pointer;
+  background-image: url(/fct/images/tablv1default.png);
   margin-right: 4px;
 }
 
@@ -258,15 +269,15 @@ div.tab a { text-decoration: none; white-space: nowrap; margin-right: 5px; }
 
 div.tab:first-child { clear: left; }
 
-div.tab_selected { 
-  background-image: url(/fct/images/tablv1sel.png); 
+div.tab_selected {
+  background-image: url(/fct/images/tablv1sel.png);
   font-weight: bold;
   padding-top: 10px;
   padding-bottom: 5px;
   border-top: 1px solid #ddd;
   border-right: 1px solid #ddd;
   border-left: 1px solid #ddd;
-  border-bottom: 2px solid #fff; 
+  border-bottom: 2px solid #fff;
 }
 
 #TAB_ROW div.tab_act { float: right; padding-top: 10px;}
@@ -286,7 +297,7 @@ div.tab_page {
   width: 100%;
   min-height: 150px;
   background-color: #ffffff;
-  background-image: url(/fct/images/tab_page_back1.png); 
+  background-image: url(/fct/images/tab_page_back1.png);
   background-repeat: repeat-x;
   background-position: bottom left;
   border-left: 1px solid #ddd;
@@ -302,7 +313,7 @@ div.pg_b_nav { float: left; clear: left; width: 100%; margin-left: 10px;}
 div.ac_info { margin-top: 20px;}
 div.ac_info img.txt_i { vertical-align: middle; margin: 4px;}
 
-div.autocomplete_list { 
+div.autocomplete_list {
   padding: 0;
   margin: 0;
   max-height: 500px;
@@ -310,13 +321,13 @@ div.autocomplete_list {
   overflow-x: auto;
   list-style-type: none;
   text-align: left;
-  background: #fff; 
+  background: #fff;
   border: 1px solid #888; }
 
-div.ac_list_option { 
-  text-align: left; 
-  margin: 2px 5px 2px 5px; 
-  cursor: pointer; 
+div.ac_list_option {
+  text-align: left;
+  margin: 2px 5px 2px 5px;
+  cursor: pointer;
   color: #888;
   border-top: 1px solid #ddd }
 
@@ -336,15 +347,15 @@ span.descr { font-size: 9pt; color: #557; margin-top: 0;}
 
 #result_nfo { float: left; clear: both; width: 100%; margin-top: 8px; margin-left: 5px; color: #446;}
 
-#fct_nav { 
-  float: right; 
+#fct_nav {
+  float: right;
   margin-left: 10px;
-  margin-top: 4px; 
-  padding-left: 3px; 
-  width: 200px; 
+  margin-top: 4px;
+  padding-left: 3px;
+  width: 200px;
   border-left: 1px solid #335;}
 
-#fct_nav h3 { margin: 0; padding: 0;}
+#fct_nav h3 { margin: 0; padding: 0; color: #445; }
 
 #fct_nav ul { list-style-type: none; padding: 0; margin: 0;}
 #fct_nav ul li { list-style-type: none;}
@@ -363,16 +374,16 @@ div.thr_ctr { display: inline; width: 16px; border: 0; padding: 0;margin: 0;}
        border: 1px outset;
        margin: 10px auto 10px auto;
        width: 90%;}
-.dlg .title { margin: 0; 
-              text-align: center; 
-              background-image: url(/fct/images/dlg_title_bkg.png); 
+.dlg .title { margin: 0;
+              text-align: center;
+              background-image: url(/fct/images/dlg_title_bkg.png);
               border-bottom: 1px inset;
               padding: 2px 0 2px 0;}
 .dlg .title h2 { color: #333}
 .dlg form { margin: 0; width: 100%;}
-.dlg .btn_bar { margin: 0; 
-                padding-top: 2ex; 
-                width: 100%; height: 6ex; 
+.dlg .btn_bar { margin: 0;
+                padding-top: 2ex;
+                width: 100%; height: 6ex;
                 border-top: 1px solid #333; background-color: #ddd; text-align: right; }
 .dlg .btn_bar button { margin-right: 4px; }
 .dlg .btn_bar input[type="submit"] { margin-right: 6px; }
@@ -383,11 +394,11 @@ div.thr_ctr { display: inline; width: 16px; border: 0; padding: 0;margin: 0;}
 .dlg .fm_sect h3 { font-size: 9pt; margin: 0}
 .dlg label.left_txt { float: left; clear: left; width: 120px;}
 .dlg .ctl_expln { margin-left: 120px; font-size: 8pt; font-style: oblique}
- 
+
 #opts_ctr {
   width: 100%;
   text-align: center;
-  background-color: white; 
+  background-color: white;
 }
 
 #opts {
@@ -398,6 +409,18 @@ div.thr_ctr { display: inline; width: 16px; border: 0; padding: 0;margin: 0;}
   width: 650px;
 }
 
+#cond_form {
+  width: 100%;
+  border-top: 1px solid #ddd;
+  margin-top: 15px;
+  margin-left: 5px;
+}
+
+button.in_set_cond_b {
+  margin-left: 10px;
+}
+
+a.in_del:hover { cursor: pointer; }
 
 #opts input[type="checkbox"] { margin-left: 120px; }
 
@@ -409,25 +432,52 @@ div.thr_ctr { display: inline; width: 16px; border: 0; padding: 0;margin: 0;}
   font-style: italic;
 }
 
+#res .pager button {
+  background-color: #e5e5e5;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#cccccc));
+  background-image: -webkit-linear-gradient(top, #e5e5e5, #d5d5d5);
+  background-image: -ms-linear-gradient(top, #e5e5e5, #d5d5d5);
+  background-image: -moz-linear-gradient(top, #e5e5e5, #d5d5d5);
+  background-image: -o-linear-gradient(top, #e5e5e5, #d5d5d5);
+  background-image: linear-gradient(top, #e5e5e5, #d5d5d5);
+  border: 1px solid #c2c2c2;
+  border-bottom: 1px solid #b2b2b2;
+  -ms-border-radius: 3px;
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+  -o-border-radius: 3px;
+  border-radius: 3px;
+  color: #333;
+  font: bold 11px Geneva, Verdana, sans-serif;
+  line-height: 1;
+  padding: 3px 3px;
+  text-align: center;
+  text-shadow: 0 1px 0 #EEE;
+}
+
+#res .pager button:disabled {
+  color: #666;
+}
+
 div.empty_result {
-  font-weight: bold; 
+  font-weight: bold;
   font-size: 12pt;
   margin: 20px;
 }
 
-div.dbg { 
+div.dbg {
   display: none; }
 
 /*div.dbg { padding: 10px; background-color: yellow; border: 1px solid black}*/
 
 div#pager { margin-top: 10px; float: right;}
 
-div#pager a { background-color: #ddd; 
-              padding: 2px; 
-              border: 1px solid #335; 
-              padding: 3px 5px 3px 5px; 
-              width: auto; 
-              text-decoration: none; 
+div#pager a { background-color: #ddd;
+              padding: 2px;
+              border: 1px solid #335;
+              padding: 3px 5px 3px 5px;
+              width: auto;
+              text-decoration: none;
               text-align: center;}
 
 h3#view_info {
@@ -436,13 +486,22 @@ h3#view_info {
   font-size: 10pt;
 }
 
-div#top_ctr { 
+div#top_ctr {
   font-size: 10pt;
   background-color: #ccc;
   margin-top: 0px; padding-top: 4px;
   padding-left: 5px; padding-right: -4px;
 }
 
+#top_ctr ul {
+  list-style-type: none;
+}
+
+#top_ctr ul .focus {
+  font-weight: bold;
+  color: #393;
+}
+
 div.error_msg { margin: 5px; }
 div.error_msg h2 {}
 div.error_msg div.body { margin: 10px;}
@@ -457,8 +516,8 @@ div.facet_ctr {
 
 div.facet_ctr:first-child { margin-left: 0;}
 
-.facet_hd { 
-  margin: 0; 
+.facet_hd {
+  margin: 0;
   text-align: center;
   border-top: 1px solid #333;
   border-left: 1px solid #333;
@@ -466,24 +525,26 @@ div.facet_ctr:first-child { margin-left: 0;}
   background-color: #aaa;
   background-image: url(/images/dlg_title_bkg.png);}
 
-div.facet { 
-  float:left; 
-  height: 20em;  
-  width: 394px; 
-  overflow-y: auto; 
-  overflow-x: hidden; 
+div.facet {
+  float:left;
+  height: 20em;
+  width: 394px;
+  overflow-y: auto;
+  overflow-x: hidden;
   background-color: #fff;
   border: 1px inset;
 }
 
+.plink_a {margin-left: 1em}
+
 div#sparql_link { margin-top: 10px; float: right;}
-div#sparql_link a { 
-  background-color: #ddd; 
-  padding: 2px; 
-  border: 1px solid #335; 
-  padding: 3px 5px 3px 5px; 
-  width: auto; 
-  text-decoration: none; 
+div#sparql_link a {
+  background-color: #ddd;
+  padding: 2px;
+  border: 1px solid #335;
+  padding: 3px 5px 3px 5px;
+  width: auto;
+  text-decoration: none;
   text-align: center;}
 
 div.featured { margin: 5px; }
@@ -492,10 +553,10 @@ div.featured .expln { text-align: left;}
 #featured_list td { font-size: 9pt;}
 
 table.sparql_qry_list { width: 78%; margin-left: auto; margin-right: auto}
-table.sparql_qry_list td.title { font-weight: bold; }  
-table.sparql_qry_list td.expln { width: 50%; }  
+table.sparql_qry_list td.title { font-weight: bold; }
+table.sparql_qry_list td.expln { width: 50%; }
 
-#demo_queries_ctr { margin: 10px; }
+#demo_queries_ctr { margin: 10px; min-height: 200px}
 
 ul.demo_qry_list {
   list-style-type: none;
@@ -507,12 +568,14 @@ ul.demo_qry_list div.expln { margin: 10px; }
 ul.demo_qry_list pre { margin: 10px; }
 
 div#dbg_output {
-  float: left; 
+  float: left;
   clear:left;
   font-size: 8pt;
 }
 
-span.pivot_pg a, 
+span.advisory { font-weight: bold; }
+
+span.pivot_pg a,
 span.pivot_qrcode_opts a,
 span.pivot_link_opts a { text-decoration: none; }
 
@@ -527,6 +590,16 @@ div#nav {
     margin-left: 50px;
 }
 
-a#sp_link { font-size: 11pt; font-weight:normal; }
+a#sp_link { font-size: 9pt; font-weight:normal; }
+a.desc_permalink { font-size: 9pt; font-weight: normal }
+
+#qrcode { position:fixed; top:100px; right: 30px; z-index: 0; }
+
+#FT_share { margin: auto; width: 400px}
+
+#fct_form { margin-top: 1ex }
+
+.addthis_toolbox { margin: 20px 10px auto; }
+
+#FT_share .addthis_toolbox { margin: 0 }
 
-#qrcode { position:fixed; top:100px; right: 30px; z-index: 0; } 
diff --git a/binsrc/b3s/sum.sql b/binsrc/b3s/sum.sql
index e87d362..7c9ecd2 100644
--- a/binsrc/b3s/sum.sql
+++ b/binsrc/b3s/sum.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sum.sql,v 1.1.2.6 2010/02/01 12:44:31 source Exp $
+--  $Id: sum.sql,v 1.1.2.8 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,9 +20,10 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --
 
--- Each summary is initially an array of 29 with s_rank, o_fill, o1, p1, sc1, o2, p2, sc2 
+-- Each summary is initially an array of 29 with s_rank, o_fill, o1, p1, sc1, o2, p2, sc2
 -- and so on.  After so many entries, more are not added.
 
+
 create procedure s_sum_init (inout env any)
 {
   env := make_array (30, 'any');
@@ -53,13 +54,13 @@ create procedure s_sum_fin (inout env any)
 ;
 
 
-create aggregate DB.DBA.S_SUM (in s_rank double precision, in p iri_id, in o any, in sc int) returns any from 
+create aggregate DB.DBA.S_SUM (in s_rank double precision, in p iri_id, in o any, in sc int) returns any from
   s_sum_init, s_sum_acc, s_sum_fin;
 
-grant execute on DB.DBA.S_SUM_INIT to "SPARQL";  
-grant execute on DB.DBA.S_SUM_ACC to "SPARQL";  
-grant execute on DB.DBA.S_SUM_FIN to "SPARQL";  
-grant execute on DB.DBA.S_SUM to "SPARQL";  
+grant execute on DB.DBA.S_SUM_INIT to "SPARQL";
+grant execute on DB.DBA.S_SUM_ACC to "SPARQL";
+grant execute on DB.DBA.S_SUM_FIN to "SPARQL";
+grant execute on DB.DBA.S_SUM to "SPARQL";
 
 create procedure sum_rank (inout arr any)
 {
@@ -67,7 +68,7 @@ create procedure sum_rank (inout arr any)
 }
 ;
 
-grant execute on DB.DBA.SUM_RANK to "SPARQL";  
+grant execute on DB.DBA.SUM_RANK to "SPARQL";
 
 create procedure sum_o_p_score (inout o any, inout p any)
 {
@@ -107,10 +108,10 @@ create procedure sum_result (inout final any, inout res any, inout text_exp any,
   tot	 := tot || cast (rdf_box_data (sorted[inx]) as varchar);
  exc := fct_bold_tags (search_excerpt (text_exp, tot));
 -- dbg_obj_print (' summaries of ', tot, ' ', lbl, ' ', exc);
- elt := xmlelement ('row', 
+ elt := xmlelement ('row',
 		    xmlelement ('column', xmlattributes ('trank' as "datatype"), cast (cast (tsum as real) / ((end_inx - start_inx) / 3) as varchar)),
 		    xmlelement ('column', xmlattributes ('erank' as "datatype"), cast (s_rank as varchar)),
- 		    xmlelement ('column', xmlattributes ('url' as "datatype", fct_short_form (s) as "shortform"), s), 
+ 		    xmlelement ('column', xmlattributes ('url' as "datatype", fct_short_form (s) as "shortform"), s),
 		    xmlelement ('column', lbl),
  		    xmlelement ('column', exc)
 		    );
@@ -142,14 +143,14 @@ create procedure s_sum_page_s (in rows any, in text_exp varchar)
     }
   n := 3 * n;
   --dbg_obj_print ('result length ', n);
-  res := make_array (n, 'any');  
+  res := make_array (n, 'any');
   fill := 0;
   for (inx := 0; inx < length (rows); inx := inx + 1)
     {
       os := aref (rows, inx, 1);
       s_rank := rnk_scale (os[0]);
       s := ID_TO_IRI (rows[inx][0]);
-      lbl := FCT_LABEL_S (rows[inx][0], 0, 'facets', lng_pref); 
+      lbl := FCT_LABEL_S (rows[inx][0], 0, 'facets', lng_pref);
       prev_fill := fill;
       for (inx2 := 3; inx2 < os[1] + 3; inx2 := inx2 + 3)
         {
@@ -181,23 +182,23 @@ create procedure s_sum_page_c (in rows any, in text_exp varchar)
     }
   n := 3 * dpipe_count (dp);
   --dbg_obj_print ('result length ', n);
-  res := make_array (n, 'any');  
+  res := make_array (n, 'any');
   fill := 0;
   for (inx := 0; inx < length (rows); inx := inx + 1)
     {
       os := aref (rows, inx, 1);
       s_rank := rnk_scale (os[0]);
-    prev_fill := fill;
+      prev_fill := fill;
       for (inx2 := 3; inx2 < os[1] + 3; inx2 := inx2 + 3)
-	{
-	so := dpipe_next (dp, 0);
+        {
+	  so := dpipe_next (dp, 0);
 	  --dbg_obj_print ('res ', fill, so);
-	s := so[0];
+	  s := so[0];
 	  res[fill] := so[1];
-	    res[fill + 1] := os[inx2 + 1];
-	      res[fill + 2] := os[inx2 + 2];
+	  res[fill + 1] := os[inx2 + 1];
+	  res[fill + 2] := os[inx2 + 2];
 	  lbl := so[2];
-	fill := fill + 3;
+	  fill := fill + 3;
 	}
       sum_result (final, res, text_exp, s, prev_fill, fill, s_rank, lbl);
     }
@@ -289,8 +290,8 @@ create procedure sum_tst_1 (in text_exp varchar, in text_words varchar := null)
 --    text_words := vector (text_exp);
 --  res := (select vector_agg (vector (s, sm)) from (
 --   select top 20 s, s_sum (iri_rank (s), p, o, score)  as sm
---   from rdf_obj, rdf_ft, rdf_quad q1 
---   where contains (ro_flags, text_exp) and rf_id = ro_id and q1.o = rf_o group by s 
+--   from rdf_obj, rdf_ft, rdf_quad q1
+--   where contains (ro_flags, text_exp) and rf_id = ro_id and q1.o = rf_o group by s
 --   order by sum_rank (sm) option (quietcast) ) s option (quietcast)
 --);
   --dbg_obj_print (res);
@@ -301,7 +302,7 @@ create procedure sum_tst_1 (in text_exp varchar, in text_words varchar := null)
 
 --  sum_tst ('oori');
 
---  
+--
 -- sparql
 -- select (<SHORT_OR_LONG::>(?s1)) as ?c1, (<sql:S_SUM> (
 --    <SHORT_OR_LONG::IRI_RANK> (?s1),
diff --git a/binsrc/b3s/vad_version b/binsrc/b3s/vad_version
index d5580fe..7eed6d0 100644
--- a/binsrc/b3s/vad_version
+++ b/binsrc/b3s/vad_version
@@ -1 +1 @@
-1.9.28
+1.11.74
diff --git a/binsrc/b3s/www/about.html b/binsrc/b3s/www/about.html
index 4494433..b73fe2e 100644
--- a/binsrc/b3s/www/about.html
+++ b/binsrc/b3s/www/about.html
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <!--
 --
---  $Id: about.html,v 1.1.2.1 2009/04/17 11:07:30 source Exp $
+--  $Id: about.html,v 1.1.2.2 2012/03/05 12:08:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/b3s/www/dlistall.vsp b/binsrc/b3s/www/dlistall.vsp
index ba4c408..14fb978 100644
--- a/binsrc/b3s/www/dlistall.vsp
+++ b/binsrc/b3s/www/dlistall.vsp
@@ -2,12 +2,12 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <?vsp
 --
---  $Id: dlistall.vsp,v 1.1.2.5 2010/02/01 12:44:31 source Exp $
+--  $Id: dlistall.vsp,v 1.1.2.7 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -26,7 +26,7 @@
 
   label := 'Drill-down queries';
   puri := get_keyword('p', params,'');
-  puri := replace (puri, '\'', '%27');  
+  puri := replace (puri, '\'', '%27');
 ?>
   <head>
     <link rel="stylesheet" type="text/css" href="style.css">
@@ -97,7 +97,7 @@
                         http('<td>');
 			if (__tag of rdf_box = __tag (tmp) and not rdf_box_is_complete (tmp))
 			  http ('Incomplete box');
-			else  
+			else
 			  {
 			    http_value(tmp);
 			  }
diff --git a/binsrc/b3s/www/listall.vsp b/binsrc/b3s/www/listall.vsp
index bfc78ea..0c9cb05 100644
--- a/binsrc/b3s/www/listall.vsp
+++ b/binsrc/b3s/www/listall.vsp
@@ -2,12 +2,12 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <?vsp
 --
---  $Id: listall.vsp,v 1.1.2.6 2010/02/17 10:21:41 source Exp $
+--  $Id: listall.vsp,v 1.1.2.9 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -56,11 +56,16 @@
 For your convenience we have a set of <a href="nspref.vsp">predefined name space prefixes</a>.</div>
     <div id="footer">
       <div id="ft_b">
-	<a href="about.html">About</a> 
+	<a href="about.html">About</a>
         <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="http://dbpedia.org/statics/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
         <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="http://dbpedia.org/statics/LoDLogo.gif" border="0"></a>  
         <a href="http://dbpedia.org/sparql"><img alt="W3C Semantic Web Technology" src="http://dbpedia.org/statics/sw-sparql-blue.png" border="0"></a>     
         <a href="http://www.opendefinition.org/"><img alt="This material is Open Knowledge" src="http://dbpedia.org/statics/od_80x15_red_green.png" border="0"></a>
+        <br />
+	This work is licensed under a
+	<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />
+	<?vsp fct_virt_info (); ?><br />
+	Copyright © 2009-2012 OpenLink Software
       </div> <!-- #ft_b -->
     </div> <!-- #footer -->
   </body>
diff --git a/binsrc/b3s/www/nspref.vsp b/binsrc/b3s/www/nspref.vsp
index faeea0c..ebf0d37 100644
--- a/binsrc/b3s/www/nspref.vsp
+++ b/binsrc/b3s/www/nspref.vsp
@@ -2,12 +2,12 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <?vsp
 --
---  $Id: nspref.vsp,v 1.1.2.2 2009/05/01 19:39:36 source Exp $
+--  $Id: nspref.vsp,v 1.1.2.4 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -48,7 +48,7 @@
     </div><!--  #content -->
     <div id="footer">
       <div id="ft_b">
-	<a href="about.html">About</a> 
+	<a href="about.html">About</a>
         <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="http://dbpedia.org/statics/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
         <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="http://dbpedia.org/statics/LoDLogo.gif" border="0"></a>  
         <a href="http://dbpedia.org/sparql"><img alt="W3C Semantic Web Technology" src="http://dbpedia.org/statics/sw-sparql-blue.png" border="0"></a>     
diff --git a/binsrc/b3s/www/search.sql b/binsrc/b3s/www/search.sql
index ed286af..4e9e983 100644
--- a/binsrc/b3s/www/search.sql
+++ b/binsrc/b3s/www/search.sql
@@ -1,10 +1,10 @@
 --
---  $Id: search.sql,v 1.1.2.9 2011/03/24 15:50:37 source Exp $
+--  $Id: search.sql,v 1.1.2.13 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -35,11 +35,11 @@ create procedure label_get(in smode varchar)
   else if (smode='10') label := 'Cloud Around Person With Filtered Out Blank Nodes';
   else if (smode='11') label := 'Product Count By Manufacturer';
   else if (smode='12') label := 'Vendors with offers';
-  else if (smode='13') label := 'Places of worship around Paris with Cafe''s in close proximity';
+  else if (smode='13') label := 'Objects around Paris with Cafe''s in close proximity';
   else if (smode='14') label := 'Motorways across England & Scotland';
-  else if (smode='15') label := 'Places of worship around London with Cities in close proximity';
+  else if (smode='15') label := 'Objects around London with Cities in close proximity';
   else if (smode='16') label := 'Places with coordinates';
-  else if (smode='17') label := 'Subcategories of Protestant Churches';
+  else if (smode='17') label := 'Subcategories of History of Wisconsin';
   else if (smode='18') label := 'Things within close proximity of New York City';
   else if (smode='19') label := 'Distance between New York City and London, England';
   else if (smode='20') label := 'All Educational Institutions within 10km of Oxford, UK';
@@ -68,19 +68,19 @@ create procedure input_get (in num varchar)
   	'Search for',
 	'Search for',
 	'Search for',
-	'Interest',
+	'Name',
 	'Search for',
 	'Person URI',
 	'Property',
 	'Nickname',
-	'Nickname',
+	'Text pattern',
 	'Nickname',
 	'Number of items',
         'Price value',
 --	'Manufacturer',
         'City Longitude',
         'Latitude',
-        'Place of Worship URI',
+        'Entity URI',
         'Geometry Latitude',
         'Broader',
         'Place URI',
@@ -107,13 +107,13 @@ create procedure input_getcustom (in num varchar)
   if (num = 2)
     return 'City Latitude';
   else if (num = 3)
-    return 'Cafe Proximity to Place of Worship';
+    return 'Cafe Proximity to Entity URI';
   else if (num = 4)
-    return 'City Proximity to Place of Worship';
+    return 'Distance';
   if (num = 5)
-    return 'Class URI';
+    return 'isA';
   if (num = 6)
-    return 'City Proximity to Place of Worship';
+    return 'Distance';
   if (num = 7)
     return 'Geometry Longitude';
   if (num = 8)
@@ -151,8 +151,8 @@ create procedure desc_get (in num varchar)
 	'What sources talk the most about a given subject? Show the top N graphs containing triples with the given text pattern. Sort by descending triple count.',
 	'What types of objects contain a text pattern. Find matches, get the type. Group by type, order by count.',
 	'What are the interests of a given person based on their foaf:name?',
-	'Who writes the most about a topic. Show for each author the number of works mentioning the topic and total number of works.'
-||'<br>For all documents and posts we have extracted named entities the entity could shows the entities which occur in the works of each author.'
+	'Who writes the most about a topic. Show for each author the number of works mentioning the topic and total number of works. '
+||'<br>For all documents and posts we have extracted named entities the entity could shows the entities which occur in the works of each author. '
 ||'There are statistics about named entities occurring together, these are used for display a list of related entities. '
 	,
 	'Show the people a person directly or indirectly knows. Sort by distance and count of connections of the known person',
@@ -167,7 +167,7 @@ create procedure desc_get (in num varchar)
         'Show motorways across England & Scotland from DBpedia.',
         'Shows cities within certain proximity of London.',
         'Shows geometries with their coordinates.',
-        'Find entities that are subcategories of Protestant Churches, no deeper than 3 levels within the concept scheme hierarchy filtered by a specific subcategory.',
+        'Find entities that are subcategories of History of Wisconsin, no deeper than 3 levels within the concept scheme hierarchy filtered by a specific subcategory.',
         'Shows things within certain proximity of a place.',
         'Shows distance between 2 cities.',
         'Find all Educational Institutions within 10km of Oxford, UK ordered by date of establishment.'
@@ -202,7 +202,8 @@ create procedure head_get (in num varchar)
     vector ('Thing', 'Nick name', 'Occurrences'),
     vector ('Thing', 'Text Pattern', 'Occurrences'),
     vector ('Manifacturer URI', 'Total Products'),
-    vector ('Vendor', 'Offer', 'Business Function', 'Customer Type', 'Offer Object', 'Type of Good', 'Price'),
+    vector ('Vendor', 'Offer', 'Business Function', 'Offer Object', 'Type of Good', 'Price'),
+--    vector ('Vendor', 'Offer', 'Business Function', 'Customer Type', 'Offer Object', 'Type of Good', 'Price'),
 --    vector ('Total Products'),
     vector ('Cafe URI', 'Latitude', 'Longitude', 'Cafe Name', 'Church Name', 'Count'),
     vector ('Road', 'Latitude', 'Longitude'),
@@ -234,7 +235,7 @@ create procedure validate_input(inout val varchar)
 {
   val := trim(val, ' ');
   val := replace(val, '*', '');
-  val := replace(val, '>', '');
+ val := replace(val, '>', '');
   val := replace(val, '<', '');
   --val := replace(val, '&', '');
   --val := replace(val, '"', '');
@@ -245,7 +246,7 @@ create procedure validate_input(inout val varchar)
 create procedure get_curie (in val any)
 {
 
-  declare delim, delim1, delim2, delim3 integer;
+ declare delim, delim1, delim2, delim3 integer;
   declare pref, res, suff varchar;
 
   delim1 := coalesce (strrchr (val, '/'), -1);
@@ -576,13 +577,14 @@ create procedure pick_query(in smode varchar, inout val any, inout query varchar
     s1 := 'sparql SELECT ?i2 COUNT (*) WHERE  { ?p foaf:interest ?i1 . ' ||
     ' ?p foaf:name ?name . ' ||
     ' FILTER ( bif:contains (?name, \'';
-  validate_input(val);
+    validate_input(val);
     s2 := trim (fti_make_search_string(val), '()');
     s3 := '\')) . ?p foaf:interest ?i2  } GROUP BY ?i2 ORDER BY DESC 2 LIMIT 20';
-  query := concat('',s1, s2, s3,'');
+    query := concat('',s1, s2, s3,'');
   }
   else if (smode='5')
   {
+
 -- this query crashes the server:
 ----* The Most One-Sidedly Known People
 --sparql
@@ -738,7 +740,7 @@ s3 := '\')) .
     }
   else if (smode = '9')
     {
-      if (isnull(val)  or val = '') val := '"SQL"';
+      if (isnull(val)  or val = '') val := '"data"';
 
 -- b3s variant:
 
@@ -758,7 +760,7 @@ s3 := '\')) .
     }
   else if (smode = '10')
     {
-      if (isnull(val)  or val = '') val := '"SQL"';
+      if (isnull(val)  or val = '') val := '"Wellington"';
 
       s1 :=
       'sparql define input:inference \'virtrdf-label\' SELECT ?s ?lbl COUNT(*) WHERE { ?s  ?p2 ?o2 .  ?o2 <http://www.w3.org/2000/01/rdf-schema#label> ?lbl . ' ||
@@ -784,13 +786,14 @@ s3 := '\')) .
     {
       if (isnull(val)  or val = '') val := '500';
 
+--' ?ab gr:eligibleCustomerTypes ?el . ' ||
+
       s1 :=
-      'sparql SELECT ?xx ?ab ?bp ?el ?b ?c ?cv WHERE {' ||
+      'sparql SELECT ?xx ?ab ?bp ?b ?c bif:ceiling(?cv*100)/100.00  WHERE {' ||
       ' ?xx a gr:BusinessEntity . ' ||
       ' ?xx gr:offers ?ab . ' ||
       ' ?ab rdf:type gr:Offering . ' ||
       ' ?ab gr:hasBusinessFunction ?bp . ' ||
-      ' ?ab gr:eligibleCustomerTypes ?el . ' ||
       ' ?ab gr:includesObject ?b . ' ||
       ' ?b rdf:type gr:TypeAndQuantityNode . ' ||
       ' ?b gr:typeOfGood ?c . ' ||
@@ -800,7 +803,7 @@ s3 := '\')) .
       ' FILTER (?cv > ';
       validate_input(val);
       s2 := val;
-      s3 := ') } LIMIT 50';
+      s3 := ') } LIMIT 10';
       query := s1 || s2 || s3;
     }
 -- for now is removed from the list
@@ -821,7 +824,7 @@ s3 := '\')) .
     if (isnull(val2)  or val2 = '') val2 := '48.853';
 
     if (isnull(val3)  or val3 = '') val3 := '5';
-    if (isnull(val4)  or val4 = '') val4 := '0.2';
+    if (isnull(val4)  or val4 = '') val4 := '0.9';
 
 
     s1 := 'sparql SELECT DISTINCT ?cafe ?lat ?long ?cafename ?churchname ' ||
@@ -924,10 +927,10 @@ s3 := '\')) .
   }
   else if ( smode='17' )
   {
-    if (isnull(val)  or val = '') val := 'category:Protestant_churches';
+    if (isnull(val)  or val = '') val := 'category:History_of_Wisconsin';
     if (isnull(val2)  or val2 = '') val2 := 'en';
     if (isnull(val3)  or val3 = '') val3 := 'en';
-    if (isnull(val4)  or val4 = '') val4 := 'http://dbpedia.org/resource/Category:Churches_in_London';
+    if (isnull(val4)  or val4 = '') val4 := 'http://dbpedia.org/resource/Category:Metropolitan_areas_of_Wisconsin';
 
     validate_input(val);
     validate_input(val2);
@@ -941,7 +944,7 @@ s3 := '\')) .
        ' WHERE  ' ||
        '   { ' ||
        '     { ' ||
-       '       SELECT ?c  ?m ?n ?p ?trans?dist ' ||
+       '       SELECT ?c ?m ?n ?p ?trans ?dist ' ||
        '       WHERE ' ||
        '         { ' ||
        '           ?m rdfs:label ?n . ' ||
diff --git a/binsrc/b3s/www/search.vsp b/binsrc/b3s/www/search.vsp
index 13f1c7f..7ccc212 100644
--- a/binsrc/b3s/www/search.vsp
+++ b/binsrc/b3s/www/search.vsp
@@ -2,12 +2,12 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <?vsp
 --
---  $Id: search.vsp,v 1.1.2.8 2010/02/17 10:21:41 source Exp $
+--  $Id: search.vsp,v 1.1.2.11 2012/03/05 17:38:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -57,6 +57,9 @@
     err_msg := 'No such query';
     res := vector();
   };
+
+  declare desc_resource_uri varchar;
+  desc_resource_uri := sprintf ('http://%{WSHost}s/sparql?query=%U&format=cxml', ltrim(squery, 'sparql '));
 ?>
   <head>
     <link rel="stylesheet" type="text/css" href="style.css">
@@ -77,7 +80,7 @@
                 http (sprintf(' <b><a href="dlistall.vsp?p=%U">Back to Drill-down list | </a></b>',srch));
               http(sprintf('<a href="listall.vsp">Back to main menu</a>'));
             ?>
-	    <p><?vsp http (desc_get (smode)); ?></p>	
+	    <p><?vsp http (desc_get (smode)); ?></p>
           </td>
        </tr>
      </table>
@@ -91,9 +94,9 @@
 		<?vsp
 		  if (input_get (smode) = 'Search for')
                     {
-                      http_value ('In search form, enter words separated by spaces.  To indicate consecutive words, enclose in quotes (").', 'p'); 
-		    }   
-		?>  
+                      http_value ('In search form, enter words separated by spaces. To indicate consecutive words, enclose in quotes (").', 'p');
+		    }
+		?>
 		<?V input_get (smode) ?> <input size="60" type="text" name="sc" value="<?= srch ?>"/> 
                 <!-- show the second input field-->
                 <?vsp
@@ -220,7 +223,7 @@
 		      http ('<tr>');
 		      foreach (any elm in head) do
 			{
-			  http_value (elm, 'th'); 
+			  http_value (elm, 'th');
 			}
 		      http ('</tr>');
 		    }
@@ -253,15 +256,15 @@
 			else if (smode = '1004' and j = 0)
 			  {
 			    http (sprintf ('<td><a href="search.vsp?q=1001&sc=%U&fa=Execute">', tmp));
-		            http_value (tmp);
+	                    http_value (tmp);
 			    http ('</a>');
 			  }
-			else if (smode = '4' and j = 0) 
+			else if (smode = '4' and j = 0)
 			  {
 			    http (sprintf ('<td><a href="search.vsp?q=%U&sc=%U&fa=Execute">', smode, '<'||tmp||'>'));
 		            http_value (tmp);
 			    http (sprintf('</a> <a href="/describe/?url=%U">Browse</a>',tmp));
-			  }	
+			  }
 			else if (smode = '18' and j = 0)
 			  {
 			    http (sprintf ('<td><a href="search.vsp?q=%U&sc=%U&sc2=%U&sc3=%U&fa=Execute">', smode, '<'||tmp||'>', srch2, srch3));
@@ -270,11 +273,11 @@
 			  }
 			else if (smode  = '1001' and j = 0)
                           {
-		  	    http (sprintf ('<td><a class="uri" href="%V">%s</a>', 
-			    	replace (tmp, 'http://umbel.org/umbel/ne/wikipedia/', 'http://dbpedia.org/resource/'), 
+		  	    http (sprintf ('<td><a class="uri" href="%V">%s</a>',
+			    	replace (tmp, 'http://umbel.org/umbel/ne/wikipedia/', 'http://dbpedia.org/resource/'),
 			    	get_curie (tmp)));
 			    http (sprintf(' <b><a href="search.vsp?q=1004&sc=%U&fa=Execute">Authors</a></b>',tmp));
-		          }		
+		          }
 			else if (smode not in ('2'))
 		   	  http (sprintf ('<td><a class="uri" href="%s">%s</a>', concat('/describe/?url=', sprintf ('%U',tmp)), get_curie (tmp)));
  		        else
@@ -295,22 +298,22 @@
                         --dbg_obj_print(tmp);
 			if (__tag of rdf_box = __tag (tmp) and not rdf_box_is_complete (tmp))
 			  http ('Incomplete box');
-			else  
+			else
 			  {
 			    if ((smode = '8' or smode ='9' or smode ='10') and j = 1)
-			      http (sprintf ('<a href="search.vsp?q=%U&sc=%U&fa=Execute">', smode, tmp));	
+			      http (sprintf ('<a href="search.vsp?q=%U&sc=%U&fa=Execute">', smode, tmp));
 			    if ((smode = '8' or smode ='9' or smode ='10') and j = 2)
-			      http (sprintf ('<a href="search.vsp?q=1005&sc=%U&fa=Execute">', rs[1]));	
+			      http (sprintf ('<a href="search.vsp?q=1005&sc=%U&fa=Execute">', rs[1]));
 		            if ((smode = '1' and j = 2) or (smode = '1002' and j = 2) or (smode = '1003' and j = 2))
                               http (tmp);
-			    else  
+			    else
                               {
 			        if (isstring (tmp))
 				  tmp := charset_recode (tmp, 'UTF-8', '_WIDE_');
 			        http_value(tmp);
-		              } 		
+		              }
 			    if ( (smode = '8' or smode ='9' or smode ='10') and (j = 1 or j = 2))
-			      http ('</a>');	
+			      http ('</a>');
 			  }
                         http('</td>');
                       };
@@ -324,19 +327,19 @@
           <?vsp
             };
               };
-	    if (smode = '1004') {   
+	    if (smode = '1004') {
           ?>
 	  <tr>
 	      <td>
 		  <p>Related NEs</p>
 		  <table class="tableresult" border="1">
-		  <?vsp 
+		  <?vsp
 		  exec ('select top 20 iri from (select id_to_iri (tc_t2) iri, tc_count from nes_coincidence where tc_t1 = iri_to_id (?) union select id_to_iri (tc_t1), tc_count from nes_coincidence where tc_t2 = iri_to_id (?) order by tc_count desc) xx', null, null, vector (srch, srch), 0, meta, data);
 		  for (i := 0; i < length (data); i := i + 1)
 		    {
                       declare iri any;
 		      iri := data[i][0];
-		      http (sprintf ('<tr><td><a href="search.vsp?q=1004&sc=%U&fa=Execute">%V</a></td></tr>', iri, get_curie (iri))); 
+		      http (sprintf ('<tr><td><a href="search.vsp?q=1004&sc=%U&fa=Execute">%V</a></td></tr>', iri, get_curie (iri)));
 		    }
 		  ?>
                  </table>
@@ -351,7 +354,8 @@
           </tr>
       </table>
     </div><!--  #content -->
-    <div id="isparql-results">
+
+    <!-- div id="isparql-results">
       <table class="description">
         <tr>
           <td>
@@ -364,7 +368,7 @@
           </td>
        </tr>
      </table>
-    </div>
+    </div -->
 
     <div id="homelink">
       <table class="description">
@@ -380,12 +384,34 @@
      </table>
     </div>
     <div id="footer">
+
+      <div id="ft_b">
+        <?vsp if (squery <> '' and squery is not null) { ?>
+         Alternative Linked Data Views:
+
+	       <?vsp if (VAD_CHECK_VERSION ('PivotViewer') is not null) { ?>
+	         <a href="/PivotViewer/?url=<?vsp http_url (desc_resource_uri); ?>" title="PivotViewer page for exploring results and generating new queries" target="_blank">PivotViewer</a>
+	       <?vsp } ?>
+	        |
+	       <?vsp if (VAD_CHECK_VERSION ('iSPARQL') is not null) {
+	         squery := ltrim(squery, 'sparql ');
+           http (sprintf(' <a href="/isparql/view/?query=%U&endpoint=/sparql&maxrows=50&default-graph-uri=&resultview=browser" title="Interactive Query By Example oriented SPARQL UI" target="_blank">iSPARQL</a>',squery));
+	       } ?>
+
+        <?vsp } ?>
+      </div> <!-- #ft_t -->
+
       <div id="ft_b">
-	<a href="about.html">About</a> 
+	<a href="about.html">About</a>
         <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="http://dbpedia.org/statics/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
         <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="http://dbpedia.org/statics/LoDLogo.gif" border="0"></a>  
         <a href="http://dbpedia.org/sparql"><img alt="W3C Semantic Web Technology" src="http://dbpedia.org/statics/sw-sparql-blue.png" border="0"></a>     
         <a href="http://www.opendefinition.org/"><img alt="This material is Open Knowledge" src="http://dbpedia.org/statics/od_80x15_red_green.png" border="0"></a>
+        <br />
+	This work is licensed under a
+	<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />
+	<?vsp fct_virt_info (); ?><br />
+	Copyright © 2009-2012 OpenLink Software
       </div> <!-- #ft_b -->
     </div> <!-- #footer -->
   </body>
diff --git a/binsrc/b3s/www/style.css b/binsrc/b3s/www/style.css
index eed35b3..d56b419 100644
--- a/binsrc/b3s/www/style.css
+++ b/binsrc/b3s/www/style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: style.css,v 1.1.2.1 2009/04/17 11:07:30 source Exp $
+ *  $Id: style.css,v 1.1.2.4 2012/03/05 17:38:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,9 @@ body {
     font-size: 80%;
     margin: 0;
     padding: 1.2em 2em;}
+
+a, a:visited {color: #242;}
+
 #rdficon { float: right; position: relative; top: -28px; vertical-align: middle; padding: 3px; border: 1px solid #fff;}
 #header { border-bottom: 2px solid #696; margin: 0 0 1.2em; padding: 0 0 0.3em; }
 #footer { border-top: 2px solid #696; color: #666; margin: 1.2em 0 0; padding: 0.3em 0 0; }
diff --git a/binsrc/bpel/101.HelloWorld/HelloWorld.bpel b/binsrc/bpel/101.HelloWorld/HelloWorld.bpel
index 37bb068..ed29906 100644
--- a/binsrc/bpel/101.HelloWorld/HelloWorld.bpel
+++ b/binsrc/bpel/101.HelloWorld/HelloWorld.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/101.HelloWorld/HelloWorld.wsdl b/binsrc/bpel/101.HelloWorld/HelloWorld.wsdl
index ff15ba0..6572ac0 100644
--- a/binsrc/bpel/101.HelloWorld/HelloWorld.wsdl
+++ b/binsrc/bpel/101.HelloWorld/HelloWorld.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/101.HelloWorld/HelloWorld.xml b/binsrc/bpel/101.HelloWorld/HelloWorld.xml
index de454d1..d1cf987 100644
--- a/binsrc/bpel/101.HelloWorld/HelloWorld.xml
+++ b/binsrc/bpel/101.HelloWorld/HelloWorld.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/101.HelloWorld/build.xml b/binsrc/bpel/101.HelloWorld/build.xml
index 1d35028..bff4ada 100644
--- a/binsrc/bpel/101.HelloWorld/build.xml
+++ b/binsrc/bpel/101.HelloWorld/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/106.ParallelFlows/FlowSample.bpel b/binsrc/bpel/106.ParallelFlows/FlowSample.bpel
index 4a78f25..701982a 100644
--- a/binsrc/bpel/106.ParallelFlows/FlowSample.bpel
+++ b/binsrc/bpel/106.ParallelFlows/FlowSample.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/106.ParallelFlows/FlowSample.wsdl b/binsrc/bpel/106.ParallelFlows/FlowSample.wsdl
index 0ceab05..915dc34 100644
--- a/binsrc/bpel/106.ParallelFlows/FlowSample.wsdl
+++ b/binsrc/bpel/106.ParallelFlows/FlowSample.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/106.ParallelFlows/bpel.xml b/binsrc/bpel/106.ParallelFlows/bpel.xml
index 79b46c0..aef1322 100644
--- a/binsrc/bpel/106.ParallelFlows/bpel.xml
+++ b/binsrc/bpel/106.ParallelFlows/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/106.ParallelFlows/build.xml b/binsrc/bpel/106.ParallelFlows/build.xml
index f6cc83d..d6f7667 100644
--- a/binsrc/bpel/106.ParallelFlows/build.xml
+++ b/binsrc/bpel/106.ParallelFlows/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.bpel b/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.bpel
index fbfa43f..bfe8c97 100644
--- a/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.bpel
+++ b/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.wsdl b/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.wsdl
index d69d213..4963d75 100644
--- a/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/Buyer/Buyer.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Buyer/bpel.xml b/binsrc/bpel/109.CorrelationSets/Buyer/bpel.xml
index c0e6f41..e641c60 100644
--- a/binsrc/bpel/109.CorrelationSets/Buyer/bpel.xml
+++ b/binsrc/bpel/109.CorrelationSets/Buyer/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Buyer/build.xml b/binsrc/bpel/109.CorrelationSets/Buyer/build.xml
index 4cc1ad8..3299f75 100644
--- a/binsrc/bpel/109.CorrelationSets/Buyer/build.xml
+++ b/binsrc/bpel/109.CorrelationSets/Buyer/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Buyer/supplyCorrelation.wsdl b/binsrc/bpel/109.CorrelationSets/Buyer/supplyCorrelation.wsdl
index a8e96ee..4117bf6 100644
--- a/binsrc/bpel/109.CorrelationSets/Buyer/supplyCorrelation.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/Buyer/supplyCorrelation.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Buyer/supplyMessages.wsdl b/binsrc/bpel/109.CorrelationSets/Buyer/supplyMessages.wsdl
index f452b55..1f59b7a 100644
--- a/binsrc/bpel/109.CorrelationSets/Buyer/supplyMessages.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/Buyer/supplyMessages.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Seller/Seller.bpel b/binsrc/bpel/109.CorrelationSets/Seller/Seller.bpel
index b5fe71e..8bc0b1b 100644
--- a/binsrc/bpel/109.CorrelationSets/Seller/Seller.bpel
+++ b/binsrc/bpel/109.CorrelationSets/Seller/Seller.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Seller/Seller.wsdl b/binsrc/bpel/109.CorrelationSets/Seller/Seller.wsdl
index 9f71b02..d363245 100644
--- a/binsrc/bpel/109.CorrelationSets/Seller/Seller.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/Seller/Seller.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Seller/bpel.xml b/binsrc/bpel/109.CorrelationSets/Seller/bpel.xml
index 306ce10..3f4855b 100644
--- a/binsrc/bpel/109.CorrelationSets/Seller/bpel.xml
+++ b/binsrc/bpel/109.CorrelationSets/Seller/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Seller/build.xml b/binsrc/bpel/109.CorrelationSets/Seller/build.xml
index bb38348..133ff6f 100644
--- a/binsrc/bpel/109.CorrelationSets/Seller/build.xml
+++ b/binsrc/bpel/109.CorrelationSets/Seller/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Seller/supplyCorrelation.wsdl b/binsrc/bpel/109.CorrelationSets/Seller/supplyCorrelation.wsdl
index a8e96ee..4117bf6 100644
--- a/binsrc/bpel/109.CorrelationSets/Seller/supplyCorrelation.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/Seller/supplyCorrelation.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/Seller/supplyMessages.wsdl b/binsrc/bpel/109.CorrelationSets/Seller/supplyMessages.wsdl
index f452b55..1f59b7a 100644
--- a/binsrc/bpel/109.CorrelationSets/Seller/supplyMessages.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/Seller/supplyMessages.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/build.xml b/binsrc/bpel/109.CorrelationSets/build.xml
index b8ab8b5..e0ae3d2 100644
--- a/binsrc/bpel/109.CorrelationSets/build.xml
+++ b/binsrc/bpel/109.CorrelationSets/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/supplyCorrelation.wsdl b/binsrc/bpel/109.CorrelationSets/supplyCorrelation.wsdl
index a8e96ee..4117bf6 100644
--- a/binsrc/bpel/109.CorrelationSets/supplyCorrelation.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/supplyCorrelation.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/109.CorrelationSets/supplyMessages.wsdl b/binsrc/bpel/109.CorrelationSets/supplyMessages.wsdl
index f452b55..1f59b7a 100644
--- a/binsrc/bpel/109.CorrelationSets/supplyMessages.wsdl
+++ b/binsrc/bpel/109.CorrelationSets/supplyMessages.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/Makefile.am b/binsrc/bpel/Makefile.am
index 29121b3..33445dc 100644
--- a/binsrc/bpel/Makefile.am
+++ b/binsrc/bpel/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/Makefile.in b/binsrc/bpel/Makefile.in
index a5e36d5..26f7f1c 100644
--- a/binsrc/bpel/Makefile.in
+++ b/binsrc/bpel/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/bpel/activity.vspx b/binsrc/bpel/activity.vspx
index 9c04afe..6d1c260 100644
--- a/binsrc/bpel/activity.vspx
+++ b/binsrc/bpel/activity.vspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/activity.xsl b/binsrc/bpel/activity.xsl
index 7204694..078a57d 100644
--- a/binsrc/bpel/activity.xsl
+++ b/binsrc/bpel/activity.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -  
- -  $Id: activity.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: activity.xsl,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/asyncall.vsp b/binsrc/bpel/asyncall.vsp
index 819fd1a..d559c4c 100644
--- a/binsrc/bpel/asyncall.vsp
+++ b/binsrc/bpel/asyncall.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: asyncall.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: asyncall.vsp,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel.vsp b/binsrc/bpel/bpel.vsp
index 3968d72..6d536a0 100644
--- a/binsrc/bpel/bpel.vsp
+++ b/binsrc/bpel/bpel.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: bpel.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: bpel.vsp,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel.xsd b/binsrc/bpel/bpel.xsd
index 81fee5d..df81139 100644
--- a/binsrc/bpel/bpel.xsd
+++ b/binsrc/bpel/bpel.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_adaptor.cs b/binsrc/bpel/bpel_adaptor.cs
index 1204148..d4bb83c 100644
--- a/binsrc/bpel/bpel_adaptor.cs
+++ b/binsrc/bpel/bpel_adaptor.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_confirm.vspx b/binsrc/bpel/bpel_confirm.vspx
index 7ebde61..d4c5b90 100644
--- a/binsrc/bpel/bpel_confirm.vspx
+++ b/binsrc/bpel/bpel_confirm.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpel_confirm.vspx,v 1.2 2006/08/16 00:04:13 source Exp $
+ -  $Id: bpel_confirm.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_ddl.sql b/binsrc/bpel/bpel_ddl.sql
index 553416c..cc06fc9 100644
--- a/binsrc/bpel/bpel_ddl.sql
+++ b/binsrc/bpel/bpel_ddl.sql
@@ -1,14 +1,14 @@
 --
 --  bpel_ddl.sql
 --
---  $Id: bpel_ddl.sql,v 1.1.1.1 2006/04/11 17:56:09 source Exp $
+--  $Id: bpel_ddl.sql,v 1.1.1.1.2.1 2012/03/08 12:54:55 source Exp $
 --
 --  BPEL DB Schema
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_decor.vspx b/binsrc/bpel/bpel_decor.vspx
index e6d9ce0..3d6d7d9 100644
--- a/binsrc/bpel/bpel_decor.vspx
+++ b/binsrc/bpel/bpel_decor.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: bpel_decor.vspx,v 1.3 2006/08/16 00:04:13 source Exp $
+ -  $Id: bpel_decor.vspx,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_eng.sql b/binsrc/bpel/bpel_eng.sql
index 31d08d2..92ed0dc 100644
--- a/binsrc/bpel/bpel_eng.sql
+++ b/binsrc/bpel/bpel_eng.sql
@@ -1,14 +1,14 @@
 --
 --  bpel_eng.sql
 --
---  $Id: bpel_eng.sql,v 1.2 2008/07/14 19:23:11 source Exp $
+--  $Id: bpel_eng.sql,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 --
 --  BPEL Script compilation & utilities
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_intrp.sql b/binsrc/bpel/bpel_intrp.sql
index 921fa7e..28cf575 100644
--- a/binsrc/bpel/bpel_intrp.sql
+++ b/binsrc/bpel/bpel_intrp.sql
@@ -1,14 +1,14 @@
 --
 --  Bpel_interpreter.sql
 --
---  $Id: bpel_intrp.sql,v 1.2 2007/03/14 14:23:25 source Exp $
+--  $Id: bpel_intrp.sql,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
 --
 --  BPEL Intrepreter
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_login.vspx b/binsrc/bpel/bpel_login.vspx
index efb0ae7..a63e1cc 100644
--- a/binsrc/bpel/bpel_login.vspx
+++ b/binsrc/bpel/bpel_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bpel_login.vspx,v 1.2 2006/08/16 00:04:13 source Exp $
+ -  $Id: bpel_login.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_login_new.vspx b/binsrc/bpel/bpel_login_new.vspx
index 4e4c4db..0e5cec5 100644
--- a/binsrc/bpel/bpel_login_new.vspx
+++ b/binsrc/bpel/bpel_login_new.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bpel_login_new.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpel_login_new.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_navigation_bar.vspx b/binsrc/bpel/bpel_navigation_bar.vspx
index 33f9ea5..36a232c 100644
--- a/binsrc/bpel/bpel_navigation_bar.vspx
+++ b/binsrc/bpel/bpel_navigation_bar.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpel_navigation_bar.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpel_navigation_bar.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_plinks.xsl b/binsrc/bpel/bpel_plinks.xsl
index a15cf0c..6e6c880 100644
--- a/binsrc/bpel/bpel_plinks.xsl
+++ b/binsrc/bpel/bpel_plinks.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: bpel_plinks.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpel_plinks.xsl,v 1.3.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_style.xsl b/binsrc/bpel/bpel_style.xsl
index ce97469..363e183 100644
--- a/binsrc/bpel/bpel_style.xsl
+++ b/binsrc/bpel/bpel_style.xsl
@@ -2,12 +2,12 @@
 <!-- <!DOCTYPE html  PUBLIC "" "ent.dtd"> -->
 <!--
  -  
- -  $Id: bpel_style.xsl,v 1.3.2.1 2010/01/07 16:58:12 source Exp $
+ -  $Id: bpel_style.xsl,v 1.3.2.2 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_style_new.xsl b/binsrc/bpel/bpel_style_new.xsl
index 7596521..88873c2 100644
--- a/binsrc/bpel/bpel_style_new.xsl
+++ b/binsrc/bpel/bpel_style_new.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: bpel_style_new.xsl,v 1.2.2.1 2010/01/07 16:58:12 source Exp $
+ -  $Id: bpel_style_new.xsl,v 1.2.2.2 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_ui_bpelwsdl_edit.vspx b/binsrc/bpel/bpel_ui_bpelwsdl_edit.vspx
index f5822e0..e37e798 100644
--- a/binsrc/bpel/bpel_ui_bpelwsdl_edit.vspx
+++ b/binsrc/bpel/bpel_ui_bpelwsdl_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bpel_ui_bpelwsdl_edit.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpel_ui_bpelwsdl_edit.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_ui_bpelwsdl_register.vspx b/binsrc/bpel/bpel_ui_bpelwsdl_register.vspx
index 15da4c7..1246e5b 100644
--- a/binsrc/bpel/bpel_ui_bpelwsdl_register.vspx
+++ b/binsrc/bpel/bpel_ui_bpelwsdl_register.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bpel_ui_bpelwsdl_register.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpel_ui_bpelwsdl_register.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_ui_import.vspx b/binsrc/bpel/bpel_ui_import.vspx
index e93ece9..2f0fb38 100644
--- a/binsrc/bpel/bpel_ui_import.vspx
+++ b/binsrc/bpel/bpel_ui_import.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bpel_ui_import.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpel_ui_import.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpel_ui_import2.vspx b/binsrc/bpel/bpel_ui_import2.vspx
index 41d1f6b..342aaaa 100644
--- a/binsrc/bpel/bpel_ui_import2.vspx
+++ b/binsrc/bpel/bpel_ui_import2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bpel_ui_import2.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpel_ui_import2.vspx,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelcomp.xsl b/binsrc/bpel/bpelcomp.xsl
index 78cd0f1..c0c9516 100644
--- a/binsrc/bpel/bpelcomp.xsl
+++ b/binsrc/bpel/bpelcomp.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: bpelcomp.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelcomp.xsl,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelexpn.xsl b/binsrc/bpel/bpelexpn.xsl
index 3446fc7..9e9b1d1 100644
--- a/binsrc/bpel/bpelexpn.xsl
+++ b/binsrc/bpel/bpelexpn.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpelexpn.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelexpn.xsl,v 1.2.2.1 2012/03/08 12:54:55 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelimport.xsl b/binsrc/bpel/bpelimport.xsl
index 5e16002..817bedc 100644
--- a/binsrc/bpel/bpelimport.xsl
+++ b/binsrc/bpel/bpelimport.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpelimport.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelimport.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelmsg.xsl b/binsrc/bpel/bpelmsg.xsl
index 042b266..50f50ba 100644
--- a/binsrc/bpel/bpelmsg.xsl
+++ b/binsrc/bpel/bpelmsg.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpelmsg.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelmsg.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelmsgen.xsl b/binsrc/bpel/bpelmsgen.xsl
index 6a286d7..3ced006 100644
--- a/binsrc/bpel/bpelmsgen.xsl
+++ b/binsrc/bpel/bpelmsgen.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpelmsgen.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelmsgen.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpeloper.xsl b/binsrc/bpel/bpeloper.xsl
index b2a000e..ea1a402 100644
--- a/binsrc/bpel/bpeloper.xsl
+++ b/binsrc/bpel/bpeloper.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpeloper.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpeloper.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelstatus.xsl b/binsrc/bpel/bpelstatus.xsl
index c1ca02c..8f885a2 100644
--- a/binsrc/bpel/bpelstatus.xsl
+++ b/binsrc/bpel/bpelstatus.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bpelstatus.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelstatus.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelv.xsd b/binsrc/bpel/bpelv.xsd
index 1705d7a..bc5892e 100644
--- a/binsrc/bpel/bpelv.xsd
+++ b/binsrc/bpel/bpelv.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelwsdl.xsl b/binsrc/bpel/bpelwsdl.xsl
index 620c3fb..7e55686 100644
--- a/binsrc/bpel/bpelwsdl.xsl
+++ b/binsrc/bpel/bpelwsdl.xsl
@@ -5,12 +5,12 @@
 ]>
 <!--
  -  
- -  $Id: bpelwsdl.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelwsdl.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/bpelx.xsd b/binsrc/bpel/bpelx.xsd
index 39be785..0ac3b25 100644
--- a/binsrc/bpel/bpelx.xsd
+++ b/binsrc/bpel/bpelx.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/browser.vspx b/binsrc/bpel/browser.vspx
index 8f89c35..fd46bf7 100644
--- a/binsrc/bpel/browser.vspx
+++ b/binsrc/bpel/browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: browser.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: browser.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/common.xsl b/binsrc/bpel/common.xsl
index 542981a..9a0bd7c 100644
--- a/binsrc/bpel/common.xsl
+++ b/binsrc/bpel/common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: common.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: common.xsl,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/configure.vspx b/binsrc/bpel/configure.vspx
index 3b9f68d..b3c3cb5 100644
--- a/binsrc/bpel/configure.vspx
+++ b/binsrc/bpel/configure.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: configure.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: configure.vspx,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/debug.vsp b/binsrc/bpel/debug.vsp
index 9d288d2..a37fb2d 100644
--- a/binsrc/bpel/debug.vsp
+++ b/binsrc/bpel/debug.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: debug.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: debug.vsp,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/default.css b/binsrc/bpel/default.css
index c37b771..a173984 100644
--- a/binsrc/bpel/default.css
+++ b/binsrc/bpel/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: default.css,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/drop.sql b/binsrc/bpel/drop.sql
index da9b7a7..be277d1 100644
--- a/binsrc/bpel/drop.sql
+++ b/binsrc/bpel/drop.sql
@@ -1,14 +1,14 @@
 --
 --  drop.sql
 --
---  $Id: drop.sql,v 1.1.1.1 2006/04/11 17:56:09 source Exp $
+--  $Id: drop.sql,v 1.1.1.1.2.1 2012/03/08 12:54:56 source Exp $
 --
 --  BPEL uninstall operations
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/drop_prc.sql b/binsrc/bpel/drop_prc.sql
index b0fde83..b63d1ad 100644
--- a/binsrc/bpel/drop_prc.sql
+++ b/binsrc/bpel/drop_prc.sql
@@ -1,14 +1,14 @@
 --
 --  drop_hosts.sql
 --
---  $Id: drop_prc.sql,v 1.1.1.1 2006/04/11 17:56:09 source Exp $
+--  $Id: drop_prc.sql,v 1.1.1.1.2.1 2012/03/08 12:54:56 source Exp $
 --
 --  Delete from BPEL.BPEL.script to activate triggers for removing defined Virtual Directories
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/error.vspx b/binsrc/bpel/error.vspx
index 6220cc9..1af4ab9 100644
--- a/binsrc/bpel/error.vspx
+++ b/binsrc/bpel/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: error.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/filesystem.sql b/binsrc/bpel/filesystem.sql
index 4f755e4..917dc0d 100644
--- a/binsrc/bpel/filesystem.sql
+++ b/binsrc/bpel/filesystem.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: filesystem.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: filesystem.sql,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/genwsdl.xsl b/binsrc/bpel/genwsdl.xsl
index 4a952e5..d6b3cb3 100644
--- a/binsrc/bpel/genwsdl.xsl
+++ b/binsrc/bpel/genwsdl.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: genwsdl.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: genwsdl.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help.vspx b/binsrc/bpel/help.vspx
index 3df5016..538be1f 100644
--- a/binsrc/bpel/help.vspx
+++ b/binsrc/bpel/help.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: help.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: help.vspx,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help.xsl b/binsrc/bpel/help.xsl
index 4054e9d..ee75167 100644
--- a/binsrc/bpel/help.xsl
+++ b/binsrc/bpel/help.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: help.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: help.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/browser.xml b/binsrc/bpel/help/browser.xml
index 0147017..77159e4 100644
--- a/binsrc/bpel/help/browser.xml
+++ b/binsrc/bpel/help/browser.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/configure.xml b/binsrc/bpel/help/configure.xml
index e0fd598..9eb93e1 100644
--- a/binsrc/bpel/help/configure.xml
+++ b/binsrc/bpel/help/configure.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/confirm.xml b/binsrc/bpel/help/confirm.xml
index 962827c..52af26c 100644
--- a/binsrc/bpel/help/confirm.xml
+++ b/binsrc/bpel/help/confirm.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/imsgpr.xml b/binsrc/bpel/help/imsgpr.xml
index f5fdeeb..7b71a9e 100644
--- a/binsrc/bpel/help/imsgpr.xml
+++ b/binsrc/bpel/help/imsgpr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/incoming.xml b/binsrc/bpel/help/incoming.xml
index a6d1eaa..d62b440 100644
--- a/binsrc/bpel/help/incoming.xml
+++ b/binsrc/bpel/help/incoming.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/instances.xml b/binsrc/bpel/help/instances.xml
index 0eb27b3..45e4e54 100644
--- a/binsrc/bpel/help/instances.xml
+++ b/binsrc/bpel/help/instances.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/message.xml b/binsrc/bpel/help/message.xml
index f0ae746..2abdb61 100644
--- a/binsrc/bpel/help/message.xml
+++ b/binsrc/bpel/help/message.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/omsgpr.xml b/binsrc/bpel/help/omsgpr.xml
index bfef33d..933048c 100644
--- a/binsrc/bpel/help/omsgpr.xml
+++ b/binsrc/bpel/help/omsgpr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/plinks.xml b/binsrc/bpel/help/plinks.xml
index eac85e2..07a91f7 100644
--- a/binsrc/bpel/help/plinks.xml
+++ b/binsrc/bpel/help/plinks.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/plinks_props.xml b/binsrc/bpel/help/plinks_props.xml
index e5343fc..59fc970 100644
--- a/binsrc/bpel/help/plinks_props.xml
+++ b/binsrc/bpel/help/plinks_props.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_activity.xml b/binsrc/bpel/help/process_activity.xml
index aeae5c1..160a51d 100644
--- a/binsrc/bpel/help/process_activity.xml
+++ b/binsrc/bpel/help/process_activity.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_audit.xml b/binsrc/bpel/help/process_audit.xml
index dbfbb06..7253ed3 100644
--- a/binsrc/bpel/help/process_audit.xml
+++ b/binsrc/bpel/help/process_audit.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_graph.xml b/binsrc/bpel/help/process_graph.xml
index 1d4b97e..4b3c572 100644
--- a/binsrc/bpel/help/process_graph.xml
+++ b/binsrc/bpel/help/process_graph.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_list.xml b/binsrc/bpel/help/process_list.xml
index 9bfb1ff..125c7c8 100644
--- a/binsrc/bpel/help/process_list.xml
+++ b/binsrc/bpel/help/process_list.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_redef.xml b/binsrc/bpel/help/process_redef.xml
index da2ec3e..dada4dd 100644
--- a/binsrc/bpel/help/process_redef.xml
+++ b/binsrc/bpel/help/process_redef.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_redefine.xml b/binsrc/bpel/help/process_redefine.xml
index 363f0b6..f35a85d 100644
--- a/binsrc/bpel/help/process_redefine.xml
+++ b/binsrc/bpel/help/process_redefine.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_status.xml b/binsrc/bpel/help/process_status.xml
index 6c5339a..ffc69bb 100644
--- a/binsrc/bpel/help/process_status.xml
+++ b/binsrc/bpel/help/process_status.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/process_upload.xml b/binsrc/bpel/help/process_upload.xml
index c91d896..12922e4 100644
--- a/binsrc/bpel/help/process_upload.xml
+++ b/binsrc/bpel/help/process_upload.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/processes_list.xml b/binsrc/bpel/help/processes_list.xml
index 9523afd..f2dc5bf 100644
--- a/binsrc/bpel/help/processes_list.xml
+++ b/binsrc/bpel/help/processes_list.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/reports.xml b/binsrc/bpel/help/reports.xml
index 6791766..0176961 100644
--- a/binsrc/bpel/help/reports.xml
+++ b/binsrc/bpel/help/reports.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/rmsgpr.xml b/binsrc/bpel/help/rmsgpr.xml
index 9de6dd1..ca8d078 100644
--- a/binsrc/bpel/help/rmsgpr.xml
+++ b/binsrc/bpel/help/rmsgpr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/statendp.xml b/binsrc/bpel/help/statendp.xml
index 3f2442e..e8055fa 100644
--- a/binsrc/bpel/help/statendp.xml
+++ b/binsrc/bpel/help/statendp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/statproc.xml b/binsrc/bpel/help/statproc.xml
index 147dc5d..bd63e10 100644
--- a/binsrc/bpel/help/statproc.xml
+++ b/binsrc/bpel/help/statproc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/help/wss_keys.xml b/binsrc/bpel/help/wss_keys.xml
index ff26b93..b072149 100644
--- a/binsrc/bpel/help/wss_keys.xml
+++ b/binsrc/bpel/help/wss_keys.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/home.vspx b/binsrc/bpel/home.vspx
index 3081b93..dc7702a 100644
--- a/binsrc/bpel/home.vspx
+++ b/binsrc/bpel/home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: home.vspx,v 1.4 2008/04/18 14:05:12 source Exp $
+ -  $Id: home.vspx,v 1.4.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/imsgpr.vspx b/binsrc/bpel/imsgpr.vspx
index ab9d999..39d44b5 100644
--- a/binsrc/bpel/imsgpr.vspx
+++ b/binsrc/bpel/imsgpr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: imsgpr.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: imsgpr.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/incoming.vspx b/binsrc/bpel/incoming.vspx
index bef19ae..82be318 100644
--- a/binsrc/bpel/incoming.vspx
+++ b/binsrc/bpel/incoming.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: incoming.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: incoming.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/install.sql b/binsrc/bpel/install.sql
index 9321253..1147b24 100644
--- a/binsrc/bpel/install.sql
+++ b/binsrc/bpel/install.sql
@@ -1,14 +1,14 @@
 --
 --  install.sql
 --
---  $Id: install.sql,v 1.1.1.1 2006/04/11 17:56:09 source Exp $
+--  $Id: install.sql,v 1.1.1.1.2.1 2012/03/08 12:54:56 source Exp $
 --
 --  BPEL support procedures
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/instances.vspx b/binsrc/bpel/instances.vspx
index 4dd1666..0ea2d63 100644
--- a/binsrc/bpel/instances.vspx
+++ b/binsrc/bpel/instances.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: instances.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: instances.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/main_tabs.vspx b/binsrc/bpel/main_tabs.vspx
index 8aff065..933c9b2 100644
--- a/binsrc/bpel/main_tabs.vspx
+++ b/binsrc/bpel/main_tabs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: main_tabs.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: main_tabs.vspx,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/make_vad.sh b/binsrc/bpel/make_vad.sh
index 74ae80b..853b0f9 100755
--- a/binsrc/bpel/make_vad.sh
+++ b/binsrc/bpel/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.13.2.2 2011/02/03 10:36:50 source Exp $
+#  $Id: make_vad.sh,v 1.13.2.3 2012/03/08 12:54:56 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -318,7 +318,7 @@ sticker_init() {
   echo "  <name package=\"bpel4ws\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"BPEL4WS\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
diff --git a/binsrc/bpel/message.vspx b/binsrc/bpel/message.vspx
index d66f56d..8e7c584 100644
--- a/binsrc/bpel/message.vspx
+++ b/binsrc/bpel/message.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: message.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: message.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/omsgpr.vspx b/binsrc/bpel/omsgpr.vspx
index bfc2fd9..7c76397 100644
--- a/binsrc/bpel/omsgpr.vspx
+++ b/binsrc/bpel/omsgpr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: omsgpr.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: omsgpr.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/plinks.vspx b/binsrc/bpel/plinks.vspx
index 1c3d209..efdf5b3 100644
--- a/binsrc/bpel/plinks.vspx
+++ b/binsrc/bpel/plinks.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: plinks.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: plinks.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/plinks_props.vspx b/binsrc/bpel/plinks_props.vspx
index a39c6f1..ec8bd2a 100644
--- a/binsrc/bpel/plinks_props.vspx
+++ b/binsrc/bpel/plinks_props.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: plinks_props.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: plinks_props.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/process.sql b/binsrc/bpel/process.sql
index e4adb99..ff1fb76 100644
--- a/binsrc/bpel/process.sql
+++ b/binsrc/bpel/process.sql
@@ -1,14 +1,14 @@
 --
 --  process.sql
 --
---  $Id: process.sql,v 1.1.1.1 2006/04/11 17:56:09 source Exp $
+--  $Id: process.sql,v 1.1.1.1.2.1 2012/03/08 12:54:56 source Exp $
 --
 --  BPEL support view/procedures
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/process.vspx b/binsrc/bpel/process.vspx
index a43e289..e518bb7 100644
--- a/binsrc/bpel/process.vspx
+++ b/binsrc/bpel/process.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: process.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: process.vspx,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/process.xsl b/binsrc/bpel/process.xsl
index 5adc71e..7b7b419 100644
--- a/binsrc/bpel/process.xsl
+++ b/binsrc/bpel/process.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: process.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: process.xsl,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/raw.xsl b/binsrc/bpel/raw.xsl
index e862a9b..03a9eed 100644
--- a/binsrc/bpel/raw.xsl
+++ b/binsrc/bpel/raw.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: raw.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: raw.xsl,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/reports.vspx b/binsrc/bpel/reports.vspx
index 8c85ff0..7094221 100644
--- a/binsrc/bpel/reports.vspx
+++ b/binsrc/bpel/reports.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: reports.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: reports.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/rmsgpr.vspx b/binsrc/bpel/rmsgpr.vspx
index 6e11572..8d4fcea 100644
--- a/binsrc/bpel/rmsgpr.vspx
+++ b/binsrc/bpel/rmsgpr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rmsgpr.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: rmsgpr.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/script.vspx b/binsrc/bpel/script.vspx
index da34646..390efc4 100644
--- a/binsrc/bpel/script.vspx
+++ b/binsrc/bpel/script.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: script.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: script.vspx,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/script.xsl b/binsrc/bpel/script.xsl
index 0f5f1c4..fb101f6 100644
--- a/binsrc/bpel/script.xsl
+++ b/binsrc/bpel/script.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -  
- -  $Id: script.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: script.xsl,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/start.vsp b/binsrc/bpel/start.vsp
index e874e0d..430b759 100644
--- a/binsrc/bpel/start.vsp
+++ b/binsrc/bpel/start.vsp
@@ -1,12 +1,12 @@
 <html>
 <?vsp 
 --  
---  $Id: start.vsp,v 1.2.2.1 2010/01/07 16:58:12 source Exp $
+--  $Id: start.vsp,v 1.2.2.2 2012/03/08 12:54:56 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/statendp.vspx b/binsrc/bpel/statendp.vspx
index fdb1199..662cb07 100644
--- a/binsrc/bpel/statendp.vspx
+++ b/binsrc/bpel/statendp.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: statendp.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: statendp.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/statproc.vspx b/binsrc/bpel/statproc.vspx
index b146619..25c3519 100644
--- a/binsrc/bpel/statproc.vspx
+++ b/binsrc/bpel/statproc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: statproc.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: statproc.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/status.vspx b/binsrc/bpel/status.vspx
index bd78cbf..988256c 100644
--- a/binsrc/bpel/status.vspx
+++ b/binsrc/bpel/status.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: status.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: status.vspx,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/system/bpel/bpel.xsd b/binsrc/bpel/system/bpel/bpel.xsd
index ff6ddfb..b95465a 100644
--- a/binsrc/bpel/system/bpel/bpel.xsd
+++ b/binsrc/bpel/system/bpel/bpel.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/Flow/Flow.bpel b/binsrc/bpel/tests/Flow/Flow.bpel
index 9eeb3c3..9332f51 100644
--- a/binsrc/bpel/tests/Flow/Flow.bpel
+++ b/binsrc/bpel/tests/Flow/Flow.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/Flow/Flow.wsdl b/binsrc/bpel/tests/Flow/Flow.wsdl
index 05b7066..c449d14 100644
--- a/binsrc/bpel/tests/Flow/Flow.wsdl
+++ b/binsrc/bpel/tests/Flow/Flow.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/Flow/bpel.xml b/binsrc/bpel/tests/Flow/bpel.xml
index 4edfc6b..6eca9ec 100644
--- a/binsrc/bpel/tests/Flow/bpel.xml
+++ b/binsrc/bpel/tests/Flow/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/Flow/build.xml b/binsrc/bpel/tests/Flow/build.xml
index 17f7bf4..1005814 100644
--- a/binsrc/bpel/tests/Flow/build.xml
+++ b/binsrc/bpel/tests/Flow/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/Flow/ini.sql b/binsrc/bpel/tests/Flow/ini.sql
index a6e8276..8b81449 100644
--- a/binsrc/bpel/tests/Flow/ini.sql
+++ b/binsrc/bpel/tests/Flow/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/Flow/test_tutorial.sql b/binsrc/bpel/tests/Flow/test_tutorial.sql
index d900ff3..853f519 100644
--- a/binsrc/bpel/tests/Flow/test_tutorial.sql
+++ b/binsrc/bpel/tests/Flow/test_tutorial.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test_tutorial.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: test_tutorial.sql,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/CreditRating.vsp b/binsrc/bpel/tests/LoanFlow/CreditRating.vsp
index e1d9d09..2890dc8 100644
--- a/binsrc/bpel/tests/LoanFlow/CreditRating.vsp
+++ b/binsrc/bpel/tests/LoanFlow/CreditRating.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: CreditRating.vsp,v 1.5 2006/08/15 19:30:32 source Exp $
+--  $Id: CreditRating.vsp,v 1.5.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/LoanFlow.bpel b/binsrc/bpel/tests/LoanFlow/LoanFlow.bpel
index 4079cba..c56472f 100644
--- a/binsrc/bpel/tests/LoanFlow/LoanFlow.bpel
+++ b/binsrc/bpel/tests/LoanFlow/LoanFlow.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/LoanFlow.sql b/binsrc/bpel/tests/LoanFlow/LoanFlow.sql
index 5ebc7bb..43063e8 100644
--- a/binsrc/bpel/tests/LoanFlow/LoanFlow.sql
+++ b/binsrc/bpel/tests/LoanFlow/LoanFlow.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlow.sql,v 1.3 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlow.sql,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/LoanFlow.vsp b/binsrc/bpel/tests/LoanFlow/LoanFlow.vsp
index ebcfd19..aaaa2b9 100644
--- a/binsrc/bpel/tests/LoanFlow/LoanFlow.vsp
+++ b/binsrc/bpel/tests/LoanFlow/LoanFlow.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: LoanFlow.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: LoanFlow.vsp,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/LoanFlow.wsdl b/binsrc/bpel/tests/LoanFlow/LoanFlow.wsdl
index c48a83e..df63a21 100644
--- a/binsrc/bpel/tests/LoanFlow/LoanFlow.wsdl
+++ b/binsrc/bpel/tests/LoanFlow/LoanFlow.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/LoanFlow.xml b/binsrc/bpel/tests/LoanFlow/LoanFlow.xml
index f93fb11..b4654aa 100644
--- a/binsrc/bpel/tests/LoanFlow/LoanFlow.xml
+++ b/binsrc/bpel/tests/LoanFlow/LoanFlow.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/LoanFlowUI.vsp b/binsrc/bpel/tests/LoanFlow/LoanFlowUI.vsp
index ff457f1..86971a6 100644
--- a/binsrc/bpel/tests/LoanFlow/LoanFlowUI.vsp
+++ b/binsrc/bpel/tests/LoanFlow/LoanFlowUI.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: LoanFlowUI.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: LoanFlowUI.vsp,v 1.3.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/StarLoan.vsp b/binsrc/bpel/tests/LoanFlow/StarLoan.vsp
index 438382e..c9825ce 100644
--- a/binsrc/bpel/tests/LoanFlow/StarLoan.vsp
+++ b/binsrc/bpel/tests/LoanFlow/StarLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: StarLoan.vsp,v 1.5 2006/08/15 19:30:32 source Exp $
+--  $Id: StarLoan.vsp,v 1.5.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/UnitedLoan.vsp b/binsrc/bpel/tests/LoanFlow/UnitedLoan.vsp
index fa6431d..b975dba 100644
--- a/binsrc/bpel/tests/LoanFlow/UnitedLoan.vsp
+++ b/binsrc/bpel/tests/LoanFlow/UnitedLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: UnitedLoan.vsp,v 1.5 2006/08/15 19:30:32 source Exp $
+--  $Id: UnitedLoan.vsp,v 1.5.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/bpel.xml b/binsrc/bpel/tests/LoanFlow/bpel.xml
index 0e43146..e15c3e2 100644
--- a/binsrc/bpel/tests/LoanFlow/bpel.xml
+++ b/binsrc/bpel/tests/LoanFlow/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/LoanFlow/options.xml b/binsrc/bpel/tests/LoanFlow/options.xml
index 4662044..cdd972c 100644
--- a/binsrc/bpel/tests/LoanFlow/options.xml
+++ b/binsrc/bpel/tests/LoanFlow/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/bpel_engines/Twister/new-def.xml b/binsrc/bpel/tests/bpel_engines/Twister/new-def.xml
index 0d03404..95a3c78 100644
--- a/binsrc/bpel/tests/bpel_engines/Twister/new-def.xml
+++ b/binsrc/bpel/tests/bpel_engines/Twister/new-def.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/bpel_engines/Twister/new.xml b/binsrc/bpel/tests/bpel_engines/Twister/new.xml
index ac842ae..3a727e1 100644
--- a/binsrc/bpel/tests/bpel_engines/Twister/new.xml
+++ b/binsrc/bpel/tests/bpel_engines/Twister/new.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/bpel.xml b/binsrc/bpel/tests/echo/bpel.xml
index cb7cd41..aaa4b6a 100644
--- a/binsrc/bpel/tests/echo/bpel.xml
+++ b/binsrc/bpel/tests/echo/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/build.xml b/binsrc/bpel/tests/echo/build.xml
index bde727d..6b349da 100644
--- a/binsrc/bpel/tests/echo/build.xml
+++ b/binsrc/bpel/tests/echo/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/doc.bpel b/binsrc/bpel/tests/echo/doc.bpel
index 25fe08d..25eec36 100644
--- a/binsrc/bpel/tests/echo/doc.bpel
+++ b/binsrc/bpel/tests/echo/doc.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/doc.wsdl b/binsrc/bpel/tests/echo/doc.wsdl
index c354725..a5b4c3e 100644
--- a/binsrc/bpel/tests/echo/doc.wsdl
+++ b/binsrc/bpel/tests/echo/doc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/echo.bpel b/binsrc/bpel/tests/echo/echo.bpel
index a7fcfeb..6d7dac7 100644
--- a/binsrc/bpel/tests/echo/echo.bpel
+++ b/binsrc/bpel/tests/echo/echo.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/echo.vsp b/binsrc/bpel/tests/echo/echo.vsp
index 9c841b2..31d3b3c 100644
--- a/binsrc/bpel/tests/echo/echo.vsp
+++ b/binsrc/bpel/tests/echo/echo.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echo.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: echo.vsp,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/echo.wsdl b/binsrc/bpel/tests/echo/echo.wsdl
index f1aeb28..691b36d 100644
--- a/binsrc/bpel/tests/echo/echo.wsdl
+++ b/binsrc/bpel/tests/echo/echo.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/echo.xml b/binsrc/bpel/tests/echo/echo.xml
index f0c3f5a..1920880 100644
--- a/binsrc/bpel/tests/echo/echo.xml
+++ b/binsrc/bpel/tests/echo/echo.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/ini.sh b/binsrc/bpel/tests/echo/ini.sh
index 370798b..12c9ae3 100755
--- a/binsrc/bpel/tests/echo/ini.sh
+++ b/binsrc/bpel/tests/echo/ini.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: ini.sh,v 1.2 2009/04/14 12:16:49 source Exp $
+#  $Id: ini.sh,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/ini.sql b/binsrc/bpel/tests/echo/ini.sql
index 3044fbd..127d40c 100644
--- a/binsrc/bpel/tests/echo/ini.sql
+++ b/binsrc/bpel/tests/echo/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/options.xml b/binsrc/bpel/tests/echo/options.xml
index 0079d45..ce971ec 100644
--- a/binsrc/bpel/tests/echo/options.xml
+++ b/binsrc/bpel/tests/echo/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/sdoc.wsdl b/binsrc/bpel/tests/echo/sdoc.wsdl
index 3c46dc4..ee73ce1 100644
--- a/binsrc/bpel/tests/echo/sdoc.wsdl
+++ b/binsrc/bpel/tests/echo/sdoc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/svc.sql b/binsrc/bpel/tests/echo/svc.sql
index 84529fb..312f9a2 100644
--- a/binsrc/bpel/tests/echo/svc.sql
+++ b/binsrc/bpel/tests/echo/svc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: svc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: svc.sql,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echo/synsvc.wsdl b/binsrc/bpel/tests/echo/synsvc.wsdl
index 8cc2985..d0c040f 100644
--- a/binsrc/bpel/tests/echo/synsvc.wsdl
+++ b/binsrc/bpel/tests/echo/synsvc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echovirt/bpel.xml b/binsrc/bpel/tests/echovirt/bpel.xml
index b777206..eb96ab4 100644
--- a/binsrc/bpel/tests/echovirt/bpel.xml
+++ b/binsrc/bpel/tests/echovirt/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echovirt/build.xml b/binsrc/bpel/tests/echovirt/build.xml
index d1fa920..3782c20 100644
--- a/binsrc/bpel/tests/echovirt/build.xml
+++ b/binsrc/bpel/tests/echovirt/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echovirt/echovirt.bpel b/binsrc/bpel/tests/echovirt/echovirt.bpel
index d00de0b..ee20184 100644
--- a/binsrc/bpel/tests/echovirt/echovirt.bpel
+++ b/binsrc/bpel/tests/echovirt/echovirt.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echovirt/echovirt.wsdl b/binsrc/bpel/tests/echovirt/echovirt.wsdl
index 9f6dee0..45f02d7 100644
--- a/binsrc/bpel/tests/echovirt/echovirt.wsdl
+++ b/binsrc/bpel/tests/echovirt/echovirt.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echovirt/echovirtNew.bpel b/binsrc/bpel/tests/echovirt/echovirtNew.bpel
index 96b47e4..d002932 100644
--- a/binsrc/bpel/tests/echovirt/echovirtNew.bpel
+++ b/binsrc/bpel/tests/echovirt/echovirtNew.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/echovirt/ini.sql b/binsrc/bpel/tests/echovirt/ini.sql
index df28b6e..368f0dd 100644
--- a/binsrc/bpel/tests/echovirt/ini.sql
+++ b/binsrc/bpel/tests/echovirt/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/Restart.bpel b/binsrc/bpel/tests/fault1/Restart.bpel
index 4b72ad8..5dd2b27 100644
--- a/binsrc/bpel/tests/fault1/Restart.bpel
+++ b/binsrc/bpel/tests/fault1/Restart.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/Restart.wsdl b/binsrc/bpel/tests/fault1/Restart.wsdl
index aac4670..535211e 100644
--- a/binsrc/bpel/tests/fault1/Restart.wsdl
+++ b/binsrc/bpel/tests/fault1/Restart.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/UseStockReviewSheet.bpel b/binsrc/bpel/tests/fault1/UseStockReviewSheet.bpel
index 744c461..f31c25c 100644
--- a/binsrc/bpel/tests/fault1/UseStockReviewSheet.bpel
+++ b/binsrc/bpel/tests/fault1/UseStockReviewSheet.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/UseStockReviewSheet.wsdl b/binsrc/bpel/tests/fault1/UseStockReviewSheet.wsdl
index 8521658..ae6ede9 100644
--- a/binsrc/bpel/tests/fault1/UseStockReviewSheet.wsdl
+++ b/binsrc/bpel/tests/fault1/UseStockReviewSheet.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/While.bpel b/binsrc/bpel/tests/fault1/While.bpel
index 76ce2da..b5481fd 100644
--- a/binsrc/bpel/tests/fault1/While.bpel
+++ b/binsrc/bpel/tests/fault1/While.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/While.wsdl b/binsrc/bpel/tests/fault1/While.wsdl
index 9ca48b8..f851487 100644
--- a/binsrc/bpel/tests/fault1/While.wsdl
+++ b/binsrc/bpel/tests/fault1/While.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/check.sql b/binsrc/bpel/tests/fault1/check.sql
index d3afd46..9aa0d97 100644
--- a/binsrc/bpel/tests/fault1/check.sql
+++ b/binsrc/bpel/tests/fault1/check.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: check.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: check.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/check2.sql b/binsrc/bpel/tests/fault1/check2.sql
index aace7c3..6443115 100644
--- a/binsrc/bpel/tests/fault1/check2.sql
+++ b/binsrc/bpel/tests/fault1/check2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: check2.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: check2.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr.sql b/binsrc/bpel/tests/fault1/clr.sql
index aad9049..b98cc27 100644
--- a/binsrc/bpel/tests/fault1/clr.sql
+++ b/binsrc/bpel/tests/fault1/clr.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: clr.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: clr.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr_exec.bpel b/binsrc/bpel/tests/fault1/clr_exec.bpel
index d89e401..6cf8da9 100644
--- a/binsrc/bpel/tests/fault1/clr_exec.bpel
+++ b/binsrc/bpel/tests/fault1/clr_exec.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr_exec.vsp b/binsrc/bpel/tests/fault1/clr_exec.vsp
index 3898381..1670cf3 100644
--- a/binsrc/bpel/tests/fault1/clr_exec.vsp
+++ b/binsrc/bpel/tests/fault1/clr_exec.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: clr_exec.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: clr_exec.vsp,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr_exec.wsdl b/binsrc/bpel/tests/fault1/clr_exec.wsdl
index db21462..6828971 100644
--- a/binsrc/bpel/tests/fault1/clr_exec.wsdl
+++ b/binsrc/bpel/tests/fault1/clr_exec.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr_exec.xml b/binsrc/bpel/tests/fault1/clr_exec.xml
index 40368af..81865fd 100644
--- a/binsrc/bpel/tests/fault1/clr_exec.xml
+++ b/binsrc/bpel/tests/fault1/clr_exec.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr_exec_bpel.xml b/binsrc/bpel/tests/fault1/clr_exec_bpel.xml
index 06674eb..b8de196 100644
--- a/binsrc/bpel/tests/fault1/clr_exec_bpel.xml
+++ b/binsrc/bpel/tests/fault1/clr_exec_bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/clr_exec_desc.xml b/binsrc/bpel/tests/fault1/clr_exec_desc.xml
index 507fe5a..2ec04bf 100644
--- a/binsrc/bpel/tests/fault1/clr_exec_desc.xml
+++ b/binsrc/bpel/tests/fault1/clr_exec_desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/comp1.bpel b/binsrc/bpel/tests/fault1/comp1.bpel
index d59cbc7..bdcd68b 100644
--- a/binsrc/bpel/tests/fault1/comp1.bpel
+++ b/binsrc/bpel/tests/fault1/comp1.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/fault.bpel b/binsrc/bpel/tests/fault1/fault.bpel
index 850fd14..d660b0b 100644
--- a/binsrc/bpel/tests/fault1/fault.bpel
+++ b/binsrc/bpel/tests/fault1/fault.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/fault.wsdl b/binsrc/bpel/tests/fault1/fault.wsdl
index 47bca3a..e5f8ad6 100644
--- a/binsrc/bpel/tests/fault1/fault.wsdl
+++ b/binsrc/bpel/tests/fault1/fault.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/fault2.bpel b/binsrc/bpel/tests/fault1/fault2.bpel
index 6b3d5dd..edd8e5a 100644
--- a/binsrc/bpel/tests/fault1/fault2.bpel
+++ b/binsrc/bpel/tests/fault1/fault2.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/fault3.bpel b/binsrc/bpel/tests/fault1/fault3.bpel
index 0b2e019..358f04e 100644
--- a/binsrc/bpel/tests/fault1/fault3.bpel
+++ b/binsrc/bpel/tests/fault1/fault3.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/faultHTCLI.bpel b/binsrc/bpel/tests/fault1/faultHTCLI.bpel
index 26c69c9..9e294a3 100644
--- a/binsrc/bpel/tests/fault1/faultHTCLI.bpel
+++ b/binsrc/bpel/tests/fault1/faultHTCLI.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/incsvcwsdl.vsp b/binsrc/bpel/tests/fault1/incsvcwsdl.vsp
index 3822abf..b6173d6 100644
--- a/binsrc/bpel/tests/fault1/incsvcwsdl.vsp
+++ b/binsrc/bpel/tests/fault1/incsvcwsdl.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: incsvcwsdl.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: incsvcwsdl.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/ini.sql b/binsrc/bpel/tests/fault1/ini.sql
index 56486fb..d89764f 100644
--- a/binsrc/bpel/tests/fault1/ini.sql
+++ b/binsrc/bpel/tests/fault1/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.3 2008/01/18 13:57:19 source Exp $
+--  $Id: ini.sql,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/ini2.sql b/binsrc/bpel/tests/fault1/ini2.sql
index 1dd7058..8d79154 100644
--- a/binsrc/bpel/tests/fault1/ini2.sql
+++ b/binsrc/bpel/tests/fault1/ini2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini2.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini2.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/inv.sql b/binsrc/bpel/tests/fault1/inv.sql
index b2fcaa4..d850640 100644
--- a/binsrc/bpel/tests/fault1/inv.sql
+++ b/binsrc/bpel/tests/fault1/inv.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: inv.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: inv.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java.sql b/binsrc/bpel/tests/fault1/java.sql
index 146d552..37c59ba 100644
--- a/binsrc/bpel/tests/fault1/java.sql
+++ b/binsrc/bpel/tests/fault1/java.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: java.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: java.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java_exec.bpel b/binsrc/bpel/tests/fault1/java_exec.bpel
index b6a1c99..31b95cc 100644
--- a/binsrc/bpel/tests/fault1/java_exec.bpel
+++ b/binsrc/bpel/tests/fault1/java_exec.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java_exec.vsp b/binsrc/bpel/tests/fault1/java_exec.vsp
index 69c133b..f9598c1 100644
--- a/binsrc/bpel/tests/fault1/java_exec.vsp
+++ b/binsrc/bpel/tests/fault1/java_exec.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: java_exec.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: java_exec.vsp,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java_exec.wsdl b/binsrc/bpel/tests/fault1/java_exec.wsdl
index 853efd9..90349ee 100644
--- a/binsrc/bpel/tests/fault1/java_exec.wsdl
+++ b/binsrc/bpel/tests/fault1/java_exec.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java_exec.xml b/binsrc/bpel/tests/fault1/java_exec.xml
index 040cd40..e39322d 100644
--- a/binsrc/bpel/tests/fault1/java_exec.xml
+++ b/binsrc/bpel/tests/fault1/java_exec.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java_exec_bpel.xml b/binsrc/bpel/tests/fault1/java_exec_bpel.xml
index 7075fe5..193bba0 100644
--- a/binsrc/bpel/tests/fault1/java_exec_bpel.xml
+++ b/binsrc/bpel/tests/fault1/java_exec_bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/java_exec_desc.xml b/binsrc/bpel/tests/fault1/java_exec_desc.xml
index f76fdf5..a154c3e 100644
--- a/binsrc/bpel/tests/fault1/java_exec_desc.xml
+++ b/binsrc/bpel/tests/fault1/java_exec_desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/servicewsdl.vsp b/binsrc/bpel/tests/fault1/servicewsdl.vsp
index 81db99d..51c21e9 100644
--- a/binsrc/bpel/tests/fault1/servicewsdl.vsp
+++ b/binsrc/bpel/tests/fault1/servicewsdl.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: servicewsdl.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: servicewsdl.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/sql_exec.bpel b/binsrc/bpel/tests/fault1/sql_exec.bpel
index c4c34d0..c767af2 100644
--- a/binsrc/bpel/tests/fault1/sql_exec.bpel
+++ b/binsrc/bpel/tests/fault1/sql_exec.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fault1/sql_exec.wsdl b/binsrc/bpel/tests/fault1/sql_exec.wsdl
index 7faed29..a4c7e29 100644
--- a/binsrc/bpel/tests/fault1/sql_exec.wsdl
+++ b/binsrc/bpel/tests/fault1/sql_exec.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/bpel.xml b/binsrc/bpel/tests/fi/bpel.xml
index 8ddeae9..3a84f6d 100644
--- a/binsrc/bpel/tests/fi/bpel.xml
+++ b/binsrc/bpel/tests/fi/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fi.bpel b/binsrc/bpel/tests/fi/fi.bpel
index 97afc9e..f0bc700 100644
--- a/binsrc/bpel/tests/fi/fi.bpel
+++ b/binsrc/bpel/tests/fi/fi.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fi.vsp b/binsrc/bpel/tests/fi/fi.vsp
index a7efa52..ab0a5a0 100644
--- a/binsrc/bpel/tests/fi/fi.vsp
+++ b/binsrc/bpel/tests/fi/fi.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: fi.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: fi.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fi.wsdl b/binsrc/bpel/tests/fi/fi.wsdl
index 0c59a3e..90b0479 100644
--- a/binsrc/bpel/tests/fi/fi.wsdl
+++ b/binsrc/bpel/tests/fi/fi.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fi.xml b/binsrc/bpel/tests/fi/fi.xml
index d6e3efa..8a40bc8 100644
--- a/binsrc/bpel/tests/fi/fi.xml
+++ b/binsrc/bpel/tests/fi/fi.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fi_wsdl.vsp b/binsrc/bpel/tests/fi/fi_wsdl.vsp
index c08051f..49a96e3 100644
--- a/binsrc/bpel/tests/fi/fi_wsdl.vsp
+++ b/binsrc/bpel/tests/fi/fi_wsdl.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: fi_wsdl.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: fi_wsdl.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fia.bpel b/binsrc/bpel/tests/fi/fia.bpel
index fea6402..4515709 100644
--- a/binsrc/bpel/tests/fi/fia.bpel
+++ b/binsrc/bpel/tests/fi/fia.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fia.wsdl b/binsrc/bpel/tests/fi/fia.wsdl
index 31fa413..644ff68 100644
--- a/binsrc/bpel/tests/fi/fia.wsdl
+++ b/binsrc/bpel/tests/fi/fia.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fib.bpel b/binsrc/bpel/tests/fi/fib.bpel
index 9336496..3583609 100644
--- a/binsrc/bpel/tests/fi/fib.bpel
+++ b/binsrc/bpel/tests/fi/fib.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/fib.wsdl b/binsrc/bpel/tests/fi/fib.wsdl
index 0bc0521..67c2356 100644
--- a/binsrc/bpel/tests/fi/fib.wsdl
+++ b/binsrc/bpel/tests/fi/fib.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/ini.sql b/binsrc/bpel/tests/fi/ini.sql
index b0dba41..8662f4c 100644
--- a/binsrc/bpel/tests/fi/ini.sql
+++ b/binsrc/bpel/tests/fi/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/inv.sql b/binsrc/bpel/tests/fi/inv.sql
index 9f4ad51..2354433 100644
--- a/binsrc/bpel/tests/fi/inv.sql
+++ b/binsrc/bpel/tests/fi/inv.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: inv.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: inv.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/options.xml b/binsrc/bpel/tests/fi/options.xml
index f95179b..e03f0e6 100644
--- a/binsrc/bpel/tests/fi/options.xml
+++ b/binsrc/bpel/tests/fi/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/fi/service.vsp b/binsrc/bpel/tests/fi/service.vsp
index 60a680a..233322d 100644
--- a/binsrc/bpel/tests/fi/service.vsp
+++ b/binsrc/bpel/tests/fi/service.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: service.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: service.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/index.vsp b/binsrc/bpel/tests/index.vsp
index 0f454ee..a327d16 100644
--- a/binsrc/bpel/tests/index.vsp
+++ b/binsrc/bpel/tests/index.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: index.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: index.vsp,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/index.xml b/binsrc/bpel/tests/index.xml
index a09b76f..fb37727 100644
--- a/binsrc/bpel/tests/index.xml
+++ b/binsrc/bpel/tests/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01-1.bpel b/binsrc/bpel/tests/interop/UseCases/MS01-1.bpel
index a670f90..05e32b9 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01-1.bpel
+++ b/binsrc/bpel/tests/interop/UseCases/MS01-1.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01-2.bpel b/binsrc/bpel/tests/interop/UseCases/MS01-2.bpel
index 90cff9d..2a2bc2e 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01-2.bpel
+++ b/binsrc/bpel/tests/interop/UseCases/MS01-2.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01-3.bpel b/binsrc/bpel/tests/interop/UseCases/MS01-3.bpel
index 37ff055..48e8089 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01-3.bpel
+++ b/binsrc/bpel/tests/interop/UseCases/MS01-3.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01-4.bpel b/binsrc/bpel/tests/interop/UseCases/MS01-4.bpel
index 1eeca1a..1a75423 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01-4.bpel
+++ b/binsrc/bpel/tests/interop/UseCases/MS01-4.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01-5.bpel b/binsrc/bpel/tests/interop/UseCases/MS01-5.bpel
index ba1ce50..7121ccf 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01-5.bpel
+++ b/binsrc/bpel/tests/interop/UseCases/MS01-5.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01-6.bpel b/binsrc/bpel/tests/interop/UseCases/MS01-6.bpel
index adb16b4..c92354f 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01-6.bpel
+++ b/binsrc/bpel/tests/interop/UseCases/MS01-6.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01.sql b/binsrc/bpel/tests/interop/UseCases/MS01.sql
index 17a96b4..3833b9d 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01.sql
+++ b/binsrc/bpel/tests/interop/UseCases/MS01.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: MS01.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: MS01.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/MS01.wsdl b/binsrc/bpel/tests/interop/UseCases/MS01.wsdl
index 785db0a..9482fd7 100644
--- a/binsrc/bpel/tests/interop/UseCases/MS01.wsdl
+++ b/binsrc/bpel/tests/interop/UseCases/MS01.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/UseCases.vsp b/binsrc/bpel/tests/interop/UseCases/UseCases.vsp
index 3399e5f..6460a89 100644
--- a/binsrc/bpel/tests/interop/UseCases/UseCases.vsp
+++ b/binsrc/bpel/tests/interop/UseCases/UseCases.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: UseCases.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: UseCases.vsp,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/UseCases/UseCases.xml b/binsrc/bpel/tests/interop/UseCases/UseCases.xml
index dbd9840..ee76e28 100644
--- a/binsrc/bpel/tests/interop/UseCases/UseCases.xml
+++ b/binsrc/bpel/tests/interop/UseCases/UseCases.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/WSE2.0/Sec.bpel b/binsrc/bpel/tests/interop/WSE2.0/Sec.bpel
index ebccc7b..09d84f0 100644
--- a/binsrc/bpel/tests/interop/WSE2.0/Sec.bpel
+++ b/binsrc/bpel/tests/interop/WSE2.0/Sec.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/WSE2.0/Sec.sql b/binsrc/bpel/tests/interop/WSE2.0/Sec.sql
index 6a4faf8..4a061c1 100644
--- a/binsrc/bpel/tests/interop/WSE2.0/Sec.sql
+++ b/binsrc/bpel/tests/interop/WSE2.0/Sec.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Sec.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: Sec.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/WSE2.0/Sec.wsdl b/binsrc/bpel/tests/interop/WSE2.0/Sec.wsdl
index c354725..a5b4c3e 100644
--- a/binsrc/bpel/tests/interop/WSE2.0/Sec.wsdl
+++ b/binsrc/bpel/tests/interop/WSE2.0/Sec.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/WSE2.0/SecClient/SecClient.cs b/binsrc/bpel/tests/interop/WSE2.0/SecClient/SecClient.cs
index cbea66b..72c9cf2 100644
--- a/binsrc/bpel/tests/interop/WSE2.0/SecClient/SecClient.cs
+++ b/binsrc/bpel/tests/interop/WSE2.0/SecClient/SecClient.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/WSE2.0/SecSvc.wsdl b/binsrc/bpel/tests/interop/WSE2.0/SecSvc.wsdl
index e722eea..bcc7fec 100644
--- a/binsrc/bpel/tests/interop/WSE2.0/SecSvc.wsdl
+++ b/binsrc/bpel/tests/interop/WSE2.0/SecSvc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/WSE2.0/SecSvc/SecSvc.asmx.cs b/binsrc/bpel/tests/interop/WSE2.0/SecSvc/SecSvc.asmx.cs
index 840e5cf..c3bffec 100644
--- a/binsrc/bpel/tests/interop/WSE2.0/SecSvc/SecSvc.asmx.cs
+++ b/binsrc/bpel/tests/interop/WSE2.0/SecSvc/SecSvc.asmx.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/Aecho/bpel.xml b/binsrc/bpel/tests/interop/site/Aecho/bpel.xml
index c06f6a9..0a1f24a 100644
--- a/binsrc/bpel/tests/interop/site/Aecho/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/Aecho/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/Aecho/desc.xml b/binsrc/bpel/tests/interop/site/Aecho/desc.xml
index 61defb8..0661425 100644
--- a/binsrc/bpel/tests/interop/site/Aecho/desc.xml
+++ b/binsrc/bpel/tests/interop/site/Aecho/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/Aecho/echo.bpel b/binsrc/bpel/tests/interop/site/Aecho/echo.bpel
index 97cd5ae..5bee9db 100644
--- a/binsrc/bpel/tests/interop/site/Aecho/echo.bpel
+++ b/binsrc/bpel/tests/interop/site/Aecho/echo.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/Aecho/echo.sql b/binsrc/bpel/tests/interop/site/Aecho/echo.sql
index 0d2114c..8d52525 100644
--- a/binsrc/bpel/tests/interop/site/Aecho/echo.sql
+++ b/binsrc/bpel/tests/interop/site/Aecho/echo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: echo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: echo.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/Aecho/echo.wsdl b/binsrc/bpel/tests/interop/site/Aecho/echo.wsdl
index 217019e..dff997c 100644
--- a/binsrc/bpel/tests/interop/site/Aecho/echo.wsdl
+++ b/binsrc/bpel/tests/interop/site/Aecho/echo.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/CreditRating.vsp b/binsrc/bpel/tests/interop/site/RMLoan/CreditRating.vsp
index add2bc1..302d850 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/CreditRating.vsp
+++ b/binsrc/bpel/tests/interop/site/RMLoan/CreditRating.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: CreditRating.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: CreditRating.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.bpel b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.bpel
index 3d38e1d..5dd513b 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.bpel
+++ b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.sql b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.sql
index ce65d66..34992cb 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.sql
+++ b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlow.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlow.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.wsdl b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.wsdl
index c48a83e..df63a21 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.wsdl
+++ b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlow.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlowDemo.sql b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlowDemo.sql
index 95f0e67..28d2777 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/LoanFlowDemo.sql
+++ b/binsrc/bpel/tests/interop/site/RMLoan/LoanFlowDemo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlowDemo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlowDemo.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.vsp b/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.vsp
index 8b376c3..7c93ddc 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: RMLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: RMLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.xml b/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.xml
index 4c34afb..2ecd257 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.xml
+++ b/binsrc/bpel/tests/interop/site/RMLoan/RMLoan.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/StarLoan.vsp b/binsrc/bpel/tests/interop/site/RMLoan/StarLoan.vsp
index 79e4ac6..5270877 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/StarLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/RMLoan/StarLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: StarLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: StarLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/UnitedLoan.vsp b/binsrc/bpel/tests/interop/site/RMLoan/UnitedLoan.vsp
index 6c0090e..38e1de8 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/UnitedLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/RMLoan/UnitedLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: UnitedLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: UnitedLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/bpel.xml b/binsrc/bpel/tests/interop/site/RMLoan/bpel.xml
index 0e43146..e15c3e2 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/RMLoan/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/desc.xml b/binsrc/bpel/tests/interop/site/RMLoan/desc.xml
index d5c3ef2..3ca365c 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/desc.xml
+++ b/binsrc/bpel/tests/interop/site/RMLoan/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMLoan/options.xml b/binsrc/bpel/tests/interop/site/RMLoan/options.xml
index f757ba4..3b0bc6f 100644
--- a/binsrc/bpel/tests/interop/site/RMLoan/options.xml
+++ b/binsrc/bpel/tests/interop/site/RMLoan/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMecho/bpel.xml b/binsrc/bpel/tests/interop/site/RMecho/bpel.xml
index 06817ae..b93f47b 100644
--- a/binsrc/bpel/tests/interop/site/RMecho/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/RMecho/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMecho/desc.xml b/binsrc/bpel/tests/interop/site/RMecho/desc.xml
index bd8ecae..10ddab3 100644
--- a/binsrc/bpel/tests/interop/site/RMecho/desc.xml
+++ b/binsrc/bpel/tests/interop/site/RMecho/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMecho/echo.bpel b/binsrc/bpel/tests/interop/site/RMecho/echo.bpel
index b051db5..59819b3 100644
--- a/binsrc/bpel/tests/interop/site/RMecho/echo.bpel
+++ b/binsrc/bpel/tests/interop/site/RMecho/echo.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMecho/echo.sql b/binsrc/bpel/tests/interop/site/RMecho/echo.sql
index 2d37a51..2285bc1 100644
--- a/binsrc/bpel/tests/interop/site/RMecho/echo.sql
+++ b/binsrc/bpel/tests/interop/site/RMecho/echo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: echo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: echo.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/RMecho/echo.wsdl b/binsrc/bpel/tests/interop/site/RMecho/echo.wsdl
index 6366360..66f9f7c 100644
--- a/binsrc/bpel/tests/interop/site/RMecho/echo.wsdl
+++ b/binsrc/bpel/tests/interop/site/RMecho/echo.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecAecho/bpel.xml b/binsrc/bpel/tests/interop/site/SecAecho/bpel.xml
index 656c0f2..8df179a 100644
--- a/binsrc/bpel/tests/interop/site/SecAecho/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/SecAecho/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecAecho/desc.xml b/binsrc/bpel/tests/interop/site/SecAecho/desc.xml
index 885adf0..160f053 100644
--- a/binsrc/bpel/tests/interop/site/SecAecho/desc.xml
+++ b/binsrc/bpel/tests/interop/site/SecAecho/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecAecho/echo.bpel b/binsrc/bpel/tests/interop/site/SecAecho/echo.bpel
index 8c58cf0..407ab9b 100644
--- a/binsrc/bpel/tests/interop/site/SecAecho/echo.bpel
+++ b/binsrc/bpel/tests/interop/site/SecAecho/echo.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecAecho/echo.sql b/binsrc/bpel/tests/interop/site/SecAecho/echo.sql
index d5d97c9..424a30a 100644
--- a/binsrc/bpel/tests/interop/site/SecAecho/echo.sql
+++ b/binsrc/bpel/tests/interop/site/SecAecho/echo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: echo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: echo.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecAecho/echo.wsdl b/binsrc/bpel/tests/interop/site/SecAecho/echo.wsdl
index 217019e..dff997c 100644
--- a/binsrc/bpel/tests/interop/site/SecAecho/echo.wsdl
+++ b/binsrc/bpel/tests/interop/site/SecAecho/echo.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/CreditRating.vsp b/binsrc/bpel/tests/interop/site/SecLoan/CreditRating.vsp
index 847dbb8..9b647df 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/CreditRating.vsp
+++ b/binsrc/bpel/tests/interop/site/SecLoan/CreditRating.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: CreditRating.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: CreditRating.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.bpel b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.bpel
index 3d38e1d..5dd513b 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.bpel
+++ b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.sql b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.sql
index 24e64c2..3696edb 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.sql
+++ b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlow.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlow.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.wsdl b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.wsdl
index c48a83e..df63a21 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.wsdl
+++ b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlow.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlowDemo.sql b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlowDemo.sql
index c654fbb..20f0fae 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/LoanFlowDemo.sql
+++ b/binsrc/bpel/tests/interop/site/SecLoan/LoanFlowDemo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlowDemo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlowDemo.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.vsp b/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.vsp
index 3ad4cb1..8b7677c 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: SecLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: SecLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.xml b/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.xml
index aeb9c5c..a746e58 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.xml
+++ b/binsrc/bpel/tests/interop/site/SecLoan/SecLoan.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/StarLoan.vsp b/binsrc/bpel/tests/interop/site/SecLoan/StarLoan.vsp
index e47dd3d..02a7d78 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/StarLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/SecLoan/StarLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: StarLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: StarLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/UnitedLoan.vsp b/binsrc/bpel/tests/interop/site/SecLoan/UnitedLoan.vsp
index 0843808..ce3acdf 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/UnitedLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/SecLoan/UnitedLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: UnitedLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: UnitedLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/bpel.xml b/binsrc/bpel/tests/interop/site/SecLoan/bpel.xml
index 0e43146..e15c3e2 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/SecLoan/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/desc.xml b/binsrc/bpel/tests/interop/site/SecLoan/desc.xml
index 4a45c40..e9fac6a 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/desc.xml
+++ b/binsrc/bpel/tests/interop/site/SecLoan/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecLoan/options.xml b/binsrc/bpel/tests/interop/site/SecLoan/options.xml
index f757ba4..3b0bc6f 100644
--- a/binsrc/bpel/tests/interop/site/SecLoan/options.xml
+++ b/binsrc/bpel/tests/interop/site/SecLoan/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/CreditRating.vsp b/binsrc/bpel/tests/interop/site/SecRMLoan/CreditRating.vsp
index 847dbb8..9b647df 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/CreditRating.vsp
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/CreditRating.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: CreditRating.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: CreditRating.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.bpel b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.bpel
index 3d38e1d..5dd513b 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.bpel
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.sql b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.sql
index d826372..8b7dc58 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.sql
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlow.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlow.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.wsdl b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.wsdl
index c48a83e..df63a21 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.wsdl
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlow.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlowDemo.sql b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlowDemo.sql
index 51780c4..61677e5 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlowDemo.sql
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/LoanFlowDemo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: LoanFlowDemo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: LoanFlowDemo.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.vsp b/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.vsp
index fcbd68b..fea06d6 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: SecRMLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: SecRMLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.xml b/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.xml
index a1a369c..ba9ab5b 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.xml
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/SecRMLoan.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/StarLoan.vsp b/binsrc/bpel/tests/interop/site/SecRMLoan/StarLoan.vsp
index c134556..309c165 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/StarLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/StarLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: StarLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: StarLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/UnitedLoan.vsp b/binsrc/bpel/tests/interop/site/SecRMLoan/UnitedLoan.vsp
index 1f8ab57..7c76f7e 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/UnitedLoan.vsp
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/UnitedLoan.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: UnitedLoan.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: UnitedLoan.vsp,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/bpel.xml b/binsrc/bpel/tests/interop/site/SecRMLoan/bpel.xml
index 0e43146..e15c3e2 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/desc.xml b/binsrc/bpel/tests/interop/site/SecRMLoan/desc.xml
index a186901..f477f6e 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/desc.xml
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/SecRMLoan/options.xml b/binsrc/bpel/tests/interop/site/SecRMLoan/options.xml
index f757ba4..3b0bc6f 100644
--- a/binsrc/bpel/tests/interop/site/SecRMLoan/options.xml
+++ b/binsrc/bpel/tests/interop/site/SecRMLoan/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/about.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/about.vsp
index 059ba12..283292e 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/about.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/about.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: about.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: about.vsp,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/about.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/about.vspx
index dec94e4..843a398 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/about.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/about.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: about.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: about.vspx,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/about.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/about.xsl
index ab06bef..ef599b5 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/about.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/about.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: about.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: about.xsl,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vsp
index 20b75e3..ffa04a6 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: bpelrsc.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: bpelrsc.vsp,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vspx
index 70ac1a4..18eda0c 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bpelrsc.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpelrsc.vspx,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.xsl
index 7e5fa22..6bb14be 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/bpelrsc.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: bpelrsc.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: bpelrsc.xsl,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/bpeluct.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/bpeluct.vspx
index 8a9aa54..4ed5940 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/bpeluct.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/bpeluct.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bpeluct.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: bpeluct.vspx,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/aechoUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/aechoUI.vspx
index bcb293f..d3de3c8 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/aechoUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/aechoUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: aechoUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: aechoUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/echoUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/echoUI.vspx
index 5fa33b1..99448f7 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/echoUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/echoUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: echoUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: echoUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmechoUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmechoUI.vspx
index 06590b5..ef9df8c 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmechoUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmechoUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rmechoUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: rmechoUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmloanUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmloanUI.vspx
index 212c5c3..b089de3 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmloanUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/rmloanUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: rmloanUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: rmloanUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/secechoUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/secechoUI.vspx
index e2aa7a9..1810ef6 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/secechoUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/secechoUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: secechoUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: secechoUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/secloanUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/secloanUI.vspx
index ec4e7d1..709f825 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/secloanUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/secloanUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: secloanUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: secloanUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/secrmloanUI.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/secrmloanUI.vspx
index c5003d4..9ef08d3 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/secrmloanUI.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/secrmloanUI.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: secrmloanUI.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: secrmloanUI.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/clients/viewres.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/clients/viewres.vspx
index 8519f6a..1ff5b08 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/clients/viewres.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/clients/viewres.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: viewres.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: viewres.vspx,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/common.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/common.xsl
index 6fac2cc..7f8d01e 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/common.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: common.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: common.xsl,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/default.css b/binsrc/bpel/tests/interop/site/bpel4ws/default.css
index 26224ba..c435d46 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/default.css
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: default.css,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/error.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/error.vspx
index b616afe..1804895 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/error.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: error.vspx,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/home.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/home.vspx
index 7ba2e0b..dc55cf7 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/home.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: home.vspx,v 1.4 2006/08/17 18:27:57 source Exp $
+ -  $Id: home.vspx,v 1.4.2.1 2012/03/08 12:54:57 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/interop.vsp
index 28ff040..fc2d872 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: interop.vsp,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/interop.xsl
index 3b82487..20c4b29 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop.xsl
@@ -155,7 +155,7 @@
 	<A class="m_n" href="http://virtuoso.openlinksw.com/interop/index.htm#">Privacy</A>
       </div>
       <div class="copyright">
-	<xsl:text disable-output-escaping="yes">Copyright &copy; 1998-2011 OpenLink Software</xsl:text>
+	<xsl:text disable-output-escaping="yes">Copyright &copy; 1998-2012 OpenLink Software</xsl:text>
       </div>
     </td>
   </tr>
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop_decor.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/interop_decor.vspx
index 8fa4fba..63ed482 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop_decor.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop_decor.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: interop_decor.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: interop_decor.vspx,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop_install.sql b/binsrc/bpel/tests/interop/site/bpel4ws/interop_install.sql
index ef86905..8a18212 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop_install.sql
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop_install.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: interop_install.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: interop_install.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop_main.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/interop_main.vspx
index 10bb3f4..ac83de4 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop_main.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop_main.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: interop_main.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: interop_main.vspx,v 1.3.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop_navigation_bar.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/interop_navigation_bar.vspx
index 5769aba..22ab0fd 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop_navigation_bar.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop_navigation_bar.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: interop_navigation_bar.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: interop_navigation_bar.vspx,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop_style.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/interop_style.xsl
index c1efbb4..125056f 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop_style.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop_style.xsl
@@ -2,14 +2,14 @@
 <!-- <!DOCTYPE html  PUBLIC "" "ent.dtd"> -->
 <!----
  -  
- -  $Id: interop_style.xsl,v 1.3.2.1 2010/01/07 16:58:12 source Exp $
+ -  $Id: interop_style.xsl,v 1.3.2.2 2012/03/08 12:54:57 source Exp $
  -
  -   Virtuoso VSPX XSL-T style-sheet for page class compilation
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/interop_vhost.sql b/binsrc/bpel/tests/interop/site/bpel4ws/interop_vhost.sql
index 476e9d4..ca8c028 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/interop_vhost.sql
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/interop_vhost.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: interop_vhost.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: interop_vhost.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/intest.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/intest.vspx
index eda0591..28f25d2 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/intest.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/intest.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: intest.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: intest.vspx,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vsp
index 1554c6f..22d9fef 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: mgrsum.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: mgrsum.vsp,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vspx
index d5720e1..e9c9591 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mgrsum.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: mgrsum.vspx,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.xsl
index 40320e0..d3c20f9 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/mgrsum.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: mgrsum.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: mgrsum.xsl,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/post.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/post.vsp
index dc1777c..d05d2eb 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/post.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/post.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: post.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: post.vsp,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/post.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/post.vspx
index 6c59e8f..72fe3a8 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/post.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/post.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: post.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: post.vspx,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/post.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/post.xsl
index 7557605..632f8f0 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/post.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/post.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: post.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: post.xsl,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vsp
index d48a066..a9d707b 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: protocols.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: protocols.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vspx
index b5a2382..b5d2583 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: protocols.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: protocols.vspx,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xml b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xml
index 2b5b5e6..eae9dec 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xml
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xsl
index d383c71..83e70be 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/protocols.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: protocols.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: protocols.xsl,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/reply.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/reply.vsp
index 97e094a..1f923fd 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/reply.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/reply.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: reply.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: reply.vsp,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/results.xml b/binsrc/bpel/tests/interop/site/bpel4ws/results.xml
index d115ade..b77a604 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/results.xml
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/results.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/tables.sql b/binsrc/bpel/tests/interop/site/bpel4ws/tables.sql
index 846e096..28ab831 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/tables.sql
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/tables.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables.sql,v 1.3 2007/01/22 13:11:22 source Exp $
+--  $Id: tables.sql,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vsp
index 283860d..9750892 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: tstsum.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: tstsum.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vspx
index e5a8048..0f89ad5 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tstsum.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: tstsum.vspx,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.xsl
index 35eb82f..2af7399 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/tstsum.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: tstsum.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: tstsum.xsl,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/view.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/view.vsp
index ebf3019..41d75ff 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/view.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/view.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: view.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: view.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/view.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/view.vspx
index 7949157..aafb13f 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/view.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: view.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: view.vspx,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/view.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/view.xsl
index 28abe9f..3b05c79 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/view.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/view.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: view.xsl,v 1.3 2006/08/15 22:09:20 source Exp $
+ -  $Id: view.xsl,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vsp b/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vsp
index 6cdd9a4..9be2554 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vsp
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wsa.vsp,v 1.2 2006/08/15 19:30:32 source Exp $
+--  $Id: wsa.vsp,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vspx b/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vspx
index 1a679dc..cf66df1 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vspx
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/wsa.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: wsa.vspx,v 1.4 2007/01/22 13:11:22 source Exp $
+ -  $Id: wsa.vspx,v 1.4.2.1 2012/03/08 12:54:58 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/bpel4ws/wsa.xsl b/binsrc/bpel/tests/interop/site/bpel4ws/wsa.xsl
index 0ce79cc..0ed6ce6 100644
--- a/binsrc/bpel/tests/interop/site/bpel4ws/wsa.xsl
+++ b/binsrc/bpel/tests/interop/site/bpel4ws/wsa.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: wsa.xsl,v 1.4 2007/01/22 13:11:22 source Exp $
+ -  $Id: wsa.xsl,v 1.4.2.1 2012/03/08 12:54:58 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/echo/bpel.xml b/binsrc/bpel/tests/interop/site/echo/bpel.xml
index cb7cd41..aaa4b6a 100644
--- a/binsrc/bpel/tests/interop/site/echo/bpel.xml
+++ b/binsrc/bpel/tests/interop/site/echo/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/echo/desc.xml b/binsrc/bpel/tests/interop/site/echo/desc.xml
index 02ce411..b2fd34f 100644
--- a/binsrc/bpel/tests/interop/site/echo/desc.xml
+++ b/binsrc/bpel/tests/interop/site/echo/desc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/echo/echo.bpel b/binsrc/bpel/tests/interop/site/echo/echo.bpel
index a7fcfeb..6d7dac7 100644
--- a/binsrc/bpel/tests/interop/site/echo/echo.bpel
+++ b/binsrc/bpel/tests/interop/site/echo/echo.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/echo/echo.sql b/binsrc/bpel/tests/interop/site/echo/echo.sql
index 1596c5d..538e348 100644
--- a/binsrc/bpel/tests/interop/site/echo/echo.sql
+++ b/binsrc/bpel/tests/interop/site/echo/echo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: echo.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: echo.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/echo/echo.wsdl b/binsrc/bpel/tests/interop/site/echo/echo.wsdl
index f1aeb28..691b36d 100644
--- a/binsrc/bpel/tests/interop/site/echo/echo.wsdl
+++ b/binsrc/bpel/tests/interop/site/echo/echo.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/index.html b/binsrc/bpel/tests/interop/site/index.html
index dc55c9d..ca23b28 100644
--- a/binsrc/bpel/tests/interop/site/index.html
+++ b/binsrc/bpel/tests/interop/site/index.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/interop/site/setup.sql b/binsrc/bpel/tests/interop/site/setup.sql
index 7240a67..ec7fcc1 100644
--- a/binsrc/bpel/tests/interop/site/setup.sql
+++ b/binsrc/bpel/tests/interop/site/setup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: setup.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: setup.sql,v 1.2.2.1 2012/03/08 12:54:57 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/cmpflow.bpel b/binsrc/bpel/tests/mix/cmpflow.bpel
index a28a015..7a1a932 100644
--- a/binsrc/bpel/tests/mix/cmpflow.bpel
+++ b/binsrc/bpel/tests/mix/cmpflow.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/cmpflow.wsdl b/binsrc/bpel/tests/mix/cmpflow.wsdl
index da5ff24..ac431a8 100644
--- a/binsrc/bpel/tests/mix/cmpflow.wsdl
+++ b/binsrc/bpel/tests/mix/cmpflow.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp.sql b/binsrc/bpel/tests/mix/comp.sql
index 0401d44..1cd593d 100644
--- a/binsrc/bpel/tests/mix/comp.sql
+++ b/binsrc/bpel/tests/mix/comp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: comp.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: comp.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp2.bpel b/binsrc/bpel/tests/mix/comp2.bpel
index 6ee27ec..14ca9e9 100644
--- a/binsrc/bpel/tests/mix/comp2.bpel
+++ b/binsrc/bpel/tests/mix/comp2.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp2.sql b/binsrc/bpel/tests/mix/comp2.sql
index a9575f4..7243906 100644
--- a/binsrc/bpel/tests/mix/comp2.sql
+++ b/binsrc/bpel/tests/mix/comp2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: comp2.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: comp2.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp3.bpel b/binsrc/bpel/tests/mix/comp3.bpel
index 71cc399..5d63cdd 100644
--- a/binsrc/bpel/tests/mix/comp3.bpel
+++ b/binsrc/bpel/tests/mix/comp3.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp4.bpel b/binsrc/bpel/tests/mix/comp4.bpel
index 15288c4..73cb436 100644
--- a/binsrc/bpel/tests/mix/comp4.bpel
+++ b/binsrc/bpel/tests/mix/comp4.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp5.bpel b/binsrc/bpel/tests/mix/comp5.bpel
index 28df1cf..a36f90e 100644
--- a/binsrc/bpel/tests/mix/comp5.bpel
+++ b/binsrc/bpel/tests/mix/comp5.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/comp6.bpel b/binsrc/bpel/tests/mix/comp6.bpel
index 13fde8c..ad1c66b 100644
--- a/binsrc/bpel/tests/mix/comp6.bpel
+++ b/binsrc/bpel/tests/mix/comp6.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/evcomp.bpel b/binsrc/bpel/tests/mix/evcomp.bpel
index 42bd85f..bfbf69c 100644
--- a/binsrc/bpel/tests/mix/evcomp.bpel
+++ b/binsrc/bpel/tests/mix/evcomp.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/evcomp.wsdl b/binsrc/bpel/tests/mix/evcomp.wsdl
index fd3a22f..8f99f52 100644
--- a/binsrc/bpel/tests/mix/evcomp.wsdl
+++ b/binsrc/bpel/tests/mix/evcomp.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/fault.wsdl b/binsrc/bpel/tests/mix/fault.wsdl
index 7dd9dd8..431638d 100644
--- a/binsrc/bpel/tests/mix/fault.wsdl
+++ b/binsrc/bpel/tests/mix/fault.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/fault4.bpel b/binsrc/bpel/tests/mix/fault4.bpel
index c962760..f16c5f7 100644
--- a/binsrc/bpel/tests/mix/fault4.bpel
+++ b/binsrc/bpel/tests/mix/fault4.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/ini.sql b/binsrc/bpel/tests/mix/ini.sql
index 8a11ecc..5b1dc9a 100644
--- a/binsrc/bpel/tests/mix/ini.sql
+++ b/binsrc/bpel/tests/mix/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/ol.bpel b/binsrc/bpel/tests/mix/ol.bpel
index 60b2e93..0619a22 100644
--- a/binsrc/bpel/tests/mix/ol.bpel
+++ b/binsrc/bpel/tests/mix/ol.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/ol.wsdl b/binsrc/bpel/tests/mix/ol.wsdl
index 39573f9..12b1d5e 100644
--- a/binsrc/bpel/tests/mix/ol.wsdl
+++ b/binsrc/bpel/tests/mix/ol.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/olservice.wsdl b/binsrc/bpel/tests/mix/olservice.wsdl
index 75e684f..bb8a1c2 100644
--- a/binsrc/bpel/tests/mix/olservice.wsdl
+++ b/binsrc/bpel/tests/mix/olservice.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/recovery_test.sql b/binsrc/bpel/tests/mix/recovery_test.sql
index a135faa..f6408c8 100644
--- a/binsrc/bpel/tests/mix/recovery_test.sql
+++ b/binsrc/bpel/tests/mix/recovery_test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: recovery_test.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: recovery_test.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/sw.bpel b/binsrc/bpel/tests/mix/sw.bpel
index a85c1be..0e39364 100644
--- a/binsrc/bpel/tests/mix/sw.bpel
+++ b/binsrc/bpel/tests/mix/sw.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/sw.wsdl b/binsrc/bpel/tests/mix/sw.wsdl
index f6708b6..ed2002d 100644
--- a/binsrc/bpel/tests/mix/sw.wsdl
+++ b/binsrc/bpel/tests/mix/sw.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/testsvc.sql b/binsrc/bpel/tests/mix/testsvc.sql
index 7ea8de4..6e7d272 100644
--- a/binsrc/bpel/tests/mix/testsvc.sql
+++ b/binsrc/bpel/tests/mix/testsvc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: testsvc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: testsvc.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/timesvc.wsdl b/binsrc/bpel/tests/mix/timesvc.wsdl
index ae08460..a2ac835 100644
--- a/binsrc/bpel/tests/mix/timesvc.wsdl
+++ b/binsrc/bpel/tests/mix/timesvc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/tsvc.wsdl b/binsrc/bpel/tests/mix/tsvc.wsdl
index 0ee62a7..a394849 100644
--- a/binsrc/bpel/tests/mix/tsvc.wsdl
+++ b/binsrc/bpel/tests/mix/tsvc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/while1.bpel b/binsrc/bpel/tests/mix/while1.bpel
index ec250d6..6d4fab7 100644
--- a/binsrc/bpel/tests/mix/while1.bpel
+++ b/binsrc/bpel/tests/mix/while1.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/mix/while1.wsdl b/binsrc/bpel/tests/mix/while1.wsdl
index 1de9199..c6454d4 100644
--- a/binsrc/bpel/tests/mix/while1.wsdl
+++ b/binsrc/bpel/tests/mix/while1.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/input.xml b/binsrc/bpel/tests/order/input.xml
index aea7857..0b1713a 100644
--- a/binsrc/bpel/tests/order/input.xml
+++ b/binsrc/bpel/tests/order/input.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/invoke.sql b/binsrc/bpel/tests/order/invoke.sql
index 2e8f391..969c56c 100644
--- a/binsrc/bpel/tests/order/invoke.sql
+++ b/binsrc/bpel/tests/order/invoke.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: invoke.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: invoke.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/load_all.sql b/binsrc/bpel/tests/order/load_all.sql
index 981892b..3b77fa2 100644
--- a/binsrc/bpel/tests/order/load_all.sql
+++ b/binsrc/bpel/tests/order/load_all.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: load_all.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: load_all.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/order.bpel b/binsrc/bpel/tests/order/order.bpel
index 32b1a84..2f6a88e 100644
--- a/binsrc/bpel/tests/order/order.bpel
+++ b/binsrc/bpel/tests/order/order.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/order.sql b/binsrc/bpel/tests/order/order.sql
index a85a065..7cc329f 100644
--- a/binsrc/bpel/tests/order/order.sql
+++ b/binsrc/bpel/tests/order/order.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: order.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: order.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/order.wsdl b/binsrc/bpel/tests/order/order.wsdl
index eae0b0f..534feae 100644
--- a/binsrc/bpel/tests/order/order.wsdl
+++ b/binsrc/bpel/tests/order/order.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/order_svc.sql b/binsrc/bpel/tests/order/order_svc.sql
index 4cf8fe0..65c8254 100644
--- a/binsrc/bpel/tests/order/order_svc.sql
+++ b/binsrc/bpel/tests/order/order_svc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: order_svc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: order_svc.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/order/servicewsdl.vsp b/binsrc/bpel/tests/order/servicewsdl.vsp
index a7c7881..de2a6f7 100644
--- a/binsrc/bpel/tests/order/servicewsdl.vsp
+++ b/binsrc/bpel/tests/order/servicewsdl.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: servicewsdl.vsp,v 1.3 2006/08/15 19:30:32 source Exp $
+--  $Id: servicewsdl.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick/async_svc.sql b/binsrc/bpel/tests/pick/async_svc.sql
index 315bd0d..81bb2c1 100644
--- a/binsrc/bpel/tests/pick/async_svc.sql
+++ b/binsrc/bpel/tests/pick/async_svc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: async_svc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: async_svc.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick/ini.sql b/binsrc/bpel/tests/pick/ini.sql
index 49bddfd..ef05539 100644
--- a/binsrc/bpel/tests/pick/ini.sql
+++ b/binsrc/bpel/tests/pick/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick/inv.sql b/binsrc/bpel/tests/pick/inv.sql
index 59b6e3e..3059411 100644
--- a/binsrc/bpel/tests/pick/inv.sql
+++ b/binsrc/bpel/tests/pick/inv.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: inv.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: inv.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick/pick.bpel b/binsrc/bpel/tests/pick/pick.bpel
index bfa8015..92aab38 100644
--- a/binsrc/bpel/tests/pick/pick.bpel
+++ b/binsrc/bpel/tests/pick/pick.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick/pick.wsdl b/binsrc/bpel/tests/pick/pick.wsdl
index e9daccb..5dd721e 100644
--- a/binsrc/bpel/tests/pick/pick.wsdl
+++ b/binsrc/bpel/tests/pick/pick.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick/service.wsdl b/binsrc/bpel/tests/pick/service.wsdl
index 9b956fc..43f1241 100644
--- a/binsrc/bpel/tests/pick/service.wsdl
+++ b/binsrc/bpel/tests/pick/service.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick1/bpel.xml b/binsrc/bpel/tests/pick1/bpel.xml
index a25c636..a5d2e09 100644
--- a/binsrc/bpel/tests/pick1/bpel.xml
+++ b/binsrc/bpel/tests/pick1/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick1/build.xml b/binsrc/bpel/tests/pick1/build.xml
index dcbb88d..baed3a4 100644
--- a/binsrc/bpel/tests/pick1/build.xml
+++ b/binsrc/bpel/tests/pick1/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick1/ini.sql b/binsrc/bpel/tests/pick1/ini.sql
index 12137c2..2d916d7 100644
--- a/binsrc/bpel/tests/pick1/ini.sql
+++ b/binsrc/bpel/tests/pick1/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick1/pick1.bpel b/binsrc/bpel/tests/pick1/pick1.bpel
index beb098a..f2ba9be 100644
--- a/binsrc/bpel/tests/pick1/pick1.bpel
+++ b/binsrc/bpel/tests/pick1/pick1.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/pick1/pick1.wsdl b/binsrc/bpel/tests/pick1/pick1.wsdl
index 3349b9e..451088b 100644
--- a/binsrc/bpel/tests/pick1/pick1.wsdl
+++ b/binsrc/bpel/tests/pick1/pick1.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/post/bpel.xml b/binsrc/bpel/tests/post/bpel.xml
index 6e9ddb0..b3cd307 100644
--- a/binsrc/bpel/tests/post/bpel.xml
+++ b/binsrc/bpel/tests/post/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/post/build.xml b/binsrc/bpel/tests/post/build.xml
index a669be8..c5f0517 100644
--- a/binsrc/bpel/tests/post/build.xml
+++ b/binsrc/bpel/tests/post/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/post/ini.sql b/binsrc/bpel/tests/post/ini.sql
index 3b11af2..91d6952 100644
--- a/binsrc/bpel/tests/post/ini.sql
+++ b/binsrc/bpel/tests/post/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/post/post.bpel b/binsrc/bpel/tests/post/post.bpel
index aa310bb..994a5ec 100644
--- a/binsrc/bpel/tests/post/post.bpel
+++ b/binsrc/bpel/tests/post/post.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/post/post.wsdl b/binsrc/bpel/tests/post/post.wsdl
index 05010cd..5ab3d36 100644
--- a/binsrc/bpel/tests/post/post.wsdl
+++ b/binsrc/bpel/tests/post/post.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/XQuerySample.bpel b/binsrc/bpel/tests/processXQuery/XQuerySample.bpel
index 999710d..3ea865f 100644
--- a/binsrc/bpel/tests/processXQuery/XQuerySample.bpel
+++ b/binsrc/bpel/tests/processXQuery/XQuerySample.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/XQuerySample.wsdl b/binsrc/bpel/tests/processXQuery/XQuerySample.wsdl
index 89bdaed..20854d8 100644
--- a/binsrc/bpel/tests/processXQuery/XQuerySample.wsdl
+++ b/binsrc/bpel/tests/processXQuery/XQuerySample.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/books.xq b/binsrc/bpel/tests/processXQuery/books.xq
index b6beac7..8dde0a8 100644
--- a/binsrc/bpel/tests/processXQuery/books.xq
+++ b/binsrc/bpel/tests/processXQuery/books.xq
@@ -3,7 +3,7 @@
  :  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  :  project.
  :  
- :  Copyright (C) 1998-2006 OpenLink Software
+ :  Copyright (C) 1998-2012 OpenLink Software
  :  
  :  This project is free software; you can redistribute it and/or modify it
  :  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/bpel.xml b/binsrc/bpel/tests/processXQuery/bpel.xml
index 01f00aa..f637dd7 100644
--- a/binsrc/bpel/tests/processXQuery/bpel.xml
+++ b/binsrc/bpel/tests/processXQuery/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/ini.sql b/binsrc/bpel/tests/processXQuery/ini.sql
index 1c7b9a2..bce5ee0 100644
--- a/binsrc/bpel/tests/processXQuery/ini.sql
+++ b/binsrc/bpel/tests/processXQuery/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/invoice.xq b/binsrc/bpel/tests/processXQuery/invoice.xq
index 3772e7c..177fc35 100644
--- a/binsrc/bpel/tests/processXQuery/invoice.xq
+++ b/binsrc/bpel/tests/processXQuery/invoice.xq
@@ -3,7 +3,7 @@
  :  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  :  project.
  :  
- :  Copyright (C) 1998-2006 OpenLink Software
+ :  Copyright (C) 1998-2012 OpenLink Software
  :  
  :  This project is free software; you can redistribute it and/or modify it
  :  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/options.xml b/binsrc/bpel/tests/processXQuery/options.xml
index 611b229..4f12bb5 100644
--- a/binsrc/bpel/tests/processXQuery/options.xml
+++ b/binsrc/bpel/tests/processXQuery/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/processXQuery.vsp b/binsrc/bpel/tests/processXQuery/processXQuery.vsp
index cf7a55d..830bf05 100644
--- a/binsrc/bpel/tests/processXQuery/processXQuery.vsp
+++ b/binsrc/bpel/tests/processXQuery/processXQuery.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: processXQuery.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: processXQuery.vsp,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXQuery/processXQuery.xml b/binsrc/bpel/tests/processXQuery/processXQuery.xml
index 1ace8e3..cb403ca 100644
--- a/binsrc/bpel/tests/processXQuery/processXQuery.xml
+++ b/binsrc/bpel/tests/processXQuery/processXQuery.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/CreditRating.vsp b/binsrc/bpel/tests/processXSLT/CreditRating.vsp
index 5d82db2..db09b98 100644
--- a/binsrc/bpel/tests/processXSLT/CreditRating.vsp
+++ b/binsrc/bpel/tests/processXSLT/CreditRating.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: CreditRating.vsp,v 1.3 2006/08/15 19:30:33 source Exp $
+--  $Id: CreditRating.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/InvToPo.xslt b/binsrc/bpel/tests/processXSLT/InvToPo.xslt
index 809fe50..852a8b7 100644
--- a/binsrc/bpel/tests/processXSLT/InvToPo.xslt
+++ b/binsrc/bpel/tests/processXSLT/InvToPo.xslt
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/XSLTSample.bpel b/binsrc/bpel/tests/processXSLT/XSLTSample.bpel
index bee3828..2addf67 100644
--- a/binsrc/bpel/tests/processXSLT/XSLTSample.bpel
+++ b/binsrc/bpel/tests/processXSLT/XSLTSample.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/XSLTSample.wsdl b/binsrc/bpel/tests/processXSLT/XSLTSample.wsdl
index c07a131..8d8296d 100644
--- a/binsrc/bpel/tests/processXSLT/XSLTSample.wsdl
+++ b/binsrc/bpel/tests/processXSLT/XSLTSample.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/XSLTSample.xslt b/binsrc/bpel/tests/processXSLT/XSLTSample.xslt
index 2088e8f..2d85bc5 100644
--- a/binsrc/bpel/tests/processXSLT/XSLTSample.xslt
+++ b/binsrc/bpel/tests/processXSLT/XSLTSample.xslt
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/bpel.xml b/binsrc/bpel/tests/processXSLT/bpel.xml
index d628754..681822f 100644
--- a/binsrc/bpel/tests/processXSLT/bpel.xml
+++ b/binsrc/bpel/tests/processXSLT/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/ini.sql b/binsrc/bpel/tests/processXSLT/ini.sql
index ba14b92..4f26d79 100644
--- a/binsrc/bpel/tests/processXSLT/ini.sql
+++ b/binsrc/bpel/tests/processXSLT/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/options.xml b/binsrc/bpel/tests/processXSLT/options.xml
index d4f48e7..be62e8e 100644
--- a/binsrc/bpel/tests/processXSLT/options.xml
+++ b/binsrc/bpel/tests/processXSLT/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/processXSLT.sql b/binsrc/bpel/tests/processXSLT/processXSLT.sql
index c647555..6190b09 100644
--- a/binsrc/bpel/tests/processXSLT/processXSLT.sql
+++ b/binsrc/bpel/tests/processXSLT/processXSLT.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: processXSLT.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: processXSLT.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/processXSLT.vsp b/binsrc/bpel/tests/processXSLT/processXSLT.vsp
index 42f6198..d55fcd5 100644
--- a/binsrc/bpel/tests/processXSLT/processXSLT.vsp
+++ b/binsrc/bpel/tests/processXSLT/processXSLT.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: processXSLT.vsp,v 1.3 2006/08/15 19:30:33 source Exp $
+--  $Id: processXSLT.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSLT/processXSLT.xml b/binsrc/bpel/tests/processXSLT/processXSLT.xml
index 6f1c716..64bb252 100644
--- a/binsrc/bpel/tests/processXSLT/processXSLT.xml
+++ b/binsrc/bpel/tests/processXSLT/processXSLT.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/XSQLSample.bpel b/binsrc/bpel/tests/processXSQL/XSQLSample.bpel
index c6f39a2..09f6628 100644
--- a/binsrc/bpel/tests/processXSQL/XSQLSample.bpel
+++ b/binsrc/bpel/tests/processXSQL/XSQLSample.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/XSQLSample.wsdl b/binsrc/bpel/tests/processXSQL/XSQLSample.wsdl
index 04b3ff3..c9875de 100644
--- a/binsrc/bpel/tests/processXSQL/XSQLSample.wsdl
+++ b/binsrc/bpel/tests/processXSQL/XSQLSample.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/bpel.xml b/binsrc/bpel/tests/processXSQL/bpel.xml
index 9888f95..f0494dc 100644
--- a/binsrc/bpel/tests/processXSQL/bpel.xml
+++ b/binsrc/bpel/tests/processXSQL/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/ini.sql b/binsrc/bpel/tests/processXSQL/ini.sql
index 0aba471..15f2eb5 100644
--- a/binsrc/bpel/tests/processXSQL/ini.sql
+++ b/binsrc/bpel/tests/processXSQL/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/options.xml b/binsrc/bpel/tests/processXSQL/options.xml
index 658bcb9..94ae4cf 100644
--- a/binsrc/bpel/tests/processXSQL/options.xml
+++ b/binsrc/bpel/tests/processXSQL/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/processXSQL.vsp b/binsrc/bpel/tests/processXSQL/processXSQL.vsp
index 2d4b3b5..40aa0e6 100644
--- a/binsrc/bpel/tests/processXSQL/processXSQL.vsp
+++ b/binsrc/bpel/tests/processXSQL/processXSQL.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: processXSQL.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: processXSQL.vsp,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/processXSQL.xml b/binsrc/bpel/tests/processXSQL/processXSQL.xml
index 800b434..f300382 100644
--- a/binsrc/bpel/tests/processXSQL/processXSQL.xml
+++ b/binsrc/bpel/tests/processXSQL/processXSQL.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/processXSQL_ini.sql b/binsrc/bpel/tests/processXSQL/processXSQL_ini.sql
index c9389a5..9a9a9b1 100644
--- a/binsrc/bpel/tests/processXSQL/processXSQL_ini.sql
+++ b/binsrc/bpel/tests/processXSQL/processXSQL_ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: processXSQL_ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: processXSQL_ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/selectCustomer.xsql b/binsrc/bpel/tests/processXSQL/selectCustomer.xsql
index cd8aa23..dbfe3cf 100644
--- a/binsrc/bpel/tests/processXSQL/selectCustomer.xsql
+++ b/binsrc/bpel/tests/processXSQL/selectCustomer.xsql
@@ -4,7 +4,7 @@
   -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   -  project.
   -  
-  -  Copyright (C) 1998-2006 OpenLink Software
+  -  Copyright (C) 1998-2012 OpenLink Software
   -  
   -  This project is free software; you can redistribute it and/or modify it
   -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/processXSQL/selectProduct.xsql b/binsrc/bpel/tests/processXSQL/selectProduct.xsql
index af3a6ba..d42ae18 100644
--- a/binsrc/bpel/tests/processXSQL/selectProduct.xsql
+++ b/binsrc/bpel/tests/processXSQL/selectProduct.xsql
@@ -4,7 +4,7 @@
   -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   -  project.
   -  
-  -  Copyright (C) 1998-2006 OpenLink Software
+  -  Copyright (C) 1998-2012 OpenLink Software
   -  
   -  This project is free software; you can redistribute it and/or modify it
   -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/bpel.xml b/binsrc/bpel/tests/sqlexec/bpel.xml
index 5266c11..be8b88b 100644
--- a/binsrc/bpel/tests/sqlexec/bpel.xml
+++ b/binsrc/bpel/tests/sqlexec/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/inventory.bpel b/binsrc/bpel/tests/sqlexec/inventory.bpel
index 3a0d509..121b323 100644
--- a/binsrc/bpel/tests/sqlexec/inventory.bpel
+++ b/binsrc/bpel/tests/sqlexec/inventory.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/inventory.wsdl b/binsrc/bpel/tests/sqlexec/inventory.wsdl
index 4572f9a..c853957 100644
--- a/binsrc/bpel/tests/sqlexec/inventory.wsdl
+++ b/binsrc/bpel/tests/sqlexec/inventory.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/options.xml b/binsrc/bpel/tests/sqlexec/options.xml
index 46d9823..199c9b4 100644
--- a/binsrc/bpel/tests/sqlexec/options.xml
+++ b/binsrc/bpel/tests/sqlexec/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/sqlexec.vsp b/binsrc/bpel/tests/sqlexec/sqlexec.vsp
index 0c49254..564570b 100644
--- a/binsrc/bpel/tests/sqlexec/sqlexec.vsp
+++ b/binsrc/bpel/tests/sqlexec/sqlexec.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sqlexec.vsp,v 1.3 2006/08/15 19:30:33 source Exp $
+--  $Id: sqlexec.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/sqlexec.xml b/binsrc/bpel/tests/sqlexec/sqlexec.xml
index cf0ff8a..0bf09b3 100644
--- a/binsrc/bpel/tests/sqlexec/sqlexec.xml
+++ b/binsrc/bpel/tests/sqlexec/sqlexec.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/store.sql b/binsrc/bpel/tests/sqlexec/store.sql
index 4fd0a58..78f32a5 100644
--- a/binsrc/bpel/tests/sqlexec/store.sql
+++ b/binsrc/bpel/tests/sqlexec/store.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: store.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: store.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/sqlexec/store.vsp b/binsrc/bpel/tests/sqlexec/store.vsp
index 86834a0..180b67a 100644
--- a/binsrc/bpel/tests/sqlexec/store.vsp
+++ b/binsrc/bpel/tests/sqlexec/store.vsp
@@ -1,11 +1,11 @@
 <?xml version="1.0"?><?vsp 
 --  
---  $Id: store.vsp,v 1.3 2006/08/15 19:30:33 source Exp $
+--  $Id: store.vsp,v 1.3.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/buyer/Buyer.bpel b/binsrc/bpel/tests/t1/buyer/Buyer.bpel
index fbfa43f..bfe8c97 100644
--- a/binsrc/bpel/tests/t1/buyer/Buyer.bpel
+++ b/binsrc/bpel/tests/t1/buyer/Buyer.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/buyer/Buyer.wsdl b/binsrc/bpel/tests/t1/buyer/Buyer.wsdl
index bf04240..ce55a74 100644
--- a/binsrc/bpel/tests/t1/buyer/Buyer.wsdl
+++ b/binsrc/bpel/tests/t1/buyer/Buyer.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/buyer/ini.sql b/binsrc/bpel/tests/t1/buyer/ini.sql
index f1b1a9f..1c0ac6e 100644
--- a/binsrc/bpel/tests/t1/buyer/ini.sql
+++ b/binsrc/bpel/tests/t1/buyer/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/buyer/supplyCorrelation.wsdl b/binsrc/bpel/tests/t1/buyer/supplyCorrelation.wsdl
index a8e96ee..4117bf6 100644
--- a/binsrc/bpel/tests/t1/buyer/supplyCorrelation.wsdl
+++ b/binsrc/bpel/tests/t1/buyer/supplyCorrelation.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/buyer/supplyMessages.wsdl b/binsrc/bpel/tests/t1/buyer/supplyMessages.wsdl
index f452b55..1f59b7a 100644
--- a/binsrc/bpel/tests/t1/buyer/supplyMessages.wsdl
+++ b/binsrc/bpel/tests/t1/buyer/supplyMessages.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/seller/Seller.bpel b/binsrc/bpel/tests/t1/seller/Seller.bpel
index 9fc38bf..5475fd8 100644
--- a/binsrc/bpel/tests/t1/seller/Seller.bpel
+++ b/binsrc/bpel/tests/t1/seller/Seller.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/seller/Seller.wsdl b/binsrc/bpel/tests/t1/seller/Seller.wsdl
index cc8f9c9..6010b0b 100644
--- a/binsrc/bpel/tests/t1/seller/Seller.wsdl
+++ b/binsrc/bpel/tests/t1/seller/Seller.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/seller/ini.sql b/binsrc/bpel/tests/t1/seller/ini.sql
index 4214b7b..2dd9b42 100644
--- a/binsrc/bpel/tests/t1/seller/ini.sql
+++ b/binsrc/bpel/tests/t1/seller/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:58 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/seller/supplyCorrelation.wsdl b/binsrc/bpel/tests/t1/seller/supplyCorrelation.wsdl
index a8e96ee..4117bf6 100644
--- a/binsrc/bpel/tests/t1/seller/supplyCorrelation.wsdl
+++ b/binsrc/bpel/tests/t1/seller/supplyCorrelation.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t1/seller/supplyMessages.wsdl b/binsrc/bpel/tests/t1/seller/supplyMessages.wsdl
index f452b55..1f59b7a 100644
--- a/binsrc/bpel/tests/t1/seller/supplyMessages.wsdl
+++ b/binsrc/bpel/tests/t1/seller/supplyMessages.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t2/FlowSample.bpel b/binsrc/bpel/tests/t2/FlowSample.bpel
index e743c38..9d1a2a8 100644
--- a/binsrc/bpel/tests/t2/FlowSample.bpel
+++ b/binsrc/bpel/tests/t2/FlowSample.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t2/FlowSample.wsdl b/binsrc/bpel/tests/t2/FlowSample.wsdl
index 0ceab05..915dc34 100644
--- a/binsrc/bpel/tests/t2/FlowSample.wsdl
+++ b/binsrc/bpel/tests/t2/FlowSample.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t2/bpel.xml b/binsrc/bpel/tests/t2/bpel.xml
index 79b46c0..aef1322 100644
--- a/binsrc/bpel/tests/t2/bpel.xml
+++ b/binsrc/bpel/tests/t2/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t2/build.xml b/binsrc/bpel/tests/t2/build.xml
index f6cc83d..d6f7667 100644
--- a/binsrc/bpel/tests/t2/build.xml
+++ b/binsrc/bpel/tests/t2/build.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/t2/ini.sql b/binsrc/bpel/tests/t2/ini.sql
index af6e618..fe4910b 100644
--- a/binsrc/bpel/tests/t2/ini.sql
+++ b/binsrc/bpel/tests/t2/ini.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ini.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: ini.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/AsyncBPELService.wsdl b/binsrc/bpel/tests/tevent/AsyncBPELService.wsdl
index 005756a..f03d5f2 100644
--- a/binsrc/bpel/tests/tevent/AsyncBPELService.wsdl
+++ b/binsrc/bpel/tests/tevent/AsyncBPELService.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.bpel b/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.bpel
index 77c5fb8..0257804 100644
--- a/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.bpel
+++ b/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.wsdl b/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.wsdl
index da54899..20354c4 100644
--- a/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.wsdl
+++ b/binsrc/bpel/tests/tevent/AsyncBPELService/AsyncBPELService.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/AsyncBPELService/bpel.xml b/binsrc/bpel/tests/tevent/AsyncBPELService/bpel.xml
index 613b066..9905d36 100644
--- a/binsrc/bpel/tests/tevent/AsyncBPELService/bpel.xml
+++ b/binsrc/bpel/tests/tevent/AsyncBPELService/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/Event.bpel b/binsrc/bpel/tests/tevent/Event.bpel
index 8ef6bcc..5d72bf7 100644
--- a/binsrc/bpel/tests/tevent/Event.bpel
+++ b/binsrc/bpel/tests/tevent/Event.bpel
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/Event.wsdl b/binsrc/bpel/tests/tevent/Event.wsdl
index 78d1530..692c465 100644
--- a/binsrc/bpel/tests/tevent/Event.wsdl
+++ b/binsrc/bpel/tests/tevent/Event.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/bpel.xml b/binsrc/bpel/tests/tevent/bpel.xml
index e0aed3f..d3cacb2 100644
--- a/binsrc/bpel/tests/tevent/bpel.xml
+++ b/binsrc/bpel/tests/tevent/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tevent/tevent.sql b/binsrc/bpel/tests/tevent/tevent.sql
index a082373..b34a374 100644
--- a/binsrc/bpel/tests/tevent/tevent.sql
+++ b/binsrc/bpel/tests/tevent/tevent.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tevent.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: tevent.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/Sut.bpel b/binsrc/bpel/tests/tpcc/Sut.bpel
index 4ac2e95..c1d4e4e 100644
--- a/binsrc/bpel/tests/tpcc/Sut.bpel
+++ b/binsrc/bpel/tests/tpcc/Sut.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/Sut.wsdl b/binsrc/bpel/tests/tpcc/Sut.wsdl
index dee9f85..cc35a97 100644
--- a/binsrc/bpel/tests/tpcc/Sut.wsdl
+++ b/binsrc/bpel/tests/tpcc/Sut.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/chk.sql b/binsrc/bpel/tests/tpcc/chk.sql
index f25c27e..0e60d88 100644
--- a/binsrc/bpel/tests/tpcc/chk.sql
+++ b/binsrc/bpel/tests/tpcc/chk.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: chk.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: chk.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/dbservices.wsdl b/binsrc/bpel/tests/tpcc/dbservices.wsdl
index 288056b..f1c9545 100644
--- a/binsrc/bpel/tests/tpcc/dbservices.wsdl
+++ b/binsrc/bpel/tests/tpcc/dbservices.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/delqr.sql b/binsrc/bpel/tests/tpcc/delqr.sql
index 3c5ef47..8a89eb6 100644
--- a/binsrc/bpel/tests/tpcc/delqr.sql
+++ b/binsrc/bpel/tests/tpcc/delqr.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: delqr.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: delqr.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/endp.sql b/binsrc/bpel/tests/tpcc/endp.sql
index 99c3307..542d989 100644
--- a/binsrc/bpel/tests/tpcc/endp.sql
+++ b/binsrc/bpel/tests/tpcc/endp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: endp.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: endp.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/load.sql b/binsrc/bpel/tests/tpcc/load.sql
index 562bd94..c222619 100644
--- a/binsrc/bpel/tests/tpcc/load.sql
+++ b/binsrc/bpel/tests/tpcc/load.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: load.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: load.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/procedures-list-DB.sql b/binsrc/bpel/tests/tpcc/procedures-list-DB.sql
index 9a9b1b0..7ae33e7 100644
--- a/binsrc/bpel/tests/tpcc/procedures-list-DB.sql
+++ b/binsrc/bpel/tests/tpcc/procedures-list-DB.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: procedures-list-DB.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: procedures-list-DB.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/procedures-list-TD.sql b/binsrc/bpel/tests/tpcc/procedures-list-TD.sql
index e5b05c1..e37aca6 100644
--- a/binsrc/bpel/tests/tpcc/procedures-list-TD.sql
+++ b/binsrc/bpel/tests/tpcc/procedures-list-TD.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: procedures-list-TD.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: procedures-list-TD.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/qr.sql b/binsrc/bpel/tests/tpcc/qr.sql
index df54ef4..1cdce26 100644
--- a/binsrc/bpel/tests/tpcc/qr.sql
+++ b/binsrc/bpel/tests/tpcc/qr.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: qr.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: qr.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/run.sh b/binsrc/bpel/tests/tpcc/run.sh
index e90f8a1..6bae30c 100755
--- a/binsrc/bpel/tests/tpcc/run.sh
+++ b/binsrc/bpel/tests/tpcc/run.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: run.sh,v 1.4 2009/04/14 12:16:49 source Exp $
+#  $Id: run.sh,v 1.4.2.1 2012/03/08 12:54:59 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/tdservices.wsdl b/binsrc/bpel/tests/tpcc/tdservices.wsdl
index 4d64a9a..f764cb6 100644
--- a/binsrc/bpel/tests/tpcc/tdservices.wsdl
+++ b/binsrc/bpel/tests/tpcc/tdservices.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/test.sql b/binsrc/bpel/tests/tpcc/test.sql
index a51de33..e1ec6db 100644
--- a/binsrc/bpel/tests/tpcc/test.sql
+++ b/binsrc/bpel/tests/tpcc/test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: test.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tpcc/test1.sql b/binsrc/bpel/tests/tpcc/test1.sql
index 9faa248..fc0b624 100644
--- a/binsrc/bpel/tests/tpcc/test1.sql
+++ b/binsrc/bpel/tests/tpcc/test1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test1.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: test1.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tver/service.wsdl b/binsrc/bpel/tests/tver/service.wsdl
index a221b82..d23cb7b 100644
--- a/binsrc/bpel/tests/tver/service.wsdl
+++ b/binsrc/bpel/tests/tver/service.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tver/tver.bpel b/binsrc/bpel/tests/tver/tver.bpel
index 82357e8..3067a82 100644
--- a/binsrc/bpel/tests/tver/tver.bpel
+++ b/binsrc/bpel/tests/tver/tver.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tver/tver.sql b/binsrc/bpel/tests/tver/tver.sql
index eaf5cd2..b903f75 100644
--- a/binsrc/bpel/tests/tver/tver.sql
+++ b/binsrc/bpel/tests/tver/tver.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tver.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: tver.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tver/tver.wsdl b/binsrc/bpel/tests/tver/tver.wsdl
index 5b5d013..c062b3b 100644
--- a/binsrc/bpel/tests/tver/tver.wsdl
+++ b/binsrc/bpel/tests/tver/tver.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tver/tvernew1.bpel b/binsrc/bpel/tests/tver/tvernew1.bpel
index 1406a90..ad7efca 100644
--- a/binsrc/bpel/tests/tver/tvernew1.bpel
+++ b/binsrc/bpel/tests/tver/tvernew1.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/tver/tvernew2.bpel b/binsrc/bpel/tests/tver/tvernew2.bpel
index b22d982..a26f0e7 100644
--- a/binsrc/bpel/tests/tver/tvernew2.bpel
+++ b/binsrc/bpel/tests/tver/tvernew2.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wsrm/doc.bpel b/binsrc/bpel/tests/wsrm/doc.bpel
index 3b47abe..f96e929 100644
--- a/binsrc/bpel/tests/wsrm/doc.bpel
+++ b/binsrc/bpel/tests/wsrm/doc.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wsrm/doc.wsdl b/binsrc/bpel/tests/wsrm/doc.wsdl
index c354725..a5b4c3e 100644
--- a/binsrc/bpel/tests/wsrm/doc.wsdl
+++ b/binsrc/bpel/tests/wsrm/doc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wsrm/wsrmdoc.sql b/binsrc/bpel/tests/wsrm/wsrmdoc.sql
index 43da1f4..dfc4642 100644
--- a/binsrc/bpel/tests/wsrm/wsrmdoc.sql
+++ b/binsrc/bpel/tests/wsrm/wsrmdoc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wsrmdoc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: wsrmdoc.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wsrm/wsrmsvc.wsdl b/binsrc/bpel/tests/wsrm/wsrmsvc.wsdl
index 86075d5..8ff2f8d 100644
--- a/binsrc/bpel/tests/wsrm/wsrmsvc.wsdl
+++ b/binsrc/bpel/tests/wsrm/wsrmsvc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wss/doc.bpel b/binsrc/bpel/tests/wss/doc.bpel
index 33fa06f..a19d896 100644
--- a/binsrc/bpel/tests/wss/doc.bpel
+++ b/binsrc/bpel/tests/wss/doc.bpel
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wss/doc.wsdl b/binsrc/bpel/tests/wss/doc.wsdl
index c354725..a5b4c3e 100644
--- a/binsrc/bpel/tests/wss/doc.wsdl
+++ b/binsrc/bpel/tests/wss/doc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wss/secdoc.sql b/binsrc/bpel/tests/wss/secdoc.sql
index 1c1a880..cbf9070 100644
--- a/binsrc/bpel/tests/wss/secdoc.sql
+++ b/binsrc/bpel/tests/wss/secdoc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: secdoc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: secdoc.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/tests/wss/secsvc.wsdl b/binsrc/bpel/tests/wss/secsvc.wsdl
index 32dac15..66e77ba 100644
--- a/binsrc/bpel/tests/wss/secsvc.wsdl
+++ b/binsrc/bpel/tests/wss/secsvc.wsdl
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/time.vsp b/binsrc/bpel/time.vsp
index 9313c0f..3f962d8 100644
--- a/binsrc/bpel/time.vsp
+++ b/binsrc/bpel/time.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: time.vsp,v 1.4 2007/03/14 14:23:25 source Exp $
+--  $Id: time.vsp,v 1.4.2.1 2012/03/08 12:54:56 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/upload_new.vspx b/binsrc/bpel/upload_new.vspx
index a925dd7..79b6ef8 100644
--- a/binsrc/bpel/upload_new.vspx
+++ b/binsrc/bpel/upload_new.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: upload_new.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: upload_new.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/view.vspx b/binsrc/bpel/view.vspx
index c05ee9a..c8f8099 100644
--- a/binsrc/bpel/view.vspx
+++ b/binsrc/bpel/view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: view.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: view.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/virtuoso_splash.vspx b/binsrc/bpel/virtuoso_splash.vspx
index b15b958..2375b84 100644
--- a/binsrc/bpel/virtuoso_splash.vspx
+++ b/binsrc/bpel/virtuoso_splash.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: virtuoso_splash.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: virtuoso_splash.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/wsdl.xsd b/binsrc/bpel/wsdl.xsd
index 7c8207b..c41d20e 100644
--- a/binsrc/bpel/wsdl.xsd
+++ b/binsrc/bpel/wsdl.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/wss_keys.vspx b/binsrc/bpel/wss_keys.vspx
index 95abf89..065ee09 100644
--- a/binsrc/bpel/wss_keys.vspx
+++ b/binsrc/bpel/wss_keys.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wss_keys.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: wss_keys.vspx,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/xsql.sql b/binsrc/bpel/xsql.sql
index ee27075..8e99637 100644
--- a/binsrc/bpel/xsql.sql
+++ b/binsrc/bpel/xsql.sql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -21,7 +21,7 @@
 create function SYS_XSQL_LIB_VERSION ()
 {
   return subseq ('
---#$$Id: xsql.sql,v 1.1.1.1 2006/04/11 17:56:09 source Exp $$',
+--#$$Id: xsql.sql,v 1.1.1.1.2.1 2012/03/08 12:54:56 source Exp $$',
   4);
 }
 ;
diff --git a/binsrc/bpel/xsql.xsd b/binsrc/bpel/xsql.xsd
index 197bfde..ada0df2 100644
--- a/binsrc/bpel/xsql.xsd
+++ b/binsrc/bpel/xsql.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/bpel/xsql2virtPL.xsl b/binsrc/bpel/xsql2virtPL.xsl
index 8998b93..c7c446f 100644
--- a/binsrc/bpel/xsql2virtPL.xsl
+++ b/binsrc/bpel/xsql2virtPL.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xsql2virtPL.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: xsql2virtPL.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@
   <xsl:param name="page-name" select="'unnamed'"/>
   <xsl:param name="proc-name" select="'XSQL__SAMPLE'"/>
   <xsl:variable name="mylibversion"><xsl:value-of select="xsql:lib-version"/></xsl:variable>
-  <xsl:variable name="myversion">$Id: xsql2virtPL.xsl,v 1.2 2006/08/15 22:09:20 source Exp $</xsl:variable>
+  <xsl:variable name="myversion">$Id: xsql2virtPL.xsl,v 1.2.2.1 2012/03/08 12:54:56 source Exp $</xsl:variable>
 
   
   <xsl:template match="/">
diff --git a/binsrc/cached_resources/Makefile.am b/binsrc/cached_resources/Makefile.am
index 18e0d56..f52d13e 100644
--- a/binsrc/cached_resources/Makefile.am
+++ b/binsrc/cached_resources/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -25,14 +25,13 @@ BUILT_SOURCES	= cached_resources.c
 all: cached_resources.c
 
 cached_resources.c: \
-	w3-TR-xhtml1-DTD/xhtml-lat1.ent \
-	w3-TR-xhtml1-DTD/xhtml-special.ent \
-	w3-TR-xhtml1-DTD/xhtml-symbol.ent \
-	w3-TR-xhtml1-DTD/xhtml1-frameset.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-strict.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-transitional.dtd \
-	openlinksw-sparql/virtrdf-data-formats.ttl \
-	res_to_c.awk cache_gen.sh Makefile.am
+	cache_gen.sh res_to_c.awk cache_gen.sh Makefile.am \
+	openlinksw-sparql/*.ttl \
+	w3-1999-xhtml/vocab \
+	w3-2000-01/rdf-schema \
+	w3-TR-xhtml1-DTD/*.ent \
+	w3-TR-xhtml1-DTD/*.dtd \
+	openlinksw-sparql/*.ttl
 	@echo Generating cached_resources.c 
 	@$(SHELL) ./cache_gen.sh > cached_resources.c
 
@@ -47,14 +46,16 @@ clean:
 # ----------------------------------------------------------------------
 EXTRA_DIST = \
 	cached_resources.c \
-	cache_gen.sh res_to_c.awk \
+	cache_gen.sh \
 	openlinksw-sparql/virtrdf-data-formats.ttl \
-	w3-2000-01/rdf-schema \
+	res_to_c.awk \
+	w3-1999-xhtml/vocab \
 	w3-2000-01/README.txt \
+	w3-2000-01/rdf-schema \
 	w3-TR-xhtml1-DTD/README.txt \
-	w3-TR-xhtml1-DTD/xhtml1-frameset.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-strict.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-transitional.dtd \
 	w3-TR-xhtml1-DTD/xhtml-lat1.ent \
 	w3-TR-xhtml1-DTD/xhtml-special.ent \
-	w3-TR-xhtml1-DTD/xhtml-symbol.ent
+	w3-TR-xhtml1-DTD/xhtml-symbol.ent \
+	w3-TR-xhtml1-DTD/xhtml1-frameset.dtd \
+	w3-TR-xhtml1-DTD/xhtml1-strict.dtd \
+	w3-TR-xhtml1-DTD/xhtml1-transitional.dtd
diff --git a/binsrc/cached_resources/Makefile.in b/binsrc/cached_resources/Makefile.in
index dbe9e49..4d2e182 100644
--- a/binsrc/cached_resources/Makefile.in
+++ b/binsrc/cached_resources/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -101,6 +101,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -149,6 +150,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -200,6 +202,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -246,7 +249,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -281,17 +283,19 @@ BUILT_SOURCES = cached_resources.c
 # ----------------------------------------------------------------------
 EXTRA_DIST = \
 	cached_resources.c \
-	cache_gen.sh res_to_c.awk \
+	cache_gen.sh \
 	openlinksw-sparql/virtrdf-data-formats.ttl \
-	w3-2000-01/rdf-schema \
+	res_to_c.awk \
+	w3-1999-xhtml/vocab \
 	w3-2000-01/README.txt \
+	w3-2000-01/rdf-schema \
 	w3-TR-xhtml1-DTD/README.txt \
-	w3-TR-xhtml1-DTD/xhtml1-frameset.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-strict.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-transitional.dtd \
 	w3-TR-xhtml1-DTD/xhtml-lat1.ent \
 	w3-TR-xhtml1-DTD/xhtml-special.ent \
-	w3-TR-xhtml1-DTD/xhtml-symbol.ent
+	w3-TR-xhtml1-DTD/xhtml-symbol.ent \
+	w3-TR-xhtml1-DTD/xhtml1-frameset.dtd \
+	w3-TR-xhtml1-DTD/xhtml1-strict.dtd \
+	w3-TR-xhtml1-DTD/xhtml1-transitional.dtd
 
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -483,14 +487,13 @@ uninstall-am:
 all: cached_resources.c
 
 cached_resources.c: \
-	w3-TR-xhtml1-DTD/xhtml-lat1.ent \
-	w3-TR-xhtml1-DTD/xhtml-special.ent \
-	w3-TR-xhtml1-DTD/xhtml-symbol.ent \
-	w3-TR-xhtml1-DTD/xhtml1-frameset.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-strict.dtd \
-	w3-TR-xhtml1-DTD/xhtml1-transitional.dtd \
-	openlinksw-sparql/virtrdf-data-formats.ttl \
-	res_to_c.awk cache_gen.sh Makefile.am
+	cache_gen.sh res_to_c.awk cache_gen.sh Makefile.am \
+	openlinksw-sparql/*.ttl \
+	w3-1999-xhtml/vocab \
+	w3-2000-01/rdf-schema \
+	w3-TR-xhtml1-DTD/*.ent \
+	w3-TR-xhtml1-DTD/*.dtd \
+	openlinksw-sparql/*.ttl
 	@echo Generating cached_resources.c 
 	@$(SHELL) ./cache_gen.sh > cached_resources.c
 
diff --git a/binsrc/cached_resources/cache_gen.sh b/binsrc/cached_resources/cache_gen.sh
index 0087613..a15876f 100755
--- a/binsrc/cached_resources/cache_gen.sh
+++ b/binsrc/cached_resources/cache_gen.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: cache_gen.sh,v 1.4.2.2 2010/02/03 18:37:22 source Exp $
+#  $Id: cache_gen.sh,v 1.4.2.4 2012/03/08 12:54:59 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -63,6 +63,11 @@ uriprefix='http://www.w3.org/2000/01/'
 publishingdate='2004-02-10 20:54'
 cache_file 'rdf-schema'		'<owl:Onthology rdf:about=\"http://www.w3.org/2000/01/rdf-schema#\"/>'	'An RDF description of the RDF and RDFS vocalulary'
 
+fileprefix='w3-1999-xhtml/'
+uriprefix='http://www.w3.org/1999/xhtml/'
+publishingdate='2010-01-27 20:54'
+cache_file 'vocab'		''	'XHTML Vocabulary'
+
 fileprefix='openlinksw-sparql/'
 uriprefix='http://www.openlinksw.com/sparql/'
 publishingdate='2006-09-11 01:25'
diff --git a/binsrc/cached_resources/cached_resources.c b/binsrc/cached_resources/cached_resources.c
index 4b7c14c..5ba19cc 100644
--- a/binsrc/cached_resources/cached_resources.c
+++ b/binsrc/cached_resources/cached_resources.c
@@ -4205,13 +4205,474 @@ static const char * cres_rdf_schema[] =
 /* end of the content of the resource 'w3-2000-01/rdf-schema' */
 0 };
 
+static const char * cres_vocab[] =
+{ /* The content of the resource */
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML+RDFa 1.0//EN\"\n",
+"      \"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd\">\n",
+"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n",
+" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n",
+" xmlns:rdfa=\"http://www.w3.org/ns/rdfa#\"\n",
+" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\n",
+" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xml:lang=\"en-US\">\n",
+"<head>\n",
+"  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n",
+"  <title>XHTML Vocabulary</title>\n",
+"  <base  href=\"http://www.w3.org/1999/xhtml/vocab\" />\n",
+"  <link rel=\"stylesheet\" type=\"text/css\"\n",
+"  href=\"http://www.w3.org/StyleSheets/TR/base.css\" />\n",
+"</head>\n",
+"\n",
+"<body>\n",
+"\n",
+"<div class=\"head\">\n",
+"<p><a href=\"http://www.w3.org/\"><img class=\"head\"\n",
+"src=\"http://www.w3.org/Icons/WWW/w3c_home\" alt=\"W3C\" /></a></p>\n",
+"</div>\n",
+"\n",
+"<h1><abbr title=\"Extensible HyperText Markup Language\">XHTML</abbr>\n",
+"Vocabulary</h1>\n",
+"\n",
+"<p>This is a vocabulary collection utilized by <abbr>XHTML</abbr> Family\n",
+"modules and document types using <a\n",
+"href=\"http://www.w3.org/TR/xhtml-modularization\"><abbr>XHTML</abbr>\n",
+"Modularization</a>, including <a\n",
+"href=\"http://www.w3.org/TR/xhtml-role\"><abbr>XHTML</abbr> Role</a> and XHTML +\n",
+"RDFa as defined in <a\n",
+"href=\"http://www.w3.org/TR/rdfa-syntax\">rdfa-syntax</a>.</p>\n",
+"\n",
+"<p>The <abbr>XHTML</abbr> specifications are developed by the <a\n",
+"href=\"http://www.w3.org/MarkUp/\"><abbr\n",
+"title=\"World Wide Web Consortium\">W3C</abbr> <abbr\n",
+"title=\"Extensible HyperText Markup Language\">XHTML</abbr> 2 Working Group</a>\n",
+"as part of the <a href=\"http://www.w3.org/MarkUp/Activity\"><abbr>W3C</abbr>\n",
+"<abbr>HTML</abbr> Activity</a>.</p>\n",
+"\n",
+"<p>For more information about <abbr>XML</abbr>, please refer to the <a\n",
+"href=\"http://www.w3.org/TR/REC-xml\">Extensible Markup Language\n",
+"(<abbr>XML</abbr>) 1.0</a> specification.</p>\n",
+"\n",
+"<p>Version date: <!--\044date=-->2010-01-27<!--\044--></p>\n",
+"<hr />\n",
+"\n",
+"<h2>1. Introduction</h2>\n",
+"\n",
+"<p>XHTML Modularization [<a href=\"#ref_XHTMLMOD\">XHTMLMOD</a>] permits the\n",
+"development of XHTML modules and XHTML family markup languages. These modules\n",
+"and markup languages may, in turn, define local vocabulary items for use as\n",
+"values of attributes. This document describes the items that are available in\n",
+"the default XHTML vocabulary space:\n",
+"<code>http://www.w3.org/1999/xhtml/vocab#</code>. </p>\n",
+"\n",
+"<h2 id=\"XHTMLMetaInformationModule\">2. XHTML Metainformation Vocabulary</h2>\n",
+"\n",
+"<p>The XHTML Metainformation Module defined as part of XHTML+RDFa [<a\n",
+"    href=\"#ref_XHTMLRDFa\">XHTMLRDFa</a>] specifies the following vocabulary items.</p>\n",
+"\n",
+"<div id=\"relrev-properties\" about=\"#relrev-properties\" typeof=\"rdf:Bag\">\n",
+"\n",
+"<div about=\"#relrev-properties\" rev=\"rdfs:member\">\n",
+"<dl>\n",
+"  <dt id=\"alternate\" about=\"#alternate\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">alternate</dt>\n",
+"    <dd about=\"#alternate\" property=\"rdfs:comment\" datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#alternate'>alternate</span> \n",
+"    designates alternate versions for a resource.</dd>\n",
+"  <dt id=\"appendix\" about=\"#appendix\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">appendix</dt>\n",
+"    <dd about=\"#appendix\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#appendix'>appendix</span> refers to a resource serving\n",
+"      as an appendix in a collection. </dd>\n",
+"  <dt id=\"bookmark\" about=\"#bookmark\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">bookmark</dt>\n",
+"    <dd about=\"#bookmark\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#bookmark'>bookmark</span> refers to a bookmark - a link\n",
+"      to a key entry point within an extended document. </dd>\n",
+"  <dt id=\"cite\" about=\"#cite\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">cite</dt>\n",
+"    <dd about=\"#cite\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#cite'>cite</span> refers to a resource that defines\n",
+"      a citation. </dd>\n",
+"  <dt id=\"chapter\" about=\"#chapter\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">chapter</dt>\n",
+"    <dd about=\"#chapter\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#chapter'>chapter</span> refers to a resource serving\n",
+"      as a chapter in a collection. </dd>\n",
+"  <dt id=\"contents\" about=\"#contents\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">contents</dt>\n",
+"    <dd about=\"#contents\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#contents'>contents</span> refers to a resource serving\n",
+"      as a table of contents. </dd>\n",
+"  <dt id=\"copyright\" about=\"#copyright\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">copyright</dt>\n",
+"    <dd about=\"#copyright\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#copyright'>copyright</span> refers to a copyright\n",
+"      statement for the resource. </dd>\n",
+"  <dt id=\"first\" about=\"#first\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">first</dt>\n",
+"    <dd about=\"#first\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#first'>first</span> refers the first item in a\n",
+"      collection (see also start and top).</dd>\n",
+"  <dt id=\"glossary\" about=\"#glossary\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">glossary</dt>\n",
+"    <dd about=\"#glossary\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#glossary'>glossary</span> refers to a resource\n",
+"      providing a glossary of terms. </dd>\n",
+"  <dt id=\"help\" about=\"#help\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">help</dt>\n",
+"    <dd about=\"#help\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#help'>help</span> refers to a resource offering\n",
+"      help. </dd>\n",
+"  <dt id=\"icon\" about=\"#icon\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">icon</dt>\n",
+"    <dd about=\"#icon\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#icon'>icon</span> refers to a resource that\n",
+"      represents an icon. </dd>\n",
+"  <dt id=\"index\" about=\"#index\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">index</dt>\n",
+"    <dd about=\"#index\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#index'>index</span> refers to a resource providing\n",
+"      an index. </dd>\n",
+"  <dt id=\"itsRules\" about=\"#itsRules\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">itsRules</dt>\n",
+"    <dd about=\"#itsRules\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#itsRules'>itsRules</span> indicates that the designated\n",
+"      resource is an [<a href=\"#ref_ITS\">ITS</a>] rule set.</dd>\n",
+"  <dt id=\"last\" about=\"#last\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">last</dt>\n",
+"    <dd about=\"#last\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#last'>last</span> refers to the last resource in a\n",
+"      collection of resources. </dd>\n",
+"  <dt id=\"license\" about=\"#license\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">license</dt>\n",
+"    <dd about=\"#license\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#license'>license</span> refers to a resource that\n",
+"      defines the associated license. </dd>\n",
+"  <dt id=\"meta\" about=\"#meta\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">meta</dt>\n",
+"    <dd about=\"#meta\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#meta'>meta</span> refers to a resource that\n",
+"      provides metadata. </dd>\n",
+"  <dt id=\"next\" about=\"#next\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">next</dt>\n",
+"    <dd about=\"#next\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#next'>next</span> refers to the next resource\n",
+"      (after the current one) in an ordered collection of resources. </dd>\n",
+"  <dt id=\"p3pv1\" about=\"#p3pv1\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">p3pv1</dt>\n",
+"    <dd about=\"#p3pv1\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#p3pv1'>p3pv1</span> refers to a P3P Policy Reference\n",
+"      File [<a href=\"#ref_P3P\">P3P</a>]. </dd>\n",
+"  <dt id=\"prev\" about=\"#prev\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">prev</dt>\n",
+"    <dd about=\"#prev\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#prev'>prev</span> refers to a previous resource\n",
+"      (before the current one) in an ordered collection of resources. </dd>\n",
+"  <dt id=\"role\" about=\"#role\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Bag rdf:Property\">role</dt>\n",
+"    <dd about=\"#role\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#role'>role</span> indicates the purpose of the\n",
+"      resource. See <a href=\"#XHTMLRoleVocabulary\">the XHTML Role\n",
+"      Vocabulary</a> for roles in this vocabulary space, and <a\n",
+"      href=\"#ref_XHTMLROLE\">XHTMLROLE</a> for information on extending the\n",
+"      collection of roles. </dd>\n",
+"  <dt id=\"section\" about=\"#section\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">section</dt>\n",
+"    <dd about=\"#section\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#section'>section</span> refers to a resource serving\n",
+"      as a section in a collection. </dd>\n",
+"  <dt id=\"stylesheet\" about=\"#stylesheet\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">stylesheet</dt>\n",
+"    <dd about=\"#stylesheet\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#stylesheet'>stylesheet</span> refers to a resource\n",
+"      serving as a stylesheet for a resource. </dd>\n",
+"  <dt id=\"subsection\" about=\"#subsection\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">subsection</dt>\n",
+"    <dd about=\"#subsection\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#subsection'>subsection</span> refers to a resource\n",
+"      serving as a subsection in a collection. </dd>\n",
+"  <dt id=\"start\" about=\"#start\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">start</dt>\n",
+"    <dd about=\"#start\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#start'>start</span> refers to the first resource in\n",
+"      a collection of resources. </dd>\n",
+"  <dt id=\"top\" about=\"#top\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">top</dt>\n",
+"    <dd about=\"#top\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#top'>top</span> is a synonym for start. </dd>\n",
+"  <dt id=\"up\" about=\"#up\" property='rdfa:term' lang='' xml:lang='' typeof=\"rdf:Property\">up</dt>\n",
+"    <dd about=\"#up\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#up'>up</span> refers to a resource \"above\" in a\n",
+"      hierarchically structured set. </dd>\n",
+"</dl>\n",
+"</div>\n",
+"</div>\n",
+"\n",
+"<h2 id=\"XHTMLRoleVocabulary\">3. XHTML Role Vocabulary</h2>\n",
+"\n",
+"<h3 id=\"XHTMLRoleModule\">3.1 Items from the XHTML Role Module</h3>\n",
+"\n",
+"<p id=\"role-properties\" about=\"#role-properties\" typeof=\"rdf:Bag\">The values in\n",
+"this section are defined for use in the <code>role</code> attribute as\n",
+"specified in the <a href=\"#ref_XHTMLROLE\">XHTML Role Attribute Module</a>. Note\n",
+"that the values in <a href=\"#XHTMLMetaInformationModule\"\n",
+"resource=\"#relrev-properties\" rev=\"rdfs:member\">Section 2</a> and <a\n",
+"href=\"#WAIARIA\">Section 3.2</a> are also available.</p>\n",
+"\n",
+"<div about=\"#role-properties\" rev=\"rdfs:member\">\n",
+"<dl>\n",
+"  <dt id=\"banner\" about=\"#banner\" typeof=\"rdf:Property\">banner</dt>\n",
+"    <dd about=\"#banner\" property=\"rdfs:comment\" datatype=\"xsd:string\">contains\n",
+"      the prime heading or internal title of a page. </dd>\n",
+"  <dt id=\"complementary\" about=\"#complementary\"\n",
+"  typeof=\"rdf:Property\">complementary</dt>\n",
+"    <dd about=\"#complementary\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\">indicates that the section supports but is\n",
+"      separable from the main content of resource.</dd>\n",
+"  <dt id=\"contentinfo\" about=\"#contentinfo\"\n",
+"  typeof=\"rdf:Property\">contentinfo</dt>\n",
+"    <dd about=\"#contentinfo\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\"><span></span>contains meta information about the\n",
+"      content on the page or the page as a whole.</dd>\n",
+"  <dt id=\"definition\" about=\"#definition\" typeof=\"rdf:Property\">definition</dt>\n",
+"    <dd about=\"#definition\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\">indicates the definition of a term or concept.</dd>\n",
+"  <dt id=\"main\" about=\"#main\" typeof=\"rdf:Property\">main</dt>\n",
+"    <dd about=\"#main\" property=\"rdfs:comment\" datatype=\"xsd:string\">acts as the\n",
+"      main content of the document. </dd>\n",
+"  <dt id=\"navigation\" about=\"#navigation\" typeof=\"rdf:Property\">navigation</dt>\n",
+"    <dd about=\"#navigation\" property=\"rdfs:comment\"\n",
+"      datatype=\"xsd:string\">indicates a collection of items suitable for\n",
+"      navigating the document or related documents.</dd>\n",
+"  <dt id=\"note\" about=\"#note\" typeof=\"rdf:Property\">note</dt>\n",
+"    <dd about=\"#note\" property=\"rdfs:comment\" datatype=\"xsd:string\">indicates\n",
+"      the content is parenthetic or ancillary to the main content of the\n",
+"      resource. </dd>\n",
+"  <dt id=\"search\" about=\"#search\" typeof=\"rdf:Property\">search</dt>\n",
+"    <dd about=\"#search\" property=\"rdfs:comment\" datatype=\"xsd:string\">indicates\n",
+"      that the section provides a search facility. </dd>\n",
+"</dl>\n",
+"</div>\n",
+"\n",
+"<h3 id=\"WAIARIA\">3.2 Items from the Accessible Rich Internet Applications\n",
+"Vocabulary</h3>\n",
+"\n",
+"<div about=\"#role-properties\" typeof=\"rdfs:member\">\n",
+"  <dl>\n",
+"    <dt id=\"alert\" about=\"#alert\" typeof=\"rdf:Property\">alert</dt>\n",
+"    <dd about=\"#alert\" property=\"rdfs:comment\" datatype=\"xsd:string\">A message\n",
+"      with important, and usually time-sensitive, information. Also see alertdialog\n",
+"      and status.</dd>\n",
+"    <dt id=\"alertdialog\" about=\"#alertdialog\" typeof=\"rdf:Property\">alertdialog</dt>\n",
+"    <dd about=\"#alertdialog\" property=\"rdfs:comment\" datatype=\"xsd:string\">A\n",
+"      type of dialog that contains an alert message, where initial focus goes\n",
+"      an element within the dialog. Also see alert and dialog.</dd>\n",
+"    <dt id=\"application\" about=\"#application\" typeof=\"rdf:Property\">application</dt>\n",
+"    <dd about=\"#application\" property=\"rdfs:comment\" datatype=\"xsd:string\">A\n",
+"      region declared as a web application, as opposed to a web document.</dd>\n",
+"    <dt id=\"article\" about=\"#article\" typeof=\"rdf:Property\">article</dt>\n",
+"    <dd about=\"#article\" property=\"rdfs:comment\" datatype=\"xsd:string\">A section\n",
+"      of a page that consists of a composition that forms an independent part\n",
+"      of a document, page, or site.</dd>\n",
+"    <dt id=\"button\" about=\"#button\" typeof=\"rdf:Property\">button</dt>\n",
+"    <dd about=\"#button\" property=\"rdfs:comment\" datatype=\"xsd:string\">An input\n",
+"      that allows for user-triggered actions when clicked or pressed. Also see\n",
+"      link.</dd>\n",
+"    <dt id=\"checkbox\" about=\"#checkbox\" typeof=\"rdf:Property\">checkbox</dt>\n",
+"    <dd about=\"#checkbox\" property=\"rdfs:comment\" datatype=\"xsd:string\">A checkable\n",
+"      input that has three possible values: true, false, or mixed.</dd>\n",
+"    <dt id=\"columnheader\" about=\"#columnheader\" typeof=\"rdf:Property\">columnheader</dt>\n",
+"    <dd about=\"#columnheader\" property=\"rdfs:comment\" datatype=\"xsd:string\">A\n",
+"      cell containing header information for a column.</dd>\n",
+"    <dt id=\"combobox\" about=\"#combobox\" typeof=\"rdf:Property\">combobox</dt>\n",
+"    <dd about=\"#combobox\" property=\"rdfs:comment\" datatype=\"xsd:string\">A presentation\n",
+"      of a select; usually similar to a textbox where users can type ahead to\n",
+"      select an option, or type to enter arbitrary text as a new item in the\n",
+"      list. Also see listbox.</dd>\n",
+"    <dt id=\"dialog\" about=\"#dialog\" typeof=\"rdf:Property\">dialog</dt>\n",
+"    <dd about=\"#dialog\" property=\"rdfs:comment\" datatype=\"xsd:string\">A dialog\n",
+"      is an application window that is designed to interrupt the current processing\n",
+"      of an application in order to prompt the user to enter information or require\n",
+"      a response. Also see alertdialog.</dd>\n",
+"    <dt id=\"directory\" about=\"#directory\" typeof=\"rdf:Property\">directory</dt>\n",
+"    <dd about=\"#directory\" property=\"rdfs:comment\" datatype=\"xsd:string\">A list\n",
+"      of references to members of a group, such as a static table of contents.</dd>\n",
+"    <dt id=\"document\" about=\"#document\" typeof=\"rdf:Property\">document</dt>\n",
+"    <dd about=\"#document\" property=\"rdfs:comment\" datatype=\"xsd:string\">A region\n",
+"      containing related information that is declared as document content, as\n",
+"      opposed to a web application.</dd>\n",
+"    <dt id=\"form\" about=\"#form\" typeof=\"rdf:Property\">form</dt>\n",
+"    <dd about=\"#form\" property=\"rdfs:comment\" datatype=\"xsd:string\">A landmark\n",
+"      region that contains a collection of items and objects that, as a whole,\n",
+"      combine to create a form. Also see search.</dd>\n",
+"    <dt id=\"grid\" about=\"#grid\" typeof=\"rdf:Property\">grid</dt>\n",
+"    <dd about=\"#grid\" property=\"rdfs:comment\" datatype=\"xsd:string\">A grid is\n",
+"      an interactive control which contains cells of tabular data arranged in\n",
+"      rows and columns, like a table.</dd>\n",
+"    <dt id=\"gridcell\" about=\"#gridcell\" typeof=\"rdf:Property\">gridcell</dt>\n",
+"    <dd about=\"#gridcell\" property=\"rdfs:comment\" datatype=\"xsd:string\">A cell\n",
+"      in a grid or treegrid.</dd>\n",
+"    <dt id=\"group\" about=\"#group\" typeof=\"rdf:Property\">group</dt>\n",
+"    <dd about=\"#group\" property=\"rdfs:comment\" datatype=\"xsd:string\">A set of\n",
+"      user interface objects which are not intended to be included in a page\n",
+"      summary or table of contents by assistive technologies.</dd>\n",
+"    <dt id=\"heading\" about=\"#heading\" typeof=\"rdf:Property\">heading</dt>\n",
+"    <dd about=\"#heading\" property=\"rdfs:comment\" datatype=\"xsd:string\">A heading\n",
+"      for a section of the page.</dd>\n",
+"    <dt id=\"img\" about=\"#img\" typeof=\"rdf:Property\">img</dt>\n",
+"    <dd about=\"#img\" property=\"rdfs:comment\" datatype=\"xsd:string\">A container\n",
+"      for a collection of elements that form an image.</dd>\n",
+"    <dt id=\"link\" about=\"#link\" typeof=\"rdf:Property\">link</dt>\n",
+"    <dd about=\"#link\" property=\"rdfs:comment\" datatype=\"xsd:string\">An interactive\n",
+"      reference to an internal or external resource that, when activated, causes\n",
+"      the user agent to navigate to that resource. Also see button.</dd>\n",
+"    <dt id=\"list\" about=\"#list\" typeof=\"rdf:Property\">list</dt>\n",
+"    <dd about=\"#list\" property=\"rdfs:comment\" datatype=\"xsd:string\">A group of\n",
+"      non-interactive list items. Also see listbox.</dd>\n",
+"    <dt id=\"listbox\" about=\"#listbox\" typeof=\"rdf:Property\">listbox</dt>\n",
+"    <dd about=\"#listbox\" property=\"rdfs:comment\" datatype=\"xsd:string\">A widget\n",
+"      that allows the user to select one or more items from a list of choices.\n",
+"      Also see combobox and list.</dd>\n",
+"    <dt id=\"listitem\" about=\"#listitem\" typeof=\"rdf:Property\">listitem</dt>\n",
+"    <dd about=\"#listitem\" property=\"rdfs:comment\" datatype=\"xsd:string\">A single\n",
+"      item in a list or directory.</dd>\n",
+"    <dt id=\"log\" about=\"#log\" typeof=\"rdf:Property\">log</dt>\n",
+"    <dd about=\"#log\" property=\"rdfs:comment\" datatype=\"xsd:string\">A type of\n",
+"      live region where new information is added in meaningful order and old\n",
+"      information may disappear. Also see marquee.</dd>\n",
+"    <dt id=\"marquee\" about=\"#marquee\" typeof=\"rdf:Property\">marquee</dt>\n",
+"    <dd about=\"#marquee\" property=\"rdfs:comment\" datatype=\"xsd:string\">A type\n",
+"      of live region where non-essential information changes frequently. Also\n",
+"      see log.</dd>\n",
+"    <dt id=\"math\" about=\"#math\" typeof=\"rdf:Property\">math</dt>\n",
+"    <dd about=\"#math\" property=\"rdfs:comment\" datatype=\"xsd:string\">Content that\n",
+"      represents a mathematical expression. </dd>\n",
+"    <dt id=\"menu\" about=\"#menu\" typeof=\"rdf:Property\">menu</dt>\n",
+"    <dd about=\"#menu\" property=\"rdfs:comment\" datatype=\"xsd:string\">A type of\n",
+"      widget that offers a list of choices to the user.</dd>\n",
+"    <dt id=\"menubar\" about=\"#menubar\" typeof=\"rdf:Property\">menubar</dt>\n",
+"    <dd about=\"#menubar\" property=\"rdfs:comment\" datatype=\"xsd:string\">A presentation\n",
+"      of menu that usually remains visible and is usually presented horizontally.</dd>\n",
+"    <dt id=\"menuitem\" about=\"#menuitem\" typeof=\"rdf:Property\">menuitem</dt>\n",
+"    <dd about=\"#menuitem\" property=\"rdfs:comment\" datatype=\"xsd:string\">An option\n",
+"      in a group of choices contained by a menu or menubar.</dd>\n",
+"    <dt id=\"menuitemcheckbox\" about=\"#menuitemcheckbox\" typeof=\"rdf:Property\">menuitemcheckbox</dt>\n",
+"    <dd about=\"#menuitemcheckbox\" property=\"rdfs:comment\" datatype=\"xsd:string\">A\n",
+"      checkable menuitem that has three possible values: true, false, or mixed.</dd>\n",
+"    <dt id=\"menuitemradio\" about=\"#menuitemradio\" typeof=\"rdf:Property\">menuitemradio</dt>\n",
+"    <dd about=\"#menuitemradio\" property=\"rdfs:comment\" datatype=\"xsd:string\">A\n",
+"      checkable menuitem in a group of menuitemradio roles, only one of which\n",
+"      can be checked at a time.</dd>\n",
+"    <dt id=\"option\" about=\"#option\" typeof=\"rdf:Property\">option</dt>\n",
+"    <dd about=\"#option\" property=\"rdfs:comment\" datatype=\"xsd:string\">A selectable\n",
+"      item in a select list.</dd>\n",
+"    <dt id=\"presentation\" about=\"#presentation\" typeof=\"rdf:Property\">presentation</dt>\n",
+"    <dd about=\"#presentation\" property=\"rdfs:comment\" datatype=\"xsd:string\">An\n",
+"      element whose implicit native role semantics will not be mapped to the\n",
+"      accessibility API.</dd>\n",
+"    <dt id=\"progressbar\" about=\"#progressbar\" typeof=\"rdf:Property\">progressbar</dt>\n",
+"    <dd about=\"#progressbar\" property=\"rdfs:comment\" datatype=\"xsd:string\">An\n",
+"      element that displays the progress status for tasks that take a long time.</dd>\n",
+"    <dt id=\"radio\" about=\"#radio\" typeof=\"rdf:Property\">radio</dt>\n",
+"    <dd about=\"#radio\" property=\"rdfs:comment\" datatype=\"xsd:string\">A checkable\n",
+"      input in a group of radio roles, only one of which can be checked at a\n",
+"      time.</dd>\n",
+"    <dt id=\"radiogroup\" about=\"#radiogroup\" typeof=\"rdf:Property\">radiogroup</dt>\n",
+"    <dd about=\"#radiogroup\" property=\"rdfs:comment\" datatype=\"xsd:string\">A group\n",
+"      of radio buttons.</dd>\n",
+"    <dt id=\"region\" about=\"#region\" typeof=\"rdf:Property\">region</dt>\n",
+"    <dd about=\"#region\" property=\"rdfs:comment\" datatype=\"xsd:string\">A large\n",
+"      perceivable section of a web page or document, that the author feels is\n",
+"      important enough to be included in a page summary or table of contents,\n",
+"      for example, an area of the page containing live sporting event statistics.</dd>\n",
+"    <dt id=\"row\" about=\"#row\" typeof=\"rdf:Property\">row</dt>\n",
+"    <dd about=\"#row\" property=\"rdfs:comment\" datatype=\"xsd:string\">A row of cells\n",
+"      in a grid.</dd>\n",
+"    <dt id=\"rowgroup\" about=\"#rowgroup\" typeof=\"rdf:Property\">rowgroup</dt>\n",
+"    <dd about=\"#rowgroup\" property=\"rdfs:comment\" datatype=\"xsd:string\">A group\n",
+"      containing one or more row elements in a grid.</dd>\n",
+"    <dt id=\"rowheader\" about=\"#rowheader\" typeof=\"rdf:Property\">rowheader</dt>\n",
+"    <dd about=\"#rowheader\" property=\"rdfs:comment\" datatype=\"xsd:string\">A cell\n",
+"      containing header information for a row in a grid.</dd>\n",
+"    <dt id=\"scrollbar\" about=\"#scrollbar\" typeof=\"rdf:Property\">scrollbar</dt>\n",
+"    <dd about=\"#scrollbar\" property=\"rdfs:comment\" datatype=\"xsd:string\">A graphical\n",
+"      object that controls the scrolling of content within a viewing area, regardless\n",
+"      of whether the content is fully displayed within the viewing area.</dd>\n",
+"    <dt id=\"separator\" about=\"#separator\" typeof=\"rdf:Property\">separator</dt>\n",
+"    <dd about=\"#separator\" property=\"rdfs:comment\" datatype=\"xsd:string\">A divider\n",
+"      that separates and distinguishes sections of content or groups of menuitems.</dd>\n",
+"    <dt id=\"slider\" about=\"#slider\" typeof=\"rdf:Property\">slider</dt>\n",
+"    <dd about=\"#slider\" property=\"rdfs:comment\" datatype=\"xsd:string\">A user\n",
+"      input where the user selects a value from within a given range.</dd>\n",
+"    <dt id=\"spinbutton\" about=\"#spinbutton\" typeof=\"rdf:Property\">spinbutton</dt>\n",
+"    <dd about=\"#spinbutton\" property=\"rdfs:comment\" datatype=\"xsd:string\">A form\n",
+"      of range that expects a user to select from amongst discrete choices.</dd>\n",
+"    <dt id=\"status\" about=\"#status\" typeof=\"rdf:Property\">status</dt>\n",
+"    <dd about=\"#status\" property=\"rdfs:comment\" datatype=\"xsd:string\">A container\n",
+"      whose content is advisory information for the user but is not important\n",
+"      enough to justify an alert. Also see alert.</dd>\n",
+"    <dt id=\"tab\" about=\"#tab\" typeof=\"rdf:Property\">tab</dt>\n",
+"    <dd about=\"#tab\" property=\"rdfs:comment\" datatype=\"xsd:string\">A grouping\n",
+"      label providing a mechanism for selecting the tab content that is to be\n",
+"      rendered to the user.</dd>\n",
+"    <dt id=\"tablist\" about=\"#tablist\" typeof=\"rdf:Property\">tablist</dt>\n",
+"    <dd about=\"#tablist\" property=\"rdfs:comment\" datatype=\"xsd:string\">A list\n",
+"      of tab elements, which are references to tabpanel elements.</dd>\n",
+"    <dt id=\"tabpanel\" about=\"#tabpanel\" typeof=\"rdf:Property\">tabpanel</dt>\n",
+"    <dd about=\"#tabpanel\" property=\"rdfs:comment\" datatype=\"xsd:string\">A container\n",
+"      for the resources associated with a tab, where each tab is contained in\n",
+"      a tablist.</dd>\n",
+"    <dt id=\"textbox\" about=\"#textbox\" typeof=\"rdf:Property\">textbox</dt>\n",
+"    <dd about=\"#textbox\" property=\"rdfs:comment\" datatype=\"xsd:string\">Input\n",
+"      that allows free-form text as its value.</dd>\n",
+"    <dt id=\"timer\" about=\"#timer\" typeof=\"rdf:Property\">timer</dt>\n",
+"    <dd about=\"#timer\" property=\"rdfs:comment\" datatype=\"xsd:string\">A type of\n",
+"      live region containing a numerical counter which indicates an amount of\n",
+"      elapsed time from a start point, or the time remaining until an end point.</dd>\n",
+"    <dt id=\"toolbar\" about=\"#toolbar\" typeof=\"rdf:Property\">toolbar</dt>\n",
+"    <dd about=\"#toolbar\" property=\"rdfs:comment\" datatype=\"xsd:string\">A collection\n",
+"      of commonly used function buttons represented in compact visual form.</dd>\n",
+"    <dt id=\"tooltip\" about=\"#tooltip\" typeof=\"rdf:Property\">tooltip</dt>\n",
+"    <dd about=\"#tooltip\" property=\"rdfs:comment\" datatype=\"xsd:string\">A contextual\n",
+"      popup that displays a description for an element.</dd>\n",
+"    <dt id=\"tree\" about=\"#tree\" typeof=\"rdf:Property\">tree</dt>\n",
+"    <dd about=\"#tree\" property=\"rdfs:comment\" datatype=\"xsd:string\">A type of\n",
+"      list that may contain sub-level nested groups that can be collapsed and\n",
+"      expanded.</dd>\n",
+"    <dt id=\"treegrid\" about=\"#treegrid\" typeof=\"rdf:Property\">treegrid</dt>\n",
+"    <dd about=\"#treegrid\" property=\"rdfs:comment\" datatype=\"xsd:string\">A grid\n",
+"      whose rows can be expanded and collapsed in the same manner as for a tree.</dd>\n",
+"    <dt id=\"treeitem\" about=\"#treeitem\" typeof=\"rdf:Property\">treeitem</dt>\n",
+"    <dd about=\"#treeitem\" property=\"rdfs:comment\" datatype=\"xsd:string\">An option\n",
+"      item of a tree. This is an element within a tree that may be expanded or\n",
+"      collapsed if it contains a sub-level group of treeitems.</dd>\n",
+"  </dl>\n",
+"</div>\n",
+"\n",
+"<h2>Appendix A - References</h2>\n",
+"<dl>\n",
+"  <dt><a id=\"ref_ITS\" class=\"normref\">[ITS]</a></dt>\n",
+"    <dd>\"<cite><a href=\"http://www.w3.org/TR/2007/REC-its-20070403/\">The\n",
+"      Internationalization Tag Set (ITS) Version 1.0</a></cite>\", W3C\n",
+"      Recommendation, C. Lieske, F. Sasaki, 3 April 2007.<br />\n",
+"      Available at: http://www.w3.org/TR/2007/REC-its-20070403/</dd>\n",
+"  <dt><a id=\"ref_P3P\" class=\"normref\">[P3P]</a></dt>\n",
+"    <dd>\"<cite><a href=\"http://www.w3.org/TR/2002/REC-P3P-20020416/\">The\n",
+"      Platform for Privacy Preferences 1.0 (P3P1.0) Specification</a></cite>\",\n",
+"      W3C Recommendation, L. Cranor <i xml:lang=\"la\">et al.</i>, 16 April\n",
+"      2002.<br />\n",
+"      Available at: http://www.w3.org/TR/2002/REC-P3P-20020416/</dd>\n",
+"  <dt>[<a id=\"ref_XHTMLMOD\" class=\"normref\">XHTMLMOD</a>]</dt>\n",
+"    <dd><cite><a\n",
+"      href=\"http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008\">XHTML\n",
+"      Modularization 1.1</a></cite>, W3C Recommendation, Shane McCarron, <em>et\n",
+"      al.</em>, 8 October 2008<br />\n",
+"      http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008</dd>\n",
+"  <dt class=\"label\" id=\"ref_XHTMLRDFa\">[XHTMLRDFa]</dt>\n",
+"    <dd>\"<cite><a\n",
+"      href=\"http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014\">RDFa in XHTML:\n",
+"      Syntax and Processing</a></cite>\", W3C Recommendation, B. Adida, <em>et\n",
+"      al.</em>, 14 October 2008.<br />\n",
+"      http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014.</dd>\n",
+"  <dt class=\"label\" id=\"ref_XHTMLROLE\">[XHTMLROLE]</dt>\n",
+"    <dd>\"<cite><a href=\"http://www.w3.org/TR/2008/WD-xhtml-role-20080407\">XHTML\n",
+"      Role Attribute Module</a></cite>\", W3C Working Draft, M. Birbeck, et. al.\n",
+"      7 April 2008. http://www.w3.org/TR/2008/WD-xhtml-role-20080407<br />\n",
+"    </dd>\n",
+"</dl>\n",
+"<hr />\n",
+"<address>\n",
+"  <a href=\"http://www.cwi.nl/~steven/\">Steven Pemberton</a>, W3C HTML Activity\n",
+"  Lead \n",
+"</address>\n",
+"<address>\n",
+"  Last edited: <!--\044date=-->2010-01-27</address>\n",
+"</body>\n",
+"</html>\n",
+/* end of the content of the resource 'w3-1999-xhtml/vocab' */
+0 };
+
 static const char * cres_virtrdf_data_formats_ttl[] =
 { /* The content of the resource */
 "#  \n",
 "#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n",
 "#  project.\n",
 "#  \n",
-"#  Copyright (C) 1998-2009 OpenLink Software\n",
+"#  Copyright (C) 1998-2012 OpenLink Software\n",
 "#  \n",
 "#  This project is free software; you can redistribute it and/or modify it\n",
 "#  under the terms of the GNU General Public License as published by the\n",
@@ -4241,6 +4702,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "virtrdf:isSubclassOf virtrdf:loadAs virtrdf:jsoTriple .\n",
 "virtrdf:version virtrdf:loadAs virtrdf:jsoTriple .\n",
 "virtrdf:isSpecialPredicate virtrdf:loadAs virtrdf:jsoTriple .\n",
+"virtrdf:isGcResistantType virtrdf:loadAs virtrdf:jsoTriple .\n",
 "\n",
 "bif:contains virtrdf:isSpecialPredicate bif:contains .\n",
 "bif:xcontains virtrdf:isSpecialPredicate bif:xcontains .\n",
@@ -4248,9 +4710,12 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "bif:xquery_contains virtrdf:isSpecialPredicate bif:xquery_contains .\n",
 "bif:spatial_contains virtrdf:isSpecialPredicate bif:spatial_contains .\n",
 "\n",
+"virtrdf:QuadMapFormat virtrdf:isGcResistantType \"2\" .\n",
+"virtrdf:QuadStorage virtrdf:isGcResistantType \"2\" .\n",
+"\n",
 "# Don't forget to change version, both here and in DB.DBA.SPARQL_RELOAD_QM_GRAPH, to force reload.\n",
 "<http://www.openlinksw.com/sparql/virtrdf-data-formats.ttl>\n",
-"  virtrdf:version '2010-08-29 0001v6g' ;\n",
+"  virtrdf:version '2012-01-26 0002v6g' ;\n",
 "  virtrdf:item\n",
 "    rdfdf:default-iid ,				rdfdf:default-iid-nullable ,\n",
 "    rdfdf:default-iid-nonblank ,		rdfdf:default-iid-nonblank-nullable ,\n",
@@ -4259,6 +4724,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "    rdfdf:sql-varchar-dt ,			rdfdf:sql-varchar-dt-nullable ,\n",
 "    rdfdf:sql-varchar-lang ,			rdfdf:sql-varchar-lang-nullable ,\n",
 "    rdfdf:sql-varchar-uri ,			rdfdf:sql-varchar-uri-nullable ,\n",
+"    rdfdf:sql-varchar-literal ,			rdfdf:sql-varchar-literal-nullable ,\n",
 "    rdfdf:sql-longvarchar ,			rdfdf:sql-longvarchar-nullable ,\n",
 "    rdfdf:sql-longvarchar-dt ,			rdfdf:sql-longvarchar-dt-nullable ,\n",
 "    rdfdf:sql-longvarchar-lang ,		rdfdf:sql-longvarchar-lang-nullable ,\n",
@@ -4266,22 +4732,27 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "    rdfdf:sql-nvarchar-dt ,			rdfdf:sql-nvarchar-dt-nullable ,\n",
 "    rdfdf:sql-nvarchar-lang ,			rdfdf:sql-nvarchar-lang-nullable ,\n",
 "    rdfdf:sql-nvarchar-uri ,			rdfdf:sql-nvarchar-uri-nullable ,\n",
+"    rdfdf:sql-nvarchar-literal ,			rdfdf:sql-nvarchar-literal-nullable ,\n",
 "    rdfdf:sql-longnvarchar ,			rdfdf:sql-longnvarchar-nullable ,\n",
 "    rdfdf:sql-longnvarchar-dt ,			rdfdf:sql-longnvarchar-dt-nullable ,\n",
 "    rdfdf:sql-longnvarchar-lang ,		rdfdf:sql-longnvarchar-lang-nullable ,\n",
 "    rdfdf:sql-longvarbinary ,			rdfdf:sql-longvarbinary-nullable ,\n",
 "    rdfdf:sql-integer ,				rdfdf:sql-integer-nullable ,\n",
 "    rdfdf:sql-integer-uri ,			rdfdf:sql-integer-uri-nullable ,\n",
+"    rdfdf:sql-integer-literal ,			rdfdf:sql-integer-literal-nullable ,\n",
 "    rdfdf:sql-numeric ,				rdfdf:sql-numeric-nullable ,\n",
 "    rdfdf:sql-numeric-uri ,			rdfdf:sql-numeric-uri-nullable ,\n",
+"    rdfdf:sql-numeric-literal ,			rdfdf:sql-numeric-literal-nullable ,\n",
 "    rdfdf:sql-doubleprecision ,			rdfdf:sql-doubleprecision-nullable ,\n",
 "    rdfdf:sql-date ,				rdfdf:sql-date-nullable ,\n",
 "    rdfdf:sql-time ,				rdfdf:sql-time-nullable ,\n",
 "    rdfdf:sql-datetime ,			rdfdf:sql-datetime-nullable ,\n",
 "    rdfdf:multipart-uri ,			rdfdf:multipart-uri-nullable ,\n",
+"    rdfdf:multipart-literal ,			rdfdf:multipart-literal-nullable ,\n",
 "    rdfdf:multipart-uri-fn-nullable ,\n",
 "    rdfdf:multipart-literal-fn-nullable ,\n",
 "    rdfdf:zeropart-uri ,			rdfdf:zeropart-uri-nullable ,\n",
+"    rdfdf:zeropart-literal ,			rdfdf:zeropart-literal-nullable ,\n",
 "    rdfdf:zeropart-uri-fn-nullable ,\n",
 "    rdfdf:zeropart-literal-fn-nullable ,\n",
 "    rdfdf:sql-varchar-uri-fn ,			rdfdf:sql-varchar-uri-fn-nullable ,\n",
@@ -4309,7 +4780,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __id2i (^{alias-dot}^^{column}^)\";			# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" (^{tree}^ < min_bnode_iri_id ())\";			# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" (^{tree}^ >= min_bnode_iri_id ())\";			# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
@@ -4489,7 +4960,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (^{tree}^)\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -4555,7 +5027,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, __i2idn (^{tree-1}^), null)\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree-0}^\";					# STRING REQUIRED ... SQL value from short\n",
@@ -4619,7 +5091,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, null, ^{tree-1}^)\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree-0}^\";					# STRING REQUIRED ... SQL value from short\n",
@@ -4783,7 +5256,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (^{tree}^)\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";					# STRING REQUIRED ... SQL value from short\n",
@@ -4849,7 +5323,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, __i2idn (^{tree-1}^), null)\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree-0}^\";					# STRING REQUIRED ... SQL value from short\n",
@@ -4913,7 +5387,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, null, ^{tree-1}^)\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree-0}^\";					# STRING REQUIRED ... SQL value from short\n",
@@ -5072,23 +5546,24 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfShortTmpl \" ^{alias-dot}^^{column}^\";				# STRING REQUIRED \"short\" value template, can be NULL\n",
 "  virtrdf:qmfLongTmpl \" ^{alias-dot}^^{column}^\";				# STRING REQUIRED \"long\" value template, can be NULL\n",
 "  virtrdf:qmfSqlvalTmpl \" cast (^{alias-dot}^^{column}^ as varbinary)\";		# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
-"  virtrdf:qmfBoolTmpl \" 1\";							# STRING REQUIRED Boolean value template, can be NULL\n",
+"  virtrdf:qmfBoolTmpl \" isnotnull (^{tree}^)\";					# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";					# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" cast (^{tree}^ as varbinary)\";			# STRING REQUIRED ... SQL value from short\n",
 "  virtrdf:qmfDatatypeOfShortTmpl \" 'http://www.w3.org/2001/XMLSchema#octetStream'\";  # STRING REQUIRED ... datatype IRI STRING from short\n",
 "  virtrdf:qmfLanguageOfShortTmpl \" NULL\";					# STRING REQUIRED ... language ID STRING from short\n",
-"  virtrdf:qmfBoolOfShortTmpl \" 1\";						# STRING REQUIRED ... boolean value from short\n",
+"  virtrdf:qmfBoolOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... boolean value from short\n",
 "  virtrdf:qmfIidOfShortTmpl \" NULL\";\n",
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#octetStream' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#octetStream' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" (case (__tag (^{sqlval-of-tree}^)) when 131 then (^{sqlval-of-tree}^) else NULL end)\";	# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" (case (__tag (^{tree}^)) when 131 then (^{tree}^) else NULL end)\";	# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5137,10 +5612,11 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __spfi (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
-"  virtrdf:qmfIsuriOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" __i2id (__spfi (^{custom-string-1}^, ^{tree}^))\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" __spfi (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL value from short\n",
@@ -5200,6 +5676,78 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  rdf:type virtrdf:array-of-QuadMapFormat\n",
 ".\n",
 "\n",
+"rdfdf:sql-varchar-literal\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:qmfName \"sql-varchar-literal\";\n",
+"  virtrdf:qmfShortTmpl \" ^{alias-dot}^^{column}^\";				# STRING REQUIRED \"short\" value template, can be NULL\n",
+"  virtrdf:qmfLongTmpl \" __spf (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";	# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spf (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
+"# Templates of booleans that tell whether the short is of some sort:\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
+"# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spf (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spf (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfDatatypeOfShortTmpl \" 'http://www.w3.org/2001/XMLSchema#anyURI'\";# STRING REQUIRED ... datatype IRI STRING from short\n",
+"  virtrdf:qmfLanguageOfShortTmpl \" NULL\";					# STRING REQUIRED ... language ID STRING from short\n",
+"  virtrdf:qmfBoolOfShortTmpl \" NULL\";						# STRING REQUIRED ... boolean value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfi (^{custom-string-1}^, ^{tree}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfi (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spf (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"# Templates of expressions that make short values from other representations\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" NULL\";					# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfSqlvalTmpl \" __spfinv (^{sqlval-of-tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[0]\";	# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
+"  virtrdf:qmfShortOfLongTmpl \" __spfinv (__id2i (^{tree}^), ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[0]\";	# STRING REQUIRED ... makes short by long\n",
+"  virtrdf:qmfShortOfUriTmpl \" __spfinv (^{tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[0]\";	# STRING REQUIRED ... makes short by uri\n",
+"# Misc\n",
+"  virtrdf:qmfIsBijection 1;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal\n",
+"  virtrdf:qmfIsStable 1;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order\n",
+"  virtrdf:qmfCmpFuncName \"DB.DBA.RDF_OBJ_CMP\";					# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type\n",
+"  virtrdf:qmfTypeminTmpl \" ''\";							# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg\n",
+"  virtrdf:qmfTypemaxTmpl \" '\\\\xFF\\\\xFF\\\\xFF\\\\xFF\\\\xFF\\\\xFF'\";			# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg\n",
+"# Metadata about values that can be stored in this field\n",
+"  virtrdf:qmfColumnCount 1;							# Number of columns of the oroginal data (usually 1, zero if variable and not yet set)\n",
+"  virtrdf:qmfOkForAnySqlvalue 0;						# BOOLEAN REQUIRED Nonzero if the field format can store any possible SQL value (even if the field itself can not)\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_NOT_NULL, virtrdf:SPART_VARR_IS_LIT;\n",
+"#  virtrdf:qmfValRange-rvrDatatype \"http://www.w3.org/2001/XMLSchema#anyURI\";	# STRING OPTIONAL Datatype of stored values, if fixed\n",
+"  virtrdf:qmfValRange-rvrLanguage \"NULL\";					# STRING OPTIONAL Language, if fixed\n",
+"#  virtrdf:qmfFixedValue \"\";							# ANY OPTIONAL Value of stored values, if fixed\n",
+"  virtrdf:qmfCustomString1 \"%s\";\n",
+"  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-varchar-literal-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-varchar-literal-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat;\n",
+"  rdf:_1 rdfdf:sql-varchar-literal-nullable\n",
+".\n",
+"\n",
+"rdfdf:sql-varchar-literal-nullable\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-varchar-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfLongTmpl \" __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";	# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";				# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfin (^{custom-string-1}^, ^{tree}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfin (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfName \"sql-varchar-literal-nullable\";\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-varchar-literal-nullable-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-varchar-literal-nullable-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat\n",
+".\n",
+"\n",
 "rdfdf:sql-nvarchar-uri\n",
 "  rdf:type virtrdf:QuadMapFormat;\n",
 "  virtrdf:inheritFrom rdfdf:sql-varchar-uri;\n",
@@ -5223,6 +5771,29 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  rdf:type virtrdf:array-of-QuadMapFormat\n",
 ".\n",
 "\n",
+"rdfdf:sql-nvarchar-literal\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-varchar-literal;\n",
+"  virtrdf:qmfName \"sql-nvarchar-literal\";\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-nvarchar-literal-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-nvarchar-literal-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat;\n",
+"  rdf:_1 rdfdf:sql-nvarchar-literal-nullable\n",
+".\n",
+"\n",
+"rdfdf:sql-nvarchar-literal-nullable\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-varchar-literal-nullable;\n",
+"  virtrdf:qmfName \"sql-nvarchar-literal-nullable\";\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-nvarchar-literal-nullable-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-nvarchar-literal-nullable-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat\n",
+".\n",
+"\n",
 "rdfdf:sql-integer\n",
 "  rdf:type virtrdf:QuadMapFormat;\n",
 "  virtrdf:qmfName \"sql-integer\";\n",
@@ -5234,7 +5805,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5245,7 +5816,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#integer' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#integer' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" ^{sqlval-of-tree}^\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" ^{tree}^\";					# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5334,6 +5905,49 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  rdf:type virtrdf:array-of-QuadMapFormat\n",
 ".\n",
 "\n",
+"rdfdf:sql-integer-literal\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-varchar-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfName \"sql-integer-literal\";\n",
+"  virtrdf:qmfCmpFuncName \"DB.DBA.RDF_OBJ_CMP\";					# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type\n",
+"  virtrdf:qmfTypeminTmpl \" -2147483648\";					# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg\n",
+"  virtrdf:qmfTypemaxTmpl \" 2147483647\";						# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg\n",
+"  virtrdf:qmfIsBijection 1;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal\n",
+"  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_NOT_NULL, virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfCustomString1 \"local://%d\";\n",
+"  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-integer-literal-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-integer-literal-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat;\n",
+"  rdf:_1 rdfdf:sql-integer-literal-nullable\n",
+".\n",
+"\n",
+"rdfdf:sql-integer-literal-nullable\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-integer-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfName \"sql-integer-literal-nullable\";\n",
+"  virtrdf:qmfLongTmpl \" __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";	# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";				# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfin (^{custom-string-1}^, ^{tree}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfin (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-integer-literal-nullable-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-integer-literal-nullable-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat\n",
+".\n",
+"\n",
 "rdfdf:sql-doubleprecision\n",
 "  rdf:type virtrdf:QuadMapFormat;\n",
 "  virtrdf:qmfName \"sql-doubleprecision\";\n",
@@ -5345,7 +5959,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5356,7 +5971,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#double' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#double' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" ^{sqlval-of-tree}^\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" ^{tree}^\";					# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5412,7 +6027,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5423,7 +6039,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#numeric' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#numeric' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" ^{sqlval-of-tree}^\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" ^{tree}^\";					# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5512,6 +6128,49 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  rdf:type virtrdf:array-of-QuadMapFormat\n",
 ".\n",
 "\n",
+"rdfdf:sql-numeric-literal\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-varchar-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfName \"sql-numeric-literal\";\n",
+"  virtrdf:qmfCmpFuncName \"DB.DBA.RDF_OBJ_CMP\";					# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type\n",
+"  virtrdf:qmfTypeminTmpl \" -99999999999999999999999999999999999999999999999999\";	# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg\n",
+"  virtrdf:qmfTypemaxTmpl \" 99999999999999999999999999999999999999999999999999\";		# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg\n",
+"  virtrdf:qmfIsBijection 1;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal\n",
+"  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_NOT_NULL, virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfCustomString1 \"local://%f\";\n",
+"  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-numeric-literal-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-numeric-literal-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat;\n",
+"  rdf:_1 rdfdf:sql-numeric-literal-nullable\n",
+".\n",
+"\n",
+"rdfdf:sql-numeric-literal-nullable\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:sql-numeric-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfName \"sql-numeric-literal-nullable\";\n",
+"  virtrdf:qmfLongTmpl \" __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";	# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)\";		# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfin (^{custom-string-1}^, ^{tree}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfin (^{custom-string-1}^, ^{tree}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{tree}^)\";	# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"  virtrdf:qmfSuperFormats rdfdf:sql-numeric-literal-nullable-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:sql-numeric-literal-nullable-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat\n",
+".\n",
+"\n",
 "rdfdf:sql-date\n",
 "  rdf:type virtrdf:QuadMapFormat;\n",
 "  virtrdf:qmfName \"sql-date\";\n",
@@ -5523,7 +6182,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5534,7 +6194,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#date' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#date' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" ^{sqlval-of-tree}^\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" ^{tree}^\";					# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5594,7 +6254,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5605,7 +6266,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#time' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#time' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" ^{sqlval-of-tree}^\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" ^{tree}^\";					# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5662,7 +6323,8 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{tree}^\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5673,7 +6335,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfUriOfShortTmpl \" NULL\";						# STRING REQUIRED ... URI STRING from short\n",
 "  virtrdf:qmfStrsqlvalOfShortTmpl \" cast (^{tree}^ as varchar)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
 "# Templates of expressions that make short values from other representations\n",
-"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#datetime' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \" (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#datetime' then ^{sqlval-of-tree}^ else NULL end)\";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
 "  virtrdf:qmfShortOfSqlvalTmpl \" ^{sqlval-of-tree}^\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
 "  virtrdf:qmfShortOfLongTmpl \" ^{tree}^\";					# STRING REQUIRED ... makes short by long\n",
 "  virtrdf:qmfShortOfUriTmpl \" NULL\";						# STRING REQUIRED ... makes short by uri\n",
@@ -5726,10 +6388,11 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
-"  virtrdf:qmfIsuriOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" __i2id (__spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^))\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" __spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5790,6 +6453,79 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  rdf:type virtrdf:array-of-QuadMapFormat\n",
 ".\n",
 "\n",
+"rdfdf:multipart-literal\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:qmfName \"multipart-literal\";\n",
+"  virtrdf:qmfShortTmpl \"^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{as-name-N}^^{end}^\";	# STRING REQUIRED \"short\" value template, can be NULL\n",
+"  virtrdf:qmfLongTmpl \" __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)\";	# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
+"# Templates of booleans that tell whether the short is of some sort:\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
+"# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";	# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";		# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfDatatypeOfShortTmpl \" 'http://www.w3.org/2001/XMLSchema#anyURI'\";# STRING REQUIRED ... datatype IRI STRING from short\n",
+"  virtrdf:qmfLanguageOfShortTmpl \" NULL\";					# STRING REQUIRED ... language ID STRING from short\n",
+"  virtrdf:qmfBoolOfShortTmpl \" NULL\";						# STRING REQUIRED ... boolean value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";	# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"# Templates of expressions that make short values from other representations\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl	\"^{comma-list-begin}^ __spfinv (^{tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^\";					# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfSqlvalTmpl		\"^{comma-list-begin}^ __spfinv (^{sqlval-of-tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^\";	# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
+"  virtrdf:qmfShortOfLongTmpl		\"^{comma-list-begin}^ __spfinv (__id2in (^{tree}^), ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^\";	# STRING REQUIRED ... makes short by long\n",
+"  virtrdf:qmfShortOfUriTmpl		\"^{comma-list-begin}^ __spfinv (^{tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^\";	# STRING REQUIRED ... makes short by uri\n",
+"#wrong:  virtrdf:qmfShortOfNiceSqlvalTmpl \"^{comma-list-begin}^ ^{N-aref-of-spfinv}^^{as-name-N}^^{end}^\";	# ... works like qmfShortOfSqlvalTmpl for values of one selected data type, not suitable for other types\n",
+"#wrong:  virtrdf:qmfDtpOfNiceSqlval 217;						# The 'nice' DTP that is an acceptable type of qmfShortOfNiceSqlvalTmpl, zero or unset if no nice type\n",
+"# Misc\n",
+"  virtrdf:qmfIsBijection 0;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal\n",
+"  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order\n",
+"  virtrdf:qmfCmpFuncName \"DB.DBA.RDF_VECTOR_CMP\";				# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type\n",
+"  virtrdf:qmfTypeminTmpl \" NULL\";						# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg\n",
+"  virtrdf:qmfTypemaxTmpl \" NULL\";						# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg\n",
+"# Metadata about values that can be stored in this field\n",
+"  virtrdf:qmfColumnCount 0;							# Number of columns of the oroginal data (usually 1, zero if variable and not yet set)\n",
+"  virtrdf:qmfOkForAnySqlvalue 0;						# BOOLEAN REQUIRED Nonzero if the field format can store any possible SQL value (even if the field itself can not)\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT, virtrdf:SPART_VARR_NOT_NULL;\n",
+"#  virtrdf:qmfValRange-rvrDatatype \"\";						# STRING OPTIONAL Datatype of stored values, if fixed\n",
+"#  virtrdf:qmfValRange-rvrLanguage \"x-any\";					# STRING OPTIONAL Language, if fixed\n",
+"#  virtrdf:qmfFixedValue \"\";							# ANY OPTIONAL Value of stored values, if fixed\n",
+"  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id\n",
+"  virtrdf:qmfSuperFormats rdfdf:multipart-literal-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:multipart-literal-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat;\n",
+"  rdf:_1 rdfdf:multipart-literal-nullable\n",
+".\n",
+"\n",
+"rdfdf:multipart-literal-nullable\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:multipart-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfName \"multipart-literal-nullable\";\n",
+"  virtrdf:qmfLongTmpl \" __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)\";	# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";	# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";		# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfin (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfin (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)\";	# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"  virtrdf:qmfSuperFormats rdfdf:multipart-literal-nullable-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:multipart-literal-nullable-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat\n",
+".\n",
+"\n",
 "rdfdf:multipart-uri-fn-nullable\n",
 "  rdf:type virtrdf:QuadMapFormat;\n",
 "  virtrdf:qmfName \"multipart-uri-fn-nullable\";\n",
@@ -5798,10 +6534,11 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __bft (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^), 1)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
-"  virtrdf:qmfIsuriOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" __i2id (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^))\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" __bft (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^), 1)\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5849,7 +6586,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_LONG_OF_SQLVAL (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^))\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^)\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5894,10 +6631,11 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __spfi (^{custom-string-1}^)\";			# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
-"  virtrdf:qmfIsuriOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" __i2id (__spfi (^{custom-string-1}^))\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" __spfi (^{custom-string-1}^)\";		# STRING REQUIRED ... SQL value from short\n",
@@ -5956,6 +6694,77 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  rdf:type virtrdf:array-of-QuadMapFormat\n",
 ".\n",
 "\n",
+"rdfdf:zeropart-literal\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:qmfName \"zeropart-literal\";\n",
+"  virtrdf:qmfShortTmpl \"1 /*zeropart*/\";					# STRING REQUIRED \"short\" value template, can be NULL\n",
+"  virtrdf:qmfLongTmpl \" __spf (^{custom-string-1}^)\";		# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spf (^{custom-string-1}^)\";			# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
+"# Templates of booleans that tell whether the short is of some sort:\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
+"# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spf (^{custom-string-1}^)\";	# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spf (^{custom-string-1}^)\";		# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfDatatypeOfShortTmpl \" 'http://www.w3.org/2001/XMLSchema#anyURI'\";	# STRING REQUIRED ... datatype IRI STRING from short\n",
+"  virtrdf:qmfLanguageOfShortTmpl \" NULL\";					# STRING REQUIRED ... language ID STRING from short\n",
+"  virtrdf:qmfBoolOfShortTmpl \" NULL\";						# STRING REQUIRED ... boolean value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfi (^{custom-string-1}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfi (^{custom-string-1}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spf (^{custom-string-1}^)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"# Templates of expressions that make short values from other representations\n",
+"  virtrdf:qmfShortOfTypedsqlvalTmpl \"1 /*zeropart*/\";				# STRING REQUIRED ... makes short by SQL value with specified type and/or language\n",
+"  virtrdf:qmfShortOfSqlvalTmpl \"1 /*zeropart*/\";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type\n",
+"  virtrdf:qmfShortOfLongTmpl \"1 /*zeropart*/\";					# STRING REQUIRED ... makes short by long\n",
+"  virtrdf:qmfShortOfUriTmpl \"1 /*zeropart*/\";					# STRING REQUIRED ... makes short by uri\n",
+"# Misc\n",
+"  virtrdf:qmfIsBijection 0;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal\n",
+"  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order\n",
+"  virtrdf:qmfCmpFuncName \"DB.DBA.RDF_VECTOR_CMP\";				# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type\n",
+"  virtrdf:qmfTypeminTmpl \" NULL\";						# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg\n",
+"  virtrdf:qmfTypemaxTmpl \" NULL\";						# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg\n",
+"# Metadata about values that can be stored in this field\n",
+"  virtrdf:qmfColumnCount 0;							# Number of columns of the oroginal data (usually 1, zero if variable and not yet set)\n",
+"  virtrdf:qmfOkForAnySqlvalue 0;						# BOOLEAN REQUIRED Nonzero if the field format can store any possible SQL value (even if the field itself can not)\n",
+"  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT, virtrdf:SPART_VARR_NOT_NULL;\n",
+"#  virtrdf:qmfValRange-rvrDatatype \"\";						# STRING OPTIONAL Datatype of stored values, if fixed\n",
+"#  virtrdf:qmfValRange-rvrLanguage \"x-any\";					# STRING OPTIONAL Language, if fixed\n",
+"#  virtrdf:qmfFixedValue \"\";							# ANY OPTIONAL Value of stored values, if fixed\n",
+"  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id\n",
+"  virtrdf:qmfSuperFormats rdfdf:zeropart-literal-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:zeropart-literal-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat;\n",
+"  rdf:_1 rdfdf:zeropart-literal-nullable\n",
+".\n",
+"\n",
+"rdfdf:zeropart-literal-nullable\n",
+"  rdf:type virtrdf:QuadMapFormat;\n",
+"  virtrdf:inheritFrom rdfdf:zeropart-literal;\n",
+"  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;\n",
+"  virtrdf:qmfValRange-rvrRestrictions							# BITMASK OPTIONAL Natural restrictions on values stored at the field\n",
+"    virtrdf:SPART_VARR_IS_LIT;\n",
+"  virtrdf:qmfName \"zeropart-literal-nullable\";\n",
+"  virtrdf:qmfLongTmpl \" __spfn (^{custom-string-1}^)\";		# STRING REQUIRED \"long\" value template, can be NULL\n",
+"  virtrdf:qmfSqlvalTmpl \" __spfn (^{custom-string-1}^)\";			# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
+"  virtrdf:qmfLongOfShortTmpl \" __spfn (^{custom-string-1}^)\";	# STRING REQUIRED ... long from short\n",
+"  virtrdf:qmfSqlvalOfShortTmpl \" __spfn (^{custom-string-1}^)\";		# STRING REQUIRED ... SQL value from short\n",
+"  virtrdf:qmfIidOfShortTmpl \" __i2id (__spfin (^{custom-string-1}^))\";\n",
+"  virtrdf:qmfUriOfShortTmpl \" __spfin (^{custom-string-1}^)\";		# STRING REQUIRED ... URI STRING from short\n",
+"  virtrdf:qmfStrsqlvalOfShortTmpl \" __spfn (^{custom-string-1}^)\";		# STRING REQUIRED ... SQL representation of the STRING value of short\n",
+"  virtrdf:qmfSuperFormats rdfdf:zeropart-literal-nullable-SuperFormats\n",
+".\n",
+"\n",
+"rdfdf:zeropart-literal-nullable-SuperFormats\n",
+"  rdf:type virtrdf:array-of-QuadMapFormat\n",
+".\n",
+"\n",
 "rdfdf:zeropart-uri-fn-nullable\n",
 "  rdf:type virtrdf:QuadMapFormat;\n",
 "  virtrdf:qmfName \"zeropart-uri-fn-nullable\";\n",
@@ -5964,10 +6773,11 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __bft (^{custom-verbatim-1}^ (), 1)\";				# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
-"  virtrdf:qmfIsuriOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" __i2id (^{custom-verbatim-1}^ ())\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" __bft (^{custom-verbatim-1}^ (), 1)\";		# STRING REQUIRED ... SQL value from short\n",
@@ -6015,7 +6825,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";							# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";							# STRING REQUIRED ... whether the short is literal\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";							# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";							# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";					# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_LONG_OF_SQLVAL (^{custom-verbatim-1}^ ())\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{custom-verbatim-1}^ ()\";				# STRING REQUIRED ... SQL value from short\n",
@@ -6060,10 +6870,11 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfSqlvalTmpl \" __bft (^{custom-verbatim-1}^ (^{alias-dot}^^{column}^), 1)\";	# STRING REQUIRED \"sqlval\" value template, can be NULL\n",
 "  virtrdf:qmfBoolTmpl \" NULL\";							# STRING REQUIRED Boolean value template, can be NULL\n",
 "# Templates of booleans that tell whether the short is of some sort:\n",
-"  virtrdf:qmfIsrefOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is ref\n",
-"  virtrdf:qmfIsuriOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is uri\n",
+"  virtrdf:qmfIsrefOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is ref\n",
+"  virtrdf:qmfIsuriOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
 "  virtrdf:qmfIslitOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIsnumericOfShortTmpl \" 0\";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" __i2id (^{custom-verbatim-1}^ (^{tree}^))\";	# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" __bft (^{custom-verbatim-1}^ (^{tree}^), 1)\";		# STRING REQUIRED ... SQL value from short\n",
@@ -6222,7 +7033,7 @@ static const char * cres_virtrdf_data_formats_ttl[] =
 "  virtrdf:qmfIsrefOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is ref\n",
 "  virtrdf:qmfIsuriOfShortTmpl \" 0\";						# STRING REQUIRED ... whether the short is uri\n",
 "  virtrdf:qmfIsblankOfShortTmpl \" 0\";					# STRING REQUIRED ... whether the short is blank node ref\n",
-"  virtrdf:qmfIslitOfShortTmpl \" 1\";						# STRING REQUIRED ... whether the short is literal\n",
+"  virtrdf:qmfIslitOfShortTmpl \" isnotnull (^{tree}^)\";				# STRING REQUIRED ... whether the short is literal\n",
 "# Templates that convert short value into other types (can be applied to both field and not field expression)\n",
 "  virtrdf:qmfLongOfShortTmpl \" DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (^{custom-verbatim-1}^ (^{tree}^))\";		# STRING REQUIRED ... long from short\n",
 "  virtrdf:qmfSqlvalOfShortTmpl \" ^{custom-verbatim-1}^ (^{tree}^)\";	# STRING REQUIRED ... SQL value from short\n",
@@ -6802,5 +7613,6 @@ CACHE_RESOURCE (cres_xhtml1_frameset_dtd, "http://www.w3.org/TR/xhtml1/DTD/xhtml
 CACHE_RESOURCE (cres_xhtml1_strict_dtd, "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd", "-//W3C//DTD XHTML 1.0 Strict//ENxhtml1-strict.dtd", "2002-08-01 18:37", "Extensibe HTML version 1.0 Strict DTD");
 CACHE_RESOURCE (cres_xhtml1_transitional_dtd, "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", "-//W3C//DTD XHTML 1.0 Transitional//ENxhtml1-transitional.dtd", "2002-08-01 18:37", "Extensibe HTML version 1.0 Transitional DTD");
 CACHE_RESOURCE (cres_rdf_schema, "http://www.w3.org/2000/01/rdf-schema", "<owl:Onthology rdf:about=\"http://www.w3.org/2000/01/rdf-schema#\"/>rdf-schema", "2004-02-10 20:54", "An RDF description of the RDF and RDFS vocalulary");
+CACHE_RESOURCE (cres_vocab, "http://www.w3.org/1999/xhtml/vocab", "vocab", "2010-01-27 20:54", "XHTML Vocabulary");
 CACHE_RESOURCE (cres_virtrdf_data_formats_ttl, "http://www.openlinksw.com/sparql/virtrdf-data-formats.ttl", "virtrdf-data-formats.ttl", "2006-09-11 01:25", "Quad Map memtadata for generic formats of relational-to-RDF data mapping");
 }
diff --git a/binsrc/cached_resources/openlinksw-sparql/virtrdf-data-formats.ttl b/binsrc/cached_resources/openlinksw-sparql/virtrdf-data-formats.ttl
index 711b18a..483d5bb 100644
--- a/binsrc/cached_resources/openlinksw-sparql/virtrdf-data-formats.ttl
+++ b/binsrc/cached_resources/openlinksw-sparql/virtrdf-data-formats.ttl
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -32,6 +32,7 @@ virtrdf:loadAs virtrdf:item virtrdf:jsoTriple .
 virtrdf:isSubclassOf virtrdf:loadAs virtrdf:jsoTriple .
 virtrdf:version virtrdf:loadAs virtrdf:jsoTriple .
 virtrdf:isSpecialPredicate virtrdf:loadAs virtrdf:jsoTriple .
+virtrdf:isGcResistantType virtrdf:loadAs virtrdf:jsoTriple .
 
 bif:contains virtrdf:isSpecialPredicate bif:contains .
 bif:xcontains virtrdf:isSpecialPredicate bif:xcontains .
@@ -39,9 +40,12 @@ bif:xpath_contains virtrdf:isSpecialPredicate bif:xpath_contains .
 bif:xquery_contains virtrdf:isSpecialPredicate bif:xquery_contains .
 bif:spatial_contains virtrdf:isSpecialPredicate bif:spatial_contains .
 
+virtrdf:QuadMapFormat virtrdf:isGcResistantType "2" .
+virtrdf:QuadStorage virtrdf:isGcResistantType "2" .
+
 # Don't forget to change version, both here and in DB.DBA.SPARQL_RELOAD_QM_GRAPH, to force reload.
 <http://www.openlinksw.com/sparql/virtrdf-data-formats.ttl>
-  virtrdf:version '2010-08-29 0001v6g' ;
+  virtrdf:version '2012-01-26 0002v6g' ;
   virtrdf:item
     rdfdf:default-iid ,				rdfdf:default-iid-nullable ,
     rdfdf:default-iid-nonblank ,		rdfdf:default-iid-nonblank-nullable ,
@@ -50,6 +54,7 @@ bif:spatial_contains virtrdf:isSpecialPredicate bif:spatial_contains .
     rdfdf:sql-varchar-dt ,			rdfdf:sql-varchar-dt-nullable ,
     rdfdf:sql-varchar-lang ,			rdfdf:sql-varchar-lang-nullable ,
     rdfdf:sql-varchar-uri ,			rdfdf:sql-varchar-uri-nullable ,
+    rdfdf:sql-varchar-literal ,			rdfdf:sql-varchar-literal-nullable ,
     rdfdf:sql-longvarchar ,			rdfdf:sql-longvarchar-nullable ,
     rdfdf:sql-longvarchar-dt ,			rdfdf:sql-longvarchar-dt-nullable ,
     rdfdf:sql-longvarchar-lang ,		rdfdf:sql-longvarchar-lang-nullable ,
@@ -57,22 +62,27 @@ bif:spatial_contains virtrdf:isSpecialPredicate bif:spatial_contains .
     rdfdf:sql-nvarchar-dt ,			rdfdf:sql-nvarchar-dt-nullable ,
     rdfdf:sql-nvarchar-lang ,			rdfdf:sql-nvarchar-lang-nullable ,
     rdfdf:sql-nvarchar-uri ,			rdfdf:sql-nvarchar-uri-nullable ,
+    rdfdf:sql-nvarchar-literal ,			rdfdf:sql-nvarchar-literal-nullable ,
     rdfdf:sql-longnvarchar ,			rdfdf:sql-longnvarchar-nullable ,
     rdfdf:sql-longnvarchar-dt ,			rdfdf:sql-longnvarchar-dt-nullable ,
     rdfdf:sql-longnvarchar-lang ,		rdfdf:sql-longnvarchar-lang-nullable ,
     rdfdf:sql-longvarbinary ,			rdfdf:sql-longvarbinary-nullable ,
     rdfdf:sql-integer ,				rdfdf:sql-integer-nullable ,
     rdfdf:sql-integer-uri ,			rdfdf:sql-integer-uri-nullable ,
+    rdfdf:sql-integer-literal ,			rdfdf:sql-integer-literal-nullable ,
     rdfdf:sql-numeric ,				rdfdf:sql-numeric-nullable ,
     rdfdf:sql-numeric-uri ,			rdfdf:sql-numeric-uri-nullable ,
+    rdfdf:sql-numeric-literal ,			rdfdf:sql-numeric-literal-nullable ,
     rdfdf:sql-doubleprecision ,			rdfdf:sql-doubleprecision-nullable ,
     rdfdf:sql-date ,				rdfdf:sql-date-nullable ,
     rdfdf:sql-time ,				rdfdf:sql-time-nullable ,
     rdfdf:sql-datetime ,			rdfdf:sql-datetime-nullable ,
     rdfdf:multipart-uri ,			rdfdf:multipart-uri-nullable ,
+    rdfdf:multipart-literal ,			rdfdf:multipart-literal-nullable ,
     rdfdf:multipart-uri-fn-nullable ,
     rdfdf:multipart-literal-fn-nullable ,
     rdfdf:zeropart-uri ,			rdfdf:zeropart-uri-nullable ,
+    rdfdf:zeropart-literal ,			rdfdf:zeropart-literal-nullable ,
     rdfdf:zeropart-uri-fn-nullable ,
     rdfdf:zeropart-literal-fn-nullable ,
     rdfdf:sql-varchar-uri-fn ,			rdfdf:sql-varchar-uri-fn-nullable ,
@@ -100,7 +110,7 @@ rdfdf:default-iid
   virtrdf:qmfSqlvalTmpl " __id2i (^{alias-dot}^^{column}^)";			# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " (^{tree}^ < min_bnode_iri_id ())";			# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " (^{tree}^ >= min_bnode_iri_id ())";			# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
@@ -280,7 +290,8 @@ rdfdf:sql-varchar
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (^{tree}^)";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -346,7 +357,7 @@ rdfdf:sql-varchar-dt
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, __i2idn (^{tree-1}^), null)";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree-0}^";					# STRING REQUIRED ... SQL value from short
@@ -410,7 +421,8 @@ rdfdf:sql-varchar-lang
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, null, ^{tree-1}^)";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree-0}^";					# STRING REQUIRED ... SQL value from short
@@ -574,7 +586,8 @@ rdfdf:sql-nvarchar
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (^{tree}^)";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";					# STRING REQUIRED ... SQL value from short
@@ -640,7 +653,7 @@ rdfdf:sql-nvarchar-dt
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, __i2idn (^{tree-1}^), null)";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree-0}^";					# STRING REQUIRED ... SQL value from short
@@ -704,7 +717,7 @@ rdfdf:sql-nvarchar-lang
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (^{tree-0}^, null, ^{tree-1}^)";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree-0}^";					# STRING REQUIRED ... SQL value from short
@@ -863,23 +876,24 @@ rdfdf:sql-longvarbinary
   virtrdf:qmfShortTmpl " ^{alias-dot}^^{column}^";				# STRING REQUIRED "short" value template, can be NULL
   virtrdf:qmfLongTmpl " ^{alias-dot}^^{column}^";				# STRING REQUIRED "long" value template, can be NULL
   virtrdf:qmfSqlvalTmpl " cast (^{alias-dot}^^{column}^ as varbinary)";		# STRING REQUIRED "sqlval" value template, can be NULL
-  virtrdf:qmfBoolTmpl " 1";							# STRING REQUIRED Boolean value template, can be NULL
+  virtrdf:qmfBoolTmpl " isnotnull (^{tree}^)";					# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";					# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " cast (^{tree}^ as varbinary)";			# STRING REQUIRED ... SQL value from short
   virtrdf:qmfDatatypeOfShortTmpl " 'http://www.w3.org/2001/XMLSchema#octetStream'";  # STRING REQUIRED ... datatype IRI STRING from short
   virtrdf:qmfLanguageOfShortTmpl " NULL";					# STRING REQUIRED ... language ID STRING from short
-  virtrdf:qmfBoolOfShortTmpl " 1";						# STRING REQUIRED ... boolean value from short
+  virtrdf:qmfBoolOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... boolean value from short
   virtrdf:qmfIidOfShortTmpl " NULL";
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#octetStream' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#octetStream' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " (case (__tag (^{sqlval-of-tree}^)) when 131 then (^{sqlval-of-tree}^) else NULL end)";	# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " (case (__tag (^{tree}^)) when 131 then (^{tree}^) else NULL end)";	# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -928,10 +942,11 @@ rdfdf:sql-varchar-uri
   virtrdf:qmfSqlvalTmpl " __spfi (^{custom-string-1}^, ^{alias-dot}^^{column}^)";	# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
-  virtrdf:qmfIsuriOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " __i2id (__spfi (^{custom-string-1}^, ^{tree}^))";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " __spfi (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL value from short
@@ -991,6 +1006,78 @@ rdfdf:sql-varchar-uri-nullable-SuperFormats
   rdf:type virtrdf:array-of-QuadMapFormat
 .
 
+rdfdf:sql-varchar-literal
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:qmfName "sql-varchar-literal";
+  virtrdf:qmfShortTmpl " ^{alias-dot}^^{column}^";				# STRING REQUIRED "short" value template, can be NULL
+  virtrdf:qmfLongTmpl " __spf (^{custom-string-1}^, ^{alias-dot}^^{column}^)";	# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spf (^{custom-string-1}^, ^{alias-dot}^^{column}^)";	# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
+# Templates of booleans that tell whether the short is of some sort:
+  virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
+# Templates that convert short value into other types (can be applied to both field and not field expression)
+  virtrdf:qmfLongOfShortTmpl " __spf (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spf (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfDatatypeOfShortTmpl " 'http://www.w3.org/2001/XMLSchema#anyURI'";# STRING REQUIRED ... datatype IRI STRING from short
+  virtrdf:qmfLanguageOfShortTmpl " NULL";					# STRING REQUIRED ... language ID STRING from short
+  virtrdf:qmfBoolOfShortTmpl " NULL";						# STRING REQUIRED ... boolean value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfi (^{custom-string-1}^, ^{tree}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfi (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spf (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL representation of the STRING value of short
+# Templates of expressions that make short values from other representations
+  virtrdf:qmfShortOfTypedsqlvalTmpl " NULL";					# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfSqlvalTmpl " __spfinv (^{sqlval-of-tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[0]";	# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
+  virtrdf:qmfShortOfLongTmpl " __spfinv (__id2i (^{tree}^), ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[0]";	# STRING REQUIRED ... makes short by long
+  virtrdf:qmfShortOfUriTmpl " __spfinv (^{tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[0]";	# STRING REQUIRED ... makes short by uri
+# Misc
+  virtrdf:qmfIsBijection 1;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal
+  virtrdf:qmfIsStable 1;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order
+  virtrdf:qmfCmpFuncName "DB.DBA.RDF_OBJ_CMP";					# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type
+  virtrdf:qmfTypeminTmpl " ''";							# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg
+  virtrdf:qmfTypemaxTmpl " '\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF'";			# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg
+# Metadata about values that can be stored in this field
+  virtrdf:qmfColumnCount 1;							# Number of columns of the oroginal data (usually 1, zero if variable and not yet set)
+  virtrdf:qmfOkForAnySqlvalue 0;						# BOOLEAN REQUIRED Nonzero if the field format can store any possible SQL value (even if the field itself can not)
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_NOT_NULL, virtrdf:SPART_VARR_IS_LIT;
+#  virtrdf:qmfValRange-rvrDatatype "http://www.w3.org/2001/XMLSchema#anyURI";	# STRING OPTIONAL Datatype of stored values, if fixed
+  virtrdf:qmfValRange-rvrLanguage "NULL";					# STRING OPTIONAL Language, if fixed
+#  virtrdf:qmfFixedValue "";							# ANY OPTIONAL Value of stored values, if fixed
+  virtrdf:qmfCustomString1 "%s";
+  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id
+  virtrdf:qmfSuperFormats rdfdf:sql-varchar-literal-SuperFormats
+.
+
+rdfdf:sql-varchar-literal-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat;
+  rdf:_1 rdfdf:sql-varchar-literal-nullable
+.
+
+rdfdf:sql-varchar-literal-nullable
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-varchar-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfLongTmpl " __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)";	# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)";				# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfLongOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfin (^{custom-string-1}^, ^{tree}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfin (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL representation of the STRING value of short
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfName "sql-varchar-literal-nullable";
+  virtrdf:qmfSuperFormats rdfdf:sql-varchar-literal-nullable-SuperFormats
+.
+
+rdfdf:sql-varchar-literal-nullable-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat
+.
+
 rdfdf:sql-nvarchar-uri
   rdf:type virtrdf:QuadMapFormat;
   virtrdf:inheritFrom rdfdf:sql-varchar-uri;
@@ -1014,6 +1101,29 @@ rdfdf:sql-nvarchar-uri-nullable-SuperFormats
   rdf:type virtrdf:array-of-QuadMapFormat
 .
 
+rdfdf:sql-nvarchar-literal
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-varchar-literal;
+  virtrdf:qmfName "sql-nvarchar-literal";
+  virtrdf:qmfSuperFormats rdfdf:sql-nvarchar-literal-SuperFormats
+.
+
+rdfdf:sql-nvarchar-literal-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat;
+  rdf:_1 rdfdf:sql-nvarchar-literal-nullable
+.
+
+rdfdf:sql-nvarchar-literal-nullable
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-varchar-literal-nullable;
+  virtrdf:qmfName "sql-nvarchar-literal-nullable";
+  virtrdf:qmfSuperFormats rdfdf:sql-nvarchar-literal-nullable-SuperFormats
+.
+
+rdfdf:sql-nvarchar-literal-nullable-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat
+.
+
 rdfdf:sql-integer
   rdf:type virtrdf:QuadMapFormat;
   virtrdf:qmfName "sql-integer";
@@ -1025,7 +1135,7 @@ rdfdf:sql-integer
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -1036,7 +1146,7 @@ rdfdf:sql-integer
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#integer' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#integer' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " ^{sqlval-of-tree}^";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " ^{tree}^";					# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -1125,6 +1235,49 @@ rdfdf:sql-integer-uri-nullable-SuperFormats
   rdf:type virtrdf:array-of-QuadMapFormat
 .
 
+rdfdf:sql-integer-literal
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-varchar-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfName "sql-integer-literal";
+  virtrdf:qmfCmpFuncName "DB.DBA.RDF_OBJ_CMP";					# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type
+  virtrdf:qmfTypeminTmpl " -2147483648";					# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg
+  virtrdf:qmfTypemaxTmpl " 2147483647";						# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg
+  virtrdf:qmfIsBijection 1;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal
+  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_NOT_NULL, virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfCustomString1 "local://%d";
+  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id
+  virtrdf:qmfSuperFormats rdfdf:sql-integer-literal-SuperFormats
+.
+
+rdfdf:sql-integer-literal-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat;
+  rdf:_1 rdfdf:sql-integer-literal-nullable
+.
+
+rdfdf:sql-integer-literal-nullable
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-integer-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfName "sql-integer-literal-nullable";
+  virtrdf:qmfLongTmpl " __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)";	# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)";				# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfLongOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfin (^{custom-string-1}^, ^{tree}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfin (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL representation of the STRING value of short
+  virtrdf:qmfSuperFormats rdfdf:sql-integer-literal-nullable-SuperFormats
+.
+
+rdfdf:sql-integer-literal-nullable-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat
+.
+
 rdfdf:sql-doubleprecision
   rdf:type virtrdf:QuadMapFormat;
   virtrdf:qmfName "sql-doubleprecision";
@@ -1136,7 +1289,8 @@ rdfdf:sql-doubleprecision
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " isnotnull (^{tree}^)";				# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -1147,7 +1301,7 @@ rdfdf:sql-doubleprecision
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#double' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#double' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " ^{sqlval-of-tree}^";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " ^{tree}^";					# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -1203,7 +1357,8 @@ rdfdf:sql-numeric
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " isnotnull (^{tree}^)";				# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -1214,7 +1369,7 @@ rdfdf:sql-numeric
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#numeric' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#numeric' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " ^{sqlval-of-tree}^";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " ^{tree}^";					# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -1303,6 +1458,49 @@ rdfdf:sql-numeric-uri-nullable-SuperFormats
   rdf:type virtrdf:array-of-QuadMapFormat
 .
 
+rdfdf:sql-numeric-literal
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-varchar-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfName "sql-numeric-literal";
+  virtrdf:qmfCmpFuncName "DB.DBA.RDF_OBJ_CMP";					# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type
+  virtrdf:qmfTypeminTmpl " -99999999999999999999999999999999999999999999999999";	# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg
+  virtrdf:qmfTypemaxTmpl " 99999999999999999999999999999999999999999999999999";		# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg
+  virtrdf:qmfIsBijection 1;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal
+  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_NOT_NULL, virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfCustomString1 "local://%f";
+  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id
+  virtrdf:qmfSuperFormats rdfdf:sql-numeric-literal-SuperFormats
+.
+
+rdfdf:sql-numeric-literal-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat;
+  rdf:_1 rdfdf:sql-numeric-literal-nullable
+.
+
+rdfdf:sql-numeric-literal-nullable
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:sql-numeric-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfName "sql-numeric-literal-nullable";
+  virtrdf:qmfLongTmpl " __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)";	# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spfn (^{custom-string-1}^, ^{alias-dot}^^{column}^)";		# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfLongOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfin (^{custom-string-1}^, ^{tree}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfin (^{custom-string-1}^, ^{tree}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{tree}^)";	# STRING REQUIRED ... SQL representation of the STRING value of short
+  virtrdf:qmfSuperFormats rdfdf:sql-numeric-literal-nullable-SuperFormats
+.
+
+rdfdf:sql-numeric-literal-nullable-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat
+.
+
 rdfdf:sql-date
   rdf:type virtrdf:QuadMapFormat;
   virtrdf:qmfName "sql-date";
@@ -1314,7 +1512,8 @@ rdfdf:sql-date
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -1325,7 +1524,7 @@ rdfdf:sql-date
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#date' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#date' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " ^{sqlval-of-tree}^";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " ^{tree}^";					# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -1385,7 +1584,8 @@ rdfdf:sql-time
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -1396,7 +1596,7 @@ rdfdf:sql-time
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#time' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#time' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " ^{sqlval-of-tree}^";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " ^{tree}^";					# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -1453,7 +1653,8 @@ rdfdf:sql-datetime
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{tree}^";		# STRING REQUIRED ... SQL value from short
@@ -1464,7 +1665,7 @@ rdfdf:sql-datetime
   virtrdf:qmfUriOfShortTmpl " NULL";						# STRING REQUIRED ... URI STRING from short
   virtrdf:qmfStrsqlvalOfShortTmpl " cast (^{tree}^ as varchar)";		# STRING REQUIRED ... SQL representation of the STRING value of short
 # Templates of expressions that make short values from other representations
-  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^)) when 'http://www.w3.org/2001/XMLSchema#datetime' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfTypedsqlvalTmpl " (case (^{datatype-of-tree}^) when 'http://www.w3.org/2001/XMLSchema#datetime' then ^{sqlval-of-tree}^ else NULL end)";	# STRING REQUIRED ... makes short by SQL value with specified type and/or language
   virtrdf:qmfShortOfSqlvalTmpl " ^{sqlval-of-tree}^";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
   virtrdf:qmfShortOfLongTmpl " ^{tree}^";					# STRING REQUIRED ... makes short by long
   virtrdf:qmfShortOfUriTmpl " NULL";						# STRING REQUIRED ... makes short by uri
@@ -1517,10 +1718,11 @@ rdfdf:multipart-uri
   virtrdf:qmfSqlvalTmpl " __spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)";	# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
-  virtrdf:qmfIsuriOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " __i2id (__spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^))";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " __spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";		# STRING REQUIRED ... SQL value from short
@@ -1581,6 +1783,79 @@ rdfdf:multipart-uri-nullable-SuperFormats
   rdf:type virtrdf:array-of-QuadMapFormat
 .
 
+rdfdf:multipart-literal
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:qmfName "multipart-literal";
+  virtrdf:qmfShortTmpl "^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{as-name-N}^^{end}^";	# STRING REQUIRED "short" value template, can be NULL
+  virtrdf:qmfLongTmpl " __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)";	# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)";	# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
+# Templates of booleans that tell whether the short is of some sort:
+  virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
+# Templates that convert short value into other types (can be applied to both field and not field expression)
+  virtrdf:qmfLongOfShortTmpl " __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";	# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";		# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfDatatypeOfShortTmpl " 'http://www.w3.org/2001/XMLSchema#anyURI'";# STRING REQUIRED ... datatype IRI STRING from short
+  virtrdf:qmfLanguageOfShortTmpl " NULL";					# STRING REQUIRED ... language ID STRING from short
+  virtrdf:qmfBoolOfShortTmpl " NULL";						# STRING REQUIRED ... boolean value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfi (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spf (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";	# STRING REQUIRED ... SQL representation of the STRING value of short
+# Templates of expressions that make short values from other representations
+  virtrdf:qmfShortOfTypedsqlvalTmpl	"^{comma-list-begin}^ __spfinv (^{tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^";					# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfSqlvalTmpl		"^{comma-list-begin}^ __spfinv (^{sqlval-of-tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^";	# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
+  virtrdf:qmfShortOfLongTmpl		"^{comma-list-begin}^ __spfinv (__id2in (^{tree}^), ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^";	# STRING REQUIRED ... makes short by long
+  virtrdf:qmfShortOfUriTmpl		"^{comma-list-begin}^ __spfinv (^{tree}^, ^{custom-string-1}^, 2^{opt-comma-arg-dtps}^)[^{N}^]^{as-name-N}^^{end}^";	# STRING REQUIRED ... makes short by uri
+#wrong:  virtrdf:qmfShortOfNiceSqlvalTmpl "^{comma-list-begin}^ ^{N-aref-of-spfinv}^^{as-name-N}^^{end}^";	# ... works like qmfShortOfSqlvalTmpl for values of one selected data type, not suitable for other types
+#wrong:  virtrdf:qmfDtpOfNiceSqlval 217;						# The 'nice' DTP that is an acceptable type of qmfShortOfNiceSqlvalTmpl, zero or unset if no nice type
+# Misc
+  virtrdf:qmfIsBijection 0;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal
+  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order
+  virtrdf:qmfCmpFuncName "DB.DBA.RDF_VECTOR_CMP";				# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type
+  virtrdf:qmfTypeminTmpl " NULL";						# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg
+  virtrdf:qmfTypemaxTmpl " NULL";						# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg
+# Metadata about values that can be stored in this field
+  virtrdf:qmfColumnCount 0;							# Number of columns of the oroginal data (usually 1, zero if variable and not yet set)
+  virtrdf:qmfOkForAnySqlvalue 0;						# BOOLEAN REQUIRED Nonzero if the field format can store any possible SQL value (even if the field itself can not)
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT, virtrdf:SPART_VARR_NOT_NULL;
+#  virtrdf:qmfValRange-rvrDatatype "";						# STRING OPTIONAL Datatype of stored values, if fixed
+#  virtrdf:qmfValRange-rvrLanguage "x-any";					# STRING OPTIONAL Language, if fixed
+#  virtrdf:qmfFixedValue "";							# ANY OPTIONAL Value of stored values, if fixed
+  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id
+  virtrdf:qmfSuperFormats rdfdf:multipart-literal-SuperFormats
+.
+
+rdfdf:multipart-literal-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat;
+  rdf:_1 rdfdf:multipart-literal-nullable
+.
+
+rdfdf:multipart-literal-nullable
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:multipart-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfName "multipart-literal-nullable";
+  virtrdf:qmfLongTmpl " __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)";	# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^)";	# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfLongOfShortTmpl " __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";	# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";		# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfin (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfin (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spfn (^{custom-string-1}^, ^{comma-list-begin}^ ^{tree-N}^^{end}^)";	# STRING REQUIRED ... SQL representation of the STRING value of short
+  virtrdf:qmfSuperFormats rdfdf:multipart-literal-nullable-SuperFormats
+.
+
+rdfdf:multipart-literal-nullable-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat
+.
+
 rdfdf:multipart-uri-fn-nullable
   rdf:type virtrdf:QuadMapFormat;
   virtrdf:qmfName "multipart-uri-fn-nullable";
@@ -1589,10 +1864,11 @@ rdfdf:multipart-uri-fn-nullable
   virtrdf:qmfSqlvalTmpl " __bft (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{alias-N-dot}^^{column-N}^^{end}^), 1)";	# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
-  virtrdf:qmfIsuriOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " __i2id (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^))";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " __bft (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^), 1)";		# STRING REQUIRED ... SQL value from short
@@ -1640,7 +1916,7 @@ rdfdf:multipart-literal-fn-nullable
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_LONG_OF_SQLVAL (^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^))";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{custom-verbatim-1}^ (^{comma-list-begin}^ ^{tree-N}^^{end}^)";		# STRING REQUIRED ... SQL value from short
@@ -1685,10 +1961,11 @@ rdfdf:zeropart-uri
   virtrdf:qmfSqlvalTmpl " __spfi (^{custom-string-1}^)";			# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
-  virtrdf:qmfIsuriOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " __i2id (__spfi (^{custom-string-1}^))";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " __spfi (^{custom-string-1}^)";		# STRING REQUIRED ... SQL value from short
@@ -1747,6 +2024,77 @@ rdfdf:zeropart-uri-nullable-SuperFormats
   rdf:type virtrdf:array-of-QuadMapFormat
 .
 
+rdfdf:zeropart-literal
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:qmfName "zeropart-literal";
+  virtrdf:qmfShortTmpl "1 /*zeropart*/";					# STRING REQUIRED "short" value template, can be NULL
+  virtrdf:qmfLongTmpl " __spf (^{custom-string-1}^)";		# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spf (^{custom-string-1}^)";			# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
+# Templates of booleans that tell whether the short is of some sort:
+  virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
+# Templates that convert short value into other types (can be applied to both field and not field expression)
+  virtrdf:qmfLongOfShortTmpl " __spf (^{custom-string-1}^)";	# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spf (^{custom-string-1}^)";		# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfDatatypeOfShortTmpl " 'http://www.w3.org/2001/XMLSchema#anyURI'";	# STRING REQUIRED ... datatype IRI STRING from short
+  virtrdf:qmfLanguageOfShortTmpl " NULL";					# STRING REQUIRED ... language ID STRING from short
+  virtrdf:qmfBoolOfShortTmpl " NULL";						# STRING REQUIRED ... boolean value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfi (^{custom-string-1}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfi (^{custom-string-1}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spf (^{custom-string-1}^)";		# STRING REQUIRED ... SQL representation of the STRING value of short
+# Templates of expressions that make short values from other representations
+  virtrdf:qmfShortOfTypedsqlvalTmpl "1 /*zeropart*/";				# STRING REQUIRED ... makes short by SQL value with specified type and/or language
+  virtrdf:qmfShortOfSqlvalTmpl "1 /*zeropart*/";				# STRING REQUIRED ... makes short by sqlvalue with no language and a datatype specified by SQL type
+  virtrdf:qmfShortOfLongTmpl "1 /*zeropart*/";					# STRING REQUIRED ... makes short by long
+  virtrdf:qmfShortOfUriTmpl "1 /*zeropart*/";					# STRING REQUIRED ... makes short by uri
+# Misc
+  virtrdf:qmfIsBijection 0;							# INTEGER REQUIRED Nonzero if the format is bijection so long values are equal IFF short values of the type are equal
+  virtrdf:qmfIsStable 0;							# INTEGER REQUIRED Nonzero if sql values are in order IFF of short values are in order
+  virtrdf:qmfCmpFuncName "DB.DBA.RDF_VECTOR_CMP";				# STRING REQUIRED Name of comparison function that acts like strcmp but args are of this type
+  virtrdf:qmfTypeminTmpl " NULL";						# STRING REQUIRED Template of expn that returns the smallest value of the type of value of arg
+  virtrdf:qmfTypemaxTmpl " NULL";						# STRING REQUIRED Template of expn that returns the biggest possible value of the type of value of arg
+# Metadata about values that can be stored in this field
+  virtrdf:qmfColumnCount 0;							# Number of columns of the oroginal data (usually 1, zero if variable and not yet set)
+  virtrdf:qmfOkForAnySqlvalue 0;						# BOOLEAN REQUIRED Nonzero if the field format can store any possible SQL value (even if the field itself can not)
+  virtrdf:qmfValRange-rvrRestrictions						# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT, virtrdf:SPART_VARR_NOT_NULL;
+#  virtrdf:qmfValRange-rvrDatatype "";						# STRING OPTIONAL Datatype of stored values, if fixed
+#  virtrdf:qmfValRange-rvrLanguage "x-any";					# STRING OPTIONAL Language, if fixed
+#  virtrdf:qmfFixedValue "";							# ANY OPTIONAL Value of stored values, if fixed
+  virtrdf:qmfUriIdOffset 0;							# INTEGER OPTIONAL The value that should be added to locally stored ref id in order to get portable ref id
+  virtrdf:qmfSuperFormats rdfdf:zeropart-literal-SuperFormats
+.
+
+rdfdf:zeropart-literal-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat;
+  rdf:_1 rdfdf:zeropart-literal-nullable
+.
+
+rdfdf:zeropart-literal-nullable
+  rdf:type virtrdf:QuadMapFormat;
+  virtrdf:inheritFrom rdfdf:zeropart-literal;
+  virtrdf:noInherit virtrdf:qmfValRange-rvrRestrictions;
+  virtrdf:qmfValRange-rvrRestrictions							# BITMASK OPTIONAL Natural restrictions on values stored at the field
+    virtrdf:SPART_VARR_IS_LIT;
+  virtrdf:qmfName "zeropart-literal-nullable";
+  virtrdf:qmfLongTmpl " __spfn (^{custom-string-1}^)";		# STRING REQUIRED "long" value template, can be NULL
+  virtrdf:qmfSqlvalTmpl " __spfn (^{custom-string-1}^)";			# STRING REQUIRED "sqlval" value template, can be NULL
+  virtrdf:qmfLongOfShortTmpl " __spfn (^{custom-string-1}^)";	# STRING REQUIRED ... long from short
+  virtrdf:qmfSqlvalOfShortTmpl " __spfn (^{custom-string-1}^)";		# STRING REQUIRED ... SQL value from short
+  virtrdf:qmfIidOfShortTmpl " __i2id (__spfin (^{custom-string-1}^))";
+  virtrdf:qmfUriOfShortTmpl " __spfin (^{custom-string-1}^)";		# STRING REQUIRED ... URI STRING from short
+  virtrdf:qmfStrsqlvalOfShortTmpl " __spfn (^{custom-string-1}^)";		# STRING REQUIRED ... SQL representation of the STRING value of short
+  virtrdf:qmfSuperFormats rdfdf:zeropart-literal-nullable-SuperFormats
+.
+
+rdfdf:zeropart-literal-nullable-SuperFormats
+  rdf:type virtrdf:array-of-QuadMapFormat
+.
+
 rdfdf:zeropart-uri-fn-nullable
   rdf:type virtrdf:QuadMapFormat;
   virtrdf:qmfName "zeropart-uri-fn-nullable";
@@ -1755,10 +2103,11 @@ rdfdf:zeropart-uri-fn-nullable
   virtrdf:qmfSqlvalTmpl " __bft (^{custom-verbatim-1}^ (), 1)";				# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
-  virtrdf:qmfIsuriOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " __i2id (^{custom-verbatim-1}^ ())";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " __bft (^{custom-verbatim-1}^ (), 1)";		# STRING REQUIRED ... SQL value from short
@@ -1806,7 +2155,7 @@ rdfdf:zeropart-literal-fn-nullable
   virtrdf:qmfIsrefOfShortTmpl " 0";							# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";							# STRING REQUIRED ... whether the short is literal
   virtrdf:qmfIsblankOfShortTmpl " 0";							# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";							# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";					# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_LONG_OF_SQLVAL (^{custom-verbatim-1}^ ())";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{custom-verbatim-1}^ ()";				# STRING REQUIRED ... SQL value from short
@@ -1851,10 +2200,11 @@ rdfdf:sql-varchar-uri-fn
   virtrdf:qmfSqlvalTmpl " __bft (^{custom-verbatim-1}^ (^{alias-dot}^^{column}^), 1)";	# STRING REQUIRED "sqlval" value template, can be NULL
   virtrdf:qmfBoolTmpl " NULL";							# STRING REQUIRED Boolean value template, can be NULL
 # Templates of booleans that tell whether the short is of some sort:
-  virtrdf:qmfIsrefOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is ref
-  virtrdf:qmfIsuriOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is uri
+  virtrdf:qmfIsrefOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is ref
+  virtrdf:qmfIsuriOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
   virtrdf:qmfIslitOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIsnumericOfShortTmpl " 0";						# STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " __i2id (^{custom-verbatim-1}^ (^{tree}^))";	# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " __bft (^{custom-verbatim-1}^ (^{tree}^), 1)";		# STRING REQUIRED ... SQL value from short
@@ -2013,7 +2363,7 @@ rdfdf:sql-varchar-literal-fn
   virtrdf:qmfIsrefOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is ref
   virtrdf:qmfIsuriOfShortTmpl " 0";						# STRING REQUIRED ... whether the short is uri
   virtrdf:qmfIsblankOfShortTmpl " 0";					# STRING REQUIRED ... whether the short is blank node ref
-  virtrdf:qmfIslitOfShortTmpl " 1";						# STRING REQUIRED ... whether the short is literal
+  virtrdf:qmfIslitOfShortTmpl " isnotnull (^{tree}^)";				# STRING REQUIRED ... whether the short is literal
 # Templates that convert short value into other types (can be applied to both field and not field expression)
   virtrdf:qmfLongOfShortTmpl " DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (^{custom-verbatim-1}^ (^{tree}^))";		# STRING REQUIRED ... long from short
   virtrdf:qmfSqlvalOfShortTmpl " ^{custom-verbatim-1}^ (^{tree}^)";	# STRING REQUIRED ... SQL value from short
diff --git a/binsrc/cached_resources/res_to_c.awk b/binsrc/cached_resources/res_to_c.awk
index 3a2b6ec..386d5e9 100644
--- a/binsrc/cached_resources/res_to_c.awk
+++ b/binsrc/cached_resources/res_to_c.awk
@@ -1,14 +1,14 @@
 #
 # sql_to_c.awk
 #
-# $Id: res_to_c.awk,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+# $Id: res_to_c.awk,v 1.1.1.1.2.3 2012/03/08 13:52:41 source Exp $
 #
 # Embeds text into a C file
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ BEGIN   {
 	}
 	{
 	  fun = $0
-	  gsub ( /\\/, "\\\\", fun)
+          gsub ( "\\\\", "&&", fun)
 	  gsub ( /"/, "\\\"", fun)
 	  gsub ( /\$/, "\\044", fun)
 	  gsub ( /.*/, "\"&\\n\",", fun)
diff --git a/binsrc/cached_resources/w3-1999-xhtml/vocab b/binsrc/cached_resources/w3-1999-xhtml/vocab
new file mode 100644
index 0000000..f0d6257
--- /dev/null
+++ b/binsrc/cached_resources/w3-1999-xhtml/vocab
@@ -0,0 +1,456 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
+      "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfa="http://www.w3.org/ns/rdfa#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xml:lang="en-US">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+  <title>XHTML Vocabulary</title>
+  <base  href="http://www.w3.org/1999/xhtml/vocab" />
+  <link rel="stylesheet" type="text/css"
+  href="http://www.w3.org/StyleSheets/TR/base.css" />
+</head>
+
+<body>
+
+<div class="head">
+<p><a href="http://www.w3.org/"><img class="head"
+src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" /></a></p>
+</div>
+
+<h1><abbr title="Extensible HyperText Markup Language">XHTML</abbr>
+Vocabulary</h1>
+
+<p>This is a vocabulary collection utilized by <abbr>XHTML</abbr> Family
+modules and document types using <a
+href="http://www.w3.org/TR/xhtml-modularization"><abbr>XHTML</abbr>
+Modularization</a>, including <a
+href="http://www.w3.org/TR/xhtml-role"><abbr>XHTML</abbr> Role</a> and XHTML +
+RDFa as defined in <a
+href="http://www.w3.org/TR/rdfa-syntax">rdfa-syntax</a>.</p>
+
+<p>The <abbr>XHTML</abbr> specifications are developed by the <a
+href="http://www.w3.org/MarkUp/"><abbr
+title="World Wide Web Consortium">W3C</abbr> <abbr
+title="Extensible HyperText Markup Language">XHTML</abbr> 2 Working Group</a>
+as part of the <a href="http://www.w3.org/MarkUp/Activity"><abbr>W3C</abbr>
+<abbr>HTML</abbr> Activity</a>.</p>
+
+<p>For more information about <abbr>XML</abbr>, please refer to the <a
+href="http://www.w3.org/TR/REC-xml">Extensible Markup Language
+(<abbr>XML</abbr>) 1.0</a> specification.</p>
+
+<p>Version date: <!--$date=-->2010-01-27<!--$--></p>
+<hr />
+
+<h2>1. Introduction</h2>
+
+<p>XHTML Modularization [<a href="#ref_XHTMLMOD">XHTMLMOD</a>] permits the
+development of XHTML modules and XHTML family markup languages. These modules
+and markup languages may, in turn, define local vocabulary items for use as
+values of attributes. This document describes the items that are available in
+the default XHTML vocabulary space:
+<code>http://www.w3.org/1999/xhtml/vocab#</code>. </p>
+
+<h2 id="XHTMLMetaInformationModule">2. XHTML Metainformation Vocabulary</h2>
+
+<p>The XHTML Metainformation Module defined as part of XHTML+RDFa [<a
+    href="#ref_XHTMLRDFa">XHTMLRDFa</a>] specifies the following vocabulary items.</p>
+
+<div id="relrev-properties" about="#relrev-properties" typeof="rdf:Bag">
+
+<div about="#relrev-properties" rev="rdfs:member">
+<dl>
+  <dt id="alternate" about="#alternate" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">alternate</dt>
+    <dd about="#alternate" property="rdfs:comment" datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#alternate'>alternate</span> 
+    designates alternate versions for a resource.</dd>
+  <dt id="appendix" about="#appendix" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">appendix</dt>
+    <dd about="#appendix" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#appendix'>appendix</span> refers to a resource serving
+      as an appendix in a collection. </dd>
+  <dt id="bookmark" about="#bookmark" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">bookmark</dt>
+    <dd about="#bookmark" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#bookmark'>bookmark</span> refers to a bookmark - a link
+      to a key entry point within an extended document. </dd>
+  <dt id="cite" about="#cite" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">cite</dt>
+    <dd about="#cite" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#cite'>cite</span> refers to a resource that defines
+      a citation. </dd>
+  <dt id="chapter" about="#chapter" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">chapter</dt>
+    <dd about="#chapter" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#chapter'>chapter</span> refers to a resource serving
+      as a chapter in a collection. </dd>
+  <dt id="contents" about="#contents" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">contents</dt>
+    <dd about="#contents" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#contents'>contents</span> refers to a resource serving
+      as a table of contents. </dd>
+  <dt id="copyright" about="#copyright" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">copyright</dt>
+    <dd about="#copyright" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#copyright'>copyright</span> refers to a copyright
+      statement for the resource. </dd>
+  <dt id="first" about="#first" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">first</dt>
+    <dd about="#first" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#first'>first</span> refers the first item in a
+      collection (see also start and top).</dd>
+  <dt id="glossary" about="#glossary" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">glossary</dt>
+    <dd about="#glossary" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#glossary'>glossary</span> refers to a resource
+      providing a glossary of terms. </dd>
+  <dt id="help" about="#help" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">help</dt>
+    <dd about="#help" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#help'>help</span> refers to a resource offering
+      help. </dd>
+  <dt id="icon" about="#icon" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">icon</dt>
+    <dd about="#icon" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#icon'>icon</span> refers to a resource that
+      represents an icon. </dd>
+  <dt id="index" about="#index" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">index</dt>
+    <dd about="#index" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#index'>index</span> refers to a resource providing
+      an index. </dd>
+  <dt id="itsRules" about="#itsRules" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">itsRules</dt>
+    <dd about="#itsRules" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#itsRules'>itsRules</span> indicates that the designated
+      resource is an [<a href="#ref_ITS">ITS</a>] rule set.</dd>
+  <dt id="last" about="#last" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">last</dt>
+    <dd about="#last" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#last'>last</span> refers to the last resource in a
+      collection of resources. </dd>
+  <dt id="license" about="#license" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">license</dt>
+    <dd about="#license" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#license'>license</span> refers to a resource that
+      defines the associated license. </dd>
+  <dt id="meta" about="#meta" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">meta</dt>
+    <dd about="#meta" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#meta'>meta</span> refers to a resource that
+      provides metadata. </dd>
+  <dt id="next" about="#next" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">next</dt>
+    <dd about="#next" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#next'>next</span> refers to the next resource
+      (after the current one) in an ordered collection of resources. </dd>
+  <dt id="p3pv1" about="#p3pv1" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">p3pv1</dt>
+    <dd about="#p3pv1" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#p3pv1'>p3pv1</span> refers to a P3P Policy Reference
+      File [<a href="#ref_P3P">P3P</a>]. </dd>
+  <dt id="prev" about="#prev" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">prev</dt>
+    <dd about="#prev" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#prev'>prev</span> refers to a previous resource
+      (before the current one) in an ordered collection of resources. </dd>
+  <dt id="role" about="#role" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Bag rdf:Property">role</dt>
+    <dd about="#role" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#role'>role</span> indicates the purpose of the
+      resource. See <a href="#XHTMLRoleVocabulary">the XHTML Role
+      Vocabulary</a> for roles in this vocabulary space, and <a
+      href="#ref_XHTMLROLE">XHTMLROLE</a> for information on extending the
+      collection of roles. </dd>
+  <dt id="section" about="#section" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">section</dt>
+    <dd about="#section" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#section'>section</span> refers to a resource serving
+      as a section in a collection. </dd>
+  <dt id="stylesheet" about="#stylesheet" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">stylesheet</dt>
+    <dd about="#stylesheet" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#stylesheet'>stylesheet</span> refers to a resource
+      serving as a stylesheet for a resource. </dd>
+  <dt id="subsection" about="#subsection" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">subsection</dt>
+    <dd about="#subsection" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#subsection'>subsection</span> refers to a resource
+      serving as a subsection in a collection. </dd>
+  <dt id="start" about="#start" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">start</dt>
+    <dd about="#start" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#start'>start</span> refers to the first resource in
+      a collection of resources. </dd>
+  <dt id="top" about="#top" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">top</dt>
+    <dd about="#top" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#top'>top</span> is a synonym for start. </dd>
+  <dt id="up" about="#up" property='rdfa:term' lang='' xml:lang='' typeof="rdf:Property">up</dt>
+    <dd about="#up" property="rdfs:comment"
+      datatype="xsd:string"><span property='rdfa:uri' lang='' xml:lang='' content='http://www.w3.org/1999/xhtml/vocab#up'>up</span> refers to a resource "above" in a
+      hierarchically structured set. </dd>
+</dl>
+</div>
+</div>
+
+<h2 id="XHTMLRoleVocabulary">3. XHTML Role Vocabulary</h2>
+
+<h3 id="XHTMLRoleModule">3.1 Items from the XHTML Role Module</h3>
+
+<p id="role-properties" about="#role-properties" typeof="rdf:Bag">The values in
+this section are defined for use in the <code>role</code> attribute as
+specified in the <a href="#ref_XHTMLROLE">XHTML Role Attribute Module</a>. Note
+that the values in <a href="#XHTMLMetaInformationModule"
+resource="#relrev-properties" rev="rdfs:member">Section 2</a> and <a
+href="#WAIARIA">Section 3.2</a> are also available.</p>
+
+<div about="#role-properties" rev="rdfs:member">
+<dl>
+  <dt id="banner" about="#banner" typeof="rdf:Property">banner</dt>
+    <dd about="#banner" property="rdfs:comment" datatype="xsd:string">contains
+      the prime heading or internal title of a page. </dd>
+  <dt id="complementary" about="#complementary"
+  typeof="rdf:Property">complementary</dt>
+    <dd about="#complementary" property="rdfs:comment"
+      datatype="xsd:string">indicates that the section supports but is
+      separable from the main content of resource.</dd>
+  <dt id="contentinfo" about="#contentinfo"
+  typeof="rdf:Property">contentinfo</dt>
+    <dd about="#contentinfo" property="rdfs:comment"
+      datatype="xsd:string"><span></span>contains meta information about the
+      content on the page or the page as a whole.</dd>
+  <dt id="definition" about="#definition" typeof="rdf:Property">definition</dt>
+    <dd about="#definition" property="rdfs:comment"
+      datatype="xsd:string">indicates the definition of a term or concept.</dd>
+  <dt id="main" about="#main" typeof="rdf:Property">main</dt>
+    <dd about="#main" property="rdfs:comment" datatype="xsd:string">acts as the
+      main content of the document. </dd>
+  <dt id="navigation" about="#navigation" typeof="rdf:Property">navigation</dt>
+    <dd about="#navigation" property="rdfs:comment"
+      datatype="xsd:string">indicates a collection of items suitable for
+      navigating the document or related documents.</dd>
+  <dt id="note" about="#note" typeof="rdf:Property">note</dt>
+    <dd about="#note" property="rdfs:comment" datatype="xsd:string">indicates
+      the content is parenthetic or ancillary to the main content of the
+      resource. </dd>
+  <dt id="search" about="#search" typeof="rdf:Property">search</dt>
+    <dd about="#search" property="rdfs:comment" datatype="xsd:string">indicates
+      that the section provides a search facility. </dd>
+</dl>
+</div>
+
+<h3 id="WAIARIA">3.2 Items from the Accessible Rich Internet Applications
+Vocabulary</h3>
+
+<div about="#role-properties" typeof="rdfs:member">
+  <dl>
+    <dt id="alert" about="#alert" typeof="rdf:Property">alert</dt>
+    <dd about="#alert" property="rdfs:comment" datatype="xsd:string">A message
+      with important, and usually time-sensitive, information. Also see alertdialog
+      and status.</dd>
+    <dt id="alertdialog" about="#alertdialog" typeof="rdf:Property">alertdialog</dt>
+    <dd about="#alertdialog" property="rdfs:comment" datatype="xsd:string">A
+      type of dialog that contains an alert message, where initial focus goes
+      an element within the dialog. Also see alert and dialog.</dd>
+    <dt id="application" about="#application" typeof="rdf:Property">application</dt>
+    <dd about="#application" property="rdfs:comment" datatype="xsd:string">A
+      region declared as a web application, as opposed to a web document.</dd>
+    <dt id="article" about="#article" typeof="rdf:Property">article</dt>
+    <dd about="#article" property="rdfs:comment" datatype="xsd:string">A section
+      of a page that consists of a composition that forms an independent part
+      of a document, page, or site.</dd>
+    <dt id="button" about="#button" typeof="rdf:Property">button</dt>
+    <dd about="#button" property="rdfs:comment" datatype="xsd:string">An input
+      that allows for user-triggered actions when clicked or pressed. Also see
+      link.</dd>
+    <dt id="checkbox" about="#checkbox" typeof="rdf:Property">checkbox</dt>
+    <dd about="#checkbox" property="rdfs:comment" datatype="xsd:string">A checkable
+      input that has three possible values: true, false, or mixed.</dd>
+    <dt id="columnheader" about="#columnheader" typeof="rdf:Property">columnheader</dt>
+    <dd about="#columnheader" property="rdfs:comment" datatype="xsd:string">A
+      cell containing header information for a column.</dd>
+    <dt id="combobox" about="#combobox" typeof="rdf:Property">combobox</dt>
+    <dd about="#combobox" property="rdfs:comment" datatype="xsd:string">A presentation
+      of a select; usually similar to a textbox where users can type ahead to
+      select an option, or type to enter arbitrary text as a new item in the
+      list. Also see listbox.</dd>
+    <dt id="dialog" about="#dialog" typeof="rdf:Property">dialog</dt>
+    <dd about="#dialog" property="rdfs:comment" datatype="xsd:string">A dialog
+      is an application window that is designed to interrupt the current processing
+      of an application in order to prompt the user to enter information or require
+      a response. Also see alertdialog.</dd>
+    <dt id="directory" about="#directory" typeof="rdf:Property">directory</dt>
+    <dd about="#directory" property="rdfs:comment" datatype="xsd:string">A list
+      of references to members of a group, such as a static table of contents.</dd>
+    <dt id="document" about="#document" typeof="rdf:Property">document</dt>
+    <dd about="#document" property="rdfs:comment" datatype="xsd:string">A region
+      containing related information that is declared as document content, as
+      opposed to a web application.</dd>
+    <dt id="form" about="#form" typeof="rdf:Property">form</dt>
+    <dd about="#form" property="rdfs:comment" datatype="xsd:string">A landmark
+      region that contains a collection of items and objects that, as a whole,
+      combine to create a form. Also see search.</dd>
+    <dt id="grid" about="#grid" typeof="rdf:Property">grid</dt>
+    <dd about="#grid" property="rdfs:comment" datatype="xsd:string">A grid is
+      an interactive control which contains cells of tabular data arranged in
+      rows and columns, like a table.</dd>
+    <dt id="gridcell" about="#gridcell" typeof="rdf:Property">gridcell</dt>
+    <dd about="#gridcell" property="rdfs:comment" datatype="xsd:string">A cell
+      in a grid or treegrid.</dd>
+    <dt id="group" about="#group" typeof="rdf:Property">group</dt>
+    <dd about="#group" property="rdfs:comment" datatype="xsd:string">A set of
+      user interface objects which are not intended to be included in a page
+      summary or table of contents by assistive technologies.</dd>
+    <dt id="heading" about="#heading" typeof="rdf:Property">heading</dt>
+    <dd about="#heading" property="rdfs:comment" datatype="xsd:string">A heading
+      for a section of the page.</dd>
+    <dt id="img" about="#img" typeof="rdf:Property">img</dt>
+    <dd about="#img" property="rdfs:comment" datatype="xsd:string">A container
+      for a collection of elements that form an image.</dd>
+    <dt id="link" about="#link" typeof="rdf:Property">link</dt>
+    <dd about="#link" property="rdfs:comment" datatype="xsd:string">An interactive
+      reference to an internal or external resource that, when activated, causes
+      the user agent to navigate to that resource. Also see button.</dd>
+    <dt id="list" about="#list" typeof="rdf:Property">list</dt>
+    <dd about="#list" property="rdfs:comment" datatype="xsd:string">A group of
+      non-interactive list items. Also see listbox.</dd>
+    <dt id="listbox" about="#listbox" typeof="rdf:Property">listbox</dt>
+    <dd about="#listbox" property="rdfs:comment" datatype="xsd:string">A widget
+      that allows the user to select one or more items from a list of choices.
+      Also see combobox and list.</dd>
+    <dt id="listitem" about="#listitem" typeof="rdf:Property">listitem</dt>
+    <dd about="#listitem" property="rdfs:comment" datatype="xsd:string">A single
+      item in a list or directory.</dd>
+    <dt id="log" about="#log" typeof="rdf:Property">log</dt>
+    <dd about="#log" property="rdfs:comment" datatype="xsd:string">A type of
+      live region where new information is added in meaningful order and old
+      information may disappear. Also see marquee.</dd>
+    <dt id="marquee" about="#marquee" typeof="rdf:Property">marquee</dt>
+    <dd about="#marquee" property="rdfs:comment" datatype="xsd:string">A type
+      of live region where non-essential information changes frequently. Also
+      see log.</dd>
+    <dt id="math" about="#math" typeof="rdf:Property">math</dt>
+    <dd about="#math" property="rdfs:comment" datatype="xsd:string">Content that
+      represents a mathematical expression. </dd>
+    <dt id="menu" about="#menu" typeof="rdf:Property">menu</dt>
+    <dd about="#menu" property="rdfs:comment" datatype="xsd:string">A type of
+      widget that offers a list of choices to the user.</dd>
+    <dt id="menubar" about="#menubar" typeof="rdf:Property">menubar</dt>
+    <dd about="#menubar" property="rdfs:comment" datatype="xsd:string">A presentation
+      of menu that usually remains visible and is usually presented horizontally.</dd>
+    <dt id="menuitem" about="#menuitem" typeof="rdf:Property">menuitem</dt>
+    <dd about="#menuitem" property="rdfs:comment" datatype="xsd:string">An option
+      in a group of choices contained by a menu or menubar.</dd>
+    <dt id="menuitemcheckbox" about="#menuitemcheckbox" typeof="rdf:Property">menuitemcheckbox</dt>
+    <dd about="#menuitemcheckbox" property="rdfs:comment" datatype="xsd:string">A
+      checkable menuitem that has three possible values: true, false, or mixed.</dd>
+    <dt id="menuitemradio" about="#menuitemradio" typeof="rdf:Property">menuitemradio</dt>
+    <dd about="#menuitemradio" property="rdfs:comment" datatype="xsd:string">A
+      checkable menuitem in a group of menuitemradio roles, only one of which
+      can be checked at a time.</dd>
+    <dt id="option" about="#option" typeof="rdf:Property">option</dt>
+    <dd about="#option" property="rdfs:comment" datatype="xsd:string">A selectable
+      item in a select list.</dd>
+    <dt id="presentation" about="#presentation" typeof="rdf:Property">presentation</dt>
+    <dd about="#presentation" property="rdfs:comment" datatype="xsd:string">An
+      element whose implicit native role semantics will not be mapped to the
+      accessibility API.</dd>
+    <dt id="progressbar" about="#progressbar" typeof="rdf:Property">progressbar</dt>
+    <dd about="#progressbar" property="rdfs:comment" datatype="xsd:string">An
+      element that displays the progress status for tasks that take a long time.</dd>
+    <dt id="radio" about="#radio" typeof="rdf:Property">radio</dt>
+    <dd about="#radio" property="rdfs:comment" datatype="xsd:string">A checkable
+      input in a group of radio roles, only one of which can be checked at a
+      time.</dd>
+    <dt id="radiogroup" about="#radiogroup" typeof="rdf:Property">radiogroup</dt>
+    <dd about="#radiogroup" property="rdfs:comment" datatype="xsd:string">A group
+      of radio buttons.</dd>
+    <dt id="region" about="#region" typeof="rdf:Property">region</dt>
+    <dd about="#region" property="rdfs:comment" datatype="xsd:string">A large
+      perceivable section of a web page or document, that the author feels is
+      important enough to be included in a page summary or table of contents,
+      for example, an area of the page containing live sporting event statistics.</dd>
+    <dt id="row" about="#row" typeof="rdf:Property">row</dt>
+    <dd about="#row" property="rdfs:comment" datatype="xsd:string">A row of cells
+      in a grid.</dd>
+    <dt id="rowgroup" about="#rowgroup" typeof="rdf:Property">rowgroup</dt>
+    <dd about="#rowgroup" property="rdfs:comment" datatype="xsd:string">A group
+      containing one or more row elements in a grid.</dd>
+    <dt id="rowheader" about="#rowheader" typeof="rdf:Property">rowheader</dt>
+    <dd about="#rowheader" property="rdfs:comment" datatype="xsd:string">A cell
+      containing header information for a row in a grid.</dd>
+    <dt id="scrollbar" about="#scrollbar" typeof="rdf:Property">scrollbar</dt>
+    <dd about="#scrollbar" property="rdfs:comment" datatype="xsd:string">A graphical
+      object that controls the scrolling of content within a viewing area, regardless
+      of whether the content is fully displayed within the viewing area.</dd>
+    <dt id="separator" about="#separator" typeof="rdf:Property">separator</dt>
+    <dd about="#separator" property="rdfs:comment" datatype="xsd:string">A divider
+      that separates and distinguishes sections of content or groups of menuitems.</dd>
+    <dt id="slider" about="#slider" typeof="rdf:Property">slider</dt>
+    <dd about="#slider" property="rdfs:comment" datatype="xsd:string">A user
+      input where the user selects a value from within a given range.</dd>
+    <dt id="spinbutton" about="#spinbutton" typeof="rdf:Property">spinbutton</dt>
+    <dd about="#spinbutton" property="rdfs:comment" datatype="xsd:string">A form
+      of range that expects a user to select from amongst discrete choices.</dd>
+    <dt id="status" about="#status" typeof="rdf:Property">status</dt>
+    <dd about="#status" property="rdfs:comment" datatype="xsd:string">A container
+      whose content is advisory information for the user but is not important
+      enough to justify an alert. Also see alert.</dd>
+    <dt id="tab" about="#tab" typeof="rdf:Property">tab</dt>
+    <dd about="#tab" property="rdfs:comment" datatype="xsd:string">A grouping
+      label providing a mechanism for selecting the tab content that is to be
+      rendered to the user.</dd>
+    <dt id="tablist" about="#tablist" typeof="rdf:Property">tablist</dt>
+    <dd about="#tablist" property="rdfs:comment" datatype="xsd:string">A list
+      of tab elements, which are references to tabpanel elements.</dd>
+    <dt id="tabpanel" about="#tabpanel" typeof="rdf:Property">tabpanel</dt>
+    <dd about="#tabpanel" property="rdfs:comment" datatype="xsd:string">A container
+      for the resources associated with a tab, where each tab is contained in
+      a tablist.</dd>
+    <dt id="textbox" about="#textbox" typeof="rdf:Property">textbox</dt>
+    <dd about="#textbox" property="rdfs:comment" datatype="xsd:string">Input
+      that allows free-form text as its value.</dd>
+    <dt id="timer" about="#timer" typeof="rdf:Property">timer</dt>
+    <dd about="#timer" property="rdfs:comment" datatype="xsd:string">A type of
+      live region containing a numerical counter which indicates an amount of
+      elapsed time from a start point, or the time remaining until an end point.</dd>
+    <dt id="toolbar" about="#toolbar" typeof="rdf:Property">toolbar</dt>
+    <dd about="#toolbar" property="rdfs:comment" datatype="xsd:string">A collection
+      of commonly used function buttons represented in compact visual form.</dd>
+    <dt id="tooltip" about="#tooltip" typeof="rdf:Property">tooltip</dt>
+    <dd about="#tooltip" property="rdfs:comment" datatype="xsd:string">A contextual
+      popup that displays a description for an element.</dd>
+    <dt id="tree" about="#tree" typeof="rdf:Property">tree</dt>
+    <dd about="#tree" property="rdfs:comment" datatype="xsd:string">A type of
+      list that may contain sub-level nested groups that can be collapsed and
+      expanded.</dd>
+    <dt id="treegrid" about="#treegrid" typeof="rdf:Property">treegrid</dt>
+    <dd about="#treegrid" property="rdfs:comment" datatype="xsd:string">A grid
+      whose rows can be expanded and collapsed in the same manner as for a tree.</dd>
+    <dt id="treeitem" about="#treeitem" typeof="rdf:Property">treeitem</dt>
+    <dd about="#treeitem" property="rdfs:comment" datatype="xsd:string">An option
+      item of a tree. This is an element within a tree that may be expanded or
+      collapsed if it contains a sub-level group of treeitems.</dd>
+  </dl>
+</div>
+
+<h2>Appendix A - References</h2>
+<dl>
+  <dt><a id="ref_ITS" class="normref">[ITS]</a></dt>
+    <dd>"<cite><a href="http://www.w3.org/TR/2007/REC-its-20070403/">The
+      Internationalization Tag Set (ITS) Version 1.0</a></cite>", W3C
+      Recommendation, C. Lieske, F. Sasaki, 3 April 2007.<br />
+      Available at: http://www.w3.org/TR/2007/REC-its-20070403/</dd>
+  <dt><a id="ref_P3P" class="normref">[P3P]</a></dt>
+    <dd>"<cite><a href="http://www.w3.org/TR/2002/REC-P3P-20020416/">The
+      Platform for Privacy Preferences 1.0 (P3P1.0) Specification</a></cite>",
+      W3C Recommendation, L. Cranor <i xml:lang="la">et al.</i>, 16 April
+      2002.<br />
+      Available at: http://www.w3.org/TR/2002/REC-P3P-20020416/</dd>
+  <dt>[<a id="ref_XHTMLMOD" class="normref">XHTMLMOD</a>]</dt>
+    <dd><cite><a
+      href="http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008">XHTML
+      Modularization 1.1</a></cite>, W3C Recommendation, Shane McCarron, <em>et
+      al.</em>, 8 October 2008<br />
+      http://www.w3.org/TR/2008/REC-xhtml-modularization-20081008</dd>
+  <dt class="label" id="ref_XHTMLRDFa">[XHTMLRDFa]</dt>
+    <dd>"<cite><a
+      href="http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014">RDFa in XHTML:
+      Syntax and Processing</a></cite>", W3C Recommendation, B. Adida, <em>et
+      al.</em>, 14 October 2008.<br />
+      http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014.</dd>
+  <dt class="label" id="ref_XHTMLROLE">[XHTMLROLE]</dt>
+    <dd>"<cite><a href="http://www.w3.org/TR/2008/WD-xhtml-role-20080407">XHTML
+      Role Attribute Module</a></cite>", W3C Working Draft, M. Birbeck, et. al.
+      7 April 2008. http://www.w3.org/TR/2008/WD-xhtml-role-20080407<br />
+    </dd>
+</dl>
+<hr />
+<address>
+  <a href="http://www.cwi.nl/~steven/">Steven Pemberton</a>, W3C HTML Activity
+  Lead 
+</address>
+<address>
+  Last edited: <!--$date=-->2010-01-27</address>
+</body>
+</html>
diff --git a/binsrc/config/ccdefs.c b/binsrc/config/ccdefs.c
index 2e3874c..e6e2a5a 100644
--- a/binsrc/config/ccdefs.c
+++ b/binsrc/config/ccdefs.c
@@ -1,14 +1,14 @@
 /*
  *  ccdefs.c
  *
- *  $Id: ccdefs.c,v 1.2 2008/07/03 13:44:22 source Exp $
+ *  $Id: ccdefs.c,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
  *
  *  Determine & report the Makeconfig variables
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/config/libtool.m4 b/binsrc/config/libtool.m4
index 671cde1..88de383 100644
--- a/binsrc/config/libtool.m4
+++ b/binsrc/config/libtool.m4
@@ -1,7 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -10,7 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ])
 
-# serial 56 LT_INIT
+# serial 57 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -66,6 +68,7 @@ esac
 # ------------------
 AC_DEFUN([LT_INIT],
 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
 AC_BEFORE([$0], [LTDL_INIT])dnl
@@ -82,6 +85,8 @@ AC_REQUIRE([LTVERSION_VERSION])dnl
 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 m4_require([_LT_PROG_LTMAIN])dnl
 
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
 dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
@@ -118,7 +123,7 @@ m4_defun([_LT_CC_BASENAME],
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 ])
 
 
@@ -138,6 +143,9 @@ m4_defun([_LT_FILEUTILS_DEFAULTS],
 m4_defun([_LT_SETUP],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -160,10 +168,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
 # See if we are running on zsh, and set the options which allow our
@@ -179,7 +190,6 @@ fi
 _LT_CHECK_OBJDIR
 
 m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
@@ -193,23 +203,6 @@ aix3*)
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
@@ -250,6 +243,28 @@ _LT_CONFIG_COMMANDS
 ])# _LT_SETUP
 
 
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
 # _LT_PROG_LTMAIN
 # ---------------
 # Note that this code is called both from `configure', and `config.status'
@@ -408,7 +423,7 @@ m4_define([_lt_decl_all_varnames],
 # declaration there will have the same value as in `configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
 
 # _LT_CONFIG_STATUS_DECLARATIONS
@@ -418,7 +433,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE],
 # embedded single quotes properly.  In configure, this macro expands
 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 #
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
@@ -517,12 +532,20 @@ LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -533,9 +556,9 @@ done
 # Double-quote double-evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -543,16 +566,38 @@ for var in lt_decl_all_varnames([[ \
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
 _LT_OUTPUT_LIBTOOL_INIT
 ])
 
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
 # ---------
@@ -562,20 +607,11 @@ _LT_OUTPUT_LIBTOOL_INIT
 AC_DEFUN([LT_OUTPUT],
 [: ${CONFIG_LT=./config.lt}
 AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
 
 cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
+lt_cl_silent=false
 exec AS_MESSAGE_LOG_FD>>config.log
 {
   echo
@@ -601,7 +637,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
@@ -646,15 +682,13 @@ chmod +x "$CONFIG_LT"
 # appending to config.log, which fails on DOS, as config.log is still kept
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
 ])# LT_OUTPUT
 
 
@@ -717,15 +751,12 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  _LT_PROG_XSI_SHELLFNS
+  _LT_PROG_REPLACE_SHELLFNS
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 ],
@@ -831,11 +862,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
 
 # _LT_TAG_COMPILER
@@ -940,6 +973,31 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -967,7 +1025,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -987,7 +1045,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
@@ -995,7 +1057,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    output_verbose_link_cmd=func_echo_all
     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
@@ -1011,203 +1073,142 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   fi
 ])
 
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
 # Links a minimal program and checks the executable
 # for the system default hardcoded library path. In most cases,
 # this is /usr/lib:/lib, but when the MPI compilers are used
 # the location of the communication and MPI libs are included too.
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
 ])# _LT_SYS_MODULE_PATH_AIX
 
 
 # _LT_SHELL_INIT(ARG)
 # -------------------
 m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
 
 
 # _LT_PROG_ECHO_BACKSLASH
 # -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
 else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
 fi
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
 
-	  if test "$prev" != 'sed 50q "[$]0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
-AC_SUBST(lt_ECHO)
-])
 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 ])# _LT_PROG_ECHO_BACKSLASH
 
 
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
 # _LT_ENABLE_LOCK
 # ---------------
 m4_defun([_LT_ENABLE_LOCK],
@@ -1236,7 +1237,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
@@ -1354,14 +1355,47 @@ need_locks="$enable_libtool_lock"
 ])# _LT_ENABLE_LOCK
 
 
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
 # _LT_CMD_OLD_ARCHIVE
 # -------------------
 m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
+[_LT_PROG_AR
 
 AC_CHECK_TOOL(STRIP, strip, :)
 test -z "$STRIP" && STRIP=:
@@ -1388,10 +1422,19 @@ if test -n "$RANLIB"; then
   esac
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
 _LT_DECL([], [old_postinstall_cmds], [2])
 _LT_DECL([], [old_postuninstall_cmds], [2])
 _LT_TAGDECL([], [old_archive_cmds], [2],
     [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
 ])# _LT_CMD_OLD_ARCHIVE
 
 
@@ -1416,15 +1459,15 @@ AC_CACHE_CHECK([$1], [$2],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        $2=yes
@@ -1464,7 +1507,7 @@ AC_CACHE_CHECK([$1], [$2],
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          $2=yes
@@ -1527,6 +1570,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -1591,8 +1639,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
@@ -1643,7 +1691,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
+[#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -1684,7 +1732,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1693,7 +1747,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -1869,16 +1927,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
@@ -2037,6 +2095,7 @@ m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
 	[], [
@@ -2045,16 +2104,23 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
   # and add multilib dir if necessary.
   lt_tmp_lt_search_path_spec=
@@ -2067,7 +2133,7 @@ if test "$GCC" = yes; then
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -2087,7 +2153,13 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi])
@@ -2175,7 +2247,7 @@ amigaos*)
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
@@ -2206,8 +2278,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -2228,36 +2301,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -2344,6 +2464,19 @@ gnu*)
   hardcode_into_libs=yes
   ;;
 
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
 hpux9* | hpux10* | hpux11*)
   # Give a soname corresponding to the major version so that dld.sl refuses to
   # link against other versions.
@@ -2386,8 +2519,10 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[[3-9]]*)
@@ -2445,7 +2580,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -2454,16 +2589,21 @@ linux* | k*bsd*-gnu)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+	 [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
@@ -2475,8 +2615,9 @@ linux* | k*bsd*-gnu)
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -2708,6 +2849,8 @@ _LT_DECL([], [library_names_spec], [1],
     The last name is the one that the linker finds with -lNAME]])
 _LT_DECL([], [soname_spec], [1],
     [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
 _LT_DECL([], [postinstall_cmds], [2],
     [Command to use after installation of a shared archive])
 _LT_DECL([], [postuninstall_cmds], [2],
@@ -2820,6 +2963,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
@@ -2941,6 +3085,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -2949,8 +3098,8 @@ case $host_os in
     fi
     ;;
 esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
@@ -3002,16 +3151,18 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -3041,6 +3192,10 @@ gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 hpux10.20* | hpux11*)
   lt_cv_file_magic_cmd=/usr/bin/file
   case $host_cpu in
@@ -3049,11 +3204,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -3075,7 +3230,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3153,6 +3308,21 @@ tpf*)
   ;;
 esac
 ])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -3160,7 +3330,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 _LT_DECL([], [deplibs_check_method], [1],
     [Method to check whether dependent libraries are shared objects])
 _LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 ])# _LT_CHECK_MAGIC_METHOD
 
 
@@ -3217,7 +3391,19 @@ if test "$lt_cv_path_NM" != "no"; then
   NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
   AC_SUBST([DUMPBIN])
   if test "$DUMPBIN" != ":"; then
     NM="$DUMPBIN"
@@ -3230,13 +3416,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -3251,6 +3437,67 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AM_PROG_NM], [])
 dnl AC_DEFUN([AC_PROG_NM], [])
 
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
 
 # LT_LIB_M
 # --------
@@ -3259,7 +3506,7 @@ AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
@@ -3287,7 +3534,12 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
 if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
 
   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
@@ -3304,6 +3556,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
 AC_REQUIRE([LT_PATH_LD])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -3371,8 +3624,8 @@ esac
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -3408,6 +3661,7 @@ for ac_symprfx in "" "_"; do
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -3429,7 +3683,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -3441,6 +3695,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t at _DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t at _DLSYM_CONST
+#else
+# define LT@&t at _DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -3452,7 +3718,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT@&t at _DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -3478,15 +3744,15 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
 	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 	fi
@@ -3519,6 +3785,13 @@ else
   AC_MSG_RESULT(ok)
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
@@ -3529,6 +3802,8 @@ _LT_DECL([global_symbol_to_c_name_address],
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
 
 
@@ -3540,7 +3815,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
@@ -3591,6 +3865,11 @@ m4_if([$1], [CXX], [
       # DJGPP does not support shared libraries at all
       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
       ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
     interix[[3-9]]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
@@ -3640,6 +3919,12 @@ m4_if([$1], [CXX], [
 	  ;;
 	esac
 	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	m4_if([$1], [GCJ], [],
+	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+	;;
       dgux*)
 	case $cc_basename in
 	  ec++*)
@@ -3696,7 +3981,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -3729,8 +4014,8 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
+	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -3792,7 +4077,7 @@ m4_if([$1], [CXX], [
 	;;
       solaris*)
 	case $cc_basename in
-	  CC*)
+	  CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -3896,6 +4181,12 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -3938,6 +4229,13 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
@@ -3980,7 +4278,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -4001,7 +4299,13 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4013,25 +4317,25 @@ m4_if([$1], [CXX], [
         # All Alpha code is PIC.
         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
+	*Sun\ F* | *Sun*Fortran*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	*Sun\ C*)
+	  # Sun C 5.9
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	  ;;
 	esac
 	;;
@@ -4063,7 +4367,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
       *)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
@@ -4120,9 +4424,11 @@ case $host_os in
     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
     ;;
 esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-	[How to pass a linker flag through the compiler])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4141,6 +4447,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 	[Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
@@ -4161,6 +4469,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 m4_defun([_LT_LINKER_SHLIBS],
 [AC_REQUIRE([LT_PATH_LD])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -4169,27 +4478,35 @@ m4_require([_LT_TAG_COMPILER])dnl
 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 m4_if([$1], [CXX], [
   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
+    ;;
   cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    case $cc_basename in
+    cl*) ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    ;;
   esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 ], [
   runpath_var=
   _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -4252,7 +4569,33 @@ dnl Note also adjust exclude_expsyms for C++ above.
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
   if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
@@ -4270,6 +4613,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     fi
     supports_anon_versioning=no
     case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -4285,11 +4629,12 @@ dnl Note also adjust exclude_expsyms for C++ above.
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -4325,10 +4670,12 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -4346,6 +4693,11 @@ _LT_EOF
       fi
       ;;
 
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -4361,7 +4713,7 @@ _LT_EOF
       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
@@ -4371,15 +4723,16 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 	 && test "$tmp_diet" = no
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -4390,13 +4743,17 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
@@ -4412,17 +4769,17 @@ _LT_EOF
         fi
 
 	case $cc_basename in
-	xlf*)
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -4436,8 +4793,8 @@ _LT_EOF
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4455,8 +4812,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4502,8 +4859,8 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4543,8 +4900,10 @@ _LT_EOF
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
@@ -4631,9 +4990,9 @@ _LT_EOF
 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
+        _LT_SYS_MODULE_PATH_AIX([$1])
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
 	if test "$host_cpu" = ia64; then
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -4642,14 +5001,19 @@ _LT_EOF
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX
+	 _LT_SYS_MODULE_PATH_AIX([$1])
 	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
 	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  fi
 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 	  # This is similar to how AIX traditionally builds its shared libraries.
 	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
@@ -4681,20 +5045,63 @@ _LT_EOF
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	# FIXME: Should let the user specify the lib program.
+	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4732,7 +5139,7 @@ _LT_EOF
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -4740,7 +5147,7 @@ _LT_EOF
 
     hpux9*)
       if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
@@ -4755,8 +5162,8 @@ _LT_EOF
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -4774,16 +5181,16 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
@@ -4795,7 +5202,14 @@ _LT_EOF
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	m4_if($1, [], [
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  _LT_LINKER_OPTION([if $CC understands -b],
+	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 	  ;;
 	esac
       fi
@@ -4823,19 +5237,34 @@ _LT_EOF
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
@@ -4897,17 +5326,17 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
@@ -4917,13 +5346,13 @@ _LT_EOF
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -4936,9 +5365,9 @@ _LT_EOF
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
 	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
@@ -5114,36 +5543,38 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+	[$RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+	  _LT_TAGVAR(allow_undefined_flag, $1)=
+	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+	  then
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	  else
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  fi
+	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
       ;;
     esac
   fi
@@ -5208,8 +5639,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
     to runtime path list])
 _LT_TAGDECL([], [link_all_deplibs], [0],
     [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
 _LT_TAGDECL([], [always_export_symbols], [0],
     [Set to "yes" if exported symbols are required])
 _LT_TAGDECL([], [export_symbols_cmds], [2],
@@ -5220,6 +5649,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
     [Symbols that must always be exported])
 _LT_TAGDECL([], [prelink_cmds], [2],
     [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
 _LT_TAGDECL([], [file_list_spec], [1],
     [Specify filename containing input files])
 dnl FIXME: Not yet implemented
@@ -5313,37 +5744,22 @@ CC="$lt_save_CC"
 ])# _LT_LANG_C_CONFIG
 
 
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
 # _LT_LANG_CXX_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
 # the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
 
 AC_LANG_PUSH(C++)
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5365,6 +5781,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -5396,6 +5814,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -5413,6 +5832,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -5434,8 +5854,8 @@ if test "$_lt_caught_CXX_error" != yes; then
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
       if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5467,7 +5887,7 @@ if test "$_lt_caught_CXX_error" != yes; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -5576,10 +5996,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          _LT_SYS_MODULE_PATH_AIX
+          _LT_SYS_MODULE_PATH_AIX([$1])
           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
         else
           if test "$host_cpu" = ia64; then
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -5588,14 +6008,19 @@ if test "$_lt_caught_CXX_error" != yes; then
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX
+	    _LT_SYS_MODULE_PATH_AIX([$1])
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 	    # Warning - without using the other run time loading flags,
 	    # -berok will link without error, but may produce a broken library.
 	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    fi
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 	    # This is similar to how AIX traditionally builds its shared
 	    # libraries.
@@ -5625,28 +6050,75 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    cp $export_symbols $output_objdir/$soname.def;
-          else
-	    echo EXPORTS > $output_objdir/$soname.def;
-	    cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=".dll"
+	  # FIXME: Setting linknames here is a bad hack.
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=no
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	  ;;
+	esac
+	;;
       darwin* | rhapsody*)
         _LT_DARWIN_LINKER_FEATURES($1)
 	;;
@@ -5688,6 +6160,11 @@ if test "$_lt_caught_CXX_error" != yes; then
       gnu*)
         ;;
 
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        ;;
+
       hpux9*)
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -5712,11 +6189,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
             if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5777,7 +6254,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
 	    if test "$GXX" = yes; then
@@ -5787,10 +6264,10 @@ if test "$_lt_caught_CXX_error" != yes; then
 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -5820,7 +6297,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -5831,9 +6308,9 @@ if test "$_lt_caught_CXX_error" != yes; then
           *)
 	    if test "$GXX" = yes; then
 	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 	      fi
 	    fi
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -5844,7 +6321,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -5862,7 +6339,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5899,26 +6376,26 @@ if test "$_lt_caught_CXX_error" != yes; then
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
-	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
 		rm -rf $tpldir~
 		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
 		rm -rf $tpldir~
 		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
 		$RANLIB $oldlib'
 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
 		rm -rf $tpldir~
 		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
 		rm -rf $tpldir~
 		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 	      ;;
-	    *) # Version 6 will use weak symbols
+	    *) # Version 6 and above use weak symbols
 	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 	      ;;
@@ -5926,7 +6403,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
@@ -5945,9 +6422,9 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
-	  xl*)
+	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5967,13 +6444,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	      _LT_TAGVAR(compiler_needs_object, $1)=yes
 
 	      # Not sure whether something based on
 	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 	      # would be better.
-	      output_verbose_link_cmd='echo'
+	      output_verbose_link_cmd='func_echo_all'
 
 	      # Archives containing C++ object files must be created using
 	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6042,7 +6519,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 	  fi
-	  output_verbose_link_cmd=echo
+	  output_verbose_link_cmd=func_echo_all
 	else
 	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
@@ -6077,15 +6554,15 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    case $host in
 	      osf3*)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 		;;
 	      *)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
 	          $RM $lib.exp'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 		;;
@@ -6101,17 +6578,17 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
 	  *)
 	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 	      case $host in
 	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	      esac
 
@@ -6121,7 +6598,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	      # Commands to make compiler produce verbose output that lists
 	      # what "hidden" libraries, object files and flags are used when
 	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
 	    else
 	      # FIXME: insert proper C++ library support
@@ -6157,7 +6634,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -6178,7 +6655,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    esac
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 
-	    output_verbose_link_cmd='echo'
+	    output_verbose_link_cmd='func_echo_all'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6198,14 +6675,14 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
 	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
 	        # platform.
@@ -6216,7 +6693,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
@@ -6270,6 +6747,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           CC*)
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+	      '"$_LT_TAGVAR(reload_cmds, $1)"
 	    ;;
 	  *)
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
@@ -6325,6 +6806,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -6339,6 +6821,29 @@ AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
 
 
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6347,6 +6852,7 @@ AC_LANG_POP
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
 _LT_TAGVAR(postdep_objects, $1)=
@@ -6397,6 +6903,13 @@ public class foo {
 };
 _LT_EOF
 ])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
 dnl Parse the compiler output and extract the necessary
 dnl objects, libraries and library flags.
 if AC_TRY_EVAL(ac_compile); then
@@ -6408,7 +6921,7 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
@@ -6417,13 +6930,22 @@ if AC_TRY_EVAL(ac_compile); then
           test $p = "-R"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        fi
 
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
        if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
+	 case ${prev} in
+	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
@@ -6443,8 +6965,10 @@ if AC_TRY_EVAL(ac_compile); then
 	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 	 fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -6480,6 +7004,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],
@@ -6516,7 +7041,7 @@ linux*)
 
 solaris*)
   case $cc_basename in
-  CC*)
+  CC* | sunCC*)
     # The more standards-conforming stlport4 library is
     # incompatible with the Cstd library. Avoid specifying
     # it if it's in CXXFLAGS. Ignore libCrun as
@@ -6560,32 +7085,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 ])# _LT_SYS_HIDDEN_LIBDEPS
 
 
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
 # _LT_LANG_F77_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6604,6 +7113,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6643,7 +7154,9 @@ if test "$_lt_disable_F77" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -6697,38 +7210,24 @@ if test "$_lt_disable_F77" != yes; then
 
   GCC=$lt_save_GCC
   CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
 fi # test "$_lt_disable_F77" != yes
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
 
 
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
 # _LT_LANG_FC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6747,6 +7246,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6786,7 +7287,9 @@ if test "$_lt_disable_FC" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
@@ -6842,7 +7345,8 @@ if test "$_lt_disable_FC" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
 fi # test "$_lt_disable_FC" != yes
 
 AC_LANG_POP
@@ -6879,10 +7383,12 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=yes
 CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_TAGVAR(LD, $1)="$LD"
@@ -6892,6 +7398,8 @@ _LT_CC_BASENAME([$compiler])
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
 ## CAVEAT EMPTOR:
 ## There is no encapsulation within the following macros, do not change
@@ -6911,7 +7419,8 @@ fi
 AC_LANG_RESTORE
 
 GCC=$lt_save_GCC
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
@@ -6946,9 +7455,11 @@ _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
 CC=${RC-"windres"}
+CFLAGS=
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_CC_BASENAME([$compiler])
@@ -6961,7 +7472,8 @@ fi
 
 GCC=$lt_save_GCC
 AC_LANG_RESTORE
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_RC_CONFIG
 
 
@@ -7020,6 +7532,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 AC_SUBST([OBJDUMP])
 ])
 
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
 
 # _LT_DECL_SED
 # ------------
@@ -7113,8 +7634,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES],
 # Try some XSI features
 xsi_shell=no
 ( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
     && eval 'test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
@@ -7153,208 +7674,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
 
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
 
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
 
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
 
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
 
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
-_LT_EOF
-esac
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
 
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
     ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
     ;;
-  esac
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
 ])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/binsrc/config/ltmain.sh b/binsrc/config/ltmain.sh
index a72f2fd..aa5624c 100755
--- a/binsrc/config/ltmain.sh
+++ b/binsrc/config/ltmain.sh
@@ -1,9 +1,9 @@
-# Generated from ltmain.m4sh.
 
-# ltmain.sh (GNU libtool) 2.2.6b
+# libtool (GNU libtool) 2.4
 # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -32,50 +32,56 @@
 #
 # Provide generalized library-building support services.
 #
-#     --config             show all configuration variables
-#     --debug              enable verbose shell tracing
-# -n, --dry-run            display commands without modifying any files
-#     --features           display basic configuration information and exit
-#     --mode=MODE          use operation mode MODE
-#     --preserve-dup-deps  don't remove duplicate dependency libraries
-#     --quiet, --silent    don't print informational messages
-#     --tag=TAG            use configuration variables from tag TAG
-# -v, --verbose            print informational messages (default)
-#     --version            print version information
-# -h, --help               print short or long help message
+#       --config             show all configuration variables
+#       --debug              enable verbose shell tracing
+#   -n, --dry-run            display commands without modifying any files
+#       --features           display basic configuration information and exit
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
 #
 # MODE must be one of the following:
 #
-#       clean              remove files from the build directory
-#       compile            compile a source file into a libtool object
-#       execute            automatically set library path, then run a program
-#       finish             complete the installation of libtool libraries
-#       install            install libraries or executables
-#       link               create a library or an executable
-#       uninstall          remove libraries from an installed directory
+#         clean              remove files from the build directory
+#         compile            compile a source file into a libtool object
+#         execute            automatically set library path, then run a program
+#         finish             complete the installation of libtool libraries
+#         install            install libraries or executables
+#         link               create a library or an executable
+#         uninstall          remove libraries from an installed directory
 #
-# MODE-ARGS vary depending on the MODE.
+# MODE-ARGS vary depending on the MODE.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
 #
 # When reporting a bug, please describe a test case to reproduce it and
 # include the following information:
 #
-#       host-triplet:	$host
-#       shell:		$SHELL
-#       compiler:		$LTCC
-#       compiler flags:		$LTCFLAGS
-#       linker:		$LD (gnu? $with_gnu_ld)
-#       $progname:		(GNU libtool) 2.2.6b
-#       automake:		$automake_version
-#       autoconf:		$autoconf_version
+#         host-triplet:	$host
+#         shell:		$SHELL
+#         compiler:		$LTCC
+#         compiler flags:		$LTCFLAGS
+#         linker:		$LD (gnu? $with_gnu_ld)
+#         $progname:	(GNU libtool) 2.4
+#         automake:	$automake_version
+#         autoconf:	$autoconf_version
 #
 # Report bugs to <bug-libtool at gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
-PROGRAM=ltmain.sh
+PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.2.6b
+VERSION=2.4
 TIMESTAMP=""
-package_revision=1.3017
+package_revision=1.3293
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -91,10 +97,15 @@ fi
 BIN_SH=xpg4; export BIN_SH # for Tru64
 DUALCASE=1; export DUALCASE # for MKS sh
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
 # NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
 lt_user_locale=
 lt_safe_locale=
 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
@@ -107,15 +118,24 @@ do
 	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
 	fi"
 done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
 
 $lt_unset CDPATH
 
 
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
 
 
 
 : ${CP="cp -f"}
-: ${ECHO="echo"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
 : ${EGREP="/bin/grep -E"}
 : ${FGREP="/bin/grep -F"}
 : ${GREP="/bin/grep"}
@@ -144,6 +164,27 @@ IFS=" 	$lt_nl"
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,"
 
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
 # func_dirname_and_basename file append nondir_replacement
 # perform func_basename and func_dirname in a single function
 # call:
@@ -158,33 +199,183 @@ basename="s,^.*/,,"
 # those functions but instead duplicate the functionality here.
 func_dirname_and_basename ()
 {
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+		s@/\./@/@g
+		t dotsl
+		s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
 }
 
-# Generated shell functions inserted here.
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
 
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
 
 # The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
 func_dirname_and_basename "$progpath"
 progname=$func_basename_result
-case $progname in
-  -*) progname=./$progname ;;
-esac
 
 # Make sure we have an absolute path for reexecution:
 case $progpath in
@@ -215,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
 # Same as above, but do not quote variable references.
 double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
 # Re-`\' parameter expansions in output of double_quote_subst that were
 # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
 # in input to double_quote_subst, that '$' was protected from expansion.
@@ -243,7 +443,7 @@ opt_warning=:
 # name if it has been set yet.
 func_echo ()
 {
-    $ECHO "$progname${mode+: }$mode: $*"
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
 }
 
 # func_verbose arg...
@@ -258,18 +458,25 @@ func_verbose ()
     :
 }
 
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
 # func_error arg...
 # Echo program name prefixed message to standard error.
 func_error ()
 {
-    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
 }
 
 # func_warning arg...
 # Echo program name prefixed warning message to standard error.
 func_warning ()
 {
-    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
 
     # bash bug again:
     :
@@ -326,9 +533,9 @@ func_mkdir_p ()
         case $my_directory_path in */*) ;; *) break ;; esac
 
         # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
       done
-      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
 
       save_mkdir_p_IFS="$IFS"; IFS=':'
       for my_dir in $my_dir_list; do
@@ -378,7 +585,7 @@ func_mktempdir ()
         func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
     fi
 
-    $ECHO "X$my_tmpdir" | $Xsed
+    $ECHO "$my_tmpdir"
 }
 
 
@@ -392,7 +599,7 @@ func_quote_for_eval ()
 {
     case $1 in
       *[\\\`\"\$]*)
-	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+	func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
       *)
         func_quote_for_eval_unquoted_result="$1" ;;
     esac
@@ -419,7 +626,7 @@ func_quote_for_expand ()
 {
     case $1 in
       *[\\\`\"]*)
-	my_arg=`$ECHO "X$1" | $Xsed \
+	my_arg=`$ECHO "$1" | $SED \
 	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
       *)
         my_arg="$1" ;;
@@ -488,15 +695,39 @@ func_show_eval_locale ()
     fi
 }
 
-
-
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
 
 
 # func_version
 # Echo version message to standard output and exit.
 func_version ()
 {
-    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+	:more
+	/\./!{
+	  N
+	  s/\n# / /
+	  b more
+	}
+	:go
+	/^# '$PROGRAM' (GNU /,/# warranty; / {
         s/^# //
 	s/^# *$//
         s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
@@ -509,22 +740,28 @@ func_version ()
 # Echo short help message to standard output and exit.
 func_usage ()
 {
-    $SED -n '/^# Usage:/,/# -h/ {
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
         s/^# //
 	s/^# *$//
 	s/\$progname/'$progname'/
 	p
     }' < "$progpath"
-    $ECHO
+    echo
     $ECHO "run \`$progname --help | more' for full usage"
     exit $?
 }
 
-# func_help
-# Echo long help message to standard output and exit.
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
 func_help ()
 {
+    $opt_debug
+
     $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
         s/^# //
 	s/^# *$//
 	s*\$progname*'$progname'*
@@ -537,8 +774,15 @@ func_help ()
 	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
 	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
 	p
-     }' < "$progpath"
-    exit $?
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
 }
 
 # func_missing_arg argname
@@ -546,63 +790,106 @@ func_help ()
 # exit_cmd.
 func_missing_arg ()
 {
-    func_error "missing argument for $1"
+    $opt_debug
+
+    func_error "missing argument for $1."
     exit_cmd=exit
 }
 
-exit_cmd=:
 
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
 
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
 
 
 
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell, and then maybe $ECHO will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
 
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
 
 magic="%%%MAGIC variable%%%"
 magic_exe="%%%MAGIC EXE variable%%%"
 
 # Global variables.
-# $mode is unset
 nonopt=
-execute_dlfiles=
 preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 extracted_archives=
 extracted_serial=0
 
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
 # If this variable is set in any of the actions, the command in it
 # will be execed at the end.  This prevents here-documents from being
 # left over by shells.
 exec_cmd=
 
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
 # func_fatal_configuration arg...
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
@@ -636,16 +923,16 @@ func_config ()
 # Display the features supported by this script.
 func_features ()
 {
-    $ECHO "host: $host"
+    echo "host: $host"
     if test "$build_libtool_libs" = yes; then
-      $ECHO "enable shared libraries"
+      echo "enable shared libraries"
     else
-      $ECHO "disable shared libraries"
+      echo "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      $ECHO "enable static libraries"
+      echo "enable static libraries"
     else
-      $ECHO "disable static libraries"
+      echo "disable static libraries"
     fi
 
     exit $?
@@ -692,117 +979,204 @@ func_enable_tag ()
   esac
 }
 
-# Parse options once, thoroughly.  This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
 {
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
 
-  # Shorthand for --mode=foo, only valid as the first argument
-  case $1 in
-  clean|clea|cle|cl)
-    shift; set dummy --mode clean ${1+"$@"}; shift
-    ;;
-  compile|compil|compi|comp|com|co|c)
-    shift; set dummy --mode compile ${1+"$@"}; shift
-    ;;
-  execute|execut|execu|exec|exe|ex|e)
-    shift; set dummy --mode execute ${1+"$@"}; shift
-    ;;
-  finish|finis|fini|fin|fi|f)
-    shift; set dummy --mode finish ${1+"$@"}; shift
-    ;;
-  install|instal|insta|inst|ins|in|i)
-    shift; set dummy --mode install ${1+"$@"}; shift
-    ;;
-  link|lin|li|l)
-    shift; set dummy --mode link ${1+"$@"}; shift
-    ;;
-  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-    shift; set dummy --mode uninstall ${1+"$@"}; shift
-    ;;
-  esac
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
 
-  # Parse non-mode specific arguments:
-  while test "$#" -gt 0; do
+
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
     opt="$1"
     shift
-
     case $opt in
-      --config)		func_config					;;
-
-      --debug)		preserve_args="$preserve_args $opt"
+      --debug|-x)	opt_debug='set -x'
 			func_echo "enabling shell trace mode"
-			opt_debug='set -x'
 			$opt_debug
 			;;
-
-      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			execute_dlfiles="$execute_dlfiles $1"
-			shift
+      --dry-run|--dryrun|-n)
+			opt_dry_run=:
 			;;
-
-      --dry-run | -n)	opt_dry_run=:					;;
-      --features)       func_features					;;
-      --finish)		mode="finish"					;;
-
-      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			case $1 in
-			  # Valid mode arguments:
-			  clean)	;;
-			  compile)	;;
-			  execute)	;;
-			  finish)	;;
-			  install)	;;
-			  link)		;;
-			  relink)	;;
-			  uninstall)	;;
-
-			  # Catch anything else as an error
-			  *) func_error "invalid argument for $opt"
-			     exit_cmd=exit
-			     break
-			     ;;
-		        esac
-
-			mode="$1"
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
 			shift
 			;;
-
       --preserve-dup-deps)
-			opt_duplicate_deps=:				;;
-
-      --quiet|--silent)	preserve_args="$preserve_args $opt"
-			opt_silent=:
+			opt_preserve_dup_deps=:
 			;;
-
-      --verbose| -v)	preserve_args="$preserve_args $opt"
+      --features)
+			opt_features=:
+func_features
+			;;
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+			shift
+			;;
+      --no-silent|--no-quiet)
 			opt_silent=false
+func_append preserve_args " $opt"
 			;;
-
-      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			preserve_args="$preserve_args $opt $1"
-			func_enable_tag "$1"	# tagname is set here
+      --no-verbose)
+			opt_verbose=false
+func_append preserve_args " $opt"
+			;;
+      --silent|--quiet)
+			opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
 			shift
 			;;
 
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
       # Separate optargs to long options:
-      -dlopen=*|--mode=*|--tag=*)
-			func_opt_split "$opt"
-			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
 			shift
 			;;
 
-      -\?|-h)		func_usage					;;
-      --help)		opt_help=:					;;
-      --version)	func_version					;;
-
-      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
-
-      *)		nonopt="$opt"
-			break
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
 			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
     esac
   done
 
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
 
   case $host in
     *cygwin* | *mingw* | *pw32* | *cegcc*)
@@ -810,82 +1184,44 @@ func_enable_tag ()
       opt_duplicate_compiler_generated_deps=:
       ;;
     *)
-      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
       ;;
   esac
 
-  # Having warned about all mis-specified options, bail out if
-  # anything was wrong.
-  $exit_cmd $EXIT_FAILURE
-}
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
 
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
-  if test "$package_revision" != "$macro_revision"; then
-    if test "$VERSION" != "$macro_version"; then
-      if test -z "$macro_version"; then
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      else
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      fi
-    else
-      cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
     fi
 
-    exit $EXIT_MISMATCH
-  fi
-}
-
-
-## ----------- ##
-##    Main.    ##
-## ----------- ##
-
-$opt_help || {
-  # Sanity checks first:
-  func_check_version_match
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
 
-  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-    func_fatal_configuration "not configured to build any kind of library"
-  fi
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
 
-  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
 
 
-  # Darwin sucks
-  eval std_shrext=\"$shrext_cmds\"
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
 
 
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    func_error "unrecognized option \`-dlopen'"
-    $ECHO "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
 
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$progname --help --mode=$mode' for more information."
-}
 
+## ----------- ##
+##    Main.    ##
+## ----------- ##
 
 # func_lalib_p file
 # True iff FILE is a libtool `.la' library or `.lo' object file.
@@ -950,12 +1286,9 @@ func_ltwrapper_executable_p ()
 # temporary ltwrapper_script.
 func_ltwrapper_scriptname ()
 {
-    func_ltwrapper_scriptname_result=""
-    if func_ltwrapper_executable_p "$1"; then
-	func_dirname_and_basename "$1" "" "."
-	func_stripname '' '.exe' "$func_basename_result"
-	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-    fi
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
 }
 
 # func_ltwrapper_p file
@@ -1001,6 +1334,37 @@ func_source ()
 }
 
 
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case "$lt_sysroot:$1" in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result="=$func_stripname_result"
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
 # func_infer_tag arg
 # Infer tagged configuration to use if any are available and
 # if one wasn't chosen via the "--tag" command line option.
@@ -1013,13 +1377,15 @@ func_infer_tag ()
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
-        func_quote_for_eval "$arg"
-	CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	func_append_quoted CC_quoted "$arg"
       done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
       case $@ in
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
       # Blanks at the start of $base_compile will cause this to fail
       # if we don't check for them as well.
       *)
@@ -1030,11 +1396,13 @@ func_infer_tag ()
 	    CC_quoted=
 	    for arg in $CC; do
 	      # Double-quote args containing other shell metacharacters.
-	      func_quote_for_eval "$arg"
-	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	      func_append_quoted CC_quoted "$arg"
 	    done
+	    CC_expanded=`func_echo_all $CC`
+	    CC_quoted_expanded=`func_echo_all $CC_quoted`
 	    case "$@ " in
-	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+	    " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+	    " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
 	      # The compiler in the base compile command matches
 	      # the one in the tagged configuration.
 	      # Assume this is the tagged configuration we want.
@@ -1097,6 +1465,486 @@ EOF
     }
 }
 
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
 # func_mode_compile arg...
 func_mode_compile ()
 {
@@ -1137,12 +1985,12 @@ func_mode_compile ()
 	  ;;
 
 	-pie | -fpie | -fPIE)
-          pie_flag="$pie_flag $arg"
+          func_append pie_flag " $arg"
 	  continue
 	  ;;
 
 	-shared | -static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
+	  func_append later " $arg"
 	  continue
 	  ;;
 
@@ -1163,15 +2011,14 @@ func_mode_compile ()
 	  save_ifs="$IFS"; IFS=','
 	  for arg in $args; do
 	    IFS="$save_ifs"
-	    func_quote_for_eval "$arg"
-	    lastarg="$lastarg $func_quote_for_eval_result"
+	    func_append_quoted lastarg "$arg"
 	  done
 	  IFS="$save_ifs"
 	  func_stripname ' ' '' "$lastarg"
 	  lastarg=$func_stripname_result
 
 	  # Add the arguments to base_compile.
-	  base_compile="$base_compile $lastarg"
+	  func_append base_compile " $lastarg"
 	  continue
 	  ;;
 
@@ -1187,8 +2034,7 @@ func_mode_compile ()
       esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-      func_quote_for_eval "$lastarg"
-      base_compile="$base_compile $func_quote_for_eval_result"
+      func_append_quoted base_compile "$lastarg"
     done # for arg
 
     case $arg_mode in
@@ -1213,7 +2059,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
@@ -1288,7 +2134,7 @@ func_mode_compile ()
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
     if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
       lockfile="$output_obj.lock"
     else
       output_obj=
@@ -1319,17 +2165,16 @@ compiler."
 	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
-      removelist="$removelist $output_obj"
+      func_append removelist " $output_obj"
       $ECHO "$srcfile" > "$lockfile"
     fi
 
     $opt_dry_run || $RM $removelist
-    removelist="$removelist $lockfile"
+    func_append removelist " $lockfile"
     trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
 
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
     func_quote_for_eval "$srcfile"
     qsrcfile=$func_quote_for_eval_result
 
@@ -1349,7 +2194,7 @@ compiler."
 
       if test -z "$output_obj"; then
 	# Place PIC objects in $objdir
-	command="$command -o $lobj"
+	func_append command " -o $lobj"
       fi
 
       func_show_eval_locale "$command"	\
@@ -1396,11 +2241,11 @@ compiler."
 	command="$base_compile $qsrcfile $pic_flag"
       fi
       if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
+	func_append command " -o $obj"
       fi
 
       # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
+      func_append command "$suppress_output"
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
@@ -1445,13 +2290,13 @@ compiler."
 }
 
 $opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
 {
     # We need to display help for each of the modes.
-    case $mode in
+    case $opt_mode in
       "")
         # Generic help is extracted from the usage comments
         # at the start of this file.
@@ -1482,10 +2327,11 @@ This mode accepts the following additional options:
 
   -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
   -no-suppress      do not suppress compiler output for multiple passes
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
   -shared           do not build a \`.o' file suitable for static linking
   -static           only build a \`.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
 
 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
 from the given SOURCEFILE.
@@ -1538,7 +2384,7 @@ either the \`install' or \`cp' program.
 
 The following components of INSTALL-COMMAND are treated specially:
 
-  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
 The rest of the components are interpreted as arguments to that command (only
 BSD-compatible install options are recognized)."
@@ -1558,6 +2404,8 @@ The following components of LINK-COMMAND are treated specially:
 
   -all-static       do not do any dynamic linking at all
   -avoid-version    do not add a version suffix if possible
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
@@ -1586,6 +2434,11 @@ The following components of LINK-COMMAND are treated specially:
   -version-info CURRENT[:REVISION[:AGE]]
                     specify library version info [each variable defaults to 0]
   -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
 All other options (arguments beginning with \`-') are ignored.
 
@@ -1619,18 +2472,44 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode \`$mode'"
+        func_fatal_help "invalid operation mode \`$opt_mode'"
         ;;
     esac
 
-    $ECHO
+    echo
     $ECHO "Try \`$progname --help' for more information about other modes."
-
-    exit $?
 }
 
-  # Now that we've collected a possible --mode arg, show help if necessary
-  $opt_help && func_mode_help
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test "$opt_help" = :; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	func_mode_help
+      done
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	echo
+	func_mode_help
+      done
+    } |
+    sed '1d
+      /^When reporting/,/^Report/{
+	H
+	d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
 
 
 # func_mode_execute arg...
@@ -1643,13 +2522,16 @@ func_mode_execute ()
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
+    for file in $opt_dlopen; do
       test -f "$file" \
 	|| func_fatal_help "\`$file' is not a file"
 
       dir=
       case $file in
       *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
 	  || func_fatal_help "\`$lib' is not a valid libtool archive"
@@ -1671,7 +2553,7 @@ func_mode_execute ()
 	dir="$func_dirname_result"
 
 	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
+	  func_append dir "/$objdir"
 	else
 	  if test ! -f "$dir/$dlname"; then
 	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
@@ -1712,7 +2594,7 @@ func_mode_execute ()
     for file
     do
       case $file in
-      -*) ;;
+      -* | *.la | *.lo ) ;;
       *)
 	# Do a test to see if this is really a libtool program.
 	if func_ltwrapper_script_p "$file"; then
@@ -1728,8 +2610,7 @@ func_mode_execute ()
 	;;
       esac
       # Quote arguments (to preserve shell metacharacters).
-      func_quote_for_eval "$file"
-      args="$args $func_quote_for_eval_result"
+      func_append_quoted args "$file"
     done
 
     if test "X$opt_dry_run" = Xfalse; then
@@ -1754,29 +2635,66 @@ func_mode_execute ()
       # Display what would be done.
       if test -n "$shlibpath_var"; then
 	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-	$ECHO "export $shlibpath_var"
+	echo "export $shlibpath_var"
       fi
       $ECHO "$cmd$args"
       exit $EXIT_SUCCESS
     fi
 }
 
-test "$mode" = execute && func_mode_execute ${1+"$@"}
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libs=
+    libdirs=
+    admincmds=
+
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+	func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+	if func_lalib_unsafe_p "$opt"; then
+	  func_append libs " $opt"
+	else
+	  func_warning "\`$opt' is not a valid libtool archive"
+	fi
+
+      else
+	func_fatal_error "invalid argument \`$opt'"
+      fi
+    done
 
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
 
-# func_mode_finish arg...
-func_mode_finish ()
-{
-    $opt_debug
-    libdirs="$nonopt"
-    admincmds=
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	    > $tmpdir/tmp-la
+	  mv -f $tmpdir/tmp-la $lib
+	done
+        ${RM}r "$tmpdir"
+      fi
+    fi
 
     if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
-
       for libdir in $libdirs; do
 	if test -n "$finish_cmds"; then
 	  # Do each command in the finish commands.
@@ -1786,7 +2704,7 @@ func_mode_finish ()
 	if test -n "$finish_eval"; then
 	  # Do the single finish_eval.
 	  eval cmds=\"$finish_eval\"
-	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+	  $opt_dry_run || eval "$cmds" || func_append admincmds "
        $cmds"
 	fi
       done
@@ -1795,53 +2713,55 @@ func_mode_finish ()
     # Exit here if they wanted silent mode.
     $opt_silent && exit $EXIT_SUCCESS
 
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
-    $ECHO "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $ECHO "   $libdir"
-    done
-    $ECHO
-    $ECHO "If you ever happen to want to link against installed libraries"
-    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
-    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $ECHO "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $ECHO "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $ECHO "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+	$ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+      echo "flag during linking and do at least one of the following:"
+      if test -n "$shlibpath_var"; then
+	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+	echo "     during execution"
+      fi
+      if test -n "$runpath_var"; then
+	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+	echo "     during linking"
+      fi
+      if test -n "$hardcode_libdir_flag_spec"; then
+	libdir=LIBDIR
+	eval flag=\"$hardcode_libdir_flag_spec\"
 
-      $ECHO "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $ECHO "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $ECHO
+	$ECHO "   - use the \`$flag' linker flag"
+      fi
+      if test -n "$admincmds"; then
+	$ECHO "   - have your system administrator run these commands:$admincmds"
+      fi
+      if test -f /etc/ld.so.conf; then
+	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+      fi
+      echo
 
-    $ECHO "See any operating system documentation about shared libraries for"
-    case $host in
-      solaris2.[6789]|solaris2.1[0-9])
-        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
-	$ECHO "pages."
-	;;
-      *)
-        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
-        ;;
-    esac
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
+      echo "See any operating system documentation about shared libraries for"
+      case $host in
+	solaris2.[6789]|solaris2.1[0-9])
+	  echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	  echo "pages."
+	  ;;
+	*)
+	  echo "more information, such as the ld(1) and ld.so(8) manual pages."
+	  ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
     exit $EXIT_SUCCESS
 }
 
-test "$mode" = finish && func_mode_finish ${1+"$@"}
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
@@ -1852,7 +2772,7 @@ func_mode_install ()
     # install_prog (especially on Windows NT).
     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
        # Allow the use of GNU shtool's install command.
-       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+       case $nonopt in *shtool*) :;; *) false;; esac; then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
@@ -1866,7 +2786,12 @@ func_mode_install ()
     # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
     func_quote_for_eval "$arg"
-    install_prog="$install_prog$func_quote_for_eval_result"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1876,10 +2801,12 @@ func_mode_install ()
     install_type=
     isdir=no
     stripme=
+    no_mode=:
     for arg
     do
+      arg2=
       if test -n "$dest"; then
-	files="$files $dest"
+	func_append files " $dest"
 	dest=$arg
 	continue
       fi
@@ -1887,10 +2814,9 @@ func_mode_install ()
       case $arg in
       -d) isdir=yes ;;
       -f)
-	case " $install_prog " in
-	*[\\\ /]cp\ *) ;;
-	*) prev=$arg ;;
-	esac
+	if $install_cp; then :; else
+	  prev=$arg
+	fi
 	;;
       -g | -m | -o)
 	prev=$arg
@@ -1904,6 +2830,10 @@ func_mode_install ()
       *)
 	# If the previous option needed an argument, then skip it.
 	if test -n "$prev"; then
+	  if test "x$prev" = x-m && test -n "$install_override_mode"; then
+	    arg2=$install_override_mode
+	    no_mode=false
+	  fi
 	  prev=
 	else
 	  dest=$arg
@@ -1914,7 +2844,11 @@ func_mode_install ()
 
       # Aesthetically quote the argument.
       func_quote_for_eval "$arg"
-      install_prog="$install_prog $func_quote_for_eval_result"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+	func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
     done
 
     test -z "$install_prog" && \
@@ -1923,6 +2857,13 @@ func_mode_install ()
     test -n "$prev" && \
       func_fatal_help "the \`$prev' option requires an argument"
 
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+	func_quote_for_eval "$install_override_mode"
+	func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
+
     if test -z "$files"; then
       if test -z "$dest"; then
 	func_fatal_help "no file or destination specified"
@@ -1977,10 +2918,13 @@ func_mode_install ()
       case $file in
       *.$libext)
 	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
+	func_append staticlibs " $file"
 	;;
 
       *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
 	  || func_fatal_help "\`$file' is not a valid libtool archive"
@@ -1994,23 +2938,23 @@ func_mode_install ()
 	if test "X$destdir" = "X$libdir"; then
 	  case "$current_libdirs " in
 	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  *) func_append current_libdirs " $libdir" ;;
 	  esac
 	else
 	  # Note the libdir as a future libdir.
 	  case "$future_libdirs " in
 	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  *) func_append future_libdirs " $libdir" ;;
 	  esac
 	fi
 
 	func_dirname "$file" "/" ""
 	dir="$func_dirname_result"
-	dir="$dir$objdir"
+	func_append dir "$objdir"
 
 	if test -n "$relink_command"; then
 	  # Determine the prefix the user has applied to our future dir.
-	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+	  inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
 
 	  # Don't allow the user to place us outside of our expected
 	  # location b/c this prevents finding dependent libraries that
@@ -2023,9 +2967,9 @@ func_mode_install ()
 
 	  if test -n "$inst_prefix_dir"; then
 	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
 	  else
-	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 	  fi
 
 	  func_warning "relinking \`$file'"
@@ -2043,7 +2987,7 @@ func_mode_install ()
 	  test -n "$relink_command" && srcname="$realname"T
 
 	  # Install the shared library and build the symlinks.
-	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
 	      'exit $?'
 	  tstripme="$stripme"
 	  case $host_os in
@@ -2083,7 +3027,7 @@ func_mode_install ()
 	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
 	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
 	;;
 
       *.lo)
@@ -2183,7 +3127,7 @@ func_mode_install ()
 	    if test -f "$lib"; then
 	      func_source "$lib"
 	    fi
-	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
 	    if test -n "$libdir" && test ! -f "$libfile"; then
 	      func_warning "\`$lib' has not been installed in \`$libdir'"
 	      finalize=no
@@ -2202,7 +3146,7 @@ func_mode_install ()
 		file="$func_basename_result"
 	        outputname="$tmpdir/$file"
 	        # Replace the output file specification.
-	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
 	        $opt_silent || {
 	          func_quote_for_expand "$relink_command"
@@ -2221,7 +3165,7 @@ func_mode_install ()
 	    }
 	  else
 	    # Install the binary that we compiled earlier.
-	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	    file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
 	  fi
 	fi
 
@@ -2280,7 +3224,7 @@ func_mode_install ()
     fi
 }
 
-test "$mode" = install && func_mode_install ${1+"$@"}
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -2323,6 +3267,22 @@ func_generate_dlsyms ()
 extern \"C\" {
 #endif
 
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 /* External symbol declarations for the compiler. */\
 "
 
@@ -2332,10 +3292,11 @@ extern \"C\" {
 	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
 
 	  # Add our own program objects to the symbol list.
-	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	  for progfile in $progfiles; do
-	    func_verbose "extracting global C symbols from \`$progfile'"
-	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
 	  done
 
 	  if test -n "$exclude_expsyms"; then
@@ -2371,7 +3332,7 @@ extern \"C\" {
 	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 	      eval '$MV "$nlist"T "$nlist"'
 	      case $host in
-	        *cygwin | *mingw* | *cegcc* )
+	        *cygwin* | *mingw* | *cegcc* )
 	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
 	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
 	          ;;
@@ -2384,10 +3345,52 @@ extern \"C\" {
 	  func_verbose "extracting global C symbols from \`$dlprefile'"
 	  func_basename "$dlprefile"
 	  name="$func_basename_result"
-	  $opt_dry_run || {
-	    eval '$ECHO ": $name " >> "$nlist"'
-	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-	  }
+          case $host in
+	    *cygwin* | *mingw* | *cegcc* )
+	      # if an import library, we need to obtain dlname
+	      if func_win32_import_lib_p "$dlprefile"; then
+	        func_tr_sh "$dlprefile"
+	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
+	        dlprefile_dlbasename=""
+	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+	          # Use subshell, to avoid clobbering current variable values
+	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+	          if test -n "$dlprefile_dlname" ; then
+	            func_basename "$dlprefile_dlname"
+	            dlprefile_dlbasename="$func_basename_result"
+	          else
+	            # no lafile. user explicitly requested -dlpreopen <import library>.
+	            $sharedlib_from_linklib_cmd "$dlprefile"
+	            dlprefile_dlbasename=$sharedlib_from_linklib_result
+	          fi
+	        fi
+	        $opt_dry_run || {
+	          if test -n "$dlprefile_dlbasename" ; then
+	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+	          else
+	            func_warning "Could not compute DLL name from $name"
+	            eval '$ECHO ": $name " >> "$nlist"'
+	          fi
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+	        }
+	      else # not an import lib
+	        $opt_dry_run || {
+	          eval '$ECHO ": $name " >> "$nlist"'
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	        }
+	      fi
+	    ;;
+	    *)
+	      $opt_dry_run || {
+	        eval '$ECHO ": $name " >> "$nlist"'
+	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	      }
+	    ;;
+          esac
 	done
 
 	$opt_dry_run || {
@@ -2415,36 +3418,19 @@ extern \"C\" {
 	  if test -f "$nlist"S; then
 	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
 	  else
-	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
 	  fi
 
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+	  echo >> "$output_objdir/$my_dlsyms" "\
 
 /* The mapping between symbol names and symbols.  */
 typedef struct {
   const char *name;
   void *address;
 } lt_dlsymlist;
-"
-	  case $host in
-	  *cygwin* | *mingw* | *cegcc* )
-	    $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs.  */"
-	    lt_dlsym_const= ;;
-	  *osf5*)
-	    echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
-	    lt_dlsym_const= ;;
-	  *)
-	    lt_dlsym_const=const ;;
-	  esac
-
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
+extern LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
+LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
 {\
   { \"$my_originator\", (void *) 0 },"
@@ -2457,7 +3443,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] =
 	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
 	    ;;
 	  esac
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+	  echo >> "$output_objdir/$my_dlsyms" "\
   {0, (void *) 0}
 };
 
@@ -2500,7 +3486,7 @@ static const void *lt_preloaded_setup() {
 	for arg in $LTCFLAGS; do
 	  case $arg in
 	  -pie | -fpie | -fPIE) ;;
-	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  *) func_append symtab_cflags " $arg" ;;
 	  esac
 	done
 
@@ -2515,16 +3501,16 @@ static const void *lt_preloaded_setup() {
 	case $host in
 	*cygwin* | *mingw* | *cegcc* )
 	  if test -f "$output_objdir/$my_outputname.def"; then
-	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
 	  else
-	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
 	  fi
 	  ;;
 	*)
-	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
 	  ;;
 	esac
 	;;
@@ -2538,8 +3524,8 @@ static const void *lt_preloaded_setup() {
       # really was required.
 
       # Nullify the symbol file.
-      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
     fi
 }
 
@@ -2549,6 +3535,7 @@ static const void *lt_preloaded_setup() {
 # Need a lot of goo to handle *both* DLLs and import libs
 # Has to be a shell function in order to 'eat' the argument
 # that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
   $opt_debug
@@ -2559,9 +3546,11 @@ func_win32_libid ()
     win32_libid_type="x86 archive import"
     ;;
   *ar\ archive*) # could be an import, or static
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
-       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 |
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
 	$SED -n -e '
 	    1,100{
 		/ I /{
@@ -2590,6 +3579,131 @@ func_win32_libid ()
   $ECHO "$win32_libid_type"
 }
 
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
 
 
 # func_extract_an_archive dir oldlib
@@ -2598,7 +3712,18 @@ func_extract_an_archive ()
     $opt_debug
     f_ex_an_ar_dir="$1"; shift
     f_ex_an_ar_oldlib="$1"
-    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if test "$lock_old_archive_extraction" = yes; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+		   'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test "$lock_old_archive_extraction" = yes; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
      :
     else
@@ -2669,7 +3794,7 @@ func_extract_archives ()
 	    darwin_file=
 	    darwin_files=
 	    for darwin_file in $darwin_filelist; do
-	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
 	      $LIPO -create -output "$darwin_file" $darwin_files
 	    done # $darwin_filelist
 	    $RM -rf unfat-$$
@@ -2684,25 +3809,30 @@ func_extract_archives ()
         func_extract_an_archive "$my_xdir" "$my_xabs"
 	;;
       esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
     done
 
     func_extract_archives_result="$my_oldobjs"
 }
 
 
-
-# func_emit_wrapper_part1 [arg=no]
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
 #
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
 {
-	func_emit_wrapper_part1_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_part1_arg1=$1
-	fi
+	func_emit_wrapper_arg1=${1-no}
 
 	$ECHO "\
 #! $SHELL
@@ -2718,7 +3848,6 @@ func_emit_wrapper_part1 ()
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
 sed_quote_subst='$sed_quote_subst'
 
 # Be Bourne compatible
@@ -2749,31 +3878,132 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then
 else
   # When we are sourced in execute mode, \$file and \$ECHO are already set.
   if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    ECHO=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$ECHO works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$ECHO will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
 "
-	$ECHO "\
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  for lt_wr_arg
+  do
+    case \$lt_wr_arg in
+    --lt-*) ;;
+    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+    esac
+    shift
+  done
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
 
   # Find the directory that this script lives in.
-  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
   # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
   while test -n \"\$file\"; do
-    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
 
     # If there was a directory component, then change thisdir.
     if test \"x\$destdir\" != \"x\$file\"; then
@@ -2783,30 +4013,13 @@ else
       esac
     fi
 
-    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
   done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
-	func_emit_wrapper_part2_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_part2_arg1=$1
-	fi
-
-	$ECHO "\
 
   # Usually 'no', except on cygwin/mingw when embedded into
   # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
     # special case for '.'
     if test \"\$thisdir\" = \".\"; then
@@ -2814,7 +4027,7 @@ func_emit_wrapper_part2 ()
     fi
     # remove .libs from thisdir
     case \"\$thisdir\" in
-    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
     $objdir )   thisdir=. ;;
     esac
   fi
@@ -2869,6 +4082,18 @@ func_emit_wrapper_part2 ()
 
   if test -f \"\$progdir/\$program\"; then"
 
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
 	# Export our shlibpath_var if we have one.
 	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
 	  $ECHO "\
@@ -2877,253 +4102,28 @@ func_emit_wrapper_part2 ()
 
     # Some systems cannot cope with colon-terminated $shlibpath_var
     # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
 
     export $shlibpath_var
 "
 	fi
 
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
 	$ECHO "\
     if test \"\$libtool_execute_magic\" != \"$magic\"; then
       # Run the actual program with our arguments.
-"
-	case $host in
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2* | *-cegcc*)
-	  $ECHO "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $ECHO "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 1
+      func_exec_program \${1+\"\$@\"}
     fi
   else
     # The program doesn't exist.
     \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
-    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     exit 1
   fi
 fi\
 "
 }
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory.  This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
-	func_emit_wrapper_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_arg1=$1
-	fi
-
-	# split this up so that func_emit_cwrapperexe_src
-	# can call each part independently.
-	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
-	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin.  Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
-  func_to_host_path_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        case $build in
-          *mingw* ) # actually, msys
-            # awkward: cmd appends spaces to result
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_path_tmp1=`cygpath -w "$1"`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # Unfortunately, winepath does not exit with a non-zero
-            # error code, so we are forced to check the contents of
-            # stdout. On the other hand, if the command is not
-            # found, the shell will set an exit code of 127 and print
-            # *an error message* to stdout. So we must check for both
-            # error code of zero AND non-empty stdout, which explains
-            # the odd construction:
-            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
-            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
-              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-                $SED -e "$lt_sed_naive_backslashify"`
-            else
-              # Allow warning below.
-              func_to_host_path_result=""
-            fi
-            ;;
-        esac
-        if test -z "$func_to_host_path_result" ; then
-          func_error "Could not determine host path corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback:
-          func_to_host_path_result="$1"
-        fi
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_path
 
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
-  func_to_host_pathlist_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        # Remove leading and trailing path separator characters from
-        # ARG. msys behavior is inconsistent here, cygpath turns them
-        # into '.;' and ';.', and winepath ignores them completely.
-        func_to_host_pathlist_tmp2="$1"
-        # Once set for this call, this variable should not be
-        # reassigned. It is used in tha fallback case.
-        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
-          $SED -e 's|^:*||' -e 's|:*$||'`
-        case $build in
-          *mingw* ) # Actually, msys.
-            # Awkward: cmd appends spaces to result.
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # unfortunately, winepath doesn't convert pathlists
-            func_to_host_pathlist_result=""
-            func_to_host_pathlist_oldIFS=$IFS
-            IFS=:
-            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
-              IFS=$func_to_host_pathlist_oldIFS
-              if test -n "$func_to_host_pathlist_f" ; then
-                func_to_host_path "$func_to_host_pathlist_f"
-                if test -n "$func_to_host_path_result" ; then
-                  if test -z "$func_to_host_pathlist_result" ; then
-                    func_to_host_pathlist_result="$func_to_host_path_result"
-                  else
-                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
-                  fi
-                fi
-              fi
-              IFS=:
-            done
-            IFS=$func_to_host_pathlist_oldIFS
-            ;;
-        esac
-        if test -z "$func_to_host_pathlist_result" ; then
-          func_error "Could not determine the host path(s) corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback. This may break if $1 contains DOS-style drive
-          # specifications. The fix is not to complicate the expression
-          # below, but for the user to provide a working wine installation
-          # with winepath so that path translation in the cross-to-mingw
-          # case works properly.
-          lt_replace_pathsep_nix_to_dos="s|:|;|g"
-          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
-            $SED -e "$lt_replace_pathsep_nix_to_dos"`
-        fi
-        # Now, add the leading and trailing path separators back
-        case "$1" in
-          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
-            ;;
-        esac
-        case "$1" in
-          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
-            ;;
-        esac
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_pathlist
 
 # func_emit_cwrapperexe_src
 # emit the source code for a wrapper executable on stdout
@@ -3141,31 +4141,23 @@ func_emit_cwrapperexe_src ()
 
    This wrapper executable should never be moved out of the build directory.
    If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "$SHELL $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
 */
 EOF
 	    cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef _MSC_VER
 # include <direct.h>
 # include <process.h>
 # include <io.h>
-# define setmode _setmode
 #else
 # include <unistd.h>
 # include <stdint.h>
 # ifdef __CYGWIN__
 #  include <io.h>
-#  define HAVE_SETENV
-#  ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-#  endif
 # endif
 #endif
 #include <malloc.h>
@@ -3177,6 +4169,44 @@ int setenv (const char *, const char *, int);
 #include <fcntl.h>
 #include <sys/stat.h>
 
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
 #if defined(PATH_MAX)
 # define LT_PATHMAX PATH_MAX
 #elif defined(MAXPATHLEN)
@@ -3192,14 +4222,7 @@ int setenv (const char *, const char *, int);
 # define S_IXGRP 0
 #endif
 
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#endif
-
+/* path handling portability macros */
 #ifndef DIR_SEPARATOR
 # define DIR_SEPARATOR '/'
 # define PATH_SEPARATOR ':'
@@ -3230,10 +4253,6 @@ int setenv (const char *, const char *, int);
 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
 #endif /* PATH_SEPARATOR_2 */
 
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
 #ifndef FOPEN_WB
 # define FOPEN_WB "w"
 #endif
@@ -3246,22 +4265,13 @@ int setenv (const char *, const char *, int);
   if (stale) { free ((void *) stale); stale = 0; } \
 } while (0)
 
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    (void) vfprintf (stderr, fmt, args);
-    va_end (args);
-}
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
 #else
-# define LTWRAPPER_DEBUGPRINTF(args)
+static int lt_debug = 0;
 #endif
 
-const char *program_name = NULL;
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
 
 void *xmalloc (size_t num);
 char *xstrdup (const char *string);
@@ -3271,41 +4281,27 @@ char *chase_symlinks (const char *pathspec);
 int make_executable (const char *path);
 int check_executable (const char *path);
 char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
 void lt_setenv (const char *name, const char *value);
 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
 void lt_update_exe_path (const char *name, const char *value);
 void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
-	    func_emit_wrapper_part1 yes |
-	        $SED -e 's/\([\\"]\)/\\\1/g' \
-	             -e 's/^/  "/' -e 's/$/\\n"/'
-	    echo ";"
-	    cat <<EOF
-
-static const char *script_text_part2 =
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
 EOF
-	    func_emit_wrapper_part2 yes |
-	        $SED -e 's/\([\\"]\)/\\\1/g' \
-	             -e 's/^/  "/' -e 's/$/\\n"/'
-	    echo ";"
 
 	    cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
+volatile const char * MAGIC_EXE = "$magic_exe";
 const char * LIB_PATH_VARNAME = "$shlibpath_var";
 EOF
 
 	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-              func_to_host_pathlist "$temp_rpath"
+              func_to_host_path "$temp_rpath"
 	      cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
 EOF
 	    else
 	      cat <<"EOF"
@@ -3314,10 +4310,10 @@ EOF
 	    fi
 
 	    if test -n "$dllsearchpath"; then
-              func_to_host_pathlist "$dllsearchpath:"
+              func_to_host_path "$dllsearchpath:"
 	      cat <<EOF
 const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
 EOF
 	    else
 	      cat <<"EOF"
@@ -3340,24 +4336,10 @@ EOF
 	    cat <<"EOF"
 
 #define LTWRAPPER_OPTION_PREFIX         "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
 
-static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
 static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
-  /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
-  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
-  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
 
 int
 main (int argc, char *argv[])
@@ -3374,10 +4356,13 @@ main (int argc, char *argv[])
   int i;
 
   program_name = (char *) xstrdup (base_name (argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+  newargz = XMALLOC (char *, argc + 1);
 
-  /* very simple arg parsing; don't want to rely on getopt */
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
   for (i = 1; i < argc; i++)
     {
       if (strcmp (argv[i], dumpscript_opt) == 0)
@@ -3391,25 +4376,57 @@ EOF
 	      esac
 
 	    cat <<"EOF"
-	  printf ("%s", script_text_part1);
-	  printf ("%s", script_text_part2);
+	  lt_dump_script (stdout);
 	  return 0;
 	}
+      if (strcmp (argv[i], debug_opt) == 0)
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+		    "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
     }
+  newargz[++newargc] = NULL;
+
+EOF
+	    cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+	    cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
 
-  newargz = XMALLOC (char *, argc + 1);
   tmp_pathspec = find_executable (argv[0]);
   if (tmp_pathspec == NULL)
-    lt_fatal ("Couldn't find %s", argv[0]);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
-			  tmp_pathspec));
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+		  tmp_pathspec);
 
   actual_cwrapper_path = chase_symlinks (tmp_pathspec);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
-			  actual_cwrapper_path));
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+		  actual_cwrapper_path);
   XFREE (tmp_pathspec);
 
-  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
   strendzap (actual_cwrapper_path, actual_cwrapper_name);
 
   /* wrapper name transforms */
@@ -3427,8 +4444,9 @@ EOF
   target_name = tmp_pathspec;
   tmp_pathspec = 0;
 
-  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
-			  target_name));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(main) libtool target name: %s\n",
+		  target_name);
 EOF
 
 	    cat <<EOF
@@ -3478,80 +4496,19 @@ EOF
 
   lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
   lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
   lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
 
-  newargc=0;
-  for (i = 1; i < argc; i++)
-    {
-      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
-        {
-          if (argv[i][env_set_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_set_opt_len + 1;
-              lt_opt_process_env_set (p);
-            }
-          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_set (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_set_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
-        {
-          if (argv[i][env_prepend_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_prepend_opt_len + 1;
-              lt_opt_process_env_prepend (p);
-            }
-          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_prepend_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
-        {
-          if (argv[i][env_append_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_append_opt_len + 1;
-              lt_opt_process_env_append (p);
-            }
-          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_append (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_append_opt);
-          continue;
-        }
-      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
-        {
-          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-             namespace, but it is not one of the ones we know about and
-             have already dealt with, above (inluding dump-script), then
-             report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-             namespace. The first time any user complains about this, we'll
-             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-             or a configure.ac-settable value.
-           */
-          lt_fatal ("Unrecognized option in %s namespace: '%s'",
-                    ltwrapper_option_prefix, argv[i]);
-        }
-      /* otherwise ... */
-      newargz[++newargc] = xstrdup (argv[i]);
-    }
-  newargz[++newargc] = NULL;
-
-  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+		  nonnull (lt_argv_zero));
   for (i = 0; i < newargc; i++)
     {
-      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+		      i, nonnull (newargz[i]));
     }
 
 EOF
@@ -3560,11 +4517,14 @@ EOF
 	      mingw*)
 		cat <<"EOF"
   /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
   rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
   if (rval == -1)
     {
       /* failed to start process */
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      lt_debugprintf (__FILE__, __LINE__,
+		      "(main) failed to launch target \"%s\": %s\n",
+		      lt_argv_zero, nonnull (strerror (errno)));
       return 127;
     }
   return rval;
@@ -3586,7 +4546,7 @@ xmalloc (size_t num)
 {
   void *p = (void *) malloc (num);
   if (!p)
-    lt_fatal ("Memory exhausted");
+    lt_fatal (__FILE__, __LINE__, "memory exhausted");
 
   return p;
 }
@@ -3620,8 +4580,8 @@ check_executable (const char *path)
 {
   struct stat st;
 
-  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
-			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
   if ((!path) || (!*path))
     return 0;
 
@@ -3638,8 +4598,8 @@ make_executable (const char *path)
   int rval = 0;
   struct stat st;
 
-  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
-			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
   if ((!path) || (!*path))
     return 0;
 
@@ -3665,8 +4625,8 @@ find_executable (const char *wrapper)
   int tmp_len;
   char *concat_name;
 
-  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
-			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
 
   if ((wrapper == NULL) || (*wrapper == '\0'))
     return NULL;
@@ -3719,7 +4679,8 @@ find_executable (const char *wrapper)
 		{
 		  /* empty path: current directory */
 		  if (getcwd (tmp, LT_PATHMAX) == NULL)
-		    lt_fatal ("getcwd failed");
+		    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
 		  tmp_len = strlen (tmp);
 		  concat_name =
 		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
@@ -3744,7 +4705,8 @@ find_executable (const char *wrapper)
     }
   /* Relative path | not found in path: prepend cwd */
   if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
+    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
   tmp_len = strlen (tmp);
   concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
   memcpy (concat_name, tmp, tmp_len);
@@ -3770,8 +4732,9 @@ chase_symlinks (const char *pathspec)
   int has_symlinks = 0;
   while (strlen (tmp_pathspec) && !has_symlinks)
     {
-      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
-			      tmp_pathspec));
+      lt_debugprintf (__FILE__, __LINE__,
+		      "checking path component for symlinks: %s\n",
+		      tmp_pathspec);
       if (lstat (tmp_pathspec, &s) == 0)
 	{
 	  if (S_ISLNK (s.st_mode) != 0)
@@ -3793,8 +4756,9 @@ chase_symlinks (const char *pathspec)
 	}
       else
 	{
-	  char *errstr = strerror (errno);
-	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+	  lt_fatal (__FILE__, __LINE__,
+		    "error accessing file \"%s\": %s",
+		    tmp_pathspec, nonnull (strerror (errno)));
 	}
     }
   XFREE (tmp_pathspec);
@@ -3807,7 +4771,8 @@ chase_symlinks (const char *pathspec)
   tmp_pathspec = realpath (pathspec, buf);
   if (tmp_pathspec == 0)
     {
-      lt_fatal ("Could not follow symlinks for %s", pathspec);
+      lt_fatal (__FILE__, __LINE__,
+		"could not follow symlinks for %s", pathspec);
     }
   return xstrdup (tmp_pathspec);
 #endif
@@ -3833,11 +4798,25 @@ strendzap (char *str, const char *pat)
   return str;
 }
 
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
 static void
-lt_error_core (int exit_status, const char *mode,
+lt_error_core (int exit_status, const char *file,
+	       int line, const char *mode,
 	       const char *message, va_list ap)
 {
-  fprintf (stderr, "%s: %s: ", program_name, mode);
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
   vfprintf (stderr, message, ap);
   fprintf (stderr, ".\n");
 
@@ -3846,20 +4825,32 @@ lt_error_core (int exit_status, const char *mode,
 }
 
 void
-lt_fatal (const char *message, ...)
+lt_fatal (const char *file, int line, const char *message, ...)
 {
   va_list ap;
   va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
   va_end (ap);
 }
 
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
 void
 lt_setenv (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
   {
 #ifdef HAVE_SETENV
     /* always make a copy, for consistency with !HAVE_SETENV */
@@ -3904,95 +4895,12 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
   return new_value;
 }
 
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
-  const char *p;
-  int len;
-  if (!arg || !*arg)
-    return 1;
-
-  p = strchr (arg, (int)'=');
-
-  if (!p)
-    return 1;
-
-  *value = xstrdup (++p);
-
-  len = strlen (arg) - strlen (*value);
-  *name = XMALLOC (char, len);
-  strncpy (*name, arg, len-1);
-  (*name)[len - 1] = '\0';
-
-  return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
-    }
-
-  lt_setenv (name, value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 0);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 1);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
 void
 lt_update_exe_path (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
 
   if (name && *name && value && *value)
     {
@@ -4011,9 +4919,9 @@ lt_update_exe_path (const char *name, const char *value)
 void
 lt_update_lib_path (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
 
   if (name && *name && value && *value)
     {
@@ -4023,11 +4931,152 @@ lt_update_lib_path (const char *name, const char *value)
     }
 }
 
+EOF
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+	new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+	{
+	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+	  size_t length;
+	  unsigned int backslashes;
+	  const char *s;
+	  char *quoted_string;
+	  char *p;
+
+	  length = 0;
+	  backslashes = 0;
+	  if (quote_around)
+	    length++;
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		length += backslashes + 1;
+	      length++;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    length += backslashes + 1;
+
+	  quoted_string = XMALLOC (char, length + 1);
+
+	  p = quoted_string;
+	  backslashes = 0;
+	  if (quote_around)
+	    *p++ = '"';
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		{
+		  unsigned int j;
+		  for (j = backslashes + 1; j > 0; j--)
+		    *p++ = '\\';
+		}
+	      *p++ = c;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    {
+	      unsigned int j;
+	      for (j = backslashes; j > 0; j--)
+		*p++ = '\\';
+	      *p++ = '"';
+	    }
+	  *p = '\0';
+
+	  new_argv[i] = quoted_string;
+	}
+      else
+	new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
+
+  return new_argv;
+}
+EOF
+		;;
+	    esac
+
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+	    func_emit_wrapper yes |
+              $SED -e 's/\([\\"]\)/\\\1/g' \
+	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
 
+            cat <<"EOF"
+}
 EOF
 }
 # end: func_emit_cwrapperexe_src
 
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
 # func_mode_link arg...
 func_mode_link ()
 {
@@ -4072,6 +5121,7 @@ func_mode_link ()
     new_inherited_linker_flags=
 
     avoid_version=no
+    bindir=
     dlfiles=
     dlprefiles=
     dlself=no
@@ -4164,6 +5214,11 @@ func_mode_link ()
 	esac
 
 	case $prev in
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
 	dlfiles|dlprefiles)
 	  if test "$preload" = no; then
 	    # Add the symbol object into the linking commands.
@@ -4195,9 +5250,9 @@ func_mode_link ()
 	    ;;
 	  *)
 	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
+	      func_append dlfiles " $arg"
 	    else
-	      dlprefiles="$dlprefiles $arg"
+	      func_append dlprefiles " $arg"
 	    fi
 	    prev=
 	    continue
@@ -4221,7 +5276,7 @@ func_mode_link ()
 	    *-*-darwin*)
 	      case "$deplibs " in
 		*" $qarg.ltframework "*) ;;
-		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		*) func_append deplibs " $qarg.ltframework" # this is fixed later
 		   ;;
 	      esac
 	      ;;
@@ -4240,7 +5295,7 @@ func_mode_link ()
 	    moreargs=
 	    for fil in `cat "$save_arg"`
 	    do
-#	      moreargs="$moreargs $fil"
+#	      func_append moreargs " $fil"
 	      arg=$fil
 	      # A libtool-controlled object.
 
@@ -4269,7 +5324,7 @@ func_mode_link ()
 
 		  if test "$prev" = dlfiles; then
 		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		      dlfiles="$dlfiles $pic_object"
+		      func_append dlfiles " $pic_object"
 		      prev=
 		      continue
 		    else
@@ -4281,7 +5336,7 @@ func_mode_link ()
 		  # CHECK ME:  I think I busted this.  -Ossama
 		  if test "$prev" = dlprefiles; then
 		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
+		    func_append dlprefiles " $pic_object"
 		    prev=
 		  fi
 
@@ -4351,12 +5406,12 @@ func_mode_link ()
 	  if test "$prev" = rpath; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
+	    *) func_append rpath " $arg" ;;
 	    esac
 	  else
 	    case "$xrpath " in
 	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
+	    *) func_append xrpath " $arg" ;;
 	    esac
 	  fi
 	  prev=
@@ -4368,28 +5423,28 @@ func_mode_link ()
 	  continue
 	  ;;
 	weak)
-	  weak_libs="$weak_libs $arg"
+	  func_append weak_libs " $arg"
 	  prev=
 	  continue
 	  ;;
 	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $qarg"
 	  prev=
 	  func_append compile_command " $qarg"
 	  func_append finalize_command " $qarg"
 	  continue
 	  ;;
 	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
+	  func_append compiler_flags " $qarg"
 	  prev=
 	  func_append compile_command " $qarg"
 	  func_append finalize_command " $qarg"
 	  continue
 	  ;;
 	xlinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $wl$qarg"
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $wl$qarg"
 	  prev=
 	  func_append compile_command " $wl$qarg"
 	  func_append finalize_command " $wl$qarg"
@@ -4425,6 +5480,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -bindir)
+	prev=bindir
+	continue
+	;;
+
       -dlopen)
 	prev=dlfiles
 	continue
@@ -4475,15 +5535,16 @@ func_mode_link ()
 	;;
 
       -L*)
-	func_stripname '-L' '' "$arg"
-	dir=$func_stripname_result
-	if test -z "$dir"; then
+	func_stripname "-L" '' "$arg"
+	if test -z "$func_stripname_result"; then
 	  if test "$#" -gt 0; then
 	    func_fatal_error "require no space between \`-L' and \`$1'"
 	  else
 	    func_fatal_error "need path for \`-L' option"
 	  fi
 	fi
+	func_resolve_sysroot "$func_stripname_result"
+	dir=$func_resolve_sysroot_result
 	# We need an absolute path.
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -4495,24 +5556,30 @@ func_mode_link ()
 	  ;;
 	esac
 	case "$deplibs " in
-	*" -L$dir "*) ;;
+	*" -L$dir "* | *" $arg "*)
+	  # Will only happen for absolute or sysroot arguments
+	  ;;
 	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
+	  # Preserve sysroot, but never include relative directories
+	  case $dir in
+	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+	    *) func_append deplibs " -L$dir" ;;
+	  esac
+	  func_append lib_search_path " $dir"
 	  ;;
 	esac
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$dir:"*) ;;
 	  ::) dllsearchpath=$dir;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  *) func_append dllsearchpath ":$dir";;
 	  esac
 	  case :$dllsearchpath: in
 	  *":$testbindir:"*) ;;
 	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  *) func_append dllsearchpath ":$testbindir";;
 	  esac
 	  ;;
 	esac
@@ -4522,7 +5589,7 @@ func_mode_link ()
       -l*)
 	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
 	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
 	    # These systems don't actually have a C or math library (as such)
 	    continue
 	    ;;
@@ -4536,7 +5603,7 @@ func_mode_link ()
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C and math libraries are in the System framework
-	    deplibs="$deplibs System.ltframework"
+	    func_append deplibs " System.ltframework"
 	    continue
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -4556,7 +5623,7 @@ func_mode_link ()
 	   ;;
 	 esac
 	fi
-	deplibs="$deplibs $arg"
+	func_append deplibs " $arg"
 	continue
 	;;
 
@@ -4568,8 +5635,8 @@ func_mode_link ()
       # Tru64 UNIX uses -model [arg] to determine the layout of C++
       # classes, name mangling, and exception handling.
       # Darwin uses the -arch flag to determine output architecture.
-      -model|-arch|-isysroot)
-	compiler_flags="$compiler_flags $arg"
+      -model|-arch|-isysroot|--sysroot)
+	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
 	func_append finalize_command " $arg"
 	prev=xcompiler
@@ -4577,12 +5644,12 @@ func_mode_link ()
 	;;
 
       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-	compiler_flags="$compiler_flags $arg"
+	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
 	func_append finalize_command " $arg"
 	case "$new_inherited_linker_flags " in
 	    *" $arg "*) ;;
-	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+	    * ) func_append new_inherited_linker_flags " $arg" ;;
 	esac
 	continue
 	;;
@@ -4649,13 +5716,17 @@ func_mode_link ()
 	# We need an absolute path.
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	=*)
+	  func_stripname '=' '' "$dir"
+	  dir=$lt_sysroot$func_stripname_result
+	  ;;
 	*)
 	  func_fatal_error "only absolute run-paths are allowed"
 	  ;;
 	esac
 	case "$xrpath " in
 	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
+	*) func_append xrpath " $dir" ;;
 	esac
 	continue
 	;;
@@ -4708,8 +5779,8 @@ func_mode_link ()
 	for flag in $args; do
 	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
-	  arg="$arg $wl$func_quote_for_eval_result"
-	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	  func_append arg " $func_quote_for_eval_result"
+	  func_append compiler_flags " $func_quote_for_eval_result"
 	done
 	IFS="$save_ifs"
 	func_stripname ' ' '' "$arg"
@@ -4724,9 +5795,9 @@ func_mode_link ()
 	for flag in $args; do
 	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
-	  arg="$arg $wl$func_quote_for_eval_result"
-	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
-	  linker_flags="$linker_flags $func_quote_for_eval_result"
+	  func_append arg " $wl$func_quote_for_eval_result"
+	  func_append compiler_flags " $wl$func_quote_for_eval_result"
+	  func_append linker_flags " $func_quote_for_eval_result"
 	done
 	IFS="$save_ifs"
 	func_stripname ' ' '' "$arg"
@@ -4754,23 +5825,27 @@ func_mode_link ()
 	arg="$func_quote_for_eval_result"
 	;;
 
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
-      # @file GCC response files
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
         func_quote_for_eval "$arg"
 	arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
-        compiler_flags="$compiler_flags $arg"
+        func_append compiler_flags " $arg"
         continue
         ;;
 
@@ -4782,7 +5857,7 @@ func_mode_link ()
 
       *.$objext)
 	# A standard object.
-	objs="$objs $arg"
+	func_append objs " $arg"
 	;;
 
       *.lo)
@@ -4813,7 +5888,7 @@ func_mode_link ()
 
 	    if test "$prev" = dlfiles; then
 	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		dlfiles="$dlfiles $pic_object"
+		func_append dlfiles " $pic_object"
 		prev=
 		continue
 	      else
@@ -4825,7 +5900,7 @@ func_mode_link ()
 	    # CHECK ME:  I think I busted this.  -Ossama
 	    if test "$prev" = dlprefiles; then
 	      # Preload the old-style object.
-	      dlprefiles="$dlprefiles $pic_object"
+	      func_append dlprefiles " $pic_object"
 	      prev=
 	    fi
 
@@ -4870,24 +5945,25 @@ func_mode_link ()
 
       *.$libext)
 	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
+	func_append deplibs " $arg"
+	func_append old_deplibs " $arg"
 	continue
 	;;
 
       *.la)
 	# A libtool-controlled library.
 
+	func_resolve_sysroot "$arg"
 	if test "$prev" = dlfiles; then
 	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
+	  func_append dlfiles " $func_resolve_sysroot_result"
 	  prev=
 	elif test "$prev" = dlprefiles; then
 	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
+	  func_append dlprefiles " $func_resolve_sysroot_result"
 	  prev=
 	else
-	  deplibs="$deplibs $arg"
+	  func_append deplibs " $func_resolve_sysroot_result"
 	fi
 	continue
 	;;
@@ -4925,7 +6001,7 @@ func_mode_link ()
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
     else
       shlib_search_path=
     fi
@@ -4934,6 +6010,8 @@ func_mode_link ()
 
     func_dirname "$output" "/" ""
     output_objdir="$func_dirname_result$objdir"
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
     func_mkdir_p "$output_objdir"
 
@@ -4954,12 +6032,12 @@ func_mode_link ()
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      if $opt_duplicate_deps ; then
+      if $opt_preserve_dup_deps ; then
 	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	esac
       fi
-      libs="$libs $deplib"
+      func_append libs " $deplib"
     done
 
     if test "$linkmode" = lib; then
@@ -4972,9 +6050,9 @@ func_mode_link ()
       if $opt_duplicate_compiler_generated_deps; then
 	for pre_post_dep in $predeps $postdeps; do
 	  case "$pre_post_deps " in
-	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
 	  esac
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	  func_append pre_post_deps " $pre_post_dep"
 	done
       fi
       pre_post_deps=
@@ -5041,17 +6119,19 @@ func_mode_link ()
 	for lib in $dlprefiles; do
 	  # Ignore non-libtool-libs
 	  dependency_libs=
+	  func_resolve_sysroot "$lib"
 	  case $lib in
-	  *.la)	func_source "$lib" ;;
+	  *.la)	func_source "$func_resolve_sysroot_result" ;;
 	  esac
 
 	  # Collect preopened libtool deplibs, except any this library
 	  # has declared as weak libs
 	  for deplib in $dependency_libs; do
-            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+	    func_basename "$deplib"
+            deplib_base=$func_basename_result
 	    case " $weak_libs " in
 	    *" $deplib_base "*) ;;
-	    *) deplibs="$deplibs $deplib" ;;
+	    *) func_append deplibs " $deplib" ;;
 	    esac
 	  done
 	done
@@ -5072,11 +6152,11 @@ func_mode_link ()
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
-	    compiler_flags="$compiler_flags $deplib"
+	    func_append compiler_flags " $deplib"
 	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
 		esac
 	    fi
 	  fi
@@ -5161,7 +6241,7 @@ func_mode_link ()
 	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
 		esac
 	    fi
 	  fi
@@ -5174,7 +6254,8 @@ func_mode_link ()
 	    test "$pass" = conv && continue
 	    newdependency_libs="$deplib $newdependency_libs"
 	    func_stripname '-L' '' "$deplib"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  prog)
 	    if test "$pass" = conv; then
@@ -5188,7 +6269,8 @@ func_mode_link ()
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    fi
 	    func_stripname '-L' '' "$deplib"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  *)
 	    func_warning "\`-L' is ignored for archives/objects"
@@ -5199,17 +6281,21 @@ func_mode_link ()
 	-R*)
 	  if test "$pass" = link; then
 	    func_stripname '-R' '' "$deplib"
-	    dir=$func_stripname_result
+	    func_resolve_sysroot "$func_stripname_result"
+	    dir=$func_resolve_sysroot_result
 	    # Make sure the xrpath contains only unique directories.
 	    case "$xrpath " in
 	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
+	    *) func_append xrpath " $dir" ;;
 	    esac
 	  fi
 	  deplibs="$deplib $deplibs"
 	  continue
 	  ;;
-	*.la) lib="$deplib" ;;
+	*.la)
+	  func_resolve_sysroot "$deplib"
+	  lib=$func_resolve_sysroot_result
+	  ;;
 	*.$libext)
 	  if test "$pass" = conv; then
 	    deplibs="$deplib $deplibs"
@@ -5227,7 +6313,7 @@ func_mode_link ()
 		match_pattern*)
 		  set dummy $deplibs_check_method; shift
 		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+		  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
 		    | $EGREP "$match_pattern_regex" > /dev/null; then
 		    valid_a_lib=yes
 		  fi
@@ -5237,15 +6323,15 @@ func_mode_link ()
 		;;
 	      esac
 	      if test "$valid_a_lib" != yes; then
-		$ECHO
+		echo
 		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
-		$ECHO "*** I have the capability to make that library automatically link in when"
-		$ECHO "*** you link to this library.  But I can only do this if you have a"
-		$ECHO "*** shared version of the library, which you do not appear to have"
-		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
-		$ECHO "*** that it is just a static archive that I should not use here."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because the file extensions .$libext of this argument makes me believe"
+		echo "*** that it is just a static archive that I should not use here."
 	      else
-		$ECHO
+		echo
 		$ECHO "*** Warning: Linking the shared library $output against the"
 		$ECHO "*** static library $deplib is not portable!"
 		deplibs="$deplib $deplibs"
@@ -5272,11 +6358,11 @@ func_mode_link ()
 	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
 	      # If there is no dlopen support or we're linking statically,
 	      # we need to preload.
-	      newdlprefiles="$newdlprefiles $deplib"
+	      func_append newdlprefiles " $deplib"
 	      compile_deplibs="$deplib $compile_deplibs"
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    else
-	      newdlfiles="$newdlfiles $deplib"
+	      func_append newdlfiles " $deplib"
 	    fi
 	  fi
 	  continue
@@ -5318,20 +6404,20 @@ func_mode_link ()
 
 	# Convert "-framework foo" to "foo.ltframework"
 	if test -n "$inherited_linker_flags"; then
-	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
 	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
 	    case " $new_inherited_linker_flags " in
 	      *" $tmp_inherited_linker_flag "*) ;;
-	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
 	    esac
 	  done
 	fi
-	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	if test "$linkmode,$pass" = "lib,link" ||
 	   test "$linkmode,$pass" = "prog,scan" ||
 	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	  test -n "$dlopen" && func_append dlfiles " $dlopen"
+	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
 	fi
 
 	if test "$pass" = conv; then
@@ -5342,20 +6428,20 @@ func_mode_link ()
 	      func_fatal_error "cannot find name of link library for \`$lib'"
 	    fi
 	    # It is a libtool convenience library, so add in its objects.
-	    convenience="$convenience $ladir/$objdir/$old_library"
-	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    func_append convenience " $ladir/$objdir/$old_library"
+	    func_append old_convenience " $ladir/$objdir/$old_library"
 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
 	    func_fatal_error "\`$lib' is not a convenience library"
 	  fi
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
 	    deplibs="$deplib $deplibs"
-	    if $opt_duplicate_deps ; then
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $deplib"
 	  done
 	  continue
 	fi # $pass = conv
@@ -5363,9 +6449,15 @@ func_mode_link ()
 
 	# Get the name of the library we link against.
 	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
+	if test -n "$old_library" &&
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; then
+	  linklib=$old_library
+	else
+	  for l in $old_library $library_names; do
+	    linklib="$l"
+	  done
+	fi
 	if test -z "$linklib"; then
 	  func_fatal_error "cannot find name of link library for \`$lib'"
 	fi
@@ -5382,9 +6474,9 @@ func_mode_link ()
 	    # statically, we need to preload.  We also need to preload any
 	    # dependent libraries so libltdl's deplib preloader doesn't
 	    # bomb out in the load deplibs phase.
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	    func_append dlprefiles " $lib $dependency_libs"
 	  else
-	    newdlfiles="$newdlfiles $lib"
+	    func_append newdlfiles " $lib"
 	  fi
 	  continue
 	fi # $pass = dlopen
@@ -5406,14 +6498,14 @@ func_mode_link ()
 
 	# Find the relevant object directory and library name.
 	if test "X$installed" = Xyes; then
-	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
 	    func_warning "library \`$lib' was moved."
 	    dir="$ladir"
 	    absdir="$abs_ladir"
 	    libdir="$abs_ladir"
 	  else
-	    dir="$libdir"
-	    absdir="$libdir"
+	    dir="$lt_sysroot$libdir"
+	    absdir="$lt_sysroot$libdir"
 	  fi
 	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
@@ -5421,12 +6513,12 @@ func_mode_link ()
 	    dir="$ladir"
 	    absdir="$abs_ladir"
 	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    func_append notinst_path " $abs_ladir"
 	  else
 	    dir="$ladir/$objdir"
 	    absdir="$abs_ladir/$objdir"
 	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    func_append notinst_path " $abs_ladir"
 	  fi
 	fi # $installed = yes
 	func_stripname 'lib' '.la' "$laname"
@@ -5437,20 +6529,46 @@ func_mode_link ()
 	  if test -z "$libdir" && test "$linkmode" = prog; then
 	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
 	  fi
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    newdlprefiles="$newdlprefiles $dir/$old_library"
-	    # Keep a list of preopened convenience libraries to check
-	    # that they are being used correctly in the link pass.
-	    test -z "$libdir" && \
-		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
-	  elif test -n "$dlname"; then
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
-	  else
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
-	  fi
+	  case "$host" in
+	    # special handling for platforms with PE-DLLs.
+	    *cygwin* | *mingw* | *cegcc* )
+	      # Linker will automatically link against shared library if both
+	      # static and shared are present.  Therefore, ensure we extract
+	      # symbols from the import library if a shared library is present
+	      # (otherwise, the dlopen module name will be incorrect).  We do
+	      # this by putting the import library name into $newdlprefiles.
+	      # We recover the dlopen module name by 'saving' the la file
+	      # name in a special purpose variable, and (later) extracting the
+	      # dlname from the la file.
+	      if test -n "$dlname"; then
+	        func_tr_sh "$dir/$linklib"
+	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+	        func_append newdlprefiles " $dir/$linklib"
+	      else
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      fi
+	    ;;
+	    * )
+	      # Prefer using a static library (so that no silly _DYNAMIC symbols
+	      # are required to link).
+	      if test -n "$old_library"; then
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        func_append newdlprefiles " $dir/$dlname"
+	      else
+	        func_append newdlprefiles " $dir/$linklib"
+	      fi
+	    ;;
+	  esac
 	fi # $pass = dlpreopen
 
 	if test -z "$libdir"; then
@@ -5468,7 +6586,7 @@ func_mode_link ()
 
 
 	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
+	  func_append newlib_search_path " $ladir"
 	  deplibs="$lib $deplibs"
 
 	  linkalldeplibs=no
@@ -5481,7 +6599,8 @@ func_mode_link ()
 	  for deplib in $dependency_libs; do
 	    case $deplib in
 	    -L*) func_stripname '-L' '' "$deplib"
-	         newlib_search_path="$newlib_search_path $func_stripname_result"
+	         func_resolve_sysroot "$func_stripname_result"
+	         func_append newlib_search_path " $func_resolve_sysroot_result"
 		 ;;
 	    esac
 	    # Need to link against all dependency_libs?
@@ -5492,12 +6611,12 @@ func_mode_link ()
 	      # or/and link against static libraries
 	      newdependency_libs="$deplib $newdependency_libs"
 	    fi
-	    if $opt_duplicate_deps ; then
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $deplib"
 	  done # for deplib
 	  continue
 	fi # $linkmode = prog...
@@ -5512,7 +6631,7 @@ func_mode_link ()
 	      # Make sure the rpath contains only unique directories.
 	      case "$temp_rpath:" in
 	      *"$absdir:"*) ;;
-	      *) temp_rpath="$temp_rpath$absdir:" ;;
+	      *) func_append temp_rpath "$absdir:" ;;
 	      esac
 	    fi
 
@@ -5524,7 +6643,7 @@ func_mode_link ()
 	    *)
 	      case "$compile_rpath " in
 	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
+	      *) func_append compile_rpath " $absdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5533,7 +6652,7 @@ func_mode_link ()
 	    *)
 	      case "$finalize_rpath " in
 	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
+	      *) func_append finalize_rpath " $libdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5558,12 +6677,12 @@ func_mode_link ()
 	  case $host in
 	  *cygwin* | *mingw* | *cegcc*)
 	      # No point in relinking DLLs because paths are not encoded
-	      notinst_deplibs="$notinst_deplibs $lib"
+	      func_append notinst_deplibs " $lib"
 	      need_relink=no
 	    ;;
 	  *)
 	    if test "$installed" = no; then
-	      notinst_deplibs="$notinst_deplibs $lib"
+	      func_append notinst_deplibs " $lib"
 	      need_relink=yes
 	    fi
 	    ;;
@@ -5580,7 +6699,7 @@ func_mode_link ()
 	    fi
 	  done
 	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
-	    $ECHO
+	    echo
 	    if test "$linkmode" = prog; then
 	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
 	    else
@@ -5598,7 +6717,7 @@ func_mode_link ()
 	    *)
 	      case "$compile_rpath " in
 	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
+	      *) func_append compile_rpath " $absdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5607,7 +6726,7 @@ func_mode_link ()
 	    *)
 	      case "$finalize_rpath " in
 	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
+	      *) func_append finalize_rpath " $libdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5661,7 +6780,7 @@ func_mode_link ()
 	    linklib=$newlib
 	  fi # test -n "$old_archive_from_expsyms_cmds"
 
-	  if test "$linkmode" = prog || test "$mode" != relink; then
+	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
@@ -5683,9 +6802,9 @@ func_mode_link ()
 		      if test "X$dlopenmodule" != "X$lib"; then
 			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
 			if test -z "$old_library" ; then
-			  $ECHO
-			  $ECHO "*** And there doesn't seem to be a static archive available"
-			  $ECHO "*** The link will probably fail, sorry"
+			  echo
+			  echo "*** And there doesn't seem to be a static archive available"
+			  echo "*** The link will probably fail, sorry"
 			else
 			  add="$dir/$old_library"
 			fi
@@ -5717,7 +6836,7 @@ func_mode_link ()
 		if test -n "$inst_prefix_dir"; then
 		  case $libdir in
 		    [\\/]*)
-		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      func_append add_dir " -L$inst_prefix_dir$libdir"
 		      ;;
 		  esac
 		fi
@@ -5739,7 +6858,7 @@ func_mode_link ()
 	    if test -n "$add_shlibpath"; then
 	      case :$compile_shlibpath: in
 	      *":$add_shlibpath:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
 	      esac
 	    fi
 	    if test "$linkmode" = prog; then
@@ -5753,13 +6872,13 @@ func_mode_link ()
 		 test "$hardcode_shlibpath_var" = yes; then
 		case :$finalize_shlibpath: in
 		*":$libdir:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		*) func_append finalize_shlibpath "$libdir:" ;;
 		esac
 	      fi
 	    fi
 	  fi
 
-	  if test "$linkmode" = prog || test "$mode" = relink; then
+	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
@@ -5773,7 +6892,7 @@ func_mode_link ()
 	    elif test "$hardcode_shlibpath_var" = yes; then
 	      case :$finalize_shlibpath: in
 	      *":$libdir:"*) ;;
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      *) func_append finalize_shlibpath "$libdir:" ;;
 	      esac
 	      add="-l$name"
 	    elif test "$hardcode_automatic" = yes; then
@@ -5790,7 +6909,7 @@ func_mode_link ()
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
 		  [\\/]*)
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    func_append add_dir " -L$inst_prefix_dir$libdir"
 		    ;;
 		esac
 	      fi
@@ -5825,21 +6944,21 @@ func_mode_link ()
 
 	    # Just print a warning and add the library to dependency_libs so
 	    # that the program can be linked against the static library.
-	    $ECHO
+	    echo
 	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
-	    $ECHO "*** I have the capability to make that library automatically link in when"
-	    $ECHO "*** you link to this library.  But I can only do this if you have a"
-	    $ECHO "*** shared version of the library, which you do not appear to have."
+	    echo "*** I have the capability to make that library automatically link in when"
+	    echo "*** you link to this library.  But I can only do this if you have a"
+	    echo "*** shared version of the library, which you do not appear to have."
 	    if test "$module" = yes; then
-	      $ECHO "*** But as you try to build a module library, libtool will still create "
-	      $ECHO "*** a static module, that should work as long as the dlopening application"
-	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      echo "*** But as you try to build a module library, libtool will still create "
+	      echo "*** a static module, that should work as long as the dlopening application"
+	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 	      if test -z "$global_symbol_pipe"; then
-		$ECHO
-		$ECHO "*** However, this would only work if libtool was able to extract symbol"
-		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		$ECHO "*** not find such a program.  So, this module is probably useless."
-		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+		echo
+		echo "*** However, this would only work if libtool was able to extract symbol"
+		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		echo "*** not find such a program.  So, this module is probably useless."
+		echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	      fi
 	      if test "$build_old_libs" = no; then
 		build_libtool_libs=module
@@ -5867,37 +6986,46 @@ func_mode_link ()
 	           temp_xrpath=$func_stripname_result
 		   case " $xrpath " in
 		   *" $temp_xrpath "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
+		   *) func_append xrpath " $temp_xrpath";;
 		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      *) func_append temp_deplibs " $libdir";;
 	      esac
 	    done
 	    dependency_libs="$temp_deplibs"
 	  fi
 
-	  newlib_search_path="$newlib_search_path $absdir"
+	  func_append newlib_search_path " $absdir"
 	  # Link against this library
 	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
 	  # ... and its dependency_libs
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
 	    newdependency_libs="$deplib $newdependency_libs"
-	    if $opt_duplicate_deps ; then
+	    case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $func_resolve_sysroot_result"
 	  done
 
 	  if test "$link_all_deplibs" != no; then
 	    # Add the search paths of all dependency libraries
 	    for deplib in $dependency_libs; do
+	      path=
 	      case $deplib in
 	      -L*) path="$deplib" ;;
 	      *.la)
+	        func_resolve_sysroot "$deplib"
+	        deplib=$func_resolve_sysroot_result
 	        func_dirname "$deplib" "" "."
-		dir="$func_dirname_result"
+		dir=$func_dirname_result
 		# We need an absolute path.
 		case $dir in
 		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
@@ -5924,8 +7052,8 @@ func_mode_link ()
                       if test -z "$darwin_install_name"; then
                           darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                       fi
-		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
 		      path=
 		    fi
 		  fi
@@ -5958,7 +7086,7 @@ func_mode_link ()
 	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
 	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
 	else
-	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	fi
       fi
       dependency_libs="$newdependency_libs"
@@ -5975,7 +7103,7 @@ func_mode_link ()
 	  for dir in $newlib_search_path; do
 	    case "$lib_search_path " in
 	    *" $dir "*) ;;
-	    *) lib_search_path="$lib_search_path $dir" ;;
+	    *) func_append lib_search_path " $dir" ;;
 	    esac
 	  done
 	  newlib_search_path=
@@ -6033,10 +7161,10 @@ func_mode_link ()
 	    -L*)
 	      case " $tmp_libs " in
 	      *" $deplib "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      *) func_append tmp_libs " $deplib" ;;
 	      esac
 	      ;;
-	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    *) func_append tmp_libs " $deplib" ;;
 	    esac
 	  done
 	  eval $var=\"$tmp_libs\"
@@ -6052,7 +7180,7 @@ func_mode_link ()
 	  ;;
 	esac
 	if test -n "$i" ; then
-	  tmp_libs="$tmp_libs $i"
+	  func_append tmp_libs " $i"
 	fi
       done
       dependency_libs=$tmp_libs
@@ -6093,7 +7221,7 @@ func_mode_link ()
       # Now set the variables for building old libraries.
       build_libtool_libs=no
       oldlibs="$output"
-      objs="$objs$old_deplibs"
+      func_append objs "$old_deplibs"
       ;;
 
     lib)
@@ -6126,10 +7254,10 @@ func_mode_link ()
 	if test "$deplibs_check_method" != pass_all; then
 	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
 	else
-	  $ECHO
+	  echo
 	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
 	  $ECHO "*** objects $objs is not portable!"
-	  libobjs="$libobjs $objs"
+	  func_append libobjs " $objs"
 	fi
       fi
 
@@ -6194,7 +7322,7 @@ func_mode_link ()
 	    age="$number_minor"
 	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
+	  freebsd-aout|freebsd-elf|qnx|sunos)
 	    current="$number_major"
 	    revision="$number_minor"
 	    age="0"
@@ -6327,7 +7455,7 @@ func_mode_link ()
 	  done
 
 	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
+	  func_append verstring ":${current}.0"
 	  ;;
 
 	qnx)
@@ -6395,10 +7523,10 @@ func_mode_link ()
       fi
 
       func_generate_dlsyms "$libname" "$libname" "yes"
-      libobjs="$libobjs $symfileobj"
+      func_append libobjs " $symfileobj"
       test "X$libobjs" = "X " && libobjs=
 
-      if test "$mode" != relink; then
+      if test "$opt_mode" != relink; then
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
@@ -6414,7 +7542,7 @@ func_mode_link ()
 		   continue
 		 fi
 	       fi
-	       removelist="$removelist $p"
+	       func_append removelist " $p"
 	       ;;
 	    *) ;;
 	  esac
@@ -6425,27 +7553,28 @@ func_mode_link ()
 
       # Now set the variables for building old libraries.
       if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+	func_append oldlibs " $output_objdir/$libname.$libext"
 
 	# Transform .lo files to .o files.
-	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
       fi
 
       # Eliminate all temporary directories.
       #for path in $notinst_path; do
-      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
-      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
-      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #	lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #	deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
       #done
 
       if test -n "$xrpath"; then
 	# If the user specified any rpath flags, then add them.
 	temp_xrpath=
 	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
+	  func_replace_sysroot "$libdir"
+	  func_append temp_xrpath " -R$func_replace_sysroot_result"
 	  case "$finalize_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
 	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
@@ -6459,7 +7588,7 @@ func_mode_link ()
       for lib in $old_dlfiles; do
 	case " $dlprefiles $dlfiles " in
 	*" $lib "*) ;;
-	*) dlfiles="$dlfiles $lib" ;;
+	*) func_append dlfiles " $lib" ;;
 	esac
       done
 
@@ -6469,19 +7598,19 @@ func_mode_link ()
       for lib in $old_dlprefiles; do
 	case "$dlprefiles " in
 	*" $lib "*) ;;
-	*) dlprefiles="$dlprefiles $lib" ;;
+	*) func_append dlprefiles " $lib" ;;
 	esac
       done
 
       if test "$build_libtool_libs" = yes; then
 	if test -n "$rpath"; then
 	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
 	    # these systems don't actually have a c library (as such)!
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs System.ltframework"
+	    func_append deplibs " System.ltframework"
 	    ;;
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
@@ -6498,7 +7627,7 @@ func_mode_link ()
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
 	    if test "$build_libtool_need_lc" = "yes"; then
-	      deplibs="$deplibs -lc"
+	      func_append deplibs " -lc"
 	    fi
 	    ;;
 	  esac
@@ -6547,7 +7676,7 @@ EOF
 		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		  case " $predeps $postdeps " in
 		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
+		    func_append newdeplibs " $i"
 		    i=""
 		    ;;
 		  esac
@@ -6558,21 +7687,21 @@ EOF
 		  set dummy $deplib_matches; shift
 		  deplib_match=$1
 		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
+		    func_append newdeplibs " $i"
 		  else
 		    droppeddeps=yes
-		    $ECHO
+		    echo
 		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-		    $ECHO "*** I have the capability to make that library automatically link in when"
-		    $ECHO "*** you link to this library.  But I can only do this if you have a"
-		    $ECHO "*** shared version of the library, which I believe you do not have"
-		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
-		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+		    echo "*** I have the capability to make that library automatically link in when"
+		    echo "*** you link to this library.  But I can only do this if you have a"
+		    echo "*** shared version of the library, which I believe you do not have"
+		    echo "*** because a test_compile did reveal that the linker did not use it for"
+		    echo "*** its dynamic dependency list that programs get resolved with at runtime."
 		  fi
 		fi
 		;;
 	      *)
-		newdeplibs="$newdeplibs $i"
+		func_append newdeplibs " $i"
 		;;
 	      esac
 	    done
@@ -6590,7 +7719,7 @@ EOF
 		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		    case " $predeps $postdeps " in
 		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
+		      func_append newdeplibs " $i"
 		      i=""
 		      ;;
 		    esac
@@ -6601,29 +7730,29 @@ EOF
 		    set dummy $deplib_matches; shift
 		    deplib_match=$1
 		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
+		      func_append newdeplibs " $i"
 		    else
 		      droppeddeps=yes
-		      $ECHO
+		      echo
 		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-		      $ECHO "*** I have the capability to make that library automatically link in when"
-		      $ECHO "*** you link to this library.  But I can only do this if you have a"
-		      $ECHO "*** shared version of the library, which you do not appear to have"
-		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
-		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+		      echo "*** I have the capability to make that library automatically link in when"
+		      echo "*** you link to this library.  But I can only do this if you have a"
+		      echo "*** shared version of the library, which you do not appear to have"
+		      echo "*** because a test_compile did reveal that the linker did not use this one"
+		      echo "*** as a dynamic dependency that programs can get resolved with at runtime."
 		    fi
 		  fi
 		else
 		  droppeddeps=yes
-		  $ECHO
+		  echo
 		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $ECHO "*** make it link in!  You will probably need to install it or some"
-		  $ECHO "*** library that it depends on before this library will be fully"
-		  $ECHO "*** functional.  Installing it before continuing would be even better."
+		  echo "*** make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
 		fi
 		;;
 	      *)
-		newdeplibs="$newdeplibs $i"
+		func_append newdeplibs " $i"
 		;;
 	      esac
 	    done
@@ -6640,15 +7769,27 @@ EOF
 	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
+		  func_append newdeplibs " $a_deplib"
 		  a_deplib=""
 		  ;;
 		esac
 	      fi
 	      if test -n "$a_deplib" ; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
+		if test -n "$file_magic_glob"; then
+		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+		else
+		  libnameglob=$libname
+		fi
+		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
 		  for potent_lib in $potential_libs; do
 		      # Follow soft links.
 		      if ls -lLd "$potent_lib" 2>/dev/null |
@@ -6665,13 +7806,13 @@ EOF
 			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
 			case $potliblink in
 			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
 			esac
 		      done
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
 			 $SED -e 10q |
 			 $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
+			func_append newdeplibs " $a_deplib"
 			a_deplib=""
 			break 2
 		      fi
@@ -6680,12 +7821,12 @@ EOF
 	      fi
 	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
-		$ECHO
+		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-		$ECHO "*** I have the capability to make that library automatically link in when"
-		$ECHO "*** you link to this library.  But I can only do this if you have a"
-		$ECHO "*** shared version of the library, which you do not appear to have"
-		$ECHO "*** because I did check the linker path looking for a file starting"
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because I did check the linker path looking for a file starting"
 		if test -z "$potlib" ; then
 		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
 		else
@@ -6696,7 +7837,7 @@ EOF
 	      ;;
 	    *)
 	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      func_append newdeplibs " $a_deplib"
 	      ;;
 	    esac
 	  done # Gone through all deplibs.
@@ -6712,7 +7853,7 @@ EOF
 	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
+		  func_append newdeplibs " $a_deplib"
 		  a_deplib=""
 		  ;;
 		esac
@@ -6723,9 +7864,9 @@ EOF
 		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
 		  for potent_lib in $potential_libs; do
 		    potlib="$potent_lib" # see symlink-check above in file_magic test
-		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
 		       $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$newdeplibs $a_deplib"
+		      func_append newdeplibs " $a_deplib"
 		      a_deplib=""
 		      break 2
 		    fi
@@ -6734,12 +7875,12 @@ EOF
 	      fi
 	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
-		$ECHO
+		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-		$ECHO "*** I have the capability to make that library automatically link in when"
-		$ECHO "*** you link to this library.  But I can only do this if you have a"
-		$ECHO "*** shared version of the library, which you do not appear to have"
-		$ECHO "*** because I did check the linker path looking for a file starting"
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because I did check the linker path looking for a file starting"
 		if test -z "$potlib" ; then
 		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
 		else
@@ -6750,32 +7891,32 @@ EOF
 	      ;;
 	    *)
 	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      func_append newdeplibs " $a_deplib"
 	      ;;
 	    esac
 	  done # Gone through all deplibs.
 	  ;;
 	none | unknown | *)
 	  newdeplibs=""
-	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
-	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
 	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 	    for i in $predeps $postdeps ; do
 	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
 	    done
 	  fi
-	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
-	     $GREP . >/dev/null; then
-	    $ECHO
+	  case $tmp_deplibs in
+	  *[!\	\ ]*)
+	    echo
 	    if test "X$deplibs_check_method" = "Xnone"; then
-	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+	      echo "*** Warning: inter-library dependencies are not supported in this platform."
 	    else
-	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+	      echo "*** Warning: inter-library dependencies are not known to be supported."
 	    fi
-	    $ECHO "*** All declared inter-library dependencies are being dropped."
+	    echo "*** All declared inter-library dependencies are being dropped."
 	    droppeddeps=yes
-	  fi
+	    ;;
+	  esac
 	  ;;
 	esac
 	versuffix=$versuffix_save
@@ -6787,23 +7928,23 @@ EOF
 	case $host in
 	*-*-rhapsody* | *-*-darwin1.[012])
 	  # On Rhapsody replace the C library with the System framework
-	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
 	  ;;
 	esac
 
 	if test "$droppeddeps" = yes; then
 	  if test "$module" = yes; then
-	    $ECHO
-	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+	    echo
+	    echo "*** Warning: libtool could not satisfy all declared inter-library"
 	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
-	    $ECHO "*** a static module, that should work as long as the dlopening"
-	    $ECHO "*** application is linked with the -dlopen flag."
+	    echo "*** a static module, that should work as long as the dlopening"
+	    echo "*** application is linked with the -dlopen flag."
 	    if test -z "$global_symbol_pipe"; then
-	      $ECHO
-	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
-	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      $ECHO "*** not find such a program.  So, this module is probably useless."
-	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	      echo
+	      echo "*** However, this would only work if libtool was able to extract symbol"
+	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      echo "*** not find such a program.  So, this module is probably useless."
+	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	    fi
 	    if test "$build_old_libs" = no; then
 	      oldlibs="$output_objdir/$libname.$libext"
@@ -6813,16 +7954,16 @@ EOF
 	      build_libtool_libs=no
 	    fi
 	  else
-	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
-	    $ECHO "*** automatically added whenever a program is linked with this library"
-	    $ECHO "*** or is declared to -dlopen it."
+	    echo "*** The inter-library dependencies that have been dropped here will be"
+	    echo "*** automatically added whenever a program is linked with this library"
+	    echo "*** or is declared to -dlopen it."
 
 	    if test "$allow_undefined" = no; then
-	      $ECHO
-	      $ECHO "*** Since this library must not contain undefined symbols,"
-	      $ECHO "*** because either the platform does not support them or"
-	      $ECHO "*** it was explicitly requested with -no-undefined,"
-	      $ECHO "*** libtool will only create a static version of it."
+	      echo
+	      echo "*** Since this library must not contain undefined symbols,"
+	      echo "*** because either the platform does not support them or"
+	      echo "*** it was explicitly requested with -no-undefined,"
+	      echo "*** libtool will only create a static version of it."
 	      if test "$build_old_libs" = no; then
 		oldlibs="$output_objdir/$libname.$libext"
 		build_libtool_libs=module
@@ -6839,9 +7980,9 @@ EOF
       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
       case $host in
 	*-*-darwin*)
-	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	  ;;
       esac
 
@@ -6854,7 +7995,7 @@ EOF
 	*)
 	  case " $deplibs " in
 	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
+	    func_append new_libs " -L$path/$objdir" ;;
 	  esac
 	  ;;
 	esac
@@ -6864,10 +8005,10 @@ EOF
 	-L*)
 	  case " $new_libs " in
 	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
+	  *) func_append new_libs " $deplib" ;;
 	  esac
 	  ;;
-	*) new_libs="$new_libs $deplib" ;;
+	*) func_append new_libs " $deplib" ;;
 	esac
       done
       deplibs="$new_libs"
@@ -6884,10 +8025,12 @@ EOF
 	  hardcode_libdirs=
 	  dep_rpath=
 	  rpath="$finalize_rpath"
-	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
 	  for libdir in $rpath; do
 	    if test -n "$hardcode_libdir_flag_spec"; then
 	      if test -n "$hardcode_libdir_separator"; then
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
 		if test -z "$hardcode_libdirs"; then
 		  hardcode_libdirs="$libdir"
 		else
@@ -6896,18 +8039,18 @@ EOF
 		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		    ;;
 		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		    ;;
 		  esac
 		fi
 	      else
 		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
+		func_append dep_rpath " $flag"
 	      fi
 	    elif test -n "$runpath_var"; then
 	      case "$perm_rpath " in
 	      *" $libdir "*) ;;
-	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      *) func_apped perm_rpath " $libdir" ;;
 	      esac
 	    fi
 	  done
@@ -6925,7 +8068,7 @@ EOF
 	    # We should set the runpath_var.
 	    rpath=
 	    for dir in $perm_rpath; do
-	      rpath="$rpath$dir:"
+	      func_append rpath "$dir:"
 	    done
 	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
 	  fi
@@ -6933,7 +8076,7 @@ EOF
 	fi
 
 	shlibpath="$finalize_shlibpath"
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
 	if test -n "$shlibpath"; then
 	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
 	fi
@@ -6959,18 +8102,18 @@ EOF
 	linknames=
 	for link
 	do
-	  linknames="$linknames $link"
+	  func_append linknames " $link"
 	done
 
 	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	test "X$libobjs" = "X " && libobjs=
 
 	delfiles=
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
 	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
 	  export_symbols="$output_objdir/$libname.uexp"
-	  delfiles="$delfiles $export_symbols"
+	  func_append delfiles " $export_symbols"
 	fi
 
 	orig_export_symbols=
@@ -7001,13 +8144,45 @@ EOF
 	    $opt_dry_run || $RM $export_symbols
 	    cmds=$export_symbols_cmds
 	    save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
+	    for cmd1 in $cmds; do
 	      IFS="$save_ifs"
-	      eval cmd=\"$cmd\"
-	      func_len " $cmd"
-	      len=$func_len_result
-	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	      # Take the normal branch if the nm_file_list_spec branch
+	      # doesn't work or if tool conversion is not needed.
+	      case $nm_file_list_spec~$to_tool_file_cmd in
+		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+		  try_normal_branch=yes
+		  eval cmd=\"$cmd1\"
+		  func_len " $cmd"
+		  len=$func_len_result
+		  ;;
+		*)
+		  try_normal_branch=no
+		  ;;
+	      esac
+	      if test "$try_normal_branch" = yes \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=${output_objdir}/${output_la}.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		func_append delfiles " $output"
+		func_verbose "creating $NM input file list: $output"
+		for obj in $save_libobjs; do
+		  func_to_tool_file "$obj"
+		  $ECHO "$func_to_tool_file_result"
+		done > "$output"
+		eval cmd=\"$cmd1\"
 		func_show_eval "$cmd" 'exit $?'
+		output=$save_output
+		libobjs=$save_libobjs
 		skipped_export=false
 	      else
 		# The command line is too long to execute in one step.
@@ -7029,7 +8204,7 @@ EOF
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
 	  tmp_export_symbols="$export_symbols"
 	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	fi
 
 	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
@@ -7041,7 +8216,7 @@ EOF
 	  # global variables. join(1) would be nice here, but unfortunately
 	  # isn't a blessed tool.
 	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	  func_append delfiles " $export_symbols $output_objdir/$libname.filter"
 	  export_symbols=$output_objdir/$libname.def
 	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	fi
@@ -7051,7 +8226,7 @@ EOF
 	  case " $convenience " in
 	  *" $test_deplib "*) ;;
 	  *)
-	    tmp_deplibs="$tmp_deplibs $test_deplib"
+	    func_append tmp_deplibs " $test_deplib"
 	    ;;
 	  esac
 	done
@@ -7071,21 +8246,21 @@ EOF
 	    test "X$libobjs" = "X " && libobjs=
 	  else
 	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
+	    func_append generated " $gentop"
 
 	    func_extract_archives $gentop $convenience
-	    libobjs="$libobjs $func_extract_archives_result"
+	    func_append libobjs " $func_extract_archives_result"
 	    test "X$libobjs" = "X " && libobjs=
 	  fi
 	fi
 
 	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
-	  linker_flags="$linker_flags $flag"
+	  func_append linker_flags " $flag"
 	fi
 
 	# Make a backup of the uninstalled library when relinking
-	if test "$mode" = relink; then
+	if test "$opt_mode" = relink; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
 	fi
 
@@ -7130,7 +8305,8 @@ EOF
 	    save_libobjs=$libobjs
 	  fi
 	  save_output=$output
-	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+	  func_basename "$output"
+	  output_la=$func_basename_result
 
 	  # Clear the reloadable object creation command queue and
 	  # initialize k to one.
@@ -7143,13 +8319,16 @@ EOF
 	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
 	    output=${output_objdir}/${output_la}.lnkscript
 	    func_verbose "creating GNU ld script: $output"
-	    $ECHO 'INPUT (' > $output
+	    echo 'INPUT (' > $output
 	    for obj in $save_libobjs
 	    do
-	      $ECHO "$obj" >> $output
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
 	    done
-	    $ECHO ')' >> $output
-	    delfiles="$delfiles $output"
+	    echo ')' >> $output
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$func_to_tool_file_result
 	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
 	    output=${output_objdir}/${output_la}.lnk
 	    func_verbose "creating linker input file list: $output"
@@ -7163,10 +8342,12 @@ EOF
 	    fi
 	    for obj
 	    do
-	      $ECHO "$obj" >> $output
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
 	    done
-	    delfiles="$delfiles $output"
-	    output=$firstobj\"$file_list_spec$output\"
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
 	  else
 	    if test -n "$save_libobjs"; then
 	      func_verbose "creating reloadable object files..."
@@ -7190,17 +8371,19 @@ EOF
 		  # command to the queue.
 		  if test "$k" -eq 1 ; then
 		    # The first file doesn't have a previous command to add.
-		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+		    reload_objs=$objlist
+		    eval concat_cmds=\"$reload_cmds\"
 		  else
 		    # All subsequent reloadable object files will link in
 		    # the last one created.
-		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+		    reload_objs="$objlist $last_robj"
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
 		  fi
 		  last_robj=$output_objdir/$output_la-${k}.$objext
 		  func_arith $k + 1
 		  k=$func_arith_result
 		  output=$output_objdir/$output_la-${k}.$objext
-		  objlist=$obj
+		  objlist=" $obj"
 		  func_len " $last_robj"
 		  func_arith $len0 + $func_len_result
 		  len=$func_arith_result
@@ -7210,11 +8393,12 @@ EOF
 	      # reloadable object file.  All subsequent reloadable object
 	      # files will link in the last one created.
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+	      reload_objs="$objlist $last_robj"
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
 	      if test -n "$last_robj"; then
 	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
 	      fi
-	      delfiles="$delfiles $output"
+	      func_append delfiles " $output"
 
 	    else
 	      output=
@@ -7248,7 +8432,7 @@ EOF
 		lt_exit=$?
 
 		# Restore the uninstalled library and exit
-		if test "$mode" = relink; then
+		if test "$opt_mode" = relink; then
 		  ( cd "$output_objdir" && \
 		    $RM "${realname}T" && \
 		    $MV "${realname}U" "$realname" )
@@ -7269,7 +8453,7 @@ EOF
 	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
 	      tmp_export_symbols="$export_symbols"
 	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	    fi
 
 	    if test -n "$orig_export_symbols"; then
@@ -7281,7 +8465,7 @@ EOF
 	      # global variables. join(1) would be nice here, but unfortunately
 	      # isn't a blessed tool.
 	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	      func_append delfiles " $export_symbols $output_objdir/$libname.filter"
 	      export_symbols=$output_objdir/$libname.def
 	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	    fi
@@ -7322,10 +8506,10 @@ EOF
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
 	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
-	  libobjs="$libobjs $func_extract_archives_result"
+	  func_append libobjs " $func_extract_archives_result"
 	  test "X$libobjs" = "X " && libobjs=
 	fi
 
@@ -7341,7 +8525,7 @@ EOF
 	    lt_exit=$?
 
 	    # Restore the uninstalled library and exit
-	    if test "$mode" = relink; then
+	    if test "$opt_mode" = relink; then
 	      ( cd "$output_objdir" && \
 	        $RM "${realname}T" && \
 		$MV "${realname}U" "$realname" )
@@ -7353,7 +8537,7 @@ EOF
 	IFS="$save_ifs"
 
 	# Restore the uninstalled library and exit
-	if test "$mode" = relink; then
+	if test "$opt_mode" = relink; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
 	  if test -n "$convenience"; then
@@ -7434,18 +8618,21 @@ EOF
       if test -n "$convenience"; then
 	if test -n "$whole_archive_flag_spec"; then
 	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
 	else
 	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $convenience
 	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 	fi
       fi
 
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
       # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
       output="$obj"
       func_execute_cmds "$reload_cmds" 'exit $?'
@@ -7505,8 +8692,8 @@ EOF
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
 	# On Rhapsody replace the C library is the System framework
-	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
 	;;
       esac
 
@@ -7517,14 +8704,14 @@ EOF
 	if test "$tagname" = CXX ; then
 	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
 	    10.[0123])
-	      compile_command="$compile_command ${wl}-bind_at_load"
-	      finalize_command="$finalize_command ${wl}-bind_at_load"
+	      func_append compile_command " ${wl}-bind_at_load"
+	      func_append finalize_command " ${wl}-bind_at_load"
 	    ;;
 	  esac
 	fi
 	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
-	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	;;
       esac
 
@@ -7538,7 +8725,7 @@ EOF
 	*)
 	  case " $compile_deplibs " in
 	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
+	    func_append new_libs " -L$path/$objdir" ;;
 	  esac
 	  ;;
 	esac
@@ -7548,17 +8735,17 @@ EOF
 	-L*)
 	  case " $new_libs " in
 	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
+	  *) func_append new_libs " $deplib" ;;
 	  esac
 	  ;;
-	*) new_libs="$new_libs $deplib" ;;
+	*) func_append new_libs " $deplib" ;;
 	esac
       done
       compile_deplibs="$new_libs"
 
 
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
 
       if test -n "$rpath$xrpath"; then
 	# If the user specified any rpath flags, then add them.
@@ -7566,7 +8753,7 @@ EOF
 	  # This is the magic to use -rpath.
 	  case "$finalize_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
       fi
@@ -7585,18 +8772,18 @@ EOF
 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		;;
 	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		;;
 	      esac
 	    fi
 	  else
 	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
+	    func_append rpath " $flag"
 	  fi
 	elif test -n "$runpath_var"; then
 	  case "$perm_rpath " in
 	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  *) func_append perm_rpath " $libdir" ;;
 	  esac
 	fi
 	case $host in
@@ -7605,12 +8792,12 @@ EOF
 	  case :$dllsearchpath: in
 	  *":$libdir:"*) ;;
 	  ::) dllsearchpath=$libdir;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  *) func_append dllsearchpath ":$libdir";;
 	  esac
 	  case :$dllsearchpath: in
 	  *":$testbindir:"*) ;;
 	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  *) func_append dllsearchpath ":$testbindir";;
 	  esac
 	  ;;
 	esac
@@ -7636,18 +8823,18 @@ EOF
 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		;;
 	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		;;
 	      esac
 	    fi
 	  else
 	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
+	    func_append rpath " $flag"
 	  fi
 	elif test -n "$runpath_var"; then
 	  case "$finalize_perm_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  *) func_append finalize_perm_rpath " $libdir" ;;
 	  esac
 	fi
       done
@@ -7661,8 +8848,8 @@ EOF
 
       if test -n "$libobjs" && test "$build_old_libs" = yes; then
 	# Transform all the library objects into standard objects.
-	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
       fi
 
       func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
@@ -7674,15 +8861,15 @@ EOF
 
       wrappers_required=yes
       case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
       *cygwin* | *mingw* )
         if test "$build_libtool_libs" != yes; then
           wrappers_required=no
         fi
         ;;
-      *cegcc)
-        # Disable wrappers for cegcc, we are cross compiling anyway.
-        wrappers_required=no
-        ;;
       *)
         if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
           wrappers_required=no
@@ -7691,13 +8878,19 @@ EOF
       esac
       if test "$wrappers_required" = no; then
 	# Replace the output file specification.
-	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
 	link_command="$compile_command$compile_rpath"
 
 	# We have no uninstalled library dependencies, so finalize right now.
 	exit_status=0
 	func_show_eval "$link_command" 'exit_status=$?'
 
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
 	# Delete the generated files.
 	if test -f "$output_objdir/${outputname}S.${objext}"; then
 	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
@@ -7720,7 +8913,7 @@ EOF
 	  # We should set the runpath_var.
 	  rpath=
 	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
+	    func_append rpath "$dir:"
 	  done
 	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
@@ -7728,7 +8921,7 @@ EOF
 	  # We should set the runpath_var.
 	  rpath=
 	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
+	    func_append rpath "$dir:"
 	  done
 	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
@@ -7738,11 +8931,18 @@ EOF
 	# We don't need to create a wrapper script.
 	link_command="$compile_var$compile_command$compile_rpath"
 	# Replace the output file specification.
-	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
 	# Delete the old output file.
 	$opt_dry_run || $RM $output
 	# Link the executable and exit
 	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
 	exit $EXIT_SUCCESS
       fi
 
@@ -7757,7 +8957,7 @@ EOF
 	if test "$fast_install" != no; then
 	  link_command="$finalize_var$compile_command$finalize_rpath"
 	  if test "$fast_install" = yes; then
-	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	    relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
 	  else
 	    # fast_install is set to needless
 	    relink_command=
@@ -7769,13 +8969,19 @@ EOF
       fi
 
       # Replace the output file specification.
-      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
 
       # Delete the old output files.
       $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
       func_show_eval "$link_command" 'exit $?'
 
+      if test -n "$postlink_cmds"; then
+	func_to_tool_file "$output_objdir/$outputname"
+	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
       # Now create the wrapper script.
       func_verbose "creating $output"
 
@@ -7793,18 +8999,7 @@ EOF
 	  fi
 	done
 	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $ECHO for shipping.
-      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
-	case $progpath in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-	esac
-	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
       fi
 
       # Only actually do things if not in dry run mode.
@@ -7884,7 +9079,7 @@ EOF
 	else
 	  oldobjs="$old_deplibs $non_pic_objects"
 	  if test "$preload" = yes && test -f "$symfileobj"; then
-	    oldobjs="$oldobjs $symfileobj"
+	    func_append oldobjs " $symfileobj"
 	  fi
 	fi
 	addlibs="$old_convenience"
@@ -7892,10 +9087,10 @@ EOF
 
       if test -n "$addlibs"; then
 	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
+	func_append generated " $gentop"
 
 	func_extract_archives $gentop $addlibs
-	oldobjs="$oldobjs $func_extract_archives_result"
+	func_append oldobjs " $func_extract_archives_result"
       fi
 
       # Do each command in the archive commands.
@@ -7906,10 +9101,10 @@ EOF
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
 	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
-	  oldobjs="$oldobjs $func_extract_archives_result"
+	  func_append oldobjs " $func_extract_archives_result"
 	fi
 
 	# POSIX demands no paths to be encoded in archives.  We have
@@ -7925,9 +9120,9 @@ EOF
 	    done | sort | sort -uc >/dev/null 2>&1); then
 	  :
 	else
-	  $ECHO "copying selected object files to avoid basename conflicts..."
+	  echo "copying selected object files to avoid basename conflicts..."
 	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  func_append generated " $gentop"
 	  func_mkdir_p "$gentop"
 	  save_oldobjs=$oldobjs
 	  oldobjs=
@@ -7951,9 +9146,9 @@ EOF
 		esac
 	      done
 	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-	      oldobjs="$oldobjs $gentop/$newobj"
+	      func_append oldobjs " $gentop/$newobj"
 	      ;;
-	    *) oldobjs="$oldobjs $obj" ;;
+	    *) func_append oldobjs " $obj" ;;
 	    esac
 	  done
 	fi
@@ -7963,6 +9158,16 @@ EOF
 	len=$func_len_result
 	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 	  cmds=$old_archive_cmds
+	elif test -n "$archiver_list_spec"; then
+	  func_verbose "using command file archive linking..."
+	  for obj in $oldobjs
+	  do
+	    func_to_tool_file "$obj"
+	    $ECHO "$func_to_tool_file_result"
+	  done > $output_objdir/$libname.libcmd
+	  func_to_tool_file "$output_objdir/$libname.libcmd"
+	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+	  cmds=$old_archive_cmds
 	else
 	  # the command line is too long to link in one step, link in parts
 	  func_verbose "using piecewise archive linking..."
@@ -8036,7 +9241,7 @@ EOF
       done
       # Quote the link command for shipping.
       relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
       if test "$hardcode_automatic" = yes ; then
 	relink_command=
       fi
@@ -8059,9 +9264,19 @@ EOF
 		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$deplib' is not a valid libtool archive"
-		newdependency_libs="$newdependency_libs $libdir/$name"
+		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      -L*)
+		func_stripname -L '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -L$func_replace_sysroot_result"
 		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      -R*)
+		func_stripname -R '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -R$func_replace_sysroot_result"
+		;;
+	      *) func_append newdependency_libs " $deplib" ;;
 	      esac
 	    done
 	    dependency_libs="$newdependency_libs"
@@ -8075,9 +9290,9 @@ EOF
 		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$lib' is not a valid libtool archive"
-		newdlfiles="$newdlfiles $libdir/$name"
+		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
-	      *) newdlfiles="$newdlfiles $lib" ;;
+	      *) func_append newdlfiles " $lib" ;;
 	      esac
 	    done
 	    dlfiles="$newdlfiles"
@@ -8094,7 +9309,7 @@ EOF
 		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
 		  func_fatal_error "\`$lib' is not a valid libtool archive"
-		newdlprefiles="$newdlprefiles $libdir/$name"
+		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      esac
 	    done
@@ -8106,7 +9321,7 @@ EOF
 		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
-	      newdlfiles="$newdlfiles $abs"
+	      func_append newdlfiles " $abs"
 	    done
 	    dlfiles="$newdlfiles"
 	    newdlprefiles=
@@ -8115,15 +9330,33 @@ EOF
 		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
-	      newdlprefiles="$newdlprefiles $abs"
+	      func_append newdlprefiles " $abs"
 	    done
 	    dlprefiles="$newdlprefiles"
 	  fi
 	  $RM $output
 	  # place dlname in correct position for cygwin
+	  # In fact, it would be nice if we could use this code for all target
+	  # systems that can't hard-code library paths into their executables
+	  # and that have no shared library path variable independent of PATH,
+	  # but it turns out we can't easily determine that from inspecting
+	  # libtool variables, so we have to hard-code the OSs to which it
+	  # applies here; at the moment, that means platforms that use the PE
+	  # object format with DLL files.  See the long comment at the top of
+	  # tests/bindir.at for full details.
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+	      # If a -bindir argument was supplied, place the dll there.
+	      if test "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file
@@ -8182,7 +9415,7 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-{ test "$mode" = link || test "$mode" = relink; } &&
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
     func_mode_link ${1+"$@"}
 
 
@@ -8202,9 +9435,9 @@ func_mode_uninstall ()
     for arg
     do
       case $arg in
-      -f) RM="$RM $arg"; rmforce=yes ;;
-      -*) RM="$RM $arg" ;;
-      *) files="$files $arg" ;;
+      -f) func_append RM " $arg"; rmforce=yes ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
       esac
     done
 
@@ -8213,24 +9446,23 @@ func_mode_uninstall ()
 
     rmdirs=
 
-    origobjdir="$objdir"
     for file in $files; do
       func_dirname "$file" "" "."
       dir="$func_dirname_result"
       if test "X$dir" = X.; then
-	objdir="$origobjdir"
+	odir="$objdir"
       else
-	objdir="$dir/$origobjdir"
+	odir="$dir/$objdir"
       fi
       func_basename "$file"
       name="$func_basename_result"
-      test "$mode" = uninstall && objdir="$dir"
+      test "$opt_mode" = uninstall && odir="$dir"
 
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
 	case " $rmdirs " in
-	  *" $objdir "*) ;;
-	  *) rmdirs="$rmdirs $objdir" ;;
+	  *" $odir "*) ;;
+	  *) func_append rmdirs " $odir" ;;
 	esac
       fi
 
@@ -8256,18 +9488,17 @@ func_mode_uninstall ()
 
 	  # Delete the libtool libraries and symlinks.
 	  for n in $library_names; do
-	    rmfiles="$rmfiles $objdir/$n"
+	    func_append rmfiles " $odir/$n"
 	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-	  case "$mode" in
+	  case "$opt_mode" in
 	  clean)
-	    case "  $library_names " in
-	    # "  " in the beginning catches empty $dlname
+	    case " $library_names " in
 	    *" $dlname "*) ;;
-	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
 	    esac
-	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
 	    ;;
 	  uninstall)
 	    if test -n "$library_names"; then
@@ -8295,19 +9526,19 @@ func_mode_uninstall ()
 	  # Add PIC object to the list of files to remove.
 	  if test -n "$pic_object" &&
 	     test "$pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$pic_object"
+	    func_append rmfiles " $dir/$pic_object"
 	  fi
 
 	  # Add non-PIC object to the list of files to remove.
 	  if test -n "$non_pic_object" &&
 	     test "$non_pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$non_pic_object"
+	    func_append rmfiles " $dir/$non_pic_object"
 	  fi
 	fi
 	;;
 
       *)
-	if test "$mode" = clean ; then
+	if test "$opt_mode" = clean ; then
 	  noexename=$name
 	  case $file in
 	  *.exe)
@@ -8317,7 +9548,7 @@ func_mode_uninstall ()
 	    noexename=$func_stripname_result
 	    # $file with .exe has already been added to rmfiles,
 	    # add $file without .exe
-	    rmfiles="$rmfiles $file"
+	    func_append rmfiles " $file"
 	    ;;
 	  esac
 	  # Do a test to see if this is a libtool program.
@@ -8326,7 +9557,7 @@ func_mode_uninstall ()
 	      func_ltwrapper_scriptname "$file"
 	      relink_command=
 	      func_source $func_ltwrapper_scriptname_result
-	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	      func_append rmfiles " $func_ltwrapper_scriptname_result"
 	    else
 	      relink_command=
 	      func_source $dir/$noexename
@@ -8334,12 +9565,12 @@ func_mode_uninstall ()
 
 	    # note $name still contains .exe if it was in $file originally
 	    # as does the version of $file that was added into $rmfiles
-	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
 	    if test "$fast_install" = yes && test -n "$relink_command"; then
-	      rmfiles="$rmfiles $objdir/lt-$name"
+	      func_append rmfiles " $odir/lt-$name"
 	    fi
 	    if test "X$noexename" != "X$name" ; then
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	      func_append rmfiles " $odir/lt-${noexename}.c"
 	    fi
 	  fi
 	fi
@@ -8347,7 +9578,6 @@ func_mode_uninstall ()
       esac
       func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
-    objdir="$origobjdir"
 
     # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
@@ -8359,16 +9589,16 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
     func_mode_uninstall ${1+"$@"}
 
-test -z "$mode" && {
+test -z "$opt_mode" && {
   help="$generic_help"
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$mode'"
+  func_fatal_help "invalid operation mode \`$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
diff --git a/binsrc/config/ltoptions.m4 b/binsrc/config/ltoptions.m4
index 34151a3..17cfd51 100644
--- a/binsrc/config/ltoptions.m4
+++ b/binsrc/config/ltoptions.m4
@@ -1,13 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 6 ltoptions.m4
+# serial 7 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -125,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 [enable_win32_dll=yes
 
 case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
   AC_CHECK_TOOL(AS, as, false)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -133,13 +134,13 @@ case $host in
 esac
 
 test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
 test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
 test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 ])# win32-dll
 
 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
diff --git a/binsrc/config/ltversion.m4 b/binsrc/config/ltversion.m4
index f3c5309..9c7b5d4 100644
--- a/binsrc/config/ltversion.m4
+++ b/binsrc/config/ltversion.m4
@@ -7,17 +7,17 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# Generated from ltversion.in.
+# @configure_input@
 
-# serial 3017 ltversion.m4
+# serial 3293 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
+m4_define([LT_PACKAGE_VERSION], [2.4])
+m4_define([LT_PACKAGE_REVISION], [1.3293])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
+[macro_version='2.4'
+macro_revision='1.3293'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/binsrc/config/lt~obsolete.m4 b/binsrc/config/lt~obsolete.m4
index 637bb20..c573da9 100644
--- a/binsrc/config/lt~obsolete.m4
+++ b/binsrc/config/lt~obsolete.m4
@@ -1,13 +1,13 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 4 lt~obsolete.m4
+# serial 5 lt~obsolete.m4
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
@@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
 m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
 m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@@ -90,3 +89,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
diff --git a/binsrc/dav/.dav_load.sh b/binsrc/dav/.dav_load.sh
index 07b72b4..0287ad3 100755
--- a/binsrc/dav/.dav_load.sh
+++ b/binsrc/dav/.dav_load.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: .dav_load.sh,v 1.3 2009/04/14 12:16:49 source Exp $
+#  $Id: .dav_load.sh,v 1.3.2.1 2012/03/08 12:54:59 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_Archive.sql b/binsrc/dav/DET_Archive.sql
index 8441973..fe03440 100644
--- a/binsrc/dav/DET_Archive.sql
+++ b/binsrc/dav/DET_Archive.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Archive.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DET_Archive.sql,v 1.2.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_Blog.sql b/binsrc/dav/DET_Blog.sql
index 54813cb..ca1ec51 100644
--- a/binsrc/dav/DET_Blog.sql
+++ b/binsrc/dav/DET_Blog.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Blog.sql,v 1.4 2009/02/13 10:09:13 source Exp $
+--  $Id: DET_Blog.sql,v 1.4.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_Bookmark.sql b/binsrc/dav/DET_Bookmark.sql
index 9dff9dc..d806be2 100644
--- a/binsrc/dav/DET_Bookmark.sql
+++ b/binsrc/dav/DET_Bookmark.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Bookmark.sql,v 1.3.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DET_Bookmark.sql,v 1.3.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_CatFilter.sql b/binsrc/dav/DET_CatFilter.sql
index 25c8208..167c32d 100644
--- a/binsrc/dav/DET_CatFilter.sql
+++ b/binsrc/dav/DET_CatFilter.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_CatFilter.sql,v 1.2 2007/03/28 11:41:04 source Exp $
+--  $Id: DET_CatFilter.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_DynaRes.sql b/binsrc/dav/DET_DynaRes.sql
index 2fb1435..d5d5eaa 100644
--- a/binsrc/dav/DET_DynaRes.sql
+++ b/binsrc/dav/DET_DynaRes.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_DynaRes.sql,v 1.1.2.2 2010/12/10 15:20:48 source Exp $
+--  $Id: DET_DynaRes.sql,v 1.1.2.4 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -117,8 +117,13 @@ create function "DynaRes_DAV_AUTHENTICATE_HTTP" (in id any, in what char(1), in
       if ((not allow_anon) or ('' <> WS.WS.FINDPARAM (a_lines, 'Authorization:')))
       rc := WS.WS.GET_DAV_AUTH (a_lines, allow_anon, can_write_http, a_uname, u_password, a_uid, a_gid, _perms);
       if (rc < 0)
+      {
+        if (DAV_AUTHENTICATE_SSL (id, what, null, req, a_uid, a_gid, _perms))
+          return a_uid;
+
         return rc;
     }
+    }
   if (isinteger (a_uid))
     {
       if (a_uid < 0)
@@ -489,7 +494,13 @@ create function "DynaRes_DAV_SEARCH_ID" (in detcol_id any, in path_parts any, in
 create function "DynaRes_DAV_SEARCH_PATH" (in id any, in what char(1)) returns any
 {
   -- dbg_obj_princ ('DynaRes_DAV_SEARCH_PATH (', id, what, ')');
+  if (what <> 'R')    
   return NULL;
+  for select DR_NAME from WS.WS.DYNA_RES where DR_RES_ID = id[3] and DR_DETCOL_ID = id[1] do
+    {
+      return concat (DAV_SEARCH_PATH (id[1], 'C'), DR_NAME);
+    }  
+  return null;  
 }
 ;
 
diff --git a/binsrc/dav/DET_Gallery.sql b/binsrc/dav/DET_Gallery.sql
index 5f013a0..6a7e2f8 100644
--- a/binsrc/dav/DET_Gallery.sql
+++ b/binsrc/dav/DET_Gallery.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Gallery.sql,v 1.3 2008/04/21 08:10:38 source Exp $
+--  $Id: DET_Gallery.sql,v 1.3.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_HostFs.sql b/binsrc/dav/DET_HostFs.sql
index ed9968b..48f336d 100644
--- a/binsrc/dav/DET_HostFs.sql
+++ b/binsrc/dav/DET_HostFs.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_HostFs.sql,v 1.3 2008/04/21 08:10:38 source Exp $
+--  $Id: DET_HostFs.sql,v 1.3.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_PropFilter.sql b/binsrc/dav/DET_PropFilter.sql
index e948f91..1ba150b 100644
--- a/binsrc/dav/DET_PropFilter.sql
+++ b/binsrc/dav/DET_PropFilter.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_PropFilter.sql,v 1.2 2007/03/28 11:41:04 source Exp $
+--  $Id: DET_PropFilter.sql,v 1.2.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_RDFData.sql b/binsrc/dav/DET_RDFData.sql
index f040b80..7b78aa4 100644
--- a/binsrc/dav/DET_RDFData.sql
+++ b/binsrc/dav/DET_RDFData.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_RDFData.sql,v 1.16.2.1 2010/05/18 19:25:26 source Exp $
+--  $Id: DET_RDFData.sql,v 1.16.2.3 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -641,6 +641,11 @@ create function DB.DBA."RDFData_DAV_RES_CONTENT" (in id any, inout content any,
           ses := sioc..compose_foaf (uname, type, pg);
 	  goto ret_place2;
 	}
+      else if (__proc_exists ('sioc.DBA.ods_obj_describe') is not null)
+	{
+	  ses := sioc..ods_obj_describe (iri, type, pg);
+	  goto ret_place2;
+	}
       else if (regexp_match ('https?://([^/]*)/dataspace/([^/]*)(#this|/sioc.rdf|/sioc.n3)?\x24', iri) is not null
 	  and __proc_exists ('sioc.DBA.ods_sioc_obj_describe') is not null)
 	{
diff --git a/binsrc/dav/DET_ResFilter.sql b/binsrc/dav/DET_ResFilter.sql
index 8bb8d94..11f31cb 100644
--- a/binsrc/dav/DET_ResFilter.sql
+++ b/binsrc/dav/DET_ResFilter.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_ResFilter.sql,v 1.1.2.1 2010/12/10 15:19:38 source Exp $
+--  $Id: DET_ResFilter.sql,v 1.1.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_S3.sql b/binsrc/dav/DET_S3.sql
index 3c20392..cb02483 100644
--- a/binsrc/dav/DET_S3.sql
+++ b/binsrc/dav/DET_S3.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_S3.sql,v 1.4.2.2 2009/11/20 17:11:24 source Exp $
+--  $Id: DET_S3.sql,v 1.4.2.4 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -645,12 +645,13 @@ create function DB.DBA."S3_DAV_DELETE" (
 --| There's a special problem, known as 'Transaction deadlock after reading from HTTP session'.
 --| The DET function should do only one INSERT of the 'content' into the table and do it as late as possible.
 --| The function should return -29 if deadlocked or otherwise broken after reading blob from HTTP.
-create function DB.DBA."S3_DAV_RES_UPLOAD" (in detcolID any, in pathParts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
-{
+-- XXX: this as built-in stops the actual code to be used
+--create function DB.DBA."S3_DAV_RES_UPLOAD" (in detcolID any, in pathParts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any
+--{
   -- dbg_obj_princ ('S3_DAV_RES_UPLOAD (', detcolID, pathParts, ', [content], ', type, permissions, uid, gid, auth_uid, ')');
-  return -20;
-}
-;
+--  return -20;
+--}
+--;
 
 --| When DAV_PROP_REMOVE_INT calls DET function, authentication and check for locks are performed before the call.
 --| The check whether it's a system name or not (when an error in returned if name is system) is _not_ permitted.
diff --git a/binsrc/dav/DET_Stub.sql b/binsrc/dav/DET_Stub.sql
index d9b3f82..fa757cf 100644
--- a/binsrc/dav/DET_Stub.sql
+++ b/binsrc/dav/DET_Stub.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Stub.sql,v 1.3 2009/02/13 10:08:06 source Exp $
+--  $Id: DET_Stub.sql,v 1.3.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -255,7 +255,7 @@ create function "Stub_DAV_SYMLINK" (in detcol_id any, in path_parts any, in sour
 ;
 
 --| This gets a list of resources and/or collections as it is returned by DAV_DIR_LIST and and writes the list of quads (old_id, 'what', old_full_path, dereferenced_id, dereferenced_full_path).
-create function "Stub_DAV_DEREFERENCE_LIST" (in detcol_id any, inout report_array) returns any
+create function "Stub_DAV_DEREFERENCE_LIST" (in detcol_id any, inout report_array any) returns any
 {
   -- dbg_obj_princ ('Stub_DAV_DEREFERENCE_LIST (', detcol_id, report_array, ')');
   return -20;
diff --git a/binsrc/dav/DET_nntp.sql b/binsrc/dav/DET_nntp.sql
index 5a7c6d9..d21b148 100644
--- a/binsrc/dav/DET_nntp.sql
+++ b/binsrc/dav/DET_nntp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_nntp.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DET_nntp.sql,v 1.2.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DET_oMail.sql b/binsrc/dav/DET_oMail.sql
index 8b8a9c9..fdc7e14 100644
--- a/binsrc/dav/DET_oMail.sql
+++ b/binsrc/dav/DET_oMail.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_oMail.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DET_oMail.sql,v 1.2.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DETtest.sql b/binsrc/dav/DETtest.sql
index e459a03..8622aa8 100644
--- a/binsrc/dav/DETtest.sql
+++ b/binsrc/dav/DETtest.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DETtest.sql,v 1.1 2007/03/26 14:47:01 source Exp $
+--  $Id: DETtest.sql,v 1.1.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/DETtest_CatFilter.sql b/binsrc/dav/DETtest_CatFilter.sql
index 6fc62f2..8ef7027 100644
--- a/binsrc/dav/DETtest_CatFilter.sql
+++ b/binsrc/dav/DETtest_CatFilter.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DETtest_CatFilter.sql,v 1.1.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DETtest_CatFilter.sql,v 1.1.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -41,7 +41,7 @@ create procedure TEST_CATFILTER_MAKE_SCHEMA (in base varchar, in addon_uri varch
     <rdfs:label>An example of RDF schema with Virtuoso extensions for TEST_CatFilter.</rdfs:label>
     <rdfs:comment>This schema contains a set of properties that should be used by categorization of test resources.</rdfs:comment>
     <!-- document version -->
-    <virtrdf:version>$$Id: DETtest_CatFilter.sql,v 1.1.2.1 2009/11/20 17:11:24 source Exp $$</virtrdf:version>
+    <virtrdf:version>$$Id: DETtest_CatFilter.sql,v 1.1.2.2 2012/03/08 12:54:59 source Exp $$</virtrdf:version>
   </owl:Ontology>
 ', ses);
 
diff --git a/binsrc/dav/DETtest_sec.sql b/binsrc/dav/DETtest_sec.sql
index 6136eed..6eaae55 100644
--- a/binsrc/dav/DETtest_sec.sql
+++ b/binsrc/dav/DETtest_sec.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DETtest_sec.sql,v 1.1 2007/03/26 14:47:01 source Exp $
+--  $Id: DETtest_sec.sql,v 1.1.2.1 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/Makefile.am b/binsrc/dav/Makefile.am
index ca0c8eb..862d90c 100644
--- a/binsrc/dav/Makefile.am
+++ b/binsrc/dav/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/Makefile.in b/binsrc/dav/Makefile.in
index 4af3631..ffd943e 100644
--- a/binsrc/dav/Makefile.in
+++ b/binsrc/dav/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/dav/Versioning/DETVerTest.m4 b/binsrc/dav/Versioning/DETVerTest.m4
index 64551c2..eaeb905 100644
--- a/binsrc/dav/Versioning/DETVerTest.m4
+++ b/binsrc/dav/Versioning/DETVerTest.m4
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/Versioning/DETVerTest.sql b/binsrc/dav/Versioning/DETVerTest.sql
index 3102f54..8400379 100644
--- a/binsrc/dav/Versioning/DETVerTest.sql
+++ b/binsrc/dav/Versioning/DETVerTest.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DETVerTest.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DETVerTest.sql,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -24,7 +24,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/Versioning/DETVerTest2.sql b/binsrc/dav/Versioning/DETVerTest2.sql
index 4125394..3c3d6f5 100644
--- a/binsrc/dav/Versioning/DETVerTest2.sql
+++ b/binsrc/dav/Versioning/DETVerTest2.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DETVerTest2.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DETVerTest2.sql,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/Versioning/DET_Versioning.sql b/binsrc/dav/Versioning/DET_Versioning.sql
index 00eb8aa..6d3ae08 100644
--- a/binsrc/dav/Versioning/DET_Versioning.sql
+++ b/binsrc/dav/Versioning/DET_Versioning.sql
@@ -1,10 +1,10 @@
 --
---  $Id: DET_Versioning.sql,v 1.6.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: DET_Versioning.sql,v 1.6.2.3 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -294,7 +294,7 @@ CREATE TRIGGER "Versioning_DAV_RES_INSERT" AFTER INSERT ON WS.WS.SYS_DAV_RES ORD
 }
 ;
 
-CREATE TRIGGER "Versioning_DAV_RES_UPDATE" AFTER UPDATE ON WS.WS.SYS_DAV_RES ORDER 10 REFERENCING NEW AS N, OLD AS O
+CREATE TRIGGER "Versioning_DAV_RES_UPDATE" BEFORE UPDATE ON WS.WS.SYS_DAV_RES ORDER 10 REFERENCING NEW AS N, OLD AS O
 {
   declare _diff, _diff_type varchar;
   _diff := NULL;
diff --git a/binsrc/dav/Versioning/dav_ver_new.sql b/binsrc/dav/Versioning/dav_ver_new.sql
index dc52b25..8422415 100644
--- a/binsrc/dav/Versioning/dav_ver_new.sql
+++ b/binsrc/dav/Versioning/dav_ver_new.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_ver_new.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: dav_ver_new.sql,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/Versioning/test.m4 b/binsrc/dav/Versioning/test.m4
index 741a5e0..c5d9d6b 100644
--- a/binsrc/dav/Versioning/test.m4
+++ b/binsrc/dav/Versioning/test.m4
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/dav-rdf-schema-example.rdf b/binsrc/dav/dav-rdf-schema-example.rdf
index 5983790..18657ae 100644
--- a/binsrc/dav/dav-rdf-schema-example.rdf
+++ b/binsrc/dav/dav-rdf-schema-example.rdf
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/dav.sql b/binsrc/dav/dav.sql
index 805f88c..9db4b25 100644
--- a/binsrc/dav/dav.sql
+++ b/binsrc/dav/dav.sql
@@ -1,12 +1,12 @@
 --
---  $Id: dav.sql,v 1.20.2.10 2011/03/08 13:39:20 source Exp $
+--  $Id: dav.sql,v 1.20.2.20 2012/03/08 12:54:59 source Exp $
 --
 --  WebDAV support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -25,16 +25,70 @@
 
 create procedure WS.WS."OPTIONS" (in path varchar, inout params varchar, in lines varchar)
 {
-  declare headers, ctype any;
+	declare full_path varchar;
+	declare path_id any;
+	full_path := '/' || DAV_CONCAT_PATH (path, '/');
+	path_id := DAV_SEARCH_ID (full_path, 'C');
+	if (isarray(path_id) = 1)
+	{
+		if (path_id[0] = UNAME'CalDAV')
+		{
+			http_header (concat (
+				'Content-Type: text/xml\r\n',
+				'Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE\r\n',
+				'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\r\n',
+				'DAV: 1, 2, access-control, calendar-access\r\n',
+				'MS-Author-Via: DAV\r\n'));
+			return;
+		}
+		if (path_id[0] = UNAME'CardDAV')
+		{
+			http_header (concat (
+				'Content-Type: text/xml\r\n',
+				'Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE\r\n',
+				'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\r\n',
+				'DAV: 1, 2, 3, access-control, addressbook\r\n',
+				'MS-Author-Via: DAV\r\n'));
+			return;
+		}
+	}
+	else
+	{
+		declare is_det int;
+		is_det := (select COL_ID from WS.WS.SYS_DAV_COL where COL_ID = path_id and COL_DET = 'CalDAV');
+		if (is_det > 0)
+		{
+			http_header (concat (
+				'Content-Type: text/xml\r\n',
+				'Allow: OPTIONS, GET, HEAD, POST, TRACE\r\n',
+				'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\r\n',
+				'DAV: 1, 2, access-control, calendar-access\r\n',
+				'MS-Author-Via: DAV\r\n'));
+			return;
+		}
+		is_det := (select COL_ID from WS.WS.SYS_DAV_COL where COL_ID = path_id and COL_DET = 'CardDAV');
+		if (is_det > 0)
+		{
+			http_header (concat (
+				'Content-Type: text/xml\r\n',
+				'Allow: OPTIONS, GET, HEAD, POST, TRACE\r\n',
+				'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\r\n',
+				'DAV: 1, 2, 3, access-control, addressbook\r\n',
+				'MS-Author-Via: DAV\r\n'));
+			return;
+		}
+	}
+  declare headers, ctype, msauthor any;
   http_methods_set ('OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'PROPFIND', 'PROPPATCH', 'COPY', 'MOVE', 'LOCK', 'UNLOCK');
   WS.WS.GET (path, params, lines);
   headers := http_header_array_get ();
   ctype := http_request_header (headers, 'Content-Type', null, 'text/plain');
+  msauthor := http_request_header (headers, 'MS-Author-Via', null, 'DAV');
   http_status_set (200);
   http_rewrite ();
   http_header (concat (sprintf ('Content-Type: %s\r\n', ctype),
 	'DAV: 1,2,<http://www.openlinksw.com/virtuoso/webdav/1.0>\r\n',
-	'MS-Author-Via: DAV\r\n'));
+	sprintf ('MS-Author-Via: %s\r\n', msauthor)));
 }
 ;
 
@@ -49,17 +103,14 @@ create procedure WS.WS.PROPFIND (in path varchar, inout params varchar, in lines
   declare uname, upwd varchar;
   declare id any;
   declare _u_id, _g_id, rc integer;
+	--dbg_obj_princ ('WS.WS.PROPFIND (', path, params, lines, ')');
 
   _ses := aref_set_0 (params, 1);
   _body := string_output_string (_ses);
-  -- dbg_obj_princ (_body);
   _lpath := http_path ();
   _ppath := http_physical_path ();
   if (_lpath = '')
     _lpath := '/';
-
-  -- dbg_obj_princ ('WS.WS.PROPFIND (', path, params, lines, ')');
-
   id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(''), path, vector('')), 'C'));
   if (id is not null)
     st := 'C';
@@ -84,7 +135,6 @@ create procedure WS.WS.PROPFIND (in path varchar, inout params varchar, in lines
     {
       rc := DAV_AUTHENTICATE_HTTP (DAV_GET_PARENT (id, st, _ppath), 'C', '1__', 1, lines, uname, upwd, _u_id, _g_id, _perms);
     }
-  -- dbg_obj_princ ('Authentication in PROPFIND gives ', rc, uname, upwd, _u_id, _g_id, _perms);
   if (rc < 0)
     {
       if ((rc = -12) or (rc = -13))
@@ -130,6 +180,17 @@ create procedure WS.WS.PROPFIND (in path varchar, inout params varchar, in lines
 
 
   http_request_status ('HTTP/1.1 207 Multi-Status');
+	declare full_path varchar;
+	declare path_id any;
+	full_path := '/' || DAV_CONCAT_PATH (path, '/');
+	path_id := DAV_SEARCH_ID (full_path, 'C');
+	if (isarray(path_id) = 1)
+	{
+		if (path_id[0] = UNAME'CalDAV')
+			http_header ('DAV: 1, calendar-access, calendar-schedule, calendar-proxy\r\nContent-type: application/xml; charset="utf-8"\r\n');
+		if (path_id[0] = UNAME'CardDAV')
+			http_header ('DAV: 1, addressbook\r\nContent-type: application/xml; charset="utf-8"\r\n');
+	}
   http_header ('Content-type: text/xml; charset="utf-8"\r\n');
   http ('<?xml version="1.0" encoding="utf-8"?>\n');
   http ('<D:multistatus xmlns:D="DAV:" xmlns:M="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">\n');
@@ -276,7 +337,7 @@ create procedure WS.WS.PROPFIND_RESPONSE_FORMAT (in lpath varchar,
   declare st char(1);
   declare diritm, prop_raw_val, prop_val, href any;
   declare perms, uid, gid any;
-  -- dbg_obj_princ ('WS.WS.PROPFIND_RESPONSE_FORMAT (', lpath, dirlist, append_name_to_href, ms_date, propnames, all_prop, add_not_found, u_id, ')');
+  --dbg_obj_princ ('WS.WS.PROPFIND_RESPONSE_FORMAT (', lpath, dirlist, append_name_to_href, ms_date, propnames, all_prop, add_not_found, _u_id, ')');
 
   if (ms_date)
     {
@@ -323,11 +384,10 @@ next_response:
     crt := now ();
   if (__tag (modt) <> 211)
     modt := now ();
-
   href := case append_name_to_href when 0 then lpath else DAV_CONCAT_PATH (lpath, name) end;
-  if (st = 'C' and href not like '%/')
+  if (st = 'C' and href not like '%/' and href not like '%.ics' and href not like '%.vcf')
     href := href || '/';
-  http ('<D:response xmlns:lp0="DAV:" xmlns:i0="DAV:" xmlns:V="http://www.openlinksw.com/virtuoso/webdav/1.0/">\n');
+  http ('<D:response xmlns:D="DAV:" xmlns:lp0="DAV:" xmlns:i0="DAV:" xmlns:V="http://www.openlinksw.com/virtuoso/webdav/1.0/">\n');
   http ('<D:href>');
   http_dav_url (
     charset_recode (
@@ -364,7 +424,7 @@ next_response:
 	}
       else if (prop = ':getcontenttype')
 	{
-	  http (concat('<D:getcontenttype>', mime_type, '</D:getcontenttype>\n'));
+          http (concat('<lp0:getcontenttype>', mime_type, '</lp0:getcontenttype>\n'));
           found_sprop := 1;
 	}
       else if (prop = ':getcontentlength' and st = 'R')
@@ -372,10 +432,131 @@ next_response:
 	  http (concat ('<lp0:getcontentlength>', cast (res_len as varchar), '</lp0:getcontentlength>\n'));
           found_sprop := 1;
 	}
+      else if (prop = 'urn:ietf:params:xml:ns:caldav:supported-calendar-component-set')
+	{
+	   http ('<C:supported-calendar-component-set xmlns:C="urn:ietf:params:xml:ns:caldav"><C:comp name="VEVENT"/><C:comp name="VTODO"/></C:supported-calendar-component-set>\r\n');
+          found_sprop := 1;
+	}
+	else if (prop = 'urn:ietf:params:xml:ns:carddav:supported-address-data')
+	{
+	   http ('<A:supported-address-data xmlns:A="urn:ietf:params:xml:ns:carddav"><C:address-data-type content-type="text/vcard" version="3.0"/></A:supported-address-data>\r\n');
+          found_sprop := 1;
+	}
+      else if (prop = ':getetag' and st = 'C')
+	{
+	  http (concat('<lp0:getetag>"', WS.WS.ETAG (name, parent_col), '"</lp0:getetag>\n'));
+          found_sprop := 1;
+	}
+	else if (prop = 'http://calendarserver.org/ns/:getctag')
+	{
+	  http (concat('<CS:getctag xmlns:CS="http://calendarserver.org/ns/">', WS.WS.ETAG (name, parent_col), '</CS:getctag>\n'));
+          found_sprop := 1;
+	}
+      else if (prop = 'urn:ietf:params:xml:ns:caldav:calendar-data')
+	{
+          declare content, type_ any;
+	   DB.DBA.DAV_RES_CONTENT_INT (DAV_SEARCH_ID (lpath, 'R'), content, type_, 0, 0);
+	  http (concat('<C:calendar-data xmlns:C="urn:ietf:params:xml:ns:caldav">', content, '</C:calendar-data>\n'));
+          found_sprop := 1;
+	}
+	else if (prop = 'urn:ietf:params:xml:ns:carddav:address-data')
+	{
+          declare content, type_ any;
+	   DB.DBA.DAV_RES_CONTENT_INT (DAV_SEARCH_ID (lpath, 'R'), content, type_, 0, 0);
+	  http (concat('<A:address-data xmlns:A="urn:ietf:params:xml:ns:carddav">', content, '</A:address-data>\n'));
+          found_sprop := 1;
+	}
+	else if (prop = 'urn:ietf:params:xml:ns:caldav:calendar-home-set')
+	{
+		http (concat('<C:calendar-home-set xmlns:C="urn:ietf:params:xml:ns:caldav"><D:href>', lpath, '</D:href></C:calendar-home-set>\n'));
+          found_sprop := 1;
+	}
+	else if (prop = 'urn:ietf:params:xml:ns:carddav:addressbook-home-set')
+	{
+		http (concat('<C:addressbook-home-set xmlns:C="urn:ietf:params:xml:ns:carddav"><D:href>', lpath, '</D:href></C:addressbook-home-set>\n'));
+          found_sprop := 1;
+	}
+	else if (prop = ':principal-URL')
+	{
+		http (concat('<D:principal-URL><D:href>', lpath, '</D:href></D:principal-URL>\n'));
+        found_sprop := 1;
+	}
+	else if (prop = ':current-user-privilege-set')
+	{
+		if (mime_type = 'text/vcard' or mime_type = 'text/calendar')
+		{
+			http ('<D:current-user-privilege-set><D:privilege><D:all/></D:privilege></D:current-user-privilege-set>');
+			found_sprop := 1;
+		}
+	}
+    else if (prop = ':supported-report-set')
+	{
+		if (mime_type = 'text/vcard')
+		{
+			http (concat('<D:supported-report-set>', '<D:supported-report>
+                        <D:report>
+                            <C:addressbook-query xmlns:C="urn:ietf:params:xml:ns:carddav"/>
+                        </D:report>
+                    </D:supported-report>
+                    <D:supported-report>
+                        <D:report>
+                            <C:addressbook-multiget xmlns:C="urn:ietf:params:xml:ns:carddav"/>
+                        </D:report>
+                    </D:supported-report>
+                    <D:supported-report>
+                        <D:report>
+                            <D:expand-property />
+                        </D:report>
+                    </D:supported-report>
+					<D:supported-report>
+                        <D:report>
+                            <D:principal-property-search />
+                        </D:report>
+                    </D:supported-report>
+					<D:supported-report>
+                        <D:report>
+                            <D:principal-search-property-set />
+                        </D:report>
+                    </D:supported-report>', '</D:supported-report-set>\n'));
+					 found_sprop := 1;
+		}
+		else if (mime_type = 'text/calendar')
+		{
+			http (concat('<D:supported-report-set>', '<D:supported-report>
+				<D:report>
+					<C:calendar-multiget xmlns:C="urn:ietf:params:xml:ns:caldav"/>
+				</D:report>
+			</D:supported-report>
+			<D:supported-report>
+				<D:report>
+					<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav"/>
+				</D:report>
+			</D:supported-report>
+			<D:supported-report>
+				<D:report>
+					<D:principal-match/>
+				</D:report>
+			</D:supported-report>
+			<D:supported-report>
+				<D:report>
+					<C:free-busy-query xmlns:C="urn:ietf:params:xml:ns:caldav"/>
+				</D:report>
+                    </D:supported-report>', '</D:supported-report-set>\n'));
+					 found_sprop := 1;
+		}
+        found_sprop := 1;
+	}
       else if (prop = ':resourcetype')
 	{
 	  if (st = 'C')
+          {
+	    if (mime_type = 'text/vcard')
+	      http ('<D:resourcetype><D:collection/><C:addressbook xmlns:C="urn:ietf:params:xml:ns:carddav" /></D:resourcetype>\n');
+		 else if (mime_type = 'text/calendar')
+	      http ('<D:resourcetype><D:collection/><C:calendar xmlns:C="urn:ietf:params:xml:ns:caldav" /></D:resourcetype>\n');
+            else
 	    http ('<D:resourcetype><D:collection/></D:resourcetype>\n');
+          }
 	  else
 	    http ('<D:resourcetype/>\n');
           found_sprop := 1;
@@ -614,6 +795,308 @@ create procedure WS.WS.PROPNAMES (in _body varchar)
 }
 ;
 
+create procedure WS.WS.CALENDAR_NAMES (in _body varchar)
+{
+	declare prop, propname, allprop, tree, tmp, ret any;
+	declare ix, len, sc integer;
+	declare name varchar;
+	if (not isstring(_body) or _body = '')
+		return null;
+	prop := string_output ();
+	propname := string_output ();
+	allprop := string_output ();
+	tree := xml_tree_doc (xml_expand_refs (xml_tree (_body)));
+	http_value (xpath_eval ('//calendar-multiget/prop', tree , 1), null, prop);
+	http_value (xpath_eval ('//calendar-multiget/propname', tree , 1), null, propname);
+	http_value (xpath_eval ('//calendar-multiget/allprop', tree , 1), null, allprop);
+	prop := string_output_string (prop);
+	propname := string_output_string (propname);
+	allprop := string_output_string (allprop);
+	ret := null;
+	if (allprop <> '')
+		return vector ('allprop');
+	else if (propname <> '')
+		return vector ('propname');
+	else if (prop <> '')
+	{
+		declare xp any;
+		tree := xtree_doc (prop);
+		xp := xpath_eval('/prop/*', tree, 0);
+		foreach (any elm in xp) do
+		{
+			name := cast (xpath_eval ('name()', elm) as varchar);
+			sc := strrchr (name, ':');
+			if (sc is not null and (name like 'DAV::%'
+				or name like 'http://www.openlinksw.com/virtuoso/webdav/1.0/:%'))
+				name := subseq (name, sc, length (name));
+			if (ret is null)
+				ret := vector (name);
+			else
+				ret := vector_concat (ret, vector (name));
+		}
+	}
+	return ret;
+}
+;
+
+create procedure WS.WS.ADDRESSBOOK_NAMES (in _body varchar)
+{
+	declare prop, propname, allprop, tree, tmp, ret any;
+	declare ix, len, sc integer;
+	declare name varchar;
+	if (not isstring(_body) or _body = '')
+		return null;
+	prop := string_output ();
+	propname := string_output ();
+	allprop := string_output ();
+	tree := xml_tree_doc (xml_expand_refs (xml_tree (_body)));
+	http_value (xpath_eval ('//addressbook-multiget/prop', tree , 1), null, prop);
+	http_value (xpath_eval ('//addressbook-multiget/propname', tree , 1), null, propname);
+	http_value (xpath_eval ('//addressbook-multiget/allprop', tree , 1), null, allprop);
+	prop := string_output_string (prop);
+	propname := string_output_string (propname);
+	allprop := string_output_string (allprop);
+	ret := null;
+	if (allprop <> '')
+		return vector ('allprop');
+	else if (propname <> '')
+		return vector ('propname');
+	else if (prop <> '')
+	{
+		declare xp any;
+		tree := xtree_doc (prop);
+		xp := xpath_eval('/prop/*', tree, 0);
+		foreach (any elm in xp) do
+		{
+			name := cast (xpath_eval ('name()', elm) as varchar);
+			sc := strrchr (name, ':');
+			if (sc is not null and (name like 'DAV::%'
+				or name like 'http://www.openlinksw.com/virtuoso/webdav/1.0/:%'))
+				name := subseq (name, sc, length (name));
+			if (ret is null)
+				ret := vector (name);
+			else
+				ret := vector_concat (ret, vector (name));
+		}
+	}
+	return ret;
+}
+;
+
+
+create procedure WS.WS.REPORT (in path varchar, inout params varchar, in lines varchar)
+{
+	declare _mod_time datetime;
+	declare _cr_time datetime;
+	declare _depth integer;
+	declare st, _temp varchar;
+	declare _ms_date integer;
+	declare _lpath, _body, _ses, _props, _ppath, _perms varchar;
+	declare uname, upwd varchar;
+	declare id any;
+	declare _u_id, _g_id, rc, is_calendar, is_addressbook integer;
+	_ses := aref_set_0 (params, 1);
+	_body := string_output_string (_ses);
+	_lpath := http_path ();
+	_ppath := http_physical_path ();
+	is_calendar := 0;
+	is_addressbook := 0;
+	if (_lpath = '')
+		_lpath := '/';
+	id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(''), path, vector('')), 'C'));
+	if (id is not null)
+	{
+		if (isarray(id) = 1)
+		{
+			if (id[0] = UNAME'CalDAV')
+				is_calendar := 1;
+			if (id[0] = UNAME'CardDAV')
+				is_addressbook := 1;
+		}
+		st := 'C';
+	}
+	else
+	{
+		id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(''), path), 'R'));
+		if (id is not null)
+			st := 'R';
+		else
+		{
+			http_request_status ('HTTP/1.1 404 Not Found');
+			return;
+		}
+	}
+	_u_id := null;
+	_g_id := null;
+	if (st = 'C')
+		rc := DAV_AUTHENTICATE_HTTP (id, st, '1__', 1, lines, uname, upwd, _u_id, _g_id, _perms);
+	else
+		rc := DAV_AUTHENTICATE_HTTP (DAV_GET_PARENT (id, st, _ppath), 'C', '1__', 1, lines, uname, upwd, _u_id, _g_id, _perms);
+	if (rc < 0)
+	{
+		if ((rc = -12) or (rc = -13))
+		{
+			http_request_status ('HTTP/1.1 403 Forbidden');
+			return;
+		}
+		return;
+	}
+	if (strstr (WS.WS.FINDPARAM (lines, 'User-Agent:'), 'Microsoft') is not null)
+		_ms_date := 1;
+	else
+		_ms_date := 0;
+	_temp := WS.WS.FINDPARAM (lines, 'Depth:');
+	if (_temp <> '' and _temp <> 'infinity')
+		_depth := atoi (_temp);
+	else
+		_depth := -1;
+	{
+		declare test_tree any;
+		declare exit handler for sqlstate '*'
+		{
+			http_request_status ('HTTP/1.1 400 Bad Request');
+			return;
+		};
+		if (length (_body) > 0)
+			test_tree := xml_tree (_body);
+	}
+	if (st = 'C' and aref (_lpath, length (_lpath) - 1) <> ascii ('/'))
+		_lpath := concat (_lpath, '/');
+	-- Any properties
+	if (is_calendar = 1)
+		_props := WS.WS.CALENDAR_NAMES (_body);
+	else if (is_addressbook = 1)
+		_props := WS.WS.ADDRESSBOOK_NAMES (_body);
+	else
+		_props := WS.WS.PROPNAMES (_body);
+	if (isarray (_props) and length (_props) = 1 and (aref (_props, 0) = 'propname'))
+	{
+		WS.WS.CUSTOM_PROP (_lpath, _props, _depth, st);
+		return;
+	}
+	http_request_status ('HTTP/1.1 207 Multi-Status');
+	if (is_calendar = 1)
+	{
+		declare urls any; 
+		urls := xpath_eval ('[xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav:"] //calendar-multiget/D:href/text()', xml_tree_doc (xml_expand_refs (xml_tree (_body))), 0);
+		http_header ('DAV: 1, calendar-access, calendar-schedule, calendar-proxy\r\nContent-type: application/xml; charset="utf-8"\r\n');
+		http ('<?xml version="1.0" encoding="utf-8"?>\n');
+		http ('<D:multistatus xmlns:D="DAV:" xmlns:M="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">\n');
+		foreach (any prop in urls) do
+		{
+			if (-13 = WS.WS.REPORT_RESPONSE (cast(prop as varchar), _ppath, _depth, st, _ms_date, _props, _u_id))
+			{
+				_u_id := null;
+				_g_id := null;
+				-- This will force 'Unauthorized'
+				http_rewrite ();
+				WS.WS.GET_DAV_AUTH (lines, 0, 1, uname, upwd, _u_id, _g_id, _perms);
+				return;
+			}
+		}
+		http ('</D:multistatus>\n');
+	}
+	else if (is_addressbook = 1)
+	{
+		declare urls any; 
+		urls := xpath_eval ('[xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:carddav:"] //addressbook-multiget/D:href/text()', xml_tree_doc (xml_expand_refs (xml_tree (_body))), 0);
+		http_header ('DAV: 1, addressbook\r\nContent-type: application/xml; charset="utf-8"\r\n');
+		http ('<?xml version="1.0" encoding="utf-8"?>\n');
+		http ('<D:multistatus xmlns:D="DAV:" xmlns:M="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">\n');
+		foreach (any prop in urls) do
+		{
+			if (-13 = WS.WS.REPORT_RESPONSE (cast(prop as varchar), _ppath, _depth, st, _ms_date, _props, _u_id))
+			{
+				_u_id := null;
+				_g_id := null;
+				-- This will force 'Unauthorized'
+				http_rewrite ();
+				WS.WS.GET_DAV_AUTH (lines, 0, 1, uname, upwd, _u_id, _g_id, _perms);
+				return;
+			}
+		}
+		http ('</D:multistatus>\n');
+	}
+	else
+	{
+		http_header ('Content-type: text/xml; charset="utf-8"\r\n');
+		http ('<?xml version="1.0" encoding="utf-8"?>\n');
+		http ('<D:multistatus xmlns:D="DAV:" xmlns:M="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">\n');
+		if (-13 = WS.WS.PROPFIND_RESPONSE (_lpath, _ppath, _depth, st, _ms_date, _props, _u_id))
+		{
+			_u_id := null;
+			_g_id := null;
+			-- This will force 'Unauthorized'
+			http_rewrite ();
+			WS.WS.GET_DAV_AUTH (lines, 0, 1, uname, upwd, _u_id, _g_id, _perms);
+			return;
+		}
+		http ('</D:multistatus>\n');
+	}
+}
+;
+
+--#IF VER=5
+--!AFTER
+--#ENDIF
+create function WS.WS.REPORT_RESPONSE (
+	in lpath varchar,
+    in ppath varchar,
+	in depth integer,
+	in st char (1),
+	in ms_date integer,
+	in propnames any,
+	in u_id integer) returns integer
+{
+	declare all_prop, ppath_len integer;
+	declare dirlist any;
+	declare add_not_found, _this_col integer;
+	all_prop := 0;
+	add_not_found := 1;
+	if (not isstring (lpath) or not isstring (ppath))
+		return -28;
+	if (st = 'C' and aref (ppath, length (ppath) - 1) <> ascii ('/'))
+		ppath := concat (ppath, '/');
+	ppath_len := length (ppath);
+	if (not isarray (propnames))
+	{
+		if (ms_date)
+		{
+			propnames := vector (':getlastmodified', ':creationdate',
+				':lastaccessed', ':getcontentlength', ':resourcetype', ':supportedlock');
+			add_not_found := 0;
+		}
+		else
+			propnames := vector (':getlastmodified', ':getcontentlength', ':resourcetype');
+	}
+	else if (aref (propnames, 0) = 'allprop')
+	{
+		propnames := vector (':getlastmodified', ':creationdate', ':getetag', ':getcontenttype',
+			':getcontentlength', ':resourcetype', ':lockdiscovery', ':supportedlock');
+		all_prop := 1;
+	}
+	dirlist := DAV_DIR_LIST_INT (ppath, -1, '%', null, null, u_id);
+	if (isinteger (dirlist))
+	{
+		if (dirlist = -13)
+		{
+			if (u_id > 0)
+				dirlist := vector ();
+			else
+				return dirlist;
+		}
+		else
+			dirlist := vector (); -- TODO: This is a stub. It should be turned into something better.
+	}
+	if (length (dirlist) = 0)
+	{
+		return -1;
+	}
+	WS.WS.PROPFIND_RESPONSE_FORMAT (lpath, dirlist, 0, ms_date, propnames, all_prop, add_not_found, 0, u_id);
+	return 0;
+}
+;
+
 create procedure WS.WS.CUSTOM_PROP (in lpath any, in prop any, in depth integer, in st char (1))
 {
   declare _name, _lmask, _prop, _ltype, _lscope, _lown, _ltoken, _tp, _pname varchar;
@@ -689,15 +1172,25 @@ nf:
 -- /* PROPPATCH method */
 create procedure WS.WS.PROPPATCH (in path varchar, inout params varchar, in lines varchar)
 {
-  declare _u_id, _g_id, _slen, _len, _ix, id, _pid, _ix1 integer;
+  declare _u_id, _g_id, _slen, _len, _ix, id, _pid, _ix1, is_calendar, is_addressbook integer;
   declare uname, upwd, st, _perms, _body, _name varchar;
   declare _ses, _set, _del, _tmp, _val any;
   declare rc, acc, _proprc, xtree any;
-
   -- dbg_obj_princ ('WS.WS.PROPPATCH (', path, params, lines, ')');
+  is_addressbook := 0;
+  is_calendar := 0;
   id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(''), path, vector('')), 'C'));
   if (id is not null)
+	{
+		if (isarray(id) = 1)
+		{
+			if (id[0] = UNAME'CalDAV')
+				is_calendar := 1;
+			if (id[0] = UNAME'CardDAV')
+				is_addressbook := 1;
+		}
     st := 'C';
+	}
   else
     {
       id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(''), path), 'R'));
@@ -770,8 +1263,12 @@ create procedure WS.WS.PROPPATCH (in path varchar, inout params varchar, in line
              pn := concat (pns, ':', pn);
 
            xte_nodebld_acc (acc, xte_node (xte_head (pn)));
-
-	   if (pns = 'http://www.openlinksw.com/virtuoso/webdav/1.0/'
+		if (is_calendar or is_addressbook)
+		{
+			--- do nothing for now;
+			;
+		}
+	   else if (pns = 'http://www.openlinksw.com/virtuoso/webdav/1.0/'
 	       and _prop_name in ('virtpermissions', 'virtowneruid', 'virtownergid'))
 	     {
 	       declare tmp, tmp_id any;
@@ -810,8 +1307,7 @@ create procedure WS.WS.PROPPATCH (in path varchar, inout params varchar, in line
 		     update WS.WS.SYS_DAV_COL set COL_GROUP = tmp_id where COL_ID = id;
 		 }
 	     }
-	   else if (not exists (select 1 from WS.WS.SYS_DAV_PROP
-		where PROP_NAME = pn and PROP_TYPE = st and PROP_PARENT_ID = id))
+	   else if (not exists (select 1 from WS.WS.SYS_DAV_PROP where PROP_NAME = pn and PROP_TYPE = st and PROP_PARENT_ID = id))
 	    {
               _pid := WS.WS.GETID ('P');
               insert into WS.WS.SYS_DAV_PROP (PROP_ID, PROP_NAME, PROP_TYPE, PROP_PARENT_ID, PROP_VALUE)
@@ -1292,7 +1788,7 @@ create procedure WS.WS.PUT (in path varchar, inout params varchar, in lines varc
 
   if (content_type = 'application/sparql-query')
     {
-      WS.WS.SPARQL_QUERY_POST (full_path, ses);
+      WS.WS.SPARQL_QUERY_POST (full_path, ses, uname);
       is_sparql := 1;
     }
 
@@ -1521,7 +2017,7 @@ create procedure WS.WS.GET_DAV_CHUNKED_QUOTA () returns integer
 
   dav_chunked_quota := atoi (
    coalesce (
-    cfg_item_value (virtuoso_ini_path(), 'HTTPServer', 'DAVChunkedQuota'),
+    virtuoso_ini_item_value ('HTTPServer', 'DAVChunkedQuota'),
     '1000000'));
   if (dav_chunked_quota < 1)
     dav_chunked_quota := 1000000;
@@ -1544,13 +2040,13 @@ create procedure WS.WS.GET (in path any, inout params any, in lines any)
   declare full_path varchar;
   declare parent_path varchar;
   declare cont_type varchar;
-  declare server_etag, client_etag varchar;
+  declare server_etag, client_etag, rdf_graph varchar;
   declare uid, maxres integer;
   declare p_comm, stat, msg, xpr, sxtag, rxtag, resource_content, str varchar;
   declare resource_owner, exec_safety_level integer;
   declare _res_id , _col_id, is_admin_owned_res integer;
   declare def_page varchar;
-  declare asmx_path any;
+  declare asmx_path, auth_opts, webid_check, webid_check_rc any;
   -- dbg_obj_princ ('WS.WS.GET (', path, params, lines, ')');
   --set isolation='committed';
   if (WS.WS.DAV_CHECK_ASMX (path, asmx_path))
@@ -1658,6 +2154,8 @@ again:
 	}
       if (_col_id is null and (rc >= 0))
 	{
+	  if (uid = http_nobody_uid () and gid = http_nogroup_gid ()) 
+	    uid := null;
 	  rc := DAV_AUTHENTICATE_HTTP (tgt_id, tgt_type, '1_1', 0, lines, uname, upwd, uid, gid, perms);
 	  if (rc >= 0)
 	    exec_safety_level := 1;
@@ -1666,6 +2164,34 @@ again:
 
   http_rewrite (0);
 
+  -- execute + webid 
+  auth_opts := http_map_get ('auth_opts');
+  if (isvector (auth_opts) and mod (length (auth_opts), 2) = 0)
+    webid_check := atoi (get_keyword ('webid_check', auth_opts, '0'));
+  else
+    webid_check := 0;
+  webid_check_rc := 1;  
+  if (is_https_ctx () and webid_check and http_map_get ('executable'))
+    {
+      declare gid, perms, _check_id, _check_type any;
+      uid := null;
+      if (isinteger (_res_id)) 
+	{ 
+	  _check_id := _res_id; 
+	  _check_type := 'R';
+	} 
+      else 
+	{ 
+	  _check_id := _col_id; 
+	  _check_type := 'C';
+       	} 
+      webid_check_rc := DAV_AUTHENTICATE_HTTP (_check_id, _check_type, '1__', 1, lines, uname, upwd, uid, gid, perms);
+      if ((webid_check_rc < 0) and (webid_check_rc <> -1))
+	return 0;
+    }  
+
+  http_rewrite (0);
+
   if (_col_id is not null and http_path () not like '%/')
     {
       http_request_status ('HTTP/1.1 301 Moved Permanently');
@@ -1753,7 +2279,7 @@ again:
   --  }
 
   -- special extensions can be executed if special flag is set
-   if (http_map_get ('executable') or (exec_safety_level and is_admin_owned_res))
+   if ((http_map_get ('executable') and webid_check_rc >= 0) or (exec_safety_level and is_admin_owned_res))
      exec_safety_level := 2;
   -- dbg_obj_princ ('exec_safety_level is ', exec_safety_level);
   -- when directory is executable set the owner for execution to the resource owner
@@ -1822,6 +2348,7 @@ again:
        if (stat <> '00000')
 	 {
 	   exec_err:
+	   http_status_set (500);
 	   http ('<html><body>');
 	   http (concat ('<H3>Execution of "', sprintf ('%V', http_path()), '" failed.</H3>'));
 	   http (concat ('<p><b>SQL Error: ', stat, ' '));
@@ -1942,6 +2469,14 @@ again:
 			case when is_https_ctx () then 'https' else 'http' end,
 			http_request_header (lines, 'Host', NULL, NULL), http_path ());	
 		}
+	      rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where 
+		PROP_PARENT_ID = _col and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_graph');
+	      if (rdf_graph is not null)
+	        {
+		  declare rdf_uri varchar;
+		  rdf_uri := rfc1808_expand_uri (DB.DBA.HTTP_REQUESTED_URL (), DAV_RDF_RES_NAME (rdf_graph));
+		  hdr_str := hdr_str || sprintf ('Link: <%s>; rel="alternate"\r\n', rdf_uri);
+                }		  
 	      http_header (hdr_str);
 	    }
 	  else
@@ -2177,13 +2712,13 @@ create procedure WS.WS.POST (in path varchar, inout params varchar, in lines var
 }
 ;
 
-create procedure WS.WS.SPARQL_QUERY_POST (in path varchar, inout ses varchar)
+create procedure WS.WS.SPARQL_QUERY_POST (in path varchar, inout ses varchar, in uname varchar)
 {
   declare def_gr, full_qr, qr, cname any;
   declare stat, msg, meta, data any;
   ses := http_body_read ();
   qr := string_output_string (ses);
-  cname := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+  cname := virtuoso_ini_item_value ('URIQA', 'DefaultHost');
   if (cname is null)
     {
       declare tmp any;
@@ -2199,6 +2734,8 @@ create procedure WS.WS.SPARQL_QUERY_POST (in path varchar, inout ses varchar)
     full_qr := 'SPARQL ';
   full_qr := full_qr || qr;
   stat := '00000';
+  if (exists (select 1 from DB.DBA.SYS_USERS where U_NAME = uname and U_SQL_ENABLE = 1))
+    set_user_id (uname);
   exec (full_qr, stat, msg, vector (), 0, meta, data);
   if (stat <> '00000')
     signal (stat, msg);
@@ -3586,8 +4123,11 @@ create procedure WS.WS.EXPAND_INCLUDES (in path varchar, inout stream varchar, i
 	  select blob_to_string (RES_CONTENT), RES_OWNER, RES_GROUP, RES_PERMS, RES_MOD_TIME
 	      into curr_file, _u_id, _grp, _perms, modt from WS.WS.SYS_DAV_RES
 	      where RES_NAME = name and RES_COL = col;
+	  if (not http_map_get ('executable'))
+	    {
 	  if (_u_id <> http_dav_uid () or _perms like '____1%' or _perms like '_______1%')
 	    signal ('37000', 'Includes can be owned only by admin & cannot be writable for others', 'DA001');
+	    }
 	  if (st is not null and isarray (st))
 	    st := vector_concat (st, vector (path, datestring(modt)));
 	}
@@ -4355,7 +4895,7 @@ create function WS.WS.DAV_DIR_LIST (in full_path varchar, in logical_root_path v
 --WS.WS.DAV_CHECK_QUOTA ()
 --{
 --  declare tot, quota, _uid, globalf int;
---  globalf := cfg_item_value (virtuoso_ini_path(), 'HTTPServer', 'DAVQuotaEnabled');
+--  globalf := virtuoso_ini_item_value ('HTTPServer', 'DAVQuotaEnabled');
 --  if (globalf is null or 0 = atoi (globalf))
 --    return 1;
 --  quota := connection_get ('DAVQuota');
diff --git a/binsrc/dav/dav_acct.sql b/binsrc/dav/dav_acct.sql
index 2ea1af2..b5af5de 100644
--- a/binsrc/dav/dav_acct.sql
+++ b/binsrc/dav/dav_acct.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_acct.sql,v 1.1.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: dav_acct.sql,v 1.1.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/dav_api.sql b/binsrc/dav/dav_api.sql
index d4f7ec8..12213d8 100644
--- a/binsrc/dav/dav_api.sql
+++ b/binsrc/dav/dav_api.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_api.sql,v 1.17.2.23 2010/12/10 15:18:16 source Exp $
+--  $Id: dav_api.sql,v 1.17.2.39 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -332,13 +332,13 @@ DAV_HOME_DIR_CREATE (in uid varchar) returns any
     if (isnull (DAV_HIDE_ERROR (rc)))
       goto _end;
 
-    host := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+    host := virtuoso_ini_item_value ('URIQA', 'DefaultHost');
     if (host is null) {
       host := sys_stat ('st_host_name');
       if (server_http_port () <> '80')
         host := host ||':'|| server_http_port ();
     }
-    rc := DAV_PROP_SET_INT (path, 'virt:rdf_graph', 'http://' || host || path, null, null, 0, 0);
+    rc := DAV_PROP_SET_INT (path, 'virt:rdf_graph', rtrim ('http://' || host || path, '/') || '#this', null, null, 0, 0);
     if (isnull (DAV_HIDE_ERROR (rc)))
       goto _end;
     rc := DAV_PROP_SET_INT (path, 'virt:rdf_sponger', 'on', null, null, 0, 0);
@@ -1525,7 +1525,7 @@ DAV_REQ_CHARS_TO_BITMASK (in req varchar) returns integer
 create function
 DAV_AUTHENTICATE (in id any, in what char(1), in req varchar, in a_uname varchar, in a_pwd varchar, in a_uid integer := null) returns integer
 {
-  declare oid, ogid, puid, pgid integer;
+  declare rc, oid, ogid, puid, pgid integer;
   declare opwd, pperms varchar;
   declare pacl varbinary;
   what := upper (what);
@@ -1566,18 +1566,11 @@ DAV_AUTHENTICATE (in id any, in what char(1), in req varchar, in a_uname varchar
   }
   if (isarray (id))
   {
-    declare detcol_id integer;
+    rc := call (cast (id[0] as varchar) || '_DAV_AUTHENTICATE') (id, what, req, a_uname, a_pwd, a_uid);
+    if (rc = -20)
+      rc := DAV_AUTHENTICATE (id[1], 'C', req, a_uname, a_pwd, a_uid);
 
-    detcol_id := id[1];
-    select COL_OWNER, COL_GROUP, COL_PERMS, COL_ACL into puid, pgid, pperms, pacl from WS.WS.SYS_DAV_COL where COL_ID = detcol_id;
-    if (not DAV_CHECK_PERM (pperms, req, oid, ogid, pgid, puid))
-    {
-      if (not WS.WS.ACL_IS_GRANTED (pacl, oid, 4))
-      {
-        return -13;
-      }
-    }
-    return call (cast (id[0] as varchar) || '_DAV_AUTHENTICATE') (id, what, req, a_uname, a_pwd, a_uid);
+    return rc;
   }
   whenever not found goto nf_col_or_res;
   if (what = 'R')
@@ -1647,8 +1640,8 @@ DAV_AUTHENTICATE_HTTP (in id any, in what char(1), in req varchar, in can_write_
     declare d__perms varchar;
 
     rc := call (cast (id[0] as varchar) || '_DAV_AUTHENTICATE_HTTP') (id, what, req, can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, _perms);
-    if (rc >= 0)
-      rc := DAV_AUTHENTICATE_HTTP (id[1], 'C', '1__', can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, d__perms);
+    if (rc = -20)
+      rc := DAV_AUTHENTICATE_HTTP (id[1], 'C', req, can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, _perms);
 
     return rc;
   }
@@ -1772,91 +1765,43 @@ DAV_AUTHENTICATE_SSL_CONDITION () returns integer
 }
 ;
 
+-- redundant code muste be deleted after move the procedure WEBID_AUTH_GEN_2 in DAV!!!
+-- START REDUNDANT CODE
+create function DAV_WEBID_QR (in gr varchar, in uri varchar)
+{
+    return sprintf ('sparql 
+    define input:storage ""  
+    define input:same-as "yes"
+    prefix cert: <http://www.w3.org/ns/auth/cert#>  
+    prefix rsa: <http://www.w3.org/ns/auth/rsa#>  
+    select (str (?exp)) (str (?mod))  
+    from <%S>  
+    where 
+    {  	  
+      { ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod .  } 	  
+      union 
+      { ?id cert:identity <%S> ; rsa:public_exponent ?exp1 ; rsa:modulus ?mod1 . ?exp1 cert:decimal ?exp . ?mod1 cert:hex ?mod . }  	  
+      union 
+      { <%S> cert:key ?key . ?key cert:exponent ?exp . ?key cert:modulus ?mod .  }        
+    }', gr, uri, uri, uri);
+}
+;
+-- END REDUNDANT CODE
+
 create function
 DAV_AUTHENTICATE_SSL_WEBID ()
 {
-  declare retIRI varchar;
-  declare graph, baseGraph, foafIRI, foafGraph, loadIRI, localIRI any;
-  declare S, V, info, st, msg, data, meta any;
+  declare webid varchar;
+  declare cert, dummy, vtype any;
 
-  retIRI := null;
-
-  set_user_id ('dba');
-  foafIRI := trim (get_certificate_info (7, null, null, null, '2.5.29.17'));
-  V := regexp_replace (foafIRI, ',[ ]*', ',', 1, null);
-  V := split_and_decode (V, 0, '\0\0,:');
-  if (V is null)
-    V := vector ();
-  foafIRI := get_keyword ('URI', V);
-  if (isnull (foafIRI))
-    {
-      if (__proc_exists ('DB.DBA.FOAF_SSL_WEBFINGER') is not null)
-	{
-	    retIRI := DB.DBA.FOAF_SSL_WEBFINGER ();
-	    if (not isnull (retIRI))
-	      goto _exit;
-	}
-      if (__proc_exists ('ODS.DBA.FINGERPOINT_WEBID_GET') is not null)
-	{
-	    retIRI := ODS.DBA.FINGERPOINT_WEBID_GET ();
-	    if (not isnull (retIRI))
-	goto _exit;
-    }
-  } else {
-    foafGraph := 'http://local.virt/FOAF/' || cast (rnd (1000) as varchar);
-  localIRI := foafIRI;
-  V := rfc1808_parse_uri (localIRI);
-  if (is_https_ctx () and
-      cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DynamicLocal') = '1' and
-      V[1] = registry_get ('URIQADefaultHost'))
-  {
-    V [0] := 'local';
-    V [1] := '';
-    localIRI := db.dba.vspx_uri_compose (V);
-  }
-  V := rfc1808_parse_uri (foafIRI);
-  V[5] := '';
-  loadIRI := DB.DBA.vspx_uri_compose (V);
-  S := sprintf ('sparql load <%s> into graph <%s>', loadIRI, foafGraph);
-  st := '00000';
-  exec (S, st, msg, vector (), 0);
-    if (st = '00000')
-    {
-  S := sprintf (' sparql define input:storage "" ' ||
-                ' prefix cert: <http://www.w3.org/ns/auth/cert#> ' ||
-                ' prefix rsa: <http://www.w3.org/ns/auth/rsa#> ' ||
-                ' select (str (bif:coalesce (?exp_val, ?exp))) ' ||
-                '        (str (bif:coalesce (?mod_val, ?mod))) ' ||
-                '   from <%s> ' ||
-                '  where { ' ||
-                '          ?id cert:identity <%s> ; ' ||
-                '              rsa:public_exponent ?exp ; ' ||
-                '              rsa:modulus ?mod . ' ||
-                '          optional { ?exp cert:decimal ?exp_val . ' ||
-                '          ?mod cert:hex ?mod_val . } ' ||
-                '        }',
-                foafGraph,
-                localIRI);
-  exec (S, st, msg, vector (), 0, meta, data);
-      if (st = '00000')
-      {
-        info := get_certificate_info (9);
-  foreach (any _row in data) do
-  {
-    if (_row[0] = cast (info[1] as varchar) and
-        lower (regexp_replace (_row[1], '[^A-Z0-9a-f]', '', 1, null)) = bin2hex (info[2]))
+  webid := null;
+  if (__proc_exists ('DB.DBA.WEBID_AUTH_GEN_2') is not null)
     {
-            retIRI := foafIRI;
-            goto _break;
+      cert := client_attr ('client_certificate');
+      dummy := null;
+      DB.DBA.WEBID_AUTH_GEN_2 (cert, 0, null, 1, 0, webid, dummy, 0, vtype);
           }
-        }
-      }
-    }
-  _break:;
-    exec (sprintf ('SPARQL clear graph <%s>', foafGraph), st, msg, vector (), 0);
-  }
-_exit:
-  return retIRI;
+  return webid;
 }
 ;
 
@@ -1884,10 +1829,7 @@ DAV_AUTHENTICATE_SSL (
     goto _exit;
 
   set_user_id ('dba');
-  foafIRI := DAV_AUTHENTICATE_SSL_WEBID ();
-  if (isnull (foafIRI))
-    goto _exit;
-
+  foafIRI := null;
   tmp := '/';
   V := vector ();
   T := split_and_decode (trim (path, '/'), 0, '\0\0/');
@@ -1905,9 +1847,15 @@ DAV_AUTHENTICATE_SSL (
       what := 'C';
       id := DAV_SEARCH_ID (V[N], what);
     }
-    if (exists (select 1 from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = id and PROP_TYPE = what and PROP_NAME = 'virt:aci_meta_n3'))
+    if (isinteger (id) and exists (select 1 from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = id and PROP_TYPE = what and PROP_NAME = 'virt:aci_meta_n3'))
     {
       tmp := null;
+      if (isnull (foafIRI))
+      {
+	      foafIRI := DB.DBA.DAV_AUTHENTICATE_SSL_WEBID ();
+      if (isnull (foafIRI))
+	goto _exit;
+  	  }
       graph := WS.WS.DAV_IRI (V[N]);
       for (
         sparql
@@ -1957,18 +1905,18 @@ DAV_AUTHENTICATE_SSL (
                }
          order by ?p3 ?p2 ?p1 ?mode) do
       {
-        if      (not isnull (p1))
+        if      (not isnull ("p1"))
           I := 0;
-        else if (not isnull (p2))
+        else if (not isnull ("p2"))
           I := 1;
-        else if (not isnull (p3))
+        else if (not isnull ("p3"))
           I := 2;
         else
           goto _skip;
 
-        if (tmp <> coalesce (p1, coalesce (p2, p3)))
+        if (tmp <> coalesce ("p1", coalesce ("p2", "p3")))
         {
-          tmp := coalesce (p1, coalesce (p2, p3));
+	    tmp := coalesce ("p1", coalesce ("p2", "p3"));
           for (M := 0; M < length (IRIs[I]); M := M + 1)
           {
             if (tmp = IRIs[I][M])
@@ -1976,11 +1924,11 @@ DAV_AUTHENTICATE_SSL (
           }
         }
 
-        if      (mode like '%#Read')
+        if ("mode" like '%#Read')
           realMode[0] := 1;
-        else if (mode like '%#Write')
+        else if ("mode" like '%#Write')
           realMode[1] := 1;
-        else if (mode like '%#Control')
+        else if ("mode" like '%#Execute')
           realMode[2] := 1;
 
         if ((reqMode[0] <= realMode[0]) and (reqMode[1] <= realMode[1]) and (reqMode[2] <= realMode[2]))
@@ -2195,6 +2143,11 @@ DAV_RES_UPLOAD_STRSES_INT (
 }
 ;
 
+-- the sink queue, see below
+create table RDF_SINK_QUEUE (RSQ_PATH varchar, RSQ_ID int, RSQ_C_ID int, RSQ_GRAPH varchar, RSQ_STATE int, RSQ_TS timestamp, RSQ_TYPE varchar, RSQ_UID int, RSQ_GID int, primary key (RSQ_ID))
+create index RDF_SINK_QUEUE_STAT on RDF_SINK_QUEUE (RSQ_STATE, RSQ_TS)    
+;
+
 create procedure
 DAV_RES_UPLOAD_STRSES_INT_INNER (
     in path varchar,
@@ -2468,42 +2421,119 @@ DAV_RES_UPLOAD_STRSES_INT_INNER (
     -- dbg_obj_princ ('fine, DAV_RES_UPLOAD_STRSES_INT returns ', rc, ' for ', path);
 
 
-  declare c_id integer;
- 	declare is_rdf integer;
-  declare rdf_graph, rdf_graph2, rdf_sponger any;
-  declare rdf_graph_resource_id, rdf_graph_resource_name, rdf_graph_resource_path, host any;
+  declare c_id, depth integer;
+  declare rdf_graph any;
+  declare _col_p_id, _inherit any;
 
   -- delete RDF data from separate (file) graph (if exists)
   RDF_SINK_DELETE (path);
 
-  -- flag for rdf upload
-  is_rdf := 0;
-
   -- get parent collection id
-  c_id := (select RES_COL from WS.WS.SYS_DAV_RES where RES_ID = rc);
-
+   c_id := (select RES_COL from WS.WS.SYS_DAV_RES where RES_ID = rc);
   -- is rdf_sink folder?
+  rdf_graph := null;   
+  depth := 0; 
+  {
+     whenever not found goto rdfg_found;
+look_again:  
+      select COL_PARENT, COL_INHERIT into _col_p_id, _inherit from WS.WS.SYS_DAV_COL where COL_ID = c_id;
   rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_graph');
+      if ((_inherit = 'R' or (depth = 1 and _inherit = 'M') or depth = 0) and length (rdf_graph))
+	goto rdfg_found;
+      c_id := _col_p_id;
+      depth := depth + 1;
+      rdf_graph := null;
+      goto look_again;
+  }
+  rdfg_found:; 
   if (not DB.DBA.is_empty_or_null (rdf_graph))
   {
+    declare aq any;
+    insert soft RDF_SINK_QUEUE (RSQ_PATH, RSQ_ID, RSQ_C_ID, RSQ_GRAPH, RSQ_STATE, RSQ_TYPE, RSQ_UID, RSQ_GID) values (path, rc, c_id, rdf_graph, 0, type, ouid, ogid);
+    set_user_id (user);
+    aq := async_queue (1);
+    aq_request (aq, 'DB.DBA.RDF_SINK_AQ_RUN', vector ());
+  }
+  return rc;
+
+unhappy_upload:
+  if (__SQL_STATE = 'HT507')
+    return -41;
+  if (__SQL_STATE = 'HT508')
+    return -42;
+  if (__SQL_STATE = 'HT509')
+    return -43;
+  return -29;
+}
+;
+
+create procedure RDF_SINK_AQ_GET ()
+{
+  declare arr any;
+  set isolation = 'serializable';
+  arr := (select vector_agg (vector (RSQ_PATH, RSQ_ID, RSQ_C_ID, RSQ_GRAPH, RSQ_TYPE, RSQ_UID, RSQ_GID)) from (select top 10 RSQ_PATH, RSQ_ID, RSQ_C_ID, RSQ_GRAPH, RSQ_TYPE, RSQ_UID, RSQ_GID 
+  	from RDF_SINK_QUEUE where RSQ_STATE = 0 order by RSQ_TS for update) x);
+  foreach (any x in arr) do
+    {
+      update RDF_SINK_QUEUE set RSQ_STATE = 1 where RSQ_ID = x[1];
+    }
+  commit work;
+  return arr;
+}
+;
+
+create procedure DB.DBA.RDF_SINK_AQ_RUN ()
+{
+  declare aq, arr any;
+  if (exists (select 1 from RDF_SINK_QUEUE where RSQ_STATE = 1))
+    return;
+  aq := async_queue (10);
+  for (;;)
+    {
+      arr := RDF_SINK_AQ_GET ();
+      if (not length (arr))
+	return;
+      foreach (any x in arr) do
+	{
+	  aq_request (aq, 'DB.DBA.RDF_SINK_FUNC', vector (x[0], x[1], x[2], x[3], x[4], x[5], x[6]));
+	}
+      aq_wait_all (aq);
+      delete from RDF_SINK_QUEUE where RSQ_STATE = 2;
+      commit work;
+    }
+}
+;
+
+create procedure DAV_RDF_RES_NAME (in rdf_graph varchar)
+{
+   return replace ( replace ( replace ( replace ( replace ( replace ( replace (rdf_graph, '/', '_'), '\\', '_'), ':', '_'), '+', '_'), '\"', '_'), '[', '_'), ']', '_') || '.RDF';
+}
+;
+
+create procedure RDF_SINK_FUNC (in path varchar, in rc int, in c_id int, in rdf_graph any, in type any, in ouid int, in ogid int)
+{
+  declare rdf_sponger, rdf_cartridges, rdf_metaCartridges any;
+  declare rdf_graph_resource_id, rdf_graph_resource_name, rdf_graph_resource_path, host, content any;
     declare exit handler for sqlstate '*'
     {
       goto _bad_content;
     };
 
-    rdf_graph2 := 'http://local.virt' || path;
     -- get sponger parameter?
     content := (select RES_CONTENT from WS.WS.SYS_DAV_RES where RES_ID = rc);
     rdf_sponger := coalesce((select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_sponger'), 'on');
+    rdf_cartridges := coalesce((select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_cartridges'), '');
+    rdf_metaCartridges := coalesce((select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_metaCartridges'), '');
     -- upload into first (rdf_sink) graph
-    if (RDF_SINK_UPLOAD (content, type, rdf_graph, rdf_graph2, rdf_sponger))
+    if (RDF_SINK_UPLOAD (path, content, type, rdf_graph, rdf_sponger, rdf_cartridges, rdf_metaCartridges))
     {
-      rdf_graph_resource_name := replace ( replace ( replace ( replace ( replace ( replace ( replace (rdf_graph, '/', '_'), '\\', '_'), ':', '_'), '+', '_'), '\"', '_'), '[', '_'), ']', '_') || '.RDF';
+      rdf_graph_resource_name := DAV_RDF_RES_NAME (rdf_graph);
+      rdf_graph_resource_name := replace (rdf_graph_resource_name, ' ', '_');
       rdf_graph_resource_path := WS.WS.COL_PATH (c_id) || rdf_graph_resource_name;
       if (isnull (DAV_HIDE_ERROR (DAV_SEARCH_ID (rdf_graph_resource_path, 'R'))))
       {
         -- RDF content
-        host := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+        host := virtuoso_ini_item_value ('URIQA', 'DefaultHost');
         if (host is null)
         {
           host := sys_stat ('st_host_name');
@@ -2513,36 +2543,90 @@ DAV_RES_UPLOAD_STRSES_INT_INNER (
         rdf_graph_resource_id := WS.WS.GETID ('R');
         insert into WS.WS.SYS_DAV_RES (RES_ID, RES_NAME, RES_COL, RES_OWNER, RES_GROUP, RES_PERMS, RES_CR_TIME, RES_MOD_TIME, RES_TYPE, RES_CONTENT)
           values (rdf_graph_resource_id, rdf_graph_resource_name, c_id, ouid, ogid, '111101101NN', now (), now (), 'text/xml', '');
-        DB.DBA.DAV_PROP_SET_INT (rdf_graph_resource_path, 'redirectref', sprintf ('http://%s/sparql?default-graph-uri=%U&query=%U&format=%U', host, rdf_graph, 'CONSTRUCT { ?s ?p ?o} WHERE {?s ?p ?o}', 'text/xml'), null, null, 0, 0, 1);
+	  DB.DBA.DAV_PROP_SET_INT (rdf_graph_resource_path, 'redirectref', sprintf ('http://%s/sparql?default-graph-uri=%U&query=%U&format=%U', host, rdf_graph, 
+		'CONSTRUCT { ?s ?p ?o} WHERE {?s ?p ?o}', 'text/xml'), null, null, 0, 0, 1);
       }
     }
   _bad_content:;
-  }
-  return rc;
-
-unhappy_upload:
-  if (__SQL_STATE = 'HT507')
-    return -41;
-  if (__SQL_STATE = 'HT508')
-    return -42;
-  if (__SQL_STATE = 'HT509')
-    return -43;
-  return -29;
+  update RDF_SINK_QUEUE set RSQ_STATE = 2 where RSQ_ID = rc;
+  commit work;
 }
 ;
 
 create procedure RDF_SINK_UPLOAD (
-  inout content any,
-  inout type varchar,
+    in path varchar,  
+    inout _content any,
+    in type varchar,
   in rdf_graph varchar,
-  in rdf_graph2 varchar,
-  in rdf_sponger varchar)
+  in rdf_sponger varchar,
+  in rdf_cartridges varchar,
+  in rdf_metaCartridges varchar)
 {
+  declare rdf_iri, rdf_graph2 varchar;
+  declare content any;
+
+  if (length (_content) = 0)
+    return 0; 
+
+  -- general case, should return false
+  declare exit handler for sqlstate '*' {
+     return 0;
+  };
+
+  if (path like '%.zip')
+    {
+      declare lst, tmp_file, zip_graph any;
+      tmp_file := tmp_file_name ();
+      declare exit handler for sqlstate '*' {
+	file_delete (tmp_file, 1);
+	return 0;
+      };
+      zip_graph := 'http://local.virt' || path;
+      string_to_file (tmp_file, _content, -2);
+      lst := unzip_list (tmp_file);
+      foreach (any x in lst) do
+	{
+	  declare fname, item_graph, ss any;
+	  ss := string_output ();
+	  fname := x[0];
+	  content := unzip_file (tmp_file, fname);
+	  http_dav_url (fname, null, ss);
+	  fname := string_output_string (ss);
+	  item_graph := 'http://local.virt' || path || '/' || fname;
+	  RDF_SINK_UPLOAD (concat (path, '/', fname), content, DAV_GUESS_MIME_TYPE_BY_NAME (fname), rdf_graph, rdf_sponger, rdf_cartridges, rdf_metaCartridges);
+	  SPARQL insert in graph ?:zip_graph { ?s ?p ?o } where { graph `iri(?:item_graph)` { ?s ?p ?o } };
+	  SPARQL clear graph ?:item_graph;
+	} 
+      file_delete (tmp_file, 1);
+      return 1;
+    }
+
+  content := _content; 
+  if (path like '%.gz' and length (_content) > 2)
+    {
+      declare magic, html_start varchar;
+      magic := subseq (_content, 0, 2);
+      html_start := null;
+      if (magic[0] = 0hex1f and magic[1] = 0hex8b) 
+	{
+	  content := gzip_uncompress (cast (_content as varchar));
+	  path := regexp_replace (path, '\.gz\x24', '');
+	  type := DAV_GUESS_MIME_TYPE (path, content, html_start);	
+	}
+    }
+  -- dbg_obj_print ('RDF_SINK_UPLOAD (', length (content), type, rdf_graph, rdf_graph2, rdf_sponger, rdf_cartridges, rdf_metaCartridges, ')');
+  rdf_iri := WS.WS.DAV_IRI (path);
+  rdf_graph2 := 'http://local.virt' || path;
   if (
        strstr (type, 'application/rdf+xml') is not null or
        strstr (type, 'application/foaf+xml') is not null
      )
   {
+    {
+      declare exit handler for sqlstate '*'
+      {
+        goto _grddl;
+      };
     if (rdf_sponger = 'on')
     {
       declare xt any;
@@ -2552,9 +2636,11 @@ create procedure RDF_SINK_UPLOAD (
         goto _grddl;
     }
     DB.DBA.RDF_LOAD_RDFXML (blob_to_string (content), rdf_graph2, rdf_graph2);
+    }
     goto _exit;
   }
   if (
+       strstr (type, 'text/n3') is not null or
        strstr (type, 'text/rdf+n3') is not null or
        strstr (type, 'text/rdf+ttl') is not null or
        strstr (type, 'application/rdf+n3') is not null or
@@ -2563,50 +2649,34 @@ create procedure RDF_SINK_UPLOAD (
        strstr (type, 'application/x-turtle') is not null
      )
   {
-    DB.DBA.TTLP (content, rdf_graph2, rdf_graph2);
+    {
+      declare exit handler for sqlstate '*'
+      {
+        goto _grddl;
+      };
+      DB.DBA.TTLP (blob_to_string (content), rdf_graph2, rdf_graph2);
+    }
     goto _exit;
   }
 
 _grddl:;
   if (rdf_sponger = 'on')
   {
-    declare aq, ps, xrc any;
+    declare rc, rcMeta integer;
     declare ret_body varchar;
-
-    ret_body := cast (content as varchar);
-    ps := cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'PingService');
-    aq := case when (length (ps)) then async_queue (1) else null end;
-    for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do
-    {
-      declare val_match, pcols, npars any;
-
-      val_match := case when (RM_TYPE = 'MIME') then type else rdf_graph2 end;
-      if (isstring (val_match) and regexp_match (RM_PATTERN, val_match) is not null)
-      {
-        if (__proc_exists (RM_HOOK) is null)
-          goto try_next_mapper;
-
         declare exit handler for sqlstate '*'
         {
-          goto try_next_mapper;
+      goto _exit;
         };
 
-        pcols := DB.DBA.RDF_PROC_COLS (RM_HOOK);
-        npars := case when (isarray (pcols)) then length (pcols) else 8 end;
-	      if (npars = 7)
-	      {
-		      xrc := call (RM_HOOK) (rdf_graph2, rdf_graph2, null, ret_body, aq, ps, RM_KEY);
-	      } else {
-		      xrc := call (RM_HOOK) (rdf_graph2, rdf_graph2, null, ret_body, aq, ps, RM_KEY, RM_OPTIONS);
-	      }
-	      if (__tag(xrc) = 193 or xrc < 0 or xrc > 0)
-	      {
+    ret_body := cast (content as varchar);
+    -- dbg_obj_print ('extractor');
+    rc := RDF_SINK_UPLOAD_CARTRIDGES (ret_body, type, 'select RM_ID, RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID', rdf_iri, rdf_graph2, rdf_cartridges);
+    -- dbg_obj_print ('meta');
+    rcMeta := RDF_SINK_UPLOAD_CARTRIDGES (ret_body, type, 'select MC_ID, MC_PATTERN, MC_TYPE, MC_HOOK, MC_KEY, MC_OPTIONS from DB.DBA.RDF_META_CARTRIDGES where MC_ENABLED = 1 order by MC_SEQ, MC_ID', rdf_iri, rdf_graph2, rdf_metaCartridges);
+    if (rc or rcMeta)
 	        goto _exit;
 	      }
-      }
-    try_next_mapper:;
-    }
-  }
   return 0;
 
 _exit:
@@ -2615,35 +2685,94 @@ _exit:
 }
 ;
 
-create procedure RDF_SINK_DELETE (
-  in path2 any)
+create procedure RDF_SINK_UPLOAD_CARTRIDGES (
+  inout content any,
+  inout type varchar,
+  in S varchar,
+  in rdf_iri varchar,
+  in rdf_graph varchar,
+  in rdf_cartridges varchar)
 {
-  declare c_id integer;
-  declare parts, path, rdf_graph, rdf_graph2 any;
+  declare cnt, hasSelection integer;
+  declare cname, pname varchar;
+  declare cartridges, aq, ps any;
+  declare xrc, val_match any;
+  declare st, msg, meta, rows, opts any;
 
-  parts := split_and_decode (path2, 0, '\0\0/');
-  if (length (parts) <>  6)
-    return;
-  if (parts[0] <> '')
-    return;
-  if (parts[length (parts) - 1] = '')
-    return;
-  if (parts[length (parts) - 2] <> 'rdf_sink')
-    return;
+  st := '00000';
+  exec (S, st, msg, vector (), vector ('use_cache', 1), meta, rows);
+  if ('00000' <> st)
+    return 0;
+
+    cartridges := split_and_decode (rdf_cartridges, 0, '\0\0,');
+  ps := null;
+  aq := null;
+  foreach (any row in rows) do
+    {
+    cname := cast (row[0] as varchar);
+	    if (position (cname, cartridges))
+            goto _try;
 
-  rdf_graph2 := 'http://local.virt' || path2;
+        goto _try_next;
 
-  path := replace (path2, parts[length (parts) - 1], '');
-  c_id := DAV_SEARCH_ID (path, 'C');
-  if (isinteger (c_id) and (c_id > 0))
+    _try:
+    val_match := case when (row[2] = 'MIME') then type else rdf_graph end;
+    if (isstring (val_match) and regexp_match (row[1], val_match) is not null)
   {
-    rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_graph');
-    if (not DB.DBA.is_empty_or_null (rdf_graph))
+      pname := row[3];
+	    if (__proc_exists (pname) is null)
+          goto _try_next;
+
+        declare exit handler for sqlstate '*'
     {
-      SPARQL delete from graph ?:rdf_graph { ?s ?p ?o } where { graph `iri(?:rdf_graph2)` { ?s ?p ?o } };
+          goto _try_next;
+        };
+	opts := vector_concat (vector (), row[5]);
+	xrc := call (pname) (rdf_graph, rdf_iri, null, content, aq, ps, row[4], opts);
+	    -- dbg_obj_print (pname, xrc, (select count(*) from rdf_quad where g = iri_to_id (rdf_graph)));
+	    -- when no selection we stop processing when a given cartridge indicate to stop
+	    if (not hasSelection and (__tag (xrc) = 193 or xrc < 0 or xrc > 0))
+        return 1;
     }
+    _try_next:;
+    }
+  return 1;
+  }
+;
+
+create procedure RDF_SINK_DELETE (
+  in path any)
+{
+  declare c_id, _col_p_id, _inherit, depth integer;
+  declare rdf_graph, rdf_graph2 any;
+
+  c_id := DB.DBA.DAV_SEARCH_ID (subseq (path, 0, strrchr (path, '/') + 1), 'C');
+  if (not isinteger (c_id) or (c_id < 0))
+    return;
+
+  rdf_graph := null;   
+  depth := 0; 
+  {
+     whenever not found goto rdfg_found;
+look_again:  
+      select COL_PARENT, COL_INHERIT into _col_p_id, _inherit from WS.WS.SYS_DAV_COL where COL_ID = c_id;
+    rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = 'C' and PROP_NAME = 'virt:rdf_graph');
+      if ((_inherit = 'R' or (depth = 1 and _inherit = 'M') or depth = 0) and length (rdf_graph))
+	goto rdfg_found;
+      c_id := _col_p_id;
+      depth := depth + 1;
+      rdf_graph := null;
+      goto look_again;
   }
+  rdfg_found:; 
 
+  if (DB.DBA.is_empty_or_null (rdf_graph))
+    return;
+
+  if (path like '%.gz')
+    path := regexp_replace (path, '\.gz\x24', '');
+  rdf_graph2 := 'http://local.virt' || path;
+  SPARQL delete from graph ?:rdf_graph { ?s ?p ?o } where { graph `iri(?:rdf_graph2)` { ?s ?p ?o } };
   SPARQL clear graph ?:rdf_graph2;
 }
 ;
@@ -4572,7 +4701,8 @@ create procedure WS.WS.WAC_DELETE (
     DAV_DELETE_INT (rtrim (path, '/') || ',acl', 1, null, null, 0, 0);
       connection_set ('dav_acl_sync', null);
     }
-  exec (sprintf ('sparql clear graph <%s>', graph), st, msg);
+  set_user_id ('dba');
+  SPARQL clear graph ?:graph;
   }
 ;
 
@@ -4585,7 +4715,7 @@ create procedure WS.WS.DAV_IRI (
   http_dav_url (path, null, S);
   S := string_output_string (S);
 
-  host := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+  host := virtuoso_ini_item_value ('URIQA', 'DefaultHost');
   if (host is null)
   {
     host := sys_stat ('st_host_name');
@@ -6514,12 +6644,30 @@ create procedure DAV_GET_RES_TYPE_URI_BY_MIME_TYPE(in mime_type varchar) returns
 -- /* extracting metadata */
 create procedure DAV_EXTRACT_AND_SAVE_RDF_INT (inout resid integer, inout resname varchar, in restype varchar, inout _rescontent any)
 {
+  declare rescontent any;
+  rescontent := subseq (_rescontent, 0, 10000000-1);
+  if ((length (_rescontent) < 262144) or (registry_get ('DAV_EXTRACT_RDF_ASYNC') <> '1'))
+    {
+      DAV_EXTRACT_AND_SAVE_RDF_INT2 (resid, resname, restype, rescontent);
+    } 
+  else 
+    {
+      declare aq any;
+      aq := async_queue (1);
+      if (not isstring (rescontent))
+	rescontent := cast (rescontent as varchar);
+      aq_request (aq, 'DB.DBA.DAV_EXTRACT_AND_SAVE_RDF_INT2', vector (resid, resname, restype, rescontent));
+    }
+}
+;
+
+-- /* extracting metadata */
+create procedure DAV_EXTRACT_AND_SAVE_RDF_INT2 (in resid integer, in resname varchar, in restype varchar, in rescontent any)
+{
   declare resttype, res_type_uri, full_name varchar;
   declare old_prop_id integer;
   declare html_start, full_xml, type_tree any;
   declare old_n3, addon_n3, spotlight_addon_n3 any;
-  declare rescontent any;
-  rescontent := subseq (_rescontent, 0, 10000000-1);
   -- dbg_obj_princ ('DAV_EXTRACT_AND_SAVE_RDF_INT (', resid, resname, restype, rescontent, ')');
   html_start := null;
   full_xml := null;
diff --git a/binsrc/dav/dav_debug.sql b/binsrc/dav/dav_debug.sql
index e28c679..a1ef97a 100644
--- a/binsrc/dav/dav_debug.sql
+++ b/binsrc/dav/dav_debug.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_debug.sql,v 1.1.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: dav_debug.sql,v 1.1.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/dav_meta.sql b/binsrc/dav/dav_meta.sql
index adbce9e..a6133b3 100644
--- a/binsrc/dav/dav_meta.sql
+++ b/binsrc/dav/dav_meta.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_meta.sql,v 1.12.2.1 2010/09/22 13:58:32 source Exp $
+--  $Id: dav_meta.sql,v 1.12.2.3 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -1654,7 +1654,7 @@ create function IMC_TO_XML (in _src varchar)
       xte_nodebld_init (line_acc);
       delims := regexp_parse (
 --2                3 4             56                                                                                                                                               78   90            1
-'^([A-Za-z0-9-]+[.])?([A-Za-z0-9-]+)(([;][A-Za-z0-9-]+(=(([^\001-\037\200-\377";:,]*)|("[^\001-\037\200-\377"]*"))(,(([^\001-\037\200-\377";:,]*)|("[^\001-\037\200-\377"]*")))*)?)*)([:])([\040-\377]*)\044',
+'^([A-Za-z0-9-]+[.])?([A-Za-z0-9-]+)(([;][A-Za-z0-9-]+(=(([^\001-\037\200-\377";:,]*)|("[^\001-\037\200-\377"]*"))(,(([^\001-\037\200-\377";:,]*)|("[^\001-\037\200-\377"]*")))*)?)*)([:])([\011\040-\377]*)\044',
 --(group        [.])?name           ((param-name      (=(plain-param-value           |quoted_param_value         )(,(plain-param-value           |quoted_param_value         ))*)?)*) [:]  value
             line, 0 );
           if (delims is null)
diff --git a/binsrc/dav/dav_metr.sh b/binsrc/dav/dav_metr.sh
index 8d7247e..4de6e9a 100755
--- a/binsrc/dav/dav_metr.sh
+++ b/binsrc/dav/dav_metr.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: dav_metr.sh,v 1.4.2.1 2009/11/20 17:11:24 source Exp $
+#  $Id: dav_metr.sh,v 1.4.2.2 2012/03/08 12:54:59 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/dav_rdf_quad.sql b/binsrc/dav/dav_rdf_quad.sql
index 3d523a3..ebde191 100644
--- a/binsrc/dav/dav_rdf_quad.sql
+++ b/binsrc/dav/dav_rdf_quad.sql
@@ -1,10 +1,10 @@
 --
---  $Id: dav_rdf_quad.sql,v 1.4.2.1 2010/09/27 14:42:19 source Exp $
+--  $Id: dav_rdf_quad.sql,v 1.4.2.4 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -39,7 +39,7 @@ create function DB.DBA.DAV_FULL_PATH_TO_IRI (in dav_iri varchar, in _str varchar
 create procedure DB.DBA.DAV_AUTO_REPLICATE_TO_RDF_QUAD ()
 {
   declare uriqa_default_host, old_dav_graph, new_dav_graph varchar;
-  uriqa_default_host := cfg_item_value (virtuoso_ini_path (), 'URIQA','DefaultHost');
+  uriqa_default_host := virtuoso_ini_item_value ('URIQA','DefaultHost');
   if (isstring (registry_get ('DB.DBA.DAV_RDF_GRAPH_URI')))
     return;
   if (uriqa_default_host is null or uriqa_default_host = '')
@@ -52,11 +52,11 @@ create procedure DB.DBA.DAV_REPLICATE_ALL_TO_RDF_QUAD (in enable integer)
 {
   declare uriqa_default_host, old_dav_graph, new_dav_graph varchar;
   declare trx_size integer;
-  uriqa_default_host := cfg_item_value (virtuoso_ini_path (), 'URIQA','DefaultHost');
+  uriqa_default_host := virtuoso_ini_item_value ('URIQA','DefaultHost');
   if (uriqa_default_host is null or uriqa_default_host = '')
     signal ('OBLOM', 'No uriqa_default_host!');
-  if (cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DynamicLocal') = '1')
-  new_dav_graph := 'local:/DAV';
+  if (virtuoso_ini_item_value ('URIQA', 'DynamicLocal') = '1')
+    new_dav_graph := 'local:/DAV';
   else
     new_dav_graph := sprintf ('http://%s/DAV', uriqa_default_host);
   exec ('checkpoint');
@@ -197,7 +197,7 @@ create procedure DB.DBA.DAV_RDF_URI_RESOLVE (in dav_rdf_graph_uri varchar, in ir
   else if (left (iri, 22) = 'http://local.virt/DAV/')
     {
 --      declare uriqa_default_host, old_dav_graph, new_dav_graph varchar;
---      uriqa_default_host := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+--      uriqa_default_host := virtuoso_ini_item_value ('URIQA', 'DefaultHost');
 --      if (uriqa_default_host is null or uriqa_default_host = '')
 --        signal ('OBLOM', 'No uriqa_default_host!');
 --      new_dav_graph := sprintf ('http://%s/DAV/', uriqa_default_host);
@@ -300,7 +300,7 @@ create function DB.DBA.DAV_MAKE_USER_IRI (in userid integer)
   if (email is null or email='')
     {
       declare uriqa_default_host varchar;
-      uriqa_default_host := cfg_item_value (virtuoso_ini_path (), 'URIQA','DefaultHost');
+      uriqa_default_host := virtuoso_ini_item_value ('URIQA','DefaultHost');
       if (not isstring (uriqa_default_host))
         signal ('22023', 'Function DB.DBA.DAV_MAKE_USER_IRI() has failed to get "DefaultHost" parameter of [URIQA] section of Virtuoso configuration file');
       email := sprintf ('mailto:UserId%d@%s', userid, uriqa_default_host);
diff --git a/binsrc/dav/davddk.sql b/binsrc/dav/davddk.sql
index f0ef84e..e8ffece 100644
--- a/binsrc/dav/davddk.sql
+++ b/binsrc/dav/davddk.sql
@@ -1,10 +1,10 @@
 --
---  $Id: davddk.sql,v 1.13.2.5 2011/01/05 12:52:53 source Exp $
+--  $Id: davddk.sql,v 1.13.2.6 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/davxml2n3xml.xsl b/binsrc/dav/davxml2n3xml.xsl
index 5500907..8d43910 100644
--- a/binsrc/dav/davxml2n3xml.xsl
+++ b/binsrc/dav/davxml2n3xml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: davxml2n3xml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $
+ -  $Id: davxml2n3xml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/davxml2rdfxml.xsl b/binsrc/dav/davxml2rdfxml.xsl
index 1235738..d122a63 100644
--- a/binsrc/dav/davxml2rdfxml.xsl
+++ b/binsrc/dav/davxml2rdfxml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: davxml2rdfxml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $
+ -  $Id: davxml2rdfxml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/init_dav_metr.sql b/binsrc/dav/init_dav_metr.sql
index db8c4e5..8c99c78 100644
--- a/binsrc/dav/init_dav_metr.sql
+++ b/binsrc/dav/init_dav_metr.sql
@@ -1,10 +1,10 @@
 --
---  $Id: init_dav_metr.sql,v 1.1.2.1 2009/11/20 17:11:24 source Exp $
+--  $Id: init_dav_metr.sql,v 1.1.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/n3xml2uriqahtml.xsl b/binsrc/dav/n3xml2uriqahtml.xsl
index 602b9ae..44e3fcc 100644
--- a/binsrc/dav/n3xml2uriqahtml.xsl
+++ b/binsrc/dav/n3xml2uriqahtml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: n3xml2uriqahtml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $
+ -  $Id: n3xml2uriqahtml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/rdav.sh b/binsrc/dav/rdav.sh
index 3f42b54..738ac02 100755
--- a/binsrc/dav/rdav.sh
+++ b/binsrc/dav/rdav.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: rdav.sh,v 1.4.2.1 2009/11/20 17:11:24 source Exp $
+#  $Id: rdav.sh,v 1.4.2.2 2012/03/08 12:54:59 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/rdfxml2n3xml.xsl b/binsrc/dav/rdfxml2n3xml.xsl
index 6b5f14d..63c6a08 100644
--- a/binsrc/dav/rdfxml2n3xml.xsl
+++ b/binsrc/dav/rdfxml2n3xml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdfxml2n3xml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $
+ -  $Id: rdfxml2n3xml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/snapshot_repl.sql b/binsrc/dav/snapshot_repl.sql
index a746055..59e2f4d 100644
--- a/binsrc/dav/snapshot_repl.sql
+++ b/binsrc/dav/snapshot_repl.sql
@@ -1,12 +1,12 @@
 --
--- $Id: snapshot_repl.sql,v 1.2.2.1 2009/11/20 17:11:24 source Exp $
+-- $Id: snapshot_repl.sql,v 1.2.2.2 2012/03/08 12:54:59 source Exp $
 --
 --  SNP replication support
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/dav/uriqa.sql b/binsrc/dav/uriqa.sql
index 8b65c92..f78081d 100644
--- a/binsrc/dav/uriqa.sql
+++ b/binsrc/dav/uriqa.sql
@@ -1,10 +1,10 @@
 --
---  $Id: uriqa.sql,v 1.7 2009/02/13 10:09:14 source Exp $
+--  $Id: uriqa.sql,v 1.7.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -47,7 +47,7 @@ create function WS.WS.URIQA_CFG_ITEM_VALUE (in param_name varchar, in is_list in
   declare string_val varchar;
   declare list_val any;
   ini_path := virtuoso_ini_path ();
-  string_val := cfg_item_value (ini_path, 'URIQA', param_name);
+  string_val := virtuoso_ini_item_value ('URIQA', param_name);
   if (string_val is not null)
     {
       if (is_list)
diff --git a/binsrc/dbpedia/Makefile.am b/binsrc/dbpedia/Makefile.am
new file mode 100644
index 0000000..40c1e0b
--- /dev/null
+++ b/binsrc/dbpedia/Makefile.am
@@ -0,0 +1,63 @@
+#  
+#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+#  project.
+#  
+#  Copyright (C) 1998-2012 OpenLink Software
+#  
+#  This project 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; only version 2 of the License, dated June 1991.
+#  
+#  This program 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
+#  General Public License for more details.
+#  
+#  You should have received a copy of the GNU General Public License along
+#  with this program; if not, write to the Free Software Foundation, Inc.,
+#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#  
+#  
+
+TOP=@TOP@
+
+if WITH_DBPEDIA_VAD
+nodist_vad_DATA = dbpedia_dav.vad
+endif
+
+noinst_SCRIPTS = make_vad.sh
+CLEANFILES =  \
+	dbpedia_dav.vad \
+	dbpedia_filesystem.vad \
+	make_dbpedia_vad.log \
+	make_vad.output \
+	vad_dav.xml \
+	vad_fs.xml \
+	virtuoso.pxa
+
+
+dbpedia_filesystem.vad dbpedia_dav.vad: $(EXTRA_DIST)
+	PATH="$(TOP)/binsrc/virtuoso:$(TOP)/binsrc/tests:.:$$PATH" PORT=$(PORT) HOME="$(TOP)" HOST=localhost sh ./make_vad.sh
+
+clean-local:
+	-rm -rf vad
+
+# ----------------------------------------------------------------------
+#
+#  Additional files to distribute
+#
+# ----------------------------------------------------------------------
+EXTRA_DIST = \
+	*.sql \
+	make_vad.sh \
+	vad_version \
+	vsp/*.sql \
+	vsp/*.vsp \
+	vsp/images/*.gif \
+	vsp/images/*.png \
+	vsp/statics/*.css \
+	vsp/statics/*.gif \
+	vsp/statics/*.js \
+	vsp/statics/*.png \
+	vsp/statics/*.svg \
+	vsp/style/*.css
diff --git a/binsrc/dbpedia/Makefile.in b/binsrc/dbpedia/Makefile.in
new file mode 100644
index 0000000..0196891
--- /dev/null
+++ b/binsrc/dbpedia/Makefile.in
@@ -0,0 +1,550 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+#  
+#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+#  project.
+#  
+#  Copyright (C) 1998-2012 OpenLink Software
+#  
+#  This project 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; only version 2 of the License, dated June 1991.
+#  
+#  This program 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
+#  General Public License for more details.
+#  
+#  You should have received a copy of the GNU General Public License along
+#  with this program; if not, write to the Free Software Foundation, Inc.,
+#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#  
+#  
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = binsrc/dbpedia
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/binsrc/config/libtool.m4 \
+	$(top_srcdir)/binsrc/config/libxml.m4 \
+	$(top_srcdir)/binsrc/config/ltoptions.m4 \
+	$(top_srcdir)/binsrc/config/ltsugar.m4 \
+	$(top_srcdir)/binsrc/config/ltversion.m4 \
+	$(top_srcdir)/binsrc/config/lt~obsolete.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/libsrc/Dk/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(vaddir)"
+DATA = $(nodist_vad_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_LDFLAGS = @AM_LDFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BINDIR = @BINDIR@
+BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
+BUILD_GLIB_LIBS = @BUILD_GLIB_LIBS@
+BUILD_OPTS = @BUILD_OPTS@
+CC = @CC@
+CCDEBUG = @CCDEBUG@
+CCDEFS = @CCDEFS@
+CCDEPMODE = @CCDEPMODE@
+CCLIBS = @CCLIBS@
+CCOPT = @CCOPT@
+CCPLATFORMDEFS = @CCPLATFORMDEFS@
+CCWARN = @CCWARN@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLEX = @FLEX@
+GAWK = @GAWK@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GPERF = @GPERF@
+GREP = @GREP@
+HSL_CPPFLAGS = @HSL_CPPFLAGS@
+HSL_LDFLAGS = @HSL_LDFLAGS@
+HSL_LIBS = @HSL_LIBS@
+HS_LOOKUP = @HS_LOOKUP@
+HTMLDOC = @HTMLDOC@
+IM_CONFIG = @IM_CONFIG@
+IM_CPPFLAGS = @IM_CPPFLAGS@
+IM_LDFLAGS = @IM_LDFLAGS@
+IM_LIBS = @IM_LIBS@
+INCDIR = @INCDIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBDIR = @LIBDIR@
+LIBDL = @LIBDL@
+LIBOBJS = @LIBOBJS@
+LIBRDL = @LIBRDL@
+LIBS = @LIBS@
+LIBTHR = @LIBTHR@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPSYS = @OPSYS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PERL_CFLAGS = @PERL_CFLAGS@
+PERL_LDFLAGS = @PERL_LDFLAGS@
+PKG_CONFIG = @PKG_CONFIG@
+PLSTATS = @PLSTATS@
+PORT = @PORT@
+PYTHON = @PYTHON@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+RANLIB = @RANLIB@
+RUBY = @RUBY@
+RUBY_CFLAGS = @RUBY_CFLAGS@
+RUBY_LDFLAGS = @RUBY_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSLIBS = @SYSLIBS@
+TOP = @TOP@
+VERSION = @VERSION@
+VIRT_AM_CFLAGS = @VIRT_AM_CFLAGS@
+WBXML2_CFLAGS = @WBXML2_CFLAGS@
+WBXML2_LDFLAGS = @WBXML2_LDFLAGS@
+WGET = @WGET@
+XML2_CONFIG = @XML2_CONFIG@
+XML_CPPFLAGS = @XML_CPPFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_INC = @ZLIB_INC@
+ZLIB_LIB = @ZLIB_LIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_jdk2_path = @ac_jdk2_path@
+ac_jdk3_path = @ac_jdk3_path@
+ac_jdk4_path = @ac_jdk4_path@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+ccincl = @ccincl@
+clntlibs = @clntlibs@
+datadir = @datadir@
+datarootdir = @datarootdir@
+dbdir = @dbdir@
+demodir = @demodir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+hostingdir = @hostingdir@
+htmldir = @htmldir@
+htmldocdir = @htmldocdir@
+httprootdir = @httprootdir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+iodbc_LDFLAGS = @iodbc_LDFLAGS@
+java_CPPFLAGS = @java_CPPFLAGS@
+java_LDFLAGS = @java_LDFLAGS@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libxml_file = @libxml_file@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+openldap_CFLAGS = @openldap_CFLAGS@
+openldap_LDFLAGS = @openldap_LDFLAGS@
+openssl_CFLAGS = @openssl_CFLAGS@
+openssl_LDFLAGS = @openssl_LDFLAGS@
+pdfdir = @pdfdir@
+pdfdocdir = @pdfdocdir@
+php5_CFLAGS = @php5_CFLAGS@
+php5_LDFLAGS = @php5_LDFLAGS@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+srvrlibs = @srvrlibs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+vaddir = @vaddir@
+ at WITH_DBPEDIA_VAD_TRUE@nodist_vad_DATA = dbpedia_dav.vad
+noinst_SCRIPTS = make_vad.sh
+CLEANFILES = \
+	dbpedia_dav.vad \
+	dbpedia_filesystem.vad \
+	make_dbpedia_vad.log \
+	make_vad.output \
+	vad_dav.xml \
+	vad_fs.xml \
+	virtuoso.pxa
+
+
+# ----------------------------------------------------------------------
+#
+#  Additional files to distribute
+#
+# ----------------------------------------------------------------------
+EXTRA_DIST = \
+	*.sql \
+	make_vad.sh \
+	vad_version \
+	vsp/*.sql \
+	vsp/*.vsp \
+	vsp/images/*.gif \
+	vsp/images/*.png \
+	vsp/statics/*.css \
+	vsp/statics/*.gif \
+	vsp/statics/*.js \
+	vsp/statics/*.png \
+	vsp/statics/*.svg \
+	vsp/style/*.css
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu binsrc/dbpedia/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu binsrc/dbpedia/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-nodist_vadDATA: $(nodist_vad_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(vaddir)" || $(MKDIR_P) "$(DESTDIR)$(vaddir)"
+	@list='$(nodist_vad_DATA)'; test -n "$(vaddir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vaddir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(vaddir)" || exit $$?; \
+	done
+
+uninstall-nodist_vadDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_vad_DATA)'; test -n "$(vaddir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(vaddir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(vaddir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(vaddir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nodist_vadDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nodist_vadDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-local distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-nodist_vadDATA install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-nodist_vadDATA
+
+
+dbpedia_filesystem.vad dbpedia_dav.vad: $(EXTRA_DIST)
+	PATH="$(TOP)/binsrc/virtuoso:$(TOP)/binsrc/tests:.:$$PATH" PORT=$(PORT) HOME="$(TOP)" HOST=localhost sh ./make_vad.sh
+
+clean-local:
+	-rm -rf vad
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/binsrc/dbpedia/dbpedia_init.sql b/binsrc/dbpedia/dbpedia_init.sql
new file mode 100644
index 0000000..c67dcb4
--- /dev/null
+++ b/binsrc/dbpedia/dbpedia_init.sql
@@ -0,0 +1,726 @@
+--
+--  $Id: dbpedia_init.sql,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>registry_get('_dbpedia_path_'));
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/class');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/ontology');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data2');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data3');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/page');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/resource');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/category');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/statics');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/wikicompany/resource');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/sparql');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/property');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data4');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/about');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/snorql');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/sparql-auth');
+
+
+--# root proxy to dbpedia wiki
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/',
+	 ppath=>registry_get ('dbp_website'),
+	 is_dav=>0,
+	 def_page=>''
+);
+
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>rtrim (registry_get('_dbpedia_path_'), '/'),
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba'
+);
+
+--# class
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/class',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbp_rule_list_3')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_rule_list_3', 1, vector ('dbp_rule_6', 'dbp_rule_7', 'dbp_rule_18', 'dbp_rule_19'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_6', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 2, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_7', 1, '/class/(.*)\x24', vector ('par_1'), 1,
+'/data2/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_18', 1, '/class/(.*)\x24', vector ('par_1'), 1,
+'/data2/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 2, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_19', 1, '/class/(.*)\x24', vector ('par_1'), 1,
+'/data2/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+--# ontology
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/ontology',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbp_rule_list_owl')
+);
+
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_rule_list_owl', 1, vector ('owl_rule_6', 'owl_rule_7', 'owl_rule_18', 'owl_rule_19'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'owl_rule_6', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 2, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'owl_rule_7', 1, '/ontology/(.*)\x24', vector ('par_1'), 1,
+'/data3/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'owl_rule_18', 1, '/ontology/(.*)\x24', vector ('par_1'), 1,
+'/data3/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 2, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'owl_rule_19', 1, '/ontology/(.*)\x24', vector ('par_1'), 1,
+'/data3/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+
+--# data
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'dbp_data_rule_list', 'url_rewrite_keep_lpath', 1)
+);
+
+create procedure DB.DBA.DBP_GRAPH_PARAM1 (in par varchar, in fmt varchar, in val varchar)
+{
+  declare tmp any;
+  tmp := sprintf ('default-graph-uri=%U', registry_get ('dbp_graph'));
+  if (par = 'gr')
+    {
+      val := trim (val, '/');
+      if (length (val) = 0)
+	val := '';
+      if (val = 'en')
+        val := '';  
+      if (val <> '')
+	{
+          val := 'http://' || val || '.dbpedia.org';	
+	  tmp := tmp || sprintf ('&named-graph-uri=%U', val);
+	}
+    }
+  else
+    tmp := val;
+  return sprintf (fmt, tmp);
+}
+;
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_data_rule_list', 1, vector ('dbp_data_rule0', 'dbp_data_rule1', 'dbp_data_rule2', 'dbp_data_rule3', 'dbp_data_rule3-1', 'dbp_data_rule3-2', 'dbp_data_rule4', 'dbp_data_rule5', 'dbp_data_rule6', 'dbp_data_rule7', 'dbp_data_rule8'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule0', 1, '/data/([a-z_\\-]*/)?(.*)', vector ('gr', 'par_1'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=rdf',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule1', 1, '/data/([a-z_\\-]*/)?(.*)', vector ('gr', 'par_1'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=%U',
+vector ('gr', 'par_1', '*accept*'), 'DB.DBA.DBP_GRAPH_PARAM1', '(application/rdf.xml)|(text/rdf.n3)', 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule2', 1, '/data/([a-z_\\-]*/)?(.*)\\.(xml)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=rdf',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule3', 1, '/data/([a-z_\\-]*/)?(.*)\\.(ttl)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=n3',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule3-1', 1, '/data/([a-z_\\-]*/)?(.*)\\.(nt)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=n3',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule3-2', 1, '/data/([a-z_\\-]*/)?(.*)\\.(n3)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=text%%2Fn3',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule5', 1, '/data/([a-z_\\-]*/)?(.*)\\.(jrdf)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&output=application%%2Frdf%%2Bjson',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, 'Content-Type: application/rdf+json\r\n^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule6', 1, '/data/([a-z_\\-]*/)?(.*)\\.(json)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&output=application%%2Fjson',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, 'Content-Type: application/json\r\n^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule4', 1, '/data/([a-z_\\-]*/)?(.*)\\.(rdf)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA"+DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&format=%U',
+vector ('gr', 'par_1', 'f'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule7', 1, '/data/([a-z_\\-]*/)?(.*)\\.(atom)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&output=application%%2Fatom%%2Bxml',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, 'Content-Type: application/atom+xml\r\n^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_data_rule7', 1, '/data/([a-z_\\-]*/)?(.*)\\.(jsod)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=DESCRIBE+%%3Chttp%%3A%%2F%%2F'||replace(registry_get('dbp_domain'),'http://','')||'%%2Fresource%%2F%s%%3E&output=application%%2Fodata%%2Bjson',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, 'Content-Type: application/odata+json\r\n^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+--# data2
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data2',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'pvsp_rule_list7')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'pvsp_rule_list7', 1, vector ('pvsp_data_rule7'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'pvsp_data_rule7', 1, '/data2/(.*)\\.(n3|rdf)', vector ('par_1','f'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query=DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fclass%%2F%U%%3E&format=%U',
+vector ('par_1', 'f'), NULL, NULL, 2, null, '');
+
+--# data3
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data3',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'pvsp_rule_data3')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'pvsp_rule_data3', 1, vector ('pvsp_data3_rule', 'pvsp_data3_rule_2', 'pvsp_data3_rule_3'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'pvsp_data3_rule', 1, '/data3/(.*)\\.(n3|rdf|ttl)', vector ('par_1', 'f'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query=DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fontology%%2F%U%%3E&format=%U',
+vector ('par_1', 'f'), NULL, NULL, 2, NULL, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'pvsp_data3_rule_2', 1, '/data3/(.*)\\.(atom)', vector ('par_1', 'f'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query=DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fontology%%2F%U%%3E&format=application%%2Fatom%%2Bxml',
+vector ('par_1'), NULL, NULL, 2, NULL, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'pvsp_data3_rule', 1, '/data3/(.*)\\.(ntriples)', vector ('par_1', 'f'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query=DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fontology%%2F%U%%3E&format=text%%2Fplain',
+vector ('par_1'), NULL, NULL, 2, NULL, '');
+
+--# page
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/page',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 opts=>vector ('url_rewrite', 'dbp_rule_list_7')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_rule_list_7', 1, vector ('dbp_rule_13'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_13', 1, '(/[^#\\?]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+--# resource
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/resource',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbp_rule_list_2')
+);
+
+create procedure DB.DBA.DBP_LINK_HDR (in in_path varchar)
+{
+  declare host, lines, accept, loc, alt, exp any;
+  lines := http_request_header ();
+--  dbg_obj_print ('in_path: ', in_path);
+--  dbg_obj_print ('lines: ', lines);
+  loc := ''; alt := ''; exp := '';
+  host := http_request_header(lines, 'Host', null, '');
+  if (regexp_match ('/data/([a-z_\\-]*/)?(.*)\\.(nt|n3|rdf|ttl|jrdf|xml|atom|json|jsod|ntriples)', in_path) is null and in_path like '/data/%')
+    {
+      declare tmp any;
+      accept := http_request_header(lines, 'Accept', null, 'application/rdf+xml');
+      accept := regexp_match ('(application/rdf.xml)|(text/rdf.n3)|(text/n3)', accept);
+      tmp := split_and_decode (in_path, 0, '\0\0/');
+      if (length (tmp) and strstr (http_header_get (), 'Content-Location') is null)
+	{
+	  tmp := tmp [ length (tmp) - 1 ];
+	  if (accept is null)
+	    accept := 'application/rdf+xml';
+	  if (accept = 'application/rdf+xml')
+	    loc := 'Content-Location: ' || tmp || '.xml\r\n';	
+	  else if (accept = 'text/rdf+n3')
+	    loc := 'Content-Location: ' || tmp || '.n3\r\n';	
+	  else if (accept = 'text/n3')
+	    loc := 'Content-Location: ' || tmp || '.n3\r\n';	
+	}
+    }
+  if (in_path like '/data/%')
+    {
+      declare ext any;
+      declare p varchar;
+      ext := vector (vector ('xml', 'RDF/XML', 'application/rdf+xml'), vector ('n3', 'N3/Turtle', 'text/n3'), vector ('json', 'RDF/JSON', 'application/json'));
+      foreach (any ss in ext) do
+	{
+	  declare s varchar;
+	  s := ss[0];
+	  if (in_path not like '/data/%.'||s)
+	    {
+	      p := regexp_replace (in_path, '\\.(nt|n3|rdf|ttl|jrdf|xml|json|atom|jsod|ntriples)\x24', '.'||s);
+	      alt := alt || sprintf ('<http://%s%s>; rel="alternate"; type="%s"; title="Structured Descriptor Document (%s format)", ', host, p, ss[2], ss[1]);
+	    }
+	}
+      if (in_path not like '/data/%.atom')
+	{
+	  p := regexp_replace (in_path, '\\.(nt|n3|rdf|ttl|jrdf|xml|json|atom)\x24', '.atom');
+	  alt := alt || sprintf ('<http://%s%s>; rel="alternate"; type="application/atom+xml"; title="OData (Atom+Feed format)", ', host, p);
+	}
+      if (in_path not like '/data/%.jsod')
+	{
+	  p := regexp_replace (in_path, '\\.(nt|n3|rdf|ttl|jrdf|xml|json|atom)\x24', '.jsod');
+	  alt := alt || sprintf ('<http://%s%s>; rel="alternate"; type="application/odata+json"; title="OData (JSON format)", ', host, p);
+	}
+      p := regexp_replace (in_path, '\\.(n3|nt|rdf|ttl|jrdf|xml|json|atom)\x24', '');
+      p := replace (p, '/data/', '/page/');
+      alt := alt || sprintf ('<http://%s%s>; rel="alternate"; type="text/html"; title="XHTML+RDFa", ', host, p);
+      p := replace (p, '/page/', '/resource/');
+      alt := alt || sprintf ('<http://%s%s>; rev="http://xmlns.com/foaf/0.1/primaryTopic", ', host, p);
+      alt := alt || sprintf ('<http://%s%s>; rel="describedby", ', host, p);
+      if (registry_get ('dbp_pshb_hub') <> 0)
+	alt := alt || sprintf ('<%s>; rel="hub", ', registry_get ('dbp_pshb_hub'));
+      exp := sprintf ('Expires: %s\r\n', date_rfc1123 (dateadd ('day', 7, now ())));
+    }
+  return sprintf ('%s%sLink: %s<http://mementoarchive.lanl.gov/dbpedia/timegate/http://%s%s>; rel="timegate"', exp, loc, alt, host, in_path);
+}
+;
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_rule_list_2', 1, vector ('dbp_rule_14', 'dbp_rule_12'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_14', 1, '/resource/(.*)\x24', vector ('par_1'), 1,
+    '/page/%s', vector ('par_1'), NULL, NULL, 2, 303, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+create procedure DB.DBA.DBP_DATA_IRI1 (in par varchar, in fmt varchar, in val varchar)
+{
+  if (par = 'par_2' and length (val))
+    {
+      declare arr any;
+      arr := split_and_decode (val);
+      if (length (arr) > 1 and arr[1] <> 'en' and length (arr[1]))
+	return sprintf (fmt, arr[1] || '/');
+      val := '';
+    }
+  return sprintf (fmt, val);
+}
+;
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_12', 1, '/resource/([^\\?]*)(\\?lang=.*)?\x24', vector ('par_1', 'par_2'), 1,
+    '/data/@__@%s', vector ('par_1'), 'DB.DBA.DBP_DATA_IRI1', 
+    '(application/rdf.xml)|(text/rdf.n3)|(text/n3)|(application/x-turtle)|(application/rdf.json)|(application/json)|(application/atom.xml)|(application/odata.json)', 2, 303, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+create procedure DB.DBA.DBP_TCN_LOC (in id any, in var any)
+{
+  return var;
+}
+;
+
+
+delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'dbp_rule_list_2';
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.xml',  'application/rdf+xml', 0.95, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.n3',   'text/n3', 0.80, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.nt',   'text/rdf+n3', 0.80, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.ttl',  'application/x-turtle', 0.70, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.json', 'application/json', 0.60, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.jrdf', 'application/rdf+json', 0.60, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.atom', 'application/atom+xml', 0.50, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_2', '/data/@__@(.*)', '/data/\x241.jsod', 'application/odata+json', 0.50, location_hook=>null);
+
+--# category
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/category',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbp_rule_list_category')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_rule_list_category', 1, vector ('dbp_rule_category14', 'dbp_rule_category12'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_category14', 1, '/category/(.*)\x24', vector ('par_1'), 1,
+    '/page/%s', vector ('par_1'), NULL, NULL, 2, 303, NULL);
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_rule_category12', 1, '/category/(.*)\x24', vector ('par_1'), 1,
+    '/data/__%U', vector ('par_1'), NULL, '(application/rdf.xml)|(text/rdf.n3)|(application/x-turtle)|(application/rdf.json)|(application/json)', 2, 303);
+
+delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'dbp_rule_list_category';
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_category', '__(.*)', '\x241.xml', 'application/rdf+xml', 0.95, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_category', '__(.*)', '\x241.n3',  'text/rdf+n3', 0.80, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_category', '__(.*)', '\x241.ttl',  'application/x-turtle', 0.70, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_category', '__(.*)', '\x241.json',  'application/json', 0.60, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbp_rule_list_category', '__(.*)', '\x241.jrdf',  'application/rdf+json', 0.60, location_hook=>null);
+
+
+--# statics
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/statics',
+	 ppath=>'/DAV/VAD/dbpedia/statics/',
+	 is_dav=>1,
+	 def_page=>'index.html'
+);
+
+--# wikicompany
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/wikicompany/resource',
+	 ppath=>'/DAV/wikicompany/resource/',
+	 is_dav=>1,
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'dbp_wc_rule_list1')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_wc_rule_list1', 1, vector ('dbp_wc_rule1', 'dbp_wc_rule2'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_wc_rule1', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description_white.vsp?res=%s', vector ('par_1'), NULL, NULL, 2, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbp_wc_rule2', 1, '(/[^#]*)', vector ('par_1'), 1,
+'/sparql?query=describe%%20%%3Chttp%%3A%%2F%%2Fdbpedia.openlinksw.com%s%%3E%%20from%%20%%3Chttp%%3A%%2F%%2Fdbpedia.openlinksw.com%%2Fwikicompany%%3E&format=%U',
+vector ('par_1', '*accept*'), NULL, '(application/rdf.xml)|(text/rdf.n3)', 2, 303, '');
+
+--# sparql
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/sparql',
+	ppath=>'/!sparql/',
+	is_dav=>1,
+	def_page=>'',
+	vsp_user=>'dba',
+	opts=>vector ('noinherit', 'yes')
+);
+
+--# property
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/property',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbp_rule_list_prop')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbp_rule_list_prop', 1, vector ('prop_rule_6', 'prop_rule_7', 'prop_rule_18', 'prop_rule_19'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'prop_rule_6', 1, '(/[^#\\?]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'prop_rule_7', 1, '/property/(.*)\x24', vector ('par_1'), 1,
+'/data4/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'prop_rule_18', 1, '/property/(.*)\x24', vector ('par_1'), 1,
+'/data4/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 1, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'prop_rule_19', 1, '/property/(.*)\x24', vector ('par_1'), 1,
+'/data4/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+--# data4
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/data4',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'pvsp_rule_data4')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'pvsp_rule_data4', 1, vector ('pvsp_data4_rule'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'pvsp_data4_rule', 1, '/data4/(.*)\\.(n3|rdf)', vector ('par_1', 'f'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query=DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fproperty%%2F%U%%3E&format=%U',
+vector ('par_1', 'f'), NULL, NULL, 2, null, '');
+
+--# about 
+DB.DBA.VHOST_DEFINE (
+	 lhost=>registry_get ('dbp_lhost'),
+	 vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/about',
+	 ppath=>'/SOAP/Http/ext_http_proxy',
+	 is_dav=>0,
+	 soap_user=>'PROXY',
+	 ses_vars=>0,
+	 opts=>vector ('url_rewrite', 'ext_about_http_proxy_rule_list1'),
+	 is_default_host=>0
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 
+    'ext_about_http_proxy_rule_list1', 1, 
+      vector ('dbp_about_rule_1'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 
+    'dbp_about_rule_1', 1, 
+      '/about/html/(.*)\x24', 
+      vector ('par_1'), 
+      1, 
+      '/DAV/VAD/dbpedia/description.vsp?res=%U', 
+      vector ('par_1'), 
+      NULL, 
+      NULL, 
+      2, 
+      0, 
+      '' 
+      );
+
+DB.DBA.VHOST_REMOVE (
+	 lhost=>registry_get ('dbp_lhost'),
+	 vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/rdfdesc');
+DB.DBA.VHOST_DEFINE (
+	 lhost=>registry_get ('dbp_lhost'),
+	 vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/rdfdesc',
+	 ppath=>'/DAV/VAD/rdf_mappers/rdfdesc/',
+	 is_dav=>1,
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 is_default_host=>0
+);
+
+--# snorql
+DB.DBA.VHOST_DEFINE (
+	 lhost=>registry_get ('dbp_lhost'),
+	 vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/snorql',
+	 ppath=>'/snorql/',
+	 is_dav=>0,
+	 def_page=>'index.html',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 opts=>vector ('browse_sheet', 0),
+	 is_default_host=>0
+);
+
+--# sparql-auth
+DB.DBA.VHOST_DEFINE (
+	 lhost=>registry_get ('dbp_lhost'),
+	 vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/sparql-auth',
+	 ppath => '/!sparql/',
+	 is_dav => 1,
+	 vsp_user => 'dba',
+	 opts => vector('noinherit', 1),
+	 auth_fn=>'DB.DBA.HP_AUTH_SPARQL_USER',
+	 realm=>'SPARQL',
+	 sec=>'digest');
+
+--# other init code
+
+create procedure ensure_demo_user ()
+{
+    if (exists (select 1 from SYS_USERS where U_NAME = 'demo'))
+	return;
+	exec ('create user "demo"');
+	DB.DBA.user_set_qualifier ('demo', 'Demo');
+};
+
+ensure_demo_user ();
+
+drop procedure ensure_demo_user;
+
+create procedure create_demo_home ()
+{
+  declare pwd any;
+  pwd := (select pwd_magic_calc (U_NAME, U_PASSWORD, 1) from SYS_USERS where U_NAME = 'dav');
+  DAV_COL_CREATE ('/DAV/home/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', pwd);
+  DAV_COL_CREATE ('/DAV/home/demo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', pwd);
+  DAV_COL_CREATE ('/DAV/home/demo/dbpedia/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', pwd);
+};
+
+create_demo_home ();
+drop procedure create_demo_home;
+
+create procedure upload_isparql ()
+{
+  declare base varchar;
+  declare pwd any;
+  pwd := (select pwd_magic_calc (U_NAME, U_PASSWORD, 1) from SYS_USERS where U_NAME = 'dav');
+  base := registry_get('_dbpedia_path_');
+  if (base like '/DAV/%')
+    {
+      for select RES_FULL_PATH from WS..SYS_DAV_RES where RES_FULL_PATH like base||'%.isparql' do
+	{
+	  DAV_COPY (RES_FULL_PATH, '/DAV/home/demo/dbpedia/', 0, '111101101NN', 'dav', 'administrators', 'dav', pwd);
+	}
+    }
+  else
+    {
+      declare arr any;
+      arr := sys_dirlist (base);
+      foreach (varchar f in arr) do
+	{
+	  if (f like '%.isparql')
+	    DAV_RES_UPLOAD ('/DAV/home/demo/dbpedia/'||f, file_to_string (base||f), '', '110100100R', http_dav_uid(), http_dav_gid(), 'dav', pwd);
+	}
+    }
+  -- the current trigger of isparql have bug
+  update WS..SYS_DAV_RES set RES_PERMS = '110100100NN' where RES_FULL_PATH like '/DAV/home/demo/dbpedia/%';
+}
+;
+
+upload_isparql ();
+drop procedure upload_isparql;
+
+
+--# void & iSPARQL non-default VDs
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/void');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/void/data');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/void/page');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/isparql');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/isparql/view');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/isparql/defaults');
+
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/void',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 ses_vars=>0,
+	 opts=>vector ('url_rewrite', 'dbpl_void_rule_list'),
+	 is_default_host=>0
+);
+
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/void/data',
+	 ppath=>'/DAV/VAD/dbpedia/',
+	 is_dav=>1,
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 opts=>vector ('url_rewrite', 'dbpl_void_data_rule_list'),
+	 is_default_host=>0
+);
+
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/void/page',
+	 ppath=>'/DAV/VAD/dbpedia/',
+	 is_dav=>1,
+	 ses_vars=>0,
+	 opts=>vector ('url_rewrite', 'dbpl_void_page_rule_list'),
+	 is_default_host=>0
+);
+    
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/isparql',
+	 ppath=>'/DAV/VAD/iSPARQL/',
+	 is_dav=>1,
+	 def_page=>'index.html',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 is_default_host=>0
+);
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/isparql/view',
+	 ppath=>'/DAV/VAD/iSPARQL/',
+	 is_dav=>1,
+	 def_page=>'execute.html',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 is_default_host=>0
+);
+DB.DBA.VHOST_DEFINE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/isparql/defaults',
+	 ppath=>'/DAV/VAD/iSPARQL/',
+	 is_dav=>1,
+	 def_page=>'defaults.vsp',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 is_default_host=>0
+);
+
+create procedure DB.DBA.SPARQL_DESC_DICT_DBPEDIA_PHYSICAL 
+(in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+{
+  declare res, subjs any;
+  res := DB.DBA.SPARQL_DESC_DICT (subj_dict, consts, good_graphs, bad_graphs, storage_name, options);
+  if (is_http_ctx ())
+    {
+      subjs := dict_to_vector (subj_dict, 0);
+      for (declare i int, i := 0; i < length (subjs); i := i + 2) 
+      {
+	declare s any;
+	s := subjs [i];
+	dict_put (res, vector (iri_to_id (HTTP_URL_HANDLER ()), iri_to_id ('http://xmlns.com/foaf/0.1/primaryTopic'), s), 1);
+	dict_put (res, vector (iri_to_id (HTTP_URL_HANDLER ()), iri_to_id ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), iri_to_id ('http://xmlns.com/foaf/0.1/Document')), 1);
+      }
+    }
+  return res;
+}
+;
+
+grant execute on DB.DBA.SPARQL_DESC_DICT_DBPEDIA_PHYSICAL to "SPARQL_SELECT";
+
+--# Facet browser on non-default vd
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/fct');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/fct/service');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/fct/soap');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/services/rdf/iriautocomplete.get');
+DB.DBA.VHOST_REMOVE ( lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), lpath=>'/describe');
+
+DB.DBA.VHOST_DEFINE (lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'), 
+    lpath=>'/fct', ppath=>'/DAV/VAD/fct/', 
+    is_dav=>1, def_page=>'facet.vsp', vsp_user=>'dba', ses_vars=>0, is_default_host=>0);
+
+
+DB.DBA.VHOST_DEFINE (lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/fct/service', ppath=>'/SOAP/Http/fct_svc',
+	 is_dav=>0, soap_user=>'dba', ses_vars=>0, is_default_host=>0);
+    
+DB.DBA.VHOST_DEFINE (lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/fct/soap', ppath=>'/SOAP/',
+	 is_dav=>0, soap_user=>'dba', ses_vars=>0, is_default_host=>0);
+
+DB.DBA.VHOST_DEFINE (lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/services/rdf/iriautocomplete.get', ppath=>'/SOAP/Http/IRI_AUTOCOMPLETE',
+	 is_dav=>0, soap_user=>'PROXY', ses_vars=>0, is_default_host=>0);
+
+DB.DBA.VHOST_DEFINE (lhost=>registry_get ('dbp_lhost'), vhost=>registry_get ('dbp_vhost'),
+	 lpath=>'/describe', ppath=>'/SOAP/Http/EXT_HTTP_PROXY_1',
+	 is_dav=>0, soap_user=>'PROXY', ses_vars=>0,
+	 opts=>vector ('url_rewrite', 'ext_fctabout_http_proxy_rule_list1'),
+	 is_default_host=>0);
+
+-- VoID VDs
+DB.DBA.VHOST_REMOVE (lpath=>'/void/data');
+DB.DBA.VHOST_DEFINE (lpath=>'/void/data', ppath=>registry_get('_dbpedia_path_'), is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba', opts=>vector ('url_rewrite', 'dbpl_void_data_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_void_data_rule_list', 1, vector ('dbpl_void_data_rule_1'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_void_data_rule_1', 1, '/void/data/(.*)\\.(n3|rdf|ttl)', vector ('par_1', 'fmt'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'%%2Fvoid%%2F&query='||dbp_gen_describe('void')||'&format=%U',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'fmt'), NULL, NULL, 2, null, '');
+
+-- HTML
+DB.DBA.VHOST_REMOVE (lpath=>'/void/page');
+DB.DBA.VHOST_DEFINE (lpath=>'/void/page', ppath=>registry_get('_dbpedia_path_'), is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 opts=>vector ('url_rewrite', 'dbpl_void_page_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_void_page_rule_list', 1, vector ('dbpl_void_page_rule_1'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_void_page_rule_1', 1, '/void/page/(.*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%%2Fvoid%%2F%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+
+-- IRIs
+DB.DBA.VHOST_REMOVE (lpath=>'/void');
+DB.DBA.VHOST_DEFINE (lpath=>'/void', ppath=>'/', is_dav=>0, def_page=>'', opts=>vector ('url_rewrite', 'dbpl_void_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_void_rule_list', 1,
+    vector ('dbpl_void_rule_1', 'dbpl_void_rule_2', 'dbpl_void_rule_3', 'dbpl_void_rule_4'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_void_rule_1', 1, '/void/(.*)\x24', vector ('par_1'), 1,
+    '/void/page/%s', vector ('par_1'), NULL, NULL, 2, 303, NULL);
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_void_rule_2', 1, '/void/(.*)\x24', vector ('par_1'), 1,
+    '/void/data/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_void_rule_3', 1, '/void/(.*)\x24', vector ('par_1'), 1,
+    '/void/data/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 2, 303, 'Content-Type: text/rdf+n3');
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_void_rule_4', 1, '/void/(.*)\x24', vector ('par_1'), 1,
+    '/void/data/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+TTLP (
+'
+ at prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+<http://dbpedia.org/ontology/deathPlace> owl:equivalentProperty <http://dbpedia.org/property/deathPlace> .
+<http://dbpedia.org/ontology/deathDate> owl:equivalentProperty <http://dbpedia.org/property/death> .
+<http://dbpedia.org/ontology/birthPlace> owl:equivalentProperty <http://dbpedia.org/property/birthPlace> .
+<http://dbpedia.org/ontology/birthDate> owl:equivalentProperty <http://dbpedia.org/property/birth> .
+<http://xmlns.com/foaf/0.1/givenName> owl:equivalentProperty <http://xmlns.com/foaf/0.1/givenname> .
+<http://purl.org/dc/terms/subject> owl:equivalentProperty <http://www.w3.org/2004/02/skos/core#subject> .
+<http://dbpedia.org/ontology/wikiPageID> owl:equivalentProperty <http://dbpedia.org/property/pageId> .
+<http://dbpedia.org/ontology/wikiPageRevisionID> owl:equivalentProperty <http://dbpedia.org/property/revisionId> .
+<http://dbpedia.org/ontology/wikiPageWikiLink> owl:equivalentProperty <http://dbpedia.org/property/wikilink> .
+<http://dbpedia.org/ontology/wikiPageExternalLink> owl:equivalentProperty <http://dbpedia.org/property/reference> .
+<http://dbpedia.org/ontology/wikiPageRedirects> owl:equivalentProperty <http://dbpedia.org/property/redirect> .
+<http://dbpedia.org/ontology/wikiPageDisambiguates> owl:equivalentProperty <http://dbpedia.org/property/disambiguates> .
+', '', 'http://dbpedia.org/schema/property_rules#');
+
diff --git a/binsrc/dbpedia/dbpedia_local.sql b/binsrc/dbpedia/dbpedia_local.sql
new file mode 100644
index 0000000..48616a5
--- /dev/null
+++ b/binsrc/dbpedia/dbpedia_local.sql
@@ -0,0 +1,471 @@
+--
+--  $Id: dbpedia_local.sql,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+create procedure dbp_setup ()
+{
+--# if utf-8 iri's are used
+  if (not isstring(registry_get ('dbp_decode_iri')))
+    registry_set ('dbp_decode_iri','off');
+
+--# the resource domain e.g. http://(xx.)dbpedia.org/resource/...
+  if (not isstring(registry_get('dbp_domain')))
+    registry_set('dbp_domain','http://dbpedia.org');
+
+--# the default graph
+  if (not isstring(registry_get ('dbp_graph')))
+    registry_set ('dbp_graph', 'http://dbpedia.org');
+
+--#
+  if (not isstring(registry_get ('dbp_lang')))
+    registry_set ('dbp_lang', 'en');
+
+--# fix for dbp_replace
+  if (not isstring(registry_get ('dbp_DynamicLocal')))
+    registry_set ('dbp_DynamicLocal', 'on');
+
+--# to create the prefix category:
+  if (not isstring(registry_get ('dbp_category')))
+    registry_set('dbp_category', 'Category');
+
+  if (not isstring(registry_get ('dbp_imprint')))
+    registry_set ('dbp_imprint', 'http://wiki.dbpedia.org/Imprint');
+
+--# in order to remove and set the rules automatically
+  if (not isstring(registry_get ('dbp_website') ))
+    registry_set('dbp_website','http://wiki.dbpedia.org/');
+
+  if (not isstring(registry_get ('dbp_lhost') ))
+    registry_set ('dbp_lhost', ':80');
+
+  if (not isstring(registry_get ('dbp_vhost') ))
+    registry_set ('dbp_vhost', 'dbpedia.org');
+};
+
+dbp_setup ();
+
+create procedure dbp_replace (in o any)
+{
+--# changed 'http://dbpedia.org to dbp domain since local: works with server domain
+  declare ret any;
+  if (isiri_id (o))
+   {
+     if (registry_get('dbp_DynamicLocal') = 'off')
+       return  iri_to_id(o);
+     else
+       return  iri_to_id  (replace (id_to_iri (o), registry_get('dbp_domain'), 'local:'));
+   }
+  else if (__box_flags (o) = 1)
+    {
+
+      if (registry_get('dbp_DynamicLocal') = 'off')
+        ret:= o;
+      else
+        ret  := replace (o, registry_get('dbp_domain'), 'local:');
+
+      __box_flags_set (ret, 1);
+      return ret;
+    }
+  return o;
+}
+;
+
+grant execute on dbp_replace to SPARQL_SELECT;
+
+create procedure DB.DBA.SPARQL_DESC_DICT_DBPEDIA_ODATA_PHYSICAL 
+(in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+{
+  declare res, arr, ret any;
+  res := DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (subj_dict, consts, good_graphs, bad_graphs, storage_name, options);
+  ret := dict_new ();
+  arr := dict_to_vector (res, 1);
+  for (declare i int, i := 0; i < length (arr); i := i + 2) 
+    {
+      dict_put (ret, vector (dbp_replace (arr[i][0]), dbp_replace (arr[i][1]), dbp_replace (arr[i][2])), 0); 
+    }
+  return ret;
+}
+;
+
+grant execute on DB.DBA.SPARQL_DESC_DICT_DBPEDIA_ODATA_PHYSICAL to "SPARQL_SELECT";
+
+create procedure dbp_gen_describe (in path varchar)
+{
+  declare qr varchar;
+  qr :=
+	'prefix owl: <http://www.w3.org/2002/07/owl#> CONSTRUCT { <local:/IRI/PH> `sql:dbp_replace (?p1)` `sql:dbp_replace (?o1)` . '||
+  	'`sql:dbp_replace (?s2)` `sql:dbp_replace (?p2)` <local:/IRI/PH> . <local:/IRI/PH> owl:sameAs <http://dbpedia.org/IRI/PH> . } '||
+  	'WHERE { { <http://dbpedia.org/IRI/PH> ?p1 ?o1 } UNION { ?s2 ?p2 <http://dbpedia.org/IRI/PH> } }';
+  if (registry_get('dbp_DynamicLocal') = 'off')
+    {
+      qr := replace (qr, 'local:', registry_get('dbp_domain'));
+    }
+  qr := replace (qr, 'IRI', path);
+  qr := sprintf ('%U', qr);
+  qr := replace (qr, '%', '%%');
+  qr := replace (qr, 'PH', '%U');
+  return qr;
+}
+;
+
+-- XXX : to be removed
+--registry_set('_dbpedia_path_', '/dbpedia/');
+--registry_set('_dbpedia_dav_', '0');
+
+-- Base
+
+DB.DBA.VHOST_REMOVE (lpath=>registry_get('_dbpedia_path_'));
+DB.DBA.VHOST_DEFINE (lpath=>rtrim (registry_get('_dbpedia_path_'), '/'), ppath=>registry_get('_dbpedia_path_'),
+    is_dav=>atoi (registry_get('_dbpedia_dav_')), vsp_user=>'dba');
+
+-- CSS, images etc.
+DB.DBA.VHOST_REMOVE (lpath=>'/statics');
+DB.DBA.VHOST_DEFINE (lpath=>'/statics', ppath=>registry_get('_dbpedia_path_')||'statics/',
+    is_dav=>atoi (registry_get('_dbpedia_dav_')));
+
+-- Classes
+DB.DBA.VHOST_REMOVE (lpath=>'/class');
+DB.DBA.VHOST_DEFINE (lpath=>'/class',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbpl_class_rule_list')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_class_rule_list', 1, vector ('dbpl_class_rule_1', 'dbpl_class_rule_2', 'dbpl_class_rule_3', 'dbpl_class_rule_4'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_class_rule_1', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_class_rule_2', 1, '/class/(.*)\x24', vector ('par_1'), 1,
+'/data2/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_class_rule_3', 1, '/class/(.*)\x24', vector ('par_1'), 1,
+'/data2/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 1, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_class_rule_4', 1, '/class/(.*)\x24', vector ('par_1'), 1,
+'/data2/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+
+-- OWL
+DB.DBA.VHOST_REMOVE (lpath=>'/ontology');
+DB.DBA.VHOST_DEFINE (lpath=>'/ontology', ppath=>'/', is_dav=>0, def_page=>'', opts=>vector ('url_rewrite', 'dbpl_owl_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_owl_rule_list', 1, vector ('dbpl_owl_rule_1', 'dbpl_owl_rule_2', 'dbpl_owl_rule_3', 'dbpl_owl_rule_4'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_owl_rule_1', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_owl_rule_2', 1, '/ontology/(.*)\x24', vector ('par_1'), 1,
+'/data3/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_owl_rule_3', 1, '/ontology/(.*)\x24', vector ('par_1'), 1,
+'/data3/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 1, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_owl_rule_4', 1, '/ontology/(.*)\x24', vector ('par_1'), 1,
+'/data3/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+-- RDF link
+create procedure DB.DBA.DBP_GRAPH_PARAM (in par varchar, in fmt varchar, in val varchar)
+{
+  declare tmp any;
+  tmp := sprintf ('default-graph-uri=%U', registry_get ('dbp_graph'));
+  if (par = 'gr')
+    {
+      val := trim (val, '/');
+      if (length (val) = 0)
+	val := '';
+      if (val = 'en')
+        val := '';  
+      if (val <> '')
+	{
+          val := 'http://' || val || '.dbpedia.org';	
+	  tmp := tmp || sprintf ('&named-graph-uri=%U', val);
+	}
+    }
+  else
+    tmp := val;
+  return sprintf (fmt, tmp);
+}
+;
+
+DB.DBA.VHOST_REMOVE (lpath=>'/data');
+DB.DBA.VHOST_DEFINE (lpath=>'/data', ppath=>registry_get('_dbpedia_path_'), is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba', opts=>vector ('url_rewrite', 'dbpl_data_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_data_rule_list', 1, vector ('dbpl_data_rule_0', 'dbpl_data_rule_1', 'dbpl_data_rule_2', 'dbpl_data_rule_3', 'dbpl_data_rule_4', 'dbpl_data_rule_5', 'dbpl_data_rule_6', 'dbpl_data_rule_7', 'dbpl_data_rule_8', 'dbpl_data_rule_9', 'dbpl_data_rule_10'));
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_0', 1, '/data/([a-z_\\-]*/)?(.*)', vector ('gr', 'par_1'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=rdf',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_1', 1, '/data/([a-z_\\-]*/)?(.*)', vector ('gr', 'par_1'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=%U',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', '*accept*'), 'DB.DBA.DBP_GRAPH_PARAM', 
+				'(application/rdf.xml)|(text/rdf.n3)', 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_2', 1, '/data/([a-z_\\-]*/)?(.*)\\.(rdf|ttl)', vector ('gr', 'par_1', 'fmt'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=%U',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'fmt'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_3', 1, '/data/([a-z_\\-]*/)?(.*)\\.(jrdf)', vector ('gr', 'par_1', 'fmt'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=application%%2Frdf%%2Bjson',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_4', 1, '/data/([a-z_\\-]*/)?(.*)\\.(json)', vector ('gr', 'par_1', 'fmt'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=application%%2Fjson',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_5', 1, '/data/([a-z_\\-]*/)?(.*)\\.(xml)', vector ('gr', 'par_1', 'fmt'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=rdf',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+--DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_6', 1, '/data/([a-z_\\-]*/)?(.*)\\.(atom)', vector ('gr', 'par_1', 'fmt'), 1,
+--'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=application%%2Fatom%%2Bxml',
+--vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_6', 1, '/data/([a-z_\\-]*/)?(.*)\\.(atom)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA_ODATA"+DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fresource%%2F%s%%3E&output=application%%2Fatom%%2Bxml',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_7', 1, '/data/([a-z_\\-]*/)?(.*)\\.(n3)', vector ('gr', 'par_1', 'fmt'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=text%%2Fn3',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_8', 1, '/data/([a-z_\\-]*/)?(.*)\\.(nt)', vector ('gr', 'par_1', 'fmt'), 1,
+'/sparql?%s&query='||dbp_gen_describe('resource')||'&format=text%%2Frdf%%2Bn3',
+vector ('gr', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_9', 1, '/data/([a-z_\\-]*/)?(.*)\\.(jsod)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA_ODATA"+DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fresource%%2F%U%%3E&output=application%%2Fodata%%2Bjson',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data_rule_10', 1, '/data/([a-z_\\-]*/)?(.*)\\.(ntriples)', vector ('gr', 'par_1', 'f'), 1,
+'/sparql?%s&query=define+sql:describe-mode+"DBPEDIA_ODATA"+DESCRIBE+%%3Chttp%%3A%%2F%%2Fdbpedia.org%%2Fresource%%2F%U%%3E&output=text%%2Fplain',
+vector ('gr', 'par_1'), 'DB.DBA.DBP_GRAPH_PARAM1', NULL, 2, null, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+
+-- OWL link
+DB.DBA.VHOST_REMOVE (lpath=>'/data2');
+DB.DBA.VHOST_DEFINE (lpath=>'/data2', ppath=>registry_get('_dbpedia_path_'), is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba', opts=>vector ('url_rewrite', 'dbpl_data2_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_data2_rule_list', 1, vector ('dbpl_data2_rule_1'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data2_rule_1', 1, '/data2/(.*)\\.(n3|rdf|ttl)', vector ('par_1', 'fmt'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query='||dbp_gen_describe('class')||'&format=%U',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'fmt'), NULL, NULL, 2, null, '');
+
+-- Property link
+DB.DBA.VHOST_REMOVE (lpath=>'/data3');
+DB.DBA.VHOST_DEFINE (lpath=>'/data3', ppath=>registry_get('_dbpedia_path_'), is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba', opts=>vector ('url_rewrite', 'dbpl_data3_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_data3_rule_list', 1, vector ('dbpl_data3_rule_1', 'dbpl_data3_rule_2', 'dbpl_data3_rule_3'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data3_rule_1', 1, '/data3/(.*)\\.(n3|rdf|ttl)', vector ('par_1', 'fmt'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query='||dbp_gen_describe ('ontology')||'&format=%U',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'fmt'), NULL, NULL, 2, null, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data3_rule_2', 1, '/data3/(.*)\\.atom', vector ('par_1'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query='||dbp_gen_describe ('ontology')||'&format=application%%2Fatom%%2Bxml',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), NULL, NULL, 2, null, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data3_rule_3', 1, '/data3/(.*)\\.ntriples', vector ('par_1'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query='||dbp_gen_describe ('ontology')||'&format=text%%2Fplain',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1'), NULL, NULL, 2, null, '');
+
+
+-- HTML
+DB.DBA.VHOST_REMOVE (lpath=>'/page');
+DB.DBA.VHOST_DEFINE (lpath=>'/page', ppath=>registry_get('_dbpedia_path_'), is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 opts=>vector ('url_rewrite', 'dbpl_page_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_page_rule_list', 1, vector ('dbpl_page_rule_1'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_page_rule_1', 1, '(/[^#\\?]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+-- IRIs
+DB.DBA.VHOST_REMOVE (lpath=>'/category');
+DB.DBA.VHOST_DEFINE (lpath=>'/category', ppath=>'/', is_dav=>0, def_page=>'', opts=>vector ('url_rewrite', 'dbpl_category_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_category_rule_list', 1,
+    vector ('dbpl_category_rule_1', 'dbpl_category_rule_2'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_category_rule_1', 1, '/category/(.*)\x24', vector ('par_1'), 1,
+    '/page/%s', vector ('par_1'), NULL, NULL, 2, 303, NULL);
+
+create procedure DB.DBA.DBP_DATA_IRI (in par varchar, in fmt varchar, in val varchar)
+{
+  if (par = 'par_2' and length (val))
+    {
+      declare arr any;
+      arr := split_and_decode (val);
+      if (length (arr) > 1 and arr[1] <> 'en')
+	return sprintf (fmt, arr[1] || '/');
+      val := '';
+    }
+  return sprintf (fmt, val);
+}
+;
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_category_rule_2', 1, '/category/([^\\?]*)(\\?lang=.*)?\x24', vector ('par_1', 'par_2'), 1,
+    '/data/%s at __@%s', vector ('par_2', 'par_1'), 'DB.DBA.DBP_DATA_IRI', 
+    '(application/rdf.xml)|(text/rdf.n3)|(application/x-turtle)|(application/rdf.json)|(application/json)', 2, 303, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'dbpl_category_rule_list';
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_category_rule_list', '@__@(.*)', '/data/\x241.xml', 'application/rdf+xml', 0.95, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_category_rule_list', '@__@(.*)', '/data/\x241.n3',  'text/rdf+n3', 0.80, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_category_rule_list', '@__@(.*)', '/data/\x241.ttl',  'application/x-turtle', 0.70, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_category_rule_list', '@__@(.*)', '/data/\x241.json',  'application/json', 0.60, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_category_rule_list', '@__@(.*)', '/data/\x241.jrdf',  'application/rdf+json', 0.60, location_hook=>null);
+
+DB.DBA.VHOST_REMOVE (lpath=>'/resource');
+DB.DBA.VHOST_DEFINE (lpath=>'/resource', ppath=>'/', is_dav=>0, def_page=>'', opts=>vector ('url_rewrite', 'dbpl_resource_rule_list'));
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_resource_rule_list', 1,
+    vector ('dbpl_resource_rule_1', 'dbpl_resource_rule_2'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_resource_rule_1', 1, '/resource/(.*)\x24', vector ('par_1'), 1,
+    '/page/%s', vector ('par_1'), NULL, NULL, 2, 303, NULL);
+
+create procedure DB.DBA.DBP_DATA_IRI (in par varchar, in fmt varchar, in val varchar)
+{
+  if (par = 'par_2' and length (val))
+    {
+      declare arr any;
+      arr := split_and_decode (val);
+      if (length (arr) > 1 and arr[1] <> 'en' and length (arr[1]))
+	return sprintf (fmt, arr[1] || '/');
+      val := '';
+    }
+  return sprintf (fmt, val);
+}
+;
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_resource_rule_2', 1, '/resource/([^\\?]*)(\\?lang=.*)?\x24', vector ('par_1', 'par_2'), 1,
+    '/data/%s at __@%s', vector ('par_2', 'par_1'), 'DB.DBA.DBP_DATA_IRI', 
+    '(application/rdf.xml)|(text/rdf.n3)|(text/n3)|(application/x-turtle)|(application/rdf.json)|(application/json)|(application/atom.xml)|(application/odata.json)', 2, 303, '^{sql:DB.DBA.DBP_LINK_HDR}^');
+
+delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'dbpl_resource_rule_list';
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.xml', 'application/rdf+xml', 0.95, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.n3',  'text/n3', 0.80, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.nt',  'text/rdf+n3', 0.80, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.ttl',  'application/x-turtle', 0.70, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.json',  'application/json', 0.60, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.jrdf',  'application/rdf+json', 0.60, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.atom',  'application/atom+xml', 0.50, location_hook=>null);
+DB.DBA.HTTP_VARIANT_ADD ('dbpl_resource_rule_list', '@__@(.*)', '/data/\x241.jsod',  'application/odata+json', 0.50, location_hook=>null);
+
+-- Wikicompany
+--DB.DBA.VHOST_REMOVE (lpath=>'/wikicompany/resource');
+--DB.DBA.VHOST_DEFINE (lpath=>'/wikicompany/resource', ppath=>'/DAV/wikicompany/resource/', is_dav=>1, vsp_user=>'dba',
+--	 opts=>vector ('url_rewrite', 'dbpl_wc_rule_list'));
+--DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_wc_rule_list', 1, vector ('dbpl_wc_rule1', 'dbpl_wc_rule2'));
+--DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_wc_rule1', 1, '(/[^#]*)', vector ('par_1'), 1,
+--registry_get('_dbpedia_path_')||'description_white.vsp?res=%s', vector ('par_1'), NULL, NULL, 2, 0, '');
+--DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_wc_rule2', 1, '(/[^#]*)', vector ('par_1'), 1,
+--'/sparql?query=DESCRIBE%%20%%3Chttp%%3A%%2F%%2Fdbpedia.openlinksw.com%s%%3E%%20from%%20%%3Chttp%%3A%%2F%%2Fdbpedia.openlinksw.com%%2Fwikicompany%%3E&format=%U',
+--vector ('par_1', '*accept*'), NULL, '(application/rdf.xml)|(text/rdf.n3)', 2, 303, '');
+
+-- Property
+DB.DBA.VHOST_REMOVE (lpath=>'/property');
+DB.DBA.VHOST_DEFINE (lpath=>'/property',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbpl_prop_rule_list')
+);
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_prop_rule_list', 1, vector ('dbpl_prop_rule_1', 'dbpl_prop_rule_2', 'dbpl_prop_rule_3', 'dbpl_prop_rule_4'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_prop_rule_1', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_prop_rule_2', 1, '/property/(.*)\x24', vector ('par_1'), 1,
+'/data4/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_prop_rule_3', 1, '/property/(.*)\x24', vector ('par_1'), 1,
+'/data4/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 1, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_prop_rule_4', 1, '/property/(.*)\x24', vector ('par_1'), 1,
+'/data4/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+-- RDF for property
+DB.DBA.VHOST_REMOVE (lpath=>'/data4');
+DB.DBA.VHOST_DEFINE (lpath=>'/data4',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'dbpl_data4_rule_list')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_data4_rule_list', 1, vector ('dbpl_data4_rule_1'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data4_rule_1', 1, '/data4/(.*)\\.(n3|rdf|ttl)', vector ('par_1', 'fmt'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query='||dbp_gen_describe ('property')||'&format=%U',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'fmt'), NULL, NULL, 2, null, '');
+
+
+-- Meta
+DB.DBA.VHOST_REMOVE (lpath=>'/meta');
+DB.DBA.VHOST_DEFINE (lpath=>'/meta',
+	 ppath=>'/',
+	 is_dav=>0,
+	 def_page=>'',
+	 opts=>vector ('url_rewrite', 'dbpl_meta_rule_list')
+);
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_meta_rule_list', 1, vector ('dbpl_meta_rule_1', 'dbpl_meta_rule_2', 'dbpl_meta_rule_3', 'dbpl_meta_rule_4'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_meta_rule_1', 1, '(/[^#]*)', vector ('par_1'), 1,
+registry_get('_dbpedia_path_')||'description.vsp?res=%U', vector ('par_1'), NULL, NULL, 0, 0, '');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_meta_rule_2', 1, '/meta/(.*)\x24', vector ('par_1'), 1,
+'/data5/%s.rdf', vector ('par_1'), NULL, 'application/rdf.xml', 2, 303, 'Content-Type: application/rdf+xml');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_meta_rule_3', 1, '/meta/(.*)\x24', vector ('par_1'), 1,
+'/data5/%s.n3', vector ('par_1'), NULL, 'text/rdf.n3', 1, 303, 'Content-Type: text/rdf+n3');
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_meta_rule_4', 1, '/meta/(.*)\x24', vector ('par_1'), 1,
+'/data5/%s.n3', vector ('par_1'), NULL, 'application/x-turtle', 2, 303, 'Content-Type: application/x-turtle');
+
+-- RDF for meta
+DB.DBA.VHOST_REMOVE (lpath=>'/data5');
+DB.DBA.VHOST_DEFINE (lpath=>'/data5',
+	 ppath=>registry_get('_dbpedia_path_'),
+	 is_dav=>atoi (registry_get('_dbpedia_dav_')),
+	 vsp_user=>'dba',
+	 opts=>vector ('url_rewrite', 'dbpl_data5_rule_list')
+);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ( 'dbpl_data5_rule_list', 1, vector ('dbpl_data5_rule_1'));
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ( 'dbpl_data5_rule_1', 1, '/data5/(.*)\\.(n3|rdf|ttl)', vector ('par_1', 'fmt'), 1,
+'/sparql?default-graph-uri=http%%3A%%2F%%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query='||dbp_gen_describe ('meta')||'&format=%U',
+vector ('par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'par_1', 'fmt'), NULL, NULL, 2, null, '');
+
+
+create procedure dbpl_robots ()
+{
+  if (not isstring (http_root () || '/robots.txt'))
+    {
+      declare exit handler for sqlstate '*' {
+	return;
+      };
+      string_to_file (http_root () || '/robots.txt', 'User-agent: *\r\nDisallow: /\r\n', -2);
+    }
+}
+;
+
+dbpl_robots ()
+;
+
+
diff --git a/binsrc/dbpedia/make_vad.sh b/binsrc/dbpedia/make_vad.sh
new file mode 100755
index 0000000..d2ef43c
--- /dev/null
+++ b/binsrc/dbpedia/make_vad.sh
@@ -0,0 +1,457 @@
+#!/bin/sh
+#
+#  $Id: make_vad.sh,v 1.1.2.2 2012/03/02 12:43:27 source Exp $
+#
+#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+#  project.
+#
+#  Copyright (C) 1998-2012 OpenLink Software
+#
+#  This project 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; only version 2 of the License, dated June 1991.
+#
+#  This program 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
+#  General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License along
+#  with this program; if not, write to the Free Software Foundation, Inc.,
+#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+# check version_init procedure below
+
+# ----------------------------------------------------------------------
+#  Fix issues with LOCALE
+# ----------------------------------------------------------------------
+LANG=C
+LC_ALL=POSIX
+export LANG LC_ALL
+
+VERSION="1.00.00"
+LOGDIR=`pwd`
+STICKER_DAV="vad_dav.xml"
+STICKER_FS="vad_fs.xml"
+PACKDATE=`date +"%Y-%m-%d %H:%M"`
+SERVER=${SERVER-}
+THOST=${THOST-localhost}
+TPORT=${TPORT-8445}
+PORT=${PORT-1940}
+ISQL=${ISQL-isql}
+VAD_NAME="dbpedia"
+VAD_PKG_NAME="dbpedia"
+VAD_DESC="DBpedia"
+LOGFILE="${LOGDIR}/make_"$VAD_PKG_NAME"_vad.log"
+VAD_NAME_DEVEL="$VAD_PKG_NAME"_filesystem.vad
+VAD_NAME_RELEASE="$VAD_PKG_NAME"_dav.vad
+NEED_VERSION=05.00.3028
+HOST=localhost
+DSN="$PORT"
+HOST_OS=`uname -s | grep WIN`
+if [ "x$HOST_OS" != "x" ]
+then
+TEMPFILE="`cygpath -m $TMP/isql.$$`"
+if [ "x$SRC" != "x" ]
+then
+HOME=$SRC
+else
+HOME="`cygpath -m $HOME`"
+fi
+LN="cp -rf"
+RM="rm -rf"
+else
+TEMPFILE=/tmp/isql.$$
+LN="ln -fs"
+RM="rm -f"
+fi
+VOS=0
+if [ -f $HOME/autogen.sh ]
+then
+    VOS=1
+fi
+
+if [ "z$SERVER" = "z" ]  
+then
+    if [ "x$HOST_OS" != "x" ]
+    then
+    SERVER=virtuoso-odbc-t.exe
+    else
+    SERVER=virtuoso
+    fi
+fi
+
+. $HOME/binsrc/tests/suite/test_fn.sh
+
+if [ -f /usr/xpg4/bin/rm ]
+then
+  myrm=/usr/xpg4/bin/rm
+else
+  myrm=rm
+fi
+
+version_init() 
+{
+  if [ $VOS -eq 1 ]
+  then
+      if [ -f vad_version ]
+      then
+      VERSION=`cat vad_version`
+      else
+        LOG "The vad_version does not exist, please verify your checkout"    
+    exit 1
+      fi
+  else  
+      rm -f version.tmp
+      for i in `find . -name 'Entries' | grep -v "vad/"`; do
+      cat $i | grep "^[^D].*" | cut -f 3 -d "/" | sed -e "s/1\.//g" >> version.tmp
+      done
+      VERSION=`cat version.tmp | awk ' BEGIN { cnt=1 } { cnt = cnt + $1 } END { printf "1.%02.02f", cnt/100 }'`
+      rm -f version.tmp
+      echo "$VERSION" > vad_version
+  fi
+}
+
+do_command_safe () {
+  _dsn=$1
+  command=$2
+  shift
+  shift
+  echo "+ " $ISQL $_dsn dba dba ERRORS=STDOUT VERBOSE=OFF PROMPT=OFF "EXEC=$command" $* >> $LOGFILE
+  $ISQL $_dsn dba dba ERRORS=STDOUT VERBOSE=OFF PROMPT=OFF "EXEC=$command" $* 2>&1 > "${LOGFILE}.tmp"
+  if test $? -ne 0
+  then
+    cat "${LOGFILE}.tmp" >> ${LOGFILE}
+    LOG "***FAILED: starting $command"
+  else
+    if egrep '^\*\*\*' "${LOGFILE}.tmp" > /dev/null
+    then
+      LOG "***FAILED: execution of $command"
+      msg=`cat ${LOGFILE}.tmp`
+      echo "------------ SQL ERROR -------------"
+      echo "$msg"
+      echo "------------------------------------"
+      echo "------------ SQL ERROR -------------"   >> $LOGFILE
+      echo "$msg"   >> $LOGFILE
+      echo "------------------------------------"   >> $LOGFILE
+    else
+      LOG "PASSED: $command"
+    fi
+  fi
+  rm "${LOGFILE}.tmp" 2>/dev/null
+}
+
+do_command() {
+  _dsn=$1
+  command=$2
+  shift
+  shift
+  echo "+ " $ISQL $_dsn dba dba ERRORS=STDOUT VERBOSE=OFF PROMPT=OFF "EXEC=$command" $* >> $LOGFILE
+  $ISQL $_dsn dba dba ERRORS=STDOUT VERBOSE=OFF PROMPT=OFF "EXEC=$command" $* >> $LOGFILE
+  if test $? -ne 0
+  then
+    LOG "***FAILED: $command"
+  else
+    LOG "PASSED: $command"
+  fi
+}
+
+directory_clean() {
+  $myrm -rf vad 2>/dev/null
+  $myrm -rf vad.* 2>/dev/null
+  $myrm -rf make_vad.log 2>/dev/null
+  $myrm -rf virtuoso.db 2>/dev/null
+  $myrm -rf virtuoso.trx 2>/dev/null
+  $myrm -rf virtuoso.tdb 2>/dev/null
+  $myrm -rf virtuoso.log 2>/dev/null
+  $myrm -rf virtuoso.ini 2>/dev/null
+}
+
+directory_init() {
+  mkdir vad
+  mkdir vad/code
+  mkdir vad/code/dbpedia
+  mkdir vad/vsp
+  mkdir vad/vsp/dbpedia
+  mkdir vad/vsp/dbpedia/statics
+  mkdir vad/vsp/dbpedia/images
+  mkdir vad/vsp/dbpedia/style
+
+  cd vsp > /dev/null 2>&1
+  for f in `find . -type f | grep -v "/CVS/" | grep -v "\.sql" `
+  do
+     #echo $f
+     cp $f ../vad/vsp/dbpedia/$f  
+  done
+  cd .. > /dev/null 2>&1
+
+  cp dbpedia_init.sql vad/code/dbpedia
+  cp dbpedia_local.sql vad/code/dbpedia
+  [ -d demo ] && cp demos/*.isparql vad/code/dbpedia
+  cp vsp/*.sql vad/code/dbpedia
+}
+
+virtuoso_start() {
+  ddate=`date`
+  starth=`date | cut -f 2 -d :`
+  starts=`date | cut -f 3 -d :|cut -f 1 -d " "`
+  timeout=600
+  $myrm -f *.lck
+  if [ "z$HOST_OS" != "z" ] 
+  then
+      "$SERVER" +foreground &
+  else
+      "$SERVER" +wait
+  fi
+  stat="true"
+  while true
+  do
+    sleep 4
+    echo "Waiting Virtuoso Server start on port $PORT..."
+    stat=`netstat -an | grep "[\.\:]$PORT " | grep LISTEN`
+    if [ "z$stat" != "z" ]
+        then
+      sleep 7
+      LOG "PASSED: Virtuoso Server successfully started on port $PORT"
+      return 0
+    fi
+    nowh=`date | cut -f 2 -d :`
+    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
+    nowh=`expr $nowh - $starth`
+    nows=`expr $nows - $starts`
+    nows=`expr $nows + $nowh \*  60`
+    if test $nows -ge $timeout
+    then
+      LOG "***FAILED: Could not start Virtuoso Server within $timeout seconds"
+      exit 1
+    fi
+  done
+}
+
+virtuoso_shutdown() {
+  LOG "Shutdown Virtuoso Server..."
+  $ISQL $DSN dba dba ERRORS=STDOUT VERBOSE=OFF PROMPT=OFF "EXEC=raw_exit();" $* >/dev/null
+  #sleep 10
+}
+
+sticker_init() {
+  ISDAV=$1
+  if [ "$ISDAV" = "1" ] ; then
+    BASE_PATH_HTTP="/DAV/VAD/"
+    BASE_PATH_CODE="/DAV/VAD/"
+    TYPE="dav"
+    STICKER=$STICKER_DAV
+    PPATH="/DAV/VAD/$VAD_NAME/"
+    DPPATH="/DAV/VAD"
+  else
+    BASE_PATH_HTTP="./vad/vsp/"
+    BASE_PATH_CODE="./vad/vsp/"
+    TYPE="http"
+    STICKER=$STICKER_FS
+    PPATH="/vad/vsp/$VAD_NAME/"
+    DPPATH="/vad/vsp"
+  fi
+  LOG "VAD Sticker $STICKER creation..."
+  echo "<?xml version=\"1.0\" encoding=\"ASCII\"?>" > $STICKER
+  echo "<!DOCTYPE sticker SYSTEM \"vad_sticker.dtd\">" >> $STICKER
+  echo "<sticker version=\"1.0.010505A\" xml:lang=\"en-UK\">" >> $STICKER
+  echo "<caption>" >> $STICKER
+  echo "  <name package=\"$VAD_NAME\">" >> $STICKER
+  echo "    <prop name=\"Title\" value=\"$VAD_DESC\"/>" >> $STICKER
+  echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
+  echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
+  echo "  </name>" >> $STICKER
+  echo "  <version package=\"$VERSION\">" >> $STICKER
+  echo "    <prop name=\"Release Date\" value=\"$PACKDATE\"/>" >> $STICKER
+  echo "    <prop name=\"Build\" value=\"Release, optimized\"/>" >> $STICKER
+  echo "  </version>" >> $STICKER
+  echo "</caption>" >> $STICKER
+  echo "<dependencies>" >> $STICKER
+  echo "</dependencies>" >> $STICKER
+  echo "<procedures uninstallation=\"supported\">" >> $STICKER
+  echo "  <sql purpose=\"pre-install\"><![CDATA[" >> $STICKER
+  echo "    if (lt (sys_stat ('st_dbms_ver'), '$NEED_VERSION')) " >> $STICKER
+  echo "      { " >> $STICKER
+  echo "         result ('ERROR', 'The $VAD_DESC package requires server version $NEED_VERSION or greater'); " >> $STICKER
+  echo "     signal ('FATAL', 'The $VAD_DESC package requires server version $NEED_VERSION or greater'); " >> $STICKER
+  echo "      } " >> $STICKER
+  echo "  ]]></sql>" >> $STICKER
+  echo "  <sql purpose=\"post-install\">" >> $STICKER
+  echo "    ; " >> $STICKER
+  echo "  </sql>" >> $STICKER
+  echo "</procedures>" >> $STICKER
+  echo "<ddls>" >> $STICKER
+  echo "  <sql purpose=\"post-install\">" >> $STICKER
+  echo "    <![CDATA[" >> $STICKER
+  echo "        set_qualifier ('DB');" >> $STICKER
+if [ "$ISDAV" = "1" ] ; then
+  echo "    registry_set('_"$VAD_NAME"_path_', '/DAV/VAD/$VAD_NAME/');" >> $STICKER
+else
+  echo "    registry_set('_"$VAD_NAME"_path_', '/vad/vsp/$VAD_NAME/');" >> $STICKER
+fi
+  echo "    registry_set('_"$VAD_NAME"_dav_', '$ISDAV');" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/dbpedia_local.sql', 0, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/dbpedia_init.sql', 0, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/description.sql', 0, 'report', $ISDAV);" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://dbpedia.org/resource/inference/rules/dbpedia#', 'http://dbpedia.org/resource/classes#');" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://dbpedia.org/resource/inference/rules/umbel#', 'http://dbpedia.org/resource/classes/umbel#');" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://dbpedia.org/resource/inference/rules/yago#', 'http://dbpedia.org/resource/classes/yago#');" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://dbpedia.org/resource/inference/rules/opencyc#', 'http://dbpedia.org/resource/classes/opencyc#');" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://dbpedia.org/schema/property_rules#', 'http://dbpedia.org/schema/property_rules#');" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://www.ontologyportal.org/inference/rules/SUMO#', 'http://www.ontologyportal.org/SUMO#');" >> $STICKER
+  echo "    RDFS_RULE_SET ('http://www.ontologyportal.org/inference/rules/WordNet#', 'http://www.ontologyportal.org/WordNet#');" >> $STICKER
+  echo "    ]]>" >> $STICKER
+  echo "  </sql>" >> $STICKER
+  echo "  <sql purpose='pre-uninstall'>" >> $STICKER
+  echo "    <![CDATA[" >> $STICKER
+  echo "    ;" >> $STICKER
+  echo "    ]]>" >> $STICKER
+  echo "  </sql>" >> $STICKER
+#  echo "  <sql purpose='post-uninstall'>" >> $STICKER
+#  echo "  </sql>" >> $STICKER
+  echo "</ddls>" >> $STICKER
+  echo "<resources>" >> $STICKER
+
+  echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/dbpedia_init.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
+  echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/dbpedia_local.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
+  echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/description.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
+
+  if test -d demos
+  then
+      cd demos >/dev/null 2>&1
+      for file in `find . -type f -print | grep -v CVS | sort | cut -b3-`
+      do
+	  echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/$file\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> ../$STICKER
+      done
+      cd .. >/dev/null 2>&1
+  fi
+
+  cd vsp >/dev/null 2>&1
+  for file in `find . -type f -print | grep -v CVS | grep -v ".sql" | sort | cut -b3-`
+  do
+      echo "  <file type=\"$TYPE\" source=\"http\" target_uri=\"$VAD_NAME/$file\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> ../$STICKER
+  done
+  cd .. >/dev/null 2>&1
+
+  echo "</resources>" >> $STICKER
+  echo "<registry>" >> $STICKER
+  echo "</registry>" >> $STICKER
+  echo "</sticker>" >> $STICKER
+}
+
+virtuoso_init() {
+  LOG "Virtuoso.ini creation..."
+  echo "
+[Database]
+DatabaseFile    = vad.db
+TransactionFile = vad.trx
+ErrorLogFile    = vad.log
+ErrorLogLevel   = 7
+FileExtend      = 200
+Striping        = 0
+LogSegments     = 0
+Syslog      = 0
+;
+;  Server parameters
+;
+[Parameters]
+ServerPort           = $PORT
+ServerThreads        = 100
+CheckpointInterval   = 0
+NumberOfBuffers      = 2000
+MaxDirtyBuffers      = 1200
+MaxCheckpointRemap   = 2000
+UnremapQuota         = 0
+AtomicDive           = 1
+PrefixResultNames    = 0
+CaseMode             = 2
+DisableMtWrite       = 0
+MaxStaticCursorRows  = 5000
+AllowOSCalls         = 0
+DirsAllowed          = .
+CallstackOnException = 1
+
+;
+; HTTP server parameters
+;
+; Timeout values are seconds
+;
+
+[!HTTPServer]
+ServerPort = $TPORT
+ServerRoot = .
+ServerThreads = 5
+MaxKeepAlives = 10
+EnabledDavVSP = 1
+
+[Client]
+SQL_QUERY_TIMEOUT  = 0
+SQL_TXN_TIMEOUT    = 0
+SQL_PREFETCH_ROWS  = 100
+SQL_PREFETCH_BYTES = 16000
+SQL_NO_CHAR_C_ESCAPE = 0
+
+[AutoRepair]
+BadParentLinks = 0
+BadDTP         = 0
+
+[Replication]
+ServerName   = the_big_server
+ServerEnable = 1
+QueueMax     = 50000" > virtuoso.ini
+
+  virtuoso_start
+}
+
+vad_create() {
+  STICKER=$1
+  V_NAME=$2
+  mydir=`pwd`
+  do_command_safe $DSN "DB.DBA.VAD_PACK('$STICKER', '.', '$V_NAME')"
+  do_command_safe $DSN "commit work"
+  do_command_safe $DSN "checkpoint"
+}
+
+BANNER "STARTED $VAD_DESC PACKAGING"
+
+$ISQL -? 2>/dev/null 1>/dev/null 
+if [ $? -eq 127 ] ; then
+    LOG "***ABORTED: $VAD_DESC PACKAGING, isql is not available"
+    exit 1
+fi
+$SERVER -? 2>/dev/null 1>/dev/null 
+if [ $? -eq 127 ] ; then
+    LOG "***ABORTED: $VAD_DESC PACKAGING, server is not available"
+    exit 1
+fi
+    
+
+virtuoso_shutdown
+directory_clean
+directory_init
+version_init
+sticker_init 1
+sticker_init 0
+virtuoso_init
+vad_create $STICKER_FS $VAD_NAME_DEVEL
+vad_create $STICKER_DAV $VAD_NAME_RELEASE
+virtuoso_shutdown
+chmod 644 $VAD_NAME_DEVEL
+chmod 644 $VAD_NAME_RELEASE
+
+CHECK_LOG
+RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
+if test $STATUS -eq 0
+then
+	$myrm -f *.vad
+	exit 1
+fi
+
+directory_clean
+
+BANNER "COMPLETED VAD PACKAGING"
+#tar zcvf dbpedia_load.tar.gz dbpedia_dav.vad dbpedia_install.sh dbpedia_post.sql load_nt.sh stats.sql README.txt dbpedia.ini
+exit 0
diff --git a/binsrc/dbpedia/vad_version b/binsrc/dbpedia/vad_version
new file mode 100644
index 0000000..8731870
--- /dev/null
+++ b/binsrc/dbpedia/vad_version
@@ -0,0 +1 @@
+1.1.89
diff --git a/binsrc/dbpedia/vsp/description.sql b/binsrc/dbpedia/vsp/description.sql
new file mode 100644
index 0000000..03b58ec
--- /dev/null
+++ b/binsrc/dbpedia/vsp/description.sql
@@ -0,0 +1,628 @@
+--
+--  $Id: description.sql,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+TTLP ('@prefix foaf: <http://xmlns.com/foaf/0.1/>
+ at prefix dc: <http://purl.org/dc/elements/1.1/>
+ at prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ at prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+ at prefix fbase: <http://rdf.freebase.com/ns/>
+rdfs:label rdfs:subPropertyOf virtrdf:label .
+dc:title rdfs:subPropertyOf virtrdf:label .
+fbase:type.object.name rdfs:subPropertyOf virtrdf:label .
+foaf:name rdfs:subPropertyOf virtrdf:label .
+<http://s.opencalais.com/1/pred/name> rdfs:subPropertyOf virtrdf:label .
+foaf:nick rdfs:subPropertyOf virtrdf:label .', '', 'dbprdf-label');
+
+rdfs_rule_set ('dbprdf-label', 'dbprdf-label');
+
+create procedure dbp_ldd_set_ns_decl ()
+{
+  declare arr any;
+  declare i, l int;
+  arr := vector (
+    registry_get('dbp_domain') || '/resource/', 'dbpedia',
+    registry_get('dbp_domain') || '/resource/' || registry_get('dbp_category') || ':', 'category',
+    'http://dbpedia.org/property/', 'p',
+    'http://dbpedia.openlinksw.com/wikicompany/', 'wikicompany',
+    'http://dbpedia.org/class/yago/', 'yago',
+    'http://www.w3.org/2003/01/geo/wgs84_pos#', 'geo',
+    'http://www.geonames.org/ontology#', 'geonames',
+    'http://xmlns.com/foaf/0.1/', 'foaf',
+    'http://www.w3.org/2004/02/skos/core#', 'skos',
+    'http://www.w3.org/2002/07/owl#', 'owl',
+    'http://www.w3.org/2000/01/rdf-schema#', 'rdfs',
+    'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf',
+    'http://www.w3.org/2001/XMLSchema#', 'xsd',
+    'http://purl.org/dc/elements/1.1/', 'dc',
+    'http://purl.org/dc/terms/', 'dcterms',
+    'http://dbpedia.org/units/', 'units',
+    'http://umbel.org/umbel/sc/', 'umbel-sc',
+    'http://umbel.org/umbel/ac/', 'umbel-ac',
+    'http://www.georss.org/georss/', 'georss',
+    'http://sw.opencyc.org/2008/06/10/concept/en/', 'opencyc',
+    'http://sw.opencyc.org/2008/06/10/concept/', 'opencyc',
+    'http://mpii.de/yago/resource/', 'yago-res',
+    'http://rdf.freebase.com/ns/', 'freebase',
+    'http://dbpedia.org/ontology/', 'dbpedia-owl');
+   l := length (arr);
+   for (i := 0; i < l; i := i + 2)
+      {
+	XML_REMOVE_NS_BY_PREFIX (arr[i+1], 2);
+	XML_SET_NS_DECL (arr[i+1], arr[i], 2);
+      }
+}
+;
+
+dbp_ldd_set_ns_decl ();
+
+create procedure dbp_ldd_get_lang_by_q (in accept varchar, in lang varchar)
+{
+  declare format, itm varchar;
+  declare arr, q any;
+  declare i, l int;
+
+  arr := split_and_decode (accept, 0, '\0\0,;');
+  q := 0;
+  l := length (arr);
+  format := null;
+  for (i := 0; i < l; i := i + 2)
+    {
+      declare tmp any;
+      itm := trim(arr[i]);
+      if (itm = lang)
+	{
+	  q := arr[i+1];
+	  if (q is null)
+	    q := 1.0;
+	  else
+	    {
+	      tmp := split_and_decode (q, 0, '\0\0=');
+	      if (length (tmp) = 2)
+		q := atof (tmp[1]);
+	      else
+		q := 1.0;
+	    }
+	  goto ret;
+	}
+    }
+  ret:
+  if (q = 0 and lang = 'en')
+    q := 0.002;
+  if (q = 0 and not length (lang))
+    q := 0.001;
+  return q;
+}
+;
+
+create procedure dbp_ldd_label (in _S any, in _G varchar, in lines any := null)
+{
+  declare best_str, meta, data any;
+  declare best_q, q float;
+  declare lang, langs varchar;
+  declare retr int;
+
+  retr := 1;
+
+  declare exit handler for sqlstate '42000'
+    {
+      if (retr and __SQL_MESSAGE like '%Inference context %')
+	{
+	  rdfs_load_schema ('dbprdf-label', 'dbprdf-label');
+	  retr := 0;
+	  goto again;
+	}
+      return _S;
+    };
+
+again:
+  if (__tag of IRI_ID = __tag (_S))
+    _S := id_to_iri (_S);
+  if (__tag of IRI_ID = __tag (_G))
+    _G := id_to_iri (_G);
+
+  langs := 'en';
+  if (lines is not null)
+    {
+      langs := http_request_header_full (lines, 'Accept-Language', 'en');
+    }
+  exec (sprintf ('sparql  '||
+  'select ?o (lang(?o)) where { graph <%S> { <%S> rdfs:label ?o } }', _G, _S), null, null, vector (), 0, meta, data);
+  best_str := '';
+  best_q := 0;
+  if (length (data))
+    {
+      for (declare i, l int, i := 0, l := length (data); i < l; i := i + 1)
+	{
+	  q := dbp_ldd_get_lang_by_q (langs, data[i][1]);
+          if (q > best_q)
+	    {
+	      best_str := data[i][0];
+	      best_q := q;
+	    }
+	}
+    }
+  if (best_str <> '')
+    return best_str;
+  exec (sprintf ('sparql define input:inference "dbprdf-label" '||
+  'select ?o (lang(?o)) where { graph <%S> { <%S> virtrdf:label ?o } }', _G, _S), null, null, vector (), 0, meta, data);
+  best_str := '';
+  best_q := 0;
+  if (length (data))
+    {
+      for (declare i, l int, i := 0, l := length (data); i < l; i := i + 1)
+	{
+	  q := dbp_ldd_get_lang_by_q (langs, data[i][1]);
+          if (q > best_q)
+	    {
+	      best_str := data[i][0];
+	      best_q := q;
+	    }
+	}
+    }
+  return best_str;
+}
+;
+
+create procedure dbp_ldd_type (in gr varchar, in subj varchar, out url varchar, in lines any := null)
+{
+  declare meta, data, ll any;
+  ll := 'Thing';
+  url := 'javascript:void()';
+
+  if (__tag of IRI_ID = __tag (subj))
+    subj := id_to_iri (subj);
+  if (__tag of IRI_ID = __tag (gr))
+    gr := id_to_iri (gr);
+
+  if (length (gr))
+    {
+      declare langs any;
+      --if (isvector (lines))
+      --  langs := http_request_header_full (lines, 'Accept-Language', 'en');
+      --else
+        langs := 'en';	
+      exec (sprintf ('sparql select (sql:BEST_LANGMATCH (?l, \'%S\', \'\')) ?tp from <%S> from virtrdf:schemas { <%S> <http://dbpedia.org/ontology/type>  ?tp . optional { ?tp rdfs:label ?l } }', langs, gr, subj), null, null, vector (), 0, meta, data);
+      if (not length (data))
+        exec (sprintf ('sparql select (sql:BEST_LANGMATCH (?l, \'%S\', \'\')) ?tp from <%S> from virtrdf:schemas { <%S> a ?tp . optional { ?tp rdfs:label ?l } filter (?tp like <http://dbpedia.org/ontology/%%>) }', langs, gr, subj), 
+	  null, null, vector (), 0, meta, data);
+      if (not length (data))
+        exec (sprintf ('sparql select (sql:BEST_LANGMATCH (?l, \'%S\', \'\')) ?tp from <%S> from virtrdf:schemas { <%S> a ?tp . optional { ?tp rdfs:label ?l } }', langs, gr, subj), 
+	  null, null, vector (), 0, meta, data);
+      if (length (data))
+	{
+	  if (data[0][0] is not null and data[0][0] <> 0)
+  	    ll := data[0][0];
+	  else  
+	    ll := dbp_ldd_uri_local_part (data[0][1]);
+	  url := dbp_ldd_get_proxy (data[0][1]);
+	}
+    }
+  return ll;
+}
+;
+
+create procedure dbp_ldd_uri_local_part (in uri varchar)
+{
+  declare delim integer;
+  declare uriSearch varchar;
+  delim := -1;
+  uriSearch := uri;
+  delim := coalesce (strrchr (uriSearch, '/'), 0);
+  delim := __max (delim, coalesce (strrchr (uriSearch, '#'), 0));
+  delim := __max (delim, coalesce (strrchr (uriSearch, ':'), 0));
+  if (delim > 0)
+    uriSearch := subseq (uri, delim + 1);
+  return uriSearch;
+}
+;
+
+create procedure dbp_ldd_subject (in _S any, in _G varchar, in lines any := null)
+{
+  declare best_str, meta, data any;
+  declare best_q, q float;
+  declare lang, langs varchar;
+
+  if (__tag of IRI_ID = __tag (_S))
+    _S := id_to_iri (_S);
+  if (__tag of IRI_ID = __tag (_G))
+    _G := id_to_iri (_G);
+
+  langs := 'en';
+  if (lines is not null)
+    {
+      langs := http_request_header_full (lines, 'Accept-Language', 'en');
+    }
+  if (langs is not null)
+    {
+      langs := replace (langs, 'en-us', 'en');
+      langs := replace (langs, 'en-uk', 'en');
+    }
+  best_str := '';
+  exec (sprintf ('sparql select (sql:BEST_LANGMATCH (?l, \'%S\', \'en\')) ?tp where { graph <%S> { <%S> dbpprop:comment_live ?l } }', 
+	langs, _G, _S), null, null, vector (), 0, meta, data);
+  if (length (data) and data[0][0] is not null and data[0][0] <> 0)
+    best_str := data[0][0];
+  else
+    {
+      exec (sprintf ('sparql select (sql:BEST_LANGMATCH (?l, \'%S\', \'en\')) ?tp where { graph <%S> { <%S> rdfs:comment ?l } }', 
+	    langs, _G, _S), null, null, vector (), 0, meta, data);
+      if (length (data) and data[0][0] is not null and data[0][0] <> 0)
+	best_str := data[0][0];
+    }
+  return best_str;
+}
+;
+
+create procedure
+dbp_ldd_trunc_uri (in s varchar, in maxlen int := 80)
+{
+  declare _s varchar;
+  declare _h int; 
+
+  _s := trim(s);
+  _s := charset_recode (_s, 'UTF-8', '_WIDE_');
+
+  if (length(_s) <= maxlen) return charset_recode (_s, '_WIDE_', 'UTF-8');
+  _h := floor ((maxlen-3) / 2);
+  _s := concat ("LEFT"(_s, _h), N'...', "RIGHT"(_s, _h-1));
+
+  return charset_recode (_s, '_WIDE_', 'UTF-8');
+}
+;
+
+create procedure dbp_ldd_split_url (in uri varchar, out pref varchar, out res varchar, in label varchar := null)
+{
+  declare delim any;
+  declare uriSearch, nsPrefix any;
+
+  delim := -1;
+  uriSearch := uri;
+  nsPrefix := null;
+  if (not length (label))
+    label := null;
+  while (nsPrefix is null and delim <> 0)
+    {
+      delim := coalesce (strrchr (uriSearch, '/'), 0);
+      delim := __max (delim, coalesce (strrchr (uriSearch, '#'), 0));
+      delim := __max (delim, coalesce (strrchr (uriSearch, ':'), 0));
+      nsPrefix := coalesce (__xml_get_ns_prefix (subseq (uriSearch, 0, delim + 1), 2),
+      			    __xml_get_ns_prefix (subseq (uriSearch, 0, delim),     2));
+      uriSearch := subseq (uriSearch, 0, delim);
+    }
+  if (nsPrefix is not null)
+    {
+      declare rhs varchar;
+      rhs := subseq(uri, length (uriSearch) + 1, null);
+      if (length (rhs))
+	{
+	  pref := nsPrefix;
+	  if (regexp_match ('(_percent_[0-9A-F][0-9A-F])', rhs))
+	    {
+	      rhs := regexp_replace (rhs, '(_percent_)', '%', 1, null);
+	    }
+	  if (regexp_match ('%[0-9A-F][0-9A-F]', rhs))
+	    {
+	      declare tmp any;
+	      tmp := split_and_decode (rhs)[0];
+	      if (charset_recode (tmp, 'UTF-8', null))
+		rhs := tmp;
+	    }
+	  rhs := dbp_ldd_trunc_uri (rhs);
+	  res := coalesce (label, rhs);
+	  return;
+	}
+    }
+  pref := uri;
+  res := null;
+}
+;
+
+create procedure dbp_ldd_get_proxy (in x varchar)
+{
+  if (x like 'nodeID://%')
+    return '/about/html/' || x;
+  if (x like 'http://dbpedia.org/%' and http_request_header (http_request_header (), 'Host') <> 'dbpedia.org')
+    return regexp_replace (x, 'http://dbpedia.org', 'http://'||http_request_header (http_request_header (), 'Host'));
+  if (x like registry_get('dbp_domain') || '/%' and http_request_header (http_request_header (), 'Host') <> replace(registry_get('dbp_domain'),'http://',''))
+    return regexp_replace (x, registry_get('dbp_domain'), 'http://'||http_request_header (http_request_header (), 'Host'));
+
+  if (connection_get ('mappers_installed') = 1 and (
+      x like 'http://www.w3.org/2002/07/owl%' or
+      x like 'http://www.w3.org/1999/02/22-rdf-syntax-ns%' or
+      x like 'http://www.w3.org/2000/01/rdf-schema%'))
+    return '/about/html/' || replace (x, '#', '%01');
+
+  return x;
+}
+;
+
+--
+-- make a vector of languages and their quality 
+--
+create procedure dbp_ldd_get_lang_acc (in lines any)
+{
+  declare accept, itm varchar;
+  declare i, l, q int;
+  declare ret, arr any;
+
+  accept := 'en';
+  if (lines is not null)
+    {
+      accept := http_request_header_full (lines, 'Accept-Language', 'en');
+    }
+  arr := split_and_decode (accept, 0, '\0\0,;');
+  q := 0;
+  l := length (arr);
+  ret := make_array (l, 'any');
+  for (i := 0; i < l; i := i + 2)
+    {
+      declare tmp any;
+      itm := trim(arr[i]);
+      if (itm like '%-%')
+	itm := subseq (itm, 0, strchr (itm, '-'));
+      q := arr[i+1];
+      if (q is null)
+	q := 1.0;
+      else
+	{
+	  tmp := split_and_decode (q, 0, '\0\0=');
+	  if (length (tmp) = 2)
+	    q := atof (tmp[1]);
+	  else
+	    q := 1.0;
+	}
+      ret[i] := itm;
+      ret[i+1] := q;
+    }
+  return ret;
+}
+;
+
+create procedure dbp_ldd_str_lang_check (in lang any, in acc any)
+{
+  if (lang like '%-%')
+    lang := subseq (lang, 0, strchr (lang, '-'));
+  if (not length (lang))
+    return 1;
+  else if (position (lang, acc) > 0)
+    return 1;
+  else if (position ('*', acc) > 0)
+    return 1;
+  return 0;
+}
+;
+
+create procedure dbp_ldd_http_print_l (in p_text any, inout odd_position int, in rev int := 0)
+{
+   declare short_p, p_prefix, int_redirect, href, title any;
+
+   odd_position :=  odd_position + 1;
+   dbp_ldd_split_url (p_text, p_prefix, short_p);
+   href := dbp_ldd_get_proxy (p_text);
+   title := p_text;
+   if (title = href)
+     title := '';
+   else   
+     title := sprintf (' title="%V"', title);
+
+   http (sprintf ('<tr class="%s"><td class="property">', either(mod (odd_position, 2), 'odd', 'even')));
+   if (rev) http ('is ');
+   if (short_p is not null)
+      http (sprintf ('<a class="uri" href="%V"%s><small>%s:</small>%s</a>\n', href, title, p_prefix, short_p));
+   else
+      http (sprintf ('<a class="uri" href="%V"%s>%s</a>\n', href, title, p_prefix));
+   if (rev) http (' of');
+   http ('</td><td><ul>\n');
+}
+;
+
+create procedure dbp_ldd_rel_print (in val any, in rel any, in obj any, in flag int := 0, in lang varchar := null)
+{
+  declare delim, delim1, delim2, delim3 integer;
+  declare inx int;
+  declare nss, loc, res, nspref, lang_def varchar;
+
+  delim1 := coalesce (strrchr (val, '/'), -1);
+  delim2 := coalesce (strrchr (val, '#'), -1);
+  delim3 := coalesce (strrchr (val, ':'), -1);
+  delim := __max (delim1, delim2, delim3);
+  nss := '';
+  loc := val;
+  if (delim < 0) return loc;
+  nss := subseq (val, 0, delim + 1);
+  loc := subseq (val, delim + 1);
+  res := '';
+
+  nspref := __xml_get_ns_prefix (nss, 2);
+  if (nspref is null)
+    {
+      inx := coalesce (connection_get ('ns_ctr'), 0);
+      connection_set ('ns_ctr', inx + 1);
+      nspref := sprintf ('ns%d', inx);
+    }
+
+
+  if (nspref is not null and nspref not in ('dbpprop', 'owl'))
+    nss := sprintf (' xmlns:%s="%s"', nspref, nss);
+  else  
+    nss := '';
+  if (flag)
+    loc := sprintf ('property="%s:%s"', nspref, loc);
+  else if (rel)
+    loc := sprintf ('rel="%s:%s"', nspref, loc);
+  else
+    loc := sprintf ('rev="%s:%s"', nspref, loc);
+  --if (obj is not null)
+  --  res := sprintf (' resource="%V"', obj);  
+  lang_def := '';
+  if (isstring (lang) and lang <> '')
+    lang_def := sprintf (' xml:lang="%s"', lang);
+  return concat (loc, res, nss, lang_def);
+}
+;
+
+create procedure dbp_ldd_http_print_r (in _object any, in org int := 0, in label varchar, in pred varchar, in rel int, inout acc any)
+{
+   declare lang, rdfs_type, rdfa, visible any;
+
+   lang := DB.DBA.RDF_LANGUAGE_OF_OBJ (_object);
+   visible := dbp_ldd_str_lang_check (lang, acc);
+   rdfs_type := DB.DBA.RDF_DATATYPE_OF_OBJ (_object);
+   rdfa := dbp_ldd_rel_print (id_to_iri (pred), rel, null, 1, lang);
+
+   http (sprintf ('\t<li%s><span class="literal">', case visible when 0 then ' style="display:none;"' else '' end));
+
+again:
+   if (__tag (_object) = 246)
+     {
+       declare dat any;
+       dat := __rdf_sqlval_of_obj (_object, 1);
+       _object := dat;
+       goto again;
+     }
+   else if (__tag (_object) = 189)
+     {
+       http (sprintf ('<span %s>%d</span>', rdfa, _object));
+       lang := 'xsd:integer';
+     }
+   else if (__tag (_object) = 190)
+     {
+       http (sprintf ('<span %s>%f</span>', rdfa, _object));
+       lang := 'xsd:float';
+     }
+   else if (__tag (_object) = 191)
+     {
+       http (sprintf ('<span %s>%f</span>', rdfa, _object));
+       lang := 'xsd:double';
+     }
+   else if (__tag (_object) = 219)
+     {
+       http (sprintf ('<span %s>%s</span>', rdfa, cast (_object as varchar)));
+       lang := 'xsd:double';
+     }
+   else if (__tag (_object) = 182)
+     {
+       string_type:
+       http (sprintf ('<span %s>%s</span>', rdfa, _object));
+       lang := '';
+     }
+   else if (__tag (_object) = 211)
+     {
+       http (sprintf ('<span %s>%s</span>', rdfa, datestring (_object)));
+       lang := 'xsd:date';
+     }
+   else if (__tag (_object) = 243)
+     {
+       declare _url, p_t, s_t, _label any;
+
+       _label := null;
+       if (pred = rdf_sas_iri ())
+	 _label := label;
+       _url := id_to_iri (_object);
+       if (_url is null)
+	 {
+	   _object := 'unknown IRI_ID';
+	   goto string_type;
+	 }
+       if (_url like 'http://sw.opencyc.org/2008/06/10/concept/%')
+	 {
+	   declare h_url varchar;
+	   declare stat, msg, data, meta any;
+	   stat := '00000';
+	   exec (sprintf ('sparql select * from <http://dbpedia.org/resource/classes/opencyc-readable#> where { ?x owl:sameAs <%s> } limit 1', _url),
+	       stat, msg, vector (), 0, meta, data);
+	   if (length (data))
+	     h_url := data[0][0];
+	   else
+	     h_url := _url;
+	   dbp_ldd_split_url (h_url, p_t, s_t);
+	 }
+       else
+	 dbp_ldd_split_url (_url, p_t, s_t, _label);
+
+       rdfa := dbp_ldd_rel_print (id_to_iri (pred), rel, _url, 0, lang);
+       if (s_t is null)
+	 {
+	   http (sprintf ('<a class="uri" %s href="%s">%s</a>', 
+		 rdfa, case when org then _url else dbp_ldd_get_proxy(_url) end, _url));
+	 }
+       else
+	 {
+	   http (sprintf ('<a class="uri" %s href="%s"><small>%s</small>:%s</a>',
+		 rdfa, case when org then _url else dbp_ldd_get_proxy (_url) end, p_t, s_t));
+	 }
+     }
+   else if (__tag (_object) = 238)
+     {
+       http (sprintf ('<span %s>', rdfa));
+       http (st_astext (_object));
+       http ('</span>');
+     }
+   else
+     http (sprintf ('FIXME %i', __tag (_object)));
+
+   if (lang is not NULL and lang <> '')
+     {
+       http (sprintf ('<small> (%s)</small>', lang));
+     }
+
+   http ('</span></li>\n');
+   return visible;
+}
+;
+
+create procedure dbp_virt_info ()
+{
+  http ('<a href="http://www.openlinksw.com/virtuoso/">OpenLink Virtuoso</a> version '); 
+  http (sys_stat ('st_dbms_ver')); 
+  http (', on ');
+  http (sys_stat ('st_build_opsys_id')); http (','); 
+  http (case when sys_stat ('cl_run_local_only') = 1 then 'Single' else 'Cluster' end); http (' Edition ');
+  http (case when sys_stat ('cl_run_local_only') = 0 then sprintf ('(%d nodes)', sys_stat ('cl_n_hosts')) else '' end); 
+}
+;
+
+create procedure dbp_wikipedia_cc_by_sa (in _S any, in _G any)
+{
+  declare meta, data any;
+  declare wiki_link varchar;
+
+  if (__tag of IRI_ID = __tag (_S))
+    _S := id_to_iri (_S);
+  if (__tag of IRI_ID = __tag (_G))
+    _G := id_to_iri (_G);
+
+  exec (sprintf ('sparql  '||
+  'select ?o where { graph <%S> { <%S> foaf:page ?o } } LIMIT 1', _G, _S), null, null, vector (), 0, meta, data);
+
+  if (length (data))
+    wiki_link := data[0][0];
+  else
+    wiki_link := 'http://www.wikipedia.org/';
+    
+  http ('This content was extracted from ');
+  http (sprintf ('<a href="%V">Wikipedia</a>', wiki_link));
+  http (' and is licensed under the ');
+  http ('<a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>\n');
+} 
+;
diff --git a/binsrc/dbpedia/vsp/description.vsp b/binsrc/dbpedia/vsp/description.vsp
new file mode 100644
index 0000000..b6c5b6b
--- /dev/null
+++ b/binsrc/dbpedia/vsp/description.vsp
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" 
+    xmlns:dbpprop="http://dbpedia.org/property/" 
+    xmlns:foaf="http://xmlns.com/foaf/0.1/" 
+    version="XHTML+RDFa 1.0" xml:lang="en">
+<?vsp
+--
+--  $Id: description.vsp,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+   declare _G, _S, _P, _O, odd_position any;
+   declare _resource_, project_name, project_home_page any;
+   declare page_resource_uri, rdf_link, rdf_link2, rdf_link3, rdf_link4, atom_link, jsod, ntriples, label, true_label, _subject, csv_link, cxml_link, gen_rdf_link any;
+   declare iri_type, iri_uri, white_page, pkgs, txt, host, links, langs, dset, tmp_lines any;
+
+   -- INIT VALLUES
+
+   set http_charset='utf-8';
+   set isolation = 'uncomitted';
+   _resource_ := get_keyword ('res', params, '');
+   dset := get_keyword ('lang', params, '');
+   langs := dbp_ldd_get_lang_acc (lines);
+   tmp_lines := lines;
+   iri_type := 'unknown';
+   if (length (dset))
+     { 
+       langs := vector (dset, 1.0);
+       tmp_lines := vector ('Accept-Language: ' || dset);
+     }
+   else 
+     {
+       declare tmp any;
+       tmp := sprintf_inverse (registry_get ('dbp_graph'), 'http://%s.dbpedia.org', 0);
+       if (length (tmp))
+         tmp_lines := vector ('Accept-Language: ' || tmp[0]); 
+     }
+   pkgs := VAD..VAD_GET_PACKAGES ();
+   foreach (any p in pkgs) do
+     {
+       if (p[1] = 'rdf_mappers')
+         connection_set ('mappers_installed', 1);
+     }
+   nxt:
+
+   white_page := 0;
+   if (strstr (_resource_, '/resource') = 0)
+     white_page := 1;
+
+   -- add domain prefix
+   _resource_ := replace (_resource_, '/resource_vsp/', '', 1);
+   if (_resource_ not like 'nodeID:%') 
+     {
+       -- if rousource use custom domain, else use http://dbpedia.org
+       if (_resource_ like '/page/%')
+         _resource_ := registry_get('dbp_domain') || _resource_;
+       else
+         _resource_ := 'http://dbpedia.org' || _resource_;
+     }
+
+   host := http_request_header (http_request_header (), 'Host');  
+   project_name := 'dbpedia.org';
+
+   -- setup default graph (project_home_page)
+   project_home_page := registry_get ('dbp_graph');
+
+   if (_resource_ like '%dbpedia.org/void/%')
+     project_home_page := registry_get('dbp_graph') || '/void/';
+   else if (_resource_ like '%dbpedia.org/meta/%')
+     project_home_page := registry_get('dbp_graph') || '/meta';
+
+   page_resource_uri := replace (_resource_, '\'', '%27');
+   page_resource_uri := replace (page_resource_uri, 'dbpedia.org/page', 'dbpedia.org/resource');
+
+   -- HACK properties !!!
+
+   if (strstr (page_resource_uri, registry_get('dbp_domain') || '/resource/property') = 0)
+     {	   
+       page_resource_uri := replace (page_resource_uri,
+       registry_get('dbp_domain') || '/resource/property', registry_get('dbp_domain') || '/property');
+     }
+
+   -- setup rdf alternative links
+
+   rdf_link := 'http://'|| http_request_header (http_request_header (), 'Host') 
+   		||'/sparql?default-graph-uri=http%3A%2F%2F'||replace(registry_get('dbp_graph'),'http://','')||'&query=DESCRIBE+<' ||
+		replace (page_resource_uri, '%', '%25') || '>';
+   gen_rdf_link := rdf_link;
+   csv_link := rdf_link||'&format=text%2Fcsv'; 
+   cxml_link := rdf_link||'&format=text%2Fcxml'; 
+   if (page_resource_uri like 'http://%/resource/%')
+     rdf_link2 := dbp_ldd_get_proxy (replace (page_resource_uri, '/resource/', '/data/'));
+   else if (page_resource_uri like 'http://%/class/%')
+     rdf_link2 := dbp_ldd_get_proxy (replace (page_resource_uri, '/class/', '/data2/'));
+   else if (page_resource_uri like 'http://%/ontology/%')
+     rdf_link2 := dbp_ldd_get_proxy (replace (page_resource_uri, '/ontology/', '/data3/'));
+   else if (page_resource_uri like 'http://%/property/%')
+     rdf_link2 := dbp_ldd_get_proxy (replace (page_resource_uri, '/property/', '/data4/'));
+   else if (page_resource_uri like 'http://%/meta/%')
+     rdf_link2 := dbp_ldd_get_proxy (replace (page_resource_uri, '/meta/', '/data5/'));
+   else  
+     rdf_link2 := rdf_link;
+   if (rdf_link2 not like '%/data%/%')
+     {
+       rdf_link2 := rdf_link||'&format=rdf'; 
+       rdf_link3 := rdf_link || '&output=application%2Frdf%2Bjson';
+       rdf_link4 := rdf_link || '&output=application%2Frdf%2Bjson';
+       rdf_link := rdf_link || '&format=n3';
+       atom_link := rdf_link || '&output=application%2Fatom%2Bxml';
+       jsod := rdf_link || '&output=application%2Fodata%2Bjson';
+       ntriples := rdf_link || '&output=text%2Fplain';
+     }  
+   else
+     {
+       rdf_link := rdf_link2 || '.n3';
+       rdf_link3 := rdf_link2 || '.json';
+       rdf_link4 := rdf_link2 || '.jrdf';
+       atom_link := rdf_link2 || '.atom';
+       jsod := rdf_link2 || '.jsod';
+       ntriples := rdf_link2 || '.ntriples';
+       rdf_link2 := rdf_link2 || '.rdf';
+     }
+
+   links := sprintf ('Link: <%s>; rel="alternate"; type="application/rdf+xml"; title="Structured Descriptor Document (RDF/XML format)", ', rdf_link2); 
+   links := links || sprintf ('<%s>; rel="alternate"; type="text/n3"; title="Structured Descriptor Document (N3/Turtle format)", ',rdf_link); 
+   links := links || sprintf ('<%s>; rel="alternate"; type="application/json"; title="Structured Descriptor Document (RDF/JSON format)", ', rdf_link3); 
+   links := links || sprintf ('<%s>; rel="alternate"; type="application/atom+xml"; title="OData (Atom+Feed format)", ', atom_link); 
+   links := links || sprintf ('<%s>; rel="alternate"; type="text/csv"; title="Structured Descriptor Document (CSV format)", ', csv_link); 
+   if (__proc_exists ('DB.DBA.RDF_TRIPLES_TO_CXML') is not null) 
+     {
+       links := links || sprintf ('<%s>; rel="alternate"; type="text/cxml"; title="Structured Descriptor Document (CXML format)", ', cxml_link); 
+     }
+   links := links || sprintf ('<%s>; rel="alternate"; type="text/plain"; title="Structured Descriptor Document (N-Triples format)", ', ntriples); 
+
+   links := links || sprintf ('<%s>; rel="alternate"; type="application/microdata+json"; title="Structured Descriptor Document (Microdata/JSON format)", ', gen_rdf_link || sprintf ('&output=%U', 'application/microdata+json') ); 
+   links := links || sprintf ('<%s>; rel="alternate"; type="text/html"; title="Structured Descriptor Document (Microdata/HTML format)", ', gen_rdf_link || sprintf ('&output=%U', 'text/html') ); 
+   links := links || sprintf ('<%s>; rel="alternate"; type="application/ld+json"; title="Structured Descriptor Document (JSON-LD format)", ', gen_rdf_link || sprintf ('&output=%U', 'application/ld+json') ); 
+
+   links := links || sprintf ('<%s>; rel="http://xmlns.com/foaf/0.1/primaryTopic", ', page_resource_uri); 
+   links := links || sprintf ('<%s>; rev="describedby", ', page_resource_uri); 
+   links := links || sprintf ('<http://mementoarchive.lanl.gov/dbpedia/timegate/%s>; rel="timegate"\r\n', _resource_);
+
+   -- set for white page
+   if (lower (host) <> 'dbpedia.org')
+     txt := sprintf ('at <a href="http://%s/">%s</a>', host, host);
+   else
+     txt := sprintf ('at <a href="%s">DBpedia.org</a>', registry_get ('dbp_graph'));
+
+   -- check weather to decode the iri's
+   if (registry_get ('dbp_decode_iri') = 'on')
+     {
+       page_resource_uri := split_and_decode (page_resource_uri)[0];
+--     _resource_:= split_and_decode (_resource_)[0];
+     }
+
+   -- create iid's
+   _G := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (project_home_page);
+   _S := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (page_resource_uri);
+   _P := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (page_resource_uri);
+   _O := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (page_resource_uri);
+   odd_position := 0;
+
+   -- set up label
+   label := dbp_ldd_label (_S, _G, tmp_lines);
+   true_label := label;
+   if (not length (label))
+     label := page_resource_uri;
+
+   -- abstract
+   _subject := dbp_ldd_subject (_S, _G, tmp_lines);
+   -- class type
+   iri_type := dbp_ldd_type (_G, _S, iri_uri, lines);
+
+   -- set up http
+   -- http_header ('Cache-Control: no-cache, must-revalidate\r\nPragma: no-cache\r\n');
+   http_header (sprintf ('Expires: %s\r\n', date_rfc1123 (dateadd ('day', 7, now ()))) || links);
+?>
+
+<!-- header -->
+<head profile="http://www.w3.org/1999/xhtml/vocab">
+    <title>About: <?vsp http (sprintf ('%s', label)); ?></title>
+    <link rel="alternate" type="application/rdf+xml" href="<?=rdf_link2?>" title="Structured Descriptor Document (RDF/XML format)" />
+    <link rel="alternate" type="text/rdf+n3" href="<?=rdf_link?>" title="Structured Descriptor Document (N3/Turtle format)" />
+    <link rel="alternate" type="application/json+rdf" href="<?=rdf_link4?>" title="Structured Descriptor Document (RDF/JSON format)" />
+    <link rel="alternate" type="application/json" href="<?=rdf_link3?>" title="Structured Descriptor Document (RDF/JSON format)" />
+    <link rel="alternate" type="application/atom+xml" href="<?= atom_link ?>" title="OData (Atom+Feed format)" />
+    <link rel="alternate" type="text/plain" href="<?= ntriples ?>" title="Structured Descriptor Document (N-Triples format)" />
+    <link rel="alternate" href="<?V csv_link ?>" type="text/csv" title="Structured Descriptor Document (CSV format)" />
+    <?vsp if (__proc_exists ('DB.DBA.RDF_TRIPLES_TO_CXML') is not null) { ?>
+    <link rel="alternate" href="<?V cxml_link ?>" type="text/cxml" title="Structured Descriptor Document (CXML format)" />
+    <?vsp } ?>
+    <link rel="alternate" href="<?V gen_rdf_link || sprintf ('&output=%U', 'application/microdata+json') ?>" type="application/microdata+json" 	title="Structured Descriptor Document (Microdata/JSON format)" />
+    <link rel="alternate" href="<?V gen_rdf_link || sprintf ('&output=%U', 'text/html') ?>" 		     type="text/html" 			title="Structured Descriptor Document (Microdata/HTML format)" />
+    <link rel="alternate" href="<?V gen_rdf_link || sprintf ('&output=%U', 'application/ld+json') ?>"      type="application/ld+json" 	title="Structured Descriptor Document (JSON-LD format)" />
+    <link rel="timegate" type="text/html" href="http://mementoarchive.lanl.gov/dbpedia/timegate/<?= _resource_ ?>" title="Time Machine" />
+    <link rel="stylesheet" type="text/css" href="/statics/<?=either (white_page, 'style_w.css', 'style.css')?>" />
+    <link href="/statics/highlighter.css" type="text/css" rel="stylesheet" charset="utf-8" />
+    <link rel="foaf:primarytopic" href="<?= page_resource_uri ?>"/>
+    <link rev="describedby" href="<?= page_resource_uri ?>"/>
+    <script type="text/javascript" src="/statics/script.js"></script>
+</head>
+<body onload="init();" about="<?V page_resource_uri ?>">
+    <div id="header">
+      <div id="hd_l">
+	  <h1 id="title">About: <a href="<?vsp http (dbp_ldd_get_proxy (page_resource_uri)); ?>"><?vsp http (sprintf ('%s', label)); ?></a></h1>
+        <div id="homelink">
+          <!--?vsp if (white_page = 0) http (txt); ?-->
+        </div>
+	<div class="page-resource-uri">
+	    An Entity of Type : <a href="<?= iri_uri ?>"><?= iri_type ?></a>, 
+	    from Named Graph : <a href="<?V project_home_page ?>"><?V project_home_page ?></a>, 
+	    within Data Space : <a href="http://<?V host ?>"><?V host ?></a>
+        </div>
+      </div> <!-- hd_l -->
+      <div id="hd_r">
+	  <a href="<?=registry_get('dbp_imprint') ?>" title="About DBpedia">
+	      <img src="/statics/dbpedia_logo.png" height="64" alt="About DBpedia"/>
+        </a>
+      </div> <!-- hd_r -->
+    </div> <!-- header -->
+    <div id="content">
+
+      <p><?vsp http (sprintf ('%s', _subject)); ?></p>
+<!-- proptable -->
+      <table class="description"><tr><th>Property</th><th>Value</th></tr>
+
+<?vsp
+      declare sas, printed, vis int;
+      declare all_lang any;
+      all_lang := vector ('*', 1.0);
+
+      -- check resource domain and graph in order to print  owl:sameAs
+      if (page_resource_uri <> dbp_ldd_get_proxy (page_resource_uri) and registry_get ('dbp_graph') = registry_get('dbp_domain'))
+        sas := 1;
+      else
+        sas := 0;
+
+      --select predicates for resource
+      for (select distinct P as PRED from DB.DBA.RDF_QUAD where S = _S and G = _G order by id_to_iri (P)) do
+	{
+	   dbp_ldd_http_print_l (id_to_iri (PRED), odd_position);
+           printed := 0;
+           -- select values for each predicate
+	   for (select top 300 O as OBJECT from DB.DBA.RDF_QUAD where S = _S and G = _G and P = PRED) do
+              {
+		if (id_to_iri (PRED) in (registry_get('dbp_domain') || '/property/redirect', registry_get('dbp_domain') || '/ontology/wikiPageRedirects') and isiri_id (OBJECT))
+                  {
+		    http_rewrite ();
+		    http_status_set (301);	
+		    http_header (sprintf ('Location: %s\n', dbp_ldd_get_proxy (id_to_iri (OBJECT))));
+		    return;
+		  } 
+		vis := dbp_ldd_http_print_r (OBJECT, 0, true_label, PRED, 1, langs);
+                printed := printed + vis;
+              }
+	   if (not printed)
+             {
+               for (select top 100 O as OBJECT from DB.DBA.RDF_QUAD where S = _S and G = _G and P = PRED) do
+		 dbp_ldd_http_print_r (OBJECT, 0, true_label, PRED, 1, all_lang);
+             }
+          
+           if (sas and PRED = rdf_sas_iri ())
+	     { 	 
+	       dbp_ldd_http_print_r (iri_to_id (page_resource_uri), 1, true_label, PRED, 1, langs); 
+	       sas := 0; 
+	     }  
+
+	   http ('</ul></td></tr>');
+	}
+      -- print owl:sameAs
+      if (sas)
+        {
+	   dbp_ldd_http_print_l (id_to_iri (rdf_sas_iri ()), odd_position);
+	   dbp_ldd_http_print_r (iri_to_id (page_resource_uri), 1, null, rdf_sas_iri (), 1, langs); 
+	   http ('</ul></td></tr>');
+	}	
+      -- check for reverse triples
+      for (select distinct P as PRED from DB.DBA.RDF_QUAD where O = _O and G = _G order by id_to_iri (P)) do
+	{
+	   dbp_ldd_http_print_l (id_to_iri (PRED), odd_position, 1);
+           printed := 0;
+	   for (select top 300 S as OBJECT from DB.DBA.RDF_QUAD where O = _O and G = _G and P = PRED) do
+              {
+		vis := dbp_ldd_http_print_r (OBJECT, 0, true_label, PRED, 0, langs);
+                printed := printed + vis;
+              }
+	   if (not printed)
+             {
+	       for (select top 100 S as OBJECT from DB.DBA.RDF_QUAD where O = _O and G = _G and P = PRED) do
+		 dbp_ldd_http_print_r (OBJECT, 0, true_label, PRED, 0, all_lang);
+             }
+	   http ('</ul></td></tr>');
+	}
+
+       if  (odd_position = 0)
+	 {
+	    http_request_status ('HTTP/1.1 404 Not found');
+	    http ('<tr><td colspan="2"><p>No further information is available. (The requested entity is unknown)</p></td></tr>');
+	 }
+?>
+      </table>
+    </div> <!--  #content -->
+<!-- footer -->
+    <div id="footer">
+      <div id="ft_t">
+        Browse using:
+	<a href="http://linkeddata.uriburner.com/ode/?uri=<?vsp http_url (page_resource_uri); ?>">OpenLink Data Explorer</a> |
+        <a href="http://dataviewer.zitgist.com/?uri=<?vsp http_url (page_resource_uri); ?>">Zitgist Data Viewer</a> |
+        <a href="http://beckr.org/marbles?uri=<?vsp http_url (page_resource_uri); ?>">Marbles</a> |
+        <a href="http://www4.wiwiss.fu-berlin.de/rdf_browser/?browse_uri=<?vsp http_url (page_resource_uri); ?>">DISCO</a> |
+        <a href="http://dig.csail.mit.edu/2005/ajar/release/tabulator/0.8/tab.html?uri=<?vsp http_url (page_resource_uri); ?>" >Tabulator</a>
+            Raw Data in:
+	<?vsp if (__proc_exists ('DB.DBA.RDF_TRIPLES_TO_CXML') is not null) { ?>
+	<a href="<?= cxml_link ?>">CXML</a> |
+	<?vsp } ?>
+        <a href="<?= csv_link ?>">CSV</a> | RDF (
+        <a href="<?= ntriples ?>">N-Triples</a> 
+        <a href="<?= rdf_link ?>">N3/Turtle</a> 
+	<a href="<?= rdf_link3 ?>">JSON</a> 
+        <a href="<?= rdf_link2 ?>">XML</a> ) | OData (
+	<a href="<?= atom_link ?>">Atom</a> 
+	<a href="<?= jsod ?>">JSON</a> )| Microdata (
+	<a href="<?= gen_rdf_link || sprintf ('&output=%U', 'application/microdata+json') ?>">JSON</a>
+        <a href="<?= gen_rdf_link || sprintf ('&output=%U', 'text/html') ?>">HTML</a>) |  
+        <a href="<?= gen_rdf_link || sprintf ('&output=%U', 'application/ld+json')?>">JSON-LD</a> 
+
+           <a href="<?=registry_get('dbp_imprint') ?>">About</a>   
+      </div> <!-- #ft_t -->
+      <div id="ft_b">
+        <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="/statics/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
+        <a href="http://linkeddata.org/"><img alt="This material is Open Knowledge" src="/statics/LoDLogo.gif"/></a>  
+        <a href="<?= project_home_page ?>/sparql"><img alt="W3C Semantic Web Technology" src="/statics/sw-sparql-blue.png"/></a>     
+        <a href="http://www.opendefinition.org/"><img alt="This material is Open Knowledge" src="/statics/od_80x15_red_green.png"/></a>
+	<span about=""
+	resource="http://www.w3.org/TR/rdfa-syntax"
+	rel="dc:conformsTo" xmlns:dc="http://purl.org/dc/terms/">
+	<a href="http://validator.w3.org/check?uri=referer"><img
+	    src="http://www.w3.org/Icons/valid-xhtml-rdfa"
+	    alt="Valid XHTML + RDFa" height="27" /></a>
+	</span>
+      </div> <!-- #ft_b -->
+      <div id="ft_ccbysa">
+	<?vsp dbp_wikipedia_cc_by_sa(_S, _G); ?>
+      </div> <!-- #ft_ccbysa -->
+    </div> <!-- #footer -->
+    <!--script type="text/javascript">
+     Place any Javascript code e.g. Google Analytics scripts 
+    </script-->
+    <?vsp if (isstring (registry_get ('dbpedia_urchinTracker'))) { ?>
+	<script type="text/javascript">
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', '<?V registry_get ('dbpedia_urchinTracker')  ?>']);
+	  _gaq.push(['_trackPageview']);
+
+	  (function() {
+	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	</script>
+    <?vsp } ?>
+ </body>
+</html>
+
diff --git a/binsrc/dbpedia/vsp/description_white.vsp b/binsrc/dbpedia/vsp/description_white.vsp
new file mode 100644
index 0000000..02b0e58
--- /dev/null
+++ b/binsrc/dbpedia/vsp/description_white.vsp
@@ -0,0 +1,175 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+--
+--  $Id: description_white.vsp,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+   declare _G, _S, _P, _O, odd_position any;
+   declare _resource_, project_name, project_home_page any;
+   declare page_resource_uri, rdf_link, label, _subject any;
+   declare req_url_esc any;
+
+   -- INIT VALLUES
+
+   _resource_ := get_keyword ('res', params, '');
+   _resource_ := replace (_resource_, '/resource_vsp/', '', 1);
+   _resource_ := 'http://dbpedia.openlinksw.com' || _resource_;
+   req_url_esc := string_output();
+
+   project_name := 'dbpedia.openlinksw.com';
+   project_home_page := 'http://dbpedia.openlinksw.com/wikicompany';
+   page_resource_uri := _resource_;
+   http_url (sprintf ('<%S>', page_resource_uri), 0, req_url_esc);
+   req_url_esc := string_output_string (req_url_esc);
+   rdf_link := 'http://dbpedia.org:8890/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=DESCRIBE+' || req_url_esc;
+
+   dbg_obj_print (page_resource_uri);
+
+-- HACK properties !!!
+
+   if (strstr (page_resource_uri, 'http://dbpedia.openlinksw.com/property') = 0)
+	{
+	   page_resource_uri := replace (page_resource_uri,
+		'http://dbpedia.openlinksw.com/property', 'http://dbpedia.org/property');
+   	   project_home_page := 'http://dbpedia.org';
+	}
+
+-- HACK resource !!!
+
+   if (strstr (page_resource_uri, 'http://dbpedia.openlinksw.com/resource') = 0)
+	{
+	   page_resource_uri := replace (page_resource_uri,
+		'http://dbpedia.openlinksw.com/resource', 'http://dbpedia.org/resource');
+   	   project_home_page := 'http://dbpedia.org';
+	}
+
+
+   _G := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (project_home_page);
+   _S := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (page_resource_uri);
+   _P := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (page_resource_uri);
+   _O := DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (page_resource_uri);
+   odd_position := 0;
+
+   set http_charset='utf-8';
+   set isolation = 'serializable';
+   http_header ('Cache-Control: no-cache, must-revalidate\r\nPragma: no-cache\r\n');
+   http_header (sprintf ('Expires: %s\r\n', date_rfc1123 (dateadd ('day', 1, now ()))));
+
+
+   if (exists (select 1 from DB.DBA.RDF_QUAD where S = _S and G = _G and P = DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ('http://www.w3.org/2000/01/rdf-schema#label')))
+    select O into label from DB.DBA.RDF_QUAD where S = _S and G = _G and
+	P = DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ('http://www.w3.org/2000/01/rdf-schema#label');
+   else
+     label := '';
+
+   if (__tag (label) = 246) label := DB.DBA.RDF_SQLVAL_OF_OBJ (label);
+
+   dbg_obj_print (' page_resource_uri www ', page_resource_uri, '   ', project_home_page);
+?>
+
+<!-- header -->
+<head>
+    <title><?=_resource_?> | <?=project_name?></title>
+    <link rel="alternate" type="application/rdf+xml" href="<?=rdf_link?>" title="RDF" />
+    <link rel="stylesheet" type="text/css" href="http://dbpedia.org/statics/style_w.css" />
+    <link href="http://dbpedia.org/statics/highlighter.css" type="text/css" rel="stylesheet" charset="utf-8">
+    <script type="text/javascript" src="http://dbpedia.org/statics/script.js"></script>
+</head>
+  <body onLoad="init();">
+    <div id="header">
+      <div>
+        <h1 id="title"><?=label?></h1>
+       <div id="homelink"></div>
+      </div>
+      <div class="page-resource-uri">
+	<label class="ds_uri">Data Source Name (URI): </label>
+	<a title="A Data Source Name, Entity ID, or URI that exposes the location of the Description of this Resource" href="<?=replace (page_resource_uri, 'http://dbpedia.org', 'http://dbpedia.org:8890')?>"><?=page_resource_uri?></a>
+      </div>
+      <div id="rdficon"><a href="<?=rdf_link?>" title="RDF data">
+	<img src="http://dbpedia.org/statics/sw-rdf-gray.png" alt="[RDF Data]"></a>
+      </div>
+    </div>
+
+<!-- proptable -->
+<table class="description"><tr><th width="25%">Property</th><th>Value</th></tr>
+
+<?vsp
+
+      for (select distinct P as PRED from DB.DBA.RDF_QUAD where S = _S and G = _G order by id_to_iri (P)) do
+	{
+	   dbp_ldd_http_print_l_white (id_to_iri (PRED), odd_position);
+	   for (select O as OBJECT from DB.DBA.RDF_QUAD where S = _S and G = _G and P = PRED) do
+		dbp_ldd_http_print_r_white (OBJECT);
+
+	   http ('</ul></td></tr>');
+	}
+
+      for (select distinct P as PRED from DB.DBA.RDF_QUAD where O = _O and G = _G order by id_to_iri (P)) do
+	{
+	   dbp_ldd_http_print_l_white (id_to_iri (PRED), odd_position, 1);
+	   for (select S as OBJECT from DB.DBA.RDF_QUAD where O = _O and G = _G and P = PRED) do
+		dbp_ldd_http_print_r_white (OBJECT);
+	   http ('</ul></td></tr>');
+	}
+
+       if  (odd_position = 0)
+	 {
+	    http ('<tr><td colspan="2"><p>No further information is available.</p></td></tr>');
+	 }
+
+?>
+      </table>
+
+<!-- footer -->
+<div id="footer">
+      This page shows information obtained from the SPARQL endpoint at
+        <a class="sparql-uri" href="http://dbpedia.org/sparql"> http://dbpedia.org/sparql </a> or
+	<a class="sparql-uri" href="http://dbpedia.org:8890/sparql">http://dbpedia.org:8890/sparql</a>.<br>
+
+      <a href="http://linkeddata.org/"><img style="vertical-align: -3px;" alt="This material is Open Knowledge" src="http://dbpedia.org/statics/LoDLogo.gif" border="0"></a>  
+      Browse using: 
+      <a href="http://demo.openlinksw.com/rdfbrowser2/?uri=<?vsp http_url (page_resource_uri); ?>">OpenLink Data Explorer</a> |
+      <a href="http://dataviewer.zitgist.com/?uri=<?vsp http_url (page_resource_uri); ?>">Zitgist Data Viewer</a> |
+      <a href="http://beckr.org/marbles?uri=<?vsp http_url (page_resource_uri); ?>">Marbles</a> |
+      <a href="http://www4.wiwiss.fu-berlin.de/rdf_browser/?browse_uri=<?vsp http_url (page_resource_uri); ?>">DISCO</a> |
+      <a href="http://dig.csail.mit.edu/2005/ajar/release/tabulator/0.8/tab.html?uri=<?vsp http_url (page_resource_uri); ?>">Tabulator</a>
+          Raw Data in:
+      <a href="<?=rdf_link || '&output=n3'?>">N3</a> |
+      <a href="<?=rdf_link || '&output=xml'?>">RDF/XML</a>
+         <a href="http://wiki.dbpedia.org/Imprint">Contact</a>   
+      <a href="http://www.opendefinition.org/"><img style="vertical-align: -3px;" alt="This material is Open Knowledge" src="http://dbpedia.org/statics/od_80x15_red_green.png" border="0"></a>
+    </div>
+
+    <div id="rdficon">
+      <a href="http://virtuoso.openlinksw.com" title="OpenLink Virtuoso"><img class="powered_by" src="http://dbpedia.org/statics/virt_power_no_border.png" alt="Powered by OpenLink Virtuoso"/></a>
+    </div>
+
+    <div>
+    </div>
+
+   </td></tr>
+ </div>
+<!-- footer -->
+
+
+ </body>
+</html>
diff --git a/binsrc/b3s/images/od_80x15_red_green.png b/binsrc/dbpedia/vsp/images/od_80x15_red_green.png
similarity index 100%
copy from binsrc/b3s/images/od_80x15_red_green.png
copy to binsrc/dbpedia/vsp/images/od_80x15_red_green.png
diff --git a/binsrc/b3s/images/rdf-icon.gif b/binsrc/dbpedia/vsp/images/rdf-icon.gif
similarity index 100%
copy from binsrc/b3s/images/rdf-icon.gif
copy to binsrc/dbpedia/vsp/images/rdf-icon.gif
diff --git a/binsrc/b3s/images/sw-cube.png b/binsrc/dbpedia/vsp/images/sw-cube.png
similarity index 100%
copy from binsrc/b3s/images/sw-cube.png
copy to binsrc/dbpedia/vsp/images/sw-cube.png
diff --git a/binsrc/b3s/images/sw-sparql-blue.png b/binsrc/dbpedia/vsp/images/sw-sparql-blue.png
similarity index 100%
copy from binsrc/b3s/images/sw-sparql-blue.png
copy to binsrc/dbpedia/vsp/images/sw-sparql-blue.png
diff --git a/appsrc/ODS-Addressbook/www/image/virt_power_no_border.png b/binsrc/dbpedia/vsp/images/virt_power_no_border.png
similarity index 100%
copy from appsrc/ODS-Addressbook/www/image/virt_power_no_border.png
copy to binsrc/dbpedia/vsp/images/virt_power_no_border.png
diff --git a/binsrc/b3s/images/LoDLogo.gif b/binsrc/dbpedia/vsp/statics/LoDLogo.gif
old mode 100644
new mode 100755
similarity index 100%
copy from binsrc/b3s/images/LoDLogo.gif
copy to binsrc/dbpedia/vsp/statics/LoDLogo.gif
diff --git a/binsrc/dbpedia/vsp/statics/dbpedia_logo.png b/binsrc/dbpedia/vsp/statics/dbpedia_logo.png
new file mode 100644
index 0000000..1958fb6
Binary files /dev/null and b/binsrc/dbpedia/vsp/statics/dbpedia_logo.png differ
diff --git a/binsrc/b3s/styles/highlighter.css b/binsrc/dbpedia/vsp/statics/highlighter.css
similarity index 100%
copy from binsrc/b3s/styles/highlighter.css
copy to binsrc/dbpedia/vsp/statics/highlighter.css
diff --git a/binsrc/b3s/images/od_80x15_red_green.png b/binsrc/dbpedia/vsp/statics/od_80x15_red_green.png
similarity index 100%
copy from binsrc/b3s/images/od_80x15_red_green.png
copy to binsrc/dbpedia/vsp/statics/od_80x15_red_green.png
diff --git a/binsrc/b3s/images/rdf-icon.gif b/binsrc/dbpedia/vsp/statics/rdf-icon.gif
similarity index 100%
copy from binsrc/b3s/images/rdf-icon.gif
copy to binsrc/dbpedia/vsp/statics/rdf-icon.gif
diff --git a/binsrc/b3s/images/rdf_w3c.png b/binsrc/dbpedia/vsp/statics/rdf_w3c.png
similarity index 100%
copy from binsrc/b3s/images/rdf_w3c.png
copy to binsrc/dbpedia/vsp/statics/rdf_w3c.png
diff --git a/binsrc/rdf_mappers/rdfdesc/statics/rdf_w3c.svg b/binsrc/dbpedia/vsp/statics/rdf_w3c.svg
similarity index 100%
copy from binsrc/rdf_mappers/rdfdesc/statics/rdf_w3c.svg
copy to binsrc/dbpedia/vsp/statics/rdf_w3c.svg
diff --git a/binsrc/b3s/images/rdf_w3c_300.png b/binsrc/dbpedia/vsp/statics/rdf_w3c_300.png
similarity index 100%
copy from binsrc/b3s/images/rdf_w3c_300.png
copy to binsrc/dbpedia/vsp/statics/rdf_w3c_300.png
diff --git a/binsrc/b3s/images/rdf_w3c_500.png b/binsrc/dbpedia/vsp/statics/rdf_w3c_500.png
similarity index 100%
copy from binsrc/b3s/images/rdf_w3c_500.png
copy to binsrc/dbpedia/vsp/statics/rdf_w3c_500.png
diff --git a/binsrc/b3s/images/rdf_w3c_742.png b/binsrc/dbpedia/vsp/statics/rdf_w3c_742.png
similarity index 100%
copy from binsrc/b3s/images/rdf_w3c_742.png
copy to binsrc/dbpedia/vsp/statics/rdf_w3c_742.png
diff --git a/binsrc/b3s/images/rdf_w3c_742_trans.png b/binsrc/dbpedia/vsp/statics/rdf_w3c_742_trans.png
similarity index 100%
copy from binsrc/b3s/images/rdf_w3c_742_trans.png
copy to binsrc/dbpedia/vsp/statics/rdf_w3c_742_trans.png
diff --git a/binsrc/dbpedia/vsp/statics/script.js b/binsrc/dbpedia/vsp/statics/script.js
new file mode 100644
index 0000000..94656af
--- /dev/null
+++ b/binsrc/dbpedia/vsp/statics/script.js
@@ -0,0 +1,59 @@
+/*
+ *  $Id: script.js,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+function init() {
+	init_long_literals();
+}
+
+var long_literal_counter = 0;
+var long_literal_spans = {};
+var long_literal_texts = {};
+function init_long_literals() {
+    var spans = document.getElementsByTagName('span');
+    for (i = 0; i < spans.length; i++) {
+        if (spans[i].className != 'literal') continue;
+        var span = spans[i];
+        var textNode = span.firstChild;
+        var text = textNode.data;
+        if (!text || text.length < 300) continue;
+        var match = text.match(/([^\0]{150}[^\0]*? )([^\0]*)/);
+        if (!match) continue;
+        span.insertBefore(document.createTextNode(match[1] + ' ... '), span.firstChild);
+        span.removeChild(textNode);
+        var link = document.createElement('a');
+        link.href = 'javascript:expand(' + long_literal_counter + ');';
+        link.appendChild(document.createTextNode('\u00BBmore\u00BB'));
+        link.className = 'expander';
+        span.insertBefore(link, span.firstChild.nextSibling);
+        long_literal_spans[long_literal_counter] = span;
+        long_literal_texts[long_literal_counter] = textNode;
+        long_literal_counter = long_literal_counter + 1;
+    }
+}
+
+function expand(i) {
+    var span = long_literal_spans[i];
+    span.removeChild(span.firstChild);
+    span.removeChild(span.firstChild);
+    span.insertBefore(long_literal_texts[i], span.firstChild);
+}
diff --git a/binsrc/dbpedia/vsp/statics/style.css b/binsrc/dbpedia/vsp/statics/style.css
new file mode 100644
index 0000000..94cf931
--- /dev/null
+++ b/binsrc/dbpedia/vsp/statics/style.css
@@ -0,0 +1,75 @@
+/*
+ *  $Id: style.css,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+html { margin: 0; padding: 0; }
+body { font-family: sans-serif; font-size: 80%; margin: 0; padding: 1.2em 2em;  background: #cec; }
+
+#header { width: 100%; float: left; clear: left; border-bottom: 2px solid #696; margin: 0 0 1.2em; padding: 0 0 0.3em; }
+#hd_l { width: 80%; float: left;}
+#hd_r {float: right; clear: right;}
+
+#homelink { display: inline; }
+#homelink, #homelink a { color: #666; }
+#homelink a { font-weight: bold; text-decoration: none; }
+#homelink a:hover { color: red; text-decoration: underline; }
+
+h1 { display: inline; font-weight: normal; font-size: 200%; margin: 0; text-align: left; }
+h2 { font-weight: normal; font-size: 124%; margin: 1.2em 0 0.2em; }
+h1, h2 { color: #810; }
+
+.page-resource-uri { font-size: 124%; margin: 0.2em 0; }
+/*.page-resource-uri a { color: black; text-decoration: none; }*/
+.page-resource-uri a:hover { color: red; text-decoration: underline; }
+
+a.sparql-uri { color: black; text-decoration: none; }
+a.sparql-uri:hover { color: red; text-decoration: underline; }
+
+img { border: none; }
+
+#content {width: 100%; float: left; clear: left;}
+
+#footer { width: 100%;float: left; clear: left;border-top: 2px solid #696; margin: 1.2em 0 0; padding: 0.3em; background-color: #fff;}
+#ft_r { float: right; clear: right;}
+#ft_t { text-align: center; }
+#ft_b { text-align: center; margin-top: 0.7ex }
+#ft_ccbysa { font-size: 8pt; text-align: center; margin-top: 0.7ex }
+
+table.description { border-collapse: collapse; clear: left; font-size: 100%; margin: 0 0 1em; width: 100%; }
+table.description th { background: white; text-align: left; }
+table.description td, table.description th { line-height: 1.2em; padding: 0.2em 0.4em; vertical-align: top; }
+table.description ul { margin: 0; padding-left: 0em; }
+table.description li { list-style-type: square; }
+
+.uri { white-space: nowrap; }
+.uri a, a.uri { text-decoration: none; }
+.unbound { color: #888; }
+
+table.description a small { font-size: 100%; color: #55a; }
+table.description small { font-size: 100%; color: #666; }
+table.description .property { white-space: nowrap; }
+table.description .odd td { background: #d4f6d4; }
+table.description .even td { background: #f0fcf0; }
+
+.image { background: white; float: left; margin: 0 1.5em 1.5em 0; padding: 2px; }
+
+a.expander { text-decoration: none; }
diff --git a/binsrc/dbpedia/vsp/statics/style_w.css b/binsrc/dbpedia/vsp/statics/style_w.css
new file mode 100644
index 0000000..100484b
--- /dev/null
+++ b/binsrc/dbpedia/vsp/statics/style_w.css
@@ -0,0 +1,69 @@
+/*
+ *  $Id: style_w.css,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+html { margin: 0; padding: 0; }
+body { 
+    font-family: gill sans, sans-serif; 
+    font-size: 80%; 
+    margin: 0; 
+    padding: 1.2em 2em;}
+#header { width: 100%; float: left; clear: left; border-bottom: 2px solid #696; margin: 0 0 1.2em; padding: 0 0 0.3em; }
+#hd_l { width: 80%; float: left;}
+#hd_r {float: right; clear: right;}
+#footer { border-top: 2px solid #696; color: #666; margin: 1.2em 0 0; padding: 0.3em 0 0; }
+#homelink { display: inline; }
+#homelink, #homelink a { color: #666; }
+#homelink a { font-weight: bold; text-decoration: none; }
+#homelink a:hover { color: red; text-decoration: underline; }
+h1 { display: inline; font-weight: bold; font-size: 200%; margin: 0; text-align: left; }
+h2 { font-weight: normal; font-size: 124%; margin: 1.2em 0 0.2em; }
+.page-resource-uri { font-size: 124%; margin: 0.2em 0; font-style: italic; }
+.page-resource-uri a { color: black; text-decoration: none; }
+.page-resource-uri a:hover { color: red; text-decoration: underline; }
+.page-resource-uri label { font-size: smaller; font-style: normal;}
+a.sparql-uri { color: black; text-decoration: none; }
+a.sparql-uri:hover { color: red; text-decoration: underline; }
+img { border: none; }
+table.description { border-collapse: collapse; clear: left; font-size: 100%; margin: 0 0 1em; width: 100%; }
+table.description th { text-align: left; }
+table.description td, table.description th { line-height: 1.2em; padding: 0.2em 0.4em; vertical-align: top; }
+table.description ul { margin: 0; padding-left: 0em; }
+table.description li { list-style-type: square; }
+.uri { white-space: nowrap; }
+.uri a, a.uri { text-decoration: none; }
+a.uri:hover { text-decoration: underline }
+.unbound { color: #888; }
+table.description a small { font-size: 100% }
+table.description small { font-size: 100%; }
+table.description .property { white-space: nowrap; }
+h1, h2 { color: #224; }
+table.description .odd td { }
+table.description .even td { }
+.image { background: white; float: left; margin: 0 1.5em 1.5em 0; padding: 2px; }
+a.expander { text-decoration: none; }
+a.rdf_source { text-decoration: none; color: #666;}
+a.rdf_source img { vertical-align: middle;margin-right: 5px;}
+#rdficon:hover { background-color: #eef; border: 1px solid #666;}
+#ft_l { float: left;}
+#ft_r { float: right;}
+#ft_l label { margin-right: 5px;}
diff --git a/binsrc/b3s/images/sw-cube.png b/binsrc/dbpedia/vsp/statics/sw-cube.png
similarity index 100%
copy from binsrc/b3s/images/sw-cube.png
copy to binsrc/dbpedia/vsp/statics/sw-cube.png
diff --git a/binsrc/b3s/images/sw-rdf-gray.png b/binsrc/dbpedia/vsp/statics/sw-rdf-gray.png
similarity index 100%
copy from binsrc/b3s/images/sw-rdf-gray.png
copy to binsrc/dbpedia/vsp/statics/sw-rdf-gray.png
diff --git a/binsrc/b3s/images/sw-sparql-blue.png b/binsrc/dbpedia/vsp/statics/sw-sparql-blue.png
similarity index 100%
copy from binsrc/b3s/images/sw-sparql-blue.png
copy to binsrc/dbpedia/vsp/statics/sw-sparql-blue.png
diff --git a/binsrc/b3s/images/sw-vert-v.png b/binsrc/dbpedia/vsp/statics/sw-vert-v.png
similarity index 100%
copy from binsrc/b3s/images/sw-vert-v.png
copy to binsrc/dbpedia/vsp/statics/sw-vert-v.png
diff --git a/binsrc/rdf_mappers/rdfdesc/statics/sw-vert-v.svg b/binsrc/dbpedia/vsp/statics/sw-vert-v.svg
similarity index 100%
copy from binsrc/rdf_mappers/rdfdesc/statics/sw-vert-v.svg
copy to binsrc/dbpedia/vsp/statics/sw-vert-v.svg
diff --git a/binsrc/b3s/images/sw-vert-v_780_trans.png b/binsrc/dbpedia/vsp/statics/sw-vert-v_780_trans.png
similarity index 100%
copy from binsrc/b3s/images/sw-vert-v_780_trans.png
copy to binsrc/dbpedia/vsp/statics/sw-vert-v_780_trans.png
diff --git a/appsrc/ODS-Addressbook/www/image/virt_power_no_border.png b/binsrc/dbpedia/vsp/statics/virt_power_no_border.png
old mode 100644
new mode 100755
similarity index 100%
copy from appsrc/ODS-Addressbook/www/image/virt_power_no_border.png
copy to binsrc/dbpedia/vsp/statics/virt_power_no_border.png
diff --git a/binsrc/dbpedia/vsp/style/style.css b/binsrc/dbpedia/vsp/style/style.css
new file mode 100644
index 0000000..cb7b648
--- /dev/null
+++ b/binsrc/dbpedia/vsp/style/style.css
@@ -0,0 +1,75 @@
+/*
+ *  $Id: style.css,v 1.1.2.1 2012/03/02 11:13:51 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+html { margin: 0; padding: 0; }
+body { font-family: sans-serif; font-size: 80%; margin: 0; padding: 1.2em 2em;  background: #cec; }
+
+#header { width: 100%; float: left; clear: left; border-bottom: 2px solid #696; margin: 0 0 1.2em; padding: 0 0 0.3em; }
+#hd_l { width: 80%; float: left;}
+#hd_r {float: right; clear: right;}
+
+#homelink { display: inline; }
+#homelink, #homelink a { color: #666; }
+#homelink a { font-weight: bold; text-decoration: none; }
+#homelink a:hover { color: red; text-decoration: underline; }
+
+h1 { display: inline; font-weight: normal; font-size: 200%; margin: 0; text-align: left; }
+h2 { font-weight: normal; font-size: 124%; margin: 1.2em 0 0.2em; }
+h1, h2 { color: #810; }
+
+.page-resource-uri { font-size: 124%; margin: 0.2em 0; }
+.page-resource-uri a { color: black; text-decoration: none; }
+.page-resource-uri a:hover { color: red; text-decoration: underline; }
+
+a.sparql-uri { color: black; text-decoration: none; }
+a.sparql-uri:hover { color: red; text-decoration: underline; }
+
+img { border: none; }
+
+#content {width: 100%; float: left; clear: left;}
+
+#footer { width: 100%;float: left; clear: left;border-top: 2px solid #696; margin: 1.2em 0 0; padding: 0.3em; background-color: #fff;}
+#ft_r { float: right; clear: right;}
+#ft_t { text-align: center; }
+#ft_b { text-align: center; margin-top: 0.7ex }
+#ft_ccbysa { font-size: 8pt; text-align: center; margin-top: 0.7ex }
+
+table.description { border-collapse: collapse; clear: left; font-size: 100%; margin: 0 0 1em; width: 100%; }
+table.description th { background: white; text-align: left; }
+table.description td, table.description th { line-height: 1.2em; padding: 0.2em 0.4em; vertical-align: top; }
+table.description ul { margin: 0; padding-left: 0em; }
+table.description li { list-style-type: square; }
+
+.uri { white-space: nowrap; }
+.uri a, a.uri { text-decoration: none; }
+.unbound { color: #888; }
+
+table.description a small { font-size: 100%; color: #55a; }
+table.description small { font-size: 100%; color: #666; }
+table.description .property { white-space: nowrap; }
+table.description .odd td { background: #d4f6d4; }
+table.description .even td { background: #f0fcf0; }
+
+.image { background: white; float: left; margin: 0 1.5em 1.5em 0; padding: 2px; }
+
+a.expander { text-decoration: none; }
diff --git a/binsrc/driver/Makefile.am b/binsrc/driver/Makefile.am
index 8923084..07a7a43 100644
--- a/binsrc/driver/Makefile.am
+++ b/binsrc/driver/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/driver/Makefile.in b/binsrc/driver/Makefile.in
index 21720fa..af62fb4 100644
--- a/binsrc/driver/Makefile.in
+++ b/binsrc/driver/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -194,6 +194,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -242,6 +243,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -293,6 +295,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -339,7 +342,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/driver/unixodbc.c b/binsrc/driver/unixodbc.c
index 6de05c9..e070794 100644
--- a/binsrc/driver/unixodbc.c
+++ b/binsrc/driver/unixodbc.c
@@ -1,14 +1,14 @@
 /*
  *  unixodbc.c
  *
- *  $Id: unixodbc.c,v 1.2 2007/08/24 12:31:23 source Exp $
+ *  $Id: unixodbc.c,v 1.2.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Unix ODBC driver
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/driver/virt_vers.c b/binsrc/driver/virt_vers.c
index 80a2afb..ec24cc8 100644
--- a/binsrc/driver/virt_vers.c
+++ b/binsrc/driver/virt_vers.c
@@ -4,6 +4,6 @@
 
 char version[] = "\
 OpenLink Virtuoso ODBC Driver\n\
-Version 06.01.3127 as of Wed Mar 30 01:45:44 CEST 2011.\n\
-Compiled for Linux 2.6.34.7-56.fc13.x86_64\n\
-Copyright (C) OpenLink Software.\n";
+Version 06.01.3127 as of Thu Mar 15 19:27:16 CET 2012.\n\
+Compiled for Linux 2.6.42.3-2.fc15.x86_64\n\
+Copyright (C) 1998-2012 OpenLink Software.\n";
diff --git a/binsrc/driver/virt_vers_r.c b/binsrc/driver/virt_vers_r.c
index 4496f80..d413e4d 100644
--- a/binsrc/driver/virt_vers_r.c
+++ b/binsrc/driver/virt_vers_r.c
@@ -4,6 +4,6 @@
 
 char version[] = "\
 OpenLink Virtuoso ODBC Driver (multi threaded)\n\
-Version 06.01.3127 as of Wed Mar 30 01:46:04 CEST 2011.\n\
-Compiled for Linux 2.6.34.7-56.fc13.x86_64\n\
-Copyright (C) OpenLink Software.\n";
+Version 06.01.3127 as of Thu Mar 15 19:27:36 CET 2012.\n\
+Compiled for Linux 2.6.42.3-2.fc15.x86_64\n\
+Copyright (C) 1998-2012 OpenLink Software.\n";
diff --git a/binsrc/driver/virt_vers_ru.c b/binsrc/driver/virt_vers_ru.c
index ad3d287..e68ef03 100644
--- a/binsrc/driver/virt_vers_ru.c
+++ b/binsrc/driver/virt_vers_ru.c
@@ -4,6 +4,6 @@
 
 char version[] = "\
 OpenLink Virtuoso ODBC Driver (Unicode)(multi threaded)\n\
-Version 06.01.3127 as of Wed Mar 30 01:46:09 CEST 2011.\n\
-Compiled for Linux 2.6.34.7-56.fc13.x86_64\n\
-Copyright (C) OpenLink Software.\n";
+Version 06.01.3127 as of Thu Mar 15 19:27:40 CET 2012.\n\
+Compiled for Linux 2.6.42.3-2.fc15.x86_64\n\
+Copyright (C) 1998-2012 OpenLink Software.\n";
diff --git a/binsrc/driver/virt_vers_u.c b/binsrc/driver/virt_vers_u.c
index 3d9661d..9efc653 100644
--- a/binsrc/driver/virt_vers_u.c
+++ b/binsrc/driver/virt_vers_u.c
@@ -4,6 +4,6 @@
 
 char version[] = "\
 OpenLink Virtuoso ODBC Driver (Unicode)\n\
-Version 06.01.3127 as of Wed Mar 30 01:46:05 CEST 2011.\n\
-Compiled for Linux 2.6.34.7-56.fc13.x86_64\n\
-Copyright (C) OpenLink Software.\n";
+Version 06.01.3127 as of Thu Mar 15 19:27:37 CET 2012.\n\
+Compiled for Linux 2.6.42.3-2.fc15.x86_64\n\
+Copyright (C) 1998-2012 OpenLink Software.\n";
diff --git a/binsrc/hibernate/Makefile.am b/binsrc/hibernate/Makefile.am
index 1c9da6b..f3e1c1c 100644
--- a/binsrc/hibernate/Makefile.am
+++ b/binsrc/hibernate/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hibernate/Makefile.in b/binsrc/hibernate/Makefile.in
index a965566..0dcb81d 100644
--- a/binsrc/hibernate/Makefile.in
+++ b/binsrc/hibernate/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hibernate/virtuoso_dialect/VirtuosoDialect.java b/binsrc/hibernate/virtuoso_dialect/VirtuosoDialect.java
index 19aedf3..1e1dae6 100644
--- a/binsrc/hibernate/virtuoso_dialect/VirtuosoDialect.java
+++ b/binsrc/hibernate/virtuoso_dialect/VirtuosoDialect.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoDialect.java,v 1.1.2.2 2010/03/04 14:12:58 source Exp $
+ *  $Id: VirtuosoDialect.java,v 1.1.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -40,6 +40,7 @@ import org.hibernate.dialect.function.AnsiTrimEmulationFunction;
 import org.hibernate.util.StringHelper;
 import org.hibernate.exception.TemplatedViolatedConstraintNameExtracter;
 import org.hibernate.exception.ViolatedConstraintNameExtracter;
+import org.hibernate.type.StandardBasicTypes;
 
 
 /**
@@ -51,180 +52,180 @@ public class VirtuosoDialect extends Dialect {
 	public VirtuosoDialect() {
 		super();
 
-		registerColumnType( Types.BIT, "smallint" );
-		registerColumnType( Types.TINYINT, "smallint" );
-		registerColumnType( Types.SMALLINT, "smallint" );
-		registerColumnType( Types.INTEGER, "integer" );
-
-		registerColumnType( Types.BIGINT, "decimal(20,0)" );
-
-		registerColumnType( Types.REAL, "real" );
-		registerColumnType( Types.FLOAT, "float" );
-		registerColumnType( Types.DOUBLE, "double precision" );
-		registerColumnType( Types.NUMERIC, "decimal($p, $s)" );
-		registerColumnType( Types.DECIMAL, "decimal($p, $s)" );
-		registerColumnType( Types.BINARY, 2000, "binary($l)" );
-		registerColumnType( Types.VARBINARY, 2000, "varbinary($l)" );
-		registerColumnType( Types.LONGVARBINARY, "long varbinary" );
-		registerColumnType( Types.CHAR, 2000, "character($l)" );
-		registerColumnType( Types.VARCHAR, 2000, "varchar($l)" );
-		registerColumnType( Types.LONGVARCHAR, "long varchar" );
-		registerColumnType( Types.DATE, "date" );
-		registerColumnType( Types.TIME, "time" );
-		registerColumnType( Types.TIMESTAMP, "datetime" );
-
-		registerColumnType( Types.BLOB, "long varbinary" );
-		registerColumnType( Types.CLOB, "long varchar" );
+		registerColumnType( Types.BIT, "SMALLINT" );
+		registerColumnType( Types.TINYINT, "SMALLINT" );
+		registerColumnType( Types.SMALLINT, "SMALLINT" );
+		registerColumnType( Types.INTEGER, "INTEGER" );
+
+		registerColumnType( Types.BIGINT, "DECIMAL(20,0)" );
+
+		registerColumnType( Types.REAL, "REAL" );
+		registerColumnType( Types.FLOAT, "FLOAT" );
+		registerColumnType( Types.DOUBLE, "DOUBLE PRECISION" );
+		registerColumnType( Types.NUMERIC, "DECIMAL($p, $s)" );
+		registerColumnType( Types.DECIMAL, "DECIMAL($p, $s)" );
+		registerColumnType( Types.BINARY, 2000, "BINARY($l)" );
+		registerColumnType( Types.VARBINARY, 2000, "VARBINARY($l)" );
+		registerColumnType( Types.LONGVARBINARY, "LONG VARBINARY" );
+		registerColumnType( Types.CHAR, 2000, "CHARACTER($l)" );
+		registerColumnType( Types.VARCHAR, 2000, "VARCHAR($l)" );
+		registerColumnType( Types.LONGVARCHAR, "LONG VARCHAR" );
+		registerColumnType( Types.DATE, "DATE" );
+		registerColumnType( Types.TIME, "TIME" );
+		registerColumnType( Types.TIMESTAMP, "DATETIME" );
+
+		registerColumnType( Types.BLOB, "LONG VARBINARY" );
+		registerColumnType( Types.CLOB, "LONG VARCHAR" );
 
 ///===================
 
-		registerFunction("iszero", new StandardSQLFunction( "iszero", Hibernate.INTEGER ) );
-		registerFunction("atod", new StandardSQLFunction( "atod", Hibernate.DOUBLE ) );
-		registerFunction("atof", new StandardSQLFunction( "atof", Hibernate.FLOAT ) );
-		registerFunction("atoi", new StandardSQLFunction( "atoi", Hibernate.INTEGER ) );
+		registerFunction("iszero", new StandardSQLFunction( "iszero", StandardBasicTypes.INTEGER ) );
+		registerFunction("atod", new StandardSQLFunction( "atod", StandardBasicTypes.DOUBLE ) );
+		registerFunction("atof", new StandardSQLFunction( "atof", StandardBasicTypes.FLOAT ) );
+		registerFunction("atoi", new StandardSQLFunction( "atoi", StandardBasicTypes.INTEGER ) );
 
 		registerFunction("mod", new StandardSQLFunction( "mod" ) );
 		registerFunction("abs", new StandardSQLFunction( "abs" ) );
-		registerFunction("sign", new StandardSQLFunction( "sign", Hibernate.DOUBLE ) );
-		registerFunction("acos", new StandardSQLFunction( "acos", Hibernate.DOUBLE ) );
-		registerFunction("asin", new StandardSQLFunction( "asin", Hibernate.DOUBLE ) );
-		registerFunction("atan", new StandardSQLFunction( "atan", Hibernate.DOUBLE ) );
-		registerFunction("cos", new StandardSQLFunction( "cos", Hibernate.DOUBLE ) );
-		registerFunction("sin", new StandardSQLFunction( "sin", Hibernate.DOUBLE ) );
-		registerFunction("tan", new StandardSQLFunction( "tan", Hibernate.DOUBLE ) );
-		registerFunction("cot", new StandardSQLFunction( "cot", Hibernate.DOUBLE ) );
-		registerFunction("frexp", new StandardSQLFunction( "frexp", Hibernate.DOUBLE ) );
-		registerFunction("degrees", new StandardSQLFunction( "degrees", Hibernate.DOUBLE ) );
-		registerFunction("radians", new StandardSQLFunction( "radians", Hibernate.DOUBLE ) );
-		registerFunction("exp", new StandardSQLFunction( "exp", Hibernate.DOUBLE ) );
-		registerFunction("log", new StandardSQLFunction( "log", Hibernate.DOUBLE ) );
-		registerFunction("log10", new StandardSQLFunction( "log10", Hibernate.DOUBLE ) );
-		registerFunction("sqrt", new StandardSQLFunction( "sqrt", Hibernate.DOUBLE ) );
-		registerFunction("atan2", new StandardSQLFunction( "atan2", Hibernate.DOUBLE ) );
-		registerFunction("power", new StandardSQLFunction( "power", Hibernate.DOUBLE ) );
-		registerFunction("ceiling", new StandardSQLFunction( "ceiling", Hibernate.INTEGER ) );
-		registerFunction("floor", new StandardSQLFunction( "floor", Hibernate.INTEGER ) );
-		registerFunction("pi", new NoArgSQLFunction( "pi", Hibernate.DOUBLE, true ) );
-		registerFunction("round", new StandardSQLFunction("round", Hibernate.DOUBLE) );
+		registerFunction("sign", new StandardSQLFunction( "sign", StandardBasicTypes.DOUBLE ) );
+		registerFunction("acos", new StandardSQLFunction( "acos", StandardBasicTypes.DOUBLE ) );
+		registerFunction("asin", new StandardSQLFunction( "asin", StandardBasicTypes.DOUBLE ) );
+		registerFunction("atan", new StandardSQLFunction( "atan", StandardBasicTypes.DOUBLE ) );
+		registerFunction("cos", new StandardSQLFunction( "cos", StandardBasicTypes.DOUBLE ) );
+		registerFunction("sin", new StandardSQLFunction( "sin", StandardBasicTypes.DOUBLE ) );
+		registerFunction("tan", new StandardSQLFunction( "tan", StandardBasicTypes.DOUBLE ) );
+		registerFunction("cot", new StandardSQLFunction( "cot", StandardBasicTypes.DOUBLE ) );
+		registerFunction("frexp", new StandardSQLFunction( "frexp", StandardBasicTypes.DOUBLE ) );
+		registerFunction("degrees", new StandardSQLFunction( "degrees", StandardBasicTypes.DOUBLE ) );
+		registerFunction("radians", new StandardSQLFunction( "radians", StandardBasicTypes.DOUBLE ) );
+		registerFunction("exp", new StandardSQLFunction( "exp", StandardBasicTypes.DOUBLE ) );
+		registerFunction("log", new StandardSQLFunction( "log", StandardBasicTypes.DOUBLE ) );
+		registerFunction("log10", new StandardSQLFunction( "log10", StandardBasicTypes.DOUBLE ) );
+		registerFunction("sqrt", new StandardSQLFunction( "sqrt", StandardBasicTypes.DOUBLE ) );
+		registerFunction("atan2", new StandardSQLFunction( "atan2", StandardBasicTypes.DOUBLE ) );
+		registerFunction("power", new StandardSQLFunction( "power", StandardBasicTypes.DOUBLE ) );
+		registerFunction("ceiling", new StandardSQLFunction( "ceiling", StandardBasicTypes.INTEGER ) );
+		registerFunction("floor", new StandardSQLFunction( "floor", StandardBasicTypes.INTEGER ) );
+		registerFunction("pi", new NoArgSQLFunction( "pi", StandardBasicTypes.DOUBLE, true ) );
+		registerFunction("round", new StandardSQLFunction("round", StandardBasicTypes.DOUBLE) );
 		registerFunction("rand", new StandardSQLFunction( "rand") );
 		registerFunction("rnd", new StandardSQLFunction( "rnd") );
 		registerFunction("randomize", new StandardSQLFunction( "randomize") );
 
 
-		registerFunction("hash", new StandardSQLFunction( "hash", Hibernate.INTEGER ) );
-		registerFunction("md5_box", new StandardSQLFunction( "md5_box", Hibernate.STRING ) );
-		registerFunction("box_hash", new StandardSQLFunction( "box_hash", Hibernate.INTEGER ) );
+		registerFunction("hash", new StandardSQLFunction( "hash", StandardBasicTypes.INTEGER ) );
+		registerFunction("md5_box", new StandardSQLFunction( "md5_box", StandardBasicTypes.STRING ) );
+		registerFunction("box_hash", new StandardSQLFunction( "box_hash", StandardBasicTypes.INTEGER ) );
 /* Bitwise: */
-		registerFunction("bit_and", new StandardSQLFunction( "bit_and", Hibernate.INTEGER ) );
-		registerFunction("bit_or", new StandardSQLFunction( "bit_or", Hibernate.INTEGER ) );
-		registerFunction("bit_xor", new StandardSQLFunction( "bit_xor", Hibernate.INTEGER ) );
-		registerFunction("bit_not", new StandardSQLFunction( "bit_not", Hibernate.INTEGER ) );
-		registerFunction("bit_shift", new StandardSQLFunction( "bit_shift", Hibernate.INTEGER ) );
+		registerFunction("bit_and", new StandardSQLFunction( "bit_and", StandardBasicTypes.INTEGER ) );
+		registerFunction("bit_or", new StandardSQLFunction( "bit_or", StandardBasicTypes.INTEGER ) );
+		registerFunction("bit_xor", new StandardSQLFunction( "bit_xor", StandardBasicTypes.INTEGER ) );
+		registerFunction("bit_not", new StandardSQLFunction( "bit_not", StandardBasicTypes.INTEGER ) );
+		registerFunction("bit_shift", new StandardSQLFunction( "bit_shift", StandardBasicTypes.INTEGER ) );
 
 // undef=>TRUNCATE
-		registerFunction("length", new StandardSQLFunction( "length", Hibernate.INTEGER ) );
-		registerFunction("char_length", new StandardSQLFunction( "char_length", Hibernate.INTEGER ) );
-		registerFunction("character_length", new StandardSQLFunction( "character_length", Hibernate.INTEGER ) );
-		registerFunction("octet_length", new StandardSQLFunction( "octet_length", Hibernate.INTEGER ) );
-
-		registerFunction("ascii", new StandardSQLFunction("ascii", Hibernate.INTEGER) );
-		registerFunction("chr", new StandardSQLFunction("chr", Hibernate.CHARACTER) );
-		registerFunction("chr1", new StandardSQLFunction("chr1", Hibernate.CHARACTER) );
-		registerFunction("subseq", new StandardSQLFunction("subseq", Hibernate.STRING ) );
-		registerFunction("substring", new StandardSQLFunction("substring", Hibernate.STRING ) );
-		registerFunction("left", new StandardSQLFunction( "left", Hibernate.STRING ) );
-		registerFunction("right", new StandardSQLFunction( "right", Hibernate.STRING ) );
-		registerFunction("ltrim", new StandardSQLFunction("ltrim", Hibernate.STRING ) );
-		registerFunction("rtrim", new StandardSQLFunction("rtrim", Hibernate.STRING ) );
-		registerFunction("trim", new StandardSQLFunction("trim", Hibernate.STRING ) );
-
-		registerFunction("repeat", new StandardSQLFunction( "repeat", Hibernate.STRING ) );
-		registerFunction("space", new StandardSQLFunction("space", Hibernate.STRING) );
-
-		registerFunction("make_string", new StandardSQLFunction("make_string", Hibernate.STRING) );
-		registerFunction("make_wstring", new StandardSQLFunction("make_wstring", Hibernate.STRING) );
-		registerFunction("make_bin_string", new StandardSQLFunction("make_bin_string", Hibernate.BINARY) );
-		registerFunction("concatenate", new StandardSQLFunction("concatenate", Hibernate.STRING) );
-
-		registerFunction("concat", new StandardSQLFunction( "concat", Hibernate.STRING ) );
-		registerFunction("replace", new StandardSQLFunction( "replace", Hibernate.STRING ) );
-
-		registerFunction("sprintf", new StandardSQLFunction( "sprintf", Hibernate.STRING ) );
-		registerFunction("sprintf_or_null", new StandardSQLFunction( "sprintf_or_null", Hibernate.STRING ) );
-		registerFunction("sprintf_iri", new StandardSQLFunction( "sprintf_iri", Hibernate.STRING ) );
-		registerFunction("sprintf_iri_or_null", new StandardSQLFunction( "sprintf_iri_or_null", Hibernate.STRING ) );
-
-		registerFunction("strchr", new StandardSQLFunction("strchr", Hibernate.INTEGER) );
-		registerFunction("strrchr", new StandardSQLFunction("strrchr", Hibernate.INTEGER) );
-		registerFunction("strstr", new StandardSQLFunction("strstr", Hibernate.INTEGER) );
-		registerFunction("strindex", new StandardSQLFunction("strindex", Hibernate.INTEGER) );
-		registerFunction("strcasestr", new StandardSQLFunction("strcasestr", Hibernate.INTEGER) );
-		registerFunction("locate", new StandardSQLFunction("locate", Hibernate.INTEGER ) );
-		registerFunction("matches_like", new StandardSQLFunction("matches_like", Hibernate.INTEGER ) );
-
-
-		registerFunction("__like_min", new StandardSQLFunction( "__like_min", Hibernate.STRING ) );
-		registerFunction("__like_max", new StandardSQLFunction( "__like_max", Hibernate.STRING ) );
-		registerFunction("fix_identifier_case", new StandardSQLFunction( "fix_identifier_case", Hibernate.STRING ) );
-		registerFunction("casemode_strcmp", new StandardSQLFunction("casemode_strcmp", Hibernate.INTEGER ) );
-
-
-		registerFunction("lcase", new StandardSQLFunction("lcase", Hibernate.STRING ) );
-		registerFunction("lower", new StandardSQLFunction("lower", Hibernate.STRING ) );
-		registerFunction("ucase", new StandardSQLFunction("ucase", Hibernate.STRING ) );
-		registerFunction("upper", new StandardSQLFunction("upper", Hibernate.STRING ) );
-		registerFunction("initcap", new StandardSQLFunction("initcap", Hibernate.STRING ) );
-
-
-		registerFunction("table_type", new StandardSQLFunction("table_type", Hibernate.STRING ) );
-		registerFunction("internal_type_name", new StandardSQLFunction("internal_type_name", Hibernate.STRING ) );
-		registerFunction("internal_type", new StandardSQLFunction("internal_type", Hibernate.INTEGER ) );
-		registerFunction("isinteger", new StandardSQLFunction("isinteger", Hibernate.INTEGER ) );
-		registerFunction("isnumeric", new StandardSQLFunction("isnumeric", Hibernate.INTEGER ) );
-		registerFunction("isfloat", new StandardSQLFunction("isfloat", Hibernate.INTEGER ) );
-		registerFunction("isdouble", new StandardSQLFunction("isdouble", Hibernate.INTEGER ) );
-		registerFunction("isnull", new StandardSQLFunction("isnull", Hibernate.INTEGER ) );
-		registerFunction("isnotnull", new StandardSQLFunction("isnotnull", Hibernate.INTEGER ) );
-		registerFunction("isblob", new StandardSQLFunction("isblob", Hibernate.INTEGER ) );
-		registerFunction("isentity", new StandardSQLFunction("isentity", Hibernate.INTEGER ) );
-		registerFunction("isstring", new StandardSQLFunction("isstring", Hibernate.INTEGER ) );
-		registerFunction("isbinary", new StandardSQLFunction("isbinary", Hibernate.INTEGER ) );
-		registerFunction("isarray", new StandardSQLFunction("isarray", Hibernate.INTEGER ) );
-		registerFunction("isiri_id", new StandardSQLFunction("isiri_id", Hibernate.INTEGER ) );
-		registerFunction("is_named_iri_id", new StandardSQLFunction("is_named_iri_id", Hibernate.INTEGER ) );
-		registerFunction("is_bnode_iri_id", new StandardSQLFunction("is_bnode_iri_id", Hibernate.INTEGER ) );
-		registerFunction("isuname", new StandardSQLFunction("isuname", Hibernate.INTEGER ) );
-
-
-		registerFunction("username", new NoArgSQLFunction( "username", Hibernate.STRING, true ) );
-		registerFunction("dbname", new NoArgSQLFunction( "dbname", Hibernate.STRING, true ) );
+		registerFunction("length", new StandardSQLFunction( "length", StandardBasicTypes.INTEGER ) );
+		registerFunction("char_length", new StandardSQLFunction( "char_length", StandardBasicTypes.INTEGER ) );
+		registerFunction("character_length", new StandardSQLFunction( "character_length", StandardBasicTypes.INTEGER ) );
+		registerFunction("octet_length", new StandardSQLFunction( "octet_length", StandardBasicTypes.INTEGER ) );
+
+		registerFunction("ascii", new StandardSQLFunction("ascii", StandardBasicTypes.INTEGER) );
+		registerFunction("chr", new StandardSQLFunction("chr", StandardBasicTypes.CHARACTER) );
+		registerFunction("chr1", new StandardSQLFunction("chr1", StandardBasicTypes.CHARACTER) );
+		registerFunction("subseq", new StandardSQLFunction("subseq", StandardBasicTypes.STRING ) );
+		registerFunction("substring", new StandardSQLFunction("substring", StandardBasicTypes.STRING ) );
+		registerFunction("left", new StandardSQLFunction( "left", StandardBasicTypes.STRING ) );
+		registerFunction("right", new StandardSQLFunction( "right", StandardBasicTypes.STRING ) );
+		registerFunction("ltrim", new StandardSQLFunction("ltrim", StandardBasicTypes.STRING ) );
+		registerFunction("rtrim", new StandardSQLFunction("rtrim", StandardBasicTypes.STRING ) );
+		registerFunction("trim", new StandardSQLFunction("trim", StandardBasicTypes.STRING ) );
+
+		registerFunction("repeat", new StandardSQLFunction( "repeat", StandardBasicTypes.STRING ) );
+		registerFunction("space", new StandardSQLFunction("space", StandardBasicTypes.STRING) );
+
+		registerFunction("make_string", new StandardSQLFunction("make_string", StandardBasicTypes.STRING) );
+		registerFunction("make_wstring", new StandardSQLFunction("make_wstring", StandardBasicTypes.STRING) );
+		registerFunction("make_bin_string", new StandardSQLFunction("make_bin_string", StandardBasicTypes.BINARY) );
+		registerFunction("concatenate", new StandardSQLFunction("concatenate", StandardBasicTypes.STRING) );
+
+		registerFunction("concat", new StandardSQLFunction( "concat", StandardBasicTypes.STRING ) );
+		registerFunction("replace", new StandardSQLFunction( "replace", StandardBasicTypes.STRING ) );
+
+		registerFunction("sprintf", new StandardSQLFunction( "sprintf", StandardBasicTypes.STRING ) );
+		registerFunction("sprintf_or_null", new StandardSQLFunction( "sprintf_or_null", StandardBasicTypes.STRING ) );
+		registerFunction("sprintf_iri", new StandardSQLFunction( "sprintf_iri", StandardBasicTypes.STRING ) );
+		registerFunction("sprintf_iri_or_null", new StandardSQLFunction( "sprintf_iri_or_null", StandardBasicTypes.STRING ) );
+		
+		registerFunction("strchr", new StandardSQLFunction("strchr", StandardBasicTypes.INTEGER) );
+		registerFunction("strrchr", new StandardSQLFunction("strrchr", StandardBasicTypes.INTEGER) );
+		registerFunction("strstr", new StandardSQLFunction("strstr", StandardBasicTypes.INTEGER) );
+		registerFunction("strindex", new StandardSQLFunction("strindex", StandardBasicTypes.INTEGER) );
+		registerFunction("strcasestr", new StandardSQLFunction("strcasestr", StandardBasicTypes.INTEGER) );
+		registerFunction("locate", new StandardSQLFunction("locate", StandardBasicTypes.INTEGER ) );
+		registerFunction("matches_like", new StandardSQLFunction("matches_like", StandardBasicTypes.INTEGER ) );
+
+
+		registerFunction("__like_min", new StandardSQLFunction( "__like_min", StandardBasicTypes.STRING ) );
+		registerFunction("__like_max", new StandardSQLFunction( "__like_max", StandardBasicTypes.STRING ) );
+		registerFunction("fix_identifier_case", new StandardSQLFunction( "fix_identifier_case", StandardBasicTypes.STRING ) );
+		registerFunction("casemode_strcmp", new StandardSQLFunction("casemode_strcmp", StandardBasicTypes.INTEGER ) );
+
+
+		registerFunction("lcase", new StandardSQLFunction("lcase", StandardBasicTypes.STRING ) );
+		registerFunction("lower", new StandardSQLFunction("lower", StandardBasicTypes.STRING ) );
+		registerFunction("ucase", new StandardSQLFunction("ucase", StandardBasicTypes.STRING ) );
+		registerFunction("upper", new StandardSQLFunction("upper", StandardBasicTypes.STRING ) );
+		registerFunction("initcap", new StandardSQLFunction("initcap", StandardBasicTypes.STRING ) );
+
+
+		registerFunction("table_type", new StandardSQLFunction("table_type", StandardBasicTypes.STRING ) );
+		registerFunction("internal_type_name", new StandardSQLFunction("internal_type_name", StandardBasicTypes.STRING ) );
+		registerFunction("internal_type", new StandardSQLFunction("internal_type", StandardBasicTypes.INTEGER ) );
+		registerFunction("isinteger", new StandardSQLFunction("isinteger", StandardBasicTypes.INTEGER ) );
+		registerFunction("isnumeric", new StandardSQLFunction("isnumeric", StandardBasicTypes.INTEGER ) );
+		registerFunction("isfloat", new StandardSQLFunction("isfloat", StandardBasicTypes.INTEGER ) );
+		registerFunction("isdouble", new StandardSQLFunction("isdouble", StandardBasicTypes.INTEGER ) );
+		registerFunction("isnull", new StandardSQLFunction("isnull", StandardBasicTypes.INTEGER ) );
+		registerFunction("isnotnull", new StandardSQLFunction("isnotnull", StandardBasicTypes.INTEGER ) );
+		registerFunction("isblob", new StandardSQLFunction("isblob", StandardBasicTypes.INTEGER ) );
+		registerFunction("isentity", new StandardSQLFunction("isentity", StandardBasicTypes.INTEGER ) );
+		registerFunction("isstring", new StandardSQLFunction("isstring", StandardBasicTypes.INTEGER ) );
+		registerFunction("isbinary", new StandardSQLFunction("isbinary", StandardBasicTypes.INTEGER ) );
+		registerFunction("isarray", new StandardSQLFunction("isarray", StandardBasicTypes.INTEGER ) );
+		registerFunction("isiri_id", new StandardSQLFunction("isiri_id", StandardBasicTypes.INTEGER ) );
+		registerFunction("is_named_iri_id", new StandardSQLFunction("is_named_iri_id", StandardBasicTypes.INTEGER ) );
+		registerFunction("is_bnode_iri_id", new StandardSQLFunction("is_bnode_iri_id", StandardBasicTypes.INTEGER ) );
+		registerFunction("isuname", new StandardSQLFunction("isuname", StandardBasicTypes.INTEGER ) );
+
+
+		registerFunction("username", new NoArgSQLFunction( "username", StandardBasicTypes.STRING, true ) );
+		registerFunction("dbname", new NoArgSQLFunction( "dbname", StandardBasicTypes.STRING, true ) );
 		registerFunction("ifnull", new VarArgsSQLFunction( "ifnull(", ",", ")" ) );
-		registerFunction("get_user", new NoArgSQLFunction( "get_user", Hibernate.STRING, true ) );
-
-
-		registerFunction("dayname", new StandardSQLFunction( "dayname", Hibernate.STRING ) );
-		registerFunction("monthname", new StandardSQLFunction( "monthname", Hibernate.STRING ) );
-		registerFunction("now", new NoArgSQLFunction( "now", Hibernate.TIMESTAMP ) );
-		registerFunction("curdate", new NoArgSQLFunction( "curdate", Hibernate.DATE ) );
-		registerFunction("dayofmonth", new StandardSQLFunction( "dayofmonth", Hibernate.INTEGER ) );
-		registerFunction("dayofweek", new StandardSQLFunction( "dayofweek", Hibernate.INTEGER ) );
-		registerFunction("dayofyear", new StandardSQLFunction( "dayofyear", Hibernate.INTEGER ) );
-		registerFunction("quarter", new StandardSQLFunction( "quarter", Hibernate.INTEGER ) );
-		registerFunction("week", new StandardSQLFunction( "week", Hibernate.INTEGER ) );
-		registerFunction("month", new StandardSQLFunction( "month", Hibernate.INTEGER ) );
-		registerFunction("year", new StandardSQLFunction( "year", Hibernate.INTEGER ) );
-		registerFunction("hour", new StandardSQLFunction( "hour", Hibernate.INTEGER ) );
-		registerFunction("minute", new StandardSQLFunction( "minute", Hibernate.INTEGER ) );
-		registerFunction("second", new StandardSQLFunction( "second", Hibernate.INTEGER ) );
-		registerFunction("timezone", new StandardSQLFunction( "timezone", Hibernate.INTEGER ) );
-		registerFunction("curtime", new StandardSQLFunction( "curtime", Hibernate.TIME ) );
-		registerFunction("getdate", new NoArgSQLFunction( "getdate", Hibernate.TIMESTAMP ) );
-		registerFunction("curdatetime", new NoArgSQLFunction( "curdatetime", Hibernate.TIMESTAMP ) );
-
-		registerFunction( "datediff", new StandardSQLFunction( "datediff", Hibernate.INTEGER ) );
-		registerFunction( "dateadd", new StandardSQLFunction( "dateadd", Hibernate.TIMESTAMP ) );
-		registerFunction( "timestampdiff", new StandardSQLFunction( "timestampdiff", Hibernate.INTEGER ) );
-		registerFunction( "timestampadd", new StandardSQLFunction( "timestampadd", Hibernate.TIMESTAMP ) );
+		registerFunction("get_user", new NoArgSQLFunction( "get_user", StandardBasicTypes.STRING, true ) );
+
+
+		registerFunction("dayname", new StandardSQLFunction( "dayname", StandardBasicTypes.STRING ) );
+		registerFunction("monthname", new StandardSQLFunction( "monthname", StandardBasicTypes.STRING ) );
+		registerFunction("now", new NoArgSQLFunction( "now", StandardBasicTypes.TIMESTAMP ) );
+		registerFunction("curdate", new NoArgSQLFunction( "curdate", StandardBasicTypes.DATE ) );
+		registerFunction("dayofmonth", new StandardSQLFunction( "dayofmonth", StandardBasicTypes.INTEGER ) );
+		registerFunction("dayofweek", new StandardSQLFunction( "dayofweek", StandardBasicTypes.INTEGER ) );
+		registerFunction("dayofyear", new StandardSQLFunction( "dayofyear", StandardBasicTypes.INTEGER ) );
+		registerFunction("quarter", new StandardSQLFunction( "quarter", StandardBasicTypes.INTEGER ) );
+		registerFunction("week", new StandardSQLFunction( "week", StandardBasicTypes.INTEGER ) );
+		registerFunction("month", new StandardSQLFunction( "month", StandardBasicTypes.INTEGER ) );
+		registerFunction("year", new StandardSQLFunction( "year", StandardBasicTypes.INTEGER ) );
+		registerFunction("hour", new StandardSQLFunction( "hour", StandardBasicTypes.INTEGER ) );
+		registerFunction("minute", new StandardSQLFunction( "minute", StandardBasicTypes.INTEGER ) );
+		registerFunction("second", new StandardSQLFunction( "second", StandardBasicTypes.INTEGER ) );
+		registerFunction("timezone", new StandardSQLFunction( "timezone", StandardBasicTypes.INTEGER ) );
+		registerFunction("curtime", new StandardSQLFunction( "curtime", StandardBasicTypes.TIME ) );
+		registerFunction("getdate", new NoArgSQLFunction( "getdate", StandardBasicTypes.TIMESTAMP ) );
+		registerFunction("curdatetime", new NoArgSQLFunction( "curdatetime", StandardBasicTypes.TIMESTAMP ) );
+
+		registerFunction( "datediff", new StandardSQLFunction( "datediff", StandardBasicTypes.INTEGER ) );
+		registerFunction( "dateadd", new StandardSQLFunction( "dateadd", StandardBasicTypes.TIMESTAMP ) );
+		registerFunction( "timestampdiff", new StandardSQLFunction( "timestampdiff", StandardBasicTypes.INTEGER ) );
+		registerFunction( "timestampadd", new StandardSQLFunction( "timestampadd", StandardBasicTypes.TIMESTAMP ) );
 
 
 //============================
@@ -1006,6 +1007,12 @@ public class VirtuosoDialect extends Dialect {
 	/**
 	 * Is it supported to materialize a LOB locator outside the transaction in
 	 * which it was created?
+	 * <p/>
+	 * Again, part of the trickiness here is the fact that this is largely
+	 * driver dependent.
+	 * <p/>
+	 * NOTE: all database I have tested which {@link #supportsExpectedLobUsagePattern()}
+	 * also support the ability to materialize a LOB outside the owning transaction...
 	 *
 	 * @return True if unbounded materialization is supported; false otherwise.
 	 * @since 3.2
diff --git a/binsrc/hosting/Makefile.am b/binsrc/hosting/Makefile.am
index 696a5de..1b12a28 100644
--- a/binsrc/hosting/Makefile.am
+++ b/binsrc/hosting/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/Makefile.in b/binsrc/hosting/Makefile.in
index d9e6adc..b1d45e8 100644
--- a/binsrc/hosting/Makefile.in
+++ b/binsrc/hosting/Makefile.in
@@ -118,6 +118,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -166,6 +167,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -217,6 +219,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -263,7 +266,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -293,7 +295,7 @@ vaddir = @vaddir@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/fcgi/GNUmakefile b/binsrc/hosting/fcgi/GNUmakefile
index bc0fcc3..990d0be 100644
--- a/binsrc/hosting/fcgi/GNUmakefile
+++ b/binsrc/hosting/fcgi/GNUmakefile
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/fcgi/cgi_fcgi.c b/binsrc/hosting/fcgi/cgi_fcgi.c
index 6fddad0..d7521d3 100644
--- a/binsrc/hosting/fcgi/cgi_fcgi.c
+++ b/binsrc/hosting/fcgi/cgi_fcgi.c
@@ -1,14 +1,14 @@
 /*
  *  cgi_fcgi.c
  *
- *  $Id: cgi_fcgi.c,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+ *  $Id: cgi_fcgi.c,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso FastCGI hosting plugin fcgi iface
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/fcgi/hosting_fcgi.c b/binsrc/hosting/fcgi/hosting_fcgi.c
index ea6a5bb..4f9f72a 100644
--- a/binsrc/hosting/fcgi/hosting_fcgi.c
+++ b/binsrc/hosting/fcgi/hosting_fcgi.c
@@ -1,14 +1,14 @@
 /*
  *  hosting_fcgi.c
  *
- *  $Id: hosting_fcgi.c,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+ *  $Id: hosting_fcgi.c,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso FastCGI hosting plugin virtuoso iface
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/fcgi/hosting_fcgi.h b/binsrc/hosting/fcgi/hosting_fcgi.h
index 996a729..08b3113 100644
--- a/binsrc/hosting/fcgi/hosting_fcgi.h
+++ b/binsrc/hosting/fcgi/hosting_fcgi.h
@@ -1,14 +1,14 @@
 /*
  *  hosting_fcgi.h
  *
- *  $Id: hosting_fcgi.h,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+ *  $Id: hosting_fcgi.h,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso FastCGI hosting plugin header
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/Makefile.am b/binsrc/hosting/mono/Makefile.am
index 0495f61..f13091c 100644
--- a/binsrc/hosting/mono/Makefile.am
+++ b/binsrc/hosting/mono/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/Makefile.in b/binsrc/hosting/mono/Makefile.in
index 485be25..4a7adca 100644
--- a/binsrc/hosting/mono/Makefile.in
+++ b/binsrc/hosting/mono/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -217,6 +217,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -265,6 +266,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -316,6 +318,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -362,7 +365,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hosting/mono/basec.c b/binsrc/hosting/mono/basec.c
index 03333cd..5da6ad5 100644
--- a/binsrc/hosting/mono/basec.c
+++ b/binsrc/hosting/mono/basec.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: basec.c,v 1.3.2.2 2010/01/29 16:16:46 source Exp $
+ *  $Id: basec.c,v 1.3.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/clr.def b/binsrc/hosting/mono/clr.def
index be5df2c..dd2c94f 100644
--- a/binsrc/hosting/mono/clr.def
+++ b/binsrc/hosting/mono/clr.def
@@ -1,14 +1,14 @@
 ;
 ;  libviwin32.def
 ;
-;  $Id: clr.def,v 1.1.2.1 2010/01/25 23:34:12 source Exp $
+;  $Id: clr.def,v 1.1.2.2 2012/03/08 12:55:00 source Exp $
 ;
 ;  Link script for the OpenLink Virtuoso VDBMS Server DLL
 ;
 ;  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 ;  project.
 ;
-;  Copyright (C) 1998-2010 OpenLink Software
+;  Copyright (C) 1998-2012 OpenLink Software
 ;
 ;  This project is free software; you can redistribute it and/or modify it
 ;  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/clr_ll_api.h b/binsrc/hosting/mono/clr_ll_api.h
index 2aabc69..68b6db2 100644
--- a/binsrc/hosting/mono/clr_ll_api.h
+++ b/binsrc/hosting/mono/clr_ll_api.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: clr_ll_api.h,v 1.1.1.1.2.1 2010/01/25 23:34:12 source Exp $
+ *  $Id: clr_ll_api.h,v 1.1.1.1.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/dotnet.cpp b/binsrc/hosting/mono/dotnet.cpp
index d7cea79..eb23c32 100644
--- a/binsrc/hosting/mono/dotnet.cpp
+++ b/binsrc/hosting/mono/dotnet.cpp
@@ -1,10 +1,10 @@
 /*
- *  $Id: dotnet.cpp,v 1.2.2.1 2010/01/25 23:34:12 source Exp $
+ *  $Id: dotnet.cpp,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/import_clr.sql b/binsrc/hosting/mono/import_clr.sql
index 7b05a01..7d1d636 100644
--- a/binsrc/hosting/mono/import_clr.sql
+++ b/binsrc/hosting/mono/import_clr.sql
@@ -1,10 +1,10 @@
 --
---  $Id: import_clr.sql,v 1.2.2.1 2010/01/25 23:34:12 source Exp $
+--  $Id: import_clr.sql,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/mono.c b/binsrc/hosting/mono/mono.c
index 095d428..6fb85af 100644
--- a/binsrc/hosting/mono/mono.c
+++ b/binsrc/hosting/mono/mono.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: mono.c,v 1.1.1.1.2.1 2010/01/25 23:34:13 source Exp $
+ *  $Id: mono.c,v 1.1.1.1.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/mono.h b/binsrc/hosting/mono/mono.h
index 3d763d0..f0891a0 100644
--- a/binsrc/hosting/mono/mono.h
+++ b/binsrc/hosting/mono/mono.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: mono.h,v 1.2.2.2 2010/01/29 16:16:46 source Exp $
+ *  $Id: mono.h,v 1.2.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/mono_type.xsl b/binsrc/hosting/mono/mono_type.xsl
index 8744380..c73bc94 100644
--- a/binsrc/hosting/mono/mono_type.xsl
+++ b/binsrc/hosting/mono/mono_type.xsl
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: mono_type.xsl,v 1.2.2.1 2010/01/25 23:34:13 source Exp $
+ -  $Id: mono_type.xsl,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/sql_code_clr.c b/binsrc/hosting/mono/sql_code_clr.c
index 2905e50..edd9ebb 100644
--- a/binsrc/hosting/mono/sql_code_clr.c
+++ b/binsrc/hosting/mono/sql_code_clr.c
@@ -1151,23 +1151,25 @@ static const char *proc24 =
 #define isp_schema(x) isp_schema_1(x)
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/binsrc/hosting/mono/sql_code_xslt.c b/binsrc/hosting/mono/sql_code_xslt.c
index b42144a..8953901 100644
--- a/binsrc/hosting/mono/sql_code_xslt.c
+++ b/binsrc/hosting/mono/sql_code_xslt.c
@@ -9,12 +9,12 @@
 static const char *xsl1[]= {
 "<!--\n"
 " -\n"
-" -  $Id: mono_type.xsl,v 1.2.2.1 2010/01/25 23:34:13 source Exp $\n"
+" -  $Id: mono_type.xsl,v 1.2.2.2 2012/03/08 12:55:00 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -183,23 +183,25 @@ static query_t *xslt_define_qr;
   }
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/binsrc/hosting/mono/tests/Makefile.am b/binsrc/hosting/mono/tests/Makefile.am
index 79d3fa9..3888a83 100644
--- a/binsrc/hosting/mono/tests/Makefile.am
+++ b/binsrc/hosting/mono/tests/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/Makefile.in b/binsrc/hosting/mono/tests/Makefile.in
index 7e5bf00..21c91e6 100644
--- a/binsrc/hosting/mono/tests/Makefile.in
+++ b/binsrc/hosting/mono/tests/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -101,6 +101,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -149,6 +150,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -200,6 +202,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -246,7 +249,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hosting/mono/tests/Point.cs b/binsrc/hosting/mono/tests/Point.cs
index 66fd369..af9b7c4 100644
--- a/binsrc/hosting/mono/tests/Point.cs
+++ b/binsrc/hosting/mono/tests/Point.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/Point_ho_s_10.cs b/binsrc/hosting/mono/tests/Point_ho_s_10.cs
index 9048f30..67592b8 100644
--- a/binsrc/hosting/mono/tests/Point_ho_s_10.cs
+++ b/binsrc/hosting/mono/tests/Point_ho_s_10.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/clr_suite_types.sql b/binsrc/hosting/mono/tests/clr_suite_types.sql
index 2dc36bf..40bbb13 100644
--- a/binsrc/hosting/mono/tests/clr_suite_types.sql
+++ b/binsrc/hosting/mono/tests/clr_suite_types.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: clr_suite_types.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: clr_suite_types.sql,v 1.2.2.1 2012/03/08 12:55:00 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/clr_test2.sql b/binsrc/hosting/mono/tests/clr_test2.sql
index 40f906c..d8fb1de 100644
--- a/binsrc/hosting/mono/tests/clr_test2.sql
+++ b/binsrc/hosting/mono/tests/clr_test2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: clr_test2.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: clr_test2.sql,v 1.2.2.1 2012/03/08 12:55:00 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/sample.cs b/binsrc/hosting/mono/tests/sample.cs
index 9046bfa..8702a61 100644
--- a/binsrc/hosting/mono/tests/sample.cs
+++ b/binsrc/hosting/mono/tests/sample.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/tax.cs b/binsrc/hosting/mono/tests/tax.cs
index 447d78b..9670af0 100644
--- a/binsrc/hosting/mono/tests/tax.cs
+++ b/binsrc/hosting/mono/tests/tax.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/tclrsrv.sh b/binsrc/hosting/mono/tests/tclrsrv.sh
index e191afd..3653dad 100755
--- a/binsrc/hosting/mono/tests/tclrsrv.sh
+++ b/binsrc/hosting/mono/tests/tclrsrv.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: tclrsrv.sh,v 1.2 2009/04/14 12:16:49 source Exp $
+#  $Id: tclrsrv.sh,v 1.2.2.1 2012/03/08 12:55:00 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/test_point_clr.sql b/binsrc/hosting/mono/tests/test_point_clr.sql
index d8be8a9..d1d0e3f 100644
--- a/binsrc/hosting/mono/tests/test_point_clr.sql
+++ b/binsrc/hosting/mono/tests/test_point_clr.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test_point_clr.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: test_point_clr.sql,v 1.2.2.1 2012/03/08 12:55:00 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/tests/test_tax_clr.sql b/binsrc/hosting/mono/tests/test_tax_clr.sql
index dc25c5f..bef466c 100644
--- a/binsrc/hosting/mono/tests/test_tax_clr.sql
+++ b/binsrc/hosting/mono/tests/test_tax_clr.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test_tax_clr.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: test_tax_clr.sql,v 1.2.2.1 2012/03/08 12:55:00 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/virt_http.cs b/binsrc/hosting/mono/virt_http.cs
index 200fdfd..d953ce3 100644
--- a/binsrc/hosting/mono/virt_http.cs
+++ b/binsrc/hosting/mono/virt_http.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2010 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/mono/virtclr.cs b/binsrc/hosting/mono/virtclr.cs
index 775f8e9..bac490d 100644
--- a/binsrc/hosting/mono/virtclr.cs
+++ b/binsrc/hosting/mono/virtclr.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2010 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/perl/Makefile.am b/binsrc/hosting/perl/Makefile.am
index a87bc87..fb55de4 100644
--- a/binsrc/hosting/perl/Makefile.am
+++ b/binsrc/hosting/perl/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/perl/Makefile.in b/binsrc/hosting/perl/Makefile.in
index b541e4c..0aa1cfd 100644
--- a/binsrc/hosting/perl/Makefile.in
+++ b/binsrc/hosting/perl/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -148,6 +148,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -196,6 +197,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -247,6 +249,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -293,7 +296,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hosting/perl/hosting_perl.c b/binsrc/hosting/perl/hosting_perl.c
index 137dcac..2c67be4 100644
--- a/binsrc/hosting/perl/hosting_perl.c
+++ b/binsrc/hosting/perl/hosting_perl.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/perl/pl_to_c.awk b/binsrc/hosting/perl/pl_to_c.awk
index 369610f..eb4a07d 100644
--- a/binsrc/hosting/perl/pl_to_c.awk
+++ b/binsrc/hosting/perl/pl_to_c.awk
@@ -3,7 +3,7 @@ BEGIN {
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -42,7 +42,7 @@ END {
     }
 
   x = $0
-  gsub (/\\/, "\\\\", x)
+  gsub ( "\\\\", "&&", x)
   gsub (/\"/, "\\\"", x)
   print "\"" x "\\n\""
 }
diff --git a/binsrc/hosting/perl/virt_handler.c b/binsrc/hosting/perl/virt_handler.c
index 21d4632..e6b83cc 100644
--- a/binsrc/hosting/perl/virt_handler.c
+++ b/binsrc/hosting/perl/virt_handler.c
@@ -3,7 +3,7 @@ static char *virt_handler =
 "#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 "#  project.\n"
 "#  \n"
-"#  Copyright (C) 1998-2006 OpenLink Software\n"
+"#  Copyright (C) 1998-2012 OpenLink Software\n"
 "#  \n"
 "#  This project is free software; you can redistribute it and/or modify it\n"
 "#  under the terms of the GNU General Public License as published by the\n"
diff --git a/binsrc/hosting/perl/virt_handler.pm b/binsrc/hosting/perl/virt_handler.pm
index be1fccf..2128c31 100644
--- a/binsrc/hosting/perl/virt_handler.pm
+++ b/binsrc/hosting/perl/virt_handler.pm
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/php/Makefile.am b/binsrc/hosting/php/Makefile.am
index 9b52d03..911d737 100644
--- a/binsrc/hosting/php/Makefile.am
+++ b/binsrc/hosting/php/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/php/Makefile.in b/binsrc/hosting/php/Makefile.in
index 14f1cce..cc21d91 100644
--- a/binsrc/hosting/php/Makefile.in
+++ b/binsrc/hosting/php/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -146,6 +146,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -194,6 +195,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -245,6 +247,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -291,7 +294,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hosting/php/hosting_php.c b/binsrc/hosting/php/hosting_php.c
index 26a0b2a..a8c014a 100644
--- a/binsrc/hosting/php/hosting_php.c
+++ b/binsrc/hosting/php/hosting_php.c
@@ -1,12 +1,12 @@
 /*
  *  hosting_php.c
  *
- *  $Id: hosting_php.c,v 1.4.2.1 2010/11/08 12:35:44 source Exp $
+ *  $Id: hosting_php.c,v 1.4.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -34,14 +34,16 @@
 #undef XML_DTD
 
 #ifdef _WIN32
-#define HAVE_STRTOK_R
-#define HAVE_SOCKLEN_T
+#define HAVE_STRTOK_R 1
+#define HAVE_SOCKLEN_T 1
 #define C_BEGIN()
 #define C_END()
 #define _HSREGEX_H
 #undef ssize_t
 #undef strcasecmp
 #undef strncasecmp
+#else
+#define strnicmp strncasecmp
 #endif
 
 #include "php.h"
@@ -206,7 +208,6 @@ virtm_http_handler (void *cli, char *err, int max_len,
     int compile_only)
 {
   zend_file_handle file_handle;
-  char *ret_str;
   box_t *hret;
   vreq_t req;
 
@@ -252,12 +253,10 @@ virtm_http_handler (void *cli, char *err, int max_len,
   hret[1] = (box_t) strses_string (req.r_hdr_session);
   *head_ret = (char *) hret;
 
-  ret_str = req.ret_session;
-
   strses_free (req.s_hdr_session);
   strses_free (req.r_hdr_session);
 
-  return ret_str;
+  return (char *) req.ret_session;
 }
 
 
@@ -360,6 +359,9 @@ static void sapi_virtuoso_flush (void *server_context);
 static char *sapi_virtuoso_getenv (char *name, size_t name_len TSRMLS_DC);
 static int sapi_virtuoso_header_handler (
     sapi_header_struct *sapi_header,
+#if PHP_VERSION_ID >= 50300
+    sapi_header_op_enum op,
+#endif
     sapi_headers_struct *sapi_headers TSRMLS_DC);
 static int sapi_virtuoso_send_headers (
     sapi_headers_struct *sapi_headers TSRMLS_DC);
@@ -371,7 +373,7 @@ static void sapi_virtuoso_log_message (char *message);
 static sapi_module_struct virtuoso_sapi_module =
   {
     "Virtuoso",				/* name */
-    "Virtuoso Hosting Plugin",		/* pretty name */
+    "Virtuoso Universal Server",	/* pretty name */
 
     sapi_virtuoso_startup,		/* startup */
     php_module_shutdown_wrapper,	/* shutdown */
@@ -474,12 +476,30 @@ sapi_virtuoso_getenv (char *name, size_t name_len TSRMLS_DC)
 static int
 sapi_virtuoso_header_handler (
     sapi_header_struct *sapi_header,
+#if PHP_VERSION_ID >= 50300
+    sapi_header_op_enum op,
+#endif
     sapi_headers_struct *sapi_headers TSRMLS_DC)
 {
   vreq_t *r = ((vreq_t *) SG (server_context));
 
+#if PHP_VERSION_ID >= 50300
+  if (op != SAPI_HEADER_ADD && op != SAPI_HEADER_REPLACE)
+    return SAPI_HEADER_ADD;
+#endif
+
   if (sapi_header && sapi_header->header_len && sapi_header->header && r->r_hdr_session)
     {
+      /* Custom Content-length headers seem to confuse Virtuoso...
+       * Bad idea anyway. Use the correct calculated value instead.
+       */
+      static const char content_length[] = "content-length: ";
+      if (sapi_header->header_len > sizeof(content_length) - 1 &&
+	  !strnicmp (sapi_header->header, content_length, sizeof (content_length) - 1))
+	{
+	  return SAPI_HEADER_ADD;
+	}
+
       session_buffered_write (r->r_hdr_session, sapi_header->header,
 	  sapi_header->header_len);
       session_buffered_write (r->r_hdr_session, "\r\n", 2);
@@ -561,7 +581,7 @@ sapi_virtuoso_register_server_variables (zval *track_vars_array TSRMLS_DC)
       php_register_variable ("PHP_SELF", val, track_vars_array TSRMLS_CC);
 #else
       if (sapi_module.input_filter (PARSE_SERVER, "PHP_SELF", &val,
-	    strlen (val), &new_val_len TSRMLS_CC))
+	    (uint) strlen (val), &new_val_len TSRMLS_CC))
 	{
 	  php_register_variable ("PHP_SELF", val, track_vars_array TSRMLS_CC);
 	}
@@ -641,9 +661,9 @@ PHP_MINFO_FUNCTION (virtuoso)
   int i;
 
   php_info_print_table_start ();
-  php_info_print_table_row (2, "Plugin Version", DBMS_SRV_VER);
+  php_info_print_table_row (2, "Server Version", DBMS_SRV_VER);
   php_info_print_table_row (2, "Build Date", __DATE__);
-  php_info_print_table_row (2, "Revision", "$Revision: 1.4.2.1 $");
+  php_info_print_table_row (2, "Revision", "$Revision: 1.4.2.3 $");
   php_info_print_table_end ();
 
   DISPLAY_INI_ENTRIES ();
@@ -717,31 +737,19 @@ static
 PHP_FUNCTION (__virt_internal_dsn)
 {
   client_connection_t *cli;
-  zval **pv_dsn;
   user_t *usr;
-  char *dsn;
+  char *dsn = NULL;
+  int dsn_len;
   char *connstr;
-  int argc;
 
-  argc = ZEND_NUM_ARGS ();
-  if (argc == 0)
-    {
-      dsn = VG (local_dsn);
-    }
-  else if (argc == 1)
-    {
-      if (zend_get_parameters_ex (1, &pv_dsn) == FAILURE)
-	{
-	  WRONG_PARAM_COUNT;
-	}
-      convert_to_string_ex (pv_dsn);
-      dsn = Z_STRVAL_PP (pv_dsn);
-    }
-  else
-    {
-      WRONG_PARAM_COUNT;
-    }
+  /* get the dsn argument, or use the default ('Local Virtuoso') if not given */
+  if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC, "|s", &dsn, &dsn_len) == FAILURE)
+    RETURN_FALSE;
+
+  if (dsn == NULL && (dsn = VG (local_dsn)) == NULL)
+    RETURN_FALSE;
 
+  /* get the user account associated with this endpoint */
   cli = GET_IMMEDIATE_CLIENT_OR_NULL;
   if (cli == NULL || (usr = cli->cli_user) == NULL || !usr->usr_name)
     {
@@ -758,7 +766,8 @@ PHP_FUNCTION (__virt_internal_dsn)
 	  usr->usr_name);
       RETURN_FALSE;
     }
-  /* disallow 'dba', 'dav' and other system privileged users? */
+
+  /* disallow 'dba', 'dav' and other system privileged users */
   if (usr->usr_id < (oid_t) 100 && !VG (allow_dba))
     {
       php_error_docref (NULL TSRMLS_CC, E_WARNING,
@@ -766,8 +775,8 @@ PHP_FUNCTION (__virt_internal_dsn)
 	  usr->usr_name);
       RETURN_FALSE;
     }
-  spprintf (&connstr, 0, "DSN=%s;UID=%s;PWD=%s",
-      dsn, usr->usr_name, usr->usr_pass);
+
+  spprintf (&connstr, 0, "DSN=%s;UID=%s;PWD=%s", dsn, usr->usr_name, usr->usr_pass);
   RETURN_STRING (connstr, 0);
 }
 
diff --git a/binsrc/hosting/python/Makefile.am b/binsrc/hosting/python/Makefile.am
index ab8d7c1..11feafd 100644
--- a/binsrc/hosting/python/Makefile.am
+++ b/binsrc/hosting/python/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/python/Makefile.in b/binsrc/hosting/python/Makefile.in
index 11fe8bc..fac49cb 100644
--- a/binsrc/hosting/python/Makefile.in
+++ b/binsrc/hosting/python/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -151,6 +151,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -199,6 +200,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -250,6 +252,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -296,7 +299,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hosting/python/build.py b/binsrc/hosting/python/build.py
index 1b2df40..f8a71e0 100644
--- a/binsrc/hosting/python/build.py
+++ b/binsrc/hosting/python/build.py
@@ -1,14 +1,14 @@
 #
 #  build.py
 #
-#  $Id: build.py,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+#  $Id: build.py,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
 #
 #  Python Makefile for the OpenLink python plugin
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/python/hosting_python.c b/binsrc/hosting/python/hosting_python.c
index b1be0a0..c9c63de 100644
--- a/binsrc/hosting/python/hosting_python.c
+++ b/binsrc/hosting/python/hosting_python.c
@@ -1,14 +1,14 @@
 /*
  *  hosting_python.c
  *
- *  $Id: hosting_python.c,v 1.2.2.2 2011/01/25 14:29:06 source Exp $
+ *  $Id: hosting_python.c,v 1.2.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso Python hosting plugin
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/python/py_to_c.awk b/binsrc/hosting/python/py_to_c.awk
index f7d6935..4f53985 100644
--- a/binsrc/hosting/python/py_to_c.awk
+++ b/binsrc/hosting/python/py_to_c.awk
@@ -1,13 +1,13 @@
 #  py_to_c.awk
 #
-#  $Id: py_to_c.awk,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+#  $Id: py_to_c.awk,v 1.1.1.1.2.2 2012/03/08 13:52:41 source Exp $
 #
 #  GAWK python embeding script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -48,7 +48,7 @@ END {
     }
 
   x = $0
-  gsub (/\\/, "\\\\", x)
+  gsub ( "\\\\", "&&", x)
   gsub (/\"/, "\\\"", x)
   print "\"" x "\\n\""
 }
diff --git a/binsrc/hosting/python/virt_handler.c b/binsrc/hosting/python/virt_handler.c
index df8714d..c326250 100644
--- a/binsrc/hosting/python/virt_handler.c
+++ b/binsrc/hosting/python/virt_handler.c
@@ -2,14 +2,14 @@ static char *virt_handler =
 "#\n"
 "#  virt_handler.py\n"
 "#\n"
-"#  $Id: virt_handler.py,v 1.1.1.1.2.1 2010/04/14 13:55:08 source Exp $\n"
+"#  $Id: virt_handler.py,v 1.1.1.1.2.2 2012/03/08 12:55:00 source Exp $\n"
 "#\n"
 "#  python proxy for OpenLink python plugin\n"
 "#  \n"
 "#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 "#  project.\n"
 "#  \n"
-"#  Copyright (C) 1998-2006 OpenLink Software\n"
+"#  Copyright (C) 1998-2012 OpenLink Software\n"
 "#  \n"
 "#  This project is free software; you can redistribute it and/or modify it\n"
 "#  under the terms of the GNU General Public License as published by the\n"
diff --git a/binsrc/hosting/python/virt_handler.py b/binsrc/hosting/python/virt_handler.py
index 0bd564c..1884026 100644
--- a/binsrc/hosting/python/virt_handler.py
+++ b/binsrc/hosting/python/virt_handler.py
@@ -1,14 +1,14 @@
 #
 #  virt_handler.py
 #
-#  $Id: virt_handler.py,v 1.1.1.1.2.1 2010/04/14 13:55:08 source Exp $
+#  $Id: virt_handler.py,v 1.1.1.1.2.2 2012/03/08 12:55:00 source Exp $
 #
 #  python proxy for OpenLink python plugin
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/ruby/Makefile.am b/binsrc/hosting/ruby/Makefile.am
index a08666e..ca7a307 100644
--- a/binsrc/hosting/ruby/Makefile.am
+++ b/binsrc/hosting/ruby/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/ruby/Makefile.in b/binsrc/hosting/ruby/Makefile.in
index 55fc106..0ead0ab 100644
--- a/binsrc/hosting/ruby/Makefile.in
+++ b/binsrc/hosting/ruby/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -149,6 +149,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -197,6 +198,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -248,6 +250,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -294,7 +297,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/hosting/ruby/hosting_ruby.c b/binsrc/hosting/ruby/hosting_ruby.c
index 3716798..c5bad46 100644
--- a/binsrc/hosting/ruby/hosting_ruby.c
+++ b/binsrc/hosting/ruby/hosting_ruby.c
@@ -1,14 +1,14 @@
 /*
  *  hosting_ruby.c
  *
- *  $Id: hosting_ruby.c,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+ *  $Id: hosting_ruby.c,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso Ruby hosting plugin
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/ruby/hosting_ruby.h b/binsrc/hosting/ruby/hosting_ruby.h
index eed4930..05e0c44 100644
--- a/binsrc/hosting/ruby/hosting_ruby.h
+++ b/binsrc/hosting/ruby/hosting_ruby.h
@@ -1,14 +1,14 @@
 /*
  *  hosting_ruby.h
  *
- *  $Id: hosting_ruby.h,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+ *  $Id: hosting_ruby.h,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso Ruby hosting plugin header
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/hosting/ruby/ruby_io.c b/binsrc/hosting/ruby/ruby_io.c
index 5558b4c..2eb0b00 100644
--- a/binsrc/hosting/ruby/ruby_io.c
+++ b/binsrc/hosting/ruby/ruby_io.c
@@ -1,14 +1,14 @@
 /*
  *  ruby_io.c
  *
- *  $Id: ruby_io.c,v 1.1.1.1 2006/04/11 17:56:13 source Exp $
+ *  $Id: ruby_io.c,v 1.1.1.1.2.1 2012/03/08 12:55:00 source Exp $
  *
  *  Virtuoso Ruby hosting plugin IO handlers
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/Makefile.am b/binsrc/isparql/Makefile.am
index e9390a4..3ee56c1 100644
--- a/binsrc/isparql/Makefile.am
+++ b/binsrc/isparql/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/Makefile.in b/binsrc/isparql/Makefile.in
index b608c28..df151b3 100644
--- a/binsrc/isparql/Makefile.in
+++ b/binsrc/isparql/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -125,6 +125,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -173,6 +174,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -224,6 +226,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -270,7 +273,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/isparql/auth.vsp b/binsrc/isparql/auth.vsp
index 385f255..d57f51c 100644
--- a/binsrc/isparql/auth.vsp
+++ b/binsrc/isparql/auth.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: auth.vsp,v 1.4.2.3 2011/01/25 14:08:45 source Exp $
+--  $Id: auth.vsp,v 1.4.2.4 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/auth_ods.vsp b/binsrc/isparql/auth_ods.vsp
index 138d985..0063ec6 100644
--- a/binsrc/isparql/auth_ods.vsp
+++ b/binsrc/isparql/auth_ods.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: auth_ods.vsp,v 1.4.2.1 2009/06/10 19:49:06 source Exp $
+--  $Id: auth_ods.vsp,v 1.4.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/cmds.vsp b/binsrc/isparql/cmds.vsp
index a5bebe0..a9532ab 100644
--- a/binsrc/isparql/cmds.vsp
+++ b/binsrc/isparql/cmds.vsp
@@ -1,10 +1,10 @@
 /*
- *  $Id: cmds.vsp,v 1.1.2.2 2009/06/10 19:49:06 source Exp $
+ *  $Id: cmds.vsp,v 1.1.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/defaults.js b/binsrc/isparql/defaults.js
index 83c0d5c..ee975eb 100644
--- a/binsrc/isparql/defaults.js
+++ b/binsrc/isparql/defaults.js
@@ -9,9 +9,10 @@ iSPARQL.Defaults = {
 		 "http://dbpedia.org/sparql",
                  "http://loc.openlinksw.com/sparql",
 		 "http://lod.openlinksw.com/sparql",
+                 "http://sparql.sindice.com/sparql",
 		 "http://bbc.openlinksw.com/sparql",
 		 "http://demo.openlinksw.com/sparql",
-		 "http://myopenlink.net:8890/sparql/",
+		 "http://myopenlink.net:8890/sparql",
 		 "http://linkedgeodata.org/sparql",
 		 "http://sparql.reegle.info/",
 //		 "http://www.govtrack.us/sparql",
@@ -34,16 +35,16 @@ iSPARQL.Defaults = {
 			   ['rdfs:seeAlso',    'http://www.w3.org/2000/01/rdf-schema#',true],
 			   ['owl:sameAs',      'http://www.w3.org/2002/07/owl#',       true]],
 
-    query:        'SELECT * WHERE {?s ?p ?o}',
-    sponge:       'none',
+    query:        "SELECT * WHERE {?s ?p ?o}",
+    sponge:       "none",
     grabLimit:    100,
     grabDepth:    2,
     grabAll:      false,
-    graph:        '',
-    queryTimeout: 2000, // ms
+    graph:        "",
+    timeout:      false, // ms
     auth:         {user:'dav',password:'dav'},
     tab:          0,
-    anchorMode:   0, /* 0:describe, 1:get data items,2:Open in new window */
+    anchorMode:   0, /* 0:Exec SPARQL describe, 1:get data items,2:Open in new window,3:Open "describe" page */
     maxrows:      50,
     view:         1,
     endpoint:     '/sparql',
@@ -81,6 +82,10 @@ iSPARQL.Defaults = {
 	    iSPARQL.Settings.query  = p['query']; 
 	    qp = true; 
 	}
+	if (p['qtxt']) { 
+	    iSPARQL.Settings.query  = p['qtxt']; 
+	    qp = true; 
+	}
 	if (p['sponge'])            { iSPARQL.Settings.sponge = p['sponge']; qp = true; }
 	if (p['should_sponge'])     { iSPARQL.Settings.sponge = p['should_sponge']; qp = true; }
 	if (p['view']) {
@@ -96,6 +101,8 @@ iSPARQL.Defaults = {
 	if (qp) iSPARQL.Settings.qp_override = qp;
 	if (p['__DEBUG']) iSPARQL.Settings.debug = true;
 	if (p['maxrows']) iSPARQL.Settings.maxrows = parseInt(p['maxrows']);
+	if (p['timeout']) iSPARQL.Settings.timeout = parseInt(p['timeout']);
+	if (p['amode']) iSPARQL.Settings.anchorMode = parseInt(p['amode']);
     },
 
     //
@@ -125,6 +132,8 @@ iSPARQL.Defaults = {
 			iSPARQL.Defaults.auth[authParm] = iSPARQL.serverDefaults.auth[authParm];
 		}
 		continue;
+	    } else if (defName == 'namespaces') {
+		OAT.IRIDB.insertIRIArr (iSPARQL.serverDefaults[defName]);
 	    }
 	    iSPARQL.Defaults[defName] = iSPARQL.serverDefaults[defName];
 	}
@@ -157,6 +166,7 @@ iSPARQL.Defaults = {
 	    iSPARQL.Defaults.map_type = OAT.Map.TYPE_OL;
 	    break;
 	}
+	this.handlePageParams();
     }
 };
 
diff --git a/binsrc/isparql/defaults.vsp b/binsrc/isparql/defaults.vsp
index b12ec8b..cf479a6 100644
--- a/binsrc/isparql/defaults.vsp
+++ b/binsrc/isparql/defaults.vsp
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <?vsp 
 --  
---  $Id: defaults.vsp,v 1.1.2.9 2011/03/08 13:09:00 source Exp $
+--  $Id: defaults.vsp,v 1.1.2.14 2012/03/08 12:55:00 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -69,12 +69,28 @@
   api_key := registry_get ('iSPARQL_API_KEY');
   if (0 = api_key) api_key := '';
   
+
+  declare rdf_mappers_installed varchar;
+  rdf_mappers_installed := 'false';
+
+  if (DB.DBA.VAD_CHECK_VERSION('rdf_mappers') is not NULL)
+    rdf_mappers_installed := 'true';
+
   declare pivot_installed varchar;
   pivot_installed := 'false';
 
   if (DB.DBA.VAD_CHECK_VERSION('PivotViewer') is not NULL)
       pivot_installed := 'true';
 
+  declare sparql_cxml_installed varchar;
+  sparql_cxml_installed := 'false';
+
+  if (DB.DBA.VAD_CHECK_VERSION('sparql_cxml') is not NULL)
+      sparql_cxml_installed := 'true';
+
+  declare isparql_version varchar;
+  isparql_version := DB.DBA.VAD_CHECK_VERSION('iSPARQL');
+
   declare curi_installed varchar;
   curi_installed := 'false';
 
@@ -86,26 +102,42 @@
 
   if ('1' = addthis_key) addthis_key := 'xa-4ce13e0065cdadc0';
 ?>
-{  graph: '<?vsp http(replace(default_dgu,'\'','\\\'')); ?>',
-   query: '<?vsp http(replace(def_qry,'\'','\\\'')); ?>',
-   sponge:'<?vsp http(replace(fixed_sponge,'\'','\\\'')); ?>',
-   auth: {
-       user:    '<?vsp http(replace(default_user,'\'','\\\'')); ?>',
-       pass:    '<?vsp http(replace(default_pass,'\'','\\\'')); ?>'
+{  "graph":"<?vsp http(replace(default_dgu,'\'','\\\'')); ?>",
+   "query":"<?vsp http(replace(def_qry,'\'','\\\'')); ?>",
+   "sponge":"<?vsp http(replace(fixed_sponge,'\'','\\\'')); ?>",
+   "auth":{
+       "user":"<?vsp http(replace(default_user,'\'','\\\'')); ?>",
+       "pass":"<?vsp http(replace(default_pass,'\'','\\\'')); ?>"
    },<?vsp 
         if (isstring(registry_get('iSPARQL_GET_INITIAL_AUTH')))
-          http('        getInitialCredentials:''' || registry_get('iSPARQL_GET_INITIAL_AUTH') || ''',\n');
+          http('"getInitialCredentials":"' || registry_get('iSPARQL_GET_INITIAL_AUTH') || '"');
         if (isstring(registry_get('iSPARQL_AUTH_ENDPOINT')))
-          http('        authEndpoint:''' || registry_get('iSPARQL_AUTH_ENDPOINT') || ''',\n');
+          http('"authEndpoint":"' || registry_get('iSPARQL_AUTH_ENDPOINT') || '"');
 ?>
-   map_type: '<?= map_type ?>',
-   api_key: '<?=api_key ?>',
+   "map_type":"<?= map_type ?>",
+   "api_key":"<?= api_key ?>",
 <?vsp if (0 = addthis_key) { ?>
-   addthis_key: false,
+   "addthis_key":false,
 <?vsp } else { ?>
-   addthis_key: '<?= addthis_key ?>',
+   "addthis_key":"<?= addthis_key ?>",
 <?vsp } ?>
-   pivotInstalled: <?= pivot_installed ?>,
-   curiInstalled: <?= curi_installed ?>,
-   setup_done: <?= setup_done ?>
+   "pivotInstalled":<?= pivot_installed ?>,
+   "curiInstalled":<?= curi_installed ?>,
+   "rdfMappersInstalled":<?= rdf_mappers_installed ?>,
+   "sparqlCxmlInstalled":<?= sparql_cxml_installed ?>,
+   "setup_done":<?= setup_done ?>,
+   "isparql_version":"<?= isparql_version ?>",
+   "namespaces":[
+<?vsp
+  declare _fst integer;
+  _fst := 0; 
+  set isolation = 'committed';
+  for select ns_prefix, ns_url from DB.DBA.SYS_XML_PERSISTENT_NS_DECL do 
+  {
+?>
+    <?=case when _fst = 1 then ',' else '' end?>["<?=ns_url?>","<?=ns_prefix?>"]
+<?vsp
+    _fst := 1;
 }
+?>
+   ]}
diff --git a/binsrc/isparql/error.js b/binsrc/isparql/error.js
index b7e39aa..04fa758 100644
--- a/binsrc/isparql/error.js
+++ b/binsrc/isparql/error.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: error.js,v 1.1.2.2 2010/03/12 09:01:02 source Exp $
+ *  $Id: error.js,v 1.1.2.3 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
diff --git a/binsrc/isparql/execute.html b/binsrc/isparql/execute.html
index 0195750..47ff2ca 100644
--- a/binsrc/isparql/execute.html
+++ b/binsrc/isparql/execute.html
@@ -3,11 +3,11 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!--
 
-  $Id: execute.html,v 1.12.2.17 2011/03/29 11:03:35 source Exp $
+  $Id: execute.html,v 1.12.2.22 2012/03/08 13:18:57 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2009 OpenLink Software
+  Copyright (C) 2009-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -39,9 +39,6 @@ function init() {
   OAT.Event.attach("throbber","click",OAT.AJAX.cancelAll);
   OAT.Preferences.imagePath = "/isparql/toolkit/images/";
 
-  var qe = new QueryExec({div:"result"});
-  OAT.MSG.attach(qe, "iSPARQL_QE_DONE", function (m,s,l) { iSPARQL.StatusUI.hide(); OAT.Dom.show("result") });
-
   iSPARQL.Defaults.init();
 
   for (i in iSPARQL.Defaults)
@@ -51,6 +48,10 @@ function init() {
 
   iSPARQL.StatusUI.init();
 
+  var qe = new QueryExec({div:"result"});
+
+  OAT.MSG.attach(qe, "iSPARQL_QE_DONE", function (m,s,l) { iSPARQL.StatusUI.hide(); OAT.Dom.show("result"); OAT.Dom.show("foot"); });
+
   var opts = OAT.Dom.uriParams();
 
   if ("file" in opts) {
@@ -80,7 +81,9 @@ function init() {
       iSPARQL.StatusUI.hide();
       locUI.refresh();
   } else {
+      iSPARQL.StatusUI.statMsg ("Executing query…")
       qe.execute(iSPARQL.Settings);
+
   }   
 }
   </script>
@@ -131,7 +134,7 @@ function init() {
       <img src="/isparql/images/stop_32.png" alt="error" id="splashErrorImg" style="display:none"/>
       <div class="error" id="statMsgErr"></div>
       <div id="splash_ver"></div>
-      <div id="splash_copyr">Copyright © 2006-2011 OpenLink Software</div>
+      <div id="splash_copyr">Copyright © 2006-2012 OpenLink Software</div>
       <div id="splash_foot" class="opl_motto">Making Technology Work For You ™</div>
     </div> <!-- #splash_inner -->
   </div> <!-- #splash -->
@@ -179,15 +182,17 @@ function init() {
       </div>
     </div> 
   </div> <!-- locAcquireUI -->
-  <div id="result">
+  <div id="result"></div>
+  <div id="foot" style="display:none">
+    <div id="data_links" style="display:none">Raw Linked Data formats: 
+      <a id="cxml_raw_lnk">CXML</a> | <a id="csv_raw_lnk">CSV</a> |
+      RDF (<a id="nt_raw_lnk">N-Triples</a> <a id="n3_raw_lnk">N3/Turtle</a> <a id="json_raw_lnk">JSON</a> <a id="rdfxml_raw_lnk">XML</a>) |
+      ODATA (<a id="odata_atom_lnk">Atom</a> | <a id="odata_json_lnk">JSON</a>)
+    </div>
+    <div class="foot_r" id="foot_r">
+      Copyright © 2006-2012 OpenLink Software<br/><span id="ft_loc"></span><br/>
   </div>
-  <p class="copyright">
-    <span class="dyn_page">Dynamic <a href="http://dbpedia.org/resource/linkeddata">Linked Data Page</a></span>
-    <a href="http://www.openlinksw.com/virtuoso">
-      <img border="0" 
-           src="/isparql/images/virt_power_no_border.png" 
-           alt="Powered by OpenLink Virtuoso Universal Server"/>
-    </a>
-  </p>
+    <div id="stats"></div> <!-- stats -->
+  </div> <!-- #foot -->
 </body>
 </html>
diff --git a/binsrc/isparql/execute.js b/binsrc/isparql/execute.js
index c0bd6d8..a88f503 100644
--- a/binsrc/isparql/execute.js
+++ b/binsrc/isparql/execute.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: execute.js,v 1.32.2.33 2011/03/29 22:51:20 source Exp $
+ *  $Id: execute.js,v 1.32.2.44 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -201,6 +201,7 @@ var QueryExec = function(optObj) {
 		namedGraphs:[],
 		sponge:false,
 	maxrows:false,
+		timeout:false,
 	sourceQuery:false /* before macro expansion */
     };
 
@@ -211,31 +212,56 @@ var QueryExec = function(optObj) {
 	this.mini = false;
     	this.miniplnk = false;
     	this.mRDFCtr = false;
+	this.anchor_pref_c = false;
+	
+	this.makeAnchorPrefs = function () {
+		var anchor_pref_c = OAT.Dom.create("div", {className: "anchor_pref_c"});
+		var anchor_label = OAT.Dom.create("label", {htmlFor: "anchor_pref_sel"});
+		anchor_label.innerHTML = "Dereferencing:";
+		anchor_pref_sel = OAT.Dom.create ("select", {id: "anchor_pref_sel"});
+		anchor_pref_sel.options.add (new Option ("SPARQL Describe",0));
+		anchor_pref_sel.options.add (new Option ("SELECT IRI as S or O",1));
+		anchor_pref_sel.options.add (new Option ("GET Page",2));
+		anchor_pref_sel.options.add (new Option ("Use Virtuoso Web Service",3)); 
+		anchor_pref_sel.selectedIndex = iSPARQL.Settings.anchorMode;
+
+		OAT.Event.attach(anchor_pref_sel, 'change', function () {
+			iSPARQL.Settings.anchorMode = ($('anchor_pref_sel').selectedIndex);
+		});
+
+        OAT.Dom.append ([anchor_pref_c, anchor_label, anchor_pref_sel]);
+
+		return anchor_pref_c;
+	}
 
 	this.init = function() {
-		this.dom.result = OAT.Dom.create("div");
+		this.dom.result =   OAT.Dom.create("div", {className:'ep_result'});
 		this.dom.request = OAT.Dom.create("div", {className:'ep_request'}); 
 		this.dom.response = OAT.Dom.create("pre",{className:'ep_response'});
-		this.dom.query = OAT.Dom.create("pre");
+		this.dom.query =    OAT.Dom.create("pre", {className:'ep_query'});
+
 //	this.dom.select = OAT.Dom.create("select");
 //	OAT.Dom.option("Machine-readable","1",this.dom.select);
 //	OAT.Dom.option("Human-readable","0",this.dom.select);
 
 		var tabs1 = ["Result","SPARQL Params","Response","Query"];
 		var tabs2 = [self.dom.result,self.dom.request,self.dom.response,self.dom.query];
-		self.dom.tab = OAT.Dom.create("div",{padding:"5px",backgroundColor:"#fff"});
+
+		self.dom.tab = OAT.Dom.create ("div",{className:'res_tab_ctr',id: 'res_tab_ctr'});
 		self.dom.ul = OAT.Dom.create("ul",{},"tabres");
 		self.tab = new OAT.Tab(self.dom.tab,{dockMode:true,dockElement:self.dom.ul});
+
 		for (var i=0;i<tabs1.length;i++) {
 			var li = OAT.Dom.create("li");
 			self.dom.ul.appendChild(li);
 			li.innerHTML = tabs1[i];
 			self.tab.add(li,tabs2[i]);
 		}
+
 		if (self.options.div) {
 			OAT.Dom.clear(self.options.div);
 	    OAT.Dom.append([self.options.div,/*self.dom.select,*/OAT.Dom.create("br")]);
-			OAT.Dom.append([self.options.div,self.dom.ul,self.dom.tab]);
+			OAT.Dom.append([self.options.div,self.dom.ul,self.dom.tab]); 
 		}
 		self.initNav();
 
@@ -255,6 +281,44 @@ var QueryExec = function(optObj) {
 		OAT.IRIDB.insertIRI (window.defaultPrefixes[i].uri, window.defaultPrefixes[i].label);
 	}
 
+		self.load_notify = new OAT.Notify (false, {notifytype: 2});
+		self.error_notify = new OAT.Notify (false, {notifytype: 2});
+
+		self.request_count = 0;
+
+		OAT.MSG.attach ('*',
+						'iSPARQL_QE_START', 
+						function () { 
+							var msg = 'Executing query (' + self.request_count;
+
+							if (self.request_count > 1) msg += ' requests pending.)';
+							else msg += ' request pending.)';
+
+							self.load_notify.send (msg, {image: "images/notify-throbber.gif", timeout: false});
+						});
+		
+		OAT.MSG.attach ('*',
+						'iSPARQL_QE_DONE',
+						function () {
+							if (self.request_count < 1)
+								self.load_notify.hide();
+							else {
+								var msg = 'Executing query (' + self.request_count;
+
+								if (self.request_count > 1) msg += ' requests pending.)';
+								else msg += ' request pending.)';
+
+								self.load_notify.send (msg, {image: "images/notify-throbber.gif", timeout: false});
+							}
+						});
+
+		OAT.MSG.attach ('*', 
+						'iSPARQL_QE_ERROR',
+						function (m,s,l) {
+							var msg = 'Query returned error.';
+							self.error_notify.send (msg, {timeout: 3000});
+						});
+
     };
 
 	this.initNav = function() {
@@ -349,6 +413,7 @@ var QueryExec = function(optObj) {
 		cache.opts.endpoint != opts.endpoint || 
 		cache.opts.defaultGraph != opts.defaultGraph ||
 	        cache.opts.maxrows != opts.maxrows ||
+				cache.opts.timeout != opts.timeout ||
 	        cache.opts.namedGraphs != opts.namedGraphs ||
 	        cache.opts.pragmas != opts.pragmas);
     };
@@ -356,22 +421,20 @@ var QueryExec = function(optObj) {
 	this.buildRequest = function(opts) {
 		var paramsObj = {};
 
-		if (opts.defaultGraph && !opts.query.match(/from *</i)) { paramsObj["default-graph-uri"] = opts.defaultGraph; }
-	if (opts.maxrows && opts.query && !opts.query.match(/limit *[0-9].*/i)) { paramsObj["maxrows"] = opts.maxrows; }
-		if (opts.sponge && self.options.virtuoso) { paramsObj["should-sponge"] = opts.sponge; }
+		if (opts.defaultGraph && !opts.query.match(/from *</i)) { 
+          paramsObj["default-graph-uri"] = opts.defaultGraph; 
+        }
 
-		var pragmas = [];
-	
-		if (opts.pragmas) {
-			for (var i=0;i<opts.pragmas.length;i++) {
-				var pragma = opts.pragmas[i];
-				var name = pragma[0];
-				var values = pragma[1];
-				for(var j=0;j<values.length;j++) { pragmas.push(name+" "+values[j]); }
-			}
-		}
+		if (opts.maxrows && opts.query && !opts.query.match(/limit *[0-9].*/i)) { 
+          paramsObj["maxrows"] = opts.maxrows; 
+        }
+
+		if (opts.timeout) { paramsObj["timeout"] = opts.timeout; }
+		if (opts.sponge && self.options.virtuoso) { paramsObj["should-sponge"] = opts.sponge; }
 
-		paramsObj["query"] = pragmas.join('\n') + '\n' + opts.query;
+		var pragmas = self.getPragmas(opts);
+		if (!pragmas) pragmas = "";
+		paramsObj["query"] = pragmas + '\n' + opts.query;
 
 		var arr = [];
 		for (var p in paramsObj) {
@@ -394,15 +457,27 @@ var QueryExec = function(optObj) {
     };
 
     this.resultType = function(data) {
-		if (data.documentElement == null) return iSPARQL.ResultType.ERROR; // OPERA returns XMLDocument with all members null
-		if (data.documentElement.localName == "sparql")
+
+		if (data.documentElement == null) 
+			return iSPARQL.ResultType.ERROR; // OPERA returns XMLDocument with all members null
+
+		var fElm;
+		
+		if (OAT.Browser.isIE) {
+			fElm = data.documentElement.baseName;
+		} else {
+			fElm = data.documentElement.localName;
+		}
+		
+		switch (fElm) {
+		case "sparql":
 			return iSPARQL.ResultType.RESSET;
-		if (data.documentElement.localName == "RDF")
+		case "RDF":
 			return iSPARQL.ResultType.GRAPH;
-		if (data.documentElement.localName == "parsererror")
+		default:
 			return iSPARQL.ResultType.ERROR;
+		}
     };
-	
     //
     // Cache incoming result set or graph
     //
@@ -419,9 +494,13 @@ var QueryExec = function(optObj) {
 		}
 		else {
 			rt = iSPARQL.ResultType.ERROR;
-			if (data.match (/Error SR171/))
+			if (data.match (/Error SR171/)) {
+				iSPARQL.StatusUI.errMsg = 'Query Engine Timeout on Server Detected';
 				to = true;
 		}
+			else 
+				iSPARQL.StatusUI.errMsg = 'Error executing query';
+		}
 		
 			var cacheItem = {
 				resType: rt,
@@ -431,7 +510,7 @@ var QueryExec = function(optObj) {
 				request:request,
 				data:data,
 				txt:OAT.Xml.serializeXmlDoc (data),
-				store: new OAT.RDFStore(),
+				store: new OAT.RDFStore(false,{raw_iris: true}),
 				dom: {}
 			}
 			
@@ -440,10 +519,28 @@ var QueryExec = function(optObj) {
 			cacheItem.dom.request_c  = OAT.Dom.create ("div",{className: "request_c"});
 			cacheItem.dom.response_c = OAT.Dom.create ("div",{className: "response_c"});
 			
+     	cacheItem.dom.result_opts_c = OAT.Dom.create ("div",{className:"result_opts_c"}); 
+		cacheItem.dom.plnk_c = OAT.Dom.create("div", {className: "result_plnk_c"});
+
+		cacheItem.dom.deref_prefs = self.makeAnchorPrefs();
+		var clrfix = OAT.Dom.create ("div", {className: "clearfix"})
+		OAT.Dom.append([cacheItem.dom.result_opts_c, cacheItem.dom.plnk_c, cacheItem.dom.deref_prefs], 
+					   [cacheItem.dom.result_c, cacheItem.dom.result_opts_c, clrfix]);
+
+
 		var req_href;
 		
-		if (opts.endpoint && !opts.endpoint.match (/^http/))
-			req_href = unescape(request.substring(4));
+		// FIXME (ghard) this is wrong
+
+		if (opts.endpoint) {
+			if (opts.endpoint.match (/^http/))
+				req_href = opts.endpoint + "?" + request;
+			else
+				req_href = 
+				document.location.protocol + "//" +
+				document.location.host + 
+				opts.endpoint + "?" + request; 
+		}
 		else
 			req_href = 
 			document.location.protocol + "//" +
@@ -462,27 +559,93 @@ var QueryExec = function(optObj) {
 		if (old>=0) self.nav(old);
     };
 
+	this.makeDataLinks = function () {
+		var item = self.cache[self.cacheIndex];
+		var opts = item.opts;
+		var request = item.request;
+		var ctr = self.miniplnk;
+		
+		var nloca = document.location;
+
+		if (opts.endpoint == '/sparql') {
+			var resUriBase = nloca.protocol + 
+				"//" + nloca.host + "/sparql/?query=" + encodeURIComponent(opts.query);
+			
+			resUriBase += "&maxrows=" + (opts.maxrows ? opts.maxrows : "");
+			resUriBase += "&timeout=" + (opts.timeout ? opts.timeout : "");
+			resUriBase += "&default-graph-uri=" + (opts.defaultGraph ? opts.defaultGraph : "");
+			resUriBase += "&format=";
+
+			$('cxml_raw_lnk').href =   resUriBase + encodeURIComponent("text/cxml");
+			$('csv_raw_lnk').href =    resUriBase + encodeURIComponent("text/csv");
+
+			$('nt_raw_lnk').href =     resUriBase + encodeURIComponent("text/plain");
+			$('n3_raw_lnk').href =     resUriBase + encodeURIComponent("text/rdf+n3");
+			$('json_raw_lnk').href =   resUriBase + encodeURIComponent("application/rdf+json");
+			$('rdfxml_raw_lnk').href = resUriBase + encodeURIComponent("application/rdf+xml");
+			
+			$('odata_atom_lnk').href = resUriBase + encodeURIComponent("application/atom+xml");
+			$('odata_json_lnk').href = resUriBase + encodeURIComponent("application/odata+json");
+
+			OAT.Dom.show('data_links');
+		}
+
+	}
+
+	this.getPragmas = function (opts) {
+		var pragmas = [];
+		
+		if (opts.pragmas) { 
+			for (var i=0;i<opts.pragmas.length;i++) {
+				var pragma = opts.pragmas[i];
+				var name = pragma[0];
+				var values = pragma[1];
+				for(var j=0;j<values.length;j++) { pragmas.push(name+" "+values[j]); }
+			}
+			return (pragmas.join('\n'));
+		}
+		return false;
+	}
+
     this.makeMiniRDFPlinkURI = function (caller,msg,o) {
 	var item = self.cache[self.cacheIndex];
 	var opts = item.opts;
 	var request = item.request;
-	var plnk = self.miniplnk;
+		var ctr = self.miniplnk;
+
+		OAT.Dom.clear(ctr);
 
+		if (iSPARQL.Settings.pivotInstalled) 
+			self.makePivotPermalink(ctr);
+		
 	var nloca = document.location;
 
-	var xparm = "?query=" + encodeURIComponent(opts.query);
+		var pragmas = self.getPragmas(opts);
+		
+		var xparm = "?query=";
+
+		if (pragmas) xparm += encodeURIComponent(pragmas);
+
+		xparm += encodeURIComponent(opts.query);
 
 	if (opts.endpoint)
 	    xparm = xparm + "&endpoint="  + opts.endpoint;
 
 		xparm = xparm + "&resultview=" + item.mini.options.tabs[o.tabIndex][0];
 	xparm += "&maxrows=" + (opts.maxrows ? opts.maxrows : "");
+		xparm += "&timeout=" + (opts.timeout ? opts.timeout : "");
 		xparm += "&view=" + opts.view;
-	plnk.target = "_blank";
-	plnk.href= nloca.protocol + "//" + nloca.host + "/isparql/view/" + xparm;
+		xparm += "&amode=" + iSPARQL.Settings.anchorMode;
+		var plnk_a = OAT.Dom.create("a");
+
+		plnk_a.target = "_blank";
+		plnk_a.href= nloca.protocol + "//" + nloca.host + "/isparql/view/" + xparm;
+		plnk_a.innerHTML = "Permalink"
 
 		if (iSPARQL.Settings.shorten_uris) 
-			iSPARQL.Common.shortenURI (plnk);
+			iSPARQL.Common.shortenURI (plnk_a);
+
+		OAT.Dom.append([ctr, plnk_a]);
 				
     }
 
@@ -501,6 +664,7 @@ var QueryExec = function(optObj) {
 
 		xparm = xparm + "&resultview=" + item.mini.options.tabs[o.tabIndex][0];
 		xparm += "&maxrows=" + (opts.maxrows ? opts.maxrows : "");
+		xparm += "&timeout=" + (opts.timeout ? opts.timeout : "");
 		
 		plnk.target = "_blank";
 
@@ -682,12 +846,23 @@ var QueryExec = function(optObj) {
 
 	a = OAT.Dom.create("a");
 	a.innerHTML = "Make Pivot";
-	var xparm = document.location.protocol + '//' + document.location.host + 
-	    "/sparql/?query=" + encodeURIComponent(opts.query) + 
-	    "&endpoint=" + opts.endpoint;
+
+		var pragmas = self.getPragmas(opts);
+		var xparm;
+
+		if (opts.endpoint != '/sparql')
+			xparm = opts.endpoint + "?query=";
+		else 
+			xparm = document.location.protocol + '//' + document.location.host + 
+			"/sparql/?query=";
+
+		if (pragmas) xparm += encodeURIComponent(pragmas);
+
+		xparm += encodeURIComponent(opts.query);
 	xparm += "&maxrows=" + (opts.maxrows ? opts.maxrows : "");
-	xparm += "&default-graph-uri=" + (opts.defaultGraph ? opts.defaultGraph : "");
-	xparm += "&format=text/cxml";
+		xparm += "&timeout=" + (opts.timeout ? opts.timeout : "");
+		xparm += "&default-graph-uri=" + (opts.defaultGraph ? encodeURIComponent(opts.defaultGraph) : "");
+		xparm += "&format=text%2Fcxml";
 	a.href = document.location.protocol + '//' + document.location.host + 
 	    '/PivotViewer/' + "?url=" + encodeURIComponent(xparm);
 	a.target = "_blank";
@@ -708,12 +883,24 @@ var QueryExec = function(optObj) {
 	
 	var execURIa = OAT.Dom.create ("a");
 	execURIa.innerHTML = "Execute Permalink";
+
 	var nloca = document.location;
 
-	var xparm = "?query=" + encodeURIComponent(opts.query) + "&endpoint="  + opts.endpoint;
+		var pragmas = self.getPragmas(opts);
+		
+		var xparm = "?query=";
+
+		if (pragmas) xparm += encodeURIComponent(pragmas);
+
+		xparm += encodeURIComponent(opts.query);
+
+		xparm += "&endpoint="  + encodeURIComponent(opts.endpoint);
+		
 	xparm += "&maxrows=" + (opts.maxrows ? opts.maxrows : "");
-	xparm += "&default-graph-uri=" + (opts.defaultGraph ? opts.defaultGraph : "");
+		xparm += "&timeout=" + (opts.timeout ? opts.timeout : "");
+		xparm += "&default-graph-uri=" + (opts.defaultGraph ? encodeURIComponent(opts.defaultGraph) : "");
 		xparm += "&view=" + opts.view;
+		xparm += "&amode=" + iSPARQL.Settings.anchorMode;
 
 	execURIa.href = nloca.protocol + "//" + nloca.host + "/isparql/view/" + xparm;
 	
@@ -723,31 +910,16 @@ var QueryExec = function(optObj) {
 	execURIa.target = "_blank";
 	
 		OAT.Dom.append([ctr,execURIa]);
+		OAT.Dom.hide ('data_links')
     };
 
     this.drawSparqlResultSet = function (resSet) {
 		var item = self.cache[self.cacheIndex];
-		self.dom.plnk_ctr = OAT.Dom.create("div", {className: "result_plnk_ctr"});
 
 		if (iSPARQL.Settings.pivotInstalled) 
-			self.makePivotPermalink(self.dom.plnk_ctr);
+			self.makePivotPermalink(item.dom.plnk_c);
 
-		self.makeExecPermalink (self.dom.plnk_ctr);
-
-		var anchor_pref_ctr = OAT.Dom.create("div", {className: "anchor_pref_ctr"});
-		anchor_label = OAT.Dom.create("label", {htmlFor: "anchor_pref_sel"});
-		anchor_label.innerHTML = "Anchor behavior:";
-		anchor_pref_sel = OAT.Dom.create ("select", {id: "anchor_pref_sel"});
-		anchor_pref_sel.options.add (new Option ("Describe",0));
-		anchor_pref_sel.options.add (new Option ("Get Data Items",1));
-		anchor_pref_sel.options.add (new Option ("Open Web Page",2));
-
-		OAT.Event.attach(anchor_pref_sel, 'change', function () {
-			iSPARQL.Settings.anchorMode = ($('anchor_pref_sel').selectedIndex);
-		});
-
-		OAT.Dom.append ([item.dom.result_c, self.dom.plnk_ctr, anchor_pref_ctr]);
-        OAT.Dom.append ([anchor_pref_ctr, anchor_label, anchor_pref_sel]);
+		self.makeExecPermalink (item.dom.plnk_c);
 
 		var grid = new OAT.Grid (item.dom.result_c);
 	grid.createHeader(resSet.variables);
@@ -899,11 +1071,16 @@ var QueryExec = function(optObj) {
     this.makeErrorResp = function (data) {
 	var txt = OAT.Xml.serializeXmlDoc(data);
 
-		if (txt.length == 0 || txt == false) txt = data;
+		if (txt.length == 0 || txt == false) {
+			if (typeof data == 'object')
+ 				txt = 'Invalid response received';
+			else {
+				txt = data;
 
 		txt = txt.replace(/</g,"<");
 		txt = txt.replace(/>/g,">");
-
+			} 
+		}
 	return txt;
     };
 
@@ -927,15 +1104,25 @@ var QueryExec = function(optObj) {
 // TODO store full query context obj in cache and add functions to restore
 //
 
+		if (typeof iSPARQL.dataObj == 'undefined') iSPARQL.dataObj = {};
 		iSPARQL.dataObj.query        = item.opts.query;
 		iSPARQL.dataObj.defaultGraph = item.opts.defaultGraph;
 		iSPARQL.dataObj.maxrows      = item.opts.maxrows;
+		iSPARQL.dataObj.timeout      = item.opts.timeout;
 		iSPARQL.dataObj.namedGraphs  = item.opts.namedGraphs;
 		iSPARQL.dataObj.pragmas      = item.opts.pragmas;
+		iSPARQL.dataObj.endpoint     = item.opts.endpoint;
 
+		if (typeof iSPARQL.endpointOpts != 'undefined') 
 		iSPARQL.endpointOpts.setEndpoint (null, item.opts.endpoint);
 
-		adv.redraw();
+		if (item.resType == iSPARQL.ResultType.GRAPH) 
+			OAT.Dom.show('data_links');
+		else 
+			OAT.Dom.hide('data_links');
+
+		if (typeof adv != 'undefined') adv.redraw();
+
 //		if (!item.wasError && qbe) qbe.loadFromString(iSPARQL.dataObj.query);
 
 		self.refreshNav();
@@ -968,6 +1155,7 @@ var QueryExec = function(optObj) {
 		a.innerHTML = "Query Permalink";
 	var xparm = "?query=" + encodeURIComponent(opts.query) + "&endpoint=" + opts.endpoint;
 	xparm += "&maxrows=" + (opts.maxrows ? opts.maxrows : "");
+		xparm += "&timeout=" + (opts.timeout ? opts.timeout : "");
 	xparm += "&default-graph-uri=" + (opts.defaultGraph ? opts.defaultGraph : "");
 		xparm += "&view=" + opts.view;
 	a.href = document.location.protocol + '//' + document.location.host + '/isparql/' + xparm;
@@ -1008,42 +1196,40 @@ var QueryExec = function(optObj) {
 
 			var ua = navigator.userAgent.toLowerCase();
 		
-			if (ua.search ("iphone") || 
+/*			if (ua.search ("iphone") || 
 				ua.search ("ipod") ||
 				ua.search ("android") ||
 				ua.search ("symbian") ||
 				ua.search ("S60"))
-				
+*/				
 				map_h = OAT.Dom.getViewport()[1].toString()+'px';
-			else 
+/*			else 
 				map_h = "600px";
-
+*/			
 			//	generate Result
 			
 			if (item.resType == iSPARQL.ResultType.GRAPH) { // Use RDFMini to show Graphs
 				var lastIndex = 0;
 				var tabs = [
-					["navigator","Navigator"],
-					["browser","Raw Triples",{removeNS:true}],
-					["triples","Grid View",{}],
-					["svg","SVG Graph",{}],
-					["images","Images",{}],
+					["triples","Grid View",{raw_iris:true}],
+					["navigator","Navigator",{raw_iris:true}],
+					["browser","Raw Triples",{removeNS:true, raw_iris:true}],
+					["svg","SVG Graph",{raw_iris:true}],
+					["images","Images",{raw_iris:true}],
 		     ["map",
 		      iSPARQL.Defaults.mapProviderNames[iSPARQL.Defaults.map_type],
 		      {provider:iSPARQL.Defaults.map_type, 
 					markerMode:OAT.RDFTabsData.MARKER_MODE_AUTO,
 					clickPopup:true,
 					  hoverPopup:false,
-					  height: map_h}] 
+					  height: map_h,
+                      raw_iris: true}] 
 				];
 
 		    lastIndex = self.parseTabIndex (opts.resultView, tabs);
 				var c_i = self.cacheIndex;
 				
-				self.plnk_ctr = OAT.Dom.create ("div",{className:"result_plnk_ctr"}); 
-				
-		self.miniplnk = OAT.Dom.create ("a");
-		self.miniplnk.innerHTML = "Permalink";
+				self.miniplnk = OAT.Dom.create ("div",{id:"rdf_plink_c"});
 
 /*					self.addthis_ctr.innerHtml = '<div id="sharelink" class="addthis_toolbox addthis_default_style "' + 
 						'addthis:url=""' + 
@@ -1056,32 +1242,38 @@ var QueryExec = function(optObj) {
 						'<a class="addthis_button_preferred_3"></a>' +
 						'<a class="addthis_button_preferred_4"></a>' +
 						'</div>'
-				}
-*/
+				}*/
 //				item.content = OAT.Dom.create ("div",{className: "rdf_mini_ctr"});
 				
 
-				if (iSPARQL.Settings.pivotInstalled) 
-					self.makePivotPermalink(self.plnk_ctr);
-
-				var mini_c = OAT.Dom.create("div",{className: "rdf_mini_ctr"});
+				var mini_c = OAT.Dom.create("div",{className: "rdf_mini_c"});
 				
+				if (item.store.getTripleCount() > 0) {
 				item.mini = new OAT.RDFMini(mini_c,{tabs:tabs,
 													showSearch:false,
-													store: item.store});
+														store: item.store,
+													    raw_iris: true});
+
+				item.mini.processLink = self.processLink;
 
-				OAT.Dom.append([item.dom.result_c, self.plnk_ctr, mini_c]);
-				
 				//		self.tab.go(0); // got to do here or maps won't resize properly.
-				//		self.cache[self.cacheIndex].mini.processLink = self.processLink;
 				//		self.cache[self.cacheIndex].mini.store.addXmlDoc(data);
 				
 				item.mini.select.selectedIndex = lastIndex;
 				item.mini.redraw();
 				
-				OAT.Dom.append ([self.plnk_ctr, self.miniplnk]);
+					self.makeMiniRDFPlinkURI (false,false,{tabIndex:lastIndex});
+					OAT.MSG.attach (item.mini, 'RDFMINI_VIEW_CHANGED', self.makeMiniRDFPlinkURI);
+					self.makeDataLinks();
 				
-				var ua = navigator.userAgent;
+				} else {
+					mini_c.innerHTML = 
+						'<h2>No Data</h2>' +
+						'<p>This query returned an empty graph.</p>';
+				}
+
+				OAT.Dom.append ([item.dom.plnk_c, self.miniplnk]);
+				OAT.Dom.append ([item.dom.result_c, mini_c]);
 				
 				//				if (iSPARQL.Settings.addthis_key && !OAT.Browser.isScreenOnly) {
 				//					self.addthis_ctr = OAT.Dom.create ("a",{id: "addthis_ctr",
@@ -1092,10 +1284,6 @@ var QueryExec = function(optObj) {
 				//					OAT.MSG.attach (item.mini, 'RDFMINI_VIEW_CHANGED', self.makeAddThisURL);
 				//				}
 				
-		self.makeMiniRDFPlinkURI (false,false,{tabIndex:lastIndex});
-				OAT.MSG.attach (item.mini, 'RDFMINI_VIEW_CHANGED', self.makeMiniRDFPlinkURI);
-				
-
 			} else {
 		if (data.firstChild.tagName == 'sparql' && 
 		    data.firstChild.namespaceURI == 'http://www.w3.org/2005/sparql-results#') {		    
@@ -1130,16 +1318,14 @@ var QueryExec = function(optObj) {
 
 	this.processLink = function(domNode,href) {
 		var dereferenceRef = function(event) {
-			OAT.Event.prevent(event);
-
 			var cache = self.cache[self.cacheIndex];
 
-/*	    var q = 'define get:soft "replacing" \n'+
+			var q = 'define get:soft "replacing" \n'+
 					'define input:same-as "yes" \n'+
 					'define input:grab-seealso <http://www.w3.org/2002/07/owl#sameAs> \n'+
-		'DESCRIBE <'+href+'> FROM <' + href + '>';*/
-	    var q  = 'DESCRIBE <'+href+'>';
-			var bq = 'DESCRIBE <'+href+'>';
+		        'DESCRIBE <'+ encodeURI(href) +'> FROM <' + encodeURI(href) + '>';
+//			var q  = 'DESCRIBE <'+href+'>';
+			var bq = 'DESCRIBE <'+ encodeURI(href) +'>';
 			var o = {};
 			for (var p in cache.opts) { o[p] = cache.opts[p]; }
 			o.defaultGraph = false;
@@ -1153,8 +1339,18 @@ var QueryExec = function(optObj) {
 			self.execute(o);
  	};
 
+		var describeRef = function (event) {
+			var loc = window.location;
+			var go_to = loc.protocol + "//" + loc.hostname;
+			
+			if (loc.protocol == "https:" && loc.port != "443") go_to += ":" + loc.port;
+			if (loc.protocol == "http:" && loc.port != "80") go_to += ":" + loc.port;
+			
+			go_to += "/describe/?url=" + encodeURI(href); 
+			window.open (go_to);
+		}
+		
 		var selectRef = function(event) {
-			OAT.Event.prevent(event);
 			var cache = self.cache[self.cacheIndex];
 			var o = {};
 			for (var p in cache.opts) { o[p] = cache.opts[p]; }
@@ -1163,13 +1359,13 @@ var QueryExec = function(optObj) {
 
 			var q = 'SELECT DISTINCT * \n';
 			if (graph) { q += 'FROM <' + graph + '> \n'; }
-			q += 'WHERE { { <'+href+'> ?p ?o } UNION { ?s ?p <'+href+'> } }';
+			q += 'WHERE { { <'+ encodeURI(href)+'> ?p ?o } UNION { ?s ?p <'+ encodeURI(href) +'> } }';
 
 			o.query = q;
 			self.execute(o);
 	};
 
-		var genRef = function() {
+/*		var genRef = function() {
 			var ul = OAT.Dom.create("ul",{marginLeft:"20px",marginTop:"10px"});
 
 			var li = OAT.Dom.create("li");
@@ -1197,7 +1393,7 @@ var QueryExec = function(optObj) {
 			return ul;
 	};
 
-/*		var obj = {
+		var obj = {
 			title:"URL",
 			content:genRef,
 			newHref:href,
@@ -1208,16 +1404,21 @@ var QueryExec = function(optObj) {
 		}; */
 		
 		OAT.Event.attach (domNode, 'click', function (event) {
+            OAT.Event.prevent(event);
 			switch (iSPARQL.Settings.anchorMode) {
 			case 0:
 				dereferenceRef(event);
-				break;
+				event.cancelBubble = true;
+                return false;
 			case 1:
 				selectRef(event);
 				break;
-			default:
-				OAT.Event.prevent(event);
+			case 2:
 				window.open(href);
+				break;
+			default:
+				describeRef(event);
+				break;
 			}
 		});
 
@@ -1235,8 +1436,6 @@ var QueryExec = function(optObj) {
 //	a.target = "_blank";
 //	a.href = "/about/html/" + href;
 
-//	domNode.parentNode.appendChild(img1);
-//	domNode.parentNode.appendChild(a);
     };
 
      this.detectLocationMacros = function (q) {
@@ -1278,12 +1477,14 @@ var QueryExec = function(optObj) {
 		var request = self.buildRequest(opts);
 
 		var callback = function(data) {
+			self.request_count--;
 			self.addResponse(request,optObj,0,data);
 			if (opts.callback) { opts.callback(data); }
 	    OAT.MSG.send (self,"iSPARQL_QE_DONE",self);
 	};
 
 		var onerror = function(xhr) {
+			self.request_count--;
 			var txt = xhr.getResponseText();
 			if (txt.match(/SP031/) && optObj.backupQuery) {
 				var newO = {};
@@ -1295,6 +1496,8 @@ var QueryExec = function(optObj) {
 				self.addResponse(request,optObj,1,txt);
 				if (opts.onerror) { opts.onerror(txt); }
 			}
+			OAT.MSG.send (self, "iSPARQL_QE_DONE", self);
+			OAT.MSG.send (self, "iSPARQL_QE_ERROR", self);
 	};
 
 		var o = {
@@ -1307,6 +1510,9 @@ var QueryExec = function(optObj) {
 
 		if (!opts.endpoint) { opts.endpoint = '/sparql'; }
 
+		self.request_count++;
+		OAT.MSG.send (self, "iSPARQL_QE_START", self);
+		
 		OAT.AJAX.POST(opts.endpoint,request,callback,o);
 	}
 
diff --git a/binsrc/isparql/images/notify-throbber.gif b/binsrc/isparql/images/notify-throbber.gif
new file mode 100644
index 0000000..09d621e
Binary files /dev/null and b/binsrc/isparql/images/notify-throbber.gif differ
diff --git a/binsrc/isparql/index.html b/binsrc/isparql/index.html
index 1f59f4a..1ed59d0 100644
--- a/binsrc/isparql/index.html
+++ b/binsrc/isparql/index.html
@@ -3,11 +3,11 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!--
 
-  $Id: index.html,v 1.37.2.23 2011/03/23 11:56:21 source Exp $
+  $Id: index.html,v 1.37.2.32 2012/03/08 13:18:57 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2009 OpenLink Software
+  Copyright (C) 2009-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -96,15 +96,18 @@ OAT.MSG.attach(OAT, 'OAT_LOAD', myInit);
           <img src="/isparql/images/stop_32.png" alt="error"/>
           <div class="error statMsgError">
             iSPARQL is a JavaScript application.<br/>
-	        JavaScript is not available. This may mean that you are running on a browser that has no JavaScript support, 
-            or JavaScript is disabled. Please use a browser that supports JavaScript, or enable JavaScript for this page.
+	    It turns out that JavaScript is not available. This may mean that you are running on a browser that has no JavaScript support, 
+            or JavaScript is disabled.<br/>
+            To use iSPARQL, please switch to a browser that has JavaScript, or enable JavaScript for this page, if it's been disabled.
 	  </div>
         </noscript>
 
         <img src="/isparql/images/stop_32.png" alt="error" id="splashErrorImg" style="display: none"/>
+
         <div class="error" id="statMsgErr"></div>
 	<div id="splash_ver"></div>
-        <div id="splash_copyr">Copyright © 2006-2011 OpenLink Software</div>
+        <div id="splash_copyr">Copyright © 2006-2012 OpenLink Software</div>
+
         <div id="splash_foot" class="opl_motto">Making Technology Work For You ™</div>
       </div> <!-- #splash_inner -->
     </div> <!-- #splash -->
@@ -219,7 +222,7 @@ OAT.MSG.attach(OAT, 'OAT_LOAD', myInit);
 	    </div> <!-- #qbe_props_node -->
 	    <div id="qbe_props_edge" style="display:none;">
 	      <input type="checkbox" id="qbe_edge_type" /><label class="ckb" for="qbe_edge_type">Optional</label><br/>
-	      <label for="qbe_edge_value">Res Type: </label><input type="text" id="qbe_edge_value" />
+	          <label for="qbe_edge_value">Name: </label><input type="text" id="qbe_edge_value" />
 	    </div>
             <div id="qbe_props_group" style="display:none;">
               <label for="qbe_group_type">Group Type: </label>
@@ -241,8 +244,7 @@ OAT.MSG.attach(OAT, 'OAT_LOAD', myInit);
           </div> <!-- #qbe_props -->
           <div id="schemas"> <!#-- schemas (sub)window -->
 	    <div id="schemas_tree_container">
-	      <ul id="schemas_tree">
-	      </ul>
+	      <ul id="schemas_tree"></ul>
 	    </div>
 	    <div id="schema_div"></div>
 	    <button id="schema_import">Import</button>
@@ -389,6 +391,8 @@ WHERE     {	?thing a ?type;
 	  </div> <!-- #query_div -->
         <div id="res_area"></div> <!-- #res_area -->
       </div> <!-- page_query -->
+      <div id="queryopts_outer">
+        <div id="queryopts_ctr">
       <fieldset class="queryopts" id="queryopts">
 	  	<legend>Query options</legend>
 	  	<div id="qry_type_ctls">
@@ -405,9 +409,16 @@ WHERE     {	?thing a ?type;
 	  	  </select>
          | 
 	  	</div> <!-- qry_type_ctls -->
+	    <div class="fm_rw">
 	  	<label for="maxrows">Result size limit: </label>
         <input type="text" id="maxrows" size="4"/> rows
-        <span class="maxrows_expln">Leave empty for server maximum setting.</span>
+              <span class="expln">Leave empty for server maximum setting.</span>
+            </div>
+            <div class="fm_rw" id="qry_tout_ctls">
+              <label for="timeout">Query timeout: </label>
+	      <input type="text" id="timeout" size="4" />
+              <span class="expln" id="tout_expln">msec - leave blank for server default, or when not querying a Virtuoso endpoint.</span>
+	    </div>
       </fieldset>
         <div class="controls" id="controls">
         <h3 id="endpoint_opts_toggler" class="ctl_tgl">
@@ -418,13 +429,13 @@ WHERE     {	?thing a ?type;
               <table>
                 <tr>
 	          <td class="cachingOpts" style="padding-right: 8px;">
-		    <label for="cachingSchemesCtl" title="(re)set get:soft pragma value">Caching Scheme</label><!-- XXX -->
+		    <label for="cachingSchemesCtl" title="(re)set get:soft pragma value">Caching Scheme:</label><!-- XXX -->
 		    <select id="cachingSchemesCtl">
                       <option value="none">Don't Sponge</option>
 		      <option value="replacing">None (replacing)</option>
 		      <option value="soft">Automatic (soft)</option>
 		    </select><br/>
-		    <label for="nodesRetrievedCtl" title="(re)set input:grab-limit pragma value">Limit Sponging To</label>
+		    <label for="nodesRetrievedCtl" title="(re)set input:grab-limit pragma value">Limit Sponging To:</label>
 		    <select id="nodesRetrievedCtl"> <!-- XXX should be text input -->
 		      <option value="">Default</option>
 		      <option value="100">100</option>
@@ -433,7 +444,7 @@ WHERE     {	?thing a ?type;
 		      <option value="400">400</option>
 		      <option value="500">500</option>
 		    </select><label class="unit">nodes</label><br/>
-		    <label for="nodesCrawledCtl" title="(re)set input:grab-depth pragma value">Sponge No Deeper Than</label>
+		    <label for="nodesCrawledCtl" title="(re)set input:grab-depth pragma value">Sponge No Deeper Than:</label>
                     <select id="nodesCrawledCtl">
 		      <option value="">Default</option>
 		      <option value="1">1</option>
@@ -457,7 +468,7 @@ WHERE     {	?thing a ?type;
 			   checked="checked"/>
 		    <label for="pathTravSchemesDefault"
 		           id="pathTravSchemesDefaultLabel"
-			   class="ckb">Server Default</label><br/> <!-- XXX should have list to show -->
+			   class="ckb">Server Default:</label><br/> <!-- XXX should have list to show -->
 
 		    <input type="radio"
 		           name="pathTraversalSchemes"
@@ -484,11 +495,11 @@ WHERE     {	?thing a ?type;
 		      <select id="pathTravSchemesPreds"
 		              multiple="multiple"
 			      style="height: 100px;">
-		        <option value="http://xmlns.com/foaf/0.1/" selected="selected">foaf:knows</option>
-		        <option value="http://rdfs.org/sioc/ns#" selected="selected">sioc:links_to</option>
-		        <option value="http://www.w3.org/2000/01/rdf-schema#" selected="selected">rdfs:isDefinedBy</option>
-		        <option value="http://www.w3.org/2000/01/rdf-schema#" selected="selected">rdfs:seeAlso</option>
-		        <option value="http://www.w3.org/2002/07/owl#" selected="selected">owl:sameAs</option>
+		            <option value="http://xmlns.com/foaf/0.1/knows" selected="selected">foaf:knows</option>
+		            <option value="http://rdfs.org/sioc/ns#links_to" selected="selected">sioc:links_to</option>
+		            <option value="http://www.w3.org/2000/01/rdf-schema#isDefinedBy" selected="selected">rdfs:isDefinedBy</option>
+		            <option value="http://www.w3.org/2000/01/rdf-schema#seeAlso" selected="selected">rdfs:seeAlso</option>
+		            <option value="http://www.w3.org/2002/07/owl#sameAs" selected="selected">owl:sameAs</option>
 		      </select><br/>
 		      <input type="button" id="spongerPredsAdd" value="Add" style="margin-top:10px;"/>
 		      <input type="button" id="spongerPredsDel" style="margin-top:10px;" value="Remove"/>
@@ -518,8 +529,16 @@ WHERE     {	?thing a ?type;
           </fieldset>
         </div> <!-- #mdopts_ctr -->
       </div> <!-- #queryMetaData -->
+        <br style="clear:both;" />
+        </div> <!-- queryopts_ctr -->
+      </div> <!-- #queryopts_outer -->
 	<div class="main_col_page" id="page_results"></div>
         <div id="foot">
+	      <div id="data_links" style="display:none">Raw Linked Data formats: 
+            <span id="cxml_raw_lnk_c" style="display:none"><a id="cxml_raw_lnk">CXML</a> | </span><a id="csv_raw_lnk">CSV</a> |
+		    RDF (<a id="nt_raw_lnk">N-Triples</a> <a id="n3_raw_lnk">N3/Turtle</a> <a id="json_raw_lnk">JSON</a> <a id="rdfxml_raw_lnk">XML</a>) |
+            ODATA (<a id="odata_atom_lnk">Atom</a> | <a id="odata_json_lnk">JSON</a>)
+          </div>
           <div class="foot_l" id="foot_l">
           <div class="ubiq_gem" style="display: none">
               <a onclick="javascript:gen_ubiq_meta()">
@@ -528,7 +547,8 @@ WHERE     {	?thing a ?type;
             </div>
              Bookmarklet - drag this link to your browser's bookmark bar: <a id="isparql_bookmarklet_a" href="javascript:(function(){location='http://www.openlinksw.com/';})();">iSPARQL</a> <a id="sparql_bookmarklet_a" href="" style="display:none">SPARQL</a>
         </div> <!-- #foot_l -->
-        <div class="foot_r" id="foot_r">Copyright © 2006-2011 OpenLink Software<br/><span id="ft_loc"></span><br/>
+          <div class="foot_r" id="foot_r">
+            iSPARQL Copyright © 2006-2012 OpenLink Software<br/><span id="ft_loc"></span><br/>
         </div>
 	<div id="stats"></div> <!-- stats -->
       </div> <!-- #foot -->
@@ -560,7 +580,7 @@ WHERE     {	?thing a ?type;
       <label for="auth_dlg_user">Username:</label>
       <input type="text" id="auth_dlg_user" value="demo" /><br/>
       <label for="auth_dlg_pass" class="align">Password:</label>
-      <input type="password" id="auth_dlg_pass" value="demo"><br/>
+      <input type="password" id="auth_dlg_pass" value="demo" /><br/>
       <!--input type="checkbox" id="auth_dlg_save"><label class="ckb">Save in browser</label-->
       <div id="auth_dlg_error"></div>
       <div id="auth_buttons"><button id="auth_login_b">Login</button><button id="auth_cancel_b">Cancel</button></div>
@@ -644,16 +664,17 @@ WHERE     {	?thing a ?type;
       <h1>OpenLink iSPARQL</h1>
       <pre>
       Version: <span id="about_version">N/A</span>
-      Build Date: <span id="about_date">N/A</span>
+<!--      Build Date:   <span id="about_date">N/A</span> -->
       Built using <a target="_blank" href="http://sourceforge.net/projects/oat">OpenLink Ajax Toolkit (OAT)</a>
       OAT version: <span id="about_oat_version">N/A</span>
       OAT build: <span id="about_oat_build">N/A</span>
       IRI DB count: <span id="iridb_stats">N/A</span> IRI IDs
-      STORE:        <span id="triple_count">N/A</span> triples
-                    <span id="item_count">N/A</span> items
+<!--      STORE:        <span style="display:none" id="store_count">N/A</span> graphs
+                    <span id="triple_count">N/A</span> triples
+                    <span style="display:none" id="item_count">N/A</span> items
                     <span id="label_count">N/A</span> labels chosen
-                    <span id="label_proc_count">N/A</span> labels processed
-      LOCATION:     <span id="about_loc"></span>
+                      <span id="label_proc_count">N/A</span> labels processed -->
+      Last known Loc: <span id="about_loc">Unknown</span>
 
       </pre>
       <div class="btn_row"><button id="about_dlg_b_ok">OK</button></div>
@@ -668,6 +689,10 @@ WHERE     {	?thing a ?type;
       <div id="prefs_tab_services_ct" class="prefs_tab_ctr">
         <h2>Services</h2>
 		<div id="endpoint"><label for="service">SPARQL Endpoint:</label></div> <!-- endpoint combo box container -->
+	<!--div id="episvirtctr">
+	  <input type="checkbox" id="episvirt" checked="true" />
+	  <label class="ckb" for="episvirt">Use Virtuoso-specific options</label>
+        </div-->
         <div id="shortener">
 		  <input type="checkbox" id="shortener_ep_ckb">
 		  <label for="shortener_ep_ckb" class="ckb">Shorten URIs using:<br/><span class="expln">Virtuoso curi endpoint</span></label><input id="shortener_ep"></div>
@@ -678,8 +703,7 @@ WHERE     {	?thing a ?type;
     </div> <!-- #prefs_dlg -->
 
     <div id="qbe_unsupported_div">
-      iSPARQL's Query By Example feature relies upon features and open standards not supported by
-      Microsoft Internet Explorer.<br/>
+      iSPARQL's Query By Example builder requires SVG support.<br/>
       Please try one of the following:<br/>
       <a target="_blank" href="http://www.firefox.com/"
          title="Get Firefox"><img class="logo" src="images/firefox-logo.png" alt="Get Firefox"/></a> 
diff --git a/binsrc/isparql/io.js b/binsrc/isparql/io.js
index 588a719..af5cc58 100644
--- a/binsrc/isparql/io.js
+++ b/binsrc/isparql/io.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: io.js,v 1.8.2.9 2011/01/03 23:38:13 source Exp $
+ *  $Id: io.js,v 1.8.2.11 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -79,22 +79,38 @@ iSPARQL.IO = {
 	'<ISparqlDynamicPage>\n'+
 	'</ISparqlDynamicPage>\n'+
 	'</iSPARQL>';
+
 	var xml = OAT.Xml.createXmlDoc(xmlTemplate);
-	var page = xml.getElementsByTagName("ISparqlDynamicPage")[0];
-	var isparql = xml.getElementsByTagName("iSPARQL")[0];
-	var title = xml.getElementsByTagName("title")[0];
-	var creator = xml.getElementsByTagName("creator")[0];
-	var description = xml.getElementsByTagName("description")[0];
+
+	var page =        OAT.Xml.getElementsByLocalName(xml,"ISparqlDynamicPage")[0];
+	var isparql =     OAT.Xml.getElementsByLocalName(xml,"iSPARQL")[0];
+	var title =       OAT.Xml.getElementsByLocalName(xml,"title")[0];
+	var creator =     OAT.Xml.getElementsByLocalName(xml,"creator")[0];
+	var description = OAT.Xml.getElementsByLocalName(xml,"description")[0];
 
 	var addNode = function(p,ns,name,text,nenc) {
-	    var node = xml.createElementNS(ns,name);
+	    var node;
 	    var t = text || "";
+
+	    if (OAT.Browser.isIE) {
+		node = xml.createElement(name)
+
+		if (nenc) {
+		    node.text = t;
+		}
+		else {
+		    node.text = OAT.Dom.toSafeXML(t);
+		}
+	    }
+	    else {
+		node = xml.createElementNS(ns,name);
 	    if (nenc) {
 		node.textContent = t;
             }
             else {
 		node.textContent = OAT.Dom.toSafeXML(t);
             }
+	    }
 	    p.appendChild(node);
 	    return node;
 	}
@@ -106,7 +122,12 @@ iSPARQL.IO = {
 
 	if (dataObj.query) {
           qn = addNode(page,iNS,"query",dataObj.query,true);
- 	      if (dataObj.maxrows) { qn.setAttributeNS (iNS, 'maxrows', dataObj.maxrows.toString()); }
+ 	    if (dataObj.maxrows) { 
+		if (OAT.Browser.isIE)
+		    qn.setAttribute ('maxrows', dataObj.maxrows.toString());
+		else
+		    qn.setAttributeNS (iNS, 'maxrows', dataObj.maxrows.toString()); 
+	    }
         }
 	if (dataObj.prefixes) {
 	    var schemas = addNode(page, iNS, "schemas");
@@ -145,10 +166,16 @@ iSPARQL.IO = {
 	if (dataObj.canvas) { addNode(isparql,iNS,"canvas",dataObj.canvas); }
 
 	if (dataObj.metaDataOpts) {
+	    if (OAT.Browser.isIE) {
+		title.text       = OAT.Dom.toSafeXML(dataObj.metaDataOpts.title);
+		creator.text     = OAT.Dom.toSafeXML(dataObj.metaDataOpts.creator);
+		description.text = OAT.Dom.toSafeXML(dataObj.metaDataOpts.description);
+	    } else {
 	    title.textContent = OAT.Dom.toSafeXML(dataObj.metaDataOpts.title);
 	    creator.textContent = OAT.Dom.toSafeXML(dataObj.metaDataOpts.creator);
 	    description.textContent = OAT.Dom.toSafeXML(dataObj.metaDataOpts.description);
 	}
+	}	
 
 	return OAT.Xml.serializeXmlDoc(xml);
     },
diff --git a/binsrc/isparql/location.js b/binsrc/isparql/location.js
index daaed32..3187172 100644
--- a/binsrc/isparql/location.js
+++ b/binsrc/isparql/location.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: location.js,v 1.1.2.7 2011/03/23 11:56:21 source Exp $
+ *  $Id: location.js,v 1.1.2.8 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
diff --git a/binsrc/isparql/main.js b/binsrc/isparql/main.js
index bae8c08..27ee8c2 100644
--- a/binsrc/isparql/main.js
+++ b/binsrc/isparql/main.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: main.js,v 1.45.2.31 2011/03/29 11:03:35 source Exp $
+ *  $Id: main.js,v 1.45.2.41 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -44,7 +44,7 @@ function init() {
 	iSPARQL.Common.initAdv(); // XXX warning defines global adv
 	
 
-	if (!OAT.Browser.isIE && !OAT.Browser.isScreenOnly)
+		if (OAT.Browser.hasSVG)
 	    iSPARQL.Common.initQBE(); // XXX warning defines global qbe
 
     	iSPARQL.Common.initQE();  // XXX warning defines global qe, uses global qbe
@@ -55,12 +55,10 @@ function init() {
 
 	iSPARQL.StatusUI.hide();
 
-	if (!OAT.Browser.isIE || !OAT.Browser.isScreenOnly) {
+		if (OAT.Browser.hasSVG) {
 	    if (qbe.svgsparql) { qbe.svgsparql.reposition(); }
-	}
-
-		if (OAT.Browser.isIE || OAT.Browser.isScreenOnly && iSPARQL.Settings.view == 0)
 			tab.go (1); /* is 0-based index... */
+		}
 		else
 			tab.go (iSPARQL.Settings.view);
 
@@ -161,11 +159,11 @@ iSPARQL.QueryExec = function(optObj) {
     self.go(optObj);
 }
 
-iSPARQL.LayoutMgr = {
-	resize_h: function () {
-		
-	},
-}
+//iSPARQL.LayoutMgr = {
+//	resize_h: function () {
+//		
+//	},
+//}
 
 iSPARQL.Advanced = function () {
     var self = this;
@@ -183,8 +181,8 @@ iSPARQL.Advanced = function () {
 	$("query").value = iSPARQL.dataObj.query;
 
 	/* default graph */
+		if (iSPARQL.dataObj.defaultGraph) 
 	$("default-graph-uri").value = iSPARQL.dataObj.defaultGraph;
-
 	}
 
     this.func_load = function() {
@@ -236,7 +234,8 @@ iSPARQL.Advanced = function () {
 	    pragmas:iSPARQL.endpointOpts.pragmas,
 	    namedGraphs:iSPARQL.dataObj.namedGraphs,
 	    callback:iSPARQL.Common.setData,
-			maxrows:iSPARQL.dataObj.maxrows,
+			maxrows:iSPARQL.Settings.maxrows,
+			timeout:iSPARQL.Settings.timeout,
 			view:1
 	}
 	
@@ -307,6 +306,7 @@ iSPARQL.Advanced = function () {
 	dataObj.endpointOpts.useProxy = iSPARQL.endpointOpts.useProxy;
 	dataObj.endpointOpts.pragmas = iSPARQL.endpointOpts.pragmas;
 	dataObj.maxrows = iSPARQL.dataObj.maxrows;
+		dataObj.timeout = iSPARQL.dataObj.timeout;
 	dataObj.defaultGraph = $v('default-graph-uri');
 		dataObj.metaDataOpts = iSPARQL.mdOpts.getMetaDataObj();
 		
@@ -361,10 +361,8 @@ OAT.Observer = {
     }
 }
 
-
-
 //
-// XXX (ghard) consider saving the whole query context (default graph, endpoint, etc.)
+// TODO (ghard) consider saving the whole query context (default graph, endpoint, etc.)
 //
 
 iSPARQL.RecentQueriesUI = function () {
@@ -437,6 +435,9 @@ iSPARQL.RecentQueriesUI = function () {
 //
 // Observes SpongerOpts
 //
+ // EndPointOptsUI
+	
+
 
 iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
     var self = this;
@@ -556,6 +557,7 @@ iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
     this.grabAllChangeCB = function (elm) {
 	if (elm.target.checked) {
 	    self.opts.setGrabAll (self);
+			self.hideSeeAlsoControls();
 	}
     }
 
@@ -585,7 +587,7 @@ iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
     }
 
     this.grabPredsChangeCB = function (elm) {
-	return 0;
+		self.opts.setSeeAlso(self);
     }
 
     this.hideSeeAlsoControls = function() {
@@ -677,11 +679,11 @@ iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
 	    || window.confirm("This will remove custom added predicates. Really restore?")) {
 
 	    $("pathTravSchemesPreds").options.length = 0;
-	    $("pathTravSchemesPreds").options[0] = new Option('foaf:knows','http://xmlns.com/foaf/0.1/',true);
-	    $("pathTravSchemesPreds").options[1] = new Option('sioc:links_to','http://rdfs.org/sioc/ns#',true);
-	    $("pathTravSchemesPreds").options[2] = new Option('rdfs:isDefinedBy','http://www.w3.org/2000/01/rdf-schema#',true);
-	    $("pathTravSchemesPreds").options[3] = new Option('rdfs:seeAlso','http://www.w3.org/2000/01/rdf-schema#',true);
-	    $("pathTravSchemesPreds").options[4] = new Option('owl:sameAs','http://www.w3.org/2002/07/owl#',true);
+			$("pathTravSchemesPreds").options[0] = new Option('foaf:knows','http://xmlns.com/foaf/0.1/knows',true);
+			$("pathTravSchemesPreds").options[1] = new Option('sioc:links_to','http://rdfs.org/sioc/ns#links_to',true);
+			$("pathTravSchemesPreds").options[2] = new Option('rdfs:isDefinedBy','http://www.w3.org/2000/01/rdf-schema#isDefinedBy',true);
+			$("pathTravSchemesPreds").options[3] = new Option('rdfs:seeAlso','http://www.w3.org/2000/01/rdf-schema#seeAlso',true);
+			$("pathTravSchemesPreds").options[4] = new Option('owl:sameAs','http://www.w3.org/2002/07/owl#sameAs',true);
 	    }
 	setGrabPragma();
     }
@@ -689,7 +691,7 @@ iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
     this.setEpOptCtl = function () {
 	self.epCombo.input.value = self.opts.endpointPath;
 
-	if (self.opts.verType == iSPARQL.SERVER_TYPE_VIRTUOSO)
+		if (self.opts.serverType == iSPARQL.SERVER_TYPE_VIRTUOSO)
 	    $("endpointTypeInd").innerHtml = "(Virtuoso)";
 	else
 	    $("endpointTypeInd").innerHtml = "(Generic)";
@@ -793,7 +795,7 @@ iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
 
     self._init ();
 
-} // EndPointOptsUI
+}
 
 //
 // EndpointOpts holds global endpoint-related options, it is observed by the EndpointOptsUI
@@ -803,6 +805,7 @@ iSPARQL.EndpointOptsUI = function (optsObj, toggler, indicator, container) {
 //
 //
 
+	
 iSPARQL.EndpointOpts = function (optsObj) {
     var self = this;
 
@@ -825,7 +828,7 @@ iSPARQL.EndpointOpts = function (optsObj) {
 	var _o = {
 		endpoint: '/sparql',
 		useProxy: true,
-		pragmas: [],
+		pragmas: []
 	};
 
 	for (p in optsObj) {
@@ -885,27 +888,37 @@ iSPARQL.EndpointOpts = function (optsObj) {
     }
 
     this.endpointDetectCB = function (data, headers) {
-	if (headers["Server"].match(/Virtuoso.*/)) {
+		var srv = headers["Server"];
+		if (srv && srv.match (/Virtuoso.*/)) {
 	    self.serverType = iSPARQL.SERVER_TYPE.VIRTUOSO;
 	} else { 
 	    self.serverType = iSPARQL.SERVER_TYPE.GENERIC;
 	}
+		OAT.MSG.send ("*", "ISPARQL_SERVER_DETECTED", self.serverType);
 	OAT.Observer.notify (self.observers, null, 'detectEndpoint');
     }
 
     this.detectEndpointType = function () {
+		if (self.setEndpointTO) {
+			clearTimeout (self.setEndpointTO);
 	self.setEndpointTO = false;
+		}
 	var o = {
-	    type:OAT.AJAX.TYPE_XML
+			type:OAT.AJAX.TYPE_TEXT
 	};
 
-//	OAT.AJAX.POST (self.endpointPath, "select * where {?s ?p ?o} limit 1", self.endPointDetectCB, o);
+		// FIXME: Webkit origin policies clash with detection of Server from headers :(
+//		
+//		OAT.AJAX.HEAD (self.endpointPath, 
+//                      false,
+//                      self.endpointDetectCB, o);
     }
 
     this.setEndpointTO = false;
 
     this.setEndpoint = function (callerObj, val) {
 	self.endpointPath = val;
+		iSPARQL.Settings.endpoint = val;
 	if (self.setEndpointTO) clearTimeout (self.setEndpointTO);
 	self.setEndpointTO = setTimeout (self.detectEndpointType, 3000);
 	self.saveSes();
@@ -961,7 +974,8 @@ iSPARQL.EndpointOpts = function (optsObj) {
 	    a.push(['define get:soft',[(val)? '"'+val+'"' : val]]);
 	else {
 	    a.push(['define get:soft',[false]]);
-			//	    a.push(['define input:grab-limit',[false]]); XXX will have to test which way is best for user (what happens to existing other 
+			//	    a.push(['define input:grab-limit',[false]]); 
+            //               XXX will have to test which way is best for user (what happens to existing other 
 	    //	    a.push(['define input:grab-depth',[false]]); Sponger options if sponger is set to be off.
 	    //	    a.push(['define input:grab-all',[false]]);
 			//	    a.push(['define input:grab-seealso',[false]]);
@@ -1018,10 +1032,10 @@ iSPARQL.EndpointOpts = function (optsObj) {
 	for (var i=0;i<preds.length;i++) {
 	    var p = preds[i];
 
-	    if (p.selected) { v.push("<" + p.text + ">"); pref.push(p.text + " = " + p.value); }
+			if (p.selected) v.push("<" + p.value +">");
 	}
 
-	iSPARQL.Common.addPrefix (p);
+//		iSPARQL.Common.addPrefix (p);
 
 	a.push(['define input:grab-all',[false]]);
 	a.push(['define input:grab-seealso',v]);
@@ -1293,6 +1307,21 @@ iSPARQL.ServerConnection = function (uri, authObj) {
 			self.authObj = OAT.JSON.deserialize(sessionStorage.iSPARQLAuth);
     }
 
+
+    this.connectTestCb = function () {
+		self.saveAuth ();
+		OAT.WebDav.init({imageExt:"png", 
+	    				 imagePath:toolkitImagesPath, 
+	    				 silentStart:true, 
+	    				 user:self.authObj.user,
+	    				 pass:self.authObj.password, 
+	    				 isDav:true});
+		
+		self.detectServerProperties ();
+		
+		OAT.MSG.send (self, "iSPARQL_SERVER_CONNECTED", self);
+	}
+
     this.connect = function (_user, _pass, caller) {
 	self.authObj.user = _user;
 		self.authObj.password = _pass;
@@ -1301,10 +1330,8 @@ iSPARQL.ServerConnection = function (uri, authObj) {
 		if ((!!self.authObj.user) && self.authObj.user != '') 
 		  {
 			  OAT.AJAX.PROPFIND ('/DAV/home/' + _user,'',
-		      function (data, headers) {
-									 self.connected = true;
-		      },
-		      		  {async:false,
+								 self.connectTestCb,
+								 {async:true,
 								  user: self.authObj.user,
 								  password: self.authObj.password,
 		      		   onstart:function() {return},
@@ -1315,19 +1342,6 @@ iSPARQL.ServerConnection = function (uri, authObj) {
 									  else self.error = 'Unknown error';
 									  self.connected = false; }});
 
-	if (self.connected) {
-	    self.saveAuth ();
-	    	OAT.WebDav.init({imageExt:"png",
-	    					 imagePath:toolkitImagesPath,
-	    					 silentStart:true,
-	    					 user:self.authObj.user,
-	    						   pass:self.authObj.password, 
-	    					 isDav:true});
-
-	self.detectServerProperties ();
-
-	OAT.MSG.send (self, "iSPARQL_SERVER_CONNECTED", self);
-    }
 		  }
     }
 
@@ -1420,6 +1434,7 @@ iSPARQL.Common = {
 	if (toolkitImagesPath.match(/[^\/]$/)) { toolkitImagesPath += "/"; }
 
 	OAT.Preferences.imagePath = toolkitImagesPath;
+		OAT.Preferences.showAjax = 0;
 	OAT.AJAX.imagePath = toolkitImagesPath;
 	OAT.Anchor.imagePath = toolkitImagesPath;
 	OAT.WebDav.options.imagePath = toolkitImagesPath;
@@ -1489,7 +1504,7 @@ iSPARQL.Common = {
 							  OAT.MSG.send (self,"iSPARQL_USER_PREF_CHANGE",false);
 						  });
 
-		if (iSPARQL.serverConn.isConnected) {
+/*		if (iSPARQL.serverConn.isConnected) {
 	if (iSPARQL.serverConn.isVirtuoso) {
 	    $('about_version').innerHTML = iSPARQL.serverConn.serverVersion;
 	    $('about_date').innerHTML = iSPARQL.serverConn.serverBuildDate;
@@ -1502,19 +1517,29 @@ iSPARQL.Common = {
 		else {
 			$('about_version').innerHTML = 'unknown';
 			$('about_date').innerHTML = 'unknown';
+		} */
+
+		if (iSPARQL.Settings.sparqlCxmlInstalled) {
+			OAT.Dom.show ('cxml_raw_lnk_c');
 		}
 
+        $('about_version').innerHTML = iSPARQL.Settings.isparql_version;
 	$('about_oat_version').innerHTML = OAT.Preferences.version;
 	$('about_oat_build').innerHTML = OAT.Preferences.build;
 	$('throbber').src = OAT.Preferences.imagePath + "Dav_throbber.gif";
 
+		var iridbstats = OAT.IRIDB.getStats();
+		$('iridb_stats').innerHTML = iridbstats.iriCount;
+
+
+		// FIXME: only shows triple_count, etc. stats on the latest rdfstore.
+
 	OAT.MSG.attach ("*", 
 			"OAT_RDF_STORE_LOADED", 
 			function (m,s,l) {	
 			    var iridbstats = OAT.IRIDB.getStats();
 			    $('iridb_stats').innerHTML = iridbstats.iriCount;
 			    $('triple_count').innerHTML = m.getTripleCount();
-							$('item_count').innerHTML = m.getGraphCount();
 			    $('label_count').innerHTML = m.getLabelCount();
 			    $('label_proc_count').innerHTML = m.getLabelProcCount();
 			});
@@ -1539,19 +1564,21 @@ iSPARQL.Common = {
  			OAT.Dom.show('queryopts');
 			OAT.Dom.show('queryMetaData');
 			OAT.Dom.show('controls');
+				OAT.Dom.hide('data_links')
 	    }
 	    else if (newIndex == 1) { // Advanced
 			OAT.Dom.hide ('qry_type_ctls');
  			OAT.Dom.show('queryopts');
 			OAT.Dom.show('queryMetaData');
 			OAT.Dom.show('controls');
+				OAT.Dom.hide('data_links')
 	    }
 	    else {	// Result tab
 			OAT.Dom.hide('qry_type_ctls');
  			OAT.Dom.hide('queryopts');
 			OAT.Dom.hide('queryMetaData');
 			OAT.Dom.hide('controls');
-		
+				OAT.Dom.show('data_links')
 	    }
 	}
 
@@ -1574,14 +1601,17 @@ iSPARQL.Common = {
 	tab = new OAT.Tab ("main_col",
 						   {//dockMode:false,
 							//dockElement:"tabs",
-					goCallback:tab_goCallback,
+							goCallback:tab_goCallback
 							//onDock:onDock,
 							//onUnDock:onUnDock,
 							//dockWindowWidth:1000,
 							//dockWindowHeight:600
 						   });
 
+		if (OAT.Browser.hasSVG) {
 	tab_qbe =     tab.add ("tab_qbe",    "page_qbe");
+		}
+
 	tab_query =   tab.add ("tab_query",  "page_query");
 	tab_results = tab.add ("tab_results","page_results");
 
@@ -1596,6 +1626,7 @@ iSPARQL.Common = {
 
 	OAT.Event.attach ("browse_btn", "click", iSPARQL.Common.fileRef);
 
+		if (OAT.Browser.hasSVG) {
 	var loadToQBE = OAT.Dom.create("li",{},"nav");
 	loadToQBE.title = 'Load query into QBE';
 	var img = OAT.Dom.create("img");
@@ -1628,28 +1659,17 @@ iSPARQL.Common = {
 		       });
 
 	OAT.Dom.append([qe.dom.ul,loadToAdvanced],[loadToAdvanced,img]);
-
-	/* qbe_unsupp */
-	iSPARQL.dialogs.qbe_unsupp = new OAT.Dialog("SVG Not Available","qbe_unsupported_div",{width:400,modal:1});
-
-	iSPARQL.dialogs.qbe_unsupp.ok = function() {
-	    tab.go(1);
-	    iSPARQL.dialogs.qbe_unsupp.hide();
 	}
 
-	iSPARQL.dialogs.qbe_unsupp.cancel = iSPARQL.dialogs.qbe_unsupp.ok;
-
 	iSPARQL.StatusUI.statMsg ("Prefixes…");
 	var sel_elm = $("prefix");
 
-	for (var i=0;i<window.defaultPrefixes.length;i++) {
-	    var p_obj = window.defaultPrefixes[i];
-	    if (! (!!p_obj.hidden)) {
-		var opt_val = "PREFIX " + p_obj.label + ": <" + p_obj.uri + ">";
-		var opt_ct  = p_obj.label.toUpperCase();
+		for (var i=0;i<iSPARQL.Defaults.namespaces.length;i++) {
+			var p_obj = iSPARQL.Defaults.namespaces[i];
+			var opt_val = "PREFIX " + p_obj[1] + ": <" + p_obj[0] + ">";
+			var opt_ct  = p_obj[1].toUpperCase();
 		var opt_elm = OAT.Dom.option (opt_ct, opt_val, sel_elm);
 	    }
-	}
 
 	iSPARQL.StatusUI.statMsg ("MetaData UI…");
 	iSPARQL.mdUI = new iSPARQL.MetaDataOptsUI (iSPARQL.mdOpts,
@@ -1709,19 +1729,36 @@ iSPARQL.Common = {
 	// Help menu dismiss button
 
 	/* build info */
-	$("foot_r").innerHTML += " OAT Version " + OAT.Preferences.version + " Build " + OAT.Preferences.build;
-
+//		$("foot_r").innerHTML += " OAT Version " + OAT.Preferences.version + " Build " + OAT.Preferences.build;
 
 		$('default-graph-uri').value = iSPARQL.Settings.graph;
 		$('query').value = iSPARQL.Settings.query;
 
 		$('maxrows').value = iSPARQL.Settings.maxrows;
-	OAT.Event.attach ('maxrows', 'change',
+
+		OAT.Event.attach ('maxrows', 'blur',
 					function () {
 						var n = parseInt($v('maxrows'));
 							  iSPARQL.Settings.maxrows = isNaN(n) ? 0 : n; 
 						});
 
+		OAT.MSG.attach ("*", "iSPARQL_SERVER_DETECTED", 
+						function (m,s,l) { 
+							if (l == iSPARQL.SERVER_TYPE_VIRTUOSO) {
+								$('timeout').disabled=false;
+							}
+							else {
+								$('timeout').disabled=true;
+							}
+						});
+
+		$('timeout').value = iSPARQL.Settings.timeout ? iSPARQL.Settings.timeout : '';
+		OAT.Event.attach ('timeout', 'blur',
+						  function () {
+							  var n = parseInt($v('timeout'));
+							  iSPARQL.Settings.timeout = isNaN(n) ? false : n;
+						  });
+
 		enable_if_ubiq ($('ubiq_gem'));
 		
 		page_w = OAT.Dom.getWH('page')[0] - 20;
@@ -2004,7 +2041,7 @@ iSPARQL.Common = {
 
     setData:function(data) {
 	iSPARQL.dataObj.data = data;
-		OAT.Debug.log(0,'setData:' + iSPARQL.dataObj.data);
+		OAT.Debug.log(0,'setData');
     },
 
     // sessionStorage handling
@@ -2085,6 +2122,9 @@ iSPARQL.Common = {
 		if (qp) iSPARQL.Settings.qp_override = qp;
 		if (p['__DEBUG']) iSPARQL.Settings.debug = true;
 		if (p['maxrows']) iSPARQL.Settings.maxrows = parseInt(p['maxrows']);
+		if (p['timeout']) iSPARQL.Settings.timeout = parseInt(p['timeout']);
+		if (p['amode']) iSPARQL.Settings.anchorMode = parseInt(p['amode']);
+
     },
 
 
@@ -2130,6 +2170,7 @@ iSPARQL.Common = {
 		iSPARQL.dataObj.prefixes = []; // XXX
 	iSPARQL.dataObj.pragmas = [];
 		iSPARQL.dataObj.maxrows = iSPARQL.Settings.maxrows;
+		iSPARQL.dataObj.timeout = iSPARQL.Settings.timeout;
 	iSPARQL.dataObj.canvas = false;
 		iSPARQL.dataObj.sponge = iSPARQL.Settings.sponge;
 		iSPARQL.dataObj.tab = iSPARQL.Settings.tab;
@@ -2237,7 +2278,8 @@ function tool_put_line_start(txt){
     }
     query.value = res;
     //alert(res.charAt(start - 1 - OAT.Browser.isIE));
-    if (!((res.charAt(start - 1 - OAT.Browser.isIE) == "\n" || start == 0) && start != end)) start = start + txt.length;
+    if (!((res.charAt(start - 1 - OAT.Browser.isIE) == "\n" || start == 0) && start != end)) 
+      start = start + txt.length;
 
     if (cnt > 1) end = end + (cnt * txt.length) - (OAT.Browser.isIE * (cnt - 1));
     else end = end + txt.length;
diff --git a/binsrc/isparql/make_vad.sh b/binsrc/isparql/make_vad.sh
index 46e7188..aa867da 100755
--- a/binsrc/isparql/make_vad.sh
+++ b/binsrc/isparql/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.17.2.5 2011/02/03 10:28:23 source Exp $
+#  $Id: make_vad.sh,v 1.17.2.7 2012/03/08 12:55:00 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -280,7 +280,7 @@ sticker_init() {
   echo "  <name package=\"iSPARQL\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"iSPARQL\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
diff --git a/binsrc/isparql/qbe.js b/binsrc/isparql/qbe.js
index f7e8267..e20030d 100644
--- a/binsrc/isparql/qbe.js
+++ b/binsrc/isparql/qbe.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: qbe.js,v 1.36.2.13 2011/03/29 11:03:35 source Exp $
+ *  $Id: qbe.js,v 1.36.2.15 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -2153,7 +2153,7 @@ iSPARQL.QBE = function (def_obj) {
 	} else { OAT.Dom.hide("qbe_return_btn");}
 
     } else {
-	if (self.svgsparql) { self.loadFromString(self.defaults.query); }
+	if (self.svgsparql) { self.loadFromString(self.defaults.query); self.svgsparql.reposition();}
 	$('qbe_graph').value = self.defaults.graph;
 	OAT.Dom.hide("qbe_return_btn");
     }
diff --git a/binsrc/isparql/remote.vsp b/binsrc/isparql/remote.vsp
index d7479a1..2016c02 100644
--- a/binsrc/isparql/remote.vsp
+++ b/binsrc/isparql/remote.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: remote.vsp,v 1.3.2.1 2009/06/10 19:49:06 source Exp $
+--  $Id: remote.vsp,v 1.3.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/set_dav_props.vsp b/binsrc/isparql/set_dav_props.vsp
index 745e84d..a7cb343 100644
--- a/binsrc/isparql/set_dav_props.vsp
+++ b/binsrc/isparql/set_dav_props.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: set_dav_props.vsp,v 1.5.2.1 2009/06/10 19:49:06 source Exp $
+--  $Id: set_dav_props.vsp,v 1.5.2.2 2012/03/08 12:55:00 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/isparql/sql/drop.sql b/binsrc/isparql/sql/drop.sql
index 99f48d8..f21a1d9 100644
--- a/binsrc/isparql/sql/drop.sql
+++ b/binsrc/isparql/sql/drop.sql
@@ -1,9 +1,9 @@
 --
---  $Id: drop.sql,v 1.5 2009/01/06 22:15:02 source Exp $
+--  $Id: drop.sql,v 1.5.2.1 2012/03/08 13:18:57 source Exp $
 --
 --  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
 --
---  Copyright (C) 2009 OpenLink Software
+--  Copyright (C) 2009-2012 OpenLink Software
 --
 --  See LICENSE file for details.
 --
diff --git a/binsrc/isparql/sql/setup.sql b/binsrc/isparql/sql/setup.sql
index ff90ca7..40574f3 100644
--- a/binsrc/isparql/sql/setup.sql
+++ b/binsrc/isparql/sql/setup.sql
@@ -1,9 +1,9 @@
 --
---  $Id: setup.sql,v 1.10 2009/01/06 22:15:02 source Exp $
+--  $Id: setup.sql,v 1.10.2.1 2012/03/08 13:18:57 source Exp $
 --
 --  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
 --
---  Copyright (C) 2009 OpenLink Software
+--  Copyright (C) 2009-2012 OpenLink Software
 --
 --  See LICENSE file for details.
 --
diff --git a/binsrc/isparql/statusui.js b/binsrc/isparql/statusui.js
index d703b8c..ab31526 100644
--- a/binsrc/isparql/statusui.js
+++ b/binsrc/isparql/statusui.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: statusui.js,v 1.1.2.5 2011/02/03 10:28:23 source Exp $
+ *  $Id: statusui.js,v 1.1.2.6 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
diff --git a/binsrc/isparql/styles/dialog.css b/binsrc/isparql/styles/dialog.css
index 49cc246..80e6cdb 100644
--- a/binsrc/isparql/styles/dialog.css
+++ b/binsrc/isparql/styles/dialog.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: dialog.css,v 1.1.2.5 2011/01/25 14:08:45 source Exp $
+ *  $Id: dialog.css,v 1.1.2.6 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
diff --git a/binsrc/isparql/styles/execute.css b/binsrc/isparql/styles/execute.css
index ff6e9a3..a960483 100644
--- a/binsrc/isparql/styles/execute.css
+++ b/binsrc/isparql/styles/execute.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: execute.css,v 1.4.2.9 2011/03/29 21:09:28 source Exp $
+ *  $Id: execute.css,v 1.4.2.14 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -149,8 +149,22 @@ body {
   margin:0px;
 }
 
-.result_plnk_ctr { width: 20em; float: left; }
-.anchor_pref_ctr { width: 20%; float: right;}
+.result_c { background-color: #fff}
+
+.ep_query,.ep_response,.ep_request, .ep_result {
+  margin: 0;
+  background-color: white;
+  padding-top: 5px;
+  padding-bottom: 5px;
+}
+
+.ep_request pre { margin: 0; padding: 0 } 
+.ep_query pre { margin: 0; padding: 0 } 
+.ep_response pre { margin: 0; padding: 0 } 
+
+.result_opts_c { background-color: white}
+.result_plnk_c { padding-top: 3px;width: 20em; float: left; }
+.anchor_pref_c { width: 30em; float: right;}
 
 p.copyright {
 font-size: 8pt;
@@ -158,12 +172,11 @@ text-align: right;
 margin-right: 10px}
 
 #mini_rdf_ctr { width: 100% }
+.rdf_mini_c { margin: 5px;}
+
 /*div.rdf_mini { width: 100%; height: 70%; }*/
-div.rdf_tab { width: 100%; height: 100%; }
 
-table.grid {
-  clear: both;
-}
+div.rdf_tab { width: 100%; height: 100%; }
 
 div.rdf_data div.pager {
   background-color: #ddd;
@@ -172,4 +185,45 @@ div.rdf_data div.pager {
 
 div.pager div {
   margin: 3px;
-}
\ No newline at end of file
+}
+
+#foot {
+  font-size: 7pt;
+  text-align: right;
+  float: left;
+  clear: both;
+/*  background: -webkit-gradient(linear,left top,left bottom,from(#ccdde0),to(#577));
+  background: -moz-linear-gradient(top,#ccdde0,#577);
+*/
+  background-color: #fdfdfd;
+  height: 30px;
+  padding-top: 10px;
+  padding-bottom:30px;
+  width: 100%;
+  border-top: 1px solid #aaa
+}
+
+div.foot_l { text-align: left; float: left; clear: left; width: 45%; margin-left: 10px;}
+div.foot_r { text-align: right; float: right; width: 45%; margin-right: 10px;}
+
+#data_links {
+  margin: 10px;
+}
+
+.notify_bar_ctr {
+  background-color: #577;
+  color: #eef;
+  z-index: 5000;
+}
+
+.notify_bar_inner {
+  padding-top: 8px;
+  padding-bottom: 8px;
+}
+
+.notify_content {
+  margin-left: 8px;
+  margin-right: 8px;
+}
+
+.clearfix { clear:both }
diff --git a/binsrc/isparql/styles/menu.css b/binsrc/isparql/styles/menu.css
index cb40cc6..de24fb8 100644
--- a/binsrc/isparql/styles/menu.css
+++ b/binsrc/isparql/styles/menu.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: menu.css,v 1.2.2.3 2010/06/28 09:33:06 source Exp $
+ *  $Id: menu.css,v 1.2.2.5 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -18,7 +18,6 @@
   height: 20px;
   border-bottom: 1px solid #aaa;
   z-index: 900;
-  position: absolute;
   left: 0px;
   top: 0px;
   width: 100%}
diff --git a/binsrc/isparql/styles/mobile.css b/binsrc/isparql/styles/mobile.css
index e7d56fa..5fb6f11 100644
--- a/binsrc/isparql/styles/mobile.css
+++ b/binsrc/isparql/styles/mobile.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: mobile.css,v 1.1.2.4 2011/02/18 15:40:13 source Exp $
+ *  $Id: mobile.css,v 1.1.2.5 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
diff --git a/binsrc/isparql/styles/qbe.css b/binsrc/isparql/styles/qbe.css
index c0dfa91..a442b5d 100644
--- a/binsrc/isparql/styles/qbe.css
+++ b/binsrc/isparql/styles/qbe.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: qbe.css,v 1.5.2.3 2009/09/13 21:52:19 source Exp $
+ *  $Id: qbe.css,v 1.5.2.4 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
diff --git a/binsrc/isparql/styles/style.css b/binsrc/isparql/styles/style.css
index d1fd373..f0a6248 100644
--- a/binsrc/isparql/styles/style.css
+++ b/binsrc/isparql/styles/style.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: style.css,v 1.7.2.13 2011/03/23 11:56:22 source Exp $
+ *  $Id: style.css,v 1.7.2.18 2012/03/08 13:18:57 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2009 OpenLink Software
+ *  Copyright (C) 2009-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  *
@@ -71,16 +71,19 @@ td.cachingOpts label.unit { float: right; clear: none; width: 40px; margin-left:
 td.cachingOpts input { float: left;}
 
 div.controls {
+  float: left;
+  clear: both;
+  width: 99%;
   background-color: #eee;
   background: -moz-linear-gradient (top, #eee, #eff);
   background: -webkit-gradient (linear,left top,left bottom,from(#eee), to(#eff));
-  border: 2px solid #dff;
-  -moz-border-radius: 10px 10px 0px 0px;
-  -webkit-border-radius: 10px 10px 0px 0px;
-  margin: 0px 10px 10px 10px;
-  
+  border: 1px solid #ddd;
+  margin: 5px 5px 0px 5px;  
 }
 
+/*  -moz-border-radius: 10px 10px 0px 0px; */
+/*  -webkit-border-radius: 10px 10px 0px 0px; */
+
 div.controls h3:hover { cursor: pointer;}
 div.controls h3 {margin: 0;padding:0}
 div.controls fieldset { }
@@ -90,13 +93,29 @@ div.controls fieldset { }
 
 #pathTravSchemesPreds { width: 100%; }
 
-fieldset.queryopts {
-  display: block;
-  margin: 0 8px 3px 10px
+#queryopts_ctl {
+  float: left;
+  clear: both;
+  margin: 0 5px 5px 5px;
+}
+
+div.fm_rw span.maxrows_expln { float: left; font-size: smaller;}
+
+div.fm_rw {
+  float: left;
+  clear: both;
+}
+
+div.fm_rw label {
+  width: 15em;
+  float: left;
+  clear: left;
+  margin-top: 3px;
 }
 
-#qry_type_ctls { display: inline; }
-span.maxrows_expln { font-size: smaller;}
+#queryopts_ctl div.fm_rw input {
+  float: left;
+}
 
 fieldset.endpoint {
   margin-top: 10px;
@@ -139,8 +158,8 @@ h3#endpoint_opts_toggler,h3#mdtoggler {
   cursor: hand;
   cursor: pointer;
   border:none;
-  -moz-border-radius: 10px 10px 0px 0px;
-  -webkit-border-radius: 10px 10px 0px 0px;
+/*  -moz-border-radius: 10px 10px 0px 0px;
+  -webkit-border-radius: 10px 10px 0px 0px; */
 }
 
 span.tgl_indicator {
@@ -193,18 +212,22 @@ fieldset.deref_opts h4 {
   text-align: right;
   float: left;
   clear: both;
-  background: -webkit-gradient(linear,left top,left bottom,from(#ccdde0),to(#577));
-  background: -moz-linear-gradient(top,#ccdde0,#577);
-  background-color: #FFFFFF;
+/*  background: -webkit-gradient(linear,left top,left bottom,from(#ccdde0),to(#fff));
+  background: -moz-linear-gradient(top,#ccdde0,#fff); */
+  background-color: #fdfdfd;
   height: 30px;
   padding-top: 10px;
-  padding-bottom:10px;
+  padding-bottom:30px;
   width: 100%;
   border-top: 1px solid #aaa
 }
 
-div.foot_l { text-align: left; float: left; clear: left; width: 45%; margin-left: 5px;}
-div.foot_r { text-align: right; float: right; width: 45%; margin-right: 5px;}
+div.foot_l { text-align: left; float: left; clear: left; width: 45%; margin-left: 10px;}
+div.foot_r { text-align: right; float: right; width: 45%; margin-right: 10px;}
+
+#data_links {
+  margin: 10px;
+}
 
 span.dyn_page { vertical-align: top;}
 
@@ -257,7 +280,6 @@ ul#nav_bar {
 /* tabs */
 
 #tabs {
-	margin-top: 21px;
 	padding-top:10px;
 	list-style-type: none;
 	padding-bottom: 1px;
@@ -318,7 +340,7 @@ div.pager div {
 }
 
 div.pager a {
-  color: #ddd;
+  color: #333;
   font-weight: bold;
   text-decoration: none;
   padding-left: 10px;
@@ -386,6 +408,7 @@ label.load { font-size: 8pt; font-weight: normal}
 #query {
   height: 50ex;
   width: 100%;
+  font-family: monospace;
 }
 
 #goptions label.align {
@@ -542,3 +565,19 @@ ul#tabgrph {
 }
 
 #qbe_query_div {margin-top: 5px;}
+
+.notify_bar_ctr {
+  background-color: #577;
+  color: #eef;
+  z-index: 10000;
+}
+
+.notify_bar_inner {
+  padding-top: 8px;
+  padding-bottom: 8px;
+}
+
+.notify_content {
+  margin-left: 8px;
+  margin-right: 8px;
+}
diff --git a/binsrc/isparql/vad_version b/binsrc/isparql/vad_version
index c2a7180..81bdf53 100644
--- a/binsrc/isparql/vad_version
+++ b/binsrc/isparql/vad_version
@@ -1 +1 @@
-1.26.72
+1.27.82
diff --git a/binsrc/isparql/xslt/dynamic-page.xsl b/binsrc/isparql/xslt/dynamic-page.xsl
index a3b2309..0213fb8 100644
--- a/binsrc/isparql/xslt/dynamic-page.xsl
+++ b/binsrc/isparql/xslt/dynamic-page.xsl
@@ -1,11 +1,11 @@
 <?xml version="1.0" ?>
 <!--
 
-  $Id: dynamic-page.xsl,v 1.14.2.3 2009/10/06 19:25:31 source Exp $
+  $Id: dynamic-page.xsl,v 1.14.2.4 2012/03/08 13:18:57 source Exp $
 
   This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
 
-  Copyright (C) 2009 OpenLink Software
+  Copyright (C) 2009-2012 OpenLink Software
 
   See LICENSE file for details.
 
diff --git a/binsrc/jena/Makefile.am b/binsrc/jena/Makefile.am
index 82190c8..f298590 100644
--- a/binsrc/jena/Makefile.am
+++ b/binsrc/jena/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -83,7 +83,7 @@ doc:
 #
 #  Run testsuite if WITH_JDK was found
 #
-if WITH_JDK3
+if WITH_JDK4
 run-tests: virt_jena.jar
 	$(JAVAC) $(JDK_FLAGS) \
 		-classpath "$(JENA_CLASSPATH):./virt_jena.jar" \
diff --git a/binsrc/jena/Makefile.in b/binsrc/jena/Makefile.in
index 92135ec..1bbf849 100644
--- a/binsrc/jena/Makefile.in
+++ b/binsrc/jena/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -532,13 +534,13 @@ doc:
 #
 #  Run testsuite if WITH_JDK was found
 #
- at WITH_JDK3_TRUE@run-tests: virt_jena.jar
- at WITH_JDK3_TRUE@	$(JAVAC) $(JDK_FLAGS) \
- at WITH_JDK3_TRUE@		-classpath "$(JENA_CLASSPATH):./virt_jena.jar" \
- at WITH_JDK3_TRUE@		$(TESTSUITE_SRC)
- at WITH_JDK3_TRUE@	cd testsuite && env JAVA="$(JAVA)" PORT="$(PORT)" $(SHELL) start.sh
- at WITH_JDK3_FALSE@run-tests:
- at WITH_JDK3_FALSE@	@echo "***WARNING: Disabled Jena test suite"
+ at WITH_JDK4_TRUE@run-tests: virt_jena.jar
+ at WITH_JDK4_TRUE@	$(JAVAC) $(JDK_FLAGS) \
+ at WITH_JDK4_TRUE@		-classpath "$(JENA_CLASSPATH):./virt_jena.jar" \
+ at WITH_JDK4_TRUE@		$(TESTSUITE_SRC)
+ at WITH_JDK4_TRUE@	cd testsuite && env JAVA="$(JAVA)" PORT="$(PORT)" $(SHELL) start.sh
+ at WITH_JDK4_FALSE@run-tests:
+ at WITH_JDK4_FALSE@	@echo "***WARNING: Disabled Jena test suite"
 
 .PHONY: version
 version:
diff --git a/binsrc/jena/testsuite/start.sh b/binsrc/jena/testsuite/start.sh
index 291bb14..60ff442 100755
--- a/binsrc/jena/testsuite/start.sh
+++ b/binsrc/jena/testsuite/start.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: start.sh,v 1.3.2.3 2010/04/01 10:54:36 source Exp $
+#  $Id: start.sh,v 1.3.2.4 2012/03/08 12:55:00 source Exp $
 #
 #  Jena tests
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/Version.java b/binsrc/jena/virtuoso_driver/Version.java
index ee521a5..3c8d36c 100644
--- a/binsrc/jena/virtuoso_driver/Version.java
+++ b/binsrc/jena/virtuoso_driver/Version.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Version.java,v 1.1.4.5 2011/03/23 11:58:08 source Exp $
+ *  $Id: Version.java,v 1.1.4.8 2012/03/15 12:56:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -29,7 +29,7 @@ public class Version {
    protected static final String DRV_VER = "2.6.2";
 
    // The major and minor version number
-   protected static final String build_id = "1.4";
+   protected static final String build_id = "1.6";
 
    public static void main(String args[])
    {
diff --git a/binsrc/jena/virtuoso_driver/VirtBulkUpdateHandler.java b/binsrc/jena/virtuoso_driver/VirtBulkUpdateHandler.java
index 4a2bfae..659813b 100644
--- a/binsrc/jena/virtuoso_driver/VirtBulkUpdateHandler.java
+++ b/binsrc/jena/virtuoso_driver/VirtBulkUpdateHandler.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtBulkUpdateHandler.java,v 1.6.2.3 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtBulkUpdateHandler.java,v 1.6.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtDataSource.java b/binsrc/jena/virtuoso_driver/VirtDataSource.java
index ab9edef..18fff28 100644
--- a/binsrc/jena/virtuoso_driver/VirtDataSource.java
+++ b/binsrc/jena/virtuoso_driver/VirtDataSource.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtDataSource.java,v 1.7.2.6 2010/06/28 10:30:28 source Exp $
+ *  $Id: VirtDataSource.java,v 1.7.2.8 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -95,7 +95,7 @@ public class VirtDataSource extends VirtGraph implements DataSource {
 
       checkOpen();
       try {
-        java.sql.PreparedStatement ps = getConnection().prepareStatement(query);
+        java.sql.PreparedStatement ps = prepareStatement(query);
         ps.setString(1, name);
         rs = ps.executeQuery();
         if (rs.next())
@@ -111,7 +111,7 @@ public class VirtDataSource extends VirtGraph implements DataSource {
 					+ "' already exists.");
         Graph g = model.getGraph();
         int count = 0;
-        java.sql.PreparedStatement ps = getConnection().prepareStatement(sinsert);
+        java.sql.PreparedStatement ps = prepareStatement(sinsert);
 
         for (Iterator i = g.find(Node.ANY, Node.ANY, Node.ANY); i.hasNext();) 
         {
@@ -146,7 +146,7 @@ public class VirtDataSource extends VirtGraph implements DataSource {
 
       checkOpen();
       try {
-        java.sql.Statement stmt = getConnection().createStatement();
+        java.sql.Statement stmt = createStatement();
         stmt.executeQuery(exec_text);
       } catch (Exception e) {
 	throw new JenaException(e);
@@ -206,7 +206,7 @@ public class VirtDataSource extends VirtGraph implements DataSource {
 
       checkOpen();
       try {
-        java.sql.PreparedStatement ps = getConnection().prepareStatement(query);
+        java.sql.PreparedStatement ps = prepareStatement(query);
         ps.setString(1, name);
         rs = ps.executeQuery();
         if (rs.next())
@@ -230,7 +230,7 @@ public class VirtDataSource extends VirtGraph implements DataSource {
       try {
         List<String> names=new LinkedList(); 
 
-        java.sql.Statement stmt = getConnection().createStatement();
+        java.sql.Statement stmt = createStatement();
         rs = stmt.executeQuery(exec_text);
         while(rs.next())
           names.add(rs.getString(1));
@@ -296,7 +296,7 @@ public class VirtDataSource extends VirtGraph implements DataSource {
         try {
 	  List<Node> names=new LinkedList();
 
-  	  java.sql.Statement stmt = vd.getConnection().createStatement();
+  	  java.sql.Statement stmt = vd.createStatement();
 	  rs = stmt.executeQuery(exec_text);
 	  while(rs.next())
 	    names.add(Node.createURI(rs.getString(1)));
diff --git a/binsrc/jena/virtuoso_driver/VirtGraph.java b/binsrc/jena/virtuoso_driver/VirtGraph.java
index 9bffe2b..783d00a 100644
--- a/binsrc/jena/virtuoso_driver/VirtGraph.java
+++ b/binsrc/jena/virtuoso_driver/VirtGraph.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtGraph.java,v 1.15.2.15 2011/03/08 13:44:11 source Exp $
+ *  $Id: VirtGraph.java,v 1.15.2.18 2012/03/15 12:56:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -57,8 +57,9 @@ public class VirtGraph extends GraphBase
     protected Connection connection = null;
     protected String ruleSet = null;
     protected boolean useSameAs = false;
-    static final String sinsert = "sparql define output:format '_JAVA_' insert into graph iri(??) { `iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)` }";
-    static final String sdelete = "sparql define output:format '_JAVA_' delete from graph iri(??) {`iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)`}";
+    protected int queryTimeout = 0;
+    static final String sinsert = "sparql insert into graph iri(??) { `iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)` }";
+    static final String sdelete = "sparql delete from graph iri(??) {`iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)`}";
     static final int BATCH_SIZE = 5000;
     static final String utf8 = "charset=utf-8";
     static final String charset = "UTF-8";
@@ -217,6 +218,18 @@ public class VirtGraph extends GraphBase
     }
 
 
+    public int getQueryTimeout()
+    {
+    	return this.queryTimeout;
+    }
+
+
+    public void setQueryTimeout(int seconds)
+    {
+    	this.queryTimeout = seconds;
+    }
+
+
     public int getCount()
     {
         return size();
@@ -272,7 +285,7 @@ public class VirtGraph extends GraphBase
       checkOpen();
 
       try {
-	java.sql.Statement st = connection.createStatement();
+	java.sql.Statement st = createStatement();
 	st.execute("rdfs_rule_set('"+ruleSetName+"', '"+uriGraphRuleSet+"')");
 	st.close();
       } catch (Exception e) {
@@ -286,7 +299,7 @@ public class VirtGraph extends GraphBase
       checkOpen();
 
       try {
-	java.sql.Statement st = connection.createStatement();
+	java.sql.Statement st = createStatement();
 	st.execute("rdfs_rule_set('"+ruleSetName+"', '"+uriGraphRuleSet+"', 1)");
 	st.close();
       } catch (Exception e) {
@@ -310,6 +323,29 @@ public class VirtGraph extends GraphBase
       return buf.toString();
     }
 
+
+    protected java.sql.Statement createStatement() throws java.sql.SQLException
+    {
+      checkOpen();
+      java.sql.Statement st = connection.createStatement();
+      if (queryTimeout > 0)
+        st.setQueryTimeout(queryTimeout);
+      st.setFetchSize(prefetchSize);
+      return st;
+    }
+
+    protected java.sql.PreparedStatement prepareStatement(String sql) throws java.sql.SQLException
+    {
+      checkOpen();
+      java.sql.PreparedStatement st = connection.prepareStatement(sql);
+      if (queryTimeout > 0)
+        st.setQueryTimeout(queryTimeout);
+      st.setFetchSize(prefetchSize);
+      return st;
+    }
+
+
+
 // GraphBase overrides
     public static String Node2Str(Node n)
     {
@@ -407,7 +443,7 @@ public class VirtGraph extends GraphBase
       java.sql.PreparedStatement ps;
 
       try {
-        ps = connection.prepareStatement(sinsert);
+        ps = prepareStatement(sinsert);
         ps.setString(1, this.graphName);
         bindSubject(ps, 2, t.getSubject());
         bindPredicate(ps, 3, t.getPredicate());
@@ -425,7 +461,7 @@ public class VirtGraph extends GraphBase
       java.sql.PreparedStatement ps;
 
       try {
-        ps = connection.prepareStatement(sdelete);
+        ps = prepareStatement(sdelete);
         ps.setString(1, this.graphName);
         bindSubject(ps, 2, t.getSubject());
         bindPredicate(ps, 3, t.getPredicate());
@@ -463,7 +499,7 @@ public class VirtGraph extends GraphBase
       checkOpen();
 
       try {
-	java.sql.PreparedStatement ps = connection.prepareStatement(sb.toString());
+	java.sql.PreparedStatement ps = prepareStatement(sb.toString());
 
 	if (!readFromAllGraphs)
 	  ps.setString(1, graphName);
@@ -518,7 +554,7 @@ public class VirtGraph extends GraphBase
         sb.append(" select * where { graph <"+ graphName +"> { " + S +" "+ P +" "+ O +" }} limit 1");
 
       try {
-	java.sql.Statement stmt = connection.createStatement();
+	java.sql.Statement stmt = createStatement();
 	rs = stmt.executeQuery(sb.toString());
 	boolean ret = rs.next();
 	rs.close();
@@ -565,8 +601,7 @@ public class VirtGraph extends GraphBase
       try 
       {
         java.sql.PreparedStatement stmt;
-        stmt = connection.prepareStatement(sb.toString());
-	stmt.setFetchSize(prefetchSize);
+        stmt = prepareStatement(sb.toString());
 	return new VirtResSetIter(this, stmt.executeQuery(), tm);
       } catch (Exception e) {
         throw new JenaException(e);
@@ -603,7 +638,7 @@ public class VirtGraph extends GraphBase
 
       checkOpen();
       try {
-        java.sql.Statement stmt = connection.createStatement();
+        java.sql.Statement stmt = createStatement();
         stmt.execute(exec_text);
       }	catch(Exception e) {
         throw new JenaException(e);
@@ -615,7 +650,7 @@ public class VirtGraph extends GraphBase
     void add(Iterator<Triple> it, List<Triple> list) 
     {
       try {
-        PreparedStatement ps = connection.prepareStatement(sinsert);
+        PreparedStatement ps = prepareStatement(sinsert);
         int count = 0;
 	    
         while (it.hasNext())
@@ -692,7 +727,7 @@ public class VirtGraph extends GraphBase
         } else if (nS != null && nP != null && nO != null) {
           java.sql.PreparedStatement ps;
 
-          ps = connection.prepareStatement(sdelete);
+          ps = prepareStatement(sdelete);
           ps.setString(1, this.graphName);
           bindSubject(ps, 2, nS);
           bindPredicate(ps, 3, nP);
@@ -715,7 +750,7 @@ public class VirtGraph extends GraphBase
              "> { "+S+" "+P+" "+O+" } from <"+this.graphName+
              "> where { "+S+" "+P+" "+O+" }";
 
-          java.sql.Statement stmt = connection.createStatement();
+          java.sql.Statement stmt = createStatement();
           stmt.execute(query);
         }
       } catch(Exception e) {
@@ -731,7 +766,7 @@ public class VirtGraph extends GraphBase
       checkOpen();
 
       try {
-        java.sql.PreparedStatement ps = connection.prepareStatement(query);
+        java.sql.PreparedStatement ps = prepareStatement(query);
         ps.setString(1, name);
         ps.execute();
       }	catch(Exception e) {
diff --git a/binsrc/jena/virtuoso_driver/VirtInfGraph.java b/binsrc/jena/virtuoso_driver/VirtInfGraph.java
index 8559b8c..189bf61 100644
--- a/binsrc/jena/virtuoso_driver/VirtInfGraph.java
+++ b/binsrc/jena/virtuoso_driver/VirtInfGraph.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtInfGraph.java,v 1.1.4.3 2010/04/06 14:35:46 source Exp $
+ *  $Id: VirtInfGraph.java,v 1.1.4.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtModel.java b/binsrc/jena/virtuoso_driver/VirtModel.java
index c71b851..87546e0 100644
--- a/binsrc/jena/virtuoso_driver/VirtModel.java
+++ b/binsrc/jena/virtuoso_driver/VirtModel.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtModel.java,v 1.1.2.5 2010/06/28 10:30:28 source Exp $
+ *  $Id: VirtModel.java,v 1.1.2.6 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtPrefixMapping.java b/binsrc/jena/virtuoso_driver/VirtPrefixMapping.java
index 6765ee5..a7ce721 100644
--- a/binsrc/jena/virtuoso_driver/VirtPrefixMapping.java
+++ b/binsrc/jena/virtuoso_driver/VirtPrefixMapping.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtPrefixMapping.java,v 1.3.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtPrefixMapping.java,v 1.3.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -52,10 +52,9 @@ public class VirtPrefixMapping extends PrefixMappingImpl {
 		
 	  // Populate the prefix map using data from the 
 	  // persistent graph properties
-	  Connection conn = m_graph.getConnection();
 	  String query = "DB.DBA.XML_SELECT_ALL_NS_DECLS (3)";
 	  try {
-	    Statement stmt = conn.createStatement();
+	    Statement stmt = m_graph.createStatement();
 	    ResultSet rs = stmt.executeQuery(query);
 
   	    while (rs.next()) {
@@ -71,12 +70,11 @@ public class VirtPrefixMapping extends PrefixMappingImpl {
 
         public PrefixMapping removeNsPrefix( String prefix )
         {
-	  Connection conn = m_graph.getConnection();
 	  String query = "DB.DBA.XML_REMOVE_NS_BY_PREFIX(?, 1)";
           super.removeNsPrefix( prefix );
 
 	  try {
-	    PreparedStatement ps = conn.prepareStatement(query);
+	    PreparedStatement ps = m_graph.prepareStatement(query);
 	    ps.setString(1, prefix);
 	    ps.execute();
 	  } catch (Exception e) {
@@ -95,14 +93,13 @@ public class VirtPrefixMapping extends PrefixMappingImpl {
 	{
 	  super.setNsPrefix(prefix, uri);
 
-	  Connection conn = m_graph.getConnection();
 	  String query = "DB.DBA.XML_SET_NS_DECL(?, ?, 1)";
 		
 	  // All went well, so persist the prefix by adding it to the graph properties
 	  // (the addPrefix call will overwrite any existing mapping with the same prefix
 	  // so it matches the behaviour of the prefixMappingImpl).
 	  try {
-	    PreparedStatement ps = conn.prepareStatement(query);
+	    PreparedStatement ps = m_graph.prepareStatement(query);
 	    ps.setString(1, prefix);
 	    ps.setString(2, uri);
 	    ps.execute();
diff --git a/binsrc/jena/virtuoso_driver/VirtResSetIter.java b/binsrc/jena/virtuoso_driver/VirtResSetIter.java
index 640219e..f72d8e9 100644
--- a/binsrc/jena/virtuoso_driver/VirtResSetIter.java
+++ b/binsrc/jena/virtuoso_driver/VirtResSetIter.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtResSetIter.java,v 1.8.2.2 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtResSetIter.java,v 1.8.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtTransactionHandler.java b/binsrc/jena/virtuoso_driver/VirtTransactionHandler.java
index c54390d..13d48f9 100644
--- a/binsrc/jena/virtuoso_driver/VirtTransactionHandler.java
+++ b/binsrc/jena/virtuoso_driver/VirtTransactionHandler.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtTransactionHandler.java,v 1.3.2.2 2011/03/23 11:58:08 source Exp $
+ *  $Id: VirtTransactionHandler.java,v 1.3.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoQueryEngine.java b/binsrc/jena/virtuoso_driver/VirtuosoQueryEngine.java
index d3a6a72..20c8fa7 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoQueryEngine.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoQueryEngine.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoQueryEngine.java,v 1.1.4.6 2010/07/05 12:40:15 source Exp $
+ *  $Id: VirtuosoQueryEngine.java,v 1.1.4.9 2012/03/15 12:56:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -55,7 +55,6 @@ import com.hp.hpl.jena.sparql.util.Utils;
 public class VirtuosoQueryEngine extends QueryEngineMain
 {
     private Query eQuery = null;
-    int prefetchSize = 200;
 
     
     public VirtuosoQueryEngine(Query query, DatasetGraph dataset, Binding initial, Context context)
@@ -80,13 +79,9 @@ public class VirtuosoQueryEngine extends QueryEngineMain
         VirtGraph vg = (VirtGraph)dsg.getDefaultGraph();
         String query = fixQuery(eQuery.toString(), initial, vg);
 	
-	prefetchSize = vg.getFetchSize ();
-
 	try
 	{
-	    java.sql.Connection connection = vg.getConnection();
-	    java.sql.Statement  stmt = connection.createStatement();
-	    stmt.setFetchSize(prefetchSize);
+	    java.sql.Statement  stmt = vg.createStatement();
 	    java.sql.ResultSet rs = stmt.executeQuery(query);
 	    return (QueryIterator)new VQueryIterator(vg, rs);
 	}
@@ -149,19 +144,8 @@ public class VirtuosoQueryEngine extends QueryEngineMain
     
     private String fixQuery(String query, Binding args, VirtGraph vg)
     {
-	StringTokenizer tok = new StringTokenizer(query);
-	String s = "";
 	StringBuffer sb = new StringBuffer("sparql\n ");
 
-	while (tok.hasMoreTokens()) {
-	  s = tok.nextToken().toLowerCase();
-	  if (s.equals("describe") || s.equals("construct"))
-            break;
-	}
-
-	if (s.equals("describe") || s.equals("construct"))
-	  sb.append("define output:format '_JAVA_'\n ");
-
 	if (vg.getRuleSet()!=null)
           sb.append(" define input:inference '"+vg.getRuleSet()+"'\n ");
 
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoQueryExecution.java b/binsrc/jena/virtuoso_driver/VirtuosoQueryExecution.java
index 9dc6c65..4850768 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoQueryExecution.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoQueryExecution.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoQueryExecution.java,v 1.11.2.8 2011/03/23 11:58:08 source Exp $
+ *  $Id: VirtuosoQueryExecution.java,v 1.11.2.11 2012/03/15 12:56:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -67,7 +67,6 @@ public class VirtuosoQueryExecution  implements QueryExecution
     private String virt_query;
     private QuerySolution m_arg = null;
 
-    private int prefetchSize = 200;
     private java.sql.Statement stmt = null;
 
 
@@ -75,7 +74,6 @@ public class VirtuosoQueryExecution  implements QueryExecution
     {
 	graph = _graph;
 	virt_graph = graph.getGraphName ();
-	prefetchSize = graph.getFetchSize ();
 	virt_query = query;
     }
 
@@ -85,11 +83,9 @@ public class VirtuosoQueryExecution  implements QueryExecution
       ResultSet ret = null;
 
       try {
-        Connection connection = graph.getConnection();
-
-        stmt = connection.createStatement();
-        stmt.setFetchSize(prefetchSize);
+        stmt = graph.createStatement();
         java.sql.ResultSet rs = stmt.executeQuery(getQuery());
+
         return new VResultSet(graph, rs);
       }	catch(Exception e) {
         throw new JenaException("Can not create ResultSet.:"+e);
@@ -130,10 +126,7 @@ public class VirtuosoQueryExecution  implements QueryExecution
     public Model execConstruct(Model model)
     {
       try {
-        Connection connection = graph.getConnection();
-
-        stmt = connection.createStatement();
-        stmt.setFetchSize(prefetchSize);
+        stmt = graph.createStatement();
         java.sql.ResultSet rs = stmt.executeQuery(getQuery());
         ResultSetMetaData rsmd = rs.getMetaData();
 
@@ -165,10 +158,7 @@ public class VirtuosoQueryExecution  implements QueryExecution
     public Model execDescribe(Model model)
     {
       try {
-        Connection connection = graph.getConnection();
-
-        stmt = connection.createStatement();
-        stmt.setFetchSize(prefetchSize);
+        stmt = graph.createStatement();
         java.sql.ResultSet rs = stmt.executeQuery(getQuery());
         ResultSetMetaData rsmd = rs.getMetaData();
         while(rs.next())
@@ -196,9 +186,7 @@ public class VirtuosoQueryExecution  implements QueryExecution
       boolean ret = false;
 
       try {
-        Connection connection = graph.getConnection();
-
-        stmt = connection.createStatement();
+        stmt = graph.createStatement();
         java.sql.ResultSet rs = stmt.executeQuery(getQuery());
         ResultSetMetaData rsmd = rs.getMetaData();
 
@@ -288,19 +276,8 @@ public class VirtuosoQueryExecution  implements QueryExecution
     
     private String getQuery()
     {
-//--	StringBuffer sb = new StringBuffer("sparql\n define output:format '_JAVA_'\n");
 	StringBuffer sb = new StringBuffer("sparql\n ");
-	StringTokenizer tok = new StringTokenizer(virt_query);
-	String s = "";
 
-	while(tok.hasMoreTokens()) {
-	    s = tok.nextToken().toLowerCase();
-	    if (s.equals("describe") || s.equals("construct") || s.equals("ask") || s.equals("select")) 
-		break;
-	}
-	if (s.equals("describe") || s.equals("construct") || s.equals("ask")) 
-	    sb.append("define output:format '_JAVA_'\n ");
-	
 	if (graph.getRuleSet()!= null)
           sb.append(" define input:inference '"+graph.getRuleSet()+"'\n");
 
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoQueryExecutionFactory.java b/binsrc/jena/virtuoso_driver/VirtuosoQueryExecutionFactory.java
index 9b8dd50..7ee8851 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoQueryExecutionFactory.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoQueryExecutionFactory.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoQueryExecutionFactory.java,v 1.4.2.3 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoQueryExecutionFactory.java,v 1.4.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample1.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample1.java
index ef1e4ce..3ec963f 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample1.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample1.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample1.java,v 1.5.2.2 2010/06/01 14:12:09 source Exp $
+ *  $Id: VirtuosoSPARQLExample1.java,v 1.5.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample10.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample10.java
index e951d80..113577b 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample10.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample10.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample10.java,v 1.1.2.4 2010/06/01 14:12:09 source Exp $
+ *  $Id: VirtuosoSPARQLExample10.java,v 1.1.2.5 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample11.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample11.java
index ebe7d21..4742bf3 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample11.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample11.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample11.java,v 1.1.2.3 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample11.java,v 1.1.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample12.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample12.java
index b0af097..782797a 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample12.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample12.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample12.java,v 1.1.4.3 2010/04/06 14:35:46 source Exp $
+ *  $Id: VirtuosoSPARQLExample12.java,v 1.1.4.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample13.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample13.java
index efa9416..f16afca 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample13.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample13.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample13.java,v 1.1.4.2 2010/04/06 14:35:46 source Exp $
+ *  $Id: VirtuosoSPARQLExample13.java,v 1.1.4.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample2.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample2.java
index 920440c..c108802 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample2.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample2.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample2.java,v 1.4.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample2.java,v 1.4.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample3.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample3.java
index abab9c0..9b1c29c 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample3.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample3.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample3.java,v 1.4.2.2 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample3.java,v 1.4.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample4.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample4.java
index 615d080..a485c64 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample4.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample4.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample4.java,v 1.4.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample4.java,v 1.4.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample5.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample5.java
index c475ea4..faa6470 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample5.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample5.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample5.java,v 1.4.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample5.java,v 1.4.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample6.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample6.java
index 7366d95..9d8eac5 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample6.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample6.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample6.java,v 1.2.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample6.java,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample7.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample7.java
index 7eaec01..cef493d 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample7.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample7.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample7.java,v 1.2.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoSPARQLExample7.java,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample8.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample8.java
index b7d114e..d4e7cef 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample8.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample8.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample8.java,v 1.3.2.2 2010/06/01 14:12:09 source Exp $
+ *  $Id: VirtuosoSPARQLExample8.java,v 1.3.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample9.java b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample9.java
index 795af9e..e0db944 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample9.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoSPARQLExample9.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSPARQLExample9.java,v 1.2.2.2 2010/06/01 14:12:09 source Exp $
+ *  $Id: VirtuosoSPARQLExample9.java,v 1.2.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoUpdateFactory.java b/binsrc/jena/virtuoso_driver/VirtuosoUpdateFactory.java
index 4c3654e..bbddbdc 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoUpdateFactory.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoUpdateFactory.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoUpdateFactory.java,v 1.1.2.1 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoUpdateFactory.java,v 1.1.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/jena/virtuoso_driver/VirtuosoUpdateRequest.java b/binsrc/jena/virtuoso_driver/VirtuosoUpdateRequest.java
index c514bc6..3877e60 100644
--- a/binsrc/jena/virtuoso_driver/VirtuosoUpdateRequest.java
+++ b/binsrc/jena/virtuoso_driver/VirtuosoUpdateRequest.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoUpdateRequest.java,v 1.4.2.3 2010/04/01 10:54:36 source Exp $
+ *  $Id: VirtuosoUpdateRequest.java,v 1.4.2.6 2012/03/15 12:56:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -61,13 +61,11 @@ public class VirtuosoUpdateRequest
     { 
 	try
 	{
-	    Connection connection = graph.getConnection();
-
-	    stmt = connection.createStatement();
+	    stmt = graph.createStatement();
 
             for ( Iterator iter = requests.iterator() ; iter.hasNext(); )
             {
-                String query = "sparql\n define output:format '_JAVA_'\n "+ (String)iter.next();
+                String query = "sparql\n "+ (String)iter.next();
                 stmt.execute(query);
             }
 
diff --git a/binsrc/maildrop/Makefile.am b/binsrc/maildrop/Makefile.am
index 1008e3f..3c6173b 100644
--- a/binsrc/maildrop/Makefile.am
+++ b/binsrc/maildrop/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/Makefile.in b/binsrc/maildrop/Makefile.in
index c1e3d2b..9c2f9f7 100644
--- a/binsrc/maildrop/Makefile.in
+++ b/binsrc/maildrop/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -143,6 +143,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -191,6 +192,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -242,6 +244,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -288,7 +291,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/maildrop/dkstub.c b/binsrc/maildrop/dkstub.c
index 2f5786c..8ef5a9c 100644
--- a/binsrc/maildrop/dkstub.c
+++ b/binsrc/maildrop/dkstub.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: dkstub.c,v 1.1.1.1.2.1 2010/01/25 23:41:20 source Exp $
+ *  $Id: dkstub.c,v 1.1.1.1.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/odbc_mail.c b/binsrc/maildrop/odbc_mail.c
index ac46f0f..11dc845 100644
--- a/binsrc/maildrop/odbc_mail.c
+++ b/binsrc/maildrop/odbc_mail.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: odbc_mail.c,v 1.2.2.1 2010/01/25 23:41:20 source Exp $
+ *  $Id: odbc_mail.c,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  ODBC Mail Dropper
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/odbc_mail.default.ini b/binsrc/maildrop/odbc_mail.default.ini
index 7b64086..93fab27 100644
--- a/binsrc/maildrop/odbc_mail.default.ini
+++ b/binsrc/maildrop/odbc_mail.default.ini
@@ -6,7 +6,7 @@
 ;  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 ;  project.
 ;
-;  Copyright (C) 1998-2010 OpenLink Software
+;  Copyright (C) 1998-2012 OpenLink Software
 ;
 ;  This project is free software; you can redistribute it and/or modify it
 ;  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/odbc_mail_vers.c b/binsrc/maildrop/odbc_mail_vers.c
index d6277c3..854103b 100644
--- a/binsrc/maildrop/odbc_mail_vers.c
+++ b/binsrc/maildrop/odbc_mail_vers.c
@@ -4,6 +4,6 @@
 
 char version[] = "\
 OpenLink ODBC Mail Interface\n\
-Version 2.01 as of Tue Mar 29 18:20:16 CEST 2011.\n\
-Compiled for Linux 2.6.34.7-56.fc13.x86_64\n\
-Copyright (C) OpenLink Software.\n";
+Version 2.01 as of Tue Mar 13 01:44:02 CET 2012.\n\
+Compiled for Linux 2.6.42.3-2.fc15.x86_64\n\
+Copyright (C) 1998-2012 OpenLink Software.\n";
diff --git a/binsrc/maildrop/virt_mail_vers.c b/binsrc/maildrop/virt_mail_vers.c
index 54ca07e..3734e0f 100644
--- a/binsrc/maildrop/virt_mail_vers.c
+++ b/binsrc/maildrop/virt_mail_vers.c
@@ -4,6 +4,6 @@
 
 char version[] = "\
 OpenLink Virtuoso Mail Interface\n\
-Version 2.01 as of Tue Mar 29 18:20:16 CEST 2011.\n\
-Compiled for Linux 2.6.34.7-56.fc13.x86_64\n\
-Copyright (C) OpenLink Software.\n";
+Version 2.01 as of Tue Mar 13 01:44:02 CET 2012.\n\
+Compiled for Linux 2.6.42.3-2.fc15.x86_64\n\
+Copyright (C) 1998-2012 OpenLink Software.\n";
diff --git a/binsrc/maildrop/win32/OpenX/Dialogs.ifs b/binsrc/maildrop/win32/OpenX/Dialogs.ifs
index 342505a..231d017 100644
--- a/binsrc/maildrop/win32/OpenX/Dialogs.ifs
+++ b/binsrc/maildrop/win32/OpenX/Dialogs.ifs
@@ -1,14 +1,14 @@
 (*
  *  Dialogs.ifs
  *
- *  $Id: Dialogs.ifs,v 1.1.1.1.2.1 2010/01/25 23:41:20 source Exp $
+ *  $Id: Dialogs.ifs,v 1.1.1.1.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  Setup functions for extended Inno Setup
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/win32/OpenX/maildrop.iss b/binsrc/maildrop/win32/OpenX/maildrop.iss
index 691b3e3..a38251f 100644
--- a/binsrc/maildrop/win32/OpenX/maildrop.iss
+++ b/binsrc/maildrop/win32/OpenX/maildrop.iss
@@ -15,7 +15,7 @@ AlwaysCreateUninstallIcon=true
 
 
 MinVersion=0,5.0.2195
-AppCopyright=© 2002 OpenLink Software
+AppCopyright=© 1998-2012 OpenLink Software
 WizardImageFile=compiler:WizModernImage14.bmp
 WizardSmallImageFile=compiler:WizModernSmallImage14.bmp
 DisableStartupPrompt=true
diff --git a/binsrc/maildrop/win32/OpenX/odbc_mail.ini b/binsrc/maildrop/win32/OpenX/odbc_mail.ini
index 60eb6b6..78bc2d9 100644
--- a/binsrc/maildrop/win32/OpenX/odbc_mail.ini
+++ b/binsrc/maildrop/win32/OpenX/odbc_mail.ini
@@ -6,7 +6,7 @@
 ;  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 ;  project.
 ;  
-;  Copyright (C) 1998-2010 OpenLink Software
+;  Copyright (C) 1998-2012 OpenLink Software
 ;  
 ;  This project is free software; you can redistribute it and/or modify it
 ;  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/win32/generate.bat b/binsrc/maildrop/win32/generate.bat
index 8457e17..6e45226 100644
--- a/binsrc/maildrop/win32/generate.bat
+++ b/binsrc/maildrop/win32/generate.bat
@@ -2,7 +2,7 @@ rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2010 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/win32/maildrop.cpp b/binsrc/maildrop/win32/maildrop.cpp
index 4318d4c..e108c2d 100644
--- a/binsrc/maildrop/win32/maildrop.cpp
+++ b/binsrc/maildrop/win32/maildrop.cpp
@@ -1,12 +1,12 @@
 /*
  *  maildrop.cpp
  *
- *  $Id: maildrop.cpp,v 1.2.2.1 2010/01/25 23:41:20 source Exp $
+ *  $Id: maildrop.cpp,v 1.2.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/win32/maildrop.idl b/binsrc/maildrop/win32/maildrop.idl
index f145ba2..ca3ed1e 100644
--- a/binsrc/maildrop/win32/maildrop.idl
+++ b/binsrc/maildrop/win32/maildrop.idl
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2010 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/win32/mpl.c b/binsrc/maildrop/win32/mpl.c
index f9abe74..c8afa45 100644
--- a/binsrc/maildrop/win32/mpl.c
+++ b/binsrc/maildrop/win32/mpl.c
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/maildrop/win32/register.bat b/binsrc/maildrop/win32/register.bat
index 66c8463..c590adf 100644
--- a/binsrc/maildrop/win32/register.bat
+++ b/binsrc/maildrop/win32/register.bat
@@ -2,7 +2,7 @@ rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2010 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/mono/Makefile.am b/binsrc/mono/Makefile.am
index 837cc4c..cb4f6af 100644
--- a/binsrc/mono/Makefile.am
+++ b/binsrc/mono/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/mono/Makefile.in b/binsrc/mono/Makefile.in
index 8ae7d52..b51aa75 100644
--- a/binsrc/mono/Makefile.in
+++ b/binsrc/mono/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/mono/mono-build.sh b/binsrc/mono/mono-build.sh
index 5797dd9..3c10c24 100755
--- a/binsrc/mono/mono-build.sh
+++ b/binsrc/mono/mono-build.sh
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/LICENSE b/binsrc/oat/LICENSE
index 057f441..5529698 100644
--- a/binsrc/oat/LICENSE
+++ b/binsrc/oat/LICENSE
@@ -1,5 +1,5 @@
 OpenLink Software's Ajax Toolkit (OAT)
-Copyright (C) 2005-2009 OpenLink Software
+Copyright (C) 2005-2012 OpenLink Software
 
 This software is licensed under the GNU General Public License (see
 COPYING).
diff --git a/binsrc/oat/Makefile.am b/binsrc/oat/Makefile.am
index 44611d5..aff0b29 100644
--- a/binsrc/oat/Makefile.am
+++ b/binsrc/oat/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Ajax Toolkit (OAT) project
 #
 #  Copyright (C) 2006 by Ondrej Zara
-#  Copyright (C) 2006 by OpenLink Software
+#  Copyright (C) 2006-2012 by OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/Makefile.in b/binsrc/oat/Makefile.in
index a8ece80..d917ef7 100644
--- a/binsrc/oat/Makefile.in
+++ b/binsrc/oat/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Ajax Toolkit (OAT) project
 #
 #  Copyright (C) 2006 by Ondrej Zara
-#  Copyright (C) 2006 by OpenLink Software
+#  Copyright (C) 2006-2012 by OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -98,6 +98,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -146,6 +147,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -197,6 +199,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -243,7 +246,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/oat/styles/grid.css b/binsrc/oat/styles/grid.css
index 1af4dc6..5a9f4ea 100644
--- a/binsrc/oat/styles/grid.css
+++ b/binsrc/oat/styles/grid.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: grid.css,v 1.4.2.2 2010/04/06 16:46:11 source Exp $
+ *  $Id: grid.css,v 1.4.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/styles/pivot.css b/binsrc/oat/styles/pivot.css
index fae3340..1f98873 100644
--- a/binsrc/oat/styles/pivot.css
+++ b/binsrc/oat/styles/pivot.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: pivot.css,v 1.3.2.1 2010/04/06 16:46:11 source Exp $
+ *  $Id: pivot.css,v 1.3.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/styles/rdftabs.css b/binsrc/oat/styles/rdftabs.css
index ba0b40d..c4163b6 100644
--- a/binsrc/oat/styles/rdftabs.css
+++ b/binsrc/oat/styles/rdftabs.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: rdftabs.css,v 1.6.2.5 2011/02/18 15:39:42 source Exp $
+ *  $Id: rdftabs.css,v 1.6.2.7 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -200,17 +200,37 @@ h3.rdf_nav_title {clear: both; font-weight: bold;margin-bottom: 0;}
 	display: inline;
 }
 
+.marker_ctr {
+  overflow: hidden;
+}
+
 .marker_ctr .abstract { 
     font-style: italic;
     margin-bottom: 10px;
+    padding-bottom: 5px;
+    border-bottom: 1px solid #666;
 }
 
 .marker_ctr .pred_title {
     font-weight: bold;
     width: 100px;
     margin-right: 1.5em;
+    overflow-y: auto;
+    overflow-x: hidden;
 }
 
 .marker_ctr .pred_value img {
     max-width: 100%
 }
+
+.marker_ctr .props_ctr {
+    overflow-y: auto;
+    overflow-x: hidden;
+    max-height: 200px;
+    padding-bottom: 5px;
+    margin-bottom: 5px;
+}
+
+.marker_cte .props_ctr table {
+    width: 100%;
+}
diff --git a/binsrc/oat/styles/timeline.css b/binsrc/oat/styles/timeline.css
index e273865..0444847 100644
--- a/binsrc/oat/styles/timeline.css
+++ b/binsrc/oat/styles/timeline.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: timeline.css,v 1.4.2.1 2010/04/06 16:46:11 source Exp $
+ *  $Id: timeline.css,v 1.4.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/styles/webdav.css b/binsrc/oat/styles/webdav.css
index 787c5c8..c72b801 100644
--- a/binsrc/oat/styles/webdav.css
+++ b/binsrc/oat/styles/webdav.css
@@ -1,9 +1,9 @@
 /*
- *  $Id: webdav.css,v 1.3.2.1 2010/04/06 16:46:11 source Exp $
+ *  $Id: webdav.css,v 1.3.2.2 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/ajax.js b/binsrc/oat/toolkit/ajax.js
index 23c7589..5bf4ad2 100644
--- a/binsrc/oat/toolkit/ajax.js
+++ b/binsrc/oat/toolkit/ajax.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: ajax.js,v 1.10.2.6 2011/02/03 10:32:02 source Exp $
+ *  $Id: ajax.js,v 1.10.2.8 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software AJAX Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -82,6 +82,14 @@ OAT.AJAX = {
 		return xhr;
 	},
 
+    HEAD:function(url,dta,callback,optObj) {
+	var options = OAT.AJAX.options(optObj);
+	var xhr = OAT.AJAX.init(url,callback,options);
+	xhr.open("HEAD",url,options.async,options.user,options.password);
+	OAT.AJAX.send(xhr,dta);
+	return xhr;
+    },
+    
     POST:function(url,dta,callback,optObj) {
 		var options = OAT.AJAX.options(optObj);
 		var xhr = OAT.AJAX.init(url,callback,options);
diff --git a/binsrc/oat/toolkit/anchor.js b/binsrc/oat/toolkit/anchor.js
index 355e6b6..1a4374c 100644
--- a/binsrc/oat/toolkit/anchor.js
+++ b/binsrc/oat/toolkit/anchor.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: anchor.js,v 1.34.2.5 2011/03/08 13:08:17 source Exp $
+ *  $Id: anchor.js,v 1.34.2.6 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/animation.js b/binsrc/oat/toolkit/animation.js
index 63321d5..670f5fb 100644
--- a/binsrc/oat/toolkit/animation.js
+++ b/binsrc/oat/toolkit/animation.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: animation.js,v 1.9.2.2 2010/04/06 16:46:11 source Exp $
+ *  $Id: animation.js,v 1.9.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -185,7 +185,7 @@ OAT.AnimationOpacity = function(element, optionsObject) {
 	o.startFunction = function(a) { /* prepare step */
 		a.opacity = 1;
 		if (OAT.Browser.isGecko) { a.opacity = parseFloat(OAT.Style.get(a.elm,"opacity")); }
-		if (OAT.Browser.isIE) {
+		if (OAT.Browser.isIE6) {
 			var filter = OAT.Style.get(a.elm,"filter");
 			var num = filter.match(/alpha\(opacity=([^\)]+)\)/);
 			if (num) { a.opacity = parseFloat(num[1])/100; }
diff --git a/binsrc/oat/toolkit/barchart.js b/binsrc/oat/toolkit/barchart.js
index b07bed8..7d18e36 100644
--- a/binsrc/oat/toolkit/barchart.js
+++ b/binsrc/oat/toolkit/barchart.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: barchart.js,v 1.8.2.3 2010/04/06 16:46:11 source Exp $
+ *  $Id: barchart.js,v 1.8.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/bezier.js b/binsrc/oat/toolkit/bezier.js
index f22b241..e99a648 100644
--- a/binsrc/oat/toolkit/bezier.js
+++ b/binsrc/oat/toolkit/bezier.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: bezier.js,v 1.6.2.3 2010/04/06 16:46:11 source Exp $
+ *  $Id: bezier.js,v 1.6.2.4 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/bindings.js b/binsrc/oat/toolkit/bindings.js
index 8604302..10752f3 100644
--- a/binsrc/oat/toolkit/bindings.js
+++ b/binsrc/oat/toolkit/bindings.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: bindings.js,v 1.6.2.4 2010/04/06 16:46:11 source Exp $
+ *  $Id: bindings.js,v 1.6.2.5 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/calendar.js b/binsrc/oat/toolkit/calendar.js
index 3d6217e..0f91e33 100644
--- a/binsrc/oat/toolkit/calendar.js
+++ b/binsrc/oat/toolkit/calendar.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: calendar.js,v 1.11.2.5 2010/04/06 16:46:11 source Exp $
+ *  $Id: calendar.js,v 1.11.2.6 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/canvas.js b/binsrc/oat/toolkit/canvas.js
index 4762029..106ac6e 100644
--- a/binsrc/oat/toolkit/canvas.js
+++ b/binsrc/oat/toolkit/canvas.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: canvas.js,v 1.6.2.2 2010/04/06 16:46:11 source Exp $
+ *  $Id: canvas.js,v 1.6.2.3 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/color.js b/binsrc/oat/toolkit/color.js
index 803eed1..a5753f3 100644
--- a/binsrc/oat/toolkit/color.js
+++ b/binsrc/oat/toolkit/color.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: color.js,v 1.8.2.4 2010/04/06 16:46:11 source Exp $
+ *  $Id: color.js,v 1.8.2.5 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/combobox.js b/binsrc/oat/toolkit/combobox.js
index dfff1f8..22ed251 100644
--- a/binsrc/oat/toolkit/combobox.js
+++ b/binsrc/oat/toolkit/combobox.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: combobox.js,v 1.8.2.4 2010/04/06 16:46:11 source Exp $
+ *  $Id: combobox.js,v 1.8.2.5 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/combobutton.js b/binsrc/oat/toolkit/combobutton.js
index 958118d..b9327ae 100644
--- a/binsrc/oat/toolkit/combobutton.js
+++ b/binsrc/oat/toolkit/combobutton.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: combobutton.js,v 1.8.2.4 2010/04/06 16:46:11 source Exp $
+ *  $Id: combobutton.js,v 1.8.2.5 2012/03/08 12:55:00 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/combolist.js b/binsrc/oat/toolkit/combolist.js
index 9144abb..abf7bfe 100644
--- a/binsrc/oat/toolkit/combolist.js
+++ b/binsrc/oat/toolkit/combolist.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: combolist.js,v 1.12.2.4 2010/04/06 16:46:11 source Exp $
+ *  $Id: combolist.js,v 1.12.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/connection.js b/binsrc/oat/toolkit/connection.js
index 2119f6f..675afaf 100644
--- a/binsrc/oat/toolkit/connection.js
+++ b/binsrc/oat/toolkit/connection.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: connection.js,v 1.8.2.3 2010/04/06 16:46:11 source Exp $
+ *  $Id: connection.js,v 1.8.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/datasource.js b/binsrc/oat/toolkit/datasource.js
index c7c60ad..35fadb3 100644
--- a/binsrc/oat/toolkit/datasource.js
+++ b/binsrc/oat/toolkit/datasource.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: datasource.js,v 1.10.2.3 2010/04/06 16:46:11 source Exp $
+ *  $Id: datasource.js,v 1.10.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/dav.js b/binsrc/oat/toolkit/dav.js
index 163a81c..fe958b0 100644
--- a/binsrc/oat/toolkit/dav.js
+++ b/binsrc/oat/toolkit/dav.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: dav.js,v 1.36.2.4 2010/04/06 16:46:11 source Exp $
+ *  $Id: dav.js,v 1.36.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/declarative.js b/binsrc/oat/toolkit/declarative.js
index 093f466..e80466e 100644
--- a/binsrc/oat/toolkit/declarative.js
+++ b/binsrc/oat/toolkit/declarative.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: declarative.js,v 1.7.2.3 2010/04/06 16:46:11 source Exp $
+ *  $Id: declarative.js,v 1.7.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/dereference.js b/binsrc/oat/toolkit/dereference.js
index c1d175c..9e8c79d 100644
--- a/binsrc/oat/toolkit/dereference.js
+++ b/binsrc/oat/toolkit/dereference.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: dereference.js,v 1.23.2.3 2010/04/06 16:46:11 source Exp $
+ *  $Id: dereference.js,v 1.23.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/dialog.js b/binsrc/oat/toolkit/dialog.js
index 6bc1c0c..13dcd09 100644
--- a/binsrc/oat/toolkit/dialog.js
+++ b/binsrc/oat/toolkit/dialog.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: dialog.js,v 1.13.2.6 2011/02/16 20:54:22 source Exp $
+ *  $Id: dialog.js,v 1.13.2.7 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/dimmer.js b/binsrc/oat/toolkit/dimmer.js
index e3ff8cb..598b40b 100644
--- a/binsrc/oat/toolkit/dimmer.js
+++ b/binsrc/oat/toolkit/dimmer.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: dimmer.js,v 1.12.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: dimmer.js,v 1.12.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/dock.js b/binsrc/oat/toolkit/dock.js
index e73ea01..5f2ace0 100644
--- a/binsrc/oat/toolkit/dock.js
+++ b/binsrc/oat/toolkit/dock.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: dock.js,v 1.11.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: dock.js,v 1.11.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/drag.js b/binsrc/oat/toolkit/drag.js
index 781a969..8c40171 100644
--- a/binsrc/oat/toolkit/drag.js
+++ b/binsrc/oat/toolkit/drag.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: drag.js,v 1.11.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: drag.js,v 1.11.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/dstransport.js b/binsrc/oat/toolkit/dstransport.js
index a7b78bd..cef1b6e 100644
--- a/binsrc/oat/toolkit/dstransport.js
+++ b/binsrc/oat/toolkit/dstransport.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: dstransport.js,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: dstransport.js,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/fisheye.js b/binsrc/oat/toolkit/fisheye.js
index 6820518..0c7566e 100644
--- a/binsrc/oat/toolkit/fisheye.js
+++ b/binsrc/oat/toolkit/fisheye.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: fisheye.js,v 1.7.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: fisheye.js,v 1.7.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/form.js b/binsrc/oat/toolkit/form.js
index fe0dfdc..5e35310 100644
--- a/binsrc/oat/toolkit/form.js
+++ b/binsrc/oat/toolkit/form.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: form.js,v 1.10.2.5 2010/04/06 16:46:12 source Exp $
+ *  $Id: form.js,v 1.10.2.6 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/formobject.js b/binsrc/oat/toolkit/formobject.js
index 7e270ac..87ee49a 100644
--- a/binsrc/oat/toolkit/formobject.js
+++ b/binsrc/oat/toolkit/formobject.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: formobject.js,v 1.14.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: formobject.js,v 1.14.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/fresnel.js b/binsrc/oat/toolkit/fresnel.js
index ef4dcdd..86e2e67 100644
--- a/binsrc/oat/toolkit/fresnel.js
+++ b/binsrc/oat/toolkit/fresnel.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: fresnel.js,v 1.9.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: fresnel.js,v 1.9.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/geometry.js b/binsrc/oat/toolkit/geometry.js
index feba3a1..244b1f9 100644
--- a/binsrc/oat/toolkit/geometry.js
+++ b/binsrc/oat/toolkit/geometry.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: geometry.js,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: geometry.js,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/ghostdrag.js b/binsrc/oat/toolkit/ghostdrag.js
index f4e3362..0929826 100644
--- a/binsrc/oat/toolkit/ghostdrag.js
+++ b/binsrc/oat/toolkit/ghostdrag.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: ghostdrag.js,v 1.13.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: ghostdrag.js,v 1.13.2.6 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -117,12 +117,18 @@ OAT.GhostDrag = function() {
 		self.processes.push(process);
 		self.callbacks.push(callback);
 		var cica = true;
-		var ref = function(event) {
-			OAT.Event.prevent(event);
+	var ref = function(e) {
+            var rclick;
+	    if (!e) var e = window.event;
+	    if (e.which) rclick = (e.which == 3);
+	    else if (e.button) rclick = (e.button == 2);
+	    if (rclick) return;
+	    
+            OAT.Event.prevent(e);
 			var index = self.sources.indexOf(elm);
 			if (index == -1) return;
-			var x = event.clientX;
-			var y = event.clientY;
+	    var x = e.clientX;
+	    var y = e.clientY;
 			self.startDrag(self.sources[index],self.processes[index],self.callbacks[index],x,y);
 		}
 		OAT.Event.attach(elm,"mousedown",ref);
diff --git a/binsrc/oat/toolkit/graph.js b/binsrc/oat/toolkit/graph.js
index 28f0eb2..46ff836 100644
--- a/binsrc/oat/toolkit/graph.js
+++ b/binsrc/oat/toolkit/graph.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: graph.js,v 1.6.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: graph.js,v 1.6.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/graphsidebar.js b/binsrc/oat/toolkit/graphsidebar.js
index df13ee3..4fa462e 100644
--- a/binsrc/oat/toolkit/graphsidebar.js
+++ b/binsrc/oat/toolkit/graphsidebar.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: graphsidebar.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: graphsidebar.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/graphsvg.js b/binsrc/oat/toolkit/graphsvg.js
index d7f598a..c26b4d7 100644
--- a/binsrc/oat/toolkit/graphsvg.js
+++ b/binsrc/oat/toolkit/graphsvg.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: graphsvg.js,v 1.12.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: graphsvg.js,v 1.12.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/grid.js b/binsrc/oat/toolkit/grid.js
index 580730e..ce17ce8 100644
--- a/binsrc/oat/toolkit/grid.js
+++ b/binsrc/oat/toolkit/grid.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: grid.js,v 1.16.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: grid.js,v 1.16.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/instant.js b/binsrc/oat/toolkit/instant.js
index 10f3737..ea5cb1f 100644
--- a/binsrc/oat/toolkit/instant.js
+++ b/binsrc/oat/toolkit/instant.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: instant.js,v 1.8.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: instant.js,v 1.8.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/jsobj.js b/binsrc/oat/toolkit/jsobj.js
index 62100c7..02da5b5 100644
--- a/binsrc/oat/toolkit/jsobj.js
+++ b/binsrc/oat/toolkit/jsobj.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: jsobj.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: jsobj.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/json.js b/binsrc/oat/toolkit/json.js
index 9671ed6..6610ed7 100644
--- a/binsrc/oat/toolkit/json.js
+++ b/binsrc/oat/toolkit/json.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: json.js,v 1.8.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: json.js,v 1.8.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -30,6 +30,11 @@ OAT.JSON = {
 	},
 
 	deserialize:function(jsonString) {
+
+	if (typeof JSON != "undefined") {
+	    return JSON.parse(jsonString); // Use native JSON if available
+	}
+	
 		var js = jsonString; /* various safeguards */
 		if (js.substr(0,9) == "while(1);") { js = js.substr(9); }
 		if (js.substr(0,2) == "/*") { js = js.substr(2,js.length-4); }
@@ -37,6 +42,11 @@ OAT.JSON = {
 	},
 
 	serialize:function(something, c) {
+	
+	if (typeof (JSON) != "undefined") {
+	    return JSON.stringify(something); // Use native JSON if available
+	}
+	
 		var cache = c || [];
 		if (cache.indexOf(something) != -1) { throw new Error("Cannot serialize cyclic structure!"); }
 
@@ -57,7 +67,7 @@ OAT.JSON = {
 				} else if (something instanceof Array) {
 				    var arr = [];
 					cache.push(something);
-				for (var i=0;i<something.length;i++) {
+		for (var i=0;i<(OAT.Browser.isIE?something.length-1:something.length);i++) {
 						arr.push(arguments.callee.call(this, something[i], cache));
 				}
 				    return "["+arr.join(",")+"]";
diff --git a/binsrc/oat/toolkit/keyboard.js b/binsrc/oat/toolkit/keyboard.js
index 3bf3af9..91cae60 100644
--- a/binsrc/oat/toolkit/keyboard.js
+++ b/binsrc/oat/toolkit/keyboard.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: keyboard.js,v 1.5.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: keyboard.js,v 1.5.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/layers.js b/binsrc/oat/toolkit/layers.js
index 5076796..3738ca7 100644
--- a/binsrc/oat/toolkit/layers.js
+++ b/binsrc/oat/toolkit/layers.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: layers.js,v 1.7.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: layers.js,v 1.7.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/linechart.js b/binsrc/oat/toolkit/linechart.js
index fd77ecb..67210b7 100644
--- a/binsrc/oat/toolkit/linechart.js
+++ b/binsrc/oat/toolkit/linechart.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: linechart.js,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: linechart.js,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/loader.js b/binsrc/oat/toolkit/loader.js
index daee277..ec10094 100644
--- a/binsrc/oat/toolkit/loader.js
+++ b/binsrc/oat/toolkit/loader.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: loader.js,v 1.87.2.18 2011/03/29 11:02:10 source Exp $
+ *  $Id: loader.js,v 1.87.2.27 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -86,8 +86,8 @@ OAT.Preferences = {
     imagePath: "/DAV/JS/images/",
     stylePath: "/DAV/JS/styles/",
     endpointXmla: "/XMLA",
-    version: "2.9",
-    build: "$Date: 2011/03/29 11:02:10 $",
+    version: "2.9.3",
+    build: "$Date: 2012/03/08 12:55:01 $",
     httpError: 1, /* show http errors */
     allowDefaultResize: 1,
     allowDefaultDrag: 1
@@ -1058,7 +1058,7 @@ OAT.Dom = {
 	    var key = part.substring(0,index);
 	    var val = part.substring(index+1);
 	    key = decodeURIComponent(key);
-	    val = decodeURIComponent(val);
+	    val = decodeURIComponent(val.replace(/\+/g,  " "));
 
 	    var r = false;
 	    if ((r = key.match(/(.*)\[\]$/))) {
@@ -1219,10 +1219,11 @@ OAT.Browser = {
     isKonqueror:!!navigator.userAgent.match(/konqueror/i),
     isKHTML:!!navigator.userAgent.match(/khtml/i),
 
-    isIE:(document.attachEvent && !document.addEventListener),
-    isIE6:( (document.attachEvent && !document.addEventListener) && !!navigator.userAgent.match(/msie 6/i) ),
+    isIE: !!navigator.userAgent.match(/msie/i),
+    isIE6:!!navigator.userAgent.match(/msie 6/i),
     isIE7:!!navigator.userAgent.match(/msie 7/i),
     isIE8:!!navigator.userAgent.match(/msie 8/i),
+    isIE9:!!navigator.userAgent.match(/msie 9/i),
 
     /* !isIE && !isIE7 */
 
@@ -1259,17 +1260,13 @@ OAT.Browser = {
 		  !!navigator.platform.toString().match(/ipod/i) ||
 		  !!navigator.userAgent.match(/android/i)),
 
-    hasNoSVG: (!!navigator.platform.toString().match(/iphone/i) ||
-	       !!navigator.platform.toString().match(/symbian/i) ||
-	       !!navigator.platform.toString().match(/ipod/i) ||
-	       !!navigator.userAgent.match(/android/i) ||
-	       !!navigator.userAgent.match(/msie/i)),
-
     hasXmlParser: ((!!document.implementation && 
 		    !!document.implementation.createDocument) ||
 		   (!!document.getImplementation &&
 		    !!document.getImplementation().createDocument)),
 
+    hasSVG:(!!document.implementation && 
+            document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")),
     hasHtml5Storage: function () {
 	try {
 	    return 'localStorage' in window && window['localStorage'] !== null;
@@ -1278,8 +1275,11 @@ OAT.Browser = {
 	    return false;
 	}
     }
+    
 }
 
+
+
 /**
  * @namespace Event helper
  */
diff --git a/binsrc/oat/toolkit/location.js b/binsrc/oat/toolkit/location.js
new file mode 100644
index 0000000..c19cbf8
--- /dev/null
+++ b/binsrc/oat/toolkit/location.js
@@ -0,0 +1,687 @@
+/*
+ *  $Id: location.js,v 1.1.4.3 2012/03/08 12:55:01 source Exp $
+ *
+ *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
+ *
+ *  Copyright (C) 2005-2012 OpenLink Software
+ *
+ *  See LICENSE file for details.
+ */
+
+
+OAT.CircularBuffer = function (len, initList) {
+    var self = this;
+    this._length = len;
+    this._buf = [];
+    this._ptr = 0;
+    this._fill = 0;
+    
+	this.serialize = function () {
+		var ser_buf = [];
+		for (i = 1;i<self._buf.length;i++) {
+			if (typeof self._buf[i] == 'object')
+				ser_buf[i] = self._buf[i].serialize();
+			else ser_buf[i] = self._buf[i];
+		}
+
+		var o = {
+			buf: self.ser_buf,
+			length: self._length,
+			ptr: self._ptr,
+			fill: self._fill
+		}
+		return OAT.JSON.serialize (o);
+	}
+
+	this.initFromSerialized = function (s) {
+		var o = OAT.JSON.deserialize (s);
+		if (o != null) {
+			self._length = o.length;
+			self._buf = o.buf;
+			self._ptr = o.ptr;
+			self._fill = o.fill;
+			return true;
+		}
+		return false;
+	}
+
+    this.append = function (item) {
+		if (self._fill < self._length) {
+			self._buf.append(item);
+			self._fill++;
+			self._ptr++;
+			return item;
+		}
+		if (self._ptr == self._length)
+			(self._ptr = 0)
+		
+		self._buf[self._ptr] = item;
+		self._ptr++;
+		return item;
+    }
+	
+    this.clear = function () {
+		self._buf = [];
+		self._fill = self._ptr = 0;
+    }
+	
+    this.appendList = function (list) {
+		for (var i=0;i<list.length;i++)
+			self.append (list[i]);
+    }
+	
+    this.getFill = function () {
+		return self._fill;
+    }
+	
+    this.getLength = this.getFill;
+	
+    this.getNth = function (n)
+    {
+		return self._buf[(self._ptr+n)%self._fill];
+    }
+	
+    this.putNth = function (n, item) {
+		self._buf[(self._ptr+n)%self._fill] = item;
+		return item;
+    }
+	
+    this.toList = function () {
+		var retList = [];
+		
+		if (self._buf.length == 0) 
+			return retList;
+		
+		for (var i=0;i<self._fill;i++) {
+			retList.append(self.getNth(i));
+		}
+		return retList;
+    }
+	
+    this.find = function (item) {
+		for (i=0;i<self._fill;i++) {
+			if (self.getNth(i) == item)
+				return i;
+		}
+		return -1;
+    }
+	
+    if (isArray(initList)) {
+		if (initList.length <= self._length) {
+			self._buf = initList;
+			self._fill = initList.length;
+			self._ptr = self._fill;
+			return;
+		} else {
+			self._buf = initList.slice (initList.length - self._length, initList.length-1);
+		}
+    }
+}
+
+
+/*
+	OAT.Notify.send(content, optObj);
+*/
+
+/*
+   Acquiring a location:
+
+   If empty cache, acquire location according to accuracy mode
+     
+   If last cache entry age < LocOpts.
+
+*/
+
+OAT.Location        = function (o) {
+    var self        = this;
+    this._lat       = 0;
+    this._lon       = 0;
+    this._alt       = 0;
+    this._acc       = -1;
+    this._altacc    = -1;
+    this._dir       = 0;
+    this._spd       = 0;
+    this._cdate     = new Date ();
+    this._mdate     = new Date ();
+
+    this.getLat     = function () { return self._lat; }
+    this.getLon     = function () { return self._lon; }
+    this.getAlt     = function () { return self._alt; }
+
+    this.getAcc     = function () { return self._acc; }
+    this.getAltAcc  = function () { return self.altacc; }
+
+    this.getCdate   = function () { return self._cdate; }
+    this.getMdate   = function () { return self._mdate; }
+
+    this.setLat     = function (lat) { self._lat = lat; self.touch(); return lat; };
+    this.setLon     = function (lon) { self._lon = lon; self.touch(); return lon; };
+    this.setAlt     = function (alt) { self._alt = alt; self.touch(); return alt; };
+
+    this.setAcc     = function (acc) { self._acc = acc; self.touch(); return acc; };
+    this.setAltAcc  = function (altacc) { self._altacc = _altacc; self.touch(); return _altacc;};
+
+    this.setCdate   = function (d) {
+	self._cdate = new Date (d);
+    }
+
+    this.setMdate = function (d) {
+	self._mdate = new Date (d);
+    }
+
+    // http://bit.ly/XFFe4
+
+    this.touch = function () {
+	_mdate = new Date ();
+    }
+
+    this.serialize = function () {
+	OAT.Debug.log (0,'Location.serialize');
+	return (OAT.JSON.serialize(
+	    {lat:    self._lat,
+	     lon:    self._lon,
+	     alt:    self._alt,
+	     acc:    self._acc,
+	     altacc: self._altacc,
+	     dir:    self._dir,
+	     spd:    self._spd,
+	     cate:   self._cdate.toUTCString(),
+	     mdate:  self._mdate.toUTCString()}));
+    }
+
+    this.initFromSerialized = function () {
+    }
+
+    this.parse = function (serLoc) {
+	if (serLoc.lat) self._lat = serLoc.lat;
+	if (serLoc.lon) self._lon = serLoc.lon;
+	if (serLoc.alt) self._alt = serLoc.alt;
+	if (serLoc.acc) self._acc = serLoc.acc;
+	if (serLoc.altacc) self._altacc = serLoc.altAcc;
+	if (serLoc.spd) self._spd = serLoc.spd;
+	if (serLoc.dir) self._dir = serLoc.dir;
+	if (serLoc.mdate)
+	    self._mdate = new Date (serLoc.mdate);
+	else 
+	    self._mdate = new Date ();
+
+	if (serLoc.cdate) 
+	    self._cdate = new Date (serLoc.cdate);
+	else 
+	    self._mdate = new Date ();
+
+	return self;
+    }
+
+    this.notImplemented = function (m) { throw (new Error (m)); }
+
+    this.triplify    = function () { self.notImplemented("triplify");};
+    this.fromRDFItem = function () { self.notImplemented("fromRDFItem");};
+    this.toRDFItem   = function () { self.notImplemented("toRDFItem");};
+
+    if (typeof o == "object")
+	this.parse (o);
+}
+
+//OAT.E_LocationException = function () {
+//    this._OAT_ex_type = "E_LocationException";
+//}
+
+//OAT.E_LocationException.prototype = OAT.Exception.prototype;
+
+OAT.LocationCache = function (size, initArr, getCurrent) {
+    var self = this;
+    this._timeout = 10000; // milliseconds
+    this._currentLocation = [];
+    this._locationCache = new OAT.CircularBuffer (size);
+    this._locOpts = {timeout: self._timeout, enableHighAccuracy: true};
+    this._acquiring = false;
+    this._acquire_denied = false;
+    this._timed_out = false;
+
+    this._persistLocationCache = function () {
+	if (typeof localStorage != 'undefined') {
+	    OAT.Debug.log (0,'LocationCache: in _persistLocationCache: DISABLED.');
+//	    localStorage.iSPARQL_locationCache = self._locationCache.serialize();
+//	    iSPARQL.Common.log ('LocationCache: in _persistLocationCache: saved');
+	}
+    }
+
+    this._locAcquireHandler = function (pos) {
+	OAT.Debug.log (0,'LocationCache: in _locAcquireHandler');
+	self._acquiring = false;
+	var o = {};
+
+	if (pos.coords.latitude) o.lat = pos.coords.latitude;
+	if (pos.coords.longitude) o.lon = pos.coords.longitude;
+	if (pos.coords.altitude) o.alt = pos.coords.altitude;
+	if (pos.coords.accuracy) o.acc = pos.coords.accuracy;
+	if (pos.coords.altitudeAccuracy) o.altacc = pos.coords.altitudeAccuracy;
+	if (pos.coords.speed) o.spd = pos.coords.speed;
+	if (pos.coords.direction) o.dir = pos.coords.direction;
+
+	l = new OAT.Location (o);
+	l.setCdate (new Date (pos.timestamp));
+	self._locationCache.append (l);
+	self._persistLocationCache();
+	OAT.MSG.send (self, "LOCATION_ACQUIRED", l);
+    }
+
+    this._locErrorHandler = function (e) {
+	OAT.Debug.log (0,'LocationCache: in _locErrorHandler');
+        self._acquiring = false;
+	switch (e.code) {
+	case e.TIMEOUT:
+	    self._timed_out = true;
+	    OAT.MSG.send (self, "LOCATION_TIMEOUT", e);
+	    break;
+	case e.PERMISSION_DENIED:
+	    self._acquire_denied = true;
+	    OAT.MSG.send (self, "LOCATION_ERROR", e);
+	    break;
+	}
+	OAT.MSG.send (self, "LOCATION_ERROR", e);
+    }
+
+    this.acquireCurrent = function () {
+	if (navigator.geolocation) {
+	    if (!self._acquiring) {
+		navigator.geolocation.getCurrentPosition (self._locAcquireHandler, 
+							  self._locErrorHandler, 
+							  self._locOpts);
+		self._acquiring = true;
+	    }
+	}
+    }
+
+    this.startTracking = function () {
+	if (navigator.geolocation) {
+	    navigator.geoLocation.watchPosition (self._locAcquireHandler, 
+						 self._locErrorHandler, 
+						 {maxAge: 10000});
+	}
+    }
+
+    this.getLatest = function () {
+	return self._locationCache.getNth(self._locationCache.getLength()-1);
+    }
+
+    for (i=0;i<initArr.length;i++)
+	self._locationCache.append (new Location(initArr[i]));
+    
+    if (getCurrent) {
+	self.acquireCurrent ();
+    }
+
+    this.addLocation = function (l) {
+	self._locationCache.append (l);
+    }
+
+    this.setManualLocation = function (l) {
+	self._locationCache.append(l);
+	self._acquiring = false;
+	OAT.MSG.send (self, "LOCATION_ACQUIRED", l);
+    }
+
+// XXX
+
+    this.serialize = function () {
+	return false;
+    }
+
+    this.initFromSerialized = function () {
+	return false;
+    }
+
+    this.cancelLocation = function () {
+	return false;
+    }
+}
+
+//
+// Use (GOOG) geoCoder Api - only by address, no bounds atm...
+//
+
+OAT.Geocoder = function (o) {
+    var self = this;
+
+    this._options = {
+	retries: 2,
+	retry_to_ms:2500 // msec between retries upon server error
+    };
+
+    this._retries_left = 0;
+    this._request = {};
+    this._retry_to = false;
+
+    for (var p in o) { this._options[p] = o[p]; }
+
+    this._geocoder = new google.maps.Geocoder();
+
+    this._geocode = function () {
+	self._geocoder.geocode (self._request, self.handleResult); 
+    }
+
+    this._retry_geocode = function () {
+	OAT.MSG.send (self,"GEOCODE_RETRYING",null);
+	self._geocode();
+    }
+
+    this.geocode = function (addr) {
+	self._retries_left = self._options.retries;
+	self._request = {address: addr};
+	self._geocode ();
+    }
+
+    this.handleResult = function (results, stat) {
+	var s = google.maps.GeocodeStatus;
+	switch (stat) {
+	case m.OK:
+	    if (self._retry_to) window.clearTimeout (self._retry_to);
+	    OAT.MSG.send (self,"GEOCODE_RESULT",results);
+	    break;
+	case m.UNKNOWN_ERROR:
+	    if (self._retries_left) {
+		self._retries_left--;
+		OAT.MSG.send (self,"GEOCODE_FAIL_RETRYING",stat);
+		if (!self._retry_to) 
+		    self._retry_to = setTimeout (self._retry_geocode(), self._options.retry_to_ms);
+		break;
+	    }
+	default:
+	    if (self._retry_to) window.clearTimeout (self._retry_to);
+	    OAT.MSG.send (self,"GEOCODE_FAIL",stat);
+	}
+    }
+}
+
+//
+// Requires HTML template. IDs:
+// #locAcquireUI - outer ctr - shown when loc being acquired
+// #locAcquireMsg
+// #locAcquireBtnCtr
+// #locAcquireLonCtr
+// #locAcquireLatCtr
+// #locAcquireAccCtr
+// #locAcquireUseBtn
+// #locAcquireCancelBtn
+//
+// o.useCB - use button callback
+// o.cancelCB - cancel callback
+// o.cache - cache
+//
+
+OAT.locAcquireUIMode = {
+    AUTO:   0,
+    GEOCODE:1,
+    MANUAL: 2
+}
+
+OAT.locationAcquireUI = function (o) {
+    var self = this;
+
+    this.o = {useGeocoder:false,
+	      manualFallback:true,
+	      uiMode: OAT.locAcquireUIMode.AUTO};
+
+    for (p in o)
+	this.o[p] = o[p];
+
+    this._lc = o.cache;
+
+    this._latC        = $("locAcquireLatCtr");
+    this._lonC        = $("locAcquireLonCtr");
+    this._accC        = $("locAcquireAccCtr");
+    this._titleT      = $("locAcquireTitleT");
+    this._msg         = $("locAcquireMsg");
+    this._err         = $("locAcquireErrMsg");
+    this._useBtn      = $("locAcquireUseBtn");
+    this._cancelBtn   = $("locAcquireCancelBtn");
+    this._manualBtn   = $("locAcquireManualBtn");
+    this._geocodeBtn  = $("locAcquireGeocodeBtn");
+    this._refBtn      = $("locAcquireRefreshBtn");
+    this._thr         = $("locAcquireThrobber");
+    this._geocodeForm = $("locAcquireGeocodeForm");
+    this._latI        = $("locAcquireManualLatInput");
+    this._lonI        = $("locAcquireManualLonInput");
+
+    this._ctr = $("locAcquireUI");
+
+    this._currL = false;
+
+    this._useCB = self.o.useCB;
+    this._cancelCB = self.o.cancelCB;
+
+    this._uiMode = self.o.uiMode;
+
+    this.hide = function () {
+	OAT.Dom.hide (self._ctr);
+    }
+
+    this.show = function () {
+	OAT.Dom.show(self._ctr);
+    }
+
+    this.refresh = function () {
+	
+	OAT.Dom.hide (self._err);
+	OAT.Dom.show (self._thr);
+	self._lc.acquireCurrent();
+    }
+
+    this.getCtr = function () {
+	return this._ctr;
+    }
+
+// "private" members
+
+    this._refresh_to = 0;    
+
+    this._locHandler = function (m,s,l) {
+	OAT.Debug.log (0,'LocAcquireUI: in _locHandler');
+	self._latI.value = l.getLat();
+	self._lonI.value = l.getLon();
+	self._accC.innerHTML = l.getAcc();
+	self._currL = l;
+	OAT.Dom.show (self._useBtn);
+	self._refBtn.innerHTML = "Refresh";
+	OAT.Dom.hide(self._thr);
+	OAT.Dom.hide(self._err);
+	if (l.getAcc() > o.minAcc) {
+	    self._refresh_to = setTimeout(self.refresh, 5000);
+	} else {
+	    self.hide();
+	    self.o.useCB(self.o.cbParm, self._currL);
+	}
+    }
+
+    this._errHandler = function (m,s,e) {
+	switch (e.code) {
+	case e.TIMEOUT:
+	    self._titleT.innerHTML = "Timed out";
+	    break;
+        case e.PERMISSION_DENIED:
+	    self._titleT.innerHTML = "Permission denied";
+	    break;
+        case e.POSITION_UNAVAILABLE:
+	    self._titleT.innerHTML = "Location failed";
+	    break;
+	}
+
+	if (e.message) self._err.innerHTML = e.message;
+	self._refBtn.innerHTML = "Retry";
+
+	OAT.Dom.show (self._err);
+	OAT.Dom.hide (self._thr);
+	OAT.Dom.hide (self._useBtn);
+    }
+
+    this._refreshHandler = function () {
+	self._reset();
+	self.refresh();
+    }
+
+    this._manualHandler = function () {
+	self._setManualMode();
+    }
+
+    this._geocodeHandler = function () {
+	self._setGeocodeMode();
+    }
+
+    this._reset = function () {
+	clearTimeout (self._refresh_to);
+	OAT.Dom.hide(self._geocodeForm);
+	OAT.Dom.hide(self._manualForm);
+
+	OAT.Dom.hide (self._err);
+	self._titleT.innerHTML = "Locating";
+	self._err.innerHTML = "";
+	self._refBtn.innerHTML = "Refresh";
+	self._useBtn.disabled = false;
+
+	if (!self.currL) OAT.Dom.hide (self._useBtn);
+
+	if (!self.o.manualFallback) 
+	    OAT.Dom.hide (self._manualBtn);
+	else
+	    OAT.Dom.show (self._manualBtn);
+
+	if (!self.o.useGeocoder) 
+	    OAT.Dom.hide (self._geocodeBtn);
+	else
+	    OAT.Dom.show (self._manualBtn);
+
+	self._lonI.disabled = true;
+	self._latI.disabled = true;
+
+	OAT.Event.detach (self._latI, "change", self._latLonIChangeHandler);
+	OAT.Event.detach (self._lonI, "change", self._latLonIChangeHandler);
+
+	OAT.Dom.show (self._thr);
+    }
+
+    this._setGeocodeMode = function () {
+	self._uiMode = OAT.locAcquireUIMode.GEOCODE;
+	self._reset();
+	OAT.Dom.hide(self._useBtn);
+	OAT.Dom.hide(self._thr);
+	OAT.Dom.show(self._geocodeForm);
+    }
+
+    this._useHandler = function (e,s) {
+	self.hide();
+        self._reset();
+	switch (self._uiMode) {
+	case OAT.locAcquireUIMode.MANUAL:
+	    var l = new OAT.Location ({lat: self._latI.value, 
+				       lon: self._lonI.value});
+	    self._lc.setManualLocation(l);
+	    self._currL = l;
+	    self._uiMode = self.o.uiMode;
+	    break;
+	case OAT.locAcquireUIMode.AUTO:
+	case OAT.locAcquireUIMode.GEOCODE:
+	    self._uiMode = self.o.uiMode;
+	    self.o.useCB(self.o.cbParm, self._currL);
+	}
+    }
+
+    this._latLonIChangeHandler = function () {
+	if (isNaN(self._latI.value) || isNaN(self._lonI.value))
+	    self._useBtn.disabled = true;
+        else
+	    self._useBtn.disabled = false;
+    }
+
+    this._setManualMode = function () {
+	self._uiMode = OAT.locAcquireUIMode.MANUAL;
+	self._reset();
+
+	OAT.Dom.hide(self._thr);
+	OAT.Dom.show(self._useBtn);
+	OAT.Dom.hide(self._manualBtn);
+	OAT.Dom.show(self._manualForm);
+
+	self._lonI.disabled = false;
+	self._latI.disabled = false;
+
+	self._refBtn.innerHTML="Auto";
+
+	OAT.Event.attach (self._latI, "change", self._latLonIChangeHandler);
+	OAT.Event.attach (self._lonI, "change", self._latLonIChangeHandler);
+
+	self._latI.focus();
+    }
+
+    this._cancelHandler = function (e,s) {
+	switch (self._uiMode) {
+	case OAT.locAcquireUIMode.AUTO:
+	    if (self.o.useGeocoder)
+		self._setGeocodeMode();
+	    else if (self.o.manualFallback)
+		self._setManualMode();
+	    return;
+	case OAT.locAcquireUIMode.GEOCODE:
+	    if (self.o.manualFallback)
+		self._setManualMode();
+	    return;
+	}
+	self.hide();
+	self._reset();
+	if (self.o.cancelCB) self.o.cancelCB(self.o.cbParm);
+    }
+
+    this._geocodeHandler = function (e,s) {
+	return;
+    }
+
+    this._geocodeRetryingH = function (e,s) {
+	return;
+    }
+
+    this._geocodeFailRetryH = function (e,s) {
+	return;
+    }
+
+    this._geocodeFailH = function (e,s) {
+	return;
+    }
+
+    this.init = function () {
+	OAT.Event.attach (self._useBtn,    "click", self._useHandler);
+	OAT.Event.attach (self._refBtn,    "click", self._refreshHandler);
+	OAT.Event.attach (self._cancelBtn, "click", self._cancelHandler);
+        OAT.Event.attach (self._manualBtn, "click", self._manualHandler);
+	OAT.Event.attach (self._geocodeBtn,"click", self._geocodeHandler);
+
+	OAT.MSG.attach ("*","LOCATION_ACQUIRED",    self._locHandler);
+	OAT.MSG.attach ("*","LOCATION_ERROR",       self._errHandler);
+	OAT.MSG.attach ("*","LOCATION_TIMEOUT",     self._errHandler);
+	OAT.MSG.attach ("*","GEOCODE_RESULT",       self._geocodeHandler);
+	OAT.MSG.attach ("*","GEOCODE_RETRYING",     self._geocodeRetryingH);
+	OAT.MSG.attach ("*","GEOCODE_FAIL",         self._geocodeFailH);
+	OAT.MSG.attach ("*","GEOCODE_FAIL_RETRYING",self._geocodeFailRetryH);
+
+	self._reset();
+	
+	switch (self.o.uiMode) {
+	case OAT.locAcquireUIMode.AUTO:
+	    OAT.Debug.log (0,'locAcquireUIMode: AUTO');
+	    self.refresh();
+	    break;
+	case OAT.locAcquireUIMode.GEOCODE:
+	    OAT.Debug.log (0,'locAcquireUIMode: GEOCODE');
+	    self._setGeocodeMode();
+	    break;
+	case OAT.locAcquireUIMode.MANUAL:
+	    OAT.Debug.log (0,'locAcquireUIMode: MANUAL');
+	    self._setManualMode();
+	    break;
+	}
+	self.show();
+    }
+
+    self.init ();
+}
+
diff --git a/binsrc/oat/toolkit/macwin.js b/binsrc/oat/toolkit/macwin.js
index ef3bec2..c14149e 100644
--- a/binsrc/oat/toolkit/macwin.js
+++ b/binsrc/oat/toolkit/macwin.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: macwin.js,v 1.9.2.5 2010/09/07 21:56:37 source Exp $
+ *  $Id: macwin.js,v 1.9.2.6 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/map.js b/binsrc/oat/toolkit/map.js
index 853f9d3..f497a02 100644
--- a/binsrc/oat/toolkit/map.js
+++ b/binsrc/oat/toolkit/map.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: map.js,v 1.17.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: map.js,v 1.17.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -1176,6 +1176,7 @@ OAT.Map.loadApi = function(provider, optObj) {
 	window[funcName] = function() {
 	    window[funcName] = null;
 	    if (options.callback) { options.callback(provider); }
+	    OAT.MSG.send (OAT, "OAT_MAP_API_LOADED", provider);
 	}
 	return funcName;
     }
diff --git a/binsrc/oat/toolkit/menu.js b/binsrc/oat/toolkit/menu.js
index 370ed0a..aa71f37 100644
--- a/binsrc/oat/toolkit/menu.js
+++ b/binsrc/oat/toolkit/menu.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: menu.js,v 1.11.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: menu.js,v 1.11.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/mswin.js b/binsrc/oat/toolkit/mswin.js
index 1611aca..18dc936 100644
--- a/binsrc/oat/toolkit/mswin.js
+++ b/binsrc/oat/toolkit/mswin.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: mswin.js,v 1.9.2.4 2010/09/07 21:56:37 source Exp $
+ *  $Id: mswin.js,v 1.9.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/n3.js b/binsrc/oat/toolkit/n3.js
index 2d02b85..a72d22a 100644
--- a/binsrc/oat/toolkit/n3.js
+++ b/binsrc/oat/toolkit/n3.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: n3.js,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: n3.js,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/notify.js b/binsrc/oat/toolkit/notify.js
index fc0499b..3e0f985 100644
--- a/binsrc/oat/toolkit/notify.js
+++ b/binsrc/oat/toolkit/notify.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: notify.js,v 1.6.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: notify.js,v 1.6.2.7 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -13,10 +13,13 @@
 
 OAT.Notify = function(parentDiv,optObj) {
 	var self = this;
+    this.types = {POPUP: 0, BAR: 1, PUSHBAR: 2};
+
 	this.options = {
 		x:-1,
-		y:-1
-	}
+	y:-1,
+	notifyType: 1
+    };
 
 	for (var p in optObj) { self.options[p] = optObj[p]; }
 
@@ -24,7 +27,8 @@ OAT.Notify = function(parentDiv,optObj) {
 	this.container = false;
 	this.cx = 0;
 	this.cy = 0;
-
+    this.visible = false;
+    this.content = false;
 
 	this.update = function() {
 		var scroll = OAT.Dom.getScroll();
@@ -35,7 +39,7 @@ OAT.Notify = function(parentDiv,optObj) {
 		}
 	}
 
-	this.createContainer = function(width,height) {
+    this.createPopupContainer = function (width, height) {
 		var pos = OAT.Dom.getLT(self.parentDiv);
 		var dim = OAT.Dom.getWH(self.parentDiv);
 
@@ -51,10 +55,10 @@ OAT.Notify = function(parentDiv,optObj) {
 			self.cy = pos[1] + self.options.y;
 		}
 
-		var c = OAT.Dom.create("div",{position:"fixed", top: self.cy + "px", left: self.cx + "px"});
-		self.container = c;
-		self.parentDiv.appendChild(c);
-
+	var c = OAT.Dom.create("div", {className: "notify_popup_ctr", 
+				       position: "fixed", 
+				       top: self.cy + "px", 
+				       left: self.cx + "px"});
 
 		if (OAT.Browser.isIE6) {
 			c.style.position = "absolute";
@@ -62,6 +66,33 @@ OAT.Notify = function(parentDiv,optObj) {
 			OAT.Event.attach(window,'scroll',self.update);
 			self.update();
 		}
+
+	return c;
+    }
+    
+    this.createBarContainer = function () { 
+	var pos = OAT.Dom.getLT(self.parentDiv);
+	var dim = OAT.Dom.getWH(self.parentDiv);
+	
+	c = OAT.Dom.create("div", {className: "notify_bar_ctr",
+				       position: "fixed",
+				       top: 0,
+				       left: 0,
+				       width: "100%", //dim[0]+"px"
+				       "z-index": 5000});
+	return c;
+    }
+
+    this.createPushBarContainer = function () { 
+	var pos = OAT.Dom.getLT(self.parentDiv);
+	var dim = OAT.Dom.getWH(self.parentDiv);
+	
+	var c = OAT.Dom.create("div", {className: "notify_bar_ctr",
+				       top: 0,
+				       left: 0,
+				       width: "100%", //dim[0]+"px",
+				       "z-index": 5000});
+	return c;
 	}
 
 	this.send = function(content, optObj) {
@@ -78,58 +109,129 @@ OAT.Notify = function(parentDiv,optObj) {
 			width:300,
 			height:50
 		}
+
+	if (self.visible) { 
+	    var c = $(content);
+	    if (!c) { // new text
+		self.content.innerHTML = content;
+	    }
+	    else { // DOM frag as content. Need to replace existing
+		OAT.Dom.unlink(self.content);
+		self.content = c;
+	    }
+	    return;
+	}
+
 		for (var p in optObj) { options[p] = optObj[p]; }
 
-		if (!self.container) { self.createContainer(options.width,options.height); }
+	switch (self.options.notifyType) {
+	case self.types.POPUP:
+	    if (!self.container) {
+		var c = self.createPopupContainer (options.width, options.height); 
+		self.container = c;
+		self.parentDiv.appendChild(self.container);
+	    }
+	    self.inner = OAT.Dom.create ("div", {width: options.width + "px", 
+						height: options.height + "px", 
+						cursor: "pointer",
+						overflow: "hidden",
+						marginBottom: "2px",
+						padding: options.padding,
+						backgroundColor: options.background,
+						color: options.color});
+	    
+	    break;
+	case self.types.BAR:
+	    if (!self.container) {
+		var c = self.createBarContainer (options.height);
+		self.container = c;
+		self.parentDiv.appendChild(self.container);
+	    }
+	    
+	    self.inner = OAT.Dom.create ("div", {className: "notify_bar_inner",
+						width:    "100%", // should be same width as the container
+						cursor:   "pointer",
+						overflow: "hidden",
+						backgroundColor:options.background,
+						color: options.color});
+	    break;
+	case self.types.PUSHBAR:
+	    if (!self.container) {
+		var c = self.createPushBarContainer (options.height);
+		self.container = c;
+		self.parentDiv.insertBefore (self.container,self.parentDiv.firstChild);
+	    }
+	    
+	    self.inner = OAT.Dom.create ("div", {className: "notify_bar_inner",
+						width:    "100%", // should be same width as the container
+						cursor:   "pointer",
+						overflow: "hidden",
+						backgroundColor:options.background,
+						color: options.color});
+	    break;
+	}
+	
+	if (options.image) { /* image */
+	    var img = OAT.Dom.create ("img", {cssFloat: "left", 
+					      styleFloat:"left", 
+					      marginRight: "2px"});
+	    img.src = options.image;
+	    self.inner.appendChild(img);
+	}
 
-		var c = $(content);
-		if (!c) {
-			c = OAT.Dom.create("div");
-			c.innerHTML = content;
+	var ct = $(content);
+	if (!ct) {
+	    self.content = OAT.Dom.create("div", {className: "notify_content"});
+	    self.content.innerHTML = content;
 		}
-		if (options.style) { OAT.Style.set(c,options.style); }
+	
+	if (options.style) { OAT.Style.set (self.c, options.style); }
 
-		var div = OAT.Dom.create("div",{width:options.width+"px",height:options.height+"px",cursor:"pointer",overflow:"hidden",marginBottom:"2px",padding:options.padding,backgroundColor:options.background,color:options.color});
-		if (options.image) { /* image */
-			var img = OAT.Dom.create("img",{cssFloat:"left",styleFloat:"left",marginRight:"2px"});
-			img.src = options.image;
-			div.appendChild(img);
+	self.inner.appendChild(self.content);
+
+	if (options.close) {
+	    var close_img = OAT.Dom.create ("img", {cssFloat:"right", styleFloat:"right"});
+	    img.src = options.close;
+	    self.inner.appendChild(close_img);
 		}
-		div.appendChild(c);
-		OAT.Style.set(div,{opacity:0});
+
+	OAT.Style.set(self.inner, {opacity:0});
 
 		var afterAppear = function() {
 			if (!options.timeout) { return; }
 			setTimeout(function() {
-				if (div.parentNode) { aDisappear.start(); }
+		if (self.inner.parentNode) { self.aDisappear.start(); }
 			},options.timeout);
 		}
 
-		var aAppear = new OAT.AnimationOpacity(div,{opacity:options.opacity,speed:0.1,delay:options.delayIn});
-		var aDisappear = new OAT.AnimationOpacity(div,{opacity:0,speed:0.1,delay:options.delayOut});
-		var aRemove = new OAT.AnimationSize(div,{height:0,speed:10,delay:options.delayOut});
-		OAT.MSG.attach(aRemove.animation,"ANIMATION_STOP",function(){	OAT.Dom.unlink(div); });
-		OAT.MSG.attach(aAppear.animation,"ANIMATION_STOP",afterAppear);
-		OAT.MSG.attach(aDisappear.animation,"ANIMATION_STOP",aRemove.start);
+	self.aAppear =    new OAT.AnimationOpacity (self.inner, {opacity:options.opacity, speed:0.1, delay:options.delayIn});
+	self.aDisappear = new OAT.AnimationOpacity (self.inner, {opacity:0, speed:0.1, delay:options.delayOut});
+	self.aRemove =    new OAT.AnimationSize (self.inner, {height:0, speed:10, delay:options.delayOut});
+	
+	OAT.MSG.attach (self.aRemove.animation, "ANIMATION_STOP", function() { OAT.Dom.unlink (self.inner); OAT.Dom.hide (self.container)});
+	OAT.MSG.attach (self.aAppear.animation, "ANIMATION_STOP", afterAppear);
+	OAT.MSG.attach (self.aDisappear.animation, "ANIMATION_STOP", self.aRemove.start);
 
-
-		OAT.Event.attach(div,"click",function() {
+	OAT.Event.attach (self.inner,"click",function() {
 			if (options.delayOut) {
-				aRemove.start();
+		self.aRemove.start();
 			} else {
-				OAT.Dom.unlink(div);
+		OAT.Dom.unlink(self.inner);
 			}
 		});
 
 		var start = function() {
-			self.container.appendChild(div);
+	    self.visible = true;
+	    self.container.appendChild (self.inner);
+	    OAT.Dom.show (self.container);
 			if (options.delayIn) {
-				aAppear.start();
+		self.aAppear.start();
 			} else {
 				OAT.Style.set(div,{opacity:options.opacity});
 				afterAppear();
 			}
 		}
+	
 		var end = function() {
 			aAppear.stop();
 		}
@@ -137,5 +239,8 @@ OAT.Notify = function(parentDiv,optObj) {
 		start();
 	}
 
-
+    this.hide = function () {
+	self.visible = false;
+	self.aDisappear.start();
+    }
 }
diff --git a/binsrc/oat/toolkit/panelbar.js b/binsrc/oat/toolkit/panelbar.js
index 489a95c..38f4475 100644
--- a/binsrc/oat/toolkit/panelbar.js
+++ b/binsrc/oat/toolkit/panelbar.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: panelbar.js,v 1.14.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: panelbar.js,v 1.14.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/piechart.js b/binsrc/oat/toolkit/piechart.js
index 383353c..4c1832a 100644
--- a/binsrc/oat/toolkit/piechart.js
+++ b/binsrc/oat/toolkit/piechart.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: piechart.js,v 1.7.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: piechart.js,v 1.7.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/pivot.js b/binsrc/oat/toolkit/pivot.js
index 993da14..b979648 100644
--- a/binsrc/oat/toolkit/pivot.js
+++ b/binsrc/oat/toolkit/pivot.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: pivot.js,v 1.10.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: pivot.js,v 1.10.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/profiler.js b/binsrc/oat/toolkit/profiler.js
index e29117d..302a0f6 100644
--- a/binsrc/oat/toolkit/profiler.js
+++ b/binsrc/oat/toolkit/profiler.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: profiler.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: profiler.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/quickedit.js b/binsrc/oat/toolkit/quickedit.js
index b8f4e40..7d244d1 100644
--- a/binsrc/oat/toolkit/quickedit.js
+++ b/binsrc/oat/toolkit/quickedit.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: quickedit.js,v 1.6.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: quickedit.js,v 1.6.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/rdf.js b/binsrc/oat/toolkit/rdf.js
index 802fc54..347ecee 100644
--- a/binsrc/oat/toolkit/rdf.js
+++ b/binsrc/oat/toolkit/rdf.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rdf.js,v 1.13.2.8 2011/03/29 11:02:10 source Exp $
+ *  $Id: rdf.js,v 1.13.2.11 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -66,7 +66,7 @@ OAT.RDFAtom = function (tag, value, ns) {
     //
 
     this.getValueDt = function () {
-
+	// XXX no-op
     }
 
     //
@@ -125,19 +125,29 @@ OAT.RDFAtom = function (tag, value, ns) {
 // Global IRI repository
 // 
 
+
 OAT.IRIDB = {
+
+//
+// Some "Well-known" namespaces
+//
+
     _default_iris: [
+	["http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdf"],
+	["http://purl.org/dc/elements/1.1/",            "dc"],
+	["http://www.w3.org/2002/07/owl#",              "owl"],
 	["http://rdfs.org/sioc/ns#",                    "sioc"],
 	["http://www.w3.org/2000/01/rdf-schema#",       "rdfs"],
+        ["http://www.w3.org/2001/XMLSchema#",           "xsd"],
 	["http://xmlns.com/foaf/0.1/",                  "foaf"],
 	["http://umbel.org/umbel#",                     "umbel"],
-	["http://purl.org/dc/elements/1.1/",            "dc"],
-	["http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdf"],
-	["http://dbpedia.org/resource/",                "dbpedia"],
-        ["http://www.w3.org/2001/XMLSchema#",           "xsd"],
 	["http://purl.org/goodrelations/v1#",           "gr"],
+	["http://www.openlinksw.com/schemas/xbrl/",     "xbrl"],
+	["http://www.openlinksw.com/schemas/rdfs/",     "oplrdfs"],
+	["http://dbpedia.org/resource/",                "dbpedia"],
         ["http://dbpedia.org/ontology/",                "dbo"],
-        ["http://dbpedia.org/property/",                "dbpprop"]
+        ["http://dbpedia.org/property/",                "dbpprop"],
+	["http://dbpedia.org/class/yago/",              "yago"]
 ], // IRI array 
 
     _iri_a:  [],
@@ -148,6 +158,7 @@ OAT.IRIDB = {
     _ns_pref: {},
     _ciri_unres: [], // iids with unresolved CIRI
     _enableHTML5LocalStorage:false,
+    _ns_cnt: 0,  // count of "anon" ns pfxes
 
     //
     // Insert IRI, update ns prefix, or just get IID of existing IRI
@@ -230,6 +241,14 @@ OAT.IRIDB = {
 	return (r ? r : false);
     }, 
 
+    makeNSPrefix:function() {
+	return 'ns'+this._ns_cnt++;
+    },
+
+    //
+    //  Resolve CIRI (IRI with NS Prefix) and cache
+    //
+
     resolveCIRI:function (iid) {
 	var ciri = this._iri_a[iid][1];
 	if (!!ciri) return ciri;
@@ -238,19 +257,28 @@ OAT.IRIDB = {
 
 	var i_a = this.splitIRI (iri); // http://www.zonk.net/onto/cli/ 
 	
-	var pfx_str = iri.substr(0, i_a.index);
-	var pfx_iid = this._iri_h [pfx_str];
-
-	if (pfx_iid)
+	var ns_iri = iri.substr(0, i_a.index);
+	var ns_iid = this._iri_h [ns_iri];
+
+	if (ns_iid) {
+            if (this._iri_a[ns_iid][1]) {
+		ciri = this._iri_a[ns_iid][1] + ":" + i_a[0]; // Already have a ns prefix
+	    } else {
+		var new_ns = this.makeNSPrefix(); // ns IRI exists but no prefix - synthesize and save
+		ciri = new_ns + ':' + i_a[0];
+		this._iri_a[ns_iid][1] = new_ns;
+	    }
+	}
+	else
 	    {
-		ciri = this._iri_a[pfx_iid][1] + ":" + i_a[0];
-		if (typeof ciri == "object") throw "resolveCIRI: invalid ciri - cannot have an object here";
-		this._iri_a[iid][1] = ciri; 
-
-		return ciri;
+	    var new_ns = this.makeNSPrefix();
+	    this.insertIRI(ns_iri, new_ns);
+	    ciri = new_ns + ":" + i_a[0];	    
 	    }
 
-	return false;
+	this._iri_a[iid][1] = ciri; // cache CIRI with the IRI
+
+	return ciri;
     },
 
     init: function () {
@@ -266,11 +294,14 @@ OAT.IRIDB = {
 		OAT.IRIDB._iri_h = idb._iri_h;
 		OAT.IRIDB._iri_c = idb._iri_c;
 		OAT.IRIDB._iri_d = idb._iri_d;
-	    }
+	    } else {
 	    this.insertIRIArr (this._default_iris);
-	    
+		this.save();
+	    }
 	    OAT.MSG.attach ("*","OAT_RDF_STORE_LOADED", this.save);
 	}
+	else
+	    this.insertIRIArr (this._default_iris);
     },	    
 
     getStats: function () {
diff --git a/binsrc/oat/toolkit/rdfbrowser.js b/binsrc/oat/toolkit/rdfbrowser.js
index da5d840..f0df022 100644
--- a/binsrc/oat/toolkit/rdfbrowser.js
+++ b/binsrc/oat/toolkit/rdfbrowser.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rdfbrowser.js,v 1.28.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: rdfbrowser.js,v 1.28.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/rdfmini.js b/binsrc/oat/toolkit/rdfmini.js
index 04bea91..0a422c0 100644
--- a/binsrc/oat/toolkit/rdfmini.js
+++ b/binsrc/oat/toolkit/rdfmini.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rdfmini.js,v 1.7.2.9 2011/02/16 20:54:22 source Exp $
+ *  $Id: rdfmini.js,v 1.7.2.14 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -32,8 +32,10 @@ OAT.RDFMini = function(div,optObj) {
 		showSearch:true,
 		imagePath:OAT.Preferences.imagePath,
 	endpoint:"/sparql?query=",
-	store: false
+	store: false,
+	sel_ctr: false // optional place view selector in custom place
 	}
+
 	for (var p in optObj) { this.options[p] = optObj[p]; }
 
 	this.parent = $(div);
@@ -104,7 +106,13 @@ OAT.RDFMini = function(div,optObj) {
 			OAT.Event.attach(s,"change",self.redraw);
 			self.select = s;
 
-	    var sel_ctr = OAT.Dom.create("div",{className:"rdfmini_view_sel_ctr"});
+	    var sel_ctr;
+
+	    if (!self.options.sel_ctr) 
+		sel_ctr = OAT.Dom.create("div",{className:"rdfmini_view_sel_ctr"});
+	    else
+		sel_ctr = self.options.self_ctr;
+
 	    var sel_lbl = OAT.Dom.create("label");
 
 	    OAT.Dom.append([self.parent,sel_ctr],[sel_ctr,sel_lbl,s]);
@@ -115,6 +123,8 @@ OAT.RDFMini = function(div,optObj) {
 			self.tabs.push(obj);
 		}
 
+	OAT.MSG.attach ("*","MAP_NOTHING_TO_SHOW", function (_s,_m,_e) { s.selectedIndex = 0;self.redraw() })
+	
 	var ua = navigator.userAgent;
 
 	if (ua.indexOf('iPhone') != -1 || ua.indexOf('Android') != -1 ) {
@@ -172,24 +182,51 @@ OAT.RDFMini = function(div,optObj) {
 	this.getContent = function(data_,disabledActions) {
 		var content = false;
 	    var data;
+	var label = false;
+	var ciri;
+	var _type;
 
 	    if (data_.constructor == OAT.RDFAtom)
 		switch (data_.getTag()) {
 		case OAT.RDFTag.IRI:
 		    data = data_.getIRI();
-		    var ciri = OAT.IRIDB.getCIRIByID(data_.getValue());
-		    break;
+		ciri = OAT.IRIDB.resolveCIRI(data_.getValue());
+		content = OAT.Dom.create("span");
+		var a = OAT.Dom.create("a");
+
+		if (label) a.innerHTML = label;
+		else a.innerHTML = (self.options.raw_iris ? data : ciri);
+
+		a.href = data;
+		content.appendChild(a);
+		self.processLink(a,data,disabledActions);
+		return content;
 		case OAT.RDFTag.LIT:
 		    data = data_.getValue();
 		    break;
 	    }
+	else if (typeof data_ == 'object') {
+	    ciri = OAT.IRIDB.resolveCIRI(data_.iid);
+	    data = OAT.IRIDB.getIRI(data_.iid);
+	    label = data_.label;
+	    content = OAT.Dom.create("span");
+	    var a = OAT.Dom.create("a");
+
+	    if (label) a.innerHTML = label;
+            else a.innerHTML = (self.options.raw_iris ? data : ciri);
 
-		var type = self.getContentType(data);
+	    a.href = data;
+	    content.appendChild(a);
+	    self.processLink(a,data,disabledActions);
+	    return content;
+	}
+	
+	_type = self.getContentType(data); // Only literals should be left something that may be deref'd?
 
-		switch (type) {
+	switch (_type) { // XXX this should be pruned with extreme prejudice
 			case 3:
 				content = OAT.Dom.create("img");
-				content.title = data;
+	    content.title = (label ? label : data);
 				content.src = data;
 				self.processLink(content,data);
 			break;
@@ -202,14 +239,19 @@ OAT.RDFMini = function(div,optObj) {
 			case 1:
 				content = OAT.Dom.create("span");
 				var a = OAT.Dom.create("a");
-		a.innerHTML = (ciri ? ciri : data);
+	    a.innerHTML = (label ? label : ciri);
 				a.href = data;
 				content.appendChild(a);
 				self.processLink(a,data,disabledActions);
 			break;
 			default:
 				content = OAT.Dom.create("span");
-		content.innerHTML = (ciri ? ciri : data);
+
+	    if (data.match(/(#this$|#me$)/))
+		content.innerHTML = (label ? label : ciri);
+	    else
+		content.innerHTML = (label ? label : data);
+
 				/* create dereference a++ lookups for all anchors */
 				var anchors_ = content.getElementsByTagName("a");
 				var anchors = [];
diff --git a/binsrc/oat/toolkit/rdfstore.js b/binsrc/oat/toolkit/rdfstore.js
index 699b70e..f40897e 100644
--- a/binsrc/oat/toolkit/rdfstore.js
+++ b/binsrc/oat/toolkit/rdfstore.js
@@ -1,9 +1,8 @@
-/*
- *  $Id: rdfstore.js,v 1.32.2.7 2011/03/23 11:55:02 source Exp $
+/*  $Id: rdfstore.js,v 1.32.2.11 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -68,6 +67,7 @@ OAT.RDFStore = function(tripleChangeCallback, optObj) {
     this.labelProps = {
 	"http://www.w3.org/2000/01/rdf-schema#label": 0,
 	"http://www.w3.org/2004/02/skos/core#prefLabel": 1,
+        "http://www.openlinksw.com/schemas/virtrdf#label": 1,
 	"http://xmlns.com/foaf/0.1/name": 2,
 	"http://xmlns.com/foaf/0.1/nick": 3,
 	"http://purl.org/dc/elements/1.1/title": 4,
@@ -704,21 +704,7 @@ OAT.RDFStore = function(tripleChangeCallback, optObj) {
 
 	_iid = (iid.constructor == OAT.RDFAtom) ? iid._value : iid;
 
-	var ciri = OAT.IRIDB.resolveCIRI (_iid);
-
-	if (!!ciri) 
-	    return ciri;
-	else 
-	{
-	    var iri = OAT.IRIDB.getIRI(_iid);
-
-	    spliri = OAT.IRIDB.splitIRI(iri);
-
-	    if (!!spliri) 
-		return (spliri[1]);
-	    else 
-		return iri;
-	    }
+	return OAT.IRIDB.resolveCIRI (_iid);
 	    }
 
     this.getTitle = function(item) {
@@ -726,7 +712,10 @@ OAT.RDFStore = function(tripleChangeCallback, optObj) {
 	if (!!item.label)
 	    return item.label;
 	else
-	    return self.getCIRIorSplit (item.iid)
+	    if (self.options.raw_iris) 
+		return OAT.IRIDB.getIRI (item.iid);
+            else
+		return self.getCIRIorSplit (item.iid);
     }
 
 // XXX
diff --git a/binsrc/oat/toolkit/rdftabs.js b/binsrc/oat/toolkit/rdftabs.js
index a7d5650..c8f1f9a 100644
--- a/binsrc/oat/toolkit/rdftabs.js
+++ b/binsrc/oat/toolkit/rdftabs.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rdftabs.js,v 1.63.2.20 2011/03/29 11:02:10 source Exp $
+ *  $Id: rdftabs.js,v 1.63.2.27 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -64,7 +64,8 @@ OAT.RDFTabs.browser = function(parent,optObj) {
 	pageSize:20,
 	removeNS:true,
 	description:"This view shows all RDF data grouped by subject resource.",
-	desc:"RDF data by subject resource"
+	desc:"RDF data by subject resource",
+	raw_iris: false
     }
 
     for (var p in optObj) { self.options[p] = optObj[p]; }
@@ -159,15 +160,7 @@ OAT.RDFTabs.browser = function(parent,optObj) {
 	    var p_ctr = OAT.Dom.create("div",{className:"rdf_p"});
 	    var p_a = OAT.Dom.create("a");
 	    var p_iri = OAT.IRIDB.getIRI(p);
-	    var p_ciri = OAT.IRIDB.getCIRIByID(p);
-
-	    if (!p_ciri) {
-		var spiri = OAT.IRIDB.splitIRI(p_iri);
-		if (!spiri) 
-		    p_ciri = p_iri;
-		else
-		    p_ciri = spiri[0];
-	    }
+	    var p_ciri = OAT.IRIDB.resolveCIRI(p);
 
 	    p_a.href = p_iri;
 
@@ -352,7 +345,10 @@ OAT.RDFTabs.browser = function(parent,optObj) {
 		elm.href = OAT.IRIDB.getIRI(value);
 		attach(elm,value);
 	    }
-	    elm.innerHTML = self.parent.store.getCIRIorSplit(value);
+
+	    if (self.options.raw_iris) elm.innerHTML = elm.href; 
+            else elm.innerHTML = self.parent.store.getCIRIorSplit(value);
+
 	    if (i) { self.sortDiv.appendChild(OAT.Dom.text(", ")); }
 	    self.sortDiv.appendChild(elm);
 	}
@@ -381,9 +377,11 @@ OAT.RDFTabs.navigator = function(parent,optObj) {
 
     this.options = {
 	limit:5,
-	description:"This module is used to navigate through locally cached data, one resource at a time. Note that filters are not applied here.",
-	desc:"Navigate through locally cached data (Filters not applied)"
+	description:"This module is used to navigate through locally cached data, one resource at a time. Filters are not applied.",
+	desc:"Navigate through locally cached data (Filters not applied)",
+        raw_iris: false
     }
+
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
     this.initialized = false;
@@ -473,6 +471,8 @@ OAT.RDFTabs.navigator = function(parent,optObj) {
     this.getTypeObject = function() { /* object of resource types */
 	var obj = [];
 	var noTypeArr = [];
+
+	OAT.IRIDB.insertIRI('http://openlinksw.com/schemas/oat/rdftabs#','oatrdftabs');
 	var ntIID = OAT.IRIDB.insertIRI('http://openlinksw.com/schemas/oat/rdftabs#isReferencedBy');
 
 	var data = self.parent.data.all;
@@ -600,7 +600,10 @@ OAT.RDFTabs.navigator = function(parent,optObj) {
 	    } else if (type == 1) { /* dereferencable link */
 		content = OAT.Dom.create("a");
 		    content.href = value.getIRI();
-		    content.innerHTML = self.parent.store.getCIRIorSplit(value.getIID());
+
+		    if (self.options.raw_iris) content.innerHTML = value.getIRI();
+                    else content.innerHTML = self.parent.store.getCIRIorSplit(value.getIID());
+
 		    self.dattach(content,value.getIRI());
 		} 
 	    } else { /* text */
@@ -701,6 +704,9 @@ OAT.RDFTabs.navigator = function(parent,optObj) {
 	    if (iid in self.parent.store.labels)
 		a.innerHTML = self.parent.store.labels[iid].label;
 	    else
+		if (self.options.raw_iris) 
+                    a.innerHTML = OAT.IRIDB.getIRI(iid);
+                else 
 		a.innerHTML = self.parent.store.getCIRIorSplit(iid);
 
 	    a.title = a.href = OAT.IRIDB.getIRI(iid);
@@ -771,15 +777,25 @@ OAT.RDFTabs.navigator = function(parent,optObj) {
 	td.colSpan = 3;
 
 	var simple;
+
+	if (self.options.raw_iris) 
+            simple = OAT.IRIDB.getIRI(label); 
+        else 
 	simple = self.parent.store.getCIRIorSplit(label);
 
 	if (cnt > 1 && simple.charAt(0) != "[" && simple in self.plurals) {
 	    simple = self.plurals[simple];
 	}//]
 
-	td.innerHTML = simple;
-	td.title = OAT.IRIDB.getIRI(label);
+	var a = OAT.Dom.create("a", {className: "nav_rdf_subject"});
+
+	a.innerHTML = simple;
+	a.title = OAT.IRIDB.getIRI(label);
+	a.href = simple;
+
+	td.appendChild (a);
 	tr.appendChild(td);
+
 	OAT.Event.attach(arrow,"click",function() {
 	    state = (state+1) % 2;
 	    arrow.innerHTML = states[state];
@@ -950,7 +966,8 @@ OAT.RDFTabs.triples = function(parent,optObj) {
 	pageSize:100,
 	removeNS:true,
 	description:"This module displays all filtered triples.",
-	desc:"All filtered triples"
+	desc:"All filtered triples",
+        raw_iris: false
     }
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
@@ -1040,13 +1057,24 @@ OAT.RDFTabs.triples = function(parent,optObj) {
 		iid = atom; // this is a plain IID value
 	}
 
-	var a = OAT.Dom.create("a");
+
+	try { 	// Dirty data does exist, you see...
 	var iri = decodeURIComponent(OAT.IRIDB.getIRI(iid));
-	a.innerHTML = self.parent.store.getCIRIorSplit(iid);
-	a.href = iri;
+            var col_v_elm = OAT.Dom.create("a");
+
+            if (self.options.raw_iris)
+              col_v_elm.innerHTML = iri;
+            else 
+              col_v_elm = self.parent.store.getCIRIorSplit(iid);
+
+	    col_v_elm.href = iri;
+	    self.parent.processLink(col_v_elm, iri);
+        } catch (e) {
+	    col_v_elm = OAT.Dom.create("span",{className:"error_col"});
+            col_v_elm.innerHTML = OAT.IRIDB.getIRI(iid) + " (invalid URI)";
+	}
 	OAT.Dom.clear(v);
-	v.appendChild(a);
-	self.parent.processLink(a,iri);
+	v.appendChild(col_v_elm);
     }
 
     this.redraw = function() {
@@ -1080,7 +1108,8 @@ OAT.RDFTabs.svg = function(parent,optObj) {
     this.options = {
 	limit:100,
 	description:"",
-	desc:"Filtered data as SVG Graph"
+	desc:"Filtered data as SVG Graph",
+        raw_iris: false
     }
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
@@ -1100,9 +1129,9 @@ OAT.RDFTabs.svg = function(parent,optObj) {
 	var cnt = self.parent.data.triples.length;
 
 	if (cnt > self.options.limit) {
-	    var note = new OAT.Notify();
+	    var note = new OAT.Notify(false, {notifyType: 2});
 	    var msg = "Note: Display limited to " + self.options.limit + " triples."
-	    note.send (msg,{delayIn:10,width:350,height:50,timeout:5000});
+	    note.send (msg,{delayIn:10,timeout:5000});
 	    cnt = self.options.limit;
 	}
 
@@ -1308,6 +1337,10 @@ OAT.RDFTabs.PointList = function (opts) {
     }
 }
 
+//
+// Sends MAP_NOTHING_TO_SHOW if there's nothing to show on map
+//
+
 OAT.RDFTabs.map = function(parent,optObj) {
     var self = this;
     OAT.RDFTabs.parent(self);
@@ -1320,7 +1353,10 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	desc:"Plots all geodata onto a map",
 	clickPopup:true,
 	hoverPopup:true,
-	height: "600px"
+	height: "600px",
+	useMobileOpts:false,
+	supportedMobileDetected:false,
+        raw_iris: false
     }
 
     for (var p in optObj) { self.options[p] = optObj[p]; }
@@ -1337,6 +1373,7 @@ OAT.RDFTabs.map = function(parent,optObj) {
     if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1 ) {
 	self.elm.style.width = '100%';
 	self.elm.style.height = '100%';
+	self.options.supportedMobileDetected = true;
     } else {
     this.elm.style.height = self.options.height;
     }
@@ -1358,7 +1395,8 @@ OAT.RDFTabs.map = function(parent,optObj) {
 						     "http://www.w3.org/2003/01/geo/latitude", 
 						     "http://www.w3.org/2006/vcard/ns#latitude",
 						     "http://www.w3.org/2001/vcard-rdf/3.0#latitude",
-						     "http://dbpedia.org/property/lat"]);
+						     "http://dbpedia.org/property/lat",
+						     "http://www.openlinksw.com/schemas/zillow#latitude"]);
 
     this.lonProperties    = OAT.IRIDB.insertIRIArr (["http://www.w3.org/2003/01/geo/lng",
 						     "http://www.w3.org/2003/01/geo/wgs84_pos#long",
@@ -1367,7 +1405,8 @@ OAT.RDFTabs.map = function(parent,optObj) {
 						     "http://www.w3.org/2003/01/geo/longitude",
 						     "http://www.w3.org/2006/vcard/ns#longitude",
 						     "http://www.w3.org/2001/vcard-rdf/3.0#longitude",
-						     "http://dbpedia.org/property/long"]);
+						     "http://dbpedia.org/property/long",
+						     "http://www.openlinksw.com/schemas/zillow#longitude"]);
 
     this.lookupProperties = OAT.IRIDB.insertIRIArr (["http://xmlns.com/foaf/0.1/name",
 						     "http://xmlns.com/foaf/0.1/location"]); /* interesting to be put into lookup pin */
@@ -1434,18 +1473,19 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	var coords = [0,0];
 
 	if (item.type) {
-	    for (var i=0;i<item.type.length;i++)
+	    for (var i=0;i<item.type.length;i++) {
 		if (self.pointTypes.indexOf(item.type[i].getValue()) != -1)
 	    coords = self.extractCoords (item.preds);
 	}
+	}
 
 	    for (var p in preds) {
 		var pred = preds[p];
 	    if (!!(p = parseInt(p))) {	    
 		if (self.keyProperties.indexOf(p) != -1) { 
+		    if (pred[0] instanceof OAT.RDFAtom && pred[0].isLit())
 		    pointResource = pred[0].getValue(); 
 		} /* resource containing geo coordinates */
-		
 		if (self.locProperties.indexOf(p) != -1) { 
 		    locValue = pred[0].getValue(); 
 		} /* resource containing geo coordinates */
@@ -1470,7 +1510,7 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	
 	if (!pointResource && locValue) { /* geocode location */
 	    if (!!window.console) window.console.log ('geocoding: '+locValue);
-		self.geoCode(locValue,item);
+	    self.geoCode(locValue,item);
 		return;
 	    }
 	
@@ -1480,7 +1520,7 @@ OAT.RDFTabs.map = function(parent,optObj) {
 		    coords[0] = cmatches[2];
 		    coords[1] = cmatches[1];
 		    if (coords[0] == 0 || coords[1] == 0) { return; }
-		    self.attachMarker(coords,item);
+		self.attachMarker(coords,item);
 		    return;
 		}
 	    
@@ -1494,8 +1534,6 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	    }
 	    }
 	
-	if (pointResource.isLit()) { return; } /* not a reference */
-
 	    self.usedBlanknodes.push(pointResource);
 
 	    /* normal marker add */
@@ -1503,7 +1541,7 @@ OAT.RDFTabs.map = function(parent,optObj) {
 
 	if (coords[0] == 0 || coords[1] == 0) { return; }
 
-	self.attachMarker(coords,item);
+	self.attachMarker(coords, item);
     } /* tryItem */
 
     this.trySimple = function(item) {
@@ -1594,43 +1632,117 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	return false;
 	}
 
+    // an item isCoordinateContainer if it's referred by another item and
+    // its type property values are all geo point types and/or it only has geo coordinate properties
+
+    this.isCoordinateContainer = function (item) {
+	type_iid = OAT.IRIDB.getIRIID("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
+	if (!item.back.length) 
+	    return false;
+	var preds = item.preds;
+	var nc_cnt = 0;
+	for (var p in preds) {
+	    var pVal = parseInt(p);
+	    if (pVal == type_iid) { // go through types - pointTypes don't count
+		for (var i=0;i<preds[p].length;i++) {
+		    if (self.pointTypes.find(preds[p][i].getIID()) == -1)
+			return false;
+		}
+	    } else {
+		if (self.lonProperties.find(pVal) != -1 ||
+		    self.latProperties.find(pVal) != -1 || 
+		    self.keyProperties.find(pVal) != -1) {
+		    continue;
+		}
+		else return false; // got a non-geo-property
+	    }
+	}
+	return true;
+    }
+
+    this.drawReferences = function (item, container) {
+        var p_table = OAT.Dom.create ("table");
+	for (i=0;i<item.back.length;i++) { // include backreferences;
+	    var predC = OAT.Dom.create("tr",{className:"predicate"});
+	    var predT = OAT.Dom.create("td",{className:"pred_title"});
+	    predT.innerHTML = "Referenced by";
+	    var predV = OAT.Dom.create("td",{className:"pred_value"});
+	    var content = self.parent.getContent(item.back[i], "replace");
+	    OAT.Dom.append([predV,content],[predC,predT,predV], [p_table,predC]);
+	}
+	OAT.Dom.append ([container,p_table]);
+    }
+
 //
 // Return marker content for item
 //    
 
-    this.drawAllProps = function (item) {
-	var div = OAT.Dom.create ("div",{className:"all_props_ctr"});
+    this.drawAllProps = function (item, container) {
 	var preds = item.preds;
+        var p_table = OAT.Dom.create ("table");
 	for (var p in preds) {
 	    if (self.markerPredBlacklist.find(parseInt(p)) != -1) continue; // Not all predicates are created equal
 	    var pred = preds[p];
-	    var simple = self.parent.store.getCIRIorSplit(p);
+            var simple;
+
+	    if (self.options.raw_iris)
+              simple = OAT.IRIDB.getIRI (p); 
+            else 
+              simple = self.parent.store.getCIRIorSplit(p);
+
 	    if (pred.length == 1 || self.lookupProperties.find(simple) != -1) {
 		var predC = OAT.Dom.create("tr",{className:"predicate"});
 		var predT = OAT.Dom.create("td",{className:"pred_title"});
 		predT.innerHTML = simple;
 		var predV = OAT.Dom.create("td",{className:"pred_value"});
 		var content = self.parent.getContent(pred[0],"replace");
-		OAT.Dom.append([predV,content],[predC,predT,predV],[div,predC]);
+		OAT.Dom.append([predV,content],[predC,predT,predV],[p_table,predC]);
 	    } /* only interesting data */
 	} /* for all predicates */
-	return div;
+        OAT.Dom.append([container,p_table])
+	return container;
+    }
+
+    this.showMarkerPopup = function () {
+
     }
 
+    this.hideMarkerPopup = function () {
+
+    }
+
+    this.makeAnchor = function (ctr, content, href) {
+	var a = OAT.Dom.create ("a");
+	a.href=href;
+        
+    }
     this.drawMarker = function (item) {
+	if (self.isCoordinateContainer(item))
+	    var s_item = item.back[0];
+	else 
+	    s_item = false;
+
 	var titleH = OAT.Dom.create("h2",{className:"markerTitle"});
 
-	var title = self.parent.getTitle(item);
+	var title = self.parent.getTitle(s_item ? s_item : item);
 	var titleHref='';
+	var popup_ctr;
 
+	if (self.options.supportedMobileDetected && self.options.useMobileOpts) {
+	    var titleA = OAT.Dom.create ("a");
+	    OAT.Dom.attach (titleA,"click",self.showMarkerPopup);
+	}
+	else {
 	if (title.match(/^http/i)) {
-	    self.parent.processLink(titleH,title);
-	    titleH.style.cursor = "pointer";
-	titleH.innerHTML = title;
+	        var titleA = OAT.Dom.create("a",{href:titleHref,target:"_blank"});
+		self.parent.processLink(titleA, title);
+		titleA.innerHTML = title;
+		OAT.Dom.append ([titleH, titleA]);		
 	} else {
-	    var titleHref = self.parent.getURI(item);
+		var titleHref = self.parent.getURI(s_item ? s_item : item);
 	    if (titleHref) {
 		var titleA = OAT.Dom.create("a",{href:titleHref,target:"_blank"});
+		    self.parent.processLink(titleA, titleHref);
 		titleA.innerHTML = title;
 		OAT.Dom.append ([titleH, titleA]);
 	    } else {
@@ -1638,23 +1750,27 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	    }
 	}
 
-	var ctr = OAT.Dom.create("div",{overflow:"auto",className:'marker_ctr'});
-	var abstr = self.getAbstract(item);
+	    var ctr = OAT.Dom.create("div",{className:'marker_ctr'});
+	    var abstr = self.getAbstract(s_item ? s_item : item);
 
 	if (abstr) {
 	var abstrC = OAT.Dom.create("div",{className:'abstract'});
 	    abstrC.innerHTML = abstr;
 	}	
+	}
 	
 	//	if (self.parent.store.itemHasType (item, "")) { }
 	//	if (self.parent.store.itemHasType (item, "")) { }
 
-	var ap = self.drawAllProps (item);
+	var props_ctr = OAT.Dom.create("div", {className: "props_ctr"});
 
 	if (abstr)
-	OAT.Dom.append([ctr,titleH,abstrC,ap]);
+	    OAT.Dom.append([ctr,titleH,abstrC,props_ctr]);
 	else 
-	    OAT.Dom.append([ctr,titleH,ap]);
+	    OAT.Dom.append([ctr,titleH,props_ctr]);
+
+	self.drawAllProps (s_item ? s_item : item, props_ctr);
+	self.drawReferences (s_item ? s_item : item, props_ctr);
 
 	return ctr;
     }
@@ -1744,9 +1860,10 @@ OAT.RDFTabs.map = function(parent,optObj) {
 	function tryList() {
 	    if (!self.pointListLock && self.map_loaded) {
 		if (!self.pointList.length()) {
-		    var note = new OAT.Notify();
+		    var note = new OAT.Notify (false, {notifyType: 2});
 		    var msg = "Current data set contains nothing that could be displayed on the map.";
-		    note.send(msg);
+		    note.send(msg, {timeout: 4000});
+		    OAT.MSG.send (self, "MAP_NOTHING_TO_SHOW", false);
 		}
 		self.map.optimalPosition(self.pointList.makePointsArray(false));
  	    } else {
@@ -1764,7 +1881,8 @@ OAT.RDFTabs.timeline = function(parent,optObj) {
     this.options = {
 	imagePath:OAT.Preferences.imagePath,
 	description:"This module displays all date/time containing resources on an interactive timeline.",
-	desc:"Date/time on timeline"
+	desc:"Date/time on timeline",
+        raw_iris: false
     }
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
@@ -1871,11 +1989,15 @@ OAT.RDFTabs.timeline = function(parent,optObj) {
 	if (!uris.length) {
 	    var note = new OAT.Notify();
 	    var msg = "Current data set contains nothing that could be displayed on the timeline.";
-	    note.send(msg);
+	    note.send(msg, {timeout: 4000});
 	}
     }
 }
 
+//
+// XXX unfinished
+//
+
 OAT.RDFTabs.people = function(parent,optObj) {
     var self = this;
     OAT.RDFTabs.parent(self);
@@ -1883,7 +2005,8 @@ OAT.RDFTabs.people = function(parent,optObj) {
     this.options = {
 	pictSize:150,
 	columns: 2,
-	width: 800
+	width: 800,
+        raw_iris: false
     };
 
     this.personTypes = ["http://xmlns.com/foaf/0.1/Person"];
@@ -1909,8 +2032,10 @@ OAT.RDFTabs.images = function(parent,optObj) {
 	thumbSize:150,
 	size:600,
 	description:"This module displays all images found in filtered data set.",
-	desc:"Images from filtered data set"
+	desc:"Images from filtered data set",
+        raw_iris: false
     }
+
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
     this.elm.style.textAlign = "center";
@@ -2062,7 +2187,7 @@ OAT.RDFTabs.images = function(parent,optObj) {
 		} else {
 		    /* look for predicates that are/contain image links */
 		    for (var j=0;j<pred.length;j++) {
-			if (item.constructor != OAT.RDFAtom ||
+			if (pred[j].constructor != OAT.RDFAtom ||
 			    pred[j].getTag() != OAT.RDFTag.IRI) { continue; }
 			var value = pred[j].getIRI();
 			if (self.parent.getContentType(value) == 3) {
@@ -2107,7 +2232,8 @@ OAT.RDFTabs.tagcloud = function(parent,optObj) {
 
     this.options = {
 	description:"This module displays all links found in filtered data set.",
-	desc:"Links from filtered data set"
+	desc:"Links from filtered data set",
+        raw_iris: false
     }
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
@@ -2198,7 +2324,8 @@ OAT.RDFTabs.fresnel = function(parent, optObj) {
 	defaultURL:"",
 	autoload:false,
 	description:"This module applies Fresnel RDF Vocabularies to all dereferenced data.",
-	desc:"Fresnel RDF Vocabularies to dereferenced data"
+	desc:"Fresnel RDF Vocabularies to dereferenced data",
+        raw_iris: false
     }
     for (var p in optObj) { self.options[p] = optObj[p]; }
 
diff --git a/binsrc/oat/toolkit/rectwin.js b/binsrc/oat/toolkit/rectwin.js
index 8b72284..3203289 100644
--- a/binsrc/oat/toolkit/rectwin.js
+++ b/binsrc/oat/toolkit/rectwin.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rectwin.js,v 1.10.2.4 2010/09/07 21:56:37 source Exp $
+ *  $Id: rectwin.js,v 1.10.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/resize.js b/binsrc/oat/toolkit/resize.js
index 3ac7881..713f481 100644
--- a/binsrc/oat/toolkit/resize.js
+++ b/binsrc/oat/toolkit/resize.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: resize.js,v 1.7.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: resize.js,v 1.7.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/rotator.js b/binsrc/oat/toolkit/rotator.js
index 14431a2..c94dd62 100644
--- a/binsrc/oat/toolkit/rotator.js
+++ b/binsrc/oat/toolkit/rotator.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rotator.js,v 1.7.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: rotator.js,v 1.7.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/roundwin.js b/binsrc/oat/toolkit/roundwin.js
index 9280498..139bfd5 100644
--- a/binsrc/oat/toolkit/roundwin.js
+++ b/binsrc/oat/toolkit/roundwin.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: roundwin.js,v 1.9.2.4 2010/09/07 21:56:37 source Exp $
+ *  $Id: roundwin.js,v 1.9.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/rssreader.js b/binsrc/oat/toolkit/rssreader.js
index 8792a4a..720f419 100644
--- a/binsrc/oat/toolkit/rssreader.js
+++ b/binsrc/oat/toolkit/rssreader.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: rssreader.js,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: rssreader.js,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/schema.js b/binsrc/oat/toolkit/schema.js
index c4df412..ccd9711 100644
--- a/binsrc/oat/toolkit/schema.js
+++ b/binsrc/oat/toolkit/schema.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: schema.js,v 1.7.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: schema.js,v 1.7.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/simplefx.js b/binsrc/oat/toolkit/simplefx.js
index 830c0c2..0089cef 100644
--- a/binsrc/oat/toolkit/simplefx.js
+++ b/binsrc/oat/toolkit/simplefx.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: simplefx.js,v 1.13.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: simplefx.js,v 1.13.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/slidebar.js b/binsrc/oat/toolkit/slidebar.js
index 0275225..61c6173 100644
--- a/binsrc/oat/toolkit/slidebar.js
+++ b/binsrc/oat/toolkit/slidebar.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: slidebar.js,v 1.4.2.5 2010/04/06 16:46:12 source Exp $
+ *  $Id: slidebar.js,v 1.4.2.6 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/slider.js b/binsrc/oat/toolkit/slider.js
index f1c5027..e075f0b 100644
--- a/binsrc/oat/toolkit/slider.js
+++ b/binsrc/oat/toolkit/slider.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: slider.js,v 1.8.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: slider.js,v 1.8.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/soap.js b/binsrc/oat/toolkit/soap.js
index 35fa765..0f27c83 100644
--- a/binsrc/oat/toolkit/soap.js
+++ b/binsrc/oat/toolkit/soap.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: soap.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: soap.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/sparkline.js b/binsrc/oat/toolkit/sparkline.js
index 872c657..e98afaa 100644
--- a/binsrc/oat/toolkit/sparkline.js
+++ b/binsrc/oat/toolkit/sparkline.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: sparkline.js,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: sparkline.js,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/sparql.js b/binsrc/oat/toolkit/sparql.js
index 800f380..93407e3 100644
--- a/binsrc/oat/toolkit/sparql.js
+++ b/binsrc/oat/toolkit/sparql.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: sparql.js,v 1.13.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: sparql.js,v 1.13.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/sqlquery.js b/binsrc/oat/toolkit/sqlquery.js
index 6d83868..5a20a03 100644
--- a/binsrc/oat/toolkit/sqlquery.js
+++ b/binsrc/oat/toolkit/sqlquery.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: sqlquery.js,v 1.7.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: sqlquery.js,v 1.7.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/statistics.js b/binsrc/oat/toolkit/statistics.js
index 6e2b12b..899a070 100644
--- a/binsrc/oat/toolkit/statistics.js
+++ b/binsrc/oat/toolkit/statistics.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: statistics.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: statistics.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/svg.js b/binsrc/oat/toolkit/svg.js
index ca58d06..1a123ab 100644
--- a/binsrc/oat/toolkit/svg.js
+++ b/binsrc/oat/toolkit/svg.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: svg.js,v 1.6.2.2 2010/04/06 16:46:12 source Exp $
+ *  $Id: svg.js,v 1.6.2.3 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/svgsparql.js b/binsrc/oat/toolkit/svgsparql.js
index 2e090d5..dc36468 100644
--- a/binsrc/oat/toolkit/svgsparql.js
+++ b/binsrc/oat/toolkit/svgsparql.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: svgsparql.js,v 1.6.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: svgsparql.js,v 1.6.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/tab.js b/binsrc/oat/toolkit/tab.js
index 9cd2033..2d857a7 100644
--- a/binsrc/oat/toolkit/tab.js
+++ b/binsrc/oat/toolkit/tab.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: tab.js,v 1.12.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: tab.js,v 1.12.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/tagcloud.js b/binsrc/oat/toolkit/tagcloud.js
index 34db665..90d5aee 100644
--- a/binsrc/oat/toolkit/tagcloud.js
+++ b/binsrc/oat/toolkit/tagcloud.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: tagcloud.js,v 1.3.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: tagcloud.js,v 1.3.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/ticker.js b/binsrc/oat/toolkit/ticker.js
index 761c338..63fbe60 100644
--- a/binsrc/oat/toolkit/ticker.js
+++ b/binsrc/oat/toolkit/ticker.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: ticker.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: ticker.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/timeline.js b/binsrc/oat/toolkit/timeline.js
index 294fc99..d376e49 100644
--- a/binsrc/oat/toolkit/timeline.js
+++ b/binsrc/oat/toolkit/timeline.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: timeline.js,v 1.16.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: timeline.js,v 1.16.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/tlscale.js b/binsrc/oat/toolkit/tlscale.js
index 8b32fdf..421cb1d 100644
--- a/binsrc/oat/toolkit/tlscale.js
+++ b/binsrc/oat/toolkit/tlscale.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: tlscale.js,v 1.11.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: tlscale.js,v 1.11.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/toolbar.js b/binsrc/oat/toolkit/toolbar.js
index 16f42e9..da6a35f 100644
--- a/binsrc/oat/toolkit/toolbar.js
+++ b/binsrc/oat/toolkit/toolbar.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: toolbar.js,v 1.8.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: toolbar.js,v 1.8.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/tree.js b/binsrc/oat/toolkit/tree.js
index c4e1e65..5bc751d 100644
--- a/binsrc/oat/toolkit/tree.js
+++ b/binsrc/oat/toolkit/tree.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: tree.js,v 1.19.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: tree.js,v 1.19.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/upload.js b/binsrc/oat/toolkit/upload.js
index fcd0c56..4aceb94 100644
--- a/binsrc/oat/toolkit/upload.js
+++ b/binsrc/oat/toolkit/upload.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: upload.js,v 1.6.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: upload.js,v 1.6.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/validation.js b/binsrc/oat/toolkit/validation.js
index 587dbbd..29e3850 100644
--- a/binsrc/oat/toolkit/validation.js
+++ b/binsrc/oat/toolkit/validation.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: validation.js,v 1.7.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: validation.js,v 1.7.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/webclipbinding.js b/binsrc/oat/toolkit/webclipbinding.js
index 49c6fb5..4de1da1 100644
--- a/binsrc/oat/toolkit/webclipbinding.js
+++ b/binsrc/oat/toolkit/webclipbinding.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: webclipbinding.js,v 1.6.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: webclipbinding.js,v 1.6.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/win.js b/binsrc/oat/toolkit/win.js
index 351b74d..a191c3d 100644
--- a/binsrc/oat/toolkit/win.js
+++ b/binsrc/oat/toolkit/win.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: win.js,v 1.16.2.5 2011/02/16 20:54:22 source Exp $
+ *  $Id: win.js,v 1.16.2.6 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/window.js b/binsrc/oat/toolkit/window.js
index 19c1ac1..25ae376 100644
--- a/binsrc/oat/toolkit/window.js
+++ b/binsrc/oat/toolkit/window.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: window.js,v 1.10.2.4 2010/04/06 16:46:12 source Exp $
+ *  $Id: window.js,v 1.10.2.5 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/ws.js b/binsrc/oat/toolkit/ws.js
index a790aae..3048b76 100644
--- a/binsrc/oat/toolkit/ws.js
+++ b/binsrc/oat/toolkit/ws.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: ws.js,v 1.7.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: ws.js,v 1.7.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/toolkit/xml.js b/binsrc/oat/toolkit/xml.js
index b0a31dc..3d75302 100644
--- a/binsrc/oat/toolkit/xml.js
+++ b/binsrc/oat/toolkit/xml.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: xml.js,v 1.14.2.7 2010/09/07 21:56:37 source Exp $
+ *  $Id: xml.js,v 1.14.2.9 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
@@ -111,7 +111,10 @@ OAT.Xml = {
 	},
 
     serializeXmlDoc:function(xmlDoc) {
-	if (document.implementation && document.implementation.createDocument) {
+	if (window.ActiveXObject) {
+	    var s = xmlDoc.xml;
+	    return s;
+	} else if (document.implementation && document.implementation.createDocument) {
 	    var ser = new XMLSerializer();
 	    try {
 		var s = ser.serializeToString(xmlDoc);
@@ -119,9 +122,6 @@ OAT.Xml = {
 	    } catch (e) {
 		return false;
 	    }
-	} else if (window.ActiveXObject) {
-	    var s = xmlDoc.xml;
-	    return s;
 	} else {
 	    alert("OAT.Xml.serializeXmlDoc:\nNo XML parser available");
 	    return false;
diff --git a/binsrc/oat/toolkit/xmla.js b/binsrc/oat/toolkit/xmla.js
index 774b73e..857cab5 100644
--- a/binsrc/oat/toolkit/xmla.js
+++ b/binsrc/oat/toolkit/xmla.js
@@ -1,9 +1,9 @@
 /*
- *  $Id: xmla.js,v 1.8.2.3 2010/04/06 16:46:12 source Exp $
+ *  $Id: xmla.js,v 1.8.2.4 2012/03/08 12:55:01 source Exp $
  *
  *  This file is part of the OpenLink Software Ajax Toolkit (OAT) project.
  *
- *  Copyright (C) 2005-2010 OpenLink Software
+ *  Copyright (C) 2005-2012 OpenLink Software
  *
  *  See LICENSE file for details.
  */
diff --git a/binsrc/oat/xslt/designview.xsl b/binsrc/oat/xslt/designview.xsl
index ad0cc39..3464496 100644
--- a/binsrc/oat/xslt/designview.xsl
+++ b/binsrc/oat/xslt/designview.xsl
@@ -1,11 +1,11 @@
 <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
 <!--
 
-  $Id: designview.xsl,v 1.6.2.1 2010/04/06 16:46:12 source Exp $
+  $Id: designview.xsl,v 1.6.2.2 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/xslt/formview.xsl b/binsrc/oat/xslt/formview.xsl
index c656033..4735595 100644
--- a/binsrc/oat/xslt/formview.xsl
+++ b/binsrc/oat/xslt/formview.xsl
@@ -1,11 +1,11 @@
 <?xml version="1.0" ?>
 <!--
 
-  $Id: formview.xsl,v 1.9.2.1 2010/04/06 16:46:12 source Exp $
+  $Id: formview.xsl,v 1.9.2.2 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/xslt/grid.xsl b/binsrc/oat/xslt/grid.xsl
index e67e7cf..2dc0eaf 100644
--- a/binsrc/oat/xslt/grid.xsl
+++ b/binsrc/oat/xslt/grid.xsl
@@ -1,11 +1,11 @@
 <?xml version="1.0" ?>
 <!--
 
-  $Id: grid.xsl,v 1.4.2.1 2010/04/06 16:46:12 source Exp $
+  $Id: grid.xsl,v 1.4.2.2 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/xslt/pivotview.xsl b/binsrc/oat/xslt/pivotview.xsl
index 624a161..7ae00a5 100644
--- a/binsrc/oat/xslt/pivotview.xsl
+++ b/binsrc/oat/xslt/pivotview.xsl
@@ -1,11 +1,11 @@
 <?xml version="1.0" ?>
 <!--
 
-  $Id: pivotview.xsl,v 1.5.2.2 2010/04/06 16:46:12 source Exp $
+  $Id: pivotview.xsl,v 1.5.2.3 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/xslt/query.xsl b/binsrc/oat/xslt/query.xsl
index f4077cd..c7de3cf 100644
--- a/binsrc/oat/xslt/query.xsl
+++ b/binsrc/oat/xslt/query.xsl
@@ -1,11 +1,11 @@
 <?xml version="1.0" ?>
 <!--
 
-  $Id: query.xsl,v 1.5.2.3 2010/04/06 16:46:12 source Exp $
+  $Id: query.xsl,v 1.5.2.4 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/xslt/rdfbrowser.xsl b/binsrc/oat/xslt/rdfbrowser.xsl
index bb177a8..f5101d2 100644
--- a/binsrc/oat/xslt/rdfbrowser.xsl
+++ b/binsrc/oat/xslt/rdfbrowser.xsl
@@ -1,11 +1,11 @@
 <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
 <!--
 
-  $Id: rdfbrowser.xsl,v 1.5.2.1 2010/04/06 16:46:12 source Exp $
+  $Id: rdfbrowser.xsl,v 1.5.2.2 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/oat/xslt/tree.xsl b/binsrc/oat/xslt/tree.xsl
index caa14fc..6759942 100644
--- a/binsrc/oat/xslt/tree.xsl
+++ b/binsrc/oat/xslt/tree.xsl
@@ -1,11 +1,11 @@
 <?xml version="1.0" ?>
 <!--
 
-  $Id: tree.xsl,v 1.4.2.1 2010/04/06 16:46:12 source Exp $
+  $Id: tree.xsl,v 1.4.2.2 2012/03/08 12:55:01 source Exp $
 
   This file is part of the OpenLink Ajax Toolkit (OAT) project
 
-  Copyright (C) 2005-2010 OpenLink Software
+  Copyright (C) 2005-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/Makefile.am b/binsrc/rdf_mappers/Makefile.am
index 507e87b..67d2e60 100644
--- a/binsrc/rdf_mappers/Makefile.am
+++ b/binsrc/rdf_mappers/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -68,5 +68,11 @@ EXTRA_DIST = \
 	rdfdesc/statics/*.png \
 	rdfdesc/statics/*.svg \
 	rdfdesc/style/*.css \
+	sponger_front_page/*.js \
+	sponger_front_page/*.vsp \
+	sponger_front_page/skin/i/*.gif \
+	sponger_front_page/skin/i/*.jpg \
+	sponger_front_page/skin/i/*.png \
+	sponger_front_page/skin/ss/*.css \
 	vad_version \
 	xslt/main/*.xsl
diff --git a/binsrc/rdf_mappers/Makefile.in b/binsrc/rdf_mappers/Makefile.in
index 3dd6a93..c308a9f 100644
--- a/binsrc/rdf_mappers/Makefile.in
+++ b/binsrc/rdf_mappers/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -125,6 +125,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -173,6 +174,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -224,6 +226,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -270,7 +273,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -333,6 +335,12 @@ EXTRA_DIST = \
 	rdfdesc/statics/*.png \
 	rdfdesc/statics/*.svg \
 	rdfdesc/style/*.css \
+	sponger_front_page/*.js \
+	sponger_front_page/*.vsp \
+	sponger_front_page/skin/i/*.gif \
+	sponger_front_page/skin/i/*.jpg \
+	sponger_front_page/skin/i/*.png \
+	sponger_front_page/skin/ss/*.css \
 	vad_version \
 	xslt/main/*.xsl
 
diff --git a/binsrc/rdf_mappers/make_vad.sh b/binsrc/rdf_mappers/make_vad.sh
index ac3291a..4e9a962 100755
--- a/binsrc/rdf_mappers/make_vad.sh
+++ b/binsrc/rdf_mappers/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.15.2.13 2011/03/23 12:13:44 source Exp $
+#  $Id: make_vad.sh,v 1.15.2.19 2012/03/14 11:10:16 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -191,6 +191,11 @@ directory_init() {
   mkdir vad/vsp/rdf_mappers/rdfdesc/oat/styles
   mkdir vad/vsp/rdf_mappers/rdfdesc/oat/xslt
 
+  mkdir vad/vsp/rdf_mappers/sponger_front_page
+  mkdir vad/vsp/rdf_mappers/sponger_front_page/skin
+  mkdir vad/vsp/rdf_mappers/sponger_front_page/skin/i
+  mkdir vad/vsp/rdf_mappers/sponger_front_page/skin/ss
+
   for f in `find rdfdesc -type f | grep -v "/CVS/" | grep -v "\.sql"`
   do
      cp $f vad/vsp/rdf_mappers/$f  
@@ -201,6 +206,7 @@ directory_init() {
 
   cp rdf_mappers.sql vad/code/rdf_mappers
   cp rdf_mappers_drop.sql vad/code/rdf_mappers
+  cp sponger_coref_post_process.sql vad/code/rdf_mappers
   cp virt_rdf_label.sql vad/code/rdf_mappers
 
   cp data/*.sql vad/code/rdf_mappers
@@ -210,6 +216,11 @@ directory_init() {
   cp ontologies/xbrl/*.owl vad/vsp/rdf_mappers/ontologies/xbrl/
   cp ontologies/owl/*.owl vad/vsp/rdf_mappers/ontologies/owl/
 
+  cp sponger_front_page/* vad/vsp/rdf_mappers/sponger_front_page/
+
+  cp sponger_front_page/skin/i/* vad/vsp/rdf_mappers/sponger_front_page/skin/i/
+  cp sponger_front_page/skin/ss/* vad/vsp/rdf_mappers/sponger_front_page/skin/ss/
+
   #
   #  GZip the ontologies sources to save space
   #
@@ -226,7 +237,7 @@ directory_init() {
   #
   #  Install minimal OAT toolkit
   #
-  for i in loader.js animation.js slidebar.js resize.js
+  for i in loader.js animation.js slidebar.js resize.js ajax.js json.js
   do
       cp ../oat/toolkit/$i vad/vsp/rdf_mappers/rdfdesc/oat/
   done
@@ -304,7 +315,7 @@ sticker_init() {
   echo "  <name package=\"$VAD_NAME\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"$VAD_DESC\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -322,6 +333,11 @@ sticker_init() {
   echo "         result ('ERROR', 'The $VAD_DESC package requires server version $NEED_VERSION or greater'); " >> $STICKER
   echo "	 signal ('FATAL', 'The $VAD_DESC package requires server version $NEED_VERSION or greater'); " >> $STICKER
   echo "      } " >> $STICKER
+  echo "    if (__proc_exists ('__PROC_PARAMS_NUM', 2) is null) " >> $STICKER
+  echo "      { " >> $STICKER
+  echo "         result ('ERROR', 'The $VAD_DESC package requires new server version'); " >> $STICKER
+  echo "         signal ('FATAL', 'The $VAD_DESC package requires new server version'); " >> $STICKER
+  echo "      } " >> $STICKER
   echo "  ]]></sql>" >> $STICKER
   echo "  <sql purpose=\"post-install\">" >> $STICKER
   echo "	; " >> $STICKER
@@ -340,6 +356,7 @@ fi
   echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/description.sql', 0, 'report', $ISDAV);" >> $STICKER
   echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/yelp_categories.sql', 0, 'report', $ISDAV);" >> $STICKER
   echo "	DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/rdf_mappers.sql', 0, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/sponger_coref_post_process.sql', 0, 'report', $ISDAV);" >> $STICKER
   echo "	DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/oai_servers.sql', 0, 'report', $ISDAV);" >> $STICKER
   echo "    DB.DBA.VAD_LOAD_SQL_FILE('"$BASE_PATH_CODE"$VAD_NAME/iso_country_codes.sql', 0, 'report', $ISDAV);" >> $STICKER
   echo "    DB.DBA.VHOST_REMOVE (lpath=>'/rdfdesc');" >> $STICKER
@@ -361,6 +378,7 @@ fi
   echo "<resources>" >> $STICKER
 
   echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/rdf_mappers.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
+  echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/sponger_coref_post_process.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
   echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/oai_servers.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
   echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/yelp_categories.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
   echo "  <file type=\"$TYPE\" source=\"code\" target_uri=\"$VAD_NAME/iso_country_codes.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>"  >> $STICKER
@@ -395,6 +413,11 @@ fi
       echo "  <file type=\"$TYPE\" source=\"http\" target_uri=\"$VAD_NAME/$name\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> $STICKER
   done
 
+  for file in `find sponger_front_page -type f -print | grep -v CVS | sort`
+  do
+      echo "  <file type=\"$TYPE\" source=\"http\" target_uri=\"$VAD_NAME/$file\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> $STICKER
+  done
+
   echo "</resources>" >> $STICKER
   echo "<registry>" >> $STICKER
   echo "</registry>" >> $STICKER
diff --git a/binsrc/rdf_mappers/ontologies/owl/attribution.owl b/binsrc/rdf_mappers/ontologies/owl/attribution.owl
index e15df52..f54358a 100644
--- a/binsrc/rdf_mappers/ontologies/owl/attribution.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/attribution.owl
@@ -1,5 +1,26 @@
 <?xml version="1.0" ?>
 <!--
+
+  attribution.owl,v 1.1.4.6 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
   The OpenLink Sponger ontology for transformation results attribution.
 -->
 
@@ -31,7 +52,7 @@
 
     <owl:Class rdf:about="&opl;DataSource">
         <rdfs:label>DataSource</rdfs:label>
-        <rdfs:comment>The source ontology used for transformation</rdfs:comment>
+        <rdfs:comment>The data source used for transformation</rdfs:comment>
         <rdfs:isDefinedBy rdf:resource="&opl;"/>
     </owl:Class>
 
@@ -48,7 +69,7 @@
     </owl:Class>
 
     <owl:Property rdf:about="&opl;isDescribedUsing">
-        <rdfs:comment>The source ontology URI whcih is used for transformation</rdfs:comment>
+        <rdfs:comment>The source ontology URI which is used for transformation</rdfs:comment>
         <rdfs:domain rdf:resource="&opl;DataSource"/>
         <rdfs:isDefinedBy rdf:resource="&opl;"/>
         <rdfs:label>Is Described Using</rdfs:label>
@@ -86,4 +107,29 @@
         <rdfs:label>Error Text</rdfs:label>
         <rdfs:range rdf:resource="&xsd;string"/>
     </owl:AnnotationProperty>
+
+    <owl:Property rdf:about="&opl;mentions">
+        <rdfs:comment>A named entity mentioned in the source data</rdfs:comment>
+        <rdfs:domain rdf:resource="&opl;DataSource"/>
+        <rdfs:isDefinedBy rdf:resource="&opl;"/>
+        <rdfs:label>mentions</rdfs:label>
+        <rdfs:range rdf:resource="&opl;NamedEntity"/>
+    </owl:Property>
+
+    <owl:Class rdf:about="&opl;NamedEntity">
+        <rdfs:label>NamedEntity</rdfs:label>
+        <rdfs:comment>A named entity identified by a Sponger NLP cartridge</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="&opl;"/>
+    </owl:Class>
+
+    <owl:Property rdf:about="&opl;entityType">
+        <rdfs:comment>The type or ontological category of a named entity</rdfs:comment>
+        <rdfs:domain rdf:resource="&opl;NamedEntity"/>
+        <rdfs:isDefinedBy rdf:resource="&opl;"/>
+        <rdfs:label>entity type</rdfs:label>
+        <rdfs:range rdf:resource="&owl;Thing"/>
+        <owl:equivalentProperty rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
+    </owl:Property>
+
 </rdf:RDF>
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplamazon.owl b/binsrc/rdf_mappers/ontologies/owl/oplamazon.owl
index 2d78a5b..1ce397e 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplamazon.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplamazon.owl
@@ -1,11 +1,11 @@
 <!--
 
-  $Id: oplamazon.owl,v 1.1.2.4 2010/01/25 15:36:25 source Exp $
+  oplamazon.owl,v 1.1.2.5 2012/03/06 16:48:07 source Exp
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplangel.owl b/binsrc/rdf_mappers/ontologies/owl/oplangel.owl
new file mode 100644
index 0000000..6ab5a21
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplangel.owl
@@ -0,0 +1,244 @@
+<!--
+
+  oplangel.owl,v 1.1.2.2 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+  Generated from oplangel.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+
+  An OpenLink ontology for Angel List (http://angel.co/)
+
+-->
+
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/angel#"
+    xmlns:angel="http://www.openlinksw.com/schemas/angel#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:foaf="http://xmlns.com/foaf/0.1/"
+    xmlns:gn="http://www.geonames.org/ontology#"
+    xmlns:gr="http://purl.org/goodrelations/v1#"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="http://rdfs.org/sioc/ns#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/angel#">
+        <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string">OpenLink Software, http://www.openlinksw.com</dc:creator>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/angel#Agent">
+        <rdfs:comment>An AngelList Entity</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Angel Agent</rdfs:label>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/angel#Location">
+        <rdfs:comment>An Angel-List Entity Location</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Angel Location</rdfs:label>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/angel#Market">
+        <rdfs:comment>An Angel-List Marketplace</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Angel Market</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/angel#Startup">
+        <rdfs:comment>An Angel-List startup (company)</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Startup</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Organization"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/angel#User">
+        <rdfs:comment>An Angel-List user (investor or other)</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Person</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
+    </owl:Class>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#bio">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Biography</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/description"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#company_url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Company URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.openlinksw.com/schemas/angel#url"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#followers">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Followers</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#has_location">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Location</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/angel#Location"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#has_market">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Market</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/angel#Market"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#high_concept">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>High-level Concept</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/description"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#id">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Angel ID</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#image">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Image</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#location_id">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Location"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Location ID</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#location_name">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Location"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Location ID</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.geonames.org/ontology#name"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#location_url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Location"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Location ID</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#logo_url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Logo URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#market_name">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Market"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Market Name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.openlinksw.com/schemas/angel#name"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#market_url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Market"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Market Name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.openlinksw.com/schemas/angel#url"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#name">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Angel Agent Name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
+        <owl:sameAs rdf:resource="http://xmlns.com/foaf/0.1/name"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#product_desc">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Product Description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/description"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#role">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Role</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#status">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Current Status</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#thumb_url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Thumbnail</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Agent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Angel URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
+        <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/homepage"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/angel#video_url">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/angel#Startup"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/angel#"/>
+        <rdfs:label>Corporate Video</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.openlinksw.com/schemas/angel#url"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
+
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplbase.owl b/binsrc/rdf_mappers/ontologies/owl/oplbase.owl
new file mode 100644
index 0000000..e19a05a
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplbase.owl
@@ -0,0 +1,78 @@
+<!--
+
+  oplbase.owl,v 1.1.2.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Generated from oplbase.n3
+
+ An OpenLink base ontology for collecting together similar classes and properties 
+ from other OpenLink ontologies
+
+ See also virt_rdf_label.sql
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/oplbase#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:oplbase="http://www.openlinksw.com/schemas/oplbase#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/oplbase">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2012-02-10</dc:date>
+        <dc:description>An OpenLink base schema for collecting together similar classes and properties from other OpenLink ontologies - see also ruleset virtrdf-label</dc:description>
+        <dc:title>OpenLink base schema</dc:title>
+    </owl:Ontology>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/oplbase#blog_url">
+        <rdfs:comment>A generic blog as a social profile URL. e.g. pointing to Blogger, Blogspot, Wordpress, etc.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/oplbase"/>
+        <rdfs:label>Blog URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.openlinksw.com/schemas/oplbase#social_profile_url"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/oplbase#native_entity_type">
+        <rdfs:comment>An entity type classifier returned by an entity extraction service</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/oplbase"/>
+        <rdfs:label>native entity type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/oplbase#relevance_score">
+        <rdfs:comment>A relevance score returned by an entity extraction service</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/oplbase"/>
+        <rdfs:label>relevance score</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#decimal"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/oplbase#social_profile_url">
+        <rdfs:comment>A generic property for holding a social profile URL. e.g. from Twitter, Facebook, LinkedIn etc.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/oplbase"/>
+        <rdfs:label>social profile url</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
+
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplbestbuy.owl b/binsrc/rdf_mappers/ontologies/owl/oplbestbuy.owl
index ce90257..785fd15 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplbestbuy.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplbestbuy.owl
@@ -1,11 +1,11 @@
 <!--
 
-  $Id: oplbestbuy.owl,v 1.1.2.4 2010/01/25 15:36:25 source Exp $
+  oplbestbuy.owl,v 1.1.2.5 2012/03/06 16:48:07 source Exp
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplcert.owl b/binsrc/rdf_mappers/ontologies/owl/oplcert.owl
new file mode 100644
index 0000000..085680c
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplcert.owl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+
+  oplcert.owl,v 1.1.2.2 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cert="http://www.w3.org/ns/auth/cert#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:wot="http://xmlns.com/wot/0.1/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:opl="http://www.openlinksw.com/schemas/cert#" xmlns:ns="http://purl.org/dc/elements/1.1/">
+	<owl:Ontology rdf:about="http://www.openlinksw.com/schemas/cert#">
+		<ns:creator>OpenLink Software, http://www.openlinksw.com</ns:creator>
+	</owl:Ontology>
+	<owl:Class rdf:about="http://www.openlinksw.com/schemas/cert#Certificate">
+		<rdfs:label>Certificate</rdfs:label>
+		<owl:equivalentClass rdf:resource="http://www.w3.org/ns/auth/cert#X509Certificate" />
+		<owl:equivalentClass rdf:resource="http://xmlns.com/wot/0.1/PubKey" />
+		<rdfs:subClassOf rdf:resource="http://www.w3.org/ns/auth/cert#Certificate" />
+		<rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cert#" />
+	</owl:Class>
+	<rdf:Property rdf:about="http://www.openlinksw.com/schemas/cert#hasCertificate">
+		<rdfs:label>Owns</rdfs:label>
+		<rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Agent" />
+		<rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cert#Certificate" />
+		<rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cert#" />
+	</rdf:Property>
+	<rdf:Property rdf:about="http://www.openlinksw.com/schemas/cert#fingerprint">
+		<rdfs:label>fingerprint</rdfs:label>
+		<rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cert#Certificate" />
+		<rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cert#" />
+		<rdfs:range rdf:resource="http://www.w3.org/ns/auth/cert#hex" />
+	</rdf:Property>
+	<rdf:Property rdf:about="http://www.openlinksw.com/schemas/cert#fingerprint-digest">
+		<rdfs:label>fingerprint digest</rdfs:label>
+		<rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cert#Certificate" />
+		<rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cert#" />
+		<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
+	</rdf:Property>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplcnet.owl b/binsrc/rdf_mappers/ontologies/owl/oplcnet.owl
index 2cdd5d5..9564aae 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplcnet.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplcnet.owl
@@ -1,11 +1,11 @@
 <!--
 
-  $Id: oplcnet.owl,v 1.1.2.4 2010/01/25 15:36:25 source Exp $
+  oplcnet.owl,v 1.1.2.5 2012/03/06 16:48:07 source Exp
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplcrunchbase.owl b/binsrc/rdf_mappers/ontologies/owl/oplcrunchbase.owl
new file mode 100644
index 0000000..330c67e
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplcrunchbase.owl
@@ -0,0 +1,646 @@
+<!--
+
+  oplcrunchbase.owl,v 1.1.2.4 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+  Generated from oplcrunchbase.n3 
+  An OpenLink ontology for Crunchbase 
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/crunchbase#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:oplcb="http://www.openlinksw.com/schemas/crunchbase#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/crunchbase">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2012-02-08</dc:date>
+        <dc:description>OpenLink schema for Crunchbase objects and properties</dc:description>
+        <dc:title>OpenLink schema for Crunchbase</dc:title>
+    </owl:Ontology>
+    
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/crunchbase#Financial-organization">
+        <rdfs:comment>Financial organization</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>Financial organization</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://purl.org/goodrelations/v1#BusinessEntity"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/crunchbase#Company">
+        <rdfs:comment>Company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>Company</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://purl.org/goodrelations/v1#BusinessEntity"/>
+    </owl:Class>
+    
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/crunchbase#Screenshots">
+        <rdfs:comment>Screenshots</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>Screenshots</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Image"/>
+    </owl:Class>
+    
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/crunchbase#Relationships">
+        <rdfs:comment>Relationships</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>Relationships</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:Class>
+
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquired_day">
+        <rdfs:comment>The day of an acquistion</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquired day</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquired_month">
+        <rdfs:comment>The month of an acquisition</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquired month</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquired_year">
+        <rdfs:comment>The year of an acquistion</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquired year</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquiring_company">
+        <rdfs:comment>The company acquiring this one</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquiring company</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquisition">
+        <rdfs:comment>Details of a company acquisition</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquisition</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquisitions">
+        <rdfs:comment>Details of a company acquisition</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquisition</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+    
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#acquisition">
+        <rdfs:comment>Details of a company acquisition</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>acquisition</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#address1">
+        <rdfs:comment>1st line of a company address</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>address1</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#address2">
+        <rdfs:comment>2nd line of a company address</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>address2</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#affiliation_name">
+        <rdfs:comment>A company with which an individual is associated</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>affiliation name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#available_sizes">
+        <rdfs:comment>The available sizes of screenshots</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>available sizes</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#birthplace">
+        <rdfs:comment>A person's birthplace</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>birthplace</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#blog_feed_url">
+        <rdfs:comment>The blog feed of a person known to Crunchbase</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>blog feed url</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#blog_url">
+        <rdfs:comment>The blog of a person known to Crunchbase</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>blog url</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#born_day">
+        <rdfs:comment>The day of the month of a person's DOB</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>born day</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#born_month">
+        <rdfs:comment>The month of a person's DOB</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>born day</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#born_year">
+        <rdfs:comment>The year of a person's DOB</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>born year</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#category_code">
+        <rdfs:comment>A code representing the business category a company operates in</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>category code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#city">
+        <rdfs:comment>City in which a company office is located</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>city</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#company">
+        <rdfs:comment>A company. The focus of an investment, funding round or acquisition.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>company</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#competitor">
+        <rdfs:comment>A company in competition with this one.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>competitor</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#country_code">
+        <rdfs:comment>A country code. e.g. of an office location.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>country code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#created_at">
+        <rdfs:comment>The creation date of a Crunchbase entry</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>created at</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#crunchbase_url">
+        <rdfs:comment></rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>crunchbase url</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#description">
+        <rdfs:comment>A description of a milestone event in a company's history.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#embed_code">
+        <rdfs:comment>An HTML snippet to embed a video about the company.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>embed code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#external_links">
+        <rdfs:comment>An external link class describing links to other sites with resources relating to this company.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>external links</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+    
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#external_link">
+        <rdfs:comment>An external link class describing links to other sites with resources relating to this company.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>external link</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#external_url">
+        <rdfs:comment>A link to another site with resources relating to this company.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>external url</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#financial_org">
+        <rdfs:comment>A financial organization behind an investment</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>financial org</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#firm">
+        <rdfs:comment>A firm with which an individual is or has been related.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>firm</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#founded_day">
+        <rdfs:comment>The day of the month a company was founded</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>founded day</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#founded_month">
+        <rdfs:comment>The month a company was founded</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>founded month</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#founded_year">
+        <rdfs:comment>The year a company was founded</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>founded year</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#funded_day">
+        <rdfs:comment>The day of the month a funding round was received</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>funded day</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#funded_month">
+        <rdfs:comment>The month a funding round was received</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>funded month</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#funded_year">
+        <rdfs:comment>The year a funding round was received</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>funded year</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#funding_round">
+        <rdfs:comment>Details of a funding round</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>funding round</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#funding_rounds">
+        <rdfs:comment>Details of funding rounds</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>funding rounds</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+    
+     <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#funding_round">
+        <rdfs:comment>Details of funding rounds</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>funding round</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#investments">
+        <rdfs:comment>Details of an investment in the company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>investment</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#investment">
+        <rdfs:comment>Details of an investment in the company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>investment</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#ipo">
+        <rdfs:comment>Details of a company's IPO. e.g. Stock symbol, valuation etc.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>ipo</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#is_past">
+        <rdfs:comment>Whether this is a person's current or a previous position</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>is past</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#last_name">
+        <rdfs:comment>A person's last name</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>last name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#milestones">
+        <rdfs:comment>Milestones in a company's history</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>milestones</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#milestone">
+        <rdfs:comment>Milestones in a company's history</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>milestone</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+    
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#number_of_employees">
+        <rdfs:comment>The number of employees in a company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>number of employees</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#offices">
+        <rdfs:comment>Details of a company office</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>offices</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#office">
+        <rdfs:comment>Details of a company office</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>office</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+    
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#permalink">
+        <rdfs:comment>A permalink to a Crunchbase profile of a company or person</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>permalink</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#person">
+        <rdfs:comment>A person known to Crunchbase</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>person</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#phone_number">
+        <rdfs:comment>A company phone number</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>phone number</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#price_amount">
+        <rdfs:comment>The price paid for an acquisition</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>price amount</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#price_currency_code">
+        <rdfs:comment>The currency of price_amount</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>price currency code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#products">
+        <rdfs:comment>Details of one of a company's products</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>products</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#product">
+        <rdfs:comment>Details of one of a company's products</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>product</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+    
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/crunchbase#provider">
+        <rdfs:comment>A legal, PR & marketing firms that provides services to this company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>provider</rdfs:label>
+    </owl:Class>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#providerships">
+        <rdfs:comment>Providers - legal, PR & marketing firms that provide services to this company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>providerships</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#providership">
+        <rdfs:comment>Providers - legal, PR & marketing firms that provide services to this company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>providership</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#raised_amount">
+        <rdfs:comment>The amount raised by a funding round</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>raised amount</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#raised_currency_code">
+        <rdfs:comment>The currency of raised_amount</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>raised currency code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#relationship">
+        <rdfs:comment>Details of a person associated with a company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>relationship</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#round_code">
+        <rdfs:comment>A code describing the type of funding associated with a funding round: angel, seed ...</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>round code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#screenshots">
+        <rdfs:comment>Screenshots linked to a company profile - typically company logos</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>screenshots</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#screenshot">
+        <rdfs:comment>Screenshots linked to a company profile - typically company logos</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>screenshot</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+    
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#source_description">
+        <rdfs:comment>A description of a milestone event in a company's history.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>source description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#source_url">
+        <rdfs:comment>A news source reporting a company milestone or funding round</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>source url</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#state_code">
+        <rdfs:comment>Company address - state code</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>state code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#stock_symbol">
+        <rdfs:comment>Company stock symbol</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>stock symbol</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#stoneable">
+        <rdfs:comment>The Crunchbase entity to which a milestone relates</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>stoneable</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#stoneable_type">
+        <rdfs:comment>The type of Crunchbase entity to which a milestone relates</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>stoneable type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#stoned_day">
+        <rdfs:comment>The day of the month a milestone occurred</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>stoned day</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#stoned_month">
+        <rdfs:comment>The month a milestone occurred</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>stoned month</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#stoned_year">
+        <rdfs:comment>The year a milestone occurred</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>stoned year</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#total_money_raised">
+        <rdfs:comment>Total money raised by a company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>total money raised</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#twitter_username">
+        <rdfs:comment>A company's or individual's Twitter username</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>twitter username</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/twitter#id"/> 
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#updated_at">
+        <rdfs:comment>The date a Crunchbase entry was last updated</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>updated at</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#valuation_currency_code">
+        <rdfs:comment>The currency of a company valuation</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>valuation currency code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#video_embeds">
+        <rdfs:comment>An embedded video about a company or individual</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>video embeds</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#video_embed">
+        <rdfs:comment>An embedded video about a company or individual</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>video embed</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+    </owl:ObjectProperty>
+    
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/crunchbase#zip_code">
+        <rdfs:comment>Company address - zip code</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/crunchbase"/>
+        <rdfs:label>zip code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplcv.owl b/binsrc/rdf_mappers/ontologies/owl/oplcv.owl
new file mode 100644
index 0000000..e709536
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplcv.owl
@@ -0,0 +1,969 @@
+<!--
+
+  oplcv.owl,v 1.1.4.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+  Generated from opllinkedin.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+ 
+  An OpenLink ontology for CVs and resumes
+ 
+  A derivative of the CV ontology of Uldis Bojars
+  See:
+  http://captsolo.net/semweb/resume/0.2/cv.rdf
+  http://captsolo.net/semweb/resume/0.2/base.rdf
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/cv#"
+    xmlns:bibo="http://purl.org/ontology/bibo/"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:foaf="http://xmlns.com/foaf/0.1/"
+    xmlns:gr="http://purl.org/goodrelations/v1#"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/cv">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-07-07</dc:date>
+        <dc:description>OpenLink schema for CVs based on earlier work by Uldis Bojars: http://captsolo.net/semweb/resume/0.2/cv.rdf</dc:description>
+        <dc:title>OpenLink schema for CVs / resumes</dc:title>
+    </owl:Ontology>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#Accomplishments">
+        <rdfs:comment>Additional CV information - accomplishments</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - accomplishments</rdfs:label>
+    </OtherCVInfoType>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#Awards">
+        <rdfs:comment>Additional CV information - awards</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - awards</rdfs:label>
+    </OtherCVInfoType>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#CV">
+        <rdfs:comment>A class representing a Curriculum Vitae</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>CV</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://purl.org/ontology/bibo/Document"/>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#CVCareerLevel">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>CV career level</rdfs:label>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#CVJobMode">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>CV job mode (full/part - time)</rdfs:label>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#CVJobType">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>CV job type (employee/contractor/intern)</rdfs:label>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#CV_Entry">
+        <rdfs:comment>A single entry of CV information. The type of CV information contained in the entry is specified in subclasses/individuals</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>CV_Entry</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Company">
+        <rdfs:comment>A class for company information</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Company</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+        <owl:equivalentClass rdf:resource="http://purl.org/goodrelations/v1#BusinessEntity"/>
+    </rdfs:Class>
+
+    <CVJobType rdf:about="http://www.openlinksw.com/schemas/cv#Contractor">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>contractor</rdfs:label>
+    </CVJobType>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Course">
+        <rdfs:comment>CV entry detailing a course taken</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Course</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <MaritalStatus rdf:about="http://www.openlinksw.com/schemas/cv#Divorced">
+        <rdfs:comment>Marital status - divorced</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>divorced</rdfs:label>
+    </MaritalStatus>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduAssociate">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Associate degree</rdfs:label>
+    </EduDegree>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduBachelor">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Bachelor's degree</rdfs:label>
+    </EduDegree>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduCollegeCoursework">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Some college coursework completed.</rdfs:label>
+    </EduDegree>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#EduDegree">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Degrees</rdfs:label>
+    </rdfs:Class>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduDoctorate">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Doctorate</rdfs:label>
+    </EduDegree>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduHighSchool">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>High school or equivalent.</rdfs:label>
+    </EduDegree>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduMaster">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Master's degree</rdfs:label>
+    </EduDegree>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduProfessional">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Professional</rdfs:label>
+    </EduDegree>
+
+    <EduDegree rdf:about="http://www.openlinksw.com/schemas/cv#EduVocational">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Vocational</rdfs:label>
+    </EduDegree>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Education">
+        <rdfs:comment>CV entry detailing education</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Education</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#EducationalOrg">
+        <rdfs:comment>Educational organization</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>EducationalOrg</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+    </rdfs:Class>
+
+    <CVJobType rdf:about="http://www.openlinksw.com/schemas/cv#Employee">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>employee</rdfs:label>
+    </CVJobType>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#EntryLvl">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Entry level (less than 2 years of experience)</rdfs:label>
+    </CVCareerLevel>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#Executive">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Executive (SVP, EVP, VP)</rdfs:label>
+    </CVCareerLevel>
+
+    <Gender rdf:about="http://www.openlinksw.com/schemas/cv#Female">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Female</rdfs:label>
+    </Gender>
+
+    <CVJobMode rdf:about="http://www.openlinksw.com/schemas/cv#Full-time">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>full-time</rdfs:label>
+    </CVJobMode>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Gender">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Gender</rdfs:label>
+    </rdfs:Class>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#HighSchool">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Student (high school)</rdfs:label>
+    </CVCareerLevel>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#Interests">
+        <rdfs:comment>Additional CV information - interests</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - interests</rdfs:label>
+    </OtherCVInfoType>
+
+    <CVJobType rdf:about="http://www.openlinksw.com/schemas/cv#Intern">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>internship</rdfs:label>
+    </CVJobType>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#LanguageSkill">
+        <rdfs:comment>Language skill (spoken, written, reading)</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>language skill</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#Skill"/>
+    </rdfs:Class>
+
+    <Gender rdf:about="http://www.openlinksw.com/schemas/cv#Male">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Male</rdfs:label>
+    </Gender>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#Management">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Management (manager/director of staff)</rdfs:label>
+    </CVCareerLevel>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#MaritalStatus">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Marital Status</rdfs:label>
+    </rdfs:Class>
+
+    <MaritalStatus rdf:about="http://www.openlinksw.com/schemas/cv#Married">
+        <rdfs:comment>Marital status - married</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>married</rdfs:label>
+    </MaritalStatus>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#Membership">
+        <rdfs:comment>Additional CV information - membership</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - membership</rdfs:label>
+    </OtherCVInfoType>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#MidCareer">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Mid-career (2+ years of experience)</rdfs:label>
+    </CVCareerLevel>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Organization">
+        <rdfs:comment>General class for organizations</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Organization</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+        <rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Organization"/>
+    </rdfs:Class>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#Other">
+        <rdfs:comment>Additional CV information - miscellaneous</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - other</rdfs:label>
+    </OtherCVInfoType>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#OtherCVInfoType">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Type of misc information added to a CV.</rdfs:label>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#OtherInfo">
+        <rdfs:comment>Other information in CV</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other Info</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <CVJobMode rdf:about="http://www.openlinksw.com/schemas/cv#Part-time">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>part-time</rdfs:label>
+    </CVJobMode>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Person">
+        <rdfs:comment>A Person a CV relates to</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Person</rdfs:label>
+        <owl:equivalentClass rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
+    </rdfs:Class>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#PersonalReference">
+        <rdfs:comment>Personal reference</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Personal Reference</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#Reference"/>
+    </rdfs:Class>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#PointOfView">
+        <rdfs:comment>Additional CV information - point of view</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - point of view</rdfs:label>
+    </OtherCVInfoType>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#ProfessionalReference">
+        <rdfs:comment>Professional reference</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Professional Reference</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#Reference"/>
+    </rdfs:Class>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#Publications">
+        <rdfs:comment>Additional CV information - publications</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - publications</rdfs:label>
+    </OtherCVInfoType>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Reference">
+        <rdfs:comment>CV entry for references</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Reference</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#SeniorExecutive">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Senior Executive (president / CEO)</rdfs:label>
+    </CVCareerLevel>
+
+    <MaritalStatus rdf:about="http://www.openlinksw.com/schemas/cv#Single">
+        <rdfs:comment>Marital status - single</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>single</rdfs:label>
+    </MaritalStatus>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Skill">
+        <rdfs:comment>CV entry for description of skills</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Skill</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <OtherCVInfoType rdf:about="http://www.openlinksw.com/schemas/cv#SocialActivities">
+        <rdfs:comment>Additional CV information - social activities</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Other info - social activities</rdfs:label>
+    </OtherCVInfoType>
+
+    <CVCareerLevel rdf:about="http://www.openlinksw.com/schemas/cv#Student">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Student (graduate/undergraduate)</rdfs:label>
+    </CVCareerLevel>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#Target">
+        <rdfs:comment>CV information for target of job application.
+(Single entry per CV. May be defined in the properties of CV class instead).</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Target</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#URL">
+        <rdfs:comment>Company home page</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>home page URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </rdf:Property>
+
+    <MaritalStatus rdf:about="http://www.openlinksw.com/schemas/cv#Widowed">
+        <rdfs:comment>Marital status - widowed</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>widowed</rdfs:label>
+    </MaritalStatus>
+
+    <rdfs:Class rdf:about="http://www.openlinksw.com/schemas/cv#WorkHistory">
+        <rdfs:comment>CV entry for work history</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>Work History</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/cv#CV_Entry"/>
+    </rdfs:Class>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#aboutPerson">
+        <rdfs:comment>The person the CV describes</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>about person</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#birthPlace">
+        <rdfs:comment>Place of birth</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>birth place</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#careerLevel">
+        <rdfs:comment>Career level for the position in company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>career level</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#CVCareerLevel"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#conditionWillRelocate">
+        <rdfs:comment>Is the candidate willing to relocate?</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>willing to relocate</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#conditionWillTravel">
+        <rdfs:comment>Is the candidate willing to travel?</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>willing to travel</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#country">
+        <rdfs:comment>Country where an organization is located</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>country</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#courseDescription">
+        <rdfs:comment>Description of the course / certification</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>course description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#courseFinishDate">
+        <rdfs:comment>Date when course was finished / certification acquired</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>course finish date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#courseStartDate">
+        <rdfs:comment>Start date of the course taken</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>course start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#courseTitle">
+        <rdfs:comment>Title of the course taken or certification acquired</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>course title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#courseURL">
+        <rdfs:comment>Web page of a course taken or certification acquired</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>course URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#cvCopyright">
+        <rdfs:comment>Copyright notice - who owns rights to CV, how may it be used, other legal info.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>cv copyright</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#cvDescription">
+        <rdfs:comment>Text describing what the person wants to accomplish by this CV; what is they are looking for etc</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>cv description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#cvIsActive">
+        <rdfs:comment>If the CV is active and the person is actively looking for job opportunities.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>cvIsActive</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#cvIsConfidential">
+        <rdfs:comment>If the CV is confidential and may be used by receiving party only</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>cv is confidential</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#cvTitle">
+        <rdfs:comment>CV title.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>cvTitle</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#degreeType">
+        <rdfs:comment>Type (title) of the degree</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>degree type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#EduDegree"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#eduDescription">
+        <rdfs:comment>Description of the education info</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>education description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#eduGradDate">
+        <rdfs:comment>Education end date</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>graduation date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#eduMajor">
+        <rdfs:comment>Major speciality graduated in</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>education major</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#eduMinor">
+        <rdfs:comment>Minor specialities graduated in</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>education minor</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#eduStartDate">
+        <rdfs:comment>Education start date</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>education start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#employedIn">
+        <rdfs:comment>The company where the person is/was employed</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>employed in</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Company"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#endDate">
+        <rdfs:comment>End date of employment</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>end date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#gender">
+        <rdfs:comment>The person's gender</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>gender</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Gender"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasCitizenship">
+        <rdfs:comment>Country in which a person has citizenship</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has citizenship</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasCourse">
+        <rdfs:comment>Details of a course attended by the person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has course</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasDriversLicence">
+        <rdfs:comment>Indicates if the person holds a driver's licence (for regular cars)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has drivers licence</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasEducation">
+        <rdfs:comment>Details of a person's education</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has education</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasNationality">
+        <rdfs:comment>The person's nationality.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has nationality</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasOtherInfo">
+        <rdfs:comment>Miscellaneous additional information included in the CV</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has other info</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#OtherInfo"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasReference">
+        <rdfs:comment>A work reference</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has reference</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Reference"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasSkill">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>hasSkill</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Skill"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasTarget">
+        <rdfs:comment>The person's target job</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has target job</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#hasWorkHistory">
+        <rdfs:comment>The person's employment history</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has work history</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#has_CV">
+        <rdfs:comment>A CV of this person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>has CV</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#industry">
+        <rdfs:comment>Industry a company operates in</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Company"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>industry</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#isCertification">
+        <rdfs:comment>Does this course entry include certification?</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>is certification</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#isCurrent">
+        <rdfs:comment>Indicates if the person currently holds this position</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>is current</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#jobDescription">
+        <rdfs:comment>Description of the job in the company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>job description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#jobTitle">
+        <rdfs:comment>Title in the company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>job title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#jobType">
+        <rdfs:comment>Type of the job: employee / contractor / intern</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>job type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#CVJobType"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#lastUpdate">
+        <rdfs:comment>Date when the information in CV was last updated</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#CV"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>last update</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#lngSkillLevelReading">
+        <rdfs:comment>Level of reading skills in a language skill (0..5)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#languageSkill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>language reading level</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#lngSkillLevelWriting">
+        <rdfs:comment>Level of writing skills in a language (0..5)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#languageSkill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>language writing level</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#locality">
+        <rdfs:comment>Region / state of the company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>locality</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#maritalStatus">
+        <rdfs:comment>The person's marital status</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>marital status</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#MaritalStatus"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#noOfChildren">
+        <rdfs:comment>Number of children the person has</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>number of children</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#notes">
+        <rdfs:comment>Notes about an organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>notes</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#numSubordinates">
+        <rdfs:comment>Number of subordinates reporting to the person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>number of subordinates</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#organization_name">
+        <rdfs:comment>Name of an organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>organization name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#organizedBy">
+        <rdfs:comment>Organization that organized courses and/or provided certification</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Course"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>organized by</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Organization"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#otherInfoDescription">
+        <rdfs:comment>Description - content of miscellaneous CV information</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#OtherInfo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>other info description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#otherInfoType">
+        <rdfs:comment>Type of other CV information (interests / awards / accomplishments / point of view / membership / social activities / other)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#OtherInfo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>other info type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#OtherCVInfoType"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#referenceBy">
+        <rdfs:comment>Points to a person who provides the reference</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Reference"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>reference by</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#Person"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#skillLastUsed">
+        <rdfs:comment>Date when skill was last used.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>skill last used</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#skillLevel">
+        <rdfs:comment>Level of accomplishment in the skill (0..5)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>skill level</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#skillName">
+        <rdfs:comment>Name of the skill</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>skill name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#skillYearsExperience">
+        <rdfs:comment>Years of experience in this skill</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>skill years experience</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#startDate">
+        <rdfs:comment>Start date of employment</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#WorkHistory"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#studiedIn">
+        <rdfs:comment>Educational organization where person studied</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>studied in</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#EducationalOrg"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetCareerLevel">
+        <rdfs:comment>Target career level.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target career level</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#CVCareerLevel"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetCompanyDescription">
+        <rdfs:comment>Description on the company where the candidate would like to work</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target company description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetCompanyIndustry">
+        <rdfs:comment>Industry of the company where the candidate would like to work</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target company industry</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetCompanySize">
+        <rdfs:comment>Size of the target company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target company size</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetCountry">
+        <rdfs:comment>Country where job applicant would like to work</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target country</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetJobDescription">
+        <rdfs:comment>Description of the job applicant is seeking</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target job description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetJobMode">
+        <rdfs:comment>Job mode: full-time / part-time</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target job mode</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#CVJobMode"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetJobType">
+        <rdfs:comment>Target job type</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target job type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/cv#CVJobType"/>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetSalary">
+        <rdfs:comment>Target salary</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target salary</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+        <owl:maxCardinality>1</owl:maxCardinality>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#targetSalaryCurrency">
+        <rdfs:comment>Currency for target salary.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>target salary currency</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <owl:maxCardinality>1</owl:maxCardinality>
+    </rdf:Property>
+
+    <rdf:Property rdf:about="http://www.openlinksw.com/schemas/cv#weeksNoticePeriod">
+        <rdfs:comment>Notice period (weeks) required before starting new position.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/cv#Target"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/cv"/>
+        <rdfs:label>notice period (weeks)</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </rdf:Property>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/opldbps.owl b/binsrc/rdf_mappers/ontologies/owl/opldbps.owl
new file mode 100644
index 0000000..5390ef9
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/opldbps.owl
@@ -0,0 +1,73 @@
+<!--
+
+  opldbps.owl,v 1.1.2.2 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+  Generated from opldbps.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+
+  An OpenLink ontology for DBPedia Spotlight results
+ 
+--> 
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/dbpedia-spotlight#"
+    xmlns:dbps="http://www.openlinksw.com/schemas/dbpedia-spotlight#"
+    xmlns:gr="http://purl.org/goodrelations/v1#"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="http://rdfs.org/sioc/ns#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/dbpedia-spotlight#">
+        <creator xmlns="http://purl.org/dc/elements/1.1/"
+            rdf:datatype="http://www.w3.org/2001/XMLSchema#string">OpenLink Software, http://www.openlinksw.com</creator>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/dbpedia-spotlight#AnyURI">
+        <rdfs:comment>A resource URI generated by DBPedia Spotlight</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Resource URI</rdfs:label>
+    </owl:Class>
+
+    <owl:DatatypeProprty rdf:about="http://www.openlinksw.com/schemas/dbpedia-spotlight#link">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schema/attribution#NamedEntity"/>
+        <rdfs:equivalentProperty rdf:resource="http://rdfs.org/sioc/ns#link"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>DBPedia resource link</rdfs:label>
+    </owl:DatatypeProprty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/dbpedia-spotlight#percentageOfSecondRank">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#AnyURI"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Percentage of Second Rank</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/dbpedia-spotlight#similarityScore">
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#AnyURI"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/dbpedia-spotlight#"/>
+        <rdfs:label>Similarity Score</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
+
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplebay.owl b/binsrc/rdf_mappers/ontologies/owl/oplebay.owl
index 3309ecf..5382d90 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplebay.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplebay.owl
@@ -1,11 +1,11 @@
 <!--
 
-  $Id: oplebay.owl,v 1.1.2.4 2010/01/25 15:36:25 source Exp $
+  oplebay.owl,v 1.1.2.5 2012/03/06 16:48:07 source Exp
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplevri.owl b/binsrc/rdf_mappers/ontologies/owl/oplevri.owl
index fe9f244..92a99a4 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplevri.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplevri.owl
@@ -1,4 +1,26 @@
 <!--
+
+  oplevri.owl,v 1.1.4.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
   Generated from oplbestbuy.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
  
   An OpenLink ontology for specializing the ProductOrService class of the GoodRelations ontology
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplgooglebase.owl b/binsrc/rdf_mappers/ontologies/owl/oplgooglebase.owl
index d6ccdbd..f1f7b71 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplgooglebase.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplgooglebase.owl
@@ -1,11 +1,11 @@
 <!--
 
-  $Id: oplgooglebase.owl,v 1.1.2.3 2010/01/28 00:28:52 source Exp $
+  oplgooglebase.owl,v 1.1.2.4 2012/03/06 16:48:07 source Exp
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplgoogleplus.owl b/binsrc/rdf_mappers/ontologies/owl/oplgoogleplus.owl
new file mode 100644
index 0000000..a310898
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplgoogleplus.owl
@@ -0,0 +1,983 @@
+ 
+<!-- Processed by Id: cwm.py,v 1.197 2007/12/13 15:38:39 syosi Exp -->
+<!--     using base file:///Users/rtsekova/dev/oplsrc/cartridges/google+/oplgoogleplus.n3-->
+
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/googleplus#"
+    xmlns:bibo="http://purl.org/ontology/bibo/"
+    xmlns:dbpedia="http://dbpedia.org/ontology/"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:event="http://purl.org/NET/c4dm/event.owl#"
+    xmlns:foaf="http://xmlns.com/foaf/0.1/"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:oplgp="http://www.openlinksw.com/schemas/googleplus#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="http://rdfs.org/sioc/ns#"
+    xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/googleplus">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-09-26</dc:date>
+        <dc:description>OpenLink schema for Google+ objects and properties</dc:description>
+        <dc:title>OpenLink schema for Google+</dc:title>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Access">
+        <rdfs:comment>Identifies who has access to see a Google+ Activity</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Access</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#AccessItem">
+        <rdfs:comment>An access entry</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>AccessItem</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Activity">
+        <rdfs:comment>A Google+ activity</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Activity</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#ActivityObject">
+        <rdfs:comment>The object of an activity</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>ActivityObject</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Actor">
+        <rdfs:comment>The person who performed a Google+ Activity</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Actor</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Attachment">
+        <rdfs:comment>A media object attached to an Activity</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Attachment</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Comment">
+        <rdfs:comment>A Google+ comment</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Comment</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Email">
+        <rdfs:comment>An email address of a Google+ user</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Email</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#EmbeddableLink">
+        <rdfs:comment>An embeddable link to a attached video</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>EmbeddableLink</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#FullImage">
+        <rdfs:comment>A full image photo attachment</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>FullImage</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#InReplyTo">
+        <rdfs:comment>A description of the Activity a Comment replied to</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>InReplyTo</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Name">
+        <rdfs:comment>An object representing the individual components of a person's name</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Name</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Object">
+        <rdfs:comment>A base class representing all Google+ objects</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Google+ object</rdfs:label>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Organization">
+        <rdfs:comment>An organization with which a Google+ user is or has been associated</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Organization</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Person">
+        <rdfs:comment>A Google+ user</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Person</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#PlaceLived">
+        <rdfs:comment>A place where a Google+ user has lived</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>PlaceLived</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#PreviewImage">
+        <rdfs:comment>A preview image for a photo or video attachment</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>PreviewImage</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/googleplus#Url">
+        <rdfs:comment>A URL for a Google+ user</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>Url</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+    </owl:Class>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#aboutMe">
+        <rdfs:comment>A short biography for this person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>about me</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#access">
+        <rdfs:comment>Identifies who has access to see an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>access</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Access"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#access_description">
+        <rdfs:comment>Description of the access granted, suitable for display</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Access"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>access description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#access_item">
+        <rdfs:comment>An access entry</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Access"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>access item</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#AccessItem"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#access_item_type">
+        <rdfs:comment>The type of entry describing to whom access is granted</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Access"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>access item type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#access_kind">
+        <rdfs:comment>Access kind</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Access"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>access kind</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#activity_object">
+        <rdfs:comment>The object of an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>activity object</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#activity_object_type">
+        <rdfs:comment>The type of the activity object. e.g.
+	'note' - Textual content.
+	'activity' - A Google+ activity.
+	</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>activity object type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#activity_replied_to_id">
+        <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
+        <rdfs:comment>ID of the Activity replied to</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#InReplyTo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>id of activity replied to</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#activity_title">
+        <rdfs:comment>The title of an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>activity title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#activity_url">
+        <rdfs:comment>The URL associated with the activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>activity URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#actor">
+        <rdfs:comment>The person who performed this activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>actor</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Actor"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#actor_displayName">
+        <rdfs:comment>The name of the actor, suitable for display</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Actor"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>actor display name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#actor_profile_image">
+        <rdfs:comment>The URL of an actor's profile photo</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Actor"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>actor profile image</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#actor_profile_url">
+        <rdfs:comment>The URL of an actor's Google+ profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Actor"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>actor profile URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#address">
+        <rdfs:comment>Street address where this activity occurred</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>address</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#annotation">
+        <rdfs:comment>Additional content added by the person who shared this activity, applicable only when resharing an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>annotation</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#associatedWith">
+        <rdfs:comment>An organization with which this person is or has been associated</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>associated with</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#attachment">
+        <rdfs:comment>A media object attached to an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>attachment</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#attachment_displayName">
+        <rdfs:comment>The title of the attachment (such as a photo caption or an article title)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>attachment display name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#attachment_media_type">
+        <rdfs:comment>The type of media object. e.g. 'photo', 'video', 'article'</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>attachment media type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#attachment_url">
+        <rdfs:comment>URL of the attachment</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>attachment URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#comment_actor">
+        <rdfs:comment>The person who posted this comment</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>comment actor</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Actor"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#comment_content">
+        <rdfs:comment>The content of a comment</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>comment content</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#comment_self_link">
+        <rdfs:comment>Link to a Comment resource</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>comment self link</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#comment_verb">
+        <rdfs:comment>An comment's verb, indicating what action was performed e.g.
+	'post' - Publish content to the stream.
+	</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>comment verb</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#content">
+        <rdfs:comment>If the attachment is an article, this property contains a snippet of text from the article</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>content</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#crosspostSource">
+        <rdfs:comment>If this activity is a crosspost from another system, this property specifies the ID of the original activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>crosspost source</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#currentLocation">
+        <rdfs:comment>The current location for this person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>current location</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#date_of_birth">
+        <rdfs:comment>The person's date of birth</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>birthday</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#department">
+        <rdfs:comment>The department within the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>department</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#displayName">
+        <rdfs:comment>The name of this person, suitable for display</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>display name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#email">
+        <rdfs:comment>An email address of a Google+ user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>email</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Email"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#email_type">
+        <rdfs:comment>The type of email address. Possible values are:
+        'home' - Home email address
+        'work' - Work email address
+        'other' - Other
+        </rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Email"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>email address type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#email_value">
+        <rdfs:comment>The actual email address</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Email"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>email value</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#embed">
+        <rdfs:comment>If the attachment is a video, the embeddable link</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>embeddable link</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#EmbeddableLink"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#embed_media_type">
+        <rdfs:comment>Media type of the link</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#EmbeddableLink"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>embed media type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#embed_url">
+        <rdfs:comment>URL of embeddable link</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#EmbeddableLink"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>embed URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#endDate">
+        <rdfs:comment>The date the person left the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>end date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#familyName">
+        <rdfs:comment>The family name (last name0 of a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>family name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#formatted">
+        <rdfs:comment>The full name of a person, including middle names, suffixes etc.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>formatted</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#fullImage">
+        <rdfs:comment>The full image for photo attachments</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>full image</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#FullImage"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#full_image_height">
+        <rdfs:comment>The height, in pixels, of the linked image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#FullImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>full image height</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#full_image_media_type">
+        <rdfs:comment>Media type of the image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#FullImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>full image media type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#full_image_url">
+        <rdfs:comment>URL of the linked image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#FullImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>full image URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#full_image_width">
+        <rdfs:comment>The width, in pixels, of the linked image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#FullImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>full image width</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#gender">
+        <rdfs:comment>The person's gender. Possible values are: 'male', 'female', 'other'</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>gender</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#geocode">
+        <rdfs:comment>Latitude and longitude where an activity occurred. Format is latitude followed by longitude, space separated</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>geocode</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#givenName">
+        <rdfs:comment>The given name (first name) of a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>given name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#hasApp">
+        <rdfs:comment>If true, indicates that the person has installed the app
+        that is making the request and has chosen to expose this install state
+        to the caller. A value of false indicates that the install state
+        cannot be determined (it is either not installed or the person has
+        chosen to keep this information private).
+        </rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>has app</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#has_comment">
+        <rdfs:comment>A comment in reply to an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>has comment</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#honorificPrefix">
+        <rdfs:comment>The honorific prefix (such as 'Dr' or 'Mrs') for a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>honorific prefix</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#honorificSuffix">
+        <rdfs:comment>The honorific suffix (such as 'Jr') for a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>honorific suffix</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#html_content">
+        <rdfs:comment>The HTML-formatted content, suitable for display</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>html content</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#id">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty" />
+        <rdfs:comment>A Google+ Person, Activity, AccessItem, ActivityObject, Actor, Attachment or Comment ID</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#in_reply_to">
+        <rdfs:comment>The Activity to which a reply applies</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>is reply to activity</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#in_reply_to_object">
+        <rdfs:comment>An object describing the activity this comment replied to</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Comment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>inReplyTo object</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#InReplyTo"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#in_reply_to_url">
+        <rdfs:comment>URL of the Activity to which a reply applies</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#InReplyTo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>is reply to activity with URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#location">
+        <rdfs:comment>The location of the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>location</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#middleName">
+        <rdfs:comment>The middle name of a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>middle name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#name">
+        <rdfs:comment>An object representing the individual components of a person's name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Name"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#nickname">
+        <rdfs:comment>The nickname of a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>nickname</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#object_actor">
+        <rdfs:comment>If an activity's object is itself another activity (for example, when a person reshares an activity), 
+	this property specifies the original activity's actor.
+	</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>object actor</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Actor"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#object_url">
+        <rdfs:comment>The URL associated with the activity object</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>activity object URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#organization_name">
+        <rdfs:comment>The name of the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>organization name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#organization_type">
+        <rdfs:comment>The type of organization, e.g. 'job', 'school'</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>organization type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#originalContent">
+        <rdfs:comment>The content (text) as provided by the author, stored without any HTML formatting</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>original content</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#performed_activity">
+        <rdfs:comment>A Google+ activity in the user's activities collection</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>performed activity</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#placeId">
+        <rdfs:comment>ID of the place where an activity occurred</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>placeID</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#placeLived">
+        <rdfs:comment>A place where a person has lived</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>place lived</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#PlaceLived"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#placeName">
+        <rdfs:comment>Name of the place where an activity occurred</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>place name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#plusoners_total">
+        <rdfs:comment>Total number of people who +1'd this activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>plusoners total</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#previewImage">
+        <rdfs:comment>The preview image for photos or videos</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Attachment"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>preview image</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/googleplus#PreviewImage"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#preview_image_height">
+        <rdfs:comment>The height, in pixels, of the linked image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#PreviewImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>preview image height</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#preview_image_media_type">
+        <rdfs:comment>Media type of the image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#PreviewImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>preview image media type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#preview_image_url">
+        <rdfs:comment>URL of the linked image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#PreviewImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>preview image URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#preview_image_width">
+        <rdfs:comment>The width, in pixels, of the linked image</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#PreviewImage"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>preview image width</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#primary_email">
+        <rdfs:comment>If true, indicates this email address is the person's primary one</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Email"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>primary email</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#primary_organization">
+        <rdfs:comment>If true, indicates this organization is the person's 
+        primary one (typically indicated as current one).
+        </rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>primary organization</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#primary_residence">
+        <rdfs:comment>If true, this place of residence is a person's primary residence</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#PlaceLived"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>primary residence</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#primary_url">
+        <rdfs:comment>If true, this URL is a person's primary URL</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Url"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>primary URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#profile_image">
+        <rdfs:comment>The URL of an person's profile photo</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>profile image</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#profile_url">
+        <rdfs:comment>The URL of a person's Google+ profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>profile URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#providerTitle">
+        <rdfs:comment>Name of the service provider that initially published an activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>provider title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#published">
+        <rdfs:comment>The time at which an activity or comment was initially published</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>published</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#radius">
+        <rdfs:comment>Radius, in metres, of the region where this activity occurred, centered at the latitude and 
+	longitude identified by geocode
+	</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>radius</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#relationshipStatus">
+        <rdfs:comment>The person's relationship status</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>relationship status</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#replies_total">
+        <rdfs:comment>Total number of comments on this activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>replies total</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#resharers_total">
+        <rdfs:comment>Total number of people who reshared this activity</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#ActivityObject"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>resharers total</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#residence_location">
+        <rdfs:comment>A place where a person has lived</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#PlaceLived"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>residence location</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#role">
+        <rdfs:comment>A short description of the person's role in the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#shared_url">
+        <rdfs:comment>A URL associated with and shared via a person's Google+ profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>shared URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#speaksLanguage">
+        <rdfs:comment>A language spoken by this person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>speaks language</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#startDate">
+        <rdfs:comment>The date the person joined the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#tagline">
+        <rdfs:comment>The brief description (tagline) of a person</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>tagline</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#title">
+        <rdfs:comment>The person's job title or role within the organization</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Organization"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#updated">
+        <rdfs:comment>The time at which an activity or comment was last updated</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>updated</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#url_type">
+        <rdfs:comment>The type of this Google+ profile URL -
+        'home', 'work', 'blog', 'profile', 'other'
+        </rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Url"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>URL type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#url_value">
+        <rdfs:comment>The URL value</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Url"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>URL value</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/googleplus#verb">
+        <rdfs:comment>An activity's verb, indicating what action was performed e.g.
+	'post' - Publish content to the stream.
+	'checkin' - Check in to a location.
+	'share' - Re-share an activity.
+	</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/googleplus#Activity"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/googleplus"/>
+        <rdfs:label>verb</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
+
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplklout.owl b/binsrc/rdf_mappers/ontologies/owl/oplklout.owl
new file mode 100644
index 0000000..466ae23
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplklout.owl
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+<!--
+
+  oplklout.owl,v 1.1.2.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+  Generated from oplklout.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+ 
+  An OpenLink ontology for Klout 
+ 
+  See: 
+  http://developer.klout.com/iodocs (Klout API resources)
+-->
+
+<rdf:RDF
+    xmlns="http://www.openlinksw.com/schemas/klout#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:foaf="http://xmlns.com/foaf/0.1/"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:oplklout="http://www.openlinksw.com/schemas/klout#"
+    xmlns:opltw="http://www.openlinksw.com/schemas/twitter#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioct="http://rdfs.org/sioc/types#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/klout">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-07-22</dc:date>
+        <dc:description>OpenLink schema for Klout objects and properties</dc:description>
+        <dc:title>OpenLink schema for Klout</dc:title>
+    </owl:Ontology>
+
+  <owl:Class rdf:about="http://www.openlinksw.com/schemas/klout#User">
+    <rdfs:comment>A Klout (twitter) user</rdfs:comment>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>Klout user</rdfs:label>
+    <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+  </owl:Class>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#amplification">
+    <rdfs:comment>Klout Amplification</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>Amplification</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#class">
+    <rdfs:comment>Klout user class</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>Klout</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#delta1d">
+    <rdfs:comment>Klout score 1-day change</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>delta-1d</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#delta5d">
+    <rdfs:comment>Klout score 5-day change</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>delta-5d</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#description">
+    <rdfs:comment>Klout's description of a user</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>Description</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+  </owl:DatatypeProperty>
+  
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#has_klout">
+        <rdfs:comment>A user's Klout score</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+        <rdfs:label>Klout</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+    </owl:DatatypeProperty>
+
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#influenced_by">
+    <rdfs:comment>Klout users who influence the current user</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>InfluencedBy</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#influences">
+    <rdfs:comment>Other Klout users influenced by the current user</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>Influences</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#netscore">
+    <rdfs:comment>A Klout user's Network score</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>Netscore</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#score_slope">
+    <rdfs:comment>A user's Klout score-slope</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>ScoreSlope</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#topic">
+    <rdfs:comment>Topic about which a Klout user posts</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>KloutTopic</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/topic_interest"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#true_reach">
+    <rdfs:comment>Measure of a user's Klout True Reach</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>TrueReach</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
+  </owl:DatatypeProperty>
+  
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/klout#twitterProfileURI">
+    <rdfs:comment>Klout user's equivalent Twitter profile URI</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/klout#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/klout"/>
+    <rdfs:label>TwitterProfile</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/homepage"/>
+  </owl:DatatypeProperty>
+  
+</rdf:RDF>
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/opllinkedin.owl b/binsrc/rdf_mappers/ontologies/owl/opllinkedin.owl
new file mode 100644
index 0000000..3f81d3e
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/opllinkedin.owl
@@ -0,0 +1,870 @@
+<!--
+
+  opllinkedin.owl,v 1.1.4.6 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+  Generated from opllinkedin.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+
+  An OpenLink ontology for LinkedIn
+
+  See: 
+    http://developer.linkedin.com/docs/DOC-1258 (LinkedIn API Resource Map)
+    http://developer.linkedin.com/docs/DOC-1061 (Profile Fields)
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/linkedin#"
+    xmlns:bibo="http://purl.org/ontology/bibo/"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:foaf="http://xmlns.com/foaf/0.1/"
+    xmlns:gr="http://purl.org/goodrelations/v1#"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:oplli="http://www.openlinksw.com/schemas/linkedin#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:umbelrc="http://umbel.org/umbel/rc/"
+    xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/linkedin">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-06-15</dc:date>
+        <dc:description>OpenLink schema for LinkedIn objects and properties</dc:description>
+        <dc:title>OpenLink schema for LinkedIn</dc:title>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Certification">
+        <rdfs:comment>A certification held by a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Certification</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Company">
+        <rdfs:comment>A brief LinkedIn description of a company</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Company</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Education">
+        <rdfs:comment>An education course undertaken by a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Education</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#InstantMessagingAccount">
+        <rdfs:comment>An instant messaging account belonging to a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Instant messaging account</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Language">
+        <rdfs:comment>A language spoken by a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Language</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#MemberURLResource">
+        <rdfs:comment>A URL a member has chosen to share in their LinkedIn profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Member URL resource</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Object">
+        <rdfs:comment>A base class representing all LinkedIn objects</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>LinkedIn object</rdfs:label>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Patent">
+        <rdfs:comment>A patent authored by a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Patent</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Person">
+        <rdfs:comment>A LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Person</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#PhoneNumber">
+        <rdfs:comment>A phone number belonging to a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Phone number</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Position">
+        <rdfs:comment>A position held by a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Position</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Publication">
+        <rdfs:comment>A publication authored by a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Publication</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Recommendation">
+        <rdfs:comment>A recommendation of one LinkedIn member by another</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Recommendation</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#Skill">
+        <rdfs:comment>A particular skill of a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Skill</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/linkedin#TwitterAccount">
+        <rdfs:comment>A Twitter account belonging to a LinkedIn member</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Twitter account</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+    </owl:Class>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#associations">
+        <rdfs:comment>A list of the associations a member has</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>associations</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#author_id">
+        <rdfs:comment>The LinkedIn ID of an author of a publication</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>author id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#author_name">
+        <rdfs:comment>The name of an author of a publication</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>author id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#author_person">
+        <rdfs:comment>The LinkedIn member name of an author of a publication</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>author LinkedIn name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#certification">
+        <rdfs:comment>A certification held by a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>certification</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Certification"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#certification_authority">
+        <rdfs:comment>The name of a certification's issuing body</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Certification"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>certification authority</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#certification_end_date">
+        <rdfs:comment>The certification end date</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Certification"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>end date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#certification_name">
+        <rdfs:comment>The name of a certification</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Certification"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>certification name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#certification_number">
+        <rdfs:comment>The licence number for a certification</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Certification"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>certification number</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#certification_start_date">
+        <rdfs:comment>The certification start date</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Certification"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#company">
+        <rdfs:comment>The company the member works for</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>company</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Company"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#company_industry">
+        <rdfs:comment>The industry in which the company operates</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Company"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>industry</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#company_name">
+        <rdfs:comment>The name of a company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Company"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>company name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#company_size">
+        <rdfs:comment>Number of employees at the company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Company"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>company size</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#company_type">
+        <rdfs:comment>Indicates if the company is public or private</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Company"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>company type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#connection">
+        <rdfs:comment>A LinkedIn member connected to the current member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>connection</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#country_code">
+        <rdfs:comment>Country code for the LinkedIn member (ISO 3166-1 alpha-2 standard)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>country code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#date_of_birth">
+        <rdfs:comment>A member's date of birth</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>date of birth</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#distance">
+        <rdfs:comment>The degree of separation of this member from the member who fetched the profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>distance</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#education">
+        <rdfs:comment>A course of education followed by a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>education</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#education_activities">
+        <rdfs:comment>The activities the member was involved in while a student at this institution</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>activities</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#education_degree">
+        <rdfs:comment>The degree received at this institution</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>degree</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#education_end_date">
+        <rdfs:comment>End date at the school</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>end date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#education_notes">
+        <rdfs:comment>Additional details about the member's studies</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>notes</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#education_start_date">
+        <rdfs:comment>Start date at the school</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#end_date">
+        <rdfs:comment>Date when a member left a position</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>end date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#field_of_study">
+        <rdfs:comment>The field of study at the school</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>field of study</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#first_name">
+        <rdfs:comment>A member's first name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>first name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#has_im_account">
+        <rdfs:comment>An instant messaging account belonging to a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>has IM account</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#InstantMessagingAccount"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#has_phone_number">
+        <rdfs:comment>A member's phone number</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>has phone number</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#PhoneNumber"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#has_twitter_account">
+        <rdfs:comment>A Twitter account belonging to a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>has Twitter account</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#TwitterAccount"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#headline">
+        <rdfs:comment>A member's headline (often their job title)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>headline</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#honors">
+        <rdfs:comment>A list of any honors a member may have</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>honors</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#id">
+        <rdfs:comment>A LinkedIn object ID</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#im_account_name">
+        <rdfs:comment>The name of an instant messaging account</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#InstantMessagingAccount"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>IM account name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#im_account_type">
+        <rdfs:comment>The type of an instant messaging account (msn, yahoo, skype etc)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#InstantMessagingAccount"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>IM account type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#industry">
+        <rdfs:comment>The industry the LinkedIn member has indicated their profile belongs to</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>industry</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#interests">
+        <rdfs:comment>A description of the member's interests</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>interests</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#inventor_id">
+        <rdfs:comment>The ID of an inventor associated with this patent</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>inventor id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#inventor_person">
+        <rdfs:comment>The LinkedIn profile of an inventor associated with this patent</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>inventor</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#is_current">
+        <rdfs:comment>Indicates when a member currently holds this position</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>is current</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#language">
+        <rdfs:comment>A language spoken by a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>language</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Language"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#language_name">
+        <rdfs:comment>The name of a language spoken by a LinkedIn member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Language"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>language name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#language_proficiency">
+        <rdfs:comment>An indication of a LinkedIn member's fluency in a language</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Language"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>proficiency</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#last_name">
+        <rdfs:comment>A member's last name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>last name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#location_name">
+        <rdfs:comment>Generic name of the location of the LinkedIn member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>location name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#main_address">
+        <rdfs:comment>A member's main address (could be home or work etc.)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>main address</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#member_shared_resource_name">
+        <rdfs:comment>Label given to a shared resource URL by the member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#MemberURLResource"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Shared resource name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#member_shared_resource_url">
+        <rdfs:comment>URL of resource being shared by a LinkedIn member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#MemberURLResource"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>Shared resource URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#member_url_resource">
+        <rdfs:comment>A URL a member has chosen to share in their LinkedIn profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>shared URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#MemberURLResource"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#num_connections">
+        <rdfs:comment>Number of connections the member has</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>num_connections</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#num_recommenders">
+        <rdfs:comment>Number of recommendations a member has</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>num_recommenders</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent">
+        <rdfs:comment>A patent authored by a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_date">
+        <rdfs:comment>Date when the patent application was filed or the patent was granted</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_number">
+        <rdfs:comment>Patent or application number</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent number</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_office">
+        <rdfs:comment>The patent issuing body</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent office</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_status">
+        <rdfs:comment>A string ('Application' or 'Patent') indicating whether this is a granted patent or a patent application</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent status</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_status_id">
+        <rdfs:comment>An ID indicating whether this is a granted patent(1) or a patent application(0)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent status id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_summary">
+        <rdfs:comment>The short summary of a patent</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>summary</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_title">
+        <rdfs:comment>The patent title</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#patent_url">
+        <rdfs:comment>URL to the patent</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Patent"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>patent URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#phone_number">
+        <rdfs:comment>Phone number</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#PhoneNumber"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>phone number</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#phone_number_type">
+        <rdfs:comment>Phone number type (home, work, mobile)</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#PhoneNumber"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>phone number type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#picture_url">
+        <rdfs:comment>URL of a member's photograph displayed in their LinkedIn profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>profile picture URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#position">
+        <rdfs:comment>A position the member holds or has had</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>position</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#position_summary">
+        <rdfs:comment>A summary of the member's position</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>position summary</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#proposal_comments">
+        <rdfs:comment>A member's description of how they approach proposals</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>proposal comments</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#provider_account_id">
+        <rdfs:comment>Twitter account provider id</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#TwitterAccount"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>provider account id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#provider_account_name">
+        <rdfs:comment>Twitter account provider name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#TwitterAccount"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>provider account name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#public_profile_url">
+        <rdfs:comment>URL to a LinkedIn member's public profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>LinkedIn profile URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#publication">
+        <rdfs:comment>A publication authored by a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>publication</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#publication_date">
+        <rdfs:comment>The date when a publication was published</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>publication date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#publication_summary">
+        <rdfs:comment>A summary of a publication</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>summary</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#publication_title">
+        <rdfs:comment>The title of a publication listed in LinkedIn</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#publication_url">
+        <rdfs:comment>URL of a publication</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>publication URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#publisher_name">
+        <rdfs:comment>The name of the publisher of a publication</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Publication"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#recommendation_type">
+        <rdfs:comment>The type of a recommendation</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Recommendation"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#recommendations_received">
+        <rdfs:comment>A recommendation of a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>received recommendation</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Recommendation"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#recommender">
+        <rdfs:comment>The person who made the recommendation</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Recommendation"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>recommender</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#school_name">
+        <rdfs:comment>The name of an educational establishment attended by a LinkedIn member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Education"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>school name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#skill">
+        <rdfs:comment>A skill possessed by a member</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>skill</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/linkedin#Skill"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#skill_name">
+        <rdfs:comment>The name of the skill</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#skill_proficiency">
+        <rdfs:comment>An indication of a member's skill level in a particular skill</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>proficiency</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#skill_years_of_experience">
+        <rdfs:comment>An indication of the number of years of experience a member has in a particular skill</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Skill"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>experience</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#specialties">
+        <rdfs:comment>A member's description of their professional specialties</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>specialties</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#start_date">
+        <rdfs:comment>Date when a member started a position</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>start date</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#summary">
+        <rdfs:comment>A member's description of their professional profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Person"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>summary</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#ticker">
+        <rdfs:comment>The stock market name for the company</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Company"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>stock market name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/linkedin#title">
+        <rdfs:comment>Job title of a position held</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/linkedin#Position"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/linkedin"/>
+        <rdfs:label>title</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
+
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplmoney.owl b/binsrc/rdf_mappers/ontologies/owl/oplmoney.owl
new file mode 100644
index 0000000..ee5115c
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplmoney.owl
@@ -0,0 +1,61 @@
+<!--
+
+  oplmoney.owl,v 1.1.4.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/money#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/money">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-09-09</dc:date>
+        <dc:description xml:lang="en">OpenLink schema for money</dc:description>
+        <dc:title>OpenLink money schema</dc:title>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/money#MonetaryValue">
+        <rdfs:comment>A class representing a monetary value</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/money"/>
+        <rdfs:label xml:lang="en">monetary value</rdfs:label>
+    </owl:Class>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/money#hasCurrencyCode">
+        <rdfs:comment>The ISO 4217 standard (3 character) currency code</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/money#MonetaryValue"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/money"/>
+        <rdfs:label xml:lang="en">ISO-4127 currency code</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/money#hasCurrencyValue">
+        <rdfs:comment xml:lang="en">the amount of money</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/money#MonetaryValue"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/money"/>
+        <rdfs:label xml:lang="en">currency value</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#decimal"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplnyt.owl b/binsrc/rdf_mappers/ontologies/owl/oplnyt.owl
new file mode 100644
index 0000000..9f4c11e
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplnyt.owl
@@ -0,0 +1,93 @@
+<!--
+
+  oplnyt.owl,v 1.1.2.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+  Generated from oplnyt.n3
+
+  An OpenLink ontology for New York Times
+
+  See: 
+  http://developer.nytimes.com/docs/read/The_Semantic_API
+  http://developer.nytimes.com/docs/read/article_search_api
+-->
+
+<rdf:RDF xmlns="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/nyt">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-12-14</dc:date>
+        <dc:description>OpenLink schema for New York Times Semantic and Article Search APIs</dc:description>
+        <dc:title>OpenLink schema for New York Times</dc:title>
+    </owl:Ontology>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/nyt#concept_type">
+        <comment>A concept type from the New York Times controlled vocabulary</comment>
+        <domain rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
+        <isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/nyt"/>
+        <label>NYT concept type</label>
+        <range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/nyt#fee">
+        <comment>Indicates whether users must pay a fee to retrieve the full article</comment>
+        <domain rdf:resource="http://purl.org/ontology/bibo/Document"/>
+        <isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/nyt"/>
+        <label>fee</label>
+        <range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/nyt#full_article">
+        <comment>A link to a full NYT article related to a NYT concept/topic tag</comment>
+        <domain rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
+        <isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/nyt"/>
+        <label>full NYT article</label>
+        <range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/nyt#is_times_tag">
+        <comment>True if a concept is returned by the TimesTags API</comment>
+        <domain rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
+        <isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/nyt"/>
+        <label>is Times tag</label>
+        <range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/nyt#related_article">
+        <comment>A summary of a NYT article related to a NYT concept/topic tag</comment>
+        <domain rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
+        <isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/nyt"/>
+        <label>related NYT article</label>
+        <range rdf:resource="http://purl.org/ontology/bibo/Document"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/nyt#topic_page">
+        <comment>A NYT topic page associated with a NYT concept/topic tag</comment>
+        <domain rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
+        <isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/nyt"/>
+        <label>topic page</label>
+        <range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplopengraph.owl b/binsrc/rdf_mappers/ontologies/owl/oplopengraph.owl
new file mode 100644
index 0000000..69f06db
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplopengraph.owl
@@ -0,0 +1,1119 @@
+<!--
+
+  oplopengraph.owl,v 1.1.4.8 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+  Generated from oplopengraph.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+
+  An OpenLink ontology for complementing Open Graph 
+  See http://developers.facebook.com/docs/reference/api/
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/opengraph#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:like="http://ontologi.es/like#"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:mo="http://purl.org/ontology/mo/"
+    xmlns:og="http://ogp.me/ns#"
+    xmlns:oplog="http://www.openlinksw.com/schemas/opengraph#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/opengraph">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-04-06</dc:date>
+        <dc:description>OpenLink schema for Open Graph objects and properties</dc:description>
+        <dc:title>OpenLink schema for Open Graph</dc:title>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Account">
+        <rdfs:comment>A class representing an account listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Account</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Activity">
+        <rdfs:comment>A class representing an activity listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Activity</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Album">
+        <rdfs:comment>An Facebook photo album</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Album</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Application">
+        <rdfs:comment>An application registered on Facebook Platform</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Application</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Book">
+        <rdfs:comment>A class representing a book listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Book</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Checkin">
+        <rdfs:comment>An Facebook checkin</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Checkin</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Comment">
+        <rdfs:comment>A comment on a Graph API object</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Comment</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Event">
+        <rdfs:comment>Specifies information about an event, including the location, event name, and which invitees plan to attend</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Event</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#FriendList">
+        <rdfs:comment>A Facebook friend list</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>FriendList</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Game">
+        <rdfs:comment>A class representing a game listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Game</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Group">
+        <rdfs:comment>A Facebook group</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Group</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Image">
+        <rdfs:comment>A class representing a variant of a Photo</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Image</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Insights">
+        <rdfs:comment>Statistics about applications, pages, and domains.</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Insights</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Interest">
+        <rdfs:comment>A class representing an interest listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Interest</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Link">
+        <rdfs:comment>A link shared on a user's wall</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Link</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Message">
+        <rdfs:comment>An individual message in the new Facebook messaging system</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Message</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Movie">
+        <rdfs:comment>A class representing a movie listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Movie</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Music">
+        <rdfs:comment>A class representing music listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Music</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Note">
+        <rdfs:comment>A Facebook note</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Note</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Object">
+        <rdfs:comment>A base class representing all Open Graph objects</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Open Graph object</rdfs:label>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Page">
+        <rdfs:comment>A Facebook Page</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Page</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Photo">
+        <rdfs:comment>An individual photo within an album</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Photo</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Post">
+        <rdfs:comment>An individual entry in a profile's feed</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Post</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Review">
+        <rdfs:comment>A review for an application</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Review</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#StatusMessage">
+        <rdfs:comment>A status message on a user's wall</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>StatusMessage</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Subscription">
+        <rdfs:comment>A subscription to an application to get real-time updates for an Graph object type</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Subscription</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Thread">
+        <rdfs:comment>A message thread in the Facebook messaging system</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Thread</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#TvProgramme">
+        <rdfs:comment>A class representing a TV programme listed in a user's profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>TV programme</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#User">
+        <rdfs:comment>A Facebook user profile</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>User</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/opengraph#Video">
+        <rdfs:comment>An individual video</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Video</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:Class>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#accounts">
+        <rdfs:comment>The Facebook apps and pages owned by the current user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>accounts</rdfs:label>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#has_account"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#activities">
+        <rdfs:comment>The activities listed on the user's profile.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>activities</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Activity"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#likes_activity"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#address">
+        <rdfs:comment>User's address</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>address</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#album_type">
+        <rdfs:comment>The type of the album: profile, mobile, wall, normal or album</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Album"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>album type</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#albums">
+        <rdfs:comment>The photo albums this user has created.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>albums</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Album"/>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#has_album"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#bio">
+        <rdfs:comment>The user's biography</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>address</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#birthday">
+        <rdfs:comment>The user's birthday</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>birthday</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#books">
+        <rdfs:comment>The books listed on the user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>books</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Book"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#category">
+        <rdfs:comment>The Page's category</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Page"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>category</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#checkins">
+        <rdfs:comment>The places that the user has checked-into</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>checkins</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#count">
+        <rdfs:comment>The number of photos in an album</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Album"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>count</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#cover_photo">
+        <rdfs:comment>The album cover photo ID</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Album"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>cover photo</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#description">
+        <rdfs:comment>A brief description of an Open Graph object</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>description</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#education">
+        <rdfs:comment>A list of the user's education history.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>education</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#email">
+        <rdfs:comment>The proxied or contact email address granted by the user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>email</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#events">
+        <rdfs:comment>The events this user is attending</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>events</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#family">
+        <rdfs:comment>The user's family relationships</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>family</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#feed">
+        <rdfs:comment>The user's wall</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>feed</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#first_name">
+        <rdfs:comment>The user's first name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>first name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#friendlists">
+        <rdfs:comment>The user's friend lists</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>friend lists</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#friendrequests">
+        <rdfs:comment>The user's incoming friend requests</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>friend requests</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#friends">
+        <rdfs:comment>The user's friends</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>friends</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#from">
+        <rdfs:comment>The Facebook user who made this post</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>from</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#games">
+        <rdfs:comment>Games the user has added to the Arts and Entertainment section of their profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>games</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Game"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#gender">
+        <rdfs:comment>The user's gender</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>gender</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#groups">
+        <rdfs:comment>The Groups that the user belongs to</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>groups</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_account">
+        <rdfs:comment>A Facebook page owned by the user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Page"/>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has account</rdfs:label>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_album">
+        <rdfs:comment>An album listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has album</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Album"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_comment">
+        <rdfs:comment>A comment made on a Facebook object</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has comment</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Comment"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_feed">
+        <rdfs:comment>A post on an application's wall</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Application"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has feed</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_friend">
+        <rdfs:comment>A friend of the Facebook user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has friend</rdfs:label>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_interest">
+        <rdfs:comment>An interest listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has interest</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Interest"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_member">
+        <rdfs:comment>a user who is a member of this FriendList</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#FriendList"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has member</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_photo">
+        <rdfs:comment>A photo contained in an album</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Album"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has photo</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_picture">
+        <rdfs:comment>A picture</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has picture</rdfs:label>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_post">
+        <rdfs:comment>An application's own post</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Application"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has post</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#has_variant">
+        <rdfs:comment>A variant of a photo</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>has variant</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Image"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#height">
+        <rdfs:comment>The height of a photo in pixels</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>height</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#home">
+        <rdfs:comment>The user's news feed</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>home</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#hometown">
+        <rdfs:comment>The user's hometown</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>hometown</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#id">
+        <rdfs:comment>A Facebook object ID</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#inbox">
+        <rdfs:comment>The [Threads](/docs/reference/api/thread/) in this user's inbox</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>inbox</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#inspirational_people">
+        <rdfs:comment>Inspirational people</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>inspirational people</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#installed">
+        <rdfs:comment>installed</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>installed</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#interested_in">
+        <rdfs:comment>The genders the user is interested in</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>interested_in</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#interests">
+        <rdfs:comment>The interests listed on the user's profile.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>interests</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Interest"/>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#has_interest"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#is_employee">
+        <rdfs:comment>employee</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>is_employee</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#languages">
+        <rdfs:comment>The user's languages</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>languages</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#last_name">
+        <rdfs:comment>The user's last name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>last name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#liked_by">
+        <rdfs:comment>the user that liked the Facebook object</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>liked by</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes">
+        <rdfs:comment>All the pages this user has liked</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes_activity">
+        <rdfs:comment>An activity listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes activity</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Activity"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes_book">
+        <rdfs:comment>A book listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes book</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Book"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes_game">
+        <rdfs:comment>A game listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes game</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Game"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes_movie">
+        <rdfs:comment>A movie listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes movie</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Movie"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes_music">
+        <rdfs:comment>Music listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes music</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Music"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#likes_tv_programme">
+        <rdfs:comment>A TV programme listed on a user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>likes TV programme</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#TVProgramme"/>
+        <owl:equivalentProperty rdf:resource="http://ontologi.es/like#likes"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#link">
+        <rdfs:comment>A link attached to a Post</rdfs:comment>
+        <rdfs:comment>The URL of the profile for the user on Facebook</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>link</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#links">
+        <rdfs:comment>The user's posted links</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>links</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#locale">
+        <rdfs:comment>A user's locale expressed as an ISO language code and country code</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Product"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>locale</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#location">
+        <rdfs:comment>The user's current city</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>location</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#meeting_for">
+        <rdfs:comment>meeting for</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>meeting_for</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#message">
+        <rdfs:comment>A message contained in a Post</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>message</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#middle_name">
+        <rdfs:comment>The user's middle name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>middle name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#mobile_phone">
+        <rdfs:comment>mobile phone</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>mobile_phone</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#movies">
+        <rdfs:comment>The movies listed on the user's profile.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>movies</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Movie"/>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#likes_movie"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#music">
+        <rdfs:comment>The music listed on the user's profile.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>music</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Music"/>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#likes_music"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#mutualfriends">
+        <rdfs:comment>The mutual friends between two users</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>mutualfriends</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#name">
+        <rdfs:comment>The user's full name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#notes">
+        <rdfs:comment>The user's notes</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>notes</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#notifications">
+        <rdfs:comment>The user's notifications</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>notifications</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#outbox">
+        <rdfs:comment>TThe messages in this user's outbox</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>outbox</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#payments">
+        <rdfs:comment>The Facebook Credits orders the user placed with an application</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>payments</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#permissions">
+        <rdfs:comment>The permissions that user has granted the application</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>permissions</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#photos">
+        <rdfs:comment>Photos the user (or friend) is tagged in.</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>photos</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#picture">
+        <rdfs:comment>The user's profile picture</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>picture</rdfs:label>
+        <owl:equivalentProperty rdf:resource="http://www.openlinksw.com/schemas/opengraph#has_picture"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#political">
+        <rdfs:comment>The user's political view</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>political</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#position">
+        <rdfs:comment>The position of a photo in an album</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>position</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#posted">
+        <rdfs:comment>A post by a Facebook user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>posted</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#posts">
+        <rdfs:comment>The user's own posts</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>posts</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#privacy">
+        <rdfs:comment>The privacy setting of a group</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Group"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>privacy</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#public_profile_url">
+        <rdfs:comment>URL to a Facebook user's home page</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>Facebook profile URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#quotes">
+        <rdfs:comment>The user's favorite quotes</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>quotes</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#relationship_status">
+        <rdfs:comment>The user's relationship status: 'Single', 'In a relationship', 'Engaged', 'Married', 'It's complicated', 'In an open relationship', 'Widowed', 'Separated', 'Divorced', 'In a civil union', 'In a domestic partnership'. 'user_relationships' or 'friends_relationships'</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>relationship status</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#religion">
+        <rdfs:comment>The user's religion</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>religion</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#scores">
+        <rdfs:comment>The current [scores](/docs/score/) for the user in games</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>scores</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#significant_other">
+        <rdfs:comment>The user's significant other</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>significant other</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#sports">
+        <rdfs:comment>The user's sports</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>sports</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#statuses">
+        <rdfs:comment>The user's status updates</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>statuses</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#tagged">
+        <rdfs:comment>Posts the user is tagged in</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>tagged</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#tagged_by">
+        <rdfs:comment>The photos, videos, and posts in which this application has been tagged</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Application"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>tagged by</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+    </owl:ObjectProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#television">
+        <rdfs:comment>The television listed on the user's profile</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>television</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#TvProgramme"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#third_party_id">
+        <rdfs:comment>An anonymous but unique identifier for the user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>third_party_id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#timezone">
+        <rdfs:comment>The user's timezone offset from UTC. Available only for the current user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>timezone</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#to">
+        <rdfs:comment>A Facebook profile targeted in this post</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Post"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>to</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#trust">
+        <rdfs:comment>trust</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>trust</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#updated_time">
+        <rdfs:comment>The last time the user's profile was updated; changes to the 'languages', 'link', 'timezone', 'verified', 'interested_in', 'favorite_athletes', 'favorite_teams', and 'video_upload_limits' are not not reflected in this value. Requires 'access_token'. 'string' containing an ISO-8601 datetime</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>updated time</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#updates">
+        <rdfs:comment>The updates in this user's inbox</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>updates</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#uri">
+        <rdfs:comment>A link to an OpenGraph resource</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>uri</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#username">
+        <rdfs:comment>The user's Facebook username</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>username</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#verified">
+        <rdfs:comment>The user's account verification status, either 'true' or 'false' </rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>verified</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#video_upload_limits">
+        <rdfs:comment>The size of the video file and the length of the video that a user can upload; only returned if specifically requested via the 'fields' URL parameter</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>video upload limits</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#videos">
+        <rdfs:comment>The videos this user has been tagged in</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>videos</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/opengraph#Video"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#website">
+        <rdfs:comment>The URL of the user's personal website</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>website</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#width">
+        <rdfs:comment>The width of a photo in pixels</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#Photo"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>width</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/opengraph#work">
+        <rdfs:comment>A list of the user's work history</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/opengraph#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/opengraph"/>
+        <rdfs:label>work</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplstackoverflow.owl b/binsrc/rdf_mappers/ontologies/owl/oplstackoverflow.owl
new file mode 100644
index 0000000..812df2f
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/oplstackoverflow.owl
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  oplstackoverflow.owl,v 1.1.2.2 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+-->
+<rdf:RDF
+   xmlns:awol="http://bblfish.net/work/atom-owl/2006-06-06/#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:dcterms="http://purl.org/dc/terms/"
+   xmlns:foaf="http://xmlns.com/foaf/0.1/"
+   xmlns:gn="http://www.geonames.org/ontology#"
+   xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+   xmlns:owl="http://www.w3.org/2002/07/owl#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+   xmlns:sioc="http://rdfs.org/sioc/ns#"
+   xmlns:sioct="http://rdfs.org/sioc/types#""
+   xmlns:so="http://www.openlinksw.com/schemas/stackoverflow#"
+   xmlns:virtrdfmec="http://www.openlinksw.com/schemas/virtrdf-meta-entity-class#"
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+  <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/stackoverflow#">
+    <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string">OpenLink Software, http://www.openlinksw.com</dc:creator>
+  </owl:Ontology>
+  <owl:Class rdf:about="http://www.openlinksw.com/schemas/stackoverflow#Answer">
+    <rdfs:comment>An answer in a StackOverflow question thread</rdfs:comment>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>StackOverflow Answer</rdfs:label>
+  </owl:Class>
+  <owl:Class rdf:about="http://www.openlinksw.com/schemas/stackoverflow#Entity">
+    <rdfs:comment>An entity in the StackOverflow world</rdfs:comment>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>StackOverflow Entity</rdfs:label>
+  </owl:Class>
+  <owl:Class rdf:about="http://www.openlinksw.com/schemas/stackoverflow#Question">
+    <rdfs:comment>A StackOverflow question thread</rdfs:comment>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>StackOverflow Question</rdfs:label>
+  </owl:Class>
+  <owl:Class rdf:about="http://www.openlinksw.com/schemas/stackoverflow#User">
+    <rdfs:comment>A StackOverflow user</rdfs:comment>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>StackOverflow User</rdfs:label>
+  </owl:Class>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#accepted_answer_id">
+    <rdfs:comment>An answer accepted by the original user</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Question"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Accepted Answer</rdfs:label>
+    <rdfs:range rdf:resource="http://rdfs.org/sioc/types#"Answer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#answer_count">
+    <rdfs:comment>Number of answers provided for a Question</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Question"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Answer count</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#employee">
+    <rdfs:comment>Whether a StackOverflow User is an employee or not</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Question"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Employed?</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#is_accepted">
+    <rdfs:comment>Whether the answer has been accepted by original poster</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Answer"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Accepted?</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#location">
+    <rdfs:comment>StackOverflow user's general location</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Location</rdfs:label>
+    <rdfs:subPropertyOf rdf:resource="http://www.geonames.org/ontology#name"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#quota_max">
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Agent"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Quota: Max</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#quota_remaining">
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Agent"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Quota: Remaining</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#reputation">
+    <rdfs:comment>A StackOverflow User's reputation (karma)</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Reputation</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#reputation_change_day">
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Reputation change 1d</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#reputation_change_month">
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Reputation change 1m</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#reputation_change_week">
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Reputation change 1wk</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#reputation_change_year">
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Reputation change 1yr</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#score">
+    <rdfs:comment>A StackOverflow Entity's score</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Entity"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>Score</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#user_type">
+    <rdfs:comment>Whether the user is registered or not</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#User"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>User type</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+  </owl:DatatypeProperty>
+  <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/stackoverflow#view_count">
+    <rdfs:comment>Number of times a StackOverflow question has been viewed</rdfs:comment>
+    <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#Question"/>
+    <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/stackoverflow#"/>
+    <rdfs:label>View count</rdfs:label>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+  </owl:DatatypeProperty>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/opltesco.owl b/binsrc/rdf_mappers/ontologies/owl/opltesco.owl
index d8d7f65..f1cc582 100644
--- a/binsrc/rdf_mappers/ontologies/owl/opltesco.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/opltesco.owl
@@ -1,4 +1,25 @@
 <!--
+
+  opltesco.owl,v 1.1.4.3 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
   Generated from opltesco.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
 
   An OpenLink ontology for specializing the ProductOrService class of the GoodRelations ontology
diff --git a/binsrc/rdf_mappers/ontologies/owl/opltwitter.owl b/binsrc/rdf_mappers/ontologies/owl/opltwitter.owl
new file mode 100644
index 0000000..a339645
--- /dev/null
+++ b/binsrc/rdf_mappers/ontologies/owl/opltwitter.owl
@@ -0,0 +1,182 @@
+<!--
+
+  opltwitter.owl,v 1.1.4.7 2012/03/06 16:48:07 source Exp
+
+  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+  project.
+
+  Copyright (C) 1998-2012 OpenLink Software
+
+  This project 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; only version 2 of the License, dated June 1991.
+
+  This program 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+  Generated from opltwitter.n3 by on-line N3-RDF/XML converter at http://www.mindswap.org/2002/rdfconvert/ 
+ 
+  An OpenLink ontology for Twitter 
+ 
+  See: 
+  https://dev.twitter.com/docs/api (Twitter REST API resources)
+-->
+
+<rdf:RDF xmlns="http://www.openlinksw.com/schemas/twitter#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:foaf="http://xmlns.com/foaf/0.1/"
+    xmlns:log="http://www.w3.org/2000/10/swap/log#"
+    xmlns:opltw="http://www.openlinksw.com/schemas/twitter#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioct="http://rdfs.org/sioc/types#"
+    xmlns:virtrdfmec="http://www.openlinksw.com/schemas/virtrdf-meta-entity-class#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+
+    <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/twitter">
+        <dc:creator>OpenLink Software, http://www.openlinksw.com</dc:creator>
+        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2011-07-22</dc:date>
+        <dc:description>OpenLink schema for Twitter objects and properties</dc:description>
+        <dc:title>OpenLink schema for Twitter</dc:title>
+    </owl:Ontology>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/twitter#Application">
+        <rdfs:comment>Application used to generate tweets</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>Twitter application</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/twitter#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/twitter#Object">
+        <rdfs:comment>A base class representing all Twitter objects</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>Twitter object</rdfs:label>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/twitter#Tweet">
+        <rdfs:comment>Tweets are the atomic building blocks of Twitter, 140-character status updates with additional associated metadata</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>Tweet</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/twitter#Object"/>
+    </owl:Class>
+
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/twitter#User">
+        <rdfs:comment>A Twitter user</rdfs:comment>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>Twitter user</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/twitter#Object"/>
+        <rdfs:subClassOf rdf:resource="http://www.openlinksw.com/schemas/virtrdf-meta-entity-class#Person"/>
+    </owl:Class>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#appLink">
+        <rdfs:comment>Resource for the agent used to post the tweet</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#Application"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>Posting Agent resource</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#favorites_count">
+        <rdfs:comment>The number of tweets (statuses) tagged by this user as being a favorite</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>favorites count</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/twitter#followed_by">
+        <rdfs:comment>A user following this Twitter user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>followed by</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#followers_count">
+        <rdfs:comment>The number of followers a Twitter user has</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>followers count</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/twitter#follows">
+        <rdfs:comment>A user followed by this Twitter user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>follows</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#friends_count">
+        <rdfs:comment>The number of people who follow this Twitter user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>friends count</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/twitter#has_favorite">
+        <rdfs:comment>Identifies a tweet marked as being amongst a user's favorites</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>has favorite</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/twitter#Tweet"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#id">
+        <rdfs:comment>A Twitter object ID</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#Object"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>id</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:ObjectProperty rdf:about="http://www.openlinksw.com/schemas/twitter#made_tweet">
+        <rdfs:comment>A tweet created by this Twitter user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>made tweet</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/twitter#Tweet"/>
+    </owl:ObjectProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#public_profile_url">
+        <rdfs:comment>URL to a Twitter user's public profile / home page</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>Twitter profile URL</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#screen_name">
+        <rdfs:comment>Twitter account name</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>screen_name</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#statuses_count">
+        <rdfs:comment>The number of tweets (statuses) posted by this user</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#User"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>statuses count</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+    </owl:DatatypeProperty>
+
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/twitter#via">
+        <rdfs:comment>Agent used for posting the tweet</rdfs:comment>
+        <rdfs:domain rdf:resource="http://www.openlinksw.com/schemas/twitter#Tweet"/>
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/twitter"/>
+        <rdfs:label>via</rdfs:label>
+        <rdfs:range rdf:resource="http://www.openlinksw.com/schemas/twitter#Application"/>
+    </owl:DatatypeProperty>
+</rdf:RDF>
diff --git a/binsrc/rdf_mappers/ontologies/owl/oplzillow.owl b/binsrc/rdf_mappers/ontologies/owl/oplzillow.owl
index d3948a1..9b3adc6 100644
--- a/binsrc/rdf_mappers/ontologies/owl/oplzillow.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/oplzillow.owl
@@ -1,11 +1,11 @@
 <!--
 
-  $Id: oplzillow.owl,v 1.1.2.5 2010/01/25 15:36:26 source Exp $
+  oplzillow.owl,v 1.1.2.6 2012/03/06 16:48:07 source Exp
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/ontologies/owl/owl.owl b/binsrc/rdf_mappers/ontologies/owl/owl.owl
index e8bdf5c..f804d0c 100644
--- a/binsrc/rdf_mappers/ontologies/owl/owl.owl
+++ b/binsrc/rdf_mappers/ontologies/owl/owl.owl
@@ -26,7 +26,7 @@
     explicitly into their ontology. People that do import this file
     should expect their ontology to be an OWL Full ontology.
   </rdfs:comment>
-  <versionInfo>10 February 2004, revised $Date: 2009/12/15 23:13:00 $</versionInfo>
+  <versionInfo>10 February 2004, revised 2009/12/15 23:13:00</versionInfo>
   <priorVersion rdf:resource="http://www.daml.org/2001/03/daml+oil"/>
 </Ontology>
 
diff --git a/binsrc/rdf_mappers/ontologies/xbrl/xbrl.owl b/binsrc/rdf_mappers/ontologies/xbrl/xbrl.owl
index 594cfb3..a486b62 100644
--- a/binsrc/rdf_mappers/ontologies/xbrl/xbrl.owl
+++ b/binsrc/rdf_mappers/ontologies/xbrl/xbrl.owl
@@ -15,7 +15,7 @@
     <!ENTITY us-gaap-ci 'http://www.xbrl.org/us/fr/gaap/ci/2005-02-28#'>
     <!ENTITY xml 'http://www.w3.org/XML/1998/namespace#'>
 ]>
-<rdf:RDF xmlns:xo="http://rhizomik.upf.edu/redefer/xsl/xsd2owl-functions.xsl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:link="http://www.xbrl.org/2003/linkbase#" xmlns:xlink="http://www.w3.org/1999/xlink#" xmlns:xbrli="http://www.xbrl.org/2003/instance#" xmlns:msft="#" xmlns:mem="http://www.microsoft.com/xbrl/mem#" xmlns:usfr-seccert="http://www.xbrl.org/us/fr/rpt/seccert/2005-02-28#" xmlns:usfr-mda="http://www.xbrl.org/us/fr/rpt/mda/2005-02-28#" xmlns:usfr-ar="http://www.xbrl.org/us/fr/rpt/ar/2005-02-28#" xmlns:usfr-pte="http://www.xbrl.org/us/fr/common/pte/2005-02-28#" xmlns:ref="http://www.xbrl.org/2004/ref#" xmlns:usfr-mr="http://www.xbrl.org/us/fr/rpt/mr/2005-02-28#" xmlns:us-gaap-ci="http://www.xbrl.org/us/fr/gaap/ci/2005-02-28#">
+<rdf:RDF xmlns:opl-xbrl="http://www.openlinksw.com/schemas/xbrl/" xmlns:xo="http://rhizomik.upf.edu/redefer/xsl/xsd2owl-functions.xsl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:link="http://www.xbrl.org/2003/linkbase#" xmlns:xlink="http://www.w3.org/1999/xlink#" xmlns:xbrli="http://www.xbrl.org/2003/instance#" xmlns:msft="#" xmlns:mem="http://www.microsoft.com/xbrl/mem#" xmlns:usfr-seccert="http://www.xbrl.org/us/fr/rpt/seccert/2005-02-28#" xmlns:usfr-mda="http://www.xbrl.org/us/fr/rpt/mda/2005-02-28#" xmlns:usfr-ar="http://www.xbrl.org/us/fr/rpt/ar/2005-02-28#" xmlns:usfr-pte="http://www.xbrl.org/us/fr/common/pte/2005-02-28#" xmlns:ref="http://www.xbrl.org/2004/ref#" xmlns:usfr-mr="http://www.xbrl.org/us/fr/rpt/mr/2005-02-28#" xmlns:us-gaap-ci="http://www.xbrl.org/us/fr/gaap/ci/2005-02-28#">
    <owl:Ontology rdf:about="">
       <rdfs:comment>OWL ontology for XBRL</rdfs:comment>
       <owl:imports rdf:resource="http://www.xbrl.org/2003/instance#"/>
@@ -105,6 +105,16 @@
          </owl:Class>
       </rdfs:range>
    </owl:ObjectProperty>
+    <owl:DatatypeProperty rdf:about="http://www.openlinksw.com/schemas/xbrl/identifier">
+        <rdfs:isDefinedBy rdf:resource="http://www.openlinksw.com/schemas/xbrl"/>
+        <rdfs:label>CIK</rdfs:label>
+        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
+        <owl:equivalentProperty rdf:resource="http://www.rdfabout.com/rdf/schema/ussec/cik"/>
+    </owl:DatatypeProperty>
+    <owl:Class rdf:about="http://www.openlinksw.com/schemas/xbrl/report">
+        <rdfs:label xml:lang="en">Report</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://rdfs.org/sioc/ns#Container"/>
+    </owl:Class>
    <rdf:Property rdf:about="InvestmentCategoryName">
       <rdfs:subPropertyOf rdf:resource="http://www.xbrl.org/2003/instance#item"/>
       <rdfs:range rdf:resource="http://www.xbrl.org/2003/instance#stringItemType"/>
diff --git a/binsrc/rdf_mappers/rdf_mappers.sql b/binsrc/rdf_mappers/rdf_mappers.sql
index ff996c7..039f5d3 100644
--- a/binsrc/rdf_mappers/rdf_mappers.sql
+++ b/binsrc/rdf_mappers/rdf_mappers.sql
@@ -1,13 +1,13 @@
 --
 --
---  $Id: rdf_mappers.sql,v 1.165.2.114 2011/03/29 22:52:22 source Exp $
+--  $Id: rdf_mappers.sql,v 1.165.2.197 2012/03/14 11:40:13 source Exp $
 --
 --  RDF Mappings
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -24,6 +24,8 @@
 --
 --
 
+--set macro_substitution=off;
+
 -- remove wrong cartridge patterns
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_PATTERN = '(text/html)|(application/atom.xml)|(text/xml)|(application/xml)|(application/rss.xml)' and RM_TYPE = 'MIME';
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_PATTERN = '(text/html)|(application/atom.xml)|(text/xml)|(application/xml)|(application/rss.xml)|(application/rdf.xml)' and RM_TYPE = 'MIME';
@@ -31,6 +33,7 @@ delete from DB.DBA.SYS_RDF_MAPPERS where RM_PATTERN = '.+\.svg\$';
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_PATTERN = '.+\.od[ts]\$';
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_PATTERN = '.+\.ics\$';
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_PATTERN = '.+\\.ics\x24';
+delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTTP_SESSION';
 
 -- insertion of cartridges
 
@@ -54,6 +57,14 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
     'URL', 'DB.DBA.RDF_LOAD_CNET', null, 'CNET');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*gowalla.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_GOWALLA', null, 'Gowalla');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('(http://www.googlestore.com/.*)',
+    'URL', 'DB.DBA.RDF_LOAD_GOOGLE_STORE', null, 'Google Store');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
     values ('http://www.wine.com/.*',
     'URL', 'DB.DBA.RDF_LOAD_WINE', null, 'Wine');
 
@@ -62,15 +73,61 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
     'URL', 'DB.DBA.RDF_LOAD_EVRI', null, 'Evri');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('(http://.*foursquare.com/.*)|'||
+    '(https://.*foursquare.com/.*)',
+    'URL', 'DB.DBA.RDF_LOAD_FOURSQUARE', null, 'Foursquare');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*seatgeek.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_SEATGEEK', null, 'Seatgeek');
+	
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('(http://.*simplegeo.com/.*)|'||
+    '(https://.*simplegeo.com/.*)',
+    'URL', 'DB.DBA.RDF_LOAD_SIMPLEGEO', null, 'SimpleGeo');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*hyperpublic.com',
+    'URL', 'DB.DBA.RDF_LOAD_HYPERPUBLIC', null, 'Hyperpublic');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://upcoming.yahoo.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_UPCOMING', null, 'Yahoo Upcoming');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*eventbrite.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_EVENTBRITE', null, 'Eventbrite');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*eventful.com.*',
+    'URL', 'DB.DBA.RDF_LOAD_EVENTFUL', null, 'Eventful');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*plancast.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_PLANCAST', null, 'Plancast');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
     values ('http://.*tumblr.com/.*',
     'URL', 'DB.DBA.RDF_LOAD_TUMBLR', null, 'Tumblr');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*seevl.net/.*',
+    'URL', 'DB.DBA.RDF_LOAD_SEEVL', null, 'Seevl');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://.*guardian.co.uk/.*',
+    'URL', 'DB.DBA.RDF_LOAD_GUARDIAN', null, 'Guardian');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
     values ('(http://.*yelp.com/.*)',
     'URL', 'DB.DBA.RDF_LOAD_YELP', null, 'Yelp');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('http://www.google.com/base/feeds/snippets.*', 
+    values ('(http://.*programmableweb.com/.*)',
+    'URL', 'DB.DBA.RDF_LOAD_PROGRAMMABLEWEB', null, 'ProgrammableWeb');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('http://www.google.com/base/feeds/snippets.*',
 	'URL', 'DB.DBA.RDF_LOAD_GOOGLEBASE', null, 'Google Base');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
@@ -79,16 +136,26 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
     'URL', 'DB.DBA.RDF_LOAD_GOOGLE_SPREADSHEET', null, 'Google (Spreadsheets)');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('(http://plus.google.com/.*)|'||
+	'(https://plus.google.com/.*)',
+    'URL', 'DB.DBA.RDF_LOAD_GOOGLE_PROFILE', null, 'Google (Profile)');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://socialstatistics.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_SOCIALSTATISTICS', null, 'Google+ Stats');
+	
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://maps.google.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_GOOGLE_PLACES', null, 'Google (Places)');
+	
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
     values ('(http://docs.google.com/.*)|'||
     '(https://docs.google.com/.*)',
     'URL', 'DB.DBA.RDF_LOAD_GOOGLE_DOCUMENT', null, 'Google (Documents)');
 
---insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_ENABLED)
---	values ('.*', 'HTTP', 'DB.DBA.RDF_LOAD_HTTP_SESSION', null, 'HTTP in RDF', 0);
-delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTTP_SESSION';
-
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('.*', 'URL', 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH_SELECTION', null, 'Facebook Open Graph');
+     values ('http://.*jigsaw.com/.*',
+     'URL', 'DB.DBA.RDF_LOAD_JIGSAW', null, 'Jigsaw');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
 	values ('(text/html)|(text/xml)|(application/xml)|(application/rdf.xml)',
@@ -100,7 +167,7 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
     values ('(http://farm[0-9]*.static.flickr.com/.*)|'||
-			'(http://www.flickr.com/photos/.*)',
+	'(http://www.flickr.com/photos/.*)',
     'URL', 'DB.DBA.RDF_LOAD_FLICKR_IMG', null, 'Flickr Images');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
@@ -118,6 +185,10 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'URL', 'DB.DBA.RDF_LOAD_BESTBUY', null, 'BestBuy articles');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('http://.*zappos.com/.*',
+	'URL', 'DB.DBA.RDF_LOAD_ZAPPOS', null, 'Zappos articles');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('http://.*productwiki.com/.*',
 	'URL', 'DB.DBA.RDF_LOAD_PRODUCTWIKI', null, 'Product Wiki articles');
 
@@ -127,9 +198,9 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'(http://.*amazon.[^/]+/[^/]+/dp/[^/]+(/.*)?)|'||
 	'(http://.*amazon.[^/]+/[^/]+/product-reviews/.*)|'||
 	'(http://.*amazon.[^/]+/exec/obidos/ASIN/.*)|' ||
-        '(http://.*amazon.[^/]+/s\?.*)|' ||
-        '(http://.*amazon.[^/]+/gp/registry/wishlist/.*)|' ||
-        '(http://.*amazon.[^/]+/exec/obidos/tg/detail/-/[^/]+/.*)',
+    '(http://.*amazon.[^/]+/s\?.*)|' ||
+    '(http://.*amazon.[^/]+/gp/registry/wishlist/.*)|' ||
+    '(http://.*amazon.[^/]+/exec/obidos/tg/detail/-/[^/]+/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_AMAZON_ARTICLE', null, 'Amazon articles');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
@@ -139,21 +210,22 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://.*vimeo.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_VIMEO', null, 'Vimeo');
-	
+
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://rdfohloh.wikier.org/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_OHLOH', null, 'Ohloh');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(http://www.groupon.com/.*)',
+	values ('(https?://www.groupon.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_GROUPON', null, 'Groupon');
-	
+
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://www.eol.org/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_EOL', null, 'Eol');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(http://delicious.com/.*)|(http://feeds.delicious.com/.*)',
+	values ('(http://.*delicious.com/.*)|'||
+	'(http://del.icio.us/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_DELICIOUS', null, 'Delicious');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
@@ -204,7 +276,7 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://.*slidesix.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_SLIDESIX', null, 'Slidesix');
-        
+
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://.*revyu.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_REVYU', null, 'Revyu');
@@ -218,7 +290,8 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'URL', 'DB.DBA.RDF_LOAD_BUGZILLA', null, 'Bugzillas');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(http://digg.com/.*)|(http://services.digg.com/.*)',
+	values ('(http://digg.com/.*)|'||
+	'(http://services.digg.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_DIGG', null, 'Digg');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
@@ -239,11 +312,18 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'URL', 'DB.DBA.RDF_LOAD_GETSATISFATION', null, 'GetSatisfaction');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(http://twitter.com/.*)|' ||
-	'(http://search.twitter.com/.*)',
+	values ('(http://.*twitter.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_TWITTER', null, 'Twitter');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('http://search.twitter.com/search.json\\?q=%40Fingerprint.*',
+	'URL', 'DB.DBA.RDF_LOAD_TWITTER_FP', null, 'Twitter WebIDs');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://(www.)?klout.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_KLOUT', null, 'Klout');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://.*salesforce.com/.*)|'||
 	'(https://.*salesforce.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_SALESFORCE', null, 'SalesForce');
@@ -257,6 +337,10 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'URL', 'DB.DBA.RDF_LOAD_ZILLOW', null, 'Zillow');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('(http://www.zoopla.co.uk/.*)',
+	'URL', 'DB.DBA.RDF_LOAD_ZOOPLA', null, 'Zoopla');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('(http://socialgraph.apis.google.com/lookup\\?.*)|'||
 	'(http://socialgraph.apis.google.com/otherme\\?.*)',
 	'URL', 'DB.DBA.RDF_LOAD_SOCIALGRAPH', null, 'SocialGraph');
@@ -266,48 +350,73 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'URL', 'DB.DBA.RDF_LOAD_OPENLIBRARY', null, 'OpenLibrary');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('.+\\.svg\x24', 'URL', 'DB.DBA.RDF_LOAD_SVG', null, 'SVG');
+	values ('.+\\.svg\x24', 
+	'URL', 'DB.DBA.RDF_LOAD_SVG', null, 'SVG');
+	
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+    values ('http://(.+\.)?stackoverflow.com/.*',
+    'URL', 'DB.DBA.RDF_LOAD_STACKOVERFLOW', null, 'Stack Overflow');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('.+\\.csv\x24', 'URL', 'DB.DBA.RDF_LOAD_CSV', null, 'CSV');
-        
+    values ('http://.*angel.co/.*',
+    'URL', 'DB.DBA.RDF_LOAD_ANGELLIST', null, 'Angel List');
+	
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('.+\\.csv\x24', 
+	'URL', 'DB.DBA.RDF_LOAD_CSV', null, 'CSV');
+
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(http://cgi.sandbox.ebay.com/.*)|(http://cgi.ebay.com/.*)',
+	values ('.+\\.xrd\x24', 
+	'URL', 'RDF_LOAD_XRD_GENERIC', null, 'XRD');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('(http://cgi.sandbox.ebay.com/.*)|'||
+	'(http://cgi.ebay.com/.*)|'||
+	'(http://cgi.ebay.de/.*)|'||
+	'(http://www.ebay.co.uk/.*)|'||
+	'(http://www.ebay.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_EBAY_ARTICLE', null, 'eBay articles');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('.+\\.od[ts]\x24', 'URL', 'DB.DBA.RDF_LOAD_OO_DOCUMENT', null, 'OO Documents');
+	values ('.+\\.od[ts]\x24', 
+	'URL', 'DB.DBA.RDF_LOAD_OO_DOCUMENT', null, 'OO Documents');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(.+\\.docx\x24)|(.+\\.xlsx\x24)', 'URL', 'DB.DBA.RDF_LOAD_MS_DOCUMENT', null, 'Microsoft Documents');
+	values ('(.+\\.docx\x24)|(.+\\.xlsx\x24)', 
+	'URL', 'DB.DBA.RDF_LOAD_MS_DOCUMENT', null, 'Microsoft Documents');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('.+\\.fod[tsg]\x24', 'URL', 'DB.DBA.RDF_LOAD_OO_DOCUMENT2', null, 'OpenOffice Documents');
+	values ('.+\\.fod[tsg]\x24', 
+	'URL', 'DB.DBA.RDF_LOAD_OO_DOCUMENT2', null, 'OpenOffice Documents');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('http://local.yahooapis.com/MapsService/V1/trafficData.*',
 	'URL', 'DB.DBA.RDF_LOAD_YAHOO_TRAFFIC_DATA', null, 'Yahoo Traffic Data');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(.+\\.ics\x24)|(.+\\.ics\?.*)', 'URL', 'DB.DBA.RDF_LOAD_ICAL', null, 'iCalendar');
+	values ('(.+\\.ics\x24)|(.+\\.ics\?.*)', 
+	'URL', 'DB.DBA.RDF_LOAD_ICAL', null, 'iCalendar');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('(text/calendar)', 'MIME', 'DB.DBA.RDF_LOAD_WEBCAL', null, 'WebCal');
+	values ('(text/calendar)', 
+	'MIME', 'DB.DBA.RDF_LOAD_WEBCAL', null, 'WebCal');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
-	values ('http[s]*://.*.facebook.com/.*',
-	'URL', 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH', null, 'FaceBook', vector ('secret', '', 'session', ''));
+	values ('.*facebook.*', 
+	'URL', 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH', null, 'Facebook (Graph API)',
+	vector ('app_secret', '', 'app_id', '', 'offline_access', '1', 'max_pages', '4', 'paging_page_size_limit', '5000'));
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
 	values ('http[s]*://.*.facebook.com/.*',
-	'URL', 'DB.DBA.RDF_LOAD_FQL', null, 'FaceBook', vector ('secret', '', 'session', ''));
+	'URL', 'DB.DBA.RDF_LOAD_FQL', null, 'Facebook (Facebook Query Language - FQL)', vector ('secret', '', 'session', ''));
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
 	values ('http://www.freebase.com/view/.*',
 	'URL', 'DB.DBA.RDF_LOAD_MQL', null, 'Freebase', vector ());
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_ENABLED)
-	values ('.*', 'MIME', 'DB.DBA.RDF_LOAD_DAV_META', null, 'WebDAV Metadata', 1);
+	values ('.*', 
+	'MIME', 'DB.DBA.RDF_LOAD_DAV_META', null, 'WebDAV Metadata', 1);
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
 	values ('http://.*.wikipedia.org.*',
@@ -322,11 +431,68 @@ insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DES
 	'URL', 'DB.DBA.RDF_LOAD_MBZ', null, 'Musicbrainz');
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
-	values ('(http://api.crunchbase.com/v/1/.*)|(http://www.crunchbase.com/.*)|(http://crunchbase.com/.*)',
+	values ('(http://api.crunchbase.com/v/1/.*)|'||
+	'(http://www.crunchbase.com/.*)|'||
+	'(http://crunchbase.com/.*)',
 	'URL', 'DB.DBA.RDF_LOAD_CRUNCHBASE', null, 'CrunchBase', null);
 
 insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
-	values ('.+\\.pptx\x24', 'URL', 'DB.DBA.RDF_LOAD_PPTX_DOCUMENT', null, 'Powerpoint documents', null);
+	values ('.+\\.pptx\x24', 
+	'URL', 'DB.DBA.RDF_LOAD_PPTX_DOCUMENT', null, 'Powerpoint documents', null);
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
+	values ('http://.*.linkedin.com/.*', 
+	'URL', 'DB.DBA.RDF_LOAD_LINKEDIN', null, 'LinkedIn', 
+	vector ('consumer_key', '', 'consumer_secret', '', 'consumer_name', ''));
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
+	values ('http://twitter.com/.*', 
+	'URL', 'DB.DBA.RDF_LOAD_TWITTER_V2', null, 'Twitter v2',
+	vector ('consumer_key', '', 'consumer_secret', '', 
+	'friends_n_followers_pg_limit', '0', 
+	'friends_n_followers_item_limit', '100',
+    'favorites_pg_limit', '5',
+    'user_timeline_pg_limit', '5'));
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS)
+    values ('https?://plus.google.com/.*', 
+    'URL', 'DB.DBA.RDF_LOAD_GOOGLE_PLUS', null, 'Google+',
+	vector ('max_activity_pages', '1', 'max_comment_pages', '1', 'items_per_activity_page', '50', 'items_per_comment_page', '50'));
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('http://(www\\.)?overstock.com/.*\\.(html|htm)(\\?.*)?',
+	'URL', 'DB.DBA.RDF_LOAD_OVERSTOCK', null, 'Overstock');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+	values ('http://www.csnstores.com/.*|http://www.bifter.co.uk/.*|http://www.hingly.com/.*|http://www.gnoss.com/.*',
+	'URL', 'DB.DBA.RDF_LOAD_RDFA_CARTRIDGE', null, 'RDFa');
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_ENABLED)
+	values ('text/html',
+	'MIME', 'DB.DBA.RDF_LOAD_RDFA_NP_CARTRIDGE', null, 'RDFa (no translation)', 0);
+
+insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_OPTIONS, RM_ENABLED)
+    values ('http://.*.nytimes.com/.*', 'URL', 'DB.DBA.RDF_LOAD_NYT_ARTICLE', null, 'NYT Article', null, 0);
+
+update DB.DBA.SYS_RDF_MAPPERS 
+    set RM_DESCRIPTION = 'Facebook (Facebook Query Language - FQL)'
+	where RM_HOOK = 'DB.DBA.RDF_LOAD_FQL';
+
+-- Force an update to the Facebook cartridge name if its already registered
+update DB.DBA.SYS_RDF_MAPPERS 
+    set RM_PATTERN = '.*facebook.*', RM_DESCRIPTION = 'Facebook (Graph API)'
+	where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH';
+
+-- Disable old Twitter cartridge in favour of DB.DBA.RDF_LOAD_TWITTER_V2
+update DB.DBA.SYS_RDF_MAPPERS set RM_ENABLED = 0 where RM_HOOK = 'DB.DBA.RDF_LOAD_TWITTER';
+
+-- Disable old Google profile cartridge in favour of DB.DBA.RDF_LOAD_GOOGLE_PLUS
+update DB.DBA.SYS_RDF_MAPPERS set RM_ENABLED = 0 where RM_HOOK = 'DB.DBA.RDF_LOAD_GOOGLE_PROFILE';
+
+-- Ensure previously installed Google+ cartridges have options entries 
+update DB.DBA.SYS_RDF_MAPPERS 
+    set RM_OPTIONS = vector ('max_activity_pages', '1', 'max_comment_pages', '1', 'items_per_activity_page', '50', 'items_per_comment_page', '50')
+    where RM_HOOK = 'DB.DBA.RDF_LOAD_GOOGLE_PLUS' and RM_OPTIONS is null;
 
 update DB.DBA.SYS_RDF_MAPPERS set RM_ENABLED = 1 where RM_ENABLED is null;
 
@@ -341,10 +507,12 @@ update DB.DBA.SYS_RDF_MAPPERS set RM_PATTERN =
     '(http://reviews.cnet.com/.*)'
     where RM_HOOK = 'DB.DBA.RDF_LOAD_CNET';
 
-update DB.DBA.SYS_RDF_MAPPERS set RM_PATTERN = '(http://cgi.sandbox.ebay.com/.*)|(http://cgi.ebay.com/.*)'
+update DB.DBA.SYS_RDF_MAPPERS 
+    set RM_PATTERN = '(http://cgi.sandbox.ebay.com/.*)|(http://cgi.ebay.com/.*)|(http://cgi.ebay.de/.*)|(http://www.ebay.co.uk/.*)|(http://www.ebay.com/.*)'
     where RM_HOOK = 'DB.DBA.RDF_LOAD_EBAY_ARTICLE';
 
-update DB.DBA.SYS_RDF_MAPPERS set RM_PATTERN =
+update DB.DBA.SYS_RDF_MAPPERS 
+    set RM_PATTERN =	
 	'(http://.*amazon.[^/]+/gp/product/.*)|'||
 	'(http://.*amazon.[^/]+/o/ASIN/.*)|'||
 	'(http://.*amazon.[^/]+/[^/]+/dp/[^/]+(/.*)?)|'||
@@ -352,49 +520,41 @@ update DB.DBA.SYS_RDF_MAPPERS set RM_PATTERN =
 	'(http://.*amazon.[^/]+/[^/]+/product-reviews/.*)|'||
 	'(http://.*amazon.[^/]+/s\?.*)|'||
 	'(http://.*amazon.[^/]+/exec/obidos/ASIN/.*)|' ||
-        '(http://.*amazon.[^/]+/gp/registry/wishlist/.*)|' ||
+    '(http://.*amazon.[^/]+/gp/registry/wishlist/.*)|' ||
 	'(http://.*amazon.[^/]+/exec/obidos/tg/detail/-/[^/]+/.*)'
 	where RM_HOOK = 'DB.DBA.RDF_LOAD_AMAZON_ARTICLE';
 
-update DB.DBA.SYS_RDF_MAPPERS 
-	set RM_PATTERN = 'http://.*delicious.com/.*'
+update DB.DBA.SYS_RDF_MAPPERS
+	set RM_PATTERN = '(http://.*delicious.com/.*)|(http://del.icio.us/.*)'
 	where RM_HOOK = 'DB.DBA.RDF_LOAD_DELICIOUS';
 
-insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('http://(www\\.)?overstock.com/.*\\.(html|htm)(\\?.*)?',
-	'URL', 'DB.DBA.RDF_LOAD_OVERSTOCK', null, 'Overstock');
-
-insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-	values ('http://www.csnstores.com/.*|http://www.bifter.co.uk/.*|http://www.hingly.com/.*|http://www.gnoss.com/.*',
-	'URL', 'DB.DBA.RDF_LOAD_RDFA_CARTRIDGE', null, 'RDFa');
-
-insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION, RM_ENABLED)
-	values ('text/html',
-	'MIME', 'DB.DBA.RDF_LOAD_RDFA_NP_CARTRIDGE', null, 'RDFa (no translation)', 0);
-
+update DB.DBA.SYS_RDF_MAPPERS 
+	set RM_PATTERN = '(https?://www.groupon.com/.*)'
+	where RM_HOOK = 'DB.DBA.RDF_LOAD_GROUPON';
+	
 -- migration from old servers
 create procedure DB.DBA.RM_MAPPERS_UPGRADE ()
 {
-  declare pk any;
-  pk := DB.DBA.REPL_PK_COLS ('DB.DBA.SYS_RDF_MAPPERS');
-  if (length (pk) = 2 and pk[0][0] = 'RM_TYPE' and pk[1][0] = 'RM_PATTERN')
+    declare pk any;
+    pk := DB.DBA.REPL_PK_COLS ('DB.DBA.SYS_RDF_MAPPERS');
+    if (length (pk) = 2 and pk[0][0] = 'RM_TYPE' and pk[1][0] = 'RM_PATTERN')
     {
-      declare skip_up int;
-      skip_up := 0;
-      for select RM_HOOK from DB.DBA.SYS_RDF_MAPPERS group by 1 having count(*) > 1 do
-	{
-	  if (skip_up = 0)
-	    log_message ('The DB.DBA.SYS_RDF_MAPPERS cannot be upgraded');
-	  log_message (sprintf ('The %s cartridge is defined multiple times, remove duplicate', RM_HOOK));
-	  skip_up := skip_up + 1;
-	}
-      if (skip_up = 0)
-	{
-	  exec ('alter table DB.DBA.SYS_RDF_MAPPERS modify primary key (RM_HOOK)');
-	  log_message ('The DB.DBA.SYS_RDF_MAPPERS have been upgraded');
-	}
+        declare skip_up int;
+        skip_up := 0;
+        for select RM_HOOK from DB.DBA.SYS_RDF_MAPPERS group by 1 having count(*) > 1 do
+        {
+            if (skip_up = 0)
+                log_message ('The DB.DBA.SYS_RDF_MAPPERS cannot be upgraded');
+            log_message (sprintf ('The %s cartridge is defined multiple times, remove duplicate', RM_HOOK));
+            skip_up := skip_up + 1;
+        }
+        if (skip_up = 0)
+        {
+            exec ('alter table DB.DBA.SYS_RDF_MAPPERS modify primary key (RM_HOOK)');
+            log_message ('The DB.DBA.SYS_RDF_MAPPERS have been upgraded');
+        }
     }
-  return;
+    return;
 }
 ;
 
@@ -403,9 +563,9 @@ DB.DBA.RM_MAPPERS_UPGRADE ()
 
 create procedure RM_UPGRADE_TBL (in tbl varchar, in col varchar, in coltype varchar)
 {
-  if (exists( select top 1 1 from DB.DBA.SYS_COLS where upper("TABLE") = upper(tbl) and upper("COLUMN") = upper(col)))
-    return;
-  exec (sprintf ('alter table %s add column %s %s', tbl, col, coltype));
+    if (exists( select top 1 1 from DB.DBA.SYS_COLS where upper("TABLE") = upper(tbl) and upper("COLUMN") = upper(col)))
+        return;
+    exec (sprintf ('alter table %s add column %s %s', tbl, col, coltype));
 }
 ;
 
@@ -421,12 +581,16 @@ DB.DBA.EXEC_STMT(
 	MC_DESC long varchar,
 	MC_ENABLED int not null default 1,
 	MC_API_TYPE integer default 0,
+	MC_FAILED int default 0, 
+	MC_AVG_TIME float default 0,
 	primary key (MC_HOOK)
 )
 alter index RDF_META_CARTRIDGES on DB.DBA.RDF_META_CARTRIDGES partition cluster replicated', 0)
 ;
 
 RM_UPGRADE_TBL ('DB.DBA.RDF_META_CARTRIDGES', 'MC_API_TYPE', 'integer default 0');
+RM_UPGRADE_TBL ('DB.DBA.RDF_META_CARTRIDGES', 'MC_FAILED', 'integer default 0');
+RM_UPGRADE_TBL ('DB.DBA.RDF_META_CARTRIDGES', 'MC_AVG_TIME', 'float default 0');
 
 DB.DBA.EXEC_STMT(
 'create table DB.DBA.RDF_CARTRIDGES_LOOKUPS (
@@ -437,8 +601,11 @@ DB.DBA.EXEC_STMT(
 )
 ;
 
+-- RDF_META_CARTRIDGES_LOG is now redundant. 
+-- But the table isn't dropped to prevent errors in old versions of Conductor/Yacutia
+-- DB.DBA.EXEC_STMT('drop table DB.DBA.RDF_META_CARTRIDGES_LOG');
 DB.DBA.EXEC_STMT(
-'create table DB.DBA.RDF_META_CARTRIDGES_LOG (
+'create table DB.DBA.RDF_CARTRIDGES_LOG (
 	ML_SESSION varchar,		-- session id
 	ML_ID integer identity,		-- an unique number
 	ML_TS timestamp,		-- ts
@@ -450,66 +617,78 @@ DB.DBA.EXEC_STMT(
 	ML_RESULT long varchar,		-- transformation to rdf
 	primary key (ML_SESSION, ML_ID)
 )
-alter index RDF_META_CARTRIDGES_LOG on DB.DBA.RDF_META_CARTRIDGES_LOG partition cluster replicated', 0)
+alter index RDF_CARTRIDGES_LOG on DB.DBA.RDF_CARTRIDGES_LOG partition cluster replicated', 0)
 ;
 
+EXEC_STMT ('create table RDF_SPONGER_QUEUE (
+    RS_URI varchar, 
+	RS_QTS datetime,
+	RS_TS timestamp,
+	RS_STATE int default 0,
+	RS_ERROR long varchar,
+	RS_IP varchar,
+	RS_CURRENT_CALL varchar,
+	RS_OPTS any,
+	PRIMARY KEY (RS_URI))
+create index RDF_SPONGER_QUEUE_STAT on RDF_SPONGER_QUEUE (RS_STATE, RS_QTS)', 0);
+
+
 create procedure RM_LOG_REQUEST (in url varchar, in kwd varchar, in proc varchar)
 {
-  declare sid, pname any;
-  sid := connection_get ('__rdf_sponge_sid');
-  if (registry_get ('__rdf_sponge_debug') <> '1')
-    return;
-  if (sid is null)
-    return;
-  pname := rtrim (proc, '2');
-  pname := rtrim (pname, '_REST');
-  insert into DB.DBA.RDF_META_CARTRIDGES_LOG (ML_KEYWORDS, ML_REQUEST, ML_SESSION, ML_PROC) values (kwd, url, sid, pname);
-  connection_set ('__rdf_sponge_idn', identity_value ());
+    declare sid any;
+    sid := connection_get ('__rdf_sponge_sid');
+    if (registry_get ('__rdf_sponge_debug') <> '1')
+        return;
+    if (sid is null)
+        return;
+    insert into DB.DBA.RDF_CARTRIDGES_LOG (ML_KEYWORDS, ML_REQUEST, ML_SESSION, ML_PROC) values (kwd, url, sid, proc);
+    connection_set ('__rdf_sponge_idn', identity_value ());
 }
 ;
 
 create procedure RM_LOG_RESPONSE (in resp varchar, in hdr any)
 {
-  declare sid, idn, hdr_str any;
-  sid := connection_get ('__rdf_sponge_sid');
-  idn := connection_get ('__rdf_sponge_idn');
-  if (sid is null or idn is null)
-    return;
-  hdr_str := '';
-  foreach (varchar l in hdr) do
-    hdr_str := hdr_str || l;
-  update DB.DBA.RDF_META_CARTRIDGES_LOG set ML_RESPONSE = resp, ML_RESPONSE_HEAD = hdr_str where ML_SESSION = sid and ML_ID = idn;
+    declare sid, idn, hdr_str any;
+    sid := connection_get ('__rdf_sponge_sid');
+    idn := connection_get ('__rdf_sponge_idn');
+    if (sid is null or idn is null)
+        return;
+    hdr_str := '';
+    foreach (varchar l in hdr) do
+        hdr_str := hdr_str || l;
+    update DB.DBA.RDF_CARTRIDGES_LOG set ML_RESPONSE = resp, ML_RESPONSE_HEAD = hdr_str where ML_SESSION = sid and ML_ID = idn;
 }
 ;
 
 create procedure RM_LOG_RESULT (in res any)
 {
-  declare sid, idn any;
-  sid := connection_get ('__rdf_sponge_sid');
-  idn := connection_get ('__rdf_sponge_idn');
-  if (sid is null or idn is null)
-    return;
-  update DB.DBA.RDF_META_CARTRIDGES_LOG set ML_RESULT = res where ML_SESSION = sid and ML_ID = idn;
+    declare sid, idn any;
+    sid := connection_get ('__rdf_sponge_sid');
+    idn := connection_get ('__rdf_sponge_idn');
+    if (sid is null or idn is null)
+        return;
+    update DB.DBA.RDF_CARTRIDGES_LOG set ML_RESULT = res where ML_SESSION = sid and ML_ID = idn;
 }
 ;
 
 
 create procedure RM_LOG_CLEAR ()
 {
-  declare sid any;
-  sid := connection_get ('__rdf_sponge_sid');
-  if (sid is null)
-    return;
-  delete from DB.DBA.RDF_META_CARTRIDGES_LOG where ML_SESSION = sid;
+    declare sid any;
+    sid := connection_get ('__rdf_sponge_sid');
+    if (sid is null)
+        return;
+    delete from DB.DBA.RDF_CARTRIDGES_LOG where ML_SESSION = sid;
 }
 ;
 
 create procedure DB.DBA.MIGRATE_CALAIS ()
 {
-  insert into DB.DBA.RDF_META_CARTRIDGES (MC_HOOK, MC_TYPE, MC_PATTERN, MC_KEY, MC_OPTIONS, MC_DESC, MC_ENABLED)
-      select RM_HOOK, RM_TYPE, RM_PATTERN, RM_KEY, RM_OPTIONS, RM_DESCRIPTION, RM_ENABLED from DB.DBA.SYS_RDF_MAPPERS
-      where RM_HOOK = 'DB.DBA.RDF_LOAD_CALAIS';
-  delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_CALAIS';
+    insert into DB.DBA.RDF_META_CARTRIDGES (MC_HOOK, MC_TYPE, MC_PATTERN, MC_KEY, MC_OPTIONS, MC_DESC, MC_ENABLED)
+    select RM_HOOK, RM_TYPE, RM_PATTERN, RM_KEY, RM_OPTIONS, RM_DESCRIPTION, RM_ENABLED 
+        from DB.DBA.SYS_RDF_MAPPERS
+        where RM_HOOK = 'DB.DBA.RDF_LOAD_CALAIS';
+    delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_CALAIS';
 }
 ;
 
@@ -517,38 +696,33 @@ DB.DBA.MIGRATE_CALAIS ();
 
 create procedure DB.DBA.RM_MAPPERS_SET_ORDER ()
 {
-   declare inx int;
-   declare top_arr, arr, http, html, feed, calais, fb_og, num any;
-
-   if (exists (select RM_PID, count(*) from DB.DBA.SYS_RDF_MAPPERS group by RM_PID having count(*) > 1))
-     {
-       num := (select count(*) from DB.DBA.SYS_RDF_MAPPERS);
-       inx := 1;
-       for select RM_HOOK as hook from DB.DBA.SYS_RDF_MAPPERS do
-	 {
-	   update DB.DBA.SYS_RDF_MAPPERS set RM_PID = inx where RM_HOOK = hook;
-	   inx := inx + 1;
-	 }
-     }
-
-   --http := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTTP_SESSION');
-   html := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTML_RESPONSE');
-   feed := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FEED_RESPONSE');
-   fb_og := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH_SELECTION');
---   calais := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_CALAIS');
-   top_arr := vector (html, feed, fb_og);
-
-   arr := (select DB.DBA.VECTOR_AGG (RM_PID) from DB.DBA.SYS_RDF_MAPPERS  where 0 = position (RM_PID, top_arr) order by RM_ID);
-   inx := 1;
-   arr := vector_concat (top_arr, arr);
-   foreach (int pid in arr) do
-     {
-       update DB.DBA.SYS_RDF_MAPPERS set RM_ID = inx where RM_PID = pid;
-       inx := inx + 1;
-     }
-   DB.DBA.SET_IDENTITY_COLUMN ('DB.DBA.SYS_RDF_MAPPERS', 'RM_PID', inx);
-   DB.DBA.SET_IDENTITY_COLUMN ('DB.DBA.SYS_RDF_MAPPERS', 'RM_ID', inx);
-   update DB.DBA.SYS_RDF_MAPPERS set RM_ID = 10000 + inx where RM_HOOK = 'DB.DBA.RDF_LOAD_DAV_META';
+    declare inx int;
+    declare top_arr, arr, http, html, feed, calais, fb_og, num any;
+    if (exists (select RM_PID, count(*) from DB.DBA.SYS_RDF_MAPPERS group by RM_PID having count(*) > 1))
+    {
+        num := (select count(*) from DB.DBA.SYS_RDF_MAPPERS);
+        inx := 1;
+        for select RM_HOOK as hook from DB.DBA.SYS_RDF_MAPPERS do
+        {
+            update DB.DBA.SYS_RDF_MAPPERS set RM_PID = inx where RM_HOOK = hook;
+            inx := inx + 1;
+        }
+    }
+    html := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTML_RESPONSE');
+    feed := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FEED_RESPONSE');
+    fb_og := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH');
+    top_arr := vector (html, feed, fb_og);
+    arr := (select DB.DBA.VECTOR_AGG (RM_PID) from DB.DBA.SYS_RDF_MAPPERS  where 0 = position (RM_PID, top_arr) order by RM_ID);
+    inx := 1;
+    arr := vector_concat (top_arr, arr);
+    foreach (int pid in arr) do
+    {
+        update DB.DBA.SYS_RDF_MAPPERS set RM_ID = inx where RM_PID = pid;
+        inx := inx + 1;
+    }
+    DB.DBA.SET_IDENTITY_COLUMN ('DB.DBA.SYS_RDF_MAPPERS', 'RM_PID', inx);
+    DB.DBA.SET_IDENTITY_COLUMN ('DB.DBA.SYS_RDF_MAPPERS', 'RM_ID', inx);
+    update DB.DBA.SYS_RDF_MAPPERS set RM_ID = 10000 + inx where RM_HOOK = 'DB.DBA.RDF_LOAD_DAV_META';
 }
 ;
 
@@ -557,34 +731,33 @@ RM_MAPPERS_SET_ORDER ();
 -- /* to insert cartridge after another */
 create procedure RM_MAPPERS_SET_CONSEQ (in proc_1 varchar, in proc_2 varchar)
 {
-   declare inx int;
-   declare top_arr, arr, http, html, feed, calais, pid_1, pid_2, do_update any;
-
-   pid_1 := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = proc_1);
-   pid_2 := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = proc_2);
-   top_arr := (select DB.DBA.VECTOR_AGG (RM_PID) from DB.DBA.SYS_RDF_MAPPERS
-   	where RM_HOOK in ('DB.DBA.RDF_LOAD_HTTP_SESSION','DB.DBA.RDF_LOAD_HTML_RESPONSE','DB.DBA.RDF_LOAD_FEED_RESPONSE')
-	order by RM_ID);
-   arr := (select DB.DBA.VECTOR_AGG (RM_PID) from DB.DBA.SYS_RDF_MAPPERS  where 0 = position (RM_PID, top_arr) and RM_HOOK <> proc_2 order by RM_ID);
-   inx := 0;
-   do_update := 0;
-   arr := vector_concat (top_arr, arr);
-   foreach (int pid in arr) do
-     {
-       if (pid = pid_1)
-	 {
-	   inx := inx + 1;
-           update DB.DBA.SYS_RDF_MAPPERS set RM_ID = inx where RM_PID = pid_2;
-	   do_update := 1;
-	 }
-       else if (do_update)
-	 {
-           update DB.DBA.SYS_RDF_MAPPERS set RM_ID = inx where RM_PID = pid;
-	 }
-       inx := inx + 1;
-     }
-   DB.DBA.SET_IDENTITY_COLUMN ('DB.DBA.SYS_RDF_MAPPERS', 'RM_PID', inx);
-   update DB.DBA.SYS_RDF_MAPPERS set RM_ID = 10000 + inx where RM_HOOK = 'DB.DBA.RDF_LOAD_DAV_META';
+    declare inx int;
+    declare top_arr, arr, http, html, feed, calais, pid_1, pid_2, do_update any;
+    pid_1 := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = proc_1);
+    pid_2 := (select RM_PID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = proc_2);
+    top_arr := (select DB.DBA.VECTOR_AGG (RM_PID) from DB.DBA.SYS_RDF_MAPPERS
+        where RM_HOOK in ('DB.DBA.RDF_LOAD_HTTP_SESSION','DB.DBA.RDF_LOAD_HTML_RESPONSE','DB.DBA.RDF_LOAD_FEED_RESPONSE')
+        order by RM_ID);
+    arr := (select DB.DBA.VECTOR_AGG (RM_PID) from DB.DBA.SYS_RDF_MAPPERS  where 0 = position (RM_PID, top_arr) and RM_HOOK <> proc_2 order by RM_ID);
+    inx := 0;
+    do_update := 0;
+    arr := vector_concat (top_arr, arr);
+    foreach (int pid in arr) do
+    {
+        if (pid = pid_1)
+        {
+            inx := inx + 1;
+            update DB.DBA.SYS_RDF_MAPPERS set RM_ID = inx where RM_PID = pid_2;
+            do_update := 1;
+        }
+        else if (do_update)
+        {
+            update DB.DBA.SYS_RDF_MAPPERS set RM_ID = inx where RM_PID = pid;
+        }
+        inx := inx + 1;
+    }
+    DB.DBA.SET_IDENTITY_COLUMN ('DB.DBA.SYS_RDF_MAPPERS', 'RM_PID', inx);
+    update DB.DBA.SYS_RDF_MAPPERS set RM_ID = 10000 + inx where RM_HOOK = 'DB.DBA.RDF_LOAD_DAV_META';
 }
 ;
 
@@ -732,19 +905,24 @@ insert replacing DB.DBA.SYS_GRDDL_MAPPING (GM_NAME, GM_PROFILE, GM_XSLT)
     values ('xFolk', '', registry_get ('_rdf_mappers_path_') || 'xslt/main/xfolk2rdf.xsl')
 ;
 
-create procedure DB.DBA.RM_XLAT_CONCAT (in x any, in y any)
+create procedure DB.DBA.RM_XLAT_CONCAT (in x any, in p any, in s_or_o any, in y any)
 {
-  if (not isstring (x))
-    return x;
-  if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1')
-    return x;
-  return DB.DBA.RDF_PROXY_ENTITY_IRI(x);
+    --dbg_obj_print_vars (x, p);
+    if (not isstring (x))
+      return x;
+    if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1')
+      return x;
+    if (http_mime_type (x) like 'image/%' or (s_or_o = 'o' and p = UNAME'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'))
+      {
+        return x;
+      }
+    return DB.DBA.RDF_PROXY_ENTITY_IRI(x);
 }
 ;
 
 EXEC_STMT ('grant execute on DB.DBA.RM_XLAT_CONCAT to "SPARQL_SPONGE"', 0);
 
-create procedure DB.DBA.RM_RDF_SPONGE_ERROR (in pname varchar, in graph_iri varchar, in dest varchar, in sql_message varchar)
+create procedure DB.DBA.RM_RDF_SPONGE_ERROR (in triple_dict any, in pname varchar, in graph_iri varchar, in dest varchar, in sql_message varchar)
 {
   declare gr, errs_iri, err_iri, nam any;
   if (0 = length (sql_message) or pname is null)
@@ -756,15 +934,47 @@ create procedure DB.DBA.RM_RDF_SPONGE_ERROR (in pname varchar, in graph_iri varc
   nam := lower (name_part (pname, 2));
   err_iri := gr ||'#'||nam;
   errs_iri := gr||'#errors';
-  DB.DBA.RDF_QUAD_URI (gr, RM_SPONGE_DOC_IRI (gr), 'http://www.openlinksw.com/schema/attribution#hasErrors', errs_iri);
-  DB.DBA.RDF_QUAD_URI (gr, errs_iri, 'http://www.openlinksw.com/schema/attribution#hasError', err_iri);
-  DB.DBA.RDF_QUAD_URI_L (gr, err_iri, 'http://www.openlinksw.com/schema/attribution#errorText', sql_message);
+  declare ss any;
+  ss := string_output ();
+  http (sprintf ('<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:opl="http://www.openlinksw.com/schema/attribution#">'), ss);
+  http (sprintf ('  <rdf:Description rdf:about="%V">', RM_SPONGE_DOC_IRI (gr)), ss);
+  http (sprintf ('    <opl:hasErrors rdf:resource="%V"/>', errs_iri), ss);
+  http (sprintf ('  </rdf:Description>'), ss);
+  http (sprintf ('  <rdf:Description rdf:about="%V">', errs_iri), ss);
+  http (sprintf ('    <opl:hasError rdf:resource="%V"/>', err_iri), ss);
+  http (sprintf ('  </rdf:Description>'), ss);
+  http (sprintf ('  <rdf:Description rdf:about="%V">', err_iri), ss);
+  http (sprintf ('    <opl:errorText>%V</opl:errorText>', sql_message), ss);
+  http (sprintf ('  </rdf:Description>'), ss);
+  http (sprintf ('</rdf:RDF>'), ss);
+  ss := string_output_string (ss);
+  if (triple_dict is not null)
+    DB.DBA.RDF_RDFXML_LOAD_DICT (ss, gr, gr, triple_dict);
+  else
+    DB.DBA.RDF_LOAD_RDFXML (ss, gr, gr);
   return;
 }
 ;
 
+create procedure DB.DBA.RM_RDF_RDFXML_LOAD_DICT (in strg varchar, in base varchar, in graph varchar, in triple_dict any)
+{
+  if (triple_dict is not null)
+    DB.DBA.RDF_RDFXML_LOAD_DICT (strg, base, graph, triple_dict);
+  else
+    RDF_LOAD_RDFXML (strg, base, graph);
+}
+;
+
+create procedure DB.DBA.RM_RDF_TTL_LOAD_DICT (in strg varchar, in base varchar, in graph varchar, in triple_dict any)
+{
+  if (triple_dict is not null)
+    DB.DBA.RDF_TTL_LOAD_DICT (strg, base, graph, triple_dict);
+  else
+    TTLP (strg, base, graph);
+}
+;
 -- helper procedures
-create procedure DB.DBA.RM_RDF_LOAD_RDFXML (in strg varchar, in base varchar, in graph varchar, in doc_iri_flag int := 1, in long_str int := 0)
+create procedure DB.DBA.RM_RDF_LOAD_RDFXML (inout triple_dict any, in strg varchar, in base varchar, in graph varchar, in doc_iri_flag int := 1, in long_str int := 0)
 {
   declare nss, ses, dict, triples, ntriples any;
   nss := xmlnss_get (xtree_doc (strg));
@@ -778,6 +988,16 @@ create procedure DB.DBA.RM_RDF_LOAD_RDFXML (in strg varchar, in base varchar, in
       http (sprintf ('<%s> opl:isDescribedUsing <%s> .\n', case when doc_iri_flag then RDF_SPONGE_PROXY_IRI (graph) else graph end, nss[i+1]), ses);
       http (sprintf ('<%s> opl:hasNamespacePrefix "%s" .\n', nss[i+1], nss[i]), ses);
     }
+
+  if (triple_dict is not null)
+    {
+      --string_to_file ('rdf.xml', strg, -2);
+      DB.DBA.RDF_RDFXML_LOAD_DICT (strg, base, graph, triple_dict);
+      DB.DBA.RDF_TTL_LOAD_DICT (ses, base, graph, triple_dict);
+      DB.DBA.RM_LOG_RESULT (strg);
+      return;
+    }
+
   if (long_str = 0)
     {
       dict := DB.DBA.RDF_RDFXML_TO_DICT (strg, base, graph);
@@ -795,14 +1015,15 @@ create procedure DB.DBA.RM_RDF_LOAD_RDFXML (in strg varchar, in base varchar, in
     }
   else
     {
-  DB.DBA.RDF_LOAD_RDFXML (strg, base, graph);
+      DB.DBA.RDF_LOAD_RDFXML (strg, base, graph);
     }
   -- INFO: may be this should be done when primaryTopic is set
+  DB.DBA.RM_LOG_RESULT (strg);
   DB.DBA.TTLP (ses, base, graph);
 }
 ;
 
-create procedure DB.DBA.RM_ADD_PRV (in proc varchar, in base varchar, in graph varchar, in service_url varchar)
+create procedure DB.DBA.RM_ADD_PRV (inout triple_dict any, in proc varchar, in base varchar, in graph varchar, in service_url varchar)
 {
   declare ses, iri, h any;
 
@@ -811,9 +1032,11 @@ create procedure DB.DBA.RM_ADD_PRV (in proc varchar, in base varchar, in graph v
   if (not isstring (service_url))
     service_url := base;
   if (length (service_url) > 1500)
-    return;  
+    return;
   h := rfc1808_parse_uri (service_url);
-  h [3] := ''; h [4] := ''; h [5] := '';
+    h [3] := '';
+    h [4] := ''; 
+    h [5] := '';
   service_url := DB.DBA.vspx_uri_compose (h);
   proc := cast (proc as varchar);
   ses := string_output ();
@@ -836,14 +1059,39 @@ create procedure DB.DBA.RM_ADD_PRV (in proc varchar, in base varchar, in graph v
   http('	</prv:retrievedBy>', ses);
   http('    </prv:DataItem>', ses);
   http('</rdf:RDF>', ses);
+  if (triple_dict is not null)
+    {
+      DB.DBA.RDF_RDFXML_LOAD_DICT (ses, base, graph, triple_dict);
+      return;
+    }
   DB.DBA.RDF_LOAD_RDFXML (ses, DB.DBA.RDF_SPONGE_PROXY_IRI (base), graph);
 }
 ;
 
-create procedure RM_CLEAN_DEST (in dest varchar, in graph_iri varchar, in new_origin_uri varchar, inout opts any)
+create procedure RM_CLEAN_DEST (inout triple_dict any, in dest varchar, in graph_iri varchar, in new_origin_uri varchar, inout opts any, in clear_triple_dict int := 0)
 {
+  declare deadl int;
   if (get_keyword ('disable-clean', opts, '') = 'Y')
     return;
+    if ((registry_get ('__rdf_sponge_force_triple_dict_clean') = '1' or clear_triple_dict > 0) and triple_dict is not null)
+    {
+      dict_zap (triple_dict, 2);
+      return;
+    }
+    if (get_keyword ('get:soft', opts, '') = 'add')
+      return;
+  deadl := 5;
+  declare exit handler for sqlstate '40001' 
+    {
+      rollback work;
+      deadl := deadl - 1;
+      if (deadl >= 0)
+	{
+	  goto again;
+	}
+      resignal;
+    };
+  again:;
   DB.DBA.SPARUL_CLEAR (coalesce (dest, graph_iri), 1, 0);
 }
 ;
@@ -868,12 +1116,34 @@ create procedure DB.DBA.RM_UMBEL_GET (in strg varchar)
 }
 ;
 
+create function DB.DBA.html2text(in content long varchar)
+{
+  -- remove HTML/XML tag markup 
+  declare _ret_body long varchar;
+  _ret_body:=regexp_replace(content, '<[^>]*>', '', 1, null);
+  _ret_body:=regexp_replace(_ret_body, '  *', ' ', 1, null);
+  _ret_body:=regexp_replace(_ret_body, '  *', ' ', 1, null);
+  return _ret_body;
+};
+
 create procedure DB.DBA.XSLT_REGEXP_MATCH (in pattern varchar, in val varchar)
 {
   return regexp_match (pattern, val);
 }
 ;
 
+create procedure DB.DBA.DI_URI (in str varchar)
+{
+  declare sha, ret any;
+  if (str like 'mailto:%')
+    str := subseq (str, 7);
+  sha := xenc_sha1_digest (str);
+  sha := replace (replace (rtrim (sha, '='), '+', '-'), '/', '_');
+  ret := sprintf ('di:sha1;%s', sha);
+  return ret;
+}
+;
+
 create procedure DB.DBA.XSLT_SPLIT_AND_DECODE (in val varchar, in md int, in pattern varchar)
 {
   declare x, ses any;
@@ -924,20 +1194,20 @@ create procedure DB.DBA.XSLT_STRING2ISO_DATE3 (in val varchar)
     return null;
   tmp := sprintf_inverse (val, '%sT%s', 0);
   if (length(tmp) > 1)
+  {
+	if (length(tmp[0]) = 8 and length(tmp[1]) = 6)
 	{
-	if (length(tmp[0]) = 8 and length(tmp[1]) = 6)	
-		{
 		tmp := left(val, 13);
 		ret := stringdate(tmp);
 		tmp := atoi(right(val, 2));
 		ret := dateadd('second', tmp, ret);
-		}
-		else
+	}
+	else
 		return val;
 	ret := date_iso8601 (ret);
     if (ret is not null)
 		return ret;
-	}
+  }
   return val;
 }
 ;
@@ -979,8 +1249,7 @@ create procedure DB.DBA.XSLT_HTTP_STRING_DATE (in val varchar)
 	return ret;
     }
   -- Wed Dec 10 21:24:54 EST 2008
-  if (regexp_match ('[[:upper:]][[:lower:]]{2} [[:upper:]][[:lower:]]{2} [0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [[:upper:]]{2,} [0-9]{4,}', val)
-      is not null)
+    if (regexp_match ('[[:upper:]][[:lower:]]{2} [[:upper:]][[:lower:]]{2} [0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [[:upper:]]{2,} [0-9]{4,}', val) is not null)
     {
       tmp := sprintf_inverse (val, '%s %s %s %s %s %s', 0);
       if (tmp is not null and length (tmp) > 5)
@@ -991,7 +1260,7 @@ create procedure DB.DBA.XSLT_HTTP_STRING_DATE (in val varchar)
 	  if (tz is not null)
 	    ret := dt_set_tz (ret, tz);
 	  else
-	  ret := dt_set_tz (ret, 0);
+	    ret := dt_set_tz (ret, 0);
 	  ret := date_iso8601 (ret);
 	  if (ret is not null)
 	    return ret;
@@ -1025,74 +1294,121 @@ create procedure DB.DBA.XSLT_HTTP_STRING_DATE (in val varchar)
 }
 ;
 
+create procedure DB.DBA.XSLT_TRIM (in val varchar, in tr varchar)
+{
+	if (val is not null and length(val) > 0)
+	{
+		if (tr is not null and length(tr) > 0)
+			return trim(val, tr);
+		else
+			return trim(val);
+	}
+	return null;
+}
+;
+
 create procedure DB.DBA.XSLT_REPLACE1 (in val varchar)
 {
-  val := replace (val, '(', '%28');
-  val := replace (val, ')', '%29');
-	return replace (val, '\'', '%27');
+    val := replace (val, '(', '%28');
+    val := replace (val, ')', '%29');
+    return replace (val, '\'', '%27');
 }
 ;
 
 create procedure DB.DBA.XSLT_SHA1_HEX (in val varchar)
 {
-  return tree_sha1 (val, 1);
+    return tree_sha1 (val, 1);
 }
 ;
 
 create procedure DB.DBA.XSLT_STR2DATE (in val varchar)
 {
-  declare ret any;
-  ret := null;
-  if (val like '[A-Za-z]* [0-9]*')
+    declare ret any;
+    ret := null;
+    if (val like '[A-Za-z]* [0-9]*')
     {
-      declare dt, pos, tmp, v any;
-      v := trim (val, '+');
-      pos := strchr (v, ' ');
-      tmp := subseq (v, 0, pos);
-      dt := trim(tmp);
-      tmp := trim (subseq (v, pos));
-      dt := 'Wee, ' || tmp || ' ' || dt || sprintf (' %d 00:00:00 GMT', year (now ()));
-      ret := http_string_date (dt, null, null);
+        declare dt, pos, tmp, v any;
+        v := trim (val, '+');
+        pos := strchr (v, ' ');
+        tmp := subseq (v, 0, pos);
+        dt := trim(tmp);
+        tmp := trim (subseq (v, pos));
+        dt := 'Wee, ' || tmp || ' ' || dt || sprintf (' %d 00:00:00 GMT', year (now ()));
+        ret := http_string_date (dt, null, null);
     }
-  else
-    ret := http_string_date (val, null, null);
-  if (ret is not null)
+    else
+        ret := http_string_date (val, null, null);
+    if (ret is not null)
     {
-      ret := dt_set_tz (ret, 0);
-      ret := date_iso8601 (ret);
+        ret := dt_set_tz (ret, 0);
+        ret := date_iso8601 (ret);
+    }
+    return coalesce (ret, val);
+}
+;
+
+create procedure DB.DBA.XSLT_DI_SPLIT (in str varchar)
+{
+    declare di, h, dgst varchar;
+    declare ses any;
+    ses := string_output ();
+    http ('<result>', ses);
+    while (di := regexp_match ('di:[^ <>]+', str, 1) is not null)
+    {
+        dbg_obj_print (di);
+        h := WS.WS.PARSE_URI (di);
+        dgst := bin2hex (cast (decode_base64 (replace (replace (h[3], '-', '+'), '_', '/')) as varbinary));
+        http (sprintf ('<di><dgst>%V</dgst><hash>%V</hash></di>', h[2], dgst), ses);
     }
-  return coalesce (ret, val);
+    http ('</result>', ses);
+    return xtree_doc (ses);
 }
 ;
 
 create procedure DB.DBA.RDF_SPONGE_DOC_IRI (in url varchar, in dest varchar := null)
 {
-  declare res varchar;
-  res := coalesce (url, dest);
-  return res;
+    declare res varchar;
+    res := coalesce (url, dest);
+    return res;
 }
 ;
 
+create procedure RM_CONTENT_TYPE_IS_RDF (in ret_content_type any)
+{
+    if (strstr (ret_content_type, 'application/rdf+xml') is not null or
+        strstr (ret_content_type, 'text/rdf+n3') is not null or
+        strstr (ret_content_type, 'text/n3') is not null or
+        strstr (ret_content_type, 'text/rdf+ttl') is not null or
+        strstr (ret_content_type, 'text/rdf+turtle') is not null or
+        strstr (ret_content_type, 'text/turtle') is not null or
+        strstr (ret_content_type, 'application/rdf+n3') is not null or
+        strstr (ret_content_type, 'application/rdf+turtle') is not null or
+        strstr (ret_content_type, 'application/turtle') is not null or
+        strstr (ret_content_type, 'application/x-turtle') is not null )
+        return 1;
+    return 0;
+}
+;
 
 --
 -- # this returns document IRI, non-proxy one
 --
 create procedure DB.DBA.RM_SPONGE_DOC_IRI (in url varchar, in frag varchar := 'this')
 {
-  declare hf, uri any;
-  hf := rfc1808_parse_uri (url);
-  if (hf[5] = '')
-    hf[5] := frag;
-  uri := vspx_uri_compose (hf);
-  return uri;
+    declare hf, uri any;
+    hf := rfc1808_parse_uri (url);
+    if (hf[5] = '')
+        hf[5] := frag;
+    uri := vspx_uri_compose (hf);
+    return uri;
 }
 ;
 
 create procedure DB.DBA.RDF_SPONGE_IRI_SCH ()
 {
-  if (is_https_ctx ())
-    return 'https';
-  return 'http';
+    if (is_https_ctx ())
+        return 'https';
+    return 'http';
 }
 ;
 
@@ -1101,53 +1417,63 @@ create procedure DB.DBA.RDF_SPONGE_IRI_SCH ()
 --
 create procedure DB.DBA.RDF_SPONGE_PROXY_IRI (in uri varchar := '', in login varchar := '', in frag varchar := 'this')
 {
-  declare cname any;
-  declare ret any;
-  declare url_sch varchar;
-  declare ua any;
-
-  cname := DB.DBA.RDF_PROXY_GET_HTTP_HOST ();
-
-  if (frag = 'this' or frag = '#this') -- comment out to do old behaviour
-    frag := '';
-
-  if (length (frag) and frag[0] <> '#'[0])
-    frag := '#' || sprintf ('%U', frag);
-  if (strchr (uri, '#') is not null)
-    frag := '';
-
-  ua := rfc1808_parse_uri (uri);
-  url_sch := ua[0];
-  ua [0] := '';
-  uri := vspx_uri_compose (ua);
-  uri := ltrim (uri, '/');
-
-  if (length (login))
-    ret := sprintf ('%s://%s/about/rdf/%s/%U/%s%s', RDF_SPONGE_IRI_SCH (), cname, url_sch, login, uri, frag);
-  else
-    ret := sprintf ('%s://%s/about/id/%s/%s%s', RDF_SPONGE_IRI_SCH (), cname, url_sch, uri, frag);
-  return ret;
+    declare cname any;
+    declare ret any;
+    declare url_sch varchar;
+    declare ua any;
+    cname := DB.DBA.RDF_PROXY_GET_HTTP_HOST ();
+    if (frag = 'this' or frag = '#this') -- comment out to do old behaviour
+        frag := '';
+    if (length (frag) and frag[0] <> '#'[0])
+        frag := '#' || sprintf ('%U', frag);
+    if (strchr (uri, '#') is not null)
+        frag := '';
+    --if (http_mime_type (uri) like 'image/%')
+    --return uri;
+    ua := rfc1808_parse_uri (uri);
+    url_sch := ua[0];
+    ua [0] := '';
+    uri := vspx_uri_compose (ua);  
+    uri := ltrim (uri, '/');
+    if (length (login))
+        ret := sprintf ('%s://%s/about/rdf/%s/%U/%s%s', RDF_SPONGE_IRI_SCH (), cname, url_sch, login, uri, frag);
+    else
+        ret := sprintf ('%s://%s/about/id/%s/%s%s', RDF_SPONGE_IRI_SCH (), cname, url_sch, uri, frag);
+    return ret;
 }
 ;
 
 create function DB.DBA.RDF_PROXY_GET_HTTP_HOST ()
 {
-  declare default_host, cname varchar;
-  if (is_http_ctx ())
-    default_host := http_request_header(http_request_header (), 'Host', null, null);
-  else if (connection_get ('__http_host') is not null)
-    default_host := connection_get ('__http_host');
-  else
-    default_host := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
-  if (default_host is not null)
-    cname := default_host;
-  else
-  {
-    cname := sys_stat ('st_host_name');
-    if (server_http_port () <> '80')
-        cname := cname ||':'|| server_http_port ();
-  }
-  return cname;
+    declare default_host, cname varchar;
+    if (is_http_ctx ())
+        default_host := http_request_header(http_request_header (), 'Host', null, null);
+    else if (connection_get ('__http_host') is not null)
+        default_host := connection_get ('__http_host');
+    else
+        default_host := cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost');
+    if (default_host is not null)
+        cname := default_host;
+    else
+    {
+        cname := sys_stat ('st_host_name');
+        if (server_http_port () <> '80')
+            cname := cname ||':'|| server_http_port ();
+    }
+    return cname;
+}
+;
+
+EXEC_STMT ('create table DB.DBA.RDF_PROXY_IRI_MAP (RPIM_IRI IRI_ID_8, RPIM_SOURCE_IRI IRI_ID_8, primary key (RPIM_IRI, RPIM_SOURCE_IRI))', 0);
+
+create procedure RDF_SPONGE_PROXY_IRI_MAP (in uri_identifier varchar, in graph varchar)
+{
+  declare cname, id, ret varchar;
+  cname := DB.DBA.RDF_PROXY_GET_HTTP_HOST ();
+  id := bin2hex (cast (decode_base64 (xenc_sha1_digest (uri_identifier)) as varbinary));
+  ret := sprintf ('%s://%s/proxy-iri/%s', RDF_SPONGE_IRI_SCH (), cname, id);
+  insert soft DB.DBA.RDF_PROXY_IRI_MAP (RPIM_IRI, RPIM_SOURCE_IRI) values (iri_to_id (ret), iri_to_id (graph));
+  return ret;
 }
 ;
 
@@ -1158,7 +1484,7 @@ create procedure DB.DBA.RDF_PROXY_ENTITY_IRI (in uri varchar := '', in login var
 {
   declare cname any;
   declare ret any;
-  declare url_sch varchar;
+  declare url_sch, local_prx varchar;
   declare ua any;
 
   cname := DB.DBA.RDF_PROXY_GET_HTTP_HOST ();
@@ -1173,12 +1499,19 @@ create procedure DB.DBA.RDF_PROXY_ENTITY_IRI (in uri varchar := '', in login var
   if (strchr (uri, '#') is not null)
     frag := '';
 
+  --if (http_mime_type (uri) like 'image/%')
+  --  return uri;
+
+  local_prx := sprintf ('%s://%s/about/id/entity/%%', RDF_SPONGE_IRI_SCH (), cname);
+
+  if (uri like local_prx)
+    return uri; 
+
   ua := rfc1808_parse_uri (uri);
   url_sch := ua[0];
   ua [0] := '';
   uri := vspx_uri_compose (ua);
   uri := ltrim (uri, '/');
-
   ret := sprintf ('%s://%s/about/id/entity/%s/%s%s', RDF_SPONGE_IRI_SCH (), cname, url_sch, uri, frag);
   return ret;
 }
@@ -1260,83 +1593,80 @@ create procedure DB.DBA.RDF_CONVERT_TO_XTREE (in code varchar)
 	declare pos int;
 	tmp := code;
 	pos := strstr(cast(tmp as varchar), '<ul>');
-	if (pos > 0)
+	if (pos >= 0)
 		tmp := subseq(tmp, pos);
 	else
 		tmp := '<ul/>';
-	tmp:= xtree_doc(tmp);
+	tmp:= xtree_doc(tmp, 2);
 	return tmp;
 }
 ;
 
 create procedure DB.DBA.RDF_SPONGE_DBP_IRI (in base varchar, in word varchar)
 {
-  declare res, xp, xt, url varchar;
-  declare uri varchar;
-  declare st int;
-  declare dbp_iri any;
-
-  declare exit handler for sqlstate '*' {
-    return base || '#' || word;
-  };
-
-  uri := MOAT_APPLY (http_dav_uid (), word);
-  if (uri is not null)
+    declare res, xp, xt, url varchar;
+    declare uri varchar;
+    declare st int;
+    declare dbp_iri any;
+    declare exit handler for sqlstate '*' 
     {
-      return uri;
-    }
-
-  if (word[0] >= 'a'[0] and word[0] <= 'z'[0])
-    word[0] := word[0] - 32;
-  word := replace (word, ' ', '_');
-  url := sprintf ('http://dbpedia.org/resource/%U', word);
-  dbp_iri := iri_to_id (url);
-  st := (select CL_STAT from RDF_CARTRIDGES_LOOKUPS where CL_URI = dbp_iri);
-  if (st = 1)
-    return url;
-  else if (st = 0)
+        return base || '#' || word;
+    };
+    uri := MOAT_APPLY (http_dav_uid (), word);
+    if (uri is not null)
+    {
+        return uri;
+    }
+    if (word[0] >= 'a'[0] and word[0] <= 'z'[0])
+        word[0] := word[0] - 32;
+    word := replace (word, ' ', '_');  
+    url := sprintf ('http://dbpedia.org/resource/%U', word);  
+    dbp_iri := iri_to_id (url);
+    st := (select CL_STAT from RDF_CARTRIDGES_LOOKUPS where CL_URI = dbp_iri);
+    if (st = 1)
+        return url;
+    else if (st = 0)
+        return base || '#' || word;
+    uri := sprintf ('ask from <http://dbpedia.org> where { <%s> ?y ?z }', url);
+    res := http_client (url=>sprintf ('http://dbpedia.org/sparql?query=%U&format=xml', uri), timeout=>30, proxy=>connection_get ('sparql-get:proxy'));
+    xt := xtree_doc (res);
+    xp := cast (xpath_eval('/sparql/boolean/text()', xt) as varchar);
+    if (xp = 'true')
+    {
+        insert soft DB.DBA.RDF_CARTRIDGES_LOOKUPS (CL_URI, CL_STAT) values (dbp_iri, 1);
+        return url;
+    }
+    insert soft DB.DBA.RDF_CARTRIDGES_LOOKUPS (CL_URI, CL_STAT) values (dbp_iri, 0);
     return base || '#' || word;
-
-  uri := sprintf ('ask from <http://dbpedia.org> where { <%s> ?y ?z }', url);
-  res := http_client (url=>sprintf ('http://dbpedia.org/sparql?query=%U&format=xml', uri), timeout=>30, proxy=>connection_get ('sparql-get:proxy'));
-  xt := xtree_doc (res);
-  xp := cast (xpath_eval('/sparql/boolean/text()', xt) as varchar);
-  if (xp = 'true')
-    {
-      insert soft DB.DBA.RDF_CARTRIDGES_LOOKUPS (CL_URI, CL_STAT) values (dbp_iri, 1);
-      return url;
-    }
-  insert soft DB.DBA.RDF_CARTRIDGES_LOOKUPS (CL_URI, CL_STAT) values (dbp_iri, 0);
-  return base || '#' || word;
 }
 ;
 
 create procedure DB.DBA.RM_SAMEAS_IRI (in u varchar)
 {
-  return RDF_SPONGE_PROXY_IRI (u);
-  --if (strchr (u, '#') is null)
-  --  return u || '#this';
-  --return u;
+    return RDF_SPONGE_PROXY_IRI (u);
+    --if (strchr (u, '#') is null)
+    --  return u || '#this';
+    --return u;
 }
 ;
 
 create procedure DB.DBA.RDF_MQL_RESOLVE_IMAGE (in name varchar)
 {
-  declare qr, url, cnt, tree, xt, hdr any;
-  declare exit handler for sqlstate '*'
+    declare qr, url, cnt, tree, xt, hdr any;
+    declare exit handler for sqlstate '*'
     {
-      return '';
+        return '';
     };
-
-  qr := sprintf ('{"ROOT":{"query":{"name":"%s", "type":"/common/image", "id":{}}}}', name);
-  url := sprintf ('http://www.freebase.com/api/service/mqlread?queries=%U', qr);
-  cnt := http_client_ext (url, headers=>hdr, proxy=>connection_get ('sparql-get:proxy'));
-  tree := json_parse (cnt);
-  tree := get_keyword ('ROOT', tree);
-  tree := get_keyword ('result', tree);
-  tree := get_keyword ('id', tree);
-  tree := get_keyword ('value', tree);
-  return 'http://www.freebase.com/api/trans/image_thumb'||tree;
+    
+    qr := sprintf ('{"ROOT":{"query":{"name":"%s", "type":"/common/image", "id":{}}}}', name);
+    url := sprintf ('http://www.freebase.com/api/service/mqlread?queries=%U', qr);
+    cnt := http_client_ext (url, headers=>hdr, proxy=>connection_get ('sparql-get:proxy'));
+    tree := json_parse (cnt);
+    tree := get_keyword ('ROOT', tree);
+    tree := get_keyword ('result', tree);
+    tree := get_keyword ('id', tree);
+    tree := get_keyword ('value', tree);
+    return 'http://www.freebase.com/api/trans/image_thumb'||tree;
 }
 ;
 
@@ -1353,38 +1683,38 @@ create procedure DB.DBA.GET_XBRL_ONTOLOGY_DOMAIN(in elem varchar) returns varcha
 
 create procedure DB.DBA.GET_XBRL_ONTOLOGY_VALUE_NAME(in elem varchar) returns varchar
 {
-  declare cur, range, value, ret varchar;
-  declare pos int;
-  declare dict any;
-
-  dict := connection_get ('xbrl-value-name');
-  if (dict is null)
+    declare cur, range, value, ret varchar;
+    declare pos int;
+    declare dict any;
+    
+    dict := connection_get ('xbrl-value-name');
+    if (dict is null)
     {
-      dict := dict_new (10);
-      connection_set ('xbrl-value-name', dict);
+        dict := dict_new (10);
+        connection_set ('xbrl-value-name', dict);
     }
-  cur := 'http://www.openlinksw.com/schemas/xbrl/' || elem;
-  ret := dict_get (dict, cur);
-  if (ret is not null)
+    cur := 'http://www.openlinksw.com/schemas/xbrl/' || elem;
+    ret := dict_get (dict, cur);
+    if (ret is not null)
     {
-      return ret;
+        return ret;
     }
-  ret := 'value';
-  value := (sparql select ?s from <http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/>
-  	where {`iri(?:cur)` rdfs:range ?range . ?s rdfs:domain ?range } );
-  if (value is not null and value <> '')
+    ret := 'value';
+    value := (sparql select ?s from <http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/> 
+        where {`iri(?:cur)` rdfs:range ?range . ?s rdfs:domain ?range } );
+    if (value is not null and value <> '')
     {
-      pos := strrchr(value, '/');
-      if (pos is null or pos = 0)
-	ret := value;
-      else
+        pos := strrchr(value, '/');
+        if (pos is null or pos = 0)
+            ret := value;
+        else
         {
-          value := subseq(value, pos+1);
-          ret := value;
-	}
+            value := subseq(value, pos+1);
+            ret := value;
+        }
     }
-  dict_put (dict, cur, ret);
-  return ret;
+    dict_put (dict, cur, ret);
+    return ret;
 }
 ;
 
@@ -1393,63 +1723,63 @@ create procedure DB.DBA.GET_XBRL_ONTOLOGY_VALUE_DATATYPE(in elem varchar) return
     declare cur, range, value, ret varchar;
     declare pos int;
     declare dict any;
-
+    
     dict := connection_get ('xbrl-data-type');
     if (dict is null)
-      {
-	dict := dict_new (10);
-	connection_set ('xbrl-data-type', dict);
-      }
-
+    {
+        dict := dict_new (10);
+        connection_set ('xbrl-data-type', dict);
+    }
+    
     cur := 'http://www.openlinksw.com/schemas/xbrl/' || elem;
     ret := dict_get (dict, cur);
     if (ret is not null)
-      {
+    {
         return ret;
-      }
+    }
     range := (sparql select ?range from <http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/> where {`iri(?:cur)` rdfs:range ?range . } );
     ret := 'http://www.w3.org/2001/XMLSchema#string';
     if (range is not null and range <> '')
-      {
-	value := (sparql select ?range from <http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/> where {?s rdfs:domain `iri(?:range)` . ?s rdfs:range ?range .});
-	if (value is not null and value <> '')
-	  {
-	    ret := value;
-	  }
-	else
-	  {
-	    if (length(range) > 8)
-	      {
-		if (right(range, 8) = 'ItemType')
-		  {
-		    value := subseq(range, 0, length(range) - 8);
-		    pos := strchr(value, '#');
-		    if (pos > 0)
-		      {
-			value := subseq(value, pos + 1);
-			if (value = 'textBlock')
-			  ret := 'http://www.w3.org/2001/XMLSchema#string';
-			else if (value = 'monetary')
-			  ret := 'http://www.w3.org/2001/XMLSchema#decimal';
-			else if (value = 'shares')
-			  ret := 'http://www.w3.org/2001/XMLSchema#decimal';
-			else if (value = 'pure')
-			  ret := 'http://www.w3.org/2001/XMLSchema#decimal';
-			else if (value = 'fraction')
-			  ret := 'http://www.w3.org/2001/XMLSchema#integer';
-			else if (value = 'domain')
-			  ret := 'http://www.w3.org/2001/XMLSchema#string';
-			else if (value = 'percent')
-			  ret := 'http://www.w3.org/2001/XMLSchema#decimal';
-			else if (value = 'perShare')
-			  ret := 'http://www.w3.org/2001/XMLSchema#decimal';
-			else
-			  ret := concat('http://www.w3.org/2001/XMLSchema#', value);
-		      }
-		  }
-	      }
-	  }
-      }
+    {
+        value := (sparql select ?range from <http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/> where {?s rdfs:domain `iri(?:range)` . ?s rdfs:range ?range .});
+        if (value is not null and value <> '')
+        {
+            ret := value;
+        }
+        else
+        {
+            if (length(range) > 8)
+            {
+                if (right(range, 8) = 'ItemType')
+                {
+                    value := subseq(range, 0, length(range) - 8);
+                    pos := strchr(value, '#');
+                    if (pos > 0)
+                    {
+                        value := subseq(value, pos + 1);
+                        if (value = 'textBlock')
+                            ret := 'http://www.w3.org/2001/XMLSchema#string';
+                        else if (value = 'monetary')
+                            ret := 'http://www.w3.org/2001/XMLSchema#decimal';
+                        else if (value = 'shares')
+                            ret := 'http://www.w3.org/2001/XMLSchema#decimal';
+                        else if (value = 'pure')
+                            ret := 'http://www.w3.org/2001/XMLSchema#decimal';
+                        else if (value = 'fraction')
+                            ret := 'http://www.w3.org/2001/XMLSchema#integer';
+                        else if (value = 'domain')
+                            ret := 'http://www.w3.org/2001/XMLSchema#string';
+                        else if (value = 'percent')
+                            ret := 'http://www.w3.org/2001/XMLSchema#decimal';
+                        else if (value = 'perShare')
+                            ret := 'http://www.w3.org/2001/XMLSchema#decimal';
+                        else 
+                            ret := concat('http://www.w3.org/2001/XMLSchema#', value);
+                    }
+                }
+            }
+        }
+    }
     dict_put (dict, cur, ret);
     return ret;
 }
@@ -1475,9 +1805,9 @@ create procedure DB.DBA.GET_HTML5MD_LOCALNAME(in elem varchar) returns varchar
     pos1 := strrchr(elem, '/');
     pos2 := strrchr(elem, '#');
     if (pos2 > 0)
-        return subseq(elem, pos2+1);    
+        return subseq(elem, pos2+1);
     if (pos1 > 0)
-        return subseq(elem, pos1+1);    
+        return subseq(elem, pos1+1);
 }
 ;
 
@@ -1487,9 +1817,9 @@ create procedure DB.DBA.GET_HTML5MD_NAMESPACE(in elem varchar) returns varchar
     pos1 := strrchr(elem, '/');
     pos2 := strrchr(elem, '#');
     if (pos2 > 0)
-        return subseq(elem, 0, pos2+1);    
+        return subseq(elem, 0, pos2+1);
     if (pos1 > 0)
-        return subseq(elem, 0, pos1+1);    
+        return subseq(elem, 0, pos1+1);
 }
 ;
 
@@ -1501,22 +1831,22 @@ create procedure DB.DBA.GET_XBRL_CANONICAL_LABEL_NAME(in elem varchar) returns v
     cur := replace(cur, '_', ' ');
     if (cur is not null)
     {
-       result := chr(cur[0]);
-       for (i := 1; i < length(cur); i := i+1)
-       {
-           if  (chr(cur[i]) = upper(chr(cur[i])))
-           {
-               if (chr(cur[i - 1]) = upper(chr(cur[i - 1])) or chr(cur[i - 1]) = ' ')
-                   result := concat(result, chr(cur[i]));
-               else
-               {
-                   result := concat(result, ' ');
-                   result := concat(result, chr(cur[i]));
-               }
-           }
-           else
-               result := concat(result, chr(cur[i]));
-       }
+        result := chr(cur[0]);
+        for (i := 1; i < length(cur); i := i+1)
+        {
+            if  (chr(cur[i]) = upper(chr(cur[i])))
+            {
+                if (chr(cur[i - 1]) = upper(chr(cur[i - 1])) or chr(cur[i - 1]) = ' ')
+                    result := concat(result, chr(cur[i]));
+                else
+                {
+                    result := concat(result, ' ');
+                    result := concat(result, chr(cur[i]));
+                }
+            }
+            else
+                result := concat(result, chr(cur[i]));
+        }
         return result;
     }
     else
@@ -1529,33 +1859,56 @@ RM_UPGRADE_TBL ('DB.DBA.XBRL_CIK_CACHE', 'XC_URL', 'varchar');
 
 create procedure DB.DBA.GET_XBRL_NAME_BY_CIK (in cik varchar)
 {
-  declare url, nam, ret, cnt, xt, xp varchar;
-  declare exit handler for sqlstate '*'
+    declare url, nam, ret, cnt, xt, xp varchar;
+    declare exit handler for sqlstate '*'
     {
-      return '';
+        return '';
     };
-  whenever not found goto retr;
-  set isolation='comitted';
-  select XC_URL into ret from DB.DBA.XBRL_CIK_CACHE where XC_CIK = cik;
-  if (ret is null)
+    whenever not found goto retr;
+    set isolation='comitted';
+    select XC_URL into ret from DB.DBA.XBRL_CIK_CACHE where XC_CIK = cik;
+    if (ret is null)
     {
-      delete from XBRL_CIK_CACHE where XC_CIK = cik;
-      goto retr;
+        delete from XBRL_CIK_CACHE where XC_CIK = cik;
+        goto retr;
     }
-  return ret;
-  retr:
-  url := sprintf ('http://www.rdfabout.com/sparql?query=%U',
-  	sprintf ('select ?url ?name '||
-	' where { <http://www.rdfabout.com/rdf/usgov/sec/id/cik%s> <http://www.w3.org/2002/07/owl#sameAs> ?url ; '||
-	' <http://xmlns.com/foaf/0.1/name> ?name . }', cik));
-  cnt := http_client (url, proxy=>connection_get ('sparql-get:proxy'));
-  xt := xtree_doc (cnt);
-  url := cast (xpath_eval ('string (//binding[@name="url"]/uri)', xt) as varchar);
-  nam := cast (xpath_eval ('string (//binding[@name="name"]/literal)', xt) as varchar);
-  if (not length (url))
-    return '';
-  insert into DB.DBA.XBRL_CIK_CACHE (XC_CIK, XC_NAME, XC_URL) values (cik, nam, url);
-  return url;
+    return ret;
+    retr:
+    url := sprintf ('http://www.rdfabout.com/sparql?query=%U',
+        sprintf ('select ?url ?name '||
+        ' where { <http://www.rdfabout.com/rdf/usgov/sec/id/cik%s> <http://www.w3.org/2002/07/owl#sameAs> ?url ; '||
+        ' <http://xmlns.com/foaf/0.1/name> ?name . }', cik));
+    cnt := http_client (url, proxy=>connection_get ('sparql-get:proxy'));
+    xt := xtree_doc (cnt);
+    url := cast (xpath_eval ('string (//binding[@name="url"]/uri)', xt) as varchar);
+    nam := cast (xpath_eval ('string (//binding[@name="name"]/literal)', xt) as varchar);
+    if (not length (url))
+        return '';
+    insert into DB.DBA.XBRL_CIK_CACHE (XC_CIK, XC_NAME, XC_URL) values (cik, nam, url);
+    return url;
+}
+;
+
+create procedure DB.DBA.XENC_X509_PUB_KEY (in data varchar) returns any
+{
+    declare x, m, e, fp any;
+    data := ltrim (data, 'data:application/x-x509-user-cert;base64,');
+    x := get_certificate_info (9, decode_base64 (data), 1);
+    fp := get_certificate_info (6, decode_base64 (data), 1);
+    e := cast (x[1] as varchar);
+    m := bin2hex (x[2]);
+    return xtree_doc (sprintf ('<key><mod>%s</mod><exp>%s</exp><fp>%s</fp></key>', m, e, replace (fp, ':', '')));
+}
+;
+
+grant execute on DB.DBA.XENC_X509_PUB_KEY to public;
+
+create procedure DB.DBA.DECODEXML(in xmlstr varchar)
+{
+    -- takes XMLSTR, returns an xml tree doc
+    declare ret any;
+    ret := xtree_doc(xmlstr);
+    return ret;
 }
 ;
 
@@ -1575,26 +1928,116 @@ create procedure DB.DBA.GET_XBRL_CANONICAL_DATATYPE(in elem varchar) returns var
 
 create procedure RDF_SPONGE_URI_HASH (in u varchar)
 {
-  if (u is null)
-    return '';
-  return tridgell32 (u, 1);
+    if (u is null)
+        return '';
+    return tridgell32 (u, 1);
+}
+;
+
+create procedure DB.DBA.FORMAT_AMOUNT (in val varchar) returns varchar
+{
+	declare ret, cur varchar;
+	declare pos, cpos int;
+	cpos := 0;
+	pos := 0;
+	ret := '';
+	pos := length(val);
+	if (pos = 0)
+		return '';
+	while (pos >= 0)
+	{
+		cpos := pos - 3;
+		if (cpos < 0)
+			cpos := 0;
+		cur := subseq (val, cpos, pos);
+		ret := concat(cur, ',', ret);
+		pos := pos - 3;
+		if (cpos < 0)
+			return trim(ret, ', ');
+	}
+	return trim(ret, ', ');
+}
+;
+
+-- Convert string money values like $1.6M, $230k, $2B into decimals
+create procedure DB.DBA.XSLT_CRUNCHBASE_MONEYSTRING2DECIMAL (in val varchar)
+{
+    declare vec any;
+    declare unit, base_sval, converted_sval varchar;
+    declare base_dval decimal;
+    declare multiplier integer;
+    
+    if (val is null)
+        return null;
+    multiplier := 1;
+    converted_sval := null;
+    val := upper (val);
+    vec := regexp_parse ('([0-9\.]+)([BMK]?$)', val, 0);
+    if (vec is not null and length (vec) = 6)
+    {
+        base_sval := subseq (val, vec[2], vec[3]);
+        if (vec[4] < vec[5])
+        {
+            unit := subseq (val, vec[4]);
+            multiplier := case (unit) when 'B' then 1000000000 when 'M' then 1000000 when 'K' then 1000 else 1 end;
+            base_dval := atof (base_sval);
+        }
+        
+        if (multiplier > 1)
+            converted_sval := sprintf('%.lf', base_dval * multiplier);
+        else
+            converted_sval := base_sval; 
+    }
+    return converted_sval;
+}
+;
+
+create procedure DB.DBA.XSLT_SANEURI (in val varchar, in seed integer default -1)
+{
+    -- Generate sane URI with xml/http-safe characters, based on val and seed (xpath position)
+    declare str varchar;
+    if ( seed=-1 )
+        str:=regexp_replace(sprintf('%s', val), '[^a-zA-Z0-9_-]', '', 1, null);
+    else 
+        str:=regexp_replace(sprintf('%s_%d', val, seed), '[^a-zA-Z0-9_-]', '', 1, null); 
+    return str;
 }
 ;
 
+create function DB.DBA.DBPEDIA_URL_LABEL(in url varchar)
+{
+  -- make label from dbpedia URL
+  declare ret varchar;
+  ret:=regexp_replace(url, '^.*/', '', 1, null);
+  ret:=regexp_replace(ret, '_', ' ', 1, null);
+  ret:=regexp_replace(ret, '%21', '!', 1, null);
+  ret:=regexp_replace(ret, '%26', '&', 1, null);
+  ret:=regexp_replace(ret, '%27', '''', 1, null);
+  ret:=regexp_replace(ret, '%28', '(', 1, null);
+  ret:=regexp_replace(ret, '%29', ')', 1, null);
+  ret:=regexp_replace(ret, '%2C', ',', 1, null);
+  ret:=regexp_replace(ret, '%3F', '?', 1, null);
+  return ret;
+};
+
 grant execute on DB.DBA.RDF_MQL_RESOLVE_IMAGE to public;
 grant execute on DB.DBA.RM_UMBEL_GET to public;
 grant execute on DB.DBA.XSLT_REGEXP_MATCH to public;
 grant execute on DB.DBA.XSLT_SPLIT_AND_DECODE to public;
+grant execute on DB.DBA.DI_URI to public;
 grant execute on DB.DBA.XSLT_UNIX2ISO_DATE to public;
 grant execute on DB.DBA.XSLT_SHA1_HEX to public;
 grant execute on DB.DBA.XSLT_REPLACE1 to public;
+grant execute on DB.DBA.XSLT_TRIM to public;
 grant execute on DB.DBA.XSLT_STR2DATE to public;
+grant execute on DB.DBA.XSLT_DI_SPLIT to public;
 grant execute on DB.DBA.XSLT_HTTP_STRING_DATE to public;
 grant execute on DB.DBA.XSLT_STRING2ISO_DATE to public;
 grant execute on DB.DBA.XSLT_STRING2ISO_DATE2 to public;
 grant execute on DB.DBA.XSLT_STRING2ISO_DATE3 to public;
 grant execute on DB.DBA.RDF_SPONGE_PROXY_IRI to public;
 grant execute on DB.DBA.RDF_PROXY_ENTITY_IRI to public;
+grant execute on DB.DBA.FORMAT_AMOUNT to public;
 grant execute on DB.DBA.RM_SPONGE_DOC_IRI to public;
 grant execute on DB.DBA.RDF_SPONGE_DBP_IRI to public;
 grant execute on DB.DBA.RM_SAMEAS_IRI to public;
@@ -1611,6 +2054,11 @@ grant execute on DB.DBA.GET_XBRL_CANONICAL_DATATYPE to public;
 grant execute on DB.DBA.RDF_SPONGE_URI_HASH to public;
 grant execute on DB.DBA.RDF_SPONGE_GET_COUNTRY_NAME to public;
 grant execute on DB.DBA.RDF_CONVERT_TO_XTREE to public;
+grant execute on DB.DBA.OPENGRAPH_OBJ_CONNECTIONS to public;
+grant execute on DB.DBA.XSLT_CRUNCHBASE_MONEYSTRING2DECIMAL to public;
+grant execute on DB.DBA.XSLT_SANEURI to public;
+grant execute on DB.DBA.DECODEXML to public;
+grant execute on DB.DBA.DBPEDIA_URL_LABEL to public;
 
 xpf_extension_remove ('http://www.openlinksw.com/virtuoso/xslt:getNameByCIK');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt:xbrl_canonical_datatype', fix_identifier_case ('DB.DBA.GET_XBRL_CANONICAL_DATATYPE'));
@@ -1622,17 +2070,21 @@ xpf_extension ('http://www.openlinksw.com/virtuoso/xslt:xbrl_canonical_value_nam
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt:xbrl_ontology_domain', fix_identifier_case ('DB.DBA.GET_XBRL_ONTOLOGY_DOMAIN'));
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:regexp-match', 'DB.DBA.XSLT_REGEXP_MATCH');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:split-and-decode', 'DB.DBA.XSLT_SPLIT_AND_DECODE');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:di-uri', 'DB.DBA.DI_URI');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:html5md_localname', 'DB.DBA.GET_HTML5MD_LOCALNAME');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:html5md_namespace', 'DB.DBA.GET_HTML5MD_NAMESPACE');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:unix2iso-date', 'DB.DBA.XSLT_UNIX2ISO_DATE');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:sha1_hex', 'DB.DBA.XSLT_SHA1_HEX');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:replace1', 'DB.DBA.XSLT_REPLACE1');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:trim', 'DB.DBA.XSLT_TRIM');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:str2date', 'DB.DBA.XSLT_STR2DATE');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:di-split', 'DB.DBA.XSLT_DI_SPLIT');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:escape', 'DB.DBA.XSLT_ESCAPE');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:string2date', 'DB.DBA.XSLT_STRING2ISO_DATE');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:string2date2', 'DB.DBA.XSLT_STRING2ISO_DATE2');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:string2date3', 'DB.DBA.XSLT_STRING2ISO_DATE3');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:proxyIRI', 'DB.DBA.RDF_PROXY_ENTITY_IRI');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:formatAmount', 'DB.DBA.FORMAT_AMOUNT');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:docproxyIRI', 'DB.DBA.RDF_SPONGE_PROXY_IRI');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:dbpIRI', 'DB.DBA.RDF_SPONGE_DBP_IRI');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:getCountryName', 'DB.DBA.RDF_SPONGE_GET_COUNTRY_NAME');
@@ -1643,68 +2095,70 @@ xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:docIRI', 'DB.DBA.RM_SPO
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:http_string_date', 'DB.DBA.XSLT_HTTP_STRING_DATE');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:uri_hash', 'DB.DBA.RDF_SPONGE_URI_HASH');
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:convert_to_xtree', 'DB.DBA.RDF_CONVERT_TO_XTREE');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:crunchbase_moneystring2decimal', 'DB.DBA.XSLT_CRUNCHBASE_MONEYSTRING2DECIMAL');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:saneURI', 'DB.DBA.XSLT_SANEURI');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:decodeXML', 'DB.DBA.DECODEXML');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:x509_pub_key', 'DB.DBA.XENC_X509_PUB_KEY');
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:dbpedia_url_label', 'DB.DBA.DBPEDIA_URL_LABEL');
 
 create procedure DB.DBA.RDF_MAPPER_XSLT (in xslt varchar, inout xt any, in params any := null)
 {
-  set_user_id ('dba');
-  if (params is null)
-    return xslt (xslt, xt);
-  else
-    return xslt (xslt, xt, params);
+    set_user_id ('dba');
+    if (params is null)
+        return xslt (xslt, xt);
+    else
+        return xslt (xslt, xt, params);
 };
 
 create procedure DB.DBA.RDF_APERTURE_INIT ()
 {
-  if (__proc_exists ('java_vm_attach', 2) is null)
+    if (__proc_exists ('java_vm_attach', 2) is null)
     {
-      delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_BIN_DOCUMENT';
-      return;
+        delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_BIN_DOCUMENT';
+        return;
     }
-  set_qualifier ('APERTURE');
-  if (not udt_is_available ('APERTURE.DBA.MetaExtractor'))
-  {
-    declare exit handler for sqlstate '*'
-    {
-       set_qualifier ('DB');
-       return;
-    };
-    DB.DBA.import_jar (NULL, 'MetaExtractor', 1);
-  }
-  exec (
-'create procedure DB.DBA.RDF_LOAD_BIN_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
-{
-  declare xd, tmp, fn any;
---  if (graph_iri like \'%.odt\' or graph_iri like \'%.ods\')
---    return 0;
-  tmp := null;
-  declare exit handler for sqlstate \'*\'
+    set_qualifier ('APERTURE');
+    if (not udt_is_available ('APERTURE.DBA.MetaExtractor'))
     {
-      if (length (tmp))
+        declare exit handler for sqlstate '*'
+        {
+            set_qualifier ('DB');
+            return;
+        };
+        DB.DBA.import_jar (NULL, 'MetaExtractor', 1);
+    }
+    exec (
+        'create procedure DB.DBA.RDF_LOAD_BIN_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+        inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+        {
+        declare xd, tmp, fn any;
+        tmp := null;
+        declare exit handler for sqlstate \'*\'
+        {
+        if (length (tmp))
         file_delete (tmp, 1);
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-  tmp := tmp_file_name (\'rdfm\', \'bin\');
-  fn := tmp;
-  string_to_file (tmp, _ret_body, -2);
-  xd := APERTURE.DBA."MetaExtractor"().getMetaFromFile (fn, 5);
-  xd := charset_recode(xd, \'_WIDE_\', \'UTF-8\');
-  file_delete (tmp, 1);
-  if (xd is null)
-    return 0;
-  xd := replace (xd, \'file:\'||tmp, new_origin_uri);
-  xd := replace (xd, \'urn:uuid:\', new_origin_uri||\'/\');
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), \'urn:org.semanticdesktop.aperture\');
-  return 1;
-}');
-
-  insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
-    values ('application/.*',
-    'MIME', 'DB.DBA.RDF_LOAD_BIN_DOCUMENT', null, 'Binary Files');
-  update DB.DBA.SYS_RDF_MAPPERS set RM_ID = 1000 where RM_HOOK = 'DB.DBA.RDF_LOAD_BIN_DOCUMENT';
-  set_qualifier ('DB');
+        DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+        return 0;
+        };
+        tmp := tmp_file_name (\'rdfm\', \'bin\');
+        fn := tmp;
+        string_to_file (tmp, _ret_body, -2);
+        xd := APERTURE.DBA."MetaExtractor"().getMetaFromFile (fn, 5);
+        xd := charset_recode(xd, \'_WIDE_\', \'UTF-8\');
+        file_delete (tmp, 1);
+        if (xd is null)
+        return 0;
+        xd := replace (xd, \'file:\'||tmp, new_origin_uri);
+        xd := replace (xd, \'urn:uuid:\', new_origin_uri||\'/\');
+        DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+        DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), \'urn:org.semanticdesktop.aperture\');
+        return 1;
+        }');
+    insert soft DB.DBA.SYS_RDF_MAPPERS (RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_DESCRIPTION)
+        values ('application/.*',
+        'MIME', 'DB.DBA.RDF_LOAD_BIN_DOCUMENT', null, 'Binary Files');
+    update DB.DBA.SYS_RDF_MAPPERS set RM_ID = 1000 where RM_HOOK = 'DB.DBA.RDF_LOAD_BIN_DOCUMENT';
+    set_qualifier ('DB');
 }
 ;
 
@@ -1715,121 +2169,141 @@ RDF_APERTURE_INIT ()
 
 create procedure FB_SIG (in params any, in secret any)
 {
-  declare arr, pars, str any;
-  arr := split_and_decode (params, 0, '\0\0&=');
-  pars := vector ();
-  for (declare i int, i := 0; i < length (arr); i := i + 2)
-     {
-       declare tmp any;
-       tmp := split_and_decode (arr[i+1]);
-       tmp := tmp[0];
-       pars := vector_concat (pars, vector (arr[i]||'='||tmp));
-     }
-  pars := __vector_sort (pars);
-  str := '';
-  foreach (any elm in pars) do
+    declare arr, pars, str any;
+    arr := split_and_decode (params, 0, '\0\0&=');
+    pars := vector ();
+    for (declare i int, i := 0; i < length (arr); i := i + 2)
+    {
+        declare tmp any;
+        tmp := split_and_decode (arr[i+1]);
+        tmp := tmp[0];
+        pars := vector_concat (pars, vector (arr[i]||'='||tmp));
+    }
+    pars := __vector_sort (pars);
+    str := '';
+    foreach (any elm in pars) do
     {
-      str := str || elm;
+        str := str || elm;
     }
-  str := str || secret;
-  return md5 (str);
+    str := str || secret;
+    return md5 (str);
 };
 
 create procedure  DB.DBA.MQL_TREE_TO_XML_REC (in tree any, in tag varchar, inout ses any)
 {
-  if (not isarray (tree) or isstring (tree))
+    if (not isarray (tree) or isstring (tree))
     {
-      if (tree is not null and tree <> '')
-	{
-	  http_value (tree, tag, ses);
-	}
+        if (tree is not null and tree <> '')
+        {
+            http_value (tree, tag, ses);
+        }
     }
-  else if (length (tree) > 1 and __tag (tree[0]) = 255)
+    else if (length (tree) > 1 and __tag (tree[0]) = 255)
     {
-      http (sprintf ('<%U>', tag), ses);
-      for (declare i,l int, i := 2, l := length (tree); i < l; i := i + 2)
-         {
-	   DB.DBA.MQL_TREE_TO_XML_REC (tree[i+1], tree[i], ses);
-	 }
-      http (sprintf ('</%U>', tag), ses);
+        http (sprintf ('<%U>', tag), ses);
+        for (declare i,l int, i := 2, l := length (tree); i < l; i := i + 2)
+        {
+            DB.DBA.MQL_TREE_TO_XML_REC (tree[i+1], tree[i], ses);
+        }
+        http (sprintf ('</%U>', tag), ses);
     }
-  else if (length (tree) > 0)
+    else if (length (tree) > 0)
     {
-      for (declare i,l int, i := 0, l := length (tree); i < l; i := i + 1)
-         {
-	   DB.DBA.MQL_TREE_TO_XML_REC (tree[i], tag, ses);
-	 }
+        for (declare i,l int, i := 0, l := length (tree); i < l; i := i + 1)
+        {
+            DB.DBA.MQL_TREE_TO_XML_REC (tree[i], tag, ses);
+        }
     }
 }
 ;
 
 create procedure  DB.DBA.MQL_TREE_TO_XML (in tree any)
 {
-  declare ses any;
-  ses := string_output ();
-  DB.DBA.MQL_TREE_TO_XML_REC (tree, 'results', ses);
-  ses := string_output_string (ses);
-  ses := xtree_doc (ses);
-  return ses;
+    declare ses any;
+    ses := string_output ();
+    DB.DBA.MQL_TREE_TO_XML_REC (tree, 'results', ses);
+    ses := string_output_string (ses);
+    ses := xtree_doc (ses);
+    return ses;
+}
+;
+
+create procedure DB.DBA.STREE_ELEM (in tag varchar)
+{
+    declare x any;
+    x := replace(replace(tag, ' ', '_'), '@', '');
+    if (strchr ('!"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~0123456789', x[0]) is not null)
+        return 'elem_' || x;
+    return x; 
 }
 ;
 
 create procedure  DB.DBA.SOCIAL_TREE_TO_XML_REC	(in	tree any, in tag varchar, inout	ses	any)
 {
- 	tag := trim(tag, '\"');
-	if (not isarray (tree) or	isstring (tree))
-	{
-                if (isstring (tree))
-                    tree := trim(tree, '\"');
-		if (left(tag,	7) = 'http://')
-			tag	:= 'Site';
-		http_value (tree, tag, ses);
-	}
-	else if (length (tree) > 1 and __tag (tree[0]) = 255)
-	{
-		if (left(tag,	7) = 'http://' or left(tag,	6) = 'ttp://' or left(tag, 7) = 'mailto:' or left(tag, 4) = 'sgn:')
-		{
-			http ('<Document>\n', ses);
-			http_value (tag, 'about', ses);
-		}
-		else
-		{
-                    http (sprintf ('<%U>\n', tag), ses);
-                }
-		for (declare i,l int,	i := 2,	l := length	(tree);	i <	l; i :=	i +	2)
-		{
-			DB.DBA.SOCIAL_TREE_TO_XML_REC (tree[i+1], tree[i], ses);
-		}
-		if (left(tag,	7) = 'http://' or left(tag,	6) = 'ttp://' or left(tag, 7) = 'mailto:' or left(tag, 4) = 'sgn:')
-			http ('</Document>\n',	ses);
-		else
-                {
-			http (sprintf ('</%U>\n', tag),	ses);
-                }
-	}
-	else if (length (tree) > 0)
-	{
-		for (declare i,l int,	i := 0,	l := length	(tree);	i <	l; i :=	i +	1)
-		{
-			DB.DBA.SOCIAL_TREE_TO_XML_REC (tree[i], tag,	ses);
-		}
-	}
+    tag := trim(tag, '\"');
+    if (not isarray (tree) or	isstring (tree))
+    {
+        if (isstring (tree))
+            tree := trim(tree, '\"');
+        if (left(tag,	7) = 'http://')
+            tag	:= 'Site';
+        http_value (tree, tag, ses);
+    }
+    else if (length (tree) > 1 and __tag (tree[0]) = 255)
+    {
+        if (left(tag,	7) = 'http://' or left(tag,	6) = 'ttp://' or left(tag, 7) = 'mailto:' or left(tag, 4) = 'sgn:')
+        {
+            http ('<Document>\n', ses);
+            http_value (tag, 'about', ses);
+        }
+        else if (regexp_parse ('^(19|20)\\d\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$', tag, 0))
+        {
+            http (sprintf ('<date><when>%U</when>\n', replace(replace(tag, ' ', '_'), '@', '')), ses);
+        }
+        else
+        {
+            http (sprintf ('<%U>\n', STREE_ELEM (tag)), ses);
+        }
+        for (declare i,l int,	i := 2,	l := length	(tree);	i <	l; i :=	i +	2)
+        {
+            DB.DBA.SOCIAL_TREE_TO_XML_REC (tree[i+1], tree[i], ses);
+        }
+        if (left(tag,	7) = 'http://' or left(tag,	6) = 'ttp://' or left(tag, 7) = 'mailto:' or left(tag, 4) = 'sgn:')
+        {
+            http ('</Document>\n',	ses);
+        }	
+        else if (regexp_parse ('^(19|20)\\d\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$', tag, 0))
+        {
+            http ('</date>\n', ses);
+        }
+        else
+        {
+            http (sprintf ('</%U>\n', STREE_ELEM (tag)), ses);
+        }
+    }
+    else if (length (tree) > 0)
+    {
+        for (declare i,l int,	i := 0,	l := length	(tree);	i <	l; i :=	i +	1)
+        {
+            DB.DBA.SOCIAL_TREE_TO_XML_REC (tree[i], tag,	ses);
+        }
+    }
 }
 ;
 
 create procedure  DB.DBA.SOCIAL_TREE_TO_XML (in tree any)
 {
-  declare ses any;
-  ses := string_output ();
-  DB.DBA.SOCIAL_TREE_TO_XML_REC (tree, 'results', ses);
-  ses := string_output_string (ses);
-  ses := xtree_doc (ses);
-  return ses;
+    declare ses any;
+    ses := string_output ();
+    DB.DBA.SOCIAL_TREE_TO_XML_REC (tree, 'results', ses);
+    ses := string_output_string (ses);
+    ses := xtree_doc (ses);
+    return ses;
 }
 ;
 
 create procedure DB.DBA.RDF_LOAD_SALESFORCE(in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare hdr any;
 	declare tree, xt, xd any;
@@ -1837,7 +2311,7 @@ create procedure DB.DBA.RDF_LOAD_SALESFORCE(in graph_iri varchar, in new_origin_
 	hdr := null;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
     username_ := get_keyword ('username', opts);
@@ -1855,18 +2329,18 @@ create procedure DB.DBA.RDF_LOAD_SALESFORCE(in graph_iri varchar, in new_origin_
 				id := trim (tmp[1], '/');
 			else
 				return 0;
-		if (id is null)
-			{
-			return 0;
-			}
-		}
+            if (id is null)
+            {
+                return 0;
+            }
+        }
 		res := xml_tree_doc(SOAP_CLIENT (
-				url=>'https://www.salesforce.com/services/Soap/c/14.0',
-				operation=>'login',
-				parameters=>vector ('username', username_,
-							'password', password_),
-				target_namespace=>'urn:enterprise.soap.sforce.com',
-				style=>21));
+            url=>'https://www.salesforce.com/services/Soap/c/14.0',
+            operation=>'login',
+            parameters=>vector ('username', username_,
+            'password', password_),
+            target_namespace=>'urn:enterprise.soap.sforce.com',
+            style=>21));
 		sessionId := cast(xpath_eval('//sessionId/text()' , res ) as varchar);
 		serverURL := cast(xpath_eval('//serverUrl/text()' , res ) as varchar);
 		type := left(id, 3);
@@ -2104,30 +2578,30 @@ create procedure DB.DBA.RDF_LOAD_SALESFORCE(in graph_iri varchar, in new_origin_
 		url=>serverUrl,
 		operation=>'retrieve',
 		headers=>vector (
-			vector ('SessionHeader', '__XML__', 0),
-			xtree_doc (concat (
-				'<urn:SessionHeader xmlns:urn="urn:enterprise.soap.sforce.com">
-					<urn:sessionId xmlns:urn="urn:enterprise.soap.sforce.com">',
-						sessionId,
-					'</urn:sessionId>
-				</urn:SessionHeader>'))),
-		parameters=>vector (
-			'fieldList', fieldList,
-			'sObjectType', sObjectType,
-			'ids', id),
-		target_namespace=>'urn:enterprise.soap.sforce.com',
-		style=>21));
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+        vector ('SessionHeader', '__XML__', 0),
+        xtree_doc (concat (
+        '<urn:SessionHeader xmlns:urn="urn:enterprise.soap.sforce.com">
+        <urn:sessionId xmlns:urn="urn:enterprise.soap.sforce.com">',
+        sessionId,
+        '</urn:sessionId>
+        </urn:SessionHeader>'))),
+        parameters=>vector (
+        'fieldList', fieldList,
+        'sObjectType', sObjectType,
+        'ids', id),
+        target_namespace=>'urn:enterprise.soap.sforce.com',
+        style=>21));
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/sf2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (new_origin_uri)));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), 'https://www.salesforce.com/services/Soap/c/14.0');
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), 'https://www.salesforce.com/services/Soap/c/14.0');
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_TWITTER2(in url varchar, in id varchar, in new_origin_uri varchar,  in dest varchar, in graph_iri varchar, in username_ varchar, in password_ varchar, in what_ varchar, inout opts any) returns integer
+create procedure DB.DBA.RDF_LOAD_TWITTER2(in url varchar, in id varchar, in new_origin_uri varchar,  in dest varchar, in graph_iri varchar, in username_ varchar, in password_ varchar, in what_ varchar, inout opts any, in triple_dict any := null) returns integer
 {
 	declare xt, xd any;
 	declare tmp, test1, test2, test3 varchar;
@@ -2142,15 +2616,15 @@ create procedure DB.DBA.RDF_LOAD_TWITTER2(in url varchar, in id varchar, in new_
 		return 0;
 	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (new_origin_uri), 'id', id, 'what', what_));
 	xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
 create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xt, xd any;
 	declare url, tmp varchar;
@@ -2158,7 +2632,7 @@ create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri
 	declare pos, page, res_count integer;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	what_ := '';
@@ -2171,9 +2645,9 @@ create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri
 	if (new_origin_uri like 'http://search.twitter.com/search/thread/%')
 	{
 		url := concat(new_origin_uri, '.atom');
-		RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 		what_ := 'thread2';
-		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
 		return 1;
 	}
 	else if (new_origin_uri like 'http://search.twitter.com/search?q=%')
@@ -2183,9 +2657,9 @@ create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri
 		if (post is null)
 			return 0;
 		url := sprintf('http://search.twitter.com/search.atom?q=%s', post);
-		RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 		what_ := 'thread1';
-		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
 		return 1;
 	}
 	else if (new_origin_uri like 'http://twitter.com/%/status/%')
@@ -2196,15 +2670,15 @@ create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri
 		if (id is null or post is null)
 			return 0;
 
-		RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 
 		what_ := 'thread2';
 		url := sprintf('http://search.twitter.com/search/thread/%s.atom', post);
-		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
 
 		what_ := 'status';
 		url := sprintf('http://twitter.com/statuses/show/%s.xml', post);
-		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
 
 		return 1;
 	}
@@ -2216,15 +2690,15 @@ create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri
 		if (id is null or post is null)
 			return 0;
 
-		RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 
 		what_ := 'thread2';
 		url := sprintf('http://search.twitter.com/search/thread/%s.atom', post);
-		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
 
 		what_ := 'status';
 		url := sprintf('http://twitter.com/statuses/show/%s.xml', post);
-		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+		DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
 
 
 		return 1;
@@ -2268,60 +2742,80 @@ create procedure DB.DBA.RDF_LOAD_TWITTER(in graph_iri varchar, in new_origin_uri
 	}
 	else
 		return 0;
-
 	friends_and_followers: ;
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	page := 1;
 	while (page > 0 and page < res_count)
 	{
 		url := sprintf('http://twitter.com/statuses/user_timeline.xml?id=%s&page=%d', id, page);
-		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts) = 0)
+		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict) = 0)
 			goto statuses_out;
 		page := page + 1;
 	}
 	statuses_out: ;
-
 	page := 1;
 	while (page > 0 and page < res_count)
 	{
 		what_ := 'friends';
 		url := sprintf('http://twitter.com/statuses/friends.xml?id=%s&page=%d', id, page);
-		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts) = 0)
+		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict) = 0)
 			goto friends_out;
 		page := page + 1;
 	}
 	friends_out: ;
-
 	page := 1;
 	while (page > 0 and page < res_count)
 	{
 		url := sprintf('http://twitter.com/favorites.xml?id=%s&page=%d', id, page);
-		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts) = 0)
+		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict) = 0)
 			goto favorites_out;
 		page := page + 1;
 	}
 	favorites_out: ;
-
 	page := 1;
 	while (page > 0 and page < res_count)
 	{
 		what_ := 'followers';
 		url := sprintf('http://twitter.com/statuses/followers.xml?id=%s&page=%d', id, page);
-		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts) = 0)
+		if (DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict) = 0)
 			goto followers_out;
 		page := page + 1;
 	}
 	followers_out: ;
-
 	what_ := 'user';
 	url := sprintf('http://twitter.com/users/show/%s.xml', id);
-	DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts);
+	DB.DBA.RDF_LOAD_TWITTER2(url, id, new_origin_uri, dest, graph_iri, username_, password_, what_, opts, triple_dict);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_TWITTER_FP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xt, xd any;
+	declare url, tmp varchar;
+	declare tree any;
+	declare ses any;
+	declare exit handler for sqlstate '*'
+	{
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	tree := json_parse (_ret_body);
+	ses := string_output ();
+	DB.DBA.SOCIAL_TREE_TO_XML_REC (tree, 'results', ses);
+	ses := string_output_string (ses);
+	xt := xtree_doc (ses, 2);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter_fp2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (new_origin_uri)));
+	xd := serialize_to_UTF8_xml (xt);
+	--dbg_obj_print_vars (xd);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
 	return 1;
 }
 ;
 
 create procedure DB.DBA.RDF_LOAD_GETSATISFATION(in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare qr, path, hdr any;
 	declare tree, xt, xd, types, is_search any;
@@ -2329,12 +2823,11 @@ create procedure DB.DBA.RDF_LOAD_GETSATISFATION(in graph_iri varchar, in new_ori
 	declare url_vec any;
 	declare cur, len integer;
 	declare what_, name_, where_, file, base_uri varchar;
-
 	hdr := null;
 	base_uri := new_origin_uri;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://getsatisfaction.com/%')
@@ -2436,7 +2929,7 @@ create procedure DB.DBA.RDF_LOAD_GETSATISFATION(in graph_iri varchar, in new_ori
 	else
 		return 0;
 	tmp := http_client(url, proxy=>get_keyword_ucase ('get:proxy', opts));
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	if (what_ = 'topics')
 	{
 		xd := xtree_doc (tmp);
@@ -2451,84 +2944,97 @@ create procedure DB.DBA.RDF_LOAD_GETSATISFATION(in graph_iri varchar, in new_ori
 			vector ('baseUri', RDF_SPONGE_DOC_IRI (base_uri), 'what', what_));
 	}
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, base_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, base_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_GOOGLEBASE (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLEBASE (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, xt any;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
   xd := xtree_doc (_ret_body);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/googlebase2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/googlebase2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
   xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   return 1;
 }
 ;
 
 create procedure DB.DBA.RDF_LOAD_OVERSTOCK (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare thisgr, cont varchar;
 
   thisgr := coalesce (dest, graph_iri);
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+	DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  ret_body := replace (ret_body, '= \'<script', '= \'<scr\' + \'ipt');
+  --ret_body := replace (ret_body, '= \'<script', '= \'<scr\' + \'ipt');
   --ret_body := replace (ret_body, '[url]', '{url}');
   --ret_body := replace (ret_body, '[title]', '{title}');
-  cont := tidy_html (ret_body, 'output-xhtml:1\r\ninput-xml:1');
-  --string_to_file ('over.html', cont, -2);
+  if (get_keyword ('use_tidy', opts) = 'yes')
+    cont := tidy_html (ret_body, 'output-xhtml:yes\r\ntidy-mark:no');
+  else
+    {
+      cont := concat (
+    '<div
+      xmlns:gr="http://purl.org/goodrelations/v1#"
+      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+      xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
+      xmlns:foaf="http://xmlns.com/foaf/0.1/"
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+      xmlns:review="http://purl.org/stuff/rev#">' ,
+      	serialize_to_UTF8_xml (xpath_eval ('//span[@about]', xtree_doc (ret_body, 2))),
+      '</div>');
+    }
   if (dest is null)
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RDF_LOAD_RDFA (cont, new_origin_uri, thisgr, 2);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 0);
   --DB.DBA.RDF_QUAD_URI (thisgr, new_origin_uri, 'http://xmlns.com/foaf/0.1/primaryTopic', new_origin_uri || '#product');
   return 1;
 }
 ;
 
 create procedure DB.DBA.RDF_LOAD_RDFA_CARTRIDGE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare thisgr, cont varchar;
 
   thisgr := coalesce (dest, graph_iri);
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  if (get_keyword ('use_tidy', opts) = 'yes') 
-    cont := tidy_html (ret_body, 'output-xhtml:1\r\ninput-xml:1');
-  else  
+  if (get_keyword ('use_tidy', opts) = 'yes')
+    cont := tidy_html (ret_body, 'output-xhtml:yes\r\ntidy-mark:no');
+  else
     cont := ret_body;
   if (dest is null)
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
   {
     declare exit handler for sqlstate '*';
-    DB.DBA.RDF_LOAD_RDFA_1 (cont, new_origin_uri, thisgr, 0);
+    DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 0);
     goto rdfa_end;
   }
   {
     declare exit handler for sqlstate '*';
-    DB.DBA.RDF_LOAD_RDFA_1 (cont, new_origin_uri, thisgr, 1);
+    DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 1);
     goto rdfa_end;
   }
   {
     declare exit handler for sqlstate '*';
-    DB.DBA.RDF_LOAD_RDFA_1 (cont, new_origin_uri, thisgr, 2);
+    DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 2);
     rdfa_end:;
   }
  return 1;
@@ -2536,35 +3042,35 @@ create procedure DB.DBA.RDF_LOAD_RDFA_CARTRIDGE (in graph_iri varchar, in new_or
 ;
 
 create procedure DB.DBA.RDF_LOAD_RDFA_NP_CARTRIDGE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare thisgr, cont varchar;
 
   thisgr := coalesce (dest, graph_iri);
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  if (get_keyword ('use_tidy', opts) = 'yes') 
+  if (get_keyword ('use_tidy', opts) = 'yes')
     cont := tidy_html (ret_body, 'output-xhtml:1\r\ninput-xml:1');
-  else  
+  else
     cont := ret_body;
   if (dest is null)
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
   {
     declare exit handler for sqlstate '*';
-    DB.DBA.RDF_LOAD_RDFA (cont, new_origin_uri, thisgr, 0);
+    DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 0, 0);
     goto rdfa_end;
   }
   {
     declare exit handler for sqlstate '*';
-    DB.DBA.RDF_LOAD_RDFA (cont, new_origin_uri, thisgr, 1);
+    DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 1, 0);
     goto rdfa_end;
   }
   {
     declare exit handler for sqlstate '*';
-    DB.DBA.RDF_LOAD_RDFA (cont, new_origin_uri, thisgr, 2);
+    DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, cont, new_origin_uri, thisgr, 2, 0);
     rdfa_end:;
   }
  return 1;
@@ -2572,7 +3078,7 @@ create procedure DB.DBA.RDF_LOAD_RDFA_NP_CARTRIDGE (in graph_iri varchar, in new
 ;
 
 create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare qr, path, hdr any;
   declare tree, xt, xd, types, is_search any;
@@ -2581,7 +3087,7 @@ create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_
   hdr := null;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
 
@@ -2589,7 +3095,7 @@ create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_
   if (new_origin_uri like 'http://www.crunchbase.com/search?query=%')
     {
       url := 'http://api.crunchbase.com/v/1/search.js?query=' || subseq (new_origin_uri, 39);
-      cnt := http_client_ext (url, 
+      cnt := http_client_ext (url,
       		headers=>hdr,
       		proxy=>get_keyword_ucase ('get:proxy', opts));
       base := 'http://www.crunchbase.com/';
@@ -2599,7 +3105,7 @@ create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_
   else if (new_origin_uri like 'http://www.crunchbase.com/%')
     {
       url := 'http://api.crunchbase.com/v/1/' || subseq (new_origin_uri, 26) || '.js';
-      cnt := http_client_ext (url, 
+      cnt := http_client_ext (url,
       		headers=>hdr,
       		proxy=>get_keyword_ucase ('get:proxy', opts));
       base := 'http://www.crunchbase.com/';
@@ -2608,7 +3114,7 @@ create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_
   else if (new_origin_uri like 'http://crunchbase.com/%')
     {
       url := 'http://api.crunchbase.com/v/1/' || subseq (new_origin_uri, 22) || '.js';
-      cnt := http_client_ext (url, 
+      cnt := http_client_ext (url,
       		headers=>hdr,
       		proxy=>get_keyword_ucase ('get:proxy', opts));
       base := 'http://www.crunchbase.com/';
@@ -2623,7 +3129,7 @@ create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_
     }
   if (hdr is not null and hdr[0] not like 'HTTP/1._ 200 %')
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, hdr[0]);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, hdr[0]); 	
       return 0;
     }
   if (new_origin_uri like 'http://api.crunchbase.com/v/1/search.js?query=%')
@@ -2631,15 +3137,15 @@ create procedure DB.DBA.RDF_LOAD_CRUNCHBASE(in graph_iri varchar, in new_origin_
   tree := json_parse (cnt);
   if (is_search)
     tree := get_keyword ('results', tree);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
   xt := DB.DBA.MQL_TREE_TO_XML (tree);
   xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/crunchbase2rdf.xsl', xt,
 	  vector ('baseUri', new_origin_uri, 'base', base, 'suffix', suffix));
   xd := serialize_to_UTF8_xml (xt);
 
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
   return 1;
 }
 ;
@@ -2721,7 +3227,7 @@ create procedure DB.DBA.RM_FREEBASE_DOC_LINK (in graph varchar, in doc varchar,
 
 -- /* Freebase cartridge */
 create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare qr, path, hdr any;
   declare tree, xt, xd, types any;
@@ -2732,7 +3238,7 @@ create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri va
   sa := '';
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
 
@@ -2750,21 +3256,21 @@ create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri va
   if (mime = 'application/rdf+xml')
     {
       sa := DB.DBA.RDF_MQL_GET_WIKI_URI (k);
-      RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+      RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
       -- cb-- As was
-      --DB.DBA.RM_RDF_LOAD_RDFXML (cnt, new_origin_uri, coalesce (dest, graph_iri));
+      --DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, cnt, new_origin_uri, coalesce (dest, graph_iri));
 
       -- cb++
       xt := xtree_doc(cnt);
       xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/mqlrdf2oplrdf.xsl', xt,
-      	vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'wpUri', sa, 'ptIRI', sprintf ('http://rdf.freebase.com/ns/%U.%U', lang, k)));
+      	vector ('baseUri', new_origin_uri, 'wpUri', sa, 'ptIRI', sprintf ('http://rdf.freebase.com/ns/%U.%U', lang, k)));
       sa := '';
       xd := serialize_to_UTF8_xml (xt);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
       -- ++cb
 
       DB.DBA.RM_FREEBASE_DOC_LINK (coalesce (dest, graph_iri), new_origin_uri, sprintf ('http://rdf.freebase.com/ns/%U.%U', lang, k), sa);
-      DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), new_url);
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), new_url);
       have_rdf := 1;
       goto done;
     }
@@ -2796,7 +3302,7 @@ create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri va
       types := vector_concat (types, tmp);
     }
   --types := get_keyword ('type', xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
   foreach (any tp in types) do
     {
       qr := sprintf ('{"ROOT":{"query":{%s, "type":"%s", "*":[]}}}', k, tp);
@@ -2806,12 +3312,12 @@ create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri va
       xt := get_keyword ('ROOT', tree);
       xt := DB.DBA.MQL_TREE_TO_XML (tree);
       xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/mql2rdf.xsl', xt,
-      	vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'wpUri', sa));
+      	vector ('baseUri', new_origin_uri, 'wpUri', sa));
       sa := '';
       xd := serialize_to_UTF8_xml (xt);
-      RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+      RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
       have_rdf := 1;
     }
 done:;
@@ -2838,14 +3344,14 @@ create procedure FQL_CALL (in q varchar, in api_key varchar, in ses_id varchar,
 ;
 
 create procedure DB.DBA.RDF_LOAD_FQL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare api_key, ses_id, secret varchar;
   declare ret, tmp, karr, xt, xd any;
   declare url, sig, pars, q, own, pid, aid, acc varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
 
@@ -2906,16 +3412,16 @@ create procedure DB.DBA.RDF_LOAD_FQL (in graph_iri varchar, in new_origin_uri va
   'WHERE aid in (select aid from album where owner = %s and strpos (link, "aid=%s&") > 0)', own, aid);
   ret := DB.DBA.FQL_CALL (q, api_key, ses_id, secret, opts);
   xt := xtree_doc (ret);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'login', acc));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'login', acc));
   xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   q := sprintf ('SELECT aid, cover_pid, owner, name, created, modified, description, location, size, link FROM album '||
   'WHERE owner = %s and strpos (link, "aid=%s&") > 0', own, aid);
   ret := DB.DBA.FQL_CALL (q, api_key, ses_id, secret, opts);
   xt := xtree_doc (ret);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'login', acc));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'login', acc));
   xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   goto end_sp;
 
 try_profile:
@@ -2932,146 +3438,749 @@ try_profile:
   q :=  sprintf ('SELECT uid, first_name, last_name, name, pic_small, pic_big, pic_square, pic, affiliations, profile_update_time, timezone, religion, birthday, sex, hometown_location, meeting_sex, meeting_for, relationship_status, significant_other_id, political, current_location, activities, interests, is_app_user, music, tv, movies, books, quotes, about_me, hs_info, education_history, work_history, notes_count, wall_count, status, has_added_app FROM user WHERE uid = %s', own);
   ret := DB.DBA.FQL_CALL (q, api_key, ses_id, secret, opts);
   xt := xtree_doc (ret);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'login', acc));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'login', acc));
   xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
 
   q := sprintf ('SELECT aid, cover_pid, owner, name, created, modified, description, location, size, link FROM album '||
   'WHERE owner = %s', own);
   ret := DB.DBA.FQL_CALL (q, api_key, ses_id, secret, opts);
   xt := xtree_doc (ret);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'login', acc));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'login', acc));
   xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   q := sprintf ('select eid, name, tagline, nid, pic_small, pic_big, pic, host, description, event_type, event_subtype, '||
   ' start_time, end_time, creator, update_time, location, venue from event where eid in '||
   '(SELECT eid FROM event_member where uid = %s)', own);
   ret := DB.DBA.FQL_CALL (q, api_key, ses_id, secret, opts);
   xt := xtree_doc (ret);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'login', acc));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'login', acc));
   xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   q := sprintf ('SELECT uid, first_name, last_name, name, pic_small, pic_big, pic_square, pic, profile_update_time, timezone, religion, birthday, sex, current_location FROM user WHERE uid IN (select uid2 from friend where uid1 = %s)', own);
   ret := DB.DBA.FQL_CALL (q, api_key, ses_id, secret, opts);
   xt := xtree_doc (ret);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'login', acc));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fql2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'login', acc));
   xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   goto end_sp;
 end_sp:
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), 'http://api.facebook.com/restserver.php');
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), 'http://api.facebook.com/restserver.php');
   return 1;
 };
 
-create procedure DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH_SELECTION (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
-{
-    declare qr, path any;
-    declare tree, xt, xd, types, hdr any;
-    declare k, cnt, url, tmp, mime varchar;
-    declare pos, ord, ret integer;
-    declare exit handler for sqlstate '*'
-    {
-        DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
-        return 0;
-    };
-    url := concat('http://graph.facebook.com/?ids=', new_origin_uri);
+EXEC_STMT(
+'create table DB.DBA.OPENGRAPH_ACCESS_TOKENS (
+    OGAT_ACCESS_TOKEN varchar,           -- Facebook access token
+    OGAT_GRANTOR_ID varchar,             -- Facebook ID of user granting the access token
+    OGAT_GRANTOR_NAME varchar,           -- Facebook username
+    OGAT_APP_SITE_URL varchar,           -- Facebook app which is being given access
+    OGAT_APP_ID varchar,                 -- Facebook App ID of app being given access
+    OGAT_CREATED datetime,               -- Date/Time access token was created
+    OGAT_LIFETIME int,                   -- Token lifetime (secs) from creation time, after which token is invalid. null implies a non-expiring token
+    OGAT_EXPIRES datetime,
+    primary key (OGAT_ACCESS_TOKEN)
+)
+create index OPENGRAPH_ACCESS_TOKENS_USER_ID on DB.DBA.OPENGRAPH_ACCESS_TOKENS (OGAT_GRANTOR_ID)', 0)
+;
+
+RM_UPGRADE_TBL ('DB.DBA.OPENGRAPH_ACCESS_TOKENS', 'OGAT_TOKEN_INVALID', 'integer default 0');
+
+EXEC_STMT(
+'create table DB.DBA.LINKEDIN_ACCESS_TOKENS (
+    LIAT_ACCESS_TOKEN varchar,           -- LinkedIn access token
+    LIAT_ACCESS_TOKEN_SECRET varchar,    -- LinkedIn access token secret
+    LIAT_GRANTOR_ID varchar,             -- LinkedIn ID of user granting the access token
+    LIAT_GRANTOR_NAME varchar,           -- LinkedIn username of user granting the access token
+    LIAT_GRANTOR_URL varchar,            -- LinkedIn public profile URL of user granting the access token
+    LIAT_APP_SITE_URL varchar,           -- LinkedIn app which is being given access
+    LIAT_APP_ID varchar,                 -- LinkedIn App ID of app being given access
+    LIAT_CREATED datetime,               -- Date/Time access token was created
+    LIAT_LIFETIME int,                   -- Token lifetime (secs) from creation time, after which token is invalid. null implies a non-expiring token
+    LIAT_EXPIRES datetime,
+    primary key (LIAT_ACCESS_TOKEN)
+)
+create index LINKEDIN_ACCESS_TOKENS_USER_ID on DB.DBA.LINKEDIN_ACCESS_TOKENS (LIAT_GRANTOR_ID)', 0)
+;
+
+EXEC_STMT(
+'create table DB.DBA.TWITTER_ACCESS_TOKENS (
+    TAT_ACCESS_TOKEN varchar,           -- Twitter access token
+    TAT_ACCESS_TOKEN_SECRET varchar,    -- Twitter access token secret
+    TAT_GRANTOR_ID varchar,             -- Twitter ID of user granting the access token
+    TAT_GRANTOR_NAME varchar,           -- Twitter username of user granting the access token
+    TAT_GRANTOR_URL varchar,            -- Twitter public profile URL of user granting the access token
+    TAT_APP_SITE_URL varchar,           -- Twitter app which is being given access
+    TAT_APP_ID varchar,                 -- Twitter App ID of app being given access
+    TAT_CREATED datetime,               -- Date/Time access token was created
+    TAT_LIFETIME int,                   -- Token lifetime (secs) from creation time, after which token is invalid. null implies a non-expiring token
+    TAT_EXPIRES datetime,
+    primary key (TAT_ACCESS_TOKEN)
+)
+create index TWITTER_ACCESS_TOKENS_USER_ID on DB.DBA.TWITTER_ACCESS_TOKENS (TAT_GRANTOR_ID)', 0)
+;
+
+EXEC_STMT(
+'create table DB.DBA.OAUTH_TOKEN_REQUESTS (
+    OAUTH_REQ_TOKEN varchar,
+    OAUTH_REQ_SECRET varchar
+)
+create index OAUTH_TOKEN_REQUESTS_OAUTH_REQ_TOKEN on DB.DBA.OAUTH_TOKEN_REQUESTS (OAUTH_REQ_TOKEN)', 0)
+;
+
+create procedure DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare qr, path any;
+  declare tree, xt, xt2, xt_og_metadata, xd, types, hdr any;
+  declare id, cnt, url, tmp, access_token, client_id, mime, client_secret, code varchar;
+  declare pos, ret, ord integer;
+
+  declare og_object_type varchar; -- Type of Open Graph object being handled
+  declare og_id varchar; -- Open Graph object ID
+  declare og_conns any; -- Open Graph object's connections 
+  declare og_err, og_headers any;
+  declare retries, page, max_pages, paging_page_size_limit, more_pages integer;
+  declare og_timeout integer; -- Timeout when accessing Open Graph collections
+  declare http_new_origin_uri varchar;
+  declare append_access_token_to_connections integer;
+  declare default_access_token varchar;
+
+  og_timeout := 60;
+  og_id := null;
+  access_token := null;
+  mime := get_keyword ('content-type', opts);
+
+  declare exit handler for sqlstate '*'
+  {
+    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+    return 0;
+  };
+
+  http_new_origin_uri := new_origin_uri;
+  if (subseq (new_origin_uri, 0, 5) = 'https')
+    http_new_origin_uri := 'http' || subseq (new_origin_uri, 5);
+
+  if (http_new_origin_uri like 'http://www.facebook.com/profile.php?id=%')
+  {
+    tmp := sprintf_inverse (http_new_origin_uri, 'http://www.facebook.com/profile.php?id=%s', 0);
+    id := rtrim(tmp[0], '&/');
+    pos := strchr(id, '&');
+    if (pos > 0)
+      id := left(id, pos);
+    if (id is null)
+      return 0;
+  }
+  else if (http_new_origin_uri like 'http://www.facebook.com/pages/%/%')
+  {
+    tmp := sprintf_inverse (http_new_origin_uri, 'http://www.facebook.com/pages/%s/%s', 0);
+    id := rtrim(tmp[1], '&/');
+    pos := strchr(id, '?');
+    if (pos > 0)
+      id := left(id, pos);
+    if (id is null)
+      return 0;
+  }
+  else if (http_new_origin_uri like 'http://www.facebook.com/album.php?aid=%&id=%')
+  {
+    tmp := sprintf_inverse (http_new_origin_uri, 'http://www.facebook.com/album.php?aid=%s&id=%s', 0);
+    id := rtrim(tmp[1], '&/');
+    pos := strchr(id, '?');
+    if (pos > 0)
+      id := left(id, pos);
+    if (id is null)
+      return 0;
+  }
+  else if (http_new_origin_uri like 'http://www.facebook.com/%')
+  {
+    tmp := sprintf_inverse (http_new_origin_uri, 'http://www.facebook.com/%s', 0);
+    id := rtrim(tmp[0], '&/');
+    pos := strchr(id, '?');
+    if (pos > 0)
+      id := left(id, pos);
+    if (id is null)
+      return 0;
+  }
+  else if (http_new_origin_uri like 'http://graph.facebook.com/%')
+  {
+    tmp := sprintf_inverse (http_new_origin_uri, 'http://graph.facebook.com/%s', 0);
+    id := rtrim(tmp[0], '&/');
+    pos := strchr(id, '?');
+    if (pos > 0)
+      id := left(id, pos);
+    if (id is null)
+      return 0;
+  }
+  else
+  {
+    url := concat('http://graph.facebook.com/?ids=', new_origin_uri, '&metadata=1');
     cnt := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-  	if (hdr[0] not like 'HTTP/1._ 200 %')
+    if (hdr[0] not like 'HTTP/1._ 200 %')
     {
-        signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-        return 0;
+      signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+      return 0;
     }
     tree := json_parse (cnt);
     if (tree is null)
-        return 0;
-    declare ses any;
-    ses := string_output ();
-    DB.DBA.SOCIAL_TREE_TO_XML_REC (tree, 'results', ses);
-    ses := string_output_string (ses);
-    xt := xtree_doc (ses, 2);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fb_ogs2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-    xd := serialize_to_UTF8_xml (xt);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), 'http://graph.facebook.com/');
-    mime := get_keyword ('content-type', opts);
-    ord := (select RM_ID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH_SELECTION');
-    ret := 1;
-    for select RM_PATTERN, RM_TYPE, RM_HOOK from DB.DBA.SYS_RDF_MAPPERS
-      where RM_ID > ord and RM_TYPE in ('URL', 'MIME') and RM_ENABLED = 1 order by RM_ID do
-	{
-	  if (RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) is not null)
-	    ret := 0;
-          else if (RM_TYPE = 'MIME' and mime is not null and RM_HOOK <> 'DB.DBA.RDF_LOAD_DAV_META' and regexp_match (RM_PATTERN, mime) is not null)
-            ret := 0;
-	}
+      return 0;
+    xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+    if (xpath_eval ('/results/document/type[ .  = "link_stat"]', xt) is null)
+    {
+      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fb_og2rdf.xsl', xt, 
+          vector ('baseUri', new_origin_uri, 'og_object_type', 'general'));
+      xd := serialize_to_UTF8_xml (xt);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), 'http://graph.facebook.com/');
+    }
+    ord := (select RM_ID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH');
+    if (RM_CONTENT_TYPE_IS_RDF (mime))
+      ret := -1;
+    else  
+      ret := 1;
+    for select RM_PATTERN, RM_TYPE, RM_HOOK from DB.DBA.SYS_RDF_MAPPERS where RM_ID > ord and RM_TYPE in ('URL', 'MIME') and RM_ENABLED = 1 order by RM_ID do
+    {
+      if (RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) is not null)
+        ret := 0;
+      else if (RM_TYPE = 'MIME' and mime is not null and RM_HOOK <> 'DB.DBA.RDF_LOAD_DAV_META' 
+		and regexp_match (RM_PATTERN, mime) is not null)
+	ret := 0;
+    }
     return ret;
+  }
+
+  -- max_pages: maximum number of pages to retrieve. 0 => no limit
+  -- paging_page_size_limit: only turn on paging for page sizes below this limit. 0 => fetch all available pages, irrespective of their size
+  max_pages := coalesce (atoi(get_keyword ('max_pages', opts)), 1);
+  paging_page_size_limit := coalesce (atoi(get_keyword ('paging_page_size_limit', opts)), 5000);
+
+  url := sprintf ('https://graph.facebook.com/%s?metadata=1', id);
+  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+  append_access_token_to_connections := 1;
+
+  -- Handle some OpenGraph object types as special cases when sponged directly.
+  -- i.e. - the input URL identifies the OpenGraph object directly
+  --      - the object isn't retrieved from a connection/collection of a parent object
+  -- An access token must be supplied to be able to query these object types at all.
+  -- e.g. Album, Link
+  -- If not supplied, OpenGraph returns HTTP 200 (OK) and 'false' instead of an OAuthException.
+  --
+  -- Attempts to sponge Photos directly return HTTP 400 (Bad request) and an OAuthException.
+  -- The Sponger doesn't invoke this cartridge.
+  if (cnt = 'false')
+  {
+    -- We don't yet know the Facebook user ID of the object's creator.
+    -- Try all available access tokens to get the unknown object's metadata
+    declare access_tokens any;
+
+    access_token := null;
+    access_tokens := DB.DBA.OPENGRAPH_GET_ACCESS_TOKEN (null);
+    if (length (access_tokens) = 0)
+    {
+      log_message (sprintf('%s: No access token is available to query this OpenGraph object\'s metadata.', current_proc_name()));
+      return 0;
+    }
+    foreach (any _token in access_tokens) do
+    {
+      declare token varchar;
+      token := cast (_token as varchar);
+      url := url || '&access_token=' || token;
+      cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+      if (cnt <> 'false')
+      {
+        tree := json_parse (cnt);
+        xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+        og_err := cast (xpath_eval('results/error/type', xt) as varchar);
+        if (og_err is null)
+	{
+          access_token := token;
+          goto got_usable_token_for_object;
+	}
+      }
+    }
+    log_message (sprintf('%s: No access token is available to query this OpenGraph object\'s metadata.', current_proc_name()));
+    return 0;
+
+got_usable_token_for_object:
+    tree := json_parse (cnt);
+    xt_og_metadata := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+    og_object_type := cast (xpath_eval('/results/type', xt_og_metadata) as varchar);
+
+    -- Get the Facebook user ID of the object's creator
+    og_id := cast (xpath_eval('/results/from/id', xt_og_metadata) as varchar);
+    -- Has he/she granted an access token
+    default_access_token := access_token;
+    if (length (og_id))
+      access_token := DB.DBA.OPENGRAPH_GET_ACCESS_TOKEN (og_id);
+
+    if (access_token <> default_access_token)
+    {
+      -- Re-fetch the object's metadata
+      -- Because this query includes an access token, any connection URIs in the returned metadata will
+      -- include the creator's access token
+      url := sprintf ('https://graph.facebook.com/%s?metadata=1', id);
+      url := url || '&access_token=' || access_token;
+      cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+    }
+    -- Prevent DB.DBA.OPENGRAPH_OBJ_CONNECTIONS from appending the access token to the object's connection/collection URLs. 
+    -- The access token should already appended to these URLs in the returned metadata
+    append_access_token_to_connections := 0;
+  }
+
+  tree := json_parse (cnt);
+  xt_og_metadata := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+  og_object_type := cast (xpath_eval('/results/type', xt_og_metadata) as varchar);
+
+  -- Transform the base OpenGraph object description to RDF
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fb_og2rdf.xsl', xt_og_metadata, 
+        vector ('baseUri', new_origin_uri, 'og_object_type', og_object_type));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  -- May already have og_id
+  if (og_id is null)
+  {
+    og_id := cast (xpath_eval('/results/id', xt_og_metadata) as varchar);
+    if (length (og_id) > 0)
+      access_token := DB.DBA.OPENGRAPH_GET_ACCESS_TOKEN (og_id);
+  }
+
+  retries := 0;
+retry_without_access_token:
+  -- Try all the object's connections listed in the object metadata
+  og_conns := DB.DBA.OPENGRAPH_OBJ_CONNECTIONS (xt_og_metadata, access_token, append_access_token_to_connections);
+  page := 0;
+
+  -- batch request
+  declare br, req, rtree any;
+
+next_page_batch:
+  page := page + 1;
+  more_pages := 0;
+  br := '[';
+  for (declare i int, i := 0; i < length (og_conns); i := i + 2)
+    {
+      declare u, h any;
+      if (og_conns[i + 1] is not null)
+      {
+        h := rfc1808_parse_uri (og_conns[i + 1]);
+        h [0] := h [1] := ''; 
+        u := vspx_uri_compose (h);
+        br := br || sprintf ('{"method": "GET", "relative_url": "%s"},', subseq (u, 1)); 
+      }
+    }
+  br := rtrim (br, ',') || ']';
+  req := sprintf ('access_token=%U&batch=%U', access_token, br);
+  cnt := http_get ('https://graph.facebook.com', og_headers, 'POST', null, req);
+  rtree := json_parse (cnt);
+
+  -- Transform each of the OpenGraph object's connections
+  declare ibatch integer;
+  ibatch := -1;
+  for (declare i int, i := 0; i < length (og_conns); i := i + 2)
+  {
+    declare og_conn_type any;
+
+    if (og_conns[i+1] is null)
+      goto next_conn;
+
+    og_conn_type := og_conns[i];
+    ibatch := ibatch + 1;
+
+    if (og_conn_type = 'picture')
+    {
+      declare og_picture_url varchar;
+      og_picture_url := null;
+      -- TO DO: Doesn't work - Why?
+      -- cnt := http_client_ext (url=>og_conns[i+1], proxy=>get_keyword_ucase ('get:proxy', opts), headers=>og_headers, n_redirects=>5);
+      cnt := http_client_ext (url=>og_conns[i+1], headers=>og_headers);
+      if (aref (og_headers, 0) like '% 302%')
+      {
+	for (declare j int, j := 0; j < length (og_headers); j := j+1)
+	{
+	  if (og_headers[j] like 'Location: %')
+	  {
+	    og_picture_url := subseq (trim(og_headers[j], '\r\n'), 10);
+	    goto got_picture_url;
+	  }
+	}
+      }
+got_picture_url:
+      if (og_picture_url is not null)
+	xt := xtree_doc (sprintf ('<results><picture>%s</picture></results>', og_picture_url));
+      else
+	xt := xtree_doc ('<results></results>');
+    }
+    else
+    {
+      cnt := get_keyword ('body', rtree[ibatch]);
+      -- Batch requests are sometimes not always completely fulfilled
+      if (cnt is not null)
+      {
+        tree := json_parse (cnt);
+        xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+      }
+    }
+    og_conns[i+1] := null; -- Assume no more pages are required for this connection
+    og_err := cast (xpath_eval('results/error/type', xt) as varchar);
+    if (og_err is null)
+    {
+      declare mode varchar;
+      declare og_next_page varchar;
+
+      mode := sprintf ('%s_%s', og_object_type, og_conn_type);
+
+      -- Transform the OpenGraph connection output to RDF
+      xt2 := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fb_og2rdf.xsl', xt, 
+	vector ('baseUri', new_origin_uri, 'og_object_type', mode));
+      xd := serialize_to_UTF8_xml (xt2);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+
+      -- Prepare to get next page of collection data
+      --
+      -- The page size used by the Graph API doesn't appear to be configurable.
+      -- Two page sizes are routinely used:
+      --   25: for connections
+      --     posts, statuses, links, notes, photos, albums, checkins
+      --   5000: for connections
+      --     friends, interests, music, books, movies, games, likes
+      -- 
+      if (max_pages = 0 or (max_pages > 0 and page < max_pages))
+      {
+	og_next_page := cast (xpath_eval('/results/paging/next', xt) as varchar);
+	if (og_next_page is not null)
+	{
+	  declare page_size integer;
+
+	  page_size := 0;
+	  tmp := sprintf_inverse (og_next_page, '%slimit=%d&%s', 0);
+	  if (tmp is not null and tmp[1] is not null)
+	    page_size := tmp[1];
+	  if (page_size > 0 and (paging_page_size_limit = 0 or page_size < paging_page_size_limit))
+	  {
+	    og_conns[i+1] := og_next_page;
+	    more_pages := 1;
+	  }
+	}
+      }
+    }
+    else
+    {
+      declare og_msg varchar;
+      og_msg := cast (xpath_eval('results/error/message', xt) as varchar);
+      if (retries = 0 and og_err = 'OAuthException' and 
+            (strstr (og_msg, 'Invalid OAuth access token') is not null or strstr (og_msg, 'Error validating access token') is not null))
+      {
+	-- Access token is invalid
+	-- Even public connections will fail if tried with an invalid access token
+	-- Retry the connections without an access token, allowing connections which
+	-- require one to quietly fail
+	access_token := null;
+	retries := 1;
+	goto retry_without_access_token;
+      }
+    }
+next_conn:;
+  }
+  if (more_pages)
+    goto next_page_batch;
+
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+-- Extracts an Open Graph object's connections from XML tree containing the object's metadata
+-- Returns vector of (connection name, connection uri) pairs
+create procedure DB.DBA.OPENGRAPH_OBJ_CONNECTIONS (in xt any, in access_token varchar, in append_access_token integer)
 {
-    declare qr, path any;
-    declare tree, xt, xd, types any;
-    declare id, cnt, url, tmp, access_token, client_id, client_secret, code varchar;
-    declare pos integer;
+  declare og_conns, conns any;
+  declare conn_str, token_str varchar;
+
+  token_str := '';
+  if (append_access_token and access_token is not null and length (access_token) > 0)
+    token_str := '?access_token=' || access_token;
+
+  og_conns := vector();
+  conns := xpath_eval('/results/metadata/connections/*', xt, 0);
+  foreach (any conn in conns) do
+  {
+    conn_str := cast (conn as varchar) || token_str;
+    og_conns := vector_concat (og_conns,
+        vector (cast(xpath_eval('local-name()', conn) as varchar), conn_str));
+  }
+
+  return og_conns;
+}
+;
+
+create procedure DB.DBA.OPENGRAPH_SAVE_ACCESS_TOKEN (
+  in og_user_id varchar,
+  in og_user_name varchar,
+  in fb_app_site_url varchar,
+  in fb_app_id varchar,
+  in oauth_token varchar,
+  in oauth_token_expiry int
+  )
+{
+  declare dt_expires datetime;
+
+  dt_expires := null;
+  if (oauth_token_expiry is not null)
+    dt_expires := dateadd ('second', atoi (oauth_token_expiry) , now ());
+
+  insert soft DB.DBA.OPENGRAPH_ACCESS_TOKENS (OGAT_GRANTOR_ID, OGAT_GRANTOR_NAME, OGAT_APP_SITE_URL, OGAT_APP_ID, OGAT_ACCESS_TOKEN, OGAT_CREATED, OGAT_LIFETIME, OGAT_EXPIRES)
+    values (og_user_id, og_user_name, fb_app_site_url, fb_app_id, oauth_token, now (), oauth_token_expiry, dt_expires);
+}
+;
+
+create procedure DB.DBA.OPENGRAPH_GET_ACCESS_TOKEN (in og_id varchar)
+{
+  declare access_token varchar;
+
+  access_token := null;
+
+  if (length (og_id) > 0)
+  {
+    -- First look for a non-expiring access token.
+    -- Facebook grants the same access token in response to repeated requests for a 
+    -- non-expiring token for a particular Facebook app by the same user.
+    -- If more than one non-expiring access token exists in OPENGRAPH_ACCESS_TOKENS 
+    -- for the same combination of user (and app), all but the most recent 
+    -- are assumed to have been revoked by the user and hence be invalid.
+    for (select top 1 
+         OGAT_ACCESS_TOKEN as _token
+       from
+         DB.DBA.OPENGRAPH_ACCESS_TOKENS
+       where
+         OGAT_GRANTOR_ID = og_id and OGAT_EXPIRES is null and OGAT_APP_SITE_URL like '%facebook_oauth/'
+       order by OGAT_CREATED desc
+      )
+    do
+    {
+      access_token := _token;
+    }
+
+    if (access_token is not null)
+      return access_token;
+
+    -- Then look for an unexpired expiring access token
+    for (select top 1 
+         OGAT_ACCESS_TOKEN as _token
+       from
+         DB.DBA.OPENGRAPH_ACCESS_TOKENS
+       where
+         OGAT_GRANTOR_ID = og_id and OGAT_EXPIRES > now() and OGAT_APP_SITE_URL like '%facebook_oauth/'
+      )
+    do
+    {
+      access_token := _token;
+    }
+
+    if (access_token is not null)
+      return access_token;
+
+    -- Use any available non-expiring access token to sign requests 
+    for (select top 1 
+       OGAT_ACCESS_TOKEN as _token
+     from 
+       DB.DBA.OPENGRAPH_ACCESS_TOKENS 
+     where 
+       OGAT_EXPIRES is null and OGAT_APP_SITE_URL like '%facebook_oauth/'
+     order by OGAT_CREATED desc
+    )
+    do
+    {
+      access_token := _token;
+    }
+
+    return access_token;
+  }
+  else
+  {
+    declare access_tokens any;
+    access_tokens := (select DB.DBA.VECTOR_AGG(OGAT_ACCESS_TOKEN) from DB.DBA.OPENGRAPH_ACCESS_TOKENS 
+                      where OGAT_APP_SITE_URL like '%facebook_oauth/'
+                      order by OGAT_CREATED desc);
+    return access_tokens;
+  }
+}
+;
+
+create procedure DB.DBA.OPENGRAPH_CHECK_ACCESS_TOKENS ()
+{
+  -- Checks for invalid access tokens:
+  -- After granting a token, a user may subsequently have revoked it by opting to deny the Sponger Facebook application access to their profile, 
+  -- or they may have changed their password.
+
+  declare token_test_url_template, url, cnt varchar;
+  declare tree, xt, hdr any;
+  -- declare grantor_id, access_token any;
+
+  if (not exists( select top 1 1 from DB.DBA.SYS_COLS where upper("TABLE") = 'DB.DBA.OPENGRAPH_ACCESS_TOKENS' and upper("COLUMN") = 'OGAT_TOKEN_INVALID'))
+  {
+    log_message ('%s: Update RDF Mappers VAD or run RM_UPGRADE_TBL (''DB.DBA.OPENGRAPH_ACCESS_TOKENS'', ''OGAT_TOKEN_INVALID'', ''integer default 0'')', current_proc_name());
+    return;
+  }
+
+  -- Not all Graph API connections require an access token; photos does.
+  token_test_url_template := 'https://graph.facebook.com/%s/photos?access_token=%s';
+  for (select OGAT_GRANTOR_ID as grantor_id, OGAT_ACCESS_TOKEN as access_token from DB.DBA.OPENGRAPH_ACCESS_TOKENS where OGAT_TOKEN_INVALID is null or OGAT_TOKEN_INVALID = 0) do
+  {
+    url := sprintf (token_test_url_template, grantor_id, access_token);
+    cnt := http_client_ext (url, headers=>hdr);
+    -- Invalid tokens result in HTTP/1.1 400 Bad Request
+    if (hdr[0] like 'HTTP/1._ 400 %')
+    {
+      tree := json_parse (cnt);
+      if (tree is not null)
+      {
+        xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+        if (xpath_eval ('/results/error/type[. = "OAuthException"]', xt) is not null)
+        {
+	  declare msg varchar;
+	  msg := cast (xpath_eval ('/results/error/message', xt) as varchar);
+	  if (strstr (msg, 'Error validating access token') is not null)
+	  {
+	    update DB.DBA.OPENGRAPH_ACCESS_TOKENS set OGAT_TOKEN_INVALID = 1 where OGAT_ACCESS_TOKEN = access_token;
+	  }
+        }
+      }
+    }
+  }
+}
+;
+
+-- Define virtual dir /facebook_oauth for use when retrieving Facebook OAuth access tokens
+
+DB.DBA.VHOST_REMOVE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/facebook_oauth'
+);
+
+DB.DBA.VHOST_DEFINE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/facebook_oauth',
+	 ppath=>'/DAV/VAD/rdf_mappers/sponger_front_page/',
+	 is_dav=>1,
+	 def_page=>'fb_access_token_popup.vsp',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 opts=>vector ('executable', 'yes', 'browse_sheet', ''),
+	 is_default_host=>0
+);
+
+-- Define virtual dir /linkedin_oauth for use when retrieving Facebook OAuth access tokens
+
+DB.DBA.VHOST_REMOVE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/linkedin_oauth'
+);
+
+DB.DBA.VHOST_DEFINE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/linkedin_oauth',
+	 ppath=>'/DAV/VAD/rdf_mappers/sponger_front_page',
+	 is_dav=>1,
+	 def_page=>'linkedin_access_token.vsp',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 opts=>vector ('executable', 'yes', 'browse_sheet', ''),
+	 is_default_host=>0
+);
+
+-- Define virtual dir /twitter_oauth for use when retrieving Twitter OAuth access tokens
+
+DB.DBA.VHOST_REMOVE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/twitter_oauth'
+);
+
+DB.DBA.VHOST_DEFINE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/twitter_oauth',
+	 ppath=>'/DAV/VAD/rdf_mappers/sponger_front_page',
+	 is_dav=>1,
+	 def_page=>'twitter_access_token.vsp',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 opts=>vector ('executable', 'yes', 'browse_sheet', ''),
+	 is_default_host=>0
+);
+
+create procedure DB.DBA.RDF_LOAD_ZOOPLA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+    declare xt, xd any;
+	declare test int;
+    declare url, tmp, ses, query varchar;
+    if (not isstring (_key))
+        return 0;
     declare exit handler for sqlstate '*'
     {
-        DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
         return 0;
     };
-    
-    if (new_origin_uri like 'http://www.facebook.com/profile.php?id=%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.facebook.com/profile.php?id=%s', 0);
-        id := rtrim(tmp[0], '&/');
-        pos := strchr(id, '&');
-        if (pos > 0)
-			id := left(id, pos);
-		if (id is null)
-			return 0;
-	}
-    else if (new_origin_uri like 'http://www.facebook.com/album.php?aid=%&id=%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.facebook.com/album.php?aid=%s&id=%s', 0);
-        id := rtrim(tmp[1], '&/');
-        pos := strchr(id, '?');
-        if (pos > 0)
-			id := left(id, pos);
-		if (id is null)
+    if (new_origin_uri like 'http://www.zoopla.co.uk/property/%')
+    {
+        tmp := sprintf_inverse (new_origin_uri, 'http://www.zoopla.co.uk/property/%s', 0);
+		query := trim(tmp[0], '/#?');
+		test := strchr(query, '#');
+		if (test is not NULL)
+			query := subseq(query, 0, test);
+		test := strchr(query, '?');
+		if (test is not NULL)
+			query := subseq(query, 0, test);
+		query := trim(query, '/#?');
+		test := strrchr(query, '/');
+		if (test is not NULL)
+			query := subseq(query, test+1);
+		if (length(query) > 0)
+			url := sprintf ('http://api.zoopla.co.uk/api/v1/zoopla_estimates?property_id=%s&api_key=%s', query, _key);
+		else
 			return 0;
-	}
-    else if (new_origin_uri like 'http://www.facebook.com/%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.facebook.com/%s', 0);
-        id := rtrim(tmp[0], '&/');
-        pos := strchr(id, '?');
-        if (pos > 0)
-			id := left(id, pos);
-		if (id is null)
+    }
+	else if (new_origin_uri like 'http://www.zoopla.co.uk/%/details/%')
+    {
+        tmp := sprintf_inverse (new_origin_uri, 'http://www.zoopla.co.uk/%s/details/%s', 0);
+		query := trim(tmp[1], '/#?');
+		test := strchr(query, '#');
+		if (test is not NULL)
+			query := subseq(query, 0, test);
+		test := strchr(query, '?');
+		if (test is not NULL)
+			query := subseq(query, 0, test);
+		query := trim(query, '/#?');
+		test := strrchr(query, '/');
+		if (test is not NULL)
+			query := subseq(query, 0, test);
+		if (length(query) > 0)
+			url := sprintf ('http://api.zoopla.co.uk/api/v1/property_listings?listing_id=%s&api_key=%s', query, _key);
+		else
 			return 0;
-	}
+    }
     else
         return 0;
-    url := sprintf ('https://graph.facebook.com/%s', id);
-    cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-    tree := json_parse (cnt);
-    xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fb_og2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+    xd := xtree_doc (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/zoopla2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
     xd := serialize_to_UTF8_xml (xt);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-    return 0;
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_ZILLOW (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_ZILLOW (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, url, url2, tmp, api_key, full_address, address, citystatezip, zpid, hdr any;
     declare api_ret varchar;
 	declare iAve, iDr, iLn, iPl, iRd, iSt, iUnit, iWay, cAddrFlds, iFld, sSearch any;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	api_key := _key;
@@ -3188,9 +4297,9 @@ create procedure DB.DBA.RDF_LOAD_ZILLOW (in graph_iri varchar, in new_origin_uri
 
     xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/zillow2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar) ));
     xd := serialize_to_UTF8_xml (xd);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 
 	-- GetUpdatedPropertyDetails often returns error code 501:
 	--     "The updated data for the property you are requesting is not available due to legal restrictions"
@@ -3207,20 +4316,20 @@ create procedure DB.DBA.RDF_LOAD_ZILLOW (in graph_iri varchar, in new_origin_uri
 
     xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/zillow2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar) ));
     xd := serialize_to_UTF8_xml (xd);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url2);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url2);
 
     return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_FRIENDFEED (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_FRIENDFEED (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
 	asin := null;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://friendfeed.com/search?q=%')
@@ -3245,24 +4354,24 @@ create procedure DB.DBA.RDF_LOAD_FRIENDFEED (in graph_iri varchar, in new_origin
         return 0;
     tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
     xd := xtree_doc (tmp);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
     xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/friendfeed2rdf.xsl', xt, vector ('baseUri', graph_iri, 'isDiscussion', 1));
     xd := serialize_to_UTF8_xml (xd);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
     return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_TWFY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_TWFY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
 	asin := null;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	api_key := _key;
@@ -3298,16 +4407,16 @@ create procedure DB.DBA.RDF_LOAD_TWFY (in graph_iri varchar, in new_origin_uri v
             return 0;
    tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
   xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twfy2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twfy2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
   xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
   return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_SLIDESIX (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_SLIDESIX (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xt, xd any;
     declare developer_key_, username_, password_, url, tmp, ses, query varchar;
@@ -3315,10 +4424,10 @@ create procedure DB.DBA.RDF_LOAD_SLIDESIX (in graph_iri varchar, in new_origin_u
     password_ := get_keyword ('password', opts);
     developer_key_ := get_keyword ('developerKey', opts);
     if (not isstring (username_) and isstring (password_) and isstring (developer_key_))
-        return 0;        
+        return 0;
     declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
             return 0;
     };
     url := sprintf ('http://slidesix.com/api/SlideSix.cfc?method=authenticateUser&APIKEY=%s&LOGINUSER=%s&LOGINPASSWORD=%s&RETURNTYPE=XML', developer_key_, username_, md5(password_));
@@ -3339,11 +4448,11 @@ create procedure DB.DBA.RDF_LOAD_SLIDESIX (in graph_iri varchar, in new_origin_u
         return 0;
     tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
     xd := xtree_doc (tmp);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/slidesix2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/slidesix2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
     xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
     return 1;
 }
 ;
@@ -3360,7 +4469,7 @@ create procedure slideshare_hex_sha1_digest(in str varchar)
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare qr, path, hdr any;
 	declare test integer;
@@ -3378,10 +4487,10 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 	  return 0;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	ts :=  cast(datediff ('second', stringdate ('1970-1-1'), now ()) as varchar);
+	ts :=  cast(datediff ('second', stringdate ('1970-1-1'), stringdate(datestring_GMT(now ()))) as varchar);
 	hash1 := slideshare_hex_sha1_digest(concat(SharedSecret, ts));
 	if (new_origin_uri like 'http://www.slideshare.net/search/slideshow?q=%&%' or
 		new_origin_uri like 'http://www.slideshare.net/search/slideshow?%&q=%&%')
@@ -3395,7 +4504,7 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 			if (query is null)
 				return 0;
 		}
-		url := sprintf ('http://www.slideshare.net/api/1/search_slideshows?api_key=%U&ts=%U&hash=%U&q=%U', ApiKey, ts, hash1, query);
+		url := sprintf ('http://www.slideshare.net/api/2/search_slideshows?api_key=%U&ts=%U&hash=%U&q=%U', ApiKey, ts, hash1, query);
 	}
 	else if (new_origin_uri like 'http://www.slideshare.net/search/slideshow?q=%')
 	{
@@ -3403,7 +4512,7 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 		query := tmp[0];
 		if (query is null)
 			return 0;
-		url := sprintf ('http://www.slideshare.net/api/1/search_slideshows?api_key=%U&ts=%U&hash=%U&q=%U', ApiKey, ts, hash1, query);
+		url := sprintf ('http://www.slideshare.net/api/2/search_slideshows?api_key=%U&ts=%U&hash=%U&q=%U', ApiKey, ts, hash1, query);
 	}
 	else if (new_origin_uri like 'http://www.slideshare.net/tag/%')
 	{
@@ -3411,7 +4520,7 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 		query := tmp[0];
 		if (query is null)
 			return 0;
-		url := sprintf ('http://www.slideshare.net/api/1/get_slideshow_by_tag?api_key=%U&ts=%U&hash=%U&tag=%U', ApiKey, ts, hash1, query);
+		url := sprintf ('http://www.slideshare.net/api/2/get_slideshow_by_tag?api_key=%U&ts=%U&hash=%U&tag=%U', ApiKey, ts, hash1, query);
 	}
 	else if (new_origin_uri like 'http://www.slideshare.net/group/%')
 	{
@@ -3419,7 +4528,7 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 		query := tmp[0];
 		if (query is null)
 			return 0;
-		url := sprintf ('http://www.slideshare.net/api/1/get_slideshow_by_group?api_key=%U&ts=%U&hash=%U&group_name=%U', ApiKey, ts, hash1, query);
+		url := sprintf ('http://www.slideshare.net/api/2/get_slideshow_by_group?api_key=%U&ts=%U&hash=%U&group_name=%U', ApiKey, ts, hash1, query);
 	}
 	else if (new_origin_uri like 'http://www.slideshare.net/%/%')
 	{
@@ -3434,7 +4543,7 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 			itemname := new_origin_uri;
 		if (username is null)
 			return 0;
-		url := sprintf ('http://www.slideshare.net/api/1/get_slideshow_info?api_key=%U&ts=%U&hash=%U&slideshow_url=%U', ApiKey, ts, hash1, itemname);
+		url := sprintf ('http://www.slideshare.net/api/2/get_slideshow?api_key=%U&ts=%U&hash=%U&slideshow_url=%U', ApiKey, ts, hash1, itemname);
 	}
 	else if (new_origin_uri like 'http://www.slideshare.net/%')
 	{
@@ -3442,31 +4551,31 @@ create procedure DB.DBA.RDF_LOAD_SLIDESHARE (in graph_iri varchar, in new_origin
 		query := tmp[0];
 		if (query is null)
 			return 0;
-		url := sprintf ('http://www.slideshare.net/api/1/get_slideshow_by_user?api_key=%U&ts=%U&hash=%U&username_for=%U', ApiKey, ts, hash1, query);
+		url := sprintf ('http://www.slideshare.net/api/2/get_slideshow_by_user?api_key=%U&ts=%U&hash=%U&username_for=%U', ApiKey, ts, hash1, query);
 	}
 	else
 		return 0;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/slideshare2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/slideshare2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_DISQUS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_DISQUS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare qr, path, hdr any;
-	declare test integer;
+	declare test, pos integer;
 	declare tree, xt, xd, types, api_key, is_search any;
 	declare base, cnt, url, suffix, tmp, asin varchar;
 	hdr := null;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://disqus.com/people/%')
@@ -3481,6 +4590,18 @@ create procedure DB.DBA.RDF_LOAD_DISQUS (in graph_iri varchar, in new_origin_uri
 			asin := subseq(asin, 0, test);
 		url := sprintf ('http://disqus.com/people/%s/comments.rss', asin);
 	}
+	else if (new_origin_uri like 'http://disqus.com/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://disqus.com/%s', 0);
+		asin := tmp[0];
+		asin := trim(asin, '/');
+		if (asin is null)
+			return 0;
+		pos := strchr(asin, '/');
+		if (pos is not null)
+			asin := left(asin, pos);
+		url := sprintf ('http://disqus.com/%s/comments.rss', asin);
+	}
 	else if (new_origin_uri like 'http://%.disqus.com/%')
 	{
 		tmp := sprintf_inverse (new_origin_uri, 'http://%s.disqus.com/%s', 0);
@@ -3493,12 +4614,12 @@ create procedure DB.DBA.RDF_LOAD_DISQUS (in graph_iri varchar, in new_origin_uri
 		return 0;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	--DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), 1);
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	--DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict, 1);
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
@@ -3537,13 +4658,13 @@ create procedure get_url2(in url varchar) returns varchar
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_RHAPSODY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_RHAPSODY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, url, tmp, id, id2, indicators any;
     declare pos int;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://www.rhapsody.com/goto?%&variant=data')
@@ -3574,35 +4695,35 @@ create procedure DB.DBA.RDF_LOAD_RHAPSODY (in graph_iri varchar, in new_origin_u
 	}
 	else
 		return 0;
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rhapsody2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rhapsody2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_TESCO (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_TESCO (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, tmp, id, ses, hdr, tree any;
     declare email_, password_, developer_key_, application_key_, session_key_, url varchar;
     declare exit handler for sqlstate '*'
-      {
-	DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-	return 0;
-      };
+    {
+        DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+        return 0;
+    };
     email_ := get_keyword ('email', opts);
     password_ := get_keyword ('password', opts);
     developer_key_ := get_keyword ('developerKey', opts);
     application_key_ := get_keyword ('applicationKey', opts);
-    
+
     if (not isstring (email_) and isstring (password_) and isstring (developer_key_) and isstring (application_key_))
       return 0;
-    
+
     url := sprintf('https://secure.techfortesco.com/groceryapi_b1/restservice.aspx?command=LOGIN&email=%s&password=%s&developerkey=%s&applicationkey=%s', email_, password_, developer_key_, application_key_);
   	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
 	if (hdr[0] not like 'HTTP/1._ 200 %')
@@ -3612,22 +4733,22 @@ create procedure DB.DBA.RDF_LOAD_TESCO (in graph_iri varchar, in new_origin_uri
     if (session_key_ is null or length(session_key_) = 0)
         return 0;
     if (new_origin_uri like 'http://%tesco.com/%?prodId=%')
-      {
+    {
         tmp := sprintf_inverse (new_origin_uri, 'http://%stesco.com/%s?prodId=%s', 0);
         id := tmp[2];
-      }
+    }
     else if (new_origin_uri like 'http://www.tesco.com/superstore/xpi/%/xpi%.htm')
-      {
-	tmp := sprintf_inverse (new_origin_uri, 'http://www.tesco.com/superstore/xpi/%s/xpi%s.htm', 0);
-	id := tmp[1];
-      }
+    {
+        tmp := sprintf_inverse (new_origin_uri, 'http://www.tesco.com/superstore/xpi/%s/xpi%s.htm', 0);
+        id := tmp[1];
+    }
     else if (new_origin_uri like 'http://www.tesco.com/%?id=%')
     {
         tmp := sprintf_inverse (new_origin_uri, 'http://www.tesco.com/%s?id=%s', 0);
         id := tmp[1];
     }
     else
-      return 0;
+        return 0;
     url := sprintf('http://www.techfortesco.com/groceryapi_b1/restservice.aspx?command=PRODUCTSEARCH&searchtext=%s&page=1&sessionkey=%s', id, session_key_);
     tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
 	if (hdr[0] not like 'HTTP/1._ 200 %')
@@ -3637,22 +4758,22 @@ create procedure DB.DBA.RDF_LOAD_TESCO (in graph_iri varchar, in new_origin_uri
 	}
     tree := json_parse (tmp);
     xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/tesco2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/tesco2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
     xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
     return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_IDIOMAG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_IDIOMAG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, urls, url, tmp, id, id2, indicators any;
     declare pos, i, l int;
     declare exit handler for sqlstate '*'
     {
-		DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
     };
     urls := vector();
@@ -3689,28 +4810,28 @@ create procedure DB.DBA.RDF_LOAD_IDIOMAG (in graph_iri varchar, in new_origin_ur
 	else
 	  return 0;
 
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	for (i := 0, l := length (urls); i < l; i := i + 1)
 	{
 		url := urls[i];
 		tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 		xd := xtree_doc (tmp);
-		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/idiomag2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/idiomag2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 		xd := serialize_to_UTF8_xml (xt);
-		DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-		DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+		DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	}
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_RADIOPOP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_RADIOPOP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, url, tmp, id, id2, indicators any;
     declare pos int;
     declare exit handler for sqlstate '*'
       {
-	DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 	return 0;
       };
     if (new_origin_uri like 'http://www.radiopop.co.uk/users/%')
@@ -3752,15 +4873,15 @@ create procedure DB.DBA.RDF_LOAD_RADIOPOP (in graph_iri varchar, in new_origin_u
 	  }
 	else
 	  return 0;
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
 	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/radiopop2rdf.xsl', xd,
-		vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'user', id ));
+		vector ('baseUri', new_origin_uri, 'user', id ));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
       }
     else
@@ -3768,14 +4889,14 @@ create procedure DB.DBA.RDF_LOAD_RADIOPOP (in graph_iri varchar, in new_origin_u
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_DISCOGS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_DISCOGS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
     declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
     declare pos integer;
     asin := null;
     declare exit handler for sqlstate '*'
       {
-	DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 	return 0;
       };
     api_key := _key;
@@ -3824,22 +4945,22 @@ create procedure DB.DBA.RDF_LOAD_DISCOGS (in graph_iri varchar, in new_origin_ur
     tmp := http_get (url, null, 'GET', 'Accept-Encoding: gzip', null, proxy=>get_keyword_ucase ('get:proxy', opts));
     xd := xtree_doc (tmp);
     xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/discogs2rdf.xsl', xd,
-    	vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+    	vector ('baseUri', new_origin_uri));
     xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
     return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_LIBRARYTHING (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_LIBRARYTHING (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, xt, url, tmp, api_key, id any;
   id := null;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
   api_key := _key;
@@ -3871,16 +4992,16 @@ create procedure DB.DBA.RDF_LOAD_LIBRARYTHING (in graph_iri varchar, in new_orig
   tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
   xd := xtree_doc (tmp);
   xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/lt2rdf.xsl', xd,
-  	vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+  	vector ('baseUri', new_origin_uri));
   xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
   return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_ISBN (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_ISBN (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, xt, url, tmp, api_key, asin, hdr, exif, books any;
 	declare is_book integer;
@@ -3888,7 +5009,7 @@ create procedure DB.DBA.RDF_LOAD_ISBN (in graph_iri varchar, in new_origin_uri v
 	is_book := 0;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	api_key := _key;
@@ -3985,16 +5106,16 @@ create procedure DB.DBA.RDF_LOAD_ISBN (in graph_iri varchar, in new_origin_uri v
 			signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
 		xd := xtree_doc (tmp);
 	}
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/isbn2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/isbn2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_MEETUP2(in url varchar, in new_origin_uri varchar,  in dest varchar, in graph_iri varchar, in what_ varchar, in base varchar, inout opts any) returns integer
+create procedure DB.DBA.RDF_LOAD_MEETUP2(in url varchar, in new_origin_uri varchar,  in dest varchar, in graph_iri varchar, in what_ varchar, in base varchar, inout opts any, in triple_dict any := null) returns integer
 {
 	declare xt, xd, hdr any;
 	declare tmp, test1, test2 varchar;
@@ -4003,26 +5124,26 @@ create procedure DB.DBA.RDF_LOAD_MEETUP2(in url varchar, in new_origin_uri varch
 	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
 	if (not length (hdr) or hdr[0] not like 'HTTP/1._ 200 %')
 	  {
-	    DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, 'API call failed:' || hdr[0]);
+	    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, 'API call failed:' || hdr[0]); 	
 	    return 0;
 	  }
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/meetup2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'base', base, 'what', what_ ));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/meetup2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'base', base, 'what', what_ ));
 	xd := serialize_to_UTF8_xml (xt);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, xt, url, tmp, api_key, hdr, id0, id1, id2, id3, id4, id5, id6 any;
   declare pos, len int;
   declare xsl2, what_, base varchar;
   declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+   {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
   api_key := _key;
@@ -4053,7 +5174,7 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
       id0 := tmp[0];
     if (id0 is null or (id0 = 'www' and id1 is null))
       return 0;
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
     if (id0 = 'www')
       {
 	if (id1 = 'cities')
@@ -4078,14 +5199,14 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 	    else
 	      return 0;
 	    url := concat(url, '&key=', api_key );
-	    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+	    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	  }
 	if (id1 = 'members' and id2 is not null)
 	  {
 	    base := concat('http://www.meetup.com/members/', id2, '/');
 	    url := concat('http://api.meetup.com/members.xml/?member_id=', id2, '&key=', api_key);
 	    what_ := 'member';
-	    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+	    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	  }
 	else
 	  {
@@ -4094,7 +5215,7 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 	      {
 		url := concat('http://api.meetup.com/members.xml/?group_urlname=', id1, '&key=', api_key);
 		what_ := 'members';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	    else if (id1 is not null and id2 = 'calendar')
 	      {
@@ -4102,38 +5223,38 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 		  {
 		    url := concat('http://api.meetup.com/events.xml/?group_urlname=', id1, '&key=', api_key);
 		    what_ := 'events';
-		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 		  }
 		else
 		  {
 		    url := concat('http://api.meetup.com/events.xml/?id=', id3, '&key=', api_key);
 		    what_ := 'event';
-		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 		  }
 	      }
 	    else if (id1 is not null and id2 = 'photos')
 	      {
 		url := concat('http://api.meetup.com/photos.xml/?group_urlname=', id1, '&key=', api_key);
 		what_ := 'photos';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	    else
 	      {
 		url := sprintf('http://api.meetup.com/groups.xml/?group_urlname=%s&key=%s', id1, api_key);
 		what_ := 'groups';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/members.xml/?group_urlname=', id1, '&key=', api_key);
 		what_ := 'members';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/events.xml/?group_urlname=', id1, '&key=', api_key);
 		what_ := 'events';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := sprintf('http://api.meetup.com/comments.xml/?group_urlname=%s&key=%s', id1, api_key);
 		what_ := 'comments';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	  }
       }
@@ -4161,7 +5282,7 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 	    else
 	      return 0;
 	    url := concat(url, '&key=', api_key );
-	    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+	    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	  }
 	else
 	  {
@@ -4170,13 +5291,13 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 	      {
 		url := concat('http://api.meetup.com/members.xml/?topic=', id0, '&groupnum=', id1, '&key=', api_key);
 		what_ := 'members';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	    if (id1 is not null and id2 = 'photos')
 	      {
 		url := concat('http://api.meetup.com/photos.xml/?topic=', id0, '&groupnum=', id1, '&key=', api_key);
 		what_ := 'photos';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	    if (id1 is not null and id2 = 'calendar')
 	      {
@@ -4184,14 +5305,14 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 		  {
 		    url := concat('http://api.meetup.com/events.xml/?topic=', id0, '&groupnum=', id1, '&key=', api_key);
 		    what_ := 'events';
-		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 		  }
 		else
 		  {
 		    base := concat(trim(new_origin_uri, '/'), '/');
 		    url := concat('http://api.meetup.com/events.xml/?id=', id3, '&key=', api_key);
 		    what_ := 'event';
-		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		    DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 		  }
 	      }
 	    if (id1 is null or id1 = '')
@@ -4200,37 +5321,37 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 
 		url := sprintf('http://api.meetup.com/groups.xml/?topic=%s&key=%s', id0, api_key);
 		what_ := 'groups';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/members.xml/?topic=', id0, '&key=', api_key);
 		what_ := 'members';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/events.xml/?topic=', id0, '&key=', api_key);
 		what_ := 'events';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/comments.xml/?topic=', id0, '&key=', api_key);
 		what_ := 'comments';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	    else
 	      {
 		url := sprintf('http://api.meetup.com/groups.xml/?topic=%s&groupnum=%s&key=%s', id0, id1, api_key);
 		what_ := 'groups';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/members.xml/?topic=', id0, '&groupnum=', id1, '&key=', api_key);
 		what_ := 'members';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/events.xml/?topic=', id0, '&groupnum=', id1, '&key=', api_key);
 		what_ := 'events';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 
 		url := concat('http://api.meetup.com/comments.xml/?topic=', id0, '&groupnum=', id1, '&key=', api_key);
 		what_ := 'comments';
-		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts);
+		DB.DBA.RDF_LOAD_MEETUP2(url, new_origin_uri, dest, graph_iri, what_, base, opts, triple_dict);
 	      }
 	  }
       }
@@ -4239,23 +5360,23 @@ create procedure DB.DBA.RDF_LOAD_MEETUP (in graph_iri varchar, in new_origin_uri
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_LASTFM2 (in url varchar, in new_origin_uri varchar,  in dest varchar, in graph_iri varchar, inout opts any)
+create procedure DB.DBA.RDF_LOAD_LASTFM2 (in url varchar, in new_origin_uri varchar,  in dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
  returns integer
 {
 	declare xt, xd any;
 	declare tmp varchar;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/lastfm2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/lastfm2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	--RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, xt, url, tmp, tmp1, server, api_key, hdr, gr_iri any;
 	declare pos, len int;
@@ -4267,7 +5388,7 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 	id4 := '';
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	api_key := _key;
@@ -4300,10 +5421,7 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 		id0 := tmp[0];
 	else
 		return 0;
-	--gr_iri := iri_to_id (coalesce (dest, graph_iri));
-	--##DB.DBA.SPARUL_CLEAR (coalesce (dest, graph_iri), 1, 0);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	--RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 	if (id0 = 'music')
 	{
 		if (id1 is not null and id1 <> '')
@@ -4312,61 +5430,70 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 			{
 				if (id3 is not null and id3 <> '')
 				{
+					RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 					url := sprintf('http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=%s&artist=%s&track=%s', api_key, id1, id3);
-					DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts);
+					DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts, triple_dict);
 					url := sprintf('http://ws.audioscrobbler.com/2.0/?method=track.getsimilar&artist=%s&track=%s&api_key=%s', id1, id3, api_key);
-					return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts);
+					return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts, triple_dict);
 				}
 				else
 				{
 					if (strchr(id2, '+') = 0)  -- todo: perhaps it needs some processing?
 					{
+						RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=%s&api_key=%s', id1, api_key);
-						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts);
+						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts, triple_dict);
 
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=%s&api_key=%s', id1, api_key);
-						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts);
+						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri, opts, triple_dict);
 
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getevents&artist=%s&api_key=%s', id1, api_key);
-						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=%s&api_key=%s', id1, api_key);
-						return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 					}
 					else if (id1 = '+noredirect')
 					{
+						RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=%s&api_key=%s', id2, api_key);
-						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=%s&api_key=%s', id2, api_key);
-						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getevents&artist=%s&api_key=%s', id2, api_key);
-						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=%s&api_key=%s', id2, api_key);
-						return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 					}
 					else
 					{
+						RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 						url := sprintf('http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=%s&artist=%s&album=%s', api_key, id1, id2);
-						return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+						return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 					}
 				}
 			}
 			else
 			{
-				url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=%s&api_key=%s', id1, api_key);
-				DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+				RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
 
+				url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=%s&api_key=%s', id1, api_key);
+				DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 				url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=%s&api_key=%s', id1, api_key);
-				DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+				DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 				url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getevents&artist=%s&api_key=%s', id1, api_key);
-				DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+				DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 				url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=%s&api_key=%s', id1, api_key);
-				return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+				return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 			}
 		}
 		else
@@ -4376,17 +5503,19 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 	{
 		if (id1 is not null and id1 <> '')
 		{
+			RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getevents&artist=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=%s&api_key=%s', id1, api_key);
-			return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 		}
 		else
 			return 0;
@@ -4398,8 +5527,10 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 			pos := strchr(id1, '+');
 			if (pos > 0)
 				id1 := left(id1, pos);
+			RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=event.getinfo&event=%s&api_key=%s', id1, api_key);
-			return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			return DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 		}
 		else
 			return 0;
@@ -4408,26 +5539,28 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 	{
 		if (id1 is not null and id1 <> '' and (id2 = '' or id2 is null))
 		{
+			RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+
 			url := sprintf('http://ws.audioscrobbler.com/1.0/user/%s/profile.xml', id1);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=user.getfriends&user=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=user.gettopalbums&user=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=user.gettopartists&user=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
-			
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
+
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			url := sprintf('http://ws.audioscrobbler.com/2.0/?method=user.getplaylists&user=%s&api_key=%s', id1, api_key);
-			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts);
+			DB.DBA.RDF_LOAD_LASTFM2(url, new_origin_uri,  dest, graph_iri,  opts, triple_dict);
 
 			tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 			xd := xtree_doc (tmp);
@@ -4443,8 +5576,8 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 				xd := xtree_doc (tmp);
 				xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/lastfm2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (new_origin_uri), 'id', x));
 				xd := serialize_to_UTF8_xml (xt);
-				DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-				DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url2);
+				DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+				DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url2);
 			}
 		}
 		else if (id1 is not null and id1 <> '' and (id2 = 'library' and id3 = 'playlists' and id4 <> '' and id4 is not null))
@@ -4460,14 +5593,14 @@ create procedure DB.DBA.RDF_LOAD_LASTFM (in graph_iri varchar, in new_origin_uri
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_PICASA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_PICASA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, host_part, xt, url, tmp, api_key, img_id, hdr, exif any;
 	declare album_name, user_name varchar;
 
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (
@@ -4514,11 +5647,11 @@ create procedure DB.DBA.RDF_LOAD_PICASA (in graph_iri varchar, in new_origin_uri
 		tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 		transform:
 		xd := xtree_doc (tmp);
-		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/picasa2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/picasa2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 		xd := serialize_to_UTF8_xml (xt);
-		RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-		DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-		DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+		DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 		return 1;
 	}
 	else
@@ -4529,13 +5662,13 @@ create procedure DB.DBA.RDF_LOAD_PICASA (in graph_iri varchar, in new_origin_uri
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_GEONAMES (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GEONAMES (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, xt, url, tmp, geo_id any;
 	declare pos int;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://%.geonames.org/%')
@@ -4551,22 +5684,22 @@ create procedure DB.DBA.RDF_LOAD_GEONAMES (in graph_iri varchar, in new_origin_u
 		return 0;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/geonames2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/geonames2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_VIMEO (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_VIMEO (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, xt, url, tmp, hdr, id any;
 	declare pos int;
 	declare exit handler for sqlstate '*'
 	{
-        DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+        DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://vimeo.com/%')
@@ -4594,23 +5727,23 @@ create procedure DB.DBA.RDF_LOAD_VIMEO (in graph_iri varchar, in new_origin_uri
     if (hdr[0] not like 'HTTP/1._ 200 %')
         signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/vimeo2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/vimeo2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_YOUTUBE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_YOUTUBE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, host_part, xt, url, tmp, api_key, img_id, hdr, exif any;
   declare xsl2, user_id varchar;
   declare pos int;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
 
@@ -4633,7 +5766,7 @@ create procedure DB.DBA.RDF_LOAD_YOUTUBE (in graph_iri varchar, in new_origin_ur
     ar := split_and_decode (ar);
     img_id := get_keyword ('v', ar);
     if (img_id is null)
-        return 0;
+      return 0;
     url := concat('http://gdata.youtube.com/feeds/api/videos/', img_id);
     tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
     xsl2 := 'xslt/main/atomentry2rdf.xsl';
@@ -4664,10 +5797,10 @@ create procedure DB.DBA.RDF_LOAD_YOUTUBE (in graph_iri varchar, in new_origin_ur
     if (hdr[0] not like 'HTTP/1._ 200 %')
         signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
     xd := xtree_doc (tmp);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/youtube2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/youtube2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
     xd := serialize_to_UTF8_xml (xt);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
     return 1;
   }
   else
@@ -4675,23 +5808,23 @@ create procedure DB.DBA.RDF_LOAD_YOUTUBE (in graph_iri varchar, in new_origin_ur
   --if (hdr[0] not like 'HTTP/1._ 200 %')
   --  signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
   xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || xsl2, xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || xsl2, xd, vector ('baseUri', new_origin_uri));
   xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
   return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_DIGG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_DIGG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, section_name, search, xt, url, tmp, story_url, appkey any;
   story_url := '';
   appkey := 'http://www.openlinksw.com/virtuoso';
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
   if (new_origin_uri like 'http://digg.com/search?%')
@@ -4705,12 +5838,12 @@ create procedure DB.DBA.RDF_LOAD_DIGG (in graph_iri varchar, in new_origin_uri v
       tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
       xd := xtree_doc (tmp);
       xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xd,
-      	vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'isDiscussion', '1'));
+      	vector ('baseUri', new_origin_uri, 'isDiscussion', '1'));
       xd := serialize_to_UTF8_xml (xt);
-      RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-      --DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), 1);
-      DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+      RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+      --DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict, 1);
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
       return 1;
     }
   else if (new_origin_uri like 'http://digg.com/%')
@@ -4726,11 +5859,11 @@ create procedure DB.DBA.RDF_LOAD_DIGG (in graph_iri varchar, in new_origin_uri v
       id := cast (xpath_eval ('string (/stories/story/@id)', xd) as varchar);
       comm := cast (xpath_eval ('string (/stories/story/@comments)', xd) as varchar);
       story_url := cast (xpath_eval ('string (/stories/story/@href)', xd) as varchar);
-      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/digg2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/digg2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
       xd := serialize_to_UTF8_xml (xt);
-      RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+      RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
       url := sprintf ('http://services.digg.com/story/%s/comments?count=%s&appkey=%U', id, comm, appkey);
       tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
       goto diggsvc;
@@ -4749,11 +5882,11 @@ create procedure DB.DBA.RDF_LOAD_DIGG (in graph_iri varchar, in new_origin_uri v
       diggsvc:
       xd := xtree_doc (tmp);
       xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/digg2rdf.xsl', xd,
-      		vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'storyUrl', story_url));
+      		vector ('baseUri', new_origin_uri, 'storyUrl', story_url));
       xd := serialize_to_UTF8_xml (xt);
-      RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+      RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
       return 1;
     }
 ret:
@@ -4761,7 +5894,7 @@ ret:
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_GROUPON (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GROUPON (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, section_name, search, xt, url, tmp any;
 	declare entity varchar;
@@ -4769,23 +5902,30 @@ create procedure DB.DBA.RDF_LOAD_GROUPON (in graph_iri varchar, in new_origin_ur
 
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
+	
 	if (not isstring (_key))
 		return 0;
-	if (new_origin_uri like 'http://www.groupon.com/deals/%')
+		
+	if (new_origin_uri like 'http://www.groupon.com/deals/%' or new_origin_uri like 'https://www.groupon.com/deals/%')
 	{
 		tmp := sprintf_inverse (new_origin_uri, 'http://www.groupon.com/deals/%s', 0);
+		if(tmp is null OR length(tmp)=0)
+		  tmp := sprintf_inverse (new_origin_uri, 'https://www.groupon.com/deals/%s', 0);
 		entity := trim(tmp[0], '/');
 		if (entity is null)
 			return 0;
+			
 		pos := strchr(entity, '/');
 		if (pos is not null and pos <> 0)
 			entity := left(entity, pos);
+			
 		pos := strchr(entity, '?');
 		if (pos is not null and pos <> 0)
 			entity := left(entity, pos);
+			
 		url := sprintf('http://api.groupon.com/v2/deals/%s.xml?client_id=%s', entity, _key);
 	}
 	else
@@ -4794,14 +5934,15 @@ create procedure DB.DBA.RDF_LOAD_GROUPON (in graph_iri varchar, in new_origin_ur
 	xd := xtree_doc (tmp);
 	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/groupon2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_EOL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+
+create procedure DB.DBA.RDF_LOAD_EOL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, section_name, search, xt, url, tmp any;
 	declare entity varchar;
@@ -4809,7 +5950,7 @@ create procedure DB.DBA.RDF_LOAD_EOL (in graph_iri varchar, in new_origin_uri va
 
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://www.eol.org/pages/%')
@@ -4830,22 +5971,22 @@ create procedure DB.DBA.RDF_LOAD_EOL (in graph_iri varchar, in new_origin_uri va
 		return 0;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/eol2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/eol2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_OHLOH (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_OHLOH (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, section_name, search, xt, url, tmp any;
 	declare entity, resource_url, person_iri, docproxy_iri varchar;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	if (new_origin_uri like 'http://rdfohloh.wikier.org/%/%')
@@ -4875,36 +6016,40 @@ create procedure DB.DBA.RDF_LOAD_OHLOH (in graph_iri varchar, in new_origin_uri
 	tmp := replace(tmp, concat('\"', url, '/rdf\"'), concat('\"', docproxy_iri, '\"'));
 	tmp := replace(tmp, concat('\"', url, '\"'), concat('\"', resource_url, '\"'));
 	tmp := replace(tmp, concat('\"', url, '#person\"'), concat('\"', person_iri, '\"'));
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (tmp, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, tmp, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_DELICIOUS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_DELICIOUS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, section_name, search, xt, url, tmp any;
 	declare what varchar;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	if (new_origin_uri like 'http://%delicious.com/tags/%' or new_origin_uri like 'http://feeds.delicious.com/v2/rss/tags/%')
+	if (new_origin_uri like 'http://%del.icio.us/tags/%' or new_origin_uri like 'http://%delicious.com/tags/%' or new_origin_uri like 'http://feeds.delicious.com/v2/rss/tags/%')
 		what := 'tags';
-	else if (new_origin_uri like 'http://%delicious.com/url/%' or new_origin_uri like 'http://feeds.delicious.com/v2/rss/url/%')
+	else if (new_origin_uri like 'http://%del.icio.us/url/%' or new_origin_uri like 'http://%delicious.com/url/%' or new_origin_uri like 'http://feeds.delicious.com/v2/rss/url/%')
 	{
 		what := 'url';
 		return 1;
 	}
-	else if (new_origin_uri like 'http://%delicious.com/%/%' or new_origin_uri like 'http://feeds.delicious.com/v2/rss/%/%')
+	else if (new_origin_uri like 'http://%del.icio.us/%/%' or new_origin_uri like 'http://%delicious.com/%/%' or new_origin_uri like 'http://feeds.delicious.com/v2/rss/%/%')
 		what := 'tag';
 	else
 		what := 'user';
-	if (new_origin_uri like 'http://%delicious.com/%')
+	if (new_origin_uri like 'http://%delicious.com/%' or new_origin_uri like 'http://%del.icio.us/%')
 	{
 		tmp := sprintf_inverse (new_origin_uri, 'http://%sdelicious.com/%s', 0);
+		if (tmp is null or tmp = '')
+			tmp := sprintf_inverse (new_origin_uri, 'http://%sdel.icio.us/%s', 0);
+		if (tmp is null or tmp = '')
+			return 0;
 		section_name := trim(tmp[1]);
 		section_name := trim(section_name, '/');
 		if (section_name is null)
@@ -4920,14 +6065,13 @@ create procedure DB.DBA.RDF_LOAD_DELICIOUS (in graph_iri varchar, in new_origin_
 		url := new_origin_uri;
 	else
 		return 0;
-
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/delicious2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', what));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/delicious2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'what', what));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	declare result, meta, state, message any;
 	state := '00000';
 	exec (sprintf('sparql select ?l from <%s> where { <%s> <http://scot-project.org/scot/ns#name> ?l }', graph_iri, graph_iri), state, message, vector (), 0, meta, result);
@@ -4960,7 +6104,7 @@ create procedure DB.DBA.RDF_LOAD_DELICIOUS (in graph_iri varchar, in new_origin_
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_GOOGLE_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLE_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
 	declare pos int;
@@ -4970,7 +6114,7 @@ create procedure DB.DBA.RDF_LOAD_GOOGLE_DOCUMENT (in graph_iri varchar, in new_o
 	pwd := get_keyword ('password', opts, null);
 	declare exit handler for sqlstate '*'
 	{
-		DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	auth_header := null;
@@ -5022,16 +6166,16 @@ create procedure DB.DBA.RDF_LOAD_GOOGLE_DOCUMENT (in graph_iri varchar, in new_o
 	if (hdr[0] not like  'HTTP/1._ 200 %')
 		return 0;
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_document2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_document2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_GOOGLE_SPREADSHEET (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLE_SPREADSHEET (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
 	declare xd, xd2, host_part, xt, url, tmp, api_key, hdr, ids, exif any;
 	declare pos int;
@@ -5041,7 +6185,7 @@ create procedure DB.DBA.RDF_LOAD_GOOGLE_SPREADSHEET (in graph_iri varchar, in ne
 	pwd := get_keyword ('password', opts, null);
 	declare exit handler for sqlstate '*'
 	{
-		DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
 	auth_header := null;
@@ -5079,11 +6223,11 @@ create procedure DB.DBA.RDF_LOAD_GOOGLE_SPREADSHEET (in graph_iri varchar, in ne
 	if (hdr[0] not like  'HTTP/1._ 200 %')
 		return 0;
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_spreadsheet2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', 'doc'));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_spreadsheet2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'what', 'doc'));
 	xd2 := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd2, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd2, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 
 	ids := xpath_eval ('/feed/entry/link[@rel="http://schemas.google.com/spreadsheets/2006#cellsfeed"]/@href', xd, 0);
 	foreach (any y in ids) do
@@ -5092,23 +6236,23 @@ create procedure DB.DBA.RDF_LOAD_GOOGLE_SPREADSHEET (in graph_iri varchar, in ne
 		url := cast(y as varchar);
 		tmp := DB.DBA.RDF_HTTP_URL_GET (url, url, hdr, 'GET', auth_header, proxy=>get_keyword_ucase ('get:proxy', opts));
 		xd := xtree_doc (tmp);
-		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_spreadsheet2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', 'cells'));
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_spreadsheet2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'what', 'cells'));
 		xd := serialize_to_UTF8_xml (xt);
-		DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-		DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+		DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	}
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_OREILLY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_OREILLY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
   declare pos int;
   declare book_id varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
     if (new_origin_uri like 'http://www.oreilly.com/catalog/%')
@@ -5136,23 +6280,23 @@ create procedure DB.DBA.RDF_LOAD_OREILLY (in graph_iri varchar, in new_origin_ur
     url := sprintf('http://oreilly.com/catalog/%s/', book_id);
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp, 2);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/oreilly2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/oreilly2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar)));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_GOOGLE_BOOK (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLE_BOOK (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
   declare pos int;
   declare book_id varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
     if (new_origin_uri like 'http://books.google.com/books?id=%')
@@ -5171,750 +6315,1406 @@ create procedure DB.DBA.RDF_LOAD_GOOGLE_BOOK (in graph_iri varchar, in new_origi
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp, 2);
 	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_book2rdf.xsl',
-        xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+        xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_GOOGLE_PLACES (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, host_part, xt, url, tmp, hdr, tree any;
+	declare pos int;
+	declare lat, lng, name, reference, item_id, ret_body varchar;
+	declare exit handler for sqlstate '*'
+    {
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+    };
+	if (length (_key) = 0)
+		return 0;
+	ret_body := _ret_body;
+	if (new_origin_uri like 'http://maps.google.com/maps?cid=%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://maps.google.com/maps?cid=%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
+			return 0;
+		pos := strchr(item_id, '/');
+		if (pos is not null and pos <> 0)
+			item_id := left(item_id, pos);
+		url := concat('http://maps.google.com/maps/place?cid=', item_id);
+		ret_body := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+		if (length(ret_body) > 0)
+			goto next_procedure;
+		else
+			return 0;
+	}
+	else if (new_origin_uri like 'http://maps.google.com/maps/place?cid=%')
+	{
+next_procedure:	
+		tmp := cast (xpath_eval ('//div[@id="pp-marker-json"]', xtree_doc (ret_body, 2)) as varchar);
+		tmp := sprintf_inverse (tmp, '%s{lat:%s,lng:%s}%s,name:"%s"%s', 0);
+		lat := tmp[1];
+		lng := tmp[2];
+		name := replace(tmp[4], ' ', '+');
+		if (lat is null or lng is null)
+			return 0;
+		url := sprintf('https://maps.googleapis.com/maps/api/place/search/xml?location=%s,%s&radius=500&name=%U&sensor=false&key=%s', lat, lng, name, _key);
+		tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+		xd := xtree_doc (tmp);
+		reference := cast (xpath_eval ('/PlaceSearchResponse/result/reference', xd) as varchar);
+		if (reference is null)
+			return 0;
+		url := sprintf('https://maps.googleapis.com/maps/api/place/details/xml?reference=%s&sensor=true&key=%s', reference, _key);
+		tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+		if (hdr[0] not like 'HTTP/1._ 200 %')
+			signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+		xd := xtree_doc (tmp);
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_place2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+		xd := serialize_to_UTF8_xml (xt);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+		DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+		return 1;
+	}
+	else
+		return 0;
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_ETSY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+
+create procedure DB.DBA.RDF_LOAD_GOOGLE_PROFILE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
   declare xd, host_part, xt, url, tmp, hdr, tree any;
   declare pos int;
-  declare item_id, action varchar;
+  declare item_id, item_id2, action varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-    if (new_origin_uri like 'http://www.etsy.com/people/%')
+	
+	if (new_origin_uri like 'https://plus.google.com/%/buzz' or new_origin_uri like 'https://plus.google.com/%/buzz/owner')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.etsy.com/people/%s', 0);
+		tmp := sprintf_inverse (new_origin_uri, 'https://plus.google.com/%s/buzz%s', 0);
 		item_id := trim(tmp[0], '/');
 		if (item_id is null)
 			return 0;
 		pos := strchr(item_id, '/');
 		if (pos is not null and pos <> 0)
 			item_id := left(item_id, pos);
-	    url := sprintf('http://beta-api.etsy.com/v1/users/%s?api_key=%s&detail_level=high', item_id, _key);
-	    action := 'user';
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);		
+	    url := sprintf('https://www.googleapis.com/buzz/v1/activities/%s/@self?key=%s', item_id, _key);
+		action := 'buzz';
+		DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(url, action, opts, graph_iri, new_origin_uri, dest, triple_dict);
 	}
-    else if (new_origin_uri like 'http://www.etsy.com/view_listing.php?listing_id=%')
+	else if (new_origin_uri like 'https://plus.google.com/%/about')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.etsy.com/view_listing.php?listing_id=%s', 0);
+		tmp := sprintf_inverse (new_origin_uri, 'https://plus.google.com/%s/about', 0);
 		item_id := trim(tmp[0], '/');
 		if (item_id is null)
 			return 0;
 		pos := strchr(item_id, '/');
 		if (pos is not null and pos <> 0)
 			item_id := left(item_id, pos);
-	    url := sprintf('http://beta-api.etsy.com/v1/listings/%s?api_key=%s&detail_level=high', item_id, _key);
-		action := 'prod';
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);		
+	    url := sprintf('https://www.googleapis.com/buzz/v1/people/%s/@self?alt=atom&pp=1&key=%s', item_id, _key);
+		action := 'about';
+		DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(url, action, opts, graph_iri, new_origin_uri, dest, triple_dict);
 	}
-    else if (new_origin_uri like 'http://www.etsy.com/listing/%')
+	else if (new_origin_uri like 'https://plus.google.com/%/photos')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.etsy.com/listing/%s', 0);
+		tmp := sprintf_inverse (new_origin_uri, 'https://plus.google.com/%s/photos', 0);
 		item_id := trim(tmp[0], '/');
 		if (item_id is null)
 			return 0;
 		pos := strchr(item_id, '/');
 		if (pos is not null and pos <> 0)
 			item_id := left(item_id, pos);
-	    url := sprintf('http://beta-api.etsy.com/v1/listings/%s?api_key=%s&detail_level=high', item_id, _key);
-		action := 'prod';
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);		
+	    url := sprintf('https://www.googleapis.com/buzz/v1/photos/%s/@self?key=%s', item_id, _key);
+		action := 'photos';
+		DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(url, action, opts, graph_iri, new_origin_uri, dest, triple_dict);
+	}
+    else if (new_origin_uri like 'https://plus.google.com/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'https://plus.google.com/%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
+			return 0;
+		pos := strchr(item_id, '/');
+		if (pos is not null and pos <> 0)
+		{
+			if (subseq(item_id, pos+1) = 'about')
+			item_id := left(item_id, pos);
+			else
+				return 0;
+		}
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);		
+	    
+		url := sprintf('https://www.googleapis.com/buzz/v1/people/%s/@self?alt=atom&pp=1&key=%s', item_id, _key);
+		action := 'about';
+		DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(url, action, opts, graph_iri, new_origin_uri, dest, triple_dict);
+		
+		url := sprintf('https://www.googleapis.com/buzz/v1/people/%s/@groups/@following?key=%s', item_id, _key);
+		action := 'following';
+		DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(url, action, opts, graph_iri, new_origin_uri, dest, triple_dict);
+
+		url := sprintf('https://www.googleapis.com/buzz/v1/people/%s/@groups/@followers?key=%s', item_id, _key);
+		action := 'followers';
+		DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(url, action, opts, graph_iri, new_origin_uri, dest, triple_dict);
 	}
 	else
 		return 0;
-	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-	tree := json_parse (tmp);
-	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/etsy2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'action', action));
-	xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_TUMBLR (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLE_PROFILE_REST(in url varchar, in action varchar, inout opts any, in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout triple_dict any)
 {
-  declare xd, host_part, xt, url, tmp, hdr, exif any;
-  declare _id, _id2 varchar;
-  declare pos int;
-  declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
-      return 0;
-    };
-    if (new_origin_uri like 'http://%.tumblr.com' or new_origin_uri like 'http://%.tumblr.com/')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://%s.tumblr.com%s', 0);
-		_id := tmp[0];
-		if (_id is null)
-			return 0;
-		url := sprintf('http://%s.tumblr.com/api/read', _id);
-	}
-    else if (new_origin_uri like 'http://%.tumblr.com/post/%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://%s.tumblr.com/post/%s', 0);
-		_id := tmp[0];
-		_id2 := tmp[1];
-		if (_id is null)
-			return 0;
-		url := sprintf('http://%s.tumblr.com/api/read', _id);
-		if (_id2 is not null)
-		{
-			pos := strchr(_id2, '/');
-			if (pos is not null)
-				_id2 := left(_id2, pos);
-			url := sprintf('%s?id=%s', url, _id2);
-		}			
-	}
-	else
-		return 0;
-    tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+  declare xd, xt, tmp, hdr any;
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
     if (hdr[0] not like 'HTTP/1._ 200 %')
         signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
     xd := xtree_doc (tmp);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/tumblr2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_profile2rdf.xsl',
+		xd, vector ('baseUri', new_origin_uri, 'action', action));
     xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-	return 1;
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_WINE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+-- /* Google+ */
+create procedure DB.DBA.RDF_LOAD_GOOGLE_PLUS (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, host_part, xt, url, tmp, hdr, exif any;
-  declare wine_id varchar;
+  declare xd, xd2, xt, api_urls, tmp, hdr any;
+  declare url, base_url, people_api_url, activity_api_url any;
+  declare uid, post_id, api_mode varchar;
+  declare max_activity_pages, items_per_activity_page integer;
+  declare max_comment_pages, items_per_comment_page integer;
+  declare page_token, post_url varchar;
+  declare first_pass, next_page integer;
+  
   declare exit handler for sqlstate '*'
+  {
+    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+    return 0;
+  };
+
+  if (length (_key) = 0)
+  {
+    log_message (sprintf ('%s: An API key has not been configured for Google+', current_proc_name()));
+    return 0;
+  }
+
+  -- max_activity_pages / max_comment_pages:
+  -- 0 => no limit
+  -- <0 => don't fetch activities / comments
+  max_activity_pages := coalesce (atoi(get_keyword ('max_activity_pages', opts)), 1);
+  max_comment_pages := coalesce (atoi(get_keyword ('max_comment_pages', opts)), 1);
+
+  items_per_activity_page := coalesce (atoi(get_keyword ('items_per_activity_page', opts)), 50);
+  if (items_per_activity_page <= 0 or items_per_activity_page > 100)
+    items_per_activity_page := 100; 
+
+  items_per_comment_page := coalesce (atoi(get_keyword ('items_per_comment_page', opts)), 50);
+  if (items_per_comment_page <= 0 or items_per_comment_page > 100)
+    items_per_comment_page := 100; 
+
+  --
+  -- Sponge G+ post/Activity directly
+  --
+  post_id := regexp_replace (new_origin_uri, 'https?://plus.google.com(/u/0)?/([0-9]{8,})/posts/([a-zA-Z0-9]+)$', '\\3'); 
+  if (post_id <> new_origin_uri)
+  {
+    declare item_kind, item_url, activity_id, params varchar;
+
+    -- Get the Activity ID from the post ID:
+    -- It isn't possible to get the Activity ID directly from the post URL or post ID.
+    -- Using the search API https://developers.google.com/+/api/latest/activities/search to search
+    -- on the post ID is unreliable - often nothing is returned.
+    -- The approach used here is to retrieve and search the user's Activity collection for the
+    -- required post.
+
+    uid := regexp_replace (new_origin_uri, '^https?://plus.google.com(/u/0)?/([0-9]{8,})(/.*)?', '\\2');
+    if (uid = new_origin_uri)
+      return 0;
+
+    url := sprintf ('https://www.googleapis.com/plus/v1/people/%s/activities/public?key=%s&maxResults=100', uid, _key);
+    post_url := replace (new_origin_uri, 'http://', 'https://');
+    base_url := url;
+
+    next_page := 1;
+    while (next_page > 0)
+    {
+      tmp := '';
+      tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+      if (length (tmp) = 0)
+      {
+	log_message (sprintf ('%s: Failed HTTP GET: %s', current_proc_name(), url));
+	return 0;
+      }
+      tmp := json_parse (tmp);
+      xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+      activity_id := cast (xpath_eval (sprintf('/results/items/id[../url = "%s"]', post_url), xd) as varchar);
+      if (activity_id is not null)
+      {
+        goto got_activity_id;
+      }
+
+      page_token := cast (xpath_eval ('/results/nextPageToken', xd) as varchar);
+      if (length (page_token))
+      {
+        next_page := next_page + 1;
+        url := sprintf ('%s&pageToken=%s', base_url, page_token);
+      }
+      else
+        next_page := 0;
+    }
+
+got_activity_id:
+    if (activity_id is null)
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      log_message (sprintf ('%s: Couldn''t find post ID %s amongst the user''s posts', current_proc_name(), post_id));
       return 0;
-    };
-    if (new_origin_uri like 'http://www.wine.com/V6/%/wine/%/%')
+    }
+
+    url := sprintf ('https://www.googleapis.com/plus/v1/activities/%s?key=%s', activity_id, _key);
+    tmp := '';
+    tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+    if (length (tmp) = 0)
+    {
+      log_message (sprintf ('%s: Failed HTTP GET: %s', current_proc_name(), url));
+      return 0;
+    }
+    tmp := json_parse (tmp);
+    xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/googleplus2rdf.xsl', xd, 
+      vector ('baseUri', new_origin_uri, 'mode', 'activity'));
+    xd := serialize_to_UTF8_xml (xt);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+
+    if (max_comment_pages >= 0) 
+      DB.DBA.RDF_LOAD_GOOGLE_PLUS_COMMENTS (graph_iri, new_origin_uri, dest, _key, opts, triple_dict, activity_id, null, items_per_comment_page, max_comment_pages);
+
+    return 1;
+  }
+
+  --
+  -- Sponge G+ user profile and child posts/Activities
+  --
+  uid := regexp_replace (new_origin_uri, '^https?://plus.google.com(/u/0)?/([0-9]{8,})(/.*)?', '\\2');
+  if (uid = new_origin_uri)
+    return 0;
+
+  people_api_url := sprintf ('https://www.googleapis.com/plus/v1/people/%s?key=%s', uid, _key);
+  activity_api_url := sprintf ('https://www.googleapis.com/plus/v1/people/%s/activities/public?key=%s&maxResults=%d', uid, _key, items_per_activity_page);
+  api_urls := vector (vector (people_api_url, 'people'));
+  if (max_activity_pages >= 0)
+    api_urls := vector_concat (api_urls, vector( vector (activity_api_url, 'activity')));
+
+  first_pass := 1;
+  foreach (any pair in api_urls) do
+  {
+    url := pair[0];
+    api_mode := pair[1];
+  
+    next_page := 1;
+    while (next_page > 0)
+    {
+      if (max_activity_pages > 0 and next_page > max_activity_pages)
+        goto got_all_activity_pages;
+
+      tmp := '';
+      DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());        
+      -- tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+      tmp := http_client_ext (url=>url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+      DB.DBA.RM_LOG_RESPONSE (tmp, hdr);
+      if (length (tmp) = 0)
+	return 0;
+  
+      tmp := json_parse (tmp);
+    xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/googleplus2rdf.xsl', xd, 
+      vector ('baseUri', new_origin_uri, 'mode', api_mode));
+    xd2 := serialize_to_UTF8_xml (xt);
+
+    if (first_pass)
+    {
+      RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+      first_pass := 0;
+    }
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd2, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+
+      if (api_mode = 'activity' and max_comment_pages >= 0) 
+    {
+      declare vReplies_urls any;
+      declare replies_url varchar;
+	declare iReply integer;
+	iReply := 0;
+      vReplies_urls := xpath_eval ('/results/items/object/replies/selfLink', xd, 0);
+      foreach (any replies_url_entry in vReplies_urls) do
+      {
+	  iReply := iReply + 1;
+        replies_url := cast (replies_url_entry as varchar);
+          DB.DBA.RDF_LOAD_GOOGLE_PLUS_COMMENTS (graph_iri, new_origin_uri, dest, _key, opts, triple_dict, null, replies_url, items_per_comment_page, max_comment_pages);
+        }
+      }
+
+      if (api_mode = 'activity')
+      {
+        page_token := cast (xpath_eval ('/results/nextPageToken', xd) as varchar);
+	if (length (page_token))
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.wine.com/V6/%s/wine/%s/%s', 0);
-		wine_id := tmp[1];
-		if (wine_id is null)
-			return 0;
-		url := sprintf('http://services.wine.com/api/beta/service.svc/xml/catalog?filter=product(%s)&apikey=%s', wine_id, _key);
+	  next_page := next_page + 1;
+	  url := sprintf ('%s&pageToken=%s', pair[0], page_token);
 	}
-    else if (new_origin_uri like 'http://www.wine.com/V6/%/gift/%/%')
+	else
+	  next_page := 0;
+      }
+      else
+	next_page := 0; -- No paging required for api_mode = 'people'
+    }
+
+got_all_activity_pages:;
+  }
+
+  url := sprintf('http://api.socialstatistics.com/1/users/show/%s.json', uid);
+  tmp := '';
+  tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+  if (length (tmp) = 0)
+    return 0;
+  tmp := json_parse (tmp);
+  xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+  if (xpath_eval('results/error', xd) is null)
+  {
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/socialstatistics2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+    xd2 := serialize_to_UTF8_xml (xt);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd2, new_origin_uri, coalesce (dest, graph_iri));
+  }
+
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_SOCIALSTATISTICS (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, inout triple_dict any := null)
+{
+	declare xd, xd2, xt, api_urls, tmp any;
+	declare url, people_api_url, activity_api_url any;
+	declare item_id varchar;
+	declare pos integer;
+
+	declare exit handler for sqlstate '*'
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.wine.com/V6/%s/gift/%s/%s', 0);
-		wine_id := tmp[1];
-		if (wine_id is null)
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+
+	if (new_origin_uri like 'http://socialstatistics.com/profile/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://socialstatistics.com/profile/%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
 			return 0;
-		url := sprintf('http://services.wine.com/api/beta/service.svc/xml/catalog?filter=product(%s)&apikey=%s', wine_id, _key);
+		pos := strchr(item_id, '/');
+		if (pos is not null and pos <> 0)
+			item_id := left(item_id, pos);
+		url := sprintf('http://api.socialstatistics.com/1/users/show/%s.json', item_id);
 	}
-	else
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (length (tmp) = 0)
 		return 0;
-    tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-    if (hdr[0] not like 'HTTP/1._ 200 %')
-        signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-    xd := xtree_doc (tmp);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/wine2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-    xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	tmp := json_parse (tmp);
+	xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/socialstatistics2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+	xd2 := serialize_to_UTF8_xml (xt);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd2, new_origin_uri, coalesce (dest, graph_iri));
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_EVRI (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLE_PLUS_COMMENTS (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, in _key any, in opts any, inout triple_dict any,
+  in activity_id varchar,	  -- Used when sponging a G+ Post directly
+  in replies_url varchar := null,  -- Used when sponging an G+ Activities list
+  in items_per_comment_page integer, 
+  in max_comment_pages integer
+  )
 {
-  declare xd, host_part, xt, url, tmp, hdr, exif any;
-  declare entity_id, _id varchar;
-  declare exit handler for sqlstate '*'
+  declare base_url, url, tmp, xd, xd2, xt any;
+  declare page_token varchar;
+  declare next_page integer;
+
+  if (activity_id is not null)
+    url := sprintf ('https://www.googleapis.com/plus/v1/activities/%s/comments?key=%s&maxResults=%d', activity_id, _key, items_per_comment_page);
+  else if (replies_url is not null)
+    url := sprintf ('%s?key=%s&maxResults=%d', replies_url, _key, items_per_comment_page);
+  else
+    return;
+
+  base_url := url;
+  next_page := 1;
+  while (next_page > 0)
+  {
+    if (max_comment_pages > 0 and next_page > max_comment_pages)
+      goto got_all_comments_pages;
+
+    tmp := '';
+    tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+    if (length (tmp) = 0)
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
-      return 0;
-    };
-    if (new_origin_uri like 'http://www.evri.com/%/%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.evri.com/%s/%s', 0);
-		entity_id := tmp[0];
-		_id := tmp[1];
-		if (entity_id = 'person' or entity_id = 'location' or entity_id = 'product' or entity_id = 'organization')
-			url := sprintf('http://api.evri.com/v1/%s/%s?appId=evri.com-restdoc', entity_id, _id);
-		else
-			return 0;
-	}
-	else
-		return 0;
-	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-    if (hdr[0] not like 'HTTP/1._ 200 %')
-        signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-    xd := xtree_doc (tmp);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/evri2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'entity', entity_id));
-    xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-	return 1;
+      log_message (sprintf ('%s: Failed HTTP GET: %s', current_proc_name(), url));
+      return;
+    }
+
+    tmp := json_parse (tmp);
+    xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/googleplus2rdf.xsl', xd, 
+      vector ('baseUri', new_origin_uri, 'mode', 'comment'));
+    xd2 := serialize_to_UTF8_xml (xt);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd2, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+
+    page_token := cast (xpath_eval ('/results/nextPageToken', xd) as varchar);
+    if (length (page_token))
+    {
+      next_page := next_page + 1;
+      url := sprintf ('%s&pageToken=%s', base_url, page_token);
+    }
+    else
+      next_page := 0;
+  }
+got_all_comments_pages:;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_CNET (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_ETSY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
+  declare xd, host_part, xt, url, tmp, hdr, tree any;
   declare pos int;
-  declare soft_id varchar;
+  declare item_id, action varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-    if (new_origin_uri like 'http://www.download.com/%/%.html%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.download.com/%s/%s.html%s', 0);
-		soft_id := tmp[1];
-		if (soft_id is null)
-			return 0;
-		pos := strrchr(soft_id, '-');
-		if (pos is not null and pos <> 0)
-			soft_id := right(soft_id, length(soft_id) - (pos + 1));
-		url := sprintf('http://developer.api.cnet.com/rest/v1.0/softwareProduct?iod=none&partKey=%s&partTag=%s&productSetId=%s', _key, _key, soft_id);
-
-	}
-	else if (new_origin_uri like 'http://download.com/%/%.html%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://download.com/%s/%s.html%s', 0);
-		soft_id := tmp[1];
-		if (soft_id is null)
-			return 0;
-		pos := strrchr(soft_id, '-');
-		if (pos is not null and pos <> 0)
-			soft_id := right(soft_id, length(soft_id) - (pos + 1));
-		url := sprintf('http://developer.api.cnet.com/rest/v1.0/softwareProduct?iod=none&partKey=%s&partTag=%s&productSetId=%s', _key, _key, soft_id);
-	}
-	else if (new_origin_uri like 'http://download.cnet.com/%/%.html%')
+    if (new_origin_uri like 'http://www.etsy.com/people/%')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://download.cnet.com/%s/%s.html%s', 0);
-		soft_id := tmp[1];
-		if (soft_id is null)
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.etsy.com/people/%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
 			return 0;
-		pos := strrchr(soft_id, '-');
+		pos := strchr(item_id, '/');
 		if (pos is not null and pos <> 0)
-			soft_id := right(soft_id, length(soft_id) - (pos + 1));
-		url := sprintf('http://developer.api.cnet.com/rest/v1.0/softwareProduct?iod=none&partKey=%s&partTag=%s&productId=%s', _key, _key, soft_id);
+			item_id := left(item_id, pos);
+	    url := sprintf('http://openapi.etsy.com/v2/users/%s?api_key=%s&detail_level=high', item_id, _key);
+	    action := 'user';
 	}
-    else if (new_origin_uri like 'http://shopper.cnet.com/%/%.html%')
+    else if (new_origin_uri like 'http://www.etsy.com/view_listing.php?listing_id=%')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://shopper.cnet.com/%s/%s.html%s', 0);
-		soft_id := tmp[1];
-		if (soft_id is null)
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.etsy.com/view_listing.php?listing_id=%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
 			return 0;
-		pos := strrchr(soft_id, '-');
+		pos := strchr(item_id, '/');
 		if (pos is not null and pos <> 0)
-			soft_id := right(soft_id, length(soft_id) - (pos + 1));
-		url := sprintf('http://developer.api.cnet.com/rest/v1.0/techProduct?iod=breadcrumb,hlPrice,goodBad,userRatings,productSeries,accessories,images,productAuxiliary&partKey=%s&partTag=%s&productId=%s', _key, _key, soft_id);
+			item_id := left(item_id, pos);
+	    url := sprintf('http://openapi.etsy.com/v2/listings/%s?api_key=%s&detail_level=high', item_id, _key);
+		action := 'prod';
 	}
-	else if (new_origin_uri like 'http://reviews.cnet.com/%/%.html%')
+    else if (new_origin_uri like 'http://www.etsy.com/listing/%')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://reviews.cnet.com/%s/%s.html%s', 0);
-		soft_id := tmp[1];
-		if (soft_id is null)
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.etsy.com/listing/%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
 			return 0;
-		pos := strrchr(soft_id, '-');
+		pos := strchr(item_id, '/');
 		if (pos is not null and pos <> 0)
-			soft_id := right(soft_id, length(soft_id) - (pos + 1));
-		url := sprintf('http://developer.api.cnet.com/rest/v1.0/techProduct?iod=breadcrumb,hlPrice,goodBad,userRatings,productSeries,accessories,images,productAuxiliary&partKey=%s&partTag=%s&productId=%s', _key, _key, soft_id);
+			item_id := left(item_id, pos);
+	    url := sprintf('http://openapi.etsy.com/v2/listings/%s?api_key=%s&detail_level=high', item_id, _key);
+		action := 'prod';
 	}
 	else
 		return 0;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/cnet2rdf.xsl', xd,
-	    vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/etsy2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'action', action));
 	xd := serialize_to_UTF8_xml (xt);
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_YELP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GUARDIAN (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-	declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
+	declare xd, host_part, xt, url, tmp, hdr, tree, methods any;
 	declare pos int;
-	declare link varchar;
+	declare item_id varchar;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	if (new_origin_uri like 'http://%.yelp.com/%')
+	if (new_origin_uri like 'http://www.guardian.co.uk/politics/person/%')
 	{
-		tmp := http_client (new_origin_uri, proxy=>get_keyword_ucase ('get:proxy', opts));
-		xt := xtree_doc (tmp, 2);
-		url := xpath_eval ('//link[ @rel="alternate" and @type="application/rss+xml" ]/@href', xt, 0);
-		if (length(url) > 0)
-			url := cast(url[0] as varchar);
-		else
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.guardian.co.uk/politics/person/%s', 0);
+		item_id := trim(tmp[0], '/');
+		if (item_id is null)
 			return 0;
+		pos := strchr(item_id, '/');
+		if (pos is not null and pos <> 0)
+			item_id := left(item_id, pos);
+		pos := strchr(item_id, '#');
+		if (pos is not null and pos <> 0)
+			item_id := left(item_id, pos);
+		url := sprintf('http://www.guardian.co.uk/politics/api/person/%s/json', item_id);
 	}
 	else
 		return 0;
 	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yelp2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/guardian2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_REVYU (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_SEEVL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-	declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
+	declare xd, host_part, xt, url, tmp, hdr, tree, methods any;
 	declare pos int;
-	declare link, user_id varchar;
+	declare item_id, app_id, app_key, auth_header varchar;
+	app_id := get_keyword ('app_id', opts);
+	app_key := get_keyword ('app_key', opts);
+
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	if (new_origin_uri like 'http://%revyu.com/people/%')
+	if (new_origin_uri like 'http://%seevl.net/entity/%')
 	{
-            tmp := sprintf_inverse (new_origin_uri, 'http://%srevyu.com/people/%s', 0);
-            user_id := tmp[1];
-            pos := strstr(user_id, '/about');
-            if (pos is not NULL)
-            {
-                user_id := subseq(user_id, 0, pos);
-            }
-            url := sprintf('http://revyu.com/people/%s/about/rdf', user_id);
+		tmp := sprintf_inverse (new_origin_uri, 'http://%sseevl.net/entity/%s', 0);
+		item_id := trim(tmp[1], '/');
+		if (item_id is null)
+			return 0;
+		pos := strchr(item_id, '/');
+		if (pos is not null and pos <> 0)
+			item_id := left(item_id, pos);
+		pos := strchr(item_id, '#');
+		if (pos is not null and pos <> 0)
+			item_id := left(item_id, pos);
+		pos := strchr(item_id, '?');
+		if (pos is not null and pos <> 0)
+			return 0;
 	}
 	else
 		return 0;
-	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/revyu2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-	xd := serialize_to_UTF8_xml (xt);
-        RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	methods := vector('infos', 'facts', 'topics', 'links', 'related');
+	foreach (any method in methods) do
+	{
+		url := concat('http://data.seevl.net/entity/', item_id, '/', method);
+		auth_header := 'Accept: application/json\r\nX_APP_ID: ' || app_id || '\r\nX_APP_KEY: ' || app_key;
+		tmp := http_get (url, null, 'GET', auth_header, null, proxy=>get_keyword_ucase ('get:proxy', opts));
+		tree := json_parse (tmp);
+		xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/seevl2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'method', method));
+		xd := serialize_to_UTF8_xml (xt);
+		--RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+		DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	}
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_BUGZILLA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_TUMBLR (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, host_part, xt, url, tmp, api_key, img_id, hdr, exif any;
+  declare xd, host_part, xt, url, tmp, hdr, exif any;
+  declare _id, _id2 varchar;
+  declare pos int;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  tmp := sprintf_inverse (new_origin_uri, '%s://%s/show_bug.cgi?id=%s', 0);
-  if (length(tmp) < 2)
-	return 0;
-  img_id := tmp[2];
-  host_part := tmp[1];
-  if (img_id is null)
-    return 0;
-  if (right(host_part, 6) = 'issues')
-	url := concat(tmp[0], '://', host_part, '/xml.cgi?id=', img_id);
-  else
-	url := concat(new_origin_uri, '&ctype=xml');
-  tmp := DB.DBA.RDF_HTTP_URL_GET (url, url, hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-  if (hdr[0] not like 'HTTP/1._ 200 %')
-    signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-  xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/bugzilla2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return 1;
+    if (new_origin_uri like 'http://%.tumblr.com' or new_origin_uri like 'http://%.tumblr.com/')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%s.tumblr.com%s', 0);
+		_id := tmp[0];
+		if (_id is null)
+			return 0;
+		url := sprintf('http://%s.tumblr.com/api/read', _id);
+	}
+    else if (new_origin_uri like 'http://%.tumblr.com/post/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%s.tumblr.com/post/%s', 0);
+		_id := tmp[0];
+		_id2 := tmp[1];
+		if (_id is null)
+			return 0;
+		url := sprintf('http://%s.tumblr.com/api/read', _id);
+		if (_id2 is not null)
+		{
+			pos := strchr(_id2, '/');
+			if (pos is not null)
+				_id2 := left(_id2, pos);
+			url := sprintf('%s?id=%s', url, _id2);
+		}
+	}
+	else
+		return 0;
+    tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+    if (hdr[0] not like 'HTTP/1._ 200 %')
+        signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+    xd := xtree_doc (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/tumblr2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+    xd := serialize_to_UTF8_xml (xt);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_OPENLIBRARY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_WINE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare qr, path any;
-  declare tree, xt, xd, types any;
-  declare k, cnt, url, tmp, img_id varchar;
-  declare pos integer;
+  declare xd, host_part, xt, url, tmp, hdr, exif any;
+  declare wine_id varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  tmp := sprintf_inverse (new_origin_uri, 'http://openlibrary.org/b/%s', 0);
-  img_id := tmp[0];
-  pos := strchr(img_id, '/');
-  if (pos is not null)
-    {
-      img_id := left(img_id, pos);
-    }
-  if (img_id is null)
-    return 0;
-  url := concat('http://openlibrary.org/api/get?key=/b/', img_id);
-  url := concat(url, '&prettyprint=true&text=true');
-  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-  tree := json_parse (cnt);
-  xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/openlibrary2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return 1;
+    if (new_origin_uri like 'http://www.wine.com/V6/%/wine/%/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.wine.com/V6/%s/wine/%s/%s', 0);
+		wine_id := tmp[1];
+		if (wine_id is null)
+			return 0;
+		url := sprintf('http://services.wine.com/api/beta/service.svc/xml/catalog?filter=product(%s)&apikey=%s', wine_id, _key);
+	}
+    else if (new_origin_uri like 'http://www.wine.com/V6/%/gift/%/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.wine.com/V6/%s/gift/%s/%s', 0);
+		wine_id := tmp[1];
+		if (wine_id is null)
+			return 0;
+		url := sprintf('http://services.wine.com/api/beta/service.svc/xml/catalog?filter=product(%s)&apikey=%s', wine_id, _key);
+	}
+	else
+		return 0;
+    tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+    if (hdr[0] not like 'HTTP/1._ 200 %')
+        signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+    xd := xtree_doc (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/wine2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+    xd := serialize_to_UTF8_xml (xt);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_SOCIALGRAPH (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_EVRI (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare qr, path, hdr any;
-  declare tree, xt, xd, types any;
-  declare k, cnt, url varchar;
-  hdr := null;
+  declare xd, host_part, xt, url, tmp, hdr, exif any;
+  declare entity_id, _id varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  url := new_origin_uri;
-  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-  tree := json_parse (cnt);
-  xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/sg2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return 1;
-}
-;
-
-create procedure csv_detect_opts (in s any, in n int := 10)
-{
-  declare delim, quot char;
-  declare r, delims, seprs, best_match, best_delim, best_quot any;
-  declare i, rws int;
-  declare ss, orig any;
-
-  delims := ',\t;:|';
-  seprs  := '"\'';
-  best_match := -1;
-  best_delim := best_quot := null;
-  ss := string_output ();
-  foreach (int d in delims) do
-    {
-      foreach (int sp in seprs) do 
+    if (new_origin_uri like 'http://www.evri.com/%/%')
 	{
-	  i := 0; rws := 0;
-	  delim := chr (d);
-	  quot := chr (sp);
-	  string_output_flush (ss);
-	  http (s, ss);
-	  while (i < n and isvector (r := get_csv_row (ss, delim, quot)))
-        {
-            if (i = 0)
-		rws := length (r);
-	      else if (length (r) <> rws)
-		goto fail;   
-	      i := i + 1;
-	    }
-	  if (i < n)
-	    goto fail;
-	  if (best_match < rws)
-            {
-	      best_match := rws;
-	      best_delim := delim;
-	      best_quot := quot;
-	    }
-	  fail:;
-            }
-    }
-  return vector (best_delim, best_quot);
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.evri.com/%s/%s', 0);
+		entity_id := tmp[0];
+		_id := tmp[1];
+		if (entity_id = 'person' or entity_id = 'location' or entity_id = 'product' or entity_id = 'organization')
+			url := sprintf('http://api.evri.com/v1/%s/%s?appId=evri.com-restdoc', entity_id, _id);
+		else
+			return 0;
+	}
+	else
+		return 0;
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+    if (hdr[0] not like 'HTTP/1._ 200 %')
+        signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+    xd := xtree_doc (tmp);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/evri2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'entity', entity_id));
+    xd := serialize_to_UTF8_xml (xt);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure csv_make_head (in r any)
+create procedure DB.DBA.RDF_LOAD_PLANCAST (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare ret any;
-  ret := make_array (length (r), 'any');      
-  for (declare i int, i := 0; i < length (r); i := i + 1)
-    {
-      if (isstring (r[i]) and length (r[i]))
-	ret[i] := SYS_ALFANUM_NAME (r[i]);
-      else
-        ret[i] := sprintf ('COL%d', i);	
-    }
-  return ret;
+	declare xd, host_part, xt, url, tmp, hdr, exif, tree any;
+	declare entity_id, email_, password_, what_ varchar;
+	declare pos int;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	email_ := get_keyword ('email', opts);
+	password_ := get_keyword ('password', opts);
+	--if (( length (email_) * length (password_) ) = 0)
+	--	return 0;
+	if (new_origin_uri like 'http://plancast.com/p/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://plancast.com/p/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.plancast.com/02/plans/show.json?plan_id=%s&extensions=place,attendees,comments', entity_id);
+		what_ := 'plan';
+	}
+	else if (new_origin_uri like 'http://plancast.com/user/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://plancast.com/user/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.plancast.com/02/users/show.json?user_id=%s', entity_id);
+		what_ := 'user';
+	}
+	else
+		return 0;
+	declare bas, auth_header varchar;
+	bas := encode_base64 (concat(email_, ':', password_));
+    auth_header := 'Authorization: Basic '||bas;
+	tmp := DB.DBA.RDF_HTTP_URL_GET (url, url, hdr, 'GET', auth_header, proxy=>get_keyword_ucase ('get:proxy', opts));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/plancast2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'type', what_));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure csv_to_xml (in s any)
+create procedure DB.DBA.RDF_LOAD_HYPERPUBLIC (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare r, opts, head, ss, ses any;
-  declare i, rcnt int;
-
-  ses := string_output ();
-  http (s, ses);
-  opts := csv_detect_opts (s);
-  head := null;
-  ss := string_output ();
-  http ('<csv>\n', ss);
-  rcnt := 1;
-  while (isvector (r := get_csv_row (ses, opts[0], opts[1])))
-    {
-      if (head is null)
-	head := csv_make_head (r);
-            else
-            {
-	  http (sprintf ('\t<row id="%d">\n\t\t', rcnt), ss);
-	  for (i := 0; i < length (head); i := i + 1)
-	     {
-	       if (i < length (r))
-		 {
-		   if (not isnull (r[i]))
-		     http_value (r[i], head[i], ss);
-		 }
-	     }
-	  http ('\n\t</row>\n', ss);
-	  rcnt := rcnt + 1;
-            }
-        }
-  http ('</csv>', ss);
-  return ss;
-    }
+	declare xd, xt, url, tmp, hdr, tree any;
+	declare entity_id, client_id, client_secret, action varchar;
+	declare pos int;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	client_id := get_keyword ('client_id', opts);
+	client_secret := get_keyword ('client_secret', opts);
+	if (( length (client_id) * length (client_secret) ) = 0)
+		return 0;
+	if (new_origin_uri like 'http://hyperpublic.com/users/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://hyperpublic.com/users/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://api.hyperpublic.com/api/v1/people/%s?client_id=%s&client_secret=%s', entity_id, client_id, client_secret);
+		action := 'people';
+	}
+	else if (new_origin_uri like 'http://hyperpublic.com/places/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://hyperpublic.com/places/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://api.hyperpublic.com/api/v1/places/%s?client_id=%s&client_secret=%s', entity_id, client_id, client_secret);
+		action := 'places';
+	}
+	else if (new_origin_uri like 'http://hyperpublic.com/things/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://hyperpublic.com/things/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://api.hyperpublic.com/api/v1/things/%s?client_id=%s&client_secret=%s', entity_id, client_id, client_secret);
+		action := 'things';
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/hyperpublic2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'action', action));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
 ;
 
-create procedure DB.DBA.RDF_LOAD_CSV (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_UPCOMING (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, xt, url, tmp any;
-  declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
-      return 0;
-    };
-
-  xt := csv_to_xml (_ret_body);  
-  xt := xtree_doc (xt);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/csvxml2rdf.xsl', xt, 
-    vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-    return 1;
+	declare xd, host_part, xt, url, tmp, hdr, exif any;
+	declare entity_id, email_, password_ varchar;
+	declare pos int;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://upcoming.yahoo.com/venue/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://upcoming.yahoo.com/venue/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://upcoming.yahooapis.com/services/rest/?api_key=%s&method=venue.getInfo&venue_id=%s', _key, entity_id);
+	}
+	else if (new_origin_uri like 'http://upcoming.yahoo.com/event/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://upcoming.yahoo.com/event/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://upcoming.yahooapis.com/services/rest/?api_key=%s&method=event.getInfo&event_id=%s', _key, entity_id);
+	}
+	else if (new_origin_uri like 'http://upcoming.yahoo.com/user/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://upcoming.yahoo.com/user/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://upcoming.yahooapis.com/services/rest/?api_key=%s&method=user.getInfo&user_id=%s', _key, entity_id);
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/upcoming2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'entity', entity_id));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_SVG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_EVENTBRITE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, xt, url, tmp, api_key, img_id, hdr, exif any;
-  declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-  xd := xtree_doc (_ret_body);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/svg2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+	declare xd, host_part, xt, url, tmp, hdr, exif any;
+	declare entity_id, app_key_, user_key_ varchar;
+	declare pos int;
+	app_key_ := get_keyword ('app_key', opts);
+	user_key_ := get_keyword ('user_key', opts);
+	if (( length (app_key_) * length (user_key_) ) = 0)
+		return 0;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://www.eventbrite.com/event/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.eventbrite.com/event/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://www.eventbrite.com/xml/event_get?app_key=%s&user_key=%s&id=%s', app_key_, user_key_, entity_id);
+	}
+	else if (new_origin_uri like 'http://%.eventbrite.com%')
+	{
+		tmp := http_client (url=>new_origin_uri, timeout=>30, proxy=>connection_get ('sparql-get:proxy'));
+		xt := xtree_doc (tmp, 2);
+		url := cast (xpath_eval('//meta[@property="og:url"]/@content', xt) as varchar);
+		if (url is null or length(url) = 0)
+			return 0;
+		tmp := sprintf_inverse (url, 'http://www.eventbrite.com/event/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://www.eventbrite.com/xml/event_get?app_key=%s&user_key=%s&id=%s', app_key_, user_key_, entity_id);
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/eventbrite2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'entity', entity_id));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_MS_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_EVENTFUL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare meta, tmp varchar;
-  declare xt, xd any;
-  if (__proc_exists ('unzip_file', 2) is null)
-    return 0;
-  tmp := tmp_file_name ('rdfm', 'doc');
-
-  string_to_file (tmp, _ret_body, -2);
-  meta := unzip_file (tmp, 'docProps/app.xml');
-  file_delete (tmp, 1);
-  if (meta is null)
-    return 0;
-  xt := xtree_doc (meta);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ms_doc2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  string_to_file (tmp, _ret_body, -2);
-  meta := unzip_file (tmp, 'docProps/core.xml');
-  file_delete (tmp, 1);
-  if (meta is null)
-    return 0;
-  xt := xtree_doc (meta);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ms_doc2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+	declare xd, host_part, xt, url, tmp, hdr, exif any;
+	declare entity_id, app_key_, user_key_ varchar;
+	declare pos int;
+	app_key_ := _key;
+	if (length (app_key_) = 0)
+		return 0;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://eventful.com/%events/%E0-%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://eventful.com/%sevents/%sE0-%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.evdb.com/rest/events/get?id=E0-%s&app_key=%s', entity_id, app_key_);
+	}
+	else if (new_origin_uri like 'http://eventful.com/%venues/%V0-%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://eventful.com/%svenues/%sV0-%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.evdb.com/rest/venues/get?id=V0-%s&app_key=%s', entity_id, app_key_);
+	}
+	else if (new_origin_uri like 'http://eventful.com/users/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://eventful.com/users/%s', 0);
+		entity_id := tmp[0];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.evdb.com/rest/users/get?id=%s&app_key=%s', entity_id, app_key_);
+	}
+	else if (new_origin_uri like 'http://eventful.com/%calendars/%C0-%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://eventful.com/%scalendars/%sC0-%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.evdb.com/rest/calendars/get?id=C0-%s&app_key=%s', entity_id, app_key_);
+	}
+	else if (new_origin_uri like 'http://eventful.com/%performers/%P0-%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://eventful.com/%sperformers/%sP0-%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.evdb.com/rest/performers/get?id=P0-%s&app_key=%s', entity_id, app_key_);
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/eventful2rdf.xsl', xd,
+		vector ('baseUri', new_origin_uri, 'entity', entity_id));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-
-create procedure DB.DBA.RDF_LOAD_OO_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_SIMPLEGEO (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare meta, tmp varchar;
-  declare xt, xd any;
-  if (__proc_exists ('unzip_file', 2) is null)
-    return 0;
-  tmp := tmp_file_name ('rdfm', 'odt');
-  string_to_file (tmp, _ret_body, -2);
-  meta := unzip_file (tmp, 'meta.xml');
-  file_delete (tmp, 1);
-  if (meta is null)
-    return 0;
-  xt := xtree_doc (meta);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/oo2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+	declare xd, host_part, xt, url, tmp, hdr, tree any;
+	declare entity_id, consumer_key, consumer_secret, lat, lon, epoch varchar;
+	declare pos int;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	consumer_key := get_keyword ('consumer_key', opts, null);
+	consumer_secret := get_keyword ('consumer_secret', opts, null);
+	if (( length (consumer_key) * length (consumer_secret) ) = 0)
+		return 0;
+	if (new_origin_uri like 'https://simplegeo.com/SG_%_%_%@%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'https://simplegeo.com/SG_%s_%s_%s@%s', 0);
+		entity_id := tmp[0];
+		lat := tmp[1];
+		lon := tmp[2];
+		epoch := tmp[3];
+		url := sprintf('http://api.simplegeo.com/1.0/places/%s,%s.json', lat, lon);
+		url := DB.DBA.sign_request ('GET', url, '', consumer_key, consumer_secret, '', '', 0);
+	}
+	else
+		return 0;
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	tree := json_parse (tmp);
+	xd := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/simplegeo2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'entity', entity_id));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_OO_DOCUMENT2 (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_SEATGEEK (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare meta, tmp varchar;
-  declare xt, xd any;
-  xt := xtree_doc (_ret_body);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fod2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+	declare xd, host_part, xt, url, tmp, hdr, exif any;
+	declare entity_id, email_, password_ varchar;
+	declare pos int;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http%://%seatgeek.com/%-tickets/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http%s://%seatgeek.com/%s-tickets/%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('http://api.seatgeek.com/1/events/upcoming_for_teamband.xml?slug=%s', entity_id);
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/seatgeek2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_YAHOO_TRAFFIC_DATA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_FOURSQUARE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare meta, tmp varchar;
-  declare xt, xd any;
-
-  declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-  xt := xtree_doc (_ret_body);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yahoo_trf2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+	declare xd, host_part, xt, url, tmp, hdr, tree any;
+	declare entity_id, oauth_token varchar;
+	declare pos int;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	--email_ := get_keyword ('email', opts);
+	--password_ := get_keyword ('password', opts);
+	oauth_token := get_keyword ('oauth_token', opts);
+	--if (( length (email_) * length (password_) ) = 0)
+	--	return 0;
+	if ( length (oauth_token) = 0)
+		return 0;
+	if (new_origin_uri like 'http%://%foursquare.com/v/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http%s://%sfoursquare.com/v/%s/%s', 0);
+		entity_id := tmp[3];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://api.foursquare.com/v2/venues/%s?oauth_token=%s', entity_id, oauth_token);
+	}
+	else if (new_origin_uri like 'http%://%foursquare.com/venue/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http%s://%sfoursquare.com/venue/%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://api.foursquare.com/v2/venues/%s?oauth_token=%s', entity_id, oauth_token);
+	}
+	else if (new_origin_uri like 'http%://%foursquare.com/user/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http%s://%sfoursquare.com/user/%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		url := sprintf('https://api.foursquare.com/v2/users/%s?oauth_token=%s', entity_id, oauth_token);			
+	}
+	else if (new_origin_uri like 'http%://%foursquare.com/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http%s://%sfoursquare.com/%s', 0);
+		entity_id := tmp[2];
+		pos := strchr(entity_id, '/');
+		if (pos is not null)
+			entity_id := left(entity_id, pos);
+		if (entity_id = 'item')
+			return 0;
+		url := sprintf('https://api.foursquare.com/v2/users/search?twitter=%s&oauth_token=%s', entity_id, oauth_token);	
+	}
+	else
+		return 0;
+	--declare bas, auth_header varchar;
+	--bas := encode_base64 (concat(email_, ':', password_));
+    --auth_header := 'Authorization: Basic '||bas;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/foursquare2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'entity', entity_id));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_ICAL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_CNET (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare meta, tmp varchar;
-  declare xt, xd any;
-
+  declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
+  declare pos int;
+  declare soft_id varchar;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  xt := xml_tree_doc (DB.DBA.IMC_TO_XML (_ret_body));
-  xml_tree_doc_encoding (xt, 'UTF-8');
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ics2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+    if (new_origin_uri like 'http://www.download.com/%/%.html%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.download.com/%s/%s.html%s', 0);
+		soft_id := tmp[1];
+		if (soft_id is null)
+			return 0;
+		pos := strrchr(soft_id, '-');
+		if (pos is not null and pos <> 0)
+			soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('http://developer.api.cnet.com/rest/v1.0/softwareProduct?iod=none&partKey=%s&partTag=%s&productSetId=%s', _key, _key, soft_id);
+
+	}
+	else if (new_origin_uri like 'http://download.com/%/%.html%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://download.com/%s/%s.html%s', 0);
+		soft_id := tmp[1];
+		if (soft_id is null)
+			return 0;
+		pos := strrchr(soft_id, '-');
+		if (pos is not null and pos <> 0)
+			soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('http://developer.api.cnet.com/rest/v1.0/softwareProduct?iod=none&partKey=%s&partTag=%s&productSetId=%s', _key, _key, soft_id);
+	}
+	else if (new_origin_uri like 'http://download.cnet.com/%/%.html%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://download.cnet.com/%s/%s.html%s', 0);
+		soft_id := tmp[1];
+		if (soft_id is null)
+			return 0;
+		pos := strrchr(soft_id, '-');
+		if (pos is not null and pos <> 0)
+			soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('http://developer.api.cnet.com/rest/v1.0/softwareProduct?iod=none&partKey=%s&partTag=%s&productId=%s', _key, _key, soft_id);
+	}
+    else if (new_origin_uri like 'http://shopper.cnet.com/%/%.html%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://shopper.cnet.com/%s/%s.html%s', 0);
+		soft_id := tmp[1];
+		if (soft_id is null)
+			return 0;
+		pos := strrchr(soft_id, '-');
+		if (pos is not null and pos <> 0)
+			soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('http://developer.api.cnet.com/rest/v1.0/techProduct?iod=breadcrumb,hlPrice,goodBad,userRatings,productSeries,accessories,images,productAuxiliary&partKey=%s&partTag=%s&productId=%s', _key, _key, soft_id);
+	}
+	else if (new_origin_uri like 'http://reviews.cnet.com/%/%.html%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://reviews.cnet.com/%s/%s.html%s', 0);
+		soft_id := tmp[1];
+		if (soft_id is null)
+			return 0;
+		pos := strrchr(soft_id, '-');
+		if (pos is not null and pos <> 0)
+			soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('http://developer.api.cnet.com/rest/v1.0/techProduct?iod=breadcrumb,hlPrice,goodBad,userRatings,productSeries,accessories,images,productAuxiliary&partKey=%s&partTag=%s&productId=%s', _key, _key, soft_id);
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/cnet2rdf.xsl', xd,
+	    vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+	xd := serialize_to_UTF8_xml (xt);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_WEBCAL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOOGLE_STORE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  return DB.DBA.RDF_LOAD_ICAL (graph_iri, new_origin_uri, dest, _ret_body, aq, ps, _key, opts);
+	declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
+	declare pos int;
+	declare soft_id varchar;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://www.googlestore.com/%/%/%.axd%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.googlestore.com/%s/%s/%s.axd%s', 0);
+		soft_id := tmp[2];
+		if (soft_id is null)
+			return 0;
+		--pos := strrchr(soft_id, '-');
+		--if (pos is not null and pos <> 0)
+		--	soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('https://www.googleapis.com/shopping/search/v1/public/products?country=US&q=%s&key=%s&alt=atom', soft_id, _key);
+	}
+	else if (new_origin_uri like 'http://www.googlestore.com/%/%.axd%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.googlestore.com/%s/%s.axd%s', 0);
+		soft_id := tmp[1];
+		if (soft_id is null)
+			return 0;
+		--pos := strrchr(soft_id, '-');
+		--if (pos is not null and pos <> 0)
+		--	soft_id := right(soft_id, length(soft_id) - (pos + 1));
+		url := sprintf('https://www.googleapis.com/shopping/search/v1/public/products?country=US&q=%s&key=%s&alt=atom', soft_id, _key);
+	}
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google_store2rdf.xsl', xd,
+		vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_PRODUCTWIKI (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_GOWALLA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
-	declare pos, is_sku, is_store integer;
-	asin := null;
-	api_key := _key;
-	if (not isstring (api_key))
-		return 0;
+	declare xd, host_part, xt, url, tmp, api_key, tree, hdr, exif any;
+	declare pos int;
+	declare soft_id, user_, password_, key_, what_, _id varchar;
+	user_ := get_keyword ('username', opts);
+	password_ := get_keyword ('password', opts);
+	key_ := get_keyword ('key', opts);
+	what_ := 'checkin';
+    if (not isstring (key_) or not isstring (user_) or not isstring (password_))
+        return 0;
 	declare exit handler for sqlstate '*'
 	{
-		DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	if (new_origin_uri like 'http://%.productwiki.com/%')
+	if (new_origin_uri like 'http://gowalla.com/spots/%')
 	{
-		declare arr any;
-		arr := sprintf_inverse (new_origin_uri, 'http://%s.productwiki.com/%s', 0);
-		asin := arr[1];
-		pos := strchr(asin, '/');
+		tmp := sprintf_inverse (new_origin_uri, 'http://gowalla.com/spots/%s', 0);
+		soft_id := tmp[0];
+		if (soft_id is null)
+			return 0;
+		soft_id := trim(tmp[0], '/');
+		if (soft_id is null)
+			return 0;
+		url := sprintf('http://api.gowalla.com/spots/%s', soft_id);
+		pos := strchr(soft_id, '/');
 		if (pos is not null)
-			asin := left(asin, pos);
-		pos := strchr(asin, '?');
+			what_ := subseq(soft_id, pos+1);
+		pos := strchr(what_, '/');
 		if (pos is not null)
-			asin := left(asin, pos);
+			return 0;
+		if (what_ = 'people')
+			return 0;
+	}
+	else if (new_origin_uri like 'http://gowalla.com/users/%')
+	{
+		what_ := 'user';
+		tmp := sprintf_inverse (new_origin_uri, 'http://gowalla.com/users/%s', 0);
+		soft_id := tmp[0];
+		if (soft_id is null)
+			return 0;
+		soft_id := trim(tmp[0], '/');
+		if (soft_id is null)
+			return 0;
+		url := sprintf('http://api.gowalla.com/users/%s', soft_id);
+		pos := strchr(soft_id, '/');
+		if (pos is not null)
+			return 0;
+	}
+	else if (new_origin_uri like 'http://gowalla.com/checkins/%')
+	{
+		what_ := 'checkins';
+		tmp := sprintf_inverse (new_origin_uri, 'http://gowalla.com/checkins/%s', 0);
+		soft_id := tmp[0];
+		if (soft_id is null)
+			return 0;
+		soft_id := trim(tmp[0], '/');
+		if (soft_id is null)
+			return 0;
+		url := sprintf('http://api.gowalla.com/checkins/%s', soft_id);
+		pos := strchr(soft_id, '/');
+		if (pos is not null)
+			return 0;
 	}
 	else
 		return 0;
-	if (asin is null)
-		return 0;
-	url := sprintf ('http://api.productwiki.com/connect/api.aspx?op=search&q=%s&format=xml&key=%s&fields=skus,images,description,reviews', asin, api_key);
-	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-	if (hdr[0] not like 'HTTP/1._ 200 %')
-		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/productwiki2rdf.xsl', xd, 
-		vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
+	declare bas, auth_header varchar;
+	bas := encode_base64 (concat(user_, ':', password_));
+	auth_header := 'Accept: application/json\r\nContent-Type: application/json\r\nAuthorization: Basic '|| bas || '\r\nX-Gowalla-API-Key: ' || _key || '\r\n';
+	tmp := DB.DBA.RDF_HTTP_URL_GET (url, url, hdr, 'GET', auth_header, proxy=>get_keyword_ucase ('get:proxy', opts));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/gowalla2rdf.xsl', xt,
+		vector ('baseUri', new_origin_uri, 'what', what_));
 	xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts); 
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_BESTBUY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_PROGRAMMABLEWEB (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-	declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
-	declare pos, is_sku, is_store integer;
-  asin := null;
-  is_sku := 0;
-	is_store := 0;
-  declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-	if (new_origin_uri like 'http://stores.bestbuy.com/%')
+	declare xd, xt, url, tmp, asin any;
+	declare pos int;
+	if (not isstring ( _key))
+		return 0;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://www.programmableweb.com/mashup/%')
 	{
 		declare arr any;
-		arr := sprintf_inverse (new_origin_uri, 'http://stores.bestbuy.com/%s', 0);
+		arr := sprintf_inverse (new_origin_uri, 'http://www.programmableweb.com/mashup/%s', 0);
 		asin := arr[0];
 		pos := strchr(asin, '/');
 		if (pos is not null)
@@ -5922,2398 +7722,4118 @@ create procedure DB.DBA.RDF_LOAD_BESTBUY (in graph_iri varchar, in new_origin_ur
 		pos := strchr(asin, '?');
 		if (pos is not null)
 			asin := left(asin, pos);
-		is_store := 1;
+		url := sprintf('http://api.programmableweb.com/mashups/%s?apikey=%s', asin, _key);
 	}
-	else if (new_origin_uri like 'http://%.bestbuy.com/%?skuId=%' or new_origin_uri like 'http://%.bestbuy.com/%&skuId=%')
+	else if (new_origin_uri like 'http://www.programmableweb.com/api/%')
 	{
 		declare arr any;
-		arr := sprintf_inverse (new_origin_uri, 'http://%s.bestbuy.com/%sskuId=%s', 0);
-		asin := arr[2];
+		arr := sprintf_inverse (new_origin_uri, 'http://www.programmableweb.com/api/%s', 0);
+		asin := arr[0];
 		pos := strchr(asin, '/');
 		if (pos is not null)
 			asin := left(asin, pos);
-		pos := strchr(asin, '&');
-		if (pos is not null)
-			asin := left(asin, pos);
 		pos := strchr(asin, '?');
 		if (pos is not null)
 			asin := left(asin, pos);
-		is_sku := 1;
+		url := sprintf('http://api.programmableweb.com/apis/%s?apikey=%s', asin, _key);
 	}
-	else if (new_origin_uri like 'http://%.bestbuy.com/site/olspage.jsp?%' or new_origin_uri like 'http://%.bestbuy.com/%/%?%')
-    {
-      declare arr any;
-      arr := WS.WS.PARSE_URI (new_origin_uri);
-      arr := arr[4];
-      if (arr = '')
-	return 0;
-      arr := split_and_decode (arr);
-      if (length (arr) and mod (length (arr), 2) = 0)
-	asin := get_keyword ('id', arr);
-      if (asin not like '[0-9]+')
-	{
-          asin := get_keyword ('skuId', arr);
-			if (asin not like '[0-9]+')
-				return 0;
-	  is_sku := 1;
-	}
-    }
-  else if (new_origin_uri like 'http://%.bestbuy.com/%/%/%/')
-    {
-      declare arr any;
-      arr := sprintf_inverse (new_origin_uri, 'http://%s.bestbuy.com/%s/%s/%s/', 0);
-      if (length (arr) = 4)
-	{
-	  asin := arr[3];
-	  is_sku := 1;
-	}
-      else
-	return 0;
-    }
-  else
-    {
-      return 0;
-    }
-  api_key := _key;
-  if (asin is null or not isstring (api_key))
-    return 0;
-  if (is_sku)
-    url := sprintf ('http://api.remix.bestbuy.com/v1/products/%s.xml?apiKey=%s', asin, api_key);
-  else
-    url := sprintf ('http://api.remix.bestbuy.com/v1/products(productId=%s)?apiKey=%s&format=xml&show=all', asin, api_key);
-	if (is_store)
-		url := sprintf ('http://api.remix.bestbuy.com/v1/stores(storeId=%s)?apiKey=%s&format=xml&show=all', asin, api_key);
-  tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-  if (hdr[0] not like 'HTTP/1._ 200 %')
-    signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-  xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/bestbuy2rdf.xsl', xd,
-		vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'currentDateTime', cast(date_iso8601(now()) as varchar), 'is_store', cast(is_store as varchar)));
-  xd := serialize_to_UTF8_xml (xt);
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts); 
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return 1;
+	else
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/programmableweb2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+	xd := serialize_to_UTF8_xml (xt);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_AMAZON_QRY_SGN (in canon any, in secret_key any)
+create procedure DB.DBA.sign_hmac_sha1 (
+  in meth varchar,
+  in url varchar,
+  in params varchar,
+  in consumer_secret varchar,
+  in token_secret varchar)
 {
-  declare url, StringToSign, hmacKey, signed any;
-
-  StringToSign := concat('GET\necs.amazonaws.com\n/onca/xml\n', canon);
-  if (not xenc_key_exists ('amazon_key'))
-    hmacKey := xenc_key_RAW_read ('amazon_key', encode_base64(secret_key));
-  signed := xenc_hmac_sha1_digest (StringToSign, 'amazon_key');
-  xenc_key_remove ('amazon_key');
-  signed := replace(replace(signed, '+', '%2B'), '=', '%3D');
-  url := concat('http://ecs.amazonaws.com/onca/xml?', canon, '&Signature=', signed);
-  return url;
+  declare str, k, kname, ret varchar;
+  str := meth || '&' || replace (sprintf ('%U', url), '/', '%2F') || '&' || sprintf ('%U', params);
+  k := sprintf ('%U', consumer_secret) || '&' || sprintf ('%U', coalesce (token_secret, ''));
+  kname := md5 (cast (now () as varchar));
+  xenc_key_RAW_read (kname, encode_base64 (k));
+  ret := xenc_hmac_sha1_digest (str, kname);
+  xenc_key_remove (kname);
+  return ret;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_AMAZON_ARTICLE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
-{
-  declare index1, xd, xd_utf8, xt, url, tmp, api_key, asin, hdr, exif, secret_key, datenow, canon, StringToSign, hmacKey, signed any;
-  declare pos, is_wish_list integer;
-  declare associate_key varchar;
-  asin := null;
-  associate_key := null;
-  is_wish_list := 0;
-  declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-  if (new_origin_uri like 'http://%amazon.%/gp/product/product-description/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/gp/product/product-description/%s', 0);
-      asin := rtrim (tmp[2], '/');
-    }
-  else if (new_origin_uri like 'http://%amazon.%/gp/product/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/gp/product/%s', 0);
-      asin := rtrim (tmp[2], '/');
-    }
-  else if (new_origin_uri like 'http://%amazon.%/gp/registry/wishlist/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/gp/registry/wishlist/%s', 0);
-      asin := rtrim (tmp[2], '/');
-      is_wish_list := 1;
-    }
-    else if (new_origin_uri like 'http://%amazon.%/s?%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/s?%skeywords=%s', 0);
-      asin := tmp[3];
-      if (strchr(asin, '&') is not NULL)
-      {
-        tmp := sprintf_inverse (asin, '%s&%s', 0);
-        asin := tmp[0];
-        if (strchr(tmp[1], 'index=') is not NULL)
-        {
-            tmp := sprintf_inverse (tmp[1], 'index=%s', 0);
-            index1 := tmp[0];
-            if (strchr(index1, '&') is not NULL)
-            {
-                index1 := left(index1, strchr(index1, '&'));
-            }
-        }
-        else
-        {
-            index1 := 'None';
-        }
-      }
-      is_wish_list := 2;
-    }
-  else if (new_origin_uri like 'http://%amazon.%/o/ASIN/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/o/ASIN/%s', 0);
-      asin := rtrim (tmp[2], '/');
-    }
-  else if (new_origin_uri like 'http://%amazon.%/%/product-reviews/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/product-reviews/%s', 0);
-      asin := tmp[3];
-      pos := strchr(asin, '?');
-      if (pos is not null)
-	{
-	  asin := left(asin, pos);
-	}
-    }
-  else if (new_origin_uri like 'http://%amazon.%/%/dp/%\\%3%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/dp/%s%%3%s', 0);
-      asin := tmp[3];
-    }
-    else if (new_origin_uri like 'http://%amazon.%/dp/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/dp/%s', 0);
-      asin := tmp[2];
-      pos := strchr(asin, '?');
-		if (pos is not null)
-			asin := left(asin, pos);
-    }
-  else if (new_origin_uri like 'http://%amazon.%/%/dp/%/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/dp/%s/%s', 0);
-      asin := tmp[3];
-    }
-  else if (new_origin_uri like 'http://%amazon.%/%/dp/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/dp/%s', 0);
-      asin := tmp[3];
-    }
-  else if (new_origin_uri like 'http://%amazon.%/exec/obidos/ASIN/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/exec/obidos/ASIN/%s', 0);
-      asin := rtrim (tmp[2], '/');
-    }
-  else if (new_origin_uri like 'http://%amazon.%/exec/obidos/tg/detail/-/%/%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/exec/obidos/tg/detail/-/%s/%s', 0);
-      asin := tmp[2];
-    }
-  else
-    {
-      return 0;
-    }
-  pos := strchr(asin, '/');
-  if (pos is not null)
-    {
-      asin := left(asin, pos);
-    }
-
-  api_key := _key;
-  secret_key := null;
-  if (isarray (opts) and 0 = mod (length(opts), 2))
-    {
-      secret_key := get_keyword ('secret_key', opts);
-      associate_key := get_keyword ('associate_key', opts);
-    }
-  if ((0 = length (api_key)) or (0 = length (secret_key)))
-    return 0;
-  if (asin is null)
-    return 0;
-
-  datenow := replace(date_iso8601 (dt_set_tz (now(), 0)), ':', '%3A');
-  -- Note: Query parameter/value pairs *must* be sorted by byte value before the query string is signed.
-  --       Lowercase parameters will come after uppercase ones in the canonical query string.
-  if (is_wish_list = 1)
-  {
-    canon := sprintf('AWSAccessKeyId=%s&Condition=All&ListId=%s&ListType=WishList&MerchantId=All&Operation=ListLookup&ResponseGroup=ItemAttributes%%2COffers%%2CReviews&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s', api_key, asin, datenow);
-  }
-  else if (is_wish_list = 2)
-  {
-    canon := sprintf('AWSAccessKeyId=%s&Availability=Available&Condition=All&Keywords=%s&MerchantId=All&Operation=ItemSearch&ResponseGroup=ItemAttributes%%2COffers%%2CReviews&SearchIndex=%s&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s', api_key, asin, index1, datenow);
-  }
-  else
+create procedure DB.DBA.normalize_params (
+  in params any)
+{
+  declare arr, newarr any;
+  declare str varchar;
+  arr := split_and_decode (params, 0, '\0\0&');
+  arr := __vector_sort (arr);
+  str := '';
+  foreach (any elm in arr) do
   {
-      canon := sprintf('AWSAccessKeyId=%s&Condition=All&ItemId=%s&MerchantId=All&Operation=ItemLookup&ResponseGroup=ItemAttributes%%2COffers%%2CReviews&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s', api_key, asin, datenow);
+    if ((elm not like 'oauth_signature=%'))
+      str := str || '&' || elm;
   }
-  url := DB.DBA.RDF_LOAD_AMAZON_QRY_SGN (canon, secret_key);
-  tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-  if (hdr[0] not like 'HTTP/1._ 200 %')
-    signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-  xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/amazon2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'asin', asin, 'currentDateTime', cast(date_iso8601(now()) as varchar), 'wish_list', cast(is_wish_list as varchar), 'associate_key', associate_key));
-  xd_utf8 := serialize_to_UTF8_xml (xt);
-   {
-     declare mlist varchar;
-     declare xdMerchants, merchantIds any;
-     declare strTmp varchar;
-
-     -- Extract the merchantIds contained in initial AWS query response
-     mlist := '';
-     merchantIds := xpath_eval('//Offer/Merchant/MerchantId', xd, 0);
-     foreach (any mid in merchantIds) do
-     {
-       declare id varchar;
-       id := cast(mid as varchar);
-       if (length (mlist))
-         mlist := mlist || '%2C';
-       mlist := mlist || id ;
-     }
-
-     -- Query AWS to get the names of these merchants
-     canon := sprintf('AWSAccessKeyId=%s&Operation=SellerLookup&SellerId=%s&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s',
-  	api_key, mlist, datenow);
-     url := DB.DBA.RDF_LOAD_AMAZON_QRY_SGN (canon, secret_key);
-     tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-     if (hdr[0] not like 'HTTP/1._ 200 %')
-     --  signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-     --  leave legalName of gr:BusinessEntity instances as MERCHANTID_<merchantId>
-       goto skip_merchantid2name;
-
-     xdMerchants := xtree_doc (tmp);
-
-     foreach (any mid in merchantIds) do
-     {
-       declare id, sellerName varchar;
-       declare sName, sNickname any;
-       id := cast(mid as varchar);
-       sellerName := '';
-       sName := xpath_eval('//Seller[SellerId="' || id || '"]/SellerName', xdMerchants);
-       sNickname := xpath_eval('//Seller[SellerId="' || id || '"]/Nickname', xdMerchants);
-
-       if (sName is not null)
-	 sellerName := cast (sName as varchar);
-       else if (sNickname is not null)
-	 sellerName := cast (sNickname as varchar);
-
-      -- Replace MERCHANTID_xxx placeholders with seller name
-      if (length(sellerName))
-       xd_utf8 := replace (xd_utf8, 'MERCHANTID_' || id, sellerName);
-     }
-   }
-skip_merchantid2name:
+  return ltrim (str, '&');
+}
+;
 
-  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd_utf8, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return 1;
+
+create procedure DB.DBA.normalize_url (in url any, in lines any)
+{
+  declare hf any;
+  hf := rfc1808_parse_uri (url);
+  hf[0] := lower (hf[0]);
+  hf[1] := lower (hf[1]);
+  return sprintf ('%s://%s%s', hf[0], hf[1], hf[2]);
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_OPENSTREETMAP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.sign_request (in meth varchar := 'GET', in url varchar, in params varchar := '', in consumer_key varchar, in consumer_secret varchar, in oauth_token varchar, in oauth_secret varchar, in tz int := 0)
 {
-	declare xd, xt, url, tmp, lon1, lat1, hdr, exif any;
-	declare zoom, layers varchar;
-	declare lat, lon, left_point, bottom_point, right_point, top_point float;
-	declare pos integer;
+  declare signature, nonce varchar;
+  declare ret varchar;
+  declare timest int;
+
+  nonce := xenc_rand_bytes (8, 1);
+  timest := datediff ('second', stringdate ('1970-1-1'), now ());
+  if (tz)
+    timest := timest - timezone (now()) * 60;
+  if (length (params) and params not like '%&')
+    params := params || '&';
 
+  params := params ||
+            sprintf ('oauth_consumer_key=%s&oauth_signature_method=HMAC-SHA1&oauth_timestamp=%d&oauth_nonce=%s&oauth_version=1.0',
+                  	 consumer_key, timest, nonce);
+  if (length (oauth_token))
+    params := params || sprintf ('&oauth_token=%s', oauth_token);
+  url := normalize_url (url, vector ());
+  params := normalize_params (params);
+
+  signature := sign_hmac_sha1 (meth, url, params, consumer_secret, oauth_secret);
+  if (meth = 'GET')
+    ret := url||'?'||params||'&oauth_signature='||sprintf ('%U', signature);
+  else
+    ret := params||'&oauth_signature='||sprintf ('%U', signature);
+  return ret;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_YELP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, host_part, xt, url, tmp, api_key, hdr, exif, tree any;
+	declare pos int;
+	declare id varchar;
+	declare consumer_key, oauth_token, consumer_secret, oauth_secret varchar;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	if (new_origin_uri like 'http://%openstreetmap.org/%?lat=%&lon=%')
-	{
+	consumer_key := get_keyword ('consumer_key', opts, null);
+	oauth_token := get_keyword ('oauth_token', opts, null);
+	consumer_secret := get_keyword ('consumer_secret', opts, null);
+	oauth_secret := get_keyword ('oauth_secret', opts, null);
 
-		tmp := sprintf_inverse (new_origin_uri, 'http://%sopenstreetmap.org/%s?lat=%s&lon=%s', 0);
-		lat1 := tmp[2];
-		lon1 := tmp[3];
-		pos := strchr (lon1, '&');
-		if (pos > 0)
-			lon1 := subseq(lon1, 0, pos);
-	}
-	else if (new_origin_uri like 'http://%openstreetmap.org/%?mlat=%&mlon=%')
+    if (not isstring (consumer_key) and isstring (oauth_token) and isstring (consumer_secret) and isstring (oauth_secret))
+		return 0;
+	if (new_origin_uri like 'http://%.yelp.com/biz/%')
 	{
-
-		tmp := sprintf_inverse (new_origin_uri, 'http://%sopenstreetmap.org/%s?mlat=%s&mlon=%s', 0);
-		lat1 := tmp[0];
-		lon1 := tmp[1];
-		pos := strchr (lon1, '&');
-		if (pos > 0)
-			lon1 := subseq(lon1, 0, pos);
+		tmp := sprintf_inverse (new_origin_uri, 'http://%syelp.com/biz/%s', 0);
+		id := trim(tmp[1], '/');
+		if (id is null)
+			return 0;
+		pos := strchr(id, '/');
+		if (pos is not null and pos <> 0)
+			id := left(id, pos);
+		url := concat('http://api.yelp.com/v2/business/', id);
+		url := sign_request ('GET', url, '', consumer_key, consumer_secret, oauth_token,  oauth_secret, 0);
 	}
 	else
 		return 0;
-
-	{
-		lat := atof(lat1);
-		lon := atof(lon1);
-		--zoom := atoi(tmp[2]);
-		--layers := tmp[3];
-		left_point := lon - 0.01;
-		right_point := lon + 0.01;
-		bottom_point := lat - 0.01;
-		top_point := lat + 0.01;
-		url := sprintf('http://api.openstreetmap.org/api/0.6/map?bbox=%f,%f,%f,%f', left_point, bottom_point, right_point, top_point);
-	}
-	tmp := http_client(url, proxy=>get_keyword_ucase ('get:proxy', opts));
-	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/openstreet2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'lon', lon1, 'lat', lat1));
+dbg_obj_princ(url);
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yelp2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_USTREAM (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_REVYU (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-	declare xd, xt, url, tmp, api_key, img_id, hdr, what, pos any;
+	declare xd, host_part, xt, url, tmp, api_key, hdr, exif any;
+	declare pos int;
+	declare link, user_id varchar;
 	declare exit handler for sqlstate '*'
 	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
 		return 0;
 	};
-	api_key := _key;
-	if (not isstring (api_key))
-		return 0;
-	if (new_origin_uri like 'http://www.ustream.tv/channel/%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.ustream.tv/channel/%s', 0);
-		if (tmp is null)
-		    return 0;
-		img_id := tmp[0];
-		pos := strchr(img_id, '/');
-		if (pos is not null)
-                    img_id := left(img_id, pos);
-                url := sprintf('http://api.ustream.tv/xml/channel/%s/getInfo?key=%s', img_id, api_key);
-                what := 'channel';
-	}
-	else if (new_origin_uri like 'http://www.ustream.tv/user/%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.ustream.tv/user/%s', 0);
-		if (tmp is null)
-		    return 0;
-		img_id := tmp[0];
-		pos := strchr(img_id, '/');
-		if (pos is not null)
-                    img_id := left(img_id, pos);
-                url := sprintf('http://api.ustream.tv/xml/user/%s/getInfo?key=%s', img_id, api_key);
-                what := 'user';
-	}
-	else if (new_origin_uri like 'http://www.ustream.tv/recorded/%')
+	if (new_origin_uri like 'http://%revyu.com/people/%')
 	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.ustream.tv/recorded/%s', 0);
-		if (tmp is null)
-		    return 0;
-		img_id := tmp[0];
-		pos := strchr(img_id, '/');
-		if (pos is not null)
-                    img_id := left(img_id, pos);
-                url := sprintf('http://api.ustream.tv/xml/video/%s/getInfo?key=%s', img_id, api_key);
-                what := 'video';
+            tmp := sprintf_inverse (new_origin_uri, 'http://%srevyu.com/people/%s', 0);
+            user_id := tmp[1];
+            pos := strstr(user_id, '/about');
+            if (pos is not NULL)
+            {
+                user_id := subseq(user_id, 0, pos);
+            }
+            url := sprintf('http://revyu.com/people/%s/about/rdf', user_id);
 	}
 	else
-	    return 0;
-	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-	if (hdr[0] not like 'HTTP/1._ 200 %')
-		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+		return 0;
+	tmp := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
 	xd := xtree_doc (tmp);
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ustream2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', what));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/revyu2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
 	xd := serialize_to_UTF8_xml (xt);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+        RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
 	return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_FLICKR_IMG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_BUGZILLA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-	declare xd, xt, url, tmp, api_key, img_id, hdr, exif any;
-	declare exit handler for sqlstate '*'
-	{
-	  DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-		return 0;
-	};
-	api_key := _key;
-	if (not isstring (api_key))
-		return 0;
-	if (new_origin_uri like 'http://farm%.static.flickr.com/%/%')
-	{
-		tmp := sprintf_inverse (new_origin_uri, 'http://farm%s.static.flickr.com/%s/%s_%s.%s', 0);
-		if (tmp is null or length (tmp) <> 5)
-			return 0;
-		img_id := tmp[2];
-	}
-	else if (new_origin_uri like 'http://www.flickr.com/photos/%/%')
-	{
-		declare pos	integer;
-		tmp := sprintf_inverse (new_origin_uri, 'http://www.flickr.com/photos/%s/%s', 0);
-		img_id := tmp[1];
-		pos := strchr(img_id, '/');
-		if (pos is not null)
-			img_id := left(img_id, pos);
-	}
-	else
-		return 0;
-	url := sprintf ('http://api.flickr.com/services/rest/?method=flickr.photos.getInfo&photo_id=%s&api_key=%s', img_id, api_key);
-	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-	if (hdr[0] not like 'HTTP/1._ 200 %')
-		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-	xd := xtree_doc (tmp);
-	exif := xtree_doc ('<rsp/>');
-	{
-		declare exit handler for sqlstate '*' { goto ende; };
-		url := sprintf ('http://api.flickr.com/services/rest/?method=flickr.photos.getExif&photo_id=%s&api_key=%s',
-		img_id, api_key);
-		tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-		if (hdr[0] like 'HTTP/1._ 200 %')
-			exif := xtree_doc (tmp);
-		ende:;
-	}
-
-	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/flickr2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'exif', exif));
-	xd := serialize_to_UTF8_xml (xt);
-	DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-	return 1;
-}
-;
-
-create procedure DB.DBA.RDF_LOAD_EBAY_ARTICLE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout ser_key any, inout opts any)
-{
-  declare xd, xd_utf8, xt, url, tmp, api_key, item_id, hdr, karr, use_sandbox, user_id, node any;
-  declare product_id varchar;
+  declare xd, host_part, xt, url, tmp, api_key, img_id, hdr, exif any;
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-
-  use_sandbox := 0;
-
-  if (new_origin_uri like 'http://cgi.sandbox.ebay.com/%&item=%&%')
-    {
-      tmp := sprintf_inverse (new_origin_uri, 'http://cgi.sandbox.ebay.com/%s&item=%s&%s', 0);
-      use_sandbox := 1;
-    }
-  else if (new_origin_uri like 'http://cgi.ebay.com/%QQitemZ%QQ%')
-    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.com/%sQQitemZ%sQQ%s', 0);
-  else if (new_origin_uri like 'http://cgi.ebay.com/%/eBayISAPI.dll?ViewItem&item=%')
-    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.com/%s/eBayISAPI.dll?ViewItem&item=%s', 0);
-  else if (new_origin_uri like 'http://cgi.ebay.com/%/%?%')
-    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.com/%s/%s?%s', 0);
-  else
-    return 0;
-
-  api_key := ser_key;
-
-  if (tmp is null or not isstring (api_key))  -- length (tmp) <> 3
+  tmp := sprintf_inverse (new_origin_uri, '%s://%s/show_bug.cgi?id=%s', 0);
+  if (length(tmp) < 2)
+	return 0;
+  img_id := tmp[2];
+  host_part := tmp[1];
+  if (img_id is null)
     return 0;
-
-  item_id := tmp[1];
-
-  url := sprintf ('http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=%s&siteid=0&version=515&ItemID=%s&IncludeSelector=Description,Details,ItemSpecifics', api_key, item_id);
-  tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+  if (right(host_part, 6) = 'issues')
+	url := concat(tmp[0], '://', host_part, '/xml.cgi?id=', img_id);
+  else
+	url := concat(new_origin_uri, '&ctype=xml');
+  tmp := DB.DBA.RDF_HTTP_URL_GET (url, url, hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
   if (hdr[0] not like 'HTTP/1._ 200 %')
     signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
-
-  xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ebay2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'currentDateTime', cast(date_iso8601(now()) as varchar)));
-  xd_utf8 := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd_utf8, new_origin_uri, coalesce (dest, graph_iri));
-
-  -- Get any reviews
-  node := xpath_eval('//Item/ProductID[@type="Reference"]', xd);
-  product_id := cast (node as varchar);
-  if (not length(product_id))
-    goto skipReviews;
-
-  url := sprintf ('http://open.api.ebay.com/shopping?callname=FindReviewsAndGuides&responseencoding=XML&appid=%s&siteid=0&version=515&ProductID.type=Reference&ProductID.value=%s', api_key, product_id);
-  tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-
-  if (hdr[0] not like 'HTTP/1._ 200 %')
-    goto skipReviews;
-
   xd := xtree_doc (tmp);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ebay2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/bugzilla2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
   xd := serialize_to_UTF8_xml (xt);
-
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-
-skipReviews:
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
   return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_DAV_META (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout ser_key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_OPENLIBRARY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xd, localdest, groupdest, dep any;
-  localdest := coalesce (dest, graph_iri);
-  groupdest := get_keyword_ucase ('get:group-destination', opts);
-  xd := DAV_EXTRACT_META_AS_RDF_XML (new_origin_uri, _ret_body);
-  if (xd is not null)
+  declare qr, path any;
+  declare tree, xt, xd, types any;
+  declare k, cnt, url, tmp, img_id varchar;
+  declare pos integer;
+  declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, localdest);
-      if (groupdest is not null)
-        DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, groupdest);
-      return 1;
-    }
-  dep := (sparql define input:storage ""
-     select (sql:VECTOR_AGG (?o))
-    where { graph `iri(?:localdest)` {
-            `iri(?:localdest)` <http://www.w3.org/2000/01/rdf-schema#seeAlso> ?o .
-            filter (isIRI (?o)) } } );
-  if (length (dep) > 0)
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  tmp := sprintf_inverse (new_origin_uri, 'http://openlibrary.org/b/%s', 0);
+  img_id := tmp[0];
+  pos := strchr(img_id, '/');
+  if (pos is not null)
     {
-      return vector ('seeAlso', dep);
+      img_id := left(img_id, pos);
     }
+  if (img_id is null)
+    return 0;
+  url := concat('http://openlibrary.org/api/get?key=/b/', img_id);
+  url := concat(url, '&prettyprint=true&text=true');
+  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+  tree := json_parse (cnt);
+  xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/openlibrary2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
   return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_MAPPER_CACHE_CHECK (in url varchar, in top_url varchar, out old_etag varchar, out old_last_modified any)
+create procedure DB.DBA.RDF_LOAD_SOCIALGRAPH (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare old_exp_is_true, old_expiration, old_read_count any;
-  whenever not found goto no_record;
-  select HS_EXP_IS_TRUE, HS_EXPIRATION, HS_LAST_MODIFIED, HS_LAST_ETAG, HS_READ_COUNT
-      into old_exp_is_true, old_expiration, old_last_modified, old_etag, old_read_count
-      from DB.DBA.SYS_HTTP_SPONGE where HS_FROM_IRI = url and HS_PARSER = 'DB.DBA.RDF_LOAD_HTTP_RESPONSE';
-  -- as we are at point we load everything we always do re-load
-no_record:
-  return 0;
+  declare qr, path, hdr any;
+  declare tree, xt, xd, types any;
+  declare k, cnt, url varchar;
+  hdr := null;
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  url := new_origin_uri;
+  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+  tree := json_parse (cnt);
+  xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/sg2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return 1;
 }
 ;
 
-create procedure
-RDF_MAPPER_CACHE_REGISTER (in url varchar, in top_url varchar, inout hdr any,
-                   in old_last_modified any, in download_size int, in load_msec int)
+create procedure csv_detect_opts (in s any, in n int := 10)
 {
-  declare explicit_refresh, new_expiration, ret_content_type, ret_etag, ret_date, ret_expires, ret_last_modif,
-      ret_dt_date, ret_dt_expires, ret_dt_last_modified any;
-
-  if (not isarray (hdr))
-    return;
+  declare delim, quot char;
+  declare r, delims, seprs, best_match, best_delim, best_quot any;
+  declare i, rws int;
+  declare ss, orig any;
 
-  url := WS.WS.EXPAND_URL (top_url, url);
-  explicit_refresh := null;
-  new_expiration := now ();
-  DB.DBA.SYS_HTTP_SPONGE_GET_CACHE_PARAMS (explicit_refresh, old_last_modified,
-      hdr, new_expiration, ret_content_type, ret_etag, ret_date, ret_expires, ret_last_modif,
-       ret_dt_date, ret_dt_expires, ret_dt_last_modified);
-  insert replacing DB.DBA.SYS_HTTP_SPONGE (
-      HS_LAST_LOAD,
-      HS_LAST_ETAG,
-      HS_LAST_READ,
-      HS_EXP_IS_TRUE,
-      HS_EXPIRATION,
-      HS_LAST_MODIFIED,
-      HS_DOWNLOAD_SIZE,
-      HS_DOWNLOAD_MSEC_TIME,
-      HS_READ_COUNT,
-      HS_SQL_STATE,
-      HS_SQL_MESSAGE,
-      HS_LOCAL_IRI,
-      HS_PARSER,
-      HS_ORIGIN_URI,
-      HS_ORIGIN_LOGIN,
-      HS_FROM_IRI)
-      values
-      (
-       now (),
-       ret_etag,
-       now(),
-       case (isnull (ret_dt_expires)) when 1 then 0 else 1 end,
-       coalesce (ret_dt_expires, new_expiration, now()),
-       ret_dt_last_modified,
-       download_size,
-       load_msec,
-       1,
-       NULL,
-       NULL,
-       url,
-       'DB.DBA.RDF_LOAD_HTTP_RESPONSE',
-       url,
-       NULL,
-       top_url
-       );
+  delims := ',\t;:|';
+  seprs  := '"\'';
+  best_match := -1;
+  best_delim := best_quot := null;
+  ss := string_output ();
+  foreach (int d in delims) do
+    {
+      foreach (int sp in seprs) do
+	{
+	  i := 0; rws := 0;
+	  delim := chr (d);
+	  quot := chr (sp);
+	  string_output_flush (ss);
+	  http (s, ss);
+	  while (i < n and isvector (r := get_csv_row (ss, delim, quot)))
+	    {
+	      if (i = 0)
+		rws := length (r);
+	      else if (length (r) <> rws)
+		goto fail;
+	      i := i + 1;
+	    }
+	  if (i < n)
+	    goto fail;
+	  if (best_match < rws)
+	    {
+	      best_match := rws;
+	      best_delim := delim;
+	      best_quot := quot;
+	    }
+	  fail:;
+	}
+    }
+  return vector (best_delim, best_quot);
+}
+;
 
-  return;
+create procedure csv_make_head (in r any)
+{
+  declare ret any;
+  ret := make_array (length (r), 'any');
+  for (declare i int, i := 0; i < length (r); i := i + 1)
+    {
+      if (isstring (r[i]) and length (r[i]))
+	ret[i] := SYS_ALFANUM_NAME (r[i]);
+      else
+        ret[i] := sprintf ('COL%d', i);
+    }
+  return ret;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_OPENSOCIAL_PERSON (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure csv_to_xml (in s any)
 {
-  declare xt, xd, tmp, cnt, hdr any;
-  declare mail, pwd, auth, auth_header varchar;
+  declare r, opts, head, ss, ses any;
+  declare i, rcnt int;
 
-  mail := get_keyword ('email', opts, null);
-  pwd := get_keyword ('password', opts, null);
-  declare exit handler for sqlstate '*'
+  ses := string_output ();
+  http (s, ses);
+  opts := csv_detect_opts (s);
+  head := null;
+  ss := string_output ();
+  http ('<csv>\n', ss);
+  rcnt := 1;
+  while (isvector (r := get_csv_row (ses, opts[0], opts[1])))
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-  auth_header := null;
-  if (length (mail) + length (pwd))
-    {
-      cnt := http_client (url=>'https://www.google.com/accounts/ClientLogin',
-        http_method=>'POST', body=>sprintf ('Email=%U&Passwd=%U&source=OpenLink-Sponger-1&service=ot', mail, pwd),
-	proxy=>get_keyword_ucase ('get:proxy', opts));
-      if (cnt like 'Error=%')
-    return 0;
-      cnt := replace (cnt, '\r', '\n');
-      cnt := replace (cnt, '\n\n', '\n');
-      tmp := split_and_decode (cnt, 0, '\0\0\n=');
-      auth := get_keyword ('Auth', tmp);
-      if (auth is not null)
-    auth_header := 'Authorization: GoogleLogin auth='||auth;
+      if (head is null)
+	head := csv_make_head (r);
+      else
+        {
+	  http (sprintf ('\t<row id="%d">\n\t\t', rcnt), ss);
+	  for (i := 0; i < length (head); i := i + 1)
+	     {
+	       if (i < length (r))
+		 {
+		   if (not isnull (r[i]))
+		     http_value (r[i], head[i], ss);
+		 }
+	     }
+	  http ('\n\t</row>\n', ss);
+	  rcnt := rcnt + 1;
+	}
     }
-  cnt := DB.DBA.RDF_HTTP_URL_GET (new_origin_uri, new_origin_uri, hdr, 'GET', auth_header, proxy=>get_keyword_ucase ('get:proxy', opts));
-  if (hdr[0] not like  'HTTP/1._ 200 %')
-    return 0;
-  xd := xtree_doc (cnt);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ospeople2rdf.xsl', xd,
-    vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 1;
+  http ('</csv>', ss);
+  return ss;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_WIKIPEDIA_ARTICLE
-    (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-         inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_STACKOVERFLOW (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-    declare get_uri, body, dbpiri any;
-    declare code, base, primary_topic, doc_iri any;
-    get_uri := split_and_decode (new_origin_uri, 0, '\0\0/');
-    get_uri := get_uri[length (get_uri) - 1];
-    get_uri := split_and_decode (get_uri)[0];
-    base := get_keyword ('DBpediaBase', opts);
-      {
-	declare exit handler for sqlstate '*'
-	  {
-	    DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-	    return 0;
-	  };
-	body := sprintf('<?xml version=\"1.0\" encoding=\"utf-8\"?>
-	        <rdf:RDF
-	        xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
-	        xmlns:foaf=\"http://xmlns.com/foaf/0.1/\">
-	        <foaf:Document rdf:about=\"%s\">
-            <foaf:primaryTopic rdf:resource=\"http://dbpedia.org/resource/%U\"/>
-            </foaf:Document>
-            </rdf:RDF>', RDF_SPONGE_PROXY_IRI (new_origin_uri), get_uri);
-	--body := http_get ('http://dbpedia.org/data/'|| get_uri, null, 'GET', 'Accept: application/xml, */*');
-	--RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	primary_topic := DB.DBA.RDF_PROXY_ENTITY_IRI (graph_iri);
-	doc_iri := DB.DBA.RDF_SPONGE_PROXY_IRI (graph_iri);
-	update DB.DBA.RDF_QUAD set P = iri_to_id ('http://xmlns.com/foaf/0.1/topic') where G = iri_to_id (coalesce (dest, graph_iri)) and P = iri_to_id ('http://xmlns.com/foaf/0.1/primaryTopic') and S = iri_to_id (doc_iri);
-	DB.DBA.RM_RDF_LOAD_RDFXML (body, new_origin_uri, coalesce (dest, graph_iri));
-      }
-    if (base is not null and isstring (file_stat (base)) and __proc_exists ('php_str', 2) is not null)
-      {
-	declare exit handler for sqlstate '*'
-	  {
-	    goto fallback;
-	  };
-	  code := RDFMAP_DBPEDIA_EXTRACT_PHP (base, get_uri);
-	  body := php_str (code);
-	  if (length (body) > 2 and body[0] = 239 and body[1] = 187 and body[2] = 191)
-	    body := subseq (body, 3);
-	  dbpiri := sprintf ('http://dbpedia.org/resource/%U', get_uri);
-	  RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	  DB.DBA.TTLP (body, dbpiri, dbpiri);
-	  insert soft DB.DBA.SYS_HTTP_SPONGE (HS_LOCAL_IRI, HS_PARSER, HS_ORIGIN_URI, HS_ORIGIN_LOGIN, HS_LAST_LOAD, HS_EXPIRATION)
-		  values (dbpiri, 'DB.DBA.RDF_LOAD_HTTP_RESPONSE', dbpiri, dbpiri, now(), dateadd ('hour', 1, now ()));
-      }
-    fallback:
-    DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-    return 1;
+  declare xd, xt, url, kind, paramid, json, hdr, content any;
+
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  
+  kind:=regexp_substr('^http://(www.)?stackoverflow.com/(users|questions|comments)', new_origin_uri, 2);
+  paramid:=regexp_substr('^http://(www.)?stackoverflow.com/(users|questions|comments)/([^/]+)', new_origin_uri, 3);
+
+  -- https://api.stackexchange.com/2.0/questions/9430557?order=desc&sort=activity&site=stackoverflow
+  url:=sprintf('https://api.stackexchange.com/2.0/%s/%s?site=stackoverflow.com&filter=withbody', kind, paramid);  
+	hdr:=null;
+  DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());
+  content := http_get (url, hdr, 'GET', null, null, get_keyword_ucase ('get:proxy', opts));
+  DB.DBA.RM_LOG_RESPONSE (content, hdr);
+	xt := DB.DBA.MQL_TREE_TO_XML(json_parse(content));
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/stackoverflow2rdf.xsl', xt, vector('baseUri', new_origin_uri, 'kind', kind));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	
+	if(kind='questions') {
+	  -- Get all answers as well
+	  url:=sprintf('https://api.stackexchange.com/2.0/questions/%s/answers?order=desc&site=stackoverflow&filter=withbody', paramid);  
+		hdr:=null;
+		DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());
+		content := http_get (url, hdr, 'GET', null, null, get_keyword_ucase ('get:proxy', opts));
+		DB.DBA.RM_LOG_RESPONSE (content, hdr);
+		xt := DB.DBA.MQL_TREE_TO_XML(json_parse(content));
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/stackoverflow2rdf.xsl', xt, vector('baseUri', new_origin_uri, 'kind', 'answers'));
+		xd := serialize_to_UTF8_xml (xt);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	}
+	
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
 }
 ;
 
-
-create procedure DB.DBA.RDF_DO_XSLT_AND_LOAD (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    in xt any, inout mdta any, in xslt_sheet varchar, in what varchar, in base varchar, inout opts any)
+create procedure DB.DBA.RDF_LOAD_ANGELLIST (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare xslt_uri varchar;
-  declare xslt_body, xd, media, ret, xsl_doc any;
-  xsl_doc := null;
-  ret := null;
-  declare exit handler for sqlstate '*' { goto try_next; };
-  xslt_uri := WS.WS.EXPAND_URL (base, cast (xslt_sheet as varchar));
-  {
-    declare exit handler for sqlstate '*'
+  declare xd, xt, urlpart, url, tree, json, hdr, content, success any;
+
+  declare exit handler for sqlstate '*'
     {
-      if (registry_get ('__sparql_sponge_use_w3c_xslt') = 'on')
-    goto try_w3c;
-      else
-    goto try_next;
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
     };
-    xslt_stale (xslt_uri);
-    {
-      -- /* we try to get xslt with content negotiation */
-      declare exit handler for sqlstate '*' {
-    goto try_next;
-      };
-      xslt_body := http_get (xslt_uri, null, 'GET', 'Accept: application/xml, */*', null, get_keyword_ucase ('get:proxy', opts));
-      if (length (xslt_body))
-    {
-      declare exit handler for sqlstate '*' {
-         if (registry_get ('__sparql_sponge_use_w3c_xslt') = 'on')
-           goto try_w3c;
-         else
-           goto try_next;
-      };
-      xslt_sheet (xslt_uri, xtree_doc (xslt_body, 0, xslt_uri));
-    }
-    }
-    xd := DB.DBA.RDF_MAPPER_XSLT (xslt_uri, xt);
-    xsl_doc := xd;
-    if (what <> '')
-      goto try_next;
-    if (xpath_eval ('count(/RDF/*)', xd) > 0)
-      {
-    mdta := mdta + 1;
-      }
-    media := xml_tree_doc_media_type (xd);
-    xd := serialize_to_UTF8_xml (xd);
-    if (media = 'text/rdf+n3')
-      {
-    DB.DBA.TTLP (xd, base, coalesce (dest, graph_iri));
-    mdta := mdta + 1;
-      }
-    else
-      DB.DBA.RDF_LOAD_RDFXML (xd, base, coalesce (dest, graph_iri));
-    goto try_next;
-  }
-  try_w3c:
-  if (0)
-    log_message (sprintf ('Using w3c xslt=[%s]', xslt_uri));
-  xd := http_client (sprintf ('http://www.w3.org/2000/06/webdata/xslt?xslfile=%U;xmlfile=%U', xslt_uri, new_origin_uri),
-    	proxy=>get_keyword_ucase ('get:proxy', opts));
-  xsl_doc := xtree_doc (xd);
-  if (what <> '')
-    goto try_next;
-  if (xpath_eval ('count(/RDF/*)', xsl_doc) > 0)
-    {
-      mdta := mdta + 1;
-    }
-  xslt_done:
-  DB.DBA.RDF_LOAD_RDFXML (xd, base, coalesce (dest, graph_iri));
-  try_next:;
-  if (isentity (xsl_doc))
-    {
-      if (what = 'ns')
-        {
-      ret  := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
-        ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
-        '//dv:namespaceTransformation/@rdf:resource', xsl_doc, 0);
-        }
-      else if (what = 'pf')
-        {
-          ret := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
-        ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
-        '//dv:profileTransformation/@rdf:resource', xsl_doc, 0);
-        }
-    }
-  return ret;
-};
+    
+  urlpart:=regexp_substr('^http://(www.)?angel.co/([^/]+)', new_origin_uri, 2);
 
-create procedure DB.DBA.RDF_MAPPER_EXPN_URLS (in all_xslt any, in base varchar)
+	hdr:=null;  
+	
+  -- is it a user (person)?
+  url:='https://api.angel.co/1/users/search?slug=' || urlpart;
+  DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());
+  content := http_get (url, hdr, 'GET', null, null, get_keyword_ucase ('get:proxy', opts));
+  DB.DBA.RM_LOG_RESPONSE (content, hdr);
+	tree := json_parse(content);
+	xt := DB.DBA.MQL_TREE_TO_XML(tree);
+	success:=cast( xpath_eval('count(/results/error)', xt) as integer );
+	if(success=0) {
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/angellist2rdf.xsl', xt, vector('baseUri', new_origin_uri, 'type', 'Person'));
+		xd := serialize_to_UTF8_xml (xt);
+		RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	} else {
+		-- is it a startup (company)?
+		url:='https://api.angel.co/1/startups/search?slug=' || urlpart;
+		DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());
+		content := http_get (url, hdr, 'GET', null, null, get_keyword_ucase ('get:proxy', opts));
+		DB.DBA.RM_LOG_RESPONSE (content, hdr);
+		tree := json_parse(content);
+		xt := DB.DBA.MQL_TREE_TO_XML(tree);
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/angellist2rdf.xsl', xt, vector('baseUri', new_origin_uri, 'type', 'Organization'));
+		xd := serialize_to_UTF8_xml (xt);
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	}
+	
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_CSV (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare ret any;
-  ret := vector ();
-  foreach (any _xslt in all_xslt) do
+  declare xd, xt, url, tmp any;
+  declare exit handler for sqlstate '*'
     {
-      declare split any;
-      split := split_and_decode (cast (_xslt as varchar),0, '\0\0 ');
-      foreach (any xslt in split) do
-        {
-      if (length (xslt))
-        {
-          xslt := WS.WS.EXPAND_URL (base, xslt);
-          ret := vector_concat (ret, vector (xslt));
-        }
-    }
-    }
-  return ret;
-};
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
 
-create procedure DB.DBA.RDF_LOAD_GRDDL_REC (in doc_base varchar, in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    in xt any, inout mdta any, inout visited any, in what varchar, in lev int, inout opts any)
+  xt := csv_to_xml (_ret_body);
+  xt := xtree_doc (xt);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/csvxml2rdf.xsl', xt,
+    vector ('baseUri', new_origin_uri));
+  xd := blob_to_string_output (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_XRD_GENERIC (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare pf_docs, ns_doc, barr any;
-  declare profile varchar;
-  declare profs, hdr, ret_arr any;
-  declare base_url, ns_url varchar;
-  declare tf1, tf2, tf3, all_xslt, ns_trf, profile_trf  any;
+  declare xd, xt, url, tmp any;
 
-  -- we limit up to 100
-  if (lev > 100)
-    return null;
+  declare exit handler for sqlstate '*'
+    {
+      -- dbg_printf('Error: [%s]', __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
 
-  lev := lev + 1;
+  xt := xtree_doc (_ret_body);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/xrd-generic.xsl', xt,
+    vector('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
 
-  ret_arr := null;
-  pf_docs := null;
-  ns_doc := tf1 := tf2 := tf3 := null;
-  profile_trf := ns_trf := null;
+  xd:=blob_to_string_output(xt);
 
-  -- take base & PF & NS URL
-  base_url := cast (xpath_eval ('/html/head/base/@href', xt) as varchar);
-  if (length (base_url) = 0)
-    {
-      base_url := cast (xpath_eval ('/*[1]/@xml:base', xt) as varchar);
-    }
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, COALESCE(DEST, GRAPH_IRI));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, COALESCE(DEST, GRAPH_IRI), null);
+	return 1;
+}
+;
 
-  if (length (base_url) = 0)
-     base_url := doc_base;
+create procedure DB.DBA.XSLT_IRISPLIT (in val varchar)
+{
+	-- Split URI VAL into namespace and local part, returns xml fragment
+  declare ns, loc, str varchar;
+  ns:=iri_split (val, loc);
 
-  barr := WS.WS.PARSE_URI (base_url);
-  -- if base is relative
-  if (barr [0] = '')
-    base_url := WS.WS.EXPAND_URL (doc_base, base_url);
+  return xmlelement('ret', xmlelement('ns', ns), xmlelement('loc', loc));
+}
+;
 
-  profile := cast (xpath_eval ('/html/head/@profile', xt) as varchar);
-  profs := null;
-  if (profile is not null)
-    profs := split_and_decode (profile, 0, '\0\0 ');
+grant execute on DB.DBA.XSLT_IRISPLIT to public;
+xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:IRISPLIT', 'DB.DBA.XSLT_IRISPLIT');
 
-  ns_url := cast (xpath_eval ('namespace-uri (/*[1])', xt) as varchar);
-  -- /* known NS */
-  if (
-      strstr (ns_url, 'http://www.w3.org/2003/g/data-view') is not null
+
+create procedure DB.DBA.RDF_LOAD_SVG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare xd, xt, url, tmp, api_key, img_id, hdr, exif any;
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  xd := xtree_doc (_ret_body);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/svg2rdf.xsl', xd, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_MS_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare meta, tmp varchar;
+  declare xt, xd any;
+  if (__proc_exists ('unzip_file', 2) is null)
+    return 0;
+  tmp := tmp_file_name ('rdfm', 'doc');
+
+  string_to_file (tmp, _ret_body, -2);
+  meta := unzip_file (tmp, 'docProps/app.xml');
+  file_delete (tmp, 1);
+  if (meta is null)
+    return 0;
+  xt := xtree_doc (meta);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ms_doc2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  string_to_file (tmp, _ret_body, -2);
+  meta := unzip_file (tmp, 'docProps/core.xml');
+  file_delete (tmp, 1);
+  if (meta is null)
+    return 0;
+  xt := xtree_doc (meta);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ms_doc2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+
+create procedure DB.DBA.RDF_LOAD_OO_DOCUMENT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare meta, tmp varchar;
+  declare xt, xd any;
+  if (__proc_exists ('unzip_file', 2) is null)
+    return 0;
+  tmp := tmp_file_name ('rdfm', 'odt');
+  string_to_file (tmp, _ret_body, -2);
+  meta := unzip_file (tmp, 'meta.xml');
+  file_delete (tmp, 1);
+  if (meta is null)
+    return 0;
+  xt := xtree_doc (meta);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/oo2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_OO_DOCUMENT2 (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare meta, tmp varchar;
+  declare xt, xd any;
+  xt := xtree_doc (_ret_body);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/fod2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_YAHOO_TRAFFIC_DATA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare meta, tmp varchar;
+  declare xt, xd any;
+
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  xt := xtree_doc (_ret_body);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yahoo_trf2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_ICAL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare meta, tmp varchar;
+	declare xt, xd any;
+	declare exit handler for sqlstate '*'
+    {
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+    };
+	xt := xml_tree_doc (DB.DBA.IMC_TO_XML (_ret_body));
+	xml_tree_doc_encoding (xt, 'UTF-8');
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ics2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+	xd := serialize_to_UTF8_xml (xt);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_WEBCAL (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  return DB.DBA.RDF_LOAD_ICAL (graph_iri, new_origin_uri, dest, _ret_body, aq, ps, _key, opts);
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_PRODUCTWIKI (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
+	declare pos, is_sku, is_store integer;
+	asin := null;
+	api_key := _key;
+	if (not isstring (api_key))
+		return 0;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://%.productwiki.com/%')
+	{
+		declare arr any;
+		arr := sprintf_inverse (new_origin_uri, 'http://%s.productwiki.com/%s', 0);
+		asin := arr[1];
+		pos := strchr(asin, '/');
+		if (pos is not null)
+			asin := left(asin, pos);
+		pos := strchr(asin, '?');
+		if (pos is not null)
+			asin := left(asin, pos);
+	}
+	else
+		return 0;
+	if (asin is null)
+		return 0;
+	url := sprintf ('http://api.productwiki.com/connect/api.aspx?op=search&q=%s&format=xml&key=%s&fields=skus,images,description,reviews', asin, api_key);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/productwiki2rdf.xsl', xd,
+		vector ('baseUri', new_origin_uri));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts); 
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_ZAPPOS (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, tmp, api_key, asin, hdr, tree, exif any;
+	declare pos, is_sku, is_store integer;
+	asin := null;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://www.zappos.com/product/%')
+	{
+		declare arr any;
+		arr := sprintf_inverse (new_origin_uri, 'http://www.zappos.com/product/%s', 0);
+		asin := arr[0];
+		pos := strchr(asin, '/');
+		if (pos is not null)
+			asin := left(asin, pos);
+		pos := strchr(asin, '?');
+		if (pos is not null)
+			asin := left(asin, pos);
+	}
+	else
+	{
+		return 0;
+	}
+	api_key := _key;
+	if (asin is null or not isstring (api_key))
+		return 0;
+	url := sprintf ('http://api.zappos.com/Product?id=%s&includes=["description","styles"]&key=%s', asin, api_key);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	tree := json_parse (tmp);
+	xt := DB.DBA.SOCIAL_TREE_TO_XML (tree);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/zappos2rdf.xsl', xt,
+		vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts); 
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+-- /* BestBuy  */
+create procedure DB.DBA.RDF_LOAD_BESTBUY (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, tmp, api_key, asin, hdr, exif any;
+	declare pos, is_sku, is_store integer;
+	asin := null;
+	is_sku := 0;
+	is_store := 0;
+	declare exit handler for sqlstate '*'
+	{
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://stores.bestbuy.com/%')
+	{
+		declare arr any;
+		arr := sprintf_inverse (new_origin_uri, 'http://stores.bestbuy.com/%s', 0);
+		asin := arr[0];
+		pos := strchr(asin, '/');
+		if (pos is not null)
+			asin := left(asin, pos);
+		pos := strchr(asin, '?');
+		if (pos is not null)
+			asin := left(asin, pos);
+		is_store := 1;
+	}
+	else if (new_origin_uri like 'http://%.bestbuy.com/%?skuId=%' or new_origin_uri like 'http://%.bestbuy.com/%&skuId=%')
+	{
+		declare arr any;
+		arr := sprintf_inverse (new_origin_uri, 'http://%s.bestbuy.com/%sskuId=%s', 0);
+		asin := arr[2];
+		pos := strchr(asin, '/');
+		if (pos is not null)
+			asin := left(asin, pos);
+		pos := strchr(asin, '&');
+		if (pos is not null)
+			asin := left(asin, pos);
+		pos := strchr(asin, '?');
+		if (pos is not null)
+			asin := left(asin, pos);
+		is_sku := 1;
+	}
+	else if (new_origin_uri like 'http://%.bestbuy.com/site/olspage.jsp?%' or new_origin_uri like 'http://%.bestbuy.com/%/%?%')
+	{
+		declare arr any;
+		arr := WS.WS.PARSE_URI (new_origin_uri);
+		arr := arr[4];
+		if (arr = '')
+			return 0;
+		arr := split_and_decode (arr);
+		if (length (arr) and mod (length (arr), 2) = 0)
+			asin := get_keyword ('id', arr);
+		if (asin not like '[0-9]+')
+		{
+			asin := get_keyword ('skuId', arr);
+			if (asin not like '[0-9]+')
+				return 0;
+			is_sku := 1;
+		}
+	}
+	else if (new_origin_uri like 'http://%.bestbuy.com/%/%/%/')
+	{
+		declare arr any;
+		arr := sprintf_inverse (new_origin_uri, 'http://%s.bestbuy.com/%s/%s/%s/', 0);
+		if (length (arr) = 4)
+		{
+			asin := arr[3];
+			is_sku := 1;
+		}
+		else
+			return 0;
+	}
+	else
+	{
+		return 0;
+	}
+	api_key := _key;
+	if (asin is null or not isstring (api_key))
+		return 0;
+	if (is_sku)
+		url := sprintf ('http://api.remix.bestbuy.com/v1/products/%s.xml?apiKey=%s', asin, api_key);
+	else
+		url := sprintf ('http://api.remix.bestbuy.com/v1/products(productId=%s)?apiKey=%s&format=xml&show=all', asin, api_key);
+	if (is_store)
+		url := sprintf ('http://api.remix.bestbuy.com/v1/stores(storeId=%s)?apiKey=%s&format=xml&show=all', asin, api_key);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/bestbuy2rdf.xsl', xd,
+		vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar), 'is_store', cast(is_store as varchar)));
+	xd := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts); 
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_AMAZON_QRY_SGN (in canon any, in secret_key any)
+{
+  declare url, StringToSign, hmacKey, signed any;
+
+  StringToSign := concat('GET\necs.amazonaws.com\n/onca/xml\n', canon);
+  if (not xenc_key_exists ('amazon_key'))
+    hmacKey := xenc_key_RAW_read ('amazon_key', encode_base64(secret_key));
+  signed := xenc_hmac_sha1_digest (StringToSign, 'amazon_key');
+  xenc_key_remove ('amazon_key');
+  signed := replace(replace(signed, '+', '%2B'), '=', '%3D');
+  url := concat('http://ecs.amazonaws.com/onca/xml?', canon, '&Signature=', signed);
+  return url;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_AMAZON_ARTICLE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare index1, xd, xd_utf8, xt, url, tmp, api_key, asin, hdr, exif, secret_key, datenow, canon, StringToSign, hmacKey, signed any;
+	declare pos, is_wish_list integer;
+	declare associate_key varchar;
+	asin := null;
+	associate_key := null;
+	is_wish_list := 0;
+	declare exit handler for sqlstate '*'
+    {
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+    };
+	if (new_origin_uri like 'http://%amazon.%/gp/product/product-description/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/gp/product/product-description/%s', 0);
+		asin := rtrim (tmp[2], '/');
+	}
+	else if (new_origin_uri like 'http://%amazon.%/gp/product/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/gp/product/%s', 0);
+		asin := rtrim (tmp[2], '/');
+	}
+	-- ListLookup operation, used for this URL pattern, has been deprecated
+	-- else if (new_origin_uri like 'http://%amazon.%/gp/registry/wishlist/%')
+	-- {
+	--	tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/gp/registry/wishlist/%s', 0);
+	--	asin := rtrim (tmp[2], '/');
+	--	is_wish_list := 1;
+	-- }
+	else if (new_origin_uri like 'http://%amazon.%/s?%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/s?%skeywords=%s', 0);
+		asin := tmp[3];
+		if (strchr(asin, '&') is not NULL)
+		{
+			tmp := sprintf_inverse (asin, '%s&%s', 0);
+			asin := tmp[0];
+			if (strchr(tmp[1], 'index=') is not NULL)
+			{
+				tmp := sprintf_inverse (tmp[1], 'index=%s', 0);
+				index1 := tmp[0];
+				if (strchr(index1, '&') is not NULL)
+				{
+					index1 := left(index1, strchr(index1, '&'));
+				}
+			}
+			else
+			{
+				index1 := 'None';
+			}
+		}
+		is_wish_list := 2;
+	}
+	else if (new_origin_uri like 'http://%amazon.%/o/ASIN/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/o/ASIN/%s', 0);
+		asin := rtrim (tmp[2], '/');
+	}
+	else if (new_origin_uri like 'http://%amazon.%/%/product-reviews/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/product-reviews/%s', 0);
+		asin := tmp[3];
+		pos := strchr(asin, '?');
+		if (pos is not null)
+		{
+			asin := left(asin, pos);
+		}
+	}
+	else if (new_origin_uri like 'http://%amazon.%/%/dp/%\\%3%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/dp/%s%%3%s', 0);
+		asin := tmp[3];
+	}
+	else if (new_origin_uri like 'http://%amazon.%/dp/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/dp/%s', 0);
+		asin := tmp[2];
+		pos := strchr(asin, '?');
+		if (pos is not null)
+			asin := left(asin, pos);
+	}
+	else if (new_origin_uri like 'http://%amazon.%/%/dp/%/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/dp/%s/%s', 0);
+		asin := tmp[3];
+	}
+	else if (new_origin_uri like 'http://%amazon.%/%/dp/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/%s/dp/%s', 0);
+		asin := tmp[3];
+	}
+	else if (new_origin_uri like 'http://%amazon.%/exec/obidos/ASIN/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/exec/obidos/ASIN/%s', 0);
+		asin := rtrim (tmp[2], '/');
+	}
+	else if (new_origin_uri like 'http://%amazon.%/exec/obidos/tg/detail/-/%/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://%samazon.%s/exec/obidos/tg/detail/-/%s/%s', 0);
+		asin := tmp[2];
+	}
+	else
+	{
+		return 0;
+	}
+	pos := strchr(asin, '/');
+	if (pos is not null)
+	{
+		asin := left(asin, pos);
+	}
+	api_key := _key;
+	secret_key := null;
+	if (isarray (opts) and 0 = mod (length(opts), 2))
+	{
+		secret_key := get_keyword ('secret_key', opts);
+		associate_key := get_keyword ('associate_key', opts);
+	}
+	if ((0 = length (api_key)) or (0 = length (secret_key)) or (0 = length (associate_key)))
+		return 0;
+	if (asin is null)
+		return 0;
+	datenow := replace(date_iso8601 (dt_set_tz (now(), 0)), ':', '%3A');
+	-- Note: Query parameter/value pairs *must* be sorted by byte value before the query string is signed.
+	--       Lowercase parameters will come after uppercase ones in the canonical query string.
+	if (is_wish_list = 1)
+	{
+	  -- Operation ListLookup has been deprecated
+	  -- canon := sprintf('AWSAccessKeyId=%s&AssociateTag=%s&Condition=All&ListId=%s&ListType=WishList&MerchantId=All&Operation=ListLookup&ResponseGroup=Large%%2CItemAttributes%%2COffers%%2CReviews&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s&Version=2011-08-01', api_key, associate_key, asin, datenow);
+	  return 0;
+	}
+	else if (is_wish_list = 2)
+	{
+		canon := sprintf('AWSAccessKeyId=%s&AssociateTag=%s&Availability=Available&Condition=All&Keywords=%s&Operation=ItemSearch&ResponseGroup=Large%%2CItemAttributes%%2COffers%%2CReviews&SearchIndex=%s&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s&Version=2011-08-01', api_key, associate_key, asin, index1, datenow);
+	}
+	else
+	{
+		canon := sprintf('AWSAccessKeyId=%s&AssociateTag=%s&Condition=All&ItemId=%s&Operation=ItemLookup&ResponseGroup=Large%%2CItemAttributes%%2COffers%%2CReviews&Service=AWSECommerceService&SignatureMethod=HmacSHA1&Timestamp=%s&Version=2011-08-01', api_key, associate_key, asin, datenow);
+	}
+	url := DB.DBA.RDF_LOAD_AMAZON_QRY_SGN (canon, secret_key);
+        DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());        
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+        DB.DBA.RM_LOG_RESPONSE (tmp, hdr);
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/amazon2rdf.xsl', xd,
+		vector ('baseUri', new_origin_uri, 'asin', asin, 'currentDateTime', cast(date_iso8601(now()) as varchar),
+		'wish_list', cast(is_wish_list as varchar), 'associate_key', associate_key));
+	xd_utf8 := serialize_to_UTF8_xml (xt);
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd_utf8, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_OPENSTREETMAP (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, tmp, lon1, lat1, hdr, exif any;
+	declare zoom, layers varchar;
+	declare lat, lon, left_point, bottom_point, right_point, top_point float;
+	declare pos integer;
+
+	declare exit handler for sqlstate '*'
+	{
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	if (new_origin_uri like 'http://%openstreetmap.org/%?lat=%&lon=%')
+	{
+
+		tmp := sprintf_inverse (new_origin_uri, 'http://%sopenstreetmap.org/%s?lat=%s&lon=%s', 0);
+		lat1 := tmp[2];
+		lon1 := tmp[3];
+		pos := strchr (lon1, '&');
+		if (pos > 0)
+			lon1 := subseq(lon1, 0, pos);
+	}
+	else if (new_origin_uri like 'http://%openstreetmap.org/%?mlat=%&mlon=%')
+	{
+
+		tmp := sprintf_inverse (new_origin_uri, 'http://%sopenstreetmap.org/%s?mlat=%s&mlon=%s', 0);
+		lat1 := tmp[0];
+		lon1 := tmp[1];
+		pos := strchr (lon1, '&');
+		if (pos > 0)
+			lon1 := subseq(lon1, 0, pos);
+	}
+	else
+		return 0;
+
+	{
+		lat := atof(lat1);
+		lon := atof(lon1);
+		--zoom := atoi(tmp[2]);
+		--layers := tmp[3];
+		left_point := lon - 0.01;
+		right_point := lon + 0.01;
+		bottom_point := lat - 0.01;
+		top_point := lat + 0.01;
+		url := sprintf('http://api.openstreetmap.org/api/0.6/map?bbox=%f,%f,%f,%f', left_point, bottom_point, right_point, top_point);
+	}
+	tmp := http_client(url, proxy=>get_keyword_ucase ('get:proxy', opts));
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/openstreet2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'lon', lon1, 'lat', lat1));
+	xd := serialize_to_UTF8_xml (xt);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_USTREAM (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, tmp, api_key, img_id, hdr, what, pos any;
+	declare exit handler for sqlstate '*'
+	{
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	api_key := _key;
+	if (not isstring (api_key))
+		return 0;
+	if (new_origin_uri like 'http://www.ustream.tv/channel/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.ustream.tv/channel/%s', 0);
+		if (tmp is null)
+		    return 0;
+		img_id := tmp[0];
+		pos := strchr(img_id, '/');
+		if (pos is not null)
+                    img_id := left(img_id, pos);
+                url := sprintf('http://api.ustream.tv/xml/channel/%s/getInfo?key=%s', img_id, api_key);
+                what := 'channel';
+	}
+	else if (new_origin_uri like 'http://www.ustream.tv/user/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.ustream.tv/user/%s', 0);
+		if (tmp is null)
+		    return 0;
+		img_id := tmp[0];
+		pos := strchr(img_id, '/');
+		if (pos is not null)
+                    img_id := left(img_id, pos);
+                url := sprintf('http://api.ustream.tv/xml/user/%s/getInfo?key=%s', img_id, api_key);
+                what := 'user';
+	}
+	else if (new_origin_uri like 'http://www.ustream.tv/recorded/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.ustream.tv/recorded/%s', 0);
+		if (tmp is null)
+		    return 0;
+		img_id := tmp[0];
+		pos := strchr(img_id, '/');
+		if (pos is not null)
+                    img_id := left(img_id, pos);
+                url := sprintf('http://api.ustream.tv/xml/video/%s/getInfo?key=%s', img_id, api_key);
+                what := 'video';
+	}
+	else
+	    return 0;
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ustream2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'what', what));
+	xd := serialize_to_UTF8_xml (xt);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_FLICKR_IMG (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, tmp, api_key, img_id, hdr, exif any;
+	declare exit handler for sqlstate '*'
+	{
+	  DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	api_key := _key;
+	if (not isstring (api_key))
+		return 0;
+	if (new_origin_uri like 'http://farm%.static.flickr.com/%/%')
+	{
+		tmp := sprintf_inverse (new_origin_uri, 'http://farm%s.static.flickr.com/%s/%s_%s.%s', 0);
+		if (tmp is null or length (tmp) <> 5)
+			return 0;
+		img_id := tmp[2];
+	}
+	else if (new_origin_uri like 'http://www.flickr.com/photos/%/%')
+	{
+		declare pos	integer;
+		tmp := sprintf_inverse (new_origin_uri, 'http://www.flickr.com/photos/%s/%s', 0);
+		img_id := tmp[1];
+		pos := strchr(img_id, '/');
+		if (pos is not null)
+			img_id := left(img_id, pos);
+	}
+	else
+		return 0;
+	url := sprintf ('http://api.flickr.com/services/rest/?method=flickr.photos.getInfo&photo_id=%s&api_key=%s', img_id, api_key);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	exif := xtree_doc ('<rsp/>');
+	{
+		declare exit handler for sqlstate '*' { goto ende; };
+		url := sprintf ('http://api.flickr.com/services/rest/?method=flickr.photos.getExif&photo_id=%s&api_key=%s',
+		img_id, api_key);
+		tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+		if (hdr[0] like 'HTTP/1._ 200 %')
+			exif := xtree_doc (tmp);
+		ende:;
+	}
+
+	xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/flickr2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'exif', exif));
+	xd := serialize_to_UTF8_xml (xt);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+	return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_EBAY_ARTICLE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout ser_key any, inout opts any, in triple_dict any := null)
+{
+  declare xd, xd_utf8, xt, url, tmp, api_key, item_id, hdr, karr, use_sandbox, user_id, node any;
+  declare product_id varchar;
+  declare exit handler for sqlstate '*'
+    {
+      -- dbg_printf('Error: [%s]', __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+
+  use_sandbox := 0;
+
+  tmp:='';
+  tmp:=regexp_replace(new_origin_uri, '^http://www.ebay.[^/]+/itm/[^/]*/([0-9]+).*', '\\1');
+  if(tmp='') {
+  if (new_origin_uri like 'http://cgi.sandbox.ebay.com/%&item=%&%')
+    {
+      tmp := sprintf_inverse (new_origin_uri, 'http://cgi.sandbox.ebay.com/%s&item=%s&%s', 0);
+      use_sandbox := 1;
+    }
+  else if (new_origin_uri like 'http://cgi.ebay.%/%QQitemZ%QQ%')
+    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.%s/%sQQitemZ%sQQ%s', 0);
+  else if (new_origin_uri like 'http://cgi.ebay.%/%/eBayISAPI.dll?ViewItem&item=%')
+    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.%s/%s/eBayISAPI.dll?ViewItem&item=%s', 0);
+  else if (new_origin_uri like 'http://cgi.ebay.%/%/%?%')
+    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.%s/%s/%s?%s', 0);
+  else if (new_origin_uri like 'http://cgi.ebay.%/%/%')
+  {
+    tmp := sprintf_inverse (new_origin_uri, 'http://cgi.ebay.%s/%s/%s', 0);
+	if (atoi(tmp[2]) = 0)
+		return 0;
+  }
+  else
+    return 0;
+
+    if (tmp is null or not isstring (api_key)) { -- length (tmp) <> 3
+    return 0;
+    }
+  item_id := tmp[2];
+  } else {
+    item_id:=tmp;
+  }
+
+  api_key := ser_key;
+  
+  url := sprintf ('http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=%s&siteid=0&version=515&ItemID=%s&IncludeSelector=Description,Details,ItemSpecifics', api_key, item_id);
+
+  tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+  if (hdr[0] not like 'HTTP/1._ 200 %')
+    signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+
+  xd := xtree_doc (tmp);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ebay2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+  xd_utf8 := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd_utf8, new_origin_uri, coalesce (dest, graph_iri));
+
+  -- Get any reviews
+  node := xpath_eval('//Item/ProductID[@type="Reference"]', xd);
+  product_id := cast (node as varchar);
+  if (not length(product_id))
+    goto skipReviews;
+
+  url := sprintf ('http://open.api.ebay.com/shopping?callname=FindReviewsAndGuides&responseencoding=XML&appid=%s&siteid=0&version=515&ProductID.type=Reference&ProductID.value=%s', api_key, product_id);
+  tmp := http_client_ext (url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+
+  if (hdr[0] not like 'HTTP/1._ 200 %')
+    goto skipReviews;
+
+  xd := xtree_doc (tmp);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ebay2rdf.xsl', xd, vector ('baseUri', new_origin_uri, 'currentDateTime', cast(date_iso8601(now()) as varchar)));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+
+skipReviews:
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_DAV_META (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout ser_key any, inout opts any, in triple_dict any := null)
+{
+  declare xd, localdest, groupdest, dep any;
+  localdest := coalesce (dest, graph_iri);
+  groupdest := get_keyword_ucase ('get:group-destination', opts);
+  xd := DAV_EXTRACT_META_AS_RDF_XML (new_origin_uri, _ret_body);
+  if (xd is not null)
+    {
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, localdest);
+      if (groupdest is not null)
+        DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, groupdest);
+      return 1;
+    }
+  dep := (sparql define input:storage ""
+     select (sql:VECTOR_AGG (?o))
+    where { graph `iri(?:localdest)` {
+            `iri(?:localdest)` <http://www.w3.org/2000/01/rdf-schema#seeAlso> ?o .
+            filter (isIRI (?o)) } } );
+  if (length (dep) > 0)
+    {
+      return vector ('seeAlso', dep);
+    }
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_MAPPER_CACHE_CHECK (in url varchar, in top_url varchar, out old_etag varchar, out old_last_modified any)
+{
+  declare old_exp_is_true, old_expiration, old_read_count any;
+  whenever not found goto no_record;
+  select HS_EXP_IS_TRUE, HS_EXPIRATION, HS_LAST_MODIFIED, HS_LAST_ETAG, HS_READ_COUNT
+      into old_exp_is_true, old_expiration, old_last_modified, old_etag, old_read_count
+      from DB.DBA.SYS_HTTP_SPONGE where HS_FROM_IRI = url and HS_PARSER = 'DB.DBA.RDF_LOAD_HTTP_RESPONSE';
+  -- as we are at point we load everything we always do re-load
+no_record:
+  return 0;
+}
+;
+
+create procedure
+RDF_MAPPER_CACHE_REGISTER (in url varchar, in top_url varchar, inout hdr any,
+                   in old_last_modified any, in download_size int, in load_msec int)
+{
+  declare explicit_refresh, new_expiration, ret_content_type, ret_etag, ret_date, ret_expires, ret_last_modif,
+      ret_dt_date, ret_dt_expires, ret_dt_last_modified any;
+
+  if (not isarray (hdr))
+    return;
+
+  url := WS.WS.EXPAND_URL (top_url, url);
+  explicit_refresh := null;
+  new_expiration := now ();
+  DB.DBA.SYS_HTTP_SPONGE_GET_CACHE_PARAMS (explicit_refresh, old_last_modified,
+      hdr, new_expiration, ret_content_type, ret_etag, ret_date, ret_expires, ret_last_modif,
+       ret_dt_date, ret_dt_expires, ret_dt_last_modified);
+  insert replacing DB.DBA.SYS_HTTP_SPONGE (
+      HS_LAST_LOAD,
+      HS_LAST_ETAG,
+      HS_LAST_READ,
+      HS_EXP_IS_TRUE,
+      HS_EXPIRATION,
+      HS_LAST_MODIFIED,
+      HS_DOWNLOAD_SIZE,
+      HS_DOWNLOAD_MSEC_TIME,
+      HS_READ_COUNT,
+      HS_SQL_STATE,
+      HS_SQL_MESSAGE,
+      HS_LOCAL_IRI,
+      HS_PARSER,
+      HS_ORIGIN_URI,
+      HS_ORIGIN_LOGIN,
+      HS_FROM_IRI)
+      values
+      (
+       now (),
+       ret_etag,
+       now(),
+       case (isnull (ret_dt_expires)) when 1 then 0 else 1 end,
+       coalesce (ret_dt_expires, new_expiration, now()),
+       ret_dt_last_modified,
+       download_size,
+       load_msec,
+       1,
+       NULL,
+       NULL,
+       url,
+       'DB.DBA.RDF_LOAD_HTTP_RESPONSE',
+       url,
+       NULL,
+       top_url
+       );
+
+  return;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_OPENSOCIAL_PERSON (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare xt, xd, tmp, cnt, hdr any;
+  declare mail, pwd, auth, auth_header varchar;
+
+  mail := get_keyword ('email', opts, null);
+  pwd := get_keyword ('password', opts, null);
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  auth_header := null;
+  if (length (mail) + length (pwd))
+    {
+      cnt := http_client (url=>'https://www.google.com/accounts/ClientLogin',
+        http_method=>'POST', body=>sprintf ('Email=%U&Passwd=%U&source=OpenLink-Sponger-1&service=ot', mail, pwd),
+	proxy=>get_keyword_ucase ('get:proxy', opts));
+      if (cnt like 'Error=%')
+    return 0;
+      cnt := replace (cnt, '\r', '\n');
+      cnt := replace (cnt, '\n\n', '\n');
+      tmp := split_and_decode (cnt, 0, '\0\0\n=');
+      auth := get_keyword ('Auth', tmp);
+      if (auth is not null)
+    auth_header := 'Authorization: GoogleLogin auth='||auth;
+    }
+  cnt := DB.DBA.RDF_HTTP_URL_GET (new_origin_uri, new_origin_uri, hdr, 'GET', auth_header, proxy=>get_keyword_ucase ('get:proxy', opts));
+  if (hdr[0] not like  'HTTP/1._ 200 %')
+    return 0;
+  xd := xtree_doc (cnt);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/ospeople2rdf.xsl', xd,
+    vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_WIKIPEDIA_ARTICLE
+    (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+         inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+    declare get_uri, body, dbpiri any;
+    declare code, base, primary_topic, doc_iri any;
+    get_uri := split_and_decode (new_origin_uri, 0, '\0\0/');
+    get_uri := get_uri[length (get_uri) - 1];
+    get_uri := split_and_decode (get_uri)[0];
+    base := get_keyword ('DBpediaBase', opts);
+      {
+	declare exit handler for sqlstate '*'
+	  {
+	    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+	    return 0;
+	  };
+	body := sprintf('<?xml version=\"1.0\" encoding=\"utf-8\"?>
+	        <rdf:RDF
+	        xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
+	        xmlns:foaf=\"http://xmlns.com/foaf/0.1/\">
+	        <foaf:Document rdf:about=\"%s\">
+            <foaf:primaryTopic rdf:resource=\"http://dbpedia.org/resource/%U\"/>
+            </foaf:Document>
+            </rdf:RDF>', RDF_SPONGE_PROXY_IRI (new_origin_uri), get_uri);
+	--body := http_get ('http://dbpedia.org/data/'|| get_uri, null, 'GET', 'Accept: application/xml, */*');
+	--RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	primary_topic := DB.DBA.RDF_PROXY_ENTITY_IRI (graph_iri);
+	doc_iri := DB.DBA.RDF_SPONGE_PROXY_IRI (graph_iri);
+	update DB.DBA.RDF_QUAD set P = iri_to_id ('http://xmlns.com/foaf/0.1/topic') where G = iri_to_id (coalesce (dest, graph_iri)) and P = iri_to_id ('http://xmlns.com/foaf/0.1/primaryTopic') and S = iri_to_id (doc_iri);
+	DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, body, new_origin_uri, coalesce (dest, graph_iri));
+      }
+    if (base is not null and isstring (file_stat (base)) and __proc_exists ('php_str', 2) is not null)
+      {
+	declare exit handler for sqlstate '*'
+	  {
+	    goto fallback;
+	  };
+	  code := RDFMAP_DBPEDIA_EXTRACT_PHP (base, get_uri);
+	  body := php_str (code);
+	  if (length (body) > 2 and body[0] = 239 and body[1] = 187 and body[2] = 191)
+	    body := subseq (body, 3);
+	  dbpiri := sprintf ('http://dbpedia.org/resource/%U', get_uri);
+	  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+	  DB.DBA.TTLP (body, dbpiri, dbpiri);
+	  insert soft DB.DBA.SYS_HTTP_SPONGE (HS_LOCAL_IRI, HS_PARSER, HS_ORIGIN_URI, HS_ORIGIN_LOGIN, HS_LAST_LOAD, HS_EXPIRATION)
+		  values (dbpiri, 'DB.DBA.RDF_LOAD_HTTP_RESPONSE', dbpiri, dbpiri, now(), dateadd ('hour', 1, now ()));
+      }
+    fallback:
+    DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+    return 1;
+}
+;
+
+
+create procedure DB.DBA.RDF_DO_XSLT_AND_LOAD (inout triple_dict any, in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    in xt any, inout mdta any, in xslt_sheet varchar, in what varchar, in base varchar, inout opts any)
+{
+  declare xslt_uri varchar;
+  declare xslt_body, xd, media, ret, xsl_doc any;
+  xsl_doc := null;
+  ret := null;
+  declare exit handler for sqlstate '*' { goto try_next; };
+  xslt_uri := WS.WS.EXPAND_URL (base, cast (xslt_sheet as varchar));
+  {
+    declare exit handler for sqlstate '*'
+    {
+      if (registry_get ('__sparql_sponge_use_w3c_xslt') = 'on')
+    goto try_w3c;
+      else
+    goto try_next;
+    };
+    xslt_stale (xslt_uri);
+    {
+      -- /* we try to get xslt with content negotiation */
+      declare exit handler for sqlstate '*' {
+	goto try_next;
+      };
+      xslt_body := http_get (xslt_uri, null, 'GET', 'Accept: application/xml, */*', null, get_keyword_ucase ('get:proxy', opts));
+      if (length (xslt_body))
+    {
+      declare exit handler for sqlstate '*' {
+         if (registry_get ('__sparql_sponge_use_w3c_xslt') = 'on')
+           goto try_w3c;
+         else
+           goto try_next;
+      };
+      xslt_sheet (xslt_uri, xtree_doc (xslt_body, 0, xslt_uri));
+    }
+    }
+    xd := DB.DBA.RDF_MAPPER_XSLT (xslt_uri, xt);
+    xsl_doc := xd;
+    if (what <> '')
+      goto try_next;
+    if (xpath_eval ('count(/RDF/*)', xd) > 0)
+      {
+	mdta := mdta + 1;
+      }
+    media := xml_tree_doc_media_type (xd);
+    xd := serialize_to_UTF8_xml (xd);
+    if (media = 'text/rdf+n3')
+      {
+        DB.DBA.RM_RDF_TTL_LOAD_DICT (xd, base, coalesce (dest, graph_iri), triple_dict);
+        mdta := mdta + 1;
+      }
+    else
+      DB.DBA.RM_RDF_RDFXML_LOAD_DICT (xd, base, coalesce (dest, graph_iri), triple_dict);
+    goto try_next;
+  }
+  try_w3c:
+  if (0)
+    log_message (sprintf ('Using w3c xslt=[%s]', xslt_uri));
+  xd := http_client (sprintf ('http://www.w3.org/2000/06/webdata/xslt?xslfile=%U;xmlfile=%U', xslt_uri, new_origin_uri),
+    	proxy=>get_keyword_ucase ('get:proxy', opts));
+  xsl_doc := xtree_doc (xd);
+  if (what <> '')
+    goto try_next;
+  if (xpath_eval ('count(/RDF/*)', xsl_doc) > 0)
+    {
+      mdta := mdta + 1;
+    }
+  xslt_done:
+  DB.DBA.RDF_LOAD_RDFXML (xd, base, coalesce (dest, graph_iri));
+  try_next:;
+  if (isentity (xsl_doc))
+    {
+      if (what = 'ns')
+        {
+      ret  := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
+        ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
+        '//dv:namespaceTransformation/@rdf:resource', xsl_doc, 0);
+        }
+      else if (what = 'pf')
+        {
+          ret := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
+        ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
+        '//dv:profileTransformation/@rdf:resource', xsl_doc, 0);
+        }
+    }
+  return ret;
+};
+
+create procedure DB.DBA.RDF_MAPPER_EXPN_URLS (in all_xslt any, in base varchar)
+{
+  declare ret any;
+  ret := vector ();
+  foreach (any _xslt in all_xslt) do
+    {
+      declare split any;
+      split := split_and_decode (cast (_xslt as varchar),0, '\0\0 ');
+      foreach (any xslt in split) do
+        {
+      if (length (xslt))
+        {
+          xslt := WS.WS.EXPAND_URL (base, xslt);
+          ret := vector_concat (ret, vector (xslt));
+        }
+    }
+    }
+  return ret;
+};
+
+create procedure DB.DBA.RDF_LOAD_GRDDL_REC (inout triple_dict any, in doc_base varchar, in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    in xt any, inout mdta any, inout visited any, in what varchar, in lev int, inout opts any)
+{
+  declare pf_docs, ns_doc, barr any;
+  declare profile varchar;
+  declare profs, hdr, ret_arr any;
+  declare base_url, ns_url varchar;
+  declare tf1, tf2, tf3, all_xslt, ns_trf, profile_trf  any;
+
+  -- we limit up to 100
+  if (lev > 100)
+    return null;
+
+  lev := lev + 1;
+
+  ret_arr := null;
+  pf_docs := null;
+  ns_doc := tf1 := tf2 := tf3 := null;
+  profile_trf := ns_trf := null;
+
+  -- take base & PF & NS URL
+  base_url := cast (xpath_eval ('/html/head/base/@href', xt) as varchar);
+  if (length (base_url) = 0)
+    {
+      base_url := cast (xpath_eval ('/*[1]/@xml:base', xt) as varchar);
+    }
+
+  if (length (base_url) = 0)
+     base_url := doc_base;
+
+  barr := WS.WS.PARSE_URI (base_url);
+  -- if base is relative
+  if (barr [0] = '')
+    base_url := WS.WS.EXPAND_URL (doc_base, base_url);
+
+  profile := cast (xpath_eval ('/html/head/@profile', xt) as varchar);
+  profs := null;
+  if (profile is not null)
+    profs := split_and_decode (profile, 0, '\0\0 ');
+
+  ns_url := cast (xpath_eval ('namespace-uri (/*[1])', xt) as varchar);
+  -- /* known NS */
+  if (
+      strstr (ns_url, 'http://www.w3.org/2003/g/data-view') is not null
       or ns_url = 'http://www.w3.org/1999/xhtml'
       or ns_url = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
       or ns_url = 'http://www.w3.org/2005/Atom'
       )
     ns_url := null;
 
-  -- take 'transform' attributes
-  if (strstr (profile, 'http://www.w3.org/2003/g/data-view') is not null)
+  -- take 'transform' attributes
+  if (strstr (profile, 'http://www.w3.org/2003/g/data-view') is not null)
+    {
+      tf1 := xpath_eval ('/html/head/link[@rel="transformation"]/@href', xt, 0);
+      tf2 := xpath_eval ('//a[contains(concat(" ", at rel," "), " transformation ")]/@href', xt, 0);
+    }
+  -- /* xml doc */
+  tf3 := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" ] /*[1]/@dv:transformation', xt, 0);
+
+  -- take NS transform
+  if (length (ns_url) and strstr (visited, ' ' || ns_url || ' ') is null)
+    {
+      declare uarr, stat, msg, dta, meta any;
+      declare cnt, tmp_url, tmp_xt, tmp_prof, tmp_profs any;
+
+      tmp_xt := null;
+      visited := visited || ' ' || ns_url || ' ';
+      uarr := WS.WS.PARSE_URI (ns_url);
+      uarr[5] := '';
+      ns_url := vspx_uri_compose (uarr);
+
+      declare exit handler for sqlstate '*' {
+         goto no_ns_doc;
+      };
+
+      hdr := null;
+      tmp_xt := null;
+      if (0)
+	log_message (sprintf ('NS get %s', ns_url));
+      cnt := DB.DBA.RDF_HTTP_URL_GET (ns_url, base_url, hdr, 'GET', 'Accept: application/rdf+xml, application/xml, */*', proxy=>get_keyword_ucase ('get:proxy', opts));
+      tmp_xt := xtree_doc (cnt, 0);
+
+      ns_doc := vector (vector (ns_url, tmp_xt));
+
+      ns_trf := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
+      ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
+      '//dv:namespaceTransformation/@rdf:resource', tmp_xt, 0);
+      ns_trf := DB.DBA.RDF_MAPPER_EXPN_URLS (ns_trf, ns_url);
+      no_ns_doc:;
+    }
+
+  -- take PF transform
+  foreach (any prof in profs) do
+    {
+      declare prof_base any;
+      if (length (prof) = 0)
+        goto next_prof_1;
+      prof_base := null;
+      prof := WS.WS.EXPAND_URL (base_url, prof);
+      declare cnt, tmp_url, tmp_xt, tmp_prof, tmp_profs any;
+      declare exit handler for sqlstate '*' {
+    goto next_prof_1;
+      };
+      hdr := null;
+      tmp_xt := null;
+      if (strstr (prof, 'http://www.w3.org/2003/g/data-view') is not null)
+        goto next_prof_1;
+      if (0)
+        log_message (sprintf ('PF get %s', prof));
+      cnt := DB.DBA.RDF_HTTP_URL_GET (prof, base_url, hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
+      tmp_xt := xtree_doc (cnt, 0);
+
+      pf_docs := vector_concat (pf_docs, vector (vector (prof, tmp_xt)));
+
+      prof_base := cast (xpath_eval ('/html/head/base/@href', tmp_xt) as varchar);
+      if (length (prof_base) = 0)
+        {
+      prof_base := cast (xpath_eval ('/*[1]/@xml:base', tmp_xt) as varchar);
+    }
+      if (length (prof_base) = 0)
+        prof_base := prof;
+
+      tmp_prof := xpath_eval (
+      '//*[contains (concat (" ", @rel, " "), " profileTransformation ")]/@href', tmp_xt, 0);
+      --  get here profileTransformation and push into a profile_trf
+      tmp_prof := DB.DBA.RDF_MAPPER_EXPN_URLS (tmp_prof, prof_base);
+      profile_trf := vector_concat (profile_trf, tmp_prof);
+
+      tmp_prof := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
+    ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
+    '//dv:profileTransformation/@rdf:resource', tmp_xt, 0);
+      tmp_prof := DB.DBA.RDF_MAPPER_EXPN_URLS (tmp_prof, prof_base);
+      profile_trf := vector_concat (profile_trf, tmp_prof);
+      next_prof_1:;
+    }
+
+  all_xslt := vector_concat (tf1, tf2, tf3, profile_trf, ns_trf);
+
+  -- if no xslt, traverse the NF & PF docs above
+  if (length (all_xslt) = 0)
+    {
+      declare ret any;
+      foreach (any pf_item in pf_docs) do
+        {
+      ret := DB.DBA.RDF_LOAD_GRDDL_REC (triple_dict, base_url, graph_iri, pf_item[0], dest, pf_item[1], mdta, visited, 'pf', lev, opts);
+      all_xslt := vector_concat (all_xslt, ret);
+    }
+      foreach (any ns_item in ns_doc) do
+        {
+      ret := DB.DBA.RDF_LOAD_GRDDL_REC (triple_dict, base_url, graph_iri, ns_item[0], dest, ns_item[1], mdta, visited, 'ns', lev, opts);
+      all_xslt := vector_concat (all_xslt, ret);
+    }
+    }
+
+  -- if any apply xslt
+  foreach (any _xslt in all_xslt) do
+    {
+      declare ret, split any;
+      split := split_and_decode (cast (_xslt as varchar),0, '\0\0 ');
+      foreach (any xslt in split) do
+        {
+	  if (0)
+	   log_message (sprintf ('TRANSFORM=[%s] XSLT=[%s]', new_origin_uri, xslt));
+	  ret := DB.DBA.RDF_DO_XSLT_AND_LOAD (triple_dict, graph_iri, new_origin_uri, dest, xt, mdta, xslt, what, base_url, opts);
+	  ret_arr := vector_concat (ret_arr, ret);
+        }
+    }
+  return ret_arr;
+};
+
+--
+-- /* RDFA comaptibility wrapper */
+--
+create procedure DB.DBA.RDF_LOAD_RDFA_1 (in triple_dict any, inout ret_body any, inout new_origin_uri varchar, inout thisgr varchar, in flag int, in xlat int := 1)
+{
+  if (triple_dict is not null) 
+    {
+      DB.DBA.RDFA_LOAD_DICT_XLAT (ret_body, new_origin_uri, thisgr, triple_dict, flag, 'DB.DBA.RM_XLAT_CONCAT', null);
+      return;
+    }
+
+  if (__proc_exists ('DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION') is not null)
+    DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION (ret_body, new_origin_uri, thisgr, flag, 'DB.DBA.RM_XLAT_CONCAT', null);
+  else
+    DB.DBA.RDF_LOAD_RDFA (ret_body, new_origin_uri, thisgr, flag);
+}
+;
+
+
+--
+-- /* GRDDL filters, if signature changed web robot needs to be updated too */
+--
+create procedure DB.DBA.RDF_LOAD_HTML_RESPONSE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+	inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	-- check to microformats
+	declare xt_sav, xt, xd, profile, mdta, xslt_style, profs, profs_done, feed_url, xt_xml any;
+	declare xmlnss, i, l, nss, rdf_url_arr, content, hdr, rdf_in_html, old_etag, old_last_modified any;
+	declare ret_flag, is_grddl, download_size, load_msec int;
+	declare get_feeds, add_html_meta, grddl_loop int;
+	declare base_url, ns_url, reg, doc_base, proxy_iri, cset, dtd_sysuri, tgt_page, posh  varchar;
+	declare profile_trf, ns_trf, ext_profs, thisgr, cnt any;
+	declare dict any;
+	get_feeds := add_html_meta := 0;
+	if (isarray (opts) and 0 = mod (length(opts), 2))
+	{
+		if (get_keyword ('get-feeds', opts) = 'yes')
+			get_feeds := 1;
+		if (get_keyword ('add-html-meta', opts) = 'yes')
+			add_html_meta := 1;
+	}
+	tgt_page := get_keyword ('get:uri', opts, new_origin_uri);
+	set_user_id ('dba');
+	mdta := 0;
+	ret_flag := 1;
+	hdr := null;
+	xt_xml := null;
+	profile_trf := vector ();
+	ns_trf := vector ();
+	ext_profs := vector ();
+	grddl_loop := 0;
+	if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1')
+		proxy_iri := new_origin_uri;
+	else
+		proxy_iri := DB.DBA.RDF_SPONGE_PROXY_IRI (new_origin_uri);
+	declare exit handler for sqlstate '*'
+	{
+		goto no_microformats;
+	};
+	cset := coalesce (get_keyword ('charset', opts), current_charset ());
+	cset := coalesce (cast(charset_canonical_name (cset) as varchar), current_charset ());
+	xt_sav := xt := xtree_doc (ret_body, 2, '', cset);
+	{
+		declare exit handler for sqlstate '*'
+		{
+			xt_xml := null;
+			goto no_xml_cont;
+		};
+		xt_xml := xtree_doc (ret_body, 0, '', cset);
+		no_xml_cont:;
+	}
+	-- this maybe is not need to be here, as it's a kind of content negotiation
+	rdf_url_arr  := xpath_eval ('//head/link[ @rel="meta" and contains (@type, "/rdf+") ]/@href', xt, 0);
+	if (not length (rdf_url_arr))
+		rdf_url_arr  := xpath_eval ('//head/link[ @rel="alternate" and contains (@type, "/rdf+") ]/@href', xt, 0);
+	if (not length (rdf_url_arr))
+		rdf_url_arr  := xpath_eval ('//head/link[ @rel="meta" ]/@href', xt, 0);
+	if (length (rdf_url_arr))
+	{
+		declare rdf_url_inx int;
+		declare ss any;
+		rdf_url_inx := 0;
+		dict := dict_new ();
+		ss := string_output ();
+		http ('@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n', ss);
+		foreach (any rdf_url in rdf_url_arr) do
+		{
+			declare ret_content_type any;
+			declare exit handler for sqlstate '*'
+			{
+				goto try_next_link;
+			};
+			rdf_url := cast (rdf_url as varchar);
+			if (dict_get (dict, rdf_url))
+				goto try_next_link;
+			http (sprintf ('<%s> rdfs:seeAlso <%s> .\n', new_origin_uri, WS.WS.EXPAND_URL (new_origin_uri, rdf_url)), ss);
+			goto try_next_link; -- we just expose seeAlso link
+			load_msec := msec_time ();
+			hdr := null;
+			content := DB.DBA.RDF_HTTP_URL_GET (rdf_url, new_origin_uri, hdr, 'GET', 'Accept: application/rdf+xml, text/rdf+n3, */*', proxy=>get_keyword_ucase ('get:proxy', opts));
+			load_msec := msec_time () - load_msec;
+			download_size := length (content);
+			ret_content_type := http_request_header (hdr, 'Content-Type', null, null);
+			ret_content_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (new_origin_uri, ret_content_type, content);
+			if (strstr (ret_content_type, 'application/rdf+xml') is not null)
+			  DB.DBA.RM_RDF_RDFXML_LOAD_DICT (content, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+			else
+			  DB.DBA.RM_RDF_TTL_LOAD_DICT (content, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+			mdta := mdta + 1;
+			dict_put (dict, rdf_url, 1);
+			rdf_url_inx := rdf_url_inx + 1;
+			ret_flag := -1;
+			try_next_link:;
+		}
+		DB.DBA.RM_RDF_TTL_LOAD_DICT (ss, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+	}
+	-- sometimes RDF is inside the xhtml
+	if (xpath_eval ('/html//rdf', xt) is not null and xt_xml is not null)
+	{
+		declare exit handler for sqlstate '*' { goto try_grddl; };
+		rdf_in_html := xpath_eval ('/html//RDF', xt_xml, 0);
+		foreach (any x in rdf_in_html) do
+		{
+			xd := serialize_to_UTF8_xml (x);
+			DB.DBA.RM_RDF_RDFXML_LOAD_DICT (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+			mdta := mdta + 1;
+		}
+	}
+	try_grddl:
+	xmlnss := xmlnss_get (xt);
+	nss := '<namespaces>';
+	for (i := 0, l := length (xmlnss); i < l; i := i + 2)
+	{
+		nss := nss || sprintf ('<namespace prefix="%s">%s</namespace>', xmlnss[i], xmlnss[i+1]);
+	}
+	nss := nss || '</namespaces>';
+	nss := xtree_doc (nss);
+	is_grddl := 0;
+	if (xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" ] /*[1]/@dv:transformation', xt) is not null)
+	{
+		if (xpath_eval ('/rdf', xt) is not null and xt_xml is not null)
+		{
+			declare exit handler for sqlstate '*'
+			{
+				goto not_rdf;
+			};
+			xd :=  DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rdf_wo_grddl.xsl', xt_xml);
+			xd := serialize_to_UTF8_xml (xd);
+			DB.DBA.RM_RDF_RDFXML_LOAD_DICT (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+			mdta := mdta + 1;
+		}
+		not_rdf:;
+		is_grddl := 1;
+		if (xt_xml is not null)
+			xt := xt_xml;
+	}
+	profs := null;
+	profs_done := vector ();
+	profile := cast (xpath_eval ('/html/head/@profile', xt) as varchar);
+	if (profile is not null)
+		profs := split_and_decode (profile, 0, '\0\0 ');
+		
+	reg := '';
+	doc_base := get_keyword ('http-redirect-to', opts, new_origin_uri);
+	DB.DBA.RDF_LOAD_GRDDL_REC (triple_dict, doc_base, graph_iri, new_origin_uri, dest, xt, mdta, reg, '', 0, opts);
+	if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1' and mdta) -- It is recognized as GRDDL, data is loaded (testing the grddl only mode)
+		goto ret;
+	try_rdfa:;
+	thisgr := coalesce (dest, graph_iri);
+	if (xt_xml is not null)
+		xt := xt_xml;
+	-- RDFa
+	if (__proc_exists (fix_identifier_case ('xtree_doc_get_dtd'), 2) is null)
+		goto no_dtd_check;
+	dtd_sysuri := xtree_doc_get_dtd (xt, 1);
+	if (dtd_sysuri = 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd' or xpath_eval ('//*[@about]|//*[@typeof]', xt) is not null or registry_get ('__rdf_cartridges_original_doc_uri__') = '1') 
+	{
+		no_dtd_check:;
+		{
+			{
+				declare exit handler for sqlstate '*';
+				DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, ret_body, new_origin_uri, thisgr, 0);
+				goto rdfa_end;
+			}
+			{
+				declare exit handler for sqlstate '*';
+				DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, ret_body, new_origin_uri, thisgr, 1);
+				goto rdfa_end;
+			}
+			{
+				declare exit handler for sqlstate '*' { goto try_grddl1; };
+				DB.DBA.RDF_LOAD_RDFA_1 (triple_dict, ret_body, new_origin_uri, thisgr, 2);
+				rdfa_end:;
+			}
+		}
+		mdta := mdta + 1;
+		--goto ret;
+	}
+	--else if (mdta)
+	--  goto ret;
+	try_grddl1:
+	-- /* GRDDL - plan A, eRDF going here */
+	foreach (any prof in profs) do
+	{
+		prof := WS.WS.EXPAND_URL (new_origin_uri, prof);
+		xslt_style := (select GM_XSLT from DB.DBA.SYS_GRDDL_MAPPING where GM_PROFILE = prof);
+		if (xslt_style is not null)
+		{
+			declare exit handler for sqlstate '*'
+			{
+				goto next_prof;
+			};
+			xd := DB.DBA.RDF_MAPPER_XSLT (xslt_style, xt, vector ('baseUri', new_origin_uri));
+			
+			if (xpath_eval ('count(/RDF/*)', xd) > 0)
+			{
+				mdta := mdta + 1;
+			}
+			xd := serialize_to_UTF8_xml (xd);
+			DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+			profs_done := vector_concat (profs_done, vector (prof));
+		}
+		next_prof:;
+	}
+	-- brute force attack, scan w/o profile
+	if (mdta < 2)
+	{
+		-- currently no profile in RDFa and some similar, so we try it to extract directly
+		for select GM_XSLT, GM_PROFILE, GM_FLAG from DB.DBA.SYS_GRDDL_MAPPING do
+		{
+			if (position (GM_PROFILE, profs_done) > 0)
+				goto try_next1;
+			declare exit handler for sqlstate '*'
+			{
+				goto try_next1;
+			};
+			xd := DB.DBA.RDF_MAPPER_XSLT (GM_XSLT, xt, vector ('baseUri', new_origin_uri, 'nss', nss));
+			if (xpath_eval ('count(/RDF/*)', xd) > 0)
+			{
+				mdta := mdta + 1;
+				xd := serialize_to_UTF8_xml (xd);
+				if (GM_FLAG = 2)
+					RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+				DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+				if (GM_FLAG > 0)
+					return mdta;
+			}
+			try_next1:;
+		}
+	}
+	-- /* feed formats */
+	if (get_feeds = 1)
+	{
+		-- try looking for feed
+		declare rss, atom any;
+		rss  := cast (xpath_eval('//head/link[ @rel="alternate" and @type="application/rss+xml" ]/@href', xt) as varchar);
+		atom := cast (xpath_eval('//head/link[ @rel="alternate" and @type="application/atom+xml" ]/@href', xt) as varchar);
+		declare exit handler for sqlstate '*'
+		{
+			goto no_feed;
+		};
+		xt := null;
+		hdr := null;
+		if (atom is not null)
+		{
+			declare exit handler for sqlstate '*'
+			{
+				goto try_rss;
+			};
+			feed_url := atom;
+			load_msec := msec_time ();
+			content := DB.DBA.RDF_HTTP_URL_GET (atom, new_origin_uri, hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
+			load_msec := msec_time () - load_msec;
+			download_size := length (content);
+			xt := xtree_doc (content);
+			goto do_detect;
+		}
+		try_rss:;
+		if (rss is not null)
+		{
+			declare exit handler for sqlstate '*'
+			{
+				goto no_microformats;
+			};
+			feed_url := rss;
+			load_msec := msec_time ();
+			content := DB.DBA.RDF_HTTP_URL_GET (rss, new_origin_uri, hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
+			load_msec := msec_time () - load_msec;
+			download_size := length (content);
+			xt := xtree_doc (content);
+		}
+		do_detect:;
+		-- the document itself is a feed
+		if (xt is null and xpath_eval ('/rdf|/rss|/feed', xt_sav) is not null)
+			xt := xt_xml;
+		if (xt is null)
+			goto no_feed;
+		else if (xpath_eval ('/RDF', xt) is not null and content is not null)
+		{
+			xd := content;
+			goto ins_rdf;
+		}
+		else if (xpath_eval ('/feed', xt) is not null)
+		{
+			xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xt);
+		}
+		else if (xpath_eval ('/rss', xt) is not null)
+		{
+			xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xt);
+		}
+		else
+			goto no_feed;
+		if (xpath_eval ('count(/RDF/*)', xd) > 0)
+		{
+			mdta := mdta + 1;
+		}
+		xd := serialize_to_UTF8_xml (xd);
+		ins_rdf:
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri), 0);
+		DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+		ret_flag := 1;
+		no_feed:;
+	}
+	-- /* generic xHTML, extraction as per our ontology */
+	xt := xt_sav;
+	if (add_html_meta = 1 and xpath_eval ('/html', xt) is not null)
+	{
+		declare numtriples integer;
+		xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/html2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'source', tgt_page));
+		numtriples:=cast(xpath_eval ('count(/RDF/*)', xd) as integer);
+		if (numtriples > 0)
+		{
+			mdta := mdta + 1;
+			xd := serialize_to_UTF8_xml (xd);
+			DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri), 1);
+		}
+		xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/htmlAllMeta2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'source', tgt_page));
+		numtriples:=cast(xpath_eval ('count(/RDF/*)', xd) as integer);
+		if (numtriples > 0)
+		{
+			mdta := mdta + 1;
+			xd := serialize_to_UTF8_xml (xd);
+			DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri), 1);
+		}
+	}
+	ret:
+	if (mdta > 0 and aq is not null)
+		aq_request (aq, 'DB.DBA.RDF_SW_PING', vector (ps, new_origin_uri));
+	-- /* decide how to return */
+	declare ord, mime any;
+	mime := get_keyword ('content-type', opts);
+	ord := (select RM_ID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTML_RESPONSE');
+	for select RM_PATTERN, RM_TYPE, RM_HOOK from DB.DBA.SYS_RDF_MAPPERS where RM_ID > ord and RM_TYPE in ('URL', 'MIME') and RM_ENABLED = 1 order by RM_ID do
+	{
+		if (RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) is not null)
+			mdta := 0;
+		else if (RM_TYPE = 'MIME' and mime is not null and RM_HOOK <> 'DB.DBA.RDF_LOAD_DAV_META' and regexp_match (RM_PATTERN, mime) is not null)
+			mdta := 0;
+	}
+	mdta := mdta * ret_flag;
+	-- needs a flag
+	if (0 and mdta <> 0)
+	{
+		declare localdest, dep any;
+		localdest := coalesce (dest, graph_iri);
+		dep := (sparql define input:storage ""
+		select (sql:VECTOR_AGG (?o))
+		where { graph `iri(?:localdest)` {
+		`iri(?:localdest)` <http://www.w3.org/2000/01/rdf-schema#seeAlso> ?o .
+		filter (isIRI (?o)) } } );
+		if (length (dep) > 0)
+		{
+			return vector ('seeAlso', dep);
+		}
+	}
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+	return mdta;
+	no_microformats:;
+	DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
+	return 0;
+}
+;
+
+
+create procedure DB.DBA.RDF_LOAD_FEED_RESPONSE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare content, xd, xt, ret_flag, mdta any;
+  content := ret_body;
+  declare exit handler for sqlstate '*'
+    {
+      goto no_xml;
+    };
+  mdta := 0;
+  xt := xtree_doc (content);
+
+  if (xpath_eval ('/RDF', xt) is not null and content is not null)
+    {
+      xd := content;
+      mdta := 1;
+      goto ins_rdf;
+    }
+  else if (xpath_eval ('/feed', xt) is not null)
+    {
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xt);
+    }
+  else if (xpath_eval ('/rss', xt) is not null)
+    {
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xt);
+    }
+  else if (xpath_eval ('/entry', xt) is not null)
+    {
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google2rdf.xsl', xt);
+      if (xpath_eval ('count(/RDF/*)', xd) > 0)
+	mdta := 1;
+      xd := serialize_to_UTF8_xml (xd);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      goto no_feed;
+    }
+    else if (xpath_eval ('/service', xt) is not null)
+    {
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/odata2rdf.xsl', xt, vector ('baseUri', new_origin_uri));
+      if (xpath_eval ('count(/RDF/*)', xd) > 0)
+	mdta := 1;
+      xd := serialize_to_UTF8_xml (xd);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      goto no_feed;
+    }
+  else
+    goto no_feed;
+
+  if (xpath_eval ('count(/RDF/*)', xd) > 0)
+    {
+      mdta := 1;
+    }
+  xd := serialize_to_UTF8_xml (xd);
+ins_rdf:
+  mdta := DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+no_feed:
+
+  declare ord, mime any;
+  mime := get_keyword ('content-type', opts);
+  ord := (select RM_ID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = current_proc_name ());
+  for select RM_PATTERN, RM_TYPE, RM_HOOK from DB.DBA.SYS_RDF_MAPPERS
+    where RM_ID > ord and RM_TYPE in ('URL', 'MIME') and RM_ENABLED = 1 order by RM_ID do
+    {
+      if (RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) is not null)
+        mdta := 0;
+      else if (RM_TYPE = 'MIME' and mime is not null and RM_HOOK <> 'DB.DBA.RDF_LOAD_DAV_META' and regexp_match (RM_PATTERN, mime) is not null)
+        mdta := 0;
+    }
+  return mdta;
+no_xml:;
+  return 0;
+}
+;
+
+-- /* convert the feed in rss 1.0 format to sioc */
+create procedure DB.DBA.RDF_LOAD_FEED_SIOC (in content any, in iri varchar, in graph_iri varchar, inout triple_dict any, in is_disc int := '')
+{
+  declare xt, xd any;
+  declare exit handler for sqlstate '*'
+    {
+      goto no_sioc;
+    };
+  xt := xtree_doc (content);
+  xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/feed2sioc.xsl', xt, vector ('baseUri', graph_iri, 'isDiscussion', is_disc));
+  xd := serialize_to_UTF8_xml (xd);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, iri, graph_iri, 0);
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), iri, graph_iri, null);
+  return 1;
+  no_sioc:
+  return 0;
+}
+;
+
+registry_set ('__sparql_sponge_use_w3c_xslt', 'on')
+;
+
+
+create procedure DB.DBA.SYS_URN_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+  if (lower (local_iri) like 'urn:lsid:%')
+    {
+      options := vector_concat (vector ('get:uri', 'http://lsid.tdwg.org/'||get_uri), options);
+      return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
+      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
+    }
+  else
+    {
+      signal ('RDFZZ', 'This version of Virtuoso Sponger do not support "urn" IRI scheme');
+    }
+}
+;
+
+-- mailto and acct protocol-scheme support (for WebFinger lookups)
+create procedure DB.DBA.SYS_ACCT_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+	declare aq, ps, _key, opts any;
+	declare xrd any;
+	xrd:=ODS..WF_USER_XRD_GET(get_uri);
+
+  DB.DBA.RDF_LOAD_XRD_GENERIC(get_uri, local_iri, get_uri, serialize_to_UTF8_xml(xrd), aq, ps, _key, opts );
+
+	return local_iri;
+}
+;
+
+create procedure DB.DBA.SYS_MAILTO_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+	declare aq, ps, _key, opts any;
+	declare xrd any;
+	xrd:=ODS..WF_USER_XRD_GET(get_uri);
+
+  DB.DBA.RDF_LOAD_XRD_GENERIC(get_uri, local_iri, get_uri, serialize_to_UTF8_xml(xrd), aq, ps, _key, opts );
+
+	return local_iri;
+}
+;
+
+create procedure DB.DBA.SYS_DOI_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+  if (lower (local_iri) like 'doi:%')
     {
-      tf1 := xpath_eval ('/html/head/link[@rel="transformation"]/@href', xt, 0);
-      tf2 := xpath_eval ('//a[contains(concat(" ", at rel," "), " transformation ")]/@href', xt, 0);
+      declare new_get_uri varchar;
+      if (__proc_exists ('HS_Resolve', 2) is not null)
+	{
+	  new_get_uri := HS_Resolve (substring (get_uri, 5, length (get_uri)));
+	}
+      else
+	{
+	  declare hdr any;
+	  http_get ('http://dx.doi.org/' || substring (get_uri, 5, length (get_uri)), hdr);
+	  new_get_uri := http_request_header (hdr, 'Location');
+	}
+
+      if (not isstring (new_get_uri))
+        signal ('RDFZZ', 'Cannot resolve IRI='||get_uri);
+      options := vector_concat (vector ('get:uri', new_get_uri), options);
+      return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
+      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
     }
-  -- /* xml doc */
-  tf3 := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" ] /*[1]/@dv:transformation', xt, 0);
+  else
+    {
+      signal ('RDFZZ', 'This version of Virtuoso Sponger do not support "doi" IRI scheme');
+    }
+}
+;
+
+create procedure DB.DBA.SYS_FEED_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+  declare url varchar;
+  url := 'http:' || subseq (get_uri, 5);
+  options := vector_concat (vector ('get:uri', url), options);
+  return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
+      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
+}
+;
+
+create procedure DB.DBA.SYS_WEBCAL_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+  declare url varchar;
+  url := 'http:' || subseq (get_uri, 7);
+  options := vector_concat (vector ('get:uri', url), options);
+  return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
+      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_YAHOO_STOCK_DATA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare meta, tmp, content varchar;
+  declare symbol varchar;
+  declare arr any;
+
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
+  arr := sprintf_inverse (new_origin_uri, 'http://finance.yahoo.com/q?s=%s', 0);
+  symbol := arr[0];
+
+  rdfm_yq_get_quote (symbol, new_origin_uri, dest, graph_iri, opts, triple_dict);
+  rdfm_yq_get_history (symbol, new_origin_uri, dest, graph_iri, opts, triple_dict);
+  rdfm_yq_get_feed (symbol, new_origin_uri, dest, graph_iri, opts, triple_dict);
+  rdfm_yq_get_events (symbol, new_origin_uri, dest, graph_iri, opts, triple_dict);
+  rdfm_yq_get_mb (symbol, new_origin_uri, dest, graph_iri, opts, triple_dict);
+  rdfm_yq_get_competitors (symbol, new_origin_uri, dest, graph_iri, opts, triple_dict);
+  return 1;
+}
+;
+
+
+create procedure rdfm_yq_get_quote (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
+{
+  declare arr, cnt, ses, content, url any;
+  declare xt, xd any;
+
+  ses := string_output ();
+  url := sprintf ('http://download.finance.yahoo.com/d/quotes.csv?s=%U&f=nsbavophg&e=.csv', symbol);
+  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+  arr := rdfm_yq_parse_csv (cnt);
+  http ('<quote stock="NASDAQ">', ses);
+  foreach (any q in arr) do
+    {
+      http_value (q[0], 'company', ses);
+      http_value (q[1], 'symbol', ses);
+      http_value (q[2], 'bid', ses);
+      http_value (q[3], 'ask', ses);
+      http_value (q[4], 'volume', ses);
+      http_value (q[5], 'open', ses);
+      http_value (q[6], 'prev.close', ses);
+      http_value (q[7], 'high', ses);
+      http_value (q[8], 'low', ses);
+    }
+  http ('</quote>', ses);
+  content := string_output_string (ses);
+  xt := xtree_doc (content);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yahoo_stock2rdf.xsl', xt,
+      vector ('baseUri', 'http://finance.yahoo.com/q?s='||symbol));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return;
+}
+;
+
+create procedure rdfm_yq_get_history (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
+{
+  declare arr, cnt, ses, content, url any;
+  declare xt, xd any;
+
+  ses := string_output ();
+  url := sprintf ('http://ichart.finance.yahoo.com/table.csv?s=%U&d=10&e=13&f=2007&g=d&a=8&b=7&c=2007&ignore=.csv', symbol);
+  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
+  arr := rdfm_yq_parse_csv (cnt);
+  http (sprintf ('<history stock="NASDAQ" symbol="%V">', symbol), ses);
+  foreach (any q in arr) do
+    {
+      if (q[0] <> 'Date')
+    {
+      http ('<hist-price>', ses);
+      http_value (q[0], 'date', ses);
+      http_value (q[1], 'open', ses);
+      http_value (q[2], 'high', ses);
+      http_value (q[3], 'low', ses);
+      http_value (q[4], 'close', ses);
+      http_value (q[5], 'volume', ses);
+      http_value (q[6], 'adjclose', ses);
+      http ('</hist-price>', ses);
+    }
+    }
+  http ('</history>', ses);
+  content := string_output_string (ses);
+  xt := xtree_doc (content);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yahoo_stock2rdf.xsl', xt, vector ('baseUri', 'http://finance.yahoo.com/q/hp?s='||symbol));
+  xd := serialize_to_UTF8_xml (xt);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return;
+}
+;
+
+create procedure rdfm_yq_date_cvt (in d varchar)
+{
+  declare arr any;
+  declare dt any;
+  declare exit handler for sqlstate '*'
+    {
+      return null;
+    };
+  arr := sprintf_inverse (trim (cast (d as varchar)), '%d-%s-%d', 0);
+  if (length(arr) < 3)
+    return null;
+  dt := http_string_date (sprintf ('Mon, %02d %s 20%02d 00:00:00 GMT', arr[0], arr[1], arr[2]));
+  dt := dt_set_tz (dt, 0);
+  return date_iso8601 (dt);
+}
+;
+
+create procedure rdfm_yq_get_competitors (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
+{
+  declare content, iri any;
+  declare xt, xd, xp, ses any;
+  content := http_client (sprintf ('http://finance.yahoo.com/q/co?s=%U', symbol), proxy=>get_keyword_ucase ('get:proxy', opts));
+  --content := file_to_string ('temp/xx');
+  xt := xtree_doc (content, 2);
+  xp := xpath_eval ('//table[tr/td/small/b[ contains (., "DIRECT COMPETITOR COMPARISON")]]/following-sibling::table[2]/tr[1]/td/table/tr[1]//a/text()', xt, 0);
+  ses := string_output ();
+  foreach (any x in xp) do
+    {
+      x := cast (x as varchar);
+      if (x <> symbol and x <> 'Industry')
+	{
+	  http (sprintf ('<http://dbpedia.org/resource/%s> <http://xbrlontology.com/ontology/finance/stock_market#hasCompetitor> <http://dbpedia.org/resource/%s> .\n', symbol, x), ses);
+	  http (sprintf ('<http://dbpedia.org/resource/%s> <http://www.openlinksw.com/schema/attribution#isDescribedUsing> <http://finance.yahoo.com/q?s=%s> .\n', x, x), ses);
+	}
+    }
+  content := string_output_string (ses);
+  DB.DBA.RM_RDF_TTL_LOAD_DICT (content, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+  return;
+}
+;
+
+create procedure rdfm_yq_get_events (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
+{
+  declare content, iri any;
+  declare xt, xd, xp, ses any;
+  iri := sprintf ('http://finance.yahoo.com/q/ce?s=%U', symbol);
+  content := http_client (sprintf ('http://finance.yahoo.com/q/ce?s=%U', symbol), proxy=>get_keyword_ucase ('get:proxy', opts));
+  xt := xtree_doc (content, 2);
+  xp := xpath_eval ('//table[tr/td[@class="yfnc_tablehead1" and normalize-space (.) = "Event"]]/tr', xt, 0);
+  ses := string_output ();
+  http ('<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:c="http://www.w3.org/2002/12/cal/icaltzd#">\n', ses);
+  http (sprintf ('<c:Vcalendar r:about="http://finance.yahoo.com/q/ce?s=%V#this">\n', symbol), ses);
+  http ('<c:prodid>-//connolly.w3.org//palmagent 0.6 (BETA)//EN</c:prodid>\n', ses);
+  http ('<c:version>2.0</c:version>\n', ses);
+  foreach (any x in xp) do
+    {
+      declare _time, _desc, _uri varchar;
+      _time := xpath_eval ('string(td[1])', x);
+      _desc := xpath_eval ('string(td[2])', x);
+      _uri :=  xpath_eval ('td[2]/a/@href', x);
+      if (length (_time) and length (_desc))
+    {
+      _time := rdfm_yq_date_cvt (_time);
+      if (length (_time))
+        {
+          http ('<c:component>\n', ses);
+          http ('<c:Vevent>\n', ses);
+          http (sprintf ('<c:description>%V</c:description>\n', _desc), ses);
+          http (sprintf ('<c:dtstart r:datatype="http://www.w3.org/2001/XMLSchema#dateTime">%V</c:dtstart>\n', _time), ses);
+          if (_uri is not null)
+        http (sprintf ('<c:url r:resource="%V"/>\n', _uri), ses);
+          http ('</c:Vevent>\n', ses);
+          http ('</c:component>\n', ses);
+        }
+    }
+    }
+  http ('</c:Vcalendar>\n', ses);
+  http ('</r:RDF>\n', ses);
+  content := string_output_string (ses);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, content, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), iri);
+  return;
+}
+;
+
+create procedure rdfm_yq_get_mb (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
+{
+  declare content, hdr any;
+  declare xt, xp any;
+  content := http_client ('http://messages.finance.yahoo.com/mb/'||symbol, proxy=>get_keyword_ucase ('get:proxy', opts));
+  xt := xtree_doc (content, 2);
+  xp := cast(xpath_eval ('//a[normalize-space(.) = "RSS"]/@href', xt) as varchar);
+  if (length (xp))
+    {
+      content := DB.DBA.RDF_HTTP_URL_GET (xp, '', hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+      rdfm_yq_load_feed (content, new_origin_uri, dest, graph_iri);
+    }
+}
+;
+
+create procedure rdfm_yq_load_feed (inout content any, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout triple_dict any)
+{
+  declare xt, xd any;
+  xt := xtree_doc (content);
+  if (xpath_eval ('/RDF', xt) is not null and content is not null)
+    {
+      xd := content;
+      goto ins_rdf;
+    }
+  else if (xpath_eval ('/feed', xt) is not null)
+    {
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xt);
+    }
+  else if (xpath_eval ('/rss', xt) is not null)
+    {
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xt);
+    }
+  else
+    goto no_feed;
+  xd := serialize_to_UTF8_xml (xd);
+  ins_rdf:
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri), triple_dict);
+  no_feed:
+  return;
+}
+;
 
-  -- take NS transform
-  if (length (ns_url) and strstr (visited, ' ' || ns_url || ' ') is null)
-    {
-      declare uarr, stat, msg, dta, meta any;
-      declare cnt, tmp_url, tmp_xt, tmp_prof, tmp_profs any;
+create procedure rdfm_yq_get_feed (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any, in triple_dict any := null)
+{
+  declare content, hdr any;
+  content := DB.DBA.RDF_HTTP_URL_GET (sprintf ('http://us.rd.yahoo.com/finance/news/rss/add/*http://finance.yahoo.com/rss/SeekingAlpha?s=%U', symbol), '', hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+  rdfm_yq_load_feed (content, new_origin_uri, dest, graph_iri, triple_dict);
+  return;
+}
+;
 
-      tmp_xt := null;
-      visited := visited || ' ' || ns_url || ' ';
-      uarr := WS.WS.PARSE_URI (ns_url);
-      uarr[5] := '';
-      ns_url := vspx_uri_compose (uarr);
 
-      declare exit handler for sqlstate '*' {
-         goto no_ns_doc;
-      };
+create procedure rdfm_yq_parse_csv (in str varchar)
+{
+  declare ses any;
+  declare ret, line, v any;
 
-      hdr := null;
-      tmp_xt := null;
-      if (0)
-	log_message (sprintf ('NS get %s', ns_url));
-      cnt := DB.DBA.RDF_HTTP_URL_GET (ns_url, base_url, hdr, 'GET', 'Accept: application/rdf+xml, application/xml, */*', proxy=>get_keyword_ucase ('get:proxy', opts));
-      tmp_xt := xtree_doc (cnt, 0);
+  ses := string_output ();
+  http (str, ses);
+  ret := vector ();
+  while (1)
+    {
+      line := ses_read_line (ses, 0, 0, 1);
+      if (not isstring (line))
+    goto finish;
+      line := replace (line, '\r', '\n');
+      line := replace (line, '\n\n', '\n');
+      v := rdfm_yq_parse_csv_line (line);
+      ret := vector_concat (ret, vector (v));
+    }
+  finish:
+  return ret;
+}
+;
 
-      ns_doc := vector (vector (ns_url, tmp_xt));
+create procedure rdfm_yq_parse_csv_line (inout line varchar)
+{
+  declare res any;
+  declare len, i, stat, prev int;
+  declare tmp varchar;
 
-      ns_trf := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
-      ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
-      '//dv:namespaceTransformation/@rdf:resource', tmp_xt, 0);
-      ns_trf := DB.DBA.RDF_MAPPER_EXPN_URLS (ns_trf, ns_url);
-      no_ns_doc:;
+  res := vector ();
+  len := length (line);
+  stat := 0;
+  tmp := '';
+  prev := 0;
+  for (i := 0; i < len; i := i + 1)
+    {
+      if (stat = 0 and (line[i] = ascii (',') or line[i] = ascii ('\n')))
+    {
+      res := vector_concat (res, vector (tmp));
+      tmp := '';
     }
-
-  -- take PF transform
-  foreach (any prof in profs) do
+      else if (line[i] = ascii ('"'))
     {
-      declare prof_base any;
-      if (length (prof) = 0)
-        goto next_prof_1;
-      prof_base := null;
-      prof := WS.WS.EXPAND_URL (base_url, prof);
-      declare cnt, tmp_url, tmp_xt, tmp_prof, tmp_profs any;
-      declare exit handler for sqlstate '*' {
-    goto next_prof_1;
-      };
-      hdr := null;
-      tmp_xt := null;
-      if (strstr (prof, 'http://www.w3.org/2003/g/data-view') is not null)
-        goto next_prof_1;
-      if (0)
-        log_message (sprintf ('PF get %s', prof));
-      cnt := DB.DBA.RDF_HTTP_URL_GET (prof, base_url, hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
-      tmp_xt := xtree_doc (cnt, 0);
-
-      pf_docs := vector_concat (pf_docs, vector (vector (prof, tmp_xt)));
-
-      prof_base := cast (xpath_eval ('/html/head/base/@href', tmp_xt) as varchar);
-      if (length (prof_base) = 0)
+      if (stat = 1)
         {
-      prof_base := cast (xpath_eval ('/*[1]/@xml:base', tmp_xt) as varchar);
+          stat := 0;
+        }
+      else if (stat = 0)
+        {
+          if (prev = line[i])
+            tmp := tmp || chr (line[i]);
+              stat := 1;
+        }
     }
-      if (length (prof_base) = 0)
-        prof_base := prof;
-
-      tmp_prof := xpath_eval (
-      '//*[contains (concat (" ", @rel, " "), " profileTransformation ")]/@href', tmp_xt, 0);
-      --  get here profileTransformation and push into a profile_trf
-      tmp_prof := DB.DBA.RDF_MAPPER_EXPN_URLS (tmp_prof, prof_base);
-      profile_trf := vector_concat (profile_trf, tmp_prof);
-
-      tmp_prof := xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" '||
-    ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ] '||
-    '//dv:profileTransformation/@rdf:resource', tmp_xt, 0);
-      tmp_prof := DB.DBA.RDF_MAPPER_EXPN_URLS (tmp_prof, prof_base);
-      profile_trf := vector_concat (profile_trf, tmp_prof);
-      next_prof_1:;
+      else if (stat)
+    tmp := tmp || chr (line[i]);
+      else if (stat = 1 and line[i] = ascii (' '))
+        tmp := tmp || ' ';
+      else if (stat = 0 and line[i] <> ascii (' '))
+        tmp := tmp || chr (line[i]);
+      prev := line[i];
     }
+  return res;
+}
+;
 
-  all_xslt := vector_concat (tf1, tf2, tf3, profile_trf, ns_trf);
 
-  -- if no xslt, traverse the NF & PF docs above
-  if (length (all_xslt) = 0)
+create procedure RDFM_IDENT_RESOLVE_INIT ()
+{
+  declare cnt, hdr, url, xt, xp, sch, delim any;
+  for select OS_ID as _id, OS_SERVER as _server from DB.DBA.OAI_SERVERS do
     {
-      declare ret any;
-      foreach (any pf_item in pf_docs) do
-        {
-      ret := DB.DBA.RDF_LOAD_GRDDL_REC (base_url, graph_iri, pf_item[0], dest, pf_item[1], mdta, visited, 'pf', lev, opts);
-      all_xslt := vector_concat (all_xslt, ret);
+      xp := sch := delim := '';
+      declare exit handler for sqlstate '*'
+    {
+      update DB.DBA.OAI_SERVERS set OS_ENABLED = 0 where OS_ID = _id;
+      goto try_next;
+    };
+      url := _server || '?verb=Identify';
+      commit work;
+      cnt := DB.DBA.RDF_HTTP_URL_GET (url, _server, hdr); -- this is for initing , no opts here
+      xt := xtree_doc (cnt);
+      xp := xpath_eval ('string (/OAI-PMH/Identify/description/oai-identifier/repositoryIdentifier)', xt);
+      sch := xpath_eval ('string (/OAI-PMH/Identify/description/oai-identifier/scheme)', xt);
+      delim := xpath_eval ('string (/OAI-PMH/Identify/description/oai-identifier/delimiter)', xt);
+      if (length (xp))
+        update DB.DBA.OAI_SERVERS set OS_URN_PATTERN = sch||delim||xp, OS_ENABLED = 1 where OS_ID = _id;
+      else
+    update DB.DBA.OAI_SERVERS set OS_ENABLED = 0 where OS_ID = _id;
+      try_next:;
     }
-      foreach (any ns_item in ns_doc) do
-        {
-      ret := DB.DBA.RDF_LOAD_GRDDL_REC (base_url, graph_iri, ns_item[0], dest, ns_item[1], mdta, visited, 'ns', lev, opts);
-      all_xslt := vector_concat (all_xslt, ret);
+}
+;
+
+create procedure DB.DBA.SYS_OAI_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+{
+  declare url, hdr, xt, xd, cnt any;
+  declare new_origin_uri, dest, graph_iri varchar;
+  declare triple_dict any;
+  triple_dict := null; -- XXX:
+  new_origin_uri := cast (get_keyword_ucase ('get:uri', options, get_uri) as varchar);
+  graph_iri := get_uri;
+  dest := get_keyword_ucase ('get:destination', options);
+  for select OS_SERVER as _server from DB.DBA.OAI_SERVERS where get_uri like OS_URN_PATTERN || ':%' and OS_ENABLED = 1 do
+    {
+      declare exit handler for sqlstate '*'
+    {
+      return local_iri;
+    };
+      url := sprintf ('%s?verb=GetRecord&identifier=%s&metadataPrefix=oai_dc', _server, get_uri);
+      cnt := DB.DBA.RDF_HTTP_URL_GET (url, _server, hdr, proxy=>get_keyword_ucase ('get:proxy', options));
+      xt := xtree_doc (cnt);
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/oai2rdf.xsl', xt, vector ('baseUri', get_uri));
+      xd := serialize_to_UTF8_xml (xd);
+      if (dest is null)
+	RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, options);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
     }
+  return local_iri;
+}
+;
+
+create procedure DB.DBA.LOAD_RDF_MAPPER_XBRL_ONTOLOGIES()
+{
+  if (registry_get ('RDF_MAPPER_XBRL_ONTOLOGIES') = '1')
+    return;
+  for select RES_CONTENT from WS.WS.SYS_DAV_RES where RES_FULL_PATH like '/DAV/VAD/rdf_mappers/ontologies/xbrl/%.owl.gz' do
+    {
+      declare str_out any;
+      str_out := gzip_uncompress (cast (RES_CONTENT as varchar));
+      DB.DBA.RDF_LOAD_RDFXML (str_out, 'http://www.openlinksw.com/schemas/xbrl/', 'http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/');
     }
+  registry_set ('RDF_MAPPER_XBRL_ONTOLOGIES','1');
+}
+;
 
-  -- if any apply xslt
-  foreach (any _xslt in all_xslt) do
+RDF_GRAPH_GROUP_CREATE ('http://www.openlinksw.com/schemas/virtrdf#schemas', 1);
+
+--registry_remove ('RM_LOAD_ONTOLOGIES');
+
+create procedure DB.DBA.RM_LOAD_ONTOLOGIES ()
+{
+  if (registry_get ('RM_LOAD_ONTOLOGIES') = '2')
+    return;
+  for select RES_CONTENT, RES_NAME from WS.WS.SYS_DAV_RES where RES_FULL_PATH like '/DAV/VAD/rdf_mappers/ontologies/owl/%.owl.gz' do
     {
-      declare ret, split any;
-      split := split_and_decode (cast (_xslt as varchar),0, '\0\0 ');
-      foreach (any xslt in split) do
-        {
-	  if (0)
-	   log_message (sprintf ('TRANSFORM=[%s] XSLT=[%s]', new_origin_uri, xslt));
-	  ret := DB.DBA.RDF_DO_XSLT_AND_LOAD (graph_iri, new_origin_uri, dest, xt, mdta, xslt, what, base_url, opts);
-	  ret_arr := vector_concat (ret_arr, ret);
-        }
+      declare str_out, xt, owl_iri, base_iri, graph_iri any;
+
+      str_out := gzip_uncompress (cast (RES_CONTENT as varchar));
+      xt := xtree_doc (str_out);
+      owl_iri := cast (xpath_eval ('/RDF/Ontology/@about', xt) as varchar);
+      if (owl_iri is null)
+	owl_iri := cast (xpath_eval ('/RDF/Description[type[@resource = "http://www.w3.org/2002/07/owl#Ontology"]]/@about', xt) as varchar);
+      base_iri := cast (xpath_eval ('/RDF/@xml:base', xt) as varchar);
+      if (length (owl_iri))
+	graph_iri := owl_iri;
+      else if (length (base_iri))
+	graph_iri := base_iri;
+      else
+	{
+	  log_message ('Can not load: ' || RES_NAME);
+          goto skip_owl;
+	}
+      if (length (base_iri) = 0)
+        base_iri := graph_iri;
+
+      DB.DBA.RDF_LOAD_RDFXML (str_out, base_iri, graph_iri);
+      RDF_GRAPH_GROUP_INS ('http://www.openlinksw.com/schemas/virtrdf#schemas', graph_iri);
+      skip_owl:;
     }
-  return ret_arr;
-};
+  registry_set ('RM_LOAD_ONTOLOGIES','2');
+}
+;
+
+
+DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('xbrl_rule1', 1, '/schemas/xbrl/(.*)', vector('path'), 1,
+'/sparql?query=DESCRIBE%%20%%3Chttp%%3A//www.openlinksw.com/schemas/xbrl/%U%%3E%%20FROM%%20%%3Chttp%%3A//www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/%%3E',
+vector('path'), null, '(text/rdf.n3)|(application/rdf.xml)', 0, null);
+
+DB.DBA.URLREWRITE_CREATE_RULELIST ('xbrl_rule_list1', 1, vector('xbrl_rule1'));
+
+DB.DBA.VHOST_REMOVE (lpath=>'/schemas/xbrl');
 
---
--- /* RDFA comaptibility wrapper */
---
-create procedure DB.DBA.RDF_LOAD_RDFA_1 (inout ret_body any, inout new_origin_uri varchar, inout thisgr varchar, in flag int)
+DB.DBA.VHOST_DEFINE (lpath=>'/schemas/xbrl', ppath=>'/DAV/VAD/rdf_mappers/ontologies/xbrl/msft2007.owl', vsp_user=>'dba', is_dav=>1, is_brws=>0, opts=>vector ('url_rewrite', 'xbrl_rule_list1'));
+-- dbpedia_extract.php
+
+CREATE PROCEDURE RDFMAP_DBPEDIA_EXTRACT_PHP (in base varchar, in title varchar)
 {
-  if (__proc_exists ('DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION') is not null)
-    DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION (ret_body, new_origin_uri, thisgr, flag, 'DB.DBA.RM_XLAT_CONCAT', null);
-  else
-    DB.DBA.RDF_LOAD_RDFA (ret_body, new_origin_uri, thisgr, flag);
+  declare ses any;
+  ses := string_output ();
+  http ('<?php\n', ses);
+  http (sprintf ('\x24basePath = "%s";\n', base), ses);
+  http (sprintf ('\x24pageTitlesEn[] = "%s";\n', title), ses);
+  http ('\n', ses);
+  http ('set_include_path (\x24basePath.\':\'.\x24basePath.\'/extractors:\'.\x24basePath.\'/destinations\');\n', ses);
+  http ('require_once \'dbpedia.php\';\n', ses);
+  http ('\n', ses);
+  http ('\x24manager = new ExtractionManager();\n', ses);
+  http ('\x24jobEnWiki = new ExtractionJob (new LiveWikipediaCollection("en"), new ArrayObject(\x24pageTitlesEn));\n', ses);
+  http ('\n', ses);
+  http ('\x24group = new ExtractionGroup(new SimpleDumpDestination());\n', ses);
+  http ('\x24group->addExtractor(new LabelExtractor());\n', ses);
+  http ('\x24group->addExtractor(new ArticleCategoriesExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new PageLinksExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new WikipageExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new ActiveAbstractExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new PersondataExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new ChemboxExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new GeoExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new DisambiguationExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new CharacterCountExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new RedirectExtractor ());\n', ses);
+  http ('\x24group->addExtractor(new HomepageExtractor ());\n', ses);
+  http ('\x24jobEnWiki->addExtractionGroup(\x24group);\n', ses);
+  http ('\n', ses);
+  http ('\x24manager->execute(\x24jobEnWiki);\n', ses);
+  http ('?>\n', ses);
+  return string_output_string (ses);
 }
 ;
 
+--no_c_escapes-
+-- Cartridge for sponging Powerpoint PPTX files.
 
---
--- /* GRDDL filters, if signature changed web robot needs to be updated too */
---
-create procedure DB.DBA.RDF_LOAD_HTML_RESPONSE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
-{
-  -- check to microformats
-  declare xt_sav, xt, xd, profile, mdta, xslt_style, profs, profs_done, feed_url, xt_xml any;
-  declare xmlnss, i, l, nss, rdf_url_arr, content, hdr, rdf_in_html, old_etag, old_last_modified any;
-  declare ret_flag, is_grddl, download_size, load_msec int;
-  declare get_feeds, add_html_meta, grddl_loop int;
-  declare base_url, ns_url, reg, doc_base, proxy_iri, cset, dtd_sysuri, tgt_page, posh  varchar;
-  declare profile_trf, ns_trf, ext_profs, thisgr, cnt any;
-  declare dict any;
-
-  get_feeds := add_html_meta := 0;
-  if (isarray (opts) and 0 = mod (length(opts), 2))
-    {
-      if (get_keyword ('get-feeds', opts) = 'yes')
-        get_feeds := 1;
-      if (get_keyword ('add-html-meta', opts) = 'yes')
-        add_html_meta := 1;
-    }
-  tgt_page := get_keyword ('get:uri', opts, new_origin_uri);
-  set_user_id ('dba');
-  mdta := 0;
-  ret_flag := 1;
-  hdr := null;
-  xt_xml := null;
-  profile_trf := vector ();
-  ns_trf := vector ();
-  ext_profs := vector ();
-  grddl_loop := 0;
-  if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1')
-    proxy_iri := new_origin_uri;
-  else
-    proxy_iri := DB.DBA.RDF_SPONGE_PROXY_IRI (new_origin_uri);
+create procedure DB.DBA.RDF_LOAD_PPTX_DOCUMENT (
+in graph_iri varchar, in new_origin_uri varchar, in dest varchar,
+inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, inout triple_dict any
+)
+{
+  declare urihost, baseUri, original_dest varchar;
+  declare core_meta, app_meta, slides_meta varchar;
+  declare slide_list, slide_vec, slide_content, slide_path any;
+  declare meta_xml, tmpFile, fileName, fileExt varchar;
+  declare xt, xd any;
+  declare extracted_image_collection_dav_root, extracted_image_collection_dav_path varchar;
+  declare dav_uid, dav_pwd varchar;
 
   declare exit handler for sqlstate '*'
-    {
-      goto no_microformats;
-    };
-  cset := coalesce (get_keyword ('charset', opts), current_charset ());
-  cset := coalesce (cast(charset_canonical_name (cset) as varchar), current_charset ());
-  xt_sav := xt := xtree_doc (ret_body, 2, '', cset);
   {
-    declare exit handler for sqlstate '*' {
-    xt_xml := null; goto no_xml_cont; };
-    xt_xml := xtree_doc (ret_body, 0, '', cset);
-    no_xml_cont:;
-  }
-
-  -- this maybe is not need to be here, as it's a kind of content negotiation
-  rdf_url_arr  := xpath_eval ('//head/link[ @rel="meta" and contains (@type, "/rdf+") ]/@href', xt, 0);
-  if (not length (rdf_url_arr))
-    rdf_url_arr  := xpath_eval ('//head/link[ @rel="alternate" and contains (@type, "/rdf+") ]/@href', xt, 0);
-  if (not length (rdf_url_arr))
-    rdf_url_arr  := xpath_eval ('//head/link[ @rel="meta" ]/@href', xt, 0);
-
-  if (length (rdf_url_arr))
-    {
-      declare rdf_url_inx int;
-      declare ss any;
-      rdf_url_inx := 0;
-      dict := dict_new ();
-      ss := string_output ();
-      http ('@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n', ss);
-      foreach (any rdf_url in rdf_url_arr) do
-	{
-	  declare ret_content_type any;
-	  declare exit handler for sqlstate '*' { goto try_next_link; };
-	  rdf_url := cast (rdf_url as varchar);
-	  --if (RDF_MAPPER_CACHE_CHECK (rdf_url, new_origin_uri, old_etag, old_last_modified))
-	  --  goto try_next_link;
-	  if (dict_get (dict, rdf_url))
-	    goto try_next_link;
-
-	  http (sprintf ('<%s> rdfs:seeAlso <%s> .\n', new_origin_uri, WS.WS.EXPAND_URL (new_origin_uri, rdf_url)), ss);
-	  goto try_next_link; -- we just expose seeAlso link
-
-	  load_msec := msec_time ();
-	  hdr := null;
-	  content := DB.DBA.RDF_HTTP_URL_GET (rdf_url, new_origin_uri, hdr, 'GET', 'Accept: application/rdf+xml, text/rdf+n3, */*', proxy=>get_keyword_ucase ('get:proxy', opts));
-	  load_msec := msec_time () - load_msec;
-	  download_size := length (content);
-	  ret_content_type := http_request_header (hdr, 'Content-Type', null, null);
-	  ret_content_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (new_origin_uri, ret_content_type, content);
-	  if (strstr (ret_content_type, 'application/rdf+xml') is not null)
-	     DB.DBA.RM_RDF_LOAD_RDFXML (content, new_origin_uri, coalesce (dest, graph_iri), 0);
-	  else
-	     DB.DBA.TTLP (content, new_origin_uri, coalesce (dest, graph_iri));
-	  mdta := mdta + 1;
-  
-	  --RDF_MAPPER_CACHE_REGISTER (rdf_url, new_origin_uri, hdr, old_last_modified, download_size, load_msec);
-	  dict_put (dict, rdf_url, 1);
-	  rdf_url_inx := rdf_url_inx + 1;
-	  ret_flag := -1;
-	  try_next_link:;
-	}
-	DB.DBA.TTLP (ss, new_origin_uri, coalesce (dest, graph_iri));
-    }
+    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+    return 0;
+  };
+  if (__proc_exists ('unzip_file', 2) is null)
+    return 0;
 
-  -- sometimes RDF is inside the xhtml
-  if (xpath_eval ('/html//rdf', xt) is not null and xt_xml is not null)
-    {
-      declare exit handler for sqlstate '*' { goto try_grddl; };
-      rdf_in_html := xpath_eval ('/html//RDF', xt_xml, 0);
-      foreach (any x in rdf_in_html) do
-    {
-        xd := serialize_to_UTF8_xml (x);
-        DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri), 0);
-      mdta := mdta + 1;
-    }
-    }
+  dav_uid := 'dav';
+  dav_pwd := (select pwd_magic_calc (U_NAME, U_PASSWORD, 1) from SYS_USERS where U_NAME=dav_uid);
 
-try_grddl:
-  xmlnss := xmlnss_get (xt);
-  nss := '<namespaces>';
-  for (i := 0, l := length (xmlnss); i < l; i := i + 2)
-    {
-      nss := nss || sprintf ('<namespace prefix="%s">%s</namespace>', xmlnss[i], xmlnss[i+1]);
-    }
-  nss := nss || '</namespaces>';
-  nss := xtree_doc (nss);
+  -- Create a tmp file from input stream
+  tmpFile := tmp_file_name ('rdfm', 'pptx');
+  string_to_file (tmpFile, _ret_body, -2);
+  -- Extract the required meta-data from the PPTX file
+  core_meta := unzip_file (tmpFile, 'docProps/core.xml');
+  app_meta := unzip_file (tmpFile, 'docProps/app.xml');
+  slides_meta := unzip_file (tmpFile, 'ppt/_rels/presentation.xml.rels');
+  if (core_meta is null or app_meta is null or slides_meta is null)
+    return 0;
+  urihost := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+  fileExt := regexp_substr('.*(\.pptx|\.PPTX)\$', new_origin_uri, 1);
+  fileName := subseq(new_origin_uri, strrchr(new_origin_uri, '/') + 1);
+  extracted_image_collection_dav_root :='/DAV/home/dav/sponged/';
+  extracted_image_collection_dav_path := extracted_image_collection_dav_root || fileName || '/';
+  -- Override dest so graph URI doesn't refer to original location of the source .PPTX file
+  -- Using a fixed URL, instead of the source document URL, as the graph name makes
+  -- creating rewrite rules easier. The same rewrite rules can be used for all sponged .PPTX files.
+  original_dest := coalesce(dest, graph_iri);
+  -- Disabled - Breaks description.vsp
+  -- dest := 'http://' || urihost || '/PPTX';
+  -- baseUri := dest || '/' || fileName;
+  dest := original_dest;
+  baseUri := original_dest;
 
-  is_grddl := 0;
-  if (xpath_eval ('[ xmlns:dv="http://www.w3.org/2003/g/data-view#" ] /*[1]/@dv:transformation', xt) is not null)
-    {
-      if (xpath_eval ('/rdf', xt) is not null and xt_xml is not null)
-    {
-      declare exit handler for sqlstate '*' { goto not_rdf; };
-          xd :=  DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rdf_wo_grddl.xsl', xt_xml);
-      xd := serialize_to_UTF8_xml (xd);
-      DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      mdta := mdta + 1;
-    }
-      not_rdf:;
-      is_grddl := 1;
-      if (xt_xml is not null)
-    xt := xt_xml;
-    }
+  -- Construct graph $original_dest which contains link to graph $dest created solely for sponged PPTX metadata
+  {
+    declare ses, tmp any;
 
-  profs := null;
-  profs_done := vector ();
-  profile := cast (xpath_eval ('/html/head/@profile', xt) as varchar);
-  if (profile is not null)
-    profs := split_and_decode (profile, 0, '\0\0 ');
+    ses := string_output ();
+    http ('<rdf:RDF', ses);
+    http ('  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n', ses);
+    http ('  xmlns:http="http://www.w3.org/2006/http#"\n', ses);
+    http ('  xmlns:dc="http://purl.org/dc/elements/1.1/"\n', ses);
+    http ('>\n', ses);
+    http ('<rdf:Description rdf:about="' || original_dest || '">\n', ses);
+    http ('<dc:relation rdf:resource="' || baseUri || '"/>\n', ses);
+    http ('</rdf:Description>\n', ses);
+    http ('</rdf:RDF>\n', ses);
+    tmp := string_output_string (ses);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, tmp, new_origin_uri, original_dest);
+  }
 
-  reg := '';
-  doc_base := get_keyword ('http-redirect-to', opts, new_origin_uri);
-  DB.DBA.RDF_LOAD_GRDDL_REC (doc_base, graph_iri, new_origin_uri, dest, xt, mdta, reg, '', 0, opts);
-  if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1' and mdta) -- It is recognized as GRDDL, data is loaded (testing the grddl only mode)
-    goto ret;
-  try_rdfa:;
-  thisgr := coalesce (dest, graph_iri);
-  if (xt_xml is not null)
-    xt := xt_xml;
-  -- try loading POSH
+  -- Get base RDF description of presentation
+  meta_xml := vector(core_meta, app_meta);
+  foreach (any meta in meta_xml) do
   {
-    declare exit handler for sqlstate '*';
-    posh := '<html>' || serialize_to_UTF8_xml (xpath_eval ('//head', xt)) || '</html>';
-    DB.DBA.RDF_LOAD_RDFA (posh, proxy_iri, thisgr, 2);
+    xt := xtree_doc (meta);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
+            vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt));
+    xd := serialize_to_UTF8_xml (xt);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   }
-  -- RDFa
-  if (__proc_exists (fix_identifier_case ('xtree_doc_get_dtd'), 2) is null)
-    goto no_dtd_check;
-  dtd_sysuri := xtree_doc_get_dtd (xt, 1);
-  if (dtd_sysuri = 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd') 
-    {
-      declare exit handler for sqlstate '*' { goto try_grddl1; };
-      DB.DBA.RDF_LOAD_RDFA_1 (ret_body, new_origin_uri, thisgr, 0);
-      mdta := mdta + 1;
-      --if (mdta) 
-	goto ret;
-    }
-  else if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1') -- only for tests
+  -- Get a colon-delimited list of slides contained in the presentation
+  xt := xtree_doc (slides_meta);
+  xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
+          vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt, 'mode', 'get_slide_list'));
+  slide_list := serialize_to_UTF8_xml (xd);
+  -- Transform slide list into a vector
+  {
+    declare tmp, _start, _end any;
+    slide_vec := vector();
+    tmp := slide_list;
+    -- First slide occurs after first ':'
+    _start := strchr(tmp, ':');
+    while (_start is not null)
     {
-      no_dtd_check:
-  cnt := (sparql define input:storage "" select count(*) { graph `iri(?:thisgr)` { ?s ?p ?o }});
+      tmp := subseq(tmp, _start + 1);
+      _end := strchr(tmp, ':');
+      slide_path := subseq(tmp, 0, _end);
+      slide_vec := vector_concat (slide_vec, vector(slide_path));
+      _start := _end;
+    }
+  }
+
+  -- Handle any embedded images
   {
+    declare create_dav_col int;
+    create_dav_col := 1;
+
+    foreach (any slide_path2 in slide_vec) do
+    {
+      declare slide_rels, slide_basename, slide_num varchar;
+      declare slide_images, image_path, image_vec any;
+
+      -- slide path takes form 'slides/slide<n>.xml'
+      slide_basename := subseq(slide_path2, 7);
+      slide_num := regexp_substr('[0-9]+', slide_basename, 0);
+      slide_rels := unzip_file (tmpFile, 'ppt/slides/_rels/' || slide_basename || '.rels');
+
+      -- Generate RDF description of each embedded image
+      xt := xtree_doc (slide_rels);
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
+             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt, 'mode',
+	             'get_image_descs', 'slideNum', slide_num, 'imageDavPath', extracted_image_collection_dav_path));
+      if (xpath_eval('//text()', xd) is not null)
       {
-	declare exit handler for sqlstate '*';
-	DB.DBA.RDF_LOAD_RDFA_1 (ret_body, new_origin_uri, thisgr, 0);
-	goto rdfa_end;
+        xd := serialize_to_UTF8_xml (xd);
+        DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
       }
+
+      -- Extract each embedded image file and place it in DAV storage
+      xt := xtree_doc (slide_rels);
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
+             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt, 'mode', 'get_image_file_list'));
+      slide_images := serialize_to_UTF8_xml (xd);
+      -- slide_images is colon separated list of images in the slide
+      -- e.g. :../media/image4.png:../media/image5.png
+
+      -- Transform image list into a vector
       {
-	declare exit handler for sqlstate '*';
-	DB.DBA.RDF_LOAD_RDFA_1 (ret_body, new_origin_uri, thisgr, 1);
-	goto rdfa_end;
+        declare tmp, _start, _end any;
+        image_vec := vector();
+        tmp := slide_images;
+        -- First image occurs after first ':'
+        _start := strchr(tmp, ':');
+        while (_start is not null)
+        {
+          tmp := subseq(tmp, _start + 1);
+          _end := strchr(tmp, ':');
+          image_path := subseq(tmp, 0, _end);
+          image_vec := vector_concat (image_vec, vector(image_path));
+          _start := _end;
+        }
       }
+
+      -- Copy each image file to DAV
+      foreach (any img_path in image_vec) do
       {
-	declare exit handler for sqlstate '*';
-	DB.DBA.RDF_LOAD_RDFA_1 (ret_body, new_origin_uri, thisgr, 2);
-	rdfa_end:;
-      }
-  }
-  -- we process grddl & rdfa both should give us same result
-  if (mdta) -- It is recognized as GRDDL and data is loaded, stop there WAS: is_grddl and xpath_eval ('/html', xt) is null)
-    goto ret;
-  cnt := (sparql define input:storage "" select count(*) { graph `iri(?:thisgr)` { ?s ?p ?o }}) - cnt;
-  if (cnt > 0)
-    mdta := mdta + 1;
-    }
-  else if (mdta)
-    goto ret;
-	
-	
-  try_grddl1:
-  -- /* GRDDL - plan A, eRDF going here */
-  foreach (any prof in profs) do
-    {
-      prof := WS.WS.EXPAND_URL (new_origin_uri, prof);
-      xslt_style := (select GM_XSLT from DB.DBA.SYS_GRDDL_MAPPING where GM_PROFILE = prof);
-      if (xslt_style is not null)
+        declare image_basename, image_str, image_ext, image_mime_type varchar;
+
+        -- Extract file e.g. ../media/image4.png
+	image_mime_type := null;
+        image_basename := regexp_substr('(media/)(.+)', image_path, 2);
+	image_ext := subseq(lcase(image_basename), strrchr(image_basename, '.') + 1);
+	if (image_ext is not null)
 	{
-	  declare exit handler for sqlstate '*' { goto next_prof; };
-	  xd := DB.DBA.RDF_MAPPER_XSLT (xslt_style, xt, vector ('baseUri', new_origin_uri));
-	  if (xpath_eval ('count(/RDF/*)', xd) > 0)
-            {
-	      mdta := mdta + 1;
+	  image_mime_type := case
+	    when (image_ext = 'bmp') then 'image/bmp'
+	    when (image_ext = 'gif') then 'image/gif'
+	    when (image_ext = 'jpeg') then 'image/jpeg'
+	    when (image_ext = 'jpg') then 'image/jpeg'
+	    when (image_ext = 'png') then 'image/png'
+	    when (image_ext = 'svg') then 'image/svg+xml'
+	    when (image_ext = 'tiff') then 'image/tiff'
+	    when (image_ext = 'tif') then 'image/tiff'
+	    end;
+	}
+	else
+	{
+	  --dbg_printf('.PPTX Cartridge - Error: image_mime_type is null for embedded image %s', image_basename);
+	  ;
+	}
+
+	if (image_basename is not null and image_mime_type is not null)
+	{
+          image_str := unzip_file (tmpFile, 'ppt/media/' || image_basename);
+	  if (image_str is not null)
+	  {
+	    declare rc int;
+
+            if (create_dav_col)
+	    {
+              rc := DB.DBA.DAV_COL_CREATE(extracted_image_collection_dav_root, '110110110R', 'dav','dav', dav_uid, dav_pwd);
+	      if (rc >= 0 or rc = (-3) )
+	      {
+		DB.DBA.DAV_DELETE(extracted_image_collection_dav_path, 1, dav_uid, dav_pwd);
+                rc := DB.DBA.DAV_COL_CREATE(extracted_image_collection_dav_path, '110110110R', 'dav','dav', dav_uid, dav_pwd);
+	      }
+	      if (rc >= 0)
+	        create_dav_col := 0;
+              else
+	        dbg_printf('.PPTX Cartridge - DAV_COL_CREATE failed(%d): %s', rc, extracted_image_collection_dav_path);
 	    }
-	  xd := serialize_to_UTF8_xml (xd);
-	  DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	  profs_done := vector_concat (profs_done, vector (prof));
-	}
-      next_prof:;
-    }
-  -- brute force attack, scan w/o profile
-  if (mdta < 2)
-    {
-      -- currently no profile in RDFa and some similar, so we try it to extract directly
-      for select GM_XSLT, GM_PROFILE, GM_FLAG from DB.DBA.SYS_GRDDL_MAPPING do
-        {
-          if (position (GM_PROFILE, profs_done) > 0)
-	    goto try_next1;
-          declare exit handler for sqlstate '*' { goto try_next1; };
-          xd := DB.DBA.RDF_MAPPER_XSLT (GM_XSLT, xt, vector ('baseUri', new_origin_uri, 'nss', nss));
-	  if (xpath_eval ('count(/RDF/*)', xd) > 0)
+
+	    if (create_dav_col = 0)
 	    {
-	      mdta := mdta + 1;
-	      xd := serialize_to_UTF8_xml (xd);
-	      if (GM_FLAG = 2)
-		RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-	      DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-	      if (GM_FLAG > 0)
-		return mdta;
+              rc := DB.DBA.DAV_RES_UPLOAD (extracted_image_collection_dav_path || image_basename, image_str, image_mime_type,'110110110R','dav','dav', dav_uid, dav_pwd);
+	      if (rc < 0)
+	        dbg_printf('.PPTX Cartridge - DAV_RES_UPLOAD failed (%d) with file %s', rc, extracted_image_collection_dav_path || image_basename);
 	    }
-      try_next1:;
-    }
+	  }
+	  else
+	  {
+	    --dbg_printf('.PPTX Cartridge - Error: image_str is null for embedded image %s', image_basename);
+	    ;
+	  }
+	}
+      }
     }
-    -- /* feed formats */
-   if (get_feeds = 1)
-    {
-      -- try looking for feed
-      declare rss, atom any;
-
-      rss  := cast (xpath_eval('//head/link[ @rel="alternate" and @type="application/rss+xml" ]/@href', xt) as varchar);
-      atom := cast (xpath_eval('//head/link[ @rel="alternate" and @type="application/atom+xml" ]/@href', xt) as varchar);
-
-   declare exit handler for sqlstate '*' { goto no_feed; };
+  }
+  -- end: Embedded image handling
 
-      xt := null;
-      hdr := null;
-      if (atom is not null)
-        {
-      declare exit handler for sqlstate '*' { goto try_rss; };
-      feed_url := atom;
-      --if (RDF_MAPPER_CACHE_CHECK (atom, new_origin_uri, old_etag, old_last_modified))
-      --  goto no_feed;
-      load_msec := msec_time ();
-      content := DB.DBA.RDF_HTTP_URL_GET (atom, new_origin_uri, hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
-      load_msec := msec_time () - load_msec;
-      download_size := length (content);
-      xt := xtree_doc (content);
-      goto do_detect;
-        }
-try_rss:;
-      if (rss is not null)
-        {
-      declare exit handler for sqlstate '*' { goto no_microformats; };
-      feed_url := rss;
-      --if (RDF_MAPPER_CACHE_CHECK (rss, new_origin_uri, old_etag, old_last_modified))
-      --  goto no_feed;
-      load_msec := msec_time ();
-      content := DB.DBA.RDF_HTTP_URL_GET (rss, new_origin_uri, hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
-      load_msec := msec_time () - load_msec;
-      download_size := length (content);
-      xt := xtree_doc (content);
-        }
-do_detect:;
+  --Get text content of all slides
+  {
+    declare presentation_text, slide_text, ses1, ses2, tmp2 any;
+    declare slide_basename varchar;
 
-    -- the document itself is a feed
-    if (xt is null and xpath_eval ('/rdf|/rss|/feed', xt_sav) is not null)
-      xt := xt_xml;
+    -- Get the raw text contained in each slide and concatenate it
+    presentation_text := '';
+    ses1 := string_output();
+    foreach (any slide_path3 in slide_vec) do
+    {
+      declare slideUri varchar;
 
-    if (xt is null)
-      goto no_feed;
-    else if (xpath_eval ('/RDF', xt) is not null and content is not null)
-      {
-        xd := content;
-        goto ins_rdf;
-      }
-    else if (xpath_eval ('/feed', xt) is not null)
-      {
-        xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xt);
-      }
-    else if (xpath_eval ('/rss', xt) is not null)
+      -- slide path takes form 'slides/slide<n>.xml'
+      slide_basename := subseq(slide_path3, 7);
+      slideUri :=  baseUri || '#' || subseq(slide_basename, 0, strrchr(slide_basename, '.'));
+      slide_content := unzip_file (tmpFile, 'ppt/' || slide_path3);
+      if (slide_content is null)
       {
-        xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xt);
-      }
-    else
-      goto no_feed;
-
-    if (xpath_eval ('count(/RDF/*)', xd) > 0)
-          {
-        mdta := mdta + 1;
+        --dbg_printf('.PPTX Cartridge - Error: slide content is null for slide %s\n', slide_path3);
+        goto next_slide;
       }
-    xd := serialize_to_UTF8_xml (xd);
-ins_rdf:
-    DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri), 0);
-    DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri));
-    --RDF_MAPPER_CACHE_REGISTER (feed_url, new_origin_uri, hdr, old_last_modified, download_size, load_msec);
-    ret_flag := 1;
-no_feed:;
-    }
-  -- /* generic xHTML, extraction as per our ontology */
-  xt := xt_sav;
-  if (add_html_meta = 1 and xpath_eval ('/html', xt) is not null)
-    {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/html2rdf.xsl', xt, vector ('baseUri', new_origin_uri, 'source', tgt_page));
-      if (xpath_eval ('count(/RDF/*)', xd) > 0)
-        {
-	  mdta := mdta + 1;
-          xd := serialize_to_UTF8_xml (xd);
-          DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri), 1);
-        }
-    }
-ret:
-  if (mdta > 0 and aq is not null)
-    aq_request (aq, 'DB.DBA.RDF_SW_PING', vector (ps, new_origin_uri));
-
-  -- /* decide how to return */
-  declare ord, mime any;
-  mime := get_keyword ('content-type', opts);
-  ord := (select RM_ID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTML_RESPONSE');
-  for select RM_PATTERN, RM_TYPE, RM_HOOK from DB.DBA.SYS_RDF_MAPPERS
-    where RM_ID > ord and RM_TYPE in ('URL', 'MIME') and RM_ENABLED = 1 order by RM_ID do
-    {
-      if (RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) is not null)
-        mdta := 0;
-      else if (RM_TYPE = 'MIME' and mime is not null and RM_HOOK <> 'DB.DBA.RDF_LOAD_DAV_META' and regexp_match (RM_PATTERN, mime) is not null)
-        mdta := 0;
-    }
-  mdta := mdta * ret_flag;
-  -- needs a flag
-  if (0 and mdta <> 0)
-    {
-      declare localdest, dep any;
-      localdest := coalesce (dest, graph_iri);
-      dep := (sparql define input:storage ""
-        select (sql:VECTOR_AGG (?o))
-        where { graph `iri(?:localdest)` {
-                `iri(?:localdest)` <http://www.w3.org/2000/01/rdf-schema#seeAlso> ?o .
-                filter (isIRI (?o)) } } );
-      if (length (dep) > 0)
-        {
-          return vector ('seeAlso', dep);
-        }
-    }
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return mdta;
-  no_microformats:;
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
-  return 0;
-}
-;
 
-create procedure DB.DBA.RDF_LOAD_FEED_RESPONSE (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
-{
-  declare content, xd, xt, ret_flag, mdta any;
-  content := ret_body;
-  declare exit handler for sqlstate '*'
-    {
-      goto no_xml;
-    };
-  mdta := 0;
-  xt := xtree_doc (content);
+      xt := xtree_doc (slide_content);
+      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
+             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt,
+	             'mode', 'raw_slide_content'));
+      slide_text := cast(xpath_eval('/slide_text/text()', xd) as varchar);
+      http(slide_text || ' ', ses1);
 
-  if (xpath_eval ('/RDF', xt) is not null and content is not null)
-    {
-      xd := content;
-      mdta := 1;
-      goto ins_rdf;
-    }
-  else if (xpath_eval ('/feed', xt) is not null)
-    {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xt);
-    }
-  else if (xpath_eval ('/rss', xt) is not null)
-    {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xt);
-    }
-  else if (xpath_eval ('/entry', xt) is not null)
-    {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/google2rdf.xsl', xt);
-      if (xpath_eval ('count(/RDF/*)', xd) > 0)
-	mdta := 1;
-      xd := serialize_to_UTF8_xml (xd);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      goto no_feed;
-    }
-    else if (xpath_eval ('/service', xt) is not null)
-    {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/odata2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri)));
-      if (xpath_eval ('count(/RDF/*)', xd) > 0)
-	mdta := 1;
-      xd := serialize_to_UTF8_xml (xd);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      goto no_feed;
-    }
-  else
-    goto no_feed;
+      --dbg_printf('.PPTX Cartridge - slide text\n');
+      --dbg_printf('%s', slide_text || ' ' );
+      --dbg_printf('<<');
 
-  if (xpath_eval ('count(/RDF/*)', xd) > 0)
-    {
-      mdta := 1;
-    }
-  xd := serialize_to_UTF8_xml (xd);
-ins_rdf:
-  mdta := DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri));
-no_feed:
+      -- Get text from each individual slide as RSS content:encoded
+      xt := xtree_doc (slide_content);
+      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
+             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt,
+	             'mode', 'html_encode_slide_content', 'slideUri', slideUri));
+      xd := serialize_to_UTF8_xml (xt);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
 
-  declare ord, mime any;
-  mime := get_keyword ('content-type', opts);
-  ord := (select RM_ID from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = current_proc_name ());
-  for select RM_PATTERN, RM_TYPE, RM_HOOK from DB.DBA.SYS_RDF_MAPPERS
-    where RM_ID > ord and RM_TYPE in ('URL', 'MIME') and RM_ENABLED = 1 order by RM_ID do
-    {
-      if (RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) is not null)
-        mdta := 0;
-      else if (RM_TYPE = 'MIME' and mime is not null and RM_HOOK <> 'DB.DBA.RDF_LOAD_DAV_META' and regexp_match (RM_PATTERN, mime) is not null)
-        mdta := 0;
+      -- Construct RDF to hold text from each individual slide
+      -- ses2 := string_output();
+      -- http ('<rdf:RDF', ses2);
+      -- http ('  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n', ses2);
+      -- http ('  xmlns:http="http://www.w3.org/2006/http#"\n', ses2);
+      -- http ('  xmlns:bibo="http://purl.org/ontology/bibo/"\n', ses2);
+      -- http ('>\n', ses2);
+      -- http ('<rdf:Description rdf:about="' || slideUri || '">\n', ses2);
+      -- http ('<bibo:content>\n', ses2);
+      -- http (slide_text || ' ', ses2);
+      -- http ('</bibo:content>\n', ses2);
+      -- http ('</rdf:Description>\n', ses2);
+      -- http ('</rdf:RDF>\n', ses2);
+      -- tmp2 := string_output_string (ses2);
+      -- DB.DBA.RDF_LOAD_RDFXML (tmp2, new_origin_uri, coalesce (dest, graph_iri));
+next_slide:
+        ;
     }
-  return mdta;
-no_xml:;
-  return 0;
-}
-;
-
--- /* convert the feed in rss 1.0 format to sioc */
-create procedure DB.DBA.RDF_LOAD_FEED_SIOC (in content any, in iri varchar, in graph_iri varchar, in is_disc int := '')
-{
-  declare xt, xd any;
-  declare exit handler for sqlstate '*'
-    {
-      goto no_sioc;
-    };
-  xt := xtree_doc (content);
-  xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/feed2sioc.xsl', xt, vector ('baseUri', graph_iri, 'isDiscussion', is_disc));
-  xd := serialize_to_UTF8_xml (xd);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, iri, graph_iri, 0);
-  DB.DBA.RM_ADD_PRV (current_proc_name (), iri, graph_iri, null);
-  return 1;
-  no_sioc:
-  return 0;
-}
-;
 
-registry_set ('__sparql_sponge_use_w3c_xslt', 'on')
-;
+    presentation_text := string_output_string (ses1);
 
+    --dbg_printf('.PPTX Cartridge - presentation text:');
+    --dbg_printf('%s', presentation_text);
+    --dbg_printf('<<');
 
-create procedure DB.DBA.SYS_URN_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
-{
-  if (lower (local_iri) like 'urn:lsid:%')
-    {
-      options := vector_concat (vector ('get:uri', 'http://lsid.tdwg.org/'||get_uri), options);
-      return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
-      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
-    }
-  else
+    -- Construct RDF to hold combined text from *all* slides
     {
-      signal ('RDFZZ', 'This version of Virtuoso Sponger do not support "urn" IRI scheme');
-    }
-}
-;
+      declare ses, tmp any;
 
-create procedure DB.DBA.SYS_DOI_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
-{
-  if (lower (local_iri) like 'doi:%')
-    {
-      declare new_get_uri varchar;
-      if (__proc_exists ('HS_Resolve', 2) is not null)
-	{
-      new_get_uri := HS_Resolve (substring (get_uri, 5, length (get_uri)));
-	}
-      else
-	{
-	  declare hdr any;
-	  http_get ('http://dx.doi.org/' || substring (get_uri, 5, length (get_uri)), hdr);
-	  new_get_uri := http_request_header (hdr, 'Location');
-	}
+      ses := string_output ();
+      http ('<rdf:RDF', ses);
+      http ('  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n', ses);
+      http ('  xmlns:http="http://www.w3.org/2006/http#"\n', ses);
+      http ('  xmlns:bibo="http://purl.org/ontology/bibo/"\n', ses);
+      http ('  xmlns:dc="http://purl.org/dc/elements/1.1/"\n', ses);
+      http ('  xmlns:sioc="http://rdfs.org/sioc/ns#"\n', ses);
+      http ('>\n', ses);
+      http ('<rdf:Description rdf:about="' || baseUri || '">\n', ses);
 
-      if (not isstring (new_get_uri))
-        signal ('RDFZZ', 'Cannot resolve IRI='||get_uri);
-      options := vector_concat (vector ('get:uri', new_get_uri), options);
-      return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
-      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
-    }
-  else
-    {
-      signal ('RDFZZ', 'This version of Virtuoso Sponger do not support "doi" IRI scheme');
+      http ('<bibo:content>\n', ses);
+      http (presentation_text, ses);
+      http ('</bibo:content>\n', ses);
+
+      http ('</rdf:Description>\n', ses);
+      http ('</rdf:RDF>\n', ses);
+      tmp := string_output_string (ses);
+      DB.DBA.RM_RDF_LOAD_RDFXML (tmp, new_origin_uri, coalesce (dest, graph_iri));
     }
-}
-;
+    --dbg_printf('.PPTX Cartridge - Presentation text extraction done');
+  }
 
-create procedure DB.DBA.SYS_FEED_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
-{
-  declare url varchar;
-  url := 'http:' || subseq (get_uri, 5);
-  options := vector_concat (vector ('get:uri', url), options);
-  return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
-      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
+  --dbg_printf('.PPTX Cartridge - All done');
+
+  return 1;
 }
 ;
 
-create procedure DB.DBA.SYS_WEBCAL_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+create procedure DB.DBA.RDF_LOAD_MBZ_1 (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    in kind varchar, in id varchar, in inc varchar, inout opts any, in triple_dict any := null)
 {
-  declare url varchar;
-  url := 'http:' || subseq (get_uri, 7);
-  options := vector_concat (vector ('get:uri', url), options);
-  return DB.DBA.SYS_HTTP_SPONGE_UP (local_iri, get_uri,
-      'DB.DBA.RDF_LOAD_HTTP_RESPONSE', 'DB.DBA.RDF_FORGET_HTTP_RESPONSE', options);
-}
-;
+  declare uri, cnt, xt, xd, hdr any;
+  uri := sprintf ('http://musicbrainz.org/ws/1/%s/%s?type=xml&inc=%U', kind, id, inc);
+  cnt := DB.DBA.RDF_HTTP_URL_GET (uri, '', hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
+  xt := xtree_doc (cnt);
+  xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/mbz2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (new_origin_uri)));
+  xd := serialize_to_UTF8_xml (xd);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), uri);
+};
 
-create procedure DB.DBA.RDF_LOAD_YAHOO_STOCK_DATA (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_MBZ (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare meta, tmp, content varchar;
-  declare symbol varchar;
-  declare arr any;
+  declare kind, id varchar;
+  declare tmp, incs any;
+  declare uri, cnt, hdr, inc, xd, xt varchar;
 
+  tmp := regexp_parse ('http://musicbrainz.org/([^/]*)/([^\.]+)', new_origin_uri, 0);
   declare exit handler for sqlstate '*'
     {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
       return 0;
     };
-  arr := sprintf_inverse (new_origin_uri, 'http://finance.yahoo.com/q?s=%s', 0);
-  symbol := arr[0];
+  if (length (tmp) < 6)
+    return 0;
 
-  rdfm_yq_get_quote (symbol, new_origin_uri, dest, graph_iri, opts);
-  rdfm_yq_get_history (symbol, new_origin_uri, dest, graph_iri, opts);
-  rdfm_yq_get_feed (symbol, new_origin_uri, dest, graph_iri, opts);
-  rdfm_yq_get_events (symbol, new_origin_uri, dest, graph_iri, opts);
-  rdfm_yq_get_mb (symbol, new_origin_uri, dest, graph_iri, opts);
-  rdfm_yq_get_competitors (symbol, new_origin_uri, dest, graph_iri, opts);
+  kind := subseq (new_origin_uri, tmp[2], tmp[3]);
+  id :=   subseq (new_origin_uri, tmp[4], tmp[5]);
+  incs := vector ();
+  if (kind = 'artist')
+    {
+      inc := 'aliases artist-rels label-rels release-rels track-rels url-rels';
+      incs :=
+      	vector (
+	'sa-Album', 'sa-Single', 'sa-EP', 'sa-Compilation', 'sa-Soundtrack',
+	'sa-Spokenword', 'sa-Interview', 'sa-Audiobook', 'sa-Live', 'sa-Remix', 'sa-Other'
+	, 'va-Album', 'va-Single', 'va-EP', 'va-Compilation', 'va-Soundtrack',
+	'va-Spokenword', 'va-Interview', 'va-Audiobook', 'va-Live', 'va-Remix', 'va-Other'
+	);
+      --incs := vector ();
+    }
+  else if (kind = 'release')
+    inc := 'artist counts release-events discs tracks artist-rels label-rels release-rels track-rels url-rels track-level-rels labels';
+  else if (kind = 'track')
+    inc := 'artist releases puids artist-rels label-rels release-rels track-rels url-rels';
+  else if (kind = 'label')
+    inc := 'aliases artist-rels label-rels release-rels track-rels url-rels';
+  else
+    return 0;
+  if (dest is null)
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RDF_LOAD_MBZ_1 (graph_iri, new_origin_uri, dest, kind, id, inc, opts, triple_dict);
+  foreach (any inc1 in incs) do
+    {
+      DB.DBA.RDF_LOAD_MBZ_1 (graph_iri, new_origin_uri, dest, kind, id, inc1, opts, triple_dict);
+    }
   return 1;
-}
-;
+};
 
 
-create procedure rdfm_yq_get_quote (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any)
+create procedure DB.DBA.RDF_LOAD_LINKEDIN (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare arr, cnt, ses, content, url any;
-  declare xt, xd any;
+  declare xt, cnt, xd any;
+  declare linkedin_id, tmp, required_profile_fields varchar;
+  declare is_owner_key integer;
+  declare api_url, url, public_profile_url any;
+  declare consumer_key, consumer_secret, oauth_token, oauth_secret varchar;
+  declare oauth_keys any;
+  declare li_object_type varchar; -- Type of LinkedIn object being handled
 
-  ses := string_output ();
-  url := sprintf ('http://download.finance.yahoo.com/d/quotes.csv?s=%U&f=nsbavophg&e=.csv', symbol);
-  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-  arr := rdfm_yq_parse_csv (cnt);
-  http ('<quote stock="NASDAQ">', ses);
-  foreach (any q in arr) do
-    {
-      http_value (q[0], 'company', ses);
-      http_value (q[1], 'symbol', ses);
-      http_value (q[2], 'bid', ses);
-      http_value (q[3], 'ask', ses);
-      http_value (q[4], 'volume', ses);
-      http_value (q[5], 'open', ses);
-      http_value (q[6], 'prev.close', ses);
-      http_value (q[7], 'high', ses);
-      http_value (q[8], 'low', ses);
-    }
-  http ('</quote>', ses);
-  content := string_output_string (ses);
-  xt := xtree_doc (content);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yahoo_stock2rdf.xsl', xt,
-      vector ('baseUri', 'http://finance.yahoo.com/q?s='||symbol));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return;
-}
-;
+  declare exit handler for sqlstate '*'
+  {
+	DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+    return 0;
+  };
 
-create procedure rdfm_yq_get_history (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any)
-{
-  declare arr, cnt, ses, content, url any;
-  declare xt, xd any;
+  -- Get cartridge options
+  consumer_key := get_keyword ('consumer_key', opts);
+  consumer_secret := get_keyword ('consumer_secret', opts);
 
-  ses := string_output ();
-  url := sprintf ('http://ichart.finance.yahoo.com/table.csv?s=%U&d=10&e=13&f=2007&g=d&a=8&b=7&c=2007&ignore=.csv', symbol);
-  cnt := http_client (url, proxy=>get_keyword_ucase ('get:proxy', opts));
-  arr := rdfm_yq_parse_csv (cnt);
-  http (sprintf ('<history stock="NASDAQ" symbol="%V">', symbol), ses);
-  foreach (any q in arr) do
-    {
-      if (q[0] <> 'Date')
-    {
-      http ('<hist-price>', ses);
-      http_value (q[0], 'date', ses);
-      http_value (q[1], 'open', ses);
-      http_value (q[2], 'high', ses);
-      http_value (q[3], 'low', ses);
-      http_value (q[4], 'close', ses);
-      http_value (q[5], 'volume', ses);
-      http_value (q[6], 'adjclose', ses);
-      http ('</hist-price>', ses);
-    }
-    }
-  http ('</history>', ses);
-  content := string_output_string (ses);
-  xt := xtree_doc (content);
-  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/yahoo_stock2rdf.xsl', xt, vector ('baseUri', 'http://finance.yahoo.com/q/hp?s='||symbol));
-  xd := serialize_to_UTF8_xml (xt);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-  return;
-}
-;
+  if (subseq (new_origin_uri, 0, 5) = 'https')
+    new_origin_uri := 'http' || subseq (new_origin_uri, 5);
 
-create procedure rdfm_yq_date_cvt (in d varchar)
-{
-  declare arr any;
-  declare dt any;
-  declare exit handler for sqlstate '*'
-    {
-      return null;
-    };
-  arr := sprintf_inverse (trim (cast (d as varchar)), '%d-%s-%d', 0);
-  if (length(arr) < 3)
-    return null;
-  dt := http_string_date (sprintf ('Mon, %02d %s 20%02d 00:00:00 GMT', arr[0], arr[1], arr[2]));
-  dt := dt_set_tz (dt, 0);
-  return date_iso8601 (dt);
-}
-;
+  -- NOTE: new_origin_uri like 'http://%.linkedin.com/profile/view?id=%'
+  -- The id in this url pattern is NOT the id returned by api.linkedin.com as part of a user's profile.
+  -- It doesn't identify a user
 
-create procedure rdfm_yq_get_competitors (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any)
-{
-  declare content, iri any;
-  declare xt, xd, xp, ses any;
-  content := http_client (sprintf ('http://finance.yahoo.com/q/co?s=%U', symbol), proxy=>get_keyword_ucase ('get:proxy', opts));
-  --content := file_to_string ('temp/xx');
-  xt := xtree_doc (content, 2);
-  xp := xpath_eval ('//table[tr/td/small/b[ contains (., "DIRECT COMPETITOR COMPARISON")]]/following-sibling::table[2]/tr[1]/td/table/tr[1]//a/text()', xt, 0);
-  ses := string_output ();
-  foreach (any x in xp) do
-    {
-      x := cast (x as varchar);
-      if (x <> symbol and x <> 'Industry')
-	{
-	  http (sprintf ('<http://dbpedia.org/resource/%s> <http://xbrlontology.com/ontology/finance/stock_market#hasCompetitor> <http://dbpedia.org/resource/%s> .\n', symbol, x), ses);
-	  http (sprintf ('<http://dbpedia.org/resource/%s> <http://www.openlinksw.com/schema/attribution#isDescribedUsing> <http://finance.yahoo.com/q?s=%s> .\n', x, x), ses);
-	}
-    }
-  content := string_output_string (ses);
-  TTLP (content, new_origin_uri, coalesce (dest, graph_iri));
-  return;
-}
-;
+  if (new_origin_uri like 'http://%.linkedin.com/pub/%')
+  {
+    -- Public profile URL
+    -- e.g. http://uk.linkedin.com/pub/hugh-williams/0/1a0/559
+    public_profile_url := new_origin_uri;
+  }
+  else if (new_origin_uri like 'http://%.linkedin.com/in/%')
+  {
+    -- Public profile URL
+    -- e.g. http://www.linkedin.com/in/kidehen
+    public_profile_url := new_origin_uri;
+  }
+  else
+  {
+    return 0;
+  }
 
-create procedure rdfm_yq_get_events (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any)
-{
-  declare content, iri any;
-  declare xt, xd, xp, ses any;
-  iri := sprintf ('http://finance.yahoo.com/q/ce?s=%U', symbol);
-  content := http_client (sprintf ('http://finance.yahoo.com/q/ce?s=%U', symbol), proxy=>get_keyword_ucase ('get:proxy', opts));
-  xt := xtree_doc (content, 2);
-  xp := xpath_eval ('//table[tr/td[@class="yfnc_tablehead1" and normalize-space (.) = "Event"]]/tr', xt, 0);
-  ses := string_output ();
-  http ('<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:c="http://www.w3.org/2002/12/cal/icaltzd#">\n', ses);
-  http (sprintf ('<c:Vcalendar r:about="http://finance.yahoo.com/q/ce?s=%V#this">\n', symbol), ses);
-  http ('<c:prodid>-//connolly.w3.org//palmagent 0.6 (BETA)//EN</c:prodid>\n', ses);
-  http ('<c:version>2.0</c:version>\n', ses);
-  foreach (any x in xp) do
-    {
-      declare _time, _desc, _uri varchar;
-      _time := xpath_eval ('string(td[1])', x);
-      _desc := xpath_eval ('string(td[2])', x);
-      _uri :=  xpath_eval ('td[2]/a/@href', x);
-      if (length (_time) and length (_desc))
-    {
-      _time := rdfm_yq_date_cvt (_time);
-      if (length (_time))
-        {
-          http ('<c:component>\n', ses);
-          http ('<c:Vevent>\n', ses);
-          http (sprintf ('<c:description>%V</c:description>\n', _desc), ses);
-          http (sprintf ('<c:dtstart r:datatype="http://www.w3.org/2001/XMLSchema#dateTime">%V</c:dtstart>\n', _time), ses);
-          if (_uri is not null)
-        http (sprintf ('<c:url r:resource="%V"/>\n', _uri), ses);
-          http ('</c:Vevent>\n', ses);
-          http ('</c:component>\n', ses);
-        }
-    }
-    }
-  http ('</c:Vcalendar>\n', ses);
-  http ('</r:RDF>\n', ses);
-  content := string_output_string (ses);
-  DB.DBA.RM_RDF_LOAD_RDFXML (content, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), iri);
-  return;
-}
-;
+  -- Get any unexpiring LinkedIn access token, to be used for signing requests, until we know the LinkedIn user's id
+  oauth_keys := DB.DBA.LINKEDIN_GET_ACCESS_TOKEN (public_profile_url);
+  oauth_token := oauth_keys[0];
+  oauth_secret := oauth_keys[1];
+  is_owner_key := oauth_keys[2];
 
-create procedure rdfm_yq_get_mb (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any)
-{
-  declare content, hdr any;
-  declare xt, xp any;
-  content := http_client ('http://messages.finance.yahoo.com/mb/'||symbol, proxy=>get_keyword_ucase ('get:proxy', opts));
-  xt := xtree_doc (content, 2);
-  xp := cast(xpath_eval ('//a[normalize-space(.) = "RSS"]/@href', xt) as varchar);
-  if (length (xp))
-    {
-      content := DB.DBA.RDF_HTTP_URL_GET (xp, '', hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-      rdfm_yq_load_feed (content, new_origin_uri, dest, graph_iri);
-    }
-}
-;
+  if (oauth_token is null or oauth_secret is null)
+  {
+    log_message ('LINKEDIN_GET_ACCESS_TOKEN: No non-expiring access tokens are available to sign LinkedIn API requests');
+    return 0;
+  }
 
-create procedure rdfm_yq_load_feed (inout content any, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar)
-{
-  declare xt, xd any;
-  xt := xtree_doc (content);
-  if (xpath_eval ('/RDF', xt) is not null and content is not null)
-    {
-      xd := content;
-      goto ins_rdf;
-    }
-  else if (xpath_eval ('/feed', xt) is not null)
-    {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/atom2rdf.xsl', xt);
-    }
-  else if (xpath_eval ('/rss', xt) is not null)
+  -- Retrieve most data apart from connections
+  -- LinkedIn rejects the entire request if an attempt is made to retrieve a user's connections with an access token granted by someone-else
+  required_profile_fields := 'id,public-profile-url,first-name,last-name,headline,industry,location,num-connections,summary,specialties,associations,interests,honors,positions,num-recommenders,recommendations-received,member-url-resources,picture-url,certifications,date-of-birth,im-accounts,educations,languages,main-address,phone-numbers,publications,skills';
+  if (is_owner_key)
+    -- required_profile_fields := required_profile_fields || ',connections,twitter-accounts';
+    required_profile_fields := required_profile_fields || ',twitter-accounts';
+
+  api_url := sprintf ('https://api.linkedin.com/v1/people/url=%U:(%s)', public_profile_url, required_profile_fields);
+  url := DB.DBA.sign_request ('GET', api_url, '', consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+  cnt := http_get (url);
+
+  declare person_id any;
+  li_object_type := 'unknown';
+  xd := xtree_doc (cnt);
+  person_id := cast (xpath_eval ('/person/id', xd) as varchar);
+  
+  declare num_connections any;
+  num_connections := cast (xpath_eval ('/person/num-connections', xd) as integer);
+  
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/linkedin2rdf.xsl', xd,
+    vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'li_object_type', li_object_type));
+  xd := serialize_to_UTF8_xml (xt);
+
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  if (length (person_id))
     {
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/rss2rdf.xsl', xt);
+    	--Retrieve details of the person's network
+      url := DB.DBA.sign_request ('GET', sprintf ('http://api.linkedin.com/v1/people/%s/network', person_id), 'type=SHAR&scope=self', consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+      cnt := http_get (url);
+      xd := xtree_doc (cnt);
+      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/linkedin_shares2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'li_object_type', li_object_type));
+      xd := serialize_to_UTF8_xml (xt);
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      
+      -- Paginated requests for all their connections
+      declare st, retrcount integer;
+      st:=0; retrcount:=500;
+      li_object_type := 'connections';
+      while(retrcount=500) {
+        url := DB.DBA.sign_request ('GET', sprintf ('http://api.linkedin.com/v1/people/%s/connections:(id,public-profile-url,site-public-profile-request,first-name,last-name,headline,industry,location)', person_id), sprintf('start=%d&count=500',st), consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+        st:=st+500;
+        cnt := http_get (url);
+        xd := xtree_doc (cnt);
+        retrcount:=cast(xpath_eval('count(/connections/person)', xd) as integer); 
+        xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/linkedin2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'li_object_type', li_object_type));
+        xd := serialize_to_UTF8_xml (xt);
+        DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+      }
     }
-  else
-    goto no_feed;
-  xd := serialize_to_UTF8_xml (xd);
-  ins_rdf:
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RDF_LOAD_FEED_SIOC (xd, new_origin_uri, coalesce (dest, graph_iri));
-  no_feed:
-  return;
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return 1;
 }
 ;
 
-create procedure rdfm_yq_get_feed (in symbol varchar, in new_origin_uri varchar, in  dest varchar, in graph_iri varchar, inout opts any)
+create procedure DB.DBA.LINKEDIN_SAVE_ACCESS_TOKEN (
+  in li_user_id varchar,
+  in li_user_name varchar,
+  in li_user_public_profile_url varchar,
+  in li_app_site_url varchar,
+  in li_app_id varchar,
+  in oauth_token varchar,
+  in oauth_secret varchar,
+  in oauth_token_expiry int
+  )
 {
-  declare content, hdr any;
-  content := DB.DBA.RDF_HTTP_URL_GET (sprintf ('http://us.rd.yahoo.com/finance/news/rss/add/*http://finance.yahoo.com/rss/SeekingAlpha?s=%U', symbol), '', hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
-  rdfm_yq_load_feed (content, new_origin_uri, dest, graph_iri);
-  return;
+  declare dt_expires datetime;
+
+  dt_expires := null;
+  if (oauth_token_expiry is not null and oauth_token_expiry > 0)
+    dt_expires := dateadd ('second', oauth_token_expiry , now ());
+  else
+    oauth_token_expiry := null;
+
+  insert soft DB.DBA.LINKEDIN_ACCESS_TOKENS (
+    LIAT_GRANTOR_ID, LIAT_GRANTOR_NAME, LIAT_GRANTOR_URL, LIAT_APP_SITE_URL, LIAT_APP_ID,
+    LIAT_ACCESS_TOKEN, LIAT_ACCESS_TOKEN_SECRET, LIAT_CREATED, LIAT_LIFETIME, LIAT_EXPIRES)
+    values (li_user_id, li_user_name, li_user_public_profile_url, li_app_site_url, li_app_id, oauth_token, oauth_secret, now (), oauth_token_expiry, dt_expires);
 }
 ;
 
-
-create procedure rdfm_yq_parse_csv (in str varchar)
+create procedure DB.DBA.LINKEDIN_GET_ACCESS_TOKEN (in li_public_profile_url varchar, in li_id varchar := null)
 {
-  declare ses any;
-  declare ret, line, v any;
+  declare access_token, secret varchar;
+  declare is_owner_key integer;
 
-  ses := string_output ();
-  http (str, ses);
-  ret := vector ();
-  while (1)
+  -- is_owner_key:
+  -- 1 => returned access token was granted by the owner of the given public profile URL
+  -- 0 => returned access token was granted by some other user
+
+  access_token := null;
+  secret := null;
+  is_owner_key := 1;
+
+  if (li_public_profile_url is not null)
+  {
+    -- Find access token by LinkedIn public profile URL
+
+    -- First look for a non-expiring access token.
+    -- If more than one non-expiring access token exists in LINKEDIN_ACCESS_TOKENS
+    -- for the same user, all but the most recent are assumed to have been
+    -- revoked by the user and hence be invalid.
+    for (select top 1
+           LIAT_ACCESS_TOKEN as _token,
+           LIAT_ACCESS_TOKEN_SECRET as _secret
+         from
+           DB.DBA.LINKEDIN_ACCESS_TOKENS
+         where
+           LIAT_GRANTOR_URL = li_public_profile_url and LIAT_EXPIRES is null
+         order by LIAT_CREATED desc
+        )
+    do
+    {
+      access_token := _token;
+      secret := _secret;
+    }
+
+    if (access_token is not null)
+      goto done;
+
+    -- Then look for an unexpired expiring access token
+    for (select top 1
+           LIAT_ACCESS_TOKEN as _token,
+           LIAT_ACCESS_TOKEN_SECRET as _secret
+         from
+           DB.DBA.LINKEDIN_ACCESS_TOKENS
+         where
+           LIAT_GRANTOR_URL = li_public_profile_url and LIAT_EXPIRES > now()
+        )
+    do
     {
-      line := ses_read_line (ses, 0, 0, 1);
-      if (not isstring (line))
-    goto finish;
-      line := replace (line, '\r', '\n');
-      line := replace (line, '\n\n', '\n');
-      v := rdfm_yq_parse_csv_line (line);
-      ret := vector_concat (ret, vector (v));
+      access_token := _token;
+      secret := _secret;
     }
-  finish:
-  return ret;
-}
-;
 
-create procedure rdfm_yq_parse_csv_line (inout line varchar)
-{
-  declare res any;
-  declare len, i, stat, prev int;
-  declare tmp varchar;
+    if (access_token is not null)
+      goto done;
+  }
+  else if (li_id is not null)
+  {
+    -- Find access token by LinkedIn user ID
 
-  res := vector ();
-  len := length (line);
-  stat := 0;
-  tmp := '';
-  prev := 0;
-  for (i := 0; i < len; i := i + 1)
+    -- First look for a non-expiring access token.
+    for (select top 1
+           LIAT_ACCESS_TOKEN as _token,
+           LIAT_ACCESS_TOKEN_SECRET as _secret
+         from
+           DB.DBA.LINKEDIN_ACCESS_TOKENS
+         where
+           LIAT_GRANTOR_ID = li_id and LIAT_EXPIRES is null
+         order by LIAT_CREATED desc
+        )
+    do
     {
-      if (stat = 0 and (line[i] = ascii (',') or line[i] = ascii ('\n')))
-    {
-      res := vector_concat (res, vector (tmp));
-      tmp := '';
+      access_token := _token;
+      secret := _secret;
     }
-      else if (line[i] = ascii ('"'))
+
+    if (access_token is not null)
+      goto done;
+
+    -- Then look for an unexpired expiring access token
+    for (select top 1
+           LIAT_ACCESS_TOKEN as _token,
+           LIAT_ACCESS_TOKEN_SECRET as _secret
+         from
+           DB.DBA.LINKEDIN_ACCESS_TOKENS
+         where
+           LIAT_GRANTOR_ID = li_id and LIAT_EXPIRES > now()
+        )
+    do
     {
-      if (stat = 1)
-        {
-          stat := 0;
-        }
-      else if (stat = 0)
-        {
-          if (prev = line[i])
-            tmp := tmp || chr (line[i]);
-              stat := 1;
-        }
-    }
-      else if (stat)
-    tmp := tmp || chr (line[i]);
-      else if (stat = 1 and line[i] = ascii (' '))
-        tmp := tmp || ' ';
-      else if (stat = 0 and line[i] <> ascii (' '))
-        tmp := tmp || chr (line[i]);
-      prev := line[i];
+      access_token := _token;
+      secret := _secret;
     }
-  return res;
+
+    if (access_token is not null)
+      goto done;
+  }
+
+  -- Use any available non-expiring access token to sign requests
+  for (select top 1
+       LIAT_ACCESS_TOKEN as _token,
+       LIAT_ACCESS_TOKEN_SECRET as _secret
+     from
+       DB.DBA.LINKEDIN_ACCESS_TOKENS
+     where
+       LIAT_EXPIRES is null
+     order by LIAT_CREATED desc
+    )
+  do
+  {
+    access_token := _token;
+    secret := _secret;
+    is_owner_key := 0;
+  }
+
+done:
+  return vector (access_token, secret, is_owner_key);
 }
 ;
 
-
-create procedure RDFM_IDENT_RESOLVE_INIT ()
+create procedure DB.DBA.RDF_LOAD_LINKEDIN_REQUEST_ACCESS_TOKEN (in consumer_key varchar, in consumer_secret varchar)
 {
-  declare cnt, hdr, url, xt, xp, sch, delim any;
-  for select OS_ID as _id, OS_SERVER as _server from DB.DBA.OAI_SERVERS do
-    {
-      xp := sch := delim := '';
-      declare exit handler for sqlstate '*'
-    {
-      update DB.DBA.OAI_SERVERS set OS_ENABLED = 0 where OS_ID = _id;
-      goto try_next;
-    };
-      url := _server || '?verb=Identify';
-      commit work;
-      cnt := DB.DBA.RDF_HTTP_URL_GET (url, _server, hdr); -- this is for initing , no opts here
-      xt := xtree_doc (cnt);
-      xp := xpath_eval ('string (/OAI-PMH/Identify/description/oai-identifier/repositoryIdentifier)', xt);
-      sch := xpath_eval ('string (/OAI-PMH/Identify/description/oai-identifier/scheme)', xt);
-      delim := xpath_eval ('string (/OAI-PMH/Identify/description/oai-identifier/delimiter)', xt);
-      if (length (xp))
-        update DB.DBA.OAI_SERVERS set OS_URN_PATTERN = sch||delim||xp, OS_ENABLED = 1 where OS_ID = _id;
-      else
-    update DB.DBA.OAI_SERVERS set OS_ENABLED = 0 where OS_ID = _id;
-      try_next:;
-    }
+  declare oauth_token, oauth_secret varchar;
+  declare url, cnt, req_token_resp_params any;
+  declare li_resp varchar;
+  declare linkedin_api_host, request_token_path varchar;
+  declare request_auth_url, request_token, request_secret varchar;
+  declare oauth_server_redirect_url varchar;
+
+  declare exit handler for sqlstate '*'
+  {
+    log_message (sprintf ('RDF_LOAD_LINKEDIN_REQUEST_ACCESS_TOKEN exit handler:\n %s', __SQL_MESSAGE));
+    return 0;
+  };
+
+  linkedin_api_host := 'https://api.linkedin.com';
+  request_token_path := '/uas/oauth/requestToken';
+
+  url := DB.DBA.sign_request ('GET', linkedin_api_host || request_token_path, '', consumer_key, consumer_secret, null, null, 1);
+  cnt := http_get (url);
+  req_token_resp_params := split_and_decode (cnt);
+  request_auth_url := get_keyword ('xoauth_request_auth_url', req_token_resp_params);
+  request_token := get_keyword ('oauth_token', req_token_resp_params);
+  request_secret := get_keyword ('oauth_token_secret', req_token_resp_params);
+
+  insert into DB.DBA.OAUTH_TOKEN_REQUESTS (OAUTH_REQ_TOKEN, OAUTH_REQ_SECRET) values (request_token, request_secret);
+  commit work;
+
+  -- TO DO:
+  -- Use a programmatically constructed authorize_path above in place of xoauth_request_auth_url
+  -- which must be set in the LinkedIn application settings?
+
+  -- Forward the user to the LinkedIn authorization server where they'll be asked to authorize this application
+  oauth_server_redirect_url := sprintf('%s?oauth_token=%s', request_auth_url, request_token);
+  return oauth_server_redirect_url;
 }
 ;
 
-create procedure DB.DBA.SYS_OAI_SPONGE_UP (in local_iri varchar, in get_uri varchar, in options any)
+create procedure DB.DBA.RDF_LOAD_TWITTER_REQUEST_ACCESS_TOKEN (in consumer_key varchar, in consumer_secret varchar)
 {
-  declare url, hdr, xt, xd, cnt any;
-  declare new_origin_uri, dest, graph_iri varchar;
-  new_origin_uri := cast (get_keyword_ucase ('get:uri', options, get_uri) as varchar);
-  graph_iri := get_uri;
-  dest := get_keyword_ucase ('get:destination', options);
-  for select OS_SERVER as _server from DB.DBA.OAI_SERVERS where get_uri like OS_URN_PATTERN || ':%' and OS_ENABLED = 1 do
-    {
-      declare exit handler for sqlstate '*'
-    {
-      return local_iri;
-    };
-      url := sprintf ('%s?verb=GetRecord&identifier=%s&metadataPrefix=oai_dc', _server, get_uri);
-      cnt := DB.DBA.RDF_HTTP_URL_GET (url, _server, hdr, proxy=>get_keyword_ucase ('get:proxy', options));
-      xt := xtree_doc (cnt);
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/oai2rdf.xsl', xt, vector ('baseUri', get_uri));
-      xd := serialize_to_UTF8_xml (xd);
-      if (dest is null)
-	RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, options);
-      DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
-    }
-  return local_iri;
+  declare url, cnt, req_token_resp_params any;
+  declare twitter_api_host, request_token_path, user_authorization_path, oauth_server_redirect_url varchar;
+  declare request_callback_confirmed, request_token, request_secret varchar;
+
+  declare exit handler for sqlstate '*'
+  {
+    log_message (sprintf ('RDF_LOAD_TWITTER_REQUEST_ACCESS_TOKEN exit handler:\n %s', __SQL_MESSAGE));
+    return 0;
+  };
+
+  twitter_api_host := 'https://api.twitter.com';
+  request_token_path := '/oauth/request_token';
+  user_authorization_path := '/oauth/authorize';
+
+  url := DB.DBA.sign_request ('GET', twitter_api_host || request_token_path, '', consumer_key, consumer_secret, null, null, 1);
+  cnt := http_get (url);
+  req_token_resp_params := split_and_decode (cnt);
+  request_callback_confirmed := get_keyword ('oauth_callback_confirmed', req_token_resp_params);
+  request_token := get_keyword ('oauth_token', req_token_resp_params);
+  request_secret := get_keyword ('oauth_token_secret', req_token_resp_params);
+
+  insert into DB.DBA.OAUTH_TOKEN_REQUESTS (OAUTH_REQ_TOKEN, OAUTH_REQ_SECRET) values (request_token, request_secret);
+  commit work;
+
+  -- Twitter authorization server URL to which user will be forwarded and asked to authorize this application
+  oauth_server_redirect_url := sprintf('%s?oauth_token=%s', twitter_api_host || user_authorization_path, request_token);
+  return oauth_server_redirect_url;
 }
 ;
 
-create procedure DB.DBA.LOAD_RDF_MAPPER_XBRL_ONTOLOGIES()
+create procedure DB.DBA.TWITTER_SAVE_ACCESS_TOKEN (
+  in tw_user_id varchar,
+  in tw_user_name varchar,
+  in tw_user_public_profile_url varchar,
+  in tw_app_site_url varchar,
+  in tw_app_id varchar,
+  in oauth_token varchar,
+  in oauth_secret varchar,
+  in oauth_token_expiry int
+  )
 {
-  if (registry_get ('RDF_MAPPER_XBRL_ONTOLOGIES') = '1')
-    return;
-  for select RES_CONTENT from WS.WS.SYS_DAV_RES where RES_FULL_PATH like '/DAV/VAD/rdf_mappers/ontologies/xbrl/%.owl.gz' do
-    {
-      declare str_out any;
-      str_out := gzip_uncompress (cast (RES_CONTENT as varchar));
-      DB.DBA.RDF_LOAD_RDFXML (str_out, 'http://www.openlinksw.com/schemas/xbrl/', 'http://www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/');
-    }
-  registry_set ('RDF_MAPPER_XBRL_ONTOLOGIES','1');
+  declare dt_expires datetime;
+
+  dt_expires := null;
+  if (oauth_token_expiry is not null and oauth_token_expiry > 0)
+    dt_expires := dateadd ('second', oauth_token_expiry , now ());
+  else
+    oauth_token_expiry := null;
+
+  insert soft DB.DBA.TWITTER_ACCESS_TOKENS (
+    TAT_GRANTOR_ID, TAT_GRANTOR_NAME, TAT_GRANTOR_URL, TAT_APP_SITE_URL, TAT_APP_ID,
+    TAT_ACCESS_TOKEN, TAT_ACCESS_TOKEN_SECRET, TAT_CREATED, TAT_LIFETIME, TAT_EXPIRES)
+    values (tw_user_id, tw_user_name, tw_user_public_profile_url, tw_app_site_url, tw_app_id, oauth_token, oauth_secret, now (), oauth_token_expiry, dt_expires);
 }
 ;
 
-RDF_GRAPH_GROUP_CREATE ('http://www.openlinksw.com/schemas/virtrdf#schemas', 1);
+create procedure DB.DBA.TWITTER_GET_ACCESS_TOKEN (in tw_screen_name varchar)
+{
+  declare access_token, secret varchar;
+  declare is_owner_key integer;
 
---registry_remove ('RM_LOAD_ONTOLOGIES');
+  -- is_owner_key:
+  -- 1 => returned access token was granted by the owner of the given public profile URL
+  -- 0 => returned access token was granted by some other user
 
-create procedure DB.DBA.RM_LOAD_ONTOLOGIES ()
-{
-  if (registry_get ('RM_LOAD_ONTOLOGIES') = '2')
-    return;
-  for select RES_CONTENT, RES_NAME from WS.WS.SYS_DAV_RES where RES_FULL_PATH like '/DAV/VAD/rdf_mappers/ontologies/owl/%.owl.gz' do
-    {
-      declare str_out, xt, owl_iri, base_iri, graph_iri any;
+  access_token := null;
+  secret := null;
+  is_owner_key := 1;
 
-      str_out := gzip_uncompress (cast (RES_CONTENT as varchar));
-      xt := xtree_doc (str_out);
-      owl_iri := cast (xpath_eval ('/RDF/Ontology/@about', xt) as varchar);
-      if (owl_iri is null)
-	owl_iri := cast (xpath_eval ('/RDF/Description[type[@resource = "http://www.w3.org/2002/07/owl#Ontology"]]/@about', xt) as varchar);
-      base_iri := cast (xpath_eval ('/RDF/@xml:base', xt) as varchar);
-      if (length (owl_iri))
-	graph_iri := owl_iri;
-      else if (length (base_iri))
-	graph_iri := base_iri;
-      else
-	{
-	  log_message ('Can not load: ' || RES_NAME);
-          goto skip_owl;
-	}
-      if (length (base_iri) = 0)
-        base_iri := graph_iri;
+  if (tw_screen_name is not null)
+  {
+    -- Find access token by Twitter screen name
+
+    -- First look for a non-expiring access token.
+    -- (Expiring tokens not supported by Twitter)
+    -- If more than one non-expiring access token exists in TWITTER_ACCESS_TOKENS
+    -- for the same user, all but the most recent are assumed to have been
+    -- revoked by the user and hence be invalid.
+    for (select top 1
+           TAT_ACCESS_TOKEN as _token,
+           TAT_ACCESS_TOKEN_SECRET as _secret
+         from
+           DB.DBA.TWITTER_ACCESS_TOKENS
+         where
+           TAT_GRANTOR_NAME = tw_screen_name and TAT_EXPIRES is null
+         order by TAT_CREATED desc
+        )
+    do
+    {
+      access_token := _token;
+      secret := _secret;
+    }
+
+    if (access_token is not null)
+      goto done;
+  }
 
-      DB.DBA.RDF_LOAD_RDFXML (str_out, base_iri, graph_iri);
-      RDF_GRAPH_GROUP_INS ('http://www.openlinksw.com/schemas/virtrdf#schemas', graph_iri);
-      skip_owl:;
-    }
-  registry_set ('RM_LOAD_ONTOLOGIES','2');
-}
-;
+  -- Use any available non-expiring access token to sign requests
+  for (select top 1
+       TAT_ACCESS_TOKEN as _token,
+       TAT_ACCESS_TOKEN_SECRET as _secret
+     from
+       DB.DBA.TWITTER_ACCESS_TOKENS
+     where
+       TAT_EXPIRES is null
+     order by TAT_CREATED desc
+    )
+  do
+  {
+    access_token := _token;
+    secret := _secret;
+    is_owner_key := 0;
+  }
 
+done:
+  return vector (access_token, secret, is_owner_key);
+}
+;
+
+-- Converts list of Twitter user IDs to Twitter user profiles
+create procedure DB.DBA.RDF_LOAD_TWITTER_V2_ID_TO_USER_PROFILE (
+  in xml_id_list any,
+  inout next_cursor integer,
+  in item_limit integer,
+  in screen_name varchar,
+  in what varchar,
+  in new_origin_uri varchar,
+  in dest varchar,
+  in graph_iri varchar,
+  in consumer_key varchar,
+  in consumer_secret varchar,
+  in oauth_token varchar,
+  in oauth_secret varchar,
+  inout triple_dict any
+  )
+{
+  declare xt, cnt, xd any;
+  declare ids, tw_batch any;
+  declare id_count, id_limit, tw_batch_count, tw_batch_limit integer;
+  declare tw_param varchar;
+  declare url, api_url, api_params any;
+
+  xd := xtree_doc (xml_id_list);
+  next_cursor := atoi (cast (xpath_eval ('//next_cursor', xd) as varchar));
+  ids := xpath_eval ('/id_list/ids/id/text()', xd, 0);
+  id_count := 0;
+  id_limit := length (ids);
+  tw_batch_count := 0;
+  tw_batch_limit := 100; -- Twitter limit of no. of comma separated IDs accepted by API /1/users/lookup.xml
+  tw_param := '';
+
+  if (item_limit > 0 and id_limit > item_limit)
+    id_limit := item_limit;
+
+  foreach (any id in ids) do
+  {
+    declare id_str varchar;
 
-DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('xbrl_rule1', 1, '/schemas/xbrl/(.*)', vector('path'), 1,
-'/sparql?query=DESCRIBE%%20%%3Chttp%%3A//www.openlinksw.com/schemas/xbrl/%U%%3E%%20FROM%%20%%3Chttp%%3A//www.openlinksw.com/schemas/RDF_Mapper_Ontology/1.0/%%3E',
-vector('path'), null, '(text/rdf.n3)|(application/rdf.xml)', 0, null);
+    id_count := id_count + 1;
+    tw_batch_count := tw_batch_count + 1;
+    id_str := cast (id as varchar);
+    tw_param := tw_param || id_str || ',';
 
-DB.DBA.URLREWRITE_CREATE_RULELIST ('xbrl_rule_list1', 1, vector('xbrl_rule1'));
+    if (tw_batch_count = tw_batch_limit or id_count = id_limit)
+    {
+      api_url := 'https://api.twitter.com/1/users/lookup.xml';
+      api_params := sprintf ('user_id=%s', trim (tw_param, ','));
+      url := DB.DBA.sign_request ('GET', api_url, api_params, consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+      cnt := http_get (url);
 
-DB.DBA.VHOST_REMOVE (lpath=>'/schemas/xbrl');
+      xd := xtree_doc (cnt);
+      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter_rest_api2rdf.xsl', xd,
+        vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', what, 'primary_user_screen_name', screen_name));
+      xd := serialize_to_UTF8_xml (xt);
 
-DB.DBA.VHOST_DEFINE (lpath=>'/schemas/xbrl', ppath=>'/DAV/VAD/rdf_mappers/ontologies/xbrl/msft2007.owl', vsp_user=>'dba', is_dav=>1, is_brws=>0, opts=>vector ('url_rewrite', 'xbrl_rule_list1'));
--- dbpedia_extract.php
+      DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
 
-CREATE PROCEDURE RDFMAP_DBPEDIA_EXTRACT_PHP (in base varchar, in title varchar)
-{
-  declare ses any;
-  ses := string_output ();
-  http ('<?php\n', ses);
-  http (sprintf ('\x24basePath = "%s";\n', base), ses);
-  http (sprintf ('\x24pageTitlesEn[] = "%s";\n', title), ses);
-  http ('\n', ses);
-  http ('set_include_path (\x24basePath.\':\'.\x24basePath.\'/extractors:\'.\x24basePath.\'/destinations\');\n', ses);
-  http ('require_once \'dbpedia.php\';\n', ses);
-  http ('\n', ses);
-  http ('\x24manager = new ExtractionManager();\n', ses);
-  http ('\x24jobEnWiki = new ExtractionJob (new LiveWikipediaCollection("en"), new ArrayObject(\x24pageTitlesEn));\n', ses);
-  http ('\n', ses);
-  http ('\x24group = new ExtractionGroup(new SimpleDumpDestination());\n', ses);
-  http ('\x24group->addExtractor(new LabelExtractor());\n', ses);
-  http ('\x24group->addExtractor(new ArticleCategoriesExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new PageLinksExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new WikipageExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new ActiveAbstractExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new PersondataExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new ChemboxExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new GeoExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new DisambiguationExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new CharacterCountExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new RedirectExtractor ());\n', ses);
-  http ('\x24group->addExtractor(new HomepageExtractor ());\n', ses);
-  http ('\x24jobEnWiki->addExtractionGroup(\x24group);\n', ses);
-  http ('\n', ses);
-  http ('\x24manager->execute(\x24jobEnWiki);\n', ses);
-  http ('?>\n', ses);
-  return string_output_string (ses);
+      tw_param := '';
+      tw_batch_count := 0;
+    }
+
+    if (id_count = id_limit)
+      goto done;
+  }
+done:;
 }
 ;
 
---no_c_escapes-
--- Cartridge for sponging Powerpoint PPTX files.
-
-create procedure DB.DBA.RDF_LOAD_PPTX_DOCUMENT (
-in graph_iri varchar, in new_origin_uri varchar, in dest varchar,
-inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any
-)
+-- Twitter cartridge v2 - Uses Twitter REST API and OAuth.
+-- Twitter cartridge v1 (RDF_LOAD_TWITTER) uses old API and HTTP basic authentication.
+create procedure DB.DBA.RDF_LOAD_TWITTER_V2 (in graph_iri varchar, in new_origin_uri varchar, in dest varchar,
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare urihost, baseUri, original_dest varchar;
-  declare core_meta, app_meta, slides_meta varchar;
-  declare slide_list, slide_vec, slide_content, slide_path any;
-  declare meta_xml, tmpFile, fileName, fileExt varchar;
-  declare xt, xd any;
-  declare extracted_image_collection_dav_root, extracted_image_collection_dav_path varchar;
-  declare dav_uid, dav_pwd varchar;
+  declare xt, cnt, xd any;
+  declare url, api_url, api_params any;
+  declare is_owner_key integer;
+  declare tmp any;
+  declare consumer_key, consumer_secret, oauth_token, oauth_secret varchar;
+  declare oauth_keys any;
+  declare twitter_error, tw_screen_name, id, what varchar;
+  declare friends_n_followers_pg_limit, friends_n_followers_item_limit, favorites_pg_limit, user_timeline_pg_limit integer;
+  declare next_cursor, page, empty_test integer;
 
   declare exit handler for sqlstate '*'
   {
-    DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
+    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+    log_message (sprintf ('%s Error: %s', current_proc_name (), __SQL_MESSAGE));
     return 0;
   };
-  if (__proc_exists ('unzip_file', 2) is null)
-    return 0;
 
-  dav_uid := 'dav';
-  dav_pwd := (select pwd_magic_calc (U_NAME, U_PASSWORD, 1) from SYS_USERS where U_NAME=dav_uid);
+  consumer_key := get_keyword ('consumer_key', opts);
+  consumer_secret := get_keyword ('consumer_secret', opts);
+  if (length (consumer_key) = 0 or length (consumer_secret) = 0)
+  {
+    log_message (sprintf ('%s: No API keys (consumer key and secret) are configured', current_proc_name()));
+    return 0;
+  }
 
-  -- Create a tmp file from input stream
-  tmpFile := tmp_file_name ('rdfm', 'pptx');
-  string_to_file (tmpFile, _ret_body, -2);
-  -- Extract the required meta-data from the PPTX file
-  core_meta := unzip_file (tmpFile, 'docProps/core.xml');
-  app_meta := unzip_file (tmpFile, 'docProps/app.xml');
-  slides_meta := unzip_file (tmpFile, 'ppt/_rels/presentation.xml.rels');
-  if (core_meta is null or app_meta is null or slides_meta is null)
+  -- Limits:
+  --
+  -- Because some Twitter API responses can return thousands of items, the following
+  -- cartridge options are available to set configurable limits on the number of items returned.
+  -- A value of 0 indicates no limit.
+  --
+  -- friends_n_followers_pg_limit
+  --     Limits the number of pages of friends or followers returned.
+  --     Each page can contain up to 5000 items.
+  -- friends_n_followers_item_limit
+  --     Overrides friends_n_followers_pg_limit.
+  --     Limits the number of friends or followers returned to the specified number
+  --     where 1 < friends_n_followers_limit <= 5000. 0 indicates no limit.
+  -- favorites_pg_limit
+  --     Limits the number of pages of favorites returned.
+  --     Each page can contain up to 20 items.
+  -- user_timeline_pg_limit
+  --     Limits the number of tweets returned as part of a user timeline.
+  --     Each page can contain up to 20 items.
+
+  friends_n_followers_pg_limit := coalesce (atoi(get_keyword ('friends_n_followers_pg_limit', opts)), 0);
+  if (friends_n_followers_pg_limit < 0)
+    friends_n_followers_pg_limit := 0;
+
+  friends_n_followers_item_limit := coalesce (atoi(get_keyword ('friends_n_followers_item_limit', opts)), 0);
+  if (friends_n_followers_item_limit < 0 or friends_n_followers_item_limit > 5000)
+    friends_n_followers_item_limit := 0;
+  if (friends_n_followers_item_limit > 0)
+    friends_n_followers_pg_limit := 1;
+
+  favorites_pg_limit := coalesce (atoi(get_keyword ('favorites_pg_limit', opts)), 0);
+  if (favorites_pg_limit < 0)
+    favorites_pg_limit := 0;
+
+  user_timeline_pg_limit := coalesce (atoi(get_keyword ('user_timeline_pg_limit', opts)), 0);
+  if (user_timeline_pg_limit < 0)
+    user_timeline_pg_limit := 0;
+
+  if (subseq (new_origin_uri, 0, 5) = 'https')
+    new_origin_uri := 'http' || subseq (new_origin_uri, 5);
+
+  if (new_origin_uri like 'http://twitter.com/%/status/%')
+  {
+    -- Handle this URI format to allow bridging from a tweet to a reply
+    tmp := sprintf_inverse (new_origin_uri, 'http://twitter.com/%s/status/%s', 0);
+    tw_screen_name := tmp[0];
+    id := tmp[1];
+    what := 'status';
+  }
+  else if (new_origin_uri like 'http://twitter.com/%')
+  {
+    -- This URI format is intended as the usual starting point for sponging.
+    -- i.e. http://twitter.com/{screen_name}
+    tmp := sprintf_inverse (new_origin_uri, 'http://twitter.com/%s', 0);
+    tw_screen_name := tmp[0];
+    tw_screen_name := subseq (tw_screen_name, 0, strchr (tw_screen_name, '/'));
+    tw_screen_name := subseq (tw_screen_name, 0, strchr (tw_screen_name, '#'));
+    what := 'user';
+  }
+  else
+  {
     return 0;
-  urihost := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
-  fileExt := regexp_substr('.*(\.pptx|\.PPTX)\$', new_origin_uri, 1);
-  fileName := subseq(new_origin_uri, strrchr(new_origin_uri, '/') + 1);
-  extracted_image_collection_dav_root :='/DAV/home/dav/sponged/';
-  extracted_image_collection_dav_path := extracted_image_collection_dav_root || fileName || '/';
+  }
 
-  -- Override dest so graph URI doesn't refer to original location of the source .PPTX file
-  -- Using a fixed URL, instead of the source document URL, as the graph name makes
-  -- creating rewrite rules easier. The same rewrite rules can be used for all sponged .PPTX files.
-  original_dest := coalesce(dest, graph_iri);
-  -- Disabled - Breaks description.vsp
-  -- dest := 'http://' || urihost || '/PPTX';
-  -- baseUri := dest || '/' || fileName;
-  dest := original_dest;
-  baseUri := original_dest;
+  oauth_keys := DB.DBA.TWITTER_GET_ACCESS_TOKEN (tw_screen_name);
+  oauth_token := oauth_keys[0];
+  oauth_secret := oauth_keys[1];
+  is_owner_key := oauth_keys[2];
 
-  -- Construct graph $original_dest which contains link to graph $dest created solely for sponged PPTX metadata
+  if (oauth_token is null or oauth_secret is null)
   {
-    declare ses, tmp any;
-
-    ses := string_output ();
-    http ('<rdf:RDF', ses);
-    http ('  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n', ses);
-    http ('  xmlns:http="http://www.w3.org/2006/http#"\n', ses);
-    http ('  xmlns:dc="http://purl.org/dc/elements/1.1/"\n', ses);
-    http ('>\n', ses);
-    http ('<rdf:Description rdf:about="' || original_dest || '">\n', ses);
-    http ('<dc:relation rdf:resource="' || baseUri || '"/>\n', ses);
-    http ('</rdf:Description>\n', ses);
-    http ('</rdf:RDF>\n', ses);
-    tmp := string_output_string (ses);
-    DB.DBA.RDF_LOAD_RDFXML (tmp, new_origin_uri, original_dest);
+    log_message ('TWITTER_GET_ACCESS_TOKEN: No access tokens are available to sign Twitter API requests');
+    return 0;
   }
 
-  -- Get base RDF description of presentation
-  meta_xml := vector(core_meta, app_meta);
-  foreach (any meta in meta_xml) do
+  --
+  -- Get Tweet details
+  --
+  if (what = 'status')
   {
-    xt := xtree_doc (meta);
-    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
-            vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt));
+    api_url := sprintf('https://api.twitter.com/1/statuses/show/%s.xml', id);
+    -- Authorization/signed request not needed for Tweets.
+    cnt := http_get (api_url);
+    xd := xtree_doc (cnt);
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter_rest_api2rdf.xsl', xd,
+      vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', what, 'primary_user_screen_name', tw_screen_name));
     xd := serialize_to_UTF8_xml (xt);
-    DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+
+    RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+    goto done;
   }
 
-  -- Get a colon-delimited list of slides contained in the presentation
-  xt := xtree_doc (slides_meta);
-  xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
-          vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt, 'mode', 'get_slide_list'));
-  slide_list := serialize_to_UTF8_xml (xd);
+  --
+  -- Get Twitter user profile
+  --
+  api_url := 'https://api.twitter.com/1/users/show.xml';
+  api_params := sprintf ('screen_name=%s', tw_screen_name);
+  url := DB.DBA.sign_request ('GET', api_url, api_params, consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+  cnt := http_get (url);
+  xd := xtree_doc (cnt);
+  twitter_error := cast (xpath_eval ('/hash/error', xd) as varchar);
+  if (length (twitter_error) <> 0)
+  {
+    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, twitter_error); 	
+    log_message (sprintf ('%s Error: %s', current_proc_name (), twitter_error));
+    return 0;
+  }
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter_rest_api2rdf.xsl', xd,
+    vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', 'user', 'primary_user_screen_name', tw_screen_name));
+  xd := serialize_to_UTF8_xml (xt);
 
-  -- Transform slide list into a vector
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+
+  --
+  -- Get friends: up to 5000 per page
+  --
+  next_cursor := -1;
+  page := 0;
+  api_url := 'https://api.twitter.com/1/friends/ids.xml';
+  while (friends_n_followers_pg_limit = 0 or page < friends_n_followers_pg_limit)
   {
-    declare tmp, _start, _end any;
-    slide_vec := vector();
-    tmp := slide_list;
-    -- First slide occurs after first ':'
-    _start := strchr(tmp, ':');
-    while (_start is not null)
-    {
-      tmp := subseq(tmp, _start + 1);
-      _end := strchr(tmp, ':');
-      slide_path := subseq(tmp, 0, _end);
-      slide_vec := vector_concat (slide_vec, vector(slide_path));
-      _start := _end;
-    }
+    api_params := sprintf ('screen_name=%s&cursor=%d', tw_screen_name, next_cursor);
+    url := DB.DBA.sign_request ('GET', api_url, api_params, consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+    cnt := http_get (url);
+    DB.DBA.RDF_LOAD_TWITTER_V2_ID_TO_USER_PROFILE (cnt, next_cursor, friends_n_followers_item_limit, tw_screen_name, 'friends', new_origin_uri,
+      dest, graph_iri, consumer_key, consumer_secret, oauth_token, oauth_secret, triple_dict);
+    if (next_cursor = 0)
+      goto friends_done;
+    page := page + 1;
   }
 
-  -- Handle any embedded images
+friends_done:;
+
+  --
+  -- Get followers: up to 5000 per page
+  --
+  next_cursor := -1;
+  page := 0;
+  api_url := 'https://api.twitter.com/1/followers/ids.xml';
+  while (friends_n_followers_pg_limit = 0 or page < friends_n_followers_pg_limit)
   {
-    declare create_dav_col int;
-    create_dav_col := 1;
+    api_params := sprintf ('screen_name=%s&cursor=%d', tw_screen_name, next_cursor);
+    url := DB.DBA.sign_request ('GET', api_url, api_params, consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+    cnt := http_get (url);
+    DB.DBA.RDF_LOAD_TWITTER_V2_ID_TO_USER_PROFILE (cnt, next_cursor, friends_n_followers_item_limit, tw_screen_name, 'followers', new_origin_uri,
+      dest, graph_iri, consumer_key, consumer_secret, oauth_token, oauth_secret, triple_dict);
+    if (next_cursor = 0)
+      goto followers_done;
+    page := page + 1;
+  }
 
-    foreach (any slide_path2 in slide_vec) do
-    {
-      declare slide_rels, slide_basename, slide_num varchar;
-      declare slide_images, image_path, image_vec any;
+followers_done:;
 
-      -- slide path takes form 'slides/slide<n>.xml'
-      slide_basename := subseq(slide_path2, 7);
-      slide_num := regexp_substr('[0-9]+', slide_basename, 0);
-      slide_rels := unzip_file (tmpFile, 'ppt/slides/_rels/' || slide_basename || '.rels'); 
+  --
+  -- Get favorites: up to 20 per page
+  --
+  page := 1;
+  api_url := 'https://api.twitter.com/1/favorites.xml';
+  while (favorites_pg_limit = 0 or page <= favorites_pg_limit)
+  {
+    api_params := sprintf ('id=%s&page=%d', tw_screen_name, page);
+    url := DB.DBA.sign_request ('GET', api_url, api_params, consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+    cnt := http_get (url);
+    xd := xtree_doc (cnt);
+    empty_test := length (cast (xpath_eval ('//status', xd) as varchar));
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter_rest_api2rdf.xsl', xd,
+      vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', 'favorites', 'primary_user_screen_name', tw_screen_name));
+    xd := serialize_to_UTF8_xml (xt);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
 
-      -- Generate RDF description of each embedded image
-      xt := xtree_doc (slide_rels);
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
-             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt, 'mode',
-	             'get_image_descs', 'slideNum', slide_num, 'imageDavPath', extracted_image_collection_dav_path));
-      if (xpath_eval('//text()', xd) is not null)
-      {
-        xd := serialize_to_UTF8_xml (xd);
-        DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-      }
+    if (empty_test = 0)
+      goto favorites_done;
+    page := page + 1;
+  }
 
-      -- Extract each embedded image file and place it in DAV storage
-      xt := xtree_doc (slide_rels);
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
-             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt, 'mode', 'get_image_file_list'));
-      slide_images := serialize_to_UTF8_xml (xd);
-      -- slide_images is colon separated list of images in the slide
-      -- e.g. :../media/image4.png:../media/image5.png
+favorites_done:;
 
-      -- Transform image list into a vector
-      {
-        declare tmp, _start, _end any;
-        image_vec := vector();
-        tmp := slide_images;
-        -- First image occurs after first ':'
-        _start := strchr(tmp, ':');
-        while (_start is not null)
-        {
-          tmp := subseq(tmp, _start + 1);
-          _end := strchr(tmp, ':');
-          image_path := subseq(tmp, 0, _end);
-          image_vec := vector_concat (image_vec, vector(image_path));
-          _start := _end;
-        }
-      }
+  --
+  -- Get user timeline: up to 20 tweets per page
+  --
+  page := 1;
+  api_url := 'https://api.twitter.com/1/statuses/user_timeline.xml';
+  -- api_params := sprintf ('id=%s&count=200', tw_screen_name);
+  api_params := sprintf ('id=%s', tw_screen_name);
+  while (user_timeline_pg_limit = 0 or page <= user_timeline_pg_limit)
+  {
+    url := DB.DBA.sign_request ('GET', api_url, api_params, consumer_key, consumer_secret, oauth_token, oauth_secret, 1);
+    cnt := http_get (url);
+    xd := xtree_doc (cnt);
+    empty_test := length (cast (xpath_eval ('//status', xd) as varchar));
+    xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/twitter_rest_api2rdf.xsl', xd,
+      vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'what', 'user_timeline', 'primary_user_screen_name', tw_screen_name));
+    xd := serialize_to_UTF8_xml (xt);
+    DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
 
-      -- Copy each image file to DAV
-      foreach (any img_path in image_vec) do
-      {
-        declare image_basename, image_str, image_ext, image_mime_type varchar;
+    if (empty_test = 0)
+      goto user_timeline_done;
+    page := page + 1;
+  }
 
-        -- Extract file e.g. ../media/image4.png
-	image_mime_type := null;
-        image_basename := regexp_substr('(media/)(.+)', image_path, 2);
-	image_ext := subseq(lcase(image_basename), strrchr(image_basename, '.') + 1);
-	if (image_ext is not null)
-	{
-	  image_mime_type := case
-	    when (image_ext = 'bmp') then 'image/bmp'
-	    when (image_ext = 'gif') then 'image/gif'
-	    when (image_ext = 'jpeg') then 'image/jpeg'
-	    when (image_ext = 'jpg') then 'image/jpeg'
-	    when (image_ext = 'png') then 'image/png'
-	    when (image_ext = 'svg') then 'image/svg+xml'
-	    when (image_ext = 'tiff') then 'image/tiff'
-	    when (image_ext = 'tif') then 'image/tiff'
-	    end;
+user_timeline_done:;
+
+done:;
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+  return 1;
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_KLOUT (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+	declare xd, xt, url, baseurl, baseurls, response, mode any;
+	declare kuser varchar;
+	declare i integer;
+	
+	declare exit handler for sqlstate '*' {
+		DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+		return 0;
+	};
+	
+	if (_key is null) {
+		log_message ('Klout: Extractor cartridge needs API key');
+		return 0;
 	}
-	else
-	{
-	  --dbg_printf('.PPTX Cartridge - Error: image_mime_type is null for embedded image %s', image_basename);
-	  ;
+	
+	kuser:=regexp_replace(new_origin_uri, '^http://(www.)?(klout|twitter).com/([a-zA-Z0-9]+).*', '\\3');
+	
+	baseurl:='http://api.klout.com/1/';
+	baseurls:=vector(
+		'users/show.xml', 'show',								-- includes klout.xml data as well
+		'users/topics.xml', 'topics',
+		'soi/influenced_by.xml', 'influencers',
+		'soi/influencer_of.xml', 'influences'
+		);
+		
+	for (i:=0; i<length(baseurls); i:=i+2) {
+		url:=aref(baseurls, i);
+		mode:=aref(baseurls, i+1);
+		url:=sprintf('%s%s?users=%s&key=%s', baseurl, url, kuser, _key);
+		response := http_get (url, null, 'GET', null, '', get_keyword_ucase ('get:proxy', opts));
+		xt := xtree_doc(response);
+		xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/klout2rdf.xsl', xt, 
+		vector ('baseUri', new_origin_uri, 'mode', mode));
+		xd := blob_to_string_output (xt);
+		if (i=0) {
+			RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+		}
+		DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+		DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), null);
 	}
+	return 1;
+}
+;
 
-	if (image_basename is not null and image_mime_type is not null)
-	{
-          image_str := unzip_file (tmpFile, 'ppt/media/' || image_basename);
-	  if (image_str is not null)
-	  {
-	    declare rc int;
+create procedure DB.DBA.RDF_LOAD_JIGSAW (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, 
+    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
+{
+  declare api_key, hdr, ret_body, tmp, jgsw_params, xd, xt any;
+  declare vec any;
+  declare jgsw_id, jgsw_name, contact_name, first_name, last_name, company_name, url varchar;
+  declare total_hits, retries, pos integer;
 
-            if (create_dav_col)
-	    {
-              rc := DB.DBA.DAV_COL_CREATE(extracted_image_collection_dav_root, '110110110R', 'dav','dav', dav_uid, dav_pwd);
-	      if (rc >= 0 or rc = (-3) )
-	      {
-		DB.DBA.DAV_DELETE(extracted_image_collection_dav_path, 1, dav_uid, dav_pwd);
-                rc := DB.DBA.DAV_COL_CREATE(extracted_image_collection_dav_path, '110110110R', 'dav','dav', dav_uid, dav_pwd);
-	      }
-	      if (rc >= 0)
-	        create_dav_col := 0;
-              else
-	        dbg_printf('.PPTX Cartridge - DAV_COL_CREATE failed(%d): %s', rc, extracted_image_collection_dav_path);
-	    }
+  declare exit handler for sqlstate '*'
+    {
+      DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
+      return 0;
+    };
 
-	    if (create_dav_col = 0)
-	    {
-              rc := DB.DBA.DAV_RES_UPLOAD (extracted_image_collection_dav_path || image_basename, image_str, image_mime_type,'110110110R','dav','dav', dav_uid, dav_pwd);
-	      if (rc < 0)
-	        dbg_printf('.PPTX Cartridge - DAV_RES_UPLOAD failed (%d) with file %s', rc, extracted_image_collection_dav_path || image_basename);
-	    }
-	  }
-	  else
-	  {
-	    --dbg_printf('.PPTX Cartridge - Error: image_str is null for embedded image %s', image_basename);
-	    ;
-	  }
-	}
-      }
-    }
-  }
-  -- end: Embedded image handling
+  api_key := _key;
+  if (not isstring (api_key))
+    return 0;
 
-  --Get text content of all slides
+  -- Sample URIs
+  -- 
+  -- Business:
+  --   http://www.jigsaw.com/id173663/openlink_software_inc_company.xhtml
+  -- 
+  -- Contact: (Both identify the same person)
+  --   http://www.jigsaw.com/BC.xhtml?contactId=13697357
+  --   http://www.jigsaw.com/scid13697357/vinod_khosla.xhtml
+
+  jgsw_id := null;
+  jgsw_name := null;
+
+
+  if (new_origin_uri like 'http://www.jigsaw.com/%/%.xhtml')
   {
-    declare presentation_text, slide_text, ses1, ses2, tmp2 any;
-    declare slide_basename varchar;
+    tmp := sprintf_inverse (new_origin_uri, 'http://www.jigsaw.com/%sid%s/%s.xhtml', 0);
+    jgsw_id := tmp[1];
+    jgsw_name := tmp[2];
+  }
+  else if (new_origin_uri like 'http://www.jigsaw.com/BC.xhtml?contactId=%')
+  {
+    -- Jigsaw API doesn't currently support searching by ID, only search by (company or contact) name
+    -- tmp := sprintf_inverse (new_origin_uri, 'http://www.jigsaw.com/BC.xhtml?contactId=%s', 0);
+    -- jgsw_id := tmp[0];
+    return 0;
+  }
+  else
+    return 0;
 
-    -- Get the raw text contained in each slide and concatenate it
-    presentation_text := '';
-    ses1 := string_output();
-    foreach (any slide_path3 in slide_vec) do
-    {
-      declare slideUri varchar;
 
-      -- slide path takes form 'slides/slide<n>.xml'
-      slide_basename := subseq(slide_path3, 7);
-      slideUri :=  baseUri || '#' || subseq(slide_basename, 0, strrchr(slide_basename, '.'));
-      slide_content := unzip_file (tmpFile, 'ppt/' || slide_path3); 
-      if (slide_content is null)
-      {
-        --dbg_printf('.PPTX Cartridge - Error: slide content is null for slide %s\n', slide_path3);
-        goto next_slide;
-      }
+  if (jgsw_name is null)
+    return 0;
+
+  company_name := jgsw_name;
+  contact_name := jgsw_name;
+  retries := 0;
+
+searchForContact: 
+
+  pos := strchr (contact_name, '_');
+  if (pos is null or (pos = length (contact_name) - 1))
+    goto searchForCompany;
 
-      xt := xtree_doc (slide_content);
-      xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
-             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt,
-	             'mode', 'raw_slide_content'));
-      slide_text := cast(xpath_eval('/slide_text/text()', xd) as varchar);
-      http(slide_text || ' ', ses1);
+  first_name := subseq (contact_name, 0, pos);
+  last_name := subseq (contact_name, pos + 1);
 
-      --dbg_printf('.PPTX Cartridge - slide text\n');
-      --dbg_printf('%s', slide_text || ' ' );
-      --dbg_printf('<<');
+  -- The Jigsaw search API doesn't appear capable of handling multi-part surnames
+  -- e.g. http://www.jigsaw.com/scid13249678/william_van_dyke.xhtml"
+  -- even when 'van dyke' is URL-encoded.
+  -- As a workaround, search on 'van' then filter the results.
+  pos := strchr (last_name, '_');
+  if (pos is not null)
+  {
+    last_name := subseq (last_name, 0, pos);
+  }
 
-      -- Get text from each individual slide as RSS content:encoded
-      xt := xtree_doc (slide_content);
-      xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/pptx2rdf.xsl', xt,
-             vector ('baseUri', baseUri, 'sourceDoc', original_dest, 'urihost', urihost, 'fileExt', fileExt,
-	             'mode', 'html_encode_slide_content', 'slideUri', slideUri));
-      xd := serialize_to_UTF8_xml (xt);
-      DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
+  jgsw_params := sprintf ('firstname=%U&lastname=%U', first_name, last_name);
+  url := sprintf ('https://www.jigsaw.com/rest/searchContact.xml?token=%s&%s', api_key, jgsw_params);
+  ret_body := http_client_ext (url, headers=>hdr, timeout=>30, proxy=>get_keyword_ucase ('get:proxy', opts));
 
-      -- Construct RDF to hold text from each individual slide
-      -- ses2 := string_output();
-      -- http ('<rdf:RDF', ses2);
-      -- http ('  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n', ses2);
-      -- http ('  xmlns:http="http://www.w3.org/2006/http#"\n', ses2);
-      -- http ('  xmlns:bibo="http://purl.org/ontology/bibo/"\n', ses2);
-      -- http ('>\n', ses2);
-      -- http ('<rdf:Description rdf:about="' || slideUri || '">\n', ses2);
-      -- http ('<bibo:content>\n', ses2);
-      -- http (slide_text || ' ', ses2);
-      -- http ('</bibo:content>\n', ses2);
-      -- http ('</rdf:Description>\n', ses2);
-      -- http ('</rdf:RDF>\n', ses2);
-      -- tmp2 := string_output_string (ses2);
-      -- DB.DBA.RDF_LOAD_RDFXML (tmp2, new_origin_uri, coalesce (dest, graph_iri));
-next_slide:
-        ;
-    }
 
-    presentation_text := string_output_string (ses1);
+  xd := xtree_doc (ret_body);
+  total_hits := atoi (cast (xpath_eval ('//totalHits', xd) as varchar));
 
-    --dbg_printf('.PPTX Cartridge - presentation text:');
-    --dbg_printf('%s', presentation_text);
-    --dbg_printf('<<');
+  if (total_hits > 1)
+  {
+    -- The Jigsaw API doesn't currently support searching by ID, only search by 
+    -- (company or contact) name. Until Jigsaw supports search by ID, the possibility 
+    -- remains of a query returning several contacts with the same name, either 
+    -- several people with the same name, or the same person holding positions
+    -- in different companies. e.g. Vinod Khosla
+
+    -- In the absence of search-by-ID, in the stylesheet, we filter the result 
+    -- based on the contactId extracted from the URL
+    ;
+  }
 
-    -- Construct RDF to hold combined text from *all* slides
-    {
-      declare ses, tmp any;
+  if (total_hits > 0) -- The Jigsaw URL identifies a contact, not a company
+    goto load_rdf;
 
-      ses := string_output ();
-      http ('<rdf:RDF', ses);
-      http ('  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n', ses);
-      http ('  xmlns:http="http://www.w3.org/2006/http#"\n', ses);
-      http ('  xmlns:bibo="http://purl.org/ontology/bibo/"\n', ses);
-      http ('  xmlns:dc="http://purl.org/dc/elements/1.1/"\n', ses);
-      http ('  xmlns:sioc="http://rdfs.org/sioc/ns#"\n', ses);
-      http ('>\n', ses);
-      http ('<rdf:Description rdf:about="' || baseUri || '">\n', ses);
+searchForCompany: 
+  company_name := replace (company_name, '_', ',');
 
-      http ('<bibo:content>\n', ses);
-      http (presentation_text, ses);
-      http ('</bibo:content>\n', ses);
+  url := sprintf ('https://www.jigsaw.com/rest/searchCompany.xml?token=%s&name=%s', api_key, company_name);
+  ret_body := http_client_ext (url, headers=>hdr, timeout=>30, proxy=>get_keyword_ucase ('get:proxy', opts));
+  xd := xtree_doc (ret_body);
+  total_hits := atoi(cast(xpath_eval ('//totalHits', xd) as varchar));
+  if (total_hits > 1)
+  {
+    -- Shouldn't happen, but see above.
+    -- Filter the result in the stylesheet based on the companyId extracted from the URL
+    ;
+  }
 
-      http ('</rdf:Description>\n', ses);
-      http ('</rdf:RDF>\n', ses);
-      tmp := string_output_string (ses);
-      DB.DBA.RDF_LOAD_RDFXML (tmp, new_origin_uri, coalesce (dest, graph_iri));
+  if (total_hits = 0)
+  {
+    if (retries = 0)
+    {
+      -- The company name embedded in the Jigsaw URL, when broken down, isn't always accepted by the Jigsaw API
+      -- e.g. With http://www.jigsaw.com/id173663/openlink_software_inc_company.xhtml
+      --   "/rest/searchCompany.xml?...&name=openlink,software" - Works
+      --   "/rest/searchCompany.xml?...&name=openlink,software,inc" - Works
+      --   "/rest/searchCompany.xml?...&name=openlink,software,inc,company" - Fails
+      -- Not all Jigsaw company URLs include a _company suffix.
+      -- Retry without the trailing "_company"
+      retries := 1;
+      company_name := jgsw_name;
+      vec := regexp_parse('.*(_company)$', company_name, 0);
+      if (vec is not null)
+        company_name := subseq(company_name, 0, vec[2]);
+      goto searchForCompany;
     }
-    --dbg_printf('.PPTX Cartridge - Presentation text extraction done');
+    else
+      return 0;
   }
 
-  --dbg_printf('.PPTX Cartridge - All done');
-
+load_rdf:
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/jigsaw2rdf.xsl', xd, vector ('baseUri', RDF_SPONGE_DOC_IRI (dest, graph_iri), 'jgsw_id', jgsw_id));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
   return 1;
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_MBZ_1 (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    in kind varchar, in id varchar, in inc varchar, inout opts any)
-{
-  declare uri, cnt, xt, xd, hdr any;
-  uri := sprintf ('http://musicbrainz.org/ws/1/%s/%s?type=xml&inc=%U', kind, id, inc);
-  cnt := DB.DBA.RDF_HTTP_URL_GET (uri, '', hdr, 'GET', 'Accept: */*', proxy=>get_keyword_ucase ('get:proxy', opts));
-  xt := xtree_doc (cnt);
-  xd := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/mbz2rdf.xsl', xt, vector ('baseUri', RDF_SPONGE_DOC_IRI (new_origin_uri)));
-  xd := serialize_to_UTF8_xml (xd);
-  DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
-  DB.DBA.RM_ADD_PRV (current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), uri);
-};
-
-create procedure DB.DBA.RDF_LOAD_MBZ (in graph_iri varchar, in new_origin_uri varchar,  in dest varchar,
-    inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any)
+create procedure DB.DBA.RDF_LOAD_NYT_ARTICLE (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout _ret_body any, inout aq any, inout ps any, inout _key any, inout opts any, in triple_dict any := null)
 {
-  declare kind, id varchar;
-  declare tmp, incs any;
-  declare uri, cnt, hdr, inc, xd, xt varchar;
+  declare xd, xt, tmp, url, article_url, desired_response_fields, hdr any;
+  declare response_fields varchar;
 
-  tmp := regexp_parse ('http://musicbrainz.org/([^/]*)/([^\.]+)', new_origin_uri, 0);
   declare exit handler for sqlstate '*'
-    {
-      DB.DBA.RM_RDF_SPONGE_ERROR (current_proc_name (), graph_iri, dest, __SQL_MESSAGE);
-      return 0;
-    };
-  if (length (tmp) < 6)
+  {
+    DB.DBA.RM_RDF_SPONGE_ERROR (triple_dict, current_proc_name (), graph_iri, dest, __SQL_MESSAGE); 	
     return 0;
+  };
 
-  kind := subseq (new_origin_uri, tmp[2], tmp[3]);
-  id :=   subseq (new_origin_uri, tmp[4], tmp[5]);
-  incs := vector ();
-  if (kind = 'artist')
-    {
-      inc := 'aliases artist-rels label-rels release-rels track-rels url-rels';
-      incs :=
-      	vector (
-	'sa-Album', 'sa-Single', 'sa-EP', 'sa-Compilation', 'sa-Soundtrack',
-	'sa-Spokenword', 'sa-Interview', 'sa-Audiobook', 'sa-Live', 'sa-Remix', 'sa-Other'
-	, 'va-Album', 'va-Single', 'va-EP', 'va-Compilation', 'va-Soundtrack',
-	'va-Spokenword', 'va-Interview', 'va-Audiobook', 'va-Live', 'va-Remix', 'va-Other'
-	);
-      --incs := vector ();
-    }
-  else if (kind = 'release')
-    inc := 'artist counts release-events discs tracks artist-rels label-rels release-rels track-rels url-rels track-level-rels labels';
-  else if (kind = 'track')
-    inc := 'artist releases puids artist-rels label-rels release-rels track-rels url-rels';
-  else if (kind = 'label')
-    inc := 'aliases artist-rels label-rels release-rels track-rels url-rels';
-  else
+  if (length (_key) = 0)
+  {
+    log_message (sprintf ('%s: An API key has not been configured for the New York Times API', current_proc_name ()));
     return 0;
-  if (dest is null)
-    RM_CLEAN_DEST (dest, graph_iri, new_origin_uri, opts);
-  DB.DBA.RDF_LOAD_MBZ_1 (graph_iri, new_origin_uri, dest, kind, id, inc, opts);
-  -- DELME: should not be there
-  --DB.DBA.TTLP (sprintf ('<%S> <http://xmlns.com/foaf/0.1/primaryTopic> <%S> .\n<%S> a <http://xmlns.com/foaf/0.1/Document> .',
-  --	new_origin_uri, DB.DBA.RDF_SPONGE_PROXY_IRI (new_origin_uri), new_origin_uri),
-  --	'', graph_iri);
-  foreach (any inc1 in incs) do
-    {
-      DB.DBA.RDF_LOAD_MBZ_1 (graph_iri, new_origin_uri, dest, kind, id, inc1, opts);
-    }
+  }
+
+  -- NB: The related article description returned by the Semantic API returns only: body, byline, date, title, url
+  desired_response_fields := vector (
+    'abstract', 'author', 'body', 'byline', 'classifiers_facet', 'column_facet', 'comments', 
+    'date', 'dbpedia_resource', 'dbpedia_resource_url', 'des_facet', 'desk_facet', 'fee', 
+    'geo_facet', 'lead_paragraph', 'material_type_facet', 'multimedia', 'nytd_byline', 'nytd_des_facet',
+    'nytd_geo_facet', 'nytd_lead_paragraph', 'nytd_org_facet', 'nytd_per_facet', 'nytd_section_facet', 
+    'nytd_title', 'nytd_works_mentioned_facet', 'org_facet', 'per_facet', 'related_multimedia', 
+    'small_image', 'small_image_url', 'small_image_height', 'small_image_width', 'source_facet', 
+    'title', 'url', 'word_count', 'works_mentioned_facet'
+    );
+
+  response_fields := '';
+  foreach (varchar field in desired_response_fields) do
+    response_fields := response_fields || field || ',';
+  response_fields := trim (response_fields, ',');
+
+  article_url := replace (new_origin_uri, '/', '\\/');
+  url := sprintf ('http://api.nytimes.com/svc/search/v1/article?query=url:%s&fields=%s&api-key=%s', article_url, response_fields, _key);
+
+  DB.DBA.RM_LOG_REQUEST (url, null, current_proc_name ());        
+  tmp := http_client_ext (url=>url, headers=>hdr, proxy=>get_keyword_ucase ('get:proxy', opts));
+  DB.DBA.RM_LOG_RESPONSE (tmp, hdr);
+  if (length (tmp) = 0)
+  {
+    log_message (sprintf ('%s: Failed HTTP GET: %s', current_proc_name(), url));
+    return 0;
+  }
+  tmp := json_parse (tmp);
+  xd := DB.DBA.SOCIAL_TREE_TO_XML (tmp);
+  xt := DB.DBA.RDF_MAPPER_XSLT (registry_get ('_rdf_mappers_path_') || 'xslt/main/nyt_article2rdf.xsl', xd, 
+	    vector ('baseUri', new_origin_uri));
+  xd := serialize_to_UTF8_xml (xt);
+  RM_CLEAN_DEST (triple_dict, dest, graph_iri, new_origin_uri, opts);
+  DB.DBA.RM_RDF_LOAD_RDFXML (triple_dict, xd, new_origin_uri, coalesce (dest, graph_iri));
+  DB.DBA.RM_ADD_PRV (triple_dict, current_proc_name (), new_origin_uri, coalesce (dest, graph_iri), url);
+
   return 1;
-};
+}
+;
 
 -- /* import all namespaces to SYS_XML_PERSISTENT_NS_DECL */
 create procedure DB.DBA.RM_LOAD_PREFIXES ()
@@ -8393,7 +11913,7 @@ create procedure RM_CHECK_CLASS_MATCH (in pattern varchar, in graph varchar, in
 {
   declare x, dociri any;
   dociri := DB.DBA.RDF_SPONGE_PROXY_IRI (new_origin_uri);
-  for select "tp" from (sparql define input:storage "" 
+  for select "tp" from (sparql define input:storage ""
         prefix foaf: <http://xmlns.com/foaf/0.1/>
   	select ?tp where { graph `iri(?:graph)` { ?doc foaf:primaryTopic ?s . ?s a ?tp . filter (?s = iri(?:dociri)) }}) x do
     {
@@ -8409,11 +11929,11 @@ create procedure DB.DBA.RM_GET_BASEURI (inout opts any, in graph_iri any, in des
 {
   declare mt, baseiri varchar;
   mt := get_keyword ('content-type', opts, 'application/octet-stream');
-  if (mt = 'application/rdf+xml' or mt like '%/rdf+%' or mt like '%/turtle' or mt = 'application/x-turtle') 
+  if (mt = 'application/rdf+xml' or mt like '%/rdf+%' or mt like '%/turtle' or mt = 'application/x-turtle')
     baseiri := RDF_SPONGE_DOC_IRI (dest, graph_iri); -- just coalsce
-  else  
-    baseiri := DB.DBA.RDF_SPONGE_PROXY_IRI (graph_iri); -- doc proxy iri 
-  return baseiri; 
+  else
+    baseiri := DB.DBA.RDF_SPONGE_PROXY_IRI (graph_iri); -- doc proxy iri
+  return baseiri;
 }
 ;
 
@@ -8427,11 +11947,11 @@ create procedure DB.DBA.RM_GET_LABELS_INIT (in dest varchar, in graph_iri varcha
   baseiri := DB.DBA.RM_GET_BASEURI (opts, graph_iri, dest);
   graph_iri := coalesce (dest, graph_iri);
   set isolation='uncommitted';
-  if (exists (sparql define input:storage "" 
-  	#define input:inference "virtrdf-label" 
+  if (exists (sparql define input:storage ""
+  	#define input:inference "virtrdf-label"
 	prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 	prefix gr: <http://purl.org/goodrelations/v1#>
-	select (1) 
+	select (1)
     	where { graph `iri(?:graph_iri)` { ?s a gr:ProductOrServicesSomeInstancesPlaceholder ; rdfs:label ?o . } }))
     {
       set isolation='committed';
@@ -8449,7 +11969,7 @@ create procedure DB.DBA.RM_GET_LABELS_INIT (in dest varchar, in graph_iri varcha
   state := '00000';
   qr := sprintf ('sparql define input:storage "" define input:inference "virtrdf-label" '||
   	' select distinct ?n ?s1 from <%s> where { ?s1 virtrdf:label ?n   . '||
-  	' filter (isLiteral (?n) && ?s1 in (<%s>, <%s>, <%s>)  && (lang (?n) = "en" || lang (?n) = "") && !(?n like "http://%%"))}', 
+  	' filter (isLiteral (?n) && ?s1 in (<%s>, <%s>, <%s>)  && (lang (?n) = "en" || lang (?n) = "") && !(?n like "http://%%"))}',
   	graph_iri, primary_topic, doc_iri, new_origin_uri);
   exec (qr, state, message, vector (), 0, meta, data);
   if (state = '00000' and length (data) > 0)
@@ -8458,16 +11978,176 @@ create procedure DB.DBA.RM_GET_LABELS_INIT (in dest varchar, in graph_iri varcha
 }
 ;
 
+create procedure DB.DBA.RDF_SPONGER_STATUS (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, in p_name varchar, inout options any)
+{
+  update RDF_SPONGER_QUEUE set RS_CURRENT_CALL = p_name where RS_URI = new_origin_uri;
+  if (row_count ())
+    commit work;
+}
+;
+
+create procedure DB.DBA.RM_MAKE_DOC_LINKS (in graph_iri varchar, in new_origin_uri varchar, in dest varchar, inout opts any, inout triples any)
+{
+  declare gr, subj1, ss, des, pt, mime, tp, pti, prim any;
+  declare dict, arr any;
+  declare have_pt, add_doc int;
+
+  mime := get_keyword ('content-type', opts);
+  if (mime like '%/rdf+%' or mime = 'text/n3')
+    return vector ();
+  if (registry_get ('__rdf_cartridges_original_doc_uri__') = '1')
+    return vector ();
+
+  add_doc := 1;
+  subj1 := iri_to_id (DB.DBA.RDF_SPONGE_PROXY_IRI (coalesce (dest, graph_iri)));
+  prim := iri_to_id (DB.DBA.RDF_PROXY_ENTITY_IRI (new_origin_uri));
+  des := iri_to_id ('http://www.openlinksw.com/schema/attribution#isDescribedUsing');
+  pt := iri_to_id ('http://www.w3.org/2007/05/powder-s#describedby');
+  tp := iri_to_id ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type');
+  pti := iri_to_id ('http://xmlns.com/foaf/0.1/primaryTopic');
+
+  dict := dict_new (10);
+  foreach (any x in triples) do
+    {
+      if (x[1] = tp and x[0] <> subj1)
+	dict_put (dict, vector (x[0], pt, subj1), 1);
+      if (x[0] = subj1 and x[1] = tp)
+	add_doc := 0;
+    }
+  dict_put (dict, vector (subj1, pti, prim), 1);
+  if (add_doc)
+    dict_put (dict, vector (subj1, tp, iri_to_id ('http://xmlns.com/foaf/0.1/Document')), 1);
+  dict_put (dict, vector (subj1, iri_to_id ('http://vocab.deri.ie/void#inDataset'), iri_to_id (coalesce (dest, graph_iri))), 1);
+  dict_put (dict, vector (iri_to_id (coalesce (dest, graph_iri)), 
+  	iri_to_id ('http://rdfs.org/ns/void#sparqlEndpoint'), 
+	iri_to_id (sprintf ('http://%{URIQADefaultHost}s/sparql/'))), 1);
+  return dict_list_keys (dict, 2);
+}
+;
+
+-- /* top level, called from sparql engine */
+create procedure DB.DBA.RDF_RUN_CARTRIDGES (in graph_iri varchar, in new_origin_uri varchar, in dest varchar,
+    inout ret_body any, in ret_content_type varchar, inout options any, inout ret_hdr any, inout ps any, inout aq any, inout req_hdr_arr any)
+{
+  declare cset, rc any;
+  declare dict any;
+  declare inx, enable_meta any;
+  enable_meta := 1;
+  RM_LOG_CLEAR ();
+  -- remove below to disable get:cartridge processing
+  for (inx := 0; inx < length (options); inx := inx + 2)
+    {
+      if (options[inx] = 'get:cartridge')
+	{
+	  if (options[inx+1] = 'none')
+	    return 1;
+	  if (options[inx+1] = 'meta')
+	    {
+	      enable_meta := 1;
+	    }
+	  if (options[inx+1] = 'extractor')
+	    enable_meta := 0;
+	}
+    }
+  dict := dict_new ((length (ret_body) / 100) + 1);
+  cset := http_request_header (ret_hdr, 'Content-Type', 'charset', null);
+  for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS, RM_DESCRIPTION from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do
+    {
+      declare val_match, pcols, new_opts any;
+      declare npars int;
+
+      if (RM_TYPE = 'MIME')
+	val_match := ret_content_type;
+      else if (RM_TYPE = 'URL' or RM_TYPE = 'HTTP')
+	val_match := new_origin_uri;
+      else
+	val_match := null;
+
+      --if (registry_get ('__sparql_mappers_debug') = '1')
+      --  dbg_obj_prin1 ('Trying ', RM_HOOK);
+      if (isstring (val_match) and regexp_match (RM_PATTERN, val_match) is not null)
+	{
+	  if (__proc_exists (RM_HOOK) is null)
+	    goto try_next_mapper;
+
+	  declare exit handler for sqlstate '*'
+	    {
+	      goto try_next_mapper;
+	    };
+	  --!!!TBD: Carefully check what happens when dest is NULL vs dest is not NULL, then add support for groupdest.
+          if (registry_get ('__sparql_mappers_debug') = '1')
+            dbg_obj_prin1 ('Match ', RM_HOOK);
+	  new_opts := vector_concat (options, RM_OPTIONS, vector ('content-type', ret_content_type, 'charset', cset));
+	  DB.DBA.RDF_SPONGER_STATUS (graph_iri, new_origin_uri, dest, RM_DESCRIPTION, options);
+	  if (RM_TYPE <> 'HTTP')
+	    {
+	      rc := call (RM_HOOK) (graph_iri, new_origin_uri, dest, ret_body, aq, ps, RM_KEY, new_opts, dict);
+	    }
+          else
+	    {
+	      rc := call (RM_HOOK) (graph_iri, new_origin_uri, dest, ret_body, aq, ps, vector (req_hdr_arr, ret_hdr), new_opts, dict);
+	    }
+          if (registry_get ('__sparql_mappers_debug') = '1')
+	    {
+	      dbg_obj_prin1 ('Return ', rc, RM_HOOK);
+	      dbg_obj_print ('no triples:', dict_size (dict));
+	      if (__tag(rc) = 193 or rc < 0 or rc > 0)
+                dbg_obj_prin1 ('END of mappings');
+	    }
+	  if (__tag(rc) = 193 or rc < 0 or rc > 0)
+	    {
+	      ins_triples:
+	      declare triples, links any;
+	      --dbg_obj_print ('inserting triples:', dict_size (dict));
+	      --dbg_obj_print ('in store: ', (select count(*) from RDF_QUAD where G = iri_to_id (coalesce (dest, graph_iri))));
+	      triples := dict_list_keys (dict, 1);
+	      links := DB.DBA.RM_MAKE_DOC_LINKS (graph_iri, new_origin_uri, dest, new_opts, triples);
+	      {
+		declare deadl int;
+		deadl := 5;
+		ins_again:
+		declare exit handler for sqlstate '40001' {
+		  deadl := deadl - 1;
+		  if (deadl > 0)
+		    {
+		      rollback work;
+		      goto ins_again;
+		    }
+		  resignal;
+		};
+		--dbg_obj_print (coalesce (dest, graph_iri), triples);
+	        DB.DBA.RDF_INSERT_TRIPLES (coalesce (dest, graph_iri), triples);
+	        DB.DBA.RDF_INSERT_TRIPLES (coalesce (dest, graph_iri), links);
+		commit work;
+		DB.DBA.RDF_SPONGER_STATUS (graph_iri, new_origin_uri, dest, null, options);
+		commit work;
+	      }	
+              if (__tag(rc) = 193)
+                return rc;
+	      return 1;
+	    }
+	}
+      try_next_mapper:;
+    }
+  if (dict_size (dict))
+    goto ins_triples;
+  return 0;
+}
+;
+
+
 create procedure DB.DBA.RDF_LOAD_POST_PROCESS (in graph_iri varchar, in new_origin_uri varchar, in dest varchar,
     inout ret_body any, in ret_content_type varchar, inout options any)
 {
   declare new_opts any;
-  declare dummy, spmode, triples, graph, tmp, labels any;
-  declare rc int;
+  declare dummy, spmode, triples, graph, tmp, labels, dict any;
+  declare f_delete_orig_triples, rc, mc_api int;
 
   dummy := null;
-  RM_LOG_CLEAR ();
+  f_delete_orig_triples := 0;
+  mc_api := 0;
   RM_GRAPH_PT_CK (graph_iri, dest);
+  dict := dict_new ((length (ret_body) / 100) + 1);
   graph := coalesce (dest, graph_iri);
   spmode := get_keyword ('meta-cartridges-mode', options, '');
   if (spmode = 'none')
@@ -8475,6 +12155,7 @@ create procedure DB.DBA.RDF_LOAD_POST_PROCESS (in graph_iri varchar, in new_orig
   if (spmode <> '')
     {
       triples := (select vector_agg (vector (S,P,O)) from RDF_QUAD where g = iri_to_id (graph));
+      f_delete_orig_triples := 1;
       tmp := split_and_decode (spmode, 0, '\0\0,');
       if (length (tmp) = 1 and atoi (tmp[0]) <= 0)
 	spmode := abs (atoi (tmp[0]));
@@ -8486,13 +12167,13 @@ create procedure DB.DBA.RDF_LOAD_POST_PROCESS (in graph_iri varchar, in new_orig
 	     {
 	       tmp[inx] := atoi (tmp[inx]);
 	       inx := inx + 1;
-	     }  
+	     }
 	  spmode := tmp;
-        }	  
-    }  
+        }
+    }
   set isolation='committed';
   labels := DB.DBA.RM_GET_LABELS_INIT (dest, graph, new_origin_uri, options);
-  for select MC_ID, MC_PATTERN, MC_TYPE, MC_HOOK, MC_KEY, MC_OPTIONS, MC_API_TYPE 
+  for select MC_ID, MC_PATTERN, MC_TYPE, MC_HOOK, MC_KEY, MC_OPTIONS, MC_API_TYPE, MC_DESC
     from DB.DBA.RDF_META_CARTRIDGES where MC_ENABLED = 1 order by MC_SEQ do
     {
       declare val_match, st any;
@@ -8507,15 +12188,15 @@ create procedure DB.DBA.RDF_LOAD_POST_PROCESS (in graph_iri varchar, in new_orig
 	}
       else if (MC_TYPE = 'CLASS' and RM_CHECK_CLASS_MATCH (MC_PATTERN, coalesce (dest, graph_iri), new_origin_uri))
 	{
-	  goto try_cartridge; 
+	  goto try_cartridge;
 	}
       else
 	val_match := null;
 
       if (spmode <> '' and isinteger (spmode) and spmode <> MC_API_TYPE)
-        goto try_next_mapper;	
+        goto try_next_mapper;
       if (spmode <> '' and isvector (spmode) and not position (MC_ID, spmode))
-        goto try_next_mapper;	
+        goto try_next_mapper;
 
       if (registry_get ('__sparql_mappers_debug') = '1')
 	dbg_obj_prin1 ('Trying PP ', MC_HOOK);
@@ -8532,9 +12213,10 @@ create procedure DB.DBA.RDF_LOAD_POST_PROCESS (in graph_iri varchar, in new_orig
           if (registry_get ('__sparql_mappers_debug') = '1')
 	    dbg_obj_prin1 ('Match PP ', MC_HOOK);
 	  new_opts := vector_concat (options, MC_OPTIONS, vector ('content-type', ret_content_type), vector ('extracted-labels', labels));
+	  DB.DBA.RDF_SPONGER_STATUS (graph_iri, new_origin_uri, dest, MC_DESC, options);
 	  commit work;
 	  st := msec_time ();
-	  rc := call (MC_HOOK) (graph_iri, new_origin_uri, dest, ret_body, dummy, dummy, MC_KEY, new_opts);
+	  rc := call (MC_HOOK) (graph_iri, new_origin_uri, dest, ret_body, dummy, dummy, MC_KEY, new_opts, dict);
 	  RM_GRAPH_PT_CK (graph_iri, dest);
 	  prof_sample (MC_HOOK, msec_time () - st, 1);
           if (registry_get ('__sparql_mappers_debug') = '1')
@@ -8543,17 +12225,54 @@ create procedure DB.DBA.RDF_LOAD_POST_PROCESS (in graph_iri varchar, in new_orig
 	      if (rc < 0 or rc > 0)
 	        dbg_obj_prin1 ('END of PP mappings');
 	    }
-	  if (rc < 0 or rc > 0)
+	  if (rc < 0 or rc > 0 or ( (MC_API_TYPE=0 or MC_API_TYPE=3) and dict_size (dict)))
 	    {
+	      ins_triples:
+	      declare _triples, links any;
+              if (f_delete_orig_triples)
+	        {
+                  DB.DBA.RDF_DELETE_TRIPLES (graph, triples);
+                  f_delete_orig_triples := 0;
+	        }
+	      --dbg_obj_print ('inserting triples:', dict_size (dict));
+	      --dbg_obj_print ('in store: ', (select count(*) from RDF_QUAD where G = iri_to_id (coalesce (dest, graph_iri))));
+	      _triples := dict_list_keys (dict, 1);
+	      {
+		declare deadl int;
+		deadl := 5;
+		ins_again:
+		declare exit handler for sqlstate '40001' {
+		  deadl := deadl - 1;
+		  if (deadl > 0)
+		    {
+		      rollback work;
+		      goto ins_again;
+		    }
+		  resignal;
+		};
+		--dbg_obj_print (coalesce (dest, graph_iri), triples);
+	        DB.DBA.RDF_INSERT_TRIPLES (coalesce (dest, graph_iri), _triples);
+		commit work;
+	      }
+	      if (MC_API_TYPE in (0,3))
+	        {
+                  dict := dict_new ((length (ret_body) / 100) + 1);
+		  goto try_next_mapper;
+	        }
 	      return (case when rc < 0 then 0 else 1 end);
 	    }
 	}
       try_next_mapper:;
     }
-  if (spmode <> '')
-    DB.DBA.RDF_DELETE_TRIPLES (graph, triples);
+  if (f_delete_orig_triples)
+    {
+      DB.DBA.RDF_DELETE_TRIPLES (graph, triples);
+      f_delete_orig_triples := 0;
+    }
   if (registry_get ('__sparql_mappers_debug') = '1')
     dbg_obj_prin1 ('END of PP mappings');
+  if (dict_size (dict))
+    goto ins_triples;
 }
 ;
 
@@ -8646,24 +12365,26 @@ DB.DBA.RM_LOAD_ONTOLOGIES ();
 
 drop procedure DB.DBA.RM_LOAD_ONTOLOGIES;
 
-create procedure RM_DO_SPONGE (in _G any, in sp_type varchar := '', in do_refresh int := null)
+create procedure RM_DO_SPONGE (in _G any, in sp_type varchar := '', in do_refresh int := null, in sp_mode varchar := 'add', 
+	in accept_mode varchar := null)
 {
   declare dedl int;
+  --dbg_obj_print_vars (sp_mode);
   set_user_id ('SPARQL');
   dedl := 10;
-  declare exit handler for sqlstate '40001' 
+  declare exit handler for sqlstate '40001'
   {
     rollback work;
     if (dedl <= 0)
-      resignal; 
-    dedl := dedl - 1;  
+      resignal;
+    dedl := dedl - 1;
     goto again;
   };
-again:  
+again:
   if (do_refresh is null)
-    DB.DBA.RDF_SPONGE_UP (_G, vector ('get:soft',  'soft',  'refresh_free_text' ,  1, 'meta-cartridges-mode', sp_type));
+    DB.DBA.RDF_SPONGE_UP (_G, vector ('get:soft',  sp_mode,  'refresh_free_text' ,  0, 'meta-cartridges-mode', sp_type, 'get:accept', accept_mode));
   else
-    DB.DBA.RDF_SPONGE_UP (_G, vector ('get:soft',  'soft',  'refresh_free_text' ,  1, 'meta-cartridges-mode', sp_type, 'get:refresh', do_refresh));
+    DB.DBA.RDF_SPONGE_UP (_G, vector ('get:soft',  sp_mode,  'refresh_free_text' ,  1, 'meta-cartridges-mode', sp_type, 'get:refresh', do_refresh, 'get:accept', accept_mode));
 }
 ;
 
@@ -8784,4 +12505,222 @@ create procedure CLEAN_SPONGE (in d int := 30, in n int := 2000)
 }
 ;
 
-RDFS_RULE_SET ('http://www.w3.org/2000/01/rdf-schema#', 'http://www.w3.org/2000/01/rdf-schema#');
+--RDFS_RULE_SET ('http://www.w3.org/2000/01/rdf-schema#', 'http://www.w3.org/2000/01/rdf-schema#');
+
+-- Sponger splash screen
+DB.DBA.VHOST_REMOVE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/sponger'
+);
+
+DB.DBA.VHOST_DEFINE (
+	 lhost=>'*ini*',
+	 vhost=>'*ini*',
+	 lpath=>'/sponger',
+	 ppath=>'/DAV/VAD/rdf_mappers/sponger_front_page/',
+	 is_dav=>1,
+	 def_page=>'index.vsp',
+	 vsp_user=>'dba',
+	 ses_vars=>0,
+	 opts=>vector ('executable', 'yes', 'browse_sheet', ''),
+	 is_default_host=>0
+);
+
+create procedure lbl_order (in p any)
+{
+  declare r int;
+  r := vector (
+  'http://www.w3.org/2000/01/rdf-schema#label',
+  'http://xmlns.com/foaf/0.1/name',
+  'http://purl.org/dc/elements/1.1/title',
+  'http://purl.org/dc/terms/title',
+  'http://xmlns.com/foaf/0.1/nick',
+  'http://usefulinc.com/ns/doap#name',
+  'http://rdf.data-vocabulary.org/name',
+  'http://www.w3.org/2002/12/cal/ical#summary',
+  'http://aims.fao.org/aos/geopolitical.owl#nameListEN',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.crunchbase.com/source_description',
+  'http://dbpedia.org/property/name',
+  'http://www.geonames.org/ontology#name',
+  'http://purl.org/ontology/bibo/shortTitle',
+  'http://www.w3.org/1999/02/22-rdf-syntax-ns#value',
+  'http://xmlns.com/foaf/0.1/accountName',
+  'http://www.w3.org/2004/02/skos/core#prefLabel',
+  'http://rdf.freebase.com/ns/type.object.name',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.w3.org/2008/05/skos#prefLabel',
+  'http://www.w3.org/2002/12/cal/icaltzd#summary',
+  'http://rdf.data-vocabulary.org/name',
+  'http://rdf.freebase.com/ns/common.topic.alias',
+  'http://opengraphprotocol.org/schema/title',
+  'http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema.rdf#Name',
+  'http://poolparty.punkt.at/demozone/ont#title',
+  'http://www.openlinksw.com/schemas/googleplus#activity_title',
+  'http://www.openlinksw.com/schemas/googleplus#providerTitle'
+   );
+  r := position (id_to_iri (p), r);
+  if (r <= 0)
+    return 100;
+  return r;
+}
+;
+
+-- Same as lbl_order(), except that skos:prefLabel takes precedence
+-- NLP meta-cartridges use skos:prefLabel to include a label prefix identifying the source cartridge
+create procedure lbl_order_1 (in p any)
+{    
+  declare r int;
+  r := vector (
+  'http://www.w3.org/2004/02/skos/core#prefLabel',
+  'http://www.w3.org/2000/01/rdf-schema#label',
+  'http://xmlns.com/foaf/0.1/name',
+  'http://purl.org/dc/elements/1.1/title',
+  'http://purl.org/dc/terms/title',
+  'http://xmlns.com/foaf/0.1/nick',
+  'http://usefulinc.com/ns/doap#name',
+  'http://rdf.data-vocabulary.org/name',
+  'http://www.w3.org/2002/12/cal/ical#summary',
+  'http://aims.fao.org/aos/geopolitical.owl#nameListEN',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.crunchbase.com/source_description',
+  'http://dbpedia.org/property/name',
+  'http://www.geonames.org/ontology#name',
+  'http://purl.org/ontology/bibo/shortTitle',
+  'http://www.w3.org/1999/02/22-rdf-syntax-ns#value',
+  'http://xmlns.com/foaf/0.1/accountName',
+  'http://rdf.freebase.com/ns/type.object.name',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.w3.org/2008/05/skos#prefLabel',
+  'http://www.w3.org/2002/12/cal/icaltzd#summary',
+  'http://rdf.data-vocabulary.org/name',
+  'http://rdf.freebase.com/ns/common.topic.alias',
+  'http://opengraphprotocol.org/schema/title',
+  'http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema.rdf#Name',
+  'http://poolparty.punkt.at/demozone/ont#title',
+  'http://www.openlinksw.com/schemas/googleplus#activity_title',
+  'http://www.openlinksw.com/schemas/googleplus#providerTitle'
+   );
+  r := position (id_to_iri (p), r);
+  if (r <= 0)
+    return 100;
+  return r;
+}
+;
+
+-- /* selective sponging api */
+create procedure 
+RM_SPONGE_BY_ID (in graph varchar, in url varchar, in content any, in ctype varchar, in ids any, in opts any)
+{
+  declare mime_type, _graph, _base, out_arr, tmp varchar;
+  declare html_start, xd, dict any;
+  declare rc, deadl int;
+
+  html_start := null;
+  dict := null;
+
+  _graph := get_keyword ('rdf-graph', opts, graph);
+  _base := url;
+
+  commit work;
+  deadl := 6;
+
+  declare exit handler for sqlstate '*'
+  {
+    rollback work;
+    __SQL_STATE := cast (__SQL_STATE as varchar);
+    if (__SQL_STATE = '40001')
+      {
+	deadl := deadl - 1;
+	if (deadl > 0)
+	  goto again;
+      }
+    resignal;
+  };
+
+  if (url like '*.gz')
+    {
+      if (length (content) > 2)
+	{
+	  declare magic varchar;
+	  magic := subseq (content, 0, 2);
+	  if (magic[0] = 0hex1f and magic[1] = 0hex8b) 
+	    content := gzip_uncompress (content);
+	}
+    }
+  -- RDF/XML or RDF/N3 depends on option
+  mime_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (url, ctype, content);
+again:
+  -- RDF formats 
+    {
+      if (strstr (mime_type, 'application/rdf+xml') is not null)
+        DB.DBA.RDF_LOAD_RDFXML (content, _base, _graph);
+      else if (
+       strstr (mime_type, 'text/rdf+n3') is not null or
+       strstr (mime_type, 'text/rdf+ttl') is not null or
+       strstr (mime_type, 'application/rdf+n3') is not null or
+       strstr (mime_type, 'application/rdf+turtle') is not null or
+       strstr (mime_type, 'application/turtle') is not null or
+       strstr (mime_type, 'application/x-turtle') is not null
+      )
+        DB.DBA.TTLP (content, _base, _graph);
+    }
+
+  -- The rest is mappers work
+  for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_PID in (ids) order by RM_ID do
+   {
+     declare val_match, pcols, new_opts, aq any;
+      if (RM_TYPE = 'MIME')
+	{
+	  val_match := mime_type;
+	}
+      else if (RM_TYPE = 'URL' or RM_TYPE = 'HTTP')
+	{
+	  val_match := _base;
+	}
+      else
+	val_match := null;
+      aq := null;
+      if (isstring (val_match) and regexp_match (RM_PATTERN, val_match) is not null)
+	{
+	  if (__proc_exists (RM_HOOK) is null)
+	    goto try_next_mapper;
+
+	  declare exit handler for sqlstate '*'
+	    {
+	      goto try_next_mapper;
+	    };
+
+	  new_opts := vector_concat (RM_OPTIONS, vector ('disable-clean', 'Y'));
+	  if (RM_TYPE <> 'HTTP')
+	    {
+	      rc := call (RM_HOOK) (_graph, _base, null, content, aq, aq, RM_KEY, new_opts, dict);
+	    }
+	  if (rc < 0 or rc > 0)
+	    return;
+	}
+      try_next_mapper:;
+   }
+
+}
+;
+
+DB.DBA.VHOST_REMOVE (lpath=>'/about/queue/status');
+DB.DBA.VHOST_DEFINE (lpath=>'/about/queue/status', ppath=>'/SOAP/Http/sponger_queue_status', soap_user=>'dba');
+
+create procedure sponger_queue_status (in uri varchar) __soap_http 'applcation/json'
+{
+  declare ret any;
+  ret := '{ "result":0 }'; 
+  declare exit handler for sqlstate '*'
+    {
+      rollback work;
+      http_status_set (500);
+      return sprintf ('{ "error":"%V" }', __SQL_MESSAGE);
+    };
+  return ret;
+}
+;
+
+grant execute on sponger_queue_status to dba;
diff --git a/binsrc/rdf_mappers/rdf_mappers_drop.sql b/binsrc/rdf_mappers/rdf_mappers_drop.sql
index 0bd9f49..13cca19 100644
--- a/binsrc/rdf_mappers/rdf_mappers_drop.sql
+++ b/binsrc/rdf_mappers/rdf_mappers_drop.sql
@@ -1,13 +1,13 @@
 --
 --
---  $Id: rdf_mappers_drop.sql,v 1.1 2007/03/26 21:39:24 source Exp $
+--  $Id: rdf_mappers_drop.sql,v 1.1.2.2 2012/03/08 12:55:02 source Exp $
 --
 --  RDF Mappings
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -37,3 +37,5 @@ drop procedure DB.DBA.XSLT_REGEXP_MATCH;
 drop procedure DB.DBA.RDF_LOAD_AMAZON_ARTICLE;
 drop procedure DB.DBA.RDF_LOAD_FLICKR_IMG;
 drop procedure DB.DBA.RDF_LOAD_HTML_RESPONSE;
+
+DB.DBA.VHOST_REMOVE (lhost=>'*ini*', vhost=>'*ini*', lpath=>'/sponger');
diff --git a/binsrc/rdf_mappers/rdfdesc/description.sql b/binsrc/rdf_mappers/rdfdesc/description.sql
index f67a934..1b91756 100644
--- a/binsrc/rdf_mappers/rdfdesc/description.sql
+++ b/binsrc/rdf_mappers/rdfdesc/description.sql
@@ -1,10 +1,10 @@
 --
---  $Id: description.sql,v 1.21.2.59 2011/03/29 22:52:14 source Exp $
+--  $Id: description.sql,v 1.21.2.79 2012/03/08 12:55:02 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -83,6 +83,8 @@ create procedure rdfdesc_get_lang_by_q (in accept varchar, in lang varchar)
   declare arr, q any;
   declare i, l int;
 
+  if (not length (lang))
+    lang := 'en';
   arr := split_and_decode (accept, 0, '\0\0,;');
   q := 0;
   l := length (arr);
@@ -126,8 +128,10 @@ create procedure rdfdesc_label (in _S any, in _G varchar, in lines any := null)
     {
       langs := http_request_header_full (lines, 'Accept-Language', 'en');
     }
-  exec (sprintf ('sparql define input:inference "virtrdf-label" '||
-  'select ?o (lang(?o)) where { graph <%S> { <%S> virtrdf:label ?o } }', _G, _S), null, null, vector (), 0, meta, data);
+  --exec (sprintf ('sparql define input:inference "virtrdf-label" '||
+  --'select ?o (lang(?o)) where { graph <%S> { <%S> virtrdf:label ?o } }', _G, _S), null, null, vector (), 0, meta, data);
+  exec ('select __ro2sq (O), DB.DBA.RDF_LANGUAGE_OF_OBJ (o) , cast (lbl_order (P) as int) from RDF_QUAD table option (with ''virtrdf-label'') 
+  	where G = __i2id (?) and S = __i2id (?) and P = __i2id (''http://www.openlinksw.com/schemas/virtrdf#label'', 0) and not is_bnode_iri_id (O) order by 3', null, null, vector (_G, _S), 0, meta, data);
   best_str := '';
   best_q := 0;
   if (length (data))
@@ -143,6 +147,14 @@ create procedure rdfdesc_label (in _S any, in _G varchar, in lines any := null)
 	    }
 	}
     }
+   if (__tag of rdf_box = __tag (best_str))
+     {
+       __rdf_box_make_complete (best_str);
+       best_str := rdf_box_data (best_str);
+     }
+   if (not isstring (best_str))
+     best_str := cast (best_str as varchar);
+   best_str := cast (xtree_doc (best_str, 2) as varchar);
   return best_str;
 }
 ;
@@ -151,9 +163,9 @@ create procedure rdfdesc_label_1 (in _S any, in lines any := null)
 {
   declare best_str, meta, data, stat, msg any;
   declare best_q, q float;
-  declare lang, langs varchar;
+  declare lang, langs, label varchar;
 
-  if (not (registry_get ('fct_desc_value_labels') = '1'))
+  if (registry_get ('fct_desc_value_labels') = '0')
     return null;
 
   langs := 'en';
@@ -162,8 +174,10 @@ create procedure rdfdesc_label_1 (in _S any, in lines any := null)
       langs := http_request_header_full (lines, 'Accept-Language', 'en');
     }
   stat := '00000';
-  exec (sprintf ('sparql define input:inference "virtrdf-label" '||
-  'select ?o (lang(?o)) where { <%S> virtrdf:label ?o }', _S), stat, msg, vector (), 0, meta, data);
+  exec ('select __ro2sq (O), DB.DBA.RDF_LANGUAGE_OF_OBJ (o) , cast (lbl_order_1 (P) as int) from RDF_QUAD table option (with ''virtrdf-label'') 
+  	where S = __i2id (?) and P = __i2id (''http://www.openlinksw.com/schemas/virtrdf#label'', 0) and not is_bnode_iri_id (O) order by 3', null, null, vector (_S), 0, meta, data);
+  --exec (sprintf ('sparql define input:inference "virtrdf-label" '||
+  --'select ?o (lang(?o)) where { <%S> virtrdf:label ?o }', _S), stat, msg, vector (), 0, meta, data);
   best_str := '';
   best_q := 0;
   if (stat = '00000' and length (data))
@@ -179,15 +193,53 @@ create procedure rdfdesc_label_1 (in _S any, in lines any := null)
 	    }
 	}
     }
-  return best_str;
+  label := best_str;
+   if (__tag of rdf_box = __tag (label))
+     {
+       __rdf_box_make_complete (label);
+       label := rdf_box_data (label);
+     }
+   if (not isstring (label))
+     label := cast (label as varchar);
+    label := cast (xtree_doc (label, 2) as varchar);
+   return label;
+}
+;
+
+create procedure rdfdesc_label_get (inout data any, in langs any)
+{
+  declare q, best_q, label any;
+  label := '';
+   if (length (data))
+     {
+       best_q := 0;
+       for (declare i,l int, i := 0, l := length (data); i < l; i := i + 1)
+         {
+	  q := rdfdesc_get_lang_by_q (langs, data[i][1]);
+          if (q > best_q)
+	    {
+	      label := data[i][0];
+	      best_q := q;
+	    }
+	 }
+     }
+   if (__tag of rdf_box = __tag (label))
+     {
+       __rdf_box_make_complete (label);
+       label := rdf_box_data (label);
+     }
+   if (not isstring (label))
+     label := cast (label as varchar);
+   label := cast (xtree_doc (label, 2) as varchar);
+   return label;
 }
 ;
 
 create procedure rdfdesc_buy_link (in _G varchar, in _S varchar)
 {
   declare ret any;
-  ret := (sparql 
-  define input:storage "" 
+  ret := (sparql
+  define input:storage ""
   prefix gr: <http://purl.org/goodrelations/v1#>
   prefix owl: <http://www.w3.org/2002/07/owl#>
   select ?sas { graph `iri(?:_G)` { ?s a gr:Offering ; owl:sameAs ?sas }});
@@ -265,7 +317,7 @@ create procedure rdfdesc_uri_curie (in uri varchar, in label varchar := null)
   nsPrefix := null;
   if (length (label))
     return label;
-    label := null;
+  label := null;
   ret := uri;
   while (nsPrefix is null and delim <> 0)
     {
@@ -289,6 +341,33 @@ create procedure rdfdesc_uri_curie (in uri varchar, in label varchar := null)
 }
 ;
 
+create procedure rdfdesc_uri_local (in uri varchar)
+{
+  declare delim integer;
+  declare uriSearch, nsPrefix, ret varchar;
+
+  delim := -1;
+  uriSearch := uri;
+  nsPrefix := null;
+  ret := uri;  
+  delim := coalesce (strrchr (uriSearch, '/'), 0);
+  delim := __max (delim, coalesce (strrchr (uriSearch, '#'), 0));
+  delim := __max (delim, coalesce (strrchr (uriSearch, ':'), 0));
+  if (delim > 0)
+    uriSearch := subseq (uriSearch, 0, delim);
+  if (delim > 0)
+    {
+      declare rhs varchar;
+      rhs := subseq(uri, length (uriSearch) + 1, null);
+      if (not length (rhs))
+	ret := uri;
+      else
+	ret := rhs;
+    }
+  return rdfdesc_trunc_uri (ret);
+}
+;
+
 --! used to return local part of an iri
 create procedure rdfdesc_uri_local_part (in uri varchar)
 {
@@ -482,23 +561,10 @@ again:
        if (isstring(_object) and _object like 'http://%')
        {
 	 _href := rdfdesc_http_url (_object);
-	 image_ext := subseq(lcase(_object), strrchr(_object, '.') + 1);
-	 if (image_ext is not null)
-	 {
-	   _href := case
-	    when (image_ext = 'bmp') then _object
-	    when (image_ext = 'gif') then _object
-	    when (image_ext = 'jpeg') then _object
-	    when (image_ext = 'jpg') then _object
-	    when (image_ext = 'png') then _object
-	    when (image_ext = 'svg') then _object
-	    when (image_ext = 'tiff') then _object
-	    when (image_ext = 'tif') then _object
-	    else
-              rdfdesc_http_url (_object)
-	    end;
-	 }
-         http (sprintf ('<a class="uri" href="%s">%s</a>', _href, _object));
+	 if (http_mime_type (_object) like 'image/%')
+	   http (sprintf ('<a class="uri" href="%s"><img src="%s" height="160" style="border-width:0"/></a>', _href, _object));
+	 else
+	   http (sprintf ('<a class="uri" href="%s">%s</a>', _href, _object));
        }
        else
        -- CMSB
@@ -580,6 +646,8 @@ create procedure rdfdesc_prop_label (in uri any)
 	and P = __i2idn ('http://www.w3.org/2000/01/rdf-schema#label') OPTION (QUIETCAST));
   if (length (ll) = 0)
     ll := rdfdesc_uri_curie (uri);
+  if (isstring (ll) and ll like 'http://%')
+    ll := rdfdesc_uri_local (uri);  
   if (isstring (ll) and ll like 'opl%:isDescribedUsing')
     ll := 'Described Using Terms From';
   return ll;
@@ -653,12 +721,12 @@ create procedure DB.DBA.RDF_SPONGE_AUTH (in realm varchar)
   declare auth_func, agent varchar;
   if (__proc_exists ('DB.DBA.FOAF_SSL_AUTH_GEN') is null)
     return 1;
-  if (http_acl_get ('Sponger', '*', '*') = -1)
+  if (http_acl_get ('Sponger', '*', '*') in (-1, 0))
     return 1;
   if (0 = DB.DBA.FOAF_SSL_AUTH_GEN (realm, 1))
     return 0;
   agent := DB.DBA.FOAF_SSL_WEBID_GET ();
-  if (agent is null) 
+  if (agent is null)
     return 0;
   if (http_acl_get ('Sponger', agent, '*') = 1)
     return 0;
@@ -688,6 +756,9 @@ create procedure virt_proxy_init_about ()
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_about_http_proxy_rule_3', 1,
       '/about/([^/\?\&:]*)/(http|https|webcal|feed|nodeID)/(.*)', vector ('force', 'schema', 'url'), 3,
       '/about?url=%U://%U&force=%U', vector ('schema', 'url', 'force'), null, null, 2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_about_http_proxy_rule_3_am', 1,
+      '/about/([^/\?\&:]*)/(acct|mailto)[/:]+(.*)', vector ('force', 'schema', 'url'), 3,
+      '/about?url=%U:%U&force=%U', vector ('schema', 'url', 'force'), null, null, 2);
 
   -- same as above, but for html
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_about_http_proxy_rule_4', 1,
@@ -701,15 +772,20 @@ create procedure virt_proxy_init_about ()
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_about_http_proxy_rule_6', 1,
       '/about/html/(http|https|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
       '/rdfdesc/description.vsp?g=%U://%U', vector ('sch', 'g'), null, null, 2);
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_about_http_proxy_rule_6_am', 1,
+      '/about/html/(acct|mailto)[/:]+(.*)', vector ('sch', 'g'), 2,
+      '/rdfdesc/description.vsp?g=%U:%U', vector ('sch', 'g'), null, null, 2);
 
   DB.DBA.URLREWRITE_CREATE_RULELIST ('ext_about_http_proxy_rule_list1', 1,
       	vector (
 	  	'ext_about_http_proxy_rule_1',
 	  	'ext_about_http_proxy_rule_2',
 	  	'ext_about_http_proxy_rule_3',
+	  	'ext_about_http_proxy_rule_3_am',
 	  	'ext_about_http_proxy_rule_4',
 	  	'ext_about_http_proxy_rule_5',
-	  	'ext_about_http_proxy_rule_6'
+	  	'ext_about_http_proxy_rule_6',
+	  	'ext_about_http_proxy_rule_6_am'
 		));
 
   DB.DBA.VHOST_REMOVE (lpath=>'/about');
@@ -725,18 +801,18 @@ create procedure virt_proxy_init_about ()
 
   --# the new iris
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_new_restrict', 1,
-      '/about/id/(http|https|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
+      '/about/id/(http|https|acct|mailto|webcal|feed|nodeID)[/:](.*)', vector ('sch', 'g'), 2,
       '/about/html/%s/%s', vector ('sch', 'g'), null, null, 2, 406, null);
 
   --DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_new_page', 1,
-  --    '/about/id/(http|https|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
+  --    '/about/id/(http|https|acct|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
   --    '/about/html/%s/%s', vector ('sch', 'g'), null, '(text/html)|(application/xhtml.xml)|(\\*/\\*)', 2, 303, null);
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_new_data', 1,
-      '/about/id/(http|https|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
+      '/about/id/(http|https|acct|mailto|webcal|feed|nodeID)[/:](.*)', vector ('sch', 'g'), 2,
       '/about/data/%s/%s', vector ('sch', 'g'), null,
       '(application/rdf.xml)|(text/rdf.n3)|(application/x-turtle)|(text/n3)|(text/turtle)|'||
-      '(application/rdf.json)|(application/json)|(text/html)|(text/plain)|(application/atom.xml)|(application/odata.json)|(\\*/\\*)', 
+      '(application/rdf.json)|(application/json)|(text/html)|(text/plain)|(application/atom.xml)|(application/odata.json)|(application/ld.json)|(application/microdata.json)|(\\*/\\*)', 
       2, 303, null);
 
   delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'ext_ahp_rule_list_new';
@@ -747,8 +823,10 @@ create procedure virt_proxy_init_about ()
   DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/data/turtle/\x241', 'text/turtle', 0.80);
   DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/data/json/\x241',    'application/json', 0.70);
   DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/data/jrdf/\x241',    'application/rdf+json', 0.70);
-  DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/html/^{DynamicLocalFormat}^/about/id/\x241', 'text/html', 0.80);
+  DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/html/^{DynamicLocalFormat}^/about/id/\x241', 'text/html', 1.0);
   DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/data/text/\x241',    'text/plain', 0.20);
+  DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/data/ld/\x241',      'application/ld+json', 0.70);
+  DB.DBA.HTTP_VARIANT_ADD ('ext_ahp_rule_list_new', '/about/data/(.*)', '/about/data/md/\x241',      'application/microdata+json', 0.70);
 
   DB.DBA.URLREWRITE_CREATE_RULELIST ( 'ext_ahp_rule_list_new', 1,
       		vector (
@@ -763,14 +841,14 @@ create procedure virt_proxy_init_about ()
   --# /id/entity
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_entity_rl_restrict', 1,
-      '/about/id/entity/(http|https|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
+      '/about/id/entity/(http|https|webcal|feed|nodeID|mailto|acct)/(.*)', vector ('sch', 'g'), 2,
       '/dummy', vector (), null, null, 2, 406, null);
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_entity_rl_data', 1,
-      '/about/id/entity/(http|https|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
+      '/about/id/entity/(http|https|acct|mailto|webcal|feed|nodeID)/(.*)', vector ('sch', 'g'), 2,
       '/about/data/entity/%s/%s', vector ('sch', 'g'), null,
       '(application/rdf.xml)|(text/rdf.n3)|(application/x-turtle)|(text/n3)|(text/turtle)|'||
-      '(application/rdf.json)|(application/json)|(text/html)|(text/plain)|(application/atom.xml)|(application/odata.json)|(\\*/\\*)', 
+      '(application/rdf.json)|(application/json)|(text/html)|(text/plain)|(application/atom.xml)|(application/odata.json)|(application/ld.json)|(application/microdata.json)|(\\*/\\*)', 
       2, 303, null);
 
   delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = 'sp_entity_rll';
@@ -781,10 +859,12 @@ create procedure virt_proxy_init_about ()
   DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/turtle/\x241', 'text/turtle', 0.80);
   DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/jrdf/\x241',    'application/rdf+json', 0.70);
   DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/json/\x241',    'application/json', 0.70);
-  DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/html/^{DynamicLocalFormat}^/about/id/entity/\x241', 'text/html', 0.80);
+  DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/html/^{DynamicLocalFormat}^/about/id/entity/\x241', 'text/html', 1.0);
   DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/atom/\x241',    'application/atom+xml', 0.60);
   DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/jsod/\x241',    'application/odata+json', 0.60);
   DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/text/\x241',    'text/plain', 0.20);
+  DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/ld/\x241',      'application/ld+json', 0.70);
+  DB.DBA.HTTP_VARIANT_ADD ('sp_entity_rll', '/about/data/entity/(.*)', '/about/data/entity/md/\x241',      'application/microdata+json', 0.70);
 
   DB.DBA.URLREWRITE_CREATE_RULELIST ( 'sp_entity_rll', 1,
       		vector ( 'sp_entity_rl_restrict', 'sp_entity_rl_data'));
@@ -796,36 +876,82 @@ create procedure virt_proxy_init_about ()
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_1', 1,
       '/about/data/(xml|n3|nt|ttl|text|turtle)/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('fmt', 'sch', 'url'), 3,
       '/about?url=%s://%U&force=rdf&output-format=%U', vector ('sch', 'url', 'fmt'), null, null, 2, null, '^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_1_am', 1,
+      '/about/data/(xml|n3|nt|ttl|text|turtle)/(acct|mailto)/(.*)\0x24', vector ('fmt', 'sch', 'url'), 3,
+      '/about?url=%s:%U&force=rdf&output-format=%U', vector ('sch', 'url', 'fmt'), null, null, 2, null, '^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_2', 1,
       '/about/data/turtle/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=text%%2Fturtle', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=text%%2Fturtle', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: text/turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_2_am', 1,
+      '/about/data/turtle/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=text%%2Fturtle', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: text/turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_3', 1,
       '/about/data/ttl/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=application%%2Fx-turtle', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fx-turtle', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/x-turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_3_am', 1,
+      '/about/data/ttl/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fx-turtle', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/x-turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_4', 1,
       '/about/data/jrdf/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/rdf+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_4_am', 1,
+      '/about/data/jrdf/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/rdf+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_5', 1,
       '/about/data/json/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_5_am', 1,
+      '/about/data/json/(acct|mailto)[:/]+(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_6', 1,
       '/about/data/atom/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=application%%2Fatom%%2Bxml', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fatom%%2Bxml', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/atom+xml\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_6_am', 1,
+      '/about/data/atom/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fatom%%2Bxml', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/atom+xml\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_7', 1,
       '/about/data/jsod/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=application%%2Fodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/odata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_7_am', 1,
+      '/about/data/jsod/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/odata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_8', 1,
+      '/about/data/ld/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fld%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/ld+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_8_am', 1,
+      '/about/data/ld/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fld%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/ld+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_9', 1,
+      '/about/data/md/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fmicrodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/microdata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('ext_ahp_rule_data_9_am', 1,
+      '/about/data/md/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fmicrodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/microdata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+
   DB.DBA.URLREWRITE_CREATE_RULELIST ( 'ext_ahp_rule_list_data', 1,
       	vector (
 	  'ext_ahp_rule_data_1',
@@ -834,7 +960,18 @@ create procedure virt_proxy_init_about ()
 	  'ext_ahp_rule_data_4',
 	  'ext_ahp_rule_data_5',
 	  'ext_ahp_rule_data_6',
-	  'ext_ahp_rule_data_7'
+	  'ext_ahp_rule_data_7',
+	  'ext_ahp_rule_data_8',
+	  'ext_ahp_rule_data_9',
+	  'ext_ahp_rule_data_1_am',
+	  'ext_ahp_rule_data_2_am',
+	  'ext_ahp_rule_data_3_am',
+	  'ext_ahp_rule_data_4_am',
+	  'ext_ahp_rule_data_5_am',
+	  'ext_ahp_rule_data_6_am',
+	  'ext_ahp_rule_data_7_am',
+	  'ext_ahp_rule_data_8_am',
+	  'ext_ahp_rule_data_9_am'
 	  )
 	);
 
@@ -844,38 +981,84 @@ create procedure virt_proxy_init_about ()
   --# information resources for /about/id/entity/x
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_1', 1,
       '/about/data/entity/(xml|n3|nt|ttl|text|turtle|json)/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('fmt', 'sch', 'url'), 3,
-      '/about?url=%s://%U&force=rdf&output-format=%U', vector ('sch', 'url', 'fmt'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=%U', vector ('sch', 'url', 'fmt'), null, null, 2, null,
+      '^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_1_am', 1,
+      '/about/data/entity/(xml|n3|nt|ttl|text|turtle|json)/(acct|mailto)/(.*)\0x24', vector ('fmt', 'sch', 'url'), 3,
+      '/about?url=%s:%U&force=rdf&output-format=%U', vector ('sch', 'url', 'fmt'), null, null, 2, null,
       '^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_2', 1,
       '/about/data/entity/turtle/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=text%%2Fturtle', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=text%%2Fturtle', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: text/turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_2_am', 1,
+      '/about/data/entity/turtle/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=text%%2Fturtle', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: text/turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_3', 1,
       '/about/data/entity/ttl/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=application%%2Fx-turtle', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fx-turtle', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/x-turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_3_am', 1,
+      '/about/data/entity/ttl/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fx-turtle', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/x-turtle\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_4', 1,
       '/about/data/entity/json/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_4_am', 1,
+      '/about/data/entity/json/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_5', 1,
       '/about/data/entity/jrdf/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/rdf+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_5_am', 1,
+      '/about/data/entity/jrdf/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=json', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/rdf+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_6', 1,
       '/about/data/entity/atom/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=application%%2Fatom%%2Bxml', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fatom%%2Bxml', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/atom+xml\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_6_am', 1,
+      '/about/data/entity/atom/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fatom%%2Bxml', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/atom+xml\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_7', 1,
       '/about/data/entity/jsod/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
-      '/about?url=%s://%U&force=rdf&output-format=application%%2Fodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null,
       'Content-Type: application/odata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_7_am', 1,
+      '/about/data/entity/jsod/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null,
+      'Content-Type: application/odata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_8', 1,
+      '/about/data/entity/ld/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fld%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/ld+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_8_am', 1,
+      '/about/data/entity/ld/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fld%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/ld+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_9', 1,
+      '/about/data/entity/md/(http|https|webcal|feed|nodeID)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s://%U&force=rdf&output-format=application%%2Fmicrodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/microdata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
+  DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('sp_ent_data_rl_9_am', 1,
+      '/about/data/entity/md/(acct|mailto)/(.*)\0x24', vector ('sch', 'url'), 2,
+      '/about?url=%s:%U&force=rdf&output-format=application%%2Fmicrodata%%2Bjson', vector ('sch', 'url'), null, null, 2, null, 
+      'Content-Type: application/microdata+json\r\n^{sql:DB.DBA.RM_LINK_HDR}^');
 
   DB.DBA.URLREWRITE_CREATE_RULELIST ( 'sp_ent_data_rll', 1,
       	vector (
@@ -885,7 +1068,18 @@ create procedure virt_proxy_init_about ()
 	  'sp_ent_data_rl_4',
 	  'sp_ent_data_rl_5',
 	  'sp_ent_data_rl_6',
-	  'sp_ent_data_rl_7'
+	  'sp_ent_data_rl_7',
+	  'sp_ent_data_rl_8',
+	  'sp_ent_data_rl_9',
+	  'sp_ent_data_rl_1_am',
+	  'sp_ent_data_rl_2_am',
+	  'sp_ent_data_rl_3_am',
+	  'sp_ent_data_rl_4_am',
+	  'sp_ent_data_rl_5_am',
+	  'sp_ent_data_rl_6_am',
+	  'sp_ent_data_rl_7_am',
+	  'sp_ent_data_rl_8_am',
+	  'sp_ent_data_rl_9_am'
 	  )
 	);
 
@@ -896,7 +1090,7 @@ create procedure virt_proxy_init_about ()
   EXEC_STMT ('grant execute on  DB.DBA.HTTP_RDF_ACCEPT to PROXY', 0);
   if (__proc_exists ('WS.WS.host_meta_add') is not null)
     {
-      WS.WS.host_meta_add ('SPONGER.service', 
+      WS.WS.host_meta_add ('SPONGER.service',
      	'<Link rel="http://openlinksw.com/virtuoso/sponger" template="http://%{WSHost}s/about/{uri}"/>');
     }
 
@@ -940,7 +1134,7 @@ create procedure RM_LINK_HDR (in path varchar)
   for (declare i,l int, i := 0, l := length (exts); i < l; i := i + 1)
     {
       if (ext <> exts[i][0])
-        h := h || sprintf (' <http://%s'||fmt||'>;\r\n rel="alternate"; type="%s"; title="%s",\r\n', host, exts[i][0], exts[i][1], exts[i][2]); 
+        h := h || sprintf (' <http://%s%s>;\r\n rel="alternate"; type="%s"; title="%s",\r\n', host, fmt, exts[i][0], exts[i][1], exts[i][2]); 
     }
   h := rtrim (h, ',\r\n');
   return h;
@@ -964,7 +1158,7 @@ create procedure rdfdesc_make_curie (in url varchar, in lines any)
 }
 ;
 
-create procedure rdfdesc_make_qr_code (in data_to_qrcode any, in src_width int := 120, in src_height int := 120, in qr_scale int := 4)
+create procedure rdfdesc_make_qr_code (in data_to_qrcode any, in src_width int := 120, in src_height int := 120, in qr_scale int := 3)
 {
   declare qrcode_bytes, mixed_content, content varchar;
   declare qrcode any;
@@ -977,7 +1171,7 @@ create procedure rdfdesc_make_qr_code (in data_to_qrcode any, in src_width int :
   content := "IM CreateImageBlob" (src_width, src_height, 'white', 'jpg');
   qrcode := "QRcode encodeString8bit" (data_to_qrcode);
   qrcode_bytes := aref_set_0 (qrcode, 0);
-  mixed_content := "IM PasteQRcode" (qrcode_bytes, qrcode[1], qrcode[2], qr_scale, qr_scale, 0, 0, cast (content as varchar), length (content));
+  mixed_content := "IM PasteQRcode" (qrcode_bytes, qrcode[1], qrcode[2], qr_scale, qr_scale + 2, 0, 0, cast (content as varchar), length (content));
   mixed_content := encode_base64 (cast (mixed_content as varchar));
   mixed_content := replace (mixed_content, '\r\n', '');
   return mixed_content;
@@ -986,12 +1180,12 @@ create procedure rdfdesc_make_qr_code (in data_to_qrcode any, in src_width int :
 
 create procedure rdfdesc_virt_info ()
 {
-  http ('<a href="http://www.openlinksw.com/virtuoso/">OpenLink Virtuoso</a> version '); 
-  http (sys_stat ('st_dbms_ver')); 
+  http ('<a href="http://www.openlinksw.com/virtuoso/">OpenLink Virtuoso</a> version ');
+  http (sys_stat ('st_dbms_ver'));
   http (', on ');
-  http (sys_stat ('st_build_opsys_id')); http (sprintf (' (%s), ', host_id ())); 
+  http (sys_stat ('st_build_opsys_id')); http (sprintf (' (%s), ', host_id ()));
   http (case when sys_stat ('cl_run_local_only') = 1 then 'Single' else 'Cluster' end); http (' Edition ');
-  http (case when sys_stat ('cl_run_local_only') = 0 then sprintf ('(%d server processes)', sys_stat ('cl_n_hosts')) else '' end); 
+  http (case when sys_stat ('cl_run_local_only') = 0 then sprintf ('(%d server processes)', sys_stat ('cl_n_hosts')) else '' end);
 }
 ;
 
@@ -1004,10 +1198,10 @@ create procedure RDF_CARTRIDGES_SECURE_VD (in vhost varchar, in lhost varchar)
 
   DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about');
   DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/rdfdesc');
-  DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/sparql'); 
+  DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/sparql');
   DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about/id');
-  DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about/id/entity'); 
-  DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about/data'); 
+  DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about/id/entity');
+  DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about/data');
   DB.DBA.VHOST_REMOVE ( lhost=>lhost, vhost=>vhost, lpath=>'/about/data/entity');
 
   DB.DBA.VHOST_DEFINE (
@@ -1096,25 +1290,35 @@ create procedure RDF_CARTRIDGES_SECURE_VD (in vhost varchar, in lhost varchar)
 }
 ;
 
+create procedure rdfdesc_links_formats ()
+{
+  return vector (
+  	   vector ('application/rdf+xml','RDF/XML'),
+  	   vector ('text/n3','N3/Turtle'),
+  	   vector ('application/rdf+json','RDF/JSON'),
+  	   vector ('application/atom+xml','OData/Atom'),
+  	   vector ('application/odata+json','OData/JSON'),
+  	   vector ('text/cxml','CXML'),
+  	   vector ('text/csv','CSV'),
+  	   vector ('application/microdata+json','Microdata/JSON'),
+  	   vector ('text/html','HTML+Microdata'),
+  	   vector ('application/ld+json','JSON-LD')
+  	);
+}
+;
+
 create procedure rdfdesc_links_hdr (in subj any, in desc_link any)
 {
   declare links varchar;
+  declare vec any;
   desc_link := sprintf ('http://%{WSHost}s%s', desc_link);
   links := 'Link: ';
-  links := links || 
-  sprintf ('<%s&output=application%%2Frdf%%2Bxml>; rel="alternate"; type="application/rdf+xml"; title="Structured Descriptor Document (RDF/XML format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=text%%2Fn3>; rel="alternate"; type="text/n3"; title="Structured Descriptor Document (N3/Turtle format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=application%%2Frdf%%2Bjson>; rel="alternate"; type="application/rdf+json"; title="Structured Descriptor Document (RDF/JSON format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=application%%2Fatom%%2Bxml>; rel="alternate"; type="application/atom+xml"; title="Structured Descriptor Document (OData/Atom format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=application%%2Fodata%%2Bjson>; rel="alternate"; type="application/odata+json"; title="Structured Descriptor Document (OData/JSON format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=text%%2Fcxml>; rel="alternate"; type="text/cxml"; title="Structured Descriptor Document (CXML format)",', desc_link);
-  links := links || 
-  sprintf ('<%s&output=text%%2Fcsv>; rel="alternate"; type="text/csv"; title="Structured Descriptor Document (CSV format)",', desc_link);
+  vec := rdfdesc_links_formats ();
+  foreach (any elm in vec) do
+    {
+      links := links ||
+      sprintf ('<%s&output=%U>; rel="alternate"; type="%s"; title="Structured Descriptor Document (%s format)",', desc_link, elm[0], elm[0], elm[1]);
+    }
   links := links || sprintf ('<%s>; rel="http://xmlns.com/foaf/0.1/primaryTopic",', subj);
   links := links || sprintf ('<%s>; rev="describedby"\r\n', subj);
   http_header (http_header_get () || links);
@@ -1125,24 +1329,15 @@ create procedure rdfdesc_links_hdr (in subj any, in desc_link any)
 create procedure rdfdesc_links_mup (in subj any, in desc_link any)
 {
   declare links varchar;
-  if (desc_link = 0)
-    return;
+  declare vec any;
   desc_link := sprintf ('http://%{WSHost}s%s', desc_link);
   links := '';
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Frdf%%2Bxml" rel="alternate" type="application/rdf+xml" title="Structured Descriptor Document (RDF/XML format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=text%%2Fn3" rel="alternate" type="text/n3" title="Structured Descriptor Document (N3/Turtle format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Frdf%%2Bjson" rel="alternate" type="application/rdf+json" title="Structured Descriptor Document (RDF/JSON format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Fatom%%2Bxml" rel="alternate" type="application/atom+xml" title="Structured Descriptor Document (OData/Atom format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=application%%2Fatom%%2Bjson" rel="alternate" type="application/atom+json" title="Structured Descriptor Document (OData/JSON format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=text%%2Fcxml" rel="alternate" type="text/cxml" title="Structured Descriptor Document (CXML format)" />\n', desc_link);
-  links := links || repeat (' ', 5) ||
-  sprintf ('<link href="%V&output=text%%2Fcsv" rel="alternate" type="text/csv" title="Structured Descriptor Document (CSV format)" />\n', desc_link);
+  vec := rdfdesc_links_formats ();
+  foreach (any elm in vec) do
+    {
+      links := links || repeat (' ', 5) ||
+      sprintf ('<link href="%V&output=%U" rel="alternate" type="%s"  title="Structured Descriptor Document (%s format)" />\n', desc_link, elm[0], elm[0], elm[1]);
+    }
   links := links || repeat (' ', 5) || sprintf ('<link href="%V" rel="http://xmlns.com/foaf/0.1/primaryTopic" />\n', subj);
   links := links || repeat (' ', 5) || sprintf ('<link href="%V" rev="describedby" />\n', subj);
   http (links);
diff --git a/binsrc/rdf_mappers/rdfdesc/description.vsp b/binsrc/rdf_mappers/rdfdesc/description.vsp
index 1057d8d..b36f643 100644
--- a/binsrc/rdf_mappers/rdfdesc/description.vsp
+++ b/binsrc/rdf_mappers/rdfdesc/description.vsp
@@ -1,11 +1,17 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0" xml:lang="en">
+<html 
+    xmlns="http://www.w3.org/1999/xhtml" 
+    version="XHTML+RDFa 1.0" 
+    xml:lang="en"
+    xmlns:addthis="http://www.addthis.com/help/api-spec"
+    xmlns:fb="http://www.facebook.com/2008/fbml"
+>
 <?vsp
 
    declare _G, _S, _S_save, odd_position any;
    declare rdf_link, label, true_label, _subject any;
    declare arr, data, meta, h1, h2, inx, gr, host, pars, cookievec any;
-   declare iri_type, iri_uri, links, langs, dspace, sid, error_message, cookiestr, dsn, ua varchar;
+   declare iri_type, iri_uri, links, langs, dspace, sid, error_message, cookiestr, dsn, ua, sp_mode, accept_mode varchar;
    declare do_sponge, force_clean, do_refresh, local_lookup, sponge_type, proxy_iri_fn, expir int;
 
    set http_charset='utf-8';
@@ -13,9 +19,22 @@
      {
        http_rewrite ();
        http_status_set (403);
-       return;  
+       http ('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><body>You are not allowed to sponge due to Access Control restrictions.</body></html>');
+       return;
      }
 
+  --
+  -- Get AddthisKey from registry
+  --
+  --  if 0 then disable addthis support
+  --  if 1 use temp key to get basic social bookmarking
+  --  any other value should be a registered key
+  --
+  declare _addthis_key varchar;
+  _addthis_key := registry_get ('rdf_mappers_addthis_key');
+  if (0 = _addthis_key) _addthis_key := '0';
+  if ('1' = _addthis_key) _addthis_key := 'xa-4ce13e0065cdadc0';
+
    label := '';
    iri_type := 'unknown';
    _subject := '';
@@ -23,13 +42,14 @@
    odd_position := 0;
    do_refresh := null;
    sponge_type := '';
+   rdf_link := '';
    connection_set ('ns_ctr', 1); /* for unknown xmlns to print in RDFa */
    host := http_request_header (http_request_header (), 'Host');
    ua :=   http_request_header (http_request_header (), 'User-Agent');
    if (not isstring (ua))
      ua := null;
    langs := rdfdesc_get_lang_acc (lines);
-   gr := get_keyword ('g', params, '');
+   gr := rtrim (get_keyword ('g', params, ''));
    if (gr like '%?debug=on' or gr like '%&debug=on')
      gr := subseq (gr, 0, length (gr) - 9);
    if (gr like '%?@Lookup@=%' or gr like '%&@Lookup@=%')
@@ -42,8 +62,19 @@
        do_refresh := atoi (force_clean);
        if (do_refresh < 0 or force_clean = 'clean')
          do_refresh := null;
-       gr := regexp_substr ( '(.*)([\\?&]@Lookup@=.*)', gr, 1); 
-     } 
+       gr := regexp_substr ( '(.*)([\\?&]@Lookup@=.*)', gr, 1);
+     }
+   sp_mode := 'add';  
+   accept_mode := null;
+   if (gr like '%sponger:%=%')
+     {
+       declare rq any;
+       rq := WS..PARSE_URI (gr); 
+       rq := split_and_decode (rq[4]);
+       sp_mode := get_keyword ('sponger:get', rq, 'add');
+       accept_mode := get_keyword ('sponger:accept', rq);
+       gr := regexp_substr ( '(.*)([\\?&]sponger:(.*)=.*)', gr, 1);
+     }
    arr := rfc1808_parse_uri (gr);
    if (arr[0] = '' and arr[1] = '' and arr[2] <> '') -- case when /about/html/www.cname/path i.e. when no scheme the default is http
      gr := 'http://' || gr;
@@ -91,13 +122,14 @@
 
    arr := rfc1808_parse_uri (_G);
    dspace := arr[1];
+
    if (arr[2] = '/' and DB.DBA.vspx_uri_compose (arr) <> _G)
      arr[2] := '';
    -- enable to stop sponge for #fragment
    --if (arr[5] <> '')
    --  do_sponge := 0;
    arr[0] := lower (arr[0]);
-   if (arr[0] not in ('http', 'https', 'file', 'feed', 'doi', 'webcal', 'oai') and _G not like 'urn:lsid:%')
+   if (arr[0] not in ('http', 'https', 'file', 'feed', 'doi', 'webcal', 'oai', 'acct', 'mailto') and _G not like 'urn:lsid:%')
      {
        do_sponge := 0;
        local_lookup := 1;
@@ -120,7 +152,15 @@
 	    arr[0] := sch;
 	    arr[1] := nhost;
 	    arr[2] := npath;
+
+	    if (lower(arr[0]) in ('acct', 'mailto'))
+	      {
+	        arr [2] := arr[1];
+	        arr [1] := '';
+              }
+
 	    _G := DB.DBA.vspx_uri_compose (arr);
+
 	    --do_sponge := 0;
          }
        else if (length (pa) > 4 and pa[3] <> '' and pa [4] <> '')
@@ -132,6 +172,13 @@
 	    arr[0] := sch;
 	    arr[1] := nhost;
 	    arr[2] := npath;
+
+	    if (sch in ('acct', 'mailto'))
+	      {
+	        arr[2] := arr[1];
+		arr[1] := '';
+	      }
+
 	    _G := DB.DBA.vspx_uri_compose (arr);
 	    --do_sponge := 0;
          }
@@ -170,7 +217,7 @@
          {
            sparql clear graph ?:_G;
 	 }
-       DB.DBA.RM_DO_SPONGE (_G, sponge_type, do_refresh);
+       DB.DBA.RM_DO_SPONGE (_G, sponge_type, do_refresh, sp_mode, accept_mode);
        commit work;
      }
    else if (_S like 'nodeID://%' or local_lookup = 1)
@@ -201,11 +248,11 @@
          {
            exec (sprintf ('sparql ask where { graph <%S> { <%s#this> ?p ?o . }}', _G, _S), null, null, vector (), 0, meta, data);
            if (length (data))
-             _S := _S || '#this';
-           else 
+	     _S := _S || '#this';
+           else
 	     {
 	       _S := DB.DBA.RDF_PROXY_ENTITY_IRI (_G);
-	     } 
+	     }
          }
      }
 
@@ -227,19 +274,19 @@
    iri_type := rdfdesc_type (_G, _S, iri_uri);
 
    exec (sprintf ('sparql prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dc: <http://purl.org/dc/elements/1.1/>
-	select ?o where { graph <%S> { <%S> rdfs:comment ?o } }', _G, _S), null, null, vector (), 0, meta, data);
-   if (length (data)) _subject := data[0][0];
+	select ?o lang(?o) where { graph <%S> { <%S> rdfs:comment ?o } }', _G, _S), null, null, vector (), 0, meta, data);
+   if (length (data)) _subject := rdfdesc_label_get (data, http_request_header_full (lines, 'Accept-Language', 'en'));
 
    rdf_link := sprintf ('/sparql?default-graph-uri=%U&query=%U', _G, sprintf ('DESCRIBE <%s>',_S));
    rdfdesc_links_hdr (_S, rdf_link);
 
    links := '';
-   for select HS_EXPIRATION from SYS_HTTP_SPONGE where HS_ORIGIN_URI = _G do 
+   for select HS_EXPIRATION from SYS_HTTP_SPONGE where HS_ORIGIN_URI = _G do
      {
        if (HS_EXPIRATION is not null)
          links := links||sprintf ('Expires: %s\r\n', date_rfc1123 (HS_EXPIRATION));
      }
-   commit work;  
+   commit work;
    http_header (http_header_get () || links);
    errors:
    if (not length (label))
@@ -247,19 +294,23 @@
    if (label like 'http%://%')
      label := rdfdesc_uri_curie (label);
    set isolation = 'uncommitted';
-   dsn := (SPARQL prefix h: <http://www.w3.org/2006/http#> prefix hh: <http://www.w3.org/2006/http-header#> 
+   dsn := (SPARQL prefix h: <http://www.w3.org/2006/http#> prefix hh: <http://www.w3.org/2006/http-header#>
    	     select ?vo { graph `iri(?:_G)` { ?s ?p hh:content-location ; h:fieldValue ?v . ?v h:elementName ?vo } } LIMIT 1);
    if (dsn is null)
      {
-       if (strchr (_G, '#') is null)
-	 dsn := _G || '#';
-       else
+       --if (strchr (_G, '#') is null)
+       --  dsn := _G || '#';
+       --else
 	 dsn := _G;
      }
    else
      {
        dsn := rfc1808_expand_uri (_G, dsn);
      }
+  declare desc_resource_uri varchar;
+  declare desc_qr varchar;
+  desc_qr := sprintf ('define sql:describe-mode "CBD" DESCRIBE <%s>', _S);
+  desc_resource_uri := sprintf ('http://%{WSHost}s/sparql?query=%U&format=cxml', desc_qr);
 ?>
 
 <!-- header -->
@@ -271,6 +322,11 @@
     <link rel="stylesheet" type="text/css" href="statics/style_w.css" />
     <link href="statics/highlighter.css" type="text/css" rel="stylesheet" charset="utf-8" />
     <meta http-equiv="Content-type" content="text/html;charset=utf-8" />
+    <script type="text/javascript">
+    /*<![CDATA[*/
+    var uri	= "<?U dsn ?>";
+    /*]]>*/
+    </script>
     <script type="text/javascript" src="statics/script.js"></script>
     <script type="text/javascript" src="oat/loader.js"></script>
 </head>
@@ -278,8 +334,7 @@
 <body onload="init();" about="<?V _S ?>">
 -->
 <body about="<?V _S ?>">
-
-    <div id="slb">
+  <div id="slb">
     <div id="sidebar">
       <h1>What Is This?</h1>
       <p>This is an HTML+RDFa representation of <b><i>metadata</i></b> describing this Web-addressable resource.</p>
@@ -315,21 +370,21 @@
     <div id="header">
       <div id="hd_l">
         <div id="opl_logo">
-          <a href="http://www.openlinksw.com" 
+          <a href="http://www.openlinksw.com"
              title="OpenLink Software">
-            <img src="statics/openlinklogo_wstrap_2008.png" 
+            <img src="statics/openlinklogo_wstrap_2008.png"
                  alt="[OpenLink Software]" />
           </a>
         </div>
 	<div id="entity_info">
-	  <h1 id="title">About: <a href="<?= case when _S like 'nodeID://%' then rdfdesc_http_url (_S) else _S end ?>"><?vsp http (label); ?></a></h1>
-        <div id="homelink">
-        </div>
-        <div class="page-resource-uri">
-	    An Entity of Type : <a href="<?V iri_uri ?>"><?V iri_type ?></a>, 
-	    from Data Source : <a href="<?V dsn ?>"><?V dsn ?></a>, 
+          <h1 id="title">About: <a href="<?= case when _S like 'nodeID://%' then rdfdesc_http_url (_S) else replace (_S, '#', '%01') end ?>"><?vsp http (label); ?></a></h1>
+          <div id="homelink">
+          </div>
+          <div class="page-resource-uri">
+	    An Entity of Type : <a href="<?V iri_uri ?>"><?V iri_type ?></a>,
+	    from Data Source : <a href="<?V dsn ?>"><?V dsn ?></a>,
 	    within Data Space : <a href="http://<?V dspace ?>"><?V host ?></a>
-        </div>
+          </div>
         </div> <!-- #entity_info -->
       </div> <!-- hd_l -->
       <div id="hd_r">
@@ -337,7 +392,7 @@
   declare qrimg any;
   qrimg := rdfdesc_make_qr_code (rdfdesc_make_curie (case when _S like 'nodeID://%' then rdfdesc_http_url (_S) else _S end, lines));
   if (qrimg is not null and strcasestr (ua, 'Mobile') is null) {
-    
+
 ?>
 	<img id="qrcode" alt="QRcode image" src="data:image/jpg;base64,<?V qrimg ?>"/>
 <?vsp } ?>
@@ -355,10 +410,10 @@
        <div id="navbar">
          <ul id="navlist">
           <li>
-            <a href="#" id="tab_attributes" onclick="toggle_tab('attributes'); return false;" class="current">Forward Links</a>
+            <a href="#" id="tab_attributes" onclick="toggle_tab('attributes'); return false;" class="current" title="description subject references other objects or literal values via one or more attribute-value pairs">References</a>
           </li>
           <li>
-            <a href="#" id="tab_attributeof" onclick="toggle_tab('attributeof'); return false;">Backward Links</a>
+            <a href="#" id="tab_attributeof" onclick="toggle_tab('attributeof'); return false;" title="description subject referenced by other objects by being the value of one or more attribute-value pairs">Referenced By</a>
           </li>
          </ul>
       </div> <!-- #navbar -->
@@ -443,19 +498,62 @@
 
 <!-- footer -->
     <div id="footer">
+<?vsp if (_addthis_key <> '0') { ?>
+  <div id="FT_share">
+    <!-- AddThis Button BEGIN -->
+	<div class="addthis_toolbox addthis_default_style ">
+	<a class="addthis_button_facebook_like" id="fb_like_id"></a>
+	<a class="addthis_button_tweet"></a>
+	<a class="addthis_button_google_plusone" id="g_plusone_id"></a>
+	<a class="addthis_counter addthis_pill_style"></a>
+	</div>
+    <script type="text/javascript"> 
+    /*<![CDATA[*/
+	var addthis_config = {"data_track_clickback":true; ui_cobrand:"Virtuoso"};
+	var addthis_share = { url_transforms : { clean: true, remove: ['sid'] } };
+    /*]]>*/
+    </script>
+    <script type="text/javascript"> 
+	var fb_like_id = document.getElementById('fb_like_id');
+	if (fb_like_id) fb_like_id.setAttribute('fb:like:layout', 'button_count');
+	var g_plusone_id = document.getElementById('g_plusone_id');
+	if (g_plusone_id) g_plusone_id.setAttribute('g:plusone:size', 'medium');
+    </script>
+    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=<?=_addthis_key?>"></script>
+    <!-- AddThis Button END -->
+  </div><!-- ft_s -->
+<?vsp } ?>
       <?vsp if (error_message is null) { ?>
       <div id="ft_t">
-       Explore alternative Linked Data Views via this <a title="OpenLink Data Explorer" href="/ode/?uri=<?vsp http_url (_S); ?>">OpenLink Data Explorer</a> link
-          
+        Alternative Linked Data Views:
+
+	<?vsp if (VAD_CHECK_VERSION ('fct') is not null) { ?>
+	<a href="/describe/?uri=<?vsp http_url (_S); ?>" title="Faceted Browing using Follow-Your-Nose pattern across links" target="_blank">Facets</a>
+	|
+	<?vsp } ?>
+	<?vsp if (VAD_CHECK_VERSION ('PivotViewer') is not null) { ?>
+	<a href="/PivotViewer/?url=<?vsp http_url (desc_resource_uri); ?>"  title="PivotViewer page for exploring results and generating new queries" target="_blank">PivotViewer</a>
+	|
+	<?vsp } ?>
+	<?vsp if (VAD_CHECK_VERSION ('iSPARQL') is not null) { ?>
+	<a href="/isparql/view/?query=<?vsp http_url (desc_qr); ?>&resultview=browser" title="Interactive Query By Example oriented SPARQL UI" target="_blank">iSPARQL</a>
+	|
+	<?vsp } ?>
+	<a href="/ode/?uri=<?vsp http_url (_S); ?>" title="Basic navigation and exploration" target="_blank">ODE</a>
+
            Raw Linked Data formats:
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/cxml')?>">CXML</a> |
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/csv')?>">CSV</a> | RDF (
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/plain') ?>">N-Triples</a>
         <a href="<?=rdf_link || sprintf ('&output=%U', 'text/rdf+n3') ?>">N3/Turtle</a>
-        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+json')?>">JSON</a> 
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+json')?>">JSON</a>
         <a href="<?=rdf_link || sprintf ('&output=%U', 'application/rdf+xml') ?>">XML</a> ) | OData (
-        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/atom+xml')?>">Atom</a> 
-        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/odata+json')?>">JSON</a> )
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/atom+xml')?>">Atom</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/odata+json')?>">JSON</a> ) | Microdata (
+	<a href="<?=rdf_link || sprintf ('&output=%U', 'application/microdata+json') ?>">JSON</a>
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'text/html') ?>">HTML</a>) |
+        <a href="<?=rdf_link || sprintf ('&output=%U', 'application/ld+json')?>">JSON-LD</a> 
+
       </div> <!-- #ft_t -->
       <?vsp } ?>
       <div id="ft_b">
@@ -471,7 +569,7 @@
 	    alt="Valid XHTML + RDFa" height="27" /></a>
 	</span>
 	<br />
-	This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>. 
+	This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.
 	<br />
 	<?vsp rdfdesc_virt_info (); ?>
       </div> <!-- #ft_b -->
@@ -481,17 +579,18 @@
 	     http ('Trace ID: ' || sid);
 	?>
     </div>
+    <div id="status"></div>
     </div> <!-- #footer -->
 
     <?vsp if (isstring (registry_get ('urchinTracker'))) { ?>
     <script type="text/javascript">
-     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-     document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-   </script>
- <script type="text/javascript">
+	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+    </script>
+    <script type="text/javascript">
 	try {
 	var pageTracker = _gat._getTracker("<?V registry_get ('urchinTracker')  ?>");
-     pageTracker._trackPageview();
+	pageTracker._trackPageview();
 	} catch(err) {}</script>
     <?vsp } ?>
 
diff --git a/binsrc/rdf_mappers/rdfdesc/statics/script.js b/binsrc/rdf_mappers/rdfdesc/statics/script.js
index c3b4c25..2bbfc65 100644
--- a/binsrc/rdf_mappers/rdfdesc/statics/script.js
+++ b/binsrc/rdf_mappers/rdfdesc/statics/script.js
@@ -1,4 +1,32 @@
-var featureList = ["slidebar", "resize"];
+var featureList = ["slidebar", "resize", "ajax", "json"];
+var timer = null;
+var x = function (data) 
+   {
+     var o = null;
+     var div = $('status');
+     try 
+       {
+	 o = OAT.JSON.parse(data);
+       }
+     catch (e)
+       {
+	 o = null;
+       }
+     if (o && o.result != 0)
+       {
+	 div.innerHTML = "Status: " + o.cartridge + ", " + o.time + "sec. in queue";
+       } 
+     if (o && o.result == 0)
+       {
+	 div.innerHTML = 'Status: done';
+	 if (timer) clearTimeout (timer);
+       } 
+   }
+function getStatus ()
+   {
+     OAT.AJAX.GET ("/about/queue/status?uri=" + uri, false, x);
+     timer = setTimeout ("getStatus ()", 10000);
+   }
 
 function init() {
   var slb = new OAT.Slidebar ("slb", {imgPrefix: "statics/", autoClose: false, width: 500, handleWidth: 15, handleOpenImg: "whats_this_open_hndl_15w.png", handleCloseImg: "whats_this_close_hndl_15w.png"});
@@ -9,6 +37,7 @@ function init() {
     {
       OAT.Resize.create($('x_content'),$('x_content'),OAT.Resize.TYPE_Y,restrict);
     }
+  getStatus ();
 }
 
 var long_literal_counter = 0;
diff --git a/binsrc/rdf_mappers/rdfdesc/statics/style_w.css b/binsrc/rdf_mappers/rdfdesc/statics/style_w.css
index c639759..fbebd03 100644
--- a/binsrc/rdf_mappers/rdfdesc/statics/style_w.css
+++ b/binsrc/rdf_mappers/rdfdesc/statics/style_w.css
@@ -170,4 +170,10 @@ line-height: 120%;
 #qrcode { 
   float: right;
   clear: right;
-  margin-right: 20px} 
+  margin-right: 20px; } 
+
+#FT_share { float: center; clear: both; text-align: center; margin-top: 4px; }
+
+.addthis_toolbox { width: 400px; margin: 0 auto; }
+
+#status { margin-left:10px; margin-bottom: 3px; position:fixed; bottom:10px; }
diff --git a/binsrc/rdf_mappers/sponger_coref_post_process.sql b/binsrc/rdf_mappers/sponger_coref_post_process.sql
new file mode 100644
index 0000000..c8463fd
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_coref_post_process.sql
@@ -0,0 +1,495 @@
+--
+--  $Id: sponger_coref_post_process.sql,v 1.1.2.1 2012/03/06 16:06:15 source Exp $
+--
+--  Post-processes Sponger generated entity URIs, identifying and
+--  linking co-references by adding owl:sameAs links
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+-- Searches the given graph for instances of the given type. Instances with matching values of the specified match property
+-- are linked, through owl:sameAs, to a 'canonical' URI for that instance. The canonical URI is generated from the match property.
+-- All instances with the same value of the match property should generate the same canonical URI.
+-- The match property will typically be some label which uniquely identifies some real-world entity.
+-- 
+-- Defines:
+-- DB.DBA.RM_COREF_PROCESS_SCHEMAS
+--   DB.DBA.RM_COREF_SCHEMA_GET_TYPES
+-- DB.DBA.RM_COREF_RESOLVE_ALL_GRAPHS_BY_TYPE
+--   DB.DBA.RM_COREF_RESOLVE_BY_TYPE_AND_GRAPH
+--     DB.DBA.RM_COREF_CANONICAL_URI_MAKE
+-- DB.DBA.RM_COREF_CLEAN_SINGLE_SAMEAS_STMTS
+-- DB.DBA.RM_COREF_RESOLVER_RESOLVE
+-- DB.DBA.RM_COREF_RESOLVER_ENABLE_SELECTED_TYPES
+
+EXEC_STMT(
+'create table DB.DBA.RM_COREF_RESOLVE_TYPES (
+  CR_TYPE_URI varchar,
+  CR_SCHEMA_URI varchar,
+  CR_STATE integer default 0,
+  CR_STARTED datetime,
+  CR_FINISHED datetime,
+  primary key (CR_TYPE_URI)
+  )', 0)
+;
+
+-- CR_STATE:
+--   -2: Manually marked. Always skip
+--   -1: Error occurred
+--    0: Initial state
+--    1: To be checked 
+--    2: Checking in progress
+--    3: Checked
+
+EXEC_STMT(
+'create table DB.DBA.RM_COREF_RESOLVE_STATUS (
+  CR_GRAPH_URI varchar,
+  CR_TYPE_URI varchar,
+  CR_MATCH_PROP_URI varchar,
+  CR_TYPE_INSTANCES integer default 0,
+  CR_STATE integer default 0,
+  CR_STARTED datetime,
+  CR_FINISHED datetime,
+  CR_MESSAGE varchar,
+  primary key (CR_GRAPH_URI, CR_TYPE_URI, CR_MATCH_PROP_URI)
+  )
+  create index RM_COREF_RESOLVE_STAT on DB.DBA.RM_COREF_RESOLVE_STATUS (CR_STATE)', 0)
+;
+
+-- CR_STATE:
+--   -1: Error occurred
+--    0: Initial state
+--    1: To be checked 
+--    2: Checking in progress
+--    3: Checked
+
+commit work;
+
+create procedure DB.DBA.RM_COREF_RESOLVE_ALL_GRAPHS_BY_TYPE (
+  in type_uri varchar, 
+  in type_domain varchar, 
+  in coref_graph_uri varchar, 
+  in coref_uri_base varchar, 
+  in match_property_uri varchar,
+  in ins_batch_size integer := 1000
+  )
+{
+
+  for select "g", "c"  from (sparql define input:storage "" select distinct ?g count(?s) as ?c where { graph ?g { ?s a `iri (?:type_uri)`; `iri (?:match_property_uri)` ?tag . }}) x do
+  {
+    declare graph_uri varchar;
+    declare _cr_state, type_instance_count integer;
+
+    graph_uri := cast ("g" as varchar);
+    type_instance_count := cast ("c" as integer);
+
+    insert soft RM_COREF_RESOLVE_STATUS (CR_GRAPH_URI, CR_TYPE_URI, CR_MATCH_PROP_URI) values (graph_uri, type_uri, match_property_uri);
+    _cr_state := (select CR_STATE from RM_COREF_RESOLVE_STATUS where 
+                  CR_GRAPH_URI = graph_uri and CR_TYPE_URI = type_uri and CR_MATCH_PROP_URI = match_property_uri);
+    if (_cr_state = 3)
+    {
+      goto next_graph;
+    }
+
+    update RM_COREF_RESOLVE_STATUS set CR_STARTED = now(), CR_FINISHED = null, CR_STATE = 2, CR_TYPE_INSTANCES = type_instance_count
+      where CR_GRAPH_URI = graph_uri and CR_TYPE_URI = type_uri and CR_MATCH_PROP_URI = match_property_uri;
+    commit work;
+
+    declare exit handler for sqlstate '*'
+    {
+      rollback work;
+
+      update RM_COREF_RESOLVE_STATUS set CR_STATE = -1, CR_MESSAGE = __SQL_MESSAGE
+        where CR_GRAPH_URI = graph_uri and CR_TYPE_URI = type_uri and CR_MATCH_PROP_URI = match_property_uri;
+      commit work;
+      goto next_graph;
+    };
+
+    DB.DBA.RM_COREF_RESOLVE_BY_TYPE_AND_GRAPH (type_uri, graph_uri, type_domain, coref_graph_uri, 
+      coref_uri_base, match_property_uri, ins_batch_size);
+
+    update RM_COREF_RESOLVE_STATUS set CR_FINISHED = now(), CR_STATE = 3
+      where CR_GRAPH_URI = graph_uri and CR_TYPE_URI = type_uri and CR_MATCH_PROP_URI = match_property_uri;
+    commit work;
+
+next_graph:;
+  }
+}
+;
+
+create procedure DB.DBA.RM_COREF_RESOLVE_BY_TYPE_AND_GRAPH (
+  in type_uri varchar, 
+  in graph_uri varchar, 
+  in type_domain varchar, 
+  in coref_graph_uri varchar, 
+  in coref_uri_base varchar, 
+  in match_property_uri varchar,
+  in ins_batch_size integer := 1000
+  )
+{
+  declare qry varchar; 
+  declare result, meta, state, message any;
+  declare sameAs_triples_dict any;
+  declare iTripleBatchSize integer;
+  declare sameAs_pred_id any;
+
+
+  sameAs_pred_id := iri_to_id ('http://www.w3.org/2002/07/owl#sameAs');
+
+  qry := sprintf ('sparql define input:storage "" select ?s ?tag from <%s> where { ?s a <%s> ; <%s> ?tag . }', graph_uri, type_uri, match_property_uri);
+  state := '00000';
+  exec (qry, state, message, vector(), 0, meta, result);
+  if (state <> '00000')
+  {
+    signal (state, message, 'COREF');
+  }
+
+  sameAs_triples_dict := dict_new (ins_batch_size);
+  iTripleBatchSize := 0;
+
+  foreach (any str in result) do
+  {
+    declare entity_uri, entity_tag, canonical_entity_uri varchar;
+
+    if (isstring (str[0]) and isstring (str[1]))
+    {
+      entity_uri := str[0];
+      entity_tag := str[1];
+
+      canonical_entity_uri := DB.DBA.RM_COREF_CANONICAL_URI_MAKE (coref_uri_base, type_domain, type_uri, entity_tag);
+      if (canonical_entity_uri is not null)
+      {
+	declare sameAs_subj_id, sameAs_obj_id any;
+
+        iTripleBatchSize := iTripleBatchSize + 1;
+	-- Make owl:sameAs triple
+	sameAs_subj_id := iri_to_id (entity_uri);
+	sameAs_obj_id := iri_to_id (canonical_entity_uri);
+	dict_put (sameAs_triples_dict, vector (sameAs_subj_id, sameAs_pred_id, sameAs_obj_id), 1);
+      }
+
+      -- for every ins_batch_size triples
+      if (mod (iTripleBatchSize, ins_batch_size) = 0)
+      {
+	if (dict_size (sameAs_triples_dict))
+	{
+ins_triples:
+	  declare sameAs_triples any;
+	  sameAs_triples := dict_list_keys (sameAs_triples_dict, 1);
+	  {
+	    declare deadl int;
+	    deadl := 5;
+ins_again:
+	    declare exit handler for sqlstate '40001' {
+	      deadl := deadl - 1;
+	      if (deadl > 0)
+	      {
+		rollback work;
+		goto ins_again;
+	      }
+	      resignal;
+	    };
+	    DB.DBA.RDF_INSERT_TRIPLES (coref_graph_uri, sameAs_triples);
+	    commit work;
+	  } 
+	  iTripleBatchSize := 0;
+	}
+      }
+    }
+  }
+
+-- Insert last partial batch
+if (dict_size (sameAs_triples_dict))
+  goto ins_triples;
+}
+;
+
+create procedure DB.DBA.RM_COREF_CANONICAL_URI_MAKE (
+  in coref_uri_base varchar,
+  in type_domain varchar,
+  in type_uri varchar, 
+  in tag varchar
+  )
+{
+  declare canonical_uri, type_name, tmp varchar;
+  declare indx int;
+
+  -- All Sponger-generated entity URIs are hash URIs
+  indx := strrchr (type_uri, '#'); 
+  if (indx is null or (indx = length (type_uri) - 1))
+    return null;
+  type_name := subseq (type_uri, indx + 1);
+  tag := trim (tag);
+  -- Skip tags > 50 chars, these are probably not true labels, more like descriptions
+  if (length (tag) < 2 or length (tag) > 50)
+    return null;
+  if (regexp_match ('[^A-Za-z0-9 _]', tag) is not null)
+  {
+    return null;
+  }
+  tag := replace (tag, ' ', '_'); -- TO DO: Needs extending - what about other chars which must be uri-encoded
+  canonical_uri := sprintf ('%s/%s/%s#%s', coref_uri_base, type_domain, type_name, tag); 
+  return canonical_uri;
+}
+;
+
+create procedure DB.DBA.RM_COREF_SCHEMA_GET_TYPES (in schema_uri varchar)
+{
+  declare qry varchar; 
+  declare result, meta, state, message any;
+  declare type_uris any;
+
+
+  qry := sprintf ('sparql define input:storage "" select distinct ?s from <%s> where {{ ?s a owl:Class . } union { ?s a rdfs:Class . }}', schema_uri);
+  state := '00000';
+  exec (qry, state, message, vector(), 0, meta, result);
+
+  if (state <> '00000')
+    return;
+
+  type_uris := vector ();
+  foreach (any str in result) do
+  {
+    declare type_uri varchar;
+
+    if (isstring (str[0]))
+    {
+      type_uri := str[0];
+      -- Skip base classes of xxx#Object
+      if (type_uri = schema_uri || '#Object')
+        goto next_type;
+      type_uris := vector_concat (type_uris, vector (type_uri));
+    }
+next_type:;
+  }
+  return type_uris;
+}
+;
+
+-- Identifies the types for which we might want to resolve co-references
+-- by extracting type declarations from selected schemas.
+-- Adds an entry to table RM_COREF_RESOLVE_TYPES for each type.
+-- Only schemas with a URI matching the given stem are considered.
+-- All owl:Class and rdfs:Class instances in the matching schemas are identified as candidate types.
+create procedure DB.DBA.RM_COREF_PROCESS_SCHEMAS (in schema_uri_match_stem varchar)
+{
+  declare schemas any;
+  schemas := vector ();
+
+  for (select NS_URL from SYS_XML_PERSISTENT_NS_DECL where NS_URL like schema_uri_match_stem || '%') do
+  {
+    -- Skip all virt schemas (virtcxml#, virtrdf#, virtrdf-meta-entity-class#)
+    if (strstr (NS_URL, 'http://www.openlinksw.com/schemas/virt') is not null)
+      goto next_url;
+    NS_URL := rtrim (NS_URL, '#/');
+    schemas := vector_concat (schemas, vector (NS_URL));
+next_url:;
+  }
+
+  foreach (any _schema in schemas) do
+  {
+    declare schema_types any;
+    schema_types := DB.DBA.RM_COREF_SCHEMA_GET_TYPES (_schema);
+    foreach (any schema_type in schema_types) do
+    {
+      insert soft RM_COREF_RESOLVE_TYPES (CR_TYPE_URI, CR_SCHEMA_URI, CR_STATE) values (schema_type, _schema, -2);
+    }
+    commit work;
+  }
+}
+;
+
+-- Remove any single owl:sameAs statements (i.e. a canonical URI has only one referrer), they serve no purpose
+create procedure DB.DBA.RM_COREF_CLEAN_SINGLE_SAMEAS_STMTS (in coref_graph_uri varchar := 'http://virtrdf_mapper_coref')
+{
+  declare qry varchar; 
+  declare result, meta, state, message any;
+
+  qry := sprintf ('sparql define input:storage "" select distinct ?o, count(?o) as ?c from <%s> where { ?s ?p ?o }', coref_graph_uri);
+  state := '00000';
+  exec (qry, state, message, vector(), 0, meta, result);
+  if (state <> '00000')
+    return;
+
+  foreach (any str in result) do
+  {
+    declare canonical_uri varchar;
+    declare cnt integer;
+
+    if (isstring (str[0]) and isinteger (str[1]))
+    {
+      canonical_uri := str[0];
+      cnt := str[1];
+      if (cnt = 1)
+      {
+        qry := sprintf ('sparql delete from <%s> { ?s ?p ?o } where { ?s owl:sameAs <%s> . ?s ?p ?o . }', coref_graph_uri, canonical_uri);
+        state := '00000';
+        exec (qry, state, message);
+        if (state <> '00000')
+	{
+          rollback work;
+	}
+        else
+          commit work;
+skip_delete:;
+      }
+    } 
+  }
+}
+;
+
+create procedure DB.DBA.RM_COREF_RESOLVER_ENABLE_SELECTED_TYPES ()
+{
+  -- update RM_COREF_RESOLVE_TYPES set CR_STATE = 1 where CR_SCHEMA_URI like '%linkedin';
+  -- update RM_COREF_RESOLVE_TYPES set CR_STATE = 1 where CR_SCHEMA_URI like '%twitter';
+  -- update RM_COREF_RESOLVE_TYPES set CR_STATE = 1 where CR_SCHEMA_URI like '%googleplus';
+
+  -- Some class's labels typically don't form a bounded set or can be so generic that false matches are likely
+  -- These instances aren't considered individuals
+  -- Examples:
+  -- http://www.openlinksw.com/schemas/cv#WorkHistory
+  -- http://www.openlinksw.com/schemas/googleplus#ActivityObject
+  -- http://www.openlinksw.com/schemas/linkedin#Position
+  -- http://www.openlinksw.com/schemas/opengraph#Album
+  -- http://www.openlinksw.com/schemas/opengraph#Photo
+
+  declare v_types_to_enable any;
+
+  v_types_to_enable := vector (
+    'http://www.openlinksw.com/schemas/cv#Company',
+    'http://www.openlinksw.com/schemas/cv#EducationalOrg',
+    'http://www.openlinksw.com/schemas/cv#Organization',
+    'http://www.openlinksw.com/schemas/cv#Skill',
+    'http://www.openlinksw.com/schemas/googleplus#PlaceLived',
+    'http://www.openlinksw.com/schemas/linkedin#Company',
+    'http://www.openlinksw.com/schemas/linkedin#Skill',
+    'http://www.openlinksw.com/schemas/twitter#Application'
+  );
+
+  foreach (any type_to_enable in v_types_to_enable) do
+  {
+    update RM_COREF_RESOLVE_TYPES set CR_STATE = 1 where CR_TYPE_URI = type_to_enable ;
+  }
+  commit work;
+}
+;
+
+-- ------------------------------------------------
+
+create procedure DB.DBA.RM_COREF_RESOLVER_RESOLVE (in coref_graph_uri varchar := 'http://virtrdf_mapper_coref', in cr_init_state integer := 0)
+{
+  declare type_uri varchar; 
+  declare graph_uri varchar; 
+  declare type_domain varchar; 
+  declare coref_uri_base varchar; 
+  declare match_property_uri varchar;
+  declare batch_size integer;
+
+  coref_uri_base := coref_graph_uri;
+  match_property_uri := 'http://www.w3.org/2000/01/rdf-schema#label';
+  batch_size := 100;
+
+  if (cr_init_state = 2)
+  {
+    delete from DB.DBA.RM_COREF_RESOLVE_TYPES;
+    commit work;
+
+    -- Identifies the types for which we might want to resolve co-references
+    -- by extracting type declarations from selected schemas.
+    -- Adds an entry to table RM_COREF_RESOLVE_TYPES for each type.
+    -- Only schemas with a URI matching the given stem are considered.
+    -- All owl:Class and rdfs:Class instances in the matching schemas are identified as candidate types.
+    DB.DBA.RM_COREF_PROCESS_SCHEMAS ('http://www.openlinksw.com/schemas');
+    return;
+
+    -- Manually edit DB.DBA.RM_COREF_RESOLVER_ENABLE_SELECTED_TYPES (), setting CR_STATE= 1 for types you want to enable.
+  }
+
+  if (cr_init_state = 1)
+  {
+    update RM_COREF_RESOLVE_TYPES set CR_STARTED = null, CR_FINISHED = null, CR_STATE = 1 where CR_STATE >= -1;
+    commit work;
+  }
+
+  if (cr_init_state > 0)
+  {
+    exec (sprintf ('sparql clear graph <%s>', coref_graph_uri));
+    delete from DB.DBA.RM_COREF_RESOLVE_STATUS;
+    commit work;
+  }
+
+  -- For each type, scan all graphs (or those not already processed if resuming a run) and generate owl:sameAs statements
+  for (select CR_TYPE_URI as _cr_type_uri, CR_SCHEMA_URI from RM_COREF_RESOLVE_TYPES where CR_STATE = 1) do
+  {
+    update RM_COREF_RESOLVE_TYPES set CR_STARTED = now(), CR_FINISHED = null, CR_STATE = 2
+      where CR_TYPE_URI = _cr_type_uri;
+    commit work;
+
+    type_domain := rtrim (trim (CR_SCHEMA_URI), '#/');
+    type_domain := subseq (type_domain, strrchr (type_domain, '/') + 1);
+    DB.DBA.RM_COREF_RESOLVE_ALL_GRAPHS_BY_TYPE (_cr_type_uri, type_domain, 
+      coref_graph_uri, coref_uri_base, match_property_uri, batch_size);
+
+    update RM_COREF_RESOLVE_TYPES set CR_FINISHED = now(), CR_STATE = 3
+      where CR_TYPE_URI = _cr_type_uri;
+    commit work;
+  }
+  
+}
+;
+
+-- cr_init_state controls resetting of entries in table RM_COREF_RESOLVE_TYPES:
+--  0 => resume  
+--	 Leaves CR_STATE entries unchanged.
+--       Resumes processing of types by RM_COREF_RESOLVE_ALL_GRAPHS_BY_TYPE() from a previous run.
+--  1 => reset 
+--       Resets CR_STATEs >=-1 to 1 
+--	 Leaves types manually marked for skipping (CR_STATE = -2) intact.
+--       Clears graph <http://virtrdf_mapper_coref>
+--       All other types will processed from scratch by RM_COREF_RESOLVE_ALL_GRAPHS_BY_TYPE().
+--  2 => clean
+--	 Cleans and re-populates table RM_COREF_RESOLVE_TYPES. 
+--       Clears graph <http://virtrdf_mapper_coref>
+--       Doesn't run RM_COREF_RESOLVE_ALL_GRAPHS_BY_TYPE(), to allow manual marking of types to be skipped.
+
+create procedure DB.DBA.RM_COREF_RESOLVER_INIT ()
+{
+  DB.DBA.RM_COREF_RESOLVER_RESOLVE (cr_init_state=>2);
+  log_message ('DB.DBA.RM_COREF_RESOLVER_INIT: Done');
+  log_message ('Edit RM_COREF_RESOLVER_ENABLE_SELECTED_TYPES(), then run RM_COREF_RESOLVER_RUN');
+}
+;
+
+create procedure DB.DBA.RM_COREF_RESOLVER_RUN (in cr_init_state integer := 0)
+{
+  DB.DBA.RM_COREF_RESOLVER_ENABLE_SELECTED_TYPES ();
+
+  log_message ('DB.DBA.RM_COREF_RESOLVER_RESOLVE : Start');
+  DB.DBA.RM_COREF_RESOLVER_RESOLVE (cr_init_state=>cr_init_state);
+  log_message ('DB.DBA.RM_COREF_RESOLVER_RESOLVE : Done');
+
+  log_message ('DB.DBA.RM_COREF_CLEAN_SINGLE_SAMEAS_STMTS : Start');
+  DB.DBA.RM_COREF_CLEAN_SINGLE_SAMEAS_STMTS ();
+  log_message ('DB.DBA.RM_COREF_CLEAN_SINGLE_SAMEAS_STMTS : Done');
+}
+;
+
+-- DB.DBA.RM_COREF_RESOLVER_INIT ();
+-- DB.DBA.RM_COREF_RESOLVER_RUN (1 / 0);
diff --git a/binsrc/rdf_mappers/sponger_front_page/examples.vsp b/binsrc/rdf_mappers/sponger_front_page/examples.vsp
new file mode 100644
index 0000000..52b6f33
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/examples.vsp
@@ -0,0 +1,102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+    <meta name="generator" content="HTML Tidy, see www.w3.org"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <title><?=fp_title?></title>
+    <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+    <?vsp if (fp_favicon <> 0) { ?>
+    <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+    <?vsp } ?>
+  </head><body>
+    <div id="outer">
+      <div id="header">
+        <div id="header_logo">
+        <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+         title="OpenLink Software" alt="[OpenLink Software logo]"
+        src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href="sponger_architecture.vsp">Architecture</a> | 
+        <a href="sponger_setup.vsp">Sponger Setup</a> | 
+        <a href="examples.vsp">Live Sponger Examples</a> | 
+        <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a> |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+   <div id="content">
+      <div class="topic-text">
+     <div id="examples">
+          <h2>
+            <a id="Live_Examples">
+      </a>Live Examples</h2>
+<h3>
+            <a id="XHTML_containing_RDFa">
+      </a>XHTML containing RDFa</h3>
+<ul>
+            <li>Source: <a href="http://ontologi.es/rail/void.xhtml" class="absuri">Linked Railway Data Project Datasets</a> </li>
+<li>HTML: <a href="http://linkeddata.uriburner.com/about/html/http://ontologi.es/rail/void.xhtml" class="absuri">http://linkeddata.uriburner.com/about/html/http://ontologi.es/rail/void.xhtml</a> </li>
+<li>RDF:  <a href="http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml" class="absuri">http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml</a>
+            </li>
+</ul>
+          <h3>
+            <a id="HTML">
+      </a>HTML</h3>
+<ul>
+            <li>Source: MPs in the UK: <a href="http://www.theyworkforyou.com/mps/" class="absuri">http://www.theyworkforyou.com/mps/</a> </li>
+<li>HTML: <a href="http://linkeddata.uriburner.com/about/html/http://www.theyworkforyou.com/mps/" class="absuri">http://linkeddata.uriburner.com/about/html/http://www.theyworkforyou.com/mps/</a> </li>
+<li>RDF: <a href="http://linkeddata.uriburner.com/about/rdf/http://www.theyworkforyou.com/mps/" class="absuri">http://linkeddata.uriburner.com/about/rdf/http://www.theyworkforyou.com/mps/</a>
+            </li>
+</ul>
+<ul>
+            <li>Source: <a href="http://www.bbc.co.uk/music/genres/classical/" class="absuri">http://www.bbc.co.uk/music/genres/classical/</a> </li>
+            <li>HTML: <a href="http://linkeddata.uriburner.com/about/html/http://www.bbc.co.uk/music/genres/classical" class="absuri">http://linkeddata.uriburner.com/about/html/http://www.bbc.co.uk/music/genres/classical</a> </li>
+<li>RDF: <a href="http://linkeddata.uriburner.com/about/rdf/http://www.bbc.co.uk/music/genres/classical/" class="absuri">http://linkeddata.uriburner.com/about/rdf/http://www.bbc.co.uk/music/genres/classical/</a>
+            </li>
+</ul>
+          <h3>
+            <a id="Using_cURL">
+      </a>Using cURL</h3>
+<ul>
+            <li>RDF (N3 format): <br/> curl -i -H "Accept: text/n3" <a href="http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml" class="absuri">http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml</a> </li>
+<li>RDF (Turtle format): <br/> curl -i -H "Accept: text/turtle" <a href="http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml" class="absuri">http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml</a> </li>
+<li>RDF (RDF/XML format):  <br/>curl -I -H "Accept: application/rdf+xml" <a href="http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml" class="absuri">http://linkeddata.uriburner.com/about/rdf/http://ontologi.es/rail/void.xhtml</a>
+            </li>
+</ul>
+     </div>
+</div>
+   </div>
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+    </div>
+  </body></html>
diff --git a/binsrc/rdf_mappers/sponger_front_page/fb_access_token_popup.vsp b/binsrc/rdf_mappers/sponger_front_page/fb_access_token_popup.vsp
new file mode 100644
index 0000000..ad1a29c
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/fb_access_token_popup.vsp
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+  <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <?vsp if (fp_favicon <> 0) { ?>
+  <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+  <?vsp } ?>
+  <title><?=fp_title?> - Facebook Binding</title>
+  <script type="text/javascript">
+    var el_facebook_id;
+    var el_about_sponge_uri;
+    var el_describe_sponge_uri;
+    var el_fb_ds_links_no_token;
+    var facebook_id = "";
+
+    function get_facebook_id (fb_id)
+    {
+      el_facebook_id = el_facebook_id || document.getElementById('fld_facebook_id');
+      el_about_sponge_uri = el_about_sponge_uri || document.getElementById('about_sponge_uri');
+      el_describe_sponge_uri = el_describe_sponge_uri || document.getElementById('describe_sponge_uri');
+      el_fb_ds_links_no_token = el_fb_ds_links_no_token || document.getElementById('fb_ds_links_no_token');
+
+      facebook_id = el_facebook_id.value;
+      // TO DO - Check the entered Facebook ID is valid
+      if (facebook_id.length == 0 || /[^\d]+/.test(facebook_id))
+      {
+        alert ('Please enter a numeric Facebook user ID');
+        el_fb_ds_links_no_token.style.display = 'none';
+        return false;
+      }
+
+      el_about_sponge_uri.href = el_about_sponge_uri.href.replace(/graph.facebook.com\/.*sponger:get/, 'graph.facebook.com/' + facebook_id + '?sponger:get' );
+      el_describe_sponge_uri.href = el_describe_sponge_uri.href.replace(/graph.facebook.com\/.*add/, 'graph.facebook.com/' + facebook_id + '&sponger:get=add' );
+      el_about_sponge_uri.innerHTML = el_describe_sponge_uri.innerHTML = "Facebook ID: " + facebook_id;
+      el_fb_ds_links_no_token.style.display = 'inline';
+
+      return false;
+    }
+  </script>
+<?vsp
+  declare fb_app_id, fb_app_name, fb_app_secret, fb_app_site_url, fb_login_dialog_url, fb_offline_access varchar;
+  declare og_user_url, og_user_name, og_user_id, og_app_url, og_resp varchar;
+  declare oauth_code, oauth_error, oauth_url, oauth_token, oauth_token_expiry, oauth_resp varchar;
+  declare oauth_headers, oauth_resp_params any;
+  declare rm_options any;
+  declare xt, og_tree any;
+  declare _host varchar;
+  declare offline_access integer;
+  declare rdf_mappers_vad_update_required integer;
+
+  oauth_token := null;
+  fb_app_site_url := null;
+  fb_app_id := null;
+  fb_app_secret := null;
+  fb_offline_access := null;
+  offline_access := 0;
+  rdf_mappers_vad_update_required := 0;
+
+  _host := registry_get ('URIQADefaultHost');
+  if (is_http_ctx ()) _host := http_request_header(http_request_header (), 'Host', null, _host);
+
+  if (_host is not null)
+    fb_app_site_url := sprintf('http://%s/facebook_oauth/', _host);
+
+  rm_options := (select RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH');
+  if (rm_options is not null)
+  {
+    fb_app_id := get_keyword ('app_id', rm_options);
+    fb_app_secret := get_keyword ('app_secret', rm_options);
+    fb_offline_access := get_keyword ('offline_access', rm_options);
+    if (fb_offline_access = '1')
+      offline_access := 1;
+  }
+
+  -- dbg_printf ('fb_app_id: %s', fb_app_id);
+  -- dbg_printf ('fb_app_secret: %s', fb_app_secret);
+  -- dbg_printf ('fb_app_site_url: %s', fb_app_site_url);
+  -- dbg_printf ('offline_access: %d', offline_access);
+
+  oauth_error := cast (http_param ('error_description') as varchar);
+
+  if (oauth_error <> '0') 
+    goto auth_err;
+
+  oauth_code := cast (http_param ('code') as varchar);
+  -- dbg_printf ('http_param[code]: %s', oauth_code);
+
+  if (fb_app_site_url is not null and fb_app_id is not null and fb_app_secret is not null)
+  {
+    -- Get the OAuth code
+    if (oauth_code = '0') 
+    {
+      fb_login_dialog_url := sprintf ('http://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%U&scope=', fb_app_id, fb_app_site_url);
+
+      -- Request a non-expiring token
+      if (offline_access)
+        fb_login_dialog_url := fb_login_dialog_url || 'offline_access,';
+
+      -- Request permissions for additional info beyond the basic info returned
+      -- See http://developers.facebook.com/docs/authentication/permissions/ for full permissions list
+      fb_login_dialog_url := fb_login_dialog_url || 'user_likes,friends_likes,user_activities,user_interests,user_notes,user_photos,user_status,user_videos,user_website,user_checkins,friends_checkins,publish_stream,read_stream';
+      -- dbg_obj_print (fb_login_dialog_url);
+      http ('<script>');
+      http (sprintf ('top.location.href=\'%s\';', fb_login_dialog_url));
+      http ('</script>');
+    }
+
+    -- Get the access token
+    oauth_url := sprintf ('https://graph.facebook.com/oauth/access_token?client_id=%U&redirect_uri=%U&client_secret=%U&code=%U',
+        fb_app_id, fb_app_site_url, fb_app_secret, oauth_code);
+
+    oauth_resp := http_client_ext (url=>oauth_url, headers=>oauth_headers);
+    -- dbg_printf ('oauth_resp: [%s]', oauth_resp);
+
+    oauth_resp_params := split_and_decode (oauth_resp);
+    oauth_token := get_keyword ('access_token', oauth_resp_params);
+    oauth_token_expiry := get_keyword ('expires', oauth_resp_params);
+    -- dbg_printf ('access_token: %s', oauth_token);
+    -- dbg_printf ('access_token expiry (secs): %s', oauth_token_expiry);
+
+    -- Retrieve the name of the Facebook user granting the access token
+    og_user_url := sprintf ('https://graph.facebook.com/me?access_token=%s', oauth_token);
+    og_resp := http_client (og_user_url);
+    -- dbg_printf ('og_resp: %s', og_resp);
+    xt := json_parse (og_resp);
+    og_tree := DB.DBA.SOCIAL_TREE_TO_XML (xt);
+    og_user_name := cast (xpath_eval('/results/name', og_tree) as varchar);
+    og_user_id := cast (xpath_eval('/results/id', og_tree) as varchar);
+    og_user_name := coalesce (og_user_name, '(unknown)');
+    og_user_id := coalesce (og_user_id, '(unknown)');
+
+    -- Retrieve the name of the Facebook application requesting the access token
+    og_app_url := sprintf ('https://graph.facebook.com/%s', fb_app_id);
+    og_resp := http_client (og_app_url);
+    -- dbg_printf ('og_resp: %s', og_resp);
+    xt := json_parse (og_resp);
+    og_tree := DB.DBA.SOCIAL_TREE_TO_XML (xt);
+    fb_app_name := cast (xpath_eval('/results/name', og_tree) as varchar);
+    fb_app_name := coalesce (fb_app_name, '(unknown)');
+
+    -- Save to DB
+    if (oauth_error = '0' and oauth_token is not null and og_user_id is not null)
+    {
+      if (__proc_exists ('DB.DBA.OPENGRAPH_SAVE_ACCESS_TOKEN') is not null)
+        DB.DBA.OPENGRAPH_SAVE_ACCESS_TOKEN (og_user_id, og_user_name, fb_app_site_url, fb_app_id, oauth_token, oauth_token_expiry);
+      else
+        rdf_mappers_vad_update_required := 1;
+    }
+  }
+auth_err: ;
+?>
+</head>
+
+<body onload="page_load_hndlr()">
+<div id="outer">
+      <div id="header">
+        <div id="header_logo">
+          <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+             title="OpenLink Software" alt="[OpenLink Software logo]"
+             src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href="sponger_architecture.vsp">Architecture</a> | 
+        <a href="sponger_setup.vsp">Sponger Setup</a> | 
+        <a href="examples.vsp">Live Sponger Examples</a> | 
+        <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a>  |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="lmargin">
+            <div id="token_confirmation">
+
+              <h2>Sponger-Facebook Binding</h2>
+			  <h3>Access Token Generation</h3>
+<!--
+<p>Access token generation used these settings (specified as Sponger cartridge options) for the Facebook app:</p>
+<ul>
+<li>Site URL: <?vsp http (coalesce (fb_app_site_url, 'NULL')); ?></li>
+<li>App ID: <?vsp http (coalesce (fb_app_id, 'NULL')); ?></li>
+</ul>
+-->
+
+  <?vsp if (oauth_token is null) { ?>
+    <p>An error occurred. An OAuth access token could not be granted.</p>
+    <div class="error">
+    <?vsp  if (oauth_error <> '0') { ?> 
+      <p><?vsp http (oauth_error); ?></p>
+    <?vsp } else { ?>
+      <?vsp if (fb_app_site_url is null or fb_app_id is null or fb_app_secret is null) { ?>
+        <p>The Facebook Open Graph cartridge is not configured correctly.</p> 
+      <?vsp } ?>
+
+      <?vsp if (fb_app_site_url is null) { ?>
+        <p>Site URL could not be determined. Please ensure DefaultHost is set in the URIQA section of your virtuoso.ini file.</p> 
+      <?vsp } ?>
+
+      <?vsp if (fb_app_id is null) { ?>
+        <p>App ID could not be determined. Please ensure the Facebook cartridge options include an entry like app_id=124017734999999</p> 
+      <?vsp } ?>
+
+      <?vsp if (fb_app_secret is null) { ?>
+        <p>App secret could not be determined. Please ensure the Facebook cartridge options include an entry like app_secret=xxxxx</p> 
+      <?vsp } ?>
+    <?vsp } ?>
+    </div>
+  <?vsp } ?>
+
+
+  <?vsp if (oauth_token is not null) { ?>
+    <p>An OAuth access token has been generated. The Linked Data Generator hosted by application <em><?=fb_app_name ?></em> now has access to your Facebook-hosted Data Space.</p>
+    <!--
+    <p><?vsp http (oauth_token); ?></p>
+    <?vsp if (oauth_token_expiry is not null) { ?>
+      <p>This token expires in <?vsp http (oauth_token_expiry); ?> seconds.</p>
+    <?vsp } else { ?>
+      <p>This is a non-expiring token.</p>
+    <?vsp } ?>
+    -->
+    <?vsp if (rdf_mappers_vad_update_required = 1) { ?>
+      <p>Please enter this token as the value for the API Key in the Sponger cartridge configuration and close this window.</p> 
+      <p>If configuring more than one access token in the API Key, enter them in the format <em>facebook_id1=access_token1&facebook_id2=access_token2...</em></p> 
+      <p><strong>Please update your RDF Mappers VAD. The latest VAD saves access tokens to a Virtuoso table. Manual entry of access tokens in the API Key is no longer required.</strong></p>
+    <?vsp } else { 
+      declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+      about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/http/graph.facebook.com/%s?sponger:get=add&refresh=0', _host, _host, og_user_id);
+      entity_uri := sprintf ('http://%s/about/id/entity/http/graph.facebook.com/%s', _host, og_user_id);
+      describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+    ?>
+	  <h3>View Your Facebook Linked Data Space</h3>
+      <p>Here are a variety of Linked Data oriented views derived from your Facebook profile:</p> 
+      <ul>
+      <li><a href="<?=about_sponge_uri?>"><?vsp http (og_user_name || ' (Facebook ID: ' || og_user_id || ')'); ?></a><br/>A simple page for follow-your-nose exploration</li>
+      <li><a href="<?=describe_sponge_uri?>"><?vsp http (og_user_name || ' (Facebook ID: ' || og_user_id || ')'); ?></a><br/>A powerful faceted navigation and exploration page</li>
+      </ul>
+      <h3>Revoking Your Access Token</h3>
+      <p>
+      You have authorised the Sponger to interact with your Facebook account. You can revoke access to your profile at any time by removing this application 
+      (<em><?=fb_app_name ?></em>) from the list of authorised applications shown in your Facebook profile. To remove an application, 
+      <a href="http://www.facebook.com/settings/?tab=privacy">access your Facebook privacy settings</a>, follow the <strong>Edit your settings</strong> 
+      link under the heading <strong>Apps and websites</strong>, then select the application you wish to remove.
+      </p> 
+    <?vsp } ?>
+  <?vsp } ?>
+
+<?vsp if (oauth_token is null) { 
+  declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+  og_user_id := 'UNKNOWN_OG_USER_ID';
+  about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/http/graph.facebook.com/%s?sponger:get=add&refresh=0', _host, _host, og_user_id);
+  entity_uri := sprintf ('http://%s/about/id/entity/http/graph.facebook.com/%s', _host, og_user_id);
+  --describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+  describe_sponge_uri := sprintf ('http://%s/describe/?url=%s&sponger:get=add&sr=0', _host, entity_uri);
+  ?>
+
+  <p><strong>You can still sponge without an access token by entering your Facebook ID.</strong></p>
+  <form action="#" method="post">
+    <label for="fld_facebook_id">Facebook ID: </label><input type="text" maxlength="20" id="fld_facebook_id" name="fld_facebook_id" />
+    <input type="submit" name="cmd_submit_FB_ID" id="cmd_submit_fb_id" value="Submit" onclick="return get_facebook_id();"/>
+  </form>
+
+  <div id="fb_ds_links_no_token">
+    <h3>View Your Facebook Linked Data Space</h3>
+      <p>Here is a variety of Linked Data oriented views of your Facebook profile:</p> 
+      <ul>
+      <li>
+        <a id="about_sponge_uri" href="<?=about_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('Facebook ID: UNKNOWN_OG_USER_ID');
+          </script>
+        </a><br/>A simple page for follow-your-nose exploration
+      </li>
+      <li>
+        <a id="describe_sponge_uri" href="<?=describe_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('Facebook ID: UNKNOWN_OG_USER_ID');
+          </script>
+        </a><br/>A powerful faceted navigation and exploration page
+      </li>
+      </ul>
+  </div>
+<?vsp } ?>
+            </div><!-- token confirmation-->
+          </div><!-- lmargin -->
+
+          <div id="rmargin">
+      <h2>Other OpenLink Tools & Services</h2>
+      <div>
+      <ul>
+      <li><a href="http://linkeddata.uriburner.com/">URIBurner.com</a><br/>A service that delivers RDF-based structured descriptions of Web addressable resources (documents or real world objects)</li>
+      <li><a href="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</a><br/>A browser extension for viewing Linked Data Sources</li>
+      <li><a href="http://oat.openlinksw.com/">OpenLink AJAX Toolkit (OAT)</a><br/>A JavaScript-based toolkit for browser-independent Rich Internet Application development</li>
+      </ul>
+      </div>
+          </div> <!--rmargin -->
+
+        </div><!-- topic-text -->
+      </div><!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+</div><!-- outer -->
+</body>
+</html>
diff --git a/binsrc/rdf_mappers/sponger_front_page/index.vsp b/binsrc/rdf_mappers/sponger_front_page/index.vsp
new file mode 100644
index 0000000..451d15f
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/index.vsp
@@ -0,0 +1,443 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <?vsp
+    declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+    skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+    banner_txt := registry_get ('_sponger_fp_Banner');
+    banner_logo := registry_get ('_sponger_fp_Logo');
+    strapline := registry_get ('_sponger_fp_Strapline');
+    fp_title := registry_get ('_sponger_fp_Title');
+    fp_favicon := registry_get ('_sponger_fp_Favicon');
+    if (skinpfx = 0) skinpfx := 'skin';
+    if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+    if (strapline = 0) strapline := '';
+    if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+  ?>
+  <head>
+    <meta name="generator" content="HTML Tidy, see www.w3.org"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <title><?=fp_title?></title>
+    <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+    <?vsp if (fp_favicon <> 0) { ?>
+    <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+    <?vsp } ?>
+    <script type="text/javascript" src="jquery.js"></script>
+    <script type="text/javascript">
+      jQuery(document).ready(function() {
+        jQuery(".collapsible").hide();
+        jQuery(".collapsible_div_heading").click(function()
+          {
+            jQuery(this).next(".collapsible").slideToggle(500);
+          });
+        });
+
+      function validate_sponge_url()
+      {
+         var localuri = $('#g').attr('value').replace (/\:\/\//ig,'/');
+
+        if (localuri.length == 0 || !/^http/.test(localuri))
+        {
+          alert ('Please enter a valid URI');
+          return false;
+        }
+
+        window.location.href = 'http://linkeddata.uriburner.com/about/html/' + localuri;
+        return true;
+      }
+
+    </script>
+  </head>
+
+  <body>
+    <div id="outer">
+      <div id="header">
+        <div id="header_logo">
+        <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+         title="OpenLink Software" alt="[OpenLink Software logo]"
+        src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href="sponger_architecture.vsp">Architecture</a> | 
+        <a href= "sponger_setup.vsp">Sponger Setup</a> | 
+        <a href="examples.vsp">Live Sponger Examples</a> | 
+        <a href= "http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a> |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="lmargin">
+            <div id="what_n_why">
+              <div id="what">
+                <img id="linked_data_logo"
+                title="Linked Data" alt="[Linked Data logo]" src="<?=skinpfx?>/i/linkeddata.jpg"/> 
+
+                <h2><a id="What_is_it"></a>What Is It?</h2>
+
+                <p>A data virtualization service that transforms
+                data hosted in a variety of data spaces and formats
+                into standards compliant Linked Data Objects for
+                uniform access, integration and management.</p>
+
+                <p>The underlying technology is Virtuoso's in-built
+                Linked Data Middleware (aka <a href=
+                "http://virtuoso.openlinksw.com/dav/wiki/Main/VirtSponger"
+                 class="absuri">Sponger</a>) that uses URLs as data
+                source names for its powerful data ingestion and transformation
+                services that result in highly navigable Linked Data Object 
+                graphs.</p>
+                <p>Post transformation, each Data Object is endowed
+                with a dereferenceable identifier (Name) that resolves to its
+                actual representation via its URL (Address). The Sponger
+                then re-presents Data Object descriptions via HTML documents
+                (the default behavior) or in a variety of raw data graph forms
+                that include: CSV, N-Triples, Turtle, N3, RDF/XML, JSON, CXML,
+                OData (Atom and JSON) etc.</p>
+              </div>
+
+              <div id="why">
+                <h2><a id="Why_is_it_important"></a>Why Is It
+                Important?</h2>
+
+                <p>It provides an unobtrusive solution for
+                creating, discovering, meshing, and sharing
+                structured Linked Data sources exposed via the
+                Web.</p>
+              </div>
+            </div>
+
+            <h2><a id="How_Do_I_Use_It"></a>How Do I Use It?</h2>
+
+            <h3><a id="Web_Users__User_Agents"></a>Web Users &
+            User Agents</h3>
+
+            <p>Methods of exploiting Sponger's services from your
+            browser include:</p>
+
+            <h4><a id="Bookmarklet"></a>Bookmarklet</h4>
+
+            <p>Simply drag the following bookmarklet links to your
+            browser's bookmarks toolbar:</p>
+
+            <ul>
+              <li><a href=
+              "javascript:if (/twitter.com$/.test(window.location.host)) window.location='http://linkeddata.uriburner.com/about/html/'+window.location.toString().replace('/#!',''); else window.location='http://linkeddata.uriburner.com/about/html/http/'+window.location.host+window.location.pathname+window.location.search;">
+              Page Description</a> (default: XHTML with embedded
+              RDFa)</li>
+              <!--
+              <li>
+              <a href="javascript:window.location='http://linkeddata.uriburner.com/about/id/http/'+window.location.host+'/'+window.location.pathname">Page Metadata (RDF)</a> (default format: RDF/XML)
+              </li>
+              -->
+            </ul>
+
+            <h4><a id="Browser_URL_input"></a>Browser URL
+            input</h4>
+            To dereference the description of a Web-addressable
+            resource via your browser simply type in one of the
+            following URL patterns: 
+
+            <ul>
+              <li>HTML -
+              <tt>http://{virtuoso-host}/about/html/{URIscheme}/{authority}/{local-path}</tt></li>
+              <li>RDF -
+              <tt>http://{virtuoso-host}/about/data/{format}/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+            where <tt>format</tt> is one of <tt>xml</tt>,
+            <tt>n3</tt>, <tt>nt</tt> or <tt>ttl</tt>. 
+
+            <h5><a id="Examples"></a>Examples</h5>
+
+            <ul>
+              <li><a href=
+              "http://linkeddata.uriburner.com/about/html/http://www.bbc.co.uk/music/artists/ed2ac1e9-d51d-4eff-a2c2-85e81abd6360%01artist"
+               class="absuri">About: Bob Marley</a> -- XHTML+RDFa
+              based re-presentation from the BBC Music Data
+              Space</li>
+
+              <li><a href=
+              "http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/financial-organization/andreessen-horowitz"
+               class="absuri">About: Andreesen Horowitz</a> --
+              XHTML+RDFa based re-presentation</li>
+            </ul>
+
+            <h4><a id=
+            "Data_Explorer_Extension_for_Firefox"></a>OpenLink Data
+            Explorer Extension for Firefox</h4>
+            Simply go to the <a href="http://ode.openlinksw.com/"
+            class="absuri">OpenLink Data Explorer Home Page</a>,
+            download the extension, and then whenever you encounter
+            a page of interest, use the main or context-menu
+            options labeled "Describe Page" or "View Linked Data"
+            to obtain Web addressable resource descriptions in HTML
+            or RDF. 
+
+            <p>Alternatively, use the following bookmarklet:</p>
+
+            <ul>
+              <li><a href=
+              "javascript:if (/twitter.com$/.test(window.location.host)) window.location='http://linkeddata.uriburner.com/ode/?uri='+window.location.toString().replace('/#!',''); else window.location='http://linkeddata.uriburner.com/ode/?uri='+window.location;">
+              OpenLink Data Explorer (a Linked Data
+              Browser)</a></li>
+            </ul>
+
+            <h3><a id="Web_Publishers"></a>Web Publishers</h3>
+
+            <p>Simply include the following in the <head>
+            section of your (X)HTML page (static or dynamically
+            generated):</p>
+<pre>
+<link rel="describedby"
+title="RDF Model-based Metadata in your desired format 
+(e.g. xhtml, n3, turtle, rdf/xml etc)."
+type="{required mimetype}"
+href="http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}"
+/>
+</pre>
+            <p>You can optionally notify the <a href="http://pingthesemanticweb.com/api.php#6">PingTheSemanticWeb</a> 
+            (PTSW) web service each time you generate a Linked Data graph. PTSW is used by crawlers or 
+            software agents to know where the latest Linked Data documents can be found and when they have been updated.
+            </p>
+
+            <h3><a id="Web_Application_Developers"></a>Web
+            Application Developers</h3>
+
+            <p>Using your host operating system of development
+            language embedded variants of cURL, you can exercise
+            all the dereferenceable proxy/wrapper URIs generated by
+            this service, along the following lines:</p>
+
+            <h4><a id="HTMLMicroformats"></a>HTML+Microformats:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept: text/html"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="HTMLMicrodata"></a>HTML+Microdata:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept: text/html"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="HTMLRDFa"></a>HTML+RDFa:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept: text/html"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="XHTMLRDFa"></a>XHTML+RDFa:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept: application/xhtml+xml"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="JSON"></a>JSON:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept:
+              application/json"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+
+              <li><tt>curl</tt><br/>
+              <tt>http://{virtuoso-host}/about/data/json/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="Microdata_JSON"></a>Microdata/JSON:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept:
+              application/microdata+json"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="JSON_LD"></a>JSON-LD:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept:
+              application/ld+json"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="Notation_3_N3"></a>Notation 3 (N3):</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept: text/n3"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+
+              <li><tt>curl</tt><br/>
+              <tt>http://{virtuoso-host}/about/data/n3/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <ul>
+              <li><tt>curl -I -H "Accept: text/turtle"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+
+              <li><tt>curl</tt><br/>
+              <tt>http://{virtuoso-host}/about/data/ttl/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+
+            <h4><a id="RDFXML"></a>RDF/XML:</h4>
+
+            <ul>
+              <li><tt>curl -I -H "Accept:
+              application/rdf+xml"</tt><br/>
+              <tt>http://{virtuoso-host}/about/id/{URIscheme}/{authority}/{local-path}</tt></li>
+
+              <li><tt>curl</tt><br/>
+              <tt>http://{virtuoso-host}/about/data/xml/{URIscheme}/{authority}/{local-path}</tt></li>
+            </ul>
+          </div>
+
+          <div id="rmargin">
+            <div id="social_web">
+              <h2>Discover the Web's Linked Data Space
+              Dimension</h2>
+
+              <div id="social_network_binding">
+                <p><span class="span_starting_point">Make your
+                profile or other documents of interest your
+                starting point!</span></p>
+
+                <ul>
+                  <li><a href=
+                  "fb_access_token_popup.vsp"><img alt=
+                  "Facebook icon" src="<?=skinpfx?>/i/facebook_icon.jpg" title=
+                  "Sponge your Facebook profile"/></a></li>
+
+                  <li><a href="twitter_access_token.vsp?site=Twitter"><img alt="Twitter icon" src=
+                  "<?=skinpfx?>/i/twitter.jpg" title="Sponge your Twitter profile" /></a></li>
+
+                  <li><a href="sponge_social_profile.vsp?site=Google%2B"><img alt="Google icon" src=
+                  "<?=skinpfx?>/i/gprofile_button-44.png" title="Sponge your Google+ profile" /></a></li>
+
+                  <li><a href="linkedin_access_token.vsp"><img alt="LinkedIn icon" src=
+                  "<?=skinpfx?>/i/linkedin.jpg" title="Sponge your LinkedIn profile" /></a></li>
+
+                  <li><a href="sponge_uri.vsp?site=Foursquare"><img alt="foursquare icon" src=
+                  "<?=skinpfx?>/i/foursquare.png" title="Sponge your Foursquare profile" /></a></li>
+
+                  <li><a href="sponge_uri.vsp?site=Flickr"><img alt="flickr icon" src=
+                  "<?=skinpfx?>/i/flickr.jpg" title="Sponge a Flickr image" /></a></li>
+
+                  <li><a href="sponge_social_profile.vsp?site=Delicious"><img alt="delicious icon" src=
+                  "<?=skinpfx?>/i/delicious.png" title="Sponge your Delicious profile" /></a></li>
+
+                  <li><a href="sponge_uri.vsp?site=WebID"><img alt="WebID icon" src=
+                  "<?=skinpfx?>/i/webid_icon.png" title="Sponge your WebID / FOAF profile" /></a></li>
+
+                  <li><a href="sponge_uri.vsp?site=WebFinger"><img alt="WebFinger icon" src=
+                  "<?=skinpfx?>/i/webfinger.png" title="Sponge your WebFinger profile" /></a></li>
+                </ul>
+              </div>
+
+              <div class="collapsible_div_heading"><p>Click on an icon to sponge your social network data 
+                <a href="#">
+                    <img src="<?=skinpfx?>/i/help_button.gif" alt="Help icon" title="Learn more" style="vertical-align: middle;" />
+                </a></p>
+              </div>
+
+              <div class="collapsible">
+                <h4>Facebook</h4>
+
+                <p>The <a href=
+                "http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtCartConfigFacebook"
+                 title=
+                "How to configure the Sponger as a Facebook App">Sponger
+                can be configured as a Facebook App</a>. Sponging of
+                your Facebook profile then follows these steps:</p>
+
+                <ul>
+                  <li>The Sponger will request access to your
+                  Facebook profile. If you authorize access, Facebook
+                  will grant an OAuth access token.</li>
+
+                  <li>On receipt of the access token, the Sponger
+                  notes your Facebook ID</li>
+
+                  <li>In the authorization confirmation dialog, the
+                  Sponger provides URLs for sponging your profile and
+                  viewing the generated Linked Data objects.</li>
+                </ul>
+
+                <p>You can revoke access by the Sponger at any time.</p>
+
+                <h5>Examples</h5>
+
+                <ul>
+                  <li><a href=
+                  "http://linkeddata.uriburner.com/about/id/entity/http/graph.facebook.com/605980750">
+                  Kingsley Idehen's Facebook Data Object</a></li>
+                </ul>
+              </div> <!-- collapsible -->
+
+              <div id="sponge_uri_form">
+                <p><span class="span_starting_point">Transform a document or Web service into Linked Data!</span></p>
+                <p>Enter the URL to sponge:</p>
+                <div id="frm_sponge_uri">
+                  <div>
+                    <input type="text" size="40" id="g" name="g" />
+                    <button onclick="validate_sponge_url();">Sponge!</button>
+                  </div>
+                  </div>
+              </div>
+
+            </div> <!-- social_web -->
+
+            <h2>Querying Your Linked Data</h2>
+
+            <div id="search_find">
+              <h3>Full Text Search & Precision Find</h3>
+
+              <p>Perform traditional full text pattern search, or
+              Linked Data enhanced precision find, against sponged
+              data via: <a href="/fct" class=
+              "absuri">http://{virtuoso-host}/fct</a></p>
+            </div>
+
+            <div id="query_ld">
+              <h3>Using SPARQL</h3>
+
+              <p>Linked Data may be queried using the SPARQL query
+              language, by simply pointing your browser at:</p>
+
+              <ol>
+                <li>SPARQL Query-By-Example:<br/>
+                 <a href="/isparql" class=
+                "absuri">http://{virtuoso-host}/isparql</a></li>
+
+                <li>Basic SPARQL Endpoint:<br/>
+                 <a href="/sparql" class=
+                "absuri">http://{virtuoso-host}/sparql</a></li>
+              </ol>
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
+
diff --git a/binsrc/rdf_mappers/sponger_front_page/jquery.js b/binsrc/rdf_mappers/sponger_front_page/jquery.js
new file mode 100644
index 0000000..a4f1145
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/jquery.js
@@ -0,0 +1,7179 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context );
+	},
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// A simple way to check for HTML strings or ID strings
+	// (both of which we optimize for)
+	quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
+
+	// Is it a simple selector
+	isSimple = /^.[^:#\[\.,]*$/,
+
+	// Check if a string has a non-whitespace character in it
+	rnotwhite = /\S/,
+	rwhite = /\s/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Check for non-word characters
+	rnonword = /\W/,
+
+	// Check for digits
+	rdigit = /\d/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// Keep a UserAgent string for use with jQuery.browser
+	userAgent = navigator.userAgent,
+
+	// For matching the engine and version of the browser
+	browserMatch,
+	
+	// Has the ready events already been bound?
+	readyBound = false,
+	
+	// The functions to execute on DOM ready
+	readyList = [],
+
+	// The ready event handler
+	DOMContentLoaded,
+
+	// Save a reference to some core methods
+	toString = Object.prototype.toString,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+	
+	// [[Class]] -> type pairs
+	class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+	init: function( selector, context ) {
+		var match, elem, ret, doc;
+
+		// Handle $(""), $(null), or $(undefined)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle $(DOMElement)
+		if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+		}
+		
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = "body";
+			this.length = 1;
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			// Are we dealing with HTML string or an ID?
+			match = quickExpr.exec( selector );
+
+			// Verify a match, and that no context was specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					doc = (context ? context.ownerDocument || context : document);
+
+					// If a single string is passed in and it's a single tag
+					// just do a createElement and skip the rest
+					ret = rsingleTag.exec( selector );
+
+					if ( ret ) {
+						if ( jQuery.isPlainObject( context ) ) {
+							selector = [ document.createElement( ret[1] ) ];
+							jQuery.fn.attr.call( selector, context, true );
+
+						} else {
+							selector = [ doc.createElement( ret[1] ) ];
+						}
+
+					} else {
+						ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
+					}
+					
+					return jQuery.merge( this, selector );
+					
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $("TAG")
+			} else if ( !context && !rnonword.test( selector ) ) {
+				this.selector = selector;
+				this.context = document;
+				selector = document.getElementsByTagName( selector );
+				return jQuery.merge( this, selector );
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return (context || rootjQuery).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return jQuery( context ).find( selector );
+			}
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if (selector.selector !== undefined) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.4.4",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	toArray: function() {
+		return slice.call( this, 0 );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems, name, selector ) {
+		// Build a new jQuery matched element set
+		var ret = jQuery();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+		
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		ret.context = this.context;
+
+		if ( name === "find" ) {
+			ret.selector = this.selector + (this.selector ? " " : "") + selector;
+		} else if ( name ) {
+			ret.selector = this.selector + "." + name + "(" + selector + ")";
+		}
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+	
+	ready: function( fn ) {
+		// Attach the listeners
+		jQuery.bindReady();
+
+		// If the DOM is already ready
+		if ( jQuery.isReady ) {
+			// Execute the function immediately
+			fn.call( document, jQuery );
+
+		// Otherwise, remember the function for later
+		} else if ( readyList ) {
+			// Add the function to the wait list
+			readyList.push( fn );
+		}
+
+		return this;
+	},
+	
+	eq: function( i ) {
+		return i === -1 ?
+			this.slice( i ) :
+			this.slice( i, +i + 1 );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ),
+			"slice", slice.call(arguments).join(",") );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+	
+	end: function() {
+		return this.prevObject || jQuery(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	 var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		window.$ = _$;
+
+		if ( deep ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+	
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+	
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// A third-party is pushing the ready event forwards
+		if ( wait === true ) {
+			jQuery.readyWait--;
+		}
+
+		// Make sure that the DOM is not already loaded
+		if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// If there are functions bound, to execute
+			if ( readyList ) {
+				// Execute all of them
+				var fn,
+					i = 0,
+					ready = readyList;
+
+				// Reset the list of functions
+				readyList = null;
+
+				while ( (fn = ready[ i++ ]) ) {
+					fn.call( document, jQuery );
+				}
+
+				// Trigger any bound ready events
+				if ( jQuery.fn.trigger ) {
+					jQuery( document ).trigger( "ready" ).unbind( "ready" );
+				}
+			}
+		}
+	},
+	
+	bindReady: function() {
+		if ( readyBound ) {
+			return;
+		}
+
+		readyBound = true;
+
+		// Catch cases where $(document).ready() is called after the
+		// browser event has already occurred.
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// Mozilla, Opera and webkit nightlies currently support this event
+		if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+			
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", jQuery.ready, false );
+
+		// If IE event model is used
+		} else if ( document.attachEvent ) {
+			// ensure firing before onload,
+			// maybe late but safe also for iframes
+			document.attachEvent("onreadystatechange", DOMContentLoaded);
+			
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", jQuery.ready );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var toplevel = false;
+
+			try {
+				toplevel = window.frameElement == null;
+			} catch(e) {}
+
+			if ( document.documentElement.doScroll && toplevel ) {
+				doScrollCheck();
+			}
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	// A crude way of determining if an object is a window
+	isWindow: function( obj ) {
+		return obj && typeof obj === "object" && "setInterval" in obj;
+	},
+
+	isNaN: function( obj ) {
+		return obj == null || !rdigit.test( obj ) || isNaN( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	isPlainObject: function( obj ) {
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+		
+		// Not own constructor property must be Object
+		if ( obj.constructor &&
+			!hasOwn.call(obj, "constructor") &&
+			!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+			return false;
+		}
+		
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+	
+		var key;
+		for ( key in obj ) {}
+		
+		return key === undefined || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+	
+	error: function( msg ) {
+		throw msg;
+	},
+	
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+		
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test(data.replace(rvalidescape, "@")
+			.replace(rvalidtokens, "]")
+			.replace(rvalidbraces, "")) ) {
+
+			// Try to use the native JSON parser first
+			return window.JSON && window.JSON.parse ?
+				window.JSON.parse( data ) :
+				(new Function("return " + data))();
+
+		} else {
+			jQuery.error( "Invalid JSON: " + data );
+		}
+	},
+
+	noop: function() {},
+
+	// Evalulates a script in a global context
+	globalEval: function( data ) {
+		if ( data && rnotwhite.test(data) ) {
+			// Inspired by code by Andrea Giammarchi
+			// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+			var head = document.getElementsByTagName("head")[0] || document.documentElement,
+				script = document.createElement("script");
+
+			script.type = "text/javascript";
+
+			if ( jQuery.support.scriptEval ) {
+				script.appendChild( document.createTextNode( data ) );
+			} else {
+				script.text = data;
+			}
+
+			// Use insertBefore instead of appendChild to circumvent an IE6 bug.
+			// This arises when a base node is used (#2709).
+			head.insertBefore( script, head.firstChild );
+			head.removeChild( script );
+		}
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+	},
+
+	// args is for internal usage only
+	each: function( object, callback, args ) {
+		var name, i = 0,
+			length = object.length,
+			isObj = length === undefined || jQuery.isFunction(object);
+
+		if ( args ) {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.apply( object[ name ], args ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.apply( object[ i++ ], args ) === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( var value = object[0];
+					i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+			}
+		}
+
+		return object;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( array, results ) {
+		var ret = results || [];
+
+		if ( array != null ) {
+			// The window, strings (and functions) also have 'length'
+			// The extra typeof function check is to prevent crashes
+			// in Safari 2 (See: #3039)
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type(array);
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				push.call( ret, array );
+			} else {
+				jQuery.merge( ret, array );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array ) {
+		if ( array.indexOf ) {
+			return array.indexOf( elem );
+		}
+
+		for ( var i = 0, length = array.length; i < length; i++ ) {
+			if ( array[ i ] === elem ) {
+				return i;
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var i = first.length,
+			j = 0;
+
+		if ( typeof second.length === "number" ) {
+			for ( var l = second.length; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+		
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var ret = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var ret = [], value;
+
+		// Go through the array, translating each of the items to their
+		// new value (or values).
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			value = callback( elems[ i ], i, arg );
+
+			if ( value != null ) {
+				ret[ ret.length ] = value;
+			}
+		}
+
+		return ret.concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	proxy: function( fn, proxy, thisObject ) {
+		if ( arguments.length === 2 ) {
+			if ( typeof proxy === "string" ) {
+				thisObject = fn;
+				fn = thisObject[ proxy ];
+				proxy = undefined;
+
+			} else if ( proxy && !jQuery.isFunction( proxy ) ) {
+				thisObject = proxy;
+				proxy = undefined;
+			}
+		}
+
+		if ( !proxy && fn ) {
+			proxy = function() {
+				return fn.apply( thisObject || this, arguments );
+			};
+		}
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		if ( fn ) {
+			proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+		}
+
+		// So proxy can be declared as an argument
+		return proxy;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can be optionally by executed if its a function
+	access: function( elems, key, value, exec, fn, pass ) {
+		var length = elems.length;
+	
+		// Setting many attributes
+		if ( typeof key === "object" ) {
+			for ( var k in key ) {
+				jQuery.access( elems, k, key[k], exec, fn, value );
+			}
+			return elems;
+		}
+	
+		// Setting one attribute
+		if ( value !== undefined ) {
+			// Optionally, function values get executed if exec is true
+			exec = !pass && exec && jQuery.isFunction(value);
+		
+			for ( var i = 0; i < length; i++ ) {
+				fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+			}
+		
+			return elems;
+		}
+	
+		// Getting an attribute
+		return length ? fn( elems[0], key ) : undefined;
+	},
+
+	now: function() {
+		return (new Date()).getTime();
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+	jQuery.browser[ browserMatch.browser ] = true;
+	jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+	jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+	jQuery.inArray = function( elem, array ) {
+		return indexOf.call( array, elem );
+	};
+}
+
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+	DOMContentLoaded = function() {
+		document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+		jQuery.ready();
+	};
+
+} else if ( document.attachEvent ) {
+	DOMContentLoaded = function() {
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( document.readyState === "complete" ) {
+			document.detachEvent( "onreadystatechange", DOMContentLoaded );
+			jQuery.ready();
+		}
+	};
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+	if ( jQuery.isReady ) {
+		return;
+	}
+
+	try {
+		// If IE is used, use the trick by Diego Perini
+		// http://javascript.nwbox.com/IEContentLoaded/
+		document.documentElement.doScroll("left");
+	} catch(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+	jQuery.support = {};
+
+	var root = document.documentElement,
+		script = document.createElement("script"),
+		div = document.createElement("div"),
+		id = "script" + jQuery.now();
+
+	div.style.display = "none";
+	div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+	var all = div.getElementsByTagName("*"),
+		a = div.getElementsByTagName("a")[0],
+		select = document.createElement("select"),
+		opt = select.appendChild( document.createElement("option") );
+
+	// Can't get basic test support
+	if ( !all || !all.length || !a ) {
+		return;
+	}
+
+	jQuery.support = {
+		// IE strips leading whitespace when .innerHTML is used
+		leadingWhitespace: div.firstChild.nodeType === 3,
+
+		// Make sure that tbody elements aren't automatically inserted
+		// IE will insert them into empty tables
+		tbody: !div.getElementsByTagName("tbody").length,
+
+		// Make sure that link elements get serialized correctly by innerHTML
+		// This requires a wrapper element in IE
+		htmlSerialize: !!div.getElementsByTagName("link").length,
+
+		// Get the style information from getAttribute
+		// (IE uses .cssText insted)
+		style: /red/.test( a.getAttribute("style") ),
+
+		// Make sure that URLs aren't manipulated
+		// (IE normalizes it by default)
+		hrefNormalized: a.getAttribute("href") === "/a",
+
+		// Make sure that element opacity exists
+		// (IE uses filter instead)
+		// Use a regex to work around a WebKit issue. See #5145
+		opacity: /^0.55$/.test( a.style.opacity ),
+
+		// Verify style float existence
+		// (IE uses styleFloat instead of cssFloat)
+		cssFloat: !!a.style.cssFloat,
+
+		// Make sure that if no value is specified for a checkbox
+		// that it defaults to "on".
+		// (WebKit defaults to "" instead)
+		checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+		// Make sure that a selected-by-default option has a working selected property.
+		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+		optSelected: opt.selected,
+
+		// Will be defined later
+		deleteExpando: true,
+		optDisabled: false,
+		checkClone: false,
+		scriptEval: false,
+		noCloneEvent: true,
+		boxModel: null,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableHiddenOffsets: true
+	};
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as diabled)
+	select.disabled = true;
+	jQuery.support.optDisabled = !opt.disabled;
+
+	script.type = "text/javascript";
+	try {
+		script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+	} catch(e) {}
+
+	root.insertBefore( script, root.firstChild );
+
+	// Make sure that the execution of code works by injecting a script
+	// tag with appendChild/createTextNode
+	// (IE doesn't support this, fails, and uses .text instead)
+	if ( window[ id ] ) {
+		jQuery.support.scriptEval = true;
+		delete window[ id ];
+	}
+
+	// Test to see if it's possible to delete an expando from an element
+	// Fails in Internet Explorer
+	try {
+		delete script.test;
+
+	} catch(e) {
+		jQuery.support.deleteExpando = false;
+	}
+
+	root.removeChild( script );
+
+	if ( div.attachEvent && div.fireEvent ) {
+		div.attachEvent("onclick", function click() {
+			// Cloning a node shouldn't copy over any
+			// bound event handlers (IE does this)
+			jQuery.support.noCloneEvent = false;
+			div.detachEvent("onclick", click);
+		});
+		div.cloneNode(true).fireEvent("onclick");
+	}
+
+	div = document.createElement("div");
+	div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
+
+	var fragment = document.createDocumentFragment();
+	fragment.appendChild( div.firstChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+	// Figure out if the W3C box model works as expected
+	// document.body must exist before we can do this
+	jQuery(function() {
+		var div = document.createElement("div");
+		div.style.width = div.style.paddingLeft = "1px";
+
+		document.body.appendChild( div );
+		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+
+		if ( "zoom" in div.style ) {
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			// (IE < 8 does this)
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "";
+			div.innerHTML = "<div style='width:4px;'></div>";
+			jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+		}
+
+		div.innerHTML = "<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";
+		var tds = div.getElementsByTagName("td");
+
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		// (only IE 8 fails this test)
+		jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+		tds[0].style.display = "";
+		tds[1].style.display = "none";
+
+		// Check if empty table cells still have offsetWidth/Height
+		// (IE < 8 fail this test)
+		jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+		div.innerHTML = "";
+
+		document.body.removeChild( div ).style.display = "none";
+		div = tds = null;
+	});
+
+	// Technique from Juriy Zaytsev
+	// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+	var eventSupported = function( eventName ) {
+		var el = document.createElement("div");
+		eventName = "on" + eventName;
+
+		var isSupported = (eventName in el);
+		if ( !isSupported ) {
+			el.setAttribute(eventName, "return;");
+			isSupported = typeof el[eventName] === "function";
+		}
+		el = null;
+
+		return isSupported;
+	};
+
+	jQuery.support.submitBubbles = eventSupported("submit");
+	jQuery.support.changeBubbles = eventSupported("change");
+
+	// release memory in IE
+	root = script = div = all = a = null;
+})();
+
+
+
+var windowData = {},
+	rbrace = /^(?:\{.*\}|\[.*\])$/;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page	
+	expando: "jQuery" + jQuery.now(),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	data: function( elem, name, data ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		elem = elem == window ?
+			windowData :
+			elem;
+
+		var isNode = elem.nodeType,
+			id = isNode ? elem[ jQuery.expando ] : null,
+			cache = jQuery.cache, thisCache;
+
+		if ( isNode && !id && typeof name === "string" && data === undefined ) {
+			return;
+		}
+
+		// Get the data from the object directly
+		if ( !isNode ) {
+			cache = elem;
+
+		// Compute a unique ID for the element
+		} else if ( !id ) {
+			elem[ jQuery.expando ] = id = ++jQuery.uuid;
+		}
+
+		// Avoid generating a new cache unless none exists and we
+		// want to manipulate it.
+		if ( typeof name === "object" ) {
+			if ( isNode ) {
+				cache[ id ] = jQuery.extend(cache[ id ], name);
+
+			} else {
+				jQuery.extend( cache, name );
+			}
+
+		} else if ( isNode && !cache[ id ] ) {
+			cache[ id ] = {};
+		}
+
+		thisCache = isNode ? cache[ id ] : cache;
+
+		// Prevent overriding the named cache with undefined values
+		if ( data !== undefined ) {
+			thisCache[ name ] = data;
+		}
+
+		return typeof name === "string" ? thisCache[ name ] : thisCache;
+	},
+
+	removeData: function( elem, name ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		elem = elem == window ?
+			windowData :
+			elem;
+
+		var isNode = elem.nodeType,
+			id = isNode ? elem[ jQuery.expando ] : elem,
+			cache = jQuery.cache,
+			thisCache = isNode ? cache[ id ] : id;
+
+		// If we want to remove a specific section of the element's data
+		if ( name ) {
+			if ( thisCache ) {
+				// Remove the section of cache data
+				delete thisCache[ name ];
+
+				// If we've removed all the data, remove the element's cache
+				if ( isNode && jQuery.isEmptyObject(thisCache) ) {
+					jQuery.removeData( elem );
+				}
+			}
+
+		// Otherwise, we want to remove all of the element's data
+		} else {
+			if ( isNode && jQuery.support.deleteExpando ) {
+				delete elem[ jQuery.expando ];
+
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( jQuery.expando );
+
+			// Completely remove the data cache
+			} else if ( isNode ) {
+				delete cache[ id ];
+
+			// Remove all fields from the object
+			} else {
+				for ( var n in elem ) {
+					delete elem[ n ];
+				}
+			}
+		}
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var data = null;
+
+		if ( typeof key === "undefined" ) {
+			if ( this.length ) {
+				var attr = this[0].attributes, name;
+				data = jQuery.data( this[0] );
+
+				for ( var i = 0, l = attr.length; i < l; i++ ) {
+					name = attr[i].name;
+
+					if ( name.indexOf( "data-" ) === 0 ) {
+						name = name.substr( 5 );
+						dataAttr( this[0], name, data[ name ] );
+					}
+				}
+			}
+
+			return data;
+
+		} else if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		var parts = key.split(".");
+		parts[1] = parts[1] ? "." + parts[1] : "";
+
+		if ( value === undefined ) {
+			data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+			// Try to fetch any internally stored data first
+			if ( data === undefined && this.length ) {
+				data = jQuery.data( this[0], key );
+				data = dataAttr( this[0], key, data );
+			}
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+
+		} else {
+			return this.each(function() {
+				var $this = jQuery( this ),
+					args = [ parts[0], value ];
+
+				$this.triggerHandler( "setData" + parts[1] + "!", args );
+				jQuery.data( this, key, value );
+				$this.triggerHandler( "changeData" + parts[1] + "!", args );
+			});
+		}
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+		data = elem.getAttribute( "data-" + key );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+				data === "false" ? false :
+				data === "null" ? null :
+				!jQuery.isNaN( data ) ? parseFloat( data ) :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+					data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+
+
+
+jQuery.extend({
+	queue: function( elem, type, data ) {
+		if ( !elem ) {
+			return;
+		}
+
+		type = (type || "fx") + "queue";
+		var q = jQuery.data( elem, type );
+
+		// Speed up dequeue by getting out quickly if this is just a lookup
+		if ( !data ) {
+			return q || [];
+		}
+
+		if ( !q || jQuery.isArray(data) ) {
+			q = jQuery.data( elem, type, jQuery.makeArray(data) );
+
+		} else {
+			q.push( data );
+		}
+
+		return q;
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			fn = queue.shift();
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+		}
+
+		if ( fn ) {
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift("inprogress");
+			}
+
+			fn.call(elem, function() {
+				jQuery.dequeue(elem, type);
+			});
+		}
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+		}
+
+		if ( data === undefined ) {
+			return jQuery.queue( this[0], type );
+		}
+		return this.each(function( i ) {
+			var queue = jQuery.queue( this, type, data );
+
+			if ( type === "fx" && queue[0] !== "inprogress" ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function() {
+			var elem = this;
+			setTimeout(function() {
+				jQuery.dequeue( elem, type );
+			}, time );
+		});
+	},
+
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	}
+});
+
+
+
+
+var rclass = /[\n\t]/g,
+	rspaces = /\s+/,
+	rreturn = /\r/g,
+	rspecialurl = /^(?:href|src|style)$/,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.props = {
+	"for": "htmlFor",
+	"class": "className",
+	readonly: "readOnly",
+	maxlength: "maxLength",
+	cellspacing: "cellSpacing",
+	rowspan: "rowSpan",
+	colspan: "colSpan",
+	tabindex: "tabIndex",
+	usemap: "useMap",
+	frameborder: "frameBorder"
+};
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, name, value, true, jQuery.attr );
+	},
+
+	removeAttr: function( name, fn ) {
+		return this.each(function(){
+			jQuery.attr( this, name, "" );
+			if ( this.nodeType === 1 ) {
+				this.removeAttribute( name );
+			}
+		});
+	},
+
+	addClass: function( value ) {
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				self.addClass( value.call(this, i, self.attr("class")) );
+			});
+		}
+
+		if ( value && typeof value === "string" ) {
+			var classNames = (value || "").split( rspaces );
+
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				var elem = this[i];
+
+				if ( elem.nodeType === 1 ) {
+					if ( !elem.className ) {
+						elem.className = value;
+
+					} else {
+						var className = " " + elem.className + " ",
+							setClass = elem.className;
+
+						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+								setClass += " " + classNames[c];
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				self.removeClass( value.call(this, i, self.attr("class")) );
+			});
+		}
+
+		if ( (value && typeof value === "string") || value === undefined ) {
+			var classNames = (value || "").split( rspaces );
+
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				var elem = this[i];
+
+				if ( elem.nodeType === 1 && elem.className ) {
+					if ( value ) {
+						var className = (" " + elem.className + " ").replace(rclass, " ");
+						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+							className = className.replace(" " + classNames[c] + " ", " ");
+						}
+						elem.className = jQuery.trim( className );
+
+					} else {
+						elem.className = "";
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value,
+			isBool = typeof stateVal === "boolean";
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					state = stateVal,
+					classNames = value.split( rspaces );
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space seperated list
+					state = isBool ? state : !self.hasClass( className );
+					self[ state ? "addClass" : "removeClass" ]( className );
+				}
+
+			} else if ( type === "undefined" || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery.data( this, "__className__", this.className );
+				}
+
+				// toggle whole className
+				this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ";
+		for ( var i = 0, l = this.length; i < l; i++ ) {
+			if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		if ( !arguments.length ) {
+			var elem = this[0];
+
+			if ( elem ) {
+				if ( jQuery.nodeName( elem, "option" ) ) {
+					// attributes.value is undefined in Blackberry 4.7 but
+					// uses .value. See #6932
+					var val = elem.attributes.value;
+					return !val || val.specified ? elem.value : elem.text;
+				}
+
+				// We need to handle select boxes special
+				if ( jQuery.nodeName( elem, "select" ) ) {
+					var index = elem.selectedIndex,
+						values = [],
+						options = elem.options,
+						one = elem.type === "select-one";
+
+					// Nothing was selected
+					if ( index < 0 ) {
+						return null;
+					}
+
+					// Loop through all the selected options
+					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+						var option = options[ i ];
+
+						// Don't return options that are disabled or in a disabled optgroup
+						if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && 
+								(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+							// Get the specific value for the option
+							value = jQuery(option).val();
+
+							// We don't need an array for one selects
+							if ( one ) {
+								return value;
+							}
+
+							// Multi-Selects return an array
+							values.push( value );
+						}
+					}
+
+					return values;
+				}
+
+				// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+				if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
+					return elem.getAttribute("value") === null ? "on" : elem.value;
+				}
+				
+
+				// Everything else, we just grab the value
+				return (elem.value || "").replace(rreturn, "");
+
+			}
+
+			return undefined;
+		}
+
+		var isFunction = jQuery.isFunction(value);
+
+		return this.each(function(i) {
+			var self = jQuery(this), val = value;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call(this, i, self.val());
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray(val) ) {
+				val = jQuery.map(val, function (value) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
+				this.checked = jQuery.inArray( self.val(), val ) >= 0;
+
+			} else if ( jQuery.nodeName( this, "select" ) ) {
+				var values = jQuery.makeArray(val);
+
+				jQuery( "option", this ).each(function() {
+					this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+				});
+
+				if ( !values.length ) {
+					this.selectedIndex = -1;
+				}
+
+			} else {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	attrFn: {
+		val: true,
+		css: true,
+		html: true,
+		text: true,
+		data: true,
+		width: true,
+		height: true,
+		offset: true
+	},
+		
+	attr: function( elem, name, value, pass ) {
+		// don't set attributes on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return undefined;
+		}
+
+		if ( pass && name in jQuery.attrFn ) {
+			return jQuery(elem)[name](value);
+		}
+
+		var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
+			// Whether we are setting (or getting)
+			set = value !== undefined;
+
+		// Try to normalize/fix the name
+		name = notxml && jQuery.props[ name ] || name;
+
+		// These attributes require special treatment
+		var special = rspecialurl.test( name );
+
+		// Safari mis-reports the default selected property of an option
+		// Accessing the parent's selectedIndex property fixes it
+		if ( name === "selected" && !jQuery.support.optSelected ) {
+			var parent = elem.parentNode;
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+		}
+
+		// If applicable, access the attribute via the DOM 0 way
+		// 'in' checks fail in Blackberry 4.7 #6931
+		if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
+			if ( set ) {
+				// We can't allow the type property to be changed (since it causes problems in IE)
+				if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+					jQuery.error( "type property can't be changed" );
+				}
+
+				if ( value === null ) {
+					if ( elem.nodeType === 1 ) {
+						elem.removeAttribute( name );
+					}
+
+				} else {
+					elem[ name ] = value;
+				}
+			}
+
+			// browsers index elements by id/name on forms, give priority to attributes.
+			if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+				return elem.getAttributeNode( name ).nodeValue;
+			}
+
+			// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+			// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+			if ( name === "tabIndex" ) {
+				var attributeNode = elem.getAttributeNode( "tabIndex" );
+
+				return attributeNode && attributeNode.specified ?
+					attributeNode.value :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						undefined;
+			}
+
+			return elem[ name ];
+		}
+
+		if ( !jQuery.support.style && notxml && name === "style" ) {
+			if ( set ) {
+				elem.style.cssText = "" + value;
+			}
+
+			return elem.style.cssText;
+		}
+
+		if ( set ) {
+			// convert the value to a string (all browsers do this but IE) see #1070
+			elem.setAttribute( name, "" + value );
+		}
+
+		// Ensure that missing attributes return undefined
+		// Blackberry 4.7 returns "" from getAttribute #6938
+		if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+			return undefined;
+		}
+
+		var attr = !jQuery.support.hrefNormalized && notxml && special ?
+				// Some attributes require a special call on IE
+				elem.getAttribute( name, 2 ) :
+				elem.getAttribute( name );
+
+		// Non-existent attributes return null, we normalize to undefined
+		return attr === null ? undefined : attr;
+	}
+});
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+	rformElems = /^(?:textarea|input|select)$/i,
+	rperiod = /\./g,
+	rspace = / /g,
+	rescape = /[^\w\s.|`]/g,
+	fcleanup = function( nm ) {
+		return nm.replace(rescape, "\\$&");
+	},
+	focusCounts = { focusin: 0, focusout: 0 };
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+	// Bind an event to an element
+	// Original by Dean Edwards
+	add: function( elem, types, handler, data ) {
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// For whatever reason, IE has trouble passing the window object
+		// around, causing it to be cloned in the process
+		if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
+			elem = window;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		} else if ( !handler ) {
+			// Fixes bug #7229. Fix recommended by jdalton
+		  return;
+		}
+
+		var handleObjIn, handleObj;
+
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+		}
+
+		// Make sure that the function being executed has a unique ID
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure
+		var elemData = jQuery.data( elem );
+
+		// If no elemData is found then we must be trying to bind to one of the
+		// banned noData elements
+		if ( !elemData ) {
+			return;
+		}
+
+		// Use a key less likely to result in collisions for plain JS objects.
+		// Fixes bug #7150.
+		var eventKey = elem.nodeType ? "events" : "__events__",
+			events = elemData[ eventKey ],
+			eventHandle = elemData.handle;
+			
+		if ( typeof events === "function" ) {
+			// On plain objects events is a fn that holds the the data
+			// which prevents this data from being JSON serialized
+			// the function does not need to be called, it just contains the data
+			eventHandle = events.handle;
+			events = events.events;
+
+		} else if ( !events ) {
+			if ( !elem.nodeType ) {
+				// On plain objects, create a fn that acts as the holder
+				// of the values to avoid JSON serialization of event data
+				elemData[ eventKey ] = elemData = function(){};
+			}
+
+			elemData.events = events = {};
+		}
+
+		if ( !eventHandle ) {
+			elemData.handle = eventHandle = function() {
+				// Handle the second event of a trigger and when
+				// an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
+					jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+		}
+
+		// Add elem as a property of the handle function
+		// This is to prevent a memory leak with non-native events in IE.
+		eventHandle.elem = elem;
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		var type, i = 0, namespaces;
+
+		while ( (type = types[ i++ ]) ) {
+			handleObj = handleObjIn ?
+				jQuery.extend({}, handleObjIn) :
+				{ handler: handler, data: data };
+
+			// Namespaced event handlers
+			if ( type.indexOf(".") > -1 ) {
+				namespaces = type.split(".");
+				type = namespaces.shift();
+				handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+			} else {
+				namespaces = [];
+				handleObj.namespace = "";
+			}
+
+			handleObj.type = type;
+			if ( !handleObj.guid ) {
+				handleObj.guid = handler.guid;
+			}
+
+			// Get the current list of functions bound to this event
+			var handlers = events[ type ],
+				special = jQuery.event.special[ type ] || {};
+
+			// Init the event handler queue
+			if ( !handlers ) {
+				handlers = events[ type ] = [];
+
+				// Check for a special event handler
+				// Only use addEventListener/attachEvent if the special
+				// events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+			
+			if ( special.add ) { 
+				special.add.call( elem, handleObj ); 
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add the function to the element's handler list
+			handlers.push( handleObj );
+
+			// Keep track of which events have been used, for global triggering
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	global: {},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, pos ) {
+		// don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		}
+
+		var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+			eventKey = elem.nodeType ? "events" : "__events__",
+			elemData = jQuery.data( elem ),
+			events = elemData && elemData[ eventKey ];
+
+		if ( !elemData || !events ) {
+			return;
+		}
+		
+		if ( typeof events === "function" ) {
+			elemData = events;
+			events = events.events;
+		}
+
+		// types is actually an event object here
+		if ( types && types.type ) {
+			handler = types.handler;
+			types = types.type;
+		}
+
+		// Unbind all events for the element
+		if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+			types = types || "";
+
+			for ( type in events ) {
+				jQuery.event.remove( elem, type + types );
+			}
+
+			return;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).unbind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		while ( (type = types[ i++ ]) ) {
+			origType = type;
+			handleObj = null;
+			all = type.indexOf(".") < 0;
+			namespaces = [];
+
+			if ( !all ) {
+				// Namespaced event handlers
+				namespaces = type.split(".");
+				type = namespaces.shift();
+
+				namespace = new RegExp("(^|\\.)" + 
+					jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+			}
+
+			eventType = events[ type ];
+
+			if ( !eventType ) {
+				continue;
+			}
+
+			if ( !handler ) {
+				for ( j = 0; j < eventType.length; j++ ) {
+					handleObj = eventType[ j ];
+
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						jQuery.event.remove( elem, origType, handleObj.handler, j );
+						eventType.splice( j--, 1 );
+					}
+				}
+
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+
+			for ( j = pos || 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( handler.guid === handleObj.guid ) {
+					// remove the given handler for the given type
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						if ( pos == null ) {
+							eventType.splice( j--, 1 );
+						}
+
+						if ( special.remove ) {
+							special.remove.call( elem, handleObj );
+						}
+					}
+
+					if ( pos != null ) {
+						break;
+					}
+				}
+			}
+
+			// remove generic event handler if no more handlers exist
+			if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				ret = null;
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			var handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			delete elemData.events;
+			delete elemData.handle;
+
+			if ( typeof elemData === "function" ) {
+				jQuery.removeData( elem, eventKey );
+
+			} else if ( jQuery.isEmptyObject( elemData ) ) {
+				jQuery.removeData( elem );
+			}
+		}
+	},
+
+	// bubbling is internal
+	trigger: function( event, data, elem /*, bubbling */ ) {
+		// Event object or event type
+		var type = event.type || event,
+			bubbling = arguments[3];
+
+		if ( !bubbling ) {
+			event = typeof event === "object" ?
+				// jQuery.Event object
+				event[ jQuery.expando ] ? event :
+				// Object literal
+				jQuery.extend( jQuery.Event(type), event ) :
+				// Just the event type (string)
+				jQuery.Event(type);
+
+			if ( type.indexOf("!") >= 0 ) {
+				event.type = type = type.slice(0, -1);
+				event.exclusive = true;
+			}
+
+			// Handle a global trigger
+			if ( !elem ) {
+				// Don't bubble custom events when global (to avoid too much overhead)
+				event.stopPropagation();
+
+				// Only trigger if we've ever bound an event for it
+				if ( jQuery.event.global[ type ] ) {
+					jQuery.each( jQuery.cache, function() {
+						if ( this.events && this.events[type] ) {
+							jQuery.event.trigger( event, data, this.handle.elem );
+						}
+					});
+				}
+			}
+
+			// Handle triggering a single element
+
+			// don't do events on text and comment nodes
+			if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+				return undefined;
+			}
+
+			// Clean up in case it is reused
+			event.result = undefined;
+			event.target = elem;
+
+			// Clone the incoming data, if any
+			data = jQuery.makeArray( data );
+			data.unshift( event );
+		}
+
+		event.currentTarget = elem;
+
+		// Trigger the event, it is assumed that "handle" is a function
+		var handle = elem.nodeType ?
+			jQuery.data( elem, "handle" ) :
+			(jQuery.data( elem, "__events__" ) || {}).handle;
+
+		if ( handle ) {
+			handle.apply( elem, data );
+		}
+
+		var parent = elem.parentNode || elem.ownerDocument;
+
+		// Trigger an inline bound script
+		try {
+			if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+				if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+					event.result = false;
+					event.preventDefault();
+				}
+			}
+
+		// prevent IE from throwing an error for some elements with some event types, see #3533
+		} catch (inlineError) {}
+
+		if ( !event.isPropagationStopped() && parent ) {
+			jQuery.event.trigger( event, data, parent, true );
+
+		} else if ( !event.isDefaultPrevented() ) {
+			var old,
+				target = event.target,
+				targetType = type.replace( rnamespaces, "" ),
+				isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
+				special = jQuery.event.special[ targetType ] || {};
+
+			if ( (!special._default || special._default.call( elem, event ) === false) && 
+				!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+
+				try {
+					if ( target[ targetType ] ) {
+						// Make sure that we don't accidentally re-trigger the onFOO events
+						old = target[ "on" + targetType ];
+
+						if ( old ) {
+							target[ "on" + targetType ] = null;
+						}
+
+						jQuery.event.triggered = true;
+						target[ targetType ]();
+					}
+
+				// prevent IE from throwing an error for some elements with some event types, see #3533
+				} catch (triggerError) {}
+
+				if ( old ) {
+					target[ "on" + targetType ] = old;
+				}
+
+				jQuery.event.triggered = false;
+			}
+		}
+	},
+
+	handle: function( event ) {
+		var all, handlers, namespaces, namespace_re, events,
+			namespace_sort = [],
+			args = jQuery.makeArray( arguments );
+
+		event = args[0] = jQuery.event.fix( event || window.event );
+		event.currentTarget = this;
+
+		// Namespaced event handlers
+		all = event.type.indexOf(".") < 0 && !event.exclusive;
+
+		if ( !all ) {
+			namespaces = event.type.split(".");
+			event.type = namespaces.shift();
+			namespace_sort = namespaces.slice(0).sort();
+			namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
+		}
+
+		event.namespace = event.namespace || namespace_sort.join(".");
+
+		events = jQuery.data(this, this.nodeType ? "events" : "__events__");
+
+		if ( typeof events === "function" ) {
+			events = events.events;
+		}
+
+		handlers = (events || {})[ event.type ];
+
+		if ( events && handlers ) {
+			// Clone the handlers to prevent manipulation
+			handlers = handlers.slice(0);
+
+			for ( var j = 0, l = handlers.length; j < l; j++ ) {
+				var handleObj = handlers[ j ];
+
+				// Filter the functions by class
+				if ( all || namespace_re.test( handleObj.namespace ) ) {
+					// Pass in a reference to the handler function itself
+					// So that we can later remove it
+					event.handler = handleObj.handler;
+					event.data = handleObj.data;
+					event.handleObj = handleObj;
+	
+					var ret = handleObj.handler.apply( this, args );
+
+					if ( ret !== undefined ) {
+						event.result = ret;
+						if ( ret === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+
+					if ( event.isImmediatePropagationStopped() ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// store a copy of the original event object
+		// and "clone" to set read-only properties
+		var originalEvent = event;
+		event = jQuery.Event( originalEvent );
+
+		for ( var i = this.props.length, prop; i; ) {
+			prop = this.props[ --i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Fix target property, if necessary
+		if ( !event.target ) {
+			// Fixes #1925 where srcElement might not be defined either
+			event.target = event.srcElement || document;
+		}
+
+		// check if target is a textnode (safari)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// Add relatedTarget, if necessary
+		if ( !event.relatedTarget && event.fromElement ) {
+			event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+		}
+
+		// Calculate pageX/Y if missing and clientX/Y available
+		if ( event.pageX == null && event.clientX != null ) {
+			var doc = document.documentElement,
+				body = document.body;
+
+			event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+			event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
+		}
+
+		// Add which for key events
+		if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+			event.which = event.charCode != null ? event.charCode : event.keyCode;
+		}
+
+		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+		if ( !event.metaKey && event.ctrlKey ) {
+			event.metaKey = event.ctrlKey;
+		}
+
+		// Add which for click: 1 === left; 2 === middle; 3 === right
+		// Note: button is not normalized, so don't use it
+		if ( !event.which && event.button !== undefined ) {
+			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+		}
+
+		return event;
+	},
+
+	// Deprecated, use jQuery.guid instead
+	guid: 1E8,
+
+	// Deprecated, use jQuery.proxy instead
+	proxy: jQuery.proxy,
+
+	special: {
+		ready: {
+			// Make sure the ready event is setup
+			setup: jQuery.bindReady,
+			teardown: jQuery.noop
+		},
+
+		live: {
+			add: function( handleObj ) {
+				jQuery.event.add( this,
+					liveConvert( handleObj.origType, handleObj.selector ),
+					jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); 
+			},
+
+			remove: function( handleObj ) {
+				jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+			}
+		},
+
+		beforeunload: {
+			setup: function( data, namespaces, eventHandle ) {
+				// We only want to do this special case on windows
+				if ( jQuery.isWindow( this ) ) {
+					this.onbeforeunload = eventHandle;
+				}
+			},
+
+			teardown: function( namespaces, eventHandle ) {
+				if ( this.onbeforeunload === eventHandle ) {
+					this.onbeforeunload = null;
+				}
+			}
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} : 
+	function( elem, type, handle ) {
+		if ( elem.detachEvent ) {
+			elem.detachEvent( "on" + type, handle );
+		}
+	};
+
+jQuery.Event = function( src ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !this.preventDefault ) {
+		return new jQuery.Event( src );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// timeStamp is buggy for some events on Firefox(#3843)
+	// So we won't rely on the native value
+	this.timeStamp = jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+	return false;
+}
+function returnTrue() {
+	return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	preventDefault: function() {
+		this.isDefaultPrevented = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+		
+		// if preventDefault exists run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// otherwise set the returnValue property of the original event to false (IE)
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		this.isPropagationStopped = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+		// if stopPropagation exists run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+		// otherwise set the cancelBubble property of the original event to true (IE)
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	},
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+	// Check if mouse(over|out) are still within the same parent element
+	var parent = event.relatedTarget;
+
+	// Firefox sometimes assigns relatedTarget a XUL element
+	// which we cannot access the parentNode property of
+	try {
+		// Traverse up the tree
+		while ( parent && parent !== this ) {
+			parent = parent.parentNode;
+		}
+
+		if ( parent !== this ) {
+			// set the correct event type
+			event.type = event.data;
+
+			// handle event if we actually just moused on to a non sub-element
+			jQuery.event.handle.apply( this, arguments );
+		}
+
+	// assuming we've left the element since we most likely mousedover a xul element
+	} catch(e) { }
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+	event.type = event.data;
+	jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		setup: function( data ) {
+			jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+		},
+		teardown: function( data ) {
+			jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+		}
+	};
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function( data, namespaces ) {
+			if ( this.nodeName.toLowerCase() !== "form" ) {
+				jQuery.event.add(this, "click.specialSubmit", function( e ) {
+					var elem = e.target,
+						type = elem.type;
+
+					if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+						e.liveFired = undefined;
+						return trigger( "submit", this, arguments );
+					}
+				});
+	 
+				jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+					var elem = e.target,
+						type = elem.type;
+
+					if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+						e.liveFired = undefined;
+						return trigger( "submit", this, arguments );
+					}
+				});
+
+			} else {
+				return false;
+			}
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialSubmit" );
+		}
+	};
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+	var changeFilters,
+
+	getVal = function( elem ) {
+		var type = elem.type, val = elem.value;
+
+		if ( type === "radio" || type === "checkbox" ) {
+			val = elem.checked;
+
+		} else if ( type === "select-multiple" ) {
+			val = elem.selectedIndex > -1 ?
+				jQuery.map( elem.options, function( elem ) {
+					return elem.selected;
+				}).join("-") :
+				"";
+
+		} else if ( elem.nodeName.toLowerCase() === "select" ) {
+			val = elem.selectedIndex;
+		}
+
+		return val;
+	},
+
+	testChange = function testChange( e ) {
+		var elem = e.target, data, val;
+
+		if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+			return;
+		}
+
+		data = jQuery.data( elem, "_change_data" );
+		val = getVal(elem);
+
+		// the current data will be also retrieved by beforeactivate
+		if ( e.type !== "focusout" || elem.type !== "radio" ) {
+			jQuery.data( elem, "_change_data", val );
+		}
+		
+		if ( data === undefined || val === data ) {
+			return;
+		}
+
+		if ( data != null || val ) {
+			e.type = "change";
+			e.liveFired = undefined;
+			return jQuery.event.trigger( e, arguments[1], elem );
+		}
+	};
+
+	jQuery.event.special.change = {
+		filters: {
+			focusout: testChange, 
+
+			beforedeactivate: testChange,
+
+			click: function( e ) {
+				var elem = e.target, type = elem.type;
+
+				if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+					return testChange.call( this, e );
+				}
+			},
+
+			// Change has to be called before submit
+			// Keydown will be called before keypress, which is used in submit-event delegation
+			keydown: function( e ) {
+				var elem = e.target, type = elem.type;
+
+				if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+					(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+					type === "select-multiple" ) {
+					return testChange.call( this, e );
+				}
+			},
+
+			// Beforeactivate happens also before the previous element is blurred
+			// with this event you can't trigger a change event, but you can store
+			// information
+			beforeactivate: function( e ) {
+				var elem = e.target;
+				jQuery.data( elem, "_change_data", getVal(elem) );
+			}
+		},
+
+		setup: function( data, namespaces ) {
+			if ( this.type === "file" ) {
+				return false;
+			}
+
+			for ( var type in changeFilters ) {
+				jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+			}
+
+			return rformElems.test( this.nodeName );
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialChange" );
+
+			return rformElems.test( this.nodeName );
+		}
+	};
+
+	changeFilters = jQuery.event.special.change.filters;
+
+	// Handle when the input is .focus()'d
+	changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+	args[0].type = type;
+	return jQuery.event.handle.apply( elem, args );
+}
+
+// Create "bubbling" focus and blur events
+if ( document.addEventListener ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( focusCounts[fix]++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			}, 
+			teardown: function() { 
+				if ( --focusCounts[fix] === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+
+		function handler( e ) { 
+			e = jQuery.event.fix( e );
+			e.type = fix;
+			return jQuery.event.trigger( e, null, e.target );
+		}
+	});
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+	jQuery.fn[ name ] = function( type, data, fn ) {
+		// Handle object literals
+		if ( typeof type === "object" ) {
+			for ( var key in type ) {
+				this[ name ](key, data, type[key], fn);
+			}
+			return this;
+		}
+		
+		if ( jQuery.isFunction( data ) || data === false ) {
+			fn = data;
+			data = undefined;
+		}
+
+		var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+			jQuery( this ).unbind( event, handler );
+			return fn.apply( this, arguments );
+		}) : fn;
+
+		if ( type === "unload" && name !== "one" ) {
+			this.one( type, data, fn );
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.add( this[i], type, handler, data );
+			}
+		}
+
+		return this;
+	};
+});
+
+jQuery.fn.extend({
+	unbind: function( type, fn ) {
+		// Handle object literals
+		if ( typeof type === "object" && !type.preventDefault ) {
+			for ( var key in type ) {
+				this.unbind(key, type[key]);
+			}
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.remove( this[i], type, fn );
+			}
+		}
+
+		return this;
+	},
+	
+	delegate: function( selector, types, data, fn ) {
+		return this.live( types, data, fn, selector );
+	},
+	
+	undelegate: function( selector, types, fn ) {
+		if ( arguments.length === 0 ) {
+				return this.unbind( "live" );
+		
+		} else {
+			return this.die( types, null, fn, selector );
+		}
+	},
+	
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+
+	triggerHandler: function( type, data ) {
+		if ( this[0] ) {
+			var event = jQuery.Event( type );
+			event.preventDefault();
+			event.stopPropagation();
+			jQuery.event.trigger( event, data, this[0] );
+			return event.result;
+		}
+	},
+
+	toggle: function( fn ) {
+		// Save reference to arguments for access in closure
+		var args = arguments,
+			i = 1;
+
+		// link all the functions, so any of them can unbind this click handler
+		while ( i < args.length ) {
+			jQuery.proxy( fn, args[ i++ ] );
+		}
+
+		return this.click( jQuery.proxy( fn, function( event ) {
+			// Figure out which function to execute
+			var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+			jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+			// Make sure that clicks stop
+			event.preventDefault();
+
+			// and execute the function
+			return args[ lastToggle ].apply( this, arguments ) || false;
+		}));
+	},
+
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	}
+});
+
+var liveMap = {
+	focus: "focusin",
+	blur: "focusout",
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+	jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+		var type, i = 0, match, namespaces, preType,
+			selector = origSelector || this.selector,
+			context = origSelector ? this : jQuery( this.context );
+		
+		if ( typeof types === "object" && !types.preventDefault ) {
+			for ( var key in types ) {
+				context[ name ]( key, data, types[key], selector );
+			}
+			
+			return this;
+		}
+
+		if ( jQuery.isFunction( data ) ) {
+			fn = data;
+			data = undefined;
+		}
+
+		types = (types || "").split(" ");
+
+		while ( (type = types[ i++ ]) != null ) {
+			match = rnamespaces.exec( type );
+			namespaces = "";
+
+			if ( match )  {
+				namespaces = match[0];
+				type = type.replace( rnamespaces, "" );
+			}
+
+			if ( type === "hover" ) {
+				types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+				continue;
+			}
+
+			preType = type;
+
+			if ( type === "focus" || type === "blur" ) {
+				types.push( liveMap[ type ] + namespaces );
+				type = type + namespaces;
+
+			} else {
+				type = (liveMap[ type ] || type) + namespaces;
+			}
+
+			if ( name === "live" ) {
+				// bind live handler
+				for ( var j = 0, l = context.length; j < l; j++ ) {
+					jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+						{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+				}
+
+			} else {
+				// unbind live handler
+				context.unbind( "live." + liveConvert( type, selector ), fn );
+			}
+		}
+		
+		return this;
+	};
+});
+
+function liveHandler( event ) {
+	var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+		elems = [],
+		selectors = [],
+		events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
+
+	if ( typeof events === "function" ) {
+		events = events.events;
+	}
+
+	// Make sure we avoid non-left-click bubbling in Firefox (#3861)
+	if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
+		return;
+	}
+	
+	if ( event.namespace ) {
+		namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+	}
+
+	event.liveFired = this;
+
+	var live = events.live.slice(0);
+
+	for ( j = 0; j < live.length; j++ ) {
+		handleObj = live[j];
+
+		if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+			selectors.push( handleObj.selector );
+
+		} else {
+			live.splice( j--, 1 );
+		}
+	}
+
+	match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+	for ( i = 0, l = match.length; i < l; i++ ) {
+		close = match[i];
+
+		for ( j = 0; j < live.length; j++ ) {
+			handleObj = live[j];
+
+			if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+				elem = close.elem;
+				related = null;
+
+				// Those two events require additional checking
+				if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+					event.type = handleObj.preType;
+					related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+				}
+
+				if ( !related || related !== elem ) {
+					elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+				}
+			}
+		}
+	}
+
+	for ( i = 0, l = elems.length; i < l; i++ ) {
+		match = elems[i];
+
+		if ( maxLevel && match.level > maxLevel ) {
+			break;
+		}
+
+		event.currentTarget = match.elem;
+		event.data = match.handleObj.data;
+		event.handleObj = match.handleObj;
+
+		ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+		if ( ret === false || event.isPropagationStopped() ) {
+			maxLevel = match.level;
+
+			if ( ret === false ) {
+				stop = false;
+			}
+			if ( event.isImmediatePropagationStopped() ) {
+				break;
+			}
+		}
+	}
+
+	return stop;
+}
+
+function liveConvert( type, selector ) {
+	return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		if ( fn == null ) {
+			fn = data;
+			data = null;
+		}
+
+		return arguments.length > 0 ?
+			this.bind( name, data, fn ) :
+			this.trigger( name );
+	};
+
+	if ( jQuery.attrFn ) {
+		jQuery.attrFn[ name ] = true;
+	}
+});
+
+// Prevent memory leaks in IE
+// Window isn't included so as not to unbind existing unload events
+// More info:
+//  - http://isaacschlueter.com/2006/10/msie-memory-leaks/
+if ( window.attachEvent && !window.addEventListener ) {
+	jQuery(window).bind("unload", function() {
+		for ( var id in jQuery.cache ) {
+			if ( jQuery.cache[ id ].handle ) {
+				// Try/Catch is to handle iframes being unloaded, see #4280
+				try {
+					jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+				} catch(e) {}
+			}
+		}
+	});
+}
+
+
+/*!
+ * Sizzle CSS Selector Engine - v1.0
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+	done = 0,
+	toString = Object.prototype.toString,
+	hasDuplicate = false,
+	baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+	baseHasDuplicate = false;
+	return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+	results = results || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+	
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var m, set, checkSet, extra, ret, cur, pop, i,
+		prune = true,
+		contextXML = Sizzle.isXML( context ),
+		parts = [],
+		soFar = selector;
+	
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec( "" );
+		m = chunker.exec( soFar );
+
+		if ( m ) {
+			soFar = m[3];
+		
+			parts.push( m[1] );
+		
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+		if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+			set = posProcess( parts[0] + parts[1], context );
+
+		} else {
+			set = Expr.relative[ parts[0] ] ?
+				[ context ] :
+				Sizzle( parts.shift(), context );
+
+			while ( parts.length ) {
+				selector = parts.shift();
+
+				if ( Expr.relative[ selector ] ) {
+					selector += parts.shift();
+				}
+				
+				set = posProcess( selector, set );
+			}
+		}
+
+	} else {
+		// Take a shortcut and set the context if the root selector is an ID
+		// (but not if it'll be faster if the inner selector is an ID)
+		if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+				Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set )[0] :
+				ret.set[0];
+		}
+
+		if ( context ) {
+			ret = seed ?
+				{ expr: parts.pop(), set: makeArray(seed) } :
+				Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+			set = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set ) :
+				ret.set;
+
+			if ( parts.length > 0 ) {
+				checkSet = makeArray( set );
+
+			} else {
+				prune = false;
+			}
+
+			while ( parts.length ) {
+				cur = parts.pop();
+				pop = cur;
+
+				if ( !Expr.relative[ cur ] ) {
+					cur = "";
+				} else {
+					pop = parts.pop();
+				}
+
+				if ( pop == null ) {
+					pop = context;
+				}
+
+				Expr.relative[ cur ]( checkSet, pop, contextXML );
+			}
+
+		} else {
+			checkSet = parts = [];
+		}
+	}
+
+	if ( !checkSet ) {
+		checkSet = set;
+	}
+
+	if ( !checkSet ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+
+		} else {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+					results.push( set[i] );
+				}
+			}
+		}
+
+	} else {
+		makeArray( checkSet, results );
+	}
+
+	if ( extra ) {
+		Sizzle( extra, origContext, results, seed );
+		Sizzle.uniqueSort( results );
+	}
+
+	return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+	if ( sortOrder ) {
+		hasDuplicate = baseHasDuplicate;
+		results.sort( sortOrder );
+
+		if ( hasDuplicate ) {
+			for ( var i = 1; i < results.length; i++ ) {
+				if ( results[i] === results[ i - 1 ] ) {
+					results.splice( i--, 1 );
+				}
+			}
+		}
+	}
+
+	return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+	return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+	return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+	var set;
+
+	if ( !expr ) {
+		return [];
+	}
+
+	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+		var match,
+			type = Expr.order[i];
+		
+		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+			var left = match[1];
+			match.splice( 1, 1 );
+
+			if ( left.substr( left.length - 1 ) !== "\\" ) {
+				match[1] = (match[1] || "").replace(/\\/g, "");
+				set = Expr.find[ type ]( match, context, isXML );
+
+				if ( set != null ) {
+					expr = expr.replace( Expr.match[ type ], "" );
+					break;
+				}
+			}
+		}
+	}
+
+	if ( !set ) {
+		set = context.getElementsByTagName( "*" );
+	}
+
+	return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+	var match, anyFound,
+		old = expr,
+		result = [],
+		curLoop = set,
+		isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+	while ( expr && set.length ) {
+		for ( var type in Expr.filter ) {
+			if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+				var found, item,
+					filter = Expr.filter[ type ],
+					left = match[1];
+
+				anyFound = false;
+
+				match.splice(1,1);
+
+				if ( left.substr( left.length - 1 ) === "\\" ) {
+					continue;
+				}
+
+				if ( curLoop === result ) {
+					result = [];
+				}
+
+				if ( Expr.preFilter[ type ] ) {
+					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+					if ( !match ) {
+						anyFound = found = true;
+
+					} else if ( match === true ) {
+						continue;
+					}
+				}
+
+				if ( match ) {
+					for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+						if ( item ) {
+							found = filter( item, match, i, curLoop );
+							var pass = not ^ !!found;
+
+							if ( inplace && found != null ) {
+								if ( pass ) {
+									anyFound = true;
+
+								} else {
+									curLoop[i] = false;
+								}
+
+							} else if ( pass ) {
+								result.push( item );
+								anyFound = true;
+							}
+						}
+					}
+				}
+
+				if ( found !== undefined ) {
+					if ( !inplace ) {
+						curLoop = result;
+					}
+
+					expr = expr.replace( Expr.match[ type ], "" );
+
+					if ( !anyFound ) {
+						return [];
+					}
+
+					break;
+				}
+			}
+		}
+
+		// Improper expression
+		if ( expr === old ) {
+			if ( anyFound == null ) {
+				Sizzle.error( expr );
+
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw "Syntax error, unrecognized expression: " + msg;
+};
+
+var Expr = Sizzle.selectors = {
+	order: [ "ID", "NAME", "TAG" ],
+
+	match: {
+		ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+		CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+		PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+	},
+
+	leftMatch: {},
+
+	attrMap: {
+		"class": "className",
+		"for": "htmlFor"
+	},
+
+	attrHandle: {
+		href: function( elem ) {
+			return elem.getAttribute( "href" );
+		}
+	},
+
+	relative: {
+		"+": function(checkSet, part){
+			var isPartStr = typeof part === "string",
+				isTag = isPartStr && !/\W/.test( part ),
+				isPartStrNotTag = isPartStr && !isTag;
+
+			if ( isTag ) {
+				part = part.toLowerCase();
+			}
+
+			for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+				if ( (elem = checkSet[i]) ) {
+					while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+					checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+						elem || false :
+						elem === part;
+				}
+			}
+
+			if ( isPartStrNotTag ) {
+				Sizzle.filter( part, checkSet, true );
+			}
+		},
+
+		">": function( checkSet, part ) {
+			var elem,
+				isPartStr = typeof part === "string",
+				i = 0,
+				l = checkSet.length;
+
+			if ( isPartStr && !/\W/.test( part ) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+
+			} else {
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						checkSet[i] = isPartStr ?
+							elem.parentNode :
+							elem.parentNode === part;
+					}
+				}
+
+				if ( isPartStr ) {
+					Sizzle.filter( part, checkSet, true );
+				}
+			}
+		},
+
+		"": function(checkSet, part, isXML){
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !/\W/.test(part) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+		},
+
+		"~": function( checkSet, part, isXML ) {
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !/\W/.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+		}
+	},
+
+	find: {
+		ID: function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		},
+
+		NAME: function( match, context ) {
+			if ( typeof context.getElementsByName !== "undefined" ) {
+				var ret = [],
+					results = context.getElementsByName( match[1] );
+
+				for ( var i = 0, l = results.length; i < l; i++ ) {
+					if ( results[i].getAttribute("name") === match[1] ) {
+						ret.push( results[i] );
+					}
+				}
+
+				return ret.length === 0 ? null : ret;
+			}
+		},
+
+		TAG: function( match, context ) {
+			return context.getElementsByTagName( match[1] );
+		}
+	},
+	preFilter: {
+		CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+			match = " " + match[1].replace(/\\/g, "") + " ";
+
+			if ( isXML ) {
+				return match;
+			}
+
+			for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+				if ( elem ) {
+					if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
+						if ( !inplace ) {
+							result.push( elem );
+						}
+
+					} else if ( inplace ) {
+						curLoop[i] = false;
+					}
+				}
+			}
+
+			return false;
+		},
+
+		ID: function( match ) {
+			return match[1].replace(/\\/g, "");
+		},
+
+		TAG: function( match, curLoop ) {
+			return match[1].toLowerCase();
+		},
+
+		CHILD: function( match ) {
+			if ( match[1] === "nth" ) {
+				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+				var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+					match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+					!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+				// calculate the numbers (first)n+(last) including if they are negative
+				match[2] = (test[1] + (test[2] || 1)) - 0;
+				match[3] = test[3] - 0;
+			}
+
+			// TODO: Move to normal caching system
+			match[0] = done++;
+
+			return match;
+		},
+
+		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+			var name = match[1].replace(/\\/g, "");
+			
+			if ( !isXML && Expr.attrMap[name] ) {
+				match[1] = Expr.attrMap[name];
+			}
+
+			if ( match[2] === "~=" ) {
+				match[4] = " " + match[4] + " ";
+			}
+
+			return match;
+		},
+
+		PSEUDO: function( match, curLoop, inplace, result, not ) {
+			if ( match[1] === "not" ) {
+				// If we're dealing with a complex expression, or a simple one
+				if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+					match[3] = Sizzle(match[3], null, null, curLoop);
+
+				} else {
+					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+					if ( !inplace ) {
+						result.push.apply( result, ret );
+					}
+
+					return false;
+				}
+
+			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+				return true;
+			}
+			
+			return match;
+		},
+
+		POS: function( match ) {
+			match.unshift( true );
+
+			return match;
+		}
+	},
+	
+	filters: {
+		enabled: function( elem ) {
+			return elem.disabled === false && elem.type !== "hidden";
+		},
+
+		disabled: function( elem ) {
+			return elem.disabled === true;
+		},
+
+		checked: function( elem ) {
+			return elem.checked === true;
+		},
+		
+		selected: function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			elem.parentNode.selectedIndex;
+			
+			return elem.selected === true;
+		},
+
+		parent: function( elem ) {
+			return !!elem.firstChild;
+		},
+
+		empty: function( elem ) {
+			return !elem.firstChild;
+		},
+
+		has: function( elem, i, match ) {
+			return !!Sizzle( match[3], elem ).length;
+		},
+
+		header: function( elem ) {
+			return (/h\d/i).test( elem.nodeName );
+		},
+
+		text: function( elem ) {
+			return "text" === elem.type;
+		},
+		radio: function( elem ) {
+			return "radio" === elem.type;
+		},
+
+		checkbox: function( elem ) {
+			return "checkbox" === elem.type;
+		},
+
+		file: function( elem ) {
+			return "file" === elem.type;
+		},
+		password: function( elem ) {
+			return "password" === elem.type;
+		},
+
+		submit: function( elem ) {
+			return "submit" === elem.type;
+		},
+
+		image: function( elem ) {
+			return "image" === elem.type;
+		},
+
+		reset: function( elem ) {
+			return "reset" === elem.type;
+		},
+
+		button: function( elem ) {
+			return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+		},
+
+		input: function( elem ) {
+			return (/input|select|textarea|button/i).test( elem.nodeName );
+		}
+	},
+	setFilters: {
+		first: function( elem, i ) {
+			return i === 0;
+		},
+
+		last: function( elem, i, match, array ) {
+			return i === array.length - 1;
+		},
+
+		even: function( elem, i ) {
+			return i % 2 === 0;
+		},
+
+		odd: function( elem, i ) {
+			return i % 2 === 1;
+		},
+
+		lt: function( elem, i, match ) {
+			return i < match[3] - 0;
+		},
+
+		gt: function( elem, i, match ) {
+			return i > match[3] - 0;
+		},
+
+		nth: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		},
+
+		eq: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		}
+	},
+	filter: {
+		PSEUDO: function( elem, match, i, array ) {
+			var name = match[1],
+				filter = Expr.filters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+
+			} else if ( name === "contains" ) {
+				return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+
+			} else {
+				Sizzle.error( "Syntax error, unrecognized expression: " + name );
+			}
+		},
+
+		CHILD: function( elem, match ) {
+			var type = match[1],
+				node = elem;
+
+			switch ( type ) {
+				case "only":
+				case "first":
+					while ( (node = node.previousSibling) )	 {
+						if ( node.nodeType === 1 ) { 
+							return false; 
+						}
+					}
+
+					if ( type === "first" ) { 
+						return true; 
+					}
+
+					node = elem;
+
+				case "last":
+					while ( (node = node.nextSibling) )	 {
+						if ( node.nodeType === 1 ) { 
+							return false; 
+						}
+					}
+
+					return true;
+
+				case "nth":
+					var first = match[2],
+						last = match[3];
+
+					if ( first === 1 && last === 0 ) {
+						return true;
+					}
+					
+					var doneName = match[0],
+						parent = elem.parentNode;
+	
+					if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+						var count = 0;
+						
+						for ( node = parent.firstChild; node; node = node.nextSibling ) {
+							if ( node.nodeType === 1 ) {
+								node.nodeIndex = ++count;
+							}
+						} 
+
+						parent.sizcache = doneName;
+					}
+					
+					var diff = elem.nodeIndex - last;
+
+					if ( first === 0 ) {
+						return diff === 0;
+
+					} else {
+						return ( diff % first === 0 && diff / first >= 0 );
+					}
+			}
+		},
+
+		ID: function( elem, match ) {
+			return elem.nodeType === 1 && elem.getAttribute("id") === match;
+		},
+
+		TAG: function( elem, match ) {
+			return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+		},
+		
+		CLASS: function( elem, match ) {
+			return (" " + (elem.className || elem.getAttribute("class")) + " ")
+				.indexOf( match ) > -1;
+		},
+
+		ATTR: function( elem, match ) {
+			var name = match[1],
+				result = Expr.attrHandle[ name ] ?
+					Expr.attrHandle[ name ]( elem ) :
+					elem[ name ] != null ?
+						elem[ name ] :
+						elem.getAttribute( name ),
+				value = result + "",
+				type = match[2],
+				check = match[4];
+
+			return result == null ?
+				type === "!=" :
+				type === "=" ?
+				value === check :
+				type === "*=" ?
+				value.indexOf(check) >= 0 :
+				type === "~=" ?
+				(" " + value + " ").indexOf(check) >= 0 :
+				!check ?
+				value && result !== false :
+				type === "!=" ?
+				value !== check :
+				type === "^=" ?
+				value.indexOf(check) === 0 :
+				type === "$=" ?
+				value.substr(value.length - check.length) === check :
+				type === "|=" ?
+				value === check || value.substr(0, check.length + 1) === check + "-" :
+				false;
+		},
+
+		POS: function( elem, match, i, array ) {
+			var name = match[2],
+				filter = Expr.setFilters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+			}
+		}
+	}
+};
+
+var origPOS = Expr.match.POS,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+for ( var type in Expr.match ) {
+	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function( array, results ) {
+	array = Array.prototype.slice.call( array, 0 );
+
+	if ( results ) {
+		results.push.apply( results, array );
+		return results;
+	}
+	
+	return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+	makeArray = function( array, results ) {
+		var i = 0,
+			ret = results || [];
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+
+} else {
+	sortOrder = function( a, b ) {
+		var al, bl,
+			ap = [],
+			bp = [],
+			aup = a.parentNode,
+			bup = b.parentNode,
+			cur = aup;
+
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( elems ) {
+	var ret = "", elem;
+
+	for ( var i = 0; elems[i]; i++ ) {
+		elem = elems[i];
+
+		// Get the text from text nodes and CDATA nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+			ret += elem.nodeValue;
+
+		// Traverse everything else, except comment nodes
+		} else if ( elem.nodeType !== 8 ) {
+			ret += Sizzle.getText( elem.childNodes );
+		}
+	}
+
+	return ret;
+};
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+	// We're going to inject a fake input element with a specified name
+	var form = document.createElement("div"),
+		id = "script" + (new Date()).getTime(),
+		root = document.documentElement;
+
+	form.innerHTML = "<a name='" + id + "'/>";
+
+	// Inject it into the root element, check its status, and remove it quickly
+	root.insertBefore( form, root.firstChild );
+
+	// The workaround has to do additional checks after a getElementById
+	// Which slows things down for other browsers (hence the branching)
+	if ( document.getElementById( id ) ) {
+		Expr.find.ID = function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+
+				return m ?
+					m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+						[m] :
+						undefined :
+					[];
+			}
+		};
+
+		Expr.filter.ID = function( elem, match ) {
+			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+			return elem.nodeType === 1 && node && node.nodeValue === match;
+		};
+	}
+
+	root.removeChild( form );
+
+	// release memory in IE
+	root = form = null;
+})();
+
+(function(){
+	// Check to see if the browser returns only elements
+	// when doing getElementsByTagName("*")
+
+	// Create a fake element
+	var div = document.createElement("div");
+	div.appendChild( document.createComment("") );
+
+	// Make sure no comments are found
+	if ( div.getElementsByTagName("*").length > 0 ) {
+		Expr.find.TAG = function( match, context ) {
+			var results = context.getElementsByTagName( match[1] );
+
+			// Filter out possible comments
+			if ( match[1] === "*" ) {
+				var tmp = [];
+
+				for ( var i = 0; results[i]; i++ ) {
+					if ( results[i].nodeType === 1 ) {
+						tmp.push( results[i] );
+					}
+				}
+
+				results = tmp;
+			}
+
+			return results;
+		};
+	}
+
+	// Check to see if an attribute returns normalized href attributes
+	div.innerHTML = "<a href='#'></a>";
+
+	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+			div.firstChild.getAttribute("href") !== "#" ) {
+
+		Expr.attrHandle.href = function( elem ) {
+			return elem.getAttribute( "href", 2 );
+		};
+	}
+
+	// release memory in IE
+	div = null;
+})();
+
+if ( document.querySelectorAll ) {
+	(function(){
+		var oldSizzle = Sizzle,
+			div = document.createElement("div"),
+			id = "__sizzle__";
+
+		div.innerHTML = "<p class='TEST'></p>";
+
+		// Safari can't handle uppercase or unicode characters when
+		// in quirks mode.
+		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+			return;
+		}
+	
+		Sizzle = function( query, context, extra, seed ) {
+			context = context || document;
+
+			// Make sure that attribute selectors are quoted
+			query = query.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			// Only use querySelectorAll on non-XML documents
+			// (ID selectors don't work in non-HTML documents)
+			if ( !seed && !Sizzle.isXML(context) ) {
+				if ( context.nodeType === 9 ) {
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var old = context.getAttribute( "id" ),
+						nid = old || id;
+
+					if ( !old ) {
+						context.setAttribute( "id", nid );
+					}
+
+					try {
+						return makeArray( context.querySelectorAll( "#" + nid + " " + query ), extra );
+
+					} catch(pseudoError) {
+					} finally {
+						if ( !old ) {
+							context.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		// release memory in IE
+		div = null;
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+		pseudoWorks = false;
+
+	try {
+		// This should fail with an exception
+		// Gecko does not error, returns false instead
+		matches.call( document.documentElement, "[test!='']:sizzle" );
+	
+	} catch( pseudoError ) {
+		pseudoWorks = true;
+	}
+
+	if ( matches ) {
+		Sizzle.matchesSelector = function( node, expr ) {
+			// Make sure that attribute selectors are quoted
+			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			if ( !Sizzle.isXML( node ) ) {
+				try { 
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+						return matches.call( node, expr );
+					}
+				} catch(e) {}
+			}
+
+			return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(function(){
+	var div = document.createElement("div");
+
+	div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+	// Opera can't find a second classname (in 9.6)
+	// Also, make sure that getElementsByClassName actually exists
+	if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+		return;
+	}
+
+	// Safari caches class attributes, doesn't catch changes (in 3.2)
+	div.lastChild.className = "e";
+
+	if ( div.getElementsByClassName("e").length === 1 ) {
+		return;
+	}
+	
+	Expr.order.splice(1, 0, "CLASS");
+	Expr.find.CLASS = function( match, context, isXML ) {
+		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+			return context.getElementsByClassName(match[1]);
+		}
+	};
+
+	// release memory in IE
+	div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem.sizcache === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 && !isXML ){
+					elem.sizcache = doneName;
+					elem.sizset = i;
+				}
+
+				if ( elem.nodeName.toLowerCase() === cur ) {
+					match = elem;
+					break;
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+			
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem.sizcache === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 ) {
+					if ( !isXML ) {
+						elem.sizcache = doneName;
+						elem.sizset = i;
+					}
+
+					if ( typeof cur !== "string" ) {
+						if ( elem === cur ) {
+							match = true;
+							break;
+						}
+
+					} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+						match = elem;
+						break;
+					}
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+if ( document.documentElement.contains ) {
+	Sizzle.contains = function( a, b ) {
+		return a !== b && (a.contains ? a.contains(b) : true);
+	};
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+	Sizzle.contains = function( a, b ) {
+		return !!(a.compareDocumentPosition(b) & 16);
+	};
+
+} else {
+	Sizzle.contains = function() {
+		return false;
+	};
+}
+
+Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833) 
+	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context ) {
+	var match,
+		tmpSet = [],
+		later = "",
+		root = context.nodeType ? [context] : context;
+
+	// Position selectors must be done after the filter
+	// And so must :not(positional) so we move all PSEUDOs to the end
+	while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+		later += match[0];
+		selector = selector.replace( Expr.match.PSEUDO, "" );
+	}
+
+	selector = Expr.relative[selector] ? selector + "*" : selector;
+
+	for ( var i = 0, l = root.length; i < l; i++ ) {
+		Sizzle( selector, root[i], tmpSet );
+	}
+
+	return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+	// Note: This RegExp should be improved, or likely pulled from Sizzle
+	rmultiselector = /,/,
+	isSimple = /^.[^:#\[\.,]*$/,
+	slice = Array.prototype.slice,
+	POS = jQuery.expr.match.POS;
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var ret = this.pushStack( "", "find", selector ),
+			length = 0;
+
+		for ( var i = 0, l = this.length; i < l; i++ ) {
+			length = ret.length;
+			jQuery.find( selector, this[i], ret );
+
+			if ( i > 0 ) {
+				// Make sure that the results are unique
+				for ( var n = length; n < ret.length; n++ ) {
+					for ( var r = 0; r < length; r++ ) {
+						if ( ret[r] === ret[n] ) {
+							ret.splice(n--, 1);
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	has: function( target ) {
+		var targets = jQuery( target );
+		return this.filter(function() {
+			for ( var i = 0, l = targets.length; i < l; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector, false), "not", selector);
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector, true), "filter", selector );
+	},
+	
+	is: function( selector ) {
+		return !!selector && jQuery.filter( selector, this ).length > 0;
+	},
+
+	closest: function( selectors, context ) {
+		var ret = [], i, l, cur = this[0];
+
+		if ( jQuery.isArray( selectors ) ) {
+			var match, selector,
+				matches = {},
+				level = 1;
+
+			if ( cur && selectors.length ) {
+				for ( i = 0, l = selectors.length; i < l; i++ ) {
+					selector = selectors[i];
+
+					if ( !matches[selector] ) {
+						matches[selector] = jQuery.expr.match.POS.test( selector ) ? 
+							jQuery( selector, context || this.context ) :
+							selector;
+					}
+				}
+
+				while ( cur && cur.ownerDocument && cur !== context ) {
+					for ( selector in matches ) {
+						match = matches[selector];
+
+						if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
+							ret.push({ selector: selector, elem: cur, level: level });
+						}
+					}
+
+					cur = cur.parentNode;
+					level++;
+				}
+			}
+
+			return ret;
+		}
+
+		var pos = POS.test( selectors ) ? 
+			jQuery( selectors, context || this.context ) : null;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			cur = this[i];
+
+			while ( cur ) {
+				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+					ret.push( cur );
+					break;
+
+				} else {
+					cur = cur.parentNode;
+					if ( !cur || !cur.ownerDocument || cur === context ) {
+						break;
+					}
+				}
+			}
+		}
+
+		ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+		
+		return this.pushStack( ret, "closest", selectors );
+	},
+	
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+		if ( !elem || typeof elem === "string" ) {
+			return jQuery.inArray( this[0],
+				// If it receives a string, the selector is used
+				// If it receives nothing, the siblings are used
+				elem ? jQuery( elem ) : this.parent().children() );
+		}
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context || this.context ) :
+				jQuery.makeArray( selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+			all :
+			jQuery.unique( all ) );
+	},
+
+	andSelf: function() {
+		return this.add( this.prevObject );
+	}
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+	return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return jQuery.nth( elem, 2, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return jQuery.nth( elem, 2, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( elem.parentNode.firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.makeArray( elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+		
+		if ( !runtil.test( name ) ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		ret = this.length > 1 ? jQuery.unique( ret ) : ret;
+
+		if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+			ret = ret.reverse();
+		}
+
+		return this.pushStack( ret, name, slice.call(arguments).join(",") );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 ?
+			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+			jQuery.find.matches(expr, elems);
+	},
+	
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	nth: function( cur, result, dir, elem ) {
+		result = result || 1;
+		var num = 0;
+
+		for ( ; cur; cur = cur[dir] ) {
+			if ( cur.nodeType === 1 && ++num === result ) {
+				break;
+			}
+		}
+
+		return cur;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			var retVal = !!qualifier.call( elem, i, elem );
+			return retVal === keep;
+		});
+
+	} else if ( qualifier.nodeType ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			return (elem === qualifier) === keep;
+		});
+
+	} else if ( typeof qualifier === "string" ) {
+		var filtered = jQuery.grep(elements, function( elem ) {
+			return elem.nodeType === 1;
+		});
+
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter(qualifier, filtered, !keep);
+		} else {
+			qualifier = jQuery.filter( qualifier, filtered );
+		}
+	}
+
+	return jQuery.grep(elements, function( elem, i ) {
+		return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+	});
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnocache = /<(?:script|object|embed|option|style)/i,
+	// checked="checked" or checked (html5)
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	raction = /\=([^="'>\s]+\/)>/g,
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		area: [ 1, "<map>", "</map>" ],
+		_default: [ 0, "", "" ]
+	};
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+	wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+	text: function( text ) {
+		if ( jQuery.isFunction(text) ) {
+			return this.each(function(i) {
+				var self = jQuery( this );
+
+				self.text( text.call(this, i, self.text()) );
+			});
+		}
+
+		if ( typeof text !== "object" && text !== undefined ) {
+			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+		}
+
+		return jQuery.text( this );
+	},
+
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append(this);
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		return this.each(function() {
+			jQuery( this ).wrapAll( html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	},
+
+	append: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.insertBefore( elem, this.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this );
+			});
+		} else if ( arguments.length ) {
+			var set = jQuery(arguments[0]);
+			set.push.apply( set, this.toArray() );
+			return this.pushStack( set, "before", arguments );
+		}
+	},
+
+	after: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			});
+		} else if ( arguments.length ) {
+			var set = this.pushStack( this, "after", arguments );
+			set.push.apply( set, jQuery(arguments[0]).toArray() );
+			return set;
+		}
+	},
+	
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+				if ( !keepData && elem.nodeType === 1 ) {
+					jQuery.cleanData( elem.getElementsByTagName("*") );
+					jQuery.cleanData( [ elem ] );
+				}
+
+				if ( elem.parentNode ) {
+					 elem.parentNode.removeChild( elem );
+				}
+			}
+		}
+		
+		return this;
+	},
+
+	empty: function() {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( elem.getElementsByTagName("*") );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+		}
+		
+		return this;
+	},
+
+	clone: function( events ) {
+		// Do the clone
+		var ret = this.map(function() {
+			if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
+				// IE copies events bound via attachEvent when
+				// using cloneNode. Calling detachEvent on the
+				// clone will also remove the events from the orignal
+				// In order to get around this, we use innerHTML.
+				// Unfortunately, this means some modifications to
+				// attributes in IE that are actually only stored
+				// as properties will not be copied (such as the
+				// the name attribute on an input).
+				var html = this.outerHTML,
+					ownerDocument = this.ownerDocument;
+
+				if ( !html ) {
+					var div = ownerDocument.createElement("div");
+					div.appendChild( this.cloneNode(true) );
+					html = div.innerHTML;
+				}
+
+				return jQuery.clean([html.replace(rinlinejQuery, "")
+					// Handle the case in IE 8 where action=/test/> self-closes a tag
+					.replace(raction, '="$1">')
+					.replace(rleadingWhitespace, "")], ownerDocument)[0];
+			} else {
+				return this.cloneNode(true);
+			}
+		});
+
+		// Copy the events from the original to the clone
+		if ( events === true ) {
+			cloneCopyEvent( this, ret );
+			cloneCopyEvent( this.find("*"), ret.find("*") );
+		}
+
+		// Return the cloned set
+		return ret;
+	},
+
+	html: function( value ) {
+		if ( value === undefined ) {
+			return this[0] && this[0].nodeType === 1 ?
+				this[0].innerHTML.replace(rinlinejQuery, "") :
+				null;
+
+		// See if we can take a shortcut and just use innerHTML
+		} else if ( typeof value === "string" && !rnocache.test( value ) &&
+			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+			value = value.replace(rxhtmlTag, "<$1></$2>");
+
+			try {
+				for ( var i = 0, l = this.length; i < l; i++ ) {
+					// Remove element nodes and prevent memory leaks
+					if ( this[i].nodeType === 1 ) {
+						jQuery.cleanData( this[i].getElementsByTagName("*") );
+						this[i].innerHTML = value;
+					}
+				}
+
+			// If using innerHTML throws an exception, use the fallback method
+			} catch(e) {
+				this.empty().append( value );
+			}
+
+		} else if ( jQuery.isFunction( value ) ) {
+			this.each(function(i){
+				var self = jQuery( this );
+
+				self.html( value.call(this, i, self.html()) );
+			});
+
+		} else {
+			this.empty().append( value );
+		}
+
+		return this;
+	},
+
+	replaceWith: function( value ) {
+		if ( this[0] && this[0].parentNode ) {
+			// Make sure that the elements are removed from the DOM before they are inserted
+			// this can help fix replacing a parent with child elements
+			if ( jQuery.isFunction( value ) ) {
+				return this.each(function(i) {
+					var self = jQuery(this), old = self.html();
+					self.replaceWith( value.call( this, i, old ) );
+				});
+			}
+
+			if ( typeof value !== "string" ) {
+				value = jQuery( value ).detach();
+			}
+
+			return this.each(function() {
+				var next = this.nextSibling,
+					parent = this.parentNode;
+
+				jQuery( this ).remove();
+
+				if ( next ) {
+					jQuery(next).before( value );
+				} else {
+					jQuery(parent).append( value );
+				}
+			});
+		} else {
+			return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value );
+		}
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, table, callback ) {
+		var results, first, fragment, parent,
+			value = args[0],
+			scripts = [];
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+			return this.each(function() {
+				jQuery(this).domManip( args, table, callback, true );
+			});
+		}
+
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				args[0] = value.call(this, i, table ? self.html() : undefined);
+				self.domManip( args, table, callback );
+			});
+		}
+
+		if ( this[0] ) {
+			parent = value && value.parentNode;
+
+			// If we're in a fragment, just use that instead of building a new one
+			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+				results = { fragment: parent };
+
+			} else {
+				results = jQuery.buildFragment( args, this, scripts );
+			}
+			
+			fragment = results.fragment;
+			
+			if ( fragment.childNodes.length === 1 ) {
+				first = fragment = fragment.firstChild;
+			} else {
+				first = fragment.firstChild;
+			}
+
+			if ( first ) {
+				table = table && jQuery.nodeName( first, "tr" );
+
+				for ( var i = 0, l = this.length; i < l; i++ ) {
+					callback.call(
+						table ?
+							root(this[i], first) :
+							this[i],
+						i > 0 || results.cacheable || this.length > 1  ?
+							fragment.cloneNode(true) :
+							fragment
+					);
+				}
+			}
+
+			if ( scripts.length ) {
+				jQuery.each( scripts, evalScript );
+			}
+		}
+
+		return this;
+	}
+});
+
+function root( elem, cur ) {
+	return jQuery.nodeName(elem, "table") ?
+		(elem.getElementsByTagName("tbody")[0] ||
+		elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+		elem;
+}
+
+function cloneCopyEvent(orig, ret) {
+	var i = 0;
+
+	ret.each(function() {
+		if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
+			return;
+		}
+
+		var oldData = jQuery.data( orig[i++] ),
+			curData = jQuery.data( this, oldData ),
+			events = oldData && oldData.events;
+
+		if ( events ) {
+			delete curData.handle;
+			curData.events = {};
+
+			for ( var type in events ) {
+				for ( var handler in events[ type ] ) {
+					jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
+				}
+			}
+		}
+	});
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+	var fragment, cacheable, cacheresults,
+		doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+
+	// Only cache "small" (1/2 KB) strings that are associated with the main document
+	// Cloning options loses the selected state, so don't cache them
+	// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+	// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+	if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+		!rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+		cacheable = true;
+		cacheresults = jQuery.fragments[ args[0] ];
+		if ( cacheresults ) {
+			if ( cacheresults !== 1 ) {
+				fragment = cacheresults;
+			}
+		}
+	}
+
+	if ( !fragment ) {
+		fragment = doc.createDocumentFragment();
+		jQuery.clean( args, doc, fragment, scripts );
+	}
+
+	if ( cacheable ) {
+		jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+	}
+
+	return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var ret = [],
+			insert = jQuery( selector ),
+			parent = this.length === 1 && this[0].parentNode;
+		
+		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+			insert[ original ]( this[0] );
+			return this;
+			
+		} else {
+			for ( var i = 0, l = insert.length; i < l; i++ ) {
+				var elems = (i > 0 ? this.clone(true) : this).get();
+				jQuery( insert[i] )[ original ]( elems );
+				ret = ret.concat( elems );
+			}
+		
+			return this.pushStack( ret, name, insert.selector );
+		}
+	};
+});
+
+jQuery.extend({
+	clean: function( elems, context, fragment, scripts ) {
+		context = context || document;
+
+		// !context.createElement fails in IE with an error but returns typeof 'object'
+		if ( typeof context.createElement === "undefined" ) {
+			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+		}
+
+		var ret = [];
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( typeof elem === "number" ) {
+				elem += "";
+			}
+
+			if ( !elem ) {
+				continue;
+			}
+
+			// Convert html string into DOM nodes
+			if ( typeof elem === "string" && !rhtml.test( elem ) ) {
+				elem = context.createTextNode( elem );
+
+			} else if ( typeof elem === "string" ) {
+				// Fix "XHTML"-style tags in all browsers
+				elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+				// Trim whitespace, otherwise indexOf won't work as expected
+				var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+					wrap = wrapMap[ tag ] || wrapMap._default,
+					depth = wrap[0],
+					div = context.createElement("div");
+
+				// Go to html and back, then peel off extra wrappers
+				div.innerHTML = wrap[1] + elem + wrap[2];
+
+				// Move to the right depth
+				while ( depth-- ) {
+					div = div.lastChild;
+				}
+
+				// Remove IE's autoinserted <tbody> from table fragments
+				if ( !jQuery.support.tbody ) {
+
+					// String was a <table>, *may* have spurious <tbody>
+					var hasBody = rtbody.test(elem),
+						tbody = tag === "table" && !hasBody ?
+							div.firstChild && div.firstChild.childNodes :
+
+							// String was a bare <thead> or <tfoot>
+							wrap[1] === "<table>" && !hasBody ?
+								div.childNodes :
+								[];
+
+					for ( var j = tbody.length - 1; j >= 0 ; --j ) {
+						if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+							tbody[ j ].parentNode.removeChild( tbody[ j ] );
+						}
+					}
+
+				}
+
+				// IE completely kills leading whitespace when innerHTML is used
+				if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+					div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+				}
+
+				elem = div.childNodes;
+			}
+
+			if ( elem.nodeType ) {
+				ret.push( elem );
+			} else {
+				ret = jQuery.merge( ret, elem );
+			}
+		}
+
+		if ( fragment ) {
+			for ( i = 0; ret[i]; i++ ) {
+				if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+				
+				} else {
+					if ( ret[i].nodeType === 1 ) {
+						ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
+					}
+					fragment.appendChild( ret[i] );
+				}
+			}
+		}
+
+		return ret;
+	},
+	
+	cleanData: function( elems ) {
+		var data, id, cache = jQuery.cache,
+			special = jQuery.event.special,
+			deleteExpando = jQuery.support.deleteExpando;
+		
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+				continue;
+			}
+
+			id = elem[ jQuery.expando ];
+			
+			if ( id ) {
+				data = cache[ id ];
+				
+				if ( data && data.events ) {
+					for ( var type in data.events ) {
+						if ( special[ type ] ) {
+							jQuery.event.remove( elem, type );
+
+						} else {
+							jQuery.removeEvent( elem, type, data.handle );
+						}
+					}
+				}
+				
+				if ( deleteExpando ) {
+					delete elem[ jQuery.expando ];
+
+				} else if ( elem.removeAttribute ) {
+					elem.removeAttribute( jQuery.expando );
+				}
+				
+				delete cache[ id ];
+			}
+		}
+	}
+});
+
+function evalScript( i, elem ) {
+	if ( elem.src ) {
+		jQuery.ajax({
+			url: elem.src,
+			async: false,
+			dataType: "script"
+		});
+	} else {
+		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+	}
+
+	if ( elem.parentNode ) {
+		elem.parentNode.removeChild( elem );
+	}
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	rdashAlpha = /-([a-z])/ig,
+	rupper = /([A-Z])/g,
+	rnumpx = /^-?\d+(?:px)?$/i,
+	rnum = /^-?\d/,
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssWidth = [ "Left", "Right" ],
+	cssHeight = [ "Top", "Bottom" ],
+	curCSS,
+
+	getComputedStyle,
+	currentStyle,
+
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	};
+
+jQuery.fn.css = function( name, value ) {
+	// Setting 'undefined' is a no-op
+	if ( arguments.length === 2 && value === undefined ) {
+		return this;
+	}
+
+	return jQuery.access( this, name, value, true, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	});
+};
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity", "opacity" );
+					return ret === "" ? "1" : ret;
+
+				} else {
+					return elem.style.opacity;
+				}
+			}
+		}
+	},
+
+	// Exclude the following css properties to add px
+	cssNumber: {
+		"zIndex": true,
+		"fontWeight": true,
+		"opacity": true,
+		"zoom": true,
+		"lineHeight": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, origName = jQuery.camelCase( name ),
+			style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( typeof value === "number" && isNaN( value ) || value == null ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra ) {
+		// Make sure that we're working with the right name
+		var ret, origName = jQuery.camelCase( name ),
+			hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+			return ret;
+
+		// Otherwise, if a way to get the computed value exists, use that
+		} else if ( curCSS ) {
+			return curCSS( elem, name, origName );
+		}
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations
+	swap: function( elem, options, callback ) {
+		var old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( var name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		callback.call( elem );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+	},
+
+	camelCase: function( string ) {
+		return string.replace( rdashAlpha, fcamelCase );
+	}
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			var val;
+
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					val = getWH( elem, name, extra );
+
+				} else {
+					jQuery.swap( elem, cssShow, function() {
+						val = getWH( elem, name, extra );
+					});
+				}
+
+				if ( val <= 0 ) {
+					val = curCSS( elem, name, name );
+
+					if ( val === "0px" && currentStyle ) {
+						val = currentStyle( elem, name, name );
+					}
+
+					if ( val != null ) {
+						// Should return "auto" instead of 0, use 0 for
+						// temporary backwards-compat
+						return val === "" || val === "auto" ? "0px" : val;
+					}
+				}
+
+				if ( val < 0 || val == null ) {
+					val = elem.style[ name ];
+
+					// Should return "auto" instead of 0, use 0 for
+					// temporary backwards-compat
+					return val === "" || val === "auto" ? "0px" : val;
+				}
+
+				return typeof val === "string" ? val : val + "px";
+			}
+		},
+
+		set: function( elem, value ) {
+			if ( rnumpx.test( value ) ) {
+				// ignore negative width and height values #1599
+				value = parseFloat(value);
+
+				if ( value >= 0 ) {
+					return value + "px";
+				}
+
+			} else {
+				return value;
+			}
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
+				(parseFloat(RegExp.$1) / 100) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style;
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// Set the alpha filter to set the opacity
+			var opacity = jQuery.isNaN(value) ?
+				"" :
+				"alpha(opacity=" + value * 100 + ")",
+				filter = style.filter || "";
+
+			style.filter = ralpha.test(filter) ?
+				filter.replace(ralpha, opacity) :
+				style.filter + ' ' + opacity;
+		}
+	};
+}
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+	getComputedStyle = function( elem, newName, name ) {
+		var ret, defaultView, computedStyle;
+
+		name = name.replace( rupper, "-$1" ).toLowerCase();
+
+		if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+			return undefined;
+		}
+
+		if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+			ret = computedStyle.getPropertyValue( name );
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+		}
+
+		return ret;
+	};
+}
+
+if ( document.documentElement.currentStyle ) {
+	currentStyle = function( elem, name ) {
+		var left, rsLeft,
+			ret = elem.currentStyle && elem.currentStyle[ name ],
+			style = elem.style;
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+			// Remember the original values
+			left = style.left;
+			rsLeft = elem.runtimeStyle.left;
+
+			// Put in the new values to get a computed value out
+			elem.runtimeStyle.left = elem.currentStyle.left;
+			style.left = name === "fontSize" ? "1em" : (ret || 0);
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			elem.runtimeStyle.left = rsLeft;
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+	var which = name === "width" ? cssWidth : cssHeight,
+		val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+	if ( extra === "border" ) {
+		return val;
+	}
+
+	jQuery.each( which, function() {
+		if ( !extra ) {
+			val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
+		}
+
+		if ( extra === "margin" ) {
+			val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
+
+		} else {
+			val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
+		}
+	});
+
+	return val;
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		var width = elem.offsetWidth,
+			height = elem.offsetHeight;
+
+		return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+
+
+
+var jsc = jQuery.now(),
+	rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+	rselectTextarea = /^(?:select|textarea)/i,
+	rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rbracket = /\[\]$/,
+	jsre = /\=\?(&|$)/,
+	rquery = /\?/,
+	rts = /([?&])_=[^&]*/,
+	rurl = /^(\w+:)?\/\/([^\/?#]+)/,
+	r20 = /%20/g,
+	rhash = /#.*$/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load;
+
+jQuery.fn.extend({
+	load: function( url, params, callback ) {
+		if ( typeof url !== "string" && _load ) {
+			return _load.apply( this, arguments );
+
+		// Don't do a request if no elements are being requested
+		} else if ( !this.length ) {
+			return this;
+		}
+
+		var off = url.indexOf(" ");
+		if ( off >= 0 ) {
+			var selector = url.slice(off, url.length);
+			url = url.slice(0, off);
+		}
+
+		// Default to a GET request
+		var type = "GET";
+
+		// If the second parameter was provided
+		if ( params ) {
+			// If it's a function
+			if ( jQuery.isFunction( params ) ) {
+				// We assume that it's the callback
+				callback = params;
+				params = null;
+
+			// Otherwise, build a param string
+			} else if ( typeof params === "object" ) {
+				params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+				type = "POST";
+			}
+		}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			complete: function( res, status ) {
+				// If successful, inject the HTML into all the matched elements
+				if ( status === "success" || status === "notmodified" ) {
+					// See if a selector was specified
+					self.html( selector ?
+						// Create a dummy div to hold the results
+						jQuery("<div>")
+							// inject the contents of the document in, removing the scripts
+							// to avoid any 'Permission Denied' errors in IE
+							.append(res.responseText.replace(rscript, ""))
+
+							// Locate the specified elements
+							.find(selector) :
+
+						// If not, just inject the full result
+						res.responseText );
+				}
+
+				if ( callback ) {
+					self.each( callback, [res.responseText, status, res] );
+				}
+			}
+		});
+
+		return this;
+	},
+
+	serialize: function() {
+		return jQuery.param(this.serializeArray());
+	},
+
+	serializeArray: function() {
+		return this.map(function() {
+			return this.elements ? jQuery.makeArray(this.elements) : this;
+		})
+		.filter(function() {
+			return this.name && !this.disabled &&
+				(this.checked || rselectTextarea.test(this.nodeName) ||
+					rinput.test(this.type));
+		})
+		.map(function( i, elem ) {
+			var val = jQuery(this).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray(val) ?
+					jQuery.map( val, function( val, i ) {
+						return { name: elem.name, value: val };
+					}) :
+					{ name: elem.name, value: val };
+		}).get();
+	}
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function( i, o ) {
+	jQuery.fn[o] = function( f ) {
+		return this.bind(o, f);
+	};
+});
+
+jQuery.extend({
+	get: function( url, data, callback, type ) {
+		// shift arguments if data argument was omited
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = null;
+		}
+
+		return jQuery.ajax({
+			type: "GET",
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	},
+
+	getScript: function( url, callback ) {
+		return jQuery.get(url, null, callback, "script");
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get(url, data, callback, "json");
+	},
+
+	post: function( url, data, callback, type ) {
+		// shift arguments if data argument was omited
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = {};
+		}
+
+		return jQuery.ajax({
+			type: "POST",
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	},
+
+	ajaxSetup: function( settings ) {
+		jQuery.extend( jQuery.ajaxSettings, settings );
+	},
+
+	ajaxSettings: {
+		url: location.href,
+		global: true,
+		type: "GET",
+		contentType: "application/x-www-form-urlencoded",
+		processData: true,
+		async: true,
+		/*
+		timeout: 0,
+		data: null,
+		username: null,
+		password: null,
+		traditional: false,
+		*/
+		// This function can be overriden by calling jQuery.ajaxSetup
+		xhr: function() {
+			return new window.XMLHttpRequest();
+		},
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			script: "text/javascript, application/javascript",
+			json: "application/json, text/javascript",
+			text: "text/plain",
+			_default: "*/*"
+		}
+	},
+
+	ajax: function( origSettings ) {
+		var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
+			jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
+
+		s.url = s.url.replace( rhash, "" );
+
+		// Use original (not extended) context object if it was provided
+		s.context = origSettings && origSettings.context != null ? origSettings.context : s;
+
+		// convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Handle JSONP Parameter Callbacks
+		if ( s.dataType === "jsonp" ) {
+			if ( type === "GET" ) {
+				if ( !jsre.test( s.url ) ) {
+					s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?";
+				}
+			} else if ( !s.data || !jsre.test(s.data) ) {
+				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
+			}
+			s.dataType = "json";
+		}
+
+		// Build temporary JSONP function
+		if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
+			jsonp = s.jsonpCallback || ("jsonp" + jsc++);
+
+			// Replace the =? sequence both in the query string and the data
+			if ( s.data ) {
+				s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
+			}
+
+			s.url = s.url.replace(jsre, "=" + jsonp + "$1");
+
+			// We need to make sure
+			// that a JSONP style response is executed properly
+			s.dataType = "script";
+
+			// Handle JSONP-style loading
+			var customJsonp = window[ jsonp ];
+
+			window[ jsonp ] = function( tmp ) {
+				if ( jQuery.isFunction( customJsonp ) ) {
+					customJsonp( tmp );
+
+				} else {
+					// Garbage collect
+					window[ jsonp ] = undefined;
+
+					try {
+						delete window[ jsonp ];
+					} catch( jsonpError ) {}
+				}
+
+				data = tmp;
+				jQuery.handleSuccess( s, xhr, status, data );
+				jQuery.handleComplete( s, xhr, status, data );
+				
+				if ( head ) {
+					head.removeChild( script );
+				}
+			};
+		}
+
+		if ( s.dataType === "script" && s.cache === null ) {
+			s.cache = false;
+		}
+
+		if ( s.cache === false && noContent ) {
+			var ts = jQuery.now();
+
+			// try replacing _= if it is there
+			var ret = s.url.replace(rts, "$1_=" + ts);
+
+			// if nothing was replaced, add timestamp to the end
+			s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
+		}
+
+		// If data is available, append data to url for GET/HEAD requests
+		if ( s.data && noContent ) {
+			s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
+		}
+
+		// Watch for a new set of requests
+		if ( s.global && jQuery.active++ === 0 ) {
+			jQuery.event.trigger( "ajaxStart" );
+		}
+
+		// Matches an absolute URL, and saves the domain
+		var parts = rurl.exec( s.url ),
+			remote = parts && (parts[1] && parts[1].toLowerCase() !== location.protocol || parts[2].toLowerCase() !== location.host);
+
+		// If we're requesting a remote document
+		// and trying to load JSON or Script with a GET
+		if ( s.dataType === "script" && type === "GET" && remote ) {
+			var head = document.getElementsByTagName("head")[0] || document.documentElement;
+			var script = document.createElement("script");
+			if ( s.scriptCharset ) {
+				script.charset = s.scriptCharset;
+			}
+			script.src = s.url;
+
+			// Handle Script loading
+			if ( !jsonp ) {
+				var done = false;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function() {
+					if ( !done && (!this.readyState ||
+							this.readyState === "loaded" || this.readyState === "complete") ) {
+						done = true;
+						jQuery.handleSuccess( s, xhr, status, data );
+						jQuery.handleComplete( s, xhr, status, data );
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+						if ( head && script.parentNode ) {
+							head.removeChild( script );
+						}
+					}
+				};
+			}
+
+			// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+			// This arises when a base node is used (#2709 and #4378).
+			head.insertBefore( script, head.firstChild );
+
+			// We handle everything using the script element injection
+			return undefined;
+		}
+
+		var requestDone = false;
+
+		// Create the request object
+		var xhr = s.xhr();
+
+		if ( !xhr ) {
+			return;
+		}
+
+		// Open the socket
+		// Passing null username, generates a login popup on Opera (#2865)
+		if ( s.username ) {
+			xhr.open(type, s.url, s.async, s.username, s.password);
+		} else {
+			xhr.open(type, s.url, s.async);
+		}
+
+		// Need an extra try/catch for cross domain requests in Firefox 3
+		try {
+			// Set content-type if data specified and content-body is valid for this type
+			if ( (s.data != null && !noContent) || (origSettings && origSettings.contentType) ) {
+				xhr.setRequestHeader("Content-Type", s.contentType);
+			}
+
+			// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+			if ( s.ifModified ) {
+				if ( jQuery.lastModified[s.url] ) {
+					xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
+				}
+
+				if ( jQuery.etag[s.url] ) {
+					xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
+				}
+			}
+
+			// Set header so the called script knows that it's an XMLHttpRequest
+			// Only send the header if it's not a remote XHR
+			if ( !remote ) {
+				xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+			}
+
+			// Set the Accepts header for the server, depending on the dataType
+			xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
+				s.accepts[ s.dataType ] + ", */*; q=0.01" :
+				s.accepts._default );
+		} catch( headerError ) {}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false ) {
+			// Handle the global AJAX counter
+			if ( s.global && jQuery.active-- === 1 ) {
+				jQuery.event.trigger( "ajaxStop" );
+			}
+
+			// close opended socket
+			xhr.abort();
+			return false;
+		}
+
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxSend", [xhr, s] );
+		}
+
+		// Wait for a response to come back
+		var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
+			// The request was aborted
+			if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
+				// Opera doesn't call onreadystatechange before this point
+				// so we simulate the call
+				if ( !requestDone ) {
+					jQuery.handleComplete( s, xhr, status, data );
+				}
+
+				requestDone = true;
+				if ( xhr ) {
+					xhr.onreadystatechange = jQuery.noop;
+				}
+
+			// The transfer is complete and the data is available, or the request timed out
+			} else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) {
+				requestDone = true;
+				xhr.onreadystatechange = jQuery.noop;
+
+				status = isTimeout === "timeout" ?
+					"timeout" :
+					!jQuery.httpSuccess( xhr ) ?
+						"error" :
+						s.ifModified && jQuery.httpNotModified( xhr, s.url ) ?
+							"notmodified" :
+							"success";
+
+				var errMsg;
+
+				if ( status === "success" ) {
+					// Watch for, and catch, XML document parse errors
+					try {
+						// process the data (runs the xml through httpData regardless of callback)
+						data = jQuery.httpData( xhr, s.dataType, s );
+					} catch( parserError ) {
+						status = "parsererror";
+						errMsg = parserError;
+					}
+				}
+
+				// Make sure that the request was successful or notmodified
+				if ( status === "success" || status === "notmodified" ) {
+					// JSONP handles its own success callback
+					if ( !jsonp ) {
+						jQuery.handleSuccess( s, xhr, status, data );
+					}
+				} else {
+					jQuery.handleError( s, xhr, status, errMsg );
+				}
+
+				// Fire the complete handlers
+				if ( !jsonp ) {
+					jQuery.handleComplete( s, xhr, status, data );
+				}
+
+				if ( isTimeout === "timeout" ) {
+					xhr.abort();
+				}
+
+				// Stop memory leaks
+				if ( s.async ) {
+					xhr = null;
+				}
+			}
+		};
+
+		// Override the abort handler, if we can (IE 6 doesn't allow it, but that's OK)
+		// Opera doesn't fire onreadystatechange at all on abort
+		try {
+			var oldAbort = xhr.abort;
+			xhr.abort = function() {
+				if ( xhr ) {
+					// oldAbort has no call property in IE7 so
+					// just do it this way, which works in all
+					// browsers
+					Function.prototype.call.call( oldAbort, xhr );
+				}
+
+				onreadystatechange( "abort" );
+			};
+		} catch( abortError ) {}
+
+		// Timeout checker
+		if ( s.async && s.timeout > 0 ) {
+			setTimeout(function() {
+				// Check to see if the request is still happening
+				if ( xhr && !requestDone ) {
+					onreadystatechange( "timeout" );
+				}
+			}, s.timeout);
+		}
+
+		// Send the data
+		try {
+			xhr.send( noContent || s.data == null ? null : s.data );
+
+		} catch( sendError ) {
+			jQuery.handleError( s, xhr, null, sendError );
+
+			// Fire the complete handlers
+			jQuery.handleComplete( s, xhr, status, data );
+		}
+
+		// firefox 1.5 doesn't fire statechange for sync requests
+		if ( !s.async ) {
+			onreadystatechange();
+		}
+
+		// return XMLHttpRequest to allow aborting the request etc.
+		return xhr;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a, traditional ) {
+		var s = [],
+			add = function( key, value ) {
+				// If value is a function, invoke it and return its value
+				value = jQuery.isFunction(value) ? value() : value;
+				s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
+			};
+		
+		// Set traditional to true for jQuery <= 1.3.2 behavior.
+		if ( traditional === undefined ) {
+			traditional = jQuery.ajaxSettings.traditional;
+		}
+		
+		// If an array was passed in, assume that it is an array of form elements.
+		if ( jQuery.isArray(a) || a.jquery ) {
+			// Serialize the form elements
+			jQuery.each( a, function() {
+				add( this.name, this.value );
+			});
+			
+		} else {
+			// If traditional, encode the "old" way (the way 1.3.2 or older
+			// did it), otherwise encode params recursively.
+			for ( var prefix in a ) {
+				buildParams( prefix, a[prefix], traditional, add );
+			}
+		}
+
+		// Return the resulting serialization
+		return s.join("&").replace(r20, "+");
+	}
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+	if ( jQuery.isArray(obj) && obj.length ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// If array item is non-scalar (array or object), encode its
+				// numeric index to resolve deserialization ambiguity issues.
+				// Note that rack (as of 1.0.0) can't currently deserialize
+				// nested arrays properly, and attempting to do so may cause
+				// a server error. Possible fixes are to modify rack's
+				// deserialization algorithm or to provide an option or flag
+				// to force array serialization to be shallow.
+				buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+			
+	} else if ( !traditional && obj != null && typeof obj === "object" ) {
+		if ( jQuery.isEmptyObject( obj ) ) {
+			add( prefix, "" );
+
+		// Serialize object item.
+		} else {
+			jQuery.each( obj, function( k, v ) {
+				buildParams( prefix + "[" + k + "]", v, traditional, add );
+			});
+		}
+					
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {},
+
+	handleError: function( s, xhr, status, e ) {
+		// If a local callback was specified, fire it
+		if ( s.error ) {
+			s.error.call( s.context, xhr, status, e );
+		}
+
+		// Fire the global callback
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxError", [xhr, s, e] );
+		}
+	},
+
+	handleSuccess: function( s, xhr, status, data ) {
+		// If a local callback was specified, fire it and pass it the data
+		if ( s.success ) {
+			s.success.call( s.context, data, status, xhr );
+		}
+
+		// Fire the global callback
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s] );
+		}
+	},
+
+	handleComplete: function( s, xhr, status ) {
+		// Process result
+		if ( s.complete ) {
+			s.complete.call( s.context, xhr, status );
+		}
+
+		// The request was completed
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxComplete", [xhr, s] );
+		}
+
+		// Handle the global AJAX counter
+		if ( s.global && jQuery.active-- === 1 ) {
+			jQuery.event.trigger( "ajaxStop" );
+		}
+	},
+		
+	triggerGlobal: function( s, type, args ) {
+		(s.context && s.context.url == null ? jQuery(s.context) : jQuery.event).trigger(type, args);
+	},
+
+	// Determines if an XMLHttpRequest was successful or not
+	httpSuccess: function( xhr ) {
+		try {
+			// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
+			return !xhr.status && location.protocol === "file:" ||
+				xhr.status >= 200 && xhr.status < 300 ||
+				xhr.status === 304 || xhr.status === 1223;
+		} catch(e) {}
+
+		return false;
+	},
+
+	// Determines if an XMLHttpRequest returns NotModified
+	httpNotModified: function( xhr, url ) {
+		var lastModified = xhr.getResponseHeader("Last-Modified"),
+			etag = xhr.getResponseHeader("Etag");
+
+		if ( lastModified ) {
+			jQuery.lastModified[url] = lastModified;
+		}
+
+		if ( etag ) {
+			jQuery.etag[url] = etag;
+		}
+
+		return xhr.status === 304;
+	},
+
+	httpData: function( xhr, type, s ) {
+		var ct = xhr.getResponseHeader("content-type") || "",
+			xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
+			data = xml ? xhr.responseXML : xhr.responseText;
+
+		if ( xml && data.documentElement.nodeName === "parsererror" ) {
+			jQuery.error( "parsererror" );
+		}
+
+		// Allow a pre-filtering function to sanitize the response
+		// s is checked to keep backwards compatibility
+		if ( s && s.dataFilter ) {
+			data = s.dataFilter( data, type );
+		}
+
+		// The filter can actually parse the response
+		if ( typeof data === "string" ) {
+			// Get the JavaScript object, if JSON is used.
+			if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
+				data = jQuery.parseJSON( data );
+
+			// If the type is "script", eval it in global context
+			} else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
+				jQuery.globalEval( data );
+			}
+		}
+
+		return data;
+	}
+
+});
+
+/*
+ * Create the request object; Microsoft failed to properly
+ * implement the XMLHttpRequest in IE7 (can't request local files),
+ * so we use the ActiveXObject when it is available
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+if ( window.ActiveXObject ) {
+	jQuery.ajaxSettings.xhr = function() {
+		if ( window.location.protocol !== "file:" ) {
+			try {
+				return new window.XMLHttpRequest();
+			} catch(xhrError) {}
+		}
+
+		try {
+			return new window.ActiveXObject("Microsoft.XMLHTTP");
+		} catch(activeError) {}
+	};
+}
+
+// Does this browser support XHR requests?
+jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
+
+
+
+
+var elemdisplay = {},
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
+	timerId,
+	fxAttrs = [
+		// height animations
+		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+		// width animations
+		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+		// opacity animations
+		[ "opacity" ]
+	];
+
+jQuery.fn.extend({
+	show: function( speed, easing, callback ) {
+		var elem, display;
+
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("show", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				elem = this[i];
+				display = elem.style.display;
+
+				// Reset the inline display of this element to learn if it is
+				// being hidden by cascaded rules or not
+				if ( !jQuery.data(elem, "olddisplay") && display === "none" ) {
+					display = elem.style.display = "";
+				}
+
+				// Set elements which have been overridden with display: none
+				// in a stylesheet to whatever the default browser style is
+				// for such an element
+				if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+					jQuery.data(elem, "olddisplay", defaultDisplay(elem.nodeName));
+				}
+			}
+
+			// Set the display of most of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				elem = this[i];
+				display = elem.style.display;
+
+				if ( display === "" || display === "none" ) {
+					elem.style.display = jQuery.data(elem, "olddisplay") || "";
+				}
+			}
+
+			return this;
+		}
+	},
+
+	hide: function( speed, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("hide", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				var display = jQuery.css( this[i], "display" );
+
+				if ( display !== "none" ) {
+					jQuery.data( this[i], "olddisplay", display );
+				}
+			}
+
+			// Set the display of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				this[i].style.display = "none";
+			}
+
+			return this;
+		}
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2, callback ) {
+		var bool = typeof fn === "boolean";
+
+		if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+			this._toggle.apply( this, arguments );
+
+		} else if ( fn == null || bool ) {
+			this.each(function() {
+				var state = bool ? fn : jQuery(this).is(":hidden");
+				jQuery(this)[ state ? "show" : "hide" ]();
+			});
+
+		} else {
+			this.animate(genFx("toggle", 3), fn, fn2, callback);
+		}
+
+		return this;
+	},
+
+	fadeTo: function( speed, to, easing, callback ) {
+		return this.filter(":hidden").css("opacity", 0).show().end()
+					.animate({opacity: to}, speed, easing, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed(speed, easing, callback);
+
+		if ( jQuery.isEmptyObject( prop ) ) {
+			return this.each( optall.complete );
+		}
+
+		return this[ optall.queue === false ? "each" : "queue" ](function() {
+			// XXX 'this' does not always have a nodeName when running the
+			// test suite
+
+			var opt = jQuery.extend({}, optall), p,
+				isElement = this.nodeType === 1,
+				hidden = isElement && jQuery(this).is(":hidden"),
+				self = this;
+
+			for ( p in prop ) {
+				var name = jQuery.camelCase( p );
+
+				if ( p !== name ) {
+					prop[ name ] = prop[ p ];
+					delete prop[ p ];
+					p = name;
+				}
+
+				if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
+					return opt.complete.call(this);
+				}
+
+				if ( isElement && ( p === "height" || p === "width" ) ) {
+					// Make sure that nothing sneaks out
+					// Record all 3 overflow attributes because IE does not
+					// change the overflow attribute when overflowX and
+					// overflowY are set to the same value
+					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+					// Set display property to inline-block for height/width
+					// animations on inline elements that are having width/height
+					// animated
+					if ( jQuery.css( this, "display" ) === "inline" &&
+							jQuery.css( this, "float" ) === "none" ) {
+						if ( !jQuery.support.inlineBlockNeedsLayout ) {
+							this.style.display = "inline-block";
+
+						} else {
+							var display = defaultDisplay(this.nodeName);
+
+							// inline-level elements accept inline-block;
+							// block-level elements need to be inline with layout
+							if ( display === "inline" ) {
+								this.style.display = "inline-block";
+
+							} else {
+								this.style.display = "inline";
+								this.style.zoom = 1;
+							}
+						}
+					}
+				}
+
+				if ( jQuery.isArray( prop[p] ) ) {
+					// Create (if needed) and add to specialEasing
+					(opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
+					prop[p] = prop[p][0];
+				}
+			}
+
+			if ( opt.overflow != null ) {
+				this.style.overflow = "hidden";
+			}
+
+			opt.curAnim = jQuery.extend({}, prop);
+
+			jQuery.each( prop, function( name, val ) {
+				var e = new jQuery.fx( self, opt, name );
+
+				if ( rfxtypes.test(val) ) {
+					e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
+
+				} else {
+					var parts = rfxnum.exec(val),
+						start = e.cur() || 0;
+
+					if ( parts ) {
+						var end = parseFloat( parts[2] ),
+							unit = parts[3] || "px";
+
+						// We need to compute starting value
+						if ( unit !== "px" ) {
+							jQuery.style( self, name, (end || 1) + unit);
+							start = ((end || 1) / e.cur()) * start;
+							jQuery.style( self, name, start + unit);
+						}
+
+						// If a +=/-= token was provided, we're doing a relative animation
+						if ( parts[1] ) {
+							end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
+						}
+
+						e.custom( start, end, unit );
+
+					} else {
+						e.custom( start, val, "" );
+					}
+				}
+			});
+
+			// For JS strict compliance
+			return true;
+		});
+	},
+
+	stop: function( clearQueue, gotoEnd ) {
+		var timers = jQuery.timers;
+
+		if ( clearQueue ) {
+			this.queue([]);
+		}
+
+		this.each(function() {
+			// go in reverse order so anything added to the queue during the loop is ignored
+			for ( var i = timers.length - 1; i >= 0; i-- ) {
+				if ( timers[i].elem === this ) {
+					if (gotoEnd) {
+						// force the next step to be the last
+						timers[i](true);
+					}
+
+					timers.splice(i, 1);
+				}
+			}
+		});
+
+		// start the next in the queue if the last step wasn't forced
+		if ( !gotoEnd ) {
+			this.dequeue();
+		}
+
+		return this;
+	}
+
+});
+
+function genFx( type, num ) {
+	var obj = {};
+
+	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+		obj[ this ] = type;
+	});
+
+	return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx("show", 1),
+	slideUp: genFx("hide", 1),
+	slideToggle: genFx("toggle", 1),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.extend({
+	speed: function( speed, easing, fn ) {
+		var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
+			complete: fn || !fn && easing ||
+				jQuery.isFunction( speed ) && speed,
+			duration: speed,
+			easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
+		};
+
+		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+			opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
+
+		// Queueing
+		opt.old = opt.complete;
+		opt.complete = function() {
+			if ( opt.queue !== false ) {
+				jQuery(this).dequeue();
+			}
+			if ( jQuery.isFunction( opt.old ) ) {
+				opt.old.call( this );
+			}
+		};
+
+		return opt;
+	},
+
+	easing: {
+		linear: function( p, n, firstNum, diff ) {
+			return firstNum + diff * p;
+		},
+		swing: function( p, n, firstNum, diff ) {
+			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
+		}
+	},
+
+	timers: [],
+
+	fx: function( elem, options, prop ) {
+		this.options = options;
+		this.elem = elem;
+		this.prop = prop;
+
+		if ( !options.orig ) {
+			options.orig = {};
+		}
+	}
+
+});
+
+jQuery.fx.prototype = {
+	// Simple function for setting a style value
+	update: function() {
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
+	},
+
+	// Get the current size
+	cur: function() {
+		if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
+			return this.elem[ this.prop ];
+		}
+
+		var r = parseFloat( jQuery.css( this.elem, this.prop ) );
+		return r && r > -10000 ? r : 0;
+	},
+
+	// Start an animation from one number to another
+	custom: function( from, to, unit ) {
+		var self = this,
+			fx = jQuery.fx;
+
+		this.startTime = jQuery.now();
+		this.start = from;
+		this.end = to;
+		this.unit = unit || this.unit || "px";
+		this.now = this.start;
+		this.pos = this.state = 0;
+
+		function t( gotoEnd ) {
+			return self.step(gotoEnd);
+		}
+
+		t.elem = this.elem;
+
+		if ( t() && jQuery.timers.push(t) && !timerId ) {
+			timerId = setInterval(fx.tick, fx.interval);
+		}
+	},
+
+	// Simple 'show' function
+	show: function() {
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+		this.options.show = true;
+
+		// Begin the animation
+		// Make sure that we start at a small width/height to avoid any
+		// flash of content
+		this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
+
+		// Start by showing the element
+		jQuery( this.elem ).show();
+	},
+
+	// Simple 'hide' function
+	hide: function() {
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+		this.options.hide = true;
+
+		// Begin the animation
+		this.custom(this.cur(), 0);
+	},
+
+	// Each step of an animation
+	step: function( gotoEnd ) {
+		var t = jQuery.now(), done = true;
+
+		if ( gotoEnd || t >= this.options.duration + this.startTime ) {
+			this.now = this.end;
+			this.pos = this.state = 1;
+			this.update();
+
+			this.options.curAnim[ this.prop ] = true;
+
+			for ( var i in this.options.curAnim ) {
+				if ( this.options.curAnim[i] !== true ) {
+					done = false;
+				}
+			}
+
+			if ( done ) {
+				// Reset the overflow
+				if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+					var elem = this.elem,
+						options = this.options;
+
+					jQuery.each( [ "", "X", "Y" ], function (index, value) {
+						elem.style[ "overflow" + value ] = options.overflow[index];
+					} );
+				}
+
+				// Hide the element if the "hide" operation was done
+				if ( this.options.hide ) {
+					jQuery(this.elem).hide();
+				}
+
+				// Reset the properties, if the item has been hidden or shown
+				if ( this.options.hide || this.options.show ) {
+					for ( var p in this.options.curAnim ) {
+						jQuery.style( this.elem, p, this.options.orig[p] );
+					}
+				}
+
+				// Execute the complete function
+				this.options.complete.call( this.elem );
+			}
+
+			return false;
+
+		} else {
+			var n = t - this.startTime;
+			this.state = n / this.options.duration;
+
+			// Perform the easing function, defaults to swing
+			var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];
+			var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear");
+			this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
+			this.now = this.start + ((this.end - this.start) * this.pos);
+
+			// Perform the next step of the animation
+			this.update();
+		}
+
+		return true;
+	}
+};
+
+jQuery.extend( jQuery.fx, {
+	tick: function() {
+		var timers = jQuery.timers;
+
+		for ( var i = 0; i < timers.length; i++ ) {
+			if ( !timers[i]() ) {
+				timers.splice(i--, 1);
+			}
+		}
+
+		if ( !timers.length ) {
+			jQuery.fx.stop();
+		}
+	},
+
+	interval: 13,
+
+	stop: function() {
+		clearInterval( timerId );
+		timerId = null;
+	},
+
+	speeds: {
+		slow: 600,
+		fast: 200,
+		// Default speed
+		_default: 400
+	},
+
+	step: {
+		opacity: function( fx ) {
+			jQuery.style( fx.elem, "opacity", fx.now );
+		},
+
+		_default: function( fx ) {
+			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+				fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
+			} else {
+				fx.elem[ fx.prop ] = fx.now;
+			}
+		}
+	}
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+
+function defaultDisplay( nodeName ) {
+	if ( !elemdisplay[ nodeName ] ) {
+		var elem = jQuery("<" + nodeName + ">").appendTo("body"),
+			display = elem.css("display");
+
+		elem.remove();
+
+		if ( display === "none" || display === "" ) {
+			display = "block";
+		}
+
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0], box;
+
+		if ( options ) { 
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		var doc = elem.ownerDocument,
+			docElem = doc.documentElement;
+
+		// Make sure we're not dealing with a disconnected DOM node
+		if ( !box || !jQuery.contains( docElem, elem ) ) {
+			return box || { top: 0, left: 0 };
+		}
+
+		var body = doc.body,
+			win = getWindow(doc),
+			clientTop  = docElem.clientTop  || body.clientTop  || 0,
+			clientLeft = docElem.clientLeft || body.clientLeft || 0,
+			scrollTop  = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ),
+			scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
+			top  = box.top  + scrollTop  - clientTop,
+			left = box.left + scrollLeft - clientLeft;
+
+		return { top: top, left: left };
+	};
+
+} else {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0];
+
+		if ( options ) { 
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		jQuery.offset.initialize();
+
+		var computedStyle,
+			offsetParent = elem.offsetParent,
+			prevOffsetParent = elem,
+			doc = elem.ownerDocument,
+			docElem = doc.documentElement,
+			body = doc.body,
+			defaultView = doc.defaultView,
+			prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+			top = elem.offsetTop,
+			left = elem.offsetLeft;
+
+		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+			if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+				break;
+			}
+
+			computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+			top  -= elem.scrollTop;
+			left -= elem.scrollLeft;
+
+			if ( elem === offsetParent ) {
+				top  += elem.offsetTop;
+				left += elem.offsetLeft;
+
+				if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+					top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+					left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+				}
+
+				prevOffsetParent = offsetParent;
+				offsetParent = elem.offsetParent;
+			}
+
+			if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+				top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+				left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+			}
+
+			prevComputedStyle = computedStyle;
+		}
+
+		if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+			top  += body.offsetTop;
+			left += body.offsetLeft;
+		}
+
+		if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+			top  += Math.max( docElem.scrollTop, body.scrollTop );
+			left += Math.max( docElem.scrollLeft, body.scrollLeft );
+		}
+
+		return { top: top, left: left };
+	};
+}
+
+jQuery.offset = {
+	initialize: function() {
+		var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
+			html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+
+		jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
+
+		container.innerHTML = html;
+		body.insertBefore( container, body.firstChild );
+		innerDiv = container.firstChild;
+		checkDiv = innerDiv.firstChild;
+		td = innerDiv.nextSibling.firstChild.firstChild;
+
+		this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
+		this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
+
+		checkDiv.style.position = "fixed";
+		checkDiv.style.top = "20px";
+
+		// safari subtracts parent border width here which is 5px
+		this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
+		checkDiv.style.position = checkDiv.style.top = "";
+
+		innerDiv.style.overflow = "hidden";
+		innerDiv.style.position = "relative";
+
+		this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
+
+		this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
+
+		body.removeChild( container );
+		body = container = innerDiv = checkDiv = table = td = null;
+		jQuery.offset.initialize = jQuery.noop;
+	},
+
+	bodyOffset: function( body ) {
+		var top = body.offsetTop,
+			left = body.offsetLeft;
+
+		jQuery.offset.initialize();
+
+		if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
+			top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+		}
+
+		return { top: top, left: left };
+	},
+	
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1),
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is absolute
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+		}
+
+		curTop  = calculatePosition ? curPosition.top  : parseInt( curCSSTop,  10 ) || 0;
+		curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if (options.top != null) {
+			props.top = (options.top - curOffset.top) + curTop;
+		}
+		if (options.left != null) {
+			props.left = (options.left - curOffset.left) + curLeft;
+		}
+		
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+	position: function() {
+		if ( !this[0] ) {
+			return null;
+		}
+
+		var elem = this[0],
+
+		// Get *real* offsetParent
+		offsetParent = this.offsetParent(),
+
+		// Get correct offsets
+		offset       = this.offset(),
+		parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+		// Subtract element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+		// Add offsetParent borders
+		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+		// Subtract the two offsets
+		return {
+			top:  offset.top  - parentOffset.top,
+			left: offset.left - parentOffset.left
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || document.body;
+			while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+	var method = "scroll" + name;
+
+	jQuery.fn[ method ] = function(val) {
+		var elem = this[0], win;
+		
+		if ( !elem ) {
+			return null;
+		}
+
+		if ( val !== undefined ) {
+			// Set the scroll offset
+			return this.each(function() {
+				win = getWindow( this );
+
+				if ( win ) {
+					win.scrollTo(
+						!i ? val : jQuery(win).scrollLeft(),
+						 i ? val : jQuery(win).scrollTop()
+					);
+
+				} else {
+					this[ method ] = val;
+				}
+			});
+		} else {
+			win = getWindow( elem );
+
+			// Return the scroll offset
+			return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+				jQuery.support.boxModel && win.document.documentElement[ method ] ||
+					win.document.body[ method ] :
+				elem[ method ];
+		}
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+
+
+
+
+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+	var type = name.toLowerCase();
+
+	// innerHeight and innerWidth
+	jQuery.fn["inner" + name] = function() {
+		return this[0] ?
+			parseFloat( jQuery.css( this[0], type, "padding" ) ) :
+			null;
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn["outer" + name] = function( margin ) {
+		return this[0] ?
+			parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
+			null;
+	};
+
+	jQuery.fn[ type ] = function( size ) {
+		// Get window width or height
+		var elem = this[0];
+		if ( !elem ) {
+			return size == null ? null : this;
+		}
+		
+		if ( jQuery.isFunction( size ) ) {
+			return this.each(function( i ) {
+				var self = jQuery( this );
+				self[ type ]( size.call( this, i, self[ type ]() ) );
+			});
+		}
+
+		if ( jQuery.isWindow( elem ) ) {
+			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+			return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
+				elem.document.body[ "client" + name ];
+
+		// Get document width or height
+		} else if ( elem.nodeType === 9 ) {
+			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+			return Math.max(
+				elem.documentElement["client" + name],
+				elem.body["scroll" + name], elem.documentElement["scroll" + name],
+				elem.body["offset" + name], elem.documentElement["offset" + name]
+			);
+
+		// Get or set width or height on the element
+		} else if ( size === undefined ) {
+			var orig = jQuery.css( elem, type ),
+				ret = parseFloat( orig );
+
+			return jQuery.isNaN( ret ) ? orig : ret;
+
+		// Set the width or height on the element (default to pixels if value is unitless)
+		} else {
+			return this.css( type, typeof size === "string" ? size : size + "px" );
+		}
+	};
+
+});
+
+
+})(window);
diff --git a/binsrc/rdf_mappers/sponger_front_page/linkedin_access_token.vsp b/binsrc/rdf_mappers/sponger_front_page/linkedin_access_token.vsp
new file mode 100644
index 0000000..c7168f4
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/linkedin_access_token.vsp
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+  <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+  <?vsp if (fp_favicon <> 0) { ?>
+  <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+  <?vsp } ?>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <title><?=fp_title?> - LinkedIn Binding</title>
+<?vsp
+  declare li_app_name, li_app_secret, oauth_redirect_url, li_login_dialog_url varchar;
+  declare li_user_id, li_user_first_name, li_user_last_name, li_user_public_profile_url varchar;
+  declare request_token, request_token_secret, oauth_verifier varchar;
+  declare consumer_key, consumer_secret varchar;
+  declare linkedin_api_host, access_token_path varchar;
+  declare oauth_token, oauth_token_secret, oauth_expires_in, oauth_authorization_expires_in, oauth_problem varchar;
+  declare oauth_token_expiry int;
+  declare rm_options any;
+  declare _host, required_profile_fields varchar;
+
+  linkedin_api_host := 'https://api.linkedin.com';
+  access_token_path := '/uas/oauth/accessToken';
+
+  consumer_key := null;
+  consumer_secret := null;
+  li_app_name := null;
+  oauth_token := null;
+  oauth_problem := null;
+
+  rm_options := (select RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_LINKEDIN');
+  if (rm_options is not null)
+  {
+    consumer_key := get_keyword ('consumer_key', rm_options);
+    consumer_secret := get_keyword ('consumer_secret', rm_options);
+    li_app_name := get_keyword ('consumer_name', rm_options);
+
+    -- ISSUE: 
+    -- Is there a way to retrieve the application name from LinkedIn, given the API key
+    -- instead of it having to be configured in the cartridge options?
+  }
+
+  if (consumer_key is null or consumer_secret is null)
+    goto cartridge_options_err;
+
+  _host := registry_get ('URIQADefaultHost');
+  if (is_http_ctx ()) _host := http_request_header(http_request_header (), 'Host', null, _host);
+
+  -- TO DO: 
+  -- oauth_redirect_url isn't used. It's configured instead in the LinkedIn application details via the LinkedIn Developer UI
+  if (_host is not null)
+  {
+    li_app_name := coalesce (li_app_name, sprintf ('Sponger (%s)', _host));
+    oauth_redirect_url := sprintf('http://%s/linkedin_oauth/', _host);
+  }
+
+   -- Returned request token matches the one used to make the request
+  request_token := cast (http_param ('oauth_token') as varchar);
+  oauth_verifier := cast (http_param ('oauth_verifier') as varchar);
+  oauth_problem := cast (http_param ('oauth_problem') as varchar);
+
+  if (oauth_problem <> '0')
+  {
+    -- ISSUE: When an OAuth problem occurs, the request_token used for the request is not returned
+    -- delete from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = request_token;
+    -- commit work;
+    ;
+  }
+  else if (oauth_verifier = '0')
+  {
+    -- Authorization hasn't yet been requested
+    -- Re-direct to LinkedIn OAuth server, ask the user to authorize Sponger access to their LinkedIn profile
+    li_login_dialog_url := DB.DBA.RDF_LOAD_LINKEDIN_REQUEST_ACCESS_TOKEN (consumer_key, consumer_secret);
+    http ('<script>');
+    http (sprintf ('top.location.href=\'%s\';', li_login_dialog_url));
+    http ('</script>');
+  }
+  else
+  {
+    -- Process the user response to our request for authorization
+    declare url, api_url, response, response_params any;
+    declare oauth_params varchar;
+    declare li_tree any;
+
+    -- Retrieve request_token_secret returned in response to request-token request
+    request_token_secret := (select OAUTH_REQ_SECRET from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = request_token);
+    oauth_params := sprintf ('oauth_token=%U&oauth_verifier=%U', request_token, oauth_verifier);
+
+    delete from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = request_token;
+    commit work;
+
+    -- Exchange the request token for an access token
+    url := DB.DBA.sign_request ('GET', linkedin_api_host || access_token_path, oauth_params, consumer_key, consumer_secret, request_token, request_token_secret, 1);
+    response := http_get (url);
+    response_params := split_and_decode (response);
+    oauth_token := get_keyword ('oauth_token', response_params);
+    oauth_token_secret := get_keyword ('oauth_token_secret', response_params);
+    oauth_expires_in := get_keyword ('oauth_expires_in', response_params);
+    oauth_authorization_expires_in := get_keyword ('oauth_authorization_expires_in', response_params);
+    -- oauth_authorization_expires_in is not currently saved/used. It appears to always match oauth_expires_in.
+
+    if (oauth_token is not null)
+    {
+      oauth_token_expiry := null;
+      if (oauth_expires_in is not null)
+      {
+        oauth_token_expiry := atoi (oauth_expires_in);
+        if (oauth_token_expiry = 0)
+          oauth_token_expiry := null;
+      }
+
+      -- Get some minimal details of the LinkedIn user granting access to their profile
+      required_profile_fields := 'id,public-profile-url,first-name,last-name';
+      api_url := sprintf ('https://api.linkedin.com/v1/people/~:(%s)', required_profile_fields);
+      url := DB.DBA.sign_request ('GET', api_url, '', consumer_key, consumer_secret, oauth_token, oauth_token_secret, 1);
+      response := http_get (url);
+      li_tree := xtree_doc (response);
+      li_user_id := cast (xpath_eval('/person/id', li_tree) as varchar);
+      li_user_first_name := cast (xpath_eval('/person/first-name', li_tree) as varchar);
+      li_user_last_name := cast (xpath_eval('/person/last-name', li_tree) as varchar);
+      li_user_public_profile_url := cast (xpath_eval('/person/public-profile-url', li_tree) as varchar);
+
+      DB.DBA.LINKEDIN_SAVE_ACCESS_TOKEN (li_user_id, li_user_first_name || ' ' || li_user_last_name, li_user_public_profile_url, NULL, NULL, 
+        oauth_token, oauth_token_secret, oauth_token_expiry);
+    }
+  }
+cartridge_options_err:
+ ;
+?>
+</head>
+<body onload="page_load_hndlr()">
+<div id="outer">
+  <div id="header">
+    <div id="header_logo">
+      <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+         title="OpenLink Software" alt="[OpenLink Software logo]"
+         src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+    </div>
+    <div id="header_text">
+      <?vsp if (banner_logo <> 0) { ?>
+        <img id="banner_logo" alt="[Sponger instance logo]"
+             src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+      <?vsp } else { ?>
+        <h1><?=banner_txt?></h1>
+      <?vsp } ?>
+      <?=strapline?>
+    </div>
+  </div>
+
+  <div id="navbar">
+    <a href="index.vsp">Home</a> | 
+    <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+    <a href="sponger_architecture.vsp">Architecture</a> | 
+    <a href="sponger_setup.vsp">Sponger Setup</a> | 
+    <a href="examples.vsp">Live Sponger Examples</a> | 
+    <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a>  |
+    <a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+  </div>
+
+  <div id="content">
+    <div class="topic-text">
+      <div id="lmargin">
+        <div id="token_confirmation">
+          <h2>Sponger-LinkedIn Binding</h2>
+	        <h3>Access Token Generation</h3>
+
+<?vsp 
+  if (oauth_token is null)
+  {
+    http ('<div class="error">');
+    if (oauth_problem <> '0')
+    {
+      if (oauth_problem = 'user_refused')
+        http ('<p>Authorization to access your LinkedIn profile was refused. An OAuth access token could not be granted.</p>');
+      else
+        http ('<p>An error occurred. An OAuth access token could not be granted.</p>');
+      http (sprintf ('<p>OAuth error: %s</p>', oauth_problem));
+    }
+    else
+    {
+      if (consumer_key is null or consumer_secret is null)
+        http ('<p>The LinkedIn cartridge is not configured correctly.');
+      if (consumer_key is null)
+        http ('<p>The API Key for the LinkedIn application associated with this host could not be determined. 
+                  Please ensure the LinkedIn cartridge options include an entry like consumer_key=Bb1Fia-1i...</p>'); 
+      if (consumer_secret is null)
+        http ('<p>The Secret Key for the LinkedIn application associated with this host could not be determined. 
+                  Please ensure the LinkedIn cartridge options include an entry like consumer_secret=WqeW7p5L...</p>'); 
+    }
+    http ('</div>');
+  }
+  else
+  {
+    declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+    declare profile_proxy_url varchar;
+
+    profile_proxy_url := replace (li_user_public_profile_url, 'http://', 'http/');
+    about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/%s?sponger:get=add&refresh=0', _host, _host, profile_proxy_url);
+    entity_uri := sprintf ('http://%s/about/id/entity/%s', _host, profile_proxy_url);
+    describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+?>
+
+    <p>An OAuth access token has been generated. The Linked Data Generator hosted by application <em><?=li_app_name ?></em> now has access to your LinkedIn-hosted Data Space.</p>
+    <!-- 
+    <p><?vsp http (oauth_token); ?></p>
+    <?vsp if (oauth_token_expiry is not null) { ?>
+      <p>This token expires in <?vsp http (sprintf('%d', oauth_token_expiry)); ?> seconds.</p>
+    <?vsp } else { ?>
+      <p>This is a non-expiring token.</p>
+    <?vsp } ?>
+    -->
+	  <h3>View Your LinkedIn Linked Data Space</h3>
+      <p>Here are a variety of Linked Data oriented views derived from your LinkedIn profile:</p> 
+      <ul>
+        <li>
+          <a href="<?=about_sponge_uri?>">
+              <?vsp http (li_user_first_name || ' ' || li_user_last_name || ' (LinkedIn ID: ' || li_user_id || ')'); ?>
+          </a><br/>A simple page for follow-your-nose exploration
+        </li>
+        <li>
+          <a href="<?=describe_sponge_uri?>">
+              <?vsp http (li_user_first_name || ' ' || li_user_last_name || ' (LinkedIn ID: ' || li_user_id || ')'); ?>
+          </a><br/>A powerful faceted navigation and exploration page
+        </li>
+      </ul>
+      <h3>Revoking Your Access Token</h3>
+      <p>
+      You have authorised the Sponger to interact with your LinkedIn account. You can revoke access to your profile at any time by removing this application 
+      (<em><?=li_app_name ?></em>) from the list of authorised applications shown in your LinkedIn profile. To remove an application, 
+      <a href="https://www.linkedin.com/settings">access your LinkedIn settings</a>, follow the <strong>View your applications</strong> 
+      link under the heading <strong>Groups, Companies & Applications</strong>, then select the external partner website you wish to deny access to.
+      </p> 
+<?vsp 
+  } 
+?>
+
+        </div><!-- token confirmation-->
+      </div><!-- lmargin -->
+
+      <div id="rmargin">
+        <h2>Other OpenLink Tools & Services</h2>
+        <div>
+          <ul>
+            <li><a href="http://linkeddata.uriburner.com/">URIBurner.com</a>
+                <br/>A service that delivers RDF-based structured descriptions of Web addressable resources (documents or real world objects)</li>
+            <li><a href="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</a>
+                <br/>A browser extension for viewing Linked Data Sources</li>
+            <li><a href="http://oat.openlinksw.com/">OpenLink AJAX Toolkit (OAT)</a>
+                <br/>A JavaScript-based toolkit for browser-independent Rich Internet Application development</li>
+          </ul>
+        </div>
+      </div> <!--rmargin -->
+
+    </div><!-- topic-text -->
+  </div><!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+</div><!-- outer -->
+</body>
+</html>
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/cartridge_config.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/cartridge_config.jpg
new file mode 100644
index 0000000..dc3f747
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/cartridge_config.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/delicious.png b/binsrc/rdf_mappers/sponger_front_page/skin/i/delicious.png
new file mode 100644
index 0000000..e87804a
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/delicious.png differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/facebook_icon.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/facebook_icon.jpg
new file mode 100644
index 0000000..2230e18
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/facebook_icon.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/flickr.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/flickr.jpg
new file mode 100644
index 0000000..77c4c40
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/flickr.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/google.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/google.jpg
new file mode 100644
index 0000000..d9459fb
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/google.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/help_button.gif b/binsrc/rdf_mappers/sponger_front_page/skin/i/help_button.gif
new file mode 100644
index 0000000..5990c33
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/help_button.gif differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/linked_data_gen_opts3a.png b/binsrc/rdf_mappers/sponger_front_page/skin/i/linked_data_gen_opts3a.png
new file mode 100644
index 0000000..8643608
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/linked_data_gen_opts3a.png differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/linkeddata.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/linkeddata.jpg
new file mode 100644
index 0000000..1bb9e48
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/linkeddata.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/linkedin.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/linkedin.jpg
new file mode 100644
index 0000000..c6a1d15
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/linkedin.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/openlinklogo_wstrap_2008_100h.png b/binsrc/rdf_mappers/sponger_front_page/skin/i/openlinklogo_wstrap_2008_100h.png
new file mode 100644
index 0000000..a5fe60f
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/openlinklogo_wstrap_2008_100h.png differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/twitter.jpg b/binsrc/rdf_mappers/sponger_front_page/skin/i/twitter.jpg
new file mode 100644
index 0000000..0603345
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/twitter.jpg differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/webfinger.png b/binsrc/rdf_mappers/sponger_front_page/skin/i/webfinger.png
new file mode 100644
index 0000000..b81f079
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/webfinger.png differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/i/webid_icon.png b/binsrc/rdf_mappers/sponger_front_page/skin/i/webid_icon.png
new file mode 100644
index 0000000..516ee70
Binary files /dev/null and b/binsrc/rdf_mappers/sponger_front_page/skin/i/webid_icon.png differ
diff --git a/binsrc/rdf_mappers/sponger_front_page/skin/ss/sponger_frontpage.css b/binsrc/rdf_mappers/sponger_front_page/skin/ss/sponger_frontpage.css
new file mode 100644
index 0000000..5e402d8
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/skin/ss/sponger_frontpage.css
@@ -0,0 +1,293 @@
+body {
+    background-color: #f2f2f2;
+    font-size: 0.9em;
+    font-family: verdana, sans, sans-serif;
+    padding: 0; margin: 0;
+    padding-top: 0.5em;
+}
+
+#outer {
+    width: 90%;
+    margin-left: 5%;
+    margin-right: 5%;
+    border-left: solid 1px silver;
+    border-right: solid 1px silver;
+    border-top: silver;
+    border-bottom: none;
+    height: 100%;
+    background-color: white;
+    color: black;
+    padding: 0.5em;
+}
+
+#header {
+    background-color: white;
+    color: #246599;
+    margin-left: 10px;
+    margin-right: 10px;
+    padding-left: 10px;
+    border: none;
+    height: 100px;
+}
+
+#header_logo {
+    float: right;
+}
+
+#header_text {
+    float: left;
+    margin: 0;
+    padding: 0;
+}
+
+#header h1 {
+    color: #246599;
+    font-size: 150%;
+    font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
+    padding-top: 0.5em;
+    font-weight: 100;
+}
+
+#header h1 a {
+    color: inherit;
+}
+
+#header p {
+    margin: 0; padding: 0;
+}
+
+a {
+    text-decoration: none;
+    color: blue;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+pre {
+    border: solid 1px silver;
+    padding: 5px;
+    margin: 0;
+    background-color: #ddd;
+    font-size: 9pt;
+    font-family: courier, monospace, mono;
+}
+
+tt {
+    font-size: 9pt;
+    font-family: courier, monospace, mono;
+}
+
+#navbar {
+    margin-left: 10px;
+    margin-right: 10px;
+    padding: 10px;
+    height: 1.5em;
+    background-color: #28549b;
+    color: #d3d3d3;
+    font-size: 80%;
+    font-weight: bold;
+}
+
+#navbar a {
+    color: #d3d3d3;
+}
+
+#navbar a:hover {
+    color: white;
+}
+
+h2 {
+    font-size: 135%;
+    font-family: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
+    font-weight: 200;
+    text-decoration: none;
+    border-bottom: solid 1px #91acc7;
+    width: 60%;
+    margin-top: 1em;
+    color: #28549b;
+}
+
+h3 {
+    font-size: 115%;
+    font-family: verdana, sans, sans-serif;
+    font-weight: 800;
+    text-decoration: none;
+    border-bottom: none;
+    color: #555;
+    width: 80%;
+    margin-top: 1em;
+}
+
+h3 a {
+    color: #555;
+}
+
+h5 {
+    margin-bottom: 1em;
+}
+
+img {
+    border: none;
+}
+
+a { 
+    outline: none; 
+}
+
+#rmargin {
+    width: 37%;
+    float: right;
+    border-left: solid 1px #91acc7;
+    min-height: 35em;
+    padding: 1em;
+}
+
+#lmargin {
+    float: left;
+    width: 57%;
+    padding: 0.5em;
+}
+
+#lmargin_architect {
+    padding: 0.5em;
+}
+
+div.reset {
+    float: none;
+    clear: both;
+}
+
+#content {
+    padding: 1em;
+    font-size: 0.9em;
+    color: #333;
+}
+
+#footer {
+    width: 100%;
+    height: 2em;
+    margin-top: 1em;
+    margin-bottom: 0.5em;
+    padding-top: 0.5em;
+    padding-bottom: 0.5em;
+    background-color: #28549b;
+    color: white;
+    font-size: 90%;
+    text-align: center;
+}
+
+#social_network_binding ul li {
+    list-style: none;
+    margin: 5px;
+    display: inline;
+    padding: 0;
+}
+
+pre {
+    background-color: #f2f2f2;
+}
+
+#openlink_logo {
+    float: right;
+    margin-right: 1em;
+    margin-left: 1em;
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+#linked_data_logo {
+    float: right;
+    margin: 1em;
+    margin-top: 50px;
+}
+
+#span_virtuoso {
+    color: #6c6c6c; 
+    font-size: 80%;
+    font-weight: bold;
+}
+
+.span_starting_point {
+    color: #6c6c6c;
+    font-weight: bold;
+}
+
+#fb_ds_links_no_token {
+    display: none;
+}
+
+div.error {
+    color: red;
+}
+
+.collapsible_div_heading {
+    padding-left: 20px;
+    margin-bottom: 5px;
+}
+
+
+.collapsible {
+    background-color: #ddd;
+    padding: 10px;
+    margin-top: 0;
+    border: solid 1px silver;
+    -moz-border-radius: 15px;
+}
+
+img.img_centre {
+    border: 1px solid black;
+    display: block;
+    width: 80%;
+    margin-left: auto;
+    margin-right: auto;
+    padding: 15px;
+}
+
+#sponge_arch_toc_container {
+    margin: 60px 0 30px 30px;
+    padding: 5px;
+    width: 20%;
+    float: right;
+}
+
+#sponge_arch_toc table {
+    background-color: #f2f2f2;
+    border: solid 1px #91acc7;
+    padding: 0;
+}
+
+#sponge_arch_toc td {
+    padding: 5px 10px 5px 10px;
+}
+
+#sponge_arch_toc tr:hover {
+    background-color: #28549b;
+}
+
+#sponge_arch_toc a {
+    color: #28549b;
+}
+
+#sponge_arch_toc a:hover {
+    color: white;
+    text-decoration: none;
+}
+
+#cartridge_options {
+    border: solid 1px #888888;
+    border-spacing: 0;
+}
+#cartridge_options th {
+    color: white;
+    background-color: #999;
+    padding: 0 20px 0 20px;
+}
+
+#cartridge_options td {
+    border-right: solid 1px silver;
+    border-bottom: solid 1px silver;
+    padding: 2px 10px 2px 10px;
+    background-color: #f2f2f2;
+}
diff --git a/binsrc/rdf_mappers/sponger_front_page/sponge_flickr.vsp b/binsrc/rdf_mappers/sponger_front_page/sponge_flickr.vsp
new file mode 100644
index 0000000..b13d972
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/sponge_flickr.vsp
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+  <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+  <?vsp if (fp_favicon <> 0) { ?>
+  <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+  <?vsp } ?>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <title><?=fp_title?> - Sponge A Flickr Image</title>
+  <script type="text/javascript">
+    var el_item_id;
+    var el_about_sponge_uri;
+    var el_describe_sponge_uri;
+    var el_fb_ds_links_no_token;
+    var item_id = "";
+
+    function build_sponge_links (site_name, host, entity_uri)
+    {
+      var describe_href;
+
+      el_item_id = el_item_id || document.getElementById('fld_item_id');
+      el_about_sponge_uri = el_about_sponge_uri || document.getElementById('about_sponge_uri');
+      el_describe_sponge_uri = el_describe_sponge_uri || document.getElementById('describe_sponge_uri');
+      el_fb_ds_links_no_token = el_fb_ds_links_no_token || document.getElementById('fb_ds_links_no_token');
+
+      item_id = el_item_id.value;
+      // TO DO - Check the entered item ID is valid
+      if (item_id.length == 0)
+      {
+        alert ('Please enter a ' + site_name + ' image URI');
+        el_fb_ds_links_no_token.style.display = 'none';
+        return false;
+      }
+
+      switch (site_name)
+      {
+        case 'Flickr':
+          el_about_sponge_uri.href = el_about_sponge_uri.href.replace(/id\/entity\/.*sponger:get/, 'id/entity/' + item_id + '?sponger:get');
+          entity_uri = entity_uri.replace(/id\/entity\/.*/, 'id/entity/' + item_id);
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent(entity_uri) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+      }
+      el_about_sponge_uri.innerHTML = el_describe_sponge_uri.innerHTML = site_name + " image: " + item_id;
+      el_fb_ds_links_no_token.style.display = 'inline';
+
+      return false;
+    }
+  </script>
+<?vsp
+  declare _host varchar;
+  declare site_name varchar;
+  declare rm_hook varchar;
+  declare api_key_mandatory, api_key_missing integer;
+
+  site_name := http_param ('site');
+  _host := registry_get ('URIQADefaultHost');
+  if (is_http_ctx ()) _host := http_request_header(http_request_header (), 'Host', null, _host);
+
+  api_key_mandatory := 0;
+  api_key_missing := 0;
+  rm_hook := '';
+
+  if (site_name = 'Flickr')
+  {
+    api_key_mandatory := 1;
+    rm_hook := 'DB.DBA.RDF_LOAD_FLICKR_IMG';
+  }
+
+  if (api_key_mandatory)
+  {
+    declare rm_key varchar;
+    rm_key := (select RM_KEY from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = rm_hook);
+    if (rm_key is null)
+      api_key_missing := 0;
+  }
+?>
+</head>
+
+<body onload="page_load_hndlr()">
+<div id="outer">
+      <div id="header">
+        <div id="header_logo">
+          <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+             title="OpenLink Software" alt="[OpenLink Software logo]"
+             src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href= "sponger_architecture.vsp">Architecture</a> | 
+        <a href= "sponger_setup.vsp">Sponger Setup</a> | 
+        <a href= "examples.vsp">Live Sponger Examples</a> | 
+        <a href= "http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a>  |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="lmargin">
+            <div id="token_confirmation">
+
+              <h2>Sponge Your <?=site_name?> Profile</h2>
+
+<?vsp 
+  declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+  declare item_id varchar;
+
+  item_id := 'UNKNOWN_ITEM_ID';
+  about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/%s?sponger:get=add&refresh=0', _host, _host, item_id);
+  entity_uri := sprintf ('http://%s/about/id/entity/%s', _host, item_id);
+  --describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+  describe_sponge_uri := sprintf ('http://%s/describe/?url=%s&sponger:get=add&sr=0', _host, entity_uri);
+  ?>
+
+<?vsp
+  if (api_key_missing)
+  {
+    http (sprintf ('<p>An API key is required for the %s cartridge, but one hasn\'t been configured.<br/>Please refer to <a href="sponger_setup.vsp">Sponger Setup</a></p>', site_name));
+  } 
+  else
+  {
+?>
+
+  <form action="#" method="post">
+    <label for="fld_item_id"><?=site_name?> Image URI: </label><input type="text" size="60" id="fld_item_id" name="fld_item_id" />
+    <input type="submit" name="cmd_submit_FB_ID" id="cmd_submit" value="Submit" onclick="return build_sponge_links('<?=site_name?>', '<?=_host?>', '<?=entity_uri?>');"/>
+  </form>
+
+  <div id="fb_ds_links_no_token">
+    <h3>View Your <?=site_name?> Linked Data Space</h3>
+      <p>Here are a variety of Linked Data oriented views derived from your <?=site_name?> image:</p> 
+      <ul>
+      <li>
+        <a id="about_sponge_uri" href="<?=about_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('<?=site_name?> image: UNKNOWN_ITEM_ID');
+          </script>
+        </a><br/>A simple page for follow-your-nose exploration
+      </li>
+      <li>
+        <a id="describe_sponge_uri" href="<?=describe_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('<?=site_name?> image: UNKNOWN_ITEM_ID');
+          </script>
+        </a><br/>A powerful faceted navigation and exploration page
+      </li>
+      </ul>
+  </div>
+<?vsp } ?> <!-- fi api_key_missing -->
+            </div><!-- token confirmation-->
+          </div><!-- lmargin -->
+
+          <div id="rmargin">
+      <h2>Other OpenLink Tools & Services</h2>
+      <div>
+      <ul>
+      <li><a href="http://linkeddata.uriburner.com/">URIBurner.com</a><br/>A service that delivers RDF-based structured descriptions of Web addressable resources (documents or real world objects)</li>
+      <li><a href="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</a><br/>A browser extension for viewing Linked Data Sources</li>
+      <li><a href="http://oat.openlinksw.com/">OpenLink AJAX Toolkit (OAT)</a><br/>A JavaScript-based toolkit for browser-independent Rich Internet Application development</li>
+      </ul>
+      </div>
+          </div> <!--rmargin -->
+
+        </div><!-- topic-text -->
+      </div><!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+</div><!-- outer -->
+</body>
+</html>
diff --git a/binsrc/rdf_mappers/sponger_front_page/sponge_social_profile.vsp b/binsrc/rdf_mappers/sponger_front_page/sponge_social_profile.vsp
new file mode 100644
index 0000000..6fddc94
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/sponge_social_profile.vsp
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+  <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <title><?=fp_title?> - Sponge Your Profile</title>
+  <?vsp if (fp_favicon <> 0) { ?>
+  <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+  <?vsp } ?>
+  <script type="text/javascript">
+    var el_user_id;
+    var el_about_sponge_uri;
+    var el_describe_sponge_uri;
+    var el_fb_ds_links_no_token;
+    var user_id = "";
+
+    function build_sponge_links (site_name, host, entity_uri, about_sponge_uri)
+    {
+      var describe_href;
+
+      el_user_id = el_user_id || document.getElementById('fld_user_id');
+      el_about_sponge_uri = el_about_sponge_uri || document.getElementById('about_sponge_uri');
+      el_describe_sponge_uri = el_describe_sponge_uri || document.getElementById('describe_sponge_uri');
+      el_fb_ds_links_no_token = el_fb_ds_links_no_token || document.getElementById('fb_ds_links_no_token');
+
+      user_id = el_user_id.value;
+      // TO DO - Check the entered user ID is valid
+      if (user_id.length == 0)
+      {
+        alert ('Please enter your ' + site_name + ' ID');
+        el_fb_ds_links_no_token.style.display = 'none';
+        return false;
+      }
+
+      switch (site_name)
+      {
+        case 'Twitter':
+          el_about_sponge_uri.href = about_sponge_uri.replace(/twitter.com\/.*sponger:get/, 'twitter.com/' + user_id + '?sponger:get');
+          entity_uri = entity_uri.replace(/twitter.com\/.*/, 'twitter.com/' + user_id);
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent(entity_uri) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+        case 'Delicious':
+          el_about_sponge_uri.href = about_sponge_uri.replace(/twitter.com\/.*sponger:get/, 'www.delicious.com/' + user_id + '?sponger:get');
+          entity_uri = entity_uri.replace(/twitter.com\/.*/, 'www.delicious.com/' + user_id);
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent(entity_uri) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+        case 'Google+':
+	  var matches = /\/(\d{5,})/.exec (user_id);
+	  // Guard against a user entering their full Google+ profile URI instead of just their user ID
+	  if (matches != null)
+	    user_id = matches[1];
+	  else
+	  {
+	    matches = /^\d{5,}$/.exec (user_id);
+	    if (matches != null)
+	      user_id = matches[0];
+	    else
+	    {
+	      alert ('Please enter your ' + site_name + ' ID');
+	      el_fb_ds_links_no_token.style.display = 'none';
+	      return false;
+	    }
+	  }
+          el_about_sponge_uri.href = about_sponge_uri.replace(/http\/twitter.com\/.*sponger:get/, 
+                  'https/plus.google.com/' + user_id + '?sponger:get');
+          entity_uri = entity_uri.replace(/http\/twitter.com\/.*/, 'https/plus.google.com/' + user_id);
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent(entity_uri) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+      }
+      el_about_sponge_uri.innerHTML = el_describe_sponge_uri.innerHTML = site_name + " ID: " + user_id;
+      el_fb_ds_links_no_token.style.display = 'inline';
+
+      return false;
+    }
+  </script>
+<?vsp
+  declare _host varchar;
+  declare site_name varchar;
+  declare rm_key varchar;
+  declare api_key_missing integer;
+
+  site_name := http_param ('site');
+  _host := registry_get ('URIQADefaultHost');
+  if (is_http_ctx ()) _host := http_request_header(http_request_header (), 'Host', null, _host);
+
+  api_key_missing := 0;
+
+  if (site_name = 'Google+')
+  {
+    rm_key := (select RM_KEY from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_GOOGLE_PLUS');
+    if (length(rm_key) = 0)
+      api_key_missing := 1;
+  }
+?>
+</head>
+
+<body onload="page_load_hndlr()">
+<div id="outer">
+      <div id="header">
+        <div id="header_logo">
+          <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+             title="OpenLink Software" alt="[OpenLink Software logo]"
+             src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href= "sponger_architecture.vsp">Architecture</a> | 
+        <a href= "sponger_setup.vsp">Sponger Setup</a> | 
+        <a href= "examples.vsp">Live Sponger Examples</a> | 
+        <a href= "http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a>  |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="lmargin">
+            <div id="token_confirmation">
+
+              <h2>Sponge Your <?=site_name?> Profile</h2>
+
+<?vsp 
+  declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+  declare user_id varchar;
+
+  user_id := 'UNKNOWN_USER_ID';
+  about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/http/twitter.com/%s?sponger:get=add&refresh=0', _host, _host, user_id);
+  entity_uri := sprintf ('http://%s/about/id/entity/http/twitter.com/%s', _host, user_id);
+  --describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+  describe_sponge_uri := sprintf ('http://%s/describe/?url=%s&sponger:get=add&sr=0', _host, entity_uri);
+  ?>
+
+<?vsp
+  if (api_key_missing)
+  {
+    http (sprintf ('<p>An API key is required for the %s cartridge, but one hasn\'t been configured.<br/>Please refer to <a href="sponger_setup.vsp">Sponger Setup</a></p>', site_name));
+  } 
+  else
+  {
+?>
+
+  <form action="#" method="post">
+    <div>
+<?vsp
+  if (site_name = 'Google+')
+    http (sprintf ('<label for="fld_user_id">Google+ ID*: </label>'));
+  else
+    http (sprintf ('<label for="fld_user_id">%s username: </label>', site_name));
+?>
+      <input type="text" maxlength="80" size="42" id="fld_user_id" name="fld_user_id" />
+      <input type="submit" name="cmd_submit_FB_ID" id="cmd_submit_user_id" value="Submit" 
+           onclick="return build_sponge_links('<?=site_name?>', '<?=_host?>', '<?=entity_uri?>', '<?=about_sponge_uri?>');"/>
+<?vsp
+  if (site_name = 'Google+')
+  {
+    http (sprintf ('<div style="font-size: 0.9em"><p/>*The highlighted part in the following URL shows a Google+ user ID:<br/>
+                     http://plus.google.com/<span style="color:gray">110272002170841199999</span>/...<br/> 
+                   View <a href="https://plus.google.com/u/0/me/about">your Google+ profile</a>, and copy the ID from your profile URL.</div>'));
+  }
+?>
+    </div>
+  </form>
+
+  <div id="fb_ds_links_no_token">
+    <h3>View Your <?=site_name?> Linked Data Space</h3>
+      <p>Here are a variety of Linked Data oriented views derived from your <?=site_name?> profile:</p> 
+      <ul>
+      <li>
+        <a id="about_sponge_uri" href="<?=about_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('<?=site_name?> ID: UNKNOWN_USER_ID');
+          </script>
+        </a><br/>A simple page for follow-your-nose exploration
+      </li>
+      <li>
+        <a id="describe_sponge_uri" href="<?=describe_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('<?=site_name?> ID: UNKNOWN_USER_ID');
+          </script>
+        </a><br/>A powerful faceted navigation and exploration page
+      </li>
+      </ul>
+  </div>
+<?vsp } ?> <!-- fi api_key_missing -->
+            </div><!-- token confirmation-->
+          </div><!-- lmargin -->
+
+          <div id="rmargin">
+      <h2>Other OpenLink Tools & Services</h2>
+      <div>
+      <ul>
+      <li><a href="http://linkeddata.uriburner.com/">URIBurner.com</a><br/>A service that delivers RDF-based structured descriptions of Web addressable resources (documents or real world objects)</li>
+      <li><a href="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</a><br/>A browser extension for viewing Linked Data Sources</li>
+      <li><a href="http://oat.openlinksw.com/">OpenLink AJAX Toolkit (OAT)</a><br/>A JavaScript-based toolkit for browser-independent Rich Internet Application development</li>
+      </ul>
+      </div>
+          </div> <!--rmargin -->
+
+        </div><!-- topic-text -->
+      </div><!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+</div><!-- outer -->
+</body>
+</html>
diff --git a/binsrc/rdf_mappers/sponger_front_page/sponge_uri.vsp b/binsrc/rdf_mappers/sponger_front_page/sponge_uri.vsp
new file mode 100644
index 0000000..1ef4039
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/sponge_uri.vsp
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+  <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <title><?=fp_title?></title>
+  <?vsp if (fp_favicon <> 0) { ?>
+  <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+  <?vsp } ?>
+  <script type="text/javascript">
+    var el_item_id;
+    var el_about_sponge_uri;
+    var el_describe_sponge_uri;
+    var el_fb_ds_links_no_token;
+    var item_id = "";
+
+    function build_sponge_links (site_name, host, entity_uri)
+    {
+      var describe_href;
+      var item_id_sanitized;
+
+      el_item_id = el_item_id || document.getElementById('fld_item_id');
+      el_about_sponge_uri = el_about_sponge_uri || document.getElementById('about_sponge_uri');
+      el_describe_sponge_uri = el_describe_sponge_uri || document.getElementById('describe_sponge_uri');
+      el_fb_ds_links_no_token = el_fb_ds_links_no_token || document.getElementById('fb_ds_links_no_token');
+
+      item_id = el_item_id.value;
+      // TO DO - Check the entered item ID is valid
+      if (item_id.length == 0)
+      {
+        switch (site_name)
+        {
+          case 'WebFinger':
+            alert ('Please enter an email address identifying a WebFinger profile');
+            break;
+          default:
+        alert ('Please enter a ' + site_name + ' URI');
+            break;
+        }
+        el_fb_ds_links_no_token.style.display = 'none';
+        return false;
+      }
+
+      switch (site_name)
+      {
+        case 'WebID':
+          el_about_sponge_uri.href = el_about_sponge_uri.href.replace(/about\/html\/.*sponger:get/, 'about/html/' + item_id + '?sponger:get');
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent(item_id) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+        case 'WebFinger':
+	  item_id = item_id.replace (/^acct:/, '');
+          el_about_sponge_uri.href = el_about_sponge_uri.href.replace(/about\/html\/.*sponger:get/, 'about/html/acct:' + item_id + '?sponger:get');
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent('acct:' + item_id) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+        case 'LinkedIn':
+        case 'Flickr':
+	case 'Foursquare':
+          item_id_sanitized = item_id.replace (/https:\//, 'https');
+          item_id_sanitized = item_id_sanitized.replace (/http:\//, 'http');
+          el_about_sponge_uri.href = el_about_sponge_uri.href.replace(/id\/entity\/.*sponger:get/, 'id/entity/' + item_id_sanitized + '?sponger:get');
+          entity_uri = entity_uri.replace(/id\/entity\/.*/, 'id/entity/' + item_id_sanitized);
+          describe_href = 'http://' + host + '/describe/?url=' + encodeURIComponent(entity_uri) + '&sponger:get=add&sr=0';
+          el_describe_sponge_uri.href = describe_href;
+          break;
+      }
+      switch (site_name)
+      {
+        case 'WebFinger':
+          el_about_sponge_uri.innerHTML = el_describe_sponge_uri.innerHTML = site_name + " URL: acct:" + item_id;
+          break;
+        default:
+      el_about_sponge_uri.innerHTML = el_describe_sponge_uri.innerHTML = site_name + " URL: " + item_id;
+          break;
+      }
+      el_fb_ds_links_no_token.style.display = 'inline';
+      return false;
+    }
+  </script>
+<?vsp
+  declare _host varchar;
+  declare site_name varchar;
+  declare rm_key, rm_opt varchar;
+  declare api_key_missing integer;
+
+  site_name := http_param ('site');
+  _host := registry_get ('URIQADefaultHost');
+  if (is_http_ctx ()) _host := http_request_header(http_request_header (), 'Host', null, _host);
+
+  api_key_missing := 0;
+
+  if (site_name = 'Flickr')
+  {
+    rm_key := (select RM_KEY from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FLICKR_IMG');
+    if (length (rm_key) = 0)
+      api_key_missing := 1;
+  }
+  else if (site_name = 'Foursquare')
+  {
+    rm_opt := (select get_keyword ('oauth_token', coalesce (RM_OPTIONS, vector())) from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FOURSQUARE');
+    if (length (rm_opt) = 0)
+      api_key_missing := 1;
+  }
+?>
+</head>
+
+<body>
+<div id="outer">
+      <div id="header">
+        <div id="header_logo">
+          <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+             title="OpenLink Software" alt="[OpenLink Software logo]"
+             src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href= "sponger_architecture.vsp">Architecture</a> | 
+        <a href= "sponger_setup.vsp">Sponger Setup</a> | 
+        <a href= "examples.vsp">Live Sponger Examples</a> | 
+        <a href= "http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a>  |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="lmargin">
+            <div id="token_confirmation">
+
+<?vsp if (site_name = 'Flickr') { ?>
+              <h2>Sponge A <?=site_name?> Image</h2>
+<?vsp } else if (site_name = 'WebID') { ?>
+              <h2>Sponge Your <?=site_name?> </h2>
+<?vsp } else { ?>
+              <h2>Sponge Your <?=site_name?> Profile</h2>
+<?vsp } ?>
+
+<?vsp 
+  declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+  declare item_id varchar;
+
+  item_id := 'UNKNOWN_ITEM_ID';
+  if (site_name = 'WebID')
+  {
+    about_sponge_uri := sprintf ('http://%s/about/html/%s?sponger:get=add&refresh=0', _host, item_id);
+    entity_uri := item_id;
+  }
+  else if (site_name = 'WebFinger')
+  {
+    about_sponge_uri := sprintf ('http://%s/about/html/acct:%s?sponger:get=add&refresh=0', _host, item_id);
+    entity_uri := 'acct:' || item_id;
+  }
+  else
+  {
+    about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/%s?sponger:get=add&refresh=0', _host, _host, item_id);
+    entity_uri := sprintf ('http://%s/about/id/entity/%s', _host, item_id);
+  }
+  --describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+  describe_sponge_uri := sprintf ('http://%s/describe/?url=%s&sponger:get=add&sr=0', _host, entity_uri);
+  ?>
+
+<?vsp
+  if (api_key_missing)
+  {
+    http (sprintf ('<p>An API key or cartridge options are required for the %s cartridge, but none has been configured.<br/>Please refer to <a href="sponger_setup.vsp">Sponger Setup</a></p>', site_name));
+  } 
+  else
+  {
+?>
+
+  <form action="#" method="post">
+    <div>
+      <label for="fld_item_id">
+<?vsp
+      if (site_name = 'WebFinger')
+        http (sprintf ('WebFinger email address: '));
+      else if (site_name = 'Foursquare')
+        http (sprintf ('%s profile URL: ', site_name)); 
+      else
+        http (sprintf ('%s URL: ', site_name)); 
+?>
+      </label>
+      <input type="text" size="60" id="fld_item_id" name="fld_item_id" />
+      <input type="submit" name="cmd_submit_FB_ID" id="cmd_submit" value="Submit" onclick="return build_sponge_links('<?=site_name?>', '<?=_host?>', '<?=entity_uri?>');"/>
+<?vsp
+  if (site_name = 'WebFinger')
+  {
+    http (sprintf ('<div style="font-size: 0.9em"><p/>Enter the email address (without the acct: prefix) identifying your WebFinger profile.</div>'));
+  }
+?>
+    </div>
+  </form>
+
+  <div id="fb_ds_links_no_token">
+    <h3>View Your <?=site_name?> Linked Data Space</h3>
+
+<?vsp
+  if (site_name <> 'WebFinger')
+    http (sprintf ('<p>Here are a variety of Linked Data oriented views derived from your %s URL:</p>', site_name)); 
+?>
+      <ul>
+      <li>
+        <a id="about_sponge_uri" href="<?=about_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('<?=site_name?> URL: UNKNOWN_ITEM_ID');
+          </script>
+        </a><br/>A simple page for follow-your-nose exploration
+      </li>
+<?vsp
+  if (site_name <> 'WebFinger')
+    http ('<li>'); 
+  else
+    -- Hide /describe proxy link - it doesn't currently support the acct: scheme
+    http ('<li style="display:none;">'); 
+?>
+        <a id="describe_sponge_uri" href="<?=describe_sponge_uri?>">
+          <script type="text/javascript">
+            document.write('<?=site_name?> URL: UNKNOWN_ITEM_ID');
+          </script>
+        </a><br/>A powerful faceted navigation and exploration page
+      </li>
+      </ul>
+  </div>
+<?vsp } ?> <!-- fi api_key_missing -->
+            </div><!-- token confirmation-->
+          </div><!-- lmargin -->
+
+          <div id="rmargin">
+      <h2>Other OpenLink Tools & Services</h2>
+      <div>
+      <ul>
+      <li><a href="http://linkeddata.uriburner.com/">URIBurner.com</a><br/>A service that delivers RDF-based structured descriptions of Web addressable resources (documents or real world objects)</li>
+      <li><a href="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</a><br/>A browser extension for viewing Linked Data Sources</li>
+      <li><a href="http://oat.openlinksw.com/">OpenLink AJAX Toolkit (OAT)</a><br/>A JavaScript-based toolkit for browser-independent Rich Internet Application development</li>
+      </ul>
+      </div>
+          </div> <!--rmargin -->
+
+        </div><!-- topic-text -->
+      </div><!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+</div><!-- outer -->
+</body>
+</html>
diff --git a/binsrc/rdf_mappers/sponger_front_page/sponger_architecture.vsp b/binsrc/rdf_mappers/sponger_front_page/sponger_architecture.vsp
new file mode 100644
index 0000000..d4d0d69
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/sponger_architecture.vsp
@@ -0,0 +1,169 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+    skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+    banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+    strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+    if (skinpfx = 0) skinpfx := 'skin';
+    if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+    if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+  ?>
+  <head>
+    <meta name="generator" content="HTML Tidy, see www.w3.org"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <title><?=fp_title?></title>
+    <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+    <?vsp if (fp_favicon <> 0) { ?>
+    <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+    <?vsp } ?>
+  </head>
+
+  <body>
+    <div id="outer">
+      <div id="header">
+        <div id="header_logo">
+        <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+         title="OpenLink Software" alt="[OpenLink Software logo]"
+        src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href="sponger_architecture.vsp">Architecture</a> | 
+        <a href= "sponger_setup.vsp">Sponger Setup</a> | 
+        <a href="examples.vsp">Live Sponger Examples</a> | 
+        <a href= "http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a> |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="sponge_arch_toc_container">
+          <div id="sponge_arch_toc">
+            <table>
+              <tr><td><a href="#sponger_architecture">Architecture</a></td></tr>
+              <tr><td><a href="#why_important">Why Is It Important?</a></td></tr>
+              <tr><td><a href="#how_it_works">How It Works</a></td></tr>
+            </table>
+          </div>
+          </div>
+          <div id="lmargin_architect">
+              <div id="what">
+                <h2><a id="sponger_architecture"></a>Architecture</h2>
+
+                <p>The Virtuoso Sponger is the Linked Data middleware component of Virtuoso that generates 
+                Linked Data from a variety of data sources, supporting a wide variety of data representation and serialization formats. 
+                The Sponger is transparently integrated into Virtuoso's SPARQL Query Processor where it delivers URI de-referencing 
+                within SPARQL query patterns, across disparate data spaces. It also delivers configurable smart HTTP caching services.
+                Optionally, it can be used by the Virtuoso Content Crawler to periodically populate and replenish data within the native Quad Store.</p>
+
+                <p>
+                The Sponger is a fully fledged service that is also directly accessible via SOAP or REST interaction patterns.
+                It is also integrated into Virtuoso's SPARQL query processor, 
+                <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSetCrawlerJobsGuide">Web Content Crawler</a> and 
+                <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtuosoRDFSinkFolder">Smart WebDAV folders</a> functionality.
+                (Smart WebDAV folders are 'sink' folders which act as conduits for populating the Virtuoso Quad Store with structured data
+                extracted from documents placed in them.)
+                </p>
+
+                <p>
+                As depicted below, OpenLink's broad portfolio of Linked-Data-aware products supports a number of routes for creating 
+                or consuming Linked Data. The Sponger provides a key platform for developers to generate quality data meshes from 
+                unstructured or semi-structured data sources.
+                </p>
+
+                <img src="<?=skinpfx?>/i/linked_data_gen_opts3a.png" title="Linked Data generation options" 
+                alt="[Linked Data generation options]" class="img_centre" />
+
+                <p>
+                Architecturally, the Sponger is comprised of a number of cartridges for specific data sources. Basically, each cartridge
+                is the equivalent of a data access driver.
+                </p>
+                <p>
+                The Sponger supports two types of cartridge: Extractor and Meta Cartridges. Extractor cartridges handle raw data extraction
+                and transformation, while Meta Cartridges handle lookups and joins across other Linked Data spaces and Web 2.0 style APIs.
+                Both cartridge types are themselves comprised of data extractor and schema/ontology mapper components.
+                </p>
+
+                <p>
+                Cartridges are highly customizable. Custom cartridges can be developed using any language supported by the Virtuoso Server 
+                Extensions API, enabling structured Linked Data generation from resource types not available in the default Sponger cartridge 
+                collection bundled as part of the Virtuoso Sponger VAD package (rdf_mappers_dav.vad).
+                </p>
+              </div> <!-- what -->
+            
+              <div id="why_important">
+                <h2>Why Is It Important?</h2>
+
+                <p>
+                A majority of the world's data naturally resides in non-Linked Data form at the current time. The Sponger delivers middleware 
+                that accelerates the boot-strapping of the Data Web by generating Linked Data from unstructured sources, unobtrusively. 
+                This "Swiss army knife" for on-the-fly Linked Data generation provides a bridge between the traditional Document Web and the Linked Data Web ("Data Web").
+                </p>
+
+                <p>
+                Sponging data from non-Linked Data sources and converting it to Linked Data exposes the data in a canonical form for querying 
+                and inference, and enables fast and easy construction of Linked Data driven mesh-ups as opposed to code driven Web 2.0 mash-ups.
+                </p>
+
+            </div> <!-- why_important -->
+
+
+              <div id="how_it_works">
+                <h2><a id="how_it_works"></a>How It Works</h2>
+
+                <p>
+                Designed with a customization-friendly plug-in architecture, the Sponger's core functionality is provided by data transformation 
+                drivers, known as Sponger Cartridges, that handle entity extraction, representation construction, metadata generation, and the 
+                creation of de-referenceable proxy (or wrapper) URIs.  Cartridges may be written in Virtuoso Procedure Language, XSLT, PHP, Python, Java, etc.
+                </p>
+                <p>
+                There are currently two kinds of cartridges: Extractor and Metadata. Extractor cartridges run within the Virtuoso instance, performing 
+                initial data retrieval, data object construction, vocabulary/ontology mapping, and proxy URI creation. Metadata (or "Meta") cartridges,
+                on the other hand, use bindings to external processes and/or third-party services to extract entities from content, and to handle 
+                additional data retrieval, data object construction, and data transformation.
+                </p>
+
+                <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                <tr><td align="center">
+                <object id="sponger_animation" width="600" height="450" alt="simple Flash animation of Virtuoso Sponger activity">
+                <embed 
+                    src="http://virtuoso.openlinksw.com/screencasts/virtuoso-rdf-middleware3.swf" 
+                    type="application/x-shockwave-flash" width="600" height="450" alt="simple Flash animation of Virtuoso Sponger activity">
+                </embed>
+                </object>
+                </td></tr>
+                </table>
+
+              </div> <!-- how_it_works -->
+          </div> <!-- lmargin -->
+
+        </div>
+      </div>
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
+
diff --git a/binsrc/rdf_mappers/sponger_front_page/sponger_setup.vsp b/binsrc/rdf_mappers/sponger_front_page/sponger_setup.vsp
new file mode 100644
index 0000000..5691137
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/sponger_setup.vsp
@@ -0,0 +1,637 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+    skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+    banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+    strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+    if (skinpfx = 0) skinpfx := 'skin';
+    if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+    if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+  ?>
+  <head>
+    <meta name="generator" content="HTML Tidy, see www.w3.org"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <title><?=fp_title?> - Setup</title>
+    <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+    <?vsp if (fp_favicon <> 0) { ?>
+    <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+    <?vsp } ?>
+  </head>
+
+  <body>
+    <div id="outer">
+      <div id="header">
+        <div id="header_logo">
+        <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+         title="OpenLink Software" alt="[OpenLink Software logo]"
+        src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+        </div>
+        <div id="header_text">
+          <?vsp if (banner_logo <> 0) { ?>
+            <img id="banner_logo" alt="[Sponger instance logo]"
+                 src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+          <?vsp } else { ?>
+            <h1><?=banner_txt?></h1>
+          <?vsp } ?>
+          <?=strapline?>
+        </div>
+      </div>
+
+      <div id="navbar">
+        <a href="index.vsp">Home</a> | 
+        <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+        <a href="sponger_architecture.vsp">Architecture</a> | 
+        <a href="sponger_setup.vsp">Sponger Setup</a> | 
+        <a href="examples.vsp">Live Sponger Examples</a> | 
+        <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a> |
+		<a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+      </div>
+
+      <div id="content">
+        <div class="topic-text">
+          <div id="sponge_arch_toc_container">
+          <div id="sponge_arch_toc">
+            <table>
+              <tr><td><a href="#h_sponger_config">Sponger Configuration</a></td></tr>
+              <tr><td><a href="#h_cartridge_prerequisites">Cartridge Prerequisites</a></td></tr>
+            </table>
+          </div>
+          </div>
+          <div id="lmargin_architect">
+              <div id="sponger_config">
+                <h2><a id="h_sponger_config"></a>Sponger Configuration</h2>
+
+                <p>
+                While many Sponger cartridges generate Linked Data from standard open data formats, such as Atom, CSV and hCard, others extract 
+                the source data from proprietary Web services. Many of these services control access to their Web APIs, typically through an 
+                API key, username and password, OAuth access token and the like. To gain access to one of these Web services, the corresponding 
+                cartridge must be configured with the required authorization credentials. 
+                </p>
+                <p>These and other cartridge settings should be configured by your Virtuoso administrator before the cartridge is used.</p>
+                <p>
+                They are set through the cartridge's configuration panel (shown below) which is displayed on the 'Sponger' tab of Virtuoso's 
+                Conductor UI, under the 'RDF' tab. Clicking on one of the listed cartridges displays the settings for that cartridge.
+                </p>
+                <img src="<?=skinpfx?>/i/cartridge_config.jpg" width="90%" alt="[Sponger UI cartridge configuration panel]" />
+                <p>
+                The 'Options' field takes entries in the form of key-value pairs. The required options and/or API keys will vary from cartridge 
+                to cartridge. These are detailed in the table opposite. Some cartridges may function without authorization credentials, but the 
+                amount of data extracted will be limited as a consequence. Mandatory configuration options are marked with an asterisk.
+                </p>
+            </div>
+
+            <div id="cartridge_prerequisites">
+              <h2><a id="h_cartridge_prerequisites"></a>Cartridge Prerequisites</h2>
+
+              <div id="prerequisites_tbl">
+                <p><span class="span_starting_point">Options which must be configured for each cartridge prior to use are listed below.</span></p>
+                <p>Mandatory options are marked *</p>
+              <table id="cartridge_options">
+                <thead>
+                <tr>
+                  <th>Cartridge</th><th>Required Options</th><th>Sample URI</th><th>Resource Description</th><th>Linked Data Graph</th>
+                </tr>
+                </thead>
+                <tbody>
+       <tr>
+              <td>Amazon </td>
+              <td>API Key</td>
+              <td> <a href="http://www.amazon.com/gp/product/0553383043" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.amazon.com/gp/product/0553383043" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/gp/product/0553383043" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>BestBuy </td>
+
+              <td> API Key </td>
+              <td> <a href="http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Bing </td>
+              <td>   - </td>
+              <td> <a href="http://www.bing.com/community/members/livesearch/default.aspx" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.bing.com/community/members/livesearch/default.aspx" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.bing.com/community/members/livesearch/default.aspx" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Bugzillas </td>
+              <td>   - </td>
+              <td> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=251714" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/https://bugzilla.mozilla.org/show_bug.cgi?id=251714" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=https://bugzilla.mozilla.org/show_bug.cgi?id=251714" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>CNET </td>
+
+              <td> API Key </td>
+              <td> <a href="http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>CrunchBase </td>
+              <td>   - </td>
+              <td> <a href="http://linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Delicious </td>
+              <td>   - </td>
+              <td> <a href="http://delicious.com/popular/blog" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/delicious.com/popular/blog" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://delicious.com/popular/blogI" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Digg </td>
+
+              <td>   - </td>
+              <td> <a href="http://digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Discogs </td>
+              <td> php plugin, DBpedia Extractor </td>
+              <td> <a href="http://www.discogs.com/Todd-Barton-and...ic-Poetry-Of-The-Kesh/release/2053074" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Disqus </td>
+              <td> API Key, API Account </td>
+              <td> <a href="http://www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>DOI </td>
+
+              <td> hslookup plugin; relevant html-, pdf-, xml-, etc., -mappers enabled </td>
+              <td> <a href="http://doi.ieeecomputersociety.org/10.1109/MIC.2008.16" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/doi.ieeecomputersociety.org/10.1109/MIC.2008.16" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://doi.ieeecomputersociety.org/10.1109/MIC.2008.16" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Dublin Core </td>
+              <td>   - </td>
+              <td> <a href="http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>eBay </td>
+              <td> account, API Key </td>
+              <td> <a href="http://cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Evri </td>
+
+              <td>   - </td>
+              <td> <a href="http://www.evri.com/organization/general-motors-0x4938f" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://www.evri.com/organization/general-motors-0x4938f" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.evri.com/organization/general-motors-0x4938f" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Facebook </td>
+        <td> API Key, secret, persistent-session-id. <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtCartConfigFacebook" class="wikiword">See details</a>
+        </td>
+              <td> <a href="http://www.facebook.com/people/Richard-Max-Koster/1319314117" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.facebook.com/people/Richard-Max-Koster/1319314117" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.facebook.com/people/Richard-Max-Koster/1319314117" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Flickr </td>
+
+              <td> API Key </td>
+              <td> <a href="http://farm1.static.flickr.com/212/496684670_7122c831ed.jpg" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Freebase </td>
+              <td>   - </td>
+              <td> <a href="http://www.freebase.com/view/location" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.freebase.com/view/location" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.freebase.com/view/location" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Geonames </td>
+              <td>   - </td>
+              <td> <a href="http://ws.geonames.org/search?q=london&maxRows=10&type=rdf" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/ws.geonames.org/search?q=london&maxRows=10&type=rdf" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://ws.geonames.org/search?q=london&maxRows=10&type=rdf" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>geoURL </td>
+
+              <td>   - </td>
+              <td> <a href="http://geourl.org/near?p=wiki.worldflicks.org/saanen.html" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/geourl.org/near?p=wiki.worldflicks.org/saanen.html" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://geourl.org/near?p=wiki.worldflicks.org/saanen.html" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Get Satisfaction </td>
+              <td>   - </td>
+              <td> <a href="http://getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Google Base </td>
+              <td>   - </td>
+              <td> <a href="http://www.google.com/base/feeds/snippets" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.google.com/base/feeds/snippets/" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/base/feeds/snippets" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Google Book </td>
+
+              <td>   -  </td>
+              <td> <a href="http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Google Document </td>
+              <td>   - </td>
+              <td> <a href="http://docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Google Social Graph </td>
+              <td>   - </td>
+              <td> <a href="http://socialgraph.apis.google.com/lookup?q=http://example.com/" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/socialgraph.apis.google.com/lookup?q=http://example.com/" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://socialgraph.apis.google.com/lookup?q=http://example.com/" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Google Spreadsheet </td>
+
+              <td>   - </td>
+              <td> <a href="http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Hoovers </td>
+              <td>   - </td>
+              <td> <a href="http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>ISBN </td>
+              <td> API Key </td>
+              <td> <a href="http://isbndb.com/search-all.html?kw=King+Stephen" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/isbndb.com/search-all.html?kw=King+Stephen" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://isbndb.com/search-all.html?kw=King+Stephen" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>LastFM </td>
+
+              <td> API Key </td>
+              <td> <a href="http://www.last.fm/music/+noredirect/Teddy+Pendegrass" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.last.fm/music/+noredirect/Teddy+Pendegrass" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.last.fm/music/+noredirect/Teddy+Pendegrass" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>LibraryThing </td>
+              <td> API Key </td>
+              <td> <a href="http://www.librarything.com/work/1060" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.librarything.com/work/1060" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.librarything.com/work/1060" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>LSID </td>
+              <td>   - </td>
+              <td> <a href="http://lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Meetup </td>
+
+              <td> API Key </td>
+              <td> <a href="http://www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>MusicBrainz </td>
+              <td>   - </td>
+              <td> <a href="http://musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Ning Metadata </td>
+              <td>   - </td>
+              <td> <a href="http://www.ning.com/search?q=new+york+city&sf=rs&rs=1" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.ning.com/search?q=new+york+city&sf=rs&rs=1" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.ning.com/search?q=new+york+city&sf=rs&rs=1" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>OAI </td>
+
+              <td>   - </td>
+              <td> <a href="http://news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Open Social </td>
+              <td>   - </td>
+              <td> <a href="http://socialgraph.apis.google.com/otherme?pretty=1&q=www.openlinksw.com/blog/~kidehen/" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/socialgraph.apis.google.com/otherme?pretty=1&q=www.openlinksw.com/blog/~kidehen/" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://socialgraph.apis.google.com/otherme?pretty=1&q=www.openlinksw.com/blog/~kidehen/" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>OpenLibrary </td>
+              <td>   - </td>
+              <td> <a href="http://openlibrary.org/b/OL1230137M" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/openlibrary.org/b/OL1230137M" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://openlibrary.org/b/OL1230137M" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>OpenStreetMap </td>
+
+              <td>   - </td>
+              <td> <a href="http://openstreetmap.org/?lat=57.6569&lon=11.8886&zoom=14&layers=B000FTF" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/openstreetmap.org/?lat=57.6569&lon=11.8886&zoom=14&layers=B000FTF" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://openstreetmap.org/?lat=57.6569&lon=11.8886&zoom=14&layers=B000FTF" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>oReilly </td>
+              <td>   - </td>
+              <td> <a href="http://oreilly.com/catalog/9780596523206/" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/oreilly.com/catalog/9780596523206/" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://oreilly.com/catalog/9780596523206/" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Picasa </td>
+              <td>   - </td>
+              <td> <a href="http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Radio Pop </td>
+
+              <td>   - </td>
+              <td> <a href="http://www.radiopop.co.uk/users/tristanf/friends.xml" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.radiopop.co.uk/users/tristanf/friends.xml" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.radiopop.co.uk/users/tristanf/friends.xml" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>relLicense </td>
+              <td>   - </td>
+              <td> <a href="http://creativecommons.org/licenses/by-nc/3.0/us/" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/creativecommons.org/licenses/by-nc/3.0/us/" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://creativecommons.org/licenses/by-nc/3.0/us/" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Revyu </td>
+              <td>   - </td>
+              <td> <a href="http://revyu.com/people/smonroe/about/html" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/revyu.com/people/smonroe/about/html" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://revyu.com/people/smonroe/about/html" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Rhapsody </td>
+
+              <td>   - </td>
+              <td> <a href="http://mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>SalesForce.com </td>
+              <td>API Key,user login</td>
+              <td> <a href="http://linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>SlideShare </td>
+              <td> API Key, SharedSecret </td>
+              <td> <a href="http://www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>SlideSix </td>
+
+              <td>   - </td>
+              <td> <a href="http://slidesix.com/view/ESWC2008SPARQLBIOpenLink" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/slidesix.com/view/ESWC2008SPARQLBIOpenLink" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://slidesix.com/view/ESWC2008SPARQLBIOpenLink" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>SVG </td>
+              <td>   - </td>
+              <td> <a href="http://www.schepers.cc/semweb/rdf-diagram.svg" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.schepers.cc/semweb/rdf-diagram.svg" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.schepers.cc/semweb/rdf-diagram.svg" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Tesco </td>
+              <td>   - </td>
+              <td> <a href="http://www.tesco.com/superstore/xpi/6/xpi54427686.htm" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://www.tesco.com/superstore/xpi/6/xpi54427686.htm" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.tesco.com/superstore/xpi/6/xpi54427686.htm" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Tumblr </td>
+
+              <td>   - </td>
+              <td> <a href="http://cupcakesoftheday.tumblr.com/" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://cupcakesoftheday.tumblr.com/" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://cupcakesoftheday.tumblr.com/" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>TWFY (theyworkforyou) </td>
+              <td>	API Key  </td>
+              <td> <a href="http://www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Twitter </td>
+              <td> User Login </td>
+              <td> <a href="http://twitter.com/kidehen" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://twitter.com/kidehen" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/kidehen" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Ustream </td>
+
+              <td>   - </td>
+              <td> <a href="http://www.ustream.tv/recorded/4848859/highlight/55618" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://www.ustream.tv/recorded/4848859/highlight/55618" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.ustream.tv/recorded/4848859/highlight/55618" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Web Resource CC (Licenses)  </td>
+              <td>   - </td>
+              <td> <a href="http://creativecommons.org/licenses/by-nc-nd/2.5/" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/creativecommons.org/licenses/by-nc-nd/2.5/" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://creativecommons.org/licenses/by-nc-nd/2.5/" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Wikipedia </td>
+              <td>   - </td>
+              <td> <a href="http://en.wikipedia.org/wiki/House_MD" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://en.wikipedia.org/wiki/House_MD" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://en.wikipedia.org/wiki/House_MD" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>xFolk </td>
+
+              <td>   - </td>
+              <td> <a href="http://blogmarks.net/marks/tag/hdd" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/blogmarks.net/marks/tag/hdd" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://blogmarks.net/marks/tag/hdd" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Yahoo! Finance </td>
+              <td>   - </td>
+              <td> <a href="http://finance.yahoo.com/q?s=AAPL" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/finance.yahoo.com/q?s=AAPL" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://finance.yahoo.com/q?s=AAPL" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Yahoo! SearchMonkey </td>
+              <td>   - </td>
+              <td> <a href="http://tech.groups.yahoo.com/group/ysearchboss/message/1983" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/tech.groups.yahoo.com/group/ysearchboss/message/1983" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://tech.groups.yahoo.com/group/ysearchboss/message/1983" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Yahoo! Traffic Data </td>
+
+              <td>   - </td>
+              <td> <a href="http://local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Yahoo! Weather </td>
+              <td>   - </td>
+              <td> <a href="http://weather.yahooapis.com/forecastrss?p=94089" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/weather.yahooapis.com/forecastrss?p=94089" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://weather.yahooapis.com/forecastrss?p=94089" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Yelp </td>
+              <td>   - </td>
+              <td> <a href="http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX" >example</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX" >Data Explorer View</a>  </td>
+       </tr>
+       <tr>
+              <td>Youtube </td>
+
+              <td>   - </td>
+              <td> <a href="http://www.youtube.com/watch?v=rOsPKjbMvxY" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http/www.youtube.com/watch?v=rOsPKjbMvxY" >HTML Representation</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.youtube.com/watch?v=rOsPKjbMvxY" >Data Explorer View</a>  </td>
+
+       </tr>
+       <tr>
+              <td>Zillow </td>
+              <td>   - </td>
+              <td> <a href="http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid" >example</a>  </td>
+              <td>  <a href="http://linkeddata.uriburner.com/about/html/http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid" >HTML Representation</a>  </td>
+
+              <td>  <a href="http://linkeddata.uriburner.com/ode/?uri=http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid" >Data Explorer View</a>  </td>
+       </tr>
+                </tbody>
+              </table>
+              </div> <!-- prerequisites_tbl -->
+            </div> <!-- cartridge_prerequisites -->
+          </div> <!-- lmargin -->
+
+        </div> <!-- topic-text -->
+      </div> <!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
+
diff --git a/binsrc/rdf_mappers/sponger_front_page/twitter_access_token.vsp b/binsrc/rdf_mappers/sponger_front_page/twitter_access_token.vsp
new file mode 100644
index 0000000..1d79106
--- /dev/null
+++ b/binsrc/rdf_mappers/sponger_front_page/twitter_access_token.vsp
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<?vsp
+  declare skinpfx, banner_txt, strapline, banner_logo, fp_title, fp_favicon varchar;
+  skinpfx := registry_get ('_sponger_fp_SkinPrefix');
+  banner_txt := registry_get ('_sponger_fp_Banner');
+  banner_logo := registry_get ('_sponger_fp_Logo');
+  strapline := registry_get ('_sponger_fp_Strapline');
+  fp_title := registry_get ('_sponger_fp_Title');
+  fp_favicon := registry_get ('_sponger_fp_Favicon');
+  if (skinpfx = 0) skinpfx := 'skin';
+  if (banner_txt = 0) banner_txt := 'Virtuoso Linked Data Middleware';
+  if (strapline = 0) strapline := '';
+  if (fp_title = 0) fp_title := 'Virtuoso Sponger';
+?>
+<head>
+  <link rel="stylesheet" href="<?=skinpfx?>/ss/sponger_frontpage.css" type="text/css"/>
+  <?vsp if (fp_favicon <> 0) { ?>
+  <link rel="shortcut icon" href="<?=skinpfx?>/i/<?=fp_favicon?>" />
+  <?vsp } ?>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <title><?=fp_title?> - Twitter Binding</title>
+<?vsp
+  declare twit_app_name, li_app_secret, oauth_redirect_url, twit_login_dialog_url varchar;
+  declare twit_user_id, twit_user_name, twit_user_public_profile_url varchar;
+  declare request_token, request_token_secret, oauth_verifier varchar;
+  declare consumer_key, consumer_secret varchar;
+  declare twitter_api_host, access_token_path varchar;
+  declare oauth_token, oauth_token_secret, oauth_expires_in, oauth_problem, oauth_denied varchar;
+  declare oauth_token_expiry int;
+  declare rm_options any;
+  declare _host, required_profile_fields varchar;
+
+  twitter_api_host := 'https://api.twitter.com';
+  access_token_path := '/oauth/access_token';
+
+  consumer_key := null;
+  consumer_secret := null;
+  twit_app_name := null;
+  oauth_token := null;
+  oauth_problem := null;
+  oauth_denied := null;
+
+  rm_options := (select RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_TWITTER_V2');
+  if (rm_options is not null)
+  {
+    consumer_key := get_keyword ('consumer_key', rm_options);
+    consumer_secret := get_keyword ('consumer_secret', rm_options);
+    twit_app_name := get_keyword ('consumer_name', rm_options);
+  }
+
+  if (consumer_key is null or consumer_secret is null)
+    goto cartridge_options_err;
+
+  _host := registry_get ('URIQADefaultHost');
+  if (is_http_ctx ()) _host := http_request_header(http_request_header (), 'Host', null, _host);
+
+  -- TO DO: 
+  -- oauth_redirect_url isn't used. It's configured instead in the Twitter application details via the Twitter Developer UI
+  if (_host is not null)
+  {
+    twit_app_name := coalesce (twit_app_name, sprintf ('Sponger (%s)', _host));
+    oauth_redirect_url := sprintf('http://%s/twitter_oauth/', _host);
+  }
+
+   -- Returned request token matches the one used to make the request
+  request_token := cast (http_param ('oauth_token') as varchar);
+  oauth_verifier := cast (http_param ('oauth_verifier') as varchar);
+  oauth_denied := cast (http_param ('denied') as varchar);
+
+  -- TO DO: oauth_problem currently not used.
+  -- oauth_problem is used by LinkedIn. How does Twitter report OAuth problems? Is request_token returned on error?
+  oauth_problem := cast (http_param ('oauth_problem') as varchar);
+
+  if (oauth_denied <> '0')
+  {
+    delete from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = oauth_denied;
+    commit work;
+  }
+  else if (oauth_problem <> '0')
+  {
+    delete from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = request_token;
+    commit work;
+  }
+  else if (oauth_verifier = '0')
+  {
+    -- Authorization hasn't yet been requested
+    -- Re-direct to Twitter OAuth server, ask the user to authorize Sponger access to their Twitter profile
+    twit_login_dialog_url := DB.DBA.RDF_LOAD_TWITTER_REQUEST_ACCESS_TOKEN (consumer_key, consumer_secret);
+    http ('<script>');
+    http (sprintf ('top.location.href=\'%s\';', twit_login_dialog_url));
+    http ('</script>');
+  }
+  else
+  {
+    -- Process the user response to our request for authorization
+    declare url, api_url, response, response_params any;
+    declare oauth_params varchar;
+    declare tw_tree any;
+
+    -- Retrieve request_token_secret returned in response to request-token request
+    request_token_secret := (select OAUTH_REQ_SECRET from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = request_token);
+    oauth_params := sprintf ('oauth_token=%U&oauth_verifier=%U', request_token, oauth_verifier);
+
+    delete from DB.DBA.OAUTH_TOKEN_REQUESTS where OAUTH_REQ_TOKEN = request_token;
+    commit work;
+
+    -- Exchange the request token for an access token
+    url := DB.DBA.sign_request ('GET', twitter_api_host || access_token_path, oauth_params, consumer_key, consumer_secret, request_token, request_token_secret, 1);
+    response := http_get (url);
+
+    -- Sample response
+    -- oauth_token=161341203xxx&oauth_token_secret=AxErlxxx&user_id=161341203&screen_name=cmsblakeley
+    -- Twitter doesn't support expiring OAuth tokens, only long-lived tokens
+    response_params := split_and_decode (response);
+    oauth_token := get_keyword ('oauth_token', response_params);
+    oauth_token_secret := get_keyword ('oauth_token_secret', response_params);
+    oauth_expires_in := get_keyword ('oauth_expires_in', response_params);
+    twit_user_id := get_keyword ('user_id', response_params);
+    twit_user_name := get_keyword ('screen_name', response_params);
+
+    if (oauth_token is not null)
+    {
+      oauth_token_expiry := null;
+      if (oauth_expires_in is not null)
+      {
+        oauth_token_expiry := atoi (oauth_expires_in);
+        if (oauth_token_expiry = 0)
+          oauth_token_expiry := null;
+      }
+
+      twit_user_public_profile_url := 'http://twitter.com/' || twit_user_name;
+      DB.DBA.TWITTER_SAVE_ACCESS_TOKEN (twit_user_id, twit_user_name, twit_user_public_profile_url, NULL, NULL, 
+        oauth_token, oauth_token_secret, oauth_token_expiry);
+    }
+  }
+cartridge_options_err:
+ ;
+?>
+</head>
+<body onload="page_load_hndlr()">
+<div id="outer">
+  <div id="header">
+    <div id="header_logo">
+      <a href="http://www.openlinksw.com/"><img id="openlink_logo"
+         title="OpenLink Software" alt="[OpenLink Software logo]"
+         src="<?=skinpfx?>/i/openlinklogo_wstrap_2008_100h.png" /></a> 
+    </div>
+    <div id="header_text">
+      <?vsp if (banner_logo <> 0) { ?>
+        <img id="banner_logo" alt="[Sponger instance logo]"
+             src="<?=skinpfx?>/i/<?=banner_logo?>" /><br/>
+      <?vsp } else { ?>
+        <h1><?=banner_txt?></h1>
+      <?vsp } ?>
+      <?=strapline?>
+    </div>
+  </div>
+
+  <div id="navbar">
+    <a href="index.vsp">Home</a> | 
+    <a href="sponger_architecture.vsp#how_it_works">How It Works</a> | 
+    <a href="sponger_architecture.vsp">Architecture</a> | 
+    <a href="sponger_setup.vsp">Sponger Setup</a> | 
+    <a href="examples.vsp">Live Sponger Examples</a> | 
+    <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide"> Developer API Guide</a>  |
+    <a href="http://virtuoso.openlinksw.com/">Virtuoso</a>
+  </div>
+
+  <div id="content">
+    <div class="topic-text">
+      <div id="lmargin">
+        <div id="token_confirmation">
+          <h2>Sponger-Twitter Binding</h2>
+	        <h3>Access Token Generation</h3>
+
+<?vsp 
+  if (oauth_token is null)
+  {
+    http ('<div class="error">');
+    if (oauth_denied <> '0')
+    {
+      http ('<p>Authorization to access your Twitter profile was refused. An OAuth access token could not be granted.</p>');
+    }
+    else if (oauth_problem <> '0')
+    {
+      http ('<p>An error occurred. An OAuth access token could not be granted.</p>');
+      http (sprintf ('<p>OAuth error: %s</p>', oauth_problem));
+    }
+    else
+    {
+      if (consumer_key is null or consumer_secret is null)
+        http ('<p>The Twitter cartridge is not configured correctly.');
+      if (consumer_key is null)
+        http ('<p>The API Key for the Twitter application associated with this host could not be determined. 
+                  Please ensure the Twitter cartridge options include an entry like consumer_key=Bb1Fia-1i...</p>'); 
+      if (consumer_secret is null)
+        http ('<p>The Secret Key for the Twitter application associated with this host could not be determined. 
+                  Please ensure the Twitter cartridge options include an entry like consumer_secret=WqeW7p5L...</p>'); 
+    }
+    http ('</div>');
+  }
+  else
+  {
+    declare entity_uri, about_sponge_uri, describe_sponge_uri varchar;
+    declare profile_proxy_url varchar;
+
+    profile_proxy_url := replace (twit_user_public_profile_url, 'http://', 'http/');
+    about_sponge_uri := sprintf ('http://%s/about/html/http/%s/about/id/entity/%s?sponger:get=add&refresh=0', _host, _host, profile_proxy_url);
+    entity_uri := sprintf ('http://%s/about/id/entity/%s', _host, profile_proxy_url);
+    describe_sponge_uri := sprintf ('http://%s/describe/?url=%U&sponger:get=add&sr=0', _host, entity_uri);
+?>
+
+    <p>An OAuth access token has been generated. The Linked Data Generator hosted by application <em><?=twit_app_name ?></em> now has access to your Twitter-hosted Data Space.</p>
+    <!--
+    <p><?vsp http (oauth_token); ?></p>
+    <?vsp if (oauth_token_expiry is not null) { ?>
+      <p>This token expires in <?vsp http (sprintf('%d', oauth_token_expiry)); ?> seconds.</p>
+    <?vsp } else { ?>
+      <p>This is a non-expiring token.</p>
+    <?vsp } ?>
+    -->
+	  <h3>View Your Twitter Linked Data Space</h3>
+      <p>Here are a variety of Linked Data oriented views derived from your Twitter profile:</p> 
+      <ul>
+        <li>
+          <a href="<?=about_sponge_uri?>">
+              <?vsp http (twit_user_name || ' (Twitter ID: ' || twit_user_id || ')'); ?>
+          </a><br/>A simple page for follow-your-nose exploration
+        </li>
+        <li>
+          <a href="<?=describe_sponge_uri?>">
+              <?vsp http (twit_user_name || ' (Twitter ID: ' || twit_user_id || ')'); ?>
+          </a><br/>A powerful faceted navigation and exploration page
+        </li>
+      </ul>
+      <h3>Revoking Your Access Token</h3>
+      <p>
+      You have authorised the Sponger to interact with your Twitter account. You can revoke access to your profile at any time by removing this application 
+      (<em><?=twit_app_name ?></em>) from the list of authorised applications shown in your Twitter profile. To remove an application, 
+      <a href="http://twitter.com/settings/applications">access your Twitter settings</a>, view the <strong>Applications</strong> tab
+      displayed by the <strong>Settings</strong> menu, then select the application you wish to deny access to.
+      </p> 
+<?vsp 
+  } 
+?>
+
+        </div><!-- token confirmation-->
+      </div><!-- lmargin -->
+
+      <div id="rmargin">
+        <h2>Other OpenLink Tools & Services</h2>
+        <div>
+          <ul>
+            <li><a href="http://linkeddata.uriburner.com/">URIBurner.com</a>
+                <br/>A service that delivers RDF-based structured descriptions of Web addressable resources (documents or real world objects)</li>
+            <li><a href="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</a>
+                <br/>A browser extension for viewing Linked Data Sources</li>
+            <li><a href="http://oat.openlinksw.com/">OpenLink AJAX Toolkit (OAT)</a>
+                <br/>A JavaScript-based toolkit for browser-independent Rich Internet Application development</li>
+          </ul>
+        </div>
+      </div> <!--rmargin -->
+
+    </div><!-- topic-text -->
+  </div><!-- content -->
+
+      <div class="reset">
+        <div id="footer">
+          Copyright (C) 1998-2012 OpenLink Software. All rights reserved.
+        </div>
+      </div>
+</div><!-- outer -->
+</body>
+</html>
diff --git a/binsrc/rdf_mappers/vad_version b/binsrc/rdf_mappers/vad_version
index 4408ed4..a700aa6 100644
--- a/binsrc/rdf_mappers/vad_version
+++ b/binsrc/rdf_mappers/vad_version
@@ -1 +1 @@
-1.24.35
+1.34.37
diff --git a/binsrc/rdf_mappers/virt_rdf_label.sql b/binsrc/rdf_mappers/virt_rdf_label.sql
index f07dff8..c36817a 100644
--- a/binsrc/rdf_mappers/virt_rdf_label.sql
+++ b/binsrc/rdf_mappers/virt_rdf_label.sql
@@ -1,12 +1,12 @@
 --
 --
---  $Id: virt_rdf_label.sql,v 1.1.4.4 2011/03/23 12:13:19 source Exp $
+--  $Id: virt_rdf_label.sql,v 1.1.4.21 2012/03/15 16:41:46 source Exp $
 --
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -39,6 +39,20 @@ TTLP (
 @prefix og: <http://opengraphprotocol.org/schema/> .
 @prefix dv: <http://rdf.data-vocabulary.org/> .
 @prefix c: <http://www.w3.org/2002/12/cal/icaltzd#> .
+ at prefix oplzllw: <http://www.openlinksw.com/schemas/zillow#> .
+ at prefix oplgp: <http://www.openlinksw.com/schemas/googleplus#> .
+ at prefix event: <http://purl.org/NET/c4dm/event.owl#> .
+ at prefix dbpedia: <http://dbpedia.org/ontology/> .
+ at prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
+ at prefix sioc: <http://rdfs.org/sioc/ns#> .
+ at prefix opltw: <http://www.openlinksw.com/schemas/twitter#> .
+ at prefix sioct: <http://rdfs.org/sioc/types#> .
+ at prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ at prefix oplli: <http://www.openlinksw.com/schemas/linkedin#> .
+ at prefix umbelrc: <http://umbel.org/umbel/rc/> .
+ at prefix oplog: <http://www.openlinksw.com/schemas/opengraph#> . 
+ at prefix mo: <http://purl.org/ontology/mo/> .
+ at prefix oplbase: <http://www.openlinksw.com/schemas/oplbase#> . 
 
 dc:title rdfs:subPropertyOf virtrdf:label .
 rdfs:label rdfs:subPropertyOf virtrdf:label .
@@ -76,26 +90,671 @@ og:longitude rdfs:subPropertyOf geo:long .
 <http://rdfs.org/ns/void#vocabulary> owl:equivalentProperty <http://www.openlinksw.com/schema/attribution#isDescribedUsing> .
 <http://www.rdfabout.com/rdf/schema/ussec/tradingSymbol> a owl:inverseFunctionalProperty . 
 <http://www.rdfabout.com/rdf/schema/ussec/cik> a owl:inverseFunctionalProperty .
-foaf:logo owl:subPropertyOf foaf:depiction .
+foaf:logo rdfs:subPropertyOf foaf:depiction .
 <http://umbel.org/umbel#isAbout> owl:equivalentProperty foaf:focus .
-gr:name owl:equivalentProperty foaf:name .
+gr:name rdfs:subPropertyOf foaf:name .
 <http://poolparty.punkt.at/demozone/ont#title> rdfs:subPropertyOf virtrdf:label .
 <http://www.w3.org/2007/05/powder-s#describedby> owl:equivalentProperty <http://www.iana.org/assignments/relation/describedby> .
 <http://dbpedia.org/property/secCik> a owl:inverseFunctionalProperty .
 dv:photo owl:equivalentProperty foaf:depiction .
-dv:instructions owl:equivalentProperty dc:description .
+dv:instructions rdfs:subPropertyOf dc:description .
 dv:name rdfs:subPropertyOf virtrdf:label .
 c:summary rdfs:subPropertyOf virtrdf:label .
 c:description owl:equivalentProperty dc:description .
 foaf:img rdfs:subPropertyOf virtrdf:image .
 foaf:depiction rdfs:subPropertyOf virtrdf:image .
 dv:photo rdfs:subPropertyOf virtrdf:image .
-<http://www.openlinksw.com/schemas/virtcxml#Custom-Screen%20Name> owl:equivalentProperty foaf:nick.
-<http://www.openlinksw.com/schemas/virtcxml#Custom-Real%20Name> owl:equivalentProperty foaf:name .
+<http://www.openlinksw.com/schemas/virtcxml#Custom-Screen%20Name> rdfs:subPropertyOf foaf:nick.
+<http://www.openlinksw.com/schemas/virtcxml#Custom-Real%20Name> rdfs:subPropertyOf foaf:name .
 <http://www.openlinksw.com/schemas/virtcxml#FacetDescription> owl:equivalentProperty dcterms:description .
 <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> rdfs:subPropertyOf virtrdf:label .
 <http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema.rdf#Name> rdfs:subPropertyOf virtrdf:label .
 <http://rdf.freebase.com/ns/common.topic.alias> rdfs:subPropertyOf virtrdf:label .
+<http://commontag.org/ns#label> rdfs:subPropertyOf virtrdf:label .
+oplzllw:latitude owl:equivalentProperty geo:lat .
+oplzllw:longitude owl:equivalentProperty geo:long .
+oplgp:organization_name rdfs:subPropertyOf virtrdf:label .
+oplgp:displayName rdfs:subPropertyOf virtrdf:label .
+oplgp:activity_title rdfs:subPropertyOf virtrdf:label .
+oplgp:actor_displayName rdfs:subPropertyOf virtrdf:label .
+oplgp:attachment_displayName rdfs:subPropertyOf virtrdf:label .
+<http://yago-knowledge.org/resource/hasPreferredMeaning> rdfs:subPropertyOf virtrdf:label .
+<http://yago-knowledge.org/resource/hasPreferredName> rdfs:subPropertyOf virtrdf:label .
+<http://www.openlinksw.com/schemas/cert#subject> rdfs:subPropertyOf virtrdf:label .
+
+oplgp:Activity owl:equivalentClass sioc:Post .
+oplgp:ActivityObject owl:equivalentClass sioc:Post .
+oplgp:Actor owl:equivalentClass sioc:UserAccount .
+oplgp:Comment owl:equivalentClass sioc:Post .
+
+oplgp:actor owl:equivalentProperty sioc:has_creator .
+oplgp:comment_actor owl:equivalentProperty sioc:has_creator .
+oplgp:has_comment owl:equivalentProperty sioc:has_reply .
+oplgp:in_reply_to owl:equivalentProperty sioc:reply_of .
+oplgp:attachment owl:equivalentProperty sioc:attachment .
+oplgp:annotation rdfs:subPropertyOf sioc:content .
+oplgp:html_content owl:equivalentProperty sioc:content .
+oplgp:originalContent owl:equivalentProperty sioc:content .
+oplgp:content owl:equivalentProperty sioc:content .
+oplgp:comment_content owl:equivalentProperty sioc:content .
+oplgp:email owl:equivalentProperty sioc:email .
+oplgp:role owl:equivalentProperty sioc:has_function .
+oplgp:activity_replied_to_id rdfs:subPropertyOf sioc:id .
+oplgp:placeId rdfs:subPropertyOf sioc:id.
+oplgp:id owl:equivalentProperty sioc:id. 
+oplgp:updated rdfs:subPropertyOf sioc:last_activity_date .
+oplgp:activity_url rdfs:subPropertyOf sioc:link .
+oplgp:profile_url rdfs:subPropertyOf sioc:link .
+oplgp:shared_url rdfs:subPropertyOf sioc:link .
+oplgp:primary_url rdfs:subPropertyOf sioc:link .
+oplgp:url_value rdfs:subPropertyOf sioc:link .
+oplgp:object_url rdfs:subPropertyOf sioc:link .
+oplgp:actor_profile_url rdfs:subPropertyOf sioc:link .
+oplgp:attachment_url rdfs:subPropertyOf sioc:link .
+oplgp:embed_url rdfs:subPropertyOf sioc:link .
+oplgp:full_image_url rdfs:subPropertyOf sioc:link .
+oplgp:preview_image_url rdfs:subPropertyOf sioc:link .
+oplgp:in_reply_to_url rdfs:subPropertyOf sioc:link .
+oplgp:displayName rdfs:subPropertyOf sioc:name .
+oplgp:name rdfs:subPropertyOf sioc:name .
+oplgp:annotation rdfs:subPropertyOf sioc:note . 
+
+oplgp:Organization owl:equivalentClass foaf:Organization .
+oplgp:Person owl:equivalentClass foaf:Person .
+oplgp:FullImage owl:equivalentClass foaf:Image .
+oplgp:PreviewImage owl:equivalentClass foaf:Image .
+oplgp:Actor owl:equivalentClass foaf:OnlineAccount .
+
+oplgp:email owl:equivalentProperty foaf:mbox .
+oplgp:actor_profile_image rdfs:subPropertyOf foaf:img .
+oplgp:profile_image rdfs:subPropertyOf foaf:img .
+oplgp:fullImage rdfs:subPropertyOf foaf:img .
+oplgp:previewImage rdfs:subPropertyOf foaf:img .
+oplgp:name rdfs:subPropertyOf foaf:name .
+oplgp:familyName owl:equivalentProperty foaf:familyName .
+oplgp:givenName owl:equivalentProperty foaf:givenName .
+oplgp:gender owl:equivalentProperty foaf:gender .
+oplgp:nickname owl:equivalentProperty foaf:nick .
+oplgp:date_of_birth owl:equivalentProperty foaf:birthday .
+oplgp:relationshipStatus rdfs:subPropertyOf foaf:status .
+oplgp:honorificPrefix owl:equivalentProperty foaf:title .
+
+oplgp:aboutMe rdfs:subPropertyOf dc:description .
+oplgp:activity_title owl:equivalentProperty dc:title .
+oplgp:published rdfs:subPropertyOf dc:date .
+oplgp:updated rdfs:subPropertyOf dc:date .
+oplgp:date_of_birth rdfs:subPropertyOf dc:date .
+oplgp:endDate rdfs:subPropertyOf dc:date .
+oplgp:startDate rdfs:subPropertyOf dc:date .
+oplgp:actor owl:equivalentProperty dc:creator .
+oplgp:comment_actor owl:equivalentProperty dc:creator .
+oplgp:tagline rdfs:subPropertyOf dc:description .
+oplgp:role rdfs:subPropertyOf dc:description .
+oplgp:access_description rdfs:subPropertyOf dc:description .
+oplgp:attachment_media_type rdfs:subPropertyOf dc:format .
+oplgp:full_image_width rdfs:subPropertyOf dc:format .
+oplgp:full_image_height rdfs:subPropertyOf dc:format .
+oplgp:preview_image_height rdfs:subPropertyOf dc:format .
+oplgp:preview_image_width rdfs:subPropertyOf dc:format .
+oplgp:activity_replied_to_id rdfs:subPropertyOf dc:identifier .
+oplgp:placeId rdfs:subPropertyOf dc:identifier .
+oplgp:id rdfs:subPropertyOf dc:identifier .
+oplgp:speaksLanguage rdfs:subPropertyOf dc:language .
+oplgp:activity_title owl:equivalentProperty dc:publisher .
+oplgp:relationshipStatus rdfs:subPropertyOf dc:relation .
+oplgp:profile_url rdfs:subPropertyOf dc:source .
+oplgp:shared_url rdfs:subPropertyOf dc:source .
+oplgp:crosspostSource rdfs:subPropertyOf dc:source .
+oplgp:activity_url rdfs:subPropertyOf dc:source .
+oplgp:activity_url rdfs:subPropertyOf dc:source .
+oplgp:url_value rdfs:subPropertyOf dc:source .
+oplgp:object_url rdfs:subPropertyOf dc:source .
+oplgp:actor_profile_url rdfs:subPropertyOf dc:source .
+oplgp:attachment_url rdfs:subPropertyOf dc:source .
+oplgp:embed_url rdfs:subPropertyOf dc:source .
+oplgp:full_image_url rdfs:subPropertyOf dc:source .
+oplgp:preview_image_url rdfs:subPropertyOf dc:source .
+oplgp:comment_self_link rdfs:subPropertyOf dc:source .
+oplgp:in_reply_to_url rdfs:subPropertyOf dc:source .
+oplgp:title owl:equivalentProperty dc:title .
+oplgp:attachment_displayName rdfs:subPropertyOf dc:title .
+oplgp:activity_title rdfs:subPropertyOf dc:title .
+oplgp:email_type rdfs:subPropertyOf dc:type .
+oplgp:organization_type owl:equivalentProperty dc:type .
+oplgp:url_type rdfs:subPropertyOf dc:type .
+oplgp:access_item_type rdfs:subPropertyOf dc:type .
+oplgp:activity_object_type rdfs:subPropertyOf dc:type .
+oplgp:attachment_media_type rdfs:subPropertyOf dc:type .
+oplgp:embed_media_type rdfs:subPropertyOf dc:type .
+oplgp:full_image_media_type rdfs:subPropertyOf dc:type .
+oplgp:preview_image_media_type rdfs:subPropertyOf dc:type .   
+
+oplgp:published owl:equivalentProperty dcterms:created .
+oplgp:updated owl:equivalentProperty dcterms:date .
+oplgp:actor owl:equivalentProperty dcterms:creator .
+oplgp:comment_actor owl:equivalentProperty dcterms:creator .
+oplgp:aboutMe rdfs:subPropertyOf dcterms:description .
+oplgp:tagline rdfs:subPropertyOf dcterms:description .
+oplgp:access_description rdfs:subPropertyOf dcterms:description .
+oplgp:attachment_media_type rdfs:subPropertyOf dcterms:format .
+oplgp:full_image_width rdfs:subPropertyOf dcterms:format .
+oplgp:full_image_height rdfs:subPropertyOf dcterms:format .
+oplgp:preview_image_height rdfs:subPropertyOf dcterms:format .
+oplgp:preview_image_width rdfs:subPropertyOf dcterms:format .
+oplgp:activity_replied_to_id rdfs:subPropertyOf dcterms:identifier .
+oplgp:placeId rdfs:subPropertyOf dcterms:identifier .
+oplgp:id rdfs:subPropertyOf dcterms:identifier .
+oplgp:speaksLanguage rdfs:subPropertyOf dcterms:language .
+oplgp:updated owl:equivalentProperty dcterms:modified .
+oplgp:activity_title owl:equivalentProperty dcterms:publisher .
+oplgp:relationshipStatus rdfs:subPropertyOf dcterms:relation .
+oplgp:profile_url rdfs:subPropertyOf dcterms:source .
+oplgp:shared_url rdfs:subPropertyOf dcterms:source .
+oplgp:crosspostSource rdfs:subPropertyOf dcterms:source .
+oplgp:activity_url rdfs:subPropertyOf dcterms:source .
+oplgp:activity_url rdfs:subPropertyOf dcterms:source .
+oplgp:url_value rdfs:subPropertyOf dcterms:source .
+oplgp:object_url rdfs:subPropertyOf dcterms:source .
+oplgp:actor_profile_url rdfs:subPropertyOf dcterms:source .
+oplgp:attachment_url rdfs:subPropertyOf dcterms:source .
+oplgp:embed_url rdfs:subPropertyOf dcterms:source .
+oplgp:full_image_url rdfs:subPropertyOf dcterms:source .
+oplgp:preview_image_url rdfs:subPropertyOf dcterms:source .
+oplgp:comment_self_link rdfs:subPropertyOf dcterms:source .
+oplgp:in_reply_to_url rdfs:subPropertyOf dcterms:source .
+oplgp:title owl:equivalentProperty dcterms:title .
+oplgp:attachment_displayName owl:equivalentProperty dcterms:title .
+oplgp:activity_title owl:equivalentProperty dcterms:title .
+oplgp:email_type rdfs:subPropertyOf dcterms:type .
+oplgp:organization_type owl:equivalentProperty dcterms:type .
+oplgp:url_type rdfs:subPropertyOf dcterms:type .
+oplgp:access_item_type rdfs:subPropertyOf dcterms:type .
+oplgp:activity_object_type rdfs:subPropertyOf dcterms:type .
+oplgp:attachment_media_type rdfs:subPropertyOf dcterms:type .
+oplgp:embed_media_type rdfs:subPropertyOf dcterms:type .
+oplgp:full_image_media_type rdfs:subPropertyOf dcterms:type .
+oplgp:preview_image_media_type rdfs:subPropertyOf dcterms:type .   
+
+oplgp:FullImage owl:equivalentClass bibo:Image . 
+oplgp:Email owl:equivalentClass bibo:Email .
+oplgp:PreviewImage owl:equivalentClass bibo:Image . 
+
+oplgp:annotation rdfs:subPropertyOf bibo:annotates .
+oplgp:originalContent owl:equivalentProperty bibo:content .
+oplgp:content owl:equivalentProperty bibo:content .
+oplgp:comment_content owl:equivalentProperty bibo:content .
+oplgp:html_content owl:equivalentProperty bibo:content .
+oplgp:relationshipStatus owl:equivalentProperty bibo:status .
+oplgp:activity_title owl:equivalentProperty bibo:title .
+oplgp:activity_title owl:equivalentProperty bibo:title .
+oplgp:title owl:equivalentProperty bibo:title .
+oplgp:attachment_displayName owl:equivalentProperty bibo:title .
+oplgp:actor owl:equivalentProperty bibo:owner .
+oplgp:comment_actor owl:equivalentProperty bibo:owner .
+oplgp:activity_replied_to_id rdfs:subPropertyOf bibo:identifier .
+oplgp:placeId rdfs:subPropertyOf bibo:identifier .
+oplgp:id rdfs:subPropertyOf bibo:identifier .
+oplgp:honorificPrefix owl:equivalentProperty bibo:prefixName .
+oplgp:honorificSuffix owl:equivalentProperty bibo:suffixName .
+
+oplgp:placeName owl:equivalentProperty event:place .
+
+oplgp:date_of_birth owl:equivalentProperty <http://www.openlinksw.com/schemas/rdfs/birthDate#this> .
+	
+oplgp:honorificPrefix owl:equivalentProperty vcard:TITLE .
+oplgp:nickname owl:equivalentProperty vcard:NICKNAME .
+oplgp:date_of_birth owl:equivalentProperty vcard:BDAY .
+oplgp:title owl:equivalentProperty vcard:TITLE .
+oplgp:role owl:equivalentProperty vcard:ROLE .
+oplgp:annotation rdfs:subPropertyOf vcard:NOTE .
+oplgp:email owl:equivalentProperty vcard:EMAIL .
+oplgp:name rdfs:subPropertyOf vcard:N .
+oplgp:familyName owl:equivalentProperty vcard:Family .
+oplgp:givenName owl:equivalentProperty vcard:Given .
+oplgp:honorificPrefix owl:equivalentProperty vcard:Prefix .
+oplgp:honorificSuffix owl:equivalentProperty vcard:Suffix .
+oplgp:organization_name owl:equivalentProperty vcard:ORG .
+oplgp:department rdfs:subPropertyOf vcard:Orgunit .
+oplgp:actor_profile_image owl:equivalentProperty vcard:PHOTO .
+oplgp:profile_image rdfs:subPropertyOf vcard:PHOTO .
+oplgp:fullImage rdfs:subPropertyOf vcard:PHOTO .
+oplgp:previewImage rdfs:subPropertyOf vcard:PHOTO .
+
+oplgp:shared_url owl:equivalentProperty rdfs:seeAlso .
+
+oplgp:Activity owl:equivalentClass dbpedia:Activity .
+oplgp:Name owl:equivalentClass dbpedia:Name .
+oplgp:Organization owl:equivalentClass dbpedia:Organization .
+oplgp:Person owl:equivalentClass dbpedia:Person .
+oplgp:Actor owl:equivalentClass dbpedia:Actor .
+oplgp:PlaceLived owl:equivalentClass dbpedia:Place .
+oplgp:activity_title owl:equivalentClass dbpedia:Publisher .
+oplgp:published rdfs:subPropertyOf dbpedia:Date .
+oplgp:updated rdfs:subPropertyOf dbpedia:Date .
+oplgp:access owl:equivalentProperty dbpedia:Access .
+oplgp:address owl:equivalentProperty dbpedia:Address .
+oplgp:annotation rdfs:subPropertyOf dbpedia:Note .
+oplgp:placeName owl:equivalentProperty dbpedia:Place .
+oplgp:currentLocation owl:equivalentProperty dbpedia:LocatedInArea .
+oplgp:date_of_birth owl:equivalentProperty dbpedia:BirthDate .
+oplgp:gender owl:equivalentProperty dbpedia:Genre .
+oplgp:speaksLanguage owl:equivalentProperty dbpedia:Language .
+oplgp:relationshipStatus owl:equivalentProperty dbpedia:Relation .
+oplgp:department owl:equivalentProperty dbpedia:Department .
+oplgp:role owl:equivalentProperty dbpedia:Role .
+oplgp:location owl:equivalentProperty dbpedia:Location .
+oplgp:title owl:equivalentProperty dbpedia:Title .
+
+
+opltw:User owl:equivalentClass foaf:Person .
+opltw:made_tweet owl:equivalentProperty foaf:made .
+opltw:via owl:equivalentProperty foaf:maker .
+
+opltw:Tweet owl:equivalentClass sioc:Post .
+opltw:User owl:equivalentClass sioc:UserAccount .
+opltw:made_tweet owl:equivalentProperty sioc:has_creator .
+opltw:id owl:equivalentProperty sioc:id .
+opltw:appLink owl:equivalentProperty sioc:link .
+
+opltw:Tweet owl:equivalentClass sioct:MicroblogPost .
+
+opltw:appLink owl:equivalentProperty rdf:Resource .
+
+opltw:User owl:equivalentClass dc:Agent .
+opltw:made_tweet owl:equivalentProperty dc:creator .
+opltw:id rdfs:subPropertyOf dc:identifier .
+opltw:appLink rdfs:subPropertyOf dc:source .
+
+opltw:User owl:equivalentClass dcterms:Agent .
+opltw:made_tweet owl:equivalentProperty dcterms:creator .
+opltw:id rdfs:subPropertyOf dcterms:identifier .
+opltw:appLink rdfs:subPropertyOf dcterms:source .
+
+opltw:Tweet owl:equivalentClass bibo:Article.
+opltw:id rdfs:subPropertyOf bibo:identifier .
+
+opltw:Tweet owl:equivalentClass dbpedia:Activity .
+opltw:User owl:equivalentClass dbpedia:Actor .
+opltw:User owl:equivalentClass dbpedia:Person .
+opltw:Application owl:equivalentClass dbpedia:Software .
+opltw:id owl:equivalentProperty dbpedia:Id .
+opltw:followed_by owl:equivalentProperty dbpedia:Person .
+opltw:follows owl:equivalentProperty dbpedia:Person .
+opltw:made_tweet owl:equivalentProperty dbpedia:Owner .
+
+
+oplli:Person owl:equivalentClass foaf:Person .
+oplli:Company owl:equivalentClass foaf:Organization .
+oplli:InstantMessagingAccount rdfs:subClassOf foaf:OnlineAccount .
+oplli:TwitterAccount owl:equivalentClass foaf:OnlineAccount .
+
+oplli:first_name owl:equivalentProperty foaf:firstName .
+oplli:has_im_account owl:equivalentProperty foaf:account .
+oplli:has_twitter_account owl:equivalentProperty foaf:account .
+oplli:interests owl:equivalentProperty foaf:interest .
+oplli:last_name owl:equivalentProperty foaf:lastName .
+oplli:location_name owl:equivalentProperty foaf:based_near .
+oplli:picture_url owl:equivalentProperty foaf:img .
+oplli:publication owl:equivalentProperty foaf:publications .
+oplli:public_profile_url rdfs:subPropertyOf foaf:accountServiceHomepage .
+oplli:public_profile_url rdfs:subPropertyOf foaf:page .
+oplli:im_account_name owl:equivalentProperty foaf:accountName .
+oplli:phone_number owl:equivalentProperty foaf:phone .
+oplli:publication_title owl:equivalentProperty foaf:publications .
+  
+
+oplli:Publication owl:equivalentClass sioc:Post .
+oplli:Recommendation owl:equivalentClass sioc:Post .
+oplli:InstantMessagingAccount owl:equivalentClass sioc:UserAccount .
+oplli:TwitterAccount owl:equivalentClass sioc:UserAccount .
+oplli:Skill owl:equivalentClass sioc:Role .
+
+oplli:id owl:equivalentProperty sioc:id .
+oplli:patent_status_id rdfs:subPropertyOf sioc:id .
+oplli:inventor_id rdfs:subPropertyOf sioc:id .
+oplli:author_id rdfs:subPropertyOf sioc:id .
+oplli:provider_account_id rdfs:subPropertyOf sioc:id .
+oplli:member_url_resource rdfs:subPropertyOf sioc:link .
+oplli:picture_url rdfs:subPropertyOf sioc:link .
+oplli:public_profile_url rdfs:subPropertyOf sioc:link .
+oplli:patent_url rdfs:subPropertyOf sioc:link .
+oplli:member_shared_resource_url rdfs:subPropertyOf sioc:link .
+oplli:publication_url rdfs:subPropertyOf sioc:link . 
+oplli:summary owl:equivalentProperty sioc:content . 
+oplli:patent_summary owl:equivalentProperty sioc:content . 
+oplli:publication_summary owl:equivalentProperty sioc:content . 
+oplli:education_notes rdfs:subPropertyOf sioc:note . 
+oplli:provider_account_name rdfs:subPropertyOf sioc:name . 
+oplli:first_name rdfs:subPropertyOf sioc:name . 
+oplli:im_account_name rdfs:subPropertyOf sioc:name . 
+oplli:company_name rdfs:subPropertyOf sioc:name .
+oplli:school_name rdfs:subPropertyOf sioc:name .
+oplli:publisher_name rdfs:subPropertyOf sioc:name .
+oplli:author_name rdfs:subPropertyOf sioc:name .
+oplli:provider_account_name rdfs:subPropertyOf sioc:name .
+oplli:last_name rdfs:subPropertyOf sioc:name .
+oplli:proposal_comments rdfs:subPropertyOf sioc:note . 
+oplli:certification_name rdfs:subPropertyOf sioc:name .
+oplli:language_name rdfs:subPropertyOf sioc:name .
+oplli:publication_title rdfs:subPropertyOf sioc:name .
+oplli:member_shared_resource_name rdfs:subPropertyOf sioc:name .
+
+oplli:Person rdfs:subClassOf dc:Agent .
+oplli:Company rdfs:subClassOf dc:Agent .
+oplli:InstantMessagingAccount rdfs:subClassOf dc:Agent .
+oplli:TwitterAccount rdfs:subClassOf dc:Agent .
+
+oplli:proposal_comments rdfs:subPropertyOf dc:description .
+oplli:associations rdfs:subPropertyOf dc:description .
+oplli:certification rdfs:subPropertyOf dc:description .
+oplli:language owl:equivalentProperty dc:language .
+oplli:company_type rdfs:subPropertyOf dc:type .
+oplli:im_account_type rdfs:subPropertyOf dc:type .
+oplli:phone_number_type rdfs:subPropertyOf dc:type .
+oplli:recommendation_type rdfs:subPropertyOf dc:type .
+oplli:id owl:equivalentProperty dc:identifier .
+oplli:patent_status_id rdfs:subPropertyOf dc:identifier . 
+oplli:inventor_id rdfs:subPropertyOf dc:identifier .
+oplli:author_id rdfs:subPropertyOf dc:identifier .
+oplli:provider_account_id rdfs:subPropertyOf dc:identifier .
+oplli:member_url_resource rdfs:subPropertyOf dc:source .
+oplli:picture_url rdfs:subPropertyOf dc:source .
+oplli:public_profile_url rdfs:subPropertyOf dc:source .
+oplli:member_shared_resource_url rdfs:subPropertyOf dc:source .
+oplli:patent_url rdfs:subPropertyOf dc:source .
+oplli:publication_url rdfs:subPropertyOf dc:source .
+oplli:publisher_name owl:equivalentProperty dc:publisher . 
+oplli:summary owl:equivalentProperty dc:description .
+oplli:patent_title owl:equivalentProperty dc:title .
+oplli:title owl:equivalentProperty dc:title .
+oplli:publication_title owl:equivalentProperty dc:title .
+oplli:date_of_birth rdfs:subPropertyOf dc:date .
+oplli:certification_start_date rdfs:subPropertyOf dc:date .
+oplli:certification_end_date rdfs:subPropertyOf dc:date .
+oplli:education_start_date rdfs:subPropertyOf dc:date .
+oplli:education_end_date rdfs:subPropertyOf dc:date .
+oplli:patent_date rdfs:subPropertyOf dc:date .
+oplli:end_date rdfs:subPropertyOf dc:date .
+oplli:start_date rdfs:subPropertyOf dc:date .
+oplli:publication_date rdfs:subPropertyOf dc:date .
+oplli:author_name owl:equivalentProperty dc:creator .
+
+oplli:Person rdfs:subClassOf dcterms:Agent .
+oplli:Company rdfs:subClassOf dcterms:Agent .
+oplli:InstantMessagingAccount rdfs:subClassOf dcterms:Agent .
+oplli:TwitterAccount rdfs:subClassOf dcterms:Agent .
+
+oplli:proposal_comments rdfs:subPropertyOf dcterms:description .
+oplli:associations rdfs:subPropertyOf dcterms:description .
+oplli:certification rdfs:subPropertyOf dcterms:description .
+oplli:education rdfs:subPropertyOf dcterms:educationLevel .
+oplli:language owl:equivalentProperty dcterms:language .
+oplli:company_type rdfs:subPropertyOf dcterms:type .
+oplli:im_account_type rdfs:subPropertyOf dcterms:type .
+oplli:phone_number_type rdfs:subPropertyOf dcterms:type .
+oplli:recommendation_type rdfs:subPropertyOf dcterms:type .
+oplli:id owl:equivalentProperty dcterms:identifier .
+oplli:patent_status_id rdfs:subPropertyOf dcterms:identifier . 
+oplli:inventor_id rdfs:subPropertyOf dcterms:identifier .
+oplli:author_id rdfs:subPropertyOf dcterms:identifier .
+oplli:provider_account_id rdfs:subPropertyOf dcterms:identifier .
+oplli:member_url_resource rdfs:subPropertyOf dcterms:source .
+oplli:picture_url rdfs:subPropertyOf dcterms:source .
+oplli:public_profile_url rdfs:subPropertyOf dcterms:source .
+oplli:member_shared_resource_url rdfs:subPropertyOf dcterms:source .
+oplli:patent_url rdfs:subPropertyOf dcterms:source .
+oplli:publication_url rdfs:subPropertyOf dcterms:source .
+oplli:publisher_name owl:equivalentProperty dcterms:publisher . 
+oplli:summary owl:equivalentProperty dcterms:description .
+oplli:patent_title owl:equivalentProperty dcterms:title .
+oplli:title owl:equivalentProperty dcterms:title .
+oplli:publication_title owl:equivalentProperty dcterms:title .
+oplli:date_of_birth rdfs:subPropertyOf dcterms:date .
+oplli:certification_start_date rdfs:subPropertyOf dcterms:date .
+oplli:certification_end_date rdfs:subPropertyOf dcterms:date .
+oplli:education_start_date rdfs:subPropertyOf dcterms:date .
+oplli:education_end_date rdfs:subPropertyOf dcterms:date .
+oplli:patent_date rdfs:subPropertyOf dcterms:date .
+oplli:end_date rdfs:subPropertyOf dcterms:date .
+oplli:start_date rdfs:subPropertyOf dcterms:date .
+oplli:publication_date rdfs:subPropertyOf dcterms:date .
+oplli:author_name owl:equivalentProperty dcterms:creator .
+
+
+oplli:Patent owl:equivalentClass bibo:Patent .
+oplli:Publication rdfs:subClassOf bibo:Document .
+
+oplli:publication_url rdfs:subPropertyOf bibo:uri .
+oplli:education_notes rdfs:subPropertyOf bibo:annotates .
+oplli:patent_number rdfs:subPropertyOf bibo:number .
+oplli:skill_years_of_experience rdfs:subPropertyOf bibo:number .
+oplli:patent_status rdfs:subPropertyOf bibo:status .
+oplli:author_name rdfs:subPropertyOf bibo:owner.
+oplli:author_name rdfs:subPropertyOf bibo:producer .
+oplli:author_person rdfs:subPropertyOf bibo:owner.
+oplli:author_person rdfs:subPropertyOf bibo:producer .
+oplli:patent_summary rdfs:subPropertyOf bibo:content .
+oplli:position_summary rdfs:subPropertyOf bibo:content .
+oplli:publication_summary rdfs:subPropertyOf bibo:content .
+oplli:summary rdfs:subPropertyOf bibo:content .
+oplli:id owl:equivalentProperty bibo:identifier .
+oplli:patent_status_id rdfs:subPropertyOf bibo:identifier .
+oplli:inventor_id rdfs:subPropertyOf bibo:identifier .
+oplli:author_id rdfs:subPropertyOf bibo:identifier .
+oplli:provider_account_id rdfs:subPropertyOf bibo:identifier .
+
+
+oplli:date_of_birth owl:equivalentProperty vcard:BDAY .
+oplli:education_notes rdfs:subPropertyOf vcard:NOTE .
+oplli:first_name owl:equivalentProperty vcard:Given .
+oplli:last_name owl:equivalentProperty vcard:Family .
+oplli:picture_url owl:equivalentProperty vcard:PHOTO .
+oplli:company_industry rdfs:subPropertyOf vcard:Orgunit .
+oplli:company_name owl:equivalentProperty vcard:Orgname .
+oplli:id owl:equivalentProperty vcard:UID .
+oplli:patent_status_id rdfs:subPropertyOf vcard:UID .
+oplli:inventor_id rdfs:subPropertyOf vcard:UID .
+oplli:author_id rdfs:subPropertyOf vcard:UID .
+oplli:provider_account_id rdfs:subPropertyOf vcard:UID .
+oplli:phone_number owl:equivalentProperty vcard:TEL .
+oplli:phone_number_type owl:equivalentProperty vcard:TELTYPES .
+oplli:main_address owl:equivalentProperty vcard:ADR .
+
+oplli:Person owl:equivalentClass dbpedia:Person .
+oplli:InstantMessagingAccount owl:equivalentClass dbpedia:Person .
+oplli:TwitterAccount owl:equivalentClass dbpedia:Person .
+oplli:Company owl:equivalentClass dbpedia:Organization .
+oplli:Language owl:equivalentClass dbpedia:Language .
+oplli:Publication owl:equivalentClass dbpedia:Activity .
+oplli:date_of_birth rdfs:subPropertyOf dbpedia:Date .
+oplli:certification_start_date rdfs:subPropertyOf dbpedia:Date .
+oplli:certification_end_date rdfs:subPropertyOf dbpedia:Date .
+oplli:education_start_date rdfs:subPropertyOf dbpedia:Date .
+oplli:education_end_date rdfs:subPropertyOf dbpedia:Date .
+oplli:patent_date rdfs:subPropertyOf dbpedia:Date .
+oplli:end_date rdfs:subPropertyOf dbpedia:Date .
+oplli:start_date rdfs:subPropertyOf dbpedia:Date .
+oplli:publication_date rdfs:subPropertyOf dbpedia:Date .
+oplli:main_address owl:equivalentProperty dbpedia:Address .
+oplli:education_notes rdfs:subPropertyOf dbpedia:Note .
+oplli:location_name owl:equivalentProperty dbpedia:Place .
+oplli:date_of_birth owl:equivalentProperty dbpedia:BirthDate .
+oplli:patent_title owl:equivalentProperty dbpedia:Title .
+oplli:title owl:equivalentProperty dbpedia:Title .
+oplli:publication_title owl:equivalentProperty dbpedia:Title .
+oplli:school_name owl:equivalentProperty dbpedia:School .
+oplli:education_start_date owl:equivalentProperty dbpedia:StartDate .
+oplli:start_date owl:equivalentProperty dbpedia:StartDate .
+oplli:certification_start_date owl:equivalentProperty dbpedia:StartDate .
+oplli:certification_end_date owl:equivalentProperty dbpedia:EndDate .
+oplli:education_end_date owl:equivalentProperty dbpedia:EndDate .
+oplli:end_date owl:equivalentProperty dbpedia:EndDate .
+oplli:certification_name owl:equivalentProperty dbpedia:Certification .
+oplli:specialties owl:equivalentProperty dbpedia:Specialist .
+oplli:patent owl:equivalentProperty dbpedia:Patent .
+oplli:associations owl:equivalentProperty dbpedia:Associate .
+oplli:country_code rdfs:subPropertyOf dbpedia:AreaCode .
+oplli:education owl:equivalentProperty dbpedia:Education .
+oplli:publication_date owl:equivalentProperty dbpedia:FirstPublicationDate .
+oplli:publication_date owl:equivalentProperty dbpedia:PublicationDate .
+oplli:distance owl:equivalentProperty dbpedia:Distance . 
+oplli:industry owl:equivalentProperty dbpedia:Industry .
+oplli:interests owl:equivalentProperty dbpedia:Interest .
+oplli:language owl:equivalentProperty dbpedia:Language .
+oplli:location_name owl:equivalentProperty dbpedia:Location .
+oplli:main_address owl:equivalentProperty dbpedia:Address .
+oplli:patent owl:equivalentProperty dbpedia:Patent .
+oplli:title owl:equivalentProperty dbpedia:Position .
+oplli:publisher_name owl:equivalentProperty dbpedia:Publisher .
+oplli:company_name owl:equivalentProperty dbpedia:Company .
+oplli:patent_status owl:equivalentProperty dbpedia:Status .
+oplli:patent_number rdfs:subPropertyOf dbpedia:Number .
+oplli:certification_number rdfs:subPropertyOf dbpedia:Number .
+oplli:phone_number rdfs:subPropertyOf dbpedia:Number .
+oplli:skill_years_of_experience rdfs:subPropertyOf dbpedia:Number .
+oplli:company_type rdfs:subPropertyOf dbpedia:Type .
+oplli:im_account_type rdfs:subPropertyOf dbpedia:Type .
+oplli:phone_number_type rdfs:subPropertyOf dbpedia:Type .
+oplli:recommendation_type rdfs:subPropertyOf dbpedia:Type . 
+oplli:member_url_resource rdfs:subPropertyOf dbpedia:Source . 
+oplli:picture_url rdfs:subPropertyOf dbpedia:Source . 
+oplli:public_profile_url rdfs:subPropertyOf dbpedia:Source . 
+oplli:member_shared_resource_url rdfs:subPropertyOf dbpedia:Source . 
+oplli:patent_url rdfs:subPropertyOf dbpedia:Source . 
+oplli:publication_url rdfs:subPropertyOf dbpedia:Source . 
+oplli:inventor_person rdfs:subPropertyOf dbpedia:Person . 
+oplli:author_name rdfs:subPropertyOf dbpedia:Author . 
+oplli:author_person rdfs:subPropertyOf dbpedia:Author . 
+
+oplli:Company owl:equivalentClass gr:BusinessEntity .
+
+oplli:Language owl:equivalentClass <http://www.openlinksw.com/schemas/rdfs/Language#this> .
+
+oplli:Publication	owl:equivalentClass umbelrc:ScholarlyArticle .
+
+oplli:date_of_birth owl:equivalentProperty <http://www.openlinksw.com/schemas/rdfs/birthDate#this> .
+
+oplli:has_phone_number owl:equivalentProperty <http://www.openlinksw.com/schemas/rdfs/telephone#this> .
+
+
+oplog:Account owl:equivalentClass foaf:OnlineAccount .
+oplog:Group owl:equivalentClass foaf:Group .
+oplog:Note rdfs:subClassOf foaf:Document .
+oplog:Photo rdfs:subClassOf foaf:Image . 
+oplog:User rdfs:subClassOf foaf:Person . 
+oplog:Image owl:equivalentClass foaf:Image . 
+oplog:Album rdfs:subClassOf mo:ReleaseType .
+oplog:Application rdfs:subClassOf dbpedia:Software . 
+
+oplog:has_picture rdfs:subPropertyOf foaf:img .
+oplog:picture rdfs:subPropertyOf foaf:img .
+oplog:has_photo rdfs:subPropertyOf foaf:img .
+oplog:photos rdfs:subPropertyOf foaf:img .
+oplog:has_account rdfs:subPropertyOf foaf:page .
+oplog:name rdfs:subPropertyOf foaf:name .
+oplog:uri rdfs:subPropertyOf foaf:homepage .
+oplog:website rdfs:subPropertyOf foaf:homepage .
+oplog:has_interest owl:equivalentProperty foaf:interest .
+oplog:first_name owl:equivalentProperty foaf:firstName .
+oplog:last_name owl:equivalentProperty foaf:lastName .
+oplog:gender owl:equivalentProperty foaf:gender .
+oplog:birthday owl:equivalentProperty foaf:birthday .
+oplog:has_friend rdfs:subPropertyOf foaf:knows .
+oplog:email owl:equivalentProperty foaf:mbox .
+oplog:mobile_phone rdfs:subPropertyOf foaf:phone . 
+
+oplog:Post owl:equivalentClass sioc:Post .
+oplog:Activity owl:equivalentClass sioc:Post .
+oplog:Account owl:equivalentClass sioc:UserAccount .
+oplog:Comment owl:equivalentClass sioc:Post .
+
+oplog:email owl:equivalentProperty sioc:email .
+oplog:id owl:equivalentProperty sioc:id .
+oplog:third_party_id rdfs:subPropertyOf sioc:id .
+oplog:updated_time owl:equivalentProperty sioc:last_activity_date .
+oplog:link owl:equivalentProperty sioc:link .
+oplog:name rdfs:subPropertyOf sioc:name .
+oplog:notes rdfs:subPropertyOf sioc:note .
+
+oplog:id owl:equivalentProperty dc:identifier .
+oplog:third_party_id rdfs:subPropertyOf dc:identifier .
+oplog:album_type rdfs:subPropertyOf dc:type .
+oplog:description owl:equivalentProperty dc:description .
+oplog:height rdfs:subPropertyOf dc:format .
+oplog:width rdfs:subPropertyOf dc:format .
+oplog:tagged_by rdfs:subPropertyOf dc:source .
+oplog:link rdfs:subPropertyOf dc:source .
+oplog:uri rdfs:subPropertyOf dc:source .
+oplog:username rdfs:subPropertyOf dc:publisher .
+oplog:updated_time rdfs:subPropertyOf dc:date .
+oplog:birthday rdfs:subPropertyOf dc:date .
+oplog:languages rdfs:subPropertyOf dc:language .
+
+oplog:id owl:equivalentProperty dcterms:identifier .
+oplog:third_party_id rdfs:subPropertyOf dcterms:identifier .
+oplog:album_type rdfs:subPropertyOf dcterms:type .
+oplog:description owl:equivalentProperty dcterms:description .
+oplog:height rdfs:subPropertyOf dcterms:format .
+oplog:width rdfs:subPropertyOf dcterms:format .
+oplog:tagged_by rdfs:subPropertyOf dcterms:source .
+oplog:link rdfs:subPropertyOf dcterms:source .
+oplog:uri rdfs:subPropertyOf dcterms:source .
+oplog:username rdfs:subPropertyOf dcterms:publisher .
+oplog:updated_time rdfs:subPropertyOf dcterms:date .
+oplog:birthday rdfs:subPropertyOf dcterms:date .
+oplog:languages rdfs:subPropertyOf dcterms:language .
+oplog:education rdfs:subPropertyOf dcterms:educationLevel .
+
+oplog:Photo owl:equivalentClass bibo:Image . 
+oplog:Book owl:equivalentClass bibo:Book . 
+oplog:Movie owl:equivalentClass bibo:Film . 
+oplog:Note owl:equivalentClass bibo:Note . 
+oplog:id owl:equivalentProperty bibo:identifier .
+oplog:third_party_id rdfs:subPropertyOf bibo:identifier .
+
+oplog:Event owl:equivalentClass event:Event .
+
+oplog:birthday owl:equivalentProperty vcard:BDAY .
+oplog:email owl:equivalentProperty vcard:EMAIL .
+oplog:last_name owl:equivalentProperty vcard:Family .
+oplog:has_photo rdfs:subPropertyOf vcard:PHOTO .
+oplog:photos rdfs:subPropertyOf vcard:PHOTO .
+oplog:has_variant rdfs:subPropertyOf vcard:PHOTO .
+oplog:mobile_phone rdfs:subPropertyOf vcard:TEL .
+oplog:notes rdfs:subPropertyOf vcard:NOTE .
+oplog:tagged_by rdfs:subPropertyOf vcard:SOURCE .
+oplog:link rdfs:subPropertyOf vcard:SOURCE .
+oplog:uri rdfs:subPropertyOf vcard:SOURCE .
+oplog:address owl:equivalentProperty vcard:ADR .
+oplog:locale owl:equivalentProperty vcard:Locality .
+oplog:timezone owl:equivalentProperty vcard:TZ .     
+oplog:middle_name rdfs:subPropertyOf vcard:Other .     
+oplog:id rdfs:subPropertyOf vcard:UID	.
+oplog:third_party_id rdfs:subPropertyOf vcard:UID .
+oplog:category rdfs:subPropertyOf vcard:CATEGORIES .
+
+oplog:Activity owl:equivalentClass dbpedia:Activity .
+oplog:updated_time rdfs:subPropertyOf dbpedia:Date .
+oplog:birthday rdfs:subPropertyOf dbpedia:Date .
+oplog:address owl:equivalentProperty dbpedia:Address .
+oplog:notes rdfs:subPropertyOf dbpedia:Note .
+oplog:location owl:equivalentProperty dbpedia:Location .
+oplog:birthday owl:equivalentProperty dbpedia:BirthDate .
+oplog:gender owl:equivalentProperty dbpedia:Genre .
+oplog:languages rdfs:subPropertyOf dbpedia:Language .
+oplog:education owl:equivalentProperty dbpedia:Education .
+oplog:has_interest rdfs:subPropertyOf dbpedia:Interest .
+oplog:address owl:equivalentProperty dbpedia:Address .
+oplog:album_type rdfs:subPropertyOf dbpedia:Type .
+oplog:tagged_by rdfs:subPropertyOf dbpedia:Source . 
+oplog:link rdfs:subPropertyOf dbpedia:Source . 
+oplog:uri rdfs:subPropertyOf dbpedia:Source . 
+
+oplbase:social_profile_url rdfs:subPropertyOf foaf:homepage .
+oplli:public_profile_url rdfs:subPropertyOf oplbase:social_profile_url .
+oplog:public_profile_url rdfs:subPropertyOf oplbase:social_profile_url .
+opltw:public_profile_url rdfs:subPropertyOf oplbase:social_profile_url .
+
 ', '', 'virtrdf-label');
 
 rdfs_rule_set ('virtrdf-label', 'virtrdf-label');
diff --git a/binsrc/rdf_mappers/xslt/main/abmeta2rdfxml.xsl b/binsrc/rdf_mappers/xslt/main/abmeta2rdfxml.xsl
index 0ffec56..527224b 100644
--- a/binsrc/rdf_mappers/xslt/main/abmeta2rdfxml.xsl
+++ b/binsrc/rdf_mappers/xslt/main/abmeta2rdfxml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: abmeta2rdfxml.xsl,v 1.1.2.3 2010/12/09 12:36:06 source Exp $
+ -  $Id: abmeta2rdfxml.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/amazon2rdf.xsl b/binsrc/rdf_mappers/xslt/main/amazon2rdf.xsl
index 452c0d9..8bde2cc 100644
--- a/binsrc/rdf_mappers/xslt/main/amazon2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/amazon2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: amazon2rdf.xsl,v 1.1.2.21 2011/03/29 22:52:06 source Exp $
+ -  $Id: amazon2rdf.xsl,v 1.1.2.30 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,19 +26,22 @@
 <!ENTITY book "http://purl.org/NET/book/vocab#">
 <!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dbpedia "http://dbpedia.org/ontology/">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY review "http:/www.purl.org/stuff/rev#">
-<!ENTITY amz "http://webservices.amazon.com/AWSECommerceService/2005-10-05">
+<!ENTITY pto "http://www.productontology.org/id/">
+<!ENTITY amz "http://webservices.amazon.com/AWSECommerceService/2011-08-01">
 <!ENTITY oplamz "http://www.openlinksw.com/schemas/amazon#">
 ]>
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:rdf="&rdf;"
@@ -47,25 +50,31 @@
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
     xmlns:gr="&gr;"
+    xmlns:pto="&pto;" 
     xmlns:book="&book;"
+    xmlns:dbpedia="&dbpedia;"
     xmlns:dc="&dc;"
     xmlns:dcterms="&dcterms;"
     xmlns:review="&review;"
+	  xmlns:opl="&opl;"
     xmlns:owl="&owl;"
     xmlns:cl="&cl;"
     xmlns:amz="&amz;"
-    xmlns:oplamz="&oplamz;">
+	  xmlns:oplamz="&oplamz;"
+	  version="1.0">
 
     <xsl:output method="xml" indent="yes" />
-
     <xsl:param name="baseUri" />
     <xsl:param name="asin" />
     <xsl:param name="currentDateTime"/>
     <xsl:param name="associate_key"/>
     <xsl:param name="wish_list" />
-
-    <xsl:variable name="resourceURL"><xsl:value-of select="vi:proxyIRI (concat ('http://www.amazon.com/o/ASIN/', $asin))"/></xsl:variable>
-    <xsl:variable name="base"><xsl:value-of select="concat ('http://www.amazon.com/o/ASIN/', $asin)"/></xsl:variable>
+  <xsl:variable name="resourceURL">
+    <xsl:value-of select="vi:proxyIRI (concat ('http://www.amazon.com/o/ASIN/', $asin))"/>
+  </xsl:variable>
+  <xsl:variable name="base">
+    <xsl:value-of select="concat ('http://www.amazon.com/o/ASIN/', $asin)"/>
+  </xsl:variable>
     <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
     <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
 
@@ -123,21 +132,34 @@
 				<owl:sameAs rdf:resource="{$docIRI}"/>
 			</rdf:Description>
             <rdf:Description rdf:about="{$resourceURL}">
+						<xsl:variable name="brand" select="//amz:ItemAttributes/amz:Brand"/>
+						<xsl:variable name="model" select="//amz:ItemAttributes/amz:Model"/>
 			    <rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 			    <rdf:type rdf:resource="&oplamz;Product" />
+                  				<opl:providedBy>
+                  					<foaf:Organization rdf:about="http://www.amazon.com#this">
+                  						<foaf:name>Amazon</foaf:name>
+                  						<foaf:homepage rdf:resource="http://www.amazon.com"/>
+                  					</foaf:Organization>
+                  				</opl:providedBy>
 	    		<sioc:has_container rdf:resource="{$docproxyIRI}"/>
+                        <xsl:if test="string-length($brand) > 0 or string-length($model) > 0">
                 <gr:hasMakeAndModel>
 					<rdf:Description rdf:about="{vi:proxyIRI ($base, '', 'MakeAndModel')}">
 						<rdf:type rdf:resource="&gr;ProductOrServiceModel"/>
 						<rdf:type rdf:resource="&oplamz;Product"/>
-						<rdfs:label><xsl:value-of select="//amz:ItemAttributes/amz:Brand"/></rdfs:label>
-						<xsl:variable name="brand" select="//amz:ItemAttributes/amz:Brand"/>
-						<xsl:variable name="model" select="//amz:ItemAttributes/amz:Model"/>
-		               	<rdfs:comment><xsl:value-of select="concat($brand, ' ', $model)"/> </rdfs:comment>
-
+                <rdfs:label>
+                                   <xsl:value-of select="vi:trim(concat($brand, ' ', $model), ' ')"/>
+                </rdfs:label>
+                <rdfs:comment>
+                                  <xsl:value-of select="vi:trim(concat($brand, ' ', $model), ' ')"/>
+                </rdfs:comment>
 					    <xsl:apply-templates select="//amz:ItemAttributes" mode="manufacturer" />
                     </rdf:Description>
                 </gr:hasMakeAndModel>
+                        </xsl:if>
+
+  	    <gr:hasBrand rdf:resource="{vi:proxyIRI ($base, '', 'Brand')}" />
                 <xsl:choose>
 					<xsl:when test="//amz:ProductGroup[ . = 'Book']">
 						<rdf:type rdf:resource="&bibo;Book"/>
@@ -150,23 +172,49 @@
 				<xsl:apply-templates select="//amz:ItemAttributes"/>
 				<xsl:apply-templates select="//amz:CustomerReviews"/>
 			</rdf:Description>
+
+          <!-- Add reference to gr:Brand object -->
+            <gr:Brand rdf:about="{vi:proxyIRI ($base, '', 'Brand')}">
+              <xsl:variable name="brand" select="//amz:ItemAttributes/amz:Brand[1]|//amz:ItemAttributes/amz:Author[1]" />
+						<gr:name>
+							<xsl:value-of select="$brand"/>
+						</gr:name>
+						<rdfs:label>
+							<xsl:value-of select="$brand"/>
+						</rdfs:label>
+          <!--     <rdf:type resource="&gr;Brand" /> -->
+            </gr:Brand>
 					<xsl:if test="//amz:ItemAttributes/amz:ListPrice">
 						<gr:Offering rdf:about="{vi:proxyIRI($base, '', 'ListOffer')}">
+                         				<opl:providedBy>
+                         					<foaf:Organization rdf:about="http://www.amazon.com#this">
+                         						<foaf:name>Amazon</foaf:name>
+                         						<foaf:homepage rdf:resource="http://www.amazon.com"/>
+                         					</foaf:Organization>
+                         				</opl:providedBy>
 							<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
-							<gr:validFrom rdf:datatype="&xsd;dateTime"><xsl:value-of select="$currentDateTime"/></gr:validFrom>
+              <gr:validFrom rdf:datatype="&xsd;dateTime">
+                <xsl:value-of select="$currentDateTime"/>
+              </gr:validFrom>
 							<gr:includes rdf:resource="{$resourceURL}"/>
 							<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
 							<gr:availableDeliveryMethods rdf:resource="&gr;UPS"/>
 							<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModeMail"/>
-							<rdfs:label><xsl:value-of select="concat('List offer: ', //amz:ItemAttributes/amz:Title)"/></rdfs:label>
+              <rdfs:label>
+                <xsl:value-of select="concat('List offer: ', //amz:ItemAttributes/amz:Title)"/>
+              </rdfs:label>
 							<oplamz:hasListPrice>
 								<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($base, '', 'ListPrice')}">
 									<rdfs:label>
 										<xsl:value-of select="concat( //amz:ItemAttributes/amz:ListPrice/amz:Amount div 100, ' (', //amz:ItemAttributes/amz:ListPrice/amz:CurrencyCode ,')')"/>	
 									</rdfs:label>
 									<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>	
-									<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="//amz:ItemAttributes/amz:ListPrice/amz:Amount div 100"/></gr:hasCurrencyValue>
-									<gr:hasCurrency rdf:datatype="&xsd;string"><xsl:value-of select="//amz:ItemAttributes/amz:ListPrice/amz:CurrencyCode"/></gr:hasCurrency>
+                  <gr:hasCurrencyValue rdf:datatype="&xsd;float">
+                    <xsl:value-of select="//amz:ItemAttributes/amz:ListPrice/amz:Amount div 100"/>
+                  </gr:hasCurrencyValue>
+                  <gr:hasCurrency rdf:datatype="&xsd;string">
+                    <xsl:value-of select="//amz:ItemAttributes/amz:ListPrice/amz:CurrencyCode"/>
+                  </gr:hasCurrency>
 									<gr:priceType rdf:datatype="&xsd;string">List price</gr:priceType>
 								</gr:UnitPriceSpecification>
 							</oplamz:hasListPrice>
@@ -190,69 +238,111 @@
 			    <owl:sameAs rdf:resource="{concat ($base, '/ref=nosim/', $associate_key)}"/>
 			</xsl:if>		    
 	    	<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
-		    <gr:validFrom rdf:datatype="&xsd;dateTime"><xsl:value-of select="$currentDateTime"/></gr:validFrom>
+      <gr:validFrom rdf:datatype="&xsd;dateTime">
+        <xsl:value-of select="$currentDateTime"/>
+      </gr:validFrom>
 	    	<gr:includes rdf:resource="{$resourceURL}"/>
+ 			<opl:providedBy>
+ 				<foaf:Organization rdf:about="http://www.amazon.com#this">
+ 					<foaf:name>Amazon</foaf:name>
+ 					<foaf:homepage rdf:resource="http://www.amazon.com"/>
+ 				</foaf:Organization>
+ 			</opl:providedBy>
+
 		    <gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
 			<gr:availableDeliveryMethods rdf:resource="&gr;UPS"/>
 			<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModeMail"/>
-	    	<rdfs:label><xsl:value-of select="concat('Offer ', position(), ':', //amz:ItemAttributes/amz:Title)"/></rdfs:label>
-			<gr:hasEAN_UCC-13><xsl:value-of select="//amz:ItemAttributes/amz:EAN"/></gr:hasEAN_UCC-13>
-			<oplamz:condition><xsl:value-of select="./amz:OfferAttributes/amz:Condition"/></oplamz:condition>
-			<oplamz:conditionNote><xsl:value-of select="./amz:OfferAttributes/amz:ConditionNote"/></oplamz:conditionNote>
-			<oplamz:availability><xsl:value-of select="./amz:OfferListing/amz:Availability"/></oplamz:availability>
-			<oplamz:offerListingId><xsl:value-of select="./amz:OfferListing/amz:OfferListingId"/></oplamz:offerListingId>
-			<oplamz:merchantId><xsl:value-of select="./amz:Merchant/amz:MerchantId"/></oplamz:merchantId>
+      <rdfs:label>
+        <xsl:value-of select="concat('Offer ', position(), ':', //amz:ItemAttributes/amz:Title)"/>
+      </rdfs:label>
+			<xsl:if test="string-length(//amz:ItemAttributes/amz:EAN) > 0">
+				<gr:hasEAN_UCC-13>
+					<xsl:value-of select="//amz:ItemAttributes/amz:EAN"/>
+				</gr:hasEAN_UCC-13>
+			</xsl:if>
+      <oplamz:condition>
+        <xsl:value-of select="./amz:OfferAttributes/amz:Condition"/>
+      </oplamz:condition>
+			<xsl:if test="string-length(./amz:OfferAttributes/amz:ConditionNote) > 0">
+				<oplamz:conditionNote>
+					<xsl:value-of select="./amz:OfferAttributes/amz:ConditionNote"/>
+				</oplamz:conditionNote>
+			</xsl:if>
+      <oplamz:availability>
+        <xsl:value-of select="./amz:OfferListing/amz:Availability"/>
+      </oplamz:availability>
+      <oplamz:offerListingId>
+        <xsl:value-of select="./amz:OfferListing/amz:OfferListingId"/>
+      </oplamz:offerListingId>
 			<gr:hasPriceSpecification>
 		  		<gr:UnitPriceSpecification rdf:about="{concat(vi:proxyIRI ($base, '', 'OfferPrice_'), position())}">
 					<rdfs:label>
 						<xsl:value-of select="concat( ./amz:OfferListing/amz:Price/amz:Amount div 100, ' (', ./amz:OfferListing/amz:Price/amz:CurrencyCode ,')')"/>	
 					</rdfs:label>
 					<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
-            		<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="./amz:OfferListing/amz:Price/amz:Amount div 100"/></gr:hasCurrencyValue>
-            		<gr:hasCurrency rdf:datatype="&xsd;string"><xsl:value-of select="./amz:OfferListing/amz:Price/amz:CurrencyCode"/></gr:hasCurrency>
+          <gr:hasCurrencyValue rdf:datatype="&xsd;float">
+            <xsl:value-of select="./amz:OfferListing/amz:Price/amz:Amount div 100"/>
+          </gr:hasCurrencyValue>
+          <gr:hasCurrency rdf:datatype="&xsd;string">
+            <xsl:value-of select="./amz:OfferListing/amz:Price/amz:CurrencyCode"/>
+          </gr:hasCurrency>
 					<gr:priceType rdf:datatype="&xsd;string">offer price</gr:priceType>
           		</gr:UnitPriceSpecification>
 			</gr:hasPriceSpecification>
+			<xsl:if test="./amz:OfferListing/amz:SalePrice">
+			<oplamz:hasSalePrice>
+				<gr:UnitPriceSpecification rdf:about="{concat(vi:proxyIRI ($base, '', 'SalePrice_'), position())}">
+					<rdfs:label>
+						<xsl:value-of select="concat( ./amz:OfferListing/amz:SalePrice/amz:Amount div 100, ' (', ./amz:OfferListing/amz:SalePrice/amz:CurrencyCode ,')')"/>	
+					</rdfs:label>
+					<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>	
+          <gr:hasCurrencyValue rdf:datatype="&xsd;float">
+            <xsl:value-of select="./amz:OfferListing/amz:SalePrice/amz:Amount div 100"/>
+          </gr:hasCurrencyValue>
+          <gr:hasCurrency rdf:datatype="&xsd;string">
+            <xsl:value-of select="./amz:OfferListing/amz:SalePrice/amz:CurrencyCode"/>
+          </gr:hasCurrency>
+					<gr:priceType rdf:datatype="&xsd;string">sale price</gr:priceType>
+				</gr:UnitPriceSpecification>
+			</oplamz:hasSalePrice>
+			</xsl:if>
 		</xsl:element>
-
-		<xsl:element namespace="&gr;" name="BusinessEntity">
-			<xsl:attribute name='rdf:about'>
-				<xsl:value-of select="concat (vi:proxyIRI($base, '', 'Vendor_'), position())"/>
-			</xsl:attribute>
-			<rdfs:comment>The legal agent making the offering</rdfs:comment>
-			<!-- MERCHANTID_{merchant id} will be replaced by merchant name/nickname by cartridge hook function -->
-		    <rdfs:label><xsl:value-of select="concat('MERCHANTID_', ./amz:Merchant/amz:MerchantId)"/></rdfs:label>
-		    <gr:legalName><xsl:value-of select="concat('MERCHANTID_', ./amz:Merchant/amz:MerchantId)"/></gr:legalName>
-		    <gr:offers>
-				<xsl:attribute name='rdf:resource'>
-					<xsl:value-of select="concat (vi:proxyIRI($base, '', 'Offer_'), position())"/>
-				</xsl:attribute>
-			</gr:offers>
-		  	<rdfs:seeAlso rdf:resource="{./amz:Merchant/amz:GlancePage}"/>
-		  	<oplamz:vendorSynopsisUrl rdf:resource="{./amz:Merchant/amz:GlancePage}"/>
-		</xsl:element>
-
 		<!-- shortcuts -->
 		<rdf:Description rdf:about="{$docproxyIRI}">
-			<foaf:topic rdf:resource="{concat (vi:proxyIRI ($base, '', 'Vendor_'), position())}"/>
 			<foaf:topic rdf:resource="{concat (vi:proxyIRI ($base, '', 'Offer_'), position())}"/>
 		</rdf:Description>
     </xsl:template>
 
     <xsl:template match="amz:CustomerReviews/amz:AverageRating">
-		<review:rating><xsl:value-of select="."/></review:rating>
+    <review:rating>
+      <xsl:value-of select="."/>
+    </review:rating>
     </xsl:template>
 
     <xsl:template match="amz:CustomerReviews/amz:Review">
 		<review:hasReview>
 			<review:Review rdf:about="{vi:proxyIRI ($base, '', concat('Review_', amz:CustomerId))}">
-				<rdfs:label><xsl:value-of select="amz:Summary"/></rdfs:label>
-				<review:title><xsl:value-of select="amz:Summary"/></review:title>
-				<review:text><xsl:value-of select="amz:Content"/></review:text>
-				<review:reviewer><xsl:value-of select="concat('http://www.amazon.com/gp/pdp/profile/', amz:CustomerId)"/></review:reviewer>
-				<review:rating><xsl:value-of select="amz:Rating"/></review:rating>
-				<review:totalVotes><xsl:value-of select="amz:HelpfulVotes"/></review:totalVotes>
-				<dc:date><xsl:value-of select="amz:Date"/></dc:date>
+        <rdfs:label>
+          <xsl:value-of select="amz:Summary"/>
+        </rdfs:label>
+        <review:title>
+          <xsl:value-of select="amz:Summary"/>
+        </review:title>
+        <review:text>
+          <xsl:value-of select="amz:Content"/>
+        </review:text>
+        <review:reviewer>
+          <xsl:value-of select="concat('http://www.amazon.com/gp/pdp/profile/', amz:CustomerId)"/>
+        </review:reviewer>
+        <review:rating>
+          <xsl:value-of select="amz:Rating"/>
+        </review:rating>
+        <review:totalVotes>
+          <xsl:value-of select="amz:HelpfulVotes"/>
+        </review:totalVotes>
+        <dc:date>
+          <xsl:value-of select="amz:Date"/>
+        </dc:date>
 			</review:Review>
 		</review:hasReview>
     </xsl:template>
@@ -260,12 +350,20 @@
     <xsl:template match="amz:ItemAttributes/amz:Manufacturer" mode="manufacturer">
 		<gr:hasManufacturer>
 			<gr:BusinessEntity rdf:about="{vi:proxyIRI ($base, '', 'Manufacturer')}">
-				<rdfs:label><xsl:value-of select="."/></rdfs:label>
-				<gr:legalName><xsl:value-of select="."/></gr:legalName>
+        <rdfs:label>
+          <xsl:value-of select="."/>
+        </rdfs:label>
+        <gr:legalName>
+          <xsl:value-of select="."/>
+        </gr:legalName>
 			</gr:BusinessEntity>
 		</gr:hasManufacturer>
     </xsl:template>
 
+    <xsl:template match="amz:ItemAttributes/amz:Manufacturer">
+	<rdf:type rdf:resource="{concat('&pto;', .)}" />
+    </xsl:template>
+    
     <xsl:template match="amz:ItemAttributes/amz:Publisher">
 		<dcterms:publisher>
                         <xsl:value-of select="."/>
@@ -273,29 +371,77 @@
     </xsl:template>
 
     <xsl:template match="amz:Item/amz:ASIN">
-		<oplamz:ASIN><xsl:value-of select="."/></oplamz:ASIN>
+    <oplamz:ASIN>
+      <xsl:value-of select="."/>
+    </oplamz:ASIN>
+    </xsl:template>
+
+    <xsl:template match="amz:Item/amz:SmallImage">
+		<foaf:depiction rdf:resource="{URL}"/>
+    </xsl:template>
+
+    <xsl:template match="amz:Item/amz:MediumImage">
+		<foaf:depiction rdf:resource="{URL}"/>
     </xsl:template>
+	
+    <xsl:template match="amz:Item/amz:LargeImage">
+		<foaf:depiction rdf:resource="{URL}"/>
+    </xsl:template>
+
+    <xsl:template match="amz:Item/amz:ImageSets">
+		<xsl:for-each select="ImageSet/SwatchImage">
+			<foaf:depiction rdf:resource="{URL}"/>
+		</xsl:for-each>
+    </xsl:template>
+	
     <xsl:template match="amz:Item/amz:DetailPageURL">
-		<oplamz:DetailPageURL><xsl:value-of select="."/></oplamz:DetailPageURL>
+    <oplamz:DetailPageURL>
+      <xsl:value-of select="."/>
+    </oplamz:DetailPageURL>
     </xsl:template>
 
     <xsl:template match="amz:ItemAttributes/amz:Color">
-		<oplamz:color><xsl:value-of select="."/></oplamz:color>
+    <oplamz:color>
+      <xsl:value-of select="."/>
+    </oplamz:color>
     </xsl:template>
+  
     <xsl:template match="amz:ItemAttributes/amz:EAN">
-		<gr:hasEAN_UCC-13><xsl:value-of select="."/></gr:hasEAN_UCC-13>
+    <gr:hasEAN_UCC-13>
+      <xsl:value-of select="."/>
+    </gr:hasEAN_UCC-13>
     </xsl:template>
+  
     <xsl:template match="amz:ItemAttributes/amz:Title">
-		<rdfs:comment><xsl:value-of select="."/></rdfs:comment>
-		<dc:title><xsl:value-of select="."/></dc:title>
-        <rdfs:label><xsl:value-of select="concat('Product:', .)"/></rdfs:label>
+    <rdfs:comment>
+      <xsl:value-of select="."/>
+    </rdfs:comment>
+    <dc:title>
+      <xsl:value-of select="."/>
+    </dc:title>
+    <rdfs:label>
+			<xsl:choose>
+				<xsl:when test="//amz:ProductGroup[ . = 'Book']">
+					<xsl:value-of select="concat('Book: ', .)"/>
+				</xsl:when>
+				<xsl:otherwise>
+      <xsl:value-of select="concat('Product:', .)"/>
+				</xsl:otherwise>
+			</xsl:choose>
+    </rdfs:label>
     </xsl:template>
+  
     <xsl:template match="amz:ItemAttributes/amz:ProductGroup">
-		<oplamz:productGroup><xsl:value-of select="."/></oplamz:productGroup>
+    <oplamz:productGroup>
+      <xsl:value-of select="."/>
+    </oplamz:productGroup>
+		<rdf:type rdf:resource="{concat('&pto;', .)}" />
     </xsl:template>
 
     <xsl:template match="amz:ItemAttributes/amz:Feature">
-		<oplamz:feature><xsl:value-of select="."/></oplamz:feature>
+    <oplamz:feature>
+      <xsl:value-of select="."/>
+    </oplamz:feature>
     </xsl:template>
 
     <xsl:template match="amz:ItemAttributes/amz:PackageDimensions/Height">
@@ -307,7 +453,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (INH)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -316,7 +464,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 			</gr:QuantitativeValueFloat>
@@ -332,7 +482,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">LBR</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (LBR)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (LBR)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -341,7 +493,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(., ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(., ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 	  		</gr:QuantitativeValueFloat>
@@ -357,7 +511,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (INH)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -366,7 +522,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 			</gr:QuantitativeValueFloat>
@@ -385,7 +543,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (INH)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -394,7 +554,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 			</gr:QuantitativeValueFloat>
@@ -410,7 +572,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (INH)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -419,7 +583,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 			</gr:QuantitativeValueFloat>
@@ -435,7 +601,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">LBR</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (LBR)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (LBR)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -444,7 +612,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 	  		</gr:QuantitativeValueFloat>
@@ -460,7 +630,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (INH)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -469,7 +641,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 			</gr:QuantitativeValueFloat>
@@ -485,7 +659,9 @@
 							<xsl:value-of select=". div 100"/>
 						</gr:hasValueFloat>
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. div 100, ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. div 100, ' (INH)')"/>
+            </rdfs:label>
 					</xsl:when>
 					<xsl:otherwise>
 						<gr:hasValueFloat rdf:datatype="&xsd;float">
@@ -494,7 +670,9 @@
 						<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">
 							<xsl:value-of select="@Units"/>
 						</gr:hasUnitOfMeasurement>
-						<rdfs:label><xsl:value-of select="concat(. , ' (', @Units, ')')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(. , ' (', @Units, ')')"/>
+            </rdfs:label>
 					</xsl:otherwise>
 				</xsl:choose>
 			</gr:QuantitativeValueFloat>
@@ -510,23 +688,33 @@
 	    	</xsl:element>
 		</xsl:if>
     </xsl:template>
-
     <!-- BIBO OWL -->
+  
     <xsl:template match="amz:ItemAttributes/amz:ASIN" mode="bibo">
-		<bibo:asin><xsl:value-of select="."/></bibo:asin>
+    <bibo:asin>
+      <xsl:value-of select="."/>
+    </bibo:asin>
     </xsl:template>
 
     <xsl:template match="amz:ItemAttributes/amz:Author" mode="bibo">
-      <bibo:authorList rdf:parseType="Collection">
-        <rdf:Description rdf:about="{vi:proxyIRI ($base, '', 'Author')}">
-	    <rdf:value><xsl:value-of select="."/></rdf:value>
-	</rdf:Description>
-      </bibo:authorList>
+		<dcterms:creator>
+			<xsl:value-of select="."/>
+		</dcterms:creator>
+      <dbpedia:author>
+        <foaf:Person rdf:about="{vi:proxyIRI ($base, '', translate(., ' ', '_'))}">
+				<foaf:name>
+					<xsl:value-of select="."/>
+				</foaf:name>
+        </foaf:Person>
+      </dbpedia:author>
     </xsl:template>
 
     <xsl:template match="text()|@*"/>
+  
     <xsl:template match="text()|@*" mode="offering" />
+  
     <xsl:template match="text()|@*" mode="manufacturer" />
-    <xsl:template match="text()|@*" mode="bibo" />
 
+  <xsl:template match="text()|@*" mode="bibo"/>
 </xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/angellist2rdf.xsl b/binsrc/rdf_mappers/xslt/main/angellist2rdf.xsl
new file mode 100644
index 0000000..f5ad1e5
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/angellist2rdf.xsl
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: angellist2rdf.xsl,v 1.1.2.2 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY oplangel "http://www.openlinksw.com/schemas/angel#">
+<!ENTITY oplli "http://www.openlinksw.com/schemas/linkedin#">
+<!ENTITY opltw "http://www.openlinksw.com/schemas/twitter#">
+<!ENTITY oplog "http://www.openlinksw.com/schemas/opengraph#">
+<!ENTITY oplbase "http://www.openlinksw.com/schemas/oplbase#">
+]>
+
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:oplangel="&oplangel;"
+    xmlns:opltw="&opltw;"
+    xmlns:oplli="&oplli;"
+    xmlns:oplog="&oplog;"
+    xmlns:oplbase="&oplbase;"
+    xmlns:gn="http://www.geonames.org/ontology#" 
+    xmlns:foaf="&foaf;"
+    version="1.0">
+    
+  <xsl:output method="xml" indent="yes"/>
+  
+  <xsl:param name="baseUri"/>
+  <xsl:param name="type"/>
+  <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+  
+  <xsl:template match="/">
+    <rdf:RDF>
+      <rdf:Description rdf:about="{$resourceURL}">
+        <xsl:choose>
+          <xsl:when test="normalize-space($type)='Person'">
+            <xsl:apply-templates select="/results" mode="person"/>
+          </xsl:when>
+          <xsl:when test="$type='Organization'">
+            <xsl:apply-templates select="/results" mode="organization"/>
+          </xsl:when>
+        </xsl:choose>
+      </rdf:Description>
+    </rdf:RDF>
+  </xsl:template>
+  
+  <!-- Case where agent is a User -->
+  <xsl:template match="results" mode="person">
+    <rdf:type rdf:resource="&oplangel;User" />
+    <xsl:apply-templates mode="person" />
+  </xsl:template>
+  
+  <xsl:template match="name" mode="person">
+    <oplangel:name><xsl:value-of select="." /></oplangel:name>
+  </xsl:template>
+  
+  <xsl:template match="id" mode="person">
+    <oplangel:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplangel:id>
+  </xsl:template>
+  
+  <xsl:template match="follower_count" mode="person">
+    <oplangel:followers rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplangel:followers>
+  </xsl:template>
+
+  <xsl:template match="angellist_url" mode="person">
+    <oplangel:url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="bio" mode="person">
+    <oplangel:bio><xsl:value-of select="normalize-space(./text())" /></oplangel:bio>
+  </xsl:template>
+
+  <xsl:template match="image" mode="person">
+    <oplangel:image rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="blog_url" mode="person">
+    <oplbase:blog_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="twitter_url" mode="person">
+    <opltw:public_profile_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="facebook_url" mode="person">
+    <oplog:public_profile_url rdf:resource="{./text()}" />
+  </xsl:template>
+
+  <xsl:template match="linkedin_url" mode="person">
+    <oplli:public_profile_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="locations" mode="person">
+    <oplangel:has_location>
+      <oplangel:Location rdf:about="{vi:proxyIRI($baseUri, '', concat('Location_', ./id))}">
+        <xsl:apply-templates mode="location" />
+        <rdf:type rdf:resource="&oplangel;Location" />
+      </oplangel:Location>
+    </oplangel:has_location>
+  </xsl:template>
+
+  <xsl:template match="locations" mode="organization">
+    <oplangel:has_location>
+      <oplangel:Location rdf:about="{vi:proxyIRI($baseUri, '', concat('Location_', ./id))}">
+        <xsl:apply-templates mode="location" />
+        <rdf:type rdf:resource="&oplangel;Location" />
+      </oplangel:Location>
+    </oplangel:has_location>
+  </xsl:template>
+  
+  <xsl:template match="roles" mode="person">
+    <oplangel:role><xsl:value-of select="name" /></oplangel:role>
+  </xsl:template>
+  
+  <!-- Case where agent is a Startup -->
+  
+  <xsl:template match="results" mode="organization">
+    <rdf:type rdf:resource="&oplangel;Startup" />
+    <xsl:apply-templates mode="organization" />
+  </xsl:template>
+  
+  <xsl:template match="name" mode="organization">
+    <oplangel:name><xsl:value-of select="." /></oplangel:name>
+  </xsl:template>
+  
+  <xsl:template match="id" mode="organization">
+    <oplangel:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplangel:id>
+  </xsl:template>
+  
+  <xsl:template match="follower_count" mode="organization">
+    <oplangel:followers rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplangel:followers>
+  </xsl:template>
+
+  <xsl:template match="angellist_url" mode="organization">
+    <oplangel:url rdf:resource="{./text()}" />
+  </xsl:template>
+
+  <xsl:template match="logo_url" mode="organization">
+    <oplangel:logo_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="thumb_url" mode="organization">
+    <oplangel:thumb_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="product_desc" mode="organization">
+    <oplangel:product_desc><xsl:value-of select="." /></oplangel:product_desc>
+  </xsl:template>
+  
+  <xsl:template match="high_concept" mode="organization">
+    <oplangel:high_concept><xsl:value-of select="." /></oplangel:high_concept>
+  </xsl:template>
+  
+  <xsl:template match="blog_url" mode="organization">
+    <oplbase:blog_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="twitter_url" mode="organization">
+    <opltw:public_profile_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="facebook_url" mode="organization">
+    <oplog:public_profile_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="video_url" mode="organization">
+    <oplangel:video_url rdf:resource="{./text()}" />
+  </xsl:template>
+
+  <xsl:template match="markets" mode="organization">
+    <oplangel:has_market>
+      <oplangel:Market rdf:about="{vi:proxyIRI($baseUri, '', concat('Market_', ./id))}">
+        <xsl:apply-templates select="*" mode="market" />
+      </oplangel:Market>
+    </oplangel:has_market>
+  </xsl:template>
+  
+  <xsl:template match="display_name|name" mode="market">
+    <oplangel:market_name><xsl:value-of select="." /></oplangel:market_name>
+    <rdfs:label><xsl:value-of select="." /></rdfs:label>
+  </xsl:template>
+  
+  <xsl:template match="angellist_url" mode="market">
+    <oplangel:market_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="id" mode="market">
+    <oplangel:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplangel:id>
+  </xsl:template>
+  
+  <xsl:template match="id" mode="location">
+    <oplangel:location_id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplangel:location_id>
+  </xsl:template>
+  
+  <xsl:template match="name|display_name" mode="location">
+    <oplangel:location_name><xsl:value-of select="." /></oplangel:location_name>
+    <rdfs:label><xsl:value-of select="." /></rdfs:label>
+  </xsl:template>
+  
+  <xsl:template match="angellist_url" mode="location">
+    <oplangel:location_url rdf:resource="{./text()}" />
+  </xsl:template>
+  
+  <xsl:template match="text()|@*"/>
+  <xsl:template match="text()|@*" mode="person" />
+  <xsl:template match="text()|@*" mode="organization" />
+  <xsl:template match="text()|@*" mode="market" />
+  <xsl:template match="text()|@*" mode="location" />
+</xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/atom2rdf.xsl b/binsrc/rdf_mappers/xslt/main/atom2rdf.xsl
index c826500..2c0c3aa 100644
--- a/binsrc/rdf_mappers/xslt/main/atom2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/atom2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: atom2rdf.xsl,v 1.1.2.8 2010/09/09 16:05:47 source Exp $
+ -  $Id: atom2rdf.xsl,v 1.1.2.12 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -64,7 +64,9 @@
   xmlns:georss="&georss;"
   xmlns:gphoto="http://schemas.google.com/photos/2007"
   xmlns:ff="&ff;"
+    xmlns:dcterms="&dcterms;"
   xmlns:foaf="&foaf;"
+    xmlns:opl="http://www.openlinksw.com/schemas/attribution#"
   version="1.0">
 
 <xsl:output indent="yes" cdata-section-elements="content:encoded" />
@@ -129,6 +131,7 @@
 <xsl:template match="a:author">
     <dc:creator><xsl:value-of select="a:name" /> <<xsl:value-of select="a:email" />></dc:creator>
     <foaf:mbox rdf:resource="mailto:{a:email}"/>
+	<opl:email_address_digest rdf:resource="{vi:di-uri (a:email)}"/>
 </xsl:template>
 
 <xsl:template match="a:entry" mode="li">
diff --git a/binsrc/rdf_mappers/xslt/main/atomdoc2rdf.xsl b/binsrc/rdf_mappers/xslt/main/atomdoc2rdf.xsl
index e5b5db4..bb4bf01 100644
--- a/binsrc/rdf_mappers/xslt/main/atomdoc2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/atomdoc2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: atomdoc2rdf.xsl,v 1.1.2.5 2010/09/09 16:05:47 source Exp $
+ -  $Id: atomdoc2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -68,6 +68,7 @@
   xmlns:foaf="&foaf;"
   xmlns:dcterms="&dcterms;"
   xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+  xmlns:opl="http://www.openlinksw.com/schemas/attribution#"
   version="1.0">
 
 <xsl:output indent="yes" cdata-section-elements="content:encoded" />
@@ -142,7 +143,8 @@
 
 <xsl:template match="a:author">
     <dc:creator><xsl:value-of select="a:name" /> <<xsl:value-of select="a:email" />></dc:creator>
-<foaf:mbox rdf:resource="mailto:{a:email}"/>
+    <foaf:mbox rdf:resource="mailto:{a:email}"/>
+    <opl:email_address_digest rdf:resource="{vi:di-uri (a:email)}"/>
 </xsl:template>
 
 <xsl:template match="a:entry" mode="li">
diff --git a/binsrc/rdf_mappers/xslt/main/atomentry2rdf.xsl b/binsrc/rdf_mappers/xslt/main/atomentry2rdf.xsl
index 477f7e3..ff98a36 100644
--- a/binsrc/rdf_mappers/xslt/main/atomentry2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/atomentry2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: atomentry2rdf.xsl,v 1.1.2.10 2011/03/08 13:36:28 source Exp $
+ -  $Id: atomentry2rdf.xsl,v 1.1.2.12 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/bestbuy2rdf.xsl b/binsrc/rdf_mappers/xslt/main/bestbuy2rdf.xsl
index 55f6c6a..886b2ee 100644
--- a/binsrc/rdf_mappers/xslt/main/bestbuy2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/bestbuy2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bestbuy2rdf.xsl,v 1.1.2.22 2011/03/29 22:52:06 source Exp $
+ -  $Id: bestbuy2rdf.xsl,v 1.1.2.29 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,15 +27,18 @@
 <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
 <!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
 <!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
 ]>
-<xsl:stylesheet version="1.0"
+
+<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:vcard="&vcard;"	
@@ -46,23 +49,26 @@
     xmlns:sioc="&sioc;"
     xmlns:owl="&owl;"
     xmlns:dcterms="&dcterms;"
+    xmlns:pto="&pto;" 
     xmlns:gr="&gr;"
     xmlns:bestbuy="http://remix.bestbuy.com/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:cl="&cl;"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"	
-    xmlns:oplbb="&oplbb;">
+    xmlns:opl="&opl;"
+    xmlns:oplbb="&oplbb;"
+    version="1.0">
 
     <xsl:output method="xml" indent="yes" />
-
     <xsl:param name="baseUri"/>
     <xsl:param name="currentDateTime"/>
     <xsl:param name="is_store"/>
     <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
     <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
     <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
-
-    <xsl:variable name="quote"><xsl:text>"</xsl:text></xsl:variable>
+  <xsl:variable name="quote">
+    <xsl:text>"</xsl:text>
+  </xsl:variable>
 
     <xsl:template match="/">
 		<rdf:RDF>
@@ -74,15 +80,29 @@
 						<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
 						<dcterms:subject rdf:resource="{$resourceURL}"/>
 					</rdf:Description>
-					<gr:LocationOfSalesOrServiceProvisioning rdf:about="{$resourceURL}">
+					<gr:Location rdf:about="{$resourceURL}">
+                  				<opl:providedBy>
+                  					<foaf:Organization rdf:about="http://www.bestbuy.com#this">
+                  						<foaf:name>BestBuy</foaf:name>
+                  						<foaf:homepage rdf:resource="http://www.bestbuy.com"/>
+                  					</foaf:Organization>
+                  				</opl:providedBy>
 						<gr:hasOpeningHoursSpecification>
 							<gr:OpeningHoursSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'OpenHoursSpecification')}">
-								<gr:opens><xsl:value-of select="/stores/store/hours"/></gr:opens>
+                <gr:opens>
+                  <xsl:value-of select="/stores/store/hours"/>
+                </gr:opens>
 							</gr:OpeningHoursSpecification>
 						</gr:hasOpeningHoursSpecification>
-						<rdfs:label><xsl:value-of select="/stores/store/longName"/></rdfs:label>
-						<gr:name><xsl:value-of select="/stores/store/name"/></gr:name>
-						<gr:legalName><xsl:value-of select="/stores/store/longName"/></gr:legalName> 
+            <rdfs:label>
+              <xsl:value-of select="/stores/store/longName"/>
+            </rdfs:label>
+            <gr:name>
+              <xsl:value-of select="/stores/store/name"/>
+            </gr:name>
+            <gr:legalName>
+              <xsl:value-of select="/stores/store/longName"/>
+            </gr:legalName>
 						<geo:lat rdf:datatype="&xsd;float">
 							<xsl:value-of select="/stores/store/lat"/>
 						</geo:lat>
@@ -108,10 +128,10 @@
 								<vcard:Extadd>
 									<xsl:value-of select="/stores/store/address"/>
 								</vcard:Extadd>
-								<rdfs:label><xsl:value-of select="concat(/stores/store/address, ', ', /stores/store/city, ', ', /stores/store/postalCode, ', ', /stores/store/country)"/></rdfs:label>
+								<rdfs:label><xsl:value-of select="vi:trim(concat(/stores/store/address, ', ', /stores/store/city, ', ', /stores/store/postalCode, ', ', /stores/store/country), ', ')"/></rdfs:label>
 							</rdf:Description>
 						</vcard:ADR>
-					</gr:LocationOfSalesOrServiceProvisioning>
+					</gr:Location>
 				</xsl:when>
 				<xsl:otherwise>
 			<rdf:Description rdf:about="{$docproxyIRI}">
@@ -124,14 +144,24 @@
 			</rdf:Description>
 
 			<gr:Offering rdf:about="{$resourceURL}">
+                  				<opl:providedBy>
+                  					<foaf:Organization rdf:about="http://www.bestbuy.com#this">
+                  						<foaf:name>BestBuy</foaf:name>
+                  						<foaf:homepage rdf:resource="http://www.bestbuy.com"/>
+                  					</foaf:Organization>
+                  				</opl:providedBy>
 			    <sioc:has_container rdf:resource="{$docproxyIRI}"/>
 			    <gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
-						<rdfs:label><xsl:value-of select="concat('Offer: ', //product/name)"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat('Offer: ', //product/name)"/>
+            </rdfs:label>
 			    <!-- For testing with standalone XSLT processor
 			    <gr:includes rdf:resource="{concat ($baseUri, '#', 'Product')}"/>
 			    -->
 			    <gr:includes rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
-			    <gr:validFrom rdf:datatype="&xsd;dateTime"><xsl:value-of select="$currentDateTime"/></gr:validFrom>
+            <gr:validFrom rdf:datatype="&xsd;dateTime">
+              <xsl:value-of select="$currentDateTime"/>
+            </gr:validFrom>
 			    <gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
 			    <gr:availableDeliveryMethods rdf:resource="&gr;UPS"/>
 			    <gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModeMail"/>
@@ -155,8 +185,17 @@
 			<rdf:Description rdf:about="{concat ($baseUri, '#', 'Product')}">
 			-->
 			<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+                  				<opl:providedBy>
+                  					<foaf:Organization rdf:about="http://www.bestbuy.com#this">
+                  						<foaf:name>BestBuy</foaf:name>
+                  						<foaf:homepage rdf:resource="http://www.bestbuy.com"/>
+                  					</foaf:Organization>
+                  				</opl:providedBy>
 			    <rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 			    <rdf:type rdf:resource="&oplbb;Product" />
+            
+            <gr:hasBrand rdf:resource="{vi:proxyIRI ($baseUri, '', 'Brand')}" />
+            
                             <gr:hasMakeAndModel>
 			        <!-- For testing with standalone XSLT processor
 	                        <rdf:Description rdf:about="{concat ($baseUri, '#', 'MakeAndModel')}">
@@ -170,9 +209,9 @@
 		                   -->
 	                       </rdf:Description>
 	                   </gr:hasMakeAndModel>
-
 			   <xsl:apply-templates select="//product" />
 			</rdf:Description>
+	  <xsl:apply-templates select="//product/manufacturer" mode="brand" />
 				</xsl:otherwise>
 			</xsl:choose>
 		</rdf:RDF>
@@ -194,7 +233,9 @@
 			<xsl:value-of select="concat( ., ' (USD)')"/>	
 		</rdfs:label>
 		<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
-		<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="."/></gr:hasCurrencyValue>
+        <gr:hasCurrencyValue rdf:datatype="&xsd;float">
+          <xsl:value-of select="."/>
+        </gr:hasCurrencyValue>
 		<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
 	        <gr:priceType rdf:datatype="&xsd;string">regular price</gr:priceType>
 	    </gr:UnitPriceSpecification>
@@ -211,7 +252,9 @@
 			<xsl:value-of select="concat( ., ' (USD)')"/>	
 		</rdfs:label>
 		<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
-	        <gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="."/></gr:hasCurrencyValue>
+        <gr:hasCurrencyValue rdf:datatype="&xsd;float">
+          <xsl:value-of select="."/>
+        </gr:hasCurrencyValue>
 	        <gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
 	        <gr:priceType rdf:datatype="&xsd;string">suggested retail price</gr:priceType>
 	    </gr:UnitPriceSpecification>
@@ -228,7 +271,9 @@
 			<xsl:value-of select="concat('shipping charge: ', ., ' (USD)')"/>	
 		</rdfs:label>
 		<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
-	        <gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="."/></gr:hasCurrencyValue>
+        <gr:hasCurrencyValue rdf:datatype="&xsd;float">
+          <xsl:value-of select="."/>
+        </gr:hasCurrencyValue>
 	        <gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
 		<gr:eligibleRegions rdf:datatype="&xsd;string">US</gr:eligibleRegions>
 	        <gr:priceType rdf:datatype="&xsd;string">shipping price</gr:priceType>
@@ -237,7 +282,9 @@
     </xsl:template>
 
     <xsl:template match="product/freeShipping" mode="offering">
-	<oplbb:freeShipping rdf:datatype="&xsd;boolean"><xsl:value-of select="."/></oplbb:freeShipping>
+    <oplbb:freeShipping rdf:datatype="&xsd;boolean">
+      <xsl:value-of select="."/>
+    </oplbb:freeShipping>
     </xsl:template>
 
     <xsl:template match="product/name">
@@ -259,21 +306,29 @@
 			<xsl:value-of select="concat(., ' (USD)')"/>	
 		</rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">USD</gr:hasUnitOfMeasurement>
-		<gr:hasValueFloat rdf:datatype="&xsd;float"><xsl:value-of select="."/></gr:hasValueFloat>
+        <gr:hasValueFloat rdf:datatype="&xsd;float">
+          <xsl:value-of select="."/>
+        </gr:hasValueFloat>
 	    </gr:QuantitativeValueFloat>
 	</oplbb:dollarSaving>
     </xsl:template>
 
     <xsl:template match="product/onlineAvailability" mode="offering">
-	<oplbb:onlineAvailability rdf:datatype="&xsd;boolean"><xsl:value-of select="."/></oplbb:onlineAvailability>
+    <oplbb:onlineAvailability rdf:datatype="&xsd;boolean">
+      <xsl:value-of select="."/>
+    </oplbb:onlineAvailability>
     </xsl:template>
 
     <xsl:template match="product/onlineAvailabilityText" mode="offering">
-	<oplbb:onlineAvailabilityText rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:onlineAvailabilityText>
+    <oplbb:onlineAvailabilityText rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </oplbb:onlineAvailabilityText>
     </xsl:template>
 
     <xsl:template match="product/specialOrder" mode="offering">
-	<oplbb:specialOrder rdf:datatype="&xsd;boolean"><xsl:value-of select="."/></oplbb:specialOrder>
+    <oplbb:specialOrder rdf:datatype="&xsd;boolean">
+      <xsl:value-of select="."/>
+    </oplbb:specialOrder>
     </xsl:template>
 
     <xsl:template match="product/url">
@@ -287,42 +342,80 @@
     </xsl:template>
 
     <xsl:template match="product/shortDescription">
-	<rdfs:comment><xsl:value-of select="."/></rdfs:comment>
+    <rdfs:comment>
+      <xsl:value-of select="."/>
+    </rdfs:comment>
     </xsl:template>
+  
     <xsl:template match="product/description">
-	<oplbb:description rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:description>
+    <oplbb:description rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </oplbb:description>
     </xsl:template>
+  
     <xsl:template match="product/longDescription">
-	<oplbb:longDescription rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:longDescription>
+    <oplbb:longDescription rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </oplbb:longDescription>
     </xsl:template>
+  
     <xsl:template match="product/upc">
-	<gr:hasEAN_UCC-13><xsl:value-of select="concat('0', .)"/></gr:hasEAN_UCC-13>
+    <gr:hasEAN_UCC-13>
+      <xsl:value-of select="concat('0', .)"/>
+    </gr:hasEAN_UCC-13>
     </xsl:template>
+  
     <xsl:template match="product/startDate">
-	<oplbb:dateReleased rdf:datatype="&xsd;date"><xsl:value-of select="."/></oplbb:dateReleased>
+    <oplbb:dateReleased rdf:datatype="&xsd;date">
+      <xsl:value-of select="."/>
+    </oplbb:dateReleased>
     </xsl:template>
+  
     <xsl:template match="product/productId">
-	<oplbb:productId><xsl:value-of select="."/></oplbb:productId>
+    <oplbb:productId>
+      <xsl:value-of select="."/>
+    </oplbb:productId>
     </xsl:template>
+  
     <xsl:template match="product/sku">
-	<oplbb:sku><xsl:value-of select="."/></oplbb:sku>
-	<gr:hasStockKeepingUnit><xsl:value-of select="."/></gr:hasStockKeepingUnit>
-    </xsl:template>
+    <oplbb:sku>
+      <xsl:value-of select="."/>
+    </oplbb:sku>
+    <gr:hasStockKeepingUnit>
+      <xsl:value-of select="."/>
+    </gr:hasStockKeepingUnit>
+    </xsl:template>
+  
     <xsl:template match="product/onSale">
-	<oplbb:onSale rdf:datatype="&xsd;boolean"><xsl:value-of select="."/></oplbb:onSale>
+    <oplbb:onSale rdf:datatype="&xsd;boolean">
+      <xsl:value-of select="."/>
+    </oplbb:onSale>
     </xsl:template>
+  
     <xsl:template match="product/color">
-	<oplbb:color rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:color>
+    <oplbb:color rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </oplbb:color>
     </xsl:template>
+  
     <xsl:template match="product/format">
-	<oplbb:format rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:format>
+    <oplbb:format rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </oplbb:format>
     </xsl:template>
+  
     <xsl:template match="product/features/feature">
-	<oplbb:feature rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:feature>
+    <oplbb:feature rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </oplbb:feature>
     </xsl:template>
+  
     <xsl:template match="product/categoryPath/category/name">
-	<oplbb:category><xsl:value-of select="."/></oplbb:category>
+    <oplbb:category>
+      <xsl:value-of select="."/>
+    </oplbb:category>
     </xsl:template>
+  
     <xsl:template match="product/image">
 	<xsl:if test="string-length(.) > 0">
 	    <xsl:element namespace="&oplbb;" name="image">
@@ -342,28 +435,48 @@
 		<rdfs:label>
 			<xsl:value-of select="."/>	
 		</rdfs:label>
-		<gr:legalName><xsl:value-of select="."/></gr:legalName>
+        <gr:legalName>
+          <xsl:value-of select="."/>
+        </gr:legalName>
 	    </gr:BusinessEntity>
 	</gr:hasManufacturer>
     </xsl:template>
 
+  <xsl:template match="//product/manufacturer" mode="brand">
+    <gr:Brand rdf:about="{vi:proxyIRI ($baseUri, '', 'Brand')}">
+      <xsl:variable name="brand" select="normalize-space(./text())" />
+      <gr:name><xsl:value-of select="$brand"/></gr:name>
+      <rdfs:label><xsl:value-of select="$brand"/></rdfs:label>
+      <rdfs:seeAlso rdf:resource="{vi:proxyIRI ($baseUri, '', 'Manufacturer')}" />
+    </gr:Brand>
+  </xsl:template>
+  
+    <xsl:template match="product/manufacturer">
+	<rdf:type rdf:resource="{concat('&pto;', .)}" />
+    </xsl:template>
+
     <xsl:template match="product/details/detail">
 	<oplbb:detail>
 	    <xsl:element namespace="&oplbb;" name="ProductDetail">
-	        <xsl:attribute name='rdf:about'>
+        <xsl:attribute name="rdf:about">
 		    <!-- For testing with standalone XSLT processor
 	            <xsl:value-of select="concat(concat ($baseUri, '#', 'Detail_'), position())"/>
 		    -->
 	            <xsl:value-of select="concat(vi:proxyIRI ($baseUri, '', 'Detail_'), position())"/>
 		</xsl:attribute>
-		<oplbb:detail_name rdf:datatype="&xsd;string"><xsl:value-of select="./name"/></oplbb:detail_name>
-		<oplbb:detail_value rdf:datatype="&xsd;string"><xsl:value-of select="./value"/></oplbb:detail_value>
+        <oplbb:detail_name rdf:datatype="&xsd;string">
+          <xsl:value-of select="./name"/>
+        </oplbb:detail_name>
+        <oplbb:detail_value rdf:datatype="&xsd;string">
+          <xsl:value-of select="./value"/>
+        </oplbb:detail_value>
 	    </xsl:element>
 	</oplbb:detail>
     </xsl:template>
 
     <xsl:template match="product/weight">
-	<oplbb:weight> <!-- or cl:hasWeight -->
+    <oplbb:weight>
+      <!-- or cl:hasWeight -->
 	  <!-- For testing with standalone XSLT processor
 	  <gr:QuantitativeValueFloat rdf:about="{concat ($baseUri, '#', 'Weight')}">
 	  -->
@@ -373,21 +486,27 @@
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'lb'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'lb')), ' (LBR)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'lb')), ' (LBR)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">LBR</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:when test="contains(. , 'oz')">
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'oz'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'oz')), ' (ONZ)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'oz')), ' (ONZ)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">ONZ</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:otherwise>
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="."/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(., ' (LBR)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(., ' (LBR)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">LBR</gr:hasUnitOfMeasurement>
 	      </xsl:otherwise>
 	    </xsl:choose>
@@ -396,7 +515,8 @@
     </xsl:template>
 
     <xsl:template match="product/shippingWeight">
-        <oplbb:shippingWeight> <!-- or cl -->
+    <oplbb:shippingWeight>
+      <!-- or cl -->
 	  <!-- For testing with standalone XSLT processor
 	  <gr:QuantitativeValueFloat rdf:about="{concat ($baseUri, '#', 'ShippingWeight')}">
 	  -->
@@ -406,21 +526,27 @@
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'lb'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'lb')), ' (LBR)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'lb')), ' (LBR)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">LBR</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:when test="contains(. , 'oz')">
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'oz'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'oz')), ' (ONZ)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'oz')), ' (ONZ)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">ONZ</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:otherwise>
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="."/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(., ' (LBR)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(., ' (LBR)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">LBR</gr:hasUnitOfMeasurement>
 	      </xsl:otherwise>
 	    </xsl:choose>
@@ -429,7 +555,8 @@
     </xsl:template>
 
     <xsl:template match="product/height">
-	<oplbb:height> <!-- or cl:hasHeight -->
+    <oplbb:height>
+      <!-- or cl:hasHeight -->
 	  <!-- For testing with standalone XSLT processor
 	  <gr:QuantitativeValueFloat rdf:about="{concat ($baseUri, '#', 'Height')}">
 	  -->
@@ -439,21 +566,27 @@
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., $quote))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., $quote)), ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., $quote)), ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:when test="contains(. , 'in')">
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'in'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'in')), ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'in')), ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:otherwise>
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="."/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(., ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(., ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:otherwise>
 	    </xsl:choose>
@@ -462,7 +595,8 @@
     </xsl:template>
 
     <xsl:template match="product/depth">
-	<oplbb:depth> <!-- or cl:hasDepth -->
+    <oplbb:depth>
+      <!-- or cl:hasDepth -->
 	  <!-- For testing with standalone XSLT processor
 	  <gr:QuantitativeValueFloat rdf:about="{concat ($baseUri, '#', 'Depth')}">
 	  -->
@@ -472,21 +606,27 @@
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., $quote))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., $quote)), ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., $quote)), ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:when test="contains(. , 'in')">
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'in'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'in')), ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'in')), ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:otherwise>
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="."/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(., ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(., ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:otherwise>
 	    </xsl:choose>
@@ -495,7 +635,8 @@
     </xsl:template>
 
     <xsl:template match="product/width">
-	<oplbb:width> <!-- or cl:hasWidth -->
+    <oplbb:width>
+      <!-- or cl:hasWidth -->
 	  <!-- For testing with standalone XSLT processor
 	  <gr:QuantitativeValueFloat rdf:about="{concat ($baseUri, '#', 'Width')}">
 	  -->
@@ -505,21 +646,27 @@
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., $quote))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., $quote)), ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., $quote)), ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:when test="contains(. , 'in')">
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="normalize-space(substring-before(., 'in'))"/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(normalize-space(substring-before(., 'in')), ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(normalize-space(substring-before(., 'in')), ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:when>
 	      <xsl:otherwise>
 	        <gr:hasValueFloat rdf:datatype="&xsd;float">
 	          <xsl:value-of select="."/>
 		</gr:hasValueFloat>
-		<rdfs:label><xsl:value-of select="concat(., ' (INH)')"/></rdfs:label>
+            <rdfs:label>
+              <xsl:value-of select="concat(., ' (INH)')"/>
+            </rdfs:label>
 		<gr:hasUnitOfMeasurement rdf:datatype="&xsd;string">INH</gr:hasUnitOfMeasurement>
 	      </xsl:otherwise>
 	    </xsl:choose>
@@ -528,7 +675,9 @@
     </xsl:template>
 
     <xsl:template match="text()|@*"/>
+  
     <xsl:template match="text()|@*" mode="offering" />
-    <xsl:template match="text()|@*" mode="manufacturer" />
 
+  <xsl:template match="text()|@*" mode="manufacturer"/>
 </xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/bugzilla2rdf.xsl b/binsrc/rdf_mappers/xslt/main/bugzilla2rdf.xsl
index d5a352b..78ea706 100644
--- a/binsrc/rdf_mappers/xslt/main/bugzilla2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/bugzilla2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bugzilla2rdf.xsl,v 1.1.2.11 2011/03/23 12:13:04 source Exp $
+ -  $Id: bugzilla2rdf.xsl,v 1.1.2.14 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -53,6 +53,7 @@
   xmlns:sioc="&sioc;"
   xmlns:owl="&owl;"
   xmlns:xsd="&xsd;"
+  xmlns:opl="http://www.openlinksw.com/schemas/attribution#"
   version="1.0">
     <xsl:output method="xml" indent="yes"/>
     <xsl:param name="baseUri" />
@@ -108,6 +109,7 @@
 					<foaf:name><xsl:value-of select="who/@name"/></foaf:name>
 			    </xsl:if>
 			    <foaf:mbox rdf:resource="mailto:{who}"/>
+			    <opl:email_address_digest rdf:resource="{vi:di-uri (who)}"/>
 			</rdf:Description>
 		</xsl:for-each>
     </xsl:template>
@@ -153,6 +155,7 @@
 			    <foaf:name><xsl:value-of select="who/@name"/></foaf:name>
 			    </xsl:if>
 			    <foaf:mbox rdf:resource="mailto:{who}"/>
+			    <opl:email_address_digest rdf:resource="{vi:di-uri (who)}"/>
 			    <sioc:creator_of rdf:resource="{vi:proxyIRI($baseUri,'',replace(bug_when, ' ', '_'))}"/>
 			</rdf:Description>
 		</xsl:for-each>
diff --git a/binsrc/rdf_mappers/xslt/main/cc2rdf.xsl b/binsrc/rdf_mappers/xslt/main/cc2rdf.xsl
index e0d5415..3eae84a 100644
--- a/binsrc/rdf_mappers/xslt/main/cc2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/cc2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cc2rdf.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: cc2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/cnet2rdf.xsl b/binsrc/rdf_mappers/xslt/main/cnet2rdf.xsl
index 5900f23..c38027d 100644
--- a/binsrc/rdf_mappers/xslt/main/cnet2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/cnet2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cnet2rdf.xsl,v 1.1.2.13 2011/03/28 13:02:51 source Exp $
+ -  $Id: cnet2rdf.xsl,v 1.1.2.18 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,8 +28,10 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
 <!ENTITY cnet "http://api.cnet.com/restApi/v1.0/ns">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY oplcn "http://www.openlinksw.com/schemas/cnet#">
 ]>
 <xsl:stylesheet version="1.0"
@@ -40,11 +42,13 @@
   xmlns:foaf="&foaf;"
   xmlns:bibo="&bibo;"
   xmlns:sioc="&sioc;"
+  xmlns:pto="&pto;" 
   xmlns:gr="&gr;"
   xmlns:dcterms="&dcterms;"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:owl="http://www.w3.org/2002/07/owl#"
   xmlns:cnet="&cnet;"
+  xmlns:opl="&opl;"
   xmlns:oplcn="&oplcn;">
 
   <xsl:output method="xml" indent="yes" />
@@ -96,6 +100,13 @@
 	               		</gr:BusinessEntity>
 
 				<gr:Offering rdf:about="{vi:proxyIRI ($baseUri, '', 'Offering')}">
+              				<opl:providedBy>
+              					<foaf:Organization rdf:about="http://www.cnet.com#this">
+              						<foaf:name>CNET</foaf:name>
+              						<foaf:homepage rdf:resource="http://www.cnet.com"/>
+              					</foaf:Organization>
+              				</opl:providedBy>
+
 			    		<sioc:has_container rdf:resource="{$docproxyIRI}"/>
 			    		<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 			                <gr:validFrom rdf:datatype="&xsd;dateTime"><xsl:value-of select="$currentDateTime"/></gr:validFrom>
@@ -141,6 +152,13 @@
 	<rdf:Description rdf:about="{$resourceURL}">
 		<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 		<rdf:type rdf:resource="&oplcn;TechProduct" />
+      		<opl:providedBy>
+      			<foaf:Organization rdf:about="http://www.cnet.com#this">
+      				<foaf:name>CNET</foaf:name>
+      				<foaf:homepage rdf:resource="http://www.cnet.com"/>
+      			</foaf:Organization>
+      		</opl:providedBy>
+
        		<gr:hasMakeAndModel>
 	               	<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'MakeAndModel')}">
 	               		<rdf:type rdf:resource="&gr;ProductOrServiceModel"/>
@@ -187,6 +205,10 @@
 	</gr:hasManufacturer>
   </xsl:template>
 
+    <xsl:template match="cnet:Manufacturer/cnet:Name">
+	<rdf:type rdf:resource="{concat('&pto;', .)}" />
+    </xsl:template>
+
   <xsl:template match="cnet:Specs">
   	<oplcn:specification><xsl:value-of select="string(.)"/></oplcn:specification>
   </xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/crunchbase2rdf.xsl b/binsrc/rdf_mappers/xslt/main/crunchbase2rdf.xsl
index ca35ec3..c0bd296 100644
--- a/binsrc/rdf_mappers/xslt/main/crunchbase2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/crunchbase2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: crunchbase2rdf.xsl,v 1.1.2.9 2011/03/23 12:13:04 source Exp $
+ -  $Id: crunchbase2rdf.xsl,v 1.1.2.18 2012/03/14 11:06:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -34,6 +34,7 @@
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:opl="http://www.openlinksw.com/schema/attribution#"
     xmlns:mql="http://www.freebase.com/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms= "http://purl.org/dc/terms/"
@@ -43,7 +44,8 @@
     xmlns:bibo="&bibo;"
     xmlns:gr="&gr;"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
-    xmlns:cb="http://www.crunchbase.com/"
+    xmlns:oplcb="http://www.openlinksw.com/schemas/crunchbase#"
+    xmlns:oplmny="http://www.openlinksw.com/schemas/money#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:foaf="&foaf;">
 
@@ -54,7 +56,7 @@
     <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
     <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
 
-    <xsl:variable name="ns">http://www.crunchbase.com/</xsl:variable>
+    <xsl:variable name="ns">http://www.openlinksw.com/schemas/crunchbase#</xsl:variable>
     <xsl:param name="base"/>
     <xsl:param name="suffix"/>
 
@@ -100,7 +102,9 @@
 	<rdf:RDF>
 	    <rdf:Description rdf:about="{$docproxyIRI}">
 		<rdf:type rdf:resource="&bibo;Document"/>
-		<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
 		<owl:sameAs rdf:resource="{$docIRI}"/>
 		<xsl:variable name="res_num" select="count(/results)"/>
 		<xsl:for-each select="/results">
@@ -125,6 +129,12 @@
 		    <xsl:call-template name="space-name"/>
 		</xsl:variable>
 		<rdf:Description rdf:about="{vi:proxyIRI(concat($base, $space, '/', permalink, $suffix))}">
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.crunchbase.com#this">
+					<foaf:name>Crunchbase</foaf:name>
+					<foaf:homepage rdf:resource="http://www.crunchbase.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
 		    <foaf:page rdf:resource="{$baseUri}"/>
 		    <sioc:has_container rdf:resource="{$docproxyIRI}"/>
 		    <xsl:variable name="type">
@@ -168,7 +178,9 @@
 				<xsl:value-of select="name"/>
 			    </xsl:when>
 			    <xsl:otherwise>
-				<xsl:value-of select="first_name"/> <xsl:text>_</xsl:text> <xsl:value-of select="last_name"/>
+								<xsl:value-of select="first_name"/>
+								<xsl:text>_</xsl:text>
+								<xsl:value-of select="last_name"/>
 			    </xsl:otherwise>
 			</xsl:choose>
 		    </xsl:variable>
@@ -225,7 +237,9 @@
 	  <xsl:for-each select="$res/results/result">
 	      <sioc:topic>
 		  <skos:Concept rdf:about="{vi:dbpIRI ($baseUri, .)}" >
-		      <skos:prefLabel><xsl:value-of select="."/></skos:prefLabel>
+					<skos:prefLabel>
+						<xsl:value-of select="."/>
+					</skos:prefLabel>
 		  </skos:Concept>
 	      </sioc:topic>
 	  </xsl:for-each>
@@ -245,7 +259,11 @@
 	    <xsl:value-of select="."/>
 	</foaf:firstName>
 	<xsl:if test="not ../name">
-	    <foaf:name><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="../last_name"/></foaf:name>
+			<foaf:name>
+				<xsl:value-of select="."/>
+				<xsl:text/>
+				<xsl:value-of select="../last_name"/>
+			</foaf:name>
 	</xsl:if>
     </xsl:template>
 
@@ -285,6 +303,7 @@
 
     <xsl:template match="email_address[. != '']">
 	<foaf:mbox rdf:resource="mailto:{.}"/>
+		<opl:email_address_digest rdf:resource="{vi:di-uri (.)}"/>
     </xsl:template>
 
     <xsl:template match="*[* and ../../*]" priority="1">
@@ -318,20 +337,32 @@
 	<xsl:variable name="nspace">
 	    <xsl:choose>
 		<xsl:when test="$space = 'financial_org'">
-		    <xsl:text>financial-organization</xsl:text>
+					<xsl:text>financial-organization</xsl:text>
 		</xsl:when>
 		<xsl:when test="$space = 'firm' or $space = 'competitor'">
-		    <xsl:text>company</xsl:text>
+					<xsl:text>company</xsl:text>
 		</xsl:when>
 		<xsl:otherwise>
-		    <xsl:value-of select="translate ($space, '_', '-')"/>
+				    <!--xsl:variable name="first_letter" select="upper-case(substring($space, 1, 1))"/>
+				    <xsl:variable name="type_name" select="concat($first_letter, substring($space, 2))"/-->
+				    <xsl:value-of select="translate ($space, '_', '-')"/>
 		</xsl:otherwise>
 	    </xsl:choose>
 	</xsl:variable>
 
+        <xsl:variable name="field_name"/>
+        <xsl:choose>
+            <xsl:when test="ends-with(name(), 's')" >
+                <xsl:variable name="field_name" select="substring(name(), 1, string-length(name()) - 1)" />
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:variable name="field_name" select="name()"/>
+            </xsl:otherwise>
+        </xsl:choose>
+        
 	<xsl:choose>
 	    <xsl:when test="$type != ''">
-		<xsl:element namespace="{$ns}" name="{name()}">
+				<xsl:element namespace="{$ns}" name="{$field_name}">
 		    <xsl:element name="{$type}" namespace="&foaf;">
 			<xsl:attribute name="rdf:about">
 			    <xsl:value-of select="vi:proxyIRI(concat ($base, $nspace, '/', permalink, $suffix))"/>
@@ -340,52 +371,105 @@
 		    </xsl:element>
 		</xsl:element>
 	    </xsl:when>
+	    <xsl:when test="name() like 'competitions'">
+                <!-- Use only the child competitor elements, don't create an oplcb:competitions property -->
+                <xsl:apply-templates />
+	    </xsl:when>
 	    <xsl:otherwise>
-		<xsl:element namespace="{$ns}" name="{name()}">
+				<xsl:element namespace="{$ns}" name="{$field_name}">
 		    <xsl:element name="{$nspace}" namespace="{$ns}">
 			<xsl:attribute name="rdf:about">
 			    <xsl:variable name="cur_suffix" select="name()"/>
 			    <xsl:if test="name() like 'funding_round'">
 				<xsl:variable name="cur_suffix" select="concat(name(), '_', company/permalink, '_', funded_year, '_', funded_month, '_', funded_day)"/>
 		            </xsl:if>
+							<xsl:if test="name() like 'investments'">
+								<xsl:variable name="cur_suffix" select="concat(name(), '_', company/permalink, '_', financial_org/permalink)"/>
+							</xsl:if>
 			    <xsl:value-of select="vi:proxyIRI($baseUri, '', concat ($cur_suffix, '-', position()))"/>
 			</xsl:attribute>
-
 		<xsl:if test="name() like 'funding_round'">
-		    <rdfs:label><xsl:value-of select="concat(round_code, ': ', raised_amount, ' ', funded_month, '/', funded_year, ' source: ', source_description)"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="concat(round_code, ': ', raised_amount, ' ', funded_month, '/', funded_year, ' source: ', source_description)"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'funding_rounds'">
-		    <rdfs:label><xsl:value-of select="concat(round_code, ': ', raised_amount, ' ', funded_month, '/', funded_year, ' source: ', source_description)"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="concat(round_code, ': ', raised_amount, ' ', funded_month, '/', funded_year, ' source: ', source_description)"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'offices'">
-		    <rdfs:label><xsl:value-of select="concat(address1, ', ', city, ', ', state_code, ', ', zip_code, ', ', country_code, ' - ', description)"/></rdfs:label>
+			<xsl:variable name="offices_label" select="address1"/>
+			<xsl:if test="string-length(city) > 0">
+				<xsl:variable name="offices_label" select="concat($offices_label, ', ', city)"/>
+			</xsl:if>
+			<xsl:if test="string-length(state_code) > 0">
+				<xsl:variable name="offices_label" select="concat($offices_label, ', ', state_code)"/>
+			</xsl:if>
+			<xsl:if test="string-length(zip_code) > 0">
+				<xsl:variable name="offices_label" select="concat($offices_label, ', ', zip_code)"/>
+			</xsl:if>
+			<xsl:if test="string-length(country_code) > 0">
+				<xsl:variable name="offices_label" select="concat($offices_label, ', ', country_code)"/>
+			</xsl:if>
+			<xsl:if test="string-length(description) > 0">
+				<xsl:variable name="offices_label" select="concat($offices_label, ' - ', description)"/>
+			</xsl:if>
+							<rdfs:label>
+								<xsl:value-of select="vi:trim($offices_label, ', ')"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'video_embeds'">
-		    <rdfs:label><xsl:value-of select="description"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="description"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'acquisitions'">
-		    <rdfs:label><xsl:value-of select="source_description"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="source_description"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'external_links'">
-		    <rdfs:label><xsl:value-of select="title"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="title"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'milestones'">
-		    <rdfs:label><xsl:value-of select="description"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="description"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'products'">
-		    <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="name"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'providerships'">
-		    <rdfs:label><xsl:value-of select="provider"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="provider"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'relationships'">
-		    <rdfs:label><xsl:value-of select="title"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="title"/>
+							</rdfs:label>
 		</xsl:if>
 		<xsl:if test="name() like 'investments'">
-		    <rdfs:label><xsl:value-of select="funding_round/company/name"/></rdfs:label>
+							<xsl:if test="string-length(company/name) > 0">
+								<rdfs:label>
+									<xsl:value-of select="company/name"/>
+								</rdfs:label>
+							</xsl:if>
+							<xsl:if test="string-length(financial_org/name) > 0">
+								<rdfs:label>
+									<xsl:value-of select="financial_org/name"/>
+								</rdfs:label>
+							</xsl:if>
 		</xsl:if>
 		<xsl:if test="name() like 'competitions'">
-		    <rdfs:label><xsl:value-of select="competitor"/></rdfs:label>
+							<rdfs:label>
+								<xsl:value-of select="competitor/name"/>
+							</rdfs:label>
 		</xsl:if>
 		    <xsl:apply-templates select="@*|node()"/>
 		</xsl:element>
@@ -396,6 +480,32 @@
 
     <xsl:template match="*">
 	<xsl:if test="* or . != ''">
+            <xsl:choose>
+	        <xsl:when test="name() like 'total_money_raised'">
+		    <xsl:element namespace="{$ns}" name="{name()}">
+			<xsl:variable name="cur_suffix" select="name()"/>
+			<xsl:variable name="totalFundsRaised" select="."/>
+			<oplmny:MonetaryValue rdf:about="{vi:proxyIRI($baseUri, '', concat ($cur_suffix, '-', position()))}">
+							<rdfs:label>
+								<xsl:value-of select='$totalFundsRaised'/>
+							</rdfs:label>
+                            <oplmny:hasCurrencyValue rdf:datatype="&xsd;decimal">
+                                <xsl:value-of select="vi:crunchbase_moneystring2decimal(.)" />
+                            </oplmny:hasCurrencyValue>
+                            <oplmny:hasCurrencyCode>
+                                <xsl:choose>
+                                    <xsl:when test="starts-with(., '$')">
+                                        USD
+                                    </xsl:when>
+                                    <xsl:otherwise>
+                                       Unknown
+                                    </xsl:otherwise>
+                                </xsl:choose>
+                            </oplmny:hasCurrencyCode>
+                        </oplmny:MonetaryValue>
+		    </xsl:element>
+	        </xsl:when>
+	        <xsl:otherwise>
 	    <xsl:element namespace="{$ns}" name="{name()}">
 		<xsl:if test="name() like 'date_%'">
 		    <xsl:attribute name="rdf:datatype">&xsd;dateTime</xsl:attribute>
@@ -405,6 +515,8 @@
 		</xsl:if>
 		<xsl:apply-templates select="@*|node()"/>
 	    </xsl:element>
+	        </xsl:otherwise>
+            </xsl:choose>
 	</xsl:if>
     </xsl:template>
 </xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/csvxml2rdf.xsl b/binsrc/rdf_mappers/xslt/main/csvxml2rdf.xsl
index 6ad2b56..627c6df 100644
--- a/binsrc/rdf_mappers/xslt/main/csvxml2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/csvxml2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: csvxml2rdf.xsl,v 1.1.4.2 2010/04/06 16:31:40 source Exp $
+ -  $Id: csvxml2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/dc2rdf.xsl b/binsrc/rdf_mappers/xslt/main/dc2rdf.xsl
index 6c1183b..24c820d 100644
--- a/binsrc/rdf_mappers/xslt/main/dc2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/dc2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: dc2rdf.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: dc2rdf.xsl,v 1.1.2.6 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,10 +27,8 @@
     xmlns      ="http://www.w3.org/1999/xhtml"
     xmlns:dc   ="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms = "http://purl.org/dc/terms/"
-    xmlns:xml="xml"
     xmlns:rdf  ="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 
-
     <xsl:output method="xml" indent="yes"/>
 
     <xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
@@ -82,10 +80,7 @@
 		    <xsl:with-param name="ns" select="$ns" />
 		</xsl:call-template>
 	    </xsl:variable>
-
-
-	    <xsl:element name="{$ln}"
-		namespace="{$ns}">
+			<xsl:element name="{$ln}" namespace="{$ns}">
 		<xsl:choose>
 		    <xsl:when test="$ref">
 			<rdf:Description rdf:about="{$ref}">
@@ -124,32 +119,21 @@
 	</xsl:if>
     </xsl:template>
 
-
     <xsl:template name="get-ns">
 	<xsl:param name="n" />
-
-	<xsl:variable name="pfx"
-	    select='substring-before(translate($n, $uc, $lc), ".")' />
-
-	<xsl:variable name="binding"
-	    select='../h:link[translate(@rel, $uc, $lc) = translate(concat("schema.", $pfx), $uc, $lc)]'/>
-	<!--xsl:message terminate="no"> get-ns [<xsl:value-of select="$pfx"/>] [<xsl:value-of select="$binding/@href"/>]</xsl:message-->
+		<xsl:variable name="pfx" select='substring-before(translate($n, $uc, $lc), ".")' />
+		<xsl:variable name="binding" select='../h:link[translate(@rel, $uc, $lc) = translate(concat("schema.", $pfx), $uc, $lc)]'/>
 	<xsl:if test="$binding/@href">
-	    <xsl:variable name="ns1"
-		select='$binding/@href' />
-
-	    <xsl:variable name="ln1"
-		select='substring(
-		translate($n, $uc, $lc),
-		string-length($pfx) + 1,
-		string-length($n))' />
+			<xsl:variable name="ns1" select='$binding/@href' />
+			<xsl:variable name="ln1" select='substring(translate($n, $uc, $lc),string-length($pfx) + 1,string-length($n))' />
 	    <xsl:variable name="ns">
 		<xsl:choose>
-		    <xsl:when test='contains($ln1, ".")
-			and $ns1 = "http://purl.org/dc/elements/1.1/"'>
+					<xsl:when test='contains($ln1, ".") and $ns1 = "http://purl.org/dc/elements/1.1/"'>
 			<xsl:value-of select='"http://purl.org/dc/terms/"'/>
 		    </xsl:when>
-		    <xsl:otherwise><xsl:value-of select="$ns1" /></xsl:otherwise>
+					<xsl:otherwise>
+						<xsl:value-of select="$ns1" />
+					</xsl:otherwise>
 		</xsl:choose>
 	    </xsl:variable>
 	    <xsl:value-of select="$ns" />
@@ -160,18 +144,15 @@
     <xsl:template name="get-ln">
 	<xsl:param name="n" />
 	<xsl:param name="ns" />
-
-	<xsl:variable name="ln1"
-	    select='substring-after(translate($n, $uc, $lc), ".") ' />
-
+		<xsl:variable name="ln1" select='substring-after(translate($n, $uc, $lc), ".") ' />
 	<xsl:variable name="ln">
 	    <xsl:choose>
-		<xsl:when test='contains($ln1, ".")
-		    and $ns = "http://purl.org/dc/terms/"'>
+				<xsl:when test='contains($ln1, ".") and $ns = "http://purl.org/dc/terms/"'>
 		    <xsl:value-of select='substring-after($ln1, ".") '/>
 		</xsl:when>
-
-		<xsl:otherwise><xsl:value-of select="$ln1" /></xsl:otherwise>
+				<xsl:otherwise>
+					<xsl:value-of select="$ln1" />
+				</xsl:otherwise>
 	    </xsl:choose>
 	</xsl:variable>
 	<xsl:value-of select="$ln" />
diff --git a/binsrc/rdf_mappers/xslt/main/delicious2rdf.xsl b/binsrc/rdf_mappers/xslt/main/delicious2rdf.xsl
index a89696a..d3fbc23 100644
--- a/binsrc/rdf_mappers/xslt/main/delicious2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/delicious2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: delicious2rdf.xsl,v 1.1.2.8 2010/09/22 13:57:47 source Exp $
+ -  $Id: delicious2rdf.xsl,v 1.1.2.11 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -34,6 +34,7 @@
 <!ENTITY moat "http://moat-project.org/ns#">
 <!ENTITY scot "http://scot-project.org/scot/ns#">
 <!ENTITY skos "http://www.w3.org/2004/02/skos/core#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY bookmark "http://www.w3.org/2002/01/bookmark#">
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -57,6 +58,7 @@
     xmlns:moat="&moat;"
     xmlns:skos="&skos;"
     xmlns:bookmark="&bookmark;"
+    xmlns:opl="&opl;"
     xmlns:a="http://www.w3.org/2005/Atom"
     xmlns:sioct="&sioct;"
     version="1.0">
@@ -87,6 +89,13 @@
 	    </xsl:for-each>
 	</rdf:Description>
 	<scot:Tagcloud rdf:about="{concat($baseUri, '#tagcloud')}">
+        	<opl:providedBy>
+        		<foaf:Organization rdf:about="http://www.delicious.com#this">
+        			<foaf:name>delicious</foaf:name>
+        			<foaf:homepage rdf:resource="http://www.delicious.com"/>
+        		</foaf:Organization>
+        	</opl:providedBy>
+
 	    <xsl:for-each select="popular">
 		<scot:hasTag rdf:resource="{vi:proxyIRI(concat ('http://www.delicious.com/tag/', .))}"/>
 	    </xsl:for-each>
@@ -110,6 +119,12 @@
 	    <rdf:Description rdf:about="{$resourceURL}">
 		<sioc:has_container rdf:resource="{$docproxyIRI}" />
 		<rdf:type rdf:resource="&sioc;BookmarkFolder"/>
+        	<opl:providedBy>
+        		<foaf:Organization rdf:about="http://www.delicious.com#this">
+        			<foaf:name>delicious</foaf:name>
+        			<foaf:homepage rdf:resource="http://www.delicious.com"/>
+        		</foaf:Organization>
+        	</opl:providedBy>
 		<xsl:variable name="author" select="substring-after(link, 'http://www.delicious.com/')" />
 		<scot:hasScot rdf:resource="{concat('http://www.delicious.com/tags/', $author)}"/>
 		<xsl:for-each select="item">
@@ -183,6 +198,12 @@
 		<xsl:variable name="tag" select="substring-after(substring-after(title, '/'), '/') " />
 		<rdf:type rdf:resource="&scot;Tag"/>
 		<rdf:type rdf:resource="&moat;Tag"/>
+        	<opl:providedBy>
+        		<foaf:Organization rdf:about="http://www.delicious.com#this">
+        			<foaf:name>delicious</foaf:name>
+        			<foaf:homepage rdf:resource="http://www.delicious.com"/>
+        		</foaf:Organization>
+        	</opl:providedBy>
 		<scot:name>
 		    <xsl:value-of select="$tag"/>
 		</scot:name>
@@ -264,6 +285,12 @@
 		<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
 	    </rdf:Description>
 	    <rdf:Description rdf:about="{$resourceURL}">
+        	<opl:providedBy>
+        		<foaf:Organization rdf:about="http://www.delicious.com#this">
+        			<foaf:name>delicious</foaf:name>
+        			<foaf:homepage rdf:resource="http://www.delicious.com"/>
+        		</foaf:Organization>
+        	</opl:providedBy>
 		<rdf:type rdf:resource="&bookmark;Bookmark"/>
 		<sioc:has_container rdf:resource="{$docproxyIRI}" />
 		<dc:title>
diff --git a/binsrc/rdf_mappers/xslt/main/digg2rdf.xsl b/binsrc/rdf_mappers/xslt/main/digg2rdf.xsl
index 18124be..b7044d0 100644
--- a/binsrc/rdf_mappers/xslt/main/digg2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/digg2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: digg2rdf.xsl,v 1.1.2.3 2010/09/07 21:58:41 source Exp $
+ -  $Id: digg2rdf.xsl,v 1.1.2.5 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/discogs2rdf.xsl b/binsrc/rdf_mappers/xslt/main/discogs2rdf.xsl
index 177a6c3..fc62eb5 100644
--- a/binsrc/rdf_mappers/xslt/main/discogs2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/discogs2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: discogs2rdf.xsl,v 1.1.2.7 2010/09/09 16:05:47 source Exp $
+ -  $Id: discogs2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,6 +33,8 @@
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY audio "http://purl.org/media/audio#">
 <!ENTITY media "http://purl.org/media#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY v "http://www.w3.org/2006/vcard/ns#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -49,6 +51,8 @@
     xmlns:audio="&audio;"
     xmlns:media="&media;"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:v="&v;"
+    xmlns:opl="&opl;"
     >
 
     <xsl:output method="xml" indent="yes" />
@@ -78,6 +82,13 @@
 			<owl:sameAs rdf:resource="{$docIRI}"/>
 		</rdf:Description>
 		<mo:MusicArtist rdf:about="{vi:proxyIRI (concat($base,'artist/',translate(name, ' ', '+')))}">
+                	<opl:providedBy>
+                		<foaf:Organization rdf:about="http://www.discogs.com#this">
+                			<foaf:name>Discogs</foaf:name>
+                			<foaf:homepage rdf:resource="http://www.discogs.com"/>
+                		</foaf:Organization>
+                	</opl:providedBy>
+
 			<xsl:variable name="sas-iri" select="vi:dbpIRI ('', translate (name, ' ', '_'))"/>
 			<xsl:if test="not starts-with ($sas-iri, '#')">
 				<owl:sameAs rdf:resource="{$sas-iri}"/>
@@ -108,6 +119,13 @@
 			<foaf:primaryTopic rdf:resource="{vi:proxyIRI (concat($base,'release/', at id))}"/>
 		</rdf:Description>
 		<rdf:Description rdf:about="{vi:proxyIRI (concat($base,'release/', at id))}">
+                	<opl:providedBy>
+                		<foaf:Organization rdf:about="http://www.discogs.com#this">
+                			<foaf:name>Discogs</foaf:name>
+                			<foaf:homepage rdf:resource="http://www.discogs.com"/>
+                		</foaf:Organization>
+                	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Record"/>
 			<rdf:type rdf:resource="&audio;Album"/>
 			<sioc:has_container rdf:resource="{concat($base,'release/', at id)}"/>
@@ -133,6 +151,13 @@
 
     <xsl:template match="track">
 		<rdf:Description rdf:about="{vi:proxyIRI (concat ($base, 'release/', ../../@id), '', position)}">
+                	<opl:providedBy>
+                		<foaf:Organization rdf:about="http://www.discogs.com#this">
+                			<foaf:name>Discogs</foaf:name>
+                			<foaf:homepage rdf:resource="http://www.discogs.com"/>
+                		</foaf:Organization>
+                	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Track"/>
 			<rdf:type rdf:resource="&audio;Recording"/>
 			<mo:track rdf:resource="{vi:proxyIRI (concat ($base, 'release/', ../../@id), '', position)}"/>
@@ -163,6 +188,13 @@
 			<foaf:primaryTopic rdf:resource="{vi:proxyIRI (concat($base,'label/', name))}"/>
 		</rdf:Description>
 		<mo:Label rdf:about="{vi:proxyIRI (concat($base,'label/', name))}">
+                	<opl:providedBy>
+                		<foaf:Organization rdf:about="http://www.discogs.com#this">
+                			<foaf:name>Discogs</foaf:name>
+                			<foaf:homepage rdf:resource="http://www.discogs.com"/>
+                		</foaf:Organization>
+                	</opl:providedBy>
+
 			<sioc:has_container rdf:resource="{concat($base,'label/', name)}"/>
 			<v:adr>
 				<xsl:value-of select="contactinfo"/>
diff --git a/binsrc/rdf_mappers/xslt/main/ebay2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ebay2rdf.xsl
index defbb79..414fb28 100644
--- a/binsrc/rdf_mappers/xslt/main/ebay2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ebay2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ebay2rdf.xsl,v 1.1.2.17 2011/03/28 13:02:52 source Exp $
+ -  $Id: ebay2rdf.xsl,v 1.1.2.23 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,10 +33,12 @@
 <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY review "http:/www.purl.org/stuff/rev#">
 <!ENTITY ebay "urn:ebay:apis:eBLBaseComponents">
 <!ENTITY oplebay "http://www.openlinksw.com/schemas/ebay#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -46,8 +48,10 @@
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
+    xmlns:pto="&pto;" 
     xmlns:gr="&gr;"
     xmlns:book="&book;"
+    xmlns:opl="&opl;"
     xmlns:dc="&dc;"
     xmlns:dcterms="&dcterms;"
     xmlns:review="&review;"
@@ -93,6 +97,13 @@
 			<gr:Offering rdf:about="{concat ($baseUri, '#', 'Offer')}">
 			-->
 			<gr:Offering rdf:about="{vi:proxyIRI($baseUri, '', 'Offer')}">
+                         	<opl:providedBy>
+                         		<foaf:Organization rdf:about="http://www.ebay.com#this">
+                         			<foaf:name>Ebay</foaf:name>
+                         			<foaf:homepage rdf:resource="http://www.ebay.com"/>
+                         		</foaf:Organization>
+                         	</opl:providedBy>
+
 			    <gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 			    <rdfs:label><xsl:value-of select="ebay:Item/ebay:Title"/></rdfs:label>
 				<!-- Xalan
@@ -150,8 +161,18 @@
 			<rdf:Description rdf:about="{$resourceURL}">
 			-->
 			<rdf:Description rdf:about="{$resourceURL}">
+                         	<opl:providedBy>
+                         		<foaf:Organization rdf:about="http://www.ebay.com#this">
+                         			<foaf:name>Ebay</foaf:name>
+                         			<foaf:homepage rdf:resource="http://www.ebay.com"/>
+                         		</foaf:Organization>
+                         	</opl:providedBy>
+
 			    <rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
+			    <rdf:type rdf:resource="&gr;ProductOrService" />
+			    
 			    <rdf:type rdf:resource="&oplebay;Product" />
+
                 <foaf:page rdf:resource="{$baseUri}"/>
 			    <sioc:has_container rdf:resource="{$docproxyIRI}"/>
                 <xsl:variable name="brand" 
@@ -160,7 +181,23 @@
 						select="//ebay:Item/ebay:ItemSpecifics/ebay:NameValueList[ebay:Name='Make']/ebay:Value"/>
 					<xsl:variable name="model"
 						select="//ebay:Item/ebay:ItemSpecifics/ebay:NameValueList[ebay:Name='Model']/ebay:Value"/>
+						
+		<xsl:if test="string-length($brand) > 0">
+		  <gr:hasBrand rdf:resource="{vi:proxyIRI ($docproxyIRI, '', 'Brand')}" />
+		</xsl:if>
+						
+						
                 <xsl:if test="string-length(concat($brand, $make, $model)) > 0">
+	
+                    <xsl:if test="string-length($make) > 0">
+                        <rdf:type rdf:resource="{concat('&pto;', $make)}" />
+                    </xsl:if>
+                    <xsl:if test="string-length($brand) > 0">
+                        <rdf:type rdf:resource="{concat('&pto;', $brand)}" />
+                    </xsl:if>
+                    <xsl:if test="string-length($model) > 0">
+                        <rdf:type rdf:resource="{concat('&pto;', $model)}" />
+                    </xsl:if>
                 <gr:hasMakeAndModel>
 				<!-- Xalan
 	            <rdf:Description rdf:about="{concat ($baseUri, '#', 'MakeAndModel')}">
@@ -214,9 +251,19 @@
 			   -->
 			   <xsl:apply-templates select="ebay:Item" />
 			</rdf:Description>
+			
+			
+			<rdf:Description rdf:about="{vi:proxyIRI ($docproxyIRI, '', 'Brand')}">
+				<xsl:apply-templates select="//ebay:Item/ebay:ItemSpecifics/ebay:NameValueList[ebay:Name='Brand']/ebay:Value" mode="grbrand" />
+			</rdf:Description>
 		</rdf:RDF>
     </xsl:template>
 
+    <xsl:template match="ebay:Value" mode="grbrand">
+      <rdf:type rdf:resource="&gr;Brand" />
+      <gr:name><xsl:value-of select="." /></gr:name>
+    </xsl:template>
+    
     <xsl:template match="ebay:Item">
         <xsl:apply-templates select="*"/>
     </xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/eol2rdf.xsl b/binsrc/rdf_mappers/xslt/main/eol2rdf.xsl
index f360377..d3ab498 100644
--- a/binsrc/rdf_mappers/xslt/main/eol2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/eol2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: eol2rdf.xsl,v 1.1.4.2 2011/01/03 23:40:02 source Exp $
+ -  $Id: eol2rdf.xsl,v 1.1.4.3 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/erdf2rdfxml.xsl b/binsrc/rdf_mappers/xslt/main/erdf2rdfxml.xsl
index c962931..e2fa67f 100644
--- a/binsrc/rdf_mappers/xslt/main/erdf2rdfxml.xsl
+++ b/binsrc/rdf_mappers/xslt/main/erdf2rdfxml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: erdf2rdfxml.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: erdf2rdfxml.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/etsy2rdf.xsl b/binsrc/rdf_mappers/xslt/main/etsy2rdf.xsl
index a6d94ec..c5fc424 100644
--- a/binsrc/rdf_mappers/xslt/main/etsy2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/etsy2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: etsy2rdf.xsl,v 1.1.4.7 2011/03/28 13:02:52 source Exp $
+ -  $Id: etsy2rdf.xsl,v 1.1.4.12 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,15 +26,18 @@
 <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
 <!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:rdf="&rdf;"
+    xmlns:pto="&pto;" 
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
@@ -45,6 +48,7 @@
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:opl="&opl;"
     xmlns:etsy="http://www.etsy.com/">
 
     <xsl:output method="xml" indent="yes" />
@@ -87,6 +91,13 @@
 					<owl:sameAs rdf:resource="{$docIRI}"/>
 				</rdf:Description>
 				<gr:Offering rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.etsy.com#this">
+                                 			<foaf:name>Etsy</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.etsy.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 					<sioc:has_container rdf:resource="{$docproxyIRI}"/>
 					<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 					<!--rdfs:label><xsl:value-of select="title"/></rdfs:label-->
@@ -94,6 +105,13 @@
 					<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
 				</gr:Offering>
 				<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.etsy.com#this">
+                                 			<foaf:name>Etsy</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.etsy.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 					<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 					<rdf:type rdf:resource="&oplbb;Product" />
 					<sioc:has_container rdf:resource="{$docproxyIRI}"/>
@@ -175,7 +193,7 @@
     </xsl:template>
 
     <xsl:template match="tag">
-		<sioc:topic rdf:resource="{concat ('http://www.etsy.com/search_results.php?search_type=all&includes[]=tags&search_query=', .)}"/>
+		<sioc:topic rdf:resource="{concat ('http://www.etsy.com/search_results.php?search_type=all&includes[]=tags&search_query=', .)}"/>
     </xsl:template>
 
     <xsl:template match="description">
diff --git a/binsrc/rdf_mappers/xslt/main/eventbrite2rdf.xsl b/binsrc/rdf_mappers/xslt/main/eventbrite2rdf.xsl
new file mode 100644
index 0000000..b0064f5
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/eventbrite2rdf.xsl
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: eventbrite2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY tio "http://purl.org/tio/ns#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:c="&c;"	
+    xmlns:gr="&gr;"	
+    xmlns:tio="&tio;"	
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/event">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<rdf:Description rdf:about="{$resourceURL}">
+                       	<opl:providedBy>
+                       		<foaf:Organization rdf:about="http://www.eventbrite.com#this">
+                       			<foaf:name>Eventbrite</foaf:name>
+                       			<foaf:homepage rdf:resource="http://www.eventbrite.com"/>
+                       		</foaf:Organization>
+                       	</opl:providedBy>
+
+			<rdf:type rdf:resource="&c;Vevent"/>
+			<xsl:if test="string-length(title) > 0">
+				<c:summary>
+					<xsl:value-of select="title"/>
+				</c:summary>
+				<rdfs:label>
+					<xsl:value-of select="title"/>
+				</rdfs:label>
+			</xsl:if>
+			<xsl:if test="string-length(description) > 0">
+				<c:description>
+					<xsl:value-of select="description"/>
+				</c:description>
+			</xsl:if>
+			<xsl:if test="string-length(url) > 0">
+				<sioc:link rdf:resource="{url}" />
+			</xsl:if>
+			<xsl:if test="string-length(logo) > 0">
+				<foaf:depiction rdf:resource="{logo}" />
+			</xsl:if>
+			<xsl:if test="string-length(logo_ssl) > 0">
+				<foaf:depiction rdf:resource="{logo_ssl}" />
+			</xsl:if>
+			<dcterms:created rdf:datatype="&xsd;dateTime">
+				<xsl:value-of select="created"/>
+			</dcterms:created>
+			<dcterms:modified rdf:datatype="&xsd;dateTime">
+				<xsl:value-of select="modified"/>
+			</dcterms:modified>
+			<foaf:creator>
+				<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', 'organizer')}">
+					<rdfs:label>
+						<xsl:value-of select="organizer/name"/>
+					</rdfs:label>
+					<foaf:name>
+						<xsl:value-of select="organizer/name"/>
+					</foaf:name>					
+					<dc:description>
+						<xsl:value-of select="organizer/description"/>
+					</dc:description>
+					<foaf:page rdf:resource="{organizer/url}"/>
+				</foaf:Person>
+			</foaf:creator>
+			<c:dtstart>
+				<xsl:value-of select="start_date"/>
+			</c:dtstart>
+			<c:dtend>
+				<xsl:value-of select="end_date"/>
+			</c:dtend>
+
+			<xsl:for-each select="tickets/ticket">
+			<gr:includes>
+   			<xsl:variable name="pos" select="concat('ticket_', id)" />
+   			<xsl:variable name="res">
+   				<xsl:value-of select="vi:proxyIRI ($baseUri,'', $pos)"/>
+   			</xsl:variable>
+   			<rdf:Description rdf:about="{$res}">
+                         	<opl:providedBy>
+                         		<foaf:Organization rdf:about="http://www.eventbrite.com#this">
+                         			<foaf:name>Eventbrite</foaf:name>
+                         			<foaf:homepage rdf:resource="http://www.eventbrite.com"/>
+                         		</foaf:Organization>
+                         	</opl:providedBy>
+
+				<rdf:type rdf:resource="&tio;Ticket" />
+   				<rdfs:label><xsl:value-of select="name"/></rdfs:label>
+				<dc:title><xsl:value-of select="name"/></dc:title>
+   				<tio:ticketID><xsl:value-of select="id"/></tio:ticketID>
+   				<tio:validThrough><xsl:value-of select="end_date"/></tio:validThrough>
+     				<gr:hasPriceSpecification>
+      					<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('price_', id))}">
+      						<rdfs:label>
+      							<xsl:value-of select="concat(price, ' (', currency ,')')"/>	
+      						</rdfs:label>
+      						<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>	
+      						<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="price"/></gr:hasCurrencyValue>
+      						<gr:hasCurrency rdf:datatype="&xsd;string"><xsl:value-of select="currency"/></gr:hasCurrency>
+      						<gr:priceType rdf:datatype="&xsd;string">Price</gr:priceType>
+      					</gr:UnitPriceSpecification>
+      				</gr:hasPriceSpecification>
+   			</rdf:Description>
+			</gr:includes>
+			</xsl:for-each>
+
+
+			<c:location>
+				<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', 'adr')}">
+					<foaf:name>
+						<xsl:value-of select="venue/name"/>
+					</foaf:name>
+					<vcard:Street>
+						<xsl:value-of select="venue/address"/>
+					</vcard:Street>
+					<geo:lat rdf:datatype="&xsd;float">
+						<xsl:value-of select="venue/latitude"/>
+					</geo:lat>
+					<geo:long rdf:datatype="&xsd;float">
+						<xsl:value-of select="venue/longitude"/>
+					</geo:long>
+					<rdfs:label>
+						<xsl:value-of select="venue/name"/>
+					</rdfs:label>
+					<xsl:if test="string-length(venue/city) > 0">
+						<vcard:Locality>
+							<xsl:value-of select="venue/city" />   
+						</vcard:Locality>
+					</xsl:if>
+					<xsl:if test="string-length(venue/country) > 0">
+						<vcard:Country>
+							<xsl:value-of select="venue/country" />   
+						</vcard:Country>
+					</xsl:if>
+					<xsl:if test="string-length(venue/region) > 0">
+						<vcard:Region>
+							<xsl:value-of select="venue/region" />   
+						</vcard:Region>
+					</xsl:if>
+					<xsl:if test="string-length(venue/postal_code) > 0">
+						<vcard:Pcode>
+							<xsl:value-of select="venue/postal_code" />   
+						</vcard:Pcode>
+					</xsl:if>
+				</vcard:ADR>
+			</c:location>
+			<xsl:if test="string-length(id) > 0">
+				<bibo:uri rdf:resource="{concat('http://eventbrite.com/event/', id)}" />
+				<sioc:link rdf:resource="{concat('http://eventbrite.com/event/', id)}" />
+			</xsl:if>
+		</rdf:Description>
+	</xsl:template>
+
+    <xsl:template match="user">
+	</xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/eventful2rdf.xsl b/binsrc/rdf_mappers/xslt/main/eventful2rdf.xsl
new file mode 100644
index 0000000..b3a858a
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/eventful2rdf.xsl
@@ -0,0 +1,555 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: eventful2rdf.xsl,v 1.1.4.3 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY tio "http://purl.org/tio/ns#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:c="&c;"	
+    xmlns:gr="&gr;"	
+    xmlns:tio="&tio;"	
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+
+	<xsl:param name="baseUri" />
+
+	<xsl:output method="xml" indent="yes" />
+
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<xsl:apply-templates select="event" />
+			<xsl:apply-templates select="venue" />
+			<xsl:apply-templates select="user" />
+			<xsl:apply-templates select="calendar" />
+			<xsl:apply-templates select="performer" />
+		</rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="performer">
+		<foaf:Agent rdf:about="{$resourceURL}">
+			<rdfs:label>
+				<xsl:value-of select="name"/>
+			</rdfs:label>
+			<foaf:name>
+				<xsl:value-of select="name"/>
+			</foaf:name>
+			<xsl:if test="string-length(long_bio) > 0">
+				<dc:description>
+					<xsl:value-of select="long_bio"/>
+				</dc:description>
+			</xsl:if>
+			<xsl:if test="string-length(short_bio) > 0">
+				<dc:description>
+					<xsl:value-of select="short_bio"/>
+				</dc:description>
+			</xsl:if>
+			<xsl:if test="string-length(url) > 0">
+				<sioc:link rdf:resource="{url}" />
+			</xsl:if>
+			<xsl:if test="string-length(created) > 0">
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="created"/>
+				</dcterms:created>
+			</xsl:if>
+			<foaf:creator>
+				<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', 'creator')}">
+					<rdfs:label>
+						<xsl:value-of select="creator"/>
+					</rdfs:label>
+					<foaf:name>
+						<xsl:value-of select="creator"/>
+					</foaf:name>
+				</foaf:Person>
+			</foaf:creator>		
+			<xsl:for-each select="links/link">
+				<rdfs:seeAlso>
+					<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', @id)}">
+						<rdf:type rdf:resource="&bibo;Document"/>
+						<foaf:primaryTopic rdf:resource="{vi:proxyIRI(url)}"/>
+						<dcterms:subject rdf:resource="{vi:proxyIRI(url)}"/>
+						<sioc:link rdf:resource="{url}"/>
+						<dc:title>
+							<xsl:value-of select="type"/>
+						</dc:title>
+						<dc:description>
+							<xsl:value-of select="description"/>
+						</dc:description>
+						<foaf:creator rdf:resource="{vi:proxyIRI(concat('http://eventful.com/users/', username))}"/>
+					</rdf:Description>
+				</rdfs:seeAlso>
+			</xsl:for-each>
+			<xsl:for-each select="comments/comment">
+				<sioc:topic>
+					<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', @id)}">
+						<rdfs:label>
+							<xsl:value-of select="concat('Comment from ', username)"/>
+						</rdfs:label>
+						<dc:title>
+							<xsl:value-of select="concat('Comment from ', username)"/>
+						</dc:title>
+						<xsl:if test="string-length(text) > 0">
+							<dc:description>
+								<xsl:value-of select="text" />
+							</dc:description>
+						</xsl:if>
+						<dcterms:created>
+							<xsl:value-of select="time"/>
+						</dcterms:created>
+						<foaf:creator rdf:resource="{vi:proxyIRI(concat('http://eventful.com/users/', username))}"/>
+					</sioct:Comment>
+				</sioc:topic>
+			</xsl:for-each>
+			<xsl:for-each select="images/image/*/url">
+				<foaf:depiction rdf:resource="{.}" />				
+			</xsl:for-each>
+			<xsl:for-each select="tags/tag">
+				<foaf:topic rdf:resource="{vi:dbpIRI ($baseUri, title)}"/>			
+			</xsl:for-each>
+			<xsl:for-each select="demands/demand">
+				<sioc:topic>
+					<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', id)}">
+						<rdf:type rdf:resource="&bibo;Document"/>
+						<foaf:primaryTopic rdf:resource="{vi:proxyIRI(concat('http://eventful.com/demand/', id))}"/>
+						<dcterms:subject rdf:resource="{vi:proxyIRI(concat('http://eventful.com/demand/', id))}"/>
+						<sioc:link rdf:resource="{concat('http://eventful.com/demand/', id)}"/>
+						<dc:title>
+							<xsl:value-of select="location"/>
+						</dc:title>
+						<dc:description>
+							<xsl:value-of select="description"/>
+						</dc:description>
+					</rdf:Description>
+				</sioc:topic>
+			</xsl:for-each>
+		</foaf:Agent>
+	</xsl:template>
+
+
+	<xsl:template match="calendar">
+		<c:Vcalendar rdf:about="{$resourceURL}">
+			<xsl:if test="string-length(name) > 0">
+				<c:summary>
+					<xsl:value-of select="name"/>
+				</c:summary>
+				<rdfs:label>
+					<xsl:value-of select="name"/>
+				</rdfs:label>
+			</xsl:if>
+			<xsl:if test="string-length(description) > 0">
+				<c:description>
+					<xsl:value-of select="description"/>
+				</c:description>
+			</xsl:if>
+			<foaf:creator>
+				<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', 'owner')}">
+					<rdfs:label>
+						<xsl:value-of select="owner"/>
+					</rdfs:label>
+					<foaf:name>
+						<xsl:value-of select="owner"/>
+					</foaf:name>
+				</foaf:Person>
+			</foaf:creator>		
+			<xsl:if test="string-length(where_query) > 0">
+				<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, where_query)}"/>
+			</xsl:if>
+		</c:Vcalendar>
+	</xsl:template>
+
+	<xsl:template match="user">
+		<foaf:Person rdf:about="{$resourceURL}">
+			<rdfs:label>
+				<xsl:value-of select="concat(first_name, ' ', last_name, ' (', username, ')')"/>
+			</rdfs:label>
+			<foaf:name>
+				<xsl:value-of select="username"/>
+			</foaf:name>
+			<xsl:if test="string-length(bio) > 0">
+				<dc:description>
+					<xsl:value-of select="bio"/>
+				</dc:description>
+			</xsl:if>
+			<xsl:if test="string-length(first_name) > 0">
+				<foaf:firstName>
+					<xsl:value-of select="first_name"/>
+				</foaf:firstName>
+			</xsl:if>
+			<xsl:if test="string-length(last_name) > 0">
+				<foaf:lastName>
+					<xsl:value-of select="last_name"/>
+				</foaf:lastName>
+			</xsl:if>
+			<xsl:if test="string-length(interests) > 0">
+				<foaf:interest>
+					<xsl:value-of select="interests"/>
+				</foaf:interest>
+			</xsl:if>
+			<xsl:for-each select="images/image/*/url">
+				<foaf:depiction rdf:resource="{.}" />				
+			</xsl:for-each>
+		</foaf:Person>
+	</xsl:template>
+	
+	<xsl:template match="venue">
+		<rdf:Description rdf:about="{$resourceURL}">
+			<rdf:type rdf:resource="&gn;Feature"/>
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.eventful.com#this">
+					<foaf:name>Eventful</foaf:name>
+					<foaf:homepage rdf:resource="http://www.eventful.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
+			<xsl:if test="string-length(name) > 0">
+				<foaf:name>
+					<xsl:value-of select="name"/>
+				</foaf:name>
+				<rdfs:label>
+					<xsl:value-of select="name"/>
+				</rdfs:label>
+			</xsl:if>
+			<xsl:if test="string-length(url) > 0">
+				<sioc:link rdf:resource="{url}" />
+			</xsl:if>
+			<xsl:if test="string-length(description) > 0">
+				<c:description>
+					<xsl:value-of select="description"/>
+				</c:description>
+			</xsl:if>
+			<xsl:if test="string-length(venue_id) > 0">
+				<sioc:link rdf:resource="{concat('http://eventful.com/venues/', venue_id)}" />
+			</xsl:if>
+			<xsl:if test="string-length(address) > 0">
+				<vcard:Street>
+					<xsl:value-of select="address"/>
+				</vcard:Street>
+			</xsl:if>
+			<xsl:if test="string-length(city) > 0">
+				<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, city)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(region) > 0">
+				<vcard:Region rdf:resource="{vi:dbpIRI ($baseUri, region)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(postal_code) > 0">
+				<vcard:Pcode>
+					<xsl:value-of select="postal_code" />   
+				</vcard:Pcode>
+			</xsl:if>
+			<xsl:if test="string-length(country) > 0">
+				<vcard:Country rdf:resource="{vi:dbpIRI ($baseUri, country)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(latitude) > 0">
+				<geo:lat rdf:datatype="&xsd;float">
+					<xsl:value-of select="latitude"/>
+				</geo:lat>
+			</xsl:if>
+			<xsl:if test="string-length(longitude) > 0">
+				<geo:long rdf:datatype="&xsd;float">
+					<xsl:value-of select="longitude"/>
+				</geo:long>
+			</xsl:if>
+			<xsl:if test="string-length(created) > 0">
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="created"/>
+				</dcterms:created>
+			</xsl:if>
+			<foaf:creator>
+				<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', 'owner')}">
+					<rdfs:label>
+						<xsl:value-of select="owner"/>
+					</rdfs:label>
+					<foaf:name>
+						<xsl:value-of select="owner"/>
+					</foaf:name>
+				</foaf:Person>
+			</foaf:creator>
+			<xsl:for-each select="events/event">
+				<sioc:topic>
+					<c:Vevent rdf:about="{vi:proxyIRI ($baseUri, '', @id)}">
+						<rdfs:label>
+							<xsl:value-of select="title"/>
+						</rdfs:label>
+						<dc:title>
+							<xsl:value-of select="title"/>
+						</dc:title>
+						<xsl:if test="string-length(description) > 0">
+							<dc:description>
+								<xsl:value-of select="description" />
+							</dc:description>
+						</xsl:if>
+						<xsl:if test="string-length(start_time) > 0">
+							<c:dtstart>
+								<xsl:value-of select="start_time"/>
+							</c:dtstart>
+						</xsl:if>
+						<xsl:if test="string-length(stop_time) > 0">
+							<c:dtend>
+								<xsl:value-of select="stop_time"/>
+							</c:dtend>
+						</xsl:if>
+						<xsl:if test="string-length(url) > 0">
+							<sioc:link rdf:resource="{url}" />
+						</xsl:if>
+					</c:Vevent>
+				</sioc:topic>
+			</xsl:for-each>
+			<xsl:for-each select="links/link">
+				<rdfs:seeAlso>
+					<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', @id)}">
+						<rdf:type rdf:resource="&bibo;Document"/>
+						<foaf:primaryTopic rdf:resource="{vi:proxyIRI(url)}"/>
+						<dcterms:subject rdf:resource="{vi:proxyIRI(url)}"/>
+						<sioc:link rdf:resource="{url}"/>
+						<dc:title>
+							<xsl:value-of select="type"/>
+						</dc:title>
+						<dc:description>
+							<xsl:value-of select="description"/>
+						</dc:description>
+						<foaf:creator rdf:resource="{vi:proxyIRI(concat('http://eventful.com/users/', username))}"/>
+					</rdf:Description>
+				</rdfs:seeAlso>
+			</xsl:for-each>
+			<xsl:for-each select="images/image/*/url">
+				<foaf:depiction rdf:resource="{.}" />				
+			</xsl:for-each>
+			<xsl:for-each select="tags/tag">
+				<foaf:topic rdf:resource="{vi:dbpIRI ($baseUri, title)}"/>			
+			</xsl:for-each>
+		</rdf:Description>
+	</xsl:template>
+	
+	<xsl:template match="event">
+		<rdf:Description rdf:about="{$resourceURL}">
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.eventful.com#this">
+					<foaf:name>Eventful</foaf:name>
+					<foaf:homepage rdf:resource="http://www.eventful.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
+			<rdf:type rdf:resource="&c;Vevent"/>
+			<xsl:if test="string-length(title) > 0">
+				<c:summary>
+					<xsl:value-of select="title"/>
+				</c:summary>
+				<rdfs:label>
+					<xsl:value-of select="title"/>
+				</rdfs:label>
+			</xsl:if>
+			<xsl:if test="string-length(description) > 0">
+				<c:description>
+					<xsl:value-of select="description"/>
+				</c:description>
+			</xsl:if>
+			<xsl:if test="string-length(url) > 0">
+				<sioc:link rdf:resource="{url}" />
+			</xsl:if>
+			<xsl:if test="string-length(created) > 0">
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="created"/>
+				</dcterms:created>
+			</xsl:if>
+			<xsl:if test="string-length(modified) > 0">
+				<dcterms:modified rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="modified"/>
+				</dcterms:modified>
+			</xsl:if>
+			<xsl:if test="string-length(start_time) > 0">
+				<c:dtstart>
+					<xsl:value-of select="start_time"/>
+				</c:dtstart>
+			</xsl:if>
+			<xsl:if test="string-length(stop_time) > 0">
+				<c:dtend>
+					<xsl:value-of select="stop_time"/>
+				</c:dtend>
+			</xsl:if>
+			<c:location>
+				<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', 'adr')}">
+					<xsl:if test="string-length(venue_name) > 0">
+						<foaf:name>
+							<xsl:value-of select="venue_name"/>
+						</foaf:name>
+						<rdfs:label>
+							<xsl:value-of select="venue_name"/>
+						</rdfs:label>
+					</xsl:if>
+					<xsl:if test="string-length(venue_id) > 0">
+						<sioc:link rdf:resource="{concat('http://eventful.com/venues/', venue_id)}" />
+					</xsl:if>
+					<xsl:if test="string-length(address) > 0">
+						<vcard:Street>
+							<xsl:value-of select="address"/>
+						</vcard:Street>
+					</xsl:if>
+					<xsl:if test="string-length(city) > 0">
+						<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, city)}"/>
+					</xsl:if>
+					<xsl:if test="string-length(region) > 0">
+						<vcard:Region rdf:resource="{vi:dbpIRI ($baseUri, region)}"/>
+					</xsl:if>
+					<xsl:if test="string-length(postal_code) > 0">
+						<vcard:Pcode>
+							<xsl:value-of select="postal_code" />   
+						</vcard:Pcode>
+					</xsl:if>
+					<xsl:if test="string-length(country) > 0">
+						<vcard:Country rdf:resource="{vi:dbpIRI ($baseUri, country)}"/>
+					</xsl:if>
+					<xsl:if test="string-length(latitude) > 0">
+						<geo:lat rdf:datatype="&xsd;float">
+							<xsl:value-of select="latitude"/>
+						</geo:lat>
+					</xsl:if>
+					<xsl:if test="string-length(longitude) > 0">
+						<geo:long rdf:datatype="&xsd;float">
+							<xsl:value-of select="longitude"/>
+						</geo:long>
+					</xsl:if>
+				</vcard:ADR>
+			</c:location>
+			<xsl:for-each select="links/link">
+				<rdfs:seeAlso>
+					<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', @id)}">
+						<rdf:type rdf:resource="&bibo;Document"/>
+						<foaf:primaryTopic rdf:resource="{vi:proxyIRI(url)}"/>
+						<dcterms:subject rdf:resource="{vi:proxyIRI(url)}"/>
+						<sioc:link rdf:resource="{url}"/>
+						<dc:title>
+							<xsl:value-of select="type"/>
+						</dc:title>
+						<dc:description>
+							<xsl:value-of select="description"/>
+						</dc:description>
+						<foaf:creator rdf:resource="{vi:proxyIRI(concat('http://eventful.com/users/', username))}"/>
+					</rdf:Description>
+				</rdfs:seeAlso>
+			</xsl:for-each>
+			<xsl:for-each select="comments/comment">
+				<sioc:topic>
+					<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', @id)}">
+						<rdfs:label>
+							<xsl:value-of select="concat('Comment from ', username)"/>
+						</rdfs:label>
+						<dc:title>
+							<xsl:value-of select="concat('Comment from ', username)"/>
+						</dc:title>
+						<xsl:if test="string-length(text) > 0">
+							<dc:description>
+								<xsl:value-of select="text" />
+							</dc:description>
+						</xsl:if>
+						<dcterms:created>
+							<xsl:value-of select="time"/>
+						</dcterms:created>
+						<foaf:creator rdf:resource="{vi:proxyIRI(concat('http://eventful.com/users/', username))}"/>
+					</sioct:Comment>
+				</sioc:topic>
+			</xsl:for-each>
+			<xsl:for-each select="performers/performer">
+				<sioc:topic>
+					<foaf:Agent rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+						<rdfs:label>
+							<xsl:value-of select="name"/>
+						</rdfs:label>
+						<dc:title>
+							<xsl:value-of select="name"/>
+						</dc:title>
+						<sioc:link rdf:resource="{url}"/>
+						<xsl:if test="string-length(short_bio) > 0">
+							<dc:description>
+								<xsl:value-of select="short_bio" />
+							</dc:description>
+						</xsl:if>
+						<foaf:creator rdf:resource="{vi:proxyIRI(concat('http://eventful.com/users/', username))}"/>
+					</foaf:Agent>
+				</sioc:topic>
+			</xsl:for-each>
+			<xsl:for-each select="images/image/*/url">
+				<foaf:depiction rdf:resource="{.}" />				
+			</xsl:for-each>
+			<xsl:for-each select="tags/tag">
+				<foaf:topic rdf:resource="{vi:dbpIRI ($baseUri, title)}"/>			
+			</xsl:for-each>
+			<foaf:creator>
+				<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', 'creator')}">
+					<rdfs:label>
+						<xsl:value-of select="going/user/username"/>
+					</rdfs:label>
+					<foaf:name>
+						<xsl:value-of select="going/user/username"/>
+					</foaf:name>
+					<foaf:depiction rdf:resource="{going/user/thumb_url}" />									
+				</foaf:Person>
+			</foaf:creator>
+		</rdf:Description>
+	</xsl:template>
+
+	<xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/evri2rdf.xsl b/binsrc/rdf_mappers/xslt/main/evri2rdf.xsl
index 6ee8ac6..0f2543a 100644
--- a/binsrc/rdf_mappers/xslt/main/evri2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/evri2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 -
--  $Id: evri2rdf.xsl,v 1.1.4.2 2010/08/26 22:46:12 source Exp $
+-  $Id: evri2rdf.xsl,v 1.1.4.7 2012/03/08 12:55:02 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -
--  Copyright (C) 1998-2010 OpenLink Software
+-  Copyright (C) 1998-2012 OpenLink Software
 -
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
@@ -30,11 +30,13 @@
   <!ENTITY dcterms "http://purl.org/dc/terms/">
   <!ENTITY sioc "http://rdfs.org/sioc/ns#">
   <!ENTITY owl "http://www.w3.org/2002/07/owl#">
+  <!ENTITY pto "http://www.productontology.org/id/">
   <!ENTITY gr "http://purl.org/goodrelations/v1#">
   <!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
   <!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
   <!ENTITY evri "http://www.openlinksw.com/schemas/evri#">
   <!ENTITY review "http:/www.purl.org/stuff/rev#">
+  <!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
   <!ENTITY geonames "http://www.geonames.org/ontology#">
 ]>
 <xsl:stylesheet version="1.0"
@@ -43,6 +45,7 @@ xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
 xmlns:rdf="&rdf;"
 xmlns:rdfs="&rdfs;"
 xmlns:foaf="&foaf;"
+xmlns:pto="&pto;"
 xmlns:bibo="&bibo;"
 xmlns:sioc="&sioc;"
 xmlns:owl="&owl;"
@@ -55,6 +58,7 @@ xmlns:geonames="&geonames;"
 xmlns:bestbuy="http://remix.bestbuy.com/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:cl="&cl;"
+xmlns:opl="&opl;"
 xmlns:oplbb="&oplbb;">
 
   <xsl:output method="xml" indent="yes" />
@@ -80,6 +84,13 @@ xmlns:oplbb="&oplbb;">
       </rdf:Description>
 
       <rdf:Description rdf:about="{$resourceURL}">
+      	<opl:providedBy>
+      		<foaf:Organization rdf:about="http://www.evri.com#this">
+      			<foaf:name>Evri</foaf:name>
+      			<foaf:homepage rdf:resource="http://www.evri.com"/>
+      		</foaf:Organization>
+      	</opl:providedBy>
+
         <xsl:choose>
           <xsl:when test="$entity = 'person'">
             <rdf:type rdf:resource="&foaf;Person"/>
diff --git a/binsrc/rdf_mappers/xslt/main/fb_og2rdf.xsl b/binsrc/rdf_mappers/xslt/main/fb_og2rdf.xsl
index 93b8c22..b01d5db 100644
--- a/binsrc/rdf_mappers/xslt/main/fb_og2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/fb_og2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: fb_og2rdf.xsl,v 1.1.4.2 2010/05/18 10:44:45 source Exp $
+ -  $Id: fb_og2rdf.xsl,v 1.1.4.23 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -21,60 +21,607 @@
  -  with this program; if not, write to the Free Software Foundation, Inc.,
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -->
+<!-- tabstops=4 -->
 <!DOCTYPE xsl:stylesheet [
-<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
-<!ENTITY rdfns  "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-<!ENTITY xhv  "http://www.w3.org/1999/xhtml/vocab#">
-<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
-<!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
-<!ENTITY sioct "http://rdfs.org/sioc/types#">
-<!ENTITY mo "http://purl.org/ontology/mo/">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY exif "http://www.w3.org/2003/12/exif/ns/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
+<!ENTITY like "http://ontologi.es/like#">
 <!ENTITY mmd "http://musicbrainz.org/ns/mmd-1.0#">
-<!ENTITY og "http://opengraphprotocol.org/schema/">
+<!ENTITY mo "http://purl.org/ontology/mo/">
+<!ENTITY og "http://ogp.me/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY oplog "http://www.openlinksw.com/schemas/opengraph#">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdfns  "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY scot "http://scot-project.org/scot/ns#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY tag "http://www.holygoat.co.uk/owl/redwood/0.1/tags/">
+<!ENTITY vcard "http://www.w3.org/2006/vcard/ns#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY video "http://purl.org/media/video#">
+<!ENTITY xhv  "http://www.w3.org/1999/xhtml/vocab#">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY oplcert "http://www.openlinksw.com/schemas/cert#">
+<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
 ]>
 <xsl:stylesheet
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:rdf="&rdfns;"
-    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-    xmlns:h="http://www.w3.org/1999/xhtml"
-    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+	xmlns:fb="http://www.facebook.com/2008/fbml"
+    xmlns:bibo="&bibo;"
+    xmlns:c="&c;"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms="http://purl.org/dc/terms/"
-    xmlns:xhv="&xhv;"
-    xmlns:sioc="&sioc;"
-    xmlns:bibo="&bibo;"
-    xmlns:sioct="&sioct;"
-	xmlns:owl="&owl;"	
+    xmlns:exif="&exif;"
 	xmlns:foaf="&foaf;"
+    xmlns:geo="&geo;"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:like="&like;"
+    xmlns:mmd="&mmd;"
     xmlns:mo="&mo;"
     xmlns:og="&og;"
-    xmlns:mmd="&mmd;"
+    xmlns:opl="&opl;"
+    xmlns:oplog="&oplog;"
+    xmlns:owl="&owl;"	
+    xmlns:rdf="&rdfns;"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:scot="&scot;"
+    xmlns:sioc="&sioc;"
+    xmlns:sioct="&sioct;"
+    xmlns:tag="&tag;"
+    xmlns:vcard="&vcard;"
+    xmlns:vi="&vi;"
+    xmlns:video="&video;"
+    xmlns:xhv="&xhv;"
+    xmlns:oplcert="&oplcert;"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0"
 	>
 
 	<xsl:param name="baseUri" />
+    <xsl:param name="og_object_type" />
 
 	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
 	<xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
 	<xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	<xsl:variable name="providedByIRI" select="concat (vi:proxyIRI ($baseUri, '', 'Provider'))"/>
 	
 	<xsl:output method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no" standalone="no" indent="yes" />
 
+	<xsl:template match="/">
+        <xsl:choose>
+            <xsl:when test="$og_object_type = 'general'">
+	            <xsl:apply-templates mode="general"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'album'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="album"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'album_photos'">
+	            <xsl:apply-templates mode="album_photos"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'application'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="application"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'event'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="event"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'group'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="group"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'link'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="link"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'link_comments'">
+	            <xsl:apply-templates mode="status_comments"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="page"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_albums'">
+	            <xsl:apply-templates mode="user_albums"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_events'">
+	            <xsl:apply-templates mode="page_events"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_feed'">
+	            <xsl:apply-templates mode="page_feed"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_links'">
+	            <xsl:apply-templates mode="user_links"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_notes'">
+	            <xsl:apply-templates mode="page_notes"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_posts'">
+	            <xsl:apply-templates mode="user_posts"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_statuses'">
+	            <xsl:apply-templates mode="page_statuses"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_tagged'">
+	            <xsl:apply-templates mode="page_feed"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'page_videos'">
+	            <xsl:apply-templates mode="user_movies"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'photo'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="photo"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'status'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="status"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'status_comments'">
+	            <xsl:apply-templates mode="status_comments"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="user"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_accounts'">
+	            <xsl:apply-templates mode="user_accounts"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_activities'">
+	            <xsl:apply-templates mode="user_activities"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_albums'">
+	            <xsl:apply-templates mode="user_albums"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_books'">
+	            <xsl:apply-templates mode="user_books"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_feed'">
+	            <xsl:apply-templates mode="page_feed"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_friends'">
+	            <xsl:apply-templates mode="user_friends"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_games'">
+	            <xsl:apply-templates mode="user_games"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_interests'">
+	            <xsl:apply-templates mode="user_interests"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_likes'">
+	            <xsl:apply-templates mode="user_likes"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_links'">
+	            <xsl:apply-templates mode="user_links"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_movies'">
+	            <xsl:apply-templates mode="user_movies"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_music'">
+	            <xsl:apply-templates mode="user_music"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_picture'">
+	            <xsl:apply-templates mode="user_picture"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_posts'">
+	            <xsl:apply-templates mode="user_posts"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'user_television'">
+	            <xsl:apply-templates mode="user_television"/>
+            </xsl:when>
+            <xsl:when test="$og_object_type = 'video'">
+	            <xsl:apply-templates mode="root"/>
+	            <xsl:apply-templates mode="video"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:apply-templates />
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>    
+
 	<xsl:template match="/results">
 		<rdf:RDF>
+        </rdf:RDF>
+    </xsl:template>
+
+	<xsl:template match="/results" mode="root">
+		<rdf:RDF>
            <rdf:Description rdf:about="{$docproxyIRI}">
 				<rdf:type rdf:resource="&bibo;Document"/>
 				<sioc:container_of rdf:resource="{$resourceURL}"/>
 				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
 				<dcterms:subject rdf:resource="{$resourceURL}"/>
-				<dc:title><xsl:value-of select="name"/></dc:title>
-				<owl:sameAs rdf:resource="{$docIRI}"/>
+				<xsl:if test="normalize-space (name) != ''">
+				<dc:title><xsl:value-of select="concat(name, ' (container)')"/></dc:title>
+				</xsl:if>
+				<owl:sameAs rdf:resource="{$baseUri}"/>
+		    </rdf:Description>
+            <!-- Attribution resource -->
+	        <rdf:Description rdf:about="{$providedByIRI}">
+				<rdf:type rdf:resource="&foaf;Organization"/>
+	            <foaf:name>Facebook Inc.</foaf:name>
+	            <foaf:homepage rdf:resource="http://www.facebook.com"/>
+	        </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="general">
+		<rdf:RDF>
+           <rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<xsl:if test="normalize-space (name) != ''">
+				    <dc:title><xsl:value-of select="concat(document/name, ' (container)')"/></dc:title>
+                </xsl:if>
+				<owl:sameAs rdf:resource="{$baseUri}"/>
+		    </rdf:Description>
+		    <rdf:Description rdf:about="{$resourceURL}">
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+        		<xsl:choose>
+		            <xsl:when test="document/category = 'Public figure'">
+				<rdf:type rdf:resource="&foaf;Person" />
+		                <rdf:type rdf:resource="&oplog;User" />
+			    </xsl:when>
+			    <xsl:otherwise>
+				<rdf:type rdf:resource="&oplog;Page" />
+			    </xsl:otherwise>
+        		</xsl:choose>
+                <xsl:if test="document/id">
+                    <oplog:id><xsl:value-of select="document/id"/></oplog:id>
+		            <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', document/id))}"/>
+                </xsl:if>
+                <xsl:if test="document/name">
+                    <dc:title><xsl:value-of select="document/name"/></dc:title>
+					<rdfs:label><xsl:value-of select="document/name"/></rdfs:label>
+                </xsl:if>
+                <xsl:if test="document/picture">
+                    <foaf:img rdf:resource="{document/picture}"/>
+                </xsl:if>
+                <xsl:if test="string-length(document/link) > 0">
+                    <bibo:uri rdf:resource="{document/link}"/>
+                </xsl:if>
+                <xsl:if test="document/website">
+                    <foaf:page rdf:resource="{document/website}"/>
+                </xsl:if>
+                <xsl:if test="document/category">
+                    <og:category><xsl:value-of select="document/category"/></og:category>
+                </xsl:if>
+                <xsl:if test="document/description">
+                    <dc:description><xsl:value-of select="document/description"/></dc:description>
+                </xsl:if>
+                <xsl:if test="document/likes">
+                    <fb:like><xsl:value-of select="document/likes"/></fb:like>
+                </xsl:if>
+
+				<!--xsl:for-each select="document/metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
 		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="application">
+		<rdf:RDF>
 		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&foaf;Agent" />
+                <rdf:type rdf:resource="&oplog;Application" />
                 <xsl:if test="id">
-                    <og:id><xsl:value-of select="id"/></og:id>
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+                <xsl:if test="name">
+                    <foaf:name><xsl:value-of select="name"/></foaf:name>
+                </xsl:if>
+				<xsl:if test="description">
+				<dc:description>
+					<xsl:value-of select="description"/>
+				</dc:description>
+				</xsl:if>
+                <oplog:category>
+					<xsl:value-of select="category"/>
+				</oplog:category>
+                <xsl:if test="link">
+                    <oplog:uri rdf:resource="{link}"/>
+                </xsl:if>
+				<!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="photo">
+		<rdf:RDF>
+		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&foaf;Image" />
+                <rdf:type rdf:resource="&exif;IFD" />
+                <rdf:type rdf:resource="&oplog;Photo" />
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+                <xsl:if test="name">
+                    <foaf:name><xsl:value-of select="name"/></foaf:name>
+                </xsl:if>
+				<!-- 
+				picture is a thumbnail which is also included in the images list. 
+				Just associate source as the main photo.
+				<foaf:depiction rdf:resource="{picture}"/>
+				-->
+				<foaf:depiction rdf:resource="{source}"/>
+                <oplog:height rdf:datatype="&xsd;integer">
+					<xsl:value-of select="height"/>
+				</oplog:height>
+                <oplog:width rdf:datatype="&xsd;integer">
+					<xsl:value-of select="width"/>
+				</oplog:width>
+				<xsl:for-each select="images">
+					<oplog:has_variant>
+						<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Image_', ../id, '_', position()))}">
+							<rdf:type rdf:resource="&oplog;Image" />
+							<rdfs:label>
+								<xsl:value-of select="concat ('Photo ', ../id, ' (', width, 'w x ', height, 'h)')"/>
+							</rdfs:label>
+							<foaf:depiction rdf:resource="{source}"/>
+							<oplog:height rdf:datatype="&xsd;integer">
+								<xsl:value-of select="height"/>
+							</oplog:height>
+							<oplog:width rdf:datatype="&xsd;integer">
+								<xsl:value-of select="width"/>
+							</oplog:width>
+	                    </rdf:Description>
+					</oplog:has_variant>
+				</xsl:for-each>
+				<xsl:if test="link">
+                    <oplog:uri rdf:resource="{link}"/>
+                </xsl:if>
+				<!--
+				<xsl:if test="icon">
+					<foaf:depiction rdf:resource="{icon}"/>
+				</xsl:if>
+				-->
+
+				<!-- 
+				Some photo objects appear to be more like a status update relating to a photo.
+				In which case the following fields are present
+				-->
+                <xsl:if test="caption">
+                    <dc:title><xsl:value-of select="caption"/></dc:title>
+                </xsl:if>
+				<xsl:if test="string-length(story) > 0">
+                    <dc:description><xsl:value-of select="story"/></dc:description>
+                </xsl:if>
+				<!-- -->
+
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                    <xsl:choose>
+                      <xsl:when test="string-length($time_without_bad_offset) > 0">
+                        <xsl:value-of select="$time_without_bad_offset"/>
+                      </xsl:when>
+                      <xsl:otherwise>
+					<xsl:value-of select="created_time"/>
+                      </xsl:otherwise>
+                    </xsl:choose>
+				</dcterms:created>
+                <xsl:if test="position">
+                    <oplog:position rdf:datatype="&xsd;integer"><xsl:value-of select="position"/></oplog:position>
+                </xsl:if>
+                <xsl:if test="updated_time">
+    				<dcterms:modified rdf:datatype="&xsd;dateTime">
+                      <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                      <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                          <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+						<xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+					</dcterms:modified>
+                </xsl:if>
+				<xsl:for-each select="comments/data">
+					<sioc:has_reply>
+						<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdfs:label>
+								<xsl:value-of select="message"/>
+							</rdfs:label>
+							<sioc:content>
+								<xsl:value-of select="message" />
+							</sioc:content>
+							<dcterms:created rdf:datatype="&xsd;dateTime">
+                                <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                <xsl:choose>
+                                  <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                    <xsl:value-of select="$time_without_bad_offset"/>
+                                  </xsl:when>
+                                  <xsl:otherwise>
+								<xsl:value-of select="created_time"/>
+                                  </xsl:otherwise>
+                                </xsl:choose>
+							</dcterms:created>
+							<dcterms:creator>
+								<!-- 
+								Stub resource to hold creator's name. Resource will be sponged fully when dcterms:creator link is followed 
+								-->
+								<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+									<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+								</rdf:Description>
+							</dcterms:creator>
+							<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+						</sioct:Comment>
+					</sioc:has_reply>
+				</xsl:for-each>
+                <!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="/results" mode="group">
+		<rdf:RDF>
+		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&foaf;Group" />
+                <rdf:type rdf:resource="&oplog;Group" />
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+                <xsl:if test="version">
+                    <oplog:version><xsl:value-of select="version"/></oplog:version>
+                </xsl:if>
+				<dcterms:creator rdf:resource="{vi:proxyIRI(concat('https://graph.facebook.com/', owner/id))}"/>
+                <xsl:if test="name">
+                    <foaf:name><xsl:value-of select="name"/></foaf:name>
+                </xsl:if>
+				<dc:description>
+					<xsl:value-of select="description"/>
+				</dc:description>
+                <xsl:if test="privacy">
+                    <oplog:privacy><xsl:value-of select="privacy"/></oplog:privacy>
+                </xsl:if>
+                <xsl:if test="icon">
+                    <foaf:depiction rdf:resource="{icon}"/>
+                </xsl:if>
+                <xsl:if test="updated_time">
+    				<dcterms:modified rdf:datatype="&xsd;dateTime">
+                      <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                      <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                          <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+						<xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+					</dcterms:modified>
+                </xsl:if>
+                <xsl:if test="email">
+                    <foaf:mbox rdf:resource="{email}"/>
+		    <opl:email_address_digest rdf:resource="{vi:di-uri (email)}"/>
+                </xsl:if>
+				<!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="album">
+		<rdf:RDF>
+		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&sioct;ImageGallery" />
+                <rdf:type rdf:resource="&oplog;Album" />
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+				<dcterms:creator>
+					<!-- 
+					Stub resource to hold creator's name. Resource will be sponged fully when dcterms:creator link is followed 
+					-->
+					<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+						<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+					</rdf:Description>
+				</dcterms:creator>
+                <xsl:if test="name">
+                    <foaf:name><xsl:value-of select="name"/></foaf:name>
+                </xsl:if>
+                <xsl:if test="link">
+                    <oplog:uri rdf:resource="{link}"/>
+                </xsl:if>
+                <xsl:if test="cover_photo">
+                    <oplog:cover_photo rdf:resource="{concat('https://graph.facebook.com/', cover_photo)}"/>
+                </xsl:if>
+                <xsl:if test="count">
+                    <oplog:count rdf:datatype="&xsd;integer"><xsl:value-of select="count"/></oplog:count>
+                </xsl:if>
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                    <xsl:choose>
+                      <xsl:when test="string-length($time_without_bad_offset) > 0">
+                        <xsl:value-of select="$time_without_bad_offset"/>
+                      </xsl:when>
+                      <xsl:otherwise>
+					<xsl:value-of select="created_time"/>
+                      </xsl:otherwise>
+                    </xsl:choose>
+				</dcterms:created>
+                <xsl:if test="updated_time">
+    				<dcterms:modified rdf:datatype="&xsd;dateTime">
+                      <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                      <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                          <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+						<xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+					</dcterms:modified>
+                </xsl:if>
+				<xsl:for-each select="comments/data">
+					<sioc:has_reply>
+						<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdfs:label>
+								<xsl:value-of select="message"/>
+							</rdfs:label>
+							<sioc:content>
+								<xsl:value-of select="message" />
+							</sioc:content>
+							<dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+								<xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+							</dcterms:created>
+							<dcterms:creator>
+								<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+									<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+								</rdf:Description>
+							</dcterms:creator>
+							<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+						</sioct:Comment>
+					</sioc:has_reply>
+				</xsl:for-each>
+				<!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+	
+    <!-- 
+    Process output from: http://graph.facebook.com/<id> where id identifies a User object 
+    Only fields/connections which are either 'Publicly available' or 'Available to everyone on Facebook' are included.
+    Those which require a particular permission, e.g. 'user_education_history', are excluded.
+    -->
+	<xsl:template match="/results" mode="user">
+		<rdf:RDF>
+		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&foaf;Person" />
+                <rdf:type rdf:resource="&oplog;User" />
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
                 </xsl:if>
                 <xsl:if test="name">
                     <foaf:name><xsl:value-of select="name"/></foaf:name>
@@ -85,58 +632,1535 @@
                 <xsl:if test="last_name">
                     <foaf:lastName><xsl:value-of select="last_name"/></foaf:lastName>
                 </xsl:if>
-                <xsl:if test="picture">
-                    <foaf:img rdf:resouce="{picture}"/>
+                <xsl:if test="gender">
+    				<foaf:gender><xsl:value-of select="gender"/></foaf:gender>
+                </xsl:if>
+                <xsl:if test="locale">
+    				<oplog:locale><xsl:value-of select="locale"/></oplog:locale>
                 </xsl:if>
                 <xsl:if test="link">
-                    <bibo:uri rdf:resouce="{link}"/>
+                    <oplog:public_profile_url rdf:resource="{link}"/>
+                </xsl:if>
+				<xsl:if test="username">
+                    <foaf:nick><xsl:value-of select="username"/></foaf:nick>
+                    <oplog:username><xsl:value-of select="username"/></oplog:username>
+                </xsl:if>
+				<xsl:if test="third_party_id">
+                    <oplog:third_party_id><xsl:value-of select="third_party_id"/></oplog:third_party_id>
+                </xsl:if>
+                <xsl:if test="updated_time">
+    				<dcterms:modified rdf:datatype="&xsd;dateTime">
+                      <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                      <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                          <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+						<xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
+					</dcterms:modified>
+                </xsl:if>
+				<xsl:if test="verified">
+                    <oplog:verified><xsl:value-of select="verified"/></oplog:verified>
+                </xsl:if>
+				<!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="event">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&c;Vevent" />
+                <rdf:type rdf:resource="&oplog;Event" />
+				<dcterms:creator rdf:resource="{vi:proxyIRI(concat('https://graph.facebook.com/', owner/id))}"/>
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+				<c:summary>
+					<xsl:value-of select="name"/>
+				</c:summary>
+				<dc:description>
+					<xsl:value-of select="description"/>
+				</dc:description>
+				<c:dtstart>
+					<xsl:value-of select="start_time"/>
+				</c:dtstart>
+				<c:dtend>
+					<xsl:value-of select="end_time"/>
+				</c:dtend>
+				<dcterms:modified>
+                  <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                  <xsl:choose>
+                    <xsl:when test="string-length($time_without_bad_offset) > 0">
+                      <xsl:value-of select="$time_without_bad_offset"/>
+                    </xsl:when>
+                    <xsl:otherwise>
+					<xsl:value-of select="updated_time"/>
+                    </xsl:otherwise>
+                  </xsl:choose>
+				</dcterms:modified>
+				<c:location rdf:resource="{vi:proxyIRI($baseUri, '', 'adr')}"/>
+				<!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+			<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', 'adr')}">
+				<foaf:name>
+					<xsl:value-of select="location"/>
+				</foaf:name>
+				<vcard:Locality>
+					<xsl:value-of select="venue/city"/>
+				</vcard:Locality>
+				<vcard:Region>
+					<xsl:value-of select="venue/state" />   
+				</vcard:Region>
+				<vcard:Country>
+					<xsl:value-of select="venue/country"/>
+				</vcard:Country>
+				<vcard:Street>
+					<xsl:value-of select="venue/street"/>
+				</vcard:Street>
+				<geo:lat rdf:datatype="&xsd;float">
+					<xsl:value-of select="venue/latitude"/>
+				</geo:lat>
+				<geo:long rdf:datatype="&xsd;float">
+					<xsl:value-of select="venue/longitude"/>
+				</geo:long>
+				<rdfs:label>
+					<xsl:value-of select="location"/>
+				</rdfs:label>
+			</vcard:ADR>
+		</rdf:RDF>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/friends?access_token=... -->
+	<xsl:template match="/results" mode="user_friends">
+		<rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <foaf:knows>
+	                        <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Friend_', $id))}">
+		                        <opl:providedBy rdf:resource="{$providedByIRI}" />
+                                <rdf:type rdf:resource="&foaf;Person" />
+                                <rdf:type rdf:resource="&oplog;User" />
+                                <oplog:id><xsl:value-of select="id"/></oplog:id>
+                                <foaf:name><xsl:value-of select="name"/></foaf:name>
+	                            <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </foaf:knows>
+                </xsl:for-each>
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/picture?access_token=... -->
+	<xsl:template match="/results" mode="user_picture">
+        <xsl:if test="picture">
+		    <rdf:RDF>
+                <rdf:Description rdf:about="{$resourceURL}">
+		            <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                    <foaf:img rdf:resource="{picture}"/>
+		        </rdf:Description>
+		    </rdf:RDF>
+        </xsl:if>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/activities?access_token=... -->
+	<xsl:template match="/results" mode="user_activities">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:likes_activity>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Activity_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Activity" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:likes_activity>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="page_events">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <sioc:container_of>
+						<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Event_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdf:type rdf:resource="&c;Vevent" />
+							<rdf:type rdf:resource="&oplog;Event" />
+							<xsl:if test="id">
+								<oplog:id><xsl:value-of select="id"/></oplog:id>
+							</xsl:if>
+							<c:summary>
+								<xsl:value-of select="name"/>
+							</c:summary>
+							<xsl:if test="description">
+								<dc:description>
+									<xsl:value-of select="description"/>
+								</dc:description>
+							</xsl:if>
+							<c:dtstart>
+								<xsl:value-of select="start_time"/>
+							</c:dtstart>
+							<c:dtend>
+								<xsl:value-of select="end_time"/>
+							</c:dtend>
+							<c:location>
+								<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('location_', $id))}">
+										<foaf:name>
+											<xsl:value-of select="location"/>
+										</foaf:name>
+										<rdfs:label>
+											<xsl:value-of select="location"/>
+										</rdfs:label>
+								</vcard:ADR>
+							</c:location>
+						</rdf:Description>
+                    </sioc:container_of>
+				</xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+	
+
+	<xsl:template match="/results" mode="page_notes">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <sioc:container_of>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Note_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Note" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="subject"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="subject"/></rdfs:label>
+							<xsl:if test="message">
+								<dc:description><xsl:value-of select="message"/></dc:description>
+							</xsl:if>
+							<dcterms:creator rdf:resource="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}"/>
+							<xsl:if test="icon">
+								<foaf:depiction rdf:resource="{icon}"/>
+							</xsl:if>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+    				        <dcterms:modified rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="updated_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:modified>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+							<xsl:for-each select="comments/data">
+								<sioc:has_reply>
+									<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                                <opl:providedBy rdf:resource="{$providedByIRI}" />
+										<rdfs:label>
+											<xsl:value-of select="message"/>
+										</rdfs:label>
+										<sioc:content>
+											<xsl:value-of select="message" />
+										</sioc:content>
+										<dcterms:created rdf:datatype="&xsd;dateTime">
+                                          <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                          <xsl:choose>
+                                            <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                              <xsl:value-of select="$time_without_bad_offset"/>
+                                            </xsl:when>
+                                            <xsl:otherwise>
+											<xsl:value-of select="created_time"/>
+                                            </xsl:otherwise>
+                                          </xsl:choose>
+										</dcterms:created>
+										<dcterms:creator>
+											<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+												<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+											</rdf:Description>
+										</dcterms:creator>
+										<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+									</sioct:Comment>
+								</sioc:has_reply>
+							</xsl:for-each>
+						</rdf:Description>
+                    </sioc:container_of>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="/results" mode="user_links">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:posted>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Link_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Link" />
+                            <rdf:type rdf:resource="&sioc;Post" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:from><xsl:value-of select="concat (from/name, ' (', from/id, ')')"/></oplog:from>
+							<xsl:if test="picture">
+								<foaf:depiction rdf:resource="{picture}"/>
+							</xsl:if>
+							<xsl:if test="link">
+								<oplog:link rdf:resource="{link}"/>
+							</xsl:if>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+							<xsl:if test="description">
+								<dc:description><xsl:value-of select="description"/></dc:description>
+							</xsl:if>
+							<xsl:if test="message">
+								<oplog:message><xsl:value-of select="message"/></oplog:message>
+							</xsl:if>
+							<xsl:if test="icon">
+								<foaf:depiction rdf:resource="{icon}"/>
+							</xsl:if>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+							<xsl:for-each select="comments/data">
+								<sioc:has_reply>
+									<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                                <opl:providedBy rdf:resource="{$providedByIRI}" />
+										<rdfs:label>
+											<xsl:value-of select="concat('Comment from ', from/name, ' ', from/id)"/>
+										</rdfs:label>
+										<dc:title>
+											<xsl:value-of select="concat('Comment from ', from/name, ' ', from/id)" />
+										</dc:title>
+										<sioc:content>
+											<xsl:value-of select="message" />
+										</sioc:content>
+										<dcterms:created rdf:datatype="&xsd;dateTime">
+                                          <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                          <xsl:choose>
+                                            <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                              <xsl:value-of select="$time_without_bad_offset"/>
+                                            </xsl:when>
+                                            <xsl:otherwise>
+											<xsl:value-of select="created_time"/>
+                                            </xsl:otherwise>
+                                          </xsl:choose>
+										</dcterms:created>
+										<dcterms:creator>
+											<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+												<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+											</rdf:Description>
+										</dcterms:creator>
+										<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+									</sioct:Comment>
+								</sioc:has_reply>
+							</xsl:for-each>
+	                        <!--foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" /-->
+		                </rdf:Description>
+                    </oplog:posted>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="/results" mode="user_albums">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:has_album>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Album_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdf:type rdf:resource="&sioct;ImageGallery" />
+							<rdf:type rdf:resource="&oplog;Album" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+							<dcterms:creator rdf:resource="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}"/>
+							<xsl:if test="description">
+								<dc:description><xsl:value-of select="description"/></dc:description>
+							</xsl:if>
+							<sioc:link rdf:resource="{link}" />
+							<xsl:if test="cover_photo">
+								<oplog:cover_photo rdf:resource="{concat('https://graph.facebook.com/', cover_photo)}"/>
+							</xsl:if>
+							<xsl:if test="count">
+								<oplog:count rdf:datatype="&xsd;integer"><xsl:value-of select="count"/></oplog:count>
+							</xsl:if>
+							<dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+								<xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+							</dcterms:created>
+							<xsl:if test="updated_time">
+								<dcterms:modified rdf:datatype="&xsd;dateTime">
+                                  <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                                  <xsl:choose>
+                                    <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                      <xsl:value-of select="$time_without_bad_offset"/>
+                                    </xsl:when>
+                                    <xsl:otherwise>
+									<xsl:value-of select="updated_time"/>
+                                    </xsl:otherwise>
+                                  </xsl:choose>
+								</dcterms:modified>
+							</xsl:if>
+							<xsl:if test="type">
+								<oplog:album_type><xsl:value-of select="type"/></oplog:album_type>
+							</xsl:if>
+							<xsl:for-each select="comments/data">
+								<sioc:has_reply>
+									<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                                <opl:providedBy rdf:resource="{$providedByIRI}" />
+										<rdfs:label>
+											<xsl:value-of select="message"/>
+										</rdfs:label>
+										<sioc:content>
+											<xsl:value-of select="message" />
+										</sioc:content>
+										<dcterms:created rdf:datatype="&xsd;dateTime">
+                                          <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                          <xsl:choose>
+                                            <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                              <xsl:value-of select="$time_without_bad_offset"/>
+                                            </xsl:when>
+                                            <xsl:otherwise>
+											<xsl:value-of select="created_time"/>
+                                            </xsl:otherwise>
+                                          </xsl:choose>
+										</dcterms:created>
+										<dcterms:creator>
+											<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+												<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+											</rdf:Description>
+										</dcterms:creator>
+										<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+									</sioct:Comment>
+								</sioc:has_reply>
+							</xsl:for-each>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:has_album>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="page_statuses">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:posted>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Status_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdf:type rdf:resource="&oplog;StatusMessage" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <rdfs:label><xsl:value-of select="concat('Message from ', from/name, ' ', id)"/></rdfs:label>
+							<dcterms:creator rdf:resource="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}"/>
+							<xsl:if test="message">
+								<dc:description><xsl:value-of select="message"/></dc:description>
+							</xsl:if>
+							<xsl:if test="updated_time">
+								<dcterms:modified rdf:datatype="&xsd;dateTime">
+                                  <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                                  <xsl:choose>
+                                    <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                      <xsl:value-of select="$time_without_bad_offset"/>
+                                    </xsl:when>
+                                    <xsl:otherwise>
+									<xsl:value-of select="updated_time"/>
+                                    </xsl:otherwise>
+                                  </xsl:choose>
+								</dcterms:modified>
+							</xsl:if>
+							<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+							<xsl:for-each select="likes/data">
+								<oplog:liked_by rdf:resource="{vi:proxyIRI ($baseUri, '', id)}"/>
+							</xsl:for-each>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:posted>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="/results" mode="user_accounts">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:has_account>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Account_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Account" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:has_account>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+	
+    <!-- Process output from: http://graph.facebook.com/<id>/interests?access_token=... -->
+	<xsl:template match="/results" mode="user_likes">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:has_interest>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Interest_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Interest" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:has_interest>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="user_interests">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:has_interest>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Interest_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Interest" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:has_interest>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/movies?access_token=... -->
+	<xsl:template match="/results" mode="user_movies">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:likes_movie>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Movie_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Movie" />
+                            <rdf:type rdf:resource="&video;Movie" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+                            <dc:description><xsl:value-of select="description"/></dc:description>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+							<dcterms:creator rdf:resource="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}"/>
+							<foaf:depiction rdf:resource="{picture}"/>
+							<foaf:depiction rdf:resource="{icon}"/>
+							<sioc:link rdf:resource="{source}"/>
+							<bibo:content>
+								<xsl:value-of select="embed_html" />
+							</bibo:content>
+    				        <dcterms:modified rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="updated_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:modified>
+							<xsl:for-each select="comments/data">
+								<sioc:has_reply>
+									<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                                <opl:providedBy rdf:resource="{$providedByIRI}" />
+										<rdfs:label>
+											<xsl:value-of select="message"/>
+										</rdfs:label>
+										<sioc:content>
+											<xsl:value-of select="message" />
+										</sioc:content>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                                          <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                          <xsl:choose>
+                                            <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                              <xsl:value-of select="$time_without_bad_offset"/>
+                                            </xsl:when>
+                                            <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                            </xsl:otherwise>
+                                          </xsl:choose>
+					        </dcterms:created>
+										<dcterms:creator>
+											<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+												<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+											</rdf:Description>
+										</dcterms:creator>
+										<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+									</sioct:Comment>
+								</sioc:has_reply>
+							</xsl:for-each>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:likes_movie>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/music?access_token=... -->
+	<xsl:template match="/results" mode="user_music">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:likes_music>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Music_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Music" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:likes_music>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="user_games">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:likes_game>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Games_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Game" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:likes_game>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+	
+    <!-- Process output from: http://graph.facebook.com/<id>/books?access_token=... -->
+	<xsl:template match="/results" mode="user_books">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:likes_book>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Book_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Book" />
+                            <rdf:type rdf:resource="&bibo;Book" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:likes_book>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/books?access_token=... -->
+	<xsl:template match="/results" mode="user_television">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:likes_tv_programme>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Television_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;TvProgramme" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:name><xsl:value-of select="name"/></oplog:name>
+                            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                            <oplog:category><xsl:value-of select="category"/></oplog:category>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:likes_tv_programme>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="page">
+		<rdf:RDF>
+		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+        		<xsl:choose>
+		            <xsl:when test="category = 'Public figure'">
+				<rdf:type rdf:resource="&foaf;Person" />
+		                <rdf:type rdf:resource="&oplog;User" />
+			    </xsl:when>
+			    <xsl:otherwise>
+                <rdf:type rdf:resource="&oplog;Page" />
+			    </xsl:otherwise>
+        		</xsl:choose>
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+                <xsl:if test="name">
+                    <oplog:name><xsl:value-of select="name"/></oplog:name>
+                    <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+                    <dc:title><xsl:value-of select="name"/></dc:title>
                 </xsl:if>
                 <xsl:if test="category">
-                    <og:category><xsl:value-of select="category"/></og:category>
+                    <oplog:category><xsl:value-of select="category"/></oplog:category>
+                </xsl:if>
+                <xsl:if test="description">
+                    <oplog:description><xsl:value-of select="description"/></oplog:description>
+                </xsl:if>
+                <xsl:if test="products">
+                    <oplog:products><xsl:value-of select="products"/></oplog:products>
+                </xsl:if>
+                <xsl:if test="picture">
+                    <foaf:img rdf:resource="{picture}"/>
+                </xsl:if>
+                <xsl:if test="website">
+                    <foaf:page rdf:resource="{website}"/>
                 </xsl:if>
 				<xsl:if test="username">
                     <foaf:nick><xsl:value-of select="username"/></foaf:nick>
+                    <oplog:username><xsl:value-of select="username"/></oplog:username>
                 </xsl:if>
-                <xsl:if test="products">
-                    <og:products><xsl:value-of select="products"/></og:products>
+				<xsl:if test="founded">
+                    <oplog:founded><xsl:value-of select="founded"/></oplog:founded>
                 </xsl:if>
-                <xsl:if test="fan_count">
-    				<og:fan_count><xsl:value-of select="fan_count"/></og:fan_count>
+                <xsl:if test="string-length(link) > 0">
+                    <bibo:uri rdf:resource="{link}"/>
                 </xsl:if>
-                <xsl:if test="about">
-    				<dc:description><xsl:value-of select="about"/></dc:description>
+                <xsl:if test="likes">
+                    <fb:like><xsl:value-of select="likes"/></fb:like>
                 </xsl:if>
-                <xsl:if test="height">
-    				<og:height><xsl:value-of select="height"/></og:height>
+				<!--xsl:for-each select="metadata/connections/*">
+					<foaf:focus rdf:resource="{.}"/>
+				</xsl:for-each-->
+		    </rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="status">
+		<xsl:variable name="id" select="id" />
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			    <owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&oplog;Post" />
+                <oplog:id><xsl:value-of select="id"/></oplog:id>
+                <oplog:from><xsl:value-of select="concat (from/name, ' (', from/id, ')')"/></oplog:from>
+    	        <dcterms:created rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                    <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                            <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="created_time"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+		        </dcterms:created>
+    			<dcterms:modified rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                    <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                             <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+				</dcterms:modified>
+
+				<xsl:choose>
+					<xsl:when test="string-length(message) > 0">
+						<rdfs:label>
+							<xsl:choose>
+								<xsl:when test="string-length(message) > 50">
+									<xsl:value-of select="concat(substring (message, 1, 100), '...')"/>
+								 </xsl:when>
+								 <xsl:otherwise>
+									 <xsl:value-of select="message"/>
+								 </xsl:otherwise>
+							 </xsl:choose>
+                        </rdfs:label>
+					</xsl:when>
+					<xsl:when test="string-length(description) > 0">
+                        <rdfs:label>
+							<xsl:choose>
+								<xsl:when test="string-length(description) > 50">
+									<xsl:value-of select="concat(substring (description, 1, 100), '...')"/>
+								</xsl:when>
+								<xsl:otherwise>
+								    <xsl:value-of select="description"/>
+								</xsl:otherwise>
+							</xsl:choose>
+						</rdfs:label>
+					</xsl:when>
+					<xsl:when test="string-length(story) > 0">
+						<rdfs:label><xsl:value-of select="story"/></rdfs:label>
+					</xsl:when>
+					<xsl:otherwise>
+						<rdfs:label><xsl:value-of select="concat ('Post ', $id)"/></rdfs:label>
+					</xsl:otherwise>
+				</xsl:choose>
+
+                <xsl:if test="description">
+					<oplog:description><xsl:value-of select="description"/></oplog:description>
                 </xsl:if>
-                <xsl:if test="width">
-    				<og:width><xsl:value-of select="width"/></og:width>
+                <xsl:if test="message">
+                    <oplog:message><xsl:value-of select="message"/></oplog:message>
                 </xsl:if>
-                <xsl:if test="gender">
-    				<foaf:gender><xsl:value-of select="gender"/></foaf:gender>
+                <xsl:if test="actions/link">
+		            <xsl:variable name="link" select="actions/link" />
+                    <oplog:link rdf:resource="{$link}" />
                 </xsl:if>
-                <xsl:if test="source">
-    				<foaf:img rdf:resouce="{source}"/>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="link">
+		<xsl:variable name="id" select="id" />
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			    <owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&oplog;Link" />
+                <rdf:type rdf:resource="&sioc;Post" />
+                <oplog:id><xsl:value-of select="id"/></oplog:id>
+                <oplog:from><xsl:value-of select="concat (from/name, ' (', from/id, ')')"/></oplog:from>
+                <rdfs:label>
+				  <xsl:choose>
+					<xsl:when test="string-length (name) > 0">
+					  <xsl:value-of select="name"/>
+					</xsl:when>
+					<xsl:otherwise>
+					  <xsl:value-of select="concat ('Link ', $id)"/>
+					</xsl:otherwise>
+				  </xsl:choose>
+				</rdfs:label>
+    	        <dcterms:created rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                    <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                            <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="created_time"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+		        </dcterms:created>
+    			<dcterms:modified rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                    <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                             <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+				</dcterms:modified>
+                <xsl:if test="message">
+                    <oplog:message><xsl:value-of select="message"/></oplog:message>
                 </xsl:if>
-                <xsl:if test="icon">
-    				<foaf:img rdf:resouce="{icon}"/>
+                <xsl:if test="link">
+		            <xsl:variable name="link" select="link" />
+                    <oplog:link rdf:resource="{$link}" />
                 </xsl:if>
-                <xsl:if test="relationship_status">
-    				<og:relationship_status><xsl:value-of select="relationship_status"/></og:relationship_status>
+                <xsl:if test="description">
+                    <dc:description><xsl:value-of select="description"/></dc:description>
                 </xsl:if>
-                <xsl:if test="website">
-    				<rdfs:seeAlso rdf:resource="{website}"/>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+    <!-- Process output from: http://graph.facebook.com/<id>/posts?access_token=... -->
+	<xsl:template match="/results" mode="user_posts">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:posted>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Post_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Post" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:from><xsl:value-of select="concat (from/name, ' (', from/id, ')')"/></oplog:from>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                                <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                <xsl:choose>
+                                  <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                    <xsl:value-of select="$time_without_bad_offset"/>
+                                  </xsl:when>
+                                  <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                  </xsl:otherwise>
+                                </xsl:choose>
+					        </dcterms:created>
+    				        <dcterms:modified rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="updated_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:modified>
+
+							<xsl:choose>
+							  <xsl:when test="string-length(message) > 0">
+                                <rdfs:label>
+								  <xsl:choose>
+									  <xsl:when test="string-length(message) > 50">
+										  <xsl:value-of select="concat(substring (message, 1, 100), '...')"/>
+									  </xsl:when>
+									  <xsl:otherwise>
+										  <xsl:value-of select="message"/>
+									  </xsl:otherwise>
+								  </xsl:choose>
+                                </rdfs:label>
+							  </xsl:when>
+							  <xsl:when test="string-length(description) > 0">
+                                <rdfs:label>
+								  <xsl:choose>
+									  <xsl:when test="string-length(description) > 50">
+										  <xsl:value-of select="concat(substring (description, 1, 100), '...')"/>
+									  </xsl:when>
+									  <xsl:otherwise>
+										  <xsl:value-of select="description"/>
+									  </xsl:otherwise>
+								  </xsl:choose>
+								</rdfs:label>
+							  </xsl:when>
+							  <xsl:when test="string-length(story) > 0">
+								<rdfs:label><xsl:value-of select="story"/></rdfs:label>
+							  </xsl:when>
+							  <xsl:otherwise>
+								<rdfs:label><xsl:value-of select="concat ('Post ', $id)"/></rdfs:label>
+							  </xsl:otherwise>
+							</xsl:choose>
+
+                            <xsl:if test="description">
+                                <oplog:description><xsl:value-of select="description"/></oplog:description>
+                            </xsl:if>
+                            <xsl:if test="message">
+                                <oplog:message><xsl:value-of select="message"/></oplog:message>
+                            </xsl:if>
+                            <xsl:if test="actions/link">
+		                        <xsl:variable name="link" select="actions/link" />
+                                <oplog:link rdf:resource="{$link}" />
+                            </xsl:if>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:posted>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="page_feed">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:posted>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Post_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                            <rdf:type rdf:resource="&oplog;Post" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <oplog:from><xsl:value-of select="concat (from/name, ' (', from/id, ')')"/></oplog:from>
+							<xsl:if test="to">
+								<oplog:to>
+									<xsl:value-of select="concat (to/data/name, ' (', to/data/id, ')')"/>
+								</oplog:to>
+							</xsl:if>
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+    				        <dcterms:modified rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                <xsl:value-of select="updated_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:modified>
+
+							<xsl:choose>
+							  <xsl:when test="string-length(message) > 0">
+                                <rdfs:label>
+								  <xsl:choose>
+									  <xsl:when test="string-length(message) > 50">
+										  <xsl:value-of select="concat(substring (message, 1, 100), '...')"/>
+									  </xsl:when>
+									  <xsl:otherwise>
+										  <xsl:value-of select="message"/>
+									  </xsl:otherwise>
+								  </xsl:choose>
+                                </rdfs:label>
+							  </xsl:when>
+							  <xsl:when test="string-length(description) > 0">
+                                <rdfs:label>
+								  <xsl:choose>
+									  <xsl:when test="string-length(description) > 50">
+										  <xsl:value-of select="concat(substring (description, 1, 100), '...')"/>
+									  </xsl:when>
+									  <xsl:otherwise>
+										  <xsl:value-of select="description"/>
+									  </xsl:otherwise>
+								  </xsl:choose>
+								</rdfs:label>
+							  </xsl:when>
+							  <xsl:when test="string-length(story) > 0">
+								<rdfs:label><xsl:value-of select="story"/></rdfs:label>
+							  </xsl:when>
+							  <xsl:otherwise>
+								<rdfs:label><xsl:value-of select="concat ('Post ', $id)"/></rdfs:label>
+							  </xsl:otherwise>
+							</xsl:choose>
+
+                            <xsl:if test="description">
+                                <oplog:description><xsl:value-of select="description"/></oplog:description>
+                            </xsl:if>
+                            <xsl:if test="message">
+                                <oplog:message><xsl:value-of select="message"/></oplog:message>
+                            </xsl:if>
+                            <xsl:if test="actions/link">
+		                        <xsl:variable name="link" select="actions/link" />
+                                <oplog:link rdf:resource="{$link}" />
+                            </xsl:if>
+	                        <foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', $id))}" />
+		                </rdf:Description>
+                    </oplog:posted>
+                </xsl:for-each>
+	    </rdf:Description>
+	    <xsl:for-each select="data">
+		<!-- x509 -->
+		<xsl:if test="starts-with (message, '#X509Cert Fingerprint:')">
+		    <xsl:variable name="fp"><xsl:value-of select="substring-before (substring-after (message, '#X509Cert Fingerprint:'), ' ')"/></xsl:variable>
+		    <xsl:variable name="fpn"><xsl:value-of select="translate ($fp, ':', '')"/></xsl:variable>
+		    <xsl:variable name="dgst">
+			<xsl:choose>
+			    <xsl:when test="contains (message, '#SHA1')">sha1</xsl:when>
+			    <xsl:otherwise>md5</xsl:otherwise>
+			</xsl:choose>
+		    </xsl:variable>
+		    <xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fpn)"/></xsl:variable>
+		    <rdf:Description rdf:about="{$resourceURL}">
+			<oplcert:hasCertificate rdf:resource="{$ct}"/>
+		    </rdf:Description>
+		    <oplcert:Certificate rdf:about="{$ct}">
+			<rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+			<oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+			<oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+		    </oplcert:Certificate>
+		</xsl:if>
+		<!-- x509 certificate -->
+		<xsl:if test="message like '%di:%?hashtag=webid%'">
+		    <xsl:variable name="di"><xsl:copy-of select="vi:di-split (message)"/></xsl:variable>
+		    <xsl:for-each select="$di/result/di">
+			<xsl:variable name="fp"><xsl:value-of select="hash"/></xsl:variable>
+			<xsl:variable name="dgst"><xsl:value-of select="dgst"/></xsl:variable>
+			<xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fp)"/></xsl:variable>
+			<foaf:Agent rdf:about="{$resourceURL}">
+			    <oplcert:hasCertificate rdf:resource="{$ct}"/>
+			</foaf:Agent>
+			<oplcert:Certificate rdf:about="{$ct}">
+			    <rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+			    <oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+			    <oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+			</oplcert:Certificate>
+		    </xsl:for-each>
+		</xsl:if>
+		<!-- end certificate -->
+	    </xsl:for-each>
+	    </rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="/results" mode="status_comments">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			    <owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+					<sioc:has_reply>
+						<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdfs:label>
+								<xsl:value-of select="message" />
+							</rdfs:label>
+							<sioc:content>
+								<xsl:value-of select="message" />
+							</sioc:content>
+							<dcterms:creator>
+								<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+									<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+								</rdf:Description>
+							</dcterms:creator>
+							<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+    				        <dcterms:created rdf:datatype="&xsd;dateTime">
+                              <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                              <xsl:choose>
+                                <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                  <xsl:value-of select="$time_without_bad_offset"/>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                  <xsl:value-of select="created_time"/>
+                                </xsl:otherwise>
+                              </xsl:choose>
+					        </dcterms:created>
+						</sioct:Comment>
+					</sioc:has_reply>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="album_photos">
+	    <rdf:RDF>
+            <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			    <owl:sameAs rdf:resource="{$docIRI}"/>
+                <xsl:for-each select="data">
+		            <xsl:variable name="id" select="id" />
+                    <oplog:has_photo>
+	                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Photo_', $id))}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdf:type rdf:resource="&foaf;Image" />
+							<rdf:type rdf:resource="&exif;IFD" />
+							<rdf:type rdf:resource="&oplog;Photo" />
+                            <oplog:id><xsl:value-of select="id"/></oplog:id>
+                            <rdfs:label>
+								<xsl:choose>
+									<xsl:when test="name">
+										<xsl:value-of select="concat('Photo ', position, ': ', name)"/>
+									</xsl:when>
+									<xsl:when test="comments/data/message[1]">
+										<xsl:value-of select="concat('Photo ', position, ': ', comments/data/message[1])"/>
+									</xsl:when>
+									<xsl:otherwise>
+										<xsl:value-of select="concat('Photo ', position)"/>
+									</xsl:otherwise>
+								</xsl:choose>
+							</rdfs:label>
+							<dcterms:creator>
+								<!-- 
+								Stub resource to hold creator's name. Resource will be sponged fully when dcterms:creator link is followed 
+								-->
+								<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+									<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+								</rdf:Description>
+							</dcterms:creator>
+							<!-- 
+							picture is a thumbnail which is also included in the images list. 
+							Just associate source as the main photo.
+							<foaf:depiction rdf:resource="{picture}"/>
+							-->
+							<foaf:depiction rdf:resource="{source}"/>
+							<oplog:height rdf:datatype="&xsd;integer">
+								<xsl:value-of select="height"/>
+							</oplog:height>
+							<oplog:width rdf:datatype="&xsd;integer">
+								<xsl:value-of select="width"/>
+							</oplog:width>
+							<xsl:for-each select="images">
+								<oplog:has_variant>
+									<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Image_', ../id, '_', position()))}">
+										<rdf:type rdf:resource="&oplog;Image" />
+										<rdfs:label>
+											<xsl:value-of select="concat ('Photo ', ../id, ' (', width, 'w x ', height, 'h)')"/>
+										</rdfs:label>
+										<foaf:depiction rdf:resource="{source}"/>
+										<oplog:height rdf:datatype="&xsd;integer">
+											<xsl:value-of select="height"/>
+										</oplog:height>
+										<oplog:width rdf:datatype="&xsd;integer">
+											<xsl:value-of select="width"/>
+										</oplog:width>
+									</rdf:Description>
+								</oplog:has_variant>
+							</xsl:for-each>
+							<sioc:link rdf:resource="{link}" />
+							<!--
+							<xsl:if test="icon">
+								<foaf:depiction rdf:resource="{icon}"/>
+							</xsl:if>
+							-->
+							<dcterms:created rdf:datatype="&xsd;dateTime">
+								<xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+								<xsl:choose>
+									<xsl:when test="string-length($time_without_bad_offset) > 0">
+										<xsl:value-of select="$time_without_bad_offset"/>
+									</xsl:when>
+									<xsl:otherwise>
+										<xsl:value-of select="created_time"/>
+									</xsl:otherwise>
+								</xsl:choose>
+							</dcterms:created>
+							<xsl:if test="position">
+								<oplog:position rdf:datatype="&xsd;integer"><xsl:value-of select="position"/></oplog:position>
+							</xsl:if>
+							<xsl:if test="updated_time">
+								<dcterms:modified rdf:datatype="&xsd;dateTime">
+									<xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+									<xsl:choose>
+										<xsl:when test="string-length($time_without_bad_offset) > 0">
+											<xsl:value-of select="$time_without_bad_offset"/>
+										</xsl:when>
+										<xsl:otherwise>
+											<xsl:value-of select="updated_time"/>
+										</xsl:otherwise>
+									</xsl:choose>
+								</dcterms:modified>
+							</xsl:if>
+							<xsl:for-each select="comments/data">
+								<sioc:has_reply>
+									<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+										<opl:providedBy rdf:resource="{$providedByIRI}" />
+										<rdfs:label>
+											<xsl:value-of select="message"/>
+										</rdfs:label>
+										<sioc:content>
+											<xsl:value-of select="message" />
+										</sioc:content>
+										<dcterms:created rdf:datatype="&xsd;dateTime">
+											<xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+											<xsl:choose>
+												<xsl:when test="string-length($time_without_bad_offset) > 0">
+													<xsl:value-of select="$time_without_bad_offset"/>
+												</xsl:when>
+												<xsl:otherwise>
+													<xsl:value-of select="created_time"/>
+												</xsl:otherwise>
+											</xsl:choose>
+										</dcterms:created>
+										<dcterms:creator>
+											<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+												<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+											</rdf:Description>
+										</dcterms:creator>
+										<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+									</sioct:Comment>
+								</sioc:has_reply>
+							</xsl:for-each>
+							<xsl:for-each select="tags/data">
+								<scot:hasTag>
+									<!-- Not all tags have an id, so don't use as part of entity URI -->
+									<scot:Tag rdf:about="{vi:proxyIRI ($baseUri, '', concat('Tag_', ../../id, '_',  position()))}">
+										<tag:name>
+											<xsl:value-of select="name"/>
+										</tag:name>
+										<rdfs:label>
+											<xsl:value-of select="name"/>
+										</rdfs:label>
+										<xsl:if test="string-length(id) > 0">
+											<oplog:id><xsl:value-of select="id"/></oplog:id>
+											<foaf:focus rdf:resource="{vi:proxyIRI (concat('http://graph.facebook.com/', id))}"/>
+										</xsl:if>
+									</scot:Tag>
+								</scot:hasTag>
+							</xsl:for-each>
+		                </rdf:Description>
+                    </oplog:has_photo>
+                </xsl:for-each>
+		    </rdf:Description>
+	    </rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/results" mode="video">
+		<rdf:RDF>
+		    <rdf:Description rdf:about="{$resourceURL}">
+		        <opl:providedBy rdf:resource="{$providedByIRI}" />
+			    <owl:sameAs rdf:resource="{$docIRI}"/>
+                <rdf:type rdf:resource="&oplog;Video" />
+                <oplog:uri rdf:resource="{source}" />
+                <xsl:if test="id">
+                    <oplog:id><xsl:value-of select="id"/></oplog:id>
+                </xsl:if>
+				<dcterms:creator>
+					<!-- 
+					Stub resource to hold creator's name. Resource will be sponged fully when dcterms:creator link is followed 
+					-->
+					<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+						<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+					</rdf:Description>
+				</dcterms:creator>
+                <xsl:if test="name">
+                    <foaf:name><xsl:value-of select="name"/></foaf:name>
                 </xsl:if>
+				<xsl:if test="description">
+					<dc:description>
+						<xsl:value-of select="description"/>
+					</dc:description>
+				</xsl:if>
+				<xsl:if test="picture">
+					<foaf:depiction rdf:resource="{picture}"/>
+				</xsl:if>
+
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+                    <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                    <xsl:choose>
+                      <xsl:when test="string-length($time_without_bad_offset) > 0">
+                        <xsl:value-of select="$time_without_bad_offset"/>
+                      </xsl:when>
+                      <xsl:otherwise>
+                        <xsl:value-of select="created_time"/>
+                      </xsl:otherwise>
+                    </xsl:choose>
+				</dcterms:created>
                 <xsl:if test="updated_time">
     				<dcterms:modified rdf:datatype="&xsd;dateTime">
-						<xsl:value-of select="updated_time"/>
+                      <xsl:variable name="time_without_bad_offset" select="substring-before(updated_time, '+0000')"/>
+                      <xsl:choose>
+                        <xsl:when test="string-length($time_without_bad_offset) > 0">
+                          <xsl:value-of select="$time_without_bad_offset"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                          <xsl:value-of select="updated_time"/>
+                        </xsl:otherwise>
+                      </xsl:choose>
 					</dcterms:modified>
                 </xsl:if>
-                <xsl:if test="created_time">
-    				<dcterms:created rdf:datatype="&xsd;dateTime">
-						<xsl:value-of select="created_time"/>
-					</dcterms:created>
-                </xsl:if>
+				<xsl:for-each select="comments/data">
+					<sioc:has_reply>
+						<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+		                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+							<rdfs:label>
+								<xsl:value-of select="message"/>
+							</rdfs:label>
+							<sioc:content>
+								<xsl:value-of select="message" />
+							</sioc:content>
+							<dcterms:created rdf:datatype="&xsd;dateTime">
+                                <xsl:variable name="time_without_bad_offset" select="substring-before(created_time, '+0000')"/>
+                                <xsl:choose>
+                                  <xsl:when test="string-length($time_without_bad_offset) > 0">
+                                    <xsl:value-of select="$time_without_bad_offset"/>
+                                  </xsl:when>
+                                  <xsl:otherwise>
+                                    <xsl:value-of select="created_time"/>
+                                  </xsl:otherwise>
+                                </xsl:choose>
+							</dcterms:created>
+							<dcterms:creator>
+								<!-- 
+								Stub resource to hold creator's name. Resource will be sponged fully when dcterms:creator link is followed 
+								-->
+								<rdf:Description rdf:about="{vi:proxyIRI(concat('https://graph.facebook.com/', from/id))}">
+									<foaf:name><xsl:value-of select="from/name"/></foaf:name>
+								</rdf:Description>
+							</dcterms:creator>
+							<sioc:link rdf:resource="{concat('https://graph.facebook.com/', id)}" />
+						</sioct:Comment>
+					</sioc:has_reply>
+				</xsl:for-each>
 		    </rdf:Description>
 		</rdf:RDF>
 	</xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/fb_ogs2rdf.xsl b/binsrc/rdf_mappers/xslt/main/fb_ogs2rdf.xsl
index 7eb199b..0436275 100644
--- a/binsrc/rdf_mappers/xslt/main/fb_ogs2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/fb_ogs2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: fb_ogs2rdf.xsl,v 1.1.4.3 2010/05/29 12:23:02 source Exp $
+ -  $Id: fb_ogs2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/feed2sioc.xsl b/binsrc/rdf_mappers/xslt/main/feed2sioc.xsl
index d66da77..3ee0aa4 100644
--- a/binsrc/rdf_mappers/xslt/main/feed2sioc.xsl
+++ b/binsrc/rdf_mappers/xslt/main/feed2sioc.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: feed2sioc.xsl,v 1.1.2.13 2010/09/09 16:05:47 source Exp $
+ -  $Id: feed2sioc.xsl,v 1.1.2.16 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -66,6 +66,7 @@
 	xmlns:awol="&awol;"
 	xmlns:d="&d;"
 	xmlns:m="&m;"	
+    xmlns:opl="http://www.openlinksw.com/schemas/attribution#"
 	version="1.0">
 	<xsl:output indent="yes" />
 	<xsl:param name="baseUri" />
@@ -211,6 +212,7 @@
 				    </xsl:if>
 				    <xsl:if test="string (//foaf:mbox/@rdf:resource) != ''">
 			                <foaf:mbox rdf:resource="{//foaf:mbox/@rdf:resource}" />                  
+		<opl:email_address_digest rdf:resource="{vi:di-uri (//foaf:mbox/@rdf:resource)}"/>
 				    </xsl:if>
 					<xsl:for-each select="//rss:item[string (dc:creator) = $uname]">
                 <foaf:made rdf:resource="{vi:proxyIRI (@rdf:about)}" />
diff --git a/binsrc/rdf_mappers/xslt/main/flickr2rdf.xsl b/binsrc/rdf_mappers/xslt/main/flickr2rdf.xsl
index eab4e7a..d5e4cbf 100644
--- a/binsrc/rdf_mappers/xslt/main/flickr2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/flickr2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: flickr2rdf.xsl,v 1.1.2.7 2010/09/09 16:05:47 source Exp $
+ -  $Id: flickr2rdf.xsl,v 1.1.2.11 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,7 @@
 <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet
     xmlns:xsl  ="http://www.w3.org/1999/XSL/Transform" version="1.0"
@@ -38,14 +39,17 @@
     xmlns:foaf ="&foaf;"
     xmlns:sioc ="&sioc;"
     xmlns:bibo ="&bibo;"
+    xmlns:opl="&opl;"
     xmlns:v    ="http://www.openlinksw.com/xsltext/"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:exif ="http://www.w3.org/2003/12/exif/ns/"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     >
     <xsl:output method="xml" indent="yes"/>
+	
     <xsl:param name="baseUri" />
     <xsl:param name="exif" />
+
     <xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
     <xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
     <xsl:variable name="doc">
@@ -90,6 +94,13 @@
 			<dcterms:subject rdf:resource="{$resourceURL}"/>
 		</rdf:Description>
 		<rdf:Description rdf:about="{$resourceURL}">
+                	<opl:providedBy>
+                		<foaf:Organization rdf:about="http://www.flickr.com#this">
+                			<foaf:name>Flickr</foaf:name>
+                			<foaf:homepage rdf:resource="http://www.flickr.com"/>
+                		</foaf:Organization>
+                	</opl:providedBy>
+
 			<rdf:type rdf:resource="http://www.w3.org/2003/12/exif/ns/IFD"/>
 			<xsl:variable name="image_url" select="concat('http://farm', @farm,'.static.flickr.com/', @server, '/', @id, '_', @secret, '.', @originalformat)"/>
 			<foaf:img rdf:resource="{$image_url}"/>
diff --git a/binsrc/rdf_mappers/xslt/main/fod2rdf.xsl b/binsrc/rdf_mappers/xslt/main/fod2rdf.xsl
index dfdd31d..7f3812e 100644
--- a/binsrc/rdf_mappers/xslt/main/fod2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/fod2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: fod2rdf.xsl,v 1.1.2.5 2009/12/15 23:13:03 source Exp $
+ -  $Id: fod2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,6 +25,7 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 ]>
 
 <xsl:stylesheet version="1.0"
diff --git a/binsrc/rdf_mappers/xslt/main/foursquare2rdf.xsl b/binsrc/rdf_mappers/xslt/main/foursquare2rdf.xsl
new file mode 100755
index 0000000..c87c13e
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/foursquare2rdf.xsl
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: foursquare2rdf.xsl,v 1.1.4.8 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:template match="/results">
+		<rdf:RDF>
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+			<xsl:apply-templates select="response/user" />
+			<xsl:apply-templates select="response/venue" />
+			<xsl:apply-templates select="response/results" />
+		</rdf:RDF>
+    </xsl:template>
+	
+	<xsl:template match="response/results">
+		<foaf:Person rdf:about="{$resourceURL}">
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.foursquare.com#this">
+					<foaf:name>Foursquare</foaf:name>
+					<foaf:homepage rdf:resource="http://www.foursquare.com"/>
+				</foaf:Organization>
+			</opl:providedBy>		
+			<rdfs:label>
+				<xsl:value-of select="concat(firstName, ' ', lastName)"/>
+			</rdfs:label>
+			<xsl:if test="string-length(firstName) > 0">
+			<foaf:firstName>
+					<xsl:value-of select="firstName"/>
+			</foaf:firstName>
+			</xsl:if>
+			<xsl:if test="string-length(lastName) > 0">
+			<foaf:familyName>
+					<xsl:value-of select="lastName"/>
+			</foaf:familyName>
+			</xsl:if>
+			<vcard:Locality>
+				<xsl:value-of select="homeCity" />   
+			</vcard:Locality>
+			<foaf:depiction rdf:resource="{photo}"/>
+			<foaf:gender>
+				<xsl:value-of select="gender" />   
+			</foaf:gender>
+			<sioc:link rdf:resource="{concat('https://foursquare.com/user/', id)}" />
+			<owl:sameAs rdf:resource="{vi:proxyIRI(concat('https://foursquare.com/user/', id))}" />
+		</foaf:Person>
+    </xsl:template>
+		
+	<xsl:template match="response/user">
+		<foaf:Person rdf:about="{$resourceURL}">
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.foursquare.com#this">
+					<foaf:name>Foursquare</foaf:name>
+					<foaf:homepage rdf:resource="http://www.foursquare.com"/>
+				</foaf:Organization>
+			</opl:providedBy>		
+			<rdfs:label>
+				<xsl:value-of select="concat(firstName, ' ', lastName)"/>
+			</rdfs:label>
+			<xsl:if test="string-length(firstName) > 0">
+				<foaf:firstName>
+					<xsl:value-of select="firstName"/>
+				</foaf:firstName>
+			</xsl:if>
+			<xsl:if test="string-length(lastName) > 0">
+				<foaf:familyName>
+					<xsl:value-of select="lastName"/>
+				</foaf:familyName>
+			</xsl:if>
+			<vcard:Locality>
+				<xsl:value-of select="homeCity" />   
+			</vcard:Locality>
+			<foaf:depiction rdf:resource="{photo}"/>
+			<foaf:gender>
+				<xsl:value-of select="gender" />   
+			</foaf:gender>
+			<xsl:if test="string-length(contact/email) > 0">
+				<foaf:mbox rdf:resource="{concat('mailto:', contact/email)}"/>
+				<opl:email_address_digest rdf:resource="{vi:di-uri (contact/email)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(contact/facebook) > 0">
+				<sioc:link rdf:resource="{concat('http://www.facebook.com/profile.php?id=', contact/facebook)}"/>
+			</xsl:if>
+			<sioc:link rdf:resource="{concat('https://foursquare.com/user/', id)}" />
+			<oplfq:badges>
+				<xsl:value-of select="badges/count" />
+			</oplfq:badges>
+			<xsl:for-each select="mayorships/items">
+				<oplfq:is_mayor_of>
+					<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('mayorship_', id))}">
+						<rdf:type rdf:resource="&gn;Feature"/>
+						<opl:providedBy>
+							<foaf:Organization rdf:about="http://www.foursquare.com#this">
+								<foaf:name>Foursquare</foaf:name>
+								<foaf:homepage rdf:resource="http://www.foursquare.com"/>
+							</foaf:Organization>
+						</opl:providedBy>
+						<xsl:if test="name">
+							<dc:title>
+								<xsl:value-of select="name" />
+							</dc:title>
+						</xsl:if>                
+						<xsl:if test="contact/twitter">
+							<rdfs:seeAlso rdf:resource="{concat('http://twitter.com/', contact/twitter)}"/>
+						</xsl:if>
+						<xsl:if test="location/city">
+							<vcard:Locality>
+								<xsl:value-of select="location/city" />   
+							</vcard:Locality>
+						</xsl:if>
+						<xsl:if test="location/country">
+							<vcard:Country>
+								<xsl:value-of select="location/country" />   
+							</vcard:Country>
+						</xsl:if>
+						<xsl:if test="location/state">
+							<vcard:Region>
+								<xsl:value-of select="location/state" />   
+							</vcard:Region>
+						</xsl:if>
+						<xsl:if test="location/zip">
+							<vcard:Pcode>
+								<xsl:value-of select="location/zip" />   
+							</vcard:Pcode>
+						</xsl:if>
+						<xsl:if test="location/phone">
+							<vcard:TEL>
+								<xsl:value-of select="location/phone" />   
+							</vcard:TEL>
+						</xsl:if>
+						<xsl:if test="location/crossstreet">
+							<vcard:Street>
+								<xsl:value-of select="location/crossstreet" />   
+							</vcard:Street>
+						</xsl:if>
+						<xsl:if test="location/address">
+							<vcard:ADR>
+								<xsl:value-of select="location/address" />   
+							</vcard:ADR>
+						</xsl:if>
+						<xsl:if test="location/lng">
+							<geo:long rdf:datatype="&xsd;float">
+								<xsl:value-of select="location/lng"/>
+							</geo:long>
+						</xsl:if>
+						<xsl:if test="location/lat">
+							<geo:lat rdf:datatype="&xsd;float">
+								<xsl:value-of select="location/lat"/>
+							</geo:lat>
+						</xsl:if>
+						<bibo:uri rdf:resource="{concat('https://foursquare.com/venue/', id)}" />
+						<sioc:link rdf:resource="{concat('https://foursquare.com/venue/', id)}" />
+						<xsl:for-each select="categories">
+							<oplfq:category>
+								<bibo:Document rdf:about="{vi:proxyIRI ($baseUri, '', concat('category_', id))}">
+									<rdfs:label>
+										<xsl:value-of select="name"/>
+									</rdfs:label>
+									<dc:title>
+										<xsl:value-of select="name" />
+									</dc:title>
+									<dc:description>
+										<xsl:value-of select="name" />
+									</dc:description>
+									<foaf:depiction rdf:resource="{icon}"/>
+								</bibo:Document>
+							</oplfq:category>
+						</xsl:for-each>
+		</rdf:Description>
+				</oplfq:is_mayor_of>
+			</xsl:for-each>
+		</foaf:Person>
+    </xsl:template>
+		
+    <xsl:template match="response/venue">
+		<rdf:Description rdf:about="{$resourceURL}">
+			<rdf:type rdf:resource="&gn;Feature"/>
+                	<opl:providedBy>
+                		<foaf:Organization rdf:about="http://www.foursquare.com#this">
+                			<foaf:name>Foursquare</foaf:name>
+                			<foaf:homepage rdf:resource="http://www.foursquare.com"/>
+                		</foaf:Organization>
+                	</opl:providedBy>
+
+			<xsl:if test="name">
+				<dc:title>
+					<xsl:value-of select="name" />
+				</dc:title>
+			</xsl:if>                
+			<xsl:if test="contact/twitter">
+				<rdfs:seeAlso rdf:resource="{concat('http://twitter.com/', contact/twitter)}"/>
+			</xsl:if>
+			<xsl:if test="location/city">
+				<vcard:Locality>
+					<xsl:value-of select="location/city" />   
+				</vcard:Locality>
+			</xsl:if>
+			<xsl:if test="location/country">
+				<vcard:Country>
+					<xsl:value-of select="location/country" />   
+				</vcard:Country>
+			</xsl:if>
+			<xsl:if test="location/state">
+				<vcard:Region>
+					<xsl:value-of select="location/state" />   
+				</vcard:Region>
+			</xsl:if>
+			<xsl:if test="location/zip">
+				<vcard:Pcode>
+					<xsl:value-of select="location/zip" />   
+				</vcard:Pcode>
+			</xsl:if>
+			<xsl:if test="contact/phone">
+				<vcard:TEL>
+					<xsl:value-of select="contact/phone" />   
+				</vcard:TEL>
+			</xsl:if>
+			<xsl:if test="location/crossstreet">
+				<vcard:Street>
+					<xsl:value-of select="location/crossstreet" />   
+				</vcard:Street>
+			</xsl:if>
+			<xsl:if test="location/address">
+				<vcard:ADR>
+					<xsl:value-of select="location/address" />   
+				</vcard:ADR>
+			</xsl:if>
+			<xsl:if test="location/lng">
+				<geo:long rdf:datatype="&xsd;float">
+					<xsl:value-of select="location/lng"/>
+				</geo:long>
+			</xsl:if>
+			<xsl:if test="location/lat">
+				<geo:lat rdf:datatype="&xsd;float">
+					<xsl:value-of select="location/lat"/>
+				</geo:lat>
+			</xsl:if>
+			<bibo:uri rdf:resource="{concat('https://foursquare.com/venue/', id)}" />
+			<sioc:link rdf:resource="{concat('https://foursquare.com/venue/', id)}" />
+			<xsl:if test="stats">
+				<oplfq:checkins><xsl:value-of select="stats/checkinsCount"/></oplfq:checkins>
+				<oplfq:usersCount><xsl:value-of select="stats/usersCount"/></oplfq:usersCount>
+				<oplfq:tipCount><xsl:value-of select="stats/tipCount"/></oplfq:tipCount>
+			</xsl:if>
+			<xsl:if test="mayor/user">
+					<oplfq:mayor>
+					<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', mayor/user/id)}">
+							<rdfs:label>
+							<xsl:value-of select="concat(mayor/user/firstName, ' ', mayor/user/lastName)"/>
+							</rdfs:label>
+							<foaf:firstName>
+							<xsl:value-of select="mayor/user/firstName"/>
+							</foaf:firstName>
+							<foaf:familyName>
+							<xsl:value-of select="mayor/user/lastName"/>
+							</foaf:familyName>
+							<vcard:Locality>
+							<xsl:value-of select="mayor/user/homeCity" />   
+							</vcard:Locality>
+						<foaf:depiction rdf:resource="{mayor/user/photo}"/>
+							<foaf:gender>
+							<xsl:value-of select="mayor/user/gender" />   
+							</foaf:gender>
+						<sioc:link rdf:resource="{concat('https://foursquare.com/user/', mayor/user/id)}" />
+						<oplfq:count><xsl:value-of select="mayor/count"/></oplfq:count>							
+						</foaf:Person>
+					</oplfq:mayor>
+				</xsl:if>
+			<xsl:for-each select="tips/groups/items">
+					<review:hasReview>
+					<review:Review rdf:about="{vi:proxyIRI ($baseUri, '', concat('tip_', id))}">
+							<rdfs:label>
+								<xsl:value-of select="text"/>
+							</rdfs:label>
+							<dc:title>
+								<xsl:value-of select="text" />
+							</dc:title>
+							<dc:description>
+								<xsl:value-of select="text" />
+							</dc:description>
+							<dcterms:created rdf:datatype="&xsd;dateTime">
+							<xsl:value-of select="vi:http_string_date (createdAt)"/>
+							</dcterms:created>
+							<review:reviewer>
+							<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', concat('tip_of_', user/id))}">
+									<foaf:firstName>
+										<xsl:value-of select="user/firstname"/>
+									</foaf:firstName>
+									<foaf:familyName>
+										<xsl:value-of select="user/lastname"/>
+									</foaf:familyName>
+									<vcard:Locality>
+									<xsl:value-of select="user/homeCity" />   
+									</vcard:Locality>
+									<foaf:depiction rdf:resource="{user/photo}"/>
+									<foaf:gender>
+										<xsl:value-of select="user/gender" />   
+									</foaf:gender>
+								<sioc:link rdf:resource="{concat('https://foursquare.com/user/', user/id)}" />
+								</foaf:Person>
+							</review:reviewer>
+						</review:Review>
+					</review:hasReview>
+				</xsl:for-each>
+			<xsl:for-each select="categories">
+					<sioc:topic>
+					<bibo:Document rdf:about="{vi:proxyIRI ($baseUri, '', concat('category_', id))}">
+							<rdfs:label>
+							<xsl:value-of select="name"/>
+							</rdfs:label>
+							<dc:title>
+							<xsl:value-of select="name" />
+							</dc:title>
+							<dc:description>
+							<xsl:value-of select="name" />
+							</dc:description>
+						<foaf:depiction rdf:resource="{icon}"/>
+						</bibo:Document>
+					</sioc:topic>
+				</xsl:for-each>
+		</rdf:Description>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/fql2rdf.xsl b/binsrc/rdf_mappers/xslt/main/fql2rdf.xsl
index 5ea61df..6af0a07 100644
--- a/binsrc/rdf_mappers/xslt/main/fql2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/fql2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: fql2rdf.xsl,v 1.1.2.5 2011/03/25 17:10:59 source Exp $
+ -  $Id: fql2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,7 @@
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY sioct "http://rdfs.org/sioc/types#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -43,6 +44,7 @@
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
     xmlns:c   ="http://www.w3.org/2002/12/cal/icaltzd#"
+    xmlns:rdfs="&rdfs;"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:bibo="&bibo;"
     >
diff --git a/binsrc/rdf_mappers/xslt/main/friendfeed2rdf.xsl b/binsrc/rdf_mappers/xslt/main/friendfeed2rdf.xsl
index eaf4c44..739d5b7 100644
--- a/binsrc/rdf_mappers/xslt/main/friendfeed2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/friendfeed2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: friendfeed2rdf.xsl,v 1.1.2.5 2010/09/09 16:05:47 source Exp $
+ -  $Id: friendfeed2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/geo2rdf.xsl b/binsrc/rdf_mappers/xslt/main/geo2rdf.xsl
index 9904969..88f2986 100644
--- a/binsrc/rdf_mappers/xslt/main/geo2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/geo2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: geo2rdf.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: geo2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/geonames2rdf.xsl b/binsrc/rdf_mappers/xslt/main/geonames2rdf.xsl
index ce8f613..9d64a84 100644
--- a/binsrc/rdf_mappers/xslt/main/geonames2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/geonames2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: geonames2rdf.xsl,v 1.1.2.6 2010/07/28 12:23:31 source Exp $
+ -  $Id: geonames2rdf.xsl,v 1.1.2.11 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -60,13 +60,13 @@
 
     <xsl:output method="xml" indent="yes" />
 
-    <xsl:template match="/">
+    <xsl:template match="/rdf:RDF">
 	<rdf:RDF>
 	    <xsl:apply-templates/>
 	</rdf:RDF>
     </xsl:template>
 
-    <xsl:template match="rdf:RDF/geonames:Feature">
+    <xsl:template match="geonames:Feature">
 	<rdf:Description rdf:about="{$docproxyIRI}">
 	    <rdf:type rdf:resource="&bibo;Document"/>
 	    <sioc:container_of rdf:resource="{vi:proxyIRI($baseUri)}"/>
@@ -77,8 +77,16 @@
 	    <dc:title><xsl:value-of select="$baseUri"/></dc:title>
 	</rdf:Description>
 	<rdf:Description rdf:about="{vi:proxyIRI($baseUri)}">
+          	<opl:providedBy>
+          		<foaf:Organization rdf:about="http://www.geonames.org#this">
+          			<foaf:name>Geonames</foaf:name>
+          			<foaf:homepage rdf:resource="http://www.geonames.org"/>
+          		</foaf:Organization>
+          	</opl:providedBy>
+
 	    <rdf:type rdf:resource="&geonames;Feature"/>
-        <rdf:type rdf:resource="&gr;LocationOfSalesOrServiceProvisioning"/>
+			<rdf:type rdf:resource="&gr;Location"/>
+			<rdfs:label><xsl:value-of select="geonames:name"/></rdfs:label>
 	    <xsl:copy-of select="*"/>
 	</rdf:Description>
     </xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/getsatisfaction2rdf.xsl b/binsrc/rdf_mappers/xslt/main/getsatisfaction2rdf.xsl
index 0b00c3d..ec94eb2 100644
--- a/binsrc/rdf_mappers/xslt/main/getsatisfaction2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/getsatisfaction2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: getsatisfaction2rdf.xsl,v 1.1.2.5 2009/12/15 23:13:03 source Exp $
+ -  $Id: getsatisfaction2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,9 @@
 <!ENTITY xml 'http://www.w3.org/XML/1998/namespace#'>
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -41,7 +43,9 @@
     xmlns:opl-gs="http://www.openlinksw.com/schemas/getsatisfaction/"
     xmlns:gr="&gr;"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:opl="&opl;"
     xmlns:bibo="&bibo;"
+    xmlns:sioc="&sioc;"
     version="1.0">
 	<xsl:variable name="ns">http://getsatisfaction.com</xsl:variable>
 	<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
@@ -66,6 +70,13 @@
 	<xsl:template match="results">
 		<xsl:if test="$what = 'product'">
 			<rdf:Description rdf:about="{$resourceURL}">
+          	<opl:providedBy>
+          		<foaf:Organization rdf:about="http://www.getsatisfaction.com#this">
+          			<foaf:name>GetSatisfaction</foaf:name>
+          			<foaf:homepage rdf:resource="http://www.getsatisfaction.com"/>
+          		</foaf:Organization>
+          	</opl:providedBy>
+
 				<rdf:type rdf:resource="&foaf;Project" />
 				<foaf:name>
 					<xsl:value-of select="name" />
@@ -80,6 +91,12 @@
 		<xsl:if test="$what = 'products'">
 			<xsl:for-each select="data">
 				<rdf:Description rdf:about="{url}">
+          	<opl:providedBy>
+          		<foaf:Organization rdf:about="http://www.getsatisfaction.com#this">
+          			<foaf:name>GetSatisfaction</foaf:name>
+          			<foaf:homepage rdf:resource="http://www.getsatisfaction.com"/>
+          		</foaf:Organization>
+          	</opl:providedBy>
 					<rdf:type rdf:resource="&foaf;Project" />
 					<foaf:name>
 						<xsl:value-of select="name" />
@@ -94,6 +111,12 @@
 		</xsl:if>
 		<xsl:if test="$what = 'company'">
 			<foaf:Organization rdf:about="{$resourceURL}">
+          	<opl:providedBy>
+          		<foaf:Organization rdf:about="http://www.getsatisfaction.com#this">
+          			<foaf:name>GetSatisfaction</foaf:name>
+          			<foaf:homepage rdf:resource="http://www.getsatisfaction.com"/>
+          		</foaf:Organization>
+          	</opl:providedBy>
 				<foaf:name>
 					<xsl:value-of select="name" />
 				</foaf:name>
diff --git a/binsrc/rdf_mappers/xslt/main/google2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google2rdf.xsl
index 9062590..335dd4a 100644
--- a/binsrc/rdf_mappers/xslt/main/google2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/google2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: google2rdf.xsl,v 1.1.2.7 2010/04/22 12:41:35 source Exp $
+ -  $Id: google2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -54,6 +54,7 @@
 	xmlns:m="&m;"
     xmlns:d="&d;"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+    xmlns:opl="http://www.openlinksw.com/schemas/attribution#"
     version="1.0">
 
     <xsl:output method="xml" encoding="utf-8" indent="yes"/>
@@ -147,6 +148,7 @@
 		<rdf:type rdf:resource="&foaf;Agent"/>
 		<foaf:name><xsl:value-of select="name"/></foaf:name>
 		<foaf:mbox rdf:resource="mailto:{email}"/>
+				<opl:email_address_digest rdf:resource="{vi:di-uri (email)}"/>
 	    </rdf:Description>
 	</sioc:has_creator>
 		</xsl:if>
diff --git a/binsrc/rdf_mappers/xslt/main/google_book2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google_book2rdf.xsl
index 5429709..3ca5665 100644
--- a/binsrc/rdf_mappers/xslt/main/google_book2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/google_book2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: google_book2rdf.xsl,v 1.1.4.2 2010/08/17 18:32:24 source Exp $
+ -  $Id: google_book2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,6 +26,7 @@
 <!ENTITY video "http://purl.org/media/video#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 ]>
 
@@ -33,6 +34,7 @@
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
+  xmlns:opl="&opl;"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
@@ -104,6 +106,13 @@
 
 <xsl:template match="a:entry">
     <rdf:Description rdf:about="{$resourceURL}">
+          	<opl:providedBy>
+          		<foaf:Organization rdf:about="http://books.google.com#this">
+          			<foaf:name>Google Books</foaf:name>
+          			<foaf:homepage rdf:resource="http://books.google.com"/>
+          		</foaf:Organization>
+          	</opl:providedBy>
+
       <rdf:type rdf:resource="&bibo;Book"/>
           <xsl:apply-templates/>
     </rdf:Description>
diff --git a/binsrc/rdf_mappers/xslt/main/google_document2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google_document2rdf.xsl
index 379c888..a022b0f 100644
--- a/binsrc/rdf_mappers/xslt/main/google_document2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/google_document2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: google_document2rdf.xsl,v 1.1.2.7 2010/09/09 16:05:47 source Exp $
+ -  $Id: google_document2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -37,6 +37,7 @@
 	<!ENTITY content "http://purl.org/rss/1.0/modules/content/">
 	<!ENTITY ff "http://api.friendfeed.com/2008/03">
 	<!ENTITY gs "http://schemas.google.com/spreadsheets/2006">
+	<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -46,6 +47,7 @@
     xmlns:gs="&gs;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
+    xmlns:opl="&opl;"
     xmlns:foaf="&foaf;"
     xmlns:dcterms="&dcterms;"
     xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#"
@@ -78,6 +80,13 @@
 		</rdf:Description>
 
 		<rdf:Description rdf:about="{$resourceURL}">
+          	<opl:providedBy>
+          		<foaf:Organization rdf:about="http://docs.google.com#this">
+          			<foaf:name>Google Documents</foaf:name>
+          			<foaf:homepage rdf:resource="http://docs.google.com"/>
+          		</foaf:Organization>
+          	</opl:providedBy>
+
 			<rdf:type rdf:resource="&bibo;Document"/>
 			<dcterms:modified rdf:datatype="&xsd;dateTime">
 				<xsl:value-of select="a:updated"/>
diff --git a/binsrc/rdf_mappers/xslt/main/google_place2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google_place2rdf.xsl
new file mode 100644
index 0000000..c22191d
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/google_place2rdf.xsl
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: google_place2rdf.xsl,v 1.1.4.3 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+		
+    <xsl:template match="/PlaceDetailsResponse/result">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<rdf:Description rdf:about="{$resourceURL}">
+			<rdf:type rdf:resource="&gn;Feature"/>
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://maps.google.com#this">
+					<foaf:name>Google Maps</foaf:name>
+					<foaf:homepage rdf:resource="http://maps.google.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
+			<xsl:if test="name">
+				<dc:title>
+					<xsl:value-of select="name" />
+				</dc:title>
+				<rdfs:label>
+					<xsl:value-of select="name"/>
+				</rdfs:label>
+			</xsl:if>        
+			<xsl:if test="formatted_phone_number">
+				<foaf:phone rdf:resource="tel:{formatted_phone_number}"/>
+				<vcard:TEL>
+					<xsl:value-of select="formatted_phone_number" />   
+				</vcard:TEL>
+			</xsl:if>
+			<xsl:if test="formatted_address">
+				<vcard:ADR>
+					<xsl:value-of select="formatted_address" />   
+				</vcard:ADR>
+			</xsl:if>
+			<xsl:if test="address_component[type='locality']">
+				<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, address_component[type='locality']/long_name)}"/>
+			</xsl:if>
+			<xsl:if test="address_component[type='country']">
+				<vcard:Country rdf:resource="{vi:dbpIRI ($baseUri, address_component[type='country']/long_name)}"/>
+			</xsl:if>
+			<xsl:if test="address_component[type='administrative_area_level_1']">
+				<vcard:Region rdf:resource="{vi:dbpIRI ($baseUri, address_component[type='administrative_area_level_1']/long_name)}"/>
+			</xsl:if>
+			<xsl:if test="address_component[type='postal_code']">
+				<vcard:Pcode>
+					<xsl:value-of select="address_component[type='postal_code']/long_name" />   
+				</vcard:Pcode>
+			</xsl:if>
+			<xsl:if test="address_component[type='route']">
+				<vcard:Street>
+					<xsl:value-of select="address_component[type='route']/long_name" />   
+				</vcard:Street>
+			</xsl:if>
+			<xsl:if test="geometry/location/lng">
+				<geo:long rdf:datatype="&xsd;float">
+					<xsl:value-of select="geometry/location/lng"/>
+				</geo:long>
+			</xsl:if>
+			<xsl:if test="geometry/location/lat">
+				<geo:lat rdf:datatype="&xsd;float">
+					<xsl:value-of select="geometry/location/lat"/>
+				</geo:lat>
+			</xsl:if>
+			<bibo:uri rdf:resource="{url}" />
+			<sioc:link rdf:resource="{url}" />
+			<foaf:depiction rdf:resource="{icon}"/>
+			<xsl:if test="string-length(rating) > 0">
+				<review:rating>
+					<xsl:value-of select="rating"/>
+				</review:rating>
+			</xsl:if>
+			<xsl:for-each select="type">
+				<sioc:topic rdf:resource="{vi:dbpIRI ($baseUri, .)}"/>
+			</xsl:for-each>
+			
+		</rdf:Description>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/google_profile2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google_profile2rdf.xsl
new file mode 100644
index 0000000..bdea359
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/google_profile2rdf.xsl
@@ -0,0 +1,415 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: google_profile2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rss "http://purl.org/rss/1.0/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY m "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
+<!ENTITY d "http://schemas.microsoft.com/ado/2007/08/dataservices">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:dc="&dc;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:a="http://www.w3.org/2005/Atom"
+	xmlns:cv="http://purl.org/captsolo/resume-rdf/0.2/cv#"
+    xmlns:sioc="&sioc;"
+    xmlns:bibo="&bibo;"
+    xmlns:foaf="&foaf;"
+    xmlns:g="http://base.google.com/ns/1.0"
+    xmlns:gb="http://www.openlinksw.com/schemas/google-base#"
+    xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#"
+    xmlns:batch="http://schemas.google.com/gdata/batch"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:m="&m;"
+    xmlns:d="&d;"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"	
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+	xmlns:activity="http://activitystrea.ms/spec/1.0/" 
+	xmlns:buzz="http://schemas.google.com/buzz/2010"
+	xmlns:crosspost="http://purl.org/syndication/cross-posting" 
+	xmlns:gd="http://schemas.google.com/g/2005" 
+	xmlns:georss="http://www.georss.org/georss" 
+	xmlns:media="http://search.yahoo.com/mrss/" 
+	xmlns:poco="http://portablecontacts.net/ns/1.0" 
+	xmlns:thr="http://purl.org/syndication/thread/1.0"
+	xmlns:opl="&opl;"
+    version="1.0">
+
+	<xsl:output method="xml" encoding="utf-8" indent="yes"/>
+	
+	<xsl:param name="baseUri" />
+	<xsl:param name="action"/>
+	
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	
+	<xsl:template match="/entry">
+		<xsl:if test="$action = 'about'">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+		<rdf:Description rdf:about="{$resourceURL}">
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+							<foaf:name>Google Buzz</foaf:name>
+							<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+						</foaf:Organization>
+					</opl:providedBy>				
+			<rdf:type rdf:resource="&foaf;Person"/>
+			<rdfs:label>
+				<xsl:value-of select="displayName"/>
+			</rdfs:label>
+			<foaf:name>
+				<xsl:value-of select="displayName"/>
+			</foaf:name>
+			<dc:description>
+				<xsl:value-of select="aboutMe" />
+			</dc:description>
+			<sioc:link rdf:resource="{profileUrl}" />			
+			<foaf:depiction rdf:resource="{thumbnailUrl}"/>			
+			<xsl:for-each select="urls">
+						<foaf:onlineAccount rdf:resource="{value}"/>
+			</xsl:for-each>
+			<xsl:for-each select="photos">
+				<foaf:depiction rdf:resource="{value}"/>
+			</xsl:for-each>
+			<xsl:for-each select="organizations">
+				<cv:employedIn>
+					<cv:Company>
+								<opl:providedBy>
+									<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+										<foaf:name>Google Buzz</foaf:name>
+										<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+									</foaf:Organization>
+								</opl:providedBy>				
+						<xsl:attribute name="rdf:about">
+							<xsl:value-of select="vi:proxyIRI($baseUri, '', name )" />
+						</xsl:attribute>
+						<cv:Name>
+							<xsl:value-of select="name" />
+						</cv:Name>
+								<rdfs:label>
+									<xsl:value-of select="name" />
+								</rdfs:label>
+						<cv:jobTitle>
+							<xsl:value-of select="title"/>
+						</cv:jobTitle>
+						<cv:jobType>
+							<xsl:value-of select="type"/>
+						</cv:jobType>
+					</cv:Company>
+				</cv:employedIn>
+			</xsl:for-each>
+		</rdf:Description>
+			</rdf:RDF>
+		</xsl:if>						
+	</xsl:template>
+	
+	<xsl:template match="/feed">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<xsl:if test="$action = 'buzz'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+							<foaf:name>Google Buzz</foaf:name>
+							<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+						</foaf:Organization>
+					</opl:providedBy>				
+					<rdf:type rdf:resource="&sioct;MessageBoard"/>
+					<rdfs:label>
+						<xsl:value-of select="title"/>
+					</rdfs:label>
+					<dc:title>
+						<xsl:value-of select="title"/>
+					</dc:title>
+					<dcterms:modified rdf:datatype="&xsd;dateTime">
+						<xsl:value-of select="updated"/>
+					</dcterms:modified>
+					<xsl:for-each select="entry">
+						<sioc:container_of>
+							<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', id)}">
+								<opl:providedBy>
+									<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+										<foaf:name>Google Buzz</foaf:name>
+										<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+									</foaf:Organization>
+								</opl:providedBy>				
+								<rdf:type rdf:resource="&sioct;BoardPost"/>
+								<sioc:has_container rdf:resource="{$resourceURL}"/>
+								<rdfs:label>
+									<xsl:value-of select="title"/>
+								</rdfs:label>
+								<dc:title>
+									<xsl:value-of select="title"/>
+								</dc:title>
+								<dcterms:created rdf:datatype="&xsd;dateTime">
+									<xsl:value-of select="published"/>
+								</dcterms:created>
+								<dcterms:modified rdf:datatype="&xsd;dateTime">
+									<xsl:value-of select="updated"/>
+								</dcterms:modified>
+								<sioc:link rdf:resource="{link[@rel='alternate']/@href}" />
+								<dcterms:creator>
+									<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', author/poco:id)}">
+										<opl:providedBy>
+											<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+												<foaf:name>Google Buzz</foaf:name>
+												<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+											</foaf:Organization>
+										</opl:providedBy>				
+										<rdfs:label>
+											<xsl:value-of select="author/name"/>
+										</rdfs:label>
+										<foaf:name>
+											<xsl:value-of select="author/name"/>
+										</foaf:name>
+										<sioc:link rdf:resource="{author/uri}" />										
+										<foaf:depiction rdf:resource="{author/link[@rel='photo']/@href}"/>
+										<foaf:depiction rdf:resource="{author/poco:photoUrl}"/>
+										<foaf:page rdf:resource="{author/uri}"/>
+									</foaf:Person>
+								</dcterms:creator>
+								<bibo:content>
+									<xsl:value-of select="content"/>
+								</bibo:content>
+								<xsl:for-each select="activity:object/buzz:attachment">
+									<sioc:attachment>
+										<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', concat(../../id, '_attachment_', position()))}">
+											<opl:providedBy>
+												<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+													<foaf:name>Google Buzz</foaf:name>
+													<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+												</foaf:Organization>
+											</opl:providedBy>				
+											<rdf:type rdf:resource="&sioc;Item"/>
+											<xsl:if test="string-length(title) > 0">
+												<rdfs:label>
+													<xsl:value-of select="title"/>
+												</rdfs:label>
+												<dc:title>
+													<xsl:value-of select="title"/>
+												</dc:title>
+											</xsl:if>
+											<xsl:if test="string-length(title) = 0">
+												<rdfs:label>Attachement</rdfs:label>
+												<dc:title>Attachement</dc:title>
+											</xsl:if>
+											<sioc:link rdf:resource="{link[@rel='alternate' and @type='text/html']/@href}" />	
+											<xsl:if test="link[@rel='preview' and @type='image/jpeg']">
+												<foaf:depiction rdf:resource="{link[@rel='preview' and @type='image/jpeg']/@href}"/>
+											</xsl:if>
+											<xsl:if test="link[@rel='enclosure' and @type='image/jpeg']">
+												<foaf:depiction rdf:resource="{link[@rel='enclosure' and @type='image/jpeg']/@href}"/>
+											</xsl:if>
+										</rdf:Description>
+									</sioc:attachment>
+								</xsl:for-each>
+							</rdf:Description>
+						</sioc:container_of>
+					</xsl:for-each>
+				</rdf:Description>
+			</xsl:if>			
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/response">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<xsl:if test="$action = 'following'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<rdf:type rdf:resource="&foaf;Person"/>
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+							<foaf:name>Google Buzz</foaf:name>
+							<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+						</foaf:Organization>
+					</opl:providedBy>				
+					<xsl:for-each select="entry">
+						<sioc:subscriber_of rdf:resource="{vi:proxyIRI($baseUri, '', concat('following_', id))}"/>
+						<sioc:follows>
+							<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', concat('following_', id))}">
+								<opl:providedBy>
+									<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+										<foaf:name>Google Buzz</foaf:name>
+										<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+									</foaf:Organization>
+								</opl:providedBy>				
+								<rdfs:label>
+									<xsl:value-of select="displayName"/>
+								</rdfs:label>
+								<foaf:name>
+									<xsl:value-of select="displayName"/>
+								</foaf:name>
+								<sioc:link rdf:resource="{profileUrl}" />										
+								<foaf:depiction rdf:resource="{thumbnailUrl}"/>
+								<foaf:page rdf:resource="{profileUrl}"/>
+							</foaf:Person>							
+						</sioc:follows>
+					</xsl:for-each>
+				</rdf:Description>
+			</xsl:if>			
+			<xsl:if test="$action = 'followers'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<rdf:type rdf:resource="&foaf;Person"/>
+					<xsl:for-each select="entry">
+						<sioc:has_subscriber>
+							<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', concat('follower_', id))}">
+								<opl:providedBy>
+									<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+										<foaf:name>Google Buzz</foaf:name>
+										<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+									</foaf:Organization>
+								</opl:providedBy>				
+								<sioc:follows rdf:resource="{$resourceURL}"/>
+								<rdfs:label>
+									<xsl:value-of select="displayName"/>
+								</rdfs:label>
+								<foaf:name>
+									<xsl:value-of select="displayName"/>
+								</foaf:name>
+								<sioc:link rdf:resource="{profileUrl}" />										
+								<foaf:depiction rdf:resource="{thumbnailUrl}"/>
+								<foaf:page rdf:resource="{profileUrl}"/>
+							</foaf:Person>							
+						</sioc:has_subscriber>
+					</xsl:for-each>
+				</rdf:Description>
+			</xsl:if>			
+		</rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="/collection">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<xsl:if test="$action = 'photos'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+							<foaf:name>Google Buzz</foaf:name>
+							<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+						</foaf:Organization>
+					</opl:providedBy>				
+					<rdf:type rdf:resource="&sioct;ImageGallery" />
+					<rdfs:label>Collection of photos</rdfs:label>
+					<dc:title>Collection of photos</dc:title>
+					<xsl:for-each select="entry">
+						<sioc:container_of>
+							<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', concat('album_', id))}">
+								<rdf:type rdf:resource="&sioct;ImageGallery" />							
+								<opl:providedBy>
+									<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+										<foaf:name>Google Buzz</foaf:name>
+										<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+									</foaf:Organization>
+								</opl:providedBy>				
+								<rdfs:label>
+									<xsl:value-of select="title"/>
+								</rdfs:label>
+								<dc:title>
+									<xsl:value-of select="title"/>
+								</dc:title>
+								<dcterms:created rdf:datatype="&xsd;dateTime">
+									<xsl:value-of select="created"/>
+								</dcterms:created>
+								<dcterms:modified rdf:datatype="&xsd;dateTime">
+									<xsl:value-of select="lastModified"/>
+								</dcterms:modified>
+								<dcterms:creator>
+									<foaf:Person rdf:about="{vi:proxyIRI($baseUri, '', owner/poco:id)}">
+										<opl:providedBy>
+											<foaf:Organization rdf:about="http://www.google.com/buzz#this">
+												<foaf:name>Google Buzz</foaf:name>
+												<foaf:homepage rdf:resource="http://www.google.com/buzz"/>
+											</foaf:Organization>
+										</opl:providedBy>				
+										<rdfs:label>
+											<xsl:value-of select="owner/name"/>
+										</rdfs:label>
+										<foaf:name>
+											<xsl:value-of select="owner/name"/>
+										</foaf:name>
+										<sioc:link rdf:resource="{owner/uri}" />										
+										<foaf:depiction rdf:resource="{owner/poco:photoUrl}"/>
+										<foaf:page rdf:resource="{owner/uri}"/>
+									</foaf:Person>
+								</dcterms:creator>
+							</rdf:Description>							
+						</sioc:container_of>
+					</xsl:for-each>
+				</rdf:Description>
+			</xsl:if>			
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="text()" />
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/google_spreadsheet2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google_spreadsheet2rdf.xsl
index 12ac46c..3b78c46 100644
--- a/binsrc/rdf_mappers/xslt/main/google_spreadsheet2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/google_spreadsheet2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: google_spreadsheet2rdf.xsl,v 1.1.2.6 2009/12/15 23:13:03 source Exp $
+ -  $Id: google_spreadsheet2rdf.xsl,v 1.1.2.9 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,6 +33,7 @@
 	<!ENTITY rss "http://purl.org/rss/1.0/">
 	<!ENTITY dc "http://purl.org/dc/elements/1.1/">
 	<!ENTITY dcterms "http://purl.org/dc/terms/">
+	<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 	<!ENTITY atomowl "http://atomowl.org/ontologies/atomrdf#">
 	<!ENTITY content "http://purl.org/rss/1.0/modules/content/">
 	<!ENTITY ff "http://api.friendfeed.com/2008/03">
@@ -46,6 +47,7 @@
     xmlns:xn="http://www.ning.com/atom/1.0"
     xmlns:gs="&gs;"
     xmlns:bibo="&bibo;"
+    xmlns:opl="&opl;"
     xmlns:sioc="&sioc;"
     xmlns:foaf="&foaf;"
     xmlns:dcterms="&dcterms;"
@@ -82,6 +84,13 @@
 			</rdf:Description>
 
 			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://spreadsheets.google.com#this">
+                        			<foaf:name>Google Spreadsheets</foaf:name>
+                        			<foaf:homepage rdf:resource="http://spreadsheets.google.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 				<rdf:type rdf:resource="&bibo;Document"/>
 				<dcterms:modified rdf:datatype="&xsd;dateTime">
 					<xsl:value-of select="a:updated"/>
diff --git a/binsrc/rdf_mappers/xslt/main/google_store2rdf.xsl b/binsrc/rdf_mappers/xslt/main/google_store2rdf.xsl
new file mode 100644
index 0000000..875d6b1
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/google_store2rdf.xsl
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: google_store2rdf.xsl,v 1.1.4.6 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY pto "http://www.productontology.org/id/">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
+<!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#"> 
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:sioc="&sioc;"
+    xmlns:owl="&owl;"
+	xmlns:s="http://www.google.com/shopping/api/schemas/2010"
+    xmlns:pto="&pto;" 
+    xmlns:dcterms="&dcterms;"
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"  
+    xmlns:review="&review;"    
+    xmlns:gr="&gr;"
+    xmlns:opl="&opl;"
+    xmlns:bestbuy="http://remix.bestbuy.com/"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:cl="&cl;"
+    xmlns:oplbb="&oplbb;">
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri"/>
+
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:variable name="quote"><xsl:text>"</xsl:text></xsl:variable>
+
+    <xsl:template match="/feed">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+				<foaf:primaryTopic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Vendor')}"/>
+				<foaf:topic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+			</rdf:Description>
+			<gr:Offering rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.google.com#this">
+                        			<foaf:name>Google Store</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.google.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+			    <sioc:has_container rdf:resource="{$docproxyIRI}"/>
+			    <gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+			    <rdfs:label><xsl:value-of select="entry[1]/title"/></rdfs:label>
+			    <gr:includes rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+			    <gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
+			    <gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModeMail"/>
+			    <xsl:apply-templates select="entry[1]" mode="offering" />
+			</gr:Offering>
+            <gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', 'Vendor')}">
+                <rdfs:comment>Google Store</rdfs:comment>
+                <rdfs:label>Google Store</rdfs:label>
+                <gr:legalName>Google Store</gr:legalName>
+                <gr:offers rdf:resource="{$resourceURL}"/>
+                <foaf:homepage rdf:resource="http://www.google.com" />
+                <rdfs:seeAlso rdf:resource="{vi:proxyIRI ('http://www.google.com')}"/>
+				<foaf:depiction rdf:resource="http://www.googlestore.com/images/googlestore_logo.gif"/>
+	        </gr:BusinessEntity>
+			<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+			    <rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
+			    <rdf:type rdf:resource="&oplbb;Product" />
+                <!--gr:hasMakeAndModel>
+                    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'MakeAndModel')}">
+                        <rdf:type rdf:resource="&gr;ProductOrServiceModel"/>
+                        <rdf:type rdf:resource="&oplbb;Product"/>
+                        <xsl:apply-templates select="entry[1]" mode="manufacturer" /> 
+                    </rdf:Description>
+                </gr:hasMakeAndModel-->
+                <xsl:apply-templates select="entry[1]" />
+			</rdf:Description>
+		</rdf:RDF>
+    </xsl:template>
+
+    <xsl:template match="entry">
+        <xsl:apply-templates select="*"/>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:description">
+		<oplbb:description rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:description>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:inventories/s:inventory/s:price" mode="offering">
+        <gr:hasPriceSpecification>
+            <gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'UnitPriceSpecification')}">
+                <rdfs:label>
+					<xsl:value-of select="concat( ., ' (', @currency, ')')"/>	
+				</rdfs:label>
+                <gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+                <gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="."/></gr:hasCurrencyValue>
+                <gr:hasCurrency rdf:datatype="&xsd;string"><xsl:value-of select="@currency"/></gr:hasCurrency>
+            </gr:UnitPriceSpecification>
+        </gr:hasPriceSpecification>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:creationTime">
+        <dcterms:created>
+			<xsl:value-of select="."/>
+		</dcterms:created>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:modificationTime">
+        <dcterms:modified>
+			<xsl:value-of select="."/>
+		</dcterms:modified>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:images/s:image">
+		<xsl:if test="string-length(@link) > 0">
+			<xsl:element namespace="&oplbb;" name="image">
+			<xsl:attribute name="rdf:resource">
+				<xsl:value-of select="@link"/>
+			</xsl:attribute>
+			</xsl:element>
+		</xsl:if>
+    </xsl:template>
+
+    <xsl:template match="entry/title">
+		<rdfs:label>
+			<xsl:value-of select="."/>
+		</rdfs:label>
+		<gr:name>
+			<xsl:value-of select="."/>
+		</gr:name>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:link">
+        <sioc:link rdf:resource="{.}"/>
+    </xsl:template>
+
+    <xsl:template match="entry/s:product/s:googleId">
+        <oplbb:productId><xsl:value-of select="."/></oplbb:productId>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+    <xsl:template match="text()|@*" mode="offering" />
+    <xsl:template match="text()|@*" mode="manufacturer" />
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/googlebase2rdf.xsl b/binsrc/rdf_mappers/xslt/main/googlebase2rdf.xsl
index a5c08cf..79fbf00 100644
--- a/binsrc/rdf_mappers/xslt/main/googlebase2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/googlebase2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: googlebase2rdf.xsl,v 1.3.2.8 2011/03/28 13:02:52 source Exp $
+ -  $Id: googlebase2rdf.xsl,v 1.3.2.13 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,6 +25,7 @@
 <!ENTITY a "http://www.w3.org/2005/Atom">
 <!ENTITY batch "http://schemas.google.com/gdata/batch">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+  <!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
@@ -43,7 +44,7 @@
 <!ENTITY vcard "http://www.w3.org/2006/vcard/ns#">
 <!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
 <!ENTITY virtrdf "http://www.openlinksw.com/schemas/virtrdf#">
-<!ENTITY wgs84 "http://www.w3.org/2003/01/geo/wgs84_pos#">
+  <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:a="&a;"
@@ -55,6 +56,7 @@
     xmlns:g="&g;"
     xmlns:gm="&gm;"
     xmlns:gr="&gr;"
+  xmlns:pto="&pto;" 
     xmlns:oplgb="&oplgb;"
     xmlns:owl="&owl;"
     xmlns:rdf="&rdf;"
@@ -65,7 +67,7 @@
     xmlns:vcard="&vcard;"
     xmlns:vi="&vi;"
     xmlns:virtrdf="&virtrdf;"
-    xmlns:wgs84="&wgs84;"
+  xmlns:geo="&geo;"
     xmlns:xsd="&xsd;"
     xmlns:xsl="&xsl;"
 	extension-element-prefixes="vi"
@@ -424,15 +426,15 @@
     </xsl:template>
 
     <xsl:template match="g:latitude">
-    <wgs84:lat>
+    <geo:lat>
       <xsl:value-of select="."/>
-    </wgs84:lat>
+    </geo:lat>
     </xsl:template>
 
     <xsl:template match="g:longitude">
-    <wgs84:long>
+    <geo:long>
       <xsl:value-of select="."/>
-    </wgs84:long>
+    </geo:long>
     </xsl:template>
 
   <xsl:template match="g:price" />
diff --git a/binsrc/rdf_mappers/xslt/main/googleplus2rdf.xsl b/binsrc/rdf_mappers/xslt/main/googleplus2rdf.xsl
new file mode 100644
index 0000000..11b5181
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/googleplus2rdf.xsl
@@ -0,0 +1,827 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: googleplus2rdf.xsl,v 1.1.4.8 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY awol "http://bblfish.net/work/atom-owl/2006-06-06/#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcmitype "http://purl.org/dc/dcmitype/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY oplcv "http://www.openlinksw.com/schemas/cv#">
+<!ENTITY oplgp "http://www.openlinksw.com/schemas/googleplus#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vCard "http://www.w3.org/2006/vcard/ns#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY xsi "http://www.w3.org/2001/XMLSchema-instance">
+<!ENTITY xsl "http://www.w3.org/1999/XSL/Transform">
+<!ENTITY oplcert "http://www.openlinksw.com/schemas/cert#">
+]>
+<xsl:stylesheet 
+  xmlns:awol="&awol;" 
+  xmlns:bibo="&bibo;" 
+  xmlns:dc="&dc;" 
+  xmlns:dcmitype="&dcmitype;" 
+  xmlns:dcterms="&dcterms;" 
+  xmlns:foaf="&foaf;" 
+  xmlns:opl="&opl;" 
+  xmlns:oplcv="&oplcv;" 
+  xmlns:oplgp="&oplgp;" 
+  xmlns:owl="&owl;" 
+  xmlns:rdf="&rdf;" 
+  xmlns:rdfs="&rdfs;" 
+  xmlns:sioc="&sioc;" 
+  xmlns:vCard="&vCard;" 
+  xmlns:vi="&vi;" 
+  xmlns:xsd="&xsd;" 
+  xmlns:xsi="&xsi;" 
+  xmlns:xsl="&xsl;" 
+  xmlns:oplcert="&oplcert;"
+  version="1.0">
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:param name="baseUri"/>
+  <xsl:param name="mode" />
+
+  <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+  <xsl:variable name="providedByIRI" select="concat ('http://www.google.com', '#this')"/>
+
+  <xsl:template match="/results">
+    <rdf:RDF>
+      <xsl:choose>
+	<xsl:when test="$mode = 'people'">
+	  <xsl:call-template name="container_doc"/>
+	  <rdf:Description rdf:about="{$resourceURL}">
+	    <xsl:apply-templates mode="people"/>
+	  </rdf:Description>
+	</xsl:when>
+	<xsl:when test="$mode = 'activity'">
+	    <xsl:choose>
+	      <xsl:when test="kind = 'plus#activity'">
+		<!-- A single Activity is being sponged directly from a Google+ Post URL -->
+		<xsl:call-template name="container_doc"/>
+		<rdf:Description rdf:about="{$resourceURL}">
+		  <xsl:call-template name="activity"/>
+		</rdf:Description>
+	      </xsl:when>
+	      <xsl:when test="kind = 'plus#activityFeed'">
+		<!-- Multiple Activities are being sponged in the course of sponging a Google+ user profile URL -->
+		<rdf:Description rdf:about="{$resourceURL}">
+		  <xsl:apply-templates mode="activity"/>
+		</rdf:Description>
+	      </xsl:when>
+	    </xsl:choose>
+	</xsl:when>
+	<xsl:when test="$mode = 'comment'">
+	    <xsl:apply-templates select="items" mode="comment"/>
+	</xsl:when>
+      </xsl:choose>
+    </rdf:RDF>
+  </xsl:template>
+
+  <!-- People mapping -->
+
+  <xsl:template match="/results/kind" mode="people">
+    <xsl:if test="contains(. ,'person')">
+      <rdf:type rdf:resource="&oplgp;Person"/>
+    </xsl:if>
+    <opl:providedBy rdf:resource="{$providedByIRI}" />
+  </xsl:template>
+
+  <xsl:template match="/results/id" mode="people">
+    <oplgp:id>
+      <xsl:value-of select="."/>
+    </oplgp:id>
+  </xsl:template>
+
+  <xsl:template match="/results/url" mode="people">
+    <oplgp:profile_url rdf:resource="{./text()}"/>
+  </xsl:template>
+
+  <xsl:template match="tagline" mode="people">
+    <oplgp:tagline>
+      <xsl:value-of select="."/>
+    </oplgp:tagline>
+  </xsl:template>
+
+  <xsl:template match="displayName" mode="people">
+    <oplgp:displayName>
+      <xsl:value-of select="."/>
+    </oplgp:displayName>
+  </xsl:template>
+
+  <xsl:template match="/results/name" mode="people">
+    <xsl:if test="contains(/results/kind ,'person')">
+      <oplgp:name>
+	<oplgp:Name rdf:about="{concat($resourceURL,'#Name')}">
+	  <xsl:if test="string-length(familyName) > 0">
+	    <oplgp:familyName>
+	      <xsl:value-of select="familyName"/>
+	    </oplgp:familyName>
+	  </xsl:if>
+	  <xsl:if test="string-length(formatted) > 0">
+	    <oplgp:formatted>
+	      <xsl:value-of select="formatted"/>
+	    </oplgp:formatted>
+	    <rdfs:label>
+	      <xsl:value-of select="formatted"/>
+	    </rdfs:label>
+	  </xsl:if>
+	  <xsl:if test="string-length(givenName) > 0">
+	    <oplgp:givenName>
+	      <xsl:value-of select="givenName"/>
+	    </oplgp:givenName>
+	  </xsl:if>
+	  <xsl:if test="string-length(honorificPrefix) > 0">
+	    <oplgp:honorificPrefix>
+	      <xsl:value-of select="honorificPrefix"/>
+	    </oplgp:honorificPrefix>
+	  </xsl:if>
+	  <xsl:if test="string-length(honorificSuffix) > 0">
+	    <oplgp:honorificSuffix>
+	      <xsl:value-of select="honorificSuffix"/>
+	    </oplgp:honorificSuffix>
+	  </xsl:if>
+	  <xsl:if test="string-length(middleName) > 0">
+	    <oplgp:middleName>
+	      <xsl:value-of select="middleName"/>
+	    </oplgp:middleName>
+	  </xsl:if>
+	</oplgp:Name>
+      </oplgp:name>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="gender" mode="people">
+    <oplgp:gender>
+      <xsl:value-of select="."/>
+    </oplgp:gender>
+  </xsl:template>
+
+  <xsl:template match="hasApp" mode="people">
+    <oplgp:hasApp rdf:datatype="&xsd;boolean">
+      <xsl:value-of select="."/>
+    </oplgp:hasApp>
+  </xsl:template>
+
+  <xsl:template match="aboutMe" mode="people">
+    <oplgp:aboutMe>
+      <xsl:value-of select="."/>
+    </oplgp:aboutMe>
+  </xsl:template>
+
+  <xsl:template match="relationshipStatus" mode="people">
+    <oplgp:relationshipStatus>
+      <xsl:value-of select="."/>
+    </oplgp:relationshipStatus>
+  </xsl:template>
+
+  <xsl:template match="emails" mode="people">
+    <!-- TO DO -->
+  </xsl:template>
+
+  <xsl:template match="languagesSpoken" mode="people">
+    <!-- TO DO -->
+  </xsl:template>
+
+  <xsl:template match="nickname" mode="people">
+    <oplgp:nickname>
+      <xsl:value-of select="."/>
+    </oplgp:nickname>
+  </xsl:template>
+
+  <xsl:template match="birthday" mode="people">
+    <oplgp:date_of_birth rdf:datatype="&xsd;date">
+      <xsl:value-of select="."/>
+    </oplgp:date_of_birth>
+  </xsl:template>
+
+  <xsl:template match="image" mode="people">
+    <oplgp:profile_image rdf:resource="{url}"/>
+  </xsl:template>
+
+  <xsl:template match="currentLocation" mode="people">
+    <oplgp:currentLocation>
+      <xsl:value-of select="."/>
+    </oplgp:currentLocation>
+  </xsl:template>
+
+  <!-- 
+  This approach is too clumsy. Opted instead to expose the URL directly rather 
+  than through a class which mirrors the source Google+ data structure.
+  -->
+  <!--
+  <xsl:template match="urls" mode="people">
+    <oplgp:shared_url>
+      <oplgp:Url rdf:about="{concat($resourceURL,'#Url_', position(.))}">
+	<rdfs:label>
+	  <xsl:choose>
+	    <xsl:when test="primary = '1'">
+	      <xsl:value-of select="concat (value, ' (primary)')"/>
+	    </xsl:when>
+	    <xsl:when test="string-length(type) > 0">
+	      <xsl:value-of select="concat (value, ' (', type, ')')"/>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:value-of select="value"/>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</rdfs:label>
+        <oplgp:url_value>
+          <xsl:value-of select="value"/>
+        </oplgp:url_value>
+        <xsl:if test="string-length(type) > 0">
+          <oplgp:url_type>
+            <xsl:value-of select="type"/>
+          </oplgp:url_type>
+        </xsl:if>
+        <xsl:if test="string-length(primary) > 0">
+          <oplgp:primary_url rdf:datatype="&xsd;boolean">
+            <xsl:value-of select="primary"/>
+          </oplgp:primary_url>
+        </xsl:if>
+      </oplgp:Url>
+    </oplgp:shared_url>
+  </xsl:template>
+  -->
+
+  <xsl:template match="urls" mode="people">
+    <xsl:apply-templates mode="people" />
+  </xsl:template>
+
+  <xsl:template match="urls[type = 'profile']/value" mode="people">
+    <!-- may duplicate /results/url -->
+    <oplgp:profile_url rdf:resource="{.}"/>
+  </xsl:template>
+
+  <xsl:template match="urls/value" mode="people">
+    <xsl:if test="not(../type) or ../type != 'profile'">
+      <oplgp:shared_url rdf:resource="{.}"/>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="organizations" mode="people">
+    <oplgp:associatedWith>
+      <oplgp:Organization rdf:about="{concat($resourceURL,'#Organization_',position(.))}">
+        <xsl:if test="string-length(department) > 0">
+          <oplgp:department>
+            <xsl:value-of select="department"/>
+          </oplgp:department>
+        </xsl:if>
+        <xsl:if test="string-length(description) > 0">
+          <oplgp:role>
+            <xsl:value-of select="description"/>
+          </oplgp:role>
+        </xsl:if>
+        <xsl:if test="string-length(startDate) > 0">
+          <oplgp:startDate rdf:datatype="&xsd;date">
+            <xsl:value-of select="startDate"/>
+          </oplgp:startDate>
+        </xsl:if>
+        <xsl:if test="string-length(endDate) > 0">
+          <oplgp:endDate rdf:datatype="&xsd;date">
+            <xsl:value-of select="endDate"/>
+          </oplgp:endDate>
+        </xsl:if>
+        <xsl:if test="string-length(location) > 0">
+          <oplgp:location>
+            <xsl:value-of select="location"/>
+          </oplgp:location>
+        </xsl:if>
+        <xsl:if test="string-length(name) > 0">
+          <oplgp:organization_name>
+            <xsl:value-of select="name"/>
+          </oplgp:organization_name>
+        </xsl:if>
+        <xsl:if test="string-length(primary) > 0">
+          <oplgp:primary_organization rdf:datatype="&xsd;boolean">
+            <xsl:value-of select="primary"/>
+          </oplgp:primary_organization>
+        </xsl:if>
+        <xsl:if test="string-length(title) > 0">
+          <oplgp:title>
+            <xsl:value-of select="title"/>
+          </oplgp:title>
+        </xsl:if>
+        <xsl:if test="string-length(type) > 0">
+          <oplgp:organization_type>
+            <xsl:value-of select="type"/>
+          </oplgp:organization_type>
+        </xsl:if>
+      </oplgp:Organization>
+    </oplgp:associatedWith>
+  </xsl:template>
+
+  <xsl:template match="placesLived" mode="people">
+    <oplgp:placeLived>
+      <oplgp:PlaceLived rdf:about="{concat($resourceURL,'#PlaceLived_',position(.))}">
+	  <rdfs:label>
+	    <xsl:choose>
+	      <!-- 'primary residence' suffix may confuse meta-cartridge lookups?
+	      <xsl:when test="primary = '1'">
+		<xsl:value-of select="concat (value, ' (primary residence)')"/>
+	      </xsl:when>
+	      -->
+	      <xsl:otherwise>
+		<xsl:value-of select="value"/>
+	      </xsl:otherwise>
+	    </xsl:choose>
+	  </rdfs:label>
+          <oplgp:residence_location>
+            <xsl:value-of select="value"/>
+          </oplgp:residence_location>
+        <xsl:if test="string-length(primary) > 0">
+          <oplgp:primary_residence rdf:datatype="&xsd;boolean">
+            <xsl:value-of select="primary"/>
+          </oplgp:primary_residence>
+        </xsl:if>
+      </oplgp:PlaceLived>
+    </oplgp:placeLived>
+  </xsl:template>
+
+  <xsl:template match="*|text()" mode="people"/>
+
+  <!-- Activity mapping -->
+
+  <!-- Presence of items element indicates multiple Activities are being sponged 
+       in the course of sponging a Google+ user profile URL -->
+  <xsl:template match="items" mode="activity">
+    <oplgp:performed_activity>
+      <rdf:Description rdf:about="{concat($resourceURL, '#Activity_', id)}">
+	<xsl:call-template name="activity"/>
+      </rdf:Description>
+    </oplgp:performed_activity>
+  </xsl:template>
+
+  <xsl:template match="access" mode="activity">
+    <xsl:variable name="activity_id" select="../id" />
+    <oplgp:Access rdf:about="{concat($resourceURL, '#Access_', $activity_id)}">
+      <xsl:if test="string-length(kind) > 0">
+	<oplgp:access_kind>
+	  <xsl:value-of select="kind"/>
+	</oplgp:access_kind>
+	<rdfs:label>
+	  <xsl:value-of select="concat('access kind: ', kind)"/>
+	</rdfs:label>
+      </xsl:if>
+      <xsl:if test="string-length(description) > 0">
+	<oplgp:access_description>
+	  <xsl:value-of select="description"/>
+	</oplgp:access_description>
+      </xsl:if>
+      <xsl:for-each select="items">
+	<oplgp:access_item>
+	  <oplgp:AccessItem rdf:about="{concat($resourceURL, '#AccessItem_', $activity_id, '_', position())}">
+	    <rdfs:label>
+	      <xsl:value-of select="concat('AccessItem (type: ', type, ')')"/>
+	    </rdfs:label>
+	    <oplgp:access_item_type>
+	      <xsl:value-of select="type"/>
+	    </oplgp:access_item_type>
+	    <xsl:if test="string-length(id) > 0">
+	      <oplgp:id>
+		<xsl:value-of select="id"/>
+	      </oplgp:id>
+	    </xsl:if>
+	  </oplgp:AccessItem>
+	</oplgp:access_item>
+      </xsl:for-each>
+    </oplgp:Access>
+  </xsl:template>
+
+  <xsl:template match="actor" mode="activity">
+    <oplgp:Actor rdf:about="{concat($resourceURL, '#Actor_', id)}">
+      <oplgp:id>
+	<xsl:value-of select="id"/>
+      </oplgp:id>
+      <oplgp:actor_displayName>
+	<xsl:value-of select="displayName"/>
+      </oplgp:actor_displayName>
+      <oplgp:actor_profile_image rdf:resource="{image/url}"/>
+      <!-- Link directly to the resource not the container doc 
+      <oplgp:actor_profile_url rdf:resource="{url}"/>
+      -->
+      <oplgp:actor_profile_url rdf:resource="{vi:proxyIRI(url)}"/>
+      <!-- x509 certificate -->
+      <xsl:if test="../object/content like '%di:%?hashtag=webid%'">
+	  <xsl:variable name="di"><xsl:copy-of select="vi:di-split (../object/content)"/></xsl:variable>
+	  <xsl:for-each select="$di/result/di">
+	      <xsl:variable name="fp"><xsl:value-of select="hash"/></xsl:variable>
+	      <xsl:variable name="dgst"><xsl:value-of select="dgst"/></xsl:variable>
+	      <xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fp)"/></xsl:variable>
+	      <oplcert:hasCertificate>
+		  <oplcert:Certificate rdf:about="{$ct}">
+		      <rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+		      <oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+		      <oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+		  </oplcert:Certificate>
+	      </oplcert:hasCertificate>
+	  </xsl:for-each>
+      </xsl:if>
+      <!-- end certificate -->
+    </oplgp:Actor>
+  </xsl:template>
+
+  <xsl:template match="object" mode="activity">
+    <oplgp:ActivityObject rdf:about="{concat($resourceURL, '#ActivityObject_', ../id)}">
+      <xsl:if test="id">
+        <oplgp:id>
+	  <xsl:value-of select="id"/>
+        </oplgp:id>
+      </xsl:if>
+      <oplgp:activity_object_type>
+	<xsl:value-of select="objectType"/>
+      </oplgp:activity_object_type>
+
+      <xsl:if test="actor">
+	<oplgp:object_actor>
+	  <xsl:apply-templates select="actor" mode="activity" />
+	</oplgp:object_actor>
+      </xsl:if>
+
+      <xsl:if test="attachments">
+	  <xsl:apply-templates select="attachments" mode="activity" />
+      </xsl:if>
+
+      <oplgp:object_url rdf:resource="{url}"/>
+      <xsl:if test="string-length(content) > 0">
+	<oplgp:html_content>
+	  <xsl:value-of select="content"/>
+	</oplgp:html_content>
+      </xsl:if>
+      <xsl:choose>
+	<xsl:when test="string-length(originalContent) > 0">
+	  <oplgp:originalContent>
+	    <xsl:value-of select="originalContent"/>
+	  </oplgp:originalContent>
+	  <rdfs:label>
+	    <xsl:choose>
+	      <xsl:when test="string-length(content) > 50">
+	    <xsl:value-of select="concat(substring (content, 1, 50), '...')"/>
+	      </xsl:when>
+	      <xsl:otherwise>
+		<xsl:value-of select="content"/>
+	      </xsl:otherwise>
+	    </xsl:choose>
+	  </rdfs:label>
+	</xsl:when>
+	<xsl:otherwise>
+	  <rdfs:label>
+	    <!-- 
+	    <xsl:value-of select="concat(objectType, ' object linked to activity ', ../id)"/>
+	    -->
+	    <xsl:value-of select="../title"/>
+	  </rdfs:label>
+	</xsl:otherwise>
+      </xsl:choose>
+      <oplgp:plusoners_total rdf:datatype="&xsd;integer">
+	<xsl:value-of select="plusoners/totalItems"/>
+      </oplgp:plusoners_total>
+      <oplgp:replies_total rdf:datatype="&xsd;integer">
+	<xsl:value-of select="replies/totalItems"/>
+      </oplgp:replies_total>
+      <oplgp:resharers_total rdf:datatype="&xsd;integer">
+	<xsl:value-of select="resharers/totalItems"/>
+      </oplgp:resharers_total>
+    </oplgp:ActivityObject>
+  </xsl:template>
+
+  <xsl:template match="attachments" mode="activity">
+    <xsl:variable name="activity_id" select="../../id"/>
+    <xsl:variable name="attachment_idx" select="position(.)"/>
+      <oplgp:attachment>
+	<oplgp:Attachment rdf:about="{concat($resourceURL, '#Attachment_', $activity_id, '_', $attachment_idx)}">
+	  <xsl:if test="id">
+	    <oplgp:id>
+	      <xsl:value-of select="id"/>
+	    </oplgp:id>
+	  </xsl:if>
+	  <xsl:choose>
+	    <xsl:when test="displayName">
+	      <oplgp:attachment_displayName>
+		<xsl:value-of select="displayName"/>
+	      </oplgp:attachment_displayName>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <rdfs:label>
+		<xsl:value-of select="concat (objectType, ' attached to object of activity ', $activity_id)"/>
+	      </rdfs:label>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	  <oplgp:attachment_media_type>
+	    <xsl:value-of select="objectType"/>
+	  </oplgp:attachment_media_type>
+	  <xsl:if test="content">
+	    <oplgp:content>
+	      <xsl:value-of select="content"/>
+	    </oplgp:content>
+	  </xsl:if>
+	  <oplgp:attachment_url rdf:resource="{url}"/>
+	  <xsl:if test="image">
+	    <xsl:call-template name="image">
+	      <xsl:with-param name="image" select="image"/>
+	      <xsl:with-param name="activity_id" select="$activity_id"/>
+	      <xsl:with-param name="attachment_idx" select="$attachment_idx"/>
+	    </xsl:call-template>
+	  </xsl:if>
+	  <xsl:if test="fullImage">
+	    <xsl:call-template name="fullImage">
+	      <xsl:with-param name="fullImage" select="fullImage"/>
+	      <xsl:with-param name="activity_id" select="$activity_id"/>
+	      <xsl:with-param name="attachment_idx" select="$attachment_idx"/>
+	    </xsl:call-template>
+	  </xsl:if>
+	  <xsl:if test="embed">
+	    <xsl:call-template name="embed">
+	      <xsl:with-param name="embed" select="embed"/>
+	      <xsl:with-param name="activity_id" select="$activity_id"/>
+	      <xsl:with-param name="attachment_idx" select="$attachment_idx"/>
+	    </xsl:call-template>
+	  </xsl:if>
+	</oplgp:Attachment>
+      </oplgp:attachment>
+  </xsl:template>
+
+  <!-- Comments mapping -->
+
+  <xsl:template match="items" mode="comment">
+    <xsl:variable name="activity_id" select="inReplyTo/id"/>
+    <xsl:variable name="activity_object_url" select="concat($resourceURL, '#ActivityObject_', $activity_id)"/>
+    <rdf:Description rdf:about="{$activity_object_url}">
+      <oplgp:has_comment>
+	<oplgp:Comment rdf:about="{concat($resourceURL, '#Comment_', id)}">
+	  <rdfs:label>
+	    <xsl:variable name="plain_content">
+	      <xsl:call-template name="strip-HTML">
+		<xsl:with-param name="text" select="object/content"/>
+	      </xsl:call-template>
+	    </xsl:variable>
+	    <xsl:choose>
+	      <xsl:when test="string-length($plain_content) > 50">
+		<xsl:value-of select="concat(actor/displayName, ': ', substring ($plain_content, 1, 50), '...')"/>
+	      </xsl:when>
+	      <xsl:otherwise>
+		<xsl:value-of select="concat(actor/displayName, ': ',$plain_content)"/>
+	      </xsl:otherwise>
+	    </xsl:choose>
+	  </rdfs:label>
+	  <oplgp:id>
+	    <xsl:value-of select="id"/>
+	  </oplgp:id>
+	  <oplgp:in_reply_to rdf:resource="{$activity_object_url}"/>
+	  <oplgp:comment_content>
+	    <xsl:value-of select="object/content"/>
+	  </oplgp:comment_content>
+	  <xsl:if test="string-length(published) > 0">
+	    <oplgp:published rdf:datatype="&xsd;dateTime">
+	      <xsl:value-of select="published"/>
+	    </oplgp:published>
+	  </xsl:if>
+	  <xsl:if test="string-length(updated) > 0">
+	    <oplgp:updated rdf:datatype="&xsd;dateTime">
+	      <xsl:value-of select="updated"/>
+	    </oplgp:updated>
+	  </xsl:if>
+	  <oplgp:comment_self_link rdf:resource="{selfLink}"/>
+	  <oplgp:comment_verb>
+	    <xsl:value-of select="verb"/>
+	  </oplgp:comment_verb>
+	  <oplgp:in_reply_to_object>
+	    <oplgp:InReplyTo rdf:about="{concat($resourceURL, '#InReplyTo_', $activity_id, '_', position(.))}">
+	      <oplgp:activity_replied_to_id>
+		<xsl:value-of select="inReplyTo/id"/>
+	      </oplgp:activity_replied_to_id>
+	      <oplgp:in_reply_to_url rdf:resource="{inReplyTo/url}"/>
+	    </oplgp:InReplyTo>
+	  </oplgp:in_reply_to_object>
+	  <oplgp:comment_actor>
+	    <xsl:apply-templates select="actor" mode="activity" />
+	  </oplgp:comment_actor>
+	</oplgp:Comment>
+      </oplgp:has_comment>
+    </rdf:Description>
+  </xsl:template>
+
+  <!-- Named templates -->
+
+  <xsl:template name="container_doc">
+    <rdf:Description rdf:about="{$docproxyIRI}">
+      <rdf:type rdf:resource="&bibo;Document"/>
+      <dc:title>
+	<xsl:value-of select="$baseUri"/>
+      </dc:title>
+      <rdf:type rdf:resource="&sioc;Container"/>
+      <sioc:container_of rdf:resource="{$resourceURL}"/>
+      <foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+      <dcterms:subject rdf:resource="{$resourceURL}"/>
+      <owl:sameAs rdf:resource="{$docIRI}"/>
+    </rdf:Description>
+  </xsl:template>
+
+  <xsl:template name="activity">
+    <rdf:type rdf:resource="&oplgp;Activity"/>
+    <opl:providedBy rdf:resource="{$providedByIRI}" />
+    <oplgp:id>
+      <xsl:value-of select="id"/>
+    </oplgp:id>
+    <oplgp:verb>
+      <xsl:value-of select="verb"/>
+    </oplgp:verb>
+    <oplgp:activity_url rdf:resource="{url}"/>
+    
+    <oplgp:access>
+      <xsl:apply-templates select="access" mode="activity" />
+    </oplgp:access>
+    
+    <oplgp:actor>
+      <xsl:apply-templates select="actor" mode="activity" />
+    </oplgp:actor>
+    
+    <oplgp:activity_object>
+      <xsl:apply-templates select="object" mode="activity" />
+    </oplgp:activity_object>
+    
+    <xsl:if test="string-length(address) > 0">
+      <oplgp:address>
+        <xsl:value-of select="address"/>
+      </oplgp:address>
+    </xsl:if>
+    <xsl:if test="string-length(annotation) > 0">
+      <oplgp:annotation>
+        <xsl:value-of select="annotation"/>
+      </oplgp:annotation>
+    </xsl:if>
+    <xsl:if test="string-length(crosspostSource) > 0">
+      <oplgp:crosspostSource>
+        <xsl:value-of select="crosspostSource"/>
+      </oplgp:crosspostSource>
+    </xsl:if>
+    <xsl:if test="string-length(geocode) > 0">
+      <oplgp:geocode>
+        <xsl:value-of select="geocode"/>
+      </oplgp:geocode>
+    </xsl:if>
+    <xsl:if test="string-length(placeId) > 0">
+      <oplgp:placeId>
+        <xsl:value-of select="placeId"/>
+      </oplgp:placeId>
+    </xsl:if>
+    <xsl:if test="string-length(placeName) > 0">
+      <oplgp:placeName>
+        <xsl:value-of select="placeName"/>
+      </oplgp:placeName>
+    </xsl:if>
+    <xsl:if test="string-length(provider/title) > 0">
+      <oplgp:providerTitle>
+        <xsl:value-of select="provider/title"/>
+      </oplgp:providerTitle>
+    </xsl:if>
+    <xsl:if test="string-length(published) > 0">
+      <oplgp:published rdf:datatype="&xsd;dateTime">
+        <xsl:value-of select="published"/>
+      </oplgp:published>
+    </xsl:if>
+    <xsl:if test="string-length(radius) > 0">
+      <oplgp:activity_radius>
+        <xsl:value-of select="radius"/>
+      </oplgp:activity_radius>
+    </xsl:if>
+    <xsl:if test="string-length(title) > 0">
+      <oplgp:activity_title>
+        <xsl:value-of select="title"/>
+      </oplgp:activity_title>
+    </xsl:if>
+    <xsl:if test="string-length(updated) > 0">
+      <oplgp:updated rdf:datatype="&xsd;dateTime">
+        <xsl:value-of select="updated"/>
+      </oplgp:updated>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="fullImage">
+    <xsl:param name="fullImage"/>
+    <xsl:param name="activity_id"/>
+    <xsl:param name="attachment_idx"/>
+    <xsl:for-each select="$fullImage">
+      <oplgp:fullImage>
+	<oplgp:FullImage rdf:about="{concat($resourceURL, '#FullImageAttachment_', $activity_id, '_', $attachment_idx)}">
+	  <rdfs:label>
+	    <xsl:value-of select="concat ('full image attached to object of activity ', $activity_id)"/>
+	  </rdfs:label>
+	  <oplgp:full_image_url rdf:resource="{url}"/>
+	  <oplgp:full_image_media_type>
+	    <xsl:value-of select="type"/>
+	  </oplgp:full_image_media_type>
+	  <oplgp:full_image_height rdf:datatype="&xsd;integer">
+	    <xsl:value-of select="height"/>
+	  </oplgp:full_image_height>
+	  <oplgp:full_image_width rdf:datatype="&xsd;integer">
+	    <xsl:value-of select="width"/>
+	  </oplgp:full_image_width>
+	</oplgp:FullImage>
+      </oplgp:fullImage>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template name="image">
+    <xsl:param name="image"/>
+    <xsl:param name="activity_id"/>
+    <xsl:param name="attachment_idx"/>
+    <xsl:for-each select="$image">
+      <oplgp:previewImage>
+	<oplgp:PreviewImage rdf:about="{concat($resourceURL, '#PreviewImageAttachment_', $activity_id, '_', $attachment_idx)}">
+	  <rdfs:label>
+	    <xsl:value-of select="concat ('preview image attached to object of activity ', $activity_id)"/>
+	  </rdfs:label>
+	  <oplgp:preview_image_url rdf:resource="{url}"/>
+	  <oplgp:preview_image_media_type>
+	    <xsl:value-of select="type"/>
+	  </oplgp:preview_image_media_type>
+	  <xsl:if test="height">
+	    <oplgp:preview_image_height rdf:datatype="&xsd;integer">
+	      <xsl:value-of select="height"/>
+	    </oplgp:preview_image_height>
+	  </xsl:if>
+	  <xsl:if test="width">
+	    <oplgp:preview_image_width rdf:datatype="&xsd;integer">
+	      <xsl:value-of select="width"/>
+	    </oplgp:preview_image_width>
+	  </xsl:if>
+	</oplgp:PreviewImage>
+      </oplgp:previewImage>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template name="embed">
+    <xsl:param name="embed"/>
+    <xsl:param name="activity_id"/>
+    <xsl:param name="attachment_idx"/>
+    <xsl:for-each select="$embed">
+      <oplgp:embed>
+	<oplgp:EmbeddableLink rdf:about="{concat($resourceURL, '#EmbedAttachment_', $activity_id, '_', $attachment_idx)}">
+	  <rdfs:label>
+	    <xsl:value-of select="concat ('embeddable link attached to object of activity ', $activity_id)"/>
+	  </rdfs:label>
+	  <oplgp:embed_url rdf:resource="{url}"/>
+	  <oplgp:embed_media_type>
+	    <xsl:value-of select="type"/>
+	  </oplgp:embed_media_type>
+	</oplgp:EmbeddableLink>
+      </oplgp:embed>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template name="strip-HTML">
+    <xsl:param name="text"/>
+    <xsl:choose>
+      <xsl:when test="contains($text, '>')">
+	<xsl:choose>
+	  <xsl:when test="contains($text, '<')">
+	    <xsl:value-of select="substring-before($text, '<')"/>
+          </xsl:when>
+          <xsl:otherwise>
+	    <xsl:value-of select="substring-before($text, '>')"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:call-template name="strip-HTML">
+	  <xsl:with-param name="text" select="substring-after($text, '>')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$text"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="*|text()" mode="activity"/>
+  <xsl:template match="*|text()" mode="comment"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/gowalla2rdf.xsl b/binsrc/rdf_mappers/xslt/main/gowalla2rdf.xsl
new file mode 100644
index 0000000..e59e8e3
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/gowalla2rdf.xsl
@@ -0,0 +1,672 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: gowalla2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplgw="http://www.openlinksw.com/schemas/gowalla#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+    <xsl:param name="what" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/results">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title>
+				<xsl:value-of select="$baseUri"/>
+			</dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<xsl:if test="$what='checkin'">		
+			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.gowalla.com#this">
+                        			<foaf:name>Gowalla</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.gowalla.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<rdf:type rdf:resource="&gn;Feature"/>
+				<xsl:if test="name">
+					<dc:title>
+						<xsl:value-of select="name"/>
+					</dc:title>
+					<rdfs:label>
+						<xsl:value-of select="name"/>
+					</rdfs:label>				
+				</xsl:if>                
+				<xsl:if test="string-length(address/locality) > 0">
+					<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, address/locality)}"/>
+				</xsl:if>
+				<xsl:if test="address/iso3166">
+					<vcard:Country rdf:resource="{vi:dbpIRI ($baseUri, address/iso3166)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(address/region) > 0">
+					<vcard:Region rdf:resource="{vi:dbpIRI ($baseUri, address/region)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(address/street_address) > 0">
+					<vcard:ADR>
+						<xsl:value-of select="address/street_address" />   
+					</vcard:ADR>
+				</xsl:if>
+				<dcterms:created>
+					<xsl:value-of select="created_at"/>
+				</dcterms:created>
+				<xsl:if test="string-length(image_url_200) > 0">
+					<foaf:depiction rdf:resource="{image_url_200}"/>
+				</xsl:if>
+				<xsl:if test="string-length(twitter_username) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://twitter.com/', twitter_username)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(image_url) > 0">
+					<foaf:depiction rdf:resource="{image_url}"/>
+				</xsl:if>
+				<oplgw:radius_meters>
+					<xsl:value-of select="radius_meters"/>
+				</oplgw:radius_meters>
+				<oplgw:trending_level>
+					<xsl:value-of select="trending_level"/>
+				</oplgw:trending_level>
+				<oplgw:max_items_count>
+					<xsl:value-of select="max_items_count"/>
+				</oplgw:max_items_count>
+				<dcterms:creator>
+					<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', creator/url)}">
+						<rdfs:label>
+							<xsl:value-of select="concat(creator/first_name, ' ', creator/last_name)"/>
+						</rdfs:label>
+						<foaf:firstName>
+							<xsl:value-of select="creator/first_name"/>
+						</foaf:firstName>
+						<foaf:familyName>
+							<xsl:value-of select="creator/last_name"/>
+						</foaf:familyName>
+						<foaf:depiction rdf:resource="{creator/image_url}"/>
+						<sioc:link rdf:resource="{concat('http://gowalla.com', creator/url)}" />
+					</foaf:Person>
+				</dcterms:creator>
+				<sioc:link rdf:resource="{concat('http://gowalla.com', url)}" />
+				<foaf:page rdf:resource="{concat('http://gowalla.com', url)}" />
+				<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', checkins_url)}"/>
+				<oplgw:users_count>
+					<xsl:value-of select="users_count"/>
+				</oplgw:users_count>
+				<oplgw:id>
+					<xsl:value-of select="id"/>
+				</oplgw:id>
+				<xsl:if test="lng">
+					<geo:long rdf:datatype="&xsd;float">
+						<xsl:value-of select="lng"/>
+					</geo:long>
+				</xsl:if>
+				<xsl:if test="lat">
+					<geo:lat rdf:datatype="&xsd;float">
+						<xsl:value-of select="lat"/>
+					</geo:lat>
+				</xsl:if>
+				<xsl:if test="string-length(spot_categories/url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', spot_categories/url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(foursquare_id) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://foursquare.com/venue/', foursquare_id)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(list_image_url_320) > 0">
+					<foaf:depiction rdf:resource="{list_image_url_320}"/>
+				</xsl:if>
+				<xsl:if test="string-length(highlights_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', highlights_url)}"/>
+				</xsl:if>
+				<xsl:for-each select="founders">
+					<oplgw:founder>
+						<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', url)}">
+							<rdfs:label>
+								<xsl:value-of select="concat(first_name, ' ', last_name)"/>
+							</rdfs:label>
+							<foaf:firstName>
+								<xsl:value-of select="first_name"/>
+							</foaf:firstName>
+							<foaf:familyName>
+								<xsl:value-of select="last_name"/>
+							</foaf:familyName>
+							<foaf:depiction rdf:resource="{image_url}"/>
+							<sioc:link rdf:resource="{concat('http://gowalla.com', url)}" />
+						</foaf:Person>
+					</oplgw:founder>
+				</xsl:for-each>
+				<oplgw:highlights_count>
+					<xsl:value-of select="highlights_count"/>
+				</oplgw:highlights_count>
+				<xsl:if test="string-length(phone_number) > 0">
+					<vcard:TEL>
+						<xsl:value-of select="phone_number" />   
+					</vcard:TEL>
+				</xsl:if>
+				<xsl:if test="string-length(items_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', items_url)}"/>
+				</xsl:if>
+				<oplgw:items_count>
+					<xsl:value-of select="items_count"/>
+				</oplgw:items_count>
+				<oplgw:photos_count>
+					<xsl:value-of select="photos_count"/>
+				</oplgw:photos_count>
+				<xsl:for-each select="last_checkins">
+					<sioc:topic>
+						<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', url)}">
+							<rdfs:label>
+								<xsl:value-of select="concat(user/first_name, ' ', user/last_name, ' checked-in: ', message)"/>
+							</rdfs:label>
+							<dc:title>
+								<xsl:value-of select="concat(user/first_name, ' ', user/last_name, ' checked-in: ', message)"/>
+							</dc:title>
+							<xsl:if test="string-length(message) > 0">
+								<dc:description>
+									<xsl:value-of select="message" />
+								</dc:description>
+							</xsl:if>
+							<dcterms:created>
+								<xsl:value-of select="created_at"/>
+							</dcterms:created>
+							<sioc:link rdf:resource="{concat('http://gowalla.com', url)}" />
+							<oplgw:type>
+								<xsl:value-of select="type"/>
+							</oplgw:type>
+							<dcterms:creator>
+								<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', user/url)}">
+									<rdfs:label>
+										<xsl:value-of select="concat(user/first_name, ' ', user/last_name)"/>
+									</rdfs:label>
+									<foaf:firstName>
+										<xsl:value-of select="user/first_name"/>
+									</foaf:firstName>
+									<foaf:familyName>
+										<xsl:value-of select="user/last_name"/>
+									</foaf:familyName>
+									<foaf:depiction rdf:resource="{user/image_url}"/>
+									<sioc:link rdf:resource="{concat('http://gowalla.com', user/url)}" />
+								</foaf:Person>
+							</dcterms:creator>
+						</sioct:Comment>
+					</sioc:topic>
+				</xsl:for-each>
+				<oplgw:strict_radius>
+					<xsl:value-of select="strict_radius"/>
+				</oplgw:strict_radius>
+				<xsl:if test="string-length(description) > 0">
+					<dc:description>
+						<xsl:value-of select="description" />
+					</dc:description>
+				</xsl:if>
+				<xsl:if test="string-length(hours) > 0">
+					<oplgw:hours>
+						<xsl:value-of select="hours" />
+					</oplgw:hours>
+				</xsl:if>
+				<xsl:if test="string-length(photos_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', photos_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(activity_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', activity_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(photos_count) > 0">
+					<oplgw:photos_count>
+						<xsl:value-of select="photos_count" />
+					</oplgw:photos_count>
+				</xsl:if>
+			</rdf:Description>
+		</xsl:if>
+		<xsl:if test="$what='photos'">
+			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.gowalla.com#this">
+                        			<foaf:name>Gowalla</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.gowalla.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<rdf:type rdf:resource="&sioct;ImageGallery"/>
+				<xsl:if test="activity[1]/spot/name">
+					<dc:title>
+						<xsl:value-of select="activity[1]/spot/name"/>
+					</dc:title>
+					<rdfs:label>
+						<xsl:value-of select="activity[1]/spot/name"/>
+					</rdfs:label>				
+				</xsl:if>                
+				<xsl:if test="string-length(activity[1]/spot/locality) > 0">
+					<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, activity[1]/spot/locality)}"/>
+				</xsl:if>
+				<xsl:if test="activity[1]/spot/iso3166">
+					<vcard:Country rdf:resource="{vi:dbpIRI ($baseUri, activity[1]/spot/iso3166)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(activity[1]/spot/region) > 0">
+					<vcard:Region  rdf:resource="{vi:dbpIRI ($baseUri, activity[1]/spot/region)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(activity[1]/spot/street_address) > 0">
+					<vcard:ADR>
+						<xsl:value-of select="activity[1]/spot/street_address" />   
+					</vcard:ADR>
+				</xsl:if>
+				<xsl:if test="string-length(activity[1]/spot/image_url) > 0">
+					<foaf:depiction rdf:resource="{activity[1]/spot/image_url}"/>
+				</xsl:if>
+				<xsl:if test="string-length(url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', url)}"/>
+				</xsl:if>
+				<xsl:for-each select="activity">
+					<sioc:container_of rdf:resource="{vi:proxyIRI ($baseUri, '', concat('photo_', checkin_url))}"/>
+				</xsl:for-each>
+			</rdf:Description>
+			<xsl:for-each select="activity">
+				<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('photo_', checkin_url))}">
+					<rdf:type rdf:resource="&foaf;Image"/>
+					<xsl:if test="spot/name">
+						<dc:title>
+							<xsl:value-of select="concat(spot/name, ' by ', user/name, ' at ', created_at, ' - ', message)"/>
+						</dc:title>
+						<rdfs:label>
+							<xsl:value-of select="concat(spot/name, ' by ', user/name, ' at ', created_at, ' - ', message)"/>
+						</rdfs:label>				
+					</xsl:if>
+					<dcterms:created>
+						<xsl:value-of select="created_at"/>
+					</dcterms:created>
+					<xsl:if test="string-length(photo_urls/square_50) > 0">
+						<foaf:depiction rdf:resource="{photo_urls/square_50}"/>
+					</xsl:if>
+					<xsl:if test="string-length(photo_urls/high_res_320x480) > 0">
+						<foaf:depiction rdf:resource="{photo_urls/high_res_320x480}"/>
+					</xsl:if>
+					<xsl:if test="string-length(photo_urls/square_75) > 0">
+						<foaf:depiction rdf:resource="{photo_urls/square_75}"/>
+					</xsl:if>
+					<xsl:if test="string-length(photo_urls/square_100) > 0">
+						<foaf:depiction rdf:resource="{photo_urls/square_100}"/>
+					</xsl:if>
+					<xsl:if test="string-length(photo_urls/low_res_320x480) > 0">
+						<foaf:depiction rdf:resource="{photo_urls/low_res_320x480}"/>
+					</xsl:if>
+					<xsl:if test="string-length(message) > 0">
+						<dc:description>
+							<xsl:value-of select="message" />
+						</dc:description>
+					</xsl:if>
+					<xsl:if test="string-length(checkin_url) > 0">
+						<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', checkin_url)}"/>
+					</xsl:if>
+					<sioc:has_container rdf:resource="{$resourceURL}"/>
+					<xsl:if test="string-length(spot/url) > 0">
+						<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', spot/url)}"/>
+					</xsl:if>
+					<dcterms:creator>
+						<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', user/url)}">
+							<rdfs:label>
+								<xsl:value-of select="user/name"/>
+							</rdfs:label>
+							<foaf:firstName>
+								<xsl:value-of select="user/first_name"/>
+							</foaf:firstName>
+							<foaf:nick>
+								<xsl:value-of select="user/username"/>
+							</foaf:nick>
+							<foaf:familyName>
+								<xsl:value-of select="user/last_name"/>
+							</foaf:familyName>
+							<foaf:depiction rdf:resource="{user/image_url}"/>
+							<sioc:link rdf:resource="{concat('http://gowalla.com', user/url)}" />
+							<xsl:if test="string-length(user/hometown) > 0">
+								<vcard:Locality>
+									<xsl:value-of select="user/hometown" />   
+								</vcard:Locality>
+							</xsl:if>
+						</foaf:Person>
+					</dcterms:creator>
+				</rdf:Description>
+			</xsl:for-each>
+		</xsl:if>
+		<xsl:if test="$what='highlights'">
+			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.gowalla.com#this">
+                        			<foaf:name>Gowalla</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.gowalla.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<rdf:type rdf:resource="&sioct;MessageBoard"/>
+				<xsl:if test="highlights[1]/spot/name">
+					<dc:title>
+						<xsl:value-of select="highlights[1]/spot/name"/>
+					</dc:title>
+					<rdfs:label>
+						<xsl:value-of select="highlights[1]/spot/name"/>
+					</rdfs:label>				
+				</xsl:if>                
+				<xsl:if test="string-length(highlights[1]/spot/image_url) > 0">
+					<foaf:depiction rdf:resource="{highlights[1]/spot/image_url}"/>
+				</xsl:if>
+				<xsl:if test="string-length(highlights/spot/url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', highlights/spot/url)}"/>
+				</xsl:if>
+				<xsl:for-each select="highlights">
+					<sioc:container_of rdf:resource="{vi:proxyIRI ($baseUri, '', concat('highlight_', updated_at))}"/>
+				</xsl:for-each>
+			</rdf:Description>
+			<xsl:for-each select="highlights">
+				<sioct:Comment rdf:about="{vi:proxyIRI ($baseUri, '', concat('highlight_', updated_at))}">
+					<xsl:if test="string-length(comment) > 0">
+					<rdfs:label>
+						<xsl:value-of select="comment"/>
+					</rdfs:label>
+					<dc:title>
+						<xsl:value-of select="comment"/>
+					</dc:title>
+					</xsl:if>
+					<xsl:if test="string-length(comment) = 0">
+						<rdfs:label>No comment</rdfs:label>
+						<dc:title>No comment</dc:title>
+					</xsl:if>
+					<xsl:if test="string-length(name) > 0">
+						<dc:description>
+							<xsl:value-of select="name" />
+						</dc:description>
+					</xsl:if>
+					<dcterms:created>
+						<xsl:value-of select="updated_at"/>
+					</dcterms:created>
+					<sioc:link rdf:resource="{concat('http://gowalla.com', url)}" />
+					<xsl:if test="string-length(highlight_type/url) > 0">
+						<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', highlights/url)}"/>
+					</xsl:if>
+					<xsl:if test="string-length(image_url) > 0">
+						<foaf:depiction rdf:resource="{image_url}"/>
+					</xsl:if>
+					<dcterms:creator>
+						<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', user/url)}">
+							<rdfs:label>
+								<xsl:value-of select="user/name"/>
+							</rdfs:label>
+							<foaf:firstName>
+								<xsl:value-of select="user/first_name"/>
+							</foaf:firstName>
+							<foaf:familyName>
+								<xsl:value-of select="user/last_name"/>
+							</foaf:familyName>
+							<foaf:depiction rdf:resource="{user/image_url}"/>
+							<sioc:link rdf:resource="{concat('http://gowalla.com', user/url)}" />
+							<xsl:if test="string-length(user/hometown) > 0">
+								<vcard:Locality>
+									<xsl:value-of select="user/hometown" />   
+								</vcard:Locality>
+							</xsl:if>
+						</foaf:Person>
+					</dcterms:creator>
+				</sioct:Comment>
+			</xsl:for-each>
+		</xsl:if>
+		<xsl:if test="$what='user'">
+			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.gowalla.com#this">
+                        			<foaf:name>Gowalla</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.gowalla.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<rdf:type rdf:resource="&foaf;Person"/>
+				<rdfs:label>
+					<xsl:value-of select="concat(first_name, ' ', last_name)"/>
+				</rdfs:label>
+				<foaf:firstName>
+					<xsl:value-of select="first_name"/>
+				</foaf:firstName>
+				<foaf:familyName>
+					<xsl:value-of select="last_name"/>
+				</foaf:familyName>
+				<xsl:if test="string-length(bio) > 0">
+					<dc:description>
+						<xsl:value-of select="bio" />
+					</dc:description>
+				</xsl:if>
+				<xsl:if test="string-length(image_url) > 0">
+					<foaf:depiction rdf:resource="{image_url}"/>
+				</xsl:if>
+				<sioc:link rdf:resource="{concat('http://gowalla.com', url)}" />
+				<xsl:if test="string-length(image_url_200) > 0">
+					<foaf:depiction rdf:resource="{image_url_200}"/>
+				</xsl:if>
+				<xsl:if test="string-length(large_image_url) > 0">
+					<foaf:depiction rdf:resource="{large_image_url}"/>
+				</xsl:if>
+				<xsl:if test="string-length(top_spots_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', top_spots_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(trips_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', trips_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(add_friend_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', add_friend_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(country_pins_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', country_pins_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(bookmarked_spots_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', bookmarked_spots_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(challenge_pins_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', challenge_pins_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(bookmarked_spots_urls_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', bookmarked_spots_urls_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(pins_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', pins_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(highlights_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', highlights_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(items_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', items_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(friends_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', friends_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(website) > 0">
+					<rdfs:seeAlso rdf:resource="{website}"/>
+				</xsl:if>
+				<xsl:if test="string-length(photos_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', photos_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(trip_pins_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', trip_pins_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(state_pins_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', state_pins_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(activity_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', activity_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(province_pins_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', province_pins_url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(hometown) > 0">
+					<vcard:Locality>
+						<xsl:value-of select="hometown" />   
+					</vcard:Locality>
+				</xsl:if>
+				<oplgw:facebook_id>
+					<xsl:value-of select="facebook_id"/>
+				</oplgw:facebook_id>
+				<oplgw:trip_pin_count>
+					<xsl:value-of select="trip_pin_count"/>
+				</oplgw:trip_pin_count>
+				<oplgw:is_friend>
+					<xsl:value-of select="_is_friend"/>
+				</oplgw:is_friend>
+				<oplgw:challenge_pin_count>
+					<xsl:value-of select="challenge_pin_count"/>
+				</oplgw:challenge_pin_count>
+				<oplgw:state_pin_count>
+					<xsl:value-of select="state_pin_count"/>
+				</oplgw:state_pin_count>
+				<rdfs:seeAlso rdf:resource="{concat('http://twitter.com/', twitter_username)}"/>
+				<oplgw:bookmarked_spots_count>
+					<xsl:value-of select="bookmarked_spots_count"/>
+				</oplgw:bookmarked_spots_count>
+				<oplgw:province_pin_count>
+					<xsl:value-of select="province_pin_count"/>
+				</oplgw:province_pin_count>
+				<oplgw:stamps_count>
+					<xsl:value-of select="stamps_count"/>
+				</oplgw:stamps_count>
+				<oplgw:pins_count>
+					<xsl:value-of select="pins_count"/>
+				</oplgw:pins_count>
+				<oplgw:country_pin_count>
+					<xsl:value-of select="country_pin_count"/>
+				</oplgw:country_pin_count>
+				<oplgw:highlights_count>
+					<xsl:value-of select="highlights_count"/>
+				</oplgw:highlights_count>
+				<oplgw:region_pin_count>
+					<xsl:value-of select="region_pin_count"/>
+				</oplgw:region_pin_count>
+				<oplgw:trips_count>
+					<xsl:value-of select="trips_count"/>
+				</oplgw:trips_count>
+				<oplgw:twitter_id>
+					<xsl:value-of select="twitter_id"/>
+				</oplgw:twitter_id>
+				<oplgw:items_count>
+					<xsl:value-of select="items_count"/>
+				</oplgw:items_count>
+				<oplgw:friends_count>
+					<xsl:value-of select="friends_count"/>
+				</oplgw:friends_count>
+				<oplgw:photos_count>
+					<xsl:value-of select="photos_count"/>
+				</oplgw:photos_count>
+			</rdf:Description>
+		</xsl:if>
+		<xsl:if test="$what='checkins'">
+			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.gowalla.com#this">
+                        			<foaf:name>Gowalla</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.gowalla.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<rdf:type rdf:resource="&sioct;Comment"/>
+				<rdfs:label>
+					<xsl:value-of select="message"/>
+				</rdfs:label>
+				<dc:title>
+					<xsl:value-of select="message"/>
+				</dc:title>
+				<xsl:if test="string-length(message) > 0">
+					<dc:description>
+						<xsl:value-of select="message" />
+					</dc:description>
+				</xsl:if>
+				<dcterms:created>
+					<xsl:value-of select="created_at"/>
+				</dcterms:created>
+				<sioc:link rdf:resource="{concat('http://gowalla.com', url)}" />
+				<xsl:if test="string-length(spot/url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', spot/url)}"/>
+				</xsl:if>
+				<xsl:if test="string-length(image_url) > 0">
+					<foaf:depiction rdf:resource="{image_url}"/>
+				</xsl:if>
+				<dcterms:creator>
+					<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', user/url)}">
+						<rdfs:label>
+							<xsl:value-of select="concat(user/first_name, ' ', user/last_name)"/>
+						</rdfs:label>
+						<foaf:firstName>
+							<xsl:value-of select="user/first_name"/>
+						</foaf:firstName>
+						<foaf:familyName>
+							<xsl:value-of select="user/last_name"/>
+						</foaf:familyName>
+						<foaf:depiction rdf:resource="{user/image_url}"/>
+						<sioc:link rdf:resource="{concat('http://gowalla.com', user/url)}" />
+						<xsl:if test="string-length(user/hometown) > 0">
+							<vcard:Locality>
+								<xsl:value-of select="user/hometown" />   
+							</vcard:Locality>
+						</xsl:if>
+					</foaf:Person>
+				</dcterms:creator>
+				<xsl:if test="string-length(activity_url) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://gowalla.com', activity_url)}"/>
+				</xsl:if>
+			</rdf:Description>
+		</xsl:if>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+	
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/groupon2rdf.xsl b/binsrc/rdf_mappers/xslt/main/groupon2rdf.xsl
index 2b785bc..eb9a40d 100644
--- a/binsrc/rdf_mappers/xslt/main/groupon2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/groupon2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: groupon2rdf.xsl,v 1.1.4.2 2011/01/03 23:40:02 source Exp $
+ -  $Id: groupon2rdf.xsl,v 1.1.4.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -30,6 +30,7 @@
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY pto "http://www.productontology.org/id/">
 ]>
 <xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -39,6 +40,7 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 xmlns:foaf="&foaf;"
 xmlns:bibo="&bibo;"
 xmlns:sioc="&sioc;" 
+xmlns:pto="&pto;" 
 xmlns:gr="&gr;"
 xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
 xmlns:dcterms="&dcterms;"
@@ -64,6 +66,11 @@ xmlns:owl="http://www.w3.org/2002/07/owl#"
             <foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Vendor')}" />
             <foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Offering')}" />
             <dcterms:subject rdf:resource="{$resourceURL}" />
+            <gr:hasBrand rdf:resource="{vi:proxyIRI ($baseUri, '', 'Brand')}" />
+          </rdf:Description>
+
+          <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Brand')}">
+            <xsl:apply-templates select="deal/merchant" mode="grbrand" />
           </rdf:Description>
           
 		  <gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', 'Vendor')}">
@@ -75,6 +82,13 @@ xmlns:owl="http://www.w3.org/2002/07/owl#"
           </gr:BusinessEntity>
 		  
           <gr:Offering rdf:about="{vi:proxyIRI ($baseUri, '', 'Offering')}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.groupon.com#this">
+                        			<foaf:name>Groupon</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.groupon.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
             <sioc:has_container rdf:resource="{$docproxyIRI}" />
             <gr:hasBusinessFunction rdf:resource="&gr;Sell" />
             <gr:validFrom rdf:datatype="&xsd;dateTime">
@@ -176,6 +190,11 @@ xmlns:owl="http://www.w3.org/2002/07/owl#"
 		</geo:long>
     </xsl:template>
 	
+    <xsl:template match="merchant" mode="grbrand">
+      <rdf:type rdf:resource="&gr;Brand" />
+      <gr:name><xsl:value-of select="normalize-space(name)" /></gr:name>
+      <foaf:page><xsl:value-of select="websiteUrl"/></foaf:page>
+    </xsl:template>
 
   <xsl:template match="text()|@*" />
   <xsl:template match="text()|@*" mode="offering" />
diff --git a/binsrc/rdf_mappers/xslt/main/guardian2rdf.xsl b/binsrc/rdf_mappers/xslt/main/guardian2rdf.xsl
new file mode 100644
index 0000000..7c72d32
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/guardian2rdf.xsl
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: guardian2rdf.xsl,v 1.1.4.6 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY guardian "http://www.openlinksw.com/schemas/guardian#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+]>
+<xsl:stylesheet
+	version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:rdf="&rdf;"
+    xmlns:opl="&opl;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="&sioc;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:guardian="&guardian;"
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+>
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri"/>
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:template match="/results">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.guardian.co.uk#this">
+                        			<foaf:name>Guardian</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.guardian.co.uk"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<rdf:type rdf:resource="&foaf;Person"/>
+				<xsl:if test="string-length(person/university) > 0">
+					<guardian:university>
+						<xsl:value-of select="person/university"/>
+					</guardian:university>
+				</xsl:if>
+				<xsl:for-each select="person/contact-details/email-addresses">
+					<foaf:mbox rdf:resource="{email}"/>
+					<opl:email_address_digest rdf:resource="{vi:di-uri (email)}"/>
+				</xsl:for-each>
+				<xsl:for-each select="person/contact-details/websites">
+					<rdfs:seeAlso rdf:resource="{url}"/>
+				</xsl:for-each>
+				<xsl:if test="string-length(person/school) > 0">
+					<guardian:school>
+						<xsl:value-of select="person/school"/>
+					</guardian:school>
+				</xsl:if>
+				<xsl:if test="string-length(person/constituency/aristotle-id) > 0">
+					<guardian:has_constituency>
+						<guardian:constituency rdf:about="{vi:proxyIRI ($baseUri, '', concat('constituency', person/constituency/aristotle-id))}">
+							<rdfs:seeAlso rdf:resource="{person/constituency/json-url}"/>
+							<foaf:topic rdf:resource="{person/constituency/aristotle-url}"/>
+							<foaf:name>
+								<xsl:value-of select="person/constituency/name"/>
+							</foaf:name>
+							<rdfs:label>
+								<xsl:value-of select="person/constituency/name"/>
+							</rdfs:label>
+							<guardian:pa_code>
+								<xsl:value-of select="person/constituency/pa_code"/>
+							</guardian:pa_code>
+						</guardian:constituency>
+					</guardian:has_constituency>
+				</xsl:if>
+				<xsl:if test="string-length(person/name) > 0">
+					<foaf:name>
+						<xsl:value-of select="person/name"/>
+					</foaf:name>
+					<rdfs:label>
+						<xsl:value-of select="person/name"/>
+					</rdfs:label>
+				</xsl:if>
+				<xsl:for-each select="person/image">
+					<foaf:depiction rdf:resource="{.}"/>
+				</xsl:for-each>
+				<xsl:if test="string-length(person/is-incumbent) > 0">
+					<guardian:is-incumbent>
+						<xsl:value-of select="person/is-incumbent"/>
+					</guardian:is-incumbent>
+				</xsl:if>
+				<xsl:if test="string-length(person/party/aristotle-id) > 0">
+					<guardian:has_party>
+						<guardian:party rdf:about="{vi:proxyIRI ($baseUri, '', concat('party', person/party/aristotle-id))}">
+							<rdfs:seeAlso rdf:resource="{person/party/json-url}"/>
+							<foaf:topic rdf:resource="{person/party/web-url}"/>
+							<foaf:name>
+								<xsl:value-of select="person/party/name"/>
+							</foaf:name>
+							<rdfs:label>
+								<xsl:value-of select="person/party/name"/>
+							</rdfs:label>
+							<guardian:abbreviation>
+								<xsl:value-of select="person/party/abbreviation"/>
+							</guardian:abbreviation>
+						</guardian:party>
+					</guardian:has_party>
+				</xsl:if>
+				<xsl:for-each select="person/candidacies">
+					<guardian:has_candidacy>
+						<guardian:candidacy rdf:about="{vi:proxyIRI ($baseUri, '', concat('candidacy', election/polling-date))}">
+							<guardian:position>
+								<xsl:value-of select="position"/>
+							</guardian:position>
+							<guardian:votes-as-quantity>
+								<xsl:value-of select="votes-as-quantity"/>
+							</guardian:votes-as-quantity>
+							<rdfs:label>
+								<xsl:value-of select="concat(election/type, ' ', election/polling-date)"/>
+							</rdfs:label>
+							<guardian:has_election>
+								<guardian:election rdf:about="{vi:proxyIRI ($baseUri, '', concat('election', election/polling-date))}">
+									<rdfs:seeAlso rdf:resource="{election/json-url}"/>
+									<foaf:topic rdf:resource="{election/web-url}"/>
+									<guardian:type>
+										<xsl:value-of select="election/type"/>
+									</guardian:type>
+									<guardian:polling-date>
+										<xsl:value-of select="election/polling-date"/>
+									</guardian:polling-date>
+									<guardian:year>
+										<xsl:value-of select="election/year"/>
+									</guardian:year>
+									<rdfs:label>
+										<xsl:value-of select="concat(election/type, ' ', election/polling-date)"/>
+									</rdfs:label>
+								</guardian:election>
+							</guardian:has_election>
+							<guardian:has_constituency>
+								<guardian:constituency rdf:about="{vi:proxyIRI ($baseUri, '', concat('constituency', constituency/aristotle-id))}">
+									<rdfs:seeAlso rdf:resource="{constituency/json-url}"/>
+									<foaf:topic rdf:resource="{constituency/aristotle-url}"/>
+									<guardian:pa_code>
+										<xsl:value-of select="constituency/pa_code"/>
+									</guardian:pa_code>
+									<foaf:name>
+										<xsl:value-of select="constituency/name"/>
+									</foaf:name>
+									<rdfs:label>
+										<xsl:value-of select="constituency/name"/>
+									</rdfs:label>
+								</guardian:constituency>
+							</guardian:has_constituency>
+							<guardian:has_party>
+								<guardian:party rdf:about="{vi:proxyIRI ($baseUri, '', concat('party', party/aristotle-id))}">
+									<rdfs:seeAlso rdf:resource="{party/json-url}"/>
+									<foaf:topic rdf:resource="{party/web-url}"/>
+									<guardian:abbreviation>
+										<xsl:value-of select="party/abbreviation"/>
+									</guardian:abbreviation>
+									<foaf:name>
+										<xsl:value-of select="party/name"/>
+									</foaf:name>
+									<rdfs:label>
+										<xsl:value-of select="party/name"/>
+									</rdfs:label>
+								</guardian:party>
+							</guardian:has_party>
+						</guardian:candidacy>
+					</guardian:has_candidacy>
+				</xsl:for-each>
+			</rdf:Description>
+		</rdf:RDF>
+    </xsl:template>
+    
+    <xsl:template match="*|text()"/>
+        
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/haudio2rdf.xsl b/binsrc/rdf_mappers/xslt/main/haudio2rdf.xsl
index d5df407..dcd2790 100644
--- a/binsrc/rdf_mappers/xslt/main/haudio2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/haudio2rdf.xsl
@@ -1,4 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 	xmlns="http://purl.org/ontology/mo/"
 	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -8,6 +12,8 @@
 	xmlns:foaf="http://xmlns.com/foaf/0.1/"
 	xmlns:time="http://www.w3.org/2006/time#"
 	xmlns:tl="http://purl.org/NET/c4dm/timeline.owl#"
+	xmlns:dcterms="&dcterms;"
+	xmlns:opl="&opl;"
 	exclude-result-prefixes="xhtml"
   version="1.0">
 
diff --git a/binsrc/rdf_mappers/xslt/main/hcal2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hcal2rdf.xsl
index d29cd04..d45cad6 100644
--- a/binsrc/rdf_mappers/xslt/main/hcal2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hcal2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hcal2rdf.xsl,v 1.1.2.4 2011/01/03 23:40:02 source Exp $
+ -  $Id: hcal2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -38,6 +38,7 @@
     xmlns:c   ="http://www.w3.org/2002/12/cal/icaltzd#"
     xmlns:h   ="http://www.w3.org/1999/xhtml"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:rdf="&rdf;"
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
@@ -45,12 +46,12 @@
     xmlns:sioc="&sioc;"
     xmlns:dcterms="&dcterms;"
     xmlns:gr="&gr;"
-    xmlns:xml   ="xml"
     version="1.0"
     >
 
     <xsl:output indent="yes" method="xml" />
     <xsl:param name="baseUri" />
+	
 <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
 <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
 <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
@@ -69,8 +70,6 @@
 	</xsl:choose>
     </xsl:param>
 
-    <xsl:param name="Anchor" />
-
     <xsl:template match="/">
 	<rdf:RDF>
 	    <xsl:if test="//*[contains(concat(' ',normalize-space(@class),' '),' vevent ')] or //*[contains(concat(' ', normalize-space(@class), ' '),' vtodo ')]">
@@ -81,62 +80,49 @@
 		<c:Vcalendar rdf:about="{vi:proxyIRI ($baseUri, '', 'hcalendar')}">
 		    <c:prodid>-//connolly.w3.org//palmagent 0.6 (BETA)//EN</c:prodid>
 		    <c:version>2.0</c:version>
-		    <xsl:apply-templates />
-		</c:Vcalendar>
-	    </xsl:if>
-	</rdf:RDF>
-    </xsl:template>
-
-
-    <xsl:template match="*[contains(concat(' ',normalize-space(@class),' '),' vevent ')]">
-	<xsl:if test="not($Anchor) or @id = $Anchor">
+					<xsl:for-each select=".//*[contains(concat(' ',normalize-space(@class),' '),' vevent ')]">
 	    <c:component>
 		<c:Vevent>
-		    <!--xsl:if test=".//*[ contains(concat(' ', @class, ' '), concat(' url '))]">
-			<xsl:for-each select=".//*[1][ contains(concat(' ', @class, ' '), concat(' url '))]">
-			    <xsl:variable name="ref">
-				<xsl:choose>
-				    <xsl:when test="@href">
-					<xsl:value-of select="@href" />
-				    </xsl:when>
-
-				    <xsl:otherwise>
-					<xsl:value-of select="normalize-space(.)" />
-				    </xsl:otherwise>
-				</xsl:choose>
-			    </xsl:variable>
-			    <xsl:attribute name="about" namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><xsl:value-of select="$ref"/></xsl:attribute>
-			</xsl:for-each>
-		    </xsl:if-->
-
 		    <xsl:call-template name="cal-props" />
 		</c:Vevent>
 	    </c:component>
-	</xsl:if>
-    </xsl:template>
+					</xsl:for-each>
 
-    <xsl:template match="*[contains(concat(' ', normalize-space(@class), ' '),' vtodo ')]">
-	<xsl:if test="not($Anchor) or @id = $Anchor">
+					<xsl:for-each select=".//*[contains(concat(' ', normalize-space(@class), ' '),' vtodo ')]">
 	    <c:component>
 		<c:Vtodo>
 		    <xsl:call-template name="cal-props" />
 		</c:Vtodo>
 	    </c:component>
+					</xsl:for-each>
+				</c:Vcalendar>
 	</xsl:if>
+		</rdf:RDF>
     </xsl:template>
 
     <xsl:template name="cal-props">
-	<xsl:if test="@id">
-	    <xsl:attribute name="rdf:about">
-		<xsl:value-of select='vi:proxyIRI ($baseUri, "", ../@id)' />
-	    </xsl:attribute>
+		<xsl:variable name="summary">
+			<xsl:if test=".//*[contains(concat(' ', @class, ' '), concat(' summary '))]">
+				<xsl:value-of select="replace(substring(normalize-space(.//*[1][contains(concat(' ', @class, ' '), concat(' summary '))]), 1, 40), ' ' , '')" />
+			</xsl:if>
+		</xsl:variable>
+		<xsl:variable name="dtstart">
+			<xsl:if test=".//*[contains(concat(' ', @class, ' '), concat(' dtstart '))]">
+				<xsl:choose>
+					<xsl:when test=".//*[1][contains(concat(' ', @class, ' '), concat(' dtstart '))]//*[@title]">
+						<xsl:value-of select="normalize-space(.//*[1][contains(concat(' ', @class, ' '), concat(' dtstart '))]//*/@title)" />
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:value-of select="replace(normalize-space(.//*[1][contains(concat(' ', @class, ' '), concat(' dtstart '))]), ' ', '')" />
+					</xsl:otherwise>
+				</xsl:choose>
 	</xsl:if>
+		</xsl:variable>
 
-	<!--xsl:if test="not @id and .//*[contains(concat(' ', @class, ' '), ' dtstart ')]/@title and .//*[contains(concat(' ', @class, ' '), ' summary ')]">
 	    <xsl:attribute name="rdf:about">
-		<xsl:value-of select='vi:proxyIRI ($baseUri, "#", concat(.//*[contains(concat(" ", @class, " "), " summary ")]/., .//*[contains(concat(" ", @class, " "), " dtstart ")]/@title))' />
+			<xsl:value-of select="vi:proxyIRI ($baseUri, '', concat($summary, $dtstart))" />
 	    </xsl:attribute>
-	</xsl:if-->
+		<rdfs:label><xsl:value-of select="$summary" /></rdfs:label>
 
 	<xsl:call-template name="textProp">
 	    <xsl:with-param name="class">uid</xsl:with-param>
@@ -207,32 +193,28 @@
     <xsl:template name="textProp">
 	<xsl:param name="class" />
 
-	<xsl:for-each select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+		<xsl:if test=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+			<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
 	    <xsl:element name="{$class}" namespace="&CalNS;">
-		<!--xsl:call-template name="lang" /-->
-
 		<xsl:choose>
-		    <xsl:when test='local-name(.) = "ol" or local-name(.) = "ul"'>
+					<xsl:when test='local-name($cur) = "ol" or local-name($cur) = "ul"'>
 			<xsl:for-each select="*">
 			    <xsl:if test="not(position()=1)">
 				<xsl:text>,</xsl:text>
 			    </xsl:if>
-
-			    <xsl:value-of select="." />
+							<xsl:value-of select="$cur" />
 			</xsl:for-each>
 		    </xsl:when>
-
-		    <xsl:when test='local-name(.) = "abbr" and @title'>
-			<xsl:value-of select="@title" />
+					<xsl:when test='local-name($cur) = "abbr" and $cur/@title'>
+						<xsl:value-of select="$cur/@title" />
 		    </xsl:when>
-
 		    <xsl:otherwise>
-			<xsl:value-of select="." />
+						<xsl:value-of select="$cur" />
 		    </xsl:otherwise>
 		</xsl:choose>
 
 	    </xsl:element>
-	</xsl:for-each>
+		</xsl:if>
     </xsl:template>
 
 
@@ -264,40 +246,27 @@
     <xsl:template name="refProp">
 	<xsl:param name="class" />
 	<xsl:param name="default" />
-
 	<xsl:choose>
-	    <xsl:when test=".//*[
-		contains(concat(' ', @class, ' '),
-		concat(' ', $class, ' '))]">
-
-		<xsl:for-each select=".//*[
-		    contains(concat(' ', @class, ' '),
-		    concat(' ', $class, ' '))]">
+			<xsl:when test=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+				<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
 		    <xsl:variable name="ref">
 			<xsl:choose>
-			    <xsl:when test="@href">
-				<xsl:value-of select="@href" />
+						<xsl:when test="$cur/@href">
+							<xsl:value-of select="$cur/@href" />
 			    </xsl:when>
-
 			    <xsl:otherwise>
-				<xsl:value-of select="normalize-space(.)" />
+							<xsl:value-of select="normalize-space($cur)" />
 			    </xsl:otherwise>
 			</xsl:choose>
 		    </xsl:variable>
-
-		    <xsl:element name="{$class}"
-			namespace="&CalNS;">
+				<xsl:element name="{$class}" namespace="&CalNS;">
 			<xsl:attribute name="rdf:resource">
 			    <xsl:value-of select="$ref" />
 			</xsl:attribute>
 		    </xsl:element>
-
-		</xsl:for-each>
 	    </xsl:when>
-
 	    <xsl:when test="$default">
-		<xsl:element name="{$class}"
-		    namespace="&CalNS;">
+				<xsl:element name="{$class}" namespace="&CalNS;">
 		    <xsl:attribute name="rdf:resource">
 			<xsl:value-of select="$default" />
 		    </xsl:attribute>
@@ -311,64 +280,55 @@
     <xsl:template name="whoProp">
 	<xsl:param name="class" />
 
-	<xsl:for-each select=".//*[
-	    contains(concat(' ', @class, ' '),
-	    concat(' ', $class, ' '))]">
+		<xsl:if test=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+			<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
 	    <xsl:variable name="mbox">
 		<xsl:choose>
-		    <xsl:when test="@href">
-			<xsl:value-of select="@href" />
+					<xsl:when test="$cur/@href">
+						<xsl:value-of select="$cur/@href" />
 		    </xsl:when>
-
 		    <xsl:otherwise>
-			<xsl:value-of select="normalize-space(.)" />
+						<xsl:value-of select="normalize-space($cur)" />
 		    </xsl:otherwise>
 		</xsl:choose>
 	    </xsl:variable>
-
 	    <xsl:variable name="cn">
 		<xsl:choose>
-		    <xsl:when test="@href">
-			<xsl:value-of select="normalize-space(.)" />
+					<xsl:when test="$cur/@href">
+						<xsl:value-of select="normalize-space($cur)" />
 		    </xsl:when>
-
 		    <xsl:otherwise>
 			<xsl:value-of select='""'/>
 		    </xsl:otherwise>
 		</xsl:choose>
 	    </xsl:variable>
 
-	    <xsl:element name="{$class}"
-		namespace="&CalNS;">
+			<xsl:element name="{$class}" namespace="&CalNS;">
 		<xsl:attribute name="rdf:parseType">Resource</xsl:attribute>
 		<c:calAddress rdf:resource="{$mbox}" />
 		<xsl:if test="$cn">
 		    <c:cn><xsl:value-of select="$cn"/></c:cn>
 		</xsl:if>
 	    </xsl:element>
-
-	</xsl:for-each>
-
+		</xsl:if>
     </xsl:template>
 
 
     <xsl:template name="dateProp">
 	<xsl:param name="class" />
-
-	<xsl:for-each select=".//*[
-	    contains(concat(' ', @class, ' '),
-	    concat(' ', $class, ' '))]">
-	    <xsl:element name="{$class}"
-		namespace="&CalNS;">
-
+		<xsl:if test=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+			<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
+			<xsl:element name="{$class}" namespace="&CalNS;">
 		<xsl:variable name="when">
 		    <xsl:choose>
-			<xsl:when test="@title and @title != ''">
-			    <xsl:value-of select="@title">
-			    </xsl:value-of>
+						<xsl:when test="$cur/*[@class = 'value-title' and @title]">
+							<xsl:value-of select="$cur/*[@class = 'value-title'][1]/@title"/>
+						</xsl:when>
+						<xsl:when test="$cur/@title and $cur/@title != ''">
+							<xsl:value-of select="$cur/@title"/>
 			</xsl:when>
 			<xsl:otherwise>
-			    <xsl:value-of select="normalize-space(.)" />
+							<xsl:value-of select="normalize-space($cur)" />
 			</xsl:otherwise>
 		    </xsl:choose>
 		</xsl:variable>
@@ -378,32 +338,21 @@
 			<xsl:attribute name="rdf:datatype">
 			    <xsl:value-of select='concat("&XdtNS;", "dateTime")' />
 			</xsl:attribute>
-
 			<xsl:value-of select='$when' />
 		    </xsl:when>
-
-		    <xsl:when test='string-length($when) =
-			string-length("yyyy-mm-ddThh:mm:ss+hhmm")'>
+					<xsl:when test='string-length($when) = string-length("yyyy-mm-ddThh:mm:ss+hhmm")'>
 			<xsl:attribute name="rdf:datatype">
 			    <xsl:value-of select='concat("&XdtNS;", "dateTime")' />
 			</xsl:attribute>
 			<xsl:call-template name="timeDelta">
-			    <xsl:with-param name="year"
-				select='number(substring($when, 1, 4))'/>
-			    <xsl:with-param name="month"
-				select='number(substring($when, 6, 2))'/>
-			    <xsl:with-param name="day"
-				select='number(substring($when, 9, 2))'/>
-			    <xsl:with-param name="hour"
-				select='number(substring($when, 12, 2))'/>
-			    <xsl:with-param name="minute"
-				select='number(substring($when, 15, 2))'/>
-
-			    <xsl:with-param name="hourDelta"
-				select='number(substring($when, 21, 2))'/>
+							<xsl:with-param name="year" select='number(substring($when, 1, 4))'/>
+							<xsl:with-param name="month" select='number(substring($when, 6, 2))'/>
+							<xsl:with-param name="day" select='number(substring($when, 9, 2))'/>
+							<xsl:with-param name="hour" select='number(substring($when, 12, 2))'/>
+							<xsl:with-param name="minute" select='number(substring($when, 15, 2))'/>
+							<xsl:with-param name="hourDelta" select='number(substring($when, 21, 2))'/>
 			</xsl:call-template>
 		    </xsl:when>
-
 		    <xsl:when test='contains($when, "T")'>
 			<xsl:attribute name="rdf:datatype">
 			    <xsl:value-of select='concat("&CalNS;", "dateTime")' />
@@ -419,7 +368,7 @@
 		    </xsl:otherwise>
 		</xsl:choose>
 	    </xsl:element>
-	</xsl:for-each>
+		</xsl:if>
     </xsl:template>
 
 
@@ -568,40 +517,34 @@
     <xsl:template name="durProp">
 	<xsl:param name="class" />
 
-	<xsl:for-each select=".//*[
-	    contains(concat(' ', @class, ' '),
-	    concat(' ', $class, ' '))]">
-	    <xsl:element name="{$class}"
-		namespace="&CalNS;">
-
+	<xsl:if test=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+		<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
+	    <xsl:element name="{$class}" namespace="&CalNS;">
 		<xsl:choose>
-		    <xsl:when test='local-name(.) = "abbr" and @title'>
-			<xsl:value-of select="@title" />
+		    <xsl:when test='local-name($cur) = "abbr" and $cur/@title'>
+			<xsl:value-of select="$cur/@title" />
 		    </xsl:when>
-
 		    <xsl:otherwise>
-			<xsl:value-of select='normalize-space(.)' />
+			<xsl:value-of select='normalize-space($cur)' />
 		    </xsl:otherwise>
 		</xsl:choose>
 	    </xsl:element>
-	</xsl:for-each>
+	</xsl:if>
     </xsl:template>
 
     <xsl:template name="floatPairProp">
 	<xsl:param name="class" />
 
-	<xsl:for-each select=".//*[
-	    contains(concat(' ', @class, ' '),
-	    concat(' ', $class, ' '))]">
-
+	<xsl:if test=".//*[ contains(concat(' ', @class, ' '), concat(' ', $class, ' '))]">
+		<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
 	    <xsl:variable name="xy">
 		<xsl:choose>
-		    <xsl:when test='local-name(.) = "abbr" and @title'>
-			<xsl:value-of select="@title" />
+		    <xsl:when test='local-name($cur) = "abbr" and $cur/@title'>
+			<xsl:value-of select="$cur/@title" />
 		    </xsl:when>
 
 		    <xsl:otherwise>
-			<xsl:value-of select="." />
+			<xsl:value-of select="$cur" />
 		    </xsl:otherwise>
 		</xsl:choose>
 	    </xsl:variable>
@@ -624,16 +567,15 @@
 		    <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" />
 		</rdf:rest>
 	    </xsl:element>
-	</xsl:for-each>
+	</xsl:if>
     </xsl:template>
 
 
     <xsl:template name="recurProp">
 	<xsl:param name="class" />
 
-	<xsl:for-each select=".//*[
-	    contains(concat(' ', @class, ' '),
-	    concat(' ', $class, ' '))]">
+	<xsl:if test=".//*[contains(concat(' ', @class, ' '),concat(' ', $class, ' '))]">
+		<xsl:variable name="cur" select=".//*[contains(concat(' ', @class, ' '), concat(' ', $class, ' '))][1]" />
 	    <xsl:element name="{$class}"
 		namespace="&CalNS;">
 		<xsl:attribute name="rdf:parseType">Resource</xsl:attribute>
@@ -658,7 +600,7 @@
 		</xsl:call-template>
 
 	    </xsl:element>
-	</xsl:for-each>
+	</xsl:if>
     </xsl:template>
 
     <xsl:template name="sub-prop">
diff --git a/binsrc/rdf_mappers/xslt/main/hcard2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hcard2rdf.xsl
index aefa52a..5cdc7a8 100644
--- a/binsrc/rdf_mappers/xslt/main/hcard2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hcard2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hcard2rdf.xsl,v 1.1.2.6 2011/03/25 17:10:59 source Exp $
+ -  $Id: hcard2rdf.xsl,v 1.1.2.12 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -21,20 +21,35 @@
  -  with this program; if not, write to the Free Software Foundation, Inc.,
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY awol "http://bblfish.net/work/atom-owl/2006-06-06/#">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY oplcert "http://www.openlinksw.com/schemas/cert#">
+<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
+]>
+<xsl:stylesheet
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     		xmlns:v="http://www.w3.org/2006/vcard/ns#"
 		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 		xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 		xmlns:h="http://www.w3.org/1999/xhtml"
 		xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
 		xmlns:foaf="http://xmlns.com/foaf/0.1/"
+	xmlns:cert="http://www.w3.org/ns/auth/cert#"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
                 version="1.0">
 
 <xsl:output method="xml" encoding="utf-8" indent="yes"/>
 
 <xsl:preserve-space elements="*"/>
 <xsl:param name="baseUri" />
-<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:proxyIRI($baseUri)"/>
 
 <xsl:template match="/">
   <rdf:RDF>
@@ -50,6 +65,26 @@
   </xsl:variable>
 
   <xsl:if test="$vcard != 0">
+		    <xsl:if test="//*[contains (concat (' ', @class, ' '), ' key ')]">
+			<rdf:Description>
+			    <xsl:for-each select="//*[contains (concat (' ', @class, ' '), ' url ')][1]">
+				<xsl:attribute name="rdf:about">
+				    <xsl:choose>
+					<xsl:when test="@href">
+					    <xsl:value-of select="@href"/>
+					</xsl:when>
+					<xsl:otherwise>
+					    <xsl:if test="not(contains(.,':'))">http://</xsl:if>
+					    <xsl:value-of select="string(.)"/>
+					</xsl:otherwise>
+				    </xsl:choose>
+				</xsl:attribute>
+			    </xsl:for-each>
+			    <rdf:type rdf:resource="&bibo;Document"/>
+			    <rdf:type rdf:resource="&foaf;Document"/>
+			    <xsl:apply-templates mode="extract-key"/>
+			</rdf:Description>
+		    </xsl:if>
     <rdf:Description rdf:about="{$docproxyIRI}">
       <foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'hcard')}"/>
     </rdf:Description>
@@ -64,6 +99,24 @@
 <xsl:template match="comment()|processing-instruction()|text()"/>
 
 <!-- ============================================================ -->
+	<xsl:template match="*" mode="extract-key">
+		<xsl:variable name="key">
+			<xsl:call-template name="testclass">
+				<xsl:with-param name="val" select="'key'"/>
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:if test="$key != 0 and @href and starts-with (@href, 'data:application/x-x509-user-cert;base64,')">
+		    <xsl:variable name="cert"><stub><xsl:copy-of select="vi:x509_pub_key (@href)"/></stub></xsl:variable>
+		    <cert:key>
+			<cert:RSAPublicKey rdf:ID="key{$cert//fp}">
+			    <cert:modulus rdf:datatype="http://www.w3.org/2001/XMLSchema#hexBinary"><xsl:value-of select="$cert//mod"/></cert:modulus>
+			    <cert:exponent rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"><xsl:value-of select="$cert//exp"/></cert:exponent>
+			</cert:RSAPublicKey>
+		    </cert:key>
+		</xsl:if>
+	</xsl:template>
+	<xsl:template match="comment()|processing-instruction()|text()"
+	      mode="extract-key"/>
 
 <xsl:template match="*" mode="extract-vcard">
   <xsl:variable name="fn">
@@ -219,11 +272,14 @@
   <!-- ============================================================ -->
 
   <xsl:if test="$fn != 0">
-    <v:fn><xsl:value-of select="."/></v:fn>
+			<v:fn>
+				<xsl:value-of select="."/>
+			</v:fn>
   </xsl:if>
 
   <xsl:if test="$n != 0">
-    <v:n rdf:parseType="Resource">
+			<v:n>
+				<rdf:Description>
       <rdf:type rdf:resource="http://nwalsh.com/rdf/vCard#Name"/>
       <xsl:apply-templates select="." mode="extract-field">
 	<xsl:with-param name="field" select="'given-name'"/>
@@ -243,6 +299,13 @@
       <xsl:apply-templates select="." mode="extract-field">
 	<xsl:with-param name="field" select="'nickname'"/>
       </xsl:apply-templates>
+					<xsl:attribute name="rdf:about">
+						<xsl:value-of select="vi:proxyIRI($baseUri, '', replace(., ' ', ''))" />
+					</xsl:attribute>
+					<rdfs:label>
+						<xsl:value-of select="."/>
+					</rdfs:label>
+				</rdf:Description>
     </v:n>
   </xsl:if>
 
@@ -348,11 +411,19 @@
 	</v:org>
       </xsl:when>
       <xsl:otherwise>
-	<v:org rdf:parseType="Resource">
+					<v:org>
+						<rdf:Description>
 	  <rdf:type rdf:resource="http://nwalsh.com/rdf/vCard#Organization"/>
+							<xsl:attribute name="rdf:about">
+								<xsl:value-of select="vi:proxyIRI($baseUri, '', replace(., ' ', ''))" />
+							</xsl:attribute>
 	  <v:organization-name>
 	    <xsl:value-of select="."/>
 	  </v:organization-name>
+							<rdfs:label>
+								<xsl:value-of select="."/>
+							</rdfs:label>
+						</rdf:Description>
 	</v:org>
       </xsl:otherwise>
     </xsl:choose>
@@ -399,11 +470,15 @@
   </xsl:if>
 
   <xsl:if test="$sort-string != 0">
-    <v:sort-string><xsl:value-of select="."/></v:sort-string>
+			<v:sort-string>
+				<xsl:value-of select="."/>
+			</v:sort-string>
   </xsl:if>
 
   <xsl:if test="$nickname != 0">
-    <v:nickname><xsl:value-of select="."/></v:nickname>
+			<v:nickname>
+				<xsl:value-of select="."/>
+			</v:nickname>
   </xsl:if>
 
   <xsl:apply-templates mode="extract-vcard"/>
@@ -560,19 +635,30 @@
     <xsl:when test="$token = 'home' or $token = 'personal'">
       <v:homeAdr rdf:parseType="Resource">
 	<xsl:copy-of select="$fields"/>
-	<rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+					<rdfs:label>
+						<xsl:value-of select="vi:trim(concat($fields/v:extended-address, ', ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/>
+					</rdfs:label>
       </v:homeAdr>
     </xsl:when>
     <xsl:when test="$token = 'work' or $token = 'office'">
       <v:workAdr rdf:parseType="Resource">
 	<xsl:copy-of select="$fields"/>
-	<rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+					<rdfs:label>
+						<xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/>
+					</rdfs:label>
       </v:workAdr>
     </xsl:when>
     <xsl:otherwise>
-      <v:adr rdf:parseType="Resource">
+				<v:adr>
+					<rdf:Description>
 	<xsl:copy-of select="$fields"/>
-	<rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+						<rdfs:label>
+							<xsl:value-of select="vi:trim(concat($fields/v:extended-address, ', ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/>
+						</rdfs:label>
+						<xsl:attribute name="rdf:about">
+							<xsl:value-of select="vi:proxyIRI($baseUri, '', concat('adr_', position()))" />
+						</xsl:attribute>
+					</rdf:Description>
       </v:adr>
     </xsl:otherwise>
   </xsl:choose>
diff --git a/binsrc/rdf_mappers/xslt/main/hlisting2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hlisting2rdf.xsl
index bcd16ab..4a615aa 100644
--- a/binsrc/rdf_mappers/xslt/main/hlisting2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hlisting2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hlisting2rdf.xsl,v 1.1.2.4 2011/03/25 17:10:59 source Exp $
+ -  $Id: hlisting2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -21,6 +21,24 @@
  -  with this program; if not, write to the Free Software Foundation, Inc.,
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY book "http://purl.org/NET/book/vocab#">
+<!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY amz "http://webservices.amazon.com/AWSECommerceService/2005-10-05">
+<!ENTITY oplamz "http://www.openlinksw.com/schemas/amazon#">
+]>
+
 <xsl:stylesheet
 	xmlns:dc="http://purl.org/dc/elements/1.1/"
 	xmlns:rss="http://purl.org/rss/1.0/"
@@ -36,23 +54,91 @@
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
 	xmlns:v="http://www.w3.org/2006/vcard/ns#"
 	xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+	xmlns:gr="&gr;"	
+	xmlns:sioc="http://rdfs.org/sioc/ns#"	
     version="1.0">
+	
     <xsl:output indent="yes" omit-xml-declaration="yes" method="xml" />
+
     <xsl:param name="baseUri" />
+
 	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>	
+
     <xsl:template match="/h:html/h:body">
         <rdf:RDF>
             <xsl:apply-templates />
         </rdf:RDF>
     </xsl:template>
+    
     <xsl:template match="//*[@class='hlisting']">
       <rdf:Description rdf:about="{$docproxyIRI}">
-        <foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'hlisting')}" />
+			<xsl:for-each select="//*[@class='hlisting']">
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', concat('hlisting', position()))}" />
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', concat('Vendor', position()))}" />
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', concat('Offer', position()))}" />
+			</xsl:for-each>
       </rdf:Description>	
-        <hlisting:Listing rdf:about="{vi:proxyIRI ($baseUri, '', 'hlisting')}">
+		<xsl:for-each select="//*[@class='hlisting']">
+			<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('hlisting', position()))}">
+				<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
             <xsl:apply-templates mode="hlisting" />
-        </hlisting:Listing>
+			</rdf:Description>
+			<gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', concat('Vendor', position()))}">
+				<gr:offers rdf:resource="{vi:proxyIRI ($baseUri, '', concat('Offer', position()))}"/>
+				<xsl:apply-templates mode="vendor" />
+			</gr:BusinessEntity>
+			<gr:Offering rdf:about="{vi:proxyIRI ($baseUri, '', concat('Offer', position()))}">
+				<sioc:has_container rdf:resource="{$docproxyIRI}"/>
+				<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+				<gr:includes rdf:resource="{vi:proxyIRI ($baseUri, '', concat('hlisting', position()))}"/>
+				<xsl:variable name="pos" select="position()"/>
+				<sioc:link rdf:resource="{.//a/@href}" />
+				<xsl:for-each select=".//*[@class = 'price']">
+					<gr:hasPriceSpecification>
+						<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('Price', $pos))}">
+							<rdfs:label>
+								<xsl:value-of select="concat(substring-after(., '$'), ' (USD)')" />
+							</rdfs:label>
+							<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+							<gr:hasCurrencyValue rdf:datatype="&xsd;float">
+								<xsl:value-of select="substring-after(., '$')"/>
+							</gr:hasCurrencyValue>
+							<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+							<gr:priceType rdf:datatype="&xsd;string">sale price</gr:priceType>
+						</gr:UnitPriceSpecification>
+					</gr:hasPriceSpecification>
+				</xsl:for-each>
+				<xsl:apply-templates mode="offering" />
+			</gr:Offering>
+		</xsl:for-each>
     </xsl:template>
+	
+	<xsl:template match="*" mode="vendor">
+        <xsl:variable name="class" select="@class" />
+        <xsl:variable name="field">
+            <xsl:choose>
+                <xsl:when test="contains($class, 'lister')">
+                    <xsl:value-of select="'lister'" />
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="$class" />
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test="$field='lister'">
+				<xsl:apply-templates select="." mode="extract-vcard" />
+			</xsl:when>
+        </xsl:choose>
+    </xsl:template>
+	
+	<xsl:template match="*" mode="offering">
+		<xsl:if test="@class='item'">
+			<xsl:apply-templates select="." mode="extract-vcard" />
+		</xsl:if>
+    </xsl:template>
+
+    
     <xsl:template match="*" mode="hlisting">
         <xsl:variable name="class" select="@class" />
         <xsl:variable name="field">
@@ -72,15 +158,9 @@
                 <xsl:when test="$class='dtexpired'">
                     <xsl:value-of select="'dtexpired'" />
                 </xsl:when>
-                <xsl:when test="contains($class, 'sell') or  contains($class, 'rent') or  contains($class, 'trade') or  contains($class, 'meet') or  contains($class, 'announce') or  contains($class, 'offer') or  contains($class, 'wanted') or  contains($class, 'event') or  contains($class, 'service')">
-                    <xsl:value-of select="'listing_action'" />
-                </xsl:when>
                 <xsl:when test="contains($class, 'lister')">
                     <xsl:value-of select="'lister'" />
                 </xsl:when>
-                <xsl:when test="contains($class, 'price')">
-                    <xsl:value-of select="'price'" />
-                </xsl:when>
                 <xsl:otherwise>
                     <xsl:value-of select="$class" />
                 </xsl:otherwise>
@@ -92,43 +172,22 @@
                     <xsl:value-of select="@title" />
                 </dcterms:created>
             </xsl:when>
-            <xsl:when test="$field='price'">
-                <hlisting:price>
-                    <xsl:value-of select="." />
-                </hlisting:price>
-            </xsl:when>
             <xsl:when test="$field='dtexpired'">
                 <dcterms:available>
                     <xsl:value-of select="@title" />
                 </dcterms:available>
             </xsl:when>
             <xsl:when test="$field='item'">
-                <hlisting:item>
-                    <v:VCard>
                         <xsl:apply-templates select="." mode="extract-vcard" />
-                    </v:VCard>
-                </hlisting:item>
-            </xsl:when>
-            <xsl:when test="$field='lister'">
-                <hlisting:lister>
-                    <v:VCard>
-                        <xsl:apply-templates select="." mode="extract-vcard" />
-                    </v:VCard>
-                </hlisting:lister>
             </xsl:when>
             <xsl:when test="$field='description'">
                 <dc:description>
                     <xsl:value-of select="." />
                 </dc:description>
             </xsl:when>
-            <xsl:when test="$field='listing_action'">
-                <hlisting:listing_action>
-                    <xsl:value-of select="." />
-                </hlisting:listing_action>
-            </xsl:when>
         </xsl:choose>
-        <xsl:apply-templates mode="hlisting" />
     </xsl:template>
+	
     <xsl:template match="*" mode="extract-vcard">
         <xsl:variable name="fn">
             <xsl:call-template name="testclass">
@@ -256,9 +315,12 @@
             </xsl:call-template>
         </xsl:variable> <!-- ============================================================ -->
         <xsl:if test="$fn != 0">
-            <v:fn>
+            <gr:name>
+                <xsl:value-of select="." />
+            </gr:name>
+			<rdfs:label>
                 <xsl:value-of select="." />
-            </v:fn>
+			</rdfs:label>
         </xsl:if>
         <xsl:if test="$n != 0">
             <v:n rdf:parseType="Resource">
@@ -425,7 +487,9 @@
         </xsl:if>
         <xsl:apply-templates mode="extract-vcard" />
     </xsl:template>
+	
     <xsl:template match="comment()|processing-instruction()|text()" mode="extract-vcard" />
+    
     <xsl:template match="*" mode="extract-tel">
         <xsl:variable name="type" select=".//*[@class='type']" />
         <xsl:variable name="value" select=".//*[@class='value']" />
@@ -451,6 +515,7 @@
             </xsl:otherwise>
         </xsl:choose>
     </xsl:template>
+    
     <xsl:template name="tel">
         <xsl:param name="type" select="''" />
         <xsl:param name="value" select="'+1-800-555-1212'" />
@@ -484,6 +549,7 @@
             </xsl:otherwise>
         </xsl:choose>
     </xsl:template> <!-- ============================================================ -->
+	
     <xsl:template match="*" mode="extract-email">
         <xsl:variable name="type" select=".//*[@class='type']" />
         <xsl:variable name="value" select=".//*[@class='value']/@href" />
@@ -516,6 +582,7 @@
             </xsl:otherwise>
         </xsl:choose>
     </xsl:template> <!-- ============================================================ -->
+    
     <xsl:template match="*" mode="extract-adr">
         <xsl:variable name="type" select=".//*[@class='type']" />
         <xsl:variable name="token" select="translate($type,
@@ -549,19 +616,19 @@
             <xsl:when test="$token = 'home' or $token = 'personal'">
                 <v:homeAdr rdf:parseType="Resource">
                     <xsl:copy-of select="$fields" />
-		    <rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+		    <rdfs:label><xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/></rdfs:label>
                 </v:homeAdr>
             </xsl:when>
             <xsl:when test="$token = 'work' or $token = 'office'">
                 <v:workAdr rdf:parseType="Resource">
                     <xsl:copy-of select="$fields" />
-		    <rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+		    <rdfs:label><xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/></rdfs:label>
                 </v:workAdr>
             </xsl:when>
             <xsl:otherwise>
                 <v:adr rdf:parseType="Resource">
                     <xsl:copy-of select="$fields" />
-	            <rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+	            <rdfs:label><xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/></rdfs:label>
                 </v:adr>
             </xsl:otherwise>
         </xsl:choose>
diff --git a/binsrc/rdf_mappers/xslt/main/hnews2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hnews2rdf.xsl
index 96a088a..105ac27 100644
--- a/binsrc/rdf_mappers/xslt/main/hnews2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hnews2rdf.xsl
@@ -1,12 +1,16 @@
 <?xml version="1.0" encoding="Windows-1252"?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY rnews "http://iptc.org/std/rnews/20110202/rnews.owl#">
+]>
 <!--
  -
- -  $Id: hnews2rdf.xsl,v 1.1.4.6 2011/03/23 12:13:04 source Exp $
+ -  $Id: hnews2rdf.xsl,v 1.1.4.10 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -37,6 +41,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:bibo="http://purl.org/ontology/bibo/"
 xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
 xmlns:geo  ="http://www.w3.org/2003/01/geo/wgs84_pos#"
+xmlns:rnews  ="http://iptc.org/std/rnews/20110202/rnews.owl#"
 xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
 xmlns:hnews="http://ontologi.es/hnews#"
 version="1.0">
@@ -55,9 +60,11 @@ version="1.0">
     <rdf:Description rdf:about="{$docproxyIRI}">
         <foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'hnews')}" />
     </rdf:Description>
-    <bibo:Article rdf:about="{vi:proxyIRI ($baseUri, '', 'hnews')}">
+	<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'hnews')}">
+		<rdf:type rdf:resource="&bibo;Article"/>
+		<rdf:type rdf:resource="&rnews;NewsItem"/>
       <xsl:apply-templates mode="hnews"/>
-    </bibo:Article>
+    </rdf:Description>
   </xsl:template>
 
   <xsl:template match="*" mode="hnews">
@@ -87,18 +94,21 @@ version="1.0">
     <xsl:choose>
       
       <xsl:when test="contains($field, 'entry-title')">
-        <dc:title>
+        <rnews:title>
+          <xsl:value-of select="." />
+        </rnews:title>
+        <rdfs:label>
           <xsl:value-of select="." />
-        </dc:title>
+        </rdfs:label>
         <xsl:if test="@rel='bookmark'">
           <bibo:uri rdf:resource="{@href}" />
         </xsl:if>
       </xsl:when>
 
       <xsl:when test="contains($field, 'updated')">
-        <dcterms:modified>
+        <rnews:dateModified>
           <xsl:value-of select="@title" />
-        </dcterms:modified>
+        </rnews:dateModified>
       </xsl:when>
 
       <xsl:when test="contains($field, 'dateline')">
@@ -108,29 +118,35 @@ version="1.0">
       </xsl:when>
 
       <xsl:when test="$field='author vcard'">
-        <dcterms:creator>
-          <foaf:Person>
+        <rnews:createdBy>
+          <foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', 'author')}">
+            <rdfs:label>
+				<xsl:value-of select="./*[contains(@class, 'fn')]"/>
+			</rdfs:label>
             <foaf:name>
-              <xsl:value-of select="./*[@class='fn']"/>
+              <xsl:value-of select="./*[contains(@class, 'fn')]"/>
             </foaf:name>
           </foaf:Person>
-        </dcterms:creator>
+        </rnews:createdBy>
       </xsl:when>
       
       <xsl:when test="contains($field, 'source-org')">
-        <hnews:source-org>
+        <rnews:providedBy>
 			<foaf:Organization rdf:about="{vi:proxyIRI ($baseUri, '', 'source_org')}">
 				<foaf:name>
 					<xsl:value-of select="." />
 				</foaf:name>
 			</foaf:Organization>
-        </hnews:source-org>
+        </rnews:providedBy>
       </xsl:when>
       
       <xsl:when test="contains($field, 'entry-content')">
         <bibo:content>
           <xsl:value-of select="."/>
         </bibo:content>
+        <rnews:description>
+          <xsl:value-of select="."/>
+        </rnews:description>
       </xsl:when>
 
       <xsl:when test="contains($field, 'latitude')">
@@ -154,9 +170,9 @@ version="1.0">
       </xsl:when>
 
       <xsl:when test="contains($rel, 'item-license')">
-        <dc:rights>
+        <rnews:copyrightNotice>
           <xsl:value-of select=".."/>
-        </dc:rights>
+        </rnews:copyrightNotice>
       </xsl:when>
 
       <xsl:when test="contains($rel, 'principles')">
diff --git a/binsrc/rdf_mappers/xslt/main/hproduct2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hproduct2rdf.xsl
index d3b0886..0bd4ada 100644
--- a/binsrc/rdf_mappers/xslt/main/hproduct2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hproduct2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hproduct2rdf.xsl,v 1.1.2.5 2011/01/03 23:40:02 source Exp $
+ -  $Id: hproduct2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/hrecipe2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hrecipe2rdf.xsl
index 259b0f6..dc3320d 100644
--- a/binsrc/rdf_mappers/xslt/main/hrecipe2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hrecipe2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: hrecipe2rdf.xsl,v 1.1.4.4 2011/03/08 13:36:28 source Exp $
+ -  $Id: hrecipe2rdf.xsl,v 1.1.4.9 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -21,6 +21,13 @@
  -  with this program; if not, write to the Free Software Foundation, Inc.,
  -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY moat "http://moat-project.org/ns#">
+<!ENTITY scot "http://scot-project.org/scot/ns#">
+<!ENTITY skos "http://www.w3.org/2004/02/skos/core#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+]>
+
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
@@ -29,7 +36,11 @@ xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
 xmlns:foaf="http://xmlns.com/foaf/0.1/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:sioc="http://rdfs.org/sioc/ns#"
+xmlns:scot="&scot;"
+xmlns:moat="&moat;"
+xmlns:skos="&skos;"
 xmlns:wdrs="http://www.w3.org/2007/05/powder-s#"
+xmlns:opl="&opl;"
 xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
   <xsl:output method="xml" encoding="utf-8" indent="yes" />
   <xsl:preserve-space elements="*" />
@@ -62,8 +73,24 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
         <foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'hrecipe')}" />
       </rdf:Description>
       <dv:Recipe rdf:about="{vi:proxyIRI ($baseUri, '', 'hrecipe')}">
+				<opl:providedBy>
+					<xsl:variable name="home1" select="substring-after($baseUri, '//')"/>
+					<xsl:variable name="home2" select="substring-before($home1, '/')"/>
+					<xsl:variable name="home" select="concat('http://', $home2)"/>
+					<xsl:if test="string-length($home) < 8">
+						<xsl:variable name="home2" select="$baseUri"/>
+						<xsl:variable name="home" select="$baseUri"/>
+					</xsl:if>
+					<foaf:Organization rdf:about="{concat($home, '#this')}">
+						<foaf:name>
+							<xsl:value-of select="$home2" />
+						</foaf:name>
+						<foaf:homepage rdf:resource="{$home}"/>
+					</foaf:Organization>
+				</opl:providedBy>
+			
 	<foaf:page rdf:resource="{$baseUri}"/>
-	<wdrs:describedBy rdf:resource="{$resourceURL}"/>
+				<wdrs:describedby rdf:resource="{$resourceURL}"/>
         <xsl:apply-templates mode="extract-recipe" />
       </dv:Recipe>
     </xsl:if>
@@ -169,6 +196,13 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
     </xsl:variable>
     <!-- ============================================================ -->
     <xsl:if test="$fn != 0">
+			<xsl:variable name="is_author">
+				<xsl:call-template name="testclass">
+					<xsl:with-param name="class" select="../@class" />
+					<xsl:with-param name="val" select="'author'" />
+				</xsl:call-template>
+			</xsl:variable>
+			<xsl:if test="$is_author = 0">
       <dc:title>
         <xsl:value-of select="." />
       </dc:title>
@@ -176,6 +210,7 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
         <xsl:value-of select="." />
       </dv:name>
     </xsl:if>
+		</xsl:if>
 	
     <xsl:if test="$ingredient != 0">
 		<xsl:variable name="ing_name">
@@ -184,13 +219,23 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
 		  </xsl:call-template>
 		</xsl:variable>
 		<xsl:choose>
-			<xsl:when test="$ing_name">
+				<xsl:when test="string-length($ing_name) > 0">
 			  <dv:ingredient>
-				<dv:Ingredient rdf:about="{vi:proxyIRI ($baseUri, '', concat('hrecipe', .))}">
+						<dv:Ingredient rdf:about="{vi:proxyIRI ($baseUri, '', escape-uri(concat('hrecipe', substring( replace(normalize-space(.), ' ', ''), 1 , 20) ), true())) }">
 					<dv:name>
+								<xsl:choose>
+									<xsl:when test="*[@class = 'name' or starts-with(@class,concat('name', ' ')) or contains(@class,concat(' ','name',' ')) or substring(@class, string-length(@class)-string-length('name')) = concat(' ','name')]">
 						<xsl:value-of select="*[@class = 'name' or starts-with(@class,concat('name', ' ')) or contains(@class,concat(' ','name',' ')) 
 						or substring(@class, string-length(@class)-string-length('name')) = concat(' ','name')]" />
+									</xsl:when>
+									<xsl:otherwise>
+										<xsl:value-of select="." />
+									</xsl:otherwise>
+								</xsl:choose>
 					</dv:name>
+							<rdfs:label>
+								<xsl:value-of select="." />
+							</rdfs:label>
 					<dv:amount>
 						<xsl:choose>
 							<xsl:when test="*[@class = 'amount' or starts-with(@class,concat('amount', ' ')) or contains(@class,concat(' ','amount',' ')) 
@@ -216,10 +261,12 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
     </xsl:if>
 
 	<xsl:if test="$ingredients != 0">
+			<xsl:if test="string-length(.) > 0">
       <dv:ingredient>
         <xsl:value-of select="." />
       </dv:ingredient>
     </xsl:if>
+		</xsl:if>
 	
     <xsl:if test="$yield != 0">
       <dv:yield>
@@ -227,15 +274,19 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
       </dv:yield>
     </xsl:if>
     <xsl:if test="$instructions != 0">
+			<xsl:if test="string-length(normalize-space(.)) > 0">
       <dv:instructions>
         <xsl:value-of select="." />
       </dv:instructions>
     </xsl:if>
+		</xsl:if>
     <xsl:if test="$directions != 0">
+			<xsl:if test="string-length(normalize-space(.)) > 0">
       <dv:instructions>
         <xsl:value-of select="." />
       </dv:instructions>
     </xsl:if>
+		</xsl:if>
     <xsl:if test="$duration != 0">
       <dv:duration>
         <xsl:value-of select="." />
@@ -303,9 +354,33 @@ xmlns:dv="http://rdf.data-vocabulary.org/" version="1.0">
     </xsl:if>
     </xsl:if>
     <xsl:if test="$tag != 0">
-      <dv:tag>
+			<scot:hasScot>
+				<scot:Tagcloud rdf:about="{vi:proxyIRI($baseUri, '', 'tagcloud')}">
+					<scot:hasTag rdf:resource="{vi:proxyIRI ($baseUri, '', concat ('tag_', .))}"/>
+				</scot:Tagcloud>
+			</scot:hasScot>
+			<sioc:topic>
+				<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat ('tag_', .))}">
+					<rdf:type rdf:resource="&skos;Concept"/>
+					<rdf:type rdf:resource="&scot;Tag "/>
+					<rdf:type rdf:resource="&moat;Tag"/>
+					<skos:prefLabel>
+						<xsl:value-of select="."/>
+					</skos:prefLabel>
+					<scot:name>
+						<xsl:value-of select="."/>
+					</scot:name>
+					<dc:description>
+						Tag: <xsl:value-of select="."/>
+					</dc:description>
+					<skos:isSubjectOf rdf:resource="{vi:proxyIRI ($baseUri, '', 'hrecipe')}"/>
+					<foaf:topic rdf:resource="{vi:dbpIRI ($baseUri, .)}"/>
+					<moat:name>
         <xsl:value-of select="." />
-      </dv:tag>
+					</moat:name>
+					<foaf:topic rdf:resource="{vi:dbpIRI ($baseUri, .)}"/>
+				</rdf:Description>
+			</sioc:topic>
     </xsl:if>
     <xsl:apply-templates mode="extract-recipe" />
   </xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/hresume2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hresume2rdf.xsl
index 15de004..f3987b2 100644
--- a/binsrc/rdf_mappers/xslt/main/hresume2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hresume2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hresume2rdf.xsl,v 1.1.2.5 2011/03/25 17:10:59 source Exp $
+ -  $Id: hresume2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -572,19 +572,19 @@
             <xsl:when test="$token = 'home' or $token = 'personal'">
                 <v:homeAdr rdf:parseType="Resource">
                     <xsl:copy-of select="$fields" />
-		<rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+		<rdfs:label><xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/></rdfs:label>
                 </v:homeAdr>
             </xsl:when>
             <xsl:when test="$token = 'work' or $token = 'office'">
                 <v:workAdr rdf:parseType="Resource">
                     <xsl:copy-of select="$fields" />
-		<rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+		<rdfs:label><xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/></rdfs:label>
                 </v:workAdr>
             </xsl:when>
             <xsl:otherwise>
                 <v:adr rdf:parseType="Resource">
                     <xsl:copy-of select="$fields" />
-		<rdfs:label><xsl:value-of select="concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name)"/></rdfs:label>
+		<rdfs:label><xsl:value-of select="vi:trim(concat($fields/v:extended-address, ' ', $fields/v:street-address, ', ', $fields/v:locality, ', ', $fields/v:postal-code, ', ', $fields/v:country-name), ', ')"/></rdfs:label>
                 </v:adr>
             </xsl:otherwise>
         </xsl:choose>
diff --git a/binsrc/rdf_mappers/xslt/main/hreview2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hreview2rdf.xsl
index 336235b..b1cd4ef 100644
--- a/binsrc/rdf_mappers/xslt/main/hreview2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hreview2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hreview2rdf.xsl,v 1.1.2.4 2010/12/14 12:07:57 source Exp $
+ -  $Id: hreview2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -142,7 +142,19 @@ xmlns:hrev="http://www.purl.org/stuff/hrev#" version="1.0">
     </xsl:if>
     <xsl:if test="$rating != 0">
       <review:rating>
-        <xsl:value-of select="." />
+	<xsl:variable name="rate" select="normalize-space(.)"/>
+	<xsl:choose>
+	<xsl:when test=".//*[@class='value-title']">
+		<xsl:variable name="rate2" select=".//*[@class='value-title']/@title"/>
+	        <xsl:value-of select="$rate2" />
+	</xsl:when>
+	<xsl:when test="string-length($rate) > 0">
+	        <xsl:value-of select="$rate" />
+	</xsl:when>
+	<xsl:otherwise>
+	        <xsl:value-of select="'0'" />
+	</xsl:otherwise>
+	</xsl:choose>
       </review:rating>
     </xsl:if>
     <xsl:if test="$description != 0">
diff --git a/binsrc/rdf_mappers/xslt/main/hreview_aggregate2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hreview_aggregate2rdf.xsl
index 7e5928a..0e1c302 100644
--- a/binsrc/rdf_mappers/xslt/main/hreview_aggregate2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hreview_aggregate2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: hreview_aggregate2rdf.xsl,v 1.1.4.2 2010/12/14 12:07:57 source Exp $
+ -  $Id: hreview_aggregate2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -160,9 +160,11 @@ xmlns:hrev="http://www.purl.org/stuff/hrev#" version="1.0">
       </dcterms:modified>
     </xsl:if>
     <xsl:if test="$rating != 0">
-      <review:rating>
-        <xsl:value-of select="." />
-      </review:rating>
+      <xsl:if test="string-length(.) > 0">
+         <review:rating>
+           <xsl:value-of select="." />
+         </review:rating>
+      </xsl:if>
     </xsl:if>
     <xsl:if test="$description != 0">
       <review:text>
diff --git a/binsrc/rdf_mappers/xslt/main/hrxml2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hrxml2rdf.xsl
index 97dc6e7..c7374d7 100644
--- a/binsrc/rdf_mappers/xslt/main/hrxml2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/hrxml2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hrxml2rdf.xsl,v 1.1.2.3 2009/11/04 09:45:46 source Exp $
+ -  $Id: hrxml2rdf.xsl,v 1.1.2.6 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -31,6 +31,10 @@
 <!ENTITY xbrli 'http://rhizomik.net/ontologies/2007/11/xbrl-instance-2003-12-31.owl#'>
 <!ENTITY xlink 'http://rhizomik.net/ontologies/2007/11/xlink-2003-12-31.owl#'>
 <!ENTITY xml 'http://www.w3.org/XML/1998/namespace#'>
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
 ]>
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -43,6 +47,9 @@
   xmlns:cv="http://purl.org/captsolo/resume-rdf/0.2/cv#"
   xmlns:cvbase="http://purl.org/captsolo/resume-rdf/0.2/base#"
   xmlns:v="http://www.w3.org/2006/vcard/ns#"
+  xmlns:sioc="&sioc;"
+  xmlns:dcterms="&dcterms;"
+  xmlns:owl="&owl;"	
   version="1.0">
 
   <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
diff --git a/binsrc/rdf_mappers/xslt/main/html2rdf.xsl b/binsrc/rdf_mappers/xslt/main/html2rdf.xsl
index f6cc875..94fbb64 100644
--- a/binsrc/rdf_mappers/xslt/main/html2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/html2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: html2rdf.xsl,v 1.1.2.17 2010/12/08 16:05:41 source Exp $
+ -  $Id: html2rdf.xsl,v 1.1.2.28 2012/03/14 11:05:44 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -29,6 +29,9 @@
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY awol "http://bblfish.net/work/atom-owl/2006-06-06/#">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY oplcert "http://www.openlinksw.com/schemas/cert#">
+<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
 ]>
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -45,6 +48,8 @@
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:awol="&awol;"
   xmlns:dcterms="&dcterms;"
+  xmlns:oplcert="&oplcert;"
+  xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#"
   version="1.0">
   <xsl:output method="xml" indent="yes" encoding="utf-8"/>
   <xsl:param name="baseUri" />
@@ -79,7 +84,7 @@
 		    <xsl:apply-templates  select="/html/body" mode="content"/>
 		</xsl:variable>
 		<!--content:encoded><xsl:value-of select="vi:escape($doc1)" /></content:encoded-->
-		<xsl:if test="not ($baseUri like 'http://%.nytimes.com/%')">
+	        <xsl:if test="not ($baseUri like 'http://%.nytimes.com/%' and $baseUri like 'http://stackoverflow.com/%')">
 		    <awol:content rdf:resource="{$resourceURL}#content"/>
 		</xsl:if>
       </rdf:Description>
@@ -89,10 +94,67 @@
 	      <awol:src rdf:resource="{$source}"/>
 	  </rdf:Description>
       </xsl:if>
+      <!-- x509 certificate -->
+      <xsl:for-each select="//*[starts-with (., '#X509Cert Fingerprint:')]">
+	  <xsl:variable name="fp"><xsl:value-of select="substring-before (substring-after (., '#X509Cert Fingerprint:'), ' ')"/></xsl:variable>
+	  <xsl:variable name="fpn"><xsl:value-of select="translate ($fp, ':', '')"/></xsl:variable>
+	  <xsl:variable name="dgst">
+	      <xsl:choose>
+		  <xsl:when test="contains (., '#SHA1')">sha1</xsl:when>
+		  <xsl:otherwise>md5</xsl:otherwise>
+	      </xsl:choose>
+	  </xsl:variable>
+	  <xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fpn)"/></xsl:variable>
+	  <xsl:variable name="au">
+	      <xsl:choose>
+		  <xsl:when test="//link[@rel='canonical']/@href"><xsl:value-of select="//link[@rel='canonical']/@href"/>#author</xsl:when>
+		  <xsl:otherwise><xsl:value-of select="vi:proxyIRI ($baseUri,'','author')"/></xsl:otherwise>
+	      </xsl:choose>
+	  </xsl:variable>
+	  <foaf:Agent rdf:about="{$au}">
+	      <oplcert:hasCertificate rdf:resource="{$ct}"/>
+	  </foaf:Agent>
+	  <rdf:Description rdf:about="{$resourceURL}">
+	      <dc:creator rdf:resource="{$au}"/>
+	  </rdf:Description>
+	  <oplcert:Certificate rdf:about="{$ct}">
+	      <rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+	      <oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+	      <oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+	  </oplcert:Certificate>
+      </xsl:for-each>
+      <!-- end certificate -->
+      <!-- x509 certificate -->
+      <xsl:for-each select="//*[text() like '%di:%?hashtag=webid%']">
+	  <xsl:variable name="di"><xsl:copy-of select="vi:di-split (.)"/></xsl:variable>
+	  <xsl:variable name="au">
+	      <xsl:choose>
+		  <xsl:when test="//link[@rel='canonical']/@href"><xsl:value-of select="//link[@rel='canonical']/@href"/>#author</xsl:when>
+		  <xsl:otherwise><xsl:value-of select="vi:proxyIRI ($baseUri,'','author')"/></xsl:otherwise>
+	      </xsl:choose>
+	  </xsl:variable>
+	  <xsl:for-each select="$di/result/di">
+	      <xsl:variable name="fp"><xsl:value-of select="hash"/></xsl:variable>
+	      <xsl:variable name="dgst"><xsl:value-of select="dgst"/></xsl:variable>
+	      <xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fp)"/></xsl:variable>
+	      <foaf:Agent rdf:about="{$au}">
+		  <oplcert:hasCertificate rdf:resource="{$ct}"/>
+	      </foaf:Agent>
+	      <rdf:Description rdf:about="{$resourceURL}">
+		  <dc:creator rdf:resource="{$au}"/>
+	      </rdf:Description>
+	      <oplcert:Certificate rdf:about="{$ct}">
+		  <rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+		  <oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+		  <oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+	      </oplcert:Certificate>
+	  </xsl:for-each>
+      </xsl:for-each>
+      <!-- end certificate -->
   </xsl:template>
 
   <xsl:template match="link[@rel='alternate']">
-      <rdfs:seeAlso rdf:resource="{@href}"/>
+      <xhv:alternate rdf:resource="{@href}"/>
   </xsl:template>
 
   <xsl:template match="*" mode="rdf-in-comment">
diff --git a/binsrc/rdf_mappers/xslt/main/html5md2rdf.xsl b/binsrc/rdf_mappers/xslt/main/html5md2rdf.xsl
index b1abb5a..c667e98 100644
--- a/binsrc/rdf_mappers/xslt/main/html5md2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/html5md2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: html5md2rdf.xsl,v 1.1.4.4 2010/05/26 15:23:14 source Exp $
+ -  $Id: html5md2rdf.xsl,v 1.1.4.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -112,11 +112,11 @@
 		<xsl:variable name="root" select="/"/>
 		
 		<xsl:choose>
-            <xsl:when test="@id">
+            <!--xsl:when test="@id">
 				<xsl:variable name="item_id" select="@id"/>
 				<xsl:variable name="itemid" select="vi:proxyIRI ($baseUri, '', $item_id)"/>
-			</xsl:when>
-			<xsl:when test="not $itemid">
+			</xsl:when-->
+			<xsl:when test="string-length($itemid) = 0">
 				<xsl:variable name="item_id" select="generate-id(.)"/>
 				<xsl:variable name="itemid" select="vi:proxyIRI ($baseUri, '', $item_id)"/>
 			</xsl:when>
@@ -228,9 +228,16 @@
 						</xsl:call-template>
 					</xsl:when>
 					<xsl:otherwise>
+						<xsl:choose>
+							<xsl:when test="string-length($obj/@content) > 0">
+								<xsl:value-of select="$obj/@content"/>
+							</xsl:when>
+							<xsl:otherwise>
 						<xsl:value-of select="$obj"/>
 					</xsl:otherwise>
 				</xsl:choose>
+					</xsl:otherwise>
+				</xsl:choose>
 			</xsl:element>
 		</xsl:for-each>
 	</xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/htmlAllMeta2rdf.xsl b/binsrc/rdf_mappers/xslt/main/htmlAllMeta2rdf.xsl
new file mode 100644
index 0000000..a5dc3c0
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/htmlAllMeta2rdf.xsl
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: htmlAllMeta2rdf.xsl,v 1.1.2.2 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    version="1.0">
+    
+  <xsl:output method="xml" indent="yes"/>
+  
+  <xsl:param name="baseUri"/>
+  <xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
+  <xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
+  <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+  
+  <xsl:template match="/">
+    <rdf:RDF>
+      <xsl:apply-templates select="//h:head/h:meta|//h:head/h:link" mode="ref"/>
+      <rdf:Description rdf:about="{$resourceURL}">
+        <xsl:apply-templates select="//h:head/h:meta|//h:head/h:link" mode="gen"/>
+      </rdf:Description>
+    </rdf:RDF>
+  </xsl:template>
+  
+  <xsl:template match="h:meta" mode="ref">
+    <xsl:variable name="p" select="vi:docproxyIRI($baseUri, '', vi:saneURI(./@name, -1))"/>
+    <owl:DatatypeProperty rdf:about="{$p}">
+      <rdfs:label>
+        <xsl:value-of select="@name"/>
+      </rdfs:label>
+      <rdfs:isDefinedBy rdf:resource="{vi:docproxyIRI($baseUri,'','schema')}"/>
+    </owl:DatatypeProperty>
+  </xsl:template>
+  
+  <xsl:template match="h:link" mode="ref">
+    <xsl:variable name="p" select="vi:docproxyIRI($baseUri, '', vi:saneURI(./@rel, -1))"/>
+    <owl:DatatypeProperty rdf:about="{$p}">
+      <rdfs:label>
+        <xsl:value-of select="@rel"/>
+      </rdfs:label>
+      <rdfs:isDefinedBy rdf:resource="{vi:docproxyIRI($baseUri,'','schema')}"/>
+    </owl:DatatypeProperty>
+  </xsl:template>
+  
+  <xsl:template match="h:meta" mode="gen">
+    <xsl:variable name="p" select="vi:docproxyIRI($baseUri, '', vi:saneURI(./@name, -1))"/>
+    <xsl:variable name="lp" select="vi:saneURI(./@name, -1)"/>
+    <xsl:element name="{$lp}" namespace="{concat($baseUri, '#')}"><xsl:value-of select="@content" /></xsl:element>
+  </xsl:template>
+
+  <xsl:template match="h:link" mode="gen">
+    <xsl:variable name="p" select="vi:docproxyIRI($baseUri, '', vi:saneURI(./@rel, -1))"/>
+    <xsl:variable name="lp" select="vi:saneURI(./@rel, -1)"/>
+    <xsl:element name="{$lp}" namespace="{concat($baseUri, '#')}"><xsl:value-of select="@href" /></xsl:element>
+  </xsl:template>
+  
+  <xsl:template match="text()|@*"/>
+</xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/hyperpublic2rdf.xsl b/binsrc/rdf_mappers/xslt/main/hyperpublic2rdf.xsl
new file mode 100644
index 0000000..3b0cf08
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/hyperpublic2rdf.xsl
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: hyperpublic2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY pto "http://www.productontology.org/id/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:rdf="&rdf;"
+    xmlns:pto="&pto;" 
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:opl="&opl;"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="&sioc;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:gr="&gr;"
+    xmlns:vcard="&vcard;"	
+    xmlns:c="&c;"	
+    xmlns:gn="&gn;"
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:oplhp="http://www.openlinksw.com/schemas/hyperpublic#">
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri"/>
+	<xsl:param name="action"/>
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:template match="/results">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+		
+			<xsl:if test="$action = 'people'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<rdf:type rdf:resource="&foaf;Person"/>
+					<rdfs:label>
+						<xsl:value-of select="display_name"/>
+					</rdfs:label>
+					<foaf:name>
+						<xsl:value-of select="display_name"/>
+					</foaf:name>
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://hyperpublic.com#this">
+							<foaf:name>Hyperpublic</foaf:name>
+							<foaf:homepage rdf:resource="http://hyperpublic.com"/>
+						</foaf:Organization>
+					</opl:providedBy>
+					<sioc:link rdf:resource="{perma_link}" />
+					<foaf:depiction rdf:resource="{images/src_small}"/>
+					<foaf:depiction rdf:resource="{images/src_large}"/>
+					<foaf:depiction rdf:resource="{images/src_thumb}"/>
+					<xsl:for-each select="tags">
+						<foaf:topic rdf:resource="{concat('http://hyperpublic.com/?tags=', replace(., ' ', '+'))}"/>
+					</xsl:for-each>
+					<xsl:for-each select="locations">
+						<c:location>
+							<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('location_', replace(name, ' ', '+')))}">
+								<foaf:name>
+									<xsl:value-of select="name"/>
+								</foaf:name>
+								<geo:lat rdf:datatype="&xsd;float">
+									<xsl:value-of select="lat"/>
+								</geo:lat>
+								<geo:long rdf:datatype="&xsd;float">
+									<xsl:value-of select="lon"/>
+								</geo:long>
+								<rdfs:label>
+									<xsl:value-of select="name"/>
+								</rdfs:label>
+								<xsl:if test="string-length(city) > 0">
+									<vcard:Locality>
+										<xsl:value-of select="city" />   
+									</vcard:Locality>
+								</xsl:if>
+								<xsl:if test="string-length(country) > 0">
+									<vcard:Country>
+										<xsl:value-of select="country" />   
+									</vcard:Country>
+								</xsl:if>
+								<xsl:if test="string-length(province) > 0">
+									<vcard:Region>
+										<xsl:value-of select="province" />   
+									</vcard:Region>
+								</xsl:if>
+								<xsl:if test="string-length(postal_code) > 0">
+									<vcard:Pcode>
+										<xsl:value-of select="postal_code" />   
+									</vcard:Pcode>
+								</xsl:if>
+							</vcard:ADR>
+						</c:location>
+					</xsl:for-each>
+				</rdf:Description>
+			</xsl:if>
+			<xsl:if test="$action = 'places'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<rdf:type rdf:resource="&gn;Feature"/>
+					<xsl:if test="display_name">
+						<dc:title>
+							<xsl:value-of select="display_name"/>
+						</dc:title>
+						<rdfs:label>
+							<xsl:value-of select="display_name"/>
+						</rdfs:label>				
+					</xsl:if>
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://hyperpublic.com#this">
+							<foaf:name>Hyperpublic</foaf:name>
+							<foaf:homepage rdf:resource="http://hyperpublic.com"/>
+						</foaf:Organization>
+					</opl:providedBy>
+					<sioc:link rdf:resource="{perma_link}"/>
+					<xsl:if test="string-length(website) > 0">
+						<foaf:page rdf:resource="{website}"/>
+					</xsl:if>                
+					<foaf:depiction rdf:resource="{images/src_small}"/>
+					<foaf:depiction rdf:resource="{images/src_large}"/>
+					<foaf:depiction rdf:resource="{images/src_thumb}"/>
+					<xsl:for-each select="tags">
+						<foaf:topic rdf:resource="{concat('http://hyperpublic.com/?tags=', replace(., ' ', '+'))}"/>
+					</xsl:for-each>
+					<xsl:if test="string-length(phone_number) > 0">
+						<foaf:phone rdf:resource="tel:{phone_number}"/>
+					</xsl:if>
+					<xsl:for-each select="locations">
+						<c:location>
+							<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('location_', replace(name, ' ', '+')))}">
+								<xsl:if test="string-length(name) > 0">
+									<foaf:name>
+										<xsl:value-of select="name"/>
+									</foaf:name>
+									<rdfs:label>
+										<xsl:value-of select="name"/>
+									</rdfs:label>
+								</xsl:if>
+								<geo:lat rdf:datatype="&xsd;float">
+									<xsl:value-of select="lat"/>
+								</geo:lat>
+								<geo:long rdf:datatype="&xsd;float">
+									<xsl:value-of select="lon"/>
+								</geo:long>
+								<xsl:if test="string-length(city) > 0">
+									<vcard:Locality>
+										<xsl:value-of select="city" />   
+									</vcard:Locality>
+								</xsl:if>
+								<xsl:if test="string-length(country) > 0">
+									<vcard:Country>
+										<xsl:value-of select="country" />   
+									</vcard:Country>
+								</xsl:if>
+								<xsl:if test="string-length(province) > 0">
+									<vcard:Region>
+										<xsl:value-of select="province" />   
+									</vcard:Region>
+								</xsl:if>
+								<xsl:if test="string-length(postal_code) > 0">
+									<vcard:Pcode>
+										<xsl:value-of select="postal_code" />   
+									</vcard:Pcode>
+								</xsl:if>
+								<xsl:if test="string-length(address_line1) > 0">
+									<vcard:ADR>
+										<xsl:value-of select="address_line1" />   
+									</vcard:ADR>
+								</xsl:if>
+								<xsl:if test="string-length(address_line2) > 0">
+									<vcard:ADR>
+										<xsl:value-of select="address_line2" />   
+									</vcard:ADR>
+								</xsl:if>
+							</vcard:ADR>
+						</c:location>
+					</xsl:for-each>
+					<xsl:if test="string-length(place_type) > 0">
+						<oplhp:place_type>
+							<xsl:value-of select="place_type" />   
+						</oplhp:place_type>
+					</xsl:if>
+				</rdf:Description>
+			</xsl:if>
+			<xsl:if test="$action = 'things'">
+				<rdf:Description rdf:about="{$resourceURL}">
+					<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder"/>
+					<xsl:if test="display_name">
+						<dc:title>
+							<xsl:value-of select="display_name"/>
+						</dc:title>
+						<rdfs:label>
+							<xsl:value-of select="display_name"/>
+						</rdfs:label>				
+					</xsl:if>
+					<opl:providedBy>
+						<foaf:Organization rdf:about="http://hyperpublic.com#this">
+							<foaf:name>Hyperpublic</foaf:name>
+							<foaf:homepage rdf:resource="http://hyperpublic.com"/>
+						</foaf:Organization>
+					</opl:providedBy>
+					<sioc:link rdf:resource="{perma_link}"/>
+					<foaf:depiction rdf:resource="{images/src_small}"/>
+					<foaf:depiction rdf:resource="{images/src_large}"/>
+					<foaf:depiction rdf:resource="{images/src_thumb}"/>
+					<xsl:for-each select="tags">
+						<foaf:topic rdf:resource="{concat('http://hyperpublic.com/?tags=', replace(., ' ', '+'))}"/>
+					</xsl:for-each>
+					<xsl:if test="string-length(price) > 0">
+						<gr:hasPriceSpecification>
+							<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'price')}">
+								<rdfs:label>
+									<xsl:value-of select="concat(price, ' USD')"/>	
+								</rdfs:label>
+								<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+								<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="price"/></gr:hasCurrencyValue>
+								<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+							</gr:UnitPriceSpecification>
+						</gr:hasPriceSpecification>
+					</xsl:if>
+					<xsl:for-each select="locations">
+						<c:location>
+							<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('location_', replace(name, ' ', '+')))}">
+								<xsl:if test="string-length(name) > 0">
+									<foaf:name>
+										<xsl:value-of select="name"/>
+									</foaf:name>
+									<rdfs:label>
+										<xsl:value-of select="name"/>
+									</rdfs:label>
+								</xsl:if>
+								<geo:lat rdf:datatype="&xsd;float">
+									<xsl:value-of select="lat"/>
+								</geo:lat>
+								<geo:long rdf:datatype="&xsd;float">
+									<xsl:value-of select="lon"/>
+								</geo:long>
+								<xsl:if test="string-length(city) > 0">
+									<vcard:Locality>
+										<xsl:value-of select="city" />   
+									</vcard:Locality>
+								</xsl:if>
+								<xsl:if test="string-length(country) > 0">
+									<vcard:Country>
+										<xsl:value-of select="country" />   
+									</vcard:Country>
+								</xsl:if>
+								<xsl:if test="string-length(province) > 0">
+									<vcard:Region>
+										<xsl:value-of select="province" />   
+									</vcard:Region>
+								</xsl:if>
+								<xsl:if test="string-length(postal_code) > 0">
+									<vcard:Pcode>
+										<xsl:value-of select="postal_code" />   
+									</vcard:Pcode>
+								</xsl:if>
+								<xsl:if test="string-length(address_line1) > 0">
+									<vcard:ADR>
+										<xsl:value-of select="address_line1" />   
+									</vcard:ADR>
+								</xsl:if>
+								<xsl:if test="string-length(address_line2) > 0">
+									<vcard:ADR>
+										<xsl:value-of select="address_line2" />   
+									</vcard:ADR>
+								</xsl:if>
+							</vcard:ADR>
+						</c:location>
+					</xsl:for-each>
+					<xsl:if test="string-length(place_type) > 0">
+						<oplhp:place_type>
+							<xsl:value-of select="place_type" />   
+						</oplhp:place_type>
+					</xsl:if>
+				</rdf:Description>
+			</xsl:if>
+		</rdf:RDF>
+    </xsl:template>
+    
+    <xsl:template match="*|text()"/>
+        
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/ics2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ics2rdf.xsl
index d292fb7..2832579 100644
--- a/binsrc/rdf_mappers/xslt/main/ics2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ics2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ics2rdf.xsl,v 1.1.2.8 2011/03/23 12:13:04 source Exp $
+ -  $Id: ics2rdf.xsl,v 1.1.2.12 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -41,7 +41,6 @@
     xmlns:sioc="&sioc;"
     xmlns     ="http://www.w3.org/2002/12/cal/ical#"
     xmlns:vi   ="http://www.openlinksw.com/virtuoso/xslt/"
-    xmlns:xml   ="xml"
     xmlns:rdfs="&rdfs;"    
     version="1.0"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
@@ -148,6 +147,11 @@
 	<component>
 	    <xsl:element name="{$elt}" namespace="&ical;">
 	    <xsl:attribute name="about" namespace="&rdf;"><xsl:value-of select="vi:proxyIRI($baseUri, '', $elt2)"/></xsl:attribute>
+		<xsl:if test="SUMMARY/val">
+			<rdfs:label>
+				<xsl:value-of select="vi:string2date3(normalize-space(SUMMARY/val))"/>
+			</rdfs:label>
+		</xsl:if>
 		<xsl:apply-templates select="*"/>
 	    </xsl:element>
 	</component>
@@ -218,14 +222,14 @@
     <xsl:template match="*[*[local-name (.) != 'val' and local-name (.) != 'fld']]">
 	<xsl:variable name="elt"><xsl:call-template name="ename"/></xsl:variable>
 	<xsl:element name="{$elt}" namespace="&ical;">
-	    <xsl:attribute name="parseType" namespace="&rdf;">Resource</xsl:attribute>
+	    <!--xsl:attribute name="parseType" namespace="&rdf;">Resource</xsl:attribute-->
 	    <xsl:apply-templates />
 	</xsl:element>
     </xsl:template>
 
-    <xsl:template match="val">
-	<xsl:value-of select="vi:string2date3(normalize-space(.))"/>
-    </xsl:template>
+    <xsl:template match="CHARSET"></xsl:template>
+
+    <xsl:template match="val"><xsl:value-of select="vi:string2date3(normalize-space(.))"/></xsl:template>
 
     <xsl:template match="URL|DIR" priority="1">
 	<ical:url rdf:resource="{val}"/>
diff --git a/binsrc/rdf_mappers/xslt/main/idiomag2rdf.xsl b/binsrc/rdf_mappers/xslt/main/idiomag2rdf.xsl
index 3da3cdd..e51f6c5 100644
--- a/binsrc/rdf_mappers/xslt/main/idiomag2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/idiomag2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: idiomag2rdf.xsl,v 1.1.4.4 2010/09/09 16:05:47 source Exp $
+ -  $Id: idiomag2rdf.xsl,v 1.1.4.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -29,12 +29,15 @@
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY mo "http://purl.org/ontology/mo/">
 <!ENTITY mmd "http://musicbrainz.org/ns/mmd-1.0#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 	xmlns:dc="http://purl.org/dc/elements/1.1/"
 	xmlns:dcterms="http://purl.org/dc/terms/"
+	xmlns:bibo="&bibo;"
 	xmlns:foaf="&foaf;"
 	xmlns:virtrdf="http://www.openlinksw.com/schemas/XHTML#"
 	xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
@@ -43,6 +46,7 @@
 	xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
 	xmlns:radio="http://www.radiopop.co.uk/"
 	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:opl="&opl;"
     xmlns:mo="&mo;"
     xmlns:mmd="&mmd;"	
 	version="1.0">
@@ -74,6 +78,13 @@
 
 	<xsl:template match="artist">
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.idiomag.com#this">
+                        			<foaf:name>Idiomag</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.idiomag.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;MusicGroup"/>
 			<foaf:name>
 				<xsl:value-of select="name"/>
@@ -89,6 +100,13 @@
 
 	<xsl:template match="tracks">
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.idiomag.com#this">
+                        			<foaf:name>Idiomag</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.idiomag.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;MusicGroup"/>
 			<xsl:for-each select="track">
 				<xsl:choose>
@@ -107,6 +125,13 @@
 
 	<xsl:template match="photos">
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.idiomag.com#this">
+                        			<foaf:name>Idiomag</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.idiomag.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;MusicGroup"/>
 			<xsl:for-each select="photo">
 				<foaf:img rdf:resource="{url}"/>
@@ -116,6 +141,13 @@
 	
 	<xsl:template match="articles">
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.idiomag.com#this">
+                        			<foaf:name>Idiomag</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.idiomag.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;MusicGroup"/>
 			<xsl:for-each select="article">
 				<rdfs:seeAlso rdf:resource="{sourceUrl}"/>
@@ -125,6 +157,13 @@
 
 	<xsl:template match="profile">
 		<foaf:Person rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.idiomag.com#this">
+                        			<foaf:name>Idiomag</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.idiomag.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<foaf:nick>
 				<xsl:value-of select="username" />
 			</foaf:nick>
diff --git a/binsrc/rdf_mappers/xslt/main/isbn2rdf.xsl b/binsrc/rdf_mappers/xslt/main/isbn2rdf.xsl
index f5b67fb..36250c1 100644
--- a/binsrc/rdf_mappers/xslt/main/isbn2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/isbn2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: isbn2rdf.xsl,v 1.1.2.5 2010/07/28 12:23:31 source Exp $
+ -  $Id: isbn2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -30,6 +30,7 @@
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#"> 
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -42,6 +43,7 @@
   xmlns:wf="http://www.w3.org/2005/01/wf/flow#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:foaf="&foaf;"
+  xmlns:opl="&opl;"
   xmlns:sioc="&sioc;"
   xmlns:bibo="&bibo;"
   xmlns:gr="&gr;"
@@ -77,6 +79,13 @@
 
     <xsl:template match="ISBNdb/BookList/BookData">
 	<rdf:Description rdf:about="{vi:proxyIRI(concat('http://isbndb.com/d/book/', @book_id, '.html'))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.isbndb.com#this">
+                        			<foaf:name>ISBN DB</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.isbndb.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 		<rdf:type rdf:resource="&book;Book"/>
         <rdf:type rdf:resource="&gr;ProductOrServiceModel"/>
 	</rdf:Description>
@@ -104,6 +113,13 @@
 
     <xsl:template match="ISBNdb/SubjectList/SubjectData">
 	<bibo:Collection rdf:about="{vi:proxyIRI(concat('http://isbndb.com/d/subject/', @subject_id, '.html'))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.isbndb.com#this">
+                        			<foaf:name>ISBN DB</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.isbndb.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
             <xsl:if test="Name">
             <bibo:shortTitle>
                 <xsl:value-of select="Name"/>
@@ -126,6 +142,13 @@
 
     <xsl:template match="ISBNdb/CategoryList/CategoryData">
 	<bibo:Collection rdf:about="{vi:proxyIRI(concat('http://isbndb.com/c/', @category_id))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.isbndb.com#this">
+                        			<foaf:name>ISBN DB</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.isbndb.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
             <xsl:if test="Name">
             <bibo:shortTitle>
                 <xsl:value-of select="Name"/>
diff --git a/binsrc/rdf_mappers/xslt/main/jigsaw2rdf.xsl b/binsrc/rdf_mappers/xslt/main/jigsaw2rdf.xsl
new file mode 100644
index 0000000..0450cbc
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/jigsaw2rdf.xsl
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: jigsaw2rdf.xsl,v 1.1.4.3 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY oplcv "http://www.openlinksw.com/schemas/cv#">
+<!ENTITY opljg "http://www.openlinksw.com/schemas/jigsaw#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY xsl "http://www.w3.org/1999/XSL/Transform">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:bibo="&bibo;"
+    xmlns:c="&c;"
+    xmlns:dc="&dc;"
+    xmlns:dcterms = "&dcterms;"
+    xmlns:foaf="&foaf;"
+    xmlns:opl="&opl;"
+    xmlns:oplcv="&oplcv;"
+    xmlns:opljg="&opljg;"
+    xmlns:owl="&owl;"	
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:vi="&vi;"
+    xmlns:xsl="&xsl;"
+    >
+
+  <xsl:param name="baseUri"/>
+  <xsl:param name="jgsw_id"/>
+
+  <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+  <xsl:variable name="providedByIRI" select="concat (vi:proxyIRI ($baseUri, '', 'Provider'))"/>
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+    <rdf:RDF>
+      <rdf:Description rdf:about="{$docproxyIRI}">
+        <rdf:type rdf:resource="&bibo;Document"/>
+        <sioc:container_of rdf:resource="{$resourceURL}"/>
+        <foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+        <dcterms:subject rdf:resource="{$resourceURL}"/>
+        <xsl:if test="normalize-space (name) != ''">
+          <dc:title>
+            <xsl:value-of select="name"/>
+          </dc:title>
+        </xsl:if>
+        <owl:sameAs rdf:resource="{$docIRI}"/>
+      </rdf:Description>
+      <!-- Attribution resource -->
+      <foaf:Organization rdf:about="{$providedByIRI}">
+        <foaf:name>Data.com</foaf:name>
+        <foaf:homepage rdf:resource="http://www.jigsaw.com"/>
+        <rdf:type rdf:resource="&foaf;Organization"/>
+        <owl:sameAs rdf:resource="http://www.jigsaw.com#this"/>
+      </foaf:Organization>
+      <xsl:apply-templates select="*"/>
+    </rdf:RDF>
+  </xsl:template>
+
+  <xsl:template match="com.jigsaw.api.searchget.model.CompanyBasic[companyId=$jgsw_id]">
+    <xsl:if test="string-length(name) > 0">
+      <rdf:Description rdf:about="{$resourceURL}">
+        <opl:providedBy rdf:resource="{$providedByIRI}"/>
+        <rdf:type rdf:resource="&foaf;Organization"/>
+        <sioc:id>
+          <xsl:value-of select="companyId"/>
+        </sioc:id>
+        <foaf:name>
+          <xsl:value-of select="name"/>
+        </foaf:name>
+        <!-- Not worth defining a OpenLink ontology for Jigsaw for a single activeContacts property 
+        <xsl:if test="string-length(activeContacts) > 0">
+          <opljg:activeContacts>
+            <xsl:value-of select="activeContacts" />
+          </opljg:activeContacts>
+        </xsl:if>
+        -->
+        <xsl:if test="string-length(country) > 0">
+          <c:location rdf:resource="{vi:proxyIRI($baseUri, '', concat('Company_', $jgsw_id, '_address'))}"/>
+        </xsl:if>
+      </rdf:Description>
+
+      <xsl:if test="string-length(country) > 0">
+        <vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('Company_', $jgsw_id, '_address'))}">
+          <rdfs:label>
+            <xsl:value-of select="concat(name, ' vCard')"/>
+          </rdfs:label>
+          <xsl:if test="string-length(address) > 0">
+            <vcard:Extadd>
+              <xsl:value-of select="address"/>
+            </vcard:Extadd>
+          </xsl:if>
+          <xsl:if test="string-length(state) > 0">
+            <vcard:Region>
+              <xsl:value-of select="state"/>
+            </vcard:Region>
+          </xsl:if>
+          <vcard:Country>
+            <xsl:value-of select="country"/>
+          </vcard:Country>
+          <xsl:if test="string-length(city) > 0">
+            <vcard:Locality>
+              <xsl:value-of select="city"/>
+            </vcard:Locality>
+          </xsl:if>
+          <xsl:if test="string-length(areaCode) > 0">
+            <vcard:Pcode>
+              <xsl:value-of select="areaCode"/>
+            </vcard:Pcode>
+          </xsl:if>
+        </vcard:ADR>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="com.jigsaw.api.searchget.model.Contact[contactId=$jgsw_id]">
+    <rdf:Description rdf:about="{$resourceURL}">
+      <opl:providedBy rdf:resource="{$providedByIRI}"/>
+      <rdf:type rdf:resource="&foaf;Person"/>
+      <sioc:id>
+        <xsl:value-of select="contactId"/>
+      </sioc:id>
+      <!-- foaf:name serves as label
+      <rdfs:label><xsl:value-of select="concat (firstname, ' ', lastname)"/></rdfs:label>
+      -->
+      <xsl:if test="string-length(title) > 0">
+        <oplcv:jobTitle>
+          <xsl:value-of select="title"/>
+        </oplcv:jobTitle>
+      </xsl:if>
+      <xsl:if test="string-length(updatedDate) > 0">
+        <dcterms:modified rdf:datatype="&xsd;date">
+          <xsl:value-of select="updatedDate"/>
+        </dcterms:modified>
+      </xsl:if>
+      <xsl:if test="string-length(firstname) > 0">
+        <foaf:firstName>
+          <xsl:value-of select="firstname"/>
+        </foaf:firstName>
+      </xsl:if>
+      <xsl:if test="string-length(lastname) > 0">
+        <foaf:lastName>
+          <xsl:value-of select="lastname"/>
+        </foaf:lastName>
+      </xsl:if>
+      <xsl:if test="firstname and lastname">
+        <foaf:name>
+          <xsl:value-of select="concat (firstname, ' ', lastname)"/>
+        </foaf:name>
+      </xsl:if>
+      <xsl:if test="string-length(phone) > 0">
+        <opljg:phone>
+          <xsl:value-of select="phone"/>
+        </opljg:phone>
+      </xsl:if>
+      <xsl:if test="string-length(email) > 0">
+        <opljg:email>
+          <xsl:value-of select="email"/>
+        </opljg:email>
+      </xsl:if>
+      <xsl:if test="string-length(contactURL) > 0">
+        <rdfs:seeAlso rdf:resource="{contactURL}"/>
+      </xsl:if>
+      <xsl:if test="string-length(seoContactURL) > 0 and seoContactURL != $baseUri">
+        <!-- baseUri is also mapped to wdrs:describedby, so don't duplicate value -->
+        <rdfs:seeAlso rdf:resource="{seoContactURL}"/>
+      </xsl:if>
+      <oplcv:employedIn>
+        <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Company_', companyId))}">
+          <opl:providedBy rdf:resource="{$providedByIRI}"/>
+          <rdf:type rdf:resource="&foaf;Organization"/>
+          <foaf:name>
+            <xsl:value-of select="companyName"/>
+          </foaf:name>
+          <sioc:id>
+            <xsl:value-of select="companyId"/>
+          </sioc:id>
+          <c:location rdf:resource="{vi:proxyIRI($baseUri, '', concat('Company_', companyId, '_address'))}"/>
+        </rdf:Description>
+      </oplcv:employedIn>
+    </rdf:Description>
+
+    <vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('Company_', companyId, '_address'))}">
+      <rdfs:label>
+        <xsl:value-of select="concat(companyName, ' vCard')"/>
+      </rdfs:label>
+      <vcard:Extadd>
+        <xsl:value-of select="address"/>
+      </vcard:Extadd>
+      <vcard:Region>
+        <xsl:value-of select="state"/>
+      </vcard:Region>
+      <vcard:Country>
+        <xsl:value-of select="country"/>
+      </vcard:Country>
+      <vcard:Locality>
+        <xsl:value-of select="city"/>
+      </vcard:Locality>
+      <vcard:Pcode>
+        <xsl:value-of select="areaCode"/>
+      </vcard:Pcode>
+    </vcard:ADR>
+  </xsl:template>
+
+  <xsl:template match="text()|@*"/>
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/klout2rdf.xsl b/binsrc/rdf_mappers/xslt/main/klout2rdf.xsl
new file mode 100644
index 0000000..2381038
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/klout2rdf.xsl
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: klout2rdf.xsl,v 1.1.2.3 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY oplklout "http://www.openlinksw.com/schemas/klout#">
+<!ENTITY opltw "http://www.openlinksw.com/schemas/twitter#">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bibo="&bibo;" xmlns:sioc="&sioc;" xmlns:oplklout="&oplklout;" xmlns:opltw="&opltw;" xmlns:foaf="&foaf;" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="&xsd;" version="1.0">
+
+  <xsl:output method="xml" indent="yes"/>
+  
+  <xsl:param name="baseUri"/>
+  <xsl:param name="mode"/>
+  
+  <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+  
+  <xsl:template match="/">
+    <rdf:RDF>
+      <rdf:Description rdf:about="{$docproxyIRI}">
+        <rdf:type rdf:resource="&bibo;Document"/>
+        <dc:title>
+          <xsl:value-of select="$baseUri"/>
+        </dc:title>
+        <sioc:container_of rdf:resource="{$resourceURL}"/>
+        <foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+        <dcterms:subject rdf:resource="{$resourceURL}"/>
+        <owl:sameAs rdf:resource="{$docIRI}"/>
+      </rdf:Description>
+      <rdf:Description rdf:about="{$resourceURL}">
+        <rdf:type rdf:resource="&sioc;Container"/>
+        <rdf:type rdf:resource="&oplklout;User"/>
+        <xsl:apply-templates/>
+      </rdf:Description>
+    </rdf:RDF>
+  </xsl:template>
+  
+  <xsl:template match="users">
+    <xsl:apply-templates select="user"/>
+  </xsl:template>
+  
+  <xsl:template match="user">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="twitter_id">
+    <opltw:id>
+      <xsl:value-of select="."/>
+    </opltw:id>
+  </xsl:template>
+  
+  <xsl:template match="twitter_screen_name">
+    <opltw:screen_name>
+      <xsl:value-of select="."/>
+    </opltw:screen_name>
+    <rdfs:label>
+      <xsl:value-of select="."/>
+    </rdfs:label>
+    <oplklout:twitterProfileURI rdf:resource="{vi:proxyIRI (concat('http://twitter.com/', .))}"/>
+  </xsl:template>
+  
+  <xsl:template match="score">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="kscore">
+    <oplklout:has_klout rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:has_klout>
+  </xsl:template>
+  
+  <xsl:template match="slope">
+    <oplklout:score_slope rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:score_slope>
+  </xsl:template>
+  
+  <xsl:template match="description">
+    <oplklout:description>
+      <xsl:value-of select="."/>
+    </oplklout:description>
+  </xsl:template>
+  
+  <xsl:template match="kclass">
+    <oplklout:class>
+      <xsl:value-of select="."/>
+    </oplklout:class>
+  </xsl:template>
+  
+  <xsl:template match="network_score">
+    <oplklout:netscore rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:netscore>
+  </xsl:template>
+  
+  <xsl:template match="amplification">
+    <oplklout:amplification rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:amplification>
+  </xsl:template>
+  
+  <xsl:template match="true_reach">
+    <oplklout:true_reach rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:true_reach>
+  </xsl:template>
+  
+  <xsl:template match="delta_1day">
+    <oplklout:delta1d rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:delta1d>
+  </xsl:template>
+  
+  <xsl:template match="delta_5day">
+    <oplklout:delta5d rdf:datatype="&xsd;float">
+      <xsl:value-of select="."/>
+    </oplklout:delta5d>
+  </xsl:template>
+  
+  <xsl:template match="topics">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="topic">
+    <oplklout:topic>
+      <xsl:value-of select="."/>
+    </oplklout:topic>
+  </xsl:template>
+  
+  <xsl:template match="influencees">
+    <xsl:apply-templates select="twitter_screen_name" mode="influencee"/>
+  </xsl:template>
+  
+  <xsl:template match="twitter_screen_name" mode="influencee">
+    <oplklout:influences>
+      <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', .)}">
+        <rdf:type rdf:resource="&oplklout;User"/>
+        <rdfs:label>
+          <xsl:value-of select="."/>
+        </rdfs:label>
+        <foaf:homepage rdf:resource="{vi:proxyIRI (concat('http://klout.com/', .))}"/>
+      </rdf:Description>
+    </oplklout:influences>
+  </xsl:template>
+  
+  <xsl:template match="influencers">
+    <xsl:apply-templates select="twitter_screen_name" mode="influenced_by"/>
+  </xsl:template>
+  
+  <xsl:template match="twitter_screen_name" mode="influenced_by">
+    <oplklout:influenced_by>
+      <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', .)}">
+        <rdf:type rdf:resource="&oplklout;User"/>
+        <rdfs:label>
+          <xsl:value-of select="."/>
+        </rdfs:label>
+        <foaf:homepage rdf:resource="{vi:proxyIRI (concat('http://klout.com/', .))}"/>
+      </rdf:Description>
+    </oplklout:influenced_by>
+  </xsl:template>
+  
+  <xsl:template match="*|text()"/>
+  
+  <xsl:template match="*|text()" mode="show"/>
+  
+  <xsl:template match="*|text()" mode="topics"/>
+  
+  <xsl:template match="*|text()" mode="influencers"/>
+  
+  <xsl:template match="*|text()" mode="influenced_by"/>
+  
+  <xsl:template match="*|text()" mode="influences"/>
+  
+  <xsl:template match="*|text()"/>
+</xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/lastfm2rdf.xsl b/binsrc/rdf_mappers/xslt/main/lastfm2rdf.xsl
index b5de49c..fe1d8f6 100644
--- a/binsrc/rdf_mappers/xslt/main/lastfm2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/lastfm2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: lastfm2rdf.xsl,v 1.1.2.9 2011/03/25 17:10:59 source Exp $
+ -  $Id: lastfm2rdf.xsl,v 1.1.2.13 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -36,6 +36,7 @@
 <!ENTITY event "http://purl.org/NET/c4dm/event.owl#">
 <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
 <!ENTITY time "http://www.w3.org/2006/time#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY audio "http://purl.org/media/audio#">
 <!ENTITY media "http://purl.org/media#">
 ]>
@@ -60,6 +61,7 @@
     xmlns:time="&time;"
     xmlns:c="http://www.w3.org/2002/12/cal/icaltzd#"
     xmlns:audio="&audio;"
+    xmlns:opl="&opl;"
     xmlns:media="&media;"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     >
@@ -410,7 +412,14 @@
 	</xsl:template>
 
     <xsl:template name="artist">
-		<mo:MusicArtist rdf:about="{vi:proxyIRI(url)}">
+		<mo:MusicArtist rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<foaf:name>
 				<xsl:value-of select="name"/>
 			</foaf:name>
@@ -473,6 +482,13 @@
 
 	<xsl:template name="album">
 		<rdf:Description rdf:about="{vi:proxyIRI(url)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Record"/>
 			<rdf:type rdf:resource="&audio;Album"/>
 			<dc:title>
@@ -516,6 +532,13 @@
     <xsl:template name="track">
 
 		<rdf:Description rdf:about="{vi:proxyIRI(url)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Track"/>
 			<rdf:type rdf:resource="&audio;Recording"/>
 			<dc:title>
@@ -603,6 +626,13 @@
 	<xsl:template name="event">
 
 		<c:Vevent rdf:about="{vi:proxyIRI(url)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<c:summary>
                 <xsl:value-of select="title"/>
             </c:summary>
@@ -667,6 +697,13 @@
 			<owl:sameAs rdf:resource="{$docIRI}"/>
 		</rdf:Description>
 		<foaf:Person rdf:about="{vi:proxyIRI($baseUri)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<foaf:name>
 				<xsl:value-of select="realname"/>
 			</foaf:name>
@@ -691,6 +728,13 @@
 	<xsl:template name="user">
 
 		<foaf:Person rdf:about="{vi:proxyIRI(url)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<foaf:name>
 				<xsl:value-of select="name"/>
 			</foaf:name>
@@ -725,6 +769,13 @@
     <xsl:template name="playlist">
 
 		<rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', id)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.last.fm#this">
+                        			<foaf:name>Last.FM</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.last.fm"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&sioct;PlayList"/>
 			<dc:title>
                 <xsl:value-of select="title"/>
diff --git a/binsrc/rdf_mappers/xslt/main/linkedin2rdf.xsl b/binsrc/rdf_mappers/xslt/main/linkedin2rdf.xsl
new file mode 100644
index 0000000..1c325ff
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/linkedin2rdf.xsl
@@ -0,0 +1,654 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: linkedin2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY oplcv "http://www.openlinksw.com/schemas/cv#">
+<!ENTITY oplli "http://www.openlinksw.com/schemas/linkedin#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdfns  "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+]>
+<xsl:stylesheet
+    xmlns:bibo="&bibo;"
+    xmlns:oplcv="&oplcv;"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:foaf="&foaf;"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:oplli="&oplli;"
+    xmlns:opl="&opl;"
+    xmlns:owl="&owl;"	
+    xmlns:rdf="&rdfns;"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="&sioc;"
+    xmlns:vi="&vi;"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+	>
+
+	<xsl:param name="baseUri" />
+    <xsl:param name="li_object_type" />
+
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	<xsl:variable name="providedByIRI" select="concat ('http://www.linkedin.com', '#this')"/>
+	
+    <xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
+    <xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
+
+	<xsl:output method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no" standalone="no" indent="yes" />
+
+	<xsl:template match="/">
+		<rdf:RDF>
+           <rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<xsl:if test="normalize-space (name) != ''">
+				    <dc:title><xsl:value-of select="name"/></dc:title>
+				</xsl:if>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+		    </rdf:Description>
+
+              <rdf:Description rdf:about="{$resourceURL}">
+		      <xsl:if test="$li_object_type='connections'">
+		        <xsl:apply-templates select="/connections/person" mode="connpersonref" />
+		        <oplli:num_connections rdf:datatype="&xsd;integer"><xsl:value-of select="/connections/@total"/></oplli:num_connections>
+		      </xsl:if>
+              </rdf:Description>
+		    
+            <!-- Attribution resource -->
+	        <foaf:Organization rdf:about="{$providedByIRI}">
+	            <foaf:name>LinkedIn Inc.</foaf:name>
+	            <foaf:homepage rdf:resource="http://www.linkedin.com"/>
+	        </foaf:Organization>
+	        
+	        <xsl:if test="$li_object_type='connections'">
+		  <xsl:apply-templates select="/connections/person" mode="connperson" />
+		</xsl:if>
+            <xsl:apply-templates select="*"/>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="/person">
+        <xsl:call-template name="person">
+            <xsl:with-param name="personURI" select="$resourceURL"/>
+        </xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="/connections" />
+	
+	<xsl:template match="person" mode="connpersonref">
+	  <xsl:variable name="personURI" select="vi:proxyIRI($baseUri, '', concat('Person_', id))"/>
+	  <foaf:knows rdf:resource="{$personURI}" />
+	</xsl:template>
+
+	<xsl:template match="person" mode="connperson">
+	  <xsl:variable name="personURI" select="vi:proxyIRI($baseUri, '', concat('Person_', id))"/>
+	  <xsl:call-template name="person">
+	    <xsl:with-param name="personURI"><xsl:value-of select="$personURI" /></xsl:with-param>
+	  </xsl:call-template>
+	</xsl:template>
+
+	<xsl:template match="educations">
+        <xsl:for-each select="education">
+		    <xsl:variable name="id" select="id" />
+            <oplli:education>
+                <oplli:Education rdf:about="{vi:proxyIRI ($baseUri, '', concat('Education_', $id))}">
+                    <oplli:id><xsl:value-of select="$id"/></oplli:id>
+                <xsl:if test="school-name">
+                    <oplli:school_name><xsl:value-of select="school-name"/></oplli:school_name>
+                </xsl:if>
+                    <xsl:if test="string-length (degree)">
+                    <oplli:education_degree><xsl:value-of select="degree"/></oplli:education_degree>
+                </xsl:if>
+                    <xsl:if test="string-length (field-of-study)">
+                    <oplli:field_of_study><xsl:value-of select="field-of-study"/></oplli:field_of_study>
+                </xsl:if>
+                <xsl:if test="string-length(notes) > 0">
+                    <oplli:education_notes><xsl:value-of select="notes"/></oplli:education_notes>
+                </xsl:if>
+                <xsl:if test="string-length(activities) > 0">
+                    <oplli:education_activities><xsl:value-of select="activities"/></oplli:education_activities>
+                </xsl:if>
+
+                    <xsl:choose>
+                        <xsl:when test="string-length (school-name) and string-length (field-of-study)">
+                            <rdfs:label><xsl:value-of select="concat (field-of-study, ' : ', school-name)"/></rdfs:label>
+                        </xsl:when>
+                        <xsl:when test="string-length (school-name)">
+                            <rdfs:label><xsl:value-of select="school-name"/></rdfs:label>
+                        </xsl:when>
+                        <xsl:when test="string-length (field-of-study)">
+                            <rdfs:label><xsl:value-of select="field-of-study"/></rdfs:label>
+                        </xsl:when>
+                    </xsl:choose>
+
+                    <xsl:if test="start-date">
+                        <xsl:variable name="start_year" select="start-date/year" />
+                        <xsl:variable name="start_month">
+                          <xsl:choose> 
+                             <xsl:when test="start-date/month">
+                                 <xsl:choose> 
+                                     <xsl:when test="string-length(start-date/month) > 1">
+                                         <xsl:value-of select="start-date/month" />
+                                     </xsl:when>
+                                       <xsl:otherwise>
+                                         <xsl:value-of select="concat('0', start-date/month)" />
+                                     </xsl:otherwise>
+                                    </xsl:choose>
+                             </xsl:when>
+                             <xsl:otherwise>
+                                   <xsl:text>01</xsl:text>
+                             </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:variable>
+                        <oplli:start_date rdf:datatype="&xsd;date"><xsl:value-of select="concat($start_year,'-', $start_month, '-01')" /></oplli:start_date>
+                    </xsl:if>
+
+                    <xsl:if test="end-date">
+                     <xsl:variable name="end_year" select="end-date/year" />
+                        <xsl:variable name="end_month">
+                            <xsl:choose> 
+                                <xsl:when test="end-date/month">
+                                    <xsl:choose> 
+                                        <xsl:when test="string-length(end-date/month) > 1">
+                                             <xsl:value-of select="end-date/month" />
+                                        </xsl:when>
+                                        <xsl:otherwise>
+                                            <xsl:value-of select="concat('0', end-date/month)" />
+                                        </xsl:otherwise>
+                                    </xsl:choose>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:text>01</xsl:text>
+                                </xsl:otherwise>
+                         </xsl:choose>
+                      </xsl:variable>
+                        <oplli:end_date rdf:datatype="&xsd;date"><xsl:value-of select="concat($end_year,'-', $end_month, '-01')" /></oplli:end_date>
+                    </xsl:if>
+
+                </oplli:Education>
+            </oplli:education>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="educations" mode="cv">
+        <xsl:for-each select="education">
+		    <xsl:variable name="id" select="id" />
+            <oplcv:hasEducation>
+                <xsl:call-template name="cv_education">
+                    <xsl:with-param name="education_URI" select="vi:proxyIRI($baseUri, '', concat('cvEducation_', $id))"/>
+                </xsl:call-template>
+            </oplcv:hasEducation>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="connections">
+        <xsl:for-each select="person">
+		    <xsl:variable name="id" select="id" />
+            <foaf:knows>
+                <xsl:call-template name="person">
+                    <xsl:with-param name="personURI" select="vi:proxyIRI($baseUri, '', concat('Person_', $id))"/>
+                </xsl:call-template>
+            </foaf:knows>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="positions">
+        <xsl:for-each select="position">
+		    <xsl:variable name="id" select="id" />
+            <oplli:position>
+                <xsl:call-template name="position">
+                    <xsl:with-param name="positionURI" select="vi:proxyIRI($baseUri, '', concat('Position_', $id))"/>
+                </xsl:call-template>
+            </oplli:position>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="positions" mode="cv">
+        <xsl:for-each select="position">
+		    <xsl:variable name="id" select="id" />
+            <oplcv:hasWorkHistory>
+                <xsl:call-template name="cv_work_history">
+                    <xsl:with-param name="work_history_URI" select="vi:proxyIRI($baseUri, '', concat('cvWorkHistory_', $id))"/>
+                </xsl:call-template>
+            </oplcv:hasWorkHistory>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="skills">
+        <xsl:for-each select="skill">
+		    <xsl:variable name="id" select="id" />
+            <oplli:skill>
+                <xsl:call-template name="skill">
+                    <xsl:with-param name="skillURI" select="vi:proxyIRI($baseUri, '', concat('Skill_', $id))"/>
+                </xsl:call-template>
+            </oplli:skill>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="skills" mode="cv">
+        <xsl:for-each select="skill">
+		    <xsl:variable name="id" select="id" />
+            <oplcv:hasSkill>
+                <xsl:call-template name="cv_skill">
+                    <xsl:with-param name="skillURI" select="vi:proxyIRI($baseUri, '', concat('cvSkill_', $id))"/>
+                </xsl:call-template>
+            </oplcv:hasSkill>
+        </xsl:for-each>
+	</xsl:template>
+
+	<xsl:template match="interests" mode="cv">
+        <xsl:if test="string-length(.)">
+            <oplcv:hasOtherInfo>
+                <rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', 'cvOtherInfo_Interests_')}">
+                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                    <rdf:type rdf:resource="&oplcv;OtherInfo" />
+                    <rdfs:label>Interests</rdfs:label>
+                    <oplcv:otherInfoDescription><xsl:value-of select="." /></oplcv:otherInfoDescription>
+                    <oplcv:otherInfo rdf:resource="&oplcv;Interests"/>
+                </rdf:Description>
+            </oplcv:hasOtherInfo>
+        </xsl:if>
+	</xsl:template>
+
+	<xsl:template name="person">
+        <xsl:param name="personURI"/>
+	    <rdf:Description rdf:about="{$personURI}">
+	        <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdf:type rdf:resource="&foaf;Person" />
+            <rdfs:label><xsl:value-of select="concat (first-name, ' ', last-name)"/></rdfs:label>
+            <oplli:id><xsl:value-of select="id"/></oplli:id>
+            <xsl:if test="public-profile-url">
+   		        <oplli:public_profile_url><xsl:value-of select="public-profile-url"/></oplli:public_profile_url>
+            </xsl:if>
+            <xsl:if test="first-name">
+                <foaf:firstName><xsl:value-of select="first-name"/></foaf:firstName>
+            </xsl:if>
+            <xsl:if test="last-name">
+                <foaf:lastName><xsl:value-of select="last-name"/></foaf:lastName>
+            </xsl:if>
+            <xsl:if test="first-name and last-name">
+                <foaf:name><xsl:value-of select="concat (first-name, ' ', last-name)"/></foaf:name>
+            </xsl:if>
+            <xsl:if test="industry">
+    		    <oplli:industry><xsl:value-of select="industry"/></oplli:industry>
+            </xsl:if>
+            <xsl:if test="headline">
+    		    <oplli:headline><xsl:value-of select="headline"/></oplli:headline>
+            </xsl:if>
+            <xsl:if test="picture-url">
+    		    <foaf:img rdf:resource="{picture-url}"/>
+            </xsl:if>
+            <xsl:if test="string-length(specialties)">
+   		        <oplli:specialties><xsl:value-of select="specialties"/></oplli:specialties>
+            </xsl:if>
+            <xsl:if test="string-length(interests)">
+   		        <oplli:interests><xsl:value-of select="interests"/></oplli:interests>
+            </xsl:if>
+            <xsl:if test="string-length(honors)">
+   		        <oplli:honors><xsl:value-of select="honors"/></oplli:honors>
+            </xsl:if>
+            <!-- associations -->
+
+            <!-- Derive a CV from the primary LinkedIn user's profile (but not for people he/she knows) -->
+            <xsl:if test="not(ancestor::connections)">
+            <oplcv:has_CV>
+	            <rdf:Description rdf:about="{vi:proxyIRI($baseUri, '', concat('CV_', id))}">
+	                <opl:providedBy rdf:resource="{$providedByIRI}" />
+                    <rdf:type rdf:resource="&oplcv;CV" />
+                    <rdfs:label><xsl:value-of select="concat ('Auto-generated CV for ', first-name, ' ', last-name)"/></rdfs:label>
+                    <rdfs:comment><xsl:value-of select="concat ('A CV derived from the LinkedIn profile of ', first-name, ' ', last-name)"/></rdfs:comment>
+                    <foaf:firstName><xsl:value-of select="first-name"/></foaf:firstName>
+                    <foaf:lastName><xsl:value-of select="last-name"/></foaf:lastName>
+                    <foaf:name><xsl:value-of select="concat (first-name, ' ', last-name)"/></foaf:name>
+
+                    <xsl:apply-templates select="*" mode="cv" />
+	            </rdf:Description>
+            </oplcv:has_CV>
+            </xsl:if>
+
+            <xsl:apply-templates select="*"/>
+		</rdf:Description>
+	</xsl:template>
+
+    <xsl:template match="location">
+      <oplli:location_name><xsl:value-of select="name" /></oplli:location_name>
+      <oplli:country_code><xsl:value-of select="country/code" /></oplli:country_code>
+	</xsl:template>
+
+    <xsl:template name="position">
+        <xsl:param name="positionURI"/>
+	    <rdf:Description rdf:about="{$positionURI}">
+	        <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdf:type rdf:resource="&oplli;Position" />
+            <rdfs:label><xsl:value-of select="title"/></rdfs:label>
+            <oplli:id><xsl:value-of select="id"/></oplli:id>
+            <oplli:title><xsl:value-of select="title" /></oplli:title>
+            <xsl:if test="is-current">
+                <oplli:is_current rdf:datatype="&xsd;boolean">
+                        <xsl:value-of select="is-current" />
+                </oplli:is_current>
+            </xsl:if>
+            <xsl:if test="start-date">
+                <xsl:variable name="start_year" select="start-date/year" />
+                <xsl:variable name="start_month">
+                    <xsl:choose> 
+                        <xsl:when test="start-date/month">
+                            <xsl:choose> 
+                                <xsl:when test="string-length(start-date/month) > 1">
+                                    <xsl:value-of select="start-date/month" />
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:value-of select="concat('0', start-date/month)" />
+                                </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:text>01</xsl:text>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplli:start_date rdf:datatype="&xsd;date"><xsl:value-of select="concat($start_year,'-', $start_month, '-01')" /></oplli:start_date>
+            </xsl:if>
+            <xsl:if test="end-date">
+                <xsl:variable name="end_year" select="end-date/year" />
+                <xsl:variable name="end_month">
+                    <xsl:choose> 
+                        <xsl:when test="end-date/month">
+                            <xsl:choose> 
+                                <xsl:when test="string-length(end-date/month) > 1">
+                                    <xsl:value-of select="end-date/month" />
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:value-of select="concat('0', end-date/month)" />
+                                </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:text>01</xsl:text>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplli:end_date rdf:datatype="&xsd;date"><xsl:value-of select="concat($end_year,'-', $end_month, '-01')" /></oplli:end_date>
+            </xsl:if>
+            <xsl:if test="company">
+                <xsl:variable name="company_id">
+                    <xsl:choose>
+                        <xsl:when test="company/id">
+                            <xsl:value-of select="company/id" />
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="translate (company/name, ' ', '_')" />
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplli:company>
+    	            <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('Company_', $company_id))}">
+                        <rdf:type rdf:resource="&oplli;Company" />
+                        <rdfs:label><xsl:value-of select="company/name"/></rdfs:label>
+                        <oplli:company_name><xsl:value-of select="company/name"/></oplli:company_name>
+                        <xsl:if test="company/id">
+                            <oplli:id><xsl:value-of select="company/id"/></oplli:id>
+                        </xsl:if>
+                        <xsl:if test="company/industry">
+                            <oplli:company_industry><xsl:value-of select="company/industry"/></oplli:company_industry>
+                        </xsl:if>
+                        <xsl:if test="company/type">
+                            <oplli:company_type><xsl:value-of select="company/type"/></oplli:company_type>
+                        </xsl:if>
+                        <xsl:if test="company/size">
+                            <oplli:company_size><xsl:value-of select="company/size"/></oplli:company_size>
+                        </xsl:if>
+	                </rdf:Description>
+                </oplli:company>
+            </xsl:if>
+		</rdf:Description>
+	</xsl:template>
+
+	<xsl:template match="twitter-accounts">
+        <xsl:for-each select="twitter-account">
+		    <xsl:variable name="id" select="provider-account-id" />
+            <oplli:has_twitter_account>
+                <oplli:TwitterAccount rdf:about="{vi:proxyIRI ($baseUri, '', concat('TwitterAccount_', $id))}">
+                    <oplli:provider_account_id><xsl:value-of select="$id"/></oplli:provider_account_id>
+                    <oplli:provider_account_name><xsl:value-of select="provider-account-name"/></oplli:provider_account_name>
+                    <rdfs:label><xsl:value-of select="provider-account-name"/></rdfs:label>
+                </oplli:TwitterAccount>
+            </oplli:has_twitter_account>
+        </xsl:for-each>
+	</xsl:template>
+
+    <xsl:template name="skill">
+        <xsl:param name="skillURI"/>
+	    <rdf:Description rdf:about="{$skillURI}">
+	        <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdf:type rdf:resource="&oplli;Skill" />
+            <rdfs:label><xsl:value-of select="skill/name"/></rdfs:label>
+            <oplli:id><xsl:value-of select="id"/></oplli:id>
+            <oplli:skill_name><xsl:value-of select="skill/name" /></oplli:skill_name>
+		</rdf:Description>
+	</xsl:template>
+
+    <!-- Mappings to CV ontology -->
+
+    <xsl:template name="cv_work_history">
+        <xsl:param name="work_history_URI"/>
+	    <rdf:Description rdf:about="{$work_history_URI}">
+	        <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdf:type rdf:resource="&oplcv;WorkHistory" />
+            <rdfs:label><xsl:value-of select="title" /></rdfs:label>
+            <oplcv:jobTitle><xsl:value-of select="title" /></oplcv:jobTitle>
+            <xsl:choose>
+                <xsl:when test="contains(translate(title, $uc, $lc), 'contractor')">
+                    <oplcv:jobType rdf:resource="&oplcv;Contractor" />
+                </xsl:when>
+                <xsl:otherwise>
+                    <oplcv:jobType rdf:resource="&oplcv;Employee" />
+                </xsl:otherwise>
+            </xsl:choose>
+            <xsl:if test="is-current">
+                <oplcv:isCurrent rdf:datatype="&xsd;boolean">
+                    <xsl:value-of select="is-current" />
+                </oplcv:isCurrent>
+            </xsl:if>
+            <xsl:if test="start-date">
+                <xsl:variable name="start_year" select="start-date/year" />
+                <xsl:variable name="start_month">
+                    <xsl:choose> 
+                        <xsl:when test="start-date/month">
+                            <xsl:choose> 
+                                <xsl:when test="string-length(start-date/month) > 1">
+                                    <xsl:value-of select="start-date/month" />
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:value-of select="concat('0', start-date/month)" />
+                                </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:text>01</xsl:text>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplcv:startDate rdf:datatype="&xsd;date"><xsl:value-of select="concat($start_year,'-', $start_month, '-01')" /></oplcv:startDate>
+            </xsl:if>
+            <xsl:if test="end-date">
+                <xsl:variable name="end_year" select="end-date/year" />
+                <xsl:variable name="end_month">
+                    <xsl:choose> 
+                        <xsl:when test="end-date/month">
+                            <xsl:choose> 
+                                <xsl:when test="string-length(end-date/month) > 1">
+                                    <xsl:value-of select="end-date/month" />
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:value-of select="concat('0', end-date/month)" />
+                                </xsl:otherwise>
+                            </xsl:choose>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:text>01</xsl:text>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplcv:endDate rdf:datatype="&xsd;date"><xsl:value-of select="concat($end_year,'-', $end_month, '-01')" /></oplcv:endDate>
+            </xsl:if>
+            <xsl:if test="company">
+                <xsl:variable name="company_id">
+                    <xsl:choose>
+                        <xsl:when test="company/id">
+                            <xsl:value-of select="company/id" />
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="translate (company/name, ' ', '_')" />
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplcv:employedIn>
+    	            <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('cvCompany_', $company_id))}">
+                        <rdf:type rdf:resource="&oplcv;Company" />
+                        <rdfs:label><xsl:value-of select="company/name"/></rdfs:label>
+                        <oplcv:organization_name><xsl:value-of select="company/name"/></oplcv:organization_name>
+                        <xsl:if test="company/industry">
+                            <oplcv:industry><xsl:value-of select="company/industry"/></oplcv:industry>
+                        </xsl:if>
+	                </rdf:Description>
+                </oplcv:employedIn>
+            </xsl:if>
+		</rdf:Description>
+	</xsl:template>
+
+    <xsl:template name="cv_education">
+        <xsl:param name="education_URI"/>
+	    <rdf:Description rdf:about="{$education_URI}">
+	        <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdf:type rdf:resource="&oplcv;Education" />
+            <xsl:if test="string-length (degree)">
+                <xsl:variable name="degree_type" select="translate (translate (degree, $uc, $lc), '.', '')" />
+                <xsl:choose >
+                    <xsl:when test="contains ($degree_type, 'phd')">
+                        <oplcv:degreeType rdf:resource="&oplcv;EduDoctorate" />
+                    </xsl:when>
+                    <xsl:when test="contains ($degree_type, 'ma') or contains ($degree_type, 'msc') or contains ($degree_type, 'mphil')">
+                        <oplcv:degreeType rdf:resource="&oplcv;EduMaster" />
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <oplcv:degreeType rdf:resource="&oplcv;EduBachelor" />
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:if>
+            <xsl:if test="string-length (field-of-study)">
+                <oplcv:eduMajor><xsl:value-of select="field-of-study"/></oplcv:eduMajor>
+                <oplcv:eduDescription><xsl:value-of select="field-of-study"/></oplcv:eduDescription>
+            </xsl:if>
+            <xsl:if test="string-length (school-name)">
+                <oplcv:studiedIn>
+		            <xsl:variable name="school_name" select="translate (school-name, ' ', '_')" />
+	                <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('cvEducationalOrg_', $school_name))}">
+	                    <opl:providedBy rdf:resource="{$providedByIRI}" />
+                        <rdf:type rdf:resource="&oplcv;EducationalOrg" />
+                        <oplcv:organization_name><xsl:value-of select="school-name"/></oplcv:organization_name>
+                        <rdfs:label><xsl:value-of select="school-name"/></rdfs:label>
+	                </rdf:Description>
+                </oplcv:studiedIn>
+            </xsl:if>
+            <xsl:if test="start-date">
+                <xsl:variable name="start_year" select="start-date/year" />
+                <xsl:variable name="start_month">
+                  <xsl:choose> 
+                     <xsl:when test="start-date/month">
+                         <xsl:choose> 
+                             <xsl:when test="string-length(start-date/month) > 1">
+                                 <xsl:value-of select="start-date/month" />
+                             </xsl:when>
+                               <xsl:otherwise>
+                                 <xsl:value-of select="concat('0', start-date/month)" />
+                             </xsl:otherwise>
+                            </xsl:choose>
+                     </xsl:when>
+                     <xsl:otherwise>
+                           <xsl:text>01</xsl:text>
+                     </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <oplcv:eduStartDate rdf:datatype="&xsd;date"><xsl:value-of select="concat($start_year,'-', $start_month, '-01')" /></oplcv:eduStartDate>
+            </xsl:if>
+            <xsl:if test="end-date">
+                <xsl:variable name="end_year" select="end-date/year" />
+                   <xsl:variable name="end_month">
+                       <xsl:choose> 
+                           <xsl:when test="end-date/month">
+                               <xsl:choose> 
+                                   <xsl:when test="string-length(end-date/month) > 1">
+                                        <xsl:value-of select="end-date/month" />
+                                   </xsl:when>
+                                   <xsl:otherwise>
+                                       <xsl:value-of select="concat('0', end-date/month)" />
+                                   </xsl:otherwise>
+                               </xsl:choose>
+                           </xsl:when>
+                           <xsl:otherwise>
+                               <xsl:text>01</xsl:text>
+                           </xsl:otherwise>
+                    </xsl:choose>
+                 </xsl:variable>
+                 <oplcv:eduGradDate rdf:datatype="&xsd;date"><xsl:value-of select="concat($end_year,'-', $end_month, '-01')" /></oplcv:eduGradDate>
+           </xsl:if>
+
+            <xsl:choose>
+                <xsl:when test="string-length (school-name) and string-length (field-of-study)">
+                    <rdfs:label><xsl:value-of select="concat (field-of-study, ' : ', school-name)"/></rdfs:label>
+                </xsl:when>
+                <xsl:when test="string-length (school-name)">
+                    <rdfs:label><xsl:value-of select="school-name"/></rdfs:label>
+                </xsl:when>
+                <xsl:when test="string-length (field-of-study)">
+                    <rdfs:label><xsl:value-of select="field-of-study"/></rdfs:label>
+                </xsl:when>
+            </xsl:choose>
+		</rdf:Description>
+	</xsl:template>
+
+    <xsl:template name="cv_skill">
+        <xsl:param name="skillURI"/>
+	    <rdf:Description rdf:about="{$skillURI}">
+	        <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdf:type rdf:resource="&oplcv;Skill" />
+            <rdfs:label><xsl:value-of select="skill/name"/></rdfs:label>
+            <oplcv:skillName><xsl:value-of select="skill/name" /></oplcv:skillName>
+		</rdf:Description>
+	</xsl:template>
+
+    <xsl:template match="*|text()"/>
+    <xsl:template match="*|text()" mode="cv" />
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/linkedin_shares2rdf.xsl b/binsrc/rdf_mappers/xslt/main/linkedin_shares2rdf.xsl
new file mode 100644
index 0000000..4f4b120
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/linkedin_shares2rdf.xsl
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: linkedin_shares2rdf.xsl,v 1.1.2.9 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY oplcv "http://www.openlinksw.com/schemas/cv#">
+<!ENTITY oplli "http://www.openlinksw.com/schemas/linkedin#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdfns  "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY oplcert "http://www.openlinksw.com/schemas/cert#">
+<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
+]>
+<xsl:stylesheet
+    xmlns:bibo="&bibo;"
+    xmlns:oplcv="&oplcv;"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:foaf="&foaf;"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:oplli="&oplli;"
+    xmlns:opl="&opl;"
+    xmlns:owl="&owl;"	
+    xmlns:rdf="&rdfns;"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:sioc="&sioc;"
+    xmlns:vi="&vi;"
+    xmlns:oplcert="&oplcert;"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    version="1.0"
+	>
+
+	<xsl:param name="baseUri" />
+    <xsl:param name="li_object_type" />
+
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	<xsl:variable name="providedByIRI" select="concat ('http://www.linkedin.com', '#this')"/>
+	
+    <xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
+    <xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
+
+	<xsl:output method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no" standalone="no" indent="yes" />
+
+	<xsl:template match="/">
+	    <rdf:RDF>
+		<xsl:for-each select="/network/updates/update/update-content/person/current-share">
+		    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat ('#', id))}">
+			<rdf:type rdf:resource="&sioct;MicroblogPost"/>
+		        <dcterms:creator rdf:resource="{$resourceURL}"/>	
+			<bibo:content>
+			    <xsl:value-of select="comment"/>
+			</bibo:content>
+			<rdfs:label><xsl:value-of select="comment"/></rdfs:label>
+			<dcterms:created rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date (timestamp div 1000)"/></dcterms:created>
+		    </rdf:Description>
+		    <xsl:if test="starts-with (comment, '#X509Cert Fingerprint:')">
+			<xsl:variable name="fp"><xsl:value-of select="substring-before (substring-after (comment, '#X509Cert Fingerprint:'), ' ')"/></xsl:variable>
+			<xsl:variable name="fpn"><xsl:value-of select="translate ($fp, ':', '')"/></xsl:variable>
+			<xsl:variable name="dgst">
+			    <xsl:choose>
+				<xsl:when test="contains (comment, '#SHA1')">sha1</xsl:when>
+				<xsl:otherwise>md5</xsl:otherwise>
+			    </xsl:choose>
+			</xsl:variable>
+			<rdf:Description rdf:about="{$resourceURL}">
+			    <oplcert:hasCertificate rdf:resource="{vi:proxyIRI ($baseUri, '', $fpn)}"/>
+			</rdf:Description>
+			<oplcert:Certificate rdf:about="{vi:proxyIRI ($baseUri, '', $fpn)}">
+			    <rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+			    <oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+			    <oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+			</oplcert:Certificate>
+		    </xsl:if>
+		    <!-- x509 certificate -->
+		    <xsl:if test="comment like '%di:%?hashtag=webid%'">
+		      <xsl:variable name="di"><xsl:copy-of select="vi:di-split (comment)"/></xsl:variable>
+		      <xsl:for-each select="$di/result/di">
+			  <xsl:variable name="fp"><xsl:value-of select="hash"/></xsl:variable>
+			  <xsl:variable name="dgst"><xsl:value-of select="dgst"/></xsl:variable>
+			  <xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fp)"/></xsl:variable>
+			  <foaf:Agent rdf:about="{$resourceURL}">
+			      <oplcert:hasCertificate rdf:resource="{$ct}"/>
+			  </foaf:Agent>
+			  <oplcert:Certificate rdf:about="{$ct}">
+			      <rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+			      <oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+			      <oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+			  </oplcert:Certificate>
+		      </xsl:for-each>
+		  </xsl:if>
+		  <!-- end certificate -->
+		</xsl:for-each>
+	    </rdf:RDF>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/lt2rdf.xsl b/binsrc/rdf_mappers/xslt/main/lt2rdf.xsl
index 903f069..51dc385 100644
--- a/binsrc/rdf_mappers/xslt/main/lt2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/lt2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: lt2rdf.xsl,v 1.1.2.5 2010/09/09 16:05:47 source Exp $
+ -  $Id: lt2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -29,6 +29,7 @@
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -42,6 +43,7 @@
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:foaf="&foaf;"
   xmlns:gr="&gr;"
+  xmlns:opl="&opl;"
   xmlns:sioc="&sioc;"
   xmlns:bibo="&bibo;"
   xmlns:owl="http://www.w3.org/2002/07/owl#"
@@ -69,6 +71,13 @@
 			<owl:sameAs rdf:resource="{$docIRI}"/>
 		</rdf:Description>
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.librarything.com#this">
+                        			<foaf:name>LibraryThing</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.librarything.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&sioc;Item"/>
 			<rdf:type rdf:resource="&bibo;Book"/>
 			<rdfs:label>
@@ -111,6 +120,13 @@
 			<owl:sameAs rdf:resource="{$docIRI}"/>
 		</rdf:Description>
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.librarything.com#this">
+                        			<foaf:name>LibraryThing</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.librarything.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&foaf;Person"/>
 			<foaf:name>
 				<xsl:value-of select="/response[@stat='ok']/ltml/item/author/name"/>
diff --git a/binsrc/rdf_mappers/xslt/main/mbz2rdf.xsl b/binsrc/rdf_mappers/xslt/main/mbz2rdf.xsl
index 9f6c382..50a41eb 100644
--- a/binsrc/rdf_mappers/xslt/main/mbz2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/mbz2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mbz2rdf.xsl,v 1.1.2.7 2010/09/09 16:05:47 source Exp $
+ -  $Id: mbz2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -33,6 +33,7 @@
 <!ENTITY audio "http://purl.org/media/audio#">
 <!ENTITY media "http://purl.org/media#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -46,6 +47,7 @@
     xmlns:foaf="&foaf;"
     xmlns:mo="&mo;"
     xmlns:mmd="&mmd;"
+    xmlns:opl="&opl;"
     xmlns:dc="&dc;"
     xmlns:bibo="&bibo;"
     xmlns:audio="&audio;"
@@ -86,6 +88,13 @@
 			</xsl:choose>
 		</rdf:Description>
 		<mo:MusicGroup rdf:about="{vi:proxyIRI (concat($base,'artist/', at id, '.html'))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.musicbrainz.org#this">
+                        			<foaf:name>Musicbrainz</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.musicbrainz.org"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<xsl:variable name="sas-iri" select="vi:dbpIRI ('', translate (mmd:name, ' ', '_'))"/>
 			<xsl:if test="not starts-with ($sas-iri, '#')">
 				<owl:sameAs rdf:resource="{$sas-iri}"/>
@@ -122,6 +131,13 @@
 			</xsl:choose>
 		</rdf:Description>
 		<mo:MusicArtist rdf:about="{vi:proxyIRI (concat($base,'artist/', at id, '.html'))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.musicbrainz.org#this">
+                        			<foaf:name>Musicbrainz</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.musicbrainz.org"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<foaf:name>
 				<xsl:value-of select="mmd:name"/>
 			</foaf:name>
@@ -153,6 +169,13 @@
 			</xsl:choose>
 		</rdf:Description>
 		<rdf:Description rdf:about="{vi:proxyIRI (concat($base,'release/', at id, '.html'))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.musicbrainz.org#this">
+                        			<foaf:name>Musicbrainz</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.musicbrainz.org"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Record"/>
 			<rdf:type rdf:resource="&audio;Album"/>
 			<dc:title>
@@ -212,6 +235,13 @@
 			</xsl:choose>
 		</rdf:Description>
 		<rdf:Description rdf:about="{vi:proxyIRI (concat($base,'track/', at id, '.html'))}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.musicbrainz.org#this">
+                        			<foaf:name>Musicbrainz</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.musicbrainz.org"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Track"/>
 			<rdf:type rdf:resource="&audio;Recording"/>
 			<dc:title>
diff --git a/binsrc/rdf_mappers/xslt/main/meetup2rdf.xsl b/binsrc/rdf_mappers/xslt/main/meetup2rdf.xsl
index fb3f729..cd9c7ce 100644
--- a/binsrc/rdf_mappers/xslt/main/meetup2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/meetup2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: meetup2rdf.xsl,v 1.1.2.8 2010/04/15 18:44:51 source Exp $
+ -  $Id: meetup2rdf.xsl,v 1.1.2.11 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,7 @@
 <!ENTITY xml 'http://www.w3.org/XML/1998/namespace#'>
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY sioct "http://rdfs.org/sioc/types#">
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -34,6 +35,7 @@
 	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 	xmlns:dc="http://purl.org/dc/elements/1.1/"
 	xmlns:dcterms="http://purl.org/dc/terms/"
+	xmlns:opl="&opl;"
 	xmlns:foaf="&foaf;"
 	xmlns:sioc="&sioc;"
 	xmlns:sioct="&sioct;"
@@ -71,6 +73,13 @@
 		    <foaf:primaryTopic>
 			<xsl:if test="$what = 'events' or $what = 'comments'">
 			    <foaf:Group rdf:about="{vi:proxyIRI($base)}" >
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.meetup.com#this">
+                        			<foaf:name>Meetup</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.meetup.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 				<xsl:for-each select="item">
 				    <xsl:if test="$what = 'events'">
 					<foaf:made rdf:resource="{event_url}"/>
@@ -93,6 +102,12 @@
 		    <owl:sameAs rdf:resource="{$docIRI}"/>
 		    <foaf:primaryTopic>
 			<foaf:Group rdf:about="{vi:proxyIRI($baseUri)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.meetup.com#this">
+                        			<foaf:name>Meetup</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.meetup.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
 			    <xsl:for-each select="item">
 				<foaf:member rdf:resource="{vi:proxyIRI(link)}"/>
 			    </xsl:for-each>
@@ -104,6 +119,12 @@
 	    <xsl:for-each select="item">
 		<xsl:if test="$what = 'comments'">
 		    <rdf:Description rdf:about="{vi:proxyIRI($base, '', link)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.meetup.com#this">
+                        			<foaf:name>Meetup</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.meetup.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
 			<rdf:type rdf:resource="&sioct;Comment"/>
 			<sioc:has_container rdf:resource="{vi:proxyIRI ($base)}"/>
 			<sioc:has_creator rdf:resource="{vi:proxyIRI (link)}"/>
@@ -137,6 +158,12 @@
 		    <foaf:Document rdf:about="{event_url}">
 			<foaf:primaryTopic>
 			    <c:Vevent rdf:about="{vi:proxyIRI(event_url)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.meetup.com#this">
+                        			<foaf:name>Meetup</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.meetup.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
 				<c:dtstart>
 				    <xsl:value-of select="time"/>
 				</c:dtstart>
@@ -184,6 +211,12 @@
 		    <foaf:Document rdf:about="{$docproxyIRI}">
 			<xsl:element name="{$tp}" namespace="&foaf;">
 			    <foaf:Group rdf:about="{vi:proxyIRI(link)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.meetup.com#this">
+                        			<foaf:name>Meetup</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.meetup.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
 				<foaf:name>
 				    <xsl:value-of select="name" />
 				</foaf:name>
@@ -250,6 +283,12 @@
 			<owl:sameAs rdf:resource="{vi:docIRI (link)}"/>
 			<foaf:primaryTopic>
 			    <foaf:Person rdf:about="{vi:proxyIRI(link)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.meetup.com#this">
+                        			<foaf:name>Meetup</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.meetup.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
 				<foaf:name>
 				    <xsl:value-of select="name" />
 				</foaf:name>
diff --git a/binsrc/rdf_mappers/xslt/main/mql2rdf.xsl b/binsrc/rdf_mappers/xslt/main/mql2rdf.xsl
index d8c4ffc..4b89d45 100644
--- a/binsrc/rdf_mappers/xslt/main/mql2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/mql2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mql2rdf.xsl,v 1.1.2.3 2010/12/09 12:36:06 source Exp $
+ -  $Id: mql2rdf.xsl,v 1.1.2.5 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/mqlrdf2oplrdf.xsl b/binsrc/rdf_mappers/xslt/main/mqlrdf2oplrdf.xsl
index 832f631..e6c564b 100644
--- a/binsrc/rdf_mappers/xslt/main/mqlrdf2oplrdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/mqlrdf2oplrdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mqlrdf2oplrdf.xsl,v 1.1.2.5 2009/12/15 23:13:04 source Exp $
+ -  $Id: mqlrdf2oplrdf.xsl,v 1.1.2.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/ms_doc2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ms_doc2rdf.xsl
index 2d6c8bf..04e5ddf 100644
--- a/binsrc/rdf_mappers/xslt/main/ms_doc2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ms_doc2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ms_doc2rdf.xsl,v 1.1.2.4 2009/12/15 23:12:35 source Exp $
+ -  $Id: ms_doc2rdf.xsl,v 1.1.2.6 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/ms_document2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ms_document2rdf.xsl
index 421dab2..853e758 100644
--- a/binsrc/rdf_mappers/xslt/main/ms_document2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ms_document2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ms_document2rdf.xsl,v 1.1.2.3 2009/12/15 23:12:35 source Exp $
+ -  $Id: ms_document2rdf.xsl,v 1.1.2.5 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/ms_spreadsheet2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ms_spreadsheet2rdf.xsl
index 232acaf..a79ac6c 100644
--- a/binsrc/rdf_mappers/xslt/main/ms_spreadsheet2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ms_spreadsheet2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ms_spreadsheet2rdf.xsl,v 1.1.2.5 2010/05/18 19:28:13 source Exp $
+ -  $Id: ms_spreadsheet2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/ning2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ning2rdf.xsl
index a1b57d4..1cf2ef8 100644
--- a/binsrc/rdf_mappers/xslt/main/ning2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ning2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ning2rdf.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: ning2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/nyt_article2rdf.xsl b/binsrc/rdf_mappers/xslt/main/nyt_article2rdf.xsl
new file mode 100644
index 0000000..7cae554
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/nyt_article2rdf.xsl
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: nyt_article2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY oplnyt "http://www.openlinksw.com/schemas/nyt#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY virtrdfmec "http://www.openlinksw.com/schemas/virtrdf-meta-entity-class#">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:foaf="&foaf;"
+    xmlns:opl="&opl;"
+    xmlns:oplnyt="&oplnyt;"
+    xmlns:owl="&owl;"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:sioc="&sioc;"
+    xmlns:vi="&vi;"
+    xmlns:virtrdfmec="&virtrdfmec;"
+    xmlns:xsd="&xsd;" 
+    >
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri" />
+
+    <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+    <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+    <xsl:variable name="providedByIRI" select="concat ('http://www.nytimes.com', '#this')"/>
+
+    <xsl:template match="/results/results">
+	<rdf:RDF>
+	    <rdf:Description rdf:about="{$docproxyIRI}">
+		<rdf:type rdf:resource="&bibo;Document"/>
+		<sioc:container_of rdf:resource="{$resourceURL}"/>
+		<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+		<dcterms:subject rdf:resource="{$resourceURL}"/>
+		<xsl:if test="string-length (nytd_title) != ''">
+		    <dc:title><xsl:value-of select="nytd_title"/></dc:title>
+		</xsl:if>
+		<owl:sameAs rdf:resource="{$docIRI}"/>
+	    </rdf:Description>
+
+	    <rdf:Description rdf:about="{$resourceURL}">
+		<opl:providedBy rdf:resource="{$providedByIRI}" />
+		<rdf:type rdf:resource="&bibo;Document"/>
+		<xsl:if test="string-length (abstract) > 0">
+		    <dcterms:abstract>
+			<xsl:value-of select="abstract" />
+		    </dcterms:abstract>
+		</xsl:if>
+		<!-- title may include NYT related info, whereas nytd_title doesn't -->
+		<xsl:if test="string-length (nytd_title) != ''">
+		    <dc:title>
+			<xsl:value-of select="nytd_title"/>
+		    </dc:title>
+		</xsl:if>
+		<dc:creator>
+		    <xsl:choose>
+			<xsl:when test="starts-with (byline, 'By ')">
+			    <xsl:value-of select="substring-after (byline, 'By ')"/>
+			</xsl:when>
+			<xsl:otherwise>
+			    <xsl:value-of select="byline"/>
+			</xsl:otherwise>
+		    </xsl:choose>
+		</dc:creator>
+		<dc:description>
+		    <xsl:value-of select="concat (body, ' ...')"/>
+		</dc:description>
+		<dcterms:created rdf:datatype="&xsd;date">
+		    <xsl:value-of select="date"/>
+		</dcterms:created>
+		<oplnyt:full_article rdf:resource="{url}"/>
+		<dcterms:extent>
+		  <xsl:value-of select="concat (word_count, ' words')"/>
+		</dcterms:extent>
+		<oplnyt:fee rdf:datatype="&xsd;boolean">
+		  <xsl:value-of select="translate (fee, 'YN', '10')"/>
+		</oplnyt:fee>
+		<xsl:for-each select="dbpedia_resource_url">
+		    <foaf:focus rdf:resource="{.}"/>
+		</xsl:for-each>
+		<xsl:if test="small_image_url">
+		    <foaf:img rdf:resource="{small_image_url}"/>
+		</xsl:if>
+		<xsl:if test="nytd_section">
+		    <oplnyt:section>
+			<xsl:value-of select="nytd_section"/>
+		    </oplnyt:section>
+		</xsl:if>
+		<xsl:for-each select="nytd_des_facet">
+		    <dcterms:subject>
+			<xsl:value-of select="."/>
+		    </dcterms:subject>
+		</xsl:for-each>
+		<xsl:for-each select="nytd_per_facet">
+		    <xsl:variable name="person_name">
+			<xsl:choose>
+			    <xsl:when test="contains (., ',')">
+				<xsl:value-of select="concat (substring-after (., ', '), ' ', substring-before (., ','))"/>
+			    </xsl:when>
+			    <xsl:otherwise>
+				<xsl:value-of select="."/>
+			    </xsl:otherwise>
+			</xsl:choose>
+		    </xsl:variable>
+		    <opl:mentions>
+			<opl:NamedEntity rdf:about="{vi:proxyIRI ($baseUri,'#', translate(., ' ,.', '_'))}">
+			    <rdfs:label>
+				<xsl:value-of select="concat ('[New York Times] ', $person_name)"/>
+			    </rdfs:label>
+			    <opl:entityType rdf:resource="&virtrdfmec;Person" />
+			</opl:NamedEntity>
+		    </opl:mentions>
+		</xsl:for-each>
+		<xsl:for-each select="nytd_org_facet">
+		    <opl:mentions>
+			<opl:NamedEntity rdf:about="{vi:proxyIRI ($baseUri,'#', translate(., ' ,.', '_'))}">
+			    <rdfs:label>
+				<xsl:value-of select="concat ('[New York Times] ', .)"/>
+			    </rdfs:label>
+			    <opl:entityType rdf:resource="&virtrdfmec;Organization" />
+			</opl:NamedEntity>
+		    </opl:mentions>
+		</xsl:for-each>
+		<xsl:for-each select="nytd_geo_facet">
+		    <opl:mentions>
+			<opl:NamedEntity rdf:about="{vi:proxyIRI ($baseUri,'#', translate(., ' ,.', '_'))}">
+			    <rdfs:label>
+				<xsl:value-of select="concat ('[New York Times] ', .)"/>
+			    </rdfs:label>
+			    <opl:entityType rdf:resource="&virtrdfmec;Place" />
+			</opl:NamedEntity>
+		    </opl:mentions>
+		</xsl:for-each>
+	    </rdf:Description>
+	</rdf:RDF>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/oai2rdf.xsl b/binsrc/rdf_mappers/xslt/main/oai2rdf.xsl
index 6a3eeea..bbec331 100644
--- a/binsrc/rdf_mappers/xslt/main/oai2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/oai2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: oai2rdf.xsl,v 1.1.2.4 2009/09/23 21:37:41 source Exp $
+ -  $Id: oai2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -31,13 +31,13 @@
 ]>
 <xsl:stylesheet
     xmlns:xsl  ="http://www.w3.org/1999/XSL/Transform" version="1.0"
-    xmlns:foaf ="http://xmlns.com/foaf/0.1/"
     xmlns:rdf  ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:oai="http://www.openarchives.org/OAI/2.0/"
     xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:dcterms="&dcterms;"	
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
diff --git a/binsrc/rdf_mappers/xslt/main/odata2rdf.xsl b/binsrc/rdf_mappers/xslt/main/odata2rdf.xsl
index ea9c6b4..76ee643 100644
--- a/binsrc/rdf_mappers/xslt/main/odata2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/odata2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: odata2rdf.xsl,v 1.1.4.3 2010/06/25 11:19:15 source Exp $
+ -  $Id: odata2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/oo2rdf.xsl b/binsrc/rdf_mappers/xslt/main/oo2rdf.xsl
index 22596ae..a3bca51 100644
--- a/binsrc/rdf_mappers/xslt/main/oo2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/oo2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: oo2rdf.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: oo2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:02 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/openlibrary2rdf.xsl b/binsrc/rdf_mappers/xslt/main/openlibrary2rdf.xsl
index 003b92f..55b4f6e 100644
--- a/binsrc/rdf_mappers/xslt/main/openlibrary2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/openlibrary2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: openlibrary2rdf.xsl,v 1.1.2.5 2010/09/09 16:05:47 source Exp $
+ -  $Id: openlibrary2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,6 +27,7 @@
 <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
 <!ENTITY book "http://purl.org/NET/book/vocab#">
 ]>
@@ -41,6 +42,7 @@
   xmlns:wf="http://www.w3.org/2005/01/wf/flow#"
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:address="http://schemas.talis.com/2005/address/schema#"
+  xmlns:opl="&opl;"
   xmlns:foaf="&foaf;"
   xmlns:sioc="&sioc;"
   xmlns:bibo="&bibo;"
@@ -68,6 +70,13 @@
 		<rdf:type rdf:resource="&book;Book"/>
           </rdf:Description>
 	<bibo:Book rdf:about="{$res}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.openlibrary.org#this">
+                        			<foaf:name>OpenLibrary</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.openlibrary.org"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 	    <foaf:homepage rdf:resource="{$baseUri}"/>
 	    <xsl:apply-templates select="results/result"/>
 	</bibo:Book>
diff --git a/binsrc/rdf_mappers/xslt/main/openstreet2rdf.xsl b/binsrc/rdf_mappers/xslt/main/openstreet2rdf.xsl
index f53cb72..1cba769 100644
--- a/binsrc/rdf_mappers/xslt/main/openstreet2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/openstreet2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: openstreet2rdf.xsl,v 1.1.2.6 2010/09/09 16:05:47 source Exp $
+ -  $Id: openstreet2rdf.xsl,v 1.1.2.9 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -30,6 +30,7 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY rss "http://purl.org/rss/1.0/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
@@ -44,6 +45,7 @@
     xmlns:a="http://www.w3.org/2005/Atom"
     xmlns:sioc="&sioc;"
     xmlns:foaf="&foaf;"
+    xmlns:opl="&opl;"
     xmlns:g="http://base.google.com/ns/1.0"
     xmlns:gb="http://www.openlinksw.com/schemas/google-base#"
     xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#"
@@ -80,6 +82,13 @@
 
     <xsl:template match="osm">
 		<geo:Feature rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.openstreetmap.com#this">
+                        			<foaf:name>Openstreetmap</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.openstreetmap.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<wgs84_pos:lat>
 				<xsl:value-of select="$lat"/>
 			</wgs84_pos:lat>
diff --git a/binsrc/rdf_mappers/xslt/main/oreilly2rdf.xsl b/binsrc/rdf_mappers/xslt/main/oreilly2rdf.xsl
index 4496ff1..3964704 100644
--- a/binsrc/rdf_mappers/xslt/main/oreilly2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/oreilly2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: oreilly2rdf.xsl,v 1.1.2.13 2011/03/08 13:36:28 source Exp $
+ -  $Id: oreilly2rdf.xsl,v 1.1.2.19 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,11 +28,13 @@
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 ]>
 <xsl:stylesheet
@@ -44,6 +46,8 @@
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
     xmlns:gr="&gr;"
+    xmlns:pto="&pto;" 
+    xmlns:opl="&opl;"
     xmlns:dc="&dc;"
     xmlns:dcterms="&dcterms;"
     xmlns:owl="&owl;"
@@ -112,6 +116,13 @@
 	<gr:Offering rdf:about="{concat ($baseUri, '#', 'Offering')}">
 	-->
 	<gr:Offering rdf:about="{vi:proxyIRI ($baseUri, '', 'Offering')}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.oreilly.com#this">
+                        			<foaf:name>Oreilly</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.oreilly.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 		<sioc:has_container rdf:resource="{$docproxyIRI}"/>
 		<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 		<rdfs:label><xsl:value-of select="concat($title, ' - ', $subtitle)"/></rdfs:label>
@@ -145,6 +156,13 @@
     </gr:BusinessEntity>
 
 	<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.oreilly.com#this">
+                        			<foaf:name>Oreilly</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.oreilly.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 		<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 		<xsl:choose>
 			<xsl:when test="$category='video'">
@@ -197,12 +215,14 @@
   </xsl:template>
 
 	<xsl:template match="meta[translate (@name, $uc, $lc)='book.isbn']">
+	<xsl:if test="string-length(@content) > 0">
     	<bibo:isbn13>
 	  		<xsl:value-of select="@content"/>
       	</bibo:isbn13>
       	<dcterms:identifier>
 	  		<xsl:value-of select="@content"/>
       	</dcterms:identifier>
+	</xsl:if>
 	</xsl:template>
 
   <xsl:template match="meta[translate (@name, $uc, $lc)='book.link']">
@@ -232,9 +252,11 @@
   </xsl:template>
 
   <xsl:template match="meta[translate (@name, $uc, $lc)='ean']">
+	<xsl:if test="string-length(@content) > 0">
       <gr:hasEAN_UCC-13>
 		<xsl:value-of select="@content"/>
       </gr:hasEAN_UCC-13>
+       </xsl:if>
   </xsl:template>
 
   <xsl:template match="meta[translate (@name, $uc, $lc)='graphic']">
diff --git a/binsrc/rdf_mappers/xslt/main/ospeople2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ospeople2rdf.xsl
index a1cdd37..b4d2d12 100644
--- a/binsrc/rdf_mappers/xslt/main/ospeople2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ospeople2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ospeople2rdf.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: ospeople2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/picasa2rdf.xsl b/binsrc/rdf_mappers/xslt/main/picasa2rdf.xsl
index 83d20b1..387a4ba 100644
--- a/binsrc/rdf_mappers/xslt/main/picasa2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/picasa2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: picasa2rdf.xsl,v 1.1.2.7 2010/09/09 16:05:47 source Exp $
+ -  $Id: picasa2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -35,6 +35,7 @@
 <!ENTITY atomowl "http://atomowl.org/ontologies/atomrdf#">
 <!ENTITY content "http://purl.org/rss/1.0/modules/content/">
 <!ENTITY ff "http://api.friendfeed.com/2008/03">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY exif "http://www.w3.org/2003/12/exif/ns/">
 <!ENTITY picasa "http://schemas.google.com/photos/2007#">
@@ -50,6 +51,7 @@
   xmlns:r="http://backend.userland.com/rss2"
   xmlns="http://purl.org/rss/1.0/"
   xmlns:rss="http://purl.org/rss/1.0/"
+  xmlns:opl="&opl;"
   xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
   xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd"
   xmlns:a="http://www.w3.org/2005/Atom"
@@ -61,7 +63,6 @@
   xmlns:gb="http://www.openlinksw.com/schemas/google-base#"
   xmlns:media="http://search.yahoo.com/mrss/"
   xmlns:georss="http://www.georss.org/georss"
-  xmlns:sioc="http://rdfs.org/sioc/ns#"
   xmlns:ff="&ff;"
   xmlns:foaf="&foaf;"
   xmlns:bibo="&bibo;"
@@ -119,6 +120,13 @@
 	      </xsl:otherwise>
 	  </xsl:choose>
 	  <rdf:type rdf:resource="{$tp}"/>
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://picasaweb.google.com#this">
+                        			<foaf:name>Google Picasa</foaf:name>
+                        			<foaf:homepage rdf:resource="http://picasaweb.google.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 	  <xsl:apply-templates select="a:title|a:content|a:published|a:author|media:*"/>
 	  <xsl:for-each select="a:entry">
 	      <xsl:choose>
diff --git a/binsrc/rdf_mappers/xslt/main/plancast2rdf.xsl b/binsrc/rdf_mappers/xslt/main/plancast2rdf.xsl
new file mode 100755
index 0000000..ca34c92
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/plancast2rdf.xsl
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: plancast2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY plancast "http://www.openlinksw.com/schema/plancast#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:c="&c;"
+    xmlns:nyt="&nyt;"
+	xmlns:plancast="&plancast;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+    <xsl:param name="type" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/results">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<xsl:if test="$type='plan'">
+			<rdf:Description rdf:about="{$resourceURL}">
+				<rdf:type rdf:resource="&c;Vevent"/>
+				<opl:providedBy>
+					<foaf:Organization rdf:about="http://www.plancast.com#this">
+						<foaf:name>The Plancast</foaf:name>
+						<foaf:homepage rdf:resource="http://www.plancast.com"/>
+					</foaf:Organization>
+				</opl:providedBy>
+				<xsl:if test="string-length(what) > 0">
+					<c:summary>
+						<xsl:value-of select="what"/>
+					</c:summary>
+					<rdfs:label>
+						<xsl:value-of select="what"/>
+					</rdfs:label>
+				</xsl:if>
+				<xsl:if test="string-length(description) > 0">
+					<c:description>
+						<xsl:value-of select="description"/>
+					</c:description>
+				</xsl:if>
+				<xsl:if test="string-length(plan_url) > 0">
+					<sioc:link rdf:resource="{plan_url}" />
+				</xsl:if>
+				<xsl:if test="string-length(attendance_url) > 0">
+					<rdfs:seeAlso rdf:resource="{attendance_url}" />
+				</xsl:if>
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="plan_created_at"/>
+				</dcterms:created>
+				<c:dtstart>
+					<xsl:value-of select="when"/>
+				</c:dtstart>
+				<c:location>
+					<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', 'adr')}">
+						<foaf:name>
+							<xsl:value-of select="place/name"/>
+						</foaf:name>
+						<vcard:Street>
+							<xsl:value-of select="place/address"/>
+						</vcard:Street>
+						<geo:lat rdf:datatype="&xsd;float">
+							<xsl:value-of select="place/latitude"/>
+						</geo:lat>
+						<geo:long rdf:datatype="&xsd;float">
+							<xsl:value-of select="place/longitude"/>
+						</geo:long>
+						<rdfs:label>
+							<xsl:value-of select="place/name"/>
+						</rdfs:label>
+						<rdfs:seeAlso rdf:resource="{place/maps/iphone_plan}" />
+						<rdfs:seeAlso rdf:resource="{place/maps/detect}" />
+					</vcard:ADR>
+				</c:location>
+				<xsl:if test="string-length(external_url) > 0">
+					<rdfs:seeAlso rdf:resource="{external_url}" />
+				</xsl:if>
+				<dcterms:creator>
+					<foaf:Person rdf:about="{vi:proxyIRI ($baseUri, '', 'creator')}">
+						<rdfs:label><xsl:value-of select="attendee/name"/></rdfs:label>
+						<foaf:nick><xsl:value-of select="attendee/username"/></foaf:nick>
+						<foaf:depiction rdf:resource="{attendee/pic_square}"/>
+						<foaf:depiction rdf:resource="{attendee/pic_square_big}"/>
+						<foaf:depiction rdf:resource="{attendee/pic}"/>
+						<sioc:link rdf:resource="{concat('http://plancast.com/user/', attendee/id)}" />
+					</foaf:Person>
+				</dcterms:creator>
+				<plancast:attendance_created_at><xsl:value-of select="attendance_created_at"/></plancast:attendance_created_at>
+				<plancast:attendance_created_since><xsl:value-of select="attendance_created_since"/></plancast:attendance_created_since>
+				<plancast:text><xsl:value-of select="text"/></plancast:text>
+				<plancast:is_attending><xsl:value-of select="is_attending"/></plancast:is_attending>
+				<plancast:attendees_count><xsl:value-of select="attendees_count"/></plancast:attendees_count>
+				<plancast:comments_count><xsl:value-of select="comments_count"/></plancast:comments_count>
+				<plancast:attendance_id><xsl:value-of select="attendance_id"/></plancast:attendance_id>
+				<plancast:plan_id><xsl:value-of select="plan_id"/></plancast:plan_id>
+			</rdf:Description>
+		</xsl:if>
+		<xsl:if test="$type='user'">
+			<foaf:Person rdf:about="{$resourceURL}">
+				<rdfs:label>
+					<xsl:value-of select="name"/>
+				</rdfs:label>
+				<vcard:Locality>
+					<xsl:value-of select="location" />   
+				</vcard:Locality>
+				<foaf:depiction rdf:resource="{pic_square}"/>
+				<foaf:depiction rdf:resource="{pic_square_big}"/>
+				<foaf:depiction rdf:resource="{pic}"/>
+				<xsl:if test="string-length(bio) > 0">
+					<dc:description><xsl:value-of select="bio"/></dc:description>
+				</xsl:if>
+				<xsl:if test="string-length(url) > 0">
+					<rdfs:seeAlso rdf:resource="{url}" />
+				</xsl:if>
+				<xsl:if test="string-length(facebook_id) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://www.facebook.com/profile.php?', facebook_id)}" />
+				</xsl:if>
+				<xsl:if test="string-length(facebook_username) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://www.facebook.com/', facebook_username)}" />
+				</xsl:if>
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="created_at"/>
+				</dcterms:created>			
+				<sioc:link rdf:resource="{concat('http://plancast.com/user/', id)}" />
+				<plancast:protected><xsl:value-of select="protected"/></plancast:protected>
+				<plancast:plans_count><xsl:value-of select="plans_count"/></plancast:plans_count>
+				<plancast:subscribers_count><xsl:value-of select="subscribers_count"/></plancast:subscribers_count>
+				<plancast:subscriptions_count><xsl:value-of select="subscriptions_count"/></plancast:subscriptions_count>
+				<plancast:utc_offset><xsl:value-of select="utc_offset"/></plancast:utc_offset>
+				<plancast:syndicate_facebook><xsl:value-of select="syndicate_facebook"/></plancast:syndicate_facebook>
+				<plancast:syndicate_twitter><xsl:value-of select="syndicate_twitter"/></plancast:syndicate_twitter>
+				<plancast:subscriber><xsl:value-of select="subscriber"/></plancast:subscriber>
+				<plancast:subscription><xsl:value-of select="subscription"/></plancast:subscription>
+				<plancast:subscription_pending><xsl:value-of select="subscription_pending"/></plancast:subscription_pending>
+				<xsl:if test="string-length(twitter_username) > 0">
+					<rdfs:seeAlso rdf:resource="{concat('http://www.twitter.com/', twitter_username)}" />
+				</xsl:if>
+			</foaf:Person>
+		</xsl:if>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/pptx2rdf.xsl b/binsrc/rdf_mappers/xslt/main/pptx2rdf.xsl
index e539a62..622b594 100644
--- a/binsrc/rdf_mappers/xslt/main/pptx2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/pptx2rdf.xsl
@@ -10,6 +10,7 @@
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY content "http://purl.org/rss/1.0/modules/content/">
 <!ENTITY cp "http://schemas.openxmlformats.org/package/2006/metadata/core-properties">
 <!ENTITY ep "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
@@ -36,6 +37,7 @@
     xmlns:ep="&ep;"
     xmlns:vt="&vt;"
     xmlns:a="&a;"
+    xmlns:owl="&owl;"	
     xmlns:p="&p;"
     xmlns:r="&r;"
     >
diff --git a/binsrc/rdf_mappers/xslt/main/productwiki2rdf.xsl b/binsrc/rdf_mappers/xslt/main/productwiki2rdf.xsl
index 11bb9de..15d28f9 100755
--- a/binsrc/rdf_mappers/xslt/main/productwiki2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/productwiki2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: productwiki2rdf.xsl,v 1.1.4.3 2011/03/29 22:52:06 source Exp $
+ -  $Id: productwiki2rdf.xsl,v 1.1.4.8 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,9 @@
 <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
@@ -48,7 +50,9 @@
     xmlns:owl="&owl;"
     xmlns:dcterms="&dcterms;"
     xmlns:gr="&gr;"
+    xmlns:pto="&pto;" 
     xmlns:oplamz="&oplamz;"	
+    xmlns:opl="&opl;"
     xmlns:bestbuy="http://remix.bestbuy.com/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:cl="&cl;"
@@ -86,6 +90,13 @@
 						</gr:BusinessEntity>
 
 				<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.productwiki.com#this">
+                        			<foaf:name>Productwiki</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.productwiki.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 					<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 					<rdf:type rdf:resource="&oplbb;Product" />
 				   <xsl:apply-templates select="//product[1]" />
diff --git a/binsrc/rdf_mappers/xslt/main/programmableweb2rdf.xsl b/binsrc/rdf_mappers/xslt/main/programmableweb2rdf.xsl
new file mode 100644
index 0000000..4ee28ba
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/programmableweb2rdf.xsl
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: programmableweb2rdf.xsl,v 1.1.4.6 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:c="&c;"
+	xmlns:pw="http://www.programmableweb.com/api/opensearch/1.0/"
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/feed">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<xsl:apply-templates select="entry[1]/content/pw:api|entry[1]/content/pw:mashup"/>
+	</xsl:template>
+    
+	<xsl:template match="entry/content/pw:api|entry/content/pw:mashup">
+		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.programmableweb.com#this">
+                        			<foaf:name>Programmableweb</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.programmableweb.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+			<rdf:type rdf:resource="&foaf;Project" />
+			<rdf:type rdf:resource="http://sw.opencyc.org/concept/Mx4rvyfkVpwpEbGdrcN5Y29ycA"/>
+			<xsl:if test="string-length(name) > 0">
+				<foaf:name>
+					<xsl:value-of select="name" />
+				</foaf:name>
+				<dc:title>
+					<xsl:value-of select="name" />
+				</dc:title>
+			</xsl:if>
+			<xsl:if test="string-length(label) > 0">
+				<rdfs:label>
+					<xsl:value-of select="label"/>
+				</rdfs:label>
+			</xsl:if>
+			<xsl:for-each select="link">
+				<rdfs:seeAlso rdf:resource="{@href}" />
+			</xsl:for-each>
+			<xsl:if test="string-length(description) > 0">
+				<dc:description>
+					<xsl:value-of select="description"/>
+				</dc:description>
+			</xsl:if>
+			<xsl:if test="string-length(../../summary) > 0">
+				<dc:description>
+					<xsl:value-of select="../../summary"/>
+				</dc:description>
+			</xsl:if>
+			<xsl:if test="string-length(icon) > 0">
+				<foaf:depiction rdf:resource="{icon}" />
+			</xsl:if>
+			<xsl:if test="string-length(favicon) > 0">
+				<foaf:depiction rdf:resource="{favicon}" />
+			</xsl:if>
+			<xsl:if test="string-length(dateModified) > 0">
+				<dcterms:created rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="dateModified" />
+				</dcterms:created>
+			</xsl:if>
+			<xsl:if test="string-length(sampleUrl) > 0">
+				<rdfs:seeAlso rdf:resource="{sampleUrl}" />
+			</xsl:if>
+			<xsl:if test="string-length(commentsUrl) > 0">
+				<rdfs:seeAlso rdf:resource="{commentsUrl}" />
+			</xsl:if>
+			<xsl:if test="string-length(downloadUrl) > 0">
+				<rdfs:seeAlso rdf:resource="{downloadUrl}" />
+			</xsl:if>
+			<xsl:if test="string-length(provider) > 0">
+				<opl:providedBy rdf:resource="{provider}" />
+			</xsl:if>
+			<xsl:if test="string-length(category) > 0">
+				<pw:category>
+					<xsl:value-of select="category" />
+				</pw:category>
+			</xsl:if>
+			<xsl:if test="string-length(protocols) > 0">
+				<pw:protocols>
+					<xsl:value-of select="protocols" />
+				</pw:protocols>
+			</xsl:if>
+			<xsl:if test="string-length(serviceEndpoint) > 0">
+				<pw:serviceEndpoint>
+					<xsl:value-of select="serviceEndpoint" />
+				</pw:serviceEndpoint>
+			</xsl:if>
+			<xsl:if test="string-length(version) > 0">
+				<pw:version>
+					<xsl:value-of select="version" />
+				</pw:version>
+			</xsl:if>
+			<xsl:if test="string-length(wsdl) > 0">
+				<pw:wsdl>
+					<xsl:value-of select="wsdl" />
+				</pw:wsdl>
+			</xsl:if>
+			<xsl:if test="string-length(dataFormats) > 0">
+				<pw:dataFormats>
+					<xsl:value-of select="dataFormats" />
+				</pw:dataFormats>
+			</xsl:if>
+			<xsl:if test="string-length(apigroups) > 0">
+				<pw:apigroups>
+					<xsl:value-of select="apigroups" />
+				</pw:apigroups>
+			</xsl:if>
+			<xsl:if test="string-length(company) > 0">
+				<pw:company>
+					<xsl:value-of select="company" />
+				</pw:company>
+			</xsl:if>
+			<xsl:if test="string-length(rating) > 0">
+				<pw:rating>
+					<xsl:value-of select="rating" />
+				</pw:rating>
+			</xsl:if>
+
+			<xsl:if test="string-length(package) > 0">
+				<pw:package>
+					<xsl:value-of select="package" />
+				</pw:package>
+			</xsl:if>
+			<xsl:if test="string-length(author) > 0">
+				<pw:author>
+					<xsl:value-of select="author" />
+				</pw:author>
+			</xsl:if>
+			<xsl:if test="string-length(type) > 0">
+				<pw:type>
+					<xsl:value-of select="type" />
+				</pw:type>
+			</xsl:if>
+			<xsl:if test="string-length(downloads) > 0">
+				<pw:downloads>
+					<xsl:value-of select="downloads" />
+				</pw:downloads>
+			</xsl:if>
+			<xsl:if test="string-length(useCount) > 0">
+				<pw:useCount>
+					<xsl:value-of select="useCount" />
+				</pw:useCount>
+			</xsl:if>
+			<xsl:if test="string-length(remoteFeed) > 0">
+				<pw:remoteFeed>
+					<xsl:value-of select="remoteFeed" />
+				</pw:remoteFeed>
+			</xsl:if>
+			<xsl:if test="string-length(numComments) > 0">
+				<pw:numComments>
+					<xsl:value-of select="numComments" />
+				</pw:numComments>
+			</xsl:if>
+			<xsl:if test="string-length(example) > 0">
+				<pw:example>
+					<xsl:value-of select="example" />
+				</pw:example>
+			</xsl:if>
+			<xsl:if test="string-length(clientInstall) > 0">
+				<pw:clientInstall>
+					<xsl:value-of select="clientInstall" />
+				</pw:clientInstall>
+			</xsl:if>
+			<xsl:if test="string-length(authentication) > 0">
+				<pw:authentication>
+					<xsl:value-of select="authentication" />
+				</pw:authentication>
+			</xsl:if>
+
+			<xsl:if test="string-length(ssl) > 0">
+				<pw:ssl>
+					<xsl:value-of select="ssl" />
+				</pw:ssl>
+			</xsl:if>
+			<xsl:if test="string-length(readonly) > 0">
+				<pw:readonly>
+					<xsl:value-of select="readonly" />
+				</pw:readonly>
+			</xsl:if>
+			<xsl:if test="string-length(VendorApiKits) > 0">
+				<pw:VendorApiKits>
+					<xsl:value-of select="VendorApiKits" />
+				</pw:VendorApiKits>
+			</xsl:if>
+			<xsl:if test="string-length(CommunityApiKits) > 0">
+				<pw:CommunityApiKits>
+					<xsl:value-of select="CommunityApiKits" />
+				</pw:CommunityApiKits>
+			</xsl:if>
+			<xsl:if test="string-length(blog) > 0">
+				<pw:blog>
+					<xsl:value-of select="blog" />
+				</pw:blog>
+			</xsl:if>
+			<xsl:if test="string-length(forum) > 0">
+				<pw:forum>
+					<xsl:value-of select="forum" />
+				</pw:forum>
+			</xsl:if>
+			<xsl:if test="string-length(support) > 0">
+				<pw:support>
+					<xsl:value-of select="support" />
+				</pw:support>
+			</xsl:if>
+			<xsl:if test="string-length(accountReq) > 0">
+				<pw:accountReq>
+					<xsl:value-of select="accountReq" />
+				</pw:accountReq>
+			</xsl:if>
+			<xsl:if test="string-length(commercial) > 0">
+				<pw:commercial>
+					<xsl:value-of select="commercial" />
+				</pw:commercial>
+			</xsl:if>
+			<xsl:if test="string-length(managedBy) > 0">
+				<pw:managedBy>
+					<xsl:value-of select="managedBy" />
+				</pw:managedBy>
+			</xsl:if>
+
+			<xsl:if test="string-length(nonCommercial) > 0">
+				<pw:nonCommercial>
+					<xsl:value-of select="nonCommercial" />
+				</pw:nonCommercial>
+			</xsl:if>
+			<xsl:if test="string-length(dataLicensing) > 0">
+				<pw:dataLicensing>
+					<xsl:value-of select="dataLicensing" />
+				</pw:dataLicensing>
+			</xsl:if>
+			<xsl:if test="string-length(fees) > 0">
+				<pw:fees>
+					<xsl:value-of select="fees" />
+				</pw:fees>
+			</xsl:if>
+			<xsl:if test="string-length(limits) > 0">
+				<pw:limits>
+					<xsl:value-of select="limits" />
+				</pw:limits>
+			</xsl:if>
+			<xsl:if test="string-length(terms) > 0">
+				<pw:terms>
+					<xsl:value-of select="terms" />
+				</pw:terms>
+			</xsl:if>
+			<xsl:for-each select="tags/tag">
+				<xsl:choose>
+					<xsl:when test="string-length(name) > 0">
+						<pw:tag>
+							<xsl:value-of select="name" />
+						</pw:tag>
+					</xsl:when>
+					<xsl:otherwise>
+						<pw:tag>
+							<xsl:value-of select="." />
+						</pw:tag>
+					</xsl:otherwise>
+				</xsl:choose>
+				<xsl:if test="string-length(url) > 0">
+					<sioc:topic rdf:resource="{url}"/>				
+				</xsl:if>
+			</xsl:for-each>
+		</rdf:Description>
+	</xsl:template>
+	
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/radiopop2rdf.xsl b/binsrc/rdf_mappers/xslt/main/radiopop2rdf.xsl
index ffc1bfd..f595d6e 100644
--- a/binsrc/rdf_mappers/xslt/main/radiopop2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/radiopop2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: radiopop2rdf.xsl,v 1.1.2.5 2009/09/23 21:37:41 source Exp $
+ -  $Id: radiopop2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/rdf_wo_grddl.xsl b/binsrc/rdf_mappers/xslt/main/rdf_wo_grddl.xsl
index 2787e94..a652e04 100644
--- a/binsrc/rdf_mappers/xslt/main/rdf_wo_grddl.xsl
+++ b/binsrc/rdf_mappers/xslt/main/rdf_wo_grddl.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_wo_grddl.xsl,v 1.1.2.2 2009/08/27 15:09:12 source Exp $
+ -  $Id: rdf_wo_grddl.xsl,v 1.1.2.4 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/rdfa2rdfxml.xsl b/binsrc/rdf_mappers/xslt/main/rdfa2rdfxml.xsl
index 77199c0..a9f685c 100644
--- a/binsrc/rdf_mappers/xslt/main/rdfa2rdfxml.xsl
+++ b/binsrc/rdf_mappers/xslt/main/rdfa2rdfxml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdfa2rdfxml.xsl,v 1.1.2.4 2009/12/15 23:13:04 source Exp $
+ -  $Id: rdfa2rdfxml.xsl,v 1.1.2.6 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/revyu2rdf.xsl b/binsrc/rdf_mappers/xslt/main/revyu2rdf.xsl
index 6824d52..605e829 100644
--- a/binsrc/rdf_mappers/xslt/main/revyu2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/revyu2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: revyu2rdf.xsl,v 1.1.2.2 2009/12/24 13:53:31 source Exp $
+ -  $Id: revyu2rdf.xsl,v 1.1.2.4 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -74,6 +74,13 @@
 	    <dc:title><xsl:value-of select="$baseUri"/></dc:title>
 	</rdf:Description>
         <rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://revyu.com#this">
+                        			<foaf:name>Revyu.com</foaf:name>
+                        			<foaf:homepage rdf:resource="http://revyu.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 	    <rdf:type rdf:resource="&foaf;Person" />
             <sioc:has_container rdf:resource="{$docproxyIRI}"/>
 	    <xsl:for-each select="foaf:made">
diff --git a/binsrc/rdf_mappers/xslt/main/rhapsody2rdf.xsl b/binsrc/rdf_mappers/xslt/main/rhapsody2rdf.xsl
index 9a034e3..14a3000 100644
--- a/binsrc/rdf_mappers/xslt/main/rhapsody2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/rhapsody2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rhapsody2rdf.xsl,v 1.1.2.4 2011/03/25 17:10:59 source Exp $
+ -  $Id: rhapsody2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,8 @@
 <!ENTITY mo "http://purl.org/ontology/mo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY mmd "http://musicbrainz.org/ns/mmd-1.0#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY atom "http://atomowl.org/ontologies/atomrdf#">
 <!ENTITY audio "http://purl.org/media/audio#">
@@ -40,6 +42,8 @@
     xmlns:rdf="&rdf;"
     xmlns:rdfs="&rdfs;"
     xmlns:foaf="&foaf;"
+    xmlns:opl="&opl;"
+    xmlns:dcterms="&dcterms;"
     xmlns:mo="&mo;"
     xmlns:mmd="&mmd;"
     xmlns:atom="&atom;"
@@ -62,6 +66,13 @@
 
     <xsl:template match="artist">
 		<mo:MusicArtist rdf:about="{html-href}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.rhapsody.com#this">
+                        			<foaf:name>Rhapsody</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.rhapsody.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<foaf:name>
 				<xsl:value-of select="@name"/>
 			</foaf:name>
@@ -140,6 +151,13 @@
 
     <xsl:template match="album">
 		<rdf:Description rdf:about="{html-href}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.rhapsody.com#this">
+                        			<foaf:name>Rhapsody</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.rhapsody.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Record"/>
 			<rdf:type rdf:resource="&audio;Album"/>
     		<dc:title>
@@ -198,6 +216,13 @@
 
 	<xsl:template match="track">
 		<rdf:Description rdf:about="{concat('http://www.rhapsody.com/goto?rcid=', @rcid)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.rhapsody.com#this">
+                        			<foaf:name>Rhapsody</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.rhapsody.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&mo;Track"/>
 			<rdf:type rdf:resource="&audio;Recording"/>
 			<dc:title>
@@ -213,6 +238,13 @@
 
     <xsl:template match="genre">
 		<mo:Genre rdf:about="{html-href}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.rhapsody.com#this">
+                        			<foaf:name>Rhapsody</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.rhapsody.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<dc:title>
                 <xsl:value-of select="@name"/>
             </dc:title>
diff --git a/binsrc/rdf_mappers/xslt/main/rss2rdf.xsl b/binsrc/rdf_mappers/xslt/main/rss2rdf.xsl
index 43cce2c..ed2cd9e 100644
--- a/binsrc/rdf_mappers/xslt/main/rss2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/rss2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rss2rdf.xsl,v 1.1.2.5 2010/09/09 16:05:47 source Exp $
+ -  $Id: rss2rdf.xsl,v 1.1.2.9 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,13 +26,14 @@
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
+  xmlns:dcterms="http://purl.org/dc/terms"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:r="http://backend.userland.com/rss2"
   xmlns="http://purl.org/rss/1.0/"
   xmlns:rss="http://purl.org/rss/1.0/"
-  xmlns:vi="http://www.openlinksw.com/weblog/"
+  xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
   xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd"
   xmlns:a="http://www.w3.org/2005/Atom"
   xmlns:enc="http://purl.oclc.org/net/rss_2.0/enc#"
@@ -46,6 +47,7 @@
 
 <xsl:output indent="yes" cdata-section-elements="content:encoded" />
 
+    <xsl:param name="baseUri" />
 
 <!-- general element conversions -->
 
@@ -218,7 +220,14 @@
 <xsl:template match="item|r:item" mode="li">
   <xsl:choose>
     <xsl:when test="link|r:link">
+	<xsl:choose>
+		<xsl:when test="starts-with(link|r:link, '(u')">
+			<rdf:li rdf:resource="{vi:proxyIRI ($baseUri, '', substring-after(link|r:link, ')'))}" />
+                </xsl:when>
+                <xsl:otherwise>
       <rdf:li rdf:resource="{link|r:link}" />
+		</xsl:otherwise>
+        </xsl:choose>
     </xsl:when>
     <xsl:when test="guid|r:guid">
       <rdf:li rdf:resource="{guid|r:guid}" />
@@ -232,9 +241,19 @@
 </xsl:template>
 
 <xsl:template match="item[link]|r:item[r:link]" mode="rdfitem">
+	<xsl:choose>
+		<xsl:when test="starts-with(link|r:link, '(u')">
+                        <item rdf:about="{vi:proxyIRI ($baseUri, '', substring-after(link|r:link, ')'))}">
+                            <xsl:apply-templates/>
+                        </item>
+                </xsl:when>
+                <xsl:otherwise>
   <item rdf:about="{link|r:link}">
     <xsl:apply-templates/>
   </item>
+		</xsl:otherwise>
+        </xsl:choose>
+
 </xsl:template>
 
 <xsl:template match="item[guid][not(link)]|r:item[r:guid][not(r:link)]" mode="rdfitem">
diff --git a/binsrc/rdf_mappers/xslt/main/seatgeek2rdf.xsl b/binsrc/rdf_mappers/xslt/main/seatgeek2rdf.xsl
new file mode 100644
index 0000000..ae480f4
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/seatgeek2rdf.xsl
@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: seatgeek2rdf.xsl,v 1.1.4.3 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY tio "http://purl.org/tio/ns#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:c="&c;"	
+    xmlns:gr="&gr;"	
+    xmlns:tio="&tio;"	
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+    xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+
+	<xsl:param name="baseUri" />
+
+	<xsl:output method="xml" indent="yes" />
+
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/teamband">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title>
+				<xsl:value-of select="$baseUri"/>
+			</dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<rdf:Description rdf:about="{$resourceURL}">
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+					<foaf:name>Seatgeek</foaf:name>
+					<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
+			<rdf:type rdf:resource="&c;Vcalendar"/>
+			<dc:title>
+				<xsl:value-of select="name"/>
+			</dc:title>
+			<rdfs:label>
+				<xsl:value-of select="name"/>
+			</rdfs:label>
+			<xsl:if test="string-length(url) > 0">
+				<sioc:link rdf:resource="{url}" />
+			</xsl:if>
+			<xsl:for-each select="events/event">
+				<c:component>
+					<c:Vevent rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
+						<opl:providedBy>
+							<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+								<foaf:name>Seatgeek</foaf:name>
+								<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+							</foaf:Organization>
+						</opl:providedBy>					
+						<xsl:if test="string-length(title) > 0">
+							<c:summary>
+								<xsl:value-of select="title"/>
+							</c:summary>
+							<rdfs:label>
+								<xsl:value-of select="title"/>
+							</rdfs:label>
+						</xsl:if>
+						<xsl:if test="string-length(short_title) > 0">
+							<c:description>
+								<xsl:value-of select="short_title"/>
+							</c:description>
+						</xsl:if>
+						<xsl:if test="string-length(url) > 0">
+							<sioc:link rdf:resource="{url}" />
+						</xsl:if>
+						<xsl:if test="string-length(image_url) > 0">
+							<foaf:depiction rdf:resource="{image_url}" />
+						</xsl:if>
+						<dcterms:created rdf:datatype="&xsd;dateTime">
+							<xsl:value-of select="created_at"/>
+						</dcterms:created>
+						<dcterms:modified rdf:datatype="&xsd;dateTime">
+							<xsl:value-of select="updated_at"/>
+						</dcterms:modified>
+						<c:dtstart>
+							<xsl:value-of select="datetime"/>
+						</c:dtstart>
+						<c:location>
+							<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', concat('adr_', id))}">
+								<opl:providedBy>
+									<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+										<foaf:name>Seatgeek</foaf:name>
+										<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+									</foaf:Organization>
+								</opl:providedBy>							
+								<foaf:name>
+									<xsl:value-of select="venue_name"/>
+								</foaf:name>
+								<vcard:Street>
+									<xsl:value-of select="venue_address"/>
+								</vcard:Street>
+								<geo:lat rdf:datatype="&xsd;float">
+									<xsl:value-of select="latitude"/>
+								</geo:lat>
+								<geo:long rdf:datatype="&xsd;float">
+									<xsl:value-of select="longitude"/>
+								</geo:long>
+								<rdfs:label>
+									<xsl:value-of select="venue_name"/>
+								</rdfs:label>
+								<xsl:if test="string-length(venue_location) > 0">
+									<vcard:Locality>
+										<xsl:value-of select="venue_location" />   
+									</vcard:Locality>
+								</xsl:if>
+							</vcard:ADR>
+						</c:location>
+						<xsl:if test="string-length(lowest_price) > 0">
+							<foaf:topic>
+								<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('lowest_ticket_offer_', id))}">
+									<rdf:type rdf:resource="&gr;Offering" />
+									<opl:providedBy>
+										<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+											<foaf:name>Seatgeek</foaf:name>
+											<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+										</foaf:Organization>
+									</opl:providedBy>
+									<gr:name>
+										<xsl:value-of select="concat('Lowest Price Offer to ', title)"/>	
+									</gr:name>
+									<rdfs:label>
+										<xsl:value-of select="concat('Lowest Price Offer to ', title)"/>	
+									</rdfs:label>									
+									<gr:description>
+										<xsl:value-of select="concat('Lowest Price Offer to ', short_title)"/>	
+									</gr:description>
+									<gr:includes>
+										<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('lowest_ticket_', id))}">
+											<opl:providedBy>
+												<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+													<foaf:name>Seatgeek</foaf:name>
+													<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+												</foaf:Organization>
+											</opl:providedBy>
+											<rdf:type rdf:resource="&tio;Ticket" />
+											<rdfs:label>
+												<xsl:value-of select="concat('Lowest Price Ticket to ', title)"/>	
+											</rdfs:label>
+											<dc:title>
+												<xsl:value-of select="concat('Lowest Price Ticket to ', title)"/>
+											</dc:title>
+											<tio:accessTo rdf:resource="{vi:proxyIRI ($baseUri, '', id)}"/>
+										</rdf:Description>
+									</gr:includes>									
+									<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+									<gr:hasPriceSpecification>
+										<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('lowest_price_', id))}">
+											<rdfs:label>
+												<xsl:value-of select="concat(lowest_price, ' (USD)')"/>	
+											</rdfs:label>
+											<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>	
+											<gr:hasCurrencyValue rdf:datatype="&xsd;float">
+												<xsl:value-of select="lowest_price"/>
+											</gr:hasCurrencyValue>
+											<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+											<gr:priceType rdf:datatype="&xsd;string">Lowest Price</gr:priceType>
+										</gr:UnitPriceSpecification>
+									</gr:hasPriceSpecification>
+								</rdf:Description>
+							</foaf:topic>
+						</xsl:if>
+						<xsl:if test="string-length(average_price) > 0">
+							<foaf:topic>
+								<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('average_ticket_offer_', id))}">
+									<rdf:type rdf:resource="&gr;Offering" />
+									<opl:providedBy>
+										<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+											<foaf:name>Seatgeek</foaf:name>
+											<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+										</foaf:Organization>
+									</opl:providedBy>
+									<gr:name>
+										<xsl:value-of select="concat('Average Price Offer to ', title)"/>	
+									</gr:name>
+									<rdfs:label>
+										<xsl:value-of select="concat('Average Price Offer to ', title)"/>	
+									</rdfs:label>									
+									<gr:description>
+										<xsl:value-of select="concat('Average Price Offer to ', short_title)"/>	
+									</gr:description>
+									<gr:includes>
+										<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('average_ticket_', id))}">
+											<opl:providedBy>
+												<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+													<foaf:name>Seatgeek</foaf:name>
+													<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+												</foaf:Organization>
+											</opl:providedBy>
+											<rdf:type rdf:resource="&tio;Ticket" />
+											<rdfs:label>
+												<xsl:value-of select="concat('Average Price Ticket to ', title)"/>	
+											</rdfs:label>
+											<dc:title>
+												<xsl:value-of select="concat('Average Price Ticket to ', title)"/>
+											</dc:title>
+											<tio:accessTo rdf:resource="{vi:proxyIRI ($baseUri, '', id)}"/>
+										</rdf:Description>
+									</gr:includes>									
+									<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+									<gr:hasPriceSpecification>
+										<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('average_price_', id))}">
+											<rdfs:label>
+												<xsl:value-of select="concat(average_price, ' (USD)')"/>	
+											</rdfs:label>
+											<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>	
+											<gr:hasCurrencyValue rdf:datatype="&xsd;float">
+												<xsl:value-of select="average_price"/>
+											</gr:hasCurrencyValue>
+											<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+											<gr:priceType rdf:datatype="&xsd;string">Average Price</gr:priceType>
+										</gr:UnitPriceSpecification>
+									</gr:hasPriceSpecification>
+								</rdf:Description>
+							</foaf:topic>
+						</xsl:if>
+						<xsl:if test="string-length(highest_price) > 0">
+							<foaf:topic>
+								<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('highest_ticket_offer_', id))}">
+									<rdf:type rdf:resource="&gr;Offering" />
+									<opl:providedBy>
+										<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+											<foaf:name>Seatgeek</foaf:name>
+											<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+										</foaf:Organization>
+									</opl:providedBy>
+									<gr:name>
+										<xsl:value-of select="concat('Highest Price Offer to ', title)"/>	
+									</gr:name>
+									<rdfs:label>
+										<xsl:value-of select="concat('Highest Price Offer to ', title)"/>	
+									</rdfs:label>									
+									<gr:description>
+										<xsl:value-of select="concat('Highest Price Offer to ', short_title)"/>	
+									</gr:description>
+									<gr:includes>
+										<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat('highest_ticket_', id))}">
+											<opl:providedBy>
+												<foaf:Organization rdf:about="http://www.seatgeek.com#this">
+													<foaf:name>Seatgeek</foaf:name>
+													<foaf:homepage rdf:resource="http://www.seatgeek.com"/>
+												</foaf:Organization>
+											</opl:providedBy>
+											<rdf:type rdf:resource="&tio;Ticket" />
+											<rdfs:label>
+												<xsl:value-of select="concat('Highest Price Ticket to ', title)"/>	
+											</rdfs:label>
+											<dc:title>
+												<xsl:value-of select="concat('Highest Price Ticket to ', title)"/>
+											</dc:title>
+											<tio:accessTo rdf:resource="{vi:proxyIRI ($baseUri, '', id)}"/>
+										</rdf:Description>
+									</gr:includes>									
+									<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+									<gr:hasPriceSpecification>
+										<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('highest_price_', id))}">
+											<rdfs:label>
+												<xsl:value-of select="concat(highest_price, ' (USD)')"/>	
+											</rdfs:label>
+											<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>	
+											<gr:hasCurrencyValue rdf:datatype="&xsd;float">
+												<xsl:value-of select="highest_price"/>
+											</gr:hasCurrencyValue>
+											<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+											<gr:priceType rdf:datatype="&xsd;string">Highest Price</gr:priceType>
+										</gr:UnitPriceSpecification>
+									</gr:hasPriceSpecification>
+								</rdf:Description>
+							</foaf:topic>
+						</xsl:if>
+					</c:Vevent>
+				</c:component>
+			</xsl:for-each>
+		</rdf:Description>
+	</xsl:template>
+
+	<xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/seevl2rdf.xsl b/binsrc/rdf_mappers/xslt/main/seevl2rdf.xsl
new file mode 100644
index 0000000..ea43c25
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/seevl2rdf.xsl
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: seevl2rdf.xsl,v 1.1.4.5 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY oplseevl "http://www.openlinksw.com/schemas/seevl#">
+<!ENTITY mo "http://purl.org/ontology/mo/">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:rdf="&rdf;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:mo="&mo;"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:opl="&opl;"
+    xmlns:sioc="&sioc;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:gr="&gr;"
+    xmlns:oplseevl="&oplseevl;"
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:etsy="http://www.etsy.com/">
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri"/>
+	<xsl:param name="method"/>
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:template match="/results">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<rdf:Description rdf:about="{$resourceURL}">
+				<rdf:type rdf:resource="&bibo;Article"/>
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.seevl.com#this">
+                        			<foaf:name>Seevl</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.seevl.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
+				<xsl:if test="string-length(description/value) > 0">
+					<dc:description>
+						<xsl:value-of select="description/value"/>
+					</dc:description>
+				</xsl:if>
+				<xsl:if test="string-length(name/value) > 0">
+					<foaf:name>
+						<xsl:value-of select="name/value"/>
+					</foaf:name>
+					<rdfs:label>
+						<xsl:value-of select="name/value"/>
+					</rdfs:label>
+				</xsl:if>
+				<xsl:if test="string-length(depiction/value) > 0">
+					<mo:image rdf:resource="{depiction/value}"/>
+				</xsl:if>
+				<xsl:if test="string-length(birth_date/value) > 0">
+					<foaf:birthday>
+						<xsl:value-of select="birth_date/value"/>
+					</foaf:birthday>
+				</xsl:if>
+				<xsl:if test="string-length(death_date/value) > 0">
+					<oplseevl:deathday>
+						<xsl:value-of select="death_date/value"/>
+					</oplseevl:deathday>
+				</xsl:if>
+				<xsl:for-each select="birth_place">
+					<oplseevl:birth_place>
+						<xsl:value-of select="value"/>
+					</oplseevl:birth_place>
+				</xsl:for-each>
+				<xsl:for-each select="death_place">
+					<oplseevl:death_place>
+						<xsl:value-of select="value"/>
+					</oplseevl:death_place>
+				</xsl:for-each>
+				<xsl:if test="string-length(activity_end/value) > 0">
+					<oplseevl:activity_end>
+						<xsl:value-of select="activity_end/value"/>
+					</oplseevl:activity_end>
+				</xsl:if>
+				<xsl:if test="string-length(activity_start/value) > 0">
+					<oplseevl:activity_start>
+						<xsl:value-of select="activity_start/value"/>
+					</oplseevl:activity_start>
+				</xsl:if>
+				<xsl:for-each select="collaborated_with">
+					<oplseevl:collaborated_with rdf:resource="{uri}"/>
+				</xsl:for-each>
+				<xsl:for-each select="genre">
+					<rdf:type rdf:resource="&mo;MusicArtist"/>				
+					<mo:genre>
+						<xsl:value-of select="value"/>
+					</mo:genre>
+				</xsl:for-each>
+				<xsl:for-each select="instrument">
+					<mo:instrument>
+						<xsl:value-of select="value"/>
+					</mo:instrument>
+				</xsl:for-each>
+				<xsl:for-each select="label">
+					<mo:label>
+						<xsl:value-of select="value"/>
+					</mo:label>
+				</xsl:for-each>
+				<xsl:if test="string-length(nytimes/value) > 0">
+					<rdfs:seeAlso rdf:resource="{nytimes/value}"/>
+				</xsl:if>
+				<xsl:if test="string-length(musicbrainz/value) > 0">
+					<rdfs:seeAlso rdf:resource="{musicbrainz/value}"/>
+				</xsl:if>
+				<xsl:if test="string-length(homepage/value) > 0">
+					<rdfs:seeAlso rdf:resource="{homepage/value}"/>
+				</xsl:if>
+				<xsl:if test="string-length(wikipedia/value) > 0">
+					<rdfs:seeAlso rdf:resource="{wikipedia/value}"/>
+				</xsl:if>
+				<xsl:for-each select="related">
+					<mo:collaborated_with rdf:resource="{uri}"/>
+				</xsl:for-each>
+				<xsl:for-each select="topic">
+					<foaf:topic rdf:resource="{uri}"/>
+				</xsl:for-each>
+			</rdf:Description>
+		</rdf:RDF>
+    </xsl:template>
+
+    
+    <xsl:template match="*|text()"/>
+        
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/sf2rdf.xsl b/binsrc/rdf_mappers/xslt/main/sf2rdf.xsl
index a6d2d2f..efd2fc2 100644
--- a/binsrc/rdf_mappers/xslt/main/sf2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/sf2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sf2rdf.xsl,v 1.1.2.6 2010/09/07 21:58:41 source Exp $
+ -  $Id: sf2rdf.xsl,v 1.1.2.9 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -30,6 +30,7 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY rss "http://purl.org/rss/1.0/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
@@ -51,6 +52,7 @@
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:owl="http://www.w3.org/2002/07/owl#"
   xmlns:sioct="&sioct;"
+  xmlns:opl="&opl;"
   xmlns:sioc="&sioc;"
   xmlns:bibo="&bibo;"
   xmlns:xsd="&xsd;"
@@ -75,6 +77,13 @@
 
     <xsl:template match="sf:*">
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.salesforce.com#this">
+                        			<foaf:name>Salesforce</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.salesforce.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&sioc;Item"/>
 			<xsl:element name="{local-name()}" namespace="http://demo.openlinksw.com/schemas/ecrm#">
 				<xsl:apply-templates select="*|text()" />
diff --git a/binsrc/rdf_mappers/xslt/main/sg2rdf.xsl b/binsrc/rdf_mappers/xslt/main/sg2rdf.xsl
index 2a94739..1ddcab3 100644
--- a/binsrc/rdf_mappers/xslt/main/sg2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/sg2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sg2rdf.xsl,v 1.1.2.3 2010/12/09 12:36:06 source Exp $
+ -  $Id: sg2rdf.xsl,v 1.1.2.5 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/simplegeo2rdf.xsl b/binsrc/rdf_mappers/xslt/main/simplegeo2rdf.xsl
new file mode 100644
index 0000000..6d3cc75
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/simplegeo2rdf.xsl
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: simplegeo2rdf.xsl,v 1.1.4.3 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplsg="http://www.openlinksw.com/schemas/simplegeo#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:template match="/results/features[1]">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<rdf:Description rdf:about="{$resourceURL}">
+			<rdf:type rdf:resource="&gn;Feature"/>
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://simplegeo.com#this">
+					<foaf:name>SimpleGeo</foaf:name>
+					<foaf:homepage rdf:resource="http://simplegeo.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
+			<xsl:if test="geometry/coordinates[1]">
+				<geo:long rdf:datatype="&xsd;float">
+					<xsl:value-of select="geometry/coordinates[1]"/>
+				</geo:long>
+			</xsl:if>
+			<xsl:if test="geometry/coordinates[2]">
+				<geo:lat rdf:datatype="&xsd;float">
+					<xsl:value-of select="geometry/coordinates[2]"/>
+				</geo:lat>
+			</xsl:if>
+			<xsl:if test="string-length(id) > 0">
+				<sioc:link rdf:resource="{concat('https://simplegeo.com/', id)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(properties/province) > 0">
+				<vcard:Region rdf:resource="{vi:dbpIRI ($baseUri, properties/province)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(properties/name) > 0">
+				<dc:title>
+					<xsl:value-of select="properties/name" />
+				</dc:title>
+				<rdfs:label>
+					<xsl:value-of select="properties/name"/>
+				</rdfs:label>				
+			</xsl:if>       
+			<xsl:if test="string-length(properties/country) > 0">
+				<vcard:Country rdf:resource="{vi:dbpIRI ($baseUri, properties/country)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(properties/phone) > 0">
+				<foaf:phone rdf:resource="tel:{properties/phone}"/>
+			</xsl:if>
+			<xsl:if test="string-length(properties/href) > 0">
+				<sioc:link rdf:resource="{properties/href}"/>
+			</xsl:if>
+			<xsl:if test="string-length(properties/city) > 0">
+				<vcard:Locality rdf:resource="{vi:dbpIRI ($baseUri, properties/city)}"/>
+			</xsl:if>
+			<xsl:if test="string-length(properties/address) > 0">
+				<vcard:ADR>
+					<xsl:value-of select="properties/address" />   
+				</vcard:ADR>
+			</xsl:if>
+			<xsl:if test="string-length(properties/postcode) > 0">
+				<vcard:Pcode>
+					<xsl:value-of select="properties/postcode" />   
+				</vcard:Pcode>
+			</xsl:if>
+			<xsl:if test="string-length(properties/classifiers/category) > 0">
+				<oplsg:category>
+					<xsl:value-of select="properties/classifiers/category" />   
+				</oplsg:category>
+			</xsl:if>
+			<xsl:if test="string-length(properties/classifiers/type) > 0">
+				<oplsg:type>
+					<xsl:value-of select="properties/classifiers/type" />   
+				</oplsg:type>
+			</xsl:if>
+			<xsl:if test="string-length(properties/classifiers/subcategory) > 0">
+				<oplsg:subcategory>
+					<xsl:value-of select="properties/classifiers/subcategory" />   
+				</oplsg:subcategory>
+			</xsl:if>
+		</rdf:Description>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/slideshare2rdf.xsl b/binsrc/rdf_mappers/xslt/main/slideshare2rdf.xsl
index a214828..025a1cf 100644
--- a/binsrc/rdf_mappers/xslt/main/slideshare2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/slideshare2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: slideshare2rdf.xsl,v 1.1.2.7 2010/09/09 16:05:47 source Exp $
+ -  $Id: slideshare2rdf.xsl,v 1.1.2.12 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -31,16 +31,27 @@
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 ]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:virtrdf="http://www.openlinksw.com/schemas/XHTML#"
-	xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/" xmlns:wf="http://www.w3.org/2005/01/wf/flow#"
-	xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="&foaf;" xmlns:sioc="&sioc;" xmlns:bibo="&bibo;"
+<xsl:stylesheet 
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2004/02/skos/core#" 
+	xmlns:virtrdf="http://www.openlinksw.com/schemas/XHTML#"
+	xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/" 
+	xmlns:wf="http://www.w3.org/2005/01/wf/flow#"
+	xmlns:foaf="&foaf;" 
+	xmlns:sioc="&sioc;" 
+	xmlns:bibo="&bibo;"
 	xmlns:dcterms="&dcterms;"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"	
 	xmlns:owl="http://www.w3.org/2002/07/owl#"
 	version="1.0">
+
 	<xsl:output method="xml" indent="yes" />
+
 	<xsl:param name="baseUri" />
+
 	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
 	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
 	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
@@ -57,6 +68,13 @@
 
 	<xsl:template match="Slideshows|Tag|User|Group">
 		<bibo:Collection rdf:about="{$docproxyIRI}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.slideshare.net#this">
+                        			<foaf:name>Slideshare</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.slideshare.net"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<bibo:uri rdf:resource="{$docIRI}" />
 			<foaf:primaryTopic rdf:resource="{vi:proxyIRI($baseUri)}"/>
 			<xsl:if test="Meta/Query">
@@ -124,9 +142,16 @@
  	  </rdf:Description>
 
 		<bibo:Slideshow rdf:about="{vi:proxyIRI($res)}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.slideshare.net#this">
+                        			<foaf:name>Slideshare</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.slideshare.net"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<xsl:choose>
 				<xsl:when test="Embed">
-					<xsl:variable name="owner" select="vi:proxyIRI(concat('http://www.slideshare.net/', Owner))" />
+					<xsl:variable name="owner" select="vi:proxyIRI(concat('http://www.slideshare.net/', Username))" />
 				</xsl:when>
 				<xsl:otherwise>
 					<xsl:variable name="owner" select="vi:proxyIRI(concat('http://www.slideshare.net/', UserLogin))" />
@@ -134,7 +159,7 @@
 			</xsl:choose>
 			<xsl:choose>
 				<xsl:when test="Embed">
-					<xsl:variable name="thumbnail" select="Thumbnail" />
+					<xsl:variable name="thumbnail" select="ThumbnailURL" />
 				</xsl:when>
 				<xsl:otherwise>
 					<xsl:variable name="thumbnail" select="ThumbnailURL" />
@@ -170,30 +195,12 @@
 					</xsl:otherwise>
 				</xsl:choose>
 			</bibo:content>
-			<!--dc:content>
-				<xsl:choose>
-					<xsl:when test="Embed">
-						<xsl:value-of select="Embed" />
-					</xsl:when>
-					<xsl:otherwise>
-						<xsl:value-of select="EmbedCode" />
-					</xsl:otherwise>
-				</xsl:choose>
-			</dc:content-->
-			<!--sioc:content>
-				<xsl:choose>
-					<xsl:when test="Embed">
-						<xsl:value-of select="Embed" />
-					</xsl:when>
-					<xsl:otherwise>
-						<xsl:value-of select="EmbedCode" />
-					</xsl:otherwise>
-				</xsl:choose>
-			</sioc:content-->
-
 			<dcterms:created rdf:datatype="&xsd;dateTime">
-				<xsl:value-of select="Created" />
+				<xsl:value-of select="vi:string2date(Created)" />
 			</dcterms:created>
+			<dcterms:modified rdf:datatype="&xsd;dateTime">
+				<xsl:value-of select="vi:string2date(Updated)" />
+			</dcterms:modified>
 			<bibo:pageStart>1</bibo:pageStart>
 			<bibo:pageEnd>
 				<xsl:choose>
@@ -201,14 +208,21 @@
 						<xsl:value-of select="NumSlides" />
 					</xsl:when>
 					<xsl:otherwise>
-						<xsl:value-of select="TotalSlides" />
+						<xsl:value-of select="1" />
 					</xsl:otherwise>
 				</xsl:choose>
 			</bibo:pageEnd>
-			<!--xsl:for-each select="Tags/Tag">
-				<xsl:variable name="res" select="vi:proxyIRI(concat('http://www.slideshare.net/tag/', .))" />
-				<rdfs:seeAlso rdf:resource="{$res}" />
-			</xsl:for-each-->
+			<xsl:variable name="tags" select="vi:split-and-decode(Tags, 0, ' ')"/>
+			<xsl:for-each select="$tags/results/result">
+				<sioc:topic>
+					<skos:Concept rdf:about="{vi:dbpIRI ($baseUri, .)}" >
+						<skos:prefLabel>
+							<xsl:value-of select="."/>
+						</skos:prefLabel>
+					</skos:Concept>
+				</sioc:topic>
+				<rdfs:seeAlso rdf:resource="{vi:proxyIRI(concat('http://www.slideshare.net/tag/', .))}" />
+			</xsl:for-each>
 		</bibo:Slideshow>
 	</xsl:template>
 	<xsl:template match="*|text()" />
diff --git a/binsrc/rdf_mappers/xslt/main/slidesix2rdf.xsl b/binsrc/rdf_mappers/xslt/main/slidesix2rdf.xsl
index fa5091b..49933f6 100644
--- a/binsrc/rdf_mappers/xslt/main/slidesix2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/slidesix2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: slidesix2rdf.xsl,v 1.1.2.4 2010/09/09 16:05:47 source Exp $
+ -  $Id: slidesix2rdf.xsl,v 1.1.2.7 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,7 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 ]>
@@ -37,6 +38,7 @@
 	xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
 	xmlns:foaf="&foaf;"
 	xmlns:sioc="&sioc;"
+	xmlns:opl="&opl;"
 	xmlns:bibo="&bibo;"
 	xmlns:dcterms="&dcterms;"
 	xmlns:owl="http://www.w3.org/2002/07/owl#"
@@ -65,6 +67,13 @@
 	</xsl:template>
 	<xsl:template match="SLIDESHOWS/SLIDESHOW">
 		<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.slidesix.com#this">
+                        			<foaf:name>Slidesix</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.slidesix.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 			<rdf:type rdf:resource="&bibo;Slideshow"/>
 			<dc:title>
 				<xsl:value-of select="SLIDESHOWTITLE" />
diff --git a/binsrc/rdf_mappers/xslt/main/slidy2rdf.xsl b/binsrc/rdf_mappers/xslt/main/slidy2rdf.xsl
index fca2fea..0acc2db 100644
--- a/binsrc/rdf_mappers/xslt/main/slidy2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/slidy2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: slidy2rdf.xsl,v 1.1.2.5 2009/12/15 23:13:04 source Exp $
+ -  $Id: slidy2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,7 @@
 <!ENTITY sioct 'http://rdfs.org/sioc/types#'>
 <!ENTITY sioc 'http://rdfs.org/sioc/ns#'>
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY dc "http://purl.org/dc/elements/1.1/">
@@ -39,6 +40,7 @@
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:sioct="&sioct;"
     xmlns:sioc="&sioc;"
+    xmlns:opl="&opl;"
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:dcterms="&dcterms;"
@@ -69,6 +71,13 @@
 	    <owl:sameAs rdf:resource="{$docIRI}"/>
 	</rdf:Description>
 	<rdf:Description rdf:about="{$resourceURL}">
+                        	<opl:providedBy>
+                        		<foaf:Organization rdf:about="http://www.slidy.com#this">
+                        			<foaf:name>Slidy</foaf:name>
+                        			<foaf:homepage rdf:resource="http://www.slidy.com"/>
+                        		</foaf:Organization>
+                        	</opl:providedBy>
+
 	    <rdfs:label>
 		<xsl:value-of select="string (//html/head/title)"/>
 	    </rdfs:label>
diff --git a/binsrc/rdf_mappers/xslt/main/socialstatistics2rdf.xsl b/binsrc/rdf_mappers/xslt/main/socialstatistics2rdf.xsl
new file mode 100644
index 0000000..3d3ba74
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/socialstatistics2rdf.xsl
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: socialstatistics2rdf.xsl,v 1.1.2.2 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY rss "http://purl.org/rss/1.0/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY m "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
+<!ENTITY d "http://schemas.microsoft.com/ado/2007/08/dataservices">
+<!ENTITY oplgp "http://www.openlinksw.com/schemas/googleplus#">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:dc="&dc;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:a="http://www.w3.org/2005/Atom"
+	xmlns:cv="http://purl.org/captsolo/resume-rdf/0.2/cv#"
+    xmlns:sioc="&sioc;"
+    xmlns:bibo="&bibo;"
+    xmlns:foaf="&foaf;"
+    xmlns:g="http://base.google.com/ns/1.0"
+    xmlns:gb="http://www.openlinksw.com/schemas/google-base#"
+    xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#"
+    xmlns:batch="http://schemas.google.com/gdata/batch"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:m="&m;"
+	xmlns:opl="&opl;" 
+    xmlns:d="&d;"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"	
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+	xmlns:activity="http://activitystrea.ms/spec/1.0/" 
+	xmlns:buzz="http://schemas.google.com/buzz/2010"
+	xmlns:crosspost="http://purl.org/syndication/cross-posting" 
+	xmlns:gd="http://schemas.google.com/g/2005" 
+	xmlns:georss="http://www.georss.org/georss" 
+	xmlns:media="http://search.yahoo.com/mrss/" 
+	xmlns:poco="http://portablecontacts.net/ns/1.0" 
+	xmlns:thr="http://purl.org/syndication/thread/1.0"
+    xmlns:oplgp="&oplgp;" 
+    version="1.0">
+
+	<xsl:output method="xml" encoding="utf-8" indent="yes"/>
+	
+	<xsl:param name="baseUri" />
+	
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/results">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<dc:title>
+					<xsl:value-of select="$baseUri"/>
+				</dc:title>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<rdf:Description rdf:about="{$resourceURL}">
+				<rdf:type rdf:resource="&foaf;Person"/>
+				<rdfs:label>
+					<xsl:value-of select="user/name"/>
+				</rdfs:label>
+				<foaf:name>
+					<xsl:value-of select="user/name"/>
+				</foaf:name>
+				<!--foaf:depiction rdf:resource="{user/avatar}"/-->			
+				<dcterms:modified rdf:datatype="&xsd;dateTime">
+					<xsl:value-of select="user/lastupdated"/>
+				</dcterms:modified>
+				<foaf:gender>
+					<xsl:value-of select="user/gender"/>
+				</foaf:gender>
+				<xsl:for-each select="stats/date">
+					<oplgp:circles_updated>
+						<oplgp:circles_update>
+							<opl:providedBy>
+								<foaf:Organization rdf:about="http://socialstatistics.com#this">
+									<foaf:name>Social Statistics</foaf:name>
+									<foaf:homepage rdf:resource="http://socialstatistics.com"/>
+								</foaf:Organization>
+							</opl:providedBy>				
+							<xsl:attribute name="rdf:about">
+								<xsl:value-of select="vi:proxyIRI($baseUri, '', concat('date_', when))" />
+							</xsl:attribute>
+							<oplgp:when>
+								<xsl:value-of select="when" />
+							</oplgp:when>
+							<rdfs:label>
+								<xsl:value-of select="concat('Circles on ', when)" />
+							</rdfs:label>
+							<oplgp:friends-circles>
+								<xsl:value-of select="friends-circles"/>
+							</oplgp:friends-circles>
+							<oplgp:user-circles>
+								<xsl:value-of select="user-circles"/>
+							</oplgp:user-circles>
+						</oplgp:circles_update>
+					</oplgp:circles_updated>
+				</xsl:for-each>
+			</rdf:Description>
+		</rdf:RDF>
+	</xsl:template>
+	
+	<xsl:template match="text()" />
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/stackoverflow2rdf.xsl b/binsrc/rdf_mappers/xslt/main/stackoverflow2rdf.xsl
new file mode 100644
index 0000000..4054858
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/stackoverflow2rdf.xsl
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: stackoverflow2rdf.xsl,v 1.1.2.2 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY scot "http://scot-project.org/scot/ns#">
+<!ENTITY oplso "http://www.openlinksw.com/schemas/stackoverflow#">
+<!ENTITY oplbase "http://www.openlinksw.com/schemas/oplbase#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY awol "http://bblfish.net/work/atom-owl/2006-06-06/#">
+]>
+
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:oplso="&oplso;"
+    xmlns:opl="&opl;"
+    xmlns:awol="&awol;"
+    xmlns:oplbase="&oplbase;"
+    xmlns:gn="http://www.geonames.org/ontology#" 
+    xmlns:foaf="&foaf;"
+    xmlns:sioc="&sioc;"
+    xmlns:sioct="&sioct;"
+    xmlns:scot="&scot;"
+    version="1.0">
+    
+  <xsl:output method="xml" indent="yes"/>
+  
+  <xsl:param name="baseUri"/>
+  <xsl:param name="kind"/>
+  <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+  
+  <xsl:template match="/">
+    <rdf:RDF>
+      <rdf:Description rdf:about="{$resourceURL}">
+        <opl:providedBy rdf:resource="http://www.stackoverflow.com/#this" />
+        <xsl:choose>
+          <xsl:when test="$kind='users'">
+            <xsl:apply-templates select="/results" mode="users"/>
+          </xsl:when>
+          <xsl:when test="$kind='questions'">
+            <xsl:apply-templates select="/results" mode="questions"/>
+          </xsl:when>
+          <xsl:when test="$kind='answers'">
+            <xsl:apply-templates select="/results" mode="answers"/>
+          </xsl:when>
+        </xsl:choose>
+      </rdf:Description>
+    </rdf:RDF>
+  </xsl:template>
+  
+  <!-- Cases where kind is a User -->
+  <xsl:template match="results" mode="users">
+    <xsl:apply-templates mode="users" />
+  </xsl:template>
+  
+  <xsl:template match="items" mode="users">
+    <rdf:type rdf:resource="&sioc;User" />
+    <xsl:apply-templates mode="users" />
+  </xsl:template>
+
+  <xsl:template match="user_id" mode="users">
+    <sioc:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></sioc:id>
+  </xsl:template>
+
+  <xsl:template match="user_type" mode="users">
+    <oplso:User_type><xsl:value-of select="." /></oplso:User_type>
+  </xsl:template>
+
+  <xsl:template match="display_name" mode="users">
+    <foaf:name><xsl:value-of select="." /></foaf:name>
+    <rdfs:label><xsl:value-of select="." /></rdfs:label>
+  </xsl:template>
+
+  <xsl:template match="reputation" mode="users">
+    <oplso:reputation rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:reputation>
+  </xsl:template>
+
+  <xsl:template match="reputation_change_day" mode="users">
+    <oplso:reputation_change_day rdf:datatype="&xsd;float"><xsl:value-of select="." /></oplso:reputation_change_day>
+  </xsl:template>
+
+  <xsl:template match="reputation_change_week" mode="users">
+    <oplso:reputation_change_week rdf:datatype="&xsd;float"><xsl:value-of select="." /></oplso:reputation_change_week>
+  </xsl:template>
+
+  <xsl:template match="reputation_change_month" mode="users">
+    <oplso:reputation_change_month rdf:datatype="&xsd;float"><xsl:value-of select="." /></oplso:reputation_change_month>
+  </xsl:template>
+
+  <xsl:template match="reputation_change_year" mode="users">
+    <oplso:reputation_change_year rdf:datatype="&xsd;float"><xsl:value-of select="." /></oplso:reputation_change_year>
+  </xsl:template>
+
+  <xsl:template match="last_access_date" mode="users">
+    <sioc:last_activity_date rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date(number(.))" /></sioc:last_activity_date>
+  </xsl:template>
+
+  <xsl:template match="last_modified_date" mode="users">
+    <sioc:last_item_date rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date(number(.))" /></sioc:last_item_date>
+  </xsl:template>
+
+  <xsl:template match="is_employee" mode="users">
+    <oplso:employee rdf:datatype="&xsd;boolean">
+      <xsl:choose>
+        <xsl:when test="./text()='0'">false</xsl:when>
+        <xsl:otherwise>true</xsl:otherwise>
+      </xsl:choose>
+    </oplso:employee>
+  </xsl:template>
+
+  <xsl:template match="link" mode="users">
+    <foaf:homepage rdf:resource="{.}" />
+  </xsl:template>
+  
+  <xsl:template match="website_url" mode="users">
+    <rdfs:seeAlso rdf:resource="{.}" />
+  </xsl:template>
+
+  <xsl:template match="location" mode="users">
+    <oplso:location><xsl:value-of select="." /></oplso:location>
+  </xsl:template>
+
+  <xsl:template match="account_id" mode="users">
+    <sioc:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></sioc:id>
+  </xsl:template>
+
+  <xsl:template match="quota_remaining" mode="users">
+    <oplso:quota_remaining rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:quota_remaining>
+  </xsl:template>
+
+  <xsl:template match="quota_max" mode="users">
+    <oplso:quota_max rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:quota_max>
+  </xsl:template>
+
+  <!-- Cases where kind is a Question -->
+  <xsl:template match="results" mode="questions">
+    <xsl:apply-templates mode="questions" />
+  </xsl:template>
+  
+  <xsl:template match="items" mode="questions">
+    <rdf:type rdf:resource="&sioct;Question" />
+    <xsl:apply-templates mode="questions" />
+  </xsl:template>
+  
+  <xsl:template match="question_id" mode="questions">
+    <sioc:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></sioc:id>
+  </xsl:template>
+
+  <xsl:template match="creation_date" mode="questions">
+    <dcterms:created rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date(number(.))" /></dcterms:created>
+  </xsl:template>
+
+  <xsl:template match="last_activity_date" mode="questions">
+    <sioc:last_item_date rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date(number(.))" /></sioc:last_item_date>
+  </xsl:template>
+
+  <xsl:template match="score" mode="questions">
+    <oplso:score rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:score>
+  </xsl:template>
+
+  <xsl:template match="answer_count" mode="questions">
+    <oplso:answer_count rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:answer_count>
+  </xsl:template>
+
+  <xsl:template match="accepted_answer_id" mode="questions">
+    <oplso:accepted_answer_id rdf:resource="{vi:proxyIRI($baseUri, '', concat('Answer_', .))}" />
+  </xsl:template>
+
+  <xsl:template match="title" mode="questions">
+    <dc:title><xsl:value-of select="." /></dc:title>
+  </xsl:template>
+
+  <xsl:template match="tags" mode="questions">
+    <scot:hasTag>
+      <scot:Tag rdf:about="{vi:proxyIRI($baseUri, '', concat('Tag', position(.)))}">
+        <rdf:type rdf:resource="&scot;Tag" />
+        <rdfs:label><xsl:value-of select="." /></rdfs:label>
+        <scot:spellingVariant><xsl:value-of select="." /></scot:spellingVariant>
+      </scot:Tag>
+    </scot:hasTag>
+  </xsl:template>
+
+  <xsl:template match="body" mode="questions">
+    <awol:content><xsl:value-of select="." /></awol:content>
+  </xsl:template>
+
+  <xsl:template match="view_count" mode="questions">
+    <oplso:view_count rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:view_count>
+  </xsl:template>
+
+  <xsl:template match="owner" mode="questions">
+    <sioc:has_creator>
+      <sioc:User rdf:about="{./link}">
+        <foaf:name><xsl:value-of select="name" /></foaf:name>
+        <rdfs:label><xsl:value-of select="name" /></rdfs:label>
+        <dc:title><xsl:value-of select="name" /></dc:title>
+        <oplso:reputation rdf:datatype="&xsd;integer"><xsl:value-of select="reputation" /></oplso:reputation>
+        <sioc:link rdf:datatype="&xsd;anyURI"><xsl:value-of select="link" /></sioc:link>
+      </sioc:User>
+    </sioc:has_creator>
+  </xsl:template>
+
+  <xsl:template match="link" mode="questions">
+    <sioc:link rdf:datatype="&xsd;anyURI"><xsl:value-of select="." /></sioc:link>
+  </xsl:template>
+
+  <xsl:template match="quota_remaining" mode="questions">
+    <oplso:quota_remaining rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:quota_remaining>
+  </xsl:template>
+
+  <xsl:template match="quota_max" mode="questions">
+    <oplso:quota_max rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:quota_max>
+  </xsl:template>
+  
+  <!-- Cases where the kind is an answer -->
+  
+  <xsl:template match="results" mode="answers">
+    <xsl:apply-templates mode="answers" />
+  </xsl:template>
+  
+  <xsl:template match="items" mode="answers">
+    <sioc:has_reply>
+      <sioct:Answer rdf:about="{vi:proxyIRI($baseUri, '', concat('Answer_', ./answer_id))}">
+        <rdf:type rdf:resource="&sioct;Answer" />
+        <xsl:apply-templates mode="answers" />
+      </sioct:Answer>
+    </sioc:has_reply>
+  </xsl:template>
+
+  <xsl:template match="score" mode="answers">
+    <oplso:score rdf:datatype="&xsd;integer"><xsl:value-of select="." /></oplso:score>
+  </xsl:template>
+  
+  <xsl:template match="is_accepted" mode="answers">
+    <oplso:is_accepted rdf:datatype="&xsd;boolean"><xsl:value-of select="." /></oplso:is_accepted>
+    <xsl:if test="number(.)='1'"><rdf:type rdf:resource="&sioct;BestAnswer" /></xsl:if>
+  </xsl:template>
+  
+  <xsl:template match="answer_id" mode="answers">
+    <sioc:id rdf:datatype="&xsd;integer"><xsl:value-of select="." /></sioc:id>
+  </xsl:template>
+  
+  <xsl:template match="creation_date" mode="answers">
+    <dcterms:created rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date(number(.))" /></dcterms:created>
+  </xsl:template>
+  
+  <xsl:template match="last_activity_date" mode="answers">
+    <sioc:last_item_date rdf:datatype="&xsd;dateTime"><xsl:value-of select="vi:unix2iso-date(number(.))" /></sioc:last_item_date>
+  </xsl:template>
+  
+  <xsl:template match="body" mode="answers">
+    <awol:content><xsl:value-of select="." /></awol:content>
+  </xsl:template>
+  
+  <xsl:template match="owner" mode="answers">
+    <sioc:has_creator>
+      <sioc:User rdf:about="{./link}">
+        <foaf:name><xsl:value-of select="name" /></foaf:name>
+        <rdfs:label><xsl:value-of select="name" /></rdfs:label>
+        <dc:title><xsl:value-of select="name" /></dc:title>
+        <oplso:reputation rdf:datatype="&xsd;integer"><xsl:value-of select="reputation" /></oplso:reputation>
+        <sioc:link rdf:datatype="&xsd;anyURI"><xsl:value-of select="link" /></sioc:link>
+      </sioc:User>
+    </sioc:has_creator>
+  </xsl:template>
+
+  <xsl:template match="text()|@*"/>
+  <xsl:template match="text()|@*" mode="users" />
+  <xsl:template match="text()|@*" mode="questions" />
+  <xsl:template match="text()|@*" mode="answers" />
+
+</xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/svg2rdf.xsl b/binsrc/rdf_mappers/xslt/main/svg2rdf.xsl
index 3f50d4f..04ec837 100644
--- a/binsrc/rdf_mappers/xslt/main/svg2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/svg2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: svg2rdf.xsl,v 1.1.2.3 2010/05/10 12:20:23 source Exp $
+ -  $Id: svg2rdf.xsl,v 1.1.2.5 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2008 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/tesco2rdf.xsl b/binsrc/rdf_mappers/xslt/main/tesco2rdf.xsl
index cbf7821..6c90509 100644
--- a/binsrc/rdf_mappers/xslt/main/tesco2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/tesco2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tesco2rdf.xsl,v 1.1.2.11 2011/03/23 12:13:05 source Exp $
+ -  $Id: tesco2rdf.xsl,v 1.1.2.16 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,7 +26,9 @@
 <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
 <!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
@@ -37,9 +39,11 @@
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:rdf="&rdf;"
     xmlns:foaf="&foaf;"
+    xmlns:pto="&pto;" 
     xmlns:bibo="&bibo;"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:sioc="&sioc;"
+    xmlns:opl="&opl;"
     xmlns:dcterms="&dcterms;"
     xmlns:gr="&gr;"
     xmlns:oplbb="&oplbb;"
@@ -74,15 +78,29 @@
 				<owl:sameAs rdf:resource="{$docIRI}"/>
 			</rdf:Description>
 				<gr:Offering rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.tesco.com#this">
+                                 			<foaf:name>Tesco</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.tesco.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 					<sioc:has_container rdf:resource="{$docproxyIRI}"/>
 					<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 					<rdfs:label><xsl:value-of select="//Name"/></rdfs:label>
 					<gr:includes rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
 					<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
-                    <gr:eligibleRegions>UK</gr:eligibleRegions>
+                    <gr:eligibleRegions>US</gr:eligibleRegions>
 					<xsl:apply-templates mode="offering"/>
 				</gr:Offering>
 				<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.tesco.com#this">
+                                 			<foaf:name>Tesco</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.tesco.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 					<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 					<rdf:type rdf:resource="&oplbb;Product" />
 				<sioc:has_container rdf:resource="{$docproxyIRI}"/>
@@ -121,6 +139,7 @@
     </xsl:template>
 
     <xsl:template match="manufacturer">
+	<rdf:type rdf:resource="{concat('&pto;', .)}" />
 		<gr:hasManufacturer>
 		  <gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', 'Manufacturer')}">
 	    <rdfs:label><xsl:value-of select="concat('Manufacturer ', .)"/></rdfs:label>
diff --git a/binsrc/rdf_mappers/xslt/main/tumblr2rdf.xsl b/binsrc/rdf_mappers/xslt/main/tumblr2rdf.xsl
index 2ccb8ed..f557d84 100644
--- a/binsrc/rdf_mappers/xslt/main/tumblr2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/tumblr2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: tumblr2rdf.xsl,v 1.1.4.3 2010/12/14 12:07:57 source Exp $
+ -  $Id: tumblr2rdf.xsl,v 1.1.4.6 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,7 @@
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY sioct "http://rdfs.org/sioc/types#">
@@ -41,6 +42,7 @@
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
     xmlns:sioct="&sioct;"    
+    xmlns:opl="&opl;"
     xmlns:owl="&owl;"
     xmlns:dcterms="&dcterms;"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
@@ -68,6 +70,13 @@
 			<xsl:choose>
 				<xsl:when test="$baseUri like '%.tumblr.com/post/%'">
 					<rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.tumblr.com#this">
+                                 			<foaf:name>Tumblr</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.tumblr.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 						<rdf:type rdf:resource="&sioct;BlogPost"/>
 						<dc:title>
 							<xsl:value-of select="posts/post/@slug"/>
diff --git a/binsrc/rdf_mappers/xslt/main/twfy2rdf.xsl b/binsrc/rdf_mappers/xslt/main/twfy2rdf.xsl
index b7a8894..2001e4c 100644
--- a/binsrc/rdf_mappers/xslt/main/twfy2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/twfy2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: twfy2rdf.xsl,v 1.1.2.4 2009/09/23 21:37:41 source Exp $
+ -  $Id: twfy2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,7 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 <xsl:stylesheet
 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -42,6 +43,8 @@
 	xmlns:dcterms="http://purl.org/dc/terms/"
 	xmlns:twfy="http://www.openlinksw.com/schemas/twfy#"
 	xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:opl="&opl;"	
+	xmlns:sioc="&sioc;"
 	version="1.0">
 	<xsl:output method="xml" indent="yes" />
 	<xsl:param name="baseUri" />
@@ -63,6 +66,14 @@
 		</rdf:RDF>
 	</xsl:template>
 	<xsl:template match="twfy">
+		<rdf:Description rdf:about="{$resourceURL}">
+			<opl:providedBy>
+				<foaf:Organization rdf:about="http://www.theyworkforyou.com#this">
+					<foaf:name>They work for you</foaf:name>
+					<foaf:homepage rdf:resource="http://www.theyworkforyou.com"/>
+				</foaf:Organization>
+			</opl:providedBy>
+		</rdf:Description>
 		<xsl:choose>
 			<xsl:when test="info">
 				<xsl:apply-templates select="info" />
diff --git a/binsrc/rdf_mappers/xslt/main/twitter2rdf.xsl b/binsrc/rdf_mappers/xslt/main/twitter2rdf.xsl
index 912ea1e..5d6548d 100644
--- a/binsrc/rdf_mappers/xslt/main/twitter2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/twitter2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: twitter2rdf.xsl,v 1.1.2.8 2011/03/08 13:36:29 source Exp $
+ -  $Id: twitter2rdf.xsl,v 1.1.2.10 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/twitter_fp2rdf.xsl b/binsrc/rdf_mappers/xslt/main/twitter_fp2rdf.xsl
new file mode 100644
index 0000000..5137806
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/twitter_fp2rdf.xsl
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: twitter_fp2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY xml 'http://www.w3.org/XML/1998/namespace#'>
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY opl "http://www.openlinksw.com/schema/cert#">
+<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:foaf="&foaf;"
+	xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+	xmlns:owl="&owl;"
+	xmlns:opl="&opl;"
+	version="1.0">
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
+	<xsl:param name="baseUri" />
+	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:template match="/">
+	    <rdf:RDF>
+		<xsl:for-each select="//results[starts-with (string (text), '#X509Cert Fingerprint:')]">
+		    <xsl:variable name="fp"><xsl:value-of select="substring-before (substring-after (text, '#X509Cert Fingerprint:'), ' ')"/></xsl:variable>
+		    <xsl:variable name="dgst">
+			<xsl:choose>
+			    <xsl:when test="contains (text, '#SHA1')">sha1</xsl:when>
+			    <xsl:otherwise>md5</xsl:otherwise>
+			</xsl:choose>
+		    </xsl:variable>
+		    <rdf:Description rdf:about="{$docproxyIRI}">
+			<foaf:topic rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', from_user))}"/>
+		    </rdf:Description>
+		    <foaf:Person rdf:about="{vi:proxyIRI(concat('http://twitter.com/', from_user))}">
+			<opl:hasCertificate rdf:resource="{vi:proxyIRI ($baseUri, '', $fp)}"/>
+		    </foaf:Person>
+		    <opl:Certificate rdf:about="{vi:proxyIRI ($baseUri, '', $fp)}">
+			<opl:fingerprint><xsl:value-of select="$fp"/></opl:fingerprint>
+			<opl:fingerprint-digest><xsl:value-of select="$dgst"/></opl:fingerprint-digest>
+		    </opl:Certificate>
+		</xsl:for-each>
+	    </rdf:RDF>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/twitter_rest_api2rdf.xsl b/binsrc/rdf_mappers/xslt/main/twitter_rest_api2rdf.xsl
new file mode 100644
index 0000000..605ded5
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/twitter_rest_api2rdf.xsl
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: twitter_rest_api2rdf.xsl,v 1.1.4.11 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY a "http://www.w3.org/2005/Atom">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY twitter "http://www.openlinksw.com/schemas/twitter#">
+<!ENTITY v "http://www.w3.org/2006/vcard/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY xml 'http://www.w3.org/XML/1998/namespace#'>
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY oplcert "http://www.openlinksw.com/schemas/cert#">
+<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:a="&a;"
+    xmlns:bibo="&bibo;"
+	xmlns:dc="&dc;"
+	xmlns:dcterms="&dcterms;"
+	xmlns:foaf="&foaf;"
+    xmlns:opl="&opl;"
+	xmlns:oplcert="&oplcert;"
+    xmlns:owl="&owl;"
+	xmlns:rdf="&rdf;"
+	xmlns:rdfs= "&rdfs;"
+    xmlns:sioc="&sioc;"
+    xmlns:sioct="&sioct;"
+	xmlns:twitter="&twitter;"
+	xmlns:v="&v;"
+	xmlns:vcard="&vcard;"
+	xmlns:vi="&vi;"
+	version="1.0">
+
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
+	<xsl:param name="baseUri" />
+	<xsl:param name="what" />
+	<xsl:param name="primary_user_screen_name" />
+
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+	<xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+	<xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+	<xsl:variable name="providedByIRI" select="concat ('http://twitter.com', '#this')"/>
+
+	<xsl:template match="/">
+		<rdf:RDF>
+            <!-- Attribution resource -->
+	        <foaf:Organization rdf:about="{$providedByIRI}">
+	            <foaf:name>Twitter Inc.</foaf:name>
+	            <foaf:homepage rdf:resource="http://twitter.com"/>
+	        </foaf:Organization>
+
+  		    <xsl:choose>
+				<xsl:when test="$what = 'user'">
+                    <!-- twitter_user_url typically matches resourceURL -->
+                    <xsl:variable name="twitter_user_url" select="vi:proxyIRI(concat('http://twitter.com/', user/screen_name))" />
+					<foaf:Document rdf:about="{$docproxyIRI}">
+						<dcterms:subject rdf:resource="{$twitter_user_url}" />
+				        <sioc:container_of rdf:resource="{$twitter_user_url}"/>
+						<foaf:primaryTopic rdf:resource="{$twitter_user_url}" />
+				        <owl:sameAs rdf:resource="{$docIRI}"/>
+				        <dc:title><xsl:value-of select="user/screen_name"/></dc:title>
+					</foaf:Document>
+					<xsl:apply-templates select="user" />
+				</xsl:when>
+				<xsl:when test="$what = 'followers'">
+					<xsl:apply-templates select="users/user" />
+				</xsl:when>
+				<xsl:when test="$what = 'friends'">
+					<xsl:apply-templates select="users/user" />
+				</xsl:when>
+				<xsl:when test="$what = 'favorites'">
+					<xsl:apply-templates select="statuses/status" />
+				</xsl:when>
+				<xsl:when test="$what = 'user_timeline'">
+					<xsl:apply-templates select="statuses/status" />
+				</xsl:when>
+				<xsl:when test="$what = 'status'">
+					<xsl:apply-templates select="status" />
+				</xsl:when>
+			</xsl:choose>
+		</rdf:RDF>
+	</xsl:template>
+
+	<xsl:template match="user">
+		<xsl:if test="$what = 'followers'">
+			<rdf:Description rdf:about="{vi:proxyIRI(concat('http://twitter.com/', $primary_user_screen_name))}">
+				<twitter:followed_by rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', screen_name))}"/>
+			</rdf:Description>
+		</xsl:if>
+		<xsl:if test="$what = 'friends'">
+			<rdf:Description rdf:about="{vi:proxyIRI(concat('http://twitter.com/', $primary_user_screen_name))}">
+				<sioc:follows rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', screen_name))}"/>
+			</rdf:Description>
+		</xsl:if>
+		<xsl:call-template name="user"/>
+	</xsl:template>
+
+	<xsl:template name="user">
+        <xsl:variable name="id" select="id" />
+		<foaf:Person rdf:about="{vi:proxyIRI(concat('http://twitter.com/', screen_name))}">
+		    <rdf:type rdf:resource="&twitter;User"/>
+            <opl:providedBy rdf:resource="{$providedByIRI}" />
+            <rdfs:label><xsl:value-of select="name"/></rdfs:label>
+			<foaf:name>
+				<xsl:value-of select="name" />
+			</foaf:name>
+			<foaf:nick>
+				<xsl:value-of select="screen_name" />
+			</foaf:nick>
+			<xsl:if test="url != ''">
+				<foaf:homepage rdf:resource="{url}" />
+			</xsl:if>
+			<foaf:img rdf:resource="{profile_image_url}" />
+			<twitter:id>
+				<xsl:value-of select="id" />
+			</twitter:id>
+			<twitter:screen_name><xsl:value-of select="screen_name" /></twitter:screen_name>
+			<xsl:if test="followers_count != ''">
+				<twitter:followers_count rdf:datatype="&xsd;integer">
+					<xsl:value-of select="followers_count" />
+				</twitter:followers_count>
+			</xsl:if>
+			<xsl:if test="friends_count != ''">
+				<twitter:friends_count rdf:datatype="&xsd;integer">
+					<xsl:value-of select="friends_count" />
+				</twitter:friends_count>
+			</xsl:if>
+			<xsl:if test="favourites_count != ''">
+				<twitter:favorites_count rdf:datatype="&xsd;integer">
+					<xsl:value-of select="favourites_count" />
+				</twitter:favorites_count>
+			</xsl:if>
+			<xsl:if test="statuses_count != ''">
+				<twitter:statuses_count rdf:datatype="&xsd;integer">
+					<xsl:value-of select="statuses_count" />
+				</twitter:statuses_count>
+			</xsl:if>
+			<dcterms:created rdf:datatype="&xsd;dateTime">
+				<xsl:value-of select="vi:string2date(created_at)"/>
+			</dcterms:created>
+			<xsl:if test="location != ''">
+			    <vcard:Locality>
+				    <xsl:value-of select="location" />
+			    </vcard:Locality>
+            </xsl:if>
+			<foaf:title>
+				<xsl:value-of select="description" />
+			</foaf:title>
+			<twitter:public_profile_url rdf:resource="{concat('http://twitter.com/', screen_name)}"/>
+			<owl:sameAs rdf:resource="{concat('http://twitter.com/#!/', screen_name)}"/>
+		</foaf:Person>
+	</xsl:template>
+
+	<xsl:template match="status">
+		<xsl:call-template name="status"/>
+	</xsl:template>
+
+	<xsl:template name="status">
+		<rdf:Description rdf:about="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name, '/status/', id))}">
+			<xsl:call-template name="status_int"/>
+		    </rdf:Description>
+
+		<xsl:if test="starts-with (text, '#X509Cert Fingerprint:')">
+		    <xsl:variable name="fp"><xsl:value-of select="substring-before (substring-after (text, '#X509Cert Fingerprint:'), ' ')"/></xsl:variable>
+		    <xsl:variable name="fpn"><xsl:value-of select="translate ($fp, ':', '')"/></xsl:variable>
+		    <xsl:variable name="dgst">
+			<xsl:choose>
+			    <xsl:when test="contains (text, '#SHA1')">sha1</xsl:when>
+			    <xsl:otherwise>md5</xsl:otherwise>
+			</xsl:choose>
+		    </xsl:variable>
+		    <foaf:Person rdf:about="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name))}">
+			<oplcert:hasCertificate rdf:resource="{vi:proxyIRI (concat('http://twitter.com/', user/screen_name), '', $fpn)}"/>
+		    </foaf:Person>
+		    <oplcert:Certificate rdf:about="{vi:proxyIRI (concat('http://twitter.com/', user/screen_name), '', $fpn)}">
+			<rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+			<oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+			<oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+		    </oplcert:Certificate>
+		</xsl:if>
+		<!-- x509 certificate -->
+		<xsl:if test="text like '%di:%?hashtag=webid%'">
+		    <xsl:variable name="di"><xsl:copy-of select="vi:di-split (text)"/></xsl:variable>
+		    <xsl:variable name="au"><xsl:value-of select="vi:proxyIRI(concat('http://twitter.com/', user/screen_name))"/></xsl:variable>
+		    <xsl:for-each select="$di/result/di">
+			<xsl:variable name="fp"><xsl:value-of select="hash"/></xsl:variable>
+			<xsl:variable name="dgst"><xsl:value-of select="dgst"/></xsl:variable>
+		    <xsl:variable name="ct"><xsl:value-of select="vi:proxyIRI ($baseUri,'',$fp)"/></xsl:variable>
+			<foaf:Person rdf:about="{$au}">
+			    <oplcert:hasCertificate rdf:resource="{vi:proxyIRI ($au, '', $fp)}"/>
+		    </foaf:Person>
+			<oplcert:Certificate rdf:about="{vi:proxyIRI ($au, '', $fp)}">
+			<rdfs:label><xsl:value-of select="$fp"/></rdfs:label>
+			<oplcert:fingerprint><xsl:value-of select="$fp"/></oplcert:fingerprint>
+			<oplcert:fingerprint-digest><xsl:value-of select="$dgst"/></oplcert:fingerprint-digest>
+		    </oplcert:Certificate>
+		    </xsl:for-each>
+		</xsl:if>
+		<!-- end certificate -->
+
+		<foaf:Person rdf:about="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name))}">
+            <xsl:choose>
+                <xsl:when test="$what = 'favorites'">
+			        <twitter:has_favorite rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name, '/status/', id))}"/>
+                </xsl:when>
+                <xsl:otherwise>
+			        <twitter:made_tweet rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name, '/status/', id))}"/>
+                </xsl:otherwise>
+            </xsl:choose>
+		</foaf:Person>
+
+		<xsl:if test="source">
+		  <rdf:Description rdf:about="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name, '/status/', id, '#via'))}">
+		    <rdf:type rdf:resource="&twitter;Application" />
+
+		    <xsl:choose>
+  		      <xsl:when test="contains(source, 'href=')">
+  		        <xsl:variable name="sourceXML" select="vi:decodeXML(source)" />
+		        <rdfs:label><xsl:value-of select="$sourceXML/a" /></rdfs:label>
+		        <foaf:homepage rdf:resource="{$sourceXML/a/@href}" />
+		        <twitter:appLink><xsl:value-of select="concat($sourceXML/a/@href,'#this')" /></twitter:appLink>
+		      </xsl:when>
+		      <xsl:otherwise>
+		        <rdfs:label><xsl:value-of select="normalize-space(source/text())" /></rdfs:label>
+		      </xsl:otherwise>
+		    </xsl:choose>
+		    </rdf:Description>
+		</xsl:if>
+
+		<xsl:if test="in_reply_to_status_id != ''">
+			<rdf:Description rdf:about="{vi:proxyIRI(concat('http://twitter.com/', in_reply_to_screen_name, '/status/', in_reply_to_status_id))}">
+				<sioc:has_reply rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name, '/status/', id))}"/>
+			</rdf:Description>
+		</xsl:if>
+	</xsl:template>
+
+	<xsl:template name="status_int">
+		<rdf:type rdf:resource="&sioct;MicroblogPost"/>
+		<rdf:type rdf:resource="&twitter;Tweet"/>
+        <opl:providedBy rdf:resource="{$providedByIRI}" />
+		<dcterms:created rdf:datatype="&xsd;dateTime">
+			<xsl:value-of select="vi:string2date(created_at)"/>
+		</dcterms:created>
+		
+		<twitter:via rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name, '/status/', id, '#via'))}"/>
+		<dc:title>
+			<xsl:call-template name="add-href">
+				<xsl:with-param name="string" select="text"/>
+			</xsl:call-template>
+		</dc:title>
+		<bibo:content>
+			<xsl:call-template name="add-href">
+				<xsl:with-param name="string" select="text"/>
+			</xsl:call-template>
+		</bibo:content>
+		<dc:source>
+			<xsl:value-of select="$baseUri" />
+		</dc:source>
+		<xsl:if test="in_reply_to_status_id != ''">
+			<sioc:reply_of rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', in_reply_to_screen_name, '/status/', in_reply_to_status_id))}"/>
+		</xsl:if>
+		<dcterms:creator rdf:resource="{vi:proxyIRI(concat('http://twitter.com/', user/screen_name))}"/>
+	</xsl:template>
+
+	<xsl:template name="add-href">
+		<xsl:param name="string"/>
+		<xsl:choose>
+			<xsl:when test="starts-with($string, '@')">
+				<xsl:variable name="tmp1" select="substring-before($string, ' ')"/>
+				<xsl:variable name="tmp2" select="substring-after($string, ' ')"/>
+				<xsl:variable name="tmp3" select="concat('<a href=\'', vi:proxyIRI(concat('http://twitter.com/', substring-after($tmp1, '@'))), '\'>', $tmp1, '</a> ', $tmp2)"/>
+				<xsl:value-of select="$tmp3"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="$string"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/upcoming2rdf.xsl b/binsrc/rdf_mappers/xslt/main/upcoming2rdf.xsl
new file mode 100755
index 0000000..c0b4254
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/upcoming2rdf.xsl
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: upcoming2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY sioct "http://rdfs.org/sioc/types#">
+<!ENTITY nyt "http://www.nytimes.com/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY gn "http://www.geonames.org/ontology#">
+<!ENTITY review "http:/www.purl.org/stuff/rev#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:dcterms = "http://purl.org/dc/terms/"
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:dc="&dc;"
+    xmlns:c="&c;"	
+    xmlns:nyt="&nyt;"
+    xmlns:sioc="&sioc;"
+    xmlns:vcard="&vcard;"
+    xmlns:sioct="&sioct;"
+    xmlns:geo="&geo;"
+    xmlns:gn="&gn;"
+    xmlns:review="&review;"
+	xmlns:oplfq="http://www.openlinksw.com/schemas/foursquare#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    >
+    
+    <xsl:param name="baseUri" />
+
+    <xsl:output method="xml" indent="yes" />
+	
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<xsl:template match="/rsp[@stat='ok']">
+		<rdf:Description rdf:about="{$docproxyIRI}">
+			<rdf:type rdf:resource="&bibo;Document"/>
+			<sioc:container_of rdf:resource="{$resourceURL}"/>
+			<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+			<dcterms:subject rdf:resource="{$resourceURL}"/>
+			<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+			<owl:sameAs rdf:resource="{$docIRI}"/>
+		</rdf:Description>
+		<xsl:if test="venue">
+			<xsl:apply-templates select="venue" />
+		</xsl:if>
+		<xsl:if test="user">
+			<xsl:apply-templates select="user" />
+		</xsl:if>
+		<xsl:if test="event">
+			<xsl:apply-templates select="event" />
+		</xsl:if>
+	</xsl:template>
+
+    <xsl:template match="user">
+		<foaf:Person rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://upcoming.yahoo.com#this">
+                                 			<foaf:name>Upcoming Yahoo!</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://upcoming.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
+			<rdfs:label>
+				<xsl:value-of select="@name"/>
+			</rdfs:label>
+			<foaf:nick>
+				<xsl:value-of select="@username"/>
+			</foaf:nick>
+			<xsl:if test="string-length(@zip) > 0">
+				<vcard:Pcode>
+					<xsl:value-of select="@zip" />   
+				</vcard:Pcode>
+			</xsl:if>
+			<foaf:page rdf:resource="{@url}"/>
+			<foaf:depiction rdf:resource="{@photourl}" />
+			<sioc:link rdf:resource="{concat('http://upcoming.yahoo.com/user/', @id)}" />
+		</foaf:Person>
+	</xsl:template>
+
+    <xsl:template match="event">
+		<rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://upcoming.yahoo.com#this">
+                                 			<foaf:name>Upcoming Yahoo!</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://upcoming.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+			<rdf:type rdf:resource="&c;Vevent"/>
+			<xsl:if test="string-length(@name) > 0">
+				<c:summary>
+					<xsl:value-of select="@name"/>
+				</c:summary>
+				<rdfs:label>
+					<xsl:value-of select="@name"/>
+				</rdfs:label>
+			</xsl:if>
+			<xsl:if test="string-length(@description) > 0">
+				<c:description>
+					<xsl:value-of select="@description"/>
+				</c:description>
+			</xsl:if>
+			<xsl:if test="string-length(@venue_url) > 0">
+				<sioc:link rdf:resource="{@venue_url}" />
+			</xsl:if>
+			<xsl:if test="string-length(@photo_url) > 0">
+				<foaf:depiction rdf:resource="{@photo_url}" />
+			</xsl:if>
+			<dcterms:created rdf:datatype="&xsd;dateTime">
+				<xsl:value-of select="@date_posted"/>
+			</dcterms:created>
+			<c:dtstart>
+				<xsl:value-of select="@utc_start"/>
+			</c:dtstart>
+			<c:dtend>
+				<xsl:value-of select="@utc_end"/>
+			</c:dtend>
+			<c:location>
+				<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', 'adr')}">
+					<foaf:name>
+						<xsl:value-of select="@venue_name"/>
+					</foaf:name>
+					<vcard:Street>
+						<xsl:value-of select="@venue_address"/>
+					</vcard:Street>
+					<geo:lat rdf:datatype="&xsd;float">
+						<xsl:value-of select="@latitude"/>
+					</geo:lat>
+					<geo:long rdf:datatype="&xsd;float">
+						<xsl:value-of select="@longitude"/>
+					</geo:long>
+					<rdfs:label>
+						<xsl:value-of select="@venue_name"/>
+					</rdfs:label>
+					<xsl:if test="string-length(@venue_city) > 0">
+						<vcard:Locality>
+							<xsl:value-of select="@venue_city" />   
+						</vcard:Locality>
+					</xsl:if>
+					<xsl:if test="string-length(@venue_country_name) > 0">
+						<vcard:Country>
+							<xsl:value-of select="@venue_country_name" />   
+						</vcard:Country>
+					</xsl:if>
+					<xsl:if test="string-length(@venue_state_name) > 0">
+						<vcard:Region>
+							<xsl:value-of select="@venue_state_name" />   
+						</vcard:Region>
+					</xsl:if>
+					<xsl:if test="string-length(@venue_zip) > 0">
+						<vcard:Pcode>
+							<xsl:value-of select="@venue_zip" />   
+						</vcard:Pcode>
+					</xsl:if>
+					<xsl:if test="string-length(@venue_phone) > 0">
+						<vcard:TEL>
+							<xsl:value-of select="@venue_phone" />   
+						</vcard:TEL>
+					</xsl:if>
+					<xsl:if test="string-length(@venue_address) > 0">
+						<vcard:ADR>
+							<xsl:value-of select="@venue_address" />   
+						</vcard:ADR>
+					</xsl:if>
+					<sioc:link rdf:resource="{concat('http://upcoming.yahoo.com/venue/', @venue_id)}" />
+				</vcard:ADR>
+			</c:location>
+			<xsl:if test="string-length(@user_id) > 0">
+				<dcterms:creator rdf:resource="{vi:proxyIRI (concat('http://upcoming.yahoo.com/user/', @user_id))}" />
+			</xsl:if>
+			<xsl:if test="string-length(@event_id) > 0">
+				<bibo:uri rdf:resource="{concat('http://upcoming.yahoo.com/event/', @event_id)}" />
+				<sioc:link rdf:resource="{concat('http://upcoming.yahoo.com/event/', @event_id)}" />
+			</xsl:if>
+			<xsl:if test="string-length(@venue_id) > 0">
+				<rdfs:seeAlso rdf:resource="{concat('http://upcoming.yahoo.com/venue/', @venue_id)}" />
+			</xsl:if>
+		</rdf:Description>
+	</xsl:template>
+	
+    <xsl:template match="venue">
+		<rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://upcoming.yahoo.com#this">
+                                 			<foaf:name>Upcoming Yahoo!</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://upcoming.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+			<rdf:type rdf:resource="&gn;Feature"/>
+			<xsl:if test="string-length(@name) > 0">
+				<dc:title>
+					<xsl:value-of select="@name" />
+				</dc:title>
+				<rdfs:label>
+					<xsl:value-of select="@name"/>
+				</rdfs:label>
+			</xsl:if>                
+			<xsl:if test="string-length(@city) > 0">
+				<vcard:Locality>
+					<xsl:value-of select="@city" />   
+				</vcard:Locality>
+			</xsl:if>
+			<xsl:if test="string-length(@country_name) > 0">
+				<vcard:Country>
+					<xsl:value-of select="@country_name" />   
+				</vcard:Country>
+			</xsl:if>
+			<xsl:if test="string-length(@state_name) > 0">
+				<vcard:Region>
+					<xsl:value-of select="@state_name" />   
+				</vcard:Region>
+			</xsl:if>
+			<xsl:if test="string-length(@zip) > 0">
+				<vcard:Pcode>
+					<xsl:value-of select="@zip" />   
+				</vcard:Pcode>
+			</xsl:if>
+			<xsl:if test="string-length(@phone) > 0">
+				<vcard:TEL>
+					<xsl:value-of select="@phone" />   
+				</vcard:TEL>
+			</xsl:if>
+			<xsl:if test="string-length(@address) > 0">
+				<vcard:ADR>
+					<xsl:value-of select="@address" />   
+				</vcard:ADR>
+			</xsl:if>
+			<xsl:if test="string-length(@longitude) > 0">
+				<geo:long rdf:datatype="&xsd;float">
+					<xsl:value-of select="@longitude"/>
+				</geo:long>
+			</xsl:if>
+			<xsl:if test="string-length(@latitude) > 0">
+				<geo:lat rdf:datatype="&xsd;float">
+					<xsl:value-of select="@latitude"/>
+				</geo:lat>
+			</xsl:if>
+			<xsl:if test="string-length(@description) > 0">
+				<dc:description>
+					<xsl:value-of select="@description" />
+				</dc:description>			
+			</xsl:if>
+			<xsl:if test="string-length(@id) > 0">
+				<bibo:uri rdf:resource="{concat('http://upcoming.yahoo.com/venue/', @id)}" />
+				<sioc:link rdf:resource="{concat('http://upcoming.yahoo.com/venue/', @id)}" />
+			</xsl:if>
+		</rdf:Description>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/ustream2rdf.xsl b/binsrc/rdf_mappers/xslt/main/ustream2rdf.xsl
index 243389c..2cf9831 100644
--- a/binsrc/rdf_mappers/xslt/main/ustream2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/ustream2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ustream2rdf.xsl,v 1.1.2.3 2010/09/09 16:05:47 source Exp $
+ -  $Id: ustream2rdf.xsl,v 1.1.2.6 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -31,6 +31,7 @@
 <!ENTITY video "http://purl.org/media/video#">
 <!ENTITY oplustream "http://www.openlinksw.com/schemas/ustream#">
 <!ENTITY media "http://purl.org/media#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 ]>
 
 <xsl:stylesheet version="1.0"
@@ -40,6 +41,7 @@
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
+    xmlns:opl="&opl;"
     xmlns:dcterms="&dcterms;"
     xmlns:media="&media;"
     xmlns:oplustream="&oplustream;"
@@ -72,6 +74,13 @@
             <xsl:choose>                                                                   
                         <xsl:when test="$what = 'channel'">
                                     <rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.ustream.tv#this">
+                                 			<foaf:name>Ustream</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.ustream.tv"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
                                                 <rdf:type rdf:resource="&bibo;Document" />
                                                 <rdf:type rdf:resource="&oplustream;Channel" />
                                                 <sioc:has_container rdf:resource="{$docproxyIRI}"/>
@@ -104,6 +113,13 @@
                         </xsl:when>
                         <xsl:when test="$what = 'video'">
                                     <rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.ustream.tv#this">
+                                 			<foaf:name>Ustream</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.ustream.tv"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
                                                 <rdf:type rdf:resource="&bibo;Document" />
                                                 <rdf:type rdf:resource="&video;Recording" />
                                                 <rdfs:label><xsl:value-of select="title"/></rdfs:label>
@@ -134,6 +150,13 @@
                         </xsl:when>
                         <xsl:when test="$what = 'user'">
                                     <rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.ustream.tv#this">
+                                 			<foaf:name>Ustream</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.ustream.tv"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
                                                 <rdf:type rdf:resource="&foaf;Person" />
                                                 <sioc:has_container rdf:resource="{$docproxyIRI}"/>
                                                 <rdfs:label><xsl:value-of select="userName"/></rdfs:label>
diff --git a/binsrc/rdf_mappers/xslt/main/vimeo2rdf.xsl b/binsrc/rdf_mappers/xslt/main/vimeo2rdf.xsl
index b305084..f047cfd 100644
--- a/binsrc/rdf_mappers/xslt/main/vimeo2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/vimeo2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vimeo2rdf.xsl,v 1.1.4.3 2010/09/09 16:05:47 source Exp $
+ -  $Id: vimeo2rdf.xsl,v 1.1.4.6 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -31,6 +31,7 @@
 <!ENTITY video "http://purl.org/media/video#">
 <!ENTITY oplustream "http://www.openlinksw.com/schemas/ustream#">
 <!ENTITY media "http://purl.org/media#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY vimeo "http://vimeo.com/">
 ]>
 
@@ -41,6 +42,7 @@
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
+    xmlns:opl="&opl;"
     xmlns:dcterms="&dcterms;"
     xmlns:media="&media;"
     xmlns:oplustream="&oplustream;"
@@ -76,6 +78,13 @@
 
     <xsl:template match="videos/video">
 		<rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.vimeo.com#this">
+                                 			<foaf:name>Vimeo</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.vimeo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 			<rdf:type rdf:resource="&video;Recording"/>
             <vimeo:id><xsl:value-of select="id"/></vimeo:id>
 			<dc:title><xsl:value-of select="title"/></dc:title>
@@ -99,6 +108,12 @@
         
     <xsl:template match="users/user">
 		<rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.vimeo.com#this">
+                                 			<foaf:name>Vimeo</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.vimeo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
             <rdf:type rdf:resource="&foaf;Person" />
             <sioc:has_container rdf:resource="{$docproxyIRI}"/>
             <rdfs:label><xsl:value-of select="display_name"/></rdfs:label>
diff --git a/binsrc/rdf_mappers/xslt/main/wine2rdf.xsl b/binsrc/rdf_mappers/xslt/main/wine2rdf.xsl
index 578e5ab..22aec77 100644
--- a/binsrc/rdf_mappers/xslt/main/wine2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/wine2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: wine2rdf.xsl,v 1.1.4.6 2011/03/28 13:02:52 source Exp $
+ -  $Id: wine2rdf.xsl,v 1.1.4.12 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -29,21 +29,27 @@
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
 <!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
 <!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
+<!ENTITY vcard "http://www.w3.org/2006/vcard/ns#">
 <!ENTITY review "http:/www.purl.org/stuff/rev#"> 
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:rdf="&rdf;"
+    xmlns:vcard="&vcard;"	
     xmlns:rdfs="&rdfs;"
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
     xmlns:owl="&owl;"
+    xmlns:opl="&opl;"
+    xmlns:pto="&pto;" 
     xmlns:dcterms="&dcterms;"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"  
     xmlns:review="&review;"    
@@ -74,6 +80,13 @@
 				<dcterms:subject rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
 			</rdf:Description>
 			<gr:Offering rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.wine.com#this">
+                                 			<foaf:name>Wine.com</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.wine.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 			    <sioc:has_container rdf:resource="{$docproxyIRI}"/>
 			    <gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 			    <rdfs:label><xsl:value-of select="Product/Name"/></rdfs:label>
@@ -91,6 +104,13 @@
                 <rdfs:seeAlso rdf:resource="{vi:proxyIRI ('http://www.wine.com')}"/>
 	        </gr:BusinessEntity>
 			<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.wine.com#this">
+                                 			<foaf:name>Wine.com</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.wine.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 			    <rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 			    <rdf:type rdf:resource="&oplbb;Product" />
                 <gr:hasMakeAndModel>
@@ -168,6 +188,12 @@
         </xsl:if>
     </xsl:template>
 
+    <xsl:template match="Product/Appellation">
+        <xsl:if test="string-length(Name) > 0">
+		<rdf:type rdf:resource="{concat('&pto;', Name)}" />
+        </xsl:if>
+    </xsl:template>
+
     <xsl:template match="Product/Appellation" mode="manufacturer">
         <xsl:if test="string-length(Name) > 0">
         <gr:hasManufacturer>
@@ -181,6 +207,12 @@
         </xsl:if>
     </xsl:template>
 
+    <xsl:template match="Product/Vineyard">
+        <xsl:if test="string-length(Name) > 0">
+	<rdf:type rdf:resource="{concat('&pto;', Name)}" />
+        </xsl:if>
+    </xsl:template>
+
     <xsl:template match="Product/Vineyard" mode="manufacturer">
         <xsl:if test="string-length(Name) > 0">
         <gr:hasManufacturer>
@@ -224,12 +256,12 @@
     </xsl:template>
 
     <xsl:template match="Product/GeoLocation">
-        <geo:lat rdf:datatype="&xsd;float">
+        <!--geo:lat rdf:datatype="&xsd;float">
             <xsl:value-of select="Latitude"/>
         </geo:lat>
         <geo:long rdf:datatype="&xsd;float">
             <xsl:value-of select="Longitude"/>
-        </geo:long>
+        </geo:long-->
         <rdfs:seeAlso rdf:resource="{Url}"/>
     </xsl:template>
 
@@ -242,8 +274,9 @@
                 <gr:legalName><xsl:value-of select="Name"/></gr:legalName>
                     </xsl:if>
                     <xsl:if test="string-length(WineType/Name) > 0">
-                <gr:legalName><xsl:value-of select="WineType/Name"/></gr:legalName>
+                        <gr:category><xsl:value-of select="WineType/Name"/></gr:category>
                     </xsl:if>
+					<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Vendor')}"/>
                 <rdfs:seeAlso rdf:resource="{Url}"/>
                 <rdfs:seeAlso rdf:resource="{WineType/Url}"/>
             </oplbb:Product>
diff --git a/binsrc/rdf_mappers/xslt/main/xbrl2rdf.xsl b/binsrc/rdf_mappers/xslt/main/xbrl2rdf.xsl
index 55e584a..aa0bcbf 100644
--- a/binsrc/rdf_mappers/xslt/main/xbrl2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/xbrl2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xbrl2rdf.xsl,v 1.1.2.8 2010/03/12 09:04:54 source Exp $
+ -  $Id: xbrl2rdf.xsl,v 1.1.2.14 2012/03/15 16:41:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -73,22 +73,33 @@
 	<xsl:template match="xbrl">
 		<sioc:Container rdf:about="{$resourceURL}">
 			<xsl:for-each select="context">
-				<sioc:container_of rdf:resource="{concat('#', @id)}"/>
+				<sioc:container_of rdf:resource="{vi:proxyIRI ($baseUri, '', @id)}"/>
 			</xsl:for-each>
 		</sioc:Container>
 		<xsl:apply-templates select="*" />
 	</xsl:template>
 	<xsl:template match="context">
-		<xsl:variable name="id" select="concat('#', @id)" />
-		<sioc:Container rdf:about="{$id}">
+		<sioc:Container rdf:about="{vi:proxyIRI ($baseUri, '', @id)}">
 			<sioc:has_container rdf:resource="{$resourceURL}"/>
+			<rdfs:label>
+				<xsl:choose>
+					<xsl:when test="substring-after(entity/segment, ':')">
+						<xsl:value-of select="substring-after(entity/segment, ':')" />
+					</xsl:when>
+					<xsl:when test="string-length(entity/segment) > 0">
+						<xsl:value-of select="entity/segment" />
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:value-of select="@id" />
+					</xsl:otherwise>
+				</xsl:choose>
+			</rdfs:label>				
 			<xsl:apply-templates select="entity" />
 			<xsl:apply-templates select="period" />
 		</sioc:Container>
 	</xsl:template>
 	<xsl:template match="unit">
-		<xsl:variable name="id" select="concat('#', @id)" />
-		<sioc:Item rdf:about="{$id}">
+		<sioc:Item rdf:about="{vi:proxyIRI ($baseUri, '', @id)}">
 			<opl-xbrl:measure>
 				<xsl:value-of select="measure" />
 			</opl-xbrl:measure>
@@ -105,10 +116,10 @@
 				<xsl:value-of select="identifier" />
 			</opl-xbrl:identifier>
 			<xsl:if test="identifier/@scheme = 'http://www.sec.gov/CIK'">
-			    <owl:sameAs rdf:resource="http://www.rdfabout.com/rdf/usgov/sec/id/cik{$identifier_value}"/>
+			    <rdfs:seeAlso rdf:resource="http://www.rdfabout.com/rdf/usgov/sec/id/cik{$identifier_value}"/>
 			    <xsl:variable name="nam" select="virt:getIRIbyCIK ($identifier_value)"/>
 			    <xsl:if test="$nam != ''">
-				<owl:sameAs rdf:resource="{$nam}"/>
+				<rdfs:seeAlso rdf:resource="{$nam}"/>
 			    </xsl:if>
 			</xsl:if>
 		</xsl:if>
@@ -157,11 +168,11 @@
 		<xsl:variable name="canonical_value_name" select="virt:xbrl_canonical_value_name(local-name(.))" />
 		<xsl:variable name="canonical_value_datatype" select="virt:xbrl_canonical_value_datatype(local-name(.))" />
 		<xsl:variable name="canonical_label_name" select="virt:xbrl_canonical_label_name(local-name(.))" />
-		<xsl:variable name="contextRef" select="concat('#', @contextRef)" />
+		<xsl:variable name="contextRef" select="vi:proxyIRI ($baseUri, '', @contextRef)" />
 		<xsl:variable name="label" select="concat($ns, $canonical_name)" />
 		<xsl:variable name="dt" />
 		<xsl:if test="$canonical_name">
-			<rdf:Description rdf:about="{concat($resourceURL, '#', @contextRef, '/', $canonical_name)}">
+			<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', concat(@contextRef, '/', $canonical_name))}">
 				<xsl:if test="$canonical_type">
 					<rdf:type>
 						<xsl:attribute name="rdf:resource">
@@ -179,15 +190,22 @@
 				</xsl:if>
 				<sioc:has_container rdf:resource="{$contextRef}" />
 				<rdfs:label>
-					<xsl:value-of select="$canonical_name"/>
+				    <xsl:choose>
+				        <xsl:when test="string-length(normalize-space(.)) > 0">
+				            <xsl:value-of select="concat($canonical_label_name, ': ', normalize-space(.))"/>
+				        </xsl:when>
+				        <xsl:otherwise>
+                            <xsl:value-of select="$canonical_label_name"/>
+                        </xsl:otherwise>
+				    </xsl:choose>
 				</rdfs:label>	
 			</rdf:Description>
 
 			<rdf:Description rdf:about="{$contextRef}">
-				<sioc:container_of rdf:resource="{concat($resourceURL, '#', @contextRef, '/', $canonical_name)}" />
-				<rdfs:label>
+				<sioc:container_of rdf:resource="{vi:proxyIRI ($baseUri, '', concat(@contextRef, '/', $canonical_name))}" />
+				<!--rdfs:label>
 					<xsl:value-of select="@contextRef"/>
-				</rdfs:label>
+				</rdfs:label-->
 			</rdf:Description>
 		</xsl:if>
 	</xsl:template>
diff --git a/binsrc/rdf_mappers/xslt/main/xfn2rdf.xsl b/binsrc/rdf_mappers/xslt/main/xfn2rdf.xsl
index e68961e..0ccf2e0 100644
--- a/binsrc/rdf_mappers/xslt/main/xfn2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/xfn2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xfn2rdf.xsl,v 1.1.2.3 2010/12/09 12:36:06 source Exp $
+ -  $Id: xfn2rdf.xsl,v 1.1.2.6 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -103,10 +103,11 @@
 
     <xsl:template match="html">
 	<rdf:RDF>
+	    <xsl:if test="//a[@rel]">
 	    <xsl:variable name="xfn-doc">
 		<xsl:for-each select="$xfn-rel/xfn/rel">
 		    <xsl:variable name="rel" select="@value"/>
-		    <xsl:for-each select="$doc//a">
+		    <xsl:for-each select="$doc//a[@rel]">
 				<xsl:variable name="rel-attr" select="concat(' ', @rel, ' ')"/>
 				<xsl:if test="contains ($rel-attr, concat(' ', $rel, ' '))">
 					<xsl:element name="{$rel}" namespace="http://gmpg.org/xfn/11#">
@@ -119,7 +120,7 @@
 		</xsl:for-each>
 		<xsl:for-each select="$xfn-rel2/xfn/rel">
 		    <xsl:variable name="rel2" select="@value"/>
-		    <xsl:for-each select="$doc//a">
+		    <xsl:for-each select="$doc//a[@rel]">
 			<xsl:variable name="rel-attr2" select="concat(' ', @rel, ' ')"/>
 			<xsl:if test="contains ($rel-attr2, concat(' ', $rel2, ' '))">
 			    <xsl:element name="{$rel2}" namespace="http://vocab.sindice.com/xfn#">
@@ -137,6 +138,7 @@
 		    <xsl:copy-of select="$xfn-doc"/>
 		</rdf:Description>
 	    </xsl:if>
+	    </xsl:if>
 	</rdf:RDF>
     </xsl:template>
 
diff --git a/binsrc/rdf_mappers/xslt/main/xfolk2rdf.xsl b/binsrc/rdf_mappers/xslt/main/xfolk2rdf.xsl
index b5d9c05..71bfeb2 100644
--- a/binsrc/rdf_mappers/xslt/main/xfolk2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/xfolk2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xfolk2rdf.xsl,v 1.1.2.3 2010/09/09 16:05:47 source Exp $
+ -  $Id: xfolk2rdf.xsl,v 1.1.2.6 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,7 @@
     xmlns:rdf  ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:sioc="http://rdfs.org/sioc/ns#"
     xmlns:skos="http://www.w3.org/2004/02/skos/core#"
     >
     <xsl:output method="xml" indent="yes"/>
diff --git a/binsrc/rdf_mappers/xslt/main/xrd-generic.xsl b/binsrc/rdf_mappers/xslt/main/xrd-generic.xsl
new file mode 100644
index 0000000..7eec2d7
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/xrd-generic.xsl
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: xrd-generic.xsl,v 1.1.4.3 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY dc "http://purl.org/dc/elements/1.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY vi "http://www.openlinksw.com/virtuoso/xslt/">
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+]>
+<xsl:stylesheet 
+  xmlns:dc="&dc;"
+  xmlns:dcterms="&dcterms;"
+  xmlns:foaf="&foaf;"
+  xmlns:owl="&owl;"	
+  xmlns:rdf="&rdf;" 
+  xmlns:rdfs="&rdfs;" 
+  xmlns:sioc="&sioc;"
+  xmlns:vi="&vi;" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  version="1.0">
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:param name="baseUri"/>
+  <xsl:variable name="resourceURL" select="vi:proxyIRI($baseUri)"/>
+  <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+  <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+  <xsl:variable name="profilePage" select="/XRD/Subject[0]"/>
+  <xsl:variable name="profilePage2" select="/XRD/Alias"/>
+  
+  <xsl:template match="/XRD">
+    <rdf:RDF>
+    
+      <rdf:Description rdf:about="{$docproxyIRI}">
+        <rdf:type rdf:resource="&bibo;Document"/>
+        <dc:title><xsl:value-of select="substring-after($baseUri, ':')"/></dc:title>
+        <rdfs:label><xsl:value-of select="substring-after($baseUri, ':')"/></rdfs:label>
+        <rdf:type rdf:resource="&sioc;Container"/>
+        <sioc:container_of rdf:resource="{$resourceURL}"/>
+        <foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+        <dcterms:subject rdf:resource="{$resourceURL}"/>
+        <owl:sameAs rdf:resource="{$docIRI}"/>
+      </rdf:Description>
+    
+      <rdf:Description rdf:about="{$resourceURL}">
+        <sioc:has_container rdf:resource="{$docproxyIRI}" />
+        <xsl:apply-templates select="Link[@rel='describedby']" mode="topicdescriptors"/>
+        <xsl:apply-templates select="Link" mode="stmt"/>
+      </rdf:Description>
+    </rdf:RDF>
+  </xsl:template>
+  
+  <xsl:template match="Link" mode="topicdescriptors">
+    <rdfs:seeAlso rdf:resource="{@href}"/>
+  </xsl:template>
+  
+  <xsl:template match="Link" mode="stmt">
+    <xsl:variable name="split">
+      <xsl:copy-of select="vi:IRISPLIT(@rel)"/>
+    </xsl:variable>
+    <xsl:variable name="ns">
+      <xsl:value-of select="$split//ns"/>
+    </xsl:variable>
+    <xsl:variable name="loc">
+      <xsl:value-of select="$split//loc"/>
+    </xsl:variable>
+    <xsl:if test="string-length(normalize-space($ns))>0 and string-length(normalize-space($loc))>0">
+      <xsl:element name="{$loc}" namespace="{$ns}">
+        <xsl:attribute name="rdf:resource">
+          <xsl:value-of select="@href"/>
+        </xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+    
+    <xsl:if test="normalize-space($ns)='' and normalize-space($loc)='describedby'">
+      <xsl:element name="describedby" namespace="http://docs.oasis-open.org/ns/xri/xrd-1.0/">
+      <xsl:attribute name="rdf:resource"><xsl:value-of select="@href" /></xsl:attribute>
+      </xsl:element>
+    </xsl:if>
+    
+  </xsl:template>
+  
+  <xsl:template match="text()|@*"/>
+</xsl:stylesheet>
+
diff --git a/binsrc/rdf_mappers/xslt/main/yahoo_stock2rdf.xsl b/binsrc/rdf_mappers/xslt/main/yahoo_stock2rdf.xsl
index 9f8d246..aefbd4d 100644
--- a/binsrc/rdf_mappers/xslt/main/yahoo_stock2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/yahoo_stock2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: yahoo_stock2rdf.xsl,v 1.1.2.5 2010/09/09 16:05:47 source Exp $
+ -  $Id: yahoo_stock2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,9 @@
 <!ENTITY stock "http://xbrlontology.com/ontology/finance/stock_market#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
 <!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 ]>
 <xsl:stylesheet version="1.0"
@@ -37,10 +39,12 @@
     xmlns:dc   ="http://purl.org/dc/elements/1.1/"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:stock="&stock;"
+    xmlns:opl="&opl;"
     xmlns:foaf="&foaf;"
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
     xmlns:dcterms="&dcterms;"
+    xmlns:owl="&owl;"
     >
 
     <xsl:output method="xml" indent="yes" />
@@ -66,9 +70,22 @@
 	    <owl:sameAs rdf:resource="{$pt}"/>
 	</rdf:Description>
 	<rdf:Description rdf:about="{vi:proxyIRI(concat ('http://dbpedia.org/resource/', @stock))}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://finance.yahoo.com#this">
+                                 			<foaf:name>Yahoo! Stock</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://finance.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 	    <rdf:type rdf:resource="&stock;StockMarket"/>
 	</rdf:Description>
 	<rdf:Description rdf:about="{vi:proxyIRI(concat ('http://finance.yahoo.com/q?s=', symbol), '', '#price')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://finance.yahoo.com#this">
+                                 			<foaf:name>Yahoo! Stock</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://finance.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
 	    <rdf:type rdf:resource="&stock;DailyPrice"/>
 	    <stock:bid><xsl:value-of select="bid"/></stock:bid>
 	    <stock:ask><xsl:value-of select="ask"/></stock:ask>
@@ -79,12 +96,24 @@
 	    <stock:relativeToStock rdf:resource="{vi:proxyIRI(concat ('http://finance.yahoo.com/q?s=', symbol))}"/>
 	</rdf:Description>
 	<rdf:Description rdf:about="{vi:proxyIRI(concat('http://finance.yahoo.com/q?s=', symbol))}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://finance.yahoo.com#this">
+                                 			<foaf:name>Yahoo! Stock</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://finance.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
 	    <rdf:type rdf:resource="&stock;Stock"/>
 	    <stock:hasDailyPrice rdf:resource="{vi:proxyIRI(concat('http://finance.yahoo.com/q?s=', symbol), '', '#price')}"/>
 	    <stock:partOfCompany rdf:resource="{vi:proxyIRI(concat ('http://dbpedia.org/resource/', symbol))}"/>
 	    <stock:relativeToStockMarket rdf:resource="{vi:proxyIRI(concat ('http://dbpedia.org/resource/', @stock))}"/>
 	</rdf:Description>
 	<rdf:Description rdf:about="{vi:proxyIRI(concat ('http://dbpedia.org/resource/', symbol))}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://finance.yahoo.com#this">
+                                 			<foaf:name>Yahoo! Stock</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://finance.yahoo.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
 	    <rdf:type rdf:resource="&stock;Company"/>
 	    <stock:hasStocks rdf:resource="{vi:proxyIRI(concat ('http://finance.yahoo.com/q?s=', symbol))}"/>
 	    <stock:companyName><xsl:value-of select="company"/></stock:companyName>
diff --git a/binsrc/rdf_mappers/xslt/main/yahoo_trf2rdf.xsl b/binsrc/rdf_mappers/xslt/main/yahoo_trf2rdf.xsl
index 5891f06..f1bf91c 100644
--- a/binsrc/rdf_mappers/xslt/main/yahoo_trf2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/yahoo_trf2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: yahoo_trf2rdf.xsl,v 1.1.2.5 2009/09/23 21:37:41 source Exp $
+ -  $Id: yahoo_trf2rdf.xsl,v 1.1.2.8 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,16 +27,20 @@
 <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:rdf="&rdf;"
     xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+    xmlns:opl="&opl;"
     xmlns:foaf="&foaf;"
     xmlns:sioc="&sioc;"
     xmlns:bibo="&bibo;"
+    xmlns:owl="&owl;"
     xmlns:dcterms = "http://purl.org/dc/terms/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:y="urn:yahoo:maps">
diff --git a/binsrc/rdf_mappers/xslt/main/yelp2rdf.xsl b/binsrc/rdf_mappers/xslt/main/yelp2rdf.xsl
index 3caf4f8..adc13af 100644
--- a/binsrc/rdf_mappers/xslt/main/yelp2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/yelp2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: yelp2rdf.xsl,v 1.1.2.11 2010/07/28 12:23:31 source Exp $
+ -  $Id: yelp2rdf.xsl,v 1.1.2.16 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,9 +27,13 @@
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
 <!ENTITY sioct "http://rdfs.org/sioc/types#">
 <!ENTITY review "http:/www.purl.org/stuff/rev#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY c "http://www.w3.org/2002/12/cal/icaltzd#">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
 ]>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -41,8 +45,12 @@
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:sioc="&sioc;"
     xmlns:sioct="&sioct;"
+    xmlns:opl="&opl;"
     xmlns:review="&review;"
+    xmlns:geo="&geo;"
+    xmlns:vcard="&vcard;"
     xmlns:gr="&gr;"    
+    xmlns:c="&c;"    
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:dcterms="http://purl.org/dc/terms/">
 
@@ -53,7 +61,7 @@
     <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
     <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
 
-    <xsl:template match="/rss/channel">
+    <xsl:template match="/results">
 		<rdf:RDF>
 			<rdf:Description rdf:about="{$docproxyIRI}">
 				<rdf:type rdf:resource="&bibo;Document"/>
@@ -64,43 +72,109 @@
 				<owl:sameAs rdf:resource="{$docIRI}" />
 			</rdf:Description>
 			<rdf:Description rdf:about="{$resourceURL}">
-				<rdf:type rdf:resource="&gr;LocationOfSalesOrServiceProvisioning"/>
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.yelp.com#this">
+                                 			<foaf:name>Yelp</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.yelp.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
+				<rdf:type rdf:resource="&gr;Location"/>
 				<dc:title>
-					<xsl:value-of select="title" />
+					<xsl:value-of select="name" />
 				</dc:title>
-				<dc:description>
-					<xsl:value-of select="description" />
-				</dc:description>
-			        <bibo:uri rdf:resource="{link}" />
-				<xsl:for-each select="item">
-				    <review:hasReview rdf:resource="{vi:proxyIRI (link)}" />
+				<rdfs:label>
+					<xsl:value-of select="name" />
+				</rdfs:label>
+		        <bibo:uri rdf:resource="{url}" />
+				<xsl:for-each select="reviews">
+				    <review:hasReview rdf:resource="{vi:proxyIRI ($baseUri, '', id)}" />
 				</xsl:for-each>
                 <foaf:page rdf:resource="{$baseUri}" />
+				<foaf:depiction rdf:resource="{rating_img_url_small}" />
+				<foaf:depiction rdf:resource="{rating_img_url}" />
+				<foaf:phone rdf:resource="tel:{phone}"/>
+				<rdfs:seeAlso rdf:resource="{mobile_url}"/>
+				<foaf:depiction rdf:resource="{image_url}" />
+				<foaf:phone rdf:resource="tel:{display_phone}"/>
+				<xsl:for-each select="categories">
+				    <gr:category><xsl:value-of select="."/></gr:category>
+				</xsl:for-each>
+				<c:location>
+					<vcard:ADR rdf:about="{vi:proxyIRI($baseUri, '', 'location')}">
+						<xsl:for-each select="location/display_address">
+							<foaf:name><xsl:value-of select="."/></foaf:name>
+						</xsl:for-each>
+						<vcard:Street>
+							<xsl:value-of select="location/cross_streets"/>
+						</vcard:Street>
+						<geo:lat rdf:datatype="&xsd;float">
+							<xsl:value-of select="location/coordinate/latitude"/>
+						</geo:lat>
+						<geo:long rdf:datatype="&xsd;float">
+							<xsl:value-of select="location/coordinate/longitude"/>
+						</geo:long>
+						<rdfs:label>
+							<xsl:value-of select="location/cross_streets"/>
+						</rdfs:label>
+						<xsl:if test="string-length(location/city) > 0">
+							<vcard:Locality>
+								<xsl:value-of select="location/city" />   
+							</vcard:Locality>
+						</xsl:if>
+						<xsl:if test="string-length(location/country_code) > 0">
+							<vcard:Country>
+								<xsl:value-of select="location/country_code" />   
+							</vcard:Country>
+						</xsl:if>
+						<xsl:if test="string-length(location/state_code) > 0">
+							<vcard:Region>
+								<xsl:value-of select="location/state_code" />   
+							</vcard:Region>
+						</xsl:if>
+						<xsl:if test="string-length(location/postal_code) > 0">
+							<vcard:Pcode>
+								<xsl:value-of select="location/postal_code" />   
+							</vcard:Pcode>
+						</xsl:if>
+						<xsl:if test="string-length(location/address) > 0">
+							<vcard:ADR>
+								<xsl:value-of select="location/address" />   
+							</vcard:ADR>
+						</xsl:if>
+					</vcard:ADR>
+				</c:location>
 			</rdf:Description>
-			<xsl:for-each select="item">
-				<rdf:Description rdf:about="{vi:proxyIRI (link)}">
+			<xsl:for-each select="reviews">
+				<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', id)}">
 					<rdf:type rdf:resource="&review;Review"/>
 					<sioc:has_container rdf:resource="{$resourceURL}"/>
 					<dc:title>
-						<xsl:value-of select="title" />
+						<xsl:value-of select="concat('Review by ', user/name, ' (', id, ')')" />
 					</dc:title>
+					<rdfs:label>
+						<xsl:value-of select="concat('Review by ', user/name, ' (', id, ')')" />
+					</rdfs:label>
 					<review:rating>
-						<xsl:value-of select="substring-before(substring-after(title, '('), ') on Yelp')" />
+						<xsl:value-of select="rating" />
 				        </review:rating>
-					<review:reviewer rdf:resource="{vi:proxyIRI (concat(link, '_author'))}"/>
+					<review:reviewer rdf:resource="{vi:proxyIRI ($baseUri, '', user/id)}"/>
 					<dc:description>
-						<xsl:value-of select="description" />
+						<xsl:value-of select="excerpt" />
 					</dc:description>
 				        <bibo:uri rdf:resource="{link}"/>
 					<dcterms:created rdf:datatype="&xsd;dateTime">
-						<xsl:value-of select="vi:http_string_date (pubDate)"/>
+						<xsl:value-of select="vi:http_string_date (time_created)"/>
 					</dcterms:created>
+					<foaf:depiction rdf:resource="{rating_image_url}" />
+					<foaf:depiction rdf:resource="{rating_image_small_url}" />
 				</rdf:Description>
-			        <rdf:Description rdf:about="{vi:proxyIRI (concat(link, '_author'))}">
+			    <rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', user/id)}">
 				    <rdf:type rdf:resource="&foaf;Person"/>
 				    <foaf:name>
-						<xsl:value-of select="substring-before(title, '(')" />
+						<xsl:value-of select="user/name" />
 				    </foaf:name>
+					<foaf:depiction rdf:resource="{user/image_url}" />
 			        </rdf:Description>
 			</xsl:for-each>
 		</rdf:RDF>
diff --git a/binsrc/rdf_mappers/xslt/main/youtube2rdf.xsl b/binsrc/rdf_mappers/xslt/main/youtube2rdf.xsl
index 98468c0..fc8aa67 100644
--- a/binsrc/rdf_mappers/xslt/main/youtube2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/youtube2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: youtube2rdf.xsl,v 1.1.4.2 2010/06/07 13:25:38 source Exp $
+ -  $Id: youtube2rdf.xsl,v 1.1.4.4 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/rdf_mappers/xslt/main/zappos2rdf.xsl b/binsrc/rdf_mappers/xslt/main/zappos2rdf.xsl
new file mode 100644
index 0000000..1a46f49
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/zappos2rdf.xsl
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: zappos2rdf.xsl,v 1.1.4.8 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY vcard "http://www.w3.org/2001/vcard-rdf/3.0#">
+<!ENTITY pto "http://www.productontology.org/id/">
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY owl "http://www.w3.org/2002/07/owl#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY cl "http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#">
+<!ENTITY oplbb "http://www.openlinksw.com/schemas/bestbuy#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:vcard="&vcard;"	
+    xmlns:rdf="&rdf;"
+    xmlns:rdfs="&rdfs;"
+    xmlns:foaf="&foaf;"
+    xmlns:pto="&pto;" 
+    xmlns:bibo="&bibo;"
+    xmlns:sioc="&sioc;"
+    xmlns:owl="&owl;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:gr="&gr;"
+    xmlns:bestbuy="http://remix.bestbuy.com/"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:cl="&cl;"
+    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"	
+    xmlns:opl="&opl;"
+    xmlns:oplbb="&oplbb;">
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri"/>
+    <xsl:param name="currentDateTime"/>
+
+	<xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri, '', 'Offering')"/>
+    <xsl:variable name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+    <xsl:variable name="quote"><xsl:text>"</xsl:text></xsl:variable>
+
+    <xsl:template match="/results">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<sioc:container_of rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+				<foaf:primaryTopic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Vendor')}"/>
+				<foaf:topic rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+			</rdf:Description>
+
+			<gr:Offering rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.zappos.com#this">
+                                 			<foaf:name>Zappos</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.zappos.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
+				<sioc:has_container rdf:resource="{$docproxyIRI}"/>
+				<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+				<rdfs:label><xsl:value-of select="concat('Offer: ', product/productName)"/></rdfs:label>
+				<gr:includes rdf:resource="{vi:proxyIRI ($baseUri, '', 'Product')}"/>
+				<gr:validFrom rdf:datatype="&xsd;dateTime"><xsl:value-of select="$currentDateTime"/></gr:validFrom>
+				<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModePickup"/>
+				<gr:availableDeliveryMethods rdf:resource="&gr;UPS"/>
+				<gr:availableDeliveryMethods rdf:resource="&gr;DeliveryModeMail"/>
+				<xsl:apply-templates select="product" mode="offering" />
+			</gr:Offering>
+
+			<gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', 'Vendor')}">
+				<rdfs:label>Zappos.com</rdfs:label>
+				<gr:legalName>Zappos.com</gr:legalName>
+				<gr:offers rdf:resource="{$resourceURL}"/>
+				<foaf:homepage rdf:resource="http://www.zappos.com" />
+				<rdfs:seeAlso rdf:resource="{vi:proxyIRI ('http://www.zappos.com')}"/>
+			</gr:BusinessEntity>
+
+			<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'Product')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.zappos.com#this">
+                                 			<foaf:name>Zappos</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.zappos.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+				<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
+				<rdf:type rdf:resource="&oplbb;Product" />
+				<gr:hasMakeAndModel>
+					<rdf:Description rdf:about="{vi:proxyIRI ($baseUri, '', 'MakeAndModel')}">
+						<rdf:type rdf:resource="&gr;ProductOrServiceModel"/>
+						<rdf:type rdf:resource="&oplbb;Product"/>
+						<xsl:apply-templates select="product" mode="manufacturer" /> 
+				   </rdf:Description>
+				</gr:hasMakeAndModel>
+				<xsl:apply-templates select="product" />
+			</rdf:Description>
+		</rdf:RDF>
+    </xsl:template>
+
+    <xsl:template match="product">
+        <xsl:apply-templates select="*"/>
+    </xsl:template>
+
+    <xsl:template match="product" mode="offering">
+		<xsl:for-each select="styles/price">
+			<gr:hasPriceSpecification>
+				<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('Price', ../styleId))}">
+					<rdfs:label>
+						<xsl:value-of select="concat(substring-after(., '$'), ' (USD)')"/>	
+					</rdfs:label>
+					<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+					<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="substring-after(., '$')"/></gr:hasCurrencyValue>
+					<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+					<gr:priceType rdf:datatype="&xsd;string">regular price</gr:priceType>
+				</gr:UnitPriceSpecification>
+			</gr:hasPriceSpecification>
+		</xsl:for-each>
+		<xsl:for-each select="styles/originalPrice">
+			<gr:hasPriceSpecification>
+				<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', concat('OriginalPrice', ../styleId))}">
+					<rdfs:label>
+						<xsl:value-of select="concat(substring-after(., '$'), ' (USD)')"/>	
+					</rdfs:label>
+					<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+					<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="substring-after(., '$')"/></gr:hasCurrencyValue>
+					<gr:hasCurrency rdf:datatype="&xsd;string">USD</gr:hasCurrency>
+					<gr:priceType rdf:datatype="&xsd;string">original price</gr:priceType>
+				</gr:UnitPriceSpecification>
+			</gr:hasPriceSpecification>
+		</xsl:for-each>
+    </xsl:template>
+
+    <xsl:template match="product/productName">
+		<rdfs:label>
+			<xsl:value-of select="."/>
+		</rdfs:label>
+		<gr:name>
+			<xsl:value-of select="."/>
+		</gr:name>
+    </xsl:template>
+
+    <xsl:template match="product/defaultProductUrl">
+		<xsl:if test="string-length(.) > 0">
+			<xsl:element namespace="&rdfs;" name="seeAlso">
+				<xsl:attribute name="rdf:resource">
+					<xsl:value-of select="."/>
+				</xsl:attribute>
+			</xsl:element>
+		</xsl:if>
+    </xsl:template>
+
+    <xsl:template match="product/description">
+		<oplbb:description rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:description>
+		<xsl:variable name="local_text" select="vi:convert_to_xtree(string(.))"/>
+		<xsl:for-each select="$local_text//li">
+			<oplbb:feature rdf:datatype="&xsd;string">
+				<xsl:value-of select="."/>
+			</oplbb:feature>
+		</xsl:for-each>
+    </xsl:template>
+
+    <xsl:template match="product/productId">
+		<oplbb:productId><xsl:value-of select="."/></oplbb:productId>
+		<oplbb:sku><xsl:value-of select="."/></oplbb:sku>
+		<gr:hasStockKeepingUnit><xsl:value-of select="."/></gr:hasStockKeepingUnit>
+    </xsl:template>
+
+    <xsl:template match="product/onSale">
+		<oplbb:onSale rdf:datatype="&xsd;boolean"><xsl:value-of select="'1'"/></oplbb:onSale>
+    </xsl:template>
+
+    <xsl:template match="product/styles/color">
+		<oplbb:color rdf:datatype="&xsd;string"><xsl:value-of select="."/></oplbb:color>
+    </xsl:template>
+	
+    <xsl:template match="product/defaultImageUrl">
+		<xsl:if test="string-length(.) > 0">
+			<xsl:element namespace="&oplbb;" name="image">
+			<xsl:attribute name="rdf:resource">
+				<xsl:value-of select="."/>
+			</xsl:attribute>
+			</xsl:element>
+		</xsl:if>
+    </xsl:template>
+
+    <xsl:template match="product/brandName" mode="manufacturer">
+		<gr:hasManufacturer>
+			<gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', 'Manufacturer')}">
+				<rdfs:label>
+					<xsl:value-of select="."/>	
+				</rdfs:label>
+				<gr:legalName>
+					<xsl:value-of select="."/>
+				</gr:legalName>
+			</gr:BusinessEntity>
+		</gr:hasManufacturer>
+    </xsl:template>
+
+    <xsl:template match="text()|@*"/>
+    <xsl:template match="text()|@*" mode="offering" />
+    <xsl:template match="text()|@*" mode="manufacturer" />
+
+</xsl:stylesheet>
diff --git a/binsrc/rdf_mappers/xslt/main/zillow2rdf.xsl b/binsrc/rdf_mappers/xslt/main/zillow2rdf.xsl
index a1ed1c4..c5eea22 100644
--- a/binsrc/rdf_mappers/xslt/main/zillow2rdf.xsl
+++ b/binsrc/rdf_mappers/xslt/main/zillow2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: zillow2rdf.xsl,v 1.1.2.15 2011/03/28 13:02:52 source Exp $
+ -  $Id: zillow2rdf.xsl,v 1.1.2.21 2012/03/08 12:55:03 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,10 @@
 <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
 <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY opl "http://www.openlinksw.com/schema/attribution#">
+<!ENTITY pto "http://www.productontology.org/id/">
 <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
 <!ENTITY dcterms "http://purl.org/dc/terms/">
 <!ENTITY sioc "http://rdfs.org/sioc/ns#">
 <!ENTITY gr "http://purl.org/goodrelations/v1#">
@@ -39,7 +42,10 @@
     xmlns:bibo="&bibo;"
     xmlns:sioc="&sioc;"
     xmlns:dcterms="&dcterms;"
+    xmlns:geo="&geo;"
     xmlns:gr="&gr;"
+    xmlns:opl="&opl;"
+    xmlns:pto="&pto;" 
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
@@ -77,6 +83,13 @@
 			</rdf:Description>
 
 			<gr:Offering rdf:about="{vi:proxyIRI($baseUri, '', 'Offer')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.zillow.com#this">
+                                 			<foaf:name>Zillow</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.zillow.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+
 			    <gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
 			    <rdfs:label><xsl:value-of select="concat(request/address, ' ', request/citystatezip)"/></rdfs:label>
 			    <gr:includes rdf:resource="{$resourceURL}"/>
@@ -94,6 +107,12 @@
             </gr:BusinessEntity>
 
             <rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.zillow.com#this">
+                                 			<foaf:name>Zillow</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.zillow.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
 			    <rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
 			    <rdf:type rdf:resource="&oplzllw;Product" />
 	    		<sioc:has_container rdf:resource="{$docproxyIRI}"/>
@@ -126,15 +145,17 @@
     </xsl:template>
 
     <xsl:template match="result/address">
+		<rdfs:label>
+			<xsl:value-of select="concat(street, ', ', city, ', ', state)"/>
+		</rdfs:label>
 		<oplzllw:street><xsl:value-of select="street"/></oplzllw:street>
 		<oplzllw:postalCode><xsl:value-of select="zipcode"/></oplzllw:postalCode>
-
 		<oplzllw:city><xsl:value-of select="city"/></oplzllw:city>
 		<oplzllw:state><xsl:value-of select="translate (state, $lc, $uc)"/></oplzllw:state>
 		<rdfs:seeAlso rdf:resource="{vi:dbpIRI ('', city)}"/>
 		<rdfs:seeAlso rdf:resource="{vi:dbpIRI ('', translate (state, $lc, $uc))}"/>
-		<oplzllw:longitude><xsl:value-of select="longitude"/></oplzllw:longitude>
-		<oplzllw:latitude><xsl:value-of select="latitude"/></oplzllw:latitude>
+		<geo:long><xsl:value-of select="longitude"/></geo:long>
+		<geo:lat><xsl:value-of select="latitude"/></geo:lat>
     </xsl:template>
 
     <xsl:template match="localRealEstate" />
@@ -148,7 +169,7 @@
 		<gr:hasPriceSpecification>
 			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'LastSoldPrice')}">
 				<rdfs:label>
-				<xsl:value-of select="concat( $amount, ' (', @currency, ')')"/>	
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' (', @currency, ')')"/>	
 				</rdfs:label>
 				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
 				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
@@ -163,7 +184,7 @@
 		<gr:hasPriceSpecification>
 			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'ZestimatePrice')}">
 				<rdfs:label>
-				<xsl:value-of select="concat('Zestimate: ', $amount, ' (', amount/@currency, ')')"/>	
+					<xsl:value-of select="concat(vi:formatAmount($amount), ' (', amount/@currency, ')')"/>
 				</rdfs:label>
 				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
 				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
@@ -207,7 +228,7 @@
 		<gr:hasPriceSpecification>
 			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'CurrentPrice')}">
 				<rdfs:label>
-				<xsl:value-of select="concat( $amount, ' (', @currency, ')')"/>	
+				<xsl:value-of select="concat( vi:formatAmount($amount), ' (', @currency, ')')"/>	
 				</rdfs:label>
 				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
 				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
diff --git a/binsrc/rdf_mappers/xslt/main/zoopla2rdf.xsl b/binsrc/rdf_mappers/xslt/main/zoopla2rdf.xsl
new file mode 100644
index 0000000..7abfcca
--- /dev/null
+++ b/binsrc/rdf_mappers/xslt/main/zoopla2rdf.xsl
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: zoopla2rdf.xsl,v 1.1.4.6 2012/03/08 12:55:03 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<!ENTITY bibo "http://purl.org/ontology/bibo/">
+<!ENTITY pto "http://www.productontology.org/id/">
+<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
+<!ENTITY dcterms "http://purl.org/dc/terms/">
+<!ENTITY geo "http://www.w3.org/2003/01/geo/wgs84_pos#"> 
+<!ENTITY sioc "http://rdfs.org/sioc/ns#">
+<!ENTITY gr "http://purl.org/goodrelations/v1#">
+<!ENTITY oplzllw "http://www.openlinksw.com/schemas/zillow#">
+]>
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:vi="http://www.openlinksw.com/virtuoso/xslt/"
+    xmlns:opl="http://www.openlinksw.com/schema/attribution#"
+    xmlns:rdf="&rdf;"
+    xmlns:foaf="&foaf;"
+    xmlns:bibo="&bibo;"
+    xmlns:sioc="&sioc;"
+    xmlns:geo="&geo;"
+    xmlns:dcterms="&dcterms;"
+    xmlns:gr="&gr;"
+    xmlns:pto="&pto;" 
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:SearchResults="http://www.zillow.com/static/xsd/SearchResults.xsd"
+    xmlns:UpdatedPropertyDetails="http://www.zillow.com/static/xsd/UpdatedPropertyDetails.xsd"
+    xmlns:oplzllw="&oplzllw;"
+    xmlns:zillow="http://www.zillow.com/">
+
+    <xsl:output method="xml" indent="yes" />
+
+    <xsl:param name="baseUri"/>
+
+    <xsl:variable name="resourceURL" select="vi:proxyIRI ($baseUri)"/>
+    <xsl:variable  name="docIRI" select="vi:docIRI($baseUri)"/>
+    <xsl:variable  name="docproxyIRI" select="vi:docproxyIRI($baseUri)"/>
+
+	<!-- Process GetDeepSearchResults response -->
+
+    <xsl:template match="/response">
+		<rdf:RDF>
+			<rdf:Description rdf:about="{$docproxyIRI}">
+				<rdf:type rdf:resource="&bibo;Document"/>
+				<dc:title><xsl:value-of select="$baseUri"/></dc:title>
+				<sioc:container_of rdf:resource="{$resourceURL}"/>
+				<dcterms:subject rdf:resource="{$resourceURL}"/>
+				<foaf:primaryTopic rdf:resource="{$resourceURL}"/>
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Vendor')}"/>
+				<foaf:topic rdf:resource="{vi:proxyIRI ($baseUri, '', 'Offer')}"/>
+				<owl:sameAs rdf:resource="{$docIRI}"/>
+			</rdf:Description>
+			<xsl:apply-templates select="property"/>
+			<xsl:apply-templates select="listing"/>
+		</rdf:RDF>
+    </xsl:template>
+	
+	<xsl:template match="property|listing">
+		<gr:Offering rdf:about="{vi:proxyIRI($baseUri, '', 'Offer')}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.zoopla.com#this">
+                                 			<foaf:name>Zoopla</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.zoopla.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+			<xsl:if test="listing_status = 'rent'">
+				<gr:hasBusinessFunction rdf:resource="&gr;LeaseOut"/>
+			</xsl:if>
+			<xsl:if test="listing_status != 'rent'">
+				<gr:hasBusinessFunction rdf:resource="&gr;Sell"/>
+			</xsl:if>
+			<rdfs:label>
+				<xsl:value-of select="concat(displayable_address, address, ' ', county, ' ', country)"/>
+			</rdfs:label>
+			<gr:includes rdf:resource="{$resourceURL}"/>
+			<xsl:apply-templates mode="offering"/>
+		</gr:Offering>
+
+		<gr:BusinessEntity rdf:about="{vi:proxyIRI ($baseUri, '', 'Vendor')}">
+			<rdfs:comment>The legal agent making the offering</rdfs:comment>
+			<rdfs:label>Zoopla</rdfs:label>
+			<gr:legalName>Zoopla</gr:legalName>
+			<gr:offers rdf:resource="{vi:proxyIRI ($baseUri, '', 'Offer')}"/>
+			<foaf:homepage rdf:resource="http://www.zoopla.co.uk" />
+			<rdfs:seeAlso rdf:resource="{vi:proxyIRI ('http://www.zoopla.co.uk')}"/>
+		</gr:BusinessEntity>
+		
+		<rdf:Description rdf:about="{$resourceURL}">
+                                 	<opl:providedBy>
+                                 		<foaf:Organization rdf:about="http://www.zoopla.com#this">
+                                 			<foaf:name>Zoopla</foaf:name>
+                                 			<foaf:homepage rdf:resource="http://www.zoopla.com"/>
+                                 		</foaf:Organization>
+                                 	</opl:providedBy>
+			<rdf:type rdf:resource="&gr;ProductOrServicesSomeInstancesPlaceholder" />
+			<rdf:type rdf:resource="&oplzllw;Product" />
+			<sioc:has_container rdf:resource="{$docproxyIRI}"/>
+			<gr:amountOfThisGood>1</gr:amountOfThisGood>
+			<gr:offers rdf:resource="{vi:proxyIRI ($baseUri, '', 'Offer')}"/>
+			<rdfs:label>
+				<xsl:value-of select="concat(displayable_address, address, ' ', county, ' ', country)"/>
+			</rdfs:label>
+			<xsl:if test="address">
+				<oplzllw:address><xsl:value-of select="address"/></oplzllw:address>
+			</xsl:if>
+			<xsl:if test="street">
+				<oplzllw:street><xsl:value-of select="street"/></oplzllw:street>
+			</xsl:if>
+			<xsl:if test="town">
+				<oplzllw:city><xsl:value-of select="town"/></oplzllw:city>
+			</xsl:if>
+			<xsl:if test="string-length(country) > 0">
+				<oplzllw:country><xsl:value-of select="country"/></oplzllw:country>
+			</xsl:if>
+			<xsl:if test="county">
+				<oplzllw:state><xsl:value-of select="county"/></oplzllw:state>
+			</xsl:if>
+			<xsl:if test="details_url">
+				<rdfs:seeAlso rdf:resource="{details_url}"/>
+			</xsl:if>
+			<xsl:if test="refine_estimate_url">
+				<rdfs:seeAlso rdf:resource="{refine_estimate_url}"/>
+			</xsl:if>
+			<xsl:if test="longitude">
+				<geo:long><xsl:value-of select="longitude"/></geo:long>
+			</xsl:if>
+			<xsl:if test="latitude">
+				<geo:lat><xsl:value-of select="latitude"/></geo:lat>
+			</xsl:if>
+			<xsl:if test="postcode">
+				<oplzllw:postalCode><xsl:value-of select="postcode"/></oplzllw:postalCode>
+			</xsl:if>
+			<xsl:if test="description">
+				<oplzllw:homeDescription><xsl:value-of select="description"/></oplzllw:homeDescription>
+			</xsl:if>
+			<xsl:if test="displayable_address">
+				<oplzllw:address><xsl:value-of select="displayable_address"/></oplzllw:address>
+			</xsl:if>
+			<xsl:if test="image_url">
+				<foaf:depiction rdf:resource="{image_url}"/>
+			</xsl:if>
+			<xsl:if test="num_bathrooms">
+				<oplzllw:bathrooms><xsl:value-of select="num_bathrooms"/></oplzllw:bathrooms>
+			</xsl:if>
+			<xsl:if test="num_bedrooms">
+				<oplzllw:bedrooms><xsl:value-of select="num_bedrooms"/></oplzllw:bedrooms>
+			</xsl:if>
+			<xsl:if test="num_floors">
+				<oplzllw:numFloors><xsl:value-of select="num_floors"/></oplzllw:numFloors>
+			</xsl:if>
+			<xsl:if test="num_recepts">
+				<oplzllw:recepts><xsl:value-of select="num_recepts"/></oplzllw:recepts>
+			</xsl:if>
+			<xsl:if test="post_town">
+				<oplzllw:city><xsl:value-of select="post_town"/></oplzllw:city>
+			</xsl:if>
+			<xsl:if test="thumbnail_url">
+				<foaf:depiction rdf:resource="{thumbnail_url}"/>
+			</xsl:if>
+			<xsl:if test="street_name">
+				<oplzllw:street><xsl:value-of select="street_name"/></oplzllw:street>
+			</xsl:if>
+			<xsl:if test="string-length(property_type) > 0">
+				<oplzllw:type><xsl:value-of select="property_type"/></oplzllw:type>
+			</xsl:if>
+		</rdf:Description>		
+	</xsl:template>
+	
+	 <xsl:template match="estimate_value" mode="offering">
+		<xsl:variable name="amount" select="." />
+		<gr:hasPriceSpecification>
+			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'estimate_value')}">
+				<rdfs:label>
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' GBP')"/>	
+				</rdfs:label>
+				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
+				<gr:hasCurrency rdf:datatype="&xsd;string">GBP</gr:hasCurrency>
+			</gr:UnitPriceSpecification>
+		</gr:hasPriceSpecification>
+    </xsl:template>
+	
+	<xsl:template match="estimate_value_lower" mode="offering">
+		<xsl:variable name="amount" select="." />
+		<gr:hasPriceSpecification>
+			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'estimate_value_lower')}">
+				<rdfs:label>
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' GBP')"/>	
+				</rdfs:label>
+				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
+				<gr:hasCurrency rdf:datatype="&xsd;string">GBP</gr:hasCurrency>
+			</gr:UnitPriceSpecification>
+		</gr:hasPriceSpecification>
+    </xsl:template>
+
+	<xsl:template match="estimate_value_upper" mode="offering">
+		<xsl:variable name="amount" select="." />
+		<gr:hasPriceSpecification>
+			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'estimate_value_upper')}">
+				<rdfs:label>
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' GBP')"/>	
+				</rdfs:label>
+				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
+				<gr:hasCurrency rdf:datatype="&xsd;string">GBP</gr:hasCurrency>
+			</gr:UnitPriceSpecification>
+		</gr:hasPriceSpecification>
+    </xsl:template>
+
+	<xsl:template match="rental_estimate_value_lower" mode="offering">
+		<xsl:variable name="amount" select="." />
+		<gr:hasPriceSpecification>
+			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'rental_estimate_value_lower')}">
+				<rdfs:label>
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' GBP')"/>	
+				</rdfs:label>
+				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
+				<gr:hasCurrency rdf:datatype="&xsd;string">GBP</gr:hasCurrency>
+			</gr:UnitPriceSpecification>
+		</gr:hasPriceSpecification>
+    </xsl:template>
+
+	<xsl:template match="rental_estimate_value_upper" mode="offering">
+		<xsl:variable name="amount" select="." />
+		<gr:hasPriceSpecification>
+			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'rental_estimate_value_upper')}">
+				<rdfs:label>
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' GBP')"/>	
+				</rdfs:label>
+				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
+				<gr:hasCurrency rdf:datatype="&xsd;string">GBP</gr:hasCurrency>
+			</gr:UnitPriceSpecification>
+		</gr:hasPriceSpecification>
+    </xsl:template>
+
+	<xsl:template match="price" mode="offering">
+		<xsl:variable name="amount" select="." />
+		<gr:hasPriceSpecification>
+			<gr:UnitPriceSpecification rdf:about="{vi:proxyIRI ($baseUri, '', 'price')}">
+				<rdfs:label>
+					<xsl:value-of select="concat( vi:formatAmount($amount), ' GBP')"/>	
+				</rdfs:label>
+				<gr:hasUnitOfMeasurement>C62</gr:hasUnitOfMeasurement>
+				<gr:hasCurrencyValue rdf:datatype="&xsd;float"><xsl:value-of select="$amount"/></gr:hasCurrencyValue>
+				<gr:hasCurrency rdf:datatype="&xsd;string">GBP</gr:hasCurrency>
+			</gr:UnitPriceSpecification>
+		</gr:hasPriceSpecification>
+    </xsl:template>	
+
+    <xsl:template match="text()|@*"/>
+    <xsl:template match="text()|@*" mode="offering" />
+
+</xsl:stylesheet>
diff --git a/binsrc/redland/Makefile.am b/binsrc/redland/Makefile.am
index e0ec170..d8554e4 100644
--- a/binsrc/redland/Makefile.am
+++ b/binsrc/redland/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/redland/Makefile.in b/binsrc/redland/Makefile.in
index ace86b5..b52e13c 100644
--- a/binsrc/redland/Makefile.in
+++ b/binsrc/redland/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/JDBC/BrowserCheck.java b/binsrc/samples/JDBC/BrowserCheck.java
index cea2cf6..27f0388 100644
--- a/binsrc/samples/JDBC/BrowserCheck.java
+++ b/binsrc/samples/JDBC/BrowserCheck.java
@@ -1,14 +1,14 @@
 /*
  *  BrowserCheck.java
  *
- *  $Id: BrowserCheck.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: BrowserCheck.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Check the version of JVM in the browser
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/Makefile.am b/binsrc/samples/JDBC/Makefile.am
index 76334f4..a1d0d96 100644
--- a/binsrc/samples/JDBC/Makefile.am
+++ b/binsrc/samples/JDBC/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/Makefile.in b/binsrc/samples/JDBC/Makefile.in
index 8cecb83..d14ec98 100644
--- a/binsrc/samples/JDBC/Makefile.in
+++ b/binsrc/samples/JDBC/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/JDBC/index.htm b/binsrc/samples/JDBC/index.htm
index 839dee3..b28420a 100644
--- a/binsrc/samples/JDBC/index.htm
+++ b/binsrc/samples/JDBC/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnection.java b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.bat b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.bat
index f09ad5e..7c879a8 100644
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.bat
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.bat
@@ -2,14 +2,14 @@
 REM
 REM  JDBCDemo.bat
 REM
-REM  $Id: JDBCDemo.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: JDBCDemo.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.java b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.java
index bf19b5d..c6c9b3b 100644
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  JDBCDemo.java
  *
- *  $Id: JDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: JDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.sh b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.sh
index 2fe5c15..0a77e56 100755
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.sh
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/JDBCDemo.sh
@@ -2,14 +2,14 @@
 #
 #  JDBCDemo.sh
 #
-#  $Id: JDBCDemo.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: JDBCDemo.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.html b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.html
index 302d268..c10bb54 100644
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.html
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.java b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.java
index 87daf8e..ae14955 100644
--- a/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.1/JDBCDemo/WebJDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  WebJDBCDemo.java
  *
- *  $Id: WebJDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebJDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.1/index.htm b/binsrc/samples/JDBC/jdk1.1/index.htm
index c233df0..84ba7fc 100644
--- a/binsrc/samples/JDBC/jdk1.1/index.htm
+++ b/binsrc/samples/JDBC/jdk1.1/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnection.java b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.bat b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.bat
index f09ad5e..7c879a8 100644
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.bat
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.bat
@@ -2,14 +2,14 @@
 REM
 REM  JDBCDemo.bat
 REM
-REM  $Id: JDBCDemo.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: JDBCDemo.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.java b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.java
index baeaaa4..ca8003e 100644
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  JDBCDemo.java
  *
- *  $Id: JDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: JDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.sh b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.sh
index 2fe5c15..0a77e56 100755
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.sh
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/JDBCDemo.sh
@@ -2,14 +2,14 @@
 #
 #  JDBCDemo.sh
 #
-#  $Id: JDBCDemo.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: JDBCDemo.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.html b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.html
index 9ec1e8e..638e86a 100644
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.html
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.java b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.java
index 1586727..f606414 100644
--- a/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.2/JDBCDemo/WebJDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  WebJDBCDemo.java
  *
- *  $Id: WebJDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebJDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnection.java b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.bat b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.bat
index e54f9f6..b8203cd 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.bat
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.bat
@@ -2,14 +2,14 @@
 REM
 REM  ScrollDemo2.bat
 REM
-REM  $Id: ScrollDemo2.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: ScrollDemo2.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.java b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.java
index 3ea00b5..0e49f51 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  ScrollDemo2.java
  *
- *  $Id: ScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: ScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.sh b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.sh
index 16413cb..6669491 100755
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.sh
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/ScrollDemo2.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: ScrollDemo2.sh,v 1.2 2009/04/14 12:16:49 source Exp $
+#  $Id: ScrollDemo2.sh,v 1.2.2.1 2012/03/08 12:55:03 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.html b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.html
index 1a3e3f5..8674f6f 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.html
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.java b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.java
index 79e4291..1d4b277 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/WebScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  WebScrollDemo2.java
  *
- *  $Id: WebScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/index.htm b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/index.htm
index eb3ddd2..b49e95b 100644
--- a/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/index.htm
+++ b/binsrc/samples/JDBC/jdk1.2/ScrollDemo2/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.2/index.htm b/binsrc/samples/JDBC/jdk1.2/index.htm
index 78fd061..50d9622 100644
--- a/binsrc/samples/JDBC/jdk1.2/index.htm
+++ b/binsrc/samples/JDBC/jdk1.2/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnection.java b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.bat b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.bat
index f09ad5e..7c879a8 100644
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.bat
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.bat
@@ -2,14 +2,14 @@
 REM
 REM  JDBCDemo.bat
 REM
-REM  $Id: JDBCDemo.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: JDBCDemo.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.java b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.java
index 6bab0e0..2cd27c4 100644
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  JDBCDemo.java
  *
- *  $Id: JDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: JDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.sh b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.sh
index 2fe5c15..0a77e56 100755
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.sh
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/JDBCDemo.sh
@@ -2,14 +2,14 @@
 #
 #  JDBCDemo.sh
 #
-#  $Id: JDBCDemo.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: JDBCDemo.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.html b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.html
index e2f2b7e..e0e318d 100644
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.html
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.java b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.java
index 1586727..f606414 100644
--- a/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.3/JDBCDemo/WebJDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  WebJDBCDemo.java
  *
- *  $Id: WebJDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebJDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnection.java b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.bat b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.bat
index 367849f..a40389d 100644
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.bat
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.bat
@@ -2,14 +2,14 @@
 REM
 REM  ScrollDemo2.bat
 REM
-REM  $Id: ScrollDemo2.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: ScrollDemo2.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.java b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.java
index 61053b1..20b6ae6 100644
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  ScrollDemo2.java
  *
- *  $Id: ScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: ScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.sh b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.sh
index 71e22f9..4b7f471 100755
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.sh
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/ScrollDemo2.sh
@@ -2,14 +2,14 @@
 #
 #  ScrollDemo2.sh
 #
-#  $Id: ScrollDemo2.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: ScrollDemo2.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.html b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.html
index c33dcbe..ebaa184 100644
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.html
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.java b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.java
index 3acb998..ae70184 100644
--- a/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.3/ScrollDemo2/WebScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  WebScrollDemo2.java
  *
- *  $Id: WebScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.3/index.htm b/binsrc/samples/JDBC/jdk1.3/index.htm
index a38d5b8..5c62cca 100644
--- a/binsrc/samples/JDBC/jdk1.3/index.htm
+++ b/binsrc/samples/JDBC/jdk1.3/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.bat b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.bat
index 711ad19..ca0e350 100644
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.bat
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.bat
@@ -2,14 +2,14 @@
 REM
 REM  CachedRowSet.bat
 REM
-REM  $Id: CachedRowSet.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: CachedRowSet.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.java b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.java
index afc5f13..61bdf26 100644
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.java
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.java
@@ -1,14 +1,14 @@
 /*
  *  CachedRowSet.java
  *
- *  $Id: CachedRowSet.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: CachedRowSet.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.sh b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.sh
index 6fd09b0..452a10c 100755
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.sh
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/CachedRowSet.sh
@@ -2,14 +2,14 @@
 #
 #  CachedRowSet.sh
 #
-#  $Id: CachedRowSet.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: CachedRowSet.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnection1.java b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnection1.java
index ad58cb7..2aec121 100644
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnection1.java
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnection1.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection1.java
  *
- *  $Id: DialogConnection1.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection1.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnectionList1.java b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnectionList1.java
index f63b914..09460a9 100644
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnectionList1.java
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/DialogConnectionList1.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList1.java
  *
- *  $Id: DialogConnectionList1.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList1.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.html b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.html
index 272e6c2..b88ee3f 100644
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.html
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.java b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.java
index 9b75459..76cf0b9 100644
--- a/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.java
+++ b/binsrc/samples/JDBC/jdk1.4/CachedRowSet/WebCachedRowSet.java
@@ -1,14 +1,14 @@
 /*
  *  WebCachedRowSet.java
  *
- *  $Id: WebCachedRowSet.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebCachedRowSet.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnection.java b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.bat b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.bat
index f09ad5e..7c879a8 100644
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.bat
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.bat
@@ -2,14 +2,14 @@
 REM
 REM  JDBCDemo.bat
 REM
-REM  $Id: JDBCDemo.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: JDBCDemo.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.java b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.java
index c181736..c84f56f 100644
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  JDBCDemo.java
  *
- *  $Id: JDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: JDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.sh b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.sh
index 2fe5c15..0a77e56 100755
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.sh
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/JDBCDemo.sh
@@ -2,14 +2,14 @@
 #
 #  JDBCDemo.sh
 #
-#  $Id: JDBCDemo.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: JDBCDemo.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.html b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.html
index 0569058..da285d6 100644
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.html
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.java b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.java
index 87daf8e..ae14955 100644
--- a/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.4/JDBCDemo/WebJDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  WebJDBCDemo.java
  *
- *  $Id: WebJDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebJDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnection.java b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.bat b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.bat
index 367849f..a40389d 100644
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.bat
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.bat
@@ -2,14 +2,14 @@
 REM
 REM  ScrollDemo2.bat
 REM
-REM  $Id: ScrollDemo2.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: ScrollDemo2.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.java b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.java
index dfd74d0..2a3eae7 100644
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  ScrollDemo2.java
  *
- *  $Id: ScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: ScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.sh b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.sh
index 71e22f9..4b7f471 100755
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.sh
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/ScrollDemo2.sh
@@ -2,14 +2,14 @@
 #
 #  ScrollDemo2.sh
 #
-#  $Id: ScrollDemo2.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: ScrollDemo2.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.html b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.html
index 0f79303..ae17514 100644
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.html
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.java b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.java
index 3acb998..ae70184 100644
--- a/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.4/ScrollDemo2/WebScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  WebScrollDemo2.java
  *
- *  $Id: WebScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.4/index.htm b/binsrc/samples/JDBC/jdk1.4/index.htm
index 9cb148a..0fb24b0 100644
--- a/binsrc/samples/JDBC/jdk1.4/index.htm
+++ b/binsrc/samples/JDBC/jdk1.4/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.bat b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.bat
index 711ad19..ca0e350 100644
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.bat
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.bat
@@ -2,14 +2,14 @@
 REM
 REM  CachedRowSet.bat
 REM
-REM  $Id: CachedRowSet.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: CachedRowSet.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.java b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.java
index afc5f13..61bdf26 100644
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.java
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.java
@@ -1,14 +1,14 @@
 /*
  *  CachedRowSet.java
  *
- *  $Id: CachedRowSet.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: CachedRowSet.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.sh b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.sh
index 6fd09b0..452a10c 100755
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.sh
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/CachedRowSet.sh
@@ -2,14 +2,14 @@
 #
 #  CachedRowSet.sh
 #
-#  $Id: CachedRowSet.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: CachedRowSet.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnection1.java b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnection1.java
index ad58cb7..2aec121 100644
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnection1.java
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnection1.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection1.java
  *
- *  $Id: DialogConnection1.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection1.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnectionList1.java b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnectionList1.java
index f63b914..09460a9 100644
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnectionList1.java
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/DialogConnectionList1.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList1.java
  *
- *  $Id: DialogConnectionList1.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList1.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.html b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.html
index 272e6c2..b88ee3f 100644
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.html
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.java b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.java
index 9b75459..76cf0b9 100644
--- a/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.java
+++ b/binsrc/samples/JDBC/jdk1.5/CachedRowSet/WebCachedRowSet.java
@@ -1,14 +1,14 @@
 /*
  *  WebCachedRowSet.java
  *
- *  $Id: WebCachedRowSet.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebCachedRowSet.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnection.java b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.bat b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.bat
index f09ad5e..7c879a8 100644
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.bat
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.bat
@@ -2,14 +2,14 @@
 REM
 REM  JDBCDemo.bat
 REM
-REM  $Id: JDBCDemo.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: JDBCDemo.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.java b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.java
index c181736..c84f56f 100644
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  JDBCDemo.java
  *
- *  $Id: JDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: JDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.sh b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.sh
index 2fe5c15..0a77e56 100755
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.sh
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/JDBCDemo.sh
@@ -2,14 +2,14 @@
 #
 #  JDBCDemo.sh
 #
-#  $Id: JDBCDemo.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: JDBCDemo.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.html b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.html
index 0569058..da285d6 100644
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.html
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.java b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.java
index 87daf8e..ae14955 100644
--- a/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.java
+++ b/binsrc/samples/JDBC/jdk1.5/JDBCDemo/WebJDBCDemo.java
@@ -1,14 +1,14 @@
 /*
  *  WebJDBCDemo.java
  *
- *  $Id: WebJDBCDemo.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebJDBCDemo.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnection.java b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnection.java
index 860b490..9c30d63 100644
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnection.java
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnection.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnection.java
  *
- *  $Id: DialogConnection.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnection.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnectionList.java b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnectionList.java
index 23361e7..7d2a275 100644
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnectionList.java
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/DialogConnectionList.java
@@ -1,14 +1,14 @@
 /*
  *  DialogConnectionList.java
  *
- *  $Id: DialogConnectionList.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: DialogConnectionList.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  URL picklist
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.bat b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.bat
index 367849f..a40389d 100644
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.bat
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.bat
@@ -2,14 +2,14 @@
 REM
 REM  ScrollDemo2.bat
 REM
-REM  $Id: ScrollDemo2.bat,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+REM  $Id: ScrollDemo2.bat,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 REM
 REM  Java startup script
 rem  
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.java b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.java
index dfd74d0..2a3eae7 100644
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  ScrollDemo2.java
  *
- *  $Id: ScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: ScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.sh b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.sh
index 71e22f9..4b7f471 100755
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.sh
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/ScrollDemo2.sh
@@ -2,14 +2,14 @@
 #
 #  ScrollDemo2.sh
 #
-#  $Id: ScrollDemo2.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: ScrollDemo2.sh,v 1.1.1.1.2.1 2012/03/08 12:55:03 source Exp $
 #
 #  Java startup script
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.html b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.html
index 0f79303..ae17514 100644
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.html
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.java b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.java
index 3acb998..266baf1 100644
--- a/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.java
+++ b/binsrc/samples/JDBC/jdk1.5/ScrollDemo2/WebScrollDemo2.java
@@ -1,14 +1,14 @@
 /*
  *  WebScrollDemo2.java
  *
- *  $Id: WebScrollDemo2.java,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+ *  $Id: WebScrollDemo2.java,v 1.1.1.1.2.1 2012/03/08 12:55:04 source Exp $
  *
  *  Sample JDBC program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/JDBC/jdk1.5/index.htm b/binsrc/samples/JDBC/jdk1.5/index.htm
index daef147..70b2e1a 100644
--- a/binsrc/samples/JDBC/jdk1.5/index.htm
+++ b/binsrc/samples/JDBC/jdk1.5/index.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/Makefile.am b/binsrc/samples/Makefile.am
index 4a73c5a..1fac926 100644
--- a/binsrc/samples/Makefile.am
+++ b/binsrc/samples/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/Makefile.in b/binsrc/samples/Makefile.in
index 407a1fd..b659053 100644
--- a/binsrc/samples/Makefile.in
+++ b/binsrc/samples/Makefile.in
@@ -118,6 +118,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -166,6 +167,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -217,6 +219,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -263,7 +266,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -293,7 +295,7 @@ vaddir = @vaddir@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/Makefile.am b/binsrc/samples/demo/Makefile.am
index a439ebe..f3b294a 100644
--- a/binsrc/samples/demo/Makefile.am
+++ b/binsrc/samples/demo/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/Makefile.in b/binsrc/samples/demo/Makefile.in
index 69c8723..8105eca 100644
--- a/binsrc/samples/demo/Makefile.in
+++ b/binsrc/samples/demo/Makefile.in
@@ -104,6 +104,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -152,6 +153,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -191,7 +193,7 @@ SYSLIBS = @SYSLIBS@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -224,6 +226,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -270,7 +273,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/demo/art.sql b/binsrc/samples/demo/art.sql
index fc6327c..006bf0e 100644
--- a/binsrc/samples/demo/art.sql
+++ b/binsrc/samples/demo/art.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: art.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: art.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/art_vad.sql b/binsrc/samples/demo/art_vad.sql
index 691ca0f..c4426ca 100644
--- a/binsrc/samples/demo/art_vad.sql
+++ b/binsrc/samples/demo/art_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: art_vad.sql,v 1.1.2.1 2009/11/06 17:17:05 source Exp $
+--  $Id: art_vad.sql,v 1.1.2.2 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/check_demo.sql b/binsrc/samples/demo/check_demo.sql
index d2243e9..8101b9c 100644
--- a/binsrc/samples/demo/check_demo.sql
+++ b/binsrc/samples/demo/check_demo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: check_demo.sql,v 1.4 2007/11/19 13:33:36 source Exp $
+--  $Id: check_demo.sql,v 1.4.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/countries.sql b/binsrc/samples/demo/countries.sql
index 1259881..540d231 100644
--- a/binsrc/samples/demo/countries.sql
+++ b/binsrc/samples/demo/countries.sql
@@ -1,14 +1,14 @@
 --
 --  countries.sql
 --
---  $Id: countries.sql,v 1.3 2006/05/26 11:23:44 source Exp $
+--  $Id: countries.sql,v 1.3.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  Creates a countries database
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/countries_vad.sql b/binsrc/samples/demo/countries_vad.sql
index 4b51fa0..119da57 100644
--- a/binsrc/samples/demo/countries_vad.sql
+++ b/binsrc/samples/demo/countries_vad.sql
@@ -1,14 +1,14 @@
 --
 --  countries.sql
 --
---  $Id: countries_vad.sql,v 1.3 2007/04/03 09:58:59 source Exp $
+--  $Id: countries_vad.sql,v 1.3.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  Creates a countries database
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/default-virtuoso.ini b/binsrc/samples/demo/default-virtuoso.ini
index e74905d..0699332 100644
--- a/binsrc/samples/demo/default-virtuoso.ini
+++ b/binsrc/samples/demo/default-virtuoso.ini
@@ -58,8 +58,6 @@ DisableTcpSocket		= 0
 ServerThreads			= 20
 CheckpointInterval		= 60
 O_DIRECT			= 0
-NumberOfBuffers			= 5000
-MaxDirtyBuffers			= 3200
 CaseMode			= 2
 MaxStaticCursorRows		= 5000
 CheckpointAuditTrail		= 0
@@ -75,7 +73,42 @@ VADInstallDir			= @VADDIR@/
 PrefixResultNames               = 0
 RdfFreeTextRulesSize		= 100
 IndexTreeMaps			= 256
-
+MaxMemPoolSize                  = 200000000
+PrefixResultNames               = 0
+MacSpotlight                    = 0
+IndexTreeMaps                   = 64
+;;
+;; When running with large data sets, one should configure the Virtuoso
+;; process to use between 2/3 to 3/5 of free system memory and to stripe
+;; storage on all available disks.
+;;
+;; Uncomment next two lines if there is 2 GB system memory free
+;       NumberOfBuffers          = 170000
+;       MaxDirtyBuffers          = 130000
+;; Uncomment next two lines if there is 4 GB system memory free
+;       NumberOfBuffers          = 340000
+;       MaxDirtyBuffers          = 250000
+;; Uncomment next two lines if there is 8 GB system memory free
+;       NumberOfBuffers          = 680000
+;       MaxDirtyBuffers          = 500000
+;; Uncomment next two lines if there is 16 GB system memory free
+;       NumberOfBuffers          = 1360000
+;       MaxDirtyBuffers          = 1000000
+;; Uncomment next two lines if there is 32 GB system memory free
+;       NumberOfBuffers          = 2720000
+;       MaxDirtyBuffers          = 2000000
+;; Uncomment next two lines if there is 48 GB system memory free
+;       NumberOfBuffers          = 4000000
+;       MaxDirtyBuffers          = 3000000
+;; Uncomment next two lines if there is 64 GB system memory free
+;       NumberOfBuffers          = 5450000
+;       MaxDirtyBuffers          = 4000000
+;;
+;; Note the default settings will take very little memory
+;; but will not result in very good performance
+;;
+NumberOfBuffers          = 10000
+MaxDirtyBuffers          = 6000
 
 
 [HTTPServer]
@@ -95,6 +128,7 @@ ProxyConnectionCacheTimeout	= 15
 HTTPThreadSize			= 280000
 HttpPrintWarningsInOutput	= 0
 Charset				= UTF-8
+;HTTPLogFile		        = logs/http.log
 
 [AutoRepair]
 BadParentLinks			= 0
@@ -184,7 +218,7 @@ ServerName			= @ZNAME@
 
 
 [URIQA]
-DynamicLocal			= 1
+DynamicLocal			= 0
 DefaultHost			= localhost:@HTTP_PORT@
 
 
@@ -196,7 +230,7 @@ DefaultHost			= localhost:@HTTP_PORT@
 ResultSetMaxRows           	= 10000
 MaxQueryCostEstimationTime 	= 400	; in seconds
 MaxQueryExecutionTime      	= 60	; in seconds
-DefaultQuery               	= select distinct ?Concept where {[] a ?Concept}
+DefaultQuery               	= select distinct ?Concept where {[] a ?Concept} LIMIT 100
 DeferInferenceRulesInit    	= 0  ; controls inference rules loading
 ;PingService       		= http://rpc.pingthesemanticweb.com/
 
diff --git a/binsrc/samples/demo/doc.owl b/binsrc/samples/demo/doc.owl
index dce28b5..ea4de55 100644
--- a/binsrc/samples/demo/doc.owl
+++ b/binsrc/samples/demo/doc.owl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: doc.owl,v 1.2 2008/03/24 17:26:06 source Exp $
+ -  $Id: doc.owl,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/drop.sql b/binsrc/samples/demo/drop.sql
index 2e1113f..424f149 100644
--- a/binsrc/samples/demo/drop.sql
+++ b/binsrc/samples/demo/drop.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: drop.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: drop.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/make_vad.sh b/binsrc/samples/demo/make_vad.sh
index dfee25a..6591d44 100755
--- a/binsrc/samples/demo/make_vad.sh
+++ b/binsrc/samples/demo/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.18.2.4 2011/02/03 10:37:51 source Exp $
+#  $Id: make_vad.sh,v 1.18.2.5 2012/03/08 12:55:04 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -357,7 +357,7 @@ sticker_init() {
   echo "  <name package=\"Demo\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"Demo Database\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso/demo/download\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso/demo/download\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
diff --git a/binsrc/samples/demo/mkdemo.bat b/binsrc/samples/demo/mkdemo.bat
index d957c73..e2cf755 100644
--- a/binsrc/samples/demo/mkdemo.bat
+++ b/binsrc/samples/demo/mkdemo.bat
@@ -2,7 +2,7 @@ rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mkdemo.sh b/binsrc/samples/demo/mkdemo.sh
index 87de4ab..c30acd3 100755
--- a/binsrc/samples/demo/mkdemo.sh
+++ b/binsrc/samples/demo/mkdemo.sh
@@ -2,14 +2,14 @@
 #
 #  mkdemo.sh
 #
-#  $Id: mkdemo.sh,v 1.33.2.4 2010/09/21 13:12:36 source Exp $
+#  $Id: mkdemo.sh,v 1.33.2.5 2012/03/08 12:55:04 source Exp $
 #
 #  Creates a demo database
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mkdemo.sql b/binsrc/samples/demo/mkdemo.sql
index 100ec12..d00c3d1 100644
--- a/binsrc/samples/demo/mkdemo.sql
+++ b/binsrc/samples/demo/mkdemo.sql
@@ -1,14 +1,14 @@
 --
 --  mkdemo.sql
 --
---  $Id: mkdemo.sql,v 1.4 2007/11/19 13:33:36 source Exp $
+--  $Id: mkdemo.sql,v 1.4.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  Creates a demo database
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mkdemo_vad.sql b/binsrc/samples/demo/mkdemo_vad.sql
index 08dca05..1bcb623 100644
--- a/binsrc/samples/demo/mkdemo_vad.sql
+++ b/binsrc/samples/demo/mkdemo_vad.sql
@@ -1,14 +1,14 @@
 --
 --  mkdemo.sql
 --
---  $Id: mkdemo_vad.sql,v 1.4.2.1 2009/11/25 22:11:16 source Exp $
+--  $Id: mkdemo_vad.sql,v 1.4.2.2 2012/03/08 12:55:04 source Exp $
 --
 --  Creates a demo database
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mkdoc.sh b/binsrc/samples/demo/mkdoc.sh
index 12393a8..2ffd1e0 100755
--- a/binsrc/samples/demo/mkdoc.sh
+++ b/binsrc/samples/demo/mkdoc.sh
@@ -2,14 +2,14 @@
 #
 #  mkdoc.sh
 #
-#  $Id: mkdoc.sh,v 1.20.2.2 2011/02/03 10:37:51 source Exp $
+#  $Id: mkdoc.sh,v 1.20.2.3 2012/03/08 12:55:04 source Exp $
 #
 #  Creates Virtuoso Documentation
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -387,7 +387,7 @@ sticker_init() {
   echo "  <name package=\"doc\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"Virtuoso Documentation\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
diff --git a/binsrc/samples/demo/mkdoc.sql b/binsrc/samples/demo/mkdoc.sql
index c241150..85e8f89 100644
--- a/binsrc/samples/demo/mkdoc.sql
+++ b/binsrc/samples/demo/mkdoc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mkdoc.sql,v 1.3 2008/09/16 21:04:29 source Exp $
+--  $Id: mkdoc.sql,v 1.3.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mkdoc_new.sql b/binsrc/samples/demo/mkdoc_new.sql
index 94dcdd6..6f4a239 100644
--- a/binsrc/samples/demo/mkdoc_new.sql
+++ b/binsrc/samples/demo/mkdoc_new.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mkdoc_new.sql,v 1.8 2008/01/18 13:56:33 source Exp $
+--  $Id: mkdoc_new.sql,v 1.8.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mksearch.sql b/binsrc/samples/demo/mksearch.sql
index 97a7dde..7264b4c 100644
--- a/binsrc/samples/demo/mksearch.sql
+++ b/binsrc/samples/demo/mksearch.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mksearch.sql,v 1.4 2007/05/08 17:44:50 source Exp $
+--  $Id: mksearch.sql,v 1.4.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/mkvspxdoc.sql b/binsrc/samples/demo/mkvspxdoc.sql
index 7f0e7ca..74bcd7e 100644
--- a/binsrc/samples/demo/mkvspxdoc.sql
+++ b/binsrc/samples/demo/mkvspxdoc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mkvspxdoc.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: mkvspxdoc.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/demo/nw.owl b/binsrc/samples/demo/nw.owl
index 41aa26f..3574cfd 100644
--- a/binsrc/samples/demo/nw.owl
+++ b/binsrc/samples/demo/nw.owl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: nw.owl,v 1.4.2.2 2009/12/15 23:01:44 source Exp $
+ -  $Id: nw.owl,v 1.4.2.3 2012/03/08 12:55:04 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/hslookup/Makefile.am b/binsrc/samples/hslookup/Makefile.am
index 57d5dba..2f018f7 100644
--- a/binsrc/samples/hslookup/Makefile.am
+++ b/binsrc/samples/hslookup/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/hslookup/Makefile.in b/binsrc/samples/hslookup/Makefile.in
index 52beeb4..af3aeae 100644
--- a/binsrc/samples/hslookup/Makefile.in
+++ b/binsrc/samples/hslookup/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -147,6 +147,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -195,6 +196,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -246,6 +248,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -292,7 +295,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/hslookup/hslookup.c b/binsrc/samples/hslookup/hslookup.c
index 2a34754..b53249e 100644
--- a/binsrc/samples/hslookup/hslookup.c
+++ b/binsrc/samples/hslookup/hslookup.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -38,7 +38,7 @@
 #include <time.h>
 
 #ifdef WIN32  
-#include <hdl/handle.h>
+#include <handle.h>
 #else
 #include <hdl/hdl.h>
 #endif
diff --git a/binsrc/samples/image_magick/Makefile.am b/binsrc/samples/image_magick/Makefile.am
index d75d129..dd7b0cb 100644
--- a/binsrc/samples/image_magick/Makefile.am
+++ b/binsrc/samples/image_magick/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/image_magick/Makefile.in b/binsrc/samples/image_magick/Makefile.in
index 8fa08d3..e6636fa 100644
--- a/binsrc/samples/image_magick/Makefile.in
+++ b/binsrc/samples/image_magick/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -146,6 +146,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -194,6 +195,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -245,6 +247,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -291,7 +294,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/image_magick/demo.sql b/binsrc/samples/image_magick/demo.sql
index 891d57a..0fd7e3f 100644
--- a/binsrc/samples/image_magick/demo.sql
+++ b/binsrc/samples/image_magick/demo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: demo.sql,v 1.3 2007/01/22 13:16:17 source Exp $
+--  $Id: demo.sql,v 1.3.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/image_magick/im.c b/binsrc/samples/image_magick/im.c
index 8efcf86..0584edf 100644
--- a/binsrc/samples/image_magick/im.c
+++ b/binsrc/samples/image_magick/im.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -696,6 +696,7 @@ caddr_t bif_im_DeepZoom4to1 (caddr_t * qst, caddr_t * err, state_slot_t ** args)
   im_env_t env;
   caddr_t res;
   int fmt_is_set = 0;
+  int image_ctr;
   im_init (&env, qst, args, "IM DeepZoom4to1");
   im_set_background (&env, "#000000");
   env.ime_target_magick_wand = NewMagickWand ();
@@ -709,7 +710,7 @@ caddr_t bif_im_DeepZoom4to1 (caddr_t * qst, caddr_t * err, state_slot_t ** args)
     im_leave_with_error (&env, "22023", "IM001", "Can not set image extent");
   if (MagickFalse == MagickSetImageBackgroundColor (env.ime_target_magick_wand, env.ime_background))
     im_leave_with_error (&env, "22023", "IM001", "Can not set image background");
-  int image_ctr = BOX_ELEMENTS (args) / 2;
+  image_ctr = BOX_ELEMENTS (args) / 2;
   if (image_ctr > 4)
     image_ctr = 4;
   while (0 < image_ctr--)
@@ -764,6 +765,7 @@ bif_im_AnnotateImageBlob (caddr_t * qst, caddr_t * err, state_slot_t ** args)
   long f_size = n_args > 5 ? bif_long_arg (qst, args, 5, szMe) : 12;
   char *text_color = n_args > 6 ? bif_string_arg (qst, args, 6, szMe) : "black" ;
   dtp_t dtp = DV_TYPE_OF (blob);
+  im_env_t env;
   im_init (&env, qst, args, "IM AnnotateImageBlob");
   if (IS_STRING_DTP (dtp))
     blob_size = box_length (blob) - 1;
diff --git a/binsrc/samples/odp/Makefile.am b/binsrc/samples/odp/Makefile.am
index 4271ecc..becc8ce 100644
--- a/binsrc/samples/odp/Makefile.am
+++ b/binsrc/samples/odp/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/Makefile.in b/binsrc/samples/odp/Makefile.in
index 10d9c25..3249443 100644
--- a/binsrc/samples/odp/Makefile.in
+++ b/binsrc/samples/odp/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/odp/_current_config.sql b/binsrc/samples/odp/_current_config.sql
index 3f54670..a29022b 100644
--- a/binsrc/samples/odp/_current_config.sql
+++ b/binsrc/samples/odp/_current_config.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: _current_config.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: _current_config.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/all_profiles.vsp b/binsrc/samples/odp/http/all_profiles.vsp
index eb9965f..19c20c0 100644
--- a/binsrc/samples/odp/http/all_profiles.vsp
+++ b/binsrc/samples/odp/http/all_profiles.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: all_profiles.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: all_profiles.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/dmoz_s1.vsp b/binsrc/samples/odp/http/dmoz_s1.vsp
index 022ec4e..9d2295b 100644
--- a/binsrc/samples/odp/http/dmoz_s1.vsp
+++ b/binsrc/samples/odp/http/dmoz_s1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dmoz_s1.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: dmoz_s1.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/edit_topic.vsp b/binsrc/samples/odp/http/edit_topic.vsp
index 654e86d..3df3854 100644
--- a/binsrc/samples/odp/http/edit_topic.vsp
+++ b/binsrc/samples/odp/http/edit_topic.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: edit_topic.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: edit_topic.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/editor.vsp b/binsrc/samples/odp/http/editor.vsp
index a4e6519..9ffee61 100644
--- a/binsrc/samples/odp/http/editor.vsp
+++ b/binsrc/samples/odp/http/editor.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: editor.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: editor.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/editors.vsp b/binsrc/samples/odp/http/editors.vsp
index 85db7bf..0e92b8a 100644
--- a/binsrc/samples/odp/http/editors.vsp
+++ b/binsrc/samples/odp/http/editors.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: editors.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: editors.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/main.vsp b/binsrc/samples/odp/http/main.vsp
index 58d81d8..104ee74 100644
--- a/binsrc/samples/odp/http/main.vsp
+++ b/binsrc/samples/odp/http/main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: main.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: main.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/perform_search.vsp b/binsrc/samples/odp/http/perform_search.vsp
index 78fb508..60e2f7a 100644
--- a/binsrc/samples/odp/http/perform_search.vsp
+++ b/binsrc/samples/odp/http/perform_search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: perform_search.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: perform_search.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/search.vsp b/binsrc/samples/odp/http/search.vsp
index e4a5061..3f7aa6e 100644
--- a/binsrc/samples/odp/http/search.vsp
+++ b/binsrc/samples/odp/http/search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: search.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: search.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/status.vsp b/binsrc/samples/odp/http/status.vsp
index 4c2d83a..38e1b1e 100644
--- a/binsrc/samples/odp/http/status.vsp
+++ b/binsrc/samples/odp/http/status.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: status.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: status.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/topic.vsp b/binsrc/samples/odp/http/topic.vsp
index 244d5a0..82c158d 100644
--- a/binsrc/samples/odp/http/topic.vsp
+++ b/binsrc/samples/odp/http/topic.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: topic.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: topic.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/http/topic_descr.vsp b/binsrc/samples/odp/http/topic_descr.vsp
index 5b233ee..0fea9fb 100644
--- a/binsrc/samples/odp/http/topic_descr.vsp
+++ b/binsrc/samples/odp/http/topic_descr.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: topic_descr.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: topic_descr.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/odp_boot.sql b/binsrc/samples/odp/odp_boot.sql
index 35c2bff..2efdeba 100644
--- a/binsrc/samples/odp/odp_boot.sql
+++ b/binsrc/samples/odp/odp_boot.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: odp_boot.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: odp_boot.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/odp_lib.sql b/binsrc/samples/odp/odp_lib.sql
index 1fef20b..342fb72 100644
--- a/binsrc/samples/odp/odp_lib.sql
+++ b/binsrc/samples/odp/odp_lib.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: odp_lib.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: odp_lib.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/odp_vsp.sql b/binsrc/samples/odp/odp_vsp.sql
index 51ea462..c27d879 100644
--- a/binsrc/samples/odp/odp_vsp.sql
+++ b/binsrc/samples/odp/odp_vsp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: odp_vsp.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: odp_vsp.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/rdf_lib.sql b/binsrc/samples/odp/rdf_lib.sql
index b6e11e9..5669d0f 100644
--- a/binsrc/samples/odp/rdf_lib.sql
+++ b/binsrc/samples/odp/rdf_lib.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rdf_lib.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: rdf_lib.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/setup.isql b/binsrc/samples/odp/setup.isql
index 332da64..ca06ac1 100644
--- a/binsrc/samples/odp/setup.isql
+++ b/binsrc/samples/odp/setup.isql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/odp/virtodp.sh b/binsrc/samples/odp/virtodp.sh
index 8f4bc77..4c11a7c 100755
--- a/binsrc/samples/odp/virtodp.sh
+++ b/binsrc/samples/odp/virtodp.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: virtodp.sh,v 1.2 2009/04/14 12:16:49 source Exp $
+#  $Id: virtodp.sh,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/Makefile.am b/binsrc/samples/sparql_demo/Makefile.am
index ba64b9e..82a7109 100644
--- a/binsrc/samples/sparql_demo/Makefile.am
+++ b/binsrc/samples/sparql_demo/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/Makefile.in b/binsrc/samples/sparql_demo/Makefile.in
index c28dc65..5d22106 100644
--- a/binsrc/samples/sparql_demo/Makefile.in
+++ b/binsrc/samples/sparql_demo/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -123,6 +123,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -171,6 +172,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -222,6 +224,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -268,7 +271,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/sparql_demo/data_upload.vsp b/binsrc/samples/sparql_demo/data_upload.vsp
index d06697d..39cc86b 100644
--- a/binsrc/samples/sparql_demo/data_upload.vsp
+++ b/binsrc/samples/sparql_demo/data_upload.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: data_upload.vsp,v 1.4 2006/08/03 18:48:32 source Exp $
+--  $Id: data_upload.vsp,v 1.4.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/default.css b/binsrc/samples/sparql_demo/default.css
index eecbeff..2e60505 100644
--- a/binsrc/samples/sparql_demo/default.css
+++ b/binsrc/samples/sparql_demo/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.16.2.1 2009/10/07 19:37:48 source Exp $
+ *  $Id: default.css,v 1.16.2.2 2012/03/08 12:55:04 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/explain.vsp b/binsrc/samples/sparql_demo/explain.vsp
index 9c81bf9..2249178 100644
--- a/binsrc/samples/sparql_demo/explain.vsp
+++ b/binsrc/samples/sparql_demo/explain.vsp
@@ -1,10 +1,10 @@
 <?vsp
 --
---  $Id: explain.vsp,v 1.1 2006/08/03 18:48:32 source Exp $
+--  $Id: explain.vsp,v 1.1.2.1 2012/03/08 12:55:04 source Exp $
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/load_dawg_usecase.vsp b/binsrc/samples/sparql_demo/load_dawg_usecase.vsp
index 8df9bec..b32e5ba 100644
--- a/binsrc/samples/sparql_demo/load_dawg_usecase.vsp
+++ b/binsrc/samples/sparql_demo/load_dawg_usecase.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: load_dawg_usecase.vsp,v 1.2 2007/01/22 22:04:56 source Exp $
+--  $Id: load_dawg_usecase.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/load_sq.vsp b/binsrc/samples/sparql_demo/load_sq.vsp
index 7b778d1..8d6a46c 100644
--- a/binsrc/samples/sparql_demo/load_sq.vsp
+++ b/binsrc/samples/sparql_demo/load_sq.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: load_sq.vsp,v 1.1 2006/08/03 18:48:32 source Exp $
+--  $Id: load_sq.vsp,v 1.1.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/load_uris.vsp b/binsrc/samples/sparql_demo/load_uris.vsp
index b2c3b47..5d6c5f2 100644
--- a/binsrc/samples/sparql_demo/load_uris.vsp
+++ b/binsrc/samples/sparql_demo/load_uris.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: load_uris.vsp,v 1.1 2006/08/03 18:48:32 source Exp $
+--  $Id: load_uris.vsp,v 1.1.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/make_vad.sh b/binsrc/samples/sparql_demo/make_vad.sh
index 1fc88a9..4b1ba87 100755
--- a/binsrc/samples/sparql_demo/make_vad.sh
+++ b/binsrc/samples/sparql_demo/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.16.2.2 2011/02/03 10:37:51 source Exp $
+#  $Id: make_vad.sh,v 1.16.2.3 2012/03/08 12:55:04 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -269,7 +269,7 @@ sticker_init() {
     echo "  <name package=\"SPARQL Demo\">" >> $STICKER
     echo "    <prop name=\"Title\" value=\"SPARQL Demo\"/>" >> $STICKER
     echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-    echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+    echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
     echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
     echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
     echo "  </name>" >> $STICKER
diff --git a/binsrc/samples/sparql_demo/remote.vsp b/binsrc/samples/sparql_demo/remote.vsp
index d77eb3b..8584a32 100644
--- a/binsrc/samples/sparql_demo/remote.vsp
+++ b/binsrc/samples/sparql_demo/remote.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: remote.vsp,v 1.1 2006/08/03 18:48:32 source Exp $
+--  $Id: remote.vsp,v 1.1.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/setup.sql b/binsrc/samples/sparql_demo/setup.sql
index 666fc02..2bdb348 100644
--- a/binsrc/samples/sparql_demo/setup.sql
+++ b/binsrc/samples/sparql_demo/setup.sql
@@ -1,10 +1,10 @@
 --
---  $Id: setup.sql,v 1.12.2.1 2009/07/27 22:55:28 source Exp $
+--  $Id: setup.sql,v 1.12.2.2 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/setup_demo_db.sql b/binsrc/samples/sparql_demo/setup_demo_db.sql
index 6101258..cd7e83e 100644
--- a/binsrc/samples/sparql_demo/setup_demo_db.sql
+++ b/binsrc/samples/sparql_demo/setup_demo_db.sql
@@ -1,10 +1,10 @@
 --
---  $Id: setup_demo_db.sql,v 1.9 2007/04/03 10:00:19 source Exp $
+--  $Id: setup_demo_db.sql,v 1.9.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/setup_queries.sql b/binsrc/samples/sparql_demo/setup_queries.sql
index 99e1848..a6ea0af 100644
--- a/binsrc/samples/sparql_demo/setup_queries.sql
+++ b/binsrc/samples/sparql_demo/setup_queries.sql
@@ -1,10 +1,10 @@
 --
---  $Id: setup_queries.sql,v 1.1 2006/08/03 18:48:32 source Exp $
+--  $Id: setup_queries.sql,v 1.1.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/sparql_ajax.js b/binsrc/samples/sparql_demo/sparql_ajax.js
index 0775568..1c04b11 100644
--- a/binsrc/samples/sparql_demo/sparql_ajax.js
+++ b/binsrc/samples/sparql_demo/sparql_ajax.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/sparql_ajax.vsp b/binsrc/samples/sparql_demo/sparql_ajax.vsp
index 6db1557..885a036 100644
--- a/binsrc/samples/sparql_demo/sparql_ajax.vsp
+++ b/binsrc/samples/sparql_demo/sparql_ajax.vsp
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <?vsp 
 --  
---  $Id: sparql_ajax.vsp,v 1.21.2.2 2010/03/18 10:50:28 source Exp $
+--  $Id: sparql_ajax.vsp,v 1.21.2.3 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/sparql_auth.vsp b/binsrc/samples/sparql_demo/sparql_auth.vsp
index d38a14d..1645c53 100644
--- a/binsrc/samples/sparql_demo/sparql_auth.vsp
+++ b/binsrc/samples/sparql_demo/sparql_auth.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sparql_auth.vsp,v 1.1 2006/10/18 12:21:24 source Exp $
+--  $Id: sparql_auth.vsp,v 1.1.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/sparql_demo/sparql_file.vsp b/binsrc/samples/sparql_demo/sparql_file.vsp
index bda95bc..7385a3a 100644
--- a/binsrc/samples/sparql_demo/sparql_file.vsp
+++ b/binsrc/samples/sparql_demo/sparql_file.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sparql_file.vsp,v 1.2 2006/10/26 00:11:54 source Exp $
+--  $Id: sparql_file.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/wbxml2/Makefile.am b/binsrc/samples/wbxml2/Makefile.am
index 8bf8ab4..6ba4f94 100644
--- a/binsrc/samples/wbxml2/Makefile.am
+++ b/binsrc/samples/wbxml2/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/wbxml2/Makefile.in b/binsrc/samples/wbxml2/Makefile.in
index 1f86736..b8f1afd 100644
--- a/binsrc/samples/wbxml2/Makefile.in
+++ b/binsrc/samples/wbxml2/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -147,6 +147,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -195,6 +196,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -246,6 +248,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -292,7 +295,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/wbxml2/wbxml2.c b/binsrc/samples/wbxml2/wbxml2.c
index 0ce5190..bb17af5 100644
--- a/binsrc/samples/wbxml2/wbxml2.c
+++ b/binsrc/samples/wbxml2/wbxml2.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/Makefile.am b/binsrc/samples/webapp/Makefile.am
index 2f4995e..f1cbe4d 100644
--- a/binsrc/samples/webapp/Makefile.am
+++ b/binsrc/samples/webapp/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/Makefile.in b/binsrc/samples/webapp/Makefile.in
index 64128f1..40222ea 100644
--- a/binsrc/samples/webapp/Makefile.in
+++ b/binsrc/samples/webapp/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/webapp/app_common.sql b/binsrc/samples/webapp/app_common.sql
index 70bf8f7..71f3969 100644
--- a/binsrc/samples/webapp/app_common.sql
+++ b/binsrc/samples/webapp/app_common.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: app_common.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: app_common.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/appcookie.sql b/binsrc/samples/webapp/appcookie/appcookie.sql
index dffd781..75316c1 100644
--- a/binsrc/samples/webapp/appcookie/appcookie.sql
+++ b/binsrc/samples/webapp/appcookie/appcookie.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: appcookie.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: appcookie.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/default.vsp b/binsrc/samples/webapp/appcookie/default.vsp
index c032b23..041aec9 100644
--- a/binsrc/samples/webapp/appcookie/default.vsp
+++ b/binsrc/samples/webapp/appcookie/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/front.vsp b/binsrc/samples/webapp/appcookie/front.vsp
index c58963e..9e9c62c 100644
--- a/binsrc/samples/webapp/appcookie/front.vsp
+++ b/binsrc/samples/webapp/appcookie/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/login.vsp b/binsrc/samples/webapp/appcookie/login.vsp
index 65c5530..a02987b 100644
--- a/binsrc/samples/webapp/appcookie/login.vsp
+++ b/binsrc/samples/webapp/appcookie/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/logout.vsp b/binsrc/samples/webapp/appcookie/logout.vsp
index 2852558..205d6f5 100644
--- a/binsrc/samples/webapp/appcookie/logout.vsp
+++ b/binsrc/samples/webapp/appcookie/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/register.vsp b/binsrc/samples/webapp/appcookie/register.vsp
index ab36f0e..0a3fb37 100644
--- a/binsrc/samples/webapp/appcookie/register.vsp
+++ b/binsrc/samples/webapp/appcookie/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appcookie/relogin.vsp b/binsrc/samples/webapp/appcookie/relogin.vsp
index f6ac157..e2a5740 100644
--- a/binsrc/samples/webapp/appcookie/relogin.vsp
+++ b/binsrc/samples/webapp/appcookie/relogin.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: relogin.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: relogin.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appdigest/appdigest.sql b/binsrc/samples/webapp/appdigest/appdigest.sql
index 97fc870..8fd4a91 100644
--- a/binsrc/samples/webapp/appdigest/appdigest.sql
+++ b/binsrc/samples/webapp/appdigest/appdigest.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: appdigest.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: appdigest.sql,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appdigest/default.vsp b/binsrc/samples/webapp/appdigest/default.vsp
index e8b57bb..25c8278 100644
--- a/binsrc/samples/webapp/appdigest/default.vsp
+++ b/binsrc/samples/webapp/appdigest/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appdigest/front.vsp b/binsrc/samples/webapp/appdigest/front.vsp
index 6a3f061..a9c9612 100644
--- a/binsrc/samples/webapp/appdigest/front.vsp
+++ b/binsrc/samples/webapp/appdigest/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appdigest/logout.vsp b/binsrc/samples/webapp/appdigest/logout.vsp
index b6d121e..2464d6b 100644
--- a/binsrc/samples/webapp/appdigest/logout.vsp
+++ b/binsrc/samples/webapp/appdigest/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:04 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appdigest/register.vsp b/binsrc/samples/webapp/appdigest/register.vsp
index 56a8223..11440d2 100644
--- a/binsrc/samples/webapp/appdigest/register.vsp
+++ b/binsrc/samples/webapp/appdigest/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appjs/appjs.sql b/binsrc/samples/webapp/appjs/appjs.sql
index eef2eba..b0979c0 100644
--- a/binsrc/samples/webapp/appjs/appjs.sql
+++ b/binsrc/samples/webapp/appjs/appjs.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: appjs.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: appjs.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appjs/default.vsp b/binsrc/samples/webapp/appjs/default.vsp
index e8b57bb..e59d693 100644
--- a/binsrc/samples/webapp/appjs/default.vsp
+++ b/binsrc/samples/webapp/appjs/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appjs/front.vsp b/binsrc/samples/webapp/appjs/front.vsp
index 6a3f061..ee98f2a 100644
--- a/binsrc/samples/webapp/appjs/front.vsp
+++ b/binsrc/samples/webapp/appjs/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appjs/logout.vsp b/binsrc/samples/webapp/appjs/logout.vsp
index 742ad60..59185eb 100644
--- a/binsrc/samples/webapp/appjs/logout.vsp
+++ b/binsrc/samples/webapp/appjs/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appjs/register.vsp b/binsrc/samples/webapp/appjs/register.vsp
index 6961936..360b374 100644
--- a/binsrc/samples/webapp/appjs/register.vsp
+++ b/binsrc/samples/webapp/appjs/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appsimple/simple_session.sql b/binsrc/samples/webapp/appsimple/simple_session.sql
index 7e7293f..3bef235 100644
--- a/binsrc/samples/webapp/appsimple/simple_session.sql
+++ b/binsrc/samples/webapp/appsimple/simple_session.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: simple_session.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: simple_session.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appsimple/simple_session.vsp b/binsrc/samples/webapp/appsimple/simple_session.vsp
index cfc4451..c3e73a5 100644
--- a/binsrc/samples/webapp/appsimple/simple_session.vsp
+++ b/binsrc/samples/webapp/appsimple/simple_session.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: simple_session.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: simple_session.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/appssl.sql b/binsrc/samples/webapp/appssl/appssl.sql
index dc3705d..d434140 100644
--- a/binsrc/samples/webapp/appssl/appssl.sql
+++ b/binsrc/samples/webapp/appssl/appssl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: appssl.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: appssl.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/default.vsp b/binsrc/samples/webapp/appssl/default.vsp
index 7fcaeb9..cd64748 100644
--- a/binsrc/samples/webapp/appssl/default.vsp
+++ b/binsrc/samples/webapp/appssl/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/front.vsp b/binsrc/samples/webapp/appssl/front.vsp
index c58963e..c01a85b 100644
--- a/binsrc/samples/webapp/appssl/front.vsp
+++ b/binsrc/samples/webapp/appssl/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/login.vsp b/binsrc/samples/webapp/appssl/login.vsp
index 86c19e0..4649667 100644
--- a/binsrc/samples/webapp/appssl/login.vsp
+++ b/binsrc/samples/webapp/appssl/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/logout.vsp b/binsrc/samples/webapp/appssl/logout.vsp
index 4e0407d..8eed736 100644
--- a/binsrc/samples/webapp/appssl/logout.vsp
+++ b/binsrc/samples/webapp/appssl/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/register.vsp b/binsrc/samples/webapp/appssl/register.vsp
index d2e4666..2d7d939 100644
--- a/binsrc/samples/webapp/appssl/register.vsp
+++ b/binsrc/samples/webapp/appssl/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appssl/relogin.vsp b/binsrc/samples/webapp/appssl/relogin.vsp
index 40f5f63..40fc4a4 100644
--- a/binsrc/samples/webapp/appssl/relogin.vsp
+++ b/binsrc/samples/webapp/appssl/relogin.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: relogin.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: relogin.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/appurl.sql b/binsrc/samples/webapp/appurl/appurl.sql
index b60392d..71c1a14 100644
--- a/binsrc/samples/webapp/appurl/appurl.sql
+++ b/binsrc/samples/webapp/appurl/appurl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: appurl.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: appurl.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/default.vsp b/binsrc/samples/webapp/appurl/default.vsp
index dcb9068..313e7b3 100644
--- a/binsrc/samples/webapp/appurl/default.vsp
+++ b/binsrc/samples/webapp/appurl/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/front.vsp b/binsrc/samples/webapp/appurl/front.vsp
index c58963e..c01a85b 100644
--- a/binsrc/samples/webapp/appurl/front.vsp
+++ b/binsrc/samples/webapp/appurl/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/login.vsp b/binsrc/samples/webapp/appurl/login.vsp
index 8375066..8382c74 100644
--- a/binsrc/samples/webapp/appurl/login.vsp
+++ b/binsrc/samples/webapp/appurl/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/logout.vsp b/binsrc/samples/webapp/appurl/logout.vsp
index 6f33cf3..cefebd3 100644
--- a/binsrc/samples/webapp/appurl/logout.vsp
+++ b/binsrc/samples/webapp/appurl/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/register.vsp b/binsrc/samples/webapp/appurl/register.vsp
index 1612b1c..188e28a 100644
--- a/binsrc/samples/webapp/appurl/register.vsp
+++ b/binsrc/samples/webapp/appurl/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurl/relogin.vsp b/binsrc/samples/webapp/appurl/relogin.vsp
index f7b3a74..00fab37 100644
--- a/binsrc/samples/webapp/appurl/relogin.vsp
+++ b/binsrc/samples/webapp/appurl/relogin.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: relogin.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: relogin.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/appurla.sql b/binsrc/samples/webapp/appurla/appurla.sql
index 80055c6..43381a4 100644
--- a/binsrc/samples/webapp/appurla/appurla.sql
+++ b/binsrc/samples/webapp/appurla/appurla.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: appurla.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: appurla.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/default.vsp b/binsrc/samples/webapp/appurla/default.vsp
index 7ce16a5..0602d1b 100644
--- a/binsrc/samples/webapp/appurla/default.vsp
+++ b/binsrc/samples/webapp/appurla/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/front.vsp b/binsrc/samples/webapp/appurla/front.vsp
index c58963e..c01a85b 100644
--- a/binsrc/samples/webapp/appurla/front.vsp
+++ b/binsrc/samples/webapp/appurla/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/login.vsp b/binsrc/samples/webapp/appurla/login.vsp
index e1f5d46..4fc643c 100644
--- a/binsrc/samples/webapp/appurla/login.vsp
+++ b/binsrc/samples/webapp/appurla/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/logout.vsp b/binsrc/samples/webapp/appurla/logout.vsp
index e5c7316..7580ac2 100644
--- a/binsrc/samples/webapp/appurla/logout.vsp
+++ b/binsrc/samples/webapp/appurla/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/register.vsp b/binsrc/samples/webapp/appurla/register.vsp
index 71bdd7b..62ce1cf 100644
--- a/binsrc/samples/webapp/appurla/register.vsp
+++ b/binsrc/samples/webapp/appurla/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/appurla/relogin.vsp b/binsrc/samples/webapp/appurla/relogin.vsp
index 1bf3170..e670192 100644
--- a/binsrc/samples/webapp/appurla/relogin.vsp
+++ b/binsrc/samples/webapp/appurla/relogin.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: relogin.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: relogin.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/changeNews.vsp b/binsrc/samples/webapp/eNews/changeNews.vsp
index f396009..04e7cb7 100644
--- a/binsrc/samples/webapp/eNews/changeNews.vsp
+++ b/binsrc/samples/webapp/eNews/changeNews.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: changeNews.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: changeNews.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/css/one.css b/binsrc/samples/webapp/eNews/css/one.css
index 0c2cfdc..10f0cf9 100644
--- a/binsrc/samples/webapp/eNews/css/one.css
+++ b/binsrc/samples/webapp/eNews/css/one.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: one.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: one.css,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/css/two.css b/binsrc/samples/webapp/eNews/css/two.css
index 1016456..cd1fbf3 100644
--- a/binsrc/samples/webapp/eNews/css/two.css
+++ b/binsrc/samples/webapp/eNews/css/two.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: two.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: two.css,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/dhtml.js b/binsrc/samples/webapp/eNews/dhtml.js
index df0c912..e92290c 100644
--- a/binsrc/samples/webapp/eNews/dhtml.js
+++ b/binsrc/samples/webapp/eNews/dhtml.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/eNews.sql b/binsrc/samples/webapp/eNews/eNews.sql
index 57d98c4..3d55ca1 100644
--- a/binsrc/samples/webapp/eNews/eNews.sql
+++ b/binsrc/samples/webapp/eNews/eNews.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: eNews.sql,v 1.2 2006/08/16 07:58:09 source Exp $
+--  $Id: eNews.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/eNews_vad.sql b/binsrc/samples/webapp/eNews/eNews_vad.sql
index 4107bb6..02d7259 100644
--- a/binsrc/samples/webapp/eNews/eNews_vad.sql
+++ b/binsrc/samples/webapp/eNews/eNews_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: eNews_vad.sql,v 1.1 2007/09/20 12:09:11 source Exp $
+--  $Id: eNews_vad.sql,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/newslogin.vsp b/binsrc/samples/webapp/eNews/newslogin.vsp
index eaf2090..71f572f 100644
--- a/binsrc/samples/webapp/eNews/newslogin.vsp
+++ b/binsrc/samples/webapp/eNews/newslogin.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: newslogin.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: newslogin.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/newsmenu.vsp b/binsrc/samples/webapp/eNews/newsmenu.vsp
index 43e5207..bc2ec59 100644
--- a/binsrc/samples/webapp/eNews/newsmenu.vsp
+++ b/binsrc/samples/webapp/eNews/newsmenu.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: newsmenu.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: newsmenu.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/newsregistration.vsp b/binsrc/samples/webapp/eNews/newsregistration.vsp
index 53c8cbe..6cfe6bc 100644
--- a/binsrc/samples/webapp/eNews/newsregistration.vsp
+++ b/binsrc/samples/webapp/eNews/newsregistration.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: newsregistration.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: newsregistration.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/newsview.vsp b/binsrc/samples/webapp/eNews/newsview.vsp
index 7ad7356..ee30780 100644
--- a/binsrc/samples/webapp/eNews/newsview.vsp
+++ b/binsrc/samples/webapp/eNews/newsview.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: newsview.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: newsview.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/newswatch.vsp b/binsrc/samples/webapp/eNews/newswatch.vsp
index d69bbed..e3bedd9 100644
--- a/binsrc/samples/webapp/eNews/newswatch.vsp
+++ b/binsrc/samples/webapp/eNews/newswatch.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: newswatch.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: newswatch.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/noblankscroll.xsl b/binsrc/samples/webapp/eNews/noblankscroll.xsl
index 7a2d97c..45335cb 100644
--- a/binsrc/samples/webapp/eNews/noblankscroll.xsl
+++ b/binsrc/samples/webapp/eNews/noblankscroll.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?> 
 <!--
  -  
- -  $Id: noblankscroll.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: noblankscroll.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/stylesheets/block.xsl b/binsrc/samples/webapp/eNews/stylesheets/block.xsl
index c3d1474..f16c923 100644
--- a/binsrc/samples/webapp/eNews/stylesheets/block.xsl
+++ b/binsrc/samples/webapp/eNews/stylesheets/block.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?> 
 <!--
  -  
- -  $Id: block.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: block.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/stylesheets/grid.xsl b/binsrc/samples/webapp/eNews/stylesheets/grid.xsl
index 1b6401f..9b6b817 100644
--- a/binsrc/samples/webapp/eNews/stylesheets/grid.xsl
+++ b/binsrc/samples/webapp/eNews/stylesheets/grid.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?> 
 <!--
  -  
- -  $Id: grid.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: grid.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/stylesheets/multi-scroll.xsl b/binsrc/samples/webapp/eNews/stylesheets/multi-scroll.xsl
index b9282ad..dfa430c 100644
--- a/binsrc/samples/webapp/eNews/stylesheets/multi-scroll.xsl
+++ b/binsrc/samples/webapp/eNews/stylesheets/multi-scroll.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: multi-scroll.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: multi-scroll.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/stylesheets/scroll.xsl b/binsrc/samples/webapp/eNews/stylesheets/scroll.xsl
index 25f82fe..53ef445 100644
--- a/binsrc/samples/webapp/eNews/stylesheets/scroll.xsl
+++ b/binsrc/samples/webapp/eNews/stylesheets/scroll.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?> 
 <!--
  -  
- -  $Id: scroll.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: scroll.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/eNews/stylesheets/xscroll.xsl b/binsrc/samples/webapp/eNews/stylesheets/xscroll.xsl
index bd1c87c..60a95f6 100644
--- a/binsrc/samples/webapp/eNews/stylesheets/xscroll.xsl
+++ b/binsrc/samples/webapp/eNews/stylesheets/xscroll.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?> 
 <!--
  -  
- -  $Id: xscroll.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: xscroll.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/confirm.vsp b/binsrc/samples/webapp/forums/confirm.vsp
index 11de3b5..887cddf 100644
--- a/binsrc/samples/webapp/forums/confirm.vsp
+++ b/binsrc/samples/webapp/forums/confirm.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: confirm.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: confirm.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/def.sql b/binsrc/samples/webapp/forums/def.sql
index 0894f2e..be6ecd0 100644
--- a/binsrc/samples/webapp/forums/def.sql
+++ b/binsrc/samples/webapp/forums/def.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: def.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: def.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/def_vad.sql b/binsrc/samples/webapp/forums/def_vad.sql
index 48be6dc..d5880fa 100644
--- a/binsrc/samples/webapp/forums/def_vad.sql
+++ b/binsrc/samples/webapp/forums/def_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: def_vad.sql,v 1.1 2007/09/20 12:09:11 source Exp $
+--  $Id: def_vad.sql,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/error.vsp b/binsrc/samples/webapp/forums/error.vsp
index acdebea..a06f7a6 100644
--- a/binsrc/samples/webapp/forums/error.vsp
+++ b/binsrc/samples/webapp/forums/error.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: error.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: error.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/forum.vsp b/binsrc/samples/webapp/forums/forum.vsp
index db88029..c8caf89 100644
--- a/binsrc/samples/webapp/forums/forum.vsp
+++ b/binsrc/samples/webapp/forums/forum.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: forum.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: forum.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/func.sql b/binsrc/samples/webapp/forums/func.sql
index e50e929..b885f2c 100644
--- a/binsrc/samples/webapp/forums/func.sql
+++ b/binsrc/samples/webapp/forums/func.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: func.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: func.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/func_vad.sql b/binsrc/samples/webapp/forums/func_vad.sql
index 87cb35e..4567f78 100644
--- a/binsrc/samples/webapp/forums/func_vad.sql
+++ b/binsrc/samples/webapp/forums/func_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: func_vad.sql,v 1.2 2007/11/29 15:05:47 source Exp $
+--  $Id: func_vad.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/home.vsp b/binsrc/samples/webapp/forums/home.vsp
index a374ff2..ad11e0b 100644
--- a/binsrc/samples/webapp/forums/home.vsp
+++ b/binsrc/samples/webapp/forums/home.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: home.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: home.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/login.vsp b/binsrc/samples/webapp/forums/login.vsp
index 1cabbc6..436edff 100644
--- a/binsrc/samples/webapp/forums/login.vsp
+++ b/binsrc/samples/webapp/forums/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/post_messages.vsp b/binsrc/samples/webapp/forums/post_messages.vsp
index 4c50040..314005d 100644
--- a/binsrc/samples/webapp/forums/post_messages.vsp
+++ b/binsrc/samples/webapp/forums/post_messages.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: post_messages.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: post_messages.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/registr.vsp b/binsrc/samples/webapp/forums/registr.vsp
index 13f5813..9a26752 100644
--- a/binsrc/samples/webapp/forums/registr.vsp
+++ b/binsrc/samples/webapp/forums/registr.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: registr.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: registr.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/search.vsp b/binsrc/samples/webapp/forums/search.vsp
index 2529ba4..965cf43 100644
--- a/binsrc/samples/webapp/forums/search.vsp
+++ b/binsrc/samples/webapp/forums/search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: search.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: search.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/subforums.vsp b/binsrc/samples/webapp/forums/subforums.vsp
index 83f3238..cdcf2ae 100644
--- a/binsrc/samples/webapp/forums/subforums.vsp
+++ b/binsrc/samples/webapp/forums/subforums.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: subforums.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: subforums.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/thread.vsp b/binsrc/samples/webapp/forums/thread.vsp
index 0ed1294..a4a7903 100644
--- a/binsrc/samples/webapp/forums/thread.vsp
+++ b/binsrc/samples/webapp/forums/thread.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: thread.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: thread.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/confirm.xsl b/binsrc/samples/webapp/forums/xslt/forums/confirm.xsl
index 4545b87..95755af 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/confirm.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/confirm.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: confirm.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: confirm.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/error.xsl b/binsrc/samples/webapp/forums/xslt/forums/error.xsl
index b312431..526b6d9 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/error.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/error.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: error.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/forum.xsl b/binsrc/samples/webapp/forums/xslt/forums/forum.xsl
index 145d910..7151227 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/forum.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/forum.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: forum.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: forum.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/home.xsl b/binsrc/samples/webapp/forums/xslt/forums/home.xsl
index 26839e0..aec5389 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/home.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/home.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: home.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: home.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/login.xsl b/binsrc/samples/webapp/forums/xslt/forums/login.xsl
index 31d271c..f91e408 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/login.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/login.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: login.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/navigations.xsl b/binsrc/samples/webapp/forums/xslt/forums/navigations.xsl
index c2ae173..6df4252 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/navigations.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/navigations.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: navigations.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: navigations.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/post_messages.xsl b/binsrc/samples/webapp/forums/xslt/forums/post_messages.xsl
index 0bd6141..19f5f34 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/post_messages.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/post_messages.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: post_messages.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: post_messages.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/registr.xsl b/binsrc/samples/webapp/forums/xslt/forums/registr.xsl
index ab387e0..3b3f25e 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/registr.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/registr.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: registr.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: registr.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/search.xsl b/binsrc/samples/webapp/forums/xslt/forums/search.xsl
index 37656a9..dfb7042 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/search.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/search.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: search.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: search.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/subforums.xsl b/binsrc/samples/webapp/forums/xslt/forums/subforums.xsl
index d31cbed..1f5ddc3 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/subforums.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/subforums.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: subforums.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: subforums.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/webapp/forums/xslt/forums/thread.xsl b/binsrc/samples/webapp/forums/xslt/forums/thread.xsl
index 3cd744a..239082a 100644
--- a/binsrc/samples/webapp/forums/xslt/forums/thread.xsl
+++ b/binsrc/samples/webapp/forums/xslt/forums/thread.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: thread.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: thread.xsl,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/Makefile.am b/binsrc/samples/xpath/Makefile.am
index 4658880..07a3f16 100644
--- a/binsrc/samples/xpath/Makefile.am
+++ b/binsrc/samples/xpath/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/Makefile.in b/binsrc/samples/xpath/Makefile.in
index ddd7a62..8c944de 100644
--- a/binsrc/samples/xpath/Makefile.in
+++ b/binsrc/samples/xpath/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/xpath/R-tables.sql b/binsrc/samples/xpath/R-tables.sql
index 1bd7eb1..904ef8d 100644
--- a/binsrc/samples/xpath/R-tables.sql
+++ b/binsrc/samples/xpath/R-tables.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: R-tables.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: R-tables.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/border.vsp b/binsrc/samples/xpath/border.vsp
index c3547a1..b5a6e35 100644
--- a/binsrc/samples/xpath/border.vsp
+++ b/binsrc/samples/xpath/border.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: border.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: border.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/case.vsp b/binsrc/samples/xpath/case.vsp
index 715286e..b1f0295 100644
--- a/binsrc/samples/xpath/case.vsp
+++ b/binsrc/samples/xpath/case.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: case.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: case.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/demo.vsp b/binsrc/samples/xpath/demo.vsp
index 995e839..5fd06a9 100644
--- a/binsrc/samples/xpath/demo.vsp
+++ b/binsrc/samples/xpath/demo.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: demo.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: demo.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/desk.sql b/binsrc/samples/xpath/desk.sql
index ee7e4f5..e008c1a 100644
--- a/binsrc/samples/xpath/desk.sql
+++ b/binsrc/samples/xpath/desk.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: desk.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: desk.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/desk.vsp b/binsrc/samples/xpath/desk.vsp
index a497c3d..b0165e8 100644
--- a/binsrc/samples/xpath/desk.vsp
+++ b/binsrc/samples/xpath/desk.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: desk.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: desk.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/deskall.vsp b/binsrc/samples/xpath/deskall.vsp
index 2a8b2a8..1c2257b 100644
--- a/binsrc/samples/xpath/deskall.vsp
+++ b/binsrc/samples/xpath/deskall.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskall.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: deskall.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/deskdata.vsp b/binsrc/samples/xpath/deskdata.vsp
index be0817b..a1d0bb2 100644
--- a/binsrc/samples/xpath/deskdata.vsp
+++ b/binsrc/samples/xpath/deskdata.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskdata.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: deskdata.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/deskhome.vsp b/binsrc/samples/xpath/deskhome.vsp
index 995c342..80c94cb 100644
--- a/binsrc/samples/xpath/deskhome.vsp
+++ b/binsrc/samples/xpath/deskhome.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskhome.vsp,v 1.3 2007/01/22 13:21:44 source Exp $
+--  $Id: deskhome.vsp,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/deskmeta.vsp b/binsrc/samples/xpath/deskmeta.vsp
index 7065c4f..7e1ac63 100644
--- a/binsrc/samples/xpath/deskmeta.vsp
+++ b/binsrc/samples/xpath/deskmeta.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskmeta.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: deskmeta.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/faq.vsp b/binsrc/samples/xpath/faq.vsp
index 37d6de0..2161b48 100644
--- a/binsrc/samples/xpath/faq.vsp
+++ b/binsrc/samples/xpath/faq.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: faq.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: faq.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/files2dav.sh b/binsrc/samples/xpath/files2dav.sh
index be285d7..8424541 100755
--- a/binsrc/samples/xpath/files2dav.sh
+++ b/binsrc/samples/xpath/files2dav.sh
@@ -2,14 +2,14 @@
 #
 #  mkdemo.sh
 #
-#  $Id: files2dav.sh,v 1.2 2009/02/12 15:15:13 source Exp $
+#  $Id: files2dav.sh,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 #
 #  Creates a demo database
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/header.vsp b/binsrc/samples/xpath/header.vsp
index abe5f0d..5be7f5e 100644
--- a/binsrc/samples/xpath/header.vsp
+++ b/binsrc/samples/xpath/header.vsp
@@ -3,7 +3,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
 
   declare _version_id any;
 -- 020801
-  _version_id := split_and_decode('$Id: header.vsp,v 1.2 2006/08/15 19:30:33 source Exp $', 0, '\x0\x0\x20');
+  _version_id := split_and_decode('$Id: header.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $', 0, '\x0\x0\x20');
 ?>
 <HTML>
 <BODY TEXT="#FFFFFF" BGCOLOR="#000066" TOPMARGIN=0>
diff --git a/binsrc/samples/xpath/list.vsp b/binsrc/samples/xpath/list.vsp
index 6ff1cb9..5efe30b 100644
--- a/binsrc/samples/xpath/list.vsp
+++ b/binsrc/samples/xpath/list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: list.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: list.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/main.vsp b/binsrc/samples/xpath/main.vsp
index 8eeb306..0d88b15 100644
--- a/binsrc/samples/xpath/main.vsp
+++ b/binsrc/samples/xpath/main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: main.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: main.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/metadata.sql b/binsrc/samples/xpath/metadata.sql
index c1c2a73..04299a9 100644
--- a/binsrc/samples/xpath/metadata.sql
+++ b/binsrc/samples/xpath/metadata.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: metadata.sql,v 1.3 2007/01/22 13:21:44 source Exp $
+--  $Id: metadata.sql,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/postsetup.sql b/binsrc/samples/xpath/postsetup.sql
index 8888599..c397ab2 100644
--- a/binsrc/samples/xpath/postsetup.sql
+++ b/binsrc/samples/xpath/postsetup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: postsetup.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: postsetup.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/presetup.sql b/binsrc/samples/xpath/presetup.sql
index 72f4a48..158820b 100644
--- a/binsrc/samples/xpath/presetup.sql
+++ b/binsrc/samples/xpath/presetup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: presetup.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: presetup.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xpath/sample.sql b/binsrc/samples/xpath/sample.sql
index d413e83..788b54b 100644
--- a/binsrc/samples/xpath/sample.sql
+++ b/binsrc/samples/xpath/sample.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: sample.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: sample.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/Makefile.am b/binsrc/samples/xquery/Makefile.am
index ede683c..a79a4a3 100644
--- a/binsrc/samples/xquery/Makefile.am
+++ b/binsrc/samples/xquery/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/Makefile.in b/binsrc/samples/xquery/Makefile.in
index d8d7e55..71c66fc 100644
--- a/binsrc/samples/xquery/Makefile.in
+++ b/binsrc/samples/xquery/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/samples/xquery/R-tables.sql b/binsrc/samples/xquery/R-tables.sql
index 4495827..fa8e2f7 100644
--- a/binsrc/samples/xquery/R-tables.sql
+++ b/binsrc/samples/xquery/R-tables.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: R-tables.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: R-tables.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/border.vsp b/binsrc/samples/xquery/border.vsp
index c3547a1..b5a6e35 100644
--- a/binsrc/samples/xquery/border.vsp
+++ b/binsrc/samples/xquery/border.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: border.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: border.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/case.vsp b/binsrc/samples/xquery/case.vsp
index e0db98b..00aee24 100644
--- a/binsrc/samples/xquery/case.vsp
+++ b/binsrc/samples/xquery/case.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: case.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: case.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/demo.vsp b/binsrc/samples/xquery/demo.vsp
index e8af0ae..d10648e 100644
--- a/binsrc/samples/xquery/demo.vsp
+++ b/binsrc/samples/xquery/demo.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: demo.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: demo.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/desk.sql b/binsrc/samples/xquery/desk.sql
index e57a290..b8cfda2 100644
--- a/binsrc/samples/xquery/desk.sql
+++ b/binsrc/samples/xquery/desk.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: desk.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: desk.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/desk.vsp b/binsrc/samples/xquery/desk.vsp
index 2eb31bf..35dc4fd 100644
--- a/binsrc/samples/xquery/desk.vsp
+++ b/binsrc/samples/xquery/desk.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: desk.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: desk.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/deskall.vsp b/binsrc/samples/xquery/deskall.vsp
index 64dbe4f..8f36d5b 100644
--- a/binsrc/samples/xquery/deskall.vsp
+++ b/binsrc/samples/xquery/deskall.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskall.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: deskall.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/deskdata.vsp b/binsrc/samples/xquery/deskdata.vsp
index 2731c73..3279e51 100644
--- a/binsrc/samples/xquery/deskdata.vsp
+++ b/binsrc/samples/xquery/deskdata.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskdata.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: deskdata.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/deskhome.vsp b/binsrc/samples/xquery/deskhome.vsp
index 9ab4989..0f7f4aa 100644
--- a/binsrc/samples/xquery/deskhome.vsp
+++ b/binsrc/samples/xquery/deskhome.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskhome.vsp,v 1.3 2007/01/22 13:44:43 source Exp $
+--  $Id: deskhome.vsp,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/deskmeta.vsp b/binsrc/samples/xquery/deskmeta.vsp
index f02c315..f18de82 100644
--- a/binsrc/samples/xquery/deskmeta.vsp
+++ b/binsrc/samples/xquery/deskmeta.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deskmeta.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: deskmeta.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/faq.vsp b/binsrc/samples/xquery/faq.vsp
index 37d6de0..2161b48 100644
--- a/binsrc/samples/xquery/faq.vsp
+++ b/binsrc/samples/xquery/faq.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: faq.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: faq.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/files2dav.sh b/binsrc/samples/xquery/files2dav.sh
index be5b658..01e87ea 100755
--- a/binsrc/samples/xquery/files2dav.sh
+++ b/binsrc/samples/xquery/files2dav.sh
@@ -2,14 +2,14 @@
 #
 #
 #
-#  $Id: files2dav.sh,v 1.3 2009/04/14 12:16:49 source Exp $
+#  $Id: files2dav.sh,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
 #
 #
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/header.vsp b/binsrc/samples/xquery/header.vsp
index 68c0767..1f6595b 100644
--- a/binsrc/samples/xquery/header.vsp
+++ b/binsrc/samples/xquery/header.vsp
@@ -3,7 +3,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
 
   declare _version_id any;
 -- 020801
-  _version_id := split_and_decode('$Id: header.vsp,v 1.2 2006/08/15 19:30:33 source Exp $', 0, '\x0\x0\x20');
+  _version_id := split_and_decode('$Id: header.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $', 0, '\x0\x0\x20');
 ?>
 <HTML>
 <BODY TEXT="#FFFFFF" BGCOLOR="#000066" TOPMARGIN=0>
diff --git a/binsrc/samples/xquery/list.vsp b/binsrc/samples/xquery/list.vsp
index 8aab4dc..fc04d3a 100644
--- a/binsrc/samples/xquery/list.vsp
+++ b/binsrc/samples/xquery/list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: list.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: list.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/main.vsp b/binsrc/samples/xquery/main.vsp
index c3c6f0a..b9ce29b 100644
--- a/binsrc/samples/xquery/main.vsp
+++ b/binsrc/samples/xquery/main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: main.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: main.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/metadata.sql b/binsrc/samples/xquery/metadata.sql
index 9cedca1..7cca89b 100644
--- a/binsrc/samples/xquery/metadata.sql
+++ b/binsrc/samples/xquery/metadata.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: metadata.sql,v 1.3 2007/01/22 13:44:43 source Exp $
+--  $Id: metadata.sql,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/postsetup.sql b/binsrc/samples/xquery/postsetup.sql
index af6ba8d..0b8ea63 100644
--- a/binsrc/samples/xquery/postsetup.sql
+++ b/binsrc/samples/xquery/postsetup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: postsetup.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: postsetup.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/presetup.sql b/binsrc/samples/xquery/presetup.sql
index e062594..f6d525a 100644
--- a/binsrc/samples/xquery/presetup.sql
+++ b/binsrc/samples/xquery/presetup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: presetup.sql,v 1.3 2008/04/28 12:05:09 source Exp $
+--  $Id: presetup.sql,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/search.sql b/binsrc/samples/xquery/search.sql
index 8e2af6c..45dc92c 100644
--- a/binsrc/samples/xquery/search.sql
+++ b/binsrc/samples/xquery/search.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: search.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: search.sql,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/search.vsp b/binsrc/samples/xquery/search.vsp
index 24aa99e..d7ce285 100644
--- a/binsrc/samples/xquery/search.vsp
+++ b/binsrc/samples/xquery/search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: search.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: search.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/setup.isql b/binsrc/samples/xquery/setup.isql
index aaac284..b0d771c 100644
--- a/binsrc/samples/xquery/setup.isql
+++ b/binsrc/samples/xquery/setup.isql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/samples/xquery/text.vsp b/binsrc/samples/xquery/text.vsp
index 51c3d52..a138410 100644
--- a/binsrc/samples/xquery/text.vsp
+++ b/binsrc/samples/xquery/text.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: text.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: text.vsp,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/Makefile.am b/binsrc/sesame/Makefile.am
index abfbc57..1a448d5 100644
--- a/binsrc/sesame/Makefile.am
+++ b/binsrc/sesame/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/Makefile.in b/binsrc/sesame/Makefile.in
index 596f264..35a88df 100644
--- a/binsrc/sesame/Makefile.in
+++ b/binsrc/sesame/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2007 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoAdminListener.java b/binsrc/sesame/virtuoso_driver/VirtuosoAdminListener.java
index 31a5cd4..d7448b2 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoAdminListener.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoAdminListener.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoAdminListener.java,v 1.2 2007/11/21 11:10:09 source Exp $
+ *  $Id: VirtuosoAdminListener.java,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoExample1.java b/binsrc/sesame/virtuoso_driver/VirtuosoExample1.java
index dc84c1e..54ffdd4 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoExample1.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoExample1.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoExample1.java,v 1.3 2007/11/23 21:47:41 source Exp $
+ *  $Id: VirtuosoExample1.java,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoExample2.java b/binsrc/sesame/virtuoso_driver/VirtuosoExample2.java
index 62a53e5..5a65ed1 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoExample2.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoExample2.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoExample2.java,v 1.3 2007/11/23 21:47:41 source Exp $
+ *  $Id: VirtuosoExample2.java,v 1.3.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoExample3.java b/binsrc/sesame/virtuoso_driver/VirtuosoExample3.java
index 8b7762e..0684bab 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoExample3.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoExample3.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoExample3.java,v 1.1 2008/04/28 12:16:35 source Exp $
+ *  $Id: VirtuosoExample3.java,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoGraphQueryListener.java b/binsrc/sesame/virtuoso_driver/VirtuosoGraphQueryListener.java
index da7145f..7b38b96 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoGraphQueryListener.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoGraphQueryListener.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoGraphQueryListener.java,v 1.2 2007/11/21 11:10:09 source Exp $
+ *  $Id: VirtuosoGraphQueryListener.java,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoQueryListener.java b/binsrc/sesame/virtuoso_driver/VirtuosoQueryListener.java
index 0c83189..fe4c94a 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoQueryListener.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoQueryListener.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoQueryListener.java,v 1.2 2007/11/21 11:10:09 source Exp $
+ *  $Id: VirtuosoQueryListener.java,v 1.2.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoRepository.java b/binsrc/sesame/virtuoso_driver/VirtuosoRepository.java
index 0055228..ecb551f 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoRepository.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoRepository.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRepository.java,v 1.5 2008/04/28 12:16:35 source Exp $
+ *  $Id: VirtuosoRepository.java,v 1.5.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoSchemaRepository.java b/binsrc/sesame/virtuoso_driver/VirtuosoSchemaRepository.java
index d2a6459..fc4c5b1 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoSchemaRepository.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoSchemaRepository.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoSchemaRepository.java,v 1.4 2007/11/27 11:21:19 source Exp $
+ *  $Id: VirtuosoSchemaRepository.java,v 1.4.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame/virtuoso_driver/VirtuosoStatementIterator.java b/binsrc/sesame/virtuoso_driver/VirtuosoStatementIterator.java
index 9b572b1..6eb7ceb 100644
--- a/binsrc/sesame/virtuoso_driver/VirtuosoStatementIterator.java
+++ b/binsrc/sesame/virtuoso_driver/VirtuosoStatementIterator.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoStatementIterator.java,v 1.1 2007/11/28 09:54:35 source Exp $
+ *  $Id: VirtuosoStatementIterator.java,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame2/Makefile.am b/binsrc/sesame2/Makefile.am
index 3e20d11..c3a5736 100644
--- a/binsrc/sesame2/Makefile.am
+++ b/binsrc/sesame2/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -36,13 +36,15 @@ SESAME_SRC= \
 	virtuoso_driver/Version.java \
 	virtuoso_driver/VirtuosoBooleanQuery.java \
 	virtuoso_driver/VirtuosoGraphQuery.java \
+	virtuoso_driver/VirtuosoOperation.java \
 	virtuoso_driver/VirtuosoQuery.java \
 	virtuoso_driver/VirtuosoRepositoryConfig.java \
 	virtuoso_driver/VirtuosoRepositoryConnection.java \
 	virtuoso_driver/VirtuosoRepositoryFactory.java \
 	virtuoso_driver/VirtuosoRepository.java \
 	virtuoso_driver/VirtuosoRepositorySchema.java \
-	virtuoso_driver/VirtuosoTupleQuery.java
+	virtuoso_driver/VirtuosoTupleQuery.java \
+	virtuoso_driver/VirtuosoUpdate.java
 
 SESAME_XSL = \
 	create.xsl \
@@ -51,7 +53,7 @@ SESAME_XSL = \
 SAMPLES_SOURCE= \
 	virtuoso_driver/VirtuosoTest.java
 
-SESAME_CLASSPATH=lib/slf4j-api-1.5.11.jar:lib/slf4j-simple-1.5.11.jar:lib/openrdf-sesame-2.3.1-onejar.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
+SESAME_CLASSPATH= lib/slf4j-api-1.6.1.jar:lib/slf4j-simple-1.6.1.jar:lib/openrdf-sesame-2.5.1-onejar.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
 
 all-am:	$(TARGETS)
 
diff --git a/binsrc/sesame2/Makefile.in b/binsrc/sesame2/Makefile.in
index b2229e7..5c6e082 100644
--- a/binsrc/sesame2/Makefile.in
+++ b/binsrc/sesame2/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -281,13 +283,15 @@ SESAME_SRC = \
 	virtuoso_driver/Version.java \
 	virtuoso_driver/VirtuosoBooleanQuery.java \
 	virtuoso_driver/VirtuosoGraphQuery.java \
+	virtuoso_driver/VirtuosoOperation.java \
 	virtuoso_driver/VirtuosoQuery.java \
 	virtuoso_driver/VirtuosoRepositoryConfig.java \
 	virtuoso_driver/VirtuosoRepositoryConnection.java \
 	virtuoso_driver/VirtuosoRepositoryFactory.java \
 	virtuoso_driver/VirtuosoRepository.java \
 	virtuoso_driver/VirtuosoRepositorySchema.java \
-	virtuoso_driver/VirtuosoTupleQuery.java
+	virtuoso_driver/VirtuosoTupleQuery.java \
+	virtuoso_driver/VirtuosoUpdate.java
 
 SESAME_XSL = \
 	create.xsl \
@@ -296,7 +300,7 @@ SESAME_XSL = \
 SAMPLES_SOURCE = \
 	virtuoso_driver/VirtuosoTest.java
 
-SESAME_CLASSPATH = lib/slf4j-api-1.5.11.jar:lib/slf4j-simple-1.5.11.jar:lib/openrdf-sesame-2.3.1-onejar.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
+SESAME_CLASSPATH = lib/slf4j-api-1.6.1.jar:lib/slf4j-simple-1.6.1.jar:lib/openrdf-sesame-2.5.1-onejar.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
 
 # ----------------------------------------------------------------------
 #
diff --git a/binsrc/sesame2/virtuoso_driver/Version.java b/binsrc/sesame2/virtuoso_driver/Version.java
index 7536e17..ea94bfc 100644
--- a/binsrc/sesame2/virtuoso_driver/Version.java
+++ b/binsrc/sesame2/virtuoso_driver/Version.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Version.java,v 1.1.4.4 2011/03/23 11:59:00 source Exp $
+ *  $Id: Version.java,v 1.1.4.8 2012/03/15 12:56:53 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -26,10 +26,10 @@ package virtuoso.sesame2.driver;
 
 public class Version {
 
-   protected static final String DRV_VER = "2.3.1";
+   protected static final String DRV_VER = "2.5.1";
 
    // The major and minor version number
-   protected static final String build_id = "1.3";
+   protected static final String build_id = "1.6";
 
    public static void main(String args[])
    {
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoBooleanQuery.java b/binsrc/sesame2/virtuoso_driver/VirtuosoBooleanQuery.java
index 41bbfea..903cc0e 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoBooleanQuery.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoBooleanQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoBooleanQuery.java,v 1.3.2.2 2010/02/25 20:23:03 source Exp $
+ *  $Id: VirtuosoBooleanQuery.java,v 1.3.2.3 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoGraphQuery.java b/binsrc/sesame2/virtuoso_driver/VirtuosoGraphQuery.java
index 77d4e28..1aaf644 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoGraphQuery.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoGraphQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoGraphQuery.java,v 1.3.2.2 2010/02/25 20:23:03 source Exp $
+ *  $Id: VirtuosoGraphQuery.java,v 1.3.2.3 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoOperation.java b/binsrc/sesame2/virtuoso_driver/VirtuosoOperation.java
new file mode 100644
index 0000000..bcbac1d
--- /dev/null
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoOperation.java
@@ -0,0 +1,122 @@
+/*
+ *  $Id: VirtuosoOperation.java,v 1.1.4.3 2012/03/08 12:55:05 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame2.driver;
+
+import org.openrdf.model.Value;
+import org.openrdf.query.BindingSet;
+import org.openrdf.query.Dataset;
+import org.openrdf.query.TupleQueryResultHandler;
+import org.openrdf.query.Query;
+import org.openrdf.query.Operation;
+import org.openrdf.query.impl.MapBindingSet;
+
+public class VirtuosoOperation implements Operation {
+
+	MapBindingSet bindingSet = new MapBindingSet();
+	boolean includeInferred = false;
+	Dataset dataset = null;
+	
+	/**
+	 * Binds the specified variable to the supplied value. Any value that was
+	 * previously bound to the specified value will be overwritten.
+	 * 
+	 * @param name
+	 *        The name of the variable that should be bound.
+	 * @param value
+	 *        The (new) value for the specified variable.
+	 */
+	public void setBinding(String name, Value value) {
+		bindingSet.addBinding(name, value);
+	}
+
+	/**
+	 * Removes a previously set binding on the supplied variable. Calling this
+	 * method with an unbound variable name has no effect.
+	 * 
+	 * @param name
+	 *        The name of the variable from which the binding is to be removed.
+	 */
+	public void removeBinding(String name) {
+		bindingSet.removeBinding(name);
+	}
+
+	/**
+	 * Removes all previously set bindings.
+	 */
+	public void clearBindings() {
+		bindingSet.clear();
+	}
+
+	/**
+	 * Retrieves the bindings that have been set on this query.
+	 * 
+	 * @return A (possibly empty) set of query variable bindings.
+	 * @see #setBinding(String, Value)
+	 */
+	public BindingSet getBindings() {
+		return bindingSet;
+	}
+
+
+	/**
+	 * Specifies the dataset against which to evaluate a query, overriding any
+	 * dataset that is specified in the query itself.
+	 */
+	public void setDataset(Dataset dataset) {
+		this.dataset = dataset;
+	}
+
+	/**
+	 * Gets the dataset that has been set using {@link #setDataset(Dataset)}, if
+	 * any.
+	 */
+	public Dataset getDataset() {
+		return dataset;
+	}
+
+	/**
+	 * Determine whether evaluation results of this query should include inferred
+	 * statements (if any inferred statements are present in the repository). The
+	 * default setting is 'true'.
+	 * 
+	 * @param includeInferred
+	 *        indicates whether inferred statements should included in the
+	 *        result.
+	 */
+	public void setIncludeInferred(boolean includeInferred) {
+		this.includeInferred = includeInferred;
+	}
+
+	/**
+	 * Returns whether or not this query will return inferred statements (if any
+	 * are present in the repository).
+	 * 
+	 * @return <tt>true</tt> if inferred statements will be returned,
+	 *         <tt>false</tt> otherwise.
+	 */
+	public boolean getIncludeInferred() {
+		return this.includeInferred;
+	}
+
+}
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoQuery.java b/binsrc/sesame2/virtuoso_driver/VirtuosoQuery.java
index 723e1e3..4472521 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoQuery.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoQuery.java,v 1.3.2.3 2010/02/26 10:23:20 source Exp $
+ *  $Id: VirtuosoQuery.java,v 1.3.2.5 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -30,96 +30,11 @@ import org.openrdf.query.TupleQueryResultHandler;
 import org.openrdf.query.Query;
 import org.openrdf.query.impl.MapBindingSet;
 
-public class VirtuosoQuery implements Query {
+public class VirtuosoQuery extends VirtuosoOperation implements Query {
 
-	MapBindingSet bindingSet = new MapBindingSet();
-	boolean includeInferred = false;
-	Dataset dataset = null;
 	int maxQueryTime = 0;
 	
 	/**
-	 * Binds the specified variable to the supplied value. Any value that was
-	 * previously bound to the specified value will be overwritten.
-	 * 
-	 * @param name
-	 *        The name of the variable that should be bound.
-	 * @param value
-	 *        The (new) value for the specified variable.
-	 */
-	public void setBinding(String name, Value value) {
-		bindingSet.addBinding(name, value);
-	}
-
-	/**
-	 * Removes a previously set binding on the supplied variable. Calling this
-	 * method with an unbound variable name has no effect.
-	 * 
-	 * @param name
-	 *        The name of the variable from which the binding is to be removed.
-	 */
-	public void removeBinding(String name) {
-		bindingSet.removeBinding(name);
-	}
-
-	/**
-	 * Removes all previously set bindings.
-	 */
-	public void clearBindings() {
-		bindingSet.clear();
-	}
-
-	/**
-	 * Retrieves the bindings that have been set on this query.
-	 * 
-	 * @return A (possibly empty) set of query variable bindings.
-	 * @see #setBinding(String, Value)
-	 */
-	public BindingSet getBindings() {
-		return bindingSet;
-	}
-
-
-	/**
-	 * Specifies the dataset against which to evaluate a query, overriding any
-	 * dataset that is specified in the query itself.
-	 */
-	public void setDataset(Dataset dataset) {
-		this.dataset = dataset;
-	}
-
-	/**
-	 * Gets the dataset that has been set using {@link #setDataset(Dataset)}, if
-	 * any.
-	 */
-	public Dataset getDataset() {
-		return dataset;
-	}
-
-	/**
-	 * Determine whether evaluation results of this query should include inferred
-	 * statements (if any inferred statements are present in the repository). The
-	 * default setting is 'true'.
-	 * 
-	 * @param includeInferred
-	 *        indicates whether inferred statements should included in the
-	 *        result.
-	 */
-	public void setIncludeInferred(boolean includeInferred) {
-		this.includeInferred = includeInferred;
-	}
-
-	/**
-	 * Returns whether or not this query will return inferred statements (if any
-	 * are present in the repository).
-	 * 
-	 * @return <tt>true</tt> if inferred statements will be returned,
-	 *         <tt>false</tt> otherwise.
-	 */
-	public boolean getIncludeInferred() {
-		return this.includeInferred;
-	}
-
-	/**
 	 * Specifies the maximum time that a query is allowed to run. The query will
 	 * be interrupted when it exceeds the time limit. Any consecutive requests to
 	 * fetch query results will result in {@link QueryInterruptedException}s.
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoRepository.java b/binsrc/sesame2/virtuoso_driver/VirtuosoRepository.java
index 48c1c90..dd6caa2 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoRepository.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoRepository.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRepository.java,v 1.9.2.8 2010/06/28 10:31:24 source Exp $
+ *  $Id: VirtuosoRepository.java,v 1.9.2.10 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -66,6 +66,7 @@ public class VirtuosoRepository implements Repository {
 	boolean useLazyAdd = false;
 	String defGraph;
 	int prefetchSize = 200;
+	int queryTimeout = 0;
 	String ruleSet;
 	
 	/**
@@ -265,6 +266,23 @@ public class VirtuosoRepository implements Repository {
 	}
 
 	/**
+	 * Set the query timeout(default 0) 
+	 * 
+	 * @param seconds
+	 *        queryTimeout seconds, 0 - unlimited.
+	 */
+	public void setQueryTimeout(int seconds) {
+		this.queryTimeout = seconds;
+	}
+
+	/**
+	 * Get the query timeout seconds
+	 */
+	public int getQueryTimeout() {
+		return this.queryTimeout;
+	}
+
+	/**
 	 * Set the RoundRobin state for connection(default false) 
 	 * 
 	 * @param sz
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConfig.java b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConfig.java
index 04f8478..372a92b 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConfig.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConfig.java
@@ -1,229 +1,229 @@
-/*
- *  $Id: VirtuosoRepositoryConfig.java,v 1.1.2.2 2010/02/25 20:23:04 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2010 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.sesame2.driver.config;
-
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.PASSWORD;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.HOSTLIST;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.USERNAME;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.DEFGRAPH;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.USELAZYADD;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.FETCHSIZE;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.ROUNDROBIN;
-import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.RULESET;
-
-import org.openrdf.model.Graph;
-import org.openrdf.model.Literal;
-import org.openrdf.model.Resource;
-import org.openrdf.model.URI;
-import org.openrdf.model.util.GraphUtil;
-import org.openrdf.model.util.GraphUtilException;
-import org.openrdf.repository.config.RepositoryConfigException;
-import org.openrdf.repository.config.RepositoryImplConfigBase;
-
-/**
- */
-public class VirtuosoRepositoryConfig extends RepositoryImplConfigBase {
-
-	private String hostlist;
-
-	private String username;
-
-	private String password;
-
-	private String defGraph;
-
-	private boolean useLazyAdd;
-
-	private int fetchSize = 200;
-
-	private boolean roundRobin;
-
-	private String ruleSet;
-
-	public VirtuosoRepositoryConfig() {
-		super(VirtuosoRepositoryFactory.REPOSITORY_TYPE);
-	}
-
-	public VirtuosoRepositoryConfig(String hostlist) {
-		this();
-		setHostList(hostlist);
-	}
-
-	public String getHostList() {
-		return hostlist;
-	}
-
-	public void setHostList(String hostlist) {
-		this.hostlist = hostlist;
-	}
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-
-	public String getDefGraph() {
-		return defGraph;
-	}
-
-	public void setDefGraph(String defGraph) {
-		this.defGraph = defGraph;
-	}
-
-
-	public boolean getUseLazyAdd() {
-		return useLazyAdd;
-	}
-
-	public void setUseLazyAdd(boolean useLazyAdd) {
-		this.useLazyAdd = useLazyAdd;
-	}
-
-	public boolean getRoundRobin() {
-		return roundRobin;
-	}
-
-	public void setRoundRobin(boolean roundRobin) {
-		this.roundRobin = roundRobin;
-	}
-
-
-	public int getFetchSize() {
-		return fetchSize;
-	}
-
-	public void setFetchSize(int fetchSize) {
-		this.fetchSize = fetchSize;
-	}
-
-
-	public String getRuleSet() {
-		return ruleSet;
-	}
-
-	public void setRuleSet(String ruleSet) {
-		if (ruleSet!=null && ruleSet.equals("null"))
-			this.ruleSet = null;
-		else
-			this.ruleSet = ruleSet;
-	}
-
-	@Override
-	public void validate()
-		throws RepositoryConfigException
-	{
-		super.validate();
-		if (hostlist == null) {
-			throw new RepositoryConfigException("No HostList specified for Virtuoso repository");
-		}
-	}
-
-	@Override
-	public Resource export(Graph graph) {
-		Resource implNode = super.export(graph);
-
-		if (hostlist != null) {
-			graph.add(implNode, HOSTLIST, graph.getValueFactory().createLiteral(hostlist));
-		}
-		if (username != null) {
-			graph.add(implNode, USERNAME, graph.getValueFactory().createLiteral(username));
-		}
-		if (password != null) {
-			graph.add(implNode, PASSWORD, graph.getValueFactory().createLiteral(password));
-		}
-
-		if (defGraph != null) {
-			graph.add(implNode, DEFGRAPH, graph.getValueFactory().createLiteral(defGraph));
-		}
-
-		if (ruleSet != null && ruleSet.length() > 0 && !ruleSet.equals("null")) {
-			graph.add(implNode, RULESET, graph.getValueFactory().createLiteral(ruleSet));
-		}
-
-		graph.add(implNode, USELAZYADD, graph.getValueFactory().createLiteral(new Boolean(useLazyAdd).toString()));
-
-		graph.add(implNode, ROUNDROBIN, graph.getValueFactory().createLiteral(new Boolean(roundRobin).toString()));
-
-		graph.add(implNode, FETCHSIZE, graph.getValueFactory().createLiteral(Integer.toString(fetchSize,10)));
-
-		return implNode;
-	}
-
-	@Override
-	public void parse(Graph graph, Resource implNode)
-		throws RepositoryConfigException
-	{
-		super.parse(graph, implNode);
-
-		try {
-			Literal hlist = GraphUtil.getOptionalObjectLiteral(graph, implNode, HOSTLIST);
-			if (hlist != null) {
-				setHostList(hlist.getLabel());
-			}
-			Literal username = GraphUtil.getOptionalObjectLiteral(graph, implNode, USERNAME);
-			if (username != null) {
-				setUsername(username.getLabel());
-			}
-			Literal password = GraphUtil.getOptionalObjectLiteral(graph, implNode, PASSWORD);
-			if (password != null) {
-				setPassword(password.getLabel());
-			}
-			Literal defgraph = GraphUtil.getOptionalObjectLiteral(graph, implNode, DEFGRAPH);
-			if (defgraph != null) {
-				setDefGraph(defgraph.getLabel());
-			}
-			Literal uselazyadd = GraphUtil.getOptionalObjectLiteral(graph, implNode, USELAZYADD);
-			if (uselazyadd != null) {
-				setUseLazyAdd(Boolean.getBoolean(uselazyadd.getLabel()));
-			}
-			Literal roundrobin = GraphUtil.getOptionalObjectLiteral(graph, implNode, ROUNDROBIN);
-			if (roundrobin != null) {
-				setRoundRobin(Boolean.getBoolean(roundrobin.getLabel()));
-			}
-			Literal fetchsize = GraphUtil.getOptionalObjectLiteral(graph, implNode, FETCHSIZE);
-			if (fetchsize != null) {
-				setFetchSize(Integer.parseInt(fetchsize.getLabel()));
-			}
-			Literal ruleset = GraphUtil.getOptionalObjectLiteral(graph, implNode, RULESET);
-			if (ruleset != null) {
-				setRuleSet(ruleset.getLabel());
-			}
-		}
-		catch (GraphUtilException e) {
-			throw new RepositoryConfigException(e.getMessage(), e);
-		}
-	}
-}
+/*
+ *  $Id: VirtuosoRepositoryConfig.java,v 1.1.2.4 2012/03/08 16:22:50 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame2.driver.config;
+
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.PASSWORD;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.HOSTLIST;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.USERNAME;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.DEFGRAPH;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.USELAZYADD;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.FETCHSIZE;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.ROUNDROBIN;
+import static virtuoso.sesame2.driver.config.VirtuosoRepositorySchema.RULESET;
+
+import org.openrdf.model.Graph;
+import org.openrdf.model.Literal;
+import org.openrdf.model.Resource;
+import org.openrdf.model.URI;
+import org.openrdf.model.util.GraphUtil;
+import org.openrdf.model.util.GraphUtilException;
+import org.openrdf.repository.config.RepositoryConfigException;
+import org.openrdf.repository.config.RepositoryImplConfigBase;
+
+/**
+ */
+public class VirtuosoRepositoryConfig extends RepositoryImplConfigBase {
+
+	private String hostlist;
+
+	private String username;
+
+	private String password;
+
+	private String defGraph;
+
+	private boolean useLazyAdd;
+
+	private int fetchSize = 200;
+
+	private boolean roundRobin;
+
+	private String ruleSet;
+
+	public VirtuosoRepositoryConfig() {
+		super(VirtuosoRepositoryFactory.REPOSITORY_TYPE);
+	}
+
+	public VirtuosoRepositoryConfig(String hostlist) {
+		this();
+		setHostList(hostlist);
+	}
+
+	public String getHostList() {
+		return hostlist;
+	}
+
+	public void setHostList(String hostlist) {
+		this.hostlist = hostlist;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+
+	public String getDefGraph() {
+		return defGraph;
+	}
+
+	public void setDefGraph(String defGraph) {
+		this.defGraph = defGraph;
+	}
+
+
+	public boolean getUseLazyAdd() {
+		return useLazyAdd;
+	}
+
+	public void setUseLazyAdd(boolean useLazyAdd) {
+		this.useLazyAdd = useLazyAdd;
+	}
+
+	public boolean getRoundRobin() {
+		return roundRobin;
+	}
+
+	public void setRoundRobin(boolean roundRobin) {
+		this.roundRobin = roundRobin;
+	}
+
+
+	public int getFetchSize() {
+		return fetchSize;
+	}
+
+	public void setFetchSize(int fetchSize) {
+		this.fetchSize = fetchSize;
+	}
+
+
+	public String getRuleSet() {
+		return ruleSet;
+	}
+
+	public void setRuleSet(String ruleSet) {
+		if (ruleSet!=null && ruleSet.equals("null"))
+			this.ruleSet = null;
+		else
+			this.ruleSet = ruleSet;
+	}
+
+	@Override
+	public void validate()
+		throws RepositoryConfigException
+	{
+		super.validate();
+		if (hostlist == null) {
+			throw new RepositoryConfigException("No HostList specified for Virtuoso repository");
+		}
+	}
+
+	@Override
+	public Resource export(Graph graph) {
+		Resource implNode = super.export(graph);
+
+		if (hostlist != null) {
+			graph.add(implNode, HOSTLIST, graph.getValueFactory().createLiteral(hostlist));
+		}
+		if (username != null) {
+			graph.add(implNode, USERNAME, graph.getValueFactory().createLiteral(username));
+		}
+		if (password != null) {
+			graph.add(implNode, PASSWORD, graph.getValueFactory().createLiteral(password));
+		}
+
+		if (defGraph != null) {
+			graph.add(implNode, DEFGRAPH, graph.getValueFactory().createLiteral(defGraph));
+		}
+
+		if (ruleSet != null && ruleSet.length() > 0 && !ruleSet.equals("null")) {
+			graph.add(implNode, RULESET, graph.getValueFactory().createLiteral(ruleSet));
+		}
+
+		graph.add(implNode, USELAZYADD, graph.getValueFactory().createLiteral(new Boolean(useLazyAdd).toString()));
+
+		graph.add(implNode, ROUNDROBIN, graph.getValueFactory().createLiteral(new Boolean(roundRobin).toString()));
+
+		graph.add(implNode, FETCHSIZE, graph.getValueFactory().createLiteral(Integer.toString(fetchSize,10)));
+
+		return implNode;
+	}
+
+	@Override
+	public void parse(Graph graph, Resource implNode)
+		throws RepositoryConfigException
+	{
+		super.parse(graph, implNode);
+
+		try {
+			Literal hlist = GraphUtil.getOptionalObjectLiteral(graph, implNode, HOSTLIST);
+			if (hlist != null) {
+				setHostList(hlist.getLabel());
+			}
+			Literal username = GraphUtil.getOptionalObjectLiteral(graph, implNode, USERNAME);
+			if (username != null) {
+				setUsername(username.getLabel());
+			}
+			Literal password = GraphUtil.getOptionalObjectLiteral(graph, implNode, PASSWORD);
+			if (password != null) {
+				setPassword(password.getLabel());
+			}
+			Literal defgraph = GraphUtil.getOptionalObjectLiteral(graph, implNode, DEFGRAPH);
+			if (defgraph != null) {
+				setDefGraph(defgraph.getLabel());
+			}
+			Literal uselazyadd = GraphUtil.getOptionalObjectLiteral(graph, implNode, USELAZYADD);
+			if (uselazyadd != null) {
+				setUseLazyAdd(Boolean.getBoolean(uselazyadd.getLabel()));
+			}
+			Literal roundrobin = GraphUtil.getOptionalObjectLiteral(graph, implNode, ROUNDROBIN);
+			if (roundrobin != null) {
+				setRoundRobin(Boolean.getBoolean(roundrobin.getLabel()));
+			}
+			Literal fetchsize = GraphUtil.getOptionalObjectLiteral(graph, implNode, FETCHSIZE);
+			if (fetchsize != null) {
+				setFetchSize(Integer.parseInt(fetchsize.getLabel()));
+			}
+			Literal ruleset = GraphUtil.getOptionalObjectLiteral(graph, implNode, RULESET);
+			if (ruleset != null) {
+				setRuleSet(ruleset.getLabel());
+			}
+		}
+		catch (GraphUtilException e) {
+			throw new RepositoryConfigException(e.getMessage(), e);
+		}
+	}
+}
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConnection.java b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConnection.java
index d240ba9..20886da 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConnection.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryConnection.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRepositoryConnection.java,v 1.33.2.13 2011/03/23 11:59:00 source Exp $
+ *  $Id: VirtuosoRepositoryConnection.java,v 1.33.2.17 2012/03/15 12:56:53 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -73,6 +73,7 @@ import org.openrdf.query.GraphQuery;
 import org.openrdf.query.GraphQueryResult;
 import org.openrdf.query.MalformedQueryException;
 import org.openrdf.query.Query;
+import org.openrdf.query.Update;
 import org.openrdf.query.QueryEvaluationException;
 import org.openrdf.query.QueryLanguage;
 import org.openrdf.query.TupleQuery;
@@ -82,7 +83,8 @@ import org.openrdf.query.TupleQueryResultHandlerException;
 import org.openrdf.query.algebra.evaluation.QueryBindingSet;
 import org.openrdf.query.impl.GraphQueryResultImpl;
 import org.openrdf.query.impl.TupleQueryResultImpl;
-import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.UnsupportedQueryLanguageException;
+import org.openrdf.query.UpdateExecutionException;
 import org.openrdf.repository.Repository;
 import org.openrdf.repository.RepositoryConnection;
 import org.openrdf.repository.RepositoryException;
@@ -151,8 +153,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	private static Resource nilContext;
 	private Connection quadStoreConnection;
 	protected VirtuosoRepository repository;
-	static final String S_INSERT = "sparql define output:format '_JAVA_' insert into graph iri(??) { `iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)` }";
-        static final String S_DELETE = "sparql define output:format '_JAVA_' delete from graph iri(??) {`iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)`}";
+	static final String S_INSERT = "sparql insert into graph iri(??) { `iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)` }";
+        static final String S_DELETE = "sparql delete from graph iri(??) {`iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)`}";
 	static final int BATCH_SIZE = 5000;
 	private PreparedStatement psInsert;
 	private int psInsertCount = 0;
@@ -265,6 +267,9 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	 */
 	public Query prepareQuery(QueryLanguage language, String query, String baseURI) throws RepositoryException, MalformedQueryException {
 		
+		if (language != QueryLanguage.SPARQL)
+		  throw new UnsupportedQueryLanguageException(" : Only SPARQL queries are supported");
+
 		StringTokenizer st = new StringTokenizer(query);
 		String type = null;
 
@@ -328,7 +333,11 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	 * @throws UnsupportedQueryLanguageException
 	 *         If the supplied query language is not supported.
 	 */
-	public TupleQuery prepareTupleQuery(QueryLanguage langauge, final String query, String baseeURI) throws RepositoryException, MalformedQueryException {
+	public TupleQuery prepareTupleQuery(QueryLanguage language, final String query, String baseeURI) throws RepositoryException, MalformedQueryException {
+
+		if (language != QueryLanguage.SPARQL)
+		  throw new UnsupportedQueryLanguageException(" : Only SPARQL queries are supported");
+
 		TupleQuery q = new VirtuosoTupleQuery() {
 			public TupleQueryResult evaluate() throws QueryEvaluationException {
 				return executeSPARQLForTupleResult(query, getDataset(), getIncludeInferred(), getBindings());
@@ -381,6 +390,10 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	 *         If the supplied query language is not supported.
 	 */
 	public GraphQuery prepareGraphQuery(QueryLanguage language, final String query, String baseURI) throws RepositoryException, MalformedQueryException {
+
+		if (language != QueryLanguage.SPARQL)
+		  throw new UnsupportedQueryLanguageException(" : Only SPARQL queries are supported");
+
 		GraphQuery q = new VirtuosoGraphQuery() {
 			public GraphQueryResult evaluate() throws QueryEvaluationException {
 				return executeSPARQLForGraphResult(query, getDataset(), getIncludeInferred(), getBindings());
@@ -433,6 +446,10 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	 *         If the supplied query language is not supported.
 	 */
 	public BooleanQuery prepareBooleanQuery(QueryLanguage language, final String query, String baseURI) throws RepositoryException, MalformedQueryException {
+
+		if (language != QueryLanguage.SPARQL)
+		  throw new UnsupportedQueryLanguageException(" : Only SPARQL queries are supported");
+
 		BooleanQuery q = new VirtuosoBooleanQuery() {
 			public boolean evaluate() throws QueryEvaluationException {
 				return executeSPARQLForBooleanResult(query, getDataset(), getIncludeInferred(), getBindings());
@@ -441,6 +458,25 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		return q;
 	}
 
+	public Update prepareUpdate(QueryLanguage language, String update) throws RepositoryException, MalformedQueryException
+	{
+	        return prepareUpdate(language, update, null);
+	}
+
+	public Update prepareUpdate(QueryLanguage language, final String update, String baseURI) throws RepositoryException, MalformedQueryException
+	{
+		if (language != QueryLanguage.SPARQL)
+		  throw new UnsupportedQueryLanguageException(" : Only SPARQL queries are supported");
+
+		Update u = new VirtuosoUpdate() {
+			public void execute() throws UpdateExecutionException {
+				executeSPARUL(update, getDataset(), getIncludeInferred(), getBindings());
+			}
+		};
+		return u;
+	}
+
+	
 	/**
 	 * Gets all resources that are used as content identifiers. Care should be
 	 * taken that the returned {@link RepositoryResult} is closed to free any
@@ -455,7 +491,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		Vector<Resource> v = new Vector<Resource>();
 		String query = "DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS()";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(query);
 
 			// begin at onset one
@@ -678,7 +714,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	        }
 		query.append("where { graph ?g {?s ?p ?o }})f");
 		try {
-		        java.sql.Statement st = getQuadStoreConnection().createStatement();
+		        java.sql.Statement st = createStatement();
 		        ResultSet rs = st.executeQuery(query.toString());
 
 			if (rs.next())
@@ -706,7 +742,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		boolean result = false;
 		String query = "sparql define input:storage \"\" select * where {?s ?o ?p} limit 1";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(query);
 			result = !rs.next();
                         rs.close();
@@ -870,7 +906,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 			parser.setVerifyData(true);
 			parser.setStopAtFirstError(true);
 			parser.setDatatypeHandling(RDFParser.DatatypeHandling.IGNORE);
-			final PreparedStatement ps = quadStoreConnection.prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+			final PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 			final Resource[] _contexts = checkDMLContext(contexts);
 
 			parser.setRDFHandler(new RDFHandlerBase() {
@@ -896,7 +932,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 				public void handleNamespace(String prefix, String name) throws RDFHandlerException {
 					String query = "DB.DBA.XML_SET_NS_DECL(?, ?, 1)";
 					try {
-						PreparedStatement psn = getQuadStoreConnection().prepareStatement(query);
+						PreparedStatement psn = prepareStatement(query);
 						psn.setString(1, prefix);
 						psn.setString(2, name);
 						psn.execute();
@@ -1113,7 +1149,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		setAutoCommit(false);
 
 		try {
-			PreparedStatement ps = quadStoreConnection.prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+			PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 			int count = 0;
 
 			while (it.hasNext()) {
@@ -1187,7 +1223,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		setAutoCommit(false);
 
 		try {
-			PreparedStatement ps = quadStoreConnection.prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+			PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 			int count = 0;
 
 			while (statements.hasNext()) {
@@ -1452,7 +1488,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		List<Namespace> namespaceList = new LinkedList<Namespace>();
 		String query = "DB.DBA.XML_SELECT_ALL_NS_DECLS (3)";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(query);
 
 			// begin at onset one
@@ -1488,7 +1524,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		String retVal = null;
 		String query = "SELECT __xml_get_ns_uri (?, 3)";
 		try {
-			PreparedStatement ps = getQuadStoreConnection().prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			ps.setString(1, prefix);
 			ResultSet rs = ps.executeQuery();
 
@@ -1521,7 +1557,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		flushDelayAdd();
 		String query = "DB.DBA.XML_SET_NS_DECL(?, ?, 1)";
 		try {
-			PreparedStatement ps = getQuadStoreConnection().prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			ps.setString(1, prefix);
 			ps.setString(2, name);
 			ps.execute();
@@ -1546,7 +1582,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		flushDelayAdd();
 		String query = "DB.DBA.XML_REMOVE_NS_BY_PREFIX(?, 1)";
 		try {
-			PreparedStatement ps = getQuadStoreConnection().prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			ps.setString(1, prefix);
 			ps.execute(query);
 		}
@@ -1566,7 +1602,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		flushDelayAdd();
 		String query = "DB.DBA.XML_CLEAR_ALL_NS_DECLS()";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			stmt.execute(query);
 		}
 		catch (SQLException e) {
@@ -1581,9 +1617,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
-			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
+			java.sql.Statement stmt = createStatement();
+			ResultSet rs = stmt.executeQuery(fixQuery(false, query, dataset, includeInferred, bindings));
 
 			ResultSetMetaData rsmd = rs.getMetaData();
 
@@ -1608,9 +1643,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
-			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
+			java.sql.Statement stmt = createStatement();
+			ResultSet rs = stmt.executeQuery(fixQuery(false, query, dataset, includeInferred, bindings));
 
 			ResultSetMetaData rsmd = rs.getMetaData();
 
@@ -1630,8 +1664,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
+			java.sql.Statement stmt = createStatement();
+			ResultSet rs = stmt.executeQuery(fixQuery(false, query, dataset, includeInferred, bindings));
 
 			while(rs.next())
 			{
@@ -1653,9 +1687,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
-			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
+			java.sql.Statement stmt = createStatement();
+			ResultSet rs = stmt.executeQuery(fixQuery(false, query, dataset, includeInferred, bindings));
 
 			ResultSetMetaData rsmd = rs.getMetaData();
 			// begin at onset one
@@ -1688,9 +1721,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
-			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
+			java.sql.Statement stmt = createStatement();
+			ResultSet rs = stmt.executeQuery(fixQuery(false, query, dataset, includeInferred, bindings));
 			ResultSetMetaData rsmd = rs.getMetaData();
 	                int col_g = -1;
         	        int col_s = -1;
@@ -1741,6 +1773,23 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		}
 	}
 	
+
+        protected void executeSPARUL(String query, Dataset dataset, boolean includeInferred, BindingSet bindings) throws UpdateExecutionException
+        {
+		try {
+			verifyIsOpen();
+			flushDelayAdd();
+			java.sql.Statement stmt = createStatement();
+			stmt.execute(fixQuery(true, query, dataset, includeInferred, bindings));
+			stmt.close();
+
+		}
+		catch (Exception e) {
+			throw new UpdateExecutionException(": SPARQL execute failed:["+query+"] \n Exception:"+e);
+		}
+	}
+
+
 	/**
 	 * Execute SPARUL query on this repository.
 	 * 
@@ -1753,16 +1802,23 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	 */
 	public int executeSPARUL(String query) throws RepositoryException {
 
+		java.sql.Statement stmt = null;
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.execute("sparql\n define output:format '_JAVA_'\n " + query);
+			stmt = createStatement();
+			stmt.execute("sparql\n " + query);
 			return stmt.getUpdateCount();
 		}
 		catch (SQLException e) {
 			throw new RepositoryException(": SPARQL execute failed:["+query+"] \n Exception:"+e);
 		}
+		finally {
+			try {
+			  if (stmt != null)
+				stmt.close();
+			} catch (Exception e) {}
+		}
 	}
 
 	/**
@@ -1784,6 +1840,28 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		this.quadStoreConnection = quadStoreConnection;
 	}
 
+
+	private java.sql.Statement createStatement() throws java.sql.SQLException
+	{
+	  java.sql.Statement stmt = quadStoreConnection.createStatement();
+	  int timeout = repository.getQueryTimeout();
+          if (timeout > 0)
+            stmt.setQueryTimeout(timeout);
+          stmt.setFetchSize(prefetchSize);
+          return stmt;
+	}
+
+	private java.sql.PreparedStatement prepareStatement(String sql) throws java.sql.SQLException
+	{
+	  java.sql.PreparedStatement stmt = quadStoreConnection.prepareStatement(sql);
+	  int timeout = repository.getQueryTimeout();
+          if (timeout > 0)
+            stmt.setQueryTimeout(timeout);
+          stmt.setFetchSize(prefetchSize);
+          return stmt;
+	}
+	
+	
 	private String substBindings(String query, BindingSet bindings) 
 	{
 		StringBuffer buf = new StringBuffer();
@@ -1830,26 +1908,13 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		return buf.toString();
 	}
 	
-	private String fixQuery(String query, Dataset dataset, boolean includeInferred, BindingSet bindings) 
+	private String fixQuery(boolean isSPARUL, String query, Dataset dataset, boolean includeInferred, BindingSet bindings) 
 	{
-		StringTokenizer tok = new StringTokenizer(query);
-		String s = "";
 		StringBuffer ret = new StringBuffer("sparql\n ");
 
-		while(tok.hasMoreTokens()) {
-		    s = tok.nextToken().toLowerCase();
-		    if (s.equals("describe") || s.equals("construct") || s.equals("ask") || s.equals("select")) 
-			break;
-		}
-
-		if (s.equals("describe") || s.equals("construct") || s.equals("ask")) 
-			ret.append("define output:format '_JAVA_'\n ");
-
 		if (includeInferred && repository.ruleSet!=null && repository.ruleSet.length() > 0)
 		  ret.append("define input:inference '"+repository.ruleSet+"'\n ");
 
-		ret.append("define output:format '_JAVA_'\n ");
-
 		if (dataset != null)
 		{
 		   Set<URI> list = dataset.getDefaultGraphs();
@@ -1887,7 +1952,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		        if (!isAutoCommit && useLazyAdd) {
 		        	synchronized(this) {
 		        		if (psInsert == null)
-						psInsert = getQuadStoreConnection().prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+						psInsert = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 
 					for (int i = 0; i < contexts.length; i++) {
 						psInsert.setString(1, contexts[i].stringValue());
@@ -1905,7 +1970,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 					}
 				}
 		        } else {
-				PreparedStatement ps = getQuadStoreConnection().prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+				PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 
 				for (int i = 0; i < contexts.length; i++) {
 					ps.setString(1, contexts[i].stringValue());
@@ -1971,7 +2036,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 
                 if (contexts!=null && contexts.length > 0)
 		  try {
-			PreparedStatement ps = quadStoreConnection.prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			for (int i = 0; i < contexts.length; i++) {
 				ps.setString(1, contexts[i].stringValue());
 				ps.execute();
@@ -2024,8 +2089,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 			query.append(" LIMIT 1");
 
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
+			java.sql.Statement stmt = createStatement();
 			rs = stmt.executeQuery(query.toString());
 		}
 		catch (Exception e) {
@@ -2048,13 +2112,13 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		    if (subject == null && predicate == null && object == null && context != null) {
 			String  query = "sparql clear graph iri(??)";
 
-			ps = getQuadStoreConnection().prepareStatement(query);
+			ps = prepareStatement(query);
 			ps.setString(1, context.stringValue());
 			ps.execute();
 
 		    } else if (subject != null && predicate != null && object != null && context != null) {
 
-		    	ps = getQuadStoreConnection().prepareStatement(VirtuosoRepositoryConnection.S_DELETE);
+		    	ps = prepareStatement(VirtuosoRepositoryConnection.S_DELETE);
 
 			ps.setString(1, context.stringValue());
 			bindResource(ps, 2, subject);
@@ -2082,7 +2146,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
   				"> { "+S+" "+P+" "+O+" } from <"+context+
   				"> where { "+S+" "+P+" "+O+" }";
 
-		    	java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+		    	java.sql.Statement stmt = createStatement();
 		    	stmt.execute(query);
 		    }
 		}
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryFactory.java b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryFactory.java
index 9ae5ddb..53f4e95 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryFactory.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositoryFactory.java
@@ -1,79 +1,79 @@
-/*
- *  $Id: VirtuosoRepositoryFactory.java,v 1.1.2.2 2010/02/25 20:23:05 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2010 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.sesame2.driver.config;
-
-
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.config.RepositoryConfigException;
-import org.openrdf.repository.config.RepositoryFactory;
-import org.openrdf.repository.config.RepositoryImplConfig;
-import virtuoso.sesame2.driver.VirtuosoRepository;
-
-/**
- * A {@link RepositoryFactory} that creates {@link VirtuosoRepository}s based on
- * RDF configuration data.
- */
-public class VirtuosoRepositoryFactory implements RepositoryFactory {
-
-	/**
-	 * The type of repositories that are created by this factory.
-	 * 
-	 * @see RepositoryFactory#getRepositoryType()
-	 */
-	public static final String REPOSITORY_TYPE = "openrdf:VirtuosoRepository";
-
-	/**
-	 * Returns the repository's type: <tt>openrdf:VirtuosoRepository</tt>.
-	 */
-	public String getRepositoryType() {
-		return REPOSITORY_TYPE;
-	}
-
-	public RepositoryImplConfig getConfig() {
-		return new VirtuosoRepositoryConfig();
-	}
-
-	public Repository getRepository(RepositoryImplConfig config)
-		throws RepositoryConfigException
-	{
-		VirtuosoRepository result = null;
-		
-		if (config instanceof VirtuosoRepositoryConfig) {
-			VirtuosoRepositoryConfig vConfig = (VirtuosoRepositoryConfig)config;
-			result = new VirtuosoRepository(vConfig.getHostList(), 
-					vConfig.getUsername(), 
-					vConfig.getPassword(),
-					vConfig.getDefGraph(),
-					vConfig.getUseLazyAdd());
-			result.setFetchSize(vConfig.getFetchSize());
-			result.setRoundrobin(vConfig.getRoundRobin());
-			result.setFetchSize(vConfig.getFetchSize());
-		  	result.setRuleSet(vConfig.getRuleSet());
-		}
-		else {
-			throw new RepositoryConfigException("Invalid configuration class: " + config.getClass());
-		}
-		return result;
-	}
-}
+/*
+ *  $Id: VirtuosoRepositoryFactory.java,v 1.1.2.4 2012/03/08 16:22:50 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame2.driver.config;
+
+
+import org.openrdf.repository.Repository;
+import org.openrdf.repository.config.RepositoryConfigException;
+import org.openrdf.repository.config.RepositoryFactory;
+import org.openrdf.repository.config.RepositoryImplConfig;
+import virtuoso.sesame2.driver.VirtuosoRepository;
+
+/**
+ * A {@link RepositoryFactory} that creates {@link VirtuosoRepository}s based on
+ * RDF configuration data.
+ */
+public class VirtuosoRepositoryFactory implements RepositoryFactory {
+
+	/**
+	 * The type of repositories that are created by this factory.
+	 * 
+	 * @see RepositoryFactory#getRepositoryType()
+	 */
+	public static final String REPOSITORY_TYPE = "openrdf:VirtuosoRepository";
+
+	/**
+	 * Returns the repository's type: <tt>openrdf:VirtuosoRepository</tt>.
+	 */
+	public String getRepositoryType() {
+		return REPOSITORY_TYPE;
+	}
+
+	public RepositoryImplConfig getConfig() {
+		return new VirtuosoRepositoryConfig();
+	}
+
+	public Repository getRepository(RepositoryImplConfig config)
+		throws RepositoryConfigException
+	{
+		VirtuosoRepository result = null;
+		
+		if (config instanceof VirtuosoRepositoryConfig) {
+			VirtuosoRepositoryConfig vConfig = (VirtuosoRepositoryConfig)config;
+			result = new VirtuosoRepository(vConfig.getHostList(), 
+					vConfig.getUsername(), 
+					vConfig.getPassword(),
+					vConfig.getDefGraph(),
+					vConfig.getUseLazyAdd());
+			result.setFetchSize(vConfig.getFetchSize());
+			result.setRoundrobin(vConfig.getRoundRobin());
+			result.setFetchSize(vConfig.getFetchSize());
+		  	result.setRuleSet(vConfig.getRuleSet());
+		}
+		else {
+			throw new RepositoryConfigException("Invalid configuration class: " + config.getClass());
+		}
+		return result;
+	}
+}
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositorySchema.java b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositorySchema.java
index fc5ef9e..00f94d1 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoRepositorySchema.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoRepositorySchema.java
@@ -1,78 +1,78 @@
-/*
- *  $Id: VirtuosoRepositorySchema.java,v 1.1.2.2 2010/02/25 20:23:05 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2010 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.sesame2.driver.config;
-
-
-import org.openrdf.model.URI;
-import org.openrdf.model.ValueFactory;
-import org.openrdf.model.impl.ValueFactoryImpl;
-import virtuoso.sesame2.driver.VirtuosoRepository;
-
-/**
- * Defines constants for the VirtuosoRepository schema which is used by
- * {@link VirtuosoRepositoryFactory}s to initialize {@link VirtuosoRepository}s.
- * 
- */
-public class VirtuosoRepositorySchema {
-
-	public static final String NAMESPACE = "http://www.openrdf.org/config/repository/virtuoso#";
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#hostList</tt> */
-	public final static URI HOSTLIST;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#username</tt> */
-	public final static URI USERNAME;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#password</tt> */
-	public final static URI PASSWORD;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#defGraph</tt> */
-	public final static URI DEFGRAPH;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#useLazyAdd</tt> */
-	public final static URI USELAZYADD;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#fetchSize</tt> */
-	public final static URI FETCHSIZE;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#roundRobin</tt> */
-	public final static URI ROUNDROBIN;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#ruleSet</tt> */
-	public final static URI RULESET;
-
-
-	static {
-		ValueFactory factory = ValueFactoryImpl.getInstance();
-		HOSTLIST   = factory.createURI(NAMESPACE, "hostList");
-		USERNAME   = factory.createURI(NAMESPACE, "username");
-		PASSWORD   = factory.createURI(NAMESPACE, "password");
-		DEFGRAPH   = factory.createURI(NAMESPACE, "defGraph");
-		USELAZYADD = factory.createURI(NAMESPACE, "useLazyAdd");
-		FETCHSIZE  = factory.createURI(NAMESPACE, "fetchSize");
-		ROUNDROBIN = factory.createURI(NAMESPACE, "roundRobin");
-		RULESET    = factory.createURI(NAMESPACE, "ruleSet");
-	}
-}
-
+/*
+ *  $Id: VirtuosoRepositorySchema.java,v 1.1.2.4 2012/03/08 16:22:50 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame2.driver.config;
+
+
+import org.openrdf.model.URI;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.model.impl.ValueFactoryImpl;
+import virtuoso.sesame2.driver.VirtuosoRepository;
+
+/**
+ * Defines constants for the VirtuosoRepository schema which is used by
+ * {@link VirtuosoRepositoryFactory}s to initialize {@link VirtuosoRepository}s.
+ * 
+ */
+public class VirtuosoRepositorySchema {
+
+	public static final String NAMESPACE = "http://www.openrdf.org/config/repository/virtuoso#";
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#hostList</tt> */
+	public final static URI HOSTLIST;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#username</tt> */
+	public final static URI USERNAME;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#password</tt> */
+	public final static URI PASSWORD;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#defGraph</tt> */
+	public final static URI DEFGRAPH;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#useLazyAdd</tt> */
+	public final static URI USELAZYADD;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#fetchSize</tt> */
+	public final static URI FETCHSIZE;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#roundRobin</tt> */
+	public final static URI ROUNDROBIN;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#ruleSet</tt> */
+	public final static URI RULESET;
+
+
+	static {
+		ValueFactory factory = ValueFactoryImpl.getInstance();
+		HOSTLIST   = factory.createURI(NAMESPACE, "hostList");
+		USERNAME   = factory.createURI(NAMESPACE, "username");
+		PASSWORD   = factory.createURI(NAMESPACE, "password");
+		DEFGRAPH   = factory.createURI(NAMESPACE, "defGraph");
+		USELAZYADD = factory.createURI(NAMESPACE, "useLazyAdd");
+		FETCHSIZE  = factory.createURI(NAMESPACE, "fetchSize");
+		ROUNDROBIN = factory.createURI(NAMESPACE, "roundRobin");
+		RULESET    = factory.createURI(NAMESPACE, "ruleSet");
+	}
+}
+
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoTest.java b/binsrc/sesame2/virtuoso_driver/VirtuosoTest.java
index 47796fa..554a562 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoTest.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoTest.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoTest.java,v 1.11.2.3 2010/03/01 10:06:02 source Exp $
+ *  $Id: VirtuosoTest.java,v 1.11.2.5 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -120,7 +120,7 @@ public class VirtuosoTest {
 			// test add data to the repository
 			boolean ok = true;
 			String query = null;
-			String strurl = "http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com/foaf.rdf";
+			String strurl = "http://dbpedia.org/data/Berlin.rdf";
 			URL url = new URL(strurl);
 			URI context = repository.getValueFactory().createURI("http://demo.openlinksw.com/demo#this");
 			Value[][] results = null;
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoTupleQuery.java b/binsrc/sesame2/virtuoso_driver/VirtuosoTupleQuery.java
index 84a784b..62fdfb8 100644
--- a/binsrc/sesame2/virtuoso_driver/VirtuosoTupleQuery.java
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoTupleQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoTupleQuery.java,v 1.2.2.2 2010/02/25 20:23:06 source Exp $
+ *  $Id: VirtuosoTupleQuery.java,v 1.2.2.3 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame2/virtuoso_driver/VirtuosoUpdate.java b/binsrc/sesame2/virtuoso_driver/VirtuosoUpdate.java
new file mode 100644
index 0000000..a3a05d4
--- /dev/null
+++ b/binsrc/sesame2/virtuoso_driver/VirtuosoUpdate.java
@@ -0,0 +1,44 @@
+/*
+ *  $Id: VirtuosoUpdate.java,v 1.1.4.3 2012/03/08 12:55:05 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame2.driver;
+
+import org.openrdf.model.Value;
+import org.openrdf.query.BindingSet;
+import org.openrdf.query.Dataset;
+import org.openrdf.query.TupleQueryResultHandler;
+import org.openrdf.query.Query;
+import org.openrdf.query.Update;
+import org.openrdf.query.Operation;
+import org.openrdf.query.impl.MapBindingSet;
+import org.openrdf.query.UpdateExecutionException;
+
+public class VirtuosoUpdate extends VirtuosoOperation implements Update {
+
+	/**
+	 * Execute this update on the repository
+	 */
+	public void execute() throws UpdateExecutionException {
+	}
+
+}
diff --git a/binsrc/sesame3/Makefile.am b/binsrc/sesame3/Makefile.am
index a6118b8..8224ee6 100644
--- a/binsrc/sesame3/Makefile.am
+++ b/binsrc/sesame3/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame3/Makefile.in b/binsrc/sesame3/Makefile.in
index 138921a..25167ea 100644
--- a/binsrc/sesame3/Makefile.in
+++ b/binsrc/sesame3/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/sesame3/virtuoso_driver/Version.java b/binsrc/sesame3/virtuoso_driver/Version.java
index 616e14f..a9ddc47 100644
--- a/binsrc/sesame3/virtuoso_driver/Version.java
+++ b/binsrc/sesame3/virtuoso_driver/Version.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Version.java,v 1.1.4.4 2011/03/23 11:59:31 source Exp $
+ *  $Id: Version.java,v 1.1.4.7 2012/03/15 12:57:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -29,7 +29,7 @@ public class Version {
    protected static final String DRV_VER = "3.0-alpha";
 
    // The major and minor version number
-   protected static final String build_id = "1.3";
+   protected static final String build_id = "1.5";
 
    public static void main(String args[])
    {
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoBooleanQuery.java b/binsrc/sesame3/virtuoso_driver/VirtuosoBooleanQuery.java
index 5db2efb..72b1048 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoBooleanQuery.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoBooleanQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoBooleanQuery.java,v 1.1 2009/03/26 13:57:16 source Exp $
+ *  $Id: VirtuosoBooleanQuery.java,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoGraphQuery.java b/binsrc/sesame3/virtuoso_driver/VirtuosoGraphQuery.java
index f49a258..e2c5d95 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoGraphQuery.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoGraphQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoGraphQuery.java,v 1.1 2009/03/26 13:57:16 source Exp $
+ *  $Id: VirtuosoGraphQuery.java,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoQuery.java b/binsrc/sesame3/virtuoso_driver/VirtuosoQuery.java
index 0fe64ac..fa5738f 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoQuery.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoQuery.java,v 1.1 2009/03/26 13:57:16 source Exp $
+ *  $Id: VirtuosoQuery.java,v 1.1.2.1 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoRepository.java b/binsrc/sesame3/virtuoso_driver/VirtuosoRepository.java
index 0411d80..460a3e4 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoRepository.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoRepository.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRepository.java,v 1.1.2.8 2010/11/22 14:29:09 source Exp $
+ *  $Id: VirtuosoRepository.java,v 1.1.2.10 2012/03/08 12:55:05 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -77,6 +77,7 @@ public class VirtuosoRepository implements Repository {
 
 	boolean useLazyAdd = false;
 	int prefetchSize = 200;
+	int queryTimeout = 0;
 	private boolean initialized = false;
 	String ruleSet;
     
@@ -347,6 +348,23 @@ public class VirtuosoRepository implements Repository {
 
 
 	/**
+	 * Set the query timeout(default 0) 
+	 * 
+	 * @param seconds
+	 *        queryTimeout seconds, 0 - unlimited.
+	 */
+	public void setQueryTimeout(int seconds) {
+		this.queryTimeout = seconds;
+	}
+
+	/**
+	 * Get the query timeout seconds
+	 */
+	public int getQueryTimeout() {
+		return this.queryTimeout;
+	}
+
+	/**
 	 * Set the RoundRobin state for connection(default false) 
 	 * 
 	 * @param sz
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConfig.java b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConfig.java
index fd0f935..e472b6e 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConfig.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConfig.java
@@ -1,234 +1,234 @@
-/*
- *  $Id: VirtuosoRepositoryConfig.java,v 1.1.4.2 2010/05/31 14:27:52 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2010 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.sesame3.driver.config;
-
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.PASSWORD;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.HOSTLIST;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.USERNAME;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.DEFGRAPH;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.USELAZYADD;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.FETCHSIZE;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.ROUNDROBIN;
-import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.RULESET;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.openrdf.model.Literal;
-import org.openrdf.model.Model;
-import org.openrdf.model.Resource;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.model.impl.ValueFactoryImpl;
-import org.openrdf.model.util.ModelException;
-import org.openrdf.repository.config.RepositoryImplConfigBase;
-import org.openrdf.store.StoreConfigException;
-
-
-public class VirtuosoRepositoryConfig extends RepositoryImplConfigBase {
-
-	private String hostlist;
-
-	private String username;
-
-	private String password;
-
-	private String defGraph;
-
-	private boolean useLazyAdd;
-
-	private int fetchSize = 200;
-
-	private boolean roundRobin;
-
-	private String ruleSet;
-
-	public VirtuosoRepositoryConfig() {
-		super(VirtuosoRepositoryFactory.REPOSITORY_TYPE);
-	}
-
-	public VirtuosoRepositoryConfig(String hostlist) {
-		this();
-		setHostList(hostlist);
-	}
-
-	public String getHostList() {
-		return hostlist;
-	}
-
-	public void setHostList(String hostlist) {
-		this.hostlist = hostlist;
-	}
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-
-	public String getDefGraph() {
-		return defGraph;
-	}
-
-	public void setDefGraph(String defGraph) {
-		this.defGraph = defGraph;
-	}
-
-
-	public boolean getUseLazyAdd() {
-		return useLazyAdd;
-	}
-
-	public void setUseLazyAdd(boolean useLazyAdd) {
-		this.useLazyAdd = useLazyAdd;
-	}
-
-	public boolean getRoundRobin() {
-		return roundRobin;
-	}
-
-	public void setRoundRobin(boolean roundRobin) {
-		this.roundRobin = roundRobin;
-	}
-
-
-	public int getFetchSize() {
-		return fetchSize;
-	}
-
-	public void setFetchSize(int fetchSize) {
-		this.fetchSize = fetchSize;
-	}
-
-
-	public String getRuleSet() {
-		return ruleSet;
-	}
-
-	public void setRuleSet(String ruleSet) {
-		if (ruleSet!=null && ruleSet.equals("null"))
-			this.ruleSet = null;
-		else
-			this.ruleSet = ruleSet;
-	}
-
-	
-	@Override
-	public void validate()
-		throws StoreConfigException
-	{
-		super.validate();
-		if (hostlist == null) {
-			throw new StoreConfigException("No HostList specified for Virtuoso repository");
-		}
-	}
-
-	@Override
-	public Resource export(Model model) {
-		Resource implNode = super.export(model);
-		ValueFactoryImpl vf = ValueFactoryImpl.getInstance();
-
-		if (hostlist != null) {
-			model.add(implNode, HOSTLIST, vf.createLiteral(hostlist));
-		}
-		if (username != null) {
-			model.add(implNode, USERNAME, vf.createLiteral(username));
-		}
-		if (password != null) {
-			model.add(implNode, PASSWORD, vf.createLiteral(password));
-		}
-
-		if (defGraph != null) {
-			model.add(implNode, DEFGRAPH, vf.createLiteral(defGraph));
-		}
-
-		if (ruleSet != null && ruleSet.length() > 0 && !ruleSet.equals("null")) {
-			model.add(implNode, RULESET, vf.createLiteral(ruleSet));
-		}
-
-		model.add(implNode, USELAZYADD, vf.createLiteral(new Boolean(useLazyAdd).toString()));
-
-		model.add(implNode, ROUNDROBIN, vf.createLiteral(new Boolean(roundRobin).toString()));
-
-		model.add(implNode, FETCHSIZE, vf.createLiteral(Integer.toString(fetchSize,10)));
-
-		return implNode;
-	}
-
-	@Override
-	public void parse(Model model, Resource implNode)
-		throws StoreConfigException
-	{
-		super.parse(model, implNode);
-
-		try {
-		        Literal hlist = model.filter(implNode, HOSTLIST, null).objectLiteral();
-			if (hlist != null) {
-				setHostList(hlist.getLabel());
-			}
-		        Literal username = model.filter(implNode, USERNAME, null).objectLiteral();
-			if (username != null) {
-				setUsername(username.getLabel());
-			}
-		        Literal password = model.filter(implNode, PASSWORD, null).objectLiteral();
-			if (password != null) {
-				setPassword(password.getLabel());
-			}
-		        Literal defgraph = model.filter(implNode, DEFGRAPH, null).objectLiteral();
-			if (defgraph != null) {
-				setDefGraph(defgraph.getLabel());
-			}
-		        Literal uselazyadd = model.filter(implNode, USELAZYADD, null).objectLiteral();
-			if (uselazyadd != null) {
-				setUseLazyAdd(Boolean.getBoolean(uselazyadd.getLabel()));
-			}
-		        Literal roundrobin = model.filter(implNode, ROUNDROBIN, null).objectLiteral();
-			if (roundrobin != null) {
-				setRoundRobin(Boolean.getBoolean(roundrobin.getLabel()));
-			}
-		        Literal fetchsize = model.filter(implNode, FETCHSIZE, null).objectLiteral();
-			if (fetchsize != null) {
-				setFetchSize(Integer.parseInt(fetchsize.getLabel()));
-			}
-		        Literal ruleset = model.filter(implNode, RULESET, null).objectLiteral();
-			if (ruleset != null) {
-				setRuleSet(ruleset.getLabel());
-			}
-		}
-		catch (ModelException e) {
-			throw new StoreConfigException(e.getMessage(), e);
-		}
-	}
-}
+/*
+ *  $Id: VirtuosoRepositoryConfig.java,v 1.1.4.4 2012/03/08 16:23:03 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame3.driver.config;
+
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.PASSWORD;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.HOSTLIST;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.USERNAME;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.DEFGRAPH;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.USELAZYADD;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.FETCHSIZE;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.ROUNDROBIN;
+import static virtuoso.sesame3.driver.config.VirtuosoRepositorySchema.RULESET;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.openrdf.model.Literal;
+import org.openrdf.model.Model;
+import org.openrdf.model.Resource;
+import org.openrdf.model.URI;
+import org.openrdf.model.Value;
+import org.openrdf.model.impl.ValueFactoryImpl;
+import org.openrdf.model.util.ModelException;
+import org.openrdf.repository.config.RepositoryImplConfigBase;
+import org.openrdf.store.StoreConfigException;
+
+
+public class VirtuosoRepositoryConfig extends RepositoryImplConfigBase {
+
+	private String hostlist;
+
+	private String username;
+
+	private String password;
+
+	private String defGraph;
+
+	private boolean useLazyAdd;
+
+	private int fetchSize = 200;
+
+	private boolean roundRobin;
+
+	private String ruleSet;
+
+	public VirtuosoRepositoryConfig() {
+		super(VirtuosoRepositoryFactory.REPOSITORY_TYPE);
+	}
+
+	public VirtuosoRepositoryConfig(String hostlist) {
+		this();
+		setHostList(hostlist);
+	}
+
+	public String getHostList() {
+		return hostlist;
+	}
+
+	public void setHostList(String hostlist) {
+		this.hostlist = hostlist;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+
+	public String getDefGraph() {
+		return defGraph;
+	}
+
+	public void setDefGraph(String defGraph) {
+		this.defGraph = defGraph;
+	}
+
+
+	public boolean getUseLazyAdd() {
+		return useLazyAdd;
+	}
+
+	public void setUseLazyAdd(boolean useLazyAdd) {
+		this.useLazyAdd = useLazyAdd;
+	}
+
+	public boolean getRoundRobin() {
+		return roundRobin;
+	}
+
+	public void setRoundRobin(boolean roundRobin) {
+		this.roundRobin = roundRobin;
+	}
+
+
+	public int getFetchSize() {
+		return fetchSize;
+	}
+
+	public void setFetchSize(int fetchSize) {
+		this.fetchSize = fetchSize;
+	}
+
+
+	public String getRuleSet() {
+		return ruleSet;
+	}
+
+	public void setRuleSet(String ruleSet) {
+		if (ruleSet!=null && ruleSet.equals("null"))
+			this.ruleSet = null;
+		else
+			this.ruleSet = ruleSet;
+	}
+
+	
+	@Override
+	public void validate()
+		throws StoreConfigException
+	{
+		super.validate();
+		if (hostlist == null) {
+			throw new StoreConfigException("No HostList specified for Virtuoso repository");
+		}
+	}
+
+	@Override
+	public Resource export(Model model) {
+		Resource implNode = super.export(model);
+		ValueFactoryImpl vf = ValueFactoryImpl.getInstance();
+
+		if (hostlist != null) {
+			model.add(implNode, HOSTLIST, vf.createLiteral(hostlist));
+		}
+		if (username != null) {
+			model.add(implNode, USERNAME, vf.createLiteral(username));
+		}
+		if (password != null) {
+			model.add(implNode, PASSWORD, vf.createLiteral(password));
+		}
+
+		if (defGraph != null) {
+			model.add(implNode, DEFGRAPH, vf.createLiteral(defGraph));
+		}
+
+		if (ruleSet != null && ruleSet.length() > 0 && !ruleSet.equals("null")) {
+			model.add(implNode, RULESET, vf.createLiteral(ruleSet));
+		}
+
+		model.add(implNode, USELAZYADD, vf.createLiteral(new Boolean(useLazyAdd).toString()));
+
+		model.add(implNode, ROUNDROBIN, vf.createLiteral(new Boolean(roundRobin).toString()));
+
+		model.add(implNode, FETCHSIZE, vf.createLiteral(Integer.toString(fetchSize,10)));
+
+		return implNode;
+	}
+
+	@Override
+	public void parse(Model model, Resource implNode)
+		throws StoreConfigException
+	{
+		super.parse(model, implNode);
+
+		try {
+		        Literal hlist = model.filter(implNode, HOSTLIST, null).objectLiteral();
+			if (hlist != null) {
+				setHostList(hlist.getLabel());
+			}
+		        Literal username = model.filter(implNode, USERNAME, null).objectLiteral();
+			if (username != null) {
+				setUsername(username.getLabel());
+			}
+		        Literal password = model.filter(implNode, PASSWORD, null).objectLiteral();
+			if (password != null) {
+				setPassword(password.getLabel());
+			}
+		        Literal defgraph = model.filter(implNode, DEFGRAPH, null).objectLiteral();
+			if (defgraph != null) {
+				setDefGraph(defgraph.getLabel());
+			}
+		        Literal uselazyadd = model.filter(implNode, USELAZYADD, null).objectLiteral();
+			if (uselazyadd != null) {
+				setUseLazyAdd(Boolean.getBoolean(uselazyadd.getLabel()));
+			}
+		        Literal roundrobin = model.filter(implNode, ROUNDROBIN, null).objectLiteral();
+			if (roundrobin != null) {
+				setRoundRobin(Boolean.getBoolean(roundrobin.getLabel()));
+			}
+		        Literal fetchsize = model.filter(implNode, FETCHSIZE, null).objectLiteral();
+			if (fetchsize != null) {
+				setFetchSize(Integer.parseInt(fetchsize.getLabel()));
+			}
+		        Literal ruleset = model.filter(implNode, RULESET, null).objectLiteral();
+			if (ruleset != null) {
+				setRuleSet(ruleset.getLabel());
+			}
+		}
+		catch (ModelException e) {
+			throw new StoreConfigException(e.getMessage(), e);
+		}
+	}
+}
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConnection.java b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConnection.java
index dfbc96c..e8a3050 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConnection.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryConnection.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRepositoryConnection.java,v 1.1.2.10 2011/03/23 11:59:31 source Exp $
+ *  $Id: VirtuosoRepositoryConnection.java,v 1.1.2.13 2012/03/15 12:57:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -171,8 +171,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 	private static Resource nilContext;
 	private Connection quadStoreConnection;
 	protected VirtuosoRepository repository;
-	static final String S_INSERT = "sparql define output:format '_JAVA_'  insert into graph iri(??) { `iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)` }";
-        static final String S_DELETE = "sparql define output:format '_JAVA_' delete from graph iri(??) {`iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)`}";
+	static final String S_INSERT = "sparql insert into graph iri(??) { `iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)` }";
+        static final String S_DELETE = "sparql delete from graph iri(??) {`iri(??)` `iri(??)` `bif:__rdf_long_from_batch_params(??,??,??)`}";
 	static final int BATCH_SIZE = 5000;
 	private PreparedStatement psInsert;
 	private int psInsertCount = 0;
@@ -672,7 +672,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 
 		String query = "DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS()";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(query);
 
 			// begin at onset one
@@ -1078,7 +1078,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		boolean result = false;
 		String query = "sparql define input:storage \"\" select * where {?s ?o ?p} limit 1";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(query);
 			result = !rs.next();
                         rs.close();
@@ -1335,7 +1335,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 			parser.setVerifyData(true);
 			parser.setStopAtFirstError(true);
 			parser.setDatatypeHandling(RDFParser.DatatypeHandling.IGNORE);
-			final PreparedStatement ps = quadStoreConnection.prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+			final PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 			final Resource[] _contexts = checkDMLContext(contexts);
 
                         RDFHandlerBase rdfInserter = new RDFHandlerBase() {
@@ -1361,7 +1361,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 				public void handleNamespace(String prefix, String name) throws RDFHandlerException {
 					String query = "DB.DBA.XML_SET_NS_DECL(?, ?, 1)";
 					try {
-						PreparedStatement psn = getQuadStoreConnection().prepareStatement(query);
+						PreparedStatement psn = prepareStatement(query);
 						psn.setString(1, prefix);
 						psn.setString(2, name);
 						psn.execute();
@@ -1606,7 +1606,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		}
 
 		try {
-			PreparedStatement ps = quadStoreConnection.prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+			PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 			int count = 0;
 
 			while (it.hasNext()) {
@@ -1697,7 +1697,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		}
   
 		try {
-			PreparedStatement ps = quadStoreConnection.prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+			PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 			int count = 0;
 
 			Statement st;
@@ -2083,7 +2083,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		List<Namespace> namespaceList = new LinkedList<Namespace>();
 		String query = "DB.DBA.XML_SELECT_ALL_NS_DECLS (3)";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(query);
 
 			// begin at onset one
@@ -2120,7 +2120,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		String retVal = null;
 		String query = "SELECT __xml_get_ns_uri (?, 3)";
 		try {
-			PreparedStatement ps = getQuadStoreConnection().prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			ps.setString(1, prefix);
 			ResultSet rs = ps.executeQuery();
 
@@ -2158,7 +2158,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		}
 		String query = "DB.DBA.XML_SET_NS_DECL(?, ?, 1)";
 		try {
-			PreparedStatement ps = getQuadStoreConnection().prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			ps.setString(1, prefix);
 			ps.setString(2, name);
 			ps.execute();
@@ -2189,7 +2189,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		flushDelayAdd();
 		String query = "DB.DBA.XML_REMOVE_NS_BY_PREFIX(?, 1)";
 		try {
-			PreparedStatement ps = getQuadStoreConnection().prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			ps.setString(1, prefix);
 			ps.execute(query);
 		}
@@ -2216,7 +2216,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		flushDelayAdd();
 		String query = "DB.DBA.XML_CLEAR_ALL_NS_DECLS()";
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			stmt.execute(query);
 		}
 		catch (SQLException e) {
@@ -2231,8 +2231,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
 
 			ResultSetMetaData rsmd = rs.getMetaData();
@@ -2255,8 +2254,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
 			return new GraphResultImpl(new HashMap<String,String>(), new CursorGraphResult(rs));
 		}
@@ -2272,7 +2270,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		try {
 			verifyIsOpen();
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+			java.sql.Statement stmt = createStatement();
 			ResultSet rs = stmt.executeQuery(fixQuery(query, dataset, includeInferred, bindings));
 
 			while(rs.next())
@@ -2311,8 +2309,8 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 
 		try {
 			flushDelayAdd();
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.execute("sparql\n define output:format '_JAVA_'\n " + query);
+			java.sql.Statement stmt = createStatement();
+			stmt.execute("sparql\n " + query);
 			return stmt.getUpdateCount();
 		}
 		catch (SQLException e) {
@@ -2341,6 +2339,28 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		this.quadStoreConnection = quadStoreConnection;
 	}
 
+
+	private java.sql.Statement createStatement() throws java.sql.SQLException
+	{
+	  java.sql.Statement stmt = quadStoreConnection.createStatement();
+	  int timeout = repository.getQueryTimeout();
+          if (timeout > 0)
+            stmt.setQueryTimeout(timeout);
+          stmt.setFetchSize(prefetchSize);
+          return stmt;
+	}
+
+	private java.sql.PreparedStatement prepareStatement(String sql) throws java.sql.SQLException
+	{
+	  java.sql.PreparedStatement stmt = quadStoreConnection.prepareStatement(sql);
+	  int timeout = repository.getQueryTimeout();
+          if (timeout > 0)
+            stmt.setQueryTimeout(timeout);
+          stmt.setFetchSize(prefetchSize);
+          return stmt;
+	}
+	
+	
 	private String substBindings(String query, BindingSet bindings) 
 	{
 		StringBuffer buf = new StringBuffer();
@@ -2389,25 +2409,11 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 
 	private String fixQuery(String query, Dataset dataset, boolean includeInferred, BindingSet bindings) 
 	{
-		StringTokenizer tok = new StringTokenizer(query);
-		String s = "";
 		StringBuffer ret = new StringBuffer("sparql\n ");
 
-		while(tok.hasMoreTokens()) {
-		    s = tok.nextToken().toLowerCase();
-		    if (s.equals("describe") || s.equals("construct") || s.equals("ask")) 
-			break;
-		}
-
-		if (s.equals("describe") || s.equals("construct") || s.equals("ask")) 
-		    ret.append("define output:format '_JAVA_'\n ");
-
-
 		if (includeInferred && repository.ruleSet!=null && repository.ruleSet.length() > 0)
 		  ret.append("define input:inference '"+repository.ruleSet+"'\n ");
 
-		ret.append("define output:format '_JAVA_'\n ");
-
 		if (dataset != null)
 		{
 		   Set<URI> list = dataset.getDefaultGraphs();
@@ -2452,7 +2458,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		        if (!isAutoCommit && useLazyAdd) {
 		        	synchronized(this) {
 		        		if (psInsert == null)
-						psInsert = getQuadStoreConnection().prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+						psInsert = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 
 					for (int i = 0; i < contexts.length; i++) {
 						psInsert.setString(1, contexts[i].stringValue());
@@ -2470,7 +2476,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 					}
 				}
 		        } else {
-				PreparedStatement ps = getQuadStoreConnection().prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
+				PreparedStatement ps = prepareStatement(VirtuosoRepositoryConnection.S_INSERT);
 
 				for (int i = 0; i < contexts.length; i++) {
 					ps.setString(1, contexts[i].stringValue());
@@ -2537,7 +2543,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 
                 if (contexts!=null && contexts.length > 0)
 		  try {
-			PreparedStatement ps = quadStoreConnection.prepareStatement(query);
+			PreparedStatement ps = prepareStatement(query);
 			for (int i = 0; i < contexts.length; i++) {
 				ps.setString(1, contexts[i].stringValue());
 				ps.execute();
@@ -2586,7 +2592,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 
 
 		try {
-		        java.sql.Statement st = getQuadStoreConnection().createStatement();
+		        java.sql.Statement st = createStatement();
 		        ResultSet rs = st.executeQuery(query.toString());
 
 			if (rs.next())
@@ -2638,8 +2644,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 			query.append(" LIMIT 1");
 
 		try {
-			java.sql.Statement stmt = getQuadStoreConnection().createStatement();
-			stmt.setFetchSize(prefetchSize);
+			java.sql.Statement stmt = createStatement();
 			rs = stmt.executeQuery(query.toString());
 		}
 		catch (SQLException e) {
@@ -2664,13 +2669,13 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
 		    if (subject == null && predicate == null && object == null && context != null) {
 			String  query = "sparql clear graph iri(??)";
 
-			ps = getQuadStoreConnection().prepareStatement(query);
+			ps = prepareStatement(query);
 			ps.setString(1, context.stringValue());
 			ps.execute();
 
 		    } else if (subject != null && predicate != null && object != null && context != null) {
 
-		    	ps = getQuadStoreConnection().prepareStatement(VirtuosoRepositoryConnection.S_DELETE);
+		    	ps = prepareStatement(VirtuosoRepositoryConnection.S_DELETE);
 
 			ps.setString(1, context.stringValue());
 			bindResource(ps, 2, subject);
@@ -2698,7 +2703,7 @@ public class VirtuosoRepositoryConnection implements RepositoryConnection {
   				"> { "+S+" "+P+" "+O+" } from <"+context+
   				"> where { "+S+" "+P+" "+O+" }";
 
-		    	java.sql.Statement stmt = getQuadStoreConnection().createStatement();
+		    	java.sql.Statement stmt = createStatement();
 		    	stmt.execute(query);
 		    }
 		}
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryFactory.java b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryFactory.java
index 09e29fc..88a3a6c 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryFactory.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryFactory.java
@@ -1,79 +1,79 @@
-/*
- *  $Id: VirtuosoRepositoryFactory.java,v 1.1.4.2 2010/05/31 14:27:52 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2010 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.sesame3.driver.config;
-
-
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.config.RepositoryFactory;
-import org.openrdf.repository.config.RepositoryImplConfig;
-import org.openrdf.store.StoreConfigException;
-import virtuoso.sesame3.driver.VirtuosoRepository;
-
-/**
- * A {@link RepositoryFactory} that creates {@link VirtuosoRepository}s based on
- * RDF configuration data.
- */
-public class VirtuosoRepositoryFactory implements RepositoryFactory {
-
-	/**
-	 * The type of repositories that are created by this factory.
-	 * 
-	 * @see RepositoryFactory#getRepositoryType()
-	 */
-	public static final String REPOSITORY_TYPE = "openrdf:VirtuosoRepository";
-
-	/**
-	 * Returns the repository's type: <tt>openrdf:VirtuosoRepository</tt>.
-	 */
-	public String getRepositoryType() {
-		return REPOSITORY_TYPE;
-	}
-
-	public RepositoryImplConfig getConfig() {
-		return new VirtuosoRepositoryConfig();
-	}
-
-	public Repository getRepository(RepositoryImplConfig config)
-		throws StoreConfigException
-	{
-		VirtuosoRepository result = null;
-		
-		if (config instanceof VirtuosoRepositoryConfig) {
-			VirtuosoRepositoryConfig vConfig = (VirtuosoRepositoryConfig)config;
-			result = new VirtuosoRepository(vConfig.getHostList(), 
-					vConfig.getUsername(), 
-					vConfig.getPassword(),
-					vConfig.getDefGraph(),
-					vConfig.getUseLazyAdd());
-			result.setFetchSize(vConfig.getFetchSize());
-			result.setRoundrobin(vConfig.getRoundRobin());
-			result.setFetchSize(vConfig.getFetchSize());
-		  	result.setRuleSet(vConfig.getRuleSet());
-		}
-		else {
-			throw new StoreConfigException("Invalid configuration class: " + config.getClass());
-		}
-		return result;
-	}
-}
+/*
+ *  $Id: VirtuosoRepositoryFactory.java,v 1.1.4.4 2012/03/08 16:23:03 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame3.driver.config;
+
+
+import org.openrdf.repository.Repository;
+import org.openrdf.repository.config.RepositoryFactory;
+import org.openrdf.repository.config.RepositoryImplConfig;
+import org.openrdf.store.StoreConfigException;
+import virtuoso.sesame3.driver.VirtuosoRepository;
+
+/**
+ * A {@link RepositoryFactory} that creates {@link VirtuosoRepository}s based on
+ * RDF configuration data.
+ */
+public class VirtuosoRepositoryFactory implements RepositoryFactory {
+
+	/**
+	 * The type of repositories that are created by this factory.
+	 * 
+	 * @see RepositoryFactory#getRepositoryType()
+	 */
+	public static final String REPOSITORY_TYPE = "openrdf:VirtuosoRepository";
+
+	/**
+	 * Returns the repository's type: <tt>openrdf:VirtuosoRepository</tt>.
+	 */
+	public String getRepositoryType() {
+		return REPOSITORY_TYPE;
+	}
+
+	public RepositoryImplConfig getConfig() {
+		return new VirtuosoRepositoryConfig();
+	}
+
+	public Repository getRepository(RepositoryImplConfig config)
+		throws StoreConfigException
+	{
+		VirtuosoRepository result = null;
+		
+		if (config instanceof VirtuosoRepositoryConfig) {
+			VirtuosoRepositoryConfig vConfig = (VirtuosoRepositoryConfig)config;
+			result = new VirtuosoRepository(vConfig.getHostList(), 
+					vConfig.getUsername(), 
+					vConfig.getPassword(),
+					vConfig.getDefGraph(),
+					vConfig.getUseLazyAdd());
+			result.setFetchSize(vConfig.getFetchSize());
+			result.setRoundrobin(vConfig.getRoundRobin());
+			result.setFetchSize(vConfig.getFetchSize());
+		  	result.setRuleSet(vConfig.getRuleSet());
+		}
+		else {
+			throw new StoreConfigException("Invalid configuration class: " + config.getClass());
+		}
+		return result;
+	}
+}
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryMetaData.java b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryMetaData.java
index 8ad943a..6bfbeac 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryMetaData.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositoryMetaData.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRepositoryMetaData.java,v 1.1 2009/03/26 13:57:16 source Exp $
+ *  $Id: VirtuosoRepositoryMetaData.java,v 1.1.2.1 2012/03/08 12:55:06 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositorySchema.java b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositorySchema.java
index 18d00b6..13af0fa 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoRepositorySchema.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoRepositorySchema.java
@@ -1,78 +1,78 @@
-/*
- *  $Id: VirtuosoRepositorySchema.java,v 1.1.4.2 2010/05/31 14:27:52 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2010 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.sesame3.driver.config;
-
-
-import org.openrdf.model.URI;
-import org.openrdf.model.ValueFactory;
-import org.openrdf.model.impl.ValueFactoryImpl;
-import virtuoso.sesame3.driver.VirtuosoRepository;
-
-/**
- * Defines constants for the VirtuosoRepository schema which is used by
- * {@link VirtuosoRepositoryFactory}s to initialize {@link VirtuosoRepository}s.
- * 
- */
-public class VirtuosoRepositorySchema {
-
-	public static final String NAMESPACE = "http://www.openrdf.org/config/repository/virtuoso#";
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#hostList</tt> */
-	public final static URI HOSTLIST;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#username</tt> */
-	public final static URI USERNAME;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#password</tt> */
-	public final static URI PASSWORD;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#defGraph</tt> */
-	public final static URI DEFGRAPH;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#useLazyAdd</tt> */
-	public final static URI USELAZYADD;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#fetchSize</tt> */
-	public final static URI FETCHSIZE;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#roundRobin</tt> */
-	public final static URI ROUNDROBIN;
-
-	/** <tt>http://www.openrdf.org/config/repository/virtuoso#ruleSet</tt> */
-	public final static URI RULESET;
-
-
-	static {
-		ValueFactory factory = ValueFactoryImpl.getInstance();
-		HOSTLIST   = factory.createURI(NAMESPACE, "hostList");
-		USERNAME   = factory.createURI(NAMESPACE, "username");
-		PASSWORD   = factory.createURI(NAMESPACE, "password");
-		DEFGRAPH   = factory.createURI(NAMESPACE, "defGraph");
-		USELAZYADD = factory.createURI(NAMESPACE, "useLazyAdd");
-		FETCHSIZE  = factory.createURI(NAMESPACE, "fetchSize");
-		ROUNDROBIN = factory.createURI(NAMESPACE, "roundRobin");
-		RULESET    = factory.createURI(NAMESPACE, "ruleSet");
-	}
-}
-
+/*
+ *  $Id: VirtuosoRepositorySchema.java,v 1.1.4.4 2012/03/08 16:23:03 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+package virtuoso.sesame3.driver.config;
+
+
+import org.openrdf.model.URI;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.model.impl.ValueFactoryImpl;
+import virtuoso.sesame3.driver.VirtuosoRepository;
+
+/**
+ * Defines constants for the VirtuosoRepository schema which is used by
+ * {@link VirtuosoRepositoryFactory}s to initialize {@link VirtuosoRepository}s.
+ * 
+ */
+public class VirtuosoRepositorySchema {
+
+	public static final String NAMESPACE = "http://www.openrdf.org/config/repository/virtuoso#";
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#hostList</tt> */
+	public final static URI HOSTLIST;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#username</tt> */
+	public final static URI USERNAME;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#password</tt> */
+	public final static URI PASSWORD;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#defGraph</tt> */
+	public final static URI DEFGRAPH;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#useLazyAdd</tt> */
+	public final static URI USELAZYADD;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#fetchSize</tt> */
+	public final static URI FETCHSIZE;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#roundRobin</tt> */
+	public final static URI ROUNDROBIN;
+
+	/** <tt>http://www.openrdf.org/config/repository/virtuoso#ruleSet</tt> */
+	public final static URI RULESET;
+
+
+	static {
+		ValueFactory factory = ValueFactoryImpl.getInstance();
+		HOSTLIST   = factory.createURI(NAMESPACE, "hostList");
+		USERNAME   = factory.createURI(NAMESPACE, "username");
+		PASSWORD   = factory.createURI(NAMESPACE, "password");
+		DEFGRAPH   = factory.createURI(NAMESPACE, "defGraph");
+		USELAZYADD = factory.createURI(NAMESPACE, "useLazyAdd");
+		FETCHSIZE  = factory.createURI(NAMESPACE, "fetchSize");
+		ROUNDROBIN = factory.createURI(NAMESPACE, "roundRobin");
+		RULESET    = factory.createURI(NAMESPACE, "ruleSet");
+	}
+}
+
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoTest.java b/binsrc/sesame3/virtuoso_driver/VirtuosoTest.java
index b0f48d3..34b3969 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoTest.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoTest.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoTest.java,v 1.1.2.1 2009/09/18 16:11:19 source Exp $
+ *  $Id: VirtuosoTest.java,v 1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sesame3/virtuoso_driver/VirtuosoTupleQuery.java b/binsrc/sesame3/virtuoso_driver/VirtuosoTupleQuery.java
index fc91078..8b62f60 100644
--- a/binsrc/sesame3/virtuoso_driver/VirtuosoTupleQuery.java
+++ b/binsrc/sesame3/virtuoso_driver/VirtuosoTupleQuery.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoTupleQuery.java,v 1.1 2009/03/26 13:57:16 source Exp $
+ *  $Id: VirtuosoTupleQuery.java,v 1.1.2.1 2012/03/08 12:55:06 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/Makefile.am b/binsrc/sqldoc/Makefile.am
index 85f0dda..3780605 100644
--- a/binsrc/sqldoc/Makefile.am
+++ b/binsrc/sqldoc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/Makefile.in b/binsrc/sqldoc/Makefile.in
index 26bda7b..415de50 100644
--- a/binsrc/sqldoc/Makefile.in
+++ b/binsrc/sqldoc/Makefile.in
@@ -106,6 +106,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -154,6 +155,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -205,6 +207,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -251,7 +254,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/sqldoc/bif_sps.sql b/binsrc/sqldoc/bif_sps.sql
index b6db011..cc99e9b 100644
--- a/binsrc/sqldoc/bif_sps.sql
+++ b/binsrc/sqldoc/bif_sps.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: bif_sps.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: bif_sps.sql,v 1.2.2.1 2012/03/08 12:55:06 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/cutter.c b/binsrc/sqldoc/cutter.c
index 9681f10..9c49b52 100644
--- a/binsrc/sqldoc/cutter.c
+++ b/binsrc/sqldoc/cutter.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/escape8bit.c b/binsrc/sqldoc/escape8bit.c
index 46a42b9..ffea3ed 100644
--- a/binsrc/sqldoc/escape8bit.c
+++ b/binsrc/sqldoc/escape8bit.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/functions.sql b/binsrc/sqldoc/functions.sql
index 0df804e..bbeb4e0 100644
--- a/binsrc/sqldoc/functions.sql
+++ b/binsrc/sqldoc/functions.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: functions.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: functions.sql,v 1.2.2.1 2012/03/08 12:55:06 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/isql_log_normalize.c b/binsrc/sqldoc/isql_log_normalize.c
index 3471569..32bd769 100644
--- a/binsrc/sqldoc/isql_log_normalize.c
+++ b/binsrc/sqldoc/isql_log_normalize.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/mkfuncref.bat b/binsrc/sqldoc/mkfuncref.bat
index eac404a..52f590c 100644
--- a/binsrc/sqldoc/mkfuncref.bat
+++ b/binsrc/sqldoc/mkfuncref.bat
@@ -2,7 +2,7 @@ rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem  
-rem  Copyright (C) 1998-2006 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem  
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/sql_functions.xsl b/binsrc/sqldoc/sql_functions.xsl
index 542b34f..82f884b 100644
--- a/binsrc/sqldoc/sql_functions.xsl
+++ b/binsrc/sqldoc/sql_functions.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sql_functions.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: sql_functions.xsl,v 1.2.2.1 2012/03/08 12:55:06 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sqldoc/vspx_doc.sh b/binsrc/sqldoc/vspx_doc.sh
index 5b5978c..4deb8f5 100755
--- a/binsrc/sqldoc/vspx_doc.sh
+++ b/binsrc/sqldoc/vspx_doc.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: vspx_doc.sh,v 1.4 2009/04/14 12:16:49 source Exp $
+#  $Id: vspx_doc.sh,v 1.4.2.1 2012/03/08 12:55:06 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sync/Makefile.am b/binsrc/sync/Makefile.am
index 9960a01..838ea96 100644
--- a/binsrc/sync/Makefile.am
+++ b/binsrc/sync/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sync/Makefile.in b/binsrc/sync/Makefile.in
index 3b581f6..b364579 100644
--- a/binsrc/sync/Makefile.in
+++ b/binsrc/sync/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -125,6 +125,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -173,6 +174,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -224,6 +226,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -270,7 +273,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/sync/drop.sql b/binsrc/sync/drop.sql
index 24fa45c..0ffd843 100644
--- a/binsrc/sync/drop.sql
+++ b/binsrc/sync/drop.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: drop.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: drop.sql,v 1.2.2.1 2012/03/08 12:55:06 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/sync/make_vad.sh b/binsrc/sync/make_vad.sh
index 0cd89af..fd784cd 100755
--- a/binsrc/sync/make_vad.sh
+++ b/binsrc/sync/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.8.2.2 2011/02/03 10:38:32 source Exp $
+#  $Id: make_vad.sh,v 1.8.2.5 2012/03/08 12:55:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -203,6 +203,7 @@ directory_init() {
   mkdir vad/data
   mkdir vad/data/SyncML
   cp -f syncml.sql vad/data/SyncML
+  cp -f syncml_drop.sql vad/data/SyncML
 }
 
 virtuoso_shutdown() {
@@ -220,7 +221,7 @@ sticker_init() {
   echo "  <name package=\"SyncML\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"SyncML\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -260,17 +261,11 @@ sticker_init() {
   echo "  <sql purpose=\"post-install\">" >> $STICKER
   echo "    <![CDATA[" >> $STICKER
   echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/SyncML/syncml.sql', 0, 'report', 1);" >> $STICKER
-  echo "      " >> $STICKER
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
   echo "  <sql purpose=\"pre-uninstall\">" >> $STICKER
   echo "    <![CDATA[" >> $STICKER
-  echo "      delete from SYNC_DEVICES;" >> $STICKER
-  echo "      delete from SYNC_MAPS;" >> $STICKER
-  echo "      delete from SYNC_ANCHORS;" >> $STICKER
-  echo "      delete from SYNC_RPLOG;" >> $STICKER
-  echo "      delete from SYNC_SESSION;" >> $STICKER
-  echo "      drop procedure DB.DBA.SYNCML;" >> $STICKER
+  echo "      DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/SyncML/syncml_drop.sql', 0, 'report', 1);" >> $STICKER
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
   echo "</ddls>" >> $STICKER
@@ -279,6 +274,7 @@ sticker_init() {
   IFS='
 ' 
   echo "  <file type=\"dav\" source=\"data\" target_uri=\"SyncML/syncml.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> $STICKER
+  echo "  <file type=\"dav\" source=\"data\" target_uri=\"SyncML/syncml_drop.sql\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> $STICKER
   IFS="$oldIFS"
   echo "</resources>" >> $STICKER
   echo "<registry>" >> $STICKER
diff --git a/binsrc/sync/sync.sql b/binsrc/sync/sync.sql
index 3db8fc2..07b6aae 100644
--- a/binsrc/sync/sync.sql
+++ b/binsrc/sync/sync.sql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -19,7 +19,7 @@
 --  
 --  
 --
--- $Id: sync.sql,v 1.1.1.1 2006/04/11 17:56:10 source Exp $
+-- $Id: sync.sql,v 1.1.1.1.2.1 2012/03/08 12:55:06 source Exp $
 --
 
 vhost_remove (lpath => '/sync');
diff --git a/binsrc/sync/sync.vsp b/binsrc/sync/sync.vsp
index 590ba8e..db32b42 100644
--- a/binsrc/sync/sync.vsp
+++ b/binsrc/sync/sync.vsp
@@ -3,7 +3,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,7 +20,7 @@
 --  
 --  
 ?>
-<!-- $Id: sync.vsp,v 1.1.1.1 2006/04/11 17:56:10 source Exp $ -->
+<!-- $Id: sync.vsp,v 1.1.1.1.2.1 2012/03/08 12:55:06 source Exp $ -->
 <?vsp
 declare _accept varchar;
 declare _req varchar;
diff --git a/binsrc/sync/syncml.sql b/binsrc/sync/syncml.sql
index 3d843e2..faf4c24 100644
--- a/binsrc/sync/syncml.sql
+++ b/binsrc/sync/syncml.sql
@@ -1,38 +1,32 @@
---  
+--
+--  $Id: syncml.sql,v 1.10.2.2 2012/03/08 12:55:06 source Exp $
+--
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
---  
---  Copyright (C) 1998-2006 OpenLink Software
---  
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
 --  This project 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; only version 2 of the License, dated June 1991.
---  
+--
 --  This program 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
 --  General Public License for more details.
---  
+--
 --  You should have received a copy of the GNU General Public License along
 --  with this program; if not, write to the Free Software Foundation, Inc.,
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
---  
---  
 --
--- $Id: syncml.sql,v 1.10 2008/11/10 11:04:01 source Exp $
 --
 
---vhost_remove (lpath => '/');
-
---vhost_define (lpath => '/', ppath => '/sync/', vsp_user => 'dba',
---    is_brws => 0, def_page => 'sync.vsp');
-
 create procedure syncml_exec_no_error (in text varchar)
 {
   log_enable(1);
   declare exit handler for sqlstate  '*' {
-        rollback work;
-        return;
+    rollback work;
+    return;
   };
   exec (text);
   commit work;
@@ -40,7 +34,8 @@ create procedure syncml_exec_no_error (in text varchar)
 ;
 
 syncml_exec_no_error ('
-create table SYNC_DEVICES (
+create table SYNC_DEVICES
+(
   DEV_ID integer identity,
   DEV_USER_ID integer,   -- references WS.WS.SYS_DAV_USER(U_ID)
   DEV_URI varchar,
@@ -59,8 +54,10 @@ create table SYNC_DEVICES (
   DEV_SUPP_NOC integer,  -- supports "number of changes"
   DEV_INF long varchar,
   DEV_MAXSIZE integer,
+
   primary key (DEV_URI)   -- constraint foobar unique(DEV_USER_ID, DEV_URI)
-)')
+)
+')
 ;
 
 syncml_exec_no_error ('
@@ -69,13 +66,16 @@ create unique index SYNC_DEVICES_ID on SYNC_DEVICES (DEV_ID)
 ;
 
 syncml_exec_no_error ('
-create table SYNC_MAPS (
+create table SYNC_MAPS
+(
   MAP_DEV_ID integer, -- references SYNC_DEVICES(DEV_ID)
   MAP_COL_ID int,
   MAP_LUID varchar,   -- local id
   MAP_GUID varchar,   -- references WS.WS.SYS_DAV_RES(RES_ID)
+
   primary key (MAP_DEV_ID, MAP_LUID, MAP_GUID)
-)')
+)
+')
 ;
 
 syncml_exec_no_error ('
@@ -84,37 +84,45 @@ create index SYNC_MAPS_COL on SYNC_MAPS (MAP_COL_ID)
 ;
 
 syncml_exec_no_error ('
-create table SYNC_ANCHORS (
-  A_COL_ID integer,   -- references WS.WS.SYS_DAV_COL(COL_ID)
-  A_DEV_ID integer,   -- references SYNC_DEVICES(DEV_ID)
-  A_LAST_LOCAL datetime,    -- last local anchor
-  A_LAST_REMOTE varchar,    -- last remote anchor
-  A_NEXT_LOCAL datetime,    -- last local anchor
-  A_NEXT_REMOTE varchar,    -- last remote anchor
+create table SYNC_ANCHORS
+(
+  A_COL_ID integer,           -- references WS.WS.SYS_DAV_COL(COL_ID)
+  A_DEV_ID integer,           -- references SYNC_DEVICES(DEV_ID)
+  A_LAST_LOCAL datetime,      -- last local anchor
+  A_LAST_REMOTE varchar,      -- last remote anchor
+  A_NEXT_LOCAL datetime,      -- last local anchor
+  A_NEXT_REMOTE varchar,      -- last remote anchor
+
   primary key (A_COL_ID, A_DEV_ID)
-)')
+)
+')
 ;
 
 syncml_exec_no_error ('
-create table SYNC_COLS_TYPES (
-  CT_COL_ID integer,   -- references WS.WS.SYS_DAV_COL(COL_ID)
-  CT_PATH varchar,     -- col. name
-  CT_NAME varchar,     -- col. name
-  CT_TYPE varchar,     -- calendar, notes,  etc.
-  CT_VER  varchar,     --
+create table SYNC_COLS_TYPES
+(
+  CT_COL_ID integer,          -- references WS.WS.SYS_DAV_COL(COL_ID)
+  CT_PATH varchar,            -- col. name
+  CT_NAME varchar,            -- col. name
+  CT_TYPE varchar,            -- calendar, notes,  etc.
+  CT_VER  varchar,            --
   CT_DEV_INFO long varbinary, -- device def info
+
   primary key (CT_COL_ID, CT_TYPE)
-)')
+)
+')
 ;
 
 syncml_exec_no_error ('
-create table SYNC_RPLOG (
+create table SYNC_RPLOG
+(
   RLOG_RES_ID int,
   RLOG_RES_COL int,
   DMLTYPE varchar,
   SNAPTIME datetime,
   primary key (RLOG_RES_ID)
-)')
+)
+')
 ;
 
 syncml_exec_no_error ('
@@ -125,28 +133,28 @@ create index SYNC_RPLOG_COL on SYNC_RPLOG (RLOG_RES_COL)
 
 syncml_exec_no_error ('
 create table SYNC_SESSION
-	(
-	S_ID varchar,
-	S_DEV varchar,
-	S_DEV_ID int,
-	S_UID int,
-	S_LAST_MSG int,
-	S_LAST_CMD int,
-	S_DATA long varbinary,
-	S_TS timestamp,
-	S_AUTH int default 0,
-	S_NONCE varchar default '''',
-	S_INIT int default 1,
-	primary key (S_ID, S_DEV)
-	)
+(
+  S_ID varchar,
+  S_DEV varchar,
+  S_DEV_ID int,
+  S_UID int,
+  S_LAST_MSG int,
+  S_LAST_CMD int,
+  S_DATA long varbinary,
+  S_TS timestamp,
+  S_AUTH int default 0,
+  S_NONCE varchar default '''',
+  S_INIT int default 1,
+  primary key (S_ID, S_DEV)
+)
 ')
 ;
 
 syncml_exec_no_error ('
 create trigger DAV_COL_SYNC_D after delete on WS.WS.SYS_DAV_COL
-  {
-    delete from SYNC_ANCHORS where A_COL_ID = COL_ID;
-  }
+{
+  delete from SYNC_ANCHORS where A_COL_ID = COL_ID;
+}
 ')
 ;
 
@@ -160,357 +168,346 @@ drop type sync_batch
 ')
 ;
 
-create type sync_batch as (
-			    in_msgid int default 1,
-		    	    out_msgid int default 0,
-			    last_cmd int default 0,
-			    sid varchar,
-			    nonce varchar,
-			    sourceref varchar,
-			    targetref varchar,
-			    auth int default 0,
-			    init int default 1,
-			    tgt varchar,
-			    src varchar,
-			    devid int,
-			    max_size int default null,
-			    send_final int default 1,
-			    remote_final int default 0,
-			    send_list any default null,
-			    hdr any,
-			    commands any,
-			    cmdstate any,
-			    path any,
-			    ver varchar default '1.1',
-			    uid int default null,
-			    final any default null
-			  )
-			  self as ref -- temporary
-constructor method sync_batch (hdr any),
-method auth_check (resph any, respb any) returns any,
-method sync_check_cred (cred any, tp any, name any, nonce any, allow_basic int) returns any,
-method perm_check () returns any,
-method final () returns any
+create type sync_batch as
+  (
+    in_msgid int default 1,
+    out_msgid int default 0,
+    last_cmd int default 0,
+    sid varchar,
+    nonce varchar,
+    sourceref varchar,
+    targetref varchar,
+    auth int default 0,
+    init int default 1,
+    tgt varchar,
+    src varchar,
+    devid int,
+    max_size int default null,
+    send_final int default 1,
+    remote_final int default 0,
+    send_list any default null,
+    hdr any,
+    commands any,
+    cmdstate any,
+    path any,
+    ver varchar default '1.1',
+    uid int default null,
+    final any default null
+  )
+  self as ref -- temporary
+  constructor method sync_batch (hdr any),
+  method auth_check (resph any, respb any) returns any,
+  method sync_check_cred (cred any, tp any, name any, nonce any, allow_basic int) returns any,
+  method perm_check () returns any,
+  method final () returns any
 ;
 
 create constructor method sync_batch (in hdr any) for sync_batch
-  {
-    self.sid := cast(xpath_eval ('/SyncHdr/SessionID/text()', hdr, 1) as varchar);
-    self.in_msgid :=  cast(xpath_eval ('/SyncHdr/MsgID/text()', hdr, 1) as int);
-    self.tgt :=  cast(xpath_eval ('/SyncHdr/Target/LocURI/text()', hdr, 1) as varchar);
-    self.src :=  cast(xpath_eval ('/SyncHdr/Source/LocURI/text()', hdr, 1) as varchar);
-    self.max_size :=  cast(xpath_eval ('/SyncHdr/Meta/MaxMsgSize/text()', hdr, 1) as integer);
-    self.hdr := hdr;
-    self.ver := coalesce (connection_get ('SyncML-ver'), '1.1');
-    self.ver := cast(xpath_eval ('/SyncHdr/VerDTD/text()', hdr, 1) as varchar);
-    self.out_msgid := 0;
-    self.last_cmd := 0;
-    self.auth := 0;
-    self.remote_final := 0;
---  dbg_obj_print ('VERSION self.ver ', self.ver);
-    return;
-  }
+{
+  self.sid := cast(xpath_eval ('/SyncHdr/SessionID/text()', hdr, 1) as varchar);
+  self.in_msgid := cast(xpath_eval ('/SyncHdr/MsgID/text()', hdr, 1) as int);
+  self.tgt := cast(xpath_eval ('/SyncHdr/Target/LocURI/text()', hdr, 1) as varchar);
+  self.src := cast(xpath_eval ('/SyncHdr/Source/LocURI/text()', hdr, 1) as varchar);
+  self.max_size := cast(xpath_eval ('/SyncHdr/Meta/MaxMsgSize/text()', hdr, 1) as integer);
+  self.hdr := hdr;
+  self.ver := coalesce (connection_get ('SyncML-ver'), '1.1');
+  self.ver := cast(xpath_eval ('/SyncHdr/VerDTD/text()', hdr, 1) as varchar);
+  self.out_msgid := 0;
+  self.last_cmd := 0;
+  self.auth := 0;
+  self.remote_final := 0;
+
+  return;
+}
 ;
 
 create method sync_check_cred (in cred any, in tp any, in name any, in nonce any, inout allow_basic int) for sync_batch
+{
+  declare uid int;
+  whenever not found goto unauth;
+
+  if (__proc_exists ('DB.DBA.SYNC_GET_AUTH_TYPE'))
   {
-    declare uid int;
-    whenever not found goto unauth;
+    allow_basic := call ('DB.DBA.SYNC_GET_AUTH_TYPE') (self.devid);
+  }
+  if (allow_basic and tp = 'syncml:auth-basic')
+  {
+    declare uname, upwd, upwd1 varchar;
+    declare arr any;
 
-    if (__proc_exists ('DB.DBA.SYNC_GET_AUTH_TYPE'))
-      {
-	allow_basic := call ('DB.DBA.SYNC_GET_AUTH_TYPE') (self.devid);
-      }
+    arr := decode_base64 (cred);
+    arr := split_and_decode (arr, 0, '\0\0:');
+    uname := arr[0];
+    upwd := arr[1];
 
-    if (allow_basic and tp = 'syncml:auth-basic')
-      {
-	declare uname, upwd, upwd1 varchar;
-        declare arr any;
-
-	arr := decode_base64 (cred);
-	arr := split_and_decode (arr, 0, '\0\0:');
-	uname := arr[0];
-	upwd := arr[1];
-
-	select pwd_magic_calc (U_NAME, U_PASSWORD), U_ID into upwd1, uid
-	from SYS_USERS where U_NAME = uname and U_ACCOUNT_DISABLED = 0
-	and U_DAV_ENABLE = 1;
-
-	if (upwd = upwd1)
-	  {
-	    self.uid := uid;
-            return 1;
-	  }
-      }
-    else if (tp = 'syncml:auth-md5')
-      {
-	declare pwd, dec1, dec2, dec3 any;
-	declare i, l int;
-
-	select pwd_magic_calc (U_NAME, U_PASSWORD), U_ID into pwd, uid
-	from SYS_USERS where U_NAME = name and U_ACCOUNT_DISABLED = 0
-	and U_DAV_ENABLE = 1;
-	dec1 := md5 (concat(name, ':', pwd, ':', nonce));
-	dec2 := decode_base64 (cred);
-	dec3 := '';
-        i := 0; l := length (dec2);
-	while (i < l)
-	  {
-	    dec3 := dec3 || sprintf ('%02x', dec2[i]);
-	    i := i + 1;
-	  }
-	if (trim(dec3) = trim(dec1))
-	  {
---	    dbg_obj_print ('Authorized');
-	    self.uid := uid;
-	    return 1;
-	  }
-      }
-    else
-      return -1;
-    unauth:
-    return 0;
+    select pwd_magic_calc (U_NAME, U_PASSWORD), U_ID into upwd1, uid
+      from SYS_USERS
+     where U_NAME = uname and U_ACCOUNT_DISABLED = 0 and U_DAV_ENABLE = 1;
+
+    if (upwd = upwd1)
+    {
+      self.uid := uid;
+      return 1;
+    }
   }
+  else if (tp = 'syncml:auth-md5')
+  {
+    declare pwd, dec1, dec2, dec3 any;
+    declare i, l int;
+
+    select pwd_magic_calc (U_NAME, U_PASSWORD), U_ID into pwd, uid
+      from SYS_USERS
+     where U_NAME = name and U_ACCOUNT_DISABLED = 0 and U_DAV_ENABLE = 1;
+
+    dec1 := md5 (concat(name, ':', pwd, ':', nonce));
+    dec2 := decode_base64 (cred);
+    dec3 := '';
+    i := 0;
+    l := length (dec2);
+    while (i < l)
+    {
+      dec3 := dec3 || sprintf ('%02x', dec2[i]);
+      i := i + 1;
+    }
+    if (trim(dec3) = trim(dec1))
+    {
+      self.uid := uid;
+      return 1;
+    }
+  }
+  else
+    return -1;
+unauth:
+  return 0;
+}
 ;
 
 create method perm_check () for sync_batch
+{
+  --dbg_obj_print (self.path, self.uid);
+  if (not WS.WS.CHECKPERM (self.path, self.uid, '110'))
   {
-    --dbg_obj_print (self.path, self.uid);
-    if (not WS.WS.CHECKPERM (self.path, self.uid, '110'))
-      {
-	http_request_status ('HTTP/1.1 200 OK');
-	http_rewrite ();
-        return 0;
-      }
-    return 1;
+    http_request_status ('HTTP/1.1 200 OK');
+    http_rewrite ();
+    return 0;
   }
+  return 1;
+}
 ;
 
 -- check authentication
 create method auth_check (inout resph any, inout respb any) for sync_batch
-  {
-    declare cred, ctype, name any;
-    declare auth_code, ua_id varchar;
-    declare allow_basic int;
-    allow_basic := 0;
+{
+  declare cred, ctype, name any;
+  declare auth_code, ua_id varchar;
+  declare allow_basic int;
 
-    self.auth := 0;
-    self.nonce := md5 (cast (msec_time () as varchar));
+  allow_basic := 0;
+  self.auth := 0;
+  self.nonce := md5 (cast (msec_time () as varchar));
 
-    self.devid := (select DEV_ID from SYNC_DEVICES where DEV_URI = self.src);
-    if (self.devid is null)
-      {
-        insert into SYNC_DEVICES (DEV_URI) values (self.src);
-	self.devid := identity_value ();
-      }
+  self.devid := (select DEV_ID from SYNC_DEVICES where DEV_URI = self.src);
+  if (self.devid is null)
+  {
+    insert into SYNC_DEVICES (DEV_URI) values (self.src);
+    self.devid := identity_value ();
+  }
 
-    whenever not found goto nf;
-    select S_LAST_MSG, S_LAST_CMD, S_DEV_ID, S_AUTH, S_NONCE, S_INIT,
-    	deserialize (blob_to_string (S_DATA)), S_UID
-    into self.out_msgid, self.last_cmd, self.devid, self.auth, self.nonce, self.init,
-    	self.cmdstate, self.uid
+  whenever not found goto nf;
+  select S_LAST_MSG, S_LAST_CMD, S_DEV_ID, S_AUTH, S_NONCE, S_INIT, deserialize (blob_to_string (S_DATA)), S_UID
+    into self.out_msgid, self.last_cmd, self.devid, self.auth, self.nonce, self.init, self.cmdstate, self.uid
     from SYNC_SESSION
-    where S_ID = self.sid and S_DEV = self.src;
+   where S_ID = self.sid and S_DEV = self.src;
 nf:
-    insert replacing SYNC_SESSION
-    (S_ID, S_DEV, S_DEV_ID, S_UID, S_LAST_MSG, S_LAST_CMD, S_DATA, S_AUTH,
-    S_NONCE, S_INIT, S_DATA, S_UID)
-    values
-    (self.sid, self.src, self.devid, null, self.out_msgid, self.last_cmd, null,
-    	self.auth, self.nonce, self.init, serialize (self.cmdstate), self.uid);
+  insert replacing SYNC_SESSION (S_ID, S_DEV, S_DEV_ID, S_UID, S_LAST_MSG, S_LAST_CMD, S_DATA, S_AUTH, S_NONCE, S_INIT, S_DATA, S_UID)
+    values (self.sid, self.src, self.devid, null, self.out_msgid, self.last_cmd, null, self.auth, self.nonce, self.init, serialize (self.cmdstate), self.uid);
 
-    self.out_msgid := self.out_msgid + 1;
-    self.last_cmd := self.last_cmd + 1;
+  self.out_msgid := self.out_msgid + 1;
+  self.last_cmd := self.last_cmd + 1;
 
-    ua_id := coalesce (connection_get ('ua_id'), '');
+  ua_id := coalesce (connection_get ('ua_id'), '');
 
+  if (ua_id like 'WebliconSync - HTTP SyncML Client%')
+  {
+    xte_nodebld_acc (resph,
+      xte_node (xte_head ('VerDTD'), self.ver),
+      xte_node (xte_head ('VerProto'), sprintf ('SyncML/%s', self.ver)),
+      xte_node (xte_head ('SessionID'), cast (self.sid as varchar)),
+      xte_node (xte_head ('MsgID'), cast (self.out_msgid as varchar)),
+      xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'), self.src)),
+      xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'), self.tgt)),
+      xte_node (xte_head ('RespURI'), self.tgt)
+    );
+  }
+  else
+  {
+    xte_nodebld_acc (resph,
+      xte_node (xte_head ('VerDTD'), self.ver),
+      xte_node (xte_head ('VerProto'), sprintf ('SyncML/%s', self.ver)),
+      xte_node (xte_head ('SessionID'), cast (self.sid as varchar)),
+      xte_node (xte_head ('MsgID'), cast (self.out_msgid as varchar)),
+      xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'), self.src)),
+      xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'), self.tgt)),
+      xte_node (xte_head ('RespURI'), self.tgt),
+      xte_node (xte_head ('Meta'), xte_node (xte_head ('MaxMsgSize', 'xmlns', 'syncml:metinf'), '10000'))
+    );
+  }
 
-    if (ua_id like 'WebliconSync - HTTP SyncML Client%')
-      {
-	  xte_nodebld_acc (resph,
-	      xte_node (xte_head ('VerDTD'), self.ver),
-	      xte_node (xte_head ('VerProto'), sprintf ('SyncML/%s', self.ver)),
-	      xte_node (xte_head ('SessionID'), cast (self.sid as varchar)),
-	      xte_node (xte_head ('MsgID'), cast (self.out_msgid as varchar)),
-	      xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'), self.src)),
-	      xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'), self.tgt)),
-	      xte_node (xte_head ('RespURI'), self.tgt)
-	  );
-      }
+  cred := cast(xpath_eval ('/SyncHdr/Cred/Data/text()', self.hdr, 1) as varchar);
+  ctype := cast(xpath_eval ('/SyncHdr/Cred/Meta/Type/text()', self.hdr, 1) as varchar);
+  name := cast(xpath_eval ('/SyncHdr/Source/LocName/text()', self.hdr, 1) as varchar);
+
+  if ((cred is not null and ctype is not null) or not self.auth)
+  {
+    declare rc int;
+    rc := self.sync_check_cred (cred, ctype, name, self.nonce, allow_basic);
+    if (rc = 0)
+    {
+      auth_code := '401';
+      self.auth := 0;
+    }
+    else if (rc < 0)
+    {
+      auth_code := '407';
+      self.auth := 0;
+    }
     else
-      {
-	  xte_nodebld_acc (resph,
-	      xte_node (xte_head ('VerDTD'), self.ver),
-	      xte_node (xte_head ('VerProto'), sprintf ('SyncML/%s', self.ver)),
-	      xte_node (xte_head ('SessionID'), cast (self.sid as varchar)),
-	      xte_node (xte_head ('MsgID'), cast (self.out_msgid as varchar)),
-	      xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'), self.src)),
-	      xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'), self.tgt))
-	      , xte_node (xte_head ('RespURI'), self.tgt)
-	      , xte_node (xte_head ('Meta'), xte_node (xte_head ('MaxMsgSize', 'xmlns', 'syncml:metinf'), '10000'))
-	  );
+    {
+      self.auth := 1;
+      auth_code := '212';
+    }
+  }
+  if (self.auth and not self.perm_check ())
+  {
+    self.auth := 0;
+    auth_code := '403';
+  }
+  if (self.auth)
+  {
+     xte_nodebld_acc (respb,
+       xte_node (xte_head ('Status'),
+       xte_node (xte_head ('CmdID'), cast (self.last_cmd as varchar)),
+       xte_node (xte_head ('MsgRef'), cast (self.in_msgid as varchar)),
+       xte_node (xte_head ('CmdRef'), '0'),
+       xte_node (xte_head ('Cmd'), 'SyncHdr'),
+       xte_node (xte_head ('TargetRef'), self.tgt),
+       xte_node (xte_head ('SourceRef'), self.src),
+       xte_node (xte_head ('Data'), '212')
+       --xte_node (xte_head ('Data'), '200')
+     ));
+   }
+   else
+   {
+     --self.nonce := md5 (cast (msec_time () as varchar));
+     --dbg_obj_print ('new nonce:', self.nonce);
+     declare chal any;
+
+     if (allow_basic)
+     {
+       chal := xte_node (xte_head ('Chal'), xte_node (xte_head ('Meta'),
+               xte_node (xte_head ('Type', 'xmlns', 'syncml:metinf'), 'syncml:auth-basic'),
+               xte_node (xte_head ('Format', 'xmlns', 'syncml:metinf'), 'b64')
+            ));
      }
-
-     cred := cast(xpath_eval ('/SyncHdr/Cred/Data/text()', self.hdr, 1) as varchar);
-     ctype := cast(xpath_eval ('/SyncHdr/Cred/Meta/Type/text()', self.hdr, 1) as varchar);
-     name := cast(xpath_eval ('/SyncHdr/Source/LocName/text()', self.hdr, 1) as varchar);
-
-     if ((cred is not null and ctype is not null) or not self.auth)
-       {
-	 declare rc int;
-	 rc := self.sync_check_cred (cred, ctype, name, self.nonce, allow_basic);
-	 if (rc = 0)
-	   {
-	     auth_code := '401';
-	     self.auth := 0;
-	   }
-	 else if (rc < 0)
-	   {
-	     auth_code := '407';
-	     self.auth := 0;
-	   }
-	 else
-	  {
-	    self.auth := 1;
-	    auth_code := '212';
-	  }
-       }
-
-     if (self.auth and not self.perm_check ())
-       {
-	 self.auth := 0;
-	 auth_code := '403';
-       }
-
-
-     if (self.auth)
-       {
-	 xte_nodebld_acc (respb, xte_node (xte_head ('Status'),
-	 xte_node (xte_head ('CmdID'), cast (self.last_cmd as varchar)),
-	 xte_node (xte_head ('MsgRef'), cast (self.in_msgid as varchar)),
-	 xte_node (xte_head ('CmdRef'), '0'),
-	 xte_node (xte_head ('Cmd'), 'SyncHdr'),
-	 xte_node (xte_head ('TargetRef'), self.tgt),
-	 xte_node (xte_head ('SourceRef'), self.src),
-	 xte_node (xte_head ('Data'), '212')
---	 xte_node (xte_head ('Data'), '200')
-	 ));
-       }
      else
-       {
-         --self.nonce := md5 (cast (msec_time () as varchar));
-	 --dbg_obj_print ('new nonce:', self.nonce);
-
-	 declare chal any;
-
-	 if (allow_basic)
-	   {
-	      chal := xte_node (xte_head ('Chal'), xte_node (xte_head ('Meta'),
-	 	xte_node (xte_head ('Type', 'xmlns', 'syncml:metinf'), 'syncml:auth-basic'),
-	 	xte_node (xte_head ('Format', 'xmlns', 'syncml:metinf'), 'b64')
-	 	));
-	   }
-	 else
-	   {
-	      chal := xte_node (xte_head ('Chal'), xte_node (xte_head ('Meta'),
-	 	xte_node (xte_head ('Type', 'xmlns', 'syncml:metinf'), 'syncml:auth-md5'),
-	 	xte_node (xte_head ('Format', 'xmlns', 'syncml:metinf'), 'b64'),
-	 	xte_node (xte_head ('NextNonce', 'xmlns', 'syncml:metinf'),
-		encode_base64 (self.nonce))
-	 	));
-	   }
-
-	 xte_nodebld_acc (respb, xte_node (xte_head ('Status'),
-	 xte_node (xte_head ('CmdID'), cast (self.last_cmd as varchar)),
-	 xte_node (xte_head ('MsgRef'), cast (self.in_msgid as varchar)),
-	 xte_node (xte_head ('CmdRef'), '0'),
-	 xte_node (xte_head ('Cmd'), 'SyncHdr'),
-	 xte_node (xte_head ('TargetRef'), self.tgt),
-	 xte_node (xte_head ('SourceRef'), self.src),
-	 chal,
-	 xte_node (xte_head ('Data'), auth_code)
-	 ));
-       }
-
-    return 1;
+     {
+       chal := xte_node (xte_head ('Chal'), xte_node (xte_head ('Meta'),
+               xte_node (xte_head ('Type', 'xmlns', 'syncml:metinf'), 'syncml:auth-md5'),
+               xte_node (xte_head ('Format', 'xmlns', 'syncml:metinf'), 'b64'),
+               xte_node (xte_head ('NextNonce', 'xmlns', 'syncml:metinf'),
+               encode_base64 (self.nonce))
+            ));
+     }
+     xte_nodebld_acc (respb,
+       xte_node (xte_head ('Status'),
+       xte_node (xte_head ('CmdID'), cast (self.last_cmd as varchar)),
+       xte_node (xte_head ('MsgRef'), cast (self.in_msgid as varchar)),
+       xte_node (xte_head ('CmdRef'), '0'),
+       xte_node (xte_head ('Cmd'), 'SyncHdr'),
+       xte_node (xte_head ('TargetRef'), self.tgt),
+       xte_node (xte_head ('SourceRef'), self.src),
+       chal,
+       xte_node (xte_head ('Data'), auth_code)
+     ));
   }
+  return 1;
+}
 ;
 
 create method final () for sync_batch
+{
+  if (self.auth and self.init)
   {
-
-    if (self.auth and self.init)
-      {
-	self.init := 0;
-      }
-
--- dbg_obj_print ('sync_batch - final');
-
-    update SYNC_SESSION set S_LAST_MSG = self.out_msgid,
-    	   S_LAST_CMD = self.last_cmd,
-	   S_DEV_ID = self.devid,
-	   S_AUTH = self.auth,
-	   S_NONCE = self.nonce,
-	   S_INIT = self.init,
-	   S_DATA = serialize (self.cmdstate),
-	   S_UID = self.uid
-    where S_ID = self.sid and S_DEV = self.src;
+    self.init := 0;
   }
+  -- dbg_obj_print ('sync_batch - final');
+  update SYNC_SESSION
+     set S_LAST_MSG = self.out_msgid,
+         S_LAST_CMD = self.last_cmd,
+         S_DEV_ID = self.devid,
+         S_AUTH = self.auth,
+         S_NONCE = self.nonce,
+         S_INIT = self.init,
+         S_DATA = serialize (self.cmdstate),
+         S_UID = self.uid
+   where S_ID = self.sid and S_DEV = self.src;
+}
 ;
 
 create procedure gmtnow ()
-  {
-    return repl_getdate ();
-  }
+{
+   return repl_getdate ();
+}
 ;
 
-create type sync_cmd as (
-			id int,
-			tp varchar,
-			tgt varchar,
-			src varchar,
-			noresp int default 0,
-			meta any,
-			items any,
-			parent DB.DBA.sync_cmd default null,
-			batch DB.DBA.sync_batch,
-			xt any,
-			state int,
-			out_data any default null
-			) self as ref -- temporary
-constructor method sync_cmd (batch sync_batch, parent sync_cmd),
-method deserialize (xt any) returns any,
-method serialize_resp (code any, resp any) returns any,
-method process (resp any) returns any,
-method sync_handle_add (xt any, resp any) returns any,
-method sync_handle_delete (xt any, resp any) returns any,
-method sync_handle_replace (xt any, resp any) returns any,
-method sync_handle_copy (xt any, resp any) returns any,
-method sync_handle_put (xt any, resp any) returns any,
-method sync_handle_get (xt any, resp any) returns any,
-method sync_handle_sync (xt any, resp any) returns any,
-method sync_issue_sync (xt any, resp any) returns any,
-method sync_handle_final (xt any, resp any) returns any,
-method sync_handle_alert (xt any, resp any) returns any,
-method sync_handle_status (xt any, resp any) returns any,
-method sync_handle_map (xt any, resp any) returns any,
-method sync_handle_result (xt any, resp any) returns any,
-method update_devinfo (xt any) returns any,
-method add_final (x any) returns any,
-method add_state (cmdid int, x any) returns any,
-method replace_state (cmdid int, x any) returns any,
-method resolve_uri (url varchar) returns any,
-method resolve_target () returns any,
-method perm_check (path varchar) returns any,
-method authenticated (code any) returns any
+create type sync_cmd as
+  (
+    id int,
+    tp varchar,
+    tgt varchar,
+    src varchar,
+    noresp int default 0,
+    meta any,
+    items any,
+    parent DB.DBA.sync_cmd default null,
+    batch DB.DBA.sync_batch,
+    xt any,
+    state int,
+    out_data any default null
+  ) self as ref -- temporary
+  constructor method sync_cmd (batch sync_batch, parent sync_cmd),
+  method deserialize (xt any) returns any,
+  method serialize_resp (code any, resp any) returns any,
+  method process (resp any) returns any,
+  method sync_handle_add (xt any, resp any) returns any,
+  method sync_handle_delete (xt any, resp any) returns any,
+  method sync_handle_replace (xt any, resp any) returns any,
+  method sync_handle_copy (xt any, resp any) returns any,
+  method sync_handle_put (xt any, resp any) returns any,
+  method sync_handle_get (xt any, resp any) returns any,
+  method sync_handle_sync (xt any, resp any) returns any,
+  method sync_issue_sync (xt any, resp any) returns any,
+  method sync_handle_final (xt any, resp any) returns any,
+  method sync_handle_alert (xt any, resp any) returns any,
+  method sync_handle_status (xt any, resp any) returns any,
+  method sync_handle_map (xt any, resp any) returns any,
+  method sync_handle_result (xt any, resp any) returns any,
+  method update_devinfo (xt any) returns any,
+  method add_final (x any) returns any,
+  method add_state (cmdid int, x any) returns any,
+  method replace_state (cmdid int, x any) returns any,
+  method resolve_uri (url varchar) returns any,
+  method resolve_target () returns any,
+  method perm_check (path varchar) returns any,
+  method authenticated (code any) returns any
 ;
 
 create constructor method sync_cmd (inout batch sync_batch, inout parent sync_cmd) for sync_cmd
-  {
-    self.batch := batch;
-    self.parent := parent;
-    self.noresp := 0;
-  }
+{
+  self.batch := batch;
+  self.parent := parent;
+  self.noresp := 0;
+}
 ;
 
 create method add_final (inout x any) for sync_cmd
@@ -526,235 +523,234 @@ create method add_final (inout x any) for sync_cmd
 
 create method replace_state (in cmdid int, in x any) for sync_cmd
 {
-    declare arr any;
-    arr := self.batch.cmdstate;
-    if (arr is null)
-       arr := vector (cast (cmdid as varchar), x);
-    else if (get_keyword (cmdid, arr, null) is null)
-       arr := vector_concat (arr, vector (cast (cmdid as varchar), x));
-    else
+  declare arr any;
+
+  arr := self.batch.cmdstate;
+  if (arr is null)
+    arr := vector (cast (cmdid as varchar), x);
+  else if (get_keyword (cmdid, arr, null) is null)
+    arr := vector_concat (arr, vector (cast (cmdid as varchar), x));
+  else
+  {
+    declare idx, len integer;
+    idx := 0;
+    len := length (arr);
+    while (idx < len)
+    {
+      if (arr[idx] = cmdid)
       {
-	declare idx, len integer;
-	idx := 0;
-	len := length (arr);
-	while (idx < len)
-	  {
-	    if (arr[idx] = cmdid)
-	      {
-		 aset (arr, idx + 1, x);
-		 len := idx;
-	      }
-	    idx := idx + 2;
-	  }
+        aset (arr, idx + 1, x);
+        len := idx;
       }
-
-    self.batch.cmdstate := arr;
+      idx := idx + 2;
+    }
+  }
+  self.batch.cmdstate := arr;
 }
 ;
 
 create method add_state (in cmdid int, in x any) for sync_cmd
-  {
-    declare arr any;
-    arr := self.batch.cmdstate;
-    if (arr is null)
-      arr := vector ();
-    arr := vector_concat (arr, vector (cast (cmdid as varchar), x));
-    self.batch.cmdstate := arr;
-  }
+{
+  declare arr any;
+
+  arr := self.batch.cmdstate;
+  if (arr is null)
+    arr := vector ();
+  arr := vector_concat (arr, vector (cast (cmdid as varchar), x));
+  self.batch.cmdstate := arr;
+}
 ;
 
 create method authenticated (in code any) for sync_cmd
+{
+  if (not self.batch.auth)
   {
-    if (not self.batch.auth)
-      {
-        self.state := code;
-        return 0;
-      }
-    return 1;
+    self.state := code;
+    return 0;
   }
+  return 1;
+}
 ;
 
 create method perm_check (in path varchar) for sync_cmd
+{
+  declare arr any;
+
+  arr := WS.WS.HREF_TO_ARRAY (path, '');
+  if (not WS.WS.CHECKPERM (arr, self.batch.uid, '110'))
   {
-    declare arr any;
-    arr := WS.WS.HREF_TO_ARRAY (path, '');
-    if (not WS.WS.CHECKPERM (arr, self.batch.uid, '110'))
-      {
-	self.state := 403;
-	http_request_status ('HTTP/1.1 200 OK');
-	http_rewrite ();
-        return 0;
-      }
-    return 1;
+    self.state := 403;
+    http_request_status ('HTTP/1.1 200 OK');
+    http_rewrite ();
+    return 0;
   }
+  return 1;
+}
 ;
 
-
 create method deserialize (inout xt any) for sync_cmd
-  {
-    self.tp := cast (xpath_eval ('local-name(.)', xt, 1) as varchar);
-    self.id := cast (xpath_eval ('./CmdID/text()', xt, 1) as int);
-    self.items := xpath_eval ('./Item|./MapItem', xt, 0);
-    if (length (self.items) < 1)
-      self.items := vector (null);
-    self.meta := xpath_eval ('./Meta', xt, 1);
-    self.tgt := cast (xpath_eval ('./Target/LocURI/text()', xt, 1) as varchar);
-    self.src := cast (xpath_eval ('./Source/LocURI/text()', xt, 1) as varchar);
---  dbg_obj_print ('/deserialize/ self.tgt = ', self.tgt);
---  dbg_obj_print ('/deserialize/ self.src = ', self.src);
-    if (xpath_eval ('./NoResp', xt) is not null)
-      self.noresp := 1;
-    self.xt := xml_cut (xt);
-    return self;
-  }
+{
+  self.tp := cast (xpath_eval ('local-name(.)', xt, 1) as varchar);
+  self.id := cast (xpath_eval ('./CmdID/text()', xt, 1) as int);
+  self.items := xpath_eval ('./Item|./MapItem', xt, 0);
+  if (length (self.items) < 1)
+    self.items := vector (null);
+  self.meta := xpath_eval ('./Meta', xt, 1);
+  self.tgt := cast (xpath_eval ('./Target/LocURI/text()', xt, 1) as varchar);
+  self.src := cast (xpath_eval ('./Source/LocURI/text()', xt, 1) as varchar);
+  --dbg_obj_print ('/deserialize/ self.tgt = ', self.tgt);
+  --dbg_obj_print ('/deserialize/ self.src = ', self.src);
+  if (xpath_eval ('./NoResp', xt) is not null)
+    self.noresp := 1;
+  self.xt := xml_cut (xt);
+  return self;
+}
 ;
 
 create method serialize_resp (in code any, inout resp any) for sync_cmd
-  {
-    declare stat any;
+{
+  if (self.noresp)
+    return;
 
-    if (self.noresp)
-      return;
+  declare stat any;
 
-    xte_nodebld_init (stat);
-    self.batch.last_cmd := self.batch.last_cmd + 1;
-    xte_nodebld_acc (stat, xte_node (xte_head ('CmdID'), cast (self.batch.last_cmd as varchar)));
-    xte_nodebld_acc (stat, xte_node (xte_head ('MsgRef'), cast (self.batch.in_msgid as varchar)));
-    xte_nodebld_acc (stat, xte_node (xte_head ('CmdRef'), cast (self.id as varchar)));
-    xte_nodebld_acc (stat, xte_node (xte_head ('Cmd'), cast (self.tp as varchar)));
-    if (self.tgt is not null)
-      xte_nodebld_acc (stat, xte_node (xte_head ('TargetRef'), cast (self.tgt as varchar)));
-    if (self.src is not null)
-      xte_nodebld_acc (stat, xte_node (xte_head ('SourceRef'), cast (self.src as varchar)));
-    xte_nodebld_acc (stat, xte_node (xte_head ('Data'), cast (code as varchar)));
-
-    if (self.out_data is not null)
-      xte_nodebld_acc (stat, self.out_data);
-
-    xte_nodebld_final (stat, xte_head('Status'));
-    xte_nodebld_acc (resp, stat);
-  }
+  xte_nodebld_init (stat);
+  self.batch.last_cmd := self.batch.last_cmd + 1;
+  xte_nodebld_acc (stat, xte_node (xte_head ('CmdID'), cast (self.batch.last_cmd as varchar)));
+  xte_nodebld_acc (stat, xte_node (xte_head ('MsgRef'), cast (self.batch.in_msgid as varchar)));
+  xte_nodebld_acc (stat, xte_node (xte_head ('CmdRef'), cast (self.id as varchar)));
+  xte_nodebld_acc (stat, xte_node (xte_head ('Cmd'), cast (self.tp as varchar)));
+  if (self.tgt is not null)
+    xte_nodebld_acc (stat, xte_node (xte_head ('TargetRef'), cast (self.tgt as varchar)));
+  if (self.src is not null)
+    xte_nodebld_acc (stat, xte_node (xte_head ('SourceRef'), cast (self.src as varchar)));
+  xte_nodebld_acc (stat, xte_node (xte_head ('Data'), cast (code as varchar)));
+  if (self.out_data is not null)
+    xte_nodebld_acc (stat, self.out_data);
+  xte_nodebld_final (stat, xte_head('Status'));
+  xte_nodebld_acc (resp, stat);
+}
 ;
 
 create method process (inout resp any) for sync_cmd
-  {
-    declare h any;
-    declare rc any;
+{
+  declare h any;
+  declare rc any;
 
-    h := udt_implements_method (self, fix_identifier_case ('sync_handle_' || self.tp));
-    if (h)
-      {
-	declare i, l int;
-	l := length (self.items); i := 0;
-	while (i < l)
-	  {
-	    {
-	      declare exit handler for sqlstate '*'
-		{
-		    log_message (sprintf ('Command failed: %s, id %d, Error: %s ', self.tp, self.id, __SQL_MESSAGE));
-		    self.state := 500;
-		    goto __next;
-		};
-	    rc := call (h) (self, self.items[i], resp);
-	    }
-__next:;
-	    i := i + 1;
-	  }
-	if (self.state is not null)
-	  self.serialize_resp (self.state, resp);
-      }
-    else
+  h := udt_implements_method (self, fix_identifier_case ('sync_handle_' || self.tp));
+  if (h)
+  {
+    declare i, l int;
+    l := length (self.items); i := 0;
+    while (i < l)
+    {
       {
-	signal ('42000', 'Not implemented ' || self.tp);
+        declare exit handler for sqlstate '*'
+        {
+          log_message (sprintf ('Command failed: %s, id %d, Error: %s ', self.tp, self.id, __SQL_MESSAGE));
+          self.state := 500;
+          goto __next;
+        };
+        rc := call (h) (self, self.items[i], resp);
       }
-    return null;
+    __next:;
+      i := i + 1;
+    }
+    if (self.state is not null)
+      self.serialize_resp (self.state, resp);
   }
+  else
+  {
+    signal ('42000', 'Not implemented ' || self.tp);
+  }
+  return null;
+}
 ;
 
-
 create method update_devinfo (inout xt any) for sync_cmd
 {
-    declare id, man, model, oem, fwv, swv, hwv, devid, devty, utc, slob, snoc, uid any;
-     man 	:= cast (xpath_eval ('/DevInf/Man/text()', xt, 1) as varchar);
-     model 	:= cast (xpath_eval ('/DevInf/Mod/text()', xt, 1) as varchar);
-     oem 	:= cast (xpath_eval ('/DevInf/OEM/text()', xt, 1) as varchar);
-     fwv 	:= cast (xpath_eval ('/DevInf/FwV/text()', xt, 1) as varchar);
-     swv 	:= cast (xpath_eval ('/DevInf/SwV/text()', xt, 1) as varchar);
-     hwv 	:= cast (xpath_eval ('/DevInf/HwV/text()', xt, 1) as varchar);
-     devid 	:= cast (xpath_eval ('/DevInf/DevID/text()', xt, 1) as varchar);
-     devty 	:= cast (xpath_eval ('/DevInf/DevTyp/text()', xt, 1) as varchar);
-     utc 	:= cast (xpath_eval ('/DevInf/UTC/text()', xt, 1) as varchar);
-     slob 	:= cast (xpath_eval ('/DevInf/SupportLargeObjs/text()', xt, 1) as varchar);
-     snoc 	:= cast (xpath_eval ('/DevInf/SupportNumberOfChanges/text()', xt, 1) as varchar);
-
-     update SYNC_DEVICES set
-     DEV_USER_ID = uid,
-     DEV_MAN = man,
-     DEV_MOD = model,
-     DEV_OEM = oem,
-     DEV_FWV = fwv,
-     DEV_SWV = swv,
-     DEV_HWV = hwv,
-     DEV_DEVID = devid,
-     DEV_DEVTYP = devty,
-     DEV_UTC = utc,
-     DEV_SUPP_LOB = slob,
-     DEV_SUPP_NOC = snoc,
-     DEV_INF = serialize_to_UTF8_xml (xt)
-     where DEV_URI = self.batch.src;
-  }
+  declare id, man, model, oem, fwv, swv, hwv, devid, devty, utc, slob, snoc, uid any;
+
+  man   := cast (xpath_eval ('/DevInf/Man/text()', xt, 1) as varchar);
+  model := cast (xpath_eval ('/DevInf/Mod/text()', xt, 1) as varchar);
+  oem   := cast (xpath_eval ('/DevInf/OEM/text()', xt, 1) as varchar);
+  fwv   := cast (xpath_eval ('/DevInf/FwV/text()', xt, 1) as varchar);
+  swv   := cast (xpath_eval ('/DevInf/SwV/text()', xt, 1) as varchar);
+  hwv   := cast (xpath_eval ('/DevInf/HwV/text()', xt, 1) as varchar);
+  devid := cast (xpath_eval ('/DevInf/DevID/text()', xt, 1) as varchar);
+  devty := cast (xpath_eval ('/DevInf/DevTyp/text()', xt, 1) as varchar);
+  utc   := cast (xpath_eval ('/DevInf/UTC/text()', xt, 1) as varchar);
+  slob  := cast (xpath_eval ('/DevInf/SupportLargeObjs/text()', xt, 1) as varchar);
+  snoc  := cast (xpath_eval ('/DevInf/SupportNumberOfChanges/text()', xt, 1) as varchar);
+
+  update SYNC_DEVICES
+     set DEV_USER_ID = uid,
+         DEV_MAN = man,
+         DEV_MOD = model,
+         DEV_OEM = oem,
+         DEV_FWV = fwv,
+         DEV_SWV = swv,
+         DEV_HWV = hwv,
+         DEV_DEVID = devid,
+         DEV_DEVTYP = devty,
+         DEV_UTC = utc,
+         DEV_SUPP_LOB = slob,
+         DEV_SUPP_NOC = snoc,
+         DEV_INF = serialize_to_UTF8_xml (xt)
+   where DEV_URI = self.batch.src;
+}
 ;
 
 -- XXX: 2-level depth only
 create method resolve_uri (in url varchar) for sync_cmd
-  {
-    declare base, ret, phys, tmp varchar;
-    declare arr any;
+{
+  declare base, ret, phys, tmp varchar;
+  declare arr any;
 
-    base := self.batch.tgt;
-    if (base not like '%/') base := base || '/';
-    if (self.parent is not null and length (self.parent.tgt))
-      {
-	tmp := self.parent.tgt;
-	if (tmp not like '%/') tmp := tmp || '/';
-        base := WS.WS.EXPAND_URL (base, tmp);
-      }
-    if (length (self.tgt))
-      {
-	tmp := self.tgt;
-	if (tmp not like '%/') tmp := tmp || '/';
-        base := WS.WS.EXPAND_URL (base, tmp);
-      }
-    ret := WS.WS.EXPAND_URL (base, url);
-    arr := WS.WS.PARSE_URI (ret);
-    ret := arr[2];
-
-    phys := http_physical_path_resolve (ret);
-
-    if (phys is not null)
-      ret := phys;
-    else if (ret not like '/DAV/%')
-      ret := '/DAV' || ret;
-    --dbg_obj_print ('resolve_uri:', ret);
-    return ret;
+  base := self.batch.tgt;
+  if (base not like '%/') base := base || '/';
+  if (self.parent is not null and length (self.parent.tgt))
+  {
+    tmp := self.parent.tgt;
+    if (tmp not like '%/') tmp := tmp || '/';
+    base := WS.WS.EXPAND_URL (base, tmp);
   }
+  if (length (self.tgt))
+  {
+    tmp := self.tgt;
+    if (tmp not like '%/') tmp := tmp || '/';
+    base := WS.WS.EXPAND_URL (base, tmp);
+  }
+  ret := WS.WS.EXPAND_URL (base, url);
+  arr := WS.WS.PARSE_URI (ret);
+  ret := arr[2];
+
+  phys := http_physical_path_resolve (ret);
+
+  if (phys is not null)
+    ret := phys;
+  else if (ret not like '/DAV/%')
+    ret := '/DAV' || ret;
+  --dbg_obj_print ('resolve_uri:', ret);
+  return ret;
+}
 ;
 
 --- too fake , try expanding
 create method resolve_target () for sync_cmd
-  {
-    declare base, ret varchar;
-    declare arr any;
-
-    if (self.src is not null)
-      return self.src;
-    else if (self.parent is not null and length (self.parent.src))
-      return self.parent.src;
-    return NULL;
-  }
+{
+  declare base, ret varchar;
+  declare arr any;
+
+  if (self.src is not null)
+    return self.src;
+  else if (self.parent is not null and length (self.parent.src))
+    return self.parent.src;
+  return NULL;
+}
 ;
 
-create method sync_handle_put (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_put (inout xt any, inout resp any) for sync_cmd
 {
   declare loc varchar;
   declare data any;
@@ -766,66 +762,64 @@ create method sync_handle_put (inout xt any, inout resp any)  for sync_cmd
   loc := cast (xpath_eval ('/Item/Source/LocURI/text()', xt, 1) as varchar);
 
   if (loc like './devinf1%')
-    {
-      -- TODO check xpath_eval result <> Null
-      self.update_devinfo (xml_cut(xpath_eval ('/Item/Data/DevInf', xt, 1)));
-    }
+  {
+    -- TODO check xpath_eval result <> Null
+    self.update_devinfo (xml_cut(xpath_eval ('/Item/Data/DevInf', xt, 1)));
+  }
   else
-    {
-      return self.sync_handle_add (xt, resp);
-    }
+  {
+    return self.sync_handle_add (xt, resp);
+  }
   self.state := 200;
 }
 ;
 
-create method sync_handle_replace (inout xt any, inout resp any)  for sync_cmd
-  {
-    return self.sync_handle_add (xt, resp);
-  }
+create method sync_handle_replace (inout xt any, inout resp any) for sync_cmd
+{
+  return self.sync_handle_add (xt, resp);
+}
 ;
 
-create method sync_handle_copy (inout xt any, inout resp any)  for sync_cmd
-  {
-    return self.sync_handle_add (xt, resp);
-  }
+create method sync_handle_copy (inout xt any, inout resp any) for sync_cmd
+{
+  return self.sync_handle_add (xt, resp);
+}
 ;
 
-create method sync_handle_delete (inout xt any, inout resp any)  for sync_cmd
-  {
-    declare loc, path varchar;
-    declare col_id int;
+create method sync_handle_delete (inout xt any, inout resp any) for sync_cmd
+{
+  declare loc, path varchar;
+  declare col_id int;
 
-    if (not self.authenticated (401))
-      return;
+  if (not self.authenticated (401))
+    return;
 
-    xt := xml_cut (xt);
-    loc := cast (xpath_eval ('/Item/Source/LocURI/text()', xt, 1) as varchar);
-    path := self.resolve_uri (null);
-    col_id := DAV_SEARCH_ID (path, 'c');
+  xt := xml_cut (xt);
+  loc := cast (xpath_eval ('/Item/Source/LocURI/text()', xt, 1) as varchar);
+  path := self.resolve_uri (null);
+  col_id := DAV_SEARCH_ID (path, 'c');
 
-    --dbg_obj_print ('delete', path, loc);
-    if (not self.perm_check (path))
-      return;
+  --dbg_obj_print ('delete', path, loc);
+  if (not self.perm_check (path))
+    return;
 
-    -- delete from DAV, check archive flag !!!
-    delete from WS.WS.SYS_DAV_RES
-    where RES_ID =
-    (select MAP_GUID from SYNC_MAPS where
-    MAP_DEV_ID = self.batch.devid and MAP_LUID = loc and MAP_COL_ID = col_id);
+  -- delete from DAV, check archive flag !!!
+  delete
+    from WS.WS.SYS_DAV_RES
+   where RES_ID = (select MAP_GUID from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_LUID = loc and MAP_COL_ID = col_id);
 
-    delete from SYNC_MAPS where
-    MAP_DEV_ID = self.batch.devid and MAP_LUID = loc and MAP_COL_ID = col_id;
+  delete
+    from SYNC_MAPS
+   where MAP_DEV_ID = self.batch.devid and MAP_LUID = loc and MAP_COL_ID = col_id;
 
-    if (row_count())
+  if (row_count())
     self.state := 200;
-    else
-      self.state := 404;
-
-    --self.state := 200;
-  }
+  else
+    self.state := 404;
+}
 ;
 
-create method sync_handle_map (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_map (inout xt any, inout resp any) for sync_cmd
 {
   --dbg_obj_print ('sync_handle_map', xt);
   declare loc, guid varchar;
@@ -841,14 +835,15 @@ create method sync_handle_map (inout xt any, inout resp any)  for sync_cmd
   path := self.resolve_uri (null);
   col_id := DAV_SEARCH_ID (path, 'c');
 
-  insert replacing SYNC_MAPS (MAP_DEV_ID, MAP_LUID, MAP_GUID, MAP_COL_ID) values (self.batch.devid, loc, guid, col_id);
+  insert replacing SYNC_MAPS (MAP_DEV_ID, MAP_LUID, MAP_GUID, MAP_COL_ID)
+    values (self.batch.devid, loc, guid, col_id);
 
   self.state := 200;
 }
 ;
 
 
-create method sync_handle_add (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_add (inout xt any, inout resp any) for sync_cmd
 {
   --dbg_printf ('sync_handle_add');
   declare loc varchar;
@@ -875,19 +870,18 @@ create method sync_handle_add (inout xt any, inout resp any)  for sync_cmd
   col_id := DAV_SEARCH_ID (path, 'c');
 
   if (col_id < 0)
-    {
-      self.state := 404;
-      return;
-    }
+  {
+    self.state := 404;
+    return;
+  }
 
   declare exit handler for sqlstate '*'
-    {
+  {
 --     dbg_obj_print ('error at parse:', __SQL_MESSAGE);
 --     string_to_file ('bad_data_' || uuid (), data, -1);
-       temp := data;
-       goto _continue;
-    };
-
+     temp := data;
+     goto _continue;
+  };
   temp := sync_parse_in_data (data, mime_in);
 
 _continue:;
@@ -922,15 +916,15 @@ _continue:;
   --dbg_obj_print (col_id, self.batch.devid);
 
   if (exists (select 1 from SYNC_RPLOG, SYNC_ANCHORS, SYNC_MAPS
-  		where
-		RLOG_RES_COL = A_COL_ID and
-		MAP_COL_ID = A_COL_ID and
-		MAP_DEV_ID = A_DEV_ID and
-		RLOG_RES_ID = MAP_GUID and
-		MAP_LUID = loc and
-		A_COL_ID = col_id and
-		A_DEV_ID = self.batch.devid
-		and A_LAST_LOCAL < SNAPTIME))
+      where
+    RLOG_RES_COL = A_COL_ID and
+    MAP_COL_ID = A_COL_ID and
+    MAP_DEV_ID = A_DEV_ID and
+    RLOG_RES_ID = MAP_GUID and
+    MAP_LUID = loc and
+    A_COL_ID = col_id and
+    A_DEV_ID = self.batch.devid
+    and A_LAST_LOCAL < SNAPTIME))
     {
       dbg_obj_print ('conflict', res_path);
       state := 208;
@@ -945,20 +939,20 @@ _continue:;
   connection_set ('__sync_dav_upl', '0');
 
   if (rc > 0)
+  {
+    insert soft SYNC_MAPS (MAP_DEV_ID, MAP_LUID, MAP_GUID, MAP_COL_ID)
+      values (self.batch.devid, loc, rc, col_id);
+    if (row_count ())
     {
-      insert soft SYNC_MAPS (MAP_DEV_ID, MAP_LUID, MAP_GUID, MAP_COL_ID) values (self.batch.devid, loc, rc, col_id);
-      if (row_count ())
-        {
-          state := 201;
-	}
+      state := 201;
     }
-
+  }
   self.state := state;
 }
 ;
 
 
-create method sync_handle_get (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_get (inout xt any, inout resp any) for sync_cmd
 {
   declare loc, devinf_ns, ver varchar;
   declare data any;
@@ -1000,46 +994,43 @@ create method sync_handle_get (inout xt any, inout resp any)  for sync_cmd
 
       ver := coalesce (connection_get ('SyncML-ver'), '1.0');
 
-
       devinf_ns := 'http://www.syncml.org/docs/syncml_devinf_v10_20001207.dtd';
       if (ver = '1.1')
-	devinf_ns := 'http://www.syncml.org/docs/devinf_v11_20020215.dtd';
+        devinf_ns := 'http://www.syncml.org/docs/devinf_v11_20020215.dtd';
       else if (ver = '1.2')
-	devinf_ns := 'http://www.openmobilealliance.org/tech/DTD/OMA-SyncML-Device_Information-DTD-1.2.dtd';
+        devinf_ns := 'http://www.openmobilealliance.org/tech/DTD/OMA-SyncML-Device_Information-DTD-1.2.dtd';
 
       -- xml/wbxml; depending of request
       xte_nodebld_acc (data, xte_node (xte_head ('Meta'),
-      			xte_node (xte_head ('Type', 'xmlns', 'syncml:metinf'),
-			'application/vnd.syncml-devinf+'||media)));
+      xte_node (xte_head ('Type', 'xmlns', 'syncml:metinf'), 'application/vnd.syncml-devinf+'||media)));
 
-        declare devinf_node any;
+      declare devinf_node any;
 
       xte_nodebld_init (devinf_node);
 
-      		xte_nodebld_acc (devinf_node, xte_node (xte_head ('VerDTD'), self.batch.ver));
-      		xte_nodebld_acc (devinf_node, xte_node (xte_head ('Man'), man));
-  	    	xte_nodebld_acc (devinf_node, xte_node (xte_head ('Mod'), model));
-       		xte_nodebld_acc (devinf_node, xte_node (xte_head ('OEM'), oem));
-      		xte_nodebld_acc (devinf_node, xte_node (xte_head ('FwV'), fwv));
-       		xte_nodebld_acc (devinf_node, xte_node (xte_head ('SwV'), swv));
-     		xte_nodebld_acc (devinf_node, xte_node (xte_head ('DevID'), devid));
-      		xte_nodebld_acc (devinf_node, xte_node (xte_head ('DevTyp'), devty));
---      	xte_nodebld_acc (devinf_node, xte_node (xte_head ('SupportLargeObjs'), slob));
---      	xte_nodebld_acc (devinf_node, xte_node (xte_head ('SupportNumberOfChanges'), snoc));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('VerDTD'), self.batch.ver));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('Man'), man));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('Mod'), model));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('OEM'), oem));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('FwV'), fwv));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('SwV'), swv));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('DevID'), devid));
+      xte_nodebld_acc (devinf_node, xte_node (xte_head ('DevTyp'), devty));
+--        xte_nodebld_acc (devinf_node, xte_node (xte_head ('SupportLargeObjs'), slob));
+--        xte_nodebld_acc (devinf_node, xte_node (xte_head ('SupportNumberOfChanges'), snoc));
 
 --     dbg_obj_print ('sync_handle_get ver = ', ver);
 
       for (select CT_NAME, CT_TYPE from SYNC_COLS_TYPES where CT_VER = ver) do
-	{
-	    declare p_name varchar;
-      	    p_name := sync_xml_to_node (CT_TYPE, CT_NAME);
-   	    call (p_name) (devinf_node, CT_NAME);
-	}
-
-       xte_nodebld_final (devinf_node, xte_head ('DevInf', 'xmlns', devinf_ns));
+      {
+        declare p_name varchar;
+        p_name := sync_xml_to_node (CT_TYPE, CT_NAME);
+        call (p_name) (devinf_node, CT_NAME);
+      }
 
-       xte_nodebld_acc (item, devinf_node);
+      xte_nodebld_final (devinf_node, xte_head ('DevInf', 'xmlns', devinf_ns));
 
+      xte_nodebld_acc (item, devinf_node);
     }
   else
     {
@@ -1060,8 +1051,8 @@ create method sync_handle_get (inout xt any, inout resp any)  for sync_cmd
   xte_nodebld_final (item, xte_head ('Data'));
 
   xte_nodebld_acc (data, xte_node (xte_head ('Item'),
-  		xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'), loc)),
-  		item));
+      xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'), loc)),
+      item));
 
   xte_nodebld_final (data, xte_head ('Results'));
   --xte_nodebld_acc (resp, data);
@@ -1072,7 +1063,7 @@ endp:
 }
 ;
 
-create method sync_handle_status (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_status (inout xt any, inout resp any) for sync_cmd
 {
   --dbg_printf ('sync_handle_status');
   declare cmdref, cmdname, srcref, stat, rc any;
@@ -1091,35 +1082,35 @@ create method sync_handle_status (inout xt any, inout resp any)  for sync_cmd
       --dbg_obj_print ('status returned for:', cmdref,cmdname,srcref, stat, rc);
       if (cmdname = stat[0])
         {
-	  if (cmdname = 'Sync' and rc like '2%')
-	    {
+    if (cmdname = 'Sync' and rc like '2%')
+      {
 --     dbg_obj_print ('updating sync anchors for :', stat[2]);
 --     dbg_obj_print ('updating sync anchors for :', self.batch.cmdstate);
 --     dbg_obj_print ('updating sync anchors for :', get_keyword ('__send_final', self.batch.cmdstate, 0));
 
-	      if (get_keyword ('__send_final', self.batch.cmdstate, 0))
-		{
+        if (get_keyword ('__send_final', self.batch.cmdstate, 0))
+    {
                    declare nlocal any;
                    whenever not found goto aupdate;
                    select A_NEXT_LOCAL into nlocal from SYNC_ANCHORS
-			where A_COL_ID = stat[2] and A_DEV_ID = self.batch.devid and A_LAST_LOCAL = '1981-1-1';
-		   update SYNC_RPLOG set SNAPTIME = nlocal where RLOG_RES_COL = stat[2] and SNAPTIME = '1981-1-1';
-		   aupdate:
-	           update SYNC_ANCHORS set A_LAST_LOCAL = A_NEXT_LOCAL where
-		       A_COL_ID = stat[2] and A_DEV_ID = self.batch.devid;
-		}
-	    }
-	  else if (cmdname = 'Delete' and rc like '2%')
-	    {
-	      --dbg_obj_print ('removing sync map for :', stat[2]);
-	      delete from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_GUID = stat[2];
-	    }
-	  else if (cmdname in ('Add','Replace','Delete') and rc not like '2%')
-	    {
-	      --dbg_obj_print ('forwarding log for :', stat[2]);
-	      update SYNC_RPLOG set SNAPTIME = now () where RLOG_RES_ID = stat[2];
-	    }
-	}
+      where A_COL_ID = stat[2] and A_DEV_ID = self.batch.devid and A_LAST_LOCAL = '1981-1-1';
+       update SYNC_RPLOG set SNAPTIME = nlocal where RLOG_RES_COL = stat[2] and SNAPTIME = '1981-1-1';
+       aupdate:
+             update SYNC_ANCHORS set A_LAST_LOCAL = A_NEXT_LOCAL where
+           A_COL_ID = stat[2] and A_DEV_ID = self.batch.devid;
+    }
+      }
+    else if (cmdname = 'Delete' and rc like '2%')
+      {
+        --dbg_obj_print ('removing sync map for :', stat[2]);
+        delete from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_GUID = stat[2];
+      }
+    else if (cmdname in ('Add','Replace','Delete') and rc not like '2%')
+      {
+        --dbg_obj_print ('forwarding log for :', stat[2]);
+        update SYNC_RPLOG set SNAPTIME = now () where RLOG_RES_ID = stat[2];
+      }
+  }
     }
 
   --dbg_obj_print (self.batch.cmdstate);
@@ -1163,138 +1154,138 @@ create method sync_issue_sync (inout xt any, inout resp any) for sync_cmd
 
   for select RLOG_RES_ID, RLOG_RES_COL, DMLTYPE from SYNC_RPLOG, SYNC_ANCHORS
   where RLOG_RES_COL = A_COL_ID and A_COL_ID = col_id and A_DEV_ID = self.batch.devid
-   	and A_LAST_LOCAL < SNAPTIME and SNAPTIME < A_NEXT_LOCAL and not position (RLOG_RES_ID, self.batch.send_list)
-	and self.batch.remote_final
-	do
+     and A_LAST_LOCAL < SNAPTIME and SNAPTIME < A_NEXT_LOCAL and not position (RLOG_RES_ID, self.batch.send_list)
+  and self.batch.remote_final
+  do
 
       {
-	declare repl, data, meta, cmdname any;
-	--dbg_obj_print ('DMLTYPE ->', DMLTYPE);
-
-	cmdname := 'Replace';
-	data := 0;
-	if (DMLTYPE = 'I' or DMLTYPE = 'U')
-	  {
-	    whenever not found goto skipit;
-	    select RES_CONTENT, RES_TYPE into data, meta
-	    from WS.WS.SYS_DAV_RES where RES_ID = RLOG_RES_ID;
---		dbg_obj_print ('DATA 0 RLOG_RES_ID = ', RLOG_RES_ID);
-	    skipit:;
-	  }
-
-	if (isinteger (data) and (DMLTYPE = 'I' or DMLTYPE = 'U'))
-	  goto end_loop;
-
-	repl := null;
-	xte_nodebld_init (repl);
+  declare repl, data, meta, cmdname any;
+  --dbg_obj_print ('DMLTYPE ->', DMLTYPE);
+
+  cmdname := 'Replace';
+  data := 0;
+  if (DMLTYPE = 'I' or DMLTYPE = 'U')
+    {
+      whenever not found goto skipit;
+      select RES_CONTENT, RES_TYPE into data, meta
+      from WS.WS.SYS_DAV_RES where RES_ID = RLOG_RES_ID;
+--    dbg_obj_print ('DATA 0 RLOG_RES_ID = ', RLOG_RES_ID);
+      skipit:;
+    }
+
+  if (isinteger (data) and (DMLTYPE = 'I' or DMLTYPE = 'U'))
+    goto end_loop;
+
+  repl := null;
+  xte_nodebld_init (repl);
         self.batch.last_cmd := self.batch.last_cmd + 1;
-	xte_nodebld_acc (repl, xte_node (xte_head ('CmdID'), cast (self.batch.last_cmd as varchar)));
-
-	declare exit handler for sqlstate '*'
-	  {
-	    dbg_obj_print (__SQL_STATE, __SQL_MESSAGE);
-	    goto _continue;
-	  };
-
-	if (not isinteger (data))
-	  {
-	    if (not xslt_is_sheet ('http://local.virt/sync_out_xsl'))
-	       sync_define_xsl ();
---		dbg_obj_print ('DATA 0 data = ', blob_to_string (data));
-	    data := xslt ('http://local.virt/sync_out_xsl', xtree_doc (data, 0, '', 'utf-8'),
-		vector ('devinf', dev_info, 'mime', meta));
---		dbg_obj_print ('DATA dev_info = ', dev_info);
---		dbg_obj_print ('DATA meta     = ', meta);
-
-	    data := serialize_to_UTF8_xml (data);
-	    data := charset_recode (data, 'UTF-8', '_WIDE_');
-
-	    if (isinteger (data))
-		{
-    		    signal ('22023', 'Missing content.');
-		    goto end_loop;
-		}
-	  }
+  xte_nodebld_acc (repl, xte_node (xte_head ('CmdID'), cast (self.batch.last_cmd as varchar)));
+
+  declare exit handler for sqlstate '*'
+    {
+      dbg_obj_print (__SQL_STATE, __SQL_MESSAGE);
+      goto _continue;
+    };
+
+  if (not isinteger (data))
+    {
+      if (not xslt_is_sheet ('http://local.virt/sync_out_xsl'))
+         sync_define_xsl ();
+--    dbg_obj_print ('DATA 0 data = ', blob_to_string (data));
+      data := xslt ('http://local.virt/sync_out_xsl', xtree_doc (data, 0, '', 'utf-8'),
+    vector ('devinf', dev_info, 'mime', meta));
+--    dbg_obj_print ('DATA dev_info = ', dev_info);
+--    dbg_obj_print ('DATA meta     = ', meta);
+
+      data := serialize_to_UTF8_xml (data);
+      data := charset_recode (data, 'UTF-8', '_WIDE_');
+
+      if (isinteger (data))
+    {
+            signal ('22023', 'Missing content.');
+        goto end_loop;
+    }
+    }
 
 _continue:;
   whenever SQLSTATE '*' default;
 
 
-	if (not isinteger (data))
-	message_size := message_size + length (data);
-
-	if (DMLTYPE = 'U' or DMLTYPE = 'I')
-	  {
-	    xte_nodebld_acc (repl, xte_node (xte_head ('Meta'),
-	    xte_node (xte_head ('Type' , 'xmlns', 'syncml:metinf'), meta)));
-
-	    -- not exact res_name ; get from mapping table !!!
-	    if (not exists
-	    (select 1 from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID))
-	      {
-		cmdname := 'Add';
-		xte_nodebld_acc (repl,  xte_node (xte_head ('Item'),
-		--xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'), RLOG_RES_NAME)),
-		xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'),
-				cast(RLOG_RES_ID as varchar))),
-		xte_node (xte_head ('Data'), blob_to_string (data))));
---		dbg_obj_print ('DATA 1 data = ', blob_to_string (data));
-	      }
-	    else
-	      {
-		declare _loc varchar;
-		select MAP_LUID into _loc from SYNC_MAPS
-		       where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID;
-		xte_nodebld_acc (repl,  xte_node (xte_head ('Item'),
-		xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'),
-				cast(_loc as varchar))),
-		xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'),
-				cast(RLOG_RES_ID as varchar))),
-		xte_node (xte_head ('Data'), blob_to_string (data))));
-	      }
-
-	  }
-	else
-	  {
-	    declare _loc varchar;
-	    _loc := (select MAP_LUID from SYNC_MAPS
-	    where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID);
-	    if (_loc is not null)
-	      {
-		xte_nodebld_acc (repl,  xte_node (xte_head ('Item'),
-		xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'),
-		cast(_loc as varchar)))));
-	       -- this must be done in status on next go
-	       --delete from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID;
-	       cmdname := 'Delete';
-	      }
-	    else
-	      cmdname := null;
-	  }
-
-	if (cmdname is not null)
-	  {
-	    xte_nodebld_final (repl, xte_head (cmdname));
-	    xte_nodebld_acc (syn, repl);
-	    self.add_state (self.batch.last_cmd, vector (cmdname, cast(RLOG_RES_ID as varchar), RLOG_RES_ID));
-	  }
-
-	-- dbg_obj_print ('issuing sync: ', RLOG_RES_ID, cmdname);
+  if (not isinteger (data))
+    message_size := message_size + length (data);
+
+  if (DMLTYPE = 'U' or DMLTYPE = 'I')
+    {
+      xte_nodebld_acc (repl, xte_node (xte_head ('Meta'),
+      xte_node (xte_head ('Type' , 'xmlns', 'syncml:metinf'), meta)));
+
+      -- not exact res_name ; get from mapping table !!!
+      if (not exists
+      (select 1 from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID))
+        {
+    cmdname := 'Add';
+    xte_nodebld_acc (repl,  xte_node (xte_head ('Item'),
+    --xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'), RLOG_RES_NAME)),
+    xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'),
+        cast(RLOG_RES_ID as varchar))),
+    xte_node (xte_head ('Data'), blob_to_string (data))));
+--    dbg_obj_print ('DATA 1 data = ', blob_to_string (data));
+        }
+      else
+        {
+    declare _loc varchar;
+    select MAP_LUID into _loc from SYNC_MAPS
+           where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID;
+    xte_nodebld_acc (repl,  xte_node (xte_head ('Item'),
+    xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'),
+        cast(_loc as varchar))),
+    xte_node (xte_head ('Source'), xte_node (xte_head ('LocURI'),
+        cast(RLOG_RES_ID as varchar))),
+    xte_node (xte_head ('Data'), blob_to_string (data))));
+        }
+
+    }
+  else
+    {
+      declare _loc varchar;
+      _loc := (select MAP_LUID from SYNC_MAPS
+      where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID);
+      if (_loc is not null)
+        {
+    xte_nodebld_acc (repl,  xte_node (xte_head ('Item'),
+    xte_node (xte_head ('Target'), xte_node (xte_head ('LocURI'),
+    cast(_loc as varchar)))));
+         -- this must be done in status on next go
+         --delete from SYNC_MAPS where MAP_DEV_ID = self.batch.devid and MAP_GUID = RLOG_RES_ID;
+         cmdname := 'Delete';
+        }
+      else
+        cmdname := null;
+    }
+
+  if (cmdname is not null)
+    {
+      xte_nodebld_final (repl, xte_head (cmdname));
+      xte_nodebld_acc (syn, repl);
+      self.add_state (self.batch.last_cmd, vector (cmdname, cast(RLOG_RES_ID as varchar), RLOG_RES_ID));
+    }
+
+  -- dbg_obj_print ('issuing sync: ', RLOG_RES_ID, cmdname);
 
         if (isarray (self.batch.send_list))
-	  self.batch.send_list := vector_concat (self.batch.send_list, vector (RLOG_RES_ID));
-	else
-	  self.batch.send_list := vector (RLOG_RES_ID);
+    self.batch.send_list := vector_concat (self.batch.send_list, vector (RLOG_RES_ID));
+  else
+    self.batch.send_list := vector (RLOG_RES_ID);
 
-	self.replace_state ('__send_list', self.batch.send_list);
+  self.replace_state ('__send_list', self.batch.send_list);
 
         if ((self.batch.max_size / 4 - 1024) < message_size)
-	  {
-	      self.batch.send_final := 0;
-	      -- dbg_obj_print ('max_size = ', self.batch.max_size);
-	      self.replace_state ('__send_final', self.batch.send_final);
-	      goto endloop;
-	  }
+    {
+        self.batch.send_final := 0;
+        -- dbg_obj_print ('max_size = ', self.batch.max_size);
+        self.replace_state ('__send_final', self.batch.send_final);
+        goto endloop;
+    }
 end_loop:;
       }
 
@@ -1302,27 +1293,27 @@ end_loop:;
 
   if (self.batch.send_final) -- remove finished tasks
     {
-	declare in_src, in_tgt, res_src, res_tgt any;
-	declare i, l integer;
-
-	in_src := get_keyword ('__self.src', self.batch.cmdstate, vector (''));
-	in_tgt := get_keyword ('__self.tgt', self.batch.cmdstate, vector (''));
-
-	res_src := vector ();
-	res_tgt := vector ();
-
-	i := 0; l := length (in_src);
-	while (i < l)
-	  {
-	     if (in_src[i] <> self.src)
-	       {
-		  res_src := vector_concat (res_src, vector (in_src[i]));
-		  res_tgt := vector_concat (res_tgt, vector (in_tgt[i]));
-	       }
-	     i := i + 1;
-	  }
-	self.replace_state ('__self.src', res_src);
-	self.replace_state ('__self.tgt', res_tgt);
+  declare in_src, in_tgt, res_src, res_tgt any;
+  declare i, l integer;
+
+  in_src := get_keyword ('__self.src', self.batch.cmdstate, vector (''));
+  in_tgt := get_keyword ('__self.tgt', self.batch.cmdstate, vector (''));
+
+  res_src := vector ();
+  res_tgt := vector ();
+
+  i := 0; l := length (in_src);
+  while (i < l)
+    {
+       if (in_src[i] <> self.src)
+         {
+      res_src := vector_concat (res_src, vector (in_src[i]));
+      res_tgt := vector_concat (res_tgt, vector (in_tgt[i]));
+         }
+       i := i + 1;
+    }
+  self.replace_state ('__self.src', res_src);
+  self.replace_state ('__self.tgt', res_tgt);
     }
 
   self.replace_state ('__remote_final', self.batch.remote_final);
@@ -1332,7 +1323,7 @@ end_loop:;
 ;
 
 
-create method sync_handle_sync (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_sync (inout xt any, inout resp any) for sync_cmd
 {
   --dbg_obj_print ('sync_handle_sync');
   declare cmds any;
@@ -1349,7 +1340,7 @@ create method sync_handle_sync (inout xt any, inout resp any)  for sync_cmd
   col_id := DAV_SEARCH_ID (path, 'c');
 
   local_time := (select A_NEXT_LOCAL from SYNC_ANCHORS
-  	where A_COL_ID = col_id and A_DEV_ID = self.batch.devid);
+    where A_COL_ID = col_id and A_DEV_ID = self.batch.devid);
   connection_set ('A_LAST_LOCAL', local_time);
 
   self.serialize_resp (self.state, resp);
@@ -1375,11 +1366,11 @@ create method sync_handle_sync (inout xt any, inout resp any)  for sync_cmd
     {
        temp := get_keyword ('__self.src', self.batch.cmdstate, NULL);
        if (temp is not null)
-	 {
-	    self.replace_state ('__self.src', vector_concat (temp, vector (self.src)));
-	    temp := get_keyword ('__self.tgt', self.batch.cmdstate, NULL);
-	    self.replace_state ('__self.tgt', vector_concat (temp, vector (self.tgt)));
-	 }
+   {
+      self.replace_state ('__self.src', vector_concat (temp, vector (self.src)));
+      temp := get_keyword ('__self.tgt', self.batch.cmdstate, NULL);
+      self.replace_state ('__self.tgt', vector_concat (temp, vector (self.tgt)));
+   }
     }
   else if (self.state = 200)
     {
@@ -1395,7 +1386,7 @@ create method sync_handle_sync (inout xt any, inout resp any)  for sync_cmd
 
 --/* */
 
-create method sync_handle_alert (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_alert (inout xt any, inout resp any) for sync_cmd
 {
   --dbg_printf ('sync_handle_alert');
   declare path, loc, loc1, tgt, arlast, arnext, alert_code varchar;
@@ -1444,12 +1435,12 @@ create method sync_handle_alert (inout xt any, inout resp any)  for sync_cmd
 
   if (alert_code = '201')
     {
-	sync_code := 201;
-	arlast := NULL;
+  sync_code := 201;
+  arlast := NULL;
     }
 
   update SYNC_ANCHORS set A_NEXT_LOCAL = now (), A_LAST_REMOTE = arlast, A_NEXT_REMOTE = arnext
-  	where A_COL_ID = col_id and A_DEV_ID = self.batch.devid;
+    where A_COL_ID = col_id and A_DEV_ID = self.batch.devid;
   if (not row_count () or arlast is null)
     {
       --dbg_obj_print ('slow sync');
@@ -1466,8 +1457,8 @@ create method sync_handle_alert (inout xt any, inout resp any)  for sync_cmd
   declare necho any;
   xte_nodebld_init (necho);
   xte_nodebld_acc (necho, xte_node (xte_head ('Data'),
-  	xte_node (xte_head ('Anchor', 'xmlns', 'syncml:metinf'),
-	xte_node (xte_head ('Next'), arnext))));
+    xte_node (xte_head ('Anchor', 'xmlns', 'syncml:metinf'),
+  xte_node (xte_head ('Next'), arnext))));
   xte_nodebld_final (necho, xte_head ('Item'));
   self.out_data := necho;
 
@@ -1481,7 +1472,7 @@ create method sync_handle_alert (inout xt any, inout resp any)  for sync_cmd
       declare tlas, tnex varchar;
 
       select A_LAST_LOCAL, A_NEXT_LOCAL
-      	 into las, nex from SYNC_ANCHORS
+         into las, nex from SYNC_ANCHORS
          where A_COL_ID = col_id and A_DEV_ID = self.batch.devid;
 
       tlas := soap_print_box (las, '', 0);
@@ -1492,18 +1483,18 @@ create method sync_handle_alert (inout xt any, inout resp any)  for sync_cmd
       xte_nodebld_init (anch);
 
       if (sync_date_nokia (tlas) = '19810101T000000Z')
-	{
-      xte_nodebld_acc (anch,
-	  --xte_node (xte_head ('Last')),
-	  xte_node (xte_head ('Next'), sync_date_nokia (tnex))
-      );
-	}
+  {
+    xte_nodebld_acc (anch,
+    --xte_node (xte_head ('Last')),
+    xte_node (xte_head ('Next'), sync_date_nokia (tnex))
+    );
+  }
       else
-	{
-	  xte_nodebld_acc (anch,
-	  xte_node (xte_head ('Last'), sync_date_nokia (tlas)),
-	  xte_node (xte_head ('Next'), sync_date_nokia (tnex))
-	  );
+  {
+    xte_nodebld_acc (anch,
+    xte_node (xte_head ('Last'), sync_date_nokia (tlas)),
+    xte_node (xte_head ('Next'), sync_date_nokia (tnex))
+    );
         }
 
       xte_nodebld_final (anch, xte_head('Anchor', 'xmlns', 'syncml:metinf'));
@@ -1529,14 +1520,10 @@ create method sync_handle_alert (inout xt any, inout resp any)  for sync_cmd
     }
 
   if (self.state is null)
-  self.state := 200;
+    self.state := 200;
 }
 ;
 
-/*
---
-*/
-
 create procedure sync_handle_request (in _xdoc any, in path any) returns any
 {
   declare _hdr, _cmd, _cmds, _c, _rsphdr, _rspbody, commands, ret any;
@@ -1614,13 +1601,13 @@ create procedure sync_handle_request (in _xdoc any, in path any) returns any
       temp_tgt := get_keyword ('__self.tgt', batch.cmdstate, vector (''));
       i := 0; l := length (temp_src);
       while (i < l)
-	{
-	   out_cmd.src := temp_src[i];
-	   out_cmd.tgt := temp_tgt[i];
-	   out_cmd.batch := batch;
-	   out_cmd.sync_issue_sync (_xdoc, _rspbody);
-	   i := i + 1;
-	}
+  {
+     out_cmd.src := temp_src[i];
+     out_cmd.tgt := temp_tgt[i];
+     out_cmd.batch := batch;
+     out_cmd.sync_issue_sync (_xdoc, _rspbody);
+     i := i + 1;
+  }
     }
 
   if (batch.final is not null)
@@ -1629,9 +1616,9 @@ create procedure sync_handle_request (in _xdoc any, in path any) returns any
 --    dbg_obj_print ('--- To send ', batch.final);
       while (i < l)
         {
-  	  xte_nodebld_acc (_rspbody, batch.final[i]);
---  	  dbg_obj_print ('Added i = ', i);
-  	  i := i + 1;
+      xte_nodebld_acc (_rspbody, batch.final[i]);
+--      dbg_obj_print ('Added i = ', i);
+      i := i + 1;
         }
     }
 
@@ -1657,7 +1644,7 @@ create procedure sync_handle_request (in _xdoc any, in path any) returns any
 }
 ;
 
-create method sync_handle_final (inout xt any, inout resp any)  for sync_cmd
+create method sync_handle_final (inout xt any, inout resp any) for sync_cmd
 {
   --dbg_obj_print ('sync_handle_final');
 
@@ -1676,13 +1663,13 @@ create method sync_handle_final (inout xt any, inout resp any)  for sync_cmd
 
 create procedure DB.DBA.SYNCML (in path any, in params any, in lines any)
 {
-declare _accept varchar;
-declare _req varchar;
-declare _content_type, user_agent varchar;
-declare ver any;
+  declare _accept varchar;
+  declare _req varchar;
+  declare _content_type, user_agent varchar;
+  declare ver any;
 
-_accept := http_request_header (lines, 'Accept', null, '');
---dbg_printf ('Accept: [%s]', _accept);
+  _accept := http_request_header (lines, 'Accept', null, '');
+   -- dbg_printf ('Accept: [%s]', _accept);
 
 --if (1 <> adm_dav_check_auth (lines))
 --  {
@@ -1692,43 +1679,39 @@ _accept := http_request_header (lines, 'Accept', null, '');
 --    return (0);
 --  }
 
-_content_type := http_request_header (lines, 'Content-Type', null, '');
-user_agent := http_request_header (lines, 'User-Agent', null, '');
-connection_set ('ua_id', user_agent);
---  dbg_obj_print ('Content-Type: ', _content_type);
+  _content_type := http_request_header (lines, 'Content-Type', null, '');
+  user_agent := http_request_header (lines, 'User-Agent', null, '');
+  connection_set ('ua_id', user_agent);
+  --  dbg_obj_print ('Content-Type: ', _content_type);
 
-_req := string_output_string (http_body_read());
+  _req := string_output_string (http_body_read());
 --  dbg_obj_print ('Request: [%s]', _req);
 
-declare _xdoc any;
-if (_content_type = 'application/vnd.syncml+wbxml')
+  declare _xdoc any;
+
+  if (_content_type = 'application/vnd.syncml+wbxml')
   {
---  dbg_obj_print ('I', _req);
------------------------------------------------
     declare temp, sid, mid any;
     temp := WBXML2XML (_req);
     _xdoc := xtree_doc (temp, 0, '', 'utf-8');
 
     sid := cast(xpath_eval ('/SyncML/SyncHdr/SessionID/text()', _xdoc, 1) as varchar);
     mid := cast(xpath_eval ('/SyncML/SyncHdr/MsgID/text()', _xdoc, 1) as varchar);
----  DEBUG CODE XXX
     registry_set ('__sync_self_sid', sid);
     registry_set ('__sync_self_in_msgid', mid);
----
---  dbg_obj_print ('II', _xdoc);
     connection_set ('SyncML-media', 'wbxml');
     if (registry_get ('__sync_xml_debug') = '1')
-      {
-	string_to_file ('in_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.xml', temp, -1);
-	string_to_file ('in_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.sml', _req, -1);
-      }
+    {
+      string_to_file ('in_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.xml', temp, -1);
+      string_to_file ('in_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.sml', _req, -1);
+    }
   }
-else if (_content_type = 'application/vnd.syncml+xml')
+  else if (_content_type = 'application/vnd.syncml+xml')
   {
     _xdoc := xtree_doc (_req);
     connection_set ('SyncML-media', 'xml');
   }
-else
+  else
   {
     signal ('22023', 'Not supported media');-- XXX signal error here
   }
@@ -1737,64 +1720,56 @@ else
   if (ver like '_._')
     connection_set ('SyncML-ver', ver);
 
-declare _reply any;
-_reply := sync_handle_request (_xdoc, path);
+  declare _reply any;
+  _reply := sync_handle_request (_xdoc, path);
 -- XXX convert to wbxml if needed
 --dbg_obj_print (_reply);
-http_rewrite ();
+  http_rewrite ();
 
-http_header (sprintf ('Content-Type: %s\r\n', _content_type));
-http_header (http_header_get () || 'Accept-Charset: UTF-8\r\n');
-http_header (http_header_get () || 'Cache-Control: private\r\n');
-if (_content_type = 'application/vnd.syncml+wbxml')
+  http_header (sprintf ('Content-Type: %s\r\n', _content_type));
+  http_header (http_header_get () || 'Accept-Charset: UTF-8\r\n');
+  http_header (http_header_get () || 'Cache-Control: private\r\n');
+  if (_content_type = 'application/vnd.syncml+wbxml')
   {
-        declare _xt any;
-	declare xml_str any;
-	ver := coalesce (connection_get ('SyncML-ver'), '1.0');
-
-
-	_xt := xml_tree_doc (_reply);
-	xml_tree_doc_set_ns_output (_xt, 1);
-	xml_str := serialize_to_UTF8_xml (_xt);
-
-	if (ver='1.2')
-	   xml_str := '<?xml version="1.0"?>'||
-	   '<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.2//EN"'||
-	   ' "http://www.openmobilealliance.org/tech/DTD/OMA-TS-SyncML_RepPro_DTD-V1_2.dtd">'
-	   || xml_str;
-	else if (ver='1.1')
-	   xml_str := '<?xml version="1.0"?>'||
-	   '<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.1//EN" "http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd">'
-	   || xml_str;
-	else if (ver='1.0')
-	   xml_str := '<?xml version="1.0"?>'||
-	   '<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.0//EN" "http://www.syncml.org/docs/syncml_represent_v10_20001207.dtd">'
-	   || xml_str;
-
---	dbg_printf ('%s', xml_str);
-
-	_reply := XML2WBXML (xml_str);
-
-	if (registry_get ('__sync_xml_debug') = '1')
-	  {
-	    string_to_file ('out_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.xml', xml_str, -1);
-	    string_to_file ('out_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.sml', _reply, -1);
-	  }
-
---  dbg_obj_print (' length (_reply) = ', length (_reply));
-	http_rewrite ();
+    declare _xt any;
+    declare xml_str any;
+    ver := coalesce (connection_get ('SyncML-ver'), '1.0');
+    _xt := xml_tree_doc (_reply);
+    xml_tree_doc_set_ns_output (_xt, 1);
+    xml_str := serialize_to_UTF8_xml (_xt);
+
+    if (ver='1.2')
+      xml_str := '<?xml version="1.0"?>'||
+        '<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.2//EN"'||
+        ' "http://www.openmobilealliance.org/tech/DTD/OMA-TS-SyncML_RepPro_DTD-V1_2.dtd">'
+        || xml_str;
+    else if (ver='1.1')
+      xml_str := '<?xml version="1.0"?>'||
+        '<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.1//EN" "http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd">'
+        || xml_str;
+    else if (ver='1.0')
+      xml_str := '<?xml version="1.0"?>'||
+        '<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.0//EN" "http://www.syncml.org/docs/syncml_represent_v10_20001207.dtd">'
+        || xml_str;
+
+    _reply := XML2WBXML (xml_str);
+
+    if (registry_get ('__sync_xml_debug') = '1')
+    {
+      string_to_file ('out_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.xml', xml_str, -1);
+      string_to_file ('out_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.sml', _reply, -1);
+    }
+    http_rewrite ();
     http (_reply);
     return;
-
   }
-else
+  else
   {
     http ('<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n');
     if (registry_get ('__sync_xml_debug') = '1')
       string_to_file ('out_' || registry_get ('__sync_self_sid') || '_' || registry_get ('__sync_self_in_msgid') || '.xml', serialize_to_UTF8_xml(xml_tree_doc (_reply)), -1);
     _reply := xml_tree_doc (_reply);
     xml_tree_doc_set_ns_output (_reply, 1);
---  dbg_obj_print ('END:', _reply);
     http_value (_reply);
   }
 }
@@ -1803,45 +1778,46 @@ else
 create procedure sync_define_xsl ()
 {
   declare ses any;
+
   ses := string_output ();
-http ('<?xml version=\'1.0\'?>\n', ses);
-http ('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\n', ses);
-http ('    <xsl:output method="text" encoding="utf-8" omit-xml-declaration="yes"/>\n', ses);
-http ('    <xsl:param name="devinf"/>\n', ses);
-http ('    <xsl:param name="mime"/>\n', ses);
-http ('    <xsl:variable name="caps" select="$devinf/DevInf/CTCap[CTType[.=$mime]]"/>\n', ses);
-http ('    <xsl:variable name="ver" select="$devinf/DevInf/DataStore/Rx-Pref[CTType[.=$mime]]/VerCT|$devinf/DevInf/DataStore/Rx[CTType[.=$mime]]/VerCT"/>\n', ses);
-http ('    <xsl:template match="*">\n', ses);
-http ('	<xsl:variable name="localn" select="local-name()"/>\n', ses);
-http ('	<xsl:if test="not $caps or $caps/PropName[.=$localn]">\n', ses);
-http ('	    <xsl:value-of select="local-name ()"/>\n', ses);
-http ('	    <xsl:if test="@*">\n', ses);
-http ('		<xsl:text>;</xsl:text>\n', ses);
-http ('	    </xsl:if>\n', ses);
-http ('	    <xsl:for-each select="@*">\n', ses);
-http ('		<xsl:value-of select="local-name()"/>\n', ses);
-http ('		<xsl:if test=".!=\'\'">\n', ses);
-http ('		    <xsl:text>=</xsl:text><xsl:value-of select="."/>\n', ses);
-http ('		</xsl:if>\n', ses);
-http ('		<xsl:if test="position()!=last()">\n', ses);
-http ('		    <xsl:text>;</xsl:text>\n', ses);
-http ('		</xsl:if>\n', ses);
-http ('	    </xsl:for-each>\n', ses);
-http ('	    <xsl:text>:</xsl:text>\n', ses);
-http ('	    <xsl:choose>\n', ses);
-http ('		<xsl:when test="local-name() = \'VERSION\' and $ver != \'\'">\n', ses);
-http ('		    <xsl:value-of select="$ver"/>\n', ses);
-http ('		</xsl:when>\n', ses);
-http ('		<xsl:otherwise>\n', ses);
-http ('		    <xsl:value-of select="text()" />\n', ses);
-http ('		</xsl:otherwise>\n', ses);
-http ('	    </xsl:choose>\n', ses);
-http ('	    <xsl:text>
</xsl:text>\n', ses);
-http ('	</xsl:if>\n', ses);
-http ('	<xsl:apply-templates select="*"/>\n', ses);
-http ('    </xsl:template>\n', ses);
-http ('    <xsl:template match="text()"/>\n', ses);
-http ('</xsl:stylesheet>\n', ses);
+  http ('<?xml version=\'1.0\'?>\n', ses);
+  http ('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\n', ses);
+  http ('  <xsl:output method="text" encoding="utf-8" omit-xml-declaration="yes"/>\n', ses);
+  http ('  <xsl:param name="devinf"/>\n', ses);
+  http ('  <xsl:param name="mime"/>\n', ses);
+  http ('  <xsl:variable name="caps" select="$devinf/DevInf/CTCap[CTType[.=$mime]]"/>\n', ses);
+  http ('  <xsl:variable name="ver" select="$devinf/DevInf/DataStore/Rx-Pref[CTType[.=$mime]]/VerCT|$devinf/DevInf/DataStore/Rx[CTType[.=$mime]]/VerCT"/>\n', ses);
+  http ('  <xsl:template match="*">\n', ses);
+  http ('    <xsl:variable name="localn" select="local-name()"/>\n', ses);
+  http ('    <xsl:if test="not $caps or $caps/PropName[.=$localn]">\n', ses);
+  http ('      <xsl:value-of select="local-name ()"/>\n', ses);
+  http ('      <xsl:if test="@*">\n', ses);
+  http ('        <xsl:text>;</xsl:text>\n', ses);
+  http ('      </xsl:if>\n', ses);
+  http ('      <xsl:for-each select="@*">\n', ses);
+  http ('        <xsl:value-of select="local-name()"/>\n', ses);
+  http ('        <xsl:if test=".!=\'\'">\n', ses);
+  http ('          <xsl:text>=</xsl:text><xsl:value-of select="."/>\n', ses);
+  http ('        </xsl:if>\n', ses);
+  http ('        <xsl:if test="position()!=last()">\n', ses);
+  http ('          <xsl:text>;</xsl:text>\n', ses);
+  http ('        </xsl:if>\n', ses);
+  http ('      </xsl:for-each>\n', ses);
+  http ('      <xsl:text>:</xsl:text>\n', ses);
+  http ('      <xsl:choose>\n', ses);
+  http ('        <xsl:when test="local-name() = \'VERSION\' and $ver != \'\'">\n', ses);
+  http ('          <xsl:value-of select="$ver"/>\n', ses);
+  http ('        </xsl:when>\n', ses);
+  http ('        <xsl:otherwise>\n', ses);
+  http ('          <xsl:value-of select="text()" />\n', ses);
+  http ('        </xsl:otherwise>\n', ses);
+  http ('      </xsl:choose>\n', ses);
+  http ('      <xsl:text>
</xsl:text>\n', ses);
+  http ('    </xsl:if>\n', ses);
+  http ('    <xsl:apply-templates select="*"/>\n', ses);
+  http ('  </xsl:template>\n', ses);
+  http ('  <xsl:template match="text()"/>\n', ses);
+  http ('</xsl:stylesheet>\n', ses);
   xslt_sheet ('http://local.virt/sync_out_xsl', xml_tree_doc (string_output_string (ses)));
 }
 ;
@@ -1853,100 +1829,88 @@ sync_define_xsl ()
 create procedure sync_define_xml_to_pl ()
 {
   declare ses any;
+
   ses := string_output ();
- http ('  <?xml version="1.0"?>', ses);
- http ('  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">', ses);
- http ('      <xsl:output method="text" omit-xml-declaration="yes"/>', ses);
- http ('      <xsl:param name="id"/>', ses);
- http ('      <xsl:template match="/">', ses);
- http ('	  create procedure <xsl:value-of select="$id"/> (inout _node any, in store varchar) {', ses);
- http ('	  xte_nodebld_acc (_node,', ses);
- http ('	  		<xsl:apply-templates />', ses);
- http ('			   );', ses);
- http ('	  }', ses);
- http ('      </xsl:template>', ses);
- http ('      <xsl:template match="*">', ses);
- http ('  	    <xsl:text>xte_node (xte_head (''</xsl:text>', ses);
- http ('  	    <xsl:value-of select="local-name ()"/>', ses);
- http ('	    <xsl:text>''), </xsl:text>', ses);
- http ('	    <xsl:apply-templates />)', ses);
- http ('	  <xsl:if test=" following-sibling::* ">', ses);
- http ('	    ,', ses);
- http ('	</xsl:if>', ses);
- http ('      </xsl:template>', ses);
- http ('      <xsl:template match="DataStore/SourceRef">', ses);
- http ('  	    <xsl:text>xte_node (xte_head (''</xsl:text>', ses);
- http ('  	    <xsl:value-of select="local-name ()"/>', ses);
- http ('	    <xsl:text>''), </xsl:text>', ses);
- http ('	    store)', ses);
- http ('	  <xsl:if test="following-sibling::*">', ses);
- http ('	    ,', ses);
- http ('	</xsl:if>', ses);
- http ('      </xsl:template>', ses);
- http ('      <xsl:template match="text ()">', ses);
- http ('	  <xsl:if test="normalize-space (.) != ''''">', ses);
- http ('  	    ''<xsl:value-of select="."/>''', ses);
- http ('	</xsl:if>', ses);
- http ('      </xsl:template>', ses);
- http ('  </xsl:stylesheet>', ses);
- xslt_sheet ('http://local.virt/sync_xml_to_pl', xml_tree_doc (string_output_string (ses)));
+  http ('  <?xml version="1.0"?>', ses);
+  http ('  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">', ses);
+  http ('      <xsl:output method="text" omit-xml-declaration="yes"/>', ses);
+  http ('      <xsl:param name="id"/>', ses);
+  http ('      <xsl:template match="/">', ses);
+  http ('    create procedure <xsl:value-of select="$id"/> (inout _node any, in store varchar) {', ses);
+  http ('    xte_nodebld_acc (_node,', ses);
+  http ('        <xsl:apply-templates />', ses);
+  http ('         );', ses);
+  http ('    }', ses);
+  http ('      </xsl:template>', ses);
+  http ('      <xsl:template match="*">', ses);
+  http ('        <xsl:text>xte_node (xte_head (''</xsl:text>', ses);
+  http ('        <xsl:value-of select="local-name ()"/>', ses);
+  http ('      <xsl:text>''), </xsl:text>', ses);
+  http ('      <xsl:apply-templates />)', ses);
+  http ('    <xsl:if test=" following-sibling::* ">', ses);
+  http ('      ,', ses);
+  http ('  </xsl:if>', ses);
+  http ('      </xsl:template>', ses);
+  http ('      <xsl:template match="DataStore/SourceRef">', ses);
+  http ('        <xsl:text>xte_node (xte_head (''</xsl:text>', ses);
+  http ('        <xsl:value-of select="local-name ()"/>', ses);
+  http ('      <xsl:text>''), </xsl:text>', ses);
+  http ('      store)', ses);
+  http ('    <xsl:if test="following-sibling::*">', ses);
+  http ('      ,', ses);
+  http ('  </xsl:if>', ses);
+  http ('      </xsl:template>', ses);
+  http ('      <xsl:template match="text ()">', ses);
+  http ('    <xsl:if test="normalize-space (.) != ''''">', ses);
+  http ('        ''<xsl:value-of select="."/>''', ses);
+  http ('  </xsl:if>', ses);
+  http ('      </xsl:template>', ses);
+  http ('  </xsl:stylesheet>', ses);
+  xslt_sheet ('http://local.virt/sync_xml_to_pl', xml_tree_doc (string_output_string (ses)));
 }
 ;
 
 sync_define_xml_to_pl ()
 ;
 
-
-
-
-create procedure
-sync_date_nokia (in _date any)
+create procedure sync_date_nokia (in _date any)
 {
-   _date := replace (_date, '-', '', 3);
-   _date := replace (_date, ':', '', 2);
-   _date := "LEFT" (_date, 15) || 'Z';
-   return _date;
+  _date := replace (_date, '-', '', 3);
+  _date := replace (_date, ':', '', 2);
+  _date := "LEFT" (_date, 15) || 'Z';
+  return _date;
 }
 ;
 
-
-create procedure
-sync_create_col (in col_name varchar, in col_type varchar, in sync_ver varchar, in _user varchar,
-		 in _pass varchar, in custom_def_inf any := null)
+create procedure sync_create_col (in col_name varchar, in col_type varchar, in sync_ver varchar, in _user varchar, in _pass varchar, in custom_def_inf any := null)
 {
-   declare res, _name any;
-   declare _col_id any;
-
-   res := DAV_COL_CREATE (col_name, auth_uid=>_user, auth_pwd=>_pass, uid=>_user, permissions=>'110110000N');
-
-   if (res < 0 and res <> -3)
-      return res;
-
-   _col_id := DAV_SEARCH_ID (col_name, 'C');
+  declare res, _name any;
+  declare _col_id any;
 
-   select COL_NAME into _name from WS.WS.SYS_DAV_COL where COL_ID = _col_id;
-
-   if (res = -3)
-     {
-
-	insert soft SYNC_COLS_TYPES (CT_COL_ID, CT_NAME, CT_PATH, CT_TYPE, CT_VER, CT_DEV_INFO) values
-		(_col_id, _name, col_name, col_type, sync_ver, custom_def_inf);
-     }
-	else
+  res := DAV_COL_CREATE (col_name, auth_uid=>_user, auth_pwd=>_pass, uid=>_user, permissions=>'110110000N');
+  if (res < 0 and res <> -3)
+    return res;
 
-    insert soft SYNC_COLS_TYPES (CT_COL_ID, CT_NAME, CT_PATH, CT_TYPE, CT_VER, CT_DEV_INFO) values
-		(res, _name, col_name, col_type, sync_ver, custom_def_inf);
+  _col_id := DAV_SEARCH_ID (col_name, 'C');
 
-   return 1;
+  select COL_NAME into _name from WS.WS.SYS_DAV_COL where COL_ID = _col_id;
+  if (res = -3)
+  {
+    insert soft SYNC_COLS_TYPES (CT_COL_ID, CT_NAME, CT_PATH, CT_TYPE, CT_VER, CT_DEV_INFO)
+      values (_col_id, _name, col_name, col_type, sync_ver, custom_def_inf);
+  }
+  else
+  {
+    insert soft SYNC_COLS_TYPES (CT_COL_ID, CT_NAME, CT_PATH, CT_TYPE, CT_VER, CT_DEV_INFO)
+      values (res, _name, col_name, col_type, sync_ver, custom_def_inf);
+  }
+  return 1;
 }
 ;
 
-
-create procedure
-sync_datastore_vcard_12 (in _sourceref varchar)
+create procedure sync_datastore_vcard_12 (in _sourceref varchar)
 {
-
-return sprintf ('
+  return sprintf ('
 <DataStore>
   <SourceRef>%s</SourceRef>
   <DisplayName>Contacts</DisplayName>
@@ -2130,68 +2094,65 @@ return sprintf ('
 }
 ;
 
-create procedure
-sync_datastore_vcard_11 (in _sourceref varchar)
+create procedure sync_datastore_vcard_11 (in _sourceref varchar)
 {
-
-return sprintf ('
-            <DataStore>
-              <SourceRef>%s</SourceRef>
-              <Rx-Pref>
-                <CTType>text/x-vcard</CTType>
-                <VerCT>2.1</VerCT>
-              </Rx-Pref>
-              <Rx>
-                <CTType>text/vcard</CTType>
-                <VerCT>3.0</VerCT>
-              </Rx>
-              <Tx-Pref>
-                <CTType>text/x-vcard</CTType>
-                <VerCT>2.1</VerCT>
-              </Tx-Pref>
-              <Tx>
-                <CTType>text/vcard</CTType>
-                <VerCT>3.0</VerCT>
-              </Tx>
-              <SyncCap>
-                <SyncType>1</SyncType>
-                <SyncType>2</SyncType>
-              </SyncCap>
-            </DataStore>
-            <CTCap>
-              <CTType>text/x-vcard</CTType>
-              <PropName>BEGIN</PropName>
-              <ValEnum>VCARD</ValEnum>
-              <PropName>END</PropName>
-              <ValEnum>VCARD</ValEnum>
-              <PropName>VERSION</PropName>
-              <ValEnum>2.1</ValEnum>
-              <PropName>N</PropName>
-              <PropName>TITLE</PropName>
-              <PropName>CATEGORIES</PropName>
-              <PropName>CLASS</PropName>
-              <PropName>ORG</PropName>
-              <PropName>EMAIL</PropName>
-              <PropName>URL</PropName>
-              <PropName>TEL</PropName>
-              <ParamName>CELL</ParamName>
-              <ParamName>HOME</ParamName>
-              <ParamName>WORK</ParamName>
-              <ParamName>FAX</ParamName>
-              <ParamName>MODEM</ParamName>
-              <ParamName>VOICE</ParamName>
-              <PropName>ADR</PropName>
-              <PropName>BDAY</PropName>
-              <PropName>LABEL</PropName>
-              <PropName>LOGO</PropName>
-              <PropName>NOTE</PropName>
-              <PropName>PHOTO</PropName>
-              <PropName>REV</PropName>
-              <PropName>SOUND</PropName>
-              <PropName>UID</PropName>
-              <PropName>VERSION</PropName>
-            </CTCap>', _sourceref);
-
+  return sprintf ('
+<DataStore>
+  <SourceRef>%s</SourceRef>
+  <Rx-Pref>
+    <CTType>text/x-vcard</CTType>
+    <VerCT>2.1</VerCT>
+  </Rx-Pref>
+  <Rx>
+    <CTType>text/vcard</CTType>
+    <VerCT>3.0</VerCT>
+  </Rx>
+  <Tx-Pref>
+    <CTType>text/x-vcard</CTType>
+    <VerCT>2.1</VerCT>
+  </Tx-Pref>
+  <Tx>
+    <CTType>text/vcard</CTType>
+    <VerCT>3.0</VerCT>
+  </Tx>
+  <SyncCap>
+    <SyncType>1</SyncType>
+    <SyncType>2</SyncType>
+  </SyncCap>
+</DataStore>
+<CTCap>
+  <CTType>text/x-vcard</CTType>
+  <PropName>BEGIN</PropName>
+  <ValEnum>VCARD</ValEnum>
+  <PropName>END</PropName>
+  <ValEnum>VCARD</ValEnum>
+  <PropName>VERSION</PropName>
+  <ValEnum>2.1</ValEnum>
+  <PropName>N</PropName>
+  <PropName>TITLE</PropName>
+  <PropName>CATEGORIES</PropName>
+  <PropName>CLASS</PropName>
+  <PropName>ORG</PropName>
+  <PropName>EMAIL</PropName>
+  <PropName>URL</PropName>
+  <PropName>TEL</PropName>
+  <ParamName>CELL</ParamName>
+  <ParamName>HOME</ParamName>
+  <ParamName>WORK</ParamName>
+  <ParamName>FAX</ParamName>
+  <ParamName>MODEM</ParamName>
+  <ParamName>VOICE</ParamName>
+  <PropName>ADR</PropName>
+  <PropName>BDAY</PropName>
+  <PropName>LABEL</PropName>
+  <PropName>LOGO</PropName>
+  <PropName>NOTE</PropName>
+  <PropName>PHOTO</PropName>
+  <PropName>REV</PropName>
+  <PropName>SOUND</PropName>
+  <PropName>UID</PropName>
+  <PropName>VERSION</PropName>
+</CTCap>', _sourceref);
 }
 ;
 
@@ -2202,11 +2163,10 @@ return sprintf ('
 --            <PropName>DURATION</PropName>
 
 
-create procedure
-sync_datastore_vcalendar_11 (in _sourceref varchar)
+create procedure sync_datastore_vcalendar_11 (in _sourceref varchar)
 {
-  return
-'<DataStore>
+  return '
+<DataStore>
   <SourceRef>'||_sourceref||'</SourceRef>
   <DisplayName>'||_sourceref||'</DisplayName>
   <Rx-Pref>
@@ -2223,46 +2183,45 @@ sync_datastore_vcalendar_11 (in _sourceref varchar)
   </SyncCap>
 </DataStore>
 <CTCap>
-              <CTType>text/x-vcalendar</CTType>
-              <PropName>BEGIN</PropName>
+  <CTType>text/x-vcalendar</CTType>
+  <PropName>BEGIN</PropName>
   <ValEnum>VCALENDAR</ValEnum>
   <ValEnum>VEVENT</ValEnum>
   <ValEnum>VTODO</ValEnum>
-              <PropName>END</PropName>
+  <PropName>END</PropName>
   <ValEnum>VCALENDAR</ValEnum>
   <ValEnum>VEVENT</ValEnum>
   <ValEnum>VTODO</ValEnum>
   <PropName>VERSION</PropName>
   <ValEnum>1.0</ValEnum>
-              <PropName>ATTACH</PropName>
+  <PropName>ATTACH</PropName>
   <PropName>TZ</PropName>
   <PropName>LAST-MODIFIED</PropName>
-              <PropName>DCREATED</PropName>
+  <PropName>DCREATED</PropName>
   <PropName>CATEGORIES</PropName>
   <PropName>CLASS</PropName>
   <PropName>SUMMARY</PropName>
-              <PropName>DESCRIPTION</PropName>
+  <PropName>DESCRIPTION</PropName>
   <PropName>LOCATION</PropName>
-              <PropName>DTSTART</PropName>
+  <PropName>DTSTART</PropName>
   <PropName>DTEND</PropName>
   <PropName>ATTENDEE</PropName>
   <PropName>RRULE</PropName>
-              <PropName>EXDATE</PropName>
+  <PropName>EXDATE</PropName>
   <PropName>AALARM</PropName>
   <PropName>DALARM</PropName>
   <PropName>DUE</PropName>
-              <PropName>PRIORITY</PropName>
+  <PropName>PRIORITY</PropName>
   <PropName>STATUS</PropName>
-              <PropName>UID</PropName>
+  <PropName>UID</PropName>
 </CTCap>';
 }
 ;
 
-create procedure
-sync_datastore_vcalendar_12 (in _sourceref varchar)
+create procedure sync_datastore_vcalendar_12 (in _sourceref varchar)
 {
-  return
-'<DataStore>
+  return '
+<DataStore>
  <SourceRef>'|| _sourceref ||'</SourceRef>
  <Rx-Pref>
   <CTType>text/x-vcalendar</CTType>
@@ -2286,7 +2245,7 @@ sync_datastore_vcalendar_12 (in _sourceref varchar)
    <ValEnum>VEVENT</ValEnum>
   </Property>
   <Property>
-              <PropName>VERSION</PropName>
+   <PropName>VERSION</PropName>
    <ValEnum>1.0</ValEnum>
    <MaxOccur>1</MaxOccur>
   </Property>
@@ -2340,7 +2299,7 @@ sync_datastore_vcalendar_12 (in _sourceref varchar)
   <Property>
    <PropName>ATTENDEE</PropName>
   </Property>
-            </CTCap>
+ </CTCap>
  <SyncCap>
   <SyncType>1</SyncType>
   <SyncType>2</SyncType>
@@ -2349,121 +2308,97 @@ sync_datastore_vcalendar_12 (in _sourceref varchar)
 }
 ;
 
-
-create procedure
-sync_datastore_vcard_11_test (in _sourceref varchar)
+create procedure sync_datastore_vcard_11_test (in _sourceref varchar)
 {
-
-return sprintf ('
-            <DataStore>
-              <SourceRef/>
-              <Rx-Pref>
-                <CTType>text/x-vcard</CTType>
-                <VerCT>2.1</VerCT>
-              </Rx-Pref>
-              <Rx>
-                <CTType>text/vcard</CTType>
-                <VerCT>3.0</VerCT>
-              </Rx>
-              <Tx-Pref>
-                <CTType>text/x-vcard</CTType>
-                <VerCT>2.1</VerCT>
-              </Tx-Pref>
-              <Tx>
-                <CTType>text/vcard</CTType>
-                <VerCT>3.0</VerCT>
-              </Tx>
-              <SyncCap>
-                <SyncType>1</SyncType>
-                <SyncType>2</SyncType>
-              </SyncCap>
-            </DataStore>
+  return sprintf ('
+<DataStore>
+  <SourceRef/>
+  <Rx-Pref>
+    <CTType>text/x-vcard</CTType>
+    <VerCT>2.1</VerCT>
+  </Rx-Pref>
+  <Rx>
+    <CTType>text/vcard</CTType>
+    <VerCT>3.0</VerCT>
+  </Rx>
+  <Tx-Pref>
+    <CTType>text/x-vcard</CTType>
+    <VerCT>2.1</VerCT>
+  </Tx-Pref>
+  <Tx>
+    <CTType>text/vcard</CTType>
+    <VerCT>3.0</VerCT>
+  </Tx>
+  <SyncCap>
+    <SyncType>1</SyncType>
+    <SyncType>2</SyncType>
+  </SyncCap>
+</DataStore>
 ');
-
 }
 ;
 
-
-create procedure
-sync_xml_to_node (in _mode any, in _col_name any)
+create procedure sync_xml_to_node (in _mode any, in _col_name any)
 {
-   declare _xml, _xml_text, pl, id any;
-   declare res, mdta, dta, state, msg any;
-
---   dbg_obj_print ('+ + + + + + sync_xml_to_node _mode = ', _mode);
---   dbg_obj_print ('+ + + + + + sync_xml_to_node _col_name = ', _col_name);
-
-   _xml_text := 'select sync_datastore_' || _mode || '(?)';
+  declare _xml, _xml_text, pl, id any;
+  declare res, mdta, dta, state, msg any;
 
-   res := exec (_xml_text, state, msg, vector (_col_name), 0, mdta, dta);
+  _xml_text := 'select sync_datastore_' || _mode || '(?)';
 
-   _xml := dta[0][0];
+  res := exec (_xml_text, state, msg, vector (_col_name), 0, mdta, dta);
 
-   id := 'syncml_' || _col_name || '_' || _mode;
+  _xml := dta[0][0];
 
-   if (not xslt_is_sheet ('http://local.virt/sync_xml_to_pl'))
-	sync_define_xml_to_pl ();
-   pl := cast (xslt ('http://local.virt/sync_xml_to_pl', xml_tree_doc (_xml), vector ('id', id)) as varchar);
+  id := 'syncml_' || _col_name || '_' || _mode;
 
-   pl := replace (pl, '), )', '))');
-
---   dbg_obj_print ('+ + + + + + sync_xml_to_node pl = ', pl);
-
-   exec (pl);
-
-   return id;
+  if (not xslt_is_sheet ('http://local.virt/sync_xml_to_pl'))
+    sync_define_xml_to_pl ();
+  pl := cast (xslt ('http://local.virt/sync_xml_to_pl', xml_tree_doc (_xml), vector ('id', id)) as varchar);
+  pl := replace (pl, '), )', '))');
+  exec (pl);
+  return id;
 }
 ;
 
---DAV_MAKE_DIR ('/DAV/sync/', http_dav_uid (), null, '110110110N')
---;
-
---sync_create_col ('/DAV/sync/contacts/', 'vcard_11', '1.1', 'dav', 'dav')
---;
-
-create procedure DB.DBA.SYNC_GET_AUTH_TYPE (in devid any) { return 1; }
+create procedure DB.DBA.SYNC_GET_AUTH_TYPE (in devid any)
+{
+  return 1;
+}
 ;
 
-
-
 create procedure DB.DBA.SYNC_MAKE_DAV_DIR (in _type any, in _col_id any, in cname any, in full_path any, in sync_ver any)
 {
-   if (_type = 'N' or sync_ver = 'N')
-     return;
+  if (_type = 'N' or sync_ver = 'N')
+    return;
 
-   insert soft SYNC_COLS_TYPES (CT_COL_ID, CT_NAME, CT_PATH, CT_TYPE, CT_VER, CT_DEV_INFO) values
-		(_col_id, cname, full_path, _type, sync_ver, NULL);
+  insert soft SYNC_COLS_TYPES (CT_COL_ID, CT_NAME, CT_PATH, CT_TYPE, CT_VER, CT_DEV_INFO)
+    values (_col_id, cname, full_path, _type, sync_ver, NULL);
 }
 ;
 
 create procedure yac_syncml_detect (in _name any)
 {
-   declare ret any;
-
-   ret := equ(isstring (vad_check_version ('SyncML')), 1);
-
-   if (ret)
-     {
-        if (not exists (select 1 from DB.DBA.SYNC_COLS_TYPES where CT_PATH = _name))
-	  ret := 0;
-     }
+  declare ret any;
 
-   return ret;
+  ret := equ(isstring (vad_check_version ('SyncML')), 1);
+  if (ret)
+  {
+    if (not exists (select 1 from DB.DBA.SYNC_COLS_TYPES where CT_PATH = _name))
+      ret := 0;
+  }
+  return ret;
 }
 ;
 
-
 create procedure yac_syncml_type ()
 {
-   return vector('N', 'Off', 'vcard_11', 'vcard 11', 'vcard_12', 'vcard 12',
-       'vcalendar_11', 'vcalendar 11', 'vcalendar_12', 'vcalendar 12');
+  return vector('N', 'Off', 'vcard_11', 'vcard 11', 'vcard_12', 'vcard 12', 'vcalendar_11', 'vcalendar 11', 'vcalendar_12', 'vcalendar 12');
 }
 ;
 
-
 create procedure yac_syncml_version ()
 {
-   return vector('N', 'Off', '1.0', '1.0', '1.1', '1.1', '1.2', '1.2');
+  return vector('N', 'Off', '1.0', '1.0', '1.1', '1.1', '1.2', '1.2');
 }
 ;
 
@@ -2480,105 +2415,99 @@ create procedure yac_syncml_type_get (in _dir any)
 }
 ;
 
-
 create procedure yac_syncml_update_type (in sync_ver any, in sync_type any, in _ct_path any)
 {
-   update SYNC_COLS_TYPES set CT_VER = sync_ver, CT_TYPE = sync_type where CT_PATH = _ct_path;
+  update SYNC_COLS_TYPES set CT_VER = sync_ver, CT_TYPE = sync_type where CT_PATH = _ct_path;
 }
 ;
 
-
 create procedure sync_parse_in_data_get_prop (in _all any)
 {
-   declare len, idx, pos integer;
-   declare ret, part, _type varchar;
-
-   len := length (_all);
-   idx := 1;
-   _type := 0;
-   ret := '';
-
-   while (idx < len)
-     {
-	pos := strstr (_all[idx], '=');
-
-	if (pos is NULL)
-	  part := _all[idx] || '=""';
-        else
-	  part := replace (_all[idx], '=', '="') || '"';
+  declare len, idx, pos integer;
+  declare ret, part, _type varchar;
 
-        if (strstr (part, 'type=') is not NULL)
-	  _type := _type + 1;
+  len := length (_all);
+  idx := 1;
+  _type := 0;
+  ret := '';
+  while (idx < len)
+  {
+    pos := strstr (_all[idx], '=');
 
-	if (_type = 2) return ret;
+    if (pos is NULL)
+      part := _all[idx] || '=""';
+    else
+      part := replace (_all[idx], '=', '="') || '"';
 
-        if (part <> '=""')
-	  ret := ret || ' ' || part;
-	idx := idx + 1;
-     }
+    if (strstr (part, 'type=') is not NULL)
+      _type := _type + 1;
 
-   return ret;
+    if (_type = 2) return ret;
+    if (part <> '=""')
+      ret := ret || ' ' || part;
+    idx := idx + 1;
+  }
+  return ret;
 }
 ;
 
 syncml_exec_no_error ('
 create trigger SRLOG_SYS_DAV_RES_D after delete on WS.WS.SYS_DAV_RES
-  {
-    declare local_time datetime;
-    local_time := coalesce (connection_get (''A_LAST_LOCAL''), now ());
-    update SYNC_RPLOG set RLOG_RES_COL = RES_COL, DMLTYPE = ''D'', SNAPTIME = local_time
-    	where RLOG_RES_ID = RES_ID;
-  }
+{
+  declare local_time datetime;
+  local_time := coalesce (connection_get (''A_LAST_LOCAL''), now ());
+  update SYNC_RPLOG
+     set RLOG_RES_COL = RES_COL,
+         DMLTYPE = ''D'',
+         SNAPTIME = local_time
+   where RLOG_RES_ID = RES_ID;
+}
 ')
 ;
 
 create procedure sync_pars_mult (inout _body any)
 {
-   declare ret, _beg, t2, _end, _part, _name, _ibody, _old any;
-   _ibody := _body;
-   _body := replace (_body, '\n', '');
+  declare ret, _beg, t2, _end, _part, _name, _ibody, _old any;
 
-   ret := vector ();
+  _ibody := _body;
+  _body := replace (_body, '\n', '');
 
-   while (length (trim (_body)))
+  ret := vector ();
+  while (length (trim (_body)))
+  {
+    _beg := strstr (_body, '<BEGIN');
+    _end := strstr (_body, '/END>');
+    _old := length (trim (_body));
+
+    _part := subseq (_body, _beg, _end + 5);
+
+    t2 := xml_tree_doc ('<root>' || _part || '</root>');
+    _name := cast (xpath_eval ('//N', t2, 1) as varchar);
+    _name := replace (_name, ';', '_');
+    _name := replace (_name, '.', '_');
+    _name := trim (_name, '_');
+    if (_name = '')
+       _name := cast (xpath_eval ('//FN', t2, 1) as varchar);
+    _name := replace (_name, '.', '_');
+    _name := replace (_name, '?', '_');
+    _name := replace (_name, ' ', '+');
+    _name := trim (_name, '_');
+
+    if (_name = '' or _name is NULL)
+      _name := md5 (_ibody);
     {
-       _beg := strstr (_body, '<BEGIN');
-       _end := strstr (_body, '/END>');
-       _old := length (trim (_body));
-
-       _part := subseq (_body, _beg, _end + 5);
-
---     dbg_obj_print (_part);
---     dbg_obj_print (xml_tree_doc ('<root>' || _part || '</root>'));
---     dbg_obj_print (length (trim (_body)));
-       t2 := xml_tree_doc ('<root>' || _part || '</root>');
-       _name := cast (xpath_eval ('//N', t2, 1) as varchar);
-       _name := replace (_name, ';', '_');
-       _name := replace (_name, '.', '_');
-       _name := trim (_name, '_');
-       if (_name = '') _name := cast (xpath_eval ('//FN', t2, 1) as varchar);
-       _name := replace (_name, '.', '_');
-       _name := replace (_name, '?', '_');
-       _name := replace (_name, ' ', '+');
-       _name := trim (_name, '_');
-
-       if (_name = '' or _name is NULL) _name := md5 (_ibody);
---     string_to_file ('123/' || _name, _part, -2);
-
-	{;
-       declare exit handler for sqlstate '*'
-	{
-	   goto __next;
-	};
-	  xtree_doc (_part, 0, '', 'utf-8');
-	};
-
-       ret := vector_concat (ret, vector (vector (_part, _name)));
-__next:;
-       _body := replace (_body, _part, '');
-       if (_old = length (trim (_body))) return ret;
+      declare exit handler for sqlstate '*'
+      {
+         goto __next;
+      };
+      xtree_doc (_part, 0, '', 'utf-8');
     }
-
+    ret := vector_concat (ret, vector (vector (_part, _name)));
+__next:;
+    _body := replace (_body, _part, '');
+    if (_old = length (trim (_body)))
+      return ret;
+  }
   return ret;
 }
 ;
@@ -2586,15 +2515,15 @@ __next:;
 
 create procedure sync_pars_vcard_int (inout _body any)
 {
-   declare parsed, _xml, len, line, idx, pos, val, elm, prop any;
+  declare parsed, _xml, len, line, idx, pos, val, elm, prop any;
 
-   declare exit handler for sqlstate '*'
+  declare exit handler for sqlstate '*'
   {
-	return NULL;
-     };
+    return NULL;
+  };
 
-   if (1)
-     _body := sync_recode (cast (_body as varchar));
+  if (1)
+    _body := sync_recode (cast (_body as varchar));
 
   _xml := string_output ();
   _body := replace (_body, '\r\n', '\n');
@@ -2603,45 +2532,39 @@ create procedure sync_pars_vcard_int (inout _body any)
 
   len := length (parsed);
   idx := 0;
-
   while (idx < len)
+  {
+    line := split_and_decode (parsed[idx], 0, '\0\0:');
+    pos := strstr (parsed[idx], ':');
+    if (pos is not NULL)
     {
-       line := split_and_decode (parsed[idx], 0, '\0\0:');
-       pos := strstr (parsed[idx], ':');
-       if (pos is not NULL)
-	 {
-            val := subseq (parsed[idx], pos + 1, length (parsed[idx]));
-	    line := split_and_decode ("LEFT"(parsed[idx], pos), 0, '\0\0\;');
-	    --dbg_obj_print ('val = ', val);
-	    --dbg_obj_print ('line = ', line);
-	    if (val <> '' and upper (line[0]) in ('PHOTO', 'NOTE')) val := val || sync_parse_in_data_get_long (parsed, idx);
-	    elm := line[0];
-	    prop := sync_parse_in_data_get_prop (line);
-	    if (elm='AALARM' and strstr (val, 'mp3')) goto next;  -- Sony put full path and break sync.
-	    elm := replace (elm, '\n', '');
-	    if (upper (elm) <> 'BEGIN' and idx = 0)
-	      return NULL;
-	    http (sprintf ('<%s%s><![CDATA[%s]]></%s>\n', upper (elm), upper (prop), val, upper (elm)), _xml);
-	 }
-next:;
-       idx := idx + 1;
+      val := subseq (parsed[idx], pos + 1, length (parsed[idx]));
+      line := split_and_decode ("LEFT"(parsed[idx], pos), 0, '\0\0\;');
+      --dbg_obj_print ('val = ', val);
+      --dbg_obj_print ('line = ', line);
+      if (val <> '' and upper (line[0]) in ('PHOTO', 'NOTE')) val := val || sync_parse_in_data_get_long (parsed, idx);
+      elm := line[0];
+      prop := sync_parse_in_data_get_prop (line);
+      if (elm='AALARM' and strstr (val, 'mp3')) goto next;  -- Sony put full path and break sync.
+      elm := replace (elm, '\n', '');
+      if (upper (elm) <> 'BEGIN' and idx = 0)
+        return NULL;
+      http (sprintf ('<%s%s><![CDATA[%s]]></%s>\n', upper (elm), upper (prop), val, upper (elm)), _xml);
     }
-   return sync_pars_mult (string_output_string(_xml));
+  next:;
+    idx := idx + 1;
+  }
+  return sync_pars_mult (string_output_string(_xml));
 }
 ;
 
-create procedure
-sync_parse_in_data (in _data any, inout _mime any)
+create procedure sync_parse_in_data (in _data any, inout _mime any)
 --sync_parse_in_data (in _data any)
 {
   declare prop, elm, val varchar;
   declare idx, len, pos integer;
   declare _xml, parsed, line any;
 
-  --dbg_obj_print (cast (_data as varchar));
-  --dbg_obj_print (__tag (_data));
-  --dbg_obj_print ('===');
-
   _data := replace (_data, '\r\n', '\n');
   _data := replace (_data, '\r', '\n');
 
@@ -2653,159 +2576,151 @@ sync_parse_in_data (in _data any, inout _mime any)
   idx := 0;
 
   while (idx < len)
+  {
+    line := split_and_decode (parsed[idx], 0, '\0\0:');
+    pos := strstr (parsed[idx], ':');
+    if (pos is not NULL)
     {
-       line := split_and_decode (parsed[idx], 0, '\0\0:');
-       pos := strstr (parsed[idx], ':');
-       if (pos is not NULL)
-	 {
-            val := subseq (parsed[idx], pos + 1, length (parsed[idx]));
-	    line := split_and_decode ("LEFT"(parsed[idx], pos), 0, '\0\0\;');
-	    if (val <> '' and upper (line[0]) in ('PHOTO', 'NOTE')) val := val || sync_parse_in_data_get_long (parsed, idx);
-	    elm := line[0];
-	    --dbg_obj_print ('line[0] = ', line[0]);
-	    --dbg_obj_print ('val = ', val);
---	    if (elm='PHOTO' or elm='NOTE') goto next;
-	    prop := sync_parse_in_data_get_prop (line);
-	    if (elm='AALARM' and strstr (val, 'mp3')) goto next;  -- Sony put full path and break sync.
-	    if (upper (elm) = 'BEGIN' and idx = 0)
-	      {
-		if (upper (val) = 'VCARD') _mime := 'text/x-vcard';
-		else if (upper (val) = 'VNOTE') _mime := 'text/x-vnote';
-		else if (upper (val) = 'VCALENDAR') _mime := 'text/x-vcalendar';
-	      }
-	    if (upper (elm) <> 'BEGIN' and idx = 0)
-	      return NULL;
-	    http (sprintf ('<%s%s><![CDATA[%s]]></%s>\n', upper (elm), upper (prop), val, upper (elm)), _xml);
-	 }
-next:;
-       idx := idx + 1;
+      val := subseq (parsed[idx], pos + 1, length (parsed[idx]));
+      line := split_and_decode ("LEFT"(parsed[idx], pos), 0, '\0\0\;');
+      if (val <> '' and upper (line[0]) in ('PHOTO', 'NOTE'))
+        val := val || sync_parse_in_data_get_long (parsed, idx);
+      elm := line[0];
+      prop := sync_parse_in_data_get_prop (line);
+      if (elm='AALARM' and strstr (val, 'mp3'))
+        goto next;  -- Sony put full path and break sync.
+      if (upper (elm) = 'BEGIN' and idx = 0)
+      {
+         if (upper (val) = 'VCARD')
+           _mime := 'text/x-vcard';
+         else if (upper (val) = 'VNOTE')
+           _mime := 'text/x-vnote';
+         else if (upper (val) = 'VCALENDAR')
+           _mime := 'text/x-vcalendar';
+      }
+      if (upper (elm) <> 'BEGIN' and idx = 0)
+        return NULL;
+      http (sprintf ('<%s%s><![CDATA[%s]]></%s>\n', upper (elm), upper (prop), val, upper (elm)), _xml);
     }
-
+  next:;
+    idx := idx + 1;
+  }
   return (string_output_string(_xml));
 }
 ;
 
-
-create procedure
-sync_parse_in_data_get_long (in _all any, inout line integer)
+create procedure sync_parse_in_data_get_long (in _all any, inout line integer)
 {
-   declare ret varchar;
-   ret := '\n';
-   line := line + 1;
+  declare ret varchar;
 
-   while (trim (_all[line]) <> '')
-    {
-       ret := ret || _all[line] || '\n';
-       line := line + 1;
-    }
-   return ret;
+  ret := '\n';
+  line := line + 1;
+  while (trim (_all[line]) <> '')
+  {
+    ret := ret || _all[line] || '\n';
+    line := line + 1;
+  }
+  return ret;
 }
 ;
 
-
-create procedure
-sync_parse_in_data_note (in _all any, inout line integer)
+create procedure sync_parse_in_data_note (in _all any, inout line integer)
 {
-   declare ret varchar;
-   ret := '\n';
+  declare ret varchar;
 
-   while (trim (_all[line]) <> '')
-    {
-       ret := ret || _all[line] || '\n';
-       line := line + 1;
-    }
-   return ret;
+  ret := '\n';
+  while (trim (_all[line]) <> '')
+  {
+    ret := ret || _all[line] || '\n';
+    line := line + 1;
+  }
+  return ret;
 }
 ;
 
 create trigger SRLOG_SYS_DAV_RES_I after insert on WS.WS.SYS_DAV_RES order 190
 {
-    declare local_time datetime;
-    declare temp, mime, new_name, id, p_id, atm, idx, line, f_p any;
-    declare __rowguid any;
-    declare __res_type any;
-
-    __res_type := 'text/x-vcard';
-
-    if (not exists (select 1 from SYNC_COLS_TYPES where RES_COL = CT_COL_ID))
-	return;
+  declare local_time datetime;
+  declare temp, mime, new_name, id, p_id, atm, idx, line, f_p any;
+  declare __rowguid any;
+  declare __res_type any;
 
-    local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
+  __res_type := 'text/x-vcard';
 
-    atm := connection_get ('__ATM');
+  if (not exists (select 1 from SYNC_COLS_TYPES where RES_COL = CT_COL_ID))
+    return;
 
-    if (atm = RES_ID) return;
+  local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
 
-    if (connection_get ('__sync_dav_upl') = '1')
-	{
-	  insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
-	      values (RES_ID, RES_COL, 'I', local_time);
-	  return;
-	}
+  atm := connection_get ('__ATM');
+  if (atm = RES_ID)
+    return;
 
-    if ("LEFT" (RES_NAME, 1) = '.') return;
+  if (connection_get ('__sync_dav_upl') = '1')
+  {
+    insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
+      values (RES_ID, RES_COL, 'I', local_time);
+    return;
+  }
+  if ("LEFT" (RES_NAME, 1) = '.')
+    return;
 
-    if (not exists (select 1 from SYNC_COLS_TYPES where RES_COL = CT_COL_ID))
-	return;
+  if (not exists (select 1 from SYNC_COLS_TYPES where RES_COL = CT_COL_ID))
+    return;
 
-    __rowguid := ROWGUID;
+  __rowguid := ROWGUID;
 
-    local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
-    temp := RES_CONTENT;
+  local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
+  temp := RES_CONTENT;
 
-    if ("RIGHT" (RES_NAME, 4) = '.ics')
-      {
-         __res_type := 'text/x-vcalendar';
-         temp := sync_pars_ical_int (temp);
-      }
-    else
-      {
+  if ("RIGHT" (RES_NAME, 4) = '.ics')
+  {
+    __res_type := 'text/x-vcalendar';
+    temp := sync_pars_ical_int (temp);
+  }
+  else
+  {
     temp := sync_pars_vcard_int (temp);
-      }
-
-    if (temp is NULL)
-      return;
-
---	insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
---	    values (RES_ID, RES_COL, 'I', local_time);
-
-    for (idx := 0; idx < length (temp); idx := idx + 1)
-      {
-	line := temp[idx];
+  }
+  if (temp is NULL)
+    return;
 
-	--new_name := md5 (line) || uuid ();
-	new_name :=line[1];
+  for (idx := 0; idx < length (temp); idx := idx + 1)
+  {
+    line := temp[idx];
+    --new_name := md5 (line) || uuid ();
+    new_name := line[1];
 
-	id := WS.WS.GETID ('R');
-	p_id := RES_COL;
-	f_p  := RES_FULL_PATH;
-	f_p  := WS.WS.EXPAND_URL (f_p, new_name);
+    id := WS.WS.GETID ('R');
+    p_id := RES_COL;
+    f_p  := RES_FULL_PATH;
+    f_p  := WS.WS.EXPAND_URL (f_p, new_name);
 
-	set triggers off;
+    set triggers off;
 
-	connection_set ('__ATM', cast (id as varchar));
+    connection_set ('__ATM', cast (id as varchar));
 
-	if (length (line[0]) > 0)
-	 {
-        insert soft WS.WS.SYS_DAV_RES (RES_ID, RES_NAME, RES_COL, RES_CR_TIME, RES_MOD_TIME, RES_OWNER, RES_PERMS, RES_GROUP, RES_CONTENT, RES_TYPE, ROWGUID, RES_FULL_PATH)
- 	        values (id, new_name, p_id, now (), now (), 2, '111111111NN', http_nogroup_gid(), line[0], __res_type, __rowguid, f_p);
+    if (length (line[0]) > 0)
+    {
+      insert soft WS.WS.SYS_DAV_RES (RES_ID, RES_NAME, RES_COL, RES_CR_TIME, RES_MOD_TIME, RES_OWNER, RES_PERMS, RES_GROUP, RES_CONTENT, RES_TYPE, ROWGUID, RES_FULL_PATH)
+         values (id, new_name, p_id, now (), now (), 2, '111111111NN', http_nogroup_gid(), line[0], __res_type, __rowguid, f_p);
 
-	   insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
-	       values (id, p_id, 'I', local_time);
+      insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
+        values (id, p_id, 'I', local_time);
 
-        if (__proc_exists ('CAL.WA.syncml2entry'))
-        {
-          connection_set ('__sync_dav_upl', '1');
-          CAL.WA.syncml2entry (line[0], new_name, p_id);
-          connection_set ('__sync_dav_upl', '0');
-        }
-        if (__proc_exists ('AB.WA.syncml2entry'))
-        {
-          connection_set ('__sync_dav_upl', '1');
-          AB.WA.syncml2entry (line[0], new_name, p_id);
-          connection_set ('__sync_dav_upl', '0');
-        }
+      if (__proc_exists ('CAL.WA.syncml2entry'))
+      {
+        connection_set ('__sync_dav_upl', '1');
+        CAL.WA.syncml2entry (line[0], new_name, p_id);
+        connection_set ('__sync_dav_upl', '0');
       }
+      if (__proc_exists ('AB.WA.syncml2entry'))
+      {
+        connection_set ('__sync_dav_upl', '1');
+        AB.WA.syncml2entry (line[0], new_name, p_id);
+        connection_set ('__sync_dav_upl', '0');
+      }
+    }
   }
 }
 ;
@@ -2821,11 +2736,11 @@ create procedure sync_recode (inout _body any)
      return _body;
 
    declare exit handler for sqlstate '2C000'
-      {
-   	whenever SQLSTATE '2C000' default;
-        if (fl = 2) return _body;
-   	goto _next;
-     };
+   {
+     whenever SQLSTATE '2C000' default;
+     if (fl = 2) return _body;
+       goto _next;
+   };
 
    ret := charset_recode (cast (_body as varchar), 'UTF-16', 'UTF-8');
    return ret;
@@ -2835,10 +2750,9 @@ _next:;
    whenever SQLSTATE '*' default;
 
    declare exit handler for sqlstate '*'
-	 {
-	return _body;
-     };
-
+   {
+     return _body;
+   };
    fl := 2;
    ret := charset_recode (cast (_body as varchar), 'UTF-16BE', 'UTF-8');
    return ret;
@@ -2848,200 +2762,190 @@ _next:;
 
 create procedure sync_pars_ical_int (inout _body any)
 {
-   declare parsed, _xml, len, line, idx, pos, val, elm, prop any;
+  declare parsed, _xml, len, line, idx, pos, val, elm, prop any;
 
-   declare exit handler for sqlstate '*'
-     {
-	return NULL;
-     };
+  declare exit handler for sqlstate '*'
+  {
+    return NULL;
+  };
 
-   if (1)
-     _body := sync_recode (cast (_body as varchar));
+  if (1)
+    _body := sync_recode (cast (_body as varchar));
 
   _xml := string_output ();
   _body := replace (_body, '\r', '\n');
-   _body := replace (_body, '\n\n', '\n');
+  _body := replace (_body, '\n\n', '\n');
   parsed := split_and_decode (_body, 0, '\0\0\n');
 
 --  http (sprintf ('<BEGIN><![CDATA[VCALENDAR]]></BEGIN><VERSION><![CDATA[1.0]]></VERSION>'), _xml);
 
   len := length (parsed);
   idx := 0;
-
   while (idx < len)
+  {
+    line := split_and_decode (parsed[idx], 0, '\0\0:');
+    pos := strstr (parsed[idx], ':');
+    if (pos is not NULL)
     {
-       line := split_and_decode (parsed[idx], 0, '\0\0:');
-       pos := strstr (parsed[idx], ':');
-       if (pos is not NULL)
-	 {
-            val := subseq (parsed[idx], pos + 1, length (parsed[idx]));
-	    line := split_and_decode ("LEFT"(parsed[idx], pos), 0, '\0\0\;');
-	    --dbg_obj_print ('val = ', val);
-	    --dbg_obj_print ('line = ', line);
-	    if (val <> '' and upper (line[0]) in ('PHOTO', 'NOTE')) val := val || sync_parse_in_data_get_long (parsed, idx);
-	    elm := line[0];
-	    prop := sync_parse_in_data_get_prop (line);
-	    if (elm='AALARM' and strstr (val, 'mp3')) goto next;  -- Sony put full path and break sync.
-	    elm := replace (elm, '\n', '');
-	    if (upper (elm) <> 'BEGIN' and idx = 0)
-	      return NULL;
-	    prop := replace (prop, '""', '"');
-	    http (sprintf ('<%s%s><![CDATA[%s]]></%s>\n', upper (elm), upper (prop), val, upper (elm)), _xml);
-	 }
-next:;
-       idx := idx + 1;
+      val := subseq (parsed[idx], pos + 1, length (parsed[idx]));
+      line := split_and_decode ("LEFT"(parsed[idx], pos), 0, '\0\0\;');
+      --dbg_obj_print ('val = ', val);
+      --dbg_obj_print ('line = ', line);
+      if (val <> '' and upper (line[0]) in ('PHOTO', 'NOTE'))
+        val := val || sync_parse_in_data_get_long (parsed, idx);
+      elm := line[0];
+      prop := sync_parse_in_data_get_prop (line);
+      if (elm='AALARM' and strstr (val, 'mp3'))
+        goto next;  -- Sony put full path and break sync.
+      elm := replace (elm, '\n', '');
+      if (upper (elm) <> 'BEGIN' and idx = 0)
+        return NULL;
+      prop := replace (prop, '""', '"');
+      http (sprintf ('<%s%s><![CDATA[%s]]></%s>\n', upper (elm), upper (prop), val, upper (elm)), _xml);
     }
-
+  next:;
+    idx := idx + 1;
+  }
 --   http ('<END><![CDATA[VCALENDAR]]></END>', _xml);
 -- declare zzz any; zzz := string_output_string(_xml); string_to_file ('test.xml', '<a>' || zzz || '</a>', -2);
-
-   return sync_pars_mult_cal (string_output_string(_xml));
+  return sync_pars_mult_cal (string_output_string(_xml));
 }
 ;
 
 
 create procedure sync_pars_mult_cal (inout _body any)
 {
-   declare ret, _beg, t2, _end, _part, _p2, _name, _ibody, _old any;
-   _ibody := _body;
-   _body := replace (_body, '\n', '');
+  declare ret, _beg, t2, _end, _part, _p2, _name, _ibody, _old any;
 
-   ret := vector ();
+  _ibody := _body;
+  _body := replace (_body, '\n', '');
+  ret := vector ();
+  while (length (trim (_body)))
+  {
+    _beg := strstr (_body, '<BEGIN');
+    _beg := strstr (_body, '<BEGIN><![CDATA[VEVENT]]>');
+    if (_beg is null)
+      _beg := strstr (_body, '<BEGIN><![CDATA[VTODO]]>');
+    _body := subseq (_body, _beg);
+    _end := strstr (_body, '/END>');
+    _old := length (trim (_body));
+
+    _part := subseq (_body, 0, _end + 5);
+
+    t2 := xml_tree_doc ('<root>' || _part || '</root>');
+    _name := cast (xpath_eval ('//SUMMARY', t2, 1) as varchar);
+    _name := replace (_name, ';', '_');
+    _name := replace (_name, '.', '_');
+    _name := trim (_name, '_');
+    _name := replace (_name, '.', '_');
+    _name := replace (_name, '?', '_');
+    _name := replace (_name, ' ', '+');
+    _name := trim (_name, '_');
+    if (_name = '' or _name is NULL)
+      _name := md5 (_ibody);
 
-   while (length (trim (_body)))
     {
-       _beg := strstr (_body, '<BEGIN');
-       _beg := strstr (_body, '<BEGIN><![CDATA[VEVENT]]>');
-       if (_beg is null)
-         _beg := strstr (_body, '<BEGIN><![CDATA[VTODO]]>');
-       _body := subseq (_body, _beg);
-       _end := strstr (_body, '/END>');
-       _old := length (trim (_body));
-
-       _part := subseq (_body, 0, _end + 5);
-
-       t2 := xml_tree_doc ('<root>' || _part || '</root>');
-       _name := cast (xpath_eval ('//SUMMARY', t2, 1) as varchar);
-       _name := replace (_name, ';', '_');
-       _name := replace (_name, '.', '_');
-       _name := trim (_name, '_');
---       if (_name = '') _name := cast (xpath_eval ('//SUMMARY', t2, 1) as varchar);
-       _name := replace (_name, '.', '_');
-       _name := replace (_name, '?', '_');
-       _name := replace (_name, ' ', '+');
-       _name := trim (_name, '_');
-
-       if (_name = '' or _name is NULL) _name := md5 (_ibody);
---     string_to_file ('123/' || _name, _part, -2);
-
-	{;
-       declare exit handler for sqlstate '*'
-	      {
-	   goto __next;
-	};
-	  xtree_doc (_part, 0, '', 'utf-8');
-	};
-
-       _p2 := '<BEGIN><![CDATA[VCALENDAR]]></BEGIN><VERSION><![CDATA[1.0]]></VERSION>' || _part
-		|| '<END><![CDATA[VCALENDAR]]></END>';
-
-       ret := vector_concat (ret, vector (vector (_p2, _name)));
-__next:;
-       _body := replace (_body, _part, '');
-       if (_old = length (trim (_body))) return ret;
+      declare exit handler for sqlstate '*'
+      {
+        goto __next;
+      };
+      xtree_doc (_part, 0, '', 'utf-8');
     }
 
+    _p2 := '<BEGIN><![CDATA[VCALENDAR]]></BEGIN><VERSION><![CDATA[1.0]]></VERSION>' || _part || '<END><![CDATA[VCALENDAR]]></END>';
+    ret := vector_concat (ret, vector (vector (_p2, _name)));
+  __next:;
+    _body := replace (_body, _part, '');
+    if (_old = length (trim (_body)))
+      return ret;
+  }
   return ret;
 }
 ;
 
 create trigger SRLOG_SYS_DAV_RES_U after update on WS.WS.SYS_DAV_RES referencing old as O, new as N
 {
-    declare local_time datetime;
-    declare temp, mime, new_name, id, p_id, atm, idx, line, f_p any;
-    declare __rowguid any;
-    declare __res_type any;
-
-    if (not exists (select 1 from SYNC_COLS_TYPES where N.RES_COL = CT_COL_ID))
-      return;
-
-    __res_type := 'text/x-vcard';
-
-    local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
+  declare local_time datetime;
+  declare temp, mime, new_name, id, p_id, atm, idx, line, f_p any;
+  declare __rowguid any;
+  declare __res_type any;
 
-    atm := connection_get ('__ATU');
+  if (not exists (select 1 from SYNC_COLS_TYPES where N.RES_COL = CT_COL_ID))
+    return;
 
-    if (atm = N.RES_ID) return;
+  __res_type := 'text/x-vcard';
 
-    if (connection_get ('__sync_dav_upl') = '1')
-    {
-      update SYNC_RPLOG set RLOG_RES_COL = O.RES_COL, DMLTYPE = 'U', SNAPTIME = local_time where RLOG_RES_ID = O.RES_ID;
-	 return;
-     }
+  local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
 
-    if ("LEFT" (N.RES_NAME, 1) = '.') return;
+  atm := connection_get ('__ATU');
 
-    __rowguid := N.ROWGUID;
+  if (atm = N.RES_ID)
+    return;
 
-    local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
-    temp := N.RES_CONTENT;
-    if ("RIGHT" (N.RES_NAME, 4) = '.ics')
-      {
-         __res_type := 'text/x-vcalendar';
-         temp := sync_pars_ical_int (temp);
-      }
-    else
-      {
-         temp := sync_pars_vcard_int (temp);
-      }
+  if (connection_get ('__sync_dav_upl') = '1')
+  {
+    update SYNC_RPLOG set RLOG_RES_COL = O.RES_COL, DMLTYPE = 'U', SNAPTIME = local_time where RLOG_RES_ID = O.RES_ID;
+    return;
+  }
 
-    if (temp is NULL)
-      return;
+  if ("LEFT" (N.RES_NAME, 1) = '.')
+    return;
 
---    	   update SYNC_RPLOG set RLOG_RES_COL = O.RES_COL, DMLTYPE = 'U', SNAPTIME = local_time
---		where RLOG_RES_ID = O.RES_ID;
+  __rowguid := N.ROWGUID;
 
-    for (idx := 0; idx < length (temp); idx := idx + 1)
-    {
-	line := temp[idx];
+  local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
+  temp := N.RES_CONTENT;
+  if ("RIGHT" (N.RES_NAME, 4) = '.ics')
+  {
+    __res_type := 'text/x-vcalendar';
+    temp := sync_pars_ical_int (temp);
+  }
+  else
+  {
+    temp := sync_pars_vcard_int (temp);
+  }
+  if (temp is NULL)
+    return;
 
-	--new_name := md5 (line) || uuid ();
-	new_name :=line[1];
+  for (idx := 0; idx < length (temp); idx := idx + 1)
+  {
+    line := temp[idx];
 
-	id := WS.WS.GETID ('R');
-	p_id := N.RES_COL;
-	f_p  := N.RES_FULL_PATH;
-	f_p  := WS.WS.EXPAND_URL (f_p, new_name);
+    --new_name := md5 (line) || uuid ();
+    new_name :=line[1];
 
+    id := WS.WS.GETID ('R');
+    p_id := N.RES_COL;
+    f_p  := N.RES_FULL_PATH;
+    f_p  := WS.WS.EXPAND_URL (f_p, new_name);
 
-	set triggers off;
+    set triggers off;
 
-	connection_set ('__ATU', cast (id as varchar));
+    connection_set ('__ATU', cast (id as varchar));
 
-	if (length (line[0]) > 0)
-	 {
-    	  insert replacing WS.WS.SYS_DAV_RES (RES_ID, RES_NAME, RES_COL, RES_CR_TIME, RES_MOD_TIME, RES_OWNER, RES_PERMS, RES_GROUP, RES_CONTENT, RES_TYPE, ROWGUID, RES_FULL_PATH)
-    	    values (id, new_name, p_id, now (), now (), 2, '111111111', http_nogroup_gid(), line[0], __res_type, __rowguid, f_p);
+    if (length (line[0]) > 0)
+    {
+      insert replacing WS.WS.SYS_DAV_RES (RES_ID, RES_NAME, RES_COL, RES_CR_TIME, RES_MOD_TIME, RES_OWNER, RES_PERMS, RES_GROUP, RES_CONTENT, RES_TYPE, ROWGUID, RES_FULL_PATH)
+        values (id, new_name, p_id, now (), now (), 2, '111111111', http_nogroup_gid(), line[0], __res_type, __rowguid, f_p);
 
-    	local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
+      local_time := coalesce (connection_get ('A_LAST_LOCAL'), now ());
 
-	   insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
-	       values (id, N.RES_COL, 'U', local_time);
+      insert replacing SYNC_RPLOG (RLOG_RES_ID, RLOG_RES_COL, DMLTYPE, SNAPTIME)
+        values (id, N.RES_COL, 'U', local_time);
 
-        if (__proc_exists ('CAL.WA.syncml2entry'))
-        {
-          connection_set ('__sync_dav_upl', '1');
-          CAL.WA.syncml2entry (line[0], new_name, p_id);
-          connection_set ('__sync_dav_upl', '0');
-        }
-        if (__proc_exists ('AB.WA.syncml2entry'))
-        {
-          connection_set ('__sync_dav_upl', '1');
-          AB.WA.syncml2entry (line[0], new_name, p_id);
-          connection_set ('__sync_dav_upl', '0');
-        }
-	 }
+      if (__proc_exists ('CAL.WA.syncml2entry'))
+      {
+        connection_set ('__sync_dav_upl', '1');
+        CAL.WA.syncml2entry (line[0], new_name, p_id);
+        connection_set ('__sync_dav_upl', '0');
+      }
+      if (__proc_exists ('AB.WA.syncml2entry'))
+      {
+        connection_set ('__sync_dav_upl', '1');
+        AB.WA.syncml2entry (line[0], new_name, p_id);
+        connection_set ('__sync_dav_upl', '0');
+      }
     }
+  }
 }
 ;
-
diff --git a/binsrc/sync/syncml_drop.sql b/binsrc/sync/syncml_drop.sql
new file mode 100644
index 0000000..b36749f
--- /dev/null
+++ b/binsrc/sync/syncml_drop.sql
@@ -0,0 +1,69 @@
+--
+--  $Id: syncml_drop.sql,v 1.1.4.3 2012/03/08 12:55:06 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+
+-- Tables
+syncml_exec_no_error ('drop table DB.DBA.SYNC_SESSION');
+syncml_exec_no_error ('drop table DB.DBA.SYNC_RPLOG');
+syncml_exec_no_error ('drop table DB.DBA.SYNC_COLS_TYPES');
+syncml_exec_no_error ('drop table DB.DBA.SYNC_ANCHORS');
+syncml_exec_no_error ('drop table DB.DBA.SYNC_MAPS');
+syncml_exec_no_error ('drop table DB.DBA.SYNC_DEVICES');
+
+-- Triggers
+syncml_exec_no_error ('drop trigger WS.WS.SRLOG_SYS_DAV_RES_I');
+syncml_exec_no_error ('drop trigger WS.WS.SRLOG_SYS_DAV_RES_D');
+syncml_exec_no_error ('drop trigger WS.WS.SRLOG_SYS_DAV_RES_U');
+
+-- Types
+syncml_exec_no_error ('drop type DB.DBA.sync_batch');
+syncml_exec_no_error ('drop type DB.DBA.sync_cmd');
+
+-- Procedures
+syncml_exec_no_error ('drop procedure DB.DBA.sync_handle_request');
+syncml_exec_no_error ('drop procedure DB.DBA.SYNCML');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_define_xsl');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_define_xml_to_pl');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_date_nokia');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_create_col');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_datastore_vcard_12');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_datastore_vcard_11');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_datastore_vcalendar_11');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_datastore_vcalendar_12');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_datastore_vcard_11_test');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_xml_to_node');
+syncml_exec_no_error ('drop procedure DB.DBA.SYNC_GET_AUTH_TYPE');
+syncml_exec_no_error ('drop procedure DB.DBA.SYNC_MAKE_DAV_DIR');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_parse_in_data_get_prop');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_pars_mult');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_pars_vcard_int');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_parse_in_data');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_parse_in_data_get_long');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_parse_in_data_note');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_recode');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_pars_ical_int');
+syncml_exec_no_error ('drop procedure DB.DBA.sync_pars_mult_cal');
+syncml_exec_no_error ('drop procedure DB.DBA.yac_syncml_detect');
+syncml_exec_no_error ('drop procedure DB.DBA.yac_syncml_type');
+syncml_exec_no_error ('drop procedure DB.DBA.yac_syncml_version');
+syncml_exec_no_error ('drop procedure DB.DBA.yac_syncml_version_get');
+syncml_exec_no_error ('drop procedure DB.DBA.yac_syncml_type_get');
+syncml_exec_no_error ('drop procedure DB.DBA.yac_syncml_update_type');
diff --git a/binsrc/sync/wbxml.sql b/binsrc/sync/wbxml.sql
index b554f43..1ec7c6f 100644
--- a/binsrc/sync/wbxml.sql
+++ b/binsrc/sync/wbxml.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wbxml.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: wbxml.sql,v 1.2.2.1 2012/03/08 12:55:06 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/Makefile.am b/binsrc/tests/Makefile.am
index 4df0a17..2736231 100644
--- a/binsrc/tests/Makefile.am
+++ b/binsrc/tests/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/Makefile.in b/binsrc/tests/Makefile.in
index b250ed5..cc69e77 100644
--- a/binsrc/tests/Makefile.in
+++ b/binsrc/tests/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -343,6 +343,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -391,6 +392,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -442,6 +444,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -488,7 +491,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/b3078.c b/binsrc/tests/b3078.c
index a878bac..a45ed9b 100644
--- a/binsrc/tests/b3078.c
+++ b/binsrc/tests/b3078.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/Makefile.am b/binsrc/tests/biftest/Makefile.am
index 8d42379..b569944 100644
--- a/binsrc/tests/biftest/Makefile.am
+++ b/binsrc/tests/biftest/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/Makefile.in b/binsrc/tests/biftest/Makefile.in
index fb85177..518d2d6 100644
--- a/binsrc/tests/biftest/Makefile.in
+++ b/binsrc/tests/biftest/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -173,6 +173,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -221,6 +222,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -272,6 +274,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -318,7 +321,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/biftest/bif_sample.c b/binsrc/tests/biftest/bif_sample.c
index bec8e6c..ecabbb9 100644
--- a/binsrc/tests/biftest/bif_sample.c
+++ b/binsrc/tests/biftest/bif_sample.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/bif_sample_win32.c b/binsrc/tests/biftest/bif_sample_win32.c
index 140c229..b6e1160 100644
--- a/binsrc/tests/biftest/bif_sample_win32.c
+++ b/binsrc/tests/biftest/bif_sample_win32.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/bif_server.c b/binsrc/tests/biftest/bif_server.c
index b467939..9c6e413 100644
--- a/binsrc/tests/biftest/bif_server.c
+++ b/binsrc/tests/biftest/bif_server.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/import_clr.sql b/binsrc/tests/biftest/import_clr.sql
index 051bb01..08b18f5 100644
--- a/binsrc/tests/biftest/import_clr.sql
+++ b/binsrc/tests/biftest/import_clr.sql
@@ -1,10 +1,10 @@
 --
---  $Id: import_clr.sql,v 1.3.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: import_clr.sql,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/BpelVarsAdaptor.java b/binsrc/tests/biftest/java/BpelVarsAdaptor.java
index 7df1328..a2a385a 100644
--- a/binsrc/tests/biftest/java/BpelVarsAdaptor.java
+++ b/binsrc/tests/biftest/java/BpelVarsAdaptor.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/Restricted.java b/binsrc/tests/biftest/java/Restricted.java
index aa1673a..2c60533 100644
--- a/binsrc/tests/biftest/java/Restricted.java
+++ b/binsrc/tests/biftest/java/Restricted.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/Unrestricted.java b/binsrc/tests/biftest/java/Unrestricted.java
index 544f5ea..b40edff 100644
--- a/binsrc/tests/biftest/java/Unrestricted.java
+++ b/binsrc/tests/biftest/java/Unrestricted.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/__virt_access_granter.java b/binsrc/tests/biftest/java/__virt_access_granter.java
index 82ace35..edcf8f8 100644
--- a/binsrc/tests/biftest/java/__virt_access_granter.java
+++ b/binsrc/tests/biftest/java/__virt_access_granter.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/__virt_class_loader_r.java b/binsrc/tests/biftest/java/__virt_class_loader_r.java
index d6ccfb9..3bf074b 100644
--- a/binsrc/tests/biftest/java/__virt_class_loader_r.java
+++ b/binsrc/tests/biftest/java/__virt_class_loader_r.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/__virt_class_loader_ur.java b/binsrc/tests/biftest/java/__virt_class_loader_ur.java
index 8ae2f29..86d104c 100644
--- a/binsrc/tests/biftest/java/__virt_class_loader_ur.java
+++ b/binsrc/tests/biftest/java/__virt_class_loader_ur.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java/__virt_helper.java b/binsrc/tests/biftest/java/__virt_helper.java
index 1b1c37c..6b6db26 100644
--- a/binsrc/tests/biftest/java/__virt_helper.java
+++ b/binsrc/tests/biftest/java/__virt_helper.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java_code.c b/binsrc/tests/biftest/java_code.c
index 07aa2f0..3d27d6d 100644
--- a/binsrc/tests/biftest/java_code.c
+++ b/binsrc/tests/biftest/java_code.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java_skel.c b/binsrc/tests/biftest/java_skel.c
index f200b59..a6ca45f 100644
--- a/binsrc/tests/biftest/java_skel.c
+++ b/binsrc/tests/biftest/java_skel.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/java_to_c.awk b/binsrc/tests/biftest/java_to_c.awk
index 1a24d03..8399ac2 100644
--- a/binsrc/tests/biftest/java_to_c.awk
+++ b/binsrc/tests/biftest/java_to_c.awk
@@ -1,11 +1,11 @@
 BEGIN {
 #
-#  $Id: java_to_c.awk,v 1.1.1.1.2.1 2009/04/20 21:14:00 source Exp $
+#  $Id: java_to_c.awk,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/javavm.c b/binsrc/tests/biftest/javavm.c
index b5bcee5..854d967 100644
--- a/binsrc/tests/biftest/javavm.c
+++ b/binsrc/tests/biftest/javavm.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/javavm_pl.xsl b/binsrc/tests/biftest/javavm_pl.xsl
index 793ce44..b220928 100644
--- a/binsrc/tests/biftest/javavm_pl.xsl
+++ b/binsrc/tests/biftest/javavm_pl.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: javavm_pl.xsl,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+ -  $Id: javavm_pl.xsl,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/javavm_type.xsl b/binsrc/tests/biftest/javavm_type.xsl
index 0a0b329..be967e8 100644
--- a/binsrc/tests/biftest/javavm_type.xsl
+++ b/binsrc/tests/biftest/javavm_type.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: javavm_type.xsl,v 1.3.2.1 2009/04/20 21:14:00 source Exp $
+ -  $Id: javavm_type.xsl,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/javavm_xml.sql b/binsrc/tests/biftest/javavm_xml.sql
index b0ef325..f10d478 100644
--- a/binsrc/tests/biftest/javavm_xml.sql
+++ b/binsrc/tests/biftest/javavm_xml.sql
@@ -1,10 +1,10 @@
 --
---  $Id: javavm_xml.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: javavm_xml.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/javavm_xml2.sql b/binsrc/tests/biftest/javavm_xml2.sql
index e96465a..3a74399 100644
--- a/binsrc/tests/biftest/javavm_xml2.sql
+++ b/binsrc/tests/biftest/javavm_xml2.sql
@@ -1,10 +1,10 @@
 --
---  $Id: javavm_xml2.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: javavm_xml2.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/javavm_xml3.sql b/binsrc/tests/biftest/javavm_xml3.sql
index 7f87904..7d8e474 100644
--- a/binsrc/tests/biftest/javavm_xml3.sql
+++ b/binsrc/tests/biftest/javavm_xml3.sql
@@ -1,10 +1,10 @@
 --
---  $Id: javavm_xml3.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: javavm_xml3.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/lang_sample.c b/binsrc/tests/biftest/lang_sample.c
index b8f8820..69b8f95 100644
--- a/binsrc/tests/biftest/lang_sample.c
+++ b/binsrc/tests/biftest/lang_sample.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/sql_code_clr.c b/binsrc/tests/biftest/sql_code_clr.c
index edb4545..93b7dd2 100644
--- a/binsrc/tests/biftest/sql_code_clr.c
+++ b/binsrc/tests/biftest/sql_code_clr.c
@@ -1151,23 +1151,25 @@ static const char *proc24 =
 #define isp_schema(x) isp_schema_1(x)
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/binsrc/tests/biftest/sql_code_javavm.c b/binsrc/tests/biftest/sql_code_javavm.c
index 9bf96e0..7a0cff3 100644
--- a/binsrc/tests/biftest/sql_code_javavm.c
+++ b/binsrc/tests/biftest/sql_code_javavm.c
@@ -678,23 +678,25 @@ static const char *proc11 =
 #define isp_schema(x) isp_schema_1(x)
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/binsrc/tests/biftest/sql_code_xslt.c b/binsrc/tests/biftest/sql_code_xslt.c
index 1a97988..9837065 100644
--- a/binsrc/tests/biftest/sql_code_xslt.c
+++ b/binsrc/tests/biftest/sql_code_xslt.c
@@ -10,12 +10,12 @@ static const char *xsl1[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: javavm_type.xsl,v 1.3.2.1 2009/04/20 21:14:00 source Exp $\n"
+" -  $Id: javavm_type.xsl,v 1.3.2.2 2012/03/08 12:55:06 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -184,23 +184,25 @@ static query_t *xslt_define_qr;
   }
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/binsrc/tests/biftest/tests/Point.java b/binsrc/tests/biftest/tests/Point.java
index 8f43b78..618f10c 100644
--- a/binsrc/tests/biftest/tests/Point.java
+++ b/binsrc/tests/biftest/tests/Point.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/Point_src.aspx b/binsrc/tests/biftest/tests/Point_src.aspx
index d669e2d..dbd19c8 100644
--- a/binsrc/tests/biftest/tests/Point_src.aspx
+++ b/binsrc/tests/biftest/tests/Point_src.aspx
@@ -1,12 +1,12 @@
 <%@ Page Language="C#" Debug="true" %>
 <!--
  -
- -  $Id: Point_src.aspx,v 1.1.1.1.2.1 2009/04/20 21:14:00 source Exp $
+ -  $Id: Point_src.aspx,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/Write_no.java b/binsrc/tests/biftest/tests/Write_no.java
index c472dc3..d168620 100644
--- a/binsrc/tests/biftest/tests/Write_no.java
+++ b/binsrc/tests/biftest/tests/Write_no.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/Write_yes.java b/binsrc/tests/biftest/tests/Write_yes.java
index 70d90c0..28b8d06 100644
--- a/binsrc/tests/biftest/tests/Write_yes.java
+++ b/binsrc/tests/biftest/tests/Write_yes.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/java_ts.sql b/binsrc/tests/biftest/tests/java_ts.sql
index 77c7326..1ad12d5 100644
--- a/binsrc/tests/biftest/tests/java_ts.sql
+++ b/binsrc/tests/biftest/tests/java_ts.sql
@@ -1,10 +1,10 @@
 --
---  $Id: java_ts.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: java_ts.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/java_ts2.sql b/binsrc/tests/biftest/tests/java_ts2.sql
index 704ff61..b6c5e3c 100644
--- a/binsrc/tests/biftest/tests/java_ts2.sql
+++ b/binsrc/tests/biftest/tests/java_ts2.sql
@@ -1,10 +1,10 @@
 --
---  $Id: java_ts2.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: java_ts2.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/java_ts3.sql b/binsrc/tests/biftest/tests/java_ts3.sql
index a03af1d..be36254 100644
--- a/binsrc/tests/biftest/tests/java_ts3.sql
+++ b/binsrc/tests/biftest/tests/java_ts3.sql
@@ -1,10 +1,10 @@
 --
---  $Id: java_ts3.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: java_ts3.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/my_finances.java b/binsrc/tests/biftest/tests/my_finances.java
index 3a051f9..7bbbdf6 100644
--- a/binsrc/tests/biftest/tests/my_finances.java
+++ b/binsrc/tests/biftest/tests/my_finances.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/test_tax_java.sql b/binsrc/tests/biftest/tests/test_tax_java.sql
index 0688aa1..d65fec6 100644
--- a/binsrc/tests/biftest/tests/test_tax_java.sql
+++ b/binsrc/tests/biftest/tests/test_tax_java.sql
@@ -1,10 +1,10 @@
 --
---  $Id: test_tax_java.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: test_tax_java.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/testsuite.java b/binsrc/tests/biftest/tests/testsuite.java
index 963b54c..407d8a4 100644
--- a/binsrc/tests/biftest/tests/testsuite.java
+++ b/binsrc/tests/biftest/tests/testsuite.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/testsuite_base.java b/binsrc/tests/biftest/tests/testsuite_base.java
index 39cc862..8d43903 100644
--- a/binsrc/tests/biftest/tests/testsuite_base.java
+++ b/binsrc/tests/biftest/tests/testsuite_base.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/testsuite_ns.java b/binsrc/tests/biftest/tests/testsuite_ns.java
index ebd5640..ed1e373 100644
--- a/binsrc/tests/biftest/tests/testsuite_ns.java
+++ b/binsrc/tests/biftest/tests/testsuite_ns.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/tests/tjavavm.sh b/binsrc/tests/biftest/tests/tjavavm.sh
index dc1c4f9..b39dd51 100755
--- a/binsrc/tests/biftest/tests/tjavavm.sh
+++ b/binsrc/tests/biftest/tests/tjavavm.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tjavavm.sh,v 1.1.1.1.2.1 2009/04/20 21:14:00 source Exp $
+#  $Id: tjavavm.sh,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
 #
 #  Database recovery tests
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/thook.sh b/binsrc/tests/biftest/thook.sh
index 5c190dc..da38ed8 100755
--- a/binsrc/tests/biftest/thook.sh
+++ b/binsrc/tests/biftest/thook.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: thook.sh,v 1.3.2.1 2009/04/20 21:14:00 source Exp $
+#  $Id: thook.sh,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/thook.sql b/binsrc/tests/biftest/thook.sql
index a76a41a..2a63ce2 100644
--- a/binsrc/tests/biftest/thook.sql
+++ b/binsrc/tests/biftest/thook.sql
@@ -1,10 +1,10 @@
 --
---  $Id: thook.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: thook.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/thook1.sql b/binsrc/tests/biftest/thook1.sql
index 018710a..bdf0a0e 100644
--- a/binsrc/tests/biftest/thook1.sql
+++ b/binsrc/tests/biftest/thook1.sql
@@ -1,10 +1,10 @@
 --
---  $Id: thook1.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: thook1.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/thook2.sql b/binsrc/tests/biftest/thook2.sql
index 0532289..b40b5e7 100644
--- a/binsrc/tests/biftest/thook2.sql
+++ b/binsrc/tests/biftest/thook2.sql
@@ -1,10 +1,10 @@
 --
---  $Id: thook2.sql,v 1.2.2.1 2009/04/20 21:14:00 source Exp $
+--  $Id: thook2.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/biftest/win32.mk b/binsrc/tests/biftest/win32.mk
index 0d3a8da..25c4662 100644
--- a/binsrc/tests/biftest/win32.mk
+++ b/binsrc/tests/biftest/win32.mk
@@ -1,10 +1,10 @@
 #
-#  $Id: win32.mk,v 1.1.1.1.2.2 2010/01/29 16:18:03 source Exp $
+#  $Id: win32.mk,v 1.1.1.1.2.3 2012/03/08 12:55:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/blobnulls.c b/binsrc/tests/blobnulls.c
index 459c701..0732fd1 100644
--- a/binsrc/tests/blobnulls.c
+++ b/binsrc/tests/blobnulls.c
@@ -1,14 +1,14 @@
 /*
  *  blobnulls.c
  *
- *  $Id: blobnulls.c,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: blobnulls.c,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Test for BLOBS with NULL values passed in PutData
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/blobs.c b/binsrc/tests/blobs.c
index 38dd9de..eeb9307 100644
--- a/binsrc/tests/blobs.c
+++ b/binsrc/tests/blobs.c
@@ -1,14 +1,14 @@
 /*
  *  blobs.c
  *
- *  $Id: blobs.c,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: blobs.c,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  BLOBS test
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/blobs2.c b/binsrc/tests/blobs2.c
index 627ef62..a5abed6 100644
--- a/binsrc/tests/blobs2.c
+++ b/binsrc/tests/blobs2.c
@@ -1,14 +1,14 @@
 /*
  *  blobs.c
  *
- *  $Id: blobs2.c,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: blobs2.c,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  BLOBS test
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/bsbm/Makefile.am b/binsrc/tests/bsbm/Makefile.am
index b3cadaa..b8054e6 100644
--- a/binsrc/tests/bsbm/Makefile.am
+++ b/binsrc/tests/bsbm/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/bsbm/Makefile.in b/binsrc/tests/bsbm/Makefile.in
index dce12fe..0ff1c33 100644
--- a/binsrc/tests/bsbm/Makefile.in
+++ b/binsrc/tests/bsbm/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/bsbm/run_javac.sh b/binsrc/tests/bsbm/run_javac.sh
index 47f0443..e1f2569 100755
--- a/binsrc/tests/bsbm/run_javac.sh
+++ b/binsrc/tests/bsbm/run_javac.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: run_javac.sh,v 1.3 2009/04/14 12:16:49 source Exp $
+#  $Id: run_javac.sh,v 1.3.2.1 2012/03/08 12:55:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/bsbm/run_test.sh b/binsrc/tests/bsbm/run_test.sh
index fb965f6..3406974 100755
--- a/binsrc/tests/bsbm/run_test.sh
+++ b/binsrc/tests/bsbm/run_test.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: run_test.sh,v 1.6 2009/04/14 12:16:49 source Exp $
+#  $Id: run_test.sh,v 1.6.2.1 2012/03/08 12:55:06 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/burstoff.c b/binsrc/tests/burstoff.c
index b34c930..7cba20b 100644
--- a/binsrc/tests/burstoff.c
+++ b/binsrc/tests/burstoff.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/butils.h b/binsrc/tests/butils.h
index a118b6d..81b1fd9 100644
--- a/binsrc/tests/butils.h
+++ b/binsrc/tests/butils.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/chil.c b/binsrc/tests/chil.c
index fe504c3..be831c2 100644
--- a/binsrc/tests/chil.c
+++ b/binsrc/tests/chil.c
@@ -1,14 +1,14 @@
 /*
  *  chil.c
  *
- *  $Id: chil.c,v 1.5.2.2 2009/05/14 18:32:25 source Exp $
+ *  $Id: chil.c,v 1.5.2.4 2012/03/08 12:55:06 source Exp $
  *
  *  Server main
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -41,6 +41,7 @@
 #include <sqlnode.h>
 #include "wiservic.h"		/* Needed also in Unix builds. Includes wi.h. */
 #include "sqlver.h"
+#include "wi.h"
 
 #if defined(__GNUC__) && __GNUC__ == 3 && (__GNUC_MINOR__ == 0 || __GNUC_MINOR__ == 1)
 /* When compiling with optimization printf is defined as a macro and
@@ -54,6 +55,7 @@
 
 char *f_config_file = "wi.cfg";
 char *f_license_file = NULL;
+PCONFIG pconfig = NULL;
 int f_read_from_rebuilt_database = 0;
 dk_session_t *listening;
 extern unsigned long int cfg_autocheckpoint;	/* Defined in disk.c */
diff --git a/binsrc/tests/cursor.c b/binsrc/tests/cursor.c
index 56a2c57..4cd43f7 100644
--- a/binsrc/tests/cursor.c
+++ b/binsrc/tests/cursor.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: cursor.c,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: cursor.c,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/davperf.sql b/binsrc/tests/davperf.sql
index 04e0127..aeece5d 100644
--- a/binsrc/tests/davperf.sql
+++ b/binsrc/tests/davperf.sql
@@ -1,10 +1,10 @@
 --
---  $Id: davperf.sql,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+--  $Id: davperf.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dbdump.c b/binsrc/tests/dbdump.c
index b599bb9..9c97ea7 100644
--- a/binsrc/tests/dbdump.c
+++ b/binsrc/tests/dbdump.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: dbdump.c,v 1.5.2.2 2009/05/14 18:32:25 source Exp $
+ *  $Id: dbdump.c,v 1.5.2.3 2012/03/08 12:55:06 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/Makefile.am b/binsrc/tests/dotnet/Makefile.am
index 820aa06..c9953d8 100644
--- a/binsrc/tests/dotnet/Makefile.am
+++ b/binsrc/tests/dotnet/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/Makefile.in b/binsrc/tests/dotnet/Makefile.in
index 3826a74..d73992f 100644
--- a/binsrc/tests/dotnet/Makefile.in
+++ b/binsrc/tests/dotnet/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/dotnet/Test.cs b/binsrc/tests/dotnet/Test.cs
index 22d7bd1..414e0ea 100644
--- a/binsrc/tests/dotnet/Test.cs
+++ b/binsrc/tests/dotnet/Test.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: Test.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: Test.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/AssemblyInfo.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/AssemblyInfo.cs
index e336d90..65c90ed 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/AssemblyInfo.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/AssemblyInfo.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: AssemblyInfo.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: AssemblyInfo.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/BlobTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/BlobTest.cs
index 2e50eff..720f29f 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/BlobTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/BlobTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: BlobTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: BlobTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/CommandBuilderTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/CommandBuilderTest.cs
index 9801451..3d6c541 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/CommandBuilderTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/CommandBuilderTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: CommandBuilderTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: CommandBuilderTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/CommandTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/CommandTest.cs
index a086037..c13d4f2 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/CommandTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/CommandTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: CommandTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: CommandTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/ConnectionTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/ConnectionTest.cs
index a792531..ad3f297 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/ConnectionTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/ConnectionTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: ConnectionTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: ConnectionTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/DtcTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/DtcTest.cs
index 0ccc437..8de5399 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/DtcTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/DtcTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: DtcTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: DtcTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/SqlServer.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/SqlServer.cs
index f366eb5..18a0661 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/SqlServer.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/SqlServer.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: SqlServer.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: SqlServer.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/SqlXmlTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/SqlXmlTest.cs
index 7f1d3e9..4b3ff5f 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/SqlXmlTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/SqlXmlTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: SqlXmlTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: SqlXmlTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/TimeoutTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/TimeoutTest.cs
index 8b2f072..a4343a1 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/TimeoutTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/TimeoutTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TimeoutTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TimeoutTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/TransactionTest.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/TransactionTest.cs
index d9ec6b0..c82f341 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/TransactionTest.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/TransactionTest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TransactionTest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TransactionTest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoClientSuite.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoClientSuite.cs
index 98c18f8..a6292b3 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoClientSuite.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoClientSuite.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: VirtuosoClientSuite.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: VirtuosoClientSuite.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoDtcSuite.cs b/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoDtcSuite.cs
index 9dcf148..9492958 100644
--- a/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoDtcSuite.cs
+++ b/binsrc/tests/dotnet/VirtuosoClientSuite/VirtuosoDtcSuite.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: VirtuosoDtcSuite.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: VirtuosoDtcSuite.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/AssemblyInfo.cs b/binsrc/tests/dotnet/harness/AssemblyInfo.cs
index c0dc3fa..0ecb81d 100644
--- a/binsrc/tests/dotnet/harness/AssemblyInfo.cs
+++ b/binsrc/tests/dotnet/harness/AssemblyInfo.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: AssemblyInfo.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: AssemblyInfo.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ComparisonException.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ComparisonException.cs
index 857b070..42bcf46 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ComparisonException.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ComparisonException.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: ComparisonException.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: ComparisonException.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITest.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITest.cs
index c09c8f6..9e52c86 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITest.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITest.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: ITest.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: ITest.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITestListener.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITestListener.cs
index da41823..b2053c7 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITestListener.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/ITestListener.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: ITestListener.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: ITestListener.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCase.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCase.cs
index 3bc8404..d8e0618 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCase.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCase.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestCase.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestCase.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseAttribute.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseAttribute.cs
index 6f1e4f4..1e8b7a9 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseAttribute.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseAttribute.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestCaseAttribute.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestCaseAttribute.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseResult.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseResult.cs
index be11a96..03bd025 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseResult.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestCaseResult.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestCaseResult.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestCaseResult.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestFailedException.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestFailedException.cs
index 91618d9..a660095 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestFailedException.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestFailedException.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestFailedException.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestFailedException.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestResult.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestResult.cs
index 9f8533c..5f8a0cf 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestResult.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestResult.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestResult.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestResult.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSkippedException.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSkippedException.cs
index 56e904c..a48c39e 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSkippedException.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSkippedException.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestSkippedException.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestSkippedException.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatus.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatus.cs
index af35284..ca170b0 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatus.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatus.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestStatus.cs,v 1.1.1.1.2.1 2009/04/20 21:15:31 source Exp $
+//  $Id: TestStatus.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatusCode.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatusCode.cs
index 3934500..405b071 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatusCode.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestStatusCode.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestStatusCode.cs,v 1.1.1.1.2.1 2009/04/20 21:15:32 source Exp $
+//  $Id: TestStatusCode.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuite.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuite.cs
index 152c75e..b504d81 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuite.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuite.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestSuite.cs,v 1.1.1.1.2.1 2009/04/20 21:15:32 source Exp $
+//  $Id: TestSuite.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuiteAttribute.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuiteAttribute.cs
index 0d27424..2ca03aa 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuiteAttribute.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Framework/TestSuiteAttribute.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestSuiteAttribute.cs,v 1.1.1.1.2.1 2009/04/20 21:15:32 source Exp $
+//  $Id: TestSuiteAttribute.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/BaseTestRunner.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/BaseTestRunner.cs
index 1312906..af89ff2 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/BaseTestRunner.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/BaseTestRunner.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: BaseTestRunner.cs,v 1.1.1.1.2.1 2009/04/20 21:15:32 source Exp $
+//  $Id: BaseTestRunner.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/ConsoleTestRunner.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/ConsoleTestRunner.cs
index 0a4159a..123b651 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/ConsoleTestRunner.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/UI/ConsoleTestRunner.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: ConsoleTestRunner.cs,v 1.1.1.1.2.1 2009/04/20 21:15:32 source Exp $
+//  $Id: ConsoleTestRunner.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/harness/OpenLink/Testing/Util/TestSettings.cs b/binsrc/tests/dotnet/harness/OpenLink/Testing/Util/TestSettings.cs
index f18df1e..18092b2 100644
--- a/binsrc/tests/dotnet/harness/OpenLink/Testing/Util/TestSettings.cs
+++ b/binsrc/tests/dotnet/harness/OpenLink/Testing/Util/TestSettings.cs
@@ -1,10 +1,10 @@
 //
-//  $Id: TestSettings.cs,v 1.1.1.1.2.1 2009/04/20 21:15:32 source Exp $
+//  $Id: TestSettings.cs,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 //
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //
-//  Copyright (C) 1998-2009 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/dotnet/test_server.sh b/binsrc/tests/dotnet/test_server.sh
index 9b26be6..d8be7e3 100755
--- a/binsrc/tests/dotnet/test_server.sh
+++ b/binsrc/tests/dotnet/test_server.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: test_server.sh,v 1.4.2.1 2009/04/20 21:15:31 source Exp $
+#  $Id: test_server.sh,v 1.4.2.2 2012/03/08 12:55:07 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/force_dbms_name.c b/binsrc/tests/force_dbms_name.c
index ca8337d..b60a23d 100644
--- a/binsrc/tests/force_dbms_name.c
+++ b/binsrc/tests/force_dbms_name.c
@@ -1,7 +1,7 @@
 /*
  *  force_dbms_name.c
  *
- *  $Id: force_dbms_name.c,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: force_dbms_name.c,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Testsuite for FORCE_DBMS_NAME connect option.
  *  set the DBMS name to haha.
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/getdata.c b/binsrc/tests/getdata.c
index bd99a13..5754a1a 100644
--- a/binsrc/tests/getdata.c
+++ b/binsrc/tests/getdata.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/inifile.c b/binsrc/tests/inifile.c
index edb22bb..57118c2 100644
--- a/binsrc/tests/inifile.c
+++ b/binsrc/tests/inifile.c
@@ -1,14 +1,14 @@
 /*
  *  inifile.c
  *
- *  $Id: inifile.c,v 1.1.1.1.2.2 2009/11/26 20:37:00 source Exp $
+ *  $Id: inifile.c,v 1.1.1.1.2.3 2012/03/08 12:55:06 source Exp $
  *
  *  Get fields out of an ini file and possibly rewrite them
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/ins.c b/binsrc/tests/ins.c
index 929b849..588982a 100644
--- a/binsrc/tests/ins.c
+++ b/binsrc/tests/ins.c
@@ -1,14 +1,14 @@
 /*
  *  ins.c
  *
- *  $Id: ins.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: ins.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Insert test
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/isql.c b/binsrc/tests/isql.c
index 76341c7..b34d61e 100644
--- a/binsrc/tests/isql.c
+++ b/binsrc/tests/isql.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: isql.c,v 1.3.2.4 2011/03/25 17:47:30 source Exp $
+ *  $Id: isql.c,v 1.3.2.7 2012/03/12 10:28:52 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -645,7 +645,7 @@ TCHAR *web_query_string = NULL;	/* from environment variable QUERY_STRING */
 int web_mode = 0;		/* Is set to 1 in the beginning of main if used
 			       as a cgi-script */
 int kubl_mode = 1;		/* Currently affects only how MAXROWS are handled. */
-int print_banner_flag = 1, print_types_also = 1, verbose_mode = 1, echo_mode = 0;
+int print_banner_flag = 1, print_types_also = 1, verbose_mode = 1, echo_mode = 0, explain_mode = 0, sparql_translate_mode = 0;
 int flag_newlines_at_eor = 1;	/* By default print one nl at the end of row */
 long int select_max_rows = 0;	/* By default show them all. */
 long int perm_deadlock_retries = 0, vol_deadlock_retries = 0;
@@ -2625,6 +2625,8 @@ add_var_def (_T("FORM_LAST_ENCODING"), (&form_last_encoding), CHARPTR_VAR, NULL)
   add_var_def (_T("BLOBS"), (&print_blobs_flag), INT_FLAG, OFF_ON),
   add_var_def (_T("FOREACH_ERR_BREAK"), (&foreach_err_break), INT_FLAG, OFF_ON),
   add_var_def (_T("ECHO"), (&echo_mode), INT_FLAG, OFF_ON),
+  add_var_def (_T("EXPLAIN"), (&explain_mode), INT_FLAG, OFF_ON),
+  add_var_def (_T("SPARQL_TRANSLATE"), (&sparql_translate_mode), INT_FLAG, OFF_ON),
   add_var_def (_T("HIDDEN_CRS"), (&clear_hidden_crs_flag), INT_FLAG, PRESERVED_CLEARED),
   add_var_def (_T("BINARY_OUTPUT"), (&flag_binary_output), INT_FLAG, OFF_ON),
   add_var_def (_T("BANNER"), (&print_banner_flag), INT_FLAG, OFF_ON),
@@ -5901,9 +5903,32 @@ again_exec:;
 	    );
 
 	  IF_ERR_GO (stmt, error, rc);
+          rc = SQLExecDirect (stmt, UCP (text), SQL_NTS);
+	}
+      else if (explain_mode)
+        {
+	  rc = SQLPrepare (stmt, _T("EXPLAIN(?)"), SQL_NTS);
+	  IF_ERR_GO (stmt, error, rc);
+	  rc = SQLBindParameter (stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, isqlt_tcslen(text), 0, UCP(text), isqlt_tcslen(text), NULL);
+	  IF_ERR_GO (stmt, error, rc);
+	  rc = SQLExecute (stmt);
+	}
+      else if (sparql_translate_mode)
+        {
+          const TCHAR* q = text;
+          if (!strncasecmp (text, _T("SPARQL"), isqlt_tcslen(_T("SPARQL"))))
+            q = text + isqlt_tcslen(_T("SPARQL"));
+
+          rc = SQLPrepare (stmt, _T("SELECT SPARQL_TO_SQL_TEXT(?)"), SQL_NTS);
+          IF_ERR_GO (stmt, error, rc);
+          rc = SQLBindParameter (stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, isqlt_tcslen(q), 0, UCP(q), isqlt_tcslen(q), NULL);
+          IF_ERR_GO (stmt, error, rc);
+          rc = SQLExecute (stmt);
+        }
+      else
+        {
+	  rc = SQLExecDirect (stmt, UCP (text), SQL_NTS);
 	}
-
-      rc = SQLExecDirect (stmt, UCP (text), SQL_NTS);
     }
   else if (rc == DO_SQL_API_COMMAND_IS_NOT_AVAILABLE)
     {				/* Should we free something? */
@@ -9353,10 +9378,6 @@ handle_multipart_form (TCHAR *boundary, FILE * in_fp)
 
   form_boundary = chestrdup (boundary, me);
 
-#ifdef WIN32
-  setmode (fileno (stdin), _O_BINARY);	/* _O_TEXT is ASCII mode. */
-#endif
-
   while (0 != (got_anything = bin_fgets (inpoint, IN_BATCH, in_fp)))
     {
 /*
@@ -9483,6 +9504,9 @@ _tmain (int argc, TCHAR **argv)
 	"Possibly wrong setting for LANG environment variable. "
 	"Using the C locale instead.\n");
 #endif
+#ifdef WIN32
+  setmode (fileno (stdin), _O_BINARY);
+#endif
 #ifdef MALLOC_DEBUG
   dbg_malloc_enable();
 #endif
diff --git a/binsrc/tests/isql_tchar.h b/binsrc/tests/isql_tchar.h
index 99d82b5..3107c80 100644
--- a/binsrc/tests/isql_tchar.h
+++ b/binsrc/tests/isql_tchar.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/isql_wfuncs.c b/binsrc/tests/isql_wfuncs.c
index e205f40..07fc571 100644
--- a/binsrc/tests/isql_wfuncs.c
+++ b/binsrc/tests/isql_wfuncs.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/isql_win32.c b/binsrc/tests/isql_win32.c
index 5516a00..84d93fe 100644
--- a/binsrc/tests/isql_win32.c
+++ b/binsrc/tests/isql_win32.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm-cli.c b/binsrc/tests/lubm-cli.c
index b3f0a6a..c70ba06 100644
--- a/binsrc/tests/lubm-cli.c
+++ b/binsrc/tests/lubm-cli.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/Makefile.am b/binsrc/tests/lubm/Makefile.am
index 37d563d..cf27161 100644
--- a/binsrc/tests/lubm/Makefile.am
+++ b/binsrc/tests/lubm/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/Makefile.in b/binsrc/tests/lubm/Makefile.in
index 2b7605a..dae63ca 100644
--- a/binsrc/tests/lubm/Makefile.in
+++ b/binsrc/tests/lubm/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -101,6 +101,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -149,6 +150,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -200,6 +202,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -246,7 +249,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/lubm/big-lubm-load.sql b/binsrc/tests/lubm/big-lubm-load.sql
index d1e096a..32205e8 100644
--- a/binsrc/tests/lubm/big-lubm-load.sql
+++ b/binsrc/tests/lubm/big-lubm-load.sql
@@ -1,10 +1,10 @@
 --
---  $Id: big-lubm-load.sql,v 1.1.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: big-lubm-load.sql,v 1.1.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/lubm-cp.sql b/binsrc/tests/lubm/lubm-cp.sql
index 3d3ba8b..f45b1ea 100644
--- a/binsrc/tests/lubm/lubm-cp.sql
+++ b/binsrc/tests/lubm/lubm-cp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: lubm-cp.sql,v 1.2.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: lubm-cp.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/lubm-inf.sql b/binsrc/tests/lubm/lubm-inf.sql
index f498c89..23b67c3 100644
--- a/binsrc/tests/lubm/lubm-inf.sql
+++ b/binsrc/tests/lubm/lubm-inf.sql
@@ -1,10 +1,10 @@
 --
---  $Id: lubm-inf.sql,v 1.3.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: lubm-inf.sql,v 1.3.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/lubm-load.sql b/binsrc/tests/lubm/lubm-load.sql
index 40c38d0..ee55eec 100644
--- a/binsrc/tests/lubm/lubm-load.sql
+++ b/binsrc/tests/lubm/lubm-load.sql
@@ -1,10 +1,10 @@
 --
---  $Id: lubm-load.sql,v 1.6.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: lubm-load.sql,v 1.6.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/lubm-org.sql b/binsrc/tests/lubm/lubm-org.sql
index 8cacda0..fd3fb93 100644
--- a/binsrc/tests/lubm/lubm-org.sql
+++ b/binsrc/tests/lubm/lubm-org.sql
@@ -1,10 +1,10 @@
 --
---  $Id: lubm-org.sql,v 1.1.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: lubm-org.sql,v 1.1.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/lubm-phys.sql b/binsrc/tests/lubm/lubm-phys.sql
index dcec348..329d018 100644
--- a/binsrc/tests/lubm/lubm-phys.sql
+++ b/binsrc/tests/lubm/lubm-phys.sql
@@ -1,10 +1,10 @@
 --
---  $Id: lubm-phys.sql,v 1.2.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: lubm-phys.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/lubm.sql b/binsrc/tests/lubm/lubm.sql
index b85e76e..2878bcb 100644
--- a/binsrc/tests/lubm/lubm.sql
+++ b/binsrc/tests/lubm/lubm.sql
@@ -1,10 +1,10 @@
 --
---  $Id: lubm.sql,v 1.2.2.1 2009/12/22 10:37:52 source Exp $
+--  $Id: lubm.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/test_server.sh b/binsrc/tests/lubm/test_server.sh
index 9209ef8..6b45a2a 100755
--- a/binsrc/tests/lubm/test_server.sh
+++ b/binsrc/tests/lubm/test_server.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: test_server.sh,v 1.1.2.2 2010/01/05 19:12:15 source Exp $
+#  $Id: test_server.sh,v 1.1.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  choose a server to run with
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/tlubm.sh b/binsrc/tests/lubm/tlubm.sh
index b051191..4381cb5 100755
--- a/binsrc/tests/lubm/tlubm.sh
+++ b/binsrc/tests/lubm/tlubm.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tlubm.sh,v 1.1.2.2 2010/01/05 19:12:15 source Exp $
+#  $Id: tlubm.sh,v 1.1.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  Database recovery tests
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/lubm/trdfrng.sql b/binsrc/tests/lubm/trdfrng.sql
index 5bbb60a..6c7119f 100644
--- a/binsrc/tests/lubm/trdfrng.sql
+++ b/binsrc/tests/lubm/trdfrng.sql
@@ -1,10 +1,10 @@
 --
---  $Id: trdfrng.sql,v 1.1.2.3 2010/01/05 19:12:15 source Exp $
+--  $Id: trdfrng.sql,v 1.1.2.4 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/mail_virt.c b/binsrc/tests/mail_virt.c
index 5d15305..af57551 100644
--- a/binsrc/tests/mail_virt.c
+++ b/binsrc/tests/mail_virt.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: mail_virt.c,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: mail_virt.c,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Virtuoso Local mailer
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/odbcinc.h b/binsrc/tests/odbcinc.h
index 75ba622..81a3e53 100644
--- a/binsrc/tests/odbcinc.h
+++ b/binsrc/tests/odbcinc.h
@@ -1,14 +1,14 @@
 /*
  *  odbcinc.h
  *
- *  $Id: odbcinc.h,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: odbcinc.h,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Include the ODBC header, whichever appropriate
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/odbcuti.h b/binsrc/tests/odbcuti.h
index d808620..58274ce 100644
--- a/binsrc/tests/odbcuti.h
+++ b/binsrc/tests/odbcuti.h
@@ -1,14 +1,14 @@
 /*
  *  odbcuti.c
  *
- *  $Id: odbcuti.h,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: odbcuti.h,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  ODBC utility macros
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/oledb/Makefile.am b/binsrc/tests/oledb/Makefile.am
index 652e0f8..11ce103 100644
--- a/binsrc/tests/oledb/Makefile.am
+++ b/binsrc/tests/oledb/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/oledb/Makefile.in b/binsrc/tests/oledb/Makefile.in
index 431871f..a332898 100644
--- a/binsrc/tests/oledb/Makefile.in
+++ b/binsrc/tests/oledb/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/oledb/dts_import.sql b/binsrc/tests/oledb/dts_import.sql
index c955fcf..329222d 100644
--- a/binsrc/tests/oledb/dts_import.sql
+++ b/binsrc/tests/oledb/dts_import.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dts_import.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: dts_import.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/paramstats.c b/binsrc/tests/paramstats.c
index bd535a1..5340da1 100644
--- a/binsrc/tests/paramstats.c
+++ b/binsrc/tests/paramstats.c
@@ -1,14 +1,14 @@
 /*
  *  paramstats.c
  *
- *  $Id: paramstats.c,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: paramstats.c,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  param status pointer test (bug 1293)
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/Makefile.am b/binsrc/tests/rdf/Makefile.am
index e1d4713..2d30cfb 100644
--- a/binsrc/tests/rdf/Makefile.am
+++ b/binsrc/tests/rdf/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/Makefile.in b/binsrc/tests/rdf/Makefile.in
index 93c454d..be3f96e 100644
--- a/binsrc/tests/rdf/Makefile.in
+++ b/binsrc/tests/rdf/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/rdf/articles.sql b/binsrc/tests/rdf/articles.sql
index 6f0c36d..468b0f2 100644
--- a/binsrc/tests/rdf/articles.sql
+++ b/binsrc/tests/rdf/articles.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: articles.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: articles.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/rdf-exp-load.xsl b/binsrc/tests/rdf/rdf-exp-load.xsl
index c755b36..3a75905 100644
--- a/binsrc/tests/rdf/rdf-exp-load.xsl
+++ b/binsrc/tests/rdf/rdf-exp-load.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: rdf-exp-load.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: rdf-exp-load.xsl,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/rdf-exp-rdfxml2dict.xsl b/binsrc/tests/rdf/rdf-exp-rdfxml2dict.xsl
index b207902..b2ceb20 100644
--- a/binsrc/tests/rdf/rdf-exp-rdfxml2dict.xsl
+++ b/binsrc/tests/rdf/rdf-exp-rdfxml2dict.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: rdf-exp-rdfxml2dict.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: rdf-exp-rdfxml2dict.xsl,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/rdf-exp.sql b/binsrc/tests/rdf/rdf-exp.sql
index b6b1909..a515dfc 100644
--- a/binsrc/tests/rdf/rdf-exp.sql
+++ b/binsrc/tests/rdf/rdf-exp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rdf-exp.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: rdf-exp.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/rdfbase.sql b/binsrc/tests/rdf/rdfbase.sql
index 1bf8524..e5855c1 100644
--- a/binsrc/tests/rdf/rdfbase.sql
+++ b/binsrc/tests/rdf/rdfbase.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rdfbase.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: rdfbase.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/rdfxmlload.xsl b/binsrc/tests/rdf/rdfxmlload.xsl
index fe3d9dd..e3058c2 100644
--- a/binsrc/tests/rdf/rdfxmlload.xsl
+++ b/binsrc/tests/rdf/rdfxmlload.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: rdfxmlload.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: rdfxmlload.xsl,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/rdf/wordnet.sql b/binsrc/tests/rdf/wordnet.sql
index 41c604a..de8b74f 100644
--- a/binsrc/tests/rdf/wordnet.sql
+++ b/binsrc/tests/rdf/wordnet.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wordnet.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: wordnet.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/runbg.c b/binsrc/tests/runbg.c
index 1c1c4a3..f7eb6f7 100644
--- a/binsrc/tests/runbg.c
+++ b/binsrc/tests/runbg.c
@@ -1,14 +1,14 @@
 /*
  *  runbg.c
  *
- *  $Id: runbg.c,v 1.1.1.1.2.2 2009/11/26 20:37:27 source Exp $
+ *  $Id: runbg.c,v 1.1.1.1.2.3 2012/03/08 12:55:06 source Exp $
  *
  *  Runs a process in the background, similar to nohup but slightly different.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/scroll.c b/binsrc/tests/scroll.c
index 0293f12..538e6cb 100644
--- a/binsrc/tests/scroll.c
+++ b/binsrc/tests/scroll.c
@@ -1,14 +1,14 @@
 /*
  *  scroll.c
  *
- *  $Id: scroll.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: scroll.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  scroll test
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/setcurs.c b/binsrc/tests/setcurs.c
index 6ccf2f4..ed24833 100644
--- a/binsrc/tests/setcurs.c
+++ b/binsrc/tests/setcurs.c
@@ -1,7 +1,7 @@
 /*
  *  setcurs.c
  *
- *  $Id: setcurs.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: setcurs.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Testsuite for SQLSetCursorName() call.
  *  In order it to work there should be the following statements :
@@ -11,7 +11,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/smtpsend.c b/binsrc/tests/smtpsend.c
index 63e9b30..b8ff89e 100644
--- a/binsrc/tests/smtpsend.c
+++ b/binsrc/tests/smtpsend.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/Makefile.am b/binsrc/tests/suite/Makefile.am
index ff45796..6c1f459 100644
--- a/binsrc/tests/suite/Makefile.am
+++ b/binsrc/tests/suite/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/Makefile.in b/binsrc/tests/suite/Makefile.in
index 16bb03f..bdb8e48 100644
--- a/binsrc/tests/suite/Makefile.in
+++ b/binsrc/tests/suite/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -141,6 +141,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -189,6 +190,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -240,6 +242,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -286,7 +289,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/suite/backup.sql b/binsrc/tests/suite/backup.sql
index e0d01fd..ad61ad6 100644
--- a/binsrc/tests/suite/backup.sql
+++ b/binsrc/tests/suite/backup.sql
@@ -1,14 +1,14 @@
 --
 --  backup.sql
 --
---  $Id: backup.sql,v 1.1.1.1.2.1 2009/04/16 12:37:42 source Exp $
+--  $Id: backup.sql,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  Make an On-Line Backup
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/blobs.sql b/binsrc/tests/suite/blobs.sql
index c7a3171..543dabf 100644
--- a/binsrc/tests/suite/blobs.sql
+++ b/binsrc/tests/suite/blobs.sql
@@ -1,14 +1,14 @@
 --
 --  blobs.sql
 --
---  $Id: blobs.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: blobs.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Check Blob fields
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/bpel.sh b/binsrc/tests/suite/bpel.sh
index e0b23d0..1772de4 100755
--- a/binsrc/tests/suite/bpel.sh
+++ b/binsrc/tests/suite/bpel.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: bpel.sh,v 1.4.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: bpel.sh,v 1.4.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/byteorder.sh b/binsrc/tests/suite/byteorder.sh
index 6efc29a..3f7211d 100755
--- a/binsrc/tests/suite/byteorder.sh
+++ b/binsrc/tests/suite/byteorder.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 #  tsql.sh
 #
-#  $Id: byteorder.sh,v 1.1.1.1.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: byteorder.sh,v 1.1.1.1.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  VARIOUS MACHINE BYTEORDER support 
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/byteorder.sql b/binsrc/tests/suite/byteorder.sql
index 0e285a4..7b29e43 100644
--- a/binsrc/tests/suite/byteorder.sql
+++ b/binsrc/tests/suite/byteorder.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: byteorder.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: byteorder.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ce.xml b/binsrc/tests/suite/ce.xml
index 43a6552..722d8dc 100644
--- a/binsrc/tests/suite/ce.xml
+++ b/binsrc/tests/suite/ce.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/clean.sh b/binsrc/tests/suite/clean.sh
index 7ab62de..2cee249 100755
--- a/binsrc/tests/suite/clean.sh
+++ b/binsrc/tests/suite/clean.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: clean.sh,v 1.8.2.3 2009/11/17 21:01:00 source Exp $
+#  $Id: clean.sh,v 1.8.2.4 2012/03/08 12:55:07 source Exp $
 #
 #  Cleanup after running the testsuite
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/csv_loader.sql b/binsrc/tests/suite/csv_loader.sql
new file mode 100644
index 0000000..815bba1
--- /dev/null
+++ b/binsrc/tests/suite/csv_loader.sql
@@ -0,0 +1,404 @@
+--drop table csv_load_list;
+
+create table csv_load_list (
+    cl_file varchar, 
+    cl_file_in_zip varchar,
+    cl_state int default 0, 
+    cl_error long varchar, 
+    cl_table varchar, 
+    cl_options any,
+    cl_started datetime, 
+    cl_done datetime,
+    primary key (cl_file, cl_file_in_zip))
+create index cl_state on csv_load_list (cl_state)
+;
+
+create procedure csv_cols_cb (inout r any, in inx int, inout cbd any)
+{
+  if (cbd is null)
+    cbd := vector ();
+  cbd := vector_concat (cbd, vector (r));   
+}
+;
+
+create procedure  csv_get_cols_array (inout ss any, in hr int, in offs int, in opts any)
+{
+  declare h, res any;
+  declare inx, j, ncols, no_head int;
+  
+  h := null;
+  no_head := 0;
+  if (hr < 0)
+    {
+      no_head := 1;
+      hr := 0;
+    }
+  if (offs < 0)
+    offs := 0;
+  res := vector ();
+  csv_parse (ss, 'DB.DBA.csv_cols_cb', h, 0, offs + 10, opts);
+  if (h is not null and length (h) > offs)
+    {
+      declare _row any;
+      _row := h[hr];
+      for (j := 0; j < length (_row); j := j + 1)           
+        {
+	  res := vector_concat (res, vector (vector (SYS_ALFANUM_NAME (cast (_row[j] as varchar)), null)));
+        }
+      for (inx := offs; inx < length (h); inx := inx + 1)
+       { 
+	 _row := h[inx];
+         for (j := 0; j < length (_row); j := j + 1)           
+	   {
+	     if (res[j][1] is null and not (isstring (_row[j]) and _row[j] = '') and _row[j] is not null)
+               res[j][1] := __tag (_row[j]);
+             else if (__tag (_row[j]) <> res[j][1] and 189 = res[j][1] and (isdouble (_row[j]) or isfloat (_row[j])))
+	       res[j][1] := __tag (_row[j]);
+             else if (__tag (_row[j]) <> res[j][1] and isinteger (_row[j]) and (res[j][1] = 219 or 190 = res[j][1]))
+	       ;  
+             else if (__tag (_row[j]) <> res[j][1])
+               res[j][1] := -1;
+	   }
+       } 
+    }
+  for (inx := 0; inx < length (res); inx := inx + 1)
+    { 
+       if (not isstring (res[inx][0]) and not isnull (res[inx][0]))
+         no_head := 1;	
+       else if (trim (res[inx][0]) = '' or isnull (res[inx][0]))
+         res[inx][0] := sprintf ('COL%d', inx);	 
+    }  
+  for (inx := 0; inx < length (res); inx := inx + 1)
+    { 
+       if (res[inx][1] = -1 or res[inx][1] is null)
+         res[inx][1] := 'VARCHAR';	 
+       else
+         res[inx][1] := dv_type_title (res[inx][1]);	 
+    }  
+  if (no_head)
+    {
+      for (inx := 0; inx < length (res); inx := inx + 1)
+	{ 
+	   res[inx][0] := sprintf ('COL%d', inx);
+	}
+    }
+  return res;
+}
+;
+
+create procedure csv_get_table_def (in fn varchar, in f varchar, in opts any)
+{
+  declare arr any;
+  declare s, r, ss any;
+  declare i, offs, st int;
+
+  if (__tag (f) = 185)
+    s := f;
+  else if (f like '%.gz')
+    s := gz_file_open (f);
+  else
+    s := file_open (f);
+  st := 0; offs := 1; 
+  if (isvector (opts) and mod (length (opts), 2) = 0)
+    {
+      st := atoi (get_keyword ('header', opts, '0'));
+      offs := atoi (get_keyword ('offset', opts, '1'));
+    }  
+  arr := csv_get_cols_array (s, st, offs, opts);   
+  ss := string_output ();
+  http (sprintf ('CREATE TABLE %s ( \n', fn), ss); 
+  for (i := 0; i < length (arr); i := i + 1)
+    {
+       http (sprintf ('\t"%I" %s', arr[i][0], arr[i][1]), ss);
+       if (i < length (arr) - 1)
+         http (', \n', ss);
+    }
+  http (')', ss);
+  return string_output_string (ss);  
+}
+;
+
+create procedure csv_register (in path varchar, in mask varchar)
+{
+  declare ls any;
+  declare inx int;
+  ls := sys_dirlist (path, 1);
+  for (inx := 0; inx < length (ls); inx := inx + 1)
+    {
+      if (ls[inx] like mask)
+	{
+	  if (not (exists (select 1 from DB.DBA.CSV_LOAD_LIST where CL_FILE = path || '/' || ls[inx] for update)))
+	    {
+	      declare tbfile, ofile, tb, f, tbname, mod varchar;
+	      declare opts any;
+	      tb := null; 
+	      f := ls[inx];
+	      tbfile := path || '/' || regexp_replace (f, '(\\.csv(\\.gz)?)|(\\.zip)', '') || '.tb';
+	      ofile :=  path || '/' || regexp_replace (f, '(\\.csv(\\.gz)?)|(\\.zip)', '') || '.cfg';
+
+	      opts := null;
+	      if (file_stat (ofile) <> 0)
+		{
+		  declare delim, quot, header, offs, enc varchar;
+		  delim  := cfg_item_value (ofile, 'csv', 'csv-delimiter'); 
+		  quot   := cfg_item_value (ofile, 'csv', 'csv-quote'); 
+		  enc    := cfg_item_value (ofile, 'csv', 'encoding'); 
+		  header := cfg_item_value (ofile, 'csv', 'header'); 
+		  offs   := cfg_item_value (ofile, 'csv', 'offset'); 
+		  mod   := cfg_item_value (ofile, 'csv', 'mode'); 
+
+		  if (delim  is not null) 
+		    {
+		      delim := replace (delim, 'tab', '\t'); 
+		      delim := replace (delim, 'space', ' '); 
+		      opts := vector_concat (opts, vector ('csv-delimiter', delim));
+		    }
+		  if (quot   is not null) opts := vector_concat (opts, vector ('csv-quote', quot));
+		  if (enc    is not null) opts := vector_concat (opts, vector ('encoding', enc));
+		  if (header is not null) opts := vector_concat (opts, vector ('header', header));
+		  if (offs   is not null) opts := vector_concat (opts, vector ('offset', offs));
+		  if (mod    is not null) opts := vector_concat (opts, vector ('mode', atoi (mod)));
+		}
+	      opts := vector_concat (opts, vector ('log', 1));
+
+	      if (file_stat (tbfile) <> 0)
+		tbname := trim (file_to_string (tbfile), ' \r\n');
+	      else
+		tbname := complete_table_name ('CSV.DBA.'||SYS_ALFANUM_NAME (f), 1);
+
+              if (exists (select 1 from SYS_KEYS where KEY_TABLE = tbname))
+		{
+		  tb := tbname;
+		}
+	      else
+		{
+		  if (f like '%.csv' or f like '%.csv.gz')
+		    {
+		      declare stat, msg any;
+		      stat := '00000';
+		      declare continue handler for sqlstate '*' {
+	                log_message (sprintf ('Can not guess table name for file %s', f)); 		
+		      };
+		      {
+		        exec (csv_get_table_def (tbname, path||'/'||f, opts), stat, msg);
+			if (stat = '00000')
+		          tb := tbname;
+			else
+		          log_message (sprintf ('Can not guess table name for file %s', f));
+	              } 		
+		    }
+		  else if (f like '%.zip')
+		    {
+		      declare ff, ss any;
+		      ff := unzip_list (path || '/' || f);
+		      foreach (any zf in ff) do
+			{
+			  if (zf[1] > 0 and zf[0] like '%.csv')
+			    {
+			      ss := unzip_file (path || '/' || f, zf[0]);
+			      tbname := complete_table_name ('CSV.DBA.'||SYS_ALFANUM_NAME (zf[0]), 1);
+			      declare stat, msg any;
+			      tb := null;
+			      stat := '00000';
+			      declare continue handler for sqlstate '*' {
+				log_message (sprintf ('Can not guess table name for zipped file %s', zf[0])); 		
+			      };
+			      {
+				exec (csv_get_table_def (tbname, ss, opts), stat, msg);
+				if (stat = '00000')
+				  tb := tbname;
+				else
+				  log_message (sprintf ('Can not guess table name for zipped file %s', zf[0]));
+				if (tb is not null)
+				  insert into DB.DBA.CSV_LOAD_LIST (cl_file, cl_file_in_zip, cl_table, cl_options) 
+				      values (path || '/' || f, zf[0], tb, opts);
+			      } 		
+			    }
+			}
+		      tb := null;
+		    }
+		  else   
+		    log_message (sprintf ('Can not guess table name for file %s', f));
+		}
+              if (tb is not null)
+                {		
+		  insert into DB.DBA.CSV_LOAD_LIST (cl_file, cl_file_in_zip, cl_table, cl_options) 
+		      values (path || '/' || f, '', tb, opts);
+		}
+	    }
+	  commit work;
+	}
+    }
+}
+;
+
+create procedure 
+csv_register_all (in path varchar, in mask varchar)
+{
+  declare ls any;
+  declare inx int;
+  ls := sys_dirlist (path, 0);
+  csv_register (path, mask);
+  for (inx := 0; inx < length (ls); inx := inx + 1)
+    {
+      if (ls[inx] <> '.' and ls[inx] <> '..')
+	{
+	  csv_register_all (path||'/'||ls[inx], mask);
+	}
+    }
+}
+;
+
+create procedure
+csv_ld_file (in f varchar, in zf varchar, in tb varchar, in ld_mode int, in opts any)
+{
+  declare ss, ret any;
+  declare offs, st int;
+  st := 0; offs := 1; 
+  declare exit handler for sqlstate '*' {
+    rollback work;
+    update DB.DBA.CSV_LOAD_LIST set CL_STATE = 2, CL_DONE = now (), CL_ERROR = __sql_state || ' ' || __sql_message 
+		where CL_FILE = f and CL_FILE_IN_ZIP = zf;
+    commit work;
+    log_message (sprintf (' File %s error %s %s', f, __sql_state, __sql_message));
+    return;
+  };
+  if (isvector (opts) and mod (length (opts), 2) = 0)
+    {
+      st := atoi (get_keyword ('header', opts, '0'));
+      offs := atoi (get_keyword ('offset', opts, '1'));
+    }  
+  if (f like '%.zip' and length (zf) = 0)
+    {
+      declare ff any;
+      ff := unzip_list (f);
+      foreach (any zzf in ff) do
+	{
+	  if (zzf[1] > 0 and zzf[0] like '%.csv')
+	    {
+	      ss := unzip_file (f, zzf[0]);
+	      ret := csv_load (ss, offs, null, tb, ld_mode, opts);
+	    }
+	}
+    }
+  else if (f like '%.zip' and length (zf) > 0)
+    {
+      ss := unzip_file (f, zf);
+      ret := csv_load (ss, offs, null, tb, ld_mode, opts);
+    }
+  else if (f like '%.gz')
+    {
+      ss := gz_file_open (f);
+      ret := csv_load (ss, offs, null, tb, ld_mode, opts);
+    }
+  else
+    ret := csv_load_file (f, offs, null, tb, ld_mode, opts);
+  
+  if (length (ret) = 2 and length (ret[1]))
+    update DB.DBA.CSV_LOAD_LIST set CL_ERROR = ret[1] where CL_FILE = f and CL_FILE_IN_ZIP = zf;  
+}
+;
+
+create procedure csv_ld_array ()
+{
+  declare first, last, zfirst, zlast, arr, len, local, opt, zf any;
+  declare cr cursor for
+      select top 100 CL_FILE, CL_TABLE, CL_OPTIONS, CL_FILE_IN_ZIP from DB.DBA.CSV_LOAD_LIST table option (index cl_state) where CL_STATE = 0
+	for update;
+  declare fill int;
+  declare f, g varchar;
+  declare r any;
+  whenever not found goto done;
+  first := 0;
+  last := 0;
+  arr := make_array (100, 'any');
+  fill := 0;
+  open cr;
+  len := 0;
+  for (;;)
+    {
+      fetch cr into f, g, opt, zf;
+      if (0 = first) { first := f; zfirst := zf; }
+      last := f; zlast := zf;
+      arr[fill] := vector (f, g, opt, zf);
+      len := len + cast (file_stat (f, 1) as int);
+      fill := fill + 1;
+      if (len > 2000000)
+	goto done;
+    }
+ done:
+  if (0 = first)
+    return 0;
+  update CSV_LOAD_LIST set cl_state = 1, cl_started = now () where cl_file >= first and cl_file <= last and CL_FILE_IN_ZIP >= zfirst and CL_FILE_IN_ZIP <= zlast;
+  return arr;
+}
+;
+
+
+create procedure csv_loader_run (in max_files integer := null, in log_enable int := 2)
+{
+  declare sec_delay float;
+  declare _f, _graph varchar;
+  declare arr any;
+  declare xx, inx, tx_mode, ld_mode int;
+  ld_mode := log_enable;
+  while (1)
+    {
+      set isolation = 'repeatable';
+      declare exit handler for sqlstate '40001' {
+	rollback work;
+        sec_delay := rnd(1000)*0.001;
+	log_message(sprintf('deadlock in loader, waiting %d milliseconds', cast (sec_delay * 1000 as integer)));
+	delay(sec_delay);
+	goto again;
+      };
+
+     again:;
+
+      if (exists (select 1 from DB.DBA.CSV_LOAD_LIST where CL_FILE = '##stop'))
+	{
+	  log_message ('File load stopped by rdf_load_stop.');
+	  return;
+	}
+
+      log_enable (tx_mode, 1);
+
+      if (max_files is not null and max_files <= 0)
+        {
+	  commit work;
+	  log_message ('Max_files reached. Finishing.');
+          return;
+	}
+
+      whenever not found goto looks_empty;
+
+      --      log_message ('Getting next file.');
+      set isolation = 'serializable';
+      arr := csv_ld_array ();
+      commit work;
+      if (0 = arr)
+	goto looks_empty;
+      log_enable (ld_mode, 1);
+
+      for (inx := 0; inx < 100; inx := inx + 1)
+	{
+	  if (0 = arr[inx])
+	    goto arr_done;
+	  csv_ld_file (arr[inx][0], arr[inx][3], arr[inx][1], ld_mode, arr[inx][2]);
+	  update DB.DBA.CSV_LOAD_LIST set CL_STATE = 2, CL_DONE = curdatetime () where CL_FILE = arr[inx][0] and CL_FILE_IN_ZIP = arr[inx][3];
+	}
+    arr_done:
+      log_enable (tx_mode, 1);
+
+      if (max_files is not null) max_files := max_files - 100;
+
+      commit work;
+    }
+
+ looks_empty:
+  commit work;
+  log_message ('No more files to load. Loader has finished,');
+  return;
+}
+;
+
diff --git a/binsrc/tests/suite/cube.sql b/binsrc/tests/suite/cube.sql
index 0dc6f3c..4aaec2e 100644
--- a/binsrc/tests/suite/cube.sql
+++ b/binsrc/tests/suite/cube.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: cube.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: cube.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/dbev_login.sql b/binsrc/tests/suite/dbev_login.sql
index dc21c1c..97de1d9 100644
--- a/binsrc/tests/suite/dbev_login.sql
+++ b/binsrc/tests/suite/dbev_login.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dbev_login.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: dbev_login.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/dbconcepts.xml b/binsrc/tests/suite/docsrc/dbconcepts.xml
index 31d7401..bedc8de 100644
--- a/binsrc/tests/suite/docsrc/dbconcepts.xml
+++ b/binsrc/tests/suite/docsrc/dbconcepts.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/html_common_v.xsl b/binsrc/tests/suite/docsrc/html_common_v.xsl
index ad9f31f..40cb870 100644
--- a/binsrc/tests/suite/docsrc/html_common_v.xsl
+++ b/binsrc/tests/suite/docsrc/html_common_v.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_common_v.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: html_common_v.xsl,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/intl.xml b/binsrc/tests/suite/docsrc/intl.xml
index 7bd3685..8aa8397 100644
--- a/binsrc/tests/suite/docsrc/intl.xml
+++ b/binsrc/tests/suite/docsrc/intl.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/odbcimplementation.xml b/binsrc/tests/suite/docsrc/odbcimplementation.xml
index 6d6f347..679b5c4 100644
--- a/binsrc/tests/suite/docsrc/odbcimplementation.xml
+++ b/binsrc/tests/suite/docsrc/odbcimplementation.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/ptune.xml b/binsrc/tests/suite/docsrc/ptune.xml
index 3bacc47..47c6d9d 100644
--- a/binsrc/tests/suite/docsrc/ptune.xml
+++ b/binsrc/tests/suite/docsrc/ptune.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/repl.xml b/binsrc/tests/suite/docsrc/repl.xml
index 8bb191d..2e731c5 100644
--- a/binsrc/tests/suite/docsrc/repl.xml
+++ b/binsrc/tests/suite/docsrc/repl.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/server.xml b/binsrc/tests/suite/docsrc/server.xml
index d0705d9..4aa47a4 100644
--- a/binsrc/tests/suite/docsrc/server.xml
+++ b/binsrc/tests/suite/docsrc/server.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -94,7 +94,7 @@ started from the Control Panel or automatically at system startup.
 ;
 ;  virtuoso.ini
 ;
-;  $Id: server.xml,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+;  $Id: server.xml,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 ;
 ;  Configuration file for the OpenLink Virtuoso VDBMS Server
 ;
diff --git a/binsrc/tests/suite/docsrc/sqlfunctions.xml b/binsrc/tests/suite/docsrc/sqlfunctions.xml
index 03f4cf3..706e761 100644
--- a/binsrc/tests/suite/docsrc/sqlfunctions.xml
+++ b/binsrc/tests/suite/docsrc/sqlfunctions.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/sqlprocedures.xml b/binsrc/tests/suite/docsrc/sqlprocedures.xml
index d18e3c0..0ef467a 100644
--- a/binsrc/tests/suite/docsrc/sqlprocedures.xml
+++ b/binsrc/tests/suite/docsrc/sqlprocedures.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/sqlreference.xml b/binsrc/tests/suite/docsrc/sqlreference.xml
index 64962d3..d3f985b 100644
--- a/binsrc/tests/suite/docsrc/sqlreference.xml
+++ b/binsrc/tests/suite/docsrc/sqlreference.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/tsales.xml b/binsrc/tests/suite/docsrc/tsales.xml
index eb57961..fb5f106 100644
--- a/binsrc/tests/suite/docsrc/tsales.xml
+++ b/binsrc/tests/suite/docsrc/tsales.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/tsales.xsl b/binsrc/tests/suite/docsrc/tsales.xsl
index 4c04766..b411739 100644
--- a/binsrc/tests/suite/docsrc/tsales.xsl
+++ b/binsrc/tests/suite/docsrc/tsales.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tsales.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: tsales.xsl,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/tsales2.xsl b/binsrc/tests/suite/docsrc/tsales2.xsl
index c84346b..6944f68 100644
--- a/binsrc/tests/suite/docsrc/tsales2.xsl
+++ b/binsrc/tests/suite/docsrc/tsales2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tsales2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: tsales2.xsl,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/docsrc/vdbconcepts.xml b/binsrc/tests/suite/docsrc/vdbconcepts.xml
index deef2f1..5074923 100644
--- a/binsrc/tests/suite/docsrc/vdbconcepts.xml
+++ b/binsrc/tests/suite/docsrc/vdbconcepts.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/emp.xsl b/binsrc/tests/suite/emp.xsl
index baf84e4..0350f57 100644
--- a/binsrc/tests/suite/emp.xsl
+++ b/binsrc/tests/suite/emp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"  encoding="ISO-8859-1" ?>
 <!--
  -  
- -  $Id: emp.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: emp.xsl,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/emp_my.xsl b/binsrc/tests/suite/emp_my.xsl
index 4cd57d2..0941a39 100644
--- a/binsrc/tests/suite/emp_my.xsl
+++ b/binsrc/tests/suite/emp_my.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -  
- -  $Id: emp_my.xsl,v 1.2 2006/08/15 22:09:20 source Exp $
+ -  $Id: emp_my.xsl,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/error.sql b/binsrc/tests/suite/error.sql
index 2dc7f8e..1bdc831 100644
--- a/binsrc/tests/suite/error.sql
+++ b/binsrc/tests/suite/error.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: error.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: error.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ftirepl.sql b/binsrc/tests/suite/ftirepl.sql
index 9b697a0..74f4561 100644
--- a/binsrc/tests/suite/ftirepl.sql
+++ b/binsrc/tests/suite/ftirepl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ftirepl.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: ftirepl.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/gtkbench.sh b/binsrc/tests/suite/gtkbench.sh
index 4c8c040..514bdbf 100755
--- a/binsrc/tests/suite/gtkbench.sh
+++ b/binsrc/tests/suite/gtkbench.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: gtkbench.sh,v 1.2.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: gtkbench.sh,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ident.txt b/binsrc/tests/suite/ident.txt
index 0d153d1..93b164e 100644
--- a/binsrc/tests/suite/ident.txt
+++ b/binsrc/tests/suite/ident.txt
@@ -3,23 +3,23 @@ VARCHAR
 _______________________________________________________________________________
 
 OpenLink Virtuoso  Server
-Version 06.01.3127-pthreads for Linux as of Mar 29 2011 
-Started on: 2011/03/29 19:18 GMT+120
+Version 06.01.3127-pthreads for Linux as of Mar 15 2012 
+Started on: 2012/03/15 18:51 GMT+60
  
 Database Status:
-  File size 20971520, 2560 pages, 2048 free.
-  2000 buffers, 482 used, 0 dirty 0 wired down, repl age 0 0 w. io 0 w/crsr.
-  Disk Usage: 8 reads avg 0 msec, 0% r 0% w last  0 s, 562 writes,
-    0 read ahead, batch = 0.  Autocompact 82 in 59 out, 27% saved.
+  File size 20971520, 2560 pages, 2030 free.
+  20000 buffers, 500 used, 0 dirty 0 wired down, repl age 0 0 w. io 0 w/crsr.
+  Disk Usage: 8 reads avg 0 msec, 0% r 0% w last  0 s, 574 writes,
+    0 read ahead, batch = 0.  Autocompact 81 in 58 out, 28% saved.
 Gate:  0 2nd in reads, 0 gate write waits, 0 in while read 0 busy scrap. 
-Log = virtuoso.trx, 87 bytes
-482 pages have been changed since last backup (in checkpoint state)
+Log = virtuoso.trx, 155 bytes
+500 pages have been changed since last backup (in checkpoint state)
 Current backup timestamp: 0x0000-0x00-0x00
 Last backup date: unknown
 Clients: 1 connects, max 1 concurrent
-RPC: 4 calls, 1 pending, 1 max until now, 0 queued, 0 burst reads (0%), 0 second brk=157417472
-Checkpoint Remap 19 pages, 0 mapped back. 1 s atomic time.
-    DB master 2560 total 2048 free 19 remap 0 mapped back
+RPC: 4 calls, 1 pending, 1 max until now, 0 queued, 2 burst reads (50%), 0 second brk=161202176
+Checkpoint Remap 19 pages, 0 mapped back. 0 s atomic time.
+    DB master 2560 total 2030 free 19 remap 0 mapped back
    temp  256 total 251 free
  
 Lock Status: 0 deadlocks of which 0 2r1w, 0 waits,
@@ -27,14 +27,14 @@ Lock Status: 0 deadlocks of which 0 2r1w, 0 waits,
 Pending:
  
 Client 1111:1:  Account: dba, 203 bytes in, 256 bytes out, 1 stmts.
-PID: 20649, OS: unix, Application: unknown, IP#: 127.0.0.1
+PID: 26276, OS: unix, Application: unknown, IP#: 127.0.0.1
 Transaction status: PENDING, 1 threads.
 Locks: 
  
  
 Running Statements:
  Time (msec) Text
-          24 status()
+          49 status()
  
  
 Hash indexes
diff --git a/binsrc/tests/suite/inprocess.sh b/binsrc/tests/suite/inprocess.sh
index b9b4962..47f928e 100755
--- a/binsrc/tests/suite/inprocess.sh
+++ b/binsrc/tests/suite/inprocess.sh
@@ -2,14 +2,14 @@
 #
 #  inprocess.sh
 #
-#  $Id: inprocess.sh,v 1.1.1.1.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: inprocess.sh,v 1.1.1.1.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  inprocess client tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/inprocess.sql b/binsrc/tests/suite/inprocess.sql
index 149d2e8..c7b4a27 100644
--- a/binsrc/tests/suite/inprocess.sql
+++ b/binsrc/tests/suite/inprocess.sql
@@ -1,14 +1,14 @@
 --
 --  inprocess.sql
 --
---  $Id: inprocess.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: inprocess.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  inprocess client tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db.sh b/binsrc/tests/suite/large_db.sh
index 24faa44..e6372f7 100755
--- a/binsrc/tests/suite/large_db.sh
+++ b/binsrc/tests/suite/large_db.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 #  large_db.sh
 #
-#  $Id: large_db.sh,v 1.1.1.1.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: large_db.sh,v 1.1.1.1.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  Large (>2Gb) database file support tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db.sql b/binsrc/tests/suite/large_db.sql
index 6022e50..83bdc94 100644
--- a/binsrc/tests/suite/large_db.sql
+++ b/binsrc/tests/suite/large_db.sql
@@ -1,14 +1,14 @@
 --
 --  large_db.sql
 --
---  $Id: large_db.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: large_db.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Large DB test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db_3g.sql b/binsrc/tests/suite/large_db_3g.sql
index 456f49e..9211a4b 100644
--- a/binsrc/tests/suite/large_db_3g.sql
+++ b/binsrc/tests/suite/large_db_3g.sql
@@ -1,14 +1,14 @@
 --
 --  large_db.sql
 --
---  $Id: large_db_3g.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: large_db_3g.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Large DB test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db_3g_check.sql b/binsrc/tests/suite/large_db_3g_check.sql
index b3a327e..3c8935c 100644
--- a/binsrc/tests/suite/large_db_3g_check.sql
+++ b/binsrc/tests/suite/large_db_3g_check.sql
@@ -1,14 +1,14 @@
 --
 --  large_db_check.sql
 --
---  $Id: large_db_3g_check.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: large_db_3g_check.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Large DB test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db_5g.sql b/binsrc/tests/suite/large_db_5g.sql
index 94f75d3..771f4e1 100644
--- a/binsrc/tests/suite/large_db_5g.sql
+++ b/binsrc/tests/suite/large_db_5g.sql
@@ -1,14 +1,14 @@
 --
 --  large_db.sql
 --
---  $Id: large_db_5g.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: large_db_5g.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Large DB test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db_backup.sql b/binsrc/tests/suite/large_db_backup.sql
index 49cb7a1..3c81493 100644
--- a/binsrc/tests/suite/large_db_backup.sql
+++ b/binsrc/tests/suite/large_db_backup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: large_db_backup.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: large_db_backup.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/large_db_check.sql b/binsrc/tests/suite/large_db_check.sql
index 6d6b5b2..00dbf86 100644
--- a/binsrc/tests/suite/large_db_check.sql
+++ b/binsrc/tests/suite/large_db_check.sql
@@ -1,14 +1,14 @@
 --
 --  large_db_check.sql
 --
---  $Id: large_db_check.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: large_db_check.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Large DB test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ldmeter.sql b/binsrc/tests/suite/ldmeter.sql
index efa9fa2..dbabf04 100644
--- a/binsrc/tests/suite/ldmeter.sql
+++ b/binsrc/tests/suite/ldmeter.sql
@@ -70,11 +70,18 @@ create procedure ld_sample (in is_first int := 0)
 
 create procedure ld_meter_run (in s_delay int)
 {
+  declare stat, msg any;
   ld_sample (1);
   while (1)
     {
       delay (s_delay);
-      exec ('ld_sample (0)', null, null, null);
+      stat := '00000';
+      exec ('ld_sample (0)', stat, msg, null);
+      if (stat <> '00000')
+	{
+	  rollback work;
+	  log_message (stat || ' ' || msg);
+	}
     }
 }
 
diff --git a/binsrc/tests/suite/lowerall.sh b/binsrc/tests/suite/lowerall.sh
index f4ea530..5a3c902 100755
--- a/binsrc/tests/suite/lowerall.sh
+++ b/binsrc/tests/suite/lowerall.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: lowerall.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: lowerall.sh,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 #
 #  Rename all files in current directory to lowercase names
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/mail.sql b/binsrc/tests/suite/mail.sql
index c5b7cf0..a23d7fd 100644
--- a/binsrc/tests/suite/mail.sql
+++ b/binsrc/tests/suite/mail.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mail.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: mail.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/msdtc.sh b/binsrc/tests/suite/msdtc.sh
index 2bc183a..35f4c50 100755
--- a/binsrc/tests/suite/msdtc.sh
+++ b/binsrc/tests/suite/msdtc.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: msdtc.sh,v 1.2 2007/03/14 14:18:51 source Exp $
+#  $Id: msdtc.sh,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 #
 #  MS DTC tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/msdtc_conn_check.sql b/binsrc/tests/suite/msdtc_conn_check.sql
index a548171..06aec0a 100644
--- a/binsrc/tests/suite/msdtc_conn_check.sql
+++ b/binsrc/tests/suite/msdtc_conn_check.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: msdtc_conn_check.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: msdtc_conn_check.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/netmeter.sql b/binsrc/tests/suite/netmeter.sql
index 2afd8ed..c935c83 100644
--- a/binsrc/tests/suite/netmeter.sql
+++ b/binsrc/tests/suite/netmeter.sql
@@ -22,14 +22,15 @@ create procedure _NMSRV (in str varchar)
 create procedure nm_run (in n_batches int, in bytes int, in ops_per_batch int)
 {
   declare daq any;
-  declare i, h, n int;
+  declare i, h, n, nh int;
+  nh := sys_stat ('cl_n_hosts');
   set vdb_timeout = 2000;
   daq := daq (0);
   for (n:=0; n<n_batches; n := n + 1)
     {
       for (i:= 0; i < ops_per_batch; i:= i + 1)
 	{
-	  for (h := 1; h < sys_stat ('cl_n_hosts'); h:= h + 1)
+	  for (h := 1; h <= nh; h:= h + 1)
 	    {
 	      if (h <> sys_stat ('cl_this_host'))
 		daq_call (daq, '__ALL', vector (h), 'DB.DBA._NMSRV', vector (make_string (bytes)), 0);
diff --git a/binsrc/tests/suite/nntp_suite.sql b/binsrc/tests/suite/nntp_suite.sql
index c975c93..2dd69ff 100644
--- a/binsrc/tests/suite/nntp_suite.sql
+++ b/binsrc/tests/suite/nntp_suite.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nntp_suite.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nntp_suite.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwdemo.sql b/binsrc/tests/suite/nwdemo.sql
index 7fa1244..17bfeca 100644
--- a/binsrc/tests/suite/nwdemo.sql
+++ b/binsrc/tests/suite/nwdemo.sql
@@ -1,14 +1,14 @@
 --
 --  nwdemo.sql
 --
---  $Id: nwdemo.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: nwdemo.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Creates a demo database, works regardless of case mode
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwdemo_norefs.sql b/binsrc/tests/suite/nwdemo_norefs.sql
index 05fabde..a98610d 100644
--- a/binsrc/tests/suite/nwdemo_norefs.sql
+++ b/binsrc/tests/suite/nwdemo_norefs.sql
@@ -1,14 +1,14 @@
 --
 --  nwdemo.sql
 --
---  $Id: nwdemo_norefs.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: nwdemo_norefs.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Creates a demo database, works regardless of case mode
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwdemo_update.sql b/binsrc/tests/suite/nwdemo_update.sql
index a5990ad..0f3a5ca 100644
--- a/binsrc/tests/suite/nwdemo_update.sql
+++ b/binsrc/tests/suite/nwdemo_update.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwdemo_update.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwdemo_update.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml.sh b/binsrc/tests/suite/nwxml.sh
index e2bc10b..3ed4fa8 100755
--- a/binsrc/tests/suite/nwxml.sh
+++ b/binsrc/tests/suite/nwxml.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: nwxml.sh,v 1.4.2.2 2010/01/31 20:18:26 source Exp $
+#  $Id: nwxml.sh,v 1.4.2.3 2012/03/08 12:55:07 source Exp $
 #
 #  XML tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml.sql b/binsrc/tests/suite/nwxml.sql
index b279814..ad03908 100644
--- a/binsrc/tests/suite/nwxml.sql
+++ b/binsrc/tests/suite/nwxml.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml.sql,v 1.2.2.1 2009/04/16 12:37:42 source Exp $
+--  $Id: nwxml.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml1.sql b/binsrc/tests/suite/nwxml1.sql
index 1ed12b6..0516312 100644
--- a/binsrc/tests/suite/nwxml1.sql
+++ b/binsrc/tests/suite/nwxml1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml1.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxml1.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml2.sql b/binsrc/tests/suite/nwxml2.sql
index 6144a56..af0b8b4 100644
--- a/binsrc/tests/suite/nwxml2.sql
+++ b/binsrc/tests/suite/nwxml2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml2.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxml2.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml2_vad.sql b/binsrc/tests/suite/nwxml2_vad.sql
index fce38ab..c4cd566 100644
--- a/binsrc/tests/suite/nwxml2_vad.sql
+++ b/binsrc/tests/suite/nwxml2_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml2_vad.sql,v 1.1 2007/03/22 13:08:32 source Exp $
+--  $Id: nwxml2_vad.sql,v 1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml3.sql b/binsrc/tests/suite/nwxml3.sql
index 93b4c7c..8989a77 100644
--- a/binsrc/tests/suite/nwxml3.sql
+++ b/binsrc/tests/suite/nwxml3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml3.sql,v 1.2.2.1 2010/01/31 20:18:26 source Exp $
+--  $Id: nwxml3.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml3a.sql b/binsrc/tests/suite/nwxml3a.sql
index 4ad2f4c..393f05a 100644
--- a/binsrc/tests/suite/nwxml3a.sql
+++ b/binsrc/tests/suite/nwxml3a.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml3a.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxml3a.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml3b.sql b/binsrc/tests/suite/nwxml3b.sql
index 428a94b..d79752e 100644
--- a/binsrc/tests/suite/nwxml3b.sql
+++ b/binsrc/tests/suite/nwxml3b.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml3b.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxml3b.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml3c.sql b/binsrc/tests/suite/nwxml3c.sql
index add165f..7ae6bcd 100644
--- a/binsrc/tests/suite/nwxml3c.sql
+++ b/binsrc/tests/suite/nwxml3c.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml3c.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxml3c.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml4.sql b/binsrc/tests/suite/nwxml4.sql
index 055f95f..66255f9 100644
--- a/binsrc/tests/suite/nwxml4.sql
+++ b/binsrc/tests/suite/nwxml4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml4.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxml4.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxml_vad.sql b/binsrc/tests/suite/nwxml_vad.sql
index 092e545..8b84380 100644
--- a/binsrc/tests/suite/nwxml_vad.sql
+++ b/binsrc/tests/suite/nwxml_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxml_vad.sql,v 1.2 2007/11/30 09:41:08 source Exp $
+--  $Id: nwxml_vad.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmla.sql b/binsrc/tests/suite/nwxmla.sql
index 21ad71f..ea3764a 100644
--- a/binsrc/tests/suite/nwxmla.sql
+++ b/binsrc/tests/suite/nwxmla.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxmla.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxmla.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmlb.sql b/binsrc/tests/suite/nwxmlb.sql
index 461363a..eab3c13 100644
--- a/binsrc/tests/suite/nwxmlb.sql
+++ b/binsrc/tests/suite/nwxmlb.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nwxmlb.sql,v 1.1 2007/07/09 23:13:03 source Exp $
+--  $Id: nwxmlb.sql,v 1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmlco.sql b/binsrc/tests/suite/nwxmlco.sql
index 5c3300f..5acaf18 100644
--- a/binsrc/tests/suite/nwxmlco.sql
+++ b/binsrc/tests/suite/nwxmlco.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxmlco.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxmlco.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmlo.sql b/binsrc/tests/suite/nwxmlo.sql
index a8c6d7b..3b4a950 100644
--- a/binsrc/tests/suite/nwxmlo.sql
+++ b/binsrc/tests/suite/nwxmlo.sql
@@ -1,14 +1,14 @@
 --
 --  nwxmlo.sql
 --
---  $Id: nwxmlo.sql,v 1.3.2.2 2010/01/31 20:18:26 source Exp $
+--  $Id: nwxmlo.sql,v 1.3.2.3 2012/03/08 12:55:07 source Exp $
 --
 --  For XML auto testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmltype3.sql b/binsrc/tests/suite/nwxmltype3.sql
index c3662b7..654e653 100644
--- a/binsrc/tests/suite/nwxmltype3.sql
+++ b/binsrc/tests/suite/nwxmltype3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxmltype3.sql,v 1.2.2.1 2010/01/31 20:18:26 source Exp $
+--  $Id: nwxmltype3.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmltype3a.sql b/binsrc/tests/suite/nwxmltype3a.sql
index a0d7d41..9ec40f3 100644
--- a/binsrc/tests/suite/nwxmltype3a.sql
+++ b/binsrc/tests/suite/nwxmltype3a.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxmltype3a.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxmltype3a.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmltype3b.sql b/binsrc/tests/suite/nwxmltype3b.sql
index db4adfd..a402f3c 100644
--- a/binsrc/tests/suite/nwxmltype3b.sql
+++ b/binsrc/tests/suite/nwxmltype3b.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxmltype3b.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxmltype3b.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxmltype3c.sql b/binsrc/tests/suite/nwxmltype3c.sql
index 3c05777..6cc7dba 100644
--- a/binsrc/tests/suite/nwxmltype3c.sql
+++ b/binsrc/tests/suite/nwxmltype3c.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxmltype3c.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxmltype3c.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/nwxp.sql b/binsrc/tests/suite/nwxp.sql
index 153a608..e0661e4 100644
--- a/binsrc/tests/suite/nwxp.sql
+++ b/binsrc/tests/suite/nwxp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwxp.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: nwxp.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ob_tpcc_check.sql b/binsrc/tests/suite/ob_tpcc_check.sql
index 7a00e1c..ce586f5 100644
--- a/binsrc/tests/suite/ob_tpcc_check.sql
+++ b/binsrc/tests/suite/ob_tpcc_check.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ob_tpcc_check.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: ob_tpcc_check.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackup.sh b/binsrc/tests/suite/obackup.sh
index 500bb11..385d350 100755
--- a/binsrc/tests/suite/obackup.sh
+++ b/binsrc/tests/suite/obackup.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: obackup.sh,v 1.2.2.4 2010/01/28 14:33:20 source Exp $
+#  $Id: obackup.sh,v 1.2.2.5 2012/03/08 12:55:07 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackup.sql b/binsrc/tests/suite/obackup.sql
index 7d41f68..c1b1faa 100644
--- a/binsrc/tests/suite/obackup.sql
+++ b/binsrc/tests/suite/obackup.sql
@@ -1,14 +1,14 @@
 --
 --  tconcur2.sql
 --
---  $Id: obackup.sql,v 1.2.2.3 2009/07/09 13:04:50 source Exp $
+--  $Id: obackup.sql,v 1.2.2.4 2012/03/08 12:55:07 source Exp $
 --
 --  Concurrency test #2
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackup0.sql b/binsrc/tests/suite/obackup0.sql
index 1d36834..41ea8e9 100644
--- a/binsrc/tests/suite/obackup0.sql
+++ b/binsrc/tests/suite/obackup0.sql
@@ -1,14 +1,14 @@
 --
 --  obackup0.sql
 --
---  $Id: obackup0.sql,v 1.1.1.1.2.1 2009/04/16 12:37:42 source Exp $
+--  $Id: obackup0.sql,v 1.1.1.1.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  Online Backup stage 0
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackup1.sql b/binsrc/tests/suite/obackup1.sql
index 1a32cd2..6573030 100644
--- a/binsrc/tests/suite/obackup1.sql
+++ b/binsrc/tests/suite/obackup1.sql
@@ -1,14 +1,14 @@
 --
 --  obackup1.sql
 --
---  $Id: obackup1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: obackup1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Online Backup stage 0
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackup_userck.sql b/binsrc/tests/suite/obackup_userck.sql
index cfde353..5b3f836 100644
--- a/binsrc/tests/suite/obackup_userck.sql
+++ b/binsrc/tests/suite/obackup_userck.sql
@@ -1,10 +1,10 @@
 --
---  $Id: obackup_userck.sql,v 1.3.2.3 2009/07/09 13:04:50 source Exp $
+--  $Id: obackup_userck.sql,v 1.3.2.4 2012/03/08 12:55:07 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackup_userck2.sql b/binsrc/tests/suite/obackup_userck2.sql
index 372fc43..edc5d72 100644
--- a/binsrc/tests/suite/obackup_userck2.sql
+++ b/binsrc/tests/suite/obackup_userck2.sql
@@ -1,14 +1,14 @@
 --
 --  obackup_userck2.sql
 --
---  $Id: obackup_userck2.sql,v 1.2.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: obackup_userck2.sql,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 --
 --  Concurrency test #N..
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/obackupck.sql b/binsrc/tests/suite/obackupck.sql
index 29c97b0..4d5e9fa 100644
--- a/binsrc/tests/suite/obackupck.sql
+++ b/binsrc/tests/suite/obackupck.sql
@@ -1,14 +1,14 @@
 --
 --  obackupck.sql
 --
---  $Id: obackupck.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: obackupck.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Concurrency test #2
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/oledb.sh b/binsrc/tests/suite/oledb.sh
index f4df764..bd69536 100755
--- a/binsrc/tests/suite/oledb.sh
+++ b/binsrc/tests/suite/oledb.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: oledb.sh,v 1.2.2.1 2009/04/16 12:37:42 source Exp $
+#  $Id: oledb.sh,v 1.2.2.2 2012/03/08 12:55:07 source Exp $
 #
 #  OLE DB tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/pass.sql b/binsrc/tests/suite/pass.sql
index 216673c..8492b82 100644
--- a/binsrc/tests/suite/pass.sql
+++ b/binsrc/tests/suite/pass.sql
@@ -1,14 +1,14 @@
 --
 --  passt1.sql
 --
---  $Id: pass.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: pass.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  function pass-trough testsuite
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/pddin.sql b/binsrc/tests/suite/pddin.sql
index df376d6..a2a6efe 100644
--- a/binsrc/tests/suite/pddin.sql
+++ b/binsrc/tests/suite/pddin.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: pddin.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: pddin.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/pddin2.sql b/binsrc/tests/suite/pddin2.sql
index 0099a6e..2bc513c 100644
--- a/binsrc/tests/suite/pddin2.sql
+++ b/binsrc/tests/suite/pddin2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: pddin2.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: pddin2.sql,v 1.2.2.1 2012/03/08 12:55:07 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/complex-doc-1.xsd b/binsrc/tests/suite/r4/complex-doc-1.xsd
index 498089d..3477e1e 100644
--- a/binsrc/tests/suite/r4/complex-doc-1.xsd
+++ b/binsrc/tests/suite/r4/complex-doc-1.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/complex-doc-2.xsd b/binsrc/tests/suite/r4/complex-doc-2.xsd
index 15acbb4..799b009 100644
--- a/binsrc/tests/suite/r4/complex-doc-2.xsd
+++ b/binsrc/tests/suite/r4/complex-doc-2.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/complex-doc-3.xsd b/binsrc/tests/suite/r4/complex-doc-3.xsd
index f70177a..bacdbff 100644
--- a/binsrc/tests/suite/r4/complex-doc-3.xsd
+++ b/binsrc/tests/suite/r4/complex-doc-3.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/complex-doc-literal.sql b/binsrc/tests/suite/r4/complex-doc-literal.sql
index a6fc472..545331a 100644
--- a/binsrc/tests/suite/r4/complex-doc-literal.sql
+++ b/binsrc/tests/suite/r4/complex-doc-literal.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: complex-doc-literal.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: complex-doc-literal.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/complex-rpc-encoded.sql b/binsrc/tests/suite/r4/complex-rpc-encoded.sql
index b79e897..9dc5ac1 100644
--- a/binsrc/tests/suite/r4/complex-rpc-encoded.sql
+++ b/binsrc/tests/suite/r4/complex-rpc-encoded.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: complex-rpc-encoded.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: complex-rpc-encoded.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/complex-rpc-encoded.xsd b/binsrc/tests/suite/r4/complex-rpc-encoded.xsd
index c5df132..c5af8f5 100644
--- a/binsrc/tests/suite/r4/complex-rpc-encoded.xsd
+++ b/binsrc/tests/suite/r4/complex-rpc-encoded.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/dime-doc.sql b/binsrc/tests/suite/r4/dime-doc.sql
index 7dff621..f1644d7 100644
--- a/binsrc/tests/suite/r4/dime-doc.sql
+++ b/binsrc/tests/suite/r4/dime-doc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dime-doc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: dime-doc.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/dime-doc.xsd b/binsrc/tests/suite/r4/dime-doc.xsd
index 05959e1..83d3590 100644
--- a/binsrc/tests/suite/r4/dime-doc.xsd
+++ b/binsrc/tests/suite/r4/dime-doc.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/dime-rpc.sql b/binsrc/tests/suite/r4/dime-rpc.sql
index 8fcd8fb..a6c1dbd 100644
--- a/binsrc/tests/suite/r4/dime-rpc.sql
+++ b/binsrc/tests/suite/r4/dime-rpc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dime-rpc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: dime-rpc.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/dime-rpc.xsd b/binsrc/tests/suite/r4/dime-rpc.xsd
index 3232d20..1efc506 100644
--- a/binsrc/tests/suite/r4/dime-rpc.xsd
+++ b/binsrc/tests/suite/r4/dime-rpc.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/load_xsd.sql b/binsrc/tests/suite/r4/load_xsd.sql
index cd7be4c..07a6678 100644
--- a/binsrc/tests/suite/r4/load_xsd.sql
+++ b/binsrc/tests/suite/r4/load_xsd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: load_xsd.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: load_xsd.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/mime-doc.sql b/binsrc/tests/suite/r4/mime-doc.sql
index 250b948..91651ac 100644
--- a/binsrc/tests/suite/r4/mime-doc.sql
+++ b/binsrc/tests/suite/r4/mime-doc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mime-doc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: mime-doc.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/mime-rpc.sql b/binsrc/tests/suite/r4/mime-rpc.sql
index d22664b..34b9b02 100644
--- a/binsrc/tests/suite/r4/mime-rpc.sql
+++ b/binsrc/tests/suite/r4/mime-rpc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mime-rpc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: mime-rpc.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/round4xsd-1.xsd b/binsrc/tests/suite/r4/round4xsd-1.xsd
index 2b2a736..220945e 100644
--- a/binsrc/tests/suite/r4/round4xsd-1.xsd
+++ b/binsrc/tests/suite/r4/round4xsd-1.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/round4xsd-2.xsd b/binsrc/tests/suite/r4/round4xsd-2.xsd
index c227165..c6b3b6a 100644
--- a/binsrc/tests/suite/r4/round4xsd-2.xsd
+++ b/binsrc/tests/suite/r4/round4xsd-2.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/round4xsd-3.xsd b/binsrc/tests/suite/r4/round4xsd-3.xsd
index 0a5afd5..56d3cb0 100644
--- a/binsrc/tests/suite/r4/round4xsd-3.xsd
+++ b/binsrc/tests/suite/r4/round4xsd-3.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/round4xsd-4.xsd b/binsrc/tests/suite/r4/round4xsd-4.xsd
index fdc4d7d..73f6859 100644
--- a/binsrc/tests/suite/r4/round4xsd-4.xsd
+++ b/binsrc/tests/suite/r4/round4xsd-4.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/simple-doc-literal-1.xsd b/binsrc/tests/suite/r4/simple-doc-literal-1.xsd
index 063d013..b1d4462 100644
--- a/binsrc/tests/suite/r4/simple-doc-literal-1.xsd
+++ b/binsrc/tests/suite/r4/simple-doc-literal-1.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/simple-doc-literal-2.xsd b/binsrc/tests/suite/r4/simple-doc-literal-2.xsd
index 0725377..8df51ee 100644
--- a/binsrc/tests/suite/r4/simple-doc-literal-2.xsd
+++ b/binsrc/tests/suite/r4/simple-doc-literal-2.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/simple-doc-literal-3.xsd b/binsrc/tests/suite/r4/simple-doc-literal-3.xsd
index 12963a3..cf5c02d 100644
--- a/binsrc/tests/suite/r4/simple-doc-literal-3.xsd
+++ b/binsrc/tests/suite/r4/simple-doc-literal-3.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/simple-doc-literal.sql b/binsrc/tests/suite/r4/simple-doc-literal.sql
index 24b673a..1be3a55 100644
--- a/binsrc/tests/suite/r4/simple-doc-literal.sql
+++ b/binsrc/tests/suite/r4/simple-doc-literal.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: simple-doc-literal.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: simple-doc-literal.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/simple-rpc-encoded.sql b/binsrc/tests/suite/r4/simple-rpc-encoded.sql
index 2b37c31..26b6ef3 100644
--- a/binsrc/tests/suite/r4/simple-rpc-encoded.sql
+++ b/binsrc/tests/suite/r4/simple-rpc-encoded.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: simple-rpc-encoded.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: simple-rpc-encoded.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/simple-rpc-encoded.xsd b/binsrc/tests/suite/r4/simple-rpc-encoded.xsd
index 57b8037..c14b56e 100644
--- a/binsrc/tests/suite/r4/simple-rpc-encoded.xsd
+++ b/binsrc/tests/suite/r4/simple-rpc-encoded.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/r4/xsd.sql b/binsrc/tests/suite/r4/xsd.sql
index 95d8093..8942aa2 100644
--- a/binsrc/tests/suite/r4/xsd.sql
+++ b/binsrc/tests/suite/r4/xsd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xsd.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: xsd.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rdfldck.sql b/binsrc/tests/suite/rdfldck.sql
index 0dd4c07..c820859 100644
--- a/binsrc/tests/suite/rdfldck.sql
+++ b/binsrc/tests/suite/rdfldck.sql
@@ -2,10 +2,34 @@
 
 -- check and stats statements for rdf
 
+wait_for_children;
 
 select count (*) from rdf_quad a table option (index rdf_quad) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_pogs) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
 select count (*) from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index primary key) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
 
+select count (*) from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_op) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
+select count (*) from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_sp) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
+select count (*) from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_gs) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
+
+
+-- 
+select count (s), count (p), count (o), count (g) from rdf_quad table option (index rdf_quad);
+
+
+-- op oow
+select count (*)  from rdf_quad a table option (index rdf_quad_op, index_only) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_op, index_only) where  a.p = b.p and a.o = b.o );
+
+create table rq_psog (p iri_id_8, s iri_id_8, o any, g iri_id_8, primary key (p,s,o,g));
+create table rq_pogs (p iri_id_8, s iri_id_8, o any, g iri_id_8, primary key (p,o,g,s));
+
+log_enable (2);
+insert into rq_psog (p,s,o,g) select p, s,o,g from rdf_quad table option (index rdf_quad);
+insert into rq_pogs (p,s,o,g) select p, s,o,g from rdf_quad table option (index rdf_quad_pogs);
+
+
+-- partial key only
+select count (*) from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_op, index_only) where  a.p = b.p and a.o = b.o );
+
 select count (*) from rdf_iri a where not  exists (select 1 from rdf_iri b table option (loop) where  a.ri_id = b.ri_id);
 select count (*) from rdf_iri a where not  exists (select 1 from rdf_iri b table option (loop) where  a.ri_name = b.ri_name);
 
@@ -17,6 +41,8 @@ select count (*) from rdf_obj a table option (index rdf_obj) where not exists (s
 select count (*) from rdf_obj a table option (index ro_val) where not exists (select 1 from rdf_obj b table option (index rdf_obj, loop) where b.ro_id = a.ro_id and b.ro_val = a.ro_val and b.ro_dt_and_lang = a.ro_dt_and_lang);
 
 
+select count (*) from rdf_quad where not exists (select 1 from rdf_obj where ro_id = rdf_box_ro_id (o)) and is_rdf_box (o);
+
 select count (*) from rdf_quad a table option (index primary key) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_ogps) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
 
 select count (*) from rdf_quad a table option (index rdf_quad_ogps) where not exists (select 1 from rdf_quad b table option (loop, index primary key) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
@@ -84,13 +110,13 @@ insert into RDF_IRI index DB_DBA_RDF_IRI_UNQC_RI_ID (RI_ID, RI_NAME) select id,
 
 
 
-create procedure DEL_IRI_PK_DP (in n varcjar, in id iri_id)
+create procedure DEL_IRI_PK_DP (in n varchar, in id iri_id)
 {
   delete from rdf_iri table option (no cluster, index rdf_iri) where ri_id = id and ri_name = n option (index rdf_iri, no cluster);
   return vector (row_count (), 1);
 }
 
-create procedure DEL_IRI_ID_DP (in id iri_id, in n varcjar)
+create procedure DEL_IRI_ID_DP (in id iri_id, in n varchar)
 {
   delete from rdf_iri table option (no cluster, index DB_DBA_RDF_IRI_UNQC_RI_ID) where ri_id = id and ri_name = n option (index DB_DBA_RDF_IRI_UNQC_RI_ID, no cluster);
   return vector (row_count (), 1);
@@ -248,3 +274,109 @@ create procedure rdf_order_ck ()
     p1 := p; o1 := o; g1 := g; s1 := s;
     }
 }
+
+select count (*) from c..rdf_quad a table option (index c_rdf_quad_pogs) where not exists (select 1 from c..rdf_quad b table option (loop, index c_rdf_quad_pogs) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s);
+
+
+
+
+create table rq_psog (
+  G IRI_ID_8,
+  S IRI_ID_8,
+  P IRI_ID_8,
+  O any,
+  primary key (P, S, O, G) column
+  )
+alter index rq_pogs on rq_pogs partition (S int (0hexffff00))
+
+
+
+create procedure  ckpogs ()
+{
+  declare p1, g1, s1 iri_id;
+  declare o1 any;
+  p1 := null;
+  o1 := null;
+  g1 := null;
+  s1 := null;
+  for select p, o, g, s from rdf_quad table option (index rdf_quad_pogs) do 
+    {
+      
+      if (p < p1) goto oow;
+      if (p = p1 and o < o1) goto oow;
+      if (p = p1 and o = o1 and g < g1) goto oow;
+      if (p = p1 and o = o1 and g = g1 and s <= s1) goto oow;
+    p1 := p; s1 := s; o1 := o; p1 := p;
+      goto loop;
+    oow:
+      dbg_obj_princ ('oow ', p, o, g, s,  ' after ', p1, o1, g1, s1);
+      return;
+    loop: ;
+    }
+}
+
+
+create procedure  ckop ()
+{
+  declare p1, g1, s1 iri_id;
+  declare o1 any;
+  p1 := null;
+  o1 := null;
+  g1 := null;
+  s1 := null;
+  cl_set_slice ('DB.DBA.RDF_QUAD',  'RDF_QUAD_OP', 31);
+  for select o, p from rdf_quad table option (index rdf_quad_op, index_only, no cluster) do 
+    {
+      
+      if (o < o1) goto oow;
+      if (o = o1 and p < p1) goto oow;
+    p1 := p; o1 := o;
+      goto next;
+    oow:
+      dbg_obj_princ ('oow ', o, p,  ' after ', o1, p1);
+      signal ('oowop', 'in loop asc  ck');
+      return;
+    next: ;
+    }
+}
+
+
+
+create procedure slice_ck_slice (in slid int)
+{
+	declare cnt int;
+	cl_detach_thread ();
+	cl_set_slice ('DB.DBA.RDF_QUAD',  'RDF_QUAD', slid);
+	cnt := (select count (*) from rdf_quad a table option (index rdf_quad_pogs, no cluster) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_pogs, no cluster)  where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s));
+	if (0 <> cnt)
+	log_message (sprintf ('Slice %d out of whack by %d', slid, cnt));
+}
+
+create procedure slice_ck ()
+{
+  cl_detach_thread ();
+  cl_exec ('cl_call_local_slices (''DB.DBA.RDF_QUAD'',  ''RDF_QUAD'', ''slice_ck_slice'',  vector ())');
+}
+
+
+
+
+create procedure rq_slice_cnt (in slid int)
+{
+  cl_set_slice ('DB.DBA.RDF_QUAD',  'RDF_QUAD', slid);
+  dbg_obj_print ('psog dist ', (select count (*) from (select distinct g,s,o,p from rdf_quad table option (index rdf_quad, no cluster)) f));
+  dbg_obj_print ('psog ', (select count (*) from rdf_quad table option (index rdf_quad, no cluster)), 'pogs ', (select count (*) from rdf_quad table option (index rdf_quad_pogs, no cluster)));
+}
+
+
+cl_exec ('__dbf_set (''dbf_col_ins_dbg_log'', 1002)');
+
+sequence_set ('__NEXT__RDF_URL_IID_NAMED', 2147483648 - 500000, 0);
+sequence_set ('__NEXT__RDF_RO_ID', 2147483648 - 500000, 0);
+
+sequence_set ('__NEXT__RDF_URL_IID_NAMED', bit_shift (1, 32) - 300000, 0);
+sequence_set ('__NEXT__RDF_RO_ID', bit_shift (1, 32) + 100, 0);
+
+select top 1 iri_id_num (ri_id) - bit_shift (1, 32) from rdf_iri order by ri_id desc;
+
+select top 1 ro_id - bit_shift (1, 32) from rdf_obj order by ro_id desc;
diff --git a/binsrc/tests/suite/recovck1.sql b/binsrc/tests/suite/recovck1.sql
index 3a12959..67f91a1 100644
--- a/binsrc/tests/suite/recovck1.sql
+++ b/binsrc/tests/suite/recovck1.sql
@@ -1,14 +1,14 @@
 --
 --  recovck1.sql
 --
---  $Id: recovck1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: recovck1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Recovery check test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/recovck1_noreg.sql b/binsrc/tests/suite/recovck1_noreg.sql
index 7130cce..9faedaf 100644
--- a/binsrc/tests/suite/recovck1_noreg.sql
+++ b/binsrc/tests/suite/recovck1_noreg.sql
@@ -1,14 +1,14 @@
 --
 --  recovck1_noreg.sql
 --
---  $Id: recovck1_noreg.sql,v 1.1.1.1.2.2 2009/11/10 15:54:05 source Exp $
+--  $Id: recovck1_noreg.sql,v 1.1.1.1.2.3 2012/03/08 12:55:07 source Exp $
 --
 --  Recovery check test
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/revstr.sql b/binsrc/tests/suite/revstr.sql
index 0c3fe4c..9846984 100644
--- a/binsrc/tests/suite/revstr.sql
+++ b/binsrc/tests/suite/revstr.sql
@@ -1,14 +1,14 @@
 --
 --  revstr.sql
 --
---  $Id: revstr.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: revstr.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  Stored Procedure to reverse a string argument
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rexecute.sql b/binsrc/tests/suite/rexecute.sql
index 22ec207..3628f89 100644
--- a/binsrc/tests/suite/rexecute.sql
+++ b/binsrc/tests/suite/rexecute.sql
@@ -1,14 +1,14 @@
 --
 --  rexecute.sql
 --
---  $Id: rexecute.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rexecute.sql,v 1.1.1.1.2.1 2012/03/08 12:55:07 source Exp $
 --
 --  rexecute suite testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rls.sql b/binsrc/tests/suite/rls.sql
index 1afdc7e..0c14573 100644
--- a/binsrc/tests/suite/rls.sql
+++ b/binsrc/tests/suite/rls.sql
@@ -1,14 +1,14 @@
 --
 --  rls.sql
 --
---  $Id: rls.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rls.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Row level security tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rls_attach.sql b/binsrc/tests/suite/rls_attach.sql
index 42d0e09..0c39286 100644
--- a/binsrc/tests/suite/rls_attach.sql
+++ b/binsrc/tests/suite/rls_attach.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rls_attach.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: rls_attach.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rls_create.sql b/binsrc/tests/suite/rls_create.sql
index 559a4b3..fdfe015 100644
--- a/binsrc/tests/suite/rls_create.sql
+++ b/binsrc/tests/suite/rls_create.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rls_create.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: rls_create.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rpjoin.sql b/binsrc/tests/suite/rpjoin.sql
index 725901b..657f910 100644
--- a/binsrc/tests/suite/rpjoin.sql
+++ b/binsrc/tests/suite/rpjoin.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rpjoin.sql,v 1.3.2.2 2009/07/09 13:04:50 source Exp $
+--  $Id: rpjoin.sql,v 1.3.2.3 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rproc1.sql b/binsrc/tests/suite/rproc1.sql
index cc61376..b9b6db1 100644
--- a/binsrc/tests/suite/rproc1.sql
+++ b/binsrc/tests/suite/rproc1.sql
@@ -1,14 +1,14 @@
 --
 --  rproc1.sql
 --
---  $Id: rproc1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rproc1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  procedure attachment testsuite
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rproc2.sql b/binsrc/tests/suite/rproc2.sql
index 4870479..8030441 100644
--- a/binsrc/tests/suite/rproc2.sql
+++ b/binsrc/tests/suite/rproc2.sql
@@ -1,14 +1,14 @@
 --
 --  rproc2.sql
 --
---  $Id: rproc2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rproc2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  procedure attachment testsuite destination part
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest.sh b/binsrc/tests/suite/rtest.sh
index aaa3669..d10cc3f 100755
--- a/binsrc/tests/suite/rtest.sh
+++ b/binsrc/tests/suite/rtest.sh
@@ -2,14 +2,14 @@
 #
 #  rtest.sh
 #
-#  $Id: rtest.sh,v 1.4.2.2 2010/01/31 20:18:26 source Exp $
+#  $Id: rtest.sh,v 1.4.2.4 2012/03/12 22:45:09 source Exp $
 #
 #  SQL conformance tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -92,7 +92,7 @@ then
     exit 1
 fi
 
-../blobs $DS1
+RUN $BLOBS $DS1
 
 RUN $ISQL $DS1 PROMPT=OFF VERBOSE=OFF ERRORS=STDOUT < rtest1-1.sql
 
@@ -251,7 +251,7 @@ fi
 # NOT AVAILABLE
 
 LOG "Scrolling through the VDB."
-RUN ../scroll $DS2 100 R1 R1
+RUN $SCROLL $DS2 100 R1 R1
 if test $STATUS -ne 0
 then
     LOG "***ABORTED: rtest.sh: scroll"
diff --git a/binsrc/tests/suite/rtest1-1.sql b/binsrc/tests/suite/rtest1-1.sql
index fcc6f0f..5405d64 100644
--- a/binsrc/tests/suite/rtest1-1.sql
+++ b/binsrc/tests/suite/rtest1-1.sql
@@ -1,14 +1,14 @@
 --
 --  rtest1-1.sql
 --
---  $Id: rtest1-1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest1-1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest1.sql b/binsrc/tests/suite/rtest1.sql
index 6e6cb18..ef6e876 100644
--- a/binsrc/tests/suite/rtest1.sql
+++ b/binsrc/tests/suite/rtest1.sql
@@ -1,14 +1,14 @@
 --
 --  rtest1.sql
 --
---  $Id: rtest1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing part 1
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest2-1.sql b/binsrc/tests/suite/rtest2-1.sql
index 5739d1b..c723f4d 100644
--- a/binsrc/tests/suite/rtest2-1.sql
+++ b/binsrc/tests/suite/rtest2-1.sql
@@ -1,14 +1,14 @@
 --
 --  rtest2-1.sql
 --
---  $Id: rtest2-1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest2-1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest2.sql b/binsrc/tests/suite/rtest2.sql
index 6d86360..b0dafad 100644
--- a/binsrc/tests/suite/rtest2.sql
+++ b/binsrc/tests/suite/rtest2.sql
@@ -1,14 +1,14 @@
 --
 --  rtest2.sql
 --
---  $Id: rtest2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing part 2
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest3.sql b/binsrc/tests/suite/rtest3.sql
index b314bb9..2fed1c0 100644
--- a/binsrc/tests/suite/rtest3.sql
+++ b/binsrc/tests/suite/rtest3.sql
@@ -1,14 +1,14 @@
 --
 --  rtest3.sql
 --
---  $Id: rtest3.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest3.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing part 3
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest4.sql b/binsrc/tests/suite/rtest4.sql
index ece7f96..a59fa6a 100644
--- a/binsrc/tests/suite/rtest4.sql
+++ b/binsrc/tests/suite/rtest4.sql
@@ -1,14 +1,14 @@
 --
 --  rtest4.sql
 --
---  $Id: rtest4.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest4.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing part 4
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtest5.sql b/binsrc/tests/suite/rtest5.sql
index 98a5855..f078f55 100644
--- a/binsrc/tests/suite/rtest5.sql
+++ b/binsrc/tests/suite/rtest5.sql
@@ -1,14 +1,14 @@
 --
 --  rtest5.sql
 --
---  $Id: rtest5.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: rtest5.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing part 5
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtesta.sql b/binsrc/tests/suite/rtesta.sql
index 56b5d99..26feb88 100644
--- a/binsrc/tests/suite/rtesta.sql
+++ b/binsrc/tests/suite/rtesta.sql
@@ -1,14 +1,14 @@
 --
 --  rtesta.sql
 --
---  $Id: rtesta.sql,v 1.2.2.2 2009/09/17 14:47:09 source Exp $
+--  $Id: rtesta.sql,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/rtrxdead.sql b/binsrc/tests/suite/rtrxdead.sql
index 3bd2cf6..7bfeefb 100644
--- a/binsrc/tests/suite/rtrxdead.sql
+++ b/binsrc/tests/suite/rtrxdead.sql
@@ -1,14 +1,14 @@
 --
 --  rtrxdead.sql
 --
---  $Id: rtrxdead.sql,v 1.2.2.3 2010/01/31 20:18:26 source Exp $
+--  $Id: rtrxdead.sql,v 1.2.2.4 2012/03/08 12:55:08 source Exp $
 --
 --  Remote database transaction testing
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/selt1.sql b/binsrc/tests/suite/selt1.sql
index 6d1f0c1..1a387c7 100644
--- a/binsrc/tests/suite/selt1.sql
+++ b/binsrc/tests/suite/selt1.sql
@@ -1,7 +1,7 @@
 --
 --  selt1.sql
 --
---  $Id: selt1.sql,v 1.1.1.1.2.1 2010/01/25 23:27:37 source Exp $
+--  $Id: selt1.sql,v 1.1.1.1.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  checkpoint errors #1.
 
@@ -9,7 +9,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/selt2.sql b/binsrc/tests/suite/selt2.sql
index 89b3877..a5cbc3b 100644
--- a/binsrc/tests/suite/selt2.sql
+++ b/binsrc/tests/suite/selt2.sql
@@ -1,7 +1,7 @@
 --
 --  selt2.sql
 --
---  $Id: selt2.sql,v 1.1.1.1.2.1 2010/01/25 23:27:37 source Exp $
+--  $Id: selt2.sql,v 1.1.1.1.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  checkpoint errors #2.
 
@@ -9,7 +9,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/selt3.sql b/binsrc/tests/suite/selt3.sql
index c1ec662..88c8da8 100644
--- a/binsrc/tests/suite/selt3.sql
+++ b/binsrc/tests/suite/selt3.sql
@@ -1,7 +1,7 @@
 --
 --  selt3.sql
 --
---  $Id: selt3.sql,v 1.1.1.1.2.1 2010/01/25 23:27:37 source Exp $
+--  $Id: selt3.sql,v 1.1.1.1.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  checkpoint errors #3.
 
@@ -9,7 +9,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/selt4.sql b/binsrc/tests/suite/selt4.sql
index 40d0119..3098611 100644
--- a/binsrc/tests/suite/selt4.sql
+++ b/binsrc/tests/suite/selt4.sql
@@ -1,7 +1,7 @@
 --
 --  selt4.sql
 --
---  $Id: selt4.sql,v 1.1.1.1.2.1 2010/01/25 23:27:37 source Exp $
+--  $Id: selt4.sql,v 1.1.1.1.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  checkpoint errors #4.
 
@@ -9,7 +9,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/selt5.sql b/binsrc/tests/suite/selt5.sql
index 29503d5..4ce7e9a 100644
--- a/binsrc/tests/suite/selt5.sql
+++ b/binsrc/tests/suite/selt5.sql
@@ -1,14 +1,14 @@
 --
 --  selt5.sql
 --
---  $Id: selt5.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: selt5.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  checkpoint errors #1.
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/soapauth.sql b/binsrc/tests/suite/soapauth.sql
index def45ea..799e95a 100644
--- a/binsrc/tests/suite/soapauth.sql
+++ b/binsrc/tests/suite/soapauth.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: soapauth.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: soapauth.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/sqlo.sql b/binsrc/tests/suite/sqlo.sql
index 3829acc..6d5c572 100644
--- a/binsrc/tests/suite/sqlo.sql
+++ b/binsrc/tests/suite/sqlo.sql
@@ -1,14 +1,14 @@
 --
 --  sqlo.sql
 --
---  $Id: sqlo.sql,v 1.5.2.7 2010/01/31 20:18:26 source Exp $
+--  $Id: sqlo.sql,v 1.5.2.8 2012/03/08 12:55:08 source Exp $
 --
 --  Various SQL optimized compiler tests.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/sqlo2.sql b/binsrc/tests/suite/sqlo2.sql
index e3d3c82..b1e503b 100644
--- a/binsrc/tests/suite/sqlo2.sql
+++ b/binsrc/tests/suite/sqlo2.sql
@@ -1,14 +1,14 @@
 --
 --  sqlo2.sql
 --
---  $Id: sqlo2.sql,v 1.4.2.5 2010/12/10 12:24:41 source Exp $
+--  $Id: sqlo2.sql,v 1.4.2.6 2012/03/08 12:55:08 source Exp $
 --
 --  Various SQL optimized compiler tests, part 2.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/sqlovdb.sql b/binsrc/tests/suite/sqlovdb.sql
index ceb9e38..2484715 100644
--- a/binsrc/tests/suite/sqlovdb.sql
+++ b/binsrc/tests/suite/sqlovdb.sql
@@ -1,14 +1,14 @@
 --
 --  sqlovdb.sql
 --
---  $Id: sqlovdb.sql,v 1.6.2.3 2009/08/09 00:16:20 source Exp $
+--  $Id: sqlovdb.sql,v 1.6.2.4 2012/03/08 12:55:08 source Exp $
 --
 --  SQLO Remote database testing part 1
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/stat.sql b/binsrc/tests/suite/stat.sql
index 5f9339c..048d1f4 100644
--- a/binsrc/tests/suite/stat.sql
+++ b/binsrc/tests/suite/stat.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: stat.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: stat.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/succ.sql b/binsrc/tests/suite/succ.sql
index 0cd30f6..6b2560a 100644
--- a/binsrc/tests/suite/succ.sql
+++ b/binsrc/tests/suite/succ.sql
@@ -1,14 +1,14 @@
 --
 --  succ.sql
 --
---  $Id: succ.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: succ.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Stored Procedure to increase the last character of the argument by one.
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tacl.sql b/binsrc/tests/suite/tacl.sql
index 87daa03..f74c488 100644
--- a/binsrc/tests/suite/tacl.sql
+++ b/binsrc/tests/suite/tacl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tacl.sql,v 1.2.2.1 2010/09/20 08:27:40 source Exp $
+--  $Id: tacl.sql,v 1.2.2.2 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tarith.sql b/binsrc/tests/suite/tarith.sql
index 456b725..4d7abf4 100644
--- a/binsrc/tests/suite/tarith.sql
+++ b/binsrc/tests/suite/tarith.sql
@@ -1,14 +1,14 @@
 --
 --  tarrith.sql
 --
---  $Id: tarith.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tarith.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Arithmetic tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tarray.sql b/binsrc/tests/suite/tarray.sql
index f6c5b09..8ad81e4 100644
--- a/binsrc/tests/suite/tarray.sql
+++ b/binsrc/tests/suite/tarray.sql
@@ -1,14 +1,14 @@
 --
 --  tarray.sql
 --
---  $Id: tarray.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tarray.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Testing array fields
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tbak.sql b/binsrc/tests/suite/tbak.sql
index dea703d..ff5f721 100644
--- a/binsrc/tests/suite/tbak.sql
+++ b/binsrc/tests/suite/tbak.sql
@@ -1,14 +1,14 @@
 --
 --  tbak.sql
 --
---  $Id: tbak.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tbak.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Test backup functionality
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tbfree.sql b/binsrc/tests/suite/tbfree.sql
index cbd8dde..e5b71f2 100644
--- a/binsrc/tests/suite/tbfree.sql
+++ b/binsrc/tests/suite/tbfree.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tbfree.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: tbfree.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tbin.sql b/binsrc/tests/suite/tbin.sql
index eefda12..2b527b7 100644
--- a/binsrc/tests/suite/tbin.sql
+++ b/binsrc/tests/suite/tbin.sql
@@ -1,14 +1,14 @@
 --
 --  tbin.sql
 --
---  $Id: tbin.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tbin.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Test distinct varbinary and varchar
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tbitmap.sql b/binsrc/tests/suite/tbitmap.sql
index 901dc26..883e4fc 100644
--- a/binsrc/tests/suite/tbitmap.sql
+++ b/binsrc/tests/suite/tbitmap.sql
@@ -1,5 +1,8 @@
 echo both "Bitmap index tests\n";
 
+--set echo on;
+
+
 drop table tb;
 create table tb (id int primary key, k1 int, k2 int);
 
@@ -11,6 +14,10 @@ create procedure bmck (in n int := 0)
   --return;
   if ((select count (*) from tb table option (index tb)) <> (select count (*) from tb table option (index k1)))
 	signal  ('BMFUP', sprintf ('bm inx out of whack %d', n));
+  if (0 <> (select count (*) from tb a table option (index tb) where not exists (select 1 from tb b table option (loop, index k1) where a.id = b.id and a.k1 = b.k1)))
+    signal ('BMFUP',  'bm inx does not contain pk row');
+  if (0 <> (select count (*) from tb a table option (index k1) where not exists (select 1 from tb b table option (loop, index tb) where a.id = b.id and a.k1 = b.k1)))
+    signal ('BMFUP',  'pk does not contain bm row');
 }
 
 insert into tb values (10, 11, 0);
@@ -102,10 +109,15 @@ select id, k1 from tb a table option (index primary  key) where   id - 1 <> (sel
 echo both $if $equ $rowcnt 704 "PASSED" "***FAILED";
 echo both ": bm select of previous in desc order with lt\n";
 
-select id, k1 from tb a table option (index primary  key) where   id - 1 <> (select b.id from tb b table option (index k1) where b.k1 = a.k1 and b.id < a.id order by b.id + 0 desc);
+select id, k1 from tb a table option (index primary  key) where   id - 1 <> (select b.id from tb b table option (index k1, loop) where b.k1 = a.k1 and b.id < a.id order by b.id + 0 desc);
 echo both $if $equ $rowcnt 704 "PASSED" "***FAILED";
 echo both ": bm select of previous in desc order with lt sorted desc oby\n";
 
+select id, k1 from tb a table option (index primary  key) where   id - 1 <> (select b.id from tb b table option (index k1, hash) where b.k1 = a.k1 and b.id < a.id order by b.id + 0 desc);
+echo both $if $equ $rowcnt 704 "PASSED" "***FAILED";
+echo both ": bm select of previous in desc order with lt sorted desc oby w hash\n";
+
+
 
 select id, k1 from tb a table option (index primary  key) where   id - 1 <> (select b.id from tb b table option (index primary key) where b.k1 = a.k1 and b.id < a.id order by b.id desc);
 echo both $if $equ $rowcnt 704 "PASSED" "***FAILED";
@@ -248,7 +260,7 @@ bmck (14);
 rollback work;
 
 bmck (15);
-
+exit;
 set autocommit manual;
 update tb set k1 = id;
 bmck (16);
diff --git a/binsrc/tests/suite/tblob.sql b/binsrc/tests/suite/tblob.sql
index 1732e80..2a6f7c2 100644
--- a/binsrc/tests/suite/tblob.sql
+++ b/binsrc/tests/suite/tblob.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tblob.sql,v 1.2.2.3 2009/11/10 15:54:05 source Exp $
+--  $Id: tblob.sql,v 1.2.2.4 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tblob_recode.sh b/binsrc/tests/suite/tblob_recode.sh
index 2f28d4b..b849878 100755
--- a/binsrc/tests/suite/tblob_recode.sh
+++ b/binsrc/tests/suite/tblob_recode.sh
@@ -1,13 +1,13 @@
 #!/bin/sh 
 #
-#  $Id: tblob_recode.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: tblob_recode.sh,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 #
 #  blob recoding tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tblog.sql b/binsrc/tests/suite/tblog.sql
index f6bd4c5..cc36788 100644
--- a/binsrc/tests/suite/tblog.sql
+++ b/binsrc/tests/suite/tblog.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tblog.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: tblog.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tblogq.sql b/binsrc/tests/suite/tblogq.sql
index 6d5f067..70e5858 100644
--- a/binsrc/tests/suite/tblogq.sql
+++ b/binsrc/tests/suite/tblogq.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tblogq.sql,v 1.2 2006/08/16 07:58:10 source Exp $
+--  $Id: tblogq.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tbunion.sql b/binsrc/tests/suite/tbunion.sql
index 495241c..a56d615 100644
--- a/binsrc/tests/suite/tbunion.sql
+++ b/binsrc/tests/suite/tbunion.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tbunion.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tbunion.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tcast.sql b/binsrc/tests/suite/tcast.sql
index 414fbd6..85a3648 100644
--- a/binsrc/tests/suite/tcast.sql
+++ b/binsrc/tests/suite/tcast.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tcast.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tcast.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tchars.sql b/binsrc/tests/suite/tchars.sql
index 3e30170..85ec71c 100644
--- a/binsrc/tests/suite/tchars.sql
+++ b/binsrc/tests/suite/tchars.sql
@@ -1,14 +1,14 @@
 --
 --  tchars.sql
 --
---  $Id: tchars.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tchars.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  strict chars testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tcheck.sql b/binsrc/tests/suite/tcheck.sql
index 22f0be3..2562f4b 100644
--- a/binsrc/tests/suite/tcheck.sql
+++ b/binsrc/tests/suite/tcheck.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tcheck.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tcheck.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tcoll.sql b/binsrc/tests/suite/tcoll.sql
index 4a38d4c..abb1ed8 100644
--- a/binsrc/tests/suite/tcoll.sql
+++ b/binsrc/tests/suite/tcoll.sql
@@ -1,14 +1,14 @@
 --
 --  tcoll.sql
 --
---  $Id: tcoll.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tcoll.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Collation tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tconcur2.sql b/binsrc/tests/suite/tconcur2.sql
index 6adc04f..8da0340 100644
--- a/binsrc/tests/suite/tconcur2.sql
+++ b/binsrc/tests/suite/tconcur2.sql
@@ -1,14 +1,14 @@
 --
 --  tconcur2.sql
 --
---  $Id: tconcur2.sql,v 1.1.1.1.2.1 2009/04/16 12:37:43 source Exp $
+--  $Id: tconcur2.sql,v 1.1.1.1.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  Concurrency test #2
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tcpt.sh b/binsrc/tests/suite/tcpt.sh
index 9648d78..f9bf95d 100755
--- a/binsrc/tests/suite/tcpt.sh
+++ b/binsrc/tests/suite/tcpt.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tcpt.sh,v 1.3 2008/06/19 11:35:01 source Exp $
+#  $Id: tcpt.sh,v 1.3.2.1 2012/03/08 12:55:08 source Exp $
 #
 #  Database recovery tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tcred.sql b/binsrc/tests/suite/tcred.sql
index 7a93151..a12aa38 100644
--- a/binsrc/tests/suite/tcred.sql
+++ b/binsrc/tests/suite/tcred.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tcred.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tcred.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdate.sql b/binsrc/tests/suite/tdate.sql
index 29c27ec..4f8a8c6 100644
--- a/binsrc/tests/suite/tdate.sql
+++ b/binsrc/tests/suite/tdate.sql
@@ -1,14 +1,14 @@
 --
 --  tdate.sql
 --
---  $Id: tdate.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tdate.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Some simple date checking functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdatefun.sql b/binsrc/tests/suite/tdatefun.sql
index 3af6932..c21ff0c 100644
--- a/binsrc/tests/suite/tdatefun.sql
+++ b/binsrc/tests/suite/tdatefun.sql
@@ -1,14 +1,14 @@
 --
 --  tdatefun.sql
 --
---  $Id: tdatefun.sql,v 1.2 2009/03/10 14:32:26 source Exp $
+--  $Id: tdatefun.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Test date and timestamp functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav.sh b/binsrc/tests/suite/tdav.sh
index 0649062..e58d196 100755
--- a/binsrc/tests/suite/tdav.sh
+++ b/binsrc/tests/suite/tdav.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tdav.sh,v 1.3.2.3 2010/01/28 14:33:20 source Exp $
+#  $Id: tdav.sh,v 1.3.2.4 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav.sql b/binsrc/tests/suite/tdav.sql
index f31dfe7..6b82d1c 100644
--- a/binsrc/tests/suite/tdav.sql
+++ b/binsrc/tests/suite/tdav.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdav.sql,v 1.3 2007/01/22 14:09:29 source Exp $
+--  $Id: tdav.sql,v 1.3.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav1.sql b/binsrc/tests/suite/tdav1.sql
index e6be68c..ea2646d 100644
--- a/binsrc/tests/suite/tdav1.sql
+++ b/binsrc/tests/suite/tdav1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdav1.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdav1.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav_conc.sql b/binsrc/tests/suite/tdav_conc.sql
index e3a4ba2..58fcdf4 100644
--- a/binsrc/tests/suite/tdav_conc.sql
+++ b/binsrc/tests/suite/tdav_conc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdav_conc.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdav_conc.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav_meta.sh b/binsrc/tests/suite/tdav_meta.sh
index 7ee4cf1..47ccfa9 100755
--- a/binsrc/tests/suite/tdav_meta.sh
+++ b/binsrc/tests/suite/tdav_meta.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tdav_meta.sh,v 1.5.2.4 2011/03/28 23:11:40 source Exp $
+#  $Id: tdav_meta.sh,v 1.5.2.5 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav_meta.sql b/binsrc/tests/suite/tdav_meta.sql
index 83a20a8..4e8f21e 100644
--- a/binsrc/tests/suite/tdav_meta.sql
+++ b/binsrc/tests/suite/tdav_meta.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tdav_meta.sql,v 1.4.2.2 2010/03/04 23:48:20 source Exp $
+--  $Id: tdav_meta.sql,v 1.4.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav_meta_checks.sql b/binsrc/tests/suite/tdav_meta_checks.sql
index 1f67fdf..00b64d0 100644
--- a/binsrc/tests/suite/tdav_meta_checks.sql
+++ b/binsrc/tests/suite/tdav_meta_checks.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdav_meta_checks.sql,v 1.2.2.1 2010/03/04 23:48:20 source Exp $
+--  $Id: tdav_meta_checks.sql,v 1.2.2.2 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav_meta_rdf.sql b/binsrc/tests/suite/tdav_meta_rdf.sql
index 0714f0a..a62e39c 100644
--- a/binsrc/tests/suite/tdav_meta_rdf.sql
+++ b/binsrc/tests/suite/tdav_meta_rdf.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdav_meta_rdf.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdav_meta_rdf.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdav_meta_rdf_checks.sql b/binsrc/tests/suite/tdav_meta_rdf_checks.sql
index 2482985..931a1da 100644
--- a/binsrc/tests/suite/tdav_meta_rdf_checks.sql
+++ b/binsrc/tests/suite/tdav_meta_rdf_checks.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdav_meta_checks.sql,v 1.2.2.1 2010/03/04 23:48:20 source Exp $
+--  $Id: tdav_meta_checks.sql,v 1.2.2.2 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdavmigr1.sql b/binsrc/tests/suite/tdavmigr1.sql
index 5292c74..a14fe55 100644
--- a/binsrc/tests/suite/tdavmigr1.sql
+++ b/binsrc/tests/suite/tdavmigr1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdavmigr1.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdavmigr1.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdavmigr2.sql b/binsrc/tests/suite/tdavmigr2.sql
index d3ec8ec..389a572 100644
--- a/binsrc/tests/suite/tdavmigr2.sql
+++ b/binsrc/tests/suite/tdavmigr2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdavmigr2.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdavmigr2.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdbp.sh b/binsrc/tests/suite/tdbp.sh
index 637a023..8e164d4 100755
--- a/binsrc/tests/suite/tdbp.sh
+++ b/binsrc/tests/suite/tdbp.sh
@@ -1,13 +1,13 @@
 #!/bin/sh 
 #
-#  $Id: tdbp.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: tdbp.sh,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 #
 #  DBPUMP tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdcascade.sql b/binsrc/tests/suite/tdcascade.sql
index 93d5cc5..5e5bfb6 100644
--- a/binsrc/tests/suite/tdcascade.sql
+++ b/binsrc/tests/suite/tdcascade.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdcascade.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdcascade.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdconv.sh b/binsrc/tests/suite/tdconv.sh
index 0162d88..e450875 100755
--- a/binsrc/tests/suite/tdconv.sh
+++ b/binsrc/tests/suite/tdconv.sh
@@ -1,13 +1,13 @@
 #!/bin/sh 
 #
-#  $Id: tdconv.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: tdconv.sh,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 #
 #  VAD tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdelete.sql b/binsrc/tests/suite/tdelete.sql
index 996e92b..75d74a2 100644
--- a/binsrc/tests/suite/tdelete.sql
+++ b/binsrc/tests/suite/tdelete.sql
@@ -1,14 +1,14 @@
 --
 --  tdelete.sql
 --
---  $Id: tdelete.sql,v 1.1.1.1.2.2 2009/07/16 06:17:17 source Exp $
+--  $Id: tdelete.sql,v 1.1.1.1.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  Test delete functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdrop.sh b/binsrc/tests/suite/tdrop.sh
index c0ffc6e..6cb69e5 100755
--- a/binsrc/tests/suite/tdrop.sh
+++ b/binsrc/tests/suite/tdrop.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tdrop.sh,v 1.2.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: tdrop.sh,v 1.2.2.2 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdrop.sql b/binsrc/tests/suite/tdrop.sql
index 6f63dba..fb89eb1 100644
--- a/binsrc/tests/suite/tdrop.sql
+++ b/binsrc/tests/suite/tdrop.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdrop.sql,v 1.2 2006/08/16 07:58:11 source Exp $
+--  $Id: tdrop.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdrop1.sql b/binsrc/tests/suite/tdrop1.sql
index 2532fee..5628efb 100644
--- a/binsrc/tests/suite/tdrop1.sql
+++ b/binsrc/tests/suite/tdrop1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdrop1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tdrop1.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tdrop2.sql b/binsrc/tests/suite/tdrop2.sql
index a9c2c5f..fa7888c 100644
--- a/binsrc/tests/suite/tdrop2.sql
+++ b/binsrc/tests/suite/tdrop2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tdrop2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tdrop2.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/terror.sql b/binsrc/tests/suite/terror.sql
index 9986468..22594ab 100644
--- a/binsrc/tests/suite/terror.sql
+++ b/binsrc/tests/suite/terror.sql
@@ -1,7 +1,7 @@
 --
 --  terror.sql
 --
---  $Id: terror.sql,v 1.9.2.5 2009/11/17 21:01:00 source Exp $
+--  $Id: terror.sql,v 1.9.2.6 2012/03/08 12:55:08 source Exp $
 --
 --  Various tests that should return an error.
 --  The intent is that the server recover from these, hence results are
@@ -10,7 +10,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tescape.sql b/binsrc/tests/suite/tescape.sql
index 5cbadb0..3d7ad4f 100644
--- a/binsrc/tests/suite/tescape.sql
+++ b/binsrc/tests/suite/tescape.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tescape.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tescape.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/test_fn.sh b/binsrc/tests/suite/test_fn.sh
index f903215..e7cb828 100755
--- a/binsrc/tests/suite/test_fn.sh
+++ b/binsrc/tests/suite/test_fn.sh
@@ -2,7 +2,7 @@
 #
 #  test_fn.sh
 #
-#  $Id: test_fn.sh,v 1.5.2.5 2010/01/28 14:33:20 source Exp $
+#  $Id: test_fn.sh,v 1.5.2.7 2012/03/12 22:45:09 source Exp $
 #
 #  Generic test functions which should be read at the beginning of the
 #  shell script.
@@ -10,7 +10,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -42,6 +42,7 @@ SILENT=${SILENT-0}
 SERVER=${SERVER-M2}
 ISQL=${ISQL-isql}
 BLOBS=${BLOBS-blobs}
+SCROLL=${SCROLL-scroll}
 INS=${INS-ins}
 PORT=${PORT-1111}
 HTTPPORT=`expr $PORT + 7000`
diff --git a/binsrc/tests/suite/test_server.sh b/binsrc/tests/suite/test_server.sh
index b7aa2d5..c0807ab 100755
--- a/binsrc/tests/suite/test_server.sh
+++ b/binsrc/tests/suite/test_server.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: test_server.sh,v 1.2.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: test_server.sh,v 1.2.2.2 2012/03/08 12:55:08 source Exp $
 #
 #  choose a server to run with
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/testall.sh b/binsrc/tests/suite/testall.sh
index 33964bd..65db3ac 100755
--- a/binsrc/tests/suite/testall.sh
+++ b/binsrc/tests/suite/testall.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: testall.sh,v 1.9.2.1 2009/04/16 12:37:43 source Exp $
+#  $Id: testall.sh,v 1.9.2.2 2012/03/08 12:55:08 source Exp $
 #
 #  Call all tests in succession
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/testgz.sql b/binsrc/tests/suite/testgz.sql
index 5c242a0..ae8aac9 100644
--- a/binsrc/tests/suite/testgz.sql
+++ b/binsrc/tests/suite/testgz.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: testgz.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: testgz.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/testtext.sql b/binsrc/tests/suite/testtext.sql
index fcef34d..f567d90 100644
--- a/binsrc/tests/suite/testtext.sql
+++ b/binsrc/tests/suite/testtext.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: testtext.sql,v 1.2.2.2 2009/07/14 22:24:47 source Exp $
+--  $Id: testtext.sql,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/texcept.sql b/binsrc/tests/suite/texcept.sql
index 50110c9..e637967 100644
--- a/binsrc/tests/suite/texcept.sql
+++ b/binsrc/tests/suite/texcept.sql
@@ -1,14 +1,14 @@
 --
 --  texcept.sql
 --
---  $Id: texcept.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: texcept.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Exception handling tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/texecute.sql b/binsrc/tests/suite/texecute.sql
index 64b5e79..c00a078 100644
--- a/binsrc/tests/suite/texecute.sql
+++ b/binsrc/tests/suite/texecute.sql
@@ -1,14 +1,14 @@
 --
 --  texecute.sql
 --
---  $Id: texecute.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: texecute.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  exec suite testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/text.sql b/binsrc/tests/suite/text.sql
index 01b3b7a..a060817 100644
--- a/binsrc/tests/suite/text.sql
+++ b/binsrc/tests/suite/text.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: text.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: text.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/textdef.sql b/binsrc/tests/suite/textdef.sql
index d3fcca8..c04cbdd 100644
--- a/binsrc/tests/suite/textdef.sql
+++ b/binsrc/tests/suite/textdef.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: textdef.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: textdef.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tfk.sql b/binsrc/tests/suite/tfk.sql
index 8913977..ed5957f 100644
--- a/binsrc/tests/suite/tfk.sql
+++ b/binsrc/tests/suite/tfk.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tfk.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tfk.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tfref.sql b/binsrc/tests/suite/tfref.sql
index b0cb4bf..8f4a29a 100644
--- a/binsrc/tests/suite/tfref.sql
+++ b/binsrc/tests/suite/tfref.sql
@@ -1,14 +1,14 @@
 --
 --  tfref.sql
 --
---  $Id: tfref.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tfref.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Function reference tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tft_offband.sql b/binsrc/tests/suite/tft_offband.sql
index 238a155..0b16644 100644
--- a/binsrc/tests/suite/tft_offband.sql
+++ b/binsrc/tests/suite/tft_offband.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tft_offband.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tft_offband.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tftext.sql b/binsrc/tests/suite/tftext.sql
index 98a7ae5..512649d 100644
--- a/binsrc/tests/suite/tftext.sql
+++ b/binsrc/tests/suite/tftext.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tftext.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tftext.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tftp.sql b/binsrc/tests/suite/tftp.sql
index d370d53..9fd9221 100644
--- a/binsrc/tests/suite/tftp.sql
+++ b/binsrc/tests/suite/tftp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tftp.sql,v 1.3.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: tftp.sql,v 1.3.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tftt.sql b/binsrc/tests/suite/tftt.sql
index 6fab525..118b0c5 100644
--- a/binsrc/tests/suite/tftt.sql
+++ b/binsrc/tests/suite/tftt.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tftt.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tftt.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tgroup.sql b/binsrc/tests/suite/tgroup.sql
index 0cee6ce..e9659ec 100644
--- a/binsrc/tests/suite/tgroup.sql
+++ b/binsrc/tests/suite/tgroup.sql
@@ -1,14 +1,14 @@
 --
 --  tgroup.sql
 --
---  $Id: tgroup.sql,v 1.3.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tgroup.sql,v 1.3.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  Group By test
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/thttp.sh b/binsrc/tests/suite/thttp.sh
index 16cb012..b5c8ab3 100755
--- a/binsrc/tests/suite/thttp.sh
+++ b/binsrc/tests/suite/thttp.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: thttp.sh,v 1.18.2.5 2010/01/28 14:33:20 source Exp $
+#  $Id: thttp.sh,v 1.18.2.7 2012/03/12 22:45:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -744,8 +744,26 @@ case $1 in
    if [ "$MAKE_VAD" = "yes" ] ; then
        if [ $do_mappers_only -eq 1 ]
        then
-	   (cd ../../../rdf_mappers; make)
-	   cp ../../../rdf_mappers/rdf_mappers_dav.vad ./
+	   LOG "Create RDF mappers Package"
+	   (cd ../../../../binsrc/rdf_mappers && make rdf_mappers_dav.vad)
+	   cp ../../../../binsrc/rdf_mappers/rdf_mappers_dav.vad .
+       elif [ -f ../../../../autogen.sh ]
+       then
+	   LOG "Create RDF mappers Package"
+	   (cd ../../../../binsrc/rdf_mappers && make rdf_mappers_dav.vad)
+	   cp ../../../../binsrc/rdf_mappers/rdf_mappers_dav.vad .
+
+	   LOG "Create ODS Framework VAD Package"
+	   (cd ../../../../appsrc/ODS-Framework && make ods_framework_dav.vad)
+	   cp ../../../../appsrc/ODS-Framework/ods_framework_dav.vad .
+
+	   LOG "Create ODS Blog VAD Package"
+	   (cd ../../../../appsrc/ODS-Blog && make ods_blog_dav.vad)
+	   cp ../../../../appsrc/ODS-Blog/ods_blog_dav.vad .
+
+	   LOG "Create SyncML VAD Package"
+	   (cd ../../../../binsrc/sync && make syncml_dav.vad)
+	   cp ../../../../binsrc/sync/syncml_dav.vad .
        elif [ "x$HOST_OS" = "x" ]
        then
 	   LOG "Create ODS VAD Package"
@@ -1040,6 +1058,68 @@ fi
       exit 1
    fi
 
+  LOG 'Now starting graph CRUD tests...'
+rm http/_virtrdf_log*.ttl
+rm http/graphcrud*.log
+
+#
+#  Make sure curl is installed
+#
+RUN curl --version
+
+if test $STATUS -eq 0
+then
+    curl --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud?graph-uri=http://www.openlinksw.com/schemas/virtrdf%23" > http/_virtrdf_log1.ttl 2> http/graphcrud_get0.log
+    if grep 'virtrdf:' http/_virtrdf_log1.ttl > /dev/null ; then
+      LOG 'PASSED: http/_virtrdf_log1.ttl contains data'
+    else
+      LOG '***FAILED: http/_virtrdf_log1.ttl does not contains virtrdf: string, but it should'
+    fi
+
+    curl --digest --user dba:dba --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud-auth?graph-uri=http://example.com/crud1" -X DELETE > http/graphcrud_1.log 2>&1
+    if grep 'HTTP/1.1 404' http/graphcrud_1.log > /dev/null ; then
+      LOG 'PASSED: http/graphcrud_1.log contains 404 error for missing graph'
+    else
+      LOG '***FAILED: http/graphcrud_1.log does not contains 404 error for missing graph, but it should'
+    fi
+
+    curl --digest --user dba:dba --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud-auth?graph-uri=http://example.com/crud1" -T http/_virtrdf_log1.ttl > http/graphcrud_2.log 2>&1
+    if grep  'HTTP/1.1 201' http/graphcrud_2.log > /dev/null ; then
+      LOG 'PASSED: http/graphcrud_2.log contains 201 for newly created graph'
+    else
+      LOG '***FAILED: http/graphcrud_2.log does not contain 201 for newly created graph, but it should'
+    fi
+
+    curl --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud?graph-uri=http://example.com/crud1" > http/_virtrdf_log2.ttl 2> http/graphcrud_get2.log
+    if grep 'virtrdf:' http/_virtrdf_log2.ttl > /dev/null ; then
+      LOG 'PASSED: http/_virtrdf_log2.ttl contains data'
+    else
+      LOG '***FAILED: http/_virtrdf_log2.ttl does not contains virtrdf: string, but it should'
+    fi
+
+    curl --digest --user dba:dba --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud-auth?graph-uri=http://example.com/crud1" -T http/_virtrdf_log1.ttl > http/graphcrud_2.log 2>&1
+    if grep  'HTTP/1.1 200' http/graphcrud_2.log > /dev/null ; then
+      LOG 'PASSED: http/graphcrud_2.log contains 200 for recreated graph'
+    else
+      LOG '***FAILED: http/graphcrud_2.log does not contains 200 for newly created graph, but it should'
+    fi
+
+    curl --digest --user dba:dba --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud-auth?graph-uri=http://example.com/crud1" -X DELETE > http/graphcrud_3.log 2>&1
+    if grep 'HTTP/1.1 200' http/graphcrud_3.log > /dev/null ; then
+      LOG 'PASSED: http/graphcrud_3.log contains 200 for successful graph removal'
+    else
+      LOG '***FAILED: http/graphcrud_3.log does not contain 200 for successful graph removal, but it should'
+    fi
+
+    curl --verbose --url "http://localhost:$HTTPPORT/sparql-graph-crud?graph-uri=http://example.com/crud1" > http/graphcrud_4.log 2>&1
+    if grep 'HTTP/1.1 404' http/graphcrud_4.log > /dev/null ; then
+      LOG 'PASSED: http/graphcrud_4.log contains 404 for deleted graph'
+    else
+      LOG '***FAILED: http/graphcrud_4.log does not contain 404 for deleted graph, but it should'
+    fi
+fi
+
+
    SHUTDOWN_SERVER
 
    # 
diff --git a/binsrc/tests/suite/thttp.sql b/binsrc/tests/suite/thttp.sql
index 8cd29e8..9c6c3a8 100644
--- a/binsrc/tests/suite/thttp.sql
+++ b/binsrc/tests/suite/thttp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: thttp.sql,v 1.4.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: thttp.sql,v 1.4.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tidxksize.sql b/binsrc/tests/suite/tidxksize.sql
index 5f6fcf3..8d768b7 100644
--- a/binsrc/tests/suite/tidxksize.sql
+++ b/binsrc/tests/suite/tidxksize.sql
@@ -1,14 +1,14 @@
 --
 --  tidxksize.sql
 --
---  $Id: tidxksize.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tidxksize.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Index key sizes test suite
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/timsg.sh b/binsrc/tests/suite/timsg.sh
index aec2363..1991d34 100755
--- a/binsrc/tests/suite/timsg.sh
+++ b/binsrc/tests/suite/timsg.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: timsg.sh,v 1.3.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: timsg.sh,v 1.3.2.2 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tinx.sql b/binsrc/tests/suite/tinx.sql
index 42c5a32..7cb85fc 100644
--- a/binsrc/tests/suite/tinx.sql
+++ b/binsrc/tests/suite/tinx.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tinx.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tinx.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tinxint.sql b/binsrc/tests/suite/tinxint.sql
index 1caa5f6..76aaafe 100644
--- a/binsrc/tests/suite/tinxint.sql
+++ b/binsrc/tests/suite/tinxint.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tinxint.sql,v 1.3.2.1 2009/04/16 12:37:43 source Exp $
+--  $Id: tinxint.sql,v 1.3.2.2 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tinxintbm.sql b/binsrc/tests/suite/tinxintbm.sql
index a3bbff8..82c1db8 100644
--- a/binsrc/tests/suite/tinxintbm.sql
+++ b/binsrc/tests/suite/tinxintbm.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tinxintbm.sql,v 1.1.2.2 2009/07/09 13:04:50 source Exp $
+--  $Id: tinxintbm.sql,v 1.1.2.3 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tiri.sql b/binsrc/tests/suite/tiri.sql
index 501edc7..655fd58 100644
--- a/binsrc/tests/suite/tiri.sql
+++ b/binsrc/tests/suite/tiri.sql
@@ -1,10 +1,10 @@
 -- 
---  $Id: tiri.sql,v 1.3.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tiri.sql,v 1.3.2.3 2012/03/08 12:55:08 source Exp $
 -- 
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tiso.sql b/binsrc/tests/suite/tiso.sql
index 6b48f52..0ce7cfa 100644
--- a/binsrc/tests/suite/tiso.sql
+++ b/binsrc/tests/suite/tiso.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tiso.sql,v 1.2.2.1 2009/04/16 12:37:43 source Exp $
+--  $Id: tiso.sql,v 1.2.2.2 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tjdbc.sh b/binsrc/tests/suite/tjdbc.sh
index 6a1dd93..4210866 100755
--- a/binsrc/tests/suite/tjdbc.sh
+++ b/binsrc/tests/suite/tjdbc.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tjdbc.sh,v 1.3.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: tjdbc.sh,v 1.3.2.3 2012/03/08 12:55:08 source Exp $
 #
 #  JDBC tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tjoin.sql b/binsrc/tests/suite/tjoin.sql
index 71db318..6ffe3cf 100644
--- a/binsrc/tests/suite/tjoin.sql
+++ b/binsrc/tests/suite/tjoin.sql
@@ -1,14 +1,14 @@
 --
 --  tjoin.sql
 --
---  $Id: tjoin.sql,v 1.1.1.1.2.3 2011/03/25 15:10:16 source Exp $
+--  $Id: tjoin.sql,v 1.1.1.1.2.4 2012/03/08 12:55:08 source Exp $
 --
 --  Outer Join tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tkwd.sql b/binsrc/tests/suite/tkwd.sql
index 4691fd4..9024ee7 100644
--- a/binsrc/tests/suite/tkwd.sql
+++ b/binsrc/tests/suite/tkwd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tkwd.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tkwd.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tldap.sql b/binsrc/tests/suite/tldap.sql
index 2ef7bb9..1aaccf1 100644
--- a/binsrc/tests/suite/tldap.sql
+++ b/binsrc/tests/suite/tldap.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tldap.sql,v 1.4.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: tldap.sql,v 1.4.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tlock.sql b/binsrc/tests/suite/tlock.sql
index 0c75ea3..0332117 100644
--- a/binsrc/tests/suite/tlock.sql
+++ b/binsrc/tests/suite/tlock.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tlock.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tlock.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tlogft1.sql b/binsrc/tests/suite/tlogft1.sql
index 9c14034..0668ff5 100644
--- a/binsrc/tests/suite/tlogft1.sql
+++ b/binsrc/tests/suite/tlogft1.sql
@@ -1,14 +1,14 @@
 --
 --  tlogft1.sql
 --
---  $Id: tlogft1.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tlogft1.sql,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  Test freetext interaction with transaction log #1
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tlogft2.sql b/binsrc/tests/suite/tlogft2.sql
index 7fdd9b3..20be0d3 100644
--- a/binsrc/tests/suite/tlogft2.sql
+++ b/binsrc/tests/suite/tlogft2.sql
@@ -1,14 +1,14 @@
 --
 --  tlogft2.sql
 --
---  $Id: tlogft2.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tlogft2.sql,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  Test freetext interaction with transaction log #2
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tmulgrp.sql b/binsrc/tests/suite/tmulgrp.sql
index 644b73c..35c0498 100644
--- a/binsrc/tests/suite/tmulgrp.sql
+++ b/binsrc/tests/suite/tmulgrp.sql
@@ -1,14 +1,14 @@
 --
 --  tmulgroup.sql
 --
---  $Id: tmulgrp.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tmulgrp.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Check multiple user group functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tmulgrp1.sql b/binsrc/tests/suite/tmulgrp1.sql
index 09fafce..08ca0b3 100644
--- a/binsrc/tests/suite/tmulgrp1.sql
+++ b/binsrc/tests/suite/tmulgrp1.sql
@@ -1,14 +1,14 @@
 --
 --  tmulgroup.sql
 --
---  $Id: tmulgrp1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tmulgrp1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Check multiple user group functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tmulgrp2.sql b/binsrc/tests/suite/tmulgrp2.sql
index 1c20a92..91f9334 100644
--- a/binsrc/tests/suite/tmulgrp2.sql
+++ b/binsrc/tests/suite/tmulgrp2.sql
@@ -1,14 +1,14 @@
 --
 --  tmulgroup.sql
 --
---  $Id: tmulgrp2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tmulgrp2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Check multiple user group functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnull.sql b/binsrc/tests/suite/tnull.sql
index 94db659..20cdfe5 100644
--- a/binsrc/tests/suite/tnull.sql
+++ b/binsrc/tests/suite/tnull.sql
@@ -1,14 +1,14 @@
 --
 --  tnull.sql
 --
---  $Id: tnull.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tnull.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Test NULL handling
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnum.sql b/binsrc/tests/suite/tnum.sql
index cde0124..3260076 100644
--- a/binsrc/tests/suite/tnum.sql
+++ b/binsrc/tests/suite/tnum.sql
@@ -1,14 +1,14 @@
 --
 --  tnum.sql
 --
---  $Id: tnum.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tnum.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Number tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnumr.sql b/binsrc/tests/suite/tnumr.sql
index 815e999..1dcbd32 100644
--- a/binsrc/tests/suite/tnumr.sql
+++ b/binsrc/tests/suite/tnumr.sql
@@ -1,7 +1,7 @@
 --
 --  tnumr.sql
 --
---  $Id: tnumr.sql,v 1.1.1.1.2.1 2010/01/25 23:28:52 source Exp $
+--  $Id: tnumr.sql,v 1.1.1.1.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  Number tests
 
@@ -9,7 +9,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnumt.sql b/binsrc/tests/suite/tnumt.sql
index 74b0110..53798c6 100644
--- a/binsrc/tests/suite/tnumt.sql
+++ b/binsrc/tests/suite/tnumt.sql
@@ -1,14 +1,14 @@
 --
 --  tnumt.sql
 --
---  $Id: tnumt.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tnumt.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Number tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnwords.sql b/binsrc/tests/suite/tnwords.sql
index c940b69..4580235 100644
--- a/binsrc/tests/suite/tnwords.sql
+++ b/binsrc/tests/suite/tnwords.sql
@@ -1,14 +1,14 @@
 --
 --  tnwords.sql
 --
---  $Id: tnwords.sql,v 1.2 2007/05/04 13:02:28 source Exp $
+--  $Id: tnwords.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Word tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnwords_create.sql b/binsrc/tests/suite/tnwords_create.sql
index 6f37ece..e575688 100644
--- a/binsrc/tests/suite/tnwords_create.sql
+++ b/binsrc/tests/suite/tnwords_create.sql
@@ -1,14 +1,14 @@
 --
 --  tnwords_create.sql
 --
---  $Id: tnwords_create.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tnwords_create.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Creates the tables for Word tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tnwords_remote.sql b/binsrc/tests/suite/tnwords_remote.sql
index 587a1b1..6d810a3 100644
--- a/binsrc/tests/suite/tnwords_remote.sql
+++ b/binsrc/tests/suite/tnwords_remote.sql
@@ -1,14 +1,14 @@
 --
 --  tnwords_remote.sql
 --
---  $Id: tnwords_remote.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tnwords_remote.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Attaches the tables for Word tests and does the test remotely
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tobject.sql b/binsrc/tests/suite/tobject.sql
index e856213..f2dae16 100644
--- a/binsrc/tests/suite/tobject.sql
+++ b/binsrc/tests/suite/tobject.sql
@@ -1,14 +1,14 @@
 --
 --  tobject.sql
 --
---  $Id: tobject.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tobject.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Object feature tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/toutdsk.sql b/binsrc/tests/suite/toutdsk.sql
index 6f609e7..061bed4 100644
--- a/binsrc/tests/suite/toutdsk.sql
+++ b/binsrc/tests/suite/toutdsk.sql
@@ -1,10 +1,10 @@
 --
---  $Id: toutdsk.sql,v 1.3.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: toutdsk.sql,v 1.3.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/toutdskck.sql b/binsrc/tests/suite/toutdskck.sql
index 2b695d2..8530aa6 100644
--- a/binsrc/tests/suite/toutdskck.sql
+++ b/binsrc/tests/suite/toutdskck.sql
@@ -1,10 +1,10 @@
 --
---  $Id: toutdskck.sql,v 1.4.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: toutdskck.sql,v 1.4.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tp.sh b/binsrc/tests/suite/tp.sh
index f8dc6e7..983424c 100755
--- a/binsrc/tests/suite/tp.sh
+++ b/binsrc/tests/suite/tp.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tp.sh,v 1.2.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: tp.sh,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/LOAD.sh b/binsrc/tests/suite/tpc-d/LOAD.sh
index 05b08fe..3670786 100755
--- a/binsrc/tests/suite/tpc-d/LOAD.sh
+++ b/binsrc/tests/suite/tpc-d/LOAD.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: LOAD.sh,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+#  $Id: LOAD.sh,v 1.2.2.4 2012/03/12 22:45:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -426,6 +426,6 @@ in
 	    ;;
 
 	z*)
-    	    LOG "usage $0 (tables | indexes | procedures | cleanprocedures | cleantables | cleandata | load | attach )"
+    	    LOG "usage $0 database username password (tables | indexes | procedures | cleanprocedures | cleantables | cleandata | load | attach )"
 	    ;;
 esac
diff --git a/binsrc/tests/suite/tpc-d/Makefile.am b/binsrc/tests/suite/tpc-d/Makefile.am
index f06ede6..d8ce25b 100644
--- a/binsrc/tests/suite/tpc-d/Makefile.am
+++ b/binsrc/tests/suite/tpc-d/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Makefile.in b/binsrc/tests/suite/tpc-d/Makefile.in
index 03484e6..206c421 100644
--- a/binsrc/tests/suite/tpc-d/Makefile.in
+++ b/binsrc/tests/suite/tpc-d/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2008 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -101,6 +101,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -149,6 +150,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -200,6 +202,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -246,7 +249,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/suite/tpc-d/Q.sql b/binsrc/tests/suite/tpc-d/Q.sql
index f481b88..3ac3241 100644
--- a/binsrc/tests/suite/tpc-d/Q.sql
+++ b/binsrc/tests/suite/tpc-d/Q.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q1.sql b/binsrc/tests/suite/tpc-d/Q1.sql
index dc36bd2..166ac80 100644
--- a/binsrc/tests/suite/tpc-d/Q1.sql
+++ b/binsrc/tests/suite/tpc-d/Q1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q1.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q10.sql b/binsrc/tests/suite/tpc-d/Q10.sql
index 43b9e63..55c8ad9 100644
--- a/binsrc/tests/suite/tpc-d/Q10.sql
+++ b/binsrc/tests/suite/tpc-d/Q10.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q10.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q10.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q11.sql b/binsrc/tests/suite/tpc-d/Q11.sql
index 7c98939..46f859b 100644
--- a/binsrc/tests/suite/tpc-d/Q11.sql
+++ b/binsrc/tests/suite/tpc-d/Q11.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q11.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q11.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q12.sql b/binsrc/tests/suite/tpc-d/Q12.sql
index b9f9b12..ebb686e 100644
--- a/binsrc/tests/suite/tpc-d/Q12.sql
+++ b/binsrc/tests/suite/tpc-d/Q12.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q12.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q12.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q13.sql b/binsrc/tests/suite/tpc-d/Q13.sql
index b814c2f..c538595 100644
--- a/binsrc/tests/suite/tpc-d/Q13.sql
+++ b/binsrc/tests/suite/tpc-d/Q13.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q13.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q13.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q14.sql b/binsrc/tests/suite/tpc-d/Q14.sql
index 2558047..496f47e 100644
--- a/binsrc/tests/suite/tpc-d/Q14.sql
+++ b/binsrc/tests/suite/tpc-d/Q14.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q14.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q14.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q15.sql b/binsrc/tests/suite/tpc-d/Q15.sql
index a9c0065..3fe801e 100644
--- a/binsrc/tests/suite/tpc-d/Q15.sql
+++ b/binsrc/tests/suite/tpc-d/Q15.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q15.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q15.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q16.sql b/binsrc/tests/suite/tpc-d/Q16.sql
index aada77c..6b56f54 100644
--- a/binsrc/tests/suite/tpc-d/Q16.sql
+++ b/binsrc/tests/suite/tpc-d/Q16.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q16.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q16.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q17.sql b/binsrc/tests/suite/tpc-d/Q17.sql
index 23f5805..a7ea006 100644
--- a/binsrc/tests/suite/tpc-d/Q17.sql
+++ b/binsrc/tests/suite/tpc-d/Q17.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q17.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q17.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q18.sql b/binsrc/tests/suite/tpc-d/Q18.sql
index 2e81685..7938ca1 100644
--- a/binsrc/tests/suite/tpc-d/Q18.sql
+++ b/binsrc/tests/suite/tpc-d/Q18.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q18.sql,v 1.2.2.1 2009/07/09 13:04:50 source Exp $
+--  $Id: Q18.sql,v 1.2.2.2 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q19.sql b/binsrc/tests/suite/tpc-d/Q19.sql
index d27e5de..e71c1b9 100644
--- a/binsrc/tests/suite/tpc-d/Q19.sql
+++ b/binsrc/tests/suite/tpc-d/Q19.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q19.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q19.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q2.sql b/binsrc/tests/suite/tpc-d/Q2.sql
index ba65f33..9cdd3ca 100644
--- a/binsrc/tests/suite/tpc-d/Q2.sql
+++ b/binsrc/tests/suite/tpc-d/Q2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q2.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q20.sql b/binsrc/tests/suite/tpc-d/Q20.sql
index 74e2298..b7740f9 100644
--- a/binsrc/tests/suite/tpc-d/Q20.sql
+++ b/binsrc/tests/suite/tpc-d/Q20.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q20.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q20.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q21.sql b/binsrc/tests/suite/tpc-d/Q21.sql
index 187bb01..1566a8b 100644
--- a/binsrc/tests/suite/tpc-d/Q21.sql
+++ b/binsrc/tests/suite/tpc-d/Q21.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q21.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q21.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q22.sql b/binsrc/tests/suite/tpc-d/Q22.sql
index c5dd3bb..9397d27 100644
--- a/binsrc/tests/suite/tpc-d/Q22.sql
+++ b/binsrc/tests/suite/tpc-d/Q22.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q22.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q22.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q3.sql b/binsrc/tests/suite/tpc-d/Q3.sql
index d63b979..ad7abc5 100644
--- a/binsrc/tests/suite/tpc-d/Q3.sql
+++ b/binsrc/tests/suite/tpc-d/Q3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q3.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q4.sql b/binsrc/tests/suite/tpc-d/Q4.sql
index a3a82ca..99a112c 100644
--- a/binsrc/tests/suite/tpc-d/Q4.sql
+++ b/binsrc/tests/suite/tpc-d/Q4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q4.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q4.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q5.sql b/binsrc/tests/suite/tpc-d/Q5.sql
index 03cc6ed..a2e6893 100644
--- a/binsrc/tests/suite/tpc-d/Q5.sql
+++ b/binsrc/tests/suite/tpc-d/Q5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q5.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q5.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q6.sql b/binsrc/tests/suite/tpc-d/Q6.sql
index 5727519..ce28d01 100644
--- a/binsrc/tests/suite/tpc-d/Q6.sql
+++ b/binsrc/tests/suite/tpc-d/Q6.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q6.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q6.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q7.sql b/binsrc/tests/suite/tpc-d/Q7.sql
index f8d4eab..d3decd6 100644
--- a/binsrc/tests/suite/tpc-d/Q7.sql
+++ b/binsrc/tests/suite/tpc-d/Q7.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q7.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q7.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q8.sql b/binsrc/tests/suite/tpc-d/Q8.sql
index cc7babe..5b997be 100644
--- a/binsrc/tests/suite/tpc-d/Q8.sql
+++ b/binsrc/tests/suite/tpc-d/Q8.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q8.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q8.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q9.sql b/binsrc/tests/suite/tpc-d/Q9.sql
index 4d79827..8abf9ad 100644
--- a/binsrc/tests/suite/tpc-d/Q9.sql
+++ b/binsrc/tests/suite/tpc-d/Q9.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q9.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q9.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS1.sql b/binsrc/tests/suite/tpc-d/QS1.sql
index b6c5efa..f53a261 100644
--- a/binsrc/tests/suite/tpc-d/QS1.sql
+++ b/binsrc/tests/suite/tpc-d/QS1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS1.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS10.sql b/binsrc/tests/suite/tpc-d/QS10.sql
index fd4942c..2ed5fd4 100644
--- a/binsrc/tests/suite/tpc-d/QS10.sql
+++ b/binsrc/tests/suite/tpc-d/QS10.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS10.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS10.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS11.sql b/binsrc/tests/suite/tpc-d/QS11.sql
index 2f7ea0f..d2d5f57 100644
--- a/binsrc/tests/suite/tpc-d/QS11.sql
+++ b/binsrc/tests/suite/tpc-d/QS11.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS11.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS11.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS12.sql b/binsrc/tests/suite/tpc-d/QS12.sql
index c30343a..ca1b4e6 100644
--- a/binsrc/tests/suite/tpc-d/QS12.sql
+++ b/binsrc/tests/suite/tpc-d/QS12.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS12.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS12.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS13.sql b/binsrc/tests/suite/tpc-d/QS13.sql
index 5d04509..35f36cf 100644
--- a/binsrc/tests/suite/tpc-d/QS13.sql
+++ b/binsrc/tests/suite/tpc-d/QS13.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS13.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS13.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS14.sql b/binsrc/tests/suite/tpc-d/QS14.sql
index bf90ca1..ede4d9f 100644
--- a/binsrc/tests/suite/tpc-d/QS14.sql
+++ b/binsrc/tests/suite/tpc-d/QS14.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS14.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS14.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS15.sql b/binsrc/tests/suite/tpc-d/QS15.sql
index 85030dd..c098187 100644
--- a/binsrc/tests/suite/tpc-d/QS15.sql
+++ b/binsrc/tests/suite/tpc-d/QS15.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS15.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS15.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS17.sql b/binsrc/tests/suite/tpc-d/QS17.sql
index 7ac0cbd..74acb9f 100644
--- a/binsrc/tests/suite/tpc-d/QS17.sql
+++ b/binsrc/tests/suite/tpc-d/QS17.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS17.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS17.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS18.sql b/binsrc/tests/suite/tpc-d/QS18.sql
index 4ae612a..fb9a4ee 100644
--- a/binsrc/tests/suite/tpc-d/QS18.sql
+++ b/binsrc/tests/suite/tpc-d/QS18.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS18.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS18.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS18o.sql b/binsrc/tests/suite/tpc-d/QS18o.sql
index 2f81037..509a562 100644
--- a/binsrc/tests/suite/tpc-d/QS18o.sql
+++ b/binsrc/tests/suite/tpc-d/QS18o.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS18o.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS18o.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS2.sql b/binsrc/tests/suite/tpc-d/QS2.sql
index ddd9ec4..d4f61e9 100644
--- a/binsrc/tests/suite/tpc-d/QS2.sql
+++ b/binsrc/tests/suite/tpc-d/QS2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS2.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS20.sql b/binsrc/tests/suite/tpc-d/QS20.sql
index 3506caa..dcc4001 100644
--- a/binsrc/tests/suite/tpc-d/QS20.sql
+++ b/binsrc/tests/suite/tpc-d/QS20.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS20.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS20.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS21.sql b/binsrc/tests/suite/tpc-d/QS21.sql
index 72caca3..cf62cdd 100644
--- a/binsrc/tests/suite/tpc-d/QS21.sql
+++ b/binsrc/tests/suite/tpc-d/QS21.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS21.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS21.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS22.sql b/binsrc/tests/suite/tpc-d/QS22.sql
index 7cf2dce..e71876b 100644
--- a/binsrc/tests/suite/tpc-d/QS22.sql
+++ b/binsrc/tests/suite/tpc-d/QS22.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS22.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS22.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS3.sql b/binsrc/tests/suite/tpc-d/QS3.sql
index 2b01e3c..6f9126c 100644
--- a/binsrc/tests/suite/tpc-d/QS3.sql
+++ b/binsrc/tests/suite/tpc-d/QS3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS3.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS4.sql b/binsrc/tests/suite/tpc-d/QS4.sql
index 2a27fb3..15e546e 100644
--- a/binsrc/tests/suite/tpc-d/QS4.sql
+++ b/binsrc/tests/suite/tpc-d/QS4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS4.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS4.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS5.sql b/binsrc/tests/suite/tpc-d/QS5.sql
index a351b4f..b3b12a8 100644
--- a/binsrc/tests/suite/tpc-d/QS5.sql
+++ b/binsrc/tests/suite/tpc-d/QS5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS5.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS5.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS6.sql b/binsrc/tests/suite/tpc-d/QS6.sql
index b6fbc80..fb12047 100644
--- a/binsrc/tests/suite/tpc-d/QS6.sql
+++ b/binsrc/tests/suite/tpc-d/QS6.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS6.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS6.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS7.sql b/binsrc/tests/suite/tpc-d/QS7.sql
index 0b636e4..63a8fad 100644
--- a/binsrc/tests/suite/tpc-d/QS7.sql
+++ b/binsrc/tests/suite/tpc-d/QS7.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS7.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS7.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS8.sql b/binsrc/tests/suite/tpc-d/QS8.sql
index 86681af..ff15480 100644
--- a/binsrc/tests/suite/tpc-d/QS8.sql
+++ b/binsrc/tests/suite/tpc-d/QS8.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS8.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS8.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/QS9.sql b/binsrc/tests/suite/tpc-d/QS9.sql
index f0cb646..91d5e36 100644
--- a/binsrc/tests/suite/tpc-d/QS9.sql
+++ b/binsrc/tests/suite/tpc-d/QS9.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: QS9.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: QS9.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_dt.sql b/binsrc/tests/suite/tpc-d/Q_dt.sql
index af18b64..a24c126 100644
--- a/binsrc/tests/suite/tpc-d/Q_dt.sql
+++ b/binsrc/tests/suite/tpc-d/Q_dt.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_dt.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: Q_dt.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_mysql.sql b/binsrc/tests/suite/tpc-d/Q_mysql.sql
index 10e0465..6529643 100644
--- a/binsrc/tests/suite/tpc-d/Q_mysql.sql
+++ b/binsrc/tests/suite/tpc-d/Q_mysql.sql
@@ -1,10 +1,10 @@
 --
---  $Id: Q_mysql.sql,v 1.1.2.2 2009/04/16 20:15:22 source Exp $
+--  $Id: Q_mysql.sql,v 1.1.2.3 2012/03/08 12:55:10 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_ora.sql b/binsrc/tests/suite/tpc-d/Q_ora.sql
index 0a4a556..e4feb60 100644
--- a/binsrc/tests/suite/tpc-d/Q_ora.sql
+++ b/binsrc/tests/suite/tpc-d/Q_ora.sql
@@ -1,10 +1,10 @@
 --
---  $Id: Q_ora.sql,v 1.1 2007/03/28 11:47:13 source Exp $
+--  $Id: Q_ora.sql,v 1.1.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_sparql_map.sql b/binsrc/tests/suite/tpc-d/Q_sparql_map.sql
index 1b2b37d..1ca55fb 100644
--- a/binsrc/tests/suite/tpc-d/Q_sparql_map.sql
+++ b/binsrc/tests/suite/tpc-d/Q_sparql_map.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_sparql_map.sql,v 1.3.2.2 2009/04/16 20:15:22 source Exp $
+--  $Id: Q_sparql_map.sql,v 1.3.2.3 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_sparql_map_cmp.sql b/binsrc/tests/suite/tpc-d/Q_sparql_map_cmp.sql
index 2e0db14..bebcfaf 100644
--- a/binsrc/tests/suite/tpc-d/Q_sparql_map_cmp.sql
+++ b/binsrc/tests/suite/tpc-d/Q_sparql_map_cmp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_sparql_map_cmp.sql,v 1.3.2.5 2010/01/31 20:18:26 source Exp $
+--  $Id: Q_sparql_map_cmp.sql,v 1.3.2.6 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_sparql_map_endpoint.sql b/binsrc/tests/suite/tpc-d/Q_sparql_map_endpoint.sql
index 4962862..675f0b7 100644
--- a/binsrc/tests/suite/tpc-d/Q_sparql_map_endpoint.sql
+++ b/binsrc/tests/suite/tpc-d/Q_sparql_map_endpoint.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_sparql_map_endpoint.sql,v 1.1 2008/06/17 07:55:21 source Exp $
+--  $Id: Q_sparql_map_endpoint.sql,v 1.1.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_sparql_map_translations.sql b/binsrc/tests/suite/tpc-d/Q_sparql_map_translations.sql
index 535ba4e..5a0be87 100644
--- a/binsrc/tests/suite/tpc-d/Q_sparql_map_translations.sql
+++ b/binsrc/tests/suite/tpc-d/Q_sparql_map_translations.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_sparql_map_translations.sql,v 1.2.2.1 2009/07/09 13:04:50 source Exp $
+--  $Id: Q_sparql_map_translations.sql,v 1.2.2.2 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_sparql_phy_cmp.sql b/binsrc/tests/suite/tpc-d/Q_sparql_phy_cmp.sql
index 0c43083..bf6f544 100644
--- a/binsrc/tests/suite/tpc-d/Q_sparql_phy_cmp.sql
+++ b/binsrc/tests/suite/tpc-d/Q_sparql_phy_cmp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_sparql_phy_cmp.sql,v 1.3.2.2 2009/07/09 13:04:50 source Exp $
+--  $Id: Q_sparql_phy_cmp.sql,v 1.3.2.3 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/Q_virt.sql b/binsrc/tests/suite/tpc-d/Q_virt.sql
index 2fe2eb3..3041d6f 100644
--- a/binsrc/tests/suite/tpc-d/Q_virt.sql
+++ b/binsrc/tests/suite/tpc-d/Q_virt.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: Q_virt.sql,v 1.1.2.1 2010/01/31 20:18:26 source Exp $
+--  $Id: Q_virt.sql,v 1.1.2.2 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/all_ms.sql b/binsrc/tests/suite/tpc-d/all_ms.sql
index 3590c37..c4ccfda 100644
--- a/binsrc/tests/suite/tpc-d/all_ms.sql
+++ b/binsrc/tests/suite/tpc-d/all_ms.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: all_ms.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: all_ms.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/attach_tpcd.sql b/binsrc/tests/suite/tpc-d/attach_tpcd.sql
index faed3d0..b8c4082 100644
--- a/binsrc/tests/suite/tpc-d/attach_tpcd.sql
+++ b/binsrc/tests/suite/tpc-d/attach_tpcd.sql
@@ -1,14 +1,14 @@
 --
 --  attach_tpcd.sql
 --
---  $Id: attach_tpcd.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: attach_tpcd.sql,v 1.1.1.1.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  TPC-D Benchmark
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/attach_tpcd_vdb.sql b/binsrc/tests/suite/tpc-d/attach_tpcd_vdb.sql
index f5a0306..8fc47db 100644
--- a/binsrc/tests/suite/tpc-d/attach_tpcd_vdb.sql
+++ b/binsrc/tests/suite/tpc-d/attach_tpcd_vdb.sql
@@ -1,14 +1,14 @@
 --
 --  attach_tpcd.sql
 --
---  $Id: attach_tpcd_vdb.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: attach_tpcd_vdb.sql,v 1.1.1.1.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  TPC-D Benchmark
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/create_indexes.sql b/binsrc/tests/suite/tpc-d/create_indexes.sql
index 297ae6b..701479a 100644
--- a/binsrc/tests/suite/tpc-d/create_indexes.sql
+++ b/binsrc/tests/suite/tpc-d/create_indexes.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: create_indexes.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: create_indexes.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/create_procedures.sql b/binsrc/tests/suite/tpc-d/create_procedures.sql
index 70c574b..eb06b33 100644
--- a/binsrc/tests/suite/tpc-d/create_procedures.sql
+++ b/binsrc/tests/suite/tpc-d/create_procedures.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: create_procedures.sql,v 1.2.2.1 2009/09/17 14:47:09 source Exp $
+--  $Id: create_procedures.sql,v 1.2.2.2 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/create_tables.sql b/binsrc/tests/suite/tpc-d/create_tables.sql
index 72d87bb..a767985 100644
--- a/binsrc/tests/suite/tpc-d/create_tables.sql
+++ b/binsrc/tests/suite/tpc-d/create_tables.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: create_tables.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: create_tables.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/deattach_tpcd.sql b/binsrc/tests/suite/tpc-d/deattach_tpcd.sql
index 205fc57..abad522 100644
--- a/binsrc/tests/suite/tpc-d/deattach_tpcd.sql
+++ b/binsrc/tests/suite/tpc-d/deattach_tpcd.sql
@@ -1,14 +1,14 @@
 --
 --  dedrop_tpcd.sql
 --
---  $Id: deattach_tpcd.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: deattach_tpcd.sql,v 1.1.1.1.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  TPC-D Benchmark
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/load_query.sql b/binsrc/tests/suite/tpc-d/load_query.sql
index 9e476c7..5639e11 100644
--- a/binsrc/tests/suite/tpc-d/load_query.sql
+++ b/binsrc/tests/suite/tpc-d/load_query.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: load_query.sql,v 1.3.2.1 2009/04/16 20:15:22 source Exp $
+--  $Id: load_query.sql,v 1.3.2.2 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/msaccess.sql b/binsrc/tests/suite/tpc-d/msaccess.sql
index 9eaf337..da5c516 100644
--- a/binsrc/tests/suite/tpc-d/msaccess.sql
+++ b/binsrc/tests/suite/tpc-d/msaccess.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: msaccess.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: msaccess.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/mssql.sql b/binsrc/tests/suite/tpc-d/mssql.sql
index dcfcfc0..530b6c7 100644
--- a/binsrc/tests/suite/tpc-d/mssql.sql
+++ b/binsrc/tests/suite/tpc-d/mssql.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mssql.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: mssql.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/ora.sql b/binsrc/tests/suite/tpc-d/ora.sql
index 40c40d3..4b8c119 100644
--- a/binsrc/tests/suite/tpc-d/ora.sql
+++ b/binsrc/tests/suite/tpc-d/ora.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ora.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ora.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/q31.sql b/binsrc/tests/suite/tpc-d/q31.sql
index 189b4e4..4d82d87 100644
--- a/binsrc/tests/suite/tpc-d/q31.sql
+++ b/binsrc/tests/suite/tpc-d/q31.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: q31.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: q31.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/q32.sql b/binsrc/tests/suite/tpc-d/q32.sql
index d81a820..0d6771b 100644
--- a/binsrc/tests/suite/tpc-d/q32.sql
+++ b/binsrc/tests/suite/tpc-d/q32.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: q32.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: q32.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/q33.sql b/binsrc/tests/suite/tpc-d/q33.sql
index ce4b60c..65d4c13 100644
--- a/binsrc/tests/suite/tpc-d/q33.sql
+++ b/binsrc/tests/suite/tpc-d/q33.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: q33.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: q33.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/q34.sql b/binsrc/tests/suite/tpc-d/q34.sql
index 077b859..234f7f3 100644
--- a/binsrc/tests/suite/tpc-d/q34.sql
+++ b/binsrc/tests/suite/tpc-d/q34.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: q34.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: q34.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/res.sh b/binsrc/tests/suite/tpc-d/res.sh
index 3b3b2d6..cb28290 100755
--- a/binsrc/tests/suite/tpc-d/res.sh
+++ b/binsrc/tests/suite/tpc-d/res.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: res.sh,v 1.2.2.1 2009/09/17 14:47:09 source Exp $
+#  $Id: res.sh,v 1.2.2.2 2012/03/08 12:55:10 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/runtests.sh b/binsrc/tests/suite/tpc-d/runtests.sh
index 7a47259..95243ff 100755
--- a/binsrc/tests/suite/tpc-d/runtests.sh
+++ b/binsrc/tests/suite/tpc-d/runtests.sh
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/stat-tpcd.sql b/binsrc/tests/suite/tpc-d/stat-tpcd.sql
index accd73f..1f23c9f 100644
--- a/binsrc/tests/suite/tpc-d/stat-tpcd.sql
+++ b/binsrc/tests/suite/tpc-d/stat-tpcd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: stat-tpcd.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: stat-tpcd.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/test_ms.sql b/binsrc/tests/suite/tpc-d/test_ms.sql
index 54d971f..f5bfad6 100644
--- a/binsrc/tests/suite/tpc-d/test_ms.sql
+++ b/binsrc/tests/suite/tpc-d/test_ms.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test_ms.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: test_ms.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/test_tbl.sql b/binsrc/tests/suite/tpc-d/test_tbl.sql
index afb0085..8dd8c83 100644
--- a/binsrc/tests/suite/tpc-d/test_tbl.sql
+++ b/binsrc/tests/suite/tpc-d/test_tbl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test_tbl.sql,v 1.3 2008/03/05 16:05:50 source Exp $
+--  $Id: test_tbl.sql,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpc-d/tpcd.sh b/binsrc/tests/suite/tpc-d/tpcd.sh
index 95e4143..bcdc7c3 100755
--- a/binsrc/tests/suite/tpc-d/tpcd.sh
+++ b/binsrc/tests/suite/tpc-d/tpcd.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tpcd.sh,v 1.5.2.2 2009/04/16 20:15:22 source Exp $
+#  $Id: tpcd.sh,v 1.5.2.3 2012/03/08 12:55:10 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpcc_update.sql b/binsrc/tests/suite/tpcc_update.sql
index 5339e30..9bd69e7 100644
--- a/binsrc/tests/suite/tpcc_update.sql
+++ b/binsrc/tests/suite/tpcc_update.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpcc_update.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tpcc_update.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpcc_update1.sql b/binsrc/tests/suite/tpcc_update1.sql
index 449d0d0..842ba38 100644
--- a/binsrc/tests/suite/tpcc_update1.sql
+++ b/binsrc/tests/suite/tpcc_update1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpcc_update1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tpcc_update1.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpcc_update2.sql b/binsrc/tests/suite/tpcc_update2.sql
index 9130497..653dc05 100644
--- a/binsrc/tests/suite/tpcc_update2.sql
+++ b/binsrc/tests/suite/tpcc_update2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpcc_update2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tpcc_update2.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpcd.sh b/binsrc/tests/suite/tpcd.sh
index 4ac3c1b..0929b9d 100755
--- a/binsrc/tests/suite/tpcd.sh
+++ b/binsrc/tests/suite/tpcd.sh
@@ -2,14 +2,14 @@
 #
 #  tpcd.sh
 #
-#  $Id: tpcd.sh,v 1.7.2.4 2009/09/17 14:47:09 source Exp $
+#  $Id: tpcd.sh,v 1.7.2.5 2012/03/08 12:55:08 source Exp $
 #
 #  TPC-D tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpkopt.sql b/binsrc/tests/suite/tpkopt.sql
index 42102c7..fd8922a 100644
--- a/binsrc/tests/suite/tpkopt.sql
+++ b/binsrc/tests/suite/tpkopt.sql
@@ -1,14 +1,14 @@
 --
 --  tpkopt.sql
 --
---  $Id: tpkopt.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tpkopt.sql,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 --
 --  Test primary keys
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tplinverse.sql b/binsrc/tests/suite/tplinverse.sql
index cf38441..83a1c9b 100644
--- a/binsrc/tests/suite/tplinverse.sql
+++ b/binsrc/tests/suite/tplinverse.sql
@@ -1,14 +1,14 @@
 --
 --  tplinverse.sql
 --
---  $Id: tplinverse.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tplinverse.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  PL inverse functions suite
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tplmodule.sql b/binsrc/tests/suite/tplmodule.sql
index 74774bc..ff8c5b9 100644
--- a/binsrc/tests/suite/tplmodule.sql
+++ b/binsrc/tests/suite/tplmodule.sql
@@ -1,14 +1,14 @@
 --
 --  tplmodule.sql
 --
---  $Id: tplmodule.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tplmodule.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  PL Modules suite testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tplscroll.sql b/binsrc/tests/suite/tplscroll.sql
index 5d4b08b..3e578b2 100644
--- a/binsrc/tests/suite/tplscroll.sql
+++ b/binsrc/tests/suite/tplscroll.sql
@@ -1,14 +1,14 @@
 --
 --  tplscroll.sql
 --
---  $Id: tplscroll.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tplscroll.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  PL Scrollable cursors suite testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpm.sql b/binsrc/tests/suite/tpm.sql
index ade1ac1..24ec258 100644
--- a/binsrc/tests/suite/tpm.sql
+++ b/binsrc/tests/suite/tpm.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpm.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tpm.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpmfinal.sql b/binsrc/tests/suite/tpmfinal.sql
index b1cea2d..669305f 100644
--- a/binsrc/tests/suite/tpmfinal.sql
+++ b/binsrc/tests/suite/tpmfinal.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpmfinal.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tpmfinal.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpminit.sql b/binsrc/tests/suite/tpminit.sql
index 283da3c..1963b34 100644
--- a/binsrc/tests/suite/tpminit.sql
+++ b/binsrc/tests/suite/tpminit.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpminit.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tpminit.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tproviders.sh b/binsrc/tests/suite/tproviders.sh
index 6ae12bc..418ea94 100755
--- a/binsrc/tests/suite/tproviders.sh
+++ b/binsrc/tests/suite/tproviders.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tproviders.sh,v 1.3.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: tproviders.sh,v 1.3.2.2 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tproxy.sh b/binsrc/tests/suite/tproxy.sh
index cec65af..d0c7cf9 100755
--- a/binsrc/tests/suite/tproxy.sh
+++ b/binsrc/tests/suite/tproxy.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tproxy.sh,v 1.4.2.3 2010/01/28 14:33:20 source Exp $
+#  $Id: tproxy.sh,v 1.4.2.4 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tpview.sql b/binsrc/tests/suite/tpview.sql
index 39d70de..4ab9267 100644
--- a/binsrc/tests/suite/tpview.sql
+++ b/binsrc/tests/suite/tpview.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tpview.sql,v 1.3 2006/09/25 14:25:10 source Exp $
+--  $Id: tpview.sql,v 1.3.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trdf.sql b/binsrc/tests/suite/trdf.sql
index 0b45ed6..77d9497 100644
--- a/binsrc/tests/suite/trdf.sql
+++ b/binsrc/tests/suite/trdf.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: trdf.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: trdf.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trdfbox.sql b/binsrc/tests/suite/trdfbox.sql
index e654016..04779ec 100644
--- a/binsrc/tests/suite/trdfbox.sql
+++ b/binsrc/tests/suite/trdfbox.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: trdfbox.sql,v 1.2.2.3 2010/01/31 20:18:26 source Exp $
+--  $Id: trdfbox.sql,v 1.2.2.4 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trdfhi.sql b/binsrc/tests/suite/trdfhi.sql
index 41f7684..981a009 100644
--- a/binsrc/tests/suite/trdfhi.sql
+++ b/binsrc/tests/suite/trdfhi.sql
@@ -1,10 +1,10 @@
 --
---  $Id: trdfhi.sql,v 1.1 2008/03/19 14:27:31 source Exp $
+--  $Id: trdfhi.sql,v 1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trdfinf.sql b/binsrc/tests/suite/trdfinf.sql
index 335a191..cb5c0b5 100644
--- a/binsrc/tests/suite/trdfinf.sql
+++ b/binsrc/tests/suite/trdfinf.sql
@@ -283,9 +283,9 @@ create procedure s_list (in ctx varchare, in iri varchar, in axis int)
     result (id_to_iri (a[inx]));
 }
 
-sparql clear <g1>;
-sparql clear <g2>;
-sparql clear <g3>;
+sparql clear graph <g1>;
+sparql clear graph <g2>;
+sparql clear graph <g3>;
 sparql insert data in <g1> { <s1> <p> 1; <q> 10 . };                                                           
 sparql insert data in <g2> { <s2> <p> 2; <q> 20 . };
 sparql insert data in <g3> { <s3> <p> 3; <q> 30 . };
diff --git a/binsrc/tests/suite/trecov.sh b/binsrc/tests/suite/trecov.sh
index c49d0e3..f818846 100755
--- a/binsrc/tests/suite/trecov.sh
+++ b/binsrc/tests/suite/trecov.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: trecov.sh,v 1.2.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: trecov.sh,v 1.2.2.3 2012/03/08 12:55:08 source Exp $
 #
 #  Database recovery tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trecov_schema.sh b/binsrc/tests/suite/trecov_schema.sh
index b56273a..fcbc1b4 100755
--- a/binsrc/tests/suite/trecov_schema.sh
+++ b/binsrc/tests/suite/trecov_schema.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: trecov_schema.sh,v 1.1.1.1.2.3 2009/09/17 14:47:09 source Exp $
+#  $Id: trecov_schema.sh,v 1.1.1.1.2.4 2012/03/08 12:55:08 source Exp $
 #
 #  Database recovery tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/treg1.sql b/binsrc/tests/suite/treg1.sql
index 9c28400..dc395cf 100644
--- a/binsrc/tests/suite/treg1.sql
+++ b/binsrc/tests/suite/treg1.sql
@@ -1,14 +1,14 @@
 --
 --  treg.sql
 --
---  $Id: treg1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: treg1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Test DB Registry
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/treg2.sql b/binsrc/tests/suite/treg2.sql
index af72a3a..89b4778 100644
--- a/binsrc/tests/suite/treg2.sql
+++ b/binsrc/tests/suite/treg2.sql
@@ -1,14 +1,14 @@
 --
 --  treg2.sql
 --
---  $Id: treg2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: treg2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:08 source Exp $
 --
 --  Test Database Registry
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tregexp.sql b/binsrc/tests/suite/tregexp.sql
index 9d2376d..d7f5abb 100644
--- a/binsrc/tests/suite/tregexp.sql
+++ b/binsrc/tests/suite/tregexp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tregexp.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tregexp.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tregexpN.sql b/binsrc/tests/suite/tregexpN.sql
index cd7bc00..7aae555 100644
--- a/binsrc/tests/suite/tregexpN.sql
+++ b/binsrc/tests/suite/tregexpN.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tregexpN.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tregexpN.sql,v 1.2.2.1 2012/03/08 12:55:08 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trepl.sh b/binsrc/tests/suite/trepl.sh
index 9f0f9f9..2b74d25 100755
--- a/binsrc/tests/suite/trepl.sh
+++ b/binsrc/tests/suite/trepl.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: trepl.sh,v 1.4.2.2 2010/12/10 12:24:41 source Exp $
+#  $Id: trepl.sh,v 1.4.2.3 2012/03/08 12:55:08 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trepl.sql b/binsrc/tests/suite/trepl.sql
index 8a9bb59..52cacb3 100644
--- a/binsrc/tests/suite/trepl.sql
+++ b/binsrc/tests/suite/trepl.sql
@@ -1,10 +1,10 @@
 --
---  $Id: trepl.sql,v 1.3.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: trepl.sql,v 1.3.2.2 2012/03/08 12:55:08 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trepl_ddl.sql b/binsrc/tests/suite/trepl_ddl.sql
index 4d1455e..b9d52aa 100644
--- a/binsrc/tests/suite/trepl_ddl.sql
+++ b/binsrc/tests/suite/trepl_ddl.sql
@@ -1,14 +1,14 @@
 --
 --  trepl_ddl.sql
 --
---  $Id: trepl_ddl.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: trepl_ddl.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  DDL replication suite
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trepl_p1.sql b/binsrc/tests/suite/trepl_p1.sql
index a5b9c5f..f0fe88a 100644
--- a/binsrc/tests/suite/trepl_p1.sql
+++ b/binsrc/tests/suite/trepl_p1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: trepl_p1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: trepl_p1.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/trepl_t1.sql b/binsrc/tests/suite/trepl_t1.sql
index e77a1a5..35d2ea7 100644
--- a/binsrc/tests/suite/trepl_t1.sql
+++ b/binsrc/tests/suite/trepl_t1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: trepl_t1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: trepl_t1.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/treplh.sh b/binsrc/tests/suite/treplh.sh
index 0e2c036..3cdf1ba 100755
--- a/binsrc/tests/suite/treplh.sh
+++ b/binsrc/tests/suite/treplh.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: treplh.sh,v 1.3.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: treplh.sh,v 1.3.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tschema1.sql b/binsrc/tests/suite/tschema1.sql
index e3d356d..e832e8e 100644
--- a/binsrc/tests/suite/tschema1.sql
+++ b/binsrc/tests/suite/tschema1.sql
@@ -1,14 +1,14 @@
 --
 --  tschema1.sql
 --
---  $Id: tschema1.sql,v 1.1.1.1.2.3 2010/01/31 20:18:26 source Exp $
+--  $Id: tschema1.sql,v 1.1.1.1.2.4 2012/03/08 12:55:09 source Exp $
 --
 --  Test DDL functionality #1
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tschema2.sql b/binsrc/tests/suite/tschema2.sql
index b3c02b5..eba2781 100644
--- a/binsrc/tests/suite/tschema2.sql
+++ b/binsrc/tests/suite/tschema2.sql
@@ -1,14 +1,14 @@
 --
 --  tschema2.sql
 --
---  $Id: tschema2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tschema2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test DDL functionality #2
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tschema3.sql b/binsrc/tests/suite/tschema3.sql
index bcccd6e..b3d2709 100644
--- a/binsrc/tests/suite/tschema3.sql
+++ b/binsrc/tests/suite/tschema3.sql
@@ -1,14 +1,14 @@
 --
 --  tschema3.sql
 --
---  $Id: tschema3.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tschema3.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test DDL functionality #3
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tschema4.sql b/binsrc/tests/suite/tschema4.sql
index 7e34044..7a60477 100644
--- a/binsrc/tests/suite/tschema4.sql
+++ b/binsrc/tests/suite/tschema4.sql
@@ -1,14 +1,14 @@
 --
 --  tschema4.sql
 --
---  $Id: tschema4.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tschema4.sql,v 1.2.2.3 2012/03/08 12:55:09 source Exp $
 --
 --  Test DDL functionality #4
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsec.sh b/binsrc/tests/suite/tsec.sh
index f321704..1861c4f 100755
--- a/binsrc/tests/suite/tsec.sh
+++ b/binsrc/tests/suite/tsec.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tsec.sh,v 1.1.1.1.2.2 2010/01/31 20:18:26 source Exp $
+#  $Id: tsec.sh,v 1.1.1.1.2.4 2012/03/12 22:45:09 source Exp $
 #
 #  Security tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -49,7 +49,22 @@ then
   LOG "***ABORTED: tsecini.sql -- Initialization"
   exit 1
 fi
-
+RUN $ISQL $DSN 'U1RUS' 'Абракадабра2' '"EXEC=ECHO BOTH 'Logging in as U1RUS with UTF-8 password set as wide before';"' PROMPT=OFF ERRORS=STDOUT 2> /dev/null
+if test $STATUS -eq 0
+then
+  LOG "PASSED: Lets U1RUS in with an UTF-8 password"
+else
+  LOG "***FAILED: Does not let U1RUS in with an UTF-8 password"
+  exit 1
+fi
+RUN $ISQL $DSN 'U1RUS' 'Абракадабра1' '"EXEC=ECHO BOTH 'Trying to get in as U1RUS with the wrong password';"' PROMPT=OFF ERRORS=STDOUT 2> /dev/null
+if test $STATUS -eq 0
+then
+  LOG "***ABORTED: Lets the U1RUS in with a wrong password"
+  exit 1
+else
+  LOG "PASSED: Does not let U1RUS in with a wrong password"
+fi
 RUN $ISQL $DSN U1 U1 tsecu1-1.sql PROMPT=OFF VERBOSE=OFF ERRORS=STDOUT
 if test $STATUS -ne 0
 then
diff --git a/binsrc/tests/suite/tsec_proc.sql b/binsrc/tests/suite/tsec_proc.sql
index 1f3d532..d4b5859 100644
--- a/binsrc/tests/suite/tsec_proc.sql
+++ b/binsrc/tests/suite/tsec_proc.sql
@@ -1,14 +1,14 @@
 --
 --  tsec_proc.sql
 --
---  $Id: tsec_proc.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsec_proc.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Procedures security tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsec_role.sql b/binsrc/tests/suite/tsec_role.sql
index c41902e..ba03499 100644
--- a/binsrc/tests/suite/tsec_role.sql
+++ b/binsrc/tests/suite/tsec_role.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tsec_role.sql,v 1.3.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tsec_role.sql,v 1.3.2.3 2012/03/08 12:55:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsec_role1.sql b/binsrc/tests/suite/tsec_role1.sql
index 48f5026..f63a898 100644
--- a/binsrc/tests/suite/tsec_role1.sql
+++ b/binsrc/tests/suite/tsec_role1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsec_role1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsec_role1.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsec_role2.sql b/binsrc/tests/suite/tsec_role2.sql
index c9ed661..5a5b6ae 100644
--- a/binsrc/tests/suite/tsec_role2.sql
+++ b/binsrc/tests/suite/tsec_role2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsec_role2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsec_role2.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecend.sql b/binsrc/tests/suite/tsecend.sql
index a928e6d..f6c79a3 100644
--- a/binsrc/tests/suite/tsecend.sql
+++ b/binsrc/tests/suite/tsecend.sql
@@ -1,14 +1,14 @@
 --
 --  tsecend.sql
 --
---  $Id: tsecend.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsecend.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test Security
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecini-1.sql b/binsrc/tests/suite/tsecini-1.sql
index d25f258..10962d5 100644
--- a/binsrc/tests/suite/tsecini-1.sql
+++ b/binsrc/tests/suite/tsecini-1.sql
@@ -1,14 +1,14 @@
 --
 --  tsecini-1.sql
 --
---  $Id: tsecini-1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsecini-1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Security checks
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecini.sql b/binsrc/tests/suite/tsecini.sql
index b9908e1..3c167de 100644
--- a/binsrc/tests/suite/tsecini.sql
+++ b/binsrc/tests/suite/tsecini.sql
@@ -1,14 +1,14 @@
 --
 --  tsecini.sql
 --
---  $Id: tsecini.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsecini.sql,v 1.1.1.1.2.2 2012/03/12 22:45:09 source Exp $
 --
 --  Test security - initialization
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -83,6 +83,7 @@ insert into SEC_TEST_3 values (121, 242, 363);
 insert into SEC_TEST_4 values (1331, 2662, 3993);
 
 delete user U1;
+delete user U1RUS;
 delete user U2;
 delete user U3;
 delete user U4;
@@ -107,6 +108,24 @@ SET ARGV[$LIF] $+ $ARGV[$LIF] 1;
 ECHO BOTH ": U_ID (" $LAST[1] ") " $IF $LIF "==" "!=" " U_GROUP (" $LAST[2] ")\n";
 
 --
+-- Now a user named 'U1RUS' is created for tests of "national" passwords:
+--
+
+create user U1RUS;
+select U_ID, U_GROUP from SYS_USERS where U_NAME = 'U1RUS';
+ECHO BOTH $IF $EQU $ROWCNT 1 "PASSED" "***FAILED";
+SET ARGV[$LIF] $+ $ARGV[$LIF] 1;
+ECHO BOTH ": " $ROWCNT " user(s) named 'U1RUS' after CREATE USER U1RUS;\n";
+user_set_password ('U1RUS', charset_recode ('Абракадабра1', 'UTF-8', '_WIDE_'));
+ECHO BOTH $IF $EQU $STATE "OK" "PASSED" "***FAILED";
+SET ARGV[$LIF] $+ $ARGV[$LIF] 1;
+ECHO BOTH ": User U1RUS got wide password via user_set_password; STATE=" $STATE " MESSAGE=" $MESSAGE "\n";
+DB.DBA.USER_CHANGE_PASSWORD ('U1RUS', charset_recode ('Абракадабра1', 'UTF-8', '_WIDE_'), charset_recode ('Абракадабра2', 'UTF-8', '_WIDE_'));
+ECHO BOTH $IF $EQU $STATE "OK" "PASSED" "***FAILED";
+SET ARGV[$LIF] $+ $ARGV[$LIF] 1;
+ECHO BOTH ": User U1RUS got changed wide password via DB.DBA.USER_CHANGE_PASSWORD; STATE=" $STATE " MESSAGE=" $MESSAGE "\n";
+
+--
 -- First check that there is only one user named 'U2' after this command:
 --
 
diff --git a/binsrc/tests/suite/tsecu1-1.sql b/binsrc/tests/suite/tsecu1-1.sql
index 9e741de..73ef9e5 100644
--- a/binsrc/tests/suite/tsecu1-1.sql
+++ b/binsrc/tests/suite/tsecu1-1.sql
@@ -1,14 +1,14 @@
 --
 --  tsecu1-1.sql
 --
---  $Id: tsecu1-1.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tsecu1-1.sql,v 1.2.2.3 2012/03/08 12:55:09 source Exp $
 --
 --  Security test #1
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecu1-2.sql b/binsrc/tests/suite/tsecu1-2.sql
index c4d343a..ab4c1ba 100644
--- a/binsrc/tests/suite/tsecu1-2.sql
+++ b/binsrc/tests/suite/tsecu1-2.sql
@@ -1,14 +1,14 @@
 --
 --  tsecu1-2.sql
 --
---  $Id: tsecu1-2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsecu1-2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Security test #2
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecu3-1.sql b/binsrc/tests/suite/tsecu3-1.sql
index 1e71c2a..440dbee 100644
--- a/binsrc/tests/suite/tsecu3-1.sql
+++ b/binsrc/tests/suite/tsecu3-1.sql
@@ -1,14 +1,14 @@
 --
 --  tsecu3-1.sql
 --
---  $Id: tsecu3-1.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tsecu3-1.sql,v 1.2.2.3 2012/03/08 12:55:09 source Exp $
 --
 --  Security test #3
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecu3-2.sql b/binsrc/tests/suite/tsecu3-2.sql
index 55ee8b9..4791e30 100644
--- a/binsrc/tests/suite/tsecu3-2.sql
+++ b/binsrc/tests/suite/tsecu3-2.sql
@@ -1,14 +1,14 @@
 --
 --  tsecu3-2.sql
 --
---  $Id: tsecu3-2.sql,v 1.2.2.2 2009/04/20 21:19:39 source Exp $
+--  $Id: tsecu3-2.sql,v 1.2.2.3 2012/03/08 12:55:09 source Exp $
 --
 --  Security test #3 part 2
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsecu5-1.sql b/binsrc/tests/suite/tsecu5-1.sql
index 3aa3fcd..c25bc00 100644
--- a/binsrc/tests/suite/tsecu5-1.sql
+++ b/binsrc/tests/suite/tsecu5-1.sql
@@ -1,14 +1,14 @@
 --
 --  tsecu5-1.sql
 --
---  $Id: tsecu5-1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsecu5-1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Security test #5
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsnaprepl.sql b/binsrc/tests/suite/tsnaprepl.sql
index fe5c252..593565f 100644
--- a/binsrc/tests/suite/tsnaprepl.sql
+++ b/binsrc/tests/suite/tsnaprepl.sql
@@ -1,14 +1,14 @@
 --
 --  tsnaprepl.sql
 --
---  $Id: tsnaprepl.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tsnaprepl.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Snapshot replication local tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoap.sql b/binsrc/tests/suite/tsoap.sql
index e96a140..9cfebc5 100644
--- a/binsrc/tests/suite/tsoap.sql
+++ b/binsrc/tests/suite/tsoap.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoap.sql,v 1.2.2.1 2010/12/10 12:24:41 source Exp $
+--  $Id: tsoap.sql,v 1.2.2.2 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoap12.sh b/binsrc/tests/suite/tsoap12.sh
index dde8538..ed8bc33 100755
--- a/binsrc/tests/suite/tsoap12.sh
+++ b/binsrc/tests/suite/tsoap12.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tsoap12.sh,v 1.5.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: tsoap12.sh,v 1.5.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoap_new.sql b/binsrc/tests/suite/tsoap_new.sql
index 27c307a..6c1cb17 100644
--- a/binsrc/tests/suite/tsoap_new.sql
+++ b/binsrc/tests/suite/tsoap_new.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoap_new.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsoap_new.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoap_r3.sql b/binsrc/tests/suite/tsoap_r3.sql
index 8a7281f..01f528a 100644
--- a/binsrc/tests/suite/tsoap_r3.sql
+++ b/binsrc/tests/suite/tsoap_r3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoap_r3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsoap_r3.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoap_r4.sql b/binsrc/tests/suite/tsoap_r4.sql
index 3603242..609e8cf 100644
--- a/binsrc/tests/suite/tsoap_r4.sql
+++ b/binsrc/tests/suite/tsoap_r4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoap_r4.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsoap_r4.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoap_rpc.sql b/binsrc/tests/suite/tsoap_rpc.sql
index ee739b4..5e9a03a 100644
--- a/binsrc/tests/suite/tsoap_rpc.sql
+++ b/binsrc/tests/suite/tsoap_rpc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoap_rpc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsoap_rpc.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoapcpl.sql b/binsrc/tests/suite/tsoapcpl.sql
index dc435d8..dbae20d 100644
--- a/binsrc/tests/suite/tsoapcpl.sql
+++ b/binsrc/tests/suite/tsoapcpl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoapcpl.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsoapcpl.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsoapudt.sql b/binsrc/tests/suite/tsoapudt.sql
index b3b1cca..4add2c9 100644
--- a/binsrc/tests/suite/tsoapudt.sql
+++ b/binsrc/tests/suite/tsoapudt.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsoapudt.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsoapudt.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsparql.sh b/binsrc/tests/suite/tsparql.sh
index e3636ca..443b7fa 100755
--- a/binsrc/tests/suite/tsparql.sh
+++ b/binsrc/tests/suite/tsparql.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tsparql.sh,v 1.5.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: tsparql.sh,v 1.5.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsparql_demo.sh b/binsrc/tests/suite/tsparql_demo.sh
index 4e6d9c3..9684e8e 100755
--- a/binsrc/tests/suite/tsparql_demo.sh
+++ b/binsrc/tests/suite/tsparql_demo.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tsparql_demo.sh,v 1.5.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: tsparql_demo.sh,v 1.5.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsponge.sql b/binsrc/tests/suite/tsponge.sql
index df3c170..456ded2 100644
--- a/binsrc/tests/suite/tsponge.sql
+++ b/binsrc/tests/suite/tsponge.sql
@@ -12,7 +12,7 @@ registry_set ('__sparql_sponge_use_w3c_xslt', 'off');
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_HTTP_SESSION';
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_CALAIS';
 delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FEED_RESPONSE';
-delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH_SELECTION';
+delete from DB.DBA.SYS_RDF_MAPPERS where RM_HOOK = 'DB.DBA.RDF_LOAD_FACEBOOK_OPENGRAPH';
 update DB.DBA.SYS_RDF_MAPPERS set RM_OPTIONS = vector ('add-html-meta', 'no', 'get-feeds', 'no') where RM_HOOK = 'DB.DBA.RDF_LOAD_HTML_RESPONSE';
 delete from DB.DBA.RDF_META_CARTRIDGES;
 
diff --git a/binsrc/tests/suite/tspotlight.sql b/binsrc/tests/suite/tspotlight.sql
index 5c1825b..1f60ace 100644
--- a/binsrc/tests/suite/tspotlight.sql
+++ b/binsrc/tests/suite/tspotlight.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tspotlight.sql,v 1.2.2.1 2009/04/16 12:37:43 source Exp $
+--  $Id: tspotlight.sql,v 1.2.2.2 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsql.sh b/binsrc/tests/suite/tsql.sh
index 2864e62..1497680 100755
--- a/binsrc/tests/suite/tsql.sh
+++ b/binsrc/tests/suite/tsql.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 #  tsql.sh
 #
-#  $Id: tsql.sh,v 1.7.2.4 2009/08/09 00:16:20 source Exp $
+#  $Id: tsql.sh,v 1.7.2.5 2012/03/08 12:55:09 source Exp $
 #
 #  SQL conformance tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsql2.sh b/binsrc/tests/suite/tsql2.sh
index d31c18c..668e549 100755
--- a/binsrc/tests/suite/tsql2.sh
+++ b/binsrc/tests/suite/tsql2.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 #  tsql2.sh
 #
-#  $Id: tsql2.sh,v 1.5.2.3 2009/07/09 13:04:50 source Exp $
+#  $Id: tsql2.sh,v 1.5.2.4 2012/03/08 12:55:09 source Exp $
 #
 #  SQL conformance tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsql3.sh b/binsrc/tests/suite/tsql3.sh
index bfdce0f..13ac8b8 100755
--- a/binsrc/tests/suite/tsql3.sh
+++ b/binsrc/tests/suite/tsql3.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 #  tsql3.sh
 #
-#  $Id: tsql3.sh,v 1.4.2.5 2009/11/19 19:24:11 source Exp $
+#  $Id: tsql3.sh,v 1.4.2.6 2012/03/08 12:55:09 source Exp $
 #
 #  SQL conformance tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsqllite.sh b/binsrc/tests/suite/tsqllite.sh
index b021e7a..d1a1d0b 100755
--- a/binsrc/tests/suite/tsqllite.sh
+++ b/binsrc/tests/suite/tsqllite.sh
@@ -1,14 +1,14 @@
 #!/bin/sh
 #  tsql.sh
 #
-#  $Id: tsqllite.sh,v 1.1.2.1 2009/04/16 12:37:43 source Exp $
+#  $Id: tsqllite.sh,v 1.1.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  SQL conformance tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsqlo.sh b/binsrc/tests/suite/tsqlo.sh
index adc1b66..2cb8793 100755
--- a/binsrc/tests/suite/tsqlo.sh
+++ b/binsrc/tests/suite/tsqlo.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tsqlo.sh,v 1.4.2.1 2009/04/16 12:37:43 source Exp $
+#  $Id: tsqlo.sh,v 1.4.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  SQL Optimizer tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsqlo2.sql b/binsrc/tests/suite/tsqlo2.sql
index 98b61b5..3b7c10a 100644
--- a/binsrc/tests/suite/tsqlo2.sql
+++ b/binsrc/tests/suite/tsqlo2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsqlo2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsqlo2.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tstriping.sh b/binsrc/tests/suite/tstriping.sh
index ae24d82..723f28e 100755
--- a/binsrc/tests/suite/tstriping.sh
+++ b/binsrc/tests/suite/tstriping.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tstriping.sh,v 1.5.2.2 2010/01/31 20:18:26 source Exp $
+#  $Id: tstriping.sh,v 1.5.2.3 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tstrses.sql b/binsrc/tests/suite/tstrses.sql
index 25dc3fc..150d652 100644
--- a/binsrc/tests/suite/tstrses.sql
+++ b/binsrc/tests/suite/tstrses.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tstrses.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tstrses.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsxml.sh b/binsrc/tests/suite/tsxml.sh
index d23b7ef..655a650 100755
--- a/binsrc/tests/suite/tsxml.sh
+++ b/binsrc/tests/suite/tsxml.sh
@@ -1,13 +1,13 @@
 #!/bin/sh 
 #
-#  $Id: tsxml.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: tsxml.sh,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 #
 #  Database recovery tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsxml.sql b/binsrc/tests/suite/tsxml.sql
index 516314b..6defc9b 100644
--- a/binsrc/tests/suite/tsxml.sql
+++ b/binsrc/tests/suite/tsxml.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tsxml.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tsxml.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tsyncml.sql b/binsrc/tests/suite/tsyncml.sql
index 0e9337f..40301c2 100644
--- a/binsrc/tests/suite/tsyncml.sql
+++ b/binsrc/tests/suite/tsyncml.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tsyncml.sql,v 1.4.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: tsyncml.sql,v 1.4.2.2 2012/03/08 12:55:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttext.sql b/binsrc/tests/suite/ttext.sql
index 72ff668..ee51795 100644
--- a/binsrc/tests/suite/ttext.sql
+++ b/binsrc/tests/suite/ttext.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ttext.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ttext.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttext_qual_hf.sql b/binsrc/tests/suite/ttext_qual_hf.sql
index 1932a23..f1c4636 100644
--- a/binsrc/tests/suite/ttext_qual_hf.sql
+++ b/binsrc/tests/suite/ttext_qual_hf.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ttext_qual_hf.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ttext_qual_hf.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttrig1.sql b/binsrc/tests/suite/ttrig1.sql
index 45ec56b..accd589 100644
--- a/binsrc/tests/suite/ttrig1.sql
+++ b/binsrc/tests/suite/ttrig1.sql
@@ -1,14 +1,14 @@
 --
 --  ttrig1.sql
 --
---  $Id: ttrig1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: ttrig1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test local or remote table triggers.
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttrig2.sql b/binsrc/tests/suite/ttrig2.sql
index 1d838c0..b31e3b5 100644
--- a/binsrc/tests/suite/ttrig2.sql
+++ b/binsrc/tests/suite/ttrig2.sql
@@ -1,14 +1,14 @@
 --
 --  ttrig2.sql
 --
---  $Id: ttrig2.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: ttrig2.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test INSTEAD OF & view triggers.
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttrigr.sql b/binsrc/tests/suite/ttrigr.sql
index a3ba0fb..fd10ebc 100644
--- a/binsrc/tests/suite/ttrigr.sql
+++ b/binsrc/tests/suite/ttrigr.sql
@@ -1,14 +1,14 @@
 --
 --  ttrigr.sql
 --
---  $Id: ttrigr.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: ttrigr.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Trigger testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttrigt.sql b/binsrc/tests/suite/ttrigt.sql
index 2d9c563..1c4f881 100644
--- a/binsrc/tests/suite/ttrigt.sql
+++ b/binsrc/tests/suite/ttrigt.sql
@@ -1,14 +1,14 @@
 --
 --  ttrigt.sql
 --
---  $Id: ttrigt.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: ttrigt.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Trigger testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttrigtrig.sql b/binsrc/tests/suite/ttrigtrig.sql
index e5e92fb..d199d92 100644
--- a/binsrc/tests/suite/ttrigtrig.sql
+++ b/binsrc/tests/suite/ttrigtrig.sql
@@ -1,14 +1,14 @@
 --
 --  ttrigtrig.sql
 --
---  $Id: ttrigtrig.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: ttrigtrig.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Trigger testing
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/ttutorial.sh b/binsrc/tests/suite/ttutorial.sh
index 46c689c..70feee1 100755
--- a/binsrc/tests/suite/ttutorial.sh
+++ b/binsrc/tests/suite/ttutorial.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: ttutorial.sh,v 1.4.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: ttutorial.sh,v 1.4.2.3 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tunder1.sql b/binsrc/tests/suite/tunder1.sql
index 74e2013..01850f2 100644
--- a/binsrc/tests/suite/tunder1.sql
+++ b/binsrc/tests/suite/tunder1.sql
@@ -1,14 +1,14 @@
 --
 --  tschema1.sql
 --
---  $Id: tunder1.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tunder1.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test DDL functionality #1
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tunder2.sql b/binsrc/tests/suite/tunder2.sql
index 0951f40..cbbcf8f 100644
--- a/binsrc/tests/suite/tunder2.sql
+++ b/binsrc/tests/suite/tunder2.sql
@@ -1,14 +1,14 @@
 --
 --  tschema1.sql
 --
---  $Id: tunder2.sql,v 1.2 2006/10/09 12:32:39 source Exp $
+--  $Id: tunder2.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Test DDL functionality #1
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tunq.sql b/binsrc/tests/suite/tunq.sql
index ff516c3..63492e2 100644
--- a/binsrc/tests/suite/tunq.sql
+++ b/binsrc/tests/suite/tunq.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tunq.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tunq.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tupdate.sql b/binsrc/tests/suite/tupdate.sql
index dc53a32..ffc4e45 100644
--- a/binsrc/tests/suite/tupdate.sql
+++ b/binsrc/tests/suite/tupdate.sql
@@ -1,14 +1,14 @@
 --
 --  tupdate.sql
 --
---  $Id: tupdate.sql,v 1.2.2.3 2009/07/16 06:17:17 source Exp $
+--  $Id: tupdate.sql,v 1.2.2.4 2012/03/08 12:55:09 source Exp $
 --
 --  Update tests
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tupdg.sql b/binsrc/tests/suite/tupdg.sql
index e153f14..2fe46cc 100644
--- a/binsrc/tests/suite/tupdg.sql
+++ b/binsrc/tests/suite/tupdg.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tupdg.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tupdg.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tupgrade_recov.sh b/binsrc/tests/suite/tupgrade_recov.sh
index b1e4a25..ea6a8d3 100755
--- a/binsrc/tests/suite/tupgrade_recov.sh
+++ b/binsrc/tests/suite/tupgrade_recov.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tupgrade_recov.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: tupgrade_recov.sh,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 #
 #  Database recovery tests afer database upgrade
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tvad.sh b/binsrc/tests/suite/tvad.sh
index e73ee61..80b80b3 100755
--- a/binsrc/tests/suite/tvad.sh
+++ b/binsrc/tests/suite/tvad.sh
@@ -1,13 +1,13 @@
 #!/bin/sh 
 #
-#  $Id: tvad.sh,v 1.5.2.3 2011/03/25 15:10:16 source Exp $
+#  $Id: tvad.sh,v 1.5.2.4 2012/03/08 12:55:09 source Exp $
 #
 #  VAD tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -96,7 +96,7 @@ GenVAD1 ()
 	  <name package="rdf_lib">
 		<prop name="Title" value="RDF Support Library" />
 		<prop name="Developer" value="OpenLink Software" />
-		<prop name="Copyright" value="(C) 1998-2011 OpenLink Software" />
+		<prop name="Copyright" value="(C) 1998-2012 OpenLink Software" />
 		<prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
 		<prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
 	  </name>
@@ -135,7 +135,7 @@ GenVAD2 ()
 	  <name package="test1">
 		<prop name="Title" value="test" />
 		<prop name="Developer" value="OpenLink Software" />
-		<prop name="Copyright" value="(C) 1998-2011 OpenLink Software" />
+		<prop name="Copyright" value="(C) 1998-2012 OpenLink Software" />
 		<prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
 		<prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
 	  </name>
@@ -172,7 +172,7 @@ GenVAD3 ()
 	  <name package="test1">
 		<prop name="Title" value="test" />
 		<prop name="Developer" value="OpenLink Software" />
-		<prop name="Copyright" value="(C) 1998-2011 OpenLink Software" />
+		<prop name="Copyright" value="(C) 1998-2012 OpenLink Software" />
 		<prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
 		<prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
 	  </name>
@@ -208,7 +208,7 @@ GenVAD4 ()
 	  <name package="test2">
 		<prop name="Title" value="test" />
 		<prop name="Developer" value="OpenLink Software" />
-		<prop name="Copyright" value="(C) 1998-2011 OpenLink Software" />
+		<prop name="Copyright" value="(C) 1998-2012 OpenLink Software" />
 		<prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
 		<prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
 	  </name>
diff --git a/binsrc/tests/suite/tvad2.sh b/binsrc/tests/suite/tvad2.sh
index 70aea44..99e343f 100755
--- a/binsrc/tests/suite/tvad2.sh
+++ b/binsrc/tests/suite/tvad2.sh
@@ -1,13 +1,13 @@
 #!/bin/sh 
 #
-#  $Id: tvad2.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: tvad2.sh,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 #
 #  VAD tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tview.sql b/binsrc/tests/suite/tview.sql
index 45af294..547092c 100644
--- a/binsrc/tests/suite/tview.sql
+++ b/binsrc/tests/suite/tview.sql
@@ -1,14 +1,14 @@
 --
 --  tview.sql
 --
---  $Id: tview.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tview.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  UNION and VIEW tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tviewqual.sql b/binsrc/tests/suite/tviewqual.sql
index 62015ef..c31763f 100644
--- a/binsrc/tests/suite/tviewqual.sql
+++ b/binsrc/tests/suite/tviewqual.sql
@@ -1,14 +1,14 @@
 --
 --  tviewqual.sql
 --
---  $Id: tviewqual.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tviewqual.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  expansion of the view qualifiers
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tvsp.sh b/binsrc/tests/suite/tvsp.sh
index 7c1ffa7..d204a7a 100755
--- a/binsrc/tests/suite/tvsp.sh
+++ b/binsrc/tests/suite/tvsp.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tvsp.sh,v 1.2 2008/12/17 16:55:28 source Exp $
+#  $Id: tvsp.sh,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 #
 #  Database recovery tests
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tvsp.sql b/binsrc/tests/suite/tvsp.sql
index 7fccd6a..f1d3551 100644
--- a/binsrc/tests/suite/tvsp.sql
+++ b/binsrc/tests/suite/tvsp.sql
@@ -1,14 +1,14 @@
 --
 --  tvsp.sql
 --
---  $Id: tvsp.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: tvsp.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  Check vsp functions
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tvspx.sh b/binsrc/tests/suite/tvspx.sh
index cca58e3..ce33589 100755
--- a/binsrc/tests/suite/tvspx.sh
+++ b/binsrc/tests/suite/tvspx.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tvspx.sh,v 1.4.2.3 2010/01/28 14:33:20 source Exp $
+#  $Id: tvspx.sh,v 1.4.2.4 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tvspxex.awk b/binsrc/tests/suite/tvspxex.awk
index 54e3eb6..b7a5785 100644
--- a/binsrc/tests/suite/tvspxex.awk
+++ b/binsrc/tests/suite/tvspxex.awk
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/tvspxex.sh b/binsrc/tests/suite/tvspxex.sh
index 09d8ba9..d4033a5 100755
--- a/binsrc/tests/suite/tvspxex.sh
+++ b/binsrc/tests/suite/tvspxex.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: tvspxex.sh,v 1.4.2.1 2009/07/09 13:04:50 source Exp $
+#  $Id: tvspxex.sh,v 1.4.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twcopy.sh b/binsrc/tests/suite/twcopy.sh
index 9061201..16fd1d5 100755
--- a/binsrc/tests/suite/twcopy.sh
+++ b/binsrc/tests/suite/twcopy.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: twcopy.sh,v 1.5.2.4 2011/03/25 15:10:16 source Exp $
+#  $Id: twcopy.sh,v 1.5.2.5 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twcopy.sql b/binsrc/tests/suite/twcopy.sql
index aed7a4c..9f7b35d 100644
--- a/binsrc/tests/suite/twcopy.sql
+++ b/binsrc/tests/suite/twcopy.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: twcopy.sql,v 1.2.2.1 2010/01/31 20:18:26 source Exp $
+--  $Id: twcopy.sql,v 1.2.2.2 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twiki.sh b/binsrc/tests/suite/twiki.sh
index a441418..61ea7b4 100755
--- a/binsrc/tests/suite/twiki.sh
+++ b/binsrc/tests/suite/twiki.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: twiki.sh,v 1.2.2.2 2009/07/09 13:04:50 source Exp $
+#  $Id: twiki.sh,v 1.2.2.3 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twords.sql b/binsrc/tests/suite/twords.sql
index 60dcb69..84ea671 100644
--- a/binsrc/tests/suite/twords.sql
+++ b/binsrc/tests/suite/twords.sql
@@ -1,14 +1,14 @@
 --
 --  twords.sql
 --
---  $Id: twords.sql,v 1.2.2.2 2009/07/09 13:04:50 source Exp $
+--  $Id: twords.sql,v 1.2.2.3 2012/03/08 12:55:09 source Exp $
 --
 --  Word tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twsrm.sql b/binsrc/tests/suite/twsrm.sql
index ba59530..cfe2821 100644
--- a/binsrc/tests/suite/twsrm.sql
+++ b/binsrc/tests/suite/twsrm.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: twsrm.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: twsrm.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twsrp.sql b/binsrc/tests/suite/twsrp.sql
index d91c4dd..057aa17 100644
--- a/binsrc/tests/suite/twsrp.sql
+++ b/binsrc/tests/suite/twsrp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: twsrp.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: twsrp.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twss.sql b/binsrc/tests/suite/twss.sql
index 4d949a8..582b1f1 100644
--- a/binsrc/tests/suite/twss.sql
+++ b/binsrc/tests/suite/twss.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: twss.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: twss.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/twstr.sql b/binsrc/tests/suite/twstr.sql
index 91e9227..aed4dbd 100644
--- a/binsrc/tests/suite/twstr.sql
+++ b/binsrc/tests/suite/twstr.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: twstr.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: twstr.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txml.sql b/binsrc/tests/suite/txml.sql
index a3fdafa..0cb233d 100644
--- a/binsrc/tests/suite/txml.sql
+++ b/binsrc/tests/suite/txml.sql
@@ -1,14 +1,14 @@
 --
 --  txml.sql
 --
---  $Id: txml.sql,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+--  $Id: txml.sql,v 1.1.1.1.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  XML tests
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txmla.sql b/binsrc/tests/suite/txmla.sql
index ace47cf..7c362c6 100644
--- a/binsrc/tests/suite/txmla.sql
+++ b/binsrc/tests/suite/txmla.sql
@@ -1,10 +1,10 @@
 --
---  $Id: txmla.sql,v 1.4.2.1 2009/04/20 21:19:39 source Exp $
+--  $Id: txmla.sql,v 1.4.2.2 2012/03/08 12:55:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txmla3.sql b/binsrc/tests/suite/txmla3.sql
index 5e4c6bc..551ef34 100644
--- a/binsrc/tests/suite/txmla3.sql
+++ b/binsrc/tests/suite/txmla3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: txmla3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: txmla3.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txmlload.sql b/binsrc/tests/suite/txmlload.sql
index f31ad3f..9062d19 100644
--- a/binsrc/tests/suite/txmlload.sql
+++ b/binsrc/tests/suite/txmlload.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: txmlload.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: txmlload.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txsl.sql b/binsrc/tests/suite/txsl.sql
index 81906a5..36d76ee 100644
--- a/binsrc/tests/suite/txsl.sql
+++ b/binsrc/tests/suite/txsl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: txsl.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: txsl.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txslt.sh b/binsrc/tests/suite/txslt.sh
index e28d93c..bf89ce0 100755
--- a/binsrc/tests/suite/txslt.sh
+++ b/binsrc/tests/suite/txslt.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: txslt.sh,v 1.4.2.1 2009/04/20 21:17:47 source Exp $
+#  $Id: txslt.sh,v 1.4.2.2 2012/03/08 12:55:09 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txslt.sql b/binsrc/tests/suite/txslt.sql
index 1917721..60ad819 100644
--- a/binsrc/tests/suite/txslt.sql
+++ b/binsrc/tests/suite/txslt.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: txslt.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: txslt.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txslt1.sql b/binsrc/tests/suite/txslt1.sql
index bf2b072..ca764e4 100644
--- a/binsrc/tests/suite/txslt1.sql
+++ b/binsrc/tests/suite/txslt1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: txslt1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: txslt1.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/txslt_funcext.sql b/binsrc/tests/suite/txslt_funcext.sql
index 72a88fd..e7b1185 100644
--- a/binsrc/tests/suite/txslt_funcext.sql
+++ b/binsrc/tests/suite/txslt_funcext.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: txslt_funcext.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: txslt_funcext.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/uaggr_test.sql b/binsrc/tests/suite/uaggr_test.sql
index 14cf283..f3d5a4d 100644
--- a/binsrc/tests/suite/uaggr_test.sql
+++ b/binsrc/tests/suite/uaggr_test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: uaggr_test.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: uaggr_test.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/udtsec.sql b/binsrc/tests/suite/udtsec.sql
index ac3d90b..0041831 100644
--- a/binsrc/tests/suite/udtsec.sql
+++ b/binsrc/tests/suite/udtsec.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: udtsec.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: udtsec.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/udttest.sql b/binsrc/tests/suite/udttest.sql
index 64f292e..b687e40 100644
--- a/binsrc/tests/suite/udttest.sql
+++ b/binsrc/tests/suite/udttest.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: udttest.sql,v 1.2.2.1 2009/07/14 22:24:47 source Exp $
+--  $Id: udttest.sql,v 1.2.2.2 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/udttest1.sql b/binsrc/tests/suite/udttest1.sql
index d485d15..ea0588f 100644
--- a/binsrc/tests/suite/udttest1.sql
+++ b/binsrc/tests/suite/udttest1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: udttest1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: udttest1.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/uri_test.sql b/binsrc/tests/suite/uri_test.sql
index f442682..2045d86 100644
--- a/binsrc/tests/suite/uri_test.sql
+++ b/binsrc/tests/suite/uri_test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: uri_test.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: uri_test.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/uri_wide_test.sql b/binsrc/tests/suite/uri_wide_test.sql
index 47aec30..698f0eb 100644
--- a/binsrc/tests/suite/uri_wide_test.sql
+++ b/binsrc/tests/suite/uri_wide_test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: uri_wide_test.sql,v 1.1 2007/11/18 15:10:34 source Exp $
+--  $Id: uri_wide_test.sql,v 1.1.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/url_rewrite_test.sql b/binsrc/tests/suite/url_rewrite_test.sql
index aa9d699..5cd74c4 100644
--- a/binsrc/tests/suite/url_rewrite_test.sql
+++ b/binsrc/tests/suite/url_rewrite_test.sql
@@ -1,10 +1,10 @@
 --
---  $Id: url_rewrite_test.sql,v 1.2 2007/05/15 12:40:12 source Exp $
+--  $Id: url_rewrite_test.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test/vsp/vad_test1/1.vsp b/binsrc/tests/suite/vad_test/vsp/vad_test1/1.vsp
index 747e935..1f0a5ed 100644
--- a/binsrc/tests/suite/vad_test/vsp/vad_test1/1.vsp
+++ b/binsrc/tests/suite/vad_test/vsp/vad_test1/1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: 1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: 1.vsp,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test/vsp/vad_test1/2.vsp b/binsrc/tests/suite/vad_test/vsp/vad_test1/2.vsp
index e44406d..8ec1cea 100644
--- a/binsrc/tests/suite/vad_test/vsp/vad_test1/2.vsp
+++ b/binsrc/tests/suite/vad_test/vsp/vad_test1/2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: 2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: 2.vsp,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test/vsp/vad_test1/test.sql b/binsrc/tests/suite/vad_test/vsp/vad_test1/test.sql
index 4646846..53dd0b7 100644
--- a/binsrc/tests/suite/vad_test/vsp/vad_test1/test.sql
+++ b/binsrc/tests/suite/vad_test/vsp/vad_test1/test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: test.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test/vsp/vad_test2/1.vsp b/binsrc/tests/suite/vad_test/vsp/vad_test2/1.vsp
index 747e935..1f0a5ed 100644
--- a/binsrc/tests/suite/vad_test/vsp/vad_test2/1.vsp
+++ b/binsrc/tests/suite/vad_test/vsp/vad_test2/1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: 1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: 1.vsp,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test/vsp/vad_test2/2.vsp b/binsrc/tests/suite/vad_test/vsp/vad_test2/2.vsp
index e44406d..8ec1cea 100644
--- a/binsrc/tests/suite/vad_test/vsp/vad_test2/2.vsp
+++ b/binsrc/tests/suite/vad_test/vsp/vad_test2/2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: 2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: 2.vsp,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test/vsp/vad_test2/test.sql b/binsrc/tests/suite/vad_test/vsp/vad_test2/test.sql
index 7ab6593..9cba51b 100644
--- a/binsrc/tests/suite/vad_test/vsp/vad_test2/test.sql
+++ b/binsrc/tests/suite/vad_test/vsp/vad_test2/test.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: test.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: test.sql,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vad_test1.xml b/binsrc/tests/suite/vad_test1.xml
index b241161..dd02165 100644
--- a/binsrc/tests/suite/vad_test1.xml
+++ b/binsrc/tests/suite/vad_test1.xml
@@ -5,7 +5,7 @@
     <name package="test1">
       <prop name="Title" value="Test1 Package"/>
       <prop name="Developer" value="OpenLink Software"/>
-      <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+      <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
       <prop name="Download" value="http://www.openlinksw.com/virtuoso"/>
       <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso"/>
     </name>
diff --git a/binsrc/tests/suite/vad_test2.xml b/binsrc/tests/suite/vad_test2.xml
index ba85f93..74c99a8 100644
--- a/binsrc/tests/suite/vad_test2.xml
+++ b/binsrc/tests/suite/vad_test2.xml
@@ -5,7 +5,7 @@
     <name package="test2">
       <prop name="Title" value="Test2"/>
       <prop name="Developer" value="OpenLink Software"/>
-      <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+      <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
       <prop name="Download" value="http://www.openlinksw.com/virtuoso"/>
       <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso"/>
     </name>
diff --git a/binsrc/tests/suite/vspsoap.vsp b/binsrc/tests/suite/vspsoap.vsp
index 711c51b..4927372 100644
--- a/binsrc/tests/suite/vspsoap.vsp
+++ b/binsrc/tests/suite/vspsoap.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vspsoap.vsp,v 1.2 2006/08/15 19:30:33 source Exp $
+--  $Id: vspsoap.vsp,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/vspsoap_mod.vsp b/binsrc/tests/suite/vspsoap_mod.vsp
index 8407120..116805c 100644
--- a/binsrc/tests/suite/vspsoap_mod.vsp
+++ b/binsrc/tests/suite/vspsoap_mod.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vspsoap_mod.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vspsoap_mod.vsp,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/wsdl_suite.sql b/binsrc/tests/suite/wsdl_suite.sql
index 50c3fc9..0a90c1f 100644
--- a/binsrc/tests/suite/wsdl_suite.sql
+++ b/binsrc/tests/suite/wsdl_suite.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wsdl_suite.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: wsdl_suite.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xmlsql.sql b/binsrc/tests/suite/xmlsql.sql
index 90531cc..3570144 100644
--- a/binsrc/tests/suite/xmlsql.sql
+++ b/binsrc/tests/suite/xmlsql.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xmlsql.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: xmlsql.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xmlsql_vad.sql b/binsrc/tests/suite/xmlsql_vad.sql
index 2933624..11ad34a 100644
--- a/binsrc/tests/suite/xmlsql_vad.sql
+++ b/binsrc/tests/suite/xmlsql_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xmlsql_vad.sql,v 1.1 2007/03/22 13:08:32 source Exp $
+--  $Id: xmlsql_vad.sql,v 1.1.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xmlsupp.sql b/binsrc/tests/suite/xmlsupp.sql
index 50d17da..8f4111c 100644
--- a/binsrc/tests/suite/xmlsupp.sql
+++ b/binsrc/tests/suite/xmlsupp.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xmlsupp.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: xmlsupp.sql,v 1.2.2.1 2012/03/08 12:55:09 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/attr_entity.xml b/binsrc/tests/suite/xsl_samples/attr_entity.xml
index cb5e323..c1f6ecc 100644
--- a/binsrc/tests/suite/xsl_samples/attr_entity.xml
+++ b/binsrc/tests/suite/xsl_samples/attr_entity.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/attr_entity.xsl b/binsrc/tests/suite/xsl_samples/attr_entity.xsl
index cd8d50c..ecbed24 100644
--- a/binsrc/tests/suite/xsl_samples/attr_entity.xsl
+++ b/binsrc/tests/suite/xsl_samples/attr_entity.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: attr_entity.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: attr_entity.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/auction1.xml b/binsrc/tests/suite/xsl_samples/auction1.xml
index e29f40e..6e5d4ac 100644
--- a/binsrc/tests/suite/xsl_samples/auction1.xml
+++ b/binsrc/tests/suite/xsl_samples/auction1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/auction2.xml b/binsrc/tests/suite/xsl_samples/auction2.xml
index f7b0a82..ea615ea 100644
--- a/binsrc/tests/suite/xsl_samples/auction2.xml
+++ b/binsrc/tests/suite/xsl_samples/auction2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/auction3.xml b/binsrc/tests/suite/xsl_samples/auction3.xml
index 8783a65..eb1fc63 100644
--- a/binsrc/tests/suite/xsl_samples/auction3.xml
+++ b/binsrc/tests/suite/xsl_samples/auction3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/authors.xml b/binsrc/tests/suite/xsl_samples/authors.xml
index fe1aba0..72ce4c8 100644
--- a/binsrc/tests/suite/xsl_samples/authors.xml
+++ b/binsrc/tests/suite/xsl_samples/authors.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/bids-table.xsl b/binsrc/tests/suite/xsl_samples/bids-table.xsl
index 120c845..2d10d91 100644
--- a/binsrc/tests/suite/xsl_samples/bids-table.xsl
+++ b/binsrc/tests/suite/xsl_samples/bids-table.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bids-table.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: bids-table.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/bids-table2.xsl b/binsrc/tests/suite/xsl_samples/bids-table2.xsl
index ff60d7c..4f1589b 100644
--- a/binsrc/tests/suite/xsl_samples/bids-table2.xsl
+++ b/binsrc/tests/suite/xsl_samples/bids-table2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bids-table2.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: bids-table2.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/booksshort.xml b/binsrc/tests/suite/xsl_samples/booksshort.xml
index 2889cf9..708e44c 100644
--- a/binsrc/tests/suite/xsl_samples/booksshort.xml
+++ b/binsrc/tests/suite/xsl_samples/booksshort.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/bug1174.xml b/binsrc/tests/suite/xsl_samples/bug1174.xml
index cbb6e11..3e7fd72 100644
--- a/binsrc/tests/suite/xsl_samples/bug1174.xml
+++ b/binsrc/tests/suite/xsl_samples/bug1174.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/bug1174.xsl b/binsrc/tests/suite/xsl_samples/bug1174.xsl
index dacd5e0..f16c604 100644
--- a/binsrc/tests/suite/xsl_samples/bug1174.xsl
+++ b/binsrc/tests/suite/xsl_samples/bug1174.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bug1174.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: bug1174.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/bug3342.xml b/binsrc/tests/suite/xsl_samples/bug3342.xml
index 9572ef1..bc5872d 100644
--- a/binsrc/tests/suite/xsl_samples/bug3342.xml
+++ b/binsrc/tests/suite/xsl_samples/bug3342.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/bug3342.xsl b/binsrc/tests/suite/xsl_samples/bug3342.xsl
index 30f5751..bee997d 100644
--- a/binsrc/tests/suite/xsl_samples/bug3342.xsl
+++ b/binsrc/tests/suite/xsl_samples/bug3342.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -  
- -  $Id: bug3342.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: bug3342.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/convert.xsl b/binsrc/tests/suite/xsl_samples/convert.xsl
index b78380b..1ee20d4 100644
--- a/binsrc/tests/suite/xsl_samples/convert.xsl
+++ b/binsrc/tests/suite/xsl_samples/convert.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: convert.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: convert.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/defaultss.xsl b/binsrc/tests/suite/xsl_samples/defaultss.xsl
index ba084b2..224bc49 100644
--- a/binsrc/tests/suite/xsl_samples/defaultss.xsl
+++ b/binsrc/tests/suite/xsl_samples/defaultss.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: defaultss.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: defaultss.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/empty_comment.xml b/binsrc/tests/suite/xsl_samples/empty_comment.xml
index 07424b7..84bcf62 100644
--- a/binsrc/tests/suite/xsl_samples/empty_comment.xml
+++ b/binsrc/tests/suite/xsl_samples/empty_comment.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/empty_comment.xsl b/binsrc/tests/suite/xsl_samples/empty_comment.xsl
index ffc2d39..868d59b 100644
--- a/binsrc/tests/suite/xsl_samples/empty_comment.xsl
+++ b/binsrc/tests/suite/xsl_samples/empty_comment.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: empty_comment.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: empty_comment.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/externalScript.xml b/binsrc/tests/suite/xsl_samples/externalScript.xml
index 96e68e2..bfe0060 100644
--- a/binsrc/tests/suite/xsl_samples/externalScript.xml
+++ b/binsrc/tests/suite/xsl_samples/externalScript.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/family.xml b/binsrc/tests/suite/xsl_samples/family.xml
index 030400b..433b27d 100644
--- a/binsrc/tests/suite/xsl_samples/family.xml
+++ b/binsrc/tests/suite/xsl_samples/family.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/family.xsl b/binsrc/tests/suite/xsl_samples/family.xsl
index 79c9c91..bc1a215 100644
--- a/binsrc/tests/suite/xsl_samples/family.xsl
+++ b/binsrc/tests/suite/xsl_samples/family.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: family.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: family.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/grocery-list.xml b/binsrc/tests/suite/xsl_samples/grocery-list.xml
index 10e2976..57aba86 100644
--- a/binsrc/tests/suite/xsl_samples/grocery-list.xml
+++ b/binsrc/tests/suite/xsl_samples/grocery-list.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/grocery-list.xsl b/binsrc/tests/suite/xsl_samples/grocery-list.xsl
index f5a6976..3ada801 100644
--- a/binsrc/tests/suite/xsl_samples/grocery-list.xsl
+++ b/binsrc/tests/suite/xsl_samples/grocery-list.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: grocery-list.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: grocery-list.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/grocery-list2.xml b/binsrc/tests/suite/xsl_samples/grocery-list2.xml
index 230cff5..b25c67d 100644
--- a/binsrc/tests/suite/xsl_samples/grocery-list2.xml
+++ b/binsrc/tests/suite/xsl_samples/grocery-list2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/grocery-list2.xsl b/binsrc/tests/suite/xsl_samples/grocery-list2.xsl
index edce84a..98e0ad0 100644
--- a/binsrc/tests/suite/xsl_samples/grocery-list2.xsl
+++ b/binsrc/tests/suite/xsl_samples/grocery-list2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: grocery-list2.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: grocery-list2.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/hilite-xml.xsl b/binsrc/tests/suite/xsl_samples/hilite-xml.xsl
index 6d9f9f6..4fb4c13 100644
--- a/binsrc/tests/suite/xsl_samples/hilite-xml.xsl
+++ b/binsrc/tests/suite/xsl_samples/hilite-xml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: hilite-xml.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: hilite-xml.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/identityxfm.xsl b/binsrc/tests/suite/xsl_samples/identityxfm.xsl
index a00f695..81971e0 100644
--- a/binsrc/tests/suite/xsl_samples/identityxfm.xsl
+++ b/binsrc/tests/suite/xsl_samples/identityxfm.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: identityxfm.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: identityxfm.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/identityxfm1.xsl b/binsrc/tests/suite/xsl_samples/identityxfm1.xsl
index d924a42..bb7fbba 100644
--- a/binsrc/tests/suite/xsl_samples/identityxfm1.xsl
+++ b/binsrc/tests/suite/xsl_samples/identityxfm1.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: identityxfm1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: identityxfm1.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/investments-to-portfolio.xsl b/binsrc/tests/suite/xsl_samples/investments-to-portfolio.xsl
index 0987131..1bc1557 100644
--- a/binsrc/tests/suite/xsl_samples/investments-to-portfolio.xsl
+++ b/binsrc/tests/suite/xsl_samples/investments-to-portfolio.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: investments-to-portfolio.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: investments-to-portfolio.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/investments.xml b/binsrc/tests/suite/xsl_samples/investments.xml
index 7a7ff0c..de1a017 100644
--- a/binsrc/tests/suite/xsl_samples/investments.xml
+++ b/binsrc/tests/suite/xsl_samples/investments.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/invoice.xml b/binsrc/tests/suite/xsl_samples/invoice.xml
index 378df6f..59cf9ae 100644
--- a/binsrc/tests/suite/xsl_samples/invoice.xml
+++ b/binsrc/tests/suite/xsl_samples/invoice.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/invoice.xsl b/binsrc/tests/suite/xsl_samples/invoice.xsl
index 06f93a0..7357bd3 100644
--- a/binsrc/tests/suite/xsl_samples/invoice.xsl
+++ b/binsrc/tests/suite/xsl_samples/invoice.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: invoice.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: invoice.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/ledger.xml b/binsrc/tests/suite/xsl_samples/ledger.xml
index 41c5717..15c25c3 100644
--- a/binsrc/tests/suite/xsl_samples/ledger.xml
+++ b/binsrc/tests/suite/xsl_samples/ledger.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/ledger.xsl b/binsrc/tests/suite/xsl_samples/ledger.xsl
index c290b81..7e3bc55 100644
--- a/binsrc/tests/suite/xsl_samples/ledger.xsl
+++ b/binsrc/tests/suite/xsl_samples/ledger.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: ledger.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: ledger.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/number_format.xml b/binsrc/tests/suite/xsl_samples/number_format.xml
index 07ee3a4..2d3aa54 100644
--- a/binsrc/tests/suite/xsl_samples/number_format.xml
+++ b/binsrc/tests/suite/xsl_samples/number_format.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/number_format.xsl b/binsrc/tests/suite/xsl_samples/number_format.xsl
index d1af14a..df78400 100644
--- a/binsrc/tests/suite/xsl_samples/number_format.xsl
+++ b/binsrc/tests/suite/xsl_samples/number_format.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: number_format.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: number_format.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/number_format1.xsl b/binsrc/tests/suite/xsl_samples/number_format1.xsl
index 89f63b4..ca717f5 100644
--- a/binsrc/tests/suite/xsl_samples/number_format1.xsl
+++ b/binsrc/tests/suite/xsl_samples/number_format1.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: number_format1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: number_format1.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole.xml b/binsrc/tests/suite/xsl_samples/pole.xml
index 9c52bce..583d20d 100644
--- a/binsrc/tests/suite/xsl_samples/pole.xml
+++ b/binsrc/tests/suite/xsl_samples/pole.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole.xsl b/binsrc/tests/suite/xsl_samples/pole.xsl
index 14eaf4c..e63dd53 100644
--- a/binsrc/tests/suite/xsl_samples/pole.xsl
+++ b/binsrc/tests/suite/xsl_samples/pole.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: pole.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: pole.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole2.xml b/binsrc/tests/suite/xsl_samples/pole2.xml
index 7d9a9d6..2da2cca 100644
--- a/binsrc/tests/suite/xsl_samples/pole2.xml
+++ b/binsrc/tests/suite/xsl_samples/pole2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole2.xsl b/binsrc/tests/suite/xsl_samples/pole2.xsl
index eb75af8..470c1d2 100644
--- a/binsrc/tests/suite/xsl_samples/pole2.xsl
+++ b/binsrc/tests/suite/xsl_samples/pole2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: pole2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: pole2.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole3.xml b/binsrc/tests/suite/xsl_samples/pole3.xml
index d4b3000..af98bfb 100644
--- a/binsrc/tests/suite/xsl_samples/pole3.xml
+++ b/binsrc/tests/suite/xsl_samples/pole3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole3.xsl b/binsrc/tests/suite/xsl_samples/pole3.xsl
index bc0b08d..467b913 100644
--- a/binsrc/tests/suite/xsl_samples/pole3.xsl
+++ b/binsrc/tests/suite/xsl_samples/pole3.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: pole3.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: pole3.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole4.xml b/binsrc/tests/suite/xsl_samples/pole4.xml
index 9a92dc1..a250f09 100644
--- a/binsrc/tests/suite/xsl_samples/pole4.xml
+++ b/binsrc/tests/suite/xsl_samples/pole4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/pole4.xsl b/binsrc/tests/suite/xsl_samples/pole4.xsl
index a9e5507..195a29b 100644
--- a/binsrc/tests/suite/xsl_samples/pole4.xsl
+++ b/binsrc/tests/suite/xsl_samples/pole4.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: pole4.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: pole4.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-attributes.xml b/binsrc/tests/suite/xsl_samples/portfolio-attributes.xml
index 3f27062..1ba6e53 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-attributes.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio-attributes.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-attributes.xsl b/binsrc/tests/suite/xsl_samples/portfolio-attributes.xsl
index 56b0337..c994798 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-attributes.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-attributes.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio-attributes.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-attributes.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-choose.xml b/binsrc/tests/suite/xsl_samples/portfolio-choose.xml
index b0d89af..3548ccc 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-choose.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio-choose.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-choose.xsl b/binsrc/tests/suite/xsl_samples/portfolio-choose.xsl
index dea7396..c7cc9df 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-choose.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-choose.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio-choose.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-choose.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-cp.xsl b/binsrc/tests/suite/xsl_samples/portfolio-cp.xsl
index c5704e0..0991c3f 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-cp.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-cp.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio-cp.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-cp.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-if.xml b/binsrc/tests/suite/xsl_samples/portfolio-if.xml
index 299dc3b..136d51a 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-if.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio-if.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-if.xsl b/binsrc/tests/suite/xsl_samples/portfolio-if.xsl
index dced44d..3d19533 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-if.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-if.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio-if.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-if.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-schema.xml b/binsrc/tests/suite/xsl_samples/portfolio-schema.xml
index 37820bb..db484d1 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-schema.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio-schema.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-sort1.xsl b/binsrc/tests/suite/xsl_samples/portfolio-sort1.xsl
index 952399f..ffa5a9d 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-sort1.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-sort1.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio-sort1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-sort1.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-sort2.xml b/binsrc/tests/suite/xsl_samples/portfolio-sort2.xml
index 6f73d62..56f9508 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-sort2.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio-sort2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-sort2.xsl b/binsrc/tests/suite/xsl_samples/portfolio-sort2.xsl
index dfb6ec1..50fa5f3 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-sort2.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-sort2.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio-sort2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-sort2.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio-to-investments.xsl b/binsrc/tests/suite/xsl_samples/portfolio-to-investments.xsl
index 60a1b24..174d5b4 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio-to-investments.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio-to-investments.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: portfolio-to-investments.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio-to-investments.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio.xml b/binsrc/tests/suite/xsl_samples/portfolio.xml
index a8664a4..1fbc7d0 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio.xsl b/binsrc/tests/suite/xsl_samples/portfolio.xsl
index df48e23..c1653c2 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio2.xml b/binsrc/tests/suite/xsl_samples/portfolio2.xml
index f9a37e0..b6ef57e 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio2.xml
+++ b/binsrc/tests/suite/xsl_samples/portfolio2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/portfolio2.xsl b/binsrc/tests/suite/xsl_samples/portfolio2.xsl
index aa1715b..0b8761b 100644
--- a/binsrc/tests/suite/xsl_samples/portfolio2.xsl
+++ b/binsrc/tests/suite/xsl_samples/portfolio2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: portfolio2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio2.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/price-graph.xsl b/binsrc/tests/suite/xsl_samples/price-graph.xsl
index ea2ea62..6dfa135 100644
--- a/binsrc/tests/suite/xsl_samples/price-graph.xsl
+++ b/binsrc/tests/suite/xsl_samples/price-graph.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: price-graph.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: price-graph.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/product-list.xml b/binsrc/tests/suite/xsl_samples/product-list.xml
index c452ec1..c88f175 100644
--- a/binsrc/tests/suite/xsl_samples/product-list.xml
+++ b/binsrc/tests/suite/xsl_samples/product-list.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/product-list.xsl b/binsrc/tests/suite/xsl_samples/product-list.xsl
index b242c02..755cfc7 100644
--- a/binsrc/tests/suite/xsl_samples/product-list.xsl
+++ b/binsrc/tests/suite/xsl_samples/product-list.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: product-list.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: product-list.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/product-list2.xml b/binsrc/tests/suite/xsl_samples/product-list2.xml
index 41c96cb..2d7302e 100644
--- a/binsrc/tests/suite/xsl_samples/product-list2.xml
+++ b/binsrc/tests/suite/xsl_samples/product-list2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/product-list2.xsl b/binsrc/tests/suite/xsl_samples/product-list2.xsl
index e590bd0..775ce2e 100644
--- a/binsrc/tests/suite/xsl_samples/product-list2.xsl
+++ b/binsrc/tests/suite/xsl_samples/product-list2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: product-list2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: product-list2.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/raw-xml.xsl b/binsrc/tests/suite/xsl_samples/raw-xml.xsl
index 11d1170..7eb4924 100644
--- a/binsrc/tests/suite/xsl_samples/raw-xml.xsl
+++ b/binsrc/tests/suite/xsl_samples/raw-xml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: raw-xml.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: raw-xml.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/rename.xsl b/binsrc/tests/suite/xsl_samples/rename.xsl
index d01c53d..a6285f1 100644
--- a/binsrc/tests/suite/xsl_samples/rename.xsl
+++ b/binsrc/tests/suite/xsl_samples/rename.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: rename.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: rename.xsl,v 1.2.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-bad-pattern.xsl b/binsrc/tests/suite/xsl_samples/review-bad-pattern.xsl
index 42241b3..a8d8a5b 100644
--- a/binsrc/tests/suite/xsl_samples/review-bad-pattern.xsl
+++ b/binsrc/tests/suite/xsl_samples/review-bad-pattern.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: review-bad-pattern.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: review-bad-pattern.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-bad-script.xsl b/binsrc/tests/suite/xsl_samples/review-bad-script.xsl
index ca07226..19eb75c 100644
--- a/binsrc/tests/suite/xsl_samples/review-bad-script.xsl
+++ b/binsrc/tests/suite/xsl_samples/review-bad-script.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: review-bad-script.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: review-bad-script.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-bad.xml b/binsrc/tests/suite/xsl_samples/review-bad.xml
index 750a0b4..835662f 100644
--- a/binsrc/tests/suite/xsl_samples/review-bad.xml
+++ b/binsrc/tests/suite/xsl_samples/review-bad.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-bad.xsl b/binsrc/tests/suite/xsl_samples/review-bad.xsl
index d52b17e..3466571 100644
--- a/binsrc/tests/suite/xsl_samples/review-bad.xsl
+++ b/binsrc/tests/suite/xsl_samples/review-bad.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: review-bad.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: review-bad.xsl,v 1.3.2.1 2012/03/08 12:55:10 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-css.xml b/binsrc/tests/suite/xsl_samples/review-css.xml
index 44f02a4..a8b886d 100644
--- a/binsrc/tests/suite/xsl_samples/review-css.xml
+++ b/binsrc/tests/suite/xsl_samples/review-css.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-embedded-css.xml b/binsrc/tests/suite/xsl_samples/review-embedded-css.xml
index e65375d..e6db6cb 100644
--- a/binsrc/tests/suite/xsl_samples/review-embedded-css.xml
+++ b/binsrc/tests/suite/xsl_samples/review-embedded-css.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review-simple.xsl b/binsrc/tests/suite/xsl_samples/review-simple.xsl
index 954e42b..01ef6b6 100644
--- a/binsrc/tests/suite/xsl_samples/review-simple.xsl
+++ b/binsrc/tests/suite/xsl_samples/review-simple.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: review-simple.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: review-simple.xsl,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review.xml b/binsrc/tests/suite/xsl_samples/review.xml
index 36dc6de..3c47c5a 100644
--- a/binsrc/tests/suite/xsl_samples/review.xml
+++ b/binsrc/tests/suite/xsl_samples/review.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/review.xsl b/binsrc/tests/suite/xsl_samples/review.xsl
index dc7024b..681eccb 100644
--- a/binsrc/tests/suite/xsl_samples/review.xsl
+++ b/binsrc/tests/suite/xsl_samples/review.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: review.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: review.xsl,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/simple.xml b/binsrc/tests/suite/xsl_samples/simple.xml
index 8f6bbfc..509ff99 100644
--- a/binsrc/tests/suite/xsl_samples/simple.xml
+++ b/binsrc/tests/suite/xsl_samples/simple.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/simple.xsl b/binsrc/tests/suite/xsl_samples/simple.xsl
index 0c9c6a1..978226b 100644
--- a/binsrc/tests/suite/xsl_samples/simple.xsl
+++ b/binsrc/tests/suite/xsl_samples/simple.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: simple.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: simple.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/sort-bidder-.xsl b/binsrc/tests/suite/xsl_samples/sort-bidder-.xsl
index 454f7ea..5345052 100644
--- a/binsrc/tests/suite/xsl_samples/sort-bidder-.xsl
+++ b/binsrc/tests/suite/xsl_samples/sort-bidder-.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sort-bidder-.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: sort-bidder-.xsl,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/sort-bidder-price-.xsl b/binsrc/tests/suite/xsl_samples/sort-bidder-price-.xsl
index f00cee9..5cd6b66 100644
--- a/binsrc/tests/suite/xsl_samples/sort-bidder-price-.xsl
+++ b/binsrc/tests/suite/xsl_samples/sort-bidder-price-.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sort-bidder-price-.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sort-bidder-price-.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/sort-bidder-price.xsl b/binsrc/tests/suite/xsl_samples/sort-bidder-price.xsl
index 9e5cc03..11ef577 100644
--- a/binsrc/tests/suite/xsl_samples/sort-bidder-price.xsl
+++ b/binsrc/tests/suite/xsl_samples/sort-bidder-price.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sort-bidder-price.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sort-bidder-price.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/sort-bidder.xsl b/binsrc/tests/suite/xsl_samples/sort-bidder.xsl
index cf14bc2..ddb575f 100644
--- a/binsrc/tests/suite/xsl_samples/sort-bidder.xsl
+++ b/binsrc/tests/suite/xsl_samples/sort-bidder.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sort-bidder.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sort-bidder.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/sort.xsl b/binsrc/tests/suite/xsl_samples/sort.xsl
index 168d4dc..5f8cb0a 100644
--- a/binsrc/tests/suite/xsl_samples/sort.xsl
+++ b/binsrc/tests/suite/xsl_samples/sort.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sort.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sort.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xml b/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xml
index a18261e..cecbcdc 100644
--- a/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xml
+++ b/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xsl b/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xsl
index aa3eb61..ae6c57b 100644
--- a/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xsl
+++ b/binsrc/tests/suite/xsl_samples/stock-sorter-vb.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: stock-sorter-vb.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: stock-sorter-vb.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/stock-sorter.xml b/binsrc/tests/suite/xsl_samples/stock-sorter.xml
index 92aa1f7..7a6e180 100644
--- a/binsrc/tests/suite/xsl_samples/stock-sorter.xml
+++ b/binsrc/tests/suite/xsl_samples/stock-sorter.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/stock-sorter.xsl b/binsrc/tests/suite/xsl_samples/stock-sorter.xsl
index b31c35e..293521a 100644
--- a/binsrc/tests/suite/xsl_samples/stock-sorter.xsl
+++ b/binsrc/tests/suite/xsl_samples/stock-sorter.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: stock-sorter.xsl,v 1.3 2006/08/16 08:31:02 source Exp $
+ -  $Id: stock-sorter.xsl,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/utf8.xml b/binsrc/tests/suite/xsl_samples/utf8.xml
index bd39635..670453e 100644
--- a/binsrc/tests/suite/xsl_samples/utf8.xml
+++ b/binsrc/tests/suite/xsl_samples/utf8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/utf8.xsl b/binsrc/tests/suite/xsl_samples/utf8.xsl
index 9669677..b163823 100644
--- a/binsrc/tests/suite/xsl_samples/utf8.xsl
+++ b/binsrc/tests/suite/xsl_samples/utf8.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0' encoding="windows-1251"?>
 <!--
  -  
- -  $Id: utf8.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: utf8.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/xmlspec-toc.xsl b/binsrc/tests/suite/xsl_samples/xmlspec-toc.xsl
index 26b118b..20c702e 100644
--- a/binsrc/tests/suite/xsl_samples/xmlspec-toc.xsl
+++ b/binsrc/tests/suite/xsl_samples/xmlspec-toc.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xmlspec-toc.xsl,v 1.3 2006/08/16 08:31:03 source Exp $
+ -  $Id: xmlspec-toc.xsl,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/suite/xsl_samples/xsl-toc.xml b/binsrc/tests/suite/xsl_samples/xsl-toc.xml
index 640fc51..968acdc 100644
--- a/binsrc/tests/suite/xsl_samples/xsl-toc.xml
+++ b/binsrc/tests/suite/xsl_samples/xsl-toc.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
 -->
 <?xml version="1.0" encoding="utf-8"?>
 <?xml-stylesheet href="xmlspec-toc.xsl" type="text/xsl"?>
-<!-- $Id: xsl-toc.xml,v 1.1.1.1 2006/04/11 17:56:11 source Exp $ -->
+<!-- $Id: xsl-toc.xml,v 1.1.1.1.2.1 2012/03/08 12:55:11 source Exp $ -->
 <!DOCTYPE spec SYSTEM "xslspec.dtd" [
 <!ENTITY XMLRec "http://www.w3.org/TR/REC-xml">
 <!ENTITY XMLNames "http://www.w3.org/TR/WD-xml-names">
diff --git a/binsrc/tests/suite/xsl_samples/xsl.xml b/binsrc/tests/suite/xsl_samples/xsl.xml
index 9e725d2..b9f1540 100644
--- a/binsrc/tests/suite/xsl_samples/xsl.xml
+++ b/binsrc/tests/suite/xsl_samples/xsl.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -22,7 +22,7 @@
 -->
 <?xml version="1.0" encoding="utf-8"?>
 <?xml-stylesheet href="xmlspec.xsl" type="text/xsl"?>
-<!-- $Id: xsl.xml,v 1.1.1.1 2006/04/11 17:56:11 source Exp $ -->
+<!-- $Id: xsl.xml,v 1.1.1.1.2.1 2012/03/08 12:55:11 source Exp $ -->
 <!DOCTYPE spec SYSTEM "xslspec.dtd" [
 <!ENTITY XMLRec "http://www.w3.org/TR/REC-xml">
 <!ENTITY XMLNames "http://www.w3.org/TR/WD-xml-names">
diff --git a/binsrc/tests/testlock.c b/binsrc/tests/testlock.c
index e3cd253..13f9bbe 100644
--- a/binsrc/tests/testlock.c
+++ b/binsrc/tests/testlock.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: testlock.c,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: testlock.c,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/time.c b/binsrc/tests/time.c
index 06f79a5..7ee5a06 100644
--- a/binsrc/tests/time.c
+++ b/binsrc/tests/time.c
@@ -1,14 +1,14 @@
 /*
  *  time.c
  *
- *  $Id: time.c,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: time.c,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Timing functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/timeacct.h b/binsrc/tests/timeacct.h
index f81ddf7..01c660d 100644
--- a/binsrc/tests/timeacct.h
+++ b/binsrc/tests/timeacct.h
@@ -1,14 +1,14 @@
 /*
  *  timeacct.h
  *
- *  $Id: timeacct.h,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: timeacct.h,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  Timing macros and functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tkset.c b/binsrc/tests/tkset.c
index e4a8a78..e314223 100644
--- a/binsrc/tests/tkset.c
+++ b/binsrc/tests/tkset.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcc.c b/binsrc/tests/tpcc.c
index df701e0..6fc8678 100644
--- a/binsrc/tests/tpcc.c
+++ b/binsrc/tests/tpcc.c
@@ -1,14 +1,14 @@
 /*
  *  tpcc.c
  *
- *  $Id: tpcc.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: tpcc.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  TPC-C Benchmark
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcc.h b/binsrc/tests/tpcc.h
index ce3b2f0..8cad8e2 100644
--- a/binsrc/tests/tpcc.h
+++ b/binsrc/tests/tpcc.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcc.sql b/binsrc/tests/tpcc.sql
index e86be76..50fc746 100644
--- a/binsrc/tests/tpcc.sql
+++ b/binsrc/tests/tpcc.sql
@@ -1,14 +1,14 @@
 --
 --  tpcc.sql
 --
---  $Id: tpcc.sql,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+--  $Id: tpcc.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  TPC-C Benchmark transactions as stored procedures.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpccddk.sql b/binsrc/tests/tpccddk.sql
index 89d26a0..5d67ed4 100644
--- a/binsrc/tests/tpccddk.sql
+++ b/binsrc/tests/tpccddk.sql
@@ -1,14 +1,14 @@
 --
 --  tpccddk.sql
 --
---  $Id: tpccddk.sql,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+--  $Id: tpccddk.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  TPC-C Benchmark
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpccoci.c b/binsrc/tests/tpccoci.c
index e54c77f..3119ef6 100644
--- a/binsrc/tests/tpccoci.c
+++ b/binsrc/tests/tpccoci.c
@@ -1,14 +1,14 @@
 /*
  *  tpcctrx.c
  *
- *  $Id: tpccoci.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: tpccoci.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  TPC-C Transactions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpccodbc.c b/binsrc/tests/tpccodbc.c
index 85e0f65..b1f9b04 100644
--- a/binsrc/tests/tpccodbc.c
+++ b/binsrc/tests/tpccodbc.c
@@ -1,14 +1,14 @@
 /*
  *  tpccodbc.c
  *
- *  $Id: tpccodbc.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: tpccodbc.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  TPC-C Transactions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcctrx.c b/binsrc/tests/tpcctrx.c
index a4a702b..270254a 100644
--- a/binsrc/tests/tpcctrx.c
+++ b/binsrc/tests/tpcctrx.c
@@ -1,14 +1,14 @@
 /*
  *  tpcctrx.c
  *
- *  $Id: tpcctrx.c,v 1.3.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: tpcctrx.c,v 1.3.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  TPC-C Transactions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/Makefile.am b/binsrc/tests/tpcrun/Makefile.am
index e7e6e23..8579f2f 100644
--- a/binsrc/tests/tpcrun/Makefile.am
+++ b/binsrc/tests/tpcrun/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/Makefile.in b/binsrc/tests/tpcrun/Makefile.in
index 2270841..5bdd2a1 100644
--- a/binsrc/tests/tpcrun/Makefile.in
+++ b/binsrc/tests/tpcrun/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/tpcrun/checkdb.sql b/binsrc/tests/tpcrun/checkdb.sql
index 6eeceb0..33a04ef 100644
--- a/binsrc/tests/tpcrun/checkdb.sql
+++ b/binsrc/tests/tpcrun/checkdb.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: checkdb.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: checkdb.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/repl_ck.sql b/binsrc/tests/tpcrun/repl_ck.sql
index ec56d19..ab6a47d 100644
--- a/binsrc/tests/tpcrun/repl_ck.sql
+++ b/binsrc/tests/tpcrun/repl_ck.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: repl_ck.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: repl_ck.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/repl_ck_init.sql b/binsrc/tests/tpcrun/repl_ck_init.sql
index f3d4ff0..7c70344 100644
--- a/binsrc/tests/tpcrun/repl_ck_init.sql
+++ b/binsrc/tests/tpcrun/repl_ck_init.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: repl_ck_init.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: repl_ck_init.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/repl_pub_tpcc.sql b/binsrc/tests/tpcrun/repl_pub_tpcc.sql
index 9032930..f2e3854 100644
--- a/binsrc/tests/tpcrun/repl_pub_tpcc.sql
+++ b/binsrc/tests/tpcrun/repl_pub_tpcc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: repl_pub_tpcc.sql,v 1.2.2.1 2009/11/25 22:12:11 source Exp $
+--  $Id: repl_pub_tpcc.sql,v 1.2.2.2 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/repl_sub_tpcc.sql b/binsrc/tests/tpcrun/repl_sub_tpcc.sql
index 9fc1966..395972c 100644
--- a/binsrc/tests/tpcrun/repl_sub_tpcc.sql
+++ b/binsrc/tests/tpcrun/repl_sub_tpcc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: repl_sub_tpcc.sql,v 1.2.2.1 2009/11/25 22:12:11 source Exp $
+--  $Id: repl_sub_tpcc.sql,v 1.2.2.2 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/test_server.sh b/binsrc/tests/tpcrun/test_server.sh
index 4755a07..4e8bde6 100755
--- a/binsrc/tests/tpcrun/test_server.sh
+++ b/binsrc/tests/tpcrun/test_server.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: test_server.sh,v 1.1.1.1 2006/04/11 17:56:11 source Exp $
+#  $Id: test_server.sh,v 1.1.1.1.2.1 2012/03/08 12:55:11 source Exp $
 #
 #  choose a server to run with
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/tpc_back.sql b/binsrc/tests/tpcrun/tpc_back.sql
index 74400b7..5ad0729 100644
--- a/binsrc/tests/tpcrun/tpc_back.sql
+++ b/binsrc/tests/tpcrun/tpc_back.sql
@@ -1,14 +1,14 @@
 --
 --  tpc_back.sql
 --
---  $Id: tpc_back.sql,v 1.3 2009/02/03 15:47:27 source Exp $
+--  $Id: tpc_back.sql,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
 --
 --  Make an On-Line Backup
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/tpc_cpts.sql b/binsrc/tests/tpcrun/tpc_cpts.sql
index 868dc2f..ec9407f 100644
--- a/binsrc/tests/tpcrun/tpc_cpts.sql
+++ b/binsrc/tests/tpcrun/tpc_cpts.sql
@@ -1,14 +1,14 @@
 --
 --  tcp_cpts.sql
 --
---  $Id: tpc_cpts.sql,v 1.2 2009/02/03 15:47:27 source Exp $
+--  $Id: tpc_cpts.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --
 --  Do regular checkpoints
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpcrun/tpc_run.sh b/binsrc/tests/tpcrun/tpc_run.sh
index d53f2a7..1a444a0 100755
--- a/binsrc/tests/tpcrun/tpc_run.sh
+++ b/binsrc/tests/tpcrun/tpc_run.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
 #
-#  $Id: tpc_run.sh,v 1.3.2.1 2009/04/20 21:14:24 source Exp $
+#  $Id: tpc_run.sh,v 1.3.2.2 2012/03/08 12:55:11 source Exp $
 #
 #  Running the TPC benchmark
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/tpm.sql b/binsrc/tests/tpm.sql
index 539dd8c..d272221 100644
--- a/binsrc/tests/tpm.sql
+++ b/binsrc/tests/tpm.sql
@@ -1,10 +1,10 @@
 --
---  $Id: tpm.sql,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+--  $Id: tpm.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/urlsimu.c b/binsrc/tests/urlsimu.c
index e22517e..da716e3 100644
--- a/binsrc/tests/urlsimu.c
+++ b/binsrc/tests/urlsimu.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: urlsimu.c,v 1.1.1.1.2.1 2009/04/20 21:18:31 source Exp $
+ *  $Id: urlsimu.c,v 1.1.1.1.2.2 2012/03/08 12:55:06 source Exp $
  *
  *  URLSIMU - Url simulator
  *
@@ -10,7 +10,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/virtdriver.c b/binsrc/tests/virtdriver.c
index be25e6e..7db4a39 100644
--- a/binsrc/tests/virtdriver.c
+++ b/binsrc/tests/virtdriver.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/virtdriver.sql b/binsrc/tests/virtdriver.sql
index 15b2862..2cc661e 100644
--- a/binsrc/tests/virtdriver.sql
+++ b/binsrc/tests/virtdriver.sql
@@ -1,10 +1,10 @@
 --
---  $Id: virtdriver.sql,v 1.2.2.1 2009/04/20 21:18:31 source Exp $
+--  $Id: virtdriver.sql,v 1.2.2.2 2012/03/08 12:55:06 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/Makefile.am b/binsrc/tests/wb/Makefile.am
index 9b4aaed..afe6771 100644
--- a/binsrc/tests/wb/Makefile.am
+++ b/binsrc/tests/wb/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/Makefile.in b/binsrc/tests/wb/Makefile.in
index 8f872e9..5e179c5 100644
--- a/binsrc/tests/wb/Makefile.in
+++ b/binsrc/tests/wb/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/20010215.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/20010215.xml
index b7a964e..d1506d5 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/20010215.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/20010215.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/20010608.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/20010608.xml
index a9678fe..d868b35 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/20010608.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/20010608.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/20010608a1.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/20010608a1.xml
index 51d1e2a..8c35b80 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/20010608a1.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/20010608a1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/30010608.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/30010608.xml
index 56c0146..193be7f 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/30010608.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/30010608.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/auction.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/auction.xml
index 61c045b..c3a1eea 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/auction.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/auction.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/bib.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/bib.xml
index b0b2ab9..66da722 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/bib.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/bib.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/bids.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/bids.xml
index 2668125..43f3fe1 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/bids.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/bids.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/book.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/book.xml
index 2292a0d..2609da9 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/book.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/book.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/book1.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/book1.xml
index 2292a0d..2609da9 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/book1.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/book1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/books.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/books.xml
index be09097..1dc399d 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/books.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/books.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/census.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/census.xml
index 79ec099..b079c44 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/census.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/census.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/company.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/company.xml
index 15eb353..2e3f0b2 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/company.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/company.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/items.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/items.xml
index c4e023c..887490a 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/items.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/items.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/news.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/news.xml
index 6376e79..e9986ed 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/news.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/news.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/partlist.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/partlist.xml
index 4367be4..5c17d06 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/partlist.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/partlist.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/prices.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/prices.xml
index c27cf01..8f6e9ed 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/prices.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/prices.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/report1.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/report1.xml
index bf66d94..858f55e 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/report1.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/report1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/reviews.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/reviews.xml
index 3a317c0..ff91c0b 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/reviews.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/reviews.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/sgml_intro.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/sgml_intro.xml
index 2702d59..c5a59a9 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/sgml_intro.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/sgml_intro.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tests/wb/inputs/XqW3cUseCases/users.xml b/binsrc/tests/wb/inputs/XqW3cUseCases/users.xml
index 4f117d4..dd54a2a 100644
--- a/binsrc/tests/wb/inputs/XqW3cUseCases/users.xml
+++ b/binsrc/tests/wb/inputs/XqW3cUseCases/users.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/1x1.html b/binsrc/tutorial/1x1.html
index 99564d0..fe3a1f8 100644
--- a/binsrc/tutorial/1x1.html
+++ b/binsrc/tutorial/1x1.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/Makefile.am b/binsrc/tutorial/Makefile.am
index e0b83af..e8caac5 100644
--- a/binsrc/tutorial/Makefile.am
+++ b/binsrc/tutorial/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -158,6 +158,9 @@ EXTRA_DIST= \
 	wap/wa_b_3/*.vsp \
 	wap/wa_b_3/*.xml \
 	web2/*.xml \
+	webid/*.html \
+	webid/*.php \
+	webid/*.vsp \
 	xmlapps/*.xml \
 	xmlsql/*.css \
 	xmlsql/*.xml \
diff --git a/binsrc/tutorial/Makefile.in b/binsrc/tutorial/Makefile.in
index e110329..b0ceff2 100644
--- a/binsrc/tutorial/Makefile.in
+++ b/binsrc/tutorial/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -163,6 +163,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -211,6 +212,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -262,6 +264,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -308,7 +311,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -460,6 +462,9 @@ EXTRA_DIST = \
 	wap/wa_b_3/*.vsp \
 	wap/wa_b_3/*.xml \
 	web2/*.xml \
+	webid/*.html \
+	webid/*.php \
+	webid/*.vsp \
 	xmlapps/*.xml \
 	xmlsql/*.css \
 	xmlsql/*.xml \
diff --git a/binsrc/tutorial/apps/Makefile.am b/binsrc/tutorial/apps/Makefile.am
index 2afa3e1..69cdfc1 100644
--- a/binsrc/tutorial/apps/Makefile.am
+++ b/binsrc/tutorial/apps/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/Makefile.in b/binsrc/tutorial/apps/Makefile.in
index 20558e4..9bb5fe9 100644
--- a/binsrc/tutorial/apps/Makefile.in
+++ b/binsrc/tutorial/apps/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tutorial/apps/blog/blog.sql b/binsrc/tutorial/apps/blog/blog.sql
index 74ff7f9..f7bc2d6 100644
--- a/binsrc/tutorial/apps/blog/blog.sql
+++ b/binsrc/tutorial/apps/blog/blog.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: blog.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: blog.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/blog.xml b/binsrc/tutorial/apps/blog/blog.xml
index ebda7b2..6ce9240 100644
--- a/binsrc/tutorial/apps/blog/blog.xml
+++ b/binsrc/tutorial/apps/blog/blog.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/blog_home.vspx b/binsrc/tutorial/apps/blog/blog_home.vspx
index 5dee4a5..15180c1 100644
--- a/binsrc/tutorial/apps/blog/blog_home.vspx
+++ b/binsrc/tutorial/apps/blog/blog_home.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: blog_home.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: blog_home.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/blog_login.vspx b/binsrc/tutorial/apps/blog/blog_login.vspx
index 8dde097..bb4248e 100644
--- a/binsrc/tutorial/apps/blog/blog_login.vspx
+++ b/binsrc/tutorial/apps/blog/blog_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: blog_login.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: blog_login.vspx,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/blog_setup.vspx b/binsrc/tutorial/apps/blog/blog_setup.vspx
index 713eec9..92c4670 100644
--- a/binsrc/tutorial/apps/blog/blog_setup.vspx
+++ b/binsrc/tutorial/apps/blog/blog_setup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: blog_setup.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: blog_setup.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/get_blogs.vspx b/binsrc/tutorial/apps/blog/get_blogs.vspx
index 1ff58aa..305aa67 100644
--- a/binsrc/tutorial/apps/blog/get_blogs.vspx
+++ b/binsrc/tutorial/apps/blog/get_blogs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: get_blogs.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: get_blogs.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/options.xml b/binsrc/tutorial/apps/blog/options.xml
index 903f35b..917a036 100644
--- a/binsrc/tutorial/apps/blog/options.xml
+++ b/binsrc/tutorial/apps/blog/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog/register.vspx b/binsrc/tutorial/apps/blog/register.vspx
index 427af0d..2b99b9c 100644
--- a/binsrc/tutorial/apps/blog/register.vspx
+++ b/binsrc/tutorial/apps/blog/register.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: register.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: register.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/blog.vspx b/binsrc/tutorial/apps/blog_bridge/blog.vspx
index ea2bdd0..7f01391 100644
--- a/binsrc/tutorial/apps/blog_bridge/blog.vspx
+++ b/binsrc/tutorial/apps/blog_bridge/blog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: blog.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: blog.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/blog_bridge.sql b/binsrc/tutorial/apps/blog_bridge/blog_bridge.sql
index d164840..38f9ca3 100644
--- a/binsrc/tutorial/apps/blog_bridge/blog_bridge.sql
+++ b/binsrc/tutorial/apps/blog_bridge/blog_bridge.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: blog_bridge.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: blog_bridge.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/blog_bridge.xml b/binsrc/tutorial/apps/blog_bridge/blog_bridge.xml
index 17c8de8..9a57fc1 100644
--- a/binsrc/tutorial/apps/blog_bridge/blog_bridge.xml
+++ b/binsrc/tutorial/apps/blog_bridge/blog_bridge.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/bridge.vspx b/binsrc/tutorial/apps/blog_bridge/bridge.vspx
index 466cd0c..452f7b4 100644
--- a/binsrc/tutorial/apps/blog_bridge/bridge.vspx
+++ b/binsrc/tutorial/apps/blog_bridge/bridge.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: bridge.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bridge.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/get_blogs.vspx b/binsrc/tutorial/apps/blog_bridge/get_blogs.vspx
index 59adccf..1206b58 100644
--- a/binsrc/tutorial/apps/blog_bridge/get_blogs.vspx
+++ b/binsrc/tutorial/apps/blog_bridge/get_blogs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: get_blogs.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: get_blogs.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/login.vspx b/binsrc/tutorial/apps/blog_bridge/login.vspx
index 517f903..41332ea 100644
--- a/binsrc/tutorial/apps/blog_bridge/login.vspx
+++ b/binsrc/tutorial/apps/blog_bridge/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login.vspx,v 1.3 2006/08/16 00:04:14 source Exp $
+ -  $Id: login.vspx,v 1.3.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/options.xml b/binsrc/tutorial/apps/blog_bridge/options.xml
index a83ecca..93b5319 100644
--- a/binsrc/tutorial/apps/blog_bridge/options.xml
+++ b/binsrc/tutorial/apps/blog_bridge/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_bridge/register.vspx b/binsrc/tutorial/apps/blog_bridge/register.vspx
index 50f3e58..f9d77ff 100644
--- a/binsrc/tutorial/apps/blog_bridge/register.vspx
+++ b/binsrc/tutorial/apps/blog_bridge/register.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: register.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: register.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_query/blog_query.sql b/binsrc/tutorial/apps/blog_query/blog_query.sql
index 8c4bef7..59029a5 100644
--- a/binsrc/tutorial/apps/blog_query/blog_query.sql
+++ b/binsrc/tutorial/apps/blog_query/blog_query.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: blog_query.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: blog_query.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_query/blog_query.xml b/binsrc/tutorial/apps/blog_query/blog_query.xml
index 29384a4..3909528 100644
--- a/binsrc/tutorial/apps/blog_query/blog_query.xml
+++ b/binsrc/tutorial/apps/blog_query/blog_query.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_query/opml.xml b/binsrc/tutorial/apps/blog_query/opml.xml
index eadd713..edf0673 100644
--- a/binsrc/tutorial/apps/blog_query/opml.xml
+++ b/binsrc/tutorial/apps/blog_query/opml.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/blog_query/options.xml b/binsrc/tutorial/apps/blog_query/options.xml
index ab82036..65438c9 100644
--- a/binsrc/tutorial/apps/blog_query/options.xml
+++ b/binsrc/tutorial/apps/blog_query/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/demo.css b/binsrc/tutorial/apps/demo.css
index 3bbab5c..0cd7292 100644
--- a/binsrc/tutorial/apps/demo.css
+++ b/binsrc/tutorial/apps/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/forums/forums.xml b/binsrc/tutorial/apps/forums/forums.xml
index 0a495fc..4acdd0e 100644
--- a/binsrc/tutorial/apps/forums/forums.xml
+++ b/binsrc/tutorial/apps/forums/forums.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/forums/options.xml b/binsrc/tutorial/apps/forums/options.xml
index 580d97f..a427cc5 100644
--- a/binsrc/tutorial/apps/forums/options.xml
+++ b/binsrc/tutorial/apps/forums/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/ibuyspy/ibuyspy.xml b/binsrc/tutorial/apps/ibuyspy/ibuyspy.xml
index bf0ba5a..3730ad0 100644
--- a/binsrc/tutorial/apps/ibuyspy/ibuyspy.xml
+++ b/binsrc/tutorial/apps/ibuyspy/ibuyspy.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/ibuyspy/options.xml b/binsrc/tutorial/apps/ibuyspy/options.xml
index 3f5be09..79a5895 100644
--- a/binsrc/tutorial/apps/ibuyspy/options.xml
+++ b/binsrc/tutorial/apps/ibuyspy/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/index.xml b/binsrc/tutorial/apps/index.xml
index 69d2e06..c3832dc 100644
--- a/binsrc/tutorial/apps/index.xml
+++ b/binsrc/tutorial/apps/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/petshop/options.xml b/binsrc/tutorial/apps/petshop/options.xml
index 3d03ecb..ed137b5 100644
--- a/binsrc/tutorial/apps/petshop/options.xml
+++ b/binsrc/tutorial/apps/petshop/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/petshop/petshop.xml b/binsrc/tutorial/apps/petshop/petshop.xml
index 4360621..af74e47 100644
--- a/binsrc/tutorial/apps/petshop/petshop.xml
+++ b/binsrc/tutorial/apps/petshop/petshop.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/petshop/petshopinit.sql b/binsrc/tutorial/apps/petshop/petshopinit.sql
index 675227f..86c5c49 100644
--- a/binsrc/tutorial/apps/petshop/petshopinit.sql
+++ b/binsrc/tutorial/apps/petshop/petshopinit.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: petshopinit.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: petshopinit.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/rss_feed/blog.vspx b/binsrc/tutorial/apps/rss_feed/blog.vspx
index 9c0d688..71ff7f2 100644
--- a/binsrc/tutorial/apps/rss_feed/blog.vspx
+++ b/binsrc/tutorial/apps/rss_feed/blog.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: blog.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: blog.vspx,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/rss_feed/blogs.sql b/binsrc/tutorial/apps/rss_feed/blogs.sql
index 7ff8cef..a75cbbd 100644
--- a/binsrc/tutorial/apps/rss_feed/blogs.sql
+++ b/binsrc/tutorial/apps/rss_feed/blogs.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: blogs.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: blogs.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/rss_feed/options.xml b/binsrc/tutorial/apps/rss_feed/options.xml
index bd4092f..7ccd823 100644
--- a/binsrc/tutorial/apps/rss_feed/options.xml
+++ b/binsrc/tutorial/apps/rss_feed/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/rss_feed/rss.vsp b/binsrc/tutorial/apps/rss_feed/rss.vsp
index 16bb189..053501c 100644
--- a/binsrc/tutorial/apps/rss_feed/rss.vsp
+++ b/binsrc/tutorial/apps/rss_feed/rss.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: rss.vsp,v 1.4 2006/08/15 19:30:34 source Exp $
+--  $Id: rss.vsp,v 1.4.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/rss_feed/rss2upg.xsl b/binsrc/tutorial/apps/rss_feed/rss2upg.xsl
index 263176e..47f582c 100644
--- a/binsrc/tutorial/apps/rss_feed/rss2upg.xsl
+++ b/binsrc/tutorial/apps/rss_feed/rss2upg.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: rss2upg.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: rss2upg.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/apps/rss_feed/rss_feed.xml b/binsrc/tutorial/apps/rss_feed/rss_feed.xml
index e939722..670a18c 100644
--- a/binsrc/tutorial/apps/rss_feed/rss_feed.xml
+++ b/binsrc/tutorial/apps/rss_feed/rss_feed.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/atom.vsp b/binsrc/tutorial/atom.vsp
index a0f7539..ba0cf50 100644
--- a/binsrc/tutorial/atom.vsp
+++ b/binsrc/tutorial/atom.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: atom.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: atom.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/dev.sql b/binsrc/tutorial/dev.sql
index 57c7b2e..86fe401 100644
--- a/binsrc/tutorial/dev.sql
+++ b/binsrc/tutorial/dev.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dev.sql,v 1.6 2007/05/08 17:41:08 source Exp $
+--  $Id: dev.sql,v 1.6.2.3 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -98,7 +98,7 @@ create procedure TUT_get_xml(in path varchar){
 	
   	if(isnull(xpath_eval('@wwwpath',xp_example)))
   	{
-		 	if (_ex_optxml and lower(xpath_eval('string(/init/@is_vspx)',_ex_optxml)) = 'yes')
+	  if (_ex_optxml is not null and lower(xpath_eval('string(/init/@is_vspx)',_ex_optxml)) = 'yes')
 	       		ex := 'x';
   	  		XMLAddAttribute (xp_example,2,'wwwpath',concat(_ex_fspath ,'/', _ex_id , '.vsp',ex));
   	  	};
@@ -207,6 +207,9 @@ create procedure TUT_generate_files(
 
   foreach (varchar gen_path in paths)do
   {
+    if (gen_path like '%/idp_s_1.vsp')
+      goto _skip;
+    
 	  _file := 'index.vsp';
 	  if (length(gen_path) > 5 and (
 	      subseq(gen_path,length(gen_path) - 4,length(gen_path)) = '.vsp'  or
@@ -260,8 +263,9 @@ create procedure TUT_generate_files(
 	  	http_flush (1);
 	  } else {
 	  	result('Wrote ' || http_root() ||path|| gen_path || _file);
-	  };
-  };
+	  }
+	_skip:;  
+  }
 	if (_outmode = 'web'){
 		http('Finished.\n');
 		http_flush(1);
diff --git a/binsrc/tutorial/dev.vsp b/binsrc/tutorial/dev.vsp
index 5e9419a..f949cef 100644
--- a/binsrc/tutorial/dev.vsp
+++ b/binsrc/tutorial/dev.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dev.vsp,v 1.7 2007/05/08 17:41:08 source Exp $
+--  $Id: dev.vsp,v 1.7.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/example.js b/binsrc/tutorial/example.js
index f3299d4..44c1b28 100644
--- a/binsrc/tutorial/example.js
+++ b/binsrc/tutorial/example.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/guide.vsp b/binsrc/tutorial/guide.vsp
index acdd2d6..d9cef45 100644
--- a/binsrc/tutorial/guide.vsp
+++ b/binsrc/tutorial/guide.vsp
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <?vsp
 --  
---  $Id: guide.vsp,v 1.4.2.1 2010/01/07 16:58:12 source Exp $
+--  $Id: guide.vsp,v 1.4.2.2 2012/03/08 12:55:11 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/Makefile.am b/binsrc/tutorial/hosting/Makefile.am
index 9c1122e..413f875 100644
--- a/binsrc/tutorial/hosting/Makefile.am
+++ b/binsrc/tutorial/hosting/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/Makefile.in b/binsrc/tutorial/hosting/Makefile.in
index fbdc983..8ea1864 100644
--- a/binsrc/tutorial/hosting/Makefile.in
+++ b/binsrc/tutorial/hosting/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tutorial/hosting/demo.css b/binsrc/tutorial/hosting/demo.css
index f14191e..f55c3ac 100644
--- a/binsrc/tutorial/hosting/demo.css
+++ b/binsrc/tutorial/hosting/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/Point.java b/binsrc/tutorial/hosting/ho_s_1/Point.java
index 8f6d005..7dafa06 100644
--- a/binsrc/tutorial/hosting/ho_s_1/Point.java
+++ b/binsrc/tutorial/hosting/ho_s_1/Point.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/ho_s_1.sql b/binsrc/tutorial/hosting/ho_s_1/ho_s_1.sql
index 2621e2d..cfb6e1a 100644
--- a/binsrc/tutorial/hosting/ho_s_1/ho_s_1.sql
+++ b/binsrc/tutorial/hosting/ho_s_1/ho_s_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_1.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/ho_s_1.xml b/binsrc/tutorial/hosting/ho_s_1/ho_s_1.xml
index f154dc3..967a43c 100644
--- a/binsrc/tutorial/hosting/ho_s_1/ho_s_1.xml
+++ b/binsrc/tutorial/hosting/ho_s_1/ho_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/my_finances.java b/binsrc/tutorial/hosting/ho_s_1/my_finances.java
index 59abedc..a39527b 100644
--- a/binsrc/tutorial/hosting/ho_s_1/my_finances.java
+++ b/binsrc/tutorial/hosting/ho_s_1/my_finances.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/options.xml b/binsrc/tutorial/hosting/ho_s_1/options.xml
index 67df1ea..e1644bd 100644
--- a/binsrc/tutorial/hosting/ho_s_1/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/vsp1.vsp b/binsrc/tutorial/hosting/ho_s_1/vsp1.vsp
index bd7d874..648c120 100644
--- a/binsrc/tutorial/hosting/ho_s_1/vsp1.vsp
+++ b/binsrc/tutorial/hosting/ho_s_1/vsp1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp1.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/vsp2.vsp b/binsrc/tutorial/hosting/ho_s_1/vsp2.vsp
index 77f9537..f073f0b 100644
--- a/binsrc/tutorial/hosting/ho_s_1/vsp2.vsp
+++ b/binsrc/tutorial/hosting/ho_s_1/vsp2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp2.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/vsp3.vsp b/binsrc/tutorial/hosting/ho_s_1/vsp3.vsp
index c8380dd..2dbfd9c 100644
--- a/binsrc/tutorial/hosting/ho_s_1/vsp3.vsp
+++ b/binsrc/tutorial/hosting/ho_s_1/vsp3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp3.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_1/vsp4.vsp b/binsrc/tutorial/hosting/ho_s_1/vsp4.vsp
index 1266855..d679bf8 100644
--- a/binsrc/tutorial/hosting/ho_s_1/vsp4.vsp
+++ b/binsrc/tutorial/hosting/ho_s_1/vsp4.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp4.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp4.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_10/Point_ho_s_10.cs b/binsrc/tutorial/hosting/ho_s_10/Point_ho_s_10.cs
index 300874d..e5ecdf8 100644
--- a/binsrc/tutorial/hosting/ho_s_10/Point_ho_s_10.cs
+++ b/binsrc/tutorial/hosting/ho_s_10/Point_ho_s_10.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_10/ho_s_10.sql b/binsrc/tutorial/hosting/ho_s_10/ho_s_10.sql
index 5077023..796bcab 100644
--- a/binsrc/tutorial/hosting/ho_s_10/ho_s_10.sql
+++ b/binsrc/tutorial/hosting/ho_s_10/ho_s_10.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_10.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_10.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_10/ho_s_10.xml b/binsrc/tutorial/hosting/ho_s_10/ho_s_10.xml
index 27b9883..2e8138d 100644
--- a/binsrc/tutorial/hosting/ho_s_10/ho_s_10.xml
+++ b/binsrc/tutorial/hosting/ho_s_10/ho_s_10.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_10/options.xml b/binsrc/tutorial/hosting/ho_s_10/options.xml
index 1dba60f..18ae178 100644
--- a/binsrc/tutorial/hosting/ho_s_10/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_10/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_10/vsp1.vsp b/binsrc/tutorial/hosting/ho_s_10/vsp1.vsp
index 8e97567..8689951 100644
--- a/binsrc/tutorial/hosting/ho_s_10/vsp1.vsp
+++ b/binsrc/tutorial/hosting/ho_s_10/vsp1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp1.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/ho_s_11.sql b/binsrc/tutorial/hosting/ho_s_11/ho_s_11.sql
index 3196440..c7c576b 100644
--- a/binsrc/tutorial/hosting/ho_s_11/ho_s_11.sql
+++ b/binsrc/tutorial/hosting/ho_s_11/ho_s_11.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_11.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_11.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/ho_s_11.xml b/binsrc/tutorial/hosting/ho_s_11/ho_s_11.xml
index e327eed..125b9ca 100644
--- a/binsrc/tutorial/hosting/ho_s_11/ho_s_11.xml
+++ b/binsrc/tutorial/hosting/ho_s_11/ho_s_11.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/options.xml b/binsrc/tutorial/hosting/ho_s_11/options.xml
index 86827c0..fe5bb2c 100644
--- a/binsrc/tutorial/hosting/ho_s_11/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_11/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/restricted.cs b/binsrc/tutorial/hosting/ho_s_11/restricted.cs
index 3350d70..55aa4ad 100644
--- a/binsrc/tutorial/hosting/ho_s_11/restricted.cs
+++ b/binsrc/tutorial/hosting/ho_s_11/restricted.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/restricted.vsp b/binsrc/tutorial/hosting/ho_s_11/restricted.vsp
index 2ec941d..fb37b34 100644
--- a/binsrc/tutorial/hosting/ho_s_11/restricted.vsp
+++ b/binsrc/tutorial/hosting/ho_s_11/restricted.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: restricted.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: restricted.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/unrestricted.cs b/binsrc/tutorial/hosting/ho_s_11/unrestricted.cs
index 1d1b612..ff703f2 100644
--- a/binsrc/tutorial/hosting/ho_s_11/unrestricted.cs
+++ b/binsrc/tutorial/hosting/ho_s_11/unrestricted.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_11/unrestricted.vsp b/binsrc/tutorial/hosting/ho_s_11/unrestricted.vsp
index b6ba935..dd20085 100644
--- a/binsrc/tutorial/hosting/ho_s_11/unrestricted.vsp
+++ b/binsrc/tutorial/hosting/ho_s_11/unrestricted.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: unrestricted.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: unrestricted.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_12/Global.asax.cs b/binsrc/tutorial/hosting/ho_s_12/Global.asax.cs
index e55e191..6486509 100644
--- a/binsrc/tutorial/hosting/ho_s_12/Global.asax.cs
+++ b/binsrc/tutorial/hosting/ho_s_12/Global.asax.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_12/Service1.asmx.cs b/binsrc/tutorial/hosting/ho_s_12/Service1.asmx.cs
index 0006b99..b657804 100644
--- a/binsrc/tutorial/hosting/ho_s_12/Service1.asmx.cs
+++ b/binsrc/tutorial/hosting/ho_s_12/Service1.asmx.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_12/asmx_tutorial.vsp b/binsrc/tutorial/hosting/ho_s_12/asmx_tutorial.vsp
index 6f9b3ee..3f00a73 100644
--- a/binsrc/tutorial/hosting/ho_s_12/asmx_tutorial.vsp
+++ b/binsrc/tutorial/hosting/ho_s_12/asmx_tutorial.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: asmx_tutorial.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: asmx_tutorial.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_12/ho_s_12.sql b/binsrc/tutorial/hosting/ho_s_12/ho_s_12.sql
index ebcdb2a..e3f88aa 100644
--- a/binsrc/tutorial/hosting/ho_s_12/ho_s_12.sql
+++ b/binsrc/tutorial/hosting/ho_s_12/ho_s_12.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_12.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_12.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_12/ho_s_12.xml b/binsrc/tutorial/hosting/ho_s_12/ho_s_12.xml
index 6834aab..78c7664 100644
--- a/binsrc/tutorial/hosting/ho_s_12/ho_s_12.xml
+++ b/binsrc/tutorial/hosting/ho_s_12/ho_s_12.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_12/options.xml b/binsrc/tutorial/hosting/ho_s_12/options.xml
index 8f31e10..32f6493 100644
--- a/binsrc/tutorial/hosting/ho_s_12/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_12/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/Restricted.java b/binsrc/tutorial/hosting/ho_s_13/Restricted.java
index ce22e0b..633393f 100644
--- a/binsrc/tutorial/hosting/ho_s_13/Restricted.java
+++ b/binsrc/tutorial/hosting/ho_s_13/Restricted.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/Unrestricted.java b/binsrc/tutorial/hosting/ho_s_13/Unrestricted.java
index b20d5a2..282c212 100644
--- a/binsrc/tutorial/hosting/ho_s_13/Unrestricted.java
+++ b/binsrc/tutorial/hosting/ho_s_13/Unrestricted.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/ho_s_13.sql b/binsrc/tutorial/hosting/ho_s_13/ho_s_13.sql
index d743c7c..b1eb135 100644
--- a/binsrc/tutorial/hosting/ho_s_13/ho_s_13.sql
+++ b/binsrc/tutorial/hosting/ho_s_13/ho_s_13.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_13.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_13.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/ho_s_13.xml b/binsrc/tutorial/hosting/ho_s_13/ho_s_13.xml
index 91c2c78..b111d71 100644
--- a/binsrc/tutorial/hosting/ho_s_13/ho_s_13.xml
+++ b/binsrc/tutorial/hosting/ho_s_13/ho_s_13.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/options.xml b/binsrc/tutorial/hosting/ho_s_13/options.xml
index 67df1ea..e1644bd 100644
--- a/binsrc/tutorial/hosting/ho_s_13/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_13/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/restricted.vsp b/binsrc/tutorial/hosting/ho_s_13/restricted.vsp
index 0684bb2..fc7fd85 100644
--- a/binsrc/tutorial/hosting/ho_s_13/restricted.vsp
+++ b/binsrc/tutorial/hosting/ho_s_13/restricted.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: restricted.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: restricted.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_13/unrestricted.vsp b/binsrc/tutorial/hosting/ho_s_13/unrestricted.vsp
index 95177a9..0b78620 100644
--- a/binsrc/tutorial/hosting/ho_s_13/unrestricted.vsp
+++ b/binsrc/tutorial/hosting/ho_s_13/unrestricted.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: unrestricted.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: unrestricted.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_14/ho_s_14.cs b/binsrc/tutorial/hosting/ho_s_14/ho_s_14.cs
index bc700df..9b97835 100644
--- a/binsrc/tutorial/hosting/ho_s_14/ho_s_14.cs
+++ b/binsrc/tutorial/hosting/ho_s_14/ho_s_14.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_14/ho_s_14.sql b/binsrc/tutorial/hosting/ho_s_14/ho_s_14.sql
index 51277bd..4259410 100644
--- a/binsrc/tutorial/hosting/ho_s_14/ho_s_14.sql
+++ b/binsrc/tutorial/hosting/ho_s_14/ho_s_14.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_14.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_14.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_14/ho_s_14.xml b/binsrc/tutorial/hosting/ho_s_14/ho_s_14.xml
index afab1a4..8e884cf 100644
--- a/binsrc/tutorial/hosting/ho_s_14/ho_s_14.xml
+++ b/binsrc/tutorial/hosting/ho_s_14/ho_s_14.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_14/options.xml b/binsrc/tutorial/hosting/ho_s_14/options.xml
index c84efda..8853beb 100644
--- a/binsrc/tutorial/hosting/ho_s_14/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_14/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_14/vsp1.vsp b/binsrc/tutorial/hosting/ho_s_14/vsp1.vsp
index 38eab15..ffe0121 100644
--- a/binsrc/tutorial/hosting/ho_s_14/vsp1.vsp
+++ b/binsrc/tutorial/hosting/ho_s_14/vsp1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp1.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/Resource.h b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/Resource.h
index dc52899..30489e0 100644
--- a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/Resource.h
+++ b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/Resource.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.cpp b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.cpp
index bde0937..29028e3 100644
--- a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.cpp
+++ b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.h b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.h
index 1d1b859..06c9763 100644
--- a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.h
+++ b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMObject.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMServer.cpp b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMServer.cpp
index 377bc79..9f4bc35 100644
--- a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMServer.cpp
+++ b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/VirtCOMServer.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.cpp b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.cpp
index 9c8adbb..a115850 100644
--- a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.cpp
+++ b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.h b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.h
index 1ca46b9..d681f6d 100644
--- a/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.h
+++ b/binsrc/tutorial/hosting/ho_s_15/COM/VirtCOMServer/stdafx.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.cpp b/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.cpp
index bde0937..29028e3 100644
--- a/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.cpp
+++ b/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.h b/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.h
index 1d1b859..06c9763 100644
--- a/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.h
+++ b/binsrc/tutorial/hosting/ho_s_15/VirtCOMObject.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/ho_s_15.sql b/binsrc/tutorial/hosting/ho_s_15/ho_s_15.sql
index d26382b..5446f70 100644
--- a/binsrc/tutorial/hosting/ho_s_15/ho_s_15.sql
+++ b/binsrc/tutorial/hosting/ho_s_15/ho_s_15.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_15.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_15.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/ho_s_15.xml b/binsrc/tutorial/hosting/ho_s_15/ho_s_15.xml
index 8deec95..97494fa 100644
--- a/binsrc/tutorial/hosting/ho_s_15/ho_s_15.xml
+++ b/binsrc/tutorial/hosting/ho_s_15/ho_s_15.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/options.xml b/binsrc/tutorial/hosting/ho_s_15/options.xml
index d456df6..190cff7 100644
--- a/binsrc/tutorial/hosting/ho_s_15/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_15/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_15/vsp1.vsp b/binsrc/tutorial/hosting/ho_s_15/vsp1.vsp
index b7c6a21..1449b28 100644
--- a/binsrc/tutorial/hosting/ho_s_15/vsp1.vsp
+++ b/binsrc/tutorial/hosting/ho_s_15/vsp1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp1.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_16/cgitest.rb b/binsrc/tutorial/hosting/ho_s_16/cgitest.rb
index 44b3235..ac83dc8 100644
--- a/binsrc/tutorial/hosting/ho_s_16/cgitest.rb
+++ b/binsrc/tutorial/hosting/ho_s_16/cgitest.rb
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_16/ho_s_16.xml b/binsrc/tutorial/hosting/ho_s_16/ho_s_16.xml
index e2ced03..1732c11 100644
--- a/binsrc/tutorial/hosting/ho_s_16/ho_s_16.xml
+++ b/binsrc/tutorial/hosting/ho_s_16/ho_s_16.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_16/options.xml b/binsrc/tutorial/hosting/ho_s_16/options.xml
index 4e962dc..5530c4c 100644
--- a/binsrc/tutorial/hosting/ho_s_16/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_16/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_17/ho_s_17.xml b/binsrc/tutorial/hosting/ho_s_17/ho_s_17.xml
index e54a357..f2816ff 100644
--- a/binsrc/tutorial/hosting/ho_s_17/ho_s_17.xml
+++ b/binsrc/tutorial/hosting/ho_s_17/ho_s_17.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_17/options.xml b/binsrc/tutorial/hosting/ho_s_17/options.xml
index 67df1ea..e1644bd 100644
--- a/binsrc/tutorial/hosting/ho_s_17/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_17/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/MyFinances.cs b/binsrc/tutorial/hosting/ho_s_2/MyFinances.cs
index 447d78b..9670af0 100644
--- a/binsrc/tutorial/hosting/ho_s_2/MyFinances.cs
+++ b/binsrc/tutorial/hosting/ho_s_2/MyFinances.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/Point.cs b/binsrc/tutorial/hosting/ho_s_2/Point.cs
index 66fd369..af9b7c4 100644
--- a/binsrc/tutorial/hosting/ho_s_2/Point.cs
+++ b/binsrc/tutorial/hosting/ho_s_2/Point.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/ho_s_2.sql b/binsrc/tutorial/hosting/ho_s_2/ho_s_2.sql
index 0c6a4af..accabb7 100644
--- a/binsrc/tutorial/hosting/ho_s_2/ho_s_2.sql
+++ b/binsrc/tutorial/hosting/ho_s_2/ho_s_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_2.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/ho_s_2.xml b/binsrc/tutorial/hosting/ho_s_2/ho_s_2.xml
index 1084470..f93577c 100644
--- a/binsrc/tutorial/hosting/ho_s_2/ho_s_2.xml
+++ b/binsrc/tutorial/hosting/ho_s_2/ho_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/options.xml b/binsrc/tutorial/hosting/ho_s_2/options.xml
index c84efda..8853beb 100644
--- a/binsrc/tutorial/hosting/ho_s_2/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/vsp1.vsp b/binsrc/tutorial/hosting/ho_s_2/vsp1.vsp
index 156c862..08a0c03 100644
--- a/binsrc/tutorial/hosting/ho_s_2/vsp1.vsp
+++ b/binsrc/tutorial/hosting/ho_s_2/vsp1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp1.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/vsp2.vsp b/binsrc/tutorial/hosting/ho_s_2/vsp2.vsp
index 157a541..5fc47eb 100644
--- a/binsrc/tutorial/hosting/ho_s_2/vsp2.vsp
+++ b/binsrc/tutorial/hosting/ho_s_2/vsp2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp2.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/vsp3.vsp b/binsrc/tutorial/hosting/ho_s_2/vsp3.vsp
index ee3c584..5aa139f 100644
--- a/binsrc/tutorial/hosting/ho_s_2/vsp3.vsp
+++ b/binsrc/tutorial/hosting/ho_s_2/vsp3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp3.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_2/vsp4.vsp b/binsrc/tutorial/hosting/ho_s_2/vsp4.vsp
index 5c53a22..0625965 100644
--- a/binsrc/tutorial/hosting/ho_s_2/vsp4.vsp
+++ b/binsrc/tutorial/hosting/ho_s_2/vsp4.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp4.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vsp4.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/handler.vsp b/binsrc/tutorial/hosting/ho_s_3/handler.vsp
index a9b1e5f..9632906 100644
--- a/binsrc/tutorial/hosting/ho_s_3/handler.vsp
+++ b/binsrc/tutorial/hosting/ho_s_3/handler.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: handler.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: handler.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/ho_s_3.sql b/binsrc/tutorial/hosting/ho_s_3/ho_s_3.sql
index fd91172..604a274 100644
--- a/binsrc/tutorial/hosting/ho_s_3/ho_s_3.sql
+++ b/binsrc/tutorial/hosting/ho_s_3/ho_s_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_3.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/ho_s_3.xml b/binsrc/tutorial/hosting/ho_s_3/ho_s_3.xml
index 6229975..bb84474 100644
--- a/binsrc/tutorial/hosting/ho_s_3/ho_s_3.xml
+++ b/binsrc/tutorial/hosting/ho_s_3/ho_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/options.xml b/binsrc/tutorial/hosting/ho_s_3/options.xml
index d456df6..190cff7 100644
--- a/binsrc/tutorial/hosting/ho_s_3/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/redcoalsms.cs b/binsrc/tutorial/hosting/ho_s_3/redcoalsms.cs
index fb56bd5..3d6f7f3 100644
--- a/binsrc/tutorial/hosting/ho_s_3/redcoalsms.cs
+++ b/binsrc/tutorial/hosting/ho_s_3/redcoalsms.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/redcoalsmsref.cs b/binsrc/tutorial/hosting/ho_s_3/redcoalsmsref.cs
index fa51f98..403d0e0 100644
--- a/binsrc/tutorial/hosting/ho_s_3/redcoalsmsref.cs
+++ b/binsrc/tutorial/hosting/ho_s_3/redcoalsmsref.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_3/setup_sms.vsp b/binsrc/tutorial/hosting/ho_s_3/setup_sms.vsp
index 7239811..7f6aabc 100644
--- a/binsrc/tutorial/hosting/ho_s_3/setup_sms.vsp
+++ b/binsrc/tutorial/hosting/ho_s_3/setup_sms.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: setup_sms.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: setup_sms.vsp,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/FAQ.html b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/FAQ.html
index 7df6cb8..ccb7971 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/FAQ.html
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/FAQ.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/INSTALL.html b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/INSTALL.html
index a1c4602..ec8e076 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/INSTALL.html
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/INSTALL.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/README.html b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/README.html
index 81135b9..3919428 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/README.html
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/README.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/UPGRADING.html b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/UPGRADING.html
index 8e01221..89f6e1d 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/UPGRADING.html
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/UPGRADING.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/activity_log.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/activity_log.php
index e1842e0..27bac96 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/activity_log.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/activity_log.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/add_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/add_entry.php
index 8b91e47..b3a8f67 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/add_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/add_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin.php
index 8bb20ec..a47d4fa 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin_handler.php
index 0d898d0..d630432 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/admin_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/approve_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/approve_entry.php
index 66da63e..cc6230d 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/approve_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/approve_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit.php
index a054aa6..a3c2aee 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit_handler.php
index 83c884f..a8a6005 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/assistant_edit_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category.php
index 6b0f9ac..785e86e 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category_handler.php
index 11c90cc..b7d94f8 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/category_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/colors.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/colors.php
index 3c87373..deb5f97 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/colors.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/colors.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/datesel.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/datesel.php
index afd10b1..c0e1198 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/datesel.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/datesel.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/day.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/day.php
index 31e4cb6..92b2283 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/day.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/day.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_entry.php
index 0fb9a3a..0da9448 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_layer.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_layer.php
index b1f4f5f..a44e978 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_layer.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/del_layer.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/docs/php2html.pl b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/docs/php2html.pl
index 4f09992..6f18282 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/docs/php2html.pl
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/docs/php2html.pl
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/drop-tables-odbc.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/drop-tables-odbc.sql
index 693dc7e..1dee38d 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/drop-tables-odbc.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/drop-tables-odbc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: drop-tables-odbc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: drop-tables-odbc.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry.php
index 90fff47..e0bdb21 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry_handler.php
index 6350e83..449eab0 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_entry_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer.php
index 0412857..b87a698 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer_handler.php
index 9c15409..4c45219 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_layer_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user.php
index ee263e5..30bf448 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user_handler.php
index 851d5ea..751cf80 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/edit_user_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export.php
index a5fe899..e3d40ca 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export_handler.php
index aac0d6c..755e2e5 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/export_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit.php
index d8bbac9..0d6ce18 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit_handler.php
index d6089bc..65318fa 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/group_edit_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/groups.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/groups.php
index 73a0f57..1275250 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/groups.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/groups.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_admin.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_admin.php
index 022d7bc..ccd7243 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_admin.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_admin.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_bug.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_bug.php
index 7f7d4e9..96e6595 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_bug.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_bug.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_edit_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_edit_entry.php
index 0c8a241..cdcfb7a 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_edit_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_edit_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_index.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_index.php
index a54ce81..4db3f9f 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_index.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_index.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_layers.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_layers.php
index c1cd0fa..d0db2e9 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_layers.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_layers.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_pref.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_pref.php
index e51311a..7959932 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_pref.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/help_pref.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/config.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/config.php
index 862c86a..2c0370f 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/config.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/config.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/connect.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/connect.php
index 99ff8e9..112c8b5 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/connect.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/connect.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/dbtable.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/dbtable.php
index ffcd2dd..c13dc9d 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/dbtable.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/dbtable.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/functions.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/functions.php
index 1495ca8..a4d21c8 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/functions.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/functions.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/help_trailer.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/help_trailer.php
index 6b73e26..d8bdf6e 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/help_trailer.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/help_trailer.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.html b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.html
index d39874c..c42a44a 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.html
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.php
index e7ecf5a..a4e9f3c 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/index.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/js.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/js.php
index a95bc1d..03853cd 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/js.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/js.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/php-dbi.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/php-dbi.php
index 8a0029c..85db5fe 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/php-dbi.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/php-dbi.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/site_extras.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/site_extras.php
index b31484c..91da199 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/site_extras.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/site_extras.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/styles.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/styles.php
index b1c9e5b..dfbfda3 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/styles.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/styles.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/trailer.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/trailer.php
index baa9c0c..b0334b6 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/trailer.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/trailer.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/translate.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/translate.php
index 17b36f4..b217ff3 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/translate.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/translate.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-ldap.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-ldap.php
index 08657db..797e96d 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-ldap.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-ldap.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-nis.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-nis.php
index 5f13a65..85fe593 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-nis.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user-nis.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user.php
index db52d84..28f90d3 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/user.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/validate.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/validate.php
index 74c4d9b..feea5d7 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/validate.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/includes/validate.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/index.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/index.php
index 13b0a49..c9cabbb 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/index.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/index.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers.php
index bae0678..200e06c 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers_toggle.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers_toggle.php
index b520590..9e2985b 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers_toggle.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/layers_toggle.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/list_unapproved.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/list_unapproved.php
index 30d384d..3cdc6cb 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/list_unapproved.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/list_unapproved.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/login.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/login.php
index 426f5d9..bfa172f 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/login.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/login.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/month.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/month.php
index 3680e85..404137f 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/month.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/month.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref.php
index 681ecf8..46fe923 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref_handler.php
index 0a200a3..8972d37 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/pref_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/purge.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/purge.php
index 81e2f58..ab8b573 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/purge.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/purge.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/reject_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/reject_entry.php
index e0343a9..994f1d0 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/reject_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/reject_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search.php
index 17c72e7..27e614a 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search_handler.php
index 2c76909..0e57796 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/search_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/select_user.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/select_user.php
index 2736bf1..7e47fd5 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/select_user.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/select_user.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/set_entry_cat.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/set_entry_cat.php
index b9f806f..ff1d4e7 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/set_entry_cat.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/set_entry_cat.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-db2.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-db2.sql
index e0964c2..4fd3b49 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-db2.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-db2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables-db2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tables-db2.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-ibase.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-ibase.sql
index 25f60cd..3be7e08 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-ibase.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-ibase.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables-ibase.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tables-ibase.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-mysql.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-mysql.sql
index 76093f0..235e0da 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-mysql.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-mysql.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables-mysql.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tables-mysql.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-odbc.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-odbc.sql
index 464615a..a699a67 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-odbc.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-odbc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables-odbc.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tables-odbc.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-oracle.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-oracle.sql
index fdd3d9e..76ad421 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-oracle.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-oracle.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables-oracle.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tables-oracle.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-postgres.sql b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-postgres.sql
index dcf2b43..5200705 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-postgres.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tables-postgres.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tables-postgres.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: tables-postgres.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/check_translation.pl b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/check_translation.pl
index 7ee3cae..d43484f 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/check_translation.pl
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/check_translation.pl
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/send_reminders.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/send_reminders.php
index d6a5ae9..34076f0 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/send_reminders.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/send_reminders.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/translation_summary.pl b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/translation_summary.pl
index 0be489a..458c848 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/translation_summary.pl
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/translation_summary.pl
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_all.pl b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_all.pl
index eb15a55..1026273 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_all.pl
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_all.pl
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_translation.pl b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_translation.pl
index dd93f89..5e0acf7 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_translation.pl
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/update_translation.pl
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/upgrade_to_0.9.7.pl b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/upgrade_to_0.9.7.pl
index 8f5b53d..0f306b6 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/upgrade_to_0.9.7.pl
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/tools/upgrade_to_0.9.7.pl
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/users.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/users.php
index dcaad97..9ba1d2f 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/users.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/users.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/usersel.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/usersel.php
index 8c34160..dde7e80 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/usersel.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/usersel.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_entry.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_entry.php
index 4cfe2ee..6409f2e 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_entry.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_entry.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_m.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_m.php
index 6087be8..68b5671 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_m.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_m.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_v.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_v.php
index 9e99fe9..8c55e6d 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_v.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_v.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_w.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_w.php
index 3073255..7a6336b 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_w.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/view_w.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views.php
index 1750bfa..d0a1853 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit.php
index 936e6b5..660ccdb 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit_handler.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit_handler.php
index a7147b2..848a56c 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit_handler.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/views_edit_handler.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week.php
index c11bc5d..a23eff3 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_details.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_details.php
index 8a43c8b..14ac3dc 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_details.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_details.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_ssi.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_ssi.php
index 7bd6a75..0427a04 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_ssi.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/week_ssi.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/year.php b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/year.php
index f9445da..b8fd862 100644
--- a/binsrc/tutorial/hosting/ho_s_30/WebCalendar/year.php
+++ b/binsrc/tutorial/hosting/ho_s_30/WebCalendar/year.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/create_local_dsn.sql b/binsrc/tutorial/hosting/ho_s_30/create_local_dsn.sql
index 5725b7b..3bd3028 100644
--- a/binsrc/tutorial/hosting/ho_s_30/create_local_dsn.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/create_local_dsn.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: create_local_dsn.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: create_local_dsn.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/ho_s_30.sql b/binsrc/tutorial/hosting/ho_s_30/ho_s_30.sql
index 8a42a76..92eb8da 100644
--- a/binsrc/tutorial/hosting/ho_s_30/ho_s_30.sql
+++ b/binsrc/tutorial/hosting/ho_s_30/ho_s_30.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ho_s_30.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ho_s_30.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/ho_s_30.xml b/binsrc/tutorial/hosting/ho_s_30/ho_s_30.xml
index 9077056..5fa51c1 100644
--- a/binsrc/tutorial/hosting/ho_s_30/ho_s_30.xml
+++ b/binsrc/tutorial/hosting/ho_s_30/ho_s_30.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/odbc-sample.php b/binsrc/tutorial/hosting/ho_s_30/odbc-sample.php
index 11b27ae..0fb37c1 100644
--- a/binsrc/tutorial/hosting/ho_s_30/odbc-sample.php
+++ b/binsrc/tutorial/hosting/ho_s_30/odbc-sample.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/options.xml b/binsrc/tutorial/hosting/ho_s_30/options.xml
index 111919d..f2efd0e 100644
--- a/binsrc/tutorial/hosting/ho_s_30/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_30/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_30/webcalendar.php b/binsrc/tutorial/hosting/ho_s_30/webcalendar.php
index cbccd80..bbde43c 100644
--- a/binsrc/tutorial/hosting/ho_s_30/webcalendar.php
+++ b/binsrc/tutorial/hosting/ho_s_30/webcalendar.php
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/handler.vspx b/binsrc/tutorial/hosting/ho_s_4/handler.vspx
index 06fd0ed..d1faa25 100644
--- a/binsrc/tutorial/hosting/ho_s_4/handler.vspx
+++ b/binsrc/tutorial/hosting/ho_s_4/handler.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: handler.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: handler.vspx,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/ho_s_4.xml b/binsrc/tutorial/hosting/ho_s_4/ho_s_4.xml
index 92eaf1a..d53f1e9 100644
--- a/binsrc/tutorial/hosting/ho_s_4/ho_s_4.xml
+++ b/binsrc/tutorial/hosting/ho_s_4/ho_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/options.xml b/binsrc/tutorial/hosting/ho_s_4/options.xml
index 8443e83..39a9569 100644
--- a/binsrc/tutorial/hosting/ho_s_4/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/redcoalsms.cs b/binsrc/tutorial/hosting/ho_s_4/redcoalsms.cs
index fb56bd5..3d6f7f3 100644
--- a/binsrc/tutorial/hosting/ho_s_4/redcoalsms.cs
+++ b/binsrc/tutorial/hosting/ho_s_4/redcoalsms.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/redcoalsms.sql b/binsrc/tutorial/hosting/ho_s_4/redcoalsms.sql
index cadbcbe..048d621 100644
--- a/binsrc/tutorial/hosting/ho_s_4/redcoalsms.sql
+++ b/binsrc/tutorial/hosting/ho_s_4/redcoalsms.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: redcoalsms.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: redcoalsms.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/redcoalsmsref.cs b/binsrc/tutorial/hosting/ho_s_4/redcoalsmsref.cs
index fa51f98..403d0e0 100644
--- a/binsrc/tutorial/hosting/ho_s_4/redcoalsmsref.cs
+++ b/binsrc/tutorial/hosting/ho_s_4/redcoalsmsref.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_4/setup_sms.vspx b/binsrc/tutorial/hosting/ho_s_4/setup_sms.vspx
index b02f867..7b4350a 100644
--- a/binsrc/tutorial/hosting/ho_s_4/setup_sms.vspx
+++ b/binsrc/tutorial/hosting/ho_s_4/setup_sms.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: setup_sms.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: setup_sms.vspx,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_5/handler.vspx b/binsrc/tutorial/hosting/ho_s_5/handler.vspx
index c3e4909..7befe47 100644
--- a/binsrc/tutorial/hosting/ho_s_5/handler.vspx
+++ b/binsrc/tutorial/hosting/ho_s_5/handler.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: handler.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: handler.vspx,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_5/ho_s_5.xml b/binsrc/tutorial/hosting/ho_s_5/ho_s_5.xml
index 85d2ae2..f6f91dc 100644
--- a/binsrc/tutorial/hosting/ho_s_5/ho_s_5.xml
+++ b/binsrc/tutorial/hosting/ho_s_5/ho_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_5/options.xml b/binsrc/tutorial/hosting/ho_s_5/options.xml
index 555b1c2..13c20b7 100644
--- a/binsrc/tutorial/hosting/ho_s_5/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.cs b/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.cs
index 5de9aea..1cd9509 100644
--- a/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.cs
+++ b/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.sql b/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.sql
index 5efa9a9..ec03ba0 100644
--- a/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.sql
+++ b/binsrc/tutorial/hosting/ho_s_5/redcoalsms_dom.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: redcoalsms_dom.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: redcoalsms_dom.sql,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_5/setup_sms.vspx b/binsrc/tutorial/hosting/ho_s_5/setup_sms.vspx
index 7cf1629..14e876f 100644
--- a/binsrc/tutorial/hosting/ho_s_5/setup_sms.vspx
+++ b/binsrc/tutorial/hosting/ho_s_5/setup_sms.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: setup_sms.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: setup_sms.vspx,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/admin_style.css b/binsrc/tutorial/hosting/ho_s_6/admin_style.css
index c91cdf1..d556af1 100644
--- a/binsrc/tutorial/hosting/ho_s_6/admin_style.css
+++ b/binsrc/tutorial/hosting/ho_s_6/admin_style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: admin_style.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: admin_style.css,v 1.2.2.1 2012/03/08 12:55:12 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/button.aspx b/binsrc/tutorial/hosting/ho_s_6/button.aspx
index 99cb6f8..813d8c0 100644
--- a/binsrc/tutorial/hosting/ho_s_6/button.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/button.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/calendar.aspx b/binsrc/tutorial/hosting/ho_s_6/calendar.aspx
index d376aee..939e4a4 100644
--- a/binsrc/tutorial/hosting/ho_s_6/calendar.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/calendar.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/code-render.aspx b/binsrc/tutorial/hosting/ho_s_6/code-render.aspx
index dcaee91..f3002e1 100644
--- a/binsrc/tutorial/hosting/ho_s_6/code-render.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/code-render.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/databind-arraylist.aspx b/binsrc/tutorial/hosting/ho_s_6/databind-arraylist.aspx
index 9e251ec..f495e60 100644
--- a/binsrc/tutorial/hosting/ho_s_6/databind-arraylist.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/databind-arraylist.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/databind-attribute.aspx b/binsrc/tutorial/hosting/ho_s_6/databind-attribute.aspx
index 1c99fd5..09fc59f 100644
--- a/binsrc/tutorial/hosting/ho_s_6/databind-attribute.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/databind-attribute.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/databind-class.aspx b/binsrc/tutorial/hosting/ho_s_6/databind-class.aspx
index 35ffe27..25d5a1a 100644
--- a/binsrc/tutorial/hosting/ho_s_6/databind-class.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/databind-class.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/databind-template.aspx b/binsrc/tutorial/hosting/ho_s_6/databind-template.aspx
index 5227f33..f3a8aec 100644
--- a/binsrc/tutorial/hosting/ho_s_6/databind-template.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/databind-template.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/ho_s_6.xml b/binsrc/tutorial/hosting/ho_s_6/ho_s_6.xml
index 14e073a..ed7d2be 100644
--- a/binsrc/tutorial/hosting/ho_s_6/ho_s_6.xml
+++ b/binsrc/tutorial/hosting/ho_s_6/ho_s_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlanchor.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlanchor.aspx
index f836c35..b5caedc 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlanchor.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlanchor.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlbutton.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlbutton.aspx
index 649c1af..33488bb 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlbutton.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlbutton.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlgeneric.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlgeneric.aspx
index 11961a1..33e5c8b 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlgeneric.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlgeneric.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlimage.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlimage.aspx
index 4cf24a0..f866efe 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlimage.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlimage.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputbutton.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputbutton.aspx
index d424a9a..7286ccf 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputbutton.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputbutton.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputcheckbox.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputcheckbox.aspx
index de84df5..d21a272 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputcheckbox.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputcheckbox.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputfile.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputfile.aspx
index e650764..7ac3c97 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputfile.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputfile.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputhidden.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputhidden.aspx
index 599c2f0..3c6c9c3 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputhidden.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputhidden.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputimage.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputimage.aspx
index 12f1ef9..82b12c0 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputimage.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputimage.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputradiobutton.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputradiobutton.aspx
index 54f941c..e70d912 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputradiobutton.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputradiobutton.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlinputtext.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlinputtext.aspx
index 07a9c86..31a1cd8 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlinputtext.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlinputtext.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmlselect.aspx b/binsrc/tutorial/hosting/ho_s_6/htmlselect.aspx
index 9caf958..fb9aa5b 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmlselect.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmlselect.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmltable.aspx b/binsrc/tutorial/hosting/ho_s_6/htmltable.aspx
index 5743f9d..1282341 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmltable.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmltable.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/htmltextarea.aspx b/binsrc/tutorial/hosting/ho_s_6/htmltextarea.aspx
index e9109d1..3ed5f3c 100644
--- a/binsrc/tutorial/hosting/ho_s_6/htmltextarea.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/htmltextarea.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/listitem.aspx b/binsrc/tutorial/hosting/ho_s_6/listitem.aspx
index c867787..388319a 100644
--- a/binsrc/tutorial/hosting/ho_s_6/listitem.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/listitem.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/options.xml b/binsrc/tutorial/hosting/ho_s_6/options.xml
index cb264f2..e7e0021 100644
--- a/binsrc/tutorial/hosting/ho_s_6/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_6/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/server-side-object.aspx b/binsrc/tutorial/hosting/ho_s_6/server-side-object.aspx
index 5f9d7ed..6f2949e 100644
--- a/binsrc/tutorial/hosting/ho_s_6/server-side-object.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/server-side-object.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/session1.aspx b/binsrc/tutorial/hosting/ho_s_6/session1.aspx
index f74f63d..3106e75 100644
--- a/binsrc/tutorial/hosting/ho_s_6/session1.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/session1.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/tabcontrol.aspx b/binsrc/tutorial/hosting/ho_s_6/tabcontrol.aspx
index 2d489f9..ee39a9c 100644
--- a/binsrc/tutorial/hosting/ho_s_6/tabcontrol.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/tabcontrol.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/tabcontrol.cs b/binsrc/tutorial/hosting/ho_s_6/tabcontrol.cs
index 287d75b..3f86c6b 100644
--- a/binsrc/tutorial/hosting/ho_s_6/tabcontrol.cs
+++ b/binsrc/tutorial/hosting/ho_s_6/tabcontrol.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.aspx b/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.aspx
index 5bb3004..7411405 100644
--- a/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.cs b/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.cs
index b699adb..d402caa 100644
--- a/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.cs
+++ b/binsrc/tutorial/hosting/ho_s_6/tabcontrol2.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/temperature.aspx b/binsrc/tutorial/hosting/ho_s_6/temperature.aspx
index 7daddae..c305415 100644
--- a/binsrc/tutorial/hosting/ho_s_6/temperature.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/temperature.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/validator1.aspx b/binsrc/tutorial/hosting/ho_s_6/validator1.aspx
index 30edd84..addc685 100644
--- a/binsrc/tutorial/hosting/ho_s_6/validator1.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/validator1.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_adrotator.aspx b/binsrc/tutorial/hosting/ho_s_6/web_adrotator.aspx
index 2413c94..5d3326c 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_adrotator.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_adrotator.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_adrotator.xml b/binsrc/tutorial/hosting/ho_s_6/web_adrotator.xml
index e5aecf6..8dab32f 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_adrotator.xml
+++ b/binsrc/tutorial/hosting/ho_s_6/web_adrotator.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_button.aspx b/binsrc/tutorial/hosting/ho_s_6/web_button.aspx
index 963fe33..bc4e12a 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_button.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_button.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_checkbox.aspx b/binsrc/tutorial/hosting/ho_s_6/web_checkbox.aspx
index bbd0919..475b460 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_checkbox.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_checkbox.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_checkboxlist.aspx b/binsrc/tutorial/hosting/ho_s_6/web_checkboxlist.aspx
index 636e962..e86a0b3 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_checkboxlist.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_checkboxlist.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_dropdownlist.aspx b/binsrc/tutorial/hosting/ho_s_6/web_dropdownlist.aspx
index ad85d08..a468a20 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_dropdownlist.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_dropdownlist.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_hyperlink.aspx b/binsrc/tutorial/hosting/ho_s_6/web_hyperlink.aspx
index b74983b..4ed38a7 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_hyperlink.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_hyperlink.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_image.aspx b/binsrc/tutorial/hosting/ho_s_6/web_image.aspx
index 4fd0cd4..8a671b0 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_image.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_image.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_imagebutton.aspx b/binsrc/tutorial/hosting/ho_s_6/web_imagebutton.aspx
index 317d5b3..6336753 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_imagebutton.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_imagebutton.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_label.aspx b/binsrc/tutorial/hosting/ho_s_6/web_label.aspx
index a37bf37..efd81b4 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_label.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_label.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_linkbutton.aspx b/binsrc/tutorial/hosting/ho_s_6/web_linkbutton.aspx
index 33598df..d67f265 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_linkbutton.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_linkbutton.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_listbox.aspx b/binsrc/tutorial/hosting/ho_s_6/web_listbox.aspx
index 899dc58..d1f7c7b 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_listbox.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_listbox.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_literal.aspx b/binsrc/tutorial/hosting/ho_s_6/web_literal.aspx
index 36e8104..229e687 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_literal.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_literal.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_panel.aspx b/binsrc/tutorial/hosting/ho_s_6/web_panel.aspx
index 5a7c3bb..4ca8458 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_panel.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_panel.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_placeholder.aspx b/binsrc/tutorial/hosting/ho_s_6/web_placeholder.aspx
index 549c377..1145c33 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_placeholder.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_placeholder.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_radiobutton.aspx b/binsrc/tutorial/hosting/ho_s_6/web_radiobutton.aspx
index 58033d9..d513d54 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_radiobutton.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_radiobutton.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_radiobuttonlist.aspx b/binsrc/tutorial/hosting/ho_s_6/web_radiobuttonlist.aspx
index bd64312..c128f74 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_radiobuttonlist.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_radiobuttonlist.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_repeater.aspx b/binsrc/tutorial/hosting/ho_s_6/web_repeater.aspx
index b41643c..33758db 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_repeater.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_repeater.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_table.aspx b/binsrc/tutorial/hosting/ho_s_6/web_table.aspx
index 100df60..e912e87 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_table.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_table.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_6/web_textbox.aspx b/binsrc/tutorial/hosting/ho_s_6/web_textbox.aspx
index 813628f..830d7f0 100644
--- a/binsrc/tutorial/hosting/ho_s_6/web_textbox.aspx
+++ b/binsrc/tutorial/hosting/ho_s_6/web_textbox.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_7/VirtSample.aspx b/binsrc/tutorial/hosting/ho_s_7/VirtSample.aspx
index 7cb0961..e5193d1 100644
--- a/binsrc/tutorial/hosting/ho_s_7/VirtSample.aspx
+++ b/binsrc/tutorial/hosting/ho_s_7/VirtSample.aspx
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_7/VirtSample.sql b/binsrc/tutorial/hosting/ho_s_7/VirtSample.sql
index fefc649..b011bf4 100644
--- a/binsrc/tutorial/hosting/ho_s_7/VirtSample.sql
+++ b/binsrc/tutorial/hosting/ho_s_7/VirtSample.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: VirtSample.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: VirtSample.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_7/ho_s_7.xml b/binsrc/tutorial/hosting/ho_s_7/ho_s_7.xml
index e7c7e00..834d829 100644
--- a/binsrc/tutorial/hosting/ho_s_7/ho_s_7.xml
+++ b/binsrc/tutorial/hosting/ho_s_7/ho_s_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_7/options.xml b/binsrc/tutorial/hosting/ho_s_7/options.xml
index 6d6e8d6..bc9443f 100644
--- a/binsrc/tutorial/hosting/ho_s_7/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_7/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_8/cgi.pl b/binsrc/tutorial/hosting/ho_s_8/cgi.pl
index 8d64af0..e97667e 100644
--- a/binsrc/tutorial/hosting/ho_s_8/cgi.pl
+++ b/binsrc/tutorial/hosting/ho_s_8/cgi.pl
@@ -3,7 +3,7 @@ use CGI qw/:standard/;
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_8/cgidb.pl b/binsrc/tutorial/hosting/ho_s_8/cgidb.pl
index c262657..61b28a8 100644
--- a/binsrc/tutorial/hosting/ho_s_8/cgidb.pl
+++ b/binsrc/tutorial/hosting/ho_s_8/cgidb.pl
@@ -3,7 +3,7 @@ use CGI qw/:standard :html3 :all *table/;
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_8/ho_s_8.xml b/binsrc/tutorial/hosting/ho_s_8/ho_s_8.xml
index 8a01f94..4455d70 100644
--- a/binsrc/tutorial/hosting/ho_s_8/ho_s_8.xml
+++ b/binsrc/tutorial/hosting/ho_s_8/ho_s_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_8/options.xml b/binsrc/tutorial/hosting/ho_s_8/options.xml
index acda4fa..cbc0fab 100644
--- a/binsrc/tutorial/hosting/ho_s_8/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_8/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_9/cgitest.py b/binsrc/tutorial/hosting/ho_s_9/cgitest.py
index 7c30c87..9726c99 100644
--- a/binsrc/tutorial/hosting/ho_s_9/cgitest.py
+++ b/binsrc/tutorial/hosting/ho_s_9/cgitest.py
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_9/ho_s_9.xml b/binsrc/tutorial/hosting/ho_s_9/ho_s_9.xml
index 4c8faca..8bf595a 100644
--- a/binsrc/tutorial/hosting/ho_s_9/ho_s_9.xml
+++ b/binsrc/tutorial/hosting/ho_s_9/ho_s_9.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/ho_s_9/options.xml b/binsrc/tutorial/hosting/ho_s_9/options.xml
index 4660a26..3d33c4c 100644
--- a/binsrc/tutorial/hosting/ho_s_9/options.xml
+++ b/binsrc/tutorial/hosting/ho_s_9/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/hosting/index.xml b/binsrc/tutorial/hosting/index.xml
index 2552572..c630713 100644
--- a/binsrc/tutorial/hosting/index.xml
+++ b/binsrc/tutorial/hosting/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/demo.css b/binsrc/tutorial/intprot/demo.css
index fed097d..6425c39 100644
--- a/binsrc/tutorial/intprot/demo.css
+++ b/binsrc/tutorial/intprot/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/index.xml b/binsrc/tutorial/intprot/index.xml
index 7fec117..e518b47 100644
--- a/binsrc/tutorial/intprot/index.xml
+++ b/binsrc/tutorial/intprot/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/nn_s_1/nn_s_1.xml b/binsrc/tutorial/intprot/nn_s_1/nn_s_1.xml
index 2995dbc..3bd6a6a 100644
--- a/binsrc/tutorial/intprot/nn_s_1/nn_s_1.xml
+++ b/binsrc/tutorial/intprot/nn_s_1/nn_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/nn_s_1/nn_s_1_sample_1.vsp b/binsrc/tutorial/intprot/nn_s_1/nn_s_1_sample_1.vsp
index 0b12104..623d268 100644
--- a/binsrc/tutorial/intprot/nn_s_1/nn_s_1_sample_1.vsp
+++ b/binsrc/tutorial/intprot/nn_s_1/nn_s_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: nn_s_1_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: nn_s_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/nn_s_2/nn_s_2.xml b/binsrc/tutorial/intprot/nn_s_2/nn_s_2.xml
index 99e3a36..3391d07 100644
--- a/binsrc/tutorial/intprot/nn_s_2/nn_s_2.xml
+++ b/binsrc/tutorial/intprot/nn_s_2/nn_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/nn_s_2/nn_s_2_sample_1.vsp b/binsrc/tutorial/intprot/nn_s_2/nn_s_2_sample_1.vsp
index 49fa72e..761dcf5 100644
--- a/binsrc/tutorial/intprot/nn_s_2/nn_s_2_sample_1.vsp
+++ b/binsrc/tutorial/intprot/nn_s_2/nn_s_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: nn_s_2_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: nn_s_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_1/sm_s_1.xml b/binsrc/tutorial/intprot/sm_s_1/sm_s_1.xml
index 322924d..1c2b8e4 100644
--- a/binsrc/tutorial/intprot/sm_s_1/sm_s_1.xml
+++ b/binsrc/tutorial/intprot/sm_s_1/sm_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_1/sm_s_1_sample_1.vsp b/binsrc/tutorial/intprot/sm_s_1/sm_s_1_sample_1.vsp
index e71f3e3..09abf5a 100644
--- a/binsrc/tutorial/intprot/sm_s_1/sm_s_1_sample_1.vsp
+++ b/binsrc/tutorial/intprot/sm_s_1/sm_s_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_1_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_2/sm_s_2.xml b/binsrc/tutorial/intprot/sm_s_2/sm_s_2.xml
index 205feba..2da6cd9 100644
--- a/binsrc/tutorial/intprot/sm_s_2/sm_s_2.xml
+++ b/binsrc/tutorial/intprot/sm_s_2/sm_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_3/sm_s_3.sql b/binsrc/tutorial/intprot/sm_s_3/sm_s_3.sql
index d3cb13f..451bb97 100644
--- a/binsrc/tutorial/intprot/sm_s_3/sm_s_3.sql
+++ b/binsrc/tutorial/intprot/sm_s_3/sm_s_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: sm_s_3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: sm_s_3.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_3/sm_s_3.xml b/binsrc/tutorial/intprot/sm_s_3/sm_s_3.xml
index f57d5ae..d49d3a3 100644
--- a/binsrc/tutorial/intprot/sm_s_3/sm_s_3.xml
+++ b/binsrc/tutorial/intprot/sm_s_3/sm_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_4/sm_s_4.sql b/binsrc/tutorial/intprot/sm_s_4/sm_s_4.sql
index bd9ae79..408b468 100644
--- a/binsrc/tutorial/intprot/sm_s_4/sm_s_4.sql
+++ b/binsrc/tutorial/intprot/sm_s_4/sm_s_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: sm_s_4.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: sm_s_4.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_4/sm_s_4.xml b/binsrc/tutorial/intprot/sm_s_4/sm_s_4.xml
index 4639839..e95edbb 100644
--- a/binsrc/tutorial/intprot/sm_s_4/sm_s_4.xml
+++ b/binsrc/tutorial/intprot/sm_s_4/sm_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_4/sm_s_4_sample_1.vsp b/binsrc/tutorial/intprot/sm_s_4/sm_s_4_sample_1.vsp
index 5a4de8a..3407b75 100644
--- a/binsrc/tutorial/intprot/sm_s_4/sm_s_4_sample_1.vsp
+++ b/binsrc/tutorial/intprot/sm_s_4/sm_s_4_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_4_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_4_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_5/options.xml b/binsrc/tutorial/intprot/sm_s_5/options.xml
index ce0933f..a85e679 100644
--- a/binsrc/tutorial/intprot/sm_s_5/options.xml
+++ b/binsrc/tutorial/intprot/sm_s_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_5/sm_s_5.sql b/binsrc/tutorial/intprot/sm_s_5/sm_s_5.sql
index 8df8fb9..168a29d 100644
--- a/binsrc/tutorial/intprot/sm_s_5/sm_s_5.sql
+++ b/binsrc/tutorial/intprot/sm_s_5/sm_s_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: sm_s_5.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: sm_s_5.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_5/sm_s_5.xml b/binsrc/tutorial/intprot/sm_s_5/sm_s_5.xml
index a335451..703c3e6 100644
--- a/binsrc/tutorial/intprot/sm_s_5/sm_s_5.xml
+++ b/binsrc/tutorial/intprot/sm_s_5/sm_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_1.vsp b/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_1.vsp
index 4823fa9..d4cdb29 100644
--- a/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_1.vsp
+++ b/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_5_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_5_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_2.vsp b/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_2.vsp
index 82c6ff1..1486103 100644
--- a/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_2.vsp
+++ b/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_5_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_5_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_3.vsp b/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_3.vsp
index 53e083e..ef6a0bb 100644
--- a/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_3.vsp
+++ b/binsrc/tutorial/intprot/sm_s_5/sm_s_5_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_5_sample_3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_5_sample_3.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_6/sm_s_6.xml b/binsrc/tutorial/intprot/sm_s_6/sm_s_6.xml
index 8f88fa2..fb3c2d8 100644
--- a/binsrc/tutorial/intprot/sm_s_6/sm_s_6.xml
+++ b/binsrc/tutorial/intprot/sm_s_6/sm_s_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_6/sm_s_6_sample_1.vsp b/binsrc/tutorial/intprot/sm_s_6/sm_s_6_sample_1.vsp
index 57b78ca..feb6450 100644
--- a/binsrc/tutorial/intprot/sm_s_6/sm_s_6_sample_1.vsp
+++ b/binsrc/tutorial/intprot/sm_s_6/sm_s_6_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_6_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_6_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_7/sm_s_7.xml b/binsrc/tutorial/intprot/sm_s_7/sm_s_7.xml
index dd015b2..115ec5c 100644
--- a/binsrc/tutorial/intprot/sm_s_7/sm_s_7.xml
+++ b/binsrc/tutorial/intprot/sm_s_7/sm_s_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/intprot/sm_s_7/sm_s_7_sample_1.vsp b/binsrc/tutorial/intprot/sm_s_7/sm_s_7_sample_1.vsp
index d330ac0..6380f62 100644
--- a/binsrc/tutorial/intprot/sm_s_7/sm_s_7_sample_1.vsp
+++ b/binsrc/tutorial/intprot/sm_s_7/sm_s_7_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sm_s_7_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sm_s_7_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/linkeddata/index.xml b/binsrc/tutorial/linkeddata/index.xml
index 38087d3..62dcf9e 100644
--- a/binsrc/tutorial/linkeddata/index.xml
+++ b/binsrc/tutorial/linkeddata/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/linkeddata/sem_s_1/options.xml b/binsrc/tutorial/linkeddata/sem_s_1/options.xml
index 43e2472..bb21991 100755
--- a/binsrc/tutorial/linkeddata/sem_s_1/options.xml
+++ b/binsrc/tutorial/linkeddata/sem_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/linkeddata/sem_s_1/sem_s_1.xml b/binsrc/tutorial/linkeddata/sem_s_1/sem_s_1.xml
index b751be0..62ec04c 100755
--- a/binsrc/tutorial/linkeddata/sem_s_1/sem_s_1.xml
+++ b/binsrc/tutorial/linkeddata/sem_s_1/sem_s_1.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/make_tutorial_dav_vad.xml b/binsrc/tutorial/make_tutorial_dav_vad.xml
index 16b3463..d8fe383 100644
--- a/binsrc/tutorial/make_tutorial_dav_vad.xml
+++ b/binsrc/tutorial/make_tutorial_dav_vad.xml
@@ -5,12 +5,12 @@
   <name package="tutorial">
     <prop name="Title" value="Virtuoso Developer Tutorial"/>
     <prop name="Developer" value="OpenLink Software"/>
-    <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+    <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
     <prop name="Download" value="http://www.openlinksw.com/virtuoso"/>
     <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso"/>
   </name>
-  <version package="1.00.6853">
-    <prop name="Release Date" value="2011-03-29 18:22"/>
+  <version package="1.00.6878">
+    <prop name="Release Date" value="2012-03-13 01:45"/>
     <prop name="Build" value="Release"/>
   </version>
 </caption>
@@ -22,7 +22,7 @@
   </sql>
   <sql purpose="post-install">
     <![CDATA[
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/setup_tutorial.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/setup_tutorial.sql', 1, 'report', 1);
     -- Add a virtual directory -------------------
     DB.DBA.VHOST_REMOVE(lpath=>'/tutorial',del_vsps => 1);
     DB.DBA.VHOST_DEFINE(
@@ -34,13 +34,45 @@
         def_page => 'index.vsp'
     )
     ;
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/setup_search.sql', 1, 'report', 1);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/DET_RDFData.sql', 1, 'report', 1);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/fill_search.sql', 1, 'report', 1);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/sql_rdf.sql', 1, 'report', 1);
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial', del_vsps => 1);
+    DB.DBA.VHOST_DEFINE(
+        lhost    => '*sslini*',
+        vhost    => '*sslini*',
+        lpath    => '/tutorial',
+        ppath    => '/DAV/VAD/tutorial/',
+        is_dav   => 1,
+        vsp_user => 'dba',
+        is_brws  => 1,
+        def_page => 'index.vsp'
+    )
+    ;
+    DB.DBA.VHOST_REMOVE(lpath=>'/tutorial/webid',del_vsps => 1);
+    DB.DBA.VHOST_DEFINE(
+        lpath    => '/tutorial/webid',
+        ppath    => '/vad/vsp/tutorial/webid',
+        is_dav   => 0,
+        vsp_user => 'dba',
+        is_brws  => 1
+    )
+    ;
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial/webid', del_vsps => 1);
+    DB.DBA.VHOST_DEFINE (
+        lhost    => '*sslini*',
+        vhost    => '*sslini*',
+        lpath    => '/tutorial/webid',
+        ppath    => '/vad/vsp/tutorial/webid',
+        is_dav   => 0,
+        vsp_user => 'dba',
+        is_brws  => 1
+    )
+    ;
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/setup_search.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/DET_RDFData.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/fill_search.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/sql_rdf.sql', 1, 'report', 1);
     exec('UPDATE DB.DBA.TUT_SEARCH set TS_PHPATH  = ''/DAV/VAD/tutorial/'' || TS_PATH');
     -- xqdemo -------------------
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/presetup.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/presetup.sql', 1, 'report', 1);
     DB.DBA.VHOST_REMOVE(lpath=>'/xqdemo',del_vsps => 1);
     DB.DBA.VHOST_DEFINE(
         lpath    => '/xqdemo',
@@ -51,14 +83,14 @@
         def_page => 'demo.vsp'
     )
     ;
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/desk.sql', 1, 'report', 1);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/metadata.sql', 1, 'report', 1);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/R-tables.sql', 1, 'report', 1);
-    "DB"."DBA"."DAV_COL_CREATE" ('/DAV/xqdemo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', (SELECT pwd_magic_calc (U_NAME, U_PASSWORD, 1) FROM DB.DBA.SYS_USERS WHERE U_NAME = 'dav'));
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/desk.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/metadata.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/R-tables.sql', 1, 'report', 1);
+    DB.DBA.DAV_COL_CREATE ('/DAV/xqdemo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', (SELECT pwd_magic_calc (U_NAME, U_PASSWORD, 1) FROM DB.DBA.SYS_USERS WHERE U_NAME = 'dav'));
     declare _sql_state,_sql_message varchar;
     exec('drop table XQ.XQ.TEST_FILES',_sql_state,_sql_message);
     exec('drop table XQ.XQ.TEST_CASES',_sql_state,_sql_message);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/postsetup.sql', 1, 'report', 1);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/DAV/VAD/tutorial/xml/xq_s_1/xqdemo/postsetup.sql', 1, 'report', 1);
 
 
     ]]>
@@ -69,7 +101,10 @@
     ]]>
   </sql>
   <sql purpose="post-uninstall">
-    vhost_remove (lpath=>'/tutorial');
+    DB.DBA.VHOST_REMOVE (lpath=>'/tutorial', del_vsps => 1);
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial', del_vsps => 1);
+    DB.DBA.VHOST_REMOVE (lpath=>'/tutorial/webid', del_vsps => 1);
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial/webid', del_vsps => 1);
   </sql>
 </ddls>
 <procedures uninstallation="supported">
@@ -918,8 +953,19 @@
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/ajax_inc/proxy.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/ajax_inc/wsdl2js.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/ajax_inc/wsdl2js_udt.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1.sql" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1_sample.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/dc_s_1/options.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/demo.css" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/ent.dtd" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/idp_s_1/idp_s_1.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/idp_s_1/idp_s_1.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/idp_s_1/options.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/idp_s_1/webid_demo.html" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/idp_s_1/webid_demo.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/idp_s_1/webid_demo.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/index.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/index.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/services/raw.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
@@ -1631,6 +1677,9 @@
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/web2/index.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/web2/index.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/web2/rss.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/webid/webid_demo.html" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/webid/webid_demo.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/webid/webid_demo.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/xbel.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/xml/Makefile" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="dav" source="http" target_uri="tutorial/xml/Makefile.am" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
diff --git a/binsrc/tutorial/make_tutorial_fs_vad.xml b/binsrc/tutorial/make_tutorial_fs_vad.xml
index c9b424c..d77ec0a 100644
--- a/binsrc/tutorial/make_tutorial_fs_vad.xml
+++ b/binsrc/tutorial/make_tutorial_fs_vad.xml
@@ -5,12 +5,12 @@
   <name package="tutorial">
     <prop name="Title" value="Virtuoso Developer Tutorial"/>
     <prop name="Developer" value="OpenLink Software"/>
-    <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+    <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
     <prop name="Download" value="http://www.openlinksw.com/virtuoso"/>
     <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso"/>
   </name>
-  <version package="1.00.6853">
-    <prop name="Release Date" value="2011-03-29 18:21"/>
+  <version package="1.00.6878">
+    <prop name="Release Date" value="2012-03-13 01:45"/>
     <prop name="Build" value="Release"/>
   </version>
 </caption>
@@ -22,7 +22,7 @@
   </sql>
   <sql purpose="post-install">
     <![CDATA[
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/setup_tutorial.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/setup_tutorial.sql', 1, 'report', 0);
     -- Add a virtual directory -------------------
     DB.DBA.VHOST_REMOVE(lpath=>'/tutorial',del_vsps => 1);
     DB.DBA.VHOST_DEFINE(
@@ -34,13 +34,45 @@
         def_page => 'index.vsp'
     )
     ;
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/setup_search.sql', 1, 'report', 0);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/DET_RDFData.sql', 1, 'report', 0);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/fill_search.sql', 1, 'report', 0);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/sql_rdf.sql', 1, 'report', 0);
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial', del_vsps => 1);
+    DB.DBA.VHOST_DEFINE(
+        lhost    => '*sslini*',
+        vhost    => '*sslini*',
+        lpath    => '/tutorial',
+        ppath    => '/vad/vsp/tutorial/',
+        is_dav   => 0,
+        vsp_user => 'dba',
+        is_brws  => 1,
+        def_page => 'index.vsp'
+    )
+    ;
+    DB.DBA.VHOST_REMOVE(lpath=>'/tutorial/webid',del_vsps => 1);
+    DB.DBA.VHOST_DEFINE(
+        lpath    => '/tutorial/webid',
+        ppath    => '/vad/vsp/tutorial/webid',
+        is_dav   => 0,
+        vsp_user => 'dba',
+        is_brws  => 1
+    )
+    ;
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial/webid', del_vsps => 1);
+    DB.DBA.VHOST_DEFINE (
+        lhost    => '*sslini*',
+        vhost    => '*sslini*',
+        lpath    => '/tutorial/webid',
+        ppath    => '/vad/vsp/tutorial/webid',
+        is_dav   => 0,
+        vsp_user => 'dba',
+        is_brws  => 1
+    )
+    ;
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/setup_search.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/DET_RDFData.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/fill_search.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/sql_rdf.sql', 1, 'report', 0);
     exec('UPDATE DB.DBA.TUT_SEARCH set TS_PHPATH  = ''/vad/vsp/tutorial/'' || TS_PATH');
     -- xqdemo -------------------
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/presetup.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/presetup.sql', 1, 'report', 0);
     DB.DBA.VHOST_REMOVE(lpath=>'/xqdemo',del_vsps => 1);
     DB.DBA.VHOST_DEFINE(
         lpath    => '/xqdemo',
@@ -51,14 +83,14 @@
         def_page => 'demo.vsp'
     )
     ;
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/desk.sql', 1, 'report', 0);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/metadata.sql', 1, 'report', 0);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/R-tables.sql', 1, 'report', 0);
-    "DB"."DBA"."DAV_COL_CREATE" ('/DAV/xqdemo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', (SELECT pwd_magic_calc (U_NAME, U_PASSWORD, 1) FROM DB.DBA.SYS_USERS WHERE U_NAME = 'dav'));
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/desk.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/metadata.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/R-tables.sql', 1, 'report', 0);
+    DB.DBA.DAV_COL_CREATE ('/DAV/xqdemo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', (SELECT pwd_magic_calc (U_NAME, U_PASSWORD, 1) FROM DB.DBA.SYS_USERS WHERE U_NAME = 'dav'));
     declare _sql_state,_sql_message varchar;
     exec('drop table XQ.XQ.TEST_FILES',_sql_state,_sql_message);
     exec('drop table XQ.XQ.TEST_CASES',_sql_state,_sql_message);
-    "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/postsetup.sql', 1, 'report', 0);
+    DB.DBA.VAD_LOAD_SQL_FILE ('/vad/vsp/tutorial/xml/xq_s_1/xqdemo/postsetup.sql', 1, 'report', 0);
 
 
     ]]>
@@ -69,7 +101,10 @@
     ]]>
   </sql>
   <sql purpose="post-uninstall">
-    vhost_remove (lpath=>'/tutorial');
+    DB.DBA.VHOST_REMOVE (lpath=>'/tutorial', del_vsps => 1);
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial', del_vsps => 1);
+    DB.DBA.VHOST_REMOVE (lpath=>'/tutorial/webid', del_vsps => 1);
+    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial/webid', del_vsps => 1);
   </sql>
 </ddls>
 <procedures uninstallation="supported">
@@ -918,8 +953,19 @@
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/ajax_inc/proxy.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/ajax_inc/wsdl2js.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/ajax_inc/wsdl2js_udt.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1.sql" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/dc_s_1/dc_s_1_sample.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/dc_s_1/options.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/demo.css" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/ent.dtd" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/idp_s_1/idp_s_1.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/idp_s_1/idp_s_1.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/idp_s_1/options.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/idp_s_1/webid_demo.html" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/idp_s_1/webid_demo.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/idp_s_1/webid_demo.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/index.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/index.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/services/raw.xsl" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
@@ -1631,6 +1677,9 @@
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/web2/index.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/web2/index.xml" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/web2/rss.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/webid/webid_demo.html" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/webid/webid_demo.php" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
+  <file overwrite="yes" type="http" source="http" target_uri="tutorial/webid/webid_demo.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/xbel.vsp" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/xml/Makefile" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
   <file overwrite="yes" type="http" source="http" target_uri="tutorial/xml/Makefile.am" dav_owner="dav" dav_grp="administrators" dav_perm="111101101NN" makepath="yes"/>
diff --git a/binsrc/tutorial/make_vad.sh b/binsrc/tutorial/make_vad.sh
index e542e95..8b9620a 100755
--- a/binsrc/tutorial/make_vad.sh
+++ b/binsrc/tutorial/make_vad.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: make_vad.sh,v 1.20.2.4 2011/02/03 10:39:34 source Exp $
+# $Id: make_vad.sh,v 1.20.2.6 2012/03/05 11:47:07 source Exp $
 
 # ----------------------------------------------------------------------
 #  Fix issues with LOCALE
@@ -315,6 +315,8 @@ virtuoso_shutdown() {
 
 sticker_init() {
   ISDAV=$1
+  BASE_PATH_DAV="/DAV/VAD"
+  BASE_PATH_FS="/vad/vsp"
   if [ "$ISDAV" = "1" ] ; then
     BASE_PATH="/DAV/VAD"
     TYPE="dav"
@@ -334,7 +336,7 @@ sticker_init() {
   echo "  <name package=\"tutorial\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"Virtuoso Developer Tutorial\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
@@ -357,7 +359,7 @@ sticker_init() {
   echo "  </sql>" >> $STICKER
   echo "  <sql purpose=\"post-install\">" >> $STICKER
   echo "    <![CDATA[" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/setup_tutorial.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/setup_tutorial.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "    -- Add a virtual directory -------------------" >> $STICKER
   echo "    DB.DBA.VHOST_REMOVE(lpath=>'/tutorial',del_vsps => 1);" >> $STICKER
   echo "    DB.DBA.VHOST_DEFINE(" >> $STICKER
@@ -369,13 +371,45 @@ sticker_init() {
   echo "        def_page => 'index.vsp'" >> $STICKER
   echo "    )" >> $STICKER
   echo "    ;" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/setup_search.sql', 1, 'report', $ISDAV);" >> $STICKER
-        echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/DET_RDFData.sql', 1, 'report', $ISDAV);" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/fill_search.sql', 1, 'report', $ISDAV);" >> $STICKER
-        echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/sql_rdf.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial', del_vsps => 1);" >> $STICKER
+  echo "    DB.DBA.VHOST_DEFINE(" >> $STICKER
+  echo "        lhost    => '*sslini*'," >> $STICKER
+  echo "        vhost    => '*sslini*'," >> $STICKER
+  echo "        lpath    => '/tutorial'," >> $STICKER
+  echo "        ppath    => '$BASE_PATH/tutorial/'," >> $STICKER
+  echo "        is_dav   => $ISDAV," >> $STICKER
+  echo "        vsp_user => 'dba'," >> $STICKER
+  echo "        is_brws  => 1," >> $STICKER
+  echo "        def_page => 'index.vsp'" >> $STICKER
+  echo "    )" >> $STICKER
+  echo "    ;" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE(lpath=>'/tutorial/webid',del_vsps => 1);" >> $STICKER
+  echo "    DB.DBA.VHOST_DEFINE(" >> $STICKER
+  echo "        lpath    => '/tutorial/webid'," >> $STICKER
+  echo "        ppath    => '$BASE_PATH_FS/tutorial/webid'," >> $STICKER
+  echo "        is_dav   => 0," >> $STICKER
+  echo "        vsp_user => 'dba'," >> $STICKER
+  echo "        is_brws  => 1" >> $STICKER
+  echo "    )" >> $STICKER
+  echo "    ;" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial/webid', del_vsps => 1);" >> $STICKER
+  echo "    DB.DBA.VHOST_DEFINE (" >> $STICKER
+  echo "        lhost    => '*sslini*'," >> $STICKER
+  echo "        vhost    => '*sslini*'," >> $STICKER
+  echo "        lpath    => '/tutorial/webid'," >> $STICKER
+  echo "        ppath    => '$BASE_PATH_FS/tutorial/webid'," >> $STICKER
+  echo "        is_dav   => 0," >> $STICKER
+  echo "        vsp_user => 'dba'," >> $STICKER
+  echo "        is_brws  => 1" >> $STICKER
+  echo "    )" >> $STICKER
+  echo "    ;" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/setup_search.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/DET_RDFData.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/fill_search.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/sql_rdf.sql', 1, 'report', $ISDAV);" >> $STICKER
 	echo "    exec('UPDATE DB.DBA.TUT_SEARCH set TS_PHPATH  = ''$BASE_PATH/tutorial/'' || TS_PATH');" >> $STICKER
   echo "    -- xqdemo -------------------" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/presetup.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/presetup.sql', 1, 'report', $ISDAV);" >> $STICKER
   echo "    DB.DBA.VHOST_REMOVE(lpath=>'/xqdemo',del_vsps => 1);" >> $STICKER
   echo "    DB.DBA.VHOST_DEFINE(" >> $STICKER
   echo "        lpath    => '/xqdemo'," >> $STICKER
@@ -386,19 +420,10 @@ sticker_init() {
   echo "        def_page => 'demo.vsp'" >> $STICKER
   echo "    )" >> $STICKER
   echo "    ;" >> $STICKER
-#  echo "    DB.DBA.VHOST_REMOVE(lpath=>'/PortalCS',del_vsps => 1);" >> $STICKER
-#  echo "    DB.DBA.VHOST_REMOVE(lpath=>'/PortalCSVS',del_vsps => 1);" >> $STICKER
-#  echo "    DB.DBA.VHOST_REMOVE(lpath=>'/StoreCSVS',del_vsps => 1);" >> $STICKER
-#  echo "    DB.DBA.VHOST_DEFINE(" >> $STICKER
-#  echo "        lpath    => '/PortalCS'," >> $STICKER
-#  echo "        ppath    => '$BASE_PATH/PortalCS/'," >> $STICKER
-#  echo "        def_page => 'Default.aspx'" >> $STICKER
-#  echo "    )" >> $STICKER
-#  echo "    ;" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/desk.sql', 1, 'report', $ISDAV);" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/metadata.sql', 1, 'report', $ISDAV);" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/R-tables.sql', 1, 'report', $ISDAV);" >> $STICKER
-  echo "    \"DB\".\"DBA\".\"DAV_COL_CREATE\" ('/DAV/xqdemo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', (SELECT pwd_magic_calc (U_NAME, U_PASSWORD, 1) FROM DB.DBA.SYS_USERS WHERE U_NAME = 'dav'));" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/desk.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/metadata.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/R-tables.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.DAV_COL_CREATE ('/DAV/xqdemo/', '110100100', http_dav_uid(), http_dav_uid() + 1, 'dav', (SELECT pwd_magic_calc (U_NAME, U_PASSWORD, 1) FROM DB.DBA.SYS_USERS WHERE U_NAME = 'dav'));" >> $STICKER
   cd vad_files/vsp/tutorial/xml/xq_s_1/xqdemo/data > /dev/null 2>&1
   for file in `find . -type f -print | LC_ALL=C sort`
   do
@@ -413,7 +438,7 @@ sticker_init() {
   echo "    declare _sql_state,_sql_message varchar;" >> $STICKER
   echo "    exec('drop table XQ.XQ.TEST_FILES',_sql_state,_sql_message);" >> $STICKER
   echo "    exec('drop table XQ.XQ.TEST_CASES',_sql_state,_sql_message);" >> $STICKER
-	echo "    \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/postsetup.sql', 1, 'report', $ISDAV);" >> $STICKER
+  echo "    DB.DBA.VAD_LOAD_SQL_FILE ('$BASE_PATH/tutorial/xml/xq_s_1/xqdemo/postsetup.sql', 1, 'report', $ISDAV);" >> $STICKER
 	echo "" >> $STICKER
 	echo "" >> $STICKER
   echo "    ]]>" >> $STICKER
@@ -424,7 +449,10 @@ sticker_init() {
   echo "    ]]>" >> $STICKER
   echo "  </sql>" >> $STICKER
 	echo "  <sql purpose=\"post-uninstall\">" >> $STICKER
-	echo "    vhost_remove (lpath=>'/tutorial');" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE (lpath=>'/tutorial', del_vsps => 1);" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial', del_vsps => 1);" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE (lpath=>'/tutorial/webid', del_vsps => 1);" >> $STICKER
+  echo "    DB.DBA.VHOST_REMOVE (lhost=>'*sslini*', vhost=>'*sslini*', lpath=>'/tutorial/webid', del_vsps => 1);" >> $STICKER
 	echo "  </sql>" >> $STICKER
   echo "</ddls>" >> $STICKER
 	echo "<procedures uninstallation=\"supported\">" >> $STICKER
@@ -465,7 +493,13 @@ sticker_init() {
   for file in `find vad_files -type f -print | LC_ALL=C sort`
   do
      name=`echo "$file" | cut -b15-`
-     echo "  <file overwrite=\"yes\" type=\"$TYPE\" source=\"http\" target_uri=\"$name\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> $STICKER
+     if echo "$file" | grep -v "/webid/" >/dev/null
+     then
+ 	     TYPE2=$TYPE
+     else
+	     TYPE2="http"
+     fi
+     echo "  <file overwrite=\"yes\" type=\"$TYPE2\" source=\"http\" target_uri=\"$name\" dav_owner=\"dav\" dav_grp=\"administrators\" dav_perm=\"111101101NN\" makepath=\"yes\"/>" >> $STICKER
   done
 
   echo "</resources>" >> $STICKER
@@ -595,10 +629,9 @@ else
 	STOP_SERVER
 	chmod 644 tutorial_filesystem.vad
 	chmod 644 tutorial_dav.vad
-	directory_clean
+#        directory_clean
 fi
 
-
 CHECK_LOG
 RUN egrep  '"\*\*.*FAILED:|\*\*.*ABORTED:"' "$LOGFILE"
 if test $STATUS -eq 0
diff --git a/binsrc/tutorial/page.xsl b/binsrc/tutorial/page.xsl
index e04b076..5fb50ab 100644
--- a/binsrc/tutorial/page.xsl
+++ b/binsrc/tutorial/page.xsl
@@ -9,7 +9,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/page_common.xsl b/binsrc/tutorial/page_common.xsl
index 76e2023..4c4cf53 100644
--- a/binsrc/tutorial/page_common.xsl
+++ b/binsrc/tutorial/page_common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -  
- -  $Id: page_common.xsl,v 1.4 2006/09/25 14:38:41 source Exp $
+ -  $Id: page_common.xsl,v 1.4.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/page_html_common.xsl b/binsrc/tutorial/page_html_common.xsl
index ba0d8c5..90bd7d7 100644
--- a/binsrc/tutorial/page_html_common.xsl
+++ b/binsrc/tutorial/page_html_common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -  
- -  $Id: page_html_common.xsl,v 1.1 2006/10/11 07:52:49 source Exp $
+ -  $Id: page_html_common.xsl,v 1.1.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/page_ocs_output.xsl b/binsrc/tutorial/page_ocs_output.xsl
index 796658e..1cdf87f 100644
--- a/binsrc/tutorial/page_ocs_output.xsl
+++ b/binsrc/tutorial/page_ocs_output.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -  
- -  $Id: page_ocs_output.xsl,v 1.4 2006/09/25 14:38:41 source Exp $
+ -  $Id: page_ocs_output.xsl,v 1.4.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/page_opml_output.xsl b/binsrc/tutorial/page_opml_output.xsl
index 6151b08..8076aca 100644
--- a/binsrc/tutorial/page_opml_output.xsl
+++ b/binsrc/tutorial/page_opml_output.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -  
- -  $Id: page_opml_output.xsl,v 1.4 2006/09/25 14:38:41 source Exp $
+ -  $Id: page_opml_output.xsl,v 1.4.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/page_rss_output.xsl b/binsrc/tutorial/page_rss_output.xsl
index 249b5a7..e53c150 100644
--- a/binsrc/tutorial/page_rss_output.xsl
+++ b/binsrc/tutorial/page_rss_output.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -  
- -  $Id: page_rss_output.xsl,v 1.4 2006/09/25 14:38:41 source Exp $
+ -  $Id: page_rss_output.xsl,v 1.4.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/page_sioc_output.xsl b/binsrc/tutorial/page_sioc_output.xsl
index 9caf2bf..e5ba4de 100644
--- a/binsrc/tutorial/page_sioc_output.xsl
+++ b/binsrc/tutorial/page_sioc_output.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: page_sioc_output.xsl,v 1.6 2007/05/09 10:49:23 source Exp $
+ -  $Id: page_sioc_output.xsl,v 1.6.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf.vsp b/binsrc/tutorial/rdf.vsp
index 6f07211..362b1a8 100644
--- a/binsrc/tutorial/rdf.vsp
+++ b/binsrc/tutorial/rdf.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: rdf.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: rdf.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/fs_s_1/foaf_ssl_client.vsp b/binsrc/tutorial/rdf/fs_s_1/foaf_ssl_client.vsp
index 1299cc5..4743d6e 100644
--- a/binsrc/tutorial/rdf/fs_s_1/foaf_ssl_client.vsp
+++ b/binsrc/tutorial/rdf/fs_s_1/foaf_ssl_client.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: foaf_ssl_client.vsp,v 1.1.4.2 2010/04/26 07:56:09 source Exp $
+--  $Id: foaf_ssl_client.vsp,v 1.1.4.3 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/fs_s_1/fs_s_1.xml b/binsrc/tutorial/rdf/fs_s_1/fs_s_1.xml
index af23946..3c35a41 100644
--- a/binsrc/tutorial/rdf/fs_s_1/fs_s_1.xml
+++ b/binsrc/tutorial/rdf/fs_s_1/fs_s_1.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -
- -  $Id: fs_s_1.xml,v 1.1.4.2 2010/04/26 07:56:09 source Exp $
+ -  $Id: fs_s_1.xml,v 1.1.4.3 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/fs_s_1/register_cert.vsp b/binsrc/tutorial/rdf/fs_s_1/register_cert.vsp
index cc50747..919c25f 100644
--- a/binsrc/tutorial/rdf/fs_s_1/register_cert.vsp
+++ b/binsrc/tutorial/rdf/fs_s_1/register_cert.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: register_cert.vsp,v 1.1.4.2 2010/04/26 07:56:09 source Exp $
+--  $Id: register_cert.vsp,v 1.1.4.3 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/index.xml b/binsrc/tutorial/rdf/index.xml
index 8df5ed8..61b6f3b 100644
--- a/binsrc/tutorial/rdf/index.xml
+++ b/binsrc/tutorial/rdf/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rd_s_1/options.xml b/binsrc/tutorial/rdf/rd_s_1/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/rdf/rd_s_1/options.xml
+++ b/binsrc/tutorial/rdf/rd_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rd_s_1/rd_s_1.xml b/binsrc/tutorial/rdf/rd_s_1/rd_s_1.xml
index 8ed610f..400ff66 100644
--- a/binsrc/tutorial/rdf/rd_s_1/rd_s_1.xml
+++ b/binsrc/tutorial/rdf/rd_s_1/rd_s_1.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rd_s_2/options.xml b/binsrc/tutorial/rdf/rd_s_2/options.xml
index 2cb2ee1..81f058f 100644
--- a/binsrc/tutorial/rdf/rd_s_2/options.xml
+++ b/binsrc/tutorial/rdf/rd_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rd_s_2/rd_s_2.xml b/binsrc/tutorial/rdf/rd_s_2/rd_s_2.xml
index 13e26d2..3fb57bc 100644
--- a/binsrc/tutorial/rdf/rd_s_2/rd_s_2.xml
+++ b/binsrc/tutorial/rdf/rd_s_2/rd_s_2.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/ri_s_1/options.xml b/binsrc/tutorial/rdf/ri_s_1/options.xml
index 8ef4e14..68d7065 100644
--- a/binsrc/tutorial/rdf/ri_s_1/options.xml
+++ b/binsrc/tutorial/rdf/ri_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/ri_s_1/ri_s_1.xml b/binsrc/tutorial/rdf/ri_s_1/ri_s_1.xml
index 4a111b0..d1673ad 100644
--- a/binsrc/tutorial/rdf/ri_s_1/ri_s_1.xml
+++ b/binsrc/tutorial/rdf/ri_s_1/ri_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_2/create_local_dsn.sql b/binsrc/tutorial/rdf/rq_s_2/create_local_dsn.sql
index a06f908..a85335d 100644
--- a/binsrc/tutorial/rdf/rq_s_2/create_local_dsn.sql
+++ b/binsrc/tutorial/rdf/rq_s_2/create_local_dsn.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: create_local_dsn.sql,v 1.3 2007/05/04 11:24:48 source Exp $
+--  $Id: create_local_dsn.sql,v 1.3.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_2/options.xml b/binsrc/tutorial/rdf/rq_s_2/options.xml
index 111919d..f2efd0e 100644
--- a/binsrc/tutorial/rdf/rq_s_2/options.xml
+++ b/binsrc/tutorial/rdf/rq_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_2/rq_s_2.xml b/binsrc/tutorial/rdf/rq_s_2/rq_s_2.xml
index 009b44a..d143336 100644
--- a/binsrc/tutorial/rdf/rq_s_2/rq_s_2.xml
+++ b/binsrc/tutorial/rdf/rq_s_2/rq_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_2/sparql_query.php b/binsrc/tutorial/rdf/rq_s_2/sparql_query.php
index 1aec1b9..328b396 100644
--- a/binsrc/tutorial/rdf/rq_s_2/sparql_query.php
+++ b/binsrc/tutorial/rdf/rq_s_2/sparql_query.php
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_3/create_local_dsn.sql b/binsrc/tutorial/rdf/rq_s_3/create_local_dsn.sql
index e07b154..2dde6e1 100644
--- a/binsrc/tutorial/rdf/rq_s_3/create_local_dsn.sql
+++ b/binsrc/tutorial/rdf/rq_s_3/create_local_dsn.sql
@@ -1,10 +1,10 @@
 --
---  $Id: create_local_dsn.sql,v 1.1 2007/05/04 11:24:48 source Exp $
+--  $Id: create_local_dsn.sql,v 1.1.2.1 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_3/options.xml b/binsrc/tutorial/rdf/rq_s_3/options.xml
index 486a18d..b9739cc 100644
--- a/binsrc/tutorial/rdf/rq_s_3/options.xml
+++ b/binsrc/tutorial/rdf/rq_s_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_3/rdf_import.php b/binsrc/tutorial/rdf/rq_s_3/rdf_import.php
index 6233ae0..87620ee 100644
--- a/binsrc/tutorial/rdf/rq_s_3/rdf_import.php
+++ b/binsrc/tutorial/rdf/rq_s_3/rdf_import.php
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdf/rq_s_3/rq_s_3.xml b/binsrc/tutorial/rdf/rq_s_3/rq_s_3.xml
index a271458..d6b97bc 100644
--- a/binsrc/tutorial/rdf/rq_s_3/rq_s_3.xml
+++ b/binsrc/tutorial/rdf/rq_s_3/rq_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdfview/index.xml b/binsrc/tutorial/rdfview/index.xml
index 5c47127..781ad0a 100644
--- a/binsrc/tutorial/rdfview/index.xml
+++ b/binsrc/tutorial/rdfview/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdfview/rd_v_1/options.xml b/binsrc/tutorial/rdfview/rd_v_1/options.xml
index 6323851..594a200 100644
--- a/binsrc/tutorial/rdfview/rd_v_1/options.xml
+++ b/binsrc/tutorial/rdfview/rd_v_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.owl b/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.owl
index 3dc0507..c9def3d 100644
--- a/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.owl
+++ b/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.owl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: rd_v_1.owl,v 1.5.2.2 2009/06/09 11:25:32 source Exp $
+ -  $Id: rd_v_1.owl,v 1.5.2.3 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.xml b/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.xml
index 93be275..049be81 100644
--- a/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.xml
+++ b/binsrc/tutorial/rdfview/rd_v_1/rd_v_1.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/demo.css b/binsrc/tutorial/repl/demo.css
index fed097d..6425c39 100644
--- a/binsrc/tutorial/repl/demo.css
+++ b/binsrc/tutorial/repl/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/index.xml b/binsrc/tutorial/repl/index.xml
index be2e25e..6c06e0f 100644
--- a/binsrc/tutorial/repl/index.xml
+++ b/binsrc/tutorial/repl/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_ds_1/options.xml b/binsrc/tutorial/repl/re_ds_1/options.xml
index b25e06d..1c7ee77 100644
--- a/binsrc/tutorial/repl/re_ds_1/options.xml
+++ b/binsrc/tutorial/repl/re_ds_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_ds_1/re_ds_1.sql b/binsrc/tutorial/repl/re_ds_1/re_ds_1.sql
index 52e6e2f..ed1865d 100644
--- a/binsrc/tutorial/repl/re_ds_1/re_ds_1.sql
+++ b/binsrc/tutorial/repl/re_ds_1/re_ds_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_ds_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_ds_1.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_ds_1/re_ds_1.xml b/binsrc/tutorial/repl/re_ds_1/re_ds_1.xml
index 3370cbe..254ac7b 100644
--- a/binsrc/tutorial/repl/re_ds_1/re_ds_1.xml
+++ b/binsrc/tutorial/repl/re_ds_1/re_ds_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_init.vsp b/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_init.vsp
index f3be3af..90ef7bf 100644
--- a/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_init.vsp
+++ b/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_init.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: re_ds_1_sample_init.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: re_ds_1_sample_init.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_repl.vsp b/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_repl.vsp
index afb475b..1fd61c8 100644
--- a/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_repl.vsp
+++ b/binsrc/tutorial/repl/re_ds_1/re_ds_1_sample_repl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: re_ds_1_sample_repl.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: re_ds_1_sample_repl.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_1/options.xml b/binsrc/tutorial/repl/re_sb_1/options.xml
index 8ca9549..e81afa9 100644
--- a/binsrc/tutorial/repl/re_sb_1/options.xml
+++ b/binsrc/tutorial/repl/re_sb_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_1/re_sb_1.sql b/binsrc/tutorial/repl/re_sb_1/re_sb_1.sql
index 2d940c2..b2f5dc6 100644
--- a/binsrc/tutorial/repl/re_sb_1/re_sb_1.sql
+++ b/binsrc/tutorial/repl/re_sb_1/re_sb_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sb_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sb_1.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_1/re_sb_1.xml b/binsrc/tutorial/repl/re_sb_1/re_sb_1.xml
index 1ad0d59..a4c963a 100644
--- a/binsrc/tutorial/repl/re_sb_1/re_sb_1.xml
+++ b/binsrc/tutorial/repl/re_sb_1/re_sb_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_2/options.xml b/binsrc/tutorial/repl/re_sb_2/options.xml
index 7ada589..d811ea3 100644
--- a/binsrc/tutorial/repl/re_sb_2/options.xml
+++ b/binsrc/tutorial/repl/re_sb_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_2/re_sb_2.sql b/binsrc/tutorial/repl/re_sb_2/re_sb_2.sql
index ff50204..5e829af 100644
--- a/binsrc/tutorial/repl/re_sb_2/re_sb_2.sql
+++ b/binsrc/tutorial/repl/re_sb_2/re_sb_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sb_2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sb_2.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_2/re_sb_2.xml b/binsrc/tutorial/repl/re_sb_2/re_sb_2.xml
index 179d17e..7466c60 100644
--- a/binsrc/tutorial/repl/re_sb_2/re_sb_2.xml
+++ b/binsrc/tutorial/repl/re_sb_2/re_sb_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_3/options.xml b/binsrc/tutorial/repl/re_sb_3/options.xml
index 64aa0e0..e78cc07 100644
--- a/binsrc/tutorial/repl/re_sb_3/options.xml
+++ b/binsrc/tutorial/repl/re_sb_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_3/re_sb_3.sql b/binsrc/tutorial/repl/re_sb_3/re_sb_3.sql
index 5943bdd..48490f2 100644
--- a/binsrc/tutorial/repl/re_sb_3/re_sb_3.sql
+++ b/binsrc/tutorial/repl/re_sb_3/re_sb_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sb_3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sb_3.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_3/re_sb_3.xml b/binsrc/tutorial/repl/re_sb_3/re_sb_3.xml
index 23f475c..e6c785c 100644
--- a/binsrc/tutorial/repl/re_sb_3/re_sb_3.xml
+++ b/binsrc/tutorial/repl/re_sb_3/re_sb_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_4/options.xml b/binsrc/tutorial/repl/re_sb_4/options.xml
index e94f071..c8a4fa2 100644
--- a/binsrc/tutorial/repl/re_sb_4/options.xml
+++ b/binsrc/tutorial/repl/re_sb_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_4/re_sb_4.sql b/binsrc/tutorial/repl/re_sb_4/re_sb_4.sql
index c7c8857..13fe2cf 100644
--- a/binsrc/tutorial/repl/re_sb_4/re_sb_4.sql
+++ b/binsrc/tutorial/repl/re_sb_4/re_sb_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sb_4.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sb_4.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_4/re_sb_4.xml b/binsrc/tutorial/repl/re_sb_4/re_sb_4.xml
index 2609d99..aa0c8ed 100644
--- a/binsrc/tutorial/repl/re_sb_4/re_sb_4.xml
+++ b/binsrc/tutorial/repl/re_sb_4/re_sb_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sb_4/re_sb_4_sample_1.vsp b/binsrc/tutorial/repl/re_sb_4/re_sb_4_sample_1.vsp
index fabcfe6..fea984f 100644
--- a/binsrc/tutorial/repl/re_sb_4/re_sb_4_sample_1.vsp
+++ b/binsrc/tutorial/repl/re_sb_4/re_sb_4_sample_1.vsp
@@ -3,7 +3,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,7 +20,7 @@
 --  
 --  
 ?>
-<!-- $Id: re_sb_4_sample_1.vsp,v 1.1.1.1 2006/04/11 17:56:13 source Exp $ -->
+<!-- $Id: re_sb_4_sample_1.vsp,v 1.1.1.1.2.1 2012/03/08 12:55:13 source Exp $ -->
 <html>
 <head><link rel="stylesheet" type="text/css" href="../demo.css"></head>
 <body>
diff --git a/binsrc/tutorial/repl/re_sd_1/options.xml b/binsrc/tutorial/repl/re_sd_1/options.xml
index 00c12c8..29816d2 100644
--- a/binsrc/tutorial/repl/re_sd_1/options.xml
+++ b/binsrc/tutorial/repl/re_sd_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_1/re_sd_1.sql b/binsrc/tutorial/repl/re_sd_1/re_sd_1.sql
index 0c8669b..fd879ab 100644
--- a/binsrc/tutorial/repl/re_sd_1/re_sd_1.sql
+++ b/binsrc/tutorial/repl/re_sd_1/re_sd_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sd_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sd_1.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_1/re_sd_1.xml b/binsrc/tutorial/repl/re_sd_1/re_sd_1.xml
index 5aea349..aa373e4 100644
--- a/binsrc/tutorial/repl/re_sd_1/re_sd_1.xml
+++ b/binsrc/tutorial/repl/re_sd_1/re_sd_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_2/options.xml b/binsrc/tutorial/repl/re_sd_2/options.xml
index fd8b99d..5c2deb7 100644
--- a/binsrc/tutorial/repl/re_sd_2/options.xml
+++ b/binsrc/tutorial/repl/re_sd_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_2/re_sd_2.sql b/binsrc/tutorial/repl/re_sd_2/re_sd_2.sql
index 05e2eaf..c162acd 100644
--- a/binsrc/tutorial/repl/re_sd_2/re_sd_2.sql
+++ b/binsrc/tutorial/repl/re_sd_2/re_sd_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sd_2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sd_2.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_2/re_sd_2.xml b/binsrc/tutorial/repl/re_sd_2/re_sd_2.xml
index 8a549dd..3348008 100644
--- a/binsrc/tutorial/repl/re_sd_2/re_sd_2.xml
+++ b/binsrc/tutorial/repl/re_sd_2/re_sd_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_3/options.xml b/binsrc/tutorial/repl/re_sd_3/options.xml
index 34b588a..5310657 100644
--- a/binsrc/tutorial/repl/re_sd_3/options.xml
+++ b/binsrc/tutorial/repl/re_sd_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_3/re_sd_3.sql b/binsrc/tutorial/repl/re_sd_3/re_sd_3.sql
index 52ddff9..ecd64b9 100644
--- a/binsrc/tutorial/repl/re_sd_3/re_sd_3.sql
+++ b/binsrc/tutorial/repl/re_sd_3/re_sd_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_sd_3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_sd_3.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sd_3/re_sd_3.xml b/binsrc/tutorial/repl/re_sd_3/re_sd_3.xml
index b03ff01..91be0aa 100644
--- a/binsrc/tutorial/repl/re_sd_3/re_sd_3.xml
+++ b/binsrc/tutorial/repl/re_sd_3/re_sd_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sm_1/options.xml b/binsrc/tutorial/repl/re_sm_1/options.xml
index 75dc4b0..bd0d22e 100644
--- a/binsrc/tutorial/repl/re_sm_1/options.xml
+++ b/binsrc/tutorial/repl/re_sm_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_sm_1/re_sm_1.xml b/binsrc/tutorial/repl/re_sm_1/re_sm_1.xml
index 2ee894e..4276571 100644
--- a/binsrc/tutorial/repl/re_sm_1/re_sm_1.xml
+++ b/binsrc/tutorial/repl/re_sm_1/re_sm_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_1/options.xml b/binsrc/tutorial/repl/re_xb_1/options.xml
index 94aa62e..b4a027c 100644
--- a/binsrc/tutorial/repl/re_xb_1/options.xml
+++ b/binsrc/tutorial/repl/re_xb_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_1/re_xb_1.sql b/binsrc/tutorial/repl/re_xb_1/re_xb_1.sql
index 620697a..a43c7a2 100644
--- a/binsrc/tutorial/repl/re_xb_1/re_xb_1.sql
+++ b/binsrc/tutorial/repl/re_xb_1/re_xb_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_xb_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_xb_1.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_1/re_xb_1.xml b/binsrc/tutorial/repl/re_xb_1/re_xb_1.xml
index cf49d71..cbec096 100644
--- a/binsrc/tutorial/repl/re_xb_1/re_xb_1.xml
+++ b/binsrc/tutorial/repl/re_xb_1/re_xb_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_2/options.xml b/binsrc/tutorial/repl/re_xb_2/options.xml
index 65ec990..b024fb1 100644
--- a/binsrc/tutorial/repl/re_xb_2/options.xml
+++ b/binsrc/tutorial/repl/re_xb_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_2/re_xb_2.sql b/binsrc/tutorial/repl/re_xb_2/re_xb_2.sql
index 414bd26..5b16e0a 100644
--- a/binsrc/tutorial/repl/re_xb_2/re_xb_2.sql
+++ b/binsrc/tutorial/repl/re_xb_2/re_xb_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_xb_2.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_xb_2.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_2/re_xb_2.xml b/binsrc/tutorial/repl/re_xb_2/re_xb_2.xml
index 8749064..1b233db 100644
--- a/binsrc/tutorial/repl/re_xb_2/re_xb_2.xml
+++ b/binsrc/tutorial/repl/re_xb_2/re_xb_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_3/options.xml b/binsrc/tutorial/repl/re_xb_3/options.xml
index 693e510..e496fd6 100644
--- a/binsrc/tutorial/repl/re_xb_3/options.xml
+++ b/binsrc/tutorial/repl/re_xb_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_3/re_xb_3.sql b/binsrc/tutorial/repl/re_xb_3/re_xb_3.sql
index 245502f..9bafaf6 100644
--- a/binsrc/tutorial/repl/re_xb_3/re_xb_3.sql
+++ b/binsrc/tutorial/repl/re_xb_3/re_xb_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_xb_3.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_xb_3.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_3/re_xb_3.xml b/binsrc/tutorial/repl/re_xb_3/re_xb_3.xml
index 195d3b6..31830ea 100644
--- a/binsrc/tutorial/repl/re_xb_3/re_xb_3.xml
+++ b/binsrc/tutorial/repl/re_xb_3/re_xb_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_4/options.xml b/binsrc/tutorial/repl/re_xb_4/options.xml
index 879516c..c1efbca 100644
--- a/binsrc/tutorial/repl/re_xb_4/options.xml
+++ b/binsrc/tutorial/repl/re_xb_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_4/re_xb_4.sql b/binsrc/tutorial/repl/re_xb_4/re_xb_4.sql
index aebcf84..2271a92 100644
--- a/binsrc/tutorial/repl/re_xb_4/re_xb_4.sql
+++ b/binsrc/tutorial/repl/re_xb_4/re_xb_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: re_xb_4.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: re_xb_4.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/repl/re_xb_4/re_xb_4.xml b/binsrc/tutorial/repl/re_xb_4/re_xb_4.xml
index 6f483da..9d10efc 100644
--- a/binsrc/tutorial/repl/re_xb_4/re_xb_4.xml
+++ b/binsrc/tutorial/repl/re_xb_4/re_xb_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/rss2xbel.xsl b/binsrc/tutorial/rss2xbel.xsl
index 38ed2b3..1f510f2 100644
--- a/binsrc/tutorial/rss2xbel.xsl
+++ b/binsrc/tutorial/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: rss2xbel.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/semweb/index.xml b/binsrc/tutorial/semweb/index.xml
index 1b6acab..82ceec3 100644
--- a/binsrc/tutorial/semweb/index.xml
+++ b/binsrc/tutorial/semweb/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/semweb/sem_s_1/options.xml b/binsrc/tutorial/semweb/sem_s_1/options.xml
index d7aeb85..bb21991 100644
--- a/binsrc/tutorial/semweb/sem_s_1/options.xml
+++ b/binsrc/tutorial/semweb/sem_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/semweb/sem_s_1/sem_s_1.xml b/binsrc/tutorial/semweb/sem_s_1/sem_s_1.xml
index 37d3926..62ec04c 100644
--- a/binsrc/tutorial/semweb/sem_s_1/sem_s_1.xml
+++ b/binsrc/tutorial/semweb/sem_s_1/sem_s_1.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/Makefile.am b/binsrc/tutorial/services/Makefile.am
index ad450cf..72b8b26 100644
--- a/binsrc/tutorial/services/Makefile.am
+++ b/binsrc/tutorial/services/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -33,36 +33,40 @@ EXTRA_DIST = \
 	ajax_inc/*.js \
 	ajax_inc/*.vsp \
 	ajax_inc/*.xsl \
+	dc_s_1/*.sql \
+	dc_s_1/*.vsp \
+	dc_s_1/*.xml \
 	ent.dtd \
+	idp_s_1/*.html \
+	idp_s_1/*.php \
+	idp_s_1/*.vsp \
+	idp_s_1/*.xml \
 	rm_s_1/*.sql \
 	rm_s_1/*.vsp \
 	rm_s_1/*.xml \
  	rn_s_1/*.vsp \
  	rn_s_1/*.xml \
-	rp_s_1/*.sql \
-	rp_s_1/*.vsp \
-	rp_s_1/*.xml \
 	rp_s_1/Makefile \
 	rp_s_1/referralCache.config \
 	rp_s_1/RoutingClient.cs \
+	rp_s_1/*.sql \
+	rp_s_1/*.vsp \
+	rp_s_1/*.xml \
 	rp_s_2/*.vsp \
 	rp_s_2/*.xml \
-	so_s_1/*.sql \
-	so_s_1/*.vsp \
-	so_s_1/*.xml \
 	so_s_10/*.html \
 	so_s_10/*.sql \
 	so_s_10/*.xml \
 	so_s_10/*.xsl \
+	so_s_11/array2d.xsd \
+	so_s_11/array_div.xsd \
+	so_s_11/division.xsd \
 	so_s_11/*.html \
+	so_s_11/provinces.xsd \
 	so_s_11/*.sql \
 	so_s_11/*.vsp \
 	so_s_11/*.xml \
 	so_s_11/*.xsl \
-	so_s_11/array2d.xsd \
-	so_s_11/array_div.xsd \
-	so_s_11/division.xsd \
-	so_s_11/provinces.xsd \
 	so_s_12/*.html \
 	so_s_12/*.xml \
 	so_s_12/*.xsl \
@@ -88,14 +92,14 @@ EXTRA_DIST = \
 	so_s_18/*.sql \
 	so_s_18/*.vsp \
 	so_s_18/*.xml \
+	so_s_19/array4d.xsd \
 	so_s_19/*.html \
 	so_s_19/*.sql \
 	so_s_19/*.xml \
 	so_s_19/*.xsl \
-	so_s_19/array4d.xsd \
-	so_s_2/*.sql \
-	so_s_2/*.vsp \
-	so_s_2/*.xml \
+	so_s_1/*.sql \
+	so_s_1/*.vsp \
+	so_s_1/*.xml \
 	so_s_20/*.vsp \
 	so_s_20/*.xml \
 	so_s_21/*.sql \
@@ -106,10 +110,10 @@ EXTRA_DIST = \
 	so_s_22/*.vsp \
 	so_s_22/*.xml \
 	so_s_23/*.java \
+	so_s_23/java_server.class \
 	so_s_23/*.sql \
 	so_s_23/*.xml \
 	so_s_23/*.xsl \
-	so_s_23/java_server.class \
 	so_s_24/*.html \
 	so_s_24/*.sql \
 	so_s_24/*.xml \
@@ -128,34 +132,37 @@ EXTRA_DIST = \
 	so_s_28/*.xml \
 	so_s_29/*.vsp \
 	so_s_29/*.xml \
-	so_s_3/*.vsp \
-	so_s_3/*.xml \
-	so_s_3/*.xsl \
+	so_s_2/*.sql \
+	so_s_2/*.vsp \
+	so_s_2/*.xml \
 	so_s_30/*.java \
+	so_s_30/so_s_30.class \
 	so_s_30/*.sql \
 	so_s_30/*.xml \
-	so_s_30/so_s_30.class \
 	so_s_31/*.sql \
 	so_s_31/*.xml \
-	so_s_32/*.sql \
-	so_s_32/*.xml \
 	so_s_32/so_s_32.cs \
 	so_s_32/so_s_32.dll \
+	so_s_32/*.sql \
+	so_s_32/*.xml \
 	so_s_33/*.sql \
 	so_s_33/*.vsp \
 	so_s_33/*.xml \
 	so_s_34/*.sql \
 	so_s_34/*.xml \
+	so_s_35/mappoint.xsd \
 	so_s_35/*.sql \
 	so_s_35/*.vsp \
 	so_s_35/*.xml \
-	so_s_35/mappoint.xsd \
 	so_s_36/*.sql \
 	so_s_36/*.vspx \
 	so_s_36/*.wsdl \
 	so_s_36/*.xml \
 	so_s_37/*.sql \
 	so_s_37/*.xml \
+	so_s_3/*.vsp \
+	so_s_3/*.xml \
+	so_s_3/*.xsl \
 	so_s_4/*.sql \
 	so_s_4/*.vsp \
 	so_s_4/*.xml \
@@ -165,11 +172,11 @@ EXTRA_DIST = \
 	so_s_6/*.xml \
 	so_s_6/*.xsl \
 	so_s_7/*.html \
+	so_s_7/soapcli.vb \
 	so_s_7/*.sql \
 	so_s_7/*.vsp \
 	so_s_7/*.xml \
 	so_s_7/*.xsl \
-	so_s_7/soapcli.vb \
 	so_s_8/*.sql \
 	so_s_8/*.vsp \
 	so_s_8/*.xml \
@@ -193,26 +200,26 @@ EXTRA_DIST = \
 	ws_s_1/*.sql \
 	ws_s_1/*.vsp \
 	ws_s_1/*.xml \
-	ws_s_2/*.vsp \
-	ws_s_2/*.xml \
 	ws_s_2/Makefile \
 	ws_s_2/SymClient.cs \
 	ws_s_2/SymClient.exe.config \
+	ws_s_2/*.vsp \
+	ws_s_2/*.xml \
+	ws_s_3/ASymClient2.cs \
+	ws_s_3/ASymClient.cs \
+	ws_s_3/Makefile \
 	ws_s_3/*.vsp \
 	ws_s_3/*.xml \
-	ws_s_3/Makefile \
-	ws_s_3/ASymClient.cs \
-	ws_s_3/ASymClient2.cs \
-	ws_s_4/*.vsp \
-	ws_s_4/*.xml \
-	ws_s_4/Makefile \
-	ws_s_4/x509Client.cs \
-	ws_s_4a/*.vsp \
-	ws_s_4a/*.xml \
 	ws_s_4a/Makefile \
-	ws_s_4a/UsernameClient.cs \
 	ws_s_4a/UsernameClient2.cs \
 	ws_s_4a/UsernameClient2.exe.config \
+	ws_s_4a/UsernameClient.cs \
+	ws_s_4a/*.vsp \
+	ws_s_4a/*.xml \
+	ws_s_4/Makefile \
+	ws_s_4/*.vsp \
+	ws_s_4/x509Client.cs \
+	ws_s_4/*.xml \
 	ws_s_5/*.sql \
 	ws_s_5/*.vsp \
 	ws_s_5/*.xml \
diff --git a/binsrc/tutorial/services/Makefile.in b/binsrc/tutorial/services/Makefile.in
index b3c7a30..48c805c 100644
--- a/binsrc/tutorial/services/Makefile.in
+++ b/binsrc/tutorial/services/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -283,36 +285,40 @@ EXTRA_DIST = \
 	ajax_inc/*.js \
 	ajax_inc/*.vsp \
 	ajax_inc/*.xsl \
+	dc_s_1/*.sql \
+	dc_s_1/*.vsp \
+	dc_s_1/*.xml \
 	ent.dtd \
+	idp_s_1/*.html \
+	idp_s_1/*.php \
+	idp_s_1/*.vsp \
+	idp_s_1/*.xml \
 	rm_s_1/*.sql \
 	rm_s_1/*.vsp \
 	rm_s_1/*.xml \
  	rn_s_1/*.vsp \
  	rn_s_1/*.xml \
-	rp_s_1/*.sql \
-	rp_s_1/*.vsp \
-	rp_s_1/*.xml \
 	rp_s_1/Makefile \
 	rp_s_1/referralCache.config \
 	rp_s_1/RoutingClient.cs \
+	rp_s_1/*.sql \
+	rp_s_1/*.vsp \
+	rp_s_1/*.xml \
 	rp_s_2/*.vsp \
 	rp_s_2/*.xml \
-	so_s_1/*.sql \
-	so_s_1/*.vsp \
-	so_s_1/*.xml \
 	so_s_10/*.html \
 	so_s_10/*.sql \
 	so_s_10/*.xml \
 	so_s_10/*.xsl \
+	so_s_11/array2d.xsd \
+	so_s_11/array_div.xsd \
+	so_s_11/division.xsd \
 	so_s_11/*.html \
+	so_s_11/provinces.xsd \
 	so_s_11/*.sql \
 	so_s_11/*.vsp \
 	so_s_11/*.xml \
 	so_s_11/*.xsl \
-	so_s_11/array2d.xsd \
-	so_s_11/array_div.xsd \
-	so_s_11/division.xsd \
-	so_s_11/provinces.xsd \
 	so_s_12/*.html \
 	so_s_12/*.xml \
 	so_s_12/*.xsl \
@@ -338,14 +344,14 @@ EXTRA_DIST = \
 	so_s_18/*.sql \
 	so_s_18/*.vsp \
 	so_s_18/*.xml \
+	so_s_19/array4d.xsd \
 	so_s_19/*.html \
 	so_s_19/*.sql \
 	so_s_19/*.xml \
 	so_s_19/*.xsl \
-	so_s_19/array4d.xsd \
-	so_s_2/*.sql \
-	so_s_2/*.vsp \
-	so_s_2/*.xml \
+	so_s_1/*.sql \
+	so_s_1/*.vsp \
+	so_s_1/*.xml \
 	so_s_20/*.vsp \
 	so_s_20/*.xml \
 	so_s_21/*.sql \
@@ -356,10 +362,10 @@ EXTRA_DIST = \
 	so_s_22/*.vsp \
 	so_s_22/*.xml \
 	so_s_23/*.java \
+	so_s_23/java_server.class \
 	so_s_23/*.sql \
 	so_s_23/*.xml \
 	so_s_23/*.xsl \
-	so_s_23/java_server.class \
 	so_s_24/*.html \
 	so_s_24/*.sql \
 	so_s_24/*.xml \
@@ -378,34 +384,37 @@ EXTRA_DIST = \
 	so_s_28/*.xml \
 	so_s_29/*.vsp \
 	so_s_29/*.xml \
-	so_s_3/*.vsp \
-	so_s_3/*.xml \
-	so_s_3/*.xsl \
+	so_s_2/*.sql \
+	so_s_2/*.vsp \
+	so_s_2/*.xml \
 	so_s_30/*.java \
+	so_s_30/so_s_30.class \
 	so_s_30/*.sql \
 	so_s_30/*.xml \
-	so_s_30/so_s_30.class \
 	so_s_31/*.sql \
 	so_s_31/*.xml \
-	so_s_32/*.sql \
-	so_s_32/*.xml \
 	so_s_32/so_s_32.cs \
 	so_s_32/so_s_32.dll \
+	so_s_32/*.sql \
+	so_s_32/*.xml \
 	so_s_33/*.sql \
 	so_s_33/*.vsp \
 	so_s_33/*.xml \
 	so_s_34/*.sql \
 	so_s_34/*.xml \
+	so_s_35/mappoint.xsd \
 	so_s_35/*.sql \
 	so_s_35/*.vsp \
 	so_s_35/*.xml \
-	so_s_35/mappoint.xsd \
 	so_s_36/*.sql \
 	so_s_36/*.vspx \
 	so_s_36/*.wsdl \
 	so_s_36/*.xml \
 	so_s_37/*.sql \
 	so_s_37/*.xml \
+	so_s_3/*.vsp \
+	so_s_3/*.xml \
+	so_s_3/*.xsl \
 	so_s_4/*.sql \
 	so_s_4/*.vsp \
 	so_s_4/*.xml \
@@ -415,11 +424,11 @@ EXTRA_DIST = \
 	so_s_6/*.xml \
 	so_s_6/*.xsl \
 	so_s_7/*.html \
+	so_s_7/soapcli.vb \
 	so_s_7/*.sql \
 	so_s_7/*.vsp \
 	so_s_7/*.xml \
 	so_s_7/*.xsl \
-	so_s_7/soapcli.vb \
 	so_s_8/*.sql \
 	so_s_8/*.vsp \
 	so_s_8/*.xml \
@@ -443,26 +452,26 @@ EXTRA_DIST = \
 	ws_s_1/*.sql \
 	ws_s_1/*.vsp \
 	ws_s_1/*.xml \
-	ws_s_2/*.vsp \
-	ws_s_2/*.xml \
 	ws_s_2/Makefile \
 	ws_s_2/SymClient.cs \
 	ws_s_2/SymClient.exe.config \
+	ws_s_2/*.vsp \
+	ws_s_2/*.xml \
+	ws_s_3/ASymClient2.cs \
+	ws_s_3/ASymClient.cs \
+	ws_s_3/Makefile \
 	ws_s_3/*.vsp \
 	ws_s_3/*.xml \
-	ws_s_3/Makefile \
-	ws_s_3/ASymClient.cs \
-	ws_s_3/ASymClient2.cs \
-	ws_s_4/*.vsp \
-	ws_s_4/*.xml \
-	ws_s_4/Makefile \
-	ws_s_4/x509Client.cs \
-	ws_s_4a/*.vsp \
-	ws_s_4a/*.xml \
 	ws_s_4a/Makefile \
-	ws_s_4a/UsernameClient.cs \
 	ws_s_4a/UsernameClient2.cs \
 	ws_s_4a/UsernameClient2.exe.config \
+	ws_s_4a/UsernameClient.cs \
+	ws_s_4a/*.vsp \
+	ws_s_4a/*.xml \
+	ws_s_4/Makefile \
+	ws_s_4/*.vsp \
+	ws_s_4/x509Client.cs \
+	ws_s_4/*.xml \
 	ws_s_5/*.sql \
 	ws_s_5/*.vsp \
 	ws_s_5/*.xml \
diff --git a/binsrc/tutorial/services/ajax_inc/ajax.js b/binsrc/tutorial/services/ajax_inc/ajax.js
index 9151447..b8d227a 100644
--- a/binsrc/tutorial/services/ajax_inc/ajax.js
+++ b/binsrc/tutorial/services/ajax_inc/ajax.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ajax_inc/proxy.vsp b/binsrc/tutorial/services/ajax_inc/proxy.vsp
index 06f6ede..8d13baf 100644
--- a/binsrc/tutorial/services/ajax_inc/proxy.vsp
+++ b/binsrc/tutorial/services/ajax_inc/proxy.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: proxy.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: proxy.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ajax_inc/wsdl2js.xsl b/binsrc/tutorial/services/ajax_inc/wsdl2js.xsl
index 0878d5b..f5e7eea 100644
--- a/binsrc/tutorial/services/ajax_inc/wsdl2js.xsl
+++ b/binsrc/tutorial/services/ajax_inc/wsdl2js.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -  
- -  $Id: wsdl2js.xsl,v 1.4 2006/08/16 08:31:03 source Exp $
+ -  $Id: wsdl2js.xsl,v 1.4.2.1 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ajax_inc/wsdl2js_udt.xsl b/binsrc/tutorial/services/ajax_inc/wsdl2js_udt.xsl
index c56d159..918faa4 100644
--- a/binsrc/tutorial/services/ajax_inc/wsdl2js_udt.xsl
+++ b/binsrc/tutorial/services/ajax_inc/wsdl2js_udt.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -  
- -  $Id: wsdl2js_udt.xsl,v 1.3 2006/08/16 08:31:03 source Exp $
+ -  $Id: wsdl2js_udt.xsl,v 1.3.2.1 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/dc_s_1/dc_s_1.sql b/binsrc/tutorial/services/dc_s_1/dc_s_1.sql
new file mode 100644
index 0000000..0ec7344
--- /dev/null
+++ b/binsrc/tutorial/services/dc_s_1/dc_s_1.sql
@@ -0,0 +1,131 @@
+--DB.DBA.VHOST_DEFINE (lpath=>'/domain_test', ppath=>'/DAV/VAD/domain_test/', is_dav=>1, vsp_user=>'dba', def_page=>'index.vsp');
+
+
+create procedure DB.DBA.SEARCH_DOMAIN_NAMECHEAP (in domain_name varchar, in username varchar,  in api_key varchar, in client_ip varchar, in proxy_server varchar := '')
+{
+	declare xd, xt, url, tmp, hdr any;
+	declare exit handler for sqlstate '*'
+	{
+		--dbg_obj_princ(__SQL_MESSAGE); 	
+		return -1;
+	};
+	url := sprintf('https://api.namecheap.com/xml.response?ApiUser=%s&ApiKey=%s&UserName=%s&Command=namecheap.domains.check&ClientIp=%s&DomainList=%s', username, api_key, username, client_ip, domain_name);
+--dbg_obj_princ(url);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>proxy_server);
+--dbg_obj_princ(tmp);
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := cast (xpath_eval(sprintf('/ApiResponse/CommandResponse/DomainCheckResult[@Domain="%s"]/@Available', domain_name), xd) as varchar);
+	if (xt = 'true')
+		return 1;
+	else
+		return 0;
+}
+;
+
+create procedure DB.DBA.CREATE_DOMAIN_NAMECHEAP (in domain_name varchar, in username varchar,  in api_key varchar, in client_ip varchar,
+in years integer, 
+in firstName varchar,
+in lastName varchar,
+in addr1 varchar,
+in province varchar,
+in zip varchar,
+in country varchar,
+in phone varchar,
+in email varchar,
+in org varchar,
+in city varchar,
+in proxy_server varchar := '')
+{
+	declare xd, xt, url, tmp, hdr any;
+	declare exit handler for sqlstate '*'
+	{
+		--dbg_obj_princ(__SQL_MESSAGE); 	
+		return -1;
+	};
+	url := sprintf('https://api.namecheap.com/xml.response?ApiUser=%s&ApiKey=%s&UserName=%s&Command=namecheap.domains.create&ClientIp=%s&DomainName=%s&Years=%d&AuxBillingFirstName=%s&AuxBillingLastName=%s&AuxBillingAddress1=%s&AuxBillingStateProvince=%s&AuxBillingPostalCode=%s&AuxBillingCountry=%s&AuxBillingPhone=%s&AuxBillingEmailAddress=%s&AuxBillingOrganizationName=%s&AuxBillingCity=%s&TechFirstName=%s&TechLastName=%s&TechAddress1=%s&TechStateProvince=%s&TechPostalCode=%s&TechCountry=%s&TechPhone=%s&TechEmailAddress=%s&TechOrganizationName=%s&TechCity=%s&AdminFirstName=%s&AdminLastName=%s&AdminAddress1=%s&AdminStateProvince=%s&AdminPostalCode=%s&AdminCountry=%s&AdminPhone=%s&AdminEmailAddress=%s&AdminOrganizationName=%s&AdminCity=%s&RegistrantFirstName=%s&RegistrantLastName=%s&RegistrantAddress1=%s&RegistrantStateProvince=%s&RegistrantPostalCode=%s&RegistrantCountry=%s&RegistrantPhone=%s&RegistrantEmailAddress=%s&RegistrantOrganizationName=%s&RegistrantCity=%s',
+	username, api_key, username, client_ip, domain_name, years,
+	firstName, lastName, addr1, province, zip, country, phone, email, org, city,
+	firstName, lastName, addr1, province, zip, country, phone, email, org, city,
+	firstName, lastName, addr1, province, zip, country, phone, email, org, city,
+	firstName, lastName, addr1, province, zip, country, phone, email, org, city
+	);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>proxy_server);
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := cast (xpath_eval(sprintf('/ApiResponse/CommandResponse/DomainCreateResult[@Domain="%s"]/@Registered', domain_name), xd) as varchar);
+	if (xt = 'true')
+		return 1;
+	else
+		return 0;
+}
+;
+
+create procedure DB.DBA.SEARCH_DOMAIN_INTERNETBS (in domain_name varchar, in pass varchar,  in api_key varchar, in proxy_server varchar := '')
+{
+	declare xd, xt, url, tmp, hdr any;
+	declare exit handler for sqlstate '*'
+	{
+		--dbg_obj_princ(__SQL_MESSAGE); 	
+		return -1;
+	};
+	url := sprintf('https://testapi.internet.bs/Domain/Check?Domain=%s&ApiKey=%s&Password=%s&ResponseFormat=xml', domain_name, api_key, pass);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>proxy_server);
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := cast (xpath_eval('/response/status', xd) as varchar);
+	if (xt = 'AVAILABLE')
+		return 1;
+	else
+		return 0;
+}
+;
+
+create procedure DB.DBA.CREATE_DOMAIN_INTERNETBS (in domain_name varchar, in pass varchar,  in api_key varchar,
+in years integer, 
+in firstName varchar,
+in lastName varchar,
+in addr1 varchar,
+in zip varchar,
+in country varchar,
+in phone1 varchar,
+in email varchar,
+in org varchar,
+in city varchar,
+in proxy_server varchar := '')
+{
+	declare xd, xt, url, tmp, hdr any;
+	declare phone varchar;
+	phone := replace(phone1, '+', '%2B');
+	declare exit handler for sqlstate '*'
+	{
+		--dbg_obj_princ(__SQL_MESSAGE); 	
+		return -1;
+	};
+	url := sprintf('https://testapi.internet.bs/Domain/Create?ResponseFormat=xml&ApiKey=%s&Password=%s&registrant_email=%s&registrant_firstname=%s&registrant_lastname=%s&registrant_organization=%s&registrant_street=%s&registrant_countrycode=%s&registrant_postalcode=%s&Domain=%s&registrant_phonenumber=%s&registrant_obfuscateemail=1&technical_firstname=%s&technical_lastname=%s&technical_organization=%s&technical_street=%s&technical_countrycode=%s&technical_postalcode=%s&technical_email=%s&technical_phonenumber=%s&admin_firstname=%s&admin_lastname=%s&admin_organization=%s&admin_street=%s&admin_countrycode=%s&admin_postalcode=%s&admin_email=%s&admin_phonenumber=%s&registrant_city=%s&technical_city=%s&admin_city=%s&billing_firstname=%s&billing_lastname=%s&billing_organization=%s&billing_street=%s&billing_countrycode=%s&billing_postalcode=%s&billing_email=%s&billing_phonenumber=%s&billing_city=%s&privatewhois=partial&period=%dy',
+	api_key, pass, email,
+	firstName, lastName, org, addr1, country, zip, domain_name, phone,
+	firstName, lastName, org, addr1, country, zip, email, phone,
+	firstName, lastName, org, addr1, country, zip, email, phone,
+	city, city, city,
+	firstName, lastName, org, addr1, country, zip, email, phone,
+	city, years
+	);
+	url := replace(url, ' ', '+');
+--dbg_obj_princ(url);
+	tmp := http_client_ext (url, headers=>hdr, proxy=>proxy_server);
+--dbg_obj_princ(tmp);
+	if (hdr[0] not like 'HTTP/1._ 200 %')
+		signal ('22023', trim(hdr[0], '\r\n'), 'RDFXX');
+	xd := xtree_doc (tmp);
+	xt := cast (xpath_eval('/response/product/status', xd) as varchar);
+--dbg_obj_princ(xt);
+	if (xt = 'SUCCESS')
+		return 1;
+	else
+		return 0;
+}
+;
diff --git a/binsrc/tutorial/services/dc_s_1/dc_s_1.xml b/binsrc/tutorial/services/dc_s_1/dc_s_1.xml
new file mode 100644
index 0000000..4e3cb0a
--- /dev/null
+++ b/binsrc/tutorial/services/dc_s_1/dc_s_1.xml
@@ -0,0 +1,45 @@
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="DC-S-1">
+  <refmeta>
+    <refentrytitle>Domain check and registration</refentrytitle>
+    <refmiscinfo>tutorial</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>Making and checking a Domain via Provider APIs</refname>
+    <refpurpose>Exposing new domains</refpurpose>
+  </refnamediv>
+
+<refsect1 id="DC-S-1a">
+<title>Example</title>
+<itemizedlist mark="bullet">
+  <listitem>The SQL script makes a Virtuoso API functions to create and check domains.</listitem>
+  <listitem>The interface page has a test buttons which sends a REST request to the server.</listitem>
+  <listitem>The Service for testing will just return its own argument.</listitem>
+  <listitem>At least 2 web threads are needed, so this should be noted before starting. An Error message is shown
+  if only one is available.</listitem>
+  <listitem>The page shows the command and explains the manual operation for doing this from the admin interface.</listitem>
+</itemizedlist> 
+</refsect1>
+</refentry>
diff --git a/binsrc/tutorial/services/dc_s_1/dc_s_1_sample.vsp b/binsrc/tutorial/services/dc_s_1/dc_s_1_sample.vsp
new file mode 100644
index 0000000..19af038
--- /dev/null
+++ b/binsrc/tutorial/services/dc_s_1/dc_s_1_sample.vsp
@@ -0,0 +1,232 @@
+<?vsp
+declare domain_name, user_name, api_key, status, service, years, 
+firstName, lastName, addr1, zip, country, province, phone, email, org, city varchar;
+
+service := 'internetbs';
+domain_name := 'test.com';
+user_name := 'testpass';
+api_key := 'testapi';	
+years := '2';
+firstName := 'Vladimir';
+lastName := 'Putin';
+addr1 := 'Lenin street, 1, app. 1';
+zip := '630090';
+province := 'Moscow oblast';
+country := 'ru';
+phone := '+880.1913949283';
+email := 'putin at kremlin.ru';
+org := 'Russia Kremlin';
+city := 'Moscow';
+status := '';
+
+if ({?'chk'} is not null)
+{
+    service := get_keyword ('service', params, '');
+    domain_name := get_keyword ('domain_name', params, '');
+    user_name := get_keyword ('user_name', params, '');
+    api_key := get_keyword ('api_key', params, '');	
+    dbg_obj_princ('===============================================================');	
+    dbg_obj_princ(domain_name, user_name, api_key, service);	
+    dbg_obj_princ('===============================================================');	
+    if (service = 'internetbs')
+    {
+        if (DB.DBA.SEARCH_DOMAIN_INTERNETBS(domain_name, user_name, api_key) = 1)
+        	status := 'The domain is free';
+        else
+        	status := 'The domain is already created';
+    }
+    else if (service = 'namecheap')
+    {
+        if (DB.DBA.SEARCH_DOMAIN_NAMECHEAP(domain_name, user_name, api_key, '127.0.0.1') = 1)
+        	status := 'The domain is free';
+        else
+        	status := 'The domain is already created';
+    }
+}
+
+if ({?'crt'} is not null)
+{
+    service := get_keyword ('service', params, '');
+    domain_name := get_keyword ('domain_name', params, '');
+    user_name := get_keyword ('user_name', params, '');
+    api_key := get_keyword ('api_key', params, '');	
+
+
+    years := get_keyword ('years', params, '');
+    firstName := get_keyword ('firstName', params, '');
+    lastName := get_keyword ('lastName', params, '');
+    addr1 := get_keyword ('addr1', params, '');	
+    zip := get_keyword ('zip', params, '');
+    province := get_keyword ('province', params, '');
+    country := get_keyword ('country', params, '');
+    phone := get_keyword ('phone', params, '');
+    email := get_keyword ('email', params, '');	
+    org := get_keyword ('org', params, '');
+    city := get_keyword ('city', params, '');
+    dbg_obj_princ('===============================================================');	
+    dbg_obj_princ(domain_name, user_name, api_key, service, years, 
+        firstName,
+        lastName,
+        addr1,
+        zip,
+        country,
+        phone,
+        email,
+        org,
+        city);	
+    dbg_obj_princ('===============================================================');	
+
+    if (service = 'internetbs')
+    {
+        if (DB.DBA.CREATE_DOMAIN_INTERNETBS (domain_name, user_name,  api_key,
+        atoi(years), 
+        firstName,
+        lastName,
+        addr1,
+        zip,
+        country,
+        phone,
+        email,
+        org,
+        city) = 1)
+        	status := 'The domain is created';
+        else
+        	status := 'The domain could not be created';
+    }
+    else if (service = 'namecheap')
+    {
+        if (DB.DBA.CREATE_DOMAIN_NAMECHEAP (domain_name, user_name, api_key, '127.0.0.1',
+        atoi(years), 
+        firstName,
+        lastName,
+        addr1,
+        province,
+        zip,
+        country,
+        phone,
+        email,
+        org,
+        city) = 1)
+        	status := 'The domain is created';
+        else
+        	status := 'The domain could not be created';
+    }
+}
+
+
+?>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>Virtuoso Domain Registration Test Form</title>
+		<style type="text/css">
+label
+{ display: inline; margin-top: 10pt; }
+body { font-family: arial, helvetica, sans-serif; font-size: 9pt; color: #234; }
+fieldset { border: 2px solid #86b9d9; }
+legend { font-size: 12pt; color: #86b9d9; }
+label { font-weight: bold; }
+h1 { width: 100%; background-color: #86b9d9; font-size: 18pt; font-weight: normal; color: #fff; height: 4ex; text-align: right; vertical-align: middle; padding-right:  8px; }
+		</style>
+	</head>
+	<body>
+		<div id="header">
+			<h1>Virtuoso Domain Registration Test Form</h1>
+		</div>
+		<div id="main">
+			<form action="" method="GET">
+			<fieldset>
+			<legend>Query</legend>
+			  <label for="domain_name">Domain Name</label>
+			  <br />
+			  <input type="text" name="domain_name" id="domain_name" value="<?V domain_name ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="user_name">User Name</label>
+			  <br />
+			  <input type="text" name="user_name" id="user_name" value="<?V user_name ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="api_key">API Key</label>
+			  <br />
+			  <input type="text" name="api_key" id="api_key" value="<?V api_key ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="service" class="n">Service:</label>
+			  <select name="service">
+			    <option value="namecheap" <?V case (service) when 'namecheap' then 'selected' else ' ' end ?> >Namecheap.com</option>
+			    <option value="internetbs" <?V case (service) when 'internetbs' then 'selected' else ' ' end ?> >Internet.bs</option>
+			  </select>
+			  <br /><br />
+
+			  <br /><br />
+
+			  <label for="years">Duration (Years)</label>
+			  <br />
+			  <input type="text" name="years" id="years" value="<?V years ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="firstName">First Name</label>
+			  <br />
+			  <input type="text" name="firstName" id="firstName" value="<?V firstName ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="lastName">Last Name</label>
+			  <br />
+			  <input type="text" name="lastName" id="lastName" value="<?V lastName ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="addr1">Address</label>
+			  <br />
+			  <input type="text" name="addr1" id="addr1" value="<?V addr1 ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="city">City</label>
+			  <br />
+			  <input type="text" name="city" id="city" value="<?V city ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="province">Province</label>
+			  <br />
+			  <input type="text" name="province" id="province" value="<?V province ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="country">Country</label>
+			  <br />
+			  <input type="text" name="country" id="country" value="<?V country ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="zip">ZIP</label>
+			  <br />
+			  <input type="text" name="zip" id="zip" value="<?V zip ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="phone">Phone</label>
+			  <br />
+			  <input type="text" name="phone" id="phone" value="<?V phone ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="email">Email</label>
+			  <br />
+			  <input type="text" name="email" id="email" value="<?V email ?>" size="80"/>
+			  <br /><br />
+
+			  <label for="org">Organization</label>
+			  <br />
+			  <input type="text" name="org" id="org" value="<?V org ?>" size="80"/>
+			  <br /><br />
+
+	
+			  <input type="submit" value="Check Domain" name="chk"/>
+        		  <input type="submit" value="Create Domain" name="crt"/>
+			  <input type="reset" value="Reset"/>
+
+			  <br /><br />
+				<?V status ?>
+			  <br /><br />
+
+			</fieldset>
+			</form>
+		</div>
+	</body>
+</html>
diff --git a/binsrc/tutorial/services/dc_s_1/options.xml b/binsrc/tutorial/services/dc_s_1/options.xml
new file mode 100644
index 0000000..80b3129
--- /dev/null
+++ b/binsrc/tutorial/services/dc_s_1/options.xml
@@ -0,0 +1,26 @@
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<init>
+<src load_at_start="" load_to_clean="dc_s_1.sql"/>
+<http_threads val="2" />
+</init>
diff --git a/binsrc/tutorial/services/demo.css b/binsrc/tutorial/services/demo.css
index fa0f5ff..4c12859 100644
--- a/binsrc/tutorial/services/demo.css
+++ b/binsrc/tutorial/services/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/idp_s_1/idp_s_1.vsp b/binsrc/tutorial/services/idp_s_1/idp_s_1.vsp
new file mode 100644
index 0000000..5297cd5
--- /dev/null
+++ b/binsrc/tutorial/services/idp_s_1/idp_s_1.vsp
@@ -0,0 +1,934 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?vsp
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+?><?vsp declare _path,_domain varchar;
+      _domain := 'http://' || regexp_replace(HTTP_GET_HOST(),':80$','');
+      _path := _domain || http_map_get('domain') || '/';
+    ?>
+<html>
+ <head>
+  <meta name="DESCRIPTION" content="Virtuoso Developer Tutorial" />
+  <title>Virtuoso Tutorial - Web Services (SOAP,WSDL,UDDI) - DC-S-1</title>
+  <meta name="KEYWORDS" content="SOAP, WSDL, UDDI, WS-Security, WS-ReliableMessaging, WS-Routing, Web Services, BPEL4WS, WS-Eventing, WebDAV, XML For Analysis, xmla, WS-Attachments, udf, udt, user defined types, user defined functions" />
+  <link rel="alternate" type="application/rss+xml" title="Virtuoso Screencast Demos" href="http://support.openlinksw.com/viewlets/virtuoso_viewlets_rss.vsp" />
+  <link rel="alternate" type="application/rss+xml" title="Virtuoso Tutorials" href="http://demo.openlinksw.com/tutorial/rss.vsp" />
+  <link rel="alternate" type="application/rss+xml" title="Virtuoso Product Blog (RSS 2.0)" href="http://www.openlinksw.com/weblogs/virtuoso/gems/rss.xml" />
+  <link rel="alternate" type="application/atom+xml" title="Virtuoso Product Blog (Atom)" href="http://www.openlinksw.com/weblogs/virtuoso/gems/atom.xml" />
+  <link href="../../tutorial3.css" rel="stylesheet" type="text/css" />
+  <link href="../../syntax/SyntaxHighlighter.css" rel="stylesheet" type="text/css" />
+  <link rel="meta" type="application/rdf+xml" title="SIOC" href="<?V _path ?>sioc.vsp" />
+ </head>
+ <body>
+  <table border="0" cellpadding="0" cellspacing="0" id="top">
+   <tr>
+    <td id="topnav"><img src="../../images/vtutorials_thin550.gif" alt="Virtuoso Developer Tutorial" width="550" height="75" />
+    </td>
+   </tr>
+  </table>
+  <table border="0" cellpadding="0" cellspacing="0" id="main">
+   <tr>
+    <td id="left">
+     <ul class="lftmenu">
+        <li class="lftmenu_title">Tutorial Quick Links</li>
+      <li class="lftmenu1">
+          <img src="../../images/vglobe_16.png" alt="Virtuoso Start Menu" title="Virtuoso Start Menu" /> <a target="_blank" href="/">Virtuoso Start Menu</a>
+      </li>
+      <li class="lftmenu1">
+          <img src="../../images/nav_arrow1.gif" alt="Virtuoso Conductor" title="Virtuoso Conductor" /> <a target="_blank" href="/conductor/">Virtuoso Conductor</a>
+      </li>
+     </ul>
+     <ul class="lftmenu">
+        <li class="lftmenu_title">Reference</li>
+        <li class="lftmenu_info">For a quick look up of any feature, function, or review of language syntax</li>
+      <li class="lftmenu1">
+          <img src="../../images/docs_16.png" alt="Documentation" title="Documentation" hspace="2" /> <a href="/doc/docs.vsp" target="_empty">Documentation</a>
+      </li>
+      <li class="lftmenu1">
+          <img src="../../images/nav_arrow1.gif" alt="Tutorial Quick Start Guide" title="Tutorial Quick Start Guide" hspace="2" /> <a href="../../guide.vsp">Tutorial Quick Start Guide</a>
+      </li>
+      <li class="lftmenu1">
+          <img src="../../images/docs_16.png" alt="Functions Index" title="Functions Index" hspace="2" /> <a href="/doc/html/functions.html" target="_empty">Functions Index</a>
+      </li>
+     </ul>
+     <div class="lftmenu">
+        <div class="lftmenu_title">search</div>
+      <div class="lftmenu1">
+       <form method="get" action="../../search.vsp" style="display:inline;"><input type="text" name="q" id="q" value="" size="17" /><input name="post" value="Go" title="Search" alt="Search" type="submit" />
+       </form>
+      </div>
+     </div>
+     <ul class="lftmenu">
+      <li class="lftmenu_title">
+          <a href="http://www.openlinksw.com/weblogs/virtuoso/" target="_blank">Virtuoso Blog</a>
+      </li>
+        <li class="lftmenu_info">Check out the latest technology buzz on the Virtuoso Blog</li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../atom.vsp"><img src="../../images/blue-icon-16.gif" border="0" alt="ATOM" title="ATOM" hspace="3" />Atom</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../rss.vsp"><img src="../../images/rss-icon-16.gif" border="0" alt="RSS" title="RSS" hspace="3" />RSS</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../rdf.vsp"><img src="../../images/rdf-icon-16.gif" border="0" alt="RDF" title="RDF" hspace="3" />RDF</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../ocs.vsp"><img src="../../images/blue-icon-16.gif" border="0" alt="OCS" title="OCS" hspace="3" />OCS</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../opml.vsp"><img src="../../images/blue-icon-16.gif" border="0" alt="OPML" title="OPML" hspace="3" />OPML</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../xbel.vsp"><img src="../../images/blue-icon-16.gif" border="0" alt="XBEL" title="XBEL" hspace="3" />XBEL</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../sioc.vsp"><img src="../../images/rdf-icon-16.gif" border="0" alt="SIOC(RDF/XML)" title="SIOC(RDF/XML)" hspace="3" />SIOC(RDF/XML)</a>
+      </li>
+      <li class="lftmenu1">
+          <a target="_blank" href="../../sioc_ttl.vsp"><img src="../../images/rdf-icon-16.gif" border="0" alt="SIOC(N3/Turtle)" title="SIOC(N3/Turtle)" hspace="3" />SIOC(N3/Turtle)</a>
+      </li>
+     </ul>
+     <div class="lftmenu">
+      <div class="lftmenu_info">Version: <?V sys_stat ('st_dbms_ver') ?>
+      </div>
+      <div class="lftmenu_info">Build: <?V sys_stat ('st_build_date') ?>
+      </div>
+     </div>
+     <a target="_blank" href="http://www.openlinksw.com/virtuoso"><img alt="Powered by OpenLink Virtuoso Universal Server" src="../../images/PoweredByVirtuoso.gif" border="0" />
+     </a>
+    </td>
+    <td id="right">
+     <div id="navtabs">
+      <table border="0" cellspacing="0" cellpadding="0">
+       <tr>
+        <td nowrap="nowrap" class="navtab_non_sel"><a href="../../hosting/">Data Management</a>
+        </td>
+            <td nowrap="nowrap" class="navtab_sel">Web Services</td>
+        <td nowrap="nowrap" class="navtab_non_sel"><a href="../../bpeldemo/">Business Process Integration</a>
+        </td>
+        <td nowrap="nowrap" class="navtab_non_sel"><a href="../../web/">Development</a>
+        </td>
+        <td nowrap="nowrap" class="navtab_non_sel"><a href="../../apps/">Demo applications</a>
+        </td>
+       </tr>
+      </table>
+      <table border="0" cellpadding="0" cellspacing="0" id="navtabs2">
+       <tr>
+        <td nowrap="nowrap" class="navtab_sel2"><a href="../../services/">SOAP Services</a>
+        </td>
+        <td nowrap="nowrap" class="navtab_non_sel2"><a href="../../wap/">Wireless Access Protocols</a>
+        </td>
+       </tr>
+      </table>
+     </div>
+     <div id="mainarea">
+        <script language="JavaScript" type="text/javascript">
+      var URL = '<?V http_path() ?>';
+    </script><script language="JavaScript" src="../../example.js" type="text/javascript"></script>
+      <div class="exp_nav">
+          <img src="../../images/rewnd_16.png" alt="previous example" title="previous example" /> <a href="../../services/ud_s_3/ud_s_3.vsp">previous example</a> | <a href="../../services/">index</a> | <a href="../../wap/wa_b_1/wa_b_1.vsp">next example</a> <img src="../../images/fastf_16.png" alt="next example" title="next example" />
+      </div>
+      <div id="ex_navcontainer">
+       <ul id="ex_navlist">
+        <li>
+              <a href="#" id="tab_info" onclick="toggle_tab('info')" class="current">Info</a>
+        </li>
+        <li>
+              <a href="#" id="tab_initial_state" onclick="toggle_tab('initial_state')">Initial State</a>
+        </li>
+        <li>
+              <a href="#" id="tab_view_source" onclick="toggle_tab('view_source')">View Source</a>
+        </li>
+        <li>
+              <a href="#" id="tab_run" onclick="toggle_tab('run')">Run</a>
+        </li>
+       </ul>
+      </div>
+      <div id="info">
+          <h1>WebID Identity Provider (IdP)</h1>
+          <h2>IdP-S-1 Checking if WebID and specific Public Key are in a relation</h2>
+          <h3>Checking WebID</h3>
+          <h4>Example</h4>
+          <ul>
+            <li>The service is an alternative to using SPARQL queries via the SPARQL protocol against Virtuoso endpoints re. WebID verification i.e., lookup a profile graph to see if WebID and specific Public Key are in a relation.</li>
+            <li>The webid_demo.vsp is a vsp page which implements WebID checking.</li>
+            <li>The webid_demo.php is a PHP page which implements WebID checking.</li>
+            <li>The webid_demo.html is a HTML (JS) page which implements WebID checking.</li>
+          </ul> 
+
+
+<?vsp
+  declare f, tmp, description, pwd, current_page, current_loc, title, ht_description, ht_path, start_view, error varchar;
+  declare sources, xt, start_l, load_l, load_c, demo_db, dep_vdb, dav_vsp, http_thr, xform_br, xslt_result any;
+  declare i, j, len, sl, have_vsp, have_sql, have_init, show_desc integer;
+  declare src_path, tutcss varchar;
+  declare srv_cert, srv_key, srv_ca, cli_cert, deps, dependa, uagent varchar;
+  declare is_moz, is_ie int;
+  declare listed_src any;
+  declare auth, current_page_auth varchar;
+  declare user_agent,only_browser varchar;
+  declare no_run int;
+  declare showed_init_state int;
+  no_run := 0;
+  showed_init_state := 0;
+
+  user_agent := http_request_header(lines, 'User-Agent', null, '');
+
+  f := {?'f'};
+  if (f is null)
+    f := '1';
+  f := '1';
+  error := ''; show_desc := 1; src_path := ''; dependa := '';
+  ht_path := http_physical_path ();
+  if (ht_path like '%/dev.vsp')   -- exeption in development state
+    ht_path := substring(http_physical_path(),1,length(http_physical_path()) - 8) || substring(http_path (),length(http_map_get('domain')) + 1,length(http_path ()));
+  sl := strrchr (ht_path, '/');
+  current_loc := substring (http_path(), 1, strrchr(http_path(),'/'));
+  pwd := t_get_pwd (substring (ht_path, 1, sl));
+  current_page := substring (ht_path, sl + 2, length (ht_path));
+  current_page_auth := current_page;
+  auth := '';
+  if (connection_get('sid') is not null)
+  {
+   auth := auth || '?sid=' || connection_get('sid');
+   auth := auth || '&realm=' || connection_get('realm') || '&';
+  } else
+     auth := '?';
+  current_page_auth := current_page_auth || auth;
+  start_view := null;
+  listed_src := null;
+
+  if (get_keyword ('load_scr_reset', params, '') <> '')
+  {
+    http_rewrite ();
+    http_header ('Content-Type: text/html\r\n');
+
+    if(not(registry_get('tutorial_'||current_page||'_completed') <> 0
+       and cast(registry_get('tutorial_'||current_page||'_completed') as integer) < 100
+       and cast(registry_get('tutorial_'||current_page||'_completed') as integer) > 0
+       and registry_get('tutorial_'||current_page||'_started') <> 0
+       and cast(registry_get('tutorial_'||current_page||'_started') as datetime ) > dateadd('second',(msec_time()/1000) * -1,now())))
+    {
+      registry_set('tutorial_'||current_page||'_completed','0');
+      registry_set('tutorial_'||current_page||'_content','');
+      registry_set('tutorial_'||current_page||'_started',datestring(now()));
+    };
+    connection_set('stop_execution','1');
+    return (0);
+  };
+
+  if (get_keyword ('load_scr_status', params, '') <> '')
+  {
+    http_rewrite ();
+    http_header ('Content-Type: text/html\r\n');
+    if (registry_get('tutorial_'||current_page||'_content') = 0)
+      http('noinit');
+    else
+      http(cast(registry_get('tutorial_'||current_page||'_completed') as varchar));
+    http(':');
+    if (registry_get('tutorial_'||current_page||'_content') = 0)
+      http('This example has not been initialized yet.');
+    else
+      http(registry_get('tutorial_'||current_page||'_content'));
+    connection_set('stop_execution','1');
+    return (0);
+  }
+
+  is_moz := 0; is_ie := 0;
+  uagent := lower (http_request_header (lines, 'User-Agent', null, ''));
+
+  if (strstr (uagent, 'mozilla') is not null and strstr (uagent, 'gecko') is not null)
+    is_moz := 1;
+  else if (strstr (uagent, 'msie') is not null and strstr (uagent, 'opera') is null)
+    is_ie := 1;
+
+  start_l := vector ();
+  load_l := ''; load_c := ''; dav_vsp := null; http_thr := null; xform_br := null;
+  if (0 <> t_file_stat (concat (pwd, '/options.xml')))
+  {
+    declare exit handler for sqlstate '*' { error := concat (__SQL_STATE, '', __SQL_MESSAGE); start_view := null; goto err; };
+    {
+      start_view := t_file_to_string (concat (pwd, '/options.xml'));
+      start_view := xml_tree_doc (start_view);
+      only_browser := cast ( xpath_eval ('/init/@only_browser', start_view, 1) as varchar);
+      start_l := xpath_eval ('/init/src/@start', start_view, 0);
+      load_l  := cast (xpath_eval ('/init/src/@load_at_start',  start_view, 1) as varchar);
+      load_c  := cast (xpath_eval ('/init/src/@load_to_clean',  start_view, 1) as varchar);
+      if ( (only_browser is not null)  and (strcasestr (user_agent, only_browser) is null))
+      {
+        dependa := concat (dependa,
+         sprintf ('<p style="color: red"><small>This example depends browser "%s" if you are using a diffrent browser the example may not function properly.</small></p>', only_browser));
+      }
+      demo_db  := cast (xpath_eval ('/init/depend/@demo_db',  start_view, 1) as varchar);
+      xform_br  := cast (xpath_eval ('/init/depend/@xform_br',  start_view, 1) as varchar);
+      dep_vdb   := cast (xpath_eval ('/init/depend/@vdb',  start_view, 1) as varchar);
+      start_view := t_file_to_string (concat (pwd, '/options.xml'));
+      start_view := xml_tree_doc (start_view);
+      dav_vsp := cast (xpath_eval ('/init/dav_vsp/@val', start_view, 1) as varchar);
+      http_thr := cast (xpath_eval ('/init/http_threads/@val', start_view, 1) as varchar);
+      src_path := cast (xpath_eval ('/init/srcdir/@srcpath', start_view, 1) as varchar);
+      srv_ca := cast (xpath_eval ('/init/https_server/@ca', start_view, 1) as varchar);
+      srv_cert := cast (xpath_eval ('/init/https_server/@cert', start_view, 1) as varchar);
+      srv_key := cast (xpath_eval ('/init/https_server/@key', start_view, 1) as varchar);
+      cli_cert := cast (xpath_eval ('/init/https_client/@cert', start_view, 1) as varchar);
+      deps  := xpath_eval ('/init/deps[@item and @example and @type]',  start_view, 0);
+      listed_src := xpath_eval ('/init/files/file/@name', start_view, 0);
+      if (length (listed_src) = 0)
+        listed_src := null;
+    }
+  }
+
+  if (get_keyword ('src', params, '') <> '')
+  {
+    declare ses any;
+    ses := string_output ();
+    http ('<html>\r\n<body>\r\n', ses);
+    http ('<pre>\r\n', ses);
+    http_rewrite ();
+    http_header ('Content-Type: text/html\r\n');
+    if (isstring (src_path) and length(src_path) > 1)
+      http_value (t_file_to_string (concat (http_root (), src_path , get_keyword ('src', params, ''))), NULL, ses);
+    else
+      http_value (t_file_to_string (concat (pwd, '/', get_keyword ('src', params, ''))), NULL, ses);
+    http ('\r\n</pre>\r\n', ses);
+    http ('<div style="float:right"><a href="javascript:window.close();"><img src="'|| http_map_get('domain') ||'/images/close_16.png" border="0" alt="close this window" title="close this window" /> close this window</a></div>\r\n', ses);
+    http ('<div style="position:absolute;top:10px;right:10px"><a href="javascript:window.close();"><img src="'|| http_map_get('domain') ||'/images/close_16.png" border="0" alt="close this window" title="close this window" /> close this window</a></div>\r\n', ses);
+    http ('\r\n</body>\r\n</html>\r\n', ses);
+    http (string_output_string (ses));
+    connection_set('stop_execution','1');
+    return (0);
+  }
+
+  {
+    declare exit handler for sqlstate '*' { error := 'Warning: The Demo Database is not running, but is required for correct operation of the examples.'; };
+    if (demo_db = 'yes')
+    {
+       declare num integer;
+       select count (distinct KEY_TABLE) into num from DB.DBA.SYS_KEYS where KEY_TABLE like 'Demo.demo.%';
+       if (num < 8)
+         signal ('.....', 'The demo DB is not installed');
+    }
+  }
+  -- vdb check
+  if (dep_vdb = 'yes')
+  {
+    if (sys_stat('st_has_vdb') = 0)
+        dependa := concat (dependa,
+         '<div>
+            <p style="color: red">This Virtual Database feature is available only in the commercial release of Virtuoso Universal Server.
+            For more information on the commercial release of the Virtuoso Universal Server,
+            click on the following links to learn more:</p>
+            <small>
+            <a href="http://virtuoso.openlinksw.com/">Virtual Database Home Page</a><br/>
+            <a href="http://demo.openlinksw.com/tutorial">Virtual Database Tutorials</a><br/>
+            <a href="http://docs.openlinksw.com/virtuoso">Virtual Database Documentation</a><br/>
+            <a href="http://www.openlinksw.com/">OpenLink Software</a><br/>
+            </small>
+          </div>');
+  }
+
+
+  -- dependancy tests
+  if (isarray (deps))
+  {
+    declare cn, ln integer;
+    declare item, exam, type varchar;
+    declare hosting_name,hosting_fail any;
+    cn := 0; ln := length (deps);
+    while (cn < ln)
+    {
+      item := cast (xpath_eval ('@item', deps[cn], 1) as varchar);
+      exam := cast (xpath_eval ('@example', deps[cn], 1) as varchar);
+      type := cast (xpath_eval ('@type', deps[cn], 1) as varchar);
+      if (lower(type) = 'table' and not exists (select 1 from DB.DBA.SYS_KEYS where 0 = casemode_strcmp (KEY_TABLE, item)))
+      {
+        dependa := concat (dependa,
+         sprintf ('<p style="color: red"><small>This example depends of table "%s" from "%s" demo, which isn''t initialized.</small></p>', item, exam));
+      }
+      else if (lower(type) = 'user' and not exists (select 1 from DB.DBA.SYS_USERS where 0 = casemode_strcmp (U_NAME, item)))
+      {
+        dependa := concat (dependa,
+         sprintf ('<p style="color: red"><small>This example depends of user account "%s" from "%s" demo, which isn''t initialized.</small></p>', item, exam));
+      }
+      else if (lower(type) = 'procedure' and not exists (select 1 from DB.DBA.SYS_PROCEDURES where 0 = casemode_strcmp (P_NAME, item)))
+      {
+        dependa := concat (dependa,
+         sprintf ('<p style="color: red"><small>This example depends of procedure "%s" from "%s" demo, which it isn''t initialized.</small></p>', item, exam));
+      }
+       else if (lower(type) = 'package' and not(tcheck_package(item)) )
+      {
+        dependa := concat (dependa,
+         sprintf ('<p style="color: red"><small>This example depends of package "%s", which is not installed.</small></p>', item));
+      }
+       else if (lower(type) = 'hosting')
+      {
+        hosting_fail := 0;
+        hosting_name := '';
+        if (lower(item) = 'clr_mono' and isnull(__proc_exists ('clr_runtime_name', 2)))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Virtuoso Universal Server for Linux with Mono Hosting or Virtuoso Universal Server for Windows with .NET CLR Hosting';
+        }
+        else if (lower(item) = 'clr' and (isnull(__proc_exists ('clr_runtime_name', 2)) or lower(clr_runtime_name()) = 'mono'))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Virtuoso Universal Server for Windows with .NET CLR Hosting';
+        }
+        else if (lower(item) = 'mono' and (isnull(__proc_exists ('clr_runtime_name', 2)) or lower(clr_runtime_name()) <> 'mono'))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Virtuoso Universal Server for Linux with Mono Hosting';
+        }
+        else if (lower(item) = 'java' and isnull(__proc_exists ('java_vm_attach', 2)))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Java Runtime Hosting Enabled';
+--        JSP hosting
+
+          tut_generate_tomcat_url ('', lines);
+          if (connection_get ('TomcatStatus') = 'BAD')
+             dependa := concat (dependa, '<p style="color: red">
+                 <small>In order to run this example you need start tomcat.</small></p>');
+
+--      end JSP hosting
+        }
+        else if (lower(item) = 'php' and isnull(__proc_exists ('__http_handler_php', 2)))
+        {
+          hosting_fail := 1;
+          hosting_name := 'PHP Runtime Hosting Enabled';
+        }
+        else if (lower(item) = 'perl' and isnull(__proc_exists ('WS.WS.__http_handler_pl')))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Perl Runtime Hosting Plugin Enabled';
+        }
+        else if (lower(item) = 'python' and isnull(__proc_exists ('WS.WS.__http_handler_py')))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Python Runtime Hosting Plugin Enabled';
+        }
+        else if (lower(item) = 'ruby' and isnull(__proc_exists ('WS.WS.__http_handler_rb')))
+        {
+          hosting_fail := 1;
+          hosting_name := 'Ruby Runtime Hosting Plugin Enabled';
+        }
+
+
+        if (hosting_fail)
+          dependa := concat (dependa, sprintf ('<p style="color: red"><small>In order to run this example you need %s.</small></p>', hosting_name));
+
+      }
+      cn := cn + 1;
+    }
+  }
+
+  if (dav_vsp = '1')
+  {
+    if (cfg_item_value (virtuoso_ini_path(), 'HTTPServer', 'EnabledDavVSP') <> dav_vsp)
+      error := 'Warning: WebDAV VSP Page Execution is currently disabled. Please enable in order to use this service.  Go to the Config file for the demo database (the file "demo.ini") and edit the section-key: EnabledDavVSP = 0 by uncommenting and then changing the 0 to 1.';
+  }
+
+  if (http_thr is not null and atoi(http_thr) > 1)
+  {
+    if (atoi (cfg_item_value (virtuoso_ini_path(), 'HTTPServer', 'ServerThreads')) < atoi (http_thr))
+    {
+      error := sprintf ('Warning: This example needs at least %s HTTP server threads configured.', http_thr);
+    }
+  }
+
+  if (isstring (srv_cert))
+  {
+    if (t_file_stat (srv_cert) = 0 or
+        t_file_stat (srv_key) = 0 or
+        t_file_stat (srv_ca) = 0 or
+        t_file_stat (cli_cert) = 0)
+    {
+      error := sprintf ('Warning: This example needs of following files to be installed:
+      HTTPS Server: CA list:%s,  Certificate:%s, Private Key:%s and Client certificate:%s.',
+      srv_ca, srv_cert, srv_key, cli_cert);
+    }
+  }
+
+  if (isstring (src_path) and length(src_path) > 1)
+    sources := t_sys_dirlist (concat (http_root(), src_path), 1, null, 1);
+  else
+    sources := t_sys_dirlist (pwd, 1, null, 1);
+
+  len := length (sources); i := 0;
+  if (isstring (load_l) and load_l <> '')
+    t_load_script (concat (pwd, '/', load_l));
+
+  if (get_keyword ('load_scr', params, '') <> '')
+  {
+    if(registry_get('tutorial_'||current_page||'_completed') <> 0
+       and cast(registry_get('tutorial_'||current_page||'_completed') as integer) < 100
+       and cast(registry_get('tutorial_'||current_page||'_completed') as integer) > 0)
+    {
+      http_rewrite ();
+      http_header ('Content-Type: text/html\r\n');
+      http('already running');
+      http_flush ();
+      connection_set('stop_execution','1');
+      return (0);
+    }
+
+    declare cnt, parts, tm, res any;
+    declare stat, msg any;
+    declare sql_files any;
+    declare count_all,count_executed integer;
+
+    sql_files := vector();
+    count_all := 0;
+    count_executed := 0;
+
+    res := string_output();
+
+    while (i < len)
+    {
+      if ((load_c <> '' and aref (sources, i) = load_c) or (load_c = '' and aref (sources, i) like '%.sql'))
+      {
+        cnt := t_file_to_string (concat (pwd, '/', aref (sources, i)));
+        parts := sql_split_text (cnt);
+        sql_files := vector_concat(sql_files,vector(vector(aref (sources, i),parts)));
+        count_all := count_all + length(parts);
+      }
+      i := i + 1;
+    }
+
+    http_rewrite ();
+    http_header ('Content-Type: text/html\r\n');
+    http_flush (1);
+    http ('<html>\r\n<body>\r\n');
+    http ('<pre>\r\n');
+
+    foreach (any sql_file in sql_files) do
+    {
+      http (sprintf('Loading file: %s\r\n\r\n',sql_file[0]));
+      http (sprintf('Loading file: %s\r\n\r\n',sql_file[0]),res);
+      foreach (varchar s in sql_file[1]) do
+      {
+        stat := '00000';
+        msg := '';
+        tm := msec_time();
+        exec (s, stat, msg);
+        count_executed := count_executed + 1;
+        if (stat <> '00000')
+        {
+          rollback work;
+          if (lower (trim (s, ' \r\n')) like 'drop %')
+          {
+            http (sprintf ('<span style="color:green;">It is normal to see errors from drop statements, if this is the first time the sql is executed.<br/>*** Error %s: %s</span>',stat,msg));
+            http (sprintf ('<span style="color:green;">It is normal to see errors from drop statements, if this is the first time the sql is executed.<br/>*** Error %s: %s</span>',stat,msg),res);
+          }
+          else
+          {
+            http (sprintf ('<span style="color:red;">*** Error %s: %s</span>',stat,msg));
+             http (sprintf ('<span style="color:red;">*** Error %s: %s</span>',stat,msg),res);
+          }
+        }
+        else
+        {
+          commit work;
+          http (sprintf ('Done. -- %s msec.',cast(msec_time() - tm as varchar)));
+          http (sprintf ('Done. -- %s msec.',cast(msec_time() - tm as varchar)),res);
+        }
+        http ('\r\n\r\n');
+        http ('\r\n\r\n',res);
+        registry_set('tutorial_'||current_page||'_completed',cast(ceiling(((100.0/count_all) * count_executed)) - 1 as varchar));
+        registry_set('tutorial_'||current_page||'_content',string_output_string(res));
+        http_flush (1);
+      }
+    }
+
+    http ('Finished.\r\n');
+    http ('Finished.\r\n',res);
+    registry_set('tutorial_'||current_page||'_completed','100');
+    registry_set('tutorial_'||current_page||'_content',string_output_string(res));
+    http ('</pre>\r\n');
+    http ('<div style="float:right"><a href="javascript:window.close();"><img src="'|| http_map_get('domain') ||'/images/close_16.png" border="0" alt="close this window" title="close this window" /> close this window</a></div>\r\n');
+    http ('<div style="position:absolute;top:10px;right:10px"><a href="javascript:window.close();"><img src="'|| http_map_get('domain') ||'/images/close_16.png" border="0" alt="close this window" title="close this window" /> close this window</a></div>\r\n');
+    http ('</body>\r\n</html>\r\n');
+    http_flush(1);
+    connection_set('stop_execution','1');
+    return (0);
+  }
+
+  err:
+  len := length (sources); i := 0; j := 0; have_vsp := 0; have_sql := 0; have_init := 0;
+  if (isentity(start_view) and xpath_eval ('/init/run[@name and @link]',  start_view))
+    have_vsp := have_vsp + 1;
+  while (i < len)
+  {
+    if (listed_src is not null and not position (aref (sources, i), listed_src))
+      ;
+    else if (aref (sources, i) <> current_page and (
+          aref (sources, i) like '%.vsp' or
+          aref (sources, i) like '%.rq' or
+          aref (sources, i) like '%.isparql' or
+          aref (sources, i) like '%.csdl' or
+          aref (sources, i) like '%.owl' or
+          aref (sources, i) like '%.html' or
+          aref (sources, i) like '%.vspx' or
+          aref (sources, i) like '%.aspx' or
+          aref (sources, i) like '%.pl' or
+          aref (sources, i) like '%.py' or
+          aref (sources, i) like '%.rb' or
+          aref (sources, i) like '%.jsp' or
+          (aref (sources, i) like '%.php' and
+            aref (sources, i) not like '.%.php')))
+      have_vsp := have_vsp + 1;
+    else if (aref (sources, i) like '%.sql')
+    {
+      if (listed_src is not null and not position (sources[i], listed_src))
+        ;
+      else
+        have_sql := have_sql + 1;
+      if ((load_c <> '' and sources[i] = load_c) or (load_c = '' and sources[i] like '%.sql'))
+        have_init := have_init + 1;
+    }
+    else if (listed_src is not null and position (sources[i], listed_src))
+      have_vsp := have_vsp + 1;
+    i := i + 1;
+  }
+
+  erri:
+?>
+<?vsp
+  if (error <> '' and not show_desc)
+    http (concat ('<p style="color: red"><b>', error,'</b></p>'));
+?>
+<?vsp
+  if (not(have_init)) {
+?>
+    <script language="JavaScript" type="text/javascript">
+      HaveInitialState = 0;
+    </script>
+<?vsp
+  }
+?>
+  <a name="launchtable"> <!-- If we don't have at least space here IE will give unknown runtime error --></a>
+<?vsp
+  if (xform_br = 'yes')
+  {
+    http ('<object id="FormsPlayer" classid="CLSID:4D0ABA11-C5F0-4478-991A-375C4B648F58"><p style="color: red"><b>Warning: FormsPlayer has failed to load! Please check your installation.</b></p><p><b>The FormsPlayer is needed in order to run this sample.</b></p><br /></object>');
+   }
+  if (dependa <> '' and show_desc)
+    http (dependa);
+  if (have_vsp or have_sql)
+  {
+?>
+<?vsp
+     if (error <> '' and show_desc)
+      http (concat ('<p style="color: red"><b>', error,'</b></p>'));
+?>
+  <table class="source_table_">
+    <tr class="source_table_header">
+      <th nowrap="nowrap"><b>View the source</b></th>
+      <th><b> Action </b></th>
+    </tr>
+<?vsp
+  }
+  len := length (sources); i := 0; j := 0;
+  -- Set Initial State
+  while (i < len)
+  {
+    if (listed_src is not null and not position (sources[i], listed_src))
+      ;
+    else if (sources[i] like '%.sql' and ((load_c <> '' and sources[i] = load_c) or (load_c = '' and sources[i] like '%.sql')))
+    {
+      j := j + 1;
+?>
+      <tr>
+        <td class="source_table_data">
+           <?V j ?>.
+          <a onclick="ViewSourceLink('<?V aref (sources, i) ?>')" href="#"><?V aref (sources, i) ?></a>
+          <script language="JavaScript" type="text/javascript">Files.push('<?V aref (sources, i) ?>');</script>
+        </td>
+        <td class="source_table_action">
+          <?vsp
+            if (showed_init_state = 0)
+            {
+              showed_init_state := 1;
+          ?>
+              <a onclick="InitialStateLink()" href="#">Set the initial state</a>
+          <?vsp
+            }
+          ?>
+        </td>
+      </tr>
+<?vsp
+    }
+    i := i + 1;
+  }
+  -- dummy run links
+  if (isentity(start_view))
+  {
+    declare run_name, run_link varchar;
+    foreach(any xrun in xpath_eval ('/init/run[@name and @link ]',  start_view, 0))do
+    {
+      run_name := cast(xpath_eval('@name',xrun) as varchar);
+      run_link := cast(xpath_eval('@link',xrun) as varchar);
+      j := j + 1;
+?>
+      <tr>
+        <td class="source_table_data">
+          <?V j ?>.
+          <?V run_name ?>
+        </td>
+        <td class="source_table_action">
+          <a target="run_frame" onclick="RunLink('<?V replace(run_link,'''','\\''') ?>')" href="<?V run_link?>">Run</a>
+          <script language="JavaScript" type="text/javascript">RunFiles.push(Array('<?V run_link ?>','<?V run_name ?>'));</script>
+        </td>
+      </tr>
+<?vsp
+    }
+  }
+  -- list of files
+  declare sslhost, sslport, tmp varchar;
+  
+  sslhost := null; 
+  sslport := null;
+  for select top 1 HP_HOST, HP_LISTEN_HOST 
+        from DB.DBA.HTTP_PATH
+       where HP_LPATH like '/tutorial/webid' and HP_HOST not like '*sslini*' and HP_SECURITY = 'SSL' and length (HP_HOST) do
+	{
+	  tmp := split_and_decode (HP_LISTEN_HOST, 0, '\0\0:');
+	  if (length (tmp) = 2)
+	    tmp := tmp[1];
+	  else
+	    tmp := HP_LISTEN_HOST;
+	  sslhost := HP_HOST;
+	  sslport := tmp;
+	  if (sslport <> '443')
+	    sslhost := sslhost || ':' || sslport;
+	}
+  if (server_https_port () is not null and sslhost is null)
+  {
+    sslhost := registry_get ('URIQADefaultHost');
+    tmp := split_and_decode (sslhost, 0, '\0\0:');
+    if (length (tmp) = 2)
+	    sslhost := tmp[0];
+	    
+    sslport := server_https_port ();
+    if (sslport <> '443')
+	    sslhost := sslhost || ':' || sslport;
+  }
+  sslhost := 'https://' || sslhost || '/tutorial/webid';
+
+  i := 0;
+  while (i < len)
+  {
+    declare src_name, source_ext, dot_pos any;
+
+    src_name := sources[i];
+    dot_pos := strrchr (src_name, '.');
+    if (dot_pos is not null)
+      source_ext := subseq (src_name, dot_pos + 1, length (src_name));
+    else
+      source_ext := null;
+
+    if (listed_src is not null and not position (src_name, listed_src))
+      ;
+    else if (
+      src_name <> current_page and
+      src_name[0] <> ascii ('.') and
+      src_name <> 'options.xml' and
+      src_name <> regexp_replace (current_page, '.vspx?$', '.xml') and
+      source_ext in
+      ('rq', 'csdl', 'isparql', 'owl', 'vsp', 'sql','xsl','xml','xsd','html','java','pl','pm','py','rb','cs','vspx','aspx','wsdl','bpel','php', 'xq', 'xslt', 'cpp', 'h', 'jsp'))
+    {
+      if (sources[i] like '%.sql' and ((load_c <> '' and sources[i] = load_c) or (load_c = '' and sources[i] like '%.sql')))
+        goto next_item;
+      j := j + 1;
+?>
+      <tr>
+        <td class="source_table_data">
+          <?V j ?>.
+          <a onclick="ViewSourceLink('<?V aref (sources, i) ?>')" href="#"><?V aref (sources, i) ?></a>
+          <script language="JavaScript" type="text/javascript">Files.push('<?V aref (sources, i) ?>');</script>
+        </td>
+        <td class="source_table_action">
+<?vsp
+          if ((not no_run) and
+            aref (sources, i) like '%.jsp')
+            {
+          ?>
+          <a target="run_frame_java" href="<?=tut_generate_tomcat_url (sources[i], lines)?>">Run</a>
+          <?vsp
+            }
+          if ( (not no_run) and
+            (aref (sources, i) like '%.vsp'
+            or aref (sources, i) like '%.html'
+            or aref (sources, i) like '%.pl'
+            or aref (sources, i) like '%.py'
+            or aref (sources, i) like '%.isparql'
+            or aref (sources, i) like '%.rb'
+            or aref (sources, i) like '%.vspx'
+            or aref (sources, i) like '%.aspx'
+            or aref (sources, i) like '%.php'))
+          {
+            declare ii, ll, show_run integer;
+            declare where_to_run varchar;
+            if (start_view is not null)
+            {
+              declare fhost, furl, whost any;
+              fhost := http_request_header (lines, 'Host', null, 'localhost');
+              fhost := split_and_decode (fhost, 0, ':=:');
+              where_to_run := cast (xpath_eval (sprintf ('/init/src[@start = ''%s'']/@link', sources [i]), start_view, 1) as varchar);
+
+              furl := WS.WS.PARSE_URI (coalesce (where_to_run, ''));
+              if (furl[0] <> '' and furl[1] <> '')
+              {
+                declare nhostp varchar;
+                whost := split_and_decode (furl[1], 0, ':=:');
+                if (length (whost) > 1)
+                {
+                  if (whost[1] = '<port>')
+                  {
+                    declare new_port any;
+                    new_port := sprintf ('%d', atoi(server_http_port ()));
+                    nhostp := sprintf ('%s:%s', fhost[0], new_port);
+                  }
+                  else if (whost[1] <> '<port+1>')
+                    nhostp := sprintf ('%s:%s', fhost[0], whost[1]);
+                  else
+                  {
+                    declare new_port any;
+                    new_port := sprintf ('%d', atoi(server_http_port ())+1);
+                    nhostp := sprintf ('%s:%s', fhost[0], new_port);
+                  }
+                }
+                else
+                  nhostp := fhost [0];
+                where_to_run := sprintf ('%s://%s%s', furl[0], nhostp, furl[2]);
+              }
+            }
+
+            show_run := 0;
+            if (start_view is null or (isarray (start_l) and length (start_l) = 0))
+            {
+          ?>
+              <a target="run_frame" onclick="RunLink('<?V concat(sslhost, '/', aref (sources, i)) ?><?Vauth?>')" href="<?V concat(sslhost, '/', aref (sources, i)) ?><?Vauth?>">Run</a>
+              <script language="JavaScript" type="text/javascript">RunFiles.push(Array('<?V concat(sslhost, '/', aref (sources, i)) ?><?Vauth?>','<?V aref (sources, i) ?>'));</script>
+          <?vsp
+            }
+            else if (isstring (where_to_run))
+            {
+              -- frame run
+              if (strchr (where_to_run, '/') is null)
+              {
+                where_to_run := sprintf ('%s/%s', current_loc, where_to_run);
+              }
+            ?>
+              <a target="run_frame" onclick="RunLink('<?V where_to_run ?>')" href="<?V where_to_run ?>">Run</a>
+              <script language="JavaScript" type="text/javascript">RunFiles.push(Array('<?V where_to_run ?>','<?V aref (sources, i) ?>'));</script>
+            <?vsp
+            }
+            else
+              http(' ');
+          }
+          else
+             http(' ');
+      ?>
+      </td>
+    </tr>
+<?vsp
+    }
+    next_item:
+    i := i + 1;
+  }
+?>
+<?vsp
+  if (have_vsp or have_sql)
+  {
+?>
+     </table>
+<?vsp
+  }
+?>
+
+
+      </div>
+        <script language="JavaScript" type="text/javascript">
+      if (!HaveInitialState)
+        document.getElementById('tab_initial_state').parentNode.className = 'disabled';
+      if (Files.length == 0)
+        document.getElementById('tab_view_source').parentNode.className = 'disabled';
+      if (RunFiles.length == 0)
+        document.getElementById('tab_run').parentNode.className = 'disabled';
+    </script>
+      <div id="initial_state" style="display:none;">
+       <div id="progressBar">
+            <div id="PBcompleted"></div>
+            <div id="PBcontent">0%</div>
+       </div>
+          <input type="button" id="bt_SetInitialState" onclick="SetInitialState()" value="Set the initial state" /><input type="button" onclick="CancelInitialState()" value="Cancel" />
+       <div id="initial_state_content">
+            <p>Checking state, please wait...</p>
+       </div>
+      </div>
+      <div id="view_source" style="display:none;">
+          <script language="JavaScript" src="../../syntax/shCore.js" type="text/javascript"></script><script language="JavaScript" src="../../syntax/shBrushSql.js" type="text/javascript"></script><script language="JavaScript" src="../../syntax/shBrushXml.js" type="text/javascript"></script><script language="JavaScript" src="../../syntax/shBrushCSharp.js" type="text/javascript"></script><script language="JavaScript" src="../../syntax/shBrushPhp.js" type="text/javascript"></script><script language="JavaScript" src="../../syntax/shBrushPython.js" type="text/javascript"></script><script language="JavaScript" src="../../syntax/shBrushVb.js" type="text/javascript"></script>
+       <div>
+            <input type="button" id="hilite" name="hilite" value="Show Syntax Highlight" onclick="doSyntax (this);" disabled="disabled" />
+       </div>
+       <div>
+        <div id="filelist">
+         <ul id="filelist_nav">
+                <li>~no files~</li>
+         </ul>
+              <script language="JavaScript" type="text/javascript">
+            FileListInit();
+          </script>
+        </div>
+            <div id="filesource"></div>
+       </div>
+      </div>
+      <div id="run" style="display:none;">
+       <div id="runfilelist">
+        <ul id="runfilelist_nav">
+              <li>~no files~</li>
+        </ul>
+            <script language="JavaScript" type="text/javascript">
+          RunFileListInit();
+        </script>
+       </div>
+          <iframe id="run_frame" name="run_frame" src="../../1x1.html"></iframe>
+      </div>
+        <div id="debug"></div>
+        <a name="exp_bot"></a>
+      <div class="exp_nav">
+          <img src="../../images/rewnd_16.png" alt="previous example" title="previous example" /> <a href="../../services/ud_s_3/ud_s_3.vsp#exp_bot">previous example</a> | <a href="../../services/">index</a> | <a href="../../wap/wa_b_1/wa_b_1.vsp#exp_bot">next example</a> <img src="../../images/fastf_16.png" alt="next example" title="next example" />
+      </div>
+     </div>
+    </td>
+   </tr>
+  </table>
+  <div class="footer">
+   <div id="w3cval">
+    <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" />
+    </a>
+   </div>
+    <a target="_blank" href="http://www.openlinksw.com"><img src="../../images/web_24.png" border="0" alt="OpenLink Home" title="OpenLink Home" /> OpenLink Home</a> | <a target="_blank" href="http://www.openlinksw.com/virtuoso"><img src="../../images/web_24.png" border="0" alt="Virtuoso Home" title="Virtuoso Home" /> Virtuoso Home</a> | <a target="_blank" href="mailto:support at openlinksw.com"><img src="../../images/mail_24.png" border="0" alt="Technical Support" title="Technical Support" /> Technical Support</a> | <a target="_blank" href="http://www.openlinksw.com/main/contactu.html"><img src="../../images/mail_24.png" border="0" alt="Contact Us" title="Contact Us" /> Contact Us</a>
+    <p class="copyright">Copyright © 1999-<?V "LEFT" (datestring (now()), 4)?> OpenLink Software</p>
+  </div>
+ </body>
+</html>
diff --git a/binsrc/tutorial/services/idp_s_1/idp_s_1.xml b/binsrc/tutorial/services/idp_s_1/idp_s_1.xml
new file mode 100644
index 0000000..bd50a49
--- /dev/null
+++ b/binsrc/tutorial/services/idp_s_1/idp_s_1.xml
@@ -0,0 +1,43 @@
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="IdP-S-1">
+  <refmeta>
+    <refentrytitle>WebID Identity Provider (IdP)</refentrytitle>
+    <refmiscinfo>tutorial</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>Checking if WebID and specific Public Key are in a relation</refname>
+    <refpurpose>Checking WebID</refpurpose>
+  </refnamediv>
+
+<refsect1 id="IdP-S-1">
+<title>Example</title>
+<itemizedlist mark="bullet">
+  <listitem>The service is an alternative to using SPARQL queries via the SPARQL protocol against Virtuoso endpoints re. WebID verification i.e., lookup a profile graph to see if WebID and specific Public Key are in a relation.</listitem>
+  <listitem>The webid_demo.vsp is a vsp page which implements WebID checking.</listitem>
+  <listitem>The webid_demo.php is a PHP page which implements WebID checking.</listitem>
+  <listitem>The webid_demo.html is a HTML (JS) page which implements WebID checking.</listitem>
+</itemizedlist> 
+</refsect1>
+</refentry>
diff --git a/binsrc/tutorial/services/idp_s_1/options.xml b/binsrc/tutorial/services/idp_s_1/options.xml
new file mode 100644
index 0000000..443d725
--- /dev/null
+++ b/binsrc/tutorial/services/idp_s_1/options.xml
@@ -0,0 +1,26 @@
+<!--
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<init>
+  <deps item="php" example="" type="hosting" />
+  <http_threads val="2" />
+</init>
diff --git a/binsrc/tutorial/services/idp_s_1/webid_demo.html b/binsrc/tutorial/services/idp_s_1/webid_demo.html
new file mode 100644
index 0000000..783afa1
--- /dev/null
+++ b/binsrc/tutorial/services/idp_s_1/webid_demo.html
@@ -0,0 +1,100 @@
+<html>
+  <head>
+    <title>WebID Verification Demo - HTML, JS</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+    </style>
+    <script type="text/javascript">
+      function check() {
+        if (document.location.protocol != 'https:') {
+          alert('Please use https protocol');
+          return;
+        }
+
+        var callback = document.location.protocol + '//' + document.location.host + document.location.pathname;
+        document.location = 'https://id.myopenlink.net/ods/webid_verify.vsp?callback=' + encodeURIComponent(callback);
+      }
+      function getObject(id) {
+        return document.getElementById(id)
+      }
+      function hide(id) {
+        var obj = getObject(id);
+        obj.style.display = "none";
+      }
+      function show(id) {
+        var obj = getObject(id);
+        obj.style.display = "";
+      }
+      function getParam(name)
+      {
+        name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+        var regexS = "[\\?&]"+name+"=([^&#]*)";
+        var regex = new RegExp( regexS );
+        var results = regex.exec( window.location.href );
+        if( results == null )
+          return "";
+        else
+          return decodeURIComponent(results[1]);
+      }
+    </script>
+  </head>
+  <body>
+    <h1>WebID Verification Demo - HTML, JS</h1>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <input type="button" name="go" value="Check" id="go" onclick="javascript: return check();" />
+    </div>
+    <div id="result" style="display: none;">
+    	The return values are:
+	    <ul id="result_webid" style="display: none;">
+	      <li>WebID -  <span id="webid"></span></li>
+	      <li>Timestamp in ISO 8601 format - <span id="ts"></span></li>
+	    </ul>
+	    <ul id="result_error" style="display: none;">
+	      <li>Error - <span id="error"></span></li>
+	    </ul>
+    </div>
+    <script type="text/javascript">
+      var webid = getParam('webid');
+      var error = getParam('error');
+      if ((webid != '') || (error != '')) {
+        show('result');
+        if (webid != '') {
+          show('result_webid');
+          getObject('webid').innerHTML = getParam('webid');;
+          getObject('ts').innerHTML = getParam('ts');;
+        } else {
+          hide('result_webid');
+        }
+        if (error != '') {
+          show('result_error');
+          getObject('error').innerHTML = getParam('error');;
+        } else {
+          hide('result_error');
+        }
+      } else {
+        hide('result');
+      }
+    </script>
+  </body>
+</html>
diff --git a/binsrc/tutorial/services/idp_s_1/webid_demo.php b/binsrc/tutorial/services/idp_s_1/webid_demo.php
new file mode 100644
index 0000000..41fd68e
--- /dev/null
+++ b/binsrc/tutorial/services/idp_s_1/webid_demo.php
@@ -0,0 +1,93 @@
+<?php
+  function apiURL()
+  {
+    $pageURL = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
+    $pageURL .= $_SERVER['SERVER_PORT'] <> '80' ? $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] : $_SERVER['SERVER_NAME'];
+    return $pageURL . '/tutorial/webid/webid_demo.php';
+  }
+
+	$_webid = isset ($_REQUEST['webid']) ? $_REQUEST['webid'] : '';
+	$_error = isset ($_REQUEST['error']) ? $_REQUEST['error'] : '';
+	$_action = isset ($_REQUEST['go']) ? $_REQUEST['go'] : '';
+  if (($_webid == '') && ($_error == ''))
+  {
+    if ($_action <> '')
+    {
+      if ($_SERVER['HTTPS'] <> 'on')
+      {
+        $_error = 'No certificate';
+      }
+      else
+      {
+        $_callback = apiURL();
+        $_url = sprintf ('https://id.myopenlink.net/ods/webid_verify.vsp?callback=%s', urlencode($_callback));
+        header (sprintf ('Location: %s', $_url));
+        return;
+      }
+    }
+  }
+?>
+<html>
+  <head>
+    <title>WebID Verification Demo - PHP</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Demo - PHP</h1>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+        <input type="submit" name="go" value="Check"/>
+      </form>
+    </div>
+    <?php
+      if (($_webid <> '') || ($_error <> ''))
+      {
+    ?>
+      <div>
+      	The return values are:
+  	    <ul>
+          <?php
+            if ($_webid <> '')
+            {
+          ?>
+  	      <li>WebID -  <?php print ($_webid); ?></li>
+  	      <li>Timestamp in ISO 8601 format - <?php print ($_REQUEST['ts']); ?></li>
+          <?php
+            }
+            if ($_error <> '')
+            {
+          ?>
+  	      <li>Error - <?php print ($_error); ?></li>
+          <?php
+            }
+          ?>
+  	    </ul>
+      </div>
+    <?php
+      }
+    ?>
+  </body>
+</html>
diff --git a/binsrc/tutorial/services/idp_s_1/webid_demo.vsp b/binsrc/tutorial/services/idp_s_1/webid_demo.vsp
new file mode 100644
index 0000000..04633e1
--- /dev/null
+++ b/binsrc/tutorial/services/idp_s_1/webid_demo.vsp
@@ -0,0 +1,105 @@
+<?vsp
+  declare webid, error, action, hostUrl, url, callback, certificate any;
+
+	webid := get_keyword ('webid', params);
+	error := get_keyword ('error', params);
+	action := get_keyword ('go', params);
+  if (length (webid) or length (error))
+    goto html;
+
+  if (not length (action))
+    goto html;
+
+  if (not is_http_ctx ())
+  {
+    error := 'No certificate';
+    goto html;
+  }
+
+  hostUrl := http_request_header (http_request_header () , 'Host' , null , sys_connected_server_address ());
+  if (isstring (hostUrl) and strchr (hostUrl , ':') is null)
+  {
+    declare hp varchar;
+    declare hpa any;
+
+    hp := sys_connected_server_address ();
+    hpa := split_and_decode (hp , 0 , '\0\0:');
+    if (hpa [1] <> '80')
+      hostUrl := hostUrl || ':' || hpa [1];
+  }
+  if (hostUrl not like 'https://%')
+    hostUrl := 'https://' || hostUrl;
+
+  certificate := client_attr ('client_certificate');
+  callback := hostUrl || '/tutorial/webid/webid_demo.vsp';
+  url := sprintf ('http://id.myopenlink.net/ods/webid_verify.vsp?callback=%U&certificate=%U', callback, certificate);
+  http_status_set (302);
+  http_header (sprintf ('Location: %s\r\n', url));
+  return;
+
+html:
+?>
+<html>
+  <head>
+    <title>WebID Verification Demo - VSP</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Demo - VSP</h1>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+        <input type="submit" name="go" value="Check"/>
+      </form>
+    </div>
+    <?vsp
+      if (length (webid) or length (error))
+      {
+    ?>
+      <div>
+      	The return values are:
+  	    <ul>
+          <?vsp
+            if (length (webid))
+            {
+          ?>
+  	      <li>WebID -  <?V webid ?></li>
+  	      <li>Timestamp in ISO 8601 format - <?V get_keyword ('ts', params) ?></li>
+          <?vsp
+            }
+            if (length (error))
+            {
+          ?>
+  	      <li>Error - <?V error ?></li>
+          <?vsp
+            }
+          ?>
+  	    </ul>
+      </div>
+    <?vsp
+      }
+    ?>
+  </body>
+</html>
diff --git a/binsrc/tutorial/services/index.xml b/binsrc/tutorial/services/index.xml
index 41ab568..648da36 100644
--- a/binsrc/tutorial/services/index.xml
+++ b/binsrc/tutorial/services/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/raw.xsl b/binsrc/tutorial/services/raw.xsl
index 349f039..de6f99a 100644
--- a/binsrc/tutorial/services/raw.xsl
+++ b/binsrc/tutorial/services/raw.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: raw.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: raw.xsl,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rm_s_1/rm_s_1.sql b/binsrc/tutorial/services/rm_s_1/rm_s_1.sql
index f53d0a9..7fe08f5 100644
--- a/binsrc/tutorial/services/rm_s_1/rm_s_1.sql
+++ b/binsrc/tutorial/services/rm_s_1/rm_s_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: rm_s_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: rm_s_1.sql,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rm_s_1/rm_s_1.xml b/binsrc/tutorial/services/rm_s_1/rm_s_1.xml
index 2a7c716..b0bbf59 100644
--- a/binsrc/tutorial/services/rm_s_1/rm_s_1.xml
+++ b/binsrc/tutorial/services/rm_s_1/rm_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rm_s_1/rmcli.vsp b/binsrc/tutorial/services/rm_s_1/rmcli.vsp
index ba5241c..0881758 100644
--- a/binsrc/tutorial/services/rm_s_1/rmcli.vsp
+++ b/binsrc/tutorial/services/rm_s_1/rmcli.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: rmcli.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: rmcli.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rm_s_1/rmcli_sec.vsp b/binsrc/tutorial/services/rm_s_1/rmcli_sec.vsp
index 22e2e80..7b08dce 100644
--- a/binsrc/tutorial/services/rm_s_1/rmcli_sec.vsp
+++ b/binsrc/tutorial/services/rm_s_1/rmcli_sec.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: rmcli_sec.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: rmcli_sec.vsp,v 1.2.2.1 2012/03/08 12:55:13 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rn_s_1/options.xml b/binsrc/tutorial/services/rn_s_1/options.xml
index ea355c6..49bfe1e 100644
--- a/binsrc/tutorial/services/rn_s_1/options.xml
+++ b/binsrc/tutorial/services/rn_s_1/options.xml
@@ -1,11 +1,11 @@
 <!--
  -  
- -  $Id: options.xml,v 1.1 2006/10/11 07:52:08 source Exp $
+ -  $Id: options.xml,v 1.1.2.1 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rn_s_1/res.vsp b/binsrc/tutorial/services/rn_s_1/res.vsp
index 32c90d1..172b84e 100644
--- a/binsrc/tutorial/services/rn_s_1/res.vsp
+++ b/binsrc/tutorial/services/rn_s_1/res.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: res.vsp,v 1.1 2006/10/11 07:52:08 source Exp $
+--  $Id: res.vsp,v 1.1.2.1 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rn_s_1/rn_s_1.xml b/binsrc/tutorial/services/rn_s_1/rn_s_1.xml
index f5044b3..4912a9b 100644
--- a/binsrc/tutorial/services/rn_s_1/rn_s_1.xml
+++ b/binsrc/tutorial/services/rn_s_1/rn_s_1.xml
@@ -1,11 +1,11 @@
 <!--
  -  
- -  $Id: rn_s_1.xml,v 1.1 2006/10/11 07:52:08 source Exp $
+ -  $Id: rn_s_1.xml,v 1.1.2.1 2012/03/08 12:55:13 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rn_s_1/rn_s_1_run.vsp b/binsrc/tutorial/services/rn_s_1/rn_s_1_run.vsp
index 7b6ae8c..c83637a 100644
--- a/binsrc/tutorial/services/rn_s_1/rn_s_1_run.vsp
+++ b/binsrc/tutorial/services/rn_s_1/rn_s_1_run.vsp
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <?vsp
 --
---  $Id: rn_s_1_run.vsp,v 1.1 2006/10/11 07:52:08 source Exp $
+--  $Id: rn_s_1_run.vsp,v 1.1.2.1 2012/03/08 12:55:13 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_1/RoutingClient.cs b/binsrc/tutorial/services/rp_s_1/RoutingClient.cs
index 745fe6d..d1555c9 100644
--- a/binsrc/tutorial/services/rp_s_1/RoutingClient.cs
+++ b/binsrc/tutorial/services/rp_s_1/RoutingClient.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_1/options.xml b/binsrc/tutorial/services/rp_s_1/options.xml
index fe5c9bd..aea8d0a 100644
--- a/binsrc/tutorial/services/rp_s_1/options.xml
+++ b/binsrc/tutorial/services/rp_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_1/rp_s_1.xml b/binsrc/tutorial/services/rp_s_1/rp_s_1.xml
index 4157d7f..f2c768c 100644
--- a/binsrc/tutorial/services/rp_s_1/rp_s_1.xml
+++ b/binsrc/tutorial/services/rp_s_1/rp_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_1/wsrp.vsp b/binsrc/tutorial/services/rp_s_1/wsrp.vsp
index 2fb5f41..2401e3f 100644
--- a/binsrc/tutorial/services/rp_s_1/wsrp.vsp
+++ b/binsrc/tutorial/services/rp_s_1/wsrp.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wsrp.vsp,v 1.3 2008/04/25 15:08:01 source Exp $
+--  $Id: wsrp.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_1/wsrp_setup.sql b/binsrc/tutorial/services/rp_s_1/wsrp_setup.sql
index f746af6..9da714d 100644
--- a/binsrc/tutorial/services/rp_s_1/wsrp_setup.sql
+++ b/binsrc/tutorial/services/rp_s_1/wsrp_setup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wsrp_setup.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: wsrp_setup.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_1/wsrptargets.vsp b/binsrc/tutorial/services/rp_s_1/wsrptargets.vsp
index fcd8bd6..b5405d2 100644
--- a/binsrc/tutorial/services/rp_s_1/wsrptargets.vsp
+++ b/binsrc/tutorial/services/rp_s_1/wsrptargets.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wsrptargets.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: wsrptargets.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_2/options.xml b/binsrc/tutorial/services/rp_s_2/options.xml
index a493438..76308fe 100644
--- a/binsrc/tutorial/services/rp_s_2/options.xml
+++ b/binsrc/tutorial/services/rp_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_2/rp_s_2.xml b/binsrc/tutorial/services/rp_s_2/rp_s_2.xml
index c940d58..2928969 100644
--- a/binsrc/tutorial/services/rp_s_2/rp_s_2.xml
+++ b/binsrc/tutorial/services/rp_s_2/rp_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/rp_s_2/wsrf.vsp b/binsrc/tutorial/services/rp_s_2/wsrf.vsp
index 3d907b9..a772dc4 100644
--- a/binsrc/tutorial/services/rp_s_2/wsrf.vsp
+++ b/binsrc/tutorial/services/rp_s_2/wsrf.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wsrf.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: wsrf.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_1/options.xml b/binsrc/tutorial/services/so_s_1/options.xml
index 93ee337..27f7625 100644
--- a/binsrc/tutorial/services/so_s_1/options.xml
+++ b/binsrc/tutorial/services/so_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_1/so_s_1.sql b/binsrc/tutorial/services/so_s_1/so_s_1.sql
index da0a9a5..57fe575 100644
--- a/binsrc/tutorial/services/so_s_1/so_s_1.sql
+++ b/binsrc/tutorial/services/so_s_1/so_s_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_1.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: so_s_1.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_1/so_s_1.xml b/binsrc/tutorial/services/so_s_1/so_s_1.xml
index 5362790..7ebe6e0 100644
--- a/binsrc/tutorial/services/so_s_1/so_s_1.xml
+++ b/binsrc/tutorial/services/so_s_1/so_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_1/so_s_1_sample_1.vsp b/binsrc/tutorial/services/so_s_1/so_s_1_sample_1.vsp
index 7a91811..bf27770 100644
--- a/binsrc/tutorial/services/so_s_1/so_s_1_sample_1.vsp
+++ b/binsrc/tutorial/services/so_s_1/so_s_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_1_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_10/get_NasdaqQuotes.html b/binsrc/tutorial/services/so_s_10/get_NasdaqQuotes.html
index 32c88a3..6a42660 100644
--- a/binsrc/tutorial/services/so_s_10/get_NasdaqQuotes.html
+++ b/binsrc/tutorial/services/so_s_10/get_NasdaqQuotes.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_10/options.xml b/binsrc/tutorial/services/so_s_10/options.xml
index aad1b45..efa2446 100644
--- a/binsrc/tutorial/services/so_s_10/options.xml
+++ b/binsrc/tutorial/services/so_s_10/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_10/so_s_10.sql b/binsrc/tutorial/services/so_s_10/so_s_10.sql
index 7898e9e..501a7d0 100644
--- a/binsrc/tutorial/services/so_s_10/so_s_10.sql
+++ b/binsrc/tutorial/services/so_s_10/so_s_10.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_10.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: so_s_10.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_10/so_s_10.xml b/binsrc/tutorial/services/so_s_10/so_s_10.xml
index 5d0ece0..8cbb7bd 100644
--- a/binsrc/tutorial/services/so_s_10/so_s_10.xml
+++ b/binsrc/tutorial/services/so_s_10/so_s_10.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_10/sr.xsl b/binsrc/tutorial/services/so_s_10/sr.xsl
index c2d4c28..4692292 100644
--- a/binsrc/tutorial/services/so_s_10/sr.xsl
+++ b/binsrc/tutorial/services/so_s_10/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/array2d.xsd b/binsrc/tutorial/services/so_s_11/array2d.xsd
index 366b7f4..635999b 100644
--- a/binsrc/tutorial/services/so_s_11/array2d.xsd
+++ b/binsrc/tutorial/services/so_s_11/array2d.xsd
@@ -9,7 +9,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/array_div.xsd b/binsrc/tutorial/services/so_s_11/array_div.xsd
index c31d6f6..b9f6b44 100644
--- a/binsrc/tutorial/services/so_s_11/array_div.xsd
+++ b/binsrc/tutorial/services/so_s_11/array_div.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/division.xsd b/binsrc/tutorial/services/so_s_11/division.xsd
index 4aad55d..87933df 100644
--- a/binsrc/tutorial/services/so_s_11/division.xsd
+++ b/binsrc/tutorial/services/so_s_11/division.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/factbook.xml b/binsrc/tutorial/services/so_s_11/factbook.xml
index 8303a92..cecfa11 100644
--- a/binsrc/tutorial/services/so_s_11/factbook.xml
+++ b/binsrc/tutorial/services/so_s_11/factbook.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/moz.xsl b/binsrc/tutorial/services/so_s_11/moz.xsl
index c548ded..07f9ab4 100644
--- a/binsrc/tutorial/services/so_s_11/moz.xsl
+++ b/binsrc/tutorial/services/so_s_11/moz.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: moz.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: moz.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/options.xml b/binsrc/tutorial/services/so_s_11/options.xml
index e5fbc3f..64677f2 100644
--- a/binsrc/tutorial/services/so_s_11/options.xml
+++ b/binsrc/tutorial/services/so_s_11/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/provinces.xsd b/binsrc/tutorial/services/so_s_11/provinces.xsd
index 5425591..adafa63 100644
--- a/binsrc/tutorial/services/so_s_11/provinces.xsd
+++ b/binsrc/tutorial/services/so_s_11/provinces.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/provinces_ajax.html b/binsrc/tutorial/services/so_s_11/provinces_ajax.html
index ac8936a..e7bff8a 100644
--- a/binsrc/tutorial/services/so_s_11/provinces_ajax.html
+++ b/binsrc/tutorial/services/so_s_11/provinces_ajax.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/raw.xsl b/binsrc/tutorial/services/so_s_11/raw.xsl
index fbd6346..d853250 100644
--- a/binsrc/tutorial/services/so_s_11/raw.xsl
+++ b/binsrc/tutorial/services/so_s_11/raw.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: raw.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: raw.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/so_s_11.sql b/binsrc/tutorial/services/so_s_11/so_s_11.sql
index 2e1ff69..06d0d9c 100644
--- a/binsrc/tutorial/services/so_s_11/so_s_11.sql
+++ b/binsrc/tutorial/services/so_s_11/so_s_11.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_11.sql,v 1.3 2006/08/16 07:58:12 source Exp $
+--  $Id: so_s_11.sql,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/so_s_11.xml b/binsrc/tutorial/services/so_s_11/so_s_11.xml
index b4d7fdc..3f3cd94 100644
--- a/binsrc/tutorial/services/so_s_11/so_s_11.xml
+++ b/binsrc/tutorial/services/so_s_11/so_s_11.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/so_s_11_array_client.vsp b/binsrc/tutorial/services/so_s_11/so_s_11_array_client.vsp
index acc5118..bb99c1e 100644
--- a/binsrc/tutorial/services/so_s_11/so_s_11_array_client.vsp
+++ b/binsrc/tutorial/services/so_s_11/so_s_11_array_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_11_array_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_11_array_client.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/so_s_11_client.vsp b/binsrc/tutorial/services/so_s_11/so_s_11_client.vsp
index f6cd318..78d9308 100644
--- a/binsrc/tutorial/services/so_s_11/so_s_11_client.vsp
+++ b/binsrc/tutorial/services/so_s_11/so_s_11_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_11_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_11_client.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/sr.xsl b/binsrc/tutorial/services/so_s_11/sr.xsl
index 34908a6..eae3378 100644
--- a/binsrc/tutorial/services/so_s_11/sr.xsl
+++ b/binsrc/tutorial/services/so_s_11/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_11/sr2d.xsl b/binsrc/tutorial/services/so_s_11/sr2d.xsl
index 18758e5..4869dc1 100644
--- a/binsrc/tutorial/services/so_s_11/sr2d.xsl
+++ b/binsrc/tutorial/services/so_s_11/sr2d.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr2d.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr2d.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_12/administrative_divisions.html b/binsrc/tutorial/services/so_s_12/administrative_divisions.html
index 2f4c6bc..975a090 100644
--- a/binsrc/tutorial/services/so_s_12/administrative_divisions.html
+++ b/binsrc/tutorial/services/so_s_12/administrative_divisions.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_12/administrative_divisions_ch.html b/binsrc/tutorial/services/so_s_12/administrative_divisions_ch.html
index 32a81f4..411ee81 100644
--- a/binsrc/tutorial/services/so_s_12/administrative_divisions_ch.html
+++ b/binsrc/tutorial/services/so_s_12/administrative_divisions_ch.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_12/options.xml b/binsrc/tutorial/services/so_s_12/options.xml
index 74ec062..21427e2 100644
--- a/binsrc/tutorial/services/so_s_12/options.xml
+++ b/binsrc/tutorial/services/so_s_12/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_12/so_s_12.xml b/binsrc/tutorial/services/so_s_12/so_s_12.xml
index 16f1cf6..0eb09fb 100644
--- a/binsrc/tutorial/services/so_s_12/so_s_12.xml
+++ b/binsrc/tutorial/services/so_s_12/so_s_12.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_12/sr.xsl b/binsrc/tutorial/services/so_s_12/sr.xsl
index ecb6bd4..dcca43b 100644
--- a/binsrc/tutorial/services/so_s_12/sr.xsl
+++ b/binsrc/tutorial/services/so_s_12/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_13/options.xml b/binsrc/tutorial/services/so_s_13/options.xml
index 15dc7f9..f3d057d 100644
--- a/binsrc/tutorial/services/so_s_13/options.xml
+++ b/binsrc/tutorial/services/so_s_13/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_13/so_s_13.sql b/binsrc/tutorial/services/so_s_13/so_s_13.sql
index 7a71977..f3ebd04 100644
--- a/binsrc/tutorial/services/so_s_13/so_s_13.sql
+++ b/binsrc/tutorial/services/so_s_13/so_s_13.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_13.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: so_s_13.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_13/so_s_13.xml b/binsrc/tutorial/services/so_s_13/so_s_13.xml
index aecc23d..6dcc90f 100644
--- a/binsrc/tutorial/services/so_s_13/so_s_13.xml
+++ b/binsrc/tutorial/services/so_s_13/so_s_13.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_13/so_s_13_secure_SOAP_client.vsp b/binsrc/tutorial/services/so_s_13/so_s_13_secure_SOAP_client.vsp
index 0b14ce1..327996f 100644
--- a/binsrc/tutorial/services/so_s_13/so_s_13_secure_SOAP_client.vsp
+++ b/binsrc/tutorial/services/so_s_13/so_s_13_secure_SOAP_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_13_secure_SOAP_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_13_secure_SOAP_client.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_13/sr.xsl b/binsrc/tutorial/services/so_s_13/sr.xsl
index e994fb0..a5c7371 100644
--- a/binsrc/tutorial/services/so_s_13/sr.xsl
+++ b/binsrc/tutorial/services/so_s_13/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/ms.sql b/binsrc/tutorial/services/so_s_14/ms.sql
index 68e015a..047f339 100644
--- a/binsrc/tutorial/services/so_s_14/ms.sql
+++ b/binsrc/tutorial/services/so_s_14/ms.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ms.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ms.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/ms.xsl b/binsrc/tutorial/services/so_s_14/ms.xsl
index 884bb48..290c31d 100644
--- a/binsrc/tutorial/services/so_s_14/ms.xsl
+++ b/binsrc/tutorial/services/so_s_14/ms.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: ms.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ms.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/options.xml b/binsrc/tutorial/services/so_s_14/options.xml
index 4ba92e6..65f0ac7 100644
--- a/binsrc/tutorial/services/so_s_14/options.xml
+++ b/binsrc/tutorial/services/so_s_14/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/ora.sql b/binsrc/tutorial/services/so_s_14/ora.sql
index dacee76..7c86ec9 100644
--- a/binsrc/tutorial/services/so_s_14/ora.sql
+++ b/binsrc/tutorial/services/so_s_14/ora.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ora.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: ora.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/ora.xsl b/binsrc/tutorial/services/so_s_14/ora.xsl
index 723b964..c2903e1 100644
--- a/binsrc/tutorial/services/so_s_14/ora.xsl
+++ b/binsrc/tutorial/services/so_s_14/ora.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: ora.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ora.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/so_s_14.sql b/binsrc/tutorial/services/so_s_14/so_s_14.sql
index f98b3b3..29fbe45 100644
--- a/binsrc/tutorial/services/so_s_14/so_s_14.sql
+++ b/binsrc/tutorial/services/so_s_14/so_s_14.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_14.sql,v 1.3 2006/08/16 07:58:12 source Exp $
+--  $Id: so_s_14.sql,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/so_s_14.xml b/binsrc/tutorial/services/so_s_14/so_s_14.xml
index e0eb9de..652f49c 100644
--- a/binsrc/tutorial/services/so_s_14/so_s_14.xml
+++ b/binsrc/tutorial/services/so_s_14/so_s_14.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/so_s_14_ms_client.vsp b/binsrc/tutorial/services/so_s_14/so_s_14_ms_client.vsp
index 7145658..b9998fe 100644
--- a/binsrc/tutorial/services/so_s_14/so_s_14_ms_client.vsp
+++ b/binsrc/tutorial/services/so_s_14/so_s_14_ms_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_14_ms_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_14_ms_client.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_14/so_s_14_ora_client.vsp b/binsrc/tutorial/services/so_s_14/so_s_14_ora_client.vsp
index aa55bfe..5881c05 100644
--- a/binsrc/tutorial/services/so_s_14/so_s_14_ora_client.vsp
+++ b/binsrc/tutorial/services/so_s_14/so_s_14_ora_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_14_ora_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_14_ora_client.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/conversion.vsp b/binsrc/tutorial/services/so_s_15/conversion.vsp
index d9cfd54..aa8dd87 100644
--- a/binsrc/tutorial/services/so_s_15/conversion.vsp
+++ b/binsrc/tutorial/services/so_s_15/conversion.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: conversion.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: conversion.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/converted_value.xsl b/binsrc/tutorial/services/so_s_15/converted_value.xsl
index f217cb9..89769b8 100644
--- a/binsrc/tutorial/services/so_s_15/converted_value.xsl
+++ b/binsrc/tutorial/services/so_s_15/converted_value.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: converted_value.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: converted_value.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/converted_value_ajax.xsl b/binsrc/tutorial/services/so_s_15/converted_value_ajax.xsl
index f03a29a..552293a 100644
--- a/binsrc/tutorial/services/so_s_15/converted_value_ajax.xsl
+++ b/binsrc/tutorial/services/so_s_15/converted_value_ajax.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: converted_value_ajax.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: converted_value_ajax.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/currency_list.vsp b/binsrc/tutorial/services/so_s_15/currency_list.vsp
index 38dbb27..15332dc 100644
--- a/binsrc/tutorial/services/so_s_15/currency_list.vsp
+++ b/binsrc/tutorial/services/so_s_15/currency_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: currency_list.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: currency_list.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/currency_list.xsl b/binsrc/tutorial/services/so_s_15/currency_list.xsl
index a7fda90..81aa991 100644
--- a/binsrc/tutorial/services/so_s_15/currency_list.xsl
+++ b/binsrc/tutorial/services/so_s_15/currency_list.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?> 
 <!--
  -  
- -  $Id: currency_list.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: currency_list.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/currency_list_ajax.xsl b/binsrc/tutorial/services/so_s_15/currency_list_ajax.xsl
index 5a2182e..5999cf2 100644
--- a/binsrc/tutorial/services/so_s_15/currency_list_ajax.xsl
+++ b/binsrc/tutorial/services/so_s_15/currency_list_ajax.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: currency_list_ajax.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: currency_list_ajax.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/exchange.sql b/binsrc/tutorial/services/so_s_15/exchange.sql
index 46428ae..6c3eef5 100644
--- a/binsrc/tutorial/services/so_s_15/exchange.sql
+++ b/binsrc/tutorial/services/so_s_15/exchange.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: exchange.sql,v 1.3 2006/08/16 07:58:12 source Exp $
+--  $Id: exchange.sql,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/exchange_rates.vsp b/binsrc/tutorial/services/so_s_15/exchange_rates.vsp
index 8d8c08d..fb80eca 100644
--- a/binsrc/tutorial/services/so_s_15/exchange_rates.vsp
+++ b/binsrc/tutorial/services/so_s_15/exchange_rates.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: exchange_rates.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: exchange_rates.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/exchange_rates_ajax.html b/binsrc/tutorial/services/so_s_15/exchange_rates_ajax.html
index a8789e6..771a3c4 100644
--- a/binsrc/tutorial/services/so_s_15/exchange_rates_ajax.html
+++ b/binsrc/tutorial/services/so_s_15/exchange_rates_ajax.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/options.xml b/binsrc/tutorial/services/so_s_15/options.xml
index 84ffeda..bf937f3 100644
--- a/binsrc/tutorial/services/so_s_15/options.xml
+++ b/binsrc/tutorial/services/so_s_15/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_15/so_s_15.xml b/binsrc/tutorial/services/so_s_15/so_s_15.xml
index c083722..23656e8 100644
--- a/binsrc/tutorial/services/so_s_15/so_s_15.xml
+++ b/binsrc/tutorial/services/so_s_15/so_s_15.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_16/options.xml b/binsrc/tutorial/services/so_s_16/options.xml
index dad3c99..1ef0678 100644
--- a/binsrc/tutorial/services/so_s_16/options.xml
+++ b/binsrc/tutorial/services/so_s_16/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_16/registration.html b/binsrc/tutorial/services/so_s_16/registration.html
index 3cf2eac..ba8dffe 100644
--- a/binsrc/tutorial/services/so_s_16/registration.html
+++ b/binsrc/tutorial/services/so_s_16/registration.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_16/so_s_16.xml b/binsrc/tutorial/services/so_s_16/so_s_16.xml
index f3ea10c..583dcd0 100644
--- a/binsrc/tutorial/services/so_s_16/so_s_16.xml
+++ b/binsrc/tutorial/services/so_s_16/so_s_16.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_17/mail_validate.html b/binsrc/tutorial/services/so_s_17/mail_validate.html
index 59fb87f..67e7d9b 100644
--- a/binsrc/tutorial/services/so_s_17/mail_validate.html
+++ b/binsrc/tutorial/services/so_s_17/mail_validate.html
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_17/mail_validate.xsl b/binsrc/tutorial/services/so_s_17/mail_validate.xsl
index f6f8faf..43d6cd1 100644
--- a/binsrc/tutorial/services/so_s_17/mail_validate.xsl
+++ b/binsrc/tutorial/services/so_s_17/mail_validate.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: mail_validate.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: mail_validate.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_17/options.xml b/binsrc/tutorial/services/so_s_17/options.xml
index 4519811..8708cc7 100644
--- a/binsrc/tutorial/services/so_s_17/options.xml
+++ b/binsrc/tutorial/services/so_s_17/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_17/so_s_17.sql b/binsrc/tutorial/services/so_s_17/so_s_17.sql
index 9cb1791..dfcd38e 100644
--- a/binsrc/tutorial/services/so_s_17/so_s_17.sql
+++ b/binsrc/tutorial/services/so_s_17/so_s_17.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_17.sql,v 1.3 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_17.sql,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_17/so_s_17.xml b/binsrc/tutorial/services/so_s_17/so_s_17.xml
index 90e1fc6..524eb6d 100644
--- a/binsrc/tutorial/services/so_s_17/so_s_17.xml
+++ b/binsrc/tutorial/services/so_s_17/so_s_17.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_18/options.xml b/binsrc/tutorial/services/so_s_18/options.xml
index 78a4c5a..15170cd 100644
--- a/binsrc/tutorial/services/so_s_18/options.xml
+++ b/binsrc/tutorial/services/so_s_18/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_18/so_s_18.xml b/binsrc/tutorial/services/so_s_18/so_s_18.xml
index 1fb674d..56ba2ec 100644
--- a/binsrc/tutorial/services/so_s_18/so_s_18.xml
+++ b/binsrc/tutorial/services/so_s_18/so_s_18.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_18/wsdl_import.sql b/binsrc/tutorial/services/so_s_18/wsdl_import.sql
index fee8efc..f5741ba 100644
--- a/binsrc/tutorial/services/so_s_18/wsdl_import.sql
+++ b/binsrc/tutorial/services/so_s_18/wsdl_import.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wsdl_import.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: wsdl_import.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_18/wsdl_import.vsp b/binsrc/tutorial/services/so_s_18/wsdl_import.vsp
index 0083e0c..d71d27b 100644
--- a/binsrc/tutorial/services/so_s_18/wsdl_import.vsp
+++ b/binsrc/tutorial/services/so_s_18/wsdl_import.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wsdl_import.vsp,v 1.3 2008/04/10 09:37:04 source Exp $
+--  $Id: wsdl_import.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_19/array4d.xsd b/binsrc/tutorial/services/so_s_19/array4d.xsd
index d9cba65..c32df8c 100644
--- a/binsrc/tutorial/services/so_s_19/array4d.xsd
+++ b/binsrc/tutorial/services/so_s_19/array4d.xsd
@@ -9,7 +9,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_19/contact.xsl b/binsrc/tutorial/services/so_s_19/contact.xsl
index ab3ad71..bd6b7b8 100644
--- a/binsrc/tutorial/services/so_s_19/contact.xsl
+++ b/binsrc/tutorial/services/so_s_19/contact.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: contact.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: contact.xsl,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_19/contacts.html b/binsrc/tutorial/services/so_s_19/contacts.html
index 986d109..898ad1a 100644
--- a/binsrc/tutorial/services/so_s_19/contacts.html
+++ b/binsrc/tutorial/services/so_s_19/contacts.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_19/contacts.sql b/binsrc/tutorial/services/so_s_19/contacts.sql
index d8b98d6..d158eb7 100644
--- a/binsrc/tutorial/services/so_s_19/contacts.sql
+++ b/binsrc/tutorial/services/so_s_19/contacts.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: contacts.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: contacts.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_19/options.xml b/binsrc/tutorial/services/so_s_19/options.xml
index 4896610..8b8d4c9 100644
--- a/binsrc/tutorial/services/so_s_19/options.xml
+++ b/binsrc/tutorial/services/so_s_19/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_19/so_s_19.xml b/binsrc/tutorial/services/so_s_19/so_s_19.xml
index 258b4f0..97563e6 100644
--- a/binsrc/tutorial/services/so_s_19/so_s_19.xml
+++ b/binsrc/tutorial/services/so_s_19/so_s_19.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_2/options.xml b/binsrc/tutorial/services/so_s_2/options.xml
index 2dcdad8..3a285a2 100644
--- a/binsrc/tutorial/services/so_s_2/options.xml
+++ b/binsrc/tutorial/services/so_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_2/so_s_2.sql b/binsrc/tutorial/services/so_s_2/so_s_2.sql
index 2bfa39b..d553f88 100644
--- a/binsrc/tutorial/services/so_s_2/so_s_2.sql
+++ b/binsrc/tutorial/services/so_s_2/so_s_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_2.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_2/so_s_2.xml b/binsrc/tutorial/services/so_s_2/so_s_2.xml
index 39a6034..7ed42b8 100644
--- a/binsrc/tutorial/services/so_s_2/so_s_2.xml
+++ b/binsrc/tutorial/services/so_s_2/so_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_2/so_s_2_sample_1.vsp b/binsrc/tutorial/services/so_s_2/so_s_2_sample_1.vsp
index 4218ff0..d5d0a23 100644
--- a/binsrc/tutorial/services/so_s_2/so_s_2_sample_1.vsp
+++ b/binsrc/tutorial/services/so_s_2/so_s_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_2_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/Extensibility.vsp b/binsrc/tutorial/services/so_s_20/Extensibility.vsp
index f72ac7e..190462c 100644
--- a/binsrc/tutorial/services/so_s_20/Extensibility.vsp
+++ b/binsrc/tutorial/services/so_s_20/Extensibility.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: Extensibility.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: Extensibility.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/ExtensibilityRequired.vsp b/binsrc/tutorial/services/so_s_20/ExtensibilityRequired.vsp
index dc988f5..d1d9a79 100644
--- a/binsrc/tutorial/services/so_s_20/ExtensibilityRequired.vsp
+++ b/binsrc/tutorial/services/so_s_20/ExtensibilityRequired.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ExtensibilityRequired.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ExtensibilityRequired.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoDocument.vsp b/binsrc/tutorial/services/so_s_20/echoDocument.vsp
index 9c7c648..e9f32c6 100644
--- a/binsrc/tutorial/services/so_s_20/echoDocument.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoDocument.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoDocument.vsp,v 1.4 2008/04/11 09:09:57 source Exp $
+--  $Id: echoDocument.vsp,v 1.4.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoEmployee.vsp b/binsrc/tutorial/services/so_s_20/echoEmployee.vsp
index 75d55c0..172ef67 100644
--- a/binsrc/tutorial/services/so_s_20/echoEmployee.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoEmployee.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoEmployee.vsp,v 1.3 2008/04/11 09:09:57 source Exp $
+--  $Id: echoEmployee.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoPerson.vsp b/binsrc/tutorial/services/so_s_20/echoPerson.vsp
index 6952587..8f11fa4 100644
--- a/binsrc/tutorial/services/so_s_20/echoPerson.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoPerson.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoPerson.vsp,v 1.3 2008/04/11 09:09:57 source Exp $
+--  $Id: echoPerson.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoString.vsp b/binsrc/tutorial/services/so_s_20/echoString.vsp
index 1d6d822..a878cd5 100644
--- a/binsrc/tutorial/services/so_s_20/echoString.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoString.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoString.vsp,v 1.4 2008/04/11 09:09:57 source Exp $
+--  $Id: echoString.vsp,v 1.4.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoStringArray.vsp b/binsrc/tutorial/services/so_s_20/echoStringArray.vsp
index 413b090..c22fa0f 100644
--- a/binsrc/tutorial/services/so_s_20/echoStringArray.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoStringArray.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStringArray.vsp,v 1.6 2008/04/11 09:09:57 source Exp $
+--  $Id: echoStringArray.vsp,v 1.6.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoStruct.vsp b/binsrc/tutorial/services/so_s_20/echoStruct.vsp
index 2254a91..3b9604f 100644
--- a/binsrc/tutorial/services/so_s_20/echoStruct.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoStruct.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStruct.vsp,v 1.3 2008/04/11 09:09:57 source Exp $
+--  $Id: echoStruct.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoStructArray.vsp b/binsrc/tutorial/services/so_s_20/echoStructArray.vsp
index 6eca649..0a1a806 100644
--- a/binsrc/tutorial/services/so_s_20/echoStructArray.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoStructArray.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStructArray.vsp,v 1.3 2008/04/11 09:09:57 source Exp $
+--  $Id: echoStructArray.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/echoStructLit.vsp b/binsrc/tutorial/services/so_s_20/echoStructLit.vsp
index 4e1c544..fcff352 100644
--- a/binsrc/tutorial/services/so_s_20/echoStructLit.vsp
+++ b/binsrc/tutorial/services/so_s_20/echoStructLit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStructLit.vsp,v 1.3 2008/04/11 09:09:57 source Exp $
+--  $Id: echoStructLit.vsp,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/interop3_clients.vsp b/binsrc/tutorial/services/so_s_20/interop3_clients.vsp
index 68c87c6..e504f6c 100644
--- a/binsrc/tutorial/services/so_s_20/interop3_clients.vsp
+++ b/binsrc/tutorial/services/so_s_20/interop3_clients.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop3_clients.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: interop3_clients.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/options.xml b/binsrc/tutorial/services/so_s_20/options.xml
index 37a6dd8..989c845 100644
--- a/binsrc/tutorial/services/so_s_20/options.xml
+++ b/binsrc/tutorial/services/so_s_20/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_20/so_s_20.xml b/binsrc/tutorial/services/so_s_20/so_s_20.xml
index 4a00436..de0d4b2 100644
--- a/binsrc/tutorial/services/so_s_20/so_s_20.xml
+++ b/binsrc/tutorial/services/so_s_20/so_s_20.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_21/google_api.sql b/binsrc/tutorial/services/so_s_21/google_api.sql
index ad7ff73..d8e8b1d 100644
--- a/binsrc/tutorial/services/so_s_21/google_api.sql
+++ b/binsrc/tutorial/services/so_s_21/google_api.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: google_api.sql,v 1.3 2006/08/16 07:58:13 source Exp $
+--  $Id: google_api.sql,v 1.3.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_21/google_api.vsp b/binsrc/tutorial/services/so_s_21/google_api.vsp
index a4d3deb..1922dcd 100644
--- a/binsrc/tutorial/services/so_s_21/google_api.vsp
+++ b/binsrc/tutorial/services/so_s_21/google_api.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: google_api.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: google_api.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_21/options.xml b/binsrc/tutorial/services/so_s_21/options.xml
index 5b08612..1da2431 100644
--- a/binsrc/tutorial/services/so_s_21/options.xml
+++ b/binsrc/tutorial/services/so_s_21/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_21/raw.xsl b/binsrc/tutorial/services/so_s_21/raw.xsl
index 1d66391..2c825d4 100644
--- a/binsrc/tutorial/services/so_s_21/raw.xsl
+++ b/binsrc/tutorial/services/so_s_21/raw.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: raw.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: raw.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_21/so_s_21.xml b/binsrc/tutorial/services/so_s_21/so_s_21.xml
index 7768ad3..a44c303 100644
--- a/binsrc/tutorial/services/so_s_21/so_s_21.xml
+++ b/binsrc/tutorial/services/so_s_21/so_s_21.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_22/options.xml b/binsrc/tutorial/services/so_s_22/options.xml
index b163eae..a81d09c 100644
--- a/binsrc/tutorial/services/so_s_22/options.xml
+++ b/binsrc/tutorial/services/so_s_22/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_22/so_s_22.sql b/binsrc/tutorial/services/so_s_22/so_s_22.sql
index 79e6465..48c476c 100644
--- a/binsrc/tutorial/services/so_s_22/so_s_22.sql
+++ b/binsrc/tutorial/services/so_s_22/so_s_22.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_22.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_22.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_22/so_s_22.xml b/binsrc/tutorial/services/so_s_22/so_s_22.xml
index 84c4c93..765122c 100644
--- a/binsrc/tutorial/services/so_s_22/so_s_22.xml
+++ b/binsrc/tutorial/services/so_s_22/so_s_22.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_22/so_s_22_sample.vsp b/binsrc/tutorial/services/so_s_22/so_s_22_sample.vsp
index f2515d9..ffe5234 100644
--- a/binsrc/tutorial/services/so_s_22/so_s_22_sample.vsp
+++ b/binsrc/tutorial/services/so_s_22/so_s_22_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_22_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_22_sample.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_23/java_pl_wrapper.sql b/binsrc/tutorial/services/so_s_23/java_pl_wrapper.sql
index 502023a..65da5eb 100644
--- a/binsrc/tutorial/services/so_s_23/java_pl_wrapper.sql
+++ b/binsrc/tutorial/services/so_s_23/java_pl_wrapper.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: java_pl_wrapper.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: java_pl_wrapper.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_23/java_server.java b/binsrc/tutorial/services/so_s_23/java_server.java
index 215960f..f89e6cc 100644
--- a/binsrc/tutorial/services/so_s_23/java_server.java
+++ b/binsrc/tutorial/services/so_s_23/java_server.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_23/javavm_pl.xsl b/binsrc/tutorial/services/so_s_23/javavm_pl.xsl
index e1961f2..5fe8232 100644
--- a/binsrc/tutorial/services/so_s_23/javavm_pl.xsl
+++ b/binsrc/tutorial/services/so_s_23/javavm_pl.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: javavm_pl.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: javavm_pl.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_23/javavm_xml.sql b/binsrc/tutorial/services/so_s_23/javavm_xml.sql
index 4575210..7f03c1f 100644
--- a/binsrc/tutorial/services/so_s_23/javavm_xml.sql
+++ b/binsrc/tutorial/services/so_s_23/javavm_xml.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: javavm_xml.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: javavm_xml.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_23/options.xml b/binsrc/tutorial/services/so_s_23/options.xml
index 7c7b972..fc5e355 100644
--- a/binsrc/tutorial/services/so_s_23/options.xml
+++ b/binsrc/tutorial/services/so_s_23/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_23/so_s_23.xml b/binsrc/tutorial/services/so_s_23/so_s_23.xml
index 7d41905..bef44ca 100644
--- a/binsrc/tutorial/services/so_s_23/so_s_23.xml
+++ b/binsrc/tutorial/services/so_s_23/so_s_23.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_24/amazon.html b/binsrc/tutorial/services/so_s_24/amazon.html
index a20d569..2067df0 100644
--- a/binsrc/tutorial/services/so_s_24/amazon.html
+++ b/binsrc/tutorial/services/so_s_24/amazon.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_24/amazon.sql b/binsrc/tutorial/services/so_s_24/amazon.sql
index e43118d..02d5d4f 100644
--- a/binsrc/tutorial/services/so_s_24/amazon.sql
+++ b/binsrc/tutorial/services/so_s_24/amazon.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: amazon.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: amazon.sql,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_24/options.xml b/binsrc/tutorial/services/so_s_24/options.xml
index 2a35826..81a8b58 100644
--- a/binsrc/tutorial/services/so_s_24/options.xml
+++ b/binsrc/tutorial/services/so_s_24/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_24/so_s_24.xml b/binsrc/tutorial/services/so_s_24/so_s_24.xml
index 3e28506..0cb20da 100644
--- a/binsrc/tutorial/services/so_s_24/so_s_24.xml
+++ b/binsrc/tutorial/services/so_s_24/so_s_24.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_24/viewhtml.xsl b/binsrc/tutorial/services/so_s_24/viewhtml.xsl
index f84b7f1..b40e262 100644
--- a/binsrc/tutorial/services/so_s_24/viewhtml.xsl
+++ b/binsrc/tutorial/services/so_s_24/viewhtml.xsl
@@ -1,11 +1,11 @@
 <!--
  -  
- -  $Id: viewhtml.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: viewhtml.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_24/viewraw.xsl b/binsrc/tutorial/services/so_s_24/viewraw.xsl
index ea524f6..ee134d5 100644
--- a/binsrc/tutorial/services/so_s_24/viewraw.xsl
+++ b/binsrc/tutorial/services/so_s_24/viewraw.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: viewraw.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: viewraw.xsl,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/XSD.vsp b/binsrc/tutorial/services/so_s_25/XSD.vsp
index 72fadb8..5eba30a 100644
--- a/binsrc/tutorial/services/so_s_25/XSD.vsp
+++ b/binsrc/tutorial/services/so_s_25/XSD.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: XSD.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: XSD.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/complex-rpc.vsp b/binsrc/tutorial/services/so_s_25/complex-rpc.vsp
index 3041f83..e8a6c3e 100644
--- a/binsrc/tutorial/services/so_s_25/complex-rpc.vsp
+++ b/binsrc/tutorial/services/so_s_25/complex-rpc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: complex-rpc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: complex-rpc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/dime-doc.vsp b/binsrc/tutorial/services/so_s_25/dime-doc.vsp
index e461b30..70c9859 100644
--- a/binsrc/tutorial/services/so_s_25/dime-doc.vsp
+++ b/binsrc/tutorial/services/so_s_25/dime-doc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dime-doc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: dime-doc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/dime-rpc.vsp b/binsrc/tutorial/services/so_s_25/dime-rpc.vsp
index 3446041..098eab1 100644
--- a/binsrc/tutorial/services/so_s_25/dime-rpc.vsp
+++ b/binsrc/tutorial/services/so_s_25/dime-rpc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dime-rpc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: dime-rpc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/mime-doc.vsp b/binsrc/tutorial/services/so_s_25/mime-doc.vsp
index a9ba063..6b6d94d 100644
--- a/binsrc/tutorial/services/so_s_25/mime-doc.vsp
+++ b/binsrc/tutorial/services/so_s_25/mime-doc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: mime-doc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: mime-doc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/mime-rpc.vsp b/binsrc/tutorial/services/so_s_25/mime-rpc.vsp
index 465cf28..b18fa78 100644
--- a/binsrc/tutorial/services/so_s_25/mime-rpc.vsp
+++ b/binsrc/tutorial/services/so_s_25/mime-rpc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: mime-rpc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: mime-rpc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/simple-doc.vsp b/binsrc/tutorial/services/so_s_25/simple-doc.vsp
index 78c23e4..63cf560 100644
--- a/binsrc/tutorial/services/so_s_25/simple-doc.vsp
+++ b/binsrc/tutorial/services/so_s_25/simple-doc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: simple-doc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: simple-doc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/simple-rpc.vsp b/binsrc/tutorial/services/so_s_25/simple-rpc.vsp
index df6b55f..87195ac 100644
--- a/binsrc/tutorial/services/so_s_25/simple-rpc.vsp
+++ b/binsrc/tutorial/services/so_s_25/simple-rpc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: simple-rpc.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: simple-rpc.vsp,v 1.2.2.1 2012/03/08 12:55:14 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_25/so_s_25.xml b/binsrc/tutorial/services/so_s_25/so_s_25.xml
index 41058a4..b279929 100644
--- a/binsrc/tutorial/services/so_s_25/so_s_25.xml
+++ b/binsrc/tutorial/services/so_s_25/so_s_25.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_26/handler.vspx b/binsrc/tutorial/services/so_s_26/handler.vspx
index 3b350aa..20b708e 100644
--- a/binsrc/tutorial/services/so_s_26/handler.vspx
+++ b/binsrc/tutorial/services/so_s_26/handler.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: handler.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: handler.vspx,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_26/options.xml b/binsrc/tutorial/services/so_s_26/options.xml
index 06a549e..269215b 100644
--- a/binsrc/tutorial/services/so_s_26/options.xml
+++ b/binsrc/tutorial/services/so_s_26/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_26/redcoalsms.sql b/binsrc/tutorial/services/so_s_26/redcoalsms.sql
index c73a40a..bfbc658 100644
--- a/binsrc/tutorial/services/so_s_26/redcoalsms.sql
+++ b/binsrc/tutorial/services/so_s_26/redcoalsms.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: redcoalsms.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: redcoalsms.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_26/setup_sms.vspx b/binsrc/tutorial/services/so_s_26/setup_sms.vspx
index fc5ef64..23d9db2 100644
--- a/binsrc/tutorial/services/so_s_26/setup_sms.vspx
+++ b/binsrc/tutorial/services/so_s_26/setup_sms.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: setup_sms.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: setup_sms.vspx,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_26/so_s_26.xml b/binsrc/tutorial/services/so_s_26/so_s_26.xml
index 30cb17b..91f6c2f 100644
--- a/binsrc/tutorial/services/so_s_26/so_s_26.xml
+++ b/binsrc/tutorial/services/so_s_26/so_s_26.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_27/options.xml b/binsrc/tutorial/services/so_s_27/options.xml
index ee60d3f..1fca954 100644
--- a/binsrc/tutorial/services/so_s_27/options.xml
+++ b/binsrc/tutorial/services/so_s_27/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_27/raw.xsl b/binsrc/tutorial/services/so_s_27/raw.xsl
index 5785cd0..2543ab2 100644
--- a/binsrc/tutorial/services/so_s_27/raw.xsl
+++ b/binsrc/tutorial/services/so_s_27/raw.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: raw.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: raw.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_27/so_s_27.xml b/binsrc/tutorial/services/so_s_27/so_s_27.xml
index 214d64f..210101d 100644
--- a/binsrc/tutorial/services/so_s_27/so_s_27.xml
+++ b/binsrc/tutorial/services/so_s_27/so_s_27.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_27/yahoo_geocode.html b/binsrc/tutorial/services/so_s_27/yahoo_geocode.html
index bc5abc6..264944f 100644
--- a/binsrc/tutorial/services/so_s_27/yahoo_geocode.html
+++ b/binsrc/tutorial/services/so_s_27/yahoo_geocode.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_27/yahoo_geocode.sql b/binsrc/tutorial/services/so_s_27/yahoo_geocode.sql
index 9a31bd5..75811a6 100644
--- a/binsrc/tutorial/services/so_s_27/yahoo_geocode.sql
+++ b/binsrc/tutorial/services/so_s_27/yahoo_geocode.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: yahoo_geocode.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: yahoo_geocode.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_28/data_xml.vsp b/binsrc/tutorial/services/so_s_28/data_xml.vsp
index 3a0970a..7b66d58 100644
--- a/binsrc/tutorial/services/so_s_28/data_xml.vsp
+++ b/binsrc/tutorial/services/so_s_28/data_xml.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: data_xml.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: data_xml.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_28/googlemaps.vsp b/binsrc/tutorial/services/so_s_28/googlemaps.vsp
index f20ddf1..f903119 100644
--- a/binsrc/tutorial/services/so_s_28/googlemaps.vsp
+++ b/binsrc/tutorial/services/so_s_28/googlemaps.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: googlemaps.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: googlemaps.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_28/options.xml b/binsrc/tutorial/services/so_s_28/options.xml
index 0e5feab..1eafa7c 100644
--- a/binsrc/tutorial/services/so_s_28/options.xml
+++ b/binsrc/tutorial/services/so_s_28/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_28/so_s_28.sql b/binsrc/tutorial/services/so_s_28/so_s_28.sql
index 47ab8c3..3d6ec73 100644
--- a/binsrc/tutorial/services/so_s_28/so_s_28.sql
+++ b/binsrc/tutorial/services/so_s_28/so_s_28.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_28.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_28.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_28/so_s_28.xml b/binsrc/tutorial/services/so_s_28/so_s_28.xml
index 81adbb8..3f3516c 100644
--- a/binsrc/tutorial/services/so_s_28/so_s_28.xml
+++ b/binsrc/tutorial/services/so_s_28/so_s_28.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_29/options.xml b/binsrc/tutorial/services/so_s_29/options.xml
index 0e5feab..1eafa7c 100644
--- a/binsrc/tutorial/services/so_s_29/options.xml
+++ b/binsrc/tutorial/services/so_s_29/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_29/so_s_29.xml b/binsrc/tutorial/services/so_s_29/so_s_29.xml
index b22f71a..45c3058 100644
--- a/binsrc/tutorial/services/so_s_29/so_s_29.xml
+++ b/binsrc/tutorial/services/so_s_29/so_s_29.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_29/yahoomaps.vsp b/binsrc/tutorial/services/so_s_29/yahoomaps.vsp
index 869effc..02469ac 100644
--- a/binsrc/tutorial/services/so_s_29/yahoomaps.vsp
+++ b/binsrc/tutorial/services/so_s_29/yahoomaps.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: yahoomaps.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: yahoomaps.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_3/options.xml b/binsrc/tutorial/services/so_s_3/options.xml
index 221307b..21b8179 100644
--- a/binsrc/tutorial/services/so_s_3/options.xml
+++ b/binsrc/tutorial/services/so_s_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_3/so_s_3.xml b/binsrc/tutorial/services/so_s_3/so_s_3.xml
index a515705..915d635 100644
--- a/binsrc/tutorial/services/so_s_3/so_s_3.xml
+++ b/binsrc/tutorial/services/so_s_3/so_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_3/so_s_3.xsl b/binsrc/tutorial/services/so_s_3/so_s_3.xsl
index 5b160c0..9d81616 100644
--- a/binsrc/tutorial/services/so_s_3/so_s_3.xsl
+++ b/binsrc/tutorial/services/so_s_3/so_s_3.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: so_s_3.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: so_s_3.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_3/so_s_3_sample_1.vsp b/binsrc/tutorial/services/so_s_3/so_s_3_sample_1.vsp
index 49de24f..8f90ba4 100644
--- a/binsrc/tutorial/services/so_s_3/so_s_3_sample_1.vsp
+++ b/binsrc/tutorial/services/so_s_3/so_s_3_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_3_sample_1.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_3_sample_1.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_3/so_s_3_sample_2.vsp b/binsrc/tutorial/services/so_s_3/so_s_3_sample_2.vsp
index 545d17e..b499de0 100644
--- a/binsrc/tutorial/services/so_s_3/so_s_3_sample_2.vsp
+++ b/binsrc/tutorial/services/so_s_3/so_s_3_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_3_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_3_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_3/so_s_3_sample_3.vsp b/binsrc/tutorial/services/so_s_3/so_s_3_sample_3.vsp
index 8b12631..61f93a2 100644
--- a/binsrc/tutorial/services/so_s_3/so_s_3_sample_3.vsp
+++ b/binsrc/tutorial/services/so_s_3/so_s_3_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_3_sample_3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_3_sample_3.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_30/options.xml b/binsrc/tutorial/services/so_s_30/options.xml
index a42c509..d4248f8 100644
--- a/binsrc/tutorial/services/so_s_30/options.xml
+++ b/binsrc/tutorial/services/so_s_30/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_30/so_s_30.java b/binsrc/tutorial/services/so_s_30/so_s_30.java
index 11e5db2..adc1a6d 100644
--- a/binsrc/tutorial/services/so_s_30/so_s_30.java
+++ b/binsrc/tutorial/services/so_s_30/so_s_30.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_30/so_s_30.sql b/binsrc/tutorial/services/so_s_30/so_s_30.sql
index 3289df9..d514221 100644
--- a/binsrc/tutorial/services/so_s_30/so_s_30.sql
+++ b/binsrc/tutorial/services/so_s_30/so_s_30.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_30.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_30.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_30/so_s_30.xml b/binsrc/tutorial/services/so_s_30/so_s_30.xml
index b44aefd..a4d17c8 100644
--- a/binsrc/tutorial/services/so_s_30/so_s_30.xml
+++ b/binsrc/tutorial/services/so_s_30/so_s_30.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_31/options.xml b/binsrc/tutorial/services/so_s_31/options.xml
index 09fb68a..4772708 100644
--- a/binsrc/tutorial/services/so_s_31/options.xml
+++ b/binsrc/tutorial/services/so_s_31/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_31/so_s_31.sql b/binsrc/tutorial/services/so_s_31/so_s_31.sql
index 21e0524..6107892 100644
--- a/binsrc/tutorial/services/so_s_31/so_s_31.sql
+++ b/binsrc/tutorial/services/so_s_31/so_s_31.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_31.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_31.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_31/so_s_31.xml b/binsrc/tutorial/services/so_s_31/so_s_31.xml
index e7858ab..9221a55 100644
--- a/binsrc/tutorial/services/so_s_31/so_s_31.xml
+++ b/binsrc/tutorial/services/so_s_31/so_s_31.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_32/options.xml b/binsrc/tutorial/services/so_s_32/options.xml
index d6f34a5..e827773 100644
--- a/binsrc/tutorial/services/so_s_32/options.xml
+++ b/binsrc/tutorial/services/so_s_32/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_32/so_s_32.cs b/binsrc/tutorial/services/so_s_32/so_s_32.cs
index 0847395..c3abc8f 100644
--- a/binsrc/tutorial/services/so_s_32/so_s_32.cs
+++ b/binsrc/tutorial/services/so_s_32/so_s_32.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_32/so_s_32.sql b/binsrc/tutorial/services/so_s_32/so_s_32.sql
index 8e4794c..06fd659 100644
--- a/binsrc/tutorial/services/so_s_32/so_s_32.sql
+++ b/binsrc/tutorial/services/so_s_32/so_s_32.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_32.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_32.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_32/so_s_32.xml b/binsrc/tutorial/services/so_s_32/so_s_32.xml
index 7718ac4..e6553c2 100644
--- a/binsrc/tutorial/services/so_s_32/so_s_32.xml
+++ b/binsrc/tutorial/services/so_s_32/so_s_32.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_33/redcoal.sql b/binsrc/tutorial/services/so_s_33/redcoal.sql
index 9d6e901..acb5356 100644
--- a/binsrc/tutorial/services/so_s_33/redcoal.sql
+++ b/binsrc/tutorial/services/so_s_33/redcoal.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: redcoal.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: redcoal.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_33/sms.vsp b/binsrc/tutorial/services/so_s_33/sms.vsp
index 4fbe6f9..afa4c84 100644
--- a/binsrc/tutorial/services/so_s_33/sms.vsp
+++ b/binsrc/tutorial/services/so_s_33/sms.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sms.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sms.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_33/so_s_33.xml b/binsrc/tutorial/services/so_s_33/so_s_33.xml
index 73f5b86..3057d06 100644
--- a/binsrc/tutorial/services/so_s_33/so_s_33.xml
+++ b/binsrc/tutorial/services/so_s_33/so_s_33.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_34/options.xml b/binsrc/tutorial/services/so_s_34/options.xml
index 9787a1b..395ded9 100644
--- a/binsrc/tutorial/services/so_s_34/options.xml
+++ b/binsrc/tutorial/services/so_s_34/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_34/so_s_34.sql b/binsrc/tutorial/services/so_s_34/so_s_34.sql
index 01fd72d..475efe4 100644
--- a/binsrc/tutorial/services/so_s_34/so_s_34.sql
+++ b/binsrc/tutorial/services/so_s_34/so_s_34.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_34.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_34.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_34/so_s_34.xml b/binsrc/tutorial/services/so_s_34/so_s_34.xml
index 72b2f19..c771520 100644
--- a/binsrc/tutorial/services/so_s_34/so_s_34.xml
+++ b/binsrc/tutorial/services/so_s_34/so_s_34.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_35/mappoint.sql b/binsrc/tutorial/services/so_s_35/mappoint.sql
index e0d15c4..f956c0e 100644
--- a/binsrc/tutorial/services/so_s_35/mappoint.sql
+++ b/binsrc/tutorial/services/so_s_35/mappoint.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mappoint.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: mappoint.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_35/mappoint.vsp b/binsrc/tutorial/services/so_s_35/mappoint.vsp
index 347668b..a303e08 100644
--- a/binsrc/tutorial/services/so_s_35/mappoint.vsp
+++ b/binsrc/tutorial/services/so_s_35/mappoint.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: mappoint.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: mappoint.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_35/mappoint.xsd b/binsrc/tutorial/services/so_s_35/mappoint.xsd
index c78e691..ba6f14f 100644
--- a/binsrc/tutorial/services/so_s_35/mappoint.xsd
+++ b/binsrc/tutorial/services/so_s_35/mappoint.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_35/so_s_35.xml b/binsrc/tutorial/services/so_s_35/so_s_35.xml
index 22b46fa..d6fcecd 100644
--- a/binsrc/tutorial/services/so_s_35/so_s_35.xml
+++ b/binsrc/tutorial/services/so_s_35/so_s_35.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/eBay.sql b/binsrc/tutorial/services/so_s_36/eBay.sql
index 8cc915e..7d201f6 100644
--- a/binsrc/tutorial/services/so_s_36/eBay.sql
+++ b/binsrc/tutorial/services/so_s_36/eBay.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: eBay.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: eBay.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/eBayCategories.vspx b/binsrc/tutorial/services/so_s_36/eBayCategories.vspx
index 34ef728..4bce48c 100644
--- a/binsrc/tutorial/services/so_s_36/eBayCategories.vspx
+++ b/binsrc/tutorial/services/so_s_36/eBayCategories.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: eBayCategories.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: eBayCategories.vspx,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/eBaySvc.wsdl b/binsrc/tutorial/services/so_s_36/eBaySvc.wsdl
index fdcf5b5..f082e3a 100644
--- a/binsrc/tutorial/services/so_s_36/eBaySvc.wsdl
+++ b/binsrc/tutorial/services/so_s_36/eBaySvc.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/eBayTypes.wsdl b/binsrc/tutorial/services/so_s_36/eBayTypes.wsdl
index 7964f01..302769b 100644
--- a/binsrc/tutorial/services/so_s_36/eBayTypes.wsdl
+++ b/binsrc/tutorial/services/so_s_36/eBayTypes.wsdl
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/ebay_demo.sql b/binsrc/tutorial/services/so_s_36/ebay_demo.sql
index 79534c3..b2a1030 100644
--- a/binsrc/tutorial/services/so_s_36/ebay_demo.sql
+++ b/binsrc/tutorial/services/so_s_36/ebay_demo.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ebay_demo.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ebay_demo.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/options.xml b/binsrc/tutorial/services/so_s_36/options.xml
index a81b3b7..8bd5d36 100644
--- a/binsrc/tutorial/services/so_s_36/options.xml
+++ b/binsrc/tutorial/services/so_s_36/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_36/so_s_36.xml b/binsrc/tutorial/services/so_s_36/so_s_36.xml
index 812f956..f59ae18 100644
--- a/binsrc/tutorial/services/so_s_36/so_s_36.xml
+++ b/binsrc/tutorial/services/so_s_36/so_s_36.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_37/nwsetup.sql b/binsrc/tutorial/services/so_s_37/nwsetup.sql
index 6726cd6..d566a6a 100644
--- a/binsrc/tutorial/services/so_s_37/nwsetup.sql
+++ b/binsrc/tutorial/services/so_s_37/nwsetup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: nwsetup.sql,v 1.3 2008/04/21 08:09:36 source Exp $
+--  $Id: nwsetup.sql,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_37/options.xml b/binsrc/tutorial/services/so_s_37/options.xml
index b9f836a..e9beb58 100644
--- a/binsrc/tutorial/services/so_s_37/options.xml
+++ b/binsrc/tutorial/services/so_s_37/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_37/so_s_37.xml b/binsrc/tutorial/services/so_s_37/so_s_37.xml
index 1450f72..06bc603 100644
--- a/binsrc/tutorial/services/so_s_37/so_s_37.xml
+++ b/binsrc/tutorial/services/so_s_37/so_s_37.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_4/options.xml b/binsrc/tutorial/services/so_s_4/options.xml
index ce11f8d..6acb4e0 100644
--- a/binsrc/tutorial/services/so_s_4/options.xml
+++ b/binsrc/tutorial/services/so_s_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_4/so_s_4.sql b/binsrc/tutorial/services/so_s_4/so_s_4.sql
index 2222085..dae0949 100644
--- a/binsrc/tutorial/services/so_s_4/so_s_4.sql
+++ b/binsrc/tutorial/services/so_s_4/so_s_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_4.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_4.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_4/so_s_4.xml b/binsrc/tutorial/services/so_s_4/so_s_4.xml
index 6acd842..247d9ef 100644
--- a/binsrc/tutorial/services/so_s_4/so_s_4.xml
+++ b/binsrc/tutorial/services/so_s_4/so_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_4/so_s_4_sample_1.vsp b/binsrc/tutorial/services/so_s_4/so_s_4_sample_1.vsp
index 5166f38..60acee6 100644
--- a/binsrc/tutorial/services/so_s_4/so_s_4_sample_1.vsp
+++ b/binsrc/tutorial/services/so_s_4/so_s_4_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_4_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_4_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_5/so_s_5.xml b/binsrc/tutorial/services/so_s_5/so_s_5.xml
index ff6f630..729a8d9 100644
--- a/binsrc/tutorial/services/so_s_5/so_s_5.xml
+++ b/binsrc/tutorial/services/so_s_5/so_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/options.xml b/binsrc/tutorial/services/so_s_6/options.xml
index aed7286..69b7cd5 100644
--- a/binsrc/tutorial/services/so_s_6/options.xml
+++ b/binsrc/tutorial/services/so_s_6/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/so_s_6.sql b/binsrc/tutorial/services/so_s_6/so_s_6.sql
index 54384a7..a835c27 100644
--- a/binsrc/tutorial/services/so_s_6/so_s_6.sql
+++ b/binsrc/tutorial/services/so_s_6/so_s_6.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_6.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_6.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/so_s_6.xml b/binsrc/tutorial/services/so_s_6/so_s_6.xml
index 559f111..fd8bd5d 100644
--- a/binsrc/tutorial/services/so_s_6/so_s_6.xml
+++ b/binsrc/tutorial/services/so_s_6/so_s_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/so_s_6_sample_1.vsp b/binsrc/tutorial/services/so_s_6/so_s_6_sample_1.vsp
index 283c5eb..610dbaf 100644
--- a/binsrc/tutorial/services/so_s_6/so_s_6_sample_1.vsp
+++ b/binsrc/tutorial/services/so_s_6/so_s_6_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_6_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_6_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/so_s_6_sample_2.vsp b/binsrc/tutorial/services/so_s_6/so_s_6_sample_2.vsp
index 735b396..02ae961 100644
--- a/binsrc/tutorial/services/so_s_6/so_s_6_sample_2.vsp
+++ b/binsrc/tutorial/services/so_s_6/so_s_6_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_6_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_6_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/so_s_6_sample_3.vsp b/binsrc/tutorial/services/so_s_6/so_s_6_sample_3.vsp
index d72aac8..d24a568 100644
--- a/binsrc/tutorial/services/so_s_6/so_s_6_sample_3.vsp
+++ b/binsrc/tutorial/services/so_s_6/so_s_6_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_6_sample_3.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_6_sample_3.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/wsdl_call.xsl b/binsrc/tutorial/services/so_s_6/wsdl_call.xsl
index 898e53c..79fe857 100644
--- a/binsrc/tutorial/services/so_s_6/wsdl_call.xsl
+++ b/binsrc/tutorial/services/so_s_6/wsdl_call.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: wsdl_call.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: wsdl_call.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_6/wsdl_oper.xsl b/binsrc/tutorial/services/so_s_6/wsdl_oper.xsl
index 22021fb..91f58c0 100644
--- a/binsrc/tutorial/services/so_s_6/wsdl_oper.xsl
+++ b/binsrc/tutorial/services/so_s_6/wsdl_oper.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: wsdl_oper.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: wsdl_oper.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/nasdaq_ajax.html b/binsrc/tutorial/services/so_s_7/nasdaq_ajax.html
index 91887b0..b9a775e 100644
--- a/binsrc/tutorial/services/so_s_7/nasdaq_ajax.html
+++ b/binsrc/tutorial/services/so_s_7/nasdaq_ajax.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/options.xml b/binsrc/tutorial/services/so_s_7/options.xml
index 9da2486..300c9bc 100644
--- a/binsrc/tutorial/services/so_s_7/options.xml
+++ b/binsrc/tutorial/services/so_s_7/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/so_s_7.sql b/binsrc/tutorial/services/so_s_7/so_s_7.sql
index 2514965..e615cfc 100644
--- a/binsrc/tutorial/services/so_s_7/so_s_7.sql
+++ b/binsrc/tutorial/services/so_s_7/so_s_7.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_7.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_7.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/so_s_7.xml b/binsrc/tutorial/services/so_s_7/so_s_7.xml
index 0b6e10d..52253ff 100644
--- a/binsrc/tutorial/services/so_s_7/so_s_7.xml
+++ b/binsrc/tutorial/services/so_s_7/so_s_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/so_s_7_client.vsp b/binsrc/tutorial/services/so_s_7/so_s_7_client.vsp
index 60a787d..6d503ae 100644
--- a/binsrc/tutorial/services/so_s_7/so_s_7_client.vsp
+++ b/binsrc/tutorial/services/so_s_7/so_s_7_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_7_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_7_client.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/so_s_7_server.vsp b/binsrc/tutorial/services/so_s_7/so_s_7_server.vsp
index ac829ee..7c650e0 100644
--- a/binsrc/tutorial/services/so_s_7/so_s_7_server.vsp
+++ b/binsrc/tutorial/services/so_s_7/so_s_7_server.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_7_server.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_7_server.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/so_s_7_wsdl.vsp b/binsrc/tutorial/services/so_s_7/so_s_7_wsdl.vsp
index 3b6c167..fd7d5a8 100644
--- a/binsrc/tutorial/services/so_s_7/so_s_7_wsdl.vsp
+++ b/binsrc/tutorial/services/so_s_7/so_s_7_wsdl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_7_wsdl.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_7_wsdl.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_7/sr.xsl b/binsrc/tutorial/services/so_s_7/sr.xsl
index 5fcde62..1f3849c 100644
--- a/binsrc/tutorial/services/so_s_7/sr.xsl
+++ b/binsrc/tutorial/services/so_s_7/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/options.xml b/binsrc/tutorial/services/so_s_8/options.xml
index 28ac0ef..634cb09 100644
--- a/binsrc/tutorial/services/so_s_8/options.xml
+++ b/binsrc/tutorial/services/so_s_8/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/so_s_8.sql b/binsrc/tutorial/services/so_s_8/so_s_8.sql
index 6b66052..00b099d 100644
--- a/binsrc/tutorial/services/so_s_8/so_s_8.sql
+++ b/binsrc/tutorial/services/so_s_8/so_s_8.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_8.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_8.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/so_s_8.xml b/binsrc/tutorial/services/so_s_8/so_s_8.xml
index d0be1d2..dc7324b 100644
--- a/binsrc/tutorial/services/so_s_8/so_s_8.xml
+++ b/binsrc/tutorial/services/so_s_8/so_s_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/so_s_8_client.vsp b/binsrc/tutorial/services/so_s_8/so_s_8_client.vsp
index f4b176a..8670f89 100644
--- a/binsrc/tutorial/services/so_s_8/so_s_8_client.vsp
+++ b/binsrc/tutorial/services/so_s_8/so_s_8_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_8_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_8_client.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/so_s_8_server.vsp b/binsrc/tutorial/services/so_s_8/so_s_8_server.vsp
index efe6644..b22beab 100644
--- a/binsrc/tutorial/services/so_s_8/so_s_8_server.vsp
+++ b/binsrc/tutorial/services/so_s_8/so_s_8_server.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_8_server.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_8_server.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/so_s_8_wsdl.vsp b/binsrc/tutorial/services/so_s_8/so_s_8_wsdl.vsp
index 77c59f4..30bea98 100644
--- a/binsrc/tutorial/services/so_s_8/so_s_8_wsdl.vsp
+++ b/binsrc/tutorial/services/so_s_8/so_s_8_wsdl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_8_wsdl.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_8_wsdl.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_8/sr.xsl b/binsrc/tutorial/services/so_s_8/sr.xsl
index 6754e82..37f7b74 100644
--- a/binsrc/tutorial/services/so_s_8/sr.xsl
+++ b/binsrc/tutorial/services/so_s_8/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_9/options.xml b/binsrc/tutorial/services/so_s_9/options.xml
index 0d6a9ef..9a9993b 100644
--- a/binsrc/tutorial/services/so_s_9/options.xml
+++ b/binsrc/tutorial/services/so_s_9/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_9/so_s_9.sql b/binsrc/tutorial/services/so_s_9/so_s_9.sql
index 0997344..002c266 100644
--- a/binsrc/tutorial/services/so_s_9/so_s_9.sql
+++ b/binsrc/tutorial/services/so_s_9/so_s_9.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: so_s_9.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: so_s_9.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_9/so_s_9.xml b/binsrc/tutorial/services/so_s_9/so_s_9.xml
index 9504fc7..f344ea2 100644
--- a/binsrc/tutorial/services/so_s_9/so_s_9.xml
+++ b/binsrc/tutorial/services/so_s_9/so_s_9.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_9/so_s_9_client.vsp b/binsrc/tutorial/services/so_s_9/so_s_9_client.vsp
index 68b9881..d7a1b65 100644
--- a/binsrc/tutorial/services/so_s_9/so_s_9_client.vsp
+++ b/binsrc/tutorial/services/so_s_9/so_s_9_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: so_s_9_client.vsp,v 1.3 2006/08/15 19:30:34 source Exp $
+--  $Id: so_s_9_client.vsp,v 1.3.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/so_s_9/sr.xsl b/binsrc/tutorial/services/so_s_9/sr.xsl
index e25403d..46cec96 100644
--- a/binsrc/tutorial/services/so_s_9/sr.xsl
+++ b/binsrc/tutorial/services/so_s_9/sr.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sr.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sr.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/soap.js b/binsrc/tutorial/services/soap.js
index 7e74882..dfd3c27 100644
--- a/binsrc/tutorial/services/soap.js
+++ b/binsrc/tutorial/services/soap.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_1/options.xml b/binsrc/tutorial/services/ud_s_1/options.xml
index f0b492d..5e1961a 100644
--- a/binsrc/tutorial/services/ud_s_1/options.xml
+++ b/binsrc/tutorial/services/ud_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_1/ud_s_1.sql b/binsrc/tutorial/services/ud_s_1/ud_s_1.sql
index 4fe4701..2865b7e 100644
--- a/binsrc/tutorial/services/ud_s_1/ud_s_1.sql
+++ b/binsrc/tutorial/services/ud_s_1/ud_s_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ud_s_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ud_s_1.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_1/ud_s_1.xml b/binsrc/tutorial/services/ud_s_1/ud_s_1.xml
index 18402bb..3d04e4f 100644
--- a/binsrc/tutorial/services/ud_s_1/ud_s_1.xml
+++ b/binsrc/tutorial/services/ud_s_1/ud_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_1/ud_s_1.xsl b/binsrc/tutorial/services/ud_s_1/ud_s_1.xsl
index 70dd38b..31635d0 100644
--- a/binsrc/tutorial/services/ud_s_1/ud_s_1.xsl
+++ b/binsrc/tutorial/services/ud_s_1/ud_s_1.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: ud_s_1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ud_s_1.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_1/ud_s_1_result.xsl b/binsrc/tutorial/services/ud_s_1/ud_s_1_result.xsl
index 80bd406..03c5c24 100644
--- a/binsrc/tutorial/services/ud_s_1/ud_s_1_result.xsl
+++ b/binsrc/tutorial/services/ud_s_1/ud_s_1_result.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: ud_s_1_result.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ud_s_1_result.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_1/ud_s_1_sample_1.vsp b/binsrc/tutorial/services/ud_s_1/ud_s_1_sample_1.vsp
index d7a703d..cf5c0e1 100644
--- a/binsrc/tutorial/services/ud_s_1/ud_s_1_sample_1.vsp
+++ b/binsrc/tutorial/services/ud_s_1/ud_s_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_1_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_2/options.xml b/binsrc/tutorial/services/ud_s_2/options.xml
index cb07cf9..e4a3379 100644
--- a/binsrc/tutorial/services/ud_s_2/options.xml
+++ b/binsrc/tutorial/services/ud_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_2/ud_s_2.sql b/binsrc/tutorial/services/ud_s_2/ud_s_2.sql
index 2a8d634..36d8176 100644
--- a/binsrc/tutorial/services/ud_s_2/ud_s_2.sql
+++ b/binsrc/tutorial/services/ud_s_2/ud_s_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ud_s_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ud_s_2.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_2/ud_s_2.xml b/binsrc/tutorial/services/ud_s_2/ud_s_2.xml
index 3e9677d..7312d92 100644
--- a/binsrc/tutorial/services/ud_s_2/ud_s_2.xml
+++ b/binsrc/tutorial/services/ud_s_2/ud_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_2/ud_s_2.xsl b/binsrc/tutorial/services/ud_s_2/ud_s_2.xsl
index d482b8e..af54db3 100644
--- a/binsrc/tutorial/services/ud_s_2/ud_s_2.xsl
+++ b/binsrc/tutorial/services/ud_s_2/ud_s_2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: ud_s_2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ud_s_2.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_2/ud_s_2_sample_1.vsp b/binsrc/tutorial/services/ud_s_2/ud_s_2_sample_1.vsp
index 120202a..ee947e1 100644
--- a/binsrc/tutorial/services/ud_s_2/ud_s_2_sample_1.vsp
+++ b/binsrc/tutorial/services/ud_s_2/ud_s_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_2_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/be.xml b/binsrc/tutorial/services/ud_s_3/be.xml
index 3ddf84d..a784e41 100644
--- a/binsrc/tutorial/services/ud_s_3/be.xml
+++ b/binsrc/tutorial/services/ud_s_3/be.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/bnd.xml b/binsrc/tutorial/services/ud_s_3/bnd.xml
index 7f89189..ec6cc79 100644
--- a/binsrc/tutorial/services/ud_s_3/bnd.xml
+++ b/binsrc/tutorial/services/ud_s_3/bnd.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/bs.xml b/binsrc/tutorial/services/ud_s_3/bs.xml
index 296cebf..6e56bc1 100644
--- a/binsrc/tutorial/services/ud_s_3/bs.xml
+++ b/binsrc/tutorial/services/ud_s_3/bs.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/options.xml b/binsrc/tutorial/services/ud_s_3/options.xml
index 15b3953..e69729c 100644
--- a/binsrc/tutorial/services/ud_s_3/options.xml
+++ b/binsrc/tutorial/services/ud_s_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/tm.xml b/binsrc/tutorial/services/ud_s_3/tm.xml
index 758b047..e43fe17 100644
--- a/binsrc/tutorial/services/ud_s_3/tm.xml
+++ b/binsrc/tutorial/services/ud_s_3/tm.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3.sql b/binsrc/tutorial/services/ud_s_3/ud_s_3.sql
index 840d8f2..112d06e 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3.sql
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ud_s_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ud_s_3.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3.xml b/binsrc/tutorial/services/ud_s_3/ud_s_3.xml
index eee9fa8..e9f0900 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3.xml
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3.xsl b/binsrc/tutorial/services/ud_s_3/ud_s_3.xsl
index 054de1d..939cf93 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3.xsl
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: ud_s_3.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ud_s_3.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_find.vsp b/binsrc/tutorial/services/ud_s_3/ud_s_3_find.vsp
index 3031571..0bf396e 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_find.vsp
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_find.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_3_find.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_3_find.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_sample_1.sql b/binsrc/tutorial/services/ud_s_3/ud_s_3_sample_1.sql
index aca9c3a..98fae56 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_sample_1.sql
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_sample_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ud_s_3_sample_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ud_s_3_sample_1.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_1.vsp b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_1.vsp
index e053ea1..13617b0 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_1.vsp
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_3_step_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_3_step_1.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_2.vsp b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_2.vsp
index 6b83996..78f73c2 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_2.vsp
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_3_step_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_3_step_2.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_3.vsp b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_3.vsp
index dbbaae2..eac11c6 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_3.vsp
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_3_step_3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_3_step_3.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_4.vsp b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_4.vsp
index d22f5b3..dae0665 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_4.vsp
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_4.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_3_step_4.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_3_step_4.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_5.vsp b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_5.vsp
index 0e3a1b0..3b18c0a 100644
--- a/binsrc/tutorial/services/ud_s_3/ud_s_3_step_5.vsp
+++ b/binsrc/tutorial/services/ud_s_3/ud_s_3_step_5.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ud_s_3_step_5.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: ud_s_3_step_5.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_1/register_client_create.vsp b/binsrc/tutorial/services/ws_s_1/register_client_create.vsp
index 03bd7df..abc5565 100644
--- a/binsrc/tutorial/services/ws_s_1/register_client_create.vsp
+++ b/binsrc/tutorial/services/ws_s_1/register_client_create.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register_client_create.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: register_client_create.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_1/ws_s_1.sql b/binsrc/tutorial/services/ws_s_1/ws_s_1.sql
index 49f2eaf..dcde0b8 100644
--- a/binsrc/tutorial/services/ws_s_1/ws_s_1.sql
+++ b/binsrc/tutorial/services/ws_s_1/ws_s_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ws_s_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ws_s_1.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_1/ws_s_1.xml b/binsrc/tutorial/services/ws_s_1/ws_s_1.xml
index 99290cc..7f5619e 100644
--- a/binsrc/tutorial/services/ws_s_1/ws_s_1.xml
+++ b/binsrc/tutorial/services/ws_s_1/ws_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_2/SymClient.cs b/binsrc/tutorial/services/ws_s_2/SymClient.cs
index 1996b66..baa31f9 100644
--- a/binsrc/tutorial/services/ws_s_2/SymClient.cs
+++ b/binsrc/tutorial/services/ws_s_2/SymClient.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_2/symmeric_encryption_client.vsp b/binsrc/tutorial/services/ws_s_2/symmeric_encryption_client.vsp
index 27cbece..3e184b4 100644
--- a/binsrc/tutorial/services/ws_s_2/symmeric_encryption_client.vsp
+++ b/binsrc/tutorial/services/ws_s_2/symmeric_encryption_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: symmeric_encryption_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: symmeric_encryption_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_2/virt_symmeric_encryption_client.vsp b/binsrc/tutorial/services/ws_s_2/virt_symmeric_encryption_client.vsp
index c8364e6..e94c7c7 100644
--- a/binsrc/tutorial/services/ws_s_2/virt_symmeric_encryption_client.vsp
+++ b/binsrc/tutorial/services/ws_s_2/virt_symmeric_encryption_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: virt_symmeric_encryption_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: virt_symmeric_encryption_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_2/ws_s_2.xml b/binsrc/tutorial/services/ws_s_2/ws_s_2.xml
index 47cca67..4ba7a69 100644
--- a/binsrc/tutorial/services/ws_s_2/ws_s_2.xml
+++ b/binsrc/tutorial/services/ws_s_2/ws_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_3/ASymClient.cs b/binsrc/tutorial/services/ws_s_3/ASymClient.cs
index aad0459..ca3a70a 100644
--- a/binsrc/tutorial/services/ws_s_3/ASymClient.cs
+++ b/binsrc/tutorial/services/ws_s_3/ASymClient.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_3/ASymClient2.cs b/binsrc/tutorial/services/ws_s_3/ASymClient2.cs
index e064fdf..f623fff 100644
--- a/binsrc/tutorial/services/ws_s_3/ASymClient2.cs
+++ b/binsrc/tutorial/services/ws_s_3/ASymClient2.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_3/asymmeric_encryption_client.vsp b/binsrc/tutorial/services/ws_s_3/asymmeric_encryption_client.vsp
index ee55c0d..f2451a5 100644
--- a/binsrc/tutorial/services/ws_s_3/asymmeric_encryption_client.vsp
+++ b/binsrc/tutorial/services/ws_s_3/asymmeric_encryption_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: asymmeric_encryption_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: asymmeric_encryption_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_3/virt_asymmeric_encryption_client.vsp b/binsrc/tutorial/services/ws_s_3/virt_asymmeric_encryption_client.vsp
index 065ac81..d25f428 100644
--- a/binsrc/tutorial/services/ws_s_3/virt_asymmeric_encryption_client.vsp
+++ b/binsrc/tutorial/services/ws_s_3/virt_asymmeric_encryption_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: virt_asymmeric_encryption_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: virt_asymmeric_encryption_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_3/ws_s_3.xml b/binsrc/tutorial/services/ws_s_3/ws_s_3.xml
index b3963cf..cb21950 100644
--- a/binsrc/tutorial/services/ws_s_3/ws_s_3.xml
+++ b/binsrc/tutorial/services/ws_s_3/ws_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_3/wse_asymmeric_encryption_client.vsp b/binsrc/tutorial/services/ws_s_3/wse_asymmeric_encryption_client.vsp
index dcd1af2..43a7d0d 100644
--- a/binsrc/tutorial/services/ws_s_3/wse_asymmeric_encryption_client.vsp
+++ b/binsrc/tutorial/services/ws_s_3/wse_asymmeric_encryption_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wse_asymmeric_encryption_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: wse_asymmeric_encryption_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4/virt_x509signing_client.vsp b/binsrc/tutorial/services/ws_s_4/virt_x509signing_client.vsp
index 58a5050..2d0d49c 100644
--- a/binsrc/tutorial/services/ws_s_4/virt_x509signing_client.vsp
+++ b/binsrc/tutorial/services/ws_s_4/virt_x509signing_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: virt_x509signing_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: virt_x509signing_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4/ws_s_4.xml b/binsrc/tutorial/services/ws_s_4/ws_s_4.xml
index 2df0238..d9cd907 100644
--- a/binsrc/tutorial/services/ws_s_4/ws_s_4.xml
+++ b/binsrc/tutorial/services/ws_s_4/ws_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4/wse_x509_signing_client.vsp b/binsrc/tutorial/services/ws_s_4/wse_x509_signing_client.vsp
index 906464d..2c47d79 100644
--- a/binsrc/tutorial/services/ws_s_4/wse_x509_signing_client.vsp
+++ b/binsrc/tutorial/services/ws_s_4/wse_x509_signing_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wse_x509_signing_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: wse_x509_signing_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4/x509.xml b/binsrc/tutorial/services/ws_s_4/x509.xml
index e8a0fc0..302239a 100644
--- a/binsrc/tutorial/services/ws_s_4/x509.xml
+++ b/binsrc/tutorial/services/ws_s_4/x509.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4/x509Client.cs b/binsrc/tutorial/services/ws_s_4/x509Client.cs
index 8cb5285..e8809ce 100644
--- a/binsrc/tutorial/services/ws_s_4/x509Client.cs
+++ b/binsrc/tutorial/services/ws_s_4/x509Client.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4/x509_signing_client.vsp b/binsrc/tutorial/services/ws_s_4/x509_signing_client.vsp
index e3bebf0..22f24e1 100644
--- a/binsrc/tutorial/services/ws_s_4/x509_signing_client.vsp
+++ b/binsrc/tutorial/services/ws_s_4/x509_signing_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: x509_signing_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: x509_signing_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4a/UsernameClient.cs b/binsrc/tutorial/services/ws_s_4a/UsernameClient.cs
index d09dee2..0035014 100644
--- a/binsrc/tutorial/services/ws_s_4a/UsernameClient.cs
+++ b/binsrc/tutorial/services/ws_s_4a/UsernameClient.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4a/UsernameClient2.cs b/binsrc/tutorial/services/ws_s_4a/UsernameClient2.cs
index cd7e972..ec31057 100644
--- a/binsrc/tutorial/services/ws_s_4a/UsernameClient2.cs
+++ b/binsrc/tutorial/services/ws_s_4a/UsernameClient2.cs
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4a/username_signing_client.vsp b/binsrc/tutorial/services/ws_s_4a/username_signing_client.vsp
index 625d9d9..3e0cddf 100644
--- a/binsrc/tutorial/services/ws_s_4a/username_signing_client.vsp
+++ b/binsrc/tutorial/services/ws_s_4a/username_signing_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: username_signing_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: username_signing_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_4a/ws_s_4a.xml b/binsrc/tutorial/services/ws_s_4a/ws_s_4a.xml
index d295957..50dc7c9 100644
--- a/binsrc/tutorial/services/ws_s_4a/ws_s_4a.xml
+++ b/binsrc/tutorial/services/ws_s_4a/ws_s_4a.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_5/trust_client.vsp b/binsrc/tutorial/services/ws_s_5/trust_client.vsp
index 81366b2..8fc21a7 100644
--- a/binsrc/tutorial/services/ws_s_5/trust_client.vsp
+++ b/binsrc/tutorial/services/ws_s_5/trust_client.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: trust_client.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: trust_client.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_5/ws_s_5.sql b/binsrc/tutorial/services/ws_s_5/ws_s_5.sql
index 76d0666..f1246ad 100644
--- a/binsrc/tutorial/services/ws_s_5/ws_s_5.sql
+++ b/binsrc/tutorial/services/ws_s_5/ws_s_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: ws_s_5.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: ws_s_5.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/ws_s_5/ws_s_5.xml b/binsrc/tutorial/services/ws_s_5/ws_s_5.xml
index 811593d..62014c8 100644
--- a/binsrc/tutorial/services/ws_s_5/ws_s_5.xml
+++ b/binsrc/tutorial/services/ws_s_5/ws_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/xa_s_1/options.xml b/binsrc/tutorial/services/xa_s_1/options.xml
index 260d791..a81eb6d 100644
--- a/binsrc/tutorial/services/xa_s_1/options.xml
+++ b/binsrc/tutorial/services/xa_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/xa_s_1/xa_s_1.xml b/binsrc/tutorial/services/xa_s_1/xa_s_1.xml
index 406219c..699e187 100644
--- a/binsrc/tutorial/services/xa_s_1/xa_s_1.xml
+++ b/binsrc/tutorial/services/xa_s_1/xa_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/xa_s_1/xars.xsl b/binsrc/tutorial/services/xa_s_1/xars.xsl
index 26d2f69..25516ef 100644
--- a/binsrc/tutorial/services/xa_s_1/xars.xsl
+++ b/binsrc/tutorial/services/xa_s_1/xars.xsl
@@ -1,12 +1,12 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <!--
  -  
- -  $Id: xars.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xars.xsl,v 1.2.2.2 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -23,57 +23,56 @@
  -  
  -  
 -->
-
-<!-- XSL Stylesheet to view hierarchical rowsets as HTML -->
-
-<!-- xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" language="vbscript" -->
-<xsl:stylesheet
-		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		xmlns:msxsl="urn:schemas-microsoft-com:xslt"
-		xmlns:xd="urn:schemas-microsoft-com:xml-analysis:rowset"
-		xmlns:sql="urn:schemas-microsoft-com:xml-sql"
-		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-		version="1.0" >
-
-	<xsl:output method="html" />
-
-	<!-- Open the HTML for the top level document -->
-	<xsl:template match="/">
-	        <DIV>
-		<TABLE class="tableresult">
-		<TR>
-		<xsl:apply-templates select="//xsd:schema/xsd:complexType[@name='row']//xsd:element/@sql:field" />
-		</TR>
-		<xsl:apply-templates select="//xd:row" />
-		</TABLE>
-		</DIV>
-	</xsl:template>
-
-	<xsl:template match="xd:row">
-		<xsl:variable name="varCurrRow" select="." />
-		<TR>
-		<!-- Print the values of the attributes (got to handle NULL attributes) -->
-		<xsl:for-each select="//xsd:schema/xsd:complexType[@name='row']//xsd:element">
-			<xsl:variable name="varCurrCol" select="./@name" />
-			<TD>
-			<xsl:choose>
-				<xsl:when test="$varCurrRow/*[local-name() = $varCurrCol]">
-					<xsl:value-of select="$varCurrRow/*[local-name() = $varCurrCol]" />
-				</xsl:when>
-				<xsl:otherwise>
-					<I>null</I>
-				</xsl:otherwise>
-			</xsl:choose>
-			</TD>
-		</xsl:for-each>
-		</TR>
-	</xsl:template>
-
-	<xsl:template match="@sql:field">
-		<TH>
-		<xsl:value-of select="." />
-		</TH>
-	</xsl:template>
-
-</xsl:stylesheet>
-
+
+<!-- XSL Stylesheet to view hierarchical rowsets as HTML -->
+
+<!-- xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" language="vbscript" -->
+<xsl:stylesheet
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		xmlns:msxsl="urn:schemas-microsoft-com:xslt"
+		xmlns:xd="urn:schemas-microsoft-com:xml-analysis:rowset"
+		xmlns:sql="urn:schemas-microsoft-com:xml-sql"
+		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+		version="1.0" >
+
+	<xsl:output method="html" />
+
+	<!-- Open the HTML for the top level document -->
+	<xsl:template match="/">
+	        <DIV>
+		<TABLE class="tableresult">
+		<TR>
+		<xsl:apply-templates select="//xsd:schema/xsd:complexType[@name='row']//xsd:element/@sql:field" />
+		</TR>
+		<xsl:apply-templates select="//xd:row" />
+		</TABLE>
+		</DIV>
+	</xsl:template>
+
+	<xsl:template match="xd:row">
+		<xsl:variable name="varCurrRow" select="." />
+		<TR>
+		<!-- Print the values of the attributes (got to handle NULL attributes) -->
+		<xsl:for-each select="//xsd:schema/xsd:complexType[@name='row']//xsd:element">
+			<xsl:variable name="varCurrCol" select="./@name" />
+			<TD>
+			<xsl:choose>
+				<xsl:when test="$varCurrRow/*[local-name() = $varCurrCol]">
+					<xsl:value-of select="$varCurrRow/*[local-name() = $varCurrCol]" />
+				</xsl:when>
+				<xsl:otherwise>
+					<I>null</I>
+				</xsl:otherwise>
+			</xsl:choose>
+			</TD>
+		</xsl:for-each>
+		</TR>
+	</xsl:template>
+
+	<xsl:template match="@sql:field">
+		<TH>
+		<xsl:value-of select="." />
+		</TH>
+	</xsl:template>
+
+</xsl:stylesheet>
diff --git a/binsrc/tutorial/services/xa_s_1/xmla.vsp b/binsrc/tutorial/services/xa_s_1/xmla.vsp
index d4300db..70a389c 100644
--- a/binsrc/tutorial/services/xa_s_1/xmla.vsp
+++ b/binsrc/tutorial/services/xa_s_1/xmla.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xmla.vsp,v 1.6 2006/08/15 19:30:34 source Exp $
+--  $Id: xmla.vsp,v 1.6.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/xa_s_1/xmla_dsn_add.vsp b/binsrc/tutorial/services/xa_s_1/xmla_dsn_add.vsp
index 73c0d1e..a107756 100644
--- a/binsrc/tutorial/services/xa_s_1/xmla_dsn_add.vsp
+++ b/binsrc/tutorial/services/xa_s_1/xmla_dsn_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xmla_dsn_add.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: xmla_dsn_add.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/services/xa_s_1/xmla_setup.sql b/binsrc/tutorial/services/xa_s_1/xmla_setup.sql
index e44f143..43df9cd 100644
--- a/binsrc/tutorial/services/xa_s_1/xmla_setup.sql
+++ b/binsrc/tutorial/services/xa_s_1/xmla_setup.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xmla_setup.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xmla_setup.sql,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/setup_search.sql b/binsrc/tutorial/setup_search.sql
index 0faf5be..dc0f63f 100644
--- a/binsrc/tutorial/setup_search.sql
+++ b/binsrc/tutorial/setup_search.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: setup_search.sql,v 1.2 2006/08/16 07:58:12 source Exp $
+--  $Id: setup_search.sql,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/setup_tutorial.sql b/binsrc/tutorial/setup_tutorial.sql
index e1fc21f..9ec1673 100644
--- a/binsrc/tutorial/setup_tutorial.sql
+++ b/binsrc/tutorial/setup_tutorial.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: setup_tutorial.sql,v 1.7.2.1 2009/11/25 22:13:16 source Exp $
+--  $Id: setup_tutorial.sql,v 1.7.2.3 2012/03/08 12:55:11 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -116,7 +116,8 @@ create procedure t_sys_dirlist (in path varchar, in files int, in err any, in so
       declare col any;
       if (path[length(path)-1] <> ascii ('/'))
 	path := path || '/';
-      col := (select COL_ID from WS.WS.SYS_DAV_COL where WS.WS.COL_PATH (COL_ID) = path);
+
+      col := DAV_SEARCH_ID (path, 'C');
       if (files)
 	{
 	  for select RES_NAME from WS.WS.SYS_DAV_RES where RES_COL = col do
@@ -346,4 +347,3 @@ DB.DBA.rd_v_1_localize()
 			
 drop procedure DB.DBA.rd_v_1_localize
 ;
-			
diff --git a/binsrc/tutorial/sioc_ttl.vsp b/binsrc/tutorial/sioc_ttl.vsp
index 5fecc2f..4ac948b 100644
--- a/binsrc/tutorial/sioc_ttl.vsp
+++ b/binsrc/tutorial/sioc_ttl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sioc_ttl.vsp,v 1.1 2007/01/22 21:58:47 source Exp $
+--  $Id: sioc_ttl.vsp,v 1.1.2.1 2012/03/08 12:55:11 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/SyntaxHighlighter.css b/binsrc/tutorial/syntax/SyntaxHighlighter.css
index d31ae88..9ddc7b9 100644
--- a/binsrc/tutorial/syntax/SyntaxHighlighter.css
+++ b/binsrc/tutorial/syntax/SyntaxHighlighter.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: SyntaxHighlighter.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: SyntaxHighlighter.css,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushCSharp.js b/binsrc/tutorial/syntax/shBrushCSharp.js
index c9d7c19..cc05164 100644
--- a/binsrc/tutorial/syntax/shBrushCSharp.js
+++ b/binsrc/tutorial/syntax/shBrushCSharp.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushDelphi.js b/binsrc/tutorial/syntax/shBrushDelphi.js
index a094726..bb26204 100644
--- a/binsrc/tutorial/syntax/shBrushDelphi.js
+++ b/binsrc/tutorial/syntax/shBrushDelphi.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushJScript.js b/binsrc/tutorial/syntax/shBrushJScript.js
index 9c47dcc..7e42ed2 100644
--- a/binsrc/tutorial/syntax/shBrushJScript.js
+++ b/binsrc/tutorial/syntax/shBrushJScript.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushPhp.js b/binsrc/tutorial/syntax/shBrushPhp.js
index a504943..b9f51b0 100644
--- a/binsrc/tutorial/syntax/shBrushPhp.js
+++ b/binsrc/tutorial/syntax/shBrushPhp.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushPython.js b/binsrc/tutorial/syntax/shBrushPython.js
index 3310b95..49547ae 100644
--- a/binsrc/tutorial/syntax/shBrushPython.js
+++ b/binsrc/tutorial/syntax/shBrushPython.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushSql.js b/binsrc/tutorial/syntax/shBrushSql.js
index 21273b0..6815d4a 100644
--- a/binsrc/tutorial/syntax/shBrushSql.js
+++ b/binsrc/tutorial/syntax/shBrushSql.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushVb.js b/binsrc/tutorial/syntax/shBrushVb.js
index 462d1ce..46d8ae4 100644
--- a/binsrc/tutorial/syntax/shBrushVb.js
+++ b/binsrc/tutorial/syntax/shBrushVb.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/syntax/shBrushXml.js b/binsrc/tutorial/syntax/shBrushXml.js
index 7897ee9..14508e9 100644
--- a/binsrc/tutorial/syntax/shBrushXml.js
+++ b/binsrc/tutorial/syntax/shBrushXml.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/tutorial.owl b/binsrc/tutorial/tutorial.owl
index bf38ffc..f6738dc 100644
--- a/binsrc/tutorial/tutorial.owl
+++ b/binsrc/tutorial/tutorial.owl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: tutorial.owl,v 1.1 2008/07/24 09:22:25 source Exp $
+ -  $Id: tutorial.owl,v 1.1.2.1 2012/03/08 12:55:11 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/tutorial.xml b/binsrc/tutorial/tutorial.xml
index 08d49c5..899ac52 100644
--- a/binsrc/tutorial/tutorial.xml
+++ b/binsrc/tutorial/tutorial.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -220,6 +220,12 @@
 					<example id="UD-S-2" fspath="services/ud_s_2"></example>
 					<example id="UD-S-3" fspath="services/ud_s_3"></example>
 	      </group>
+              <group Title="Domain check and registration Services">
+                                        <example id="DC-S-1" fspath="services/dc_s_1"></example>
+              </group>
+              <group Title="WebID Identity Provider (IdP)">
+                                        <example id="IdP-S-1" fspath="services/idp_s_1"></example>
+              </group>
       </group>
     </subsection>
     <subsection Title="Wireless Access Protocols" fspath="wap">
diff --git a/binsrc/tutorial/tutorial3.css b/binsrc/tutorial/tutorial3.css
index 925b48f..0bd26af 100644
--- a/binsrc/tutorial/tutorial3.css
+++ b/binsrc/tutorial/tutorial3.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: tutorial3.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: tutorial3.css,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/uninst.sql b/binsrc/tutorial/uninst.sql
index 8812319..7678d62 100644
--- a/binsrc/tutorial/uninst.sql
+++ b/binsrc/tutorial/uninst.sql
@@ -1,3 +1,12 @@
+create procedure DB.DBA.drop_tut_search_table_safe(in expr varchar) {
+  declare state, message, meta, result any;
+  exec(expr, state, message, vector(), 0, meta, result);
+}
+;
+
+DB.DBA.drop_tut_search_table_safe('DROP TABLE DB.DBA.TUT_SEARCH');
+drop procedure DB.DBA.drop_tut_search_table_safe; 
+
 drop table Demo.demo.XQBids;
 drop table Demo.demo.XQItems;
 drop table Demo.demo.XQUsers;
diff --git a/binsrc/tutorial/vad_version b/binsrc/tutorial/vad_version
index c766e03..120daab 100644
--- a/binsrc/tutorial/vad_version
+++ b/binsrc/tutorial/vad_version
@@ -1 +1 @@
-1.00.6853
+1.00.6878
diff --git a/binsrc/tutorial/wap/demo.css b/binsrc/tutorial/wap/demo.css
index fed097d..5094851 100644
--- a/binsrc/tutorial/wap/demo.css
+++ b/binsrc/tutorial/wap/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/index.xml b/binsrc/tutorial/wap/index.xml
index cdceafb..e3d2451 100644
--- a/binsrc/tutorial/wap/index.xml
+++ b/binsrc/tutorial/wap/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_1/RunHtml2wml.vsp b/binsrc/tutorial/wap/wa_b_1/RunHtml2wml.vsp
index 7314d96..079b7f7 100644
--- a/binsrc/tutorial/wap/wa_b_1/RunHtml2wml.vsp
+++ b/binsrc/tutorial/wap/wa_b_1/RunHtml2wml.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: RunHtml2wml.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: RunHtml2wml.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_1/html2wml.vsp b/binsrc/tutorial/wap/wa_b_1/html2wml.vsp
index 4f88fc9..cf20d7b 100644
--- a/binsrc/tutorial/wap/wa_b_1/html2wml.vsp
+++ b/binsrc/tutorial/wap/wa_b_1/html2wml.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: html2wml.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: html2wml.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_1/html2wml.xsl b/binsrc/tutorial/wap/wa_b_1/html2wml.xsl
index 8eaf9f1..7c2a9ff 100644
--- a/binsrc/tutorial/wap/wa_b_1/html2wml.xsl
+++ b/binsrc/tutorial/wap/wa_b_1/html2wml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -  
- -  $Id: html2wml.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: html2wml.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_1/options.xml b/binsrc/tutorial/wap/wa_b_1/options.xml
index fa596ce..8b41563 100644
--- a/binsrc/tutorial/wap/wa_b_1/options.xml
+++ b/binsrc/tutorial/wap/wa_b_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_1/wa_b_1.xml b/binsrc/tutorial/wap/wa_b_1/wa_b_1.xml
index 5850a25..7f7a75a 100644
--- a/binsrc/tutorial/wap/wa_b_1/wa_b_1.xml
+++ b/binsrc/tutorial/wap/wa_b_1/wa_b_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_2/wa_b_2.xml b/binsrc/tutorial/wap/wa_b_2/wa_b_2.xml
index 2d7915a..36c2417 100644
--- a/binsrc/tutorial/wap/wa_b_2/wa_b_2.xml
+++ b/binsrc/tutorial/wap/wa_b_2/wa_b_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_2/wapphone.vsp b/binsrc/tutorial/wap/wa_b_2/wapphone.vsp
index 2d9972a..77326c9 100644
--- a/binsrc/tutorial/wap/wa_b_2/wapphone.vsp
+++ b/binsrc/tutorial/wap/wa_b_2/wapphone.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: wapphone.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: wapphone.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_2/wapphone.xsl b/binsrc/tutorial/wap/wa_b_2/wapphone.xsl
index 4378108..ceb1eba 100644
--- a/binsrc/tutorial/wap/wa_b_2/wapphone.xsl
+++ b/binsrc/tutorial/wap/wa_b_2/wapphone.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: wapphone.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: wapphone.xsl,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/RunWapEmail.vsp b/binsrc/tutorial/wap/wa_b_3/RunWapEmail.vsp
index b5f1b16..86305d6 100644
--- a/binsrc/tutorial/wap/wa_b_3/RunWapEmail.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/RunWapEmail.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: RunWapEmail.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: RunWapEmail.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/addressbook.vsp b/binsrc/tutorial/wap/wa_b_3/addressbook.vsp
index d03dd20..f06a45c 100644
--- a/binsrc/tutorial/wap/wa_b_3/addressbook.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/addressbook.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: addressbook.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: addressbook.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/checkmail.vsp b/binsrc/tutorial/wap/wa_b_3/checkmail.vsp
index 058e36b..719c02e 100644
--- a/binsrc/tutorial/wap/wa_b_3/checkmail.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/checkmail.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: checkmail.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: checkmail.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/compose.vsp b/binsrc/tutorial/wap/wa_b_3/compose.vsp
index 156ab62..8f885ac 100644
--- a/binsrc/tutorial/wap/wa_b_3/compose.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/compose.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: compose.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: compose.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/delete.vsp b/binsrc/tutorial/wap/wa_b_3/delete.vsp
index 5a383f0..e5e397d 100644
--- a/binsrc/tutorial/wap/wa_b_3/delete.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/delete.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: delete.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: delete.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/folder.vsp b/binsrc/tutorial/wap/wa_b_3/folder.vsp
index 9718e06..e52a81c 100644
--- a/binsrc/tutorial/wap/wa_b_3/folder.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/folder.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: folder.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: folder.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/folder_add.vsp b/binsrc/tutorial/wap/wa_b_3/folder_add.vsp
index 987bbed..ae1c3d1 100644
--- a/binsrc/tutorial/wap/wa_b_3/folder_add.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/folder_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: folder_add.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: folder_add.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/folders.vsp b/binsrc/tutorial/wap/wa_b_3/folders.vsp
index ce4fe7e..b019347 100644
--- a/binsrc/tutorial/wap/wa_b_3/folders.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/folders.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: folders.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: folders.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/forward.vsp b/binsrc/tutorial/wap/wa_b_3/forward.vsp
index 46edcd7..67ea481 100644
--- a/binsrc/tutorial/wap/wa_b_3/forward.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/forward.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: forward.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: forward.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/getmail.vsp b/binsrc/tutorial/wap/wa_b_3/getmail.vsp
index 9121ce7..7695c09 100644
--- a/binsrc/tutorial/wap/wa_b_3/getmail.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/getmail.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: getmail.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: getmail.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/handset.vsp b/binsrc/tutorial/wap/wa_b_3/handset.vsp
index 72cd7c2..847ce4c 100644
--- a/binsrc/tutorial/wap/wa_b_3/handset.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/handset.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: handset.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: handset.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/handset_update.vsp b/binsrc/tutorial/wap/wa_b_3/handset_update.vsp
index 2a40ddc..15a252d 100644
--- a/binsrc/tutorial/wap/wa_b_3/handset_update.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/handset_update.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: handset_update.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: handset_update.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/index.vsp b/binsrc/tutorial/wap/wa_b_3/index.vsp
index 5586e28..2066c66 100644
--- a/binsrc/tutorial/wap/wa_b_3/index.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/index.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: index.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: index.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/login.vsp b/binsrc/tutorial/wap/wa_b_3/login.vsp
index f02df5a..ba3d557 100644
--- a/binsrc/tutorial/wap/wa_b_3/login.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/logout.vsp b/binsrc/tutorial/wap/wa_b_3/logout.vsp
index 398bcb1..dfeea78 100644
--- a/binsrc/tutorial/wap/wa_b_3/logout.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/move.vsp b/binsrc/tutorial/wap/wa_b_3/move.vsp
index f92b785..c60dc08 100644
--- a/binsrc/tutorial/wap/wa_b_3/move.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/move.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: move.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: move.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/options.xml b/binsrc/tutorial/wap/wa_b_3/options.xml
index 6c85671..878ee0c 100644
--- a/binsrc/tutorial/wap/wa_b_3/options.xml
+++ b/binsrc/tutorial/wap/wa_b_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/password.vsp b/binsrc/tutorial/wap/wa_b_3/password.vsp
index 1b8a94a..99a2dfe 100644
--- a/binsrc/tutorial/wap/wa_b_3/password.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/password.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: password.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: password.vsp,v 1.2.2.1 2012/03/08 12:55:15 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/personal.vsp b/binsrc/tutorial/wap/wa_b_3/personal.vsp
index b788ad9..bc79f37 100644
--- a/binsrc/tutorial/wap/wa_b_3/personal.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/personal.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: personal.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: personal.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/personal_update.vsp b/binsrc/tutorial/wap/wa_b_3/personal_update.vsp
index 6961ab4..71de859 100644
--- a/binsrc/tutorial/wap/wa_b_3/personal_update.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/personal_update.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: personal_update.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: personal_update.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/pop3account.vsp b/binsrc/tutorial/wap/wa_b_3/pop3account.vsp
index 7fb4316..8b590b5 100644
--- a/binsrc/tutorial/wap/wa_b_3/pop3account.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/pop3account.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: pop3account.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: pop3account.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/pop3account_add.vsp b/binsrc/tutorial/wap/wa_b_3/pop3account_add.vsp
index 57aaa31..824961c 100644
--- a/binsrc/tutorial/wap/wa_b_3/pop3account_add.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/pop3account_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: pop3account_add.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: pop3account_add.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/pop3account_options.vsp b/binsrc/tutorial/wap/wa_b_3/pop3account_options.vsp
index 836044f..ff64b0e 100644
--- a/binsrc/tutorial/wap/wa_b_3/pop3account_options.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/pop3account_options.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: pop3account_options.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: pop3account_options.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/read.vsp b/binsrc/tutorial/wap/wa_b_3/read.vsp
index 09ba7ab..335b9c2 100644
--- a/binsrc/tutorial/wap/wa_b_3/read.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/read.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: read.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: read.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/reply.vsp b/binsrc/tutorial/wap/wa_b_3/reply.vsp
index 9ed19de..78ac3a3 100644
--- a/binsrc/tutorial/wap/wa_b_3/reply.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/reply.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: reply.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: reply.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/save_draft.vsp b/binsrc/tutorial/wap/wa_b_3/save_draft.vsp
index 22ab79a..825956f 100644
--- a/binsrc/tutorial/wap/wa_b_3/save_draft.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/save_draft.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: save_draft.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: save_draft.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/send.vsp b/binsrc/tutorial/wap/wa_b_3/send.vsp
index 8ae2a8d..346ce77 100644
--- a/binsrc/tutorial/wap/wa_b_3/send.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/send.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: send.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: send.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/setting.vsp b/binsrc/tutorial/wap/wa_b_3/setting.vsp
index 1c1709f..2191ac5 100644
--- a/binsrc/tutorial/wap/wa_b_3/setting.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/setting.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: setting.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: setting.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/signup.vsp b/binsrc/tutorial/wap/wa_b_3/signup.vsp
index b2892ba..3922988 100644
--- a/binsrc/tutorial/wap/wa_b_3/signup.vsp
+++ b/binsrc/tutorial/wap/wa_b_3/signup.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: signup.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: signup.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/wa_b_3.sql b/binsrc/tutorial/wap/wa_b_3/wa_b_3.sql
index 4f25eee..5f89b23 100644
--- a/binsrc/tutorial/wap/wa_b_3/wa_b_3.sql
+++ b/binsrc/tutorial/wap/wa_b_3/wa_b_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wa_b_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: wa_b_3.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/wap/wa_b_3/wa_b_3.xml b/binsrc/tutorial/wap/wa_b_3/wa_b_3.xml
index d440410..57d9ae0 100644
--- a/binsrc/tutorial/wap/wa_b_3/wa_b_3.xml
+++ b/binsrc/tutorial/wap/wa_b_3/wa_b_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/Makefile.am b/binsrc/tutorial/web/Makefile.am
index 3a06148..40fcc79 100644
--- a/binsrc/tutorial/web/Makefile.am
+++ b/binsrc/tutorial/web/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/Makefile.in b/binsrc/tutorial/web/Makefile.in
index dbe448c..cfffab5 100644
--- a/binsrc/tutorial/web/Makefile.in
+++ b/binsrc/tutorial/web/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tutorial/web/demo.css b/binsrc/tutorial/web/demo.css
index 3ef4845..9de9739 100644
--- a/binsrc/tutorial/web/demo.css
+++ b/binsrc/tutorial/web/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.3 2007/05/04 11:24:48 source Exp $
+ *  $Id: demo.css,v 1.3.2.1 2012/03/08 12:55:16 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/index.xml b/binsrc/tutorial/web/index.xml
index 1cb5309..e9d1d67 100644
--- a/binsrc/tutorial/web/index.xml
+++ b/binsrc/tutorial/web/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_1/options.xml b/binsrc/tutorial/web/vs_b_1/options.xml
index 8eab197..bb0f05c 100644
--- a/binsrc/tutorial/web/vs_b_1/options.xml
+++ b/binsrc/tutorial/web/vs_b_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_1/vs_b_1.sql b/binsrc/tutorial/web/vs_b_1/vs_b_1.sql
index b015c52..eb8f8f5 100644
--- a/binsrc/tutorial/web/vs_b_1/vs_b_1.sql
+++ b/binsrc/tutorial/web/vs_b_1/vs_b_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_b_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_b_1.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_1/vs_b_1.xml b/binsrc/tutorial/web/vs_b_1/vs_b_1.xml
index e9acf4a..3123cff 100644
--- a/binsrc/tutorial/web/vs_b_1/vs_b_1.xml
+++ b/binsrc/tutorial/web/vs_b_1/vs_b_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_2/options.xml b/binsrc/tutorial/web/vs_b_2/options.xml
index a8c8b11..2eae625 100644
--- a/binsrc/tutorial/web/vs_b_2/options.xml
+++ b/binsrc/tutorial/web/vs_b_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_2/vs_b_2.xml b/binsrc/tutorial/web/vs_b_2/vs_b_2.xml
index e251748..07dc684 100644
--- a/binsrc/tutorial/web/vs_b_2/vs_b_2.xml
+++ b/binsrc/tutorial/web/vs_b_2/vs_b_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_2/vs_b_2_sample_1.vsp b/binsrc/tutorial/web/vs_b_2/vs_b_2_sample_1.vsp
index c628cad..b9d91cf 100644
--- a/binsrc/tutorial/web/vs_b_2/vs_b_2_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_b_2/vs_b_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_2_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_3/vs_b_3.xml b/binsrc/tutorial/web/vs_b_3/vs_b_3.xml
index cd820af..56884db 100644
--- a/binsrc/tutorial/web/vs_b_3/vs_b_3.xml
+++ b/binsrc/tutorial/web/vs_b_3/vs_b_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_1.vsp b/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_1.vsp
index 256b845..1dd658c 100644
--- a/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_3_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_3_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.sql b/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.sql
index 370596b..ab033b4 100644
--- a/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.sql
+++ b/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_b_3_sample_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_b_3_sample_2.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.vsp b/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.vsp
index fe59376..20608a1 100644
--- a/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.vsp
+++ b/binsrc/tutorial/web/vs_b_3/vs_b_3_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_3_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_3_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4.xml b/binsrc/tutorial/web/vs_b_4/vs_b_4.xml
index abb8e0b..d584ea5 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4.xml
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_1.vsp b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_1.vsp
index 252ce5e..cd9affd 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_4_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_4_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_2.vsp b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_2.vsp
index 9552b6a..a779ba5 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_2.vsp
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_4_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_4_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_3.vsp b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_3.vsp
index 241013a..4350d2f 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_3.vsp
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_4_sample_3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_4_sample_3.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_4.vsp b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_4.vsp
index 6fab715..7a1e517 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_4.vsp
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_4.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_4_sample_4.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_4_sample_4.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_5.vsp b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_5.vsp
index 460e34f..baa0603 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_5.vsp
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_5.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_4_sample_5.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_4_sample_5.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_6.vsp b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_6.vsp
index 2d92c90..318c0e8 100644
--- a/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_6.vsp
+++ b/binsrc/tutorial/web/vs_b_4/vs_b_4_sample_6.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_4_sample_6.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_4_sample_6.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_5/vs_b_5.xml b/binsrc/tutorial/web/vs_b_5/vs_b_5.xml
index 56cb9f3..2945881 100644
--- a/binsrc/tutorial/web/vs_b_5/vs_b_5.xml
+++ b/binsrc/tutorial/web/vs_b_5/vs_b_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.html b/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.html
index 5154646..e14a5aa 100644
--- a/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.html
+++ b/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.vsp b/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.vsp
index a5b7a90..61696b0 100644
--- a/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_5_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_5_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_2.vsp b/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_2.vsp
index 1faa633..4b1c785 100644
--- a/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_2.vsp
+++ b/binsrc/tutorial/web/vs_b_5/vs_b_5_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_5_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_5_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_6/deadlock_handler.vsp b/binsrc/tutorial/web/vs_b_6/deadlock_handler.vsp
index 3cf8cb3..57f17b5 100644
--- a/binsrc/tutorial/web/vs_b_6/deadlock_handler.vsp
+++ b/binsrc/tutorial/web/vs_b_6/deadlock_handler.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: deadlock_handler.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: deadlock_handler.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_6/options.xml b/binsrc/tutorial/web/vs_b_6/options.xml
index 07576fc..e8b9a6d 100644
--- a/binsrc/tutorial/web/vs_b_6/options.xml
+++ b/binsrc/tutorial/web/vs_b_6/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_6/vs_b_6.xml b/binsrc/tutorial/web/vs_b_6/vs_b_6.xml
index a32d070..56397a3 100644
--- a/binsrc/tutorial/web/vs_b_6/vs_b_6.xml
+++ b/binsrc/tutorial/web/vs_b_6/vs_b_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_1.vsp b/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_1.vsp
index 17ce9d7..2659162 100644
--- a/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_6_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_6_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_2.vsp b/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_2.vsp
index fe998c0..ea09427 100644
--- a/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_2.vsp
+++ b/binsrc/tutorial/web/vs_b_6/vs_b_6_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_6_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_6_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_7/vs_b_7.xml b/binsrc/tutorial/web/vs_b_7/vs_b_7.xml
index a254dd4..a266751 100644
--- a/binsrc/tutorial/web/vs_b_7/vs_b_7.xml
+++ b/binsrc/tutorial/web/vs_b_7/vs_b_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_7/vs_b_7_ddl.sql b/binsrc/tutorial/web/vs_b_7/vs_b_7_ddl.sql
index bdd5151..7a3df6f 100644
--- a/binsrc/tutorial/web/vs_b_7/vs_b_7_ddl.sql
+++ b/binsrc/tutorial/web/vs_b_7/vs_b_7_ddl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_b_7_ddl.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_b_7_ddl.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_7/vs_b_7_login.vsp b/binsrc/tutorial/web/vs_b_7/vs_b_7_login.vsp
index 6d625ef..b474704 100644
--- a/binsrc/tutorial/web/vs_b_7/vs_b_7_login.vsp
+++ b/binsrc/tutorial/web/vs_b_7/vs_b_7_login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_7_login.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_7_login.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_7/vs_b_7_query.vsp b/binsrc/tutorial/web/vs_b_7/vs_b_7_query.vsp
index bc5c389..5b06e8b 100644
--- a/binsrc/tutorial/web/vs_b_7/vs_b_7_query.vsp
+++ b/binsrc/tutorial/web/vs_b_7/vs_b_7_query.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_7_query.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_7_query.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_7/vs_b_7_register.vsp b/binsrc/tutorial/web/vs_b_7/vs_b_7_register.vsp
index 8a2ad45..106807b 100644
--- a/binsrc/tutorial/web/vs_b_7/vs_b_7_register.vsp
+++ b/binsrc/tutorial/web/vs_b_7/vs_b_7_register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_7_register.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_7_register.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_8/vs_b_8.xml b/binsrc/tutorial/web/vs_b_8/vs_b_8.xml
index f826392..1efa8ad 100644
--- a/binsrc/tutorial/web/vs_b_8/vs_b_8.xml
+++ b/binsrc/tutorial/web/vs_b_8/vs_b_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_8/vs_b_8_ddl.sql b/binsrc/tutorial/web/vs_b_8/vs_b_8_ddl.sql
index 41ff75d..0d01812 100644
--- a/binsrc/tutorial/web/vs_b_8/vs_b_8_ddl.sql
+++ b/binsrc/tutorial/web/vs_b_8/vs_b_8_ddl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_b_8_ddl.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_b_8_ddl.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_8/vs_b_8_media.vsp b/binsrc/tutorial/web/vs_b_8/vs_b_8_media.vsp
index 6ab6f8e..ce30cf8 100644
--- a/binsrc/tutorial/web/vs_b_8/vs_b_8_media.vsp
+++ b/binsrc/tutorial/web/vs_b_8/vs_b_8_media.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_8_media.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_8_media.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_9/vs_b_9.xml b/binsrc/tutorial/web/vs_b_9/vs_b_9.xml
index be8c408..d49b027 100644
--- a/binsrc/tutorial/web/vs_b_9/vs_b_9.xml
+++ b/binsrc/tutorial/web/vs_b_9/vs_b_9.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_b_9/vs_b_9_sample_1.vsp b/binsrc/tutorial/web/vs_b_9/vs_b_9_sample_1.vsp
index 2fc185c..90e2fba 100644
--- a/binsrc/tutorial/web/vs_b_9/vs_b_9_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_b_9/vs_b_9_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_b_9_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_b_9_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_c_1/long_task.vsp b/binsrc/tutorial/web/vs_c_1/long_task.vsp
index 737fbe4..7e936e7 100644
--- a/binsrc/tutorial/web/vs_c_1/long_task.vsp
+++ b/binsrc/tutorial/web/vs_c_1/long_task.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: long_task.vsp,v 1.3 2008/12/11 14:27:28 source Exp $
+--  $Id: long_task.vsp,v 1.3.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_c_1/vs_c_1.xml b/binsrc/tutorial/web/vs_c_1/vs_c_1.xml
index 41faba2..0346d02 100644
--- a/binsrc/tutorial/web/vs_c_1/vs_c_1.xml
+++ b/binsrc/tutorial/web/vs_c_1/vs_c_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_c_1/vs_c_1_sample_1.vsp b/binsrc/tutorial/web/vs_c_1/vs_c_1_sample_1.vsp
index fa4cad8..c8dd1b9 100644
--- a/binsrc/tutorial/web/vs_c_1/vs_c_1_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_c_1/vs_c_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_c_1_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_c_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_1/vs_d_1.xml b/binsrc/tutorial/web/vs_d_1/vs_d_1.xml
index 1f9c401..ea64adf 100644
--- a/binsrc/tutorial/web/vs_d_1/vs_d_1.xml
+++ b/binsrc/tutorial/web/vs_d_1/vs_d_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_2/propfind.vsp b/binsrc/tutorial/web/vs_d_2/propfind.vsp
index f6cbc9f..1db145c 100644
--- a/binsrc/tutorial/web/vs_d_2/propfind.vsp
+++ b/binsrc/tutorial/web/vs_d_2/propfind.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: propfind.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: propfind.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_2/proppatch.vsp b/binsrc/tutorial/web/vs_d_2/proppatch.vsp
index c2d3da1..4f7e6a9 100644
--- a/binsrc/tutorial/web/vs_d_2/proppatch.vsp
+++ b/binsrc/tutorial/web/vs_d_2/proppatch.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: proppatch.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: proppatch.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_3/options.xml b/binsrc/tutorial/web/vs_d_3/options.xml
index 52d2d64..557233e 100644
--- a/binsrc/tutorial/web/vs_d_3/options.xml
+++ b/binsrc/tutorial/web/vs_d_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_3/vs_d_3.xml b/binsrc/tutorial/web/vs_d_3/vs_d_3.xml
index dd623a5..240c9e5 100644
--- a/binsrc/tutorial/web/vs_d_3/vs_d_3.xml
+++ b/binsrc/tutorial/web/vs_d_3/vs_d_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_3/vs_d_3_sample.sql b/binsrc/tutorial/web/vs_d_3/vs_d_3_sample.sql
index b7678a6..4e5fb36 100644
--- a/binsrc/tutorial/web/vs_d_3/vs_d_3_sample.sql
+++ b/binsrc/tutorial/web/vs_d_3/vs_d_3_sample.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_d_3_sample.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_d_3_sample.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_4/options.xml b/binsrc/tutorial/web/vs_d_4/options.xml
index 8c7e93d..bcbd218 100644
--- a/binsrc/tutorial/web/vs_d_4/options.xml
+++ b/binsrc/tutorial/web/vs_d_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_4/vs_d_4.xml b/binsrc/tutorial/web/vs_d_4/vs_d_4.xml
index b9c91ef..00951b8 100644
--- a/binsrc/tutorial/web/vs_d_4/vs_d_4.xml
+++ b/binsrc/tutorial/web/vs_d_4/vs_d_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_5/vs_d_5.xml b/binsrc/tutorial/web/vs_d_5/vs_d_5.xml
index 8019104..b0b0bef 100644
--- a/binsrc/tutorial/web/vs_d_5/vs_d_5.xml
+++ b/binsrc/tutorial/web/vs_d_5/vs_d_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_5/vs_d_5_sample_1.vsp b/binsrc/tutorial/web/vs_d_5/vs_d_5_sample_1.vsp
index bb2a76a..63fe98c 100644
--- a/binsrc/tutorial/web/vs_d_5/vs_d_5_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_d_5/vs_d_5_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_d_5_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_d_5_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_6/vs_d_6.xml b/binsrc/tutorial/web/vs_d_6/vs_d_6.xml
index 1a89eca..f457fab 100644
--- a/binsrc/tutorial/web/vs_d_6/vs_d_6.xml
+++ b/binsrc/tutorial/web/vs_d_6/vs_d_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_6/vs_d_6_sample_1.vsp b/binsrc/tutorial/web/vs_d_6/vs_d_6_sample_1.vsp
index 615eb9d..e5d8e19 100644
--- a/binsrc/tutorial/web/vs_d_6/vs_d_6_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_d_6/vs_d_6_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_d_6_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_d_6_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_7/options.xml b/binsrc/tutorial/web/vs_d_7/options.xml
index 190d017..e0ef80f 100644
--- a/binsrc/tutorial/web/vs_d_7/options.xml
+++ b/binsrc/tutorial/web/vs_d_7/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_7/vs_d_7.sql b/binsrc/tutorial/web/vs_d_7/vs_d_7.sql
index c3c1792..f4f2738 100644
--- a/binsrc/tutorial/web/vs_d_7/vs_d_7.sql
+++ b/binsrc/tutorial/web/vs_d_7/vs_d_7.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_d_7.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_d_7.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_7/vs_d_7.xml b/binsrc/tutorial/web/vs_d_7/vs_d_7.xml
index 5c2d532..cfff868 100644
--- a/binsrc/tutorial/web/vs_d_7/vs_d_7.xml
+++ b/binsrc/tutorial/web/vs_d_7/vs_d_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/default.vsp b/binsrc/tutorial/web/vs_d_8/default.vsp
index 8727076..cef3dc4 100644
--- a/binsrc/tutorial/web/vs_d_8/default.vsp
+++ b/binsrc/tutorial/web/vs_d_8/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/front.vsp b/binsrc/tutorial/web/vs_d_8/front.vsp
index 5c5d377..d90505d 100644
--- a/binsrc/tutorial/web/vs_d_8/front.vsp
+++ b/binsrc/tutorial/web/vs_d_8/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/login.vsp b/binsrc/tutorial/web/vs_d_8/login.vsp
index 0acbef6..8819cdd 100644
--- a/binsrc/tutorial/web/vs_d_8/login.vsp
+++ b/binsrc/tutorial/web/vs_d_8/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/options.xml b/binsrc/tutorial/web/vs_d_8/options.xml
index 1406b39..430bdd3 100644
--- a/binsrc/tutorial/web/vs_d_8/options.xml
+++ b/binsrc/tutorial/web/vs_d_8/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/query_gen.vsp b/binsrc/tutorial/web/vs_d_8/query_gen.vsp
index 8a1483d..4740267 100644
--- a/binsrc/tutorial/web/vs_d_8/query_gen.vsp
+++ b/binsrc/tutorial/web/vs_d_8/query_gen.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: query_gen.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: query_gen.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/register.vsp b/binsrc/tutorial/web/vs_d_8/register.vsp
index 31ad276..ff46aab 100644
--- a/binsrc/tutorial/web/vs_d_8/register.vsp
+++ b/binsrc/tutorial/web/vs_d_8/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/vs_d_8.sql b/binsrc/tutorial/web/vs_d_8/vs_d_8.sql
index 9de6857..7902d70 100644
--- a/binsrc/tutorial/web/vs_d_8/vs_d_8.sql
+++ b/binsrc/tutorial/web/vs_d_8/vs_d_8.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_d_8.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_d_8.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_d_8/vs_d_8.xml b/binsrc/tutorial/web/vs_d_8/vs_d_8.xml
index 14441e3..1df98f6 100644
--- a/binsrc/tutorial/web/vs_d_8/vs_d_8.xml
+++ b/binsrc/tutorial/web/vs_d_8/vs_d_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_r_1/vs_r_1.sql b/binsrc/tutorial/web/vs_r_1/vs_r_1.sql
index 7a958dd..9044669 100644
--- a/binsrc/tutorial/web/vs_r_1/vs_r_1.sql
+++ b/binsrc/tutorial/web/vs_r_1/vs_r_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_r_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_r_1.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_r_1/vs_r_1.xml b/binsrc/tutorial/web/vs_r_1/vs_r_1.xml
index a5de033..68382d6 100644
--- a/binsrc/tutorial/web/vs_r_1/vs_r_1.xml
+++ b/binsrc/tutorial/web/vs_r_1/vs_r_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_r_1/vs_r_1_run.vsp b/binsrc/tutorial/web/vs_r_1/vs_r_1_run.vsp
index d6d9f14..3d17517 100644
--- a/binsrc/tutorial/web/vs_r_1/vs_r_1_run.vsp
+++ b/binsrc/tutorial/web/vs_r_1/vs_r_1_run.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_r_1_run.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_r_1_run.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_r_1/vs_r_1_stat.vsp b/binsrc/tutorial/web/vs_r_1/vs_r_1_stat.vsp
index 8eae2cc..26b6522 100644
--- a/binsrc/tutorial/web/vs_r_1/vs_r_1_stat.vsp
+++ b/binsrc/tutorial/web/vs_r_1/vs_r_1_stat.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_r_1_stat.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_r_1_stat.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_1/vs_s_1.xml b/binsrc/tutorial/web/vs_s_1/vs_s_1.xml
index 04fe87f..eeed3d4 100644
--- a/binsrc/tutorial/web/vs_s_1/vs_s_1.xml
+++ b/binsrc/tutorial/web/vs_s_1/vs_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_2/options.xml b/binsrc/tutorial/web/vs_s_2/options.xml
index 536e5b4..b9ece81 100644
--- a/binsrc/tutorial/web/vs_s_2/options.xml
+++ b/binsrc/tutorial/web/vs_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_2/vs_s_2.xml b/binsrc/tutorial/web/vs_s_2/vs_s_2.xml
index ed1d7f2..75e40dc 100644
--- a/binsrc/tutorial/web/vs_s_2/vs_s_2.xml
+++ b/binsrc/tutorial/web/vs_s_2/vs_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.sql b/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.sql
index 112ab30..1b718c1 100644
--- a/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.sql
+++ b/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_s_2_sample_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_s_2_sample_1.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.vsp b/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.vsp
index 1dc1b85..ab0f909 100644
--- a/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_s_2/vs_s_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_s_2_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_s_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_3/vs_s_3.sql b/binsrc/tutorial/web/vs_s_3/vs_s_3.sql
index 850dfe0..3d40720 100644
--- a/binsrc/tutorial/web/vs_s_3/vs_s_3.sql
+++ b/binsrc/tutorial/web/vs_s_3/vs_s_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_s_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_s_3.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_3/vs_s_3.xml b/binsrc/tutorial/web/vs_s_3/vs_s_3.xml
index 8c23644..fc5d5bb 100644
--- a/binsrc/tutorial/web/vs_s_3/vs_s_3.xml
+++ b/binsrc/tutorial/web/vs_s_3/vs_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_4/options.xml b/binsrc/tutorial/web/vs_s_4/options.xml
index 190d017..e0ef80f 100644
--- a/binsrc/tutorial/web/vs_s_4/options.xml
+++ b/binsrc/tutorial/web/vs_s_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_4/vs_s_4.sql b/binsrc/tutorial/web/vs_s_4/vs_s_4.sql
index a10d9bf..358f32a 100644
--- a/binsrc/tutorial/web/vs_s_4/vs_s_4.sql
+++ b/binsrc/tutorial/web/vs_s_4/vs_s_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_s_4.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_s_4.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_4/vs_s_4.xml b/binsrc/tutorial/web/vs_s_4/vs_s_4.xml
index c17a1cc..80b6ce5 100644
--- a/binsrc/tutorial/web/vs_s_4/vs_s_4.xml
+++ b/binsrc/tutorial/web/vs_s_4/vs_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_5/options.xml b/binsrc/tutorial/web/vs_s_5/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/web/vs_s_5/options.xml
+++ b/binsrc/tutorial/web/vs_s_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_5/vs_s_5.sql b/binsrc/tutorial/web/vs_s_5/vs_s_5.sql
index 3b02179..93b5fa5 100644
--- a/binsrc/tutorial/web/vs_s_5/vs_s_5.sql
+++ b/binsrc/tutorial/web/vs_s_5/vs_s_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_s_5.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_s_5.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_5/vs_s_5.xml b/binsrc/tutorial/web/vs_s_5/vs_s_5.xml
index 6693799..5d3eaf7 100644
--- a/binsrc/tutorial/web/vs_s_5/vs_s_5.xml
+++ b/binsrc/tutorial/web/vs_s_5/vs_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_6/options.xml b/binsrc/tutorial/web/vs_s_6/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/web/vs_s_6/options.xml
+++ b/binsrc/tutorial/web/vs_s_6/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_6/vs_s_6.sql b/binsrc/tutorial/web/vs_s_6/vs_s_6.sql
index 27f358d..09e19d2 100644
--- a/binsrc/tutorial/web/vs_s_6/vs_s_6.sql
+++ b/binsrc/tutorial/web/vs_s_6/vs_s_6.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_s_6.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_s_6.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_6/vs_s_6.xml b/binsrc/tutorial/web/vs_s_6/vs_s_6.xml
index 7e06239..3ca6c10 100644
--- a/binsrc/tutorial/web/vs_s_6/vs_s_6.xml
+++ b/binsrc/tutorial/web/vs_s_6/vs_s_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_s_7/vs_s_7.xml b/binsrc/tutorial/web/vs_s_7/vs_s_7.xml
index 116a642..ed25772 100644
--- a/binsrc/tutorial/web/vs_s_7/vs_s_7.xml
+++ b/binsrc/tutorial/web/vs_s_7/vs_s_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_1/vs_u_1.xml b/binsrc/tutorial/web/vs_u_1/vs_u_1.xml
index f8704a3..da58ce7 100644
--- a/binsrc/tutorial/web/vs_u_1/vs_u_1.xml
+++ b/binsrc/tutorial/web/vs_u_1/vs_u_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/default.vsp b/binsrc/tutorial/web/vs_u_2/default.vsp
index d2bf7cd..47e6708 100644
--- a/binsrc/tutorial/web/vs_u_2/default.vsp
+++ b/binsrc/tutorial/web/vs_u_2/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/front.vsp b/binsrc/tutorial/web/vs_u_2/front.vsp
index 7ede421..de3c94d 100644
--- a/binsrc/tutorial/web/vs_u_2/front.vsp
+++ b/binsrc/tutorial/web/vs_u_2/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/login.vsp b/binsrc/tutorial/web/vs_u_2/login.vsp
index 7f50f9f..d296f19 100644
--- a/binsrc/tutorial/web/vs_u_2/login.vsp
+++ b/binsrc/tutorial/web/vs_u_2/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/options.xml b/binsrc/tutorial/web/vs_u_2/options.xml
index 4ca091a..bc26491 100644
--- a/binsrc/tutorial/web/vs_u_2/options.xml
+++ b/binsrc/tutorial/web/vs_u_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/register.vsp b/binsrc/tutorial/web/vs_u_2/register.vsp
index 6955893..8c0311b 100644
--- a/binsrc/tutorial/web/vs_u_2/register.vsp
+++ b/binsrc/tutorial/web/vs_u_2/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/vs_u_2.sql b/binsrc/tutorial/web/vs_u_2/vs_u_2.sql
index c513ef0..cc7008e 100644
--- a/binsrc/tutorial/web/vs_u_2/vs_u_2.sql
+++ b/binsrc/tutorial/web/vs_u_2/vs_u_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_u_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_u_2.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_2/vs_u_2.xml b/binsrc/tutorial/web/vs_u_2/vs_u_2.xml
index 4ff66c7..9ed8ea7 100644
--- a/binsrc/tutorial/web/vs_u_2/vs_u_2.xml
+++ b/binsrc/tutorial/web/vs_u_2/vs_u_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/default.vsp b/binsrc/tutorial/web/vs_u_3/default.vsp
index 15561a0..cf25a67 100644
--- a/binsrc/tutorial/web/vs_u_3/default.vsp
+++ b/binsrc/tutorial/web/vs_u_3/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/front.vsp b/binsrc/tutorial/web/vs_u_3/front.vsp
index 517c2a0..a6e9adf 100644
--- a/binsrc/tutorial/web/vs_u_3/front.vsp
+++ b/binsrc/tutorial/web/vs_u_3/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/login.vsp b/binsrc/tutorial/web/vs_u_3/login.vsp
index 4f5c10e..cc71133 100644
--- a/binsrc/tutorial/web/vs_u_3/login.vsp
+++ b/binsrc/tutorial/web/vs_u_3/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/options.xml b/binsrc/tutorial/web/vs_u_3/options.xml
index 0b753fb..1553a74 100644
--- a/binsrc/tutorial/web/vs_u_3/options.xml
+++ b/binsrc/tutorial/web/vs_u_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/register.vsp b/binsrc/tutorial/web/vs_u_3/register.vsp
index 6c0a4f1..0e0d59d 100644
--- a/binsrc/tutorial/web/vs_u_3/register.vsp
+++ b/binsrc/tutorial/web/vs_u_3/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/vs_u_3.sql b/binsrc/tutorial/web/vs_u_3/vs_u_3.sql
index 4cc32a5..a9e5da9 100644
--- a/binsrc/tutorial/web/vs_u_3/vs_u_3.sql
+++ b/binsrc/tutorial/web/vs_u_3/vs_u_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_u_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_u_3.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_3/vs_u_3.xml b/binsrc/tutorial/web/vs_u_3/vs_u_3.xml
index adbf692..16613ac 100644
--- a/binsrc/tutorial/web/vs_u_3/vs_u_3.xml
+++ b/binsrc/tutorial/web/vs_u_3/vs_u_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/default.vsp b/binsrc/tutorial/web/vs_u_4/default.vsp
index 518af4d..3e2ab4e 100644
--- a/binsrc/tutorial/web/vs_u_4/default.vsp
+++ b/binsrc/tutorial/web/vs_u_4/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/front.vsp b/binsrc/tutorial/web/vs_u_4/front.vsp
index d916bdd..45621e9 100644
--- a/binsrc/tutorial/web/vs_u_4/front.vsp
+++ b/binsrc/tutorial/web/vs_u_4/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/logout.vsp b/binsrc/tutorial/web/vs_u_4/logout.vsp
index 2977520..700fe94 100644
--- a/binsrc/tutorial/web/vs_u_4/logout.vsp
+++ b/binsrc/tutorial/web/vs_u_4/logout.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: logout.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: logout.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/options.xml b/binsrc/tutorial/web/vs_u_4/options.xml
index 9cfd6ce..db93532 100644
--- a/binsrc/tutorial/web/vs_u_4/options.xml
+++ b/binsrc/tutorial/web/vs_u_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/register.vsp b/binsrc/tutorial/web/vs_u_4/register.vsp
index 8006f1d..eeb5ee4 100644
--- a/binsrc/tutorial/web/vs_u_4/register.vsp
+++ b/binsrc/tutorial/web/vs_u_4/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/vs_u_4.sql b/binsrc/tutorial/web/vs_u_4/vs_u_4.sql
index 3762fdd..f1b25a8 100644
--- a/binsrc/tutorial/web/vs_u_4/vs_u_4.sql
+++ b/binsrc/tutorial/web/vs_u_4/vs_u_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_u_4.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_u_4.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_4/vs_u_4.xml b/binsrc/tutorial/web/vs_u_4/vs_u_4.xml
index 18195c4..7d160d4 100644
--- a/binsrc/tutorial/web/vs_u_4/vs_u_4.xml
+++ b/binsrc/tutorial/web/vs_u_4/vs_u_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/default.vsp b/binsrc/tutorial/web/vs_u_5/default.vsp
index 60a9b88..41584a8 100644
--- a/binsrc/tutorial/web/vs_u_5/default.vsp
+++ b/binsrc/tutorial/web/vs_u_5/default.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: default.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: default.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/front.vsp b/binsrc/tutorial/web/vs_u_5/front.vsp
index 213328f..28b272f 100644
--- a/binsrc/tutorial/web/vs_u_5/front.vsp
+++ b/binsrc/tutorial/web/vs_u_5/front.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: front.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: front.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/login.vsp b/binsrc/tutorial/web/vs_u_5/login.vsp
index b6f782e..d8bf497 100644
--- a/binsrc/tutorial/web/vs_u_5/login.vsp
+++ b/binsrc/tutorial/web/vs_u_5/login.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: login.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: login.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/options.xml b/binsrc/tutorial/web/vs_u_5/options.xml
index 78995b3..44490c6 100644
--- a/binsrc/tutorial/web/vs_u_5/options.xml
+++ b/binsrc/tutorial/web/vs_u_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/register.vsp b/binsrc/tutorial/web/vs_u_5/register.vsp
index ed94fad..761022a 100644
--- a/binsrc/tutorial/web/vs_u_5/register.vsp
+++ b/binsrc/tutorial/web/vs_u_5/register.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: register.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: register.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/vs_u_5.sql b/binsrc/tutorial/web/vs_u_5/vs_u_5.sql
index 53738d0..0b547d4 100644
--- a/binsrc/tutorial/web/vs_u_5/vs_u_5.sql
+++ b/binsrc/tutorial/web/vs_u_5/vs_u_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_u_5.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_u_5.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_5/vs_u_5.xml b/binsrc/tutorial/web/vs_u_5/vs_u_5.xml
index 06da023..9293e25 100644
--- a/binsrc/tutorial/web/vs_u_5/vs_u_5.xml
+++ b/binsrc/tutorial/web/vs_u_5/vs_u_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_7/options.xml b/binsrc/tutorial/web/vs_u_7/options.xml
index 6d691a0..4bab9ca 100644
--- a/binsrc/tutorial/web/vs_u_7/options.xml
+++ b/binsrc/tutorial/web/vs_u_7/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_7/vs_u_7.sql b/binsrc/tutorial/web/vs_u_7/vs_u_7.sql
index 2923eb8..9ec9c1a 100644
--- a/binsrc/tutorial/web/vs_u_7/vs_u_7.sql
+++ b/binsrc/tutorial/web/vs_u_7/vs_u_7.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vs_u_7.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vs_u_7.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_7/vs_u_7.xml b/binsrc/tutorial/web/vs_u_7/vs_u_7.xml
index 4da02cb..e0dfb8b 100644
--- a/binsrc/tutorial/web/vs_u_7/vs_u_7.xml
+++ b/binsrc/tutorial/web/vs_u_7/vs_u_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_1.vsp b/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_1.vsp
index 389758e..d407638 100644
--- a/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_1.vsp
+++ b/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_u_7_sample_1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_u_7_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_2.vsp b/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_2.vsp
index b2cb091..193be05 100644
--- a/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_2.vsp
+++ b/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_u_7_sample_2.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_u_7_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_3.vsp b/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_3.vsp
index 4ee1040..ae50f49 100644
--- a/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_3.vsp
+++ b/binsrc/tutorial/web/vs_u_7/vs_u_7_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_u_7_sample_3.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_u_7_sample_3.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/options.xml b/binsrc/tutorial/web/vs_x_1/options.xml
index a29e8ff..a7626d9 100644
--- a/binsrc/tutorial/web/vs_x_1/options.xml
+++ b/binsrc/tutorial/web/vs_x_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/shippers.vsp b/binsrc/tutorial/web/vs_x_1/shippers.vsp
index 21e8305..4dddf0b 100644
--- a/binsrc/tutorial/web/vs_x_1/shippers.vsp
+++ b/binsrc/tutorial/web/vs_x_1/shippers.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: shippers.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: shippers.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/shippers.xsl b/binsrc/tutorial/web/vs_x_1/shippers.xsl
index f02dc25..05a4260 100644
--- a/binsrc/tutorial/web/vs_x_1/shippers.xsl
+++ b/binsrc/tutorial/web/vs_x_1/shippers.xsl
@@ -1,11 +1,11 @@
 <!--
  -  
- -  $Id: shippers.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: shippers.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/tsales.vsp b/binsrc/tutorial/web/vs_x_1/tsales.vsp
index 0093c8a..d2f1ef4 100644
--- a/binsrc/tutorial/web/vs_x_1/tsales.vsp
+++ b/binsrc/tutorial/web/vs_x_1/tsales.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: tsales.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: tsales.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/tsales.xsl b/binsrc/tutorial/web/vs_x_1/tsales.xsl
index fc16e67..f30aa3c 100644
--- a/binsrc/tutorial/web/vs_x_1/tsales.xsl
+++ b/binsrc/tutorial/web/vs_x_1/tsales.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tsales.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: tsales.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/tsales1.vsp b/binsrc/tutorial/web/vs_x_1/tsales1.vsp
index 104d7ad..fd17613 100644
--- a/binsrc/tutorial/web/vs_x_1/tsales1.vsp
+++ b/binsrc/tutorial/web/vs_x_1/tsales1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: tsales1.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: tsales1.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/tsales2.xsl b/binsrc/tutorial/web/vs_x_1/tsales2.xsl
index bd6d3cc..9c19582 100644
--- a/binsrc/tutorial/web/vs_x_1/tsales2.xsl
+++ b/binsrc/tutorial/web/vs_x_1/tsales2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tsales2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: tsales2.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_1/vs_x_1.xml b/binsrc/tutorial/web/vs_x_1/vs_x_1.xml
index ba248e4..38f3063 100644
--- a/binsrc/tutorial/web/vs_x_1/vs_x_1.xml
+++ b/binsrc/tutorial/web/vs_x_1/vs_x_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_2/options.xml b/binsrc/tutorial/web/vs_x_2/options.xml
index a29e8ff..a7626d9 100644
--- a/binsrc/tutorial/web/vs_x_2/options.xml
+++ b/binsrc/tutorial/web/vs_x_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_2/shippers.vsp b/binsrc/tutorial/web/vs_x_2/shippers.vsp
index 6f23af2..fd09938 100644
--- a/binsrc/tutorial/web/vs_x_2/shippers.vsp
+++ b/binsrc/tutorial/web/vs_x_2/shippers.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: shippers.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: shippers.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_2/shippers.xsl b/binsrc/tutorial/web/vs_x_2/shippers.xsl
index af2e96b..6b3a282 100644
--- a/binsrc/tutorial/web/vs_x_2/shippers.xsl
+++ b/binsrc/tutorial/web/vs_x_2/shippers.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: shippers.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: shippers.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_2/vs_x_2.xml b/binsrc/tutorial/web/vs_x_2/vs_x_2.xml
index 3ad9172..98a87a1 100644
--- a/binsrc/tutorial/web/vs_x_2/vs_x_2.xml
+++ b/binsrc/tutorial/web/vs_x_2/vs_x_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_3/options.xml b/binsrc/tutorial/web/vs_x_3/options.xml
index a29e8ff..a7626d9 100644
--- a/binsrc/tutorial/web/vs_x_3/options.xml
+++ b/binsrc/tutorial/web/vs_x_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_3/shippers.vsp b/binsrc/tutorial/web/vs_x_3/shippers.vsp
index f5c62cd..1dffc0c 100644
--- a/binsrc/tutorial/web/vs_x_3/shippers.vsp
+++ b/binsrc/tutorial/web/vs_x_3/shippers.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: shippers.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: shippers.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_3/shippers.xsl b/binsrc/tutorial/web/vs_x_3/shippers.xsl
index 08dc12a..4755ccc 100644
--- a/binsrc/tutorial/web/vs_x_3/shippers.xsl
+++ b/binsrc/tutorial/web/vs_x_3/shippers.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: shippers.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: shippers.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_x_3/vs_x_3.xml b/binsrc/tutorial/web/vs_x_3/vs_x_3.xml
index b2f737f..a56130d 100644
--- a/binsrc/tutorial/web/vs_x_3/vs_x_3.xml
+++ b/binsrc/tutorial/web/vs_x_3/vs_x_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_1/options.xml b/binsrc/tutorial/web/vs_xr_1/options.xml
index a29e8ff..a7626d9 100644
--- a/binsrc/tutorial/web/vs_xr_1/options.xml
+++ b/binsrc/tutorial/web/vs_xr_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xml b/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xml
index c3ac390..bb722a1 100644
--- a/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xml
+++ b/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xsl b/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xsl
index 56985ed..2619dfb 100644
--- a/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xsl
+++ b/binsrc/tutorial/web/vs_xr_1/vs_xr_1.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vs_xr_1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vs_xr_1.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_1/vs_xr_1_qry.vsp b/binsrc/tutorial/web/vs_xr_1/vs_xr_1_qry.vsp
index f84ac63..2026d4b 100644
--- a/binsrc/tutorial/web/vs_xr_1/vs_xr_1_qry.vsp
+++ b/binsrc/tutorial/web/vs_xr_1/vs_xr_1_qry.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_xr_1_qry.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_xr_1_qry.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_2/options.xml b/binsrc/tutorial/web/vs_xr_2/options.xml
index a29e8ff..a7626d9 100644
--- a/binsrc/tutorial/web/vs_xr_2/options.xml
+++ b/binsrc/tutorial/web/vs_xr_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xml b/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xml
index 0941bfc..3bf95ef 100644
--- a/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xml
+++ b/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xsl b/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xsl
index a841ef6..6de39de 100644
--- a/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xsl
+++ b/binsrc/tutorial/web/vs_xr_2/vs_xr_2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vs_xr_2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vs_xr_2.xsl,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vs_xr_2/vs_xr_2_qry.vsp b/binsrc/tutorial/web/vs_xr_2/vs_xr_2_qry.vsp
index b71a7cf..d6573f9 100644
--- a/binsrc/tutorial/web/vs_xr_2/vs_xr_2_qry.vsp
+++ b/binsrc/tutorial/web/vs_xr_2/vs_xr_2_qry.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vs_xr_2_qry.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: vs_xr_2_qry.vsp,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_1/options.xml b/binsrc/tutorial/web/vx_s_1/options.xml
index 9fd8902..408d1fd 100644
--- a/binsrc/tutorial/web/vx_s_1/options.xml
+++ b/binsrc/tutorial/web/vx_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_1/simple.vspx b/binsrc/tutorial/web/vx_s_1/simple.vspx
index 5308b1a..6f57cc5 100644
--- a/binsrc/tutorial/web/vx_s_1/simple.vspx
+++ b/binsrc/tutorial/web/vx_s_1/simple.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: simple.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: simple.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_1/vx_s_1.xml b/binsrc/tutorial/web/vx_s_1/vx_s_1.xml
index 7cf1d63..1cdf23d 100644
--- a/binsrc/tutorial/web/vx_s_1/vx_s_1.xml
+++ b/binsrc/tutorial/web/vx_s_1/vx_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_10/order.vspx b/binsrc/tutorial/web/vx_s_10/order.vspx
index 79eb05e..3c5ff28 100644
--- a/binsrc/tutorial/web/vx_s_10/order.vspx
+++ b/binsrc/tutorial/web/vx_s_10/order.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: order.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: order.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_10/vx_s_10.sql b/binsrc/tutorial/web/vx_s_10/vx_s_10.sql
index 3e7ee25..505bf99 100644
--- a/binsrc/tutorial/web/vx_s_10/vx_s_10.sql
+++ b/binsrc/tutorial/web/vx_s_10/vx_s_10.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_10.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_10.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_10/vx_s_10.xml b/binsrc/tutorial/web/vx_s_10/vx_s_10.xml
index 3e99a6e..670b60a 100644
--- a/binsrc/tutorial/web/vx_s_10/vx_s_10.xml
+++ b/binsrc/tutorial/web/vx_s_10/vx_s_10.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_11/options.xml b/binsrc/tutorial/web/vx_s_11/options.xml
index 3bab546..dd9b265 100644
--- a/binsrc/tutorial/web/vx_s_11/options.xml
+++ b/binsrc/tutorial/web/vx_s_11/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_11/vx_s_11.xml b/binsrc/tutorial/web/vx_s_11/vx_s_11.xml
index 4863612..99f96ec 100644
--- a/binsrc/tutorial/web/vx_s_11/vx_s_11.xml
+++ b/binsrc/tutorial/web/vx_s_11/vx_s_11.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_11/vx_s_11_sample.vspx b/binsrc/tutorial/web/vx_s_11/vx_s_11_sample.vspx
index c39180b..51c2b65 100644
--- a/binsrc/tutorial/web/vx_s_11/vx_s_11_sample.vspx
+++ b/binsrc/tutorial/web/vx_s_11/vx_s_11_sample.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vx_s_11_sample.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: vx_s_11_sample.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_12/options.xml b/binsrc/tutorial/web/vx_s_12/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/web/vx_s_12/options.xml
+++ b/binsrc/tutorial/web/vx_s_12/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_12/vx_s_12.sql b/binsrc/tutorial/web/vx_s_12/vx_s_12.sql
index e84306c..10324de 100644
--- a/binsrc/tutorial/web/vx_s_12/vx_s_12.sql
+++ b/binsrc/tutorial/web/vx_s_12/vx_s_12.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_12.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_12.sql,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_12/vx_s_12.xml b/binsrc/tutorial/web/vx_s_12/vx_s_12.xml
index 0605281..9c67106 100644
--- a/binsrc/tutorial/web/vx_s_12/vx_s_12.xml
+++ b/binsrc/tutorial/web/vx_s_12/vx_s_12.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_12/vx_s_12_sample.vspx b/binsrc/tutorial/web/vx_s_12/vx_s_12_sample.vspx
index 742e879..0f9a007 100644
--- a/binsrc/tutorial/web/vx_s_12/vx_s_12_sample.vspx
+++ b/binsrc/tutorial/web/vx_s_12/vx_s_12_sample.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vx_s_12_sample.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: vx_s_12_sample.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/atom.xml b/binsrc/tutorial/web/vx_s_13/atom.xml
index 29b2ebc..f3d9060 100644
--- a/binsrc/tutorial/web/vx_s_13/atom.xml
+++ b/binsrc/tutorial/web/vx_s_13/atom.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: atom.xml,v 1.1 2006/07/13 13:17:49 source Exp $
+ -  $Id: atom.xml,v 1.1.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/c_data.vspx b/binsrc/tutorial/web/vx_s_13/c_data.vspx
index b1d30b6..cb01be2 100644
--- a/binsrc/tutorial/web/vx_s_13/c_data.vspx
+++ b/binsrc/tutorial/web/vx_s_13/c_data.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: c_data.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: c_data.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/c_disp.vspx b/binsrc/tutorial/web/vx_s_13/c_disp.vspx
index b9b765a..57f006e 100644
--- a/binsrc/tutorial/web/vx_s_13/c_disp.vspx
+++ b/binsrc/tutorial/web/vx_s_13/c_disp.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: c_disp.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: c_disp.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/c_edit.vspx b/binsrc/tutorial/web/vx_s_13/c_edit.vspx
index 6d2530b..114eb31 100644
--- a/binsrc/tutorial/web/vx_s_13/c_edit.vspx
+++ b/binsrc/tutorial/web/vx_s_13/c_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: c_edit.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: c_edit.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/countries.xml b/binsrc/tutorial/web/vx_s_13/countries.xml
index f5989f0..d3dbf4f 100644
--- a/binsrc/tutorial/web/vx_s_13/countries.xml
+++ b/binsrc/tutorial/web/vx_s_13/countries.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -
- -  $Id: countries.xml,v 1.1 2006/07/13 13:17:49 source Exp $
+ -  $Id: countries.xml,v 1.1.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/options.xml b/binsrc/tutorial/web/vx_s_13/options.xml
index 65df1ac..ec3e3ce 100644
--- a/binsrc/tutorial/web/vx_s_13/options.xml
+++ b/binsrc/tutorial/web/vx_s_13/options.xml
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: options.xml,v 1.1 2006/07/13 13:17:49 source Exp $
+ -  $Id: options.xml,v 1.1.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/rdf.xml b/binsrc/tutorial/web/vx_s_13/rdf.xml
index c54557d..5999846 100644
--- a/binsrc/tutorial/web/vx_s_13/rdf.xml
+++ b/binsrc/tutorial/web/vx_s_13/rdf.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: rdf.xml,v 1.1 2006/07/13 13:17:49 source Exp $
+ -  $Id: rdf.xml,v 1.1.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/rss.xml b/binsrc/tutorial/web/vx_s_13/rss.xml
index 0590286..94d018f 100644
--- a/binsrc/tutorial/web/vx_s_13/rss.xml
+++ b/binsrc/tutorial/web/vx_s_13/rss.xml
@@ -1,12 +1,12 @@
 <?xml version ='1.0' encoding='UTF-8'?>
 <!--
  -
- -  $Id: rss.xml,v 1.1 2006/07/13 13:17:49 source Exp $
+ -  $Id: rss.xml,v 1.1.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_13/vx_s_13.sql b/binsrc/tutorial/web/vx_s_13/vx_s_13.sql
index 756acf1..90fe240 100644
--- a/binsrc/tutorial/web/vx_s_13/vx_s_13.sql
+++ b/binsrc/tutorial/web/vx_s_13/vx_s_13.sql
@@ -1,10 +1,10 @@
 --
---  $Id: vx_s_13.sql,v 1.1 2006/07/13 13:17:49 source Exp $
+--  $Id: vx_s_13.sql,v 1.1.2.1 2012/03/08 12:55:16 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/check_box.vspx b/binsrc/tutorial/web/vx_s_2/check_box.vspx
index cc0c355..52ad8f9 100644
--- a/binsrc/tutorial/web/vx_s_2/check_box.vspx
+++ b/binsrc/tutorial/web/vx_s_2/check_box.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: check_box.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: check_box.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/date.vspx b/binsrc/tutorial/web/vx_s_2/date.vspx
index cba9613..a60ea02 100644
--- a/binsrc/tutorial/web/vx_s_2/date.vspx
+++ b/binsrc/tutorial/web/vx_s_2/date.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: date.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: date.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/form.vspx b/binsrc/tutorial/web/vx_s_2/form.vspx
index 6b77ef5..26548be 100644
--- a/binsrc/tutorial/web/vx_s_2/form.vspx
+++ b/binsrc/tutorial/web/vx_s_2/form.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: form.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/options.xml b/binsrc/tutorial/web/vx_s_2/options.xml
index 9fd8902..408d1fd 100644
--- a/binsrc/tutorial/web/vx_s_2/options.xml
+++ b/binsrc/tutorial/web/vx_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/radio.vspx b/binsrc/tutorial/web/vx_s_2/radio.vspx
index 3d9112e..08757c8 100644
--- a/binsrc/tutorial/web/vx_s_2/radio.vspx
+++ b/binsrc/tutorial/web/vx_s_2/radio.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: radio.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/radio_group.vspx b/binsrc/tutorial/web/vx_s_2/radio_group.vspx
index abd89c3..2920952 100644
--- a/binsrc/tutorial/web/vx_s_2/radio_group.vspx
+++ b/binsrc/tutorial/web/vx_s_2/radio_group.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: radio_group.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/select.vspx b/binsrc/tutorial/web/vx_s_2/select.vspx
index 2f7bfd6..3d35634 100644
--- a/binsrc/tutorial/web/vx_s_2/select.vspx
+++ b/binsrc/tutorial/web/vx_s_2/select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: select.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: select.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/textarea.vspx b/binsrc/tutorial/web/vx_s_2/textarea.vspx
index bfa74b4..54815b4 100644
--- a/binsrc/tutorial/web/vx_s_2/textarea.vspx
+++ b/binsrc/tutorial/web/vx_s_2/textarea.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: textarea.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: textarea.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_2/vx_s_2.xml b/binsrc/tutorial/web/vx_s_2/vx_s_2.xml
index c3f7a9f..1617998 100644
--- a/binsrc/tutorial/web/vx_s_2/vx_s_2.xml
+++ b/binsrc/tutorial/web/vx_s_2/vx_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_3/data_set.vspx b/binsrc/tutorial/web/vx_s_3/data_set.vspx
index f392917..df59963 100644
--- a/binsrc/tutorial/web/vx_s_3/data_set.vspx
+++ b/binsrc/tutorial/web/vx_s_3/data_set.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_set.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_3/selectdb.vspx b/binsrc/tutorial/web/vx_s_3/selectdb.vspx
index 8c21335..cc5d103 100644
--- a/binsrc/tutorial/web/vx_s_3/selectdb.vspx
+++ b/binsrc/tutorial/web/vx_s_3/selectdb.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: selectdb.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: selectdb.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_3/update_form.vspx b/binsrc/tutorial/web/vx_s_3/update_form.vspx
index 8ad36d1..4270f37 100644
--- a/binsrc/tutorial/web/vx_s_3/update_form.vspx
+++ b/binsrc/tutorial/web/vx_s_3/update_form.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: update_form.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: update_form.vspx,v 1.2.2.1 2012/03/08 12:55:16 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_3/update_radio.vspx b/binsrc/tutorial/web/vx_s_3/update_radio.vspx
index c6d5953..27c8ed0 100644
--- a/binsrc/tutorial/web/vx_s_3/update_radio.vspx
+++ b/binsrc/tutorial/web/vx_s_3/update_radio.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: update_radio.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: update_radio.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_3/vx_s_3.sql b/binsrc/tutorial/web/vx_s_3/vx_s_3.sql
index 2054d61..8d79fb6 100644
--- a/binsrc/tutorial/web/vx_s_3/vx_s_3.sql
+++ b/binsrc/tutorial/web/vx_s_3/vx_s_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_3.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_3/vx_s_3.xml b/binsrc/tutorial/web/vx_s_3/vx_s_3.xml
index 6cb585f..1324e00 100644
--- a/binsrc/tutorial/web/vx_s_3/vx_s_3.xml
+++ b/binsrc/tutorial/web/vx_s_3/vx_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_4/tree.vspx b/binsrc/tutorial/web/vx_s_4/tree.vspx
index 1fb48ab..3380ed2 100644
--- a/binsrc/tutorial/web/vx_s_4/tree.vspx
+++ b/binsrc/tutorial/web/vx_s_4/tree.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tree.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: tree.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_4/vx_s_4.sql b/binsrc/tutorial/web/vx_s_4/vx_s_4.sql
index 2c1c61b..e3ca4e8 100644
--- a/binsrc/tutorial/web/vx_s_4/vx_s_4.sql
+++ b/binsrc/tutorial/web/vx_s_4/vx_s_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_4.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_4.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_4/vx_s_4.xml b/binsrc/tutorial/web/vx_s_4/vx_s_4.xml
index f6c7f7b..70de336 100644
--- a/binsrc/tutorial/web/vx_s_4/vx_s_4.xml
+++ b/binsrc/tutorial/web/vx_s_4/vx_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_5/emp.vspx b/binsrc/tutorial/web/vx_s_5/emp.vspx
index 657c07c..1550310 100644
--- a/binsrc/tutorial/web/vx_s_5/emp.vspx
+++ b/binsrc/tutorial/web/vx_s_5/emp.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: emp.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: emp.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_5/options.xml b/binsrc/tutorial/web/vx_s_5/options.xml
index 2bcbfae..44cad6d 100644
--- a/binsrc/tutorial/web/vx_s_5/options.xml
+++ b/binsrc/tutorial/web/vx_s_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_5/tab.vspx b/binsrc/tutorial/web/vx_s_5/tab.vspx
index c5817c0..e1fe8fd 100644
--- a/binsrc/tutorial/web/vx_s_5/tab.vspx
+++ b/binsrc/tutorial/web/vx_s_5/tab.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: tab.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_5/vx_s_5.sql b/binsrc/tutorial/web/vx_s_5/vx_s_5.sql
index 2898074..37e55a2 100644
--- a/binsrc/tutorial/web/vx_s_5/vx_s_5.sql
+++ b/binsrc/tutorial/web/vx_s_5/vx_s_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_5.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_5.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_5/vx_s_5.xml b/binsrc/tutorial/web/vx_s_5/vx_s_5.xml
index a3c210b..59e94ae 100644
--- a/binsrc/tutorial/web/vx_s_5/vx_s_5.xml
+++ b/binsrc/tutorial/web/vx_s_5/vx_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_6/login.vspx b/binsrc/tutorial/web/vx_s_6/login.vspx
index d481162..156b1cd 100644
--- a/binsrc/tutorial/web/vx_s_6/login.vspx
+++ b/binsrc/tutorial/web/vx_s_6/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: login.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_6/vx_s_6.sql b/binsrc/tutorial/web/vx_s_6/vx_s_6.sql
index 703fea6..00d0419 100644
--- a/binsrc/tutorial/web/vx_s_6/vx_s_6.sql
+++ b/binsrc/tutorial/web/vx_s_6/vx_s_6.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_6.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_6.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_6/vx_s_6.xml b/binsrc/tutorial/web/vx_s_6/vx_s_6.xml
index 7f11a3d..0e7432c 100644
--- a/binsrc/tutorial/web/vx_s_6/vx_s_6.xml
+++ b/binsrc/tutorial/web/vx_s_6/vx_s_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_7/options.xml b/binsrc/tutorial/web/vx_s_7/options.xml
index 568dde4..a8127f5 100644
--- a/binsrc/tutorial/web/vx_s_7/options.xml
+++ b/binsrc/tutorial/web/vx_s_7/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_7/products.vspx b/binsrc/tutorial/web/vx_s_7/products.vspx
index 89c4d4b..f395b99 100644
--- a/binsrc/tutorial/web/vx_s_7/products.vspx
+++ b/binsrc/tutorial/web/vx_s_7/products.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: products.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: products.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_7/sel_category.vspx b/binsrc/tutorial/web/vx_s_7/sel_category.vspx
index 973f206..e03266a 100644
--- a/binsrc/tutorial/web/vx_s_7/sel_category.vspx
+++ b/binsrc/tutorial/web/vx_s_7/sel_category.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sel_category.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: sel_category.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_7/vx_s_7.xml b/binsrc/tutorial/web/vx_s_7/vx_s_7.xml
index 2689f0f..4151e22 100644
--- a/binsrc/tutorial/web/vx_s_7/vx_s_7.xml
+++ b/binsrc/tutorial/web/vx_s_7/vx_s_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_8/formdecor.vspx b/binsrc/tutorial/web/vx_s_8/formdecor.vspx
index 64e5b63..394cf51 100644
--- a/binsrc/tutorial/web/vx_s_8/formdecor.vspx
+++ b/binsrc/tutorial/web/vx_s_8/formdecor.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: formdecor.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: formdecor.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_8/formsty.vspx b/binsrc/tutorial/web/vx_s_8/formsty.vspx
index 109dd45..0bc996e 100644
--- a/binsrc/tutorial/web/vx_s_8/formsty.vspx
+++ b/binsrc/tutorial/web/vx_s_8/formsty.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: formsty.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: formsty.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_8/formsty.xsl b/binsrc/tutorial/web/vx_s_8/formsty.xsl
index 0aa898d..c81131c 100644
--- a/binsrc/tutorial/web/vx_s_8/formsty.xsl
+++ b/binsrc/tutorial/web/vx_s_8/formsty.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: formsty.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: formsty.xsl,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_8/options.xml b/binsrc/tutorial/web/vx_s_8/options.xml
index dd469b3..20a93d3 100644
--- a/binsrc/tutorial/web/vx_s_8/options.xml
+++ b/binsrc/tutorial/web/vx_s_8/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_8/vx_s_8.xml b/binsrc/tutorial/web/vx_s_8/vx_s_8.xml
index 085f5c8..32d019e 100644
--- a/binsrc/tutorial/web/vx_s_8/vx_s_8.xml
+++ b/binsrc/tutorial/web/vx_s_8/vx_s_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/button_0.vspx b/binsrc/tutorial/web/vx_s_9/button_0.vspx
index 3d7b974..e252f02 100644
--- a/binsrc/tutorial/web/vx_s_9/button_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/button_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: button_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/button_1.vspx b/binsrc/tutorial/web/vx_s_9/button_1.vspx
index dd241ae..63a9fca 100644
--- a/binsrc/tutorial/web/vx_s_9/button_1.vspx
+++ b/binsrc/tutorial/web/vx_s_9/button_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button_1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: button_1.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/button_2.vspx b/binsrc/tutorial/web/vx_s_9/button_2.vspx
index 53d93e8..a496719 100644
--- a/binsrc/tutorial/web/vx_s_9/button_2.vspx
+++ b/binsrc/tutorial/web/vx_s_9/button_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button_2.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: button_2.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/button_3.vspx b/binsrc/tutorial/web/vx_s_9/button_3.vspx
index e872c52..7e75919 100644
--- a/binsrc/tutorial/web/vx_s_9/button_3.vspx
+++ b/binsrc/tutorial/web/vx_s_9/button_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button_3.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: button_3.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/calendar_0.vspx b/binsrc/tutorial/web/vx_s_9/calendar_0.vspx
index c8cd07e..f2bf0ec 100644
--- a/binsrc/tutorial/web/vx_s_9/calendar_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/calendar_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: calendar_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: calendar_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/check_box_0.vspx b/binsrc/tutorial/web/vx_s_9/check_box_0.vspx
index becdee8..d3fe541 100644
--- a/binsrc/tutorial/web/vx_s_9/check_box_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/check_box_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: check_box_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: check_box_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/data_grid_0.vspx b/binsrc/tutorial/web/vx_s_9/data_grid_0.vspx
index 07465d7..b7a888f 100644
--- a/binsrc/tutorial/web/vx_s_9/data_grid_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/data_grid_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_grid_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_grid_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/data_list_0.vspx b/binsrc/tutorial/web/vx_s_9/data_list_0.vspx
index 5346096..a7734a7 100644
--- a/binsrc/tutorial/web/vx_s_9/data_list_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/data_list_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_list_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/data_list_1.vspx b/binsrc/tutorial/web/vx_s_9/data_list_1.vspx
index b8c91fd..869ea47 100644
--- a/binsrc/tutorial/web/vx_s_9/data_list_1.vspx
+++ b/binsrc/tutorial/web/vx_s_9/data_list_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list_1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_list_1.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/data_set_0.vspx b/binsrc/tutorial/web/vx_s_9/data_set_0.vspx
index 203bdbc..f81bee7 100644
--- a/binsrc/tutorial/web/vx_s_9/data_set_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/data_set_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_set_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/data_set_1.vspx b/binsrc/tutorial/web/vx_s_9/data_set_1.vspx
index 6e9d33e..0e83b23 100644
--- a/binsrc/tutorial/web/vx_s_9/data_set_1.vspx
+++ b/binsrc/tutorial/web/vx_s_9/data_set_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set_1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_set_1.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/data_source_0.vspx b/binsrc/tutorial/web/vx_s_9/data_source_0.vspx
index 164a06d..80c670c 100644
--- a/binsrc/tutorial/web/vx_s_9/data_source_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/data_source_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_source_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_source_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/error_summary_0.vspx b/binsrc/tutorial/web/vx_s_9/error_summary_0.vspx
index dfb5c59..6b51ed7 100644
--- a/binsrc/tutorial/web/vx_s_9/error_summary_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/error_summary_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: error_summary_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/error_summary_1.vspx b/binsrc/tutorial/web/vx_s_9/error_summary_1.vspx
index 19f01f8..3531f0b 100644
--- a/binsrc/tutorial/web/vx_s_9/error_summary_1.vspx
+++ b/binsrc/tutorial/web/vx_s_9/error_summary_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary_1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: error_summary_1.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/footer.xml b/binsrc/tutorial/web/vx_s_9/footer.xml
index f691826..64c5881 100644
--- a/binsrc/tutorial/web/vx_s_9/footer.xml
+++ b/binsrc/tutorial/web/vx_s_9/footer.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/form_0.vspx b/binsrc/tutorial/web/vx_s_9/form_0.vspx
index 332094e..ba86a05 100644
--- a/binsrc/tutorial/web/vx_s_9/form_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/form_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: form_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/form_1.vspx b/binsrc/tutorial/web/vx_s_9/form_1.vspx
index edc2a5d..097bc4d 100644
--- a/binsrc/tutorial/web/vx_s_9/form_1.vspx
+++ b/binsrc/tutorial/web/vx_s_9/form_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form_1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: form_1.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/include_0.vspx b/binsrc/tutorial/web/vx_s_9/include_0.vspx
index 09e1023..cc8dca1 100644
--- a/binsrc/tutorial/web/vx_s_9/include_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/include_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: include_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: include_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/label_0.vspx b/binsrc/tutorial/web/vx_s_9/label_0.vspx
index b9697fc..6dc6417 100644
--- a/binsrc/tutorial/web/vx_s_9/label_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/label_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: label_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: label_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/login_0.vspx b/binsrc/tutorial/web/vx_s_9/login_0.vspx
index 8f7fe49..9d7b8ff 100644
--- a/binsrc/tutorial/web/vx_s_9/login_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/login_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: login_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/login_form_0.vspx b/binsrc/tutorial/web/vx_s_9/login_form_0.vspx
index 10eecb4..3a3d075 100644
--- a/binsrc/tutorial/web/vx_s_9/login_form_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/login_form_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login_form_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: login_form_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/page_0.vspx b/binsrc/tutorial/web/vx_s_9/page_0.vspx
index b94bb45..976c3e5 100644
--- a/binsrc/tutorial/web/vx_s_9/page_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/page_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: page_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: page_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/radio_button_0.vspx b/binsrc/tutorial/web/vx_s_9/radio_button_0.vspx
index 3c6cb0d..1433523 100644
--- a/binsrc/tutorial/web/vx_s_9/radio_button_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/radio_button_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_button_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: radio_button_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/radio_group_0.vspx b/binsrc/tutorial/web/vx_s_9/radio_group_0.vspx
index 2cfcf54..c74fe51 100644
--- a/binsrc/tutorial/web/vx_s_9/radio_group_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/radio_group_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: radio_group_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/select_list_0.vspx b/binsrc/tutorial/web/vx_s_9/select_list_0.vspx
index 170851b..666180c 100644
--- a/binsrc/tutorial/web/vx_s_9/select_list_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/select_list_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: select_list_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: select_list_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/tab_0.vspx b/binsrc/tutorial/web/vx_s_9/tab_0.vspx
index 0828992..79bac83 100644
--- a/binsrc/tutorial/web/vx_s_9/tab_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/tab_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: tab_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/text_0.vspx b/binsrc/tutorial/web/vx_s_9/text_0.vspx
index e6f01ae..5cdb9c2 100644
--- a/binsrc/tutorial/web/vx_s_9/text_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/text_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: text_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: text_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/text_area_0.vspx b/binsrc/tutorial/web/vx_s_9/text_area_0.vspx
index a416f73..c45a859 100644
--- a/binsrc/tutorial/web/vx_s_9/text_area_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/text_area_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: text_area_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: text_area_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/tree_0.vspx b/binsrc/tutorial/web/vx_s_9/tree_0.vspx
index 83a538b..22f12c6 100644
--- a/binsrc/tutorial/web/vx_s_9/tree_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/tree_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tree_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: tree_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/url_0.vspx b/binsrc/tutorial/web/vx_s_9/url_0.vspx
index a418ed1..452bdba 100644
--- a/binsrc/tutorial/web/vx_s_9/url_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/url_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: url_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: url_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/validator_0.vspx b/binsrc/tutorial/web/vx_s_9/validator_0.vspx
index 4aef7f2..eb720b4 100644
--- a/binsrc/tutorial/web/vx_s_9/validator_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/validator_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: validator_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: validator_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/variable_0.vspx b/binsrc/tutorial/web/vx_s_9/variable_0.vspx
index 59fcb75..bc8c366 100644
--- a/binsrc/tutorial/web/vx_s_9/variable_0.vspx
+++ b/binsrc/tutorial/web/vx_s_9/variable_0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: variable_0.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: variable_0.vspx,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/vx_s_9.sql b/binsrc/tutorial/web/vx_s_9/vx_s_9.sql
index ce36faf..d2eba73 100644
--- a/binsrc/tutorial/web/vx_s_9/vx_s_9.sql
+++ b/binsrc/tutorial/web/vx_s_9/vx_s_9.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vx_s_9.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: vx_s_9.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web/vx_s_9/vx_s_9.xml b/binsrc/tutorial/web/vx_s_9/vx_s_9.xml
index c02cf52..4880d10 100644
--- a/binsrc/tutorial/web/vx_s_9/vx_s_9.xml
+++ b/binsrc/tutorial/web/vx_s_9/vx_s_9.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/web2/index.xml b/binsrc/tutorial/web2/index.xml
index 5b32580..9bbde6c 100644
--- a/binsrc/tutorial/web2/index.xml
+++ b/binsrc/tutorial/web2/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/webid/webid_demo.html b/binsrc/tutorial/webid/webid_demo.html
new file mode 100644
index 0000000..783afa1
--- /dev/null
+++ b/binsrc/tutorial/webid/webid_demo.html
@@ -0,0 +1,100 @@
+<html>
+  <head>
+    <title>WebID Verification Demo - HTML, JS</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+    </style>
+    <script type="text/javascript">
+      function check() {
+        if (document.location.protocol != 'https:') {
+          alert('Please use https protocol');
+          return;
+        }
+
+        var callback = document.location.protocol + '//' + document.location.host + document.location.pathname;
+        document.location = 'https://id.myopenlink.net/ods/webid_verify.vsp?callback=' + encodeURIComponent(callback);
+      }
+      function getObject(id) {
+        return document.getElementById(id)
+      }
+      function hide(id) {
+        var obj = getObject(id);
+        obj.style.display = "none";
+      }
+      function show(id) {
+        var obj = getObject(id);
+        obj.style.display = "";
+      }
+      function getParam(name)
+      {
+        name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+        var regexS = "[\\?&]"+name+"=([^&#]*)";
+        var regex = new RegExp( regexS );
+        var results = regex.exec( window.location.href );
+        if( results == null )
+          return "";
+        else
+          return decodeURIComponent(results[1]);
+      }
+    </script>
+  </head>
+  <body>
+    <h1>WebID Verification Demo - HTML, JS</h1>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <input type="button" name="go" value="Check" id="go" onclick="javascript: return check();" />
+    </div>
+    <div id="result" style="display: none;">
+    	The return values are:
+	    <ul id="result_webid" style="display: none;">
+	      <li>WebID -  <span id="webid"></span></li>
+	      <li>Timestamp in ISO 8601 format - <span id="ts"></span></li>
+	    </ul>
+	    <ul id="result_error" style="display: none;">
+	      <li>Error - <span id="error"></span></li>
+	    </ul>
+    </div>
+    <script type="text/javascript">
+      var webid = getParam('webid');
+      var error = getParam('error');
+      if ((webid != '') || (error != '')) {
+        show('result');
+        if (webid != '') {
+          show('result_webid');
+          getObject('webid').innerHTML = getParam('webid');;
+          getObject('ts').innerHTML = getParam('ts');;
+        } else {
+          hide('result_webid');
+        }
+        if (error != '') {
+          show('result_error');
+          getObject('error').innerHTML = getParam('error');;
+        } else {
+          hide('result_error');
+        }
+      } else {
+        hide('result');
+      }
+    </script>
+  </body>
+</html>
diff --git a/binsrc/tutorial/webid/webid_demo.php b/binsrc/tutorial/webid/webid_demo.php
new file mode 100644
index 0000000..41fd68e
--- /dev/null
+++ b/binsrc/tutorial/webid/webid_demo.php
@@ -0,0 +1,93 @@
+<?php
+  function apiURL()
+  {
+    $pageURL = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
+    $pageURL .= $_SERVER['SERVER_PORT'] <> '80' ? $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] : $_SERVER['SERVER_NAME'];
+    return $pageURL . '/tutorial/webid/webid_demo.php';
+  }
+
+	$_webid = isset ($_REQUEST['webid']) ? $_REQUEST['webid'] : '';
+	$_error = isset ($_REQUEST['error']) ? $_REQUEST['error'] : '';
+	$_action = isset ($_REQUEST['go']) ? $_REQUEST['go'] : '';
+  if (($_webid == '') && ($_error == ''))
+  {
+    if ($_action <> '')
+    {
+      if ($_SERVER['HTTPS'] <> 'on')
+      {
+        $_error = 'No certificate';
+      }
+      else
+      {
+        $_callback = apiURL();
+        $_url = sprintf ('https://id.myopenlink.net/ods/webid_verify.vsp?callback=%s', urlencode($_callback));
+        header (sprintf ('Location: %s', $_url));
+        return;
+      }
+    }
+  }
+?>
+<html>
+  <head>
+    <title>WebID Verification Demo - PHP</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Demo - PHP</h1>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+        <input type="submit" name="go" value="Check"/>
+      </form>
+    </div>
+    <?php
+      if (($_webid <> '') || ($_error <> ''))
+      {
+    ?>
+      <div>
+      	The return values are:
+  	    <ul>
+          <?php
+            if ($_webid <> '')
+            {
+          ?>
+  	      <li>WebID -  <?php print ($_webid); ?></li>
+  	      <li>Timestamp in ISO 8601 format - <?php print ($_REQUEST['ts']); ?></li>
+          <?php
+            }
+            if ($_error <> '')
+            {
+          ?>
+  	      <li>Error - <?php print ($_error); ?></li>
+          <?php
+            }
+          ?>
+  	    </ul>
+      </div>
+    <?php
+      }
+    ?>
+  </body>
+</html>
diff --git a/binsrc/tutorial/webid/webid_demo.vsp b/binsrc/tutorial/webid/webid_demo.vsp
new file mode 100644
index 0000000..04633e1
--- /dev/null
+++ b/binsrc/tutorial/webid/webid_demo.vsp
@@ -0,0 +1,105 @@
+<?vsp
+  declare webid, error, action, hostUrl, url, callback, certificate any;
+
+	webid := get_keyword ('webid', params);
+	error := get_keyword ('error', params);
+	action := get_keyword ('go', params);
+  if (length (webid) or length (error))
+    goto html;
+
+  if (not length (action))
+    goto html;
+
+  if (not is_http_ctx ())
+  {
+    error := 'No certificate';
+    goto html;
+  }
+
+  hostUrl := http_request_header (http_request_header () , 'Host' , null , sys_connected_server_address ());
+  if (isstring (hostUrl) and strchr (hostUrl , ':') is null)
+  {
+    declare hp varchar;
+    declare hpa any;
+
+    hp := sys_connected_server_address ();
+    hpa := split_and_decode (hp , 0 , '\0\0:');
+    if (hpa [1] <> '80')
+      hostUrl := hostUrl || ':' || hpa [1];
+  }
+  if (hostUrl not like 'https://%')
+    hostUrl := 'https://' || hostUrl;
+
+  certificate := client_attr ('client_certificate');
+  callback := hostUrl || '/tutorial/webid/webid_demo.vsp';
+  url := sprintf ('http://id.myopenlink.net/ods/webid_verify.vsp?callback=%U&certificate=%U', callback, certificate);
+  http_status_set (302);
+  http_header (sprintf ('Location: %s\r\n', url));
+  return;
+
+html:
+?>
+<html>
+  <head>
+    <title>WebID Verification Demo - VSP</title>
+    <style type="text/css">
+      body {
+      	background-color: white;
+      	color: black;
+      	font-size: 10pt;
+      	font-family: Verdana, Helvetica, sans-serif;
+      }
+      ul {
+        font-family: Verdana, Helvetica, sans-serif;
+        list-style-type: none;
+      }
+    </style>
+  </head>
+  <body>
+    <h1>WebID Verification Demo - VSP</h1>
+    <div>
+      This will check the WebID watermark in your X.509 Certificate.<br/><br/>
+      This service supports WebIDs based on the following URI schemes (more to come):
+      <ul>
+      	<li>* <b>acct</b>, e.g: <span style="font-size: 80%; color: #1DA237;">acct:ExampleUser at id.example.com</span></li>
+      	<li>* <b>http</b>, e.g: <span style="font-size: 80%; color: #1DA237;">http://id.example.com/person/ExampleUser#this</span></li>
+      	<li>* <b>ldap</b>, e.g: <span style="font-size: 80%; color: #1DA237;">ldap://ldap.example.com/o=An%20Example%5C2C%20Inc.,c=US</span></li>
+      	<li>* <b>mailto</b>, e.g: <span style="font-size: 80%; color: #1DA237;">mailto:ExampleUser at id.example.com</span></li>
+      </ul>
+    </div>
+    <br/>
+    <br/>
+    <div>
+      <form method="get">
+        <input type="submit" name="go" value="Check"/>
+      </form>
+    </div>
+    <?vsp
+      if (length (webid) or length (error))
+      {
+    ?>
+      <div>
+      	The return values are:
+  	    <ul>
+          <?vsp
+            if (length (webid))
+            {
+          ?>
+  	      <li>WebID -  <?V webid ?></li>
+  	      <li>Timestamp in ISO 8601 format - <?V get_keyword ('ts', params) ?></li>
+          <?vsp
+            }
+            if (length (error))
+            {
+          ?>
+  	      <li>Error - <?V error ?></li>
+          <?vsp
+            }
+          ?>
+  	    </ul>
+      </div>
+    <?vsp
+      }
+    ?>
+  </body>
+</html>
diff --git a/binsrc/tutorial/xbel.vsp b/binsrc/tutorial/xbel.vsp
index 0e7460f..ea7381f 100644
--- a/binsrc/tutorial/xbel.vsp
+++ b/binsrc/tutorial/xbel.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xbel.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: xbel.vsp,v 1.2.2.1 2012/03/08 12:55:11 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/Makefile.am b/binsrc/tutorial/xml/Makefile.am
index 7a7c49e..36d36c3 100644
--- a/binsrc/tutorial/xml/Makefile.am
+++ b/binsrc/tutorial/xml/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/Makefile.in b/binsrc/tutorial/xml/Makefile.in
index f07aa05..73241b2 100644
--- a/binsrc/tutorial/xml/Makefile.in
+++ b/binsrc/tutorial/xml/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/tutorial/xml/demo.css b/binsrc/tutorial/xml/demo.css
index fed097d..b0a1355 100644
--- a/binsrc/tutorial/xml/demo.css
+++ b/binsrc/tutorial/xml/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/index.xml b/binsrc/tutorial/xml/index.xml
index 4a09de4..1760358 100644
--- a/binsrc/tutorial/xml/index.xml
+++ b/binsrc/tutorial/xml/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/rq_s_1/options.xml b/binsrc/tutorial/xml/rq_s_1/options.xml
index e6abcae..4c281c9 100644
--- a/binsrc/tutorial/xml/rq_s_1/options.xml
+++ b/binsrc/tutorial/xml/rq_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/rq_s_1/rq_s_1.xml b/binsrc/tutorial/xml/rq_s_1/rq_s_1.xml
index 6bb1a7e..59dacc9 100644
--- a/binsrc/tutorial/xml/rq_s_1/rq_s_1.xml
+++ b/binsrc/tutorial/xml/rq_s_1/rq_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_0/options.xml b/binsrc/tutorial/xml/sx_e_0/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_0/options.xml
+++ b/binsrc/tutorial/xml/sx_e_0/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_0/sx_e_0.xml b/binsrc/tutorial/xml/sx_e_0/sx_e_0.xml
index eca30c5..421a3ae 100644
--- a/binsrc/tutorial/xml/sx_e_0/sx_e_0.xml
+++ b/binsrc/tutorial/xml/sx_e_0/sx_e_0.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_1/options.xml b/binsrc/tutorial/xml/sx_e_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_1/options.xml
+++ b/binsrc/tutorial/xml/sx_e_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_1/sx_e_1.xml b/binsrc/tutorial/xml/sx_e_1/sx_e_1.xml
index 5a12ca4..6d75acb 100644
--- a/binsrc/tutorial/xml/sx_e_1/sx_e_1.xml
+++ b/binsrc/tutorial/xml/sx_e_1/sx_e_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_1/sx_e_1_sample.vsp b/binsrc/tutorial/xml/sx_e_1/sx_e_1_sample.vsp
index 582cc3a..5fb840e 100644
--- a/binsrc/tutorial/xml/sx_e_1/sx_e_1_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_1/sx_e_1_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_1_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_1_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_2/options.xml b/binsrc/tutorial/xml/sx_e_2/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_2/options.xml
+++ b/binsrc/tutorial/xml/sx_e_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_2/sx_e_2.xml b/binsrc/tutorial/xml/sx_e_2/sx_e_2.xml
index 97ff55c..eab1f24 100644
--- a/binsrc/tutorial/xml/sx_e_2/sx_e_2.xml
+++ b/binsrc/tutorial/xml/sx_e_2/sx_e_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_2/sx_e_2_sample.vsp b/binsrc/tutorial/xml/sx_e_2/sx_e_2_sample.vsp
index d2f5182..0d339fe 100644
--- a/binsrc/tutorial/xml/sx_e_2/sx_e_2_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_2/sx_e_2_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_2_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_2_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_3/options.xml b/binsrc/tutorial/xml/sx_e_3/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_3/options.xml
+++ b/binsrc/tutorial/xml/sx_e_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_3/sx_e_3.xml b/binsrc/tutorial/xml/sx_e_3/sx_e_3.xml
index 4d65bc1..cf1cbcb 100644
--- a/binsrc/tutorial/xml/sx_e_3/sx_e_3.xml
+++ b/binsrc/tutorial/xml/sx_e_3/sx_e_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_3/sx_e_3_sample.vsp b/binsrc/tutorial/xml/sx_e_3/sx_e_3_sample.vsp
index c6476b9..aa5af86 100644
--- a/binsrc/tutorial/xml/sx_e_3/sx_e_3_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_3/sx_e_3_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_3_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_3_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_4/options.xml b/binsrc/tutorial/xml/sx_e_4/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_4/options.xml
+++ b/binsrc/tutorial/xml/sx_e_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_4/sx_e_4.xml b/binsrc/tutorial/xml/sx_e_4/sx_e_4.xml
index ac1b3e9..e50ec82 100644
--- a/binsrc/tutorial/xml/sx_e_4/sx_e_4.xml
+++ b/binsrc/tutorial/xml/sx_e_4/sx_e_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_4/sx_e_4_sample.vsp b/binsrc/tutorial/xml/sx_e_4/sx_e_4_sample.vsp
index c16a763..818ae6d 100644
--- a/binsrc/tutorial/xml/sx_e_4/sx_e_4_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_4/sx_e_4_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_4_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_4_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_5/options.xml b/binsrc/tutorial/xml/sx_e_5/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_5/options.xml
+++ b/binsrc/tutorial/xml/sx_e_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_5/sx_e_5.xml b/binsrc/tutorial/xml/sx_e_5/sx_e_5.xml
index bf86ac1..31d5199 100644
--- a/binsrc/tutorial/xml/sx_e_5/sx_e_5.xml
+++ b/binsrc/tutorial/xml/sx_e_5/sx_e_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_5/sx_e_5_sample.vsp b/binsrc/tutorial/xml/sx_e_5/sx_e_5_sample.vsp
index e0c1c46..c7c7256 100644
--- a/binsrc/tutorial/xml/sx_e_5/sx_e_5_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_5/sx_e_5_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_5_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_5_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_6/options.xml b/binsrc/tutorial/xml/sx_e_6/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_6/options.xml
+++ b/binsrc/tutorial/xml/sx_e_6/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_6/sx_e_6.xml b/binsrc/tutorial/xml/sx_e_6/sx_e_6.xml
index 186d8a9..2ae5d21 100644
--- a/binsrc/tutorial/xml/sx_e_6/sx_e_6.xml
+++ b/binsrc/tutorial/xml/sx_e_6/sx_e_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_6/sx_e_6_sample.vsp b/binsrc/tutorial/xml/sx_e_6/sx_e_6_sample.vsp
index bf57277..719b434 100644
--- a/binsrc/tutorial/xml/sx_e_6/sx_e_6_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_6/sx_e_6_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_6_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_6_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_7/options.xml b/binsrc/tutorial/xml/sx_e_7/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_7/options.xml
+++ b/binsrc/tutorial/xml/sx_e_7/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_7/sx_e_7.xml b/binsrc/tutorial/xml/sx_e_7/sx_e_7.xml
index 24f264e..31a95a3 100644
--- a/binsrc/tutorial/xml/sx_e_7/sx_e_7.xml
+++ b/binsrc/tutorial/xml/sx_e_7/sx_e_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_7/sx_e_7_sample.vsp b/binsrc/tutorial/xml/sx_e_7/sx_e_7_sample.vsp
index f3b8aa9..3e51c71 100644
--- a/binsrc/tutorial/xml/sx_e_7/sx_e_7_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_7/sx_e_7_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_7_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_7_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_8/options.xml b/binsrc/tutorial/xml/sx_e_8/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_8/options.xml
+++ b/binsrc/tutorial/xml/sx_e_8/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_8/sx_e_8.xml b/binsrc/tutorial/xml/sx_e_8/sx_e_8.xml
index 4d050a0..a582693 100644
--- a/binsrc/tutorial/xml/sx_e_8/sx_e_8.xml
+++ b/binsrc/tutorial/xml/sx_e_8/sx_e_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_8/sx_e_8_sample.vsp b/binsrc/tutorial/xml/sx_e_8/sx_e_8_sample.vsp
index 8a9b56c..b79dccf 100644
--- a/binsrc/tutorial/xml/sx_e_8/sx_e_8_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_8/sx_e_8_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_8_sample.vsp,v 1.2 2006/08/15 19:30:34 source Exp $
+--  $Id: sx_e_8_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_9/options.xml b/binsrc/tutorial/xml/sx_e_9/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_e_9/options.xml
+++ b/binsrc/tutorial/xml/sx_e_9/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_9/sx_e_9.xml b/binsrc/tutorial/xml/sx_e_9/sx_e_9.xml
index 50f7845..36f698a 100644
--- a/binsrc/tutorial/xml/sx_e_9/sx_e_9.xml
+++ b/binsrc/tutorial/xml/sx_e_9/sx_e_9.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_e_9/sx_e_9_sample.vsp b/binsrc/tutorial/xml/sx_e_9/sx_e_9_sample.vsp
index 98f3fbb..610542e 100644
--- a/binsrc/tutorial/xml/sx_e_9/sx_e_9_sample.vsp
+++ b/binsrc/tutorial/xml/sx_e_9/sx_e_9_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_e_9_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: sx_e_9_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_f_1/options.xml b/binsrc/tutorial/xml/sx_f_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_f_1/options.xml
+++ b/binsrc/tutorial/xml/sx_f_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_f_1/sx_f_1.xml b/binsrc/tutorial/xml/sx_f_1/sx_f_1.xml
index a939060..cd04869 100644
--- a/binsrc/tutorial/xml/sx_f_1/sx_f_1.xml
+++ b/binsrc/tutorial/xml/sx_f_1/sx_f_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_f_1/sx_f_1_sample.vsp b/binsrc/tutorial/xml/sx_f_1/sx_f_1_sample.vsp
index 088ced2..ca9fb54 100644
--- a/binsrc/tutorial/xml/sx_f_1/sx_f_1_sample.vsp
+++ b/binsrc/tutorial/xml/sx_f_1/sx_f_1_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_f_1_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: sx_f_1_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_g_1/options.xml b/binsrc/tutorial/xml/sx_g_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_g_1/options.xml
+++ b/binsrc/tutorial/xml/sx_g_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_g_1/sx_g_1.xml b/binsrc/tutorial/xml/sx_g_1/sx_g_1.xml
index a4f8281..b224704 100644
--- a/binsrc/tutorial/xml/sx_g_1/sx_g_1.xml
+++ b/binsrc/tutorial/xml/sx_g_1/sx_g_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_g_1/sx_g_1_sample.vsp b/binsrc/tutorial/xml/sx_g_1/sx_g_1_sample.vsp
index 166985e..f269436 100644
--- a/binsrc/tutorial/xml/sx_g_1/sx_g_1_sample.vsp
+++ b/binsrc/tutorial/xml/sx_g_1/sx_g_1_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_g_1_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: sx_g_1_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_h_1/options.xml b/binsrc/tutorial/xml/sx_h_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xml/sx_h_1/options.xml
+++ b/binsrc/tutorial/xml/sx_h_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_h_1/sx_h_1.xml b/binsrc/tutorial/xml/sx_h_1/sx_h_1.xml
index 509153d..41f1fba 100644
--- a/binsrc/tutorial/xml/sx_h_1/sx_h_1.xml
+++ b/binsrc/tutorial/xml/sx_h_1/sx_h_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_h_1/sx_h_1_sample.vsp b/binsrc/tutorial/xml/sx_h_1/sx_h_1_sample.vsp
index f18aedf..1d77095 100644
--- a/binsrc/tutorial/xml/sx_h_1/sx_h_1_sample.vsp
+++ b/binsrc/tutorial/xml/sx_h_1/sx_h_1_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sx_h_1_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: sx_h_1_sample.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/sx_output.xsl b/binsrc/tutorial/xml/sx_output.xsl
index 6a5048f..374ce39 100644
--- a/binsrc/tutorial/xml/sx_output.xsl
+++ b/binsrc/tutorial/xml/sx_output.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sx_output.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sx_output.xsl,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/map01.xsd b/binsrc/tutorial/xml/usecases/map01.xsd
index 9066fbd..ed37803 100644
--- a/binsrc/tutorial/xml/usecases/map01.xsd
+++ b/binsrc/tutorial/xml/usecases/map01.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/map02.xml b/binsrc/tutorial/xml/usecases/map02.xml
index a170e06..061f44a 100644
--- a/binsrc/tutorial/xml/usecases/map02.xml
+++ b/binsrc/tutorial/xml/usecases/map02.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/map02.xsd b/binsrc/tutorial/xml/usecases/map02.xsd
index b78c920..5a4ab9d 100644
--- a/binsrc/tutorial/xml/usecases/map02.xsd
+++ b/binsrc/tutorial/xml/usecases/map02.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/map03.xml b/binsrc/tutorial/xml/usecases/map03.xml
index 141e519..0b99afe 100644
--- a/binsrc/tutorial/xml/usecases/map03.xml
+++ b/binsrc/tutorial/xml/usecases/map03.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/options.xml b/binsrc/tutorial/xml/usecases/options.xml
index 9f98d66..8026ceb 100644
--- a/binsrc/tutorial/xml/usecases/options.xml
+++ b/binsrc/tutorial/xml/usecases/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/slash.xml b/binsrc/tutorial/xml/usecases/slash.xml
index ea04f53..4749882 100644
--- a/binsrc/tutorial/xml/usecases/slash.xml
+++ b/binsrc/tutorial/xml/usecases/slash.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sq01.xml b/binsrc/tutorial/xml/usecases/sq01.xml
index a605e4a..ac3577d 100644
--- a/binsrc/tutorial/xml/usecases/sq01.xml
+++ b/binsrc/tutorial/xml/usecases/sq01.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sq02.xml b/binsrc/tutorial/xml/usecases/sq02.xml
index e03e553..4cb3e04 100644
--- a/binsrc/tutorial/xml/usecases/sq02.xml
+++ b/binsrc/tutorial/xml/usecases/sq02.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sq03.xml b/binsrc/tutorial/xml/usecases/sq03.xml
index 18aa850..84f2e79 100644
--- a/binsrc/tutorial/xml/usecases/sq03.xml
+++ b/binsrc/tutorial/xml/usecases/sq03.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sq04.xml b/binsrc/tutorial/xml/usecases/sq04.xml
index 82ed8a6..3599928 100644
--- a/binsrc/tutorial/xml/usecases/sq04.xml
+++ b/binsrc/tutorial/xml/usecases/sq04.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sq05.xml b/binsrc/tutorial/xml/usecases/sq05.xml
index 4eb6b46..128f33a 100644
--- a/binsrc/tutorial/xml/usecases/sq05.xml
+++ b/binsrc/tutorial/xml/usecases/sq05.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sq06.xml b/binsrc/tutorial/xml/usecases/sq06.xml
index 41c23b9..c6d4732 100644
--- a/binsrc/tutorial/xml/usecases/sq06.xml
+++ b/binsrc/tutorial/xml/usecases/sq06.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sqlx01.xml b/binsrc/tutorial/xml/usecases/sqlx01.xml
index a3e9f73..8017d0b 100644
--- a/binsrc/tutorial/xml/usecases/sqlx01.xml
+++ b/binsrc/tutorial/xml/usecases/sqlx01.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sqlx02.xml b/binsrc/tutorial/xml/usecases/sqlx02.xml
index eaff520..bf1bc86 100644
--- a/binsrc/tutorial/xml/usecases/sqlx02.xml
+++ b/binsrc/tutorial/xml/usecases/sqlx02.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sqlx03.xml b/binsrc/tutorial/xml/usecases/sqlx03.xml
index fdcb491..4107d83 100644
--- a/binsrc/tutorial/xml/usecases/sqlx03.xml
+++ b/binsrc/tutorial/xml/usecases/sqlx03.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/sqlx04.xml b/binsrc/tutorial/xml/usecases/sqlx04.xml
index 058777b..3f83825 100644
--- a/binsrc/tutorial/xml/usecases/sqlx04.xml
+++ b/binsrc/tutorial/xml/usecases/sqlx04.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/usecases.sql b/binsrc/tutorial/xml/usecases/usecases.sql
index 95d9d89..c135157 100644
--- a/binsrc/tutorial/xml/usecases/usecases.sql
+++ b/binsrc/tutorial/xml/usecases/usecases.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: usecases.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: usecases.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/usecases.vsp b/binsrc/tutorial/xml/usecases/usecases.vsp
index 940b092..8ba1b0a 100644
--- a/binsrc/tutorial/xml/usecases/usecases.vsp
+++ b/binsrc/tutorial/xml/usecases/usecases.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: usecases.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: usecases.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/usecases_vad.sql b/binsrc/tutorial/xml/usecases/usecases_vad.sql
index 6600a85..299a63a 100644
--- a/binsrc/tutorial/xml/usecases/usecases_vad.sql
+++ b/binsrc/tutorial/xml/usecases/usecases_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: usecases_vad.sql,v 1.2 2007/04/02 07:30:36 source Exp $
+--  $Id: usecases_vad.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/xq04.xml b/binsrc/tutorial/xml/usecases/xq04.xml
index 857da3c..197bd34 100644
--- a/binsrc/tutorial/xml/usecases/xq04.xml
+++ b/binsrc/tutorial/xml/usecases/xq04.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/xq05.xml b/binsrc/tutorial/xml/usecases/xq05.xml
index 180d619..6a87f6c 100644
--- a/binsrc/tutorial/xml/usecases/xq05.xml
+++ b/binsrc/tutorial/xml/usecases/xq05.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/xq06.xml b/binsrc/tutorial/xml/usecases/xq06.xml
index bc992a6..e304f84 100644
--- a/binsrc/tutorial/xml/usecases/xq06.xml
+++ b/binsrc/tutorial/xml/usecases/xq06.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/xqr01.xml b/binsrc/tutorial/xml/usecases/xqr01.xml
index 3a1773b..5819176 100644
--- a/binsrc/tutorial/xml/usecases/xqr01.xml
+++ b/binsrc/tutorial/xml/usecases/xqr01.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/xqr02.xml b/binsrc/tutorial/xml/usecases/xqr02.xml
index 08e4a62..d64b52f 100644
--- a/binsrc/tutorial/xml/usecases/xqr02.xml
+++ b/binsrc/tutorial/xml/usecases/xqr02.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/usecases/xqr03.xml b/binsrc/tutorial/xml/usecases/xqr03.xml
index 544a35b..3ae6425 100644
--- a/binsrc/tutorial/xml/usecases/xqr03.xml
+++ b/binsrc/tutorial/xml/usecases/xqr03.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_1/options.xml b/binsrc/tutorial/xml/xq_s_1/options.xml
index 4dfe56d..599ba15 100644
--- a/binsrc/tutorial/xml/xq_s_1/options.xml
+++ b/binsrc/tutorial/xml/xq_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_1/xq_s_1.xml b/binsrc/tutorial/xml/xq_s_1/xq_s_1.xml
index 99d14a2..d701075 100644
--- a/binsrc/tutorial/xml/xq_s_1/xq_s_1.xml
+++ b/binsrc/tutorial/xml/xq_s_1/xq_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2/options.xml b/binsrc/tutorial/xml/xq_s_2/options.xml
index 9136e45..baea63d 100644
--- a/binsrc/tutorial/xml/xq_s_2/options.xml
+++ b/binsrc/tutorial/xml/xq_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2/search.sql b/binsrc/tutorial/xml/xq_s_2/search.sql
index cacbfec..4b4c2c9 100644
--- a/binsrc/tutorial/xml/xq_s_2/search.sql
+++ b/binsrc/tutorial/xml/xq_s_2/search.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: search.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: search.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2/search.vsp b/binsrc/tutorial/xml/xq_s_2/search.vsp
index 461cf13..4b1695f 100644
--- a/binsrc/tutorial/xml/xq_s_2/search.vsp
+++ b/binsrc/tutorial/xml/xq_s_2/search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: search.vsp,v 1.3 2006/08/15 19:30:35 source Exp $
+--  $Id: search.vsp,v 1.3.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2/text.vsp b/binsrc/tutorial/xml/xq_s_2/text.vsp
index 51fff95..192d146 100644
--- a/binsrc/tutorial/xml/xq_s_2/text.vsp
+++ b/binsrc/tutorial/xml/xq_s_2/text.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: text.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: text.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2/xq_s_2.xml b/binsrc/tutorial/xml/xq_s_2/xq_s_2.xml
index 1ec93d0..381e096 100644
--- a/binsrc/tutorial/xml/xq_s_2/xq_s_2.xml
+++ b/binsrc/tutorial/xml/xq_s_2/xq_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/example.vsp b/binsrc/tutorial/xml/xq_s_2a/example.vsp
index bb8544d..9160f3f 100644
--- a/binsrc/tutorial/xml/xq_s_2a/example.vsp
+++ b/binsrc/tutorial/xml/xq_s_2a/example.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: example.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: example.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss1.xml b/binsrc/tutorial/xml/xq_s_2a/rss1.xml
index b3a2178..f70debd 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss1.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss1.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss10.xml b/binsrc/tutorial/xml/xq_s_2a/rss10.xml
index fdb714f..cc04558 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss10.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss10.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss11.xml b/binsrc/tutorial/xml/xq_s_2a/rss11.xml
index de4c0a5..1955d04 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss11.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss11.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss12.xml b/binsrc/tutorial/xml/xq_s_2a/rss12.xml
index 6d60b9b..1c5fc94 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss12.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss12.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss13.xml b/binsrc/tutorial/xml/xq_s_2a/rss13.xml
index 43afb62..9b41949 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss13.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss13.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss14.xml b/binsrc/tutorial/xml/xq_s_2a/rss14.xml
index d855418..8e3c213 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss14.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss14.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss2.xml b/binsrc/tutorial/xml/xq_s_2a/rss2.xml
index b99d208..f6dde88 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss2.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss2.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss3.xml b/binsrc/tutorial/xml/xq_s_2a/rss3.xml
index f8ba0e2..1cb3321 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss3.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss3.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss4.xml b/binsrc/tutorial/xml/xq_s_2a/rss4.xml
index 81856e7..0695c12 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss4.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss4.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss5.xml b/binsrc/tutorial/xml/xq_s_2a/rss5.xml
index f70b11b..34c0daf 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss5.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss5.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss6.xml b/binsrc/tutorial/xml/xq_s_2a/rss6.xml
index 367455c..4416256 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss6.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss6.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss7.xml b/binsrc/tutorial/xml/xq_s_2a/rss7.xml
index 89a6610..c0535d9 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss7.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss7.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss8.xml b/binsrc/tutorial/xml/xq_s_2a/rss8.xml
index f039cd1..bb5ee54 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss8.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss8.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/rss9.xml b/binsrc/tutorial/xml/xq_s_2a/rss9.xml
index 3c4ed52..28f3c96 100644
--- a/binsrc/tutorial/xml/xq_s_2a/rss9.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/rss9.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.sql b/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.sql
index 9f93583..ae5e40d 100644
--- a/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.sql
+++ b/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xq_s_2a.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xq_s_2a.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.xml b/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.xml
index 81bcaa9..2c83b86 100644
--- a/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.xml
+++ b/binsrc/tutorial/xml/xq_s_2a/xq_s_2a.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_3/slash.vsp b/binsrc/tutorial/xml/xq_s_3/slash.vsp
index 130bfb9..e5ccf5f 100644
--- a/binsrc/tutorial/xml/xq_s_3/slash.vsp
+++ b/binsrc/tutorial/xml/xq_s_3/slash.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: slash.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: slash.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_3/slash.xml b/binsrc/tutorial/xml/xq_s_3/slash.xml
index b60845b..1765dcc 100644
--- a/binsrc/tutorial/xml/xq_s_3/slash.xml
+++ b/binsrc/tutorial/xml/xq_s_3/slash.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_3/xq_s_3.sql b/binsrc/tutorial/xml/xq_s_3/xq_s_3.sql
index 146d7c8..75f8ec3 100644
--- a/binsrc/tutorial/xml/xq_s_3/xq_s_3.sql
+++ b/binsrc/tutorial/xml/xq_s_3/xq_s_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xq_s_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xq_s_3.sql,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_3/xq_s_3.xml b/binsrc/tutorial/xml/xq_s_3/xq_s_3.xml
index b0010e3..b7b41af 100644
--- a/binsrc/tutorial/xml/xq_s_3/xq_s_3.xml
+++ b/binsrc/tutorial/xml/xq_s_3/xq_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/african_blogs.vsp b/binsrc/tutorial/xml/xq_s_4/african_blogs.vsp
index 9900907..0e8d13a 100644
--- a/binsrc/tutorial/xml/xq_s_4/african_blogs.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/african_blogs.vsp
@@ -2,12 +2,12 @@
 <?vsp
  
 --  
---  $Id: african_blogs.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: african_blogs.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/atom.vsp b/binsrc/tutorial/xml/xq_s_4/atom.vsp
index 77c76a2..d218595 100644
--- a/binsrc/tutorial/xml/xq_s_4/atom.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/atom.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: atom.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: atom.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/blog100.vsp b/binsrc/tutorial/xml/xq_s_4/blog100.vsp
index a1b9c5f..3d0972a 100644
--- a/binsrc/tutorial/xml/xq_s_4/blog100.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/blog100.vsp
@@ -2,12 +2,12 @@
 <?vsp
  
 --  
---  $Id: blog100.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: blog100.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/blogafrica.vsp b/binsrc/tutorial/xml/xq_s_4/blogafrica.vsp
index fd1208b..37a3b02 100644
--- a/binsrc/tutorial/xml/xq_s_4/blogafrica.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/blogafrica.vsp
@@ -2,12 +2,12 @@
 <?vsp
  
 --  
---  $Id: blogafrica.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: blogafrica.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/ceo.vsp b/binsrc/tutorial/xml/xq_s_4/ceo.vsp
index ca50d9d..bb9667d 100644
--- a/binsrc/tutorial/xml/xq_s_4/ceo.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/ceo.vsp
@@ -2,12 +2,12 @@
 <?vsp
  
 --  
---  $Id: ceo.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ceo.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/common.vsp b/binsrc/tutorial/xml/xq_s_4/common.vsp
index 6584417..33d831f 100644
--- a/binsrc/tutorial/xml/xq_s_4/common.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/common.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: common.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: common.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/foaf.vsp b/binsrc/tutorial/xml/xq_s_4/foaf.vsp
index 20f3b45..15c4197 100644
--- a/binsrc/tutorial/xml/xq_s_4/foaf.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/foaf.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: foaf.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: foaf.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/foafmap.vsp b/binsrc/tutorial/xml/xq_s_4/foafmap.vsp
index 1f2c80a..968d557 100644
--- a/binsrc/tutorial/xml/xq_s_4/foafmap.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/foafmap.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: foafmap.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: foafmap.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/gnomedexers.vsp b/binsrc/tutorial/xml/xq_s_4/gnomedexers.vsp
index 67f394f..5057de6 100644
--- a/binsrc/tutorial/xml/xq_s_4/gnomedexers.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/gnomedexers.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: gnomedexers.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: gnomedexers.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/mapufacture.vsp b/binsrc/tutorial/xml/xq_s_4/mapufacture.vsp
index 87b4848..7d98133 100644
--- a/binsrc/tutorial/xml/xq_s_4/mapufacture.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/mapufacture.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: mapufacture.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: mapufacture.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/nigerian_bloggers.vsp b/binsrc/tutorial/xml/xq_s_4/nigerian_bloggers.vsp
index 593701c..df6b9b5 100644
--- a/binsrc/tutorial/xml/xq_s_4/nigerian_bloggers.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/nigerian_bloggers.vsp
@@ -2,12 +2,12 @@
 <?vsp
  
 --  
---  $Id: nigerian_bloggers.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: nigerian_bloggers.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/o100.sql b/binsrc/tutorial/xml/xq_s_4/o100.sql
index f1f03c7..9dbbe57 100644
--- a/binsrc/tutorial/xml/xq_s_4/o100.sql
+++ b/binsrc/tutorial/xml/xq_s_4/o100.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: o100.sql,v 1.4 2007/01/22 22:01:37 source Exp $
+--  $Id: o100.sql,v 1.4.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/o100.vsp b/binsrc/tutorial/xml/xq_s_4/o100.vsp
index 01608f3..336d9ef 100644
--- a/binsrc/tutorial/xml/xq_s_4/o100.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/o100.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: o100.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: o100.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/options.xml b/binsrc/tutorial/xml/xq_s_4/options.xml
index 7162e10..0913121 100644
--- a/binsrc/tutorial/xml/xq_s_4/options.xml
+++ b/binsrc/tutorial/xml/xq_s_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/osc2003.vsp b/binsrc/tutorial/xml/xq_s_4/osc2003.vsp
index fa02348..81d4069 100644
--- a/binsrc/tutorial/xml/xq_s_4/osc2003.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/osc2003.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: osc2003.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: osc2003.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/osc2005.vsp b/binsrc/tutorial/xml/xq_s_4/osc2005.vsp
index 7bc7a63..b7dc93d 100644
--- a/binsrc/tutorial/xml/xq_s_4/osc2005.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/osc2005.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: osc2005.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: osc2005.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/planetrdf.vsp b/binsrc/tutorial/xml/xq_s_4/planetrdf.vsp
index 7643749..9c820c9 100644
--- a/binsrc/tutorial/xml/xq_s_4/planetrdf.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/planetrdf.vsp
@@ -2,12 +2,12 @@
 <?vsp
  
 --  
---  $Id: planetrdf.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: planetrdf.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/sem_blogs.vsp b/binsrc/tutorial/xml/xq_s_4/sem_blogs.vsp
index 42f60da..6c61336 100644
--- a/binsrc/tutorial/xml/xq_s_4/sem_blogs.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/sem_blogs.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sem_blogs.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: sem_blogs.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/sioc.vsp b/binsrc/tutorial/xml/xq_s_4/sioc.vsp
index 664d2aa..e6c7244 100644
--- a/binsrc/tutorial/xml/xq_s_4/sioc.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/sioc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: sioc.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: sioc.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/status.vsp b/binsrc/tutorial/xml/xq_s_4/status.vsp
index 72e53a3..8d1a629 100644
--- a/binsrc/tutorial/xml/xq_s_4/status.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/status.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: status.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: status.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/techcrunch.vsp b/binsrc/tutorial/xml/xq_s_4/techcrunch.vsp
index 967130b..2a98051 100644
--- a/binsrc/tutorial/xml/xq_s_4/techcrunch.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/techcrunch.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: techcrunch.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: techcrunch.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/technologyvoices.vsp b/binsrc/tutorial/xml/xq_s_4/technologyvoices.vsp
index 57e20c9..ed552e8 100644
--- a/binsrc/tutorial/xml/xq_s_4/technologyvoices.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/technologyvoices.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: technologyvoices.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: technologyvoices.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/technorati_fav.vsp b/binsrc/tutorial/xml/xq_s_4/technorati_fav.vsp
index 9523cc4..e8466af 100644
--- a/binsrc/tutorial/xml/xq_s_4/technorati_fav.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/technorati_fav.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: technorati_fav.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: technorati_fav.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/technorati_pop.vsp b/binsrc/tutorial/xml/xq_s_4/technorati_pop.vsp
index 64c5307..031ec7e 100644
--- a/binsrc/tutorial/xml/xq_s_4/technorati_pop.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/technorati_pop.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: technorati_pop.vsp,v 1.1 2007/01/22 22:01:37 source Exp $
+--  $Id: technorati_pop.vsp,v 1.1.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/vloggercon.vsp b/binsrc/tutorial/xml/xq_s_4/vloggercon.vsp
index d7cae56..5c8bd7d 100644
--- a/binsrc/tutorial/xml/xq_s_4/vloggercon.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/vloggercon.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vloggercon.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: vloggercon.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/web2005.vsp b/binsrc/tutorial/xml/xq_s_4/web2005.vsp
index 758898f..22854f3 100644
--- a/binsrc/tutorial/xml/xq_s_4/web2005.vsp
+++ b/binsrc/tutorial/xml/xq_s_4/web2005.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: web2005.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: web2005.vsp,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/xq_s_4.xml b/binsrc/tutorial/xml/xq_s_4/xq_s_4.xml
index a84c0c4..56bd9ec 100644
--- a/binsrc/tutorial/xml/xq_s_4/xq_s_4.xml
+++ b/binsrc/tutorial/xml/xq_s_4/xq_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/xq_s_4.xsl b/binsrc/tutorial/xml/xq_s_4/xq_s_4.xsl
index 7543bd7..0c4e86d 100644
--- a/binsrc/tutorial/xml/xq_s_4/xq_s_4.xsl
+++ b/binsrc/tutorial/xml/xq_s_4/xq_s_4.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: xq_s_4.xsl,v 1.3 2007/01/22 22:01:37 source Exp $
+ -  $Id: xq_s_4.xsl,v 1.3.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xml/xq_s_4/xq_s_4svc.xsl b/binsrc/tutorial/xml/xq_s_4/xq_s_4svc.xsl
index dbfbdac..f179dd9 100644
--- a/binsrc/tutorial/xml/xq_s_4/xq_s_4svc.xsl
+++ b/binsrc/tutorial/xml/xq_s_4/xq_s_4svc.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: xq_s_4svc.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xq_s_4svc.xsl,v 1.2.2.1 2012/03/08 12:55:17 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlapps/index.xml b/binsrc/tutorial/xmlapps/index.xml
index 4a09de4..1760358 100644
--- a/binsrc/tutorial/xmlapps/index.xml
+++ b/binsrc/tutorial/xmlapps/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/demo.css b/binsrc/tutorial/xmlsql/demo.css
index fed097d..87621d5 100644
--- a/binsrc/tutorial/xmlsql/demo.css
+++ b/binsrc/tutorial/xmlsql/demo.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: demo.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: demo.css,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/index.xml b/binsrc/tutorial/xmlsql/index.xml
index 239b868..d7136bf 100644
--- a/binsrc/tutorial/xmlsql/index.xml
+++ b/binsrc/tutorial/xmlsql/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/Cat_Product.xsd b/binsrc/tutorial/xmlsql/ms_a_1/Cat_Product.xsd
index 23b169f..2ed49f7 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/Cat_Product.xsd
+++ b/binsrc/tutorial/xmlsql/ms_a_1/Cat_Product.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/CustOr_constant.xsd b/binsrc/tutorial/xmlsql/ms_a_1/CustOr_constant.xsd
index 6fc593e..f35ebe4 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/CustOr_constant.xsd
+++ b/binsrc/tutorial/xmlsql/ms_a_1/CustOr_constant.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_OD.xsd b/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_OD.xsd
index 322341e..4c6dd0f 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_OD.xsd
+++ b/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_OD.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_attr.xsd b/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_attr.xsd
index 1db942b..244b74b 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_attr.xsd
+++ b/binsrc/tutorial/xmlsql/ms_a_1/Cust_Order_attr.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/Customer_Order.xsd b/binsrc/tutorial/xmlsql/ms_a_1/Customer_Order.xsd
index 8ce63e9..647f418 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/Customer_Order.xsd
+++ b/binsrc/tutorial/xmlsql/ms_a_1/Customer_Order.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/EmpSchema.xsd b/binsrc/tutorial/xmlsql/ms_a_1/EmpSchema.xsd
index 1459407..8a43bdb 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/EmpSchema.xsd
+++ b/binsrc/tutorial/xmlsql/ms_a_1/EmpSchema.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.sql b/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.sql
index 1690961..d808283 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.sql
+++ b/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.sql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.xml b/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.xml
index f8233d6..b6f6b85 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_1/ms_a_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_1/options.xml b/binsrc/tutorial/xmlsql/ms_a_1/options.xml
index e2ca10e..8b6c0cb 100644
--- a/binsrc/tutorial/xmlsql/ms_a_1/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2.xml b/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2.xml
index 7eb6601..cd880ac 100644
--- a/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_1.vsp b/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_1.vsp
index 9fa5629..8dba3ff 100644
--- a/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_2_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_2.vsp b/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_2.vsp
index 86b9070..f816c52 100644
--- a/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_2/ms_a_2_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_2_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_2_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_2/options.xml b/binsrc/tutorial/xmlsql/ms_a_2/options.xml
index 8f4e61e..7c9852e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_2/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3.xml b/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3.xml
index f7dd231..c5f8df8 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample.vsp b/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample.vsp
index 920c191..f41106a 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_3_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_3_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample_2.vsp b/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample_2.vsp
index a21e2b3..77a13ae 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_3/ms_a_3_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_3_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_3_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3/options.xml b/binsrc/tutorial/xmlsql/ms_a_3/options.xml
index 8f4e61e..7c9852e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a.xml b/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a.xml
index fcdd4d7..acf0cc4 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample.vsp b/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample.vsp
index 771557b..989949d 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_3a_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_3a_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample_2.vsp b/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample_2.vsp
index d403f94..fc9af85 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_3a/ms_a_3a_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_3a_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_3a_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3a/options.xml b/binsrc/tutorial/xmlsql/ms_a_3a/options.xml
index 8f4e61e..7c9852e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3a/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_3a/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b.xml b/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b.xml
index 10387c0..d39098d 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample.vsp b/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample.vsp
index 60ea760..80d571d 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_3b_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_3b_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample_2.vsp b/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample_2.vsp
index 672aeff..7c20e5b 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_3b/ms_a_3b_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_3b_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_3b_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_3b/options.xml b/binsrc/tutorial/xmlsql/ms_a_3b/options.xml
index 8f4e61e..7c9852e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_3b/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_3b/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4.xml b/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4.xml
index b5628cb..27829b0 100644
--- a/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample.vsp b/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample.vsp
index f7635ea..78d1c76 100644
--- a/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_4_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_4_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample_2.vsp b/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample_2.vsp
index 71775d3..77f659e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_4/ms_a_4_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_4_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_4_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_4/options.xml b/binsrc/tutorial/xmlsql/ms_a_4/options.xml
index 8f4e61e..7c9852e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_4/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5.xml b/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5.xml
index c04332c..416cd85 100644
--- a/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample.vsp b/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample.vsp
index 54365fa..003bef4 100644
--- a/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_5_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_5_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample_2.vsp b/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample_2.vsp
index de7d7ae..7473028 100644
--- a/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/ms_a_5/ms_a_5_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: ms_a_5_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ms_a_5_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/ms_a_5/options.xml b/binsrc/tutorial/xmlsql/ms_a_5/options.xml
index 8f4e61e..7c9852e 100644
--- a/binsrc/tutorial/xmlsql/ms_a_5/options.xml
+++ b/binsrc/tutorial/xmlsql/ms_a_5/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/sx_output.xsl b/binsrc/tutorial/xmlsql/sx_output.xsl
index 6a5048f..240d6c2 100644
--- a/binsrc/tutorial/xmlsql/sx_output.xsl
+++ b/binsrc/tutorial/xmlsql/sx_output.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sx_output.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: sx_output.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_1/options.xml b/binsrc/tutorial/xmlsql/xp_v_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xmlsql/xp_v_1/options.xml
+++ b/binsrc/tutorial/xmlsql/xp_v_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.sql b/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.sql
index c15aa76..e837574 100644
--- a/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.sql
+++ b/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xp_v_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xp_v_1.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.xml b/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.xml
index 23811af..359d4fb 100644
--- a/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.xml
+++ b/binsrc/tutorial/xmlsql/xp_v_1/xp_v_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_2/options.xml b/binsrc/tutorial/xmlsql/xp_v_2/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xmlsql/xp_v_2/options.xml
+++ b/binsrc/tutorial/xmlsql/xp_v_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2.xml b/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2.xml
index 092ce6f..3d88d3b 100644
--- a/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2.xml
+++ b/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2_sample.vsp b/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2_sample.vsp
index 53ea389..875ea78 100644
--- a/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2_sample.vsp
+++ b/binsrc/tutorial/xmlsql/xp_v_2/xp_v_2_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xp_v_2_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xp_v_2_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_3/options.xml b/binsrc/tutorial/xmlsql/xp_v_3/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xmlsql/xp_v_3/options.xml
+++ b/binsrc/tutorial/xmlsql/xp_v_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xp_v_3/xp_v_3.xml b/binsrc/tutorial/xmlsql/xp_v_3/xp_v_3.xml
index 186cf52..e2c3878 100644
--- a/binsrc/tutorial/xmlsql/xp_v_3/xp_v_3.xml
+++ b/binsrc/tutorial/xmlsql/xp_v_3/xp_v_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_1/options.xml b/binsrc/tutorial/xmlsql/xs_s_1/options.xml
index 009cb28..3c5460e 100644
--- a/binsrc/tutorial/xmlsql/xs_s_1/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.sql b/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.sql
index be37774..75d85ff 100644
--- a/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_1.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.xml b/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.xml
index e114659..a025de3 100644
--- a/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1_sample_1.vsp
index adc2633..8eddd08 100644
--- a/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_1/xs_s_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_1_sample_1.vsp,v 1.3 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_1_sample_1.vsp,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_2/options.xml b/binsrc/tutorial/xmlsql/xs_s_2/options.xml
index 347b59f..27d89fe 100644
--- a/binsrc/tutorial/xmlsql/xs_s_2/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.sql b/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.sql
index cee4460..7d3f424 100644
--- a/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_2.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.xml b/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.xml
index b86c531..89436a9 100644
--- a/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2_sample_1.vsp
index 4bcfda1..3e9f0d6 100644
--- a/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_2/xs_s_2_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_2_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_2_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_3/options.xml b/binsrc/tutorial/xmlsql/xs_s_3/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/xmlsql/xs_s_3/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3.xml b/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3.xml
index f4088b2..e5c8c0c 100644
--- a/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3_sample_1.vsp
index 57f9ec8..662add4 100644
--- a/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_3/xs_s_3_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_3_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_3_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_4/options.xml b/binsrc/tutorial/xmlsql/xs_s_4/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/xmlsql/xs_s_4/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_4/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4.xml b/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4.xml
index b7816bb..47bb64b 100644
--- a/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4_sample_1.vsp
index 631d1af..8ef420e 100644
--- a/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_4/xs_s_4_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_4_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_4_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.sql b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.sql
index 9093969..a924d39 100644
--- a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_5.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_5.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xml b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xml
index ba95dba..ce0e712 100644
--- a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xsl b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xsl
index bd7de08..a814ba2 100644
--- a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xsl
+++ b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xs_s_5.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_s_5.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5_show.vsp b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5_show.vsp
index 459fdae..ae208ed 100644
--- a/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5_show.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_5/xs_s_5_show.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_5_show.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_5_show.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_6/options.xml b/binsrc/tutorial/xmlsql/xs_s_6/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/xmlsql/xs_s_6/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_6/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6.xml b/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6.xml
index 860b8df..e082e20 100644
--- a/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6_sample_1.vsp
index 2f9d0e4..e4cc404 100644
--- a/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_6/xs_s_6_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_6_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_6_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.html b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.html
index d8fc65e..3cedf90 100644
--- a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.html
+++ b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xml b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xml
index 14df94f..a5aafae 100644
--- a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xsl b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xsl
index 140f9cb..d606042 100644
--- a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xsl
+++ b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: xs_s_7.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_s_7.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7_sample_1.vsp
index 9654b33..bd55f07 100644
--- a/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_7/xs_s_7_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_7_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_7_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_8/options.xml b/binsrc/tutorial/xmlsql/xs_s_8/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/xmlsql/xs_s_8/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_8/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.sql b/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.sql
index 5a5f4f5..9edca77 100644
--- a/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_8.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_8.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.xml b/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.xml
index 469856e..986aa87 100644
--- a/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8_sample.vsp b/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8_sample.vsp
index 15e4ffe..b11c522 100644
--- a/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8_sample.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_8/xs_s_8_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_8_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_8_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/options.xml b/binsrc/tutorial/xmlsql/xs_s_9/options.xml
index e306635..300e870 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_9/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9.xml b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9.xml
index cc8684b..49a3077 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9.xml
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.sql b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.sql
index 44f0d8c..7657bf8 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_9_sample_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_9_sample_1.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.vsp b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.vsp
index 154ff2c..6ce3b93 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_9_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_9_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.sql b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.sql
index 90f1c03..19142f7 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_9_sample_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_9_sample_2.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.vsp b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.vsp
index 03ae2f5..223abe4 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_9_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_9_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_3.vsp b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_3.vsp
index 26bad0e..92f973d 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_3.vsp
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_s_9_sample_3.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_s_9_sample_3.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_4.sql b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_4.sql
index bfaddec..5db643e 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_4.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_4.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_9_sample_4.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_9_sample_4.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_5.sql b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_5.sql
index eb86586..ee927c0 100644
--- a/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_5.sql
+++ b/binsrc/tutorial/xmlsql/xs_s_9/xs_s_9_sample_5.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_s_9_sample_5.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_s_9_sample_5.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_1/options.xml b/binsrc/tutorial/xmlsql/xs_u_1/options.xml
index 73514ac..6ece952 100644
--- a/binsrc/tutorial/xmlsql/xs_u_1/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xml b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xml
index b86daa4..10f98b8 100644
--- a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xsl b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xsl
index 12e6dde..92b8caa 100644
--- a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xsl
+++ b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: xs_u_1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_u_1.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_sample_1.sql b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_sample_1.sql
index dfeffee..a08aba7 100644
--- a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_sample_1.sql
+++ b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_sample_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_u_1_sample_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_u_1_sample_1.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_view_src.vsp b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_view_src.vsp
index 45f5c21..9eaa15a 100644
--- a/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_view_src.vsp
+++ b/binsrc/tutorial/xmlsql/xs_u_1/xs_u_1_view_src.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_u_1_view_src.vsp,v 1.3 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_u_1_view_src.vsp,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_2/options.xml b/binsrc/tutorial/xmlsql/xs_u_2/options.xml
index af0edae..7541c1e 100644
--- a/binsrc/tutorial/xmlsql/xs_u_2/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.sql b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.sql
index 1de825e..d7f6ef1 100644
--- a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.sql
+++ b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_u_2.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_u_2.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.xml b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.xml
index 1a03abb..36329b6 100644
--- a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_photo.vsp b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_photo.vsp
index c6a0d11..182e178 100644
--- a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_photo.vsp
+++ b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_photo.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_u_2_photo.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_u_2_photo.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_sample.vsp b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_sample.vsp
index 1ce518a..057f785 100644
--- a/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_sample.vsp
+++ b/binsrc/tutorial/xmlsql/xs_u_2/xs_u_2_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_u_2_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_u_2_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_3/options.xml b/binsrc/tutorial/xmlsql/xs_u_3/options.xml
index 9bff0da..8296381 100644
--- a/binsrc/tutorial/xmlsql/xs_u_3/options.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_3/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_3/shippers.html b/binsrc/tutorial/xmlsql/xs_u_3/shippers.html
index fae1478..b08a7b3 100644
--- a/binsrc/tutorial/xmlsql/xs_u_3/shippers.html
+++ b/binsrc/tutorial/xmlsql/xs_u_3/shippers.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_3/shippers.xml b/binsrc/tutorial/xmlsql/xs_u_3/shippers.xml
index 5867551..51e8e3c 100644
--- a/binsrc/tutorial/xmlsql/xs_u_3/shippers.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_3/shippers.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_3/shippers.xsl b/binsrc/tutorial/xmlsql/xs_u_3/shippers.xsl
index 33d1a05..5c2170d 100644
--- a/binsrc/tutorial/xmlsql/xs_u_3/shippers.xsl
+++ b/binsrc/tutorial/xmlsql/xs_u_3/shippers.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: shippers.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: shippers.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.sql b/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.sql
index 7acca5a..6a2c725 100644
--- a/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.sql
+++ b/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_u_3.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_u_3.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.xml b/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.xml
index a035ce1..1cd5b83 100644
--- a/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.xml
+++ b/binsrc/tutorial/xmlsql/xs_u_3/xs_u_3.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/index.xml b/binsrc/tutorial/xmlxslt/index.xml
index 719fd76..5c37be0 100644
--- a/binsrc/tutorial/xmlxslt/index.xml
+++ b/binsrc/tutorial/xmlxslt/index.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_d_1/options.xml b/binsrc/tutorial/xmlxslt/xs_d_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xmlxslt/xs_d_1/options.xml
+++ b/binsrc/tutorial/xmlxslt/xs_d_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1.xml b/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1.xml
index 7cde7e8..0a69390 100644
--- a/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1.xml
+++ b/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1_sample_1.vsp b/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1_sample_1.vsp
index 2aa957b..e301e18 100644
--- a/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1_sample_1.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_d_1/xs_d_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_d_1_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_d_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/options.xml b/binsrc/tutorial/xmlxslt/xs_e_1/options.xml
index 1d71c38..3331d39 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/options.xml
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.sql b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.sql
index c3a8812..40a170d 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.sql
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_e_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_e_1.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xml b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xml
index 8f0eab0..354ad89 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xml
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xsl b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xsl
index 4f652d3..94d6632 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xsl
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xs_e_1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_e_1.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_ft_intl.sql b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_ft_intl.sql
index e0c0139..c291023 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_ft_intl.sql
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_ft_intl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_e_1_ft_intl.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_e_1_ft_intl.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_1.vsp b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_1.vsp
index e240c78..0540589 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_1.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_e_1_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_e_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_2.vsp b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_2.vsp
index b2fcedc..f593ce9 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_2.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_e_1_sample_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_e_1_sample_2.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_3.vsp b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_3.vsp
index 33bd68b..862b64e 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_3.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_1_sample_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_e_1_sample_3.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_e_1_sample_3.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_2.xsl b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_2.xsl
index 7136038..512bb90 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_2.xsl
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_2.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xs_e_2.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_e_2.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_3.xsl b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_3.xsl
index 212fcca..eb7c74b 100644
--- a/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_3.xsl
+++ b/binsrc/tutorial/xmlxslt/xs_e_1/xs_e_3.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xs_e_3.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_e_3.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_1/options.xml b/binsrc/tutorial/xmlxslt/xs_f_1/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_1/options.xml
+++ b/binsrc/tutorial/xmlxslt/xs_f_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xml b/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xml
index f06427c..a90df50 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xml
+++ b/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xsl b/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xsl
index e993dfe..224c9fe 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xsl
+++ b/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: xs_f_1.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xs_f_1.xsl,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1_sample.vsp b/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1_sample.vsp
index 08cce18..79c88b4 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1_sample.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_f_1/xs_f_1_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_f_1_sample.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_f_1_sample.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_2/options.xml b/binsrc/tutorial/xmlxslt/xs_f_2/options.xml
index 88cfba1..88a17a1 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_2/options.xml
+++ b/binsrc/tutorial/xmlxslt/xs_f_2/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2.xml b/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2.xml
index 59816a6..1ac8aa9 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2.xml
+++ b/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2_sample.vsp b/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2_sample.vsp
index 9e05abe..00acb1a 100644
--- a/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2_sample.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_f_2/xs_f_2_sample.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_f_2_sample.vsp,v 1.3 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_f_2_sample.vsp,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1.xml b/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1.xml
index 8a3934b..07558a2 100644
--- a/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1.xml
+++ b/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1_sample_1.vsp b/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1_sample_1.vsp
index 93904f2..705d1ee 100644
--- a/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1_sample_1.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_l_1/xs_l_1_sample_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_l_1_sample_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_l_1_sample_1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/options.xml b/binsrc/tutorial/xmlxslt/xs_t_1/options.xml
index 57d5c2c..4c8da8c 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/options.xml
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/options.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.sql b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.sql
index c900414..dce3fc0 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.sql
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xs_t_1.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: xs_t_1.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.xml b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.xml
index 36062b2..4c2a8ed 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.xml
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits.vsp b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits.vsp
index 885d759..123db24 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_t_1_hits.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_t_1_hits.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits1.vsp b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits1.vsp
index a257aa5..9f1e53c 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits1.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_hits1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_t_1_hits1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_t_1_hits1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_list.vsp b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_list.vsp
index b163095..2bd2f41 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_list.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_t_1_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_t_1_list.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_trig.vsp b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_trig.vsp
index fe161d6..e3e6294 100644
--- a/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_trig.vsp
+++ b/binsrc/tutorial/xmlxslt/xs_t_1/xs_t_1_trig.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xs_t_1_trig.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: xs_t_1_trig.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/Makefile.am b/binsrc/vad/Makefile.am
index 24ec372..6887e16 100644
--- a/binsrc/vad/Makefile.am
+++ b/binsrc/vad/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/Makefile.in b/binsrc/vad/Makefile.in
index 7747ec5..cf4aeff 100644
--- a/binsrc/vad/Makefile.in
+++ b/binsrc/vad/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/vad/http/regedit.vsp b/binsrc/vad/http/regedit.vsp
index 5a6461c..834672a 100644
--- a/binsrc/vad/http/regedit.vsp
+++ b/binsrc/vad/http/regedit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit.vsp,v 1.3 2007/03/28 11:42:35 source Exp $
+--  $Id: regedit.vsp,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/http/regedit_data.vsp b/binsrc/vad/http/regedit_data.vsp
index fa4bc90..5d2b104 100644
--- a/binsrc/vad/http/regedit_data.vsp
+++ b/binsrc/vad/http/regedit_data.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_data.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: regedit_data.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/http/regedit_e1.vsp b/binsrc/vad/http/regedit_e1.vsp
index 5c49b35..4de4b6f 100644
--- a/binsrc/vad/http/regedit_e1.vsp
+++ b/binsrc/vad/http/regedit_e1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_e1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: regedit_e1.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/http/regedit_sql.vsp b/binsrc/vad/http/regedit_sql.vsp
index a137a7c..e975652 100644
--- a/binsrc/vad/http/regedit_sql.vsp
+++ b/binsrc/vad/http/regedit_sql.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_sql.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: regedit_sql.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/http/regedit_sticker.vsp b/binsrc/vad/http/regedit_sticker.vsp
index 6544964..b676fa0 100644
--- a/binsrc/vad/http/regedit_sticker.vsp
+++ b/binsrc/vad/http/regedit_sticker.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_sticker.vsp,v 1.3 2007/01/22 13:57:19 source Exp $
+--  $Id: regedit_sticker.vsp,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/http/regedit_tree.vsp b/binsrc/vad/http/regedit_tree.vsp
index 9247489..ec65116 100644
--- a/binsrc/vad/http/regedit_tree.vsp
+++ b/binsrc/vad/http/regedit_tree.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_tree.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: regedit_tree.vsp,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/oper_pars.sql b/binsrc/vad/oper_pars.sql
index 5691fb1..9b17418 100644
--- a/binsrc/vad/oper_pars.sql
+++ b/binsrc/vad/oper_pars.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: oper_pars.sql,v 1.3 2007/01/22 13:57:19 source Exp $
+--  $Id: oper_pars.sql,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/operpars.awk b/binsrc/vad/operpars.awk
index 614e03a..4f96a41 100644
--- a/binsrc/vad/operpars.awk
+++ b/binsrc/vad/operpars.awk
@@ -3,7 +3,7 @@ BEGIN {
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/pars_init.sql b/binsrc/vad/pars_init.sql
index 4109edf..f11e994 100644
--- a/binsrc/vad/pars_init.sql
+++ b/binsrc/vad/pars_init.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: pars_init.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: pars_init.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/parse_oper_pars.sh b/binsrc/vad/parse_oper_pars.sh
index b695a97..b57f6f0 100755
--- a/binsrc/vad/parse_oper_pars.sh
+++ b/binsrc/vad/parse_oper_pars.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: parse_oper_pars.sh,v 1.4 2009/04/14 12:16:49 source Exp $
+#  $Id: parse_oper_pars.sh,v 1.4.2.1 2012/03/08 12:55:18 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/regedit.sql b/binsrc/vad/regedit.sql
index 29789f2..47cc9a0 100644
--- a/binsrc/vad/regedit.sql
+++ b/binsrc/vad/regedit.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: regedit.sql,v 1.2 2006/08/16 07:58:13 source Exp $
+--  $Id: regedit.sql,v 1.2.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/specs/sticker_rdf_lib.xml b/binsrc/vad/specs/sticker_rdf_lib.xml
index 834146a..b7a7abd 100644
--- a/binsrc/vad/specs/sticker_rdf_lib.xml
+++ b/binsrc/vad/specs/sticker_rdf_lib.xml
@@ -6,7 +6,7 @@
   <name package="rdf_lib">
    <prop name="Title" value="RDF Support Library" />
    <prop name="Developer" value="OpenLink Software" />
-   <prop name="Copyright" value="(C) 1998-2011 OpenLink Software" />
+   <prop name="Copyright" value="(C) 1998-2012 OpenLink Software" />
    <prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
    <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
   </name>
diff --git a/binsrc/vad/vad.isql b/binsrc/vad/vad.isql
index cfa23a3..b2650a2 100644
--- a/binsrc/vad/vad.isql
+++ b/binsrc/vad/vad.isql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/vad_boot.sql b/binsrc/vad/vad_boot.sql
index 3892b4f..b69e600 100644
--- a/binsrc/vad/vad_boot.sql
+++ b/binsrc/vad/vad_boot.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vad_boot.sql,v 1.3 2007/01/22 13:57:19 source Exp $
+--  $Id: vad_boot.sql,v 1.3.2.1 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vad/vad_make.sql b/binsrc/vad/vad_make.sql
index bdcc69b..edef0ca 100644
--- a/binsrc/vad/vad_make.sql
+++ b/binsrc/vad/vad_make.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vad_make.sql,v 1.23.2.3 2010/08/09 19:44:51 source Exp $
+--  $Id: vad_make.sql,v 1.23.2.6 2012/03/08 12:55:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -885,7 +885,7 @@ create procedure "VAD"."DBA"."VAD_CHECK_STICKER_DETAILS" (
         tid := "VAD"."DBA"."VAD_MKNODE" (parr, tid, s2, 'STRING', s3);
       }
       if (not "VAD"."DBA"."VAD_TEST_PACKAGE_LT" (parr, s2, s3))
-        "VAD"."DBA"."VAD_FAIL_CHECK" (sprintf ('required package %s with version less than %s hasn\'t yet installed', s2, s3));
+        "VAD"."DBA"."VAD_FAIL_CHECK" (sprintf ('This package requires %s version less than %s', s2, s3));
     }
     s3 := cast (xpath_eval ('version/@package', aref (items, j)) as varchar);
     if (s2 is not null and length(s3))
@@ -896,7 +896,7 @@ create procedure "VAD"."DBA"."VAD_CHECK_STICKER_DETAILS" (
         tid := "VAD"."DBA"."VAD_MKNODE" (parr, tid, s2, 'STRING', s3);
       }
       if (not "VAD"."DBA"."VAD_TEST_PACKAGE_EQ" (parr, s2, s3))
-        "VAD"."DBA"."VAD_FAIL_CHECK" (sprintf ('required package %s with version equal to %s hasn\'t yet installed', s2, s3));
+        "VAD"."DBA"."VAD_FAIL_CHECK" (sprintf ('This package requires %s version %s', s2, s3));
     }
     s3 := cast (xpath_eval ('versions_later/@package', aref (items, j)) as varchar);
     if (s2 is not null and length(s3))
@@ -907,7 +907,7 @@ create procedure "VAD"."DBA"."VAD_CHECK_STICKER_DETAILS" (
         tid := "VAD"."DBA"."VAD_MKNODE" (parr, tid, s2, 'STRING', s3);
       }
       if (not "VAD"."DBA"."VAD_TEST_PACKAGE_GT" (parr, s2, s3))
-        "VAD"."DBA"."VAD_FAIL_CHECK" (sprintf ('required package %s with version greater than %s hasn\'t yet installed', s2, s3));
+        "VAD"."DBA"."VAD_FAIL_CHECK" (sprintf ('This package requires %s version greater than %s', s2, s3));
     }
     j := j + 1;
   }
@@ -1145,7 +1145,7 @@ create procedure "DB"."DBA"."VAD_INSTALL" (
     exec ('checkpoint');
   else
     {
-      cl_exec ('rdf_check_init()');
+      exec ('rdf_check_init()');
     cl_exec ('checkpoint');
     }
 
diff --git a/binsrc/vad/vad_misc.sql b/binsrc/vad/vad_misc.sql
index 3e60d85..006c056 100644
--- a/binsrc/vad/vad_misc.sql
+++ b/binsrc/vad/vad_misc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vad_misc.sql,v 1.6.2.2 2011/02/03 10:40:17 source Exp $
+--  $Id: vad_misc.sql,v 1.6.2.4 2012/03/08 12:55:18 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -86,7 +86,7 @@ create procedure "VAD"."DBA"."HTML_FOOTER_OUT" ( in arr any )
   http ('<TR CLASS="CopyrightBorder"><TD COLSPAN="2"><IMG SRC="/admin/images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>');
   http ('<TR><TD ALIGN="right" COLSPAN="2"><P CLASS="Copyright">Virtuoso Server ');
   http (sys_stat('st_dbms_ver'));
-  http (sprintf (' VAD Interface (%s) - Copyright© 1998-2011 OpenLink Software.</P></TD></TR>',"VAD"."DBA"."VAD_VERSION" ()));
+  http (sprintf (' VAD Interface (%s) - Copyright© 1998-2012 OpenLink Software.</P></TD></TR>',"VAD"."DBA"."VAD_VERSION" ()));
   http ('</TABLE>\n</BODY>');
 }
 ;
@@ -534,7 +534,11 @@ create procedure "VAD"."DBA"."VAD_TEST_PACKAGE_LT" (inout parr any, in pkgname v
     return 0;
 
   if (exists (
-  select "R_ID" from "VAD"."DBA"."VAD_REGISTRY" where "R_PRNT" = id and "R_TYPE" = 'FOLDER' and lt ("R_SHKEY", pkgver)
+  select "R_ID" 
+    from "VAD"."DBA"."VAD_REGISTRY" 
+    where "R_PRNT" = id and 
+          "R_TYPE" = 'FOLDER' and 
+          "VAD"."DBA"."VERSION_COMPARE" ("R_SHKEY", pkgver) = -1
   ))
   return 1;
 
@@ -551,7 +555,11 @@ create procedure "VAD"."DBA"."VAD_TEST_PACKAGE_GT" (inout parr any, in pkgname v
   if (not id)
     return 0;
   if (exists (
-  select "R_ID" from "VAD"."DBA"."VAD_REGISTRY" where "R_PRNT" = id and "R_TYPE" = 'FOLDER' and gt ("R_SHKEY", pkgver)
+  select "R_ID" 
+    from "VAD"."DBA"."VAD_REGISTRY" 
+    where "R_PRNT" = id and 
+          "R_TYPE" = 'FOLDER' and 
+          "VAD"."DBA"."VERSION_COMPARE" ("R_SHKEY", pkgver) = 1
   ))
   return 1;
   return 0;
diff --git a/binsrc/vad/vad_root.sql b/binsrc/vad/vad_root.sql
index bffd882..4c01401 100644
--- a/binsrc/vad/vad_root.sql
+++ b/binsrc/vad/vad_root.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vad_root.sql,v 1.10 2009/02/27 11:04:14 source Exp $
+--  $Id: vad_root.sql,v 1.10.2.2 2012/03/08 12:55:18 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -210,6 +210,7 @@ create procedure "VAD"."DBA"."VAD_FAIL_CHECK" ( in msg varchar ) returns integer
 create procedure "VAD"."DBA"."VAD_CHDIR" (inout parr any, in curdir integer, in dirname varchar) returns integer
 {
   curdir := cast (curdir as integer);
+  dirname := cast (dirname as varchar);
   if (dirname is not null and aref (dirname, 0) <> 47 and not exists ( select "R_ID" from "VAD"."DBA"."VAD_REGISTRY" where "R_ID" = curdir ))
     {
       if (parr is not null)
diff --git a/binsrc/virtodbc/CLIsql3_w32.cpp b/binsrc/virtodbc/CLIsql3_w32.cpp
index 3a7598a..85b9470 100644
--- a/binsrc/virtodbc/CLIsql3_w32.cpp
+++ b/binsrc/virtodbc/CLIsql3_w32.cpp
@@ -1,12 +1,12 @@
 /*
- *  $Id: CLIsql3_w32.cpp,v 1.5.2.2 2010/01/25 22:43:36 source Exp $
+ *  $Id: CLIsql3_w32.cpp,v 1.5.2.3 2012/03/08 12:55:18 source Exp $
  *
  *  Win32 specific version of CLIsql3
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/Makefile.am b/binsrc/virtodbc/Makefile.am
index 2251197..dbbcd07 100644
--- a/binsrc/virtodbc/Makefile.am
+++ b/binsrc/virtodbc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/Makefile.in b/binsrc/virtodbc/Makefile.in
index ac3cae6..e1bdb02 100644
--- a/binsrc/virtodbc/Makefile.in
+++ b/binsrc/virtodbc/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/virtodbc/dialog.cpp b/binsrc/virtodbc/dialog.cpp
index 2793260..e20aa07 100644
--- a/binsrc/virtodbc/dialog.cpp
+++ b/binsrc/virtodbc/dialog.cpp
@@ -1,14 +1,14 @@
 /*
  *  dialog.cpp
  *
- *  $Id: dialog.cpp,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: dialog.cpp,v 1.1.1.1.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Common dialog code
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/dialog.h b/binsrc/virtodbc/dialog.h
index 108d95f..7317fee 100644
--- a/binsrc/virtodbc/dialog.h
+++ b/binsrc/virtodbc/dialog.h
@@ -1,14 +1,14 @@
 /*
  *  dialog.h
  *
- *  $Id: dialog.h,v 1.1.1.1.2.2 2010/02/01 23:10:14 source Exp $
+ *  $Id: dialog.h,v 1.1.1.1.2.3 2012/03/08 12:55:18 source Exp $
  *
  *  Common dialog code
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/kvlist.cpp b/binsrc/virtodbc/kvlist.cpp
index 5f709e0..c279c6a 100644
--- a/binsrc/virtodbc/kvlist.cpp
+++ b/binsrc/virtodbc/kvlist.cpp
@@ -1,14 +1,14 @@
 /*
  *  kvlist.cpp
  *
- *  $Id: kvlist.cpp,v 1.3.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: kvlist.cpp,v 1.3.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Key/Value pair matching for DSN parsing
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/kvlist.h b/binsrc/virtodbc/kvlist.h
index a92a4ec..c582197 100644
--- a/binsrc/virtodbc/kvlist.h
+++ b/binsrc/virtodbc/kvlist.h
@@ -1,14 +1,14 @@
 /*
  *  kvlist.h
  *
- *  $Id: kvlist.h,v 1.2.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: kvlist.h,v 1.2.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Key/Value pair matching for DSN parsing
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/resource.h b/binsrc/virtodbc/resource.h
index 1495751..9f44362 100644
--- a/binsrc/virtodbc/resource.h
+++ b/binsrc/virtodbc/resource.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: resource.h,v 1.2.2.2 2010/01/25 22:43:36 source Exp $
+ *  $Id: resource.h,v 1.2.2.3 2012/03/07 10:59:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -21,10 +21,11 @@
  */
 
 //{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by VirtDSN.rc
+// Microsoft Visual C++ generated include file.
+// Used by virtodbc.rc
 //
 #define IDS_FINISH                      1
+#define VS_VERSION_INFO                 1
 #define IDS_NEXT                        3
 #define IDS_AUTHMETHOD1                 4
 #define IDS_AUTHMETHOD2                 5
diff --git a/binsrc/virtodbc/virtodbc.cpp b/binsrc/virtodbc/virtodbc.cpp
index 4fd90d5..96c5ada 100644
--- a/binsrc/virtodbc/virtodbc.cpp
+++ b/binsrc/virtodbc/virtodbc.cpp
@@ -1,14 +1,14 @@
 /*
  *  virtodbc.cpp
  *
- *  $Id: virtodbc.cpp,v 1.5.2.2 2010/01/25 22:43:36 source Exp $
+ *  $Id: virtodbc.cpp,v 1.5.2.3 2012/03/08 12:55:18 source Exp $
  *
  *  Common includes for win32 utilties
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/virtodbc.def b/binsrc/virtodbc/virtodbc.def
index b5643b5..ac1dd7b 100644
--- a/binsrc/virtodbc/virtodbc.def
+++ b/binsrc/virtodbc/virtodbc.def
@@ -1,14 +1,14 @@
 ;
 ;  virtodbc.def
 ;
-;  $Id: virtodbc.def,v 1.2.2.1 2010/01/25 22:43:36 source Exp $
+;  $Id: virtodbc.def,v 1.2.2.2 2012/03/08 12:55:18 source Exp $
 ;
 ;  DLL link script
 ;
 ;  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 ;  project.
 ;
-;  Copyright (C) 1998-2010 OpenLink Software
+;  Copyright (C) 1998-2012 OpenLink Software
 ;
 ;  This project is free software; you can redistribute it and/or modify it
 ;  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/virtodbc.rc b/binsrc/virtodbc/virtodbc.rc
index 90466bd..b947474 100644
--- a/binsrc/virtodbc/virtodbc.rc
+++ b/binsrc/virtodbc/virtodbc.rc
@@ -1,4 +1,4 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
 //
 #include "resource.h"
 
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE
+1 TEXTINCLUDE 
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE
+2 TEXTINCLUDE 
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE
+3 TEXTINCLUDE 
 BEGIN
     "\r\n"
     "\0"
@@ -53,14 +53,13 @@ END
 //
 
 IDD_CONFIGDSN DIALOGEX 0, 0, 335, 204
-STYLE DS_MODALFRAME | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT
 CAPTION "OpenLink Virtuoso DSN Configuration"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     CONTROL         105,IDC_STATIC,"Static",SS_BITMAP,7,7,20,20
-    LTEXT           "",IDC_PLACEHOLDER,94,7,234,156,NOT WS_VISIBLE |
-                    WS_BORDER
+    LTEXT           "",IDC_PLACEHOLDER,94,7,234,156,NOT WS_VISIBLE | WS_BORDER
     CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,174,323,1
     PUSHBUTTON      "< &Back",IDC_BACKBTN,171,183,50,14
     DEFPUSHBUTTON   "&Next >",IDC_NEXTBTN,221,183,50,14
@@ -68,74 +67,61 @@ BEGIN
 END
 
 IDD_CONFIGPAGE1 DIALOGEX 0, 0, 234, 157
-STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
+STYLE DS_SETFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
 EXSTYLE WS_EX_CONTROLPARENT
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
-    LTEXT           "This wizard will help you create an ODBC data source that you can use to connect to OpenLink Virtuoso.",
-                    IDC_STATIC,0,0,234,17
-    LTEXT           "What name do you want to use to refer to the data source?",
-                    IDC_STATIC,0,19,234,8
+    LTEXT           "This wizard will help you create an ODBC data source that you can use to connect to OpenLink Virtuoso.",IDC_STATIC,0,0,234,17
+    LTEXT           "What name do you want to use to refer to the data source?",IDC_STATIC,0,19,234,8
     RTEXT           "Na&me:",IDC_STATIC,0,36,58,8
     EDITTEXT        IDC_DSN,64,33,170,14,ES_AUTOHSCROLL
-    LTEXT           "How do you want to describe the data source?",
-                    IDC_STATIC,0,58,234,8
+    LTEXT           "How do you want to describe the data source?",IDC_STATIC,0,58,234,8
     RTEXT           "&Description:",IDC_STATIC,0,75,58,8
     EDITTEXT        IDC_COMMENT,64,72,170,14,ES_AUTOHSCROLL
-    LTEXT           "Which Virtuoso Server do you want to connect to?",
-                    IDC_STATIC,0,98,234,8
+    LTEXT           "Which Virtuoso Server do you want to connect to?",IDC_STATIC,0,98,234,8
     RTEXT           "&Server:",IDC_STATIC,0,115,58,8
-    COMBOBOX        IDC_SERVER,64,112,170,50,CBS_DROPDOWN | CBS_SORT |
-                    WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL
-    CONTROL         "This server &requires a secure connection (SSL)",
-                    IDC_USESSL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,128,
-                    163,10
+    COMBOBOX        IDC_SERVER,64,112,170,50,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "This server &requires a secure connection (SSL)",IDC_USESSL,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,128,163,10
     CONTROL         "Use RoundRobin for failover connection",IDC_RROBIN,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,141,143,10
 END
 
-IDD_CONFIGPAGE3 DIALOG DISCARDABLE  0, 0, 234, 157
-STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
+IDD_CONFIGPAGE3 DIALOG  0, 0, 234, 157
+STYLE DS_SETFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
 FONT 8, "MS Sans Serif"
 BEGIN
     CONTROL         "Change the &default database to:",IDC_USEDEFAULTDB,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,0,117,10
-    COMBOBOX        IDC_DEFAULTDB,12,12,166,60,CBS_DROPDOWN | WS_VSCROLL |
-                    WS_TABSTOP
+    COMBOBOX        IDC_DEFAULTDB,12,12,166,60,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Change the default character set to:",IDC_USEDEFAULTCS,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,33,129,10
-    COMBOBOX        IDC_DEFAULTCS,12,45,166,60,CBS_DROPDOWN | WS_VSCROLL |
-                    WS_TABSTOP
+    COMBOBOX        IDC_DEFAULTCS,12,45,166,60,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Change the default transaction isolation level to:",IDC_USEDEFAULTIL,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,65,169,10
-    COMBOBOX        IDC_DEFAULTIL,12,78,166,60,CBS_DROPDOWN | WS_VSCROLL |
-                    WS_TABSTOP
-    CONTROL         "Automatically correct for daylight saving changes",
-                    IDC_USEDSTCORRECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    0,97,169,10
-    CONTROL         "Treat system tables as user tables",
-                    IDC_NOSYSTEMTABLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    0,109,169,10
-    CONTROL         "Treat views as user tables",
-                    IDC_TREATVIEWSASTABLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    0,121,169,10
+    COMBOBOX        IDC_DEFAULTIL,12,78,166,60,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "Automatically correct for daylight saving changes",IDC_USEDSTCORRECT,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,97,169,10
+    CONTROL         "Treat system tables as user tables",IDC_NOSYSTEMTABLES,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,109,169,10
+    CONTROL         "Treat views as user tables",IDC_TREATVIEWSASTABLES,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,121,169,10
 END
 
-IDD_ODBCERROR DIALOG DISCARDABLE  0, 0, 201, 113
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_ODBCERROR DIALOG  0, 0, 201, 113
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Database connection failed"
 FONT 8, "MS Sans Serif"
 BEGIN
     RTEXT           "SQL State:",IDC_STATIC,18,10,45,8
     EDITTEXT        IDC_SQLSTATE,70,7,74,14,ES_AUTOHSCROLL | ES_READONLY
     LTEXT           "Reason:",IDC_STATIC,7,31,28,8
-    EDITTEXT        IDC_SQLERROR,7,41,187,42,ES_MULTILINE | ES_AUTOVSCROLL |
-                    ES_READONLY | WS_VSCROLL
+    EDITTEXT        IDC_SQLERROR,7,41,187,42,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
     DEFPUSHBUTTON   "Dismiss",IDOK,70,92,50,14
 END
 
-IDD_LOGINDLG DIALOG DISCARDABLE  0, 0, 235, 82
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_LOGINDLG DIALOG  0, 0, 235, 82
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "OpenLink Virtuoso Login"
 FONT 8, "MS Sans Serif"
 BEGIN
@@ -151,33 +137,26 @@ BEGIN
     PUSHBUTTON      "&Options >>",IDC_OPTIONS,178,61,50,14
 END
 
-IDD_CONFIGPAGE2 DIALOG DISCARDABLE  0, 0, 234, 157
-STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
+IDD_CONFIGPAGE2 DIALOG  0, 0, 234, 157
+STYLE DS_SETFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
 FONT 8, "MS Sans Serif"
 BEGIN
-    LTEXT           "How should the Virtuoso Server verify the authenticity of the login ID?",
-                    IDC_STATIC,0,0,219,8
+    LTEXT           "How should the Virtuoso Server verify the authenticity of the login ID?",IDC_STATIC,0,0,219,8
     RTEXT           "&Authentication method:",IDC_STATIC,0,13,58,16
-    COMBOBOX        IDC_AUTHMETHOD,64,15,136,59,CBS_DROPDOWNLIST |
-                    CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "C&onnect to the Virtuoso Server to obtain default settings for the additional configuration options.",
-                    IDC_USEUID,"Button",BS_AUTOCHECKBOX | BS_MULTILINE |
-                    WS_TABSTOP,0,42,227,19
+    COMBOBOX        IDC_AUTHMETHOD,64,15,136,59,CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "C&onnect to the Virtuoso Server to obtain default settings for the additional configuration options.",IDC_USEUID,
+                    "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,0,42,227,19
     RTEXT           "&Login ID:",IDC_UIDLBL,0,67,58,8
     EDITTEXT        IDC_UID,64,64,136,13,ES_AUTOHSCROLL
     PUSHBUTTON      "...",IDC_BROWSEUIDCERT,200,65,29,13
     RTEXT           "&Password:",IDC_PWDLBL,0,83,58,8
     EDITTEXT        IDC_PWD,64,80,136,13,ES_PASSWORD | ES_AUTOHSCROLL
-    CONTROL         "&Require the server to authenticate itself with this public key:",
-                    IDC_USESERVERCERT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
-                    0,107,203,10
+    CONTROL         "&Require the server to authenticate itself with this public key:",IDC_USESERVERCERT,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,107,203,10
     RTEXT           "C&ertificate:",IDC_SERVERCERTLBL,10,122,48,8
-    EDITTEXT        IDC_SERVERCERT,64,119,136,13,ES_AUTOHSCROLL |
-                    ES_READONLY
+    EDITTEXT        IDC_SERVERCERT,64,119,136,13,ES_AUTOHSCROLL | ES_READONLY
     PUSHBUTTON      "...",IDC_BROWSESERVERCERT,200,119,29,13
-    CONTROL         "&Disable interactive login",IDC_NOLOGINBOX,"Button",
-                    BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED |
-                    WS_TABSTOP,0,147,91,10
+    CONTROL         "&Disable interactive login",IDC_NOLOGINBOX,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,0,147,91,10
 END
 
 
@@ -187,7 +166,7 @@ END
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
+GUIDELINES DESIGNINFO 
 BEGIN
     IDD_CONFIGDSN, DIALOG
     BEGIN
@@ -243,14 +222,52 @@ END
 // Bitmap
 //
 
-IDB_BITMAPVIRT          BITMAP  DISCARDABLE     "virtodbc.bmp"
+IDB_BITMAPVIRT          BITMAP                  "virtodbc.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 6,1,3,3127
+ PRODUCTVERSION 6,1,3,3127
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "OpenLink Software"
+            VALUE "FileDescription", "Virtuoso OpenSource"
+            VALUE "FileVersion", "6, 1, 3, 3127"
+            VALUE "InternalName", "Virtuoso"
+            VALUE "LegalCopyright", "Copyright (C) 1998-2012 OpenLink Software"
+            VALUE "ProductName", "Virtuoso OpenSource"
+            VALUE "ProductVersion", "6, 1, 3, 3127"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // String Table
 //
 
-STRINGTABLE DISCARDABLE
+STRINGTABLE 
 BEGIN
     IDS_FINISH              "Finish"
     IDS_NEXT                "&Next >"
@@ -266,6 +283,10 @@ BEGIN
     IDS_PKCS12BROWSE        "Personal Information Exchange (*.pfx;*.p12)|*.pfx;*.p12|PEM Encoded File (*.pem)|*.pem|All Files (*.*)|*.*|"
     IDS_ZCUNRESOLVED        "Unable to locate the Virtuoso server. Please use either <host>:<port> in the Server field, or select a configuration from the list."
     IDS_X509BROWSE          "X.509 Certificate (*.cer;*.crt;*.pem)|*.cer;*.crt;*.pem|All Files (*.*)|*.*|"
+END
+
+STRINGTABLE 
+BEGIN
     IDS_ISOLATIONLEVEL1     "Read Uncommitted"
     IDS_ISOLATIONLEVEL2     "Read Commited"
     IDS_ISOLATIONLEVEL3     "Repeatable Read"
diff --git a/binsrc/virtodbc/w32util.h b/binsrc/virtodbc/w32util.h
index f7d7dd7..a48c803 100644
--- a/binsrc/virtodbc/w32util.h
+++ b/binsrc/virtodbc/w32util.h
@@ -1,14 +1,14 @@
 /*
  *  w32util.h
  *
- *  $Id: w32util.h,v 1.2.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: w32util.h,v 1.2.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Common includes for win32 utilties
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/waitcursor.h b/binsrc/virtodbc/waitcursor.h
index f937a68..6e50fbe 100644
--- a/binsrc/virtodbc/waitcursor.h
+++ b/binsrc/virtodbc/waitcursor.h
@@ -1,14 +1,14 @@
 /*
  *  waitcursor.h
  *
- *  $Id: waitcursor.h,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: waitcursor.h,v 1.1.1.1.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Wait cursor with dynamic scope
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/winctl.cpp b/binsrc/virtodbc/winctl.cpp
index 04412ee..3c4c2bc 100644
--- a/binsrc/virtodbc/winctl.cpp
+++ b/binsrc/virtodbc/winctl.cpp
@@ -1,14 +1,14 @@
 /*
  *  winctl.cpp
  *
- *  $Id: winctl.cpp,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: winctl.cpp,v 1.1.1.1.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Win32 controls
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/winctl.h b/binsrc/virtodbc/winctl.h
index 9bb059c..049842e 100644
--- a/binsrc/virtodbc/winctl.h
+++ b/binsrc/virtodbc/winctl.h
@@ -1,14 +1,14 @@
 /*
  *  winctl.h
  *
- *  $Id: winctl.h,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: winctl.h,v 1.1.1.1.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Win32 controls
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/wizard.cpp b/binsrc/virtodbc/wizard.cpp
index 0c7eaaa..6b5fbf4 100644
--- a/binsrc/virtodbc/wizard.cpp
+++ b/binsrc/virtodbc/wizard.cpp
@@ -1,14 +1,14 @@
 /*
  *  wizard.cpp
  *
- *  $Id: wizard.cpp,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: wizard.cpp,v 1.1.1.1.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Wizard Dialogs
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/wizard.h b/binsrc/virtodbc/wizard.h
index 843cfba..3752f6e 100644
--- a/binsrc/virtodbc/wizard.h
+++ b/binsrc/virtodbc/wizard.h
@@ -1,14 +1,14 @@
 /*
  *  wizard.h
  *
- *  $Id: wizard.h,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: wizard.h,v 1.1.1.1.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Wizard Dialogs
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/zcbrowser.cpp b/binsrc/virtodbc/zcbrowser.cpp
index ee8b4c6..95ff132 100644
--- a/binsrc/virtodbc/zcbrowser.cpp
+++ b/binsrc/virtodbc/zcbrowser.cpp
@@ -1,14 +1,14 @@
 /*
  *  zcbrowser.cpp
  *
- *  $Id: zcbrowser.cpp,v 1.2.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: zcbrowser.cpp,v 1.2.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  Zero Config Browser (rendezvous)
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/zcbrowser.h b/binsrc/virtodbc/zcbrowser.h
index 4040f93..ab8f7fd 100644
--- a/binsrc/virtodbc/zcbrowser.h
+++ b/binsrc/virtodbc/zcbrowser.h
@@ -1,14 +1,14 @@
 /*
  *  zcbrowser.h
  *
- *  $Id: zcbrowser.h,v 1.2.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: zcbrowser.h,v 1.2.2.2 2012/03/08 12:55:18 source Exp $
  *
  *  ZeroConfig Browser
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/zcbrowsercombo.cpp b/binsrc/virtodbc/zcbrowsercombo.cpp
index 95bd2d5..55797d8 100644
--- a/binsrc/virtodbc/zcbrowsercombo.cpp
+++ b/binsrc/virtodbc/zcbrowsercombo.cpp
@@ -1,14 +1,14 @@
 /*
  *  zcbrowsercombo.cpp
  *
- *  $Id: zcbrowsercombo.cpp,v 1.2.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: zcbrowsercombo.cpp,v 1.2.2.2 2012/03/08 12:55:19 source Exp $
  *
  *  ZeroConfig Browser Combo
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtodbc/zcbrowsercombo.h b/binsrc/virtodbc/zcbrowsercombo.h
index 6f42223..98ffd08 100644
--- a/binsrc/virtodbc/zcbrowsercombo.h
+++ b/binsrc/virtodbc/zcbrowsercombo.h
@@ -1,14 +1,14 @@
 /*
  *  zcbrowsercombo.h
  *
- *  $Id: zcbrowsercombo.h,v 1.1.1.1.2.1 2010/01/25 22:43:36 source Exp $
+ *  $Id: zcbrowsercombo.h,v 1.1.1.1.2.2 2012/03/08 12:55:19 source Exp $
  *
  *  ZeroConfig Browser Combo
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/Makefile.am b/binsrc/virtoledb/Makefile.am
index 18ee650..ba269bc 100644
--- a/binsrc/virtoledb/Makefile.am
+++ b/binsrc/virtoledb/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/Makefile.in b/binsrc/virtoledb/Makefile.in
index b3cf2ae..8b29c55 100644
--- a/binsrc/virtoledb/Makefile.in
+++ b/binsrc/virtoledb/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/virtoledb/asserts.cpp b/binsrc/virtoledb/asserts.cpp
index b84d012..ca2246d 100644
--- a/binsrc/virtoledb/asserts.cpp
+++ b/binsrc/virtoledb/asserts.cpp
@@ -3,14 +3,14 @@
  *
  *  asserts.cpp
  *
- *  $Id: asserts.cpp,v 1.1.1.1.2.1 2011/01/25 14:36:33 source Exp $
+ *  $Id: asserts.cpp,v 1.1.1.1.2.2 2012/03/08 12:55:19 source Exp $
  *
  *  Debugging and Assertion Routines
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/asserts.h b/binsrc/virtoledb/asserts.h
index e7a95f7..06de854 100644
--- a/binsrc/virtoledb/asserts.h
+++ b/binsrc/virtoledb/asserts.h
@@ -3,14 +3,14 @@
  *
  *  asserts.h
  *
- *  $Id: asserts.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: asserts.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Assertion Routines
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/baseobj.cpp b/binsrc/virtoledb/baseobj.cpp
index 401fc07..6d09fce 100644
--- a/binsrc/virtoledb/baseobj.cpp
+++ b/binsrc/virtoledb/baseobj.cpp
@@ -1,13 +1,13 @@
 /*  baseobj.cpp
  *
- *  $Id: baseobj.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: baseobj.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Base class for COM objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/baseobj.h b/binsrc/virtoledb/baseobj.h
index 5e960e0..125da12 100644
--- a/binsrc/virtoledb/baseobj.h
+++ b/binsrc/virtoledb/baseobj.h
@@ -1,13 +1,13 @@
 /*  baseobj.h
  *
- *  $Id: baseobj.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: baseobj.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Base class for COM objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/command.cpp b/binsrc/virtoledb/command.cpp
index 06d5c5e..7b22c67 100644
--- a/binsrc/virtoledb/command.cpp
+++ b/binsrc/virtoledb/command.cpp
@@ -1,11 +1,11 @@
 /*  command.cpp
  *
- *  $Id: command.cpp,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: command.cpp,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/command.h b/binsrc/virtoledb/command.h
index 3671718..e70eb2a 100644
--- a/binsrc/virtoledb/command.h
+++ b/binsrc/virtoledb/command.h
@@ -1,11 +1,11 @@
 /*  command.h
  *
- *  $Id: command.h,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: command.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/connobj.cpp b/binsrc/virtoledb/connobj.cpp
index 292a64d..a518dea 100644
--- a/binsrc/virtoledb/connobj.cpp
+++ b/binsrc/virtoledb/connobj.cpp
@@ -1,13 +1,13 @@
 /*  connobj.h
  *
- *  $Id: connobj.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: connobj.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Connectable objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/connobj.h b/binsrc/virtoledb/connobj.h
index 342dbed..72adeb5 100644
--- a/binsrc/virtoledb/connobj.h
+++ b/binsrc/virtoledb/connobj.h
@@ -1,13 +1,13 @@
 /*  connobj.h
  *
- *  $Id: connobj.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: connobj.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Connectable objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/data.cpp b/binsrc/virtoledb/data.cpp
index e1e63f8..c0e5273 100644
--- a/binsrc/virtoledb/data.cpp
+++ b/binsrc/virtoledb/data.cpp
@@ -1,11 +1,11 @@
 /*  data.cpp
  *
- *  $Id: data.cpp,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: data.cpp,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/data.h b/binsrc/virtoledb/data.h
index b68f0bb..12b853a 100644
--- a/binsrc/virtoledb/data.h
+++ b/binsrc/virtoledb/data.h
@@ -1,11 +1,11 @@
 /*  data.h
  *
- *  $Id: data.h,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: data.h,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/datalink.cpp b/binsrc/virtoledb/datalink.cpp
index 91a5170..c3ca0cb 100644
--- a/binsrc/virtoledb/datalink.cpp
+++ b/binsrc/virtoledb/datalink.cpp
@@ -1,13 +1,13 @@
 /*  datalink.cpp
  *
- *  $Id: datalink.cpp,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: datalink.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Data Link property pages.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/datalink.h b/binsrc/virtoledb/datalink.h
index db83bd3..f8a1744 100644
--- a/binsrc/virtoledb/datalink.h
+++ b/binsrc/virtoledb/datalink.h
@@ -1,13 +1,13 @@
 /*  datalink.h
  *
- *  $Id: datalink.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: datalink.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Data Link property pages.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/dataobj.cpp b/binsrc/virtoledb/dataobj.cpp
index 2bbc693..24e2610 100644
--- a/binsrc/virtoledb/dataobj.cpp
+++ b/binsrc/virtoledb/dataobj.cpp
@@ -1,13 +1,13 @@
 /*  dataobj.cpp
  *
- *  $Id: dataobj.cpp,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: dataobj.cpp,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Base class for Command and Rowset objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/dataobj.h b/binsrc/virtoledb/dataobj.h
index 553ecd8..debd49c 100644
--- a/binsrc/virtoledb/dataobj.h
+++ b/binsrc/virtoledb/dataobj.h
@@ -1,13 +1,13 @@
 /*  dataobj.h
  *
- *  $Id: dataobj.h,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: dataobj.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Base class for Command and Rowset objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/datasource.cpp b/binsrc/virtoledb/datasource.cpp
index 4cff66b..034a497 100644
--- a/binsrc/virtoledb/datasource.cpp
+++ b/binsrc/virtoledb/datasource.cpp
@@ -1,11 +1,11 @@
 /*  datasource.cpp
  *
- *  $Id: datasource.cpp,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: datasource.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/datasource.h b/binsrc/virtoledb/datasource.h
index 6d25f7c..5ffd70f 100644
--- a/binsrc/virtoledb/datasource.h
+++ b/binsrc/virtoledb/datasource.h
@@ -1,11 +1,11 @@
 /*  datasource.h
  *
- *  $Id: datasource.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: datasource.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/db.cpp b/binsrc/virtoledb/db.cpp
index d95f4cf..f05e8f1 100644
--- a/binsrc/virtoledb/db.cpp
+++ b/binsrc/virtoledb/db.cpp
@@ -1,11 +1,11 @@
 /*  db.cpp
  *
- *  $Id: db.cpp,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: db.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/db.h b/binsrc/virtoledb/db.h
index c073559..ebd3ea5 100644
--- a/binsrc/virtoledb/db.h
+++ b/binsrc/virtoledb/db.h
@@ -1,11 +1,11 @@
 /*  db.h
  *
- *  $Id: db.h,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: db.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/dllmodule.cpp b/binsrc/virtoledb/dllmodule.cpp
index 9b72603..6060b4a 100644
--- a/binsrc/virtoledb/dllmodule.cpp
+++ b/binsrc/virtoledb/dllmodule.cpp
@@ -1,11 +1,11 @@
 /*  dllmodule.cpp
  *
- *  $Id: dllmodule.cpp,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: dllmodule.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/dllmodule.h b/binsrc/virtoledb/dllmodule.h
index becf381..b8124c9 100644
--- a/binsrc/virtoledb/dllmodule.h
+++ b/binsrc/virtoledb/dllmodule.h
@@ -1,11 +1,11 @@
 /*  dllmodule.h
  *
- *  $Id: dllmodule.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: dllmodule.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/error.cpp b/binsrc/virtoledb/error.cpp
index dd53642..66b22e0 100644
--- a/binsrc/virtoledb/error.cpp
+++ b/binsrc/virtoledb/error.cpp
@@ -1,11 +1,11 @@
 /*  error.cpp
  *
- *  $Id: error.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: error.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/error.h b/binsrc/virtoledb/error.h
index 17cb8d4..db4a92c 100644
--- a/binsrc/virtoledb/error.h
+++ b/binsrc/virtoledb/error.h
@@ -1,11 +1,11 @@
 /*  error.h
  *
- *  $Id: error.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: error.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/filedsn.cpp b/binsrc/virtoledb/filedsn.cpp
index 730fd54..6fd9fde 100644
--- a/binsrc/virtoledb/filedsn.cpp
+++ b/binsrc/virtoledb/filedsn.cpp
@@ -1,11 +1,11 @@
 /*  filedsn.h
  *
- *  $Id: filedsn.cpp,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: filedsn.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/filedsn.h b/binsrc/virtoledb/filedsn.h
index c85461c..cdc90b2 100644
--- a/binsrc/virtoledb/filedsn.h
+++ b/binsrc/virtoledb/filedsn.h
@@ -1,11 +1,11 @@
 /*  filedsn.h
  *
- *  $Id: filedsn.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: filedsn.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/globals.cpp b/binsrc/virtoledb/globals.cpp
index ef9fdfd..df09406 100644
--- a/binsrc/virtoledb/globals.cpp
+++ b/binsrc/virtoledb/globals.cpp
@@ -1,6 +1,6 @@
 /*  globals.cpp 
  *
- *  $Id: globals.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: globals.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Source file that includes just the standard includes
  *  virtoledb.pch will be the pre-compiled header
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/headers.cpp b/binsrc/virtoledb/headers.cpp
index 3555808..e070d86 100644
--- a/binsrc/virtoledb/headers.cpp
+++ b/binsrc/virtoledb/headers.cpp
@@ -1,6 +1,6 @@
 /*  headers.cpp 
  *
- *  $Id: headers.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: headers.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Source file that includes just the standard includes
  *  virtoledb.pch will be the pre-compiled header
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/headers.h b/binsrc/virtoledb/headers.h
index 53806e3..7c8064a 100644
--- a/binsrc/virtoledb/headers.h
+++ b/binsrc/virtoledb/headers.h
@@ -1,6 +1,6 @@
 /*  headers.h 
  *
- *  $Id: headers.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: headers.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Include file for standard system include files, or 
  *  project specific include files that are used frequently,
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/lobdata.cpp b/binsrc/virtoledb/lobdata.cpp
index 8882030..9c0e110 100644
--- a/binsrc/virtoledb/lobdata.cpp
+++ b/binsrc/virtoledb/lobdata.cpp
@@ -1,11 +1,11 @@
 /*  lobdata.h
  *
- *  $Id: lobdata.cpp,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: lobdata.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/lobdata.h b/binsrc/virtoledb/lobdata.h
index 4f40c33..5f6bf10 100644
--- a/binsrc/virtoledb/lobdata.h
+++ b/binsrc/virtoledb/lobdata.h
@@ -1,11 +1,11 @@
 /*  lobdata.h
  *
- *  $Id: lobdata.h,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: lobdata.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/mresults.cpp b/binsrc/virtoledb/mresults.cpp
index 4e5951d..b923e8a 100644
--- a/binsrc/virtoledb/mresults.cpp
+++ b/binsrc/virtoledb/mresults.cpp
@@ -1,11 +1,11 @@
 /*  mresults.cpp
  *
- *  $Id: mresults.cpp,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: mresults.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/mresults.h b/binsrc/virtoledb/mresults.h
index 4ecef72..159af3c 100644
--- a/binsrc/virtoledb/mresults.h
+++ b/binsrc/virtoledb/mresults.h
@@ -1,11 +1,11 @@
 /*  mresults.h
  *
- *  $Id: mresults.h,v 1.2 2007/09/05 11:33:57 source Exp $
+ *  $Id: mresults.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/os.h b/binsrc/virtoledb/os.h
index dbfcada..2b17173 100644
--- a/binsrc/virtoledb/os.h
+++ b/binsrc/virtoledb/os.h
@@ -1,13 +1,13 @@
 /*  os.h
  *
- *  $Id: os.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: os.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Portability macros
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/paramdata.cpp b/binsrc/virtoledb/paramdata.cpp
index 4910f4c..3744a11 100644
--- a/binsrc/virtoledb/paramdata.cpp
+++ b/binsrc/virtoledb/paramdata.cpp
@@ -1,11 +1,11 @@
 /*  paramdata.cpp
  *
- *  $Id: paramdata.cpp,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: paramdata.cpp,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/paramdata.h b/binsrc/virtoledb/paramdata.h
index 308f12e..89651ac 100644
--- a/binsrc/virtoledb/paramdata.h
+++ b/binsrc/virtoledb/paramdata.h
@@ -1,11 +1,11 @@
 /*  paramdata.h
  *
- *  $Id: paramdata.h,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: paramdata.h,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/properties.cpp b/binsrc/virtoledb/properties.cpp
index 16644bd..6098cac 100644
--- a/binsrc/virtoledb/properties.cpp
+++ b/binsrc/virtoledb/properties.cpp
@@ -1,11 +1,11 @@
 /*  properties.cpp
  *
- *  $Id: properties.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: properties.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/properties.h b/binsrc/virtoledb/properties.h
index 04b436f..cb9b008 100644
--- a/binsrc/virtoledb/properties.h
+++ b/binsrc/virtoledb/properties.h
@@ -1,11 +1,11 @@
 /*  properties.h
  *
- *  $Id: properties.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: properties.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/refcounted.cpp b/binsrc/virtoledb/refcounted.cpp
index 5faae16..f11b951 100644
--- a/binsrc/virtoledb/refcounted.cpp
+++ b/binsrc/virtoledb/refcounted.cpp
@@ -1,13 +1,13 @@
 /*  refcounted.h
  *
- *  $Id: refcounted.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: refcounted.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Reference counted objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/refcounted.h b/binsrc/virtoledb/refcounted.h
index f3a507a..41cc13f 100644
--- a/binsrc/virtoledb/refcounted.h
+++ b/binsrc/virtoledb/refcounted.h
@@ -1,13 +1,13 @@
 /*  refcounted.h
  *
- *  $Id: refcounted.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: refcounted.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Reference counted objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/resource.h b/binsrc/virtoledb/resource.h
index 4ec7074..e17f578 100644
--- a/binsrc/virtoledb/resource.h
+++ b/binsrc/virtoledb/resource.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/rowset.cpp b/binsrc/virtoledb/rowset.cpp
index 2e1ee36..2434739 100644
--- a/binsrc/virtoledb/rowset.cpp
+++ b/binsrc/virtoledb/rowset.cpp
@@ -1,11 +1,11 @@
 /*  rowset.cpp
  *
- *  $Id: rowset.cpp,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: rowset.cpp,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/rowset.h b/binsrc/virtoledb/rowset.h
index ae3a44e..771657b 100644
--- a/binsrc/virtoledb/rowset.h
+++ b/binsrc/virtoledb/rowset.h
@@ -1,11 +1,11 @@
 /*  rowset.h
  *
- *  $Id: rowset.h,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: rowset.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/rowsetdata.cpp b/binsrc/virtoledb/rowsetdata.cpp
index 067bf91..1ca01d3 100644
--- a/binsrc/virtoledb/rowsetdata.cpp
+++ b/binsrc/virtoledb/rowsetdata.cpp
@@ -1,11 +1,11 @@
 /*  rowsetdata.cpp
  *
- *  $Id: rowsetdata.cpp,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: rowsetdata.cpp,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/rowsetdata.h b/binsrc/virtoledb/rowsetdata.h
index 791ea8a..5941832 100644
--- a/binsrc/virtoledb/rowsetdata.h
+++ b/binsrc/virtoledb/rowsetdata.h
@@ -1,11 +1,11 @@
 /*  rowsetdata.h
  *
- *  $Id: rowsetdata.h,v 1.3 2007/10/23 13:14:03 source Exp $
+ *  $Id: rowsetdata.h,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/rowsetprops.cpp b/binsrc/virtoledb/rowsetprops.cpp
index f0d0cc9..af26671 100644
--- a/binsrc/virtoledb/rowsetprops.cpp
+++ b/binsrc/virtoledb/rowsetprops.cpp
@@ -1,11 +1,11 @@
 /*  rowsetprops.h
  *
- *  $Id: rowsetprops.cpp,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: rowsetprops.cpp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/rowsetprops.h b/binsrc/virtoledb/rowsetprops.h
index 97c71ef..c2b75b2 100644
--- a/binsrc/virtoledb/rowsetprops.h
+++ b/binsrc/virtoledb/rowsetprops.h
@@ -1,11 +1,11 @@
 /*  rowsetprops.h
  *
- *  $Id: rowsetprops.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: rowsetprops.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/session.cpp b/binsrc/virtoledb/session.cpp
index 12919c6..cc62619 100644
--- a/binsrc/virtoledb/session.cpp
+++ b/binsrc/virtoledb/session.cpp
@@ -1,11 +1,11 @@
 /*  session.cpp
  *
- *  $Id: session.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: session.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/session.h b/binsrc/virtoledb/session.h
index 3edb30f..74153ae 100644
--- a/binsrc/virtoledb/session.h
+++ b/binsrc/virtoledb/session.h
@@ -1,11 +1,11 @@
 /*  session.h
  *
- *  $Id: session.h,v 1.2 2007/10/23 13:14:03 source Exp $
+ *  $Id: session.h,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/syncobj.cpp b/binsrc/virtoledb/syncobj.cpp
index 030ee92..553bc0b 100644
--- a/binsrc/virtoledb/syncobj.cpp
+++ b/binsrc/virtoledb/syncobj.cpp
@@ -1,13 +1,13 @@
 /*  syncobj.cpp
  *
- *  $Id: syncobj.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: syncobj.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Synchronization objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/syncobj.h b/binsrc/virtoledb/syncobj.h
index 4f522cf..8023580 100644
--- a/binsrc/virtoledb/syncobj.h
+++ b/binsrc/virtoledb/syncobj.h
@@ -1,13 +1,13 @@
 /*  syncobj.h
  *
- *  $Id: syncobj.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: syncobj.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  Synchronization objects.
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/util.cpp b/binsrc/virtoledb/util.cpp
index 9635a51..c994a41 100644
--- a/binsrc/virtoledb/util.cpp
+++ b/binsrc/virtoledb/util.cpp
@@ -1,11 +1,11 @@
 /*  util.cpp
  *
- *  $Id: util.cpp,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: util.cpp,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/util.h b/binsrc/virtoledb/util.h
index 54f8048..3404f39 100644
--- a/binsrc/virtoledb/util.h
+++ b/binsrc/virtoledb/util.h
@@ -1,11 +1,11 @@
 /*  util.h
  *
- *  $Id: util.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: util.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtoledb/virtoledb.h b/binsrc/virtoledb/virtoledb.h
index e54f912..2276805 100644
--- a/binsrc/virtoledb/virtoledb.h
+++ b/binsrc/virtoledb/virtoledb.h
@@ -1,11 +1,11 @@
 /*  virtoledb.h
  *
- *  $Id: virtoledb.h,v 1.1.1.1 2006/04/11 17:56:12 source Exp $
+ *  $Id: virtoledb.h,v 1.1.1.1.2.1 2012/03/08 12:55:19 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso/Makefile.am b/binsrc/virtuoso/Makefile.am
index 996c368..5767285 100644
--- a/binsrc/virtuoso/Makefile.am
+++ b/binsrc/virtuoso/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso/Makefile.in b/binsrc/virtuoso/Makefile.in
index e0666b8..078c050 100644
--- a/binsrc/virtuoso/Makefile.in
+++ b/binsrc/virtuoso/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -227,6 +227,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -275,6 +276,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -326,6 +328,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -372,7 +375,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/virtuoso/libviwin32.def b/binsrc/virtuoso/libviwin32.def
index 8aaa90e..83bf7c7 100644
--- a/binsrc/virtuoso/libviwin32.def
+++ b/binsrc/virtuoso/libviwin32.def
@@ -1,14 +1,14 @@
 ;
 ;  libviwin32.def
 ;
-;  $Id: libviwin32.def,v 1.4.2.1 2010/01/25 22:44:12 source Exp $
+;  $Id: libviwin32.def,v 1.4.2.3 2012/03/08 12:55:19 source Exp $
 ;
 ;  Link script for the OpenLink Virtuoso Universal Server DLL
 ;
 ;  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 ;  project.
 ;  
-;  Copyright (C) 1998-2010 OpenLink Software
+;  Copyright (C) 1998-2012 OpenLink Software
 ;  
 ;  This project is free software; you can redistribute it and/or modify it
 ;  under the terms of the GNU General Public License as published by the
@@ -195,7 +195,6 @@ EXPORTS
 	sch_name_to_type		@673
 	PrpcThreadAttach		@674
 	PrpcThreadDetach		@675
-	decode_base64			@676
 	case_mode			@677
 	virtuoso_odbc_port		@678
 	uudecode_base64			@679
@@ -210,3 +209,4 @@ EXPORTS
 	isp_schema_1 			@688
 	strses_enable_paging		@689
 	http_ses_size			@690
+	log_proc_overwrite		@691
diff --git a/binsrc/virtuoso/viconfig.c b/binsrc/virtuoso/viconfig.c
index 07efd44..cf38427 100644
--- a/binsrc/virtuoso/viconfig.c
+++ b/binsrc/virtuoso/viconfig.c
@@ -1,12 +1,12 @@
 /*
  *  viconfig.c
  *
- *  $Id: viconfig.c,v 1.38.2.19 2011/03/03 17:12:05 source Exp $
+ *  $Id: viconfig.c,v 1.38.2.34 2012/03/15 13:57:11 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -30,6 +30,8 @@
 #include "sqlnode.h"
 #include "sqlver.h"
 
+
+#include "util/sslengine.h"
 #include "plugin.h"
 #include "langfunc.h"
 #include "msdtc.h"
@@ -111,6 +113,7 @@ extern char *http_proxy_address;
 extern char *http_cli_proxy_server;
 extern char *http_cli_proxy_except;
 extern int32 http_enable_client_cache;
+extern int32 log_proc_overwrite;
 
 #ifdef _SSL
 extern char *https_port;
@@ -174,13 +177,17 @@ extern int uriqa_dynamic_local;
 extern int lite_mode;
 extern int rdf_obj_ft_rules_size;
 extern int it_n_maps;
+extern int32 rdf_shorten_long_iri;
+extern int32 ric_samples_sz;
+extern int32 enable_p_stat;
 extern int aq_max_threads;
 
 char * http_log_file_check (struct tm *now); /* http log name checking */
 
 int32 c_txn_after_image_limit;
 int32 c_n_fds_per_file;
-int32 c_syslog;
+int32 c_syslog = 0;
+char *c_syslog_facility = NULL;
 /* These are the config variables as read here */
 char *c_error_log_file;
 char *c_database_file;
@@ -205,6 +212,7 @@ int32 c_prefix_resultnames;
 int32 c_disable_mt_write;
 int32 c_bad_parent_links;
 extern int32 dbs_check_extent_free_pages;
+extern int32 dbs_cache_check_enable;
 #if 0/*obsoleted*/
 int32 c_bad_dtp;
 int32 c_atomic_dive;
@@ -347,6 +355,7 @@ extern int32 cli_not_c_char_escape;
 extern int32 cli_utf8_execs;
 extern int32 cli_binary_timestamp;
 extern int32 cli_no_system_tables;
+extern int32 cli_max_cached_stmts;
 
 int32 c_cli_encryption_on_password;
 extern long cli_encryption_on_password;
@@ -515,18 +524,112 @@ virtuoso_cfg_next_string (char **pkey, char **pret)
 
 LOG *startup_log = NULL;
 
+#ifdef HAVE_SYSLOG
+struct _syslog_code {
+	char    *c_name;
+	int     c_val;
+} syslog_facilitynames[] =
+{
+#ifdef LOG_AUTH
+	{ "AUTH",	LOG_AUTH },
+#endif
+#ifdef LOG_AUTHPRIV
+	{ "AUTHPRIV",	LOG_AUTHPRIV },
+#endif
+#ifdef LOG_CRON
+	{ "CRON",	LOG_CRON },
+#endif
+#ifdef LOG_DAEMON
+	{ "DAEMON",	LOG_DAEMON },
+#endif
+#ifdef LOG_FTP
+	{ "FTP",	LOG_FTP },
+#endif
+#ifdef LOG_INSTALL
+	{ "INSTALL",	LOG_INSTALL },
+#endif
+#ifdef LOG_KERN
+	{ "KERN",	LOG_KERN },
+#endif
+#ifdef LOG_LPR
+	{ "LPR",	LOG_LPR },
+#endif
+#ifdef LOG_MAIL
+	{ "MAIL",	LOG_MAIL },
+#endif
+#ifdef LOG_NETINFO
+	{ "NETINFO",	LOG_NETINFO },
+#endif
+#ifdef LOG_NEWS
+	{ "NEWS",	LOG_NEWS },
+#endif
+#ifdef LOG_RAS
+	{ "RAS",	LOG_RAS },
+#endif
+#ifdef LOG_REMOTEAUTH
+	{ "REMOTEAUTH",	LOG_REMOTEAUTH },
+#endif
+#ifdef LOG_SYSLOG
+	{ "SYSLOG",	LOG_SYSLOG },
+#endif
+#ifdef LOG_USER
+	{ "USER",	LOG_USER },
+#endif
+#ifdef LOG_UUCP
+	{ "UUCP",	LOG_UUCP },
+#endif
+#ifdef LOG_LOCAL0
+	{ "LOCAL0",	LOG_LOCAL0 },
+#endif
+#ifdef LOG_LOCAL1
+	{ "LOCAL1",	LOG_LOCAL1 },
+#endif
+#ifdef LOG_LOCAL2
+	{ "LOCAL2",	LOG_LOCAL2 },
+#endif
+#ifdef LOG_LOCAL3
+	{ "LOCAL3",	LOG_LOCAL3 },
+#endif
+#ifdef LOG_LOCAL4
+	{ "LOCAL4",	LOG_LOCAL4 },
+#endif
+#ifdef LOG_LOCAL5
+	{ "LOCAL5",	LOG_LOCAL5 },
+#endif
+#ifdef LOG_LOCAL6
+	{ "LOCAL6",	LOG_LOCAL6 },
+#endif
+#ifdef LOG_LOCAL7
+	{ "LOCAL7",	LOG_LOCAL7 },
+#endif
+	{ "DEFAULT",	LOG_USER }
+};
+#endif
+
+
 LOG *
-cfg_open_syslog (int level)
+cfg_open_syslog (int level, char *c_facility)
 {
 #ifdef HAVE_SYSLOG
+  int facility = LOG_USER;
+  int i;
+
+  if (!c_facility) c_facility = "default";
+
+  for (i = 0; i < sizeof (syslog_facilitynames) / sizeof (syslog_facilitynames[0]); i++)
+    {
+      if (!stricmp (syslog_facilitynames[i].c_name, c_facility))
+	{
+	  facility = syslog_facilitynames[i].c_val;
+	  break;
+	}
+    }
+
       return log_open_syslog ("Virtuoso",
 	  LOG_CONS | LOG_NOWAIT | LOG_PID,
-	  LOG_USER,
-	  level, L_MASK_ALL,
-            f_debug ?
-                L_STYLE_LEVEL | L_STYLE_GROUP | L_STYLE_TIME :
-		L_STYLE_GROUP | L_STYLE_TIME
-	  );
+      facility, level,
+	L_MASK_ALL,
+	f_debug ? L_STYLE_LEVEL | L_STYLE_GROUP : L_STYLE_GROUP);
 #else
       return NULL;
 #endif
@@ -596,6 +699,9 @@ cfg_setup (void)
   if (cfg_getlong (pconfig, section, "Syslog", &c_syslog) == -1)
     c_syslog = 0;
 
+  if (cfg_getstring (pconfig, section, "SyslogFacility", &c_syslog_facility) == -1)
+    c_syslog_facility = "default";
+
   if (c_file_extend < DP_INSERT_RESERVE + 5)
     c_file_extend = DP_INSERT_RESERVE + 5;
 
@@ -617,8 +723,9 @@ cfg_setup (void)
       if (startup_log)
         log_close (startup_log);
       startup_log = NULL;
+
       if (c_syslog)
-	cfg_open_syslog (c_error_log_level);
+    cfg_open_syslog (c_error_log_level, c_syslog_facility);
 
   if (cfg_getstring (pconfig, section, "xa_persistent_file", &c_xa_persistent_file) == -1)
     c_xa_persistent_file = s_strdup (setext (prefix, "pxa", EXT_SET));
@@ -903,6 +1010,10 @@ cfg_setup (void)
   if (cfg_getlong (pconfig, section, "ExtentReadStartupWindow", &em_ra_startup_window) == -1)
    em_ra_startup_window = 40000;
 
+  if (cfg_getlong (pconfig, section, "LogProcOverwrite", &log_proc_overwrite) == -1)
+    log_proc_overwrite = 1;
+
+
   {
     int nbdirs;
     dk_set_t bd = NULL;
@@ -1048,12 +1159,21 @@ cfg_setup (void)
   if (cfg_getlong (pconfig, section, "RdfFreeTextRulesSize", &c_rdf_obj_ft_rules_size) == -1)
     c_rdf_obj_ft_rules_size = 0;
 
+  if (cfg_getlong (pconfig, section, "RdfInferenceSampleCacheSize", &ric_samples_sz) == -1)
+    ric_samples_sz = 0;
+
   if (cfg_getlong (pconfig, section, "IndexTreeMaps", &c_it_n_maps) == -1)
     c_it_n_maps = 0;
 
   if (cfg_getlong (pconfig, section, "DensePageAllocation", &c_dense_page_allocation) == -1)
     c_dense_page_allocation = 0;
 
+  if (cfg_getlong (pconfig, section, "PageMapCheck", &dbs_cache_check_enable) == -1)
+    dbs_cache_check_enable = 0;
+
+  if (cfg_getlong (pconfig, section, "MaxOpenClientStatements", &cli_max_cached_stmts) == -1)
+    cli_max_cached_stmts = 10000;
+
   section = "HTTPServer";
 
   if (cfg_getstring (pconfig, section, "ServerPort", &c_http_port) == -1)
@@ -1242,7 +1362,7 @@ cfg_setup (void)
   if (cfg_getlong (pconfig, section, "DuplicateCheckpointRemaps", &cpt_remap_recovery) == -1)
     cpt_remap_recovery = 0;
   if (cfg_getlong (pconfig, section, "CheckExtentFreePages", &dbs_check_extent_free_pages) == -1)
-    dbs_check_extent_free_pages = 0;
+    dbs_check_extent_free_pages = 1;
 
 
 #if 0/*obsoleted*/
@@ -1330,6 +1450,30 @@ cfg_setup (void)
     c_sparql_max_mem_in_use = 0;
   if (cfg_getlong (pconfig, section, "TransitivityCacheEnabled", &tn_cache_enable) == -1)
     tn_cache_enable = 0;
+  if (cfg_getlong (pconfig, section, "ShortenLongURIs", &rdf_shorten_long_iri) == -1)
+    rdf_shorten_long_iri = 0;
+  if (cfg_getlong (pconfig, section, "EnablePstats", &enable_p_stat) == -1)
+    enable_p_stat = 1;
+
+ /* Initialize OpenSSL engines */
+  ssl_engine_startup ();
+#if 0
+  if (cfg_find (pconfig, "SSLEngines", NULL) == 0)
+    {
+      while (cfg_nextentry (pconfig) == 0)
+        {
+          if (cfg_section (pconfig))
+            break;
+          if (cfg_define (pconfig) && !cfg_continue (pconfig))
+            {
+              if (ssl_engine_configure (pconfig->value) == -1)
+                {
+                  log_error ("Failed to configure an OpenSSL engine with parameters '%s'", pconfig->value);
+                }
+            }
+        }
+    }
+#endif
 
   /* Now open the HTTP log */
   if (http_log_file)
@@ -1641,7 +1785,7 @@ new_db_read_cfg (dbe_storage_t * ignore, char *mode)
   aq_max_threads = c_aq_max_threads;
   if (aq_max_threads > 100)
     aq_max_threads = 100;
-  if (aq_max_threads < 10)
+  if (aq_max_threads < 10 && aq_max_threads > 0)
     aq_max_threads = 10;
 #ifdef _SSL
   https_port = c_https_port;
@@ -1902,7 +2046,6 @@ new_dbs_read_cfg (dbe_storage_t * dbs, char *ignore_file_name)
 	    }
 	  modifier = toupper (segszstr[strlen (segszstr) - 1]);
 	  /* THIS ASSUMES PAGE_SZ == 4k */
-#   define KILOS_PER_PAGE (PAGE_SZ/1024)
 	  switch (modifier)
 	    {
 	    case 'K':
@@ -2094,7 +2237,7 @@ static void
 db_lck_write_pid (int fd)
 {
   char pid_arr[50];
-  int len;
+  size_t len;
 
   snprintf (pid_arr, sizeof (pid_arr), "VIRT_PID=%lu\n", (unsigned long) getpid ());
   len = strlen (pid_arr);
diff --git a/binsrc/virtuoso/viunix.c b/binsrc/virtuoso/viunix.c
index bc750b6..ca17454 100644
--- a/binsrc/virtuoso/viunix.c
+++ b/binsrc/virtuoso/viunix.c
@@ -1,14 +1,14 @@
 /*
  *  viunix.c
  *
- *  $Id: viunix.c,v 1.11.2.1 2010/09/17 16:36:13 source Exp $
+ *  $Id: viunix.c,v 1.11.2.5 2012/03/08 12:55:19 source Exp $
  *
  *  OpenLink Virtuoso VDBMS Server main
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -78,6 +78,9 @@ extern char *f_crash_dump_data_ini;
 
 extern const char* recover_file_prefix;
 extern int ob_just_report;
+#ifdef V5UPGRADE
+extern int32 log_v6_format;
+#endif
 
 struct pgm_option options[] =
 {
@@ -126,6 +129,10 @@ struct pgm_option options[] =
 
   {"pwddav", '\0', ARG_STR, &f_new_dav_pass, "New DAV password"},
 
+#ifdef V5UPGRADE
+  {"log6", '\0', ARG_NONE, &log_v6_format, "Backup dump in version 6 format"},
+#endif
+
   {0}
 };
 
@@ -174,10 +181,10 @@ void new_dbs_read_cfg (caddr_t *it, char *mode);
 dk_set_t new_cfg_read_storages (caddr_t **temp_storage);
 
 extern LOG *startup_log;
-LOG *cfg_open_syslog (int level);
+LOG *cfg_open_syslog (int level, char *facility);
 
 /* Globals for virtuoso */
-PCONFIG pconfig;			/* configuration file */
+PCONFIG pconfig = NULL;			/* configuration file */
 
 /* Locals */
 extern LOG *stderr_log;
@@ -561,7 +568,7 @@ main (int argc, char **argv)
   dbg_malloc_enable();
 #endif
   if (!startup_log)
-    startup_log = cfg_open_syslog (LOG_DEBUG);
+    startup_log = cfg_open_syslog (LOG_DEBUG, "default");
 
   process_exit_hook = viunix_terminate;
 
@@ -576,6 +583,10 @@ main (int argc, char **argv)
   /* all of the below means foreground ! */
   if (f_backup_dump || recover_file_prefix || f_crash_dump)
     f_foreground = 1;
+#ifdef V5UPGRADE
+  if (!f_backup_dump)
+    log_v6_format = 0;
+#endif
 
   /* put ourselves in the background */
   os_background ();
diff --git a/binsrc/virtuoso/viwin32.c b/binsrc/virtuoso/viwin32.c
index d88e35d..30b5e65 100644
--- a/binsrc/virtuoso/viwin32.c
+++ b/binsrc/virtuoso/viwin32.c
@@ -1,7 +1,7 @@
 /*
  *  viwin32.c
  *
- *  $Id: viwin32.c,v 1.11.2.1 2010/09/17 16:36:13 source Exp $
+ *  $Id: viwin32.c,v 1.11.2.4 2012/03/14 13:58:52 source Exp $
  *
  *  OpenLink Virtuoso DBMS Server
  *  Main code for Win32
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -157,7 +157,7 @@ extern int ob_just_report;
 /*
  *  Globals for virtuoso
  */
-PCONFIG	pconfig;			/* configuration file */
+PCONFIG	pconfig = NULL;			/* configuration file */
 
 /*
  *  Module locals
@@ -1256,7 +1256,7 @@ usage (void)
       PACKAGE_VERSION, DBMS_SRV_GEN_MAJOR, DBMS_SRV_GEN_MINOR, build_thread_model, build_date);
   p = stpcpy (p, line);
 
-  sprintf (line, "Compiled for 32 Bit Windows Operating Environments\n");
+  sprintf (line, "Compiled for %s (%s)\n", build_opsys_id, build_host_id);
   p = stpcpy (p, line);
 
   if (build_special_server_model && strlen(build_special_server_model) > 1)
@@ -1632,3 +1632,14 @@ ApplicationMain (int argc, char **argv)
 
   return NO_ERROR;
 }
+
+
+/* This is here so that OpenSSL can determine if this instance is running
+ * as a windows service. OpenSSL tries to avoid UI when this returns TRUE.
+ * It also affects the random generator which reads the screen at startup.
+ */
+__declspec(dllexport) BOOL __cdecl
+_OPENSSL_isservice (void)
+{
+  return serviceFlag;
+}
diff --git a/binsrc/virtuoso/viwin32.ico b/binsrc/virtuoso/viwin32.ico
index 77aa4ee..b7ff434 100644
Binary files a/binsrc/virtuoso/viwin32.ico and b/binsrc/virtuoso/viwin32.ico differ
diff --git a/binsrc/virtuoso_sink/DBConnection.cpp b/binsrc/virtuoso_sink/DBConnection.cpp
index 07b7211..40d8d3d 100644
--- a/binsrc/virtuoso_sink/DBConnection.cpp
+++ b/binsrc/virtuoso_sink/DBConnection.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/DBConnection.h b/binsrc/virtuoso_sink/DBConnection.h
index a4ded5e..1bd0dd9 100644
--- a/binsrc/virtuoso_sink/DBConnection.h
+++ b/binsrc/virtuoso_sink/DBConnection.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/DBConnectionPool.cpp b/binsrc/virtuoso_sink/DBConnectionPool.cpp
index aa3555c..13fa82b 100644
--- a/binsrc/virtuoso_sink/DBConnectionPool.cpp
+++ b/binsrc/virtuoso_sink/DBConnectionPool.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/DBConnectionPool.h b/binsrc/virtuoso_sink/DBConnectionPool.h
index a87426a..d48ad3e 100644
--- a/binsrc/virtuoso_sink/DBConnectionPool.h
+++ b/binsrc/virtuoso_sink/DBConnectionPool.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/MailMsg_i.c b/binsrc/virtuoso_sink/MailMsg_i.c
index 0fcdeeb..428f2bf 100644
--- a/binsrc/virtuoso_sink/MailMsg_i.c
+++ b/binsrc/virtuoso_sink/MailMsg_i.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/MailMsg_p.c b/binsrc/virtuoso_sink/MailMsg_p.c
index 99308d0..7c9bb0b 100644
--- a/binsrc/virtuoso_sink/MailMsg_p.c
+++ b/binsrc/virtuoso_sink/MailMsg_p.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/Makefile.am b/binsrc/virtuoso_sink/Makefile.am
index 18827ad..932eafc 100644
--- a/binsrc/virtuoso_sink/Makefile.am
+++ b/binsrc/virtuoso_sink/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/Makefile.in b/binsrc/virtuoso_sink/Makefile.in
index a3d58f8..1b030da 100644
--- a/binsrc/virtuoso_sink/Makefile.in
+++ b/binsrc/virtuoso_sink/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/virtuoso_sink/NNTP.cpp b/binsrc/virtuoso_sink/NNTP.cpp
index 2a76b4c..c31cb1d 100644
--- a/binsrc/virtuoso_sink/NNTP.cpp
+++ b/binsrc/virtuoso_sink/NNTP.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/NNTP.h b/binsrc/virtuoso_sink/NNTP.h
index 98761fe..7db2a00 100644
--- a/binsrc/virtuoso_sink/NNTP.h
+++ b/binsrc/virtuoso_sink/NNTP.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/SMTP.cpp b/binsrc/virtuoso_sink/SMTP.cpp
index 9c0ffe2..f059331 100644
--- a/binsrc/virtuoso_sink/SMTP.cpp
+++ b/binsrc/virtuoso_sink/SMTP.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/SMTP.h b/binsrc/virtuoso_sink/SMTP.h
index b14aaae..6be70a0 100644
--- a/binsrc/virtuoso_sink/SMTP.h
+++ b/binsrc/virtuoso_sink/SMTP.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/Seo_i.c b/binsrc/virtuoso_sink/Seo_i.c
index abe03d1..83a250b 100644
--- a/binsrc/virtuoso_sink/Seo_i.c
+++ b/binsrc/virtuoso_sink/Seo_i.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/Seo_p.c b/binsrc/virtuoso_sink/Seo_p.c
index e3ad410..1d841f1 100644
--- a/binsrc/virtuoso_sink/Seo_p.c
+++ b/binsrc/virtuoso_sink/Seo_p.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/SmtpEvent.h b/binsrc/virtuoso_sink/SmtpEvent.h
index 4e84990..c20e890 100644
--- a/binsrc/virtuoso_sink/SmtpEvent.h
+++ b/binsrc/virtuoso_sink/SmtpEvent.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/SmtpEvent_i.c b/binsrc/virtuoso_sink/SmtpEvent_i.c
index 8b2e891..c167d1a 100644
--- a/binsrc/virtuoso_sink/SmtpEvent_i.c
+++ b/binsrc/virtuoso_sink/SmtpEvent_i.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/SmtpEvent_p.c b/binsrc/virtuoso_sink/SmtpEvent_p.c
index 8743c06..74c055c 100644
--- a/binsrc/virtuoso_sink/SmtpEvent_p.c
+++ b/binsrc/virtuoso_sink/SmtpEvent_p.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/StdAfx.cpp b/binsrc/virtuoso_sink/StdAfx.cpp
index bedb5b0..14b6945 100644
--- a/binsrc/virtuoso_sink/StdAfx.cpp
+++ b/binsrc/virtuoso_sink/StdAfx.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/StdAfx.h b/binsrc/virtuoso_sink/StdAfx.h
index cf739c4..c89f702 100644
--- a/binsrc/virtuoso_sink/StdAfx.h
+++ b/binsrc/virtuoso_sink/StdAfx.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/VirtuosoSink.cpp b/binsrc/virtuoso_sink/VirtuosoSink.cpp
index ec72e1b..e5b4e2d 100644
--- a/binsrc/virtuoso_sink/VirtuosoSink.cpp
+++ b/binsrc/virtuoso_sink/VirtuosoSink.cpp
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/VirtuosoSink.h b/binsrc/virtuoso_sink/VirtuosoSink.h
index 0f57b0d..dd19cd8 100644
--- a/binsrc/virtuoso_sink/VirtuosoSink.h
+++ b/binsrc/virtuoso_sink/VirtuosoSink.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/VirtuosoSink.idl b/binsrc/virtuoso_sink/VirtuosoSink.idl
index 0cf7150..c45a446 100644
--- a/binsrc/virtuoso_sink/VirtuosoSink.idl
+++ b/binsrc/virtuoso_sink/VirtuosoSink.idl
@@ -2,7 +2,7 @@
 //  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 //  project.
 //  
-//  Copyright (C) 1998-2006 OpenLink Software
+//  Copyright (C) 1998-2012 OpenLink Software
 //  
 //  This project is free software; you can redistribute it and/or modify it
 //  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/VirtuosoSink_i.c b/binsrc/virtuoso_sink/VirtuosoSink_i.c
index 9a08e40..1beb180 100644
--- a/binsrc/virtuoso_sink/VirtuosoSink_i.c
+++ b/binsrc/virtuoso_sink/VirtuosoSink_i.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/VirtuosoSink_p.c b/binsrc/virtuoso_sink/VirtuosoSink_p.c
index 4fd76f2..345d1a0 100644
--- a/binsrc/virtuoso_sink/VirtuosoSink_p.c
+++ b/binsrc/virtuoso_sink/VirtuosoSink_p.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/dlldata.c b/binsrc/virtuoso_sink/dlldata.c
index cc3ead6..75ce7a1 100644
--- a/binsrc/virtuoso_sink/dlldata.c
+++ b/binsrc/virtuoso_sink/dlldata.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/virtuoso_sink/resource.h b/binsrc/virtuoso_sink/resource.h
index 5524684..64c1b5c 100644
--- a/binsrc/virtuoso_sink/resource.h
+++ b/binsrc/virtuoso_sink/resource.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/Makefile.am b/binsrc/vsp/Makefile.am
index 3e2a088..4632d56 100644
--- a/binsrc/vsp/Makefile.am
+++ b/binsrc/vsp/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/Makefile.in b/binsrc/vsp/Makefile.in
index 6487732..4e11f3d 100644
--- a/binsrc/vsp/Makefile.in
+++ b/binsrc/vsp/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -103,6 +103,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -151,6 +152,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -202,6 +204,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -248,7 +251,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/vsp/admin/Hosted_Modules.vspx b/binsrc/vsp/admin/Hosted_Modules.vspx
index 6ffb186..f349558 100644
--- a/binsrc/vsp/admin/Hosted_Modules.vspx
+++ b/binsrc/vsp/admin/Hosted_Modules.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: Hosted_Modules.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: Hosted_Modules.vspx,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/Hosted_Modules_load.vspx b/binsrc/vsp/admin/Hosted_Modules_load.vspx
index d615680..2d11a7e 100644
--- a/binsrc/vsp/admin/Hosted_Modules_load.vspx
+++ b/binsrc/vsp/admin/Hosted_Modules_load.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: Hosted_Modules_load.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: Hosted_Modules_load.vspx,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/Hosted_Modules_load_results.vspx b/binsrc/vsp/admin/Hosted_Modules_load_results.vspx
index ce7ce74..21af4fd 100644
--- a/binsrc/vsp/admin/Hosted_Modules_load_results.vspx
+++ b/binsrc/vsp/admin/Hosted_Modules_load_results.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: Hosted_Modules_load_results.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: Hosted_Modules_load_results.vspx,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/Hosted_Modules_select.vspx b/binsrc/vsp/admin/Hosted_Modules_select.vspx
index 376aeef..6e5850c 100644
--- a/binsrc/vsp/admin/Hosted_Modules_select.vspx
+++ b/binsrc/vsp/admin/Hosted_Modules_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: Hosted_Modules_select.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: Hosted_Modules_select.vspx,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/Hosted_Modules_select2.vspx b/binsrc/vsp/admin/Hosted_Modules_select2.vspx
index e757c13..39c9082 100644
--- a/binsrc/vsp/admin/Hosted_Modules_select2.vspx
+++ b/binsrc/vsp/admin/Hosted_Modules_select2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: Hosted_Modules_select2.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: Hosted_Modules_select2.vspx,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/adm_js_check.vsp b/binsrc/vsp/admin/adm_js_check.vsp
index 57d0da4..eafefa7 100644
--- a/binsrc/vsp/admin/adm_js_check.vsp
+++ b/binsrc/vsp/admin/adm_js_check.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: adm_js_check.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: adm_js_check.vsp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin.sql b/binsrc/vsp/admin/admin.sql
index d7eb69e..81d22cd 100644
--- a/binsrc/vsp/admin/admin.sql
+++ b/binsrc/vsp/admin/admin.sql
@@ -2,14 +2,14 @@
 --
 --  admin.sql
 --
---  $Id: admin.sql,v 1.3.2.3 2011/02/03 10:35:33 source Exp $
+--  $Id: admin.sql,v 1.3.2.5 2012/03/08 12:55:19 source Exp $
 --
 --  Virtuoso admin vsp interface
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -4282,7 +4282,7 @@ adm_page_footer()
   http('<TR><TD CLASS="CopyrightBorder" COLSPAN="2"><IMG SRC="/admin/images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>');
   http('<TR><TD ALIGN="right" COLSPAN="2"><P CLASS="Copyright">Virtuoso Universal Server ');
   http(sys_stat('st_dbms_ver'));
-  http(' - Copyright© 1998-2011 OpenLink Software.</P></TD></TR>');
+  http(' - Copyright© 1998-2012 OpenLink Software.</P></TD></TR>');
   http('</TABLE>\n</BODY>');
 }
 ;
diff --git a/binsrc/vsp/admin/admin_conn_ds.vsp b/binsrc/vsp/admin/admin_conn_ds.vsp
index d9bf8a6..188a205 100644
--- a/binsrc/vsp/admin/admin_conn_ds.vsp
+++ b/binsrc/vsp/admin/admin_conn_ds.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_conn_ds.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_conn_ds.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_conn_ds_add.vsp b/binsrc/vsp/admin/admin_conn_ds_add.vsp
index 9cfca5e..262f181 100644
--- a/binsrc/vsp/admin/admin_conn_ds_add.vsp
+++ b/binsrc/vsp/admin/admin_conn_ds_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_conn_ds_add.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_conn_ds_add.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/adm_acl_main.vsp b/binsrc/vsp/admin/admin_dav/adm_acl_main.vsp
index cada748..8e6787a 100644
--- a/binsrc/vsp/admin/admin_dav/adm_acl_main.vsp
+++ b/binsrc/vsp/admin/admin_dav/adm_acl_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: adm_acl_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: adm_acl_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/adm_http_acl.vsp b/binsrc/vsp/admin/admin_dav/adm_http_acl.vsp
index 116729f..1eca49d 100644
--- a/binsrc/vsp/admin/admin_dav/adm_http_acl.vsp
+++ b/binsrc/vsp/admin/admin_dav/adm_http_acl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: adm_http_acl.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: adm_http_acl.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/adm_proxy_acl.vsp b/binsrc/vsp/admin/admin_dav/adm_proxy_acl.vsp
index a47c8ea..9a4be2d 100644
--- a/binsrc/vsp/admin/admin_dav/adm_proxy_acl.vsp
+++ b/binsrc/vsp/admin/admin_dav/adm_proxy_acl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: adm_proxy_acl.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: adm_proxy_acl.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/adm_soap_opts.vsp b/binsrc/vsp/admin/admin_dav/adm_soap_opts.vsp
index ae812f1..0c2150a 100644
--- a/binsrc/vsp/admin/admin_dav/adm_soap_opts.vsp
+++ b/binsrc/vsp/admin/admin_dav/adm_soap_opts.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: adm_soap_opts.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: adm_soap_opts.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/adm_wsdl_gen.vsp b/binsrc/vsp/admin/admin_dav/adm_wsdl_gen.vsp
index eafd641..089785a 100644
--- a/binsrc/vsp/admin/admin_dav/adm_wsdl_gen.vsp
+++ b/binsrc/vsp/admin/admin_dav/adm_wsdl_gen.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: adm_wsdl_gen.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: adm_wsdl_gen.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog.vsp b/binsrc/vsp/admin/admin_dav/admin_blog.vsp
index 3d326f1..0ff39fe 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_blog.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_1.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_1.vsp
index 3004a95..c21a933 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_1.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_1.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_blog_1.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_2.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_2.vsp
index c7ad5a4..97d4224 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_2.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_blog_2.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_blog_2.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_3.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_3.vsp
index f5fd7b8..40d27ed 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_3.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_blog_3.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_3.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_category.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_category.vsp
index 0422cf8..fb32865 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_category.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_category.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_category.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_category.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_channel.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_channel.vsp
index d8dbcf7..4cddb2c 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_channel.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_channel.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_channel.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_channel.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_channel_items.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_channel_items.vsp
index d0bdb5c..6e44eb4 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_channel_items.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_channel_items.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_channel_items.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_channel_items.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_comments.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_comments.vsp
index 21c0a14..81e6e93 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_comments.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_comments.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_comments.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_comments.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_cont.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_cont.vsp
index e69250c..f1f6ac0 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_cont.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_cont.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_cont.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_cont.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_domain_setup.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_domain_setup.vsp
index 4a95fc6..685dcf4 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_domain_setup.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_domain_setup.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_blog_domain_setup.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_blog_domain_setup.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_error_log.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_error_log.vsp
index 2ce35b2..ab99042 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_error_log.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_error_log.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_error_log.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_error_log.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_mail.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_mail.vsp
index 3004a0a..49d155d 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_mail.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_mail.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_mail.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_mail.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_mail_gw.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_mail_gw.vsp
index 2e2ee25..a2d21eb 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_mail_gw.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_mail_gw.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_mail_gw.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_mail_gw.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_mail_pic.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_mail_pic.vsp
index c96bd82..b1873e0 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_mail_pic.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_mail_pic.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_mail_pic.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_mail_pic.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_mail_show.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_mail_show.vsp
index e7d7290..3534d35 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_mail_show.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_mail_show.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_mail_show.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_mail_show.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_notify.vspx b/binsrc/vsp/admin/admin_dav/admin_blog_notify.vspx
index 10f2aff..ef9e80b 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_notify.vspx
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_notify.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: admin_blog_notify.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: admin_blog_notify.vspx,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_ping_hosts.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_ping_hosts.vsp
index ff48eb1..679316e 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_ping_hosts.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_ping_hosts.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_ping_hosts.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_ping_hosts.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_blog_search_eng.vsp b/binsrc/vsp/admin/admin_dav/admin_blog_search_eng.vsp
index ddded2e..6d6cbd6 100644
--- a/binsrc/vsp/admin/admin_dav/admin_blog_search_eng.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_blog_search_eng.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_blog_search_eng.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_blog_search_eng.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_browse.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_browse.vsp
index 36a33dd..a894387 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_browse.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_browse.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_browse.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_browse.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_cols.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_cols.vsp
index fdc2aa3..e6f4e4c 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_cols.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_cols.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_cols.vsp,v 1.3 2007/01/22 14:02:35 source Exp $
+--  $Id: admin_dav_cols.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_document_search.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_document_search.vsp
index b4dde48..e354914 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_document_search.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_document_search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_document_search.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_document_search.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_documents.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_documents.vsp
index 2aa6c2f..07dbb09 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_documents.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_documents.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_documents.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_documents.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_edit.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_edit.vsp
index 0a31ac2..9250f7d 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_edit.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_edit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_editor.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_editor.vsp
index c1f8bf7..f4cb93b 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_editor.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_editor.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_editor.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_editor.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_ftext_upd.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_ftext_upd.vsp
index c537fff..7a7f5fe 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_ftext_upd.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_ftext_upd.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_ftext_upd.vsp,v 1.3 2007/01/22 14:02:35 source Exp $
+--  $Id: admin_dav_ftext_upd.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_new.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_new.vsp
index 0b8fa5f..c9ea78f 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_new.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_new.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_new.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_new.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_res_types.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_res_types.vsp
index cbddfbc..a531a73 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_res_types.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_res_types.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_res_types.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_res_types.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_user_opts.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_user_opts.vsp
index 584281c..9ac72cf 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_user_opts.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_user_opts.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_user_opts.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_user_opts.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_users.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_users.vsp
index 3aafac3..96643e5 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_users.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_users.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_users.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dav_users.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_dav_xslt.vsp b/binsrc/vsp/admin/admin_dav/admin_dav_xslt.vsp
index 041d393..f2e6225 100644
--- a/binsrc/vsp/admin/admin_dav/admin_dav_xslt.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_dav_xslt.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dav_xslt.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_dav_xslt.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_footer.vsp b/binsrc/vsp/admin/admin_dav/admin_footer.vsp
index 8eaba54..ed452da 100644
--- a/binsrc/vsp/admin/admin_dav/admin_footer.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_footer.vsp
@@ -1 +1 @@
-<hr><div class="copyright"><small>Virtuoso management interface. Copyright © 1998-2011 OpenLink Software</small></div>
+<hr><div class="copyright"><small>Virtuoso management interface. Copyright © 1998-2012 OpenLink Software</small></div>
diff --git a/binsrc/vsp/admin/admin_dav/admin_import_users.vsp b/binsrc/vsp/admin/admin_dav/admin_import_users.vsp
index 5cbed72..7e3037b 100644
--- a/binsrc/vsp/admin/admin_dav/admin_import_users.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_import_users.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_import_users.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_import_users.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_import_users_1.vsp b/binsrc/vsp/admin/admin_dav/admin_import_users_1.vsp
index cb4949e..08cdb99 100644
--- a/binsrc/vsp/admin/admin_dav/admin_import_users_1.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_import_users_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_import_users_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_import_users_1.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_import_users_2.vsp b/binsrc/vsp/admin/admin_dav/admin_import_users_2.vsp
index b7a571d..2c8c9ee 100644
--- a/binsrc/vsp/admin/admin_dav/admin_import_users_2.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_import_users_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_import_users_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_import_users_2.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_import_users_3.vsp b/binsrc/vsp/admin/admin_dav/admin_import_users_3.vsp
index f8804db..70736b7 100644
--- a/binsrc/vsp/admin/admin_dav/admin_import_users_3.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_import_users_3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_import_users_3.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_import_users_3.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_proc_list.vsp b/binsrc/vsp/admin/admin_dav/admin_proc_list.vsp
index 746d70d..02820c6 100644
--- a/binsrc/vsp/admin/admin_dav/admin_proc_list.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_proc_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_proc_list.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_proc_list.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_select_proc.vsp b/binsrc/vsp/admin/admin_dav/admin_select_proc.vsp
index f90f52f..df7ef11 100644
--- a/binsrc/vsp/admin/admin_dav/admin_select_proc.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_select_proc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_select_proc.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_select_proc.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_soap_list.vsp b/binsrc/vsp/admin/admin_dav/admin_soap_list.vsp
index 3f934c9..b71a58e 100644
--- a/binsrc/vsp/admin/admin_dav/admin_soap_list.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_soap_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_soap_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_soap_list.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_vfs_export_main.vsp b/binsrc/vsp/admin/admin_dav/admin_vfs_export_main.vsp
index 0ca549a..3c6a8b6 100644
--- a/binsrc/vsp/admin/admin_dav/admin_vfs_export_main.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_vfs_export_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_vfs_export_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_vfs_export_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_vfs_queue.vsp b/binsrc/vsp/admin/admin_dav/admin_vfs_queue.vsp
index a0988a4..8d6c5ef 100644
--- a/binsrc/vsp/admin/admin_dav/admin_vfs_queue.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_vfs_queue.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_vfs_queue.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_vfs_queue.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_vfs_site.vsp b/binsrc/vsp/admin/admin_dav/admin_vfs_site.vsp
index bd6e431..b1601ee 100644
--- a/binsrc/vsp/admin/admin_dav/admin_vfs_site.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_vfs_site.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_vfs_site.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_vfs_site.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_vfs_urls.vsp b/binsrc/vsp/admin/admin_dav/admin_vfs_urls.vsp
index 1779c24..ddc420d 100644
--- a/binsrc/vsp/admin/admin_dav/admin_vfs_urls.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_vfs_urls.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_vfs_urls.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_vfs_urls.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_virt_dir.vsp b/binsrc/vsp/admin/admin_dav/admin_virt_dir.vsp
index a7708b5..e0eee4e 100644
--- a/binsrc/vsp/admin/admin_dav/admin_virt_dir.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_virt_dir.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_virt_dir.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_virt_dir.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/admin_xml_template.vsp b/binsrc/vsp/admin/admin_dav/admin_xml_template.vsp
index ac12106..565128a 100644
--- a/binsrc/vsp/admin/admin_dav/admin_xml_template.vsp
+++ b/binsrc/vsp/admin/admin_dav/admin_xml_template.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_xml_template.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_xml_template.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/blog_post_preview.vsp b/binsrc/vsp/admin/admin_dav/blog_post_preview.vsp
index d8166b2..732c138 100644
--- a/binsrc/vsp/admin/admin_dav/blog_post_preview.vsp
+++ b/binsrc/vsp/admin/admin_dav/blog_post_preview.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: blog_post_preview.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: blog_post_preview.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/bridge.vspx b/binsrc/vsp/admin/admin_dav/bridge.vspx
index b9e2cb9..69979b0 100644
--- a/binsrc/vsp/admin/admin_dav/bridge.vspx
+++ b/binsrc/vsp/admin/admin_dav/bridge.vspx
@@ -2,12 +2,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: bridge.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: bridge.vspx,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser.css b/binsrc/vsp/admin/admin_dav/dav_browser.css
index d52ece7..9092ed0 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser.css
+++ b/binsrc/vsp/admin/admin_dav/dav_browser.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: dav_browser.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: dav_browser.css,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser.js b/binsrc/vsp/admin/admin_dav/dav_browser.js
index fec6c94..20f46fc 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser.js
+++ b/binsrc/vsp/admin/admin_dav/dav_browser.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser.sql b/binsrc/vsp/admin/admin_dav/dav_browser.sql
index ce7f49b..fce0fde 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser.sql
+++ b/binsrc/vsp/admin/admin_dav/dav_browser.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dav_browser.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: dav_browser.sql,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser.vsp b/binsrc/vsp/admin/admin_dav/dav_browser.vsp
index c7cd5e7..9e5b0e1 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_browser.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_browser.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_browser.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_bot.vsp b/binsrc/vsp/admin/admin_dav/dav_browser_bot.vsp
index 1d82fa6..dd5de61 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_bot.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_bot.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_browser_bot.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_browser_bot.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_host.vsp b/binsrc/vsp/admin/admin_dav/dav_browser_host.vsp
index a4a5c86..fc3e02b 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_host.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_host.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_browser_host.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_browser_host.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_js.vsp b/binsrc/vsp/admin/admin_dav/dav_browser_js.vsp
index f2d9be0..8ea4968 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_js.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_js.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_browser_js.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_browser_js.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_list.vsp b/binsrc/vsp/admin/admin_dav/dav_browser_list.vsp
index fc7c973..08651db 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_list.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_browser_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_browser_list.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_mozilla.js b/binsrc/vsp/admin/admin_dav/dav_browser_mozilla.js
index 89d0acb..eae0efd 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_mozilla.js
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_mozilla.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_msie.js b/binsrc/vsp/admin/admin_dav/dav_browser_msie.js
index 4e87043..55e4c02 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_msie.js
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_msie.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_browser_top.vsp b/binsrc/vsp/admin/admin_dav/dav_browser_top.vsp
index fe20985..aceaa65 100644
--- a/binsrc/vsp/admin/admin_dav/dav_browser_top.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_browser_top.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_browser_top.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_browser_top.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_dir_list.vsp b/binsrc/vsp/admin/admin_dav/dav_dir_list.vsp
index 3205926..db240f4 100644
--- a/binsrc/vsp/admin/admin_dav/dav_dir_list.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_dir_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_dir_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_dir_list.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_js.vsp b/binsrc/vsp/admin/admin_dav/dav_js.vsp
index 2c3a658..7a7051c 100644
--- a/binsrc/vsp/admin/admin_dav/dav_js.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_js.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_js.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_js.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dav_prop_edit.vsp b/binsrc/vsp/admin/admin_dav/dav_prop_edit.vsp
index 40e5138..eefab39 100644
--- a/binsrc/vsp/admin/admin_dav/dav_prop_edit.vsp
+++ b/binsrc/vsp/admin/admin_dav/dav_prop_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_prop_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dav_prop_edit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/dir_list.vsp b/binsrc/vsp/admin/admin_dav/dir_list.vsp
index 5441437..65a774b 100644
--- a/binsrc/vsp/admin/admin_dav/dir_list.vsp
+++ b/binsrc/vsp/admin/admin_dav/dir_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dir_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: dir_list.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/error.vsp b/binsrc/vsp/admin/admin_dav/error.vsp
index f65d97a..ae0dd93 100644
--- a/binsrc/vsp/admin/admin_dav/error.vsp
+++ b/binsrc/vsp/admin/admin_dav/error.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: error.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: error.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/error_pages.vspx b/binsrc/vsp/admin/admin_dav/error_pages.vspx
index 2b50bfe..5385203 100644
--- a/binsrc/vsp/admin/admin_dav/error_pages.vspx
+++ b/binsrc/vsp/admin/admin_dav/error_pages.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: error_pages.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: error_pages.vspx,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/ftt_hits.vsp b/binsrc/vsp/admin/admin_dav/ftt_hits.vsp
index 86bee50..b00e0a6 100644
--- a/binsrc/vsp/admin/admin_dav/ftt_hits.vsp
+++ b/binsrc/vsp/admin/admin_dav/ftt_hits.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: ftt_hits.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: ftt_hits.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/ftt_query.vsp b/binsrc/vsp/admin/admin_dav/ftt_query.vsp
index 497532b..ca4e58e 100644
--- a/binsrc/vsp/admin/admin_dav/ftt_query.vsp
+++ b/binsrc/vsp/admin/admin_dav/ftt_query.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: ftt_query.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: ftt_query.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/get_blogs.vspx b/binsrc/vsp/admin/admin_dav/get_blogs.vspx
index d19acc4..7992549 100644
--- a/binsrc/vsp/admin/admin_dav/get_blogs.vspx
+++ b/binsrc/vsp/admin/admin_dav/get_blogs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: get_blogs.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: get_blogs.vspx,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/portfolio.xml b/binsrc/vsp/admin/admin_dav/portfolio.xml
index fc7c215..7a15a51 100644
--- a/binsrc/vsp/admin/admin_dav/portfolio.xml
+++ b/binsrc/vsp/admin/admin_dav/portfolio.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/portfolio.xsl b/binsrc/vsp/admin/admin_dav/portfolio.xsl
index 490aba7..39839ea 100644
--- a/binsrc/vsp/admin/admin_dav/portfolio.xsl
+++ b/binsrc/vsp/admin/admin_dav/portfolio.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: portfolio.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: portfolio.xsl,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/search_help.html b/binsrc/vsp/admin/admin_dav/search_help.html
index 71b7d5c..f86cfdd 100644
--- a/binsrc/vsp/admin/admin_dav/search_help.html
+++ b/binsrc/vsp/admin/admin_dav/search_help.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/util.js b/binsrc/vsp/admin/admin_dav/util.js
index 79be980..a775cb0 100644
--- a/binsrc/vsp/admin/admin_dav/util.js
+++ b/binsrc/vsp/admin/admin_dav/util.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/vfs.sql b/binsrc/vsp/admin/admin_dav/vfs.sql
index 1a2f92a..85074e9 100644
--- a/binsrc/vsp/admin/admin_dav/vfs.sql
+++ b/binsrc/vsp/admin/admin_dav/vfs.sql
@@ -1,14 +1,14 @@
 --
 --  vfs.sql
 --
---  $Id: vfs.sql,v 1.10.2.23 2011/03/23 12:05:12 source Exp $
+--  $Id: vfs.sql,v 1.10.2.29 2012/03/08 12:55:20 source Exp $
 --
 --  Site-copy robot.
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -77,19 +77,33 @@ create procedure WS.WS.VFS_ENSURE_NEW_SITE (in _host varchar, in _root varchar,
 }
 ;
 
+create procedure WS.WS.VFS_GUESS_CONTENT_TYPE (in origin_uri varchar, in ret_content_type varchar, inout ret_body any)
+{
+  declare ret_begin, ret_html any;
+  ret_begin := subseq (ret_body, 0, 4096);
+  if (isstring_session (ret_begin))
+    ret_begin := string_output_string (ret_begin);
+  ret_html := xtree_doc (ret_begin, 2);
+  if (xpath_eval ('/sitemapindex|/urlset', ret_html) is not null)
+    return 'text/xml';
+  return ret_content_type;
+}
+;
+
 create procedure WS.WS.COPY_PAGE_1 (in _host varchar, in _urls any, in _root varchar,
     in _upd integer, in _dbg integer)
 {
   declare _header, _etag, _http_resp_code, _start_url varchar;
   declare _del, _desc, _t_urls, _opts, _c_type varchar;
   declare _dav_method, _d_imgs, _opage varchar;
-  declare _dav_enabled, _other, ua varchar;
+  declare _dav_enabled, _other, ua, cust_headers varchar;
   declare dt, redir_flag, store_flag, try_to_get_rdf integer;
   declare _since datetime;
   declare _udata, ext_hook, store_hook, _header_arr, _resps, xp_exp any;
-  declare n_urls, conv_html, is_sitemap, accept_rdf int;
+  declare n_urls, conv_html, is_sitemap, accept_rdf, time_out int;
 
   conv_html := 1;
+  time_out := null;
   n_urls := position (0, _urls) - 1;
   if (n_urls < 0)
     n_urls := length (_urls);
@@ -98,26 +112,28 @@ create procedure WS.WS.COPY_PAGE_1 (in _host varchar, in _urls any, in _root var
   select VS_NEWER, VS_OPTIONS, coalesce (VS_METHOD, ''), VS_URL, VS_SRC, coalesce (VS_OPAGE, ''),
          coalesce (VS_REDIRECT, 1), coalesce (VS_STORE, 1), coalesce (VS_DLOAD_META, 0), 
 	 deserialize (VS_UDATA), VS_EXTRACT_FN, VS_STORE_FN, coalesce (VS_DEL, ''), coalesce (VS_OTHER, ''), 
-	 VS_CONVERT_HTML, VS_IS_SITEMAP, VS_XPATH, VS_ACCEPT_RDF
+	 VS_CONVERT_HTML, VS_IS_SITEMAP, VS_XPATH, VS_ACCEPT_RDF, VS_TIMEOUT, VS_HEADERS
       into _since, _opts, _dav_method, _start_url, _d_imgs, _opage, 
       	 redir_flag, store_flag, try_to_get_rdf, 
 	 _udata, ext_hook, store_hook, _del, _other, 
-	 conv_html, is_sitemap, xp_exp, accept_rdf
+	 conv_html, is_sitemap, xp_exp, accept_rdf, time_out, cust_headers
       from VFS_SITE where VS_HOST = _host and VS_ROOT = _root;
 nf_opt:
 
-  _header := '';
+  if (length (cust_headers) > 2)
+    cust_headers := rtrim (cust_headers, ' \r\n') || '\r\n';
+  else
+    cust_headers := null;
+   
+  _header := coalesce (cust_headers, '');
   if (isstring (_opts) and strchr (_opts, ':') is not null)
     _header := sprintf ('Authorization: Basic %s\r\n', encode_base64(_opts));
 
-  if (_upd = 1 and _since is not null)
-    _header := concat (_header, 'If-Modified-Since: ', soap_print_box (_since, '', 1), '\r\n');
-
-  if (accept_rdf)
+  if (accept_rdf and strstr (_header, 'Accept:') is null)
     _header := _header || 'Accept: application/rdf+xml, text/n3, text/rdf+n3, */*\r\n'; -- /* rdf formats */
   -- global setting for crawler UA  
   ua := registry_get ('vfs_ua');
-  if (isstring (ua) and length (ua))
+  if (isstring (ua) and length (ua) and strstr (_header, 'User-Agent:') is null)
     {
       ua := trim (ua, ' \r\n');
       _header := _header || 'User-Agent: ' || ua || '\r\n';
@@ -129,12 +145,23 @@ nf_opt:
       for (declare i int, i := 0; i < n_urls; i := i + 1)
         {
 	  declare _url, _hdr varchar;
+	  declare _dt datetime;
 	  _url := _urls[i];
-	  _etag := (select VU_ETAG from VFS_URL where VU_HOST = _host and VU_URL = _url and VU_ROOT = _root);
-	  if (_etag is not null and isstring (_etag))
+	  -- take Etag if present
+	  _etag := null;
+	  _dt := _since;
+	  for select VU_ETAG, VU_CPTIME from VFS_URL where VU_HOST = _host and VU_URL = _url and VU_ROOT = _root do
+	    {
+	      _etag := VU_ETAG;
+	      _dt := VU_CPTIME;
+	    }
+	  if (_etag is not null and isstring (_etag) and length (_etag))
 	    _hdr := concat (_header,'If-None-Match: ', _etag, '\r\n');
   else
 	    _hdr := _header;
+	  -- check against last fetch  
+	  if (_upd = 1 and _dt is not null)
+	    _hdr := concat (_hdr, 'If-Modified-Since: ', soap_print_box (_dt, '', 1), '\r\n');
 	  _header_arr[i] := _hdr;  
 	}
     }
@@ -201,7 +228,7 @@ get_again:
     if (n_urls = 1)
       {
 	declare _resp, _content any;
-        _content := http_get (_t_urls[0], _resp, 'GET', case when _upd = 1 then _header_arr[0] else _header_arr end);
+        _content := http_get (_t_urls[0], _resp, 'GET', case when _upd = 1 then _header_arr[0] else _header_arr end, null, null, redir_flag, time_out);
 	-- when single request we can check here and re-try if no header is received
 	if (isarray(_resp) and length (_resp) and not isstring (_resp [0]))
 	  {
@@ -254,11 +281,13 @@ get_again:
 	  goto end_crawl;
   }
 
-  _c_type := coalesce (http_request_header (_resp, 'Content-Type'), '');
+      if (_http_resp_code = '200' and (isstring (_content) or __tag (_content) = 185))
+	{
+	  _c_type := http_request_header (_resp, 'Content-Type', null, '');
+      _c_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (_url, _c_type, _content);
+	  _c_type := WS.WS.VFS_GUESS_CONTENT_TYPE (_url, _c_type, _content);
       _etag := http_request_header (_resp, 'ETag', null, '');
 
-      if (_http_resp_code = '200' and (isstring (_content) or __tag (_content) = 185))
-    {
       if (ext_hook is not null and __proc_exists (ext_hook))
 	    call (ext_hook) (_host, _url, _root, _content, _c_type, lev + 1);
 	  else if ((_url like '%.htm%' or _url like '%/' or _c_type like 'text/html%' or _c_type like 'application/%xml' or _c_type = 'text/xml' or _url like '%.xml' or _url like '%.xml.gz') 
@@ -328,11 +357,12 @@ create procedure WS.WS.VFS_STATUS_SET (in _tgt varchar, in _root varchar, in _st
 }
 ;
 
--- /* top level procedure for processing queues */
+-- /* top level procedure for processing queues, don't grant NEVER to any body else */
 create procedure WS.WS.SERV_QUEUE_TOP (in _tgt varchar, in _root varchar, in _upd integer,
     in _dbg integer, in _fn varchar, in _clnt_data any, in threads int := null, in batch_size int := 1)
 {
   declare _msg, _stat, oq varchar;
+  set_user_id ('dba');
 do_again:
   _stat := '00000';
   _msg := '';
@@ -376,6 +406,7 @@ create procedure WS.WS.SERV_QUEUE (in _tgt varchar, in _root varchar, in _upd in
   declare aq_list, aq, url_batch any;
   declare err any;
   declare pid, thr_conf, care_bot int;
+  declare delay_sec float;
 
   _total := 0;
   registry_set ('WEB_COPY', 'X __sequence_set (''WEB_COPY_SSHUT'', datediff (''second'', stringdate (''1980-01-01''), now ()), 0)');
@@ -387,15 +418,15 @@ create procedure WS.WS.SERV_QUEUE (in _tgt varchar, in _root varchar, in _upd in
   commit work;
 
   whenever not found goto n_site;
-  select VS_URL, VS_METHOD, VS_THREADS, VS_BOT 
-      into _tgt_url, _dav_method, thr_conf, care_bot 
+  select VS_URL, VS_METHOD, VS_THREADS, VS_BOT, VS_DELAY 
+      into _tgt_url, _dav_method, thr_conf, care_bot, delay_sec 
       from VFS_SITE where VS_HOST = _tgt and VS_ROOT = _root with (exclusive);
+  if (care_bot)  
+    VFS_ROBOTS_GET (_tgt, _root, delay_sec);
   if (thr_conf is not null and thr_conf > 0)
     nthreads := thr_conf;
   if (nthreads is null or nthreads < 0)
     nthreads := 1;
-  if (care_bot)  
-    VFS_ROBOTS_GET (_tgt, _root);
   commit work;
   -- if it is an update 
   if (_upd = 1)
@@ -439,11 +470,19 @@ create procedure WS.WS.SERV_QUEUE (in _tgt varchar, in _root varchar, in _upd in
 	  {
 	    ERR_MAIL_SEND (_tgt, vector (), _root, __SQL_STATE, __SQL_MESSAGE);
 	    rollback work;
+	    __SQL_STATE := cast (__SQL_STATE as varchar);
+	    if (__SQL_STATE = '40001')
+	      {
+		resignal;
+	      }
 	    goto fn_end;
 	  };
 	found_one := 0; ndone := 0;
 	if (WS.WS.VFS_STATUS_GET (_tgt, _root) = 'stopped')
 	  goto fn_end;
+	commit work;
+	if (delay_sec > 0)
+	  delay (delay_sec);
 	for (declare i int, i := 0; i < batch_size; i := i + 1)
 	      {
 	     _rc := call (url_fn) (_tgt, _root, _next_url, _clnt_data);
@@ -533,6 +572,9 @@ create procedure WS.WS.LOCAL_STORE (in _host varchar, in _url varchar, in _root
     {
       insert soft VFS_URL (VU_HOST, VU_URL, VU_CHKSUM, VU_CPTIME, VU_ETAG, VU_ROOT)
 	  values (_host, _url, md5 (_content), now (), _s_etag, _root);
+      if (row_count () = 0)
+	update WS.WS.VFS_URL set VU_CHKSUM = md5 (_content), VU_CPTIME = now (), VU_ETAG = _s_etag where
+	    VU_HOST = _host and VU_URL = _url and VU_ROOT = _root;
       return 0;
     }
 
@@ -638,7 +680,7 @@ create procedure WS.WS.GET_URLS (in _host varchar, in _url varchar, in _root var
   declare _flw, _nflw, _method, _delete, xp_exp, base, robots, care_of_bot varchar;
   declare _newer datetime;
   declare _own integer;
-  declare frames, _urls_arr any;
+  declare frames, _urls_arr, origin_iri, urls any;
 
   if (WS.WS.SITEMAP_PROCESS (_host, _url, _root, _content, ctype, lev))
     return;
@@ -668,6 +710,8 @@ create procedure WS.WS.GET_URLS (in _host varchar, in _url varchar, in _root var
 
   _inx := 0;
   base := WS.WS.VFS_URI_COMPOSE (vector ('http', _host, _url, '', '', ''));
+  origin_iri := iri_to_id (base, 1);
+  urls := make_array (_urls_arr_len, 'any');
   while (_inx < _urls_arr_len)
 	    {
       declare hi, sch any;
@@ -691,16 +735,18 @@ create procedure WS.WS.GET_URLS (in _host varchar, in _url varchar, in _root var
 	  _tmp_url := WS.WS.VFS_URI_COMPOSE (hi);  -- local part & URL parameters
 	  if (_tmp_host <> _host)
 	    _tmp_url := _tmp;
+	  urls [_inx] := _tmp_url;  
 	      --dbg_obj_print ('LINK: ',_tmp_host,_tmp_url);
 	  if ((get_keyword (_tmp_url, frames) is not null or WS.WS.FOLLOW (_host, _root, _tmp_url, _flw, _nflw, _start_url, _d_imgs)))
 			{
-	      insert soft VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL)
-		  values (_host, now (), _tmp_url, 'waiting', _root, lev);
+	      insert soft VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL, VQ_ORIGIN)
+		  values (_host, now (), _tmp_url, 'waiting', _root, lev, origin_iri);
 		}
 		}
       next_url:
       _inx := _inx + 1;
     }
+  delete from WS.WS.VFS_QUEUE where VQ_HOST = _host and VQ_ROOT = _root and VQ_ORIGIN = origin_iri and not position (VQ_URL, urls);
 no_site_rec:  
   return;
 }
@@ -748,21 +794,21 @@ create procedure WS.WS.SITEMAP_PROCESS (in _host varchar, in _url varchar, in _r
 		}
 	      xp := ar;
 	    }
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);
 	  return 1;
 	}
       else if (xpath_eval ('/sitemapindex/sitemap/loc', xt) is not null)
 	{
 	  --xp := xpath_eval ('/sitemapindex/sitemap/loc/text()', xt, 0);
 	  xp := WS.WS.SITEMAP_GET_LOC (xt, '/sitemapindex/sitemap', './loc/text()', './lastmod/text()');
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);
 	  return 1;
 	}
       else if (xpath_eval ('/urlset/url/loc', xt) is not null)
 	{
 	  --xp := xpath_eval ('/urlset/url/loc/text()', xt, 0);
 	  xp := WS.WS.SITEMAP_GET_LOC (xt, '/urlset/url', './loc/text()', './lastmod/text()');
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 1);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 1);
 	  return 1;
 	}
     }
@@ -1047,7 +1093,7 @@ create procedure WS.WS.FIND_URI (in _content varchar, in _d_imgs varchar,
 
   if (tidy_external () and ctype like 'text/html')
     _content := tidy_html (_content, 'output-xhtml:yes\r\ntidy-mark:no');
-  if (ctype like 'application/%+xml' or ctype = 'text/xml')
+  if (ctype like 'application/%xml' or ctype = 'text/xml')
     _xml_tree := xml_tree (_content, 0);
   else  
   _xml_tree := xml_tree (_content, 2);
@@ -1775,7 +1821,7 @@ create procedure WS.WS.VFS_EXTRACT_RDF (in _host varchar, in _root varchar, in _
 {
   declare mime_type, _graph, _base, out_arr, tmp varchar;
   declare html_start, xd any;
-  declare rc int;
+  declare rc, deadl int;
 
   html_start := null;
 
@@ -1784,9 +1830,20 @@ create procedure WS.WS.VFS_EXTRACT_RDF (in _host varchar, in _root varchar, in _
   _graph := WS.WS.MAKE_URL (_host, _start_path);
   _base := WS.WS.MAKE_URL (_host, url);
 
+  commit work;
+  deadl := 6;
+
   declare exit handler for sqlstate '*'
   {
-    return;
+    rollback work;
+    __SQL_STATE := cast (__SQL_STATE as varchar);
+    if (__SQL_STATE = '40001')
+      {
+	deadl := deadl - 1;
+	if (deadl > 0)
+	  goto again;
+      }
+    resignal;
   };
 
   if (url like '*.gz')
@@ -1801,7 +1858,7 @@ create procedure WS.WS.VFS_EXTRACT_RDF (in _host varchar, in _root varchar, in _
     }
   -- RDF/XML or RDF/N3 depends on option
   mime_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (url, ctype, content);
-
+again:
   -- RDF formats 
     {
       if (strstr (mime_type, 'application/rdf+xml') is not null)
@@ -1888,12 +1945,16 @@ create procedure WS.WS.SITEMAP_ENSURE_NEW_SITE (in _host varchar, in _root varch
 ;
 
 
-create procedure WS.WS.SITEMAP_URLS_REGISTER (in _host varchar, in _root varchar, inout xp any, in lev int := 0, in sm int := 0)
+create procedure WS.WS.SITEMAP_URLS_REGISTER (in _host varchar, in _root varchar, in src_url varchar, inout xp any, in lev int := 0, in sm int := 0, in delta int := 1)
 {
-  declare _flw_s, _nflw_s, _url, _img varchar;
+  declare _flw_s, _nflw_s, _url, _img, origin_iri varchar;
+  declare urls, inx any;
   whenever not found goto no_ini;
   select VS_FOLLOW, VS_NFOLLOW, VS_URL, VS_SRC into _flw_s, _nflw_s, _url, _img
       from VFS_SITE where VS_HOST = _host and VS_ROOT = _root;
+  origin_iri := iri_to_id (WS.WS.MAKE_URL (_host, src_url), 1);
+  urls := make_array (length (xp), 'any');
+  inx := 0;
   foreach (any u in xp) do
     {
       declare hf, host, url, abs_url varchar;
@@ -1917,16 +1978,20 @@ create procedure WS.WS.SITEMAP_URLS_REGISTER (in _host varchar, in _root varchar
       url := WS.WS.VFS_URI_COMPOSE (hf);
       if (host <> _host)
 	url := abs_url;
+      urls [inx] := url;	
+      inx := inx + 1;
       if (WS.WS.FOLLOW (_host, _root, url, _flw_s, _nflw_s, _url, _img))
 	    {
-	  insert soft WS.WS.VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL, VQ_VIA_SITEMAP) 
-	      values (_host, now (), url, 'waiting', _root, lev, sm); 
+	  insert soft WS.WS.VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL, VQ_VIA_SITEMAP, VQ_ORIGIN) 
+	      values (_host, now (), url, 'waiting', _root, lev, sm, origin_iri); 
 	  if (row_count () = 0)
 	    {
 	      update WS.WS.VFS_QUEUE set VQ_STAT = 'waiting' where VQ_HOST = _host and VQ_ROOT = _root and VQ_URL = url and VQ_TS < ts;
 	    }
 	}
     }
+  if (delta)
+    delete from WS.WS.VFS_QUEUE where VQ_HOST = _host and VQ_ROOT = _root and VQ_ORIGIN = origin_iri and not position (VQ_URL, urls);
   if (length (xp))
     update WS.WS.VFS_SITE set VS_IS_SITEMAP = 1 where VS_HOST = _host and VS_ROOT = _root and VS_IS_SITEMAP = 0;
   commit work;
@@ -1980,7 +2045,7 @@ create procedure WS.WS.SITEMAP_XML_PARSE (in _host varchar, in _url varchar, in
   if (_url like '%.xml' or _url like '%.xml.gz' or _c_type = 'text/xml' or _c_type = 'application/xml' or _c_type = 'application/sparql-results+xml')
     {
       xt := xtree_doc (_content);
-      if (xpath_eval ('/urlset/dataset', xt) is not null)
+      if (xpath_eval ('/urlset/dataset/dataDumpLocation', xt) is not null)
 	{
 	  declare ts any;
 	  xp := xpath_eval ('/urlset/dataset/dataDumpLocation/text()', xt, 0);
@@ -1999,29 +2064,29 @@ create procedure WS.WS.SITEMAP_XML_PARSE (in _host varchar, in _url varchar, in
 		}
 	      xp := ar;
 	    }
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);
 	}
       else if (xpath_eval ('/sitemapindex/sitemap/loc', xt) is not null)
 	{
 	  --xp := xpath_eval ('/sitemapindex/sitemap/loc/text()', xt, 0);
 	  xp := WS.WS.SITEMAP_GET_LOC (xt, '/sitemapindex/sitemap', './loc/text()', './lastmod/text()');
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);
 	}
       else if (_c_type = 'application/sparql-results+xml')
 	{
 	  xp := xpath_eval ('/sparql/results/result/binding/uri/text()', xt, 0);
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);
 	}
       else if (xpath_eval ('/urlset/url/loc', xt) is not null)
 	{
 	  --xp := xpath_eval ('/urlset/url/loc/text()', xt, 0);
 	  xp := WS.WS.SITEMAP_GET_LOC (xt, '/urlset/url', './loc/text()', './lastmod/text()');
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 1);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 1);
 	}
-      if (xpath_eval ('/urlset/dataset/sampleURI', xt) is not null)
+      else if (xpath_eval ('/urlset/dataset/sampleURI', xt) is not null)
 	{
 	  xp := xpath_eval ('/urlset/dataset/sampleURI/text()', xt, 0);
-	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 1);
+	  WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 1);
 	}
     }
 }
@@ -2086,14 +2151,14 @@ create procedure WS.WS.SITEMAP_RDF_STORE (in _host varchar, in _url varchar, in
             arr[i] := iri_to_id (arr[i], 0);  
 	}
       objs := (select DB.DBA.VECTOR_AGG (id_to_iri (O)) from DB.DBA.RDF_QUAD where G = iri_to_id (graph, 0) and P in (arr) and isiri_id (O));
-      WS.WS.SITEMAP_URLS_REGISTER (_host, _root, objs, lev, 0);
+      WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, objs, lev, 0, 0);
     } 
   if (_c_type = 'text/html' and isvector (udata) and 1 = get_keyword ('follow-meta', udata, 0))
     {
       declare xt, xp any;
       xt := xtree_doc (_content, 2);
       xp := xpath_eval ('/html/head/link[@rel="meta"]/@href', xt, 0);
-      WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);
+      WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0, 0);
     }
   insert soft WS.WS.VFS_URL (VU_HOST, VU_URL, VU_CHKSUM, VU_CPTIME, VU_ETAG, VU_ROOT)
       values (_host, _url, md5 (_content), now (), _s_etag, _root);
@@ -2104,7 +2169,7 @@ create procedure WS.WS.SITEMAP_RDF_STORE (in _host varchar, in _url varchar, in
 }
 ;
 
-create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar)
+create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar, out delay_sec float)
 {
   declare s any;
   declare v1 any;
@@ -2112,6 +2177,7 @@ create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar)
   s := string_output ();
   http (txt, s);
   v1 := '';
+  delay_sec := 0;
   while (1)
     {
       declare l, arr any;
@@ -2138,12 +2204,17 @@ create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar)
 	      exact_match := 1;
 	      v1 := '';
 	      fill := 1;
+	      delay_sec := 0;
 	    }
 	}
       else if (fill and lower (arr[0]) = 'disallow')
 	{
 	  v1 := v1 || trim (arr[1]) || '%;';
 	}
+      else if (fill and lower (arr[0]) = 'crawl-delay')
+	{
+	  delay_sec := atof (trim (arr[1]));
+	}
     }
   ex:
   v1 := trim (v1);
@@ -2153,9 +2224,9 @@ create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar)
 }
 ;
 
-create procedure VFS_ROBOTS_GET (in _host varchar, in _root varchar)
+create procedure VFS_ROBOTS_GET (in _host varchar, in _root varchar, inout site_delay_sec float)
 {
-  declare url, ret, head, me, robots any;
+  declare url, ret, head, me, robots, delay_sec any;
   url := vector ('http', _host, '/robots.txt', '', '', '');
   url := vfs_uri_compose (url);
   robots := null;
@@ -2168,9 +2239,11 @@ create procedure VFS_ROBOTS_GET (in _host varchar, in _root varchar)
     goto en;
   me := coalesce (cfg_item_value (virtuoso_ini_path (), 'HTTPServer', 'ClientIdString'), 
   	'Mozilla/4.0 (compatible; OpenLink Virtuoso)');
-  robots := vfs_robots_parse (ret, me);
+  robots := VFS_ROBOTS_PARSE (ret, me, delay_sec);
+  if (delay_sec > site_delay_sec)
+    site_delay_sec := delay_sec;
   en:
-  update VFS_SITE set VS_ROBOTS = robots where VS_HOST = _host and VS_ROOT = _root;
+  update VFS_SITE set VS_ROBOTS = robots, VS_DELAY = delay_sec where VS_HOST = _host and VS_ROOT = _root;
   return robots;
 }
 ;
diff --git a/binsrc/vsp/admin/admin_dav/vfs_export.vsp b/binsrc/vsp/admin/admin_dav/vfs_export.vsp
index e26cfe5..2a70d7a 100644
--- a/binsrc/vsp/admin/admin_dav/vfs_export.vsp
+++ b/binsrc/vsp/admin/admin_dav/vfs_export.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vfs_export.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: vfs_export.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/vfs_queue_sched.vsp b/binsrc/vsp/admin/admin_dav/vfs_queue_sched.vsp
index 61a3681..28527bb 100644
--- a/binsrc/vsp/admin/admin_dav/vfs_queue_sched.vsp
+++ b/binsrc/vsp/admin/admin_dav/vfs_queue_sched.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vfs_queue_sched.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: vfs_queue_sched.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/vfs_status.vsp b/binsrc/vsp/admin/admin_dav/vfs_status.vsp
index 6553a9a..c51d230 100644
--- a/binsrc/vsp/admin/admin_dav/vfs_status.vsp
+++ b/binsrc/vsp/admin/admin_dav/vfs_status.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vfs_status.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: vfs_status.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/vfs_urls_list.vsp b/binsrc/vsp/admin/admin_dav/vfs_urls_list.vsp
index 09fc8b5..d521b56 100644
--- a/binsrc/vsp/admin/admin_dav/vfs_urls_list.vsp
+++ b/binsrc/vsp/admin/admin_dav/vfs_urls_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vfs_urls_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: vfs_urls_list.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dav/vfsddk.sql b/binsrc/vsp/admin/admin_dav/vfsddk.sql
index a8313bc..608b16d 100644
--- a/binsrc/vsp/admin/admin_dav/vfsddk.sql
+++ b/binsrc/vsp/admin/admin_dav/vfsddk.sql
@@ -1,14 +1,14 @@
 --
 --  vfsddk.sql
 --
---  $Id: vfsddk.sql,v 1.5.2.12 2011/03/08 13:39:52 source Exp $
+--  $Id: vfsddk.sql,v 1.5.2.17 2012/03/08 12:55:20 source Exp $
 --
 --  Site-copy robot DB.
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -56,15 +56,18 @@ create table WS.WS.VFS_QUEUE (
     VQ_LEVEL	int default 0,
     VQ_VIA_SITEMAP int default 0,
     VQ_DT	timestamp,
+    VQ_ORIGIN	IRI_ID_8,
     primary key (VQ_HOST, VQ_URL, VQ_ROOT))
 create index VQ_HOST_ROOT on WS.WS.VFS_QUEUE (VQ_HOST, VQ_ROOT)
 create index VQ_HOST_TIME on WS.WS.VFS_QUEUE (VQ_HOST, VQ_ROOT, VQ_STAT, VQ_TS, VQ_URL)
 create index VQ_TS on WS.WS.VFS_QUEUE (VQ_TS)
+create index VQ_ORIGIN on WS.WS.VFS_QUEUE (VQ_ORIGIN)    
 ;
 
 
 -- Site setting
 create table WS.WS.VFS_SITE (
+    VS_ID	integer identity,	
     VS_DESCR	varchar,
     VS_HOST 	varchar,
     VS_URL	varchar,
@@ -95,6 +98,9 @@ create table WS.WS.VFS_SITE (
     VS_ACCEPT_RDF int default 0,
     VS_THREADS  int default 1,
     VS_ROBOTS long varchar default null,
+    VS_DELAY	float default 0,
+    VS_TIMEOUT	float default null,
+    VS_HEADERS  long varchar default null,
     primary key (VS_HOST, VS_ROOT))
 create index VS_HOST_ROOT on WS.WS.VFS_SITE (VS_HOST, VS_URL, VS_ROOT)
 ;
@@ -186,6 +192,18 @@ alter table WS.WS.VFS_SITE add VS_THREADS int default 1
 alter table WS.WS.VFS_SITE add VS_ROBOTS long varchar default null
 ;
 
+alter table WS.WS.VFS_SITE add VS_DELAY float default 0
+;
+
+alter table WS.WS.VFS_SITE add VS_TIMEOUT  float default null
+;
+
+alter table WS.WS.VFS_SITE add VS_HEADERS  long varchar default null
+;
+
+alter table WS.WS.VFS_SITE add VS_ID integer identity
+;
+
 alter table WS.WS.VFS_QUEUE add VQ_LEVEL int default 0
 ;
 
@@ -195,5 +213,32 @@ alter table WS.WS.VFS_QUEUE add VQ_VIA_SITEMAP int default 0
 alter table WS.WS.VFS_QUEUE add VQ_DT timestamp
 ;
 
+alter table WS.WS.VFS_QUEUE add VQ_ORIGIN IRI_ID_8
+;
+
 alter table WS.WS.VFS_URL add VU_RES_ID int
 ;
+
+create procedure WS.WS.VFS_UPGRADE ()
+{
+  declare inx int;
+  declare arr any;
+  if (not exists (select 1 from WS.WS.VFS_SITE where VS_ID is null))
+    return;
+  inx := 1;
+  arr := (select DB.DBA.VECTOR_AGG (vector (VS_HOST, VS_ROOT)) from WS.WS.VFS_SITE);
+  foreach (any x in arr) do
+    {
+      declare host, root varchar;
+      host := x[0];
+      root := x[1];
+      update WS.WS.VFS_SITE set VS_ID = inx where VS_HOST = host and VS_ROOT = root;
+      inx := inx + 1;
+    }
+  DB.DBA.SET_IDENTITY_COLUMN ('WS.WS.VFS_SITE', 'VS_ID', inx);
+}
+;
+
+--!AFTER
+WS.WS.VFS_UPGRADE ()
+;
diff --git a/binsrc/vsp/admin/admin_dav/vsp_debug.vsp b/binsrc/vsp/admin/admin_dav/vsp_debug.vsp
index c800ef8..66b3927 100644
--- a/binsrc/vsp/admin/admin_dav/vsp_debug.vsp
+++ b/binsrc/vsp/admin/admin_dav/vsp_debug.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vsp_debug.vsp,v 1.3 2006/11/30 13:49:19 source Exp $
+--  $Id: vsp_debug.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_ddl.sql b/binsrc/vsp/admin/admin_ddl.sql
index ea2d6e0..b2d23ad 100644
--- a/binsrc/vsp/admin/admin_ddl.sql
+++ b/binsrc/vsp/admin/admin_ddl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: admin_ddl.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: admin_ddl.sql,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn.vsp b/binsrc/vsp/admin/admin_dsn.vsp
index fdcf741..f309183 100644
--- a/binsrc/vsp/admin/admin_dsn.vsp
+++ b/binsrc/vsp/admin/admin_dsn.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dsn.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_add.vsp b/binsrc/vsp/admin/admin_dsn_add.vsp
index cf5f190..9457940 100644
--- a/binsrc/vsp/admin/admin_dsn_add.vsp
+++ b/binsrc/vsp/admin/admin_dsn_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_dsn_add.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn_add.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_add2.vsp b/binsrc/vsp/admin/admin_dsn_add2.vsp
index 94e60b0..746e42b 100644
--- a/binsrc/vsp/admin/admin_dsn_add2.vsp
+++ b/binsrc/vsp/admin/admin_dsn_add2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dsn_add2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn_add2.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_add3.vsp b/binsrc/vsp/admin/admin_dsn_add3.vsp
index 587d4a4..f3972ed 100644
--- a/binsrc/vsp/admin/admin_dsn_add3.vsp
+++ b/binsrc/vsp/admin/admin_dsn_add3.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dsn_add3.vsp,v 1.3 2006/11/30 13:49:19 source Exp $
+--  $Id: admin_dsn_add3.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_add_generic32.vsp b/binsrc/vsp/admin/admin_dsn_add_generic32.vsp
index 232beaf..14d60bb 100644
--- a/binsrc/vsp/admin/admin_dsn_add_generic32.vsp
+++ b/binsrc/vsp/admin/admin_dsn_add_generic32.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_dsn_add_generic32.vsp,v 1.3.2.2 2011/02/03 10:35:34 source Exp $
+--  $Id: admin_dsn_add_generic32.vsp,v 1.3.2.4 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -140,7 +140,7 @@
 ?>
       <FORM method="POST" action="admin_dsn_add_generic32_2.vsp" name="gen32">
       <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="5">
-      <TR><TD COLSPAN="3" ALIGN="middle"><P CLASS="copyright_noalign"><?=_driver_de?><BR /><small>Copyright 1998-2011 OpenLink Software</small><BR /><small>All rights reserved</small></P></TD></TR>
+      <TR><TD COLSPAN="3" ALIGN="middle"><P CLASS="copyright_noalign"><?=_driver_de?><BR /><small>Copyright 1998-2012 OpenLink Software</small><BR /><small>All rights reserved</small></P></TD></TR>
       <TR><TD ROWSPAN="3" VALIGN="top"><IMG SRC="images/opl.jpg" BORDER="1" /></TD>
       <TD VALIGN="top">
 
diff --git a/binsrc/vsp/admin/admin_dsn_add_generic32_2.vsp b/binsrc/vsp/admin/admin_dsn_add_generic32_2.vsp
index ceca4ea..105f062 100644
--- a/binsrc/vsp/admin/admin_dsn_add_generic32_2.vsp
+++ b/binsrc/vsp/admin/admin_dsn_add_generic32_2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_dsn_add_generic32_2.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn_add_generic32_2.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_add_virt.vsp b/binsrc/vsp/admin/admin_dsn_add_virt.vsp
index 3a4f8b1..d342a2b 100644
--- a/binsrc/vsp/admin/admin_dsn_add_virt.vsp
+++ b/binsrc/vsp/admin/admin_dsn_add_virt.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_dsn_add_virt.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn_add_virt.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_edit.vsp b/binsrc/vsp/admin/admin_dsn_edit.vsp
index 8e95c01..96148c7 100644
--- a/binsrc/vsp/admin/admin_dsn_edit.vsp
+++ b/binsrc/vsp/admin/admin_dsn_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_dsn_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn_edit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_dsn_edit_virt.vsp b/binsrc/vsp/admin/admin_dsn_edit_virt.vsp
index 06e9bc7..8d607a9 100644
--- a/binsrc/vsp/admin/admin_dsn_edit_virt.vsp
+++ b/binsrc/vsp/admin/admin_dsn_edit_virt.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_dsn_edit_virt.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_dsn_edit_virt.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_evt_main.vsp b/binsrc/vsp/admin/admin_evt_main.vsp
index fc47cac..79572aa 100644
--- a/binsrc/vsp/admin/admin_evt_main.vsp
+++ b/binsrc/vsp/admin/admin_evt_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_evt_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_evt_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_footer.vsp b/binsrc/vsp/admin/admin_footer.vsp
index 52a959d..1612bb0 100644
--- a/binsrc/vsp/admin/admin_footer.vsp
+++ b/binsrc/vsp/admin/admin_footer.vsp
@@ -1,4 +1,4 @@
 <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
 <TR><TD CLASS="CopyrightBorder"><IMG SRC="/admin/images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>
-<TR><TD><P CLASS="copyright">Virtuoso Universal Server (<?= sys_stat('st_dbms_ver') ?>) - Copyright© 1998-2011 OpenLink Software.  </P></TD></TR>
+<TR><TD><P CLASS="copyright">Virtuoso Universal Server (<?= sys_stat('st_dbms_ver') ?>) - Copyright© 1998-2012 OpenLink Software.  </P></TD></TR>
 </TABLE>
diff --git a/binsrc/vsp/admin/admin_isql_main.vsp b/binsrc/vsp/admin/admin_isql_main.vsp
index 06e78bf..a3be6a8 100644
--- a/binsrc/vsp/admin/admin_isql_main.vsp
+++ b/binsrc/vsp/admin/admin_isql_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_isql_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_isql_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_left.vsp b/binsrc/vsp/admin/admin_left.vsp
index 8877840..1edd64f 100644
--- a/binsrc/vsp/admin/admin_left.vsp
+++ b/binsrc/vsp/admin/admin_left.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_left.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_left.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_link_proc.vsp b/binsrc/vsp/admin/admin_link_proc.vsp
index decac45..4e28a4f 100644
--- a/binsrc/vsp/admin/admin_link_proc.vsp
+++ b/binsrc/vsp/admin/admin_link_proc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_link_proc.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_link_proc.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_link_proc_1.vsp b/binsrc/vsp/admin/admin_link_proc_1.vsp
index 1b9c313..9604b74 100644
--- a/binsrc/vsp/admin/admin_link_proc_1.vsp
+++ b/binsrc/vsp/admin/admin_link_proc_1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_link_proc_1.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_link_proc_1.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_link_tables.js b/binsrc/vsp/admin/admin_link_tables.js
index 0b5319c..b750fdd 100644
--- a/binsrc/vsp/admin/admin_link_tables.js
+++ b/binsrc/vsp/admin/admin_link_tables.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_link_tables.vsp b/binsrc/vsp/admin/admin_link_tables.vsp
index 218106a..8ac59fe 100644
--- a/binsrc/vsp/admin/admin_link_tables.vsp
+++ b/binsrc/vsp/admin/admin_link_tables.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_link_tables.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_link_tables.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_lt_wiz.vsp b/binsrc/vsp/admin/admin_lt_wiz.vsp
index 97771e9..136c9c1 100644
--- a/binsrc/vsp/admin/admin_lt_wiz.vsp
+++ b/binsrc/vsp/admin/admin_lt_wiz.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_lt_wiz.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_lt_wiz.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_lt_wiz_start.vsp b/binsrc/vsp/admin/admin_lt_wiz_start.vsp
index ea4da2b..441099d 100644
--- a/binsrc/vsp/admin/admin_lt_wiz_start.vsp
+++ b/binsrc/vsp/admin/admin_lt_wiz_start.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_lt_wiz_start.vsp,v 1.3 2006/11/30 13:49:19 source Exp $
+--  $Id: admin_lt_wiz_start.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_main.vsp b/binsrc/vsp/admin/admin_main.vsp
index 5d1771b..6044223 100644
--- a/binsrc/vsp/admin/admin_main.vsp
+++ b/binsrc/vsp/admin/admin_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/admin_news.sql b/binsrc/vsp/admin/admin_news/admin_news.sql
index 8395f78..aa88a58 100644
--- a/binsrc/vsp/admin/admin_news/admin_news.sql
+++ b/binsrc/vsp/admin/admin_news/admin_news.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: admin_news.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: admin_news.sql,v 1.2.2.2 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -20,31 +20,6 @@
 --  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 --  
 --  
-create procedure
-adm_news_status (in STAT integer)
-{
-  if (STAT = 1) return '<DIV CLASS="status_ok">OK</DIV>';
-    else if (STAT is NULL) return '<DIV CLASS="status_ok">New</DIV>';
-      else if (STAT = 3) return '<DIV CLASS="status_wip">OK*</DIV>';
-        else if (STAT = 7) return '<DIV CLASS="status_wip">Pending</DIV>';
-          else if (STAT = 9) return '<DIV CLASS="status_wip">Updating...</DIV>';
-            else return '<DIV CLASS="status_err">Unsuccessful</DIV>';
-}
-;
-
-create procedure
-DB.DBA.adm_mailaddr_pretty (in email_addr varchar)
-{
-  declare _email, _name varchar;
-  email_addr := coalesce(email_addr, 'Not Provided');
-  _name := email_addr;
-  _name := substring(_name, 1, coalesce(strstr(_name, '<') -1, length(_name)));
-  _email := coalesce(regexp_substr('([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)', email_addr, 0), email_addr);
-  _name := replace (_name, '"', '');
-  _name := coalesce(_name, _email);
-  return sprintf('\n<A HREF="mailto:%s">%s</A>\n', _email, _name);
-}
-;
 
 
 CREATE TABLE "DB"."DBA"."NEWS_GROUPS_AVAILABLE" (
diff --git a/binsrc/vsp/admin/admin_news/mime_display.vsp b/binsrc/vsp/admin/admin_news/mime_display.vsp
index 026a9a8..2322920 100644
--- a/binsrc/vsp/admin/admin_news/mime_display.vsp
+++ b/binsrc/vsp/admin/admin_news/mime_display.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mime_display.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: mime_display.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_acl.vsp b/binsrc/vsp/admin/admin_news/news_acl.vsp
index 3c9587e..27eb28f 100644
--- a/binsrc/vsp/admin/admin_news/news_acl.vsp
+++ b/binsrc/vsp/admin/admin_news/news_acl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: news_acl.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: news_acl.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_available_processing.vsp b/binsrc/vsp/admin/admin_news/news_available_processing.vsp
index 8979a6c..9ce6bad 100644
--- a/binsrc/vsp/admin/admin_news/news_available_processing.vsp
+++ b/binsrc/vsp/admin/admin_news/news_available_processing.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_available_processing.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_available_processing.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_available_update.vsp b/binsrc/vsp/admin/admin_news/news_available_update.vsp
index 20476d1..138e741 100644
--- a/binsrc/vsp/admin/admin_news/news_available_update.vsp
+++ b/binsrc/vsp/admin/admin_news/news_available_update.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: news_available_update.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_available_update.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_available_update_frame.vsp b/binsrc/vsp/admin/admin_news/news_available_update_frame.vsp
index cb03177..7b073b5 100644
--- a/binsrc/vsp/admin/admin_news/news_available_update_frame.vsp
+++ b/binsrc/vsp/admin/admin_news/news_available_update_frame.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_available_update_frame.vsp,v 1.3 2006/11/30 13:49:19 source Exp $
+--  $Id: news_available_update_frame.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_frames.vsp b/binsrc/vsp/admin/admin_news/news_frames.vsp
index 53a6b87..ae084d6 100644
--- a/binsrc/vsp/admin/admin_news/news_frames.vsp
+++ b/binsrc/vsp/admin/admin_news/news_frames.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_frames.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_frames.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_group_detail.vsp b/binsrc/vsp/admin/admin_news/news_group_detail.vsp
index ac2e52f..30135ae 100644
--- a/binsrc/vsp/admin/admin_news/news_group_detail.vsp
+++ b/binsrc/vsp/admin/admin_news/news_group_detail.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_group_detail.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_group_detail.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_read.vsp b/binsrc/vsp/admin/admin_news/news_read.vsp
index fe1d497..5ff9a3f 100644
--- a/binsrc/vsp/admin/admin_news/news_read.vsp
+++ b/binsrc/vsp/admin/admin_news/news_read.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_read.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_read.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_read_banner.vsp b/binsrc/vsp/admin/admin_news/news_read_banner.vsp
index 08499fb..356eef0 100644
--- a/binsrc/vsp/admin/admin_news/news_read_banner.vsp
+++ b/binsrc/vsp/admin/admin_news/news_read_banner.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_read_banner.vsp,v 1.3 2006/11/30 13:49:19 source Exp $
+--  $Id: news_read_banner.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_search.vsp b/binsrc/vsp/admin/admin_news/news_search.vsp
index f4aad8b..31e43cf 100644
--- a/binsrc/vsp/admin/admin_news/news_search.vsp
+++ b/binsrc/vsp/admin/admin_news/news_search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: news_search.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_search.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_search_result.vsp b/binsrc/vsp/admin/admin_news/news_search_result.vsp
index 85799cd..dd791e9 100644
--- a/binsrc/vsp/admin/admin_news/news_search_result.vsp
+++ b/binsrc/vsp/admin/admin_news/news_search_result.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_search_result.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_search_result.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_server_config.vsp b/binsrc/vsp/admin/admin_news/news_server_config.vsp
index 238f631..c9ec21a 100644
--- a/binsrc/vsp/admin/admin_news/news_server_config.vsp
+++ b/binsrc/vsp/admin/admin_news/news_server_config.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: news_server_config.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_server_config.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/news_server_list.vsp b/binsrc/vsp/admin/admin_news/news_server_list.vsp
index cbf0a00..d90fd71 100644
--- a/binsrc/vsp/admin/admin_news/news_server_list.vsp
+++ b/binsrc/vsp/admin/admin_news/news_server_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: news_server_list.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: news_server_list.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_news/newsgroups_add.vsp b/binsrc/vsp/admin/admin_news/newsgroups_add.vsp
index 3257e59..ee84fe0 100644
--- a/binsrc/vsp/admin/admin_news/newsgroups_add.vsp
+++ b/binsrc/vsp/admin/admin_news/newsgroups_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: newsgroups_add.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: newsgroups_add.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_proc_edit.vsp b/binsrc/vsp/admin/admin_proc_edit.vsp
index ed8cf60..273f275 100644
--- a/binsrc/vsp/admin/admin_proc_edit.vsp
+++ b/binsrc/vsp/admin/admin_proc_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_proc_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_proc_edit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_proc_view.vsp b/binsrc/vsp/admin/admin_proc_view.vsp
index ae2a5ff..f0a6227 100644
--- a/binsrc/vsp/admin/admin_proc_view.vsp
+++ b/binsrc/vsp/admin/admin_proc_view.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_proc_view.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_proc_view.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_procs.vsp b/binsrc/vsp/admin/admin_procs.vsp
index 2fc3f10..281acb6 100644
--- a/binsrc/vsp/admin/admin_procs.vsp
+++ b/binsrc/vsp/admin/admin_procs.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_procs.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_procs.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_procs_verify.vsp b/binsrc/vsp/admin/admin_procs_verify.vsp
index 3b18539..2342488 100644
--- a/binsrc/vsp/admin/admin_procs_verify.vsp
+++ b/binsrc/vsp/admin/admin_procs_verify.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_procs_verify.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_procs_verify.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/admin_repl_main.vsp b/binsrc/vsp/admin/admin_repl/admin_repl_main.vsp
index 2cf24ef..3a64e15 100644
--- a/binsrc/vsp/admin/admin_repl/admin_repl_main.vsp
+++ b/binsrc/vsp/admin/admin_repl/admin_repl_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_repl_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_repl_main.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/link_tables.js b/binsrc/vsp/admin/admin_repl/link_tables.js
index a113bee..ae65a4b 100644
--- a/binsrc/vsp/admin/admin_repl/link_tables.js
+++ b/binsrc/vsp/admin/admin_repl/link_tables.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_all_shed.vsp b/binsrc/vsp/admin/admin_repl/snp_all_shed.vsp
index a5d6c7c..6b4ba95 100644
--- a/binsrc/vsp/admin/admin_repl/snp_all_shed.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_all_shed.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_all_shed.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: snp_all_shed.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_bidir.vsp b/binsrc/vsp/admin/admin_repl/snp_bidir.vsp
index 8c11dd5..269e6c5 100644
--- a/binsrc/vsp/admin/admin_repl/snp_bidir.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_bidir.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_bidir.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: snp_bidir.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_bidir_edit.vsp b/binsrc/vsp/admin/admin_repl/snp_bidir_edit.vsp
index a7a137e..9afa858 100644
--- a/binsrc/vsp/admin/admin_repl/snp_bidir_edit.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_bidir_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_bidir_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: snp_bidir_edit.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_bidir_new_subscriber.vsp b/binsrc/vsp/admin/admin_repl/snp_bidir_new_subscriber.vsp
index 4b54b9c..abb745f 100644
--- a/binsrc/vsp/admin/admin_repl/snp_bidir_new_subscriber.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_bidir_new_subscriber.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_bidir_new_subscriber.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: snp_bidir_new_subscriber.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_create.vsp b/binsrc/vsp/admin/admin_repl/snp_create.vsp
index ef269cf..3461403 100644
--- a/binsrc/vsp/admin/admin_repl/snp_create.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_create.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_create.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: snp_create.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_main.vsp b/binsrc/vsp/admin/admin_repl/snp_main.vsp
index a18c847..0b1c137 100644
--- a/binsrc/vsp/admin/admin_repl/snp_main.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_main.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: snp_main.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_sched.vsp b/binsrc/vsp/admin/admin_repl/snp_sched.vsp
index 2ab232c..d74e7cf 100644
--- a/binsrc/vsp/admin/admin_repl/snp_sched.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_sched.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_sched.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: snp_sched.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_repl/snp_tbl_list.vsp b/binsrc/vsp/admin/admin_repl/snp_tbl_list.vsp
index 7a7ec58..4aae0a5 100644
--- a/binsrc/vsp/admin/admin_repl/snp_tbl_list.vsp
+++ b/binsrc/vsp/admin/admin_repl/snp_tbl_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: snp_tbl_list.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: snp_tbl_list.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_start.vsp b/binsrc/vsp/admin/admin_start.vsp
index e4d15d9..2ab60fd 100644
--- a/binsrc/vsp/admin/admin_start.vsp
+++ b/binsrc/vsp/admin/admin_start.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_start.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_start.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat.vsp b/binsrc/vsp/admin/admin_stat.vsp
index 0f9e68b..04dac66 100644
--- a/binsrc/vsp/admin/admin_stat.vsp
+++ b/binsrc/vsp/admin/admin_stat.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_stat.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_audit.vsp b/binsrc/vsp/admin/admin_stat_audit.vsp
index 46627fc..d2a111b 100644
--- a/binsrc/vsp/admin/admin_stat_audit.vsp
+++ b/binsrc/vsp/admin/admin_stat_audit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_stat_audit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_audit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_disk.vsp b/binsrc/vsp/admin/admin_stat_disk.vsp
index 842f30a..f039602 100644
--- a/binsrc/vsp/admin/admin_stat_disk.vsp
+++ b/binsrc/vsp/admin/admin_stat_disk.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_stat_disk.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_disk.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_idx.vsp b/binsrc/vsp/admin/admin_stat_idx.vsp
index 6c6af6a..c742bbb 100644
--- a/binsrc/vsp/admin/admin_stat_idx.vsp
+++ b/binsrc/vsp/admin/admin_stat_idx.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_stat_idx.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_idx.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_lock.vsp b/binsrc/vsp/admin/admin_stat_lock.vsp
index 1e74888..25e0f1b 100644
--- a/binsrc/vsp/admin/admin_stat_lock.vsp
+++ b/binsrc/vsp/admin/admin_stat_lock.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_stat_lock.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_lock.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_prof.vsp b/binsrc/vsp/admin/admin_stat_prof.vsp
index 526ccd3..a33fe22 100644
--- a/binsrc/vsp/admin/admin_stat_prof.vsp
+++ b/binsrc/vsp/admin/admin_stat_prof.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_stat_prof.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_prof.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_space.vsp b/binsrc/vsp/admin/admin_stat_space.vsp
index 4d86499..3c67481 100644
--- a/binsrc/vsp/admin/admin_stat_space.vsp
+++ b/binsrc/vsp/admin/admin_stat_space.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_stat_space.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_space.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_stat_www.vsp b/binsrc/vsp/admin/admin_stat_www.vsp
index 6b941de..e47aef5 100644
--- a/binsrc/vsp/admin/admin_stat_www.vsp
+++ b/binsrc/vsp/admin/admin_stat_www.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_stat_www.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_stat_www.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_style.css b/binsrc/vsp/admin/admin_style.css
index 70fa9a6..ef22774 100644
--- a/binsrc/vsp/admin/admin_style.css
+++ b/binsrc/vsp/admin/admin_style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: admin_style.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: admin_style.css,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_tables.vsp b/binsrc/vsp/admin/admin_tables.vsp
index a0ae9bd..8b29b6d 100644
--- a/binsrc/vsp/admin/admin_tables.vsp
+++ b/binsrc/vsp/admin/admin_tables.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_tables.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_tables.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_tables_verify.vsp b/binsrc/vsp/admin/admin_tables_verify.vsp
index e6dfd33..787d2b4 100644
--- a/binsrc/vsp/admin/admin_tables_verify.vsp
+++ b/binsrc/vsp/admin/admin_tables_verify.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_tables_verify.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_tables_verify.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_topleft.html b/binsrc/vsp/admin/admin_topleft.html
index 91c59d0..857e5d4 100644
--- a/binsrc/vsp/admin/admin_topleft.html
+++ b/binsrc/vsp/admin/admin_topleft.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_triggers.vsp b/binsrc/vsp/admin/admin_triggers.vsp
index de3f01d..ded3f94 100644
--- a/binsrc/vsp/admin/admin_triggers.vsp
+++ b/binsrc/vsp/admin/admin_triggers.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_triggers.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_triggers.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_triggers_edit.vsp b/binsrc/vsp/admin/admin_triggers_edit.vsp
index fe2cf00..18a1c89 100644
--- a/binsrc/vsp/admin/admin_triggers_edit.vsp
+++ b/binsrc/vsp/admin/admin_triggers_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_triggers_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_triggers_edit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_triggers_verify.vsp b/binsrc/vsp/admin/admin_triggers_verify.vsp
index 77c891a..aa94f1b 100644
--- a/binsrc/vsp/admin/admin_triggers_verify.vsp
+++ b/binsrc/vsp/admin/admin_triggers_verify.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_triggers_verify.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_triggers_verify.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/sub_error.vsp b/binsrc/vsp/admin/admin_trx_repl/sub_error.vsp
index 5e5a492..df4ca52 100644
--- a/binsrc/vsp/admin/admin_trx_repl/sub_error.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/sub_error.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: sub_error.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: sub_error.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_dav.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_dav.vsp
index 94ab08b..87237d5 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_dav.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_dav.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_dav.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_dav.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_file.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_file.vsp
index 5016006..b943253 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_file.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_file.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_file.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_file.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_new_dav_col.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_new_dav_col.vsp
index 7d11cd0..eef29cb 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_new_dav_col.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_new_dav_col.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_new_dav_col.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_new_dav_col.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr.vsp
index 77bb70f..4d6cba9 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_cr.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_cr.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_edit.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_edit.vsp
index e178cad..ae0a3d1 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_edit.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_cr_edit.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_cr_edit.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_new.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_new.vsp
index cc39c1a..43ec6b4 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_new.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_cr_new.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_cr_new.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_cr_new.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_add.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_add.vsp
index a71587b..bd09434 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_add.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_item_add.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_item_add.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_adv.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_adv.vsp
index db46078..3755ae3 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_adv.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_item_adv.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_item_adv.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_item_adv.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub.vsp
index 5d1b449..0758f47 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_pub.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_pub.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_items.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_items.vsp
index 1340257..d383b6f 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_items.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_items.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_pub_items.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_pub_items.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_new.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_new.vsp
index 8908190..1bd6b36 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_new.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_pub_new.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_pub_new.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_pub_new.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_repl_subscriber_add.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_repl_subscriber_add.vsp
index cc149b0..e018a74 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_repl_subscriber_add.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_repl_subscriber_add.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_repl_subscriber_add.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_repl_subscriber_add.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_sub.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_sub.vsp
index 93913c0..e31e9ba 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_sub.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_sub.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_sub.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_sub.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_sub_copy_stat.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_sub_copy_stat.vsp
index 0f6de03..375bf31 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_sub_copy_stat.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_sub_copy_stat.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_sub_copy_stat.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: trx_sub_copy_stat.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_sub_edit.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_sub_edit.vsp
index 61c5103..f3796d3 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_sub_edit.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_sub_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_sub_edit.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_sub_edit.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_sub_new.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_sub_new.vsp
index 7b12438..56e9a40 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_sub_new.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_sub_new.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_sub_new.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_sub_new.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_trx_repl/trx_sub_replay.vsp b/binsrc/vsp/admin/admin_trx_repl/trx_sub_replay.vsp
index 8176131..8be3928 100644
--- a/binsrc/vsp/admin/admin_trx_repl/trx_sub_replay.vsp
+++ b/binsrc/vsp/admin/admin_trx_repl/trx_sub_replay.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: trx_sub_replay.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: trx_sub_replay.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_unlink_proc.vsp b/binsrc/vsp/admin/admin_unlink_proc.vsp
index 2a7ee31..0c91603 100644
--- a/binsrc/vsp/admin/admin_unlink_proc.vsp
+++ b/binsrc/vsp/admin/admin_unlink_proc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_unlink_proc.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_unlink_proc.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_user_types.vsp b/binsrc/vsp/admin/admin_user_types.vsp
index fd60633..1234684 100644
--- a/binsrc/vsp/admin/admin_user_types.vsp
+++ b/binsrc/vsp/admin/admin_user_types.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_user_types.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_user_types.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_user_types_verify.vsp b/binsrc/vsp/admin/admin_user_types_verify.vsp
index 33253be..63cc624 100644
--- a/binsrc/vsp/admin/admin_user_types_verify.vsp
+++ b/binsrc/vsp/admin/admin_user_types_verify.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_user_types_verify.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_user_types_verify.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_users.vsp b/binsrc/vsp/admin/admin_users.vsp
index 19f474b..eeb700c 100644
--- a/binsrc/vsp/admin/admin_users.vsp
+++ b/binsrc/vsp/admin/admin_users.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_users.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_users.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_utils.js b/binsrc/vsp/admin/admin_utils.js
index 6e4d458..c38e5d1 100644
--- a/binsrc/vsp/admin/admin_utils.js
+++ b/binsrc/vsp/admin/admin_utils.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_views.vsp b/binsrc/vsp/admin/admin_views.vsp
index 95d727a..5fee92b 100644
--- a/binsrc/vsp/admin/admin_views.vsp
+++ b/binsrc/vsp/admin/admin_views.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_views.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_views.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_views_edit.vsp b/binsrc/vsp/admin/admin_views_edit.vsp
index 70afd5f..4b22e4e 100644
--- a/binsrc/vsp/admin/admin_views_edit.vsp
+++ b/binsrc/vsp/admin/admin_views_edit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_views_edit.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_views_edit.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_views_verify.vsp b/binsrc/vsp/admin/admin_views_verify.vsp
index fc70c5d..ca0a348 100644
--- a/binsrc/vsp/admin/admin_views_verify.vsp
+++ b/binsrc/vsp/admin/admin_views_verify.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_views_verify.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_views_verify.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_virtini.vsp b/binsrc/vsp/admin/admin_virtini.vsp
index 54fe898..f7281e7 100644
--- a/binsrc/vsp/admin/admin_virtini.vsp
+++ b/binsrc/vsp/admin/admin_virtini.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_virtini.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_virtini.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_xml_documents_main.vsp b/binsrc/vsp/admin/admin_xml_documents_main.vsp
index 2cd429a..06c255f 100644
--- a/binsrc/vsp/admin/admin_xml_documents_main.vsp
+++ b/binsrc/vsp/admin/admin_xml_documents_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_xml_documents_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_xml_documents_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_xml_documents_view.vsp b/binsrc/vsp/admin/admin_xml_documents_view.vsp
index bc74f0b..7a737e5 100644
--- a/binsrc/vsp/admin/admin_xml_documents_view.vsp
+++ b/binsrc/vsp/admin/admin_xml_documents_view.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_xml_documents_view.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_xml_documents_view.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_xml_views_main.vsp b/binsrc/vsp/admin/admin_xml_views_main.vsp
index 7a15ab8..a5611c6 100644
--- a/binsrc/vsp/admin/admin_xml_views_main.vsp
+++ b/binsrc/vsp/admin/admin_xml_views_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: admin_xml_views_main.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: admin_xml_views_main.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_xquery_main.vsp b/binsrc/vsp/admin/admin_xquery_main.vsp
index 0ec420c..302bd00 100644
--- a/binsrc/vsp/admin/admin_xquery_main.vsp
+++ b/binsrc/vsp/admin/admin_xquery_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_xquery_main.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_xquery_main.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/admin_xquery_test.vsp b/binsrc/vsp/admin/admin_xquery_test.vsp
index 331b0cc..f0f112d 100644
--- a/binsrc/vsp/admin/admin_xquery_test.vsp
+++ b/binsrc/vsp/admin/admin_xquery_test.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: admin_xquery_test.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: admin_xquery_test.vsp,v 1.3.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/browse_page.vsp b/binsrc/vsp/admin/dbpump/browse_page.vsp
index b00028c..42f50f4 100644
--- a/binsrc/vsp/admin/dbpump/browse_page.vsp
+++ b/binsrc/vsp/admin/dbpump/browse_page.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: browse_page.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: browse_page.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/comp_html.sql b/binsrc/vsp/admin/dbpump/comp_html.sql
index 419fe93..5a638ec 100644
--- a/binsrc/vsp/admin/dbpump/comp_html.sql
+++ b/binsrc/vsp/admin/dbpump/comp_html.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: comp_html.sql,v 1.4.2.2 2011/02/03 10:35:34 source Exp $
+--  $Id: comp_html.sql,v 1.4.2.4 2012/03/08 12:55:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -223,7 +223,7 @@ create procedure "PUMP"."DBA"."HTML_FOOTER_OUT" ( inout arr any )
   http ('<TR><TD CLASS="CopyrightBorder" COLSPAN="2"><IMG SRC="/admin/images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>');
   http ('<TR><TD ALIGN="right" COLSPAN="2"><P CLASS="Copyright">Virtuoso Server ');
   http (sys_stat('st_dbms_ver'));
-  http (' DBPUMP Interface - Copyright© 1998-2011 OpenLink Software.</P></TD></TR>');
+  http (' DBPUMP Interface - Copyright© 1998-2012 OpenLink Software.</P></TD></TR>');
   http ('</TABLE>\n</BODY>');
 }
 ;
diff --git a/binsrc/vsp/admin/dbpump/comp_misc.sql b/binsrc/vsp/admin/dbpump/comp_misc.sql
index 4c57fd5..a915cbf 100644
--- a/binsrc/vsp/admin/dbpump/comp_misc.sql
+++ b/binsrc/vsp/admin/dbpump/comp_misc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: comp_misc.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: comp_misc.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/comp_rpath.sql b/binsrc/vsp/admin/dbpump/comp_rpath.sql
index c335855..4cc361c 100644
--- a/binsrc/vsp/admin/dbpump/comp_rpath.sql
+++ b/binsrc/vsp/admin/dbpump/comp_rpath.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: comp_rpath.sql,v 1.3 2009/02/11 16:36:29 source Exp $
+--  $Id: comp_rpath.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/comp_tables.sql b/binsrc/vsp/admin/dbpump/comp_tables.sql
index 29f7cf8..b50d74d 100644
--- a/binsrc/vsp/admin/dbpump/comp_tables.sql
+++ b/binsrc/vsp/admin/dbpump/comp_tables.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: comp_tables.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: comp_tables.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/components.sql b/binsrc/vsp/admin/dbpump/components.sql
index cabc1c7..8dfb9da 100644
--- a/binsrc/vsp/admin/dbpump/components.sql
+++ b/binsrc/vsp/admin/dbpump/components.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: components.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: components.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dbdoc.vsp b/binsrc/vsp/admin/dbpump/dbdoc.vsp
index 3f81c2c..b0e69f3 100644
--- a/binsrc/vsp/admin/dbpump/dbdoc.vsp
+++ b/binsrc/vsp/admin/dbpump/dbdoc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dbdoc.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dbdoc.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dbhelp.vsp b/binsrc/vsp/admin/dbpump/dbhelp.vsp
index 761b2bc..c1d4b7e 100644
--- a/binsrc/vsp/admin/dbpump/dbhelp.vsp
+++ b/binsrc/vsp/admin/dbpump/dbhelp.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dbhelp.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dbhelp.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dbpump.vsp b/binsrc/vsp/admin/dbpump/dbpump.vsp
index 7c16854..9bd6537 100644
--- a/binsrc/vsp/admin/dbpump/dbpump.vsp
+++ b/binsrc/vsp/admin/dbpump/dbpump.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dbpump.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dbpump.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dbpump_root.sql b/binsrc/vsp/admin/dbpump/dbpump_root.sql
index cacb9c3..08e0ae7 100644
--- a/binsrc/vsp/admin/dbpump/dbpump_root.sql
+++ b/binsrc/vsp/admin/dbpump/dbpump_root.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dbpump_root.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: dbpump_root.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dbpump_scripts.html b/binsrc/vsp/admin/dbpump/dbpump_scripts.html
index 0c010d4..30c9366 100644
--- a/binsrc/vsp/admin/dbpump/dbpump_scripts.html
+++ b/binsrc/vsp/admin/dbpump/dbpump_scripts.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/debug.vsp b/binsrc/vsp/admin/dbpump/debug.vsp
index aa5a2f3..9dfe49f 100644
--- a/binsrc/vsp/admin/dbpump/debug.vsp
+++ b/binsrc/vsp/admin/dbpump/debug.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: debug.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: debug.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_itself.vsp b/binsrc/vsp/admin/dbpump/dump_itself.vsp
index f3b4d19..4f511dc 100644
--- a/binsrc/vsp/admin/dbpump/dump_itself.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_itself.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_itself.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_itself.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_options.vsp b/binsrc/vsp/admin/dbpump/dump_options.vsp
index 53b06f1..ceb5794 100644
--- a/binsrc/vsp/admin/dbpump/dump_options.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_options.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_options.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_options.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_page.vsp b/binsrc/vsp/admin/dbpump/dump_page.vsp
index 1caec61..11382bd 100644
--- a/binsrc/vsp/admin/dbpump/dump_page.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_page.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_page.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_page.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_schema.vsp b/binsrc/vsp/admin/dbpump/dump_schema.vsp
index 60deab1..6c9b6c5 100644
--- a/binsrc/vsp/admin/dbpump/dump_schema.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_schema.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_schema.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_schema.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_schema_itself.vsp b/binsrc/vsp/admin/dbpump/dump_schema_itself.vsp
index b86ece2..6ad0615 100644
--- a/binsrc/vsp/admin/dbpump/dump_schema_itself.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_schema_itself.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_schema_itself.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_schema_itself.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_tables.vsp b/binsrc/vsp/admin/dbpump/dump_tables.vsp
index 12400db..a55b113 100644
--- a/binsrc/vsp/admin/dbpump/dump_tables.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_tables.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_tables.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_tables.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/dump_tables_itself.vsp b/binsrc/vsp/admin/dbpump/dump_tables_itself.vsp
index 4f57d48..1183c90 100644
--- a/binsrc/vsp/admin/dbpump/dump_tables_itself.vsp
+++ b/binsrc/vsp/admin/dbpump/dump_tables_itself.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dump_tables_itself.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dump_tables_itself.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/filter_options.vsp b/binsrc/vsp/admin/dbpump/filter_options.vsp
index 42878aa..997b70e 100644
--- a/binsrc/vsp/admin/dbpump/filter_options.vsp
+++ b/binsrc/vsp/admin/dbpump/filter_options.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: filter_options.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: filter_options.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/manifest.vsp b/binsrc/vsp/admin/dbpump/manifest.vsp
index 435329b..b7e433e 100644
--- a/binsrc/vsp/admin/dbpump/manifest.vsp
+++ b/binsrc/vsp/admin/dbpump/manifest.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: manifest.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: manifest.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/manifest.xsl b/binsrc/vsp/admin/dbpump/manifest.xsl
index c18513e..663a390 100644
--- a/binsrc/vsp/admin/dbpump/manifest.xsl
+++ b/binsrc/vsp/admin/dbpump/manifest.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: manifest.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: manifest.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/oper_pars.sql b/binsrc/vsp/admin/dbpump/oper_pars.sql
index 3628b71..356fb1b 100644
--- a/binsrc/vsp/admin/dbpump/oper_pars.sql
+++ b/binsrc/vsp/admin/dbpump/oper_pars.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: oper_pars.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: oper_pars.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/operpars.awk b/binsrc/vsp/admin/dbpump/operpars.awk
index 02469e5..cb17797 100644
--- a/binsrc/vsp/admin/dbpump/operpars.awk
+++ b/binsrc/vsp/admin/dbpump/operpars.awk
@@ -3,7 +3,7 @@ BEGIN {
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/pars_init.sql b/binsrc/vsp/admin/dbpump/pars_init.sql
index db5b255..2947e76 100644
--- a/binsrc/vsp/admin/dbpump/pars_init.sql
+++ b/binsrc/vsp/admin/dbpump/pars_init.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: pars_init.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: pars_init.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/parse_oper_pars.sh b/binsrc/vsp/admin/dbpump/parse_oper_pars.sh
index 3c89869..75f0dec 100755
--- a/binsrc/vsp/admin/dbpump/parse_oper_pars.sh
+++ b/binsrc/vsp/admin/dbpump/parse_oper_pars.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: parse_oper_pars.sh,v 1.2 2009/04/14 12:16:49 source Exp $
+#  $Id: parse_oper_pars.sh,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/passwd_page.vsp b/binsrc/vsp/admin/dbpump/passwd_page.vsp
index 60d5006..0076a2d 100644
--- a/binsrc/vsp/admin/dbpump/passwd_page.vsp
+++ b/binsrc/vsp/admin/dbpump/passwd_page.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: passwd_page.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: passwd_page.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_itself.vsp b/binsrc/vsp/admin/dbpump/restore_itself.vsp
index 5e53660..213e870 100644
--- a/binsrc/vsp/admin/dbpump/restore_itself.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_itself.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_itself.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_itself.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_options.vsp b/binsrc/vsp/admin/dbpump/restore_options.vsp
index f8712d1..0372c9b 100644
--- a/binsrc/vsp/admin/dbpump/restore_options.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_options.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_options.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_options.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_page.vsp b/binsrc/vsp/admin/dbpump/restore_page.vsp
index a925d05..538ae1b 100644
--- a/binsrc/vsp/admin/dbpump/restore_page.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_page.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_page.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_page.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_schema.vsp b/binsrc/vsp/admin/dbpump/restore_schema.vsp
index 49eb9bd..911e9f5 100644
--- a/binsrc/vsp/admin/dbpump/restore_schema.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_schema.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_schema.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_schema.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_schema_itself.vsp b/binsrc/vsp/admin/dbpump/restore_schema_itself.vsp
index e7b01ac..b40d302 100644
--- a/binsrc/vsp/admin/dbpump/restore_schema_itself.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_schema_itself.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_schema_itself.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_schema_itself.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_tables.vsp b/binsrc/vsp/admin/dbpump/restore_tables.vsp
index 90bee0c..da23de9 100644
--- a/binsrc/vsp/admin/dbpump/restore_tables.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_tables.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_tables.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_tables.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/restore_tables_itself.vsp b/binsrc/vsp/admin/dbpump/restore_tables_itself.vsp
index 95fa1c5..952dcfe 100644
--- a/binsrc/vsp/admin/dbpump/restore_tables_itself.vsp
+++ b/binsrc/vsp/admin/dbpump/restore_tables_itself.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: restore_tables_itself.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: restore_tables_itself.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/root.isql b/binsrc/vsp/admin/dbpump/root.isql
index cfb53fe..8619bc4 100644
--- a/binsrc/vsp/admin/dbpump/root.isql
+++ b/binsrc/vsp/admin/dbpump/root.isql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_index-info_error.xsl b/binsrc/vsp/admin/dbpump/schema_index-info_error.xsl
index 63ab66c..701c51c 100644
--- a/binsrc/vsp/admin/dbpump/schema_index-info_error.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_index-info_error.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_index-info_error.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_index-info_error.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_index_info.vsp b/binsrc/vsp/admin/dbpump/schema_index_info.vsp
index 469b257..71debed 100644
--- a/binsrc/vsp/admin/dbpump/schema_index_info.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_index_info.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_index_info.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_index_info.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_index_info.xsl b/binsrc/vsp/admin/dbpump/schema_index_info.xsl
index 7d2b410..77a49f9 100644
--- a/binsrc/vsp/admin/dbpump/schema_index_info.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_index_info.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_index_info.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_index_info.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_indices.vsp b/binsrc/vsp/admin/dbpump/schema_indices.vsp
index e34dcd8..69c8445 100644
--- a/binsrc/vsp/admin/dbpump/schema_indices.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_indices.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_indices.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_indices.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_indices.xsl b/binsrc/vsp/admin/dbpump/schema_indices.xsl
index 8db895d..261e288 100644
--- a/binsrc/vsp/admin/dbpump/schema_indices.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_indices.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_indices.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_indices.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_info.vsp b/binsrc/vsp/admin/dbpump/schema_info.vsp
index 1573705..778f8b4 100644
--- a/binsrc/vsp/admin/dbpump/schema_info.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_info.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_info.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_info.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_proc_info.vsp b/binsrc/vsp/admin/dbpump/schema_proc_info.vsp
index b070ae8..69d9e04 100644
--- a/binsrc/vsp/admin/dbpump/schema_proc_info.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_proc_info.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_proc_info.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_proc_info.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_proc_info.xsl b/binsrc/vsp/admin/dbpump/schema_proc_info.xsl
index 74c000d..614eba8 100644
--- a/binsrc/vsp/admin/dbpump/schema_proc_info.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_proc_info.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_proc_info.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_proc_info.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_procs.vsp b/binsrc/vsp/admin/dbpump/schema_procs.vsp
index a66e91c..3e2480b 100644
--- a/binsrc/vsp/admin/dbpump/schema_procs.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_procs.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_procs.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_procs.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_procs.xsl b/binsrc/vsp/admin/dbpump/schema_procs.xsl
index 9194207..44ca557 100644
--- a/binsrc/vsp/admin/dbpump/schema_procs.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_procs.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_procs.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_procs.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_table_info.vsp b/binsrc/vsp/admin/dbpump/schema_table_info.vsp
index abe477a..2918709 100644
--- a/binsrc/vsp/admin/dbpump/schema_table_info.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_table_info.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_table_info.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_table_info.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_table_info.xsl b/binsrc/vsp/admin/dbpump/schema_table_info.xsl
index 060bbcd..a2b959f 100644
--- a/binsrc/vsp/admin/dbpump/schema_table_info.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_table_info.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_table_info.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_table_info.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_tables.vsp b/binsrc/vsp/admin/dbpump/schema_tables.vsp
index 406a8bd..5378488 100644
--- a/binsrc/vsp/admin/dbpump/schema_tables.vsp
+++ b/binsrc/vsp/admin/dbpump/schema_tables.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: schema_tables.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: schema_tables.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_tables.xsl b/binsrc/vsp/admin/dbpump/schema_tables.xsl
index ba97463..1186081 100644
--- a/binsrc/vsp/admin/dbpump/schema_tables.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_tables.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_tables.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_tables.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/schema_tables_select.xsl b/binsrc/vsp/admin/dbpump/schema_tables_select.xsl
index 2b4defa..288c598 100644
--- a/binsrc/vsp/admin/dbpump/schema_tables_select.xsl
+++ b/binsrc/vsp/admin/dbpump/schema_tables_select.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: schema_tables_select.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: schema_tables_select.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/select_datasource.vsp b/binsrc/vsp/admin/dbpump/select_datasource.vsp
index 5cafa5a..c3b448b 100644
--- a/binsrc/vsp/admin/dbpump/select_datasource.vsp
+++ b/binsrc/vsp/admin/dbpump/select_datasource.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: select_datasource.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: select_datasource.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/select_options.vsp b/binsrc/vsp/admin/dbpump/select_options.vsp
index 6fb6f33..7eb8e08 100644
--- a/binsrc/vsp/admin/dbpump/select_options.vsp
+++ b/binsrc/vsp/admin/dbpump/select_options.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: select_options.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: select_options.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/dbpump/try_connect.vsp b/binsrc/vsp/admin/dbpump/try_connect.vsp
index c54aa44..ee47bd0 100644
--- a/binsrc/vsp/admin/dbpump/try_connect.vsp
+++ b/binsrc/vsp/admin/dbpump/try_connect.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: try_connect.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: try_connect.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/debug/filter.awk b/binsrc/vsp/admin/debug/filter.awk
index a01f8b9..c29bd96 100644
--- a/binsrc/vsp/admin/debug/filter.awk
+++ b/binsrc/vsp/admin/debug/filter.awk
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/debug/init.sql b/binsrc/vsp/admin/debug/init.sql
index b94bbe0..dfb602d 100644
--- a/binsrc/vsp/admin/debug/init.sql
+++ b/binsrc/vsp/admin/debug/init.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: init.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: init.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/debug/make_vad.sh b/binsrc/vsp/admin/debug/make_vad.sh
index db4a7e2..835e680 100755
--- a/binsrc/vsp/admin/debug/make_vad.sh
+++ b/binsrc/vsp/admin/debug/make_vad.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: make_vad.sh,v 1.9.2.2 2011/02/03 10:35:34 source Exp $
+#  $Id: make_vad.sh,v 1.9.2.4 2012/03/08 12:55:21 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -188,7 +188,7 @@ sticker_init() {
   echo "  <name package=\"http_debug\">" >> $STICKER
   echo "    <prop name=\"Title\" value=\"HTTP Level debug tool\"/>" >> $STICKER
   echo "    <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+  echo "    <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso\"/>" >> $STICKER
   echo "    <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso\"/>" >> $STICKER
   echo "  </name>" >> $STICKER
diff --git a/binsrc/vsp/admin/debug/record.vspx b/binsrc/vsp/admin/debug/record.vspx
index aa9ba64..813de5f 100644
--- a/binsrc/vsp/admin/debug/record.vspx
+++ b/binsrc/vsp/admin/debug/record.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: record.vspx,v 1.3 2009/01/29 21:56:55 source Exp $
+ -  $Id: record.vspx,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/debug/record_login.vspx b/binsrc/vsp/admin/debug/record_login.vspx
index baf2e9b..9b8af37 100644
--- a/binsrc/vsp/admin/debug/record_login.vspx
+++ b/binsrc/vsp/admin/debug/record_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: record_login.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: record_login.vspx,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/debug/run_tests.sh b/binsrc/vsp/admin/debug/run_tests.sh
index d93e7d4..0e33363 100755
--- a/binsrc/vsp/admin/debug/run_tests.sh
+++ b/binsrc/vsp/admin/debug/run_tests.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: run_tests.sh,v 1.3 2009/04/14 12:16:49 source Exp $
+#  $Id: run_tests.sh,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/hosted_modules_grants.vsp b/binsrc/vsp/admin/hosted_modules_grants.vsp
index f288c72..263907e 100644
--- a/binsrc/vsp/admin/hosted_modules_grants.vsp
+++ b/binsrc/vsp/admin/hosted_modules_grants.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: hosted_modules_grants.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: hosted_modules_grants.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/hosted_modules_show_sql.vsp b/binsrc/vsp/admin/hosted_modules_show_sql.vsp
index 59e66d7..969f46a 100644
--- a/binsrc/vsp/admin/hosted_modules_show_sql.vsp
+++ b/binsrc/vsp/admin/hosted_modules_show_sql.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: hosted_modules_show_sql.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: hosted_modules_show_sql.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/index_left.vsp b/binsrc/vsp/admin/index_left.vsp
index eec807a..632c251 100644
--- a/binsrc/vsp/admin/index_left.vsp
+++ b/binsrc/vsp/admin/index_left.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: index_left.vsp,v 1.7 2008/10/22 20:05:47 source Exp $
+--  $Id: index_left.vsp,v 1.7.2.1 2012/03/08 12:55:20 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/leftfr.vsp b/binsrc/vsp/admin/leftfr.vsp
index 40f16f4..f0959de 100644
--- a/binsrc/vsp/admin/leftfr.vsp
+++ b/binsrc/vsp/admin/leftfr.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: leftfr.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: leftfr.vsp,v 1.2.2.1 2012/03/08 12:55:20 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/dbdoc.vsp b/binsrc/vsp/admin/vad/dbdoc.vsp
index 544dcfb..6afaf19 100644
--- a/binsrc/vsp/admin/vad/dbdoc.vsp
+++ b/binsrc/vsp/admin/vad/dbdoc.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dbdoc.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dbdoc.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/dbhelp.vsp b/binsrc/vsp/admin/vad/dbhelp.vsp
index 5010fde..92efcd8 100644
--- a/binsrc/vsp/admin/vad/dbhelp.vsp
+++ b/binsrc/vsp/admin/vad/dbhelp.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dbhelp.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dbhelp.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/regedit.vsp b/binsrc/vsp/admin/vad/regedit.vsp
index 8662799..442afd6 100644
--- a/binsrc/vsp/admin/vad/regedit.vsp
+++ b/binsrc/vsp/admin/vad/regedit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit.vsp,v 1.3 2006/11/30 13:49:19 source Exp $
+--  $Id: regedit.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/regedit_data.vsp b/binsrc/vsp/admin/vad/regedit_data.vsp
index e54b9d6..f3435b1 100644
--- a/binsrc/vsp/admin/vad/regedit_data.vsp
+++ b/binsrc/vsp/admin/vad/regedit_data.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_data.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: regedit_data.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/regedit_e1.vsp b/binsrc/vsp/admin/vad/regedit_e1.vsp
index 799debd..078cf58 100644
--- a/binsrc/vsp/admin/vad/regedit_e1.vsp
+++ b/binsrc/vsp/admin/vad/regedit_e1.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_e1.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: regedit_e1.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/regedit_sql.vsp b/binsrc/vsp/admin/vad/regedit_sql.vsp
index 6d4cf1f..9ef08e7 100644
--- a/binsrc/vsp/admin/vad/regedit_sql.vsp
+++ b/binsrc/vsp/admin/vad/regedit_sql.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_sql.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: regedit_sql.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/regedit_sticker.vsp b/binsrc/vsp/admin/vad/regedit_sticker.vsp
index 430a154..f5bb6e6 100644
--- a/binsrc/vsp/admin/vad/regedit_sticker.vsp
+++ b/binsrc/vsp/admin/vad/regedit_sticker.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_sticker.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: regedit_sticker.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/regedit_tree.vsp b/binsrc/vsp/admin/vad/regedit_tree.vsp
index 36f509e..17c6865 100644
--- a/binsrc/vsp/admin/vad/regedit_tree.vsp
+++ b/binsrc/vsp/admin/vad/regedit_tree.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: regedit_tree.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: regedit_tree.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/vad.vsp b/binsrc/vsp/admin/vad/vad.vsp
index 1a90f14..3cad2d0 100644
--- a/binsrc/vsp/admin/vad/vad.vsp
+++ b/binsrc/vsp/admin/vad/vad.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vad.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: vad.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/vad_configs.vsp b/binsrc/vsp/admin/vad/vad_configs.vsp
index 3e85caa..0ed02b2 100644
--- a/binsrc/vsp/admin/vad/vad_configs.vsp
+++ b/binsrc/vsp/admin/vad/vad_configs.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vad_configs.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: vad_configs.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/vad_davs.vsp b/binsrc/vsp/admin/vad/vad_davs.vsp
index 45be7c2..36e8779 100644
--- a/binsrc/vsp/admin/vad/vad_davs.vsp
+++ b/binsrc/vsp/admin/vad/vad_davs.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vad_davs.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: vad_davs.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/vad_docs.vsp b/binsrc/vsp/admin/vad/vad_docs.vsp
index f92b263..f13351f 100644
--- a/binsrc/vsp/admin/vad/vad_docs.vsp
+++ b/binsrc/vsp/admin/vad/vad_docs.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vad_docs.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: vad_docs.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/vad_packages.vsp b/binsrc/vsp/admin/vad/vad_packages.vsp
index c064b31..916e5fb 100644
--- a/binsrc/vsp/admin/vad/vad_packages.vsp
+++ b/binsrc/vsp/admin/vad/vad_packages.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vad_packages.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: vad_packages.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin/vad/vad_vsps.vsp b/binsrc/vsp/admin/vad/vad_vsps.vsp
index ace46da..a86aa1e 100644
--- a/binsrc/vsp/admin/vad/vad_vsps.vsp
+++ b/binsrc/vsp/admin/vad/vad_vsps.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: vad_vsps.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: vad_vsps.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/admin_style.html b/binsrc/vsp/admin_style.html
index ae84a72..f183956 100644
--- a/binsrc/vsp/admin_style.html
+++ b/binsrc/vsp/admin_style.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/bugsfixed.html b/binsrc/vsp/bugsfixed.html
index 938374a..7b950b4 100644
--- a/binsrc/vsp/bugsfixed.html
+++ b/binsrc/vsp/bugsfixed.html
@@ -98,6 +98,6 @@
 </UL>
 
 <BR />
-<DIV CLASS="vtabfoot"> - Copyright 1998-2011, OpenLink Software - </DIV>
+<DIV CLASS="vtabfoot"> - Copyright 1998-2012, OpenLink Software - </DIV>
 </BODY>
 </HTML>
diff --git a/binsrc/vsp/default.css b/binsrc/vsp/default.css
index aa16545..83c143a 100644
--- a/binsrc/vsp/default.css
+++ b/binsrc/vsp/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.3 2006/08/31 11:01:55 source Exp $
+ *  $Id: default.css,v 1.3.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/demo-index.html b/binsrc/vsp/demo-index.html
index 725577e..ea39d0e 100644
--- a/binsrc/vsp/demo-index.html
+++ b/binsrc/vsp/demo-index.html
@@ -185,7 +185,7 @@ Virtuoso data and data stored in 3rd party databases via a single, JDBC connecti
 <TR><TD>
         <P CLASS="copyright">Virtuoso Universal Server
           <!--(<?= sys_stat('st_dbms_ver') ?>)-->
-          Administration Interface - Copyright© 1998-2010 OpenLink Software.
+          Administration Interface - Copyright© 1998-2012 OpenLink Software.
         </P>
       </TD></TR>
 </TABLE>
diff --git a/binsrc/vsp/demo-index.vsp b/binsrc/vsp/demo-index.vsp
index f69210e..9bb3827 100644
--- a/binsrc/vsp/demo-index.vsp
+++ b/binsrc/vsp/demo-index.vsp
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <?vsp 
 --  
---  $Id: demo-index.vsp,v 1.3.2.2 2011/02/03 10:35:33 source Exp $
+--  $Id: demo-index.vsp,v 1.3.2.4 2012/03/08 12:55:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -206,7 +206,7 @@ direct access to  Virtuoso Servers.
 </TABLE>
 <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
 <TR CLASS="CopyrightBorder"><TD><IMG SRC="/admin/images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>
-<TR><TD><P CLASS="copyright">Virtuoso Server <!--(<?= sys_stat('st_dbms_ver') ?>)--> Administration Interface - Copyright© 1998-2011 OpenLink Software.  </P></TD></TR>
+<TR><TD><P CLASS="copyright">Virtuoso Server <!--(<?= sys_stat('st_dbms_ver') ?>)--> Administration Interface - Copyright© 1998-2012 OpenLink Software.  </P></TD></TR>
 </TABLE>
 <!--?include admin/admin_footer.vsp ?-->
 </html>
diff --git a/binsrc/vsp/doc/adv_search.vspx b/binsrc/vsp/doc/adv_search.vspx
index eb38026..9b73d8c 100644
--- a/binsrc/vsp/doc/adv_search.vspx
+++ b/binsrc/vsp/doc/adv_search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: adv_search.vspx,v 1.7 2009/01/29 21:56:55 source Exp $
+ -  $Id: adv_search.vspx,v 1.7.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/doc/docs.vsp b/binsrc/vsp/doc/docs.vsp
index 3962802..9714b8e 100644
--- a/binsrc/vsp/doc/docs.vsp
+++ b/binsrc/vsp/doc/docs.vsp
@@ -1,12 +1,12 @@
 <HTML>
 <?vsp 
 --  
---  $Id: docs.vsp,v 1.3.2.2 2011/02/03 10:35:34 source Exp $
+--  $Id: docs.vsp,v 1.3.2.4 2012/03/08 12:55:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -137,7 +137,7 @@ else
 <TABLE BORDER="0" WIDTH="100%">
 <TR><TD WIDTH="50"></TD>
 <TD WIDTH="80%">
-<DIV CLASS="copyright">Copyright© 1998-2011 OpenLink Software</DIV>
+<DIV CLASS="copyright">Copyright© 1998-2012 OpenLink Software</DIV>
 </TD>
 <TD WIDTH="50"/>
 </TR>
diff --git a/binsrc/vsp/doc/rss2xbel.xsl b/binsrc/vsp/doc/rss2xbel.xsl
index 6f64642..6ee3ab2 100644
--- a/binsrc/vsp/doc/rss2xbel.xsl
+++ b/binsrc/vsp/doc/rss2xbel.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: rss2xbel.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: rss2xbel.xsl,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/doc/search.css b/binsrc/vsp/doc/search.css
index ba8abfb..d9fe66f 100644
--- a/binsrc/vsp/doc/search.css
+++ b/binsrc/vsp/doc/search.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: search.css,v 1.4 2006/08/15 22:15:54 source Exp $
+ *  $Id: search.css,v 1.4.2.1 2012/03/08 12:55:21 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/doc/search.vsp b/binsrc/vsp/doc/search.vsp
index 5d58d0e..f844752 100644
--- a/binsrc/vsp/doc/search.vsp
+++ b/binsrc/vsp/doc/search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: search.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: search.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/doc/translate.vsp b/binsrc/vsp/doc/translate.vsp
index f9ae414..f8e828a 100644
--- a/binsrc/vsp/doc/translate.vsp
+++ b/binsrc/vsp/doc/translate.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: translate.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: translate.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/doc/translation.css b/binsrc/vsp/doc/translation.css
index 5554b33..d89af44 100644
--- a/binsrc/vsp/doc/translation.css
+++ b/binsrc/vsp/doc/translation.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: translation.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: translation.css,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/downfr.html b/binsrc/vsp/downfr.html
index 7e0ad7d..c1d9428 100644
--- a/binsrc/vsp/downfr.html
+++ b/binsrc/vsp/downfr.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/index.html b/binsrc/vsp/index.html
index 6321c23..1c23251 100644
--- a/binsrc/vsp/index.html
+++ b/binsrc/vsp/index.html
@@ -114,7 +114,7 @@
      </td>
     </tr>
     <tr><td id="copyright_ctr" colspan="2">
-	  Copyright © 1998-2011 OpenLink Software
+	  Copyright © 1998-2012 OpenLink Software
 	</td>
     </tr>
    </table>
diff --git a/binsrc/vsp/index1.html b/binsrc/vsp/index1.html
index 0a80ee4..9289b2c 100644
--- a/binsrc/vsp/index1.html
+++ b/binsrc/vsp/index1.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/index_left.vsp b/binsrc/vsp/index_left.vsp
index 02d0186..508c652 100644
--- a/binsrc/vsp/index_left.vsp
+++ b/binsrc/vsp/index_left.vsp
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <?vsp 
 --  
---  $Id: index_left.vsp,v 1.2 2006/08/15 19:30:35 source Exp $
+--  $Id: index_left.vsp,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/install.sh b/binsrc/vsp/install.sh
index c373dce..c658678 100755
--- a/binsrc/vsp/install.sh
+++ b/binsrc/vsp/install.sh
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/knownissues.html b/binsrc/vsp/knownissues.html
index 80fb323..bcfcb6e 100644
--- a/binsrc/vsp/knownissues.html
+++ b/binsrc/vsp/knownissues.html
@@ -25,6 +25,6 @@ Virtuoso installation due to Windows interaction bug.</LI>
 <LI>Issue 2190: Entity references fail on certain XPath search expressions.</LI>
 </UL>
 
-<DIV CLASS="vtabfoot"> - Copyright 1998-2011, OpenLink Software - </DIV>
+<DIV CLASS="vtabfoot"> - Copyright 1998-2012, OpenLink Software - </DIV>
 </BODY>
 </HTML>
diff --git a/binsrc/vsp/leftfr.html b/binsrc/vsp/leftfr.html
index 03920da..8bd444b 100644
--- a/binsrc/vsp/leftfr.html
+++ b/binsrc/vsp/leftfr.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mainfr.html b/binsrc/vsp/mainfr.html
index f08c851..08841d6 100644
--- a/binsrc/vsp/mainfr.html
+++ b/binsrc/vsp/mainfr.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/dav_res.vsp b/binsrc/vsp/mime/dav_res.vsp
index f61048d..0b64802 100644
--- a/binsrc/vsp/mime/dav_res.vsp
+++ b/binsrc/vsp/mime/dav_res.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: dav_res.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_res.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/ftt_mail_hits.vsp b/binsrc/vsp/mime/ftt_mail_hits.vsp
index 334c78d..4a23073 100644
--- a/binsrc/vsp/mime/ftt_mail_hits.vsp
+++ b/binsrc/vsp/mime/ftt_mail_hits.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: ftt_mail_hits.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: ftt_mail_hits.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/ftt_mail_query.vsp b/binsrc/vsp/mime/ftt_mail_query.vsp
index 4049017..9f704c1 100644
--- a/binsrc/vsp/mime/ftt_mail_query.vsp
+++ b/binsrc/vsp/mime/ftt_mail_query.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: ftt_mail_query.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: ftt_mail_query.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/ftt_news_hits.vsp b/binsrc/vsp/mime/ftt_news_hits.vsp
index f8917ed..aa0adfe 100644
--- a/binsrc/vsp/mime/ftt_news_hits.vsp
+++ b/binsrc/vsp/mime/ftt_news_hits.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: ftt_news_hits.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: ftt_news_hits.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/ftt_news_query.vsp b/binsrc/vsp/mime/ftt_news_query.vsp
index 496d9c4..7186993 100644
--- a/binsrc/vsp/mime/ftt_news_query.vsp
+++ b/binsrc/vsp/mime/ftt_news_query.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: ftt_news_query.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: ftt_news_query.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/mail_search.vsp b/binsrc/vsp/mime/mail_search.vsp
index 0b8fe7b..24e2176 100644
--- a/binsrc/vsp/mime/mail_search.vsp
+++ b/binsrc/vsp/mime/mail_search.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mail_search.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: mail_search.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/mime_compose.vsp b/binsrc/vsp/mime/mime_compose.vsp
index b555a78..afb4b50 100644
--- a/binsrc/vsp/mime/mime_compose.vsp
+++ b/binsrc/vsp/mime/mime_compose.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mime_compose.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: mime_compose.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/mime_display.vsp b/binsrc/vsp/mime/mime_display.vsp
index e1292a4..9868e2f 100644
--- a/binsrc/vsp/mime/mime_display.vsp
+++ b/binsrc/vsp/mime/mime_display.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mime_display.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: mime_display.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/mime_plain.vsp b/binsrc/vsp/mime/mime_plain.vsp
index 8890c2e..7f0be23 100644
--- a/binsrc/vsp/mime/mime_plain.vsp
+++ b/binsrc/vsp/mime/mime_plain.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mime_plain.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: mime_plain.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/mime_spam_filter.vsp b/binsrc/vsp/mime/mime_spam_filter.vsp
index 471c062..0498ef5 100644
--- a/binsrc/vsp/mime/mime_spam_filter.vsp
+++ b/binsrc/vsp/mime/mime_spam_filter.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mime_spam_filter.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: mime_spam_filter.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/mime_spam_filter_setup.vsp b/binsrc/vsp/mime/mime_spam_filter_setup.vsp
index ade42ca..c1074a1 100644
--- a/binsrc/vsp/mime/mime_spam_filter_setup.vsp
+++ b/binsrc/vsp/mime/mime_spam_filter_setup.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: mime_spam_filter_setup.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: mime_spam_filter_setup.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/nntp_help.htm b/binsrc/vsp/mime/nntp_help.htm
index ae3a535..939785b 100644
--- a/binsrc/vsp/mime/nntp_help.htm
+++ b/binsrc/vsp/mime/nntp_help.htm
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/mime/pop3_get.vsp b/binsrc/vsp/mime/pop3_get.vsp
index c1f6e95..4026c45 100644
--- a/binsrc/vsp/mime/pop3_get.vsp
+++ b/binsrc/vsp/mime/pop3_get.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --
---  $Id: pop3_get.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: pop3_get.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/newfeatures.html b/binsrc/vsp/newfeatures.html
index a2f8d3e..931e458 100644
--- a/binsrc/vsp/newfeatures.html
+++ b/binsrc/vsp/newfeatures.html
@@ -671,7 +671,7 @@ Virtuoso 4.5 online tutorials</a> </font></td></tr></tbody></table>
 	Home</a><font color="#000000"> |  </font>
 	<img border="0" src="images/whats_17.gif"><a class="footer" accesskey="9" href="mailto:support at openlinksw.com">Technical 
 	Support</a><font color="#000000"> </font></font></div><div class="bottomCorners"> 
-		<p align="center"><font face="Verdana">Copyright 1998-2011 OpenLink Software. All Rights Reserved.</font></div></div></td>
+		<p align="center"><font face="Verdana">Copyright 1998-2012 OpenLink Software. All Rights Reserved.</font></div></div></td>
 	<td valign="top" width="6"><div class="contentWrapper_rightnav"> 
       <div class="content_Virtuoso_rightnav_graphic">
 	  <font face="Verdana"> <br> 
diff --git a/binsrc/vsp/releasenotes.css b/binsrc/vsp/releasenotes.css
index 1bc4a7a..fb434a3 100644
--- a/binsrc/vsp/releasenotes.css
+++ b/binsrc/vsp/releasenotes.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: releasenotes.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: releasenotes.css,v 1.2.2.1 2012/03/08 12:55:19 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/SOAP.html b/binsrc/vsp/soapdemo/SOAP.html
index 61859e4..737c4bc 100644
--- a/binsrc/vsp/soapdemo/SOAP.html
+++ b/binsrc/vsp/soapdemo/SOAP.html
@@ -48,7 +48,7 @@ function clickit()
 </TABLE>
 <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
 <TR CLASS="copyrightborder"><TD><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>
-<TR><TD><P CLASS="copyright">Virtuoso SOAP Test Interface - Copyright© 1998-2011 OpenLink Software.  </P></TD></TR>
+<TR><TD><P CLASS="copyright">Virtuoso SOAP Test Interface - Copyright© 1998-2012 OpenLink Software.  </P></TD></TR>
 </TABLE>
 
     <P>  <APPLET code="SOAP.class" name="sc"
diff --git a/binsrc/vsp/soapdemo/SOAP.java b/binsrc/vsp/soapdemo/SOAP.java
index 7b0ef81..dec89f7 100644
--- a/binsrc/vsp/soapdemo/SOAP.java
+++ b/binsrc/vsp/soapdemo/SOAP.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoDocument.vsp b/binsrc/vsp/soapdemo/echoDocument.vsp
index b7cb4e3..a3506a3 100644
--- a/binsrc/vsp/soapdemo/echoDocument.vsp
+++ b/binsrc/vsp/soapdemo/echoDocument.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoDocument.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoDocument.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoEmployee.vsp b/binsrc/vsp/soapdemo/echoEmployee.vsp
index d6f2d9e..042eeba 100644
--- a/binsrc/vsp/soapdemo/echoEmployee.vsp
+++ b/binsrc/vsp/soapdemo/echoEmployee.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoEmployee.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoEmployee.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoPerson.vsp b/binsrc/vsp/soapdemo/echoPerson.vsp
index 9a65346..1dbd2df 100644
--- a/binsrc/vsp/soapdemo/echoPerson.vsp
+++ b/binsrc/vsp/soapdemo/echoPerson.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoPerson.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoPerson.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoString.vsp b/binsrc/vsp/soapdemo/echoString.vsp
index 1206a91..274ec50 100644
--- a/binsrc/vsp/soapdemo/echoString.vsp
+++ b/binsrc/vsp/soapdemo/echoString.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoString.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoString.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoStringArray.vsp b/binsrc/vsp/soapdemo/echoStringArray.vsp
index 53070bd..d9cda77 100644
--- a/binsrc/vsp/soapdemo/echoStringArray.vsp
+++ b/binsrc/vsp/soapdemo/echoStringArray.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStringArray.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoStringArray.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoStruct.vsp b/binsrc/vsp/soapdemo/echoStruct.vsp
index bd94cc9..f481b94 100644
--- a/binsrc/vsp/soapdemo/echoStruct.vsp
+++ b/binsrc/vsp/soapdemo/echoStruct.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStruct.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoStruct.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoStructArray.vsp b/binsrc/vsp/soapdemo/echoStructArray.vsp
index 0a96e1b..e6eabb9 100644
--- a/binsrc/vsp/soapdemo/echoStructArray.vsp
+++ b/binsrc/vsp/soapdemo/echoStructArray.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStructArray.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoStructArray.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoStructLit.vsp b/binsrc/vsp/soapdemo/echoStructLit.vsp
index c878b81..408158c 100644
--- a/binsrc/vsp/soapdemo/echoStructLit.vsp
+++ b/binsrc/vsp/soapdemo/echoStructLit.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoStructLit.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoStructLit.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/echoVoid.vsp b/binsrc/vsp/soapdemo/echoVoid.vsp
index 1e97b99..a752cf2 100644
--- a/binsrc/vsp/soapdemo/echoVoid.vsp
+++ b/binsrc/vsp/soapdemo/echoVoid.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: echoVoid.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: echoVoid.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/extensions.wsdl.vsp b/binsrc/vsp/soapdemo/extensions.wsdl.vsp
index ae61481..0ecf688 100644
--- a/binsrc/vsp/soapdemo/extensions.wsdl.vsp
+++ b/binsrc/vsp/soapdemo/extensions.wsdl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: extensions.wsdl.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: extensions.wsdl.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/extensions_required.wsdl.vsp b/binsrc/vsp/soapdemo/extensions_required.wsdl.vsp
index 3453a42..4005a19 100644
--- a/binsrc/vsp/soapdemo/extensions_required.wsdl.vsp
+++ b/binsrc/vsp/soapdemo/extensions_required.wsdl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: extensions_required.wsdl.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: extensions_required.wsdl.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/fishselect.java b/binsrc/vsp/soapdemo/fishselect.java
index 37ea4df..046dedf 100644
--- a/binsrc/vsp/soapdemo/fishselect.java
+++ b/binsrc/vsp/soapdemo/fishselect.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/fishselect.sql b/binsrc/vsp/soapdemo/fishselect.sql
index c0bc7ac..4f4b86f 100644
--- a/binsrc/vsp/soapdemo/fishselect.sql
+++ b/binsrc/vsp/soapdemo/fishselect.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: fishselect.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: fishselect.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/fishselectResponse.java b/binsrc/vsp/soapdemo/fishselectResponse.java
index a026097..8cc9d79 100644
--- a/binsrc/vsp/soapdemo/fishselectResponse.java
+++ b/binsrc/vsp/soapdemo/fishselectResponse.java
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop-xsd.sql b/binsrc/vsp/soapdemo/interop-xsd.sql
index 854778f..010459b 100644
--- a/binsrc/vsp/soapdemo/interop-xsd.sql
+++ b/binsrc/vsp/soapdemo/interop-xsd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: interop-xsd.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: interop-xsd.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop.html b/binsrc/vsp/soapdemo/interop.html
index bebb03c..815494f 100644
--- a/binsrc/vsp/soapdemo/interop.html
+++ b/binsrc/vsp/soapdemo/interop.html
@@ -35,7 +35,7 @@
 <TR><TD>
         <P CLASS="copyright">Virtuoso Universal Server
           <!--(<?= sys_stat('st_dbms_ver') ?>)-->
-          Administration Interface - Copyright© 1998-2011 OpenLink Software.
+          Administration Interface - Copyright© 1998-2012 OpenLink Software.
         </P>
       </TD></TR>
 </TABLE>
diff --git a/binsrc/vsp/soapdemo/interop_client.sql b/binsrc/vsp/soapdemo/interop_client.sql
index 2038413..b778c0b 100644
--- a/binsrc/vsp/soapdemo/interop_client.sql
+++ b/binsrc/vsp/soapdemo/interop_client.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: interop_client.sql,v 1.5 2009/01/29 21:56:55 source Exp $
+--  $Id: interop_client.sql,v 1.5.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_failed_wsdl.vsp b/binsrc/vsp/soapdemo/interop_failed_wsdl.vsp
index d79a3de..1339f3c 100644
--- a/binsrc/vsp/soapdemo/interop_failed_wsdl.vsp
+++ b/binsrc/vsp/soapdemo/interop_failed_wsdl.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_failed_wsdl.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: interop_failed_wsdl.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_main.vsp b/binsrc/vsp/soapdemo/interop_main.vsp
index 8bf9618..d71f415 100644
--- a/binsrc/vsp/soapdemo/interop_main.vsp
+++ b/binsrc/vsp/soapdemo/interop_main.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_main.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: interop_main.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_req_res.vsp b/binsrc/vsp/soapdemo/interop_req_res.vsp
index 63b711d..cac59a4 100644
--- a/binsrc/vsp/soapdemo/interop_req_res.vsp
+++ b/binsrc/vsp/soapdemo/interop_req_res.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_req_res.vsp,v 1.3 2009/01/29 21:56:55 source Exp $
+--  $Id: interop_req_res.vsp,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_results.vsp b/binsrc/vsp/soapdemo/interop_results.vsp
index 7ac20f0..b708903 100644
--- a/binsrc/vsp/soapdemo/interop_results.vsp
+++ b/binsrc/vsp/soapdemo/interop_results.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_results.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: interop_results.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_results2.vsp b/binsrc/vsp/soapdemo/interop_results2.vsp
index 2a629e9..e6f0045 100644
--- a/binsrc/vsp/soapdemo/interop_results2.vsp
+++ b/binsrc/vsp/soapdemo/interop_results2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_results2.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: interop_results2.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_services.vsp b/binsrc/vsp/soapdemo/interop_services.vsp
index bbae105..5a4a80c 100644
--- a/binsrc/vsp/soapdemo/interop_services.vsp
+++ b/binsrc/vsp/soapdemo/interop_services.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_services.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: interop_services.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_test.vsp b/binsrc/vsp/soapdemo/interop_test.vsp
index 28e053a..8ae3bdc 100644
--- a/binsrc/vsp/soapdemo/interop_test.vsp
+++ b/binsrc/vsp/soapdemo/interop_test.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_test.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: interop_test.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/interop_test2.vsp b/binsrc/vsp/soapdemo/interop_test2.vsp
index f923edc..a70b3fc 100644
--- a/binsrc/vsp/soapdemo/interop_test2.vsp
+++ b/binsrc/vsp/soapdemo/interop_test2.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: interop_test2.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: interop_test2.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r3_index.vsp b/binsrc/vsp/soapdemo/r3_index.vsp
index d145009..dabfb94 100644
--- a/binsrc/vsp/soapdemo/r3_index.vsp
+++ b/binsrc/vsp/soapdemo/r3_index.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: r3_index.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: r3_index.vsp,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-doc-1.xsd b/binsrc/vsp/soapdemo/r4/complex-doc-1.xsd
index 498089d..3477e1e 100644
--- a/binsrc/vsp/soapdemo/r4/complex-doc-1.xsd
+++ b/binsrc/vsp/soapdemo/r4/complex-doc-1.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-doc-2.xsd b/binsrc/vsp/soapdemo/r4/complex-doc-2.xsd
index 15acbb4..799b009 100644
--- a/binsrc/vsp/soapdemo/r4/complex-doc-2.xsd
+++ b/binsrc/vsp/soapdemo/r4/complex-doc-2.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-doc-3.xsd b/binsrc/vsp/soapdemo/r4/complex-doc-3.xsd
index f70177a..bacdbff 100644
--- a/binsrc/vsp/soapdemo/r4/complex-doc-3.xsd
+++ b/binsrc/vsp/soapdemo/r4/complex-doc-3.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-doc-literal.sql b/binsrc/vsp/soapdemo/r4/complex-doc-literal.sql
index 86bb804..5d1acb4 100644
--- a/binsrc/vsp/soapdemo/r4/complex-doc-literal.sql
+++ b/binsrc/vsp/soapdemo/r4/complex-doc-literal.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: complex-doc-literal.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: complex-doc-literal.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-doc-literal_vad.sql b/binsrc/vsp/soapdemo/r4/complex-doc-literal_vad.sql
index ce11d6b..b3e84bb 100644
--- a/binsrc/vsp/soapdemo/r4/complex-doc-literal_vad.sql
+++ b/binsrc/vsp/soapdemo/r4/complex-doc-literal_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: complex-doc-literal_vad.sql,v 1.1 2007/04/02 07:34:41 source Exp $
+--  $Id: complex-doc-literal_vad.sql,v 1.1.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.sql b/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.sql
index d3ca367..0423530 100644
--- a/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.sql
+++ b/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: complex-rpc-encoded.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: complex-rpc-encoded.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.xsd b/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.xsd
index c5df132..c5af8f5 100644
--- a/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.xsd
+++ b/binsrc/vsp/soapdemo/r4/complex-rpc-encoded.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/complex-rpc-encoded_vad.sql b/binsrc/vsp/soapdemo/r4/complex-rpc-encoded_vad.sql
index 28e990b..f748374 100644
--- a/binsrc/vsp/soapdemo/r4/complex-rpc-encoded_vad.sql
+++ b/binsrc/vsp/soapdemo/r4/complex-rpc-encoded_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: complex-rpc-encoded_vad.sql,v 1.1 2007/04/02 07:34:41 source Exp $
+--  $Id: complex-rpc-encoded_vad.sql,v 1.1.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/dime-doc.sql b/binsrc/vsp/soapdemo/r4/dime-doc.sql
index 28787f4..1d2b7ae 100644
--- a/binsrc/vsp/soapdemo/r4/dime-doc.sql
+++ b/binsrc/vsp/soapdemo/r4/dime-doc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dime-doc.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: dime-doc.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/dime-doc.xsd b/binsrc/vsp/soapdemo/r4/dime-doc.xsd
index 05959e1..83d3590 100644
--- a/binsrc/vsp/soapdemo/r4/dime-doc.xsd
+++ b/binsrc/vsp/soapdemo/r4/dime-doc.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/dime-rpc.sql b/binsrc/vsp/soapdemo/r4/dime-rpc.sql
index 33a1658..e01ac37 100644
--- a/binsrc/vsp/soapdemo/r4/dime-rpc.sql
+++ b/binsrc/vsp/soapdemo/r4/dime-rpc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: dime-rpc.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: dime-rpc.sql,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/dime-rpc.xsd b/binsrc/vsp/soapdemo/r4/dime-rpc.xsd
index 3232d20..1efc506 100644
--- a/binsrc/vsp/soapdemo/r4/dime-rpc.xsd
+++ b/binsrc/vsp/soapdemo/r4/dime-rpc.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/load_xsd.sql b/binsrc/vsp/soapdemo/r4/load_xsd.sql
index 1b0f0d9..bb16090 100644
--- a/binsrc/vsp/soapdemo/r4/load_xsd.sql
+++ b/binsrc/vsp/soapdemo/r4/load_xsd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: load_xsd.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: load_xsd.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/mime-doc.sql b/binsrc/vsp/soapdemo/r4/mime-doc.sql
index fc3f1f8..885f0e2 100644
--- a/binsrc/vsp/soapdemo/r4/mime-doc.sql
+++ b/binsrc/vsp/soapdemo/r4/mime-doc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mime-doc.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: mime-doc.sql,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/mime-rpc.sql b/binsrc/vsp/soapdemo/r4/mime-rpc.sql
index 58be13f..725dc94 100644
--- a/binsrc/vsp/soapdemo/r4/mime-rpc.sql
+++ b/binsrc/vsp/soapdemo/r4/mime-rpc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: mime-rpc.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: mime-rpc.sql,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/round4xsd-1.xsd b/binsrc/vsp/soapdemo/r4/round4xsd-1.xsd
index 2b2a736..220945e 100644
--- a/binsrc/vsp/soapdemo/r4/round4xsd-1.xsd
+++ b/binsrc/vsp/soapdemo/r4/round4xsd-1.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/round4xsd-2.xsd b/binsrc/vsp/soapdemo/r4/round4xsd-2.xsd
index c227165..c6b3b6a 100644
--- a/binsrc/vsp/soapdemo/r4/round4xsd-2.xsd
+++ b/binsrc/vsp/soapdemo/r4/round4xsd-2.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/round4xsd-3.xsd b/binsrc/vsp/soapdemo/r4/round4xsd-3.xsd
index 0a5afd5..56d3cb0 100644
--- a/binsrc/vsp/soapdemo/r4/round4xsd-3.xsd
+++ b/binsrc/vsp/soapdemo/r4/round4xsd-3.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/round4xsd-4.xsd b/binsrc/vsp/soapdemo/r4/round4xsd-4.xsd
index fdc4d7d..73f6859 100644
--- a/binsrc/vsp/soapdemo/r4/round4xsd-4.xsd
+++ b/binsrc/vsp/soapdemo/r4/round4xsd-4.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/simple-doc-literal-1.xsd b/binsrc/vsp/soapdemo/r4/simple-doc-literal-1.xsd
index 1aae21f..90d1d19 100644
--- a/binsrc/vsp/soapdemo/r4/simple-doc-literal-1.xsd
+++ b/binsrc/vsp/soapdemo/r4/simple-doc-literal-1.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/simple-doc-literal-2.xsd b/binsrc/vsp/soapdemo/r4/simple-doc-literal-2.xsd
index 0725377..8df51ee 100644
--- a/binsrc/vsp/soapdemo/r4/simple-doc-literal-2.xsd
+++ b/binsrc/vsp/soapdemo/r4/simple-doc-literal-2.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/simple-doc-literal-3.xsd b/binsrc/vsp/soapdemo/r4/simple-doc-literal-3.xsd
index 12963a3..cf5c02d 100644
--- a/binsrc/vsp/soapdemo/r4/simple-doc-literal-3.xsd
+++ b/binsrc/vsp/soapdemo/r4/simple-doc-literal-3.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/simple-doc-literal.sql b/binsrc/vsp/soapdemo/r4/simple-doc-literal.sql
index bce739f..017f46b 100644
--- a/binsrc/vsp/soapdemo/r4/simple-doc-literal.sql
+++ b/binsrc/vsp/soapdemo/r4/simple-doc-literal.sql
@@ -2,7 +2,7 @@
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.sql b/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.sql
index fce6924..9104471 100644
--- a/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.sql
+++ b/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: simple-rpc-encoded.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: simple-rpc-encoded.sql,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.xsd b/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.xsd
index 57b8037..c14b56e 100644
--- a/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.xsd
+++ b/binsrc/vsp/soapdemo/r4/simple-rpc-encoded.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/r4/xsd.sql b/binsrc/vsp/soapdemo/r4/xsd.sql
index d7184d6..21e5ea0 100644
--- a/binsrc/vsp/soapdemo/r4/xsd.sql
+++ b/binsrc/vsp/soapdemo/r4/xsd.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xsd.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: xsd.sql,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round2-B.sql b/binsrc/vsp/soapdemo/round2-B.sql
index b7ccd46..64c9c68 100644
--- a/binsrc/vsp/soapdemo/round2-B.sql
+++ b/binsrc/vsp/soapdemo/round2-B.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round2-B.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: round2-B.sql,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round2-base.sql b/binsrc/vsp/soapdemo/round2-base.sql
index ffa1138..3f43bec 100644
--- a/binsrc/vsp/soapdemo/round2-base.sql
+++ b/binsrc/vsp/soapdemo/round2-base.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round2-base.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: round2-base.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round2.sql b/binsrc/vsp/soapdemo/round2.sql
index c558fba..f071e07 100644
--- a/binsrc/vsp/soapdemo/round2.sql
+++ b/binsrc/vsp/soapdemo/round2.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round2.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: round2.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round3-D.sql b/binsrc/vsp/soapdemo/round3-D.sql
index 2942957..b2752e2 100644
--- a/binsrc/vsp/soapdemo/round3-D.sql
+++ b/binsrc/vsp/soapdemo/round3-D.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round3-D.sql,v 1.4 2007/04/02 07:30:55 source Exp $
+--  $Id: round3-D.sql,v 1.4.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round3-E.sql b/binsrc/vsp/soapdemo/round3-E.sql
index 93f7246..a58c75f 100644
--- a/binsrc/vsp/soapdemo/round3-E.sql
+++ b/binsrc/vsp/soapdemo/round3-E.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round3-E.sql,v 1.4 2007/04/02 07:30:55 source Exp $
+--  $Id: round3-E.sql,v 1.4.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round3-F.sql b/binsrc/vsp/soapdemo/round3-F.sql
index a7f669b..a7659f5 100644
--- a/binsrc/vsp/soapdemo/round3-F.sql
+++ b/binsrc/vsp/soapdemo/round3-F.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round3-F.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: round3-F.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round3-F_vad.sql b/binsrc/vsp/soapdemo/round3-F_vad.sql
index b8280e6..f5ecf79 100644
--- a/binsrc/vsp/soapdemo/round3-F_vad.sql
+++ b/binsrc/vsp/soapdemo/round3-F_vad.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: round3-F_vad.sql,v 1.1 2007/04/02 07:34:41 source Exp $
+--  $Id: round3-F_vad.sql,v 1.1.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round3.html b/binsrc/vsp/soapdemo/round3.html
index 805cb17..ebc4428 100644
--- a/binsrc/vsp/soapdemo/round3.html
+++ b/binsrc/vsp/soapdemo/round3.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/round4.html b/binsrc/vsp/soapdemo/round4.html
index ffa3eca..a5e45a0 100644
--- a/binsrc/vsp/soapdemo/round4.html
+++ b/binsrc/vsp/soapdemo/round4.html
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/soap.css b/binsrc/vsp/soapdemo/soap.css
index 7b27576..314a413 100644
--- a/binsrc/vsp/soapdemo/soap.css
+++ b/binsrc/vsp/soapdemo/soap.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: soap.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: soap.css,v 1.2.2.1 2012/03/08 12:55:21 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/soap12-addon.sql b/binsrc/vsp/soapdemo/soap12-addon.sql
index a4fd732..7ff75a2 100644
--- a/binsrc/vsp/soapdemo/soap12-addon.sql
+++ b/binsrc/vsp/soapdemo/soap12-addon.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: soap12-addon.sql,v 1.3 2007/03/14 14:42:18 source Exp $
+--  $Id: soap12-addon.sql,v 1.3.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/soapdemo/soap_validator.sql b/binsrc/vsp/soapdemo/soap_validator.sql
index 7951f78..ae76de5 100644
--- a/binsrc/vsp/soapdemo/soap_validator.sql
+++ b/binsrc/vsp/soapdemo/soap_validator.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: soap_validator.sql,v 1.4 2007/04/02 07:30:55 source Exp $
+--  $Id: soap_validator.sql,v 1.4.2.1 2012/03/08 12:55:21 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/vsmx/default.css b/binsrc/vsp/vsmx/default.css
index 7a42094..77980fc 100644
--- a/binsrc/vsp/vsmx/default.css
+++ b/binsrc/vsp/vsmx/default.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: default.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: default.css,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/vsmx/msg.vspx b/binsrc/vsp/vsmx/msg.vspx
index 613dfcf..8f4b646 100644
--- a/binsrc/vsp/vsmx/msg.vspx
+++ b/binsrc/vsp/vsmx/msg.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: msg.vspx,v 1.3.2.2 2011/02/03 10:35:34 source Exp $
+ -  $Id: msg.vspx,v 1.3.2.4 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -406,7 +406,7 @@
 	  </tr>
 	</table>
       </v:form>
-      <div class="foot"><span class="foot">Virtuoso Universal Server <?V sys_stat('st_dbms_ver')?> - Copyright&copy; 1998-2011 OpenLink Software.</span></div>
+      <div class="foot"><span class="foot">Virtuoso Universal Server <?V sys_stat('st_dbms_ver')?> - Copyright&copy; 1998-2012 OpenLink Software.</span></div>
     </body>
   </html>
 </v:page>
diff --git a/binsrc/vsp/vsmx/oper.vspx b/binsrc/vsp/vsmx/oper.vspx
index dd8aaf5..15d4da2 100644
--- a/binsrc/vsp/vsmx/oper.vspx
+++ b/binsrc/vsp/vsmx/oper.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: oper.vspx,v 1.3.2.2 2011/02/03 10:35:34 source Exp $
+ -  $Id: oper.vspx,v 1.3.2.4 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -118,7 +118,7 @@
 	</table>
       </v:form>
       <div class="foot">
-	<span class="foot">Virtuoso Universal Server <?V sys_stat('st_dbms_ver')?> - Copyright© 1998-2011 OpenLink Software.</span>
+	<span class="foot">Virtuoso Universal Server <?V sys_stat('st_dbms_ver')?> - Copyright© 1998-2012 OpenLink Software.</span>
       </div>
     </body>
   </html>
diff --git a/binsrc/vsp/vsmx/vsmx.vspx b/binsrc/vsp/vsmx/vsmx.vspx
index db3d957..9d976d3 100644
--- a/binsrc/vsp/vsmx/vsmx.vspx
+++ b/binsrc/vsp/vsmx/vsmx.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vsmx.vspx,v 1.4.2.2 2011/02/03 10:35:34 source Exp $
+ -  $Id: vsmx.vspx,v 1.4.2.4 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -73,7 +73,7 @@
 	</table>
       </v:form>
       <div class="foot">
-	<span class="foot">Virtuoso Universal Server <?V sys_stat('st_dbms_ver')?> - Copyright© 1998-2011 OpenLink Software.</span>
+	<span class="foot">Virtuoso Universal Server <?V sys_stat('st_dbms_ver')?> - Copyright© 1998-2012 OpenLink Software.</span>
       </div>
     </body>
   </html>
diff --git a/binsrc/vsp/vsmx/vsmx_msg.xsl b/binsrc/vsp/vsmx/vsmx_msg.xsl
index 47619a8..4b7e7d5 100644
--- a/binsrc/vsp/vsmx/vsmx_msg.xsl
+++ b/binsrc/vsp/vsmx/vsmx_msg.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vsmx_msg.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vsmx_msg.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/vsmx/vsmx_oper.xsl b/binsrc/vsp/vsmx/vsmx_oper.xsl
index 1b1a2ba..02e191d 100644
--- a/binsrc/vsp/vsmx/vsmx_oper.xsl
+++ b/binsrc/vsp/vsmx/vsmx_oper.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vsmx_oper.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vsmx_oper.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/vsmx/vsmx_res.xsl b/binsrc/vsp/vsmx/vsmx_res.xsl
index bf32cb1..5e2b377 100644
--- a/binsrc/vsp/vsmx/vsmx_res.xsl
+++ b/binsrc/vsp/vsmx/vsmx_res.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vsmx_res.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vsmx_res.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vsp/vsp_auth.sql b/binsrc/vsp/vsp_auth.sql
index 2e63b83..e5c48ac 100644
--- a/binsrc/vsp/vsp_auth.sql
+++ b/binsrc/vsp/vsp_auth.sql
@@ -2,14 +2,14 @@
 --
 --  vsp_auth.vsp
 --
---  $Id: vsp_auth.sql,v 1.2.2.2 2011/01/03 23:41:46 source Exp $
+--  $Id: vsp_auth.sql,v 1.2.2.3 2012/03/08 12:55:19 source Exp $
 --
 --  Virtuoso vsp stored procedures for digest and basic authentication
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/Makefile.am b/binsrc/vspx/Makefile.am
index 5c96b09..0991341 100644
--- a/binsrc/vspx/Makefile.am
+++ b/binsrc/vspx/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/Makefile.in b/binsrc/vspx/Makefile.in
index 161074b..4b69bef 100644
--- a/binsrc/vspx/Makefile.in
+++ b/binsrc/vspx/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/vspx/active_ctrls.vspx b/binsrc/vspx/active_ctrls.vspx
index 06fe0a0..ff655df 100644
--- a/binsrc/vspx/active_ctrls.vspx
+++ b/binsrc/vspx/active_ctrls.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: active_ctrls.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: active_ctrls.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/box.vspx b/binsrc/vspx/box.vspx
index b3a51a1..0b8a8e6 100644
--- a/binsrc/vspx/box.vspx
+++ b/binsrc/vspx/box.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: box.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: box.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/admin_dav_browser.sql b/binsrc/vspx/browser/admin_dav_browser.sql
index 1968f80..824b983 100644
--- a/binsrc/vspx/browser/admin_dav_browser.sql
+++ b/binsrc/vspx/browser/admin_dav_browser.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: admin_dav_browser.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: admin_dav_browser.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser.css b/binsrc/vspx/browser/dav_browser.css
index d52ece7..feb1079 100644
--- a/binsrc/vspx/browser/dav_browser.css
+++ b/binsrc/vspx/browser/dav_browser.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: dav_browser.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: dav_browser.css,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser.js b/binsrc/vspx/browser/dav_browser.js
index 0129b6d..3f5dfc4 100644
--- a/binsrc/vspx/browser/dav_browser.js
+++ b/binsrc/vspx/browser/dav_browser.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser.vsp b/binsrc/vspx/browser/dav_browser.vsp
index b14d21a..7389097 100644
--- a/binsrc/vspx/browser/dav_browser.vsp
+++ b/binsrc/vspx/browser/dav_browser.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dav_browser.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_browser.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser_bot.vsp b/binsrc/vspx/browser/dav_browser_bot.vsp
index fcc9fb3..885b30f 100644
--- a/binsrc/vspx/browser/dav_browser_bot.vsp
+++ b/binsrc/vspx/browser/dav_browser_bot.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dav_browser_bot.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_browser_bot.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser_host.vsp b/binsrc/vspx/browser/dav_browser_host.vsp
index befe81b..e2e45a8 100644
--- a/binsrc/vspx/browser/dav_browser_host.vsp
+++ b/binsrc/vspx/browser/dav_browser_host.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dav_browser_host.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_browser_host.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser_list.vsp b/binsrc/vspx/browser/dav_browser_list.vsp
index c66d158..6d28d10 100644
--- a/binsrc/vspx/browser/dav_browser_list.vsp
+++ b/binsrc/vspx/browser/dav_browser_list.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dav_browser_list.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_browser_list.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser_mozilla.js b/binsrc/vspx/browser/dav_browser_mozilla.js
index 89d0acb..eae0efd 100644
--- a/binsrc/vspx/browser/dav_browser_mozilla.js
+++ b/binsrc/vspx/browser/dav_browser_mozilla.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser_msie.js b/binsrc/vspx/browser/dav_browser_msie.js
index 4e87043..55e4c02 100644
--- a/binsrc/vspx/browser/dav_browser_msie.js
+++ b/binsrc/vspx/browser/dav_browser_msie.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_browser_top.vsp b/binsrc/vspx/browser/dav_browser_top.vsp
index ce6789d..b8d21f3 100644
--- a/binsrc/vspx/browser/dav_browser_top.vsp
+++ b/binsrc/vspx/browser/dav_browser_top.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dav_browser_top.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_browser_top.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/dav_js.vsp b/binsrc/vspx/browser/dav_js.vsp
index 107ec01..713c77d 100644
--- a/binsrc/vspx/browser/dav_js.vsp
+++ b/binsrc/vspx/browser/dav_js.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: dav_js.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: dav_js.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/util.js b/binsrc/vspx/browser/util.js
index 79be980..a775cb0 100644
--- a/binsrc/vspx/browser/util.js
+++ b/binsrc/vspx/browser/util.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/browser/vsp_debug.vsp b/binsrc/vspx/browser/vsp_debug.vsp
index eda2927..c009fd3 100644
--- a/binsrc/vspx/browser/vsp_debug.vsp
+++ b/binsrc/vspx/browser/vsp_debug.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: vsp_debug.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: vsp_debug.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/cal.vspx b/binsrc/vspx/cal.vspx
index 8d095d6..5996f43 100644
--- a/binsrc/vspx/cal.vspx
+++ b/binsrc/vspx/cal.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: cal.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: cal.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/check_box.vspx b/binsrc/vspx/check_box.vspx
index b8d7663..2b05228 100644
--- a/binsrc/vspx/check_box.vspx
+++ b/binsrc/vspx/check_box.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: check_box.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: check_box.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/code1.sql b/binsrc/vspx/code1.sql
index 16f18a2..0d24a26 100644
--- a/binsrc/vspx/code1.sql
+++ b/binsrc/vspx/code1.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: code1.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: code1.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/code_behind.vspx b/binsrc/vspx/code_behind.vspx
index 24454aa..7e02587 100644
--- a/binsrc/vspx/code_behind.vspx
+++ b/binsrc/vspx/code_behind.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: code_behind.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: code_behind.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/combo.vspx b/binsrc/vspx/combo.vspx
index b15b87d..b34927d 100644
--- a/binsrc/vspx/combo.vspx
+++ b/binsrc/vspx/combo.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: combo.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: combo.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/combo1.vspx b/binsrc/vspx/combo1.vspx
index 240d18c..c85d0e5 100644
--- a/binsrc/vspx/combo1.vspx
+++ b/binsrc/vspx/combo1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: combo1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: combo1.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/custinst.vspx b/binsrc/vspx/custinst.vspx
index e110be0..b9f111f 100644
--- a/binsrc/vspx/custinst.vspx
+++ b/binsrc/vspx/custinst.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: custinst.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: custinst.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/custom_condition.vspx b/binsrc/vspx/custom_condition.vspx
index c4b56cf..a6fb605 100644
--- a/binsrc/vspx/custom_condition.vspx
+++ b/binsrc/vspx/custom_condition.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -  
- -  $Id: custom_condition.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: custom_condition.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/custom_format.vspx b/binsrc/vspx/custom_format.vspx
index 0f892a6..da38160 100644
--- a/binsrc/vspx/custom_format.vspx
+++ b/binsrc/vspx/custom_format.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: custom_format.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: custom_format.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/data_list.vspx b/binsrc/vspx/data_list.vspx
index 6acd9d2..2c7ff5e 100644
--- a/binsrc/vspx/data_list.vspx
+++ b/binsrc/vspx/data_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: data_list.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_list.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/data_list_sql.vspx b/binsrc/vspx/data_list_sql.vspx
index 7ac2c86..ca01adf 100644
--- a/binsrc/vspx/data_list_sql.vspx
+++ b/binsrc/vspx/data_list_sql.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: data_list_sql.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_list_sql.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/data_set.vspx b/binsrc/vspx/data_set.vspx
index 80399d0..ca61a88 100644
--- a/binsrc/vspx/data_set.vspx
+++ b/binsrc/vspx/data_set.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: data_set.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_set.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/data_set_arr.vspx b/binsrc/vspx/data_set_arr.vspx
index 9a7b4e2..ddb52db 100644
--- a/binsrc/vspx/data_set_arr.vspx
+++ b/binsrc/vspx/data_set_arr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: data_set_arr.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_set_arr.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/data_set_arr_paging.vspx b/binsrc/vspx/data_set_arr_paging.vspx
index 0b46010..c3f6976 100644
--- a/binsrc/vspx/data_set_arr_paging.vspx
+++ b/binsrc/vspx/data_set_arr_paging.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set_arr_paging.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: data_set_arr_paging.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/datagrid.vspx b/binsrc/vspx/datagrid.vspx
index 869cfd4..ad224cb 100644
--- a/binsrc/vspx/datagrid.vspx
+++ b/binsrc/vspx/datagrid.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: datagrid.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: datagrid.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/dataset_new.vspx b/binsrc/vspx/dataset_new.vspx
index 33213f5..c23cf95 100644
--- a/binsrc/vspx/dataset_new.vspx
+++ b/binsrc/vspx/dataset_new.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dataset_new.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: dataset_new.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/dataset_new_2.vspx b/binsrc/vspx/dataset_new_2.vspx
index e62065e..a881a86 100644
--- a/binsrc/vspx/dataset_new_2.vspx
+++ b/binsrc/vspx/dataset_new_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: dataset_new_2.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: dataset_new_2.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/dataset_pager.vspx b/binsrc/vspx/dataset_pager.vspx
index 2b38d64..62cdd0f 100644
--- a/binsrc/vspx/dataset_pager.vspx
+++ b/binsrc/vspx/dataset_pager.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dataset_pager.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: dataset_pager.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/dataset_update_1.vspx b/binsrc/vspx/dataset_update_1.vspx
index d571a1a..648add3 100644
--- a/binsrc/vspx/dataset_update_1.vspx
+++ b/binsrc/vspx/dataset_update_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dataset_update_1.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: dataset_update_1.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/datasource.vspx b/binsrc/vspx/datasource.vspx
index f65d950..6b1678d 100644
--- a/binsrc/vspx/datasource.vspx
+++ b/binsrc/vspx/datasource.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: datasource.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: datasource.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/date.vspx b/binsrc/vspx/date.vspx
index ce18802..e9e90d1 100644
--- a/binsrc/vspx/date.vspx
+++ b/binsrc/vspx/date.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: date.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: date.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/dav_browser.vspx b/binsrc/vspx/dav_browser.vspx
index ee9eff0..c82f41d 100644
--- a/binsrc/vspx/dav_browser.vspx
+++ b/binsrc/vspx/dav_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: dav_browser.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: dav_browser.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/dgarr.vspx b/binsrc/vspx/dgarr.vspx
index 67b5f1a..a1d12a5 100644
--- a/binsrc/vspx/dgarr.vspx
+++ b/binsrc/vspx/dgarr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dgarr.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: dgarr.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/error.vsp b/binsrc/vspx/error.vsp
index 03d22fd..086cb24 100644
--- a/binsrc/vspx/error.vsp
+++ b/binsrc/vspx/error.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: error.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: error.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/errors.vspx b/binsrc/vspx/errors.vspx
index 977dd06..f6908cb 100644
--- a/binsrc/vspx/errors.vspx
+++ b/binsrc/vspx/errors.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: errors.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: errors.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/button__0.vspx b/binsrc/vspx/examples/button__0.vspx
index 5c3e76f..9a3363a 100644
--- a/binsrc/vspx/examples/button__0.vspx
+++ b/binsrc/vspx/examples/button__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/button__1.vspx b/binsrc/vspx/examples/button__1.vspx
index 264d1a5..b017d92 100644
--- a/binsrc/vspx/examples/button__1.vspx
+++ b/binsrc/vspx/examples/button__1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/button__2.vspx b/binsrc/vspx/examples/button__2.vspx
index df681d3..b941b1b 100644
--- a/binsrc/vspx/examples/button__2.vspx
+++ b/binsrc/vspx/examples/button__2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__2.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__2.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/button__3.vspx b/binsrc/vspx/examples/button__3.vspx
index 93eed81..044c412 100644
--- a/binsrc/vspx/examples/button__3.vspx
+++ b/binsrc/vspx/examples/button__3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__3.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__3.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/button__4.vspx b/binsrc/vspx/examples/button__4.vspx
index 251cd13..5c4a775 100644
--- a/binsrc/vspx/examples/button__4.vspx
+++ b/binsrc/vspx/examples/button__4.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__4.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__4.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/calendar__0.vspx b/binsrc/vspx/examples/calendar__0.vspx
index 60184f2..1160e3e 100644
--- a/binsrc/vspx/examples/calendar__0.vspx
+++ b/binsrc/vspx/examples/calendar__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: calendar__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: calendar__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/check_box__0.vspx b/binsrc/vspx/examples/check_box__0.vspx
index a3d98f9..add59ff 100644
--- a/binsrc/vspx/examples/check_box__0.vspx
+++ b/binsrc/vspx/examples/check_box__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: check_box__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: check_box__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/code_file__0.sql b/binsrc/vspx/examples/code_file__0.sql
index 477dae0..5557d3b 100644
--- a/binsrc/vspx/examples/code_file__0.sql
+++ b/binsrc/vspx/examples/code_file__0.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: code_file__0.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: code_file__0.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/code_file__0.vspx b/binsrc/vspx/examples/code_file__0.vspx
index 3d71818..272b10c 100644
--- a/binsrc/vspx/examples/code_file__0.vspx
+++ b/binsrc/vspx/examples/code_file__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: code_file__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: code_file__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/data_grid__0.vspx b/binsrc/vspx/examples/data_grid__0.vspx
index 815001b..323ce0c 100644
--- a/binsrc/vspx/examples/data_grid__0.vspx
+++ b/binsrc/vspx/examples/data_grid__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_grid__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_grid__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/data_list__0.vspx b/binsrc/vspx/examples/data_list__0.vspx
index 15b464f..21b8ade 100644
--- a/binsrc/vspx/examples/data_list__0.vspx
+++ b/binsrc/vspx/examples/data_list__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/data_list__1.vspx b/binsrc/vspx/examples/data_list__1.vspx
index 1de1bd8..423b12c 100644
--- a/binsrc/vspx/examples/data_list__1.vspx
+++ b/binsrc/vspx/examples/data_list__1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/data_set__0.vspx b/binsrc/vspx/examples/data_set__0.vspx
index 875ae59..f83d121 100644
--- a/binsrc/vspx/examples/data_set__0.vspx
+++ b/binsrc/vspx/examples/data_set__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/data_set__1.vspx b/binsrc/vspx/examples/data_set__1.vspx
index 21c95d6..d0e0d79 100644
--- a/binsrc/vspx/examples/data_set__1.vspx
+++ b/binsrc/vspx/examples/data_set__1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/data_source__0.vspx b/binsrc/vspx/examples/data_source__0.vspx
index 458bc18..2ef858b 100644
--- a/binsrc/vspx/examples/data_source__0.vspx
+++ b/binsrc/vspx/examples/data_source__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_source__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_source__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/error_summary__0.vspx b/binsrc/vspx/examples/error_summary__0.vspx
index 654e83f..a72f7aa 100644
--- a/binsrc/vspx/examples/error_summary__0.vspx
+++ b/binsrc/vspx/examples/error_summary__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/error_summary__1.vspx b/binsrc/vspx/examples/error_summary__1.vspx
index d9d0d18..57c684c 100644
--- a/binsrc/vspx/examples/error_summary__1.vspx
+++ b/binsrc/vspx/examples/error_summary__1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/footer.xml b/binsrc/vspx/examples/footer.xml
index a017809..677d575 100644
--- a/binsrc/vspx/examples/footer.xml
+++ b/binsrc/vspx/examples/footer.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/form__0.vspx b/binsrc/vspx/examples/form__0.vspx
index 78639fa..7a0210d 100644
--- a/binsrc/vspx/examples/form__0.vspx
+++ b/binsrc/vspx/examples/form__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/form__1.vspx b/binsrc/vspx/examples/form__1.vspx
index c7b5287..e89f963 100644
--- a/binsrc/vspx/examples/form__1.vspx
+++ b/binsrc/vspx/examples/form__1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/include__0.vspx b/binsrc/vspx/examples/include__0.vspx
index 73b5a2c..57c67e4 100644
--- a/binsrc/vspx/examples/include__0.vspx
+++ b/binsrc/vspx/examples/include__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: include__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: include__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/label__0.vspx b/binsrc/vspx/examples/label__0.vspx
index 9d5ac16..8eaf289 100644
--- a/binsrc/vspx/examples/label__0.vspx
+++ b/binsrc/vspx/examples/label__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: label__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: label__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/login__0.vspx b/binsrc/vspx/examples/login__0.vspx
index a93071a..ddd2722 100644
--- a/binsrc/vspx/examples/login__0.vspx
+++ b/binsrc/vspx/examples/login__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/login_form__0.vspx b/binsrc/vspx/examples/login_form__0.vspx
index 2f5fd5b..f0baaa7 100644
--- a/binsrc/vspx/examples/login_form__0.vspx
+++ b/binsrc/vspx/examples/login_form__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login_form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login_form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/page__0.vspx b/binsrc/vspx/examples/page__0.vspx
index 85b113c..a1e5b01 100644
--- a/binsrc/vspx/examples/page__0.vspx
+++ b/binsrc/vspx/examples/page__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: page__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: page__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/radio_button__0.vspx b/binsrc/vspx/examples/radio_button__0.vspx
index 188b2ea..87a60f9 100644
--- a/binsrc/vspx/examples/radio_button__0.vspx
+++ b/binsrc/vspx/examples/radio_button__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/radio_group__0.vspx b/binsrc/vspx/examples/radio_group__0.vspx
index 3c4fc8e..eabc5f8 100644
--- a/binsrc/vspx/examples/radio_group__0.vspx
+++ b/binsrc/vspx/examples/radio_group__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_group__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/select_list__0.vspx b/binsrc/vspx/examples/select_list__0.vspx
index ea09e25..8178a05 100644
--- a/binsrc/vspx/examples/select_list__0.vspx
+++ b/binsrc/vspx/examples/select_list__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: select_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: select_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/tab__0.vspx b/binsrc/vspx/examples/tab__0.vspx
index 36e553e..c6d4aae 100644
--- a/binsrc/vspx/examples/tab__0.vspx
+++ b/binsrc/vspx/examples/tab__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tab__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/text__0.vspx b/binsrc/vspx/examples/text__0.vspx
index cb09a92..f4562d9 100644
--- a/binsrc/vspx/examples/text__0.vspx
+++ b/binsrc/vspx/examples/text__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: text__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: text__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/text_area__0.vspx b/binsrc/vspx/examples/text_area__0.vspx
index 01c28ec..327cede 100644
--- a/binsrc/vspx/examples/text_area__0.vspx
+++ b/binsrc/vspx/examples/text_area__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: text_area__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: text_area__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/tree__0.vspx b/binsrc/vspx/examples/tree__0.vspx
index ffd8dbc..3299a33 100644
--- a/binsrc/vspx/examples/tree__0.vspx
+++ b/binsrc/vspx/examples/tree__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tree__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tree__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/url__0.vspx b/binsrc/vspx/examples/url__0.vspx
index 5baf0de..0cb2cb7 100644
--- a/binsrc/vspx/examples/url__0.vspx
+++ b/binsrc/vspx/examples/url__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: url__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: url__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/validator__0.vspx b/binsrc/vspx/examples/validator__0.vspx
index eb107e9..8f7bcc0 100644
--- a/binsrc/vspx/examples/validator__0.vspx
+++ b/binsrc/vspx/examples/validator__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: validator__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: validator__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/variable__0.vspx b/binsrc/vspx/examples/variable__0.vspx
index 4961d1b..13256f1 100644
--- a/binsrc/vspx/examples/variable__0.vspx
+++ b/binsrc/vspx/examples/variable__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: variable__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: variable__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/vscx__0.vspx b/binsrc/vspx/examples/vscx__0.vspx
index 823017e..2d35f92 100644
--- a/binsrc/vspx/examples/vscx__0.vspx
+++ b/binsrc/vspx/examples/vscx__0.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/examples/vscx__1.vspx b/binsrc/vspx/examples/vscx__1.vspx
index fb864d8..2d9bf2b 100644
--- a/binsrc/vspx/examples/vscx__1.vspx
+++ b/binsrc/vspx/examples/vscx__1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/file.vspx b/binsrc/vspx/file.vspx
index 977736d..e5f138c 100644
--- a/binsrc/vspx/file.vspx
+++ b/binsrc/vspx/file.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: file.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: file.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/file_browser.vspx b/binsrc/vspx/file_browser.vspx
index 160182b..0e37250 100644
--- a/binsrc/vspx/file_browser.vspx
+++ b/binsrc/vspx/file_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: file_browser.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: file_browser.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/footer.xml b/binsrc/vspx/footer.xml
index fce8b73..ebe4529 100644
--- a/binsrc/vspx/footer.xml
+++ b/binsrc/vspx/footer.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/form.vspx b/binsrc/vspx/form.vspx
index 22e4fe3..9d82550 100644
--- a/binsrc/vspx/form.vspx
+++ b/binsrc/vspx/form.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: form.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: form.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/formdecor.vspx b/binsrc/vspx/formdecor.vspx
index df68782..75d0035 100644
--- a/binsrc/vspx/formdecor.vspx
+++ b/binsrc/vspx/formdecor.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: formdecor.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: formdecor.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/formsty.vspx b/binsrc/vspx/formsty.vspx
index 3889ad9..dccf20e 100644
--- a/binsrc/vspx/formsty.vspx
+++ b/binsrc/vspx/formsty.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: formsty.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: formsty.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/formsty.xsl b/binsrc/vspx/formsty.xsl
index 0adbcb0..ee1d450 100644
--- a/binsrc/vspx/formsty.xsl
+++ b/binsrc/vspx/formsty.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: formsty.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: formsty.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/golive_data_set_colored.vspx b/binsrc/vspx/golive_data_set_colored.vspx
index 7526062..04022dd 100644
--- a/binsrc/vspx/golive_data_set_colored.vspx
+++ b/binsrc/vspx/golive_data_set_colored.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: golive_data_set_colored.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: golive_data_set_colored.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/grid.vspx b/binsrc/vspx/grid.vspx
index 812827d..35a1bae 100644
--- a/binsrc/vspx/grid.vspx
+++ b/binsrc/vspx/grid.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: grid.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: grid.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/hiding_test.vspx b/binsrc/vspx/hiding_test.vspx
index 4fd1b80..177934d 100644
--- a/binsrc/vspx/hiding_test.vspx
+++ b/binsrc/vspx/hiding_test.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: hiding_test.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: hiding_test.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/htree.vspx b/binsrc/vspx/htree.vspx
index 9e62c31..581e21c 100644
--- a/binsrc/vspx/htree.vspx
+++ b/binsrc/vspx/htree.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: htree.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: htree.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/index.vsp b/binsrc/vspx/index.vsp
index 8448f59..abac866 100644
--- a/binsrc/vspx/index.vsp
+++ b/binsrc/vspx/index.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: index.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: index.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/isql_control.vspx b/binsrc/vspx/isql_control.vspx
index 88db1d3..8db5f8c 100644
--- a/binsrc/vspx/isql_control.vspx
+++ b/binsrc/vspx/isql_control.vspx
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: isql_control.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: isql_control.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/label.vspx b/binsrc/vspx/label.vspx
index 239819b..1474575 100644
--- a/binsrc/vspx/label.vspx
+++ b/binsrc/vspx/label.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: label.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: label.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/login.vspx b/binsrc/vspx/login.vspx
index 44a5775..2c01237 100644
--- a/binsrc/vspx/login.vspx
+++ b/binsrc/vspx/login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login.vspx,v 1.3 2007/11/26 15:10:02 source Exp $
+ -  $Id: login.vspx,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/make_docs.sql b/binsrc/vspx/make_docs.sql
index df2a20c..a5d7bc9 100644
--- a/binsrc/vspx/make_docs.sql
+++ b/binsrc/vspx/make_docs.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: make_docs.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: make_docs.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/new_post_handler.vspx b/binsrc/vspx/new_post_handler.vspx
index 58f9000..599964b 100644
--- a/binsrc/vspx/new_post_handler.vspx
+++ b/binsrc/vspx/new_post_handler.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: new_post_handler.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: new_post_handler.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/new_tree.vspx b/binsrc/vspx/new_tree.vspx
index c753169..ad1488a 100644
--- a/binsrc/vspx/new_tree.vspx
+++ b/binsrc/vspx/new_tree.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: new_tree.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: new_tree.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/new_version_search.vspx b/binsrc/vspx/new_version_search.vspx
index ff5ffff..2050b07 100644
--- a/binsrc/vspx/new_version_search.vspx
+++ b/binsrc/vspx/new_version_search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: new_version_search.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: new_version_search.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/products.vspx b/binsrc/vspx/products.vspx
index e90da51..d817a73 100644
--- a/binsrc/vspx/products.vspx
+++ b/binsrc/vspx/products.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -  
- -  $Id: products.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: products.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/radio.vspx b/binsrc/vspx/radio.vspx
index aef56e4..8ee676e 100644
--- a/binsrc/vspx/radio.vspx
+++ b/binsrc/vspx/radio.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: radio.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/radio_group.vspx b/binsrc/vspx/radio_group.vspx
index 5450a5f..9b69b4b 100644
--- a/binsrc/vspx/radio_group.vspx
+++ b/binsrc/vspx/radio_group.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: radio_group.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/sample.vspx b/binsrc/vspx/sample.vspx
index fc735cc..39ba1a6 100644
--- a/binsrc/vspx/sample.vspx
+++ b/binsrc/vspx/sample.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sample.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: sample.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/search.vspx b/binsrc/vspx/search.vspx
index df3decb..1fbeadc 100644
--- a/binsrc/vspx/search.vspx
+++ b/binsrc/vspx/search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: search.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: search.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/search_login.vspx b/binsrc/vspx/search_login.vspx
index 12a9731..2ba036a 100644
--- a/binsrc/vspx/search_login.vspx
+++ b/binsrc/vspx/search_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: search_login.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: search_login.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/sel_category.vspx b/binsrc/vspx/sel_category.vspx
index cc661a9..49d7c20 100644
--- a/binsrc/vspx/sel_category.vspx
+++ b/binsrc/vspx/sel_category.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: sel_category.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: sel_category.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/sel_datagrid.vspx b/binsrc/vspx/sel_datagrid.vspx
index 84874ff..fda4070 100644
--- a/binsrc/vspx/sel_datagrid.vspx
+++ b/binsrc/vspx/sel_datagrid.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sel_datagrid.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: sel_datagrid.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/sel_select.vspx b/binsrc/vspx/sel_select.vspx
index d634f21..d71f84b 100644
--- a/binsrc/vspx/sel_select.vspx
+++ b/binsrc/vspx/sel_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: sel_select.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: sel_select.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/select.vspx b/binsrc/vspx/select.vspx
index e5b604d..c6cd683 100644
--- a/binsrc/vspx/select.vspx
+++ b/binsrc/vspx/select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: select.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: select.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/show_params.vspx b/binsrc/vspx/show_params.vspx
index cb5f463..d1dc932 100644
--- a/binsrc/vspx/show_params.vspx
+++ b/binsrc/vspx/show_params.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: show_params.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: show_params.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/suite/filter.awk b/binsrc/vspx/suite/filter.awk
index 8841130..dcd3b68 100644
--- a/binsrc/vspx/suite/filter.awk
+++ b/binsrc/vspx/suite/filter.awk
@@ -3,7 +3,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/suite/run_tests.sh b/binsrc/vspx/suite/run_tests.sh
index a7c285e..fc01baa 100755
--- a/binsrc/vspx/suite/run_tests.sh
+++ b/binsrc/vspx/suite/run_tests.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: run_tests.sh,v 1.3 2009/04/14 12:16:49 source Exp $
+#  $Id: run_tests.sh,v 1.3.2.1 2012/03/08 12:55:23 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/suite/vspx_suite.sh b/binsrc/vspx/suite/vspx_suite.sh
index 6e1c065..2ece310 100755
--- a/binsrc/vspx/suite/vspx_suite.sh
+++ b/binsrc/vspx/suite/vspx_suite.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: vspx_suite.sh,v 1.4 2009/04/14 12:16:49 source Exp $
+#  $Id: vspx_suite.sh,v 1.4.2.1 2012/03/08 12:55:23 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/tab.vspx b/binsrc/vspx/tab.vspx
index 671e4fa..5fd430a 100644
--- a/binsrc/vspx/tab.vspx
+++ b/binsrc/vspx/tab.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tab.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: tab.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/tab_custom.vspx b/binsrc/vspx/tab_custom.vspx
index 79e7966..8ff112c 100644
--- a/binsrc/vspx/tab_custom.vspx
+++ b/binsrc/vspx/tab_custom.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab_custom.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: tab_custom.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/text.vspx b/binsrc/vspx/text.vspx
index 1b67f3a..6280c74 100644
--- a/binsrc/vspx/text.vspx
+++ b/binsrc/vspx/text.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: text.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: text.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/textarea.vspx b/binsrc/vspx/textarea.vspx
index 4c53ad8..9a27918 100644
--- a/binsrc/vspx/textarea.vspx
+++ b/binsrc/vspx/textarea.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: textarea.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: textarea.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/tree.vspx b/binsrc/vspx/tree.vspx
index 0923d95..d0bf09a 100644
--- a/binsrc/vspx/tree.vspx
+++ b/binsrc/vspx/tree.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: tree.vspx,v 1.3 2007/08/03 13:29:58 source Exp $
+ -  $Id: tree.vspx,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/two_browse_buttons.vspx b/binsrc/vspx/two_browse_buttons.vspx
index 9d23f2c..2a1a3b9 100644
--- a/binsrc/vspx/two_browse_buttons.vspx
+++ b/binsrc/vspx/two_browse_buttons.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: two_browse_buttons.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: two_browse_buttons.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/update_form.vspx b/binsrc/vspx/update_form.vspx
index a90007b..c4e8ca3 100644
--- a/binsrc/vspx/update_form.vspx
+++ b/binsrc/vspx/update_form.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: update_form.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: update_form.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/update_radio.vspx b/binsrc/vspx/update_radio.vspx
index e0b109a..4691ec1 100644
--- a/binsrc/vspx/update_radio.vspx
+++ b/binsrc/vspx/update_radio.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: update_radio.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: update_radio.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/var.vspx b/binsrc/vspx/var.vspx
index aabde00..a21289c 100644
--- a/binsrc/vspx/var.vspx
+++ b/binsrc/vspx/var.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: var.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: var.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vdir.vspx b/binsrc/vspx/vdir.vspx
index a80319c..ad49552 100644
--- a/binsrc/vspx/vdir.vspx
+++ b/binsrc/vspx/vdir.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vdir.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: vdir.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vdir_browser.vspx b/binsrc/vspx/vdir_browser.vspx
index 0d5a313..fbcf9fb 100644
--- a/binsrc/vspx/vdir_browser.vspx
+++ b/binsrc/vspx/vdir_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdir_browser.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: vdir_browser.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vdir_helper.sql b/binsrc/vspx/vdir_helper.sql
index 5c26480..6c4c892 100644
--- a/binsrc/vspx/vdir_helper.sql
+++ b/binsrc/vspx/vdir_helper.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vdir_helper.sql,v 1.3 2008/07/11 11:47:29 source Exp $
+--  $Id: vdir_helper.sql,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx.sql b/binsrc/vspx/vspx.sql
index 39b4d14..09f189a 100644
--- a/binsrc/vspx/vspx.sql
+++ b/binsrc/vspx/vspx.sql
@@ -2,14 +2,14 @@
 --
 --  vspx.vsp
 --
---  $Id: vspx.sql,v 1.12.2.4 2011/03/23 12:05:58 source Exp $
+--  $Id: vspx.sql,v 1.12.2.8 2012/03/08 12:55:22 source Exp $
 --
 --  Virtuoso VSPX core componets classes
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -2116,7 +2116,7 @@ text_split_complete:
   declare i int;
   i := 0;
   while( i < length(parsed_text) ) {
-    aset(parsed_text, i, trim(parsed_text[i], '\r\n ') );
+    --aset(parsed_text, i, trim(parsed_text[i], '\r\n ') );
     err_sqlstate := '00000'; err_msg := '';
    -- dbg_obj_print('self.isql_explain',self.isql_explain);
     result := null;
@@ -2272,8 +2272,12 @@ vspx_result_row_render (in result any, in m_dta any, in inx int := 0, in cset va
 	    }
 	  else
 	    {
+	      declare res any; 
+	      res := 0;
 	      if (__tag (res_col) = 182 and cset is not null)
-		res_col := charset_recode (res_col, cset, '_WIDE_');
+		res := charset_recode (res_col, cset, '_WIDE_');
+              if (res <> 0)
+	        res_col := res;		
 	      http_value (coalesce (res_col, '<DB NULL>'));
 	    }
 	  next:
@@ -6323,12 +6327,15 @@ create procedure DB.DBA.sys_save_http_history(in vdir any, in vres any)
   name := replace (name, ':', '_');
   name := replace (name, '/', '_');
   name := replace (name, '.', '_');
+  name := replace (name, '&', '_');
   -- collect HTTP header block
   content := http_full_request (0);
   if (registry_get ('__save_http_history_on_disk') = '1')
     {
       if (file_stat ('./sys_http_recording') = 0)
 	signal ('VSPX9', 'Can not upload resource into sys_http_recording/ directory');
+      if (length (name) > 200)
+	name := subseq (name, 0, 200);
       string_to_file ('./sys_http_recording/' || name, content, -2);
     }
   else
diff --git a/binsrc/vspx/vspx.xsd b/binsrc/vspx/vspx.xsd
index 55834a3..adfb8a2 100644
--- a/binsrc/vspx/vspx.xsd
+++ b/binsrc/vspx/vspx.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx.xsl b/binsrc/vspx/vspx.xsl
index 97ec5b8..c28010f 100644
--- a/binsrc/vspx/vspx.xsl
+++ b/binsrc/vspx/vspx.xsl
@@ -4,12 +4,12 @@
 ]>
 <!--
  -  
- -  $Id: vspx.xsl,v 1.7 2008/03/13 13:52:04 source Exp $
+ -  $Id: vspx.xsl,v 1.7.2.2 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -3151,7 +3151,7 @@ toggle_label:
       while (inx < len) {
         declare ctrl vspx_control;
         ctrl := node.vc_children[inx];
-        if (ctrl and udt_instance_of (ctrl, fix_identifier_case ('vspx_button'))) {
+        if (ctrl is not null and udt_instance_of (ctrl, fix_identifier_case ('vspx_button'))) {
           declare btn vspx_button;
           btn := node.vc_children[inx];
           btn.bt_open_img := sel_img;
diff --git a/binsrc/vspx/vspx4xsd.sh b/binsrc/vspx/vspx4xsd.sh
index a374112..397198d 100755
--- a/binsrc/vspx/vspx4xsd.sh
+++ b/binsrc/vspx/vspx4xsd.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: vspx4xsd.sh,v 1.3 2009/04/14 12:16:49 source Exp $
+#  $Id: vspx4xsd.sh,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
 #  
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_add_locations.xsl b/binsrc/vspx/vspx_add_locations.xsl
index a318c0d..957a94d 100644
--- a/binsrc/vspx/vspx_add_locations.xsl
+++ b/binsrc/vspx/vspx_add_locations.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vspx_add_locations.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vspx_add_locations.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_demo_init.sql b/binsrc/vspx/vspx_demo_init.sql
index 93ec22d..a5457b9 100644
--- a/binsrc/vspx/vspx_demo_init.sql
+++ b/binsrc/vspx/vspx_demo_init.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vspx_demo_init.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: vspx_demo_init.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_expand.xsl b/binsrc/vspx/vspx_expand.xsl
index 934c16b..eebfffd 100644
--- a/binsrc/vspx/vspx_expand.xsl
+++ b/binsrc/vspx/vspx_expand.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vspx_expand.xsl,v 1.3 2006/08/15 22:09:21 source Exp $
+ -  $Id: vspx_expand.xsl,v 1.3.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_log_format.xsl b/binsrc/vspx/vspx_log_format.xsl
index ad493ad..3b35447 100644
--- a/binsrc/vspx/vspx_log_format.xsl
+++ b/binsrc/vspx/vspx_log_format.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vspx_log_format.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vspx_log_format.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_pre_sql.xsl b/binsrc/vspx/vspx_pre_sql.xsl
index 312969f..120d839 100644
--- a/binsrc/vspx/vspx_pre_sql.xsl
+++ b/binsrc/vspx/vspx_pre_sql.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vspx_pre_sql.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vspx_pre_sql.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_pre_xsd.xsl b/binsrc/vspx/vspx_pre_xsd.xsl
index b179ab7..3340dc6 100644
--- a/binsrc/vspx/vspx_pre_xsd.xsl
+++ b/binsrc/vspx/vspx_pre_xsd.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vspx_pre_xsd.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vspx_pre_xsd.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_reload.sql b/binsrc/vspx/vspx_reload.sql
index 27fdfca..b6e1b12 100644
--- a/binsrc/vspx/vspx_reload.sql
+++ b/binsrc/vspx/vspx_reload.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vspx_reload.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: vspx_reload.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_vhost.sql b/binsrc/vspx/vspx_vhost.sql
index 1999e39..24f886f 100644
--- a/binsrc/vspx/vspx_vhost.sql
+++ b/binsrc/vspx/vspx_vhost.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vspx_vhost.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: vspx_vhost.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspx_wizards.sql b/binsrc/vspx/vspx_wizards.sql
index 7367e7c..dfe5e25 100644
--- a/binsrc/vspx/vspx_wizards.sql
+++ b/binsrc/vspx/vspx_wizards.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: vspx_wizards.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: vspx_wizards.sql,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspxmeta.xml b/binsrc/vspx/vspxmeta.xml
index 9f25193..daec316 100644
--- a/binsrc/vspx/vspxmeta.xml
+++ b/binsrc/vspx/vspxmeta.xml
@@ -671,12 +671,12 @@ as ( vc_stub any ) temporary self as ref
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -722,12 +722,12 @@ placed into the resulting HTML with no changes.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -778,12 +778,12 @@ The form accepts two numbers and calculates their sum.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__2.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__2.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -835,12 +835,12 @@ The form allows to select a file from server's file system
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__3.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__3.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -888,12 +888,12 @@ The form allows to select a two values from a different page
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__4.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__4.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -943,12 +943,12 @@ The form returns back to caller form two walues from a text box and select list
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: calendar__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: calendar__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1036,12 +1036,12 @@ This demo will show a calendar allowing to list dates by months
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: check_box__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: check_box__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1086,12 +1086,12 @@ Depending on the state of the checkbox, the submitted value is either 'checked'
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: code_file__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: code_file__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1161,12 +1161,12 @@ create method button_change (inout control vspx_button) for my_page_subclass
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_grid__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_grid__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1266,12 +1266,12 @@ Allows editing, addtion and removal of existing records.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1313,12 +1313,12 @@ with a option values their customer IDs.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1360,12 +1360,12 @@ with a option values their customer IDs.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1466,12 +1466,12 @@ Allows editing, addtion and removal of existing records.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1537,12 +1537,12 @@ Allows scrolling only of existing records.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_source__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_source__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1606,12 +1606,12 @@ Allows to show different columns : name and phone.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1666,12 +1666,12 @@ in the place specified by v:error-summary element.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1727,12 +1727,12 @@ in the place specified by v:error-summary element depending of a match attribute
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1779,12 +1779,12 @@ The OK button of the form submits data from the form back to the same page.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1847,12 +1847,12 @@ the check-box is validated against ragio group
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: include__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: include__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1897,12 +1897,12 @@ then the resulting page will have additional paragraph at the end.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: label__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: label__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1944,12 +1944,12 @@ This page demonstrates output of data values of various types.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: login__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2003,12 +2003,12 @@ a simple post counter.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: login_form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login_form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2055,12 +2055,12 @@ This example will render just a login form
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: page__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: page__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2100,12 +2100,12 @@ It does not even print traditional 'Hello world' phrase.</p>
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2166,12 +2166,12 @@ The form contains two groups of radio buttons, three button in each group.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_group__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2215,12 +2215,12 @@ The form contains a groups of radio buttons, grouped with radio-group control.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: select_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: select_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2269,12 +2269,12 @@ The form of the sample page contains a list of three items.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tab__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2318,12 +2318,12 @@ The sample page contains three templates; only one of three is shown and user ca
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: text__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: text__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2368,12 +2368,12 @@ The form contains text input control with 'Hello' string inside. User can edit t
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: text_area__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: text_area__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2420,12 +2420,12 @@ data are posted back to the same URI so the page is instantiated again.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: tree__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tree__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2479,12 +2479,12 @@ data are posted back to the same URI so the page is instantiated again.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: url__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: url__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2524,12 +2524,12 @@ This draws an anchor in browser screen.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: validator__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: validator__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2580,12 +2580,12 @@ by adding 'error-glyph' attribute to the v:textarea.)
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: variable__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: variable__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2631,12 +2631,12 @@ The v:variable element defines a new member of page class and hance we can acces
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2692,12 +2692,12 @@ as a child of outer page.
 <![CDATA[<?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2752,7 +2752,7 @@ This page is used inside vscx__0.vspx one as a custom control.
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/vspxmeta2doc.xsl b/binsrc/vspx/vspxmeta2doc.xsl
index 81d74d5..ab0053a 100644
--- a/binsrc/vspx/vspxmeta2doc.xsl
+++ b/binsrc/vspx/vspxmeta2doc.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -  
- -  $Id: vspxmeta2doc.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: vspxmeta2doc.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xb_checkbox.vspx b/binsrc/vspx/xb_checkbox.vspx
index 08f0839..f8a3ad2 100644
--- a/binsrc/vspx/xb_checkbox.vspx
+++ b/binsrc/vspx/xb_checkbox.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xb_checkbox.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: xb_checkbox.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xb_orderby.vspx b/binsrc/vspx/xb_orderby.vspx
index c47850f..fe131c8 100644
--- a/binsrc/vspx/xb_orderby.vspx
+++ b/binsrc/vspx/xb_orderby.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xb_orderby.vspx,v 1.2 2006/08/16 00:04:14 source Exp $
+ -  $Id: xb_orderby.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -  
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xb_orderby_e.vspx b/binsrc/vspx/xb_orderby_e.vspx
index adee034..fbed460 100644
--- a/binsrc/vspx/xb_orderby_e.vspx
+++ b/binsrc/vspx/xb_orderby_e.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xb_orderby_e.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: xb_orderby_e.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xform.vspx b/binsrc/vspx/xform.vspx
index 0f10558..a393adc 100644
--- a/binsrc/vspx/xform.vspx
+++ b/binsrc/vspx/xform.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xform.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: xform.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xmldataset.vspx b/binsrc/vspx/xmldataset.vspx
index 1e4f6c5..24c9e11 100644
--- a/binsrc/vspx/xmldataset.vspx
+++ b/binsrc/vspx/xmldataset.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: xmldataset.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: xmldataset.vspx,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xsd2doc.xsl b/binsrc/vspx/xsd2doc.xsl
index 81996c1..28938d6 100644
--- a/binsrc/vspx/xsd2doc.xsl
+++ b/binsrc/vspx/xsd2doc.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: xsd2doc.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xsd2doc.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xsd2vspx.vsp b/binsrc/vspx/xsd2vspx.vsp
index adb2776..7d94e39 100644
--- a/binsrc/vspx/xsd2vspx.vsp
+++ b/binsrc/vspx/xsd2vspx.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: xsd2vspx.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: xsd2vspx.vsp,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/vspx/xsd2vspx.xsl b/binsrc/vspx/xsd2vspx.xsl
index 8d09439..7bde343 100644
--- a/binsrc/vspx/xsd2vspx.xsl
+++ b/binsrc/vspx/xsd2vspx.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: xsd2vspx.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xsd2vspx.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/Makefile.am b/binsrc/ws/Makefile.am
index ab0d0ac..acab47c 100644
--- a/binsrc/ws/Makefile.am
+++ b/binsrc/ws/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/Makefile.in b/binsrc/ws/Makefile.in
index 1f7cf6d..338d2fc 100644
--- a/binsrc/ws/Makefile.in
+++ b/binsrc/ws/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -139,6 +139,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -187,6 +188,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -238,6 +240,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -284,7 +287,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/ws/wsrm/Makefile.am b/binsrc/ws/wsrm/Makefile.am
index 2170a17..99114f1 100644
--- a/binsrc/ws/wsrm/Makefile.am
+++ b/binsrc/ws/wsrm/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/Makefile.in b/binsrc/ws/wsrm/Makefile.in
index b40d097..4318f31 100644
--- a/binsrc/ws/wsrm/Makefile.in
+++ b/binsrc/ws/wsrm/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/ws/wsrm/orabpel.xsd b/binsrc/ws/wsrm/orabpel.xsd
index 4bada7c..95cd857 100644
--- a/binsrc/ws/wsrm/orabpel.xsd
+++ b/binsrc/ws/wsrm/orabpel.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/utility.xsd b/binsrc/ws/wsrm/utility.xsd
index 2116af0..3f5c029 100644
--- a/binsrc/ws/wsrm/utility.xsd
+++ b/binsrc/ws/wsrm/utility.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/utility200306.xsd b/binsrc/ws/wsrm/utility200306.xsd
index 49d8b90..d924107 100644
--- a/binsrc/ws/wsrm/utility200306.xsd
+++ b/binsrc/ws/wsrm/utility200306.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsa.xsd b/binsrc/ws/wsrm/wsa.xsd
index d27e1eb..0f31936 100644
--- a/binsrc/ws/wsrm/wsa.xsd
+++ b/binsrc/ws/wsrm/wsa.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsa200403.xsd b/binsrc/ws/wsrm/wsa200403.xsd
index 88e49c2..054d4e0 100644
--- a/binsrc/ws/wsrm/wsa200403.xsd
+++ b/binsrc/ws/wsrm/wsa200403.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsp.xsd b/binsrc/ws/wsrm/wsp.xsd
index f6d3c08..3f16d69 100644
--- a/binsrc/ws/wsrm/wsp.xsd
+++ b/binsrc/ws/wsrm/wsp.xsd
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsrm.xsd b/binsrc/ws/wsrm/wsrm.xsd
index 2506fb8..e5e156f 100644
--- a/binsrc/ws/wsrm/wsrm.xsd
+++ b/binsrc/ws/wsrm/wsrm.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsrm_ddl.sql b/binsrc/ws/wsrm/wsrm_ddl.sql
index 58cafd1..265b53b 100644
--- a/binsrc/ws/wsrm/wsrm_ddl.sql
+++ b/binsrc/ws/wsrm/wsrm_ddl.sql
@@ -1,10 +1,10 @@
 --
---  $Id: wsrm_ddl.sql,v 1.4 2008/04/15 10:57:01 source Exp $
+--  $Id: wsrm_ddl.sql,v 1.4.2.1 2012/03/08 12:55:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsrmcall.xsl b/binsrc/ws/wsrm/wsrmcall.xsl
index 1ea9152..dfc5312 100644
--- a/binsrc/ws/wsrm/wsrmcall.xsl
+++ b/binsrc/ws/wsrm/wsrmcall.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: wsrmcall.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: wsrmcall.xsl,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsrmcli.sql b/binsrc/ws/wsrm/wsrmcli.sql
index 558ba66..fa25c91 100644
--- a/binsrc/ws/wsrm/wsrmcli.sql
+++ b/binsrc/ws/wsrm/wsrmcli.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wsrmcli.sql,v 1.4 2008/04/18 14:03:30 source Exp $
+--  $Id: wsrmcli.sql,v 1.4.2.1 2012/03/08 12:55:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wsrmsrv.sql b/binsrc/ws/wsrm/wsrmsrv.sql
index 49d6e16..1adbc06 100644
--- a/binsrc/ws/wsrm/wsrmsrv.sql
+++ b/binsrc/ws/wsrm/wsrmsrv.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wsrmsrv.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: wsrmsrv.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wss.xsd b/binsrc/ws/wsrm/wss.xsd
index f93e688..b00255c 100644
--- a/binsrc/ws/wsrm/wss.xsd
+++ b/binsrc/ws/wsrm/wss.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/wss0212.xsd b/binsrc/ws/wsrm/wss0212.xsd
index 76d4f55..91ec29a 100644
--- a/binsrc/ws/wsrm/wss0212.xsd
+++ b/binsrc/ws/wsrm/wss0212.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wsrm/xsd2sql.awk b/binsrc/ws/wsrm/xsd2sql.awk
index 074a30d..4bba030 100644
--- a/binsrc/ws/wsrm/xsd2sql.awk
+++ b/binsrc/ws/wsrm/xsd2sql.awk
@@ -3,7 +3,7 @@ BEGIN {
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -54,7 +54,7 @@ BEGIN {
       print "  ses := string_output ();"
     }
   str = $0
-  gsub ( /\\/, "\\\\", str)
+  gsub ( "\\\\", "&&", str)
   gsub ( /'/, "\\'", str)
 
   #
diff --git a/binsrc/ws/wstr/wstr_ddl.sql b/binsrc/ws/wstr/wstr_ddl.sql
index f0e57d0..5169c5a 100644
--- a/binsrc/ws/wstr/wstr_ddl.sql
+++ b/binsrc/ws/wstr/wstr_ddl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wstr_ddl.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: wstr_ddl.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wstr/wstrcli.sql b/binsrc/ws/wstr/wstrcli.sql
index 5918c7c..055f2ed 100644
--- a/binsrc/ws/wstr/wstrcli.sql
+++ b/binsrc/ws/wstr/wstrcli.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wstrcli.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: wstrcli.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/ws/wstr/wstrsrv.sql b/binsrc/ws/wstr/wstrsrv.sql
index e2a4823..5596474 100644
--- a/binsrc/ws/wstr/wstrsrv.sql
+++ b/binsrc/ws/wstr/wstrsrv.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wstrsrv.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: wstrsrv.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/Makefile.am b/binsrc/xddl/Makefile.am
index 5226eb7..ee24268 100644
--- a/binsrc/xddl/Makefile.am
+++ b/binsrc/xddl/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/Makefile.in b/binsrc/xddl/Makefile.in
index a229253..4bb184e 100644
--- a/binsrc/xddl/Makefile.in
+++ b/binsrc/xddl/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/xddl/demo.xml b/binsrc/xddl/demo.xml
index a2fae2b..50b85f0 100644
--- a/binsrc/xddl/demo.xml
+++ b/binsrc/xddl/demo.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/fragment.xml b/binsrc/xddl/fragment.xml
index 2976a83..c38fffa 100644
--- a/binsrc/xddl/fragment.xml
+++ b/binsrc/xddl/fragment.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/test.vsp b/binsrc/xddl/test.vsp
index f12d3a6..889a90e 100644
--- a/binsrc/xddl/test.vsp
+++ b/binsrc/xddl/test.vsp
@@ -1,11 +1,11 @@
 <?vsp 
 --  
---  $Id: test.vsp,v 1.2 2006/08/15 19:30:36 source Exp $
+--  $Id: test.vsp,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl.sql b/binsrc/xddl/xddl.sql
index 976e53a..515b049 100644
--- a/binsrc/xddl/xddl.sql
+++ b/binsrc/xddl/xddl.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xddl.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: xddl.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl.xsd b/binsrc/xddl/xddl.xsd
index 1205a36..32d6d3e 100644
--- a/binsrc/xddl/xddl.xsd
+++ b/binsrc/xddl/xddl.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_dav.sql b/binsrc/xddl/xddl_dav.sql
index 85cc09f..d2ad970 100644
--- a/binsrc/xddl/xddl_dav.sql
+++ b/binsrc/xddl/xddl_dav.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xddl_dav.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: xddl_dav.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_diff.xsl b/binsrc/xddl/xddl_diff.xsl
index 292ae84..8920777 100644
--- a/binsrc/xddl/xddl_diff.xsl
+++ b/binsrc/xddl/xddl_diff.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: xddl_diff.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xddl_diff.xsl,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_exec.xsl b/binsrc/xddl/xddl_exec.xsl
index abf7036..4205799 100644
--- a/binsrc/xddl/xddl_exec.xsl
+++ b/binsrc/xddl/xddl_exec.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: xddl_exec.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: xddl_exec.xsl,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_filesystem.sql b/binsrc/xddl/xddl_filesystem.sql
index 454db00..60ad3c9 100644
--- a/binsrc/xddl/xddl_filesystem.sql
+++ b/binsrc/xddl/xddl_filesystem.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: xddl_filesystem.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: xddl_filesystem.sql,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_procs.xsd b/binsrc/xddl/xddl_procs.xsd
index 52dfdcb..2a14a9b 100644
--- a/binsrc/xddl/xddl_procs.xsd
+++ b/binsrc/xddl/xddl_procs.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_tables.xsd b/binsrc/xddl/xddl_tables.xsd
index d84a506..1892c76 100644
--- a/binsrc/xddl/xddl_tables.xsd
+++ b/binsrc/xddl/xddl_tables.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/xddl/xddl_views.xsd b/binsrc/xddl/xddl_views.xsd
index 0bd030e..aa24b72 100644
--- a/binsrc/xddl/xddl_views.xsd
+++ b/binsrc/xddl/xddl_views.xsd
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/Makefile.am b/binsrc/yacutia/Makefile.am
index 6dba70c..4e76478 100644
--- a/binsrc/yacutia/Makefile.am
+++ b/binsrc/yacutia/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/Makefile.in b/binsrc/yacutia/Makefile.in
index 065c3a0..6a9f657 100644
--- a/binsrc/yacutia/Makefile.in
+++ b/binsrc/yacutia/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -126,6 +126,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -174,6 +175,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -225,6 +227,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -271,7 +274,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/binsrc/yacutia/account_create.vspx b/binsrc/yacutia/account_create.vspx
index 09e22eb..0faddbd 100644
--- a/binsrc/yacutia/account_create.vspx
+++ b/binsrc/yacutia/account_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: account_create.vspx,v 1.8.2.8 2010/09/20 10:16:34 source Exp $
+ -  $Id: account_create.vspx,v 1.8.2.11 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -68,6 +68,11 @@
       </h1>
     </vm:rawheader>
     <vm:pagebody>
+	<v:on-init>
+	    <![CDATA[
+	    set http_charset='utf-8';
+	    ]]>
+	</v:on-init>
 	<vm:help id="account_create" sect=""/>
 	<script tyep="text/javascript"><![CDATA[
       function onExitUserName()
@@ -279,7 +284,8 @@
                   <table class="tab_page">
                     <tr>
                       <td valign="top">
-			  <v:form name="account_form" type="simple" method="POST" action="" xhtml_enctype="multipart/form-data">
+			  <v:form name="account_form" type="simple" method="POST" action="" 
+			      xhtml_enctype="multipart/form-data" xhtml_accept-charset="UTF-8">
       <table class="main_page_area" style="valign: top">
         <tr valign="top">
           <td>
@@ -826,7 +832,7 @@
                 <v:script>
                   <![CDATA[
   declare i, cnt, exist, u_ident, g_name  integer;
-  declare tmp, val, user_name, user_pwd, e_mail, os_name, os_password, user_perm, user_home varchar;
+  declare tmp, val, user_name, user_pwd, user_pwd2, e_mail, os_name, os_password, user_perm, user_home varchar;
   declare attr any;
   declare st, msg varchar;
   declare webid varchar;
@@ -846,13 +852,14 @@
 
   attr := vector();
   user_name:= self.t_login_name.ufl_value;
-  user_pwd:=  self.t_user_password.ufl_value;
+  user_pwd :=  charset_recode (self.t_user_password.ufl_value, 'UTF-8', '_WIDE_');
+  user_pwd2 :=  charset_recode (self.t_user_password_conf.ufl_value, 'UTF-8', '_WIDE_');
   os_name :=  self.t_os_name.ufl_value;
   e_mail := self.t_e_mail.ufl_value;
 
   os_password :=  self.t_os_password.ufl_value;
 
-  if (user_pwd <> self.t_user_password_conf.ufl_value)
+  if (user_pwd <> user_pwd2)
     {
       control.vc_parent.vc_error_message := 'Passwords mismatch';
       self.vc_is_valid := 0;
@@ -975,8 +982,8 @@
 	      {
                 USER_SET_OPTION (user_name, 'DISABLED', case when self.cb_user_enable.ufl_selected=0 then 1 else 0 end );
 	        USER_SET_OPTION (user_name, 'SQL_ENABLE', case when self.sel_user_type.ufl_value = '0' or self.sel_user_type.ufl_value = '2' then 1 else 0 end);
+                USER_SET_OPTION (user_name, 'DAV_ENABLE',  case when self.sel_user_type.ufl_value = '1' or self.sel_user_type.ufl_value = '2' then 1 else 0 end);
 	      }
-            USER_SET_OPTION (user_name, 'DAV_ENABLE',  case when self.sel_user_type.ufl_value = '1' or self.sel_user_type.ufl_value = '2' then 1 else 0 end);
 	    USER_SET_OPTION (user_name, 'HOME', user_home);
 	    if (lower (self.u_dav_quota.ufl_value) = 'unlimited' or atoi (self.u_dav_quota.ufl_value) < 0)
 	      USER_SET_OPTION (user_name, 'DAVQuota', -1);
diff --git a/binsrc/yacutia/account_remove.vspx b/binsrc/yacutia/account_remove.vspx
index 6345b4a..c1c0ae7 100644
--- a/binsrc/yacutia/account_remove.vspx
+++ b/binsrc/yacutia/account_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: account_remove.vspx,v 1.2.2.2 2010/09/20 10:16:34 source Exp $
+ -  $Id: account_remove.vspx,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/account_remove_inc.vspx b/binsrc/yacutia/account_remove_inc.vspx
index 38e0759..bcf0ba7 100644
--- a/binsrc/yacutia/account_remove_inc.vspx
+++ b/binsrc/yacutia/account_remove_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: account_remove_inc.vspx,v 1.3.2.4 2010/09/20 10:16:34 source Exp $
+ -  $Id: account_remove_inc.vspx,v 1.3.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/accounts.vspx b/binsrc/yacutia/accounts.vspx
index 2b80fb2..eb2921e 100644
--- a/binsrc/yacutia/accounts.vspx
+++ b/binsrc/yacutia/accounts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: accounts.vspx,v 1.2.2.5 2011/01/25 14:21:43 source Exp $
+ -  $Id: accounts.vspx,v 1.2.2.6 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/accounts_page.vspx b/binsrc/yacutia/accounts_page.vspx
index 117b6d7..e558912 100644
--- a/binsrc/yacutia/accounts_page.vspx
+++ b/binsrc/yacutia/accounts_page.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: accounts_page.vspx,v 1.2.2.3 2010/09/20 10:16:34 source Exp $
+ -  $Id: accounts_page.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/adm_login.vspx b/binsrc/yacutia/adm_login.vspx
index ef5f8fa..04ccdee 100644
--- a/binsrc/yacutia/adm_login.vspx
+++ b/binsrc/yacutia/adm_login.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: adm_login.vspx,v 1.4.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: adm_login.vspx,v 1.4.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/adm_navigation_bar.vspx b/binsrc/yacutia/adm_navigation_bar.vspx
index 3010a46..7e77408 100644
--- a/binsrc/yacutia/adm_navigation_bar.vspx
+++ b/binsrc/yacutia/adm_navigation_bar.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso8859-1"?>
 <!--
  -
- -  $Id: adm_navigation_bar.vspx,v 1.2.2.3 2011/01/10 13:26:08 source Exp $
+ -  $Id: adm_navigation_bar.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/admin_utils.js b/binsrc/yacutia/admin_utils.js
index 33977cf..83b24b7 100644
--- a/binsrc/yacutia/admin_utils.js
+++ b/binsrc/yacutia/admin_utils.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/back_nav.vspx b/binsrc/yacutia/back_nav.vspx
index 216c9f7..8e6ab21 100644
--- a/binsrc/yacutia/back_nav.vspx
+++ b/binsrc/yacutia/back_nav.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: back_nav.vspx,v 1.2.2.2 2010/09/20 10:16:35 source Exp $
+ -  $Id: back_nav.vspx,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/bpel_service.vspx b/binsrc/yacutia/bpel_service.vspx
index 3ded631..217fc04 100644
--- a/binsrc/yacutia/bpel_service.vspx
+++ b/binsrc/yacutia/bpel_service.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: bpel_service.vspx,v 1.2.2.2 2010/09/20 10:16:35 source Exp $
+ -  $Id: bpel_service.vspx,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/capabilities.vspx b/binsrc/yacutia/capabilities.vspx
index 6aea8fb..839f6bf 100644
--- a/binsrc/yacutia/capabilities.vspx
+++ b/binsrc/yacutia/capabilities.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: capabilities.vspx,v 1.2.2.4 2011/01/10 13:26:08 source Exp $
+ -  $Id: capabilities.vspx,v 1.2.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/caps_browser.vspx b/binsrc/yacutia/caps_browser.vspx
index 1dae158..29f5656 100644
--- a/binsrc/yacutia/caps_browser.vspx
+++ b/binsrc/yacutia/caps_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: caps_browser.vspx,v 1.4.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: caps_browser.vspx,v 1.4.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/caps_cols_browser.vspx b/binsrc/yacutia/caps_cols_browser.vspx
index 98271c7..4f5c153 100644
--- a/binsrc/yacutia/caps_cols_browser.vspx
+++ b/binsrc/yacutia/caps_cols_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: caps_cols_browser.vspx,v 1.2.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: caps_cols_browser.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cond_common.js b/binsrc/yacutia/cond_common.js
index 8ce4fd4..4d404ba 100644
--- a/binsrc/yacutia/cond_common.js
+++ b/binsrc/yacutia/cond_common.js
@@ -1,12 +1,12 @@
 /*
- *  $Id: cond_common.js,v 1.1.1.1.2.3 2010/09/20 10:16:35 source Exp $
+ *  $Id: cond_common.js,v 1.1.1.1.2.4 2012/03/08 12:55:23 source Exp $
  *
  *  Common (Java/ECMA)Script utilities for Yacutia
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cond_help.css b/binsrc/yacutia/cond_help.css
index fd06ef3..1e07891 100644
--- a/binsrc/yacutia/cond_help.css
+++ b/binsrc/yacutia/cond_help.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: cond_help.css,v 1.2.2.2 2010/09/20 10:16:35 source Exp $
+ *  $Id: cond_help.css,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cond_help.html b/binsrc/yacutia/cond_help.html
index 1297169..228e391 100644
--- a/binsrc/yacutia/cond_help.html
+++ b/binsrc/yacutia/cond_help.html
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
  -
- -  $Id: cond_help.html,v 1.1.1.1.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: cond_help.html,v 1.1.1.1.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cond_help.js b/binsrc/yacutia/cond_help.js
index d80aa91..5709e24 100644
--- a/binsrc/yacutia/cond_help.js
+++ b/binsrc/yacutia/cond_help.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cond_help.xsl b/binsrc/yacutia/cond_help.xsl
index 07c12b3..12a715f 100644
--- a/binsrc/yacutia/cond_help.xsl
+++ b/binsrc/yacutia/cond_help.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -
- -  $Id: cond_help.xsl,v 1.2.2.2 2010/09/20 10:16:35 source Exp $
+ -  $Id: cond_help.xsl,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/conductor.list b/binsrc/yacutia/conductor.list
index e12a906..2adfc6b 100644
--- a/binsrc/yacutia/conductor.list
+++ b/binsrc/yacutia/conductor.list
@@ -9,7 +9,6 @@ conductor/account_remove_inc.vspx
 conductor/account_remove.vspx
 conductor/accounts_page.vspx
 conductor/accounts.vspx
-conductor/admin_dav_browser.sql
 conductor/admin_utils.js
 conductor/adm_login.vspx
 conductor/adm_navigation_bar.vspx
@@ -292,6 +291,9 @@ conductor/page.xsl
 conductor/persistent_xmlns.vspx
 conductor/popup2_browser.vspx
 conductor/popup_browser.vspx
+conductor/r2rml_gen.vspx
+conductor/r2rml_import.vspx
+conductor/r2rml_validate.vspx
 conductor/rdf_conf.vspx
 conductor/rdf_console.vspx
 conductor/rdf_filters_pp.vspx
@@ -313,7 +315,9 @@ conductor/role_remove_inc.vspx
 conductor/role_remove.vspx
 conductor/roles_inc.vspx
 conductor/roles.vspx
+conductor/sec_acl_edit_sp.vspx
 conductor/sec_acl_edit.vspx
+conductor/sec_auth_serv_sp.vspx
 conductor/sec_auth_serv.vspx
 conductor/sec_pki_1.vspx
 conductor/sec_pki_2_conf.vspx
diff --git a/binsrc/yacutia/cont_management.vspx b/binsrc/yacutia/cont_management.vspx
index 47d9564..2083964 100644
--- a/binsrc/yacutia/cont_management.vspx
+++ b/binsrc/yacutia/cont_management.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cont_management.vspx,v 1.2.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: cont_management.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cont_management_types.vspx b/binsrc/yacutia/cont_management_types.vspx
index bda6c3b..00ea345 100644
--- a/binsrc/yacutia/cont_management_types.vspx
+++ b/binsrc/yacutia/cont_management_types.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cont_management_types.vspx,v 1.2.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: cont_management_types.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cont_page.vspx b/binsrc/yacutia/cont_page.vspx
index 39d80e5..a93f288 100644
--- a/binsrc/yacutia/cont_page.vspx
+++ b/binsrc/yacutia/cont_page.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cont_page.vspx,v 1.2.2.3 2010/09/20 10:16:35 source Exp $
+ -  $Id: cont_page.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cont_type_edit.vspx b/binsrc/yacutia/cont_type_edit.vspx
index 48b8f81..b0bdc0e 100644
--- a/binsrc/yacutia/cont_type_edit.vspx
+++ b/binsrc/yacutia/cont_type_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cont_type_edit.vspx,v 1.2.2.3 2010/09/20 10:16:36 source Exp $
+ -  $Id: cont_type_edit.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/cont_type_remove.vspx b/binsrc/yacutia/cont_type_remove.vspx
index 16cb6fa..da905ea 100644
--- a/binsrc/yacutia/cont_type_remove.vspx
+++ b/binsrc/yacutia/cont_type_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: cont_type_remove.vspx,v 1.2.2.3 2010/09/20 10:16:36 source Exp $
+ -  $Id: cont_type_remove.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dashboard.vspx b/binsrc/yacutia/dashboard.vspx
index 6ec4eb1..17a6809 100644
--- a/binsrc/yacutia/dashboard.vspx
+++ b/binsrc/yacutia/dashboard.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: dashboard.vspx,v 1.2.2.2 2010/09/20 10:16:36 source Exp $
+ -  $Id: dashboard.vspx,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dashboard_item.vspx b/binsrc/yacutia/dashboard_item.vspx
index 585c661..9da6339 100644
--- a/binsrc/yacutia/dashboard_item.vspx
+++ b/binsrc/yacutia/dashboard_item.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: dashboard_item.vspx,v 1.2.2.2 2010/09/20 10:16:36 source Exp $
+ -  $Id: dashboard_item.vspx,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dashboard_item_show.vspx b/binsrc/yacutia/dashboard_item_show.vspx
index c444fa9..53794a4 100644
--- a/binsrc/yacutia/dashboard_item_show.vspx
+++ b/binsrc/yacutia/dashboard_item_show.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: dashboard_item_show.vspx,v 1.2.2.2 2010/09/20 10:16:36 source Exp $
+ -  $Id: dashboard_item_show.vspx,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dashboard_item_show.xsl b/binsrc/yacutia/dashboard_item_show.xsl
index 9879bcf..11e5ee9 100644
--- a/binsrc/yacutia/dashboard_item_show.xsl
+++ b/binsrc/yacutia/dashboard_item_show.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -
- -  $Id: dashboard_item_show.xsl,v 1.2.2.2 2010/09/20 10:16:36 source Exp $
+ -  $Id: dashboard_item_show.xsl,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases.vspx b/binsrc/yacutia/databases.vspx
index ec3f1d0..0b49a44 100644
--- a/binsrc/yacutia/databases.vspx
+++ b/binsrc/yacutia/databases.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases.vspx,v 1.7.2.4 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases.vspx,v 1.7.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_drop.vspx b/binsrc/yacutia/databases_drop.vspx
index 87e4fba..c1b56b7 100644
--- a/binsrc/yacutia/databases_drop.vspx
+++ b/binsrc/yacutia/databases_drop.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_drop.vspx,v 1.4.2.4 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases_drop.vspx,v 1.4.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_export.vspx b/binsrc/yacutia/databases_export.vspx
index e1c6cd8..ebeca55 100644
--- a/binsrc/yacutia/databases_export.vspx
+++ b/binsrc/yacutia/databases_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: databases_export.vspx,v 1.3.2.4 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases_export.vspx,v 1.3.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_grants.vspx b/binsrc/yacutia/databases_grants.vspx
index 4c94d11..31d77ae 100644
--- a/binsrc/yacutia/databases_grants.vspx
+++ b/binsrc/yacutia/databases_grants.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_grants.vspx,v 1.2.2.4 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases_grants.vspx,v 1.2.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_proc_edit.vspx b/binsrc/yacutia/databases_proc_edit.vspx
index 6cb41eb..3002531 100644
--- a/binsrc/yacutia/databases_proc_edit.vspx
+++ b/binsrc/yacutia/databases_proc_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_proc_edit.vspx,v 1.3.2.6 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases_proc_edit.vspx,v 1.3.2.7 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_table_constraints.vspx b/binsrc/yacutia/databases_table_constraints.vspx
index bf5f41a..876d67a 100644
--- a/binsrc/yacutia/databases_table_constraints.vspx
+++ b/binsrc/yacutia/databases_table_constraints.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_table_constraints.vspx,v 1.2.2.3 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases_table_constraints.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_table_edit.vspx b/binsrc/yacutia/databases_table_edit.vspx
index b9515e8..3d02501 100644
--- a/binsrc/yacutia/databases_table_edit.vspx
+++ b/binsrc/yacutia/databases_table_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_table_edit.vspx,v 1.4.2.4 2010/09/20 10:16:36 source Exp $
+ -  $Id: databases_table_edit.vspx,v 1.4.2.6 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -105,20 +105,31 @@
         </v:template>
         <v:template name="temp_table_exist" type="simple" enabled="-- case when (self.mode <> 'create') then 1 else 0 end">
           <v:form name="tab_navigation_form" type="simple" method="POST" action="databases_table_edit.vspx">
-            <table class="page_tab_row" align="left" border="0" cellspacing="0" cellpadding="5">
+            <table class="page_tab_row" align="left" border="0" cellspacing="0" cellpadding="6">
               <tr>
-                <td nowrap="nowrap">
+                <td width="10%" nowrap="nowrap">
+                  <v:button action="simple" name="tb_brw" value="Table Browse" style="url">
+                    <v:on-post><v:script><![CDATA[
+                      declare ex_q varchar;
+	     				        ex_q := construct_table_sql (self.name);
+				            
+                      http_request_status ('HTTP/1.1 302 Found');
+                      http_header (sprintf('Location: isql_main.vspx?sid=%s&realm=%s&load_sql=%s\r\n',self.sid ,self.realm, ex_q));
+                    
+                    ]]></v:script></v:on-post>
+                  </v:button>
+                </td>
+                <td width="10%" nowrap="nowrap">
                   <v:button action="simple" name="tb_def" value="Show Columns" style="url">
                     <v:on-post><v:script><![CDATA[ self.mode:='definition'; self.vc_data_bind(e);]]></v:script></v:on-post>
                   </v:button>
                 </td>
-                <td nowrap="nowrap">
+                <td width="10%" nowrap="nowrap">
                   <v:button action="simple" name="tb_sql" value="Show SQL" style="url">
                     <v:on-post><v:script><![CDATA[ self.mode:='sql'; self.vc_data_bind(e);]]></v:script></v:on-post>
                   </v:button>
                 </td>
-                <td nowrap="nowrap">
-
+                <td width="10%" nowrap="nowrap">
 		<v:button action="browse" name="tb_edit_ddl" value="Edit" style="url"
 		  selector="isql.vspx"
 		  child-window-options="scrollbars=yes, resizable=yes, menubar=no, height=630, width=800">
@@ -135,12 +146,12 @@
 		      ]]></v:before-render>
                   </v:button>
                 </td>
-                <td nowrap="nowrap">
+                <td width="10%" nowrap="nowrap">
                   <v:button action="simple" name="tb_indx" value="Edit Indexes" style="url">
                     <v:on-post><v:script><![CDATA[ self.mode:='indexes'; self.vc_data_bind(e);]]></v:script></v:on-post>
                   </v:button>
                 </td>
-                <td nowrap="nowrap">
+                <td width="10%" nowrap="nowrap">
                   <v:button action="simple" name="tb_trig" value="Edit Triggers" style="url">
                     <v:on-post><v:script><![CDATA[ self.mode:='triggers'; self.vc_data_bind(e);]]></v:script></v:on-post>
                   </v:button>
diff --git a/binsrc/yacutia/databases_udt_custom.vspx b/binsrc/yacutia/databases_udt_custom.vspx
index f97f123..672041f 100644
--- a/binsrc/yacutia/databases_udt_custom.vspx
+++ b/binsrc/yacutia/databases_udt_custom.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_udt_custom.vspx,v 1.3.2.3 2010/09/20 10:16:37 source Exp $
+ -  $Id: databases_udt_custom.vspx,v 1.3.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_udt_edit.vspx b/binsrc/yacutia/databases_udt_edit.vspx
index 6f5ece4..65b667c 100644
--- a/binsrc/yacutia/databases_udt_edit.vspx
+++ b/binsrc/yacutia/databases_udt_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_udt_edit.vspx,v 1.2.2.3 2010/09/20 10:16:37 source Exp $
+ -  $Id: databases_udt_edit.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/databases_view_edit.vspx b/binsrc/yacutia/databases_view_edit.vspx
index a5d49e2..a47a3bc 100644
--- a/binsrc/yacutia/databases_view_edit.vspx
+++ b/binsrc/yacutia/databases_view_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: databases_view_edit.vspx,v 1.2.2.3 2010/09/20 10:16:37 source Exp $
+ -  $Id: databases_view_edit.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dav_browser.css b/binsrc/yacutia/dav_browser.css
index ae0c1da..48daf89 100644
--- a/binsrc/yacutia/dav_browser.css
+++ b/binsrc/yacutia/dav_browser.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: dav_browser.css,v 1.2.2.2 2010/09/20 10:16:37 source Exp $
+ *  $Id: dav_browser.css,v 1.2.2.3 2012/03/08 12:55:23 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dav_browser.xsl b/binsrc/yacutia/dav_browser.xsl
index c5ff216..d20b0a9 100644
--- a/binsrc/yacutia/dav_browser.xsl
+++ b/binsrc/yacutia/dav_browser.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: dav_browser.xsl,v 1.17.2.15 2011/03/23 12:03:54 source Exp $
+ -  $Id: dav_browser.xsl,v 1.17.2.20 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -640,7 +640,7 @@ self.vc_data_bind (e);
                 </tr>
                 <v:template name="dav_template001" type="simple" enabled="-- equ(self.crfolder_mode, 1)">
                   <tr>
-                    <td>Folder name</td>
+                    <th>Folder name</th>
                     <td>
                       <v:text name="t_newfolder" value="--get_keyword('t_newfolder', self.vc_page.vc_event.ve_params, '')" format="%s"/>
                     </td>
@@ -661,7 +661,7 @@ self.vc_data_bind (e);
             		    <td>
             		      <v:select-list name="dst_sel" value="" default_value="dav" auto-submit="1">
                   			<v:item name="WebDAV" value="dav"/>
-                  			<v:item name="RDF Store" value="rdf"/>
+                    			<v:item name="Quad Store Store" value="rdf"/>
             		      </v:select-list>
             		    </td>
               		  </tr-->
@@ -713,13 +713,13 @@ self.vc_data_bind (e);
                     </v:template>
 		              </v:template>
                   <tr id="fi2">
-                    <td nowrap="nowrap">DAV Resource Name<span class="redstar">*</span></td>
+                    <th nowrap="nowrap">DAV Resource Name<span class="redstar">*</span></th>
                     <td>
                       <v:text name="resname" value="--get_keyword('resname', self.vc_page.vc_event.ve_params, '')"/>
                     </td>
                   </tr>
                   <tr id="fi3">
-                    <td nowrap="nowrap">MIME Type (blank for extension default)</td>
+                    <th nowrap="nowrap">MIME Type (blank for extension default)</th>
                     <td>
                       <div id="mime_cl"></div>
                       <script language="javascript">
@@ -739,7 +739,7 @@ self.vc_data_bind (e);
 		              </v:template>
                 <v:template name="dav_template00299" type="simple" enabled="-- equ(self.crfolder_mode, 299)">
                   <tr>
-                    <td>File Content</td>
+                    <th>File Content</th>
                     <td>
  			                <textarea id="dav_content" name="dav_content" style="width: 500px; height: 170px"><?vsp http (get_keyword ('dav_content', self.vc_page.vc_event.ve_params, '')); ?></textarea>
                     </td>
@@ -747,7 +747,7 @@ self.vc_data_bind (e);
                 </v:template>
 		            <v:template type="simple" name="sw3" condition="self.dst_sel.ufl_value <> 'rdf' or self.dst_sel.ufl_value is null">
                 <tr id="fi4">
-                  <td>Owner</td>
+                  <th>Owner</th>
                   <td>
                     <v:data-list name="t_folder_own"
                                  sql="select -1 as U_ID, '&lt;none&gt;' as U_NAME from WS.WS.SYS_DAV_USER where U_NAME = 'dav' union all select U_ID, U_NAME from WS.WS.SYS_DAV_USER" key-column="U_ID" value-column="U_NAME">
@@ -770,7 +770,7 @@ self.vc_data_bind (e);
                   </td>
                 </tr>
                 <tr id="fi5">
-                  <td>Group</td>
+                  <th>Group</th>
                   <td>
                     <v:data-list name="t_folder_grp" sql="select -1 as G_ID, '&lt;none&gt;' as G_NAME from WS.WS.SYS_DAV_GROUP where G_NAME = 'administrators' union all select G_ID, G_NAME from WS.WS.SYS_DAV_GROUP" key-column="G_ID" value-column="G_NAME">
                       <v:before-data-bind>
@@ -797,7 +797,7 @@ self.vc_data_bind (e);
                   <td> </td>
                 </tr>
                 <tr id="fi6">
-                  <td>Permissions</td>
+                  <th>Permissions</th>
                   <td>
                     <table class="ctl_grp">
                       <tr>
@@ -855,7 +855,7 @@ self.vc_data_bind (e);
                                 }
                                 for (i := 0; i < 9; i := i + 1)
                                 {
-                                  http(sprintf('<td CLASS="SubAction" align="center"><input type="checkbox" name="perm%i" %s></td>', i, aref(_perm_box, i)));
+                                  http(sprintf('<td class="SubAction" align="center"><input type="checkbox" name="perm%i" %s></td>', i, aref(_perm_box, i)));
                                 }
                               ?>
                             </tr>
@@ -866,20 +866,17 @@ self.vc_data_bind (e);
                   </td>
                 </tr>
                 <tr id="fi7">
-                  <td>Free Text Indexing</td>
+                  <th>Free Text Indexing</th>
                   <td>
                     <select name="idx">
                       <?vsp
                         declare _fidx, idx any;
                         declare i integer;
+
                         idx := get_keyword('idx', self.vc_page.vc_event.ve_params, 'N');
                         _fidx := vector('N', 'Off', 'T', 'Direct members', 'R', 'Recursively');
-                        i := 0;
-                        while (i < length(_fidx))
-                        {
+                        for (i := 0; i < length(_fidx); i := i + 2)
                           http(sprintf('<option value="%s" %s>%s</option>', _fidx[i], select_if(idx, _fidx[i]), _fidx[i+1]));
-                          i := i + 2;
-                        }
                       ?>
                     </select>
                   </td>
@@ -909,7 +906,7 @@ self.vc_data_bind (e);
                 <tr>
                   <th>Folder type</th>
                   <td>
-                    <select name="fdet">
+                    <select name="fdet" id="fdet" onchange="javascript: detChanged()">
                       <?vsp
 		                    {
                           declare _fidx any;
@@ -930,28 +927,29 @@ self.vc_data_bind (e);
                             'S3',               'Amazon S3',                     
 			    'DynaRes',          'Dynamic Resources'
 			    );
+                          if (isstring (DB.DBA.vad_check_version ('SyncML')))
+                            _fidx := vector_concat (_fidx, vector ('SyncML', 'SyncML Folder'));
+
                           for (i := 0; i < length (_fidx); i := i + 2)
-                          {
                             http (sprintf ('<option value="%s" %s>%s</option>', _fidx[i], select_if (_idx, _fidx[i]), _fidx[i+1]));
                           }
-	                      }
                       ?>
                     </select>
                   </td>
                 </tr>
 		            <?vsp } ?>
-                <v:template name="dav_template003" type="simple" enabled="-- equ(isstring (vad_check_version ('SyncML')), 1)">
-                  <tr id="fi8">
-                    <td>SyncML version</td>
+                <v:template name="dav_template003" type="simple" enabled="-- equ (isstring (DB.DBA.vad_check_version ('SyncML')), 1)">
+                  <tr id="fi8" style="display: none;">
+                    <th>SyncML version</th>
                     <td>
                     <select name="s_v">
                       <?vsp
                         declare _fidx, idx any;
                         declare i integer;
 
-                        idx := get_keyword('idx', self.vc_page.vc_event.ve_params, 'N');
-                        _fidx := yac_syncml_version ();
-                        for (i := 0; i < length(_fidx); i := i + 2)
+                        idx := get_keyword ('s_v', self.vc_page.vc_event.ve_params, 'N');
+                        _fidx := Y_SYNCML_VERSIONS ();
+                        for (i := 2; i < length(_fidx); i := i + 2)
                         {
                           http(sprintf('<option value="%s" %s>%s</option>', _fidx[i], select_if(idx, _fidx[i]), _fidx[i+1]));
                         }
@@ -959,17 +957,17 @@ self.vc_data_bind (e);
                     </select>
                     </td>
                   </tr>
-                  <tr id="fi9">
-                    <td>SyncML type</td>
+                  <tr id="fi9" style="display: none;">
+                    <th>SyncML type</th>
                     <td>
                     <select name="s_t">
                       <?vsp
                         declare _fidx, idx any;
                         declare i integer;
 
-                        idx := get_keyword('idx', self.vc_page.vc_event.ve_params, 'N');
-                        _fidx := yac_syncml_type ();
-                        for (i := 0; i < length(_fidx); i := i + 2)
+                        idx := get_keyword ('s_t', self.vc_page.vc_event.ve_params, 'N');
+                        _fidx := Y_SYNCML_TYPES ();
+                        for (i := 2; i < length(_fidx); i := i + 2)
                         {
                           http(sprintf('<option value="%s" %s>%s</option>', _fidx[i], select_if(idx, _fidx[i]), _fidx[i+1]));
                         }
@@ -999,11 +997,12 @@ self.vc_data_bind (e);
                           declare usr, grp vspx_select_list;
                           declare i, _uid, ownern, groupn integer;
                           declare cname, _perms, _p, _idx, mimetype, owner_name, group_name, _inh, _fdet varchar;
-                  			  declare _file, _graph, is_ttl, is_xml any;
+                  			  declare params, _file, _graph, is_ttl, is_xml any;
 
+                          params := e.ve_params;
                   			  if (self.dst_sel.ufl_value = 'rdf')
                   			  {
-                  			    _file := get_keyword ('t_rdf_file', e.ve_params);
+                  			    _file := get_keyword ('t_rdf_file', params);
                   			    _graph := trim (self.rdf_graph_name.ufl_value);
                   		      if (not length (_graph))
                   	        {
@@ -1021,7 +1020,7 @@ self.vc_data_bind (e);
                     				    self.vc_error_message := regexp_match ('[^\r\n]*', __SQL_MESSAGE);
                     				    return;
                     				  };
-                    				  uri := get_keyword ('t_rdf_url', e.ve_params);
+                    				  uri := get_keyword ('t_rdf_url', params);
                     				  exec (sprintf ('sparql load "%s" into <%s>', uri, _graph));
                   		        goto end_post;
                   				  }
@@ -1054,15 +1053,15 @@ self.vc_data_bind (e);
                   			    goto end_post;
                   			  }
                           if (self.crfolder_mode = 1)
-                            cname := get_keyword('t_newfolder', self.vc_page.vc_event.ve_params, '');
+                            cname := get_keyword ('t_newfolder', params, '');
                           if ((self.crfolder_mode = 2) or (self.crfolder_mode = 299))
                           {
                             if (self.crfolder_mode = 2)
-                            _file := get_keyword_ucase('t_newfolder', self.vc_page.vc_event.ve_params, null);
+                              _file := get_keyword_ucase('t_newfolder', params, null);
                             else
-                              _file := get_keyword_ucase('dav_content', self.vc_page.vc_event.ve_params, null);
-                            cname := get_keyword('resname', self.vc_page.vc_event.ve_params, '');
-                            mimetype := get_keyword('mime_type', self.vc_page.vc_event.ve_params, '');
+                              _file := get_keyword_ucase('dav_content', params, null);
+                            cname := get_keyword ('resname', params, '');
+                            mimetype := get_keyword ('mime_type', params, '');
                           }
                           usr := self.t_folder_own;
                           grp := self.t_folder_grp;
@@ -1090,12 +1089,12 @@ self.vc_data_bind (e);
                             self.vc_is_valid := 0;
                             return;
                           }
-                          _uid := coalesce(atoi(get_keyword('own', self.vc_page.vc_event.ve_params, null)), (select min(U_ID) from WS.WS.SYS_DAV_USER));
+                          _uid := coalesce(atoi(get_keyword ('own', params, null)), (select min(U_ID) from WS.WS.SYS_DAV_USER));
                           i := 0;
                           _perms := '';
                           while (i < 9)
                           {
-                            _p := get_keyword(sprintf('perm%i', i), self.vc_page.vc_event.ve_params, '');
+                            _p := get_keyword (sprintf('perm%i', i), params, '');
                             if (_p <> '')
                               _perms := concat(_perms, '1');
                             else
@@ -1104,9 +1103,10 @@ self.vc_data_bind (e);
                           }
                           if (_perms = '000000000')
                             _perms := (select U_DEF_PERMS from WS.WS.SYS_DAV_USER where U_ID = _uid);
-                          _idx := get_keyword('idx', self.vc_page.vc_event.ve_params, 'N');
-                          _inh := get_keyword('inh', self.vc_page.vc_event.ve_params, 'N');
-                          _fdet := get_keyword('fdet', self.vc_page.vc_event.ve_params, '');
+
+                          _idx := get_keyword ('idx', params, 'N');
+                          _inh := get_keyword ('inh', params, 'N');
+                          _fdet := get_keyword ('fdet', params, '');
                           _perms := concat(_perms, _idx);
                           declare ret int;
                           declare full_path varchar;
@@ -1130,15 +1130,21 @@ self.vc_data_bind (e);
                                 self.vc_is_valid := 0;
                                 return;
                               }
+                  		        set triggers off;
+			                        if (_fdet = 'SyncML')
+			                        {
                   			      if (__proc_exists ('DB.DBA.SYNC_MAKE_DAV_DIR'))
                   			      {
-                    				    declare sync_ver any;
-                    				    sync_ver := get_keyword ('s_v', self.vc_page.vc_event.ve_params, 'N');
-                    				    call ('DB.DBA.SYNC_MAKE_DAV_DIR') (get_keyword ('s_t', self.vc_page.vc_event.ve_params, 'N'),
-                    				    ret, cname, full_path, sync_ver);
+                      				    declare sync_ver, sync_type any;
+
+                      				    sync_ver := get_keyword ('s_v', params, 'N');
+                      				    sync_type := get_keyword ('s_t', params, 'N');
+                      				    call ('DB.DBA.SYNC_MAKE_DAV_DIR') (sync_type, ret, cname, full_path, sync_ver);
                       				}
-                  		        set triggers off;
-			      if (_fdet = '') _fdet := null;		
+                        			}
+			                        if (_fdet = '' or _fdet = 'rdfSink' or _fdet = 'SyncML')
+			                          _fdet := null;
+
                               update WS.WS.SYS_DAV_COL set COL_INHERIT = _inh, COL_DET = _fdet where COL_ID = ret;
 			                        set triggers on;
                             }
@@ -1267,8 +1273,9 @@ self.vc_data_bind (e);
                             {
                               declare res_owner1, res_group1 integer;
                               declare resname, res_perms1, res_owner2, res_group2 varchar;
-                              resname := aref(self.megavec, 0);
                               whenever not found goto nfr;
+
+                              resname := aref(self.megavec, 0);
                               select res_owner, res_group, res_perms into res_owner1, res_group1, res_perms1 from WS.WS.SYS_DAV_RES where res_full_path = resname;
                               if (res_owner1 is not null)
                                 res_owner2 := (select U_NAME from DB.DBA.SYS_USERS where U_ID = res_owner1);
@@ -1280,9 +1287,9 @@ self.vc_data_bind (e);
                                 res_group2 := 'none';
                               ret := DB.DBA.YACUTIA_DAV_RES_UPLOAD(aref(self.megavec, 0), aref(self.megavec, 1), aref(self.megavec, 2), res_perms1, res_owner1, res_group1, now(), now(), null);
                               nfr:;
-                            }
-                            else
+                            } else {
                             ret := DB.DBA.YACUTIA_DAV_RES_UPLOAD(aref(self.megavec, 0), aref(self.megavec, 1), aref(self.megavec, 2), aref(self.megavec, 3), aref(self.megavec, 4), aref(self.megavec, 5), now(), now(), null);
+                            }
                             if (ret < 0)
                             {
                               self.vc_error_message := YACUTIA_DAV_STATUS(ret);
@@ -1356,8 +1363,10 @@ self.vc_data_bind (e);
                       {
                         if (DB.DBA.Y_DAV_PROP_GET (self.source_dir, 'virt:rdf_graph', '') <> '')
                           _fdet := 'rdfSink';
-                        if (DB.DBA.Y_DAV_PROP_GET (self.source_dir, 'virt:Versioning-History', '') <> '')
+                        else if (DB.DBA.Y_DAV_PROP_GET (self.source_dir, 'virt:Versioning-History', '') <> '')
                           _fdet := 'UnderVersioning';
+                        else if (DB.DBA.Y_SYNCML_DETECT (self.source_dir))
+                          _fdet := 'SyncML';
                       }
                     }
                     else
@@ -1533,7 +1542,7 @@ self.vc_data_bind (e);
                 <tr>
                   <th>Folder type</th>
                   <td>
-                    <select name="fdet">
+                    <select name="fdet" id="fdet" onchange="javascript: detChanged()">
                       <?vsp
 		                    {
                           declare _fidx any;
@@ -1554,6 +1563,9 @@ self.vc_data_bind (e);
                             'S3',               'Amazon S3',                     
 			    'DynaRes',          'Dynamic Resources'
 			    );
+                          if (isstring (DB.DBA.vad_check_version ('SyncML')))
+                            _fidx := vector_concat (_fidx, vector ('SyncML', 'SyncML Folder'));
+
                           for (i := 0; i < length (_fidx); i := i + 2)
                           {
                             http (sprintf ('<option value="%s" %s>%s</option>', _fidx[i], select_if (_idx, _fidx[i]), _fidx[i+1]));
@@ -1564,8 +1576,8 @@ self.vc_data_bind (e);
                   </td>
                 </tr>
 		            <?vsp } ?>
-                <v:template name="dav_template011" type="simple" enabled="-- equ(yac_syncml_detect (self.source_dir), 1)">
-                  <tr>
+                <v:template name="dav_template011" type="simple" enabled="-- equ (isstring (DB.DBA.vad_check_version ('SyncML')), 1)">
+                  <tr id="fi8" style="display: none;">
                     <th>SyncML version</th>
                     <td>
                     <select name="s_v">
@@ -1573,9 +1585,9 @@ self.vc_data_bind (e);
                         declare _fidx, idx any;
                         declare i integer;
 
-                        idx := yac_syncml_version_get (self.source_dir);
-                        _fidx := yac_syncml_version ();
-                        for (i := 0; i < length(_fidx); i := i + 2)
+                          idx := get_keyword ('s_v', self.vc_page.vc_event.ve_params, Y_SYNCML_VERSION (self.source_dir));
+                          _fidx := Y_SYNCML_VERSIONS ();
+                          for (i := 2; i < length(_fidx); i := i + 2)
                         {
                           http(sprintf('<option value="%s" %s>%s</option>', _fidx[i], select_if(idx, _fidx[i]), _fidx[i+1]));
                         }
@@ -1583,7 +1595,7 @@ self.vc_data_bind (e);
                     </select>
                     </td>
                   </tr>
-                  <tr>
+                  <tr id="fi9" style="display: none;">
                     <th>SyncML type</th>
                     <td>
                     <select name="s_t">
@@ -1591,9 +1603,9 @@ self.vc_data_bind (e);
                         declare _fidx, idx any;
                         declare i integer;
 
-                        idx := yac_syncml_type_get (self.source_dir);
-                        _fidx := yac_syncml_type ();
-                        for (i := 0; i < length(_fidx); i := i + 2)
+                          idx := get_keyword ('s_t', self.vc_page.vc_event.ve_params, Y_SYNCML_TYPE (self.source_dir));
+                          _fidx := Y_SYNCML_TYPES ();
+                          for (i := 2; i < length(_fidx); i := i + 2)
                         {
                           http(sprintf('<option value="%s" %s>%s</option>', _fidx[i], select_if(idx, _fidx[i]), _fidx[i+1]));
                         }
@@ -1643,7 +1655,7 @@ self.vc_data_bind (e);
                             <?vsp
                                 for (N := 0; N < length (properties); N := N + 1)
                                 {
-                                  http (sprintf ('OAT.Loader.load([], function(){TBL.createRow("c", null, {fld_1: {mode: 40, value: "%s", className: "_validate_", onbBlur: function(){validateField(this);}}, fld_2: {mode: 0, value: "%s"}});});', properties[N][0], replace (properties[N][1], '\n', ' ')));
+                                  http (sprintf ('OAT.Loader.load(["combolist"], function(){TBL.createRow("c", null, {fld_1: {mode: 40, value: "%s", className: "_validate_", onbBlur: function(){validateField(this);}}, fld_2: {mode: 0, value: "%s"}});});', properties[N][0], replace (properties[N][1], '\n', ' ')));
                               }
                             ?>
                       		    </script>
@@ -1677,7 +1689,7 @@ self.vc_data_bind (e);
                             <tr>
                               <th width="1%" nowrap="nowrap">Access Type</th>
                               <th nowrap="nowrap">WebID</th>
-                              <th width="1%" align="center" nowrap="nowrap">ACL: (R)ead, (W)rite</th>
+                              <th width="1%" align="center" nowrap="nowrap">Allow<br />(R)ead, (W)rite, e(X)ecute</th>
                               <th width="1%">Action</th>
                             </tr>
                             <tr id="f_tr_no"><td colspan="4"><b>No WebID Security</b></td></tr>
@@ -1689,7 +1701,7 @@ self.vc_data_bind (e);
 
                                 aci_values := DB.DBA.Y_ACI_LOAD (self.source_dir);
                                 for (N := 0; N < length (aci_values); N := N + 1)
-                                  http (sprintf ('OAT.Loader.load([], function(){TBL.createRow("f", null, {fld_1: {mode: 50, value: "%s", onchange: function(){TBL.changeCell50(this);}}, fld_2: {mode: 51, tdCssText: "white-space: nowrap;", className: "_validate_ _uri_", value: "%s", readOnly: %s, imgCssText: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}});});', aci_values[N][2], aci_values[N][1], case when aci_values[N][2] = 'public' then 'true' else 'false' end, case when aci_values[N][2] = 'public' then 'display: none;' else '' end, aci_values[N][3], aci_values[N][4], aci_values[N][5]));
+                                  http (sprintf ('OAT.Loader.load(["combolist"], function(){TBL.createRow("f", null, {fld_1: {mode: 50, value: "%s", onchange: function(){TBL.changeCell50(this);}}, fld_2: {mode: 51, tdCssText: "white-space: nowrap;", className: "_validate_ _uri_", value: "%s", readOnly: %s, imgCssText: "%s"}, fld_3: {mode: 52, value: [%d, %d, %d], tdCssText: "width: 1%%; text-align: center;"}});});', aci_values[N][2], aci_values[N][1], case when aci_values[N][2] = 'public' then 'true' else 'false' end, case when aci_values[N][2] = 'public' then 'display: none;' else '' end, aci_values[N][3], aci_values[N][4], aci_values[N][5]));
                               ?>
                       		    </script>
                       		  ]]>
@@ -2082,9 +2094,11 @@ self.vc_data_bind (e);
                           declare mimetype, _recurse, _res_name, _fdet varchar;
                           declare _fidx, _file any;
                           declare _perms, _p, _idx varchar;
-                          declare _res_id, is_dir, _inh integer;
+                          declare _res_id, is_dir, _inh, _is_sink integer;
                           declare cur_usr varchar;
+                          declare params any;
 
+                          params := e.ve_params;
                           cur_usr := connection_get ('vspx_user');
                           if (cur_usr not in ('dba', 'dav'))
                           {
@@ -2108,17 +2122,17 @@ self.vc_data_bind (e);
                             self.vc_is_valid := 0;
                             return;
                           }
-                          _res_name := trim (get_keyword ('res_name', self.vc_page.vc_event.ve_params, ''));
+                          _res_name := trim (get_keyword ('res_name', params, ''));
                           if (_res_name is null  or _res_name = '')
                           {
                             self.vc_error_message := 'Resource name can be empty';
                             self.vc_is_valid := 0;
                             return;
                           }
-                          own_id := atoi (get_keyword ('res_own', self.vc_page.vc_event.ve_params, ''));
-                          own_grp := atoi (get_keyword ('res_grp', self.vc_page.vc_event.ve_params, ''));
+                          own_id := atoi (get_keyword ('res_own', params, ''));
+                          own_grp := atoi (get_keyword ('res_grp', params, ''));
                           if (is_dir = 0)
-                            mimetype := get_keyword ('mime_type1', self.vc_page.vc_event.ve_params, '');
+                            mimetype := get_keyword ('mime_type1', params, '');
 
                           if (own_id < 0)
                             own_id := NULL;
@@ -2126,26 +2140,38 @@ self.vc_data_bind (e);
                           if (own_grp < 0)
                             own_grp := NULL;
 
+                  			  _perms := '';
+                  			  _is_sink := 0;
+                          _fidx := vector ('N', 'Off', 'T', 'Direct members', 'R', 'Recursively');
+                          _idx := get_keyword ('idx', params, _fidx[0]);
+                          _inh := get_keyword ('inh', params, _fidx[0]);
+                  			  _fdet := get_keyword ('fdet', params, '');
+	                        if (_fdet = 'SyncML')
+	                        {
                           if (__proc_exists ('DB.DBA.SYNC_MAKE_DAV_DIR'))
                           {
                              declare sync_ver, sync_type any;
-                             sync_ver := get_keyword ('s_v', self.vc_page.vc_event.ve_params, 'N');
-                             sync_type := get_keyword ('s_t', self.vc_page.vc_event.ve_params, 'N');
 
-                             yac_syncml_update_type (sync_ver, sync_type, self.source_dir);
+                  				    sync_ver := get_keyword ('s_v', params, 'N');
+                  				    sync_type := get_keyword ('s_t', params, 'N');
+                  				    call ('DB.DBA.SYNC_MAKE_DAV_DIR') (sync_type, _res_id, _res_name, self.source_dir, sync_ver);
+                    				}
+                    			}
+                    			else if ((is_dir = 1) and isstring (DB.DBA.vad_check_version ('SyncML')))
+                    			{
+                    			  declare state, msg any;
+                            exec ('delete from DB.DBA.SYNC_COLS_TYPES where CT_PATH = ?', state, msg, vector (self.source_dir));
                           }
 
-                          _perms := '';
-                          _fidx := vector ('N', 'Off', 'T', 'Direct members', 'R', 'Recursively');
-                          _idx := get_keyword ('idx', self.vc_page.vc_event.ve_params, _fidx[0]);
-                          _inh := get_keyword ('inh', self.vc_page.vc_event.ve_params, _fidx[0]);
-			  _fdet := get_keyword ('fdet', self.vc_page.vc_event.ve_params, '');
-                  			  if (_fdet = '')
+                  			  if (_fdet = 'rdfSink')
+                  			    _is_sink := 1;
+
+                  			  if (_fdet = '' or _fdet = 'rdfSink' or _fdet = 'SyncML')
                   			    _fdet := null;
 
                           for (i := 0; i < 9; i := i + 1)
                           {
-                            _p := get_keyword(sprintf('perm%i', i), self.vc_page.vc_event.ve_params, '');
+                            _p := get_keyword (sprintf('perm%i', i), params, '');
                             if (_p <> '')
                               _perms := concat(_perms, '1');
                             else
@@ -2279,6 +2305,8 @@ self.vc_data_bind (e);
                           {
                             DB.DBA.Y_DAV_PROP_SET (self.source_dir, c_properties[N][0], c_properties[N][1]);
                           }
+			  if (_is_sink)
+			    DB.DBA.Y_DAV_PROP_SET (self.source_dir, 'virt:rdf_graph', sprintf ('http://%{WSHost}s%s', self.source_dir));
 
                           -- acl
                           if (DB.DBA.Y_VAD_CHECK('Framework'))
@@ -4175,5 +4203,18 @@ self.vc_data_bind (e);
         </v:template>
       </xsl:otherwise>
     </xsl:choose>
+    <script type="text/javascript">
+      function detChanged()
+      {
+        var det = $('fdet');
+        if (det.value == 'SyncML') {
+          OAT.Dom.show('fi8');
+          OAT.Dom.show('fi9');
+        } else {
+          OAT.Dom.hide('fi8');
+          OAT.Dom.hide('fi9');
+        }
+      }
+    </script>
   </xsl:template>
 </xsl:stylesheet>
diff --git a/binsrc/yacutia/dav_browser_props.js b/binsrc/yacutia/dav_browser_props.js
index a61fa6a..5bb5f04 100644
--- a/binsrc/yacutia/dav_browser_props.js
+++ b/binsrc/yacutia/dav_browser_props.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/dav_post.js b/binsrc/yacutia/dav_post.js
index fc8414e..7197368 100644
--- a/binsrc/yacutia/dav_post.js
+++ b/binsrc/yacutia/dav_post.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_backup.vspx b/binsrc/yacutia/db_backup.vspx
index 4c805bf..8e4e617 100644
--- a/binsrc/yacutia/db_backup.vspx
+++ b/binsrc/yacutia/db_backup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: db_backup.vspx,v 1.4.2.4 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_backup.vspx,v 1.4.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_backup_clear.vspx b/binsrc/yacutia/db_backup_clear.vspx
index 79fd1cf..82d4c58 100644
--- a/binsrc/yacutia/db_backup_clear.vspx
+++ b/binsrc/yacutia/db_backup_clear.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_backup_clear.vspx,v 1.3.2.4 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_backup_clear.vspx,v 1.3.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_const_drop_conf.vspx b/binsrc/yacutia/db_const_drop_conf.vspx
index b008f0d..19eac22 100644
--- a/binsrc/yacutia/db_const_drop_conf.vspx
+++ b/binsrc/yacutia/db_const_drop_conf.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_const_drop_conf.vspx,v 1.3.2.4 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_const_drop_conf.vspx,v 1.3.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_const_drop_errs.vspx b/binsrc/yacutia/db_const_drop_errs.vspx
index ff87747..466cffc 100644
--- a/binsrc/yacutia/db_const_drop_errs.vspx
+++ b/binsrc/yacutia/db_const_drop_errs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_const_drop_errs.vspx,v 1.3.2.4 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_const_drop_errs.vspx,v 1.3.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_drop_conf.vspx b/binsrc/yacutia/db_drop_conf.vspx
index 84ab850..d5d4eae 100644
--- a/binsrc/yacutia/db_drop_conf.vspx
+++ b/binsrc/yacutia/db_drop_conf.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_drop_conf.vspx,v 1.3.2.5 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_drop_conf.vspx,v 1.3.2.6 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_drop_errs.vspx b/binsrc/yacutia/db_drop_errs.vspx
index 54b8e95..8a9c35c 100644
--- a/binsrc/yacutia/db_drop_errs.vspx
+++ b/binsrc/yacutia/db_drop_errs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_drop_errs.vspx,v 1.3.2.4 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_drop_errs.vspx,v 1.3.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_grant_errs.vspx b/binsrc/yacutia/db_grant_errs.vspx
index 4676f0d..8971db5 100644
--- a/binsrc/yacutia/db_grant_errs.vspx
+++ b/binsrc/yacutia/db_grant_errs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_grant_errs.vspx,v 1.2.2.4 2010/09/20 10:16:37 source Exp $
+ -  $Id: db_grant_errs.vspx,v 1.2.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_grant_many.vspx b/binsrc/yacutia/db_grant_many.vspx
index 3fe60d4..ff23f66 100644
--- a/binsrc/yacutia/db_grant_many.vspx
+++ b/binsrc/yacutia/db_grant_many.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_grant_many.vspx,v 1.2.2.4 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_grant_many.vspx,v 1.2.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_rdf_class.vspx b/binsrc/yacutia/db_rdf_class.vspx
index 65ed1e8..d35d624 100644
--- a/binsrc/yacutia/db_rdf_class.vspx
+++ b/binsrc/yacutia/db_rdf_class.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_class.vspx,v 1.7.2.3 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_class.vspx,v 1.7.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,7 @@
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro"
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN">
-  <vm:pagetitle>RDF View definition</vm:pagetitle>
+  <vm:pagetitle>Linked Data View definition</vm:pagetitle>
   <vm:pagewrapper>
   <vm:variables>
     <v:variable name="is_popup" persist="0" type="integer" default="0" />
@@ -43,7 +43,7 @@
       <v:variable persist="0" name="text_e" type="integer" default="0"/>
   </vm:variables>
 
-  <vm:header caption="RDF View definition"/>
+  <vm:header caption="Linked Data View definition"/>
   <vm:pagebody>
   <script type="text/javascript"><![CDATA[
     function saveFile ()
@@ -230,7 +230,7 @@
         <v:template type="simple" name="sc_1" enabled="0">
           <tr>
 	    <td>
-	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The RDF View definition exported successfully.
+	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The Linked Data View definition exported successfully.
 	    </td>
           </tr>
         </v:template>
diff --git a/binsrc/yacutia/db_rdf_objects.vspx b/binsrc/yacutia/db_rdf_objects.vspx
index 1bb8ab2..f3dbc04 100644
--- a/binsrc/yacutia/db_rdf_objects.vspx
+++ b/binsrc/yacutia/db_rdf_objects.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_objects.vspx,v 1.4.2.10 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_objects.vspx,v 1.4.2.13 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -36,9 +36,9 @@
     <v:variable name="db_ds_state" persist="session" type="any" default="null" />
   </vm:variables>
   <vm:menu>
-    <vm:menuitem value="RDF Views Management"/>
+    <vm:menuitem value="Linked Data Views Management"/>
   </vm:menu>
-  <vm:header caption="RDF Views"/>
+  <vm:header caption="Generating Linked Data Views from Relational Data Sources"/>
   <vm:pagebody>
 	<v:on-init>
 	  if (self.db_ds_state is null)
diff --git a/binsrc/yacutia/db_rdf_owl.vspx b/binsrc/yacutia/db_rdf_owl.vspx
index f30d4ff..0f24ef6 100644
--- a/binsrc/yacutia/db_rdf_owl.vspx
+++ b/binsrc/yacutia/db_rdf_owl.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_owl.vspx,v 1.2.2.4 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_owl.vspx,v 1.2.2.5 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_rdf_view_1.vspx b/binsrc/yacutia/db_rdf_view_1.vspx
index 7b6daae..d573b19 100644
--- a/binsrc/yacutia/db_rdf_view_1.vspx
+++ b/binsrc/yacutia/db_rdf_view_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_view_1.vspx,v 1.1.2.8 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_view_1.vspx,v 1.1.2.10 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,7 @@
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro"
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN">
-  <vm:pagetitle>RDF View definition</vm:pagetitle>
+  <vm:pagetitle>Linked Data View definition</vm:pagetitle>
   <vm:pagewrapper>
   <vm:variables>
     <v:variable name="is_popup" persist="0" type="integer" default="0" />
@@ -44,7 +44,7 @@
       <v:variable persist="0" name="pklist" type="any" default="null" param-name="pk"/>
   </vm:variables>
 
-  <vm:header caption="RDF View definition"/>
+  <vm:header caption="Linked Data View definition"/>
   <vm:pagebody>
       <h2>Select Generation Targets</h2>
       <table>
@@ -127,7 +127,7 @@
         <v:template type="simple" name="sc_1" enabled="0">
           <tr>
 	    <td>
-	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The RDF View definition exported successfully.
+	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The Linked Data View definition exported successfully.
 	    </td>
           </tr>
         </v:template>
diff --git a/binsrc/yacutia/db_rdf_view_2.vspx b/binsrc/yacutia/db_rdf_view_2.vspx
index 2570854..33b0ccd 100644
--- a/binsrc/yacutia/db_rdf_view_2.vspx
+++ b/binsrc/yacutia/db_rdf_view_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_view_2.vspx,v 1.1.2.7 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_view_2.vspx,v 1.1.2.10 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,7 @@
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro"
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN">
-  <vm:pagetitle>RDF View definition</vm:pagetitle>
+  <vm:pagetitle>Linked Data View definition</vm:pagetitle>
   <vm:pagewrapper>
   <vm:variables>
     <v:variable name="is_popup" persist="0" type="integer" default="0" />
@@ -44,7 +44,7 @@
       <v:variable persist="0" name="pklist" type="any" default="null" param-name="pk"/>
   </vm:variables>
 
-  <vm:header caption="RDF View definition"/>
+  <vm:header caption="Linked Data View definition"/>
   <vm:pagebody>
       <h2>Deployment options</h2>
       <table>
@@ -117,7 +117,7 @@
         <v:template type="simple" name="sc_1" enabled="0">
           <tr>
 	    <td>
-	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The RDF View definition exported successfully.
+	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The Linked Data View definition is exported successfully.
 	    </td>
           </tr>
         </v:template>
diff --git a/binsrc/yacutia/db_rdf_view_3.vspx b/binsrc/yacutia/db_rdf_view_3.vspx
index 455278d..172e514 100644
--- a/binsrc/yacutia/db_rdf_view_3.vspx
+++ b/binsrc/yacutia/db_rdf_view_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_view_3.vspx,v 1.2.2.16 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_view_3.vspx,v 1.2.2.22 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,7 @@
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro"
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN">
-  <vm:pagetitle>RDF View definition</vm:pagetitle>
+  <vm:pagetitle>Linked Data View definition</vm:pagetitle>
   <vm:pagewrapper>
   <vm:variables>
     <v:variable name="is_popup" persist="0" type="integer" default="0" />
@@ -41,6 +41,7 @@
       <v:variable name="exec_ret" type="any" default="null" persist="temp"/>
       <v:variable name="sync_ret" type="any" default="null" persist="temp"/>
       <v:variable persist="0" name="body_v" type="any" default="null" param-name="cr_view"/>
+      <v:variable persist="0" name="body_r2rml" type="any" default="null" param-name="r2rml"/>
       <v:variable persist="0" name="body_o" type="any" default="null" param-name="cr_owl"/>
       <v:variable persist="0" name="text_e" type="integer" default="0"/>
       <v:variable persist="0" name="owl" type="int" default="0" param-name="owl"/>
@@ -52,9 +53,10 @@
       <v:variable persist="0" name="exec_it" type="int" default="0" param-name="exec" />
       <v:variable persist="0" name="cols" type="any" default="null" param-name="cols"/>
       <v:variable persist="0" name="pklist" type="any" default="null" param-name="pk"/>
+      <v:variable persist="0" name="pgraphv" type="varchar" default="''" param-name="pgraph"/>
   </vm:variables>
 
-  <vm:header caption="RDF View definition"/>
+  <vm:header caption="Linked Data View definition"/>
   <vm:pagebody>
   <script type="text/javascript"><![CDATA[
     function saveSQL ()
@@ -101,7 +103,7 @@
 		}
              if (self.rdb_sync.ufl_selected)
 	       {
-	         self.sync_ret := RDF_VIEW_DO_SYNC (self.base_url, self.fill.ufl_selected);
+	         self.sync_ret := RDF_VIEW_DO_SYNC (self.base_url, self.fill.ufl_selected, self.pgraph.ufl_value);
                  if (0 = length (self.sync_ret))
 		   self.sync_ret := vector (vector ('00000', 'OK'));
   	       }	       
@@ -114,6 +116,7 @@
 		 gr := sprintf ('http://%s/schemas/%s#', cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'), self.base_url);
 		 stat := '00000';
 		 msg := 'OK';
+		 sparql clear graph iri (?:gr);
 		 exec ('DB.DBA.TTLP (?, \'\', ?, 255)', stat, msg, vector (self.body_o, gr), 0, meta, data);
 		 res [length(arr)] := vector (vector (stat, msg));
 		 exec (sprintf ('sparql
@@ -198,6 +201,10 @@
 	        {
 		  self.body_v := self.body_v || '\n\n';
 		  self.body_v := self.body_v || DB.DBA.RDF_VIEW_FROM_TBL (_base_url, tbls, self.voidst, cols);
+		  if (__proc_exists ('DB.DBA.R2RML_FROM_TBL') is not null)
+		    self.body_r2rml := R2RML_FROM_TBL (_base_url, tbls, self.voidst, cols);
+		  else
+		    self.body_r2rml := '### You need a new server binary in order to unlock R2RML graph generator';   
 	        }
 	      if (self.view_vd)
   	        self.body_v := self.body_v || '\n\n-- Virtual directories for instance data\n' || DB.DBA.RDF_VIEW_GEN_VD (_base_url);
@@ -234,6 +241,7 @@
 	    {
 	  ?>
 	  <h2>Execution Status</h2>
+	  <div class="scroll_area">
 	  <table class="listing">
 	      <tr class="listing_header_row"><th>Status</th><th>Message</th></tr>
 	      <?vsp
@@ -249,6 +257,7 @@
 	        }
 	      ?>
 	  </table>
+          </div>
 	  <?vsp
 	  if (length (self.sync_ret))
 	    {
@@ -268,31 +277,40 @@
 	  </table>
 	  <?vsp
 	    }  
-	  if (self.view_vd or self.owl_vd)
-	    {
-	  ?>
-	  <h2>Sample URIs</h2>
-	  <?vsp
-	    }
 	  ?>
+	  <h2>Quad Maps</h2>
 	  <?vsp
 	       declare defhost, stat, msg, data, meta, data2, meta2, qr, gr, fct_installed any;
 	       stat := '00000';
 	       defhost := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+	     gr := sprintf ('http://%s/%s#', defhost, self.base_url);
 	       if (exists (select 1 from VAD.DBA.VAD_REGISTRY where R_KEY like '/VAD/fct/%/resources/dav/%'))
 	         fct_installed := 1;
                else 
 	         fct_installed := 0;
+	     for select * from (sparql define input:storage "" select ?s from virtrdf: { ?s virtrdf:qmGraphRange-rvrFixedValue `iri(?:gr)` ; virtrdf:qmUserSubMaps ?t }) x do
+               {
+	         http (sprintf ('<a href="/describe/?uri=%U" target="_blank">%V</a><br/>', "s", "s")); 
+	       }  
+	  ?>
+	  <?vsp  
+	  if (self.view_vd or self.owl_vd)
+	    {
+	  ?>
+	  <h2>Sample URIs</h2>
+	  <?vsp
+	    }
+	  ?>
+	  <?vsp
 	       if (__proc_exists (fix_identifier_case ('shcompo_clear'), 2) is not null)
 	         shcompo_clear ();
 	       if (self.view_vd)
                  {
-		   gr := sprintf ('http://%s/%s#', defhost, self.base_url);
 		   qr := sprintf ('sparql select distinct ?class from <%s> { ?s a ?class } limit 10', gr);
 		   exec (qr, stat, msg, vector (), 0, meta, data);
 		   if (stat = '00000' and length (data) and length (data[0]))
 		     {
-		       http ('<div>Instance Data: <br/>');
+		     http (sprintf ('<div>Instance Data Named Graph: <a href="/describe/?uri=%U"i target="_blank">%V</a> <br/>', gr, gr));
 		       foreach (any _row in data) do
 			 {
 			   if (_row[0] not like '%/stat#%')
@@ -310,6 +328,28 @@
 			 }
 		       http ('</div>');
 		     }
+		   if (length (self.pgraphv) and self.fill.ufl_selected)
+		     {
+		       qr := sprintf ('sparql select distinct ?class from <%s> { ?s a ?class } limit 10', self.pgraphv);
+		       exec (qr, stat, msg, vector (), 0, meta, data);
+		       if (stat = '00000' and length (data) and length (data[0]))
+			 {
+			   http (sprintf ('<div>Instance Data Physical Named Graph: %V <br/>', self.pgraphv));
+			   foreach (any _row in data) do
+			     {
+			       qr := sprintf ('sparql select ?s from <%s> { ?s a <%s> } limit 1', self.pgraphv, _row[0]);
+			       exec (qr, stat, msg, vector (), 1, meta2, data2);
+			       if (stat = '00000' and length (data2) and length (data2[0]))
+				 {
+				   if (fct_installed)
+				     http (sprintf ('<a href="/describe/?url=%U" target="_blank">%s</a><br/>', data2[0][0], data2[0][0]));
+				   else
+				     http (sprintf ('<a href="%s" target="_blank">%s</a><br/>', replace (data2[0][0], '#', '%01'), data2[0][0]));
+				 }
+			     }
+			   http ('</div>');
+			 }
+		     } 
 	        }
 	       if (self.st and self.view_vd)
                  {
@@ -318,7 +358,7 @@
 		   exec (qr, stat, msg, vector (), 1, meta, data);
 		   if (stat = '00000' and length (data) and length (data[0]))
 		   {
-		   http ('<div>Statistics Data (VoiD Graph): <br/>');
+		       http ('<div>Metadata Data (VoiD): ');
 		   if (fct_installed)
 		     http (sprintf ('<a href="%s" target="_blank">%s</a>', data[0][0], data[0][0]));
                    else  
@@ -328,20 +368,15 @@
 	        }
 	       if (self.owl_vd)
                  {
- 		   gr := sprintf ('http://%s/schemas/%s#', defhost, self.base_url);
-		   qr := sprintf ('sparql select ?s from <%s> { ?s a ?class } limit 1', gr);
-		   exec (qr, stat, msg, vector (), 1, meta, data);
-		   if (stat = '00000' and length (data) and length (data[0]))
-		   {
-		   http ('<div>Ontology: <br/>');
+		   gr := sprintf ('http://%s/schemas/%s/', defhost, self.base_url);
+		   http ('<div>Ontology Data Named Graph: ');
 		   if (fct_installed)
-	             http (sprintf ('<a href="%s" target="_blank">%s</a>', data[0][0], data[0][0]));
+	             http (sprintf ('<a href="%V" target="_blank">%V</a>', gr, gr));
 		   else
-	           http (sprintf ('<a href="%s" target="_blank">%s</a>', replace (data[0][0], '#', '%01'), data[0][0]));
+	             http (sprintf ('<a href="%V" target="_blank">%V</a>', replace (gr, '#', '%01'), gr));
 		   http ('</div>');
 	           }
 	        }
-	    }
 	  ?>
       </td>
   </tr>
@@ -351,6 +386,8 @@
 	  <?vsp if (self.exist_sql) { ?>
 	  <h2>Definitions</h2>
 	  <v:textarea name="cr_view" xhtml_cols="120" xhtml_rows="20" value="--self.body_v"/><br/>
+	  <h2>R2RML Graph</h2>
+	  <v:textarea name="r2rml" xhtml_cols="120" xhtml_rows="20" value="--self.body_r2rml"/><br/>
 	  <?vsp } ?>
 	  <?vsp if (self.owl) { ?>
 	  <h2>Ontology</h2>
@@ -358,7 +395,9 @@
 	  <?vsp } ?>
 	  <?vsp } ?>
 	  <?vsp if (self.text_e = 0 and __proc_exists ('DB.DBA.RDF_VIEW_DO_SYNC')) { ?>
-	  <br /><v:check-box name="rdb_sync" value="1" xhtml_id="rdb_sync" /> <label for="rdb_sync">Generate RDB2RDF triggers</label> <br/>
+	  <br />
+	  <label>Physical Graph Name</label> <v:text name="pgraph" value="--sprintf ('urn:%{URIQADefaultHost}s:%s', self.base_url)" xhtml_size="70" /><br />
+	  <v:check-box name="rdb_sync" value="1" xhtml_id="rdb_sync" /> <label for="rdb_sync">Generate RDB2RDF triggers</label> <br/>
 	  <v:check-box name="fill" value="1" xhtml_id="fill" /> <label for="fill">Enable Data Syncs with Physical Quad Store</label> <br/>
 	  <?vsp } ?>
 	  <input type="hidden" name="host" value="<?V get_keyword('host', self.vc_event.ve_params) ?>"/><br/>
@@ -506,7 +545,7 @@
         <v:template type="simple" name="sc_1" enabled="0">
           <tr>
 	    <td>
-	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The RDF View definition is exported successfully.
+	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The Linked Data View definition is exported successfully.
 	    </td>
           </tr>
         </v:template>
diff --git a/binsrc/yacutia/db_rdf_view_cols.vspx b/binsrc/yacutia/db_rdf_view_cols.vspx
index 8a336a2..43cd8ee 100644
--- a/binsrc/yacutia/db_rdf_view_cols.vspx
+++ b/binsrc/yacutia/db_rdf_view_cols.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_view_cols.vspx,v 1.1.2.9 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_view_cols.vspx,v 1.1.2.12 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,7 @@
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro"
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN">
-  <vm:pagetitle>RDF View definition</vm:pagetitle>
+  <vm:pagetitle>Linked Data View definition</vm:pagetitle>
   <vm:pagewrapper>
   <vm:variables>
     <v:variable name="is_popup" persist="0" type="integer" default="0" />
@@ -46,7 +46,7 @@
       <v:variable persist="0" name="pklist" type="any" default="null" param-name="pk"/>
   </vm:variables>
 
-  <vm:header caption="RDF View definition"/>
+  <vm:header caption="Linked Data View definition"/>
   <vm:pagebody>
       <v:on-init><![CDATA[
 	  declare pos int;
@@ -267,7 +267,7 @@
         <v:template type="simple" name="sc_1" enabled="0">
           <tr>
 	    <td>
-	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The RDF View definition exported successfully.
+	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The Linked Data View definition is exported successfully.
 	    </td>
           </tr>
         </v:template>
diff --git a/binsrc/yacutia/db_rdf_view_pk.vspx b/binsrc/yacutia/db_rdf_view_pk.vspx
index 758d122..e303a3c 100644
--- a/binsrc/yacutia/db_rdf_view_pk.vspx
+++ b/binsrc/yacutia/db_rdf_view_pk.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_view_pk.vspx,v 1.1.2.6 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_view_pk.vspx,v 1.1.2.8 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -125,6 +125,14 @@
 				</v:select-list>
 			      </td>
 			      <td>
+				<v:button name="add_to_all" value=">>>" action="simple" >
+				  <v:on-post>
+				    self.pkeys := vector_concat (self.pkeys, self.avail);
+				    self.avail := vector ();
+				    self.av_cols.vc_data_bind (e);
+				    self.se_cols.vc_data_bind (e);
+				  </v:on-post>
+			        </v:button><br />
 				<v:button name="add_to" value=">" action="simple" >
 				  <v:on-post>
 				    declare av, se, sel, nav any;
@@ -173,6 +181,14 @@
 				    self.av_cols.vc_data_bind (e);
 				    self.se_cols.vc_data_bind (e);
 				  </v:on-post>
+			        </v:button><br />
+				<v:button name="remove_from_all" value="<<<" action="simple" >
+				  <v:on-post>
+				    self.avail := vector_concat (self.avail, self.pkeys);
+				    self.pkeys := vector ();
+				    self.av_cols.vc_data_bind (e);
+				    self.se_cols.vc_data_bind (e);
+				  </v:on-post>
 				</v:button>
 			      </td>
 			      <td>
diff --git a/binsrc/yacutia/db_rdf_view_tb.vspx b/binsrc/yacutia/db_rdf_view_tb.vspx
index 2d3937b..44ecffa 100644
--- a/binsrc/yacutia/db_rdf_view_tb.vspx
+++ b/binsrc/yacutia/db_rdf_view_tb.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_rdf_view_tb.vspx,v 1.1.2.6 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_rdf_view_tb.vspx,v 1.1.2.9 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,7 +27,7 @@
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro"
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN">
-  <vm:pagetitle>RDF View definition</vm:pagetitle>
+  <vm:pagetitle>Linked Data View definition</vm:pagetitle>
   <vm:pagewrapper>
   <vm:variables>
     <v:variable name="is_popup" persist="0" type="integer" default="0" />
@@ -41,7 +41,7 @@
       <v:variable persist="0" name="pklist" type="any" default="''" param-name="pk"/>
   </vm:variables>
 
-  <vm:header caption="RDF View definition"/>
+  <vm:header caption="Linked Data View definition"/>
   <vm:pagebody>
       <h2>Column Selection</h2>
       <table>
@@ -118,7 +118,7 @@
         <v:template type="simple" name="sc_1" enabled="0">
           <tr>
 	    <td>
-	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The RDF View definition exported successfully.
+	      <img class="dialog_icon" src="images/icons/about_32.png" alt="Info" title="Info"/> The Linked Data View definition is exported successfully.
 	    </td>
           </tr>
         </v:template>
diff --git a/binsrc/yacutia/db_repl_basic.vspx b/binsrc/yacutia/db_repl_basic.vspx
index 5f55393..8687b58 100644
--- a/binsrc/yacutia/db_repl_basic.vspx
+++ b/binsrc/yacutia/db_repl_basic.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_basic.vspx,v 1.2.2.3 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_repl_basic.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_basic_create.vspx b/binsrc/yacutia/db_repl_basic_create.vspx
index 21f8b9a..b471feb 100644
--- a/binsrc/yacutia/db_repl_basic_create.vspx
+++ b/binsrc/yacutia/db_repl_basic_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_basic_create.vspx,v 1.3.2.3 2010/09/20 10:16:38 source Exp $
+ -  $Id: db_repl_basic_create.vspx,v 1.3.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_basic_local.vspx b/binsrc/yacutia/db_repl_basic_local.vspx
index aea3e2b..71a6f06 100644
--- a/binsrc/yacutia/db_repl_basic_local.vspx
+++ b/binsrc/yacutia/db_repl_basic_local.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_basic_local.vspx,v 1.2.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_basic_local.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_basic_local_create.vspx b/binsrc/yacutia/db_repl_basic_local_create.vspx
index 07b8ef0..28d853f 100644
--- a/binsrc/yacutia/db_repl_basic_local_create.vspx
+++ b/binsrc/yacutia/db_repl_basic_local_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_basic_local_create.vspx,v 1.3.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_basic_local_create.vspx,v 1.3.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_basic_local_start.vspx b/binsrc/yacutia/db_repl_basic_local_start.vspx
index 5a080e7..06e4b64 100644
--- a/binsrc/yacutia/db_repl_basic_local_start.vspx
+++ b/binsrc/yacutia/db_repl_basic_local_start.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_basic_local_start.vspx,v 1.4.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_basic_local_start.vspx,v 1.4.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_basic_start.vspx b/binsrc/yacutia/db_repl_basic_start.vspx
index 179f668..70770df 100644
--- a/binsrc/yacutia/db_repl_basic_start.vspx
+++ b/binsrc/yacutia/db_repl_basic_start.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_basic_start.vspx,v 1.5.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_basic_start.vspx,v 1.5.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi.vspx b/binsrc/yacutia/db_repl_bi.vspx
index 4f2742c..ee000d3 100644
--- a/binsrc/yacutia/db_repl_bi.vspx
+++ b/binsrc/yacutia/db_repl_bi.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi.vspx,v 1.3.2.5 2011/01/25 14:21:43 source Exp $
+ -  $Id: db_repl_bi.vspx,v 1.3.2.6 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi_add.vspx b/binsrc/yacutia/db_repl_bi_add.vspx
index b8a101f..a2fd569 100644
--- a/binsrc/yacutia/db_repl_bi_add.vspx
+++ b/binsrc/yacutia/db_repl_bi_add.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi_add.vspx,v 1.2.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_bi_add.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi_cr.vspx b/binsrc/yacutia/db_repl_bi_cr.vspx
index abd1855..5027814 100644
--- a/binsrc/yacutia/db_repl_bi_cr.vspx
+++ b/binsrc/yacutia/db_repl_bi_cr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi_cr.vspx,v 1.3.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_bi_cr.vspx,v 1.3.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi_cr_edit.vspx b/binsrc/yacutia/db_repl_bi_cr_edit.vspx
index 09c60da..02c550f 100644
--- a/binsrc/yacutia/db_repl_bi_cr_edit.vspx
+++ b/binsrc/yacutia/db_repl_bi_cr_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi_cr_edit.vspx,v 1.2.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_bi_cr_edit.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi_create.vspx b/binsrc/yacutia/db_repl_bi_create.vspx
index 6783d8f..1eacdcd 100644
--- a/binsrc/yacutia/db_repl_bi_create.vspx
+++ b/binsrc/yacutia/db_repl_bi_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi_create.vspx,v 1.2.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_bi_create.vspx,v 1.2.2.4 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi_edit.vspx b/binsrc/yacutia/db_repl_bi_edit.vspx
index ee0a721..d0e0d39 100644
--- a/binsrc/yacutia/db_repl_bi_edit.vspx
+++ b/binsrc/yacutia/db_repl_bi_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi_edit.vspx,v 1.3.2.3 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_bi_edit.vspx,v 1.3.2.4 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_bi_remove.vspx b/binsrc/yacutia/db_repl_bi_remove.vspx
index 79d4fad..b7b42c9 100644
--- a/binsrc/yacutia/db_repl_bi_remove.vspx
+++ b/binsrc/yacutia/db_repl_bi_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_bi_remove.vspx,v 1.3.2.4 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_bi_remove.vspx,v 1.3.2.5 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_cr_edit.vspx b/binsrc/yacutia/db_repl_cr_edit.vspx
index 61a28a3..a8ef5db 100644
--- a/binsrc/yacutia/db_repl_cr_edit.vspx
+++ b/binsrc/yacutia/db_repl_cr_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_cr_edit.vspx,v 1.3.2.2 2010/09/20 10:16:39 source Exp $
+ -  $Id: db_repl_cr_edit.vspx,v 1.3.2.3 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_pub.vspx b/binsrc/yacutia/db_repl_pub.vspx
index c05c013..1810a91 100644
--- a/binsrc/yacutia/db_repl_pub.vspx
+++ b/binsrc/yacutia/db_repl_pub.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_pub.vspx,v 1.2.2.4 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_pub.vspx,v 1.2.2.5 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_pub_cr.vspx b/binsrc/yacutia/db_repl_pub_cr.vspx
index cfecfd1..fc5af52 100644
--- a/binsrc/yacutia/db_repl_pub_cr.vspx
+++ b/binsrc/yacutia/db_repl_pub_cr.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_pub_cr.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_pub_cr.vspx,v 1.2.2.4 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_pub_cr_edit.vspx b/binsrc/yacutia/db_repl_pub_cr_edit.vspx
index 972c26e..e88d906 100644
--- a/binsrc/yacutia/db_repl_pub_cr_edit.vspx
+++ b/binsrc/yacutia/db_repl_pub_cr_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_pub_cr_edit.vspx,v 1.4.2.2 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_pub_cr_edit.vspx,v 1.4.2.3 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_pub_cr_edit2.vspx b/binsrc/yacutia/db_repl_pub_cr_edit2.vspx
index 56a2cf3..76e038d 100644
--- a/binsrc/yacutia/db_repl_pub_cr_edit2.vspx
+++ b/binsrc/yacutia/db_repl_pub_cr_edit2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_pub_cr_edit2.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_pub_cr_edit2.vspx,v 1.2.2.4 2012/03/08 12:55:24 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_pub_create.vspx b/binsrc/yacutia/db_repl_pub_create.vspx
index a3d2854..deb571b 100644
--- a/binsrc/yacutia/db_repl_pub_create.vspx
+++ b/binsrc/yacutia/db_repl_pub_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_pub_create.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_pub_create.vspx,v 1.2.2.4 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_pub_edit.vspx b/binsrc/yacutia/db_repl_pub_edit.vspx
index 78819ee..b815632 100644
--- a/binsrc/yacutia/db_repl_pub_edit.vspx
+++ b/binsrc/yacutia/db_repl_pub_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_pub_edit.vspx,v 1.5.2.4 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_pub_edit.vspx,v 1.5.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_rdf_pub_edit.vspx b/binsrc/yacutia/db_repl_rdf_pub_edit.vspx
index 57ae71c..1a4e233 100644
--- a/binsrc/yacutia/db_repl_rdf_pub_edit.vspx
+++ b/binsrc/yacutia/db_repl_rdf_pub_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_rdf_pub_edit.vspx,v 1.1.4.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_rdf_pub_edit.vspx,v 1.1.4.4 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_snap.vspx b/binsrc/yacutia/db_repl_snap.vspx
index 0e06e41..36af4a1 100644
--- a/binsrc/yacutia/db_repl_snap.vspx
+++ b/binsrc/yacutia/db_repl_snap.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_snap.vspx,v 1.2.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -68,12 +68,12 @@
           <col/>
         </colgroup>
         <tr>
-          <td class="page_tab_selected" align="center">Local to Remote</td>
           <td class="page_tab" align="center">
             <v:url name="b_url31" value="Remote to Local" url="db_repl_snap_pull.vspx"/>
           </td>
+          <td class="page_tab_selected" align="center">Local to Remote</td>
           <td class="page_tab" align="center">
-            <v:url name="b_url31" value="Local to Local" url="db_repl_snap_local.vspx"/>
+            <v:url name="b_url32" value="Local to Local" url="db_repl_snap_local.vspx"/>
           </td>
           <td class="page_tab_empty"></td>
         </tr>
diff --git a/binsrc/yacutia/db_repl_snap_create.vspx b/binsrc/yacutia/db_repl_snap_create.vspx
index 6a696d5..1c44adc 100644
--- a/binsrc/yacutia/db_repl_snap_create.vspx
+++ b/binsrc/yacutia/db_repl_snap_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_create.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_snap_create.vspx,v 1.2.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -54,6 +54,7 @@
       <v:variable name="dsrws" type="any" default="null" />
       <!-- keep the selection -->
       <v:variable name="selcust" type="any" default="null" />
+      <v:variable name="selcustall" type="any" default="null" />
     </vm:variables>
     <vm:menu>
       <vm:menuitem name="vers" value="Snapshot"/>
@@ -558,6 +559,58 @@ self.vc_data_bind(e);
       <v:template name="link_template" type="simple" enabled="-- equ(self.repl_snap_stage, 2)">
         <h3>Step 3: Choose Destinations Parameters</h3>
         <v:form name="link2_form" action="db_repl_snap_create.vspx" method="POST" type="simple">
+          <div class="listing_top_ctl_grp">
+            <v:text name="mass_tbq" xhtml_size="3" value="">
+              <v:before-render>
+                control.ufl_value := '';
+              </v:before-render>
+            </v:text>.
+            <v:text name="mass_tbo" xhtml_size="15" value="">
+              <v:before-render>
+                control.ufl_value := '';
+              </v:before-render>
+            </v:text>.[TABLE]
+            <v:button name="mass_set" action="simple" value="Set To All">
+              <v:on-post>
+                <![CDATA[
+                  declare i, l,dst_arr,tmp_arr any;
+                  declare _views integer;
+                  declare p1, p2, p3 varchar;
+                  _views := 0;
+            
+            
+                  if (self.mass_tbq.ufl_value <> '' or self.mass_tbo.ufl_value <> '') {
+                    _loop:;
+            	      i := 0;
+            	        dst_arr := self.selcust;
+            	      l := length(dst_arr);
+            	      while (i < l) {
+            	        tmp_arr := dst_arr[i];
+            	        
+            	        p1 := name_part(tmp_arr, 0);   
+            	        p2 := self.repl_snap_dsn;   
+            	        p3 := name_part(tmp_arr, 2);   
+            	                                  	        
+            	        if (self.mass_tbq.ufl_value <> '')
+            	          p1 := self.mass_tbq.ufl_value;
+            	        if (self.mass_tbo.ufl_value <> '')
+            	          p2 := self.mass_tbo.ufl_value;
+            	        aset(dst_arr,i,concat(p1,'.',p2,'.',p3));  
+            	        i:= i + 1;
+            	      };
+              	    
+              	    self.selcustall := dst_arr;
+            	      if (_views = 0)
+            	      {
+            	        _views := 1;
+            	        goto _loop;
+            	      };
+            	      self.vc_data_bind(e);
+                  };
+                ]]>
+              </v:on-post>
+            </v:button>
+          </div>        
           <table class="listing" rules="groups">
             <colgroup/><colgroup/>
             <thead>
@@ -577,9 +630,22 @@ self.vc_data_bind(e);
               while (_idx < length(self.selcust))
               {
                 _tblname := self.selcust[_idx];
-                _idx := _idx + 1;
+                
+                declare l1 integer;
+                declare _tblname2 any;
                 declare _attached_name varchar;
+                
+                l1 := length(self.selcustall);
+                
+                if (l1 ) 
+                {
+                  _tblname2 := self.selcustall[_idx];  
+                  _attached_name := _tblname2;                  
+                }else{
                 _attached_name := att_local_name(self.repl_snap_dsn, name_part(_tblname, 2));
+                };   
+                
+                _idx := _idx + 1;
                 self.r_count := self.r_count + 1;
                 http (sprintf ('<tr class="%s">', case when mod (self.r_count, 2) then 'listing_row_odd' else 'listing_row_even' end));
                 http ('<td class="listing_col"><img src="images/icons/table_16.png" alt="Table" title="Table"/></td>');
diff --git a/binsrc/yacutia/db_repl_snap_local.vspx b/binsrc/yacutia/db_repl_snap_local.vspx
index 37ae9e1..59a6ffb 100644
--- a/binsrc/yacutia/db_repl_snap_local.vspx
+++ b/binsrc/yacutia/db_repl_snap_local.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_local.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_snap_local.vspx,v 1.2.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -69,10 +69,10 @@
         </colgroup>
         <tr>
           <td class="page_tab" align="center">
-            <v:url name="b_url31" value="Local to Remote" url="db_repl_snap.vspx"/>
+            <v:url name="b_url31" value="Remote to Local" url="db_repl_snap_pull.vspx"/>
           </td>
           <td class="page_tab" align="center">
-            <v:url name="b_url31" value="Remote to Local" url="db_repl_snap_pull.vspx"/>
+            <v:url name="b_url32" value="Local to Remote" url="db_repl_snap.vspx"/>
           </td>
           <td class="page_tab_selected" align="center">Local to Local</td>
           <td class="page_tab_empty"></td>
diff --git a/binsrc/yacutia/db_repl_snap_local_create.vspx b/binsrc/yacutia/db_repl_snap_local_create.vspx
index b3e756c..60951e0 100644
--- a/binsrc/yacutia/db_repl_snap_local_create.vspx
+++ b/binsrc/yacutia/db_repl_snap_local_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_local_create.vspx,v 1.2.2.3 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_snap_local_create.vspx,v 1.2.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -54,6 +54,7 @@
       <v:variable name="dsrws" type="any" default="null" />
       <!-- keep the selection -->
       <v:variable name="selcust" type="any" default="null" />
+      <v:variable name="selcustall" type="any" default="null" />        
     </vm:variables>
     <vm:menu>
       <vm:menuitem name="vers" value="Snapshot"/>
@@ -352,6 +353,58 @@ self.vc_data_bind(e);
       <v:template name="link_template" type="simple" enabled="-- equ(self.repl_snap_local_stage, 2)">
         <h3>Step 2: Choose Destinations Parameters</h3>
         <v:form name="link2_form" action="db_repl_snap_local_create.vspx" method="POST" type="simple">
+          <div class="listing_top_ctl_grp">
+            <v:text name="mass_tbq" xhtml_size="3" value="">
+              <v:before-render>
+                control.ufl_value := '';
+              </v:before-render>
+            </v:text>.
+            <v:text name="mass_tbo" xhtml_size="15" value="">
+              <v:before-render>
+                control.ufl_value := '';
+              </v:before-render>
+            </v:text>.[TABLE]
+            <v:button name="mass_set" action="simple" value="Set To All">
+              <v:on-post>
+                <![CDATA[
+                  declare i, l,dst_arr,tmp_arr any;
+                  declare _views integer;
+                  declare p1, p2, p3 varchar;
+                  _views := 0;
+            
+            
+                  if (self.mass_tbq.ufl_value <> '' or self.mass_tbo.ufl_value <> '') {
+                    _loop:;
+            	      i := 0;
+            	        dst_arr := self.selcust;
+            	      l := length(dst_arr);
+            	      while (i < l) {
+            	        tmp_arr := dst_arr[i];
+            	        
+            	        p1 := name_part(tmp_arr, 0);   
+            	        p2 := name_part(tmp_arr, 1); 
+            	        p3 := name_part(tmp_arr, 2);   
+            	                                  	        
+            	        if (self.mass_tbq.ufl_value <> '')
+            	          p1 := self.mass_tbq.ufl_value;
+            	        if (self.mass_tbo.ufl_value <> '')
+            	          p2 := self.mass_tbo.ufl_value;
+            	        aset(dst_arr,i,concat(p1,'.',p2,'.',p3));  
+            	        i:= i + 1;
+            	      };
+              	    
+              	    self.selcustall := dst_arr;
+            	      if (_views = 0)
+            	      {
+            	        _views := 1;
+            	        goto _loop;
+            	      };
+            	      -- self.vc_data_bind(e);
+                  };
+                ]]>
+              </v:on-post>
+            </v:button>
+          </div>  
           <table class="listing" rules="groups">
             <colgroup/><colgroup/>
             <thead>
@@ -368,14 +421,33 @@ self.vc_data_bind(e);
               while (_idx < length(self.selcust))
               {
                 _tblname := self.selcust[_idx];
+                
+                declare l1 integer;
+                declare _tblname2 any;
+                declare _attached_name1, _attached_name2 varchar;
+                
+                l1 := length(self.selcustall);
+                
+                if (l1 ) 
+                {
+                  _tblname2 := self.selcustall[_idx];  
+                  _attached_name1 := name_part(_tblname2, 0);                  
+                  _attached_name2 := name_part(_tblname2, 1);                                    
+                }
+                else
+                {
+                   _attached_name1 := coalesce (user_get_option(connection_get ('vspx_user'),'LOGIN_QUALIFIER'), 'DB');
+                   _attached_name2 := connection_get ('vspx_user');
+                };  
+                
                 _idx := _idx + 1;
                 self.r_count := self.r_count + 1;
                 http (sprintf ('<tr class="%s">', case when mod (self.r_count, 2) then 'listing_row_odd' else 'listing_row_even' end));
                 http ('<td class="listing_col"><img src="images/icons/table_16.png" alt="Table" title="Table"/></td>');
                 http(sprintf ('<td>%V</td>', _tblname));
                 http(sprintf ('<td><input type="checkbox" name="LTB_cr_%s" value="on" checked="checked"/>', _tblname));
-                http(sprintf ('<input type="text" size="3" name="LTBQ_%s" value="%s"/>.', _tblname, coalesce (user_get_option(connection_get ('vspx_user'),'LOGIN_QUALIFIER'), 'DB')));
-                http(sprintf ('<input type="text" size="15" name="LTBO_%s" value="%s">.', _tblname, connection_get ('vspx_user')));
+                http(sprintf ('<input type="text" size="3" name="LTBQ_%s" value="%s"/>.', _tblname, _attached_name1));
+                http(sprintf ('<input type="text" size="15" name="LTBO_%s" value="%s">.', _tblname, _attached_name2));
                 http(sprintf ('<input type="text" size="30" name="LTBN_%s" value="%s">', _tblname, name_part(_tblname, 2)));
                 http(sprintf ('<input type="hidden" name="tbls" value="%s"></td>', _tblname));
                 http('</tr>');
diff --git a/binsrc/yacutia/db_repl_snap_local_start.vspx b/binsrc/yacutia/db_repl_snap_local_start.vspx
index d7f99bb..af3ca62 100644
--- a/binsrc/yacutia/db_repl_snap_local_start.vspx
+++ b/binsrc/yacutia/db_repl_snap_local_start.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_local_start.vspx,v 1.2.2.4 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_snap_local_start.vspx,v 1.2.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_snap_pull.vspx b/binsrc/yacutia/db_repl_snap_pull.vspx
index 6ee94b7..427b843 100644
--- a/binsrc/yacutia/db_repl_snap_pull.vspx
+++ b/binsrc/yacutia/db_repl_snap_pull.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_pull.vspx,v 1.2.2.4 2010/09/20 10:16:40 source Exp $
+ -  $Id: db_repl_snap_pull.vspx,v 1.2.2.6 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -68,12 +68,12 @@
           <col/>
         </colgroup>
         <tr>
+          <td class="page_tab_selected" align="center">Remote to Local</td>        
           <td class="page_tab" align="center">
             <v:url name="b_url31" value="Local to Remote" url="db_repl_snap.vspx"/>
           </td>
-          <td class="page_tab_selected" align="center">Remote to Local</td>
           <td class="page_tab" align="center">
-            <v:url name="b_url31" value="Local to Local" url="db_repl_snap_local.vspx"/>
+            <v:url name="b_url32" value="Local to Local" url="db_repl_snap_local.vspx"/>
           </td>
           <td class="page_tab_empty"></td>
         </tr>
diff --git a/binsrc/yacutia/db_repl_snap_pull_create.vspx b/binsrc/yacutia/db_repl_snap_pull_create.vspx
index ec073e9..f31129f 100644
--- a/binsrc/yacutia/db_repl_snap_pull_create.vspx
+++ b/binsrc/yacutia/db_repl_snap_pull_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_pull_create.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_snap_pull_create.vspx,v 1.2.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -54,6 +54,7 @@
       <v:variable name="dsrws" type="any" default="null" />
       <!-- keep the selection -->
       <v:variable name="selcust" type="any" default="null" />
+      <v:variable name="selcustall" type="any" default="null" />      
     </vm:variables>
     <vm:menu>
       <vm:menuitem name="vers" value="Snapshot"/>
@@ -357,6 +358,58 @@ self.vc_data_bind(e);
       <v:template name="link_template" type="simple" enabled="-- equ(self.repl_snap_pull_stage, 2)">
         <h3>Step 2: Choose Destinations Parameters</h3>
         <v:form name="link2_form" action="db_repl_snap_pull_create.vspx" method="POST" type="simple">
+          <div class="listing_top_ctl_grp">
+            <v:text name="mass_tbq" xhtml_size="3" value="">
+              <v:before-render>
+                control.ufl_value := '';
+              </v:before-render>
+            </v:text>.
+            <v:text name="mass_tbo" xhtml_size="15" value="">
+              <v:before-render>
+                control.ufl_value := '';
+              </v:before-render>
+            </v:text>.[TABLE]
+            <v:button name="mass_set" action="simple" value="Set To All">
+              <v:on-post>
+                <![CDATA[
+                  declare i, l,dst_arr,tmp_arr any;
+                  declare _views integer;
+                  declare p1, p2, p3 varchar;
+                  _views := 0;
+            
+            
+                  if (self.mass_tbq.ufl_value <> '' or self.mass_tbo.ufl_value <> '') {
+                    _loop:;
+            	      i := 0;
+            	        dst_arr := self.selcust;
+            	      l := length(dst_arr);
+            	      while (i < l) {
+            	        tmp_arr := dst_arr[i];
+            	        
+            	        p1 := name_part(tmp_arr, 0);   
+            	        p2 := name_part(tmp_arr, 1); 
+            	        p3 := name_part(tmp_arr, 2);   
+            	                                  	        
+            	        if (self.mass_tbq.ufl_value <> '')
+            	          p1 := self.mass_tbq.ufl_value;
+            	        if (self.mass_tbo.ufl_value <> '')
+            	          p2 := self.mass_tbo.ufl_value;
+            	        aset(dst_arr,i,concat(p1,'.',p2,'.',p3));  
+            	        i:= i + 1;
+            	      };
+              	    
+              	    self.selcustall := dst_arr;
+            	      if (_views = 0)
+            	      {
+            	        _views := 1;
+            	        goto _loop;
+            	      };
+            	      self.vc_data_bind(e);
+                  };
+                ]]>
+              </v:on-post>
+            </v:button>
+          </div>  
           <table class="listing" rules="groups">
             <colgroup/><colgroup/>
             <thead>
@@ -373,14 +426,33 @@ self.vc_data_bind(e);
               while (_idx < length(self.selcust))
               {
                 _tblname := self.selcust[_idx];
+                
+                declare l1 integer;
+                declare _tblname2 any;
+                declare _attached_name1, _attached_name2 varchar;
+                
+                l1 := length(self.selcustall);
+                
+                if (l1 ) 
+                {
+                  _tblname2 := self.selcustall[_idx];  
+                  _attached_name1 := name_part(_tblname2, 0);                  
+                  _attached_name2 := name_part(_tblname2, 1);                                    
+                }
+                else
+                {
+                   _attached_name1 := coalesce (user_get_option(connection_get ('vspx_user'),'LOGIN_QUALIFIER'), 'DB');
+                   _attached_name2 := connection_get ('vspx_user');
+                };   
+                
                 _idx := _idx + 1;
                 self.r_count := self.r_count + 1;
                 http (sprintf ('<tr class="%s">', case when mod (self.r_count, 2) then 'listing_row_odd' else 'listing_row_even' end));
                 http ('<td class="listing_col"><img src="images/icons/table_16.png" alt="Table" title="Table"/></td>');
                 http(sprintf ('<td>%V</td>', _tblname));
                 http(sprintf ('<td><input type="checkbox" name="LTB_cr_%s" value="on" checked="checked"/>', _tblname));
-                http(sprintf ('<input type="text" size="3" name="LTBQ_%s" value="%s"/>.', _tblname, coalesce (user_get_option(connection_get ('vspx_user'),'LOGIN_QUALIFIER'), 'DB')));
-                http(sprintf ('<input type="text" size="15" name="LTBO_%s" value="%s">.', _tblname, connection_get ('vspx_user')));
+                http(sprintf ('<input type="text" size="3" name="LTBQ_%s" value="%s"/>.', _tblname, _attached_name1));
+                http(sprintf ('<input type="text" size="15" name="LTBO_%s" value="%s">.', _tblname, _attached_name2));
                 http(sprintf ('<input type="text" size="30" name="LTBN_%s" value="%s">', _tblname, name_part(_tblname, 2)));
                 http(sprintf ('<input type="hidden" name="tbls" value="%s"></td>', _tblname));
                 http('</tr>');
diff --git a/binsrc/yacutia/db_repl_snap_pull_start.vspx b/binsrc/yacutia/db_repl_snap_pull_start.vspx
index 20305d8..26851ef 100644
--- a/binsrc/yacutia/db_repl_snap_pull_start.vspx
+++ b/binsrc/yacutia/db_repl_snap_pull_start.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_pull_start.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_snap_pull_start.vspx,v 1.2.2.4 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_snap_start.vspx b/binsrc/yacutia/db_repl_snap_start.vspx
index 4c59d95..049e694 100644
--- a/binsrc/yacutia/db_repl_snap_start.vspx
+++ b/binsrc/yacutia/db_repl_snap_start.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_snap_start.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_snap_start.vspx,v 1.2.2.4 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_sub.vspx b/binsrc/yacutia/db_repl_sub.vspx
index b685d60..301a341 100644
--- a/binsrc/yacutia/db_repl_sub.vspx
+++ b/binsrc/yacutia/db_repl_sub.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: db_repl_sub.vspx,v 1.3.2.4 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_sub.vspx,v 1.3.2.5 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_sub_create.vspx b/binsrc/yacutia/db_repl_sub_create.vspx
index f3fc4e2..b2db2d9 100644
--- a/binsrc/yacutia/db_repl_sub_create.vspx
+++ b/binsrc/yacutia/db_repl_sub_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_sub_create.vspx,v 1.4.2.5 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_sub_create.vspx,v 1.4.2.6 2012/03/08 12:55:27 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_sub_edit.vspx b/binsrc/yacutia/db_repl_sub_edit.vspx
index cf1b071..1651ab7 100644
--- a/binsrc/yacutia/db_repl_sub_edit.vspx
+++ b/binsrc/yacutia/db_repl_sub_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_sub_edit.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_sub_edit.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_sub_image.vspx b/binsrc/yacutia/db_repl_sub_image.vspx
index 283ad6e..5ab41a9 100644
--- a/binsrc/yacutia/db_repl_sub_image.vspx
+++ b/binsrc/yacutia/db_repl_sub_image.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: db_repl_sub_image.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_sub_image.vspx,v 1.2.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -43,7 +43,6 @@
         </colgroup>
         <tr>
           <td class="page_tab">
-            Publications
             <v:url name="b_url13" value="Publications" url="db_repl_trans.vspx?page=1"/>
           </td>
           <td class="page_tab_selected">Subscriptions
diff --git a/binsrc/yacutia/db_repl_sub_new_inc.vspx b/binsrc/yacutia/db_repl_sub_new_inc.vspx
index 49196cd..2ce060e 100644
--- a/binsrc/yacutia/db_repl_sub_new_inc.vspx
+++ b/binsrc/yacutia/db_repl_sub_new_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: db_repl_sub_new_inc.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_sub_new_inc.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/db_repl_trans.vspx b/binsrc/yacutia/db_repl_trans.vspx
index 8d031b5..f11a1f8 100644
--- a/binsrc/yacutia/db_repl_trans.vspx
+++ b/binsrc/yacutia/db_repl_trans.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: db_repl_trans.vspx,v 1.2.2.3 2010/09/20 10:16:41 source Exp $
+ -  $Id: db_repl_trans.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/error.vspx b/binsrc/yacutia/error.vspx
index 35cca06..2a1377a 100644
--- a/binsrc/yacutia/error.vspx
+++ b/binsrc/yacutia/error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: error.vspx,v 1.4.2.3 2010/09/20 10:16:42 source Exp $
+ -  $Id: error.vspx,v 1.4.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/fb_popup.vspx b/binsrc/yacutia/fb_popup.vspx
index 627a821..3e40285 100644
--- a/binsrc/yacutia/fb_popup.vspx
+++ b/binsrc/yacutia/fb_popup.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: fb_popup.vspx,v 1.1.2.2 2010/09/20 10:16:42 source Exp $
+ -  $Id: fb_popup.vspx,v 1.1.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/file_browser.xsl b/binsrc/yacutia/file_browser.xsl
index dfd3e94..50b6732 100644
--- a/binsrc/yacutia/file_browser.xsl
+++ b/binsrc/yacutia/file_browser.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: file_browser.xsl,v 1.4.2.3 2010/09/20 10:16:42 source Exp $
+ -  $Id: file_browser.xsl,v 1.4.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/file_save.vsp b/binsrc/yacutia/file_save.vsp
index 4248979..2170bd8 100644
--- a/binsrc/yacutia/file_save.vsp
+++ b/binsrc/yacutia/file_save.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: file_save.vsp,v 1.3.2.3 2010/09/20 10:16:42 source Exp $
+--  $Id: file_save.vsp,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/form.xsl b/binsrc/yacutia/form.xsl
index 14f1472..60b7ccb 100644
--- a/binsrc/yacutia/form.xsl
+++ b/binsrc/yacutia/form.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: form.xsl,v 1.2.2.2 2010/09/20 10:16:42 source Exp $
+ -  $Id: form.xsl,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help.vspx b/binsrc/yacutia/help.vspx
index ddf05fc..8576b80 100644
--- a/binsrc/yacutia/help.vspx
+++ b/binsrc/yacutia/help.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: help.vspx,v 1.3.2.3 2011/01/25 14:21:43 source Exp $
+ -  $Id: help.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help.xsl b/binsrc/yacutia/help.xsl
index 4cc1c69..ecebecd 100644
--- a/binsrc/yacutia/help.xsl
+++ b/binsrc/yacutia/help.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -
- -  $Id: help.xsl,v 1.2.2.2 2010/09/20 10:16:42 source Exp $
+ -  $Id: help.xsl,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/account_create.xml b/binsrc/yacutia/help/account_create.xml
index 8d7cd1c..41775a3 100644
--- a/binsrc/yacutia/help/account_create.xml
+++ b/binsrc/yacutia/help/account_create.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/caps_browser.xml b/binsrc/yacutia/help/caps_browser.xml
index f39a06d..7206129 100644
--- a/binsrc/yacutia/help/caps_browser.xml
+++ b/binsrc/yacutia/help/caps_browser.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/dav_browser_search.xml b/binsrc/yacutia/help/dav_browser_search.xml
index d1b746c..5579397 100644
--- a/binsrc/yacutia/help/dav_browser_search.xml
+++ b/binsrc/yacutia/help/dav_browser_search.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/http_server_management.xml b/binsrc/yacutia/help/http_server_management.xml
index 160e3b9..ce4e177 100644
--- a/binsrc/yacutia/help/http_server_management.xml
+++ b/binsrc/yacutia/help/http_server_management.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/inifile.xml b/binsrc/yacutia/help/inifile.xml
index d4cebaa..93bb836 100644
--- a/binsrc/yacutia/help/inifile.xml
+++ b/binsrc/yacutia/help/inifile.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/sec_auth_serv.xml b/binsrc/yacutia/help/sec_auth_serv.xml
index 2357017..f95eb4b 100644
--- a/binsrc/yacutia/help/sec_auth_serv.xml
+++ b/binsrc/yacutia/help/sec_auth_serv.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/soap_services.xml b/binsrc/yacutia/help/soap_services.xml
index 8006d76..2ffde6f 100644
--- a/binsrc/yacutia/help/soap_services.xml
+++ b/binsrc/yacutia/help/soap_services.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/soap_services_edit.xml b/binsrc/yacutia/help/soap_services_edit.xml
index b1f04fb..900eb22 100644
--- a/binsrc/yacutia/help/soap_services_edit.xml
+++ b/binsrc/yacutia/help/soap_services_edit.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/url_rewrite.xml b/binsrc/yacutia/help/url_rewrite.xml
index 3a96b40..50b0f45 100644
--- a/binsrc/yacutia/help/url_rewrite.xml
+++ b/binsrc/yacutia/help/url_rewrite.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/vdb_obj_link_opts.xml b/binsrc/yacutia/help/vdb_obj_link_opts.xml
index 48e83ff..9474e50 100644
--- a/binsrc/yacutia/help/vdb_obj_link_opts.xml
+++ b/binsrc/yacutia/help/vdb_obj_link_opts.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/help/xquery.xml b/binsrc/yacutia/help/xquery.xml
index 4bcce0c..9298b2b 100644
--- a/binsrc/yacutia/help/xquery.xml
+++ b/binsrc/yacutia/help/xquery.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_grant.vspx b/binsrc/yacutia/hosted_grant.vspx
index a29ad03..5d4ceaf 100644
--- a/binsrc/yacutia/hosted_grant.vspx
+++ b/binsrc/yacutia/hosted_grant.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_grant.vspx,v 1.3.2.3 2010/09/20 10:16:42 source Exp $
+ -  $Id: hosted_grant.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_import.vspx b/binsrc/yacutia/hosted_import.vspx
index bf36e1a..246199a 100644
--- a/binsrc/yacutia/hosted_import.vspx
+++ b/binsrc/yacutia/hosted_import.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_import.vspx,v 1.3.2.3 2010/09/20 10:16:42 source Exp $
+ -  $Id: hosted_import.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_modules.vspx b/binsrc/yacutia/hosted_modules.vspx
index cebd871..6d14e52 100644
--- a/binsrc/yacutia/hosted_modules.vspx
+++ b/binsrc/yacutia/hosted_modules.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_modules.vspx,v 1.3.2.3 2010/09/20 10:16:42 source Exp $
+ -  $Id: hosted_modules.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_modules_load_results.vspx b/binsrc/yacutia/hosted_modules_load_results.vspx
index 06d5fb1..4578682 100644
--- a/binsrc/yacutia/hosted_modules_load_results.vspx
+++ b/binsrc/yacutia/hosted_modules_load_results.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_modules_load_results.vspx,v 1.2.2.2 2010/09/20 10:16:42 source Exp $
+ -  $Id: hosted_modules_load_results.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_modules_select.vspx b/binsrc/yacutia/hosted_modules_select.vspx
index 414d4db..5a0461a 100644
--- a/binsrc/yacutia/hosted_modules_select.vspx
+++ b/binsrc/yacutia/hosted_modules_select.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_modules_select.vspx,v 1.2.2.2 2010/09/20 10:16:42 source Exp $
+ -  $Id: hosted_modules_select.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_modules_select2.vspx b/binsrc/yacutia/hosted_modules_select2.vspx
index 832eadb..5e9000a 100644
--- a/binsrc/yacutia/hosted_modules_select2.vspx
+++ b/binsrc/yacutia/hosted_modules_select2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_modules_select2.vspx,v 1.3.2.2 2010/09/20 10:16:42 source Exp $
+ -  $Id: hosted_modules_select2.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_modules_show_sql.vsp b/binsrc/yacutia/hosted_modules_show_sql.vsp
index 023fe96..ee86cc3 100644
--- a/binsrc/yacutia/hosted_modules_show_sql.vsp
+++ b/binsrc/yacutia/hosted_modules_show_sql.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: hosted_modules_show_sql.vsp,v 1.2.2.2 2010/09/20 10:16:43 source Exp $
+--  $Id: hosted_modules_show_sql.vsp,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/hosted_page.vspx b/binsrc/yacutia/hosted_page.vspx
index 173f2a1..0c7ebba 100644
--- a/binsrc/yacutia/hosted_page.vspx
+++ b/binsrc/yacutia/hosted_page.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: hosted_page.vspx,v 1.2.2.3 2010/09/20 10:16:43 source Exp $
+ -  $Id: hosted_page.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_add_path.vspx b/binsrc/yacutia/http_add_path.vspx
index 65613fa..3fdaa63 100644
--- a/binsrc/yacutia/http_add_path.vspx
+++ b/binsrc/yacutia/http_add_path.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_add_path.vspx,v 1.5.2.5 2010/11/19 16:43:47 source Exp $
+ -  $Id: http_add_path.vspx,v 1.5.2.6 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_del_path.vspx b/binsrc/yacutia/http_del_path.vspx
index 727007e..23dfc33 100644
--- a/binsrc/yacutia/http_del_path.vspx
+++ b/binsrc/yacutia/http_del_path.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_del_path.vspx,v 1.4.2.4 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_del_path.vspx,v 1.4.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_edit_paths.vspx b/binsrc/yacutia/http_edit_paths.vspx
index a45b1aa..b7e7039 100644
--- a/binsrc/yacutia/http_edit_paths.vspx
+++ b/binsrc/yacutia/http_edit_paths.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_edit_paths.vspx,v 1.5.2.4 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_edit_paths.vspx,v 1.5.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_host_clone.vspx b/binsrc/yacutia/http_host_clone.vspx
index 935d78e..b5719d5 100644
--- a/binsrc/yacutia/http_host_clone.vspx
+++ b/binsrc/yacutia/http_host_clone.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_host_clone.vspx,v 1.7.2.4 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_host_clone.vspx,v 1.7.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_host_edit.vspx b/binsrc/yacutia/http_host_edit.vspx
index b948266..ae87cae 100644
--- a/binsrc/yacutia/http_host_edit.vspx
+++ b/binsrc/yacutia/http_host_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_host_edit.vspx,v 1.7.2.8 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_host_edit.vspx,v 1.7.2.9 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_listeners.vspx b/binsrc/yacutia/http_listeners.vspx
index 759666b..451457a 100644
--- a/binsrc/yacutia/http_listeners.vspx
+++ b/binsrc/yacutia/http_listeners.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: http_listeners.vspx,v 1.2.2.3 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_listeners.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_serv_mgmt.vspx b/binsrc/yacutia/http_serv_mgmt.vspx
index 342c8e0..5f45714 100644
--- a/binsrc/yacutia/http_serv_mgmt.vspx
+++ b/binsrc/yacutia/http_serv_mgmt.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_serv_mgmt.vspx,v 1.14.2.7 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_serv_mgmt.vspx,v 1.14.2.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_serv_monitoring.vspx b/binsrc/yacutia/http_serv_monitoring.vspx
index 0b0d8c6..a3480d6 100644
--- a/binsrc/yacutia/http_serv_monitoring.vspx
+++ b/binsrc/yacutia/http_serv_monitoring.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: http_serv_monitoring.vspx,v 1.3.2.2 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_serv_monitoring.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_tcn.vspx b/binsrc/yacutia/http_tcn.vspx
index f270e9f..b2e019b 100644
--- a/binsrc/yacutia/http_tcn.vspx
+++ b/binsrc/yacutia/http_tcn.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_tcn.vspx,v 1.2.2.2 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_tcn.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/http_url_rewrite.vspx b/binsrc/yacutia/http_url_rewrite.vspx
index d42088a..6e0cf19 100644
--- a/binsrc/yacutia/http_url_rewrite.vspx
+++ b/binsrc/yacutia/http_url_rewrite.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: http_url_rewrite.vspx,v 1.14.2.3 2010/09/20 10:16:43 source Exp $
+ -  $Id: http_url_rewrite.vspx,v 1.14.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ie.vspx b/binsrc/yacutia/ie.vspx
index 78f9664..12fbd69 100644
--- a/binsrc/yacutia/ie.vspx
+++ b/binsrc/yacutia/ie.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ie.vspx,v 1.2.2.3 2010/09/20 10:16:43 source Exp $
+ -  $Id: ie.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ie_browser.vspx b/binsrc/yacutia/ie_browser.vspx
index 01dd0df..52c0f13 100644
--- a/binsrc/yacutia/ie_browser.vspx
+++ b/binsrc/yacutia/ie_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ie_browser.vspx,v 1.3.2.2 2010/09/20 10:16:44 source Exp $
+ -  $Id: ie_browser.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ie_export.vspx b/binsrc/yacutia/ie_export.vspx
index ea753c7..b757231 100644
--- a/binsrc/yacutia/ie_export.vspx
+++ b/binsrc/yacutia/ie_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ie_export.vspx,v 1.4.2.3 2010/09/20 10:16:44 source Exp $
+ -  $Id: ie_export.vspx,v 1.4.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ie_import.vspx b/binsrc/yacutia/ie_import.vspx
index c267284..fee7df0 100644
--- a/binsrc/yacutia/ie_import.vspx
+++ b/binsrc/yacutia/ie_import.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ie_import.vspx,v 1.4.2.3 2010/09/20 10:16:44 source Exp $
+ -  $Id: ie_import.vspx,v 1.4.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/images/icons/copy_16.png b/binsrc/yacutia/images/icons/copy_16.png
new file mode 100644
index 0000000..0a54e3f
Binary files /dev/null and b/binsrc/yacutia/images/icons/copy_16.png differ
diff --git a/binsrc/yacutia/import_csv_1.vspx b/binsrc/yacutia/import_csv_1.vspx
index 071e324..fcc2fdc 100644
--- a/binsrc/yacutia/import_csv_1.vspx
+++ b/binsrc/yacutia/import_csv_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: import_csv_1.vspx,v 1.1.2.6 2010/09/20 10:16:44 source Exp $
+ -  $Id: import_csv_1.vspx,v 1.1.2.7 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/import_csv_2.vspx b/binsrc/yacutia/import_csv_2.vspx
index 2776e2e..5cacb1e 100644
--- a/binsrc/yacutia/import_csv_2.vspx
+++ b/binsrc/yacutia/import_csv_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: import_csv_2.vspx,v 1.1.2.6 2010/09/20 10:16:44 source Exp $
+ -  $Id: import_csv_2.vspx,v 1.1.2.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -212,8 +212,16 @@
 		    }
 		  else
 		    nrec := tmp;
-		     
-		  self.vc_redirect (sprintf ('import_csv_3.vspx?tb=%U&nrec=%d&err=%U', tb, nrec, err));
+		  declare msg_path any;
+		  msg_path := sprintf ('/DAV/temp/%s.xml', xenc_rand_bytes (10, 1));    
+		  if (length (err))
+		    {
+		      YACUTIA_DAV_COL_CREATE('/DAV/temp/', '111101101N', 'dav', 'administrators');
+		      DB.DBA.YACUTIA_DAV_RES_UPLOAD (msg_path, err, '', '111101101N', 'dav', 'administrators', now(), now(), null);
+		    }   
+		  else
+                    msg_path := '';
+		  self.vc_redirect (sprintf ('import_csv_3.vspx?tb=%U&nrec=%d&err=%U', tb, nrec, msg_path));
                   ]]>
                 </v:on-post>
               </v:button>
diff --git a/binsrc/yacutia/import_csv_3.vspx b/binsrc/yacutia/import_csv_3.vspx
index d5c5ada..7a88b5b 100644
--- a/binsrc/yacutia/import_csv_3.vspx
+++ b/binsrc/yacutia/import_csv_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: import_csv_3.vspx,v 1.1.2.5 2010/09/20 10:16:44 source Exp $
+ -  $Id: import_csv_3.vspx,v 1.1.2.7 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -51,8 +51,11 @@
 	  <?vsp
 	  if (length (self.err))
 	    {
-	      declare xt, xp any;
-	      xt := xtree_doc (self.err);
+	      declare xt, xp, err_text any;
+              err_text := (select RES_CONTENT from WS.WS.SYS_DAV_RES where RES_FULL_PATH = self.err); 
+	      xt := xtree_doc (err_text);
+	      delete from WS.WS.SYS_DAV_RES where RES_FULL_PATH = self.err; 
+	      commit work;
 	      xp := xpath_eval ('/error', xt, 0); 
 	      if (length (xp))
 	        http_value ('Errors', 'div');
diff --git a/binsrc/yacutia/import_csv_opts.vspx b/binsrc/yacutia/import_csv_opts.vspx
index 7b1c2ce..d496a72 100644
--- a/binsrc/yacutia/import_csv_opts.vspx
+++ b/binsrc/yacutia/import_csv_opts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: import_csv_opts.vspx,v 1.1.2.7 2011/03/23 12:03:54 source Exp $
+ -  $Id: import_csv_opts.vspx,v 1.1.2.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile.vspx b/binsrc/yacutia/inifile.vspx
index e46537c..bbd684e 100644
--- a/binsrc/yacutia/inifile.vspx
+++ b/binsrc/yacutia/inifile.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: inifile.vspx,v 1.3.2.4 2011/01/25 14:21:43 source Exp $
+ -  $Id: inifile.vspx,v 1.3.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile.xml b/binsrc/yacutia/inifile.xml
index 5908b27..c2c9498 100644
--- a/binsrc/yacutia/inifile.xml
+++ b/binsrc/yacutia/inifile.xml
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: inifile.xml,v 1.1.1.1.2.3 2010/09/20 10:16:44 source Exp $
+ -  $Id: inifile.xml,v 1.1.1.1.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile.xsl b/binsrc/yacutia/inifile.xsl
index 4ea8848..e15d00c 100644
--- a/binsrc/yacutia/inifile.xsl
+++ b/binsrc/yacutia/inifile.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile.xsl,v 1.4.2.2 2010/09/20 10:16:44 source Exp $
+ -  $Id: inifile.xsl,v 1.4.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_autorepair.vspx b/binsrc/yacutia/inifile_autorepair.vspx
index f31ba57..2f8c79b 100644
--- a/binsrc/yacutia/inifile_autorepair.vspx
+++ b/binsrc/yacutia/inifile_autorepair.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_autorepair.vspx,v 1.2.2.2 2010/09/20 10:16:44 source Exp $
+ -  $Id: inifile_autorepair.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_autorepair_inc.vspx b/binsrc/yacutia/inifile_autorepair_inc.vspx
index 3b32434..7fae787 100644
--- a/binsrc/yacutia/inifile_autorepair_inc.vspx
+++ b/binsrc/yacutia/inifile_autorepair_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_autorepair_inc.vspx,v 1.3.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_autorepair_inc.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_client.vspx b/binsrc/yacutia/inifile_client.vspx
index 0d376db..62c4575 100644
--- a/binsrc/yacutia/inifile_client.vspx
+++ b/binsrc/yacutia/inifile_client.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_client.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_client.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_client_inc.vspx b/binsrc/yacutia/inifile_client_inc.vspx
index a7958cb..82cd339 100644
--- a/binsrc/yacutia/inifile_client_inc.vspx
+++ b/binsrc/yacutia/inifile_client_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_client_inc.vspx,v 1.3.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_client_inc.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_database.vspx b/binsrc/yacutia/inifile_database.vspx
index 43b15d4..b5fcabb 100644
--- a/binsrc/yacutia/inifile_database.vspx
+++ b/binsrc/yacutia/inifile_database.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_database.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_database.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_database_inc.vspx b/binsrc/yacutia/inifile_database_inc.vspx
index 748309e..c9dbc0c 100644
--- a/binsrc/yacutia/inifile_database_inc.vspx
+++ b/binsrc/yacutia/inifile_database_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_database_inc.vspx,v 1.3.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_database_inc.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_engine.vspx b/binsrc/yacutia/inifile_engine.vspx
index c69d98d..ef59ac3 100644
--- a/binsrc/yacutia/inifile_engine.vspx
+++ b/binsrc/yacutia/inifile_engine.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_engine.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_engine.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_engine_inc.vspx b/binsrc/yacutia/inifile_engine_inc.vspx
index 57b2e72..331fe4f 100644
--- a/binsrc/yacutia/inifile_engine_inc.vspx
+++ b/binsrc/yacutia/inifile_engine_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_engine_inc.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_engine_inc.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_http.vspx b/binsrc/yacutia/inifile_http.vspx
index d939d3e..408a10d 100644
--- a/binsrc/yacutia/inifile_http.vspx
+++ b/binsrc/yacutia/inifile_http.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_http.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_http.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_http_inc.vspx b/binsrc/yacutia/inifile_http_inc.vspx
index 71219b9..13a3819 100644
--- a/binsrc/yacutia/inifile_http_inc.vspx
+++ b/binsrc/yacutia/inifile_http_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_http_inc.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_http_inc.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_metadata.xml b/binsrc/yacutia/inifile_metadata.xml
index b03a0ae..aa6df27 100644
--- a/binsrc/yacutia/inifile_metadata.xml
+++ b/binsrc/yacutia/inifile_metadata.xml
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: inifile_metadata.xml,v 1.1.1.1.2.3 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_metadata.xml,v 1.1.1.1.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_repl.vspx b/binsrc/yacutia/inifile_repl.vspx
index 1ca9069..86d7e62 100644
--- a/binsrc/yacutia/inifile_repl.vspx
+++ b/binsrc/yacutia/inifile_repl.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_repl.vspx,v 1.2.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_repl.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_repl_inc.vspx b/binsrc/yacutia/inifile_repl_inc.vspx
index a471002..c805e95 100644
--- a/binsrc/yacutia/inifile_repl_inc.vspx
+++ b/binsrc/yacutia/inifile_repl_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_repl_inc.vspx,v 1.3.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_repl_inc.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_style.xsl b/binsrc/yacutia/inifile_style.xsl
index 22f7c9e..87d33e4 100644
--- a/binsrc/yacutia/inifile_style.xsl
+++ b/binsrc/yacutia/inifile_style.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_style.xsl,v 1.3.2.2 2010/09/20 10:16:45 source Exp $
+ -  $Id: inifile_style.xsl,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_vdb.vspx b/binsrc/yacutia/inifile_vdb.vspx
index cf2af57..c82dede 100644
--- a/binsrc/yacutia/inifile_vdb.vspx
+++ b/binsrc/yacutia/inifile_vdb.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: inifile_vdb.vspx,v 1.2.2.2 2010/09/20 10:16:46 source Exp $
+ -  $Id: inifile_vdb.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifile_vdb_inc.vspx b/binsrc/yacutia/inifile_vdb_inc.vspx
index bb95261..cd5cd4a 100644
--- a/binsrc/yacutia/inifile_vdb_inc.vspx
+++ b/binsrc/yacutia/inifile_vdb_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: inifile_vdb_inc.vspx,v 1.3.2.2 2010/09/20 10:16:46 source Exp $
+ -  $Id: inifile_vdb_inc.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/inifiles_load.sql b/binsrc/yacutia/inifiles_load.sql
index 7f6550b..ec45dea 100644
--- a/binsrc/yacutia/inifiles_load.sql
+++ b/binsrc/yacutia/inifiles_load.sql
@@ -1,10 +1,10 @@
 --
---  $Id: inifiles_load.sql,v 1.2.2.2 2010/09/20 10:16:46 source Exp $
+--  $Id: inifiles_load.sql,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/isql.vspx b/binsrc/yacutia/isql.vspx
index 25d3281..9af305a 100644
--- a/binsrc/yacutia/isql.vspx
+++ b/binsrc/yacutia/isql.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: isql.vspx,v 1.2.2.3 2011/02/16 20:45:16 source Exp $
+ -  $Id: isql.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/isql_main.vspx b/binsrc/yacutia/isql_main.vspx
index b36b55a..750b297 100644
--- a/binsrc/yacutia/isql_main.vspx
+++ b/binsrc/yacutia/isql_main.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: isql_main.vspx,v 1.2.2.2 2010/09/20 10:16:46 source Exp $
+ -  $Id: isql_main.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/isql_main_inc.vspx b/binsrc/yacutia/isql_main_inc.vspx
index d3a0a83..7a97b6c 100644
--- a/binsrc/yacutia/isql_main_inc.vspx
+++ b/binsrc/yacutia/isql_main_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -
- -  $Id: isql_main_inc.vspx,v 1.4.2.4 2010/09/20 10:16:46 source Exp $
+ -  $Id: isql_main_inc.vspx,v 1.4.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ldap_import.vspx b/binsrc/yacutia/ldap_import.vspx
index e8f2bcd..dffa549 100644
--- a/binsrc/yacutia/ldap_import.vspx
+++ b/binsrc/yacutia/ldap_import.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ldap_import.vspx,v 1.2.2.4 2010/09/20 10:16:46 source Exp $
+ -  $Id: ldap_import.vspx,v 1.2.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ldap_import_1.vspx b/binsrc/yacutia/ldap_import_1.vspx
index c94f590..48bc9a8 100644
--- a/binsrc/yacutia/ldap_import_1.vspx
+++ b/binsrc/yacutia/ldap_import_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ldap_import_1.vspx,v 1.2.2.4 2010/09/20 10:16:46 source Exp $
+ -  $Id: ldap_import_1.vspx,v 1.2.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ldap_import_2.vspx b/binsrc/yacutia/ldap_import_2.vspx
index 28e3a48..3f92f19 100644
--- a/binsrc/yacutia/ldap_import_2.vspx
+++ b/binsrc/yacutia/ldap_import_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ldap_import_2.vspx,v 1.2.2.3 2010/09/20 10:16:46 source Exp $
+ -  $Id: ldap_import_2.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ldap_import_3.vspx b/binsrc/yacutia/ldap_import_3.vspx
index 7cf63be..9f0d01c 100644
--- a/binsrc/yacutia/ldap_import_3.vspx
+++ b/binsrc/yacutia/ldap_import_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: ldap_import_3.vspx,v 1.3.2.3 2010/09/20 10:16:46 source Exp $
+ -  $Id: ldap_import_3.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/ldap_server.vspx b/binsrc/yacutia/ldap_server.vspx
index c50645f..e83cac5 100644
--- a/binsrc/yacutia/ldap_server.vspx
+++ b/binsrc/yacutia/ldap_server.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: ldap_server.vspx,v 1.3.2.4 2010/09/20 10:16:46 source Exp $
+ -  $Id: ldap_server.vspx,v 1.3.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/link_tables.js b/binsrc/yacutia/link_tables.js
index 99708f5..f835f1d 100644
--- a/binsrc/yacutia/link_tables.js
+++ b/binsrc/yacutia/link_tables.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging.vspx b/binsrc/yacutia/logging.vspx
index d0cad3e..c53d787 100644
--- a/binsrc/yacutia/logging.vspx
+++ b/binsrc/yacutia/logging.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_cli.vspx b/binsrc/yacutia/logging_cli.vspx
index d583d3d..7a5ba23 100644
--- a/binsrc/yacutia/logging_cli.vspx
+++ b/binsrc/yacutia/logging_cli.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: logging_cli.vspx,v 1.1.2.2 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_cli.vspx,v 1.1.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_db.vspx b/binsrc/yacutia/logging_db.vspx
index fc4db56..286c5a2 100644
--- a/binsrc/yacutia/logging_db.vspx
+++ b/binsrc/yacutia/logging_db.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_db.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_db.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_disk.vspx b/binsrc/yacutia/logging_disk.vspx
index afed50f..1b07060 100644
--- a/binsrc/yacutia/logging_disk.vspx
+++ b/binsrc/yacutia/logging_disk.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_disk.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_disk.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_http.vspx b/binsrc/yacutia/logging_http.vspx
index e4b4218..de93c3b 100644
--- a/binsrc/yacutia/logging_http.vspx
+++ b/binsrc/yacutia/logging_http.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_http.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_http.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_index.vspx b/binsrc/yacutia/logging_index.vspx
index 4931caa..3bc6aca 100644
--- a/binsrc/yacutia/logging_index.vspx
+++ b/binsrc/yacutia/logging_index.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_index.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_index.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_lock.vspx b/binsrc/yacutia/logging_lock.vspx
index c704ac4..5b17eec 100644
--- a/binsrc/yacutia/logging_lock.vspx
+++ b/binsrc/yacutia/logging_lock.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: logging_lock.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_lock.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_page.vspx b/binsrc/yacutia/logging_page.vspx
index c2fd10b..6c1fc0c 100644
--- a/binsrc/yacutia/logging_page.vspx
+++ b/binsrc/yacutia/logging_page.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_page.vspx,v 1.4.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_page.vspx,v 1.4.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_prof.vspx b/binsrc/yacutia/logging_prof.vspx
index 3410bc3..5a3f415 100644
--- a/binsrc/yacutia/logging_prof.vspx
+++ b/binsrc/yacutia/logging_prof.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_prof.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_prof.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_space.vspx b/binsrc/yacutia/logging_space.vspx
index 580c863..0320048 100644
--- a/binsrc/yacutia/logging_space.vspx
+++ b/binsrc/yacutia/logging_space.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_space.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_space.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_tab.vspx b/binsrc/yacutia/logging_tab.vspx
index 6a6c330..0faaaee 100644
--- a/binsrc/yacutia/logging_tab.vspx
+++ b/binsrc/yacutia/logging_tab.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: logging_tab.vspx,v 1.3.2.2 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_tab.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_tab.xsl b/binsrc/yacutia/logging_tab.xsl
index 1837641..9cc4020 100644
--- a/binsrc/yacutia/logging_tab.xsl
+++ b/binsrc/yacutia/logging_tab.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!--
  -
- -  $Id: logging_tab.xsl,v 1.2.2.2 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_tab.xsl,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/logging_view.vspx b/binsrc/yacutia/logging_view.vspx
index 62afb5f..3ef9c63 100644
--- a/binsrc/yacutia/logging_view.vspx
+++ b/binsrc/yacutia/logging_view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: logging_view.vspx,v 1.3.2.3 2010/09/20 10:16:47 source Exp $
+ -  $Id: logging_view.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/main_tabs.vspx b/binsrc/yacutia/main_tabs.vspx
index c42a847..28f12c7 100644
--- a/binsrc/yacutia/main_tabs.vspx
+++ b/binsrc/yacutia/main_tabs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: main_tabs.vspx,v 1.3.2.2 2010/09/20 10:16:48 source Exp $
+ -  $Id: main_tabs.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/make.xsl b/binsrc/yacutia/make.xsl
index e8e69da..09e2800 100644
--- a/binsrc/yacutia/make.xsl
+++ b/binsrc/yacutia/make.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: make.xsl,v 1.2.2.2 2010/09/20 10:16:48 source Exp $
+ -  $Id: make.xsl,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/mapped_schema_xml.vspx b/binsrc/yacutia/mapped_schema_xml.vspx
index cdfe5b9..9cdebc0 100644
--- a/binsrc/yacutia/mapped_schema_xml.vspx
+++ b/binsrc/yacutia/mapped_schema_xml.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: mapped_schema_xml.vspx,v 1.3.2.2 2010/09/20 10:16:48 source Exp $
+ -  $Id: mapped_schema_xml.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/merge.xsl b/binsrc/yacutia/merge.xsl
index a2f3764..ed76e0e 100644
--- a/binsrc/yacutia/merge.xsl
+++ b/binsrc/yacutia/merge.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: merge.xsl,v 1.2.2.2 2010/09/20 10:16:48 source Exp $
+ -  $Id: merge.xsl,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/mkvad.sh b/binsrc/yacutia/mkvad.sh
index cbdb956..f4e593d 100755
--- a/binsrc/yacutia/mkvad.sh
+++ b/binsrc/yacutia/mkvad.sh
@@ -2,14 +2,14 @@
 #
 #  mkvad.sh
 #
-#  $Id: mkvad.sh,v 1.20.2.8 2011/02/03 10:30:29 source Exp $
+#  $Id: mkvad.sh,v 1.20.2.11 2012/03/08 12:55:28 source Exp $
 #
 #  Creates a vad package for Virtuoso Conductor
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -304,7 +304,7 @@ echo "  <caption>" >> $STICKER
 echo "    <name package=\"conductor\">" >> $STICKER
 echo "      <prop name=\"Title\" value=\"Virtuoso Conductor\"/>" >> $STICKER
 echo "      <prop name=\"Developer\" value=\"OpenLink Software\"/>" >> $STICKER
-echo "      <prop name=\"Copyright\" value=\"(C) 1998-2011 OpenLink Software\"/>" >> $STICKER
+echo "      <prop name=\"Copyright\" value=\"(C) 1998-2012 OpenLink Software\"/>" >> $STICKER
 echo "      <prop name=\"Download\" value=\"http://www.openlinksw.com/virtuoso/conductor/download\"/>" >> $STICKER
 echo "      <prop name=\"Download\" value=\"http://www.openlinksw.co.uk/virtuoso/conductor/download\"/>" >> $STICKER
 echo "    </name>" >> $STICKER
@@ -322,7 +322,7 @@ echo "  <ddls>" >> $STICKER
 echo "    <sql purpose=\"pre-install\">if (lt (sys_stat ('st_dbms_ver'), '$NEED_VERSION')) { result ('ERROR', 'The conductor package requires server version $NEED_VERSION or greater'); signal ('FATAL', 'The conductor package requires server version $NEED_VERSION or greater'); } </sql>" >> $STICKER
 echo "    <sql purpose=\"post-install\">" >> $STICKER
 echo "      registry_set('__no_vspx_temp', '1');" >> $STICKER
-echo "      \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/conductor/admin_dav_browser.sql', 1, 'report', $ISDAV);" >> $STICKER
+#echo "      \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/conductor/admin_dav_browser.sql', 1, 'report', $ISDAV);" >> $STICKER
 echo "      \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/conductor/vdir_helper.sql', 1, 'report', $ISDAV);" >> $STICKER
 echo "      \"DB\".\"DBA\".\"VAD_LOAD_SQL_FILE\"('$BASE_PATH/conductor/yacutia.sql', 1, 'report', $ISDAV);" >> $STICKER
 echo "      vhost_remove (lpath=>'/conductor');" >> $STICKER
diff --git a/binsrc/yacutia/mkvad.sql b/binsrc/yacutia/mkvad.sql
index 4b5e1bb..97cab27 100644
--- a/binsrc/yacutia/mkvad.sql
+++ b/binsrc/yacutia/mkvad.sql
@@ -1,10 +1,10 @@
 --
---  $Id: mkvad.sql,v 1.1.1.1.2.3 2010/09/20 10:16:48 source Exp $
+--  $Id: mkvad.sql,v 1.1.1.1.2.4 2012/03/08 12:55:28 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/mm_menu1.js b/binsrc/yacutia/mm_menu1.js
index 7c74e89..bace2d3 100644
--- a/binsrc/yacutia/mm_menu1.js
+++ b/binsrc/yacutia/mm_menu1.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_conf.vspx b/binsrc/yacutia/msg_news_conf.vspx
index 96795a8..d93248a 100644
--- a/binsrc/yacutia/msg_news_conf.vspx
+++ b/binsrc/yacutia/msg_news_conf.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: msg_news_conf.vspx,v 1.4.2.3 2010/09/20 10:16:48 source Exp $
+ -  $Id: msg_news_conf.vspx,v 1.4.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_conf_global.vspx b/binsrc/yacutia/msg_news_conf_global.vspx
index 3ba905a..4e2395e 100644
--- a/binsrc/yacutia/msg_news_conf_global.vspx
+++ b/binsrc/yacutia/msg_news_conf_global.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: msg_news_conf_global.vspx,v 1.3.2.3 2010/09/20 10:16:48 source Exp $
+ -  $Id: msg_news_conf_global.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_group_info.vspx b/binsrc/yacutia/msg_news_group_info.vspx
index 0438f59..49b271a 100644
--- a/binsrc/yacutia/msg_news_group_info.vspx
+++ b/binsrc/yacutia/msg_news_group_info.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: msg_news_group_info.vspx,v 1.2.2.2 2010/09/20 10:16:48 source Exp $
+ -  $Id: msg_news_group_info.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_group_message_body.vspx b/binsrc/yacutia/msg_news_group_message_body.vspx
index 11841aa..f12e250 100644
--- a/binsrc/yacutia/msg_news_group_message_body.vspx
+++ b/binsrc/yacutia/msg_news_group_message_body.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: msg_news_group_message_body.vspx,v 1.2.2.3 2010/09/20 10:16:48 source Exp $
+ -  $Id: msg_news_group_message_body.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_group_messages.vspx b/binsrc/yacutia/msg_news_group_messages.vspx
index 8c122fb..295a747 100644
--- a/binsrc/yacutia/msg_news_group_messages.vspx
+++ b/binsrc/yacutia/msg_news_group_messages.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: msg_news_group_messages.vspx,v 1.2.2.3 2010/09/20 10:16:48 source Exp $
+ -  $Id: msg_news_group_messages.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_group_messages_list.vspx b/binsrc/yacutia/msg_news_group_messages_list.vspx
index 13fe0de..bc55fd1 100644
--- a/binsrc/yacutia/msg_news_group_messages_list.vspx
+++ b/binsrc/yacutia/msg_news_group_messages_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: msg_news_group_messages_list.vspx,v 1.2.2.2 2010/09/20 10:16:48 source Exp $
+ -  $Id: msg_news_group_messages_list.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_group_subscribe.vspx b/binsrc/yacutia/msg_news_group_subscribe.vspx
index 726ac6f..195dda8 100644
--- a/binsrc/yacutia/msg_news_group_subscribe.vspx
+++ b/binsrc/yacutia/msg_news_group_subscribe.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: msg_news_group_subscribe.vspx,v 1.2.2.3 2010/09/20 10:16:49 source Exp $
+ -  $Id: msg_news_group_subscribe.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_groups.vspx b/binsrc/yacutia/msg_news_groups.vspx
index 5f2c581..23f7223 100644
--- a/binsrc/yacutia/msg_news_groups.vspx
+++ b/binsrc/yacutia/msg_news_groups.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: msg_news_groups.vspx,v 1.2.2.3 2010/09/20 10:16:49 source Exp $
+ -  $Id: msg_news_groups.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_server_details.vspx b/binsrc/yacutia/msg_news_server_details.vspx
index f7537cd..0471434 100644
--- a/binsrc/yacutia/msg_news_server_details.vspx
+++ b/binsrc/yacutia/msg_news_server_details.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: msg_news_server_details.vspx,v 1.4.2.2 2010/09/20 10:16:49 source Exp $
+ -  $Id: msg_news_server_details.vspx,v 1.4.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/msg_news_server_info.vspx b/binsrc/yacutia/msg_news_server_info.vspx
index 6ea0810..283fbec 100644
--- a/binsrc/yacutia/msg_news_server_info.vspx
+++ b/binsrc/yacutia/msg_news_server_info.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: msg_news_server_info.vspx,v 1.2.2.2 2010/09/20 10:16:49 source Exp $
+ -  $Id: msg_news_server_info.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/page.xsl b/binsrc/yacutia/page.xsl
index 02fbad6..9da5c75 100644
--- a/binsrc/yacutia/page.xsl
+++ b/binsrc/yacutia/page.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: page.xsl,v 1.3.2.2 2010/09/20 10:16:49 source Exp $
+ -  $Id: page.xsl,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/persistent_xmlns.vspx b/binsrc/yacutia/persistent_xmlns.vspx
index 799bd4c..34a02c6 100644
--- a/binsrc/yacutia/persistent_xmlns.vspx
+++ b/binsrc/yacutia/persistent_xmlns.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: persistent_xmlns.vspx,v 1.1.4.3 2010/09/20 10:16:49 source Exp $
+ -  $Id: persistent_xmlns.vspx,v 1.1.4.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/popup2_browser.vspx b/binsrc/yacutia/popup2_browser.vspx
index 7606c5d..435e7c1 100644
--- a/binsrc/yacutia/popup2_browser.vspx
+++ b/binsrc/yacutia/popup2_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: popup2_browser.vspx,v 1.2.2.2 2010/09/20 10:16:49 source Exp $
+ -  $Id: popup2_browser.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/popup_browser.vspx b/binsrc/yacutia/popup_browser.vspx
index 7178d74..32e84e3 100644
--- a/binsrc/yacutia/popup_browser.vspx
+++ b/binsrc/yacutia/popup_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: popup_browser.vspx,v 1.2.2.4 2010/09/20 10:16:49 source Exp $
+ -  $Id: popup_browser.vspx,v 1.2.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/r2rml_gen.vspx b/binsrc/yacutia/r2rml_gen.vspx
new file mode 100644
index 0000000..4365c49
--- /dev/null
+++ b/binsrc/yacutia/r2rml_gen.vspx
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: r2rml_gen.vspx,v 1.1.2.2 2012/03/08 12:55:28 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<v:page name="sparql_create_page"
+        decor="yacutia_decor.vspx"
+        style="yacutia_style.xsl"
+        vm:owner="yacutia_sparql_page"
+        doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
+        fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
+        xmlns:vm="http://www.openlinksw.com/vspx/macro">
+ <vm:pagetitle>R2RML Generate</vm:pagetitle>
+ <vm:pagewrapper>
+    <vm:variables>
+      <v:variable name="message" default="null" type="varchar" persist="0"/>
+      <v:variable name="graph" default="null" type="varchar" persist="0" param-name="graph"/>
+      <v:variable name="tgraph1" default="null" type="varchar" persist="0" />
+      <v:variable name="pgraph1" default="null" type="varchar" persist="0" />
+      <v:variable name="exec_ret" type="any" default="null" persist="temp"/>
+      <v:variable name="sync_ret" type="any" default="null" persist="temp"/>
+      <v:variable persist="0" name="body_v" type="any" default="null" param-name="cr_view"/>
+    </vm:variables>
+  <vm:menu>
+   <vm:menuitem value="Linked Data"/>
+  </vm:menu>
+  <vm:header caption="R2RML Generate"/>
+  <vm:pagebody>
+  <v:on-init>
+    <![CDATA[
+    set http_charset='utf-8';
+    ]]>
+  </v:on-init>
+      <v:form name="form1" type="simple" method="POST" action="" xhtml_enctype="multipart/form-data">
+	  <v:before-data-bind><![CDATA[
+	      declare h any;
+	      h := rfc1808_parse_uri (self.graph);
+	      self.tgraph1 := self.graph || '#';
+	      self.pgraph1 := sprintf ('urn:%{URIQADefaultHost}s:%s', trim (replace (h[2], '/', ':'), ':'));
+	      self.body_v := DB.DBA.R2RML_MAKE_QM_FROM_G (self.graph, self.tgraph1);
+	    ]]>
+    </v:before-data-bind>
+    <?vsp if (self.exec_ret is null) { ?>
+      <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
+	  <tr>
+	      <td>
+		  <h2>Definitions</h2>
+		  <v:textarea name="cr_view" xhtml_cols="120" xhtml_rows="20" value="--self.body_v"/><br/>
+		  <label>Default Graph Name</label> <v:text name="tgraph" value="--self.tgraph1" xhtml_size="70" /><br />
+		  <label>Physical Graph Name</label> <v:text name="pgraph" value="--self.pgraph1" xhtml_size="70" /><br />
+		  <v:check-box name="rdb_sync" value="1" xhtml_id="rdb_sync" /> <label for="rdb_sync">Generate RDB2RDF triggers</label> <br/>
+		  <v:check-box name="fill" value="1" xhtml_id="fill" /> <label for="fill">Enable Data Syncs with Physical Quad Store</label> <br/>
+	      </td>
+	  </tr>  
+        <tr valign='top'>
+	    <td>
+	      <div class="message"><v:label name="msg" value="--self.message" /> </div>
+	      <table border='0' width='100%'  class="ctl_grp">
+                <tr align="center">
+                  <td colspan="2">
+		      <v:button action="simple" name="cnl" value="Cancel">
+			  <v:on-post>
+			      self.vc_redirect ('r2rml_import.vspx');
+			  </v:on-post>
+		      </v:button>
+                    <v:button action="simple" name="bt1" value="Execute">
+                      <v:on-post>
+			  <![CDATA[
+			 declare stat, msg, meta, data, source any;
+			 exec ('sparql ' || self.cr_view.ufl_value, stat, msg, vector (), 0, meta, data);
+			 self.exec_ret := data;
+			 source := self.graph;
+			 if (self.rdb_sync.ufl_selected)
+			   {
+			     self.sync_ret := RDF_VIEW_SYNC_TO_PHYSICAL (self.tgraph.ufl_value, self.fill.ufl_selected, self.pgraph.ufl_value);
+			     for select "g" from (sparql define input:storage "" prefix rr: <http://www.w3.org/ns/r2rml#> 
+				 select distinct ?g  { graph `iri(?:source)` {{ ?s rr:graph ?g } union { ?s rr:graphMap ?m . ?m rr:constant ?g }}}) x do
+			         {
+				   self.sync_ret := vector_concat (self.sync_ret, RDF_VIEW_SYNC_TO_PHYSICAL ("g", self.fill.ufl_selected, self.pgraph.ufl_value));
+				 }
+			     if (0 = length (self.sync_ret))
+			       self.sync_ret := vector (vector ('00000', 'OK'));
+			   }	       
+                        ]]>
+                      </v:on-post>
+                    </v:button>
+		    </td>
+		    </tr>
+	      </table>
+	  </td>
+        </tr>
+      </table>
+      <?vsp } else { ?>
+	  <h2>Execution Status</h2>
+	  <div class="scroll_area">
+	  <table class="listing">
+	      <tr class="listing_header_row">
+		  <th>Status</th>
+		  <th>Message</th>
+	      </tr>
+	      <?vsp
+	      foreach (any _row in self.exec_ret) do
+                {
+	      ?>
+	      <tr>
+		  <td><?V _row[0] ?></td>
+		  <td><?V _row[1] ?></td>
+	      </tr>
+	      <?vsp
+	        }
+	      ?>
+	  </table>
+          </div>
+      <?vsp } 
+	  if (length (self.sync_ret))
+	    {
+	  ?>
+	  <br/>
+	  <h2>RDB2RDF Triggers Status</h2>
+	  <table class="listing">
+	      <tr class="listing_header_row"><th>Status</th><th>Message</th></tr>
+	      <?vsp
+	      foreach (any _row in self.sync_ret) do
+                {
+	      ?>
+	      <tr><td><?V _row[0] ?></td><td><?V _row[1] ?></td></tr>
+	      <?vsp
+	        }
+	      ?>
+	  </table>
+	  <v:button name="back" action="simple" value="Back">
+	      <v:on-post><![CDATA[
+		  self.exec_ret := null;
+		  ]]></v:on-post>
+	  </v:button>
+	  <?vsp
+	    }  
+	  ?>
+  </v:form>
+  </vm:pagebody>
+ </vm:pagewrapper>
+</v:page>
diff --git a/binsrc/yacutia/r2rml_import.vspx b/binsrc/yacutia/r2rml_import.vspx
new file mode 100644
index 0000000..cce2212
--- /dev/null
+++ b/binsrc/yacutia/r2rml_import.vspx
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: r2rml_import.vspx,v 1.1.2.2 2012/03/08 12:55:28 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<v:page name="sparql_create_page"
+        decor="yacutia_decor.vspx"
+        style="yacutia_style.xsl"
+        vm:owner="yacutia_sparql_page"
+        doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
+        fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
+        xmlns:vm="http://www.openlinksw.com/vspx/macro">
+ <vm:pagetitle>R2RML Upload</vm:pagetitle>
+ <vm:pagewrapper>
+    <vm:variables>
+      <v:variable name="message" default="null" type="varchar" persist="0"/>
+    </vm:variables>
+  <vm:menu>
+   <vm:menuitem value="Linked Data"/>
+  </vm:menu>
+  <vm:header caption="R2RML Upload"/>
+  <vm:pagebody>
+  <v:on-init>
+    <![CDATA[
+    set http_charset='utf-8';
+    ]]>
+  </v:on-init>
+      <v:form name="form1" type="simple" method="POST" action="" xhtml_enctype="multipart/form-data">
+      <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
+        <tr valign='top'>
+	    <td>
+		<div class="message"><v:label name="msg" value="--self.message" /> </div>
+	      <table border='0' width='100%'  class="ctl_grp">
+                      <tr id="rd1">
+                		    <td>
+                		      <v:radio-button name="rb1" group-name="rb" value="fs">
+                      			<v:before-render>
+                      			  if (get_keyword ('rb', self.vc_event.ve_params) = 'fs'
+                      			  or get_keyword ('rb', self.vc_event.ve_params) is null)
+                      			    control.ufl_selected := 1;
+                      			</v:before-render>
+                		      </v:radio-button>
+                			    Source File<span class="redstar">*</span>
+                			  </td>
+                        <td>
+                          <input type="file" name="t_rdf_file" size="100"></input>
+                        </td>
+                      </tr>
+                      <tr id="rd1">
+    		                <td>
+    		                  <v:radio-button name="rb2" group-name="rb" value="ur">
+                      			<v:before-render>
+                      			  if (get_keyword ('rb', self.vc_event.ve_params) = 'ur')
+                      			    control.ufl_selected := 1;
+                      			</v:before-render>
+                  		      </v:radio-button>
+    		                    Source URL<span class="redstar">*</span>
+    		                </td>
+                        <td>
+                          <input type="text" name="t_rdf_url" size="100"></input>
+                        </td>
+                      </tr>
+                      <tr id="rd2">
+                        <td>Target Graph IRI<span class="redstar">*</span></td>
+                        <td>
+			    <v:text name="rdf_graph_name" value="" 
+				default_value="-- 'http://' || cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost') || '/r2rml' " 
+				xhtml_size="100"/>
+                        </td>
+                      </tr>
+                      <tr>
+			  <td colspan="2">
+			      <v:check-box name="del" value="1" initial-checked="1" xhtml_id="del"/> <label for="del">Clean Target Graph before import</label>
+                        </td>
+                      </tr>
+                <tr align="center">
+                  <td colspan="2">
+		      <v:button action="simple" name="cnl" value="Cancel">
+			  <v:on-post>
+			      self.vc_redirect (http_path ());
+			  </v:on-post>
+		      </v:button>
+                    <v:button action="simple" name="bt1" value="Validate">
+                      <v:on-post>
+			<![CDATA[
+declare usr, grp vspx_select_list;
+declare i, _uid, ownern, groupn integer;
+declare cname, _perms, _p, _idx, mimetype, owner_name, group_name, _inh varchar;
+declare _file, _graph, is_ttl, is_xml any;
+
+  _file := get_keyword ('t_rdf_file', e.ve_params);
+  _graph := trim (self.rdf_graph_name.ufl_value);
+  if (not length (_graph))
+    {
+      self.vc_is_valid := 0;
+      self.vc_error_message := 'The graph IRI must be non-empty string.';
+      return;
+    }
+
+  if (not length (_file))
+    {
+      declare uri any;
+      declare exit handler for sqlstate '*'
+	{
+	  self.vc_is_valid := 0;
+	  self.vc_error_message := regexp_match ('[^\r\n]*', __SQL_MESSAGE);
+	  return;
+	};
+      uri := get_keyword ('t_rdf_url', e.ve_params);
+      if (not length (uri))
+	{
+	  self.vc_is_valid := 0;
+	  self.vc_error_message := 'The file or source URL must be specified';
+	  return;
+	}
+      exec (sprintf ('sparql load "%s" into <%s>', uri, _graph));
+      goto end_post;
+    }
+
+    if (self.del.ufl_selected)
+      {
+        sparql clear iri(?:_graph);
+      }
+
+    is_ttl := 1;
+    {
+      declare continue handler for SQLSTATE '*'
+	{
+	  is_ttl := 0;
+	};
+      DB.DBA.TTLP (_file, _graph, _graph);
+    }
+    is_xml := 0;
+    if (not is_ttl)
+      {
+	is_xml := 1;
+	declare continue handler for SQLSTATE '*'
+	  {
+	    is_xml := 0;
+	  };
+	DB.DBA.RDF_LOAD_RDFXML (_file, _graph, _graph);
+      }
+    if ((is_ttl + is_xml) = 0)
+      {
+	self.vc_is_valid := 0;
+	self.vc_error_message := 'You have attempted to upload invalid data. You can only upload RDF, Turtle, N3 serializations of RDF Data to the RDF Data Store.';
+	return;
+      }
+
+end_post:;
+   self.message := 'The document contains valid R2RML graph';
+   self.vc_redirect (sprintf ('r2rml_validate.vspx?graph=%U', _graph));
+                        ]]>
+                      </v:on-post>
+                    </v:button>
+		    </td>
+		    </tr>
+	      </table>
+	  </td>
+        </tr>
+      </table>
+  </v:form>
+  </vm:pagebody>
+ </vm:pagewrapper>
+</v:page>
diff --git a/binsrc/yacutia/r2rml_validate.vspx b/binsrc/yacutia/r2rml_validate.vspx
new file mode 100644
index 0000000..f0c881e
--- /dev/null
+++ b/binsrc/yacutia/r2rml_validate.vspx
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: r2rml_validate.vspx,v 1.1.2.2 2012/03/08 12:55:28 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<v:page name="sparql_create_page"
+        decor="yacutia_decor.vspx"
+        style="yacutia_style.xsl"
+        vm:owner="yacutia_sparql_page"
+        doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
+        fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
+        xmlns:vm="http://www.openlinksw.com/vspx/macro">
+ <vm:pagetitle>R2RML Validation</vm:pagetitle>
+ <vm:pagewrapper>
+    <vm:variables>
+      <v:variable name="message" default="null" type="varchar" persist="0"/>
+      <v:variable name="graph" default="null" type="varchar" persist="0" param-name="graph"/>
+    </vm:variables>
+  <vm:menu>
+   <vm:menuitem value="Linked Data"/>
+  </vm:menu>
+  <vm:header caption="R2RML Validation"/>
+  <vm:pagebody>
+  <v:on-init>
+    <![CDATA[
+    set http_charset='utf-8';
+    ]]>
+  </v:on-init>
+	  <h2>Validation Status</h2>
+	  <div class="scroll_area">
+	  <table class="listing">
+	      <tr class="listing_header_row">
+		  <th>Subject</th>
+		  <th>Status</th>
+		  <th>Message</th>
+	      </tr>
+	      <?vsp
+	      declare stat, msg, data, meta any;
+	      exec ('DB.DBA.OVL_VALIDATE (?, ''http://www.w3.org/ns/r2rml#OVL'')', stat, msg, vector (self.graph), 0, meta, data);
+	      foreach (any _row in data) do
+                {
+	      ?>
+	      <tr>
+		  <td><?V _row[0] ?></td>
+		  <td><?V _row[1] ?></td>
+		  <td><?V _row[2] ?></td>
+	      </tr>
+	      <?vsp
+	        }
+	      ?>
+	  </table>
+          </div>
+      <v:form name="form1" type="simple" method="POST" action="">
+      <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
+        <tr valign='top'>
+	    <td>
+		<div class="message"><v:label name="msg" value="--self.message" /> </div>
+	      <table border='0' width='100%'  class="ctl_grp">
+                <tr align="center">
+                  <td colspan="2">
+		      <v:button action="simple" name="cnl" value="Cancel">
+			  <v:on-post>
+			      self.vc_redirect ('r2rml_import.vspx');
+			  </v:on-post>
+		      </v:button>
+                    <v:button action="simple" name="bt1" value="Generate">
+                      <v:on-post>
+			<![CDATA[
+			self.vc_redirect (sprintf ('r2rml_gen.vspx?graph=%U', self.graph));
+                        ]]>
+                      </v:on-post>
+                    </v:button>
+		    </td>
+		    </tr>
+	      </table>
+	  </td>
+        </tr>
+      </table>
+  </v:form>
+  </vm:pagebody>
+ </vm:pagewrapper>
+</v:page>
diff --git a/binsrc/yacutia/rdf_conf.vspx b/binsrc/yacutia/rdf_conf.vspx
index 82fef0b..ee52d29 100644
--- a/binsrc/yacutia/rdf_conf.vspx
+++ b/binsrc/yacutia/rdf_conf.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_conf.vspx,v 1.1.4.4 2010/11/08 11:45:35 source Exp $
+ -  $Id: rdf_conf.vspx,v 1.1.4.6 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2010 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -115,6 +115,13 @@
 				  <?vsp } ?>
 			      </table>
 			      <br/>
+			      <?vsp 
+			      if (not exists (select 1 from DB.DBA.HTTP_PATH where HP_HOST not like '%ini%' and HP_SECURITY = 'SSL'))
+			        {
+				  http ('No HTTPS listeners defined');
+				}
+			      else {			
+			      ?> 
 			      <v:form name="frm1" type="simple" method="POST">
               Virtual Host:				  
               <select name="l_domains" xhtml_id="l_domains">
@@ -138,6 +145,9 @@
 		    ]]></v:on-post>
 	    </v:button>
 			      </v:form>
+			      <?vsp 
+			      }
+			      ?> 
 			      <!-- end tab  -->
 			  </td>
 		      </tr>
diff --git a/binsrc/yacutia/rdf_console.vspx b/binsrc/yacutia/rdf_console.vspx
index 817e53c..148b106 100644
--- a/binsrc/yacutia/rdf_console.vspx
+++ b/binsrc/yacutia/rdf_console.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_console.vspx,v 1.1.2.6 2010/11/08 11:45:35 source Exp $
+ -  $Id: rdf_console.vspx,v 1.1.2.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -46,7 +46,7 @@
   <vm:pagebody>
       <v:on-init><![CDATA[
 	  if (self.del is not null)
-	    delete from DB.DBA.RDF_META_CARTRIDGES_LOG where ML_SESSION = self.del;
+	    delete from DB.DBA.RDF_CARTRIDGES_LOG where ML_SESSION = self.del;
 	  ]]></v:on-init>
       <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
         <tr valign='top'>
@@ -138,7 +138,7 @@
 	      </tr>
 	      <?vsp 
 	        declare ctr int;
-	        for select mses from (select distinct ML_SESSION as mses from DB.DBA.RDF_META_CARTRIDGES_LOG) x do {
+	        for select mses from (select distinct ML_SESSION as mses from DB.DBA.RDF_CARTRIDGES_LOG) x do {
 	      ?>
 			  <tr class="<?V case when mod(ctr, 2) then 'listing_row_odd' else 'listing_row_even' end ?>">
 			      <td>
@@ -172,7 +172,7 @@
 			      ctr := ctr + 1;
 			      if (mses = self.ses)
 			        {
-                                  for select ML_ID, ML_PROC from DB.DBA.RDF_META_CARTRIDGES_LOG where ML_SESSION = mses do 
+                                  for select ML_ID, ML_PROC from DB.DBA.RDF_CARTRIDGES_LOG where ML_SESSION = mses do 
 				     {
 				     ?>
 			  <tr class="<?V case when mod(ctr, 2) then 'listing_row_odd' else 'listing_row_even' end ?>">
@@ -212,7 +212,7 @@
 	     {
 	       declare dict, ses any;
 	       
-	       for select * from DB.DBA.RDF_META_CARTRIDGES_LOG where ML_SESSION = self.detail and ML_ID = self.idn do {
+	       for select * from DB.DBA.RDF_CARTRIDGES_LOG where ML_SESSION = self.detail and ML_ID = self.idn do {
 	       dict := null;
 	       if (0 and length (ML_RESULT))
 	         {
diff --git a/binsrc/yacutia/rdf_filters.vspx b/binsrc/yacutia/rdf_filters.vspx
index a019661..7aeb77b 100644
--- a/binsrc/yacutia/rdf_filters.vspx
+++ b/binsrc/yacutia/rdf_filters.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_filters.vspx,v 1.9.2.8 2010/11/08 11:45:35 source Exp $
+ -  $Id: rdf_filters.vspx,v 1.9.2.11 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -334,8 +334,11 @@
                               		  <label for="opts1">Options</label>
                               		  <v:textarea name="opts1" value="" xhtml_rows="5" xhtml_cols="70" xhtml_id="opts1" error-glyph="*">
                               		  </v:textarea>
-                              		  <?vsp if (strstr (self.patt1.ufl_value, 'facebook') is not null) { ?>
-                              		  <a href="fb_popup.vspx" target="_blank">Get FB session</a>
+                              		  <?vsp if (strstr (self.desc1.ufl_value, 'FQL') is not null) { ?>
+                              		  <a href="fb_popup.vspx" target="_blank">Get Facebook session</a>
+                              		  <?vsp } ?>
+                              		  <?vsp if (strstr (self.desc1.ufl_value, 'Graph API') is not null) { ?>
+                              		  <a href="/sponger/fb_access_token_popup.vsp" target="_blank">Get Facebook access token</a>
                               		  <?vsp } ?>
                               		  <br />
                             	      <span class="fm_ctl_btn">
diff --git a/binsrc/yacutia/rdf_filters_pp.vspx b/binsrc/yacutia/rdf_filters_pp.vspx
index e288302..5d042b9 100644
--- a/binsrc/yacutia/rdf_filters_pp.vspx
+++ b/binsrc/yacutia/rdf_filters_pp.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_filters_pp.vspx,v 1.3.2.7 2010/11/08 11:45:35 source Exp $
+ -  $Id: rdf_filters_pp.vspx,v 1.3.2.10 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -338,8 +338,11 @@
                                     <label for="opts1">Options</label>
                                     <v:textarea name="opts1" value="" xhtml_rows="5" xhtml_cols="70" xhtml_id="opts1" error-glyph="*">
                                     </v:textarea>
-                                    <?vsp if (strstr (self.patt1.ufl_value, 'facebook') is not null) { ?>
-                                    <a href="fb_popup.vspx" target="_blank">Get FB session</a>
+                              	    <?vsp if (strstr (self.desc1.ufl_value, 'FQL') is not null) { ?>
+                              	    <a href="fb_popup.vspx" target="_blank">Get Facebook session</a>
+                              	    <?vsp } ?>
+                              	    <?vsp if (strstr (self.desc1.ufl_value, 'Graph API') is not null) { ?>
+                              	    <a href="/sponger/fb_access_token_popup.vsp" target="_blank">Get Facebook access token</a>
                                     <?vsp } ?>
                                     <br />
                                     <span class="fm_ctl_btn">
diff --git a/binsrc/yacutia/rdf_import.vspx b/binsrc/yacutia/rdf_import.vspx
index 8a6fe7b..559ba8e 100644
--- a/binsrc/yacutia/rdf_import.vspx
+++ b/binsrc/yacutia/rdf_import.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_import.vspx,v 1.1.4.3 2010/09/20 10:16:49 source Exp $
+ -  $Id: rdf_import.vspx,v 1.1.4.7 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -30,15 +30,15 @@
         doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
         fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
         xmlns:vm="http://www.openlinksw.com/vspx/macro">
- <vm:pagetitle>RDF Store Upload</vm:pagetitle>
+ <vm:pagetitle>Quad Store Upload</vm:pagetitle>
  <vm:pagewrapper>
     <vm:variables>
       <v:variable name="message" default="null" type="varchar" persist="0"/>
     </vm:variables>
   <vm:menu>
-   <vm:menuitem value="RDF"/>
+   <vm:menuitem value="Linked Data"/>
   </vm:menu>
-  <vm:header caption="RDF Store Upload"/>
+  <vm:header caption="Quad Store Upload"/>
   <vm:pagebody>
   <v:on-init>
     <![CDATA[
@@ -80,6 +80,11 @@
                           <input type="text" name="t_rdf_url" size="100"></input>
                         </td>
                       </tr>
+                      <tr id="cb2">
+                        <td colspan="2">
+			    <v:check-box name="persist_graph" value="1" xhtml_id="cbp"/> <label for="cbp">Create graph explicitly</label>
+                        </td>
+                      </tr>
                       <tr id="rd2">
                         <td>Named Graph IRI<span class="redstar">*</span></td>
                         <td>
@@ -148,6 +153,10 @@ declare _file, _graph, is_ttl, is_xml any;
 	self.vc_error_message := 'You have attempted to upload invalid data. You can only upload RDF, Turtle, N3 serializations of RDF Data to the RDF Data Store.';
 	return;
       }
+    if (self.persist_graph.ufl_selected)
+      {
+         SPARQL CREATE SILENT GRAPH iri (?:_graph) ;     
+      }
 
 end_post:;
       self.message := 'Upload finished';
diff --git a/binsrc/yacutia/rdf_psh_subs.vspx b/binsrc/yacutia/rdf_psh_subs.vspx
index 26b26e4..8a6654b 100644
--- a/binsrc/yacutia/rdf_psh_subs.vspx
+++ b/binsrc/yacutia/rdf_psh_subs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_psh_subs.vspx,v 1.1.4.3 2010/09/20 10:16:50 source Exp $
+ -  $Id: rdf_psh_subs.vspx,v 1.1.4.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -36,9 +36,9 @@
 		<v:variable name="message" default="null" type="varchar" persist="0"/>
 	    </vm:variables>
 	    <vm:menu>
-		<vm:menuitem value="RDF"/>
+		<vm:menuitem value="Linked Data"/>
 	    </vm:menu>
-	    <vm:header caption="RDF Subscriptions"/>
+	    <vm:header caption="Subscriptions (PHSB)"/>
 	    <vm:pagebody>
 		<v:on-init>
 		    <![CDATA[
diff --git a/binsrc/yacutia/rdf_schemas.vspx b/binsrc/yacutia/rdf_schemas.vspx
index c5a90f7..5825316 100644
--- a/binsrc/yacutia/rdf_schemas.vspx
+++ b/binsrc/yacutia/rdf_schemas.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_schemas.vspx,v 1.1.2.5 2010/09/20 10:16:50 source Exp $
+ -  $Id: rdf_schemas.vspx,v 1.1.2.6 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/rdf_void.vspx b/binsrc/yacutia/rdf_void.vspx
index bb9d2f5..f293247 100644
--- a/binsrc/yacutia/rdf_void.vspx
+++ b/binsrc/yacutia/rdf_void.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdf_void.vspx,v 1.2.2.2 2010/09/20 10:16:50 source Exp $
+ -  $Id: rdf_void.vspx,v 1.2.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_control.vspx b/binsrc/yacutia/robot_control.vspx
index 8ee5d96..43e72f5 100644
--- a/binsrc/yacutia/robot_control.vspx
+++ b/binsrc/yacutia/robot_control.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_control.vspx,v 1.2.2.7 2010/11/19 16:44:01 source Exp $
+ -  $Id: robot_control.vspx,v 1.2.2.10 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -29,10 +29,12 @@
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
   xmlns:vm="http://www.openlinksw.com/vspx/macro">
   <v:variable name="error_str" persist="1" type="varchar" default="''"/>
+      <script language="JavaScript" src="admin_utils.js">
+      </script>
+      <v:form name="robot_form1" type="simple" method="POST" action="">
       <table width="100%">
         <tr>
           <td align="right">
-            <v:form name="robot_form1" type="simple" method="POST" action="">
               <table>
                 <tr>
                   <td align="right">
@@ -73,24 +75,44 @@
                   </td>
                 </tr>
               </table>
-            </v:form>
           </td>
         </tr>
       </table>
       <div class="scroll_area">
-      <v:data-set name="data_set2" sql="select VS_DESCR, VS_HOST, VS_URL, VS_ROOT from WS.WS.VFS_SITE" nrows="1000" scrollable="1" cursor-type="dynamic" edit="1">
+      <v:data-set name="data_set2" sql="select VS_DESCR, VS_HOST, VS_URL, VS_ROOT, VS_ID from WS.WS.VFS_SITE" nrows="1000" scrollable="1" cursor-type="dynamic" edit="1">
         <input type="hidden" name="page" value="2"/>
-        <v:column name="VS_DESCR" />
+        <!--v:column name="VS_DESCR" />
         <v:column name="VS_HOST" />
         <v:column name="VS_URL" />
-        <v:column name="VS_ROOT" />
+        <v:column name="VS_ROOT" /-->
         <v:template type="simple" name-to-remove="table" set-to-remove="bottom" name="data_set2_header_template">
           <table class="listing">
             <tr class="listing_header_row">
+		<th style="width:5px;" nowrap="1"><input type="checkbox" name="select_all" value="Select All" onClick="selectAllCheckboxes_mask (this.form, this, 'cb_')"/></th>
               <th>Description</th>
               <th>URL</th>
 	      <th>
-		  <v:url name="exprt" value="Export" url="vfs_export.vspx" /> 
+                    <v:button action="simple" value="Export" name="exprt" format="%s" style="url">
+                      <v:on-post>
+			<![CDATA[
+			  	
+			declare item, inx, ids any;
+			ids := vector ();
+			while (item := adm_next_checkbox('cb_', params, inx))
+			  {
+                            ids := vector_concat (ids, vector (atoi (item)));
+			  }
+			if (length (ids) = 0)
+                          {
+			  self.vc_is_valid := 0;
+			  self.vc_error_message := 'No tasks selected for export';
+			  return;
+			  }
+		        self.vc_redirect (sprintf ('vfs_export.vspx?ids=%U', encode_base64 (serialize (ids))));
+                        return;
+                        ]]>
+                      </v:on-post>
+                    </v:button>
 	      </th>
             </tr>
           </table>
@@ -99,7 +121,7 @@
           <v:template type="if-not-exists" name-to-remove="table" set-to-remove="both" name="data_set2_if_not_exists_template">
             <table>
               <tr class="listing_count">
-                <td align="center" colspan="3" class="listing_row_count">
+                <td align="center" colspan="4" class="listing_row_count">
                   No rows selected
                 </td>
               </tr>
@@ -112,6 +134,9 @@
               http (sprintf ('<tr class="%s">', case when mod (self.r_count, 2) then 'listing_row_odd' else 'listing_row_even' end));
 ?>
                 <td align="left">
+		   <input type="checkbox" name="cb_<?V control.te_rowset[4] ?>" value="on"/>
+		</td>
+                <td align="left">
                   <v:label format="%s" name="data_set2_browse_label_1" value="--((control.vc_parent as vspx_row_template).te_rowset[0])" />
                 </td>
                 <td align="left">
@@ -128,6 +153,13 @@
 		      text=" Edit"
 		      url="--concat('robot_edit.vspx?mode=edit&EDIT=', (control.vc_parent as vspx_row_template).te_rowset[1], '&url=',  (control.vc_parent as vspx_row_template).te_rowset[2], '&root=', (control.vc_parent as vspx_row_template).te_rowset[3])"
 		      />
+		    <v:button action="simple" style="image" name="url3"
+		      value="images/icons/copy_16.png"
+		      xhtml_alt="Copy"
+		      xhtml_title="Copy"
+		      text=" Copy"
+		      url="--concat('robot_edit.vspx?mode=copy&EDIT=', (control.vc_parent as vspx_row_template).te_rowset[1], '&url=',  (control.vc_parent as vspx_row_template).te_rowset[2], '&root=', (control.vc_parent as vspx_row_template).te_rowset[3])"
+		      />
 		    <v:button action="simple" style="image" name="data_set2_delete"
 		      value="images/icons/trash_16.png"
 		      xhtml_alt="Delete"
@@ -152,7 +184,7 @@
                         delete from WS.WS.VFS_SITE where VS_HOST = _host and VS_ROOT = _root;
                         delete from WS.WS.VFS_QUEUE where VQ_HOST = _host and VQ_ROOT = _root;
                         delete from WS.WS.VFS_URL where VU_HOST = _host and VU_ROOT = _root;
-                        delete from SYS_SCHEDULED_EVENT where SE_SQL = concat('WS.WS.SERV_QUEUE_TOP (\'',(control.vc_parent as vspx_row_template).te_rowset[2],'\',\'',_root,'\', 1, 0, null, null)');
+                        delete from SYS_SCHEDULED_EVENT where SE_SQL = concat('WS.WS.SERV_QUEUE_TOP(\'',_host,'\',\'',_root,'\', 1, 0, null, null)');
                         log_enable (old_mode, 1);
                         self.data_set2.vc_data_bind(e);
                       ]]>
@@ -177,4 +209,48 @@
         </v:template>
       </v:data-set>
     </div>
+  <div>
+            		    <v:button name="drop_selected_bt"
+            		      action="simple"
+            		      value="Delete Selected"
+			      xhtml_title="Drop Selected"
+			      >
+            		      <v:on-post>
+			<![CDATA[
+			  	
+			declare item, inx, ids any;
+			ids := vector ();
+			while (item := adm_next_checkbox('cb_', params, inx))
+			  {
+                            ids := vector_concat (ids, vector (atoi (item)));
+			  }
+			if (length (ids) = 0)
+                          {
+			  self.vc_is_valid := 0;
+			  self.vc_error_message := 'Nothing to delete';
+			  return;
+			  }
+                        declare old_mode int;
+			declare exit handler for sqlstate '*'
+			{
+                          log_enable (old_mode, 1);
+			  self.vc_is_valid := 0;
+			  self.vc_error_message := sprintf ('The delete failed due to SQL error: %s. You must delete manually corresponding entries from WS.WS.VFS_QUEUE and WS.WS.VFS_URL table.', __SQL_MESSAGE);
+			  return;
+			};
+			old_mode := log_enable (3, 1);
+			for select VS_HOST as _host, VS_ROOT as _root from WS.WS.VFS_SITE where VS_ID in (ids) do
+			{
+			  delete from WS.WS.VFS_QUEUE where VQ_HOST = _host and VQ_ROOT = _root;
+			  delete from WS.WS.VFS_URL where VU_HOST = _host and VU_ROOT = _root;
+			  delete from SYS_SCHEDULED_EVENT where SE_SQL = concat('WS.WS.SERV_QUEUE_TOP(\'',_host,'\',\'',_root,'\', 1, 0, null, null)');
+			}
+			delete from WS.WS.VFS_SITE where VS_ID in (ids);
+                        log_enable (old_mode, 1);
+                        self.data_set2.vc_data_bind(e);
+                        ]]>
+            		      </v:on-post>
+            		    </v:button>
+  </div>
+            </v:form>
 </v:page>
diff --git a/binsrc/yacutia/robot_edit.vspx b/binsrc/yacutia/robot_edit.vspx
index f20e7e2..1ca50fe 100644
--- a/binsrc/yacutia/robot_edit.vspx
+++ b/binsrc/yacutia/robot_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_edit.vspx,v 1.6.2.12 2011/03/08 13:38:13 source Exp $
+ -  $Id: robot_edit.vspx,v 1.6.2.15 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -46,7 +46,7 @@
       <v:variable name="_ask_rdf" type="int" default="0" persist="0" />
       <v:variable name="_udata" type="any" default="NULL" persist="0" />
       <v:variable name="_auth" type="varchar" default="''" persist="0" />
-      <v:variable name="mode" type="varchar" default="''" persist="0" />
+      <v:variable name="mode" type="varchar" default="''" persist="0" param-name="mode"/>
       <v:variable name="_old_url" type="varchar" default="''" persist="0" />
       <v:variable name="target_url" type="varchar" default="''" persist="0" />
       <v:variable name="target_uid" type="varchar" default="''" persist="0" />
@@ -63,6 +63,8 @@
       <v:variable name="_accept_rdf" type="int" default="0" persist="0" />
       <v:variable name="_bot" type="int" default="1" persist="0" />
       <v:variable name="_thr" type="int" default="1" persist="0" />
+      <v:variable name="_delay" type="float" default="1" persist="0" />
+      <v:variable name="_head" type="varchar" default="null" persist="0" />
     </vm:variables>
     <vm:menu>
       <vm:menuitem value="WebDAV Content Management"/>
@@ -94,7 +96,7 @@
             declare _idx varchar;
             declare _n_own, ename integer;
             self.mode := get_keyword ('mode', self.vc_page.vc_event.ve_params, self.mode);
-            if (get_keyword ('mode', self.vc_page.vc_event.ve_params) = 'edit')
+            if (get_keyword ('mode', self.vc_page.vc_event.ve_params) = 'edit' or get_keyword ('mode', self.vc_page.vc_event.ve_params) = 'copy')
             {
 	      declare _host, _root, _tmp any;
               _n_own := 0;
@@ -104,12 +106,12 @@
                 VS_NEWER, VS_DEL, VS_FOLLOW, VS_NFOLLOW, VS_OPTIONS,
 		VS_SRC, VS_METHOD, VS_OWN, VS_OTHER, VS_OPAGE, VS_REDIRECT, VS_STORE, 
 		VS_DLOAD_META, deserialize (VS_UDATA), VS_STORE_FN, VS_EXTRACT_FN, VS_CONVERT_HTML, VS_XPATH, coalesce (VS_DEPTH, 'unlimited'),
-		VS_ACCEPT_RDF, VS_BOT, VS_THREADS
+		VS_ACCEPT_RDF, VS_BOT, VS_THREADS, VS_DELAY, VS_HEADERS
                 into self._descr, self._host, self._url, _idx, self._root,
                 self._newd, self._del, self._flow, self._dflow, self._auth,
 		self._img, self._dav, _n_own, self._other, self._opage, self._redir, self._store, 
 		self._ask_rdf, self._udata, self._store_fn, self._ext_fn, self._convhtml, self._xp_exp, self._depth,
-		self._accept_rdf, self._bot, self._thr
+		self._accept_rdf, self._bot, self._thr, self._delay, self._head
                 from WS.WS.VFS_SITE where VS_HOST = _host and VS_ROOT = _root;
 
               if (self._other is null) 
@@ -163,12 +165,14 @@
               self._flow := '';
               self._dflow := '';
               self._store := '';
-              self._redir := '';
+              self._redir := '1';
 	      self.target_url := '';
 	      self.target_uid := '';
 	      self.target_pwd := '';
 	      self._udata := vector ();
               self._depth := 'unlimited';
+	      self._delay := 0;
+	      self._head := '';
             }
           ]]>
         </v:script>
@@ -316,6 +320,20 @@
               </td>
             </tr>
             <tr>
+		<td>Custom HTTP headers</td>
+              <td>
+                <v:text name="head" value="--coalesce (self._head, '')"  xhtml_size="70"/>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <label for="redir">Number of HTTP redirects to follow</label>
+	    </td>
+              <td>
+                <v:text name="redir" value="--self._redir" xhtml_id="redir" xhtml_size="5"/>
+              </td>
+            </tr>
+            <tr>
 		<td>XPath expression for links extraction</td>
               <td>
                 <v:text name="xp_exp" value="--coalesce (self._xp_exp, '')"  xhtml_size="70"/>
@@ -340,6 +358,12 @@
               </td>
             </tr>
             <tr>
+              <td>Crawl delay (sec)</td>
+              <td>
+                <v:text name="delay" value="--sprintf ('%.2f', self._delay)"  />
+              </td>
+            </tr>
+            <tr>
               <td>Store Function</td>
               <td>
                 <v:text name="store_fn" value="--self._store_fn" xhtml_size="50"/>
@@ -420,13 +444,6 @@
             <tr>
               <td/>
               <td>
-                <v:check-box name="redir" value="1" initial-checked="--case when self._redir then 1 else 0 end" xhtml_id="redir"/>
-                <label for="redir">Follow HTTP redirects</label>
-              </td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
                 <v:check-box name="store" value="1" initial-checked="--case when self._store then 1 else 0 end" xhtml_id="store"/>
                 <label for="store">Store content locally</label>
               </td>
@@ -590,10 +607,12 @@
                         self._other := atoi (get_keyword ('other', params, '0'));
 
 			self._xp_exp := get_keyword ('xp_exp', params, '');
+			self._head := get_keyword ('head', params, '');
 			self._depth := get_keyword ('depth', params, '');
 
 			if (self._depth = '' or self._depth = 'unlimited') self._depth := null;
 			if (self._xp_exp = '') self._xp_exp := null;
+			if (self._head = '') self._head := null;
 
 			if (self._xp_exp is not null)
 			  {
@@ -622,6 +641,7 @@
 			self._convhtml := atoi (get_keyword ('convhtml', params, '0'));
 			self._bot := atoi (get_keyword ('bot', params, '0'));
 			self._thr := atoi (get_keyword ('thr', params, '1'));
+			self._delay := atof (get_keyword ('delay', params, '0'));
 
 			if (get_keyword ('semweb', params) = '1' and 0 = length (self._store_fn) and 0 = length (self._ext_fn))
 			  {
@@ -729,7 +749,9 @@
 			      VS_XPATH = self._xp_exp,
 			      VS_ACCEPT_RDF = self._accept_rdf,
 			      VS_THREADS = self._thr,
-			      VS_BOT = self._bot
+			      VS_BOT = self._bot,
+			      VS_DELAY = self._delay,
+			      VS_HEADERS = self._head
                             where
                               VS_HOST = self._host and
                               VS_ROOT = self._root;
@@ -749,14 +771,14 @@
 			    VS_SRC, VS_METHOD, VS_OTHER, VS_OPTIONS, 
 			    VS_OPAGE, VS_REDIRECT, VS_STORE, VS_DLOAD_META, VS_UDATA,
 			    VS_STORE_FN, VS_EXTRACT_FN, VS_CONVERT_HTML, VS_XPATH, VS_DEPTH, VS_ACCEPT_RDF,
-			    VS_THREADS, VS_BOT)
+			    VS_THREADS, VS_BOT, VS_DELAY, VS_HEADERS)
 			    values
 			    (self._descr, self._host, self._url, _idx, (select U_ID from WS.WS.SYS_DAV_USER where U_NAME = self._own),
 			    self._root, stringdate(self._newd), self._del, self._flow, self._dflow, 
 			    self._img, self._dav, case when self._other then 'checked' else NULL end, self._auth,
 			    self._opage, self._redir, self._store, self._ask_rdf, serialize (self._udata), 
 			    self._store_fn, self._ext_fn, self._convhtml, self._xp_exp, self._depth, self._accept_rdf,
-			    self._thr, self._bot);
+			    self._thr, self._bot, self._delay, self._head);
 
 			    insert into WS.WS.VFS_QUEUE (VQ_HOST, VQ_URL, VQ_TS, VQ_STAT, VQ_ROOT) 
 			    values (self._host, self._url, now(), 'waiting', self._root);
diff --git a/binsrc/yacutia/robot_export.vspx b/binsrc/yacutia/robot_export.vspx
index 98b7aa4..1b914af 100644
--- a/binsrc/yacutia/robot_export.vspx
+++ b/binsrc/yacutia/robot_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_export.vspx,v 1.2.2.3 2010/09/20 10:16:50 source Exp $
+ -  $Id: robot_export.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_process.vspx b/binsrc/yacutia/robot_process.vspx
index 340b455..7a9d977 100644
--- a/binsrc/yacutia/robot_process.vspx
+++ b/binsrc/yacutia/robot_process.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_process.vspx,v 1.2.2.3 2010/09/20 10:16:50 source Exp $
+ -  $Id: robot_process.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_queues.vspx b/binsrc/yacutia/robot_queues.vspx
index 2770733..7d1780a 100644
--- a/binsrc/yacutia/robot_queues.vspx
+++ b/binsrc/yacutia/robot_queues.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_queues.vspx,v 1.2.2.7 2011/02/16 20:45:23 source Exp $
+ -  $Id: robot_queues.vspx,v 1.2.2.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_sched.vspx b/binsrc/yacutia/robot_sched.vspx
index d906bbb..e610e04 100644
--- a/binsrc/yacutia/robot_sched.vspx
+++ b/binsrc/yacutia/robot_sched.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_sched.vspx,v 1.3.2.3 2010/09/20 10:16:50 source Exp $
+ -  $Id: robot_sched.vspx,v 1.3.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_sites.vspx b/binsrc/yacutia/robot_sites.vspx
index a4842ed..9adf2b4 100644
--- a/binsrc/yacutia/robot_sites.vspx
+++ b/binsrc/yacutia/robot_sites.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_sites.vspx,v 1.2.2.6 2011/02/16 20:45:24 source Exp $
+ -  $Id: robot_sites.vspx,v 1.2.2.7 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_status.vspx b/binsrc/yacutia/robot_status.vspx
index c9233ca..4ca8b25 100644
--- a/binsrc/yacutia/robot_status.vspx
+++ b/binsrc/yacutia/robot_status.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_status.vspx,v 1.2.2.7 2011/03/08 13:38:13 source Exp $
+ -  $Id: robot_status.vspx,v 1.2.2.8 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/robot_urls_list.vspx b/binsrc/yacutia/robot_urls_list.vspx
index 966350e..f0514fc 100644
--- a/binsrc/yacutia/robot_urls_list.vspx
+++ b/binsrc/yacutia/robot_urls_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: robot_urls_list.vspx,v 1.2.2.3 2010/09/20 10:16:50 source Exp $
+ -  $Id: robot_urls_list.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/role_remove.vspx b/binsrc/yacutia/role_remove.vspx
index 2d382d8..2edca48 100644
--- a/binsrc/yacutia/role_remove.vspx
+++ b/binsrc/yacutia/role_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: role_remove.vspx,v 1.2.2.3 2010/09/20 10:16:51 source Exp $
+ -  $Id: role_remove.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/role_remove_inc.vspx b/binsrc/yacutia/role_remove_inc.vspx
index 895874f..13a027e 100644
--- a/binsrc/yacutia/role_remove_inc.vspx
+++ b/binsrc/yacutia/role_remove_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: role_remove_inc.vspx,v 1.2.2.3 2010/09/20 10:16:51 source Exp $
+ -  $Id: role_remove_inc.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/roles.vspx b/binsrc/yacutia/roles.vspx
index 5d82a5d..96a9471 100644
--- a/binsrc/yacutia/roles.vspx
+++ b/binsrc/yacutia/roles.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: roles.vspx,v 1.2.2.3 2010/09/20 10:16:51 source Exp $
+ -  $Id: roles.vspx,v 1.2.2.4 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/roles_inc.vspx b/binsrc/yacutia/roles_inc.vspx
index 85d3b9f..4867eb2 100644
--- a/binsrc/yacutia/roles_inc.vspx
+++ b/binsrc/yacutia/roles_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: roles_inc.vspx,v 1.3.2.2 2010/09/20 10:16:51 source Exp $
+ -  $Id: roles_inc.vspx,v 1.3.2.3 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sec_acl_edit.vspx b/binsrc/yacutia/sec_acl_edit.vspx
index 942c952..070400f 100644
--- a/binsrc/yacutia/sec_acl_edit.vspx
+++ b/binsrc/yacutia/sec_acl_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sec_acl_edit.vspx,v 1.2.2.4 2010/09/20 10:16:51 source Exp $
+ -  $Id: sec_acl_edit.vspx,v 1.2.2.5 2012/03/08 12:55:28 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sec_acl_edit_sp.vspx b/binsrc/yacutia/sec_acl_edit_sp.vspx
new file mode 100644
index 0000000..872f52f
--- /dev/null
+++ b/binsrc/yacutia/sec_acl_edit_sp.vspx
@@ -0,0 +1,834 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ -  $Id: sec_acl_edit_sp.vspx,v 1.1.4.3 2012/03/08 12:55:28 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<v:page name="acl_edit_page"
+        decor="yacutia_decor.vspx"
+        style="yacutia_style.xsl"
+        doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
+        fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro">
+  <vm:pagetitle>Virtuoso Web Services Authentication Service</vm:pagetitle>
+  <vm:pagewrapper>
+    <vm:variables>
+      <v:variable name="acl_vec" type="any" default="null" persist="1"/>
+      <v:variable name="changed" type="integer" default="0" persist="1"/>
+      <v:variable name="error_str33" type="varchar" default="''" persist="1"/>
+      <v:variable name="is_deny" type="integer" default="0" persist="1"/>
+      <v:variable persist="temp" name="r_count" type="integer" default="0"/>
+    </vm:variables>
+    <vm:menu>
+      <vm:menuitem name="HTTP" value="Access Control List Management"/>
+    </vm:menu>
+    <vm:rawheader>
+      <td class="page_title">
+        <?vsp
+          if (get_keyword('mode', self.vc_page.vc_event.ve_params) = 'edit' or get_keyword('mode', self.vc_page.vc_event.ve_params) = 'edit1')
+            http('Modify Access Control List');
+          else
+            http('Create HTTP Access Control List');
+        ?>
+    <v:before-data-bind>
+      <v:script>
+        <![CDATA[
+
+          if (get_keyword('mode', self.vc_page.vc_event.ve_params) = 'edit')
+            self.is_deny := 0;
+        ]]>
+      </v:script>
+    </v:before-data-bind>
+      </td>
+    </vm:rawheader>
+    <vm:pagebody>
+      <v:form name="acl_form" type="simple" method="POST" action="sec_acl_edit_sp.vspx">
+        <v:template name="crtab1_tem" type="simple" enabled="-- equ(self.is_deny, 0)">
+          <?vsp
+            declare alist varchar;
+	    declare _rate double precision;
+            declare _have, _u_id, _access, ord integer;
+	    declare filt, dest, obj, mod varchar;
+	    declare _limit int;
+            declare _vec, _vec_o, _vec4 any;
+            filt := get_keyword('filt', self.vc_page.vc_event.ve_params, '*');
+            dest := get_keyword('dest', self.vc_page.vc_event.ve_params, '*');
+            obj := atoi(get_keyword('obj', self.vc_page.vc_event.ve_params, '-1'));
+            mod := atoi(get_keyword('mod', self.vc_page.vc_event.ve_params, '-1'));
+	    _rate := cast (get_keyword('rate', self.vc_page.vc_event.ve_params, '1') as double precision);
+	    _limit := cast (get_keyword('limit', self.vc_page.vc_event.ve_params, '0') as int);
+            alist := upper(get_keyword('edit', self.vc_page.vc_event.ve_params));
+            -- self.alist := alist;
+            if (get_keyword('mode', self.vc_page.vc_event.ve_params) = 'edit')
+            {
+              self.acl_vec := vector();
+              self.changed := 0;
+              for (select * from DB.DBA.HTTP_ACL where upper(HA_LIST) = alist order by HA_ORDER) do
+              {
+                declare _gr_name varchar;
+                declare _vec1 any;
+                _vec1 := encode_base64(serialize(vector(HA_LIST, HA_ORDER, HA_OBJECT, HA_CLIENT_IP, HA_FLAG, HA_RW, HA_DEST_IP, HA_RATE, HA_LIMIT, 1)));
+                self.acl_vec := vector_concat(self.acl_vec, vector(_vec1));
+              }
+            }
+            if (alist = '' or get_keyword('cnc2', self.vc_page.vc_event.ve_params, '') = 'Cancel')
+            {
+              http_rewrite ();
+              http_request_status ('HTTP/1.1 302 Found');
+              http_header (sprintf('Location: sec_auth_serv_sp.vspx?sid=%s&realm=%s\r\n', self.sid, self.realm));
+            }
+            _access := get_keyword('access', self.vc_page.vc_event.ve_params, '');
+            if (_access = '_a')
+              _access := 0;
+            else
+              _access := 1;
+            if (get_keyword ('add_f', self.vc_page.vc_event.ve_params, '') = '1' and get_keyword ('_add', self.vc_page.vc_event.ve_params, '') <> '')
+            {
+              if (obj = -1 and alist = 'NEWS')
+          signal ('22023', 'Please specify a list of newsgroups to which this ACL applies');
+              ord := coalesce ((select max (HA_ORDER) from DB.DBA.HTTP_ACL where upper(HA_LIST) = upper(alist)), 0);
+              ord := ord + 1;
+              self.acl_vec := vector_concat(self.acl_vec, vector(encode_base64(serialize(vector(alist, ord, obj, filt, _access, mod, dest, _rate, _limit, 0)))));
+              self.changed := 1;
+            }
+            if (get_keyword ('_upd', self.vc_page.vc_event.ve_params, '') <> '')
+            {
+              _vec_o := get_keyword('vec_o', self.vc_page.vc_event.ve_params, '');
+              _vec_o := replace(_vec_o, ' ', '+');
+              _vec_o :=  deserialize(decode_base64(_vec_o));
+              declare vec_len, _idx integer;
+              declare _vec2, _vec3 any;
+              vec_len := length(self.acl_vec);
+              _idx := 0;
+              _vec4 := vector();
+              while (_idx < vec_len)
+              {
+                _vec2 := aref(self.acl_vec, _idx);
+                _vec3 := deserialize(decode_base64(_vec2));
+                if (_vec3[0] = _vec_o[0] and _vec3[3] = _vec_o[3] and _vec3[1] = _vec_o[1] and _vec3[4] = _vec_o[4])
+                {
+                  _vec2 := encode_base64(serialize(vector(alist, _vec3[1], obj, filt, _access, mod, dest, _rate, _limit, 0)));
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                }
+                else
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                _idx := _idx + 1;
+              }
+              self.acl_vec := _vec4;
+              self.changed := 1;
+            }
+            if (get_keyword ('DEL', self.vc_page.vc_event.ve_params, '') <> '')
+            {
+              _vec_o := get_keyword('DEL', self.vc_page.vc_event.ve_params, '');
+              _vec_o := replace(_vec_o, ' ', '+');
+              _vec := deserialize(decode_base64(_vec_o));
+              declare vec_len, _idx integer;
+              declare _vec2, _vec3 any;
+              vec_len := length(self.acl_vec);
+              _idx := 0;
+              _vec4 := vector();
+              while (_idx < vec_len)
+              {
+                _vec2 := aref(self.acl_vec, _idx);
+                _vec3 := deserialize(decode_base64(_vec2));
+                if (_vec3[0] <> _vec[0] or _vec3[3] <> _vec[3] or _vec3[1] <> _vec[1] or _vec3[4] <> _vec[4])
+                {
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                }
+                _idx := _idx + 1;
+              }
+              self.acl_vec := _vec4;
+              self.changed := 1;
+            }
+            if (get_keyword('EDIT', self.vc_page.vc_event.ve_params, '') <> '')
+            {
+              _vec_o := get_keyword('EDIT', self.vc_page.vc_event.ve_params, '');
+              _vec_o := replace(_vec_o, ' ', '+');
+              _vec :=  deserialize(decode_base64(_vec_o));
+              if (alist <> _vec[0])
+                signal('22023', 'Invalid ACL name supplied');
+              ord := _vec[1];
+              obj := _vec [2];
+              filt := _vec[3];
+              _access := _vec[4];
+              mod := _vec [5];
+              dest := _vec[6];
+	      _rate := _vec[7];
+	      _limit := _vec[8];
+            }
+            if (get_keyword('move', self.vc_page.vc_event.ve_params, '') in ('top', 'up', 'bottom', 'down'))
+            {
+              declare action varchar;
+              declare point, pos int;
+              declare upd, upd1, fla, acc any;
+              action := lower(get_keyword('move', self.vc_page.vc_event.ve_params));
+              _vec_o := get_keyword('vec', self.vc_page.vc_event.ve_params, '');
+              _vec_o := replace(_vec_o, ' ', '+');
+              _vec :=  deserialize(decode_base64(_vec_o));
+              alist := _vec[0];
+              ord := _vec[1];
+              filt := _vec[3];
+              _access := _vec[4];
+              declare vec_len, _idx, min_val integer;
+              declare _vec2, _vec3 any;
+              if (action = 'top')
+              {
+                declare max_value integer;
+                declare top_vl any;
+                vec_len := length(self.acl_vec);
+                _vec4 := vector();
+                _idx := 0;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec3 := deserialize(decode_base64(_vec2));
+                  if (_vec3[1] = ord)
+                  {
+                    if (_idx = 0)
+                      goto endscroll;
+                    max_value := _idx;
+		    top_vl := vector(_vec3[0], 1, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                    goto s1;
+                  }
+                  _idx := _idx + 1;
+                }
+                s1:;
+                _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(top_vl))));
+                _idx := 0;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec3 := deserialize(decode_base64(_vec2));
+                  _vec3 := vector(_vec3[0], _vec3[1] + 1, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                  if (_idx <> max_value)
+                    _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(_vec3))));
+                  _idx := _idx + 1;
+                }
+                self.acl_vec := _vec4;
+                self.changed := 1;
+              }
+              else if (action = 'up')
+              {
+                declare max_value integer;
+                declare prev, next any;
+                vec_len := length(self.acl_vec);
+                _vec4 := vector();
+                _idx := 0;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec3 := deserialize(decode_base64(_vec2));
+                  if (_vec3[1] = ord)
+                  {
+                    if (_idx = 0)
+                      goto endscroll;
+                    max_value := _idx - 1;
+                    prev := vector(_vec3[0], ord - 1, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                    _vec2 := aref(self.acl_vec, _idx - 1);
+                    _vec3 := deserialize(decode_base64(_vec2));
+                    next := vector(_vec3[0], ord, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                  }
+                  _idx := _idx + 1;
+                }
+                _idx := 0;
+                while (_idx < max_value)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                  _idx := _idx + 1;
+                }
+                _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(prev))));
+                _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(next))));
+                _idx := _idx + 2;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                  _idx := _idx + 1;
+                }
+                self.acl_vec := _vec4;
+                self.changed := 1;
+              }
+              else if (action = 'down')
+              {
+                declare max_value integer;
+                declare prev, next any;
+                vec_len := length(self.acl_vec);
+                _vec4 := vector();
+                _idx := 0;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec3 := deserialize(decode_base64(_vec2));
+                  if (_vec3[1] = ord)
+                  {
+                    max_value := _idx;
+                    if (_idx >= vec_len - 1)
+                      goto endscroll;
+                    next := vector(_vec3[0], ord + 1, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                    _vec2 := aref(self.acl_vec, _idx + 1);
+                    _vec3 := deserialize(decode_base64(_vec2));
+                    prev := vector(_vec3[0], ord, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                  }
+                  _idx := _idx + 1;
+                }
+                _idx := 0;
+                while (_idx < max_value)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                  _idx := _idx + 1;
+                }
+                _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(prev))));
+                _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(next))));
+                _idx := _idx + 2;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec4 := vector_concat(_vec4, vector(_vec2));
+                  _idx := _idx + 1;
+                }
+                self.acl_vec := _vec4;
+                self.changed := 1;
+              }
+              else if (action = 'bottom')
+              {
+                declare max_value integer;
+                declare bot_vl any;
+                vec_len := length(self.acl_vec);
+                _vec4 := vector();
+                _idx := 0;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec3 := deserialize(decode_base64(_vec2));
+                  if (_vec3[1] = ord)
+                  {
+                    if (_idx = vec_len - 1)
+                      goto endscroll;
+                    declare _vec22, _vec32 any;
+                    _vec22 := aref(self.acl_vec, vec_len - 1);
+                    _vec32 := deserialize(decode_base64(_vec22));
+                    max_value := _idx;
+                    bot_vl := vector(_vec3[0], _vec32[1] + 1, _vec3[2], _vec3[3], _vec3[4], _vec3[5], _vec3[6], _vec3[7], _vec3[8], 0);
+                    goto s2;
+                  }
+                  _idx := _idx + 1;
+                }
+                s2:;
+                _idx := 0;
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  if (_idx <> max_value)
+                    _vec4 := vector_concat(_vec4, vector(_vec2));
+                  _idx := _idx + 1;
+                }
+                _vec4 := vector_concat(_vec4, vector(encode_base64(serialize(bot_vl))));
+                self.acl_vec := _vec4;
+                self.changed := 1;
+              }
+              endscroll:;
+            }
+          ?>
+          <h3 class="page_section_head">Service: <?V upper(alist) ?></h3>
+          <table class="listing">
+            <input type="hidden" name="edit" value="<?V alist ?>" />
+            <input type="hidden" name="mode" value="edit1" />
+            <tr class="listing_header_row">
+              <th>Filter</th>
+            <?vsp
+
+              if (alist <> 'NEWS')
+                http ('<th>Access</th>');
+
+              if (alist <> 'NEWS' and alist <> 'HTTP')
+              {
+            ?>
+              <th>Destination</th>
+            <?vsp
+              }
+            ?>
+            <?vsp
+              if (alist <> 'HTTP' and alist <> 'PROXY')
+              {
+            ?>
+              <th>Newsgroup</th>
+              <th>Rate</th>
+              <th>Mode</th>
+            <?vsp
+              }
+            ?>
+              <th>Action</th>
+              <th>Move</th>
+            </tr>
+            <?vsp
+              _have := 0;
+              declare vec_len, _idx integer;
+              declare _vec2, _vec3 any;
+              vec_len := length(self.acl_vec);
+              _idx := 0;
+              while (_idx < vec_len)
+              {
+                _vec2 := aref(self.acl_vec, _idx);
+                _vec3 := deserialize(decode_base64(_vec2));
+                _idx := _idx + 1;
+                declare _gr_name varchar;
+                if (_vec3[0] = 'NEWS')
+                  select NG_NAME into _gr_name from DB.DBA.NEWS_GROUPS where NG_GROUP = _vec3[2];
+                _have := _have + 1;
+            ?>
+<?vsp
+              self.r_count := self.r_count + 1;
+              http (sprintf ('<tr class="%s">', case when mod (self.r_count, 2) then 'listing_row_odd' else 'listing_row_even' end));
+?>
+            <!-- tr -->
+              <td class="listing_col">
+                <?V _vec3[3] ?>
+              </td>
+              <?vsp
+          if (_vec3[0] <> 'NEWS')
+      {
+        http ('<td class="listing_col">');
+        if (_vec3[4] and _vec3[0] <> 'NEWS')
+          http ('<span class="acl_deny">deny</span>');
+        else
+          http ('<span class="acl_allow">allow</span>');
+
+        http ('</td>');
+      }
+
+                if (_vec3[0] <> 'NEWS' and _vec3[0] <> 'HTTP')
+                  {
+              ?>
+              <td class="listing_col">
+                <?V _vec3[6] ?>
+              </td>
+              <?vsp
+                  }
+                if (_vec3[0] <> 'HTTP' and _vec3[0] <> 'PROXY')
+                  {
+              ?>
+              <td class="listing_col">
+                <?V _gr_name ?>
+              </td>
+              <td class="listing_col">
+<?vsp
+--              if (_vec3[4] = 0 and _vec3[5] = 1)
+--                {
+         if ( floor (_vec3[7]) = _vec3[7])
+           http (sprintf ('%i', _vec3[7]));
+         else
+           http (sprintf ('%f', _vec3[7]));
+--      }
+--    else
+--      http ('n/a');
+?>
+              </td>
+              <td class="listing_col">
+                <?V case _vec3[5] when 1 then 'post' else 'read' end ?>
+              </td>
+              <?vsp
+                }
+              ?>
+              <td class="listing_col_action">
+                <a href="sec_acl_edit_sp.vspx?DEL=<?V _vec2 ?>&edit=<?V alist ?>&sid=<?V self.sid ?>&realm=<?V self.realm ?>">remove</a>
+                <a href="sec_acl_edit_sp.vspx?EDIT=<?V _vec2 ?>&edit=<?V alist ?>&sid=<?V self.sid ?>&realm=<?V self.realm ?>">edit</a>
+              </td>
+              <td class="listing_col_action">
+                <a href="sec_acl_edit_sp.vspx?move=top&vec=<?V _vec2 ?>&edit=<?/ alist ?>&sid=<?V self.sid ?>&realm=<?V self.realm ?>">top</a>
+                <a href="sec_acl_edit_sp.vspx?move=up&vec=<?V _vec2 ?>&edit=<?/ alist ?>&sid=<?V self.sid ?>&realm=<?V self.realm ?>">up</a>
+                <a href="sec_acl_edit_sp.vspx?move=down&vec=<?V _vec2 ?>&edit=<?/ alist ?>&sid=<?V self.sid ?>&realm=<?V self.realm ?>">down</a>
+                <a href="sec_acl_edit_sp.vspx?move=bottom&vec=<?V _vec2 ?>&edit=<?/ alist ?>&sid=<?V self.sid ?>&realm=<?V self.realm ?>">bottom</a>
+              </td>
+<?vsp
+              http ('</tr>');
+?>
+            <!-- /tr -->
+            <?vsp
+              }
+              if (_have = 0)
+                http('<tr><td class="listing_count" colspan="8">This access list is empty</td></tr>');
+            ?>
+          </table>
+          <v:button action="simple" name="cnc2" value="Cancel"/>
+<?vsp
+    declare have_news_group integer;
+
+    select count (*) into have_news_group from DB.DBA.NEWS_GROUPS;
+
+    if (have_news_group = 0 and alist = 'NEWS')
+      {
+?>
+<tr><td class="listing_count" colspan="8">News groups are not defined</td></tr>
+<?vsp
+   } else {
+?>
+          <v:button action="simple" name="_add1" value="Add new entry"/>
+<?vsp
+      }
+?>
+          <?vsp
+            if (self.changed <> 0)
+            {
+          ?>
+          <v:button action="simple" name="save" value="Activate changes">
+            <v:on-post>
+              <![CDATA[
+                declare ip varchar;
+                declare vec_len, is_deny, _idx, _ix1 integer;
+                declare bot_vl any;
+                declare _vec2, _vec3 any;
+                declare ip_vec any;
+                ip := http_client_ip();
+                if (ip)
+                  ip_vec := split_and_decode(ip, 0, '\0\0.');
+                else
+                  goto begin_proc;
+                vec_len := length(self.acl_vec);
+                _idx := 0;
+                is_deny := 0;
+                vec_len := length(self.acl_vec);
+                while (_idx < vec_len)
+                {
+                  _vec2 := aref(self.acl_vec, _idx);
+                  _vec3 := deserialize(decode_base64(_vec2));
+                  if (_vec3[4])
+                  {
+                    declare tmpstr, curstr varchar;
+                    declare pos, curpos integer;
+                    tmpstr := _vec3[3];
+                    _ix1 := 0;
+                    while (length(tmpstr) > 0)
+                    {
+                      pos := strchr(tmpstr, '.');
+                      if (pos)
+                        curstr := substring(tmpstr, 1, pos);
+                      else
+                        curstr := tmpstr;
+                      if ((ip_vec[_ix1] = curstr) or (curstr = '*'))
+                      {
+                        _ix1 := _ix1 +1;
+                        is_deny := 1;
+                        if (_ix1 > 4)
+                          goto begin_proc;
+                      }
+                      else
+                      {
+                        _ix1 := _ix1 +1;
+                        is_deny := 0;
+                        if (_ix1 > 4)
+                          goto begin_proc;
+                      }
+                      if (pos)
+                        tmpstr := substring(tmpstr, pos + 2, length(tmpstr) - pos);
+                      else
+                        goto aaa;
+                    }
+                    aaa:;
+                    if (is_deny = 1)
+                      goto begin_proc;
+                  }
+                  _idx := _idx + 1;
+                }
+                begin_proc:;
+                if (is_deny = 1)
+                  self.is_deny := 1;
+                else
+                {
+                  self.is_deny := 0;
+                  declare _stat, _msg, m_dta, res varchar;
+                  _stat := '00000';
+                  declare loc_alist varchar;
+                  loc_alist := upper(get_keyword('edit', self.vc_page.vc_event.ve_params));
+                  exec(sprintf('delete from DB.DBA.HTTP_ACL where HA_LIST = \'%s\'', loc_alist), _stat, _msg);
+                  if (_stat <> '00000')
+                  {
+                    self.error_str33 := 'Error during SQL processing';
+                    self.vc_data_bind(e);
+                    return;
+                  }
+                  _idx := 0;
+                  while (_idx < vec_len)
+      {
+        declare _temp any;
+
+        if (_vec3[2] = -1)
+          _temp := _vec3[4];
+        else
+          {
+       _temp := 1;
+       if (_vec3[7] <> 0)
+        _temp := 0;
+          }
+
+                    _vec2 := aref(self.acl_vec, _idx);
+                    _vec3 := deserialize(decode_base64(_vec2));
+                    _stat := '00000';
+
+                    exec('insert into HTTP_ACL (HA_LIST, HA_ORDER, HA_OBJECT, HA_CLIENT_IP, HA_FLAG, HA_RW, HA_DEST_IP, HA_RATE, HA_LIMIT) values (?, ?, ?, ?, ?, ?, ?, ?, ?)', _stat, _msg,
+                      vector(_vec3[0], _vec3[1], _vec3[2], trim (_vec3[3]), _temp, _vec3[5], _vec3[6], _vec3[7], _vec3[8]), m_dta, res);
+                    if (_stat <> '00000')
+                    {
+                      self.error_str33 := 'Error during SQL processing';
+                      self.vc_data_bind(e);
+                      return;
+                    }
+                    _idx := _idx + 1;
+                  }
+                }
+                self.changed := 0;
+                self.vc_data_bind(e);
+              ]]>
+            </v:on-post>
+          </v:button>
+          <?vsp
+            }
+          ?>
+          <?vsp
+            if (get_keyword('_add1', self.vc_page.vc_event.ve_params, '') <> '' or get_keyword ('EDIT', self.vc_page.vc_event.ve_params, '') <> '')
+            {
+          ?>
+          <br/>
+          <table class="MainData" border="1" cellpadding="3" cellspacing="0">
+            <tr>
+              <td>
+                <table class="MainData" border="0" cellpadding="3" cellspacing="0">
+                  <tr>
+                    <td colspan="7">
+                      <input type="hidden" name="add_f" value="1" />
+                      <table class="MainData" border="0" WIDTH="100%">
+                        <tr>
+                          <td>Filter (IP mask)</td>
+                          <td>
+                            <input type="text" name="filt" value="<?V filt ?>" size="15"/>
+                          </td>
+                        </tr>
+                        <?vsp
+                          if (alist not in ('NEWS'))
+                            {
+                        ?>
+                        <tr>
+                          <td>Access</td>
+                          <td>
+                            <select name="access">
+                              <?vsp
+                                if (_access)
+                                {
+                                  http('<option value="_d" selected="selected">Deny</option>');
+                                  http('<option value="_a">Allow</option>');
+                                }
+                                else
+                                {
+                                  http('<option value="_d" >Deny</option>');
+                                  http('<option value="_a" selected="selected">Allow</option>');
+                                }
+                              ?>
+                            </select>
+                          </td>
+                        </tr>
+                        <?vsp
+          }
+                          if (alist not in ('HTTP', 'NEWS'))
+                            {
+                        ?>
+                        <tr>
+                          <td>Destination (IP mask)</td>
+                          <td>
+                            <INPUT type="text" name="dest" value="<?=dest?>" size="15"/>
+                          </td>
+                        </tr>
+                        <?vsp
+                            }
+                          if (alist not in ('HTTP', 'PROXY', 'NEWS'))
+                            {
+                        ?>
+                        <tr>
+                          <td class="genlisthead">Object</td>
+                          <td>
+                            <input type="text" name="obj" value="<?=obj?>" size="15"/>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td class="genlisthead">Mode</td>
+                          <td>
+                            <input type="text" name="mod" value="<?=mod?>" size="15"/>
+                          </td>
+                        </tr>
+                        <?vsp
+                          }
+                          if (alist in ('NEWS'))
+                          {
+                        ?>
+                        <tr>
+                          <td class="genlisthead">Newsgroup</td>
+                          <td>
+                            <select name="obj" >
+                              <?vsp
+                                for (select NG_NAME, NG_GROUP from NEWS_GROUPS) do
+                                {
+                                  if (obj = NG_GROUP)
+                                    http (sprintf ('<option value="%i" selected="selected">%s</option>', NG_GROUP, NG_NAME));
+                                  else
+                                    http (sprintf ('<option value="%i">%s</option>', NG_GROUP, NG_NAME));
+                                }
+                              ?>
+                            </select>
+                          </td>
+                        </tr>
+                        <tr>
+			    <td class="genlisthead">Rate</td>
+                          <td>
+                            <input type="text" name="rate" value="<?=_rate?>" size="15"/>
+                          </td>
+                        </tr>
+                        <tr>
+			    <td class="genlisthead">Limit</td>
+                          <td>
+                            <input type="text" name="limit" value="<?=_limit?>" size="15"/>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td class="genlisthead">Mode</td>
+                          <td>
+                            <select name="mod">
+                              <?vsp
+                                if (mod)
+                                {
+                                  http('<option value="1" selected="selected">Post</option>');
+                                  http('<option value="0">Read</option>');
+                                }
+                                else
+                                {
+                                  http('<option value="1">Post</OPTION>');
+                                  http('<option value="0" selected="selected">Read</option>');
+                                }
+                              ?>
+                            </select>
+                          </td>
+                        </tr>
+                        <?vsp
+                          }
+                        ?>
+                      </table>
+                    </td>
+                  </tr>
+                  <tr>
+                    <td align="center" colspan="8">
+                      <input type="submit" name="cncl" value="Cancel"/>
+                      <?vsp
+                        if (get_keyword ('EDIT', self.vc_page.vc_event.ve_params, '') <> '')
+                        {
+                          http('<input type="submit" name="_upd" value="Update">');
+                          http(sprintf ('<input type="hidden" name="vec_o" value="%s">', _vec_o));
+                        }
+                        else
+                          http('<input type="submit" name="_add" value="Add">');
+                      ?>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            </tr>
+          </table>
+          <?vsp
+            }
+          ?>
+        </v:template>
+        <v:template name="crtab_tem" type="simple" enabled="-- equ(self.is_deny, 1)">
+          <?vsp
+            declare alist varchar;
+            alist := upper(get_keyword('edit', self.vc_page.vc_event.ve_params));
+          ?>
+          <table class="SubAction" border="0" cellpadding="3" cellspacing="0">
+            <input type="hidden" name="edit" value="<?V alist ?>" />
+            <input type="hidden" name="mode" value="edit1" />
+            <tr>
+              <td>
+                Some of new entries will deny your IP. Do you really want to activate changes?
+              </td>
+              <td>
+              </td>
+            </tr>
+            <tr>
+              <td align="center">
+                <v:button action="simple" name="no_1" value="No">
+                  <v:on-post>
+                    <![CDATA[
+                       self.is_deny := 0;
+                       self.changed := 1;
+                    ]]>
+                  </v:on-post>
+                </v:button>
+                <v:button action="simple" name="yes_1" value="Yes">
+                  <v:on-post>
+                    <![CDATA[
+                      self.is_deny := 0;
+                      declare _stat, _msg, m_dta, res varchar;
+                      declare vec_len, _idx integer;
+                      _stat := '00000';
+                      declare loc_alist varchar;
+                      loc_alist := upper(get_keyword('edit', self.vc_page.vc_event.ve_params));
+                      exec(sprintf('delete from DB.DBA.HTTP_ACL where HA_LIST = \'%s\'', loc_alist), _stat, _msg);
+                      if (_stat <> '00000')
+                      {
+                        self.error_str33 := 'Error during SQL processing';
+                        return;
+                      }
+                      _idx := 0;
+                      vec_len := length(self.acl_vec);
+                      declare _vec2, _vec3 any;
+                      while (_idx < vec_len)
+                      {
+            declare _temp any;
+                        _vec2 := aref(self.acl_vec, _idx);
+                        _vec3 := deserialize(decode_base64(_vec2));
+                        _stat := '00000';
+
+           if (_vec3[2] = -1)
+       _temp := _vec3[4];
+           else
+       {
+          _temp := 1;
+          if (_vec3[7] <> 0)
+           _temp := 0;
+       }
+
+                        exec('insert into HTTP_ACL (HA_LIST, HA_ORDER, HA_OBJECT, HA_CLIENT_IP, HA_FLAG, HA_RW, HA_DEST_IP, HA_RATE, HA_LIMIT) values (?, ?, ?, ?, ?, ?, ?, ?, ?)', _stat, _msg,
+                          vector(_vec3[0], _vec3[1], _vec3[2], trim (_vec3[3]), _temp, _vec3[5], _vec3[6], _vec3[7], _vec3[8]), m_dta, res);
+                        if (_stat <> '00000')
+                        {
+                          self.error_str33 := 'Error during SQL processing';
+                          return;
+                        }
+                        _idx := _idx + 1;
+                      }
+                    ]]>
+                  </v:on-post>
+                </v:button>
+              </td>
+            </tr>
+          </table>
+        </v:template>
+      </v:form>
+    </vm:pagebody>
+  </vm:pagewrapper>
+</v:page>
diff --git a/binsrc/yacutia/sec_auth_serv.vspx b/binsrc/yacutia/sec_auth_serv.vspx
index 20fbb17..320427b 100644
--- a/binsrc/yacutia/sec_auth_serv.vspx
+++ b/binsrc/yacutia/sec_auth_serv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_auth_serv.vspx,v 1.3.2.7 2011/01/25 14:21:43 source Exp $
+ -  $Id: sec_auth_serv.vspx,v 1.3.2.11 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -66,8 +66,8 @@
     return 'Deny';
   </v:method>
   <v:method name="fmt_dest" arglist="in i any">
-    if (self.acl_name = 'HTTP')
-      return 'N/A';
+    --if (self.acl_name = 'HTTP')
+    --  return 'N/A';
     return i;
   </v:method>
   <v:method name="fmt_obj" arglist="in i any">
@@ -151,11 +151,22 @@
 			<v:url xhtml_style="page_tab" url="sec_auth_serv.vspx?acl=PROXY" value="PROXY" render-only="1"/>
 		      </td>
                       <?vsp
+		        if (vad_check_version ('pubsubhub') is not null)
+			  {
+		      ?>
+		      <td class="<?V self.astyle ('PSH') ?>" align="center">
+			<v:url xhtml_style="page_tab" url="sec_auth_serv.vspx?acl=PSH" value="PSH" render-only="1"/>
+		      </td>
+		      <td class="<?V self.astyle ('PSH-SSL') ?>" align="center">
+			<v:url xhtml_style="page_tab" url="sec_auth_serv.vspx?acl=PSH-SSL" value="PSH-SSL" render-only="1"/>
+		      </td>
+                      <?vsp
+		          }
                         declare i, fnd integer;
                         i := 0; fnd := 0;
-			for select distinct HA_LIST from HTTP_ACL where HA_LIST not in ('HTTP','NEWS','PROXY') do
+			for select distinct HA_LIST from HTTP_ACL where HA_LIST not in ('HTTP','NEWS','PROXY', 'Sponger','PSH','PSH-SSL') do
                         {
-			  if (self.acl_name not in ('HTTP','NEWS','PROXY') and HA_LIST = self.acl_name)
+			  if (self.acl_name not in ('HTTP','NEWS','PROXY','PSH','PSH-SSL') and HA_LIST = self.acl_name)
 			    fnd := 1;
 			  ?>
 			  <td class="<?V self.astyle (HA_LIST) ?>" align="center">
@@ -166,7 +177,7 @@
                           i := i + 1;
                         }
 
-			if (not fnd and self.acl_name not in ('HTTP','NEWS','PROXY'))
+			if (not fnd and self.acl_name not in ('HTTP','NEWS','PROXY', 'Sponger','PSH','PSH-SSL'))
 			  {
 			  ?>
 			  <td class="<?V self.astyle (self.acl_name) ?>" align="center">
@@ -176,11 +187,11 @@
 			  <?vsp
 			  }
                       ?>
-		      <?vsp if (DB.DBA.VAD_CHECK_VERSION ('Framework') is not null) { ?>
-		      <td class="<?V self.astyle ('SPARQL-SSL') ?>" align="center">
+		      <!--?vsp if (DB.DBA.VAD_CHECK_VERSION ('Framework') is not null) { ?-->
+		      <!--td class="<?V self.astyle ('SPARQL-SSL') ?>" align="center">
 			<v:url xhtml_style="page_tab" url="sparql_acl.vspx" value="SPARQL-SSL" render-only="1"/>
-		      </td>
-		      <?vsp } ?>
+		      </td-->
+		      <!--?vsp } ?-->
                         <!--td class="page_tab_empty" align="center" width="100%">
                           <table cellpadding="0" cellspacing="0">
                             <tr>
@@ -451,7 +462,7 @@
 				</v:select-list>
 			      </td>
 			    </tr>
-			    <?vsp if (self.acl_name <> 'HTTP' and self.acl_name <> 'NEWS') { ?>
+			    <?vsp if (self.acl_name <> 'NEWS') { ?>
 			    <tr>
 			      <td>Destination</td><td><v:text name="dest1" value="--self.dest"/></td>
 			    </tr>
@@ -534,7 +545,7 @@
                                     rat := 0;
                                     lim := 0;
 
-				    if (self.acl_name <> 'HTTP')
+				    --if (self.acl_name <> 'HTTP')
 				      dest := self.dest1.ufl_value;
 
 				    if (self.acl_name not in ('HTTP', 'PROXY'))
diff --git a/binsrc/yacutia/sec_auth_serv_sp.vspx b/binsrc/yacutia/sec_auth_serv_sp.vspx
new file mode 100644
index 0000000..68373fa
--- /dev/null
+++ b/binsrc/yacutia/sec_auth_serv_sp.vspx
@@ -0,0 +1,615 @@
+<?xml version="1.0"?>
+<!--
+ -
+ -  $Id: sec_auth_serv_sp.vspx,v 1.1.4.3 2012/03/08 12:55:29 source Exp $
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<v:page name="auth_serv"
+        decor="yacutia_decor.vspx"
+        style="yacutia_style.xsl"
+        doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
+        fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/" xmlns:vm="http://www.openlinksw.com/vspx/macro">
+  <vm:pagetitle>Virtuoso Access Control Lists</vm:pagetitle>
+  <vm:pagewrapper>
+    <vm:variables>
+      <v:variable persist="0" name="acl_name" type="varchar" default="'Sponger'" param-name="acl"/>
+      <v:variable persist="0" name="acl_list" type="any" default="null" />
+      <v:variable persist="0" name="acl_list_mta" type="any" default="null" />
+      <v:variable persist="0" name="edit" type="int" default="0" />
+      <v:variable persist="0" name="ch" type="int" default="0" />
+
+      <v:variable persist="0" name="filt" type="any" default="null" />
+      <v:variable persist="0" name="acc" type="any" default="null" />
+      <v:variable persist="0" name="dest" type="any" default="null" />
+      <v:variable persist="0" name="mod" type="any" default="null" />
+      <v:variable persist="0" name="rat" type="any" default="null" />
+      <v:variable persist="0" name="lim" type="any" default="null" />
+      <v:variable persist="0" name="obj" type="any" default="null" />
+      <v:variable persist="0" name="idx" type="any" default="null" />
+    </vm:variables>
+    <vm:menu>
+      <vm:menuitem name="HTTP" value="Access Control Lists"/>
+    </vm:menu>
+    <vm:header caption="Access Control Lists">
+     <!--vm:help id="sec_auth_serv_sp" sect=""/-->
+    </vm:header>
+    <vm:pagebody>
+  <v:method name="astyle" arglist="in cmp varchar">
+    <![CDATA[
+    if ((self.acl_name = cmp))
+      return 'page_tab_selected';
+    return 'page_tab';
+    ]]>
+  </v:method>
+  <v:method name="fmt_acl" arglist="in i any">
+    if (not i)
+      return 'Allow';
+    return 'Deny';
+  </v:method>
+  <v:method name="fmt_dest" arglist="in i any">
+    if (self.acl_name = 'HTTP')
+      return 'N/A';
+    return i;
+  </v:method>
+  <v:method name="fmt_obj" arglist="in i any">
+    if (self.acl_name in ('HTTP', 'PROXY'))
+      return 'N/A';
+    else if (self.acl_name = 'NEWS')
+      return coalesce ((select NG_NAME from DB.DBA.NEWS_GROUPS where NG_GROUP = i), 'invalid group');
+    return i;
+  </v:method>
+  <v:method name="fmt_mode" arglist="in i any">
+    if (self.acl_name in ('HTTP', 'PROXY'))
+      return 'N/A';
+    else if (self.acl_name = 'NEWS')
+      {
+        if (i)
+	  return 'Post';
+	else
+	  return 'Read';
+      }
+    return i;
+  </v:method>
+  <v:method name="fmt_rate" arglist="in i any">
+    --if (self.acl_name in ('HTTP', 'PROXY'))
+    --  return 'N/A';
+    return i;
+  </v:method>
+  <v:on-init>
+    <!-- XXX: do not make change to columns or their number w/o having same in array
+    manipulation bellow
+    -->
+    if (self.acl_list is null)
+      {
+        declare dta, mta any;
+	exec ('select HA_ORDER, HA_OBJECT, HA_CLIENT_IP, HA_FLAG, HA_RW, HA_DEST_IP, HA_RATE, HA_LIMIT
+	from HTTP_ACL where HA_LIST = ? order by HA_ORDER',	null, null, vector ('Sponger'), 0, mta, dta);
+	self.acl_list := dta;
+	self.acl_list_mta := mta;
+      }
+      
+    </v:on-init>
+    <v:form name="page_form" type="simple" method="POST">
+	<!-- top of security layout -->
+      <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
+        <tr valign='top'>
+          <td>
+            <table cellpadding='10' cellspacing='0' border='0' width='100%'>
+              <tr>
+                <td>
+                  <table cellpadding="0" cellspacing="0" border="0">
+                    <tr>
+		      <!--td class="page_tab" align="center">
+			  	
+			<v:url xhtml_style="page_tab" url="sec_pki_1.vspx" value="Public Key Infrastructure" render-only="1"/>
+		      </td-->
+		      <td class="page_tab_selected" align="center">
+			Access Control
+		      </td>
+			<td class="page_tab_empty" align="right" width="100%">
+                        </td>
+                    </tr>
+                  </table>
+                  <table class="tab_page">
+                    <tr>
+			<td valign="top">
+		   <!-- end of top security layout -->
+      <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
+        <tr valign='top'>
+          <td>
+            <table cellpadding='10' cellspacing='0' border='0' width='100%'>
+              <tr>
+                <td>
+                  <table cellpadding="0" cellspacing="0" border="0">
+                    <tr>
+
+		      <?vsp
+		        if (vad_check_version ('rdf_mappers') is not null)
+			  {
+		      ?>
+		      <td class="<?V self.astyle ('Sponger') ?>" align="center">
+			<v:url xhtml_style="page_tab" url="sec_auth_serv_sp.vspx?acl=Sponger" value="Sponger" render-only="1"/>
+		      </td>
+                      <?vsp
+		          }
+                      ?>
+		      <?vsp if (DB.DBA.VAD_CHECK_VERSION ('Framework') is not null) { ?>
+		      <td class="<?V self.astyle ('SPARQL-SSL') ?>" align="center">
+			<v:url xhtml_style="page_tab" url="sparql_acl.vspx" value="SPARQL-SSL" render-only="1"/>
+		      </td>
+		      <?vsp } ?>
+                        
+			<td class="page_tab_empty" align="right" width="100%">
+                        </td>
+                    </tr>
+                  </table>
+                  <table class="tab_page">
+                    <tr>
+		      <td valign="top">
+			<!-- MAIN -->
+			<table class="listing">
+			  <tr class="listing_header_row">
+			    <th>Filter</th>
+			    <th>Access</th>
+			    <th>Destination</th>
+			    <th>Object</th>
+			    <th>Mode</th>
+			    <th>Rate</th>
+			    <th>Action</th>
+			  </tr>
+			  <v:data-set name="ds" data="--self.acl_list" meta="--self.acl_list_mta"
+			    nrows="-1" scrollable="0">
+			    <v:template name="ds_rpt" type="repeat">
+			<v:template name="ds_br" type="browse">
+			  <tr class="<?V case when mod (control.te_ctr, 2) = 0 then 'listing_row_even' else 'listing_row_odd' end ?>">
+			  <td><v:label value="--(control.vc_parent as vspx_row_template).te_rowset[2]"/></td>
+			  <td><v:label value="--self.fmt_acl((control.vc_parent as vspx_row_template).te_rowset[3])"/></td>
+			  <td><v:label value="--self.fmt_dest((control.vc_parent as vspx_row_template).te_rowset[5])"/></td>
+			  <td><v:label value="--self.fmt_obj((control.vc_parent as vspx_row_template).te_rowset[1])"/></td>
+			  <td><v:label value="--self.fmt_mode((control.vc_parent as vspx_row_template).te_rowset[4])"/></td>
+			  <td><v:label value="--self.fmt_rate((control.vc_parent as vspx_row_template).te_rowset[6])"/></td>
+			  <td  class="listing_col_action">
+			    <v:button name="edit_row" action="simple" value="images/icons/edit_16.png"
+			      style="image" xhtml_alt="Edit" xhtml_title="Edit" text=" Edit">
+				  <v:on-post>
+				    self.edit := 1;
+				    self.apply_changes.vc_enabled := 0;
+				    self.filt := (control.vc_parent as vspx_row_template).te_rowset[2];
+				    self.acc := (control.vc_parent as vspx_row_template).te_rowset[3];
+				    self.dest := (control.vc_parent as vspx_row_template).te_rowset[5];
+				    self.obj := (control.vc_parent as vspx_row_template).te_rowset[1];
+				    self.mod := (control.vc_parent as vspx_row_template).te_rowset[4];
+				    self.rat := (control.vc_parent as vspx_row_template).te_rowset[6];
+				    self.lim := (control.vc_parent as vspx_row_template).te_rowset[7];
+				    self.idx := (control.vc_parent as vspx_row_template).te_ctr;
+				    self.edit_acl.vc_data_bind (e);
+				  </v:on-post>
+			    </v:button>
+			    <v:button name="del_row" action="simple" value="images/icons/trash_16.png" style="image"
+			      xhtml_alt="Delete" xhtml_title="Delete" text=" Delete">
+			      <v:on-post><![CDATA[
+				declare arr, new_arr, to_del any;
+				declare l, i int;
+
+				arr := self.acl_list;
+				to_del := (control.vc_parent as vspx_row_template).te_rowset[0];
+				l := length (arr);
+				new_arr := make_array (l-1, 'any');
+				i := 0;
+				foreach (any elm in arr) do
+				  {
+				    if (elm[0] <> to_del)
+				      {
+				        new_arr [i] := elm;
+					i := i + 1;
+				      }
+				  }
+				self.acl_list := new_arr;
+				self.ch := 1;
+				self.edit := 0;
+				self.edit_acl.vc_enabled := 0;
+				self.ds.vc_data_bind (e);
+				self.apply_changes.vc_data_bind (e);
+				]]></v:on-post>
+			    </v:button>
+			    <v:button name="up_row" action="simple" value="images/icons/previous_16.png" style="image"
+			      xhtml_alt="Up" xhtml_title="Up">
+			      <v:on-post><![CDATA[
+				declare arr, new_arr, to_move any;
+				declare tmp any;
+				declare inx, i int;
+				tmp := null;
+
+				to_move := (control.vc_parent as vspx_row_template).te_rowset[0];
+				arr := self.acl_list;
+
+				foreach (any elm in arr) do
+				  {
+				    if (elm[0] = to_move)
+				      {
+				        goto swap_it;
+				      }
+				    tmp := elm;
+				    i := i + 1;
+				  }
+				swap_it:
+				if (tmp is not null)
+				  {
+				    arr[i-1] := (control.vc_parent as vspx_row_template).te_rowset;
+				    arr[i] := tmp;
+				  }
+
+				self.acl_list := arr;
+				self.ch := 1;
+				self.edit := 0;
+				self.edit_acl.vc_enabled := 0;
+				self.ds.vc_data_bind (e);
+				self.apply_changes.vc_data_bind (e);
+				]]></v:on-post>
+			    </v:button>
+			    <v:button name="down_row" action="simple" value="images/icons/next_16.png" style="image"
+			      xhtml_alt="Down" xhtml_title="Down">
+			      <v:on-post><![CDATA[
+				declare arr, new_arr, to_move any;
+				declare tmp any;
+				declare inx, i int;
+				tmp := null;
+
+				to_move := (control.vc_parent as vspx_row_template).te_rowset[0];
+				arr := self.acl_list;
+
+				foreach (any elm in arr) do
+				  {
+				    if (elm[0] = to_move)
+				      {
+				        tmp := elm;
+				        inx := i;
+				      }
+				    else if (tmp is not null)
+				      {
+				        arr[inx] := elm;
+					arr[i] := tmp;
+					goto swap_it;
+				      }
+				    i := i + 1;
+				  }
+				swap_it:
+				self.acl_list := arr;
+				self.ch := 1;
+				self.edit := 0;
+				self.edit_acl.vc_enabled := 0;
+				self.ds.vc_data_bind (e);
+				self.apply_changes.vc_data_bind (e);
+				]]></v:on-post>
+			    </v:button>
+			    <v:button name="first_row" action="simple" value="images/icons/first_16.png" style="image"
+			      xhtml_alt="First" xhtml_title="First">
+			      <v:on-post><![CDATA[
+				declare arr, new_arr, to_move, new_arr any;
+				declare tmp any;
+				declare inx, i, l int;
+				tmp := null;
+
+				to_move := (control.vc_parent as vspx_row_template).te_rowset[0];
+				arr := self.acl_list;
+				l := length (arr);
+				i := 1;
+				new_arr := make_array (l, 'any');
+
+				foreach (any elm in arr) do
+				  {
+				    if (elm[0] = to_move)
+				      {
+				        new_arr[0] := elm;
+				      }
+				    else
+				      {
+				        new_arr[i] := elm;
+				        i := i + 1;
+				      }
+				  }
+				self.acl_list := new_arr;
+				self.ch := 1;
+				self.edit := 0;
+				self.edit_acl.vc_enabled := 0;
+				self.ds.vc_data_bind (e);
+				self.apply_changes.vc_data_bind (e);
+				]]></v:on-post>
+			    </v:button>
+			    <v:button name="last_row" action="simple" value="images/icons/last_16.png" style="image"
+			      xhtml_alt="Last" xhtml_title="Last">
+			      <v:on-post><![CDATA[
+				declare arr, new_arr, to_move, new_arr any;
+				declare tmp any;
+				declare inx, i, l int;
+				tmp := null;
+
+				to_move := (control.vc_parent as vspx_row_template).te_rowset[0];
+				arr := self.acl_list;
+				l := length (arr);
+				i := 0;
+				new_arr := make_array (l, 'any');
+
+				foreach (any elm in arr) do
+				  {
+				    if (elm[0] = to_move)
+				      {
+				        new_arr[l-1] := elm;
+				      }
+				    else
+				      {
+				        new_arr[i] := elm;
+				        i := i + 1;
+				      }
+				  }
+				self.acl_list := new_arr;
+				self.ch := 1;
+				self.edit := 0;
+				self.edit_acl.vc_enabled := 0;
+				self.ds.vc_data_bind (e);
+				self.apply_changes.vc_data_bind (e);
+				]]></v:on-post>
+			    </v:button>
+			  </td>
+			</tr>
+			</v:template>
+			    </v:template>
+			  </v:data-set>
+			  <v:template type="simple" name="add_rec" enabled="--equ (self.edit, 0)">
+			    <tr>
+			      <td colspan="1">
+				<v:button name="add_new_rec" value="Add New Rule" action="simple">
+				  <v:on-post>
+				    self.edit := 1;
+				    self.add_rec.vc_enabled := 0;
+				    self.edit_acl.vc_data_bind (e);
+				  </v:on-post>
+				</v:button>
+			      </td>
+			      <!--td colspan="6">
+				<v:form name="add_acl_list_f" method="POST" type="simple">
+				<v:text name="n_acl_nam" value="" xhtml_size="10" error-glyph="*">
+				  <v:validator test="length" min="1" max="255" message="Enter a valid ACL name"/>
+				</v:text>
+				<v:button action="simple" name="add_new_acl" value="Add New ACL">
+				  <v:on-post>
+				    if (self.vc_is_valid)
+				      {
+				        self.vc_redirect (sprintf ('sec_auth_serv_sp.vspx?acl=%U',
+				          self.n_acl_nam.ufl_value));
+				      }
+				  </v:on-post>
+				</v:button>
+			        </v:form>
+			      </td-->
+			    </tr>
+			</v:template>
+			</table>
+			<v:form name="edit_acl" method="POST" type="simple" enabled="--self.edit">
+			  <table>
+			    <tr>
+			      <td>Filter</td><td><v:text name="filt1" value="--self.filt" error-glyph="*">
+				  <v:validator test="regexp" regexp="^[^ \t\n\r]+$" message="Filter value is mandatory"/>
+				</v:text>
+			      </td>
+			    </tr>
+			    <tr>
+			      <td>Access</td><td>
+				<v:select-list name="acc1" value="--self.acc">
+				  <v:item name="Allow" value="0"/>
+				  <v:item name="Deny" value="1"/>
+				</v:select-list>
+			      </td>
+			    </tr>
+			    <?vsp if (self.acl_name <> 'HTTP' and self.acl_name <> 'NEWS') { ?>
+			    <tr>
+			      <td>Destination</td><td><v:text name="dest1" value="--self.dest"/></td>
+			    </tr>
+			    <?vsp }
+
+			         if (self.acl_name not in ('HTTP', 'PROXY')) {
+			    ?>
+			    <tr>
+			      <td><?V case when self.acl_name = 'NEWS' then 'Group' else 'Object' end ?></td><td>
+				<?vsp if (self.acl_name = 'NEWS') { ?>
+				<v:data-list name="obj2" value="--self.obj"
+				  sql="select NG_NAME, NG_GROUP from DB.DBA.NEWS_GROUPS"
+				  key-column="NG_GROUP" value-column="NG_NAME" />
+				<?vsp } else { ?>
+				<v:text name="obj1" value="--self.obj"
+				  enabled="--case when self.acl_name not in ('HTTP', 'PROXY', 'NEWS') then 1 else 0 end" error-glyph="*">
+				  <v:validator test="regexp" regexp="^[\-+]?[0-9]+$" message="Number is expected"
+				    runat='server'/>
+				</v:text>
+				<?vsp }?>
+			      </td>
+			    </tr>
+			    <tr>
+			      <td><?V case when self.acl_name = 'NEWS' then 'Activity' else 'Mode' end ?></td><td>
+				<?vsp if (self.acl_name = 'NEWS') { ?>
+				<v:select-list name="mod2" value="--self.mod">
+				  <v:item name="post" value="1"/>
+				  <v:item name="read" value="0"/>
+				</v:select-list>
+				<?vsp } else { ?>
+				<v:text name="mod1" value="--self.mod" enabled="--case when self.acl_name not in ('HTTP', 'PROXY', 'NEWS') then 1 else 0 end" error-glyph="*">
+				  <v:validator test="regexp" regexp="^[\-+]?[0-9]+$" message="Number is expected"
+				    runat='server'/>
+				</v:text>
+				<?vsp }?>
+			      </td>
+			    </tr>
+			    <?vsp } ?>
+			    <tr>
+			      <td>Rate</td><td>
+				<v:text name="rat1" value="--self.rat" default_value="0" error-glyph="*">
+				  <v:validator test="regexp" regexp="^[\-+]?[0-9]+(\.[0-9]+)?$" message="Decimal number is expected"
+				    runat='server'/>
+				</v:text>
+			      </td>
+			    </tr>
+			    <tr>
+			      <td>Limit</td><td>
+				<v:text name="lim1" value="--self.lim" default_value="0" error-glyph="*">
+				  <v:validator test="regexp" regexp="^[\-+]?[0-9]+(\.[0-9]+)?$" message="Decimal number is expected"
+				    runat='server'/>
+				</v:text>
+			      </td>
+			    </tr>
+			    <tr>
+			      <td colspan="2">
+				<v:button name="cancel1" value="Cancel" action="simple">
+				  <v:on-post>
+				    self.edit := 0;
+				    self.edit_acl.vc_enabled := 0;
+				    self.vc_is_valid := 1;
+				    self.add_rec.vc_data_bind (e);
+				  </v:on-post>
+				</v:button>
+				<v:button name="update1" value="--case when self.idx is not null then 'Update' else 'Add' end" action="simple">
+				  <v:on-post><![CDATA[
+				    declare arr, elm any;
+				    declare l, idx int;
+				    declare obj, filt, acc, mod, dest, rat, lim any;
+
+				    if (not self.vc_is_valid)
+				      return;
+
+				    filt := self.filt1.ufl_value;
+				    acc := atoi(self.acc1.ufl_value);
+
+				    dest := '*';
+				    obj := -1;
+                                    mod := -1;
+                                    rat := 0;
+                                    lim := 0;
+
+				    if (self.acl_name <> 'HTTP')
+				      dest := self.dest1.ufl_value;
+
+				    if (self.acl_name not in ('HTTP', 'PROXY'))
+				      {
+				        if (self.acl_name = 'NEWS')
+				          {
+					    obj := atoi(self.obj2.ufl_value);
+				            mod := atoi(self.mod2.ufl_value);
+					  }
+					else
+					  {
+					    obj := atoi(self.obj1.ufl_value);
+				            mod := atoi(self.mod1.ufl_value);
+					  }
+				      }
+				    rat := atod (self.rat1.ufl_value);
+				    lim := atod (self.lim1.ufl_value);
+
+				    self.ch := 1;
+				    self.edit := 0;
+				    self.edit_acl.vc_enabled := 0;
+				    self.apply_changes.vc_data_bind (e);
+
+				    arr := self.acl_list;
+				    l := length (arr);
+
+				    if (self.idx is null)
+				      {
+				        self.idx := l;
+				        arr := vector_concat (arr, vector (vector ()));
+			              }
+
+				    arr[self.idx] := vector (self.idx, obj, filt, acc, mod, dest, rat, lim);
+                                    self.acl_list := arr;
+
+				    self.idx := null;
+				    self.add_rec.vc_data_bind (e);
+				    self.ds.vc_data_bind (e);
+				    ]]></v:on-post>
+				</v:button>
+			      </td>
+			    </tr>
+			  </table>
+			</v:form>
+			<div>
+			  <v:form name="apply_changes" method="POST" type="simple"
+			    enabled="--case when self.edit = 0 and self.ch = 1 then 1 else 0 end">
+			    <v:button name="cancel" value="Cancel" action="simple">
+			      <v:on-post>
+				self.vc_redirect (sprintf ('sec_auth_serv_sp.vspx?acl=%U', self.acl_name));
+			      </v:on-post>
+			    </v:button>
+			    <v:button name="apply" value="Apply" action="simple">
+			      <v:on-post>
+				declare i, arr any;
+
+                                declare exit handler for sqlstate '*'
+				{
+				  rollback work;
+				  self.vc_is_valid := 0;
+				  self.vc_error_message := __SQL_MESSAGE;
+				  return;
+				};
+
+				delete from HTTP_ACL where HA_LIST = self.acl_name;
+				i := 1;
+				arr := self.acl_list;
+				foreach (any elm in arr) do
+				  {
+				    insert into HTTP_ACL (HA_LIST, HA_ORDER, HA_OBJECT, HA_CLIENT_IP, HA_FLAG, HA_RW, HA_DEST_IP, HA_RATE, HA_LIMIT)
+				    values (self.acl_name, i, elm[1], elm[2], elm[3], elm[4], elm[5], elm[6], elm[7]);
+				    i := i + 1;
+				  }
+				commit work;
+
+				if (i = 1)
+				  self.acl_name := 'HTTP';
+
+				self.vc_redirect (sprintf ('sec_auth_serv_sp.vspx?acl=%U', self.acl_name));
+			      </v:on-post>
+			    </v:button>
+			  </v:form>
+			</div>
+			<!-- END -->
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+      </table>
+		   <!-- bottom of security layout -->
+                      </td>
+                    </tr>
+                  </table>
+                </td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+      </table>
+	<!-- end of bottom security layout -->
+    </v:form>
+    </vm:pagebody>
+  </vm:pagewrapper>
+</v:page>
+
diff --git a/binsrc/yacutia/sec_pki_1.vspx b/binsrc/yacutia/sec_pki_1.vspx
index 82a8ded..075f33b 100644
--- a/binsrc/yacutia/sec_pki_1.vspx
+++ b/binsrc/yacutia/sec_pki_1.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_pki_1.vspx,v 1.1.2.6 2011/01/11 13:14:54 source Exp $
+ -  $Id: sec_pki_1.vspx,v 1.1.2.8 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -167,7 +167,7 @@
 			'OU',  get_keyword ('ou', params), 
 			'CN',  get_keyword ('name', params), 
 			'emailAddress',  get_keyword ('email', params)), 
-		vector ('basicConstraints', 'critical,CA:FALSE', 
+		vector ('basicConstraints', 'critical,CA:TRUE', 
 			'authorityKeyIdentifier', 'keyid,issuer:always', 
 			'nsComment', 'Virtuoso Generated Certificate'));
        USER_KEY_STORE (user, 'id_rsa', 'X.509', 2, '', cast (xenc_pkcs12_export ('id_rsa', 'CA Certificate', '') as varchar));
diff --git a/binsrc/yacutia/sec_pki_2.vspx b/binsrc/yacutia/sec_pki_2.vspx
index 5368332..fae54b1 100644
--- a/binsrc/yacutia/sec_pki_2.vspx
+++ b/binsrc/yacutia/sec_pki_2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_pki_2.vspx,v 1.1.2.9 2010/09/20 10:16:51 source Exp $
+ -  $Id: sec_pki_2.vspx,v 1.1.2.12 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -259,7 +259,8 @@
 			      'CN',  host,
 			      'emailAddress',  get_keyword ('emailAddress', arr)),
 			      vector ('basicConstraints', 'critical,CA:FALSE',
-			        'authorityKeyIdentifier', 'keyid,issuer:always',
+			        --'authorityKeyIdentifier', 'keyid,issuer:always',
+                                'extendedKeyUsage', 'critical,serverAuth',
 			        'nsComment', 'Virtuoso Generated Certificate'));
 			  USER_KEY_STORE (user, k, 'X.509', 2, '', cast (xenc_pkcs12_export (k, 'HTTPS Certificate', '') as varchar));
 			  self.key_list.vc_data_bind (e);
diff --git a/binsrc/yacutia/sec_pki_2_conf.vspx b/binsrc/yacutia/sec_pki_2_conf.vspx
index eeeba10..d33caa6 100644
--- a/binsrc/yacutia/sec_pki_2_conf.vspx
+++ b/binsrc/yacutia/sec_pki_2_conf.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_pki_2_conf.vspx,v 1.1.2.3 2010/09/20 10:16:51 source Exp $
+ -  $Id: sec_pki_2_conf.vspx,v 1.1.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sec_pki_3.vspx b/binsrc/yacutia/sec_pki_3.vspx
index 745002a..15eab5e 100644
--- a/binsrc/yacutia/sec_pki_3.vspx
+++ b/binsrc/yacutia/sec_pki_3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_pki_3.vspx,v 1.1.2.5 2010/09/20 10:16:51 source Exp $
+ -  $Id: sec_pki_3.vspx,v 1.1.2.7 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -227,7 +227,9 @@
 
 				  -- Add /dataspace etc.
 				  if (__proc_exists ('DB.DBA.ods_define_common_vd') is not null)
+				    {	
 				    DB.DBA.ods_define_common_vd (host, _lhost);
+				    }  
 
 				  insert into DB.DBA.WA_DOMAINS (WD_HOST,WD_LPATH,WD_LISTEN_HOST,WD_MODEL,WD_DOMAIN)
 				    values (host,path,_lhost,self.t_model.ufl_value, domain);
diff --git a/binsrc/yacutia/sec_pki_4.vspx b/binsrc/yacutia/sec_pki_4.vspx
index 5edd6f3..2a99985 100644
--- a/binsrc/yacutia/sec_pki_4.vspx
+++ b/binsrc/yacutia/sec_pki_4.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_pki_4.vspx,v 1.1.2.3 2010/09/20 10:16:51 source Exp $
+ -  $Id: sec_pki_4.vspx,v 1.1.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -249,7 +249,7 @@
 
 		      -- Add /dataspace etc.
 		      if (__proc_exists ('DB.DBA.ods_define_common_vd') is not null)
-		        DB.DBA.ods_define_common_vd (domain, ip);
+		        DB.DBA.wa_redefine_vhosts (domain, ip, 1);
 
 	              insert replacing DB.DBA.WA_DOMAINS (WD_HOST, WD_LISTEN_HOST, WD_LPATH, WD_DOMAIN, WD_MODEL)
 		         values (domain, ip, path, top_domain, model);
diff --git a/binsrc/yacutia/sec_pki_drop.vspx b/binsrc/yacutia/sec_pki_drop.vspx
index 5317ba2..bf5611e 100644
--- a/binsrc/yacutia/sec_pki_drop.vspx
+++ b/binsrc/yacutia/sec_pki_drop.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sec_pki_drop.vspx,v 1.1.2.3 2010/09/20 10:16:51 source Exp $
+ -  $Id: sec_pki_drop.vspx,v 1.1.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/site.vspx b/binsrc/yacutia/site.vspx
index 1a8387e..1fa684f 100644
--- a/binsrc/yacutia/site.vspx
+++ b/binsrc/yacutia/site.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: site.vspx,v 1.4.2.2 2010/09/20 10:16:52 source Exp $
+ -  $Id: site.vspx,v 1.4.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/soap_del_path.vspx b/binsrc/yacutia/soap_del_path.vspx
index 8ceb3ce..1da0f14 100644
--- a/binsrc/yacutia/soap_del_path.vspx
+++ b/binsrc/yacutia/soap_del_path.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: soap_del_path.vspx,v 1.3.2.4 2010/09/20 10:16:52 source Exp $
+ -  $Id: soap_del_path.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/soap_options_edit.vspx b/binsrc/yacutia/soap_options_edit.vspx
index 9130747..887464b 100644
--- a/binsrc/yacutia/soap_options_edit.vspx
+++ b/binsrc/yacutia/soap_options_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: soap_options_edit.vspx,v 1.4.2.3 2010/09/20 10:16:52 source Exp $
+ -  $Id: soap_options_edit.vspx,v 1.4.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/soap_services.vspx b/binsrc/yacutia/soap_services.vspx
index 88d9c42..47287a3 100644
--- a/binsrc/yacutia/soap_services.vspx
+++ b/binsrc/yacutia/soap_services.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: soap_services.vspx,v 1.5.2.5 2010/09/20 10:16:52 source Exp $
+ -  $Id: soap_services.vspx,v 1.5.2.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/soap_services_edit.vspx b/binsrc/yacutia/soap_services_edit.vspx
index 6d60227..6e24593 100644
--- a/binsrc/yacutia/soap_services_edit.vspx
+++ b/binsrc/yacutia/soap_services_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: soap_services_edit.vspx,v 1.8.2.5 2010/09/20 10:16:52 source Exp $
+ -  $Id: soap_services_edit.vspx,v 1.8.2.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/soap_services_list.vspx b/binsrc/yacutia/soap_services_list.vspx
index abc6db5..4b12041 100644
--- a/binsrc/yacutia/soap_services_list.vspx
+++ b/binsrc/yacutia/soap_services_list.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: soap_services_list.vspx,v 1.2.2.3 2010/09/20 10:16:52 source Exp $
+ -  $Id: soap_services_list.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sparql_acl.vspx b/binsrc/yacutia/sparql_acl.vspx
index 0eb9be1..ccf9906 100644
--- a/binsrc/yacutia/sparql_acl.vspx
+++ b/binsrc/yacutia/sparql_acl.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sparql_acl.vspx,v 1.1.4.3 2010/09/20 10:16:52 source Exp $
+ -  $Id: sparql_acl.vspx,v 1.1.4.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -61,10 +61,10 @@
                 <td>
                   <table cellpadding="0" cellspacing="0" border="0">
                     <tr>
-		      <td class="page_tab" align="center">
+		      <!--td class="page_tab" align="center">
 			  	
 			<v:url xhtml_style="page_tab" url="sec_pki_1.vspx" value="Public Key Infrastructure" render-only="1"/>
-		      </td>
+		      </td-->
 		      <td class="page_tab_selected" align="center">
 			Access Control
 		      </td>
@@ -84,54 +84,18 @@
                 <td>
                   <table cellpadding="0" cellspacing="0" border="0">
                     <tr>
-		      <td class="<?V self.astyle ('HTTP') ?>" align="center">
-			<v:url xhtml_style="page_tab" url="sec_auth_serv.vspx?acl=HTTP" value="HTTP" render-only="1"/>
-		      </td>
-		      <td class="<?V self.astyle ('NEWS') ?>" align="center">
-			<v:url xhtml_style="page_tab" url="sec_auth_serv.vspx?acl=NEWS" value="NEWS" render-only="1"/>
-		      </td>
-		      <td class="<?V self.astyle ('PROXY') ?>" align="center">
-			<v:url xhtml_style="page_tab" url="sec_auth_serv.vspx?acl=PROXY" value="PROXY" render-only="1"/>
-		      </td>
-                      <?vsp
-                        declare i, fnd integer;
-                        i := 0; fnd := 0;
-			for select distinct HA_LIST from HTTP_ACL where HA_LIST not in ('HTTP','NEWS','PROXY') do
-                        {
-			  if (self.acl_name not in ('HTTP','NEWS','PROXY') and HA_LIST = self.acl_name)
-			    fnd := 1;
-			  ?>
-			  <td class="<?V self.astyle (HA_LIST) ?>" align="center">
-			    <v:url xhtml_style="page_tab" url="--sprintf ('sec_auth_serv.vspx?acl=%V', HA_LIST)"
-			      value="--HA_LIST" render-only="1"/>
+		      <?vsp if (DB.DBA.VAD_CHECK_VERSION ('rdf_mappers') is not null) { ?>
+		      <td class="<?V self.astyle ('Sponger') ?>" align="center">
+			<v:url xhtml_style="page_tab" url="sec_auth_serv_sp.vspx?acl=Sponger" value="Sponger" render-only="1"/>
 			  </td>
-			  <?vsp
-                          i := i + 1;
-                        }
+          <?vsp } ?>          
 
-			if (not fnd and self.acl_name not in ('HTTP','NEWS','PROXY'))
-			  {
-			  ?>
-			  <td class="<?V self.astyle (self.acl_name) ?>" align="center">
-			    <v:url xhtml_style="page_tab" url="--sprintf ('sec_auth_serv.vspx?acl=%V', self.acl_name)"
-			      value="--self.acl_name" render-only="1"/>
-			  </td>
-			  <?vsp
-			  }
-                      ?>
 		      <?vsp if (DB.DBA.VAD_CHECK_VERSION ('Framework') is not null) { ?>
 		      <td class="page_tab_selected" align="center">
 			<v:url xhtml_style="page_tab" url="sparql_acl.vspx" value="SPARQL-SSL" render-only="1"/>
 		      </td>
 		      <?vsp } ?>
-                        <!--td class="page_tab_empty" align="center" width="100%">
-                          <table cellpadding="0" cellspacing="0">
-                            <tr>
-			      <td width="100%" align="right">
-                              </td>
-                            </tr>
-                          </table>
-                        </td-->
+                        
 			<td class="page_tab_empty" align="right" width="100%">
                         </td>
                     </tr>
@@ -265,7 +229,8 @@
 					      self.vc_error_message := 'Web ID could not be empty';
 					      return;
 					    }
-					  if (0 = FOAF_CHECK_WEBID (self.webid.ufl_value))
+					  -- it is pattern  
+					  if (0 and 0 = FOAF_CHECK_WEBID (self.webid.ufl_value))
                                             {
 					      self.vc_is_valid := 0;
                                               self.vc_error_message := 'The WebID is inaccessible or does not contain certificate properties';
diff --git a/binsrc/yacutia/sparql_filters.vspx b/binsrc/yacutia/sparql_filters.vspx
index b866543..5fc5711 100644
--- a/binsrc/yacutia/sparql_filters.vspx
+++ b/binsrc/yacutia/sparql_filters.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sparql_filters.vspx,v 1.5.2.5 2010/11/08 11:45:35 source Exp $
+ -  $Id: sparql_filters.vspx,v 1.5.2.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sparql_graph.vspx b/binsrc/yacutia/sparql_graph.vspx
index cad021f..bccf621 100644
--- a/binsrc/yacutia/sparql_graph.vspx
+++ b/binsrc/yacutia/sparql_graph.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sparql_graph.vspx,v 1.4.2.3 2010/09/20 10:16:52 source Exp $
+ -  $Id: sparql_graph.vspx,v 1.4.2.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -65,7 +65,16 @@
           <v:script><![CDATA[
 	        if ( get_keyword ('remove', params, '') <> '' )
 		   {
+                     declare _graph any;
+		     _graph := self.graph_name;
 		      delete from DB.DBA.RDF_QUAD where G = DB.DBA.RDF_MAKE_IID_OF_QNAME (self.graph_name);
+                     SPARQL DROP SILENT GRAPH iri (?:_graph) ; 
+		     for select "s" from (sparql 
+		        define input:storage "" 
+			select ?s from virtrdf: { ?s virtrdf:qmGraphRange-rvrFixedValue `iri(?:_graph)` ; virtrdf:qmUserSubMaps ?t }) x do
+		       {
+			 exec (sprintf ('SPARQL drop silent quad map <%s> . ', "s"));	
+		       }
 		   }
 		self.mode := '';
           ]]></v:script>
diff --git a/binsrc/yacutia/sparql_input.vspx b/binsrc/yacutia/sparql_input.vspx
index f690c9e..c5c5191 100644
--- a/binsrc/yacutia/sparql_input.vspx
+++ b/binsrc/yacutia/sparql_input.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sparql_input.vspx,v 1.5.2.3 2010/09/20 10:16:52 source Exp $
+ -  $Id: sparql_input.vspx,v 1.5.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sparql_load.vspx b/binsrc/yacutia/sparql_load.vspx
index 42aa001..6512f96 100644
--- a/binsrc/yacutia/sparql_load.vspx
+++ b/binsrc/yacutia/sparql_load.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sparql_load.vspx,v 1.4.2.4 2010/09/20 10:16:52 source Exp $
+ -  $Id: sparql_load.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sqlbuilder.vsp b/binsrc/yacutia/sqlbuilder.vsp
index 842181c..ecbf9ca 100644
--- a/binsrc/yacutia/sqlbuilder.vsp
+++ b/binsrc/yacutia/sqlbuilder.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: sqlbuilder.vsp,v 1.3.2.2 2010/09/20 10:16:53 source Exp $
+--  $Id: sqlbuilder.vsp,v 1.3.2.3 2012/03/08 12:55:29 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/syntax/SyntaxHighlighter.css b/binsrc/yacutia/syntax/SyntaxHighlighter.css
index bcca788..2663c09 100644
--- a/binsrc/yacutia/syntax/SyntaxHighlighter.css
+++ b/binsrc/yacutia/syntax/SyntaxHighlighter.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: SyntaxHighlighter.css,v 1.2.2.1 2010/09/20 10:17:00 source Exp $
+ *  $Id: SyntaxHighlighter.css,v 1.2.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/syntax/shBrushSql.js b/binsrc/yacutia/syntax/shBrushSql.js
index 1a52f62..3dc4c35 100644
--- a/binsrc/yacutia/syntax/shBrushSql.js
+++ b/binsrc/yacutia/syntax/shBrushSql.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/syntax/shBrushXml.js b/binsrc/yacutia/syntax/shBrushXml.js
index 23c247a..aee0566 100644
--- a/binsrc/yacutia/syntax/shBrushXml.js
+++ b/binsrc/yacutia/syntax/shBrushXml.js
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sys_info.vspx b/binsrc/yacutia/sys_info.vspx
index cf4550b..38640b5 100644
--- a/binsrc/yacutia/sys_info.vspx
+++ b/binsrc/yacutia/sys_info.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sys_info.vspx,v 1.3.2.2 2010/09/20 10:16:53 source Exp $
+ -  $Id: sys_info.vspx,v 1.3.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sys_queues.vspx b/binsrc/yacutia/sys_queues.vspx
index e0d515b..f69423d 100644
--- a/binsrc/yacutia/sys_queues.vspx
+++ b/binsrc/yacutia/sys_queues.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: sys_queues.vspx,v 1.2.2.4 2011/01/25 14:21:43 source Exp $
+ -  $Id: sys_queues.vspx,v 1.2.2.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -148,7 +148,7 @@
                 <td class="listing_col"><img class="listing_icon" src="images/icons/alarm_16.png" alt="Event" title="Event"/>
                   <v:label format="%s"
                            name="data_set1_browse_label_1"
-                           value="--((control.vc_parent as vspx_row_template).te_rowset[0])" />
+                           value="--y_trunc_uri ((control.vc_parent as vspx_row_template).te_rowset[0])" />
                 </td>
 		<td class="listing_col">
 		  <?vsp
diff --git a/binsrc/yacutia/sys_queues_edit.vspx b/binsrc/yacutia/sys_queues_edit.vspx
index 4e0760f..7e765b1 100644
--- a/binsrc/yacutia/sys_queues_edit.vspx
+++ b/binsrc/yacutia/sys_queues_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: sys_queues_edit.vspx,v 1.2.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: sys_queues_edit.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sys_queues_edit_inc.vspx b/binsrc/yacutia/sys_queues_edit_inc.vspx
index e04fa64..55a8d47 100644
--- a/binsrc/yacutia/sys_queues_edit_inc.vspx
+++ b/binsrc/yacutia/sys_queues_edit_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
  -
- -  $Id: sys_queues_edit_inc.vspx,v 1.2.2.2 2010/09/20 10:16:53 source Exp $
+ -  $Id: sys_queues_edit_inc.vspx,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sys_queues_error.vspx b/binsrc/yacutia/sys_queues_error.vspx
index 88c9a06..7e39dfa 100644
--- a/binsrc/yacutia/sys_queues_error.vspx
+++ b/binsrc/yacutia/sys_queues_error.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sys_queues_error.vspx,v 1.4.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: sys_queues_error.vspx,v 1.4.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/sys_queues_remove.vspx b/binsrc/yacutia/sys_queues_remove.vspx
index bb8da8d..9ca9418 100644
--- a/binsrc/yacutia/sys_queues_remove.vspx
+++ b/binsrc/yacutia/sys_queues_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: sys_queues_remove.vspx,v 1.3.2.4 2010/09/20 10:16:53 source Exp $
+ -  $Id: sys_queues_remove.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/tbl.js b/binsrc/yacutia/tbl.js
index cc46fa2..d3bdb1a 100644
--- a/binsrc/yacutia/tbl.js
+++ b/binsrc/yacutia/tbl.js
@@ -1,10 +1,10 @@
 /*
- *  $Id: tbl.js,v 1.1.4.5 2011/01/25 14:21:44 source Exp $
+ *  $Id: tbl.js,v 1.1.4.7 2012/03/08 12:55:29 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -328,7 +328,7 @@ TBL.createCell52 = function (td, prefix, fldName, No, fldOptions, disabled) {
     suffix = fldOptions.suffix;
   cb(td, prefix, fldName+'_r'+suffix, No, fldOptions, disabled, 0);
   cb(td, prefix, fldName+'_w'+suffix, No, fldOptions, disabled, 1);
-  // cb(td, prefix, fldName+'_x'+suffix, No, fldOptions, disabled, 2);
+  cb(td, prefix, fldName+'_x'+suffix, No, fldOptions, disabled, 2);
 }
 
 TBL.viewCell52 = function (td, prefix, fldName, No, fldOptions) {
diff --git a/binsrc/yacutia/text_queries.vspx b/binsrc/yacutia/text_queries.vspx
index 9327114..fed4604 100644
--- a/binsrc/yacutia/text_queries.vspx
+++ b/binsrc/yacutia/text_queries.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: text_queries.vspx,v 1.2.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: text_queries.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/text_queries_edit.vspx b/binsrc/yacutia/text_queries_edit.vspx
index d249667..09cd5c6 100644
--- a/binsrc/yacutia/text_queries_edit.vspx
+++ b/binsrc/yacutia/text_queries_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: text_queries_edit.vspx,v 1.2.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: text_queries_edit.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/text_results.vspx b/binsrc/yacutia/text_results.vspx
index a78d80b..8b7f5e3 100644
--- a/binsrc/yacutia/text_results.vspx
+++ b/binsrc/yacutia/text_results.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: text_results.vspx,v 1.2.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: text_results.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/text_search.vspx b/binsrc/yacutia/text_search.vspx
index 4a2289a..9d3fc93 100644
--- a/binsrc/yacutia/text_search.vspx
+++ b/binsrc/yacutia/text_search.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: text_search.vspx,v 1.2.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: text_search.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/text_triggers.vspx b/binsrc/yacutia/text_triggers.vspx
index c263664..d11c798 100644
--- a/binsrc/yacutia/text_triggers.vspx
+++ b/binsrc/yacutia/text_triggers.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: text_triggers.vspx,v 1.3.2.3 2010/09/20 10:16:53 source Exp $
+ -  $Id: text_triggers.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/uddi_remove.vspx b/binsrc/yacutia/uddi_remove.vspx
index e5b2149..a63cdba 100644
--- a/binsrc/yacutia/uddi_remove.vspx
+++ b/binsrc/yacutia/uddi_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uddi_remove.vspx,v 1.3.2.4 2010/09/20 10:16:54 source Exp $
+ -  $Id: uddi_remove.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/uddi_serv.vspx b/binsrc/yacutia/uddi_serv.vspx
index c0f9188..9425d2f 100644
--- a/binsrc/yacutia/uddi_serv.vspx
+++ b/binsrc/yacutia/uddi_serv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uddi_serv.vspx,v 1.3.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: uddi_serv.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/uddi_serv_browse.vspx b/binsrc/yacutia/uddi_serv_browse.vspx
index f83a8a0..274d8fa 100644
--- a/binsrc/yacutia/uddi_serv_browse.vspx
+++ b/binsrc/yacutia/uddi_serv_browse.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uddi_serv_browse.vspx,v 1.3.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: uddi_serv_browse.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/uddi_serv_create.vspx b/binsrc/yacutia/uddi_serv_create.vspx
index 0b9825d..3977dee 100644
--- a/binsrc/yacutia/uddi_serv_create.vspx
+++ b/binsrc/yacutia/uddi_serv_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: uddi_serv_create.vspx,v 1.4.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: uddi_serv_create.vspx,v 1.4.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad.vspx b/binsrc/yacutia/vad.vspx
index 647c107..7e146b0 100644
--- a/binsrc/yacutia/vad.vspx
+++ b/binsrc/yacutia/vad.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad.vspx,v 1.7.2.4 2011/01/25 14:21:44 source Exp $
+ -  $Id: vad.vspx,v 1.7.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_dav.xml b/binsrc/yacutia/vad_dav.xml
index 9b817c0..49b683f 100644
--- a/binsrc/yacutia/vad_dav.xml
+++ b/binsrc/yacutia/vad_dav.xml
@@ -5,12 +5,12 @@
     <name package="conductor">
       <prop name="Title" value="Virtuoso Conductor"/>
       <prop name="Developer" value="OpenLink Software"/>
-      <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+      <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
       <prop name="Download" value="http://www.openlinksw.com/virtuoso/conductor/download"/>
       <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/conductor/download"/>
     </name>
-    <version package="1.00.7890">
-      <prop name="Release Date" value="2011-03-29 18:23"/>
+    <version package="1.00.8004">
+      <prop name="Release Date" value="2012-03-13 01:46"/>
       <prop name="Build" value="Release, optimized"/>
     </version>
   </caption>
@@ -23,7 +23,6 @@
     <sql purpose="pre-install">if (lt (sys_stat ('st_dbms_ver'), '05.09.3037')) { result ('ERROR', 'The conductor package requires server version 05.09.3037 or greater'); signal ('FATAL', 'The conductor package requires server version 05.09.3037 or greater'); } </sql>
     <sql purpose="post-install">
       registry_set('__no_vspx_temp', '1');
-      "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/conductor/admin_dav_browser.sql', 1, 'report', 1);
       "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/conductor/vdir_helper.sql', 1, 'report', 1);
       "DB"."DBA"."VAD_LOAD_SQL_FILE"('/DAV/VAD/conductor/yacutia.sql', 1, 'report', 1);
       vhost_remove (lpath=>'/conductor');
@@ -47,7 +46,6 @@
     <file type="dav" source="http" target_uri="conductor/account_remove.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/accounts_page.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/accounts.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
-    <file type="dav" source="http" target_uri="conductor/admin_dav_browser.sql" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/admin_utils.js" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/adm_login.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/adm_navigation_bar.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
@@ -330,6 +328,9 @@
     <file type="dav" source="http" target_uri="conductor/persistent_xmlns.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/popup2_browser.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/popup_browser.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="dav" source="http" target_uri="conductor/r2rml_gen.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="dav" source="http" target_uri="conductor/r2rml_import.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="dav" source="http" target_uri="conductor/r2rml_validate.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/rdf_conf.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/rdf_console.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/rdf_filters_pp.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
@@ -351,7 +352,9 @@
     <file type="dav" source="http" target_uri="conductor/role_remove.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/roles_inc.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/roles.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="dav" source="http" target_uri="conductor/sec_acl_edit_sp.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/sec_acl_edit.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="dav" source="http" target_uri="conductor/sec_auth_serv_sp.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/sec_auth_serv.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/sec_pki_1.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/sec_pki_2_conf.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
@@ -503,6 +506,7 @@
     <file type="dav" source="http" target_uri="conductor/toolkit/layers.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/toolkit/linechart.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/toolkit/loader.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
+    <file type="dav" source="http" target_uri="conductor/toolkit/location.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/toolkit/macwin.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/toolkit/map.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="dav" source="http" target_uri="conductor/toolkit/menu.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
diff --git a/binsrc/yacutia/vad_fs.xml b/binsrc/yacutia/vad_fs.xml
index d506f1d..7b96189 100644
--- a/binsrc/yacutia/vad_fs.xml
+++ b/binsrc/yacutia/vad_fs.xml
@@ -5,12 +5,12 @@
     <name package="conductor">
       <prop name="Title" value="Virtuoso Conductor"/>
       <prop name="Developer" value="OpenLink Software"/>
-      <prop name="Copyright" value="(C) 1998-2011 OpenLink Software"/>
+      <prop name="Copyright" value="(C) 1998-2012 OpenLink Software"/>
       <prop name="Download" value="http://www.openlinksw.com/virtuoso/conductor/download"/>
       <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/conductor/download"/>
     </name>
-    <version package="1.00.7890">
-      <prop name="Release Date" value="2011-03-29 18:23"/>
+    <version package="1.00.8004">
+      <prop name="Release Date" value="2012-03-13 01:46"/>
       <prop name="Build" value="Release, optimized"/>
     </version>
   </caption>
@@ -23,7 +23,6 @@
     <sql purpose="pre-install">if (lt (sys_stat ('st_dbms_ver'), '05.09.3037')) { result ('ERROR', 'The conductor package requires server version 05.09.3037 or greater'); signal ('FATAL', 'The conductor package requires server version 05.09.3037 or greater'); } </sql>
     <sql purpose="post-install">
       registry_set('__no_vspx_temp', '1');
-      "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/conductor/admin_dav_browser.sql', 1, 'report', 0);
       "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/conductor/vdir_helper.sql', 1, 'report', 0);
       "DB"."DBA"."VAD_LOAD_SQL_FILE"('/vad/vsp/conductor/yacutia.sql', 1, 'report', 0);
       vhost_remove (lpath=>'/conductor');
@@ -53,7 +52,6 @@
     <file type="http" source="http" target_uri="conductor/account_remove.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/accounts_page.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/accounts.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
-    <file type="http" source="http" target_uri="conductor/admin_dav_browser.sql" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/admin_utils.js" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/adm_login.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/adm_navigation_bar.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
@@ -336,6 +334,9 @@
     <file type="http" source="http" target_uri="conductor/persistent_xmlns.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/popup2_browser.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/popup_browser.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="http" source="http" target_uri="conductor/r2rml_gen.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="http" source="http" target_uri="conductor/r2rml_import.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="http" source="http" target_uri="conductor/r2rml_validate.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/rdf_conf.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/rdf_console.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/rdf_filters_pp.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
@@ -357,7 +358,9 @@
     <file type="http" source="http" target_uri="conductor/role_remove.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/roles_inc.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/roles.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="http" source="http" target_uri="conductor/sec_acl_edit_sp.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/sec_acl_edit.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
+    <file type="http" source="http" target_uri="conductor/sec_auth_serv_sp.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/sec_auth_serv.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/sec_pki_1.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/sec_pki_2_conf.vspx" dav_owner='dav' dav_grp='administrators' dav_perm='111101101NN' makepath="yes"/>
@@ -509,6 +512,7 @@
     <file type="http" source="http" target_uri="conductor/toolkit/layers.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/toolkit/linechart.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/toolkit/loader.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
+    <file type="http" source="http" target_uri="conductor/toolkit/location.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/toolkit/macwin.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/toolkit/map.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
     <file type="http" source="http" target_uri="conductor/toolkit/menu.js" dav_owner='dav' dav_grp='administrators' dav_perm='110100100NN' makepath="yes"/>
diff --git a/binsrc/yacutia/vad_install.vspx b/binsrc/yacutia/vad_install.vspx
index e6474a8..45dff3f 100644
--- a/binsrc/yacutia/vad_install.vspx
+++ b/binsrc/yacutia/vad_install.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_install.vspx,v 1.8.2.5 2011/01/25 14:21:44 source Exp $
+ -  $Id: vad_install.vspx,v 1.8.2.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_install_batch.vspx b/binsrc/yacutia/vad_install_batch.vspx
index f6571db..42b18b8 100644
--- a/binsrc/yacutia/vad_install_batch.vspx
+++ b/binsrc/yacutia/vad_install_batch.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_install_batch.vspx,v 1.3.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: vad_install_batch.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -57,7 +57,7 @@
 		    declare state, msg, pack_name, pack_vers, pack_fullname, pkg_date, pack_path varchar;
 		    declare exit handler for sqlstate '*', not found
 		    {
-		      if (strstr (__SQL_MESSAGE, 'required package Framework') is not null)
+		      if (strstr (__SQL_MESSAGE, 'requires Framework') is not null)
 		        goto next;
 		      self.pack_ready := 0;
 		      state := __SQL_STATE;
diff --git a/binsrc/yacutia/vad_remove.vspx b/binsrc/yacutia/vad_remove.vspx
index a5388cf..44004bd 100644
--- a/binsrc/yacutia/vad_remove.vspx
+++ b/binsrc/yacutia/vad_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_remove.vspx,v 1.2.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: vad_remove.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_remove_batch.vspx b/binsrc/yacutia/vad_remove_batch.vspx
index 8ce3c1b..32a7495 100644
--- a/binsrc/yacutia/vad_remove_batch.vspx
+++ b/binsrc/yacutia/vad_remove_batch.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_remove_batch.vspx,v 1.1.2.2 2010/09/20 10:16:54 source Exp $
+ -  $Id: vad_remove_batch.vspx,v 1.1.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_src.vspx b/binsrc/yacutia/vad_src.vspx
index 050ca6d..d714371 100644
--- a/binsrc/yacutia/vad_src.vspx
+++ b/binsrc/yacutia/vad_src.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_src.vspx,v 1.1.2.2 2010/09/20 10:16:54 source Exp $
+ -  $Id: vad_src.vspx,v 1.1.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_status.vspx b/binsrc/yacutia/vad_status.vspx
index 201e371..6d78a2a 100644
--- a/binsrc/yacutia/vad_status.vspx
+++ b/binsrc/yacutia/vad_status.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_status.vspx,v 1.3.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: vad_status.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_version b/binsrc/yacutia/vad_version
index 71f2f32..1cbfeae 100644
--- a/binsrc/yacutia/vad_version
+++ b/binsrc/yacutia/vad_version
@@ -1 +1 @@
-1.00.7890
+1.00.8004
diff --git a/binsrc/yacutia/vad_wa_config.vspx b/binsrc/yacutia/vad_wa_config.vspx
index ed21095..50ccb1d 100644
--- a/binsrc/yacutia/vad_wa_config.vspx
+++ b/binsrc/yacutia/vad_wa_config.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_wa_config.vspx,v 1.5.2.3 2010/09/20 10:16:54 source Exp $
+ -  $Id: vad_wa_config.vspx,v 1.5.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vad_wa_create.vspx b/binsrc/yacutia/vad_wa_create.vspx
index f0cb74f..06f243f 100644
--- a/binsrc/yacutia/vad_wa_create.vspx
+++ b/binsrc/yacutia/vad_wa_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vad_wa_create.vspx,v 1.7.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vad_wa_create.vspx,v 1.7.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_conf_dsn_edit.vspx b/binsrc/yacutia/vdb_conf_dsn_edit.vspx
index 99f2f56..6eda996 100644
--- a/binsrc/yacutia/vdb_conf_dsn_edit.vspx
+++ b/binsrc/yacutia/vdb_conf_dsn_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_conf_dsn_edit.vspx,v 1.5.2.5 2011/02/03 10:30:29 source Exp $
+ -  $Id: vdb_conf_dsn_edit.vspx,v 1.5.2.7 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -482,7 +482,7 @@
 			    <tr>
 			      <td colspan="3" align="middle">
 				<p class="copyright_noalign"><?V self.driver ?><br />
-				  <small>Copyright 1998-2011 OpenLink Software</small><br />
+				  <small>Copyright 1998-2012 OpenLink Software</small><br />
 				  <small>All rights reserved</small></p></td></tr>
 			    <tr><td rowspan="4" valign="top"><img src="images/opl.jpg" border="1" /></td>
 			      <td valign="top">
diff --git a/binsrc/yacutia/vdb_conf_dsn_new.vspx b/binsrc/yacutia/vdb_conf_dsn_new.vspx
index 7339e06..d828be1 100644
--- a/binsrc/yacutia/vdb_conf_dsn_new.vspx
+++ b/binsrc/yacutia/vdb_conf_dsn_new.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_conf_dsn_new.vspx,v 1.2.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_conf_dsn_new.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_conf_dsn_remove.vspx b/binsrc/yacutia/vdb_conf_dsn_remove.vspx
index 47ebff8..a5850f2 100644
--- a/binsrc/yacutia/vdb_conf_dsn_remove.vspx
+++ b/binsrc/yacutia/vdb_conf_dsn_remove.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_conf_dsn_remove.vspx,v 1.3.2.4 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_conf_dsn_remove.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_config_dsn.vspx b/binsrc/yacutia/vdb_config_dsn.vspx
index 4497cbf..bd35351 100644
--- a/binsrc/yacutia/vdb_config_dsn.vspx
+++ b/binsrc/yacutia/vdb_config_dsn.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_config_dsn.vspx,v 1.2.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_config_dsn.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_conn_dsn.vspx b/binsrc/yacutia/vdb_conn_dsn.vspx
index 8082c32..7852960 100644
--- a/binsrc/yacutia/vdb_conn_dsn.vspx
+++ b/binsrc/yacutia/vdb_conn_dsn.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_conn_dsn.vspx,v 1.3.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_conn_dsn.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_conn_dsn_del.vspx b/binsrc/yacutia/vdb_conn_dsn_del.vspx
index 818d76b..7356358 100644
--- a/binsrc/yacutia/vdb_conn_dsn_del.vspx
+++ b/binsrc/yacutia/vdb_conn_dsn_del.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_conn_dsn_del.vspx,v 1.3.2.4 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_conn_dsn_del.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_conn_dsn_edit.vspx b/binsrc/yacutia/vdb_conn_dsn_edit.vspx
index 6006a4b..9180c40 100644
--- a/binsrc/yacutia/vdb_conn_dsn_edit.vspx
+++ b/binsrc/yacutia/vdb_conn_dsn_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_conn_dsn_edit.vspx,v 1.2.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_conn_dsn_edit.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_dsn_edit.vspx b/binsrc/yacutia/vdb_dsn_edit.vspx
index b86e324..17066b1 100644
--- a/binsrc/yacutia/vdb_dsn_edit.vspx
+++ b/binsrc/yacutia/vdb_dsn_edit.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdb_dsn_edit.vspx,v 1.3.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_dsn_edit.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_dsns.vspx b/binsrc/yacutia/vdb_dsns.vspx
index 6a7d08b..44e989c 100644
--- a/binsrc/yacutia/vdb_dsns.vspx
+++ b/binsrc/yacutia/vdb_dsns.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdb_dsns.vspx,v 1.2.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_dsns.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_error_inc.vspx b/binsrc/yacutia/vdb_error_inc.vspx
index 3591606..146cb99 100644
--- a/binsrc/yacutia/vdb_error_inc.vspx
+++ b/binsrc/yacutia/vdb_error_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdb_error_inc.vspx,v 1.4.2.3 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_error_inc.vspx,v 1.4.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_errs.vspx b/binsrc/yacutia/vdb_errs.vspx
index 5a8e1d6..01258ad 100644
--- a/binsrc/yacutia/vdb_errs.vspx
+++ b/binsrc/yacutia/vdb_errs.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_errs.vspx,v 1.3.2.4 2010/09/20 10:16:55 source Exp $
+ -  $Id: vdb_errs.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_export.vspx b/binsrc/yacutia/vdb_export.vspx
index d192a88..2bebe24 100644
--- a/binsrc/yacutia/vdb_export.vspx
+++ b/binsrc/yacutia/vdb_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdb_export.vspx,v 1.1.2.3 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_export.vspx,v 1.1.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_link.vspx b/binsrc/yacutia/vdb_link.vspx
index 5f467de..dff3835 100644
--- a/binsrc/yacutia/vdb_link.vspx
+++ b/binsrc/yacutia/vdb_link.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdb_link.vspx,v 1.4.2.3 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_link.vspx,v 1.4.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_linked_obj.vspx b/binsrc/yacutia/vdb_linked_obj.vspx
index 51d2ea6..b343f9a 100644
--- a/binsrc/yacutia/vdb_linked_obj.vspx
+++ b/binsrc/yacutia/vdb_linked_obj.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_linked_obj.vspx,v 1.3.2.4 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_linked_obj.vspx,v 1.3.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_main.vspx b/binsrc/yacutia/vdb_main.vspx
index b0db9be..aa3fa3c 100644
--- a/binsrc/yacutia/vdb_main.vspx
+++ b/binsrc/yacutia/vdb_main.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_main.vspx,v 1.5.2.3 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_main.vspx,v 1.5.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_obj_link.vspx b/binsrc/yacutia/vdb_obj_link.vspx
index 5d1fa41..9df4827 100644
--- a/binsrc/yacutia/vdb_obj_link.vspx
+++ b/binsrc/yacutia/vdb_obj_link.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_obj_link.vspx,v 1.3.2.3 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_obj_link.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_obj_link_opts.vspx b/binsrc/yacutia/vdb_obj_link_opts.vspx
index d63eb4c..b034069 100644
--- a/binsrc/yacutia/vdb_obj_link_opts.vspx
+++ b/binsrc/yacutia/vdb_obj_link_opts.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_obj_link_opts.vspx,v 1.5.2.4 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_obj_link_opts.vspx,v 1.5.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_obj_link_pk.vspx b/binsrc/yacutia/vdb_obj_link_pk.vspx
index 1819f5a..8f8c374 100644
--- a/binsrc/yacutia/vdb_obj_link_pk.vspx
+++ b/binsrc/yacutia/vdb_obj_link_pk.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_obj_link_pk.vspx,v 1.4.2.3 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_obj_link_pk.vspx,v 1.4.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_resources.vspx b/binsrc/yacutia/vdb_resources.vspx
index 33c2fa5..9e4583a 100644
--- a/binsrc/yacutia/vdb_resources.vspx
+++ b/binsrc/yacutia/vdb_resources.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdb_resources.vspx,v 1.3.2.3 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_resources.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdb_unlink_obj.vspx b/binsrc/yacutia/vdb_unlink_obj.vspx
index b1190b6..32d2c0a 100644
--- a/binsrc/yacutia/vdb_unlink_obj.vspx
+++ b/binsrc/yacutia/vdb_unlink_obj.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: vdb_unlink_obj.vspx,v 1.4.2.4 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdb_unlink_obj.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vdir_browser.vspx b/binsrc/yacutia/vdir_browser.vspx
index c6e6e18..0e53088 100644
--- a/binsrc/yacutia/vdir_browser.vspx
+++ b/binsrc/yacutia/vdir_browser.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vdir_browser.vspx,v 1.5.2.4 2010/09/20 10:16:56 source Exp $
+ -  $Id: vdir_browser.vspx,v 1.5.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/vfs_export.vspx b/binsrc/yacutia/vfs_export.vspx
index d46ab86..6068c7a 100644
--- a/binsrc/yacutia/vfs_export.vspx
+++ b/binsrc/yacutia/vfs_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vfs_export.vspx,v 1.1.4.4 2011/03/23 12:03:54 source Exp $
+ -  $Id: vfs_export.vspx,v 1.1.4.6 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -28,9 +28,11 @@
   fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
   xmlns:vm="http://www.openlinksw.com/vspx/macro">
   <?vsp 
+    declare ids any;
+    ids := deserialize (decode_base64 (get_keyword ('ids', params)));
     http_rewrite ();
     http_header ('Content-Type: text/plain\r\n');  
-    http (WS.WS.VFS_EXPORT_DEFS ()); 
+    http (WS.WS.VFS_EXPORT_DEFS (ids)); 
     return;
   ?>
 </v:page>
diff --git a/binsrc/yacutia/vhost_export.vspx b/binsrc/yacutia/vhost_export.vspx
index 76e4c4e..a9b7080 100644
--- a/binsrc/yacutia/vhost_export.vspx
+++ b/binsrc/yacutia/vhost_export.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: vhost_export.vspx,v 1.1.2.2 2010/09/20 10:16:56 source Exp $
+ -  $Id: vhost_export.vspx,v 1.1.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/view.vsp b/binsrc/yacutia/view.vsp
index a0dc903..dd86146 100644
--- a/binsrc/yacutia/view.vsp
+++ b/binsrc/yacutia/view.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: view.vsp,v 1.2.2.2 2010/09/20 10:16:57 source Exp $
+--  $Id: view.vsp,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/view.vspx b/binsrc/yacutia/view.vspx
index 613266c..d452850 100644
--- a/binsrc/yacutia/view.vspx
+++ b/binsrc/yacutia/view.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: view.vspx,v 1.2.2.2 2010/09/20 10:16:57 source Exp $
+ -  $Id: view.vspx,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/view_dav_res.vsp b/binsrc/yacutia/view_dav_res.vsp
index 04f0db3..78aefe2 100644
--- a/binsrc/yacutia/view_dav_res.vsp
+++ b/binsrc/yacutia/view_dav_res.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: view_dav_res.vsp,v 1.2.2.2 2010/09/20 10:16:57 source Exp $
+--  $Id: view_dav_res.vsp,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/view_file.vsp b/binsrc/yacutia/view_file.vsp
index 2ccd97e..96ba064 100644
--- a/binsrc/yacutia/view_file.vsp
+++ b/binsrc/yacutia/view_file.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: view_file.vsp,v 1.2.2.2 2010/09/20 10:16:57 source Exp $
+--  $Id: view_file.vsp,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/virtuoso_splash.vspx b/binsrc/yacutia/virtuoso_splash.vspx
index e06eab0..126bc10 100644
--- a/binsrc/yacutia/virtuoso_splash.vspx
+++ b/binsrc/yacutia/virtuoso_splash.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: virtuoso_splash.vspx,v 1.2.2.2 2010/09/20 10:16:57 source Exp $
+ -  $Id: virtuoso_splash.vspx,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/wsdl_service_create.vspx b/binsrc/yacutia/wsdl_service_create.vspx
index 9f06594..837a8b0 100644
--- a/binsrc/yacutia/wsdl_service_create.vspx
+++ b/binsrc/yacutia/wsdl_service_create.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: wsdl_service_create.vspx,v 1.4.2.4 2010/09/20 10:16:57 source Exp $
+ -  $Id: wsdl_service_create.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/wsdl_services.vspx b/binsrc/yacutia/wsdl_services.vspx
index 49b4826..5d31276 100644
--- a/binsrc/yacutia/wsdl_services.vspx
+++ b/binsrc/yacutia/wsdl_services.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: wsdl_services.vspx,v 1.3.2.3 2010/09/20 10:16:57 source Exp $
+ -  $Id: wsdl_services.vspx,v 1.3.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/wsdltree.vspx b/binsrc/yacutia/wsdltree.vspx
index 7d676c1..02b892b 100644
--- a/binsrc/yacutia/wsdltree.vspx
+++ b/binsrc/yacutia/wsdltree.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: wsdltree.vspx,v 1.4.2.4 2010/09/20 10:16:57 source Exp $
+ -  $Id: wsdltree.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xddl-tables.vspx b/binsrc/yacutia/xddl-tables.vspx
index acf76a9..e7fa44e 100644
--- a/binsrc/yacutia/xddl-tables.vspx
+++ b/binsrc/yacutia/xddl-tables.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xddl-tables.vspx,v 1.4.2.4 2010/09/20 10:16:57 source Exp $
+ -  $Id: xddl-tables.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xddl.vspx b/binsrc/yacutia/xddl.vspx
index 6e1f180..b96a8f6 100644
--- a/binsrc/yacutia/xddl.vspx
+++ b/binsrc/yacutia/xddl.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xddl.vspx,v 1.5.2.2 2010/09/20 10:16:57 source Exp $
+ -  $Id: xddl.vspx,v 1.5.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xml_check.vspx b/binsrc/yacutia/xml_check.vspx
index 0097120..edff90c 100644
--- a/binsrc/yacutia/xml_check.vspx
+++ b/binsrc/yacutia/xml_check.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xml_check.vspx,v 1.2.2.2 2010/09/20 10:16:57 source Exp $
+ -  $Id: xml_check.vspx,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xml_sql.vspx b/binsrc/yacutia/xml_sql.vspx
index 6e275a5..10b5177 100644
--- a/binsrc/yacutia/xml_sql.vspx
+++ b/binsrc/yacutia/xml_sql.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -
- -  $Id: xml_sql.vspx,v 1.4.2.4 2010/09/20 10:16:57 source Exp $
+ -  $Id: xml_sql.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xml_sql2.vspx b/binsrc/yacutia/xml_sql2.vspx
index 1a6c228..ac04b9e 100644
--- a/binsrc/yacutia/xml_sql2.vspx
+++ b/binsrc/yacutia/xml_sql2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xml_sql2.vspx,v 1.2.2.3 2010/09/20 10:16:58 source Exp $
+ -  $Id: xml_sql2.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xml_sql_check.vspx b/binsrc/yacutia/xml_sql_check.vspx
index 4745b29..77ea073 100644
--- a/binsrc/yacutia/xml_sql_check.vspx
+++ b/binsrc/yacutia/xml_sql_check.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xml_sql_check.vspx,v 1.3.2.2 2010/09/20 10:16:58 source Exp $
+ -  $Id: xml_sql_check.vspx,v 1.3.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xml_sql_view_show.vspx b/binsrc/yacutia/xml_sql_view_show.vspx
index 17f8259..fc51388 100644
--- a/binsrc/yacutia/xml_sql_view_show.vspx
+++ b/binsrc/yacutia/xml_sql_view_show.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xml_sql_view_show.vspx,v 1.2.2.2 2010/09/20 10:16:58 source Exp $
+ -  $Id: xml_sql_view_show.vspx,v 1.2.2.3 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xml_xsd.vspx b/binsrc/yacutia/xml_xsd.vspx
index b4ef110..03f476c 100644
--- a/binsrc/yacutia/xml_xsd.vspx
+++ b/binsrc/yacutia/xml_xsd.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xml_xsd.vspx,v 1.4.2.4 2010/09/20 10:16:58 source Exp $
+ -  $Id: xml_xsd.vspx,v 1.4.2.5 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery.vspx b/binsrc/yacutia/xquery.vspx
index 4735f68..b2a1583 100644
--- a/binsrc/yacutia/xquery.vspx
+++ b/binsrc/yacutia/xquery.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xquery.vspx,v 1.2.2.3 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery.vspx,v 1.2.2.4 2012/03/08 12:55:29 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery2.vspx b/binsrc/yacutia/xquery2.vspx
index df1b869..c53bd09 100644
--- a/binsrc/yacutia/xquery2.vspx
+++ b/binsrc/yacutia/xquery2.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xquery2.vspx,v 1.4.2.3 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery2.vspx,v 1.4.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery3.vspx b/binsrc/yacutia/xquery3.vspx
index 17f718a..81568cd 100644
--- a/binsrc/yacutia/xquery3.vspx
+++ b/binsrc/yacutia/xquery3.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xquery3.vspx,v 1.3.2.3 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery3.vspx,v 1.3.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery4.vspx b/binsrc/yacutia/xquery4.vspx
index ba38c18..0c9ca9c 100644
--- a/binsrc/yacutia/xquery4.vspx
+++ b/binsrc/yacutia/xquery4.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xquery4.vspx,v 1.3.2.3 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery4.vspx,v 1.3.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery_adv.vspx b/binsrc/yacutia/xquery_adv.vspx
index 4bcb86d..45c5c5e 100644
--- a/binsrc/yacutia/xquery_adv.vspx
+++ b/binsrc/yacutia/xquery_adv.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xquery_adv.vspx,v 1.3.2.3 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery_adv.vspx,v 1.3.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery_check.vspx b/binsrc/yacutia/xquery_check.vspx
index 42444fc..06240cc 100644
--- a/binsrc/yacutia/xquery_check.vspx
+++ b/binsrc/yacutia/xquery_check.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xquery_check.vspx,v 1.3.2.2 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery_check.vspx,v 1.3.2.3 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery_src_show.vspx b/binsrc/yacutia/xquery_src_show.vspx
index 9b54af3..6ebf68a 100644
--- a/binsrc/yacutia/xquery_src_show.vspx
+++ b/binsrc/yacutia/xquery_src_show.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xquery_src_show.vspx,v 1.2.2.2 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery_src_show.vspx,v 1.2.2.3 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xquery_templates.vspx b/binsrc/yacutia/xquery_templates.vspx
index 7120c6c..b294b8c 100644
--- a/binsrc/yacutia/xquery_templates.vspx
+++ b/binsrc/yacutia/xquery_templates.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xquery_templates.vspx,v 1.3.2.4 2010/09/20 10:16:58 source Exp $
+ -  $Id: xquery_templates.vspx,v 1.3.2.5 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xslt.vspx b/binsrc/yacutia/xslt.vspx
index bf51af6..2a5945b 100644
--- a/binsrc/yacutia/xslt.vspx
+++ b/binsrc/yacutia/xslt.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xslt.vspx,v 1.2.2.3 2010/09/20 10:16:59 source Exp $
+ -  $Id: xslt.vspx,v 1.2.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xslt_inc.vspx b/binsrc/yacutia/xslt_inc.vspx
index 411ed58..46a6bcb 100644
--- a/binsrc/yacutia/xslt_inc.vspx
+++ b/binsrc/yacutia/xslt_inc.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xslt_inc.vspx,v 1.3.2.3 2010/09/20 10:16:59 source Exp $
+ -  $Id: xslt_inc.vspx,v 1.3.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xslt_res.vsp b/binsrc/yacutia/xslt_res.vsp
index ef67db6..63b4250 100644
--- a/binsrc/yacutia/xslt_res.vsp
+++ b/binsrc/yacutia/xslt_res.vsp
@@ -1,11 +1,11 @@
 <?vsp
 --
---  $Id: xslt_res.vsp,v 1.2.2.3 2010/09/20 10:16:59 source Exp $
+--  $Id: xslt_res.vsp,v 1.2.2.4 2012/03/08 12:55:30 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xslt_res.vspx b/binsrc/yacutia/xslt_res.vspx
index f3855a5..9fbb0c8 100644
--- a/binsrc/yacutia/xslt_res.vspx
+++ b/binsrc/yacutia/xslt_res.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: xslt_res.vspx,v 1.4.2.2 2010/09/20 10:16:59 source Exp $
+ -  $Id: xslt_res.vspx,v 1.4.2.3 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/xslt_result.vspx b/binsrc/yacutia/xslt_result.vspx
index 1acff0a..94bc5b0 100644
--- a/binsrc/yacutia/xslt_result.vspx
+++ b/binsrc/yacutia/xslt_result.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: xslt_result.vspx,v 1.3.2.3 2010/09/20 10:16:59 source Exp $
+ -  $Id: xslt_result.vspx,v 1.3.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/yac.sql b/binsrc/yacutia/yac.sql
index fe12bee..733d126 100644
--- a/binsrc/yacutia/yac.sql
+++ b/binsrc/yacutia/yac.sql
@@ -1,10 +1,10 @@
 --
---  $Id: yac.sql,v 1.1.1.1.2.3 2010/09/20 10:16:59 source Exp $
+--  $Id: yac.sql,v 1.1.1.1.2.4 2012/03/08 12:55:30 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/yacutia.sql b/binsrc/yacutia/yacutia.sql
index c383cf8..2973f11 100644
--- a/binsrc/yacutia/yacutia.sql
+++ b/binsrc/yacutia/yacutia.sql
@@ -1,10 +1,10 @@
 --
---  $Id: yacutia.sql,v 1.43.2.35 2011/03/23 12:03:54 source Exp $
+--  $Id: yacutia.sql,v 1.43.2.42 2012/03/08 12:55:30 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -192,8 +192,9 @@ yacutia_http_log_ui_labels ()
 
 create procedure adm_menu_tree ()
 {
-  declare wa_available integer;
+  declare wa_available, rdf_available integer;
   wa_available := gt (DB.DBA.VAD_CHECK_VERSION ('Framework'), '1.02.13');
+  rdf_available := DB.DBA.VAD_CHECK_VERSION('rdf_mappers');
   return concat (
 '<?xml version="1.0" ?>
 <adm_menu_tree>
@@ -214,11 +215,8 @@ create procedure adm_menu_tree ()
      </node>
      <node name="Access Control" url="sec_auth_serv.vspx" id="24" place="1" allowed="yacutia_acl_page">
       <node name="ACL List" url="sec_auth_serv.vspx" id="25" place="1" allowed="yacutia_acl_page"/>
-      <node name="ACL Edit" url="sec_acl_edit.vspx" id="26" place="1" allowed="yacutia_acl_page"/>',
-      case when wa_available then 
-      '<node name="SPARQL ACL" url="sparql_acl.vspx" id="26" place="1" allowed="yacutia_acl_page"/>'
-      else '' end,
-     '</node>
+      <node name="ACL Edit" url="sec_acl_edit.vspx" id="26" place="1" allowed="yacutia_acl_page"/>
+     </node>
    </node>
    <node name="User Accounts" url="accounts_page.vspx"  id="3" allowed="yacutia_accounts_page">
      <node name="Accounts" url="accounts.vspx" id="4" place="1" allowed="yacutia_accounts_page"/>
@@ -333,10 +331,10 @@ create procedure adm_menu_tree ()
     <node name="Basic" url="db_repl_basic_local.vspx" id="8011" place="1" />
     <node name="Basic" url="db_repl_basic_local_create.vspx" id="8012" place="1" />
    </node>
-   <node name="Incremental" url="db_repl_snap.vspx"  id="81" >
-    <node name="Incremental" url="db_repl_snap_create.vspx" id="82" place="1" />
-    <node name="Incremental" url="db_repl_snap_pull.vspx" id="83" place="1"/>
-    <node name="Incremental" url="db_repl_snap_pull_create.vspx" id="84" place="1" />
+   <node name="Incremental" url="db_repl_snap_pull.vspx"  id="81" >
+    <node name="Incremental" url="db_repl_snap_pull_create.vspx" id="82" place="1" />
+    <node name="Incremental" url="db_repl_snap.vspx" id="83" place="1"/>
+    <node name="Incremental" url="db_repl_snap_create.vspx" id="84" place="1" />
     <node name="Incremental" url="db_repl_snap_local.vspx" id="85" place="1"/>
     <node name="Incremental" url="db_repl_snap_local_create.vspx" id="86" place="1" />
    </node>
@@ -443,7 +441,7 @@ create procedure adm_menu_tree ()
 --             </node>'
 --when 0 then '' end,
 '</node>
- <node name="RDF" url="sparql_input.vspx"  id="189" tip="RDF " allowed="yacutia_message">',
+ <node name="Linked Data" url="sparql_input.vspx"  id="189" tip="Linked Data" allowed="yacutia_message">',
   '<node name="SPARQL" url="sparql_input.vspx"  id="180" allowed="yacutia_sparql_page">
      <node name="SPARQL" url="sparql_load.vspx" id="181" place="1" allowed="yacutia_sparql_page" />
    </node>',
@@ -465,19 +463,34 @@ case when 0 and check_package('rdf_mappers') then
    '<node name="Schemas"  url="rdf_schemas.vspx"  id="183" allowed="yacutia_message">
      <node name="Schemas" url="rdf_schemas.vspx" id="184" place="1" allowed="yacutia_sparql_page" />
    </node>
-   <node name="Namespaces"  url="persistent_xmlns.vspx"  id="183" allowed="yacutia_message" />
-   <node name="RDF Views" url="db_rdf_objects.vspx"  id="271" allowed="yacutia_rdf_schema_objects_page"/>
-   <node name="RDF Views" url="db_rdf_class.vspx"  id="272" place="1"/>
-   <node name="RDF Views" url="db_rdf_owl.vspx"  id="273" place="1"/>
-   <node name="RDF Views" url="db_rdf_view_1.vspx"  id="273" place="1"/>
-   <node name="RDF Views" url="db_rdf_view_2.vspx"  id="273" place="1"/>
-   <node name="RDF Views" url="db_rdf_view_3.vspx"  id="273" place="1"/>
-   <node name="RDF Views" url="db_rdf_view_tb.vspx"  id="273" place="1"/>
-   <node name="RDF Views" url="db_rdf_view_cols.vspx"  id="273" place="1"/>
-   <node name="RDF Views" url="db_rdf_view_pk.vspx"  id="273" place="1"/>
-   <node name="RDF Store Upload" url="rdf_import.vspx"  id="271" allowed="rdf_import_page"/>',
+   <node name="Namespaces"  url="persistent_xmlns.vspx"  id="183" allowed="yacutia_message" />',
+      case when (wa_available is not null and rdf_available is null) then
+      ' <node name="Access Control" url="sparql_acl.vspx" id="274" allowed="yacutia_acls">
+        <node name="ACL List" url="sec_auth_serv_sp.vspx" id="277" place="1" allowed="yacutia_acls"/>'
+      else 
+      '<node name="Access Control" url="sec_auth_serv_sp.vspx" id="274" allowed="yacutia_acls">
+      <node name="ACL List" url="sec_auth_serv_sp.vspx" id="275" place="1" allowed="yacutia_acls"/>' 
+      end,      
+   ' <node name="ACL Edit" url="sec_acl_edit_sp.vspx" id="276" place="1" allowed="yacutia_acls"/>',
+      case when (wa_available is not null) then
+      '<node name="SPARQL ACL" url="sparql_acl.vspx" id="277" place="1" allowed="yacutia_acls"/>'
+      else '' end,
+   '</node>     
+   <node name="Views" url="db_rdf_objects.vspx"  id="271" allowed="yacutia_rdf_schema_objects_page"/>
+   <node name="Views" url="db_rdf_class.vspx"  id="272" place="1"/>
+   <node name="Views" url="db_rdf_owl.vspx"  id="273" place="1"/>
+   <node name="Views" url="db_rdf_view_1.vspx"  id="273" place="1"/>
+   <node name="Views" url="db_rdf_view_2.vspx"  id="273" place="1"/>
+   <node name="Views" url="db_rdf_view_3.vspx"  id="273" place="1"/>
+   <node name="Views" url="db_rdf_view_tb.vspx"  id="273" place="1"/>
+   <node name="Views" url="db_rdf_view_cols.vspx"  id="273" place="1"/>
+   <node name="Views" url="db_rdf_view_pk.vspx"  id="273" place="1"/>
+   <node name="R2RML" url="r2rml_import.vspx"  id="273" />
+   <node name="R2RML" url="r2rml_validate.vspx"  id="273" place="1"/>
+   <node name="R2RML" url="r2rml_gen.vspx"  id="273" place="1"/>
+   <node name="Quad Store Upload" url="rdf_import.vspx"  id="271" allowed="rdf_import_page"/>',
    case when __proc_exists ('PSH.DBA.cli_subscribe') is not null then 
-   '<node name="RDF Subscriptions" url="rdf_psh_subs.vspx"  id="271" allowed="rdf_psh_sub_page"/>'
+   '<node name="Subscriptions (PHSB)" url="rdf_psh_subs.vspx"  id="271" allowed="rdf_psh_sub_page"/>'
        else
        '' 
        end,
@@ -1080,117 +1093,7 @@ disk_stat_meta(in par integer)
 }
 ;
 
-create procedure
-adm_next_checkbox (in keyw varchar, inout params varchar, inout spos integer)
-{
-  declare pos integer;
-  declare len integer;
-  declare klen integer;
-  declare s varchar;
-
-  len := length (params);
-  klen := length (keyw);
-
-  while (spos < len)
-    {
-      s := aref (params, spos);
-      if (keyw = "LEFT" (s, klen) and
-    'on' = lcase (coalesce (aref (params, spos + 1),'')))
-  {
-    spos := spos + 2;
-    return "RIGHT" (s, length (s) - klen);
-  }
-      spos := spos + 2;
-    }
-}
-;
-
-create procedure
-adm_get_file_dsn ()
-{
-  declare idx, len integer;
-  declare name, s_root varchar;
-  declare ret, _all any;
-  declare _err_code, _err_message varchar;
-  declare exit handler for sqlstate '*'
-    {
-      _err_code := __SQL_STATE; _err_message := __SQL_MESSAGE; goto error;
-    };
-
-  _all := sys_dirlist ('.', 1);
-  s_root := server_root ();
-
-  idx := 0;
-  len := length (_all);
-  ret := vector ();
-
-  while (idx < len)
-    {
-       name := aref (_all, idx);
-
-       if (strstr (name, '.dsn'))
-         ret := vector_concat (ret, vector (concat (s_root, name)));
-
-       idx := idx + 1;
-    }
-
-  return ret;
-
-error:
-  return vector ();
-}
-;
-
-create procedure
-adm_lt_dsn_options (in dsn varchar)
-{
-  declare dsns, f_dsns any;
-  declare len, len_f, idx integer;
-
-  dsns := sql_data_sources(1);
-
-  idx := 0;
-  len := length (dsns);
-  len_f := 0;
-
-  if (sys_stat('st_build_opsys_id') = 'Win32')
-    {
-       f_dsns := adm_get_file_dsn ();
-       len_f := length (f_dsns);
-    }
-
-  if (len = 0 and len_f = 0)
-    {
-      http('<option value=NONE>No pre-defined DSNs</option>');
-    }
-  else
-    {
-      while (idx < len)
-  {
-    http (sprintf ('<option value="%s" %s>%s</option>' ,
-       aref (aref (dsns, idx), 0),
-       select_if (aref (aref (dsns, idx), 0), dsn),
-       aref (aref ( dsns, idx), 0)));
-    idx := idx + 1;
-  }
-
-      if (sys_stat('st_build_opsys_id') = 'Win32' and len_f > 0)
-  {
-    idx := 0;
-    while (idx < len_f)
-      {
-        http (sprintf ('<option value="%s" %s>%s</option>' ,
-           aref (f_dsns, idx), select_if (aref (f_dsns, idx), dsn),
-           aref (f_dsns, idx)));
-        idx := idx + 1;
-      }
-  }
-    }
-}
-;
-
-create procedure
-true_if (in sel varchar, in val varchar)
+create procedure true_if (in sel varchar, in val varchar)
 {
   if (sel = val)
       return ('true');
@@ -1198,9 +1101,7 @@ true_if (in sel varchar, in val varchar)
 }
 ;
 
-create procedure
-make_full_name (in cat varchar, in sch varchar, in name varchar, in quoted integer := 0)
-returns varchar
+create procedure make_full_name (in cat varchar, in sch varchar, in name varchar, in quoted integer := 0) returns varchar
 {
     declare ret, quote varchar;
     if (quoted <> 0) quote := '"';
@@ -1217,45 +1118,6 @@ returns varchar
 }
 ;
 
-create procedure
-adm_lt_make_dsn_part (in dsn varchar)
-{
-  declare inx, c integer;
-  dsn := ucase (dsn);
-  inx :=0;
-  while (inx < length (dsn)) {
-    c := aref (dsn, inx);
-    if (not ((c >= aref ('A', 0) and c <= aref ('Z', 0))
-       or (c >= aref ('0', 0) and c <= aref ('9', 0))))
-      aset (dsn, inx, aref ('_', 0));
-    inx := inx + 1;
-  }
-  return dsn;
-}
-;
-
-create procedure
-adm_make_option_list (in opts any, in name varchar, in val varchar, in spare integer)
-{
-  declare i, l, j, k integer;
-  declare ch varchar;
-  l := length (opts); i := 0;
-  j := 0; k := 1;
-  if (spare > 0) {
-      j := 1;
-      k := 2;
-  }
-  http (sprintf ('<select name="%s">', name));
-  while (i < l) {
-      ch := '';
-      if (opts[i] = val)
-  ch := 'selected="true"';
-      http (sprintf ('<option value="%s" %s>%s</option>', opts[i+j], ch, opts[i]));
-      i := i + k;
-  }
-  http ('</select>');
-}
-;
 
 create procedure
 adm_lt_getRPKeys2 (in dsn varchar,
@@ -1337,33 +1199,6 @@ next:
 }
 ;
 
-create procedure
-vector_print (in in_vector any)
-{
-  declare len, idx integer;
-  declare temp varchar;
-  declare res varchar;
-
-  if (isstring (in_vector))
-    in_vector := vector (in_vector);
-
-  len := length (in_vector);
-  res:='';
-  idx := 0;
-  while ( idx < len ) {
-    if (idx > 0 )
-      res := concat (res, ', ');
-    temp := aref (in_vector, idx);
-    if (__tag(temp) = 193)
-      res := concat (res, 'vector');
-    else
-      res := concat (res, temp);
-    idx := idx+1;
-  }
-  return (res);
-}
-;
-
 /*
    VDB table/view linking
  */
@@ -1592,163 +1427,6 @@ sequence_set ('dbpump_temp', 0, 0)
 sequence_set ('dbpump_id', 1, 0)
 ;
 
-create procedure "PUMP"."DBA"."__GET_TEMPORARY" (  )
-{
-  return  sprintf('./tmp/dbpump%d.tmp', sequence_next('dbpump_temp'));
-}
-;
-
-create procedure "PUMP"."DBA"."__GET_KEYWORD" ( in name varchar, in arr any, in def varchar )
-{
-  if (arr is not null)
-    return get_keyword(name,arr,def);
-  return '';
-}
-;
-
-create procedure "PUMP"."DBA"."URLIFY_STRING" (in val varchar)
-{
-  declare i,n,c integer;
-  declare s varchar;
-  s := '';
-  if (val is not null and length(val)>0) {
-      n := length(val);
-      i := 0;
-      while (i<n) {
-          c := aref(val,i);
-          if (c = 32)
-              s := concat(s,'+');
-          else {
-              if ((c>=48 and c<=57) or (c>=97 and c<=122) or (c>=65 and c<=90))
-                  s := concat(s,sprintf('%c',c));
-              else
-                  s := concat(s,sprintf('%%%02X',c));
-          }
-          i := i + 1;
-      }
-  }
-  return s;
-}
-;
-
-create procedure "PUMP"."DBA"."DBPUMP_START_COMPONENT" (  in pars any,
-              in name varchar,
-              in arg varchar )
-{
-  declare i,n integer;
-  declare str,allt,s,argsfile varchar;
-  declare outarr any;
-
-  allt := 'all_together_now';
-  argsfile := sprintf('./tmp/%s.cmd-line',name);
-  if (arg is null or length(arg)=0)
-    arg := 'DUMMY';
-  str := sprintf('%s %s ', name, arg);
-  n := length(pars);
-  str := concat (str, sprintf (' %s=%s ', allt,
-  "PUMP"."DBA"."URLIFY_STRING" (
-    "PUMP"."DBA"."__GET_KEYWORD" (allt,pars,''))));
-  i := n - 2;
-  while (i>=0)
-  {
-    s := aref(pars,i);
-    if (neq (allt, s))
-      str := concat (str, sprintf (' %s=%s ', s,"PUMP"."DBA"."URLIFY_STRING" (aref(pars,i+1))));
-    i := i - 2;
-  }
-  string_to_file (argsfile,str,-2);
-  str := sprintf ('@%s', argsfile);
---  str := concat (str, ' > ');
---  str := concat (str, tmp);
-  commit work;
-  run_executable ('dbpump', 1, str);
-  return str;
-}
-;
-
-create procedure "PUMP"."DBA"."DBPUMP_RUN_COMPONENT" (  inout pars any,
-              in name varchar,
-              in arg varchar,
-              in outerr integer := 1 )
-{
-  declare i,n integer;
-  declare str,allt,s,argsfile varchar;
-  declare tmp,errstr varchar;
-  declare outarr any;
-
-  allt := 'all_together_now';
-  tmp := "PUMP"."DBA"."__GET_TEMPORARY" ();
-  argsfile := sprintf('./tmp/%s.cmd-line',name);
-  if (arg is null or length(arg)=0)
-    arg := 'DUMMY';
-  str := sprintf('%s %s %s', name, arg, tmp);
-  n := length(pars);
-  str := concat (str, sprintf (' %s=%s ', allt,
-  "PUMP"."DBA"."URLIFY_STRING" (
-    "PUMP"."DBA"."__GET_KEYWORD" (allt,pars,''))));
-  i := n - 2;
-  while (i>=0)
-  {
-    s := aref(pars,i);
-    if (neq (allt, s))
-      str := concat (str, sprintf (' %s=%s ', s,"PUMP"."DBA"."URLIFY_STRING" (aref(pars,i+1))));
-    i := i - 2;
-  }
-
-  declare exit handler for sqlstate '*' { errstr := sprintf ('Temporary file creation error:\n%s %s\nprobably permissions were revoked for temporary folder\nor it doesn\'t exist', __SQL_STATE, __SQL_MESSAGE); goto error_gen; };
-
-  string_to_file(argsfile,str,-2);
-  str := sprintf ('@%s', argsfile);
---  str := concat (str, ' > ');
---  str := concat (str, tmp);
-  commit work;
-  declare exit handler for sqlstate '*' { errstr := sprintf ('Dbpump running error:\n%s %s\nProbably the executable \'dbpump\' doesn\'t exist in \'bin\' folder', __SQL_STATE, __SQL_MESSAGE); goto error_gen; };
-  run_executable('dbpump', 1, str);
-  declare str varchar;
-
-  declare exit handler for sqlstate '*' { errstr := sprintf ('Results obtaining error:\n%s %s\nProbably the executable \'dbpump\' crashed during the work', __SQL_STATE, __SQL_MESSAGE); goto error_gen; };
-  str := file_to_string(tmp);
-  string_to_file(sprintf('./tmp/%s.cmd-out',name),str,-2);
-  "PUMP"."DBA"."DBPUMP_START_COMPONENT" (pars, 'remove_temporary', tmp);
---  run_executable('rm',0,'-f',tmp);
-  return str;
-
-error_gen:
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'last_error', errstr);
-  if (outerr)
-    return sprintf ('last_error=%s', errstr);
-  else
-    return '';
-}
-;
-
-
-create procedure "PUMP"."DBA"."HTML_RETRIEVE_TABLES" (  inout arr any )
-{
-  declare str varchar;
-  str := "PUMP"."DBA"."DBPUMP_RUN_COMPONENT" (arr,'retrieve_tables','*');
-  if (str is null)
-    return '';
-  return str;
-}
-;
-
-create procedure "PUMP"."DBA"."HTML_RETRIEVE_QUALIFIERS_VIA_PLSQL" ( in arr any )
-{
-  declare str, s varchar;
-  str := '%=None&custom=Advanced';
-whenever not found goto fin;
-
-  for (select distinct name_part (KEY_TABLE, 0, 'DB') as qual from DB.DBA.SYS_KEYS) do
-    {
-      str := concat (str, '&', qual, '=', qual);
-    }
-fin:
-  return str;
-}
-;
-
-
 create procedure "PUMP"."DBA"."RETRIEVE_TABLES_VIA_PLSQL" ( in qual_mask varchar, in owner_mask varchar, in table_mask varchar, in out_type integer := 1 )
 {
 
@@ -1884,71 +1562,6 @@ create procedure "DB"."DBA"."BACKUP_VIA_DBPUMP" (
 }
 ;
 
-create procedure "PUMP"."DBA"."DUMP_TABLES_AND_PARS_RETRIEVE" ( inout pars any )
-{
-  declare n integer;
-  declare str varchar;
-  declare outarr any;
-
---  checkpoint;
-  str := "PUMP"."DBA"."DBPUMP_RUN_COMPONENT" (pars,'dump_tables','*');
-  outarr := split_and_decode(str,0);
---  n := length(outarr);
-  return outarr;
-}
-;
-
---drop procedure restore_tables_and_pars_retrieve;
-create procedure "PUMP"."DBA"."RESTORE_TABLES_AND_PARS_RETRIEVE" ( inout pars any )
-{
-  declare n integer;
-  declare str varchar;
-  declare outarr any;
-
---  checkpoint;
-
-  str := "PUMP"."DBA"."DBPUMP_RUN_COMPONENT" (pars,'restore_tables','*');
-  outarr := split_and_decode(str,0);
---  n := length(outarr);
-  return outarr;
-}
-;
-
-create procedure "DB"."DBA"."RESTORE_DBPUMP'S_FOLDER" (
-                        in username varchar,
-                        in passwd varchar,
-                        in datasource varchar,
-                        in dump_path varchar,
-                        in dump_dir varchar,
-                        in dump_items varchar,
-                        in chqual varchar,
-                        in chuser varchar
-                        ) returns varchar
-{
-  declare pars, res any;
-  pars:= null;
-
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'user', username);
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'password', passwd);
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'datasource', datasource);
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'dump_path', dump_path);
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'dump_dir', dump_dir);
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'restore_users', case dump_items[7] when 1 then 'on' else 'off' end );
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'restore_grants', case dump_items[8] when 1 then 'on' else 'off' end );
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'change_rqualifier', case when length(chqual) > 0 then 'on' else 'off' end );
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'new_rqualifier', chqual );
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'change_rowner', case when length(chuser) > 0 then 'on' else 'off' end );
-  "PUMP"."DBA"."CHANGE_VAL" (pars, 'new_rowner', chuser );
-  res := "PUMP"."DBA"."RESTORE_TABLES_AND_PARS_RETRIEVE" (pars);
-  declare str varchar;
-  str := get_keyword ('result_txt', res, NULL);
-  if(str is null)
-    str := get_keyword ('last_error', res, '');
-
-  return str;
-}
-;
-
 --drop procedure html_choice_rpath;
 create procedure "PUMP"."DBA"."DBPUMP_CHOICE_RPATH"( in path varchar := './backup' ) returns any
 {
@@ -3468,7 +3081,7 @@ create procedure DB.DBA.Y_ACI_LOAD (
         V[3] := 1;
       if (aclMode = 'acl:Write')
         V[4] := 1;
-      if (aclMode = 'acl:Control')
+      if (aclMode = 'acl:Execute')
         V[5] := 1;
     }
     if (not isnull (V))
@@ -3540,7 +3153,7 @@ create procedure DB.DBA.Y_ACI_N3 (
       if (aciArray[N][4])
         retValue := retValue || ';\n   acl:mode acl:Write';
       if (aciArray[N][5])
-        retValue := retValue || ';\n   acl:mode acl:Control';
+        retValue := retValue || ';\n   acl:mode acl:Execute';
       retValue := retValue || '.\n';
     }
   }
@@ -4269,32 +3882,6 @@ yacutia_exec_no_error('create procedure view Y_SYS_SCHEDULED_EVENT as adm_get_sc
 --select indirect_grants( 'WS.SOAP.countTheEntities', vector(103));
 --select G_OP from SYS_GRANTS where G_USER = 103 and G_OBJECT = 'WS.SOAP.countTheEntities' and G_COL in ('_all', '_all');
 
-create procedure
-adm_get_init_name ()
-{
-  declare _all varchar;
-
-  _all := virtuoso_ini_path();
-
-  if (sys_stat ('st_build_opsys_id') = 'Win32')
-    {
-      while (length (_all) > 0)
-        {
-          declare pos integer;
-
-          pos := strstr (_all, '\\');
-
-          if (pos is NULL)
-            return _all;
-
-          _all := subseq (_all, pos + 1);
-        }
-    }
-  else
-    return _all;
-}
-;
-
 
 create procedure
 YACUTIA_DAV_COPY (in path varchar,
@@ -4975,19 +4562,6 @@ create procedure get_vdb_data_types() {
 }
 ;
 
-create procedure adm_is_hosted ()
-{
-  declare ret integer;
-
-  ret := 0;
-
-  if (__proc_exists ('aspx_get_temp_directory', 2) is not NULL) ret := 1;
-  if (__proc_exists ('java_load_class', 2) is not NULL) ret := ret + 2;
-
-  return ret;
-}
-;
-
 
 create procedure
 vdb_get_pkeys (in dsn varchar, in tbl_qual varchar, in tbl_user varchar, in tbl_name varchar)
@@ -5932,12 +5506,53 @@ create procedure y_make_tb_from_query (in tb any, in q any)
 }
 ;
 
-create procedure yac_syncml_detect (in _name any)
+create procedure Y_SYNCML_DETECT (
+  in path varchar)
 {
+  if (__proc_exists ('DB.DBA.yac_syncml_detect') is not null)
+    return DB.DBA.yac_syncml_detect (path);
+
    return 0;
 }
 ;
 
+create procedure Y_SYNCML_VERSIONS ()
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_version') is not null)
+    return DB.DBA.yac_syncml_version ();
+
+  return vector ();
+}
+;
+
+create procedure Y_SYNCML_VERSION (
+  in path varchar)
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_version_get') is not null)
+    return DB.DBA.yac_syncml_version_get (path);
+
+  return 'N';
+}
+;
+
+create procedure Y_SYNCML_TYPES ()
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_type') is not null)
+    return DB.DBA.yac_syncml_type ();
+
+  return vector ();
+}
+;
+
+CREATE PROCEDURE Y_SYNCML_TYPE (
+  in path varchar)
+{
+  if (__proc_exists ('DB.DBA.yac_syncml_type_get') is not null)
+    return DB.DBA.yac_syncml_type_get (path);
+
+  return 'N';
+}
+;
 
 create procedure y_sprintf_to_reg (in fmt varchar, in in_list any, in o_list any)
 {
@@ -6620,6 +6235,8 @@ create procedure y_rdf_api_type (in t int)
     return 'URL';
   else if (t = 2)
     return 'keywords';
+  else if (t = 3)
+    return 'preprocess';
   return '';
 }
 ;
@@ -6721,17 +6338,19 @@ create procedure y_tab_or_space (in x any)
 }
 ;
 
-create procedure WS.WS.VFS_EXPORT_DEFS ()
+create procedure WS.WS.VFS_EXPORT_DEFS (in ids any := null)
 {
   declare ses any;
   ses := string_output ();
   for select * from WS.WS.VFS_SITE do 
     {
+      if (ids is not null and not position (VS_ID, ids))
+        goto skipit;	
       http (sprintf ('-- Crawling descriptor for %s\n', VS_DESCR), ses);
       http ('INSERT SOFT WS.WS.VFS_SITE (\n\tVS_DESCR,\n\tVS_HOST,\n\tVS_URL,\n\tVS_INX,\n\tVS_OWN,\n\tVS_ROOT,\n\tVS_NEWER,\n' ||
 		'\tVS_DEL,\n\tVS_FOLLOW,\n\tVS_NFOLLOW,\n\tVS_SRC,\n\tVS_OPTIONS,\n\tVS_METHOD,\n\tVS_OTHER,\n\tVS_OPAGE,\n\tVS_REDIRECT,\n'||
 		'\tVS_STORE,\n\tVS_UDATA,\n\tVS_DLOAD_META,\n\tVS_INST_ID,\n\tVS_EXTRACT_FN,\n\tVS_STORE_FN,\n\tVS_DEPTH,'||
-		'\n\tVS_CONVERT_HTML,\n\tVS_XPATH,\n\tVS_BOT,\n\tVS_IS_SITEMAP,\n\tVS_ACCEPT_RDF,\n\tVS_THREADS,\n\tVS_ROBOTS)\n VALUES (\n',
+		'\n\tVS_CONVERT_HTML,\n\tVS_XPATH,\n\tVS_BOT,\n\tVS_IS_SITEMAP,\n\tVS_ACCEPT_RDF,\n\tVS_THREADS,\n\tVS_ROBOTS,\n\tVS_DELAY,\n\tVS_TIMEOUT,\n\tVS_HEADERS)\n VALUES (\n',
             ses			 
 	  );
       http ('\t', ses);	  
@@ -6793,7 +6412,13 @@ create procedure WS.WS.VFS_EXPORT_DEFS ()
       http ('\t', ses);
       http (DB.DBA.SYS_SQL_VAL_PRINT (VS_THREADS),ses); http (',\n', ses);
       http ('\t', ses);
-      http (DB.DBA.SYS_SQL_VAL_PRINT (VS_ROBOTS),ses); http ('\n', ses);
+      http (DB.DBA.SYS_SQL_VAL_PRINT (VS_ROBOTS),ses); http (',\n', ses);
+      http ('\t', ses);
+      http (DB.DBA.SYS_SQL_VAL_PRINT (VS_DELAY),ses); http (',\n', ses);
+      http ('\t', ses);
+      http (DB.DBA.SYS_SQL_VAL_PRINT (VS_TIMEOUT),ses); http (',\n', ses);
+      http ('\t', ses);
+      http (DB.DBA.SYS_SQL_VAL_PRINT (VS_HEADERS),ses); http ('\n', ses);
       http (');\n', ses);
       for select * from WS.WS.VFS_SITE_RDF_MAP where VM_HOST = VS_HOST and VM_ROOT = VS_ROOT order by VM_SEQ do 
 	{
@@ -6808,6 +6433,7 @@ create procedure WS.WS.VFS_EXPORT_DEFS ()
       http ('\n', ses);
       http ('\n', ses);
       http ('\n', ses);
+      skipit:;
     }
   http ('WS.WS.VFS_INIT_QUEUE ();\n', ses);
   return ses;
@@ -6902,3 +6528,39 @@ create procedure y_list_webids (in uname varchar)
   return webids;
 }
 ;
+
+create procedure construct_table_sql( in tablename varchar ) returns varchar
+{
+  declare sql varchar;
+  declare k integer;
+  
+  sql := 'SELECT ';
+  k := 0;
+
+    for SELECT c."COLUMN" as COL_NAME 
+      from  DB.DBA.SYS_KEYS k, DB.DBA.SYS_KEY_PARTS kp, "SYS_COLS" c
+      where
+            name_part (k.KEY_TABLE, 0) =  name_part (tablename, 0) and
+            name_part (k.KEY_TABLE, 1) =  name_part (tablename, 1) and
+            name_part (k.KEY_TABLE, 2) =  name_part (tablename, 2)
+            and __any_grants (k.KEY_TABLE)
+        and c."COLUMN" <> '_IDN'
+        and k.KEY_IS_MAIN = 1
+        and k.KEY_MIGRATE_TO is null
+        and kp.KP_KEY_ID = k.KEY_ID
+        and c.COL_ID = kp.KP_COL
+	order by kp.KP_NTH do 
+	{
+      if (k > 0 )
+          sql := concat( sql, ',' );
+      else k := 1;
+
+      sql := concat( sql, COL_NAME);
+      
+  }
+  sql := concat(sql, ' FROM ', tablename);
+  
+  return sql;
+}
+;
+
diff --git a/binsrc/yacutia/yacutia_decor.vspx b/binsrc/yacutia/yacutia_decor.vspx
index 8350288..b884e4d 100644
--- a/binsrc/yacutia/yacutia_decor.vspx
+++ b/binsrc/yacutia/yacutia_decor.vspx
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!--
  -
- -  $Id: yacutia_decor.vspx,v 1.7.2.4 2010/09/20 10:16:59 source Exp $
+ -  $Id: yacutia_decor.vspx,v 1.7.2.5 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/yacutia_style.css b/binsrc/yacutia/yacutia_style.css
index db0ac9d..71810c6 100644
--- a/binsrc/yacutia/yacutia_style.css
+++ b/binsrc/yacutia/yacutia_style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: yacutia_style.css,v 1.7.2.8 2011/01/25 14:21:44 source Exp $
+ *  $Id: yacutia_style.css,v 1.7.2.9 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/yacutia_style.xsl b/binsrc/yacutia/yacutia_style.xsl
index 47b7adf..214d524 100644
--- a/binsrc/yacutia/yacutia_style.xsl
+++ b/binsrc/yacutia/yacutia_style.xsl
@@ -2,12 +2,12 @@
 <!-- <!DOCTYPE html  PUBLIC "" "ent.dtd"> -->
 <!--
  -
- -  $Id: yacutia_style.xsl,v 1.9.2.5 2011/01/25 14:21:44 source Exp $
+ -  $Id: yacutia_style.xsl,v 1.9.2.7 2012/03/08 13:13:48 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -26,7 +26,6 @@
 -->
 <!--
   Virtuoso Conductor XSL style-sheet for page macros
-  (C)Copyright 2005 OpenLink Software
 -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0"
diff --git a/binsrc/yacutia/yacutia_styles_sample.htm b/binsrc/yacutia/yacutia_styles_sample.htm
index 0b6aab1..1a0aaa2 100644
--- a/binsrc/yacutia/yacutia_styles_sample.htm
+++ b/binsrc/yacutia/yacutia_styles_sample.htm
@@ -1,11 +1,11 @@
 <!--
  -
- -  $Id: yacutia_styles_sample.htm,v 1.1.1.1.2.3 2010/09/20 10:17:00 source Exp $
+ -  $Id: yacutia_styles_sample.htm,v 1.1.1.1.2.4 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/binsrc/yacutia/yacutia_vdir_style.css b/binsrc/yacutia/yacutia_vdir_style.css
index 2ca7adb..a07876f 100644
--- a/binsrc/yacutia/yacutia_vdir_style.css
+++ b/binsrc/yacutia/yacutia_vdir_style.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: yacutia_vdir_style.css,v 1.2.2.2 2010/09/20 10:17:00 source Exp $
+ *  $Id: yacutia_vdir_style.css,v 1.2.2.3 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/configure b/configure
index 5bf846b..99d137a 100755
--- a/configure
+++ b/configure
@@ -1,14 +1,14 @@
 #! /bin/sh
 # From configure.in Id: configure.in.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for Virtuoso Open Source Edition 6.1.3.
+# Generated by GNU Autoconf 2.68 for Virtuoso Open Source Edition 6.1.5.
 #
 # Report bugs to <vos.admin at openlinksw.com>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -92,6 +92,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -174,7 +175,15 @@ test x\$exitcode = x0 || exit 1"
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
+test \$(( 1 + 1 )) = 2 || exit 1
+
+  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
   if (eval "$as_required") 2>/dev/null; then :
   as_have_required=yes
 else
@@ -217,11 +226,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
 	# neutralization value for shells without unset; and this also
 	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
 	BASH_ENV=/dev/null
 	ENV=/dev/null
 	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -320,7 +336,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -360,19 +376,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -529,161 +545,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 # Sed expression to map a string onto a valid variable name.
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-
-
-# Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-$*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
-
-	  if test "$prev" != 'sed 50q "$0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
 
 test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -702,8 +571,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='Virtuoso Open Source Edition'
 PACKAGE_TARNAME='virtuoso-opensource'
-PACKAGE_VERSION='6.1.3'
-PACKAGE_STRING='Virtuoso Open Source Edition 6.1.3'
+PACKAGE_VERSION='6.1.5'
+PACKAGE_STRING='Virtuoso Open Source Edition 6.1.5'
 PACKAGE_BUGREPORT='vos.admin at openlinksw.com'
 PACKAGE_URL=''
 
@@ -772,6 +641,8 @@ WITH_FCT_VAD_FALSE
 WITH_FCT_VAD_TRUE
 WITH_DEMO_VAD_FALSE
 WITH_DEMO_VAD_TRUE
+WITH_DBPEDIA_VAD_FALSE
+WITH_DBPEDIA_VAD_TRUE
 WITH_CONDUCTOR_VAD_FALSE
 WITH_CONDUCTOR_VAD_TRUE
 WITH_BPEL_VAD_FALSE
@@ -873,9 +744,11 @@ OTOOL
 LIPO
 NMEDIT
 DSYMUTIL
-lt_ECHO
+MANIFEST_TOOL
 RANLIB
+ac_ct_AR
 AR
+DLLTOOL
 OBJDUMP
 NM
 ac_ct_DUMPBIN
@@ -1012,6 +885,7 @@ enable_shared
 enable_static
 with_pic
 enable_fast_install
+with_sysroot
 enable_libtool_lock
 with_debug
 enable_xml
@@ -1049,6 +923,7 @@ with_port
 enable_
 enable_bpel_vad
 enable_conductor_vad
+enable_dbpedia_vad
 enable_demo_vad
 enable_fct_vad
 enable_isparql_vad
@@ -1132,8 +1007,9 @@ do
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1178,7 +1054,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1204,7 +1080,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1408,7 +1284,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1424,7 +1300,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1454,8 +1330,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1463,7 +1339,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1473,7 +1349,7 @@ Try \`$0 --help' for more information."
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1481,13 +1357,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1510,7 +1386,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1524,8 +1400,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1540,9 +1416,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1581,11 +1457,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1611,7 +1487,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Virtuoso Open Source Edition 6.1.3 to adapt to many kinds of systems.
+\`configure' configures Virtuoso Open Source Edition 6.1.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1625,7 +1501,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1682,7 +1558,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Virtuoso Open Source Edition 6.1.3:";;
+     short | recursive ) echo "Configuration of Virtuoso Open Source Edition 6.1.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1740,6 +1616,8 @@ VAD Packages:
   --disable-bpel-vad      disable BPEL vad]
   --enable-conductor-vad  enable Conductor vad package (default)
   --disable-conductor-vad disable Conductor vad package]
+  --enable-dbpedia-vad    enable DBpedia vad package (default)
+  --disable-conductor-vad disable DBpedia vad package]
   --enable-demo-vad       enable Demo vad package (default)
   --disable-demo-vad      disable Demo vad package]
   --enable-fct-vad        enable Demo vad package (default)
@@ -1767,6 +1645,8 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
   --with-debug            debugging code
   --with-xml-prefix=PFX   Prefix where libxml is installed (optional)
   --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)
@@ -1796,8 +1676,9 @@ Some influential environment variables:
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
-  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
-              the first program found out of: `bison -y', `byacc', `yacc'.
+  YACC        The `Yet Another Compiler Compiler' implementation to use.
+              Defaults to the first program found out of: `bison -y', `byacc',
+              `yacc'.
   YFLAGS      The list of arguments that will be passed by default to $YACC.
               This script will default YFLAGS to the empty string to avoid a
               default value of `-d' given by some make applications.
@@ -1868,10 +1749,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Virtuoso Open Source Edition configure 6.1.3
-generated by GNU Autoconf 2.65
+Virtuoso Open Source Edition configure 6.1.5
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1915,7 +1796,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1941,7 +1822,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -1952,7 +1833,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1965,10 +1846,10 @@ fi
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -2004,7 +1885,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 else
   ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
 $as_echo "$ac_header_preproc" >&6; }
 
@@ -2027,17 +1908,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## --------------------------------------- ##
+( $as_echo "## --------------------------------------- ##
 ## Report this to vos.admin at openlinksw.com ##
-## --------------------------------------- ##
-_ASBOX
+## --------------------------------------- ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -2046,7 +1925,7 @@ eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -2087,7 +1966,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -2101,7 +1980,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2119,7 +1998,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -2164,7 +2043,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -2342,7 +2221,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 rm -f conftest.val
 
   fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
@@ -2355,7 +2234,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2410,7 +2289,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -2423,7 +2302,7 @@ ac_fn_c_check_type ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -2464,7 +2343,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_type
 
@@ -2477,7 +2356,7 @@ ac_fn_c_check_member ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
 $as_echo_n "checking for $2.$3... " >&6; }
-if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$4+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2521,19 +2400,22 @@ fi
 eval ac_res=\$$4
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_member
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
 ac_fn_c_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2542,8 +2424,12 @@ $4
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
 #endif
 
   ;
@@ -2560,15 +2446,15 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Virtuoso Open Source Edition $as_me 6.1.3, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+It was created by Virtuoso Open Source Edition $as_me 6.1.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2678,11 +2564,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -2716,11 +2600,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -2733,11 +2615,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -2751,11 +2631,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -2810,7 +2688,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -2825,7 +2708,11 @@ do
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2901,7 +2788,7 @@ if $ac_cache_corrupted; then
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -2917,16 +2804,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_aux_dir=
 for ac_dir in binsrc/config "$srcdir"/binsrc/config; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in binsrc/config \"$srcdir\"/binsrc/config" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in binsrc/config \"$srcdir\"/binsrc/config" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2961,7 +2854,7 @@ am__api_version='1.11'
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3048,11 +2941,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -3074,7 +2967,7 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" "$LINENO" 5
    fi
 
@@ -3084,7 +2977,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -3138,7 +3031,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -3178,7 +3071,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -3231,7 +3124,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3282,7 +3175,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -3322,7 +3215,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -3330,7 +3223,7 @@ SHELL = /bin/sh
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -3364,7 +3257,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -3380,7 +3273,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='virtuoso-opensource'
- VERSION='6.1.3'
+ VERSION='6.1.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3488,7 +3381,7 @@ do
 done
 rm -rf conftest.dir
 
-if test "${am_cv_prog_tar_ustar+set}" = set; then :
+if ${am_cv_prog_tar_ustar+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   am_cv_prog_tar_ustar=$_am_tool
@@ -3535,27 +3428,27 @@ fi
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -3573,14 +3466,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
@@ -3588,7 +3481,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -3800,7 +3693,7 @@ $as_echo "unknown" >&6; }
 	echo ""
 	echo "  Supported layouts:      Debian FreeBSD GNU OpenLink opt RedHat"
 	echo ""
-	as_fn_error "unable to continue" "$LINENO" 5
+	as_fn_error $? "unable to continue" "$LINENO" 5
 	;;
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${virtuoso_layout}" >&5
@@ -3844,7 +3737,7 @@ INCDIR=$TOP/include
 set dummy cpp; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CPP+set}" = set; then :
+if ${ac_cv_path_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $CPP in
@@ -3893,7 +3786,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3933,7 +3826,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3986,7 +3879,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4026,7 +3919,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4085,7 +3978,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4129,7 +4022,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -4183,8 +4076,8 @@ fi
 
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4298,9 +4191,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -4342,8 +4234,8 @@ done
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4400,9 +4292,9 @@ $as_echo "$ac_try_echo"; } >&5
     else
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -4413,7 +4305,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4453,8 +4345,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -4464,7 +4356,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4501,7 +4393,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4579,7 +4471,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4740,7 +4632,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4872,7 +4764,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
 fi
 set dummy $CC; ac_cc=`$as_echo "$2" |
 		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4981,7 +4873,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -5036,7 +4928,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_SED"; then
-    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
   fi
 else
   ac_cv_path_SED=$SED
@@ -5063,7 +4955,7 @@ Xsed="$SED -e 1s/^X//"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -5112,7 +5004,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_GREP=$GREP
@@ -5126,7 +5018,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -5178,7 +5070,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_EGREP=$EGREP
@@ -5193,7 +5085,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -5245,7 +5137,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_FGREP=$FGREP
@@ -5276,6 +5168,58 @@ test -z "$GREP" && GREP=grep
 
 
 
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
+
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 # Check whether --with-gnu-ld was given.
@@ -5324,7 +5268,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -5361,10 +5305,10 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -5411,7 +5355,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -5441,7 +5385,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -5457,11 +5401,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -5500,7 +5444,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -5516,18 +5460,18 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -5539,7 +5483,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5656,8 +5600,7 @@ do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
 "
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -5669,7 +5612,7 @@ done
 
 
   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
   MINIX=yes
 else
   MINIX=
@@ -5691,7 +5634,7 @@ $as_echo "#define _MINIX 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5731,7 +5674,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
 $as_echo_n "checking for library containing strerror... " >&6; }
-if test "${ac_cv_search_strerror+set}" = set; then :
+if ${ac_cv_search_strerror+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -5765,11 +5708,11 @@ for ac_lib in '' cposix; do
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_strerror+set}" = set; then :
+  if ${ac_cv_search_strerror+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_strerror+set}" = set; then :
+if ${ac_cv_search_strerror+:} false; then :
 
 else
   ac_cv_search_strerror=no
@@ -5799,7 +5742,7 @@ fi
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
+if ${ac_cv_c_bigendian+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_bigendian=unknown
@@ -6017,13 +5960,13 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
      ;; #(
    *)
-     as_fn_error "unknown endianness
+     as_fn_error $? "unknown endianness
  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
  esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
+if ${ac_cv_c_const+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6102,7 +6045,7 @@ $as_echo "#define const /**/" >>confdefs.h
 fi
  			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 $as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
@@ -6144,7 +6087,7 @@ esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
 $as_echo_n "checking whether char is unsigned... " >&6; }
-if test "${ac_cv_c_char_unsigned+set}" = set; then :
+if ${ac_cv_c_char_unsigned+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6178,7 +6121,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
 $as_echo_n "checking for long double with more range or precision than double... " >&6; }
-if test "${ac_cv_type_long_double_wider+set}" = set; then :
+if ${ac_cv_type_long_double_wider+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6247,7 +6190,7 @@ $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
 $as_echo_n "checking size of char... " >&6; }
-if test "${ac_cv_sizeof_char+set}" = set; then :
+if ${ac_cv_sizeof_char+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :
@@ -6256,9 +6199,8 @@ else
   if test "$ac_cv_type_char" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (char)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (char)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_char=0
    fi
@@ -6281,7 +6223,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
 $as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then :
+if ${ac_cv_sizeof_short+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
@@ -6290,9 +6232,8 @@ else
   if test "$ac_cv_type_short" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (short)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_short=0
    fi
@@ -6315,7 +6256,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5
 $as_echo_n "checking size of unsigned... " >&6; }
-if test "${ac_cv_sizeof_unsigned+set}" = set; then :
+if ${ac_cv_sizeof_unsigned+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned"        "$ac_includes_default"; then :
@@ -6324,9 +6265,8 @@ else
   if test "$ac_cv_type_unsigned" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (unsigned)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (unsigned)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_unsigned=0
    fi
@@ -6349,7 +6289,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
 $as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
@@ -6358,9 +6298,8 @@ else
   if test "$ac_cv_type_int" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_int=0
    fi
@@ -6383,7 +6322,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
 $as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
@@ -6392,9 +6331,8 @@ else
   if test "$ac_cv_type_long" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long=0
    fi
@@ -6417,7 +6355,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
 $as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
+if ${ac_cv_sizeof_long_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
@@ -6426,9 +6364,8 @@ else
   if test "$ac_cv_type_long_long" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long_long=0
    fi
@@ -6451,7 +6388,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
 $as_echo_n "checking size of float... " >&6; }
-if test "${ac_cv_sizeof_float+set}" = set; then :
+if ${ac_cv_sizeof_float+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float"        "$ac_includes_default"; then :
@@ -6460,9 +6397,8 @@ else
   if test "$ac_cv_type_float" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (float)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (float)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_float=0
    fi
@@ -6485,7 +6421,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
 $as_echo_n "checking size of double... " >&6; }
-if test "${ac_cv_sizeof_double+set}" = set; then :
+if ${ac_cv_sizeof_double+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double"        "$ac_includes_default"; then :
@@ -6494,9 +6430,8 @@ else
   if test "$ac_cv_type_double" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (double)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (double)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_double=0
    fi
@@ -6519,7 +6454,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
 $as_echo_n "checking size of long double... " >&6; }
-if test "${ac_cv_sizeof_long_double+set}" = set; then :
+if ${ac_cv_sizeof_long_double+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double"        "$ac_includes_default"; then :
@@ -6528,9 +6463,8 @@ else
   if test "$ac_cv_type_long_double" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long double)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long double)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long_double=0
    fi
@@ -6553,7 +6487,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
 $as_echo_n "checking size of char *... " >&6; }
-if test "${ac_cv_sizeof_char_p+set}" = set; then :
+if ${ac_cv_sizeof_char_p+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
@@ -6562,9 +6496,8 @@ else
   if test "$ac_cv_type_char_p" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (char *)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (char *)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_char_p=0
    fi
@@ -6587,7 +6520,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
 $as_echo_n "checking size of void *... " >&6; }
-if test "${ac_cv_sizeof_void_p+set}" = set; then :
+if ${ac_cv_sizeof_void_p+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
@@ -6596,9 +6529,8 @@ else
   if test "$ac_cv_type_void_p" = yes; then
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (void *)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_void_p=0
    fi
@@ -6631,7 +6563,7 @@ ac_install_sh="$TOP/$ac_install_sh"
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -6639,7 +6571,7 @@ SHELL = /bin/sh
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -6677,7 +6609,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then :
+if ${ac_cv_prog_YACC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$YACC"; then
@@ -6721,7 +6653,7 @@ test -n "$YACC" || YACC="yacc"
 set dummy htmldoc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HTMLDOC+set}" = set; then :
+if ${ac_cv_path_HTMLDOC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $HTMLDOC in
@@ -6772,7 +6704,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LEX+set}" = set; then :
+if ${ac_cv_prog_LEX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LEX"; then
@@ -6842,7 +6774,7 @@ $as_echo "$ac_try_echo"; } >&5
   test $ac_status = 0; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
 $as_echo_n "checking lex output file root... " >&6; }
-if test "${ac_cv_prog_lex_root+set}" = set; then :
+if ${ac_cv_prog_lex_root+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -6851,7 +6783,7 @@ if test -f lex.yy.c; then
 elif test -f lexyy.c; then
   ac_cv_prog_lex_root=lexyy
 else
-  as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5
+  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
 fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
@@ -6861,7 +6793,7 @@ LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
 if test -z "${LEXLIB+set}"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
 $as_echo_n "checking lex library... " >&6; }
-if test "${ac_cv_lib_lex+set}" = set; then :
+if ${ac_cv_lib_lex+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -6891,7 +6823,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
 $as_echo_n "checking whether yytext is a pointer... " >&6; }
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then :
+if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # POSIX says lex can declare yytext either as a pointer or an array; the
@@ -6902,7 +6834,8 @@ ac_save_LIBS=$LIBS
 LIBS="$LEXLIB $ac_save_LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#define YYTEXT_POINTER 1
+
+  #define YYTEXT_POINTER 1
 `cat $LEX_OUTPUT_ROOT.c`
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
@@ -6931,7 +6864,7 @@ fi
 set dummy flex; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_FLEX+set}" = set; then :
+if ${ac_cv_path_FLEX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $FLEX in
@@ -6972,7 +6905,7 @@ fi
 set dummy gawk; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GAWK+set}" = set; then :
+if ${ac_cv_path_GAWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GAWK in
@@ -7013,7 +6946,7 @@ fi
 set dummy gperf; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GPERF+set}" = set; then :
+if ${ac_cv_path_GPERF+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GPERF in
@@ -7054,7 +6987,7 @@ fi
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then :
+if ${ac_cv_path_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PERL in
@@ -7095,7 +7028,7 @@ fi
 set dummy python; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PYTHON+set}" = set; then :
+if ${ac_cv_path_PYTHON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PYTHON in
@@ -7136,7 +7069,7 @@ fi
 set dummy ruby; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_RUBY+set}" = set; then :
+if ${ac_cv_path_RUBY+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $RUBY in
@@ -7188,8 +7121,8 @@ esac
 
 
 
-macro_version='2.2.6b'
-macro_revision='1.3017'
+macro_version='2.4'
+macro_revision='1.3293'
 
 
 
@@ -7205,9 +7138,26 @@ macro_revision='1.3017'
 
 ltmain="$ac_aux_dir/ltmain.sh"
 
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
+if ${lt_cv_path_NM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
@@ -7260,14 +7210,17 @@ if test "$lt_cv_path_NM" != "no"; then
   NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in dumpbin "link -dump"
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DUMPBIN"; then
@@ -7305,13 +7258,13 @@ fi
 fi
 if test -z "$DUMPBIN"; then
   ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  for ac_prog in dumpbin "link -dump"
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DUMPBIN"; then
@@ -7360,6 +7313,15 @@ esac
   fi
 fi
 
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
 
   if test "$DUMPBIN" != ":"; then
     NM="$DUMPBIN"
@@ -7374,18 +7336,18 @@ test -z "$NM" && NM=nm
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
+if ${lt_cv_nm_interface+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:7382: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:7385: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:7388: output\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -7398,7 +7360,7 @@ $as_echo "$lt_cv_nm_interface" >&6; }
 # find the maximum length of command line arguments
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
@@ -7431,6 +7393,11 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -7495,8 +7462,8 @@ else
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
 	      test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
@@ -7538,8 +7505,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
 # Try some XSI features
 xsi_shell=no
 ( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
     && eval 'test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
@@ -7588,9 +7555,83 @@ esac
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
 $as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_reload_flag='-r'
@@ -7604,6 +7645,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -7626,7 +7672,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OBJDUMP"; then
@@ -7666,7 +7712,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
 set dummy objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OBJDUMP"; then
@@ -7725,7 +7771,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -7767,16 +7813,18 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -7806,6 +7854,10 @@ gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 hpux10.20* | hpux11*)
   lt_cv_file_magic_cmd=/usr/bin/file
   case $host_cpu in
@@ -7814,11 +7866,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -7840,7 +7892,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -7921,6 +7973,21 @@ esac
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
 $as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -7936,16 +8003,26 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+
+
+
+
+
+
+
+
+
+
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_DLLTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -7954,7 +8031,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -7964,10 +8041,10 @@ IFS=$as_save_IFS
 
 fi
 fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -7975,17 +8052,17 @@ fi
 
 
 fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -7994,7 +8071,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8004,17 +8081,17 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -8022,35 +8099,73 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    AR=$ac_ct_AR
+    DLLTOOL=$ac_ct_DLLTOOL
   fi
 else
-  AR="$ac_cv_prog_AR"
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
 fi
 
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
 
 
 
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
 
 
 
 
 
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -8059,7 +8174,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -8069,28 +8184,197 @@ IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
+    test -n "$AR" && break
+  done
 fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -8145,7 +8429,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -8185,7 +8469,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -8256,6 +8540,18 @@ if test -n "$RANLIB"; then
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
 
 
 
@@ -8302,7 +8598,7 @@ compiler=$CC
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8363,8 +8659,8 @@ esac
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -8400,6 +8696,7 @@ for ac_symprfx in "" "_"; do
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -8425,8 +8722,8 @@ _LT_EOF
   test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "$nlist"; then
@@ -8441,6 +8738,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -8452,7 +8761,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -8478,8 +8787,8 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
 	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
@@ -8489,8 +8798,8 @@ _LT_EOF
   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&5
 	fi
@@ -8527,6 +8836,18 @@ else
 $as_echo "ok" >&6; }
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
+
 
 
 
@@ -8548,6 +8869,43 @@ fi
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
 # Check whether --enable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then :
   enableval=$enable_libtool_lock;
@@ -8579,7 +8937,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 8582 "configure"' > conftest.$ac_ext
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8673,7 +9031,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=c
@@ -8741,6 +9099,123 @@ esac
 
 need_locks="$enable_libtool_lock"
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
+
 
   case $host_os in
     rhapsody* | darwin*)
@@ -8749,7 +9224,7 @@ need_locks="$enable_libtool_lock"
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DSYMUTIL"; then
@@ -8789,7 +9264,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
 set dummy dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DSYMUTIL"; then
@@ -8841,7 +9316,7 @@ fi
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NMEDIT"; then
@@ -8881,7 +9356,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then
 set dummy nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_NMEDIT"; then
@@ -8933,7 +9408,7 @@ fi
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
+if ${ac_cv_prog_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LIPO"; then
@@ -8973,7 +9448,7 @@ if test -z "$ac_cv_prog_LIPO"; then
 set dummy lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_LIPO"; then
@@ -9025,7 +9500,7 @@ fi
 set dummy ${ac_tool_prefix}otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
+if ${ac_cv_prog_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL"; then
@@ -9065,7 +9540,7 @@ if test -z "$ac_cv_prog_OTOOL"; then
 set dummy otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL"; then
@@ -9117,7 +9592,7 @@ fi
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL64"; then
@@ -9157,7 +9632,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then
 set dummy otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL64"; then
@@ -9232,7 +9707,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
 $as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
@@ -9261,7 +9736,7 @@ fi
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
@@ -9291,6 +9766,38 @@ rm -f core conftest.err conftest.$ac_objext \
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -9318,7 +9825,7 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -9330,7 +9837,7 @@ for ac_header in dlfcn.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
 "
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DLFCN_H 1
 _ACEOF
@@ -9341,6 +9848,8 @@ done
 
 
 
+
+
 # Set options
 
 
@@ -9493,6 +10002,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -9514,7 +10024,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -f .libs 2>/dev/null
@@ -9542,19 +10052,6 @@ _ACEOF
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
@@ -9567,23 +10064,6 @@ aix3*)
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
@@ -9612,7 +10092,7 @@ for cc_temp in $compiler""; do
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
 
 # Only perform the check for file, if the check method requires it
@@ -9622,7 +10102,7 @@ file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -9688,7 +10168,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
 $as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -9821,11 +10301,16 @@ if test -n "$compiler"; then
 lt_prog_compiler_no_builtin_flag=
 
 if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_rtti_exceptions=no
@@ -9841,15 +10326,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9844: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9848: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_rtti_exceptions=yes
@@ -9878,8 +10363,6 @@ fi
 lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
   if test "$GCC" = yes; then
     lt_prog_compiler_wl='-Wl,'
@@ -9927,6 +10410,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -9969,6 +10458,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl='-Xlinker '
+      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
@@ -10010,7 +10506,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -10031,7 +10527,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	lt_prog_compiler_pic='--shared'
 	lt_prog_compiler_static='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	lt_prog_compiler_wl='-Wl,'
@@ -10043,25 +10545,25 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	lt_prog_compiler_wl='-Wl,'
 	lt_prog_compiler_pic='-qpic'
 	lt_prog_compiler_static='-qstaticlink'
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
+	*Sun\ F* | *Sun*Fortran*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_wl=''
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	*Sun\ C*)
+	  # Sun C 5.9
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl=''
+	  lt_prog_compiler_wl='-Wl,'
 	  ;;
 	esac
 	;;
@@ -10093,7 +10595,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-KPIC'
       lt_prog_compiler_static='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	lt_prog_compiler_wl='-Qoption ld ';;
       *)
 	lt_prog_compiler_wl='-Wl,';;
@@ -10150,13 +10652,17 @@ case $host_os in
     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
@@ -10164,7 +10670,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; }
 if test -n "$lt_prog_compiler_pic"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works=no
@@ -10180,15 +10686,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10183: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:10187: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works=yes
@@ -10217,13 +10723,18 @@ fi
 
 
 
+
+
+
+
+
 #
 # Check to make sure the static flag actually works.
 #
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
@@ -10236,7 +10747,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works=yes
@@ -10266,7 +10777,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -10285,16 +10796,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10288: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:10292: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -10321,7 +10832,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -10340,16 +10851,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10343: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:10347: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -10462,7 +10973,33 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   esac
 
   ld_shlibs=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
   if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
@@ -10480,6 +11017,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     fi
     supports_anon_versioning=no
     case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -10495,11 +11033,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -10535,10 +11074,12 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
+      export_dynamic_flag_spec='${wl}--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -10556,6 +11097,11 @@ _LT_EOF
       fi
       ;;
 
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
@@ -10571,7 +11117,7 @@ _LT_EOF
       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
@@ -10581,15 +11127,16 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 	 && test "$tmp_diet" = no
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -10600,13 +11147,17 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec=
 	  tmp_sharedflag='--shared' ;;
-	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  compiler_needs_object=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
@@ -10622,17 +11173,17 @@ _LT_EOF
         fi
 
 	case $cc_basename in
-	xlf*)
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
 	  hardcode_libdir_flag_spec=
 	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
-	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -10646,8 +11197,8 @@ _LT_EOF
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -10665,8 +11216,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -10712,8 +11263,8 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -10753,8 +11304,10 @@ _LT_EOF
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
 	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
@@ -10841,7 +11394,13 @@ _LT_EOF
 	allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -10854,25 +11413,32 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
 	if test "$host_cpu" = ia64; then
 	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
@@ -10881,7 +11447,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	 if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -10894,30 +11466,42 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
 	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
 	  no_undefined_flag=' ${wl}-bernotok'
 	  allow_undefined_flag=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec='$convenience'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec='$convenience'
+	  fi
 	  archive_cmds_need_lc=yes
 	  # This is similar to how AIX traditionally builds its shared libraries.
 	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
@@ -10949,20 +11533,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	old_postinstall_cmds='chmod 644 $oldlib'
+	postlink_cmds='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	old_archive_from_new_cmds='true'
+	# FIXME: Should let the user specify the lib program.
+	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	enable_shared_with_static_runtimes=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -10972,7 +11599,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    whole_archive_flag_spec=''
+  fi
   link_all_deplibs=yes
   allow_undefined_flag="$_lt_dar_allow_undefined"
   case $cc_basename in
@@ -10980,7 +11611,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    output_verbose_link_cmd=func_echo_all
     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
     archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
@@ -11023,7 +11654,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       hardcode_shlibpath_var=no
@@ -11031,7 +11662,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     hpux9*)
       if test "$GCC" = yes; then
-	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
 	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
@@ -11046,8 +11677,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -11065,16 +11696,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
 	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
@@ -11086,7 +11717,46 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler__b=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS -b"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler__b=yes
+       fi
+     else
+       lt_cv_prog_compiler__b=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
 	  ;;
 	esac
       fi
@@ -11114,26 +11784,39 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	# This should be the same for all languages, so no per-tag cache variable.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int foo(void) {}
+int foo (void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
       else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
@@ -11195,17 +11878,17 @@ rm -f core conftest.err conftest.$ac_objext \
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
 	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
@@ -11215,13 +11898,13 @@ rm -f core conftest.err conftest.$ac_objext \
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
 	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec='-rpath $libdir'
@@ -11234,9 +11917,9 @@ rm -f core conftest.err conftest.$ac_objext \
       no_undefined_flag=' -z defs'
       if test "$GCC" = yes; then
 	wlarc='${wl}'
-	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
@@ -11424,44 +12107,50 @@ x|xyes)
       # to ld, don't add -lc before -lgcc.
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-	pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl
+	  pic_flag=$lt_prog_compiler_pic
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag
+	  allow_undefined_flag=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-        then
-	  archive_cmds_need_lc=no
-        else
-	  archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
+	  then
+	    lt_cv_archive_cmds_need_lc=no
+	  else
+	    lt_cv_archive_cmds_need_lc=yes
+	  fi
+	  allow_undefined_flag=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
       ;;
     esac
   fi
@@ -11632,16 +12321,23 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
   # and add multilib dir if necessary.
   lt_tmp_lt_search_path_spec=
@@ -11654,7 +12350,7 @@ if test "$GCC" = yes; then
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -11674,7 +12370,13 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[lt_foo]++; }
   if (lt_freq[lt_foo] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
@@ -11762,7 +12464,7 @@ amigaos*)
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
@@ -11793,8 +12495,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
@@ -11815,36 +12518,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
+    # Assume MSVC wrapper
     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -11931,6 +12681,19 @@ gnu*)
   hardcode_into_libs=yes
   ;;
 
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
 hpux9* | hpux10* | hpux11*)
   # Give a soname corresponding to the major version so that dld.sl refuses to
   # link against other versions.
@@ -11973,8 +12736,10 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
@@ -12032,7 +12797,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -12041,12 +12806,17 @@ linux* | k*bsd*-gnu)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -12059,13 +12829,17 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
@@ -12077,8 +12851,9 @@ rm -f core conftest.err conftest.$ac_objext \
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -12380,6 +13155,11 @@ fi
 
 
 
+
+
+
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
@@ -12452,7 +13232,7 @@ else
   # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -12486,7 +13266,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
@@ -12500,12 +13280,12 @@ fi
 
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+if test "x$ac_cv_func_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -12539,16 +13319,16 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -12582,12 +13362,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -12621,12 +13401,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -12660,7 +13440,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
 
@@ -12701,7 +13481,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   	  if test "$cross_compiling" = yes; then :
@@ -12710,7 +13490,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12713 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12751,7 +13531,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -12760,7 +13546,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -12797,7 +13587,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; }
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   	  if test "$cross_compiling" = yes; then :
@@ -12806,7 +13596,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12809 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12847,7 +13637,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -12856,7 +13652,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -13051,7 +13851,7 @@ esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13165,7 +13965,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$as_ac_Header+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13192,8 +13992,7 @@ fi
 eval ac_res=\$$as_ac_Header
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
 _ACEOF
@@ -13206,7 +14005,7 @@ done
 if test $ac_header_dirent = dirent.h; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
 $as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -13240,11 +14039,11 @@ for ac_lib in '' dir; do
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
+  if ${ac_cv_search_opendir+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
 
 else
   ac_cv_search_opendir=no
@@ -13263,7 +14062,7 @@ fi
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
 $as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -13297,11 +14096,11 @@ for ac_lib in '' x; do
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
+  if ${ac_cv_search_opendir+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_opendir+set}" = set; then :
+if ${ac_cv_search_opendir+:} false; then :
 
 else
   ac_cv_search_opendir=no
@@ -13320,7 +14119,7 @@ fi
 fi
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
-if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
+if ${ac_cv_header_sys_types_h_makedev+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13348,7 +14147,7 @@ $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
 
 if test $ac_cv_header_sys_types_h_makedev = no; then
 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
+if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
 
 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
 
@@ -13358,7 +14157,7 @@ fi
 
   if test $ac_cv_header_sys_mkdev_h = no; then
     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
+if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
 
 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
 
@@ -13370,7 +14169,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if test "${ac_cv_header_stat_broken+set}" = set; then :
+if ${ac_cv_header_stat_broken+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13411,7 +14210,7 @@ $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
 fi
  			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+if ${ac_cv_header_time+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13445,7 +14244,7 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 fi
  			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then :
+if ${ac_cv_header_sys_wait_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13492,8 +14291,7 @@ for ac_header in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -13511,7 +14309,7 @@ done
 ##########################################################################
 
 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-if test "x$ac_cv_type_mode_t" = x""yes; then :
+if test "x$ac_cv_type_mode_t" = xyes; then :
 
 else
 
@@ -13522,7 +14320,7 @@ _ACEOF
 fi
 
 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = x""yes; then :
+if test "x$ac_cv_type_off_t" = xyes; then :
 
 else
 
@@ -13533,7 +14331,7 @@ _ACEOF
 fi
 
 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = x""yes; then :
+if test "x$ac_cv_type_pid_t" = xyes; then :
 
 else
 
@@ -13544,7 +14342,7 @@ _ACEOF
 fi
  		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
 $as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
+if ${ac_cv_type_signal+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13575,7 +14373,7 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 		ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
 
 else
 
@@ -13586,7 +14384,7 @@ _ACEOF
 fi
  		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if test "${ac_cv_type_uid_t+set}" = set; then :
+if ${ac_cv_type_uid_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13623,7 +14421,7 @@ fi
 ##########################################################################
 
 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
@@ -13636,7 +14434,7 @@ fi
 
 
 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
@@ -13656,7 +14454,7 @@ fi
 
 
 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_RDEV 1
@@ -13670,7 +14468,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if test "${ac_cv_struct_tm+set}" = set; then :
+if ${ac_cv_struct_tm+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13704,7 +14502,7 @@ $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
 fi
 
 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_PTRDIFF_T 1
@@ -13727,7 +14525,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5
 $as_echo_n "checking for tm_gmtoff in struct tm... " >&6; }
-if test "${ac_cv_struct_tm_gmtoff+set}" = set; then :
+if ${ac_cv_struct_tm_gmtoff+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13759,7 +14557,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_tzadj in struct tm" >&5
 $as_echo_n "checking for tm_tzadj in struct tm... " >&6; }
-if test "${ac_cv_struct_tm_tzadj+set}" = set; then :
+if ${ac_cv_struct_tm_tzadj+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13806,7 +14604,7 @@ if test "$ac_sys_system" != IRIX
 then
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
 $as_echo_n "checking for t_open in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
+if ${ac_cv_lib_nsl_t_open+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13840,13 +14638,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
 $as_echo "$ac_cv_lib_nsl_t_open" >&6; }
-if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
+if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
   VLIBS="-lnsl $VLIBS"
 fi
  # SVR4
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -linet" >&5
 $as_echo_n "checking for gethostbyname in -linet... " >&6; }
-if test "${ac_cv_lib_inet_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_inet_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13880,13 +14678,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_gethostbyname" >&5
 $as_echo "$ac_cv_lib_inet_gethostbyname" >&6; }
-if test "x$ac_cv_lib_inet_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_inet_gethostbyname" = xyes; then :
   VLIBS="-linet $VLIBS"
 fi
  # Sequent
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
 $as_echo_n "checking for socket in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_socket+set}" = set; then :
+if ${ac_cv_lib_socket_socket+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13920,14 +14718,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
 $as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = x""yes; then :
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
   VLIBS="-lsocket $VLIBS"
 fi
  # SVR4 sockets
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
 $as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
+if ${ac_cv_lib_m_cos+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -13961,7 +14759,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
 $as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
+if test "x$ac_cv_lib_m_cos" = xyes; then :
   VLIBS="-lm $VLIBS"
 fi
  # complex math
@@ -13978,7 +14776,7 @@ fi
 #AC_FUNC_GETPGRP
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
 $as_echo_n "checking for working memcmp... " >&6; }
-if test "${ac_cv_func_memcmp_working+set}" = set; then :
+if ${ac_cv_func_memcmp_working+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
@@ -14039,7 +14837,7 @@ esac
 
 
 #AC_FUNC_MMAP
-if test "${ac_cv_func_setvbuf_reversed+set}" = set; then :
+if ${ac_cv_func_setvbuf_reversed+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_func_setvbuf_reversed=no
@@ -14054,7 +14852,7 @@ fi
 for ac_header in unistd.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
-if test "x$ac_cv_header_unistd_h" = x""yes; then :
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_UNISTD_H 1
 _ACEOF
@@ -14065,7 +14863,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
 $as_echo_n "checking for working chown... " >&6; }
-if test "${ac_cv_func_chown_works+set}" = set; then :
+if ${ac_cv_func_chown_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
@@ -14117,7 +14915,7 @@ $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
 fi
 
 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
@@ -14130,7 +14928,7 @@ _ACEOF
 for ac_func in strerror_r
 do :
   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-if test "x$ac_cv_func_strerror_r" = x""yes; then :
+if test "x$ac_cv_func_strerror_r" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STRERROR_R 1
 _ACEOF
@@ -14140,7 +14938,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
+if ${ac_cv_func_strerror_r_char_p+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -14219,8 +15017,7 @@ for ac_func in getpagesize gettimeofday strtok_r ftruncate fchmod fsync ftime lo
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14232,8 +15029,7 @@ for ac_func in snprintf vsnprintf
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14245,8 +15041,7 @@ for ac_func in wcsdup wcscasecmp wcsicmp
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14258,8 +15053,7 @@ for ac_func in wcscmp wcslen wcsncat wcsnicmp wcsncasecmp wcsncmp wcscpy iswspac
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14271,8 +15065,7 @@ for ac_func in wprintf fputws putwc swprintf fwprintf swscanf fgetws putwchar pu
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14283,7 +15076,7 @@ done
 for ac_func in wgetenv
 do :
   ac_fn_c_check_func "$LINENO" "wgetenv" "ac_cv_func_wgetenv"
-if test "x$ac_cv_func_wgetenv" = x""yes; then :
+if test "x$ac_cv_func_wgetenv" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_WGETENV 1
 _ACEOF
@@ -14295,8 +15088,7 @@ for ac_func in wgetpass wgetpassphrase
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14309,8 +15101,7 @@ for ac_func in getpwnam getgrnam chmod getpwuid getgrgid setuid
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14322,8 +15113,7 @@ for ac_func in putenv setenv
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14334,7 +15124,7 @@ done
 for ac_func in strerror
 do :
   ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
-if test "x$ac_cv_func_strerror" = x""yes; then :
+if test "x$ac_cv_func_strerror" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STRERROR 1
 _ACEOF
@@ -14345,7 +15135,7 @@ done
 for ac_func in strdup
 do :
   ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
-if test "x$ac_cv_func_strdup" = x""yes; then :
+if test "x$ac_cv_func_strdup" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STRDUP 1
 _ACEOF
@@ -14356,7 +15146,7 @@ done
 for ac_func in getrusage
 do :
   ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
-if test "x$ac_cv_func_getrusage" = x""yes; then :
+if test "x$ac_cv_func_getrusage" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GETRUSAGE 1
 _ACEOF
@@ -14368,8 +15158,7 @@ for ac_func in memmove memmem memcpy
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -14415,7 +15204,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
 $as_echo_n "checking whether va_copy exists... " >&6; }
-if test "${ac_cv_have_va_copy+set}" = set; then :
+if ${ac_cv_have_va_copy+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -14451,7 +15240,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
 $as_echo_n "checking whether __va_copy exists... " >&6; }
-if test "${ac_cv_have___va_copy+set}" = set; then :
+if ${ac_cv_have___va_copy+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -14531,7 +15320,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
 $as_echo_n "checking whether #! works in shell scripts... " >&6; }
-if test "${ac_cv_sys_interpreter+set}" = set; then :
+if ${ac_cv_sys_interpreter+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   echo '#! /bin/cat
@@ -14552,7 +15341,7 @@ interpval=$ac_cv_sys_interpreter
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
 $as_echo_n "checking for long file names... " >&6; }
-if test "${ac_cv_sys_long_file_names+set}" = set; then :
+if ${ac_cv_sys_long_file_names+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_sys_long_file_names=yes
@@ -14592,14 +15381,14 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for restartable system calls" >&5
 $as_echo_n "checking for restartable system calls... " >&6; }
-if test "${ac_cv_sys_restartable_syscalls+set}" = set; then :
+if ${ac_cv_sys_restartable_syscalls+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -14770,8 +15559,8 @@ if test "${enable_xml+set}" = set; then :
   enableval=$enable_xml;
      case "${enableval}" in
        yes)	with_xml="yes";;
-       no)	as_fn_error "Xml extension required for Virtuoso" "$LINENO" 5 ;;
-       *)	as_fn_error "bad value ${enableval} for --enable-xml" "$LINENO" 5 ;;
+       no)	as_fn_error $? "Xml extension required for Virtuoso" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-xml" "$LINENO" 5 ;;
      esac
 
 else
@@ -14805,7 +15594,7 @@ if test "${enable_krb+set}" = set; then :
        yes)	with_krb="yes";;
        no)	with_krb="no";;
        /*)	with_krb="${enableval}";;
-       *)	as_fn_error "bad value ${enableval} for --disable-krb" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-krb" "$LINENO" 5 ;;
      esac
 
 else
@@ -14823,7 +15612,7 @@ if test "$with_krb" != "no"; then
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
-if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
+if ${ac_cv_lib_krb5_krb5_init_context+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -14857,7 +15646,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
-if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
+if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then :
 
 		  with_krb="yes"
 
@@ -14876,8 +15665,7 @@ if test "$with_krb" != "no"; then
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -14925,9 +15713,9 @@ if test "${enable_openssl+set}" = set; then :
   enableval=$enable_openssl;
      case "${enableval}" in
        yes)	openssl_dir="/usr" ;;
-       no)	as_fn_error "OpenSSL required for Virtuoso" "$LINENO" 5 ;;
+       no)	as_fn_error $? "OpenSSL required for Virtuoso" "$LINENO" 5 ;;
        /*)	openssl_dir="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --disable-openssl" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-openssl" "$LINENO" 5 ;;
      esac
 
 else
@@ -15026,7 +15814,7 @@ $as_echo "good" >&6; }
 
 else
 
- as_fn_error "bad. Check config.log for details" "$LINENO" 5
+ as_fn_error $? "bad. Check config.log for details" "$LINENO" 5
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -15036,8 +15824,8 @@ $as_echo_n "checking version and usability of the OpenSSL lib in ${openssl_dir}.
 if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15102,7 +15890,7 @@ $as_echo "#define _SSL 1" >>confdefs.h
 
 else
 
- as_fn_error "bad. Check config.log for details" "$LINENO" 5
+ as_fn_error $? "bad. Check config.log for details" "$LINENO" 5
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -15127,7 +15915,7 @@ if test "${enable_openldap+set}" = set; then :
        yes)	with_ldap="yes" ;;
        no)	with_ldap="no" ;;
        /*)	with_ldap="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --disable-openldap" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-openldap" "$LINENO" 5 ;;
      esac
 
 else
@@ -15160,8 +15948,8 @@ $as_echo_n "checking OpenLDAP library usability... " >&6; }
     if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15229,7 +16017,7 @@ if test "${enable_imsg+set}" = set; then :
      case "${enableval}" in
        yes)	with_imsg="yes";;
        no)	with_imsg="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-imsg" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-imsg" "$LINENO" 5 ;;
      esac
 
 else
@@ -15265,7 +16053,7 @@ if test "${enable_pldebug+set}" = set; then :
      case "${enableval}" in
        yes)	with_pldebug="yes" ;;
        no)	with_pldebug="no" ;;
-       *)	as_fn_error "bad value ${enableval} for --enable-pldebug" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-pldebug" "$LINENO" 5 ;;
      esac
 
 else
@@ -15305,7 +16093,7 @@ if test "${enable_rendezvous+set}" = set; then :
        yes)	with_rvous="yes" ;;
        no)	with_rvous="no" ;;
        /*)	with_rvous="yes"; with_rvous_dir="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --enable-rendezvous" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-rendezvous" "$LINENO" 5 ;;
      esac
 
 else
@@ -15344,7 +16132,7 @@ if test "${enable_php5+set}" = set; then :
        yes)	with_php5="yes" ;;
        no)	with_php5="no" ;;
        /*)	with_php5="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --enable-php5" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-php5" "$LINENO" 5 ;;
      esac
 
 else
@@ -15377,8 +16165,8 @@ $as_echo_n "checking libphp5 library usability... " >&6; }
     if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15479,7 +16267,7 @@ fi
 set dummy xml2-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XML2_CONFIG+set}" = set; then :
+if ${ac_cv_path_XML2_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $XML2_CONFIG in
@@ -15710,7 +16498,7 @@ if test "${enable_mono+set}" = set; then :
      case "${enableval}" in
        yes)	have_mono="yes" ;;
        no)	have_mono="no" ;;
-       *)	as_fn_error "bad value ${enableval} for --disable-mono" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-mono" "$LINENO" 5 ;;
      esac
 
 else
@@ -15726,7 +16514,7 @@ then
 set dummy wget; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_WGET+set}" = set; then :
+if ${ac_cv_path_WGET+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $WGET in
@@ -15786,7 +16574,7 @@ if test "${enable_hslookup+set}" = set; then :
        yes)	with_hsl="yes" ;;
        no)	with_hsl="no" ;;
        /*)	with_hsl="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --disable-hslookup" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-hslookup" "$LINENO" 5 ;;
      esac
 
 else
@@ -15801,7 +16589,7 @@ then
 set dummy hslookup; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HS_LOOKUP+set}" = set; then :
+if ${ac_cv_path_HS_LOOKUP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $HS_LOOKUP in
@@ -15876,8 +16664,8 @@ $as_echo_n "checking hslookup library usability... " >&6; }
     if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -15945,7 +16733,7 @@ if test "${enable_imagemagick+set}" = set; then :
        yes)	with_im="yes" ;;
        no)	with_im="no" ;;
        /*)	with_im="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --disable-imagemagick" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-imagemagick" "$LINENO" 5 ;;
      esac
 
 else
@@ -15960,7 +16748,7 @@ then
 set dummy Wand-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_IM_CONFIG+set}" = set; then :
+if ${ac_cv_path_IM_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $IM_CONFIG in
@@ -16029,8 +16817,8 @@ $as_echo_n "checking ImageMagick library usability... " >&6; }
     if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -16097,7 +16885,7 @@ if test "${enable_wbxml2+set}" = set; then :
        yes)	with_wbxml2="yes" ;;
        no)	with_wbxml2="no" ;;
        /*)	with_wbxml2="${enableval}" ;;
-       *)	as_fn_error "bad value ${enableval} for --disable-wbxml2" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --disable-wbxml2" "$LINENO" 5 ;;
      esac
 
 else
@@ -16132,8 +16920,8 @@ $as_echo_n "checking WBXML2 library usability... " >&6; }
     if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -16195,7 +16983,7 @@ if test "${enable_perl+set}" = set; then :
      case "${enableval}" in
        yes)	with_perl="yes" ;;
        no)	with_perl="no" ;;
-       *)	as_fn_error "bad value ${enableval} for --enable-perl" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-perl" "$LINENO" 5 ;;
      esac
 
 else
@@ -16232,7 +17020,7 @@ if test "${enable_python+set}" = set; then :
      case "${enableval}" in
        yes)	with_python="yes";;
        no)	with_python="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-python" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-python" "$LINENO" 5 ;;
      esac
 
 else
@@ -16278,7 +17066,7 @@ if test "${enable_ruby+set}" = set; then :
      case "${enableval}" in
        yes)	with_ruby="yes";;
        no)	with_ruby="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-ruby" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-ruby" "$LINENO" 5 ;;
      esac
 
 else
@@ -16301,8 +17089,8 @@ $as_echo_n "checking Ruby library usability... " >&6; }
     if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -16362,7 +17150,7 @@ if test "${with_internal_zlib+set}" = set; then :
      case "${withval}" in
        yes)	with_zlib="internal";;
        no)	with_zlib="external";;
-       *)	as_fn_error "bad value ${withval} for --enable-zlib" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${withval} for --enable-zlib" "$LINENO" 5 ;;
      esac
 
 else
@@ -16374,14 +17162,14 @@ fi
 if test "x$with_zlib" != "xinternal"
 then
     ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = x""yes; then :
+if test "x$ac_cv_header_zlib_h" = xyes; then :
 
 fi
 
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5
 $as_echo_n "checking for main in -lz... " >&6; }
-if test "${ac_cv_lib_z_main+set}" = set; then :
+if ${ac_cv_lib_z_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16409,7 +17197,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5
 $as_echo "$ac_cv_lib_z_main" >&6; }
-if test "x$ac_cv_lib_z_main" = x""yes; then :
+if test "x$ac_cv_lib_z_main" = xyes; then :
   with_zlib=yes
 else
   with_zlib=internal
@@ -16499,7 +17287,7 @@ fi
 if test $with_pthreads = "yes"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
 $as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
-if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
+if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16533,7 +17321,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
 $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
+if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
   BUILD_OPTS="$BUILD_OPTS pthreads"
 	WITH_PTHREADS="yes"
 	if test "$host_os" = "osf3.2"
@@ -16556,7 +17344,7 @@ $as_echo "#define WITH_PTHREADS 1" >>confdefs.h
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16590,7 +17378,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
   BUILD_OPTS="$BUILD_OPTS pthreads"
 	  WITH_PTHREADS="yes"
 	  LIBTHR="-lpthread"
@@ -16610,7 +17398,7 @@ if test "x$have_mono" = "xyes" ; then
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -16648,7 +17436,7 @@ fi
 
 
     if test "x$PKG_CONFIG" = "xno"; then
-	as_fn_error "You need to install pkg-config" "$LINENO" 5
+	as_fn_error $? "You need to install pkg-config" "$LINENO" 5
     fi
 
     BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
@@ -16678,7 +17466,7 @@ fi
 
     $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0
     if test $? -gt 0 ; then
-	as_fn_error "You need to install glib-2.0 version $GLIB_REQUIRED_VERSION or greater" "$LINENO" 5
+	as_fn_error $? "You need to install glib-2.0 version $GLIB_REQUIRED_VERSION or greater" "$LINENO" 5
     fi
 #    PKG_CHECK_MODULES_(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
 
@@ -16699,8 +17487,7 @@ for ac_func in pthread_attr_setstacksize pthread_attr_getstacksize pthread_sigma
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -16731,7 +17518,7 @@ if test "${enable_aio+set}" = set; then :
      case "${enableval}" in
        yes)	with_aio="yes" ;;
        no)	with_aio="no" ;;
-       *)	as_fn_error "bad value ${enableval} for --enable-aio" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-aio" "$LINENO" 5 ;;
      esac
 
 else
@@ -16747,8 +17534,7 @@ then
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -16759,7 +17545,7 @@ done
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aio_read in -lrt" >&5
 $as_echo_n "checking for aio_read in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_aio_read+set}" = set; then :
+if ${ac_cv_lib_rt_aio_read+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16793,7 +17579,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_aio_read" >&5
 $as_echo "$ac_cv_lib_rt_aio_read" >&6; }
-if test "x$ac_cv_lib_rt_aio_read" = x""yes; then :
+if test "x$ac_cv_lib_rt_aio_read" = xyes; then :
 
 	AIOLIB="-lrt"
 
@@ -16885,7 +17671,7 @@ $as_echo "$as_me: checking for -ledit that needs -ltermcap..." >&6;}
 	termcap=
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
 $as_echo_n "checking for tgetent in -ltermcap... " >&6; }
-if test "${ac_cv_lib_termcap_tgetent+set}" = set; then :
+if ${ac_cv_lib_termcap_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16919,13 +17705,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
 $as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
-if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
   termcap=termcap
 else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermlib" >&5
 $as_echo_n "checking for tgetent in -ltermlib... " >&6; }
-if test "${ac_cv_lib_termlib_tgetent+set}" = set; then :
+if ${ac_cv_lib_termlib_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16959,13 +17745,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_tgetent" >&5
 $as_echo "$ac_cv_lib_termlib_tgetent" >&6; }
-if test "x$ac_cv_lib_termlib_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_termlib_tgetent" = xyes; then :
   termcap=termlib
 else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
 $as_echo_n "checking for tgetent in -lcurses... " >&6; }
-if test "${ac_cv_lib_curses_tgetent+set}" = set; then :
+if ${ac_cv_lib_curses_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16999,13 +17785,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
 $as_echo "$ac_cv_lib_curses_tgetent" >&6; }
-if test "x$ac_cv_lib_curses_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
   termcap=curses
 else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
 $as_echo_n "checking for tgetent in -lncurses... " >&6; }
-if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then :
+if ${ac_cv_lib_ncurses_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17039,11 +17825,11 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
 $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
-if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
   termcap=ncurses
 else
 
-	as_fn_error "no working -ltermcap/termlib found -- do not use --with-editline" "$LINENO" 5
+	as_fn_error $? "no working -ltermcap/termlib found -- do not use --with-editline" "$LINENO" 5
 fi
 
 fi
@@ -17075,7 +17861,7 @@ $as_echo "yes" >&6; }
 
 else
 
-	   as_fn_error "no working editline library found -- do not use --with-editline" "$LINENO" 5
+	   as_fn_error $? "no working editline library found -- do not use --with-editline" "$LINENO" 5
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
@@ -17142,7 +17928,7 @@ $as_echo "$as_me: checking for -lreadline that needs -ltermcap..." >&6;}
 	termcap=
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
 $as_echo_n "checking for tgetent in -ltermcap... " >&6; }
-if test "${ac_cv_lib_termcap_tgetent+set}" = set; then :
+if ${ac_cv_lib_termcap_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17176,13 +17962,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
 $as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
-if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
   termcap=termcap
 else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermlib" >&5
 $as_echo_n "checking for tgetent in -ltermlib... " >&6; }
-if test "${ac_cv_lib_termlib_tgetent+set}" = set; then :
+if ${ac_cv_lib_termlib_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17216,13 +18002,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_tgetent" >&5
 $as_echo "$ac_cv_lib_termlib_tgetent" >&6; }
-if test "x$ac_cv_lib_termlib_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_termlib_tgetent" = xyes; then :
   termcap=termlib
 else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
 $as_echo_n "checking for tgetent in -lncurses... " >&6; }
-if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then :
+if ${ac_cv_lib_ncurses_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17256,13 +18042,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
 $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
-if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
   termcap=ncurses
 else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
 $as_echo_n "checking for tgetent in -lcurses... " >&6; }
-if test "${ac_cv_lib_curses_tgetent+set}" = set; then :
+if ${ac_cv_lib_curses_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17296,11 +18082,11 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
 $as_echo "$ac_cv_lib_curses_tgetent" >&6; }
-if test "x$ac_cv_lib_curses_tgetent" = x""yes; then :
+if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
   termcap=curses
 else
 
-	as_fn_error "no working -ltermcap/termlib found -- do not use --with-readline" "$LINENO" 5
+	as_fn_error $? "no working -ltermcap/termlib found -- do not use --with-readline" "$LINENO" 5
 fi
 
 fi
@@ -17331,7 +18117,7 @@ if ac_fn_c_try_link "$LINENO"; then :
 $as_echo "yes" >&6; }
 else
 
-	   as_fn_error "no working GNU readline library found -- do not use --with-readline" "$LINENO" 5
+	   as_fn_error $? "no working GNU readline library found -- do not use --with-readline" "$LINENO" 5
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
@@ -17361,12 +18147,12 @@ LIBS=$_save_LIBS
 
 LIBDL=""
 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
   LIBDL=""
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17400,7 +18186,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   LIBDL="-ldl"
 fi
 
@@ -17410,7 +18196,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17444,7 +18230,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
 
 $as_echo "#define HAVE_LIBDL 1" >>confdefs.h
 
@@ -17452,7 +18238,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17486,7 +18272,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
 
 $as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
 
@@ -17514,7 +18300,7 @@ if test "${with_iodbc+set}" = set; then :
 	  yes)	virt_do_iodbc="yes" ;;
 	  no)	virt_do_iodbc="no"  ;;
 	  /*)	virt_do_iodbc="yes" virt_iodbc_dir="${withval}" ;;
-	  *)	as_fn_error "\"Invalid value for the --with-iodbc : must be an absolute path\"" "$LINENO" 5 ;;
+	  *)	as_fn_error $? "\"Invalid value for the --with-iodbc : must be an absolute path\"" "$LINENO" 5 ;;
       esac
 
 else
@@ -17543,8 +18329,7 @@ then
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -17560,7 +18345,7 @@ done
     iodbc_LDFLAGS="-L$virt_iodbc_dir/lib -liodbc -liodbcinst $LIBDL"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLTables in -liodbc" >&5
 $as_echo_n "checking for SQLTables in -liodbc... " >&6; }
-if test "${ac_cv_lib_iodbc_SQLTables+set}" = set; then :
+if ${ac_cv_lib_iodbc_SQLTables+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17594,7 +18379,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLTables" >&5
 $as_echo "$ac_cv_lib_iodbc_SQLTables" >&6; }
-if test "x$ac_cv_lib_iodbc_SQLTables" = x""yes; then :
+if test "x$ac_cv_lib_iodbc_SQLTables" = xyes; then :
 
 		  virt_do_iodbc="yes"
 
@@ -17654,7 +18439,7 @@ if test "${with_jdk2+set}" = set; then :
   withval=$with_jdk2;
     case "${withval}" in
       yes)
-          as_fn_error "\"You need to specify a directory\"" "$LINENO" 5
+          as_fn_error $? "\"You need to specify a directory\"" "$LINENO" 5
 	  ;;
 
       no)
@@ -17665,7 +18450,7 @@ if test "${with_jdk2+set}" = set; then :
 	  if test -d "${withval}" ; then
 	      ac_jdk2_path="${withval}"
 	  else
-	      as_fn_error "\"Directory specified with --with-jdk2 does not exist\"" "$LINENO" 5
+	      as_fn_error $? "\"Directory specified with --with-jdk2 does not exist\"" "$LINENO" 5
 	  fi
 	  ;;
     esac
@@ -17680,7 +18465,7 @@ if test "${with_jdk3+set}" = set; then :
   withval=$with_jdk3;
     case "${withval}" in
       yes)
-          as_fn_error "\"You need to specify a directory\"" "$LINENO" 5
+          as_fn_error $? "\"You need to specify a directory\"" "$LINENO" 5
 	  ;;
 
       no)
@@ -17691,7 +18476,7 @@ if test "${with_jdk3+set}" = set; then :
 	  if test -d "${withval}" ; then
 	      ac_jdk3_path="${withval}"
 	  else
-	      as_fn_error "\"Directory specified with --with-jdk3 does not exist\"" "$LINENO" 5
+	      as_fn_error $? "\"Directory specified with --with-jdk3 does not exist\"" "$LINENO" 5
 	  fi
 	  ;;
     esac
@@ -17709,7 +18494,7 @@ if test "${with_jdk4+set}" = set; then :
   withval=$with_jdk4;
     case "${withval}" in
       yes)
-          as_fn_error "\"You need to specify a directory\"" "$LINENO" 5
+          as_fn_error $? "\"You need to specify a directory\"" "$LINENO" 5
 	  ;;
 
       no)
@@ -17720,7 +18505,7 @@ if test "${with_jdk4+set}" = set; then :
 	  if test -d "${withval}" ; then
 	      ac_jdk4_path="${withval}"
 	  else
-	      as_fn_error "\"Directory specified with --with-jdk4 does not exist\"" "$LINENO" 5
+	      as_fn_error $? "\"Directory specified with --with-jdk4 does not exist\"" "$LINENO" 5
 	  fi
 	  ;;
     esac
@@ -17755,13 +18540,13 @@ $as_echo_n "checking for working Java 1.$ac_jw_min_minor.x-1.$ac_jw_max_minor.x
   ac_java_ver_major=`echo $ac_java_version | cut -f 1 -d .`
   ac_java_ver_minor=`echo $ac_java_version | cut -f 2 -d .`
   if test "x$ac_java_ver_major" != "x1" -o "0$ac_java_ver_minor" -lt "0$ac_jw_min_minor" -o "0$ac_java_ver_minor" -gt "0$ac_jw_max_minor" ; then
-      as_fn_error "wrong version ($ac_java_ver_major.$ac_java_ver_minor)" "$LINENO" 5
+      as_fn_error $? "wrong version ($ac_java_ver_major.$ac_java_ver_minor)" "$LINENO" 5
   fi
   JAVA_TEST=Test.java
   CLASS_TEST=Test.class
   TEST=Test
     cat << \EOF > $JAVA_TEST
-/* [#]line 17764 "configure" */
+/* [#]line 18549 "configure" */
 public class Test {
 public static void main (String args[]) {
   System.exit (0);
@@ -17777,7 +18562,7 @@ EOF
   else
     echo "configure: failed program was:" >&5
     cat $JAVA_TEST >&5
-    as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
+    as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
   fi
   if { ac_try='$JAVA $JAVAFLAGS $TEST'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
@@ -17789,7 +18574,7 @@ EOF
   else
     echo "configure: failed program was:" >&5
     cat $JAVA_TEST >&5
-    as_fn_error "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
+    as_fn_error $? "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
   fi
   rm -fr $JAVA_TEST $CLASS_TEST Test.uue
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
@@ -17828,13 +18613,13 @@ $as_echo_n "checking for working Java 1.$ac_jw_min_minor.x-1.$ac_jw_max_minor.x
   ac_java_ver_major=`echo $ac_java_version | cut -f 1 -d .`
   ac_java_ver_minor=`echo $ac_java_version | cut -f 2 -d .`
   if test "x$ac_java_ver_major" != "x1" -o "0$ac_java_ver_minor" -lt "0$ac_jw_min_minor" -o "0$ac_java_ver_minor" -gt "0$ac_jw_max_minor" ; then
-      as_fn_error "wrong version ($ac_java_ver_major.$ac_java_ver_minor)" "$LINENO" 5
+      as_fn_error $? "wrong version ($ac_java_ver_major.$ac_java_ver_minor)" "$LINENO" 5
   fi
   JAVA_TEST=Test.java
   CLASS_TEST=Test.class
   TEST=Test
     cat << \EOF > $JAVA_TEST
-/* [#]line 17837 "configure" */
+/* [#]line 18622 "configure" */
 public class Test {
 public static void main (String args[]) {
   System.exit (0);
@@ -17850,7 +18635,7 @@ EOF
   else
     echo "configure: failed program was:" >&5
     cat $JAVA_TEST >&5
-    as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
+    as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
   fi
   if { ac_try='$JAVA $JAVAFLAGS $TEST'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
@@ -17862,7 +18647,7 @@ EOF
   else
     echo "configure: failed program was:" >&5
     cat $JAVA_TEST >&5
-    as_fn_error "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
+    as_fn_error $? "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
   fi
   rm -fr $JAVA_TEST $CLASS_TEST Test.uue
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
@@ -17901,13 +18686,13 @@ $as_echo_n "checking for working Java 1.$ac_jw_min_minor.x-1.$ac_jw_max_minor.x
   ac_java_ver_major=`echo $ac_java_version | cut -f 1 -d .`
   ac_java_ver_minor=`echo $ac_java_version | cut -f 2 -d .`
   if test "x$ac_java_ver_major" != "x1" -o "0$ac_java_ver_minor" -lt "0$ac_jw_min_minor" -o "0$ac_java_ver_minor" -gt "0$ac_jw_max_minor" ; then
-      as_fn_error "wrong version ($ac_java_ver_major.$ac_java_ver_minor)" "$LINENO" 5
+      as_fn_error $? "wrong version ($ac_java_ver_major.$ac_java_ver_minor)" "$LINENO" 5
   fi
   JAVA_TEST=Test.java
   CLASS_TEST=Test.class
   TEST=Test
     cat << \EOF > $JAVA_TEST
-/* [#]line 17910 "configure" */
+/* [#]line 18695 "configure" */
 public class Test {
 public static void main (String args[]) {
   System.exit (0);
@@ -17923,7 +18708,7 @@ EOF
   else
     echo "configure: failed program was:" >&5
     cat $JAVA_TEST >&5
-    as_fn_error "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
+    as_fn_error $? "The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
   fi
   if { ac_try='$JAVA $JAVAFLAGS $TEST'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
@@ -17935,7 +18720,7 @@ EOF
   else
     echo "configure: failed program was:" >&5
     cat $JAVA_TEST >&5
-    as_fn_error "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
+    as_fn_error $? "The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" "$LINENO" 5
   fi
   rm -fr $JAVA_TEST $CLASS_TEST Test.uue
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
@@ -17974,7 +18759,7 @@ if test "x$ac_integ_jdk" != "x" ; then
         	for ac_header in jni.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
-if test "x$ac_cv_header_jni_h" = x""yes; then :
+if test "x$ac_cv_header_jni_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JNI_H 1
 _ACEOF
@@ -17987,7 +18772,7 @@ done
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetDefaultJavaVMInitArgs in -ljvm" >&5
 $as_echo_n "checking for JNI_GetDefaultJavaVMInitArgs in -ljvm... " >&6; }
-if test "${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+set}" = set; then :
+if ${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18021,7 +18806,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&5
 $as_echo "$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&6; }
-if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = x""yes; then :
+if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = xyes; then :
    java_LDFLAGS="-L$ac_integ_jdk/jre/lib/amd64/server -R$ac_integ_jdk/jre/lib/amd64/server -ljvm"
 else
    ac_integ_jdk=""
@@ -18033,7 +18818,7 @@ fi
         	for ac_header in jni.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
-if test "x$ac_cv_header_jni_h" = x""yes; then :
+if test "x$ac_cv_header_jni_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JNI_H 1
 _ACEOF
@@ -18046,7 +18831,7 @@ done
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetDefaultJavaVMInitArgs in -ljvm" >&5
 $as_echo_n "checking for JNI_GetDefaultJavaVMInitArgs in -ljvm... " >&6; }
-if test "${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+set}" = set; then :
+if ${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18080,7 +18865,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&5
 $as_echo "$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&6; }
-if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = x""yes; then :
+if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = xyes; then :
    java_LDFLAGS="-L$ac_integ_jdk/jre/lib/i386/server -ljvm"
 else
    ac_integ_jdk=""
@@ -18092,7 +18877,7 @@ fi
         	for ac_header in jni.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
-if test "x$ac_cv_header_jni_h" = x""yes; then :
+if test "x$ac_cv_header_jni_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JNI_H 1
 _ACEOF
@@ -18105,7 +18890,7 @@ done
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetDefaultJavaVMInitArgs in -ljvm" >&5
 $as_echo_n "checking for JNI_GetDefaultJavaVMInitArgs in -ljvm... " >&6; }
-if test "${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+set}" = set; then :
+if ${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18139,7 +18924,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&5
 $as_echo "$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&6; }
-if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = x""yes; then :
+if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = xyes; then :
    java_LDFLAGS="-L$ac_integ_jdk/lib/jre/sparc/server -ljvm"
 else
    ac_integ_jdk=""
@@ -18151,7 +18936,7 @@ fi
         	for ac_header in jni.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
-if test "x$ac_cv_header_jni_h" = x""yes; then :
+if test "x$ac_cv_header_jni_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JNI_H 1
 _ACEOF
@@ -18164,7 +18949,7 @@ done
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetDefaultJavaVMInitArgs in -ljvm" >&5
 $as_echo_n "checking for JNI_GetDefaultJavaVMInitArgs in -ljvm... " >&6; }
-if test "${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+set}" = set; then :
+if ${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18198,7 +18983,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&5
 $as_echo "$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&6; }
-if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = x""yes; then :
+if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = xyes; then :
    java_LDFLAGS="-L$ac_integ_jdk/jre/lib/PA_RISC/server -ljvm"
 else
    ac_integ_jdk=""
@@ -18210,7 +18995,7 @@ fi
         	for ac_header in jni.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
-if test "x$ac_cv_header_jni_h" = x""yes; then :
+if test "x$ac_cv_header_jni_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JNI_H 1
 _ACEOF
@@ -18223,7 +19008,7 @@ done
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_GetDefaultJavaVMInitArgs in -ljvm" >&5
 $as_echo_n "checking for JNI_GetDefaultJavaVMInitArgs in -ljvm... " >&6; }
-if test "${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+set}" = set; then :
+if ${ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18257,7 +19042,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&5
 $as_echo "$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" >&6; }
-if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = x""yes; then :
+if test "x$ac_cv_lib_jvm_JNI_GetDefaultJavaVMInitArgs" = xyes; then :
    java_LDFLAGS="-L$ac_integ_jdk/jre/lib/PA_RISC2.0/server -ljvm"
 else
    ac_integ_jdk=""
@@ -18269,7 +19054,7 @@ fi
         	for ac_header in jni.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
-if test "x$ac_cv_header_jni_h" = x""yes; then :
+if test "x$ac_cv_header_jni_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JNI_H 1
 _ACEOF
@@ -18342,7 +19127,7 @@ if test "${enable_bpel_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_bpel_vad="yes";;
        no)	with_bpel_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-bpel-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-bpel-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18357,7 +19142,7 @@ if test "${enable_conductor_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_conductor_vad="yes";;
        no)	with_conductor_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-conductor-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-conductor-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18366,13 +19151,28 @@ else
 fi
 
 
+# Check whether --enable-dbpedia-vad was given.
+if test "${enable_dbpedia_vad+set}" = set; then :
+  enableval=$enable_dbpedia_vad;
+     case "${enableval}" in
+       yes)	with_dbpedia_vad="yes";;
+       no)	with_dbpedia_vad="no";;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-dbpedia-vad" "$LINENO" 5 ;;
+     esac
+
+else
+   with_dbpedia_vad="yes"
+
+fi
+
+
 # Check whether --enable-demo-vad was given.
 if test "${enable_demo_vad+set}" = set; then :
   enableval=$enable_demo_vad;
      case "${enableval}" in
        yes)	with_demo_vad="yes";;
        no)	with_demo_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-demo-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-demo-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18387,7 +19187,7 @@ if test "${enable_fct_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_fct_vad="yes";;
        no)	with_fct_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-fct-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-fct-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18402,7 +19202,7 @@ if test "${enable_isparql_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_isparql_vad="yes";;
        no)	with_isparql_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-isparql-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-isparql-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18417,7 +19217,7 @@ if test "${enable_ods_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_ods_vad="yes";;
        no)	with_ods_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-ods-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-ods-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18432,7 +19232,7 @@ if test "${enable_rdfmappers_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_rdfmappers_vad="yes";;
        no)	with_rdfmappers_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-rdfmappers-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-rdfmappers-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18447,7 +19247,7 @@ if test "${enable_sparqldemo_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_sparqldemo_vad="yes";;
        no)	with_sparqldemo_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-sparqldemo-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-sparqldemo-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18462,7 +19262,7 @@ if test "${enable_syncml_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_syncml_vad="yes";;
        no)	with_syncml_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-syncml-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-syncml-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18477,7 +19277,7 @@ if test "${enable_tutorial_vad+set}" = set; then :
      case "${enableval}" in
        yes)	with_tutorial_vad="yes";;
        no)	with_tutorial_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-tutorial-vad" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-tutorial-vad" "$LINENO" 5 ;;
      esac
 
 else
@@ -18493,7 +19293,7 @@ if test "${enable_all_vads+set}" = set; then :
      case "${enableval}" in
        yes)	with_all_vad="yes";;
        no)	with_all_vad="no";;
-       *)	as_fn_error "bad value ${enableval} for --enable-all-vads" "$LINENO" 5 ;;
+       *)	as_fn_error $? "bad value ${enableval} for --enable-all-vads" "$LINENO" 5 ;;
      esac
 
 else
@@ -18506,6 +19306,7 @@ if test "x$with_all_vad" = "xno"
 then
     with_bpel_vad="no"
     with_conductor_vad="no"
+    with_dbpedia_vad="no"
     with_demo_vad="no"
     with_fct_vad="no"
     with_isparql_vad="no"
@@ -18532,6 +19333,14 @@ else
   WITH_CONDUCTOR_VAD_FALSE=
 fi
 
+ if test "x$with_dbpedia_vad" = "xyes"; then
+  WITH_DBPEDIA_VAD_TRUE=
+  WITH_DBPEDIA_VAD_FALSE='#'
+else
+  WITH_DBPEDIA_VAD_TRUE='#'
+  WITH_DBPEDIA_VAD_FALSE=
+fi
+
  if test "x$with_demo_vad" = "xyes"; then
   WITH_DEMO_VAD_TRUE=
   WITH_DEMO_VAD_FALSE='#'
@@ -18817,7 +19626,7 @@ VIRT_AM_CFLAGS="$CCOPT $CCWARN $CCDEBUG $CCDEFS $ccincl $CCPLATFORMDEFS $DEFS $I
 ##  Generate the files using the above information			##
 ##									##
 ##########################################################################
-ac_config_files="$ac_config_files Makefile binsrc/Makefile docsrc/Makefile libsrc/Makefile binsrc/bpel/Makefile binsrc/b3s/Makefile binsrc/cached_resources/Makefile binsrc/dav/Makefile binsrc/driver/Makefile binsrc/hibernate/Makefile binsrc/hosting/Makefile binsrc/hosting/mono/Makefile binsrc/hosting/mono/tests/Makefile binsrc/hosting/perl/Makefile binsrc/hosting/php/Makefile binsrc/hosting/python/Makefile binsrc/hosting/ruby/Makefile binsrc/isparql/Makefile binsrc/jena/Makefile binsrc/maildrop/Makefile binsrc/mono/Makefile binsrc/oat/Makefile binsrc/rdf_mappers/Makefile binsrc/redland/Makefile binsrc/samples/demo/Makefile binsrc/samples/hslookup/Makefile binsrc/samples/image_magick/Makefile binsrc/samples/JDBC/Makefile binsrc/samples/Makefile binsrc/samples/odp/Makefile binsrc/samples/sparql_demo/Makefile binsrc/samples/wbxml2/Makefile binsrc/samples/webapp/Makefile binsrc/samples/xpath/Makefile binsrc/samples/xquery/Makefile binsrc/sesame/Makefile binsrc/sesame2/Makefile binsrc/sesame3/Makefile binsrc/sqldoc/Makefile binsrc/sync/Makefile binsrc/tests/biftest/Makefile binsrc/tests/dotnet/Makefile binsrc/tests/Makefile binsrc/tests/bsbm/Makefile binsrc/tests/lubm/Makefile binsrc/tests/oledb/Makefile binsrc/tests/rdf/Makefile binsrc/tests/suite/Makefile binsrc/tests/suite/tpc-d/Makefile binsrc/tests/tpcrun/Makefile binsrc/tests/wb/Makefile binsrc/tutorial/apps/Makefile binsrc/tutorial/hosting/Makefile binsrc/tutorial/Makefile binsrc/tutorial/services/Makefile binsrc/tutorial/web/Makefile binsrc/tutorial/xml/Makefile binsrc/vad/Makefile binsrc/virtodbc/Makefile binsrc/virtoledb/Makefile binsrc/VirtuosoClient.Net/Makefile binsrc/virtuoso/Makefile binsrc/virtuoso_sink/Makefile binsrc/vsp/Makefile binsrc/vspx/Makefile binsrc/ws/Makefile binsrc/ws/wsrm/Makefile binsrc/xddl/Makefile binsrc/yacutia/Makefile docsrc/chm/Makefile docsrc/docwiki/Makefile docsrc/html_virt/Makefile docsrc/images/Makefile docsrc/pdf/Makefile docsrc/releasenotes/Makefile docsrc/styleguide/Makefile docsrc/stylesheets/Makefile docsrc/xmlsource/Makefile libsrc/Dk/Makefile libsrc/JDBCDriverType4/Makefile libsrc/JDBCDriverType4/testsuite_2.0/Makefile libsrc/JDBCDriverType4/testsuite_3.0/Makefile libsrc/JDBCDriverType4/testsuite_4.0/Makefile libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile libsrc/JDBCDriverType4/virtuoso/Makefile libsrc/langfunc/Makefile libsrc/odbcsdk/Makefile libsrc/plugin/Makefile libsrc/Thread/Makefile libsrc/Tidy/Makefile libsrc/util/Makefile libsrc/Wi/Makefile libsrc/Xml.new/Makefile libsrc/zlib/Makefile appsrc/Makefile appsrc/ODS-Framework/Makefile appsrc/ODS-Addressbook/Makefile appsrc/ODS-Blog/Makefile appsrc/ODS-Bookmark/Makefile appsrc/ODS-Briefcase/Makefile appsrc/ODS-Calendar/Makefile appsrc/ODS-Community/Makefile appsrc/ODS-Discussion/Makefile appsrc/ODS-FeedManager/Makefile appsrc/ODS-Gallery/Makefile appsrc/ODS-Polls/Makefile appsrc/ODS-WebMail/Makefile appsrc/ODS-Wiki/Makefile appsrc/ODS-Wiki/plugin/Makefile"
+ac_config_files="$ac_config_files Makefile binsrc/Makefile docsrc/Makefile libsrc/Makefile binsrc/bpel/Makefile binsrc/b3s/Makefile binsrc/cached_resources/Makefile binsrc/dav/Makefile binsrc/dbpedia/Makefile binsrc/driver/Makefile binsrc/hibernate/Makefile binsrc/hosting/Makefile binsrc/hosting/mono/Makefile binsrc/hosting/mono/tests/Makefile binsrc/hosting/perl/Makefile binsrc/hosting/php/Makefile binsrc/hosting/python/Makefile binsrc/hosting/ruby/Makefile binsrc/isparql/Makefile binsrc/jena/Makefile binsrc/maildrop/Makefile binsrc/mono/Makefile binsrc/oat/Makefile binsrc/rdf_mappers/Makefile binsrc/redland/Makefile binsrc/samples/demo/Makefile binsrc/samples/hslookup/Makefile binsrc/samples/image_magick/Makefile binsrc/samples/JDBC/Makefile binsrc/samples/Makefile binsrc/samples/odp/Makefile binsrc/samples/sparql_demo/Makefile binsrc/samples/wbxml2/Makefile binsrc/samples/webapp/Makefile binsrc/samples/xpath/Makefile binsrc/samples/xquery/Makefile binsrc/sesame/Makefile binsrc/sesame2/Makefile binsrc/sesame3/Makefile binsrc/sqldoc/Makefile binsrc/sync/Makefile binsrc/tests/biftest/Makefile binsrc/tests/dotnet/Makefile binsrc/tests/Makefile binsrc/tests/bsbm/Makefile binsrc/tests/lubm/Makefile binsrc/tests/oledb/Makefile binsrc/tests/rdf/Makefile binsrc/tests/suite/Makefile binsrc/tests/suite/tpc-d/Makefile binsrc/tests/tpcrun/Makefile binsrc/tests/wb/Makefile binsrc/tutorial/apps/Makefile binsrc/tutorial/hosting/Makefile binsrc/tutorial/Makefile binsrc/tutorial/services/Makefile binsrc/tutorial/web/Makefile binsrc/tutorial/xml/Makefile binsrc/vad/Makefile binsrc/virtodbc/Makefile binsrc/virtoledb/Makefile binsrc/VirtuosoClient.Net/Makefile binsrc/virtuoso/Makefile binsrc/virtuoso_sink/Makefile binsrc/vsp/Makefile binsrc/vspx/Makefile binsrc/ws/Makefile binsrc/ws/wsrm/Makefile binsrc/xddl/Makefile binsrc/yacutia/Makefile docsrc/chm/Makefile docsrc/docwiki/Makefile docsrc/html_virt/Makefile docsrc/images/Makefile docsrc/pdf/Makefile docsrc/releasenotes/Makefile docsrc/styleguide/Makefile docsrc/stylesheets/Makefile docsrc/xmlsource/Makefile libsrc/Dk/Makefile libsrc/JDBCDriverType4/Makefile libsrc/JDBCDriverType4/testsuite_2.0/Makefile libsrc/JDBCDriverType4/testsuite_3.0/Makefile libsrc/JDBCDriverType4/testsuite_4.0/Makefile libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile libsrc/JDBCDriverType4/virtuoso/Makefile libsrc/langfunc/Makefile libsrc/odbcsdk/Makefile libsrc/plugin/Makefile libsrc/Thread/Makefile libsrc/Tidy/Makefile libsrc/util/Makefile libsrc/Wi/Makefile libsrc/Xml.new/Makefile libsrc/zlib/Makefile appsrc/Makefile appsrc/ODS-Framework/Makefile appsrc/ODS-Addressbook/Makefile appsrc/ODS-Blog/Makefile appsrc/ODS-Bookmark/Makefile appsrc/ODS-Briefcase/Makefile appsrc/ODS-Calendar/Makefile appsrc/ODS-Community/Makefile appsrc/ODS-Discussion/Makefile appsrc/ODS-FeedManager/Makefile appsrc/ODS-Gallery/Makefile appsrc/ODS-Polls/Makefile appsrc/ODS-WebMail/Makefile appsrc/ODS-Wiki/Makefile appsrc/ODS-Wiki/plugin/Makefile"
 
 
 ac_config_commands="$ac_config_commands default"
@@ -18887,10 +19696,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -18906,6 +19726,7 @@ DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -18929,140 +19750,144 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error "conditional \"AMDEP\" was never defined.
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
 if test -z "${WITH_HTMLDOC_TRUE}" && test -z "${WITH_HTMLDOC_FALSE}"; then
-  as_fn_error "conditional \"WITH_HTMLDOC\" was never defined.
+  as_fn_error $? "conditional \"WITH_HTMLDOC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_KERBEROS_TRUE}" && test -z "${WITH_KERBEROS_FALSE}"; then
-  as_fn_error "conditional \"WITH_KERBEROS\" was never defined.
+  as_fn_error $? "conditional \"WITH_KERBEROS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_LDAP_TRUE}" && test -z "${WITH_LDAP_FALSE}"; then
-  as_fn_error "conditional \"WITH_LDAP\" was never defined.
+  as_fn_error $? "conditional \"WITH_LDAP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_IMSG_TRUE}" && test -z "${WITH_IMSG_FALSE}"; then
-  as_fn_error "conditional \"WITH_IMSG\" was never defined.
+  as_fn_error $? "conditional \"WITH_IMSG\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_PLDEBUG_TRUE}" && test -z "${WITH_PLDEBUG_FALSE}"; then
-  as_fn_error "conditional \"WITH_PLDEBUG\" was never defined.
+  as_fn_error $? "conditional \"WITH_PLDEBUG\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_PHP5_TRUE}" && test -z "${HAVE_PHP5_FALSE}"; then
-  as_fn_error "conditional \"HAVE_PHP5\" was never defined.
+  as_fn_error $? "conditional \"HAVE_PHP5\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_MONO_TRUE}" && test -z "${HAVE_MONO_FALSE}"; then
-  as_fn_error "conditional \"HAVE_MONO\" was never defined.
+  as_fn_error $? "conditional \"HAVE_MONO\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_HSL_TRUE}" && test -z "${WITH_HSL_FALSE}"; then
-  as_fn_error "conditional \"WITH_HSL\" was never defined.
+  as_fn_error $? "conditional \"WITH_HSL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_IM_TRUE}" && test -z "${WITH_IM_FALSE}"; then
-  as_fn_error "conditional \"WITH_IM\" was never defined.
+  as_fn_error $? "conditional \"WITH_IM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_WBXML2_TRUE}" && test -z "${WITH_WBXML2_FALSE}"; then
-  as_fn_error "conditional \"WITH_WBXML2\" was never defined.
+  as_fn_error $? "conditional \"WITH_WBXML2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_PERL_TRUE}" && test -z "${WITH_PERL_FALSE}"; then
-  as_fn_error "conditional \"WITH_PERL\" was never defined.
+  as_fn_error $? "conditional \"WITH_PERL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then
-  as_fn_error "conditional \"WITH_PYTHON\" was never defined.
+  as_fn_error $? "conditional \"WITH_PYTHON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_RUBY_TRUE}" && test -z "${WITH_RUBY_FALSE}"; then
-  as_fn_error "conditional \"WITH_RUBY\" was never defined.
+  as_fn_error $? "conditional \"WITH_RUBY\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_ZLIB_TRUE}" && test -z "${WITH_ZLIB_FALSE}"; then
-  as_fn_error "conditional \"WITH_ZLIB\" was never defined.
+  as_fn_error $? "conditional \"WITH_ZLIB\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_PTHREADS_TRUE}" && test -z "${WITH_PTHREADS_FALSE}"; then
-  as_fn_error "conditional \"WITH_PTHREADS\" was never defined.
+  as_fn_error $? "conditional \"WITH_PTHREADS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_IODBC_TRUE}" && test -z "${WITH_IODBC_FALSE}"; then
-  as_fn_error "conditional \"WITH_IODBC\" was never defined.
+  as_fn_error $? "conditional \"WITH_IODBC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_JDK2_TRUE}" && test -z "${WITH_JDK2_FALSE}"; then
-  as_fn_error "conditional \"WITH_JDK2\" was never defined.
+  as_fn_error $? "conditional \"WITH_JDK2\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_JDK3_TRUE}" && test -z "${WITH_JDK3_FALSE}"; then
-  as_fn_error "conditional \"WITH_JDK3\" was never defined.
+  as_fn_error $? "conditional \"WITH_JDK3\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_JDK4_TRUE}" && test -z "${WITH_JDK4_FALSE}"; then
-  as_fn_error "conditional \"WITH_JDK4\" was never defined.
+  as_fn_error $? "conditional \"WITH_JDK4\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${INTEG_JDK_TRUE}" && test -z "${INTEG_JDK_FALSE}"; then
-  as_fn_error "conditional \"INTEG_JDK\" was never defined.
+  as_fn_error $? "conditional \"INTEG_JDK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_BPEL_VAD_TRUE}" && test -z "${WITH_BPEL_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_BPEL_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_BPEL_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_CONDUCTOR_VAD_TRUE}" && test -z "${WITH_CONDUCTOR_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_CONDUCTOR_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_CONDUCTOR_VAD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_DBPEDIA_VAD_TRUE}" && test -z "${WITH_DBPEDIA_VAD_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_DBPEDIA_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_DEMO_VAD_TRUE}" && test -z "${WITH_DEMO_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_DEMO_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_DEMO_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_FCT_VAD_TRUE}" && test -z "${WITH_FCT_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_FCT_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_FCT_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_ISPARQL_VAD_TRUE}" && test -z "${WITH_ISPARQL_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_ISPARQL_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_ISPARQL_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_ODS_VAD_TRUE}" && test -z "${WITH_ODS_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_ODS_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_ODS_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_RDFMAPPERS_VAD_TRUE}" && test -z "${WITH_RDFMAPPERS_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_RDFMAPPERS_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_RDFMAPPERS_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_SPARQLDEMO_VAD_TRUE}" && test -z "${WITH_SPARQLDEMO_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_SPARQLDEMO_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_SPARQLDEMO_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_SYNCML_VAD_TRUE}" && test -z "${WITH_SYNCML_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_SYNCML_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_SYNCML_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${WITH_TUTORIAL_VAD_TRUE}" && test -z "${WITH_TUTORIAL_VAD_FALSE}"; then
-  as_fn_error "conditional \"WITH_TUTORIAL_VAD\" was never defined.
+  as_fn_error $? "conditional \"WITH_TUTORIAL_VAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -19163,6 +19988,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -19208,19 +20034,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -19416,7 +20242,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -19469,8 +20295,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Virtuoso Open Source Edition $as_me 6.1.3, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+This file was extended by Virtuoso Open Source Edition $as_me 6.1.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -19535,11 +20361,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Virtuoso Open Source Edition config.status 6.1.3
-configured by $0, generated by GNU Autoconf 2.65,
+Virtuoso Open Source Edition config.status 6.1.5
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -19557,11 +20383,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -19583,6 +20414,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -19595,7 +20427,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -19604,7 +20436,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -19658,134 +20490,156 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
 
 LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
 for var in SED \
 GREP \
 EGREP \
 FGREP \
+SHELL \
+ECHO \
 LD \
 NM \
 LN_S \
@@ -19795,8 +20649,13 @@ reload_flag \
 OBJDUMP \
 deplibs_check_method \
 file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
 AR \
 AR_FLAGS \
+archiver_list_spec \
 STRIP \
 RANLIB \
 CC \
@@ -19806,14 +20665,14 @@ lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
+nm_file_list_spec \
 lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
 lt_prog_compiler_pic \
+lt_prog_compiler_wl \
 lt_prog_compiler_static \
 lt_cv_prog_compiler_c_o \
 need_locks \
+MANIFEST_TOOL \
 DSYMUTIL \
 NMEDIT \
 LIPO \
@@ -19829,7 +20688,6 @@ no_undefined_flag \
 hardcode_libdir_flag_spec \
 hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
-fix_srcfile_path \
 exclude_expsyms \
 include_expsyms \
 file_list_spec \
@@ -19837,12 +20695,13 @@ variables_saved_for_relink \
 libname_spec \
 library_names_spec \
 soname_spec \
+install_override_mode \
 finish_eval \
 old_striplib \
 striplib; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -19864,14 +20723,15 @@ module_cmds \
 module_expsym_cmds \
 export_symbols_cmds \
 prelink_cmds \
+postlink_cmds \
 postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
 sys_lib_dlsearch_path_spec; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -19879,12 +20739,6 @@ sys_lib_dlsearch_path_spec; do
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
-  ;;
-esac
-
 ac_aux_dir='$ac_aux_dir'
 xsi_shell='$xsi_shell'
 lt_shell_append='$lt_shell_append'
@@ -19924,6 +20778,7 @@ do
     "binsrc/b3s/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/b3s/Makefile" ;;
     "binsrc/cached_resources/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/cached_resources/Makefile" ;;
     "binsrc/dav/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/dav/Makefile" ;;
+    "binsrc/dbpedia/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/dbpedia/Makefile" ;;
     "binsrc/driver/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/driver/Makefile" ;;
     "binsrc/hibernate/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/hibernate/Makefile" ;;
     "binsrc/hosting/Makefile") CONFIG_FILES="$CONFIG_FILES binsrc/hosting/Makefile" ;;
@@ -20027,7 +20882,7 @@ do
     "appsrc/ODS-Wiki/plugin/Makefile") CONFIG_FILES="$CONFIG_FILES appsrc/ODS-Wiki/plugin/Makefile" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -20050,9 +20905,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -20060,12 +20916,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -20082,12 +20939,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -20096,18 +20953,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -20115,7 +20972,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -20163,7 +21020,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -20195,21 +21052,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[	 ]*$//
 }'
 fi
@@ -20221,7 +21086,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -20233,11 +21098,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -20322,7 +21187,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -20335,7 +21200,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -20354,7 +21219,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -20363,7 +21228,7 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -20389,8 +21254,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -20526,23 +21391,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -20551,21 +21417,21 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -20726,7 +21592,8 @@ $as_echo X"$file" |
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -20773,6 +21640,12 @@ EGREP=$lt_EGREP
 # A literal string matcher.
 FGREP=$lt_FGREP
 
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
 # Which release of libtool.m4 was used?
 macro_version=$macro_version
 macro_revision=$macro_revision
@@ -20823,9 +21696,11 @@ SP2NL=$lt_lt_SP2NL
 # turn newlines into spaces.
 NL2SP=$lt_lt_NL2SP
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
 # An object symbol dumper.
 OBJDUMP=$lt_OBJDUMP
@@ -20833,13 +21708,30 @@ OBJDUMP=$lt_OBJDUMP
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == "file_magic".
+# Command to use when deplibs_check_method = "file_magic".
 file_magic_cmd=$lt_file_magic_cmd
 
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
 # The archiver.
 AR=$lt_AR
+
+# Flags to create an archive.
 AR_FLAGS=$lt_AR_FLAGS
 
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
 # A symbol stripping program.
 STRIP=$lt_STRIP
 
@@ -20848,6 +21740,9 @@ RANLIB=$lt_RANLIB
 old_postinstall_cmds=$lt_old_postinstall_cmds
 old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
 # A C compiler.
 LTCC=$lt_CC
 
@@ -20866,14 +21761,14 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
 
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
 # Used to examine libraries when file_magic_cmd begins with "file".
 MAGIC_CMD=$MAGIC_CMD
@@ -20881,6 +21776,9 @@ MAGIC_CMD=$MAGIC_CMD
 # Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
 DSYMUTIL=$lt_DSYMUTIL
 
@@ -20937,6 +21835,9 @@ library_names_spec=$lt_library_names_spec
 # The coded name of the library, if different from the real name.
 soname_spec=$lt_soname_spec
 
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
 # Command to use after installation of a shared archive.
 postinstall_cmds=$lt_postinstall_cmds
 
@@ -20976,6 +21877,10 @@ striplib=$lt_striplib
 # The linker used to build libraries.
 LD=$lt_LD
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds
 
@@ -20988,12 +21893,12 @@ with_gcc=$GCC
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static
 
@@ -21080,9 +21985,6 @@ inherit_rpath=$inherit_rpath
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols
 
@@ -21098,6 +22000,9 @@ include_expsyms=$lt_include_expsyms
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec
 
@@ -21130,212 +22035,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1+=\$2"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1=\$$1\$2"
-}
-
-_LT_EOF
-    ;;
-  esac
-
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 
@@ -21353,7 +22215,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -21374,7 +22236,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.in b/configure.in
index 1fae6fd..a48168c 100644
--- a/configure.in
+++ b/configure.in
@@ -1,12 +1,12 @@
 AC_PREREQ(2.59)
-AC_REVISION($Id: configure.in,v 1.262.2.44 2011/03/29 23:20:19 source Exp $)
+AC_REVISION($Id: configure.in,v 1.262.2.52 2012/03/15 17:16:24 source Exp $)
 #
 #  configure.in
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ AC_REVISION($Id: configure.in,v 1.262.2.44 2011/03/29 23:20:19 source Exp $)
 ##########################################################################
 
 AC_INIT([Virtuoso Open Source Edition],
-	[6.1.3],
+	[6.1.5],
 	[vos.admin at openlinksw.com],
 	[virtuoso-opensource])
 AC_CONFIG_SRCDIR([libsrc/Dk.h])
@@ -2231,6 +2231,19 @@ AC_HELP_STRING([--disable-conductor-vad], [disable Conductor vad package])dnl
   [ with_conductor_vad="yes" ]
 )
 
+AC_ARG_ENABLE(dbpedia-vad,
+AC_HELP_STRING([--enable-dbpedia-vad], [enable DBpedia vad package (default)])
+AC_HELP_STRING([--disable-conductor-vad], [disable DBpedia vad package])dnl
+], [
+     case "${enableval}" in
+       yes)	with_dbpedia_vad="yes";;
+       no)	with_dbpedia_vad="no";;
+       *)	AC_MSG_ERROR(bad value ${enableval} for --enable-dbpedia-vad) ;;
+     esac
+  ],
+  [ with_dbpedia_vad="yes" ]
+)
+
 AC_ARG_ENABLE(demo-vad,
 AC_HELP_STRING([--enable-demo-vad], [enable Demo vad package (default)])
 AC_HELP_STRING([--disable-demo-vad], [disable Demo vad package])dnl
@@ -2352,6 +2365,7 @@ if test "x$with_all_vad" = "xno"
 then
     with_bpel_vad="no"
     with_conductor_vad="no"
+    with_dbpedia_vad="no"
     with_demo_vad="no"
     with_fct_vad="no"
     with_isparql_vad="no"
@@ -2364,6 +2378,7 @@ fi
 
 AM_CONDITIONAL(WITH_BPEL_VAD, test "x$with_bpel_vad" = "xyes")
 AM_CONDITIONAL(WITH_CONDUCTOR_VAD, test "x$with_conductor_vad" = "xyes")
+AM_CONDITIONAL(WITH_DBPEDIA_VAD, test "x$with_dbpedia_vad" = "xyes")
 AM_CONDITIONAL(WITH_DEMO_VAD, test "x$with_demo_vad" = "xyes")
 AM_CONDITIONAL(WITH_FCT_VAD, test "x$with_fct_vad" = "xyes")
 AM_CONDITIONAL(WITH_ISPARQL_VAD, test "x$with_isparql_vad" = "xyes")
@@ -2589,6 +2604,7 @@ AC_CONFIG_FILES([
 	binsrc/b3s/Makefile
 	binsrc/cached_resources/Makefile
 	binsrc/dav/Makefile
+	binsrc/dbpedia/Makefile
 	binsrc/driver/Makefile
 	binsrc/hibernate/Makefile
 	binsrc/hosting/Makefile
diff --git a/docsrc/Makefile.am b/docsrc/Makefile.am
index 540595e..1ea7fe8 100644
--- a/docsrc/Makefile.am
+++ b/docsrc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/Makefile.in b/docsrc/Makefile.in
index 5e2e361..a5f5013 100644
--- a/docsrc/Makefile.in
+++ b/docsrc/Makefile.in
@@ -118,6 +118,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -166,6 +167,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -217,6 +219,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -263,7 +266,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -293,7 +295,7 @@ vaddir = @vaddir@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/chm/Makefile.am b/docsrc/chm/Makefile.am
index a5c562d..5691533 100644
--- a/docsrc/chm/Makefile.am
+++ b/docsrc/chm/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/chm/Makefile.in b/docsrc/chm/Makefile.in
index c9d45f5..48e357d 100644
--- a/docsrc/chm/Makefile.in
+++ b/docsrc/chm/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/docwiki/Makefile.am b/docsrc/docwiki/Makefile.am
index 3194e16..c198181 100644
--- a/docsrc/docwiki/Makefile.am
+++ b/docsrc/docwiki/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/docwiki/Makefile.in b/docsrc/docwiki/Makefile.in
index 61ae7e8..bd5860a 100644
--- a/docsrc/docwiki/Makefile.in
+++ b/docsrc/docwiki/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/docwiki/wiki.sql b/docsrc/docwiki/wiki.sql
index 676f21f..2c82855 100644
--- a/docsrc/docwiki/wiki.sql
+++ b/docsrc/docwiki/wiki.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: wiki.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: wiki.sql,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/docwiki/wiki.xsl b/docsrc/docwiki/wiki.xsl
index ed8b77c..48a57fa 100644
--- a/docsrc/docwiki/wiki.xsl
+++ b/docsrc/docwiki/wiki.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: wiki.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: wiki.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/docwiki/wiki_contents.xsl b/docsrc/docwiki/wiki_contents.xsl
index e832bc3..b6fdb2f 100644
--- a/docsrc/docwiki/wiki_contents.xsl
+++ b/docsrc/docwiki/wiki_contents.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: wiki_contents.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: wiki_contents.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/html_virt/Makefile.am b/docsrc/html_virt/Makefile.am
index 50898f5..ead5283 100644
--- a/docsrc/html_virt/Makefile.am
+++ b/docsrc/html_virt/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/html_virt/Makefile.in b/docsrc/html_virt/Makefile.in
index cb29ff8..85fcea0 100644
--- a/docsrc/html_virt/Makefile.in
+++ b/docsrc/html_virt/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/images/Makefile.am b/docsrc/images/Makefile.am
index 801902b..f1bfc5d 100644
--- a/docsrc/images/Makefile.am
+++ b/docsrc/images/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/images/Makefile.in b/docsrc/images/Makefile.in
index 388df79..40bca0a 100644
--- a/docsrc/images/Makefile.in
+++ b/docsrc/images/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/images/conndsn1a.png b/docsrc/images/conndsn1a.png
index 2018fcd..5ffac6e 100644
Binary files a/docsrc/images/conndsn1a.png and b/docsrc/images/conndsn1a.png differ
diff --git a/docsrc/images/conndsn1b.png b/docsrc/images/conndsn1b.png
index 62129c3..6c8fca7 100644
Binary files a/docsrc/images/conndsn1b.png and b/docsrc/images/conndsn1b.png differ
diff --git a/docsrc/images/conndsn2.png b/docsrc/images/conndsn2.png
index 6e1f34b..f49d772 100644
Binary files a/docsrc/images/conndsn2.png and b/docsrc/images/conndsn2.png differ
diff --git a/docsrc/images/database.png b/docsrc/images/database.png
index 53e0db3..e979c01 100644
Binary files a/docsrc/images/database.png and b/docsrc/images/database.png differ
diff --git a/docsrc/images/demoquery.png b/docsrc/images/demoquery.png
index aef5870..60c3b28 100644
Binary files a/docsrc/images/demoquery.png and b/docsrc/images/demoquery.png differ
diff --git a/docsrc/images/fig2_bottom.jpg b/docsrc/images/fig2_bottom.jpg
new file mode 100644
index 0000000..75a9b86
Binary files /dev/null and b/docsrc/images/fig2_bottom.jpg differ
diff --git a/docsrc/images/fig2_bottom.png b/docsrc/images/fig2_bottom.png
new file mode 100644
index 0000000..68d99fd
Binary files /dev/null and b/docsrc/images/fig2_bottom.png differ
diff --git a/docsrc/images/fig2_bottom2.png b/docsrc/images/fig2_bottom2.png
new file mode 100644
index 0000000..da1184d
Binary files /dev/null and b/docsrc/images/fig2_bottom2.png differ
diff --git a/docsrc/images/fig2_bottom3.png b/docsrc/images/fig2_bottom3.png
new file mode 100644
index 0000000..731eb19
Binary files /dev/null and b/docsrc/images/fig2_bottom3.png differ
diff --git a/docsrc/images/fig2_top.jpg b/docsrc/images/fig2_top.jpg
new file mode 100644
index 0000000..9ed3cbf
Binary files /dev/null and b/docsrc/images/fig2_top.jpg differ
diff --git a/docsrc/images/fig2_top.png b/docsrc/images/fig2_top.png
new file mode 100644
index 0000000..586e0cd
Binary files /dev/null and b/docsrc/images/fig2_top.png differ
diff --git a/docsrc/images/linked_data_gen_opts4.png b/docsrc/images/linked_data_gen_opts4.png
new file mode 100644
index 0000000..39c2b51
Binary files /dev/null and b/docsrc/images/linked_data_gen_opts4.png differ
diff --git a/docsrc/images/ln-inst-isql.png b/docsrc/images/ln-inst-isql.png
index 56094bf..8c230d5 100644
Binary files a/docsrc/images/ln-inst-isql.png and b/docsrc/images/ln-inst-isql.png differ
diff --git a/docsrc/images/ln-inst-isql2.png b/docsrc/images/ln-inst-isql2.png
index e85eac3..2e203e0 100644
Binary files a/docsrc/images/ln-inst-isql2.png and b/docsrc/images/ln-inst-isql2.png differ
diff --git a/docsrc/images/ln-inst-login.png b/docsrc/images/ln-inst-login.png
index b4742bc..2274139 100644
Binary files a/docsrc/images/ln-inst-login.png and b/docsrc/images/ln-inst-login.png differ
diff --git a/docsrc/images/ln-inst4.png b/docsrc/images/ln-inst4.png
index d405ccc..a809db7 100644
Binary files a/docsrc/images/ln-inst4.png and b/docsrc/images/ln-inst4.png differ
diff --git a/docsrc/images/menu-cutout.png b/docsrc/images/menu-cutout.png
index 4a1015e..c3f63d0 100644
Binary files a/docsrc/images/menu-cutout.png and b/docsrc/images/menu-cutout.png differ
diff --git a/docsrc/images/newdsn.png b/docsrc/images/newdsn.png
index ffc3c46..9e49058 100644
Binary files a/docsrc/images/newdsn.png and b/docsrc/images/newdsn.png differ
diff --git a/docsrc/images/nntp.png b/docsrc/images/nntp.png
index 919fe70..5fdee82 100644
Binary files a/docsrc/images/nntp.png and b/docsrc/images/nntp.png differ
diff --git a/docsrc/images/querytools.png b/docsrc/images/querytools.png
index 6337d69..6971abf 100644
Binary files a/docsrc/images/querytools.png and b/docsrc/images/querytools.png differ
diff --git a/docsrc/images/rdf.png b/docsrc/images/rdf.png
index 59510e7..a97a254 100644
Binary files a/docsrc/images/rdf.png and b/docsrc/images/rdf.png differ
diff --git a/docsrc/images/rdf1.png b/docsrc/images/rdf1.png
index f455fd9..f384ebe 100644
Binary files a/docsrc/images/rdf1.png and b/docsrc/images/rdf1.png differ
diff --git a/docsrc/images/rdf10.png b/docsrc/images/rdf10.png
index f96b79c..12c6107 100644
Binary files a/docsrc/images/rdf10.png and b/docsrc/images/rdf10.png differ
diff --git a/docsrc/images/rdf11.png b/docsrc/images/rdf11.png
index 21812ee..4fa6c52 100644
Binary files a/docsrc/images/rdf11.png and b/docsrc/images/rdf11.png differ
diff --git a/docsrc/images/rdf12.png b/docsrc/images/rdf12.png
index 473259e..b8fef97 100644
Binary files a/docsrc/images/rdf12.png and b/docsrc/images/rdf12.png differ
diff --git a/docsrc/images/rdf13.png b/docsrc/images/rdf13.png
index fcbcb79..82894e7 100644
Binary files a/docsrc/images/rdf13.png and b/docsrc/images/rdf13.png differ
diff --git a/docsrc/images/rdf14.png b/docsrc/images/rdf14.png
index 1b9ef40..5d6f72f 100644
Binary files a/docsrc/images/rdf14.png and b/docsrc/images/rdf14.png differ
diff --git a/docsrc/images/rdf15.png b/docsrc/images/rdf15.png
index 6176f6c..464dfd5 100644
Binary files a/docsrc/images/rdf15.png and b/docsrc/images/rdf15.png differ
diff --git a/docsrc/images/rdf16.png b/docsrc/images/rdf16.png
index 3985daf..c151c55 100644
Binary files a/docsrc/images/rdf16.png and b/docsrc/images/rdf16.png differ
diff --git a/docsrc/images/rdf17.png b/docsrc/images/rdf17.png
index 87255a3..4bfd11e 100644
Binary files a/docsrc/images/rdf17.png and b/docsrc/images/rdf17.png differ
diff --git a/docsrc/images/rdf18.png b/docsrc/images/rdf18.png
new file mode 100644
index 0000000..677e008
Binary files /dev/null and b/docsrc/images/rdf18.png differ
diff --git a/docsrc/images/rdf19.png b/docsrc/images/rdf19.png
new file mode 100644
index 0000000..43664ca
Binary files /dev/null and b/docsrc/images/rdf19.png differ
diff --git a/docsrc/images/rdf2.png b/docsrc/images/rdf2.png
index 8b48734..549ebbc 100644
Binary files a/docsrc/images/rdf2.png and b/docsrc/images/rdf2.png differ
diff --git a/docsrc/images/rdf3.png b/docsrc/images/rdf3.png
index 075003a..0fddc9d 100644
Binary files a/docsrc/images/rdf3.png and b/docsrc/images/rdf3.png differ
diff --git a/docsrc/images/rdf4.png b/docsrc/images/rdf4.png
index cba3c7e..b5fe831 100644
Binary files a/docsrc/images/rdf4.png and b/docsrc/images/rdf4.png differ
diff --git a/docsrc/images/rdf5.png b/docsrc/images/rdf5.png
index 78379d0..e029852 100644
Binary files a/docsrc/images/rdf5.png and b/docsrc/images/rdf5.png differ
diff --git a/docsrc/images/rdf6.png b/docsrc/images/rdf6.png
index 34d2763..5db0306 100644
Binary files a/docsrc/images/rdf6.png and b/docsrc/images/rdf6.png differ
diff --git a/docsrc/images/rdf7.png b/docsrc/images/rdf7.png
index b494194..48bdde1 100644
Binary files a/docsrc/images/rdf7.png and b/docsrc/images/rdf7.png differ
diff --git a/docsrc/images/rdf8.png b/docsrc/images/rdf8.png
index 096386c..2d1e1f1 100644
Binary files a/docsrc/images/rdf8.png and b/docsrc/images/rdf8.png differ
diff --git a/docsrc/images/rdf9.png b/docsrc/images/rdf9.png
index 2454059..12bb0e0 100644
Binary files a/docsrc/images/rdf9.png and b/docsrc/images/rdf9.png differ
diff --git a/docsrc/images/replication.png b/docsrc/images/replication.png
index d87e815..5e4e4ef 100644
Binary files a/docsrc/images/replication.png and b/docsrc/images/replication.png differ
diff --git a/docsrc/images/rmtadd.png b/docsrc/images/rmtadd.png
index 7221a9d..f6ff847 100644
Binary files a/docsrc/images/rmtadd.png and b/docsrc/images/rmtadd.png differ
diff --git a/docsrc/images/rmtdsnqry.png b/docsrc/images/rmtdsnqry.png
index 44b1b3d..f6021c0 100644
Binary files a/docsrc/images/rmtdsnqry.png and b/docsrc/images/rmtdsnqry.png differ
diff --git a/docsrc/images/rth/mig009.png b/docsrc/images/rth/mig009.png
index b5c4940..9fb8b25 100644
Binary files a/docsrc/images/rth/mig009.png and b/docsrc/images/rth/mig009.png differ
diff --git a/docsrc/images/rth/mig010.png b/docsrc/images/rth/mig010.png
index c3ca932..591e391 100644
Binary files a/docsrc/images/rth/mig010.png and b/docsrc/images/rth/mig010.png differ
diff --git a/docsrc/images/rth/mig011.png b/docsrc/images/rth/mig011.png
index 60a5491..ab3ccc6 100644
Binary files a/docsrc/images/rth/mig011.png and b/docsrc/images/rth/mig011.png differ
diff --git a/docsrc/images/rth/mig012.png b/docsrc/images/rth/mig012.png
index b0db36d..a698f9e 100644
Binary files a/docsrc/images/rth/mig012.png and b/docsrc/images/rth/mig012.png differ
diff --git a/docsrc/images/systemadmin.png b/docsrc/images/systemadmin.png
index 8fe99bc..8ef3957 100644
Binary files a/docsrc/images/systemadmin.png and b/docsrc/images/systemadmin.png differ
diff --git a/docsrc/images/twitter_home.png b/docsrc/images/twitter_home.png
new file mode 100644
index 0000000..33cc43d
Binary files /dev/null and b/docsrc/images/twitter_home.png differ
diff --git a/docsrc/images/twitter_ode_rdf.png b/docsrc/images/twitter_ode_rdf.png
new file mode 100644
index 0000000..a3b4ced
Binary files /dev/null and b/docsrc/images/twitter_ode_rdf.png differ
diff --git a/docsrc/images/ui/Excel1.png b/docsrc/images/ui/Excel1.png
index c57efa2..bd48fe1 100644
Binary files a/docsrc/images/ui/Excel1.png and b/docsrc/images/ui/Excel1.png differ
diff --git a/docsrc/images/ui/JSON1.png b/docsrc/images/ui/JSON1.png
index 83c399e..c5c22bf 100644
Binary files a/docsrc/images/ui/JSON1.png and b/docsrc/images/ui/JSON1.png differ
diff --git a/docsrc/images/ui/ODS3.png b/docsrc/images/ui/ODS3.png
index 297d442..32fed35 100644
Binary files a/docsrc/images/ui/ODS3.png and b/docsrc/images/ui/ODS3.png differ
diff --git a/docsrc/images/ui/VirtJenaProvider.png b/docsrc/images/ui/VirtJenaProvider.png
index 1389518..1c731a9 100644
Binary files a/docsrc/images/ui/VirtJenaProvider.png and b/docsrc/images/ui/VirtJenaProvider.png differ
diff --git a/docsrc/images/ui/VirtSesame2Provider.png b/docsrc/images/ui/VirtSesame2Provider.png
index a726d28..c83a267 100644
Binary files a/docsrc/images/ui/VirtSesame2Provider.png and b/docsrc/images/ui/VirtSesame2Provider.png differ
diff --git a/docsrc/images/ui/acl001.png b/docsrc/images/ui/acl001.png
index fc092b1..f35ef8c 100644
Binary files a/docsrc/images/ui/acl001.png and b/docsrc/images/ui/acl001.png differ
diff --git a/docsrc/images/ui/acl002.png b/docsrc/images/ui/acl002.png
index caf0c21..3f60780 100644
Binary files a/docsrc/images/ui/acl002.png and b/docsrc/images/ui/acl002.png differ
diff --git a/docsrc/images/ui/acl003.png b/docsrc/images/ui/acl003.png
index b0b5da2..35e7489 100644
Binary files a/docsrc/images/ui/acl003.png and b/docsrc/images/ui/acl003.png differ
diff --git a/docsrc/images/ui/admacl.png b/docsrc/images/ui/admacl.png
index 599b613..3c43c9e 100644
Binary files a/docsrc/images/ui/admacl.png and b/docsrc/images/ui/admacl.png differ
diff --git a/docsrc/images/ui/admevt_01.png b/docsrc/images/ui/admevt_01.png
index 7045b6d..26fcf86 100644
Binary files a/docsrc/images/ui/admevt_01.png and b/docsrc/images/ui/admevt_01.png differ
diff --git a/docsrc/images/ui/admevt_01a.png b/docsrc/images/ui/admevt_01a.png
index 8c3214b..5466330 100644
Binary files a/docsrc/images/ui/admevt_01a.png and b/docsrc/images/ui/admevt_01a.png differ
diff --git a/docsrc/images/ui/admprocedures_01.png b/docsrc/images/ui/admprocedures_01.png
index a80f6e7..67c2175 100644
Binary files a/docsrc/images/ui/admprocedures_01.png and b/docsrc/images/ui/admprocedures_01.png differ
diff --git a/docsrc/images/ui/admrmtprocs001.png b/docsrc/images/ui/admrmtprocs001.png
index 72d325c..f0be486 100644
Binary files a/docsrc/images/ui/admrmtprocs001.png and b/docsrc/images/ui/admrmtprocs001.png differ
diff --git a/docsrc/images/ui/admrmtprocs002.png b/docsrc/images/ui/admrmtprocs002.png
index c969b19..c0ff391 100644
Binary files a/docsrc/images/ui/admrmtprocs002.png and b/docsrc/images/ui/admrmtprocs002.png differ
diff --git a/docsrc/images/ui/admrmtprocs003.png b/docsrc/images/ui/admrmtprocs003.png
index 4e1b0d7..d57e290 100644
Binary files a/docsrc/images/ui/admrmtprocs003.png and b/docsrc/images/ui/admrmtprocs003.png differ
diff --git a/docsrc/images/ui/admrmtprocs004.png b/docsrc/images/ui/admrmtprocs004.png
index 51ebe37..87c4785 100644
Binary files a/docsrc/images/ui/admrmtprocs004.png and b/docsrc/images/ui/admrmtprocs004.png differ
diff --git a/docsrc/images/ui/admrmttbls_01.png b/docsrc/images/ui/admrmttbls_01.png
index ee7d9b0..2d446d1 100644
Binary files a/docsrc/images/ui/admrmttbls_01.png and b/docsrc/images/ui/admrmttbls_01.png differ
diff --git a/docsrc/images/ui/admtables_01.png b/docsrc/images/ui/admtables_01.png
index 4b1334b..723af44 100644
Binary files a/docsrc/images/ui/admtables_01.png and b/docsrc/images/ui/admtables_01.png differ
diff --git a/docsrc/images/ui/admtables_01a.png b/docsrc/images/ui/admtables_01a.png
index be36b85..e5b7a84 100644
Binary files a/docsrc/images/ui/admtables_01a.png and b/docsrc/images/ui/admtables_01a.png differ
diff --git a/docsrc/images/ui/admviews_01.png b/docsrc/images/ui/admviews_01.png
index 7dcf666..938feed 100644
Binary files a/docsrc/images/ui/admviews_01.png and b/docsrc/images/ui/admviews_01.png differ
diff --git a/docsrc/images/ui/admvirtdir001.png b/docsrc/images/ui/admvirtdir001.png
index c62881d..cd5a12c 100644
Binary files a/docsrc/images/ui/admvirtdir001.png and b/docsrc/images/ui/admvirtdir001.png differ
diff --git a/docsrc/images/ui/admvirtdir002.png b/docsrc/images/ui/admvirtdir002.png
index bee214e..ff6fc13 100644
Binary files a/docsrc/images/ui/admvirtdir002.png and b/docsrc/images/ui/admvirtdir002.png differ
diff --git a/docsrc/images/ui/admvirtdir003.png b/docsrc/images/ui/admvirtdir003.png
index 63ade97..eb8b1d1 100644
Binary files a/docsrc/images/ui/admvirtdir003.png and b/docsrc/images/ui/admvirtdir003.png differ
diff --git a/docsrc/images/ui/admvirtdir004.png b/docsrc/images/ui/admvirtdir004.png
index b29aa84..59fae71 100644
Binary files a/docsrc/images/ui/admvirtdir004.png and b/docsrc/images/ui/admvirtdir004.png differ
diff --git a/docsrc/images/ui/admvirtdir005.png b/docsrc/images/ui/admvirtdir005.png
index e603da6..e69658d 100644
Binary files a/docsrc/images/ui/admvirtdir005.png and b/docsrc/images/ui/admvirtdir005.png differ
diff --git a/docsrc/images/ui/admvirtdir006.png b/docsrc/images/ui/admvirtdir006.png
index 0c2d8e0..7a24bf5 100644
Binary files a/docsrc/images/ui/admvirtdir006.png and b/docsrc/images/ui/admvirtdir006.png differ
diff --git a/docsrc/images/ui/admvirtdir007.png b/docsrc/images/ui/admvirtdir007.png
index 7fea9c0..1da1a52 100644
Binary files a/docsrc/images/ui/admvirtdir007.png and b/docsrc/images/ui/admvirtdir007.png differ
diff --git a/docsrc/images/ui/admvirtdir008.png b/docsrc/images/ui/admvirtdir008.png
index aaaa6ff..70ff0ae 100644
Binary files a/docsrc/images/ui/admvirtdir008.png and b/docsrc/images/ui/admvirtdir008.png differ
diff --git a/docsrc/images/ui/admvirtdir011.png b/docsrc/images/ui/admvirtdir011.png
index c62881d..cab1e2d 100644
Binary files a/docsrc/images/ui/admvirtdir011.png and b/docsrc/images/ui/admvirtdir011.png differ
diff --git a/docsrc/images/ui/admvirtdir012.png b/docsrc/images/ui/admvirtdir012.png
index 9b39831..431a032 100644
Binary files a/docsrc/images/ui/admvirtdir012.png and b/docsrc/images/ui/admvirtdir012.png differ
diff --git a/docsrc/images/ui/admvirtdir013.png b/docsrc/images/ui/admvirtdir013.png
index e5f2f30..191ad1c 100644
Binary files a/docsrc/images/ui/admvirtdir013.png and b/docsrc/images/ui/admvirtdir013.png differ
diff --git a/docsrc/images/ui/admvirtdir014.png b/docsrc/images/ui/admvirtdir014.png
index 4650f4c..b15a7c9 100644
Binary files a/docsrc/images/ui/admvirtdir014.png and b/docsrc/images/ui/admvirtdir014.png differ
diff --git a/docsrc/images/ui/ado1.png b/docsrc/images/ui/ado1.png
new file mode 100644
index 0000000..9475994
Binary files /dev/null and b/docsrc/images/ui/ado1.png differ
diff --git a/docsrc/images/ui/ado10.png b/docsrc/images/ui/ado10.png
new file mode 100644
index 0000000..43830f8
Binary files /dev/null and b/docsrc/images/ui/ado10.png differ
diff --git a/docsrc/images/ui/ado11.png b/docsrc/images/ui/ado11.png
new file mode 100644
index 0000000..53fab82
Binary files /dev/null and b/docsrc/images/ui/ado11.png differ
diff --git a/docsrc/images/ui/ado12.png b/docsrc/images/ui/ado12.png
new file mode 100644
index 0000000..e60a4b0
Binary files /dev/null and b/docsrc/images/ui/ado12.png differ
diff --git a/docsrc/images/ui/ado13.png b/docsrc/images/ui/ado13.png
new file mode 100644
index 0000000..28439d1
Binary files /dev/null and b/docsrc/images/ui/ado13.png differ
diff --git a/docsrc/images/ui/ado3.png b/docsrc/images/ui/ado3.png
new file mode 100644
index 0000000..d6431f5
Binary files /dev/null and b/docsrc/images/ui/ado3.png differ
diff --git a/docsrc/images/ui/ado4.png b/docsrc/images/ui/ado4.png
new file mode 100644
index 0000000..2e0d3a9
Binary files /dev/null and b/docsrc/images/ui/ado4.png differ
diff --git a/docsrc/images/ui/ado5.png b/docsrc/images/ui/ado5.png
new file mode 100644
index 0000000..0bbd7f4
Binary files /dev/null and b/docsrc/images/ui/ado5.png differ
diff --git a/docsrc/images/ui/ado6.png b/docsrc/images/ui/ado6.png
new file mode 100644
index 0000000..96a6d49
Binary files /dev/null and b/docsrc/images/ui/ado6.png differ
diff --git a/docsrc/images/ui/ado7.png b/docsrc/images/ui/ado7.png
new file mode 100644
index 0000000..5b4c47d
Binary files /dev/null and b/docsrc/images/ui/ado7.png differ
diff --git a/docsrc/images/ui/ado8.png b/docsrc/images/ui/ado8.png
new file mode 100644
index 0000000..4f9076c
Binary files /dev/null and b/docsrc/images/ui/ado8.png differ
diff --git a/docsrc/images/ui/adon8.png b/docsrc/images/ui/adon8.png
new file mode 100644
index 0000000..eb61588
Binary files /dev/null and b/docsrc/images/ui/adon8.png differ
diff --git a/docsrc/images/ui/adon9.png b/docsrc/images/ui/adon9.png
new file mode 100644
index 0000000..d9b7580
Binary files /dev/null and b/docsrc/images/ui/adon9.png differ
diff --git a/docsrc/images/ui/ados10.png b/docsrc/images/ui/ados10.png
new file mode 100644
index 0000000..14c6419
Binary files /dev/null and b/docsrc/images/ui/ados10.png differ
diff --git a/docsrc/images/ui/ados11.png b/docsrc/images/ui/ados11.png
new file mode 100644
index 0000000..1701b3e
Binary files /dev/null and b/docsrc/images/ui/ados11.png differ
diff --git a/docsrc/images/ui/ados12.png b/docsrc/images/ui/ados12.png
new file mode 100644
index 0000000..882fe69
Binary files /dev/null and b/docsrc/images/ui/ados12.png differ
diff --git a/docsrc/images/ui/ados13.png b/docsrc/images/ui/ados13.png
new file mode 100644
index 0000000..3a15848
Binary files /dev/null and b/docsrc/images/ui/ados13.png differ
diff --git a/docsrc/images/ui/ados14.png b/docsrc/images/ui/ados14.png
new file mode 100644
index 0000000..9977dcb
Binary files /dev/null and b/docsrc/images/ui/ados14.png differ
diff --git a/docsrc/images/ui/ados15.png b/docsrc/images/ui/ados15.png
new file mode 100644
index 0000000..d7ecf35
Binary files /dev/null and b/docsrc/images/ui/ados15.png differ
diff --git a/docsrc/images/ui/ados16.png b/docsrc/images/ui/ados16.png
new file mode 100644
index 0000000..ad0585f
Binary files /dev/null and b/docsrc/images/ui/ados16.png differ
diff --git a/docsrc/images/ui/ados17.png b/docsrc/images/ui/ados17.png
new file mode 100644
index 0000000..1b49b6d
Binary files /dev/null and b/docsrc/images/ui/ados17.png differ
diff --git a/docsrc/images/ui/ados18.png b/docsrc/images/ui/ados18.png
new file mode 100644
index 0000000..1944b9f
Binary files /dev/null and b/docsrc/images/ui/ados18.png differ
diff --git a/docsrc/images/ui/ados7.png b/docsrc/images/ui/ados7.png
new file mode 100644
index 0000000..b025d62
Binary files /dev/null and b/docsrc/images/ui/ados7.png differ
diff --git a/docsrc/images/ui/adow1.png b/docsrc/images/ui/adow1.png
new file mode 100644
index 0000000..eb1ab83
Binary files /dev/null and b/docsrc/images/ui/adow1.png differ
diff --git a/docsrc/images/ui/adow11.png b/docsrc/images/ui/adow11.png
new file mode 100644
index 0000000..73f35da
Binary files /dev/null and b/docsrc/images/ui/adow11.png differ
diff --git a/docsrc/images/ui/adow12.png b/docsrc/images/ui/adow12.png
new file mode 100644
index 0000000..b6cef41
Binary files /dev/null and b/docsrc/images/ui/adow12.png differ
diff --git a/docsrc/images/ui/adow15.png b/docsrc/images/ui/adow15.png
new file mode 100644
index 0000000..cb40e68
Binary files /dev/null and b/docsrc/images/ui/adow15.png differ
diff --git a/docsrc/images/ui/adow16.png b/docsrc/images/ui/adow16.png
new file mode 100644
index 0000000..d9615b1
Binary files /dev/null and b/docsrc/images/ui/adow16.png differ
diff --git a/docsrc/images/ui/adow3.png b/docsrc/images/ui/adow3.png
new file mode 100644
index 0000000..466f4de
Binary files /dev/null and b/docsrc/images/ui/adow3.png differ
diff --git a/docsrc/images/ui/adow4.png b/docsrc/images/ui/adow4.png
new file mode 100644
index 0000000..572c75c
Binary files /dev/null and b/docsrc/images/ui/adow4.png differ
diff --git a/docsrc/images/ui/adow5.png b/docsrc/images/ui/adow5.png
new file mode 100644
index 0000000..e6d01d5
Binary files /dev/null and b/docsrc/images/ui/adow5.png differ
diff --git a/docsrc/images/ui/adow6.png b/docsrc/images/ui/adow6.png
new file mode 100644
index 0000000..0dc0a48
Binary files /dev/null and b/docsrc/images/ui/adow6.png differ
diff --git a/docsrc/images/ui/adow8.png b/docsrc/images/ui/adow8.png
new file mode 100644
index 0000000..b6fd3b4
Binary files /dev/null and b/docsrc/images/ui/adow8.png differ
diff --git a/docsrc/images/ui/adow9.png b/docsrc/images/ui/adow9.png
new file mode 100644
index 0000000..0e98069
Binary files /dev/null and b/docsrc/images/ui/adow9.png differ
diff --git a/docsrc/images/ui/ag1.png b/docsrc/images/ui/ag1.png
new file mode 100644
index 0000000..42bd150
Binary files /dev/null and b/docsrc/images/ui/ag1.png differ
diff --git a/docsrc/images/ui/ag2.png b/docsrc/images/ui/ag2.png
new file mode 100644
index 0000000..55e7243
Binary files /dev/null and b/docsrc/images/ui/ag2.png differ
diff --git a/docsrc/images/ui/ag3.png b/docsrc/images/ui/ag3.png
new file mode 100644
index 0000000..0f2339a
Binary files /dev/null and b/docsrc/images/ui/ag3.png differ
diff --git a/docsrc/images/ui/auth1.png b/docsrc/images/ui/auth1.png
new file mode 100644
index 0000000..eb44f49
Binary files /dev/null and b/docsrc/images/ui/auth1.png differ
diff --git a/docsrc/images/ui/auth3.png b/docsrc/images/ui/auth3.png
new file mode 100644
index 0000000..608b811
Binary files /dev/null and b/docsrc/images/ui/auth3.png differ
diff --git a/docsrc/images/ui/auth4.png b/docsrc/images/ui/auth4.png
new file mode 100644
index 0000000..0ff7e87
Binary files /dev/null and b/docsrc/images/ui/auth4.png differ
diff --git a/docsrc/images/ui/auth5.png b/docsrc/images/ui/auth5.png
new file mode 100644
index 0000000..f60571e
Binary files /dev/null and b/docsrc/images/ui/auth5.png differ
diff --git a/docsrc/images/ui/auth6.png b/docsrc/images/ui/auth6.png
new file mode 100644
index 0000000..513753d
Binary files /dev/null and b/docsrc/images/ui/auth6.png differ
diff --git a/docsrc/images/ui/bd1.png b/docsrc/images/ui/bd1.png
new file mode 100644
index 0000000..4de56e1
Binary files /dev/null and b/docsrc/images/ui/bd1.png differ
diff --git a/docsrc/images/ui/bd10.png b/docsrc/images/ui/bd10.png
new file mode 100644
index 0000000..b10a2bb
Binary files /dev/null and b/docsrc/images/ui/bd10.png differ
diff --git a/docsrc/images/ui/bd11.png b/docsrc/images/ui/bd11.png
new file mode 100644
index 0000000..5a78270
Binary files /dev/null and b/docsrc/images/ui/bd11.png differ
diff --git a/docsrc/images/ui/bd12.png b/docsrc/images/ui/bd12.png
new file mode 100644
index 0000000..9ea4a02
Binary files /dev/null and b/docsrc/images/ui/bd12.png differ
diff --git a/docsrc/images/ui/bd13.png b/docsrc/images/ui/bd13.png
new file mode 100644
index 0000000..d0b8c52
Binary files /dev/null and b/docsrc/images/ui/bd13.png differ
diff --git a/docsrc/images/ui/bd14.png b/docsrc/images/ui/bd14.png
new file mode 100644
index 0000000..239087f
Binary files /dev/null and b/docsrc/images/ui/bd14.png differ
diff --git a/docsrc/images/ui/bd15.png b/docsrc/images/ui/bd15.png
new file mode 100644
index 0000000..32ac24e
Binary files /dev/null and b/docsrc/images/ui/bd15.png differ
diff --git a/docsrc/images/ui/bd16.png b/docsrc/images/ui/bd16.png
new file mode 100644
index 0000000..cd7267a
Binary files /dev/null and b/docsrc/images/ui/bd16.png differ
diff --git a/docsrc/images/ui/bd17.png b/docsrc/images/ui/bd17.png
new file mode 100644
index 0000000..6fbb397
Binary files /dev/null and b/docsrc/images/ui/bd17.png differ
diff --git a/docsrc/images/ui/bd18.png b/docsrc/images/ui/bd18.png
new file mode 100644
index 0000000..8b8f6ef
Binary files /dev/null and b/docsrc/images/ui/bd18.png differ
diff --git a/docsrc/images/ui/bd19.png b/docsrc/images/ui/bd19.png
new file mode 100644
index 0000000..b11edbf
Binary files /dev/null and b/docsrc/images/ui/bd19.png differ
diff --git a/docsrc/images/ui/bd2.png b/docsrc/images/ui/bd2.png
new file mode 100644
index 0000000..09e001b
Binary files /dev/null and b/docsrc/images/ui/bd2.png differ
diff --git a/docsrc/images/ui/bd20.png b/docsrc/images/ui/bd20.png
new file mode 100644
index 0000000..f0a4275
Binary files /dev/null and b/docsrc/images/ui/bd20.png differ
diff --git a/docsrc/images/ui/bd21.png b/docsrc/images/ui/bd21.png
new file mode 100644
index 0000000..206a3f3
Binary files /dev/null and b/docsrc/images/ui/bd21.png differ
diff --git a/docsrc/images/ui/bd22.png b/docsrc/images/ui/bd22.png
new file mode 100644
index 0000000..31e554d
Binary files /dev/null and b/docsrc/images/ui/bd22.png differ
diff --git a/docsrc/images/ui/bd23.png b/docsrc/images/ui/bd23.png
new file mode 100644
index 0000000..e952fe6
Binary files /dev/null and b/docsrc/images/ui/bd23.png differ
diff --git a/docsrc/images/ui/bd24.png b/docsrc/images/ui/bd24.png
new file mode 100644
index 0000000..b0e3563
Binary files /dev/null and b/docsrc/images/ui/bd24.png differ
diff --git a/docsrc/images/ui/bd25.png b/docsrc/images/ui/bd25.png
new file mode 100644
index 0000000..90e05b0
Binary files /dev/null and b/docsrc/images/ui/bd25.png differ
diff --git a/docsrc/images/ui/bd26.png b/docsrc/images/ui/bd26.png
new file mode 100644
index 0000000..4bc3c5e
Binary files /dev/null and b/docsrc/images/ui/bd26.png differ
diff --git a/docsrc/images/ui/bd27.png b/docsrc/images/ui/bd27.png
new file mode 100644
index 0000000..8d3d32b
Binary files /dev/null and b/docsrc/images/ui/bd27.png differ
diff --git a/docsrc/images/ui/bd28.png b/docsrc/images/ui/bd28.png
new file mode 100644
index 0000000..b7e1d96
Binary files /dev/null and b/docsrc/images/ui/bd28.png differ
diff --git a/docsrc/images/ui/bd29.png b/docsrc/images/ui/bd29.png
new file mode 100644
index 0000000..bb4e426
Binary files /dev/null and b/docsrc/images/ui/bd29.png differ
diff --git a/docsrc/images/ui/bd3.png b/docsrc/images/ui/bd3.png
new file mode 100644
index 0000000..02ec08a
Binary files /dev/null and b/docsrc/images/ui/bd3.png differ
diff --git a/docsrc/images/ui/bd30.png b/docsrc/images/ui/bd30.png
new file mode 100644
index 0000000..289a330
Binary files /dev/null and b/docsrc/images/ui/bd30.png differ
diff --git a/docsrc/images/ui/bd31.png b/docsrc/images/ui/bd31.png
new file mode 100644
index 0000000..87dd7ed
Binary files /dev/null and b/docsrc/images/ui/bd31.png differ
diff --git a/docsrc/images/ui/bd32.png b/docsrc/images/ui/bd32.png
new file mode 100644
index 0000000..5653cb2
Binary files /dev/null and b/docsrc/images/ui/bd32.png differ
diff --git a/docsrc/images/ui/bd33.png b/docsrc/images/ui/bd33.png
new file mode 100644
index 0000000..e51db29
Binary files /dev/null and b/docsrc/images/ui/bd33.png differ
diff --git a/docsrc/images/ui/bd34.png b/docsrc/images/ui/bd34.png
new file mode 100644
index 0000000..f973489
Binary files /dev/null and b/docsrc/images/ui/bd34.png differ
diff --git a/docsrc/images/ui/bd35.png b/docsrc/images/ui/bd35.png
new file mode 100644
index 0000000..cf47b4e
Binary files /dev/null and b/docsrc/images/ui/bd35.png differ
diff --git a/docsrc/images/ui/bd36.png b/docsrc/images/ui/bd36.png
new file mode 100644
index 0000000..ed6cc3e
Binary files /dev/null and b/docsrc/images/ui/bd36.png differ
diff --git a/docsrc/images/ui/bd37.png b/docsrc/images/ui/bd37.png
new file mode 100644
index 0000000..01aefd2
Binary files /dev/null and b/docsrc/images/ui/bd37.png differ
diff --git a/docsrc/images/ui/bd38.png b/docsrc/images/ui/bd38.png
new file mode 100644
index 0000000..b6f7d97
Binary files /dev/null and b/docsrc/images/ui/bd38.png differ
diff --git a/docsrc/images/ui/bd39.png b/docsrc/images/ui/bd39.png
new file mode 100644
index 0000000..8b38b63
Binary files /dev/null and b/docsrc/images/ui/bd39.png differ
diff --git a/docsrc/images/ui/bd4.png b/docsrc/images/ui/bd4.png
new file mode 100644
index 0000000..a864e88
Binary files /dev/null and b/docsrc/images/ui/bd4.png differ
diff --git a/docsrc/images/ui/bd40.png b/docsrc/images/ui/bd40.png
new file mode 100644
index 0000000..76d4f0e
Binary files /dev/null and b/docsrc/images/ui/bd40.png differ
diff --git a/docsrc/images/ui/bd41.png b/docsrc/images/ui/bd41.png
new file mode 100644
index 0000000..e11be33
Binary files /dev/null and b/docsrc/images/ui/bd41.png differ
diff --git a/docsrc/images/ui/bd5.png b/docsrc/images/ui/bd5.png
new file mode 100644
index 0000000..097d9e3
Binary files /dev/null and b/docsrc/images/ui/bd5.png differ
diff --git a/docsrc/images/ui/bd6.png b/docsrc/images/ui/bd6.png
new file mode 100644
index 0000000..bb5e80b
Binary files /dev/null and b/docsrc/images/ui/bd6.png differ
diff --git a/docsrc/images/ui/bd7.png b/docsrc/images/ui/bd7.png
new file mode 100644
index 0000000..af5f26d
Binary files /dev/null and b/docsrc/images/ui/bd7.png differ
diff --git a/docsrc/images/ui/bd8.png b/docsrc/images/ui/bd8.png
new file mode 100644
index 0000000..43a8ed4
Binary files /dev/null and b/docsrc/images/ui/bd8.png differ
diff --git a/docsrc/images/ui/bd9.png b/docsrc/images/ui/bd9.png
new file mode 100644
index 0000000..085ed69
Binary files /dev/null and b/docsrc/images/ui/bd9.png differ
diff --git a/docsrc/images/ui/cfolder.png b/docsrc/images/ui/cfolder.png
new file mode 100644
index 0000000..425eac6
Binary files /dev/null and b/docsrc/images/ui/cfolder.png differ
diff --git a/docsrc/images/ui/cn1.png b/docsrc/images/ui/cn1.png
index 130e23f..2157374 100644
Binary files a/docsrc/images/ui/cn1.png and b/docsrc/images/ui/cn1.png differ
diff --git a/docsrc/images/ui/cn2.png b/docsrc/images/ui/cn2.png
index ad3dc5d..ed3e9cc 100644
Binary files a/docsrc/images/ui/cn2.png and b/docsrc/images/ui/cn2.png differ
diff --git a/docsrc/images/ui/cr1.png b/docsrc/images/ui/cr1.png
new file mode 100644
index 0000000..2f1a2ec
Binary files /dev/null and b/docsrc/images/ui/cr1.png differ
diff --git a/docsrc/images/ui/cr10.png b/docsrc/images/ui/cr10.png
new file mode 100644
index 0000000..a835a69
Binary files /dev/null and b/docsrc/images/ui/cr10.png differ
diff --git a/docsrc/images/ui/cr11.png b/docsrc/images/ui/cr11.png
new file mode 100644
index 0000000..2dec9f5
Binary files /dev/null and b/docsrc/images/ui/cr11.png differ
diff --git a/docsrc/images/ui/cr11a.png b/docsrc/images/ui/cr11a.png
new file mode 100644
index 0000000..7ded094
Binary files /dev/null and b/docsrc/images/ui/cr11a.png differ
diff --git a/docsrc/images/ui/cr11b.png b/docsrc/images/ui/cr11b.png
new file mode 100644
index 0000000..5547edf
Binary files /dev/null and b/docsrc/images/ui/cr11b.png differ
diff --git a/docsrc/images/ui/cr12.png b/docsrc/images/ui/cr12.png
new file mode 100644
index 0000000..2ff1a4a
Binary files /dev/null and b/docsrc/images/ui/cr12.png differ
diff --git a/docsrc/images/ui/cr12a.png b/docsrc/images/ui/cr12a.png
new file mode 100644
index 0000000..cabbe6a
Binary files /dev/null and b/docsrc/images/ui/cr12a.png differ
diff --git a/docsrc/images/ui/cr13.png b/docsrc/images/ui/cr13.png
new file mode 100644
index 0000000..3c86cab
Binary files /dev/null and b/docsrc/images/ui/cr13.png differ
diff --git a/docsrc/images/ui/cr14.png b/docsrc/images/ui/cr14.png
new file mode 100644
index 0000000..d2c83c1
Binary files /dev/null and b/docsrc/images/ui/cr14.png differ
diff --git a/docsrc/images/ui/cr15.png b/docsrc/images/ui/cr15.png
new file mode 100644
index 0000000..814af19
Binary files /dev/null and b/docsrc/images/ui/cr15.png differ
diff --git a/docsrc/images/ui/cr16.png b/docsrc/images/ui/cr16.png
new file mode 100644
index 0000000..110311c
Binary files /dev/null and b/docsrc/images/ui/cr16.png differ
diff --git a/docsrc/images/ui/cr17.png b/docsrc/images/ui/cr17.png
new file mode 100644
index 0000000..d6ebe33
Binary files /dev/null and b/docsrc/images/ui/cr17.png differ
diff --git a/docsrc/images/ui/cr17a.png b/docsrc/images/ui/cr17a.png
new file mode 100644
index 0000000..b33b95c
Binary files /dev/null and b/docsrc/images/ui/cr17a.png differ
diff --git a/docsrc/images/ui/cr18.png b/docsrc/images/ui/cr18.png
new file mode 100644
index 0000000..7b58c05
Binary files /dev/null and b/docsrc/images/ui/cr18.png differ
diff --git a/docsrc/images/ui/cr19.png b/docsrc/images/ui/cr19.png
new file mode 100644
index 0000000..aabb1af
Binary files /dev/null and b/docsrc/images/ui/cr19.png differ
diff --git a/docsrc/images/ui/cr2.png b/docsrc/images/ui/cr2.png
new file mode 100644
index 0000000..cff89d2
Binary files /dev/null and b/docsrc/images/ui/cr2.png differ
diff --git a/docsrc/images/ui/cr20.png b/docsrc/images/ui/cr20.png
new file mode 100644
index 0000000..e7788b7
Binary files /dev/null and b/docsrc/images/ui/cr20.png differ
diff --git a/docsrc/images/ui/cr21.png b/docsrc/images/ui/cr21.png
new file mode 100644
index 0000000..d089273
Binary files /dev/null and b/docsrc/images/ui/cr21.png differ
diff --git a/docsrc/images/ui/cr3.png b/docsrc/images/ui/cr3.png
new file mode 100644
index 0000000..a991e1d
Binary files /dev/null and b/docsrc/images/ui/cr3.png differ
diff --git a/docsrc/images/ui/cr4.png b/docsrc/images/ui/cr4.png
new file mode 100644
index 0000000..29c0c9b
Binary files /dev/null and b/docsrc/images/ui/cr4.png differ
diff --git a/docsrc/images/ui/cr5.png b/docsrc/images/ui/cr5.png
new file mode 100644
index 0000000..db2a6c3
Binary files /dev/null and b/docsrc/images/ui/cr5.png differ
diff --git a/docsrc/images/ui/cr6.png b/docsrc/images/ui/cr6.png
new file mode 100644
index 0000000..fe3467a
Binary files /dev/null and b/docsrc/images/ui/cr6.png differ
diff --git a/docsrc/images/ui/cr7.png b/docsrc/images/ui/cr7.png
new file mode 100644
index 0000000..8895d1d
Binary files /dev/null and b/docsrc/images/ui/cr7.png differ
diff --git a/docsrc/images/ui/cr8.png b/docsrc/images/ui/cr8.png
new file mode 100644
index 0000000..229a2ee
Binary files /dev/null and b/docsrc/images/ui/cr8.png differ
diff --git a/docsrc/images/ui/cr9.png b/docsrc/images/ui/cr9.png
new file mode 100644
index 0000000..d861df7
Binary files /dev/null and b/docsrc/images/ui/cr9.png differ
diff --git a/docsrc/images/ui/cra1.png b/docsrc/images/ui/cra1.png
new file mode 100644
index 0000000..480d238
Binary files /dev/null and b/docsrc/images/ui/cra1.png differ
diff --git a/docsrc/images/ui/cra10.png b/docsrc/images/ui/cra10.png
new file mode 100644
index 0000000..87ed24a
Binary files /dev/null and b/docsrc/images/ui/cra10.png differ
diff --git a/docsrc/images/ui/cra11.png b/docsrc/images/ui/cra11.png
new file mode 100644
index 0000000..07df063
Binary files /dev/null and b/docsrc/images/ui/cra11.png differ
diff --git a/docsrc/images/ui/cra12.png b/docsrc/images/ui/cra12.png
new file mode 100644
index 0000000..021caaa
Binary files /dev/null and b/docsrc/images/ui/cra12.png differ
diff --git a/docsrc/images/ui/cra13.png b/docsrc/images/ui/cra13.png
new file mode 100644
index 0000000..2f2d00f
Binary files /dev/null and b/docsrc/images/ui/cra13.png differ
diff --git a/docsrc/images/ui/cra14.png b/docsrc/images/ui/cra14.png
new file mode 100644
index 0000000..85701d2
Binary files /dev/null and b/docsrc/images/ui/cra14.png differ
diff --git a/docsrc/images/ui/cra15.png b/docsrc/images/ui/cra15.png
new file mode 100644
index 0000000..c432212
Binary files /dev/null and b/docsrc/images/ui/cra15.png differ
diff --git a/docsrc/images/ui/cra2.png b/docsrc/images/ui/cra2.png
new file mode 100644
index 0000000..d28e1c5
Binary files /dev/null and b/docsrc/images/ui/cra2.png differ
diff --git a/docsrc/images/ui/cra3.png b/docsrc/images/ui/cra3.png
new file mode 100644
index 0000000..2df8c86
Binary files /dev/null and b/docsrc/images/ui/cra3.png differ
diff --git a/docsrc/images/ui/cra4.png b/docsrc/images/ui/cra4.png
new file mode 100644
index 0000000..2c9cb36
Binary files /dev/null and b/docsrc/images/ui/cra4.png differ
diff --git a/docsrc/images/ui/cra5.png b/docsrc/images/ui/cra5.png
new file mode 100644
index 0000000..69f4306
Binary files /dev/null and b/docsrc/images/ui/cra5.png differ
diff --git a/docsrc/images/ui/cra6.png b/docsrc/images/ui/cra6.png
new file mode 100644
index 0000000..630bd39
Binary files /dev/null and b/docsrc/images/ui/cra6.png differ
diff --git a/docsrc/images/ui/cra7.png b/docsrc/images/ui/cra7.png
new file mode 100644
index 0000000..1f7c6c8
Binary files /dev/null and b/docsrc/images/ui/cra7.png differ
diff --git a/docsrc/images/ui/cra8.png b/docsrc/images/ui/cra8.png
new file mode 100644
index 0000000..07df063
Binary files /dev/null and b/docsrc/images/ui/cra8.png differ
diff --git a/docsrc/images/ui/cra9.png b/docsrc/images/ui/cra9.png
new file mode 100644
index 0000000..fe5ec4e
Binary files /dev/null and b/docsrc/images/ui/cra9.png differ
diff --git a/docsrc/images/ui/d1.png b/docsrc/images/ui/d1.png
new file mode 100644
index 0000000..beeb577
Binary files /dev/null and b/docsrc/images/ui/d1.png differ
diff --git a/docsrc/images/ui/d2.png b/docsrc/images/ui/d2.png
new file mode 100644
index 0000000..abbfdb5
Binary files /dev/null and b/docsrc/images/ui/d2.png differ
diff --git a/docsrc/images/ui/d3.png b/docsrc/images/ui/d3.png
new file mode 100644
index 0000000..86ba75e
Binary files /dev/null and b/docsrc/images/ui/d3.png differ
diff --git a/docsrc/images/ui/d4.png b/docsrc/images/ui/d4.png
new file mode 100644
index 0000000..b12d4d5
Binary files /dev/null and b/docsrc/images/ui/d4.png differ
diff --git a/docsrc/images/ui/d5.png b/docsrc/images/ui/d5.png
new file mode 100644
index 0000000..4f9c386
Binary files /dev/null and b/docsrc/images/ui/d5.png differ
diff --git a/docsrc/images/ui/d6.png b/docsrc/images/ui/d6.png
new file mode 100644
index 0000000..8b72c54
Binary files /dev/null and b/docsrc/images/ui/d6.png differ
diff --git a/docsrc/images/ui/d7.png b/docsrc/images/ui/d7.png
new file mode 100644
index 0000000..4074b02
Binary files /dev/null and b/docsrc/images/ui/d7.png differ
diff --git a/docsrc/images/ui/dav_idxprprty_01.png b/docsrc/images/ui/dav_idxprprty_01.png
index 8360477..17c6650 100644
Binary files a/docsrc/images/ui/dav_idxprprty_01.png and b/docsrc/images/ui/dav_idxprprty_01.png differ
diff --git a/docsrc/images/ui/dav_rbt_expt_02.png b/docsrc/images/ui/dav_rbt_expt_02.png
index 55f0d57..213f580 100644
Binary files a/docsrc/images/ui/dav_rbt_expt_02.png and b/docsrc/images/ui/dav_rbt_expt_02.png differ
diff --git a/docsrc/images/ui/dav_rbt_que_01.png b/docsrc/images/ui/dav_rbt_que_01.png
index 92929a1..b624d38 100644
Binary files a/docsrc/images/ui/dav_rbt_que_01.png and b/docsrc/images/ui/dav_rbt_que_01.png differ
diff --git a/docsrc/images/ui/dav_rbt_rtrd_01.png b/docsrc/images/ui/dav_rbt_rtrd_01.png
index 8099bbc..74c6398 100644
Binary files a/docsrc/images/ui/dav_rbt_rtrd_01.png and b/docsrc/images/ui/dav_rbt_rtrd_01.png differ
diff --git a/docsrc/images/ui/dav_rbt_trgt_01.png b/docsrc/images/ui/dav_rbt_trgt_01.png
index 7fb3a79..3d17de7 100644
Binary files a/docsrc/images/ui/dav_rbt_trgt_01.png and b/docsrc/images/ui/dav_rbt_trgt_01.png differ
diff --git a/docsrc/images/ui/dav_resrctyp_01.png b/docsrc/images/ui/dav_resrctyp_01.png
index bd95588..4f58e02 100644
Binary files a/docsrc/images/ui/dav_resrctyp_01.png and b/docsrc/images/ui/dav_resrctyp_01.png differ
diff --git a/docsrc/images/ui/dav_xpath_01.png b/docsrc/images/ui/dav_xpath_01.png
index 5bb46a9..330936b 100644
Binary files a/docsrc/images/ui/dav_xpath_01.png and b/docsrc/images/ui/dav_xpath_01.png differ
diff --git a/docsrc/images/ui/dav_xpath_02.png b/docsrc/images/ui/dav_xpath_02.png
index 4845f24..17180f5 100644
Binary files a/docsrc/images/ui/dav_xpath_02.png and b/docsrc/images/ui/dav_xpath_02.png differ
diff --git a/docsrc/images/ui/dav_xpath_03.png b/docsrc/images/ui/dav_xpath_03.png
index 6f3d608..72ddae4 100644
Binary files a/docsrc/images/ui/dav_xpath_03.png and b/docsrc/images/ui/dav_xpath_03.png differ
diff --git a/docsrc/images/ui/dav_xpath_04.png b/docsrc/images/ui/dav_xpath_04.png
index a3442bb..15181b2 100644
Binary files a/docsrc/images/ui/dav_xpath_04.png and b/docsrc/images/ui/dav_xpath_04.png differ
diff --git a/docsrc/images/ui/db_strtp_01.png b/docsrc/images/ui/db_strtp_01.png
index 21561bf..030524c 100644
Binary files a/docsrc/images/ui/db_strtp_01.png and b/docsrc/images/ui/db_strtp_01.png differ
diff --git a/docsrc/images/ui/db_strtp_02.png b/docsrc/images/ui/db_strtp_02.png
index 9cae924..ca0acee 100644
Binary files a/docsrc/images/ui/db_strtp_02.png and b/docsrc/images/ui/db_strtp_02.png differ
diff --git a/docsrc/images/ui/db_strtp_03.png b/docsrc/images/ui/db_strtp_03.png
index cc6b449..6ee053e 100644
Binary files a/docsrc/images/ui/db_strtp_03.png and b/docsrc/images/ui/db_strtp_03.png differ
diff --git a/docsrc/images/ui/db_strtp_04.png b/docsrc/images/ui/db_strtp_04.png
index 06bfda5..89ee5a2 100644
Binary files a/docsrc/images/ui/db_strtp_04.png and b/docsrc/images/ui/db_strtp_04.png differ
diff --git a/docsrc/images/ui/db_strtp_05.png b/docsrc/images/ui/db_strtp_05.png
index c8be04e..8918518 100644
Binary files a/docsrc/images/ui/db_strtp_05.png and b/docsrc/images/ui/db_strtp_05.png differ
diff --git a/docsrc/images/ui/db_strtp_06.png b/docsrc/images/ui/db_strtp_06.png
index aa2e8dc..b690855 100644
Binary files a/docsrc/images/ui/db_strtp_06.png and b/docsrc/images/ui/db_strtp_06.png differ
diff --git a/docsrc/images/ui/db_strtp_07.png b/docsrc/images/ui/db_strtp_07.png
index f074f63..8633752 100644
Binary files a/docsrc/images/ui/db_strtp_07.png and b/docsrc/images/ui/db_strtp_07.png differ
diff --git a/docsrc/images/ui/demodbinstall_01.png b/docsrc/images/ui/demodbinstall_01.png
index 1116478..f672905 100644
Binary files a/docsrc/images/ui/demodbinstall_01.png and b/docsrc/images/ui/demodbinstall_01.png differ
diff --git a/docsrc/images/ui/demodbinstall_02.png b/docsrc/images/ui/demodbinstall_02.png
index b2b95cb..46cfb56 100644
Binary files a/docsrc/images/ui/demodbinstall_02.png and b/docsrc/images/ui/demodbinstall_02.png differ
diff --git a/docsrc/images/ui/demodbinstall_03.png b/docsrc/images/ui/demodbinstall_03.png
index 5b92e02..f03e462 100644
Binary files a/docsrc/images/ui/demodbinstall_03.png and b/docsrc/images/ui/demodbinstall_03.png differ
diff --git a/docsrc/images/ui/demodbinstall_04.png b/docsrc/images/ui/demodbinstall_04.png
index eb7539a..d369dbc 100644
Binary files a/docsrc/images/ui/demodbinstall_04.png and b/docsrc/images/ui/demodbinstall_04.png differ
diff --git a/docsrc/images/ui/dora1.png b/docsrc/images/ui/dora1.png
new file mode 100644
index 0000000..fedd039
Binary files /dev/null and b/docsrc/images/ui/dora1.png differ
diff --git a/docsrc/images/ui/dora10.png b/docsrc/images/ui/dora10.png
new file mode 100644
index 0000000..ed443c5
Binary files /dev/null and b/docsrc/images/ui/dora10.png differ
diff --git a/docsrc/images/ui/dora9.png b/docsrc/images/ui/dora9.png
new file mode 100644
index 0000000..b118040
Binary files /dev/null and b/docsrc/images/ui/dora9.png differ
diff --git a/docsrc/images/ui/editres.png b/docsrc/images/ui/editres.png
new file mode 100644
index 0000000..df3bc82
Binary files /dev/null and b/docsrc/images/ui/editres.png differ
diff --git a/docsrc/images/ui/einf4.png b/docsrc/images/ui/einf4.png
new file mode 100644
index 0000000..a0aeee7
Binary files /dev/null and b/docsrc/images/ui/einf4.png differ
diff --git a/docsrc/images/ui/eora2.png b/docsrc/images/ui/eora2.png
new file mode 100644
index 0000000..157f3cd
Binary files /dev/null and b/docsrc/images/ui/eora2.png differ
diff --git a/docsrc/images/ui/eora3.png b/docsrc/images/ui/eora3.png
new file mode 100644
index 0000000..b0a25e7
Binary files /dev/null and b/docsrc/images/ui/eora3.png differ
diff --git a/docsrc/images/ui/eora5.png b/docsrc/images/ui/eora5.png
new file mode 100644
index 0000000..5e9354f
Binary files /dev/null and b/docsrc/images/ui/eora5.png differ
diff --git a/docsrc/images/ui/eora6.png b/docsrc/images/ui/eora6.png
new file mode 100644
index 0000000..0c359a7
Binary files /dev/null and b/docsrc/images/ui/eora6.png differ
diff --git a/docsrc/images/ui/exmp1.png b/docsrc/images/ui/exmp1.png
new file mode 100644
index 0000000..d03e9cc
Binary files /dev/null and b/docsrc/images/ui/exmp1.png differ
diff --git a/docsrc/images/ui/f1.png b/docsrc/images/ui/f1.png
new file mode 100644
index 0000000..8c49fb9
Binary files /dev/null and b/docsrc/images/ui/f1.png differ
diff --git a/docsrc/images/ui/f10.png b/docsrc/images/ui/f10.png
new file mode 100644
index 0000000..b17c4fb
Binary files /dev/null and b/docsrc/images/ui/f10.png differ
diff --git a/docsrc/images/ui/f11.png b/docsrc/images/ui/f11.png
new file mode 100644
index 0000000..cfaa037
Binary files /dev/null and b/docsrc/images/ui/f11.png differ
diff --git a/docsrc/images/ui/f12.png b/docsrc/images/ui/f12.png
new file mode 100644
index 0000000..12098e7
Binary files /dev/null and b/docsrc/images/ui/f12.png differ
diff --git a/docsrc/images/ui/f13.png b/docsrc/images/ui/f13.png
new file mode 100644
index 0000000..971e796
Binary files /dev/null and b/docsrc/images/ui/f13.png differ
diff --git a/docsrc/images/ui/f14.png b/docsrc/images/ui/f14.png
new file mode 100644
index 0000000..13e3a81
Binary files /dev/null and b/docsrc/images/ui/f14.png differ
diff --git a/docsrc/images/ui/f15.png b/docsrc/images/ui/f15.png
new file mode 100644
index 0000000..f99fffd
Binary files /dev/null and b/docsrc/images/ui/f15.png differ
diff --git a/docsrc/images/ui/f16.png b/docsrc/images/ui/f16.png
new file mode 100644
index 0000000..6c1a4e9
Binary files /dev/null and b/docsrc/images/ui/f16.png differ
diff --git a/docsrc/images/ui/f17.png b/docsrc/images/ui/f17.png
new file mode 100644
index 0000000..42b601e
Binary files /dev/null and b/docsrc/images/ui/f17.png differ
diff --git a/docsrc/images/ui/f18.png b/docsrc/images/ui/f18.png
new file mode 100644
index 0000000..74b069e
Binary files /dev/null and b/docsrc/images/ui/f18.png differ
diff --git a/docsrc/images/ui/f19.png b/docsrc/images/ui/f19.png
new file mode 100644
index 0000000..786960f
Binary files /dev/null and b/docsrc/images/ui/f19.png differ
diff --git a/docsrc/images/ui/f2.png b/docsrc/images/ui/f2.png
new file mode 100644
index 0000000..717781e
Binary files /dev/null and b/docsrc/images/ui/f2.png differ
diff --git a/docsrc/images/ui/f20.png b/docsrc/images/ui/f20.png
new file mode 100644
index 0000000..c1eb760
Binary files /dev/null and b/docsrc/images/ui/f20.png differ
diff --git a/docsrc/images/ui/f21.png b/docsrc/images/ui/f21.png
new file mode 100644
index 0000000..60bed2f
Binary files /dev/null and b/docsrc/images/ui/f21.png differ
diff --git a/docsrc/images/ui/f22.png b/docsrc/images/ui/f22.png
new file mode 100644
index 0000000..194f8a5
Binary files /dev/null and b/docsrc/images/ui/f22.png differ
diff --git a/docsrc/images/ui/f23.png b/docsrc/images/ui/f23.png
new file mode 100644
index 0000000..8821a46
Binary files /dev/null and b/docsrc/images/ui/f23.png differ
diff --git a/docsrc/images/ui/f24.png b/docsrc/images/ui/f24.png
new file mode 100644
index 0000000..60bed2f
Binary files /dev/null and b/docsrc/images/ui/f24.png differ
diff --git a/docsrc/images/ui/f3.png b/docsrc/images/ui/f3.png
new file mode 100644
index 0000000..f9db530
Binary files /dev/null and b/docsrc/images/ui/f3.png differ
diff --git a/docsrc/images/ui/f4.png b/docsrc/images/ui/f4.png
new file mode 100644
index 0000000..bef6b69
Binary files /dev/null and b/docsrc/images/ui/f4.png differ
diff --git a/docsrc/images/ui/f5.png b/docsrc/images/ui/f5.png
new file mode 100644
index 0000000..56ea362
Binary files /dev/null and b/docsrc/images/ui/f5.png differ
diff --git a/docsrc/images/ui/f6.png b/docsrc/images/ui/f6.png
new file mode 100644
index 0000000..710b93b
Binary files /dev/null and b/docsrc/images/ui/f6.png differ
diff --git a/docsrc/images/ui/f7.png b/docsrc/images/ui/f7.png
new file mode 100644
index 0000000..e0d459c
Binary files /dev/null and b/docsrc/images/ui/f7.png differ
diff --git a/docsrc/images/ui/f8.png b/docsrc/images/ui/f8.png
new file mode 100644
index 0000000..64360d4
Binary files /dev/null and b/docsrc/images/ui/f8.png differ
diff --git a/docsrc/images/ui/f9.png b/docsrc/images/ui/f9.png
new file mode 100644
index 0000000..d841ba9
Binary files /dev/null and b/docsrc/images/ui/f9.png differ
diff --git a/docsrc/images/ui/fb1.png b/docsrc/images/ui/fb1.png
new file mode 100644
index 0000000..98adbe7
Binary files /dev/null and b/docsrc/images/ui/fb1.png differ
diff --git a/docsrc/images/ui/fb10.png b/docsrc/images/ui/fb10.png
new file mode 100644
index 0000000..76faf4f
Binary files /dev/null and b/docsrc/images/ui/fb10.png differ
diff --git a/docsrc/images/ui/fb11.png b/docsrc/images/ui/fb11.png
new file mode 100644
index 0000000..fd07a29
Binary files /dev/null and b/docsrc/images/ui/fb11.png differ
diff --git a/docsrc/images/ui/fb12.png b/docsrc/images/ui/fb12.png
new file mode 100644
index 0000000..02f8994
Binary files /dev/null and b/docsrc/images/ui/fb12.png differ
diff --git a/docsrc/images/ui/fb13.png b/docsrc/images/ui/fb13.png
new file mode 100644
index 0000000..1a02ad6
Binary files /dev/null and b/docsrc/images/ui/fb13.png differ
diff --git a/docsrc/images/ui/fb14.png b/docsrc/images/ui/fb14.png
new file mode 100644
index 0000000..db928e0
Binary files /dev/null and b/docsrc/images/ui/fb14.png differ
diff --git a/docsrc/images/ui/fb15.png b/docsrc/images/ui/fb15.png
new file mode 100644
index 0000000..ace1be5
Binary files /dev/null and b/docsrc/images/ui/fb15.png differ
diff --git a/docsrc/images/ui/fb16.png b/docsrc/images/ui/fb16.png
new file mode 100644
index 0000000..e143da6
Binary files /dev/null and b/docsrc/images/ui/fb16.png differ
diff --git a/docsrc/images/ui/fb17.png b/docsrc/images/ui/fb17.png
new file mode 100644
index 0000000..2bdaa46
Binary files /dev/null and b/docsrc/images/ui/fb17.png differ
diff --git a/docsrc/images/ui/fb18.png b/docsrc/images/ui/fb18.png
new file mode 100644
index 0000000..042b22d
Binary files /dev/null and b/docsrc/images/ui/fb18.png differ
diff --git a/docsrc/images/ui/fb19.png b/docsrc/images/ui/fb19.png
new file mode 100644
index 0000000..4dde589
Binary files /dev/null and b/docsrc/images/ui/fb19.png differ
diff --git a/docsrc/images/ui/fb2.png b/docsrc/images/ui/fb2.png
new file mode 100644
index 0000000..a357375
Binary files /dev/null and b/docsrc/images/ui/fb2.png differ
diff --git a/docsrc/images/ui/fb20.png b/docsrc/images/ui/fb20.png
new file mode 100644
index 0000000..a09c04a
Binary files /dev/null and b/docsrc/images/ui/fb20.png differ
diff --git a/docsrc/images/ui/fb21.png b/docsrc/images/ui/fb21.png
new file mode 100644
index 0000000..2558a26
Binary files /dev/null and b/docsrc/images/ui/fb21.png differ
diff --git a/docsrc/images/ui/fb22.png b/docsrc/images/ui/fb22.png
new file mode 100644
index 0000000..bb312c9
Binary files /dev/null and b/docsrc/images/ui/fb22.png differ
diff --git a/docsrc/images/ui/fb23.png b/docsrc/images/ui/fb23.png
new file mode 100644
index 0000000..47e2347
Binary files /dev/null and b/docsrc/images/ui/fb23.png differ
diff --git a/docsrc/images/ui/fb24.png b/docsrc/images/ui/fb24.png
new file mode 100644
index 0000000..591469e
Binary files /dev/null and b/docsrc/images/ui/fb24.png differ
diff --git a/docsrc/images/ui/fb25.png b/docsrc/images/ui/fb25.png
new file mode 100644
index 0000000..b1659a7
Binary files /dev/null and b/docsrc/images/ui/fb25.png differ
diff --git a/docsrc/images/ui/fb26.png b/docsrc/images/ui/fb26.png
new file mode 100644
index 0000000..b8682ac
Binary files /dev/null and b/docsrc/images/ui/fb26.png differ
diff --git a/docsrc/images/ui/fb27.png b/docsrc/images/ui/fb27.png
new file mode 100644
index 0000000..5615e19
Binary files /dev/null and b/docsrc/images/ui/fb27.png differ
diff --git a/docsrc/images/ui/fb28.png b/docsrc/images/ui/fb28.png
new file mode 100644
index 0000000..5b3c949
Binary files /dev/null and b/docsrc/images/ui/fb28.png differ
diff --git a/docsrc/images/ui/fb29.png b/docsrc/images/ui/fb29.png
new file mode 100644
index 0000000..8a52488
Binary files /dev/null and b/docsrc/images/ui/fb29.png differ
diff --git a/docsrc/images/ui/fb3.png b/docsrc/images/ui/fb3.png
new file mode 100644
index 0000000..ee47e73
Binary files /dev/null and b/docsrc/images/ui/fb3.png differ
diff --git a/docsrc/images/ui/fb30.png b/docsrc/images/ui/fb30.png
new file mode 100644
index 0000000..741abf1
Binary files /dev/null and b/docsrc/images/ui/fb30.png differ
diff --git a/docsrc/images/ui/fb31.png b/docsrc/images/ui/fb31.png
new file mode 100644
index 0000000..9e6a143
Binary files /dev/null and b/docsrc/images/ui/fb31.png differ
diff --git a/docsrc/images/ui/fb32.png b/docsrc/images/ui/fb32.png
new file mode 100644
index 0000000..f51a64f
Binary files /dev/null and b/docsrc/images/ui/fb32.png differ
diff --git a/docsrc/images/ui/fb33.png b/docsrc/images/ui/fb33.png
new file mode 100644
index 0000000..c259322
Binary files /dev/null and b/docsrc/images/ui/fb33.png differ
diff --git a/docsrc/images/ui/fb34.png b/docsrc/images/ui/fb34.png
new file mode 100644
index 0000000..21f8229
Binary files /dev/null and b/docsrc/images/ui/fb34.png differ
diff --git a/docsrc/images/ui/fb35.png b/docsrc/images/ui/fb35.png
new file mode 100644
index 0000000..68a363d
Binary files /dev/null and b/docsrc/images/ui/fb35.png differ
diff --git a/docsrc/images/ui/fb36.png b/docsrc/images/ui/fb36.png
new file mode 100644
index 0000000..139d14d
Binary files /dev/null and b/docsrc/images/ui/fb36.png differ
diff --git a/docsrc/images/ui/fb37.png b/docsrc/images/ui/fb37.png
new file mode 100644
index 0000000..363d2c6
Binary files /dev/null and b/docsrc/images/ui/fb37.png differ
diff --git a/docsrc/images/ui/fb38.png b/docsrc/images/ui/fb38.png
new file mode 100644
index 0000000..8808595
Binary files /dev/null and b/docsrc/images/ui/fb38.png differ
diff --git a/docsrc/images/ui/fb4.png b/docsrc/images/ui/fb4.png
new file mode 100644
index 0000000..08a0a00
Binary files /dev/null and b/docsrc/images/ui/fb4.png differ
diff --git a/docsrc/images/ui/fb5.png b/docsrc/images/ui/fb5.png
new file mode 100644
index 0000000..3594a10
Binary files /dev/null and b/docsrc/images/ui/fb5.png differ
diff --git a/docsrc/images/ui/fb6.png b/docsrc/images/ui/fb6.png
new file mode 100644
index 0000000..f4fbba3
Binary files /dev/null and b/docsrc/images/ui/fb6.png differ
diff --git a/docsrc/images/ui/fb7.png b/docsrc/images/ui/fb7.png
new file mode 100644
index 0000000..66a7ecb
Binary files /dev/null and b/docsrc/images/ui/fb7.png differ
diff --git a/docsrc/images/ui/fb8.png b/docsrc/images/ui/fb8.png
new file mode 100644
index 0000000..ad78594
Binary files /dev/null and b/docsrc/images/ui/fb8.png differ
diff --git a/docsrc/images/ui/fb9.png b/docsrc/images/ui/fb9.png
new file mode 100644
index 0000000..023fea8
Binary files /dev/null and b/docsrc/images/ui/fb9.png differ
diff --git a/docsrc/images/ui/fcapiex1.png b/docsrc/images/ui/fcapiex1.png
new file mode 100644
index 0000000..a513f2b
Binary files /dev/null and b/docsrc/images/ui/fcapiex1.png differ
diff --git a/docsrc/images/ui/foafssl11.png b/docsrc/images/ui/foafssl11.png
index 6483808..f8846c3 100644
Binary files a/docsrc/images/ui/foafssl11.png and b/docsrc/images/ui/foafssl11.png differ
diff --git a/docsrc/images/ui/foafssl12.png b/docsrc/images/ui/foafssl12.png
index 334bf1f..c51edd8 100644
Binary files a/docsrc/images/ui/foafssl12.png and b/docsrc/images/ui/foafssl12.png differ
diff --git a/docsrc/images/ui/foafssl13.png b/docsrc/images/ui/foafssl13.png
index 3ea6fad..a05d540 100644
Binary files a/docsrc/images/ui/foafssl13.png and b/docsrc/images/ui/foafssl13.png differ
diff --git a/docsrc/images/ui/foafssl14.png b/docsrc/images/ui/foafssl14.png
index a57456f..e8a642e 100644
Binary files a/docsrc/images/ui/foafssl14.png and b/docsrc/images/ui/foafssl14.png differ
diff --git a/docsrc/images/ui/foafssl27.png b/docsrc/images/ui/foafssl27.png
index af7873e..6baa6f8 100644
Binary files a/docsrc/images/ui/foafssl27.png and b/docsrc/images/ui/foafssl27.png differ
diff --git a/docsrc/images/ui/foafssl3.png b/docsrc/images/ui/foafssl3.png
index 0949fcc..edb0e27 100644
Binary files a/docsrc/images/ui/foafssl3.png and b/docsrc/images/ui/foafssl3.png differ
diff --git a/docsrc/images/ui/foafssl6.png b/docsrc/images/ui/foafssl6.png
index abbf0ca..554a73f 100644
Binary files a/docsrc/images/ui/foafssl6.png and b/docsrc/images/ui/foafssl6.png differ
diff --git a/docsrc/images/ui/foafssl9.png b/docsrc/images/ui/foafssl9.png
index ae1252a..d60ac81 100644
Binary files a/docsrc/images/ui/foafssl9.png and b/docsrc/images/ui/foafssl9.png differ
diff --git a/docsrc/images/ui/fsp1.png b/docsrc/images/ui/fsp1.png
index 08e2ac7..49f549d 100644
Binary files a/docsrc/images/ui/fsp1.png and b/docsrc/images/ui/fsp1.png differ
diff --git a/docsrc/images/ui/fsp2.png b/docsrc/images/ui/fsp2.png
index d8bb95e..0a85525 100644
Binary files a/docsrc/images/ui/fsp2.png and b/docsrc/images/ui/fsp2.png differ
diff --git a/docsrc/images/ui/foafssl1.png b/docsrc/images/ui/htps1.png
similarity index 100%
copy from docsrc/images/ui/foafssl1.png
copy to docsrc/images/ui/htps1.png
diff --git a/docsrc/images/ui/foafssl2.png b/docsrc/images/ui/htps10.png
similarity index 100%
copy from docsrc/images/ui/foafssl2.png
copy to docsrc/images/ui/htps10.png
diff --git a/docsrc/images/ui/foafssl2.png b/docsrc/images/ui/htps2.png
similarity index 100%
copy from docsrc/images/ui/foafssl2.png
copy to docsrc/images/ui/htps2.png
diff --git a/docsrc/images/ui/htps3.png b/docsrc/images/ui/htps3.png
new file mode 100644
index 0000000..2712d75
Binary files /dev/null and b/docsrc/images/ui/htps3.png differ
diff --git a/docsrc/images/ui/htps4.png b/docsrc/images/ui/htps4.png
new file mode 100644
index 0000000..ddd379f
Binary files /dev/null and b/docsrc/images/ui/htps4.png differ
diff --git a/docsrc/images/ui/htps5.png b/docsrc/images/ui/htps5.png
new file mode 100644
index 0000000..9ebc363
Binary files /dev/null and b/docsrc/images/ui/htps5.png differ
diff --git a/docsrc/images/ui/htps6.png b/docsrc/images/ui/htps6.png
new file mode 100644
index 0000000..42f56d0
Binary files /dev/null and b/docsrc/images/ui/htps6.png differ
diff --git a/docsrc/images/ui/htps7.png b/docsrc/images/ui/htps7.png
new file mode 100644
index 0000000..4a51f39
Binary files /dev/null and b/docsrc/images/ui/htps7.png differ
diff --git a/docsrc/images/ui/htps8.png b/docsrc/images/ui/htps8.png
new file mode 100644
index 0000000..6da84f5
Binary files /dev/null and b/docsrc/images/ui/htps8.png differ
diff --git a/docsrc/images/ui/htps9.png b/docsrc/images/ui/htps9.png
new file mode 100644
index 0000000..24ed795
Binary files /dev/null and b/docsrc/images/ui/htps9.png differ
diff --git a/docsrc/images/ui/insg1.png b/docsrc/images/ui/insg1.png
new file mode 100644
index 0000000..707044b
Binary files /dev/null and b/docsrc/images/ui/insg1.png differ
diff --git a/docsrc/images/ui/insg10.png b/docsrc/images/ui/insg10.png
new file mode 100644
index 0000000..802c7c9
Binary files /dev/null and b/docsrc/images/ui/insg10.png differ
diff --git a/docsrc/images/ui/insg11.png b/docsrc/images/ui/insg11.png
new file mode 100644
index 0000000..88f850d
Binary files /dev/null and b/docsrc/images/ui/insg11.png differ
diff --git a/docsrc/images/ui/insg12.png b/docsrc/images/ui/insg12.png
new file mode 100644
index 0000000..14c6419
Binary files /dev/null and b/docsrc/images/ui/insg12.png differ
diff --git a/docsrc/images/ui/insg13.png b/docsrc/images/ui/insg13.png
new file mode 100644
index 0000000..1701b3e
Binary files /dev/null and b/docsrc/images/ui/insg13.png differ
diff --git a/docsrc/images/ui/insg14.png b/docsrc/images/ui/insg14.png
new file mode 100644
index 0000000..cda9df7
Binary files /dev/null and b/docsrc/images/ui/insg14.png differ
diff --git a/docsrc/images/ui/insg15.png b/docsrc/images/ui/insg15.png
new file mode 100644
index 0000000..4692671
Binary files /dev/null and b/docsrc/images/ui/insg15.png differ
diff --git a/docsrc/images/ui/insg16.png b/docsrc/images/ui/insg16.png
new file mode 100644
index 0000000..6decb6c
Binary files /dev/null and b/docsrc/images/ui/insg16.png differ
diff --git a/docsrc/images/ui/insg17.png b/docsrc/images/ui/insg17.png
new file mode 100644
index 0000000..c981849
Binary files /dev/null and b/docsrc/images/ui/insg17.png differ
diff --git a/docsrc/images/ui/insg18.png b/docsrc/images/ui/insg18.png
new file mode 100644
index 0000000..021570a
Binary files /dev/null and b/docsrc/images/ui/insg18.png differ
diff --git a/docsrc/images/ui/insg19.png b/docsrc/images/ui/insg19.png
new file mode 100644
index 0000000..607f7ce
Binary files /dev/null and b/docsrc/images/ui/insg19.png differ
diff --git a/docsrc/images/ui/insg20.png b/docsrc/images/ui/insg20.png
new file mode 100644
index 0000000..9111f20
Binary files /dev/null and b/docsrc/images/ui/insg20.png differ
diff --git a/docsrc/images/ui/insg21.png b/docsrc/images/ui/insg21.png
new file mode 100644
index 0000000..7ac39da
Binary files /dev/null and b/docsrc/images/ui/insg21.png differ
diff --git a/docsrc/images/ui/insg22.png b/docsrc/images/ui/insg22.png
new file mode 100644
index 0000000..badf768
Binary files /dev/null and b/docsrc/images/ui/insg22.png differ
diff --git a/docsrc/images/ui/insg23.png b/docsrc/images/ui/insg23.png
new file mode 100644
index 0000000..07758c7
Binary files /dev/null and b/docsrc/images/ui/insg23.png differ
diff --git a/docsrc/images/ui/insg5.png b/docsrc/images/ui/insg5.png
new file mode 100644
index 0000000..432ea04
Binary files /dev/null and b/docsrc/images/ui/insg5.png differ
diff --git a/docsrc/images/ui/insg6.png b/docsrc/images/ui/insg6.png
new file mode 100644
index 0000000..10bec01
Binary files /dev/null and b/docsrc/images/ui/insg6.png differ
diff --git a/docsrc/images/ui/insg7.png b/docsrc/images/ui/insg7.png
new file mode 100644
index 0000000..d8e6f30
Binary files /dev/null and b/docsrc/images/ui/insg7.png differ
diff --git a/docsrc/images/ui/insg8.png b/docsrc/images/ui/insg8.png
new file mode 100644
index 0000000..9c9599e
Binary files /dev/null and b/docsrc/images/ui/insg8.png differ
diff --git a/docsrc/images/ui/insg9.png b/docsrc/images/ui/insg9.png
new file mode 100644
index 0000000..e28b2f3
Binary files /dev/null and b/docsrc/images/ui/insg9.png differ
diff --git a/docsrc/images/ui/instmac.png b/docsrc/images/ui/instmac.png
new file mode 100644
index 0000000..55b62b5
Binary files /dev/null and b/docsrc/images/ui/instmac.png differ
diff --git a/docsrc/images/ui/instmac2.png b/docsrc/images/ui/instmac2.png
new file mode 100644
index 0000000..427606e
Binary files /dev/null and b/docsrc/images/ui/instmac2.png differ
diff --git a/docsrc/images/ui/keys1.png b/docsrc/images/ui/keys1.png
index 5ff44f2..8108809 100644
Binary files a/docsrc/images/ui/keys1.png and b/docsrc/images/ui/keys1.png differ
diff --git a/docsrc/images/ui/keys2.png b/docsrc/images/ui/keys2.png
index ac19225..b266cee 100644
Binary files a/docsrc/images/ui/keys2.png and b/docsrc/images/ui/keys2.png differ
diff --git a/docsrc/images/ui/ldap1.png b/docsrc/images/ui/ldap1.png
new file mode 100644
index 0000000..a66d3ce
Binary files /dev/null and b/docsrc/images/ui/ldap1.png differ
diff --git a/docsrc/images/ui/ldap2.png b/docsrc/images/ui/ldap2.png
new file mode 100644
index 0000000..38f12d4
Binary files /dev/null and b/docsrc/images/ui/ldap2.png differ
diff --git a/docsrc/images/ui/ldap3.png b/docsrc/images/ui/ldap3.png
new file mode 100644
index 0000000..34e95ab
Binary files /dev/null and b/docsrc/images/ui/ldap3.png differ
diff --git a/docsrc/images/ui/ldap3a.png b/docsrc/images/ui/ldap3a.png
new file mode 100644
index 0000000..fd9b931
Binary files /dev/null and b/docsrc/images/ui/ldap3a.png differ
diff --git a/docsrc/images/ui/ldap4.png b/docsrc/images/ui/ldap4.png
new file mode 100644
index 0000000..a6b0a5e
Binary files /dev/null and b/docsrc/images/ui/ldap4.png differ
diff --git a/docsrc/images/ui/ldap5.png b/docsrc/images/ui/ldap5.png
new file mode 100644
index 0000000..aeb5cbd
Binary files /dev/null and b/docsrc/images/ui/ldap5.png differ
diff --git a/docsrc/images/ui/ldap6.png b/docsrc/images/ui/ldap6.png
new file mode 100644
index 0000000..476fc07
Binary files /dev/null and b/docsrc/images/ui/ldap6.png differ
diff --git a/docsrc/images/ui/ldap7.png b/docsrc/images/ui/ldap7.png
new file mode 100644
index 0000000..50f4aae
Binary files /dev/null and b/docsrc/images/ui/ldap7.png differ
diff --git a/docsrc/images/ui/ldap8.png b/docsrc/images/ui/ldap8.png
new file mode 100644
index 0000000..dc6e7cb
Binary files /dev/null and b/docsrc/images/ui/ldap8.png differ
diff --git a/docsrc/images/ui/lock_16.png b/docsrc/images/ui/lock_16.png
new file mode 100644
index 0000000..593e884
Binary files /dev/null and b/docsrc/images/ui/lock_16.png differ
diff --git a/docsrc/images/ui/m1.png b/docsrc/images/ui/m1.png
new file mode 100644
index 0000000..cd7267a
Binary files /dev/null and b/docsrc/images/ui/m1.png differ
diff --git a/docsrc/images/ui/m10.png b/docsrc/images/ui/m10.png
new file mode 100644
index 0000000..2a7b2b5
Binary files /dev/null and b/docsrc/images/ui/m10.png differ
diff --git a/docsrc/images/ui/m11.png b/docsrc/images/ui/m11.png
new file mode 100644
index 0000000..5d2e058
Binary files /dev/null and b/docsrc/images/ui/m11.png differ
diff --git a/docsrc/images/ui/m12.png b/docsrc/images/ui/m12.png
new file mode 100644
index 0000000..e012770
Binary files /dev/null and b/docsrc/images/ui/m12.png differ
diff --git a/docsrc/images/ui/m13.png b/docsrc/images/ui/m13.png
new file mode 100644
index 0000000..a378f8e
Binary files /dev/null and b/docsrc/images/ui/m13.png differ
diff --git a/docsrc/images/ui/m14.png b/docsrc/images/ui/m14.png
new file mode 100644
index 0000000..506ac87
Binary files /dev/null and b/docsrc/images/ui/m14.png differ
diff --git a/docsrc/images/ui/m15.png b/docsrc/images/ui/m15.png
new file mode 100644
index 0000000..a8fe068
Binary files /dev/null and b/docsrc/images/ui/m15.png differ
diff --git a/docsrc/images/ui/m16.png b/docsrc/images/ui/m16.png
new file mode 100644
index 0000000..e358627
Binary files /dev/null and b/docsrc/images/ui/m16.png differ
diff --git a/docsrc/images/ui/m17.png b/docsrc/images/ui/m17.png
new file mode 100644
index 0000000..91961bb
Binary files /dev/null and b/docsrc/images/ui/m17.png differ
diff --git a/docsrc/images/ui/m18.png b/docsrc/images/ui/m18.png
new file mode 100644
index 0000000..02ec08a
Binary files /dev/null and b/docsrc/images/ui/m18.png differ
diff --git a/docsrc/images/ui/m19.png b/docsrc/images/ui/m19.png
new file mode 100644
index 0000000..a864e88
Binary files /dev/null and b/docsrc/images/ui/m19.png differ
diff --git a/docsrc/images/ui/m2.png b/docsrc/images/ui/m2.png
new file mode 100644
index 0000000..6bc0b2d
Binary files /dev/null and b/docsrc/images/ui/m2.png differ
diff --git a/docsrc/images/ui/m20.png b/docsrc/images/ui/m20.png
new file mode 100644
index 0000000..6cad8c9
Binary files /dev/null and b/docsrc/images/ui/m20.png differ
diff --git a/docsrc/images/ui/m21.png b/docsrc/images/ui/m21.png
new file mode 100644
index 0000000..01b2821
Binary files /dev/null and b/docsrc/images/ui/m21.png differ
diff --git a/docsrc/images/ui/m22.png b/docsrc/images/ui/m22.png
new file mode 100644
index 0000000..3261ecf
Binary files /dev/null and b/docsrc/images/ui/m22.png differ
diff --git a/docsrc/images/ui/m23.png b/docsrc/images/ui/m23.png
new file mode 100644
index 0000000..df01012
Binary files /dev/null and b/docsrc/images/ui/m23.png differ
diff --git a/docsrc/images/ui/m24.png b/docsrc/images/ui/m24.png
new file mode 100644
index 0000000..b241110
Binary files /dev/null and b/docsrc/images/ui/m24.png differ
diff --git a/docsrc/images/ui/m25.png b/docsrc/images/ui/m25.png
new file mode 100644
index 0000000..d21dcba
Binary files /dev/null and b/docsrc/images/ui/m25.png differ
diff --git a/docsrc/images/ui/m26.png b/docsrc/images/ui/m26.png
new file mode 100644
index 0000000..9e03d35
Binary files /dev/null and b/docsrc/images/ui/m26.png differ
diff --git a/docsrc/images/ui/m27.png b/docsrc/images/ui/m27.png
new file mode 100644
index 0000000..26bce13
Binary files /dev/null and b/docsrc/images/ui/m27.png differ
diff --git a/docsrc/images/ui/m28.png b/docsrc/images/ui/m28.png
new file mode 100644
index 0000000..a378f8e
Binary files /dev/null and b/docsrc/images/ui/m28.png differ
diff --git a/docsrc/images/ui/m29.png b/docsrc/images/ui/m29.png
new file mode 100644
index 0000000..506ac87
Binary files /dev/null and b/docsrc/images/ui/m29.png differ
diff --git a/docsrc/images/ui/m3.png b/docsrc/images/ui/m3.png
new file mode 100644
index 0000000..56b7bfd
Binary files /dev/null and b/docsrc/images/ui/m3.png differ
diff --git a/docsrc/images/ui/m30.png b/docsrc/images/ui/m30.png
new file mode 100644
index 0000000..ce782bc
Binary files /dev/null and b/docsrc/images/ui/m30.png differ
diff --git a/docsrc/images/ui/m31.png b/docsrc/images/ui/m31.png
new file mode 100644
index 0000000..f5dc82d
Binary files /dev/null and b/docsrc/images/ui/m31.png differ
diff --git a/docsrc/images/ui/m32.png b/docsrc/images/ui/m32.png
new file mode 100644
index 0000000..efd2462
Binary files /dev/null and b/docsrc/images/ui/m32.png differ
diff --git a/docsrc/images/ui/m33.png b/docsrc/images/ui/m33.png
new file mode 100644
index 0000000..5948acc
Binary files /dev/null and b/docsrc/images/ui/m33.png differ
diff --git a/docsrc/images/ui/m34.png b/docsrc/images/ui/m34.png
new file mode 100644
index 0000000..f9d83f9
Binary files /dev/null and b/docsrc/images/ui/m34.png differ
diff --git a/docsrc/images/ui/m35.png b/docsrc/images/ui/m35.png
new file mode 100644
index 0000000..cf47b4e
Binary files /dev/null and b/docsrc/images/ui/m35.png differ
diff --git a/docsrc/images/ui/m36.png b/docsrc/images/ui/m36.png
new file mode 100644
index 0000000..89eccc8
Binary files /dev/null and b/docsrc/images/ui/m36.png differ
diff --git a/docsrc/images/ui/m36a.png b/docsrc/images/ui/m36a.png
new file mode 100644
index 0000000..179ec18
Binary files /dev/null and b/docsrc/images/ui/m36a.png differ
diff --git a/docsrc/images/ui/m38.png b/docsrc/images/ui/m38.png
new file mode 100644
index 0000000..e11be33
Binary files /dev/null and b/docsrc/images/ui/m38.png differ
diff --git a/docsrc/images/ui/m4.png b/docsrc/images/ui/m4.png
new file mode 100644
index 0000000..a864e88
Binary files /dev/null and b/docsrc/images/ui/m4.png differ
diff --git a/docsrc/images/ui/m5.png b/docsrc/images/ui/m5.png
new file mode 100644
index 0000000..6cad8c9
Binary files /dev/null and b/docsrc/images/ui/m5.png differ
diff --git a/docsrc/images/ui/m6.png b/docsrc/images/ui/m6.png
new file mode 100644
index 0000000..01b2821
Binary files /dev/null and b/docsrc/images/ui/m6.png differ
diff --git a/docsrc/images/ui/m7.png b/docsrc/images/ui/m7.png
new file mode 100644
index 0000000..3e208f0
Binary files /dev/null and b/docsrc/images/ui/m7.png differ
diff --git a/docsrc/images/ui/m8.png b/docsrc/images/ui/m8.png
new file mode 100644
index 0000000..75e2681
Binary files /dev/null and b/docsrc/images/ui/m8.png differ
diff --git a/docsrc/images/ui/m9.png b/docsrc/images/ui/m9.png
new file mode 100644
index 0000000..e769b3a
Binary files /dev/null and b/docsrc/images/ui/m9.png differ
diff --git a/docsrc/images/ui/meditres.png b/docsrc/images/ui/meditres.png
new file mode 100644
index 0000000..eaad678
Binary files /dev/null and b/docsrc/images/ui/meditres.png differ
diff --git a/docsrc/images/ui/meditres2.png b/docsrc/images/ui/meditres2.png
new file mode 100644
index 0000000..b23f055
Binary files /dev/null and b/docsrc/images/ui/meditres2.png differ
diff --git a/docsrc/images/ui/news_add_01.png b/docsrc/images/ui/news_add_01.png
index 509d905..bb41f45 100644
Binary files a/docsrc/images/ui/news_add_01.png and b/docsrc/images/ui/news_add_01.png differ
diff --git a/docsrc/images/ui/news_addgrp_01.png b/docsrc/images/ui/news_addgrp_01.png
index 6cfd596..a2ccc8f 100644
Binary files a/docsrc/images/ui/news_addgrp_01.png and b/docsrc/images/ui/news_addgrp_01.png differ
diff --git a/docsrc/images/ui/news_adm_01.png b/docsrc/images/ui/news_adm_01.png
index 1da7175..5e2cec8 100644
Binary files a/docsrc/images/ui/news_adm_01.png and b/docsrc/images/ui/news_adm_01.png differ
diff --git a/docsrc/images/ui/news_adm_01a.png b/docsrc/images/ui/news_adm_01a.png
index 7b0ddee..d0d906a 100644
Binary files a/docsrc/images/ui/news_adm_01a.png and b/docsrc/images/ui/news_adm_01a.png differ
diff --git a/docsrc/images/ui/news_adm_01b.png b/docsrc/images/ui/news_adm_01b.png
index 0eafa44..ce26d94 100644
Binary files a/docsrc/images/ui/news_adm_01b.png and b/docsrc/images/ui/news_adm_01b.png differ
diff --git a/docsrc/images/ui/news_adm_01c.png b/docsrc/images/ui/news_adm_01c.png
index 711fa7c..72adf4d 100644
Binary files a/docsrc/images/ui/news_adm_01c.png and b/docsrc/images/ui/news_adm_01c.png differ
diff --git a/docsrc/images/ui/oc1.png b/docsrc/images/ui/oc1.png
new file mode 100644
index 0000000..7c4bbd6
Binary files /dev/null and b/docsrc/images/ui/oc1.png differ
diff --git a/docsrc/images/ui/oc2.png b/docsrc/images/ui/oc2.png
new file mode 100644
index 0000000..df5d286
Binary files /dev/null and b/docsrc/images/ui/oc2.png differ
diff --git a/docsrc/images/ui/oc3.png b/docsrc/images/ui/oc3.png
new file mode 100644
index 0000000..8829a83
Binary files /dev/null and b/docsrc/images/ui/oc3.png differ
diff --git a/docsrc/images/ui/oc4.png b/docsrc/images/ui/oc4.png
new file mode 100644
index 0000000..51d9763
Binary files /dev/null and b/docsrc/images/ui/oc4.png differ
diff --git a/docsrc/images/ui/oc5.png b/docsrc/images/ui/oc5.png
new file mode 100644
index 0000000..ee53535
Binary files /dev/null and b/docsrc/images/ui/oc5.png differ
diff --git a/docsrc/images/ui/odbcadm_01.png b/docsrc/images/ui/odbcadm_01.png
index 01e77e0..bac7335 100644
Binary files a/docsrc/images/ui/odbcadm_01.png and b/docsrc/images/ui/odbcadm_01.png differ
diff --git a/docsrc/images/ui/qry_sql_01.png b/docsrc/images/ui/qry_sql_01.png
index aa02817..e03d531 100644
Binary files a/docsrc/images/ui/qry_sql_01.png and b/docsrc/images/ui/qry_sql_01.png differ
diff --git a/docsrc/images/ui/qry_sql_01a.png b/docsrc/images/ui/qry_sql_01a.png
index fd4fcfb..3795621 100644
Binary files a/docsrc/images/ui/qry_sql_01a.png and b/docsrc/images/ui/qry_sql_01a.png differ
diff --git a/docsrc/images/ui/qry_sql_02.png b/docsrc/images/ui/qry_sql_02.png
index 9110672..d7c13c4 100644
Binary files a/docsrc/images/ui/qry_sql_02.png and b/docsrc/images/ui/qry_sql_02.png differ
diff --git a/docsrc/images/ui/qry_sql_02a.png b/docsrc/images/ui/qry_sql_02a.png
index 58e85e9..9f8068b 100644
Binary files a/docsrc/images/ui/qry_sql_02a.png and b/docsrc/images/ui/qry_sql_02a.png differ
diff --git a/docsrc/images/ui/qssql2xml001.png b/docsrc/images/ui/qssql2xml001.png
index 7bbf263..b656a27 100644
Binary files a/docsrc/images/ui/qssql2xml001.png and b/docsrc/images/ui/qssql2xml001.png differ
diff --git a/docsrc/images/ui/qssql2xml003.png b/docsrc/images/ui/qssql2xml003.png
index 01bf9a5..5247177 100644
Binary files a/docsrc/images/ui/qssql2xml003.png and b/docsrc/images/ui/qssql2xml003.png differ
diff --git a/docsrc/images/ui/qssql2xml101.png b/docsrc/images/ui/qssql2xml101.png
index c08eee8..f7068ab 100644
Binary files a/docsrc/images/ui/qssql2xml101.png and b/docsrc/images/ui/qssql2xml101.png differ
diff --git a/docsrc/images/ui/qssql2xml102.png b/docsrc/images/ui/qssql2xml102.png
index 6db871f..e34b7dc 100644
Binary files a/docsrc/images/ui/qssql2xml102.png and b/docsrc/images/ui/qssql2xml102.png differ
diff --git a/docsrc/images/ui/qssql2xml103.png b/docsrc/images/ui/qssql2xml103.png
index 4c37270..44af401 100644
Binary files a/docsrc/images/ui/qssql2xml103.png and b/docsrc/images/ui/qssql2xml103.png differ
diff --git a/docsrc/images/ui/r1.png b/docsrc/images/ui/r1.png
new file mode 100644
index 0000000..f5dc82d
Binary files /dev/null and b/docsrc/images/ui/r1.png differ
diff --git a/docsrc/images/ui/r10.png b/docsrc/images/ui/r10.png
new file mode 100644
index 0000000..6cad8c9
Binary files /dev/null and b/docsrc/images/ui/r10.png differ
diff --git a/docsrc/images/ui/r11.png b/docsrc/images/ui/r11.png
new file mode 100644
index 0000000..01b2821
Binary files /dev/null and b/docsrc/images/ui/r11.png differ
diff --git a/docsrc/images/ui/r12.png b/docsrc/images/ui/r12.png
new file mode 100644
index 0000000..3e208f0
Binary files /dev/null and b/docsrc/images/ui/r12.png differ
diff --git a/docsrc/images/ui/r13.png b/docsrc/images/ui/r13.png
new file mode 100644
index 0000000..bc982e9
Binary files /dev/null and b/docsrc/images/ui/r13.png differ
diff --git a/docsrc/images/ui/r13a.png b/docsrc/images/ui/r13a.png
new file mode 100644
index 0000000..835f450
Binary files /dev/null and b/docsrc/images/ui/r13a.png differ
diff --git a/docsrc/images/ui/r15.png b/docsrc/images/ui/r15.png
new file mode 100644
index 0000000..d0e1b1c
Binary files /dev/null and b/docsrc/images/ui/r15.png differ
diff --git a/docsrc/images/ui/r16.png b/docsrc/images/ui/r16.png
new file mode 100644
index 0000000..b4b2008
Binary files /dev/null and b/docsrc/images/ui/r16.png differ
diff --git a/docsrc/images/ui/r18.png b/docsrc/images/ui/r18.png
new file mode 100644
index 0000000..cc48375
Binary files /dev/null and b/docsrc/images/ui/r18.png differ
diff --git a/docsrc/images/ui/r19.png b/docsrc/images/ui/r19.png
new file mode 100644
index 0000000..004af7f
Binary files /dev/null and b/docsrc/images/ui/r19.png differ
diff --git a/docsrc/images/ui/r2.png b/docsrc/images/ui/r2.png
new file mode 100644
index 0000000..efd2462
Binary files /dev/null and b/docsrc/images/ui/r2.png differ
diff --git a/docsrc/images/ui/r22.png b/docsrc/images/ui/r22.png
new file mode 100644
index 0000000..4594683
Binary files /dev/null and b/docsrc/images/ui/r22.png differ
diff --git a/docsrc/images/ui/r23.png b/docsrc/images/ui/r23.png
new file mode 100644
index 0000000..96b52eb
Binary files /dev/null and b/docsrc/images/ui/r23.png differ
diff --git a/docsrc/images/ui/r24.png b/docsrc/images/ui/r24.png
new file mode 100644
index 0000000..e11be33
Binary files /dev/null and b/docsrc/images/ui/r24.png differ
diff --git a/docsrc/images/ui/r3.png b/docsrc/images/ui/r3.png
new file mode 100644
index 0000000..5948acc
Binary files /dev/null and b/docsrc/images/ui/r3.png differ
diff --git a/docsrc/images/ui/r4.png b/docsrc/images/ui/r4.png
new file mode 100644
index 0000000..be59801
Binary files /dev/null and b/docsrc/images/ui/r4.png differ
diff --git a/docsrc/images/ui/r5.png b/docsrc/images/ui/r5.png
new file mode 100644
index 0000000..cf47b4e
Binary files /dev/null and b/docsrc/images/ui/r5.png differ
diff --git a/docsrc/images/ui/r6.png b/docsrc/images/ui/r6.png
new file mode 100644
index 0000000..cd7267a
Binary files /dev/null and b/docsrc/images/ui/r6.png differ
diff --git a/docsrc/images/ui/r7.png b/docsrc/images/ui/r7.png
new file mode 100644
index 0000000..6bc0b2d
Binary files /dev/null and b/docsrc/images/ui/r7.png differ
diff --git a/docsrc/images/ui/r8.png b/docsrc/images/ui/r8.png
new file mode 100644
index 0000000..56b7bfd
Binary files /dev/null and b/docsrc/images/ui/r8.png differ
diff --git a/docsrc/images/ui/r9.png b/docsrc/images/ui/r9.png
new file mode 100644
index 0000000..a864e88
Binary files /dev/null and b/docsrc/images/ui/r9.png differ
diff --git a/docsrc/images/ui/rd1.png b/docsrc/images/ui/rd1.png
index 2d6fabd..acff0bf 100644
Binary files a/docsrc/images/ui/rd1.png and b/docsrc/images/ui/rd1.png differ
diff --git a/docsrc/images/ui/rd13.png b/docsrc/images/ui/rd13.png
index 8a8c8b8..b931173 100644
Binary files a/docsrc/images/ui/rd13.png and b/docsrc/images/ui/rd13.png differ
diff --git a/docsrc/images/ui/rd14.png b/docsrc/images/ui/rd14.png
index 2bc7e8f..c9aa8ba 100644
Binary files a/docsrc/images/ui/rd14.png and b/docsrc/images/ui/rd14.png differ
diff --git a/docsrc/images/ui/rd15.png b/docsrc/images/ui/rd15.png
index 8fd4f31..c5763e2 100644
Binary files a/docsrc/images/ui/rd15.png and b/docsrc/images/ui/rd15.png differ
diff --git a/docsrc/images/ui/rd2.png b/docsrc/images/ui/rd2.png
index 5a3da04..94a8b4c 100644
Binary files a/docsrc/images/ui/rd2.png and b/docsrc/images/ui/rd2.png differ
diff --git a/docsrc/images/ui/rd3.png b/docsrc/images/ui/rd3.png
index e121eaa..c50c739 100644
Binary files a/docsrc/images/ui/rd3.png and b/docsrc/images/ui/rd3.png differ
diff --git a/docsrc/images/ui/rd4.png b/docsrc/images/ui/rd4.png
index 8a24fed..39944b5 100644
Binary files a/docsrc/images/ui/rd4.png and b/docsrc/images/ui/rd4.png differ
diff --git a/docsrc/images/ui/rd5.png b/docsrc/images/ui/rd5.png
index 7b56d81..9382ac0 100644
Binary files a/docsrc/images/ui/rd5.png and b/docsrc/images/ui/rd5.png differ
diff --git a/docsrc/images/ui/rd6.png b/docsrc/images/ui/rd6.png
index fc359e1..b931173 100644
Binary files a/docsrc/images/ui/rd6.png and b/docsrc/images/ui/rd6.png differ
diff --git a/docsrc/images/ui/rd7.png b/docsrc/images/ui/rd7.png
index 4f392bf..0eb2d13 100644
Binary files a/docsrc/images/ui/rd7.png and b/docsrc/images/ui/rd7.png differ
diff --git a/docsrc/images/ui/rd8.png b/docsrc/images/ui/rd8.png
index 6bc6f26..29e4f12 100644
Binary files a/docsrc/images/ui/rd8.png and b/docsrc/images/ui/rd8.png differ
diff --git a/docsrc/images/ui/rd9.png b/docsrc/images/ui/rd9.png
index 24e7fe9..b6474f1 100644
Binary files a/docsrc/images/ui/rd9.png and b/docsrc/images/ui/rd9.png differ
diff --git a/docsrc/images/ui/rdfinsert1.png b/docsrc/images/ui/rdfinsert1.png
index 948d108..8f5317d 100644
Binary files a/docsrc/images/ui/rdfinsert1.png and b/docsrc/images/ui/rdfinsert1.png differ
diff --git a/docsrc/images/ui/rdfinsert2.png b/docsrc/images/ui/rdfinsert2.png
index 91ce8e1..cc050c6 100644
Binary files a/docsrc/images/ui/rdfinsert2.png and b/docsrc/images/ui/rdfinsert2.png differ
diff --git a/docsrc/images/ui/replt_ss_01.png b/docsrc/images/ui/replt_ss_01.png
index f793842..b9655c6 100644
Binary files a/docsrc/images/ui/replt_ss_01.png and b/docsrc/images/ui/replt_ss_01.png differ
diff --git a/docsrc/images/ui/replt_ss_add_01.png b/docsrc/images/ui/replt_ss_add_01.png
index a1f13da..95729bb 100644
Binary files a/docsrc/images/ui/replt_ss_add_01.png and b/docsrc/images/ui/replt_ss_add_01.png differ
diff --git a/docsrc/images/ui/replt_ss_add_02.png b/docsrc/images/ui/replt_ss_add_02.png
index 6b9e1dd..69cca26 100644
Binary files a/docsrc/images/ui/replt_ss_add_02.png and b/docsrc/images/ui/replt_ss_add_02.png differ
diff --git a/docsrc/images/ui/replt_ss_add_03.png b/docsrc/images/ui/replt_ss_add_03.png
index 993ca61..dcdad59 100644
Binary files a/docsrc/images/ui/replt_ss_add_03.png and b/docsrc/images/ui/replt_ss_add_03.png differ
diff --git a/docsrc/images/ui/replt_ss_add_04.png b/docsrc/images/ui/replt_ss_add_04.png
index f93b98c..d3395ba 100644
Binary files a/docsrc/images/ui/replt_ss_add_04.png and b/docsrc/images/ui/replt_ss_add_04.png differ
diff --git a/docsrc/images/ui/replt_ss_add_05.png b/docsrc/images/ui/replt_ss_add_05.png
index d7a5aa9..472fb6e 100644
Binary files a/docsrc/images/ui/replt_ss_add_05.png and b/docsrc/images/ui/replt_ss_add_05.png differ
diff --git a/docsrc/images/ui/replt_ss_add_06.png b/docsrc/images/ui/replt_ss_add_06.png
index 67612a2..489ab47 100644
Binary files a/docsrc/images/ui/replt_ss_add_06.png and b/docsrc/images/ui/replt_ss_add_06.png differ
diff --git a/docsrc/images/ui/replt_trans_sub_01.png b/docsrc/images/ui/replt_trans_sub_01.png
index 70cdded..3fd5231 100644
Binary files a/docsrc/images/ui/replt_trans_sub_01.png and b/docsrc/images/ui/replt_trans_sub_01.png differ
diff --git a/docsrc/images/ui/replt_trans_sub_02.png b/docsrc/images/ui/replt_trans_sub_02.png
index 5607d2d..04ca950 100644
Binary files a/docsrc/images/ui/replt_trans_sub_02.png and b/docsrc/images/ui/replt_trans_sub_02.png differ
diff --git a/docsrc/images/ui/repltranspub001.png b/docsrc/images/ui/repltranspub001.png
index 1ab671a..11c1445 100644
Binary files a/docsrc/images/ui/repltranspub001.png and b/docsrc/images/ui/repltranspub001.png differ
diff --git a/docsrc/images/ui/repltranspub002.png b/docsrc/images/ui/repltranspub002.png
index 694918d..5fb4cfb 100644
Binary files a/docsrc/images/ui/repltranspub002.png and b/docsrc/images/ui/repltranspub002.png differ
diff --git a/docsrc/images/ui/repltranspub002a.png b/docsrc/images/ui/repltranspub002a.png
index feaed52..dc3cfd5 100644
Binary files a/docsrc/images/ui/repltranspub002a.png and b/docsrc/images/ui/repltranspub002a.png differ
diff --git a/docsrc/images/ui/repltranspub003.png b/docsrc/images/ui/repltranspub003.png
index 8655f81..c12909d 100644
Binary files a/docsrc/images/ui/repltranspub003.png and b/docsrc/images/ui/repltranspub003.png differ
diff --git a/docsrc/images/ui/repltranspub004.png b/docsrc/images/ui/repltranspub004.png
index d047d63..dba6902 100644
Binary files a/docsrc/images/ui/repltranspub004.png and b/docsrc/images/ui/repltranspub004.png differ
diff --git a/docsrc/images/ui/repltranspub005.png b/docsrc/images/ui/repltranspub005.png
index eb42757..e2388bf 100644
Binary files a/docsrc/images/ui/repltranspub005.png and b/docsrc/images/ui/repltranspub005.png differ
diff --git a/docsrc/images/ui/repltranspub006.png b/docsrc/images/ui/repltranspub006.png
index 151489b..a3d245b 100644
Binary files a/docsrc/images/ui/repltranspub006.png and b/docsrc/images/ui/repltranspub006.png differ
diff --git a/docsrc/images/ui/ria1.png b/docsrc/images/ui/ria1.png
new file mode 100644
index 0000000..ab15b36
Binary files /dev/null and b/docsrc/images/ui/ria1.png differ
diff --git a/docsrc/images/ui/ria10.png b/docsrc/images/ui/ria10.png
new file mode 100644
index 0000000..d8181bb
Binary files /dev/null and b/docsrc/images/ui/ria10.png differ
diff --git a/docsrc/images/ui/ria2.png b/docsrc/images/ui/ria2.png
new file mode 100644
index 0000000..571f1a5
Binary files /dev/null and b/docsrc/images/ui/ria2.png differ
diff --git a/docsrc/images/ui/ria3.png b/docsrc/images/ui/ria3.png
new file mode 100644
index 0000000..d3cbf6d
Binary files /dev/null and b/docsrc/images/ui/ria3.png differ
diff --git a/docsrc/images/ui/ria4.png b/docsrc/images/ui/ria4.png
new file mode 100644
index 0000000..dd05b65
Binary files /dev/null and b/docsrc/images/ui/ria4.png differ
diff --git a/docsrc/images/ui/ria5.png b/docsrc/images/ui/ria5.png
new file mode 100644
index 0000000..37eaa41
Binary files /dev/null and b/docsrc/images/ui/ria5.png differ
diff --git a/docsrc/images/ui/ria6.png b/docsrc/images/ui/ria6.png
new file mode 100644
index 0000000..5703b6c
Binary files /dev/null and b/docsrc/images/ui/ria6.png differ
diff --git a/docsrc/images/ui/ria7.png b/docsrc/images/ui/ria7.png
new file mode 100644
index 0000000..ee964b4
Binary files /dev/null and b/docsrc/images/ui/ria7.png differ
diff --git a/docsrc/images/ui/ria8.png b/docsrc/images/ui/ria8.png
new file mode 100644
index 0000000..39092eb
Binary files /dev/null and b/docsrc/images/ui/ria8.png differ
diff --git a/docsrc/images/ui/ria9.png b/docsrc/images/ui/ria9.png
new file mode 100644
index 0000000..1fa9e4a
Binary files /dev/null and b/docsrc/images/ui/ria9.png differ
diff --git a/docsrc/images/ui/riad1.png b/docsrc/images/ui/riad1.png
new file mode 100644
index 0000000..677b208
Binary files /dev/null and b/docsrc/images/ui/riad1.png differ
diff --git a/docsrc/images/ui/riad2.png b/docsrc/images/ui/riad2.png
new file mode 100644
index 0000000..d3c6086
Binary files /dev/null and b/docsrc/images/ui/riad2.png differ
diff --git a/docsrc/images/ui/riad3.png b/docsrc/images/ui/riad3.png
new file mode 100644
index 0000000..a72fe8e
Binary files /dev/null and b/docsrc/images/ui/riad3.png differ
diff --git a/docsrc/images/ui/riad4.png b/docsrc/images/ui/riad4.png
new file mode 100644
index 0000000..97cda10
Binary files /dev/null and b/docsrc/images/ui/riad4.png differ
diff --git a/docsrc/images/ui/rmtconnected_01.png b/docsrc/images/ui/rmtconnected_01.png
index 950ff00..65d37fd 100644
Binary files a/docsrc/images/ui/rmtconnected_01.png and b/docsrc/images/ui/rmtconnected_01.png differ
diff --git a/docsrc/images/ui/rth001.png b/docsrc/images/ui/rth001.png
index abf3ef5..0b9c0a5 100644
Binary files a/docsrc/images/ui/rth001.png and b/docsrc/images/ui/rth001.png differ
diff --git a/docsrc/images/ui/rth002.png b/docsrc/images/ui/rth002.png
index ec95d8e..e1da6ca 100644
Binary files a/docsrc/images/ui/rth002.png and b/docsrc/images/ui/rth002.png differ
diff --git a/docsrc/images/ui/rth003.png b/docsrc/images/ui/rth003.png
index a2a32d8..1fbf375 100644
Binary files a/docsrc/images/ui/rth003.png and b/docsrc/images/ui/rth003.png differ
diff --git a/docsrc/images/ui/s1.png b/docsrc/images/ui/s1.png
index da4801b..dd4a572 100644
Binary files a/docsrc/images/ui/s1.png and b/docsrc/images/ui/s1.png differ
diff --git a/docsrc/images/ui/s2.png b/docsrc/images/ui/s2.png
index b0a74c5..3d922c4 100644
Binary files a/docsrc/images/ui/s2.png and b/docsrc/images/ui/s2.png differ
diff --git a/docsrc/images/ui/s3.png b/docsrc/images/ui/s3.png
index 841cdd6..c4f03d9 100644
Binary files a/docsrc/images/ui/s3.png and b/docsrc/images/ui/s3.png differ
diff --git a/docsrc/images/ui/s4.png b/docsrc/images/ui/s4.png
index e160c79..16ba080 100644
Binary files a/docsrc/images/ui/s4.png and b/docsrc/images/ui/s4.png differ
diff --git a/docsrc/images/ui/s5.png b/docsrc/images/ui/s5.png
index 4bb27db..271f14a 100644
Binary files a/docsrc/images/ui/s5.png and b/docsrc/images/ui/s5.png differ
diff --git a/docsrc/images/ui/scp1.png b/docsrc/images/ui/scp1.png
new file mode 100644
index 0000000..aea4949
Binary files /dev/null and b/docsrc/images/ui/scp1.png differ
diff --git a/docsrc/images/ui/scp10.png b/docsrc/images/ui/scp10.png
new file mode 100644
index 0000000..5fb4600
Binary files /dev/null and b/docsrc/images/ui/scp10.png differ
diff --git a/docsrc/images/ui/scp11.png b/docsrc/images/ui/scp11.png
new file mode 100644
index 0000000..d114d1e
Binary files /dev/null and b/docsrc/images/ui/scp11.png differ
diff --git a/docsrc/images/ui/scp12.png b/docsrc/images/ui/scp12.png
new file mode 100644
index 0000000..6406aae
Binary files /dev/null and b/docsrc/images/ui/scp12.png differ
diff --git a/docsrc/images/ui/scp13.png b/docsrc/images/ui/scp13.png
new file mode 100644
index 0000000..642098b
Binary files /dev/null and b/docsrc/images/ui/scp13.png differ
diff --git a/docsrc/images/ui/scp14.png b/docsrc/images/ui/scp14.png
new file mode 100644
index 0000000..3d6eeb8
Binary files /dev/null and b/docsrc/images/ui/scp14.png differ
diff --git a/docsrc/images/ui/scp2.png b/docsrc/images/ui/scp2.png
new file mode 100644
index 0000000..2786a64
Binary files /dev/null and b/docsrc/images/ui/scp2.png differ
diff --git a/docsrc/images/ui/scp3.png b/docsrc/images/ui/scp3.png
new file mode 100644
index 0000000..c22de5b
Binary files /dev/null and b/docsrc/images/ui/scp3.png differ
diff --git a/docsrc/images/ui/scp4.png b/docsrc/images/ui/scp4.png
new file mode 100644
index 0000000..9744cde
Binary files /dev/null and b/docsrc/images/ui/scp4.png differ
diff --git a/docsrc/images/ui/scp5.png b/docsrc/images/ui/scp5.png
new file mode 100644
index 0000000..2aeca02
Binary files /dev/null and b/docsrc/images/ui/scp5.png differ
diff --git a/docsrc/images/ui/scp6.png b/docsrc/images/ui/scp6.png
new file mode 100644
index 0000000..f1f37ca
Binary files /dev/null and b/docsrc/images/ui/scp6.png differ
diff --git a/docsrc/images/ui/scp7.png b/docsrc/images/ui/scp7.png
new file mode 100644
index 0000000..9f512ed
Binary files /dev/null and b/docsrc/images/ui/scp7.png differ
diff --git a/docsrc/images/ui/scp8.png b/docsrc/images/ui/scp8.png
new file mode 100644
index 0000000..5c5a0c6
Binary files /dev/null and b/docsrc/images/ui/scp8.png differ
diff --git a/docsrc/images/ui/scp9.png b/docsrc/images/ui/scp9.png
new file mode 100644
index 0000000..0db820d
Binary files /dev/null and b/docsrc/images/ui/scp9.png differ
diff --git a/docsrc/images/ui/si1.png b/docsrc/images/ui/si1.png
new file mode 100644
index 0000000..a9a5e01
Binary files /dev/null and b/docsrc/images/ui/si1.png differ
diff --git a/docsrc/images/ui/si2.png b/docsrc/images/ui/si2.png
new file mode 100644
index 0000000..a189aac
Binary files /dev/null and b/docsrc/images/ui/si2.png differ
diff --git a/docsrc/images/ui/si3.png b/docsrc/images/ui/si3.png
new file mode 100644
index 0000000..15f5ab7
Binary files /dev/null and b/docsrc/images/ui/si3.png differ
diff --git a/docsrc/images/ui/si4.png b/docsrc/images/ui/si4.png
new file mode 100644
index 0000000..71e3aaa
Binary files /dev/null and b/docsrc/images/ui/si4.png differ
diff --git a/docsrc/images/ui/si5.png b/docsrc/images/ui/si5.png
new file mode 100644
index 0000000..bd004da
Binary files /dev/null and b/docsrc/images/ui/si5.png differ
diff --git a/docsrc/images/ui/si6.png b/docsrc/images/ui/si6.png
new file mode 100644
index 0000000..72db148
Binary files /dev/null and b/docsrc/images/ui/si6.png differ
diff --git a/docsrc/images/ui/si7.png b/docsrc/images/ui/si7.png
new file mode 100644
index 0000000..9ab7b6c
Binary files /dev/null and b/docsrc/images/ui/si7.png differ
diff --git a/docsrc/images/ui/so1.png b/docsrc/images/ui/so1.png
new file mode 100644
index 0000000..bd2d9d1
Binary files /dev/null and b/docsrc/images/ui/so1.png differ
diff --git a/docsrc/images/ui/so11.png b/docsrc/images/ui/so11.png
new file mode 100644
index 0000000..6a62d69
Binary files /dev/null and b/docsrc/images/ui/so11.png differ
diff --git a/docsrc/images/ui/so12.png b/docsrc/images/ui/so12.png
new file mode 100644
index 0000000..f530b7c
Binary files /dev/null and b/docsrc/images/ui/so12.png differ
diff --git a/docsrc/images/ui/so13.png b/docsrc/images/ui/so13.png
new file mode 100644
index 0000000..e479fd9
Binary files /dev/null and b/docsrc/images/ui/so13.png differ
diff --git a/docsrc/images/ui/so14.png b/docsrc/images/ui/so14.png
new file mode 100644
index 0000000..612e292
Binary files /dev/null and b/docsrc/images/ui/so14.png differ
diff --git a/docsrc/images/ui/so15.png b/docsrc/images/ui/so15.png
new file mode 100644
index 0000000..9211b5a
Binary files /dev/null and b/docsrc/images/ui/so15.png differ
diff --git a/docsrc/images/ui/so16.png b/docsrc/images/ui/so16.png
new file mode 100644
index 0000000..8a154d9
Binary files /dev/null and b/docsrc/images/ui/so16.png differ
diff --git a/docsrc/images/ui/so2.png b/docsrc/images/ui/so2.png
new file mode 100644
index 0000000..19c0f55
Binary files /dev/null and b/docsrc/images/ui/so2.png differ
diff --git a/docsrc/images/ui/so3.png b/docsrc/images/ui/so3.png
new file mode 100644
index 0000000..e41d8ca
Binary files /dev/null and b/docsrc/images/ui/so3.png differ
diff --git a/docsrc/images/ui/so4.png b/docsrc/images/ui/so4.png
new file mode 100644
index 0000000..1b9148c
Binary files /dev/null and b/docsrc/images/ui/so4.png differ
diff --git a/docsrc/images/ui/so5.png b/docsrc/images/ui/so5.png
new file mode 100644
index 0000000..5f9f323
Binary files /dev/null and b/docsrc/images/ui/so5.png differ
diff --git a/docsrc/images/ui/so6.png b/docsrc/images/ui/so6.png
new file mode 100644
index 0000000..c5adbdb
Binary files /dev/null and b/docsrc/images/ui/so6.png differ
diff --git a/docsrc/images/ui/so7.png b/docsrc/images/ui/so7.png
new file mode 100644
index 0000000..c2a8da4
Binary files /dev/null and b/docsrc/images/ui/so7.png differ
diff --git a/docsrc/images/ui/so8.png b/docsrc/images/ui/so8.png
new file mode 100644
index 0000000..54f3add
Binary files /dev/null and b/docsrc/images/ui/so8.png differ
diff --git a/docsrc/images/ui/so9.png b/docsrc/images/ui/so9.png
new file mode 100644
index 0000000..1d9a2a9
Binary files /dev/null and b/docsrc/images/ui/so9.png differ
diff --git a/docsrc/images/ui/sparqlwinf1.png b/docsrc/images/ui/sparqlwinf1.png
new file mode 100644
index 0000000..427b1ab
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf1.png differ
diff --git a/docsrc/images/ui/sparqlwinf10.png b/docsrc/images/ui/sparqlwinf10.png
new file mode 100644
index 0000000..59cac1c
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf10.png differ
diff --git a/docsrc/images/ui/sparqlwinf11.png b/docsrc/images/ui/sparqlwinf11.png
new file mode 100644
index 0000000..8d81adf
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf11.png differ
diff --git a/docsrc/images/ui/sparqlwinf12.png b/docsrc/images/ui/sparqlwinf12.png
new file mode 100644
index 0000000..beffcf6
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf12.png differ
diff --git a/docsrc/images/ui/sparqlwinf13.png b/docsrc/images/ui/sparqlwinf13.png
new file mode 100644
index 0000000..f2b94dc
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf13.png differ
diff --git a/docsrc/images/ui/sparqlwinf14.png b/docsrc/images/ui/sparqlwinf14.png
new file mode 100644
index 0000000..72d8a34
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf14.png differ
diff --git a/docsrc/images/ui/sparqlwinf15.png b/docsrc/images/ui/sparqlwinf15.png
new file mode 100644
index 0000000..52214ef
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf15.png differ
diff --git a/docsrc/images/ui/sparqlwinf16.png b/docsrc/images/ui/sparqlwinf16.png
new file mode 100644
index 0000000..629da9c
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf16.png differ
diff --git a/docsrc/images/ui/sparqlwinf17.png b/docsrc/images/ui/sparqlwinf17.png
new file mode 100644
index 0000000..9c21325
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf17.png differ
diff --git a/docsrc/images/ui/sparqlwinf18.png b/docsrc/images/ui/sparqlwinf18.png
new file mode 100644
index 0000000..3282453
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf18.png differ
diff --git a/docsrc/images/ui/sparqlwinf19.png b/docsrc/images/ui/sparqlwinf19.png
new file mode 100644
index 0000000..0aa95ee
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf19.png differ
diff --git a/docsrc/images/ui/sparqlwinf2.png b/docsrc/images/ui/sparqlwinf2.png
new file mode 100644
index 0000000..67941aa
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf2.png differ
diff --git a/docsrc/images/ui/sparqlwinf20.png b/docsrc/images/ui/sparqlwinf20.png
new file mode 100644
index 0000000..ba5c2ca
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf20.png differ
diff --git a/docsrc/images/ui/sparqlwinf21.png b/docsrc/images/ui/sparqlwinf21.png
new file mode 100644
index 0000000..aa51f21
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf21.png differ
diff --git a/docsrc/images/ui/sparqlwinf22.png b/docsrc/images/ui/sparqlwinf22.png
new file mode 100644
index 0000000..094dba3
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf22.png differ
diff --git a/docsrc/images/ui/sparqlwinf23.png b/docsrc/images/ui/sparqlwinf23.png
new file mode 100644
index 0000000..870313a
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf23.png differ
diff --git a/docsrc/images/ui/sparqlwinf24.png b/docsrc/images/ui/sparqlwinf24.png
new file mode 100644
index 0000000..b8aaa8c
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf24.png differ
diff --git a/docsrc/images/ui/sparqlwinf25.png b/docsrc/images/ui/sparqlwinf25.png
new file mode 100644
index 0000000..b3694d3
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf25.png differ
diff --git a/docsrc/images/ui/sparqlwinf26.png b/docsrc/images/ui/sparqlwinf26.png
new file mode 100644
index 0000000..51e6ed1
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf26.png differ
diff --git a/docsrc/images/ui/sparqlwinf27.png b/docsrc/images/ui/sparqlwinf27.png
new file mode 100644
index 0000000..2c2f0c5
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf27.png differ
diff --git a/docsrc/images/ui/sparqlwinf28.png b/docsrc/images/ui/sparqlwinf28.png
new file mode 100644
index 0000000..20babe9
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf28.png differ
diff --git a/docsrc/images/ui/sparqlwinf29.png b/docsrc/images/ui/sparqlwinf29.png
new file mode 100644
index 0000000..920e04d
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf29.png differ
diff --git a/docsrc/images/ui/sparqlwinf3.png b/docsrc/images/ui/sparqlwinf3.png
new file mode 100644
index 0000000..e5392fb
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf3.png differ
diff --git a/docsrc/images/ui/sparqlwinf30.png b/docsrc/images/ui/sparqlwinf30.png
new file mode 100644
index 0000000..c1e1aed
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf30.png differ
diff --git a/docsrc/images/ui/sparqlwinf31.png b/docsrc/images/ui/sparqlwinf31.png
new file mode 100644
index 0000000..9df7cad
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf31.png differ
diff --git a/docsrc/images/ui/sparqlwinf32.png b/docsrc/images/ui/sparqlwinf32.png
new file mode 100644
index 0000000..71d5fb1
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf32.png differ
diff --git a/docsrc/images/ui/sparqlwinf33.png b/docsrc/images/ui/sparqlwinf33.png
new file mode 100644
index 0000000..8eff4d7
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf33.png differ
diff --git a/docsrc/images/ui/sparqlwinf34.png b/docsrc/images/ui/sparqlwinf34.png
new file mode 100644
index 0000000..1b65b25
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf34.png differ
diff --git a/docsrc/images/ui/sparqlwinf35.png b/docsrc/images/ui/sparqlwinf35.png
new file mode 100644
index 0000000..bfa6792
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf35.png differ
diff --git a/docsrc/images/ui/sparqlwinf4.png b/docsrc/images/ui/sparqlwinf4.png
new file mode 100644
index 0000000..e8ca250
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf4.png differ
diff --git a/docsrc/images/ui/sparqlwinf5.png b/docsrc/images/ui/sparqlwinf5.png
new file mode 100644
index 0000000..bc339dc
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf5.png differ
diff --git a/docsrc/images/ui/sparqlwinf6.png b/docsrc/images/ui/sparqlwinf6.png
new file mode 100644
index 0000000..0d69b18
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf6.png differ
diff --git a/docsrc/images/ui/sparqlwinf7.png b/docsrc/images/ui/sparqlwinf7.png
new file mode 100644
index 0000000..8d81adf
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf7.png differ
diff --git a/docsrc/images/ui/sparqlwinf8.png b/docsrc/images/ui/sparqlwinf8.png
new file mode 100644
index 0000000..f60d7b3
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf8.png differ
diff --git a/docsrc/images/ui/sparqlwinf9.png b/docsrc/images/ui/sparqlwinf9.png
new file mode 100644
index 0000000..26dcc97
Binary files /dev/null and b/docsrc/images/ui/sparqlwinf9.png differ
diff --git a/docsrc/images/ui/spbi1.png b/docsrc/images/ui/spbi1.png
new file mode 100644
index 0000000..742a624
Binary files /dev/null and b/docsrc/images/ui/spbi1.png differ
diff --git a/docsrc/images/ui/spong2.png b/docsrc/images/ui/spong2.png
index ea9db31..6b5bc26 100644
Binary files a/docsrc/images/ui/spong2.png and b/docsrc/images/ui/spong2.png differ
diff --git a/docsrc/images/ui/spong4.png b/docsrc/images/ui/spong4.png
index ea9db31..208392a 100644
Binary files a/docsrc/images/ui/spong4.png and b/docsrc/images/ui/spong4.png differ
diff --git a/docsrc/images/ui/spqc1.png b/docsrc/images/ui/spqc1.png
new file mode 100644
index 0000000..d78b9f1
Binary files /dev/null and b/docsrc/images/ui/spqc1.png differ
diff --git a/docsrc/images/ui/sql_xml_mng_01.png b/docsrc/images/ui/sql_xml_mng_01.png
index 85863d3..72ff964 100644
Binary files a/docsrc/images/ui/sql_xml_mng_01.png and b/docsrc/images/ui/sql_xml_mng_01.png differ
diff --git a/docsrc/images/ui/sts_dsk_01.png b/docsrc/images/ui/sts_dsk_01.png
index 4a4ba58..8b9f892 100644
Binary files a/docsrc/images/ui/sts_dsk_01.png and b/docsrc/images/ui/sts_dsk_01.png differ
diff --git a/docsrc/images/ui/sts_gen_01.png b/docsrc/images/ui/sts_gen_01.png
index f02ce62..c9486cb 100644
Binary files a/docsrc/images/ui/sts_gen_01.png and b/docsrc/images/ui/sts_gen_01.png differ
diff --git a/docsrc/images/ui/sts_httpsvr_01.png b/docsrc/images/ui/sts_httpsvr_01.png
index 6179fc1..36b9e2a 100644
Binary files a/docsrc/images/ui/sts_httpsvr_01.png and b/docsrc/images/ui/sts_httpsvr_01.png differ
diff --git a/docsrc/images/ui/sts_idx_01.png b/docsrc/images/ui/sts_idx_01.png
index 5f9a537..5b55cba 100644
Binary files a/docsrc/images/ui/sts_idx_01.png and b/docsrc/images/ui/sts_idx_01.png differ
diff --git a/docsrc/images/ui/sts_profile_01.png b/docsrc/images/ui/sts_profile_01.png
index a6c3a3c..ee72590 100644
Binary files a/docsrc/images/ui/sts_profile_01.png and b/docsrc/images/ui/sts_profile_01.png differ
diff --git a/docsrc/images/ui/topo-chain.png b/docsrc/images/ui/topo-chain.png
new file mode 100644
index 0000000..77c79cc
Binary files /dev/null and b/docsrc/images/ui/topo-chain.png differ
diff --git a/docsrc/images/ui/topo-scenario.png b/docsrc/images/ui/topo-scenario.png
new file mode 100644
index 0000000..5fe8aaa
Binary files /dev/null and b/docsrc/images/ui/topo-scenario.png differ
diff --git a/docsrc/images/ui/topo-star.png b/docsrc/images/ui/topo-star.png
new file mode 100644
index 0000000..efbcd12
Binary files /dev/null and b/docsrc/images/ui/topo-star.png differ
diff --git a/docsrc/images/ui/trs1.png b/docsrc/images/ui/trs1.png
new file mode 100644
index 0000000..e73ce10
Binary files /dev/null and b/docsrc/images/ui/trs1.png differ
diff --git a/docsrc/images/ui/trs2.png b/docsrc/images/ui/trs2.png
new file mode 100644
index 0000000..1518b36
Binary files /dev/null and b/docsrc/images/ui/trs2.png differ
diff --git a/docsrc/images/ui/uado1.png b/docsrc/images/ui/uado1.png
new file mode 100644
index 0000000..ea1d86d
Binary files /dev/null and b/docsrc/images/ui/uado1.png differ
diff --git a/docsrc/images/ui/uado10.png b/docsrc/images/ui/uado10.png
new file mode 100644
index 0000000..5db5fd9
Binary files /dev/null and b/docsrc/images/ui/uado10.png differ
diff --git a/docsrc/images/ui/uado11.png b/docsrc/images/ui/uado11.png
new file mode 100644
index 0000000..16bd38e
Binary files /dev/null and b/docsrc/images/ui/uado11.png differ
diff --git a/docsrc/images/ui/uado12.png b/docsrc/images/ui/uado12.png
new file mode 100644
index 0000000..df0e638
Binary files /dev/null and b/docsrc/images/ui/uado12.png differ
diff --git a/docsrc/images/ui/uado13.png b/docsrc/images/ui/uado13.png
new file mode 100644
index 0000000..bfcb8f7
Binary files /dev/null and b/docsrc/images/ui/uado13.png differ
diff --git a/docsrc/images/ui/uado14.png b/docsrc/images/ui/uado14.png
new file mode 100644
index 0000000..670d1ef
Binary files /dev/null and b/docsrc/images/ui/uado14.png differ
diff --git a/docsrc/images/ui/uado15.png b/docsrc/images/ui/uado15.png
new file mode 100644
index 0000000..4e4fa15
Binary files /dev/null and b/docsrc/images/ui/uado15.png differ
diff --git a/docsrc/images/ui/uado16.png b/docsrc/images/ui/uado16.png
new file mode 100644
index 0000000..cd99f69
Binary files /dev/null and b/docsrc/images/ui/uado16.png differ
diff --git a/docsrc/images/ui/uado17.png b/docsrc/images/ui/uado17.png
new file mode 100644
index 0000000..9542ff9
Binary files /dev/null and b/docsrc/images/ui/uado17.png differ
diff --git a/docsrc/images/ui/uado18.png b/docsrc/images/ui/uado18.png
new file mode 100644
index 0000000..0d10ae0
Binary files /dev/null and b/docsrc/images/ui/uado18.png differ
diff --git a/docsrc/images/ui/uado19.png b/docsrc/images/ui/uado19.png
new file mode 100644
index 0000000..7313a66
Binary files /dev/null and b/docsrc/images/ui/uado19.png differ
diff --git a/docsrc/images/ui/uado2.png b/docsrc/images/ui/uado2.png
new file mode 100644
index 0000000..74e43be
Binary files /dev/null and b/docsrc/images/ui/uado2.png differ
diff --git a/docsrc/images/ui/uado20.png b/docsrc/images/ui/uado20.png
new file mode 100644
index 0000000..85e7272
Binary files /dev/null and b/docsrc/images/ui/uado20.png differ
diff --git a/docsrc/images/ui/uado21.png b/docsrc/images/ui/uado21.png
new file mode 100644
index 0000000..41d416e
Binary files /dev/null and b/docsrc/images/ui/uado21.png differ
diff --git a/docsrc/images/ui/uado3.png b/docsrc/images/ui/uado3.png
new file mode 100644
index 0000000..e48e3fe
Binary files /dev/null and b/docsrc/images/ui/uado3.png differ
diff --git a/docsrc/images/ui/uado4.png b/docsrc/images/ui/uado4.png
new file mode 100644
index 0000000..e6823f8
Binary files /dev/null and b/docsrc/images/ui/uado4.png differ
diff --git a/docsrc/images/ui/uado5.png b/docsrc/images/ui/uado5.png
new file mode 100644
index 0000000..ce3aabf
Binary files /dev/null and b/docsrc/images/ui/uado5.png differ
diff --git a/docsrc/images/ui/uado6.png b/docsrc/images/ui/uado6.png
new file mode 100644
index 0000000..b716f0b
Binary files /dev/null and b/docsrc/images/ui/uado6.png differ
diff --git a/docsrc/images/ui/uado7.png b/docsrc/images/ui/uado7.png
new file mode 100644
index 0000000..e9b4084
Binary files /dev/null and b/docsrc/images/ui/uado7.png differ
diff --git a/docsrc/images/ui/uado8.png b/docsrc/images/ui/uado8.png
new file mode 100644
index 0000000..4c7c425
Binary files /dev/null and b/docsrc/images/ui/uado8.png differ
diff --git a/docsrc/images/ui/uado9.png b/docsrc/images/ui/uado9.png
new file mode 100644
index 0000000..08d8ce9
Binary files /dev/null and b/docsrc/images/ui/uado9.png differ
diff --git a/docsrc/images/ui/uados1.png b/docsrc/images/ui/uados1.png
new file mode 100644
index 0000000..fedd039
Binary files /dev/null and b/docsrc/images/ui/uados1.png differ
diff --git a/docsrc/images/ui/uc1.png b/docsrc/images/ui/uc1.png
index 7ecad1b..39435bb 100644
Binary files a/docsrc/images/ui/uc1.png and b/docsrc/images/ui/uc1.png differ
diff --git a/docsrc/images/ui/uc2.png b/docsrc/images/ui/uc2.png
index 7bd4bce..6bfcbbe 100644
Binary files a/docsrc/images/ui/uc2.png and b/docsrc/images/ui/uc2.png differ
diff --git a/docsrc/images/ui/uc3.png b/docsrc/images/ui/uc3.png
index c60f9ce..d20aa4e 100644
Binary files a/docsrc/images/ui/uc3.png and b/docsrc/images/ui/uc3.png differ
diff --git a/docsrc/images/ui/ufile.png b/docsrc/images/ui/ufile.png
new file mode 100644
index 0000000..bf4269d
Binary files /dev/null and b/docsrc/images/ui/ufile.png differ
diff --git a/docsrc/images/ui/usr1.png b/docsrc/images/ui/usr1.png
index 1a79cc4..7d972f7 100644
Binary files a/docsrc/images/ui/usr1.png and b/docsrc/images/ui/usr1.png differ
diff --git a/docsrc/images/ui/usr2.png b/docsrc/images/ui/usr2.png
index a938477..f2361a6 100644
Binary files a/docsrc/images/ui/usr2.png and b/docsrc/images/ui/usr2.png differ
diff --git a/docsrc/images/ui/usrt.png b/docsrc/images/ui/usrt.png
new file mode 100644
index 0000000..7c100ac
Binary files /dev/null and b/docsrc/images/ui/usrt.png differ
diff --git a/docsrc/images/ui/virtdir1.png b/docsrc/images/ui/virtdir1.png
index 1a3d27d..14eb48a 100644
Binary files a/docsrc/images/ui/virtdir1.png and b/docsrc/images/ui/virtdir1.png differ
diff --git a/docsrc/images/ui/virtdir2.png b/docsrc/images/ui/virtdir2.png
index 34532af..afc3f64 100644
Binary files a/docsrc/images/ui/virtdir2.png and b/docsrc/images/ui/virtdir2.png differ
diff --git a/docsrc/images/ui/virtdir3.png b/docsrc/images/ui/virtdir3.png
index 4260709..ed23fc4 100644
Binary files a/docsrc/images/ui/virtdir3.png and b/docsrc/images/ui/virtdir3.png differ
diff --git a/docsrc/images/ui/virtdir4.png b/docsrc/images/ui/virtdir4.png
index 53684f3..87fc31f 100644
Binary files a/docsrc/images/ui/virtdir4.png and b/docsrc/images/ui/virtdir4.png differ
diff --git a/docsrc/images/ui/virtdir5.png b/docsrc/images/ui/virtdir5.png
index 858d304..869a27d 100644
Binary files a/docsrc/images/ui/virtdir5.png and b/docsrc/images/ui/virtdir5.png differ
diff --git a/docsrc/images/ui/virtdsn_01.png b/docsrc/images/ui/virtdsn_01.png
index 2e433cf..467232d 100644
Binary files a/docsrc/images/ui/virtdsn_01.png and b/docsrc/images/ui/virtdsn_01.png differ
diff --git a/docsrc/images/ui/virthost2.png b/docsrc/images/ui/virthost2.png
index 629e100..c975945 100644
Binary files a/docsrc/images/ui/virthost2.png and b/docsrc/images/ui/virthost2.png differ
diff --git a/docsrc/images/ui/virthost3.png b/docsrc/images/ui/virthost3.png
index 4953ff3..0d60267 100644
Binary files a/docsrc/images/ui/virthost3.png and b/docsrc/images/ui/virthost3.png differ
diff --git a/docsrc/images/ui/virthost3a.png b/docsrc/images/ui/virthost3a.png
index a9f31da..262eaba 100644
Binary files a/docsrc/images/ui/virthost3a.png and b/docsrc/images/ui/virthost3a.png differ
diff --git a/docsrc/images/ui/virthost4.png b/docsrc/images/ui/virthost4.png
index 84d3394..629b271 100644
Binary files a/docsrc/images/ui/virthost4.png and b/docsrc/images/ui/virthost4.png differ
diff --git a/docsrc/images/ui/winpinst14.png b/docsrc/images/ui/winpinst14.png
new file mode 100644
index 0000000..cc75705
Binary files /dev/null and b/docsrc/images/ui/winpinst14.png differ
diff --git a/docsrc/images/ui/winpinst15.png b/docsrc/images/ui/winpinst15.png
new file mode 100644
index 0000000..aad456a
Binary files /dev/null and b/docsrc/images/ui/winpinst15.png differ
diff --git a/docsrc/images/inst/v50pex8614.png b/docsrc/images/ui/winpinst16.png
similarity index 100%
copy from docsrc/images/inst/v50pex8614.png
copy to docsrc/images/ui/winpinst16.png
diff --git a/docsrc/images/ui/winpinst17.png b/docsrc/images/ui/winpinst17.png
new file mode 100644
index 0000000..052da9e
Binary files /dev/null and b/docsrc/images/ui/winpinst17.png differ
diff --git a/docsrc/images/ui/wsdlimp001.png b/docsrc/images/ui/wsdlimp001.png
index db56313..7ccba25 100644
Binary files a/docsrc/images/ui/wsdlimp001.png and b/docsrc/images/ui/wsdlimp001.png differ
diff --git a/docsrc/images/ui/wsdlimp002.png b/docsrc/images/ui/wsdlimp002.png
index cb6b129..f524cf3 100644
Binary files a/docsrc/images/ui/wsdlimp002.png and b/docsrc/images/ui/wsdlimp002.png differ
diff --git a/docsrc/images/webdav.png b/docsrc/images/webdav.png
index 1166a0a..d85eda2 100644
Binary files a/docsrc/images/webdav.png and b/docsrc/images/webdav.png differ
diff --git a/docsrc/images/webservices.png b/docsrc/images/webservices.png
index b292046..a3ce4f2 100644
Binary files a/docsrc/images/webservices.png and b/docsrc/images/webservices.png differ
diff --git a/docsrc/images/xmltemplate001.png b/docsrc/images/xmltemplate001.png
index 2c08c6a..690925e 100644
Binary files a/docsrc/images/xmltemplate001.png and b/docsrc/images/xmltemplate001.png differ
diff --git a/docsrc/images/xmltemplate002.png b/docsrc/images/xmltemplate002.png
index 76ed9ee..e5e1a59 100644
Binary files a/docsrc/images/xmltemplate002.png and b/docsrc/images/xmltemplate002.png differ
diff --git a/docsrc/images/xmltemplate002a.png b/docsrc/images/xmltemplate002a.png
index 4540b32..0cca808 100644
Binary files a/docsrc/images/xmltemplate002a.png and b/docsrc/images/xmltemplate002a.png differ
diff --git a/docsrc/images/xmltemplate004.png b/docsrc/images/xmltemplate004.png
index 603748c..394c030 100644
Binary files a/docsrc/images/xmltemplate004.png and b/docsrc/images/xmltemplate004.png differ
diff --git a/docsrc/images/xmltemplate005.png b/docsrc/images/xmltemplate005.png
index b05a0f9..05184bd 100644
Binary files a/docsrc/images/xmltemplate005.png and b/docsrc/images/xmltemplate005.png differ
diff --git a/docsrc/images/xmltemplate007.png b/docsrc/images/xmltemplate007.png
index 8a1931a..9bb7697 100644
Binary files a/docsrc/images/xmltemplate007.png and b/docsrc/images/xmltemplate007.png differ
diff --git a/docsrc/images/xmltemplate008.png b/docsrc/images/xmltemplate008.png
index dc6f631..972ee0e 100644
Binary files a/docsrc/images/xmltemplate008.png and b/docsrc/images/xmltemplate008.png differ
diff --git a/docsrc/images/xmltemplate009.png b/docsrc/images/xmltemplate009.png
index 00314cd..c840a56 100644
Binary files a/docsrc/images/xmltemplate009.png and b/docsrc/images/xmltemplate009.png differ
diff --git a/docsrc/images/xmltemplate010.png b/docsrc/images/xmltemplate010.png
index 4f52ff6..16b0739 100644
Binary files a/docsrc/images/xmltemplate010.png and b/docsrc/images/xmltemplate010.png differ
diff --git a/docsrc/index.html b/docsrc/index.html
index 226e0ff..c96c500 100644
--- a/docsrc/index.html
+++ b/docsrc/index.html
@@ -71,7 +71,7 @@ A:hover
 <DIV CLASS="index_link"><A HREF="pdf/virtdocs.pdf">PDF</A> requires <A HREF="http://www.adobe.com/">Adobe Acrobat</A> 3.0 or above.</DIV>
 <BR>
 <BR>
-<DIV CLASS="copyright">Copyright© 2000 OpenLink Software</DIV>
+<DIV CLASS="copyright">Copyright © 1998-2012 OpenLink Software</DIV>
 </TD>
 <TD WIDTH="50"/>
 </TR>
diff --git a/docsrc/pdf/Makefile.am b/docsrc/pdf/Makefile.am
index 027f51e..16cca68 100644
--- a/docsrc/pdf/Makefile.am
+++ b/docsrc/pdf/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/pdf/Makefile.in b/docsrc/pdf/Makefile.in
index 9a86f09..9d10d75 100644
--- a/docsrc/pdf/Makefile.in
+++ b/docsrc/pdf/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/readme.html b/docsrc/readme.html
index 832d1eb..105c66b 100644
--- a/docsrc/readme.html
+++ b/docsrc/readme.html
@@ -135,8 +135,8 @@ then must match the id attribute.  </P>
 <PRE CLASS="programlisting">
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!-- 
-  $Id: readme.html,v 1.3.2.1 2009/07/07 12:15:33 source Exp $
-  (C)Copyright 2001 OpenLink Software
+  $Id: readme.html,v 1.3.2.2 2012/03/08 13:13:48 source Exp $
+  Copyright (C) 1998-2012 OpenLink Software
 -->
 <chapter label="TBD.xml" id="TBD">
 <title>TBD</title>
diff --git a/docsrc/releasenotes/Makefile.am b/docsrc/releasenotes/Makefile.am
index 3447514..27af0d8 100644
--- a/docsrc/releasenotes/Makefile.am
+++ b/docsrc/releasenotes/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/releasenotes/Makefile.in b/docsrc/releasenotes/Makefile.in
index f37d48b..4b3a9c7 100644
--- a/docsrc/releasenotes/Makefile.in
+++ b/docsrc/releasenotes/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/releasenotes/ptrconv.xsl b/docsrc/releasenotes/ptrconv.xsl
index c42eb82..1b8d0c6 100644
--- a/docsrc/releasenotes/ptrconv.xsl
+++ b/docsrc/releasenotes/ptrconv.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: ptrconv.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ptrconv.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/releasenotes/ptrconv_element.xsl b/docsrc/releasenotes/ptrconv_element.xsl
index 5fb5b70..909150f 100644
--- a/docsrc/releasenotes/ptrconv_element.xsl
+++ b/docsrc/releasenotes/ptrconv_element.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: ptrconv_element.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: ptrconv_element.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/releasenotes/relnotes.xml b/docsrc/releasenotes/relnotes.xml
index 21f9b21..398cb31 100644
--- a/docsrc/releasenotes/relnotes.xml
+++ b/docsrc/releasenotes/relnotes.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/releasenotes/virtuoso_publish_element.xml b/docsrc/releasenotes/virtuoso_publish_element.xml
index 17b901d..6191913 100644
--- a/docsrc/releasenotes/virtuoso_publish_element.xml
+++ b/docsrc/releasenotes/virtuoso_publish_element.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/releasenotes/vrelnotes-nw.xml b/docsrc/releasenotes/vrelnotes-nw.xml
index d3c6e6f..7895373 100644
--- a/docsrc/releasenotes/vrelnotes-nw.xml
+++ b/docsrc/releasenotes/vrelnotes-nw.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/releasenotes/vrelnotes.xml b/docsrc/releasenotes/vrelnotes.xml
index ce3266a..e405c0d 100644
--- a/docsrc/releasenotes/vrelnotes.xml
+++ b/docsrc/releasenotes/vrelnotes.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/styleguide/Makefile.am b/docsrc/styleguide/Makefile.am
index e1b0ae4..5815f34 100644
--- a/docsrc/styleguide/Makefile.am
+++ b/docsrc/styleguide/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/styleguide/Makefile.in b/docsrc/styleguide/Makefile.in
index 8ccf0fa..224059a 100644
--- a/docsrc/styleguide/Makefile.in
+++ b/docsrc/styleguide/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/stylesheets/Makefile.am b/docsrc/stylesheets/Makefile.am
index a7e0f10..06b2d1c 100644
--- a/docsrc/stylesheets/Makefile.am
+++ b/docsrc/stylesheets/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/Makefile.in b/docsrc/stylesheets/Makefile.in
index 022a9ef..6be48a1 100644
--- a/docsrc/stylesheets/Makefile.in
+++ b/docsrc/stylesheets/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/stylesheets/chaptermenu.xsl b/docsrc/stylesheets/chaptermenu.xsl
index ee10ad9..2ff072e 100644
--- a/docsrc/stylesheets/chaptermenu.xsl
+++ b/docsrc/stylesheets/chaptermenu.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -  
- -  $Id: chaptermenu.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: chaptermenu.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/chaptermenu_xt.xsl b/docsrc/stylesheets/chaptermenu_xt.xsl
index 5d78a97..96f40c3 100644
--- a/docsrc/stylesheets/chaptermenu_xt.xsl
+++ b/docsrc/stylesheets/chaptermenu_xt.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: chaptermenu_xt.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: chaptermenu_xt.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/config.xsl b/docsrc/stylesheets/config.xsl
index 6d2883d..a1a3348 100644
--- a/docsrc/stylesheets/config.xsl
+++ b/docsrc/stylesheets/config.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: config.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: config.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_chapter.xsl b/docsrc/stylesheets/html_chapter.xsl
index 746ef6f..5dbdbe7 100644
--- a/docsrc/stylesheets/html_chapter.xsl
+++ b/docsrc/stylesheets/html_chapter.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_chapter.xsl,v 1.2 2006/08/15 22:09:21 source Exp $
+ -  $Id: html_chapter.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_debug.xsl b/docsrc/stylesheets/html_debug.xsl
index 602e057..d205fa6 100644
--- a/docsrc/stylesheets/html_debug.xsl
+++ b/docsrc/stylesheets/html_debug.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_debug.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_debug.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_functions.xsl b/docsrc/stylesheets/html_functions.xsl
index ca0e502..7aab859 100644
--- a/docsrc/stylesheets/html_functions.xsl
+++ b/docsrc/stylesheets/html_functions.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_functions.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_functions.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_mp_chaptermenu.xsl b/docsrc/stylesheets/html_mp_chaptermenu.xsl
index 728c675..5ea8ce1 100644
--- a/docsrc/stylesheets/html_mp_chaptermenu.xsl
+++ b/docsrc/stylesheets/html_mp_chaptermenu.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_mp_chaptermenu.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_mp_chaptermenu.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_util.xsl b/docsrc/stylesheets/html_util.xsl
index 9d5f99e..ab4db51 100644
--- a/docsrc/stylesheets/html_util.xsl
+++ b/docsrc/stylesheets/html_util.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_util.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_util.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_chapter.xsl b/docsrc/stylesheets/html_virt_chapter.xsl
index 23043ea..9378276 100644
--- a/docsrc/stylesheets/html_virt_chapter.xsl
+++ b/docsrc/stylesheets/html_virt_chapter.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_virt_chapter.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_chapter.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_chapter1.xsl b/docsrc/stylesheets/html_virt_chapter1.xsl
index a09b670..7ba7e3a 100644
--- a/docsrc/stylesheets/html_virt_chapter1.xsl
+++ b/docsrc/stylesheets/html_virt_chapter1.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_virt_chapter1.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_chapter1.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_chaptermenu.xsl b/docsrc/stylesheets/html_virt_chaptermenu.xsl
index d7ce91e..06e1d50 100644
--- a/docsrc/stylesheets/html_virt_chaptermenu.xsl
+++ b/docsrc/stylesheets/html_virt_chaptermenu.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_virt_chaptermenu.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_chaptermenu.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_common.xsl b/docsrc/stylesheets/html_virt_common.xsl
index 2c070d7..70923d1 100644
--- a/docsrc/stylesheets/html_virt_common.xsl
+++ b/docsrc/stylesheets/html_virt_common.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_virt_common.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_common.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_mp_chaptermenu.xsl b/docsrc/stylesheets/html_virt_mp_chaptermenu.xsl
index 13b0bf3..da2c0d1 100644
--- a/docsrc/stylesheets/html_virt_mp_chaptermenu.xsl
+++ b/docsrc/stylesheets/html_virt_mp_chaptermenu.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_virt_mp_chaptermenu.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_mp_chaptermenu.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_refentry.xsl b/docsrc/stylesheets/html_virt_refentry.xsl
index af5dd32..a1a8a20 100644
--- a/docsrc/stylesheets/html_virt_refentry.xsl
+++ b/docsrc/stylesheets/html_virt_refentry.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -  
- -  $Id: html_virt_refentry.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_refentry.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_virt_util.xsl b/docsrc/stylesheets/html_virt_util.xsl
index 9a831a6..9bef553 100644
--- a/docsrc/stylesheets/html_virt_util.xsl
+++ b/docsrc/stylesheets/html_virt_util.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_virt_util.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_virt_util.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/html_xt_common.xsl b/docsrc/stylesheets/html_xt_common.xsl
index 666836d..836e7b9 100644
--- a/docsrc/stylesheets/html_xt_common.xsl
+++ b/docsrc/stylesheets/html_xt_common.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_xt_common.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_xt_common.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/list_api.xsl b/docsrc/stylesheets/list_api.xsl
index 8c58d6e..feb1ef1 100644
--- a/docsrc/stylesheets/list_api.xsl
+++ b/docsrc/stylesheets/list_api.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: list_api.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: list_api.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/refentry.xsl b/docsrc/stylesheets/refentry.xsl
index 3243a25..6bff2c5 100644
--- a/docsrc/stylesheets/refentry.xsl
+++ b/docsrc/stylesheets/refentry.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -  
- -  $Id: refentry.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: refentry.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/doc.css b/docsrc/stylesheets/sections/doc.css
index ddbbe5f..0f63115 100644
--- a/docsrc/stylesheets/sections/doc.css
+++ b/docsrc/stylesheets/sections/doc.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: doc.css,v 1.2 2006/08/15 22:15:54 source Exp $
+ *  $Id: doc.css,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/function_list.xsl b/docsrc/stylesheets/sections/function_list.xsl
index 45aa9f1..416fd0e 100644
--- a/docsrc/stylesheets/sections/function_list.xsl
+++ b/docsrc/stylesheets/sections/function_list.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: function_list.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: function_list.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/html_functions.xsl b/docsrc/stylesheets/sections/html_functions.xsl
index 8e52741..c0b4f65 100644
--- a/docsrc/stylesheets/sections/html_functions.xsl
+++ b/docsrc/stylesheets/sections/html_functions.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: html_functions.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_functions.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/html_inline_refentry.xsl b/docsrc/stylesheets/sections/html_inline_refentry.xsl
index a5ceee8..a3fa0f9 100644
--- a/docsrc/stylesheets/sections/html_inline_refentry.xsl
+++ b/docsrc/stylesheets/sections/html_inline_refentry.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_inline_refentry.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: html_inline_refentry.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/html_sect1_common.xsl b/docsrc/stylesheets/sections/html_sect1_common.xsl
index 13bcc1d..2571b42 100644
--- a/docsrc/stylesheets/sections/html_sect1_common.xsl
+++ b/docsrc/stylesheets/sections/html_sect1_common.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: html_sect1_common.xsl,v 1.4 2009/01/12 10:36:53 source Exp $
+ -  $Id: html_sect1_common.xsl,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/html_sect1_tocs.xsl b/docsrc/stylesheets/sections/html_sect1_tocs.xsl
index 65e6f3a..1b499e5 100644
--- a/docsrc/stylesheets/sections/html_sect1_tocs.xsl
+++ b/docsrc/stylesheets/sections/html_sect1_tocs.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: html_sect1_tocs.xsl,v 1.5 2007/05/08 17:54:39 source Exp $
+ -  $Id: html_sect1_tocs.xsl,v 1.5.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/openlink.css b/docsrc/stylesheets/sections/openlink.css
index c4682ee..b0ad43a 100644
--- a/docsrc/stylesheets/sections/openlink.css
+++ b/docsrc/stylesheets/sections/openlink.css
@@ -1,10 +1,10 @@
 /*
- *  $Id: openlink.css,v 1.3 2006/08/15 22:15:54 source Exp $
+ *  $Id: openlink.css,v 1.3.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/opml_sect1_mp.xsl b/docsrc/stylesheets/sections/opml_sect1_mp.xsl
index c8e7095..4cba15d 100644
--- a/docsrc/stylesheets/sections/opml_sect1_mp.xsl
+++ b/docsrc/stylesheets/sections/opml_sect1_mp.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: opml_sect1_mp.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: opml_sect1_mp.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/sect1_list.xsl b/docsrc/stylesheets/sections/sect1_list.xsl
index 97b4883..93ca42e 100644
--- a/docsrc/stylesheets/sections/sect1_list.xsl
+++ b/docsrc/stylesheets/sections/sect1_list.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sect1_list.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: sect1_list.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/sioc_book.xsl b/docsrc/stylesheets/sections/sioc_book.xsl
index cb6bceb..a88458d 100644
--- a/docsrc/stylesheets/sections/sioc_book.xsl
+++ b/docsrc/stylesheets/sections/sioc_book.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sioc_book.xsl,v 1.2 2007/05/08 17:54:39 source Exp $
+ -  $Id: sioc_book.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/sioc_chap.xsl b/docsrc/stylesheets/sections/sioc_chap.xsl
index 0bae823..452118c 100644
--- a/docsrc/stylesheets/sections/sioc_chap.xsl
+++ b/docsrc/stylesheets/sections/sioc_chap.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sioc_chap.xsl,v 1.2 2007/05/08 17:54:39 source Exp $
+ -  $Id: sioc_chap.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/sections/sioc_sect1.xsl b/docsrc/stylesheets/sections/sioc_sect1.xsl
index 30ba89a..9dd9724 100644
--- a/docsrc/stylesheets/sections/sioc_sect1.xsl
+++ b/docsrc/stylesheets/sections/sioc_sect1.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: sioc_sect1.xsl,v 1.2 2007/05/08 17:54:39 source Exp $
+ -  $Id: sioc_sect1.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/virt_config.xsl b/docsrc/stylesheets/virt_config.xsl
index 78b8cee..6a41006 100644
--- a/docsrc/stylesheets/virt_config.xsl
+++ b/docsrc/stylesheets/virt_config.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: virt_config.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: virt_config.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/vsp_contents.xsl b/docsrc/stylesheets/vsp_contents.xsl
index e463624..1df22fa 100644
--- a/docsrc/stylesheets/vsp_contents.xsl
+++ b/docsrc/stylesheets/vsp_contents.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vsp_contents.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: vsp_contents.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/stylesheets/vsp_contents_lmvector.xsl b/docsrc/stylesheets/vsp_contents_lmvector.xsl
index b440824..6eb858e 100644
--- a/docsrc/stylesheets/vsp_contents_lmvector.xsl
+++ b/docsrc/stylesheets/vsp_contents_lmvector.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -  
- -  $Id: vsp_contents_lmvector.xsl,v 1.2 2006/08/15 22:09:22 source Exp $
+ -  $Id: vsp_contents_lmvector.xsl,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/2pc.xml b/docsrc/xmlsource/2pc.xml
index 9a1a143..dfa5c1c 100644
--- a/docsrc/xmlsource/2pc.xml
+++ b/docsrc/xmlsource/2pc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/DocBook/tblcals.xml b/docsrc/xmlsource/DocBook/tblcals.xml
index e0ea6c8..1605689 100644
--- a/docsrc/xmlsource/DocBook/tblcals.xml
+++ b/docsrc/xmlsource/DocBook/tblcals.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/DocBook/tblxchg.xml b/docsrc/xmlsource/DocBook/tblxchg.xml
index 20477cb..e40af05 100644
--- a/docsrc/xmlsource/DocBook/tblxchg.xml
+++ b/docsrc/xmlsource/DocBook/tblxchg.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/DocBook/test.xml b/docsrc/xmlsource/DocBook/test.xml
index bdae82b..41c526e 100644
--- a/docsrc/xmlsource/DocBook/test.xml
+++ b/docsrc/xmlsource/DocBook/test.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/Makefile.am b/docsrc/xmlsource/Makefile.am
index 5196232..990df20 100644
--- a/docsrc/xmlsource/Makefile.am
+++ b/docsrc/xmlsource/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/Makefile.in b/docsrc/xmlsource/Makefile.in
index 35d7f8f..8696aa8 100644
--- a/docsrc/xmlsource/Makefile.in
+++ b/docsrc/xmlsource/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/docsrc/xmlsource/XMLDOM.xml b/docsrc/xmlsource/XMLDOM.xml
index bdb1aed..81dbeda 100644
--- a/docsrc/xmlsource/XMLDOM.xml
+++ b/docsrc/xmlsource/XMLDOM.xml
@@ -5,7 +5,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/XMLType.xml b/docsrc/xmlsource/XMLType.xml
index 354d2ca..db52d18 100644
--- a/docsrc/xmlsource/XMLType.xml
+++ b/docsrc/xmlsource/XMLType.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/_DirInfo.sh b/docsrc/xmlsource/_DirInfo.sh
index 43f4afb..5b1eb8c 100755
--- a/docsrc/xmlsource/_DirInfo.sh
+++ b/docsrc/xmlsource/_DirInfo.sh
@@ -9,8 +9,8 @@ export LANG LC_ALL
 out='_DirInfo.xml'
 echo '<?xml version="1.0" ?>' > $out
 echo '<!--
-  $Id: _DirInfo.sh,v 1.2 2009/02/12 15:15:13 source Exp $
-  (C)Copyright 2001 OpenLink Software
+  $Id: _DirInfo.sh,v 1.2.2.1 2012/03/08 13:13:48 source Exp $
+  Copyright (C) 1998-2012  OpenLink Software
 -->
 <dirinfo>' >> $out
 echo '  <dir path="">
diff --git a/docsrc/xmlsource/_DirInfo.xml b/docsrc/xmlsource/_DirInfo.xml
index b086051..8cd24a3 100644
--- a/docsrc/xmlsource/_DirInfo.xml
+++ b/docsrc/xmlsource/_DirInfo.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/accessinterfaces.xml b/docsrc/xmlsource/accessinterfaces.xml
index be85c8a..4664aac 100644
--- a/docsrc/xmlsource/accessinterfaces.xml
+++ b/docsrc/xmlsource/accessinterfaces.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1597,12 +1597,12 @@ VirtuosoRepository("server1:port1,server2:port2,server3", "uid", "pwd");
     <sect3 id="dataccessclientsconfailandbalancesesms"><title>Sample program</title>
 <programlisting><![CDATA[
 /*
- *  $Id: accessinterfaces.xml,v 1.6.2.6 2011/03/05 00:03:22 source Exp $
+ *  $Id: accessinterfaces.xml,v 1.6.2.7 2012/03/07 15:28:56 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/adminui.blogging.xml b/docsrc/xmlsource/adminui.blogging.xml
index caae721..0ca0529 100644
--- a/docsrc/xmlsource/adminui.blogging.xml
+++ b/docsrc/xmlsource/adminui.blogging.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/adminui.dbadmin.xml b/docsrc/xmlsource/adminui.dbadmin.xml
index 149bf64..2772d41 100644
--- a/docsrc/xmlsource/adminui.dbadmin.xml
+++ b/docsrc/xmlsource/adminui.dbadmin.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -44,11 +44,87 @@ refer to a particular catalog or database.
 </para>
 		<para>
 You can import users by adding LDAP Servers(s) from the "LDAP Servers" tab, and then from the "LDAP Import" to specify from
-which LDAP server the import should be done. </para>
+which LDAP server the import should be done:</para>
 
     <figure float="1"><title>Users Accounts</title>
       <graphic fileref="ui/admtables_01a.png"/></figure>
 
+        <sect4 id="dbusersandgroupsldap"><title>Configuring and import from LDAP server</title>
+<para>The following steps describe how to configure LDAP server and then import user(s) using the Conducor UI:</para>        
+<orderedlist>
+	 <listitem>Go to http://cname:port/conductor</listitem>
+	 <listitem>Enter user dba credentials</listitem>
+	 <listitem>Go to System Admin -> User Accounts -> LDAP Servers
+     <figure id="ldap1" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap1.png"/>
+     </figure>
+	 </listitem>
+	 <listitem>Enter in the LDAP servers form respectively:
+     <orderedlist>
+     	 <listitem>Host Name: for ex.: ldap.example.com
+         <para>Note: you can also use ldap:// or ldaps:// in front of Host name</para>
+       </listitem>
+       <listitem>Base: for ex.: o=MyCompany,c=DE</listitem>
+       <listitem>Base DN: for ex: ou=Accounts,o=MyCompany,c=DE</listitem>
+       <listitem>UID field: uid</listitem>
+       <listitem>Account: for ex: joe</listitem>
+       <listitem>Password: *******</listitem>
+       <listitem>LDAP version: choose for ex. 3</listitem>
+     </orderedlist>
+	 </listitem>
+	 <listitem>Check the connection by pressing "Test":
+	   <figure id="ldap2" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap2.png"/>
+     </figure>	
+	 </listitem>
+   <listitem>If the test connection is successful, click "Add".
+	   <figure id="ldap3" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap3.png"/>
+     </figure>	   	
+   </listitem>
+   <listitem>Next you can import various data from your LDAP server.</listitem>
+   <listitem>Go to System Admin -> User Accounts -> LDAP Import
+   	<figure id="ldap3a" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap3a.png"/>
+     </figure>
+   </listitem>
+   <listitem>Select the LDAP server added from above:  
+   	 <figure id="ldap4" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap4.png"/>
+     </figure>   	
+   </listitem> 
+   <listitem>Click "Search".
+   	 <figure id="ldap5" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap5.png"/>
+     </figure>   	
+   </listitem>	  	
+   <listitem>Click "Next".
+   	 <figure id="ldap6" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap6.png"/>
+     </figure>   	
+   </listitem>	  	
+   <listitem>Select the desired profiles to be imported and click "Import".
+   	 <figure id="ldap7" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap7.png"/>
+     </figure>   	
+   </listitem>	  	
+   <listitem>Click "Finish".</listitem>	  	
+   <listitem>The imported profile(s) should be displayed in the Users tab:
+   	 <figure id="ldap8" float="1">
+       <title>LDAP Servers Configure and Import</title>
+       <graphic fileref="ui/ldap8.png"/>
+     </figure>   	
+   </listitem>	  	
+  </orderedlist>
+        </sect4>
       	</sect3>
 
       	<sect3 id="databases">
@@ -117,7 +193,7 @@ need a screenshot  here
 	procedures can be done via the ISQL command-line interface or from the "Create Procedure" link shown
         above the list of objects for the relevant database.
 	</para>
-    <figure float="1"><title>Viewing Stored Procedures details for the Demo catalogue in the Demo Database</title>
+    <figure float="1"><title>Viewing Stored Procedures details for the DB catalogue</title>
       <graphic fileref="ui/admprocedures_01.png"/></figure>
         <para>
 	Stored procedures may also refer to modules that contain a group
diff --git a/docsrc/xmlsource/adminui.internetdomains.xml b/docsrc/xmlsource/adminui.internetdomains.xml
index 09c05c1..459fa78 100644
--- a/docsrc/xmlsource/adminui.internetdomains.xml
+++ b/docsrc/xmlsource/adminui.internetdomains.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -136,8 +136,10 @@ CR-escape=yes;
   <para><link linkend="virtdir">Virtual Directories</link></para></tip>
 
   <para>For example, here are the basic steps to be performed, in order to mount FS folder to DAV:</para>
-  <para>Suppose there is a folder with name "test" in your FS and it is under the root of the ServerRoot defined in your virtuoso ini file.</para>
-  <para>Also suppose in the folder "test" there is a file index.html with simple content:</para>
+  <orderedlist>
+  <listitem>Suppose there is a folder with name "test" in your FS and it is under the root of the 
+  	ServerRoot defined in your virtuoso ini file.</listitem>
+  <listitem>Also suppose in the folder "test" there is a file index.html with simple content:
   <programlisting><![CDATA[
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
@@ -156,25 +158,30 @@ CR-escape=yes;
   </body>
 </html>
   ]]></programlisting>
-  <para>Install the Conductor package</para>
-  <para>Go to http://host:port/conductor and login as dba user.</para>
-  <para>Go to Web Application Server -> Virtual Domains & Directories.</para>
+  </listitem>
+  <listitem>Install the Conductor package</listitem>
+  <listitem>Go to http://host:port/conductor and login as dba user.</listitem>
+  <listitem>Go to Web Application Server -> Virtual Domains & Directories.
   <figure float="1"><title>Mount FS to DAV</title>
       <graphic fileref="ui/admvirtdir011.png"/></figure>
-  <para>For your {Default Web Site} click the link "New Directory".</para>
-  <para>Check the check-box "Type" and select from the drop-down list "Filesystem".</para>
+  </listitem>    
+  <listitem>For your {Default Web Site} click the link "New Directory".</listitem>
+  <listitem>Check the check-box "Type" and select from the drop-down list "Filesystem".
   <figure float="1"><title>Mount FS to DAV</title>
       <graphic fileref="ui/admvirtdir012.png"/></figure>
-  <para>Click "Next"</para>
-  <para>In the shown form: Enter for the field "Path": mytest; Enter for the field "Physical path": /test;
-Enter for the field "Default page": index.html; Check the check-box "Allow Directory Browsing"; Leave the rest of the fields with their default values.</para>
-  <para>Click "Save Changes"</para>
+  </listitem>    
+  <listitem>Click "Next"</listitem>
+  <listitem>In the shown form: Enter for the field "Path": mytest; Enter for the field "Physical path": /test;
+Enter for the field "Default page": index.html; Check the check-box "Allow Directory Browsing"; Leave the rest of the fields with their default values.</listitem>
+  <listitem>Click "Save Changes"
   <figure float="1"><title>Mount FS to DAV</title>
       <graphic fileref="ui/admvirtdir013.png"/></figure>
-  <para>From your browser access the url: http://host:port/mytest/</para>
-  <para>As result the content of the index.html file will be shown:</para>
+  </listitem>    
+  <listitem>From your browser access the url: http://host:port/mytest/</listitem>
+  <listitem>As result the content of the index.html file will be shown:
   <figure float="1"><title>Mount FS to DAV</title>
       <graphic fileref="ui/admvirtdir014.png"/></figure>
-
+  </listitem>
+  </orderedlist>
 </sect3>
 </sect2>
diff --git a/docsrc/xmlsource/adminui.mailsrvadm.xml b/docsrc/xmlsource/adminui.mailsrvadm.xml
index 7c80531..c5ec3df 100644
--- a/docsrc/xmlsource/adminui.mailsrvadm.xml
+++ b/docsrc/xmlsource/adminui.mailsrvadm.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/adminui.newssrvadm.xml b/docsrc/xmlsource/adminui.newssrvadm.xml
index 2700735..61313cb 100644
--- a/docsrc/xmlsource/adminui.newssrvadm.xml
+++ b/docsrc/xmlsource/adminui.newssrvadm.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/adminui.querytools.xml b/docsrc/xmlsource/adminui.querytools.xml
index b0b1b9d..adcf5e1 100644
--- a/docsrc/xmlsource/adminui.querytools.xml
+++ b/docsrc/xmlsource/adminui.querytools.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/adminui.rdfadm.xml b/docsrc/xmlsource/adminui.rdfadm.xml
index b59052c..9c2b902 100644
--- a/docsrc/xmlsource/adminui.rdfadm.xml
+++ b/docsrc/xmlsource/adminui.rdfadm.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -22,10 +22,10 @@
  -
 -->
 
-<sect2 id="rdfadm"><title>Conductor RDF Administration</title>
-  <para>From Conductor the RDF tab allows you to execute/save/load SPARQL queries, 
+<sect2 id="rdfadm"><title>Conductor Linked Data Administration</title>
+  <para>From Conductor the Linked Data tab allows you to execute/save/load SPARQL queries, 
 	to add/edit RDF Mapping, to perform statistics and manage graphs, 
-	to import schemas and define namespaces, to generated RDF views and to upload to the RDF Store.
+	to import schemas and define namespaces, to generated Linked Data Views and to upload to the Quad Store.
 	</para>
   <sect3 id="rdfadmsparql"><title>SPARQL</title>  
     <sect4 id="rdfadmsparqlex"><title>Query</title>  
@@ -135,9 +135,42 @@
 		    <graphic fileref="rdf12.png"/>
 	    </figure>	  	  
 	</sect3>
-	<sect3 id="rdfadmviews"><title>RDF Views</title>
+	<sect3 id="rdfadmacl"><title>Access Control</title>
+	  <sect4 id="rdfadmaclsponger"><title>Sponger</title>
+	    <para>Manage Sponger rules by adding new ones, deleting, re-ordering, etc.</para>
+		  <para>This tab is available only when the 
+	    <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/rdf_mappers_dav.vad">rdf_mappers_dav.vad</ulink> 
+	    is installed.</para>	
+	    <figure id="adminuirdf15" float="1">
+        <title>RDF</title>
+		    <graphic fileref="rdf19.png"/>
+	    </figure>
+	  </sect4>  
+	  <sect4 id="rdfadmaclsparqlssl"><title>SPARQL-SSL</title>
+	  <para>Here you can manage different WebID Protocol ACLs WebID ACL by granting 
+	  	SPARQL Roles such as "SELECT", "UPDATE", "SPONGE":</para>
+	  	<figure id="adminuirdf15" float="1">
+        <title>RDF</title>
+		    <graphic fileref="rdf18.png"/>
+	    </figure>	
+	  <tip><title>See Also:</title> 
+	      <para><link linkend="sparqwebservicetbl">Managing a SPARQL Web Service Endpoint</link></para>
+	      <para><link linkend="sparqloauthendpointfoafssl">WebID Protocol ACLs</link></para>
+	      <para><link linkend="sparqloauthendpointfoafsslsparql">Creating and Using a SPARQL-SSL based Endpoint</link></para>
+	      <para><link linkend="rdfsparqlendpointexamples3">Example with curl and SPARQL-SSL endpoint</link></para>
+	    </tip>
+	  </sect4>	  
+	</sect3>
+	<sect3 id="rdfadmviews"><title>Views</title>
 	  <para>Virtuoso uses a SPARQL-based Meta Schema Language to provide RDBMS-to-RDF mapping 
-	  	functionality (also described as, RDF Views of SQL data). The language is an extension of the SPARQL query language meshed with Virtuoso's SPASQL (SPARQL-inside-SQL) functionality. The language enables you to declaratively map relational database schema tables, columns, rows, and foreign key relationships to Classes, Attributes, Relationships, and Instances (Objects/Entities/Individuals) defined by RDF Schemas or OWL Ontologies. The mapping process uses a special built-in Virtuoso function to generate IRIs / URIs in "Subject" or "Object" position of a SPARQL graph pattern, en route to building a set of SQL compiler rules and optimizations for translating SPARQL queries into SQL on the fly.</para>
+	  	functionality (also described as, Linked Data Views of SQL data). The language is an extension of the 
+	  	SPARQL query language meshed with Virtuoso's SPASQL (SPARQL-inside-SQL) functionality. The 
+	  	language enables you to declaratively map relational database schema tables, columns, rows, 
+	  	and foreign key relationships to Classes, Attributes, Relationships, and Instances 
+	  	(Objects/Entities/Individuals) defined by RDF Schemas or OWL Ontologies. The mapping 
+	  	process uses a special built-in Virtuoso function to generate IRIs / URIs in "Subject" 
+	  	or "Object" position of a SPARQL graph pattern, en route to building a set of SQL compiler 
+	  	rules and optimizations for translating SPARQL queries into SQL on the fly.</para>
 	  	<figure id="adminuirdf16" float="1">
         <title>RDF</title>
 		    <graphic fileref="rdf13.png"/>
@@ -146,22 +179,26 @@
 	      <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSSQL2RDF#Mapping%20Process">Mapping Process steps.</ulink></para>
 	      <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSSQL2RDF#Mapping%20Example">Mapping Example.</ulink></para>
 	      <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSSQL2RDF">Mapping SQL Data to RDF.</ulink></para>	      
-	      <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRdb2RDFViewsGeneration">Automated Generation of RDF Views over Relational Data Sources with Virtuoso.</ulink></para>	      	      
+	      <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRdb2RDFViewsGeneration">Automated Generation of Linked Data Views over Relational Data Sources with Virtuoso.</ulink></para>	      	      
 	    </tip>
 	</sect3>
-	<sect3 id="rdfadm"><title>RDF Store Upoload</title>
-	  <para>Offers upload to RDF Quad Store from file or Resource URL:</para>
+	<sect3 id="rdfadm"><title>Quad Store Upoload</title>
+	  <para>Offers upload to Quad Store from file or Resource URL:</para>
 	  	<figure id="adminuirdf17" float="1">
         <title>RDF</title>
 		    <graphic fileref="rdf16.png"/>
 	    </figure>		 	  
 	</sect3>
-	<sect3 id="rdfadm"><title>RDF Subscriptions</title>
-	  <para>This tab will be only when the 
+	<sect3 id="rdfadm"><title>Subscriptions (PHSB)</title>
+	  <para>This tab is available only when the 
 	    <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/pubsubhub_dav.vad">pubsubhub_dav.vad</ulink> 
 	    is installed.</para>	    
 	  <para>Offers Virtuoso's implementation of the <ulink url="http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html">PubSubHubBub Protocol</ulink> to handle Linked Data 
 	  	by subscribing to Linked Data resource URIs.</para>
+	  	<figure id="adminuirdf17" float="1">
+        <title>Subscriptions (PHSB)</title>
+		    <graphic fileref="rdf17.png"/>
+	    </figure>			  
 	  <para>Note: the Hub endpoint should be defined ACL in System Admin -> Security -> Access Control -> PSH-SLL</para>
     <tip><title>See Also:</title>	    
       <para><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtPubSubHub">Example of Linked Data Usage of PubSubHubbub Implementation.</ulink></para>
diff --git a/docsrc/xmlsource/adminui.replicationandsynchronization.xml b/docsrc/xmlsource/adminui.replicationandsynchronization.xml
index 09de0dc..c2ea292 100644
--- a/docsrc/xmlsource/adminui.replicationandsynchronization.xml
+++ b/docsrc/xmlsource/adminui.replicationandsynchronization.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -27,33 +27,35 @@
 
 	<sect3 id="snapshotreplication">
 		<title>Snapshot Replication</title>
+<itemizedlist mark="bullet">		
 <para>Conductor "Replication" offers manage Virtuoso Replication. You are offered with "Basic",
-"Incremental", "Bidirectional Snapshot" and "Transactional" sub-tabs-
+"Incremental", "Bidirectional Snapshot" and "Transactional" sub-tabs.
 </para>
-	<para>
-From <emphasis>Replication/Basic/Query(Table select)to local</emphasis> to replicate local table(s)
+<itemizedlist mark="bullet">
+	<listitem>From <emphasis>Replication/Basic/Query(Table select)to local</emphasis> to replicate local table(s)
 to another data source click <emphasis>Create New Snapshot</emphasis> and follow the wizard.
-</para>
-	<para>
+</listitem>
+	<listitem>
 To copy the changes from the local table to the remote select some replications and
 press <emphasis>Synchronize</emphasis>
-</para>
-	<para>
+</listitem>
+	<listitem>
 To drop the replication definition without dropping the destination table select some replications and press
 <emphasis>Remove</emphasis>
-</para>
-	<para>
+</listitem>
+	<listitem>
 To drop the replication definition and the destination table select some replications and
 press <emphasis>Remove & Drop Remote</emphasis>
-</para>
-	<para>
+</listitem>
+	<listitem>
 To copy the changes from the local table to the remote automatically select some
 replications, enter minutes in <emphasis>Scheduled Interval</emphasis> and
 press <emphasis>Schedule</emphasis>
-</para>
-	<para>
+</listitem>
+	<listitem>
 To remove scheduled update select the replications enter 0 in "Scheduled Interval" and press Schedule
-</para>
+</listitem>
+</itemizedlist>
         <figure float="1"><title>Snapshot Replication</title>
           <graphic fileref="ui/replt_ss_01.png"/></figure>
         <figure float="1"><title>Snapshot Replication</title>
@@ -63,11 +65,10 @@ To remove scheduled update select the replications enter 0 in "Scheduled Interva
         <figure float="1"><title>Snapshot Replication</title>
           <graphic fileref="ui/replt_ss_add_03.png"/></figure>
         <figure float="1"><title>Snapshot Replication</title>
-          <graphic fileref="ui/replt_ss_add_04.png"/></figure>
-        <figure float="1"><title>Snapshot Replication</title>
           <graphic fileref="ui/replt_ss_add_05.png"/></figure>
         <figure float="1"><title>Snapshot Replication</title>
           <graphic fileref="ui/replt_ss_add_06.png"/></figure>
+</itemizedlist>          
 
 	</sect3>
 
@@ -124,7 +125,7 @@ list.</para>
 <para>Use the <emphasis>Add</emphasis>/<emphasis>Remove</emphasis> to add 
 or remove selected resolvers.</para>
 
-<para>Click on <emphasis>New Resolver</emphasis> to add a new resolver. You have the
+<para>Click on Publication Item -> <emphasis>New Resolver</emphasis> to add a new resolver. You have the
 following details to contend with:</para>
 
 <itemizedlist>
@@ -163,31 +164,21 @@ following details to contend with:</para>
           <graphic fileref="ui/repltranspub006.png"/></figure>
 
 
-
+    <para>Click on Publication -> <emphasis>Advanced Options</emphasis> to set additional settings such as split size, default copy mode of publication item, etc.</para>
 		<figure float="1"><title>Transaction Replication - Advanced</title>
           <graphic fileref="ui/repltranspub005.png"/></figure>
 
 		</sect4>
 		<sect4 id="subscriptions">
 			<title>Subscriptions</title>
-		<para>
-To add new subscription click at New Subscription and follow the wizard.
-</para>
-		<para>
-Click Edit to change properties.
-</para>
-		<para>
-To drop subscription click at link Drop.
-</para>
-		<para>
-To synchronize subscription click the Sync button.
-</para>
-		<para>
-To disconnect all subscriptions click at Disconnect all button.
-</para>
-		<para>
-To load image file click at Load image button and follow the wizard
-</para>
+			<itemizedlist mark="bullet">
+  <listitem>To add new subscription click at New Subscription and follow the wizard.</listitem>
+  <listitem>Click Edit to change properties.</listitem>
+  <listitem>To drop subscription click at link Drop.</listitem>
+  <listitem>To synchronize subscription click the Sync button.</listitem>
+  <listitem>To disconnect all subscriptions click at Disconnect all button.</listitem>
+  <listitem>To load image file click at Load image button and follow the wizard.</listitem>
+</itemizedlist>
         <figure float="1"><title>Transaction Replication - Subscription</title>
           <graphic fileref="ui/replt_trans_sub_01.png"/></figure>
         <figure float="1"><title>Transaction Replication - Subscription</title>
diff --git a/docsrc/xmlsource/adminui.runtimehosting.xml b/docsrc/xmlsource/adminui.runtimehosting.xml
index 74ad3e1..27c20e8 100644
--- a/docsrc/xmlsource/adminui.runtimehosting.xml
+++ b/docsrc/xmlsource/adminui.runtimehosting.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/adminui.webdavadmin.xml b/docsrc/xmlsource/adminui.webdavadmin.xml
index b9dc880..8d658dc 100644
--- a/docsrc/xmlsource/adminui.webdavadmin.xml
+++ b/docsrc/xmlsource/adminui.webdavadmin.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -78,8 +78,8 @@ Add new types by typing the details into the fields provided and pressing the <e
   <sect4 id="davcontresperm"><title>Resource Permissions</title>
   <para>Unlike Unix, the Repository does not use the designation 'd' for 
   directories, which in DAV are more commonly referred to as collections.  
-  Collections are distinguished by a different icon — a folder-like icon 
-  — and by having the type named "collection".</para>
+  Collections are distinguished by a different icon - a folder-like icon
+  - and by having the type named "collection".</para>
 
   <para>In addition, the permissions string has a trailing letter designating
   the indexing status of the resource.  This letter is 'n' to designate 
@@ -114,6 +114,9 @@ Add new types by typing the details into the fields provided and pressing the <e
   properties of a resource, other than its name, by selecting the 
   resource via the checkbox to the left of the icon, and pressing the 
   "Properties" button.</para>
+  <figure float="1" id="editres"><title>Edit Resource Properties</title>
+    <graphic fileref="ui/editres.png"/>
+  </figure>
 
   <para>XML documents also permit you to edit their XML properties 
   specifically.  This can be done on any document of type text/xml by 
@@ -126,10 +129,15 @@ for one or a group of resources which should be selected. The name of a resource
     <para>The owner, group, permissions, and indexing controls on this form 
     apply to the appropriate properties of resources, as documented 
     above.  Changes to the type of a collection (folder) are ignored.</para>
-
+  <figure float="1" id="meditres"><title>Multiple Resources Edit Properties</title>
+    <graphic fileref="ui/meditres.png"/>
+  </figure>
     <para>The "Property" control permits you to change or add
     additional properties.  There is a pulldown of predefined XML-related 
     properties, or you may create your own property.</para>
+  <figure float="1" id="meditres2"><title>Multiple Resources Edit Properties</title>
+    <graphic fileref="ui/meditres2.png"/>
+  </figure>    
     </sect5>
 
     <sect5 id="davcontdavprop"><title>WebDAV Properties</title>
@@ -154,14 +162,20 @@ for one or a group of resources which should be selected. The name of a resource
   <para>The "Create Folder" button brings up a form in which you can 
   specify the name of the collection (folder), its owner and group, and the initial 
   permissions.  You may also turn on indexing for the folder's contents at this point.</para>
+    <figure float="1" id="cfolder"><title>Create Folder</title>
+    <graphic fileref="ui/cfolder.png"/>
+  </figure>
 
   <para>The "Upload File" button brings up a form in which you can 
   specify the name and location of a file on your local computer that is 
   to be copied into the DAV repository.  You need to specify the name of 
   the resource in the repository and give it a type.  You can also set 
   the basic repository properties here.</para>
+      <figure float="1" id="ufile"><title>Upload File</title>
+    <graphic fileref="ui/ufile.png"/>
+  </figure>
 
-  <sect5 id="davadsymlink"><title>WebDAV Symbolic Linking</title>
+  <!--sect5 id="davadsymlink"><title>WebDAV Symbolic Linking</title>
 
 <para>WebDAV symbolic linking, also known as <emphasis>DAV
 redirection</emphasis>, is another method for accessing content from
@@ -196,13 +210,13 @@ Name.</para>
 
 <example id="ex_davsymlincs"><title>Examples:</title>
 
-<para>If I wish to keep a link to the article found at <URL:
-http://www.xml.com/pub/a/2001/10/17/slippery-soap.html>  I would
+<para>If one wishes to keep a link to the article found at <URL:
+http://www.xml.com/pub/a/2001/10/17/slippery-soap.html>  he/she would
 simply click the Add Link button, type a useful local name, such as
 "Slippery SOAP article" and paste the URL into the Link to
 field.</para>
 
-<para>More interesting, I could set up a Web Data Import for the
+<para>More interesting, he/she could set up a Web Data Import for the
 target <URL:
 http://news.cnet.com/news/0-1277-210-7545619-1.html?tag=bt_bh></para>
 
@@ -213,7 +227,7 @@ feature, we are able to map the actual documents imported to a common
 location without encountering problems related to component
 references, embedded links, etc.</para>
 </example>
-</sect5>
+</sect5-->
 
 </sect4>
 </sect3>
diff --git a/docsrc/xmlsource/adminui.webservices.xml b/docsrc/xmlsource/adminui.webservices.xml
index e3c711e..ddee137 100644
--- a/docsrc/xmlsource/adminui.webservices.xml
+++ b/docsrc/xmlsource/adminui.webservices.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,65 +24,52 @@
 
 <sect2 id="admui.webservices"><title>Web Services</title>
   <sect3 id="contentcrawler"><title>Content Crawler</title>
-  <itemizedlist mark="bullet">Supported features:
-     <listitem>Import Targets: Virtuoso can be set up to retrieve content from external web sites and host it in its own
+  
+    <itemizedlist mark="bullet">Some of the supported features are:
+      <listitem><emphasis>Import Targets</emphasis>: Virtuoso can be set up to retrieve content from external web sites and host it in its own
 WebDAV repository via this page.
         <figure float="1"><title>Web Robot - Target</title>
       <graphic fileref="ui/dav_rbt_trgt_01.png"/>
     </figure>
-    <para><emphasis>Target Description</emphasis> lets you provide a friendly description for the
-target that you are defining.
-    </para>
-    <para><emphasis>Target URL</emphasis> is the url of the web site that you are trying
+        <itemizedlist mark="bullet">
+          <listitem><emphasis>Target Description</emphasis> lets you provide a friendly description for the
+target that you are defining.</listitem>
+          <listitem><emphasis>Target URL</emphasis> is the url of the web site that you are trying
 to retrieve content from. Only the hostname should be provided here, along with the protocol. For
-example http://www.myhost.com.
-    </para>
-    <para><emphasis>Login name on target</emphasis> is the username for accessing the remote server,
+example http://www.myhost.com.</listitem>
+          <listitem><emphasis>Login name on target</emphasis> is the username for accessing the remote server,
 if required.
-    </para>
-    <para><emphasis>Login password on target</emphasis> is the password for the login name above.
-    </para>
-    <para><emphasis>Copy to Local DAV collection</emphasis> is the name of the collection (folder)
-where retrieved content will be stored in Dav.
-    </para>
-		<para>
-<emphasis>Single page download</emphasis> radio button specifies whether
-Virtuoso will retrieved linked content also.</para>
-		<para>
-<emphasis>Local Resources Owner</emphasis> The DAV user that will be the owner
-of the content that will copied to DAV.
-</para>
-		<para>
-The <emphasis>Download only newer than</emphasis> field allows you to specify
+          </listitem>
+          <listitem><emphasis>Login password on target</emphasis> is the password for the login name above.</listitem>
+          <listitem><emphasis>Copy to Local DAV collection</emphasis> is the name of the collection (folder)
+where retrieved content will be stored in DAV.</listitem>
+          <listitem><emphasis>Single page download</emphasis> radio button specifies whether
+Virtuoso will retrieved linked content also.</listitem>
+          <listitem><emphasis>Local Resources Owner</emphasis> The DAV user that will be the owner
+of the content that will copied to DAV.</listitem>
+          <listitem>The <emphasis>Download only newer than</emphasis> field allows you to specify
 a datetime value to prevent Virtuoso downloading files that are older than
-that datetime.</para>
-		<para>
-Use the <emphasis>Follow Links Matching</emphasis> field to limit the content
-that is downloaded by specify pattern matching criteria.</para>
-		<para>
-<emphasis>Do NOT follow links matching</emphasis> allows you limit content by
-specifying what files not to download.</para>
-		<para>
-<emphasis>Download Images</emphasis> radio buttons to allow Virtuoso to pull
+that datetime.</listitem>
+          <listitem>Use the <emphasis>Follow Links Matching</emphasis> field to limit the content
+that is downloaded by specify pattern matching criteria.</listitem>
+          <listitem><emphasis>Do NOT follow links matching</emphasis> allows you limit content by
+specifying what files not to download.</listitem>
+        </itemizedlist>
+      </listitem>                                                
+      <listitem><emphasis>Download Images</emphasis> radio buttons to allow Virtuoso to pull
 down image type also.  You may want to prevent this if you are more interested
-in the textual content rather than bandwidth draining images.</para>
-		<para>
-<emphasis>Use WebDAV methods</emphasis> can be checked if the host is known to
-support WebDAV methods.  This would enable better copying of sites that support DAV.</para>
-		<para>
-<emphasis>Delete if Remove on Remote is Detected</emphasis> can be switched on
+in the textual content rather than bandwidth draining images.</listitem>                                    
+      <listitem><emphasis>Use WebDAV methods</emphasis> can be checked if the host is known to
+support WebDAV methods. This would enable better copying of sites that support DAV.</listitem>                                    
+      <listitem><emphasis>Delete if Remove on Remote is Detected</emphasis> can be switched on
 so that when Virtuoso synchronizes its content with that on the remote host
 it will check for files that have been removed on the remote and remove
-them from the local copy also.</para>
-		<para>
-<emphasis>Store metadata*</emphasis> when checked offers to be stored respectively
-metadata from FOAF, RDF, RSS/RDF and GRDLL data depending on which check-box is checked.</para>
-    <para>
-When all details have been completed press the <emphasis>Add</emphasis> (or
-Update if updating) button to submit the web robot task to the queue.
-    </para>
-</listitem>
-     <listitem>Import Queues: this page shows you a list of web copy targets that have been enlisted with the
+them from the local copy also.</listitem>                                    
+      <listitem><emphasis>Store metadata*</emphasis> when checked offers to be stored respectively
+metadata from FOAF, RDF, RSS/RDF and GRDLL data depending on which check-box is checked.</listitem>                                    
+      <listitem>When all details have been completed press the <emphasis>Add</emphasis> (or
+Update if updating) button to submit the web robot task to the queue.</listitem>                                    
+      <listitem><emphasis>Import Queues</emphasis>: This page shows you a list of web copy targets that have been enlisted with the
 Virtuoso Server, and a list of web robot update schedules. Several options are available for
 each item listed: Start, Update, Schedule, Reset, and Stop. You can configure the scheduled update
 interval by pressing the Schedule link and entering a value in minutes. Once that is done you can
@@ -93,13 +80,13 @@ the details of the web copy item press the Reset link.
       <graphic fileref="ui/dav_rbt_que_01.png"/>
     </figure>
 </listitem>
-     <listitem>Retrieved Sites: You can view a list of the links retrieved from the web copy from this page. You are also
+      <listitem><emphasis>Retrieved Sites</emphasis>: You can view a list of the links retrieved from the web copy from this page. You are also
 able to remove some of the content from this page by following the Edit link.
         <figure float="1"><title>Web Robot - Retrieved Links</title>
       <graphic fileref="ui/dav_rbt_rtrd_01.png"/>
     </figure>
 </listitem>
-     <listitem>Export: You can export content from the WebDAV repository. Note that you can only export content
+      <listitem><emphasis>Export</emphasis>: You can export content from the WebDAV repository. Note that you can only export content
 that has been retrieved using Virtuoso's Web Robot.
     <para>When you click the "Export" link for a retrieved collection, you will be presented
 with a form for selecting the export target location. Choose the export method: either File
@@ -119,12 +106,13 @@ to any WebDAV server. WebDAV methods assume that the target is publicly availabl
       </para>
     </note>
 </listitem>
-     <listitem>Populate the RDF Quad Store: Virtuoso's built-in Content Crawler to can be used to populate its RDF Quad Store, as a one-time run or on a scheduled basis.
+      <listitem><emphasis>Populate the RDF Quad Store</emphasis>: Virtuoso's built-in Content Crawler to can be used to populate its RDF Quad Store, as a one-time run or on a scheduled basis.
 <para>Transforming data sources into RDF "on the fly" is sufficient for many use cases, but there are times when the volume or sheer nature of a data source makes batch-loading necessary.</para>
 <para>For example, Freebase offers RDF representations of its data, but it doesn't publish RDF dumps; even if it did, such dumps would usually be outdated by the time they were loaded.</para>
 <para>One practical solution takes the form of a scheduled crawl of specific resources of interest.</para>
 </listitem>
   </itemizedlist>
+    
   <sect4 id="contentcrawlerrdf"><title>Set Up the Content Crawler to Gather RDF</title>
   <para>The Virtuoso Conductor can be used to set up various Content Crawler Jobs:</para>
   <sect5 id="contentcrawlerrdfquad"><title>Setting up a Content Crawler Job to Add RDF Data to the Quad Store</title>
@@ -156,22 +144,22 @@ to any WebDAV server. WebDAV methods assume that the target is publicly availabl
 <itemizedlist mark="bullet">
   <listitem>Enter a name of choice in the "Target description" text box:
 <programlisting><![CDATA[
-Basic Sitemap Crawling Example 	
+Virtuoso Sample Example	
 ]]></programlisting>  	
 </listitem>
   <listitem>Enter the URL of the site to be crawled in the "Target URL" text box: 
 <programlisting><![CDATA[
-http://psclife.pscdog.com/catalog/seo_sitemap/product/&nbsp	
+http://virtuoso.openlinksw.com/
 ]]></programlisting>  	
 </listitem>
   <listitem>Enter the location in the Virtuoso WebDAV repository the crawled should stored in the "Copy to local DAV collection" text box, for example, if user demo is available, then:
 <programlisting><![CDATA[
-/DAV/home/demo/basic_sitemap/	
+/DAV/home/demo/VirtSample/	
 ]]></programlisting>  	
 </listitem>
   <listitem>Choose the  "Local resources owner" for the collection from the list box available, for ex: user demo.</listitem>
-  <listitem>Select the "Ask for RDF" check box.</listitem>      
-  <listitem>Optionally you can select "Convert Link" to make all HREFs in the local stored content relative.</listitem>
+  <listitem>Select the "Accept RDF" check box.</listitem>      
+  <listitem>Optionally you can select "Convert Links" to make all HREFs in the local stored content relative.</listitem>
   <listitem>Click the "Create" button to create the import.</listitem>        
 </itemizedlist>
     <figure id="cr11" float="1">
@@ -182,16 +170,25 @@ http://psclife.pscdog.com/catalog/seo_sitemap/product/&nbsp
       <title>Setting up a Content Crawler Job to Retrieve Sitemaps</title>
       <graphic fileref="ui/cr11a.png"/>
     </figure>    
+    <figure id="cr11b" float="1">
+      <title>Setting up a Content Crawler Job to Retrieve Sitemaps</title>
+      <graphic fileref="ui/cr11b.png"/>
+    </figure>        
   </listitem>
   <listitem>Click the "Import Queues" button.
     <figure id="cr12" float="1">
       <title>Setting up a Content Crawler Job to Retrieve Sitemaps</title>
       <graphic fileref="ui/cr12.png"/>
     </figure>
+   
   </listitem>
   <listitem>For the "Robot targets" with label "Basic Sitemap Crawling Example " click the "Run" button.
+    <figure id="cr12a" float="1">
+      <title>Setting up a Content Crawler Job to Retrieve Sitemaps</title>
+      <graphic fileref="ui/cr12a.png"/>
+    </figure>   	
   </listitem>
-  <listitem>This will result in the Target site being crawled and the retrieved pages stored locally in DAV and any sponged triples in the RDF Quad store.
+  <listitem>This will result in the Target site being crawled and the retrieved pages stored locally in DAV and any network resource triples being fetched in the RDF Quad store.
     <figure id="cr13" float="1">
       <title>Setting up a Content Crawler Job to Retrieve Sitemaps</title>
       <graphic fileref="ui/cr13.png"/>
@@ -205,7 +202,7 @@ http://psclife.pscdog.com/catalog/seo_sitemap/product/&nbsp
   </listitem>
   <listitem>Navigate to the location of newly created DAV collection:
 <programlisting><![CDATA[
-/DAV/home/demo/basic_sitemap/	
+/DAV/home/demo/VirtSample/
 ]]></programlisting>
   </listitem>
   <listitem>The retrieved content will be available in this location.
@@ -217,7 +214,7 @@ http://psclife.pscdog.com/catalog/seo_sitemap/product/&nbsp
 </orderedlist>  
   </sect5>  
   <sect5 id="contentcrawlerrdfssm"><title>Setting up a Content Crawler Job to Retrieve Semantic Sitemaps (a variation of the standard sitemap)</title>
-  <para>The following section describes how to set up crawler job for getting Semantic Sitemap's content -- a variation of standard sitemap:</para>  
+  <para>The following section describes how to set up crawler job for getting Semantic Sitemap's content: a variation of standard sitemap:</para>  
 <orderedlist>
   <listitem>From the Virtuoso Conductor User Interface i.e. http://cname:port/conductor, login as the "dba" user.</listitem>
   <listitem>Go to "Web Application Server".
@@ -399,6 +396,10 @@ create procedure WS.WS.SITEMAP_BB_STORE (
       <title>Setting up a Content Crawler Job to Retrieve Semantic Sitemap content</title>
       <graphic fileref="ui/cr17.png"/>
     </figure>    
+    <figure id="cr17a" float="1">
+      <title>Setting up a Content Crawler Job to Retrieve Semantic Sitemap content</title>
+      <graphic fileref="ui/cr17a.png"/>
+    </figure>        
   </listitem>
   <listitem>Optionally you can select "Convert Link" to make all HREFs in the local stored content relative.</listitem>
   <listitem>Click the button "Create". 
@@ -538,10 +539,325 @@ DAV/home/demo/gov.uk/data
   </listitem>       
 </orderedlist>  
   </sect5>   
+  <sect5 id="contentcrawleratom"><title>Setting up a Content Crawler Job to Retrieve Content from ATOM feed</title>
+    <para>This section demonstrates populating the Virtuoso Quad Store using ATOM feed.</para>
+    <para>Populating the Virtuoso Quad Store can be done in different ways Virtuoso supports. The Conductor -> Content Import UI offers plenty of options, one of which is the XPath expression for crawling RDF resources URLs and this feature is a powerful and easy-to-use for managing the Quad Store.</para>
+    <para>To populate the Virtuoso Quad Store, in this Guide we will use a XPAth expression for the URLs of the RDF resources references in a given ATOM feed. For ex. this one of the "National Bibliography" Store.</para>
+    <orderedlist>
+      <listitem>Go to http://cname/conductor</listitem>
+      <listitem>Enter dba credentials</listitem>
+      <listitem>Go to Web Application Server -> Content Management -> Content Imports:
+        <figure id="cra1" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra1.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>Click "New Target":
+        <figure id="cra2" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra2.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>In the presented form specify respectively:
+        <itemizedlist mark="bullet">
+          <listitem>"Target description": for ex. National Bibliography ;</listitem>
+          <listitem>"Target URL": for ex. http://data.libris.kb.se/nationalbibliography/feed/ ;
+          <para>Note: the entered URL will be the graph URI for storing the imported RDF data. You can also set it explicitly by entering another graph URI in the "Data Source URL" shown as option in this form.</para>
+          </listitem>
+          <listitem>"Copy to local DAV collection": for ex.
+<programlisting><![CDATA[
+/DAV/temp/nbio/ 	
+]]></programlisting>          	
+          </listitem>
+          <listitem>"XPath expression for links extraction:":
+<programlisting><![CDATA[
+//entry/link/@href	
+]]></programlisting>          	
+          </listitem>
+          <listitem>"Update Interval (minutes)": for ex. 10 ; </listitem>
+          <listitem>"Run Sponger": hatch this check-box ; </listitem>
+          <listitem>"Accept RDF": hatch this check-box ; </listitem>
+          <listitem>"Store metadata": hatch this check-box ; </listitem>
+          <listitem>"RDF Cartridge": hatch this check-box and specify what cartridges will be used:
+            <figure id="cra3" float="1">
+              <title>Crawling ATOM feed</title>
+              <graphic fileref="ui/cra3.png"/>
+            </figure>     
+            <figure id="cra4" float="1">
+              <title>Crawling ATOM feed</title>
+              <graphic fileref="ui/cra4.png"/>
+            </figure>
+            <figure id="cra5" float="1">
+              <title>Crawling ATOM feed</title>
+              <graphic fileref="ui/cra5.png"/>
+            </figure>
+            <figure id="cra6" float="1">
+              <title>Crawling ATOM feed</title>
+              <graphic fileref="ui/cra6.png"/>
+            </figure>                                         	
+          </listitem>
+        </itemizedlist>      	
+      </listitem>
+      <listitem>Click "Create".</listitem>
+      <listitem>The new created target should be displayed in the list of available Targets:
+        <figure id="cra7" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra7.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>Click "Import Queues": 
+        <figure id="cra8" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra8.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>Click for "National Bibliography" target the "Run" link from the very-right "Action" column.</listitem>
+      <listitem>Should be presented list of Top pending URLs:
+        <figure id="cra9" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra9.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>Finally when the import is finished, should be shown the total URLs that were processed:
+        <figure id="cra10" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra10.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>Click "Back":
+        <figure id="cra11" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra11.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>Click "Retrieved Sites":
+        <figure id="cra12" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra12.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>Out target should be presented in the list of available retrieved sites. From here you could manage the retrieved URLs by editing the imported URLs or exporting to External/Internal WebDAV destination. Click for ex. the "Edit" link of the very-right "Action" column for our retrieved site.</listitem>
+      <listitem>Should be presented all downloaded URLs of RDF resources referenced in our initial ATOM feed:
+        <figure id="cra13" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra13.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>To view the imported RDF data, go to http://cname/sparql and enter a simple query for ex.: 
+<programlisting><![CDATA[
+SELECT * 
+FROM <http://data.libris.kb.se/nationalbibliography/feed/>
+WHERE 
+  {
+    ?s ?p ?o
+  }	
+]]></programlisting>      
+        <figure id="cra14" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra14.png"/>
+        </figure>  	
+      </listitem>
+      <listitem>Click "Run Query".</listitem>
+      <listitem>The imported RDF data triples should be shown:
+        <figure id="cra15" float="1">
+          <title>Crawling ATOM feed</title>
+          <graphic fileref="ui/cra15.png"/>
+        </figure>  	      	
+      </listitem>   
+    </orderedlist>
+  </sect5>  
+  <sect5 id="contentcrawlersparqlendp"><title>Setting up a Content Crawler Job to Retrieve Content from SPARQL endpoint</title>   
+    <para>The following step-by section walks you through the process of:</para>
+    <itemizedlist mark="bullet">
+      <listitem>Populating a Virtuoso Quad Store with data from a 3rd party SPARQL endpoint</listitem>
+      <listitem>Generating RDF dumps that are accessible to basic HTTP or WebDAV user agents.</listitem>
+    </itemizedlist>
+    <orderedlist>
+      <listitem>Sample SPARQL query producing a list SPARQL endpoints:
+<programlisting><![CDATA[
+PREFIX rdf:      <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:     <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX owl:      <http://www.w3.org/2002/07/owl#>
+PREFIX xsd:      <http://www.w3.org/2001/XMLSchema#>
+PREFIX foaf:     <http://xmlns.com/foaf/0.1/>
+PREFIX dcterms:  <http://purl.org/dc/terms/>
+PREFIX scovo:    <http://purl.org/NET/scovo#>
+PREFIX void:     <http://rdfs.org/ns/void#>
+PREFIX akt:      <http://www.aktors.org/ontology/portal#>
+
+SELECT DISTINCT ?endpoint 
+WHERE 
+  { 
+    ?ds a void:Dataset . 
+    ?ds void:sparqlEndpoint ?endpoint 
+  }	
+]]></programlisting>      	
+      </listitem>
+      <listitem>Here is a sample SPARQL protocol URL constructed from one of the sparql endpoints in the result from the query above: 
+<programlisting><![CDATA[
+http://void.rkbexplorer.com/sparql/?query=PREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E+%0D%0APREFIX+void%3A+++++%3Chttp%3A%2F%2Frdfs.org%2Fns%2Fvoid%23%3E++%0D%0ASELECT+distinct+%3Furl++WHERE+%7B+%3Fds+a+void%3ADataset+%3B+foaf%3Ahomepage+%3Furl+%7D%0D%0A&format=sparql	
+]]></programlisting>      	
+      </listitem>
+      <listitem>Here is the cURL output showing a Virtuoso SPARQL URL that executes against a 3rd party SPARQL Endpoint URL: 
+<programlisting><![CDATA[
+$ curl "http://void.rkbexplorer.com/sparql/?query=PREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E+%0D%0APREFIX+void
+%3A+++++%3Chttp%3A%2F%2Frdfs.org%2Fns%2Fvoid%23%3E++%0D%0ASELECT+distinct+%3Furl++WHERE+%7B+%3Fds+a+void%3ADataset+%3B+foaf%3Ah
+omepage+%3Furl+%7D%0D%0A&format=sparql"
+<?xml version="1.0"?>
+<sparql xmlns="http://www.w3.org/2005/sparql-results#">
+  <head>
+    <variable name="url"/>
+  </head>
+  <results ordered="false" distinct="true">
+    <result>
+      <binding name="url"><uri>http://kisti.rkbexplorer.com/</uri></binding>
+    </result>
+    <result>
+      <binding name="url"><uri>http://epsrc.rkbexplorer.com/</uri></binding>
+    </result>
+    <result>
+      <binding name="url"><uri>http://test2.rkbexplorer.com/</uri></binding>
+    </result>
+    <result>
+      <binding name="url"><uri>http://test.rkbexplorer.com/</uri></binding>
+    </result>
+    ...
+    ...
+    ...
+  </results>
+</sparql>	
+]]></programlisting>      	
+      </listitem>
+      <listitem>Go to Conductor UI. For ex. http://localhost:8890/conductor :
+        <figure id="scp1" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp1.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>Enter dba credentials;</listitem>
+      <listitem>Go to "Web Application Server"-> "Content Management" -> "Content Imports"
+        <figure id="scp2" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp2.png"/>
+        </figure>        	
+      </listitem>
+      <listitem>Click "New Target":
+        <figure id="scp3" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp3.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>In the presented form enter for ex.:
+        <orderedlist>
+          <listitem>"Target description": voiD store;</listitem>
+          <listitem>"Target URL": the url from above i.e.:
+<programlisting><![CDATA[
+http://void.rkbexplorer.com/sparql/?query=PREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E+%0D%0APREFIX+void%3A+++++%3Chttp%3A%2F%2Frdfs.org%2Fns%2Fvoid%23%3E++%0D%0ASELECT+distinct+%3Furl++WHERE+%7B+%3Fds+a+void%3ADataset+%3B+foaf%3Ahomepage+%3Furl+%7D%0D%0A&format=sparql	
+]]></programlisting>          	
+          </listitem>
+          <listitem>"Copy to local DAV collection":
+<programlisting><![CDATA[
+/DAV/void.rkbexplorer.com/content	
+]]></programlisting>          	
+          </listitem>
+          <listitem>"Follow links matching (delimited with ;)": 
+<programlisting><![CDATA[
+%
+]]></programlisting>          	
+          </listitem>
+          <listitem>Un-hatch "Use robots.txt" ;</listitem>
+          <listitem>"XPath expression for links extraction":
+<programlisting><![CDATA[
+//binding[@name="url"]/uri/text()	
+]]></programlisting>          	
+          </listitem>
+          <listitem>Hatch "Semantic Web Crawling";</listitem>
+          <listitem>"If Graph IRI is unassigned use this Data Source URL:": enter for ex:
+<programlisting><![CDATA[
+http://void.collection	
+]]></programlisting>          	
+          </listitem>
+          <listitem>Hatch "Follow URLs outside of the target host";</listitem>  
+          <listitem>Hatch "Run "Sponger" and "Accept RDF"
+            <figure id="scp4" float="1">
+              <title>Crawling SPARQL Endpoints</title>
+              <graphic fileref="ui/scp4.png"/>
+            </figure>           	
+            <figure id="scp5" float="1">
+              <title>Crawling SPARQL Endpoints</title>
+              <graphic fileref="ui/scp5.png"/>
+            </figure>           	
+            <figure id="scp6" float="1">
+              <title>Crawling SPARQL Endpoints</title>
+              <graphic fileref="ui/scp6.png"/>
+            </figure>           	                        
+          </listitem>
+        </orderedlist>      	
+      </listitem>
+      <listitem>Click "Create";</listitem>
+      <listitem>The target should be created and presented in the list of available targets:
+        <figure id="scp7" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp7.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>Click "Import Queues":
+        <figure id="scp8" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp8.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>Click "Run" for the imported target: 
+        <figure id="scp9" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp9.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>To check the retrieved content go to "Web Application Server"-> "Content Management" -> "Content Imports" -> "Retrieved Sites":
+        <figure id="scp11" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp11.png"/>
+        </figure>       	      	
+      </listitem>
+      <listitem>Click "voiD store" -> "Edit":
+        <figure id="scp12" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp12.png"/>
+        </figure>       	
+      </listitem>
+      <listitem>To check the imported URLs go to "Web Application Server"-> "Content Management" -> "Repository" path DAV/void.rkbexplorer.com/content:
+        <figure id="scp10" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp10.png"/>
+        </figure>      	
+      </listitem>
+      <listitem>To check the inserted into the RDF QUAD data go to http://cname/sparql and execute the following query:
+<programlisting><![CDATA[
+SELECT * 
+FROM <http://void.collection> 
+WHERE 
+  {
+    ?s ?p ?o
+  }	
+]]></programlisting>    
+        <figure id="scp13" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp13.png"/>
+        </figure>    	
+        <figure id="scp14" float="1">
+          <title>Crawling SPARQL Endpoints</title>
+          <graphic fileref="ui/scp14.png"/>
+        </figure>    	        
+      </listitem>
+    </orderedlist>
+  </sect5>
   </sect4>
   </sect3>
   <sect3 id="admiui.accesscontrol"><title>Access Control</title>
-    <para>From "System Admin"/"Access Controls" you can manage Rules and ACL respectively for HTTP, News and Proxy.
+    <para>From "System Admin" -> Security -> "Access Controls" you can manage Rules and ACL 
+    	respectively for HTTP, News, Proxy. The tabs PSH and PSH-SSL are available only when the 
+	    <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/pubsubhub_dav.vad">pubsubhub_dav.vad</ulink> 
+	    is installed.
     </para>
           <figure float="1" id="acl001"><title>Access Control Lists</title>
       <graphic fileref="ui/acl001.png"/>
diff --git a/docsrc/xmlsource/adminui.xml b/docsrc/xmlsource/adminui.xml
index 2b14a62..cdff8a8 100644
--- a/docsrc/xmlsource/adminui.xml
+++ b/docsrc/xmlsource/adminui.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -60,6 +60,13 @@ administrate views, tables, stored procedures, trigger definitions, user define
 		<title>Database Administration</title>
 		<graphic fileref="database.png"/>
 	</figure>
+<para>From "Replication" you can create Snapshot Replications to copy sections of the Database
+    to remote locations or use Transactional Replication to keep Virtuoso Servers
+    in sync over a definable interval.</para>
+	<figure id="adminuireplication" float="1">
+		<title>Replication</title>
+		<graphic fileref="replication.png"/>
+        </figure>	
 <para>From "Web Application Server" you can configure Virtuoso's WebDAV, and HTTP
 Server functionality, which includes management of Virtual Domains & Directories.</para>
 	<figure id="adminuiwebdav" float="1">
@@ -80,14 +87,9 @@ perform WSDL Import/Export, manage your BPEL processes.
 		<title>web Services</title>
 		<graphic fileref="webservices.png"/>
 	</figure>
-<para>From "Replication" you can create Snapshot Replications to copy sections of the Database
-    to remote locations or use Transactional Replication to keep Virtuoso Servers 
-    in sync over a definable interval.</para>
-	<figure id="adminuireplication" float="1">
-		<title>Replication</title>
-		<graphic fileref="replication.png"/>
-        </figure>
-      <para>From "RDF" you can execute/save/load SPARQL queries, add/edit RDF Mapping, make statistics, manage graphs, import schemas and define namespaces, generated RDF views, upload to the RDF Store:</para>
+      <para>From "Linked Data" you can execute/save/load SPARQL queries, add/edit RDF Mapping, make 
+      	statistics, manage graphs, import schemas and define namespaces, generated Linked Data Views, 
+      	upload to the Quad Store:</para>
 	<figure id="adminuirdf" float="1">
                 <title>RDF</title>
 		<graphic fileref="rdf.png"/>
diff --git a/docsrc/xmlsource/adminui.xmlservices.xml b/docsrc/xmlsource/adminui.xmlservices.xml
index 1202931..31b4f12 100644
--- a/docsrc/xmlsource/adminui.xmlservices.xml
+++ b/docsrc/xmlsource/adminui.xmlservices.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/aggregates.xml b/docsrc/xmlsource/aggregates.xml
index 1c34908..99404e4 100644
--- a/docsrc/xmlsource/aggregates.xml
+++ b/docsrc/xmlsource/aggregates.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/appendixa.xml b/docsrc/xmlsource/appendixa.xml
index 40dc12f..a2017e2 100644
--- a/docsrc/xmlsource/appendixa.xml
+++ b/docsrc/xmlsource/appendixa.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/backup.xml b/docsrc/xmlsource/backup.xml
index 5e589e8..97842d6 100644
--- a/docsrc/xmlsource/backup.xml
+++ b/docsrc/xmlsource/backup.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -583,5 +583,58 @@ After this initial step the system tables will be compatible and the
 dba can proceed to replay the remaining recovery logs with the replay function.
 </para>
 		</sect4>
+		<sect4 id="procindexrecov"> 
+      <title>Backup and Restore individual table(s) and individual index(s) on a new fresh db</title>			
+      <para>This section describes how to get a part of db tables and restore on a new db.</para>
+      <para>Additionally, part of the steps from below can be used to backup separate table and recover 
+      	on same db.</para>
+      <para>Note: Only effective with Virtuoso 6.0 and later.</para>        
+      <para>Basic steps:</para>             
+      <orderedlist>
+        <listitem>Create a function for dumping the key:
+<programlisting><![CDATA[
+create procedure bkp_key (in f any, in tb_name varchar, in key_name varchar)
+{
+  backup_prepare (f);
+  backup_index (tb_name, key_name);
+  backup_flush ();
+  backup_close ();
+}
+;	
+]]></programlisting>        	
+        </listitem>
+        <listitem>On the source db execute: 
+<programlisting><![CDATA[
+bkp_key ('mylog.txn', 'DB.DBA.T1', 'T1');	
+]]></programlisting>        	
+          <para>This will dump in a "mylog.txn" file the T1 table's primary key.</para>
+        </listitem>
+        <listitem>On source db stop server and do: 
+<programlisting><![CDATA[
+virtuoso +backup-dump +foreground +mode l   ## ( lower case L )
+]]></programlisting>        	
+          <para>This will dump the schema tables only into the trx file.</para>
+        </listitem>
+        <listitem>On the target db make sure there is no db file and place the trx file produced 
+        	by previous step. Execute: 
+<programlisting><![CDATA[
+virtuoso +restore-crash-dump +foreground ;
+]]></programlisting>        	
+          <para>This will create a new db with same db schema as on the source db.</para>
+        </listitem>
+        <listitem>Start the target and do: 
+<programlisting><![CDATA[
+replay ('mylog.txn') ;	
+]]></programlisting>        	
+          <para>This will insert the PK data into the table from the source db dump.</para>
+        </listitem>
+        <listitem>If the table in question has other indexes must drop them and re-create them, since they 
+        	are empty as in previous step we have been restoring only the PK.
+        </listitem>
+      </orderedlist>      
+      <para><emphasis>Note</emphasis>: following the steps from above can be dumped each index and 
+      then replay. Also the steps may be combined for multiple tables and keys in the backup procedure - 
+      just needs to be added the corresponding calls to the backup_index() function.</para>
+    </sect4>
 		</sect3>
 </sect2>
diff --git a/docsrc/xmlsource/bidirrepl.xml b/docsrc/xmlsource/bidirrepl.xml
index c3465e5..1ff8cda 100644
--- a/docsrc/xmlsource/bidirrepl.xml
+++ b/docsrc/xmlsource/bidirrepl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bidirtransrepl.xml b/docsrc/xmlsource/bidirtransrepl.xml
index 2a5843d..1c73570 100644
--- a/docsrc/xmlsource/bidirtransrepl.xml
+++ b/docsrc/xmlsource/bidirtransrepl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/blog_atom.xml b/docsrc/xmlsource/blog_atom.xml
index 472e439..970ab98 100644
--- a/docsrc/xmlsource/blog_atom.xml
+++ b/docsrc/xmlsource/blog_atom.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/blogger.xml b/docsrc/xmlsource/blogger.xml
index 06c9a96..64c021c 100644
--- a/docsrc/xmlsource/blogger.xml
+++ b/docsrc/xmlsource/blogger.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel.xml b/docsrc/xmlsource/bpel.xml
index 93ec360..d333ac5 100644
--- a/docsrc/xmlsource/bpel.xml
+++ b/docsrc/xmlsource/bpel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_compile_script.xml b/docsrc/xmlsource/bpel/bpel_compile_script.xml
index 9c9856f..dc8a013 100644
--- a/docsrc/xmlsource/bpel/bpel_compile_script.xml
+++ b/docsrc/xmlsource/bpel/bpel_compile_script.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_copy_script.xml b/docsrc/xmlsource/bpel/bpel_copy_script.xml
index 1fe7469..b5d2252 100644
--- a/docsrc/xmlsource/bpel/bpel_copy_script.xml
+++ b/docsrc/xmlsource/bpel/bpel_copy_script.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_get_partner_links.xml b/docsrc/xmlsource/bpel/bpel_get_partner_links.xml
index da002c4..9422adf 100644
--- a/docsrc/xmlsource/bpel/bpel_get_partner_links.xml
+++ b/docsrc/xmlsource/bpel/bpel_get_partner_links.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_get_var.xml b/docsrc/xmlsource/bpel/bpel_get_var.xml
index d82cf88..9514dff 100644
--- a/docsrc/xmlsource/bpel/bpel_get_var.xml
+++ b/docsrc/xmlsource/bpel/bpel_get_var.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_import_script.xml b/docsrc/xmlsource/bpel/bpel_import_script.xml
index 7261398..2f4b460 100644
--- a/docsrc/xmlsource/bpel/bpel_import_script.xml
+++ b/docsrc/xmlsource/bpel/bpel_import_script.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_instance_delete.xml b/docsrc/xmlsource/bpel/bpel_instance_delete.xml
index e37fdfc..48f1e8f 100644
--- a/docsrc/xmlsource/bpel/bpel_instance_delete.xml
+++ b/docsrc/xmlsource/bpel/bpel_instance_delete.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_plink_get_option.xml b/docsrc/xmlsource/bpel/bpel_plink_get_option.xml
index 1b17f12..e81717b 100644
--- a/docsrc/xmlsource/bpel/bpel_plink_get_option.xml
+++ b/docsrc/xmlsource/bpel/bpel_plink_get_option.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_plink_set_option.xml b/docsrc/xmlsource/bpel/bpel_plink_set_option.xml
index c0a973b..56a413d 100644
--- a/docsrc/xmlsource/bpel/bpel_plink_set_option.xml
+++ b/docsrc/xmlsource/bpel/bpel_plink_set_option.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_purge.xml b/docsrc/xmlsource/bpel/bpel_purge.xml
index 30085b3..56bd4d2 100644
--- a/docsrc/xmlsource/bpel/bpel_purge.xml
+++ b/docsrc/xmlsource/bpel/bpel_purge.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_script_delete.xml b/docsrc/xmlsource/bpel/bpel_script_delete.xml
index 0c9ad8c..9bf5015 100644
--- a/docsrc/xmlsource/bpel/bpel_script_delete.xml
+++ b/docsrc/xmlsource/bpel/bpel_script_delete.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_script_obsolete.xml b/docsrc/xmlsource/bpel/bpel_script_obsolete.xml
index cd60443..96a140a 100644
--- a/docsrc/xmlsource/bpel/bpel_script_obsolete.xml
+++ b/docsrc/xmlsource/bpel/bpel_script_obsolete.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_script_source_update.xml b/docsrc/xmlsource/bpel/bpel_script_source_update.xml
index c8d3e4b..e84afb4 100644
--- a/docsrc/xmlsource/bpel/bpel_script_source_update.xml
+++ b/docsrc/xmlsource/bpel/bpel_script_source_update.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_script_upload.xml b/docsrc/xmlsource/bpel/bpel_script_upload.xml
index c1ac807..310f5d5 100644
--- a/docsrc/xmlsource/bpel/bpel_script_upload.xml
+++ b/docsrc/xmlsource/bpel/bpel_script_upload.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_script_version_cleanup.xml b/docsrc/xmlsource/bpel/bpel_script_version_cleanup.xml
index 1cf4d90..4483a9d 100644
--- a/docsrc/xmlsource/bpel/bpel_script_version_cleanup.xml
+++ b/docsrc/xmlsource/bpel/bpel_script_version_cleanup.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_set_var.xml b/docsrc/xmlsource/bpel/bpel_set_var.xml
index 67856e9..b13e07f 100644
--- a/docsrc/xmlsource/bpel/bpel_set_var.xml
+++ b/docsrc/xmlsource/bpel/bpel_set_var.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/bpel/bpel_wsdl_upload.xml b/docsrc/xmlsource/bpel/bpel_wsdl_upload.xml
index e1003b2..0727fbe 100644
--- a/docsrc/xmlsource/bpel/bpel_wsdl_upload.xml
+++ b/docsrc/xmlsource/bpel/bpel_wsdl_upload.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/cinterface.xml b/docsrc/xmlsource/cinterface.xml
index 1d9398e..b419533 100644
--- a/docsrc/xmlsource/cinterface.xml
+++ b/docsrc/xmlsource/cinterface.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/concepts.xml b/docsrc/xmlsource/concepts.xml
index d54c169..29bc369 100644
--- a/docsrc/xmlsource/concepts.xml
+++ b/docsrc/xmlsource/concepts.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/createassembly.xml b/docsrc/xmlsource/createassembly.xml
index 377514d..a81d6c1 100644
--- a/docsrc/xmlsource/createassembly.xml
+++ b/docsrc/xmlsource/createassembly.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/createexthostproc.xml b/docsrc/xmlsource/createexthostproc.xml
index d279cb5..e3e1194 100644
--- a/docsrc/xmlsource/createexthostproc.xml
+++ b/docsrc/xmlsource/createexthostproc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/dbconcepts.xml b/docsrc/xmlsource/dbconcepts.xml
index db647c2..045c32c 100644
--- a/docsrc/xmlsource/dbconcepts.xml
+++ b/docsrc/xmlsource/dbconcepts.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -141,7 +141,7 @@ relationship between the tables' primary and other keys.
 			<title>Object ID</title>
 			<para>
 A table does not necessarily declare a primary key.  Even so, the table must
-have a primary key — in this case a synthetic record ID which is defined
+have a primary key - in this case a synthetic record ID which is defined
 as primary key. The record ID  is an autoincrementing column that is normally
 invisible but, if present, can be accessed by explicit reference. One should
 not rely on this feature being available, though.
@@ -473,8 +473,8 @@ There are 3 additional data types to enable storing of Unicode data:
 			</itemizedlist>
 			<para>
 All the Unicode types are equivalent to their corresponding
-"narrow" type — CHAR,
-VARCHAR and LONG VARCHAR — except that instead of storing data as one byte they allow
+"narrow" type - CHAR,
+VARCHAR and LONG VARCHAR - except that instead of storing data as one byte they allow
 Unicode characters. Their lengths are defined and returned in characters instead of bytes.
 They collate according to the active wide character collation, if any.  By 
 default this is the order of the Unicode serialization values.  These types 
@@ -500,8 +500,8 @@ project narrow character codes into the Unicode space
 as equally valued wide-character codes.
 </para>
 			<para>
-When conversion is done client-side — for example, when binding a VARCHAR to a
-wide buffer — the default client's system character set is used.
+When conversion is done client-side - for example, when binding a VARCHAR to a
+wide buffer - the default client's system character set is used.
 </para>
 			<para>
 Wide-character literals have ANSI SQL92 syntax: N'xxx' (prefixing normal literals
@@ -627,19 +627,19 @@ The descriptions below apply to insert and update operations for these types:
 <itemizedlist mark="bullet">
 <listitem><para>Long varchar = x, where x is:</para>
 <simplelist>
-<member>varchar — The text is stored as is.</member>
-<member>Long varchar — the text is stored as is.</member>
-<member>string output — the contents in the string output are stored as the value,
+<member>varchar - The text is stored as is.</member>
+<member>Long varchar - the text is stored as is.</member>
+<member>string output - the contents in the string output are stored as the value,
 unchanged.  The state of the string output is not changed. </member>
-<member>XML entity — The XML tree rooted at the entity is stored
+<member>XML entity - The XML tree rooted at the entity is stored
 as persistent XML (disk-based) if the entity references a persistent XML tree.
 Note that this may either extract a subtree or copy a tree, depending on whether
 the entity references the root.  If the entity references a memory-based tree,
 the text of the tree with the element as the topmost (document) element is
 produced and set as the value of the column.</member>
-<member>Nvarchar — The text is stored as wide, thus the value is internally a
+<member>Nvarchar - The text is stored as wide, thus the value is internally a
 long nvarchar although the declared column type is long varchar.</member>
-<member>Long nvarchar — The value is stored as a long nvarchar, as with an nvarchar.</member>
+<member>Long nvarchar - The value is stored as a long nvarchar, as with an nvarchar.</member>
 </simplelist>
 </listitem>
 
@@ -662,18 +662,18 @@ column metadata for ODBC clients, where its type conversions may be different.
 <listitem>
 <para>Varchar = x, where x is:</para>
 <simplelist>
-<member>long varchar, string output, XML entity — as with long varchar.</member>
-<member>Nvarchar, Long nvarchar — the text is stored as wide; no information is lost.</member>
+<member>long varchar, string output, XML entity - as with long varchar.</member>
+<member>Nvarchar, Long nvarchar - the text is stored as wide; no information is lost.</member>
 </simplelist>
 </listitem>
 
 <listitem>
 <para>Nvarchar = x, where x is:</para>
 <simplelist>
-<member>Long varchar, varchar — the string is converted to wide
+<member>Long varchar, varchar - the string is converted to wide
 according to the character set effective in the connection.
 </member>
-<member>Long nvarchar, Nvarchar — The text is stored as is.</member>
+<member>Long nvarchar, Nvarchar - The text is stored as is.</member>
 </simplelist>
 </listitem>
 </itemizedlist>
@@ -800,6 +800,196 @@ file:// protocol.
 </sect4>
 </sect3>
 	</sect2>
+	
+	   <!-- ======================================== -->
+   <sect2 id="colstore"><title>Virtuoso Column Store</title>
+     <para>Note: This feature only applies to Virtuoso 7.0 and later.</para>
+     <para>As of version 7, Virtuoso offers a column-wise compressed storage format alongside 
+     	its traditional row-wise storage format.</para> 
+     <para>In the column-wise storage model, each column of a table or index is stored contiguously, so 
+     	that values of a single column on consecutive rows are physically adjacent. In this way, adjacent 
+     	values are of the same type, and if the index is sorted on said value, the consecutive values 
+     	often form an ascending sequence. This organization allows the use of more powerful compression 
+     	techniques than could be used for rows where consecutive values belong to different columns, and 
+     	thus are of disparate data types with values in different ranges.</para>
+     <para>Furthermore, when queries only access a subset of columns from one table, only those 
+     	columns actually being accessed need to be read from disk, thereby making better use of I/O 
+     	throughput and memory. Unreferenced columns will not take space in the memory based cache 
+     	of the database. Further, the traffic between CPU cache and main memory is reduced when 
+     	data is more compact, leading to better CPU utilization.</para>
+     <para>The column-wise format is substantially more compact and offers substantially greater 
+     	sequential-access performance, as well as greater random-access performance in situations 
+     	where many rows are accessed together in a join. For single-row random-access, a row-wise 
+     	format offers higher performance as long as the data is in memory. In practice, for large 
+     	tables, the higher compression achieved with column-wise storage allows a larger portion 
+     	of the data to be kept in memory, leading to less frequent I/O and consequently higher 
+     	performance.</para>
+     <para>One should not use column-wise storage in cases where columns are frequently updated, 
+     	especially if a single row is updated per statement. This will give performance substantially 
+     	worse than row-wise storage. However, bulk inserts and deletes are efficient with 
+     	column-wise storage.</para>
+     
+     <sect3 id="colstorecreatetblind"><title>Creating Column Store Tables and Indices</title>
+       <para>Any index or primary key, i.e., any table, can be declared to be stored column-wise. 
+       	A single table can have multiple indices, of which some are stored column-wise and some are 
+       	not. As with tables stored row-wise, the table row itself is stored following the primary 
+       	key index entry on the index tree leaf corresponding to the entry. This arrangement is 
+       	sometimes called a <emphasis>clustered index</emphasis>.</para>
+       <para>The statement below declares the table xx to be stored column-wise:</para>
+ <programlisting><![CDATA[
+CREATE TABLE xx ( id    INT, 
+                  data  VARCHAR, 
+                  PRIMARY KEY (id) COLUMN
+                );
+ ]]></programlisting>
+       <para>This statement adds a column-wise stored index to the table:</para>
+ <programlisting><![CDATA[
+CREATE COLUMN INDEX xxi 
+  ON xx (data);
+ ]]></programlisting>
+       <para>The <emphasis>COLUMN</emphasis> keyword can come after the column list of the 
+       primary key declaration of a table or anywhere between the <emphasis>CREATE</emphasis> 
+       and <emphasis>INDEX</emphasis> keywords of a create index statement.</para>
+       <para>Note that the <emphasis>BITMAP</emphasis> keyword cannot be used together 
+       with the <emphasis>COLUMN</emphasis> keyword. Column-wise indices will automatically 
+       use bitmap compression when appropriate without this being specified. A column-wise 
+       index is likely to be more space-efficient than a row-wise bitmap index with the same 
+       key parts.</para>
+       <para>The directives for column compression in <emphasis>CREATE TABLE (NO COMPRESS, COMPRESS PREFIX)</emphasis> 
+       have no effect on column-wise stored tables. Data is compressed in a manner chosen at run 
+       time based on the data itself.</para>
+     </sect3>
+       
+     <sect3 id="colstoretransup"><title>Column Store Transaction Support</title>
+       <para>All SQL operations work identically for column- or row-wise tables and indices. 
+       	The locking behavior is also identical, with row-level locking supported on all isolation 
+       	levels. The behavior of the <emphasis>READ COMMITTED</emphasis> isolation is non-locking, 
+       	showing the pre-image of updated data when reading pages with uncommitted inserts or updates.</para> 
+       <para>Recovery is by roll forward, and checkpoints will only store committed states of the 
+       	database, even if started when there are uncommitted transactions pending.</para>
+     </sect3>
+     
+     <sect3 id="colstorespaceutil"><title>Column Space Utilization</title> 
+       <para>The system table <emphasis>DB.DBA.sys_col_info</emphasis> holds information about space 
+       utilization of column-wise indices.</para>
+       <para>This table is updated only after the <emphasis>DB.DBA.sys_index_space_stats</emphasis> 
+       procedure view has been accessed. Thus, one must first make a selection from 
+       <emphasis>DB.DBA.sys_index_space_stats</emphasis>.</para>
+       <para>The columns of <emphasis>sys_col_info</emphasis> have the following meaning:</para>
+       <itemizedlist mark="bullet">
+         <listitem><emphasis>COI_TABLE</emphasis> - The table in question.</listitem>
+         <listitem><emphasis>COI_INDEX</emphasis> - The index in question.</listitem>
+         <listitem><emphasis>COI_NTH</emphasis> - The ordinal position of the column in question 
+         in the key.</listitem>
+         <listitem><emphasis>COI_TYPE</emphasis> - This indicates the type of compression entry the rest 
+         of the row concerns. For each column in the key, there is a row with <emphasis>coi_type</emphasis> 
+         set to -1, representing the total of the remaining fields.</listitem>
+         <listitem><emphasis>COI_COLUMN</emphasis> - The name of the column concerned.</listitem>
+         <listitem><emphasis>COI_PAGES</emphasis> - This is the number of database pages allocated for 
+         storing data of this column.</listitem>
+         <listitem><emphasis>COI_CES</emphasis> - The count of compression entries for the column. A 
+         compression entry is logically an array of consecutive values that share a common compression 
+         format. Different parts of the same column may have different compression.</listitem>
+         <listitem><emphasis>COI_VALUES</emphasis> - This is the count of values that are stored with the 
+         compression format in question.</listitem>
+         <listitem><emphasis>COI_BYTES</emphasis>- The is the number of bytes actually occupied by the 
+         compression entries concerned. Pages may not always by full, thus this metric can be used to 
+         measure the page fill ratio, i.e.:
+<programlisting><![CDATA[
+100 * coi_bytes / (coi_n_pages * 8192.0) 
+]]></programlisting>
+         </listitem>                                
+       </itemizedlist>
+       <para>To see which columns take the most space, and how full the pages are, as well as the 
+       	overall effectiveness of compression, one can do:</para>
+ <programlisting><![CDATA[
+SELECT                                       coi_column         , 
+                         coi_pages * 8192  AS  total_bytes        , 
+         coi_bytes / (coi_pages * 8192.0)  AS  page_fill          , 
+                                               coi_bytes          , 
+             1.0 * coi_bytes / coi_values  AS  ce_bytes_per_value , 
+          8192.0 * coi_pages / coi_values  AS  bytes_per_value 
+    FROM sys_col_info 
+   WHERE coi_type = -1 
+ORDER BY coi_pages DESC ;
+ ]]></programlisting>
+       <para>Note that issuing a query like:</para> 
+ <programlisting><![CDATA[
+ SELECT TOP 20 * 
+    FROM sys_index_space_stats 
+ORDER BY iss_pages DESC; 
+ ]]></programlisting>
+       <para>will update the <emphasis>sys_col_info</emphasis> table which is initially empty.</para> 
+       <para>The <emphasis>sys_index_space_stats</emphasis> view shows the number of pages used for 
+       the sparse row-wise index tree top for column-wise indices.</para>
+       <para>The number of rows shown there for column-wise indices is the number of entries of 
+       	the sparse index, not the row-count of the index. The space utilization here will be under 
+       	1% of the total for a column-wise index.</para>
+       <para>Below we look at space utilization of the <emphasis>O</emphasis> column of the primary 
+       key of the <emphasis>RDF_QUAD</emphasis> table.</para>
+ <programlisting><![CDATA[
+SELECT * 
+  FROM sys_col_info 
+ WHERE  coi_index = 'DB.DBA.RDF_QUAD' 
+   AND coi_column = 'O' ;
+ coi_table             coi_index           coi_nth           coi_type          coi_column    coi_pages      coi_ces    coi_values    coi_bytes
+ VARCHAR NOT NULL      VARCHAR NOT NULL    INTEGER NOT NULL  INTEGER NOT NULL  VARCHAR       INTEGER        INTEGER    INTEGER       INTEGER
+ _______________________________________________________________________________
+ 
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 -1                O             654663         0          1252064815    4617808494
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 1                 O             0              229074     97104862      947215
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 3                 O             0              3227395    490806316     3905658370
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 4                 O             0              94038      17227799      8554746
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 6                 O             0              389126     551074747     579191659
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 8                 O             0              160814     48480188      12026273
+ DB.DBA.RDF_QUAD       DB.DBA.RDF_QUAD     2                 10                O             0              652817     47370903      111430231
+ ]]></programlisting>
+       <para>The top line is the overall summary across all the compression types.</para>
+       <para>The lines below give information per-compression-type. The values of 
+       	<emphasis>coi_type</emphasis> mean the following:</para>
+       <itemizedlist mark="bullet">
+         <listitem>1 - <emphasis>run length</emphasis>. The value occurs once, followed 
+         by the number of repetitions.</listitem>
+         <listitem>3 - <emphasis>array</emphasis>. Values are stored consecutively without compression. 
+         The array elements are 4- or 8-byte depending on range. For variable length types, some 
+         compression applies because values differing only in their last byte will only have the 
+         last byte stored.</listitem>
+         <listitem>4 - <emphasis>bitmap</emphasis>. For closely-spaced unique ascending values, the 
+         bitmap has a start value in full, and a bitmap with the nth bit set if start + nth occurs 
+         in the column.</listitem>
+         <listitem>6 - <emphasis>dictionary</emphasis>. For non-ordered, low-cardinality columns, 
+         there can be a dictionary with either 4 or 8 bytes per entry, depending on the number of 
+         distinct values being encoded. The compression entry is prefixed by an array with the values 
+         in full, followed by an array of positions in the dictionary.</listitem>
+         <listitem>8 - <emphasis>run length with small deltas</emphasis>. For repeating, closely-spaced 
+         ascending values, the run-length-delta format stores a start value in full, followed by an 
+         array of bytes of which 4 bits are a delta to the previous value, and 4 bits are a run 
+         length.</listitem>
+         <listitem>10 - <emphasis>integer delta with large deltas</emphasis>. This format stores an 
+         initial value followed by stretches of non-ordered values within 64K of the base value. 
+         There can be multiple such stretches, each prefixed with a 32-bit delta from the base value. 
+         This is useful for closely-spaced medium- cardinality values like dates, or for relatively 
+         sparse ascending sequences, e.g., ascending sequences with a step of 1000 or more.</listitem>
+       </itemizedlist>
+     </sect3>  
+   </sect2>
+ 
+ 
+ 	<!-- ======================================== -->
+   <sect2 id="explvectprcode"><title>Explicit Vectoring of Procedural Code</title>
+     <para>Note: This feature only applies to Virtuoso 7.0 and later.</para>  
+     <para>Vectored execution can be explicitly controlled for Virtuoso PL code, either by 
+     	declaring a whole procedure to be vectored or by executing a block inside a procedure on 
+     	multiple values at one time. See more detailed description, respectively for:</para>
+       <itemizedlist mark="bullet">
+         <listitem><link linkend="vectoredprocedure">Vectored Procedures</link></listitem>
+         <listitem><link linkend="forvectorestatement">FOR VECTORED Statement</link></listitem>
+         <listitem><link linkend="limitonvectorecode">Limitations on Vectored Code</link></listitem>
+         <listitem><link linkend="datatypesandvectoring">Data Types and Vectoring</link></listitem>        
+       </itemizedlist>
+     
+   </sect2>
+
 	<!-- ======================================== -->
 	<sect2 id="Locking">
 		<title>Locking</title>
@@ -1003,7 +1193,7 @@ user id. A user account can be used as a user group.   User group ids are
 normal user ids. A user has all the privileges granted to it, all the
 privileges granted to the user whose user id appears as its group id and
 all the privileges granted to PUBLIC. Additionally if the user is dba
-— which Virtuoso sets as id 0 — or if its group id is 0, then
+- which Virtuoso sets as id 0 - or if its group id is 0, then
 it has all privileges.
 </para>
 			<para>
@@ -1216,7 +1406,7 @@ are not defined in the supertable given in the select.
 A row identity string is the part of a row string that contains the table information and the
 primary key. Each row in a database has a unique row identity string. The row identity string
 is a regular varchar object that can appear as a column value.  This is a generalization of a
-foreign key — a single column reference to an entity whose type is determined at run time.
+foreign key - a single column reference to an entity whose type is determined at run time.
 </para>
 		<para>
 The object ID is a special data type that resembles a string in that it contains a variable
@@ -1512,8 +1702,8 @@ functions such as <function>http_header()</function>.
 The HTTP server uses the character set mainly to format correctly
 values using the <function>http_value()</function> function or its VSP
 equivalent <?= ...>.
-In these cases wide values and XML entities — the result of XML
-processing function like <function>xpath_contains()</function> — get
+In these cases wide values and XML entities - the result of XML
+processing function like <function>xpath_contains()</function> - get
 represented using the HTTP/XML translation rules described above.
 The same rules apply for results returned by the FOR XML directive, by XML
 Views, and for WebDAV content.
@@ -1624,7 +1814,7 @@ CREATE TABLE SYS_COLLATIONS (
 </programlisting>
 			<para>
 <parameter>COLL_NAME</parameter> is the fully qualified name of the
-collation — its identifier.
+collation - its identifier.
 </para>
 			<para>
 <parameter>COLL_TABLE</parameter> holds the collation table itself.  This
diff --git a/docsrc/xmlsource/dbpump.xml b/docsrc/xmlsource/dbpump.xml
index 056239c..94bf6e5 100644
--- a/docsrc/xmlsource/dbpump.xml
+++ b/docsrc/xmlsource/dbpump.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/errors.xml b/docsrc/xmlsource/errors.xml
index 2ff7611..08549dd 100644
--- a/docsrc/xmlsource/errors.xml
+++ b/docsrc/xmlsource/errors.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/exposingws.xml b/docsrc/xmlsource/exposingws.xml
index b14fdbf..b35e265 100644
--- a/docsrc/xmlsource/exposingws.xml
+++ b/docsrc/xmlsource/exposingws.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/fault.xml b/docsrc/xmlsource/fault.xml
index 7627286..41c3791 100644
--- a/docsrc/xmlsource/fault.xml
+++ b/docsrc/xmlsource/fault.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/freetext.xml b/docsrc/xmlsource/freetext.xml
index a771b8f..542e76e 100644
--- a/docsrc/xmlsource/freetext.xml
+++ b/docsrc/xmlsource/freetext.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ftp.xml b/docsrc/xmlsource/ftp.xml
index 268254e..516a444 100644
--- a/docsrc/xmlsource/ftp.xml
+++ b/docsrc/xmlsource/ftp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/GROUP_CONCAT.xml b/docsrc/xmlsource/funcref/GROUP_CONCAT.xml
new file mode 100644
index 0000000..23d7446
--- /dev/null
+++ b/docsrc/xmlsource/funcref/GROUP_CONCAT.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_GROUP_CONCAT">
+  <refmeta>
+    <refentrytitle>GROUP_CONCAT</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>GROUP_CONCAT</refname>
+    <refpurpose>returns an arbitrary value from the multiset passed to it.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_GROUP_CONCAT">
+      <funcprototype id="fproto_GROUP_CONCAT">
+        <funcdef><function>GROUP_CONCAT</function></funcdef>
+	        <paramdef>in <parameter>token</parameter> varchar</paramdef>
+	        <paramdef>in <parameter>delim</parameter> varchar</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_GROUP_CONCAT">
+    <title>Description</title>
+    <para>GROUP_CONCAT is aggregate function that performs a string concatenation across 
+    	the values of an expression with a group. The order of the strings is not specified. 
+    	The separator character used in the concatenation may be given with the scalar 
+    	argument delimiter.</para>
+    <para>Note: the "sql:" prefix is mandatory when this aggregate is used in SPARQL queries. 
+    	In SQL queries the prefix is "DB.DBA".
+    </para>
+  </refsect1>
+  <refsect1 id="params_GROUP_CONCAT">
+    <title>Parameters</title>
+    <refsect2><title>token</title>
+      <para>An item that should be added to a delimited list.</para>
+    </refsect2>
+    <refsect2><title>delim</title>
+      <para>The delimeter character to be used in the concatenation.</para>
+    </refsect2>
+    
+  </refsect1>
+  <refsect1 id="ret_GROUP_CONCAT"><title>Return Types</title>
+    <para>any</para>
+  </refsect1>
+  <refsect1 id="examples_GROUP_CONCAT">
+    <title>Examples</title>
+    <example id="ex_GROUP_CONCAT"><title></title>
+<programlisting><![CDATA[
+SQL>SPARQL 
+SELECT ?name, (sql:GROUP_CONCAT(?near, ' , '))
+WHERE 
+  { 
+    GRAPH ?g 
+      { 
+        [] a foaf:Person ; 
+        foaf:name ?name ; 
+        foaf:based_near ?near 
+      } 
+  }
+LIMIT 10 
+
+name callret-1
+ANY  ANY
+________________________________________________
+Jonas Smedegaard	 nodeID://b6190457 , nodeID://b6190507
+Dimitar Dimitrov	 http://mitko.dnsalias.net:8005/dataspace/person/dav#based_near , http://ods-qa.openlinksw.com/dataspace/person/dav1#based_near , http://ods-qa.openlinksw.com/dataspace/person/dav2#based_near
+Adam Harvey	       nodeID://b780751
+John Breslin	     nodeID://b56694
+John Breslin	     nodeID://b56694
+Chris Bizer	       http://sws.geonames.org/2950159/ , http://dbpedia.org/resource/Berlin
+Leo Sauermann	     nodeID://b53598
+Andreas Harth	     http://dbpedia.org/resource/Karlsruhe , nodeID://b53559 , nodeID://b53569
+Alexandre Passant	 http://dbpedia.org/resource/Galway
+Leon Lord	         http://ods-qa.openlinksw.com/dataspace/person/t1#based_near
+No. of rows in result: 10 
+
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_GROUP_CONCAT">
+    <title>See Also</title>
+    <para><link linkend="fn_SAMPLE"><function>SAMPLE</function></link></para>
+    <para><link linkend="fn_GROUP_DIGEST"><function>GROUP_DIGEST</function></link></para>
+    <para><link linkend="samplegroupconcatdigest">Differences between SAMPLE, GROUP_CONCAT and GROUP_DIGEST functions usage.</link></para>        
+  </refsect1>
+</refentry>
+
diff --git a/docsrc/xmlsource/funcref/GROUP_DIGEST.xml b/docsrc/xmlsource/funcref/GROUP_DIGEST.xml
new file mode 100644
index 0000000..adb8208
--- /dev/null
+++ b/docsrc/xmlsource/funcref/GROUP_DIGEST.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_GROUP_DIGEST">
+  <refmeta>
+    <refentrytitle>GROUP_DIGEST</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>GROUP_DIGEST</refname>
+    <refpurpose>returns an arbitrary value from the multiset passed to it.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_GROUP_DIGEST">
+      <funcprototype id="fproto_GROUP_DIGEST">
+        <funcdef><function>GROUP_DIGEST</function></funcdef>
+	        <paramdef>in <parameter>token</parameter> varchar</paramdef>
+	        <paramdef>in <parameter>delim</parameter> varchar</paramdef>
+	        <paramdef>in <parameter>maxlen</parameter> integer</paramdef>
+	        <paramdef>in <parameter>mode</parameter> integer</paramdef>	        	        
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_GROUP_DIGEST">
+    <title>Description</title>
+    <para>GROUP_DIGEST is aggregate function that performs a string concatenation across 
+    	the values of an expression with a group. The order of the strings is not specified. 
+    	The separator character used in the concatenation may be given with the scalar 
+    	argument delimiter. The function is an extended version of sql:GROUP_CONCAT(), with 
+    	two more arguments: maxlen and mode.</para>
+    <para>Note: the "sql:" prefix is mandatory when this aggregate is used in SPARQL queries. 
+    	In SQL queries the prefix is "DB.DBA".
+    </para>
+  </refsect1>
+  <refsect1 id="params_GROUP_DIGEST">
+    <title>Parameters</title>
+    <refsect2><title>token</title>
+      <para>An item that should be added to a delimited list.</para>
+    </refsect2>
+    <refsect2><title>delim</title>
+      <para>The delimeter character to be used in the concatenation.</para>
+    </refsect2>
+    <refsect2><title>maxlen</title>
+      <para>The maximal allowed length of the result, in characters. Redundant values will be ignored. 
+      If the last value does not fit in the "maxlen" entirely, then it can be truncated and "..." is 
+      placed at the end of the resulting string.</para>
+    </refsect2>
+    <refsect2><title>mode</title>
+      <para>Bitmask of properties. Right now only bit 1 is used and others are reserved. If the value 
+      of the argument is 1 then duplicate values are ignored; value 0 will put duplicate values like 
+      in case of sql:GROUP_CONCAT ().</para>
+    </refsect2>        
+  </refsect1>
+  <refsect1 id="ret_GROUP_DIGEST"><title>Return Types</title>
+    <para>any</para>
+  </refsect1>
+  <refsect1 id="examples_GROUP_DIGEST">
+    <title>Examples</title>
+    <example id="ex_GROUP_DIGEST"><title>Get all ?assets as a list with delimiters.</title>
+<programlisting><![CDATA[
+SQL>SPARQL 
+SELECT ?view (sql:GROUP_DIGEST (?path, ' ', 1000, 1)) as ?path_list 
+    (sql:GROUP_DIGEST (?asset, ' ', 1000, 1)) as ?asset_list
+FROM <http://mygraph.com> 
+WHERE
+  { 
+    ?view <viewPath> ?path ; 
+      <viewContent> ?asset ; 
+      <viewType>  'phyview'. 
+  };
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_GROUP_DIGEST">
+    <title>See Also</title>
+    <para><link linkend="fn_SAMPLE"><function>SAMPLE</function></link></para>
+    <para><link linkend="fn_GROUP_CONCAT"><function>GROUP_CONCAT</function></link></para>
+    <para><link linkend="samplegroupconcatdigest">Differences between SAMPLE, GROUP_CONCAT and GROUP_DIGEST functions usage.</link></para>        
+  </refsect1>
+</refentry>
+
diff --git a/docsrc/xmlsource/funcref/REPL_ADD_CR.xml b/docsrc/xmlsource/funcref/REPL_ADD_CR.xml
index 30811cf..59d3e0f 100644
--- a/docsrc/xmlsource/funcref/REPL_ADD_CR.xml
+++ b/docsrc/xmlsource/funcref/REPL_ADD_CR.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_ADD_DAV_CR.xml b/docsrc/xmlsource/funcref/REPL_ADD_DAV_CR.xml
index b9b8fb1..9ad5031 100644
--- a/docsrc/xmlsource/funcref/REPL_ADD_DAV_CR.xml
+++ b/docsrc/xmlsource/funcref/REPL_ADD_DAV_CR.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_ADD_SNAPSHOT_CR.xml b/docsrc/xmlsource/funcref/REPL_ADD_SNAPSHOT_CR.xml
index a10a5e8..47d3c3b 100644
--- a/docsrc/xmlsource/funcref/REPL_ADD_SNAPSHOT_CR.xml
+++ b/docsrc/xmlsource/funcref/REPL_ADD_SNAPSHOT_CR.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_PUB.xml b/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_PUB.xml
index 45e12f0..a45bc21 100644
--- a/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_PUB.xml
+++ b/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_PUB.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_SUB.xml b/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_SUB.xml
index 48d14cb..65e65d0 100644
--- a/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_SUB.xml
+++ b/docsrc/xmlsource/funcref/REPL_CREATE_SNAPSHOT_SUB.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_PUB.xml b/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_PUB.xml
index ca28683..f137fd5 100644
--- a/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_PUB.xml
+++ b/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_PUB.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_SUB.xml b/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_SUB.xml
index dd42279..0a100a0 100644
--- a/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_SUB.xml
+++ b/docsrc/xmlsource/funcref/REPL_DROP_SNAPSHOT_SUB.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_INIT_SNAPSHOT.xml b/docsrc/xmlsource/funcref/REPL_INIT_SNAPSHOT.xml
index 389887b..ff3bf21 100644
--- a/docsrc/xmlsource/funcref/REPL_INIT_SNAPSHOT.xml
+++ b/docsrc/xmlsource/funcref/REPL_INIT_SNAPSHOT.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_SERVER_NAME.xml b/docsrc/xmlsource/funcref/REPL_SERVER_NAME.xml
index 200635c..99d47f9 100644
--- a/docsrc/xmlsource/funcref/REPL_SERVER_NAME.xml
+++ b/docsrc/xmlsource/funcref/REPL_SERVER_NAME.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_SNP_SERVER.xml b/docsrc/xmlsource/funcref/REPL_SNP_SERVER.xml
index 918d74c..de71b6a 100644
--- a/docsrc/xmlsource/funcref/REPL_SNP_SERVER.xml
+++ b/docsrc/xmlsource/funcref/REPL_SNP_SERVER.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/REPL_UPDATE_SNAPSHOT.xml b/docsrc/xmlsource/funcref/REPL_UPDATE_SNAPSHOT.xml
index 0072913..d0b7334 100644
--- a/docsrc/xmlsource/funcref/REPL_UPDATE_SNAPSHOT.xml
+++ b/docsrc/xmlsource/funcref/REPL_UPDATE_SNAPSHOT.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/SAMPLE.xml b/docsrc/xmlsource/funcref/SAMPLE.xml
new file mode 100644
index 0000000..7982bab
--- /dev/null
+++ b/docsrc/xmlsource/funcref/SAMPLE.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_SAMPLE">
+  <refmeta>
+    <refentrytitle>SAMPLE</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>SAMPLE</refname>
+    <refpurpose>returns an arbitrary value from the multiset passed to it.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_sample">
+      <funcprototype id="fproto_sample">
+        <funcdef><function>SAMPLE</function></funcdef>
+	        <paramdef>in <parameter>token</parameter> varchar</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_sample">
+    <title>Description</title>
+    <para>SAMPLE is aggregate function that returns an arbitrary value from the multiset passed to it.</para>
+    <para>Note: Using the "sql:" prefix is mandatory for this aggregate.</para>
+  </refsect1>
+  <refsect1 id="params_sample">
+    <title>Parameters</title>
+    <refsect2><title>strg</title>
+      <para>An item from multiset.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_sample"><title>Return Types</title>
+    <para>any</para>
+  </refsect1>
+  <refsect1 id="examples_sample">
+    <title>Examples</title>
+    <example id="ex_sample"><title></title>
+<programlisting><![CDATA[
+SQL>SPARQL 
+SELECT  (sql:SAMPLE(?nick)), (sql:SAMPLE(?interest))
+WHERE 
+  { 
+    ?p a foaf:Person .
+    ?p foaf:nick ?nick.
+    ?p foaf:interest ?interest.
+  }
+  
+callret-0   callret-1
+VARCHAR 	  VARCHAR
+________________________________________________
+dr. Jones	  http://purl.org/rss/1.0/
+
+No. of rows in result: 1   
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_sample">
+    <title>See Also</title>
+    <para><link linkend="fn_GROUP_CONCAT"><function>GROUP_CONCAT</function></link></para>
+    <para><link linkend="fn_GROUP_DIGEST"><function>GROUP_DIGEST</function></link></para>    
+    <para><link linkend="samplegroupconcatdigest">Differences between SAMPLE, GROUP_CONCAT and GROUP_DIGEST functions usage.</link></para>        
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/XMLAGG.xml b/docsrc/xmlsource/funcref/XMLAGG.xml
index d8b2c9f..3546ea6 100644
--- a/docsrc/xmlsource/funcref/XMLAGG.xml
+++ b/docsrc/xmlsource/funcref/XMLAGG.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLATTRIBUTES.xml b/docsrc/xmlsource/funcref/XMLATTRIBUTES.xml
index b8b94a1..3fdc11d 100644
--- a/docsrc/xmlsource/funcref/XMLATTRIBUTES.xml
+++ b/docsrc/xmlsource/funcref/XMLATTRIBUTES.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLAddAttribute.xml b/docsrc/xmlsource/funcref/XMLAddAttribute.xml
index 68847b3..161ad47 100644
--- a/docsrc/xmlsource/funcref/XMLAddAttribute.xml
+++ b/docsrc/xmlsource/funcref/XMLAddAttribute.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLAppendChildren.xml b/docsrc/xmlsource/funcref/XMLAppendChildren.xml
index 11ea70c..be9ba91 100644
--- a/docsrc/xmlsource/funcref/XMLAppendChildren.xml
+++ b/docsrc/xmlsource/funcref/XMLAppendChildren.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLCONCAT.xml b/docsrc/xmlsource/funcref/XMLCONCAT.xml
index 28825de..8aee191 100644
--- a/docsrc/xmlsource/funcref/XMLCONCAT.xml
+++ b/docsrc/xmlsource/funcref/XMLCONCAT.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLELEMENT.xml b/docsrc/xmlsource/funcref/XMLELEMENT.xml
index 9faa30a..e67a597 100644
--- a/docsrc/xmlsource/funcref/XMLELEMENT.xml
+++ b/docsrc/xmlsource/funcref/XMLELEMENT.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLFOREST.xml b/docsrc/xmlsource/funcref/XMLFOREST.xml
index 98cbc6d..ba6ea93 100644
--- a/docsrc/xmlsource/funcref/XMLFOREST.xml
+++ b/docsrc/xmlsource/funcref/XMLFOREST.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLInsertAfter.xml b/docsrc/xmlsource/funcref/XMLInsertAfter.xml
index 1ac58e8..cb2db43 100644
--- a/docsrc/xmlsource/funcref/XMLInsertAfter.xml
+++ b/docsrc/xmlsource/funcref/XMLInsertAfter.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLInsertBefore.xml b/docsrc/xmlsource/funcref/XMLInsertBefore.xml
index a95ae2a..0c0225e 100644
--- a/docsrc/xmlsource/funcref/XMLInsertBefore.xml
+++ b/docsrc/xmlsource/funcref/XMLInsertBefore.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLReplace.xml b/docsrc/xmlsource/funcref/XMLReplace.xml
index 483cdff..662a8ad 100644
--- a/docsrc/xmlsource/funcref/XMLReplace.xml
+++ b/docsrc/xmlsource/funcref/XMLReplace.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.XMLType.xml b/docsrc/xmlsource/funcref/XMLType.XMLType.xml
index 31d60d8..8e20618 100644
--- a/docsrc/xmlsource/funcref/XMLType.XMLType.xml
+++ b/docsrc/xmlsource/funcref/XMLType.XMLType.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.createNonSchemaBasedXML.xml b/docsrc/xmlsource/funcref/XMLType.createNonSchemaBasedXML.xml
index 2540fae..3620b48 100644
--- a/docsrc/xmlsource/funcref/XMLType.createNonSchemaBasedXML.xml
+++ b/docsrc/xmlsource/funcref/XMLType.createNonSchemaBasedXML.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.createSchemaBasedXML.xml b/docsrc/xmlsource/funcref/XMLType.createSchemaBasedXML.xml
index 913ee82..be9f9a9 100644
--- a/docsrc/xmlsource/funcref/XMLType.createSchemaBasedXML.xml
+++ b/docsrc/xmlsource/funcref/XMLType.createSchemaBasedXML.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.createXML.xml b/docsrc/xmlsource/funcref/XMLType.createXML.xml
index 64369c4..3234190 100644
--- a/docsrc/xmlsource/funcref/XMLType.createXML.xml
+++ b/docsrc/xmlsource/funcref/XMLType.createXML.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.existsNode.xml b/docsrc/xmlsource/funcref/XMLType.existsNode.xml
index faa8606..23208b4 100644
--- a/docsrc/xmlsource/funcref/XMLType.existsNode.xml
+++ b/docsrc/xmlsource/funcref/XMLType.existsNode.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.extract.xml b/docsrc/xmlsource/funcref/XMLType.extract.xml
index 3a1c391..477878b 100644
--- a/docsrc/xmlsource/funcref/XMLType.extract.xml
+++ b/docsrc/xmlsource/funcref/XMLType.extract.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.getClobVal.xml b/docsrc/xmlsource/funcref/XMLType.getClobVal.xml
index da7f30e..ded53ed 100644
--- a/docsrc/xmlsource/funcref/XMLType.getClobVal.xml
+++ b/docsrc/xmlsource/funcref/XMLType.getClobVal.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.getNamespace.xml b/docsrc/xmlsource/funcref/XMLType.getNamespace.xml
index 7795c8e..66a43ce 100644
--- a/docsrc/xmlsource/funcref/XMLType.getNamespace.xml
+++ b/docsrc/xmlsource/funcref/XMLType.getNamespace.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.getNumVal.xml b/docsrc/xmlsource/funcref/XMLType.getNumVal.xml
index ee0da4f..299bce8 100644
--- a/docsrc/xmlsource/funcref/XMLType.getNumVal.xml
+++ b/docsrc/xmlsource/funcref/XMLType.getNumVal.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.getRootElement.xml b/docsrc/xmlsource/funcref/XMLType.getRootElement.xml
index a773ce7..e4a8a9d 100644
--- a/docsrc/xmlsource/funcref/XMLType.getRootElement.xml
+++ b/docsrc/xmlsource/funcref/XMLType.getRootElement.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.getSchemaURL.xml b/docsrc/xmlsource/funcref/XMLType.getSchemaURL.xml
index d7bad34..2cb5cd8 100644
--- a/docsrc/xmlsource/funcref/XMLType.getSchemaURL.xml
+++ b/docsrc/xmlsource/funcref/XMLType.getSchemaURL.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.getStringVal.xml b/docsrc/xmlsource/funcref/XMLType.getStringVal.xml
index 316c69f..6a54b5d 100644
--- a/docsrc/xmlsource/funcref/XMLType.getStringVal.xml
+++ b/docsrc/xmlsource/funcref/XMLType.getStringVal.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.isFragment.xml b/docsrc/xmlsource/funcref/XMLType.isFragment.xml
index 64ec299..64f3edc 100644
--- a/docsrc/xmlsource/funcref/XMLType.isFragment.xml
+++ b/docsrc/xmlsource/funcref/XMLType.isFragment.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.isSchemaBased.xml b/docsrc/xmlsource/funcref/XMLType.isSchemaBased.xml
index eb8be12..c8ff437 100644
--- a/docsrc/xmlsource/funcref/XMLType.isSchemaBased.xml
+++ b/docsrc/xmlsource/funcref/XMLType.isSchemaBased.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.isSchemaValid.xml b/docsrc/xmlsource/funcref/XMLType.isSchemaValid.xml
index 49a6dc9..8079d2e 100644
--- a/docsrc/xmlsource/funcref/XMLType.isSchemaValid.xml
+++ b/docsrc/xmlsource/funcref/XMLType.isSchemaValid.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.isSchemaValidated.xml b/docsrc/xmlsource/funcref/XMLType.isSchemaValidated.xml
index 21546d5..5704d32 100644
--- a/docsrc/xmlsource/funcref/XMLType.isSchemaValidated.xml
+++ b/docsrc/xmlsource/funcref/XMLType.isSchemaValidated.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.schemaValidate.xml b/docsrc/xmlsource/funcref/XMLType.schemaValidate.xml
index f840995..8522b39 100644
--- a/docsrc/xmlsource/funcref/XMLType.schemaValidate.xml
+++ b/docsrc/xmlsource/funcref/XMLType.schemaValidate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.setSchemaValidated.xml b/docsrc/xmlsource/funcref/XMLType.setSchemaValidated.xml
index f5295e2..597a32e 100644
--- a/docsrc/xmlsource/funcref/XMLType.setSchemaValidated.xml
+++ b/docsrc/xmlsource/funcref/XMLType.setSchemaValidated.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.toObject.xml b/docsrc/xmlsource/funcref/XMLType.toObject.xml
index 0bdc03e..a65967b 100644
--- a/docsrc/xmlsource/funcref/XMLType.toObject.xml
+++ b/docsrc/xmlsource/funcref/XMLType.toObject.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/XMLType.transform.xml b/docsrc/xmlsource/funcref/XMLType.transform.xml
index c1a7c27..8b4cb3e 100644
--- a/docsrc/xmlsource/funcref/XMLType.transform.xml
+++ b/docsrc/xmlsource/funcref/XMLType.transform.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/abs.xml b/docsrc/xmlsource/funcref/abs.xml
index 52d0551..9f329e4 100644
--- a/docsrc/xmlsource/funcref/abs.xml
+++ b/docsrc/xmlsource/funcref/abs.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/any_grants.xml b/docsrc/xmlsource/funcref/any_grants.xml
index c636a8a..7a17fb1 100644
--- a/docsrc/xmlsource/funcref/any_grants.xml
+++ b/docsrc/xmlsource/funcref/any_grants.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/aref.xml b/docsrc/xmlsource/funcref/aref.xml
index bab57fd..8ddf72c 100644
--- a/docsrc/xmlsource/funcref/aref.xml
+++ b/docsrc/xmlsource/funcref/aref.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ascii.xml b/docsrc/xmlsource/funcref/ascii.xml
index b7d1db8..ad8c2b8 100644
--- a/docsrc/xmlsource/funcref/ascii.xml
+++ b/docsrc/xmlsource/funcref/ascii.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/aset.xml b/docsrc/xmlsource/funcref/aset.xml
index ca468e3..d0dcf27 100644
--- a/docsrc/xmlsource/funcref/aset.xml
+++ b/docsrc/xmlsource/funcref/aset.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/atof.xml b/docsrc/xmlsource/funcref/atof.xml
index b4c4c59..820d96d 100644
--- a/docsrc/xmlsource/funcref/atof.xml
+++ b/docsrc/xmlsource/funcref/atof.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/atoi.xml b/docsrc/xmlsource/funcref/atoi.xml
index dec52d2..b321c0e 100644
--- a/docsrc/xmlsource/funcref/atoi.xml
+++ b/docsrc/xmlsource/funcref/atoi.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/att_local_name.xml b/docsrc/xmlsource/funcref/att_local_name.xml
index 5a8616c..ee26cc3 100644
--- a/docsrc/xmlsource/funcref/att_local_name.xml
+++ b/docsrc/xmlsource/funcref/att_local_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/backup.xml b/docsrc/xmlsource/funcref/backup.xml
index 5611c0e..02b6112 100644
--- a/docsrc/xmlsource/funcref/backup.xml
+++ b/docsrc/xmlsource/funcref/backup.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/backup_context_clear.xml b/docsrc/xmlsource/funcref/backup_context_clear.xml
index f0252fd..ed75093 100644
--- a/docsrc/xmlsource/funcref/backup_context_clear.xml
+++ b/docsrc/xmlsource/funcref/backup_context_clear.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/backup_online.xml b/docsrc/xmlsource/funcref/backup_online.xml
index 75634bb..fe721bf 100644
--- a/docsrc/xmlsource/funcref/backup_online.xml
+++ b/docsrc/xmlsource/funcref/backup_online.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_arg.xml b/docsrc/xmlsource/funcref/bif_arg.xml
index daa25f8..9e48da3 100644
--- a/docsrc/xmlsource/funcref/bif_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_array_arg.xml b/docsrc/xmlsource/funcref/bif_array_arg.xml
index d9cfa1b..c8b04fb 100644
--- a/docsrc/xmlsource/funcref/bif_array_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_array_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_array_or_null_arg.xml b/docsrc/xmlsource/funcref/bif_array_or_null_arg.xml
index 8c0bea3..cd81488 100644
--- a/docsrc/xmlsource/funcref/bif_array_or_null_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_array_or_null_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_bin_arg.xml b/docsrc/xmlsource/funcref/bif_bin_arg.xml
index 89b0335..84b614d 100644
--- a/docsrc/xmlsource/funcref/bif_bin_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_bin_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_double_arg.xml b/docsrc/xmlsource/funcref/bif_double_arg.xml
index f8b7ee1..2c9a596 100644
--- a/docsrc/xmlsource/funcref/bif_double_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_double_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_entity_arg.xml b/docsrc/xmlsource/funcref/bif_entity_arg.xml
index 6003d30..15a9745 100644
--- a/docsrc/xmlsource/funcref/bif_entity_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_entity_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_float_arg.xml b/docsrc/xmlsource/funcref/bif_float_arg.xml
index 06fa964..ccafedc 100644
--- a/docsrc/xmlsource/funcref/bif_float_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_float_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_funcs.xml b/docsrc/xmlsource/funcref/bif_funcs.xml
index ebb5c2a..140259b 100644
--- a/docsrc/xmlsource/funcref/bif_funcs.xml
+++ b/docsrc/xmlsource/funcref/bif_funcs.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_long_arg.xml b/docsrc/xmlsource/funcref/bif_long_arg.xml
index 8d3d5cd..f98ba98 100644
--- a/docsrc/xmlsource/funcref/bif_long_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_long_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_long_or_char_arg.xml b/docsrc/xmlsource/funcref/bif_long_or_char_arg.xml
index 41fd40d..22d36d3 100644
--- a/docsrc/xmlsource/funcref/bif_long_or_char_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_long_or_char_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_string_arg.xml b/docsrc/xmlsource/funcref/bif_string_arg.xml
index b1158ab..c2f4451 100644
--- a/docsrc/xmlsource/funcref/bif_string_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_string_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_string_or_null_arg.xml b/docsrc/xmlsource/funcref/bif_string_or_null_arg.xml
index 616d560..29b8a6c 100644
--- a/docsrc/xmlsource/funcref/bif_string_or_null_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_string_or_null_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_string_or_wide_or_null_arg.xml b/docsrc/xmlsource/funcref/bif_string_or_wide_or_null_arg.xml
index fef5905..95589a5 100644
--- a/docsrc/xmlsource/funcref/bif_string_or_wide_or_null_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_string_or_wide_or_null_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bif_strses_arg.xml b/docsrc/xmlsource/funcref/bif_strses_arg.xml
index 7d58569..0512895 100644
--- a/docsrc/xmlsource/funcref/bif_strses_arg.xml
+++ b/docsrc/xmlsource/funcref/bif_strses_arg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bit_and.xml b/docsrc/xmlsource/funcref/bit_and.xml
index 37b05b4..c96335c 100644
--- a/docsrc/xmlsource/funcref/bit_and.xml
+++ b/docsrc/xmlsource/funcref/bit_and.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bit_not.xml b/docsrc/xmlsource/funcref/bit_not.xml
index b122efb..0560e66 100644
--- a/docsrc/xmlsource/funcref/bit_not.xml
+++ b/docsrc/xmlsource/funcref/bit_not.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bit_or.xml b/docsrc/xmlsource/funcref/bit_or.xml
index ba88428..ef8755a 100644
--- a/docsrc/xmlsource/funcref/bit_or.xml
+++ b/docsrc/xmlsource/funcref/bit_or.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bit_shift.xml b/docsrc/xmlsource/funcref/bit_shift.xml
index 324341a..b16f206 100644
--- a/docsrc/xmlsource/funcref/bit_shift.xml
+++ b/docsrc/xmlsource/funcref/bit_shift.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bit_xor.xml b/docsrc/xmlsource/funcref/bit_xor.xml
index 59bbb12..04b3f56 100644
--- a/docsrc/xmlsource/funcref/bit_xor.xml
+++ b/docsrc/xmlsource/funcref/bit_xor.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blob_to_string.xml b/docsrc/xmlsource/funcref/blob_to_string.xml
index a834b72..7103723 100644
--- a/docsrc/xmlsource/funcref/blob_to_string.xml
+++ b/docsrc/xmlsource/funcref/blob_to_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blob_to_string_output.xml b/docsrc/xmlsource/funcref/blob_to_string_output.xml
index 79c422a..73bf036 100644
--- a/docsrc/xmlsource/funcref/blob_to_string_output.xml
+++ b/docsrc/xmlsource/funcref/blob_to_string_output.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.deletePost.xml b/docsrc/xmlsource/funcref/blogger.deletePost.xml
index 616054f..f5b3e3b 100644
--- a/docsrc/xmlsource/funcref/blogger.deletePost.xml
+++ b/docsrc/xmlsource/funcref/blogger.deletePost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.editPost.xml b/docsrc/xmlsource/funcref/blogger.editPost.xml
index b628b6c..d551519 100644
--- a/docsrc/xmlsource/funcref/blogger.editPost.xml
+++ b/docsrc/xmlsource/funcref/blogger.editPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.getPost.xml b/docsrc/xmlsource/funcref/blogger.getPost.xml
index 7bbfb87..cbbfae6 100644
--- a/docsrc/xmlsource/funcref/blogger.getPost.xml
+++ b/docsrc/xmlsource/funcref/blogger.getPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.getRecentPosts.xml b/docsrc/xmlsource/funcref/blogger.getRecentPosts.xml
index 5125a4a..32bd5bb 100644
--- a/docsrc/xmlsource/funcref/blogger.getRecentPosts.xml
+++ b/docsrc/xmlsource/funcref/blogger.getRecentPosts.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.getTemplate.xml b/docsrc/xmlsource/funcref/blogger.getTemplate.xml
index 4500c8c..7efaa45 100644
--- a/docsrc/xmlsource/funcref/blogger.getTemplate.xml
+++ b/docsrc/xmlsource/funcref/blogger.getTemplate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.getUserInfo.xml b/docsrc/xmlsource/funcref/blogger.getUserInfo.xml
index 1ae916c..09ab9ce 100644
--- a/docsrc/xmlsource/funcref/blogger.getUserInfo.xml
+++ b/docsrc/xmlsource/funcref/blogger.getUserInfo.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.getUsersBlogs.xml b/docsrc/xmlsource/funcref/blogger.getUsersBlogs.xml
index ebe24f8..c370dd4 100644
--- a/docsrc/xmlsource/funcref/blogger.getUsersBlogs.xml
+++ b/docsrc/xmlsource/funcref/blogger.getUsersBlogs.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.newPost.xml b/docsrc/xmlsource/funcref/blogger.newPost.xml
index 9d37af8..0dd705d 100644
--- a/docsrc/xmlsource/funcref/blogger.newPost.xml
+++ b/docsrc/xmlsource/funcref/blogger.newPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/blogger.setTemplate.xml b/docsrc/xmlsource/funcref/blogger.setTemplate.xml
index acf51c5..e7f1039 100644
--- a/docsrc/xmlsource/funcref/blogger.setTemplate.xml
+++ b/docsrc/xmlsource/funcref/blogger.setTemplate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/bookmark.xml b/docsrc/xmlsource/funcref/bookmark.xml
index 10a331e..5b97a3e 100644
--- a/docsrc/xmlsource/funcref/bookmark.xml
+++ b/docsrc/xmlsource/funcref/bookmark.xml
@@ -5,7 +5,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -23,8 +23,7 @@
  -  
 -->
 <!--
-  $Id: bookmark.xml,v 1.1.1.1.2.1 2010/01/06 21:33:50 source Exp $
-  (C)Copyright 2005 OpenLink Software
+  $Id: bookmark.xml,v 1.1.1.1.2.3 2012/03/08 13:13:48 source Exp $
 -->
 <refentry id="fn_bookmark">
   <refmeta>
diff --git a/docsrc/xmlsource/funcref/ceiling.xml b/docsrc/xmlsource/funcref/ceiling.xml
index 6e1ccd9..f2eeb23 100644
--- a/docsrc/xmlsource/funcref/ceiling.xml
+++ b/docsrc/xmlsource/funcref/ceiling.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cfg_item_count.xml b/docsrc/xmlsource/funcref/cfg_item_count.xml
index 6e442d5..9f23b3f 100644
--- a/docsrc/xmlsource/funcref/cfg_item_count.xml
+++ b/docsrc/xmlsource/funcref/cfg_item_count.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cfg_item_name.xml b/docsrc/xmlsource/funcref/cfg_item_name.xml
index fe4100b..8febf54 100644
--- a/docsrc/xmlsource/funcref/cfg_item_name.xml
+++ b/docsrc/xmlsource/funcref/cfg_item_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cfg_item_value.xml b/docsrc/xmlsource/funcref/cfg_item_value.xml
index bc90f51..e071f3e 100644
--- a/docsrc/xmlsource/funcref/cfg_item_value.xml
+++ b/docsrc/xmlsource/funcref/cfg_item_value.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cfg_section_count.xml b/docsrc/xmlsource/funcref/cfg_section_count.xml
index 69611a9..9c0e52b 100644
--- a/docsrc/xmlsource/funcref/cfg_section_count.xml
+++ b/docsrc/xmlsource/funcref/cfg_section_count.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cfg_section_name.xml b/docsrc/xmlsource/funcref/cfg_section_name.xml
index 87ffa54..c0c5fb2 100644
--- a/docsrc/xmlsource/funcref/cfg_section_name.xml
+++ b/docsrc/xmlsource/funcref/cfg_section_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cfg_write.xml b/docsrc/xmlsource/funcref/cfg_write.xml
index 6039dd1..00fc686 100644
--- a/docsrc/xmlsource/funcref/cfg_write.xml
+++ b/docsrc/xmlsource/funcref/cfg_write.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/charset_define.xml b/docsrc/xmlsource/funcref/charset_define.xml
index 134b901..063a337 100644
--- a/docsrc/xmlsource/funcref/charset_define.xml
+++ b/docsrc/xmlsource/funcref/charset_define.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/charset_recode.xml b/docsrc/xmlsource/funcref/charset_recode.xml
index e61bfa4..b0c9f55 100644
--- a/docsrc/xmlsource/funcref/charset_recode.xml
+++ b/docsrc/xmlsource/funcref/charset_recode.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/charsets_list.xml b/docsrc/xmlsource/funcref/charsets_list.xml
index 5da3fa5..0291062 100644
--- a/docsrc/xmlsource/funcref/charsets_list.xml
+++ b/docsrc/xmlsource/funcref/charsets_list.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/checkpoint_interval.xml b/docsrc/xmlsource/funcref/checkpoint_interval.xml
index b545bf6..318eab3 100644
--- a/docsrc/xmlsource/funcref/checkpoint_interval.xml
+++ b/docsrc/xmlsource/funcref/checkpoint_interval.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/chr.xml b/docsrc/xmlsource/funcref/chr.xml
index 3c99fc5..169f300 100644
--- a/docsrc/xmlsource/funcref/chr.xml
+++ b/docsrc/xmlsource/funcref/chr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/client_attr.xml b/docsrc/xmlsource/funcref/client_attr.xml
index 4adfc86..3cb14f8 100644
--- a/docsrc/xmlsource/funcref/client_attr.xml
+++ b/docsrc/xmlsource/funcref/client_attr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/collation_define.xml b/docsrc/xmlsource/funcref/collation_define.xml
index 037200e..554e027 100644
--- a/docsrc/xmlsource/funcref/collation_define.xml
+++ b/docsrc/xmlsource/funcref/collation_define.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/complete_table_name.xml b/docsrc/xmlsource/funcref/complete_table_name.xml
index d8b284f..1415798 100644
--- a/docsrc/xmlsource/funcref/complete_table_name.xml
+++ b/docsrc/xmlsource/funcref/complete_table_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/composite.xml b/docsrc/xmlsource/funcref/composite.xml
index f00255a..85af9df 100644
--- a/docsrc/xmlsource/funcref/composite.xml
+++ b/docsrc/xmlsource/funcref/composite.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/composite_ref.xml b/docsrc/xmlsource/funcref/composite_ref.xml
index 9d3a195..fc67d34 100644
--- a/docsrc/xmlsource/funcref/composite_ref.xml
+++ b/docsrc/xmlsource/funcref/composite_ref.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/concat.xml b/docsrc/xmlsource/funcref/concat.xml
index 4c97e62..27cf325 100644
--- a/docsrc/xmlsource/funcref/concat.xml
+++ b/docsrc/xmlsource/funcref/concat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/concatenate.xml b/docsrc/xmlsource/funcref/concatenate.xml
index 781df9e..ec051ce 100644
--- a/docsrc/xmlsource/funcref/concatenate.xml
+++ b/docsrc/xmlsource/funcref/concatenate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/connection_get.xml b/docsrc/xmlsource/funcref/connection_get.xml
index 342f3dd..884137a 100644
--- a/docsrc/xmlsource/funcref/connection_get.xml
+++ b/docsrc/xmlsource/funcref/connection_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/connection_id.xml b/docsrc/xmlsource/funcref/connection_id.xml
index e601827..b21519d 100644
--- a/docsrc/xmlsource/funcref/connection_id.xml
+++ b/docsrc/xmlsource/funcref/connection_id.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/connection_is_dirty.xml b/docsrc/xmlsource/funcref/connection_is_dirty.xml
index adb51e0..a90684f 100644
--- a/docsrc/xmlsource/funcref/connection_is_dirty.xml
+++ b/docsrc/xmlsource/funcref/connection_is_dirty.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/connection_set.xml b/docsrc/xmlsource/funcref/connection_set.xml
index fc1cabe..e6a3cac 100644
--- a/docsrc/xmlsource/funcref/connection_set.xml
+++ b/docsrc/xmlsource/funcref/connection_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/connection_vars.xml b/docsrc/xmlsource/funcref/connection_vars.xml
index 15eaaad..92b885e 100644
--- a/docsrc/xmlsource/funcref/connection_vars.xml
+++ b/docsrc/xmlsource/funcref/connection_vars.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/connection_vars_set.xml b/docsrc/xmlsource/funcref/connection_vars_set.xml
index 0c42bd3..9f71f7b 100644
--- a/docsrc/xmlsource/funcref/connection_vars_set.xml
+++ b/docsrc/xmlsource/funcref/connection_vars_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/contains.xml b/docsrc/xmlsource/funcref/contains.xml
index c3eaa20..8a58a10 100644
--- a/docsrc/xmlsource/funcref/contains.xml
+++ b/docsrc/xmlsource/funcref/contains.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/corr.xml b/docsrc/xmlsource/funcref/corr.xml
index ded8182..39f1ce7 100644
--- a/docsrc/xmlsource/funcref/corr.xml
+++ b/docsrc/xmlsource/funcref/corr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cov_load.xml b/docsrc/xmlsource/funcref/cov_load.xml
index 383caff..8766b77 100644
--- a/docsrc/xmlsource/funcref/cov_load.xml
+++ b/docsrc/xmlsource/funcref/cov_load.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cov_report.xml b/docsrc/xmlsource/funcref/cov_report.xml
index 5059d8b..ad65d36 100644
--- a/docsrc/xmlsource/funcref/cov_report.xml
+++ b/docsrc/xmlsource/funcref/cov_report.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/cov_store.xml b/docsrc/xmlsource/funcref/cov_store.xml
index 9b4e853..ea8fd0a 100644
--- a/docsrc/xmlsource/funcref/cov_store.xml
+++ b/docsrc/xmlsource/funcref/cov_store.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/covar_pop.xml b/docsrc/xmlsource/funcref/covar_pop.xml
index 835db1b..1be6bc0 100644
--- a/docsrc/xmlsource/funcref/covar_pop.xml
+++ b/docsrc/xmlsource/funcref/covar_pop.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/covar_samp.xml b/docsrc/xmlsource/funcref/covar_samp.xml
index e125e93..80f7f04 100644
--- a/docsrc/xmlsource/funcref/covar_samp.xml
+++ b/docsrc/xmlsource/funcref/covar_samp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/createXML.xml b/docsrc/xmlsource/funcref/createXML.xml
index d8646d2..90fbacc 100644
--- a/docsrc/xmlsource/funcref/createXML.xml
+++ b/docsrc/xmlsource/funcref/createXML.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/curdate.xml b/docsrc/xmlsource/funcref/curdate.xml
index 60ac91a..4715e32 100644
--- a/docsrc/xmlsource/funcref/curdate.xml
+++ b/docsrc/xmlsource/funcref/curdate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/current_charset.xml b/docsrc/xmlsource/funcref/current_charset.xml
index 12ecb57..99451d2 100644
--- a/docsrc/xmlsource/funcref/current_charset.xml
+++ b/docsrc/xmlsource/funcref/current_charset.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dateadd.xml b/docsrc/xmlsource/funcref/dateadd.xml
index fa6b58c..1302ca7 100644
--- a/docsrc/xmlsource/funcref/dateadd.xml
+++ b/docsrc/xmlsource/funcref/dateadd.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/datediff.xml b/docsrc/xmlsource/funcref/datediff.xml
index 6a6cf9c..92f7d15 100644
--- a/docsrc/xmlsource/funcref/datediff.xml
+++ b/docsrc/xmlsource/funcref/datediff.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/datestring.xml b/docsrc/xmlsource/funcref/datestring.xml
index 27b4e06..e08936a 100644
--- a/docsrc/xmlsource/funcref/datestring.xml
+++ b/docsrc/xmlsource/funcref/datestring.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/datestring_gmt.xml b/docsrc/xmlsource/funcref/datestring_gmt.xml
index 543fff1..77b05df 100644
--- a/docsrc/xmlsource/funcref/datestring_gmt.xml
+++ b/docsrc/xmlsource/funcref/datestring_gmt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dav_api_add.xml b/docsrc/xmlsource/funcref/dav_api_add.xml
index a2edbcd..eed009f 100644
--- a/docsrc/xmlsource/funcref/dav_api_add.xml
+++ b/docsrc/xmlsource/funcref/dav_api_add.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dav_api_change.xml b/docsrc/xmlsource/funcref/dav_api_change.xml
index 8424540..a21793a 100644
--- a/docsrc/xmlsource/funcref/dav_api_change.xml
+++ b/docsrc/xmlsource/funcref/dav_api_change.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dav_api_lock.xml b/docsrc/xmlsource/funcref/dav_api_lock.xml
index 127a151..47dbc9d 100644
--- a/docsrc/xmlsource/funcref/dav_api_lock.xml
+++ b/docsrc/xmlsource/funcref/dav_api_lock.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!-- 
-  $Id: dav_api_lock.xml,v 1.2 2008/02/06 23:09:34 source Exp $
-  (C)Copyright 2005 OpenLink Software
+  $Id: dav_api_lock.xml,v 1.2.2.1 2012/03/08 13:13:48 source Exp $
 -->
 <refentry id="fn_dav_api_lock">
   <refmeta>
diff --git a/docsrc/xmlsource/funcref/dav_api_search.xml b/docsrc/xmlsource/funcref/dav_api_search.xml
index 95533ea..002d5b6 100644
--- a/docsrc/xmlsource/funcref/dav_api_search.xml
+++ b/docsrc/xmlsource/funcref/dav_api_search.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dav_api_user.xml b/docsrc/xmlsource/funcref/dav_api_user.xml
index e86dc3f..9bd7ccb 100644
--- a/docsrc/xmlsource/funcref/dav_api_user.xml
+++ b/docsrc/xmlsource/funcref/dav_api_user.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dav_exp.xml b/docsrc/xmlsource/funcref/dav_exp.xml
index 123ca80..543e9df 100644
--- a/docsrc/xmlsource/funcref/dav_exp.xml
+++ b/docsrc/xmlsource/funcref/dav_exp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dayname.xml b/docsrc/xmlsource/funcref/dayname.xml
index 20ba3d7..e6cf1c8 100644
--- a/docsrc/xmlsource/funcref/dayname.xml
+++ b/docsrc/xmlsource/funcref/dayname.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dayofmonth.xml b/docsrc/xmlsource/funcref/dayofmonth.xml
index 194b541..0757aeb 100644
--- a/docsrc/xmlsource/funcref/dayofmonth.xml
+++ b/docsrc/xmlsource/funcref/dayofmonth.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dayofweek.xml b/docsrc/xmlsource/funcref/dayofweek.xml
index 4c80e1e..b515237 100644
--- a/docsrc/xmlsource/funcref/dayofweek.xml
+++ b/docsrc/xmlsource/funcref/dayofweek.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dayofyear.xml b/docsrc/xmlsource/funcref/dayofyear.xml
index a787ff1..7e20851 100644
--- a/docsrc/xmlsource/funcref/dayofyear.xml
+++ b/docsrc/xmlsource/funcref/dayofyear.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dbf_set.xml b/docsrc/xmlsource/funcref/dbf_set.xml
new file mode 100644
index 0000000..2176e81
--- /dev/null
+++ b/docsrc/xmlsource/funcref/dbf_set.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_dbf_set">
+  <refmeta>
+    <refentrytitle>__dbf_set</refentrytitle>
+    <refmiscinfo>admin</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>__dbf_set</refname>
+    <refpurpose>Sets vector execution parameters.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn___dbf_set">
+      <funcprototype id="fproto___dbf_set">
+        <funcdef><function>__dbf_set</function></funcdef>
+	<paramdef>in <parameter>flag_name</parameter> varchar</paramdef>
+	<paramdef>out<parameter>flag_value</parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc___dbf_set">
+    <title>Description</title>
+    <para>Sets at run time by a dba group user the vector execution parameters.</para>
+  </refsect1>
+  <refsect1 id="params___dbf_set">
+    <title>Parameters</title>
+    <refsect2><title>flag_name</title>
+      <para>Name of the flag.</para>
+      <para>For Configuring Vectored Execution, should be used the following values:</para>
+      <para>Note: Only effective with Virtuoso 7.0 and later.</para>
+      <itemizedlist mark="bullet">
+        <listitem><emphasis>dc_batch_sz</emphasis>: flag for ini parameter VectorSize;</listitem>
+        <listitem><emphasis>dc_max_batch_sz</emphasis>: flag for ini parameter MaxVectorSize;</listitem>
+        <listitem><emphasis>enable_dyn_batch_sz</emphasis>: flag for ini parameter AdjustVectorSize;</listitem>
+        <listitem><emphasis>enable_qp</emphasis>: flag for ini parameter ThreadsPerQuery;</listitem>
+        <listitem><emphasis>aq_max_threads</emphasis>: flag for ini parameter AsyncQueueMaxThreads;</listitem>
+      </itemizedlist>
+    </refsect2>
+    <refsect2><title>flag_value</title>
+      <para>Value of the flag.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="examples___dbf_set">
+    <title>Examples</title>
+    <example id="ex___dbf_set"><title></title>
+<para>Set the maximum number of outstanding parallel work units to 16:</para>
+<programlisting><![CDATA[
+SQL> __dbf_set ('enable_qp', 16);
+]]></programlisting>
+    </example>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/dbg_obj_print.xml b/docsrc/xmlsource/funcref/dbg_obj_print.xml
index b3b8cc2..fa5e71f 100644
--- a/docsrc/xmlsource/funcref/dbg_obj_print.xml
+++ b/docsrc/xmlsource/funcref/dbg_obj_print.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dbg_printf.xml b/docsrc/xmlsource/funcref/dbg_printf.xml
index 2ad2c1c..cffc51a 100644
--- a/docsrc/xmlsource/funcref/dbg_printf.xml
+++ b/docsrc/xmlsource/funcref/dbg_printf.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dbname.xml b/docsrc/xmlsource/funcref/dbname.xml
index 8714f2b..cdb79fa 100644
--- a/docsrc/xmlsource/funcref/dbname.xml
+++ b/docsrc/xmlsource/funcref/dbname.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/delay.xml b/docsrc/xmlsource/funcref/delay.xml
index 047c50b..8ddb1cb 100644
--- a/docsrc/xmlsource/funcref/delay.xml
+++ b/docsrc/xmlsource/funcref/delay.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_dec_or_remove.xml b/docsrc/xmlsource/funcref/dict_dec_or_remove.xml
index 38b433a..189664b 100644
--- a/docsrc/xmlsource/funcref/dict_dec_or_remove.xml
+++ b/docsrc/xmlsource/funcref/dict_dec_or_remove.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_destructive_list_rnd_keys.xml b/docsrc/xmlsource/funcref/dict_destructive_list_rnd_keys.xml
index 4ed7d60..0a2101c 100644
--- a/docsrc/xmlsource/funcref/dict_destructive_list_rnd_keys.xml
+++ b/docsrc/xmlsource/funcref/dict_destructive_list_rnd_keys.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_duplicate.xml b/docsrc/xmlsource/funcref/dict_duplicate.xml
index f0cff69..65029c9 100644
--- a/docsrc/xmlsource/funcref/dict_duplicate.xml
+++ b/docsrc/xmlsource/funcref/dict_duplicate.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_get.xml b/docsrc/xmlsource/funcref/dict_get.xml
index 006d908..c60fe5e 100644
--- a/docsrc/xmlsource/funcref/dict_get.xml
+++ b/docsrc/xmlsource/funcref/dict_get.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_inc_or_put.xml b/docsrc/xmlsource/funcref/dict_inc_or_put.xml
index 63e209d..b34ac0f 100644
--- a/docsrc/xmlsource/funcref/dict_inc_or_put.xml
+++ b/docsrc/xmlsource/funcref/dict_inc_or_put.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_iter_next.xml b/docsrc/xmlsource/funcref/dict_iter_next.xml
index 7de0727..70d15fb 100644
--- a/docsrc/xmlsource/funcref/dict_iter_next.xml
+++ b/docsrc/xmlsource/funcref/dict_iter_next.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_iter_rewind.xml b/docsrc/xmlsource/funcref/dict_iter_rewind.xml
index 99280b3..16ae4eb 100644
--- a/docsrc/xmlsource/funcref/dict_iter_rewind.xml
+++ b/docsrc/xmlsource/funcref/dict_iter_rewind.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_list_keys.xml b/docsrc/xmlsource/funcref/dict_list_keys.xml
index ccfd5fa..403be72 100644
--- a/docsrc/xmlsource/funcref/dict_list_keys.xml
+++ b/docsrc/xmlsource/funcref/dict_list_keys.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_new.xml b/docsrc/xmlsource/funcref/dict_new.xml
index 4c087ad..2d3354c 100644
--- a/docsrc/xmlsource/funcref/dict_new.xml
+++ b/docsrc/xmlsource/funcref/dict_new.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_put.xml b/docsrc/xmlsource/funcref/dict_put.xml
index e9e70eb..19ebe73 100644
--- a/docsrc/xmlsource/funcref/dict_put.xml
+++ b/docsrc/xmlsource/funcref/dict_put.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_remove.xml b/docsrc/xmlsource/funcref/dict_remove.xml
index e4d5eb8..1aec176 100644
--- a/docsrc/xmlsource/funcref/dict_remove.xml
+++ b/docsrc/xmlsource/funcref/dict_remove.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_size.xml b/docsrc/xmlsource/funcref/dict_size.xml
index 31b8468..1a59e6b 100644
--- a/docsrc/xmlsource/funcref/dict_size.xml
+++ b/docsrc/xmlsource/funcref/dict_size.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_to_vector.xml b/docsrc/xmlsource/funcref/dict_to_vector.xml
index cd27939..1dc4c60 100644
--- a/docsrc/xmlsource/funcref/dict_to_vector.xml
+++ b/docsrc/xmlsource/funcref/dict_to_vector.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dict_zap.xml b/docsrc/xmlsource/funcref/dict_zap.xml
index fb2e315..6f008a5 100644
--- a/docsrc/xmlsource/funcref/dict_zap.xml
+++ b/docsrc/xmlsource/funcref/dict_zap.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/disconnect_user.xml b/docsrc/xmlsource/funcref/disconnect_user.xml
index 93dffe1..34e301a 100644
--- a/docsrc/xmlsource/funcref/disconnect_user.xml
+++ b/docsrc/xmlsource/funcref/disconnect_user.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dsig_template_ext.xml b/docsrc/xmlsource/funcref/dsig_template_ext.xml
index 1a4b903..d59696d 100644
--- a/docsrc/xmlsource/funcref/dsig_template_ext.xml
+++ b/docsrc/xmlsource/funcref/dsig_template_ext.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dt_set_tz.xml b/docsrc/xmlsource/funcref/dt_set_tz.xml
index ba2e0a2..d4b6863 100644
--- a/docsrc/xmlsource/funcref/dt_set_tz.xml
+++ b/docsrc/xmlsource/funcref/dt_set_tz.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/dvector.xml b/docsrc/xmlsource/funcref/dvector.xml
index e9d28c1..46434f5 100644
--- a/docsrc/xmlsource/funcref/dvector.xml
+++ b/docsrc/xmlsource/funcref/dvector.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/either.xml b/docsrc/xmlsource/funcref/either.xml
index 8876873..28eea9b 100644
--- a/docsrc/xmlsource/funcref/either.xml
+++ b/docsrc/xmlsource/funcref/either.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/elh_get_handler.xml b/docsrc/xmlsource/funcref/elh_get_handler.xml
index 498093e..0bc7d31 100644
--- a/docsrc/xmlsource/funcref/elh_get_handler.xml
+++ b/docsrc/xmlsource/funcref/elh_get_handler.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/elh_load_handler.xml b/docsrc/xmlsource/funcref/elh_load_handler.xml
index 923e1a8..b18548e 100644
--- a/docsrc/xmlsource/funcref/elh_load_handler.xml
+++ b/docsrc/xmlsource/funcref/elh_load_handler.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/encode_b32_num.xml b/docsrc/xmlsource/funcref/encode_b32_num.xml
index 9dd00b9..f6ee0c5 100644
--- a/docsrc/xmlsource/funcref/encode_b32_num.xml
+++ b/docsrc/xmlsource/funcref/encode_b32_num.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/encode_base64.xml b/docsrc/xmlsource/funcref/encode_base64.xml
index a9c1c3a..dc0352d 100644
--- a/docsrc/xmlsource/funcref/encode_base64.xml
+++ b/docsrc/xmlsource/funcref/encode_base64.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/end_result.xml b/docsrc/xmlsource/funcref/end_result.xml
index a25b0d1..302107a 100644
--- a/docsrc/xmlsource/funcref/end_result.xml
+++ b/docsrc/xmlsource/funcref/end_result.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ends_with.xml b/docsrc/xmlsource/funcref/ends_with.xml
new file mode 100644
index 0000000..63997c9
--- /dev/null
+++ b/docsrc/xmlsource/funcref/ends_with.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_ends_with">
+  <refmeta>
+    <refentrytitle>ends_with</refentrytitle>
+    <refmiscinfo>string</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>ends_with</refname>
+    <refpurpose>Checks whether string X ends with Y</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_ends_with">
+      <funcprototype id="fproto_ends_with">
+        <funcdef><function>ends_with</function></funcdef>
+        <paramdef>in <parameter>str</parameter> string</paramdef>
+        <paramdef>in <parameter>sub</parameter> string</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_ends_with">
+    <title>Description</title>
+    <para><function>ends_with</function> checks whether string X ends with Y, ignoring occurencies of Y in other places. Returns 1 or 0.</para>
+  </refsect1>  
+  <refsect1 id="params_ends_with">
+    <title>Parameters</title>
+    <refsect2><title>str</title>
+      <para>String to search from.</para>
+    </refsect2>
+    <refsect2><title>sub</title>
+      <para>Substring to search for.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_ends_with">
+    <title>Return Types</title>
+    <para>1 if found, 0 if not found.</para>
+  </refsect1>
+  <refsect1 id="examples_ends_with">
+    <title>Examples</title>
+    <example id="ex_ends_with"><title>Simple example</title>
+<programlisting><![CDATA[
+SQL> select ends_with('AbracadabrA','rA');
+ends_with
+INTEGER
+_______________________________________________________________________________
+
+1
+
+1 Rows. -- 0 msec.
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_ends_with">
+    <title>See Also</title>
+    <para><link linkend="fn_strcasestr"><function>strcasestr</function></link>.</para>
+    <para><link linkend="fn_strcontains"><function>strcontains</function></link>.</para>
+    <para><link linkend="fn_starts_with"><function>starts_with</function></link>.</para>        
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/equ.xml b/docsrc/xmlsource/funcref/equ.xml
index 5e96122..199132e 100644
--- a/docsrc/xmlsource/funcref/equ.xml
+++ b/docsrc/xmlsource/funcref/equ.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec.xml b/docsrc/xmlsource/funcref/exec.xml
index 2a540b7..6ae1a39 100644
--- a/docsrc/xmlsource/funcref/exec.xml
+++ b/docsrc/xmlsource/funcref/exec.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec_close.xml b/docsrc/xmlsource/funcref/exec_close.xml
index f33488a..8f226b5 100644
--- a/docsrc/xmlsource/funcref/exec_close.xml
+++ b/docsrc/xmlsource/funcref/exec_close.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec_metadata.xml b/docsrc/xmlsource/funcref/exec_metadata.xml
index e87697f..4d1d321 100644
--- a/docsrc/xmlsource/funcref/exec_metadata.xml
+++ b/docsrc/xmlsource/funcref/exec_metadata.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec_next.xml b/docsrc/xmlsource/funcref/exec_next.xml
index 99aace7..5974859 100644
--- a/docsrc/xmlsource/funcref/exec_next.xml
+++ b/docsrc/xmlsource/funcref/exec_next.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec_result.xml b/docsrc/xmlsource/funcref/exec_result.xml
index 7493408..a154fcf 100644
--- a/docsrc/xmlsource/funcref/exec_result.xml
+++ b/docsrc/xmlsource/funcref/exec_result.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec_result_names.xml b/docsrc/xmlsource/funcref/exec_result_names.xml
index 8f24cb8..cf4e130 100644
--- a/docsrc/xmlsource/funcref/exec_result_names.xml
+++ b/docsrc/xmlsource/funcref/exec_result_names.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exec_score.xml b/docsrc/xmlsource/funcref/exec_score.xml
index 315c5e8..0821fcf 100644
--- a/docsrc/xmlsource/funcref/exec_score.xml
+++ b/docsrc/xmlsource/funcref/exec_score.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/exp.xml b/docsrc/xmlsource/funcref/exp.xml
index 18578a3..95050df 100644
--- a/docsrc/xmlsource/funcref/exp.xml
+++ b/docsrc/xmlsource/funcref/exp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/explain.xml b/docsrc/xmlsource/funcref/explain.xml
index 11f67f6..3b6d5bf 100644
--- a/docsrc/xmlsource/funcref/explain.xml
+++ b/docsrc/xmlsource/funcref/explain.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_delete.xml b/docsrc/xmlsource/funcref/file_delete.xml
index bed2603..4f4c0ca 100644
--- a/docsrc/xmlsource/funcref/file_delete.xml
+++ b/docsrc/xmlsource/funcref/file_delete.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_dirlist.xml b/docsrc/xmlsource/funcref/file_dirlist.xml
index 16ec428..028adf6 100644
--- a/docsrc/xmlsource/funcref/file_dirlist.xml
+++ b/docsrc/xmlsource/funcref/file_dirlist.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_mkdir.xml b/docsrc/xmlsource/funcref/file_mkdir.xml
index 1bab282..6d9cb2a 100644
--- a/docsrc/xmlsource/funcref/file_mkdir.xml
+++ b/docsrc/xmlsource/funcref/file_mkdir.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_mkpath.xml b/docsrc/xmlsource/funcref/file_mkpath.xml
index 6645d3f..fa9cc61 100644
--- a/docsrc/xmlsource/funcref/file_mkpath.xml
+++ b/docsrc/xmlsource/funcref/file_mkpath.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_open.xml b/docsrc/xmlsource/funcref/file_open.xml
index d421487..d7696a8 100644
--- a/docsrc/xmlsource/funcref/file_open.xml
+++ b/docsrc/xmlsource/funcref/file_open.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_stat.xml b/docsrc/xmlsource/funcref/file_stat.xml
index 520a341..2272256 100644
--- a/docsrc/xmlsource/funcref/file_stat.xml
+++ b/docsrc/xmlsource/funcref/file_stat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_to_string.xml b/docsrc/xmlsource/funcref/file_to_string.xml
index 26e295d..195b435 100644
--- a/docsrc/xmlsource/funcref/file_to_string.xml
+++ b/docsrc/xmlsource/funcref/file_to_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_to_string_output.xml b/docsrc/xmlsource/funcref/file_to_string_output.xml
index 92c8170..28863e8 100644
--- a/docsrc/xmlsource/funcref/file_to_string_output.xml
+++ b/docsrc/xmlsource/funcref/file_to_string_output.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/file_unlink.xml b/docsrc/xmlsource/funcref/file_unlink.xml
index 92b8f3c..a398a1d 100644
--- a/docsrc/xmlsource/funcref/file_unlink.xml
+++ b/docsrc/xmlsource/funcref/file_unlink.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/fk_check_input_values.xml b/docsrc/xmlsource/funcref/fk_check_input_values.xml
index da8ab61..26d5ead 100644
--- a/docsrc/xmlsource/funcref/fk_check_input_values.xml
+++ b/docsrc/xmlsource/funcref/fk_check_input_values.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/floor.xml b/docsrc/xmlsource/funcref/floor.xml
index 38ac921..5ec3eef 100644
--- a/docsrc/xmlsource/funcref/floor.xml
+++ b/docsrc/xmlsource/funcref/floor.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ftp_get.xml b/docsrc/xmlsource/funcref/ftp_get.xml
index 42ecbbd..148fe8d 100644
--- a/docsrc/xmlsource/funcref/ftp_get.xml
+++ b/docsrc/xmlsource/funcref/ftp_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ftp_ls.xml b/docsrc/xmlsource/funcref/ftp_ls.xml
index cb22ce8..dd0e380 100644
--- a/docsrc/xmlsource/funcref/ftp_ls.xml
+++ b/docsrc/xmlsource/funcref/ftp_ls.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ftp_put.xml b/docsrc/xmlsource/funcref/ftp_put.xml
index d984178..bab5af4 100644
--- a/docsrc/xmlsource/funcref/ftp_put.xml
+++ b/docsrc/xmlsource/funcref/ftp_put.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/geo_delete.xml b/docsrc/xmlsource/funcref/geo_delete.xml
new file mode 100644
index 0000000..c2b7192
--- /dev/null
+++ b/docsrc/xmlsource/funcref/geo_delete.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_geo_delete">
+  <refmeta>
+    <refentrytitle>geo_delete</refentrytitle>
+    <refmiscinfo>geo</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>geo_delete</refname>
+    <refpurpose>Deletes a geometry from an R tree index.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_geo_delete">
+      <funcprototype id="fproto_geo_delete">
+        <funcdef><function>geo_delete</function></funcdef>
+	<paramdef>in <parameter>tb</parameter> any</paramdef>
+	<paramdef>in <parameter>geo</parameter> any</paramdef>
+	<paramdef>in <parameter>id</parameter> int</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_geo_delete">
+    <title>Description</title>
+    <para>Deletes a geometry from an R tree index. The tb must be a
+fully qualified name of an R tree table. This function is typically used from triggers
+on a geometry column. The function is transactional and makes a transaction log record of the action.
+</para>
+  </refsect1>
+  <refsect1 id="params_geo_delete">
+    <title>Parameters</title>
+    <refsect2><title>tb</title>
+      <para>A fully qualified name of an R tree table.</para>
+    </refsect2>
+    <refsect2><title>geo</title>
+      <para>A geometry.</para>
+    </refsect2>
+    <refsect2><title>id</title>
+      <para>Geometry id.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_geo_delete"><title>Return Types</title>
+    <para>Returns int.</para>
+  </refsect1>
+  <refsect1 id="examples_geo_delete">
+    <title>Examples</title>
+    <example id="ex_geo_delete"><title></title>
+      <para></para>
+<programlisting><![CDATA[
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_geo_delete">
+    <title>See Also</title>
+    <para><link linkend="fn_st_point"><function>st_point</function></link></para>
+    <para><link linkend="fn_st_x"><function>st_x</function></link></para>
+    <para><link linkend="fn_st_y"><function>st_y</function></link></para>
+    <para><link linkend="fn_st_distance"><function>st_distance</function></link></para>
+    <para><link linkend="fn_st_srid"><function>st_srid</function></link></para>
+    <para><link linkend="fn_st_setsrid"><function>st_setsrid</function></link></para>
+    <para><link linkend="fn_st_astext"><function>st_astext</function></link></para>
+    <para><link linkend="fn_st_geomfromtext"><function>st_geomfromtext</function></link></para>
+    <para><link linkend="fn_st_intersects"><function>st_intersects</function></link></para>
+    <para><link linkend="fn_st_contains"><function>st_contains</function></link></para>
+    <para><link linkend="fn_st_within"><function>st_within</function></link></para>
+    <para><link linkend="fn_isgeometry"><function>isgeometry</function></link></para>
+    <para><link linkend="fn_geo_insert"><function>geo_insert</function></link></para>
+    <para><link linkend="fn_rdf_geo_add"><function>DB.DBA.RDF_GEO_ADD</function></link></para>
+    <para><link linkend="fn_rdf_geo_fill"><function>DB.DBA.RDF_GEO_FILL</function></link></para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/geo_insert.xml b/docsrc/xmlsource/funcref/geo_insert.xml
new file mode 100644
index 0000000..c36da71
--- /dev/null
+++ b/docsrc/xmlsource/funcref/geo_insert.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_geo_insert">
+  <refmeta>
+    <refentrytitle>geo_insert</refentrytitle>
+    <refmiscinfo>geo</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>geo_insert</refname>
+    <refpurpose>Inserts a geometry from an R tree index.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_geo_insert">
+      <funcprototype id="fproto_geo_insert">
+        <funcdef><function>geo_insert</function></funcdef>
+	<paramdef>in <parameter>tb</parameter> any</paramdef>
+	<paramdef>in <parameter>geo</parameter> any</paramdef>
+	<paramdef>in <parameter>id</parameter> int</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_geo_insert">
+    <title>Description</title>
+    <para>Inserts a geometry from an R tree index. The tb must be a
+fully qualified name of an R tree table. This function is typically used from triggers
+on a geometry column. The function is transactional and makes a transaction log record of the action.
+</para>
+  </refsect1>
+  <refsect1 id="params_geo_insert">
+    <title>Parameters</title>
+    <refsect2><title>tb</title>
+      <para>A fully qualified name of an R tree table.</para>
+    </refsect2>
+    <refsect2><title>geo</title>
+      <para>A geometry.</para>
+    </refsect2>
+    <refsect2><title>id</title>
+      <para>Geometry id.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_geo_insert"><title>Return Types</title>
+    <para>Returns int.</para>
+  </refsect1>
+  <refsect1 id="examples_geo_insert">
+    <title>Examples</title>
+    <example id="ex_geo_insert"><title></title>
+      <para></para>
+<programlisting><![CDATA[
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_geo_insert">
+    <title>See Also</title>
+    <para><link linkend="fn_st_point"><function>st_point</function></link></para>
+    <para><link linkend="fn_st_x"><function>st_x</function></link></para>
+    <para><link linkend="fn_st_y"><function>st_y</function></link></para>
+    <para><link linkend="fn_st_distance"><function>st_distance</function></link></para>
+    <para><link linkend="fn_st_srid"><function>st_srid</function></link></para>
+    <para><link linkend="fn_st_setsrid"><function>st_setsrid</function></link></para>
+    <para><link linkend="fn_st_astext"><function>st_astext</function></link></para>
+    <para><link linkend="fn_st_geomfromtext"><function>st_geomfromtext</function></link></para>
+    <para><link linkend="fn_st_intersects"><function>st_intersects</function></link></para>
+    <para><link linkend="fn_st_contains"><function>st_contains</function></link></para>
+    <para><link linkend="fn_st_within"><function>st_within</function></link></para>
+    <para><link linkend="fn_isgeometry"><function>isgeometry</function></link></para>
+    <para><link linkend="fn_geo_delete"><function>geo_delete</function></link></para>
+    <para><link linkend="fn_rdf_geo_add"><function>DB.DBA.RDF_GEO_ADD</function></link></para>
+    <para><link linkend="fn_rdf_geo_fill"><function>DB.DBA.RDF_GEO_FILL</function></link></para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/get_certificate_info.xml b/docsrc/xmlsource/funcref/get_certificate_info.xml
index bd9e996..2d752d8 100644
--- a/docsrc/xmlsource/funcref/get_certificate_info.xml
+++ b/docsrc/xmlsource/funcref/get_certificate_info.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -71,7 +71,7 @@ that string.
         <member>6 - return the certificate fingerprint</member>
         <member>7 - return the certificate extension value by OID</member>
 	<member>8 - return the certificate name of the key from current user store</member>
-	<member>9 - return a vector of three elements: the certificate's public key type, modulus and exponent</member>
+	<member>9 - return a vector of three elements: the certificate's public key type, exponent and modulus</member>
       </simplelist>
   </refsect2>
   
diff --git a/docsrc/xmlsource/funcref/get_keyword.xml b/docsrc/xmlsource/funcref/get_keyword.xml
index 8c3847e..23c928f 100644
--- a/docsrc/xmlsource/funcref/get_keyword.xml
+++ b/docsrc/xmlsource/funcref/get_keyword.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/get_keyword_ucase.xml b/docsrc/xmlsource/funcref/get_keyword_ucase.xml
index c48a32d..f3b12f2 100644
--- a/docsrc/xmlsource/funcref/get_keyword_ucase.xml
+++ b/docsrc/xmlsource/funcref/get_keyword_ucase.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/get_timestamp.xml b/docsrc/xmlsource/funcref/get_timestamp.xml
index ef662d3..c960814 100644
--- a/docsrc/xmlsource/funcref/get_timestamp.xml
+++ b/docsrc/xmlsource/funcref/get_timestamp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/getdate.xml b/docsrc/xmlsource/funcref/getdate.xml
index b026711..a6eef50 100644
--- a/docsrc/xmlsource/funcref/getdate.xml
+++ b/docsrc/xmlsource/funcref/getdate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/gvector_digit_sort.xml b/docsrc/xmlsource/funcref/gvector_digit_sort.xml
index 8dc3a0a..ad21ed4 100644
--- a/docsrc/xmlsource/funcref/gvector_digit_sort.xml
+++ b/docsrc/xmlsource/funcref/gvector_digit_sort.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/gvector_sort.xml b/docsrc/xmlsource/funcref/gvector_sort.xml
index 6dd81b8..9bdc1b5 100644
--- a/docsrc/xmlsource/funcref/gvector_sort.xml
+++ b/docsrc/xmlsource/funcref/gvector_sort.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/gz_compress.xml b/docsrc/xmlsource/funcref/gz_compress.xml
index f3a3a9a..58d4453 100644
--- a/docsrc/xmlsource/funcref/gz_compress.xml
+++ b/docsrc/xmlsource/funcref/gz_compress.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/gz_file_open.xml b/docsrc/xmlsource/funcref/gz_file_open.xml
index b58d316..cb0aef8 100644
--- a/docsrc/xmlsource/funcref/gz_file_open.xml
+++ b/docsrc/xmlsource/funcref/gz_file_open.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/gz_uncompress.xml b/docsrc/xmlsource/funcref/gz_uncompress.xml
index d9cb81f..523ac8c 100644
--- a/docsrc/xmlsource/funcref/gz_uncompress.xml
+++ b/docsrc/xmlsource/funcref/gz_uncompress.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/hour.xml b/docsrc/xmlsource/funcref/hour.xml
index f753753..b6c7539 100644
--- a/docsrc/xmlsource/funcref/hour.xml
+++ b/docsrc/xmlsource/funcref/hour.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/hs_resolve.xml b/docsrc/xmlsource/funcref/hs_resolve.xml
index dcecfcb..8dc65f3 100644
--- a/docsrc/xmlsource/funcref/hs_resolve.xml
+++ b/docsrc/xmlsource/funcref/hs_resolve.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -
- -  $Id: hs_resolve.xml,v 1.1.2.2 2009/05/05 14:10:10 source Exp $
+ -  $Id: hs_resolve.xml,v 1.1.2.3 2012/03/07 15:29:01 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http.xml b/docsrc/xmlsource/funcref/http.xml
index 81c252a..0d41459 100644
--- a/docsrc/xmlsource/funcref/http.xml
+++ b/docsrc/xmlsource/funcref/http.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_acl_get.xml b/docsrc/xmlsource/funcref/http_acl_get.xml
index 93d84f3..9907c28 100644
--- a/docsrc/xmlsource/funcref/http_acl_get.xml
+++ b/docsrc/xmlsource/funcref/http_acl_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_acl_remove.xml b/docsrc/xmlsource/funcref/http_acl_remove.xml
index 67fb1c2..da09764 100644
--- a/docsrc/xmlsource/funcref/http_acl_remove.xml
+++ b/docsrc/xmlsource/funcref/http_acl_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_acl_set.xml b/docsrc/xmlsource/funcref/http_acl_set.xml
index 9f39f59..0ba29b2 100644
--- a/docsrc/xmlsource/funcref/http_acl_set.xml
+++ b/docsrc/xmlsource/funcref/http_acl_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_body_read.xml b/docsrc/xmlsource/funcref/http_body_read.xml
index fe1f31a..ad06a2f 100644
--- a/docsrc/xmlsource/funcref/http_body_read.xml
+++ b/docsrc/xmlsource/funcref/http_body_read.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_client.xml b/docsrc/xmlsource/funcref/http_client.xml
index b8c69ad..770752e 100644
--- a/docsrc/xmlsource/funcref/http_client.xml
+++ b/docsrc/xmlsource/funcref/http_client.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_client_ext.xml b/docsrc/xmlsource/funcref/http_client_ext.xml
index 94ad1e8..b2348a3 100644
--- a/docsrc/xmlsource/funcref/http_client_ext.xml
+++ b/docsrc/xmlsource/funcref/http_client_ext.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_client_ip.xml b/docsrc/xmlsource/funcref/http_client_ip.xml
index 5c0ac39..16964fd 100644
--- a/docsrc/xmlsource/funcref/http_client_ip.xml
+++ b/docsrc/xmlsource/funcref/http_client_ip.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_debug_log.xml b/docsrc/xmlsource/funcref/http_debug_log.xml
index 86f1f96..00c68d1 100644
--- a/docsrc/xmlsource/funcref/http_debug_log.xml
+++ b/docsrc/xmlsource/funcref/http_debug_log.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_enable_gz.xml b/docsrc/xmlsource/funcref/http_enable_gz.xml
index 92f65ce..f129e62 100644
--- a/docsrc/xmlsource/funcref/http_enable_gz.xml
+++ b/docsrc/xmlsource/funcref/http_enable_gz.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_file.xml b/docsrc/xmlsource/funcref/http_file.xml
index d1dd76d..f9fde60 100644
--- a/docsrc/xmlsource/funcref/http_file.xml
+++ b/docsrc/xmlsource/funcref/http_file.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_flush.xml b/docsrc/xmlsource/funcref/http_flush.xml
index 98d4689..865aae1 100644
--- a/docsrc/xmlsource/funcref/http_flush.xml
+++ b/docsrc/xmlsource/funcref/http_flush.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_get.xml b/docsrc/xmlsource/funcref/http_get.xml
index e143cee..0165b72 100644
--- a/docsrc/xmlsource/funcref/http_get.xml
+++ b/docsrc/xmlsource/funcref/http_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_header.xml b/docsrc/xmlsource/funcref/http_header.xml
index a8ae460..f38f131 100644
--- a/docsrc/xmlsource/funcref/http_header.xml
+++ b/docsrc/xmlsource/funcref/http_header.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_header_get.xml b/docsrc/xmlsource/funcref/http_header_get.xml
index ff26c93..363205b 100644
--- a/docsrc/xmlsource/funcref/http_header_get.xml
+++ b/docsrc/xmlsource/funcref/http_header_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_kill.xml b/docsrc/xmlsource/funcref/http_kill.xml
index d440dc9..0077750 100644
--- a/docsrc/xmlsource/funcref/http_kill.xml
+++ b/docsrc/xmlsource/funcref/http_kill.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_listen_host.xml b/docsrc/xmlsource/funcref/http_listen_host.xml
index d9ae1d5..2a7960e 100644
--- a/docsrc/xmlsource/funcref/http_listen_host.xml
+++ b/docsrc/xmlsource/funcref/http_listen_host.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_lock.xml b/docsrc/xmlsource/funcref/http_lock.xml
new file mode 100644
index 0000000..1f97ac1
--- /dev/null
+++ b/docsrc/xmlsource/funcref/http_lock.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_http_lock">
+  <refmeta>
+    <refentrytitle>http_lock</refentrytitle>
+    <refmiscinfo>ws</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>http_lock</refname>
+    <refpurpose>Locks the HTTP Web Server port</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_http_lock">
+      <funcprototype id="fproto_http_lock">
+        <funcdef>any <function>http_lock</function></funcdef>
+        <paramdef>in <parameter>pwd</parameter> varchar</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_http_lock"><title>Description</title>
+  <para>This function takes as parameter the password of the dba user, locks the HTTP Web Server port 
+  	and on any http access attempt shows the content of the html file given as value for the 
+  	<emphasis>MaintenancePage</emphasis> parameter in the Virtuoso ini [HTTPServer] section:</para>
+<programlisting><![CDATA[
+-- Virtuoso ini
+...
+[HTTPServer]
+...
+MaintenancePage = atomic.html
+..	
+]]></programlisting>  	
+     <para>Note: the html file should be placed in the HTTP root.</para>
+  </refsect1>	
+  <refsect1 id="params_http_lock"><title>Parameters</title>
+    <refsect2><title>pwd</title><para>The password of the dba user.</para></refsect2>
+  </refsect1>
+  <refsect1 id="examples_http_lock"><title>Examples</title>
+  <example id="ex_http_lock"><title></title>
+  <screen><![CDATA[
+SQL> http_lock('password');
+
+Done. -- 0 msec.
+SQL>
+]]></screen>
+  </example>
+  </refsect1>
+    <refsect1 id="seealso_http_lock">
+    <title>See Also</title>
+    <para><link linkend="fn_http_unlock"><function>http_unlock</function></link></para>
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/http_map_get.xml b/docsrc/xmlsource/funcref/http_map_get.xml
index ea034ca..1a04aa7 100644
--- a/docsrc/xmlsource/funcref/http_map_get.xml
+++ b/docsrc/xmlsource/funcref/http_map_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_map_table.xml b/docsrc/xmlsource/funcref/http_map_table.xml
index 5db171a..106a772 100644
--- a/docsrc/xmlsource/funcref/http_map_table.xml
+++ b/docsrc/xmlsource/funcref/http_map_table.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_nt_triple.xml b/docsrc/xmlsource/funcref/http_nt_triple.xml
new file mode 100644
index 0000000..4560bcb
--- /dev/null
+++ b/docsrc/xmlsource/funcref/http_nt_triple.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_http_nt_triple">
+  <refmeta>
+    <refentrytitle>http_nt_triple</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>http_nt_triple</refname>
+    <refpurpose>outputs next triple to ses in NT serialization.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_http_nt_triple">
+      <funcprototype id="fproto_http_nt_triple">
+        <funcdef><function>http_nt_triple</function></funcdef>
+	        <paramdef>in <parameter>env</parameter> any</paramdef>
+	        <paramdef>in <parameter>arg1</parameter> any</paramdef>
+	        <paramdef>in <parameter>arg2</parameter> any</paramdef>
+	        <paramdef>in <parameter>arg3</parameter> any</paramdef>
+          <paramdef>in <parameter>ses </parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_http_nt_triple">
+    <title>Description</title>
+    <para>Outputs next triple to ses in NT serialization.</para>
+  </refsect1>
+  <refsect1 id="params_http_nt_triple">
+    <title>Parameters</title>
+    <refsect2><title>env</title>
+      <para>An array of special format:</para>
+<programlisting><![CDATA[
+vector (0, 0, 0);	
+]]></programlisting>      
+      <para>It is used solely as storage for intermediate data that should be freed 
+      	by the interpreter in case of any error.
+      </para>
+    </refsect2>
+    <refsect2><title>arg1</title>
+      <para>Triple subject.</para>
+    </refsect2>
+    <refsect2><title>arg2</title>
+      <para>Triple predicate.</para>
+    </refsect2>
+    <refsect2><title>arg3</title>
+      <para>Triple object.</para>
+    </refsect2>
+    <refsect2><title>ses</title>
+      <para>Session output.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_http_nt_triple"><title>Return Types</title>
+    <para>Any</para>
+  </refsect1>
+  <refsect1 id="examples_http_nt_triple">
+    <title>Examples</title>
+    <example id="ex_http_nt_triple"><title></title>
+<programlisting><![CDATA[
+create procedure dump_rdftriples_to_nt(inout triples any, inout ses any)
+{
+  declare env any;
+  declare tcount, tctr integer;
+  tcount := length (triples);
+  if (0 = tcount)
+    {
+      http ('# Empty NT\n', ses);
+      return;
+    }
+  env := vector (0, 0, 0);
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      http_nt_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
+    }
+}
+;
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_http_nt_triple">
+    <title>See Also</title>
+    <para><link linkend="fn_http_ttl_triple"><function>http_ttl_triple</function></link></para>    
+    <para><link linkend="fn_rdf_audit_metadata"><function>DB.DBA.RDF_AUDIT_METADATA</function></link></para>
+    <para><link linkend="fn_rdf_backup_metadata"><function>DB.DBA.RDF_BACKUP_METADATA</function></link></para>
+    <para><link linkend="fn_rdf_load_rdfxml"><function>DB.DBA.RDF_LOAD_RDFXML</function></link></para>
+    <para><link linkend="fn_rdf_load_rdfxml_mt"><function>DB.DBA.RDF_LOAD_RDFXML_MT</function></link></para>
+    <para><link linkend="fn_ttlp_mt"><function>TTLP_MT</function></link></para>
+    <para><link linkend="fn_ttlp_mt_local_file"><function>TTLP_MT_LOCAL_FILE</function></link></para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/http_param.xml b/docsrc/xmlsource/funcref/http_param.xml
index 71cf57d..c216547 100644
--- a/docsrc/xmlsource/funcref/http_param.xml
+++ b/docsrc/xmlsource/funcref/http_param.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_path.xml b/docsrc/xmlsource/funcref/http_path.xml
index dcd82dc..18df564 100644
--- a/docsrc/xmlsource/funcref/http_path.xml
+++ b/docsrc/xmlsource/funcref/http_path.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_pending_req.xml b/docsrc/xmlsource/funcref/http_pending_req.xml
index 181f6bf..287d86c 100644
--- a/docsrc/xmlsource/funcref/http_pending_req.xml
+++ b/docsrc/xmlsource/funcref/http_pending_req.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_physical_path.xml b/docsrc/xmlsource/funcref/http_physical_path.xml
index 954024c..a29057a 100644
--- a/docsrc/xmlsource/funcref/http_physical_path.xml
+++ b/docsrc/xmlsource/funcref/http_physical_path.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_proxy.xml b/docsrc/xmlsource/funcref/http_proxy.xml
index 5e05afd..410e96c 100644
--- a/docsrc/xmlsource/funcref/http_proxy.xml
+++ b/docsrc/xmlsource/funcref/http_proxy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_request_get.xml b/docsrc/xmlsource/funcref/http_request_get.xml
index 6ed3108..ad27ce4 100644
--- a/docsrc/xmlsource/funcref/http_request_get.xml
+++ b/docsrc/xmlsource/funcref/http_request_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_request_header.xml b/docsrc/xmlsource/funcref/http_request_header.xml
index 1bb2edd..2dc403f 100644
--- a/docsrc/xmlsource/funcref/http_request_header.xml
+++ b/docsrc/xmlsource/funcref/http_request_header.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_request_header_full.xml b/docsrc/xmlsource/funcref/http_request_header_full.xml
index 0fb893d..c9fefd5 100644
--- a/docsrc/xmlsource/funcref/http_request_header_full.xml
+++ b/docsrc/xmlsource/funcref/http_request_header_full.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_request_status.xml b/docsrc/xmlsource/funcref/http_request_status.xml
index 409d1f1..c0f9a51 100644
--- a/docsrc/xmlsource/funcref/http_request_status.xml
+++ b/docsrc/xmlsource/funcref/http_request_status.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_rewrite.xml b/docsrc/xmlsource/funcref/http_rewrite.xml
index f9ff52a..4cfa7e3 100644
--- a/docsrc/xmlsource/funcref/http_rewrite.xml
+++ b/docsrc/xmlsource/funcref/http_rewrite.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_root.xml b/docsrc/xmlsource/funcref/http_root.xml
index 38d6e45..e6b3495 100644
--- a/docsrc/xmlsource/funcref/http_root.xml
+++ b/docsrc/xmlsource/funcref/http_root.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_ttl_triple.xml b/docsrc/xmlsource/funcref/http_ttl_triple.xml
new file mode 100644
index 0000000..0732046
--- /dev/null
+++ b/docsrc/xmlsource/funcref/http_ttl_triple.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_http_ttl_triple">
+  <refmeta>
+    <refentrytitle>http_ttl_triple</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>http_ttl_triple</refname>
+    <refpurpose>outputs next triple to ses in TTL serialization.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_http_ttl_triple">
+      <funcprototype id="fproto_http_ttl_triple">
+        <funcdef><function>http_ttl_triple</function></funcdef>
+	        <paramdef>in <parameter>env</parameter> any</paramdef>
+	        <paramdef>in <parameter>arg1</parameter> any</paramdef>
+	        <paramdef>in <parameter>arg2</parameter> any</paramdef>
+	        <paramdef>in <parameter>arg3</parameter> any</paramdef>
+          <paramdef>in <parameter>ses </parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_http_ttl_triple">
+    <title>Description</title>
+    <para>Outputs next triple to ses in TTL serialization. This function does not terminate the printed 
+    	triple in hope that the next triple will has same "s" or pair of "s" and "p". So "intermediate" 
+    	semicolon or comma can be used instead of "trailing" dot.</para>
+  </refsect1>
+  <refsect1 id="params_http_ttl_triple">
+    <title>Parameters</title>
+    <refsect2><title>env</title>
+      <para>An array of special format:</para>
+<programlisting><![CDATA[
+# vector (dict_new (some big size), 0, '', '', '', 0, 0, 0, 0), for ex.:
+vector (dict_new (16000), 0, '', '', '', 0, 0, 0, 0);	
+]]></programlisting>      
+      <para>The first item of the vector is dictionary of declared namespaces. Its size should be big 
+      	enough, but not greater than 16000 because the function will never try to create more than 
+      	8000 of namespaces for S and O and more than 8000 of namespaces for P and types. Thus 
+      	16000 max is possible grand total for all four.
+      </para>
+    </refsect2>
+    <refsect2><title>arg1</title>
+      <para>Triple subject.</para>
+    </refsect2>
+    <refsect2><title>arg2</title>
+      <para>Triple predicate.</para>
+    </refsect2>
+    <refsect2><title>arg3</title>
+      <para>Triple object.</para>
+    </refsect2>
+    <refsect2><title>ses</title>
+      <para>Session output.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_http_ttl_triple"><title>Return Types</title>
+    <para>Any</para>
+  </refsect1>
+  <refsect1 id="examples_http_ttl_triple">
+    <title>Examples</title>
+    <example id="ex_http_ttl_triple"><title></title>
+<para><emphasis>Example 1</emphasis></para>    
+<programlisting><![CDATA[
+CREATE PROCEDURE dump_one_graph 
+  ( IN  srcgraph           VARCHAR  , 
+    IN  out_file           VARCHAR  , 
+    IN  file_length_limit  INTEGER  := 1000000000
+  )
+  {
+    DECLARE  file_name  varchar;
+    DECLARE  env, ses      any;
+    DECLARE  ses_len, 
+             max_ses_len, 
+             file_len, 
+             file_idx      integer;
+    SET ISOLATION = 'uncommitted';
+    max_ses_len := 10000000;
+    file_len := 0;
+    file_idx := 1;
+    file_name := sprintf ('%s%06d.ttl', out_file, file_idx);
+    string_to_file ( file_name || '.graph', 
+                     srcgraph, 
+                     -2
+                   );
+    string_to_file ( file_name, 
+                     sprintf ( '# Dump of graph <%s>, as of %s\n', 
+                               srcgraph, 
+                               CAST (NOW() AS VARCHAR)
+                             ), 
+                     -2
+                   );
+    env := vector (dict_new (16000), 0, '', '', '', 0, 0, 0, 0);
+    ses := string_output ();
+    FOR (SELECT * FROM ( SPARQL DEFINE input:storage "" 
+                         SELECT ?s ?p ?o { GRAPH `iri(?:srcgraph)` { ?s ?p ?o } } 
+                       ) AS sub OPTION (LOOP)) DO
+      {
+        http_ttl_triple (env, "s", "p", "o", ses);
+        ses_len := length (ses);
+        IF (ses_len > max_ses_len)
+          {
+            file_len := file_len + ses_len;
+            IF (file_len > file_length_limit)
+              {
+                http (' .\n', ses);
+                string_to_file (file_name, ses, -1);
+                file_len := 0;
+                file_idx := file_idx + 1;
+                file_name := sprintf ('%s%06d.ttl', out_file, file_idx);
+                string_to_file ( file_name, 
+                                 sprintf ( '# Dump of graph <%s>, as of %s (part %d)\n', 
+                                           srcgraph, 
+                                           CAST (NOW() AS VARCHAR), 
+                                           file_idx), 
+                                 -2
+                               );
+                 env := vector (dict_new (16000), 0, '', '', '', 0, 0, 0, 0);
+              }
+            ELSE
+              string_to_file (file_name, ses, -1);
+            ses := string_output ();
+          }
+      }
+    IF (LENGTH (ses))
+      {
+        http (' .\n', ses);
+        string_to_file (file_name, ses, -1);
+      }
+  }
+;
+
+]]></programlisting>
+<para><emphasis>Example 2</emphasis></para>    
+<programlisting><![CDATA[
+create procedure dump_rdftriples_to_ttl(inout triples any, inout ses any)
+{
+  declare env any;
+  declare tcount, tctr integer;
+  tcount := length (triples);
+  if (0 = tcount)
+    {
+      http ('# Empty TURTLE\n', ses);
+      return;
+    }
+  env := vector (dict_new (__min (tcount, 16000)), 0, '', '', '', 0, 0, 0, 0);
+  { whenever sqlstate '*' goto end_pred_sort;
+    rowvector_subj_sort (triples, 1, 1);
+end_pred_sort: ;
+  }
+  { whenever sqlstate '*' goto end_subj_sort;
+    rowvector_subj_sort (triples, 0, 1);
+end_subj_sort: ;
+  }
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
+    }
+  http (' .', ses);
+}
+;	
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_http_ttl_triple">
+    <title>See Also</title>
+    <para><link linkend="fn_http_nt_triple"><function>http_nt_triple</function></link></para>        
+    <para><link linkend="fn_rdf_audit_metadata"><function>DB.DBA.RDF_AUDIT_METADATA</function></link></para>
+    <para><link linkend="fn_rdf_backup_metadata"><function>DB.DBA.RDF_BACKUP_METADATA</function></link></para>
+    <para><link linkend="fn_rdf_load_rdfxml"><function>DB.DBA.RDF_LOAD_RDFXML</function></link></para>
+    <para><link linkend="fn_rdf_load_rdfxml_mt"><function>DB.DBA.RDF_LOAD_RDFXML_MT</function></link></para>
+    <para><link linkend="fn_ttlp_mt"><function>TTLP_MT</function></link></para>
+    <para><link linkend="fn_ttlp_mt_local_file"><function>TTLP_MT_LOCAL_FILE</function></link></para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/http_unlock.xml b/docsrc/xmlsource/funcref/http_unlock.xml
new file mode 100644
index 0000000..437fafc
--- /dev/null
+++ b/docsrc/xmlsource/funcref/http_unlock.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_http_unlock">
+  <refmeta>
+    <refentrytitle>http_unlock</refentrytitle>
+    <refmiscinfo>ws</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>http_unlock</refname>
+    <refpurpose>Unlocks the HTTP Web Server port</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_http_unlock">
+      <funcprototype id="fproto_http_unlock">
+        <funcdef>any <function>http_unlock</function></funcdef>
+        <paramdef>in <parameter>pwd</parameter> varchar</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_http_unlock"><title>Description</title>
+  <para>This function takes as parameter the password of the dba user and unlocks the HTTP Web Server port</para>
+  </refsect1>	
+  <refsect1 id="params_http_unlock"><title>Parameters</title>
+    <refsect2><title>pwd</title><para>The password of the dba user.</para></refsect2>
+  </refsect1>
+  <refsect1 id="examples_http_unlock"><title>Examples</title>
+  <example id="ex_http_unlock"><title></title>
+  <screen><![CDATA[
+SQL> http_unlock('password');
+
+Done. -- 0 msec.
+SQL>
+]]></screen>
+  </example>
+  </refsect1>
+    <refsect1 id="seealso_http_unlock">
+    <title>See Also</title>
+    <para><link linkend="fn_http_lock"><function>http_lock</function></link></para>
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/http_url.xml b/docsrc/xmlsource/funcref/http_url.xml
index 51e5c03..0dbae4c 100644
--- a/docsrc/xmlsource/funcref/http_url.xml
+++ b/docsrc/xmlsource/funcref/http_url.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_value.xml b/docsrc/xmlsource/funcref/http_value.xml
index ad89e54..8b80ec7 100644
--- a/docsrc/xmlsource/funcref/http_value.xml
+++ b/docsrc/xmlsource/funcref/http_value.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/http_xslt.xml b/docsrc/xmlsource/funcref/http_xslt.xml
index 13c57f5..098bf94 100644
--- a/docsrc/xmlsource/funcref/http_xslt.xml
+++ b/docsrc/xmlsource/funcref/http_xslt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/identity_value.xml b/docsrc/xmlsource/funcref/identity_value.xml
index 37ce890..3c2a193 100644
--- a/docsrc/xmlsource/funcref/identity_value.xml
+++ b/docsrc/xmlsource/funcref/identity_value.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/import_clr.xml b/docsrc/xmlsource/funcref/import_clr.xml
index 1094a74..aaa12ca 100644
--- a/docsrc/xmlsource/funcref/import_clr.xml
+++ b/docsrc/xmlsource/funcref/import_clr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/import_jar.xml b/docsrc/xmlsource/funcref/import_jar.xml
index e165c6c..5d43fbf 100644
--- a/docsrc/xmlsource/funcref/import_jar.xml
+++ b/docsrc/xmlsource/funcref/import_jar.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/initcap.xml b/docsrc/xmlsource/funcref/initcap.xml
index b51bb01..1073bf3 100644
--- a/docsrc/xmlsource/funcref/initcap.xml
+++ b/docsrc/xmlsource/funcref/initcap.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/internal_to_sql_type.xml b/docsrc/xmlsource/funcref/internal_to_sql_type.xml
index 0231848..63634f8 100644
--- a/docsrc/xmlsource/funcref/internal_to_sql_type.xml
+++ b/docsrc/xmlsource/funcref/internal_to_sql_type.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/internal_type.xml b/docsrc/xmlsource/funcref/internal_type.xml
index b67f1b9..0c23b0b 100644
--- a/docsrc/xmlsource/funcref/internal_type.xml
+++ b/docsrc/xmlsource/funcref/internal_type.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/internal_type_name.xml b/docsrc/xmlsource/funcref/internal_type_name.xml
index 4d6ba13..226c81a 100644
--- a/docsrc/xmlsource/funcref/internal_type_name.xml
+++ b/docsrc/xmlsource/funcref/internal_type_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isarray.xml b/docsrc/xmlsource/funcref/isarray.xml
index 4182ac6..138fbab 100644
--- a/docsrc/xmlsource/funcref/isarray.xml
+++ b/docsrc/xmlsource/funcref/isarray.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isbinary.xml b/docsrc/xmlsource/funcref/isbinary.xml
index 253ef5a..a84a077 100644
--- a/docsrc/xmlsource/funcref/isbinary.xml
+++ b/docsrc/xmlsource/funcref/isbinary.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isblob.xml b/docsrc/xmlsource/funcref/isblob.xml
index d2dfebe..e9d6aab 100644
--- a/docsrc/xmlsource/funcref/isblob.xml
+++ b/docsrc/xmlsource/funcref/isblob.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isdouble.xml b/docsrc/xmlsource/funcref/isdouble.xml
index 8128de3..1c36c09 100644
--- a/docsrc/xmlsource/funcref/isdouble.xml
+++ b/docsrc/xmlsource/funcref/isdouble.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isentity.xml b/docsrc/xmlsource/funcref/isentity.xml
index 19c6db3..f703caf 100644
--- a/docsrc/xmlsource/funcref/isentity.xml
+++ b/docsrc/xmlsource/funcref/isentity.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isfinitenumeric.xml b/docsrc/xmlsource/funcref/isfinitenumeric.xml
new file mode 100644
index 0000000..c1b4b0d
--- /dev/null
+++ b/docsrc/xmlsource/funcref/isfinitenumeric.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_isfinitenumeric">
+  <refmeta>
+    <refentrytitle>isfinitenumeric</refentrytitle>
+    <refmiscinfo>type</refmiscinfo>
+    <refmiscinfo>number</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>isfinitenumeric</refname>
+    <refpurpose>returns 1 if its argument is of numeric type and
+its value is plain valid numeric value.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_isfinitenumeric">
+      <funcprototype id="fproto_isfinitenumeric">
+        <funcdef><function>isfinitenumeric</function></funcdef>
+        <paramdef><parameter>arg</parameter> anything</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_isfinitenumeric"><title>Description</title>
+    <para>isfinitenumeric returns 1 if its argument is of numeric type and
+its value is plain valid numeric value, not a peculiarity like infinity
+or not-a-number.
+    </para>
+  </refsect1>
+    <refsect1 id="examples_isfinitenumeric"><title>Examples</title>
+  <example id="ex_isfinitenumeric"><title></title>
+<programlisting><![CDATA[
+SQL>  SPARQL 
+INSERT INTO GRAPH <http://mygraph.com>
+  { 
+    <http://mygraph2.com/pricing/#QVal1> <price1>  1 ;    <price2> "";    <price3> 5 .
+    <http://mygraph2.com/pricing/#QVal2> <price1>  "" ;   <price2> 1 ;    <price3> 4 .
+    <http://mygraph2.com/pricing/#QVal3> <price1>  6 ;    <price2> 2 ;    <price3> "".
+  };
+  
+Insert into <http://mygraph.com>, 9 (or less) triples -- done
+No. of rows in result: 1
+
+SQL> SPARQL SELECT ?s (bif:isfinitenumeric(?pr1))
+FROM <http://mygraph.com>
+WHERE 
+  {
+    ?s <price1> ?pr1 ;  
+       <price2> ?pr2 ;  
+       <price3> ?pr3 
+  };  	
+  
+Query result:
+s                                     callret-1
+VARCHAR 	                            INTEGER
+_______________________________________________
+http://mygraph2.com/pricing/#QVal2	 0
+http://mygraph2.com/pricing/#QVal1	 1
+http://mygraph2.com/pricing/#QVal3	 1
+
+No. of rows in result: 3  	  
+]]></programlisting>
+  </example>
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/isfloat.xml b/docsrc/xmlsource/funcref/isfloat.xml
index c16a35d..852b7f1 100644
--- a/docsrc/xmlsource/funcref/isfloat.xml
+++ b/docsrc/xmlsource/funcref/isfloat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isinteger.xml b/docsrc/xmlsource/funcref/isinteger.xml
index 89ae68b..3e8b153 100644
--- a/docsrc/xmlsource/funcref/isinteger.xml
+++ b/docsrc/xmlsource/funcref/isinteger.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isnull.xml b/docsrc/xmlsource/funcref/isnull.xml
index 61281c7..e574b60 100644
--- a/docsrc/xmlsource/funcref/isnull.xml
+++ b/docsrc/xmlsource/funcref/isnull.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isnumeric.xml b/docsrc/xmlsource/funcref/isnumeric.xml
index 767b870..a196c25 100644
--- a/docsrc/xmlsource/funcref/isnumeric.xml
+++ b/docsrc/xmlsource/funcref/isnumeric.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/isstring.xml b/docsrc/xmlsource/funcref/isstring.xml
index 1ba2921..c7ebff1 100644
--- a/docsrc/xmlsource/funcref/isstring.xml
+++ b/docsrc/xmlsource/funcref/isstring.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/iszero.xml b/docsrc/xmlsource/funcref/iszero.xml
index 1c59aa2..5870bf5 100644
--- a/docsrc/xmlsource/funcref/iszero.xml
+++ b/docsrc/xmlsource/funcref/iszero.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_call_method.xml b/docsrc/xmlsource/funcref/java_call_method.xml
index 6fa9ff8..6579b1f 100644
--- a/docsrc/xmlsource/funcref/java_call_method.xml
+++ b/docsrc/xmlsource/funcref/java_call_method.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_get_property.xml b/docsrc/xmlsource/funcref/java_get_property.xml
index fe9791a..c7b4d65 100644
--- a/docsrc/xmlsource/funcref/java_get_property.xml
+++ b/docsrc/xmlsource/funcref/java_get_property.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_load_class.xml b/docsrc/xmlsource/funcref/java_load_class.xml
index 0e80ec6..78972f1 100644
--- a/docsrc/xmlsource/funcref/java_load_class.xml
+++ b/docsrc/xmlsource/funcref/java_load_class.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_new_object.xml b/docsrc/xmlsource/funcref/java_new_object.xml
index 904f70a..56726f2 100644
--- a/docsrc/xmlsource/funcref/java_new_object.xml
+++ b/docsrc/xmlsource/funcref/java_new_object.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_set_property.xml b/docsrc/xmlsource/funcref/java_set_property.xml
index 1d870d6..63a643f 100644
--- a/docsrc/xmlsource/funcref/java_set_property.xml
+++ b/docsrc/xmlsource/funcref/java_set_property.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_vm_attach.xml b/docsrc/xmlsource/funcref/java_vm_attach.xml
index 493e65a..2c0cfdc 100644
--- a/docsrc/xmlsource/funcref/java_vm_attach.xml
+++ b/docsrc/xmlsource/funcref/java_vm_attach.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/java_vm_detach.xml b/docsrc/xmlsource/funcref/java_vm_detach.xml
index b8057ae..86590d0 100644
--- a/docsrc/xmlsource/funcref/java_vm_detach.xml
+++ b/docsrc/xmlsource/funcref/java_vm_detach.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/json_parse.xml b/docsrc/xmlsource/funcref/json_parse.xml
new file mode 100644
index 0000000..1896219
--- /dev/null
+++ b/docsrc/xmlsource/funcref/json_parse.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<refentry id="fn_json_parse">
+  <refmeta>
+    <refentrytitle>json_parse</refentrytitle>
+    <refmiscinfo>ws</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>json_parse</refname>
+    <refpurpose>Takes json string and returns parse tree.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_json_parse">
+      <funcprototype id="fproto_json_parse">
+        <funcdef>integer <function>json_parse</function></funcdef>
+	<paramdef>in <parameter>txt</parameter> varchar</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_json_parse">
+    <title>Description</title>
+    <para>This function takes json string and returns parse tree.</para>
+  </refsect1>
+  <refsect1 id="params_json_parse">
+    <title>Parameters</title>
+    <refsect2><title>txt</title>
+      <para>a json string</para></refsect2>
+  </refsect1>
+  <refsect1 id="ret_json_parse"><title>Return Types</title>
+    <para>The function returns tree.</para>
+  </refsect1>
+  <refsect1 id="examples_atoi"><title>Examples</title>
+    <example id="ex_atoi"><title>Simple example</title>
+<programlisting><![CDATA[
+SQL>create procedure json_tree_example ()
+{
+  declare qr, url, cnt, tree, xt, hdr any;
+  cnt := '
+{ "head": { "link": [], "vars": ["s", "p", "o"] },
+  "results": { "distinct": false, "ordered": true, "bindings": [
+    { "s": { "type": "uri", "value": "http://example.org/node" }	, "p": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }	, "o": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }},
+    { "s": { "type": "uri", "value": "http://example.org/node" }	, "p": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }	, "o": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }} ] } }';
+  tree := json_parse (cnt);
+  tree := get_keyword ('results', tree);
+  tree := get_keyword ('bindings', tree);
+  return tree[0][1];
+}
+;
+
+Done. 
+SQL> SELECT json_tree_example();
+json_tree_example
+VARCHAR
+ structure
+No. of rows in result: 1 
+]]></programlisting>    
+    </example>    	
+  </refsect1>  
+  <refsect1 id="seealso_json_parse">
+    <title>See Also</title>
+    <para>
+      <link linkend="fn_http"><function>http</function></link>,
+      <link linkend="fn_http_value"><function>http_value</function></link>,
+      <link linkend="fn_http_url"><function>http_url</function></link>,
+      <link linkend="fn_string_output"><function>string_output</function></link>,
+      <link linkend="fn_http_rewrite"><function>http_rewrite</function></link>,
+    </para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/jvm_ref_import.xml b/docsrc/xmlsource/funcref/jvm_ref_import.xml
index ff83d63..4800a9b 100644
--- a/docsrc/xmlsource/funcref/jvm_ref_import.xml
+++ b/docsrc/xmlsource/funcref/jvm_ref_import.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/key_estimate.xml b/docsrc/xmlsource/funcref/key_estimate.xml
index a1ec4e5..3e41cbc 100644
--- a/docsrc/xmlsource/funcref/key_estimate.xml
+++ b/docsrc/xmlsource/funcref/key_estimate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/lcase.xml b/docsrc/xmlsource/funcref/lcase.xml
index dc6b9e9..93a07bb 100644
--- a/docsrc/xmlsource/funcref/lcase.xml
+++ b/docsrc/xmlsource/funcref/lcase.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ldap_add.xml b/docsrc/xmlsource/funcref/ldap_add.xml
index 9bc3710..fc0accf 100644
--- a/docsrc/xmlsource/funcref/ldap_add.xml
+++ b/docsrc/xmlsource/funcref/ldap_add.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ldap_delete.xml b/docsrc/xmlsource/funcref/ldap_delete.xml
index 5aa9951..91ca915 100644
--- a/docsrc/xmlsource/funcref/ldap_delete.xml
+++ b/docsrc/xmlsource/funcref/ldap_delete.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ldap_modify.xml b/docsrc/xmlsource/funcref/ldap_modify.xml
index e8d5415..accd49e 100644
--- a/docsrc/xmlsource/funcref/ldap_modify.xml
+++ b/docsrc/xmlsource/funcref/ldap_modify.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ldap_search.xml b/docsrc/xmlsource/funcref/ldap_search.xml
index 9050c45..bae855e 100644
--- a/docsrc/xmlsource/funcref/ldap_search.xml
+++ b/docsrc/xmlsource/funcref/ldap_search.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/left.xml b/docsrc/xmlsource/funcref/left.xml
index bdb5d9c..429a9ce 100644
--- a/docsrc/xmlsource/funcref/left.xml
+++ b/docsrc/xmlsource/funcref/left.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/length.xml b/docsrc/xmlsource/funcref/length.xml
index 75d2731..703871e 100644
--- a/docsrc/xmlsource/funcref/length.xml
+++ b/docsrc/xmlsource/funcref/length.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/lfs_exp.xml b/docsrc/xmlsource/funcref/lfs_exp.xml
index f8ec7b0..7c5b4dd 100644
--- a/docsrc/xmlsource/funcref/lfs_exp.xml
+++ b/docsrc/xmlsource/funcref/lfs_exp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/lh_get_handler.xml b/docsrc/xmlsource/funcref/lh_get_handler.xml
index 8ada40e..2058ab0 100644
--- a/docsrc/xmlsource/funcref/lh_get_handler.xml
+++ b/docsrc/xmlsource/funcref/lh_get_handler.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/lh_load_handler.xml b/docsrc/xmlsource/funcref/lh_load_handler.xml
index c379d0e..02ac206 100644
--- a/docsrc/xmlsource/funcref/lh_load_handler.xml
+++ b/docsrc/xmlsource/funcref/lh_load_handler.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/locate.xml b/docsrc/xmlsource/funcref/locate.xml
index f2b9836..6757ff6 100644
--- a/docsrc/xmlsource/funcref/locate.xml
+++ b/docsrc/xmlsource/funcref/locate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/log.xml b/docsrc/xmlsource/funcref/log.xml
index 1663a74..a92b69d 100644
--- a/docsrc/xmlsource/funcref/log.xml
+++ b/docsrc/xmlsource/funcref/log.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/log10.xml b/docsrc/xmlsource/funcref/log10.xml
index 218ebc0..b3baff9 100644
--- a/docsrc/xmlsource/funcref/log10.xml
+++ b/docsrc/xmlsource/funcref/log10.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/log_enable.xml b/docsrc/xmlsource/funcref/log_enable.xml
index e7b1e76..6bdd4fa 100644
--- a/docsrc/xmlsource/funcref/log_enable.xml
+++ b/docsrc/xmlsource/funcref/log_enable.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/log_text.xml b/docsrc/xmlsource/funcref/log_text.xml
index c49478b..90d02d1 100644
--- a/docsrc/xmlsource/funcref/log_text.xml
+++ b/docsrc/xmlsource/funcref/log_text.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/lower.xml b/docsrc/xmlsource/funcref/lower.xml
index 187bdda..6fc7872 100644
--- a/docsrc/xmlsource/funcref/lower.xml
+++ b/docsrc/xmlsource/funcref/lower.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ltrim.xml b/docsrc/xmlsource/funcref/ltrim.xml
index a6213ad..7524b0b 100644
--- a/docsrc/xmlsource/funcref/ltrim.xml
+++ b/docsrc/xmlsource/funcref/ltrim.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/make_array.xml b/docsrc/xmlsource/funcref/make_array.xml
index ec9bdc1..540e465 100644
--- a/docsrc/xmlsource/funcref/make_array.xml
+++ b/docsrc/xmlsource/funcref/make_array.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/make_string.xml b/docsrc/xmlsource/funcref/make_string.xml
index a9f5a7f..c2196b2 100644
--- a/docsrc/xmlsource/funcref/make_string.xml
+++ b/docsrc/xmlsource/funcref/make_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/md5.xml b/docsrc/xmlsource/funcref/md5.xml
index 04d42ba..6b064af 100644
--- a/docsrc/xmlsource/funcref/md5.xml
+++ b/docsrc/xmlsource/funcref/md5.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/md5_final.xml b/docsrc/xmlsource/funcref/md5_final.xml
index 4d9c22c..919edd7 100644
--- a/docsrc/xmlsource/funcref/md5_final.xml
+++ b/docsrc/xmlsource/funcref/md5_final.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/md5_init.xml b/docsrc/xmlsource/funcref/md5_init.xml
index 2b9e2e8..5d89044 100644
--- a/docsrc/xmlsource/funcref/md5_init.xml
+++ b/docsrc/xmlsource/funcref/md5_init.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/md5_update.xml b/docsrc/xmlsource/funcref/md5_update.xml
index 0116f8a..8fdb4ab 100644
--- a/docsrc/xmlsource/funcref/md5_update.xml
+++ b/docsrc/xmlsource/funcref/md5_update.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/metaWeblog.editPost.xml b/docsrc/xmlsource/funcref/metaWeblog.editPost.xml
index 8d50a8f..c023795 100644
--- a/docsrc/xmlsource/funcref/metaWeblog.editPost.xml
+++ b/docsrc/xmlsource/funcref/metaWeblog.editPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/metaWeblog.getPost.xml b/docsrc/xmlsource/funcref/metaWeblog.getPost.xml
index 8eb2e26..92ab13e 100644
--- a/docsrc/xmlsource/funcref/metaWeblog.getPost.xml
+++ b/docsrc/xmlsource/funcref/metaWeblog.getPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/metaWeblog.getRecentPosts.xml b/docsrc/xmlsource/funcref/metaWeblog.getRecentPosts.xml
index 49f02ae..0ba5407 100644
--- a/docsrc/xmlsource/funcref/metaWeblog.getRecentPosts.xml
+++ b/docsrc/xmlsource/funcref/metaWeblog.getRecentPosts.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/metaWeblog.newPost.xml b/docsrc/xmlsource/funcref/metaWeblog.newPost.xml
index 5cfa003..ced6e50 100644
--- a/docsrc/xmlsource/funcref/metaWeblog.newPost.xml
+++ b/docsrc/xmlsource/funcref/metaWeblog.newPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mime_body.xml b/docsrc/xmlsource/funcref/mime_body.xml
index 7fe6804..fea5553 100644
--- a/docsrc/xmlsource/funcref/mime_body.xml
+++ b/docsrc/xmlsource/funcref/mime_body.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mime_part.xml b/docsrc/xmlsource/funcref/mime_part.xml
index 9e9f811..e749b91 100644
--- a/docsrc/xmlsource/funcref/mime_part.xml
+++ b/docsrc/xmlsource/funcref/mime_part.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mime_tree.xml b/docsrc/xmlsource/funcref/mime_tree.xml
index 57338d3..a4e161c 100644
--- a/docsrc/xmlsource/funcref/mime_tree.xml
+++ b/docsrc/xmlsource/funcref/mime_tree.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/minute.xml b/docsrc/xmlsource/funcref/minute.xml
index 5d18575..72f6566 100644
--- a/docsrc/xmlsource/funcref/minute.xml
+++ b/docsrc/xmlsource/funcref/minute.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mod.xml b/docsrc/xmlsource/funcref/mod.xml
index 34568f8..84ae2e0 100644
--- a/docsrc/xmlsource/funcref/mod.xml
+++ b/docsrc/xmlsource/funcref/mod.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/month.xml b/docsrc/xmlsource/funcref/month.xml
index 935706b..c4e34e0 100644
--- a/docsrc/xmlsource/funcref/month.xml
+++ b/docsrc/xmlsource/funcref/month.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/monthname.xml b/docsrc/xmlsource/funcref/monthname.xml
index 06321a6..6e18e0b 100644
--- a/docsrc/xmlsource/funcref/monthname.xml
+++ b/docsrc/xmlsource/funcref/monthname.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/msec_time.xml b/docsrc/xmlsource/funcref/msec_time.xml
index 8f8e131..14c6fff 100644
--- a/docsrc/xmlsource/funcref/msec_time.xml
+++ b/docsrc/xmlsource/funcref/msec_time.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.getCategoryList.xml b/docsrc/xmlsource/funcref/mt.getCategoryList.xml
index 1f3c780..c898d61 100644
--- a/docsrc/xmlsource/funcref/mt.getCategoryList.xml
+++ b/docsrc/xmlsource/funcref/mt.getCategoryList.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.getPostCategories.xml b/docsrc/xmlsource/funcref/mt.getPostCategories.xml
index 54c8287..ca3c67f 100644
--- a/docsrc/xmlsource/funcref/mt.getPostCategories.xml
+++ b/docsrc/xmlsource/funcref/mt.getPostCategories.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.getRecentPostTitles.xml b/docsrc/xmlsource/funcref/mt.getRecentPostTitles.xml
index 157d958..01b78b5 100644
--- a/docsrc/xmlsource/funcref/mt.getRecentPostTitles.xml
+++ b/docsrc/xmlsource/funcref/mt.getRecentPostTitles.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.getTrackbackPings.xml b/docsrc/xmlsource/funcref/mt.getTrackbackPings.xml
index 9cce8d0..0a29319 100644
--- a/docsrc/xmlsource/funcref/mt.getTrackbackPings.xml
+++ b/docsrc/xmlsource/funcref/mt.getTrackbackPings.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.publishPost.xml b/docsrc/xmlsource/funcref/mt.publishPost.xml
index 13c2b2e..a7234c3 100644
--- a/docsrc/xmlsource/funcref/mt.publishPost.xml
+++ b/docsrc/xmlsource/funcref/mt.publishPost.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.setPostCategories.xml b/docsrc/xmlsource/funcref/mt.setPostCategories.xml
index 1f2bec8..dbfff3a 100644
--- a/docsrc/xmlsource/funcref/mt.setPostCategories.xml
+++ b/docsrc/xmlsource/funcref/mt.setPostCategories.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mt.supportedMethods.xml b/docsrc/xmlsource/funcref/mt.supportedMethods.xml
index 7efff8c..5b4ec51 100644
--- a/docsrc/xmlsource/funcref/mt.supportedMethods.xml
+++ b/docsrc/xmlsource/funcref/mt.supportedMethods.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mts_connect.xml b/docsrc/xmlsource/funcref/mts_connect.xml
index 0ac7f9e..fb540b6 100644
--- a/docsrc/xmlsource/funcref/mts_connect.xml
+++ b/docsrc/xmlsource/funcref/mts_connect.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mts_get_timeout.xml b/docsrc/xmlsource/funcref/mts_get_timeout.xml
index f38419a..330d8d5 100644
--- a/docsrc/xmlsource/funcref/mts_get_timeout.xml
+++ b/docsrc/xmlsource/funcref/mts_get_timeout.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mts_set_timeout.xml b/docsrc/xmlsource/funcref/mts_set_timeout.xml
index 021a3d8..65661ba 100644
--- a/docsrc/xmlsource/funcref/mts_set_timeout.xml
+++ b/docsrc/xmlsource/funcref/mts_set_timeout.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/mts_status.xml b/docsrc/xmlsource/funcref/mts_status.xml
index f76aaea..6104a6d 100644
--- a/docsrc/xmlsource/funcref/mts_status.xml
+++ b/docsrc/xmlsource/funcref/mts_status.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/name_part.xml b/docsrc/xmlsource/funcref/name_part.xml
index ffe7181..1159108 100644
--- a/docsrc/xmlsource/funcref/name_part.xml
+++ b/docsrc/xmlsource/funcref/name_part.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/nm_max.xml b/docsrc/xmlsource/funcref/nm_max.xml
new file mode 100644
index 0000000..c7376d9
--- /dev/null
+++ b/docsrc/xmlsource/funcref/nm_max.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_nm_max">
+  <refmeta>
+    <refentrytitle>__max</refentrytitle>
+    <refmiscinfo>number</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>__max</refname>
+    <refpurpose>Returns maximum value among all its arguments.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn___max">
+      <funcprototype id="fproto___max">
+        <funcdef>any <function>__max</function></funcdef>
+	        <paramdef><parameter>arg1</parameter> any</paramdef>
+	        <paramdef><parameter>arg2</parameter> any</paramdef>
+	        <paramdef><parameter>...</parameter></paramdef>
+	        <paramdef><parameter>argN</parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc___max"><title>Description</title>
+  <para>The function returns the maximum value among all values in all its arguments.</para>
+  </refsect1>	
+  <refsect1 id="params___max"><title>Parameters</title>
+    <refsect2><title>argI</title>
+      <para>Values which can be with type float, integer etc.</para></refsect2>
+  </refsect1>
+  <refsect1 id="examples___max"><title>Examples</title>
+  <example id="ex___max"><title></title>
+  <para><emphasis>Example 1</emphasis></para>  
+  <screen><![CDATA[
+SQL> select __max(12, 2.34, 5, 20.5);
+__max
+VARCHAR
+_______________________________________________________________________________
+
+20.5
+
+1 Rows. -- 16 msec.
+]]></screen>
+<para><emphasis>Example 2</emphasis></para>  
+<programlisting><![CDATA[
+SQL> SPARQL 
+INSERT INTO GRAPH <http://mygraph2.com>
+  { 
+    <http://mygraph2.com/pricing/#QVal1> <price1>  1 ; <price2> 9 ; <price3> 5 .
+    <http://mygraph2.com/pricing/#QVal2> <price1>  3 ; <price2> 1 ; <price3> 4 .
+    <http://mygraph2.com/pricing/#QVal3> <price1>  6 ; <price2> 2 ; <price3> 2 .
+  };
+  
+Insert into <http://mygraph2.com>, 9 (or less) triples -- done
+No. of rows in result: 1
+ 
+  
+SQL> SPARQL SELECT ?s (bif:__max(?pr1, ?pr2, ?pr3))
+FROM <http://mygraph2.com>
+WHERE 
+  {
+    ?s <price1> ?pr1 ;  
+       <price2> ?pr2 ;  
+       <price3> ?pr3 
+  };  	
+  
+Query result:
+s                                     callret-1
+VARCHAR 	                            VARCHAR
+_______________________________________________
+http://mygraph2.com/pricing/#QVal3	  6
+http://mygraph2.com/pricing/#QVal2	  4
+http://mygraph2.com/pricing/#QVal1	  9
+
+No. of rows in result: 3   
+]]></programlisting>
+  </example>
+  </refsect1>
+    <refsect1 id="seealso___max">
+    <title>See Also</title>
+    <para><link linkend="fn_nm_min"><function>__min</function></link></para>
+    <para><link linkend="fn_nm_min_notnull"><function>__min_notnull</function></link></para>
+    <para><link linkend="fn_nm_max_notnull"><function>__max_notnull</function></link></para>    
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/nm_max_notnull.xml b/docsrc/xmlsource/funcref/nm_max_notnull.xml
new file mode 100644
index 0000000..22afd15
--- /dev/null
+++ b/docsrc/xmlsource/funcref/nm_max_notnull.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_nm_max_notnull">
+  <refmeta>
+    <refentrytitle>__max_notnull</refentrytitle>
+    <refmiscinfo>number</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>__max_notnull</refname>
+    <refpurpose>Returns maximum value among all its arguments, ignoring NULLs entirely.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn___max_notnull">
+      <funcprototype id="fproto___max_notnull">
+        <funcdef>any <function>__max_notnull</function></funcdef>
+	        <paramdef><parameter>arg1</parameter> any</paramdef>
+	        <paramdef><parameter>arg2</parameter> any</paramdef>
+	        <paramdef><parameter>...</parameter></paramdef>
+	        <paramdef><parameter>argN</parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc___max_notnull"><title>Description</title>
+  <para>The function returns the maximum value among all values in all its arguments by 
+  	ignoring NULLs entirely.</para>
+  </refsect1>	
+  <refsect1 id="params___max_notnull"><title>Parameters</title>
+    <refsect2><title>argI</title>
+      <para>Values which can be with type float, integer etc.</para></refsect2>
+  </refsect1>
+  <refsect1 id="examples___max_notnull"><title>Examples</title>
+  <example id="ex___max_notnull"><title></title>
+<para><emphasis>Example 1</emphasis></para>    
+  <screen><![CDATA[
+SQL> select __max_notnull (null, 1, 0);
+__max_notnull
+VARCHAR
+_______________________________________________________________________________
+
+1
+
+1 Rows. -- 16 msec.
+
+SQL> select __max (null, 1, 0);
+__max
+VARCHAR
+_______________________________________________________________________________
+
+NULL
+
+1 Rows. -- 0 msec.
+]]></screen>
+<para><emphasis>Example 2</emphasis></para>    
+<programlisting><![CDATA[
+SQL> SPARQL 
+INSERT INTO GRAPH <http://mygraph.com>
+  { 
+    <http://mygraph2.com/pricing/#QVal1> <price1>  1 ;                    <price3> 5 .
+    <http://mygraph2.com/pricing/#QVal2>                  <price2> 1 ;    <price3> 4 .
+    <http://mygraph2.com/pricing/#QVal3> <price1>  6 ;    <price2> 2                 .
+  };
+    
+Insert into <http://mygraph.com>, 6 (or less) triples -- done
+No. of rows in result: 1
+ 	
+SQL> SPARQL SELECT ?s, (bif:__max_notnull (?pr1, ?pr2, ?pr3)) 
+FROM <http://mygraph.com>
+WHERE 
+  {
+    { 
+      SELECT DISTINCT ?s
+      WHERE 
+        {
+          ?s ?p ?pr .
+          FILTER (?p in (<price1>, <price2>, <price3>)) 
+        } 
+    }
+    OPTIONAL { ?s <price1> ?pr1 }
+    OPTIONAL { ?s <price2> ?pr2 }
+    OPTIONAL { ?s <price3> ?pr3 }
+  };
+
+  
+Query result:
+s                                     callret-1
+VARCHAR 	                            VARCHAR
+_______________________________________________
+http://mygraph2.com/pricing/#QVal2	 4
+http://mygraph2.com/pricing/#QVal1	 5
+http://mygraph2.com/pricing/#QVal3	 6
+
+No. of rows in result: 2   	
+]]></programlisting>
+  </example>
+  </refsect1>
+    <refsect1 id="seealso___max_notnull">
+    <title>See Also</title>
+    <para><link linkend="fn_nm_max"><function>__max</function></link></para>    
+    <para><link linkend="fn_nm_min"><function>__min</function></link></para>
+    <para><link linkend="fn_nm_min_notnull"><function>__min_notnull</function></link></para>
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/nm_min.xml b/docsrc/xmlsource/funcref/nm_min.xml
new file mode 100644
index 0000000..d49e021
--- /dev/null
+++ b/docsrc/xmlsource/funcref/nm_min.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_nm_min">
+  <refmeta>
+    <refentrytitle>__min</refentrytitle>
+    <refmiscinfo>number</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>__min</refname>
+    <refpurpose>Returns minimum value among all its arguments.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn___min">
+      <funcprototype id="fproto___min">
+        <funcdef>any <function>__min</function></funcdef>
+	        <paramdef><parameter>arg1</parameter> any</paramdef>
+	        <paramdef><parameter>arg2</parameter> any</paramdef>
+	        <paramdef><parameter>...</parameter></paramdef>
+	        <paramdef><parameter>argN</parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc___min"><title>Description</title>
+  <para>The function returns the minimum value among all values in all its arguments.</para>
+  </refsect1>	
+  <refsect1 id="params___min"><title>Parameters</title>
+    <refsect2><title>argI</title>
+      <para>Values which can be with type float, integer etc.</para></refsect2>
+  </refsect1>
+  <refsect1 id="examples___min"><title>Examples</title>
+  <example id="ex___min"><title></title>
+<para><emphasis>Example 1</emphasis></para>    
+  <screen><![CDATA[
+SQL> select __min(12, 2.34, 5, 20);
+__min
+VARCHAR
+_______________________________________________________________________________
+
+2.34
+
+1 Rows. -- 32 msec.
+]]></screen>
+<para><emphasis>Example 2</emphasis></para>  
+<programlisting><![CDATA[
+SQL> SPARQL 
+INSERT INTO GRAPH <http://mygraph2.com>
+  { 
+    <http://mygraph2.com/pricing/#QVal1> <price1>  1 ; <price2> 9 ; <price3> 5 .
+    <http://mygraph2.com/pricing/#QVal2> <price1>  3 ; <price2> 1 ; <price3> 4 .
+    <http://mygraph2.com/pricing/#QVal3> <price1>  6 ; <price2> 2 ; <price3> 2 .
+  };
+  
+Insert into <http://mygraph.com>, 9 (or less) triples -- done
+No. of rows in result: 1
+ 
+  
+SQL> SPARQL SELECT ?s (bif:__min(?pr1, ?pr2, ?pr3))
+FROM <http://mygraph2.com>
+WHERE 
+  {
+    ?s <price1> ?pr1 ;  
+       <price2> ?pr2 ;  
+       <price3> ?pr3 
+  };  	
+  
+Query result:
+s                                     callret-1
+VARCHAR 	                            VARCHAR
+_______________________________________________
+http://mygraph2.com/pricing/#QVal3	  2
+http://mygraph2.com/pricing/#QVal2	  1
+http://mygraph2.com/pricing/#QVal1	  1
+
+No. of rows in result: 3  	
+]]></programlisting>
+  </example>
+  </refsect1>
+    <refsect1 id="seealso___min">
+    <title>See Also</title>
+    <para><link linkend="fn_nm_max"><function>__max</function></link></para>    
+    <para><link linkend="fn_nm_min_notnull"><function>__min_notnull</function></link></para>
+    <para><link linkend="fn_nm_max_notnull"><function>__max_notnull</function></link></para>    
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/nm_min_notnull.xml b/docsrc/xmlsource/funcref/nm_min_notnull.xml
new file mode 100644
index 0000000..1f7870b
--- /dev/null
+++ b/docsrc/xmlsource/funcref/nm_min_notnull.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_nm_min_notnull">
+  <refmeta>
+    <refentrytitle>__min_notnull</refentrytitle>
+    <refmiscinfo>number</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>__min_notnull</refname>
+    <refpurpose>Returns minimum value among all its arguments, ignoring NULLs entirely.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn___min_notnull">
+      <funcprototype id="fproto___min_notnull">
+        <funcdef>any <function>__min_notnull</function></funcdef>
+	        <paramdef><parameter>arg1</parameter> any</paramdef>
+	        <paramdef><parameter>arg2</parameter> any</paramdef>
+	        <paramdef><parameter>...</parameter></paramdef>
+	        <paramdef><parameter>argN</parameter> any</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc___min_notnull"><title>Description</title>
+  <para>The function returns the minimum value among all values in all its arguments by 
+  	ignoring NULLs entirely.</para>
+  </refsect1>	
+  <refsect1 id="params___min_notnull"><title>Parameters</title>
+    <refsect2><title>argI</title>
+      <para>Values which can be with type float, integer etc.</para></refsect2>
+  </refsect1>
+  <refsect1 id="examples___min_notnull"><title>Examples</title>
+  <example id="ex___min_notnull"><title></title>
+<para><emphasis>Example 1</emphasis></para>   
+  <screen><![CDATA[
+SQL> select __min_notnull (null, 1, 0);
+__min_notnull
+VARCHAR
+_______________________________________________________________________________
+
+0
+
+1 Rows. -- 0 msec.
+SQL> select __min (null, 1, 0);
+__min
+VARCHAR
+_______________________________________________________________________________
+
+NULL
+
+1 Rows. -- 0 msec.
+]]></screen>
+<para><emphasis>Example 2</emphasis></para>
+<programlisting><![CDATA[
+SQL> SPARQL 
+INSERT INTO GRAPH <http://mygraph.com>
+  { 
+    <http://mygraph2.com/pricing/#QVal1> <price1>  1 ;                    <price3> 5 .
+    <http://mygraph2.com/pricing/#QVal2>                  <price2> 1 ;    <price3> 4 .
+    <http://mygraph2.com/pricing/#QVal3> <price1>  6 ;    <price2> 2                 .
+  };
+    
+Insert into <http://mygraph.com>, 6 (or less) triples -- done
+No. of rows in result: 1
+ 	
+SQL> SPARQL SELECT ?s, (bif:__min_notnull (?pr1, ?pr2, ?pr3)) 
+FROM <http://mygraph.com>
+WHERE 
+  {
+    { 
+      SELECT DISTINCT ?s
+      WHERE 
+        {
+          ?s ?p ?pr .
+          FILTER (?p in (<price1>, <price2>, <price3>)) 
+        } 
+    }
+    OPTIONAL { ?s <price1> ?pr1 }
+    OPTIONAL { ?s <price2> ?pr2 }
+    OPTIONAL { ?s <price3> ?pr3 }
+  };
+  
+Query result:
+s                                     callret-1
+VARCHAR 	                            VARCHAR
+_______________________________________________
+http://mygraph2.com/pricing/#QVal2	 1
+http://mygraph2.com/pricing/#QVal1	 1
+http://mygraph2.com/pricing/#QVal3	 2
+
+No. of rows in result: 2	
+]]></programlisting> 
+  </example>
+  </refsect1>
+    <refsect1 id="seealso___min_notnull">
+    <title>See Also</title>
+    <para><link linkend="fn_nm_max"><function>__max</function></link></para>    
+    <para><link linkend="fn_nm_min"><function>__min</function></link></para>
+    <para><link linkend="fn_nm_max_notnull"><function>__max_notnull</function></link></para>    
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/nntp_auth_get.xml b/docsrc/xmlsource/funcref/nntp_auth_get.xml
index 804b91b..0a8086a 100644
--- a/docsrc/xmlsource/funcref/nntp_auth_get.xml
+++ b/docsrc/xmlsource/funcref/nntp_auth_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/nntp_auth_post.xml b/docsrc/xmlsource/funcref/nntp_auth_post.xml
index a9ecd88..add1889 100644
--- a/docsrc/xmlsource/funcref/nntp_auth_post.xml
+++ b/docsrc/xmlsource/funcref/nntp_auth_post.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/nntp_get.xml b/docsrc/xmlsource/funcref/nntp_get.xml
index bb31363..e5f3286 100644
--- a/docsrc/xmlsource/funcref/nntp_get.xml
+++ b/docsrc/xmlsource/funcref/nntp_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/nntp_post.xml b/docsrc/xmlsource/funcref/nntp_post.xml
index ea7588c..3b6ae91 100644
--- a/docsrc/xmlsource/funcref/nntp_post.xml
+++ b/docsrc/xmlsource/funcref/nntp_post.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/now.xml b/docsrc/xmlsource/funcref/now.xml
index 401fcfc..ff39fab 100644
--- a/docsrc/xmlsource/funcref/now.xml
+++ b/docsrc/xmlsource/funcref/now.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/openxml.xml b/docsrc/xmlsource/funcref/openxml.xml
index 87ebc26..bbd002d 100644
--- a/docsrc/xmlsource/funcref/openxml.xml
+++ b/docsrc/xmlsource/funcref/openxml.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/os_chmod.xml b/docsrc/xmlsource/funcref/os_chmod.xml
index f5c3c85..1874025 100644
--- a/docsrc/xmlsource/funcref/os_chmod.xml
+++ b/docsrc/xmlsource/funcref/os_chmod.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/os_chown.xml b/docsrc/xmlsource/funcref/os_chown.xml
index 3fcf029..4dd0933 100644
--- a/docsrc/xmlsource/funcref/os_chown.xml
+++ b/docsrc/xmlsource/funcref/os_chown.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/pem_certificates_to_array.xml b/docsrc/xmlsource/funcref/pem_certificates_to_array.xml
index 815dcad..506f1ab 100644
--- a/docsrc/xmlsource/funcref/pem_certificates_to_array.xml
+++ b/docsrc/xmlsource/funcref/pem_certificates_to_array.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/pldbg_stats.xml b/docsrc/xmlsource/funcref/pldbg_stats.xml
index 3716c75..fd58635 100644
--- a/docsrc/xmlsource/funcref/pldbg_stats.xml
+++ b/docsrc/xmlsource/funcref/pldbg_stats.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/pldbg_stats_load.xml b/docsrc/xmlsource/funcref/pldbg_stats_load.xml
index 5c964e5..66c2eb9 100644
--- a/docsrc/xmlsource/funcref/pldbg_stats_load.xml
+++ b/docsrc/xmlsource/funcref/pldbg_stats_load.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/pop3_get.xml b/docsrc/xmlsource/funcref/pop3_get.xml
index b009344..d46f302 100644
--- a/docsrc/xmlsource/funcref/pop3_get.xml
+++ b/docsrc/xmlsource/funcref/pop3_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/position.xml b/docsrc/xmlsource/funcref/position.xml
index 599c4f4..d4edf6d 100644
--- a/docsrc/xmlsource/funcref/position.xml
+++ b/docsrc/xmlsource/funcref/position.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/power.xml b/docsrc/xmlsource/funcref/power.xml
index 0513822..3a75792 100644
--- a/docsrc/xmlsource/funcref/power.xml
+++ b/docsrc/xmlsource/funcref/power.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/prof_enable.xml b/docsrc/xmlsource/funcref/prof_enable.xml
index 5d374f3..1bf0ae6 100644
--- a/docsrc/xmlsource/funcref/prof_enable.xml
+++ b/docsrc/xmlsource/funcref/prof_enable.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/prof_sample.xml b/docsrc/xmlsource/funcref/prof_sample.xml
index 3ce50d5..2504b4b 100644
--- a/docsrc/xmlsource/funcref/prof_sample.xml
+++ b/docsrc/xmlsource/funcref/prof_sample.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/quarter.xml b/docsrc/xmlsource/funcref/quarter.xml
index a1d2110..2071f82 100644
--- a/docsrc/xmlsource/funcref/quarter.xml
+++ b/docsrc/xmlsource/funcref/quarter.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/quote_dotted.xml b/docsrc/xmlsource/funcref/quote_dotted.xml
index 7d41d0e..9664517 100644
--- a/docsrc/xmlsource/funcref/quote_dotted.xml
+++ b/docsrc/xmlsource/funcref/quote_dotted.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/randomize.xml b/docsrc/xmlsource/funcref/randomize.xml
index fde82b6..8cb2aae 100644
--- a/docsrc/xmlsource/funcref/randomize.xml
+++ b/docsrc/xmlsource/funcref/randomize.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rclose.xml b/docsrc/xmlsource/funcref/rclose.xml
index 842d8c0..c25dc3b 100644
--- a/docsrc/xmlsource/funcref/rclose.xml
+++ b/docsrc/xmlsource/funcref/rclose.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_64bit_upgrade.xml b/docsrc/xmlsource/funcref/rdf_64bit_upgrade.xml
index 22d6dfc..1cb92c3 100644
--- a/docsrc/xmlsource/funcref/rdf_64bit_upgrade.xml
+++ b/docsrc/xmlsource/funcref/rdf_64bit_upgrade.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_audit_metadata.xml b/docsrc/xmlsource/funcref/rdf_audit_metadata.xml
index 2b041a8..c7d3f4e 100644
--- a/docsrc/xmlsource/funcref/rdf_audit_metadata.xml
+++ b/docsrc/xmlsource/funcref/rdf_audit_metadata.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_backup_metadata.xml b/docsrc/xmlsource/funcref/rdf_backup_metadata.xml
index 8fb6910..72950b7 100644
--- a/docsrc/xmlsource/funcref/rdf_backup_metadata.xml
+++ b/docsrc/xmlsource/funcref/rdf_backup_metadata.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -28,7 +28,7 @@
   </refmeta>
   <refnamediv>
     <refname>DB.DBA.RDF_BACKUP_METADATA</refname>
-    <refpurpose>Makes a backup copy of RDF metadata (i.e., descriptions of RDF Views and the like).</refpurpose>
+    <refpurpose>Makes a backup copy of RDF metadata (i.e., descriptions of Linked Data Views and the like).</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <funcsynopsis id="fsyn_rdf_backup_metadata">
diff --git a/docsrc/xmlsource/funcref/rdf_convert_rdfxml_to_ttl.xml b/docsrc/xmlsource/funcref/rdf_convert_rdfxml_to_ttl.xml
index aabc4f0..c0da451 100644
--- a/docsrc/xmlsource/funcref/rdf_convert_rdfxml_to_ttl.xml
+++ b/docsrc/xmlsource/funcref/rdf_convert_rdfxml_to_ttl.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
 
-  $Id: rdf_convert_rdfxml_to_ttl.xml,v 1.1 2008/03/19 20:12:43 source Exp $
+  $Id: rdf_convert_rdfxml_to_ttl.xml,v 1.1.2.1 2012/03/07 15:29:01 source Exp $
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2008 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_datatype_of_obj.xml b/docsrc/xmlsource/funcref/rdf_datatype_of_obj.xml
new file mode 100644
index 0000000..ff8165d
--- /dev/null
+++ b/docsrc/xmlsource/funcref/rdf_datatype_of_obj.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_rdf_datatype_of_obj">
+  <refmeta>
+    <refentrytitle>DB.DBA.RDF_DATATYPE_OF_OBJ</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>DB.DBA.RDF_DATATYPE_OF_OBJ</refname>
+    <refpurpose>Returns the datatype of a given argument.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_rdf_datatype_of_obj">
+      <funcprototype id="fproto_rdf_datatype_of_obj">
+        <funcdef><function>DB.DBA.RDF_DATATYPE_OF_OBJ</function></funcdef>
+	<paramdef>in <parameter>arg</parameter> any</paramdef>
+	<paramdef><optional>in <parameter>type_val</parameter> any</optional></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_rdf_datatype_of_obj">
+    <title>Description</title>
+    <para>Returns the datatype of a given argument.</para>
+  </refsect1>
+  <refsect1 id="params_rdf_datatype_of_obj">
+    <title>Parameters</title>
+    <refsect2><title>arg</title>
+      <para>The argument which datatype should be returned.</para>
+    </refsect2>
+    <refsect2><title>type_val</title>
+      <para>The value to be returned for untyped literal arguments. When omitted, its default value 
+      	http://www.w3.org/2001/XMLSchema#string is used.
+      </para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_rdf_datatype_of_obj"><title>Return Types</title>
+    <para>any</para>
+  </refsect1>
+  <refsect1 id="examples_rdf_datatype_of_obj">
+   <title>Examples</title>
+    <example id="ex_rdf_datatype_of_obj"><title></title>
+<programlisting><![CDATA[
+# Explicit typecast (insert) 
+SQL> sparql insert into <test_datatype> { <a> <string> "string 1"^^xsd:string . };
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Insert into <test_datatype>, 1 (or less) triples -- done
+
+1 Rows. -- 94 msec.
+
+
+#Not explicit typecast (insert)
+SQL> sparql insert into <test_datatype> { <a> <string> "string 2". };
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Insert into <test_datatype>, 1 (or less) triples -- done
+
+1 Rows. -- 16 msec.
+
+SQL> SPARQL 
+SELECT ?o (iri(sql:RDF_DATATYPE_OF_OBJ(?o, 'untyped!'))) 
+FROM <test_datatype> { <a> <string> ?o} ;
+o                       callret-1
+VARCHAR                 VARCHAR
+_______________________________________________________________________________
+
+string 1                http://www.w3.org/2001/XMLSchema#string 
+string 2                untyped!
+
+2 Rows. -- 16 msec.
+SQL>	
+]]></programlisting>
+    </example>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/rdf_graph_group_create.xml b/docsrc/xmlsource/funcref/rdf_graph_group_create.xml
index e7cb219..c4e4f16 100644
--- a/docsrc/xmlsource/funcref/rdf_graph_group_create.xml
+++ b/docsrc/xmlsource/funcref/rdf_graph_group_create.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -
- -  $Id: rdf_graph_group_create.xml,v 1.1.2.2 2009/05/05 14:10:10 source Exp $
+ -  $Id: rdf_graph_group_create.xml,v 1.1.2.3 2012/03/07 15:29:01 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_graph_group_ins.xml b/docsrc/xmlsource/funcref/rdf_graph_group_ins.xml
index 177d8ad..4b402c6 100644
--- a/docsrc/xmlsource/funcref/rdf_graph_group_ins.xml
+++ b/docsrc/xmlsource/funcref/rdf_graph_group_ins.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
  -
- -  $Id: rdf_graph_group_ins.xml,v 1.1.2.2 2009/05/05 14:10:10 source Exp $
+ -  $Id: rdf_graph_group_ins.xml,v 1.1.2.3 2012/03/07 15:29:01 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_load_rdfa.xml b/docsrc/xmlsource/funcref/rdf_load_rdfa.xml
index 7e7a7a8..57533c3 100644
--- a/docsrc/xmlsource/funcref/rdf_load_rdfa.xml
+++ b/docsrc/xmlsource/funcref/rdf_load_rdfa.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -64,7 +64,7 @@
     <example id="ex_rdf_load_rdfa"><title></title>
       <para>Load from local file:</para>
       <screen><![CDATA[
-SQL>sparql drop graph <http://virtuoso.openlinksw.com/example>;
+SQL>sparql clear graph <http://virtuoso.openlinksw.com/example>;
 Done. -- 2 msec.
 SQL>DB.DBA.RDF_LOAD_RDFA (file_to_string ('pricing.html'), 'http://virtuoso.openlinksw.com/pricing/#', 'http://virtuoso.openlinksw.com/example');
 Done. -- 106 msec.
@@ -72,6 +72,7 @@ Done. -- 106 msec.
 </screen>
     <para>Load from URI:</para> 
 <screen><![CDATA[
+SQL>sparql clear graph <http://virtuoso.openlinksw.com/example>;
 SQL> DB.DBA.RDF_LOAD_RDFA (http_get('http://virtuoso.openlinksw.com/pricing/'), 'http://virtuoso.openlinksw.com/pricing/#', 'http://virtuoso.openlinksw.com/example');
 Done. -- 109 msec.
 
diff --git a/docsrc/xmlsource/funcref/rdf_load_rdfxml.xml b/docsrc/xmlsource/funcref/rdf_load_rdfxml.xml
index 9226b65..a0aec97 100644
--- a/docsrc/xmlsource/funcref/rdf_load_rdfxml.xml
+++ b/docsrc/xmlsource/funcref/rdf_load_rdfxml.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_load_turtle.xml b/docsrc/xmlsource/funcref/rdf_load_turtle.xml
index 68530ef..3c95485 100644
--- a/docsrc/xmlsource/funcref/rdf_load_turtle.xml
+++ b/docsrc/xmlsource/funcref/rdf_load_turtle.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_repl_graph_del.xml b/docsrc/xmlsource/funcref/rdf_repl_graph_del.xml
index 15111d6..683e9c1 100644
--- a/docsrc/xmlsource/funcref/rdf_repl_graph_del.xml
+++ b/docsrc/xmlsource/funcref/rdf_repl_graph_del.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_repl_graph_ins.xml b/docsrc/xmlsource/funcref/rdf_repl_graph_ins.xml
index 7157ec6..d27722b 100644
--- a/docsrc/xmlsource/funcref/rdf_repl_graph_ins.xml
+++ b/docsrc/xmlsource/funcref/rdf_repl_graph_ins.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -51,11 +51,18 @@ more than one.
     </refsect2>
   </refsect1>
   <refsect1 id="examples_rdf_repl_graph_ins"><title>Example</title>
-    <example id="ex_rdf_repl_graph_ins"><title>Insert graph to RDF replication</title>
+    <example id="rdf_repl_graph_ins_ex1"><title>Insert graph to RDF replication</title>
       <screen>
 SQL> DB.DBA.RDF_RDF_REPL_GRAPH_INS ('http://test.org');
       </screen>
     </example>
+    <example id="rdf_repl_graph_ins_ex2"><title>Replicate all graphs</title>
+      <para>To replicate all graphs ( except the system graph http://www.openlinksw.com/schemas/virtrdf# ), 
+      	one should use http://www.openlinksw.com/schemas/virtrdf#rdf_repl_all as graph IRI:</para>        	
+<programlisting><![CDATA[
+SQL> DB.DBA.RDF_RDF_REPL_GRAPH_INS ('http://www.openlinksw.com/schemas/virtrdf#rdf_repl_all');
+]]></programlisting>
+    </example>
   </refsect1>
   <refsect1 id="seealso_rdf_repl_graph_ins"><title>See Also</title>
      <para><link linkend="fn_rdf_repl_start"><function>RDF_REPL_START()</function></link></para>  
diff --git a/docsrc/xmlsource/funcref/rdf_repl_start.xml b/docsrc/xmlsource/funcref/rdf_repl_start.xml
index a87da15..a280707 100644
--- a/docsrc/xmlsource/funcref/rdf_repl_start.xml
+++ b/docsrc/xmlsource/funcref/rdf_repl_start.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rdf_restore_metadata.xml b/docsrc/xmlsource/funcref/rdf_restore_metadata.xml
index c5a1672..bc6d3c3 100644
--- a/docsrc/xmlsource/funcref/rdf_restore_metadata.xml
+++ b/docsrc/xmlsource/funcref/rdf_restore_metadata.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -28,7 +28,7 @@
   </refmeta>
   <refnamediv>
     <refname>DB.DBA.RDF_RESTORE_METADATA</refname>
-    <refpurpose>Restores RDF metadata (descriptions of RDF Views and the like) from previously saved backup.</refpurpose>
+    <refpurpose>Restores RDF metadata (descriptions of Linked Data Views and the like) from previously saved backup.</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <funcsynopsis id="fsyn_rdf_restore_metadata">
diff --git a/docsrc/xmlsource/funcref/rdf_view_sync_to_physical.xml b/docsrc/xmlsource/funcref/rdf_view_sync_to_physical.xml
new file mode 100644
index 0000000..a000fae
--- /dev/null
+++ b/docsrc/xmlsource/funcref/rdf_view_sync_to_physical.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<refentry id="fn_rdf_view_sync_to_physical">
+  <refmeta>
+    <refentrytitle>RDF_VIEW_SYNC_TO_PHYSICAL</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>RDF_VIEW_SYNC_TO_PHYSICAL</refname>
+    <refpurpose>Performs two actions: do triggers on a liked data view and optionally fill 
+    	the physical graph.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_rdf_view_sync_to_physical">
+      <funcprototype id="fproto_rdf_view_sync_to_physical">
+        <funcdef><function>RDF_VIEW_SYNC_TO_PHYSICAL</function></funcdef>
+	<paramdef>in <parameter>vgraph</parameter> varchar</paramdef>
+	<paramdef>in <parameter>load_data</parameter> int := 0</paramdef>
+	<paramdef>in <parameter>pgraph</parameter> varchar := null</paramdef>
+	<paramdef>in <parameter>log_mode</parameter> int := 1</paramdef>
+  <paramdef>in <parameter>load_atomic</parameter> int := 1</paramdef>	
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_rdf_view_sync_to_physical">
+    <title>Description</title>
+    <para>This function does triggers on a liked data view and optionally fills the 
+    	physical graph. Note: applicable for Virtuoso 6.0 and higher.</para>
+  </refsect1>
+  <refsect1 id="params_rdf_view_sync_to_physical">
+    <title>Parameters</title>
+    <refsect2><title>vgraph</title>
+      <para>The graph which linked data view defines.</para>
+    </refsect2>
+    <refsect2><title>load_data</title>
+      <para>1/0 flag to load the triples in the physical store initially.</para>
+    </refsect2>
+    <refsect2><title>pgraph</title>
+      <para>The destination's physical graph.</para>
+    </refsect2>
+    <refsect2><title>log_mode</title>
+      <para>This parameter takes integer values: 0,1,2,3. It is used to call log_enable () 
+      	with the same flags.</para>
+    </refsect2>
+    <refsect2><title>load_atomic</title>
+      <para>This parameter should be set in order to run loading the data in atomic mode. Will 
+      	do a checkpoint when done. This mode is default to handle large tables.</para>
+    </refsect2>    
+  </refsect1>
+  <refsect1 id="ret_rdf_view_sync_to_physical"><title>Return Types</title>
+    <para>any</para>
+  </refsect1>
+  <refsect1 id="examples_rdf_view_sync_to_physical">
+   <title>Examples</title>
+    <example id="ex_rdf_view_sync_to_physical"><title></title>
+     <para></para>
+<screen><![CDATA[
+SQL>RDF_VIEW_SYNC_TO_PHYSICAL ('http://www.openlinksw.com/schemas/oplweb#', 0, 'http://mygraph.com', 1, 1);
+
+Done. -- 0 msec.
+]]></screen>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_rdf_view_sync_to_physical">
+    <title>See Also</title>
+    <para><link linkend="fn_rdf_audit_metadata"><function>DB.DBA.RDF_AUDIT_METADATA</function></link></para>
+    <para><link linkend="fn_rdf_backup_metadata"><function>DB.DBA.RDF_BACKUP_METADATA</function></link></para>
+    <para><link linkend="fn_rdf_load_rdfxml_mt"><function>DB.DBA.RDF_LOAD_RDFXML_MT</function></link></para>
+    <para><link linkend="fn_ttlp"><function>DB.DBA.TTLP</function></link></para>
+    <para><link linkend="fn_ttlp_mt"><function>DB.DBA.TTLP_MT</function></link></para>
+    <para><link linkend="fn_rdf_triples_to_rdf_xml_text"><function>DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT</function></link></para>
+    <para><link linkend="fn_sparql_rexec"><function>DB.DBA.SPARQL_REXEC</function></link></para>
+    <para><link linkend="fn_sparql_rexec_to_array"><function>DB.DBA.SPARQL_REXEC_TO_ARRAY</function></link></para>
+    <para><link linkend="fn_sparql_rexec_with_meta"><function>DB.DBA.SPARQL_REXEC_WITH_META</function></link></para>
+    <para><link linkend="fn_rdf_quad_uri"><function>DB.DBA.RDF_QUAD_URI</function></link></para>
+    <para><link linkend="fn_rdf_quad_uri_l_typed"><function>DB.DBA.RDF_QUAD_URI_L_TYPED</function></link></para>
+    <para><link linkend="fn_rdf_ttl2hash"><function>DB.DBA.RDF_TTL2HASH</function></link></para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/rdfs_rule_set.xml b/docsrc/xmlsource/funcref/rdfs_rule_set.xml
index 3c3bfdb..55fbccf 100644
--- a/docsrc/xmlsource/funcref/rdfs_rule_set.xml
+++ b/docsrc/xmlsource/funcref/rdfs_rule_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regexp_instr.xml b/docsrc/xmlsource/funcref/regexp_instr.xml
index e95f168..56e7035 100644
--- a/docsrc/xmlsource/funcref/regexp_instr.xml
+++ b/docsrc/xmlsource/funcref/regexp_instr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regexp_like.xml b/docsrc/xmlsource/funcref/regexp_like.xml
index 98a2123..c063779 100644
--- a/docsrc/xmlsource/funcref/regexp_like.xml
+++ b/docsrc/xmlsource/funcref/regexp_like.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regexp_match.xml b/docsrc/xmlsource/funcref/regexp_match.xml
index 70ac4b2..1a0a851 100644
--- a/docsrc/xmlsource/funcref/regexp_match.xml
+++ b/docsrc/xmlsource/funcref/regexp_match.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regexp_parse.xml b/docsrc/xmlsource/funcref/regexp_parse.xml
index cb76b56..f8d6f3d 100644
--- a/docsrc/xmlsource/funcref/regexp_parse.xml
+++ b/docsrc/xmlsource/funcref/regexp_parse.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regexp_replace.xml b/docsrc/xmlsource/funcref/regexp_replace.xml
index c09ae2f..07b1a70 100644
--- a/docsrc/xmlsource/funcref/regexp_replace.xml
+++ b/docsrc/xmlsource/funcref/regexp_replace.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regexp_substr.xml b/docsrc/xmlsource/funcref/regexp_substr.xml
index 5caf503..5c98979 100644
--- a/docsrc/xmlsource/funcref/regexp_substr.xml
+++ b/docsrc/xmlsource/funcref/regexp_substr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/registry_get.xml b/docsrc/xmlsource/funcref/registry_get.xml
index 7bb8a3e..2940c72 100644
--- a/docsrc/xmlsource/funcref/registry_get.xml
+++ b/docsrc/xmlsource/funcref/registry_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/registry_get_all.xml b/docsrc/xmlsource/funcref/registry_get_all.xml
index f935b9a..c16a318 100644
--- a/docsrc/xmlsource/funcref/registry_get_all.xml
+++ b/docsrc/xmlsource/funcref/registry_get_all.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/registry_name_is_protected.xml b/docsrc/xmlsource/funcref/registry_name_is_protected.xml
index e0de923..9adb57c 100644
--- a/docsrc/xmlsource/funcref/registry_name_is_protected.xml
+++ b/docsrc/xmlsource/funcref/registry_name_is_protected.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/registry_remove.xml b/docsrc/xmlsource/funcref/registry_remove.xml
index 3189843..422576b 100644
--- a/docsrc/xmlsource/funcref/registry_remove.xml
+++ b/docsrc/xmlsource/funcref/registry_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/registry_set.xml b/docsrc/xmlsource/funcref/registry_set.xml
index 8977ad4..3bd79d1 100644
--- a/docsrc/xmlsource/funcref/registry_set.xml
+++ b/docsrc/xmlsource/funcref/registry_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_avgx.xml b/docsrc/xmlsource/funcref/regr_avgx.xml
index 374f1d9..bbce06c 100644
--- a/docsrc/xmlsource/funcref/regr_avgx.xml
+++ b/docsrc/xmlsource/funcref/regr_avgx.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_avgy.xml b/docsrc/xmlsource/funcref/regr_avgy.xml
index 6b08b32..0613b39 100644
--- a/docsrc/xmlsource/funcref/regr_avgy.xml
+++ b/docsrc/xmlsource/funcref/regr_avgy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_count.xml b/docsrc/xmlsource/funcref/regr_count.xml
index 8099a68..3fae6bb 100644
--- a/docsrc/xmlsource/funcref/regr_count.xml
+++ b/docsrc/xmlsource/funcref/regr_count.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_intercept.xml b/docsrc/xmlsource/funcref/regr_intercept.xml
index 79d0f8b..75f7b3c 100644
--- a/docsrc/xmlsource/funcref/regr_intercept.xml
+++ b/docsrc/xmlsource/funcref/regr_intercept.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_r2.xml b/docsrc/xmlsource/funcref/regr_r2.xml
index 0f75050..e3b20da 100644
--- a/docsrc/xmlsource/funcref/regr_r2.xml
+++ b/docsrc/xmlsource/funcref/regr_r2.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_slope.xml b/docsrc/xmlsource/funcref/regr_slope.xml
index b39b45e..0e07507 100644
--- a/docsrc/xmlsource/funcref/regr_slope.xml
+++ b/docsrc/xmlsource/funcref/regr_slope.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_sxx.xml b/docsrc/xmlsource/funcref/regr_sxx.xml
index 351f80d..1b3a726 100644
--- a/docsrc/xmlsource/funcref/regr_sxx.xml
+++ b/docsrc/xmlsource/funcref/regr_sxx.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_sxy.xml b/docsrc/xmlsource/funcref/regr_sxy.xml
index 5790ccc..5a4e9f0 100644
--- a/docsrc/xmlsource/funcref/regr_sxy.xml
+++ b/docsrc/xmlsource/funcref/regr_sxy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/regr_syy.xml b/docsrc/xmlsource/funcref/regr_syy.xml
index 4a3def3..e918cd6 100644
--- a/docsrc/xmlsource/funcref/regr_syy.xml
+++ b/docsrc/xmlsource/funcref/regr_syy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repeat.xml b/docsrc/xmlsource/funcref/repeat.xml
index 3c6d97a..34287b1 100644
--- a/docsrc/xmlsource/funcref/repeat.xml
+++ b/docsrc/xmlsource/funcref/repeat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_disconnect.xml b/docsrc/xmlsource/funcref/repl_disconnect.xml
index 48d233a..45887ad 100644
--- a/docsrc/xmlsource/funcref/repl_disconnect.xml
+++ b/docsrc/xmlsource/funcref/repl_disconnect.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_grant.xml b/docsrc/xmlsource/funcref/repl_grant.xml
index c011385..2cea7e7 100644
--- a/docsrc/xmlsource/funcref/repl_grant.xml
+++ b/docsrc/xmlsource/funcref/repl_grant.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_init_copy.xml b/docsrc/xmlsource/funcref/repl_init_copy.xml
index 7cf9891..4f12cbb 100644
--- a/docsrc/xmlsource/funcref/repl_init_copy.xml
+++ b/docsrc/xmlsource/funcref/repl_init_copy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_new_log.xml b/docsrc/xmlsource/funcref/repl_new_log.xml
index 19e0f5b..a114037 100644
--- a/docsrc/xmlsource/funcref/repl_new_log.xml
+++ b/docsrc/xmlsource/funcref/repl_new_log.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_pub_add.xml b/docsrc/xmlsource/funcref/repl_pub_add.xml
index a9e21e8..e0ad893 100644
--- a/docsrc/xmlsource/funcref/repl_pub_add.xml
+++ b/docsrc/xmlsource/funcref/repl_pub_add.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_pub_init_image.xml b/docsrc/xmlsource/funcref/repl_pub_init_image.xml
index 11d1038..885ad66 100644
--- a/docsrc/xmlsource/funcref/repl_pub_init_image.xml
+++ b/docsrc/xmlsource/funcref/repl_pub_init_image.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_pub_remove.xml b/docsrc/xmlsource/funcref/repl_pub_remove.xml
index cc72143..4476c45 100644
--- a/docsrc/xmlsource/funcref/repl_pub_remove.xml
+++ b/docsrc/xmlsource/funcref/repl_pub_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_publish.xml b/docsrc/xmlsource/funcref/repl_publish.xml
index 61a11f2..e67c9c7 100644
--- a/docsrc/xmlsource/funcref/repl_publish.xml
+++ b/docsrc/xmlsource/funcref/repl_publish.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_purge.xml b/docsrc/xmlsource/funcref/repl_purge.xml
index 9768c4d..a7e1bb9 100644
--- a/docsrc/xmlsource/funcref/repl_purge.xml
+++ b/docsrc/xmlsource/funcref/repl_purge.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_revoke.xml b/docsrc/xmlsource/funcref/repl_revoke.xml
index 4517b1a..a3383e0 100644
--- a/docsrc/xmlsource/funcref/repl_revoke.xml
+++ b/docsrc/xmlsource/funcref/repl_revoke.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_sched_init.xml b/docsrc/xmlsource/funcref/repl_sched_init.xml
index b55a863..f306be8 100644
--- a/docsrc/xmlsource/funcref/repl_sched_init.xml
+++ b/docsrc/xmlsource/funcref/repl_sched_init.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_server.xml b/docsrc/xmlsource/funcref/repl_server.xml
index 833f7e6..e3a3948 100644
--- a/docsrc/xmlsource/funcref/repl_server.xml
+++ b/docsrc/xmlsource/funcref/repl_server.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_server_rename.xml b/docsrc/xmlsource/funcref/repl_server_rename.xml
index 7481734..a575b9d 100644
--- a/docsrc/xmlsource/funcref/repl_server_rename.xml
+++ b/docsrc/xmlsource/funcref/repl_server_rename.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_stat.xml b/docsrc/xmlsource/funcref/repl_stat.xml
index d894144..5c07fba 100644
--- a/docsrc/xmlsource/funcref/repl_stat.xml
+++ b/docsrc/xmlsource/funcref/repl_stat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_status.xml b/docsrc/xmlsource/funcref/repl_status.xml
index a03c46b..6460030 100644
--- a/docsrc/xmlsource/funcref/repl_status.xml
+++ b/docsrc/xmlsource/funcref/repl_status.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_subscribe.xml b/docsrc/xmlsource/funcref/repl_subscribe.xml
index 15a3fb7..8c7d381 100644
--- a/docsrc/xmlsource/funcref/repl_subscribe.xml
+++ b/docsrc/xmlsource/funcref/repl_subscribe.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_sync.xml b/docsrc/xmlsource/funcref/repl_sync.xml
index 207fdfc..47e05bf 100644
--- a/docsrc/xmlsource/funcref/repl_sync.xml
+++ b/docsrc/xmlsource/funcref/repl_sync.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_sync_all.xml b/docsrc/xmlsource/funcref/repl_sync_all.xml
index 2d5e7ac..8a82bb7 100644
--- a/docsrc/xmlsource/funcref/repl_sync_all.xml
+++ b/docsrc/xmlsource/funcref/repl_sync_all.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_text.xml b/docsrc/xmlsource/funcref/repl_text.xml
index f872528..05dad87 100644
--- a/docsrc/xmlsource/funcref/repl_text.xml
+++ b/docsrc/xmlsource/funcref/repl_text.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_this_server.xml b/docsrc/xmlsource/funcref/repl_this_server.xml
index a93fe91..19d003f 100644
--- a/docsrc/xmlsource/funcref/repl_this_server.xml
+++ b/docsrc/xmlsource/funcref/repl_this_server.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_unpublish.xml b/docsrc/xmlsource/funcref/repl_unpublish.xml
index 3e8fdef..d447865 100644
--- a/docsrc/xmlsource/funcref/repl_unpublish.xml
+++ b/docsrc/xmlsource/funcref/repl_unpublish.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/repl_unsubscribe.xml b/docsrc/xmlsource/funcref/repl_unsubscribe.xml
index f057178..ffcecb6 100644
--- a/docsrc/xmlsource/funcref/repl_unsubscribe.xml
+++ b/docsrc/xmlsource/funcref/repl_unsubscribe.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/replace.xml b/docsrc/xmlsource/funcref/replace.xml
index e7042d5..e09a109 100644
--- a/docsrc/xmlsource/funcref/replace.xml
+++ b/docsrc/xmlsource/funcref/replace.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/replay.xml b/docsrc/xmlsource/funcref/replay.xml
index 5ad9f5f..fc5131f 100644
--- a/docsrc/xmlsource/funcref/replay.xml
+++ b/docsrc/xmlsource/funcref/replay.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/result.xml b/docsrc/xmlsource/funcref/result.xml
index 3c3b57e..330473f 100644
--- a/docsrc/xmlsource/funcref/result.xml
+++ b/docsrc/xmlsource/funcref/result.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/result_names.xml b/docsrc/xmlsource/funcref/result_names.xml
index 999e49f..bfc468e 100644
--- a/docsrc/xmlsource/funcref/result_names.xml
+++ b/docsrc/xmlsource/funcref/result_names.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rexecute.xml b/docsrc/xmlsource/funcref/rexecute.xml
index 1629ac5..5a578f2 100644
--- a/docsrc/xmlsource/funcref/rexecute.xml
+++ b/docsrc/xmlsource/funcref/rexecute.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/right.xml b/docsrc/xmlsource/funcref/right.xml
index 17d0f0d..0e026ff 100644
--- a/docsrc/xmlsource/funcref/right.xml
+++ b/docsrc/xmlsource/funcref/right.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rmoreresults.xml b/docsrc/xmlsource/funcref/rmoreresults.xml
index da4a826..1b11782 100644
--- a/docsrc/xmlsource/funcref/rmoreresults.xml
+++ b/docsrc/xmlsource/funcref/rmoreresults.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rnd.xml b/docsrc/xmlsource/funcref/rnd.xml
index 164bb87..8cc6f7b 100644
--- a/docsrc/xmlsource/funcref/rnd.xml
+++ b/docsrc/xmlsource/funcref/rnd.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rnext.xml b/docsrc/xmlsource/funcref/rnext.xml
index 55794b2..7c12f8b 100644
--- a/docsrc/xmlsource/funcref/rnext.xml
+++ b/docsrc/xmlsource/funcref/rnext.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/row_count.xml b/docsrc/xmlsource/funcref/row_count.xml
index a8e8091..50e1490 100644
--- a/docsrc/xmlsource/funcref/row_count.xml
+++ b/docsrc/xmlsource/funcref/row_count.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rowvector_digit_sort.xml b/docsrc/xmlsource/funcref/rowvector_digit_sort.xml
index 125767f..b490f21 100644
--- a/docsrc/xmlsource/funcref/rowvector_digit_sort.xml
+++ b/docsrc/xmlsource/funcref/rowvector_digit_sort.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2009 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rstmtexec.xml b/docsrc/xmlsource/funcref/rstmtexec.xml
index 729da38..5da89c0 100644
--- a/docsrc/xmlsource/funcref/rstmtexec.xml
+++ b/docsrc/xmlsource/funcref/rstmtexec.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/rtrim.xml b/docsrc/xmlsource/funcref/rtrim.xml
index cc81f12..75e8f61 100644
--- a/docsrc/xmlsource/funcref/rtrim.xml
+++ b/docsrc/xmlsource/funcref/rtrim.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/search_excerpt.xml b/docsrc/xmlsource/funcref/search_excerpt.xml
index b45c741..413f3c0 100644
--- a/docsrc/xmlsource/funcref/search_excerpt.xml
+++ b/docsrc/xmlsource/funcref/search_excerpt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/second.xml b/docsrc/xmlsource/funcref/second.xml
index 5ebb1e9..c7dc82b 100644
--- a/docsrc/xmlsource/funcref/second.xml
+++ b/docsrc/xmlsource/funcref/second.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sequence_get_all.xml b/docsrc/xmlsource/funcref/sequence_get_all.xml
index 1935993..8d59624 100644
--- a/docsrc/xmlsource/funcref/sequence_get_all.xml
+++ b/docsrc/xmlsource/funcref/sequence_get_all.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sequence_next.xml b/docsrc/xmlsource/funcref/sequence_next.xml
index fc4a80e8..320868a 100644
--- a/docsrc/xmlsource/funcref/sequence_next.xml
+++ b/docsrc/xmlsource/funcref/sequence_next.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sequence_remove.xml b/docsrc/xmlsource/funcref/sequence_remove.xml
index ddce1b8..2b940ad 100644
--- a/docsrc/xmlsource/funcref/sequence_remove.xml
+++ b/docsrc/xmlsource/funcref/sequence_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sequence_set.xml b/docsrc/xmlsource/funcref/sequence_set.xml
index 6f5f385..226c2c7 100644
--- a/docsrc/xmlsource/funcref/sequence_set.xml
+++ b/docsrc/xmlsource/funcref/sequence_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/serialize.xml b/docsrc/xmlsource/funcref/serialize.xml
index 5bbecc5..12e7599 100644
--- a/docsrc/xmlsource/funcref/serialize.xml
+++ b/docsrc/xmlsource/funcref/serialize.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/serialize_to_UTF8_xml.xml b/docsrc/xmlsource/funcref/serialize_to_UTF8_xml.xml
index bad9fb2..a02c555 100644
--- a/docsrc/xmlsource/funcref/serialize_to_UTF8_xml.xml
+++ b/docsrc/xmlsource/funcref/serialize_to_UTF8_xml.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/serv_queue_top.xml b/docsrc/xmlsource/funcref/serv_queue_top.xml
index a2366a6..97d348e 100644
--- a/docsrc/xmlsource/funcref/serv_queue_top.xml
+++ b/docsrc/xmlsource/funcref/serv_queue_top.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/server_root.xml b/docsrc/xmlsource/funcref/server_root.xml
index 4e7b39b..5a45bdf 100644
--- a/docsrc/xmlsource/funcref/server_root.xml
+++ b/docsrc/xmlsource/funcref/server_root.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ses_connect.xml b/docsrc/xmlsource/funcref/ses_connect.xml
index 5262bf8..142d440 100644
--- a/docsrc/xmlsource/funcref/ses_connect.xml
+++ b/docsrc/xmlsource/funcref/ses_connect.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ses_disconnect.xml b/docsrc/xmlsource/funcref/ses_disconnect.xml
index 2677459..cac6682 100644
--- a/docsrc/xmlsource/funcref/ses_disconnect.xml
+++ b/docsrc/xmlsource/funcref/ses_disconnect.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ses_read_line.xml b/docsrc/xmlsource/funcref/ses_read_line.xml
index a9cf90b..5168842 100644
--- a/docsrc/xmlsource/funcref/ses_read_line.xml
+++ b/docsrc/xmlsource/funcref/ses_read_line.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ses_write.xml b/docsrc/xmlsource/funcref/ses_write.xml
index 5f497ad..c8bbfc0 100644
--- a/docsrc/xmlsource/funcref/ses_write.xml
+++ b/docsrc/xmlsource/funcref/ses_write.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/set_identity_column.xml b/docsrc/xmlsource/funcref/set_identity_column.xml
index 0e5a546..27b3452 100644
--- a/docsrc/xmlsource/funcref/set_identity_column.xml
+++ b/docsrc/xmlsource/funcref/set_identity_column.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/set_row_count.xml b/docsrc/xmlsource/funcref/set_row_count.xml
index e6c5079..9278392 100644
--- a/docsrc/xmlsource/funcref/set_row_count.xml
+++ b/docsrc/xmlsource/funcref/set_row_count.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/set_user_id.xml b/docsrc/xmlsource/funcref/set_user_id.xml
index 593ae18..1cfd55d 100644
--- a/docsrc/xmlsource/funcref/set_user_id.xml
+++ b/docsrc/xmlsource/funcref/set_user_id.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sign.xml b/docsrc/xmlsource/funcref/sign.xml
index ebec22e..f4763fe 100644
--- a/docsrc/xmlsource/funcref/sign.xml
+++ b/docsrc/xmlsource/funcref/sign.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/signal.xml b/docsrc/xmlsource/funcref/signal.xml
index 9a42cbd..aa7b1b2 100644
--- a/docsrc/xmlsource/funcref/signal.xml
+++ b/docsrc/xmlsource/funcref/signal.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sinv_create_inverse.xml b/docsrc/xmlsource/funcref/sinv_create_inverse.xml
index 22561f5..814d3ef 100644
--- a/docsrc/xmlsource/funcref/sinv_create_inverse.xml
+++ b/docsrc/xmlsource/funcref/sinv_create_inverse.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sinv_create_key_mapping.xml b/docsrc/xmlsource/funcref/sinv_create_key_mapping.xml
index d4ae4b0..28b24ca 100644
--- a/docsrc/xmlsource/funcref/sinv_create_key_mapping.xml
+++ b/docsrc/xmlsource/funcref/sinv_create_key_mapping.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sinv_drop_inverse.xml b/docsrc/xmlsource/funcref/sinv_drop_inverse.xml
index a703c0d..75a77e7 100644
--- a/docsrc/xmlsource/funcref/sinv_drop_inverse.xml
+++ b/docsrc/xmlsource/funcref/sinv_drop_inverse.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/smime_decrypt.xml b/docsrc/xmlsource/funcref/smime_decrypt.xml
index 731aca1..e88a369 100644
--- a/docsrc/xmlsource/funcref/smime_decrypt.xml
+++ b/docsrc/xmlsource/funcref/smime_decrypt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/smime_encrypt.xml b/docsrc/xmlsource/funcref/smime_encrypt.xml
index 62ee699..df98142 100644
--- a/docsrc/xmlsource/funcref/smime_encrypt.xml
+++ b/docsrc/xmlsource/funcref/smime_encrypt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/smime_sign.xml b/docsrc/xmlsource/funcref/smime_sign.xml
index eef4f0e..e0a7e2b 100644
--- a/docsrc/xmlsource/funcref/smime_sign.xml
+++ b/docsrc/xmlsource/funcref/smime_sign.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/smime_verify.xml b/docsrc/xmlsource/funcref/smime_verify.xml
index e38e6bc..725eb6f 100644
--- a/docsrc/xmlsource/funcref/smime_verify.xml
+++ b/docsrc/xmlsource/funcref/smime_verify.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/smtp_send.xml b/docsrc/xmlsource/funcref/smtp_send.xml
index d6c355c..8282a88 100644
--- a/docsrc/xmlsource/funcref/smtp_send.xml
+++ b/docsrc/xmlsource/funcref/smtp_send.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_box_structure.xml b/docsrc/xmlsource/funcref/soap_box_structure.xml
index 0449691..a6619dc 100644
--- a/docsrc/xmlsource/funcref/soap_box_structure.xml
+++ b/docsrc/xmlsource/funcref/soap_box_structure.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_box_xml_entity.xml b/docsrc/xmlsource/funcref/soap_box_xml_entity.xml
index 6be3bd7..88d350c 100644
--- a/docsrc/xmlsource/funcref/soap_box_xml_entity.xml
+++ b/docsrc/xmlsource/funcref/soap_box_xml_entity.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_call.xml b/docsrc/xmlsource/funcref/soap_call.xml
index ce7bc64..1133c59 100644
--- a/docsrc/xmlsource/funcref/soap_call.xml
+++ b/docsrc/xmlsource/funcref/soap_call.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_client.xml b/docsrc/xmlsource/funcref/soap_client.xml
index 4343b0f..4e56a31 100644
--- a/docsrc/xmlsource/funcref/soap_client.xml
+++ b/docsrc/xmlsource/funcref/soap_client.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_current_url.xml b/docsrc/xmlsource/funcref/soap_current_url.xml
index 49c1eeb..7ad3dcf 100644
--- a/docsrc/xmlsource/funcref/soap_current_url.xml
+++ b/docsrc/xmlsource/funcref/soap_current_url.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_dt_define.xml b/docsrc/xmlsource/funcref/soap_dt_define.xml
index c53ef23..3c69c6f 100644
--- a/docsrc/xmlsource/funcref/soap_dt_define.xml
+++ b/docsrc/xmlsource/funcref/soap_dt_define.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_make_error.xml b/docsrc/xmlsource/funcref/soap_make_error.xml
index bc0e1ac..3f1f396 100644
--- a/docsrc/xmlsource/funcref/soap_make_error.xml
+++ b/docsrc/xmlsource/funcref/soap_make_error.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_print_box.xml b/docsrc/xmlsource/funcref/soap_print_box.xml
index 32b6ef2..614be97 100644
--- a/docsrc/xmlsource/funcref/soap_print_box.xml
+++ b/docsrc/xmlsource/funcref/soap_print_box.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_sdl.xml b/docsrc/xmlsource/funcref/soap_sdl.xml
index f2ef422..51c0366 100644
--- a/docsrc/xmlsource/funcref/soap_sdl.xml
+++ b/docsrc/xmlsource/funcref/soap_sdl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_server.xml b/docsrc/xmlsource/funcref/soap_server.xml
index df96448..def64ef 100644
--- a/docsrc/xmlsource/funcref/soap_server.xml
+++ b/docsrc/xmlsource/funcref/soap_server.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_wsdl.xml b/docsrc/xmlsource/funcref/soap_wsdl.xml
index 8c896e7..d925433 100644
--- a/docsrc/xmlsource/funcref/soap_wsdl.xml
+++ b/docsrc/xmlsource/funcref/soap_wsdl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/soap_wsdl_import.xml b/docsrc/xmlsource/funcref/soap_wsdl_import.xml
index a83c0d6..a5a2db6 100644
--- a/docsrc/xmlsource/funcref/soap_wsdl_import.xml
+++ b/docsrc/xmlsource/funcref/soap_wsdl_import.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/space.xml b/docsrc/xmlsource/funcref/space.xml
index 8f5e23c..6f2d6f0 100644
--- a/docsrc/xmlsource/funcref/space.xml
+++ b/docsrc/xmlsource/funcref/space.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sparql_rdb2rdf_list_tables.xml b/docsrc/xmlsource/funcref/sparql_rdb2rdf_list_tables.xml
index 933e4b5..f2bae6d 100644
--- a/docsrc/xmlsource/funcref/sparql_rdb2rdf_list_tables.xml
+++ b/docsrc/xmlsource/funcref/sparql_rdb2rdf_list_tables.xml
@@ -6,7 +6,7 @@
   </refmeta>
   <refnamediv>
     <refname>DB.DBA.SPARQL_RDB2RDF_LIST_TABLES</refname>
-    <refpurpose>Returns a vector of names of tables that are used as sources for RDF Views.</refpurpose>
+    <refpurpose>Returns a vector of names of tables that are used as sources for Linked Data Views.</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <funcsynopsis id="fsyn_sparql_rdb2rdf_list_tables">
@@ -18,10 +18,10 @@
   </refsynopsisdiv>
   <refsect1 id="desc_sparql_rdb2rdf_list_tables">
     <title>Description</title>
-    <para>Returns a vector of names of tables that are used as sources for RDF Views. Application 
+    <para>Returns a vector of names of tables that are used as sources for Linked Data Views. Application 
     	developer should decide what to do with each of them - create triggers or do some 
     	application-specific workarounds.</para>
-    <para>Note that if some SQL views are used as sources for RDF Views and these views does not 
+    <para>Note that if some SQL views are used as sources for Linked Data Views and these views does not 
     	have INSTEAD triggers then workarounds become mandatory for them, not just a choice, because 
     	BEFORE or AFTER triggers on views are not allowed if there is no appropriate INSTEAD trigger. 
     	The mode argument should be zero in current version.</para>	
diff --git a/docsrc/xmlsource/funcref/sparql_to_sql_text.xml b/docsrc/xmlsource/funcref/sparql_to_sql_text.xml
new file mode 100644
index 0000000..0860acd
--- /dev/null
+++ b/docsrc/xmlsource/funcref/sparql_to_sql_text.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_sparql_to_sql_text">
+  <refmeta>
+    <refentrytitle>sparql_to_sql_text</refentrytitle>
+    <refmiscinfo>rdf</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>sparql_to_sql_text</refname>
+    <refpurpose>Converts a sparql query directly to SQL.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_sparql_to_sql_text">
+      <funcprototype id="fproto_sparql_to_sql_text">
+        <funcdef>varchar <function>sparql_to_sql_text</function></funcdef>
+	      <paramdef>in <parameter>squery</parameter> varchar</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_sparql_to_sql_text">
+    <title>Description</title>
+    <para>The <function>sparql_to_sql_text()</function> function can be used to convert a SPARQL query
+directly to the SQL it would be executed as.</para>
+  </refsect1>
+  <refsect1 id="params_sparql_to_sql_text">
+    <title>Parameters</title>
+    <refsect2><title>squery</title>
+      <para>The sparql query to be converted.</para></refsect2>
+  </refsect1>
+  <refsect1 id="ret_sparql_to_sql_text"><title>Return Types</title>
+    <para>A string will be returned containing the converted sparql query.
+    </para>
+  </refsect1>
+  <refsect1 id="examples_sparql_to_sql_text">
+    <title>Examples</title>
+    <example id="ex_sparql_to_sql_text"><title>Using the sparql_to_sql_text() function</title>
+      <para>This simple example shows how to covert sparql query in SQL:</para>
+<programlisting><![CDATA[
+SQL> select sparql_to_sql_text('select * where {?s ?p ?o}');
+sparql_to_sql_text
+VARCHAR
+_______________________________________________________________________________
+
+SELECT __id2i ( /*retval[*/ "s-1-1-t0"."S" /* s */ /*]retval*/ ) AS /*tmpl*/ "s",
+  __id2i ( /*retval[*/ "s-1-1-t0"."P" /* p */ /*]retval*/ ) AS /*tmpl*/ "p",
+  __ro2sq ( /*retval[*/ "s-1-1-t0"."O" /* o */ /*]retval*/ ) AS /*tmpl*/ "o"
+FROM DB.DBA.RDF_QUAD AS "s-1-1-t0"
+OPTION (QUIETCAST)
+
+1 Rows. -- 15 msec.
+]]></programlisting>
+    </example>
+  </refsect1>
+    <refsect1 id="seealso_sparql_to_sql_text">
+    <title>See Also</title>
+    <para><link linkend="fn_sparql_eval_to_array"><function>DB.DBA.SPARQL_EVAL_TO_ARRAY</function></link></para>
+    <para><link linkend="fn_sparql_eval"><function>DB.DBA.SPARQL_EVAL</function></link></para>
+    <para><link linkend="fn_sparql_rdb2rdf_codegen"><function>DB.DBA.SPARQL_RDB2RDF_CODEGEN</function></link></para>
+    <para><link linkend="fn_sparql_rdb2rdf_list_tables"><function>DB.DBA.SPARQL_RDB2RDF_LIST_TABLES</function></link></para>
+    <para><link linkend="fn_sparql_rexec"><function>DB.DBA.SPARQL_REXEC</function></link></para>
+    <para><link linkend="fn_sparql_rexec_to_array"><function>DB.DBA.SPARQL_REXEC_TO_ARRAY</function></link></para>
+    <para><link linkend="fn_sparql_rexec_with_meta"><function>DB.DBA.SPARQL_REXEC_WITH_META</function></link></para>
+    <para><link linkend="fn_sparql_select_known_graphs"><function>DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS</function></link></para>                        
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/split_decode.xml b/docsrc/xmlsource/funcref/split_decode.xml
index 3197276..64a5450 100644
--- a/docsrc/xmlsource/funcref/split_decode.xml
+++ b/docsrc/xmlsource/funcref/split_decode.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/spotlight_metadata.xml b/docsrc/xmlsource/funcref/spotlight_metadata.xml
index cf9919a..caf74de 100644
--- a/docsrc/xmlsource/funcref/spotlight_metadata.xml
+++ b/docsrc/xmlsource/funcref/spotlight_metadata.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sprintf.xml b/docsrc/xmlsource/funcref/sprintf.xml
index 9732025..3403049 100644
--- a/docsrc/xmlsource/funcref/sprintf.xml
+++ b/docsrc/xmlsource/funcref/sprintf.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sprintf_inverse.xml b/docsrc/xmlsource/funcref/sprintf_inverse.xml
index 3f051d9..7318970 100644
--- a/docsrc/xmlsource/funcref/sprintf_inverse.xml
+++ b/docsrc/xmlsource/funcref/sprintf_inverse.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sprintf_iri.xml b/docsrc/xmlsource/funcref/sprintf_iri.xml
index bb72f8a..a4a2670 100644
--- a/docsrc/xmlsource/funcref/sprintf_iri.xml
+++ b/docsrc/xmlsource/funcref/sprintf_iri.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sprintf_iri_or_null.xml b/docsrc/xmlsource/funcref/sprintf_iri_or_null.xml
index e664868..e7d7928 100644
--- a/docsrc/xmlsource/funcref/sprintf_iri_or_null.xml
+++ b/docsrc/xmlsource/funcref/sprintf_iri_or_null.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sprintf_or_null.xml b/docsrc/xmlsource/funcref/sprintf_or_null.xml
index 3b09f11..21a8f98 100644
--- a/docsrc/xmlsource/funcref/sprintf_or_null.xml
+++ b/docsrc/xmlsource/funcref/sprintf_or_null.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_columns.xml b/docsrc/xmlsource/funcref/sql_columns.xml
index 56c3666..7d42a5b 100644
--- a/docsrc/xmlsource/funcref/sql_columns.xml
+++ b/docsrc/xmlsource/funcref/sql_columns.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_config_data_sources.xml b/docsrc/xmlsource/funcref/sql_config_data_sources.xml
index 024dea5..958b949 100644
--- a/docsrc/xmlsource/funcref/sql_config_data_sources.xml
+++ b/docsrc/xmlsource/funcref/sql_config_data_sources.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_data_sources.xml b/docsrc/xmlsource/funcref/sql_data_sources.xml
index 7712d6b..a6a828f 100644
--- a/docsrc/xmlsource/funcref/sql_data_sources.xml
+++ b/docsrc/xmlsource/funcref/sql_data_sources.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_driver_connect.xml b/docsrc/xmlsource/funcref/sql_driver_connect.xml
index af1b07c..3f59003 100644
--- a/docsrc/xmlsource/funcref/sql_driver_connect.xml
+++ b/docsrc/xmlsource/funcref/sql_driver_connect.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_get_installed_drivers.xml b/docsrc/xmlsource/funcref/sql_get_installed_drivers.xml
index d793476..004101a 100644
--- a/docsrc/xmlsource/funcref/sql_get_installed_drivers.xml
+++ b/docsrc/xmlsource/funcref/sql_get_installed_drivers.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_get_private_profile_string.xml b/docsrc/xmlsource/funcref/sql_get_private_profile_string.xml
index d2b66a0..e2a8ef8 100644
--- a/docsrc/xmlsource/funcref/sql_get_private_profile_string.xml
+++ b/docsrc/xmlsource/funcref/sql_get_private_profile_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_gettypeinfo.xml b/docsrc/xmlsource/funcref/sql_gettypeinfo.xml
index 4f50de8..06e1417 100644
--- a/docsrc/xmlsource/funcref/sql_gettypeinfo.xml
+++ b/docsrc/xmlsource/funcref/sql_gettypeinfo.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_primary_keys.xml b/docsrc/xmlsource/funcref/sql_primary_keys.xml
index 0c74277..b0e1a6c 100644
--- a/docsrc/xmlsource/funcref/sql_primary_keys.xml
+++ b/docsrc/xmlsource/funcref/sql_primary_keys.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_procedures.xml b/docsrc/xmlsource/funcref/sql_procedures.xml
index 2c4b28c..b02d95c 100644
--- a/docsrc/xmlsource/funcref/sql_procedures.xml
+++ b/docsrc/xmlsource/funcref/sql_procedures.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_remove_dsn_from_ini.xml b/docsrc/xmlsource/funcref/sql_remove_dsn_from_ini.xml
index 231052c..1e56d28 100644
--- a/docsrc/xmlsource/funcref/sql_remove_dsn_from_ini.xml
+++ b/docsrc/xmlsource/funcref/sql_remove_dsn_from_ini.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_special_columns.xml b/docsrc/xmlsource/funcref/sql_special_columns.xml
index f16eddb..c7844e4 100644
--- a/docsrc/xmlsource/funcref/sql_special_columns.xml
+++ b/docsrc/xmlsource/funcref/sql_special_columns.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_statistics.xml b/docsrc/xmlsource/funcref/sql_statistics.xml
index 2dee350..7add1e6 100644
--- a/docsrc/xmlsource/funcref/sql_statistics.xml
+++ b/docsrc/xmlsource/funcref/sql_statistics.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_tables.xml b/docsrc/xmlsource/funcref/sql_tables.xml
index 81240c1..3042011 100644
--- a/docsrc/xmlsource/funcref/sql_tables.xml
+++ b/docsrc/xmlsource/funcref/sql_tables.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_transact.xml b/docsrc/xmlsource/funcref/sql_transact.xml
index b29684f..a4fce06 100644
--- a/docsrc/xmlsource/funcref/sql_transact.xml
+++ b/docsrc/xmlsource/funcref/sql_transact.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_write_file_dsn.xml b/docsrc/xmlsource/funcref/sql_write_file_dsn.xml
index 3ad167a..319bf93 100644
--- a/docsrc/xmlsource/funcref/sql_write_file_dsn.xml
+++ b/docsrc/xmlsource/funcref/sql_write_file_dsn.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sql_write_private_profile_string.xml b/docsrc/xmlsource/funcref/sql_write_private_profile_string.xml
index 225b160..317161d 100644
--- a/docsrc/xmlsource/funcref/sql_write_private_profile_string.xml
+++ b/docsrc/xmlsource/funcref/sql_write_private_profile_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sqrt.xml b/docsrc/xmlsource/funcref/sqrt.xml
index d1a3a0c..48a886c 100644
--- a/docsrc/xmlsource/funcref/sqrt.xml
+++ b/docsrc/xmlsource/funcref/sqrt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/starts_with.xml b/docsrc/xmlsource/funcref/starts_with.xml
new file mode 100644
index 0000000..b79951b
--- /dev/null
+++ b/docsrc/xmlsource/funcref/starts_with.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_starts_with">
+  <refmeta>
+    <refentrytitle>starts_with</refentrytitle>
+    <refmiscinfo>string</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>starts_with</refname>
+    <refpurpose>Checks whether string X begins with Y</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_starts_with">
+      <funcprototype id="fproto_starts_with">
+        <funcdef><function>starts_with</function></funcdef>
+        <paramdef>in <parameter>str</parameter> string</paramdef>
+        <paramdef>in <parameter>sub</parameter> string</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_starts_with">
+    <title>Description</title>
+    <para><function>starts_with</function> checks whether string X begins with Y, ignoring occurencies of Y in other places. Returns 1 or 0.</para>
+  </refsect1>  
+  <refsect1 id="params_starts_with">
+    <title>Parameters</title>
+    <refsect2><title>str</title>
+      <para>String to search from.</para>
+    </refsect2>
+    <refsect2><title>sub</title>
+      <para>Substring to search for.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_starts_with">
+    <title>Return Types</title>
+    <para>1 if found, 0 if not found.</para>
+  </refsect1>
+  <refsect1 id="examples_starts_with">
+    <title>Examples</title>
+    <example id="ex_starts_with"><title>Simple example</title>
+<programlisting><![CDATA[
+SQL> select starts_with('AbracadabrA','Abr');
+starts_with
+INTEGER
+_______________________________________________________________________________
+
+1
+
+1 Rows. -- 0 msec.
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_starts_with">
+    <title>See Also</title>
+    <para><link linkend="fn_strcasestr"><function>strcasestr</function></link>.</para>
+    <para><link linkend="fn_strcontains"><function>strcontains</function></link>.</para>
+    <para><link linkend="fn_ends_with"><function>end_with</function></link>.</para>  
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/status.xml b/docsrc/xmlsource/funcref/status.xml
index 893393e..50eadb6 100644
--- a/docsrc/xmlsource/funcref/status.xml
+++ b/docsrc/xmlsource/funcref/status.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/stddev.xml b/docsrc/xmlsource/funcref/stddev.xml
index 012594e..c650437 100644
--- a/docsrc/xmlsource/funcref/stddev.xml
+++ b/docsrc/xmlsource/funcref/stddev.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/stddev_pop.xml b/docsrc/xmlsource/funcref/stddev_pop.xml
index fa833f5..1df97c2 100644
--- a/docsrc/xmlsource/funcref/stddev_pop.xml
+++ b/docsrc/xmlsource/funcref/stddev_pop.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/stddev_samp.xml b/docsrc/xmlsource/funcref/stddev_samp.xml
index 27c954f..0a6f728 100644
--- a/docsrc/xmlsource/funcref/stddev_samp.xml
+++ b/docsrc/xmlsource/funcref/stddev_samp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/strcasestr.xml b/docsrc/xmlsource/funcref/strcasestr.xml
index 84c3a9d..eb09dce 100644
--- a/docsrc/xmlsource/funcref/strcasestr.xml
+++ b/docsrc/xmlsource/funcref/strcasestr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/strchr.xml b/docsrc/xmlsource/funcref/strchr.xml
index 2694008..21c78a2 100644
--- a/docsrc/xmlsource/funcref/strchr.xml
+++ b/docsrc/xmlsource/funcref/strchr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/strcontains.xml b/docsrc/xmlsource/funcref/strcontains.xml
new file mode 100644
index 0000000..77f0358
--- /dev/null
+++ b/docsrc/xmlsource/funcref/strcontains.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_strcontains">
+  <refmeta>
+    <refentrytitle>strcontains</refentrytitle>
+    <refmiscinfo>string</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>strcontains</refname>
+    <refpurpose>Performs substring search</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_strcontains">
+      <funcprototype id="fproto_strcontains">
+        <funcdef><function>strcontains</function></funcdef>
+        <paramdef>in <parameter>str</parameter> string</paramdef>
+        <paramdef>in <parameter>sub</parameter> string</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_strcontains">
+    <title>Description</title>
+    <para><function>strcontains</function> performs a
+    substring search, returning 1 or 0.</para>
+  </refsect1>  
+  <refsect1 id="params_strcontains">
+    <title>Parameters</title>
+    <refsect2><title>str</title>
+      <para>String to search from.</para>
+    </refsect2>
+    <refsect2><title>sub</title>
+      <para>Substring to search for.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_strcontains">
+    <title>Return Types</title>
+    <para>1 if found, 0 if not found.</para>
+  </refsect1>
+  <refsect1 id="examples_strcontains">
+    <title>Examples</title>
+    <example id="ex_strcontains"><title>Simple example</title>
+<programlisting><![CDATA[
+SQL> select strcontains('AbracadabrA','abrA');
+strcontains
+INTEGER
+_______________________________________________________________________________
+
+1
+
+1 Rows. -- 0 msec.
+
+SQL> select strcontains('AbracadabrA','XZ');
+strcontains
+INTEGER
+_______________________________________________________________________________
+
+0
+
+1 Rows. -- 0 msec.
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_strcontains">
+    <title>See Also</title>
+    <para><link linkend="fn_strcasestr"><function>strcasestr</function></link>.</para>
+    <para><link linkend="fn_starts_with"><function>starts_with</function></link>.</para>        
+    <para><link linkend="fn_ends_with"><function>end_with</function></link>.</para>  
+  </refsect1>
+</refentry>
+
+
diff --git a/docsrc/xmlsource/funcref/string_output.xml b/docsrc/xmlsource/funcref/string_output.xml
index b2caed4..8cbe029 100644
--- a/docsrc/xmlsource/funcref/string_output.xml
+++ b/docsrc/xmlsource/funcref/string_output.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/string_output_flush.xml b/docsrc/xmlsource/funcref/string_output_flush.xml
index 368db75..b0178f7 100644
--- a/docsrc/xmlsource/funcref/string_output_flush.xml
+++ b/docsrc/xmlsource/funcref/string_output_flush.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/string_output_gz_compress.xml b/docsrc/xmlsource/funcref/string_output_gz_compress.xml
index 7daf753..83a1cde 100644
--- a/docsrc/xmlsource/funcref/string_output_gz_compress.xml
+++ b/docsrc/xmlsource/funcref/string_output_gz_compress.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/string_output_string.xml b/docsrc/xmlsource/funcref/string_output_string.xml
index 7b29847..a9a1c48 100644
--- a/docsrc/xmlsource/funcref/string_output_string.xml
+++ b/docsrc/xmlsource/funcref/string_output_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/string_to_file.xml b/docsrc/xmlsource/funcref/string_to_file.xml
index c377521..2017845 100644
--- a/docsrc/xmlsource/funcref/string_to_file.xml
+++ b/docsrc/xmlsource/funcref/string_to_file.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/stringdate.xml b/docsrc/xmlsource/funcref/stringdate.xml
index a17e4c9..82298a4 100644
--- a/docsrc/xmlsource/funcref/stringdate.xml
+++ b/docsrc/xmlsource/funcref/stringdate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/stringtime.xml b/docsrc/xmlsource/funcref/stringtime.xml
index c84933b..edd1e41 100644
--- a/docsrc/xmlsource/funcref/stringtime.xml
+++ b/docsrc/xmlsource/funcref/stringtime.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/strrchr.xml b/docsrc/xmlsource/funcref/strrchr.xml
index ce11991..13e8519 100644
--- a/docsrc/xmlsource/funcref/strrchr.xml
+++ b/docsrc/xmlsource/funcref/strrchr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/strstr.xml b/docsrc/xmlsource/funcref/strstr.xml
index 03070e0..bc43bec 100644
--- a/docsrc/xmlsource/funcref/strstr.xml
+++ b/docsrc/xmlsource/funcref/strstr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -41,7 +41,7 @@
   </refsynopsisdiv>
   <refsect1 id="desc_strstr">
     <title>Description</title>
-    <para><function>strcasestr</function> performs a
+    <para><function>strstr</function> performs a
     substring search, returning a zero-based index pointing to
     beginning of first occurrence of <parameter>sub</parameter> or
     NULL if not found.</para></refsect1>
diff --git a/docsrc/xmlsource/funcref/sub_schedule.xml b/docsrc/xmlsource/funcref/sub_schedule.xml
index 7914e46..a1660d0 100644
--- a/docsrc/xmlsource/funcref/sub_schedule.xml
+++ b/docsrc/xmlsource/funcref/sub_schedule.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/subseq.xml b/docsrc/xmlsource/funcref/subseq.xml
index 150a5bc..c44eb78 100644
--- a/docsrc/xmlsource/funcref/subseq.xml
+++ b/docsrc/xmlsource/funcref/subseq.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/substring.xml b/docsrc/xmlsource/funcref/substring.xml
index 443cdcb..39040bf 100644
--- a/docsrc/xmlsource/funcref/substring.xml
+++ b/docsrc/xmlsource/funcref/substring.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sync_repl.xml b/docsrc/xmlsource/funcref/sync_repl.xml
index 4b496e3..780f69e 100644
--- a/docsrc/xmlsource/funcref/sync_repl.xml
+++ b/docsrc/xmlsource/funcref/sync_repl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sys_db_stat.xml b/docsrc/xmlsource/funcref/sys_db_stat.xml
index fcbb6d0..d3eacb8 100644
--- a/docsrc/xmlsource/funcref/sys_db_stat.xml
+++ b/docsrc/xmlsource/funcref/sys_db_stat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sys_lockdown.xml b/docsrc/xmlsource/funcref/sys_lockdown.xml
index c0be1f0..98372de 100644
--- a/docsrc/xmlsource/funcref/sys_lockdown.xml
+++ b/docsrc/xmlsource/funcref/sys_lockdown.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sys_stat.xml b/docsrc/xmlsource/funcref/sys_stat.xml
index 472ff33..2bb5b6b 100644
--- a/docsrc/xmlsource/funcref/sys_stat.xml
+++ b/docsrc/xmlsource/funcref/sys_stat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sys_stat_analyze.xml b/docsrc/xmlsource/funcref/sys_stat_analyze.xml
index 1d05717..255c83d 100644
--- a/docsrc/xmlsource/funcref/sys_stat_analyze.xml
+++ b/docsrc/xmlsource/funcref/sys_stat_analyze.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/sys_stat_histogram.xml b/docsrc/xmlsource/funcref/sys_stat_histogram.xml
index 87765c0..d5e84ce 100644
--- a/docsrc/xmlsource/funcref/sys_stat_histogram.xml
+++ b/docsrc/xmlsource/funcref/sys_stat_histogram.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/system.xml b/docsrc/xmlsource/funcref/system.xml
index 67f0f43..bb08375 100644
--- a/docsrc/xmlsource/funcref/system.xml
+++ b/docsrc/xmlsource/funcref/system.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/table_drop_policy.xml b/docsrc/xmlsource/funcref/table_drop_policy.xml
index f8f036a..ef9a5cb 100644
--- a/docsrc/xmlsource/funcref/table_drop_policy.xml
+++ b/docsrc/xmlsource/funcref/table_drop_policy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/table_set_policy.xml b/docsrc/xmlsource/funcref/table_set_policy.xml
index 035972d..07b7724 100644
--- a/docsrc/xmlsource/funcref/table_set_policy.xml
+++ b/docsrc/xmlsource/funcref/table_set_policy.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/tcpip_gethostbyaddr.xml b/docsrc/xmlsource/funcref/tcpip_gethostbyaddr.xml
index 1f605e1..92cf6fe 100644
--- a/docsrc/xmlsource/funcref/tcpip_gethostbyaddr.xml
+++ b/docsrc/xmlsource/funcref/tcpip_gethostbyaddr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/tcpip_gethostbyname.xml b/docsrc/xmlsource/funcref/tcpip_gethostbyname.xml
index 3e961d7..d182988 100644
--- a/docsrc/xmlsource/funcref/tcpip_gethostbyname.xml
+++ b/docsrc/xmlsource/funcref/tcpip_gethostbyname.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/template.sh b/docsrc/xmlsource/funcref/template.sh
index 7058b73..2d9f9ec 100755
--- a/docsrc/xmlsource/funcref/template.sh
+++ b/docsrc/xmlsource/funcref/template.sh
@@ -1,4 +1,4 @@
-# $Id: template.sh,v 1.4 2009/02/12 15:15:13 source Exp $
+# $Id: template.sh,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
 
 # ----------------------------------------------------------------------
 #  Fix issues with LOCALE
@@ -25,7 +25,7 @@ cat > "${tgt}" <<EndOfTemplate
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -40,7 +40,7 @@ cat > "${tgt}" <<EndOfTemplate
   with this program; if not, write to the Free Software Foundation, Inc.,
   51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
   
-  $Id: template.sh,v 1.4 2009/02/12 15:15:13 source Exp $
+  $Id: template.sh,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
 -->
 <refentry id="${prefix}_${id}">
   <refmeta>
diff --git a/docsrc/xmlsource/funcref/template.xml b/docsrc/xmlsource/funcref/template.xml
index fe54eff..2e48445 100644
--- a/docsrc/xmlsource/funcref/template.xml
+++ b/docsrc/xmlsource/funcref/template.xml
@@ -49,7 +49,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -69,8 +69,7 @@
 
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
-  $Id: template.xml,v 1.1.1.1 2006/04/11 17:56:15 source Exp $
-  (C)Copyright 2005 OpenLink Software
+  $Id: template.xml,v 1.1.1.1.2.2 2012/03/08 13:13:48 source Exp $
 -->
 <refentry id="fn_">
   <refmeta>
diff --git a/docsrc/xmlsource/funcref/tidy_html.xml b/docsrc/xmlsource/funcref/tidy_html.xml
index 2958e0c..3ba3b7b 100644
--- a/docsrc/xmlsource/funcref/tidy_html.xml
+++ b/docsrc/xmlsource/funcref/tidy_html.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/tidy_list_errors.xml b/docsrc/xmlsource/funcref/tidy_list_errors.xml
index b6eecc6..8ed7c4c 100644
--- a/docsrc/xmlsource/funcref/tidy_list_errors.xml
+++ b/docsrc/xmlsource/funcref/tidy_list_errors.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/timezone.xml b/docsrc/xmlsource/funcref/timezone.xml
index 1e131f5..c982040 100644
--- a/docsrc/xmlsource/funcref/timezone.xml
+++ b/docsrc/xmlsource/funcref/timezone.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/tmp_file_name.xml b/docsrc/xmlsource/funcref/tmp_file_name.xml
index 7eb929a..cb4e648 100644
--- a/docsrc/xmlsource/funcref/tmp_file_name.xml
+++ b/docsrc/xmlsource/funcref/tmp_file_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/trace_off.xml b/docsrc/xmlsource/funcref/trace_off.xml
index 2f8503a..d1cde07 100644
--- a/docsrc/xmlsource/funcref/trace_off.xml
+++ b/docsrc/xmlsource/funcref/trace_off.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/trace_on.xml b/docsrc/xmlsource/funcref/trace_on.xml
index 7fe41a0..1ba5cf9 100644
--- a/docsrc/xmlsource/funcref/trace_on.xml
+++ b/docsrc/xmlsource/funcref/trace_on.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/trace_status.xml b/docsrc/xmlsource/funcref/trace_status.xml
index 23fce75..3a3d2df 100644
--- a/docsrc/xmlsource/funcref/trace_status.xml
+++ b/docsrc/xmlsource/funcref/trace_status.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/tree_md5.xml b/docsrc/xmlsource/funcref/tree_md5.xml
index 7ae0e9c..a47c49f 100644
--- a/docsrc/xmlsource/funcref/tree_md5.xml
+++ b/docsrc/xmlsource/funcref/tree_md5.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/trigonometric.xml b/docsrc/xmlsource/funcref/trigonometric.xml
index 99544ae..2daa8ca 100644
--- a/docsrc/xmlsource/funcref/trigonometric.xml
+++ b/docsrc/xmlsource/funcref/trigonometric.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/trim.xml b/docsrc/xmlsource/funcref/trim.xml
index e0208a1..95b28bc 100644
--- a/docsrc/xmlsource/funcref/trim.xml
+++ b/docsrc/xmlsource/funcref/trim.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ttlp_mt.xml b/docsrc/xmlsource/funcref/ttlp_mt.xml
index 92a9411..a31a3bf 100644
--- a/docsrc/xmlsource/funcref/ttlp_mt.xml
+++ b/docsrc/xmlsource/funcref/ttlp_mt.xml
@@ -6,7 +6,7 @@
   </refmeta>
   <refnamediv>
     <refname>DB.DBA.TTLP_MT</refname>
-    <refpurpose>parses TTL (TURTLE or N3 resource) and places its triples into DB.DBA.RDF_QUAD on multiple threads.</refpurpose>
+    <refpurpose>parses TTL (TURTLE), TTL(N-Triple) or NQ (N-quad) resources, and places its triples into DB.DBA.RDF_QUAD on multiple threads.</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <funcsynopsis id="fsyn_ttlp_mt">
@@ -72,7 +72,8 @@ Default is 0, meaning no permitted deviations from the spec. Other supported bit
   <refsect1 id="examples_ttlp_mt">
     <title>Examples</title>
     <example id="ex_ttlp_mt"><title></title>
-<para><emphasis>Sample Example 1</emphasis></para>
+<para><emphasis>Example 1</emphasis></para>
+<para>Load ttl from local file:</para>
 <screen><![CDATA[
 SQL> DB.DBA.TTLP_MT (file_to_string_output ('tmp/users.ttl'), '', 'http://mytest.com');
 
@@ -100,7 +101,8 @@ http://www.openlinksw.com/virtrdf-data-formats#SysUsers-UserId-format
 10 Rows. -- 30 msec.
 
 ]]></screen>
-<para><emphasis>Sample Example 2</emphasis></para>
+<para><emphasis>Example 2</emphasis></para>
+<para>Usage of the ttlp_mt function in a procedure:</para>
 <screen><![CDATA[
 SQL>create procedure SPARQL_DAWG_LOAD_REMOTE_DATFILE (in full_uri varchar, in in_resultset integer := 0)
 {
@@ -137,15 +139,14 @@ http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/weblog/kidehen@openli
 
 2 Rows. -- 1382 msec.
 ]]></screen>
-<para><emphasis>Sample Example 3</emphasis></para>
-    <para>Forth item in record of NQuad format is optional. If present then it is used as a graph.
+<para><emphasis>Example 3</emphasis></para>
+    <para>Fourth item in record of NQuad format is optional. If present then it is used as a graph.
 If missed then the default graph is used. The purpose is to make SPARQL dataset serialization possible in
 a "natural" way: the content of default graph is written without any graph name specified whereas the
-content of named graphs is written with fouth field in place. Similarly, TriG uses default graph for
+content of named graphs is written with fourth field in place. Similarly, TriG uses default graph for
 triples outside graph blocks. In all these cases, base IRI is used to resolve all relative IRIs of
-the document, no matter what is the destination graph. Here is a simple example:</para>
-<para><emphasis>Sample Example 2</emphasis></para>
-    <para>Suppose we have the simple nquad.nq file:</para>
+the document, no matter what is the destination graph. Suppose the following scenario:</para>
+<para>There is a simple nquad.nq file:</para>
 <programlisting><![CDATA[
 <http://www.w3.org/2002/01/tr-automation/tr.rdf> <http://purl.org/dc/elements/1.1/title> "W3C Standards and Technical Reports" <http://www.w3.org/People/Berners-Lee/card> .
 <http://www.w3.org/People/Berners-Lee/card> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/PersonalProfileDocument> <http://www.w3.org/People/Berners-Lee/card> .
diff --git a/docsrc/xmlsource/funcref/txn_error.xml b/docsrc/xmlsource/funcref/txn_error.xml
index 62baff2..f6d3dba 100644
--- a/docsrc/xmlsource/funcref/txn_error.xml
+++ b/docsrc/xmlsource/funcref/txn_error.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/txn_killall.xml b/docsrc/xmlsource/funcref/txn_killall.xml
index 5ea3a04..17c3c8a 100644
--- a/docsrc/xmlsource/funcref/txn_killall.xml
+++ b/docsrc/xmlsource/funcref/txn_killall.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/ucase.xml b/docsrc/xmlsource/funcref/ucase.xml
index cb227c2..9917090 100644
--- a/docsrc/xmlsource/funcref/ucase.xml
+++ b/docsrc/xmlsource/funcref/ucase.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_delete_binding.xml b/docsrc/xmlsource/funcref/uddi_delete_binding.xml
index 2546d71..fd50a06 100644
--- a/docsrc/xmlsource/funcref/uddi_delete_binding.xml
+++ b/docsrc/xmlsource/funcref/uddi_delete_binding.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_delete_business.xml b/docsrc/xmlsource/funcref/uddi_delete_business.xml
index ec1ffb5..b0dc68d 100644
--- a/docsrc/xmlsource/funcref/uddi_delete_business.xml
+++ b/docsrc/xmlsource/funcref/uddi_delete_business.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_delete_service.xml b/docsrc/xmlsource/funcref/uddi_delete_service.xml
index 041e734..3d568f7 100644
--- a/docsrc/xmlsource/funcref/uddi_delete_service.xml
+++ b/docsrc/xmlsource/funcref/uddi_delete_service.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_delete_tModel.xml b/docsrc/xmlsource/funcref/uddi_delete_tModel.xml
index 7efa3b1..9ddcdfa 100644
--- a/docsrc/xmlsource/funcref/uddi_delete_tModel.xml
+++ b/docsrc/xmlsource/funcref/uddi_delete_tModel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_discard_authToken.xml b/docsrc/xmlsource/funcref/uddi_discard_authToken.xml
index 495de1e..345d47b 100644
--- a/docsrc/xmlsource/funcref/uddi_discard_authToken.xml
+++ b/docsrc/xmlsource/funcref/uddi_discard_authToken.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_find_binding.xml b/docsrc/xmlsource/funcref/uddi_find_binding.xml
index a7f8669..6bcd260 100644
--- a/docsrc/xmlsource/funcref/uddi_find_binding.xml
+++ b/docsrc/xmlsource/funcref/uddi_find_binding.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_find_business.xml b/docsrc/xmlsource/funcref/uddi_find_business.xml
index a7f0196..0ef992c 100644
--- a/docsrc/xmlsource/funcref/uddi_find_business.xml
+++ b/docsrc/xmlsource/funcref/uddi_find_business.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_find_service.xml b/docsrc/xmlsource/funcref/uddi_find_service.xml
index 7a36025..ca6bbb7 100644
--- a/docsrc/xmlsource/funcref/uddi_find_service.xml
+++ b/docsrc/xmlsource/funcref/uddi_find_service.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_find_tModel.xml b/docsrc/xmlsource/funcref/uddi_find_tModel.xml
index 7173fd8..4ecabed 100644
--- a/docsrc/xmlsource/funcref/uddi_find_tModel.xml
+++ b/docsrc/xmlsource/funcref/uddi_find_tModel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_authToken.xml b/docsrc/xmlsource/funcref/uddi_get_authToken.xml
index d054109..6cff87c 100644
--- a/docsrc/xmlsource/funcref/uddi_get_authToken.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_authToken.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_bindingDetail.xml b/docsrc/xmlsource/funcref/uddi_get_bindingDetail.xml
index 931ff33..2f6e165 100644
--- a/docsrc/xmlsource/funcref/uddi_get_bindingDetail.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_bindingDetail.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_businessDetail.xml b/docsrc/xmlsource/funcref/uddi_get_businessDetail.xml
index a5917b1..10dc56e 100644
--- a/docsrc/xmlsource/funcref/uddi_get_businessDetail.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_businessDetail.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_businessDetailExt.xml b/docsrc/xmlsource/funcref/uddi_get_businessDetailExt.xml
index e7665c0..52c9607 100644
--- a/docsrc/xmlsource/funcref/uddi_get_businessDetailExt.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_businessDetailExt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_registeredInfo.xml b/docsrc/xmlsource/funcref/uddi_get_registeredInfo.xml
index a2c9a87..e7b1832 100644
--- a/docsrc/xmlsource/funcref/uddi_get_registeredInfo.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_registeredInfo.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_serviceDetail.xml b/docsrc/xmlsource/funcref/uddi_get_serviceDetail.xml
index 8364adc..1d8c7fc 100644
--- a/docsrc/xmlsource/funcref/uddi_get_serviceDetail.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_serviceDetail.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_get_tModelDetail.xml b/docsrc/xmlsource/funcref/uddi_get_tModelDetail.xml
index b40a504..b947ace 100644
--- a/docsrc/xmlsource/funcref/uddi_get_tModelDetail.xml
+++ b/docsrc/xmlsource/funcref/uddi_get_tModelDetail.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_save_binding.xml b/docsrc/xmlsource/funcref/uddi_save_binding.xml
index 533917f..4e57085 100644
--- a/docsrc/xmlsource/funcref/uddi_save_binding.xml
+++ b/docsrc/xmlsource/funcref/uddi_save_binding.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_save_business.xml b/docsrc/xmlsource/funcref/uddi_save_business.xml
index b57feca..9345d3a 100644
--- a/docsrc/xmlsource/funcref/uddi_save_business.xml
+++ b/docsrc/xmlsource/funcref/uddi_save_business.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_save_service.xml b/docsrc/xmlsource/funcref/uddi_save_service.xml
index 006c7d0..93de445 100644
--- a/docsrc/xmlsource/funcref/uddi_save_service.xml
+++ b/docsrc/xmlsource/funcref/uddi_save_service.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uddi_save_tModel.xml b/docsrc/xmlsource/funcref/uddi_save_tModel.xml
index a38f3eb..1700bcc 100644
--- a/docsrc/xmlsource/funcref/uddi_save_tModel.xml
+++ b/docsrc/xmlsource/funcref/uddi_save_tModel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/udt_defines_field.xml b/docsrc/xmlsource/funcref/udt_defines_field.xml
index 76e9586..c3eb695 100644
--- a/docsrc/xmlsource/funcref/udt_defines_field.xml
+++ b/docsrc/xmlsource/funcref/udt_defines_field.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/udt_get.xml b/docsrc/xmlsource/funcref/udt_get.xml
index 639ba19..f13109d 100644
--- a/docsrc/xmlsource/funcref/udt_get.xml
+++ b/docsrc/xmlsource/funcref/udt_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/udt_implements_method.xml b/docsrc/xmlsource/funcref/udt_implements_method.xml
index 19894a7..1206e5c 100644
--- a/docsrc/xmlsource/funcref/udt_implements_method.xml
+++ b/docsrc/xmlsource/funcref/udt_implements_method.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/udt_instance_of.xml b/docsrc/xmlsource/funcref/udt_instance_of.xml
index 956fdc0..b5291f5 100644
--- a/docsrc/xmlsource/funcref/udt_instance_of.xml
+++ b/docsrc/xmlsource/funcref/udt_instance_of.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/udt_set.xml b/docsrc/xmlsource/funcref/udt_set.xml
index 35bc3dc..bdbad5b 100644
--- a/docsrc/xmlsource/funcref/udt_set.xml
+++ b/docsrc/xmlsource/funcref/udt_set.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/unimport_clr.xml b/docsrc/xmlsource/funcref/unimport_clr.xml
index 6360a37..d066458 100644
--- a/docsrc/xmlsource/funcref/unimport_clr.xml
+++ b/docsrc/xmlsource/funcref/unimport_clr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/unimport_jar.xml b/docsrc/xmlsource/funcref/unimport_jar.xml
index b9d98ce..b0111cc 100644
--- a/docsrc/xmlsource/funcref/unimport_jar.xml
+++ b/docsrc/xmlsource/funcref/unimport_jar.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/updateXML.xml b/docsrc/xmlsource/funcref/updateXML.xml
index 1bed598..85bfc58 100644
--- a/docsrc/xmlsource/funcref/updateXML.xml
+++ b/docsrc/xmlsource/funcref/updateXML.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/upper.xml b/docsrc/xmlsource/funcref/upper.xml
index 7e9f6d5..c6f6591 100644
--- a/docsrc/xmlsource/funcref/upper.xml
+++ b/docsrc/xmlsource/funcref/upper.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/urlrewrite_create_regex_rule.xml b/docsrc/xmlsource/funcref/urlrewrite_create_regex_rule.xml
index 003157f..773a9f6 100644
--- a/docsrc/xmlsource/funcref/urlrewrite_create_regex_rule.xml
+++ b/docsrc/xmlsource/funcref/urlrewrite_create_regex_rule.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
 
-  $Id: urlrewrite_create_regex_rule.xml,v 1.3.2.2 2010/01/06 21:33:50 source Exp $
+  $Id: urlrewrite_create_regex_rule.xml,v 1.3.2.3 2012/03/07 15:29:03 source Exp $
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2008 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
 
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_change_password.xml b/docsrc/xmlsource/funcref/user_change_password.xml
index e4ee02d..7cea243 100644
--- a/docsrc/xmlsource/funcref/user_change_password.xml
+++ b/docsrc/xmlsource/funcref/user_change_password.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_create.xml b/docsrc/xmlsource/funcref/user_create.xml
index 0cbc626..b6c4762 100644
--- a/docsrc/xmlsource/funcref/user_create.xml
+++ b/docsrc/xmlsource/funcref/user_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_drop.xml b/docsrc/xmlsource/funcref/user_drop.xml
index 86ba496..25afc2a 100644
--- a/docsrc/xmlsource/funcref/user_drop.xml
+++ b/docsrc/xmlsource/funcref/user_drop.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_get_option.xml b/docsrc/xmlsource/funcref/user_get_option.xml
index 32f0d48..b094303 100644
--- a/docsrc/xmlsource/funcref/user_get_option.xml
+++ b/docsrc/xmlsource/funcref/user_get_option.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_grant_role.xml b/docsrc/xmlsource/funcref/user_grant_role.xml
index 8284d6d..040ba87 100644
--- a/docsrc/xmlsource/funcref/user_grant_role.xml
+++ b/docsrc/xmlsource/funcref/user_grant_role.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_key_load.xml b/docsrc/xmlsource/funcref/user_key_load.xml
index ed7cae9..1828f8c 100644
--- a/docsrc/xmlsource/funcref/user_key_load.xml
+++ b/docsrc/xmlsource/funcref/user_key_load.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_revoke_role.xml b/docsrc/xmlsource/funcref/user_revoke_role.xml
index cf157e6..3008d8f 100644
--- a/docsrc/xmlsource/funcref/user_revoke_role.xml
+++ b/docsrc/xmlsource/funcref/user_revoke_role.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_role_create.xml b/docsrc/xmlsource/funcref/user_role_create.xml
index 6de97fa..39123e8 100644
--- a/docsrc/xmlsource/funcref/user_role_create.xml
+++ b/docsrc/xmlsource/funcref/user_role_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_role_drop.xml b/docsrc/xmlsource/funcref/user_role_drop.xml
index 67e112b..f6c6f14 100644
--- a/docsrc/xmlsource/funcref/user_role_drop.xml
+++ b/docsrc/xmlsource/funcref/user_role_drop.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_set_option.xml b/docsrc/xmlsource/funcref/user_set_option.xml
index 5f445b3..215becd 100644
--- a/docsrc/xmlsource/funcref/user_set_option.xml
+++ b/docsrc/xmlsource/funcref/user_set_option.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_set_password.xml b/docsrc/xmlsource/funcref/user_set_password.xml
index 533c679..c5ba731 100644
--- a/docsrc/xmlsource/funcref/user_set_password.xml
+++ b/docsrc/xmlsource/funcref/user_set_password.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/user_set_qualifier.xml b/docsrc/xmlsource/funcref/user_set_qualifier.xml
index 764cfb2..7ec1ce2 100644
--- a/docsrc/xmlsource/funcref/user_set_qualifier.xml
+++ b/docsrc/xmlsource/funcref/user_set_qualifier.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/username.xml b/docsrc/xmlsource/funcref/username.xml
index 67362df..2ddd629 100644
--- a/docsrc/xmlsource/funcref/username.xml
+++ b/docsrc/xmlsource/funcref/username.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uudecode.xml b/docsrc/xmlsource/funcref/uudecode.xml
index 2732fd1..1a4ad15 100644
--- a/docsrc/xmlsource/funcref/uudecode.xml
+++ b/docsrc/xmlsource/funcref/uudecode.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uuencode.xml b/docsrc/xmlsource/funcref/uuencode.xml
index 91f2232..05fdeca 100644
--- a/docsrc/xmlsource/funcref/uuencode.xml
+++ b/docsrc/xmlsource/funcref/uuencode.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/uuvalidate.xml b/docsrc/xmlsource/funcref/uuvalidate.xml
index b74d1ee..515a346 100644
--- a/docsrc/xmlsource/funcref/uuvalidate.xml
+++ b/docsrc/xmlsource/funcref/uuvalidate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vacuum.xml b/docsrc/xmlsource/funcref/vacuum.xml
index ba57a64..9d56bec 100644
--- a/docsrc/xmlsource/funcref/vacuum.xml
+++ b/docsrc/xmlsource/funcref/vacuum.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_check.xml b/docsrc/xmlsource/funcref/vad_check.xml
index e9ab9dd..4ab9524 100644
--- a/docsrc/xmlsource/funcref/vad_check.xml
+++ b/docsrc/xmlsource/funcref/vad_check.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_check_installability.xml b/docsrc/xmlsource/funcref/vad_check_installability.xml
index f226a87..8a1b299 100644
--- a/docsrc/xmlsource/funcref/vad_check_installability.xml
+++ b/docsrc/xmlsource/funcref/vad_check_installability.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_check_uninstallability.xml b/docsrc/xmlsource/funcref/vad_check_uninstallability.xml
index 628fbef..87ecc66 100644
--- a/docsrc/xmlsource/funcref/vad_check_uninstallability.xml
+++ b/docsrc/xmlsource/funcref/vad_check_uninstallability.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_fail_check.xml b/docsrc/xmlsource/funcref/vad_fail_check.xml
index 03513ad..811f5b6 100644
--- a/docsrc/xmlsource/funcref/vad_fail_check.xml
+++ b/docsrc/xmlsource/funcref/vad_fail_check.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_install.xml b/docsrc/xmlsource/funcref/vad_install.xml
index cf80645..a3588c5 100644
--- a/docsrc/xmlsource/funcref/vad_install.xml
+++ b/docsrc/xmlsource/funcref/vad_install.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_load_file.xml b/docsrc/xmlsource/funcref/vad_load_file.xml
index a00b9a7..81962ac 100644
--- a/docsrc/xmlsource/funcref/vad_load_file.xml
+++ b/docsrc/xmlsource/funcref/vad_load_file.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -74,6 +74,7 @@
   </refsect1>
 -->
   <refsect1 id="seealso"><title>See Also</title>
+    <para><link linkend="fn_vad_load_sql_file">vad_load_sql_file()</link></para>
     <para><link linkend="fn_vad_check_uninstallability">vad_check_uninstallability()</link></para>
     <para><link linkend="fn_vad_check_installability">vad_check_installability()</link></para>
     <para><link linkend="fn_vad_install">vad_install()</link></para>
diff --git a/docsrc/xmlsource/funcref/vad_load_sql_file.xml b/docsrc/xmlsource/funcref/vad_load_sql_file.xml
new file mode 100644
index 0000000..1a86126
--- /dev/null
+++ b/docsrc/xmlsource/funcref/vad_load_sql_file.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<refentry id="fn_vad_load_sql_file">
+  <refmeta>
+    <refentrytitle>VAD_LOAD_SQL_FILE</refentrytitle>
+    <refmiscinfo>vad</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>VAD_LOAD_SQL_FILE</refname>
+    <refpurpose>Loads SQL file and executes its content's statements.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_vad_load_sql_file">
+      <funcprototype id="fproto_vad_load_sql_file">
+        <funcdef>DB.DBA.<function>VAD_LOAD_SQL_FILE</function></funcdef>
+	      <paramdef>in <parameter>sql_file_name</parameter> varchar</paramdef>
+	      <paramdef>in <parameter>grouping</parameter> integer</paramdef>	      
+	      <paramdef>in <parameter>report_errors</parameter> varchar</paramdef>	      	      
+	      <paramdef>in <parameter>is_dav</parameter> integer</paramdef>	      	      	      
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc"><title>Description</title>
+    <para>Loads SQL file ( can be regular file or DAV resource ) and then splits its content 
+    	into single statements and executes them one by one. Along the process, the function 
+    	makes needed reports and changes 'VAD_errcount' registry variable.</para>
+  </refsect1>
+  <refsect1 id="params"><title>Parameters</title>
+    <refsect2><title>sql_file_name</title>
+      <para>For files, this parameter is either absolute or relative to server's working directory. 
+      The directory should be readable according to the virtuoso.ini settings. For DAV resources, 
+      the sql_file_name is always absolute: ('/DAV/<folder-name>...').
+      </para>
+    </refsect2>
+    <refsect2><title>grouping</title>
+      <para>Always set this parameter to 1.</para>
+    </refsect2>
+    <refsect2><title>grouping</title>
+      <para>The supported values for this parameter are:</para>
+      <itemizedlist mark="bullet">
+        <listitem><emphasis>'report'</emphasis> - to log errors and continue or:</listitem>
+        <listitem><emphasis>'signal'</emphasis> - at the very first error, break the loading 
+        and resignal it.</listitem>
+      </itemizedlist>      
+    </refsect2>    
+    <refsect2><title>is_dav</title>
+      <para>This parameter is 0 for plain file and 1 for resource loaded in DAV.
+      </para>
+    </refsect2>    
+  </refsect1>
+  
+  <refsect1 id="examples_vad_load_sql_file"><title>Examples</title>
+    <example id="ex_vad_load_sql_file_1"><title></title>
+      <para></para>
+<programlisting><![CDATA[
+DB.DBA.VAD_LOAD_SQL_FILE ('./conductor/vdir_helper.sql', 1, 'report', 0);
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso"><title>See Also</title>
+    <para><link linkend="fn_vad_load_file">vad_load_file()</link></para>
+    <para><link linkend="fn_vad_check_uninstallability">vad_check_uninstallability()</link></para>
+    <para><link linkend="fn_vad_check_installability">vad_check_installability()</link></para>
+    <para><link linkend="fn_vad_install">vad_install()</link></para>
+    <para><link linkend="fn_vad_pack">vad_pack()</link></para>
+    <para><link linkend="fn_vad_safe_exec">vad_safe_exec()</link></para>
+    <para><link linkend="fn_vad_uninstall">vad_uninstall()</link></para>
+    <para><link linkend="fn_vad_fail_check">vad_fail_check()</link></para>
+    <para><link linkend="fn_vad_check">vad_check()</link></para>
+  </refsect1>
+</refentry>
+
diff --git a/docsrc/xmlsource/funcref/vad_pack.xml b/docsrc/xmlsource/funcref/vad_pack.xml
index d759305..b1ef34a 100644
--- a/docsrc/xmlsource/funcref/vad_pack.xml
+++ b/docsrc/xmlsource/funcref/vad_pack.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_safe_exec.xml b/docsrc/xmlsource/funcref/vad_safe_exec.xml
index ca5cd54..cf57042 100644
--- a/docsrc/xmlsource/funcref/vad_safe_exec.xml
+++ b/docsrc/xmlsource/funcref/vad_safe_exec.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vad_uninstall.xml b/docsrc/xmlsource/funcref/vad_uninstall.xml
index f2deb62..a72b64a 100644
--- a/docsrc/xmlsource/funcref/vad_uninstall.xml
+++ b/docsrc/xmlsource/funcref/vad_uninstall.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/var.xml b/docsrc/xmlsource/funcref/var.xml
index 8efb8fa..3d99dc0 100644
--- a/docsrc/xmlsource/funcref/var.xml
+++ b/docsrc/xmlsource/funcref/var.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/var_pop.xml b/docsrc/xmlsource/funcref/var_pop.xml
index 36179fe..1d317b0 100644
--- a/docsrc/xmlsource/funcref/var_pop.xml
+++ b/docsrc/xmlsource/funcref/var_pop.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/var_samp.xml b/docsrc/xmlsource/funcref/var_samp.xml
index 7da7a1d..b4d92fb 100644
--- a/docsrc/xmlsource/funcref/var_samp.xml
+++ b/docsrc/xmlsource/funcref/var_samp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vd_remote_data_source.xml b/docsrc/xmlsource/funcref/vd_remote_data_source.xml
index dc9ede2..37d3fb5 100644
--- a/docsrc/xmlsource/funcref/vd_remote_data_source.xml
+++ b/docsrc/xmlsource/funcref/vd_remote_data_source.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vd_remote_proc_wrapper.xml b/docsrc/xmlsource/funcref/vd_remote_proc_wrapper.xml
index 2b089b0..59dec04 100644
--- a/docsrc/xmlsource/funcref/vd_remote_proc_wrapper.xml
+++ b/docsrc/xmlsource/funcref/vd_remote_proc_wrapper.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vd_remote_table.xml b/docsrc/xmlsource/funcref/vd_remote_table.xml
index f335932..b6e4114 100644
--- a/docsrc/xmlsource/funcref/vd_remote_table.xml
+++ b/docsrc/xmlsource/funcref/vd_remote_table.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vd_statistics.xml b/docsrc/xmlsource/funcref/vd_statistics.xml
index 769328a..088e579 100644
--- a/docsrc/xmlsource/funcref/vd_statistics.xml
+++ b/docsrc/xmlsource/funcref/vd_statistics.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vdd_disconnect_data_source.xml b/docsrc/xmlsource/funcref/vdd_disconnect_data_source.xml
index b9b2273..f707980 100644
--- a/docsrc/xmlsource/funcref/vdd_disconnect_data_source.xml
+++ b/docsrc/xmlsource/funcref/vdd_disconnect_data_source.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vdd_measure_rpc_time.xml b/docsrc/xmlsource/funcref/vdd_measure_rpc_time.xml
index 1783fca..286882e 100644
--- a/docsrc/xmlsource/funcref/vdd_measure_rpc_time.xml
+++ b/docsrc/xmlsource/funcref/vdd_measure_rpc_time.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vector.xml b/docsrc/xmlsource/funcref/vector.xml
index efe5fc0..2d5dd4c 100644
--- a/docsrc/xmlsource/funcref/vector.xml
+++ b/docsrc/xmlsource/funcref/vector.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vector_concat.xml b/docsrc/xmlsource/funcref/vector_concat.xml
index 8669442..2426c69 100644
--- a/docsrc/xmlsource/funcref/vector_concat.xml
+++ b/docsrc/xmlsource/funcref/vector_concat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vhost_define.xml b/docsrc/xmlsource/funcref/vhost_define.xml
index 26fcf17..fec9002 100644
--- a/docsrc/xmlsource/funcref/vhost_define.xml
+++ b/docsrc/xmlsource/funcref/vhost_define.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vhost_remove.xml b/docsrc/xmlsource/funcref/vhost_remove.xml
index c3efa03..33f2c11 100644
--- a/docsrc/xmlsource/funcref/vhost_remove.xml
+++ b/docsrc/xmlsource/funcref/vhost_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/virtuoso_ini_path.xml b/docsrc/xmlsource/funcref/virtuoso_ini_path.xml
index e990016..1c9c2e6 100644
--- a/docsrc/xmlsource/funcref/virtuoso_ini_path.xml
+++ b/docsrc/xmlsource/funcref/virtuoso_ini_path.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vsp_calculate_digest.xml b/docsrc/xmlsource/funcref/vsp_calculate_digest.xml
index a904829..ccc7224 100644
--- a/docsrc/xmlsource/funcref/vsp_calculate_digest.xml
+++ b/docsrc/xmlsource/funcref/vsp_calculate_digest.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_batch.xml b/docsrc/xmlsource/funcref/vt_batch.xml
index cead7aa..06773a5 100644
--- a/docsrc/xmlsource/funcref/vt_batch.xml
+++ b/docsrc/xmlsource/funcref/vt_batch.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_batch_d_id.xml b/docsrc/xmlsource/funcref/vt_batch_d_id.xml
index 87a2fa6..c35ce43 100644
--- a/docsrc/xmlsource/funcref/vt_batch_d_id.xml
+++ b/docsrc/xmlsource/funcref/vt_batch_d_id.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_batch_feed.xml b/docsrc/xmlsource/funcref/vt_batch_feed.xml
index ab09be5..dba55f2 100644
--- a/docsrc/xmlsource/funcref/vt_batch_feed.xml
+++ b/docsrc/xmlsource/funcref/vt_batch_feed.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_batch_feed_offband.xml b/docsrc/xmlsource/funcref/vt_batch_feed_offband.xml
index 9132b4f..ec3fadb 100644
--- a/docsrc/xmlsource/funcref/vt_batch_feed_offband.xml
+++ b/docsrc/xmlsource/funcref/vt_batch_feed_offband.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_batch_update.xml b/docsrc/xmlsource/funcref/vt_batch_update.xml
index 6ee57c4..62a8731 100644
--- a/docsrc/xmlsource/funcref/vt_batch_update.xml
+++ b/docsrc/xmlsource/funcref/vt_batch_update.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_create_text_index.xml b/docsrc/xmlsource/funcref/vt_create_text_index.xml
index 1783a01..aa30f5d 100644
--- a/docsrc/xmlsource/funcref/vt_create_text_index.xml
+++ b/docsrc/xmlsource/funcref/vt_create_text_index.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -43,6 +43,7 @@
         <paramdef>in <parameter>use_hook_function</parameter> integer</paramdef>
         <paramdef><optional>in <parameter>language_name</parameter> varchar</optional></paramdef>
         <paramdef><optional>in <parameter>encoding_name</parameter> integer</optional></paramdef>
+        <paramdef><optional>in <parameter>silent</parameter> integer</optional></paramdef>        
       </funcprototype>
     </funcsynopsis>
   </refsynopsisdiv>
@@ -161,6 +162,9 @@ index source texts.
 If the parameter is omitted or is equal to '*ini*' string, indexing routines
 will use the encoding specified by charset of the RDBMS connection that is
 in use when the index is created.</para></refsect2>
+    <refsect2><title>silent</title>
+      <para>Flag with values 1/0. Default is 0. When set to 0, the function signals error if the text index exists. 
+      	If set to 1, the function signals no error if the text index exists.</para></refsect2>
   </refsect1>
   <refsect1 id="ret"><title>Return Types</title><para></para></refsect1>
 <!--
diff --git a/docsrc/xmlsource/funcref/vt_drop_ftt.xml b/docsrc/xmlsource/funcref/vt_drop_ftt.xml
index 5066ecf..d654d46 100644
--- a/docsrc/xmlsource/funcref/vt_drop_ftt.xml
+++ b/docsrc/xmlsource/funcref/vt_drop_ftt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/vt_is_noise.xml b/docsrc/xmlsource/funcref/vt_is_noise.xml
index 1f69a17..e1441fc 100644
--- a/docsrc/xmlsource/funcref/vt_is_noise.xml
+++ b/docsrc/xmlsource/funcref/vt_is_noise.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/week.xml b/docsrc/xmlsource/funcref/week.xml
index c92400d..02356de 100644
--- a/docsrc/xmlsource/funcref/week.xml
+++ b/docsrc/xmlsource/funcref/week.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/wsdl_import_udt.xml b/docsrc/xmlsource/funcref/wsdl_import_udt.xml
index fb54889..4db849e 100644
--- a/docsrc/xmlsource/funcref/wsdl_import_udt.xml
+++ b/docsrc/xmlsource/funcref/wsdl_import_udt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/wst_cli.xml b/docsrc/xmlsource/funcref/wst_cli.xml
index 405225e..f32518d 100644
--- a/docsrc/xmlsource/funcref/wst_cli.xml
+++ b/docsrc/xmlsource/funcref/wst_cli.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/x509_certificate_verify.xml b/docsrc/xmlsource/funcref/x509_certificate_verify.xml
index 1305aca..372cf77 100644
--- a/docsrc/xmlsource/funcref/x509_certificate_verify.xml
+++ b/docsrc/xmlsource/funcref/x509_certificate_verify.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/x509_from_csr.xml b/docsrc/xmlsource/funcref/x509_from_csr.xml
new file mode 100644
index 0000000..0c000a3
--- /dev/null
+++ b/docsrc/xmlsource/funcref/x509_from_csr.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_x509_from_csr">
+  <refmeta>
+    <refentrytitle>x509_from_csr</refentrytitle>
+    <refmiscinfo>hash</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>x509_from_csr</refname>
+    <refpurpose>Generate x509 certificate from CSR.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_x509_from_csr">
+      <funcprototype id="fproto_x509_from_csr">
+        <funcdef>varchar <function>x509_from_csr</function></funcdef>
+	        <paramdef>in <parameter>ca_key_name</parameter> varchar</paramdef>
+	        <paramdef>in <parameter>cli_key_name</parameter> varchar</paramdef>	        
+	        <paramdef>in <parameter>csr_str</parameter> varchar</paramdef>	        
+	        <paramdef>in <parameter>serial_no</parameter> varchar</paramdef>	        	        	        
+	        <paramdef>in <parameter>days_validity</parameter> varchar</paramdef>	        	        	        	        
+	        <paramdef>in <parameter>hours_validity</parameter> varchar</paramdef>	        
+     </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_x509_from_csr"><title>Description</title>
+      <para>This function generates Certificate Signing Request (CSR). The function return 1 upon success, 
+      	sql error on failure. The new certificate can be exported in PEM format with 
+      	<link linkend="fn_xenc_pem_export"><function>xenc_pem_export(cli_key_name)</function></link>.</para>
+  </refsect1>
+  <refsect1 id="params_x509_from_csr"><title>Parameters</title>
+    <refsect2>
+    	<title>ca_key_name</title>
+      <para>The name of CA private key which will be used to sign certificate.</para>
+    </refsect2>
+    <refsect2>
+      <title>cli_key_name</title>
+      <para>The name of a key which will be created and will contains the client certificate.</para>
+    </refsect2>
+    <refsect2>
+    	<title>csr_str</title>
+  	  <para>pem encoded CSR.</para>
+    </refsect2>
+    <refsect2>
+    	<title>serial_no</title>
+  	  <para>Serial number.</para>
+    </refsect2>    
+    <refsect2>
+    	<title>days_validity</title>
+  	  <para>How many days will be valid the certificate.</para>
+    </refsect2>          
+    <refsect2>
+    	<title>hours_validity</title>
+  	  <para>How many hours will be valid the certificate.</para>
+    </refsect2>              
+  </refsect1>
+  <refsect1 id="ret_x509_from_csr"><title>Return Types</title>
+      <para>the function returns 1 upon success, sql error on failure.</para>
+  </refsect1>
+  <refsect1 id="errors_x509_from_csr"><title>Errors</title>
+    <table><title>Errors signalled by <function>x509_from_csr</function></title>
+      <tgroup cols="4">
+        <thead>
+          <row>
+            <entry>SQLState</entry>
+            <entry>Error Code</entry>
+            <entry>Error Text</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+	<tbody>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>The key [name of the key] already exists</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Missing or invalid signer certificate</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Invalid certificate request</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Invalid certificate request public key</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Signature did not match the certificate request</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Invalid certificate request subject name</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not create x.509 structure</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not sign certificate</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>The type of public key is not supported mus tbe RSA or DSA</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not create a key</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not sign certificate : [the sign error text]</errorname></entry>
+	    <entry></entry>
+	  </row>	  	  	  	  
+	</tbody>
+      </tgroup>
+    </table>
+  </refsect1>
+  <refsect1 id="examples_x509_from_csr"><title>Example</title>
+    <example id="ex_x509_from_csr">
+    	<para>The following example demonstrates how to generate Certificate Signing Request (CSR).</para>
+      <itemizedlist mark="bullet">
+        <listitem><link linkend="vfoafsslcacondt">Using Conductor, for user dba import a certificate with primary key and with name id_rsa.</link></listitem>
+        <listitem>Execute:</listitem>
+      </itemizedlist>	
+<programlisting><![CDATA[
+SQL>create procedure csr_demo()
+{
+declare kname, cvalue varchar; 
+declare _key any;
+declare _output int;
+
+       xenc_key_RSA_create ('RSAKey1', 1024);
+       
+    _key := xenc_x509_csr_generate ('RSAKey1',
+		vector (
+			'CN', 'Demo user',
+			'C',  'US',
+			'O',  'OpenLink',
+			'OU', 'Accounts',
+			'emailAddress', 'demo at openlinksw.com'), 
+		vector ('subjectAltName', 'URI: http://www.openlinksw.com/dataspace/person/demo#this', 'nsComment', 'Virtuoso Generated Certificate', 
+			'authorityKeyIdentifier', 'keyid,issuer:always'));
+			
+			
+   xenc_x509_from_csr ('id_rsa', 'MyKey1', _key , sequence_next ('ca_id_rsa'), 365, 100);
+   return xenc_pem_export ('MyKey1');
+
+}
+;
+
+Done. -- 0 msec.
+
+SQL> select csr_demo();
+temp2
+VARCHAR
+_______________________________________________________________________________
+
+-----BEGIN CERTIFICATE-----
+MIIDSjCCAjKgAwIBAgIBEzANBgkqhkiG9w0BAQQFADBVMQswCQYDVQQIEwJvbDEL
+MAkGA1UEChMCb2wxCzAJBgNVBAsTAm9sMQ0wCwYDVQQDEwRqb2huMR0wGwYJKoZI
+hvcNAQkBFg5qb2huQGdtYWlsLmNvbTAeFw0xMTA2MDcxNTAxNDhaFw0xMjA2MTAx
+OTAxNDhaMGsxEjAQBgNVBAMTCURlbW8gdXNlcjELMAkGA1UEBhMCVVMxETAPBgNV
+BAoTCE9wZW5MaW5rMREwDwYDVQQLEwhBY2NvdW50czEiMCAGCSqGSIb3DQEJARYT
+ZGVtb0BvcGVubGlua3N3LmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+3Ma/MlMrGruwpDsW2D3iYA6sqFqldPsgx837dNJel8ZQu5/0Nyr5DCtAQNq6nWZo
+0bezK9UIfAXEQXWt4S7IMPfTF6oCT85YDsQEEE/o1spsZ9Q7kXhKu3R3LNNiTxYr
+TR4FSl361pUqyYngSMTxVWJxKnPW30p94i5QuQjLF1sCAwEAAaOBkjCBjzAdBgNV
+HQ4EFgQUF5wTSXH98IqiaaxfVTNcui8p8SowPwYDVR0RBDgwNoY0aHR0cDovL3d3
+dy5vcGVubGlua3N3LmNvbS9kYXRhc3BhY2UvcGVyc29uL2RlbW8jdGhpczAtBglg
+hkgBhvhCAQ0EIBYeVmlydHVvc28gR2VuZXJhdGVkIENlcnRpZmljYXRlMA0GCSqG
+SIb3DQEBBAUAA4IBAQCwSN3y6yeCNe+/izo5GwM+16cjmZkyMUYmAO62I6T62jmI
+p0nYaVhJ9WV0ntVnx1H8/LKwrgyLlhXacVw4jyXwFMSo+YuONj+kKpobNH2cl+u1
++c0kJGbY/eS99S2D3JhL6n+QukvQIqhYniZ21wT1ugwpN2A7NtY+g925+vQBO0UH
+0wQm3eQk8NADEjcqrmGmJcrK22jfaBNov+O2wvcZQM7WIKm98f/7So7kBN0BoRX8
+7LRf3zIhp4f9fk1QDwlm9NgwgxARqNOfRuJU2YU1ICz88LbwM4XDeb+Mdr0YMNdU
+6eYkCB4vKsVH+s1E8m67QZ8TGxpNZLYXLZZBdt86
+-----END CERTIFICATE-----
+
+
+1 Rows. -- 172 msec.
+
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_x509_from_csr"><title>See Also</title>
+    <para><link linkend="fn_get_certificate_info">get_certificate_info()</link></para>
+    <para><link linkend="fn_x509_csr_generate">x509_csr_generate()</link></para>
+    <para><link linkend="fn_xenc_x509_generate">xenc_x509_generate()</link></para>    
+ </refsect1>
+</refentry>
+
diff --git a/docsrc/xmlsource/funcref/xenc_SPKI_read.xml b/docsrc/xmlsource/funcref/xenc_SPKI_read.xml
index e9fbf54..dcddf06 100644
--- a/docsrc/xmlsource/funcref/xenc_SPKI_read.xml
+++ b/docsrc/xmlsource/funcref/xenc_SPKI_read.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -68,7 +68,7 @@
   <refsect1 id="examples_xenc_SPKI_read">
     <title>Examples</title>
     <example id="ex_xenc_SPKI_read"><title>SPKI reading</title>
-      <para>The example bellow creates a temp key.</para>
+      <para>The example below creates a temp key.</para>
       <screen><![CDATA[
        kname := xenc_SPKI_read (null, replace (get_keyword ('key', params), '\r\n', ''));
 ]]>
diff --git a/docsrc/xmlsource/funcref/xenc_X509_certificate_serialize.xml b/docsrc/xmlsource/funcref/xenc_X509_certificate_serialize.xml
index 6090e8a..fc1ea7c 100644
--- a/docsrc/xmlsource/funcref/xenc_X509_certificate_serialize.xml
+++ b/docsrc/xmlsource/funcref/xenc_X509_certificate_serialize.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_bn2dec.xml b/docsrc/xmlsource/funcref/xenc_bn2dec.xml
index d249a39..b5871a0 100644
--- a/docsrc/xmlsource/funcref/xenc_bn2dec.xml
+++ b/docsrc/xmlsource/funcref/xenc_bn2dec.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_decrypt_soap.xml b/docsrc/xmlsource/funcref/xenc_decrypt_soap.xml
index d57bdd6..d765e1c 100644
--- a/docsrc/xmlsource/funcref/xenc_decrypt_soap.xml
+++ b/docsrc/xmlsource/funcref/xenc_decrypt_soap.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_delete_temp_keys.xml b/docsrc/xmlsource/funcref/xenc_delete_temp_keys.xml
index 2a14e76..cbdd7b4 100644
--- a/docsrc/xmlsource/funcref/xenc_delete_temp_keys.xml
+++ b/docsrc/xmlsource/funcref/xenc_delete_temp_keys.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_encrypt.xml b/docsrc/xmlsource/funcref/xenc_encrypt.xml
index be4dd7a..858cc34 100644
--- a/docsrc/xmlsource/funcref/xenc_encrypt.xml
+++ b/docsrc/xmlsource/funcref/xenc_encrypt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_get_key_algo.xml b/docsrc/xmlsource/funcref/xenc_get_key_algo.xml
index 9344ee9..07ee152 100644
--- a/docsrc/xmlsource/funcref/xenc_get_key_algo.xml
+++ b/docsrc/xmlsource/funcref/xenc_get_key_algo.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_get_key_identifier.xml b/docsrc/xmlsource/funcref/xenc_get_key_identifier.xml
index a6e31d7..620402c 100644
--- a/docsrc/xmlsource/funcref/xenc_get_key_identifier.xml
+++ b/docsrc/xmlsource/funcref/xenc_get_key_identifier.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_3DES_read.xml b/docsrc/xmlsource/funcref/xenc_key_3DES_read.xml
index ecd9b47..e182e1b 100644
--- a/docsrc/xmlsource/funcref/xenc_key_3DES_read.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_3DES_read.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_3des_create.xml b/docsrc/xmlsource/funcref/xenc_key_3des_create.xml
index bd3b28b..fe21332 100644
--- a/docsrc/xmlsource/funcref/xenc_key_3des_create.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_3des_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_3des_rand_create.xml b/docsrc/xmlsource/funcref/xenc_key_3des_rand_create.xml
index 6c2ba66..7e92739 100644
--- a/docsrc/xmlsource/funcref/xenc_key_3des_rand_create.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_3des_rand_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_DSA_read.xml b/docsrc/xmlsource/funcref/xenc_key_DSA_read.xml
index e1fb3fe..b45d057 100644
--- a/docsrc/xmlsource/funcref/xenc_key_DSA_read.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_DSA_read.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_RSA_read.xml b/docsrc/xmlsource/funcref/xenc_key_RSA_read.xml
index d010ebf..68425d9 100644
--- a/docsrc/xmlsource/funcref/xenc_key_RSA_read.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_RSA_read.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_aes_create.xml b/docsrc/xmlsource/funcref/xenc_key_aes_create.xml
index b6d814c..75f4537 100644
--- a/docsrc/xmlsource/funcref/xenc_key_aes_create.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_aes_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_aes_rand_create.xml b/docsrc/xmlsource/funcref/xenc_key_aes_rand_create.xml
index 0e30483..3f4dffa 100644
--- a/docsrc/xmlsource/funcref/xenc_key_aes_rand_create.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_aes_rand_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_create_cert.xml b/docsrc/xmlsource/funcref/xenc_key_create_cert.xml
index a727e5b..a9cdad0 100644
--- a/docsrc/xmlsource/funcref/xenc_key_create_cert.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_create_cert.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_dsa_create.xml b/docsrc/xmlsource/funcref/xenc_key_dsa_create.xml
index faf8ffc..0f471bb 100644
--- a/docsrc/xmlsource/funcref/xenc_key_dsa_create.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_dsa_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_exists.xml b/docsrc/xmlsource/funcref/xenc_key_exists.xml
index e9d2a58..543c301 100644
--- a/docsrc/xmlsource/funcref/xenc_key_exists.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_exists.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_inst_create.xml b/docsrc/xmlsource/funcref/xenc_key_inst_create.xml
index e1c1d43..8d6bc45 100644
--- a/docsrc/xmlsource/funcref/xenc_key_inst_create.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_inst_create.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_remove.xml b/docsrc/xmlsource/funcref/xenc_key_remove.xml
index c998cd3..0550611 100644
--- a/docsrc/xmlsource/funcref/xenc_key_remove.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_key_rsa_create.xml b/docsrc/xmlsource/funcref/xenc_key_rsa_create.xml
new file mode 100644
index 0000000..57bc63e
--- /dev/null
+++ b/docsrc/xmlsource/funcref/xenc_key_rsa_create.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -
+ -  This program 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
+ -  General Public License for more details.
+ -
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -
+ -
+-->
+<refentry id="fn_xenc_key_RSA_create">
+  <refmeta>
+    <refentrytitle>xenc_key_RSA_create</refentrytitle>
+    <refmiscinfo>hash</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>xenc_key_RSA_create</refname>
+    <refpurpose>Used to make RSA key.</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_xenc_key_RSA_create">
+      <funcprototype id="fproto_xenc_key_RSA_create">
+        <funcdef><function>xenc_key_RSA_create</function></funcdef>
+	      <paramdef>in <parameter>name</parameter> varchar</paramdef>
+	      <paramdef>in <parameter>bits</parameter> int</paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_xenc_key_RSA_create">
+    <title>Description</title>
+    <para>Used to make RSA key.
+    </para>
+  </refsect1>
+  <refsect1 id="params_xenc_key_RSA_create">
+    <title>Parameters</title>
+    <refsect2><title>name</title>
+      <para>The name of the key.</para>
+    </refsect2>
+    <refsect2><title>bits</title>
+      <para>Number of bits in generated key. The values supported are from 512 to 2048.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_xenc_key_RSA_create"><title>Return Types</title>
+    <para>None.</para>
+  </refsect1>
+  <refsect1 id="examples_xenc_key_RSA_create">
+    <title>Example</title>
+    <example id="ex_xenc_key_RSA_create"><title></title>
+      <screen><![CDATA[
+	  xenc_key_RSA_create ('myRSAkey', 1024);]]>
+</screen>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_xenc_key_RSA_create">
+    <title>See Also</title>
+    <para><link linkend="fn_xenc_key_3DES_create"><function>xenc_key_3DES_create</function></link></para>
+    <para><link linkend="fn_xenc_key_3DES_rand_create"><function>xenc_key_3des_rand_create</function></link></para>
+    <para><link linkend="fn_xenc_key_AES_create"><function>xenc_key_aes_create</function></link></para>
+    <para><link linkend="fn_xenc_key_3DES_read"><function>xenc_key_3DES_read</function></link></para>
+    <para><link linkend="fn_xenc_key_DSA_read"><function>xenc_key_DSA_read</function></link></para>
+    <para><link linkend="fn_xenc_key_RSA_read"><function>xenc_key_RSA_read</function></link></para>
+    <para><link linkend="fn_xenc_key_create_cert"><function>xenc_key_create_cert</function></link></para>
+    <para><link linkend="fn_xenc_key_serialize"><function>xenc_key_serialize</function></link></para>
+    <para><link linkend="fn_xenc_key_remove"><function>xenc_key_remove</function></link></para>
+  </refsect1>
+</refentry>
diff --git a/docsrc/xmlsource/funcref/xenc_key_serialize.xml b/docsrc/xmlsource/funcref/xenc_key_serialize.xml
index bcd0407..1e5c3d7 100644
--- a/docsrc/xmlsource/funcref/xenc_key_serialize.xml
+++ b/docsrc/xmlsource/funcref/xenc_key_serialize.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_pem_export.xml b/docsrc/xmlsource/funcref/xenc_pem_export.xml
index 0f20a9d..9d4a110 100644
--- a/docsrc/xmlsource/funcref/xenc_pem_export.xml
+++ b/docsrc/xmlsource/funcref/xenc_pem_export.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -68,7 +68,7 @@
   <refsect1 id="examples_xenc_pem_export">
     <title>Examples</title>
     <example id="ex_xenc_pem_export"><title>Creating a certificate and exporting it in PEM format</title>
-      <para>The example bellow imports a client public key, then it creates a certificate and sign it with CA's private key and finally it exports the generated certificate in PEM format.</para>
+      <para>The example below imports a client public key, then it creates a certificate and sign it with CA's private key and finally it exports the generated certificate in PEM format.</para>
       <screen><![CDATA[
        kname := xenc_SPKI_read (null, replace (get_keyword ('key', params), '\r\n', ''));
        xenc_x509_generate ('id_rsa', kname, sequence_next ('ca_id_rsa'), 365, 
diff --git a/docsrc/xmlsource/funcref/xenc_pkcs12_export.xml b/docsrc/xmlsource/funcref/xenc_pkcs12_export.xml
index ad79719..f4814f8 100644
--- a/docsrc/xmlsource/funcref/xenc_pkcs12_export.xml
+++ b/docsrc/xmlsource/funcref/xenc_pkcs12_export.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -72,7 +72,7 @@
   <refsect1 id="examples_xenc_pkcs12_export">
     <title>Examples</title>
     <example id="ex_xenc_pkcs12_export"><title>Persisting a key & certificate</title>
-      <para>The example bellow persists a key named 'id_rsa' and certificate created for it into user's key space. Thus after server restart the key will be available again.</para>
+      <para>The example below persists a key named 'id_rsa' and certificate created for it into user's key space. Thus after server restart the key will be available again.</para>
       <screen><![CDATA[
        USER_KEY_STORE (user, 'id_rsa', 'X.509', 2, '', xenc_pkcs12_export ('id_rsa', 'CA Certificate', ''));
 ]]>
diff --git a/docsrc/xmlsource/funcref/xenc_set_primary_key.xml b/docsrc/xmlsource/funcref/xenc_set_primary_key.xml
index b942a50..f3dbbaa 100644
--- a/docsrc/xmlsource/funcref/xenc_set_primary_key.xml
+++ b/docsrc/xmlsource/funcref/xenc_set_primary_key.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xenc_x509_csr_generate.xml b/docsrc/xmlsource/funcref/xenc_x509_csr_generate.xml
new file mode 100644
index 0000000..b1c21ce
--- /dev/null
+++ b/docsrc/xmlsource/funcref/xenc_x509_csr_generate.xml
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ -  
+ -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ -  project.
+ -  
+ -  Copyright (C) 1998-2012 OpenLink Software
+ -  
+ -  This project 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; only version 2 of the License, dated June 1991.
+ -  
+ -  This program 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
+ -  General Public License for more details.
+ -  
+ -  You should have received a copy of the GNU General Public License along
+ -  with this program; if not, write to the Free Software Foundation, Inc.,
+ -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ -  
+ -  
+-->
+<refentry id="fn_x509_csr_generate">
+  <refmeta>
+    <refentrytitle>x509_csr_generate</refentrytitle>
+    <refmiscinfo>hash</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>x509_csr_generate</refname>
+    <refpurpose>Generate Certificate Signing Request (CSR)</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <funcsynopsis id="fsyn_x509_csr_generate">
+      <funcprototype id="fproto_x509_csr_generate">
+        <funcdef>varchar <function>x509_csr_generate</function></funcdef>
+	        <paramdef>in <parameter>cli_pk_name</parameter> varchar</paramdef>
+          <paramdef>in <parameter>subject</parameter> array</paramdef>
+          <paramdef>in <parameter>extensions</parameter> array</paramdef>
+     </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+  <refsect1 id="desc_x509_csr_generate"><title>Description</title>
+      <para>This function generates Certificate Signing Request (CSR)</para>
+  </refsect1>
+  <refsect1 id="params_x509_csr_generate"><title>Parameters</title>
+    <refsect2>
+    	<title>cli_pk_name</title>
+      <para>The user's private key name.</para>
+    </refsect2>
+    <refsect2>
+      <title>subject</title>
+      <para>An array of name/value pairs representing the subject aka name enties, for ex:</para>
+<programlisting><![CDATA[
+('CN', 'Demo User', 'C', 'US')	
+]]></programlisting>      
+    </refsect2>
+    <refsect2>
+    	<title>extensions</title>
+  	  <para>An array of name/value pairs to add as X.509v3 extensions to certificate.</para>
+    </refsect2>
+  </refsect1>
+  <refsect1 id="ret_x509_csr_generate"><title>Return Types</title>
+      <para>String</para>
+  </refsect1>
+  <refsect1 id="errors_x509_csr_generate"><title>Errors</title>
+    <table><title>Errors signalled by <function>x509_csr_generate</function></title>
+      <tgroup cols="4">
+        <thead>
+          <row>
+            <entry>SQLState</entry>
+            <entry>Error Code</entry>
+            <entry>Error Text</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+	<tbody>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Missing key</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Key is not DSA nor RSA</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Missing private key</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Subject array must be name/value pairs</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>22023</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Extension array must be name/value pairs</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not create pkey</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not assign primary key</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not create pkey</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not create x.509 structure</errorname></entry>
+	    <entry></entry>
+	  </row>
+	  <row>
+	    <entry><errorcode>42000</errorcode></entry>
+	    <entry><errorcode>XECXX</errorcode></entry>
+	    <entry><errorname>Can not sign certificate : [the sign error text]</errorname></entry>
+	    <entry></entry>
+	  </row>	  	  	  	  
+	</tbody>
+      </tgroup>
+    </table>
+  </refsect1>
+  <refsect1 id="examples_x509_csr_generate"><title>Examples</title>
+    <example id="ex_x509_csr_generate">
+<programlisting><![CDATA[
+SQL> create procedure csr_gen_demo()
+{
+declare kname, cvalue varchar; 
+       xenc_key_RSA_create ('myRSAkey', 1024);
+       xenc_x509_csr_generate ('myRSAkey',
+		vector (
+			'CN', 'Demo user',
+			'C',  'US',
+			'O',  'OpenLink',
+			'OU', 'Accounts',
+			'emailAddress', 'demo at openlinksw.com'), 
+		vector ('subjectAltName', 'URI: http://www.openlinksw.com/dataspace/person/demo#this', 'nsComment', 'Virtuoso Generated Certificate', 
+			'authorityKeyIdentifier', 'keyid,issuer:always'));
+};
+
+Done. -- 0 msec.
+SQL> select csr_gen_demo();
+temp
+VARCHAR
+_______________________________________________________________________________
+
+-----BEGIN CERTIFICATE REQUEST-----
+MIICLDCCAZUCADBrMRIwEAYDVQQDEwlEZW1vIHVzZXIxCzAJBgNVBAYTAlVTMREw
+DwYDVQQKEwhPcGVuTGluazERMA8GA1UECxMIQWNjb3VudHMxIjAgBgkqhkiG9w0B
+CQEWE2RlbW9Ab3Blbmxpbmtzdy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
+AoGBAM+e21xeQIJX5ySd6Juc3GtCnyT+JvDKgoxkmovFdqkCm1Ks7Pys0x59ksSZ
+DZoEATEt/sQsEB7AnRAkH76lWyG0zMtvxdkFH8Cepaaq4bcdqSgmE12DRwViR95a
+ZNA8vhonr5UdTbtKkIGD67IrkGH81C8trwF+8LnYKdtf1bMdAgMBAAGggYEwfwYJ
+KoZIhvcNAQkOMXIwcDA/BgNVHREEODA2hjRodHRwOi8vd3d3Lm9wZW5saW5rc3cu
+Y29tL2RhdGFzcGFjZS9wZXJzb24vZGVtbyN0aGlzMC0GCWCGSAGG+EIBDQQgFh5W
+aXJ0dW9zbyBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwDQYJKoZIhvcNAQEEBQADgYEA
+CQ+UeQGWLnHn5X9tKumvgP2p4LgxHsNq0uFZffVBRUAV6w8WRwor5ZKOeNhHrldp
+ZvxHc9ESFBTA772W01VmQNfpjkFcpH5yd81dFkSsF3lKemQIHnlz4bORU4av2TMM
+T9OIp5FNOec13jXqVesymd+Kl+Vb9sRBaC1Xb1OSryU=
+-----END CERTIFICATE REQUEST-----
+
+
+1 Rows. -- 390 msec.
+]]></programlisting>
+    </example>
+  </refsect1>
+  <refsect1 id="seealso_x509_csr_generate"><title>See Also</title>
+    <para><link linkend="fn_get_certificate_info">get_certificate_info()</link></para>
+    <para><link linkend="fn_x509_from_csr">x509_from_csr()</link></para>
+    <para><link linkend="fn_xenc_x509_generate">xenc_x509_generate()</link></para>    
+ </refsect1>
+</refentry>
+
diff --git a/docsrc/xmlsource/funcref/xenc_x509_generate.xml b/docsrc/xmlsource/funcref/xenc_x509_generate.xml
index 372b379..5f385ec 100644
--- a/docsrc/xmlsource/funcref/xenc_x509_generate.xml
+++ b/docsrc/xmlsource/funcref/xenc_x509_generate.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -84,7 +84,9 @@
   <refsect1 id="examples_xenc_x509_generate">
     <title>Examples</title>
     <example id="ex_xenc_x509_generate"><title>Issuing a certificate</title>
-      <para>The example bellow decode a public key sent from client and then issue a certificate and sign it with CA's key 'id_rsa'. The client's key is create as temp key.</para>
+      <para>The example below decodes a public key sent from client and 
+      	then issue a certificate and sign it with CA's key 'id_rsa'. 
+      	The client's key is create as temp key.</para>
       <screen><![CDATA[
        declare kname, cvalue varchar; 
        kname := xenc_SPKI_read (null, replace (get_keyword ('key', params), '\r\n', ''));
diff --git a/docsrc/xmlsource/funcref/xenc_x509_ss_generate.xml b/docsrc/xmlsource/funcref/xenc_x509_ss_generate.xml
index 4b255ae..8ca9459 100644
--- a/docsrc/xmlsource/funcref/xenc_x509_ss_generate.xml
+++ b/docsrc/xmlsource/funcref/xenc_x509_ss_generate.xml
@@ -4,7 +4,7 @@
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
   
-  Copyright (C) 1998-2006 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -80,7 +80,7 @@
   <refsect1 id="examples_xenc_x509_ss_generate">
     <title>Examples</title>
     <example id="ex_xenc_x509_ss_generate"><title>Self-signed certificate generation</title>
-      <para>The example bellow shows how could be created RSA private key, then self-signed certificate and finally to be stored in the user's key store.</para>
+      <para>The example below shows how could be created RSA private key, then self-signed certificate and finally to be stored in the user's key store.</para>
       <screen><![CDATA[
        ...	  
        xenc_key_RSA_create ('id_rsa', atoi (get_keyword ('num', params, '1024')));
diff --git a/docsrc/xmlsource/funcref/xmlStorageSystem.deleteMultipleFiles.xml b/docsrc/xmlsource/funcref/xmlStorageSystem.deleteMultipleFiles.xml
index fea0a4d..9f823c9 100644
--- a/docsrc/xmlsource/funcref/xmlStorageSystem.deleteMultipleFiles.xml
+++ b/docsrc/xmlsource/funcref/xmlStorageSystem.deleteMultipleFiles.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xmlStorageSystem.getServerCapabilities.xml b/docsrc/xmlsource/funcref/xmlStorageSystem.getServerCapabilities.xml
index 159c7f4..d7f6cd5 100644
--- a/docsrc/xmlsource/funcref/xmlStorageSystem.getServerCapabilities.xml
+++ b/docsrc/xmlsource/funcref/xmlStorageSystem.getServerCapabilities.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xmlStorageSystem.mailPasswordToUser.xml b/docsrc/xmlsource/funcref/xmlStorageSystem.mailPasswordToUser.xml
index 05d8e1a..a5963f8 100644
--- a/docsrc/xmlsource/funcref/xmlStorageSystem.mailPasswordToUser.xml
+++ b/docsrc/xmlsource/funcref/xmlStorageSystem.mailPasswordToUser.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xmlStorageSystem.registerUser.xml b/docsrc/xmlsource/funcref/xmlStorageSystem.registerUser.xml
index 4859372..821ee0e 100644
--- a/docsrc/xmlsource/funcref/xmlStorageSystem.registerUser.xml
+++ b/docsrc/xmlsource/funcref/xmlStorageSystem.registerUser.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xmlStorageSystem.saveMultipleFiles.xml b/docsrc/xmlsource/funcref/xmlStorageSystem.saveMultipleFiles.xml
index d063ac4..bfe36c4 100644
--- a/docsrc/xmlsource/funcref/xmlStorageSystem.saveMultipleFiles.xml
+++ b/docsrc/xmlsource/funcref/xmlStorageSystem.saveMultipleFiles.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_auto.xml b/docsrc/xmlsource/funcref/xml_auto.xml
index 1fa55df..a7d21d3 100644
--- a/docsrc/xmlsource/funcref/xml_auto.xml
+++ b/docsrc/xmlsource/funcref/xml_auto.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_auto_dtd.xml b/docsrc/xmlsource/funcref/xml_auto_dtd.xml
index 6e1807d..4182ac3 100644
--- a/docsrc/xmlsource/funcref/xml_auto_dtd.xml
+++ b/docsrc/xmlsource/funcref/xml_auto_dtd.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_auto_schema.xml b/docsrc/xmlsource/funcref/xml_auto_schema.xml
index b229eca..4a419bf 100644
--- a/docsrc/xmlsource/funcref/xml_auto_schema.xml
+++ b/docsrc/xmlsource/funcref/xml_auto_schema.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_create_tables_from_mapping_schema_decl.xml b/docsrc/xmlsource/funcref/xml_create_tables_from_mapping_schema_decl.xml
index b003728..a8e91fc 100644
--- a/docsrc/xmlsource/funcref/xml_create_tables_from_mapping_schema_decl.xml
+++ b/docsrc/xmlsource/funcref/xml_create_tables_from_mapping_schema_decl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_cut.xml b/docsrc/xmlsource/funcref/xml_cut.xml
index 9ee80e4..57c1493 100644
--- a/docsrc/xmlsource/funcref/xml_cut.xml
+++ b/docsrc/xmlsource/funcref/xml_cut.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_doc_output_option.xml b/docsrc/xmlsource/funcref/xml_doc_output_option.xml
index f2f303e..e315f23 100644
--- a/docsrc/xmlsource/funcref/xml_doc_output_option.xml
+++ b/docsrc/xmlsource/funcref/xml_doc_output_option.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_load_mapping_schema_decl.xml b/docsrc/xmlsource/funcref/xml_load_mapping_schema_decl.xml
index 0b6d72d..2e8f5fe 100644
--- a/docsrc/xmlsource/funcref/xml_load_mapping_schema_decl.xml
+++ b/docsrc/xmlsource/funcref/xml_load_mapping_schema_decl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_load_schema_decl.xml b/docsrc/xmlsource/funcref/xml_load_schema_decl.xml
index ea18761..88f6c7e 100644
--- a/docsrc/xmlsource/funcref/xml_load_schema_decl.xml
+++ b/docsrc/xmlsource/funcref/xml_load_schema_decl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_namespace_scope.xml b/docsrc/xmlsource/funcref/xml_namespace_scope.xml
index 583b1ef..47ddc22 100644
--- a/docsrc/xmlsource/funcref/xml_namespace_scope.xml
+++ b/docsrc/xmlsource/funcref/xml_namespace_scope.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_path.xml b/docsrc/xmlsource/funcref/xml_path.xml
index 960951e..388c704 100644
--- a/docsrc/xmlsource/funcref/xml_path.xml
+++ b/docsrc/xmlsource/funcref/xml_path.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_persistent.xml b/docsrc/xmlsource/funcref/xml_persistent.xml
index 2dfe5d6..c533117 100644
--- a/docsrc/xmlsource/funcref/xml_persistent.xml
+++ b/docsrc/xmlsource/funcref/xml_persistent.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_remove_ns_by_prefix.xml b/docsrc/xmlsource/funcref/xml_remove_ns_by_prefix.xml
index 3c3956e..755f266 100644
--- a/docsrc/xmlsource/funcref/xml_remove_ns_by_prefix.xml
+++ b/docsrc/xmlsource/funcref/xml_remove_ns_by_prefix.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_set_ns_decl.xml b/docsrc/xmlsource/funcref/xml_set_ns_decl.xml
index dad1be7..e1b715d 100644
--- a/docsrc/xmlsource/funcref/xml_set_ns_decl.xml
+++ b/docsrc/xmlsource/funcref/xml_set_ns_decl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_template.xml b/docsrc/xmlsource/funcref/xml_template.xml
index 78dfb0d..31ca24c 100644
--- a/docsrc/xmlsource/funcref/xml_template.xml
+++ b/docsrc/xmlsource/funcref/xml_template.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_tree.xml b/docsrc/xmlsource/funcref/xml_tree.xml
index bb69639..6eb58a3 100644
--- a/docsrc/xmlsource/funcref/xml_tree.xml
+++ b/docsrc/xmlsource/funcref/xml_tree.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_tree_doc.xml b/docsrc/xmlsource/funcref/xml_tree_doc.xml
index 52998d0..040941b 100644
--- a/docsrc/xmlsource/funcref/xml_tree_doc.xml
+++ b/docsrc/xmlsource/funcref/xml_tree_doc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_tree_doc_media_type.xml b/docsrc/xmlsource/funcref/xml_tree_doc_media_type.xml
index 49fd6ca..f27e9ba 100644
--- a/docsrc/xmlsource/funcref/xml_tree_doc_media_type.xml
+++ b/docsrc/xmlsource/funcref/xml_tree_doc_media_type.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_uri_get.xml b/docsrc/xmlsource/funcref/xml_uri_get.xml
index d7223f9..51e837d 100644
--- a/docsrc/xmlsource/funcref/xml_uri_get.xml
+++ b/docsrc/xmlsource/funcref/xml_uri_get.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_uri_merge.xml b/docsrc/xmlsource/funcref/xml_uri_merge.xml
index 8374d3e..91eb656 100644
--- a/docsrc/xmlsource/funcref/xml_uri_merge.xml
+++ b/docsrc/xmlsource/funcref/xml_uri_merge.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_validate_dtd.xml b/docsrc/xmlsource/funcref/xml_validate_dtd.xml
index df75a7f..7ca77a6 100644
--- a/docsrc/xmlsource/funcref/xml_validate_dtd.xml
+++ b/docsrc/xmlsource/funcref/xml_validate_dtd.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_validate_schema.xml b/docsrc/xmlsource/funcref/xml_validate_schema.xml
index 9bf302a..d28f609 100644
--- a/docsrc/xmlsource/funcref/xml_validate_schema.xml
+++ b/docsrc/xmlsource/funcref/xml_validate_schema.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_view_dtd.xml b/docsrc/xmlsource/funcref/xml_view_dtd.xml
index 9068325..748132d 100644
--- a/docsrc/xmlsource/funcref/xml_view_dtd.xml
+++ b/docsrc/xmlsource/funcref/xml_view_dtd.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xml_view_schema.xml b/docsrc/xmlsource/funcref/xml_view_schema.xml
index 1bcde74..54fdaa1 100644
--- a/docsrc/xmlsource/funcref/xml_view_schema.xml
+++ b/docsrc/xmlsource/funcref/xml_view_schema.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xmlsql_update.xml b/docsrc/xmlsource/funcref/xmlsql_update.xml
index 40c7cfe..93cf062 100644
--- a/docsrc/xmlsource/funcref/xmlsql_update.xml
+++ b/docsrc/xmlsource/funcref/xmlsql_update.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xmlupdate.xml b/docsrc/xmlsource/funcref/xmlupdate.xml
index 805443f..ccc6744 100644
--- a/docsrc/xmlsource/funcref/xmlupdate.xml
+++ b/docsrc/xmlsource/funcref/xmlupdate.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/_row.xml b/docsrc/xmlsource/funcref/xo/_row.xml
index 1a2916e..ea08268 100644
--- a/docsrc/xmlsource/funcref/xo/_row.xml
+++ b/docsrc/xmlsource/funcref/xo/_row.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/lh_get_handler.xml b/docsrc/xmlsource/funcref/xo/lh_get_handler.xml
index af56c39..0a8df4e 100644
--- a/docsrc/xmlsource/funcref/xo/lh_get_handler.xml
+++ b/docsrc/xmlsource/funcref/xo/lh_get_handler.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/lh_load_handler.xml b/docsrc/xmlsource/funcref/xo/lh_load_handler.xml
index 571e42b..66716d6 100644
--- a/docsrc/xmlsource/funcref/xo/lh_load_handler.xml
+++ b/docsrc/xmlsource/funcref/xo/lh_load_handler.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/make_oid.xml b/docsrc/xmlsource/funcref/xo/make_oid.xml
index 85e7620..914b1f5 100644
--- a/docsrc/xmlsource/funcref/xo/make_oid.xml
+++ b/docsrc/xmlsource/funcref/xo/make_oid.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/matches_like.xml b/docsrc/xmlsource/funcref/xo/matches_like.xml
index 33ad170..868042d 100644
--- a/docsrc/xmlsource/funcref/xo/matches_like.xml
+++ b/docsrc/xmlsource/funcref/xo/matches_like.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/new_mail.xml b/docsrc/xmlsource/funcref/xo/new_mail.xml
index f66df02..addfc40 100644
--- a/docsrc/xmlsource/funcref/xo/new_mail.xml
+++ b/docsrc/xmlsource/funcref/xo/new_mail.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/new_news.xml b/docsrc/xmlsource/funcref/xo/new_news.xml
index fa71fb6..3f12952 100644
--- a/docsrc/xmlsource/funcref/xo/new_news.xml
+++ b/docsrc/xmlsource/funcref/xo/new_news.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/oid_class_spec.xml b/docsrc/xmlsource/funcref/xo/oid_class_spec.xml
index 91062a8..4e9e2ac 100644
--- a/docsrc/xmlsource/funcref/xo/oid_class_spec.xml
+++ b/docsrc/xmlsource/funcref/xo/oid_class_spec.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/openxml.xml b/docsrc/xmlsource/funcref/xo/openxml.xml
index 87ebc26..bbd002d 100644
--- a/docsrc/xmlsource/funcref/xo/openxml.xml
+++ b/docsrc/xmlsource/funcref/xo/openxml.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/row_column.xml b/docsrc/xmlsource/funcref/xo/row_column.xml
index 5b5e923..cd10892 100644
--- a/docsrc/xmlsource/funcref/xo/row_column.xml
+++ b/docsrc/xmlsource/funcref/xo/row_column.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/row_deref.xml b/docsrc/xmlsource/funcref/xo/row_deref.xml
index c3d2d11..f59b5aa 100644
--- a/docsrc/xmlsource/funcref/xo/row_deref.xml
+++ b/docsrc/xmlsource/funcref/xo/row_deref.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/row_identity.xml b/docsrc/xmlsource/funcref/xo/row_identity.xml
index 0fa9981..ed79d1b 100644
--- a/docsrc/xmlsource/funcref/xo/row_identity.xml
+++ b/docsrc/xmlsource/funcref/xo/row_identity.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/row_table.xml b/docsrc/xmlsource/funcref/xo/row_table.xml
index dffac5e..76fd1f3 100644
--- a/docsrc/xmlsource/funcref/xo/row_table.xml
+++ b/docsrc/xmlsource/funcref/xo/row_table.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/sqlfunctions_old_obsolete.xml b/docsrc/xmlsource/funcref/xo/sqlfunctions_old_obsolete.xml
index 246b46e..01cad36 100644
--- a/docsrc/xmlsource/funcref/xo/sqlfunctions_old_obsolete.xml
+++ b/docsrc/xmlsource/funcref/xo/sqlfunctions_old_obsolete.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/vt_create_ftt.xml b/docsrc/xmlsource/funcref/xo/vt_create_ftt.xml
index c87082e..0b07934 100644
--- a/docsrc/xmlsource/funcref/xo/vt_create_ftt.xml
+++ b/docsrc/xmlsource/funcref/xo/vt_create_ftt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xo/xml_view_schema.xml b/docsrc/xmlsource/funcref/xo/xml_view_schema.xml
index 1de5da0..1d9e8a6 100644
--- a/docsrc/xmlsource/funcref/xo/xml_view_schema.xml
+++ b/docsrc/xmlsource/funcref/xo/xml_view_schema.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xpath_eval.xml b/docsrc/xmlsource/funcref/xpath_eval.xml
index 9f082c1..0946b40 100644
--- a/docsrc/xmlsource/funcref/xpath_eval.xml
+++ b/docsrc/xmlsource/funcref/xpath_eval.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xper_cut.xml b/docsrc/xmlsource/funcref/xper_cut.xml
index 655e703..38b7d6e 100644
--- a/docsrc/xmlsource/funcref/xper_cut.xml
+++ b/docsrc/xmlsource/funcref/xper_cut.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xper_doc.xml b/docsrc/xmlsource/funcref/xper_doc.xml
index 76f84de..c5fa0e0 100644
--- a/docsrc/xmlsource/funcref/xper_doc.xml
+++ b/docsrc/xmlsource/funcref/xper_doc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xper_locate_words.xml b/docsrc/xmlsource/funcref/xper_locate_words.xml
index 80dc570..f7b06d6 100644
--- a/docsrc/xmlsource/funcref/xper_locate_words.xml
+++ b/docsrc/xmlsource/funcref/xper_locate_words.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xper_navigation.xml b/docsrc/xmlsource/funcref/xper_navigation.xml
index 1ccab33..54cb5ce 100644
--- a/docsrc/xmlsource/funcref/xper_navigation.xml
+++ b/docsrc/xmlsource/funcref/xper_navigation.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xpf_extension.xml b/docsrc/xmlsource/funcref/xpf_extension.xml
index 669b7bd..679399d 100644
--- a/docsrc/xmlsource/funcref/xpf_extension.xml
+++ b/docsrc/xmlsource/funcref/xpf_extension.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xpf_extension_remove.xml b/docsrc/xmlsource/funcref/xpf_extension_remove.xml
index ec0e26b..357d857 100644
--- a/docsrc/xmlsource/funcref/xpf_extension_remove.xml
+++ b/docsrc/xmlsource/funcref/xpf_extension_remove.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xquery_eval.xml b/docsrc/xmlsource/funcref/xquery_eval.xml
index 4b86908..c3236ac 100644
--- a/docsrc/xmlsource/funcref/xquery_eval.xml
+++ b/docsrc/xmlsource/funcref/xquery_eval.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xslt.xml b/docsrc/xmlsource/funcref/xslt.xml
index 0deecdd..7f1dd60 100644
--- a/docsrc/xmlsource/funcref/xslt.xml
+++ b/docsrc/xmlsource/funcref/xslt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xslt_format_number.xml b/docsrc/xmlsource/funcref/xslt_format_number.xml
index f4b3415..be25db6 100644
--- a/docsrc/xmlsource/funcref/xslt_format_number.xml
+++ b/docsrc/xmlsource/funcref/xslt_format_number.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xslt_prof_enable.xml b/docsrc/xmlsource/funcref/xslt_prof_enable.xml
index 785f2c0..e9f2750 100644
--- a/docsrc/xmlsource/funcref/xslt_prof_enable.xml
+++ b/docsrc/xmlsource/funcref/xslt_prof_enable.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xslt_sheet.xml b/docsrc/xmlsource/funcref/xslt_sheet.xml
index 3ebd3e9..d37e157 100644
--- a/docsrc/xmlsource/funcref/xslt_sheet.xml
+++ b/docsrc/xmlsource/funcref/xslt_sheet.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xslt_stale.xml b/docsrc/xmlsource/funcref/xslt_stale.xml
index f6a7237..6b5be38 100644
--- a/docsrc/xmlsource/funcref/xslt_stale.xml
+++ b/docsrc/xmlsource/funcref/xslt_stale.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xte_head.xml b/docsrc/xmlsource/funcref/xte_head.xml
index 119da83..fe9cfad 100644
--- a/docsrc/xmlsource/funcref/xte_head.xml
+++ b/docsrc/xmlsource/funcref/xte_head.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xte_node.xml b/docsrc/xmlsource/funcref/xte_node.xml
index 8c71ed0..28518ee 100644
--- a/docsrc/xmlsource/funcref/xte_node.xml
+++ b/docsrc/xmlsource/funcref/xte_node.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xte_node_from_nodebld.xml b/docsrc/xmlsource/funcref/xte_node_from_nodebld.xml
index 1c12f06..20ce640 100644
--- a/docsrc/xmlsource/funcref/xte_node_from_nodebld.xml
+++ b/docsrc/xmlsource/funcref/xte_node_from_nodebld.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xte_nodebld_acc.xml b/docsrc/xmlsource/funcref/xte_nodebld_acc.xml
index 18518f5..2b0ed98 100644
--- a/docsrc/xmlsource/funcref/xte_nodebld_acc.xml
+++ b/docsrc/xmlsource/funcref/xte_nodebld_acc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xte_nodebld_final.xml b/docsrc/xmlsource/funcref/xte_nodebld_final.xml
index a1e8ed8..488a5af 100644
--- a/docsrc/xmlsource/funcref/xte_nodebld_final.xml
+++ b/docsrc/xmlsource/funcref/xte_nodebld_final.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xte_nodebld_init.xml b/docsrc/xmlsource/funcref/xte_nodebld_init.xml
index 8e32cb5..ebf1e38 100644
--- a/docsrc/xmlsource/funcref/xte_nodebld_init.xml
+++ b/docsrc/xmlsource/funcref/xte_nodebld_init.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/xtree_doc.xml b/docsrc/xmlsource/funcref/xtree_doc.xml
index dcdd410..55b0408 100644
--- a/docsrc/xmlsource/funcref/xtree_doc.xml
+++ b/docsrc/xmlsource/funcref/xtree_doc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/funcref/year.xml b/docsrc/xmlsource/funcref/year.xml
index 8536edc..5a7b172 100644
--- a/docsrc/xmlsource/funcref/year.xml
+++ b/docsrc/xmlsource/funcref/year.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/functions.xml b/docsrc/xmlsource/functions.xml
index 0200138..3a0e2ed 100644
--- a/docsrc/xmlsource/functions.xml
+++ b/docsrc/xmlsource/functions.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -100,7 +100,7 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &concat; &concatenate; &connection_get; &connection_id; &connection_is_dirty;
 &connection_set; &connection_vars; &connection_vars_set; &contains;
 &cov_load; &cov_report; &cov_store; &createXML; &curdate;
-&current_charset; &vacuum;
+&current_charset; &vacuum; &sparql_to_sql_text;
 
 &dateadd; &datediff; &datestring; &datestring_gmt;
 &dav_api_add; &dav_api_change; &dav_api_lock; &dav_api_search; &dav_api_user;
@@ -128,16 +128,16 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &get_certificate_info; &get_keyword; &get_keyword_ucase; &get_timestamp;
 &getdate; &gvector_sort; &gvector_digit_sort; &gz_compress; &gz_uncompress;
 
-&hour; &http; &http_acl_set; &http_acl_get; &http_acl_remove; &http_body_read; &http_client; &http_client_ext; &http_client_ip;
+&hour; &http; &http_lock; &http_unlock; &http_acl_set; &http_acl_get; &http_acl_remove; &http_body_read; &http_client; &http_client_ext; &http_client_ip;
 &http_debug_log; &http_enable_gz; &http_file; &http_flush;
 &http_get; &http_header; &http_header_get; &http_kill; &http_listen_host; &http_map_table;
 &http_map_get; &http_param; &http_path; &http_pending_req; &http_physical_path; &http_proxy;
-&http_request_header; &http_request_header_full; &http_request_status; &http_request_get; &http_rewrite; &http_root; &http_value;
+&http_request_header; &http_request_header_full; &http_request_status; &http_request_get; &http_rewrite; &http_root; &http_value; &json_parse;
 &http_url; &http_xslt; &urlrewrite_create_regex_rule;
 
 &identity_value; &import_clr; &import_jar; &initcap; &internal_to_sql_type; &internal_type;
 &internal_type_name; &isarray; &isblob; &isbinary; &isdouble; &isentity;
-&isfloat; &isinteger; &isnull; &isnumeric; &isstring; &iszero;
+&isfloat; &isinteger; &isnull; &isnumeric; &isfinitenumeric; &isstring; &iszero; &__min; &__max; &__max_notnull; &__min_notnull;
 
 &java_call_method; &java_set_property; &java_get_property;
 &java_load_class; &java_new_object; &java_vm_attach; &java_vm_detach;
@@ -146,7 +146,7 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &lcase; &ldap_search; &ldap_delete; &ldap_add; &ldap_modify;
 &left; &length; &lfs_exp; &lh_get_handler; &lh_load_handler;
 &locate; &log; &log10; &log_enable; &log_text;
-&lower; <rim;
+&lower; <rim; &__dbf_set;
 
 &make_array; &make_string; &md5; &md5_init; &md5_update;
 &md5_final; &mime_body; &mime_part; &mime_tree; &minute; &mod; &month;
@@ -166,13 +166,13 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &randomize; &rclose; &regexp_match; &regexp_parse; &regexp_substr;
 &rdf_audit_metadata; &rdf_backup_metadata; &rdf_void_store;
 <!-- TBD: &rdf_load_turtle; -->
-&rdf_restore_metadata; &rdf_load_rdfxml_mt; &rdf_load_rdfxml; &rdf_load_rdfa; &ttlp; &ttlp_mt; &ttlp_mt_local_file;
-&rdf_triples_to_rdf_xml_text;&rdf_triples_to_ttl;&rdf_64bit_upgrade;
+&rdf_restore_metadata; &rdf_load_rdfxml_mt; &rdf_load_rdfxml; &rdf_load_rdfa; &ld_dir; &ttlp; &ttlp_mt; &ttlp_mt_local_file; &rdf_datatype_of_obj; 
+&rdf_triples_to_rdf_xml_text; &rdf_triples_to_ttl; &rdf_64bit_upgrade; &rdf_view_sync_to_physical;
 &rdf_convert_rdfxml_to_ttl; &rdf_graph_group_create; &rdf_graph_group_ins; &rdfs_rule_set;
-&rdf_geo_fill; &rdf_geo_add; &rdf_graph_collect_fp_list; &rdf_graph_diff; &rdf_suo_apply_patch;
+&rdf_graph_collect_fp_list; &rdf_graph_diff; &rdf_suo_apply_patch;
 &rdf_suo_diff_ttl; &sparql_rdb2rdf_codegen; &sparql_rdb2rdf_list_tables; &sparql_select_known_graphs;
 &rowvector_digit_sort; <!-- &rowvector_subj_sort; -->
-&isref;
+ &isref; &SAMPLE; &GROUP_CONCAT; &GROUP_DIGEST; &http_nt_triple; &http_ttl_triple; 
 
 &ann_phrase_class_add; &ann_phrase_class_del; &ap_build_match_list; &ap_add_phrases;
 
@@ -224,7 +224,7 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &string_output_flush; &string_output_gz_compress; &string_output_string;
 &string_to_file; &strrchr; &strstr; &subseq; &substring; &sub_schedule;
 &system; &sys_db_stat; &sys_lockdown; &sys_stat; &sys_stat_analyze; &sys_stat_histogram;
-&table_set_policy; &table_drop_policy;
+&table_set_policy; &table_drop_policy; &strcontains; &starts_with; &ends_with;
 
 &tcpip_gethostbyname; &tcpip_gethostbyaddr;
 
@@ -247,7 +247,7 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &user_set_password; &username; &uudecode; &uuencode; &uuvalidate;
 
 &vad_check; &vad_check_installability; &vad_check_uninstallability; &vad_fail_check;
-&vad_install; &vad_load_file;	&vad_pack; &vad_safe_exec; &vad_uninstall;
+&vad_install; &vad_load_file;	&vad_load_sql_file; &vad_pack; &vad_safe_exec; &vad_uninstall;
 &vd_remote_data_source; &vd_remote_proc_wrapper; &vd_remote_table; &vd_statistics;
 &vdd_disconnect_data_source; &vdd_measure_rpc_time; &vector; &vector_concat;
 &vhost_define; &vhost_remove; &virtuoso_ini_path; &server_root; &vsp_calculate_digest; &vt_batch;
@@ -262,6 +262,7 @@ built-in functions of the Virtuoso XPATH Processor.  These can be used in XPATH,
 &xenc_key_aes_rand_create; &xenc_key_create_cert; &xenc_key_dsa_create; &xenc_key_exists; &xenc_key_inst_create;
 &xenc_key_remove; &xenc_key_serialize; &xenc_set_primary_key;
 &xenc_x509_ss_generate; &xenc_x509_generate; &xenc_pkcs12_export; &xenc_pem_export; &xenc_SPKI_read; &xenc_bn2dec;
+&xenc_key_rsa_create; &xenc_x509_csr_generate; &xenc_x509_from_csr;
 
 &xte_head; &xte_node; &xte_node_from_nodebld;
 &xte_nodebld_acc; &xte_nodebld_final; &xte_nodebld_init;
diff --git a/docsrc/xmlsource/hooks.xml b/docsrc/xmlsource/hooks.xml
index c4afe59..ee81011 100644
--- a/docsrc/xmlsource/hooks.xml
+++ b/docsrc/xmlsource/hooks.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/inprocess.xml b/docsrc/xmlsource/inprocess.xml
index 7f6fd23..3cfb362 100644
--- a/docsrc/xmlsource/inprocess.xml
+++ b/docsrc/xmlsource/inprocess.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/installation.xml b/docsrc/xmlsource/installation.xml
index a57c8b8..13af9bc 100644
--- a/docsrc/xmlsource/installation.xml
+++ b/docsrc/xmlsource/installation.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -24,5782 +24,174 @@
 <chapter label="installation.xml" id="installation">
 	<title>Installation Guide</title>
 	<abstract>
-<para>This chapter applies exclusively to the various commercial releases of Virtuoso.  If you are working with the open source version, please refer to the instructions on the web site where you obtained it.  
+		<para>This chapter applies exclusively to the various commercial releases of Virtuoso.  If you are working with the open source version, please refer to the instructions on the web site where you obtained it.  
 </para>
-<para>
+		<para>
 This chapter describes how to install OpenLink Virtuoso VDBMS.  It 
 contains both a quick start install guide and full walk through install guides 
 for major platforms.</para>
-
-  <para>Virtuoso has been designed from the ground-up to be easy to implement.</para>
-	<para>The installation generally runs without problems, run the setup program or script and follow
+		<para>Virtuoso has been designed from the ground-up to be easy to implement.</para>
+		<para>The installation generally runs without problems, run the setup program or script and follow
 	the on screen instruction prompts.  You will be asked some questions, if in any doubt please follow
 	the instructions in this guide in order to install and configure your Virtuoso components correctly. </para>
-
-	<para>Once installed, each instance of Virtuoso is controlled by an
+		<para>Once installed, each instance of Virtuoso is controlled by an
 INI (initialization) file.  This file links the Virtuoso Server
 process with an actual database file or device.  For example, the demo
 instance of Virtuoso on all platforms is controlled by the demo.ini
 file that is found in the demo directory along with the demo.db and
 related files.  There is a one-to-one relationship between server
 processes and database files.</para>
-
-<para>The INI file is a text file consisting of keys and key values.
+		<para>The INI file is a text file consisting of keys and key values.
 You will set several of these values during installation.  At any time
 thereafter, their values can be changed by editing the INI file with a
 standard text editor.</para>
-
-<para>The details of the INI file sections, keys, and the meanings of
-the key values are described in the <link
-linkend="configsrvstupfiles">Configuring Server Startup Files</link>
+		<para>The details of the INI file sections, keys, and the meanings of
+the key values are described in the <link linkend="configsrvstupfiles">Configuring Server Startup Files</link>
 section.
 </para>
-
-</abstract>
-
-
-
-	<sect1 id="installwin32">
-		<title>Virtuoso for Windows</title>
-		<sect2 id="b4ustart">
-			<title>Before You Start</title>
-			<para>To ensure a smooth installation, please review the
-    following checklist before you start the setup program.</para>
-			<sect3 id="haveudld">
-				<title>Have you downloaded the software?</title>
-				<para>If you have not already done so, please download your copy of OpenLink
-    Virtuoso from the OpenLink web site.  The URL is 
-    <ulink url="http://www.openlinksw.com">http://www.openlinksw.com</ulink>.
-    When you visit the site, select "Download & Evaluation". </para>
-                                <orderedlist>
-                                   <listitem>
-                                     <para>Select product "OpenLink Virtuoso: Personal Edition "</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>From "Product Category" choose "Universal Server"</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>From "Product" choose "Virtuoso Universal Server"</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>Select "Database Version"</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>From "server OS" select "Windows" and click "Next"</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>Select a release and click "Next"</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>You will be prompt to login in not already.</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>Click "Next"</para>
-                                   </listitem>
-                                   <listitem>
-                                     <para>Download the desired component. For example, click the HTTP link for "Multi-Threaded Universal Server (Commercial Edition)  for OpenLink Virtuoso 4.x"</para>
-                                   </listitem>
-                                </orderedlist>
-			</sect3>
-			<sect3 id="douhavelic">
-				<title>Do you have the License file?</title>
-				<para>The server will need a license file, and this is automatically delivered by email
-				as part of the download process. It is therefore important to supply a valid email
-				address. The installer will prompt for the license file location.</para>
-			</sect3>
-			
-			  <sect3 id="srvadminstallreqt"><title>Installation Requirements</title>
-    <para>A typical installation will require a minimum of 400Mb of hard disk
-    space to install the code, samples, documentation and sample database.
-The database will need additional space for data inserted, backups, logs and reports, web pages, etc.
-</para>
-    <para>The size of the database .db file will not reduce when data is
-    removed. The spare space will however be reclaimed for later use.</para>
-  </sect3>
-    
-  <sect3 id="srvadmopreq"><title>Operational Requirements</title>
-    <para>The Virtuoso database requires a minimum of 64Mb of system memory
-    for each instance to operate in. Each connection will take between 70kb
-    and 130kb of memory.</para>
-    <para>The memory usage is affected by the following parameters in the
-    <link linkend="VIRTINI">Virtuoso configuration file</link>.</para>
-    <simplelist>
-      <member>ServerThreads</member>
-      <member>ServerThreadSize</member>
-      <member>MainThreadSize</member>
-      <member>FutureThreadSize</member>
-      <member>NumberOfBuffers</member>
-    </simplelist>
-    <para>See the following <link linkend="parameters">Parameter section</link>
-    for more details.</para>
-  </sect3>
-
-  <sect3 id="srvadmossupport"><title>Operating System Support</title>
-    <para>Virtuoso runs on the following operating systems:</para>
-    <simplelist>
-      <member>Windows</member>
-      <member>Linux</member>
-      <member>Unix: AIX, HP-UX, Solaris, etc.</member>
-      <member>Mac OS X</member>
-    </simplelist>
-  </sect3>
-
-
-<sect3 id="limitsandparameters">
-<title>Limits</title>
-
-<para>
-The below table lists the most important parameters and limits for a database or a Virtuoso server instance.  For space consumption of individual data types, see <link linkend="SpaceConsump">Space Consumption</link>.
-</para>
-
-
-<table colsep="1" frame="all" rowsep="0" shortentry="0" tocentry="1" tabstyle="decimalstyle" orient="land" pgwide="0">
-  <title>Limits</title>
-  <tgroup align="char" charoff="50" char="." cols="2">
-  <colspec align="left" colnum="1" colsep="0" colwidth="20pc"/>
-    <thead>
-      <row>
-        <entry>Limit Description</entry>
-        <entry>Value</entry>
-      </row>
-    </thead>
-    <tbody>	
-<row><entry>Identifier length</entry><entry>100</entry></row>
-<row><entry>User name and password length</entry><entry>100</entry></row>
-<row><entry>SQLstmt and proc text</entry><entry>100K+</entry></row>
-<row><entry>varchar length</entry><entry>Constrained by max row length when stored into non-LOB column, 10MB inside procedure code.</entry></row>
-<row><entry>Numeric precision</entry><entry>Max 40 digits</entry></row>
-<row><entry>LOB column length</entry><entry>2GB</entry></row>
-<row><entry>row length</entry><entry>4086</entry></row>
-<row><entry>Columns per row</entry><entry>200</entry></row>
-<row><entry>Database size</entry><entry>32TB for data, 32TB for temp data </entry></row>
-<row><entry>Page size</entry><entry>8K</entry></row>
-<row><entry>File size</entry><entry>64 bit file offsets on supporting OS's</entry></row>
-<row><entry>Files per database</entry><entry>unlimited</entry></row>
-<row><entry>Table size</entry><entry>Up to database size </entry></row>
-<row><entry>Tables per database</entry><entry>64K keys, a table takes 1 key for primary key, 1 key per index and 1 key for each obsolete primary key layout  resulting from adding or dropping columns.</entry></row>
-<row><entry>Indexes per table</entry><entry>Unlimited, subject to global cap on keys.</entry></row>
-<row><entry>Row in sorting/distinct temp</entry><entry>4078b, as in tables </entry></row>
-<row><entry>Locks per transaction</entry><entry>Depends on memory, 16b per row lock, 60b per page with at least one row lock.</entry></row>
-<row><entry>Changes per transaction</entry><entry>Depends on memory, ini parameter allows cap on  rollback before image.</entry></row>
-<row><entry>Virtual memory></entry><entry>Depends on OS, 64 bit pointers on 64 bit platforms</entry></row>
-<row><entry>Threads</entry><entry>Depends on OS, ini files specifies cap for pool for SQL client and web server worker thread pools.</entry></row>
-<row><entry>Max connections</entry><entry>Depends on OS fdset size, at least 2048, license can set a limit</entry></row>
-<row><entry>Memory per connection</entry><entry>22K plus up to 100 cached SQL statement compilations</entry></row>
-</tbody>
- </tgroup>
-</table>
-
-  </sect3>
-
-
-			<sect3 id="reinstvirt">
-				<title>Reinstalling Virtuoso?</title>
-				<para>If you are reinstalling Virtuoso, you must first shutdown any
-    additional database servers you have configured on non default ports.
-    The databases on port 1111 and 1112 will automatically be stopped during the install process.
-    On Windows NT/2000/XP, go to the services applet in the Control Panel.  There 
-    you can stop services that appear with names of the form "OpenLink 
-    Virtuoso DBMS Server [instance name]".</para>
-				<para>On Windows NT/2000/XP you can also shut them down with the following
-    commands in the Virtuoso\bin directory:</para>
-				<programlisting>
-virtuoso-odbc-t.exe +service stop
-virtuoso-odbc-t.exe +instance myinstance +service stop
-virtuoso-odbc-t.exe +instance anotherinstance +service stop
-</programlisting>
-
-<note><title>Note:</title>
-<para>There is an alternative executable available for Virtuoso 
-called: virtuoso-odbc-f.exe, which you may have installed.  This version is 
-designed for versions of Windows that offer no native threading support 
-such as Windows 98, and offers no advantages over virtuoso-odbc-t.exe 
-for Windows NT/2000/XP.</para></note>
-
-				<para>You can list the services with their status using:</para>
-				<programlisting>virtuoso +service list</programlisting>
-			</sect3>
-			<sect3 id="allocoftcpports">
-				<title>Allocation of TCP/IP ports</title>
-				<para>The Default database have the following port allocations:</para>
-<table><title>Port Usage</title>
-  <tgroup cols="2">
- <thead><row><entry>Port</entry><entry>Used by</entry></row></thead>
- <tbody>
-<row>
-  <entry>1111</entry>
-  <entry>Default Virtuoso Server port</entry></row>
-<row>
-  <entry>8889</entry>
-  <entry>Default Virtuoso Visual Server Administration Interface HTTP port</entry></row>
-    </tbody>
-  </tgroup>
-</table>
-				<para>By default, the Virtuoso DBMS listens on port 1111.
-    This port number is not selectable at install time.
-    If the port is currently in use by another server then after the installation completes
-    you will need to change the port number in the Local Virtuoso ODBC DSN that is created
-    during the installation process, and also in the following file:</para>
-				<programlisting>
-C:\Program Files\OpenLink Software\Virtuoso 5.0\bin\virtuoso.ini
-</programlisting>
-				<para>To check if a port is in use on NT, you can use the
-    following command, and review the output:</para>
-				<programlisting>
-netstat -an | more
-</programlisting>
-			</sect3>
-			<sect3 id="prevworkodbcdsn">
-				<title>Do you already have an ODBC Data Source Name (DSN) that works?</title>
-				<para>The Virtual Database aspects of the Virtuoso for ODBC assumes that you already
-	have an ODBC driver on your machine from a database vendor, OpenLink Software, or from another 3rd party vendor.
-	It is a useful sanity-check to ensure that you have an ODBC System Data Source Name (DSN) on your
-    machine, and that it successfully connects to your database, and that it retrieve
-    data.  Any ODBC compliant tool can be used to test that your ODBC Data Source Name
-    (DSN) works, such as the sample application we provide - C++ Demo32, and that it is
-    sufficiently robust to operate with Virtuoso. Virtuoso is ODBC Driver Independent and
-    certified to work with any drivers that are ODBC level 1 or higher.</para>
-			</sect3>
-		</sect2>
-		<sect2 id="knowthywinvirt">
-			<title>Getting To Know Your Virtuoso Components</title>
-			<para>Virtuoso is made up of several components, these components
-    fall into two distinct categories: Client Components and Server Components.</para>
-			<sect3 id="clicomppack">
-				<title>Client Components Package</title>
-				<para>These are the components typically used to communicate with
-    a local or remote Virtuoso server, this includes: </para>
-				<simplelist>
-					<member>Virtuoso Drivers for ODBC</member>
-					<member>Virtuoso Drivers for JDBC</member>
-					<member>ISQL Utility</member>
-					<member>ISQLO Utility</member>
-					<member>Documentation</member>
-					<member>Samples</member>
-				</simplelist>
-			</sect3>
-			<sect3 id="srvcomp">
-				<title>Server Components</title>
-				<para>These are the components that service Virtuoso clients,
-				    these include:</para>
-				<simplelist>
-					<member>
-					Virtuoso Virtual Database Servers for: ODBC based
-					interfaces - the files "virtuoso-odbc-f" (for Virtuoso Lite)
-				        and "virtuoso-odbc-t" (For Virtuoso Enterprise Edition).
-					</member>
-					<member>Virtuoso HTTP Server.
-					</member>
-					<member>Virtuoso System Manager to configure the database
-					through the HTTP interface.
-					</member>
-				</simplelist>
-			</sect3>
-		</sect2>
-		<sect2 id="InstallStepsWin">
-			<title>Installation Steps</title>
-			<para>You can install Virtuoso in any one of the following
-    configurations: Stand-Alone, 2-Tier Client-Server, or 3-Tier Client-Server.</para>
-			<sect3 id="standalone">
-				<title>Stand-Alone Configuration</title>
-				<para>In this scenario you have one machine making up your entire
-    solution, which implies that your Applications, Virtuoso's client and server components,
-    and the back end database engine(s) that you want to access via Virtuoso all reside on the
-    same machine. </para>
-                                <para>Virtuoso Personal Edition Release 5.0 Installation on Windows</para>
-				<orderedlist>
-					<listitem>
-						<para>Double click on the Virtuoso Personal Edition installer (for example "ntvpz2zz.msi") to run the Windows installer.</para>
-                                                <figure id="winpersinst001" float="1">
-							<title>Run the installer</title>
-							<graphic fileref="inst/v50pex8601.png" width="194" depth="62"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>The installer Welcome dialog is loaded:</para>
-						<figure id="winpersinst002" float="1">
-							<title>The Welcome Screen</title>
-							<graphic fileref="inst/v50pex8602.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>Review the license agreement and 'agree' to the terms:</para>
-						<figure id="winpersinst003" float="1">
-							<title>License Agreement</title>
-							<graphic fileref="inst/v50pex8603.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>If a license file already exists the installer can place this in the correct
-location for use. Browse to the location of your installer file and the installer will use this for the
-Virtuoso Server. Alternatively the "Try & Buy" feature of the installer can be used to enable
-a trial or full license file to be obtained online:</para>
-						<figure id="winpersinst004" float="1">
-							<title>The License File Location</title>
-							<graphic fileref="inst/v50pex8604.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>Choose to obtain a Trial license for an evaluation or enter the shop
-            site to purchase a full license.</para>
-						<figure id="winpersinst005" float="1">
-							<title>The obtain Trial license screen</title>
-							<graphic fileref="inst/v50pex8605.png" width="976" depth="682"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>Click on the "Download License" button on the right to obtain the
-            license file immediately. An e-mail will also be sent with details of the license and the location on the ODS account
-            of the registered user where in can be obtained from at a later date. Once a license file is available on the machine
-            use the "Browse" button to locate it and the "Set License" button to initialize the Virtuoso
-            server with this license file.</para>
-						<figure id="winpersinst006" float="1">
-							<title>The Download license screen</title>
-							<graphic fileref="inst/v50pex8606.png" width="976" depth="680"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>Select the Installation Type to be performed from the options presented:</para>
-						<figure id="winpersinst007" float="1">
-							<title>Setup Type</title>
-							<graphic fileref="inst/v50pex8607.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>If the custom option was chosen, the installer prompts for the
-            Destination folder of the installation.</para>
-						<figure id="winpersinst008" float="1">
-							<title>Choose Destination Location</title>
-							<graphic fileref="inst/v50pex8608.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>Select the Product Features to be installed.</para>
-						<figure id="winpersinst009" float="1">
-							<title>Select Components</title>
-							<graphic fileref="inst/v50pex8609.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>The Installation is now ready to proceed.</para>
-						<figure id="winpersinst010" float="1">
-							<title>Proceed Installation</title>
-							<graphic fileref="inst/v50pex8610.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>The Progress of the installation is indicated in the Status bar.</para>
-						<figure id="winpersinst011" float="1">
-							<title>Status bar</title>
-							<graphic fileref="inst/v50pex8611.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>The installation is now complete.</para>
-						<figure id="winpersinst012" float="1">
-							<title>Complete Installation</title>
-							<graphic fileref="inst/v50pex8612.png" width="508" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>The installer may prompt for the machine to be reboot if required.</para>
-						<figure id="winpersinst013" float="1">
-							<title>Reboot prompt</title>
-							<graphic fileref="inst/v50pex8613.png" width="436" depth="161"/>
-						</figure>
-					</listitem>
-					<listitem>Post installation the Virtuoso Server can be started by running the "Virtuoso
-Service Manager" which gets added to the Windows "Icons Tray" in the status bar.
-                                           <figure id="winpinst14" float="1">
-                                             <title>Post installation</title>
-                                             <graphic fileref="ui/winpinst14.png"/>
-						</figure>
-					</listitem>
-                                        <listitem>Double click on the "Virtuoso Service Manager" icon in the "Icons Tray" to load
-the application, select the "OpenLink Virtuoso Server" instance and press the "Start" button to run
-the Service.
-                                          <figure id="winpinst15" float="1">
-                                            <title>Virtuoso Service Manager</title>
-                                            <graphic fileref="ui/winpinst15.png"/>
-                                          </figure>
-                                        </listitem>
-                                        <listitem>Once the Virtuoso service has successfully started, it is recommended that
-the default "dba" and "dav" passwords be changed to secure values by loading the URL
-"http://localhost:8890/install" in a Web Browser which loads the following page for making these changes:
-                                          <figure id="winpinst16" float="1">
-                                            <title>Default passwords</title>
-                                            <graphic fileref="ui/winpinst16.png"/>
-                                          </figure>
-                                        </listitem>
-                                        <listitem>The Virtuoso Server Welcome page will now be displayed indicating the server is
-online. This Web based page can be used for general configuration and usage of the Virtuoso Server:
-                                            <figure id="winpinst17" float="1">
-                                              <title>Virtuoso Server Welcome page</title>
-                                              <graphic fileref="ui/winpinst17.png"/>
-						</figure>
-					</listitem>
-				</orderedlist>
-                                        <para>The installation Virtuoso Universal Server is complete.</para>
-			</sect3>
-			<sect3 id="TwoTierConfigInst">
-			<title>2-Tier Client-Server Configuration</title>
-			<para>In this scenario you have two logically distinct machine
-    types making up your total solution, one machine hosts your Applications and Virtuoso
-    client components, while the other hosts your Virtuoso and back-end Database Servers. This
-    installation configuration format will allow Windows client machines to communicate with non
-    Windows server machines running Virtuoso, it also allows Virtuoso clients on non Windows
-    client machines to connect to Virtuoso servers on Windows server machines.</para>
-			<sect4 id="twotierclicomp">
-				<title>Client Components:</title>
-				<orderedlist>
-					<listitem>
-						<para>Move the Virtuoso installation archive into a temporary
-					        installation folder on your Client machine</para>
-					</listitem>
-					<listitem>
-						<para>Choose the Client install option.
-						No further component selection will be required.</para>
-						<figure id="wininst103" float="1">
-							<title>Setup Screens</title>
-							<graphic fileref="inst/12clienttype.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>The installer will now extract and install your Virtuoso Client components</para>
-					</listitem>
-				</orderedlist>
-			</sect4>
-			<sect4 id="twotiersrvcomp">
-				<title>Server Components:</title>
-				<orderedlist>
-					<listitem>
-						<para>Move the Virtuoso installation archive into a temporary
-					        installation folder on your Server machine.</para>
-					</listitem>
-					<listitem>
-						<para>Choose the Server install option.</para>
-						<figure id="wininst203" float="1">
-							<title>Setup Screens</title>
-							<graphic fileref="inst/13installtype.png" width="504" depth="386"/>
-						</figure>
-					</listitem>
-					<listitem>
-						<para>At the component selection, uncheck the "Virtuoso Drivers for ODBC"
-						and "Virtuoso Drivers for JDBC" and the "Samples" check-boxes
-						since you are only installing Virtuoso's Server components on this machine.</para>
-					</listitem>
-					<listitem>
-						<para>The installer will now extract and install your Virtuoso Server components.</para>
-					</listitem>
-				</orderedlist>
-			</sect4>
-			</sect3>
-			<sect3 id="ThreeTierConfigInst">
-				<title>3-Tier Client-Server Configuration</title>
-				<para>In this scenario you have three logically distinct machine
-    types making up your total solution, the first machine hosts your Applications and
-    Virtuoso client components (Client Machine), the second hosts your Virtuoso server,
-    (Middle Tier Server Machine) and the third machine your back end Database Server (Database
-    Server Machine). This installation configuration format will allow Windows client machines
-    to communicate with non Windows middle-tier server machines running Virtuoso, as well as
-    allowing Virtuoso clients on non Windows client machines to connect to Virtuoso servers on
-    windows based middle-tier server machines. </para>
-				<sect4 id="threetierclicomp">
-					<title>Client Components:</title>
-					<orderedlist>
-						<listitem>
-							<para>Move the Virtuoso installation archive into a temporary
-						        installation folder on your Client machine</para>
-						</listitem>
-						<listitem>
-							<para>Choose the Client install option.
-							No further component selection will be required.</para>
-							<figure id="wininst303" float="1">
-								<title>Setup Screens</title>
-								<graphic fileref="inst/12clienttype.png" width="504" depth="386"/>
-							</figure>
-						</listitem>
-						<listitem>
-							<para>The installer will now extract and  install your Virtuoso Client components</para>
-						</listitem>
-					</orderedlist>
-				</sect4>
-				<sect4 id="threetiermidsrccomp">
-					<title>Middle-Tier Server Components:</title>
-					<para>You need to install both the Virtuoso client and server
-    components on this machine. This is due to the fact that in many cases this server will
-    double as an Application Server, which entails having  clients connecting to an
-    application service that uses Virtuoso for data access.</para>
-					<orderedlist>
-						<listitem>
-							<para>Move the Virtuoso installation archive into a temporary
-        installation folder on your Server machine.</para>
-						</listitem>
-						<listitem>
-							<para>Choose the Server install option.</para>
-							<figure id="wininst403" float="1">
-								<title>Setup Screens</title>
-								<graphic fileref="inst/13installtype.png" width="504" depth="386"/>
-							</figure>
-						</listitem>
-						<listitem>
-							<para>At the component selection, uncheck the "Sample Application" check-box then the
-		"Virtuoso Driver for ODBC" and "Virtuoso Drivers for JDBC"
-		check-boxes since you are only installing Virtuoso's Server components on this machine.</para>
-						</listitem>
-						<listitem>
-							<para>The installer will now extract and install your Virtuoso Server components.</para>
-						</listitem>
-					</orderedlist>
-					<para>You will not need to install anything on the remote database server since you will be connecting to remote
-    database either via ODBC or Native Drivers installed on this Server.</para>
-				</sect4>
-			</sect3>
-		</sect2>
-		
-		<sect2 id="wininstpost"><title>Post Installation</title>  
-  <sect3 id="wininstpostsan">
-			<title>Post-Installation Sanity Check</title>
-			<para>A quick way to check that the database is running, is to point a browser to the
-			http port. The following example URLs will show the System Manager for
-			the default, and the demo Virtuoso databases:</para>
-			<programlisting>http://localhost:8889
-http://localhost:8890
-http://a_virtuoso_server.org:8890</programlisting>
-		</sect3>
-		<sect3 id="wininstposttrb"><title>Troubleshooting DB Startup Failures</title>  
-  <para><emphasis>Install failure</emphasis></para> 
-  <para>Check the .log file in your Virtuoso installation db location, for ex:</para>
-<programlisting><![CDATA[
-	C:\Program Files\OpenLink Software\Virtuoso 6.0\db\virtuoso.log  
-]]></programlisting>  
-<para>which is for the database and log files etc. in order to review the installed files 
-binaries and databases (defaults) for issues if install fails.</para>
-   <para><emphasis>.lck existance</emphasis></para>   
-   <para>Check .log in case of .lck issue</para>
-   <para>Delete the .lck file and repeat the steps from above.</para>
-   <para><emphasis>.trx incompatiblity issue</emphasis></para>   
-   <para>Check .log in case of .trx incompatiblity issue</para>
-  </sect3> 
-  </sect2>
-  
-		<sect2 id="startvdbms">
-			<title>Starting Your Virtuoso Server</title>
-			<para>Due to subtle differences between the Windows 95 family (including Windows 98 and Windows ME) 
-				and the Windows NT family (including Windows 2000, Windows XP, Vista, Windows 7, Windows 2000 
-				Server, Windows Server 2003, and Windows Server 2008), specific instructions for starting and 
-				stopping your Virtuoso server are supplied for each Windows family.</para>
-			<sect3 id="winnt">
-				<title>Windows NT family</title>
-				<para>You can start your Virtuoso server in one of two ways,
-    automatically or manually, the default mode configured by your installer is Automatic.</para>
-				<sect4 id="winntautostart">
-					<title>Automatic Startup</title>
-					<para>Your Virtuoso servers (default and demonstration databases)
-    are configured at installation time as "Automatic Startup" services. Thus,
-    rebooting your machine after installation is all that is required in order for your
-    Virtuoso servers to be ready to start receiving connections from client applications.
-    The service is actually started during the installation, however some files may be locked, so
-    a reboot is required to complete the install.</para>
-				</sect4>
-				<sect4 id="winntmanstart">
-					<title>Manual Startup</title>
-					<para>You can manually start your Virtuoso server in one of two
-    ways, either via the "services" control panel applet or from within a DOS shell.
-    When doing this via the "Services" control panel Applet you need to simply open
-    up your control panel and click on the "services" applet. This will present you
-    with a screen similar to the one below:</para>
-					<figure id="inst016" float="1">
-						<title>Services Applet</title>
-						<graphic fileref="virtinst12.gif" width="505" depth="277"/>
-					</figure>
-					<para>Click the "Start" or "Stop" button in
-    order to start or stop a highlighted Virtuoso Server.</para>
-					<para>To start your Virtuoso servers manually using DOS command
-    prompts, start a DOS shell and then enter the following command:</para>
-					<programlisting>virtuoso-odbc-f +service start</programlisting>
-				</sect4>
-			</sect3>
-			<sect3 id="win9x">
-				<title>Windows 95 family</title>
-				<para>You can start your Virtuoso server under Windows 95/98 in
-    one of two ways, automatically or manually, the default mode configured by your installer
-    is Automatic.</para>
-				<sect4 id="win9xautostart">
-					<title>Automatic Startup</title>
-					<para>Your Virtuoso servers (default and demonstration databases)
-    are configured at installation time as "Automatic Startup" services. Thus,
-    rebooting your machine after installation is all that is required in order for your
-    Virtuoso servers to be ready to start receiving connections from client applications.</para>
-					<para>If Virtuoso does not start  automatically on Windows
-    95/98 after installation you will need to add the following line to the system's
-    "autoexec.bat" file (assuming you have installed Virtuoso using the installers
-    default installation folder):</para>
-					<programlisting>C:\Program Files\OpenLink\Virtuoso\bin\virtuoso-odbc-f +service start</programlisting>
-				</sect4>
-				<sect4 id="sect4win9xmanstart">
-					<title>Manual Startup</title>
-					<para>You can start your Virtuoso servers manually by
-					entering the following commands at the DOS command line prompt:</para>
-					<programlisting>
-virtuoso-odbc-f +service start
-virtuoso-odbc-f +instance demo +service start
-</programlisting>
-					<note>
-						<title>Note:</title>
-						<para>If you encounter a "Program
-    Not Found" error this is because your Virtuoso installation's "bin"
-    sub-directory is not part of your PATH environment variable. </para>
-					</note>
-				</sect4>
-			</sect3>
+	</abstract>
+	<sect1 id="installallplatforms">
+		<title>Virtuoso on All platforms Commmon Specifics</title>
+		<sect2 id="srvadminstallreqt">
+			<title>Installation Requirements</title>
+			<para>A typical installation will require a minimum of 400Mb of hard disk space to install the code, 
+      samples, documentation and sample database. The database will need additional space for data inserted, 
+      backups, logs and reports, web pages, etc.</para>
+			<para>The size of the database .db file will not reduce when data is removed. The spare space will 
+      however be reclaimed for later use.</para>
 		</sect2>
-	
-		<sect2 id="CreatingDeletingServices">
-			<title>Creating and Deleting Virtuoso Services </title>
-			<para>At sometime you may need to have multiple Virtuoso server
-    processes running on your Windows servers or simply need to add or delete existing
-    Virtuoso servers that have been registered with the "Services" control panel
-    applet. You do this by executing the following commands:</para>
-			<para>Adding new Virtuoso Server service: virtuoso-odbc-f +service create -I <your chosen service name></para>
-			<para>Deleting an existing Virtuoso service: virtuoso-odbc-f +service delete -I <service that you are deleting></para>
-			<para>Starting a new Virtuoso service manually: virtuoso-odbc-f +service start -I <service name> </para>
-			<para>Showing a list of existing Virtuoso services: virtuoso-odbc-f +service list</para>
-			<note>
-				<title>Note:</title>
-				<para>This functionality is only available on Windows NT/2000/XP.</para>
-        <para>Ensure that the services applet from the control panel is closed while 
-        issuing the above commands to prevent locking.</para>
-			</note>
-		</sect2>
-		<sect2 id="ConfiguringVirtuosoClients">
-			<title>Configuring Virtuoso Client Components</title>
-			<para>The Virtuoso client components set consists of the following:</para>
-
-      <simplelist>
-				<member>Virtuoso Driver for ODBC</member>
-				<member>Virtuoso Driver for JDBC</member>
-				<member>Native Virtuoso Interactive SQL Query (ISQL)</member>
-				<member>ODBC based Interactive SQL Query Utility (ISQLO)</member>
+		<sect2 id="srvadmopreq">
+			<title>Operational Requirements</title>
+			<para>The Virtuoso database requires a minimum of 64Mb of system memory for each instance to operate 
+      in. Each connection will take between 70kb and 130kb of memory.</para>
+			<para>The memory usage is affected by the following parameters in the
+    <link linkend="VIRTINI">Virtuoso configuration file</link>.</para>
+			<simplelist>
+				<member>ServerThreads</member>
+				<member>ServerThreadSize</member>
+				<member>MainThreadSize</member>
+				<member>FutureThreadSize</member>
+				<member>NumberOfBuffers</member>
 			</simplelist>
-
-      <para>The sections that follow address the configuration and
-    utilization of each one of these client components separately.</para>
-			<sect3 id="VirtuosoDriverODBC">
-				<title>Virtuoso Driver for ODBC</title>
-				<para>The Virtuoso Driver for ODBC conforms to both the ODBC
-    1.x,2.x,and 3.x versions of the ODBC specification, it implements Core, Level 1, Level 2,
-    and Extensions functionality. This driver enables you to communicate with local or remote
-    Virtuoso servers across any combination of platforms supported by Virtuoso.</para>
-				<para>At installation time two ODBC data source names (DSN's)
-    are created with default values by the Virtuoso installer, the first DSN named "Local
-    Virtuoso" provides a link to a local default Virtuoso database server instance, while
-    the other named "Local Virtuoso Demo" provides a link to a local Virtuoso server
-    for the Virtuoso demonstration database.</para>
-    <tip><title>See Also:</title>
-    <para>the <link linkend="virtdsnsetup">Data Access Interfaces</link> chapter for more detailed information
-    regarding the Virtuoso ODBC Driver setup</para>
-    </tip>
-			</sect3>
-			<sect3 id="VirtuosoDriverJDBC">
-				<title>Virtuoso Drivers for JDBC</title>
-				<para>The Virtuoso Drivers for JDBC are available in
-    "jar" file formats for the JDBC 1.x, JDBC 2.x and JDBC 3.x JDBC specifications. These
-    are Type 4 Drivers implying that utilization is simply a case of adding the relevant
-    "jar" file to your CLASSPATH and then providing an appropriate JDBC URL format
-    in order to establish a JDBC session with a local or remote Virtuoso server. It is
-    important to note that when you make a JDBC connection to a Virtuoso Server, you do also
-    have access to Native and External Virtuoso tables. Thus, you actually have a type 4 JDBC
-    Driver for any number of different database types that have been linked into Virtuoso.</para>
-
-    <tip><title>See Also:</title>
-    <para>The <link linkend="VirtuosoDriverJDBC">JDBC Driver</link> section in 
-    the Access Interfaces chapter.</para></tip>
-
-    </sect3>
-
-			<sect3 id="ISQL">
-				<title>Native Virtuoso Interactive SQL Query (ISQL)</title>
-				<para>To assist you with the use of Virtuoso an
-    interactive SQL interpreter utility called "ISQL" is bundled with all Virtuoso
-    installations. This utility allows you to enter and execute SQL statements from a command
-    line prompt against a local or remote Virtuoso server.</para>
-				<para>The command line format for executing this utility is: </para>
-				<programlisting>
-isql [<hostname>][:<port#>]</programlisting>
-				<para>The steps that follow guide you through the process of
-    using ISQL to verify your Virtuoso installation:</para>
-				<orderedlist>
-					<listitem>
-						<para>Open up a DOS shell</para>
-					</listitem>
-					<listitem>
-						<para>Move into the "bin" sub-directory of your
-        Virtuoso installation</para>
-					</listitem>
-					<listitem>
-						<para>Type the following command: isql</para>
-						<para>This will connect you to the default Virtuoso server at port "1111", if you want
-        to connect to your demonstration Virtuoso database (which listens at port 1112 by default)
-        then enter: isql 1112</para>
-					</listitem>
-					<listitem>
-						<para>At the ISQL command line prompt type in the following
-        command: </para>
-						<programlisting>
-tables ;</programlisting>
-						<para>This will produce a list of tables in the current Virtuoso database, you can also enter
-        other SQL statements e.g.: </para>
-						<programlisting>
-select * from Customers</programlisting>
-						<para>This will produce a listing of records in the "Customers" table.</para>
-					</listitem>
-					<listitem>
-						<para>If you are not able to perform these task that it implies
-        that your Virtuoso database server is not running or that it has not been installed
-        properly.</para>
-					</listitem>
-				</orderedlist>
-			</sect3>
-			<sect3 id="ISQLO">
-				<title>ODBC based Interactive SQL Query Utility (ISQLO)</title>
-				<para>In addition to a Native ISQL utility, your Virtuoso
-    installation includes an ODBC based version of "ISQL" called "ISQLO",
-    this enable you to connect to ODBC DSN's rather than Virtuoso only. To use this program
-    perform the following steps: </para>
-				<orderedlist>
-					<listitem>
-						<para>Open up a DOS shell</para>
-					</listitem>
-					<listitem>
-						<para>Move into the "bin" sub-directory of your
-        Virtuoso installation</para>
-					</listitem>
-					<listitem>
-						<para>Type the following command :</para>
-						<programlisting>
-isqlo <enter a valid ODBC Data Source Name></programlisting>
-						<note>
-							<title>Note:</title>
-							<para>If your DSN contains spaces you will need to enclose it within
-        double quotes when passing it as a parameter to ISQLO</para>
-						</note>
-					</listitem>
-					<listitem>
-						<para>Enter any valid SQL at the ISQLO command line prompt.</para>
-					</listitem>
-					<listitem>
-						<para>You can also use this utility from within the Virtuoso Conductor</para>
-					</listitem>
-				</orderedlist>
-			</sect3>
-		</sect2>
-		<sect2 id="defpasschgwin">
-			<title>Default passwords</title>
-			<para>See the following Quick Start chapter for very important information about
-			<link linkend="defpasschange">changing the default passwords</link>.</para>
-		</sect2>
-
-	</sect1>
-	<!-- ############################################################# -->
-	<sect1 id="linuxinstall">
-		<title>Virtuoso for Linux (Enterprise Edition)</title>
-			<!--sect2 id="lindoyouwannamigrate">
-				<title>Existing Virtuoso 2.7 Users</title>
-				<para>You can migrate your existing Virtuoso servers to 3.0 using 
-        the migration utility.  The Virtuoso database file structure has been considerably 
-        altered between versions.  Please consult the 
-        <link linkend="migrate27to30">Migration of Virtuoso from Version 2.7 to Version 3.0</link>
-        section for more details.</para>
-			</sect2-->
-		<sect2 id="b4instlin">
-			<title>Before You Install</title>
-			<para>To ensure a smooth installation, please review the
-      following checklist before you start the setup program.</para>
-			<sect3 id="linhavudld">
-				<title>Have you downloaded the software?</title>
-				<para>If you have not already done so, please download your copy of OpenLink
-      Virtuoso from the Virtuoso web site.  The URL is
-		<ulink url="http://www.openlinksw.com/virtuoso/">http://www.openlinksw.com/virtuoso/</ulink>.
-		When you visit the site, select "Software Download".</para>
-			</sect3>
-			<sect3 id="linreinstvirt">
-				<title>Reinstalling Virtuoso?</title>
-				<para>If you are reinstalling Virtuoso, you must first stop
-      the Database Servers. You can shut these services down with the following command
-      executed from your Linux shell prompt:</para>
-				<para>Beta 1 Users</para>
-				<programlisting>sh virtuoso-lite.rc stop</programlisting>
-				<para>or</para>
-				<programlisting>virtuoso-lite.rc stop</programlisting>
-				<para>or</para>
-				<programlisting>./virtuoso-lite.rc stop</programlisting>
-				<para>Beta 2 Users</para>
-				<programlisting>sh virtuoso-stop.sh</programlisting>
-				<para>or</para>
-				<programlisting>virtuoso-stop.sh</programlisting>
-				<para>or</para>
-				<programlisting>./virtuoso-stop.sh</programlisting>
-				<para>You may also want to first uninstall prior Virtuoso RPM packages.</para>
-				<para>The following command (executed as root) can be used to uninstall the package:</para>
-				<programlisting>rpm -e virtuoso-lite-1.1-3_glibc2</programlisting>
-				<para>or</para>
-				<programlisting>rpm -e virtuoso-enterprise-1.1-3_glibc2</programlisting>
-				<para>or</para>
-				<programlisting>rpm -e virtuoso-lite-1.1-3_libc5</programlisting>
-				<para>depending on Linux system and Virtuoso Server being used.</para>
-			</sect3>
-			<sect3 id="linportsfree">
-				<title>Are ports 1111,1112, 8889 and 8890 free?</title>
-				<para>During the installation you will be prompted for an HTTP port number for
-				use by each Virtuoso System Manager. If you are already running a web server
-      or other listener on that port, you will encounter problems, and should choose another
-      free port when you are prompted.  </para>
-				<para>By default, the Virtuoso DBMS listens on port 1111, and the Demo Database
-      on 1112. If these ports is currently in use by another server then after the installation completes,
-      you will need to change the port numbers in the Local Virtuoso ODBC or UDBC DSN that is
-      created during the installation process, and also in the following file:</para>
-				<programlisting>$<Directory where Virtuoso is installed>/bin/virtuoso.ini</programlisting>
-				<para>typically</para>
-				<programlisting>/usr/local/virtuoso</programlisting>
-				<para>but can of course be any location of your choosing.</para>
-				<para>To check if a port is in use you can use the following command, and review the output:</para>
-				<programlisting>netstat -an | more </programlisting>
-			</sect3>
-			<sect3 id="lindouvirtuser">
-				<title>Do you already have a "virtuoso" user account on your Linux system?</title>
-				<para>Although this is no longer a requirement of the installation it
-may be suitable to create a new Virtuoso user account for administering the Virtuoso
-server.</para>
-			</sect3>
-			<sect3 id="liniodbc">
-				<title>Do you already have functional iODBC data sources on your system?</title>
-				<para>The OpenLink Virtuoso for Linux installation presumes the following:</para>
-				<simplelist>
-					<member>You intend to connect to a Local Virtuoso server using iODBC
-          or OpenLink  UDBC</member>
-					<member>You intend to connect to one or more Remote Virtuoso servers
-          on your network using iODBC or UDBC </member>
-					<member>You intend to Attach tables hosted within non-local or
-          Remote Virtuoso database servers, into a Local or Remote Virtuoso Server</member>
-					<member>The existence of functional OpenLink or third-party iODBC
-          drivers for Linux that connect to the non database servers referred to above.</member>
-					<member>In the absence of iODBC drivers for your non Virtuoso
-          database, that a functional OpenLink or third-party UDBC Drivers exists for these database
-          servers. </member>
-				</simplelist>
-				<para>Instructions on how to manually configure iODBC Data Source
-      Names is available at the following URL:
-      <ulink url="http://www.openlinksw.com/info/docs/rel3doc/unix/odbcsdk.htm">http://www.openlinksw.com/info/docs/rel3doc/unix/odbcsdk.htm</ulink>
-      If you are using OpenLink Multi-Tier ODBC
-      Drivers for your remote database connections then we highly recommend the use of the Virtuoso
-      System Manager for creating iODBC Data Source Names.</para>
-			</sect3>
-			<sect3 id="liniodbcdsnfunc">
-				<title>Are your iODBC Data Source Names functional?</title>
-				<para>It is a useful sanity-check to ensure that your iODBC or UDBC
-      data sources are functional, OpenLink provides an "odbctest" program for
-      verifying basic usability of iODBC data sources. Both of these programs reside in the
-      "samples" directory situated beneath the directory into which RPM installs
-      Virtuoso.</para>
-			</sect3>
-		</sect2>
-		<sect2 id="instproclinux">
-			<title>Installation Process</title>
-			<para>Once you have downloaded the required tar file from the
-web or ftp site and have placed the file in a designated installation directory you are
-ready to commence the Virtuoso installation process. </para>
-			<para>You may want to specify a new user to own the Virtuoso
-installation and then you can place the installation tar file into that users home
-directory.</para>
-<orderedlist>
-  <listitem><para>First step is to un-tar the file to obtain the install script 
-  and archive file.  Use the following command:</para>
-  <programlisting>tar xvf <tar file>.tar</programlisting>
-  <para>replacing <tar file> with the relevant name of the file you downloaded.</para></listitem>
-  <listitem><para>run the install script using the following command:</para>
-<programlisting>[virtuoso at myserver virtuoso]$ sh /install.sh</programlisting>
-  <para>The installation process will now begin and prompt you for required information.</para>
-</listitem>
-
-<listitem>
-<para>The install script will first try and detect running Virtuoso server instances.  
-In cases where an old Virtuoso server is being upgraded you must ensure that 
-the old Virtuoso is first shutdown.  It is advisable that you backup up your 
-systems before continuing.</para>
-<programlisting><![CDATA[
-Checking requested components
-Checking for existing installations and/or instances of Virtuoso...
- 7269 ?        00:06:23 virtuoso
-/proc/net/tcp: Permission denied
-
-** Alert: [running processes; ]
-
-** Warning: You have Virtuoso previously installed on this machine.
-** 
-** To avoid existing data being overwritten or lost, you may press ^C to
-** exit this installer, terminate and remove the existing installation,
-** or proceed taking care to enter non-conflicting data below, by pressing
-** Enter.
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>If you are upgrading a server then the installer will save copies of 
-old configuration data for later use.</para>
-<programlisting><![CDATA[
-Preserving any existing configurations...
-find: db: No such file or directory
-find: demo: No such file or directory
-find: bin: No such file or directory
-0 blocks
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>You should have received a license file via email.  This file should be 
-copied to the server installation directory prior to installation.  The installer 
-will ask you for its location if none is found.  If you do not have the license 
-file at this time the installer will still continue.</para>
-<programlisting><![CDATA[
-Checking licensing...
-
-A license file is required for the Virtuoso Server Instance(s) to
-start. Please enter the full path and name of a valid Virtuoso
-license file [./virtuoso.lic]:
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now the installer will continue to install files from the package.  Every 
-file installed will be echoed to the screen.  </para>
-<programlisting><![CDATA[
-Unpacking enterprise.tar.Z
-bin/
-bin/v27/
-bin/v27/bin/
-...
-...
-vsp/releasenotes.css
-vsp/releasenotes.html
-vsp/vsp_auth.sql
-...done
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>When the files have been installed from the package the location 
-supplied for the license file will be checked.  If one is not found then you will 
-receive the following warning:</para>
-<programlisting><![CDATA[
-**
-**  WARNING: The license file entered is not valid or does not exist.
-**           You will need to copy a valid license file manually 
-**           to the demo and db directories after the Virtuoso installation completes.
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso server installation has a few variations.  The next question 
-from the installer asks which one you want to make default.  Even though each 
-variation is installed, a convenient symbolic link will be made to 
-<computeroutput>bin/virtuoso</computeroutput> from the selected type.  
-Running <computeroutput>ls -l</computeroutput> in the bin directory after 
-installation will reveal all.</para>
-<programlisting><![CDATA[
-Checking for installed optional components...
-Please choose which Virtuoso server you wish to install:
-  1) Universal Server
-  2) Universal Server with iODBC
-  3) Universal Server with iODBC and support for Java
-  4) Universal Server with iODBC and support for PHP
-  5) Universal Server with iODBC and support for Java and PHP
-  6) Universal Server with iODBC and support for CLR Hosting via Mono
-  7) Universal Server with iODBC and support for CLR and Java
-  8) Universal Server with iODBC and support for CLR, Java and PHP4
-
-[8] :
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The installer will search for required third-party components 
-depending on which option is selected in the previous step.  For example, choosing 
-the Virtuoso with Java support will require a Java runtime.  Results of the 
-search are listed as suggestions from which you can confirm or type 
-the actual location.</para>
-<programlisting><![CDATA[
-Attempting to locate the java runtime library (libjvm.so)...
-
-Suggested file locations: 
-/usr/local/lib
-/usr/local/jdk1.3/jre/lib/i386/classic
-/usr/local/jdk1.3/jre/lib/i386/server
-/usr/local/jdk1.3/jre/lib/i386/client
-/usr/opt/blackdown-jdk-1.3.1/jre/lib/i386/classic
-/usr/opt/blackdown-jdk-1.3.1/jre/lib/i386/server
-/usr/opt/blackdown-jdk-1.3.1/jre/lib/i386/client
-/usr/local/jdk1.3/jre/lib/i386/classic
-/usr/local/jdk1.3/jre/lib/i386/server
-/usr/local/jdk1.3/jre/lib/i386/client
-
-Please select one of the above locations or press Enter to use
-the default (/usr/local/jdk1.3/jre/lib/i386/client):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso installer includes a Mono runtime distribution, since 
-Mono is a developing platform you may have your own installation that you 
-can supply the path to here.</para>
-<programlisting><![CDATA[
-Please enter the full path to the Mono installation directory or
-Enter to use the default (/home/openlink/virtuoso/mono)
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Virtuoso now has enough information to configure its environment and 
-startup scripts.</para>
-<programlisting><![CDATA[
-Setting up initial values in scripts and config files
-Setting up file bin/odbc.ini
-Setting up file bin/odbcinst.ini
-Setting up file bin/demo-start.sh
-Setting up file bin/demo-stop.sh
-Setting up file bin/virtuoso-start.sh
-Setting up file bin/virtuoso-stop.sh
-Setting up file db/virtuoso.ini
-Setting up file demo/demo.ini
-Setting up file mono/bin/mcs
-Setting up file virtuoso-enterprise.csh
-Setting up file virtuoso-enterprise.sh
-Setting up file initd_startup.template
-Setting up file initd_startup_demo.template
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The installer will now ask a series of questions for configuring the 
-Virtuoso .INI files.  First confirm or alter the default database SQL listener 
-port number.  This is the port number that this database will be available for 
-ODBC connections and iSQL sessions.</para>
-<programlisting><![CDATA[
-Configuring port numbers for default and demo databases
-
-Please enter a port on which to run the default database
-SQL listener (default 1111):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now you must specify the port number of the default database HTTP 
-listener.  This is the HTTP port that Virtuoso will listen on by default, you web-based 
-administration interface for Virtuoso will be found here.  If you confirm the 
-default of 8889, then your Virtuoso will be available from: 
-<computeroutput>http://server:8889/</computeroutput>, changing 
-server to the name of your machine appropriately.</para>
-<programlisting><![CDATA[
-Please enter a port on which to run the default database
-HTTP listener (default 8889):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now you must supply a friendly name that you wish to identify 
-your Virtuoso server by on the network using Zero Configuration.  </para>
-<tip><title>See Also:</title>
-<para>The <link linkend="rendezvous">Zero Configuration</link> section.</para></tip>
-<programlisting><![CDATA[
-Please enter a name for default database Zero Configuration
-(default "Virtuoso Universal Server at myserver:1111"):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Zero Configuration details need a default username to make the connection with.</para>
-<programlisting><![CDATA[
-Please enter a user name for default database Zero Configuration
-(default "dba"):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now we have all of the above details to supply again for the Demo Virtuoso 
-database.  The port number supplied here must be different to those supplied previously.</para>
-<programlisting><![CDATA[
-Please enter a port on which to run the demo database
-SQL listener (default 1112):
-
-Please enter a port on which to run the demo database
-HTTP listener (default 8890):
-
-Please enter a name for demonstration database Zero Configuration
-(default Virtuoso Universal Server (demonstration) at myserver:1112):
-
-Please enter a user name for demonstration database Zero Configuration
-(default demo):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso servers have default administrator usernames of "dba".  
-The "dba" accounts have the default password of "dba".  It is recommended that 
-you alter this as soon as possibly for security.  The installer now provides the 
-opportunity to do this the first time the server is started.</para>
-<programlisting><![CDATA[
-Changing passwords for the Database Universal Server
-
-Please enter a replacement for the Default Database Server's
-SQL Administrative (dba) account password (twice) :
-Confirm Password : 
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso servers have default WebDAV administrator usernames 
-of "dav".   The "dav" accounts have the default password of "dav".  It is 
-recommended that you alter this as soon as possibly for security.  
-The installer now provides the opportunity to do this the first time
-the server is started.</para>
-<programlisting><![CDATA[
-Please enter a replacement for the Default Database's
-WebDAV administrative (dav) account password (twice) :
-Confirm Password : 
-
-Please wait while the passwords are changed:
-
-Changing passwords for the Demo Universal Server
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Likewise for the Demo server, you can change the default passwords:</para>
-<programlisting><![CDATA[
-Please enter a replacement for the Demonstration Database Server's
-SQL Administrative (dba) account password (twice) :
-Confirm Password : 
-
-Please enter a replacement for the Demonstration Database Server's
-WebDAV Administrative (dav) account password (twice) :
-Confirm Password : 
-
-Please wait while the passwords are changed:
-done.
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The file owner and group is changed at the end of the installation.  You 
-can choose what these shall be set to.  By default the current user is selected.</para>
-<programlisting><![CDATA[
-Please enter the username:group for the user and group who should own
-files in this installation (default: openlink:openlink) :
-Setting owners:  
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Finally the installer can start Virtuoso servers installed for you, but 
-only if a valid license key has been supplied.</para>
-<programlisting><![CDATA[
-The Virtuoso Installer has not offered to start a database as
-no license key was found. Evaluation users should receive
-one via e-mail; in case of difficulties please contact 
-<Technical.Support at openlinksw.com>.
-]]></programlisting>
-</listitem>
-</orderedlist>
+			<para>See the following <link linkend="parameters">Parameter section</link> for more details.</para>
 		</sect2>
-		
-		   <sect2 id="linuxinstpost"><title>Post Installation</title>  
-  <sect3 id="linuxinstpostsan">
-			<title>Post-Installation Sanity Check</title>
-			<para>A quick way to check that the database is running, is to point a browser to the
-			http port. The following example URLs will show the System Manager for
-			the default, and the demo Virtuoso databases:</para>
-			<programlisting>http://localhost:8889
-http://localhost:8890
-http://a_virtuoso_server.org:8890</programlisting>
-		</sect3>
-		<sect3 id="linuxinstposttrb"><title>Troubleshooting DB Startup Failures</title>  
-  <para><emphasis>Install failure</emphasis></para> 
-  <para>Check the .log file in:</para>
-<programlisting><![CDATA[
-$<Directory where Virtuoso is installed>/bin/virtuoso.log
-]]></programlisting>  
- <para>in order to review the installed files binaries and databases (defaults) 
- for issues if install fails.</para>
-   <para><emphasis>.lck existance</emphasis></para>   
-   <para>Check .log in case of .lck issue</para>
-   <para>Delete the .lck file and repeat the steps from above.</para>
-   <para><emphasis>.trx incompatiblity issue</emphasis></para>   
-   <para>Check .log in case of .trx incompatiblity issue</para>
-  </sect3>
-		</sect2>
-  
-    <sect2 id="linautovirt"><title>Starting Virtuoso Automatically on Reboot</title>
-
-    <para>Two files, named initd_startup.template and 
-    initd_startup_demo.template, are placed in the top level of the
-    Virtuoso installation directory.  On systems using SysVinit (most Linux
-    distributions, Solaris) the appropriate one should be copied into
-    /etc/init.d/ and symlinks created in the rcN.d/ directories, e.g.:</para>
-
-<programlisting><![CDATA[
-bash# cp initd_startup.template /etc/init.d/virtuoso
-]]></programlisting>
-
-    <para>Perform some sanity checks here, that the directory it uses exists, etc:</para>
-
-<programlisting><![CDATA[
-bash# vi /etc/init.d/virtuoso
-]]></programlisting>
-
-    <para>Test that it works correctly:</para>
-
-<programlisting><![CDATA[
-bash# /etc/init.d/virtuoso stop
-bash# /etc/init.d/virtuoso start
-]]></programlisting>
-
-    <para>Finally, create symbolic links in the regular runlevel directories
-    pointing to that script:</para>
-
-<programlisting><![CDATA[
-bash# cd /etc/rc2.d ; ln -s ../init.d/virtuoso S99virtuoso
-bash# cd /etc/rc3.d ; ln -s ../init.d/virtuoso S99virtuoso
-bash# cd /etc/rc5.d ; ln -s ../init.d/virtuoso S99virtuoso
-]]></programlisting>
-
-    <para>Virtuoso should now start when the service is restarted.</para>
-    </sect2>
-
-		<sect2 id="defpasschglin">
-			<title>Default passwords</title>
-			<para>See the following Quick Start chapter for very important information about
-			<link linkend="defpasschange">changing the default passwords</link>.</para>
-		</sect2>
-	</sect1>
-	<sect1 id="unxinstvirt">
-		<title>Virtuoso for Unix (Enterprise Edition)</title>
-			<!--sect2 id="unixdoyouwannamigrate">
-				<title>Existing Virtuoso 2.7 Users</title>
-				<para>You can migrate your existing Virtuoso servers to 3.0 using 
-        the migration utility.  The Virtuoso database file structure has been considerably 
-        altered between versions.  Please consult the 
-        <link linkend="migrate27to30">Migration of Virtuoso from Version 2.7 to Version 3.0</link>
-        section for more details.</para>
-			</sect2-->
-		<sect2 id="b4instunx">
-			<title>Before You Install</title>
-			<para>To ensure a smooth installation, please review the
-      following checklist before you start the setup program.</para>
-			<sect3 id="unxdldsw">
-				<title>Have you downloaded the software?</title>
-				<para>If you have not already done so, please download your copy of OpenLink
-      Virtuoso from the Virtuoso web site.  The URL is
-		<ulink url="http://www.openlinksw.com/virtuoso/">http://www.openlinksw.com/virtuoso/</ulink>.
-		When you visit the site, select "Software Download".</para>
-			</sect3>
-			<sect3 id="unxreinstvirt">
-				<title>Reinstalling Virtuoso?</title>
-				<para>If you are reinstalling Virtuoso, you must first stop the Database Servers.
-				You can shut these services down with the following command
-				executed from your UNIX shell prompt:</para>
-				<programlisting>sh virtuoso-stop.sh </programlisting>
-				<para>or</para>
-				<programlisting>virtuoso-stop.sh</programlisting>
-				<para>or</para>
-				<programlisting>./virtuoso-stop.sh</programlisting>
-			</sect3>
-			<sect3 id="unxfreeports">
-				<title>Are ports 1111, 1112, 8889 and 8890 free?</title>
-				<para>During the installation you will be prompted for an HTTP port number for
-				use by each Virtuoso System Manager. If you are already running a web server
-      or other listener on that port, you will encounter problems, and should choose another
-      free port when you are prompted.  </para>
-				<para>By default, the Virtuoso DBMS listens on port 1111.
-      If this port is currently in use by another server then after the installation completes
-      you will need to change the port number in the Local Virtuoso ODBC or UDBC DSN that is
-      created during the installation process, and also in the following file:</para>
-				<programlisting>
-$<Installation Directory>/bin/virtuoso.ini</programlisting>
-				<para>typically</para>
-				<programlisting>/usr/home/virtuoso</programlisting>
-				<para>To check if a port is in use you can use the following
-      command, and review the output:</para>
-				<programlisting>netstat -an | more </programlisting>
-			</sect3>
-			<sect3 id="unxvirtuser">
-				<title>Do you already have a "virtuoso" user
-      account on your UNIX system ?</title>
-				<para>Please create a UNIX user account called "virtuoso".</para>
-			</sect3>
-			<sect3 id="unxiodbcexist">
-				<title>Do you already have functional iODBC data sources
-      on your system ?</title>
-				<para>The OpenLink Virtuoso for UNIX installation presumes the following:</para>
-				<simplelist>
-					<member>You intend to connect to a Local Virtuoso server using iODBC
-          or OpenLink  UDBC</member>
-					<member>You intend to connect to one or more Remote Virtuoso servers
-          on your network using iODBC or UDBC</member>
-					<member>You intend to Attach tables hosted within non-local or
-          Remote Virtuoso database servers, into a Local or Remote Virtuoso Server</member>
-					<member>The existence of functional OpenLink or third-party iODBC
-          drivers for UNIX that connect to the non database servers referred to above.</member>
-					<member>In the absence of iODBC drivers for your non Virtuoso
-          database, that a functional OpenLink or third-party UDBC Drivers exists for these database
-          servers. </member>
-				</simplelist>
-				<para>If you are using OpenLink Multi-Tier ODBC
-      Drivers for your remote database connections then we highly recommend the use of the Web
-      Assistant for creating iODBC Data Source Names.</para>
-			</sect3>
-			<sect3 id="unxiodbcfunc">
-				<title>Are your iODBC Data Source Names functional ?</title>
-				<para>It is a useful sanity-check to ensure that your iODBC or UDBC
-      data sources are functional, OpenLink provides an "odbctest" program for
-      verifying basic usability of iODBC data sources. Both of these programs reside in the
-      "samples" directory situated beneath the directory into which Virtuoso is
-      installed.</para>
-			</sect3>
-		</sect2>
-		<sect2 id="instprocunx"><title>Installation Process</title>
-			<para>Once you have downloaded the required tar file from the
-web or ftp site and have placed the file in a designated installation directory you are
-ready to commence the Virtuoso installation process. </para>
-			<para>You may want to specify a new user to own the Virtuoso
-installation and then you can place the installation tar file into that users home
-directory.</para>
-<orderedlist>
-  <listitem><para>First step is to un-tar the file to obtain the install script 
-  and archive file.  Use the following command:</para>
-  <programlisting>tar xvf <tar file>.tar</programlisting>
-  <para>replacing <tar file> with the relevant name of the file you downloaded.</para></listitem>
-  <listitem><para>run the install script using the following command:</para>
-<programlisting>[virtuoso at myserver virtuoso]$ sh /install.sh</programlisting>
-  <para>The installation process will now begin and prompt you for required information.</para>
-</listitem>
-
-<listitem>
-<para>The install script will first try and detect running Virtuoso server instances.  
-In cases where an old Virtuoso server is being upgraded you must ensure that 
-the old Virtuoso is first shutdown.  It is advisable that you backup up your 
-systems before continuing.</para>
-<programlisting><![CDATA[
-Checking requested components
-Checking for existing installations and/or instances of Virtuoso...
- 7269 ?        00:06:23 virtuoso
-/proc/net/tcp: Permission denied
-
-** Alert: [running processes; ]
-
-** Warning: You have Virtuoso previously installed on this machine.
-** 
-** To avoid existing data being overwritten or lost, you may press ^C to
-** exit this installer, terminate and remove the existing installation,
-** or proceed taking care to enter non-conflicting data below, by pressing
-** Enter.
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>If you are upgrading a server then the installer will save copies of 
-old configuration data for later use.</para>
-<programlisting><![CDATA[
-Preserving any existing configurations...
-find: db: No such file or directory
-find: demo: No such file or directory
-find: bin: No such file or directory
-0 blocks
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>You should have received a license file via email.  This file should be 
-copied to the server installation directory prior to installation.  The installer 
-will ask you for its location if none is found.  If you do not have the license 
-file at this time the installer will still continue.</para>
-<programlisting><![CDATA[
-Checking licensing...
-
-A license file is required for the Virtuoso Server Instance(s) to
-start. Please enter the full path and name of a valid Virtuoso
-license file [./virtuoso.lic]:
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now the installer will continue to install files from the package.  Every 
-file installed will be echoed to the screen.  </para>
-<programlisting><![CDATA[
-Unpacking enterprise.tar.Z
-bin/
-bin/v27/
-bin/v27/bin/
-...
-...
-vsp/releasenotes.css
-vsp/releasenotes.html
-vsp/vsp_auth.sql
-...done
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>When the files have been installed from the package the location 
-supplied for the license file will be checked.  If one is not found then you will 
-receive the following warning:</para>
-<programlisting><![CDATA[
-**
-**  WARNING: The license file entered is not valid or does not exist.
-**           You will need to copy a valid license file manually 
-**           to the demo and db directories after the Virtuoso installation completes.
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso server installation has a few variations.  The next question 
-from the installer asks which one you want to make default.  Even though each 
-variation is installed, a convenient symbolic link will be made to 
-<computeroutput>bin/virtuoso</computeroutput> from the selected type.  
-Running <computeroutput>ls -l</computeroutput> in the bin directory after 
-installation will reveal all.</para>
-<programlisting><![CDATA[
-Checking for installed optional components...
-Please choose which Virtuoso server you wish to install:
-  1) Universal Server
-  2) Universal Server with iODBC
-  3) Universal Server with iODBC and support for Java
-  4) Universal Server with iODBC and support for PHP
-  5) Universal Server with iODBC and support for Java and PHP
-  6) Universal Server with iODBC and support for CLR Hosting via Mono
-  7) Universal Server with iODBC and support for CLR and Java
-  8) Universal Server with iODBC and support for CLR, Java and PHP4
-
-[8] :
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The installer will search for required third-party components 
-depending on which option is selected in the previous step.  For example, choosing 
-the Virtuoso with Java support will require a Java runtime.  Results of the 
-search are listed as suggestions from which you can confirm or type 
-the actual location.</para>
-<programlisting><![CDATA[
-Attempting to locate the java runtime library (libjvm.so)...
-
-Suggested file locations: 
-/usr/local/lib
-/usr/local/jdk1.3/jre/lib/i386/classic
-/usr/local/jdk1.3/jre/lib/i386/server
-/usr/local/jdk1.3/jre/lib/i386/client
-/usr/opt/blackdown-jdk-1.3.1/jre/lib/i386/classic
-/usr/opt/blackdown-jdk-1.3.1/jre/lib/i386/server
-/usr/opt/blackdown-jdk-1.3.1/jre/lib/i386/client
-/usr/local/jdk1.3/jre/lib/i386/classic
-/usr/local/jdk1.3/jre/lib/i386/server
-/usr/local/jdk1.3/jre/lib/i386/client
-
-Please select one of the above locations or press Enter to use
-the default (/usr/local/jdk1.3/jre/lib/i386/client):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso installer includes a Mono runtime distribution, since 
-Mono is a developing platform you may have your own installation that you 
-can supply the path to here.</para>
-<programlisting><![CDATA[
-Please enter the full path to the Mono installation directory or
-Enter to use the default (/home/openlink/virtuoso/mono)
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Virtuoso now has enough information to configure its environment and 
-startup scripts.</para>
-<programlisting><![CDATA[
-Setting up initial values in scripts and config files
-Setting up file bin/odbc.ini
-Setting up file bin/odbcinst.ini
-Setting up file bin/demo-start.sh
-Setting up file bin/demo-stop.sh
-Setting up file bin/virtuoso-start.sh
-Setting up file bin/virtuoso-stop.sh
-Setting up file db/virtuoso.ini
-Setting up file demo/demo.ini
-Setting up file mono/bin/mcs
-Setting up file virtuoso-enterprise.csh
-Setting up file virtuoso-enterprise.sh
-Setting up file initd_startup.template
-Setting up file initd_startup_demo.template
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The installer will now ask a series of questions for configuring the 
-Virtuoso .INI files.  First confirm or alter the default database SQL listener 
-port number.  This is the port number that this database will be available for 
-ODBC connections and iSQL sessions.</para>
-<programlisting><![CDATA[
-Configuring port numbers for default and demo databases
-
-Please enter a port on which to run the default database
-SQL listener (default 1111):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now you must specify the port number of the default database HTTP 
-listener.  This is the HTTP port that Virtuoso will listen on by default, you web-based 
-administration interface for Virtuoso will be found here.  If you confirm the 
-default of 8889, then your Virtuoso will be available from: 
-<computeroutput>http://server:8889/</computeroutput>, changing 
-server to the name of your machine appropriately.</para>
-<programlisting><![CDATA[
-Please enter a port on which to run the default database
-HTTP listener (default 8889):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now you must supply a friendly name that you wish to identify 
-your Virtuoso server by on the network using Zero Configuration.  </para>
-<tip><title>See Also:</title>
-<para>The <link linkend="rendezvous">Zero Configuration</link> section.</para></tip>
-<programlisting><![CDATA[
-Please enter a name for default database Zero Configuration
-(default "Virtuoso Universal Server at myserver:1111"):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Zero Configuration details need a default username to make the connection with.</para>
-<programlisting><![CDATA[
-Please enter a user name for default database Zero Configuration
-(default "dba"):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Now we have all of the above details to supply again for the Demo Virtuoso 
-database.  The port number supplied here must be different to those supplied previously.</para>
-<programlisting><![CDATA[
-Please enter a port on which to run the demo database
-SQL listener (default 1112):
-
-Please enter a port on which to run the demo database
-HTTP listener (default 8890):
-
-Please enter a name for demonstration database Zero Configuration
-(default Virtuoso Universal Server (demonstration) at myserver:1112):
-
-Please enter a user name for demonstration database Zero Configuration
-(default demo):
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso servers have default administrator usernames of "dba".  
-The "dba" accounts have the default password of "dba".  It is recommended that 
-you alter this as soon as possibly for security.  The installer now provides the 
-opportunity to do this the first time the server is started.</para>
-<programlisting><![CDATA[
-Changing passwords for the Database Universal Server
-
-Please enter a replacement for the Default Database Server's
-SQL Administrative (dba) account password (twice) :
-Confirm Password : 
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The Virtuoso servers have default WebDAV administrator usernames 
-of "dav".   The "dav" accounts have the default password of "dav".  It is 
-recommended that you alter this as soon as possibly for security.  
-The installer now provides the opportunity to do this the first time
-the server is started.</para>
-<programlisting><![CDATA[
-Please enter a replacement for the Default Database's
-WebDAV administrative (dav) account password (twice) :
-Confirm Password : 
-
-Please wait while the passwords are changed:
-
-Changing passwords for the Demo Universal Server
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Likewise for the Demo server, you can change the default passwords:</para>
-<programlisting><![CDATA[
-Please enter a replacement for the Demonstration Database Server's
-SQL Administrative (dba) account password (twice) :
-Confirm Password : 
-
-Please enter a replacement for the Demonstration Database Server's
-WebDAV Administrative (dav) account password (twice) :
-Confirm Password : 
-
-Please wait while the passwords are changed:
-done.
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>The file owner and group is changed at the end of the installation.  You 
-can choose what these shall be set to.  By default the current user is selected.</para>
-<programlisting><![CDATA[
-Please enter the username:group for the user and group who should own
-files in this installation (default: openlink:openlink) :
-Setting owners:  
-]]></programlisting>
-</listitem>
-
-<listitem>
-<para>Finally the installer can start Virtuoso servers installed for you, but 
-only if a valid license key has been supplied.</para>
-<programlisting><![CDATA[
-The Virtuoso Installer has not offered to start a database as
-no license key was found. Evaluation users should receive
-one via e-mail; in case of difficulties please contact 
-<Technical.Support at openlinksw.com>.
-]]></programlisting>
-</listitem>
-</orderedlist>
-		</sect2>
-		
-   <sect2 id="unxinstvirtinstpost"><title>Post Installation</title>  
-  <sect3 id="unxinstvirtpost">
-			<title>Post-Installation Sanity Check</title>
-			<para>A quick way to check that the database is running, is to point a browser to the
-			http port. The following example URLs will show the System Manager for
-			the default, and the demo Virtuoso databases:</para>
-			<programlisting>http://localhost:8889
-http://localhost:8890
-http://a_virtuoso_server.org:8890</programlisting>
-		</sect3>
-		<sect3 id="unxinstvirtinstposttrb"><title>Troubleshooting DB Startup Failures</title>  
-  <para><emphasis>Install failure</emphasis></para> 
-  <para>Check the .log file in:</para>
-<programlisting><![CDATA[
-$<Directory where Virtuoso is installed>/bin/virtuoso.log
-]]></programlisting>  
- <para>in order to review the installed files binaries and databases (defaults) 
- for issues if install fails.</para>
-   <para><emphasis>.lck existance</emphasis></para>   
-   <para>Check .log in case of .lck issue</para>
-   <para>Delete the .lck file and repeat the steps from above.</para>
-   <para><emphasis>.trx incompatiblity issue</emphasis></para>   
-   <para>Check .log in case of .trx incompatiblity issue</para>
-  </sect3>
+		<sect2 id="srvadmossupport">
+			<title>Operating System Support</title>
+			<para>Virtuoso runs on the following operating systems:</para>
+			<simplelist>
+				<member>Windows</member>
+				<member>Linux</member>
+				<member>Unix: AIX, HP-UX, Solaris, etc.</member>
+				<member>Mac OS X</member>
+			</simplelist>
 		</sect2>
-
-    <sect2 id="unxautovirt"><title>Starting Virtuoso Automatically on Reboot</title>
-
-    <para>Two files, named initd_startup.template and 
-    initd_startup_demo.template, are placed in the top level of the
-    Virtuoso installation directory.  On systems using SysVinit (most Linux
-    distributions, Solaris) the appropriate one should be copied into
-    /etc/init.d/ and symlinks created in the rcN.d/ directories, e.g.:</para>
-
-<programlisting><![CDATA[
-bash# cp initd_startup.template /etc/init.d/virtuoso
-]]></programlisting>
-
-    <para>Perform some sanity checks here, that the directory it uses exists, etc:</para>
-
-<programlisting><![CDATA[
-bash# vi /etc/init.d/virtuoso
-]]></programlisting>
-
-    <para>Test that it works correctly:</para>
-
-<programlisting><![CDATA[
-bash# /etc/init.d/virtuoso stop
-bash# /etc/init.d/virtuoso start
-]]></programlisting>
-
-    <para>Finally, create symbolic links in the regular runlevel directories
-    pointing to that script:</para>
-
-<programlisting><![CDATA[
-bash# cd /etc/rc2.d ; ln -s ../init.d/virtuoso S99virtuoso
-bash# cd /etc/rc3.d ; ln -s ../init.d/virtuoso S99virtuoso
-bash# cd /etc/rc5.d ; ln -s ../init.d/virtuoso S99virtuoso
-]]></programlisting>
-
-    <para>Virtuoso should now start when the service is restarted.</para>
-    </sect2>
-
-    <sect2 id="defpasschgunx">
-			<title>Default passwords</title>
-			<para>See the following Quick Start chapter for very important information about
-			<link linkend="defpasschange">changing the default passwords</link>.</para>
+		<sect2 id="limitsandparameters">
+			<title>Limits</title>
+			<para>The below table lists the most important parameters and limits for a database or a Virtuoso 
+      server instance. For space consumption of individual data types, see 
+      <link linkend="SpaceConsump">Space Consumption</link>.</para>
+			<table colsep="1" frame="all" rowsep="0" shortentry="0" tocentry="1" tabstyle="decimalstyle" orient="land" pgwide="0">
+				<title>Limits</title>
+				<tgroup align="char" charoff="50" char="." cols="2">
+					<colspec align="left" colnum="1" colsep="0" colwidth="20pc"/>
+					<thead>
+						<row>
+							<entry>Limit Description</entry>
+							<entry>Value</entry>
+						</row>
+					</thead>
+					<tbody>
+						<row>
+							<entry>Identifier length</entry>
+							<entry>100</entry>
+						</row>
+						<row>
+							<entry>User name and password length</entry>
+							<entry>100</entry>
+						</row>
+						<row>
+							<entry>SQLstmt and proc text</entry>
+							<entry>100K+</entry>
+						</row>
+						<row>
+							<entry>varchar length</entry>
+							<entry>Constrained by max row length when stored into non-LOB column, 10MB inside procedure code.</entry>
+						</row>
+						<row>
+							<entry>Numeric precision</entry>
+							<entry>Max 40 digits</entry>
+						</row>
+						<row>
+							<entry>LOB column length</entry>
+							<entry>2GB</entry>
+						</row>
+						<row>
+							<entry>row length</entry>
+							<entry>4086</entry>
+						</row>
+						<row>
+							<entry>Columns per row</entry>
+							<entry>200</entry>
+						</row>
+						<row>
+							<entry>Database size</entry>
+							<entry>32TB for data, 32TB for temp data </entry>
+						</row>
+						<row>
+							<entry>Page size</entry>
+							<entry>8K</entry>
+						</row>
+						<row>
+							<entry>File size</entry>
+							<entry>64 bit file offsets on supporting OS's</entry>
+						</row>
+						<row>
+							<entry>Files per database</entry>
+							<entry>unlimited</entry>
+						</row>
+						<row>
+							<entry>Table size</entry>
+							<entry>Up to database size </entry>
+						</row>
+						<row>
+							<entry>Tables per database</entry>
+							<entry>64K keys, a table takes 1 key for primary key, 1 key per index and 1 key for each obsolete primary key layout  resulting from adding or dropping columns.</entry>
+						</row>
+						<row>
+							<entry>Indexes per table</entry>
+							<entry>Unlimited, subject to global cap on keys.</entry>
+						</row>
+						<row>
+							<entry>Row in sorting/distinct temp</entry>
+							<entry>4078b, as in tables </entry>
+						</row>
+						<row>
+							<entry>Locks per transaction</entry>
+							<entry>Depends on memory, 16b per row lock, 60b per page with at least one row lock.</entry>
+						</row>
+						<row>
+							<entry>Changes per transaction</entry>
+							<entry>Depends on memory, ini parameter allows cap on  rollback before image.</entry>
+						</row>
+						<row>
+							<entry>Virtual memory></entry>
+							<entry>Depends on OS, 64 bit pointers on 64 bit platforms</entry>
+						</row>
+						<row>
+							<entry>Threads</entry>
+							<entry>Depends on OS, ini files specifies cap for pool for SQL client and web server worker thread pools.</entry>
+						</row>
+						<row>
+							<entry>Max connections</entry>
+							<entry>Depends on OS fdset size, at least 2048, license can set a limit</entry>
+						</row>
+						<row>
+							<entry>Memory per connection</entry>
+							<entry>22K plus up to 100 cached SQL statement compilations</entry>
+						</row>
+					</tbody>
+				</tgroup>
+			</table>
 		</sect2>
 	</sect1>
-<sect1 id="unixpersonainstall">
-  <title>Virtuoso for Unix (Personal Edition)</title>
-  <sect2 id="unixpersonainstalldescr">
-    <title>Installation</title>
-    <para>Once the required tar file has been downloaded from the web or ftp site and
-placed in a designated installation directory the installation process is ready to
-commence. Choose or create a suitable user account to own your Virtuoso installation.
-    </para>
-    <itemizedlist>
-      <listitem>The first step is to un-tar the file to obtain the install script and
-archive file. Use the following command, replacing  with the relevant name of the file
-you downloaded:
-      </listitem>
-<programlisting><![CDATA[
-tar xvf <tar file>.tar
-]]></programlisting>
-      <listitem>
-If a license file exists place this in the same directory as installation files and it
-will be used during installation.
-      </listitem>
-      <listitem>
-If upgrading an existing Virtuoso instance ensure it is shutdown first and a backup of
-your database file is made, then run the install script using the following command:
-      </listitem>
-<programlisting><![CDATA[
-$ sh ./install.sh
-
-- Extracting Virtuoso Personal Edition v5.0
-
-- Creating default environment settings
-
-- Creating default database settings
-Installing new virtuoso.ini in $VIRTUOSO_HOME/database
-Installing new php.ini in $VIRTUOSO_HOME/database
-Creating symlink to $VIRTUOSO_HOME/bin/virtuoso-iodbc-t
-
-- Registering ODBC drivers
-
-- Registering .NET provider for Mono
-
-- Installing VAD packages in database (this can take some time)
-
-- Checking where license should be stored
-
-- Starting OpenLink License Manager
-
-- Checking for initial Virtuoso license
-
-- Starting Virtuoso server instance
-
-- Finalizing installation
-
-
-This concludes the first part of the installation.
-
-
-Please start a browser manually and open the following URL to finalize
-the installation process:
-
-     http://<hostname>:8890/install/
-
-
-Installation completed
-$
-]]></programlisting>
-    </itemizedlist>
-</sect2>
-   <sect2 id="unixpersonainstallinstpost"><title>Post Installation</title>  
-  <sect3 id="unixpersonainstallpost">
-			<title>Post-Installation Sanity Check</title>
-			<para>A quick way to check that the database is running, is to point a browser to the
-			http port. The following example URLs will show the System Manager for
-			the default, and the demo Virtuoso databases:</para>
-			<programlisting>http://localhost:8889
-http://localhost:8890
-http://a_virtuoso_server.org:8890</programlisting>
-		</sect3>
-		<sect3 id="unixpersonainstallinstposttrb"><title>Troubleshooting DB Startup Failures</title>  
-  <para><emphasis>Install failure</emphasis></para> 
-  <para>Check the .log file in:</para>
-<programlisting><![CDATA[
-$<Directory where Virtuoso is installed>/bin/virtuoso.log
-]]></programlisting>  
- <para>in order to review the installed files binaries and databases (defaults) 
- for issues if install fails.</para>
-   <para><emphasis>.lck existance</emphasis></para>   
-   <para>Check .log in case of .lck issue</para>
-   <para>Delete the .lck file and repeat the steps from above.</para>
-   <para><emphasis>.trx incompatiblity issue</emphasis></para>   
-   <para>Check .log in case of .trx incompatiblity issue</para>
-  </sect3>
-  </sect2>
-<sect2 id="unixpersonainstallconfg">
-    <title>Configuration</title>
-    <itemizedlist>
-      <listitem>Once the URL above has been loaded a browser the first page can be
-used to select a license file for use with the installation if one is not already
-in place, otherwise the task can be skipped using the button provided:
-        <figure id="v50peunx00" float="1">
-          <title>License file</title>
-	  <graphic fileref="inst/v50-pe-unx-00.png"/>
-        </figure>
-      </listitem>
-      <listitem>
-It is strongly advised that the standard "dba" and "dav" user account password be
-changed using the post installation page provided:
-        <figure id="v50peunx01" float="1">
-          <title>DAV/DBA authentication Setting page</title>
-	  <graphic fileref="inst/v50-pe-unx-01.png"/>
-        </figure>
-      </listitem>
-      <listitem>The post installation page is now complete and the Virtuoso Welcome
-page is presented:
-        <figure id="v50peunx02" float="1">
-          <title>Post installation page</title>
-	  <graphic fileref="inst/v50-pe-unx-02.png"/>
-        </figure>
-      </listitem>
-    </itemizedlist>
-    <para>The installation is now ready for use.</para>
-</sect2>
-        <sect2 id="installdemopersonaledition">
-		<title>Demo Database</title>
-           <para><link linkend="demodbinstallsteps">Installation steps</link>.</para>
-        </sect2>
-
-</sect1>
-<sect1 id="installmacosx"><title>Virtuoso for Mac OS X</title>
-
-			<!--sect2 id="macxdoyouwannamigrate">
-				<title>Existing Virtuoso 2.7 Users</title>
-				<para>You can migrate your existing Virtuoso servers to 3.0 using 
-        the migration utility.  The Virtuoso database file structure has been considerably 
-        altered between versions.  Please consult the 
-        <link linkend="migrate27to30">Migration of Virtuoso from Version 2.7 to Version 3.0</link>
-        section for more details.</para>
-			</sect2-->
-  <sect2 id="macosxbeforeuinst"><title>Before You Install</title>
-  <para>Before installing the Virtuoso software for Mac OS X you must ensure
-  that you have the correct package from the <ulink url="http://www.openlinksw.com/">OpenLink</ulink>
-  Web Site.</para>
-
-	</sect2>
-
-  <sect2 id="macosxinst"><title>Installation Process</title>
-
-  <para>Open the Virtuoso Personal Edition Disk Image file ntvpz2zz.dmg by either double clicking on
-        the DMG file in the Finder windows or using the "open" command from a Terminal window, to mount
-        the Disk Image containing the VirtuosoPersonalEdition.mpkg installer.
-  </para>
-
-  <figure id="v50pe00" float="1"><title>Mounting the Disk Image</title>
-    <graphic fileref="mac/v50pe00.png" width="250" depth="217"/></figure>
-
-  <para>The installer will load the Introduction page.
-  </para>
-
-  <figure id="v50pe01" float="1"><title>Installer Introduction Page</title>
-    <graphic fileref="mac/v50pe01.png" width="626" depth="445"/></figure>
-
-  <para>Review the Readme page for any important information concerning the product installation.
-  </para>
-
-  <figure id="v50pe02" float="1"><title>Important Information</title>
-    <graphic fileref="mac/v50pe02.png" width="624" depth="441"/></figure>
-
-  <para>Read the license agreement and "agree" to the terms.
-  </para>
-
-  <figure id="v50pe03" float="1"><title>Software License Agreement</title>
-    <graphic fileref="mac/v50pe03.png" width="621" depth="442"/></figure>
-
-  <para>Select the Destination volume the software is to be installed on.
-  </para>
-
-  <figure id="v50pe04" float="1"><title>Select Destination</title>
-    <graphic fileref="mac/v50pe04.png" width="622" depth="440"/></figure>
-
-  <para>Choose to perform and Easy(default) installation or click on the "customize" button to perform a Custom installation.
-  </para>
-
-  <figure id="v50pe05" float="1"><title>Selecting the Type of Installation</title>
-    <graphic fileref="mac/v50pe05.png" width="622" depth="440"/></figure>
-
-  <para>If the "Custom" option was selected in the previous step then select the packages to be installed.
-  </para>
-
-  <figure id="v50pe06" float="1"><title>Customizing the Installation</title>
-    <graphic fileref="mac/v50pe06.png" width="619" depth="449"/></figure>
-
-
-  <para>The software must be install by a user with Administrative privileges on the machine.
-  </para>
-
-  <figure id="v50pe07" float="1"><title>Identifying yourself as Administrator</title>
-    <graphic fileref="mac/v50pe07.png" width="437" depth="238"/></figure>
-
-  <para>The software components will be installed the status of which is indicated by the progress bar.
-  </para>
-
-  <figure id="v50pe08" float="1"><title>Preparing ... </title>
-    <graphic fileref="mac/v50pe08.png" width="623" depth="441"/></figure>
-
-  <para>The Virtuoso Server is started at the end of this process and a Web page loaded enabling you
-        to obtain a trial or full license from the company order processing site online.
-  </para>
-
-  <figure id="v50pe09" float="1"><title>Admin Assistant</title>
-    <graphic fileref="mac/v50pe09.png" width="737" depth="361"/></figure>
-
-  <para>Choose to obtain a Trial license for an evaluation or enter the shop site to purchase a full license.
-  </para>
-
-  <figure id="v50pe10" float="1"><title>The Trial license page</title>
-    <graphic fileref="mac/v50pe10.png" width="905" depth="693"/></figure>
-
-  <para>Click on the "Download License" button on the right to obtain the license file immediately.
-        An e-mail will also be sent with details of the license and the location on the ODS account of the
-        registered user where in can be obtained from at a later date. Once a license file is available on the
-        machine use the "Browse" button to locate it and the "Set License" button to
-        initialize the Virtuoso server with this license file.
-  </para>
-
-  <figure id="v50pe11" float="1"><title>Download license</title>
-    <graphic fileref="mac/v50pe11.png" width="881" depth="759"/></figure>
-
-  <para>Choose to change the "dba" and "dav" administrative user passwords from their default
-        of "dba" and "dav" respectively to a value of your choice.
-  </para>
-
-  <figure id="v50pe12" float="1"><title>Change passwords</title>
-    <graphic fileref="mac/v50pe12.png" width="858" depth="503"/></figure>
-
-  <para>The Virtuoso Server Welcome page will now be displayed indicating the server is online.
-        This Web based page can be used for general configuration and usage of the Virtuoso Server.
-  </para>
-
-  <figure id="v50pe13" float="1"><title>Welcome</title>
-    <graphic fileref="mac/v50pe13.png" width="766" depth="622"/></figure>
-
-  <para>The Installation is now complete.
-  </para>
-
-  <figure id="v50pe14" float="1"><title>Installation complete</title>
-    <graphic fileref="mac/v50pe14.png" width="623" depth="439"/></figure>
-
-  	</sect2>
-
-        <sect2 id="macosxconfigur"><title>Configuration</title>
-
-  <para>Click on the "Conductor" link in the left frame of the Welcome page to load the
-        Virtuoso Conductor which is the Administration interface for the installation.
-        Enter the "dba" username and password to login.
-  </para>
-
-  <figure id="v50pe15" float="1"><title>Configuration</title>
-    <graphic fileref="mac/v50pe15.png" width="877" depth="752"/></figure>
-
-  <para>Once logged into the conductor click on any of the "Tabs" along the top to Administer the various
-        features of the Virtuoso Universal Server installation.
-  </para>
-
-  <figure id="v50pe16" float="1"><title>Various features using Conductor Tabs</title>
-    <graphic fileref="mac/v50pe16.png" width="878" depth="749"/></figure>
-
-  <para>Apple scripts for starting and stopping your Virtuoso Universal Server installation are located in
-        the "/Application/OpenLink Virtuoso" folder of the machine.
-  </para>
-
-  <figure id="v50pe17" float="1"><title>Location of apple scripts</title>
-    <graphic fileref="mac/v50pe17.png" width="377" depth="438"/></figure>
-
-	</sect2>
-
-   <sect2 id="macosxinstpost"><title>Post Installation</title>  
-  <sect3 id="macosxinstpostsan">
-		<title>Post-Installation Sanity Check</title>
-		<para>A quick way to check that the database is running, is to point a browser to the
-		http port. The following example URLs will show the System Manager for
-		the default, and the demo Virtuoso databases:</para>
-		<programlisting>http://localhost:8889
-http://localhost:8890
-http://a_virtuoso_server.org:8890</programlisting>
-	</sect3> 
-  <sect3 id="macosxinstposttrb"><title>Troubleshooting DB Startup Failures</title>  
-  <para><emphasis>Install failure</emphasis></para> 
-  <para>Check the .log files for the database etc. in order to review the installed files binaries and databases (defaults) 
-  for issues if install fails.</para>
-      <figure id="instmac" float="1">
-       <title>The .log file</title>
-       <graphic fileref="ui/instmac.png"/>
-     </figure>
-   <para><emphasis>.lck existance</emphasis></para>   
-   <para>Check .log in case of .lck issue</para>
-   <para>Delete the .lck file and repeat the steps from above.</para>
-   <para><emphasis>.trx incompatiblity issue</emphasis></para>   
-   <para>Check .log in case of .trx incompatiblity issue</para>
-      <figure id="instmac2" float="1">
-       <title>The .log file</title>
-       <graphic fileref="ui/instmac2.png"/>
-     </figure>
-  </sect3>
-  </sect2>
-  
-	<sect2 id="macosxodbcdsnconf"><title>Configuring an ODBC Data Source</title>
-
-	  <para>Launch the iODBC Administrator, assuming that you have the iODBC
-		Administrator installed.</para>
-
-		<para>On some Mac OS X systems installed on an HFS partition, the icons may
-		not be displayed correctly or at all, due to a Mac OS X bug.  In such cases
-		a simple reboot of your system should correct this.</para>
-
-		<para>Once the iODBC Administrator window has appeared you can press the
-		<emphasis>Add</emphasis> button on the either the <emphasis>User DSN</emphasis>
-		or the <emphasis>System DSN</emphasis> panel to add a new Data Source entry.</para>
-
-  <figure id="macconfig01" float="1"><title>ODBC Administrator</title>
-    <graphic fileref="mac/config01.jpg"/></figure>
-
-		<para>Choose the driver that you wish to create a Data Source for, in this
-		case the Virtuoso Driver (3.0).</para>
-
-  <figure id="macconfig02" float="1"><title>ODBC Administrator - Choose Virtuoso Driver</title>
-    <graphic fileref="mac/config03.jpg"/></figure>
-
-		<para>Provide all required details in the fields provided by the setup panel.</para>
-
-  <figure id="macconfig03" float="1"><title>ODBC Administrator - Configure Virtuoso DSN</title>
-    <graphic fileref="mac/config04.jpg"/></figure>
-
-	<para>The server can be picked from the list of Zero Configuration Datasources
-	that is discovered.</para>
-
-  <figure id="osximage23" float="1"><title>Pick Zero Config</title>
-    <graphic fileref="mac/osximage23.gif" /></figure>
-
-	<para>Alternatively a manual selection can be made for the server.</para>
-
-  <figure id="osximage25" float="1"><title>Pick manual mode</title>
-    <graphic fileref="mac/osximage25.gif" /></figure>
-
-	<para>In this case enter the hostname (or IP) and port number.</para>
-
-  <figure id="osximage34" float="1"><title>Manual Server Entry</title>
-    <graphic fileref="mac/osximage34.gif" /></figure>
-
-
-  <figure id="macconfig04" float="1"><title>ODBC Administrator - Configure Virtuoso DSN</title>
-    <graphic fileref="mac/config05.jpg"/></figure>
-
-  <figure id="macconfig06" float="1"><title>ODBC Administrator - Configure Virtuoso DSN</title>
-    <graphic fileref="mac/config06.jpg"/></figure>
-
-		<para>Press the <emphasis>Finish</emphasis> button to save the Data Source
-		information.</para>
-
-	</sect2>
-
-	<sect2 id="macosxodbcdsntest"><title>Testing an ODBC Data Source</title>
-
-		<para>Select the Data Source from the DSN list, and press the <emphasis>Test</emphasis>
-		button.</para>
-
-		<para>You will be prompted for a username and password to establish a
-		connection with the Data Source.</para>
-
-  <figure id="macconfig07" float="1"><title>Login - Identity Tab</title>
-    <graphic fileref="mac/config07.jpg" /></figure>
-
-<para>The login dialogue also allows you to
-		alter the configuration if required.</para>
-
-		<para>Under the Connection Tab are the fields for the remote server,
-		and the authentication method. Typically the defaults are used.</para>
-
-  <figure id="macconfig30" float="1"><title>Login - Connection Tab</title>
-    <graphic fileref="mac/osximage30.gif" /></figure>
-
-		<para>The Options page has Database, Charset and daylight savings
-		configuration. Typically the defaults are used.</para>
-
-  <figure id="macconfig31" float="1"><title>Login - Options Tab</title>
-    <graphic fileref="mac/osximage31.gif" /></figure>
-
-		<para>The About page shows the software details.</para>
-
-  <figure id="macconfig32" float="1"><title>Login - About</title>
-    <graphic fileref="mac/osximage32.gif" /></figure>
-
-		<para>The result of the test is shown in a popup window.</para>
-
-  <figure id="macconfig33" float="1"><title>Test Result</title>
-    <graphic fileref="mac/osximage33.gif" /></figure>
-
-	</sect2>
-
-	<sect2 id="defpasschgmac">
-		<title>Default passwords</title>
-		<para>See the following Quick Start chapter for very important information about
-		<link linkend="defpasschange">changing the default passwords</link>.</para>
-	</sect2>
-        <sect2 id="installdemomac">
-		<title>Demo Database</title>
-<para><link linkend="demodbinstallsteps">Installation steps</link>.</para>
-        </sect2>
-
-</sect1>
-
-  <sect1 id="installvsgrid"><title>Virtuoso ADO.Net Data Grid Form Application</title>
-  <para>This section details the steps required to create a simple Visual Studio 2008 Windows Form
-application with associated DataGridView control for displaying data in selected tables from a Virtuoso
-database.</para>
-<orderedlist>
-  <listitem>Launch the Visual Studio 2008 SP1 IDE.
-    <figure id="insg1" float="1">
-      <title>Visual Studio</title>
-      <graphic fileref="ui/insg1.png"/>
-    </figure>
-  </listitem>
-  <listitem>Create a Web Application project by going to the File menu in Visual Studio and choosing New Project.
-  </listitem>
-  <listitem>When the New Project window appears, choose either Visual Basic or Visual C# as the programming language.
-  </listitem>
-  <listitem>Within the language category, click on Windows and select Windows Form Application from the right-hand panel.
-  </listitem>
-  <listitem>Choose a name for the project, for example VirtuosoDataGridApp, and click OK.
-    <figure id="insg5" float="1">
-      <title>name for the project</title>
-      <graphic fileref="ui/insg5.png"/>
-    </figure>
-  </listitem>
-  <listitem>From the Data, menu select the Show Data Sources menu item to display a list of available Data sources.
-    <figure id="insg6" float="1">
-      <title>Show Data Sources</title>
-      <graphic fileref="ui/insg6.png"/>
-    </figure>
-  </listitem>
-  <listitem>Click on the Add New Data Source link to add a new data source.
-    <figure id="insg7" float="1">
-      <title>Add New Data Source</title>
-      <graphic fileref="ui/insg7.png"/>
-    </figure>
-  </listitem>
-  <listitem>In the Data Source Configuration Wizard dialog  Choose Data Source Type page, select the Database data source type and click Next.
-    <figure id="insg8" float="1">
-      <title>Data Source Configuration Wizard</title>
-      <graphic fileref="ui/insg8.png"/>
-    </figure>
-  </listitem>
-  <listitem>In the Data Source Configuration Wizard dialog Choose your Data Connection page, select the New Connection button.
-    <figure id="insg9" float="1">
-      <title>Data Connection page</title>
-      <graphic fileref="ui/insg9.png"/>
-    </figure>
-  </listitem>
-  <listitem>In the Choose Data Source dialog, select OpenLink Virtuoso Data Source from the list and click Continue.
-    <figure id="insg10" float="1">
-      <title>OpenLink Virtuoso Data Source</title>
-      <graphic fileref="ui/insg10.png"/>
-    </figure>
-  </listitem>
-  <listitem>In the Add Connection dialog, specify the hostname, portno, username, and password
-for the target Virtuoso Server and check the Save Password check box.
-    <figure id="insg11" float="1">
-      <title>Add Connection dialog</title>
-      <graphic fileref="ui/insg11.png"/>
-    </figure>
-  </listitem>
-  <listitem>Select the Select Database From List radio button and choose School from the drop down list
-of available databases.
-    <figure id="insg12" float="1">
-      <title>Select Database From List</title>
-      <graphic fileref="ui/insg12.png"/>
-    </figure>
-  </listitem>
-  <listitem>Click the Test Connection button to verify the connection is successful and then
-click OK to add the connection.
-    <figure id="insg13" float="1">
-      <title>Test Connection</title>
-      <graphic fileref="ui/insg13.png"/>
-    </figure>
-  </listitem>
-  <listitem>Select the  Yes, include sensitive data in the connect string radio button and click Next to continue.
-    <figure id="insg14" float="1">
-      <title>connect string</title>
-      <graphic fileref="ui/insg14.png"/>
-    </figure>
-  </listitem>
-  <listitem>In the Choose your Database Objects dialog select the table and columns to be queried, the shippers table is used in this example.
-    <figure id="insg15" float="1">
-      <title>Choose your Database Objects</title>
-      <graphic fileref="ui/insg15.png"/>
-    </figure>
-  </listitem>
-  <listitem>A DataSet for the shippers database object is created
-    <figure id="insg16" float="1">
-      <title>shippers database</title>
-      <graphic fileref="ui/insg16.png"/>
-    </figure>
-  </listitem>
-  <listitem>From the drop down list box next to the Shippers table ensure the DataGridView item is selected
-    <figure id="insg17" float="1">
-      <title>DataGridView</title>
-      <graphic fileref="ui/insg17.png"/>
-    </figure>
-  </listitem>
-  <listitem>Drag the Shippers DataSet item onto the Form to create a scrollable and editable association of the Shippers table object with the Data Grid View automatically.
-    <figure id="insg18" float="1">
-      <title>Drag</title>
-      <graphic fileref="ui/insg18.png"/>
-    </figure>
-  </listitem>
-  <listitem>From the Debug Menu select the Start Debugging menu item to run the application.
-    <figure id="insg19" float="1">
-      <title>Debug</title>
-      <graphic fileref="ui/insg19.png"/>
-    </figure>
-  </listitem>
-  <listitem>The data in the Shippers table will be displayed in the DataGrid application created.
-    <figure id="insg20" float="1">
-      <title>DataGrid</title>
-      <graphic fileref="ui/insg20.png"/>
-    </figure>
-  </listitem>
-  <listitem>A new row can be inserted (updated or deleted) as indicated for the new DHL record inserted below and the  save button clicked to save the change to the database.
-    <figure id="insg21" float="1">
-      <title>new row</title>
-      <graphic fileref="ui/insg21.png"/>
-    </figure>
-  </listitem>
-  <listitem>The Virtuoso Interactive SQL tab of the Conductor can be used to run the query select * from Demo..Shippers.
-    <figure id="insg22" float="1">
-      <title>Interactive SQL tab</title>
-      <graphic fileref="ui/insg22.png"/>
-    </figure>
-  </listitem>
-  <listitem>To verify the change has been successfully made in the database.
-    <figure id="insg23" float="1">
-      <title>verify</title>
-      <graphic fileref="ui/insg23.png"/>
-    </figure>
-  </listitem>
-</orderedlist>
-  <para>The task is now complete.</para>
-</sect1>
-  <sect1 id="installvsent"><title>Using Visual Studio 2008 to Build an Entity Frameworks based Windows Form Application</title>
-    <formalpara><title>Virtuoso Entity Framework School DB Windows Form Application</title></formalpara>
-    <para>This section demonstrates how Visual Studio 2008 can be used to generate mapping files
-for an Entity Data Model (EDM), based on a 1:1 mapping to tables in the School database. This will be
-done by creating a Windows Forms application in Visual Studio, create queries that access data in the
-School model, bind the query results to display controls to show the results of the queries, and then
-make updates to objects and persist the changes to the database.</para>
-      <sect2 id="installvsentprereq">
-        <title>Pre-requisites</title>
-        <para>In order to create an Entity Framework Application in your own environment you will need:</para>
-        <orderedlist>
-          <listitem>Microsoft Visual Studio 2008 SP1, the ADO.NET Entity Framework runtime and associated tools are included in Visual Studio 2008 SP1.</listitem>
-          <listitem>A running Virtuoso Universal Server instance.</listitem>
-        </orderedlist>
-      </sect2>
-      <sect2 id="installvsentcreatedb">
-        <title>Create the School database and schema</title>
-        <orderedlist>
-          <listitem>Download the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/schools_db_dav.vad">Schools Database</ulink> VAD (schools_db_dav.vad) package.</listitem>
-          <listitem>Navigate to the <emphasis>System Admin -> Packages</emphasis> tab of the Virtuoso Conductor.
-            <figure id="uado1" float="1">
-              <title>Conductor Packages</title>
-              <graphic fileref="ui/uado1.png"/>
-            </figure>
-          </listitem>
-          <listitem>Scroll down to the <emphasis>Install Package</emphasis> section of the tab, use the
-<emphasis>Upload Package</emphasis> option <emphasis>Browse</emphasis> button to locate the
-schools_db_dav.vad package and click <emphasis>proceed</emphasis>.
-             <figure id="uado2" float="1">
-               <title>Install package</title>
-               <graphic fileref="ui/uado2.png"/>
-             </figure>
-           </listitem>
-           <listitem>Click the <emphasis>Proceed</emphasis> button to begin the installation process.
-             <figure id="uado3" float="1">
-               <title>Install package.</title>
-               <graphic fileref="ui/uado3.png"/>
-             </figure>
-           </listitem>
-           <listitem>Once complete return to the <emphasis>Packages</emphasis> tab and scroll down to confirm the *schools_db* package is listed as installed.
-             <figure id="uado4" float="1">
-               <title>Install package</title>
-               <graphic fileref="ui/uado4.png"/>
-             </figure>
-           </listitem>
-        </orderedlist>
-        <para><emphasis>Create the Course Manager application using Visual Studio</emphasis></para>
-        <orderedlist>
-          <listitem>Launch the Visual Studio 2008 SP1 IDE.
-            <figure id="uados1" float="1">
-              <title>Visual Studio 2008 SP1 IDE</title>
-              <graphic fileref="ui/uados1.png"/>
-            </figure>
-          </listitem>
-          <listitem>On the <emphasis>File menu</emphasis> click <emphasis>New Project</emphasis>.
-          </listitem>
-          <listitem>Choose either <emphasis>Visual Basic</emphasis> or <emphasis>Visual C#</emphasis> in the
-<emphasis>Project Types</emphasis> pane.
-          </listitem>
-          <listitem>Select <emphasis>Windows Forms Application</emphasis> in the
-<emphasis>Templates</emphasis> pane.
-          </listitem>
-          <listitem>Enter <emphasis>CourseManager</emphasis> for the project name, and then
-click <emphasis>OK</emphasis>.
-            <figure id="uado5" float="1">
-              <title>Create project</title>
-              <graphic fileref="ui/uado5.png"/>
-            </figure>
-          </listitem>
-        </orderedlist>
-        <para><emphasis>Create the Course Viewer form</emphasis></para>
-        <orderedlist>
-          <listitem>In the <emphasis>CourseManager</emphasis> project, select the default form (Form1).
-          </listitem>
-          <listitem>In the <emphasis>File Properties</emphasis> pane, change the File Name to
-<emphasis>CourseViewer.vb</emphasis> or <emphasis>CourseViewer.cs</emphasis>.
-          </listitem>
-          <listitem>In <emphasis>Solution Explorer</emphasis>, double-click
-<emphasis>CourseViewer.vb</emphasis> or <emphasis>CourseViewer.cs</emphasis> to open the form.
-            <figure id="uado6" float="1">
-              <title>CourseViewer.vb</title>
-              <graphic fileref="ui/uado6.png"/>
-            </figure>
-          </listitem>
-          <listitem>In the <emphasis>Toolbox</emphasis>, expand <emphasis>Common Controls</emphasis>,
-drag the <emphasis>ComboBox</emphasis> control to the form, and change the name of the control to
-<emphasis>departmentList</emphasis>.
-          </listitem>
-          <listitem>In the <emphasis>Toolbox</emphasis>, drag the <emphasis>Button</emphasis>
-control to the form, change the <emphasis>Name</emphasis> of the control to <emphasis>closeForm</emphasis>,
-and change the <emphasis>Text value</emphasis> to <emphasis>Close</emphasis>.
-          </listitem>
-          <listitem>In the <emphasis>Toolbox</emphasis>, expand <emphasis>Data</emphasis>, drag the
-<emphasis>DataGridView</emphasis> control to the form, and change the <emphasis>Name</emphasis> of
-the control to <emphasis>courseGridView</emphasis>.
-            <figure id="uado7" float="1">
-              <title>DataGridView</title>
-              <graphic fileref="ui/uado7.png"/>
-            </figure>
-          </listitem>Double-click the <emphasis>closeForm</emphasis> button control. This opens
-the code page for the form and creates the closeForm_Click event handler method.
-          <listitem>In the <emphasis>closeForm_Click</emphasis> event handler method, type the following code that closes the form:
-<programlisting><![CDATA[
-Visual Basic
-
-' Close the form.
-Me.Close()
-
-C#
-
-// Close the form.
-this.Close();
-]]></programlisting>
-            </listitem>
-          </orderedlist>
-        </sect2>
-        <sect2 id="installvsentgenmodel">
-          <title>Generating the School Entity Data Mode</title>
-          <para><emphasis>Add the ADO.NET Entity Data Model item template</emphasis></para>
-          <orderedlist>
-            <listitem>Select the CourseManager project in Solution Explorer, right-click, point to Add, and then click New Item.</listitem>
-            <listitem>Select ADO.NET Entity Data Model in the Templates pane.</listitem>
-            <listitem>Type School.edmx for the model name and click Add. The opening page of the Entity Data Model Wizard is displayed.
-              <figure id="uado8" float="1">
-                <title>School.edmx</title>
-                <graphic fileref="ui/uado8.png"/>
-              </figure>
-            </listitem>
-          </orderedlist>
-          <para><emphasis>Generate the EDM</emphasis></para>
-          <orderedlist>
-            <listitem>Select <emphasis>Generate from database</emphasis> in the
-<emphasis>Choose Model Contents dialog box</emphasis>. Then click <emphasis>Next</emphasis>.
-              <figure id="uado9" float="1">
-                <title>Model Contents</title>
-                <graphic fileref="ui/uado9.png"/>
-              </figure>
-            </listitem>
-            <listitem>Click the <emphasis>New Connection</emphasis> button.
-              <figure id="uado10" float="1">
-                <title>New Connection</title>
-                <graphic fileref="ui/uado10.png"/>
-              </figure>
-            </listitem>
-            <listitem>Choose the OpenLink <emphasis>Virtuoso Data Source</emphasis> and click
-<emphasis>Continue</emphasis>.
-              <figure id="uado11" float="1">
-                <title>Virtuoso Data Source</title>
-                <graphic fileref="ui/uado11.png"/>
-              </figure>
-            </listitem>
-            <listitem>In the <emphasis>Connection Properties</emphasis> dialog specify the
-<emphasis>hostname, portno, username and password</emphasis> for the target Virtuoso Server and click the
-<emphasis>Advanced</emphasis> button.
-             <figure id="uado12" float="1">
-               <title>Connection Properties</title>
-               <graphic fileref="ui/uado12.png"/>
-             </figure>
-           </listitem>
-           <listitem>In the <emphasis>Advanced Properties</emphasis> dialog set the
-<emphasis>Database parameter</emphasis> to <emphasis>School</emphasis> and click OK.
-             <figure id="uado13" float="1">
-               <title>Advanced Properties</title>
-               <graphic fileref="ui/uado13.png"/>
-             </figure>
-           </listitem>
-           <listitem>Press the <emphasis>Test Connection</emphasis> dialog to verify the database is accessible.
-             <figure id="uado14" float="1">
-               <title>Test Connection</title>
-               <graphic fileref="ui/uado14.png"/>
-             </figure>
-           </listitem>
-           <listitem>Set the <emphasis>entity connect string name</emphasis> to
-<emphasis>SchoolEntities</emphasis> and click <emphasis>Next</emphasis>.
-             <figure id="uado15" float="1">
-               <title>entity connect string name</title>
-               <graphic fileref="ui/uado15.png"/>
-             </figure>
-           </listitem>
-           <listitem>In the <emphasis>Choose your Database Objects</emphasis> page select the
-<emphasis>Tables</emphasis> check box to select all table in the <emphasis>School database</emphasis>
-for addition to the EDM, set the <emphasis>Model Namespace</emphasis> to <emphasis>SchoolModel</emphasis>
-and click <emphasis>Finish</emphasis>.
-            <figure id="uado16" float="1">
-              <title>Database Objects</title>
-              <graphic fileref="ui/uado16.png"/>
-            </figure>
-          </listitem>
-        </orderedlist>
-        <para><emphasis>View the EDM in the ADO.NET Entity Data Model Designer</emphasis></para>
-        <orderedlist>
-          <listitem>In the <emphasis>Solution Explorer</emphasis>, double-click the
-<emphasis>School.edmx</emphasis> file. This displays the School model in the ADO.NET Entity Data Model Designer window.
-            <figure id="uado17" float="1">
-              <title>Solution Explorer</title>
-              <graphic fileref="ui/uado17.png"/>
-            </figure>
-          </listitem>
-          <listitem>From the <emphasis>View</emphasis> menu, select <emphasis>Other Windows</emphasis>,
-and then click <emphasis>Model Browser</emphasis> to display the <emphasis>Entity Model Browser</emphasis> window.
-          </listitem>
-          <listitem>Expand the <emphasis>SchoolModel</emphasis> and <emphasis>SchoolModel.Store</emphasis> nodes to view conceptual and store definitions, respectively.
-            <figure id="uado20" float="1">
-              <title>SchoolModel</title>
-              <graphic fileref="ui/uado20.png"/>
-            </figure>
-          </listitem>
-          <listitem>From the <emphasis>View menu</emphasis>, select <emphasis>Other Windows</emphasis>,
-click <emphasis>Mapping Details</emphasis>, and then click an entity (Person for example) or association in the Entity Designer.
-            </listitem>
-            <listitem>This displays the Entity Mapping Details window with information about the object-relational mapping for the selected object.
-              <figure id="uado21" float="1">
-                <title>View menu</title>
-                <graphic fileref="ui/uado21.png"/>
-              </figure>
-            </listitem>
-          </orderedlist>
-        </sect2>
-        <sect2 id="installvsentqueryentity">
-          <title>Querying Entities and Associations</title>
-          <para>This section creates strongly-typed queries against the CLR objects that represent entities and associations in the School model, and bind display controls to the object collections returned from these queries.</para>
-          <para><emphasis>Query the departments in the School database</emphasis></para>
-          <orderedlist>
-            <listitem>At the beginning of the code file for the <emphasis>CourseViewer</emphasis> form,
-add the following <emphasis>using</emphasis> (C#) or <emphasis>Imports</emphasis> (Visual Basic) statements to reference the model created from the School database and the entity namespace.
-<programlisting><![CDATA[
-Visual Basic
-
-Imports System.Data.Objects
-Imports System.Data.Objects.DataClasses
-
-C#
-
-using System.Data.Objects;
-using System.Data.Objects.DataClasses;
-]]></programlisting>
-            </listitem>
-            <listitem>At the top of the partial class definition for the <emphasis>CourseViewer</emphasis>
-form, add the following code that creates an <emphasis>ObjectContext</emphasis> instance.
-<programlisting><![CDATA[
-Visual Basic
-
-' Create an ObjectContext instance based on SchoolEntity.
-Private schoolContext As SchoolEntities
-
-C#
-
-// Create an ObjectContext instance based on SchoolEntity.
-private SchoolEntities schoolContext;
-]]></programlisting>
-            </listitem>
-            <listitem>In the <emphasis>CourseViewer</emphasis> form designer, double-click
-the <emphasis>CourseViewer</emphasis> form. This opens the code page for the form and creates the
-<emphasis>courseViewer _Load</emphasis> event handler method.</listitem>
-            <listitem>In the <emphasis>courseViewer _Load</emphasis> event handler method, copy
-and paste the following code that defines the <emphasis>DataGridView</emphasis>, executes a query
-that returns a collection of departments (ordered by <emphasis>Name</emphasis>), and binds the
-collection of <emphasis>Department</emphasis> objects to the departmentList control.
-<programlisting><![CDATA[
-Visual Basic
-
-' Initialize the ObjectContext.
-schoolContext = New SchoolEntities()
-
-' Define a query that returns all Department objects and related
-' Course objects, ordered by name.
-Dim departmentQuery As ObjectQuery(Of Department) = _
-    schoolContext.Department.Include("Course").OrderBy("it.Name")
-
-Try
-    ' Bind the ComboBox control to the query, which is
-    ' executed during data binding.
-    Me.departmentList.DisplayMember = "Name"
-    Me.departmentList.DataSource = departmentQuery
-Catch ex As Exception
-    MessageBox.Show(ex.Message)
-End Try
-
-C#
-
-// Initialize the ObjectContext.
-schoolContext = new SchoolEntities();
-
-// Define a query that returns all Department objects and related
-// Course objects, ordered by name.
-ObjectQuery<Department> departmentQuery =
-    schoolContext.Department.Include("Course").OrderBy("it.Name");
-
-try
-{
-    // Bind the ComboBox control to the query, which is
-    // executed during data binding.
-    this.departmentList.DisplayMember = "Name";
-    this.departmentList.DataSource = departmentQuery;
-}
-catch (Exception ex)
-{
-    MessageBox.Show(ex.Message);
-}
-]]></programlisting>
-          </listitem>
-        </orderedlist>
-        <para><emphasis>Display courses for the selected department</emphasis></para>
-        <orderedlist>
-          <listitem>In the <emphasis>CourseViewer</emphasis> form designer, double-click the
-<emphasis>departmentList</emphasis> control. This creates the <emphasis>departmentList_SelectedIndexChanged</emphasis> event handler method.</listitem>
-          <listitem>Paste the following code that loads the courses that are related to the selected department.
-<programlisting><![CDATA[
-Visual Basic
-
-Try
-    ' Get the object for the selected department.
-    Dim department As Department = _
-        CType(Me.departmentList.SelectedItem, Department)
-
-    ' Bind the grid view to the collection of Course objects
-    ' that are related to the selected Department object.
-    courseGridView.DataSource = department.Course
-
-    ' Hide the columns that are bound to the navigation properties on Course.
-    courseGridView.Columns("Department").Visible = False
-    courseGridView.Columns("CourseGrade").Visible = False
-    courseGridView.Columns("OnlineCourse").Visible = False
-    courseGridView.Columns("OnsiteCourse").Visible = False
-    courseGridView.Columns("Person").Visible = False
-
-    courseGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells)
-Catch ex As Exception
-    MessageBox.Show(ex.Message)
-End Try
-
-C#
-
-try
-{
-    // Get the object for the selected department.
-    Department department =
-        (Department)this.departmentList.SelectedItem;
-
-    // Bind the grid view to the collection of Course objects
-    // that are related to the selected Department object.
-    courseGridView.DataSource = department.Course;
-
-    // Hide the columns that are bound to the navigation properties on Course.
-    courseGridView.Columns["Department"].Visible = false;
-    courseGridView.Columns["CourseGrade"].Visible = false;
-    courseGridView.Columns["OnlineCourse"].Visible = false;
-    courseGridView.Columns["OnsiteCourse"].Visible = false;
-    courseGridView.Columns["Person"].Visible = false;
-
-    courseGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
-}
-catch (Exception ex)
-{
-    MessageBox.Show(ex.Message);
-}
-]]></programlisting>
-            </listitem>
-          </orderedlist>
-        </sect2>
-        <sect2 id="installvsentinsertandupdate">
-          <title>Inserting and Updating Data</title>
-          <para>In this section the changes made to Course objects bound are saved to the DataGridView control to the database and also run the completed Course Manager application.</para>
-          <para><emphasis>Save changes made to objects</emphasis></para>
-          <orderedlist>
-            <listitem>In the <emphasis>Toolbox</emphasis>, expand <emphasis>Common Controls</emphasis>,
-drag the <emphasis>Button</emphasis> control to the <emphasis>CourseViewer</emphasis> form designer,
-change the <emphasis>name</emphasis> of the control to <emphasis>saveChanges</emphasis>, and change the
-<emphasis>Text</emphasis> value to <emphasis>Update</emphasis>.</listitem>
-            <listitem>In the <emphasis>CourseViewer</emphasis> form designer, double-click the
-<emphasis>saveChanges</emphasis> control. This creates the <emphasis>saveChanges_Click</emphasis> event handler method.
-            </listitem>
-            <listitem>Paste the following code that saves object changes to the database.
-<programlisting><![CDATA[
-Visual Basic
-
-Try
-    ' Save object changes to the database, display a message,
-    ' and refresh the form.
-    schoolContext.SaveChanges()
-    MessageBox.Show("Changes saved to the database.")
-    Me.Refresh()
-Catch ex As Exception
-    MessageBox.Show(ex.Message)
-End Try
-
-C#
-
-try
-{
-    // Save object changes to the database, display a message,
-    // and refresh the form.
-    schoolContext.SaveChanges();
-    MessageBox.Show("Changes saved to the database.");
-    this.Refresh();
-}
-catch (Exception ex)
-{
-    MessageBox.Show(ex.Message);
-}
-]]></programlisting>
-            </listitem>
-            <listitem>In the <emphasis>closeForm_Click</emphasis> event handler method, type the
-following code. This code disposes of the object context before the form is closed.
-<programlisting><![CDATA[
-Visual Basic
-
-   ' Dispose the object context.
-    schoolContext.Dispose()
-
-C#
-
-    // Dispose the object context.
-    schoolContext.Dispose();
-]]></programlisting>
-          </listitem>
-        </orderedlist>
-        <para><emphasis>Build and run the Class Scheduling application</emphasis></para>
-        <orderedlist>
-          <listitem>From the <emphasis>Debug</emphasis> menu, select
-<emphasis>Start Debugging</emphasis> or <emphasis>Start Without Debugging</emphasis>, to build and
-run the application.</listitem>
-          <listitem>When the form loads, select a department from the <emphasis>ComboBox</emphasis>
-control to display the courses that belong to that department.
-          <figure id="uado18" float="1">
-            <title>ComboBox</title>
-            <graphic fileref="ui/uado18.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>DataGridView</emphasis>, update course information or add a
-new course and then click <emphasis>Update</emphasis> to save changes to the database and displays a
-message box that declares the number of saved changes.
-          <figure id="uado19" float="1">
-            <title>DataGridView</title>
-            <graphic fileref="ui/uado19.png"/>
-          </figure>
-        </listitem>
-      </orderedlist>
-      <para>The process is now complete</para>
-    </sect2>
-  </sect1>
-  <sect1 id="installusado"><title>Using Visual Studio 2008 to Build an ADO.NET Data Services based Application</title>
-    <formalpara><title>Using Microsoft ADO.Net Data Services with Virtuoso</title></formalpara>
-    <sect2 id="installusadointro">
-      <title>Introduction</title>
-      <para>The goal of Microsoft ADO.NET Data Services is to enable applications to expose data as a
-data service that can be consumed by web clients within corporate networks and across the internet. A data
-service is reachable via regular HTTP requests, using standard HTTP verbs such as GET, POST, PUT and DELETE
-to perform CRUD operations against the service. The payload format used by the service is controllable by the
-application, but all options are simple, open formats such as JSON and Atom/APP.
-      </para>
-      <para>The use of web-friendly technologies make ADO.NET Data Services ideal as a data back-end
-for AJAX-style applications, Rich Interactive Applications and other applications that need to operate
-against data that is stored across the web.
-      </para>
-    </sect2>
-    <sect2 id="installusadogetstart">
-      <title>Getting Started: Creating Data Services</title>
-      <para><emphasis>Pre-requisites</emphasis></para>
-      <para>In order to create a data service using ADO.NET Data Services in your own environment you
-will need Microsoft Visual Studio 2008 SP1. The ADO.NET Entity Framework runtime and associated tools are
-included in Visual Studio 2008 SP1.
-      </para>
-      <para><emphasis>Selecting a Data Source</emphasis></para>
-      <para>The ADO.NET Data Service server framework is comprised of two halves. The top-half is the
-runtime itself; this part is "fixed", and it implements URI translation, the Atom/JSON wire formats, the
-interaction protocol, etc. This is what makes an ADO.NET Data Service look like an ADO.NET Data Service.
-The bottom half is the data-access layer and is pluggable. Communication between layers happens in terms
-of the IQueryable interface plus a set of conventions to map CLR graphs into the URI/payload patterns
-of ADO.NET Data Services.
-      </para>
-      <para>The first step in creating an ADO.NET Data Service is to determine the data source that
-is to be exposed as a set of REST-based endpoints (ie. select or create a data access layer). For relational
-data stored in Microsoft SQL Server or other 3rd Party databases, ADO.NET Data Services currently enables
-easily exposing a conceptual model created using the ADO.NET Entity Framework (EF). For all other data
-sources (XML section, web service, application logic layer, etc) or to use additional database access
-technologies (ex. LINQ to SQL), a mechanism is provided which enables any data source, as per the plug-in
-model described above, to be exposed as an ADO.NET Data Service.
-      </para>
-      <para>To create a data service which exposes a relational database through an Entity Framework
-conceptual model see "Creating a Data Service using the ADO.NET Entity Framework". To create a data service
-which exposes another data source see "Creating a Data Service from any Data Source".
-      </para>
-    </sect2>
-    <sect2 id="installusadocreateservice">
-      <title>Creating a Data Service using the ADO.NET Entity Framework</title>
-      <para>ADO.NET Data Services are a specialized form of Windows Communication Foundation services,
-and thus can be hosted in various environments. The below example will create an ADO.NET Data Service which
-is hosted inside an ASP.NET site. In order to create a data service, you must first create a web project;
-you will then need to establish a connection with the database that will be exposed by the service, and
-then create the data service itself within the web application. Below is a step-by-step description of
-this process.
-      </para>
-      <para>The following steps can be used for creating a Data Service using the Virtuoso ADO.Net
-Provider for accessing the sample Northwind Demo database:
-      </para>
-      <orderedlist>
-        <listitem>Launch the Visual Studio 2008 SP1 IDE.
-          <figure id="ados1" float="1">
-            <title>Visual Studio 2008 SP1 IDE.</title>
-            <graphic fileref="ui/dora1.png"/>
-          </figure>
-        </listitem>
-        <listitem>Create a <emphasis>Web Application</emphasis> project by going to the
-<emphasis>File</emphasis> menu in Visual Studio and choosing <emphasis>New Project</emphasis>.
-        </listitem>
-        <listitem>When the New Project window appears, choose either <emphasis>Visual Basic</emphasis>
-or <emphasis>Visual C#</emphasis> as the programming language.
-        </listitem>
-        <listitem>Within the language category click on <emphasis>Web</emphasis>, and select <emphasis>ASP.NET Web Application</emphasis> from the right-hand panel.
-        </listitem>
-        <listitem>Choose a name for the project, for example <emphasis>VirtuosoDataService</emphasis>, and click <emphasis>OK</emphasis>.
-          <figure id="ados2" float="1">
-            <title>Name project</title>
-            <graphic fileref="ui/eora2.png"/>
-          </figure>
-        </listitem>
-        <listitem>This will create a new project called <emphasis>VirtuosoDataService</emphasis>.
-          <figure id="ados3" float="1">
-            <title>Create project</title>
-            <graphic fileref="ui/eora3.png"/>
-          </figure>
-        </listitem>
-        <listitem>Right click on the <emphasis>VirtuosoDataService</emphasis> project name of the
-Solution Explorer pane, then select the <emphasis>Add -> New Item</emphasis> menu options.
-          <figure id="ados4" float="1">
-            <title>New Item</title>
-            <graphic fileref="ui/einf4.png"/>
-          </figure>
-        </listitem>
-        <listitem>The <emphasis>Add</emphasis> New Item dialog will appear, choose the
-<emphasis>ADO.NET Entity Data Model</emphasis> template, give it the name <emphasis>Virtuoso.edmx</emphasis>
-and click <emphasis>Add</emphasis> to start the creation of the ADO.Net Entity Data Model.
-          <figure id="ados5" float="1">
-            <title>Entity Model</title>
-            <graphic fileref="ui/eora5.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>Entity Data Model Wizard</emphasis> dialog
-<emphasis>Choose Model Contents</emphasis> page select the <emphasis>Generate from Database</emphasis> model
-type and click <emphasis>Next</emphasis>.
-          <figure id="ados6" float="1">
-            <title>Model Contents</title>
-            <graphic fileref="ui/eora6.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>Entity Data Model Wizard</emphasis> dialog
-<emphasis>Choose your Data Connection</emphasis> page select the <emphasis>New Connection</emphasis> button
-          <figure id="ados7" float="1">
-            <title>Data Connection</title>
-            <graphic fileref="ui/ados7.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>Choose Data Source</emphasis> dialog, select the
-OpenLink <emphasis>Virtuoso Data Source</emphasis> from the list displayed and click <emphasis>Continue</emphasis>.
-          <figure id="ados8" float="1">
-            <title>Data Source</title>
-            <graphic fileref="ui/dora9.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>Add Connection</emphasis> dialog, specify the
-<emphasis>hostname, portno, username and password</emphasis> for the target Virtuoso Server and check the <b>Save Password</b> check box.
-          <figure id="ados9" float="1">
-            <title>Connection Properties</title>
-            <graphic fileref="ui/dora10.png"/>
-          </figure>
-        </listitem>
-        <listitem>Select the <emphasis>Select Database From List</emphasis> radio button and choose
-<emphasis>Demo</emphasis> from the drop down list, assuming the Virtuoso Demo Database is installed.
-          <figure id="ados10" float="1">
-            <title>Advanced Properties</title>
-            <graphic fileref="ui/ados10.png"/>
-          </figure>
-        </listitem>
-        <listitem>Click the <emphasis>Test Connection</emphasis> button to verify the connection is
-successful and then click OK to add the connection.
-          <figure id="ados11" float="1">
-            <title>Test Connection</title>
-            <graphic fileref="ui/ados11.png"/>
-          </figure>
-        </listitem>
-        <listitem>Set the <emphasis>entity connect string</emphasis> name to
-<emphasis>VirtuosoDemoEntities</emphasis> (note this name as it is required in step 17 below)
-and click <emphasis>Next</emphasis>.
-          <figure id="ados12" float="1">
-            <title>entity connect string</title>
-            <graphic fileref="ui/ados12.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>Choose your Database Objects</emphasis>
-page select the <emphasis>Tables</emphasis> check box to select all tables in the Demo database for
-addition to the Entity Data Model, set the <emphasis>Model Namespace</emphasis> to
-<emphasis>VirtuosoDemoModel</emphasis> and click <emphasis>Finish</emphasis>.
-          <figure id="ados13" float="1">
-            <title>Database Objects</title>
-            <graphic fileref="ui/ados13.png"/>
-          </figure>
-        </listitem>
-        <listitem>The <emphasis>Virtuoso.edmx</emphasis> EDM will be created with the tables and relationships displayed in the Visual Studio IDE
-          <figure id="ados14" float="1">
-            <title>Virtuoso.edmx</title>
-            <graphic fileref="ui/ados14.png"/>
-         </figure>
-        </listitem>
-        <listitem>Right click on the <emphasis>VirtuosoDataService</emphasis> project name of the
-<emphasis>Solution Explorer pane</emphasis>, then select the <emphasis>Add -> New Item</emphasis> menu options.
-          <figure id="ados4" float="1">
-            <title>New Item</title>
-            <graphic fileref="ui/ados4.png"/>
-          </figure>
-        </listitem>
-        <listitem>The <emphasis>Add New Item</emphasis> dialog will appear, choose the
-<emphasis>ADO.NET Data Service</emphasis> template, give it the name <emphasis>Virtuoso.svc</emphasis> and
-click <emphasis>Add</emphasis> to create the ADO.Net Data Service.
-          <figure id="ados15" float="1">
-            <title>ADO.NET Data Service</title>
-            <graphic fileref="ui/ados15.png"/>
-          </figure>
-        </listitem>
-        <listitem>In the <emphasis>Virtuoso.svc.cs</emphasis> Data Service file created add the
-data source class name of <emphasis>VirtuosoDemoEntities</emphasis> (note this is the name set in step 12)
-as the <emphasis>DataService</emphasis> name and enable the access to the Data Service by adding
-the entry <emphasis>config.SetEntitySetAccessRule("*", EntitySetRights.All);</emphasis> in the
-<emphasis>InitializeService</emphasis> method.
-<programlisting><![CDATA[
-// C#
-
-using System;
-using System.Web;
-using System.Collections.Generic;
-using System.ServiceModel.Web;
-using System.Linq;
-using System.Data.Services;
-
-namespace SimpleDataService
-{
-    public class Northwind : DataService<VirtuosoDemoEntities>
-    {
-        public static void InitializeService(IDataServiceConfiguration  config)
-        {
-            config.SetEntitySetAccessRule("*", EntitySetRights.All);
-        }
-    }
-}
-]]></programlisting>
-          <figure id="ados16" float="1">
-            <title>Data Service</title>
-            <graphic fileref="ui/ados16.png"/>
-          </figure>
-        </listitem>
-        <listitem>To test the Data Service, simply hit <emphasis>Ctrl+F5</emphasis> within Visual Studio, which will start the development web server, run the Data Services server inside and load a Web browser page displaying the list of available tables/entities of the Demo database.
-          <figure id="ados17" float="1">
-            <title>test the Data Service</title>
-            <graphic fileref="ui/ados17.png"/>
-          </figure>
-        </listitem>
-        <listitem>To access a specific entity instance like the <emphasis>Customers</emphasis> table
-<emphasis>ALFKI</emphasis> record, this would be specified as http://host/vdir/Virtuoso.svc/Customers('ALFKI') .
-            <figure id="ados18" float="1">
-              <title>Access a specific entity instance</title>
-              <graphic fileref="ui/ados18.png"/>
-            </figure>
-         </listitem>
-        </orderedlist>
-        <para><emphasis>NOTES</emphasis></para>
-        <orderedlist>
-          <listitem><emphasis>Important</emphasis> - To view <emphasis>Atom</emphasis> (the default
-format returned by an ADO.NET Data Service) in Internet Explorer, you must first ensure that
-<emphasis>Feed Reading View</emphasis> is turned <emphasis>off</emphasis>. This can be done on
-the <emphasis>Content tab</emphasis> of <emphasis>Tools in Internet Options</emphasis>.
-          </listitem>
-          <listitem>If a Data Services entity instance URI page fails to load you can turn
-<emphasis>Verbose</emphasis> errors on by adding <emphasis>config.UseVerboseErrors = true;</emphasis>
-in the <emphasis>virtuoso.svc.cs InitializeService</emphasis> method to obtain more detailed
-information from the server as to why the page failed to load:
-<programlisting><![CDATA[
-public static void InitializeService(IDataServiceConfiguration config)
-
-{
-
-config.UseVerboseErrors = true;
-
-config.SetEntitySetAccessRule("*", EntitySetRights.All);
-
-}
-]]></programlisting>
-          </listitem>
-        </orderedlist>
-      </sect2>
-  </sect1>
-
-<sect1 id="installwfas"><title>Windows Form Application for accessing Virtuoso RDF data via SPASQL using the Virtuoso ADO.Net Provider</title>
-    <para>This section will guide you through creating a simple application that allows you to access RDF
-data in a Virtuoso database as an Entity DataSet and explore that RDF data in an intuitive way by clicking
-on dereferenceable <link linkend="rdfiriidtype">IRIs</link>.</para>
-    <sect2 id="installwfasintro">
-      <title>Pre-requisites</title>
-<orderedlist>
-  <listitem>Microsoft Visual Studio 2008</listitem>
-  <listitem>The Virtuoso ADO.Net provider for .Net 3.5 and the Entity Framework.</listitem>
-  <listitem>The example assumes that you have a local Virtuoso server with the Northwind demo database
-installed. If the demo database is not already installed then download the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/demo_dav.vad">demo database VAD package</ulink>
-(demo_dav.vad) and install it. The VAD package will create a new database in Virtuoso called demo
-containing the familiar Northwind tables. It will also creates <ulink url="http://docs.openlinksw.com/virtuoso/rdfsparqlintegrationmiddleware.html#rdfviews">RDF views</ulink> of the Northwind tables.
-In the example we assume the database is accessible on a hostname of "demo.openlinksw.com" on the
-default port 80, where an actually live instance of the Virtuoso Demo database is hosted. Users would
-use the appropriate hostname and port number of their Virtuoso installation to create the sample
-application, and would be would be localhost:8890 for a default installation or whatever the <link linkend="ini_URIQA">URIQA DefaultHost</link>
-Virtuoso configuration parameter is set to when the demo database VAD package is installed.
-  </listitem>
-</orderedlist>
-    </sect2>
-    <sect2 id="installwfasgetstart">
-      <title>Creating the Application</title>
-      <para><emphasis>Step 1 - Create a view of the RDF data.</emphasis></para>
-      <para>We want to be able to access the RDF data in Visual Studio and the easiest way to do this is to
-create a view of the data that we are interested in and bind that view to a DataSet. This can be considered
-as using server side <link linkend="rdfsparql">SPARQL</link>. Virtuoso supports an
-<link linkend="rdfsparqlinline">extension to standard SQL that allows</link> execution of SPARQL.
-If a SQL query begins with the keyword SPARQL then the rest of the query is interpreted by as SPARQL.
-If a SPARQL query is used as the definition of a view then that view can be manipulated using SQL like
-any other view. In this way the result set from a SPARQL query can be easily accessed from Visual Studio
-using ADO.Net and the Entity Framework.
-      </para>
-      <para>
-To create a view of the customers in the Northwind first open the Virtuoso Conductor and log in as dba.
-Then open iSQL from the menu on the left and execute the following statement.
-      </para>
-<programlisting><![CDATA[
-
-CREATE VIEW Demo.demo.sparqlview as
-SPARQL
-PREFIX nwind: <http://demo.openlinksw.com/schemas/northwind#>
-SELECT DISTINCT  ?s
-FROM <http://demo.openlinksw.com/Northwind>
-WHERE {?s a nwind:Customer}
-]]></programlisting>
-<para>
-<emphasis>Note:</emphasis> If the view is added to the Visual Studio project as user "demo" (or any other
-than "dba'), then it must be ensured that the "SPARQL_SELECT" and "SPARQL_SPONGE" roles are assigned to
-this user, which can be done via the Virtuoso Conductor in the "System Admin" -> "User Accounts" tab.
-</para>
-    <figure id="sparqlwinf1" float="1">
-      <title>SPARQL_SPONGE</title>
-      <graphic fileref="ui/sparqlwinf1.png"/>
-    </figure>
-      <para><emphasis>Step 2 - Create a simple grid form in Visual Studio</emphasis></para>
-<orderedlist>
-  <listitem>Open <emphasis>Visual Studio</emphasis> and create a new <emphasis>Windows Forms Application</emphasis> called RDFDemo.</listitem>
-  <listitem>In the <emphasis>Form Designer</emphasis> drag a <emphasis>DataGridView</emphasis> on to the form.</listitem>
-  <listitem>Click the <emphasis>Choose Data Source</emphasis> drop down and select <emphasis>Add Project Data Source</emphasis>.
-    <figure id="sparqlwinf2" float="1">
-      <title>Data Source</title>
-      <graphic fileref="ui/sparqlwinf2.png"/>
-    </figure>
-  </listitem>
-  <listitem>In the <emphasis>Data Source Configuration Wizard</emphasis> choose Database and then set up a connection to the demo database on your local Virtuoso server. </listitem>
-  <listitem>On the <emphasis>Choose Your Data Objects</emphasis> page expand the <emphasis>Views</emphasis> and select sparqlview.
-    <figure id="sparqlwinf3" float="1">
-      <title>Data Source Configuration Wizard</title>
-      <graphic fileref="ui/sparqlwinf3.png"/>
-    </figure>
-  </listitem>
-  <listitem>Click <emphasis>Finish</emphasis>.</listitem>
-  <listitem>In the <emphasis>Form Designer</emphasis> select dataGridView1 and change the <emphasis>AutoSizeColumnsMode</emphasis> to AllCellsExceptHeader.</listitem>
-  <listitem>Select the <emphasis>DefaultCellStyle</emphasis> and click on the ellipsis. This will open the
-<emphasis>CellStyleBuilder</emphasis>. Change the <emphasis>ForeColor</emphasis> to Blue.
-    <figure id="sparqlwinf4" float="1">
-      <title>CellStyleBuilder</title>
-      <graphic fileref="ui/sparqlwinf4.png"/>
-    </figure>
-  </listitem>
-  <listitem>Expand <emphasis>Font</emphasis> and change <emphasis>Underline</emphasis> to True.
-Click <emphasis>OK</emphasis>.</listitem>
-</orderedlist>
-      <para><emphasis>Step 3 - Change the mapping of the DataSet.</emphasis></para>
-<para>In the Solution Explorer you will now have a DataSet called DemoDataSet.xsd. If you double click on
-this it opens the DataSet Designer. Select the column called s in the sparqlview table and in the Properties
-pane change the DataType from System.String to System.Object.</para>
-<para>The data returned by a SPARQL query can either be an <link linkend="rdfiriidtype">IRI</link> or a
-literal value. In order to distinguish between the two the Virtuoso ADO.Net provider defines an additional
-data type, SQLExtendedString. By setting the column type to System.Object we can cast the fetched data back
-to SQLExtendedString and find out if an individual value is an IRI or a literal and handle it appropriately.
-</para>
-<para><emphasis>Step 4 - Create the on_click event handler for the cells in the DataGridView.</emphasis></para>
-<para>Return to the <emphasis>Form Designer</emphasis> and double click on the cell of the
-<emphasis>DataGridView</emphasis>. This creates the <emphasis>dataGridView1_CellContentClick</emphasis> method in Form1.cs. This is the method that handles clicking on IRI objects in the grid.
-</para>
-<para>Paste in the following block of code into the body of the <emphasis>dataGridView1_CellContentClick</emphasis> method.
-</para>
-<programlisting><![CDATA[
-int column = e.ColumnIndex;
- object o = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
- Type t = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].ValueType;
-
- if (o is SqlExtendedString)
- {
-     SqlExtendedString se = (SqlExtendedString) o;
-     ExtendedStringHandler seHandler = new ExtendedStringHandler(se, this.sparqlviewTableAdapter.Connection);
-     seHandler.displayData();
- }
- else if (o is SqlRdfBox)
- {
-     //doesn't do anything at the moment
- }
-
-]]></programlisting>
-<para>
-As we are using the SQLExtendedString extension from the Virtuoso ADO.Net provider you will also need to add
-</para>
-<programlisting><![CDATA[
-using OpenLink.Data.Virtuoso;
-]]></programlisting>
-<para>
-at the top of the file.
-</para>
-<para><emphasis>Step 5 - Create a class to handle exploring the RDF data.</emphasis></para>
-<itemizedlist mark="bullet">
-  <listitem>Add a new C# class to the project called ExtendedStringHandler, by Right clicking on
-RDFDemo in the <emphasis>Solution Explorer</emphasis> and <emphasis>Add</emphasis> a
-<emphasis>Class</emphasis>.</listitem>
-  <listitem>Add the following using statements to the top of the file
-<programlisting><![CDATA[
-using OpenLink.Data.Virtuoso;
-using System.Data;
-using System.Windows.Forms;
-using System.Drawing;
-using System.Data.Mapping;
-using System.Data.Common;
-]]></programlisting>
-</listitem>
-  <listitem>Paste the following block of code into the class definition.
-<programlisting><![CDATA[
-StringBuilder DescribeCommand;
-VirtuosoConnection ParentConnection;
-List<Label> labelList = new List<Label>();
-List<TextBox> textBoxList = new List<TextBox>();
-DescribeDataSet describeDataSet = new DescribeDataSet();
-Boolean isIRI = false;
-
-public ExtendedStringHandler(SqlExtendedString iri, VirtuosoConnection parentConnection)
- {
-     ParentConnection = parentConnection;
-     if (iri.IriType == SqlExtendedStringType.IRI)
-     {
-         isIRI = true;
-         DescribeCommand = new StringBuilder("sparql select * from <http://demo.openlinksw.com/Northwind> where {<" + iri.ToString() + "> ?p ?o}");      // Replace demo.openlinksw.com with your  URIQA DefaultHost setting
-     }
- }
-
- public string describeCommandText
- {
-     get
-     {
-         return DescribeCommand.ToString();
-     }
- }
-
- public void getDescribeData()
- {
-      VirtuosoCommand myCommand = new VirtuosoCommand(this.describeCommandText, this.ParentConnection);
-     VirtuosoDataAdapter myAdapter = new VirtuosoDataAdapter();
-     myAdapter.SelectCommand = myCommand;
-     myAdapter.Fill(describeDataSet.DataTable1);
- }
-
- public void displayData()
- {
-     if (isIRI)
-     {
-         getDescribeData();
-         Form describeForm = new Form();
-         describeForm.AutoScroll = true;
-         describeForm.Width = 840;
-
-         Label label1 = new Label();
-         label1.AutoSize = true;
-         label1.Font = new Font(label1.Font.FontFamily, label1.Font.Size + 3.0F, label1.Font.Style | FontStyle.Bold, label1.Font.Unit);
-         describeForm.Controls.Add(label1);
-
-         DataTable table1 = describeDataSet.Tables[0];
-         if (table1.Rows.Count == 0)
-             label1.Text = "No Details Available";
-         else
-         {
-             foreach (DataRow row in table1.Rows)
-                 if (row[0].ToString() == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
-                 {
-                     StringBuilder title = new StringBuilder(row[1].ToString() + " details");
-                     label1.Text = title.ToString();
-                     break;
-                 }
-
-             foreach (DataRow row in table1.Rows)
-             {
-                 Label propertyLabel = new Label();
-                 TextBox valueBox = new TextBox();
-                 valueBox.Width = 400;
-
-                 object property = row[0];
-                 object value = row[1];
-
-                 if (value is SqlExtendedString)
-                 {
-                     valueBox.ForeColor = Color.Blue;
-                     valueBox.Font = new Font(valueBox.Font.FontFamily, valueBox.Font.Size, valueBox.Font.Style | FontStyle.Underline, valueBox.Font.Unit);
-                 }
-                 propertyLabel.Text = row[0].ToString();
-                 propertyLabel.AutoEllipsis = true;
-                 propertyLabel.AutoSize = false;
-                 propertyLabel.Width = propertyLabel.PreferredWidth > 380 ? 380 : propertyLabel.PreferredWidth;
-
-                 Binding bind = new Binding("Text", row[1], "");
-                 valueBox.DataBindings.Add(bind);
-
-                 labelList.Add(propertyLabel);
-                 textBoxList.Add(valueBox);
-             }
-
-             for (int i = 0; i < table1.Rows.Count; i++)
-             {
-                 textBoxList[i].Click += new EventHandler(this.iri_Click);
-                 labelList[i].Location = new Point(10, i * 20 + 50);
-                 textBoxList[i].Location = new Point(400, i * 20 + 50);
-                 describeForm.Controls.Add(labelList[i]);
-                 describeForm.Controls.Add(textBoxList[i]);
-             }
-
-             describeForm.Height = labelList.Count * 20 + 100 > 500 ? 500 : labelList.Count * 20 + 100;
-         }
-         describeForm.ShowDialog();
-     }
-     else
-     {
-         Form blankForm = new Form();
-         Label label1 = new Label();
-         label1.Text = "Blank Node";
-         label1.Font = new Font(label1.Font.FontFamily, label1.Font.Size + 3.0F, label1.Font.Style | FontStyle.Bold, label1.Font.Unit);
-         blankForm.ShowDialog();
-     }
- }
-
- public void iri_Click(object sender, EventArgs e)
- {
-     int boxNum = 0;
-
-     for (int i = 0; i < textBoxList.Count; i++)
-     {
-         if (sender == textBoxList[i])
-         {
-             boxNum = i;
-             break;
-         }
-     }
-
-    Object o = describeDataSet.DataTable1.Rows[boxNum][1];
-     if (o is SqlExtendedString)
-     {
-         SqlExtendedString se = (SqlExtendedString)o;
-         ExtendedStringHandler seHandler = new ExtendedStringHandler(se, ParentConnection);
-         seHandler.displayData();
-     }
-     else if (o is SqlRdfBox)
-     {
-        //doesn't do anything at the moment
-    }
- }
-]]></programlisting>
-</listitem>
-</itemizedlist>
-<para>
-The ExtendedStringHandler class creates a new SPARQL query based on the IRI that was clicked. This
-query is executed against Virtuoso using the ADO.Net connection in the same way that any SQL statement
-would be executed across an ADO.Net connection. This can be considered as Client Side SPARQL. The result
-set from the query describes the selected object and is returned as an ADO.Net DataAdapter. The
-DataAdapter is used to fill a DataTable which is displayed on a new form. We now need to add the
-new DataSet to the project and define the DataTable that will hold the query results.
-</para>
-      <para><emphasis>Step 6 - Add a new DataSet to hold the query results.</emphasis></para>
-<orderedlist>
-  <listitem>Right click RDFDemo in the <emphasis>Solution Explorer</emphasis> and add a new
-<emphasis>DataSet</emphasis>. Call the new <emphasis>DataSet</emphasis> DescribeDataSet.
-    <figure id="sparqlwinf5" float="1">
-      <title>Add a new DataSet</title>
-      <graphic fileref="ui/sparqlwinf5.png"/>
-    </figure>
-</listitem>
-  <listitem>Double click on DescribeDataSet in the <emphasis>Solution Explorer</emphasis> to open the
-<emphasis>DataSet</emphasis> Designer and drag a <emphasis>DataTable</emphasis> from the
-<emphasis>Toolbox</emphasis> into it.</listitem>
-  <listitem>Add two columns, p and o, to the <emphasis>DataTable</emphasis> and set the
-<emphasis>DataType</emphasis> of each column to System.Object.
-    <figure id="sparqlwinf6" float="1">
-      <title>Add two columns</title>
-      <graphic fileref="ui/sparqlwinf6.png"/>
-    </figure></listitem>
-</orderedlist>
-      <para><emphasis>Step 7 - Build and run the application.</emphasis></para>
-<para>You should see a form displaying all the Northwind customers, like this.
-</para>
-    <figure id="sparqlwinf7" float="1">
-      <title>Northwind customers</title>
-      <graphic fileref="ui/sparqlwinf7.png"/>
-    </figure>
-<para>When any customer is clicked it opens a new form showing customer details.
-</para>
-    <figure id="sparqlwinf8" float="1">
-      <title>Customer details</title>
-      <graphic fileref="ui/sparqlwinf8.png"/>
-    </figure>
-<para>Clicking on the links in the new form allows you to drill down further to get
-order, product, location details etc.
-</para>
-    <figure id="sparqlwinf9" float="1">
-      <title>Order, product, location details</title>
-      <graphic fileref="ui/sparqlwinf9.png"/>
-    </figure>
-<para>and</para>
-    <figure id="sparqlwinf10" float="1">
-      <title>Order, product, location details</title>
-      <graphic fileref="ui/sparqlwinf10.png"/>
-    </figure>
-      <para><emphasis>Next Steps</emphasis></para>
-<para>
-You will notice if you keep clicking on the links that this application will only display data that
-is held in the Northwind graph. Clicking on an external link, for example the link to Berlin in
-dbpedia, http://dbpedia.org/resource/Berlin, results in a empty window and an error message. The
-next step is to extend this application so that it can handle dereferencing external IRIs.
-</para>
-    </sect2>
-    <sect2 id="installwfasxtendcomlab">
-      <title>Extending RDFDemo to Allow Dereferencing of External IRIs</title>
-<para>
-This section will guide you through extending the application created in
-<link linkend="installwfasgetstart">Creating a Windows Forms Application To Access RDF Data Using The
-Virtuoso ADO.Net Provider</link> so that it will dereference external IRIs.
-</para>
-      <para><emphasis>Pre-requisites</emphasis></para>
-<orderedlist>
-  <listitem>A working copy of the RDFDemo application created in
-<link linkend="installwfasgetstart">Creating a Windows Forms Application To
-Access RDF Data Using The Virtuoso ADO.Net Provider.</link></listitem>
-</orderedlist>
-    <sect3 id="installwfasxtendcomlabextappl">
-      <title>Extending the Application</title>
-<para>In RDFDemo when the sparql endpoint is queried to get the description of the selected item it executes
-a query that is restricted to the local Northwind dataset. The query is something like
-</para>
-<programlisting><![CDATA[
-SPARQL
-PREFIX nwind: <http://demo.openlinksw.com/schemas/northwind#>
-SELECT DISTINCT  ?s
-FROM <http://demo.openlinksw.com/Northwind>
-WHERE {?s a nwind:Customer}
-]]></programlisting>
-<para>If you examine the ExtendedStringHandler class you will see that the dataset clause, from
-<http://localhost:8890/Northwind>, is hard coded. This means that when when the selected IRI is
-a link to an external data store, such as dbpedia, there is no matching data and an error is displayed.
-If the application is to be able to dereference external IRIs then the hard coded dataset clause needs
-to be removed and then we can use a Virtuoso extension to SPARQL, get:soft, that tells Virtuoso that it
-needs to go and look elsewhere for the graph. However, this will result in a loss of performance when
-exploring the local Northwind dataset. To minimize the impact on performance we will first query the
-local Northwind dataset and if there are no matching triples returned then we will use a more generic
-query that will look elsewhere for matching data.
-</para>
-      <para><emphasis>Step 1 - Add the alternative query to the ExtendedString Class.</emphasis></para>
-<itemizedlist mark="bullet">
-  <listitem>Open the RDFDemo project in Visual Studio </listitem>
-  <listitem>Open the ExtendedStringHandler class.</listitem>
-  <listitem>Remove DescribeCommand by removing the line
-<programlisting><![CDATA[
-StringBuilder DescribeCommand;
-]]></programlisting>
-<para>
-and substitute the following:
-</para>
-<programlisting><![CDATA[
-StringBuilder DescribeCommandSimple, DescribeCommandGeneral;
-]]></programlisting>
-</listitem>
-  <listitem>In the ExtendedStringHandler constructor the sparql query that was DescribeCommand becomes
-DescribeCommandSimple and we define a new query for DescribeCommandGeneral.
-<programlisting><![CDATA[
-DescribeCommandSimple = new StringBuilder("sparql select * from <http://demo.openlinksw.com/Northwind> where {<" + iri.ToString() + "> ?p ?o}");       // Replace demo.openlinksw.com with your  URIQA DefaultHost setting
-DescribeCommandGeneral = new StringBuilder("sparql define get:soft " + '"'.ToString() + "soft" + '"'.ToString() + " select * from <" + iri.ToString() + "> where { <" + iri.ToString() + "> ?p ?o }");
-]]></programlisting>
-</listitem>
-  <listitem>The single describeCommand property needs to be replaced with the two new properties,
-DescribeCommandSimple and DescribeCommandGeneral
-<programlisting><![CDATA[
-public string describeCommandSimpleText
-{
-    get
-    {
-        return DescribeCommandSimple.ToString();
-    }
-}
-public string describeCommandGeneralText
-{
-    get
-    {
-        return DescribeCommandGeneral.ToString();
-    }
-}
-]]></programlisting>
-</listitem>
-  <listitem>Finally, the getDescribeData method needs changing to:
-<programlisting><![CDATA[
-public void getDescribeData()
-{
-    VirtuosoCommand myCommand = new VirtuosoCommand(this.describeCommandSimpleText, this.ParentConnection);
-    VirtuosoDataAdapter myAdapter = new VirtuosoDataAdapter();
-    myAdapter.SelectCommand = myCommand;
-    myAdapter.Fill(describeDataSet.DataTable1);
-    // Tried the simple version if fails to get the data try
-    // to look elsewhere.
-    if (describeDataSet.DataTable1.Rows.Count == 0)
-    {
-        myCommand.CommandText = describeCommandGeneralText;
-        myAdapter.Fill(describeDataSet.DataTable1);
-    }
-}
-]]></programlisting>
-</listitem>
-</itemizedlist>
-      <para><emphasis>Step 2 - Build and Run the Application</emphasis></para>
-<para>
-You will see the same starting form:
-</para>
-    <figure id="sparqlwinf11" float="1">
-      <title>Build and Run the Application</title>
-      <graphic fileref="ui/sparqlwinf11.png"/>
-    </figure>
-<para>
-Select a Customer and then select the link to the City in dbpedia. This will now open up another window
-displaying information about the city from dbpedia. Be patient as it may take a little while to open.
-</para>
-    <figure id="sparqlwinf12" float="1">
-      <title>Customer</title>
-      <graphic fileref="ui/sparqlwinf12.png"/>
-    </figure>
-      <para><emphasis>Step 3 - Changing the Form Title</emphasis></para>
-<para>
-Notice that in displayData method that we look for a
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type and create a title for the form from it.
-</para>
-<programlisting><![CDATA[
-foreach (DataRow row in table1.Rows)
-  if (row[0].ToString() == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
-  {
-      StringBuilder title = new StringBuilder(row[1].ToString() + " details");
-      label1.Text = title.ToString();
-      break;
-  }
-]]></programlisting>
-<para>
-This worked well for the Northwind subjects but less well now we are getting data from other graphs.
-To change the title of the forms used to display the data:
-</para>
-<itemizedlist mark="bullet">
-  <listitem>Add an new member variable to hold the IRI that we exploring to the bock of member variables
-<programlisting><![CDATA[
-StringBuilder DescribeCommandSimple, DescribeCommandGeneral;
-VirtuosoConnection ParentConnection;
-List<Label> labelList = new List<Label>();
-List<TextBox> textBoxList = new List<TextBox>();
-DescribeDataSet describeDataSet = new DescribeDataSet();
-Boolean isIRI = false;
-SqlExtendedString ParentIRI;
-]]></programlisting>
-</listitem>
-  <listitem>Assign a value to ParentIRI in the constructor:
-<programlisting><![CDATA[
-public ExtendedStringHandler(SqlExtendedString iri, VirtuosoConnection parentConnection)
-  {
-      ParentConnection = parentConnection;
-      if (iri.IriType == SqlExtendedStringType.IRI)
-      {
-          ParentIRI = iri;
-          isIRI = true;
-          DescribeCommandSimple = new StringBuilder("sparql select * from <http://demo.openlinksw.com/Northwind> where {<" + iri.ToString() + "> ?p ?o}");      // Replace demo.openlinksw.com with your  URIQA DefaultHost setting
-          DescribeCommandGeneral = new StringBuilder("sparql define get:soft " + '"'.ToString() + "soft" + '"'.ToString() + " select * from <" + iri.ToString() + "> where { <" + iri.ToString() + "> ?p ?o }");
-      }
-  }
-]]></programlisting>
-</listitem>
-  <listitem>Remove the existing foreach block that sets the form title and replace with the following lines:
-<programlisting><![CDATA[
-StringBuilder title = new StringBuilder(ParentIRI.ToString() + " details");
-label1.Text = title.ToString();
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application.
-    <figure id="sparqlwinf13" float="1">
-      <title>Build and run the application</title>
-      <graphic fileref="ui/sparqlwinf13.png"/>
-    </figure>
-</listitem>
-</itemizedlist>
-<para><emphasis>Next Steps</emphasis></para>
-<para>The application now allows you to explore data and follow links from your locally held data into the
-external web of data. Looking at the data displayed in the form it would be nice to make the labels for
-the properties more compact. The label http://dbpedia.org/property/population is a very precise definition
-but for our purposes it would be clearer to label the property just population. In the next step will be
-to modify the application so that it displays more readable labels.
-</para>
-    </sect3>
-    </sect2>
-    <sect2 id="installwfasxtendcomplab">
-      <title>Extending RDFDemo to Display More Compact Labels</title>
-<para>
-This section will guide you through extending the application created in
-<link linkend="installwfasxtendcomlab">Extending RDFDemo to Allow Dereferencing of External IRIs</link> so that the data is displayed in a more readable form.
-</para>
-      <para><emphasis>Pre-requisites</emphasis></para>
-<orderedlist>
-  <listitem>A working copy of the RDFDemo application created in
-<link linkend="installwfasxtendcomlab">Extending RDFDemo to Allow Dereferencing of External IRIs</link></listitem>
-</orderedlist>
-    <sect3 id="installwfasxtendcomplabextapp">
-      <title>Extending the Application</title>
-<para>The RDF demo application presents the user with a list of Customers from the Northwind database in
-the form of dereferenceable IRIs. When a customer is selected from the list the application uses a sparql
-query to describe that customer and the results are displayed in a form as rows of labels and data. The
-labels correspond to RDF predicates and the data corresponds to RDF objects while the subject is the
-customer initially selected. In many cases the objects are dereferencable IRIs which are then used as
-the subject when the 'drilling down' into the data. However, the predicates are also IRIs so it is
-possible to gain more information about these as well.
-</para>
-<para>The RDF Schema defines a property http://www.w3.org/2000/01/rdf-schema#label that may be used to
-provide a human-readable version of a resource's name. We can obtain further details of each of the
-predicates in a resultset and check to see if one of the properties is an
-http://www.w3.org/2000/01/rdf-schema#label. If it is we can use the associated text as the label in
-our form instead of the the predicate IRI. The benefit should be a more human readable form.
-</para>
-      <para><emphasis>Step 1 - Add a New Method to Get the Label Text</emphasis></para>
-<para>This method takes the predicate IRI and issues a sparql query to get its description. It then
-cycles through the returned dataset to find a http://www.w3.org/2000/01/rdf-schema#label. If there is
-one then the associated text is returned by the method. Otherwise the method returns the IRI string.
-</para>
-<itemizedlist mark="bullet">
-  <listitem>Add the following method to the ExtendedStringHandlerClass
-<programlisting><![CDATA[
-private string getLabelText(Object label)
-  {
-      string labelText = label.ToString();
-      if (label is SqlExtendedString)
-      {
-          SqlExtendedString se = (SqlExtendedString)label;
-          StringBuilder getLabelCommandText = new StringBuilder("sparql define get:soft \"soft\" select * from <" + se.ToString() + "> where {<" + se.ToString() + "> ?p ?o}");
-          VirtuosoCommand getLabelCommand = new VirtuosoCommand(getLabelCommandText.ToString(), ParentConnection);
-          VirtuosoDataAdapter getLabelAdapter = new VirtuosoDataAdapter();
-          getLabelAdapter.SelectCommand = getLabelCommand;
-          DataSet getLabelDataSet = new DataSet();
-          try
-          {
-              getLabelAdapter.Fill(getLabelDataSet);
-              foreach (DataRow getLabelRow in getLabelDataSet.Tables[0].Rows)
-              {
-                  if (getLabelRow[0].ToString() == "http://www.w3.org/2000/01/rdf-schema#label")
-                  {
-                      labelText = getLabelRow[1].ToString();
-                      break;
-                  }
-              }
-          }
-          catch
-          {
-          }
-      }
-      return labelText;
-  }
-]]></programlisting>
-</listitem>
-  <listitem>Change the line in displayData from
-<programlisting><![CDATA[
-propertyLabel.Text = row[0].ToString();
-]]></programlisting>
-</listitem>
-  <listitem>to
-<programlisting><![CDATA[
-propertyLabel.Text = getLabelText(row[0]);
-]]></programlisting>
-</listitem>
-</itemizedlist>
-       <para><emphasis>Step 1 - Add a New Method to Get the Label Text</emphasis></para>
-<para>When you run the application you will see that the initial form is the same. In fact, when you
-select the Customer you will also see that the customer details are also the same. It is only when you
-start exploring data outside the Northwind graph that you will see the labels in the form change.
-</para>
-    <figure id="sparqlwinf14" float="1">
-      <title>Northwind graph</title>
-      <graphic fileref="ui/sparqlwinf14.png"/>
-    </figure>
-    <para><emphasis>Next Steps</emphasis></para>
-<para>It is clear from running the application that the Northwind ontology does not define an
-http://www.w3.org/2000/01/rdf-schema#label for its members. In order to benefit from this modified
-version of RDFDemo we need to update our Northwind ontology so that
-http://www.w3.org/2000/01/rdf-schema#label is defined for each resource. The next step will be to modify
-our Northwind ontology.
-</para>
-     </sect3>
-    </sect2>
-    <sect2 id="installwfasmodify">
-      <title>Modifying the Northwind Ontology to Add Labels</title>
-<para>This section will guide you through modifying the Northwind Ontology created when you installed
-the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/demo_dav.vad">demo database VAD package</ulink> so that each resources is identified by an
-http://www.w3.org/2000/01/rdf-schema#label. This will improve the readability of the information displayed by
-the application created in <link linkend="installwfasxtendcomplab">Extending RDFDemo to Display More Compact Labels</link>.
-</para>
-<para><emphasis>Pre-requisites</emphasis></para>
-<orderedlist>
-  <listitem>A working copy of the RDFDemo application created in <link linkend="installwfasxtendcomplab">Extending RDFDemo to Display More Compact Labels</link></listitem>
-</orderedlist>
-    <sect3 id="installwfasmodifyeditont">
-      <title>Editing the Ontology</title>
-    <para><emphasis>Get a Working Copy of the Northwind Ontology</emphasis></para>
-<para>The the file describing the Northwind Ontology, nw.owl, is installed in the DAV when the demo vad
-is loaded. To get a working copy open the Virtuoso Conductor and log in as dba. Select WebDAV Browser in
-the navigation panel on the left. This will open a window that allows you to browse the WebDAV Repository.
-The Northwind Ontology file can be found in DAV/VAD/demo/sql. Take a copy of the file.
-</para>
-    <para><emphasis>Editing nw.owl</emphasis></para>
-<para>In the first instance is edited nw.owl so that the property name consistently begin with a lower
-case letter. This matches the results for describing resources held in the Northwind database. Also are
-added missing properties so that there should be a label in all cases.
-</para>
-    <para><emphasis>Registering the Changes in Virtuoso</emphasis></para>
-<para>There are two methods for registering the changes in Virtuoso:
-</para>
-<orderedlist>
-  <listitem>Method I:
-    <itemizedlist mark="bullet">
-      <listitem>Copy the edited version of nw.owl back into the DAV.</listitem>
-      <listitem>In isql, load the script load_ontology_dav.sql and execute it. The new version of
-nw.owl will then be used</listitem>
-    </itemizedlist>
-</listitem>
-  <listitem>
-    <itemizedlist mark="bullet">
-      <listitem>Ensure that your new version of nw.owl is in a folder accessible by Virtuoso. You may
-need to edit your virtuoso.ini file and restart the server.</listitem>
-      <listitem>In isql, load the script load_ontology_file.sql and edit it so that it has the full
-path to the new version of nw.owl</listitem>
-      <listitem>Run the script. The new version of nw.owl will then be used.</listitem>
-    </itemizedlist>
-</listitem>
-</orderedlist>
-    <para>Modify RDFDemo so that it looks for the graph used to describe the Northwind data and
-searches that graph for the predicate details:</para>
-<orderedlist>
-  <listitem>Add a new member variable to the ExtendedStringHandler class to hold the graphs that
-we need to search for the predicate information.
-<programlisting><![CDATA[
-StringBuilder DescribeCommandSimple, DescribeCommandGeneral;
-VirtuosoConnection ParentConnection;
-List<Label> labelList = new List<Label>();
-List<TextBox> textBoxList = new List<TextBox>();
-List<String> graphList = new List<String>();
-DescribeDataSet describeDataSet = new DescribeDataSet();
-Boolean isIRI = false;
-SqlExtendedString ParentIRI;
-]]></programlisting></listitem>
-  <listitem>In displayData, after we have set the title of the form, add the following block of code:
-<programlisting><![CDATA[
-// Later we will want to get property labels and for that
- // we will need the graph where the resource is defined.
-foreach (DataRow row in table1.Rows)
-     if (row[0].ToString() == "http://www.openarchives.org/ore/terms/isDescribedBy"
-    && row[1].ToString() != ParentIRI.ToString())
-     {
-         String graph = row[1].ToString();
-         graphList.Add(graph);
-     }
-]]></programlisting>
-</listitem>
-  <listitem>Replace the existing getLabelText method with an extended version
-<programlisting><![CDATA[
- private string getLabelText(Object label)
-  {
-      string labelText = label.ToString();
-      if (label is SqlExtendedString)
-      {
-          Boolean foundLabel = false;
-          SqlExtendedString se = (SqlExtendedString)label;
-          VirtuosoDataAdapter getLabelAdapter = new VirtuosoDataAdapter();
-          DataSet getLabelDataSet = new DataSet();
-
-          //Try finding it in resources graph first
-          foreach (String graph in graphList)
-          {
-              StringBuilder getLabelCommandText = new StringBuilder("sparql select * from <" + graph + "> where {<" + se.ToString() + "> ?p ?o}");
-              VirtuosoCommand getLabelCommand = new VirtuosoCommand(getLabelCommandText.ToString(), ParentConnection);
-              getLabelAdapter.SelectCommand = getLabelCommand;
-
-              try
-              {
-                  getLabelAdapter.Fill(getLabelDataSet);
-                  foreach (DataRow getLabelRow in getLabelDataSet.Tables[0].Rows)
-                  {
-                      if (getLabelRow[0].ToString() == "http://www.w3.org/2000/01/rdf-schema#label")
-                      {
-                          labelText = getLabelRow[1].ToString();
-                          foundLabel = true;
-                          break;
-                      }
-                  }
-              }
-              catch
-              {
-              }
-              if (foundLabel)
-                  break;
-          }
-          // If we still have no label try the predicate itself as the graph
-          if (!foundLabel)
-          {
-              StringBuilder getLabelCommandText = new StringBuilder("sparql define get:soft \"soft\" select * from <" + se.ToString() + "> where {<" + se.ToString() + "> ?p ?o}");
-              VirtuosoCommand getLabelCommand = new VirtuosoCommand(getLabelCommandText.ToString(), ParentConnection);
-              getLabelAdapter.SelectCommand = getLabelCommand;
-              try
-              {
-                  getLabelAdapter.Fill(getLabelDataSet);
-                  foreach (DataRow getLabelRow in getLabelDataSet.Tables[0].Rows)
-                  {
-                      if (getLabelRow[0].ToString() == "http://www.w3.org/2000/01/rdf-schema#label")
-                      {
-                          labelText = getLabelRow[1].ToString();
-                          break;
-                      }
-                  }
-              }
-              catch
-              {
-              }
-          }
-      }
-      return labelText;
-  }
-]]></programlisting>
-<para>This extended method first checks the graphs in the graph list for the predicate information then
-if no label has been found tries the predicate itself as the graph.
-</para>
-</listitem>
-  <listitem>Build and run, the Northwind resources should now be correctly and concisely labeled
-    <figure id="sparqlwinf15" float="1">
-      <title>Northwind resources</title>
-      <graphic fileref="ui/sparqlwinf15.png"/>
-    </figure>
-</listitem>
-</orderedlist>
-<para>
-</para>
-    <para><emphasis>Improving The Appearance of the Form</emphasis></para>
-<para>The following changes are not strictly necessary but improve the appearance of the form:
-</para>
-<itemizedlist mark="bullet">
-  <listitem>Line up the right hand edge of the labels with the text boxes by setting TextAlign to
-MiddleRight and reduce the width of the labels.
-<programlisting><![CDATA[
-propertyLabel.Text = getLabelText(row[0]);
-propertyLabel.AutoEllipsis = true;
-propertyLabel.AutoSize = false;
-propertyLabel.Width = 130;
-propertyLabel.TextAlign = ContentAlignment.MiddleRight;
-]]></programlisting>
-</listitem>
-  <listitem>Make the form narrower:
-<programlisting><![CDATA[
-describeForm.Width = 660;
-]]></programlisting>
-</listitem>
-  <listitem>Alter the positioning of the labels and TextBoxes on the form:
-<programlisting><![CDATA[
-textBoxList[i].Click += new EventHandler(this.iri_Click);
-labelList[i].Location = new Point(10, i * 22 + 50);
-textBoxList[i].Location = new Point(150, i * 22 + 50);
-describeForm.Controls.Add(labelList[i]);
-describeForm.Controls.Add(textBoxList[i]);
-]]></programlisting>
-    <figure id="sparqlwinf16" float="1">
-      <title>Alter the positioning</title>
-      <graphic fileref="ui/sparqlwinf16.png"/>
-    </figure>
-</listitem>
-</itemizedlist>
-    <para><emphasis>Next Steps</emphasis></para>
-<para>The image below shows some of the information about an employee in the Northwind dataset.
-</para>
-    <figure id="sparqlwinf17" float="1">
-      <title>employee</title>
-      <graphic fileref="ui/sparqlwinf17.png"/>
-    </figure>
-<para>In the next step we will extend the application so the images and web pages can be viewed
-and long text fields are displayed in full.
-</para>
-    </sect3>
-    </sect2>
-
-    <sect2 id="installwfasxtendlongtext">
-      <title>Extending RDFDemo to Display Images and Longer Text Fields.</title>
-<para>This section will guide you through extending RDFDemo so that longer text fields can be displayed
-as a block of text and so that links to images and web pages can be viewed in a browser window.
-</para>
-<para><emphasis>Pre-requisites</emphasis></para>
-<orderedlist>
-  <listitem>A working copy of the RDFDemo application created in
-<link linkend="installwfasmodify">Modifying the Northwind Ontology to Add Labels</link></listitem>
-</orderedlist>
-    <sect3 id="installwfasxtendlongtextmodf">
-      <title>Modifying the Application</title>
-    <para><emphasis>Displaying Text</emphasis></para>
-<para>We will modify the form that show the details of the selected item so that when the text in the boxes
-is too long to be seen in full a button will appear beside the box on the form and if you click the button
-the complete text will be displayed in a separate window.
-</para>
-<orderedlist>
-  <listitem>Add a new class, MoreButton that extends System.Windows.Forms.Button.
-<itemizedlist mark="bullet">
-  <listitem>In the <emphasis>Solution Explorer</emphasis> right click on the RDFDemo project and select
-<emphasis>Add</emphasis> then <emphasis>New Item</emphasis>.</listitem>
-  <listitem>Add a new class called MoreButton.cs.
-    <figure id="sparqlwinf18" float="1">
-      <title>Add a new class</title>
-      <graphic fileref="ui/sparqlwinf18.png"/>
-    </figure>
-</listitem>
-  <listitem>The following using statement goes at the top of the file:
-<programlisting><![CDATA[
-using System.Windows.Forms;
-]]></programlisting>
-</listitem>
-  <listitem>The MoreButton class must inherit from System.Windows.Forms.Button
-so the class definition line should look like this:
-<programlisting><![CDATA[
-class MoreButton : Button
-]]></programlisting>
-</listitem>
-  <listitem>Add the following code to the body of the MoreButton class:
-<programlisting><![CDATA[
- String longText;
-
- public MoreButton(String text)
- {
-     longText = text;
-     this.Text = "More";
- }
-
- protected override void  OnClick(EventArgs e)
- {
-     Form moreForm = new Form();
-     TextBox moreBox = new TextBox();
-     moreBox.Text = longText;
-     moreBox.Width = 300;
-     moreBox.Height = 250;
-     moreBox.ScrollBars = ScrollBars.Vertical;
-     moreBox.Multiline = true;
-     moreBox.WordWrap = true;
-     moreBox.Select(0, 0);
-     moreBox.ReadOnly = true;
-     moreForm.Controls.Add(moreBox);
-     moreForm.Width = 320;
-     moreForm.Height = 280;
-     moreForm.ShowDialog();
- }
-]]></programlisting>
-</listitem>
-</itemizedlist>
-</listitem>
-  <listitem>In displayData in the ExtendedStringHandler class, when the labels and TextBoxes are added to
-the form check if the text is too big for the box. If it is then add a MoreButton that will display all
-the text in a separate window.
-<programlisting><![CDATA[
-if (textBoxList[i].DataBindings[0].DataSource.ToString().Length > 80
-    && !(textBoxList[i].DataBindings[0].DataSource is SqlExtendedString))
-{
-    moreButtonList.Add(new MoreButton(textBoxList[i].DataBindings[0].DataSource.ToString()));
-    moreButtonList[moreButtonList.Count - 1].Location = new Point(550, i * 22 + 50);
-    describeForm.Controls.Add(moreButtonList[moreButtonList.Count -1]);
-}
-]]></programlisting>
-</listitem>
-  <listitem>We will also need a list to hold the buttons as they are created so the following needs to
-be added to the member variables at the top of the ExtendedStringHandler class.
-<programlisting><![CDATA[
-List<MoreButton> moreButtonList = new List<MoreButton>();
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. If you click through to an Employee page you will see the
-Notes field now has a button labeled More next to it. If you click on that button the text from the Notes
-field is displayed in a new window.
-    <figure id="sparqlwinf19" float="1">
-      <title>Notes</title>
-      <graphic fileref="ui/sparqlwinf19.png"/>
-    </figure>
-</listitem>
-</orderedlist>
-    <para><emphasis>Displaying Images and Web Pages</emphasis></para>
-<para>Next we will modify the form so that item identified as images or web pages will be opened in a
-browser window. Again we will do this by adding a button beside the box on the form that will open the
-browser window.
-</para>
-<orderedlist>
-  <listitem>Add a new class, OpenButton that extends System.Windows.Forms.Button.
-<itemizedlist mark="bullet">
-  <listitem>In the <emphasis>Solution Explorer</emphasis> right click on the RDFDemo project and select
-<emphasis>Add</emphasis> then <emphasis>New Item</emphasis>
-</listitem>
-   <listitem>Add a new class called OpenButton.cs.
-</listitem>
-   <listitem>The following using statement goes at the top of the file:
-<programlisting><![CDATA[
-using System.Windows.Forms;
-]]></programlisting>
-</listitem>
-   <listitem>The OpenButton class must inherit from System.Windows.Forms.Button so the class
-definition line should look like this:
-<programlisting><![CDATA[
-class OpenButton : Button
-]]></programlisting>
-</listitem>
-   <listitem>Add the following code to the body of the OpenButton class:
-<programlisting><![CDATA[
-String urlText;
-
-public OpenButton(String text)
-{
-    urlText = text;
-    this.Text = "Open";
-}
-
-protected override void  OnClick(EventArgs e)
-{
-    System.Diagnostics.Process.Start(urlText);
-}
-]]></programlisting>
-</listitem>
-</itemizedlist>
-</listitem>
-  <listitem>In displayData in the ExtendedStringHandler class, where we added the code to check for long
-text fields we now need to check for IRIs that identify images and web pages. As a simple first attempt
-we will check for matching labels. So for example, if a property label is 'image' or 'webpage', we will
-assume it can be opened in a browser window and put an OpenButton beside it.
-<programlisting><![CDATA[
-if (labelList[i].Text == "website"
-    || labelList[i].Text == "image"
-    || labelList[i].Text == "depiction"
-    || labelList[i].Text == "page"
-    || labelList[i].Text == "url"
-    || labelList[i].Text == "image skyline")
-{
-    openButtonList.Add(new OpenButton(textBoxList[i].DataBindings[0].DataSource.ToString()));
-    openButtonList[openButtonList.Count - 1].Location = new Point (550, i * 22 + 50);
-    describeForm.Controls.Add(openButtonList[openButtonList.Count - 1]);
-}
-]]></programlisting>
-</listitem>
-  <listitem>We will also need a list to hold the buttons as they are created so the following needs to
-be added to the member variables at the top of the ExtendedStringHandler class.
-<programlisting><![CDATA[
-List<OpenButton> openButtonList = new List<OpenButton>();
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. If you click through to an Employee page now you will see that
-the Image field now has a button labeled Open next to it. If you click on that button the image is opened
-in your default browser.
-    <figure id="sparqlwinf20" float="1">
-      <title>Image</title>
-      <graphic fileref="ui/sparqlwinf20.png"/>
-    </figure>
-</listitem>
-</orderedlist>
-    <para><emphasis>Next Steps</emphasis></para>
-<para>It has already been mentioned that the property labels are also dereferenceable IRIs. We used this
-feature to find a short name to display rather that the complete IRI. The next step is to make the labels
-clickable so the ontology itself can also be explored.
-</para>
-    </sect3>
-    </sect2>
-
-
-    <sect2 id="installwfasxtendproplab">
-      <title>Extending RDFDemo To Make The Property Labels Clickable</title>
-<para>This section will guide you through extending RDFDemo to make the property labels clickable. Clicking
-on the property label will take you to a page describing that property.
-</para>
-<para><emphasis>Pre-requisites</emphasis></para>
-<orderedlist>
-  <listitem>A working copy of the RDFDemo application created in
-<link linkend="installwfasxtendlongtext">Extending RDFDemo to Display Images and Longer Text Fields</link></listitem>
-</orderedlist>
-    <sect3 id="installwfasxtendproplabmod">
-      <title>Modifying the Application</title>
-    <para><emphasis>Making the Labels Clickable</emphasis></para>
-<para>Making the property labels clickable is fairly straight forward. We will use basically the same code
-as is used to make the values clickable.
-</para>
-<orderedlist>
-  <listitem>First we need to add a new event handler. In the ExtendedStringHandler class modify displayData
-to add an event handler for each of the property labels.
-<programlisting><![CDATA[
-for (int i = 0; i < table1.Rows.Count; i++)
-{
-    textBoxList[i].Click += new EventHandler(this.iri_Click);
-    labelList[i].Location = new Point(10, i * 22 + 50);
-    textBoxList[i].Location = new Point(150, i * 22 + 50);
-    describeForm.Controls.Add(labelList[i]);
-    describeForm.Controls.Add(textBoxList[i]);
-]]></programlisting>
-<para>becomes
-</para>
-<programlisting><![CDATA[
-for (int i = 0; i < table1.Rows.Count; i++)
-{
-    textBoxList[i].Click += new EventHandler(this.iri_Click);
-    labelList[i].Location = new Point(10, i * 22 + 50);
-    labelList[i].Click += new EventHandler(this.label_Click);
-    textBoxList[i].Location = new Point(150, i * 22 + 50);
-    describeForm.Controls.Add(labelList[i]);
-    describeForm.Controls.Add(textBoxList[i]);
-]]></programlisting>
-</listitem>
-  <listitem>Then we need to add the EventHandler method. Add the following to the ExtendedStringHandler Class:
-<programlisting><![CDATA[
-public void label_Click(object sender, EventArgs e)
-  {
-      int labelNum = 0;
-
-      for (int i = 0; i < labelList.Count; i++)
-      {
-          if (sender == labelList[i])
-          {
-              labelNum = i;
-              break;
-          }
-      }
-
-      Object o = describeDataSet.DataTable1.Rows[labelNum][0];
-      if (o is SqlExtendedString)
-      {
-          SqlExtendedString se = (SqlExtendedString)o;
-          ExtendedStringHandler seHandler = new ExtendedStringHandler(se, ParentConnection);
-          seHandler.displayData();
-      }
-      else if (o is SqlRdfBox)
-      {
-          //doesn't do anything at the moment
-      }
-  }
-]]></programlisting>
-<para>
-If you compare this method to the EventHandler for the values, iri_Click, you will see that it is basically
-the same. The only difference is that it uses the property element from the data table rather than value.
-</para>
-</listitem>
-  <listitem>Finally, to make it clear that the labels are now active links, we will change the label colour
-to blue and underline them.
-<programlisting><![CDATA[
- propertyLabel.Text = getLabelText(row[0]);
- propertyLabel.AutoEllipsis = true;
- propertyLabel.AutoSize = false;
- propertyLabel.Width = 130;
- propertyLabel.TextAlign = ContentAlignment.MiddleRight;
-]]></programlisting>
-<para>becomes:
-</para>
-<programlisting><![CDATA[
-propertyLabel.Text = getLabelText(row[0]);
-propertyLabel.ForeColor = Color.Blue;
-propertyLabel.Font = new Font(propertyLabel.Font.FontFamily, propertyLabel.Font.Size, propertyLabel.Font.Style | FontStyle.Underline, propertyLabel.Font.Unit);
-propertyLabel.AutoEllipsis = true;
-propertyLabel.AutoSize = false;
-propertyLabel.Width = 130;
-propertyLabel.TextAlign = ContentAlignment.MiddleRight;
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. You will see the familiar starting page. If you then select one
-of the Customers you will notice the property labels now look like hyperlinks.
-    <figure id="sparqlwinf21" float="1">
-      <title>hyperlinks</title>
-      <graphic fileref="ui/sparqlwinf21.png"/>
-    </figure>
-<para>If you click on one of the label hyperlinks you will see a new form showing detailed information about
-the property which can itself be explored further by clicking on labels and values.
-    <figure id="sparqlwinf22" float="1">
-      <title>labels and values</title>
-      <graphic fileref="ui/sparqlwinf22.png"/>
-    </figure>
-</para>
-</listitem>
-</orderedlist>
-<para>These simple changes work up to a point but are not robust. If you explore the properties used by the
-local Northwind graph you quickly find that the property details are not found. The application needs some
-further changes to work consistently. The problem is finding the graph where the property information is
-defined. The general handler for Extended Strings first checks the local Northwind graph,
-http://localhost:8890/Northwind, where the Northwind data is held, and then uses the IRI itself as the graph
-and tries to load that dynamically. This is not working for information about the Northwind properties.
-These properties are defined in the Northwind ontology, http://demo.openlinksw.com/schemas/northwind. We
-have already had to find this graph when getting the short label name. We need to be able to associate the
-property label with the graph where its definition is stored. Then we can search this graph for details
-about the property when the label is clicked.
-</para>
-    <para><emphasis>Using the Graph Where the Property Label was Found to Find the Property Details</emphasis></para>
-<orderedlist>
-  <listitem>Create a new class, IRILabel, that inherits from System.Windows.Forms.Label.
-<itemizedlist mark="bullet">
-  <listitem>In the <emphasis>Solution Explorer</emphasis> right click on the RDFDemo project and select
-<emphasis>Add</emphasis> then <emphasis>New Item</emphasis>.</listitem>
-  <listitem>Add a new class called IRILabel.cs.
-    <figure id="sparqlwinf23" float="1">
-      <title>Add a new class</title>
-      <graphic fileref="ui/sparqlwinf23.png"/>
-    </figure>
-</listitem>
-</itemizedlist>
-</listitem>
-  <listitem>We need to reference System.Windows.Forms, System.Data and OpenLink.Data.Virtuoso so add
-<programlisting><![CDATA[
-using System.Windows.Forms;
-using OpenLink.Data.Virtuoso;
-using System.Data;
-]]></programlisting>
-<para>to the using block at the top of the class file. The class definition should look like this:
-</para>
-<programlisting><![CDATA[
-class IRILabel : Label
-]]></programlisting>
-</listitem>
-  <listitem>Paste the following code into the body of the class:
-<programlisting><![CDATA[
-SqlExtendedString SourceIRI;
-String GraphUsed;
-VirtuosoConnection ParentConnection;
-
-public IRILabel(Object iri, List<String> graphList, VirtuosoConnection parentConnection)
-{
-    ParentConnection = parentConnection;
-    if (iri is SqlExtendedString)
-    {
-        SourceIRI = (SqlExtendedString)iri;
-        Text = this.getLabelText(graphList);
-    }
-    else
-        Text = iri.ToString();
-}
-
-public SqlExtendedString iri
-{
-    get
-    {
-        return SourceIRI;
-    }
-}
-
-public String graph
-{
-    get
-    {
-        return GraphUsed;
-    }
-}
-
-private string getLabelText(List<String> graphList)
-{
-    string labelText = SourceIRI.ToString();
-    Boolean foundLabel = false;
-    VirtuosoDataAdapter getLabelAdapter = new VirtuosoDataAdapter();
-    DataSet getLabelDataSet = new DataSet();
-
-    //Try finding it in resources graph first
-    foreach (String graph in graphList)
-    {
-        StringBuilder getLabelCommandText = new StringBuilder("sparql select * from <" + graph + "> where {<" + SourceIRI.ToString() + "> ?p ?o}");
-        VirtuosoCommand getLabelCommand = new VirtuosoCommand(getLabelCommandText.ToString(), ParentConnection);
-        getLabelAdapter.SelectCommand = getLabelCommand;
-
-        try
-        {
-            getLabelAdapter.Fill(getLabelDataSet);
-            foreach (DataRow getLabelRow in getLabelDataSet.Tables[0].Rows)
-            {
-                if (getLabelRow[0].ToString() == "http://www.w3.org/2000/01/rdf-schema#label")
-                {
-                    labelText = getLabelRow[1].ToString();
-                    foundLabel = true;
-                    break;
-                }
-            }
-        }
-        catch
-        {
-        }
-        if (foundLabel)
-        {
-            GraphUsed = graph;
-            break;
-        }
-    }
-
-    // If we still have no label try the predicate itself as the graph
-    if (!foundLabel)
-    {
-        GraphUsed = SourceIRI.ToString();
-        StringBuilder getLabelCommandText = new StringBuilder("sparql define get:soft \"soft\" select * from <" + GraphUsed + "> where {<" + SourceIRI.ToString() + "> ?p ?o}");
-        VirtuosoCommand getLabelCommand = new VirtuosoCommand(getLabelCommandText.ToString(), ParentConnection);
-        getLabelAdapter.SelectCommand = getLabelCommand;
-        try
-        {
-            getLabelAdapter.Fill(getLabelDataSet);
-            foreach (DataRow getLabelRow in getLabelDataSet.Tables[0].Rows)
-            {
-                if (getLabelRow[0].ToString() == "http://www.w3.org/2000/01/rdf-schema#label")
-                {
-                    labelText = getLabelRow[1].ToString();
-                    break;
-                }
-            }
-        }
-        catch
-        {
-        }
-    }
-    return labelText;
-}
-]]></programlisting>
-<para>Notice that the getLabelText method has been moved into this new class and is now called from the
-constructor. When the IRILabel is constructed the label text is found using the list of graphs provided to
-the constructor. The graph containing the label is noted. We need to alter ExtendedStringHandler so that
-the labels are the new IRILabel type and so that the correct information is supplied to the constructor.
-</para>
-  </listitem>
-  <listitem>Change the labelList member variable declaration so it looks like this:
-<programlisting><![CDATA[
-List<IRILabel> labelList = new List<IRILabel>();
-]]></programlisting>
-  </listitem>
-  <listitem>Each propertyLabel created must be the new IRILabel type so the line:
-<programlisting><![CDATA[
-Label propertyLabel = new Label();
-]]></programlisting>
-<para>becomes:
-</para>
-<programlisting><![CDATA[
-IRILabel propertyLabel = new IRILabel(row[0], graphList, ParentConnection);
-]]></programlisting>
-  </listitem>
-  <listitem>As getLabelText is now called by the IRILabel constructor we can remove the line:
-<programlisting><![CDATA[
-propertyLabel.Text = getLabelText(row[0]);
-]]></programlisting>
-<para>from describeData in ExtendedStringHandler.
-</para>
-  </listitem>
-  <listitem>Now we modify the label_Click EventHandler so that it uses the graph information. Replace the
-existing method with:
-<programlisting><![CDATA[
-public void label_Click(object sender, EventArgs e)
-  {
-      int labelNum = 0;
-
-      for (int i = 0; i < labelList.Count; i++)
-      {
-          if (sender == labelList[i])
-          {
-              labelNum = i;
-              break;
-          }
-      }
-
-      SqlExtendedString se = labelList[labelNum].iri;
-      ExtendedStringHandler seHandler = new ExtendedStringHandler(se, ParentConnection, labelList[labelNum].graph);
-          seHandler.displayData();
-
-  }
-]]></programlisting>
-  </listitem>
-  <listitem>Note that this method uses a new constructor for the ExtendedStringHandler that takes the graph
-as an additional argument. We need to add this new constructor.
-<programlisting><![CDATA[
-public ExtendedStringHandler(SqlExtendedString iri, VirtuosoConnection parentConnection, String graph)
-  {
-      ParentConnection = parentConnection;
-      if (iri.IriType == SqlExtendedStringType.IRI)
-      {
-          ParentIRI = iri;
-          isIRI = true;
-          DescribeCommandSimple = new StringBuilder("sparql select * from <http://localhost:8890/Northwind> where {<" + iri.ToString() + "> ?p ?o}");
-          DescribeCommandGeneral = new StringBuilder("sparql define get:soft " + '"'.ToString() + "soft" + '"'.ToString() + " select * from <" + graph + "> where { <" + iri.ToString() + "> ?p ?o }");
-      }
-  }
-]]></programlisting>
-<para>This new constructor uses the supplied graph to build the alternative sparql select statement that
-looks for the details about the supplied IRI. With these changes in place the application will find the
-description of the Northwind properties.
-</para>
-  </listitem>
-  <listitem>Build and run. As you explore the data you will see that you can find descriptions of the
-properties used to describe the entities in the Northwind dataset:
-    <figure id="sparqlwinf24" float="1">
-      <title>Northwind dataset</title>
-      <graphic fileref="ui/sparqlwinf24.png"/>
-    </figure>
-  </listitem>
-</orderedlist>
-    </sect3>
-    </sect2>
-  </sect1>
-
-<sect1 id="installcrweb">
-  <title>Creating a Web Browser Application to Access RDF Data Using The Virtuoso ADO.Net Provider</title>
-<para>This section will guide you through creating first a Web Service that exposes RDF data from Virtuoso
-and then a simple web browser application that consumes the Web Service and allowing you to access and
-explore the RDF data by clicking on dereferenceable <link linkend="rdfiriidtype">IRIs</link>.
-</para>
-<sect2 id="installcrwebintro">
-      <title>Pre-requisites</title>
-<orderedlist>
-  <listitem>The example assumes that you have a local Virtuoso server with the Northwind demo database
-installed. If the demo database is not already installed then download the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/demo_dav.vad">demo database VAD package</ulink>
-(demo_dav.vad) and install it. The VAD package will create a new database in Virtuoso called demo
-containing the familiar Northwind tables. It will also creates <ulink url="http://docs.openlinksw.com/virtuoso/rdfsparqlintegrationmiddleware.html#rdfviews">RDF views</ulink> of the Northwind tables.
-In the example we assume the database is accessible on a hostname of "demo.openlinksw.com" on the
-default port 80, where an actually live instance of the Virtuoso Demo database is hosted. Users would
-use the appropriate hostname and port number of their Virtuoso installation to create the sample
-application, and would be would be localhost:8890 for a default installation or whatever the <link linkend="ini_URIQA">URIQA DefaultHost</link>
-Virtuoso configuration parameter is set to when the demo database VAD package is installed.
-  </listitem>
-  <listitem>The Virtuoso ADO.Net provider for .Net 3.5 and the Entity Framework.</listitem>
-  <listitem>Microsoft Visual Studio 2008</listitem>
-  <listitem>The Virtuoso <link linkend="http://download.openlinksw.com/packages/5.0/virtuoso/rdf_mappers_dav.vad">RDF Mappers VAD package</link>.</listitem>
-</orderedlist>
-    </sect2>
-    <sect2 id="installcrwebcrserv">
-      <title>Creating the Web Service</title>
-    <para><emphasis>Step 1 - Create a view of the RDF data</emphasis></para>
-<para>To create a view of the customers in the Northwind first open the Virtuoso Conductor and log in as
-dba. Then open iSQL from the menu on the left and execute the following statement.
-</para>
-<programlisting><![CDATA[
-create view Demo.demo.sparqlview as
-sparql
-select distinct ?s  from <http://localhost:8890/Northwind>
-where {?s a <http://demo.openlinksw.com/schemas/northwind#Customer>}
-]]></programlisting>
-    <para>Note:</para>
-    <itemizedlist mark="bullet">
-      <listitem>If the view is added to the Visual Studio project as user "demo" (or any other than "dba'),
-then it must be ensured that the "SPARQL_SELECT" and "SPARQL_SPONGE" roles are assigned to this user, which
-can be done via the Virtuoso Conductor in the "System Admin" -> "User Accounts" tab. </listitem>
-      <listitem>Execute permissions will also need to be granted to the following procedure:
-<programlisting><![CDATA[
-grant execute on DB.DBA.RDF_MAKE_LONG_OF_SQLVAL to "demo"
-]]></programlisting>
-      </listitem>
-    </itemizedlist>
-        <figure id="sparqlwinf25" float="1">
-      <title>create a view</title>
-      <graphic fileref="ui/sparqlwinf25.png"/>
-    </figure>
-    <para><emphasis>Step 2 - Create the Visual Studio Project and Add the Model</emphasis></para>
-<orderedlist>
-  <listitem>Open <emphasis>Visual Studio</emphasis> and create a new <emphasis>ASP .NET Web Application
-</emphasis> called RDFWebDemo.
-    <figure id="sparqlwinf26" float="1">
-      <title>create new application</title>
-      <graphic fileref="ui/sparqlwinf26.png"/>
-    </figure>
-</listitem>
-  <listitem>Right click RDFWebDemo in the <emphasis>Solution Explorer</emphasis> and add a new
-<emphasis>ADO.NET Entity Data Model</emphasis> called Model1.edmx.
-This will open the Entity Data Model Wizard.</listitem>
-  <listitem>Choose <emphasis>Generate From Database</emphasis> and click <emphasis>Next</emphasis>.</listitem>
-  <listitem>Set up a connection to the Demo database on your local Virtuoso Server, select
-<emphasis>Yes, include the sensitive data in the connection string</emphasis> and set the name of the
-entities to DemoEntities. Click <emphasis>Next</emphasis>.</listitem>
-  <listitem>On the <emphasis>Choose Your Database Objects</emphasis> page expand <emphasis>Views</emphasis>
-and select sparqlview. Check that the Model Namespace is DemoModel and click Finish.
-    <figure id="sparqlwinf27" float="1">
-      <title>Model Namespace</title>
-      <graphic fileref="ui/sparqlwinf27.png"/>
-    </figure>
-</listitem>
-</orderedlist>
-<para>
-</para>
-    <para><emphasis>Step 3 - Add the Web Service</emphasis></para>
-<orderedlist>
-  <listitem>Right click RDFWebDemo in the <emphasis>Solution Explorer</emphasis> and add a new
-<emphasis>ADO.NET Data Service</emphasis> called WebDataService1.svc. Click <emphasis>Add</emphasis>.</listitem>
-  <listitem>In the class definition of WebDataService1 in the newly created file WebDataService1.svc.cs replace /* TODO: put your data source class name here */ with the name of our model, DemoEntities.
-<programlisting><![CDATA[
-public class WebDataService1 : DataService<DemoEntities>
-]]></programlisting>
-</listitem>
-  <listitem>In the InitializeService method add the line:
-<programlisting><![CDATA[
-config.SetEntitySetAccessRule("*", EntitySetRights.All);
-]]></programlisting>
-<para>The method should look like this:
-</para>
-<programlisting><![CDATA[
- public static void InitializeService(IDataServiceConfiguration config)
-   {
-       // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
-       // Examples:
-       // config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
-       // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
-
-       config.SetEntitySetAccessRule("*", EntitySetRights.All);
-   }
-]]></programlisting>
-</listitem>
-</orderedlist>
-    <para><emphasis>Step 4 - Compile and Run</emphasis></para>
-<para>Hit <emphasis>F5</emphasis> to compile and run the service. Select <emphasis>OK</emphasis> when
-prompted to enable debugging. The default browser will be launched showing a page like:
-</para>
-<programlisting><![CDATA[
-  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-- <service xml:base="http://localhost:1241/WebDataService1.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
-- <workspace>
-  <atom:title>Default</atom:title>
-- <collection href="sparqlview">
-  <atom:title>sparqlview</atom:title>
-  </collection>
-  </workspace>
-  </service>
-]]></programlisting>
-<para>The service is now running.
-</para>
-<para>Note the address on which the service is made available. You will need to know this when creating
-the app to consume the service. Look in the Address Bar of the browser. It will be something like:
-http://localhost:1492/WebDataService1.svc/
-</para>
-    </sect2>
-    <sect2 id="installcrbrappl">
-      <title>Creating the Browser Application</title>
-<para><emphasis>Step 1 - Create the Visual Studio Project.</emphasis></para>
-<orderedlist>
-  <listitem>Open <emphasis>Visual Studio</emphasis> and create a new
-<emphasis>ASP.NET Web Application</emphasis> called RDFWebApp.
-    <figure id="sparqlwinf28" float="1">
-      <title>New Web Application</title>
-      <graphic fileref="ui/sparqlwinf28.png"/>
-    </figure>
-</listitem>
-  <listitem>Create client side entities with datasvcutil.exe
-<itemizedlist mark="bullet">
-  <listitem>Open a command prompt.</listitem>
-  <listitem>Navigate to *C:\WINDOWS\Microsoft.NET\Framework\v3.5*.</listitem>
-  <listitem>Generate the client classes using the following command:
-<programlisting><![CDATA[
-datasvcutil.exe /uri:http://localhost:1492/WebDataService1.svc /out:DemoEntities.cs
-]]></programlisting>
-<para>Note the address of the service - you may need to change the port number to
-match the one seen in the address at the end of Step 4 in Creating the Web Service.
-</para>
-</listitem>
-</itemizedlist>
-</listitem>
-  <listitem>Add the classes to RDFWebApp.
-<itemizedlist mark="bullet">
-  <listitem>Right click RDFWebApp</listitem>
-  <listitem>Choose to add an existing item and add c:\WINDOWS\Microsoft.NET\Framework\v3.5\DemoEntities.cs.</listitem>
-</itemizedlist>
-</listitem>
-  <listitem>Add a reference to System.Data.Services.Client to the project.</listitem>
-</orderedlist>
-<para>
-</para>
-    <para><emphasis>Step 2 - Display the contents of sparqlview as a table on the page</emphasis></para>
-<para>To display the RDF data on the web page we create a table with a row for each item in sparqlview.
-We then use each IRI from sparqlview to create a hyperlink. The hyperlinks are displayed in the table
-cells. To do this add the following block of code to the page_load method in Default.aspx.cs.
-</para>
-<programlisting><![CDATA[
- DemoModel.DemoEntities svc = new DemoModel.DemoEntities(new Uri("http://localhost:1492/WebDataService1.svc"));
-
-  var query = svc.sparqlview;
-  Table iriTable = new Table();
-  this.Controls.Add(iriTable);
-
-  foreach (DemoModel.sparqlview sv in query)
-  {
-      TableRow tRow = new TableRow();
-      iriTable.Rows.Add(tRow);
-      TableCell tCell = new TableCell();
-      tRow.Cells.Add(tCell);
-      HyperLink h = new HyperLink();
-      h.Text = sv.s;
-      h.NavigateUrl = sv.s;
-      tCell.Controls.Add(h);
-  }
-]]></programlisting>
-<para>Note the address of the service in the first line - you may need to change the port number to match
-the one seen in the address at the end of Step 4 in Creating the Web Service.
-</para>
-<para>Compile and run RDFWebApp (ensuring that the service created above is still running). This will
-launch a browser and display the IRIs from sparqlview as a list of hyperlinks.
-</para>
-    <figure id="sparqlwinf29" float="1">
-      <title>list of hyperlinks</title>
-      <graphic fileref="ui/sparqlwinf29.png"/>
-    </figure>
-<para>With the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/rdf_mappers_dav.vad">RDF Mappers VAD package</ulink> installed in Virtuoso, clicking on these
-links will take you to a description page of the referenced resource. The description page is created
-using <ulink url="http://virtuoso.openlinksw.com/Whitepapers/html/vdld_html/VirtDeployingLinkedDataGuide_Glossary.html#mozTocId13075">description.vsp</ulink>.
-</para>
-    <figure id="sparqlwinf30" float="1">
-      <title>Description page</title>
-      <graphic fileref="ui/sparqlwinf30.png"/>
-    </figure>
-    </sect2>
-    <sect2 id="installcrwebiis"><title>Deploy With IIS</title>
-<para>To create and test this simple Web Service we have used the Visual Studio Development Server. This
-section describes how to deploy the service using IIS.
-</para>
-        <sect3 id="installcrwebiiswebs"><title>Web Service</title>
-<para>To deploy the service using IIS:
-</para><itemizedlist mark="bullet">
-  <listitem>Open the RDFWebDemo project in Visual Studio, go to the <emphasis>Project</emphasis> menu
-and select RDFWebDemo <emphasis>Properties</emphasis>.</listitem>
-  <listitem>Select the <emphasis>Web</emphasis> tab and scroll down to the <emphasis>Servers</emphasis>
-section. Select <emphasis>Use local IIS Server</emphasis>. The project URL defaults to using localhost.</listitem>
-  <listitem>Click the <emphasis>Create Virtual Directory</emphasis> button then check that the Service works on localhost.</listitem>
-  <listitem>Build the project then start without debugging (ctrl F5).</listitem>
-</itemizedlist>
-<para>The start page that you see when you test the service will look the same as before but the address
-in the browser bar will be something like http://localhost/RDFWebDemo1/WebDataService1.svc/. You can now
-access your service remotely using the hostname or IP address of your server.
-</para>
-<para>If at this point you get an Access is denied error, 401.3, then you will need to add the Internet
-Guest Account (IUSR_XXX where XXX is your computer name) to the users allowed to access the folder
-containing the RDFWebDemo project.
-</para>
-        </sect3>
-        <sect3 id="installcrwebiisweba"><title>Web Application</title>
-<para>You will now need to modify RDFWebApp to access the service at the new address. At the same time
-we will also change RDFWebApp so that it too is deployed using IIS
-</para>
-<itemizedlist mark="bullet">
-  <listitem>Open The RDFWebApp project in Visual Studio.</listitem>
-  <listitem>Go to the <emphasis>Project</emphasis> menu and select RDFWebApp <emphasis>Properties</emphasis>.</listitem>
-  <listitem>Select the <emphasis>Web</emphasis> tab and scroll down to the <emphasis>Servers</emphasis>
-section. Select <emphasis>Use local IIS Server</emphasis>. The project URL defaults to using localhost.</listitem>
-  <listitem>Click the <emphasis>Create Virtual Directory</emphasis> button. The web application will then run on the local IIS.
-<programlisting><![CDATA[
-DemoModel.DemoEntities svc = new DemoModel.DemoEntities(new Uri("http://localhost:1492/WebDataService1.svc"));
-]]></programlisting>
-<para>to
-</para>
-<programlisting><![CDATA[
-DemoModel.DemoEntities svc = new DemoModel.DemoEntities(new Uri("http://localhost/RDFWebDemo/WebDataService1.svc/"));
-]]></programlisting>
-</listitem>
-  <listitem>To reference the web service running on IIS you will need to edit Default.aspx.cs. Change </listitem>
-  <listitem>Build the project then start without debugging (ctrl F5).</listitem>
-</itemizedlist>
-<para>
-The web application is accessible on http://localhost/RDFWebApp/Default.aspx and can also be accessed using
-the hostname or IP address of you server e.g. http://192.168.7.129/RDFWebApp/Default.aspx
-</para>
-    <figure id="sparqlwinf31" float="1">
-      <title>Default.aspx</title>
-      <graphic fileref="ui/sparqlwinf31.png"/>
-    </figure>
-    </sect3>
-    <para><emphasis>Next Steps</emphasis></para>
-<para>The next example shows you how to quickly create an ADO.Net Data Service that exposes RDF data in
-Virtuoso and how to create a basic Web application to consume that service. The next step is to
-<link linkend="installsilver">create a Silverlight Application to consume the same service</link>.
-</para>
-    </sect2>
-  </sect1>
-
-
-<sect1 id="installsilver"><title>Creating a Silverlight Application to consume the service</title>
-<para>This section will guide you through creating an application for Silverlight that will consume
-the ADO.Net Data Service created in <link linkend="installcrweb">Creating a Web Browser Application to Access RDF Data Using The
-Virtuoso ADO.Net Provider.</link>
-</para>
-      <sect2 id="installsilverpreq">
-        <title>Pre-requisites</title>
-<orderedlist>
-  <listitem>The <ulink url="http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=en">Microsoft Silverlight 2 Tools for Visual Studio 2008 SP1</ulink></listitem>
-  <listitem>The ADO.Net Data Service created in <link linkend="installcrweb">Creating a Web Browser Application to Access RDF Data Using The
-Virtuoso ADO.Net Provider.</link></listitem>
-  <listitem>The Visual Studio project used to create the ADO.Net Data Service.</listitem>
-</orderedlist>
-    </sect2>
-    <sect2 id="installsilvercrser">
-        <title>Creating the Application for Silverlight.</title>
-<orderedlist>
-  <listitem>Open the ADO.Net Data Service project in <emphasis>Visual Studio</emphasis></listitem>
-  <listitem>In the <emphasis>Solution Explorer</emphasis> right click on the RDFWebDemo solution and add a new Project. </listitem>
-  <listitem>In the <emphasis>Add New Project</emphasis> dialog select
-<emphasis>Silverlight Application</emphasis> and click <emphasis>OK</emphasis>. This will open
-the <emphasis>Add Silverlight Application</emphasis> dialog.
-      <figure id="sparqlwinf32" float="1">
-      <title>Add Silverlight Application</title>
-      <graphic fileref="ui/sparqlwinf32.png"/>
-    </figure>
-  </listitem>
-  <listitem>Select <emphasis>Link this Silverlight Control into an existing Web Site</emphasis> and make
-sure the Web Site selected is RDFWebDemo. Select
-<emphasis>Add a test page that references the application</emphasis> and <emphasis>Make it the start
-page</emphasis>.
-      <figure id="sparqlwinf33" float="1">
-      <title>Add a test page</title>
-      <graphic fileref="ui/sparqlwinf33.png"/>
-    </figure>
-  </listitem>
-  <listitem>In Solution Explorer, select RDFWebDemo, open the Project menu and select Properties. </listitem>
-  <listitem>Select the <emphasis>Web</emphasis> tab, and select <emphasis>Specific Page</emphasis>
-in the <emphasis>Start Action</emphasis> section. Click on the ellipsis and select
-SilverlightApplication1TestPage.html as the start page. </listitem>
-  <listitem>Add a reference to the data service. In the <emphasis>Solution Explorer</emphasis> right click
-on SilverlightApplication1 and select <emphasis>Add Service Reference</emphasis></listitem>
-  <listitem>In the <emphasis>Add Service Reference</emphasis> dialog click the <emphasis>Discover</emphasis>
-button. Your ADO.Net Data Service should appear in the Address box and the Services box. </listitem>
-  <listitem>Select the service and click <emphasis>OK</emphasis>. ServiceReference1 will now be added to
-the ServiceReferences. </listitem>
-  <listitem>Open page.xaml.cs and add references to the service and to the System.Data.Services.Client
-assembly by adding the following using statements at the top of the file:
-  <programlisting><![CDATA[
-using System.Data.Services.Client;
-using SilverlightApplication1.ServiceReference1;
-]]></programlisting>
-  </listitem>
-  <listitem>We need at create a data service context to reference the data from the service and to load data
-from the view, sparqlview, exposed by the service. Add the following lines to the page constructor after
-InitializeComponent()
-<programlisting><![CDATA[
-DataServiceContext svcCtx = new DataServiceContext(new Uri("WebDataService1.svc", UriKind.Relative));
-svcCtx.BeginExecute<sparqlview>(new Uri("sparqlview", UriKind.Relative), loadSCallback, svcCtx);
-]]></programlisting>
-  </listitem>
-  <listitem>Add the loadSCallback method to the page class. The method loads the data from sparqlview and
-puts it in a List. This List populates a list box on the page.
-<programlisting><![CDATA[
-private void loadSCallback(IAsyncResult asyncResult)
-{   List<Uri> uList = new List<Uri>();
-    DataServiceContext ctx = asyncResult.AsyncState as DataServiceContext;
-    foreach (sparqlview sv in ctx.EndExecute<sparqlview>(asyncResult))
-     uList.Add(new Uri(sv.s));
-    listBox1.DataContext = uList;
-}
-]]></programlisting>
-  </listitem>
-  <listitem>Add the list box to the page. In the <emphasis>Solution Explorer</emphasis> double click on
-page.xaml to open it in the editor. Add the following code between the <grid> and </grid> tags.
-<programlisting><![CDATA[
-<ListBox x:Name="listBox1"
-    HorizontalAlignment="Stretch"
-    Margin="25,8,26,-78" Grid.RowSpan="1"
-    Grid.Row="0" VerticalAlignment="Stretch"
-    ItemsSource="{Binding Mode=OneWay}" >
-    <ListBox.ItemTemplate>
-        <DataTemplate>
-            <StackPanel x:Name="DisplayListData"
-             Orientation="Horizontal"
-             VerticalAlignment="Bottom"
-             Margin="5" >
-                <HyperlinkButton
-                 Content ="{Binding}"
-                 NavigateUri="{Binding}"
-                 Margin="5,0,0,0"
-                 VerticalAlignment="Bottom"
-                 HorizontalAlignment="Left"
-                 FontSize="12">
-                </HyperlinkButton>
-            </StackPanel>
-        </DataTemplate>
-    </ListBox.ItemTemplate>
-</ListBox>
-]]></programlisting>
-  </listitem>
-  <listitem>Build the Silverlight application and launch without debugging using <emphasis>Ctrl F5</emphasis>.
-This will launch the browser and open SilverlightApplication1TestPage.aspx.
-        <figure id="sparqlwinf34" float="1">
-      <title>SilverlightApplication1TestPage.aspx</title>
-      <graphic fileref="ui/sparqlwinf34.png"/>
-    </figure>
-  </listitem>
-</orderedlist>
-<para>
-Clicking on one of the IRIs will open the page using description.vsp.
-</para>
-            <figure id="sparqlwinf35" float="1">
-      <title>using description.vsp</title>
-      <graphic fileref="ui/sparqlwinf35.png"/>
-    </figure>
-    </sect2>
-</sect1>
-
-<sect1 id="installnetriadd"><title>Creating A Simple .NET RIA Services Application To Display Data
-From Virtuoso</title>
-<para>.NET RIA Services is a new framework from Microsoft that simplifies the development of n-tier web
-applications. A typical application will consist of a presentation layer, application logic and a data
-access layer. In these examples a combination of Silverlight 3 and .NET RIA Services will provide the
-presentation layer and application layer while the data will reside in Virtuoso and be accessed using
-the Virtuoso ADO.NET provider. The first example demonstrates how to display data from the Employee
-table in the Demo database in a grid on a web page. The second example shows how to display IRIs from
-the RDF views of the demo data. The IRIs are used to create hyperlinks that are the starting point
-for exploring the linked data.
-</para>
-      <sect2 id="installnetriaddpreq">
-        <title>Pre-requisites</title>
-<orderedlist>
-  <listitem>The example assumes that you have a local Virtuoso server with the Northwind demo database
-installed. If the demo database is not already installed then download the demo database VAD package
-(demo_dav.vad) and install it. The VAD package will create a new database in Virtuoso called demo
-containing the familiar Northwind tables. It will also creates RDF views of the Northwind tables.
-In the example we assume the database is accessible on a hostname of "demo.openlinksw.com" on the
-default port 80, where an actually live instance of the Virtuoso Demo database is hosted. Users
-would use the appropriate hostname and port number of their Virtuoso installation to create the
-sample application, and would be would be localhost:8890 for a default installation or whatever
-the URIQA DefaultHost Virtuoso configuration parameter is set to when the demo database VAD package
-is installed.</listitem>
-  <listitem>The Virtuoso ADO.Net provider for .Net 3.5 and the Entity Framework.</listitem>
-  <listitem>Microsoft Visual Studio 2008</listitem>
-  <listitem>The Virtuoso RDF Mappers VAD package.</listitem>
-  <listitem><ulink url="http://www.microsoft.com/downloads/details.aspx?familyid=9442b0f2-7465-417a-88f3-5e7b5409e9dd&displaylang=en">Silverlight 3 Tools for Visual Studio 2008 SP1</ulink>.</listitem>
-  <listitem><ulink url="http://www.microsoft.com/downloads/details.aspx?FamilyID=76bb3a07-3846-4564-b0c3-27972bcaabce&displaylang=en">Microsoft .NET RIA Services July 2009 Preview</ulink>.</listitem>
-</orderedlist>
-    </sect2>
-    <sect2 id="installnetriaddcrser">
-        <title>Creating the Application</title>
-<para><emphasis>Step 1 - Create the Visual Studio Projects.</emphasis></para>
-<orderedlist>
-  <listitem>Open <emphasis>Visual Studio</emphasis> and create a new <emphasis>Silverlight Application</emphasis> project. Call the project DemoApplication.</listitem>
-  <listitem>In the New Silverlight Application dialog ensure that <emphasis>Enable .NET RIA Services</emphasis> is checked. Click the <emphasis>OK</emphasis> button.
-      <figure id="ria1" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/ria1.png"/>
-      </figure>
-  </listitem>
-</orderedlist>
-  <para>At this point a skeleton solution is created that consists of a client project called DemoApplication
-and a server project called DemoApplication.Web. This application will use data from the Virtuoso database.
-We add the data and its schema to the application by adding an ADO.NET entity data model to the server
-project.</para>
-<para><emphasis>Step 2 -  Add the Data Model</emphasis></para>
-<orderedlist>
-  <listitem>Right click the server project in the <emphasis>Solution Explorer</emphasis> and
-<emphasis>Add New Item</emphasis>. In the dialog box select <emphasis>ADO.NET Entity Data Model</emphasis>
-and call it demo.edmx. Click the <emphasis>Add</emphasis> button. This will open the
-<emphasis>Entity Data Model Wizard</emphasis>.</listitem>
-  <listitem>Choose <emphasis>Generate From Database</emphasis> and click <emphasis>Next</emphasis>.</listitem>
-  <listitem>Set up a connection to the Demo database on your local Virtuoso Server, select
-<emphasis>Yes, include the sensitive data in the connection string</emphasis> and set the name of the
-entities to DemoEntities. Click <emphasis>Next</emphasis>.</listitem>
-  <listitem>On the <emphasis>Choose Your Database Objects</emphasis> page expand <emphasis>Tables</emphasis>
-and select Employees. Check that the Model Namespace is DemoModel and click <emphasis>Finish</emphasis>.</listitem>
-</orderedlist>
-      <figure id="ria2" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/ria2.png"/>
-      </figure>
-  <para>We want to make the entities in the model available to both the client and server parts of the
-solution. To do this we need to add a DomainService to the solution. However, to make the entities from
-the data model available to the domain service we must first build the solution.</para>
-<para><emphasis>Step 3 - Add a Domain Service.</emphasis></para>
-<orderedlist>
-  <listitem>First build the solution.</listitem>
-  <listitem>Right click the server project in the <emphasis>Solution Explorer</emphasis> and
-<emphasis>Add New Item</emphasis>. In the dialog box choose <emphasis>Domain Service Class</emphasis>
-from the Templates pane and call it EmployeeService.cs. Click <emphasis>Add</emphasis>. This will open the
-<emphasis>Add New Domain Service Class</emphasis> dialog.</listitem>
-  <listitem>The entities from the model we have just added to the project are listed under
-<emphasis>Entities</emphasis>. Tick the box next to Employees. and click OK.</listitem>
-</orderedlist>
-      <figure id="ria3" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/ria3.png"/>
-      </figure>
-<para>This will create the DomainService class and generated code in both the client and server parts of
-the application. The Silverlight client can now interact with the data through the DomainContext class
-in the client project. At this point you need to build the solution again.
-</para>
-<para><emphasis>Step 4 -  Display The Data</emphasis></para>
-<orderedlist>
-  <listitem>From the <emphasis>Silverlight XAML Controls</emphasis> in the <emphasis>Toolbox</emphasis>
-drag a <emphasis>DataGrid</emphasis> between the <Grid> </Grid> tags on MainPage.xaml in the client. Call the grid EmployeeGrid.
-<programlisting><![CDATA[
-<data:DataGrid Name="EmployeeGrid"></data:DataGrid>
-]]></programlisting>
-</listitem>
-  <listitem>Instantiate the DomainContext to get the list of employees and add them to the grid by
-adding code to MainPage.xaml.cs so it looks like this:
-<programlisting><![CDATA[
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using DemoApplication.Web;
-using System.Windows.Ria.Data;
-
-namespace DemoApplication
-{
-    public partial class MainPage : UserControl
-    {
-        private EmployeeContext _employeeContext = new EmployeeContext();
-        public MainPage()
-        {
-            InitializeComponent();
-            LoadOperation<Employees> LoadOp =
-                this._employeeContext.Load(this._employeeContext.GetEmployeesQuery());
-            this.EmployeeGrid.ItemsSource = LoadOp.Entities;
-        }
-    }
-}
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. Internet Explorer will be launched and you will see the data
-displayed on the page as a grid.
-</listitem>
-</orderedlist>
-      <figure id="ria4" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/ria4.png"/>
-      </figure>
-   </sect2>
-   <sect2 id="installnetriaddcrdf">
-     <title>Displaying RDF Data</title>
-     <para>One advantage of using Virtuoso as the data store is the seamless way in which we can use
-this use this application to display dereferencable IRIs and explore RDF linked data.
-     </para>
-     <para>The Virtuoso SPASQL interface allows RDF data in the Virtuoso Quad store to be queried
-using SPARQL from any SQL interface by simply prefixing the SPARQL query with the keyword SPARQL.
-We will use the SPASQL interface to create a view containing the IRIs of the Employees in the
-the Demo RDF data in Virtuoso.
-     </para>
-<para><emphasis>Step 1 -  Create the View in Virtuoso</emphasis></para>
-<orderedlist>
-  <listitem>Open the Virtuoso Conductor.</listitem>
-  <listitem>In isql execute the following statement. Remember to use the appropriate hostname and port
-number of your Virtuoso installation, typically localhost:8890 for a default installation or whatever
-the <link linkend="ini_URIQA">URIQA DefaultHost</link> Virtuoso configuration parameter was set to when
-the demo database VAD package was installed.
-<programlisting><![CDATA[
-CREATE VIEW Demo.demo.sparqlview as
-SPARQL
-PREFIX nwind: <http://demo.openlinksw.com/schemas/northwind#>
-SELECT DISTINCT  ?s
-FROM <http://demo.openlinksw.com/Northwind>
-WHERE
-  {
-    ?s a nwind:Employee
-  }
-]]></programlisting>
-</listitem>
-</orderedlist>
-<para><emphasis>Step 2 -  Modify the Solution To use the View</emphasis></para>
-<orderedlist>
-  <listitem>Delete the existing Employee model and add a new one that comprises this new view.
-    <figure id="ria5" float="1">
-      <title>.NET RIA Services Application</title>
-      <graphic fileref="ui/ria5.png"/>
-    </figure>
-  </listitem>
-  <listitem>Delete the DomainService. Build the solution and add a new DomainService called
-EmployeeService. Select the sparqlview entity. Build the solution.
-    <figure id="ria6" float="1">
-      <title>.NET RIA Services Application</title>
-      <graphic fileref="ui/ria6.png"/>
-    </figure>
-  </listitem>
- <listitem>Modify the code in mainpage.xaml.cs so it uses the sparqview entity. It should look like this:
-<programlisting><![CDATA[
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using DemoApplication.Web;
-using System.Windows.Ria.Data;
-
-namespace DemoApplication
-{
-    public partial class MainPage : UserControl
-    {
-        private EmployeeContext _employeeContext = new EmployeeContext();
-        public MainPage()
-        {
-            InitializeComponent();
-            LoadOperation<sparqlview> LoadOp =
-                this._employeeContext.Load(this._employeeContext.GetSparqlviewQuery());
-            this.EmployeeGrid.ItemsSource = LoadOp.Entities;
-        }
-    }
-}
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. You will see a list of IRIs that identify the Northwind employees.
-    <figure id="ria7" float="1">
-      <title>.NET RIA Services Application</title>
-      <graphic fileref="ui/ria7.png"/>
-    </figure>
-  </listitem>
-</orderedlist>
-<para>To realize the power of linked data we would now liked to begin exploring this data by clicking on
-these IRIs.</para>
-<para><emphasis>Step 3 - Make Hyperlinks From IRIs</emphasis></para>
-<orderedlist>
-  <listitem>Modify the DataGrid in MainPage.xaml to bind the IRI in each cell of the grid to a
-Hyperlink button. We set the AutoGenerateColumns property of the DataGrid to False then add our
-own Template for the column. MainPage.xaml should look like this:
-<programlisting><![CDATA[
-<UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  x:Class="DemoApplication.MainPage"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
-  <Grid x:Name="LayoutRoot">
-      <data:DataGrid Name="EmployeeGrid" AutoGenerateColumns="False">
-            <data:DataGrid.Columns>
-                <data:DataGridTemplateColumn Header="Employee">
-                    <data:DataGridTemplateColumn.CellTemplate>
-                        <DataTemplate>
-                            <StackPanel x:Name="DisplayEmployeeData"
-                                        Orientation="Horizontal"
-                                        VerticalAlignment="Bottom"
-                                        Margin="5" >
-                                <HyperlinkButton Content ="{Binding s}"
-                                                 NavigateUri="{Binding s}"
-                                                 Margin="5,0,0,0"
-                                                 VerticalAlignment="Bottom"
-                                                 HorizontalAlignment="Left"
-                                                 FontSize="12">
-                                </HyperlinkButton>
-                            </StackPanel>
-                        </DataTemplate>
-                    </data:DataGridTemplateColumn.CellTemplate>
-                </data:DataGridTemplateColumn>
-            </data:DataGrid.Columns>
-        </data:DataGrid>
-    </Grid>
-</UserControl>
-]]></programlisting>
-</listitem>
-  <listitem>If we build and run the project now each IRI in the list appears as a hyperlink.
-    <figure id="ria8" float="1">
-      <title>.NET RIA Services Application</title>
-      <graphic fileref="ui/ria8.png"/>
-    </figure>
-</listitem>
-  <listitem>Clicking on each of the links takes you to a new document that contains further links
-to information about each Employee. The Demo dataset can be explored further by following the
-dereferenceable IRIs in the description pages.
-    <figure id="ria9" float="1">
-      <title>.NET RIA Services Application</title>
-      <graphic fileref="ui/ria9.png"/>
-    </figure>
-    <figure id="ria10" float="1">
-      <title>.NET RIA Services Application</title>
-      <graphic fileref="ui/ria10.png"/>
-    </figure>
-</listitem>
-</orderedlist>
-   </sect2>
-   <sect2 id="installnetriaddcnext">
-     <title>Next Steps</title>
-     <para>The examples in this document show you how to simply display data in a browser using
-Silverlight 3 and .NET RIA Services. See an <link linkend="installnetriavd">example</link> of a
-more complicated application.</para>
-   </sect2>
-</sect1>
-
-<sect1 id="installnetriavd"><title>Creating a .Net RIA Services Application That Will Update Virtuoso Data</title>
-<para>This example demonstrates how data in Virtuoso can be updated from a Microsoft .NET RIA Services
-application. The example is a continuation of the first example in <link linkend="installnetriadd">Creating a Simple .Net RIA Services
-Application to Display Data From Virtuoso</link>.</para>
-      <sect2 id="installnetriavdpreq">
-        <title>Pre-requisites</title>
-<orderedlist>
-  <listitem>A working copy of the application created in <link linkend="installnetriadd">Creating a
-Simple .Net RIA Services Application to Display Data From Virtuoso</link>.</listitem>
-</orderedlist>
-    </sect2>
-    <sect2 id="installnetriavdcrser">
-        <title>Creating the Application</title>
-<para><emphasis>Step 1 - Add A New Domain Service Class</emphasis></para>
-<para>The EmployeeService Domain Service Class was only used to display data so was created
-read only. In this example we need to be able to update the data so we need to remove the read
-only Domain Service Class and create a new on.</para>
-<orderedlist>
-  <listitem>In the <emphasis>Server Explorer</emphasis> right click EmployeeService and select <emphasis>Delete</emphasis></listitem>
-  <listitem>Right click the server project and <emphasis>Add New Item</emphasis>. In the dialog box choose Domain Service Class from the Templates pane and again call it EmployeeService.cs. Click Add.</listitem>
-  <listitem>Select the Employees entity and tick <emphasis>Enable editing</emphasis>. Also tick <emphasis>Generated associated classes for metadata</emphasis>.
-      <figure id="riad1" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/riad1.png"/>
-      </figure>
-  </listitem>
-  <listitem>Update MainPage.xaml.cs to use EmployeeService2 the new domain service rather than EmployeeContext.</listitem>
-</orderedlist>
-  <para>We want to create a master detail style page. To do this we will use the DomainDataSourceComponent
-from the Silverlight Components. But first we will add a pager so only 5 records are displayed at a time.</para>
-<para><emphasis>Step 2 - Add a DataPager</emphasis></para>
-<orderedlist>
-  <listitem>Add two new namespaces to MainPage.xaml
-<programlisting><![CDATA[
-xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Ria.Controls"
-xmlns:ds="clr-namespace:DemoApplication.Web"
-]]></programlisting>
-  </listitem>
-  <listitem>Use a DomainDataSource to provide the data to fill the grid. Add the following to
-MainPage.xaml before the DataGrid.
-<programlisting><![CDATA[
-<riaControls:DomainDataSource x:Name="EmployeeDataSource"
-                              QueryName="GetEmployeesQuery"
-                              LoadSize="10"
-                              AutoLoad="True">
-    <riaControls:DomainDataSource.DomainContext>
-        <ds:EmployeeService2/>
-    </riaControls:DomainDataSource.DomainContext>
-</riaControls:DomainDataSource>
-]]></programlisting>
-  </listitem>
-  <listitem>Update the MainPage.xaml.cs code behind file. Using the DomainDataSource means you no
-longer need to instantiate the context and load the grid in MainPage.xaml.cs so it becomes:
-<programlisting><![CDATA[
-public partial class MainPage : UserControl
-{
-    public MainPage()
-    {
-        InitializeComponent();
-    }
-}
-]]></programlisting>
-  </listitem>
-  <listitem>Set the binding source of the DataGrid to the DomainDataSource
-<programlisting><![CDATA[
-<data:DataGrid MinHeight="100"  IsReadOnly="True" ItemsSource="{Binding Data, ElementName=EmployeeDataSource}" x:Name="DataGrid1"></data:DataGrid> />
-]]></programlisting>
-  </listitem>
-  <listitem>Drag a DataPager form the tool box onto MainPage.xaml just after the DataGrid.
-  </listitem>
-  <listitem>Add a page size and binding element to the DataPager.
-<programlisting><![CDATA[
-<data:DataPager PageSize="5" Source="{Binding Data, ElementName=employeeDataSource}"
-                      Margin="0,-1,0,0"></data:DataPager>
-]]></programlisting>
-  </listitem>
-  <listitem>Build and run the application. The data should be displayed 5 rows at a time.
-      <figure id="riad2" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/riad2.png"/>
-      </figure>
-  </listitem>
-</orderedlist>
-  <para>We now need to add a DataForm to display the details.</para>
-<para><emphasis>Step 3 - Add a DataForm</emphasis></para>
-<orderedlist>
-  <listitem>Add the following namespace to MainPage.xaml
-<programlisting><![CDATA[
-xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
-]]></programlisting>
-</listitem>
-  <listitem>Add the form to MainPage.xaml
-<programlisting><![CDATA[
-<dataForm:DataForm x:Name="dataForm1" Header="Employee Information"  AutoGenerateFields="False" AutoEdit="False" AutoCommit="False" CurrentItem="{Binding SelectedItem, ElementName=DataGrid1}" Margin="0,12,0,0">
-   <dataForm:DataForm.EditTemplate>
-       <DataTemplate>
-           <StackPanel>
-               <dataForm:DataField Label="Employee ID">
-                   <TextBox Text="{Binding EmployeeID, Mode=TwoWay}" />
-               </dataForm:DataField>
-               <dataForm:DataField Label="First Name">
-                   <TextBox Text="{Binding FirstName, Mode=TwoWay}" />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Last Name">
-                   <TextBox Text="{Binding LastName, Mode=TwoWay}" />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Courtesy Title">
-                   <TextBox Text="{Binding TitleOfCourtesy, Mode=TwoWay}" />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Hire Date">
-                   <TextBox Text="{Binding HireDate, Mode=TwoWay}" />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Title">
-                   <TextBox Text="{Binding Title, Mode=TwoWay}"  />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Reports To">
-                   <TextBox Text="{Binding ReportsTo, Mode=TwoWay}"  />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Region">
-                   <TextBox Text="{Binding Region, Mode=TwoWay}"  />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Address">
-                   <TextBox Text="{Binding Address, Mode=TwoWay}"  />
-               </dataForm:DataField>
-               <dataForm:DataField Label="City">
-                   <TextBox Text="{Binding City, Mode=TwoWay}"  />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Country Code">
-                   <TextBox Text="{Binding CountryCode, Mode=TwoWay}"  />
-               </dataForm:DataField>
-               <dataForm:DataField Label="Postal Code">
-                   <TextBox Text="{Binding PostalCode, Mode=TwoWay}"  />
-               </dataForm:DataField>
-                   </StackPanel>
-       </DataTemplate>
-   </dataForm:DataForm.EditTemplate>
- </dataForm:DataForm>
-]]></programlisting>
-</listitem>
-  <listitem>Surround the DomainDataSource, DataGrid and DataForm with
-<programlisting><![CDATA[
-        <ScrollViewer BorderThickness="0"  VerticalScrollBarVisibility="Auto" Padding="12,0,12,0" Margin="-2">
-            <StackPanel Margin="0,12,0,12" Orientation="Vertical" >
-.
-.
-.
-            </StackPanel>
-        </ScrollViewer>
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. As each employee is selected the data form fill with their details
-      <figure id="riad3" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/riad3.png"/>
-      </figure>
-</listitem>
-</orderedlist>
-<para>By clicking on the pencil symbol in the top right hand corner the data in the form can be edited
-but it is not propagated back to the database.</para>
-   </sect2>
-    <sect2 id="installnetriavdcrprup">
-        <title>Propagate Updates to Virtuoso</title>
-<orderedlist>
-  <listitem>Add a 'Submit' button just after the DataForm in MainPage.xaml by adding the following code.
-<programlisting><![CDATA[
-<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,12,0,0">
-  <Button x:Name="submitButton" Width="75" Height="23"  Content="Submit"  Margin="4,0,0,0" Click="submitButton_Click"/>
-</StackPanel>
-]]></programlisting>
-</listitem>
-  <listitem>Handle the button click event in MainPage.xaml.cs by adding the following code:
-<programlisting><![CDATA[
-private void submitButton_Click(object sender, RoutedEventArgs e)
-        {
-            EmployeeDataSource.SubmitChanges();
-        }
-]]></programlisting>
-</listitem>
-  <listitem>Build and run the application. If you now edit data in the form and click the submit button
-the data in Virtuoso will be updated.
-      <figure id="riad4" float="1">
-        <title>.NET RIA Services Application</title>
-        <graphic fileref="ui/riad4.png"/>
-      </figure>
-</listitem>
-</orderedlist>
-   </sect2>
-</sect1>
-
-
-<sect1 id="clusterstcnf"><title>Cluster Installation and Config</title>
-    <sect2 id="clusterstcnfsetup"><title>Creating New Cluster Setup</title>
-      <para>After the installation of V6 is done, in order to setup a Cluster you need to perform the
-following steps (working on Unix and MacOsX):</para>
-<orderedlist>
-  <listitem>Determine how many nodes you want to start the cluster with: 2, 4, 6, 8
-<itemizedlist mark="bullet">
-  <listitem>Note: the number of the nodes should be >= 2 </listitem>
-</itemizedlist>
-</listitem>
-  <listitem>Place the following files respectively to your Virtuoso installation folders:
-<itemizedlist mark="bullet">
-  <listitem>bin folder: the virtuoso-restore.sh file:
-<programlisting><![CDATA[
-#!/bin/sh
-#
-#  $Id: installation.xml,v 1.5.2.3 2010/10/07 12:44:59 source Exp $
-#
-#  (C) 2007 OpenLink Software
-#
-#  The copyright above and this notice must be preserved in all
-#  copies of this source code.  The copyright above does not
-#  evidence any actual or intended publication of this source code.
-#
-#  This is unpublished proprietary trade secret of OpenLink Software.
-#  This source code may not be copied, disclosed, distributed, demonstrated
-#  or licensed except as authorized by OpenLink Software.
-#
-#  To learn more about this product, or any other product in our
-#  portfolio, please check out our web site at:
-#
-#      http://www.openlinksw.com
-#
-#  or contact us at:
-#
-#      general.information at openlinksw.com
-#
-#  If you have any technical questions, please contact our support
-#  staff at:
-#
-#      technical.support at openlinksw.com
-#
-
-
-#
-#  Set up the script
-#
-umask 022
-
-#
-#  Optional argument which database to start/stop
-#
-DBDIR=${1-all}
-BPREF=${2-bkp}
-
-
-#
-#  Check if we need to be silent
-#
-SILENT=${SILENT-"0"}
-if test "$SILENT" = "0"
-then
-    ECHO=echo
-else
-    ECHO=:
-fi
-
-
-#
-#  Script information
-#
-SCRIPT_NAME=`basename $0`
-SCRIPT_VERSION="1.0"
-SCRIPT_DATE="Wed Apr 18 2007"
-
-
-#
-#  Where to look
-#
-if test "x$VIRTUOSO_HOME" = "x"
-then
-    VIRTUOSO_HOME="`dirname $0`/.."
-    VIRTUOSO_HOME=`cd $VIRTUOSO_HOME >/dev/null && pwd`
-fi
-if test "x$VIRTUOSO_HOME" = "x"
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: Unable to determine value for \$VIRTUOSO_HOME"
-    echo "***"
-
-    exit 1
-fi
-if test \! -f "$VIRTUOSO_HOME/bin/virtuoso-iodbc-t"
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: \$VIRTUOSO_HOME does not appear to contain standard virtuoso binary"
-    echo "***"
-
-    exit 1
-fi
-export VIRTUOSO_HOME SCRIPT_NAME
-
-#
-#  Read local environment
-#
-if test -f "$VIRTUOSO_HOME/virtuoso-environment.sh"
-then
-    . "$VIRTUOSO_HOME/virtuoso-environment.sh"
-fi
-
-
-#
-#  Try to start the oplmgr if available
-#
-cd "$VIRTUOSO_HOME/bin"
-if test -x oplmgr
-then
-    ./oplmgr +start 2>/dev/null
-fi
-
-
-#
-#  Check which database(s) to start
-#
-cd "$VIRTUOSO_HOME"
-if test "$DBDIR" = "all"
-then
-    DBDIR=""
-    for f in `ls -1 */virtuoso.ini 2>/dev/null`
-    do
-	d=`dirname $f`
-
-        if test -d "$d"
-	then
-  	    DBDIR="$DBDIR $d"
-	fi
-    done
-fi
-
-
-#
-#  Perform the start/stop command
-#
-for d in $DBDIR
-do
-   $ECHO "Starting Virtuoso instance in [$d]"
-   $VIRTUOSO_HOME/install/command-restore.sh $d $BPREF
-done
-
-exit 0
-
-]]></programlisting>
-</listitem>
-  <listitem>folder install: the files command-restore.sh and mk_cluster.sh:
-<para>command-restore.sh</para>
-<programlisting><![CDATA[
-#!/bin/sh
-#
-#  $Id: installation.xml,v 1.5.2.3 2010/10/07 12:44:59 source Exp $
-#
-#  (C) 2007 OpenLink Software
-#
-#  The copyright above and this notice must be preserved in all
-#  copies of this source code.  The copyright above does not
-#  evidence any actual or intended publication of this source code.
-#
-#  This is unpublished proprietary trade secret of OpenLink Software.
-#  This source code may not be copied, disclosed, distributed, demonstrated
-#  or licensed except as authorized by OpenLink Software.
-#
-#  To learn more about this product, or any other product in our
-#  portfolio, please check out our web site at:
-#
-#      http://www.openlinksw.com
-#
-#  or contact us at:
-#
-#      general.information at openlinksw.com
-#
-#  If you have any technical questions, please contact our support
-#  staff at:
-#
-#      technical.support at openlinksw.com
-#
-
-
-#
-#  Set up the script
-#
-umask 022
-
-
-#
-#  Optional argument which database to startup
-#
-DBDIR=${1-database}
-BPREF=${2-bkp}
-
-#
-#  Script information
-#
-SCRIPT_NAME=`basename $0`
-SCRIPT_VERSION="1.0"
-SCRIPT_DATE="Wed Apr 18 2007"
-
-
-#
-#  Where to look
-#
-if test "x$VIRTUOSO_HOME" = "x"
-then
-    VIRTUOSO_HOME="`dirname $0`/.."
-    VIRTUOSO_HOME=`cd $VIRTUOSO_HOME >/dev/null && pwd`
-fi
-if test "x$VIRTUOSO_HOME" = "x"
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: Unable to determine value for \$VIRTUOSO_HOME"
-    echo "***"
-
-    exit 1
-fi
-if test \! -f "$VIRTUOSO_HOME/bin/virtuoso-iodbc-t"
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: \$VIRTUOSO_HOME does not appear to contain standard virtuoso binary"
-    echo "***"
-
-    exit 1
-fi
-export VIRTUOSO_HOME SCRIPT_NAME
-
-
-#
-#  Settings
-#
-SLEEP=5
-INIFILE="$VIRTUOSO_HOME/bin/inifile"
-INIFLAGS="+inifile virtuoso.ini"
-
-
-#
-#  Read local environment
-#
-if test -f "$VIRTUOSO_HOME/virtuoso-environment.sh"
-then
-    . "$VIRTUOSO_HOME/virtuoso-environment.sh"
-fi
-
-
-#
-#  Check if database directory exists
-#
-if test \! -d "$VIRTUOSO_HOME/$DBDIR"
-then
-    echo ""
-    echo "***"
-    echo "***  WARNING: \$VIRTUOSO_HOME/$DBDIR does not exist"
-    echo "***"
-
-    exit 1
-fi
-
-
-#
-#  Check if we are allowed to startup the database at all
-#
-
-if test \! -w "$VIRTUOSO_HOME/$DBDIR"
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: You do not have permission to startup this virtuoso instance"
-    echo "***"
-
-    exit 1
-fi
-
-
-#
-#  Check if there is any lock file in this directory
-#
-cd "$VIRTUOSO_HOME/$DBDIR"
-LCK=virtuoso.lck
-for i in *.lck
-do
-    if test -f "$i"
-    then
-	LCK="$i"
-    fi
-done
-
-
-#
-#  If there is a lock file present, consider the database running
-#
-if test -f "$LCK"
-then
-    echo ""
-    echo "***"
-    echo "***  WARNING: Lock file already exists."
-    echo "***"
-    echo "***  This Virtuoso instance is probably already running."
-    echo "***"
-
-    exit 0
-fi
-
-DBFILE=`$INIFILE $INIFLAGS +section Database +key DatabaseFile`
-TRXFILE=`$INIFILE $INIFLAGS +section Database +key TransactionFile`
-
-if test -f "$DBFILE"
-then
-    echo ""
-    echo "***"
-    echo "***  WARNING: DataBase file already exists."
-    echo "***"
-    echo "***  This Virtuoso instance cannot be restored."
-    echo "***"
-
-    exit 0
-fi
-
-if test -f "$TRXFILE"
-then
-    echo ""
-    echo "***"
-    echo "***  WARNING: TransactionFile file already exists."
-    echo "***"
-    echo "***  This Virtuoso instance cannot be restored."
-    echo "***"
-
-    exit 0
-fi
-
-#
-#  Start the engine
-#
-./virtuoso +restore-backup "$BPREF" +backup-dirs backup
-if test $? -ne 0
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: Could not start this Virtuoso Instance."
-    echo "***"
-
-    LOG=`$INIFILE $INIFLAGS +section Database +key ErrorLogFile`
-    tail "$LOG"
-
-    echo "***"
-    echo "*** Please fix the above issue(s) before trying again."
-    echo "***"
-
-    exit 1
-fi
-
-
-#  All done
-exit 0
-
-]]></programlisting>
-<para>mk_cluster.sh</para>
-<programlisting><![CDATA[
-#!/bin/bash
-
-export NUM_NODES=${1-8}
-export NUM_DISKS=4
-
-SPACE=256
-echo diskspace per NODE = ${SPACE}M
-
-#
-#  Goto TOP
-#
-
-if test "x$VIRTUOSO_HOME" = "x"
-then
-    VIRTUOSO_HOME="`dirname $0`/.."
-    VIRTUOSO_HOME=`cd $VIRTUOSO_HOME >/dev/null && pwd`
-fi
-if test "x$VIRTUOSO_HOME" = "x"
-then
-    echo ""
-    echo "***"
-    echo "*** ERROR: Unable to determine value for \$VIRTUOSO_HOME"
-    echo "***"
-
-    exit 1
-fi
-
-cd $VIRTUOSO_HOME
-
-#cd /opt/virtuoso
-#mkdir -p /dbs1/lod_database
-#mkdir -p /dbs2/lod_database
-#mkdir -p /dbs3/lod_database
-#mkdir -p /dbs4/lod_database
-
-#
-#  Create various directories
-#
-i=1
-while true
-do
-    PORT=`expr 12200 + $i`
-    CLUSTER=`printf "cluster_%02d" $i`
-    HOST=`printf "Host%d" $i`
-    LOD=`printf "lod-%02d" $i`
-
-    echo "Creating $CLUSTER on Host $HOST port $PORT"
-
-    mkdir -p "$CLUSTER"
-    mkdir -p "$CLUSTER"/logs
-    mkdir -p "$CLUSTER"/backup
-
-    cat > "$CLUSTER"/virtuoso.ini <<-EOF_VIRTUOSO
-	;  virtuoso.ini
-	;
-	;  Configuration file for the OpenLink Virtuoso VDBMS Server
-	;
-	;
-	;  Database setup
-	;
-	[Database]
-	DatabaseFile       = virtuoso.db
-	TransactionFile    = virtuoso.trx
-	ErrorLogFile       = virtuoso.log
-	ErrorLogLevel      = 7
-	Syslog             = 0
-	TempStorage        = TempDatabase
-	FileExtend         = 200
-	MaxCheckpointRemap = 2500000
-	Striping           = 0
-
-	[TempDatabase]
-	DatabaseFile    = virtuoso.tdb
-	TransactionFile = virtuoso.ttr
-	FileExtend      = 200
-
-	;
-	;  Server parameters
-	;
-	[Parameters]
-	ServerPort                 = $PORT
-	ServerThreads              = 100
-	CheckpointInterval         = 600
-	NumberOfBuffers            = 20000
-	MaxDirtyBuffers            = 130000
-	DefaultIsolation           = 2
-	UnremapQuota               = 0
-	AtomicDive                 = 1
-	PrefixResultNames          = 0
-	CaseMode                   = 2
-	DisableMtWrite             = 0
-	;MinAutoCheckpointSize	= 4000000
-	;CheckpointAuditTrail	= 1
-	DirsAllowed                = /
-	PLDebug                    = 0
-	TestCoverage               = cov.xml
-	;Charset=ISO-8859-1
-	ResourcesCleanupInterval   = 1
-	ThreadCleanupInterval      = 1
-	TransactionAfterImageLimit = 1500000000
-	FDsPerFile                 = 4
-	MaxMemPoolSize             = 40000000
-	IndexTreeMaps              = 64
-
-	[VDB]
-	VDBDisconnectTimeout = 1000
-	ArrayOptimization    = 2
-	NumArrayParameters   = 10
-
-	[Client]
-	SQL_QUERY_TIMEOUT  = 0
-	SQL_TXN_TIMEOUT    = 0
-	SQL_ROWSET_SIZE    = 10
-	SQL_PREFETCH_BYTES = 12000
-
-	[AutoRepair]
-	BadParentLinks = 0
-	BadDTP         = 0
-
-	;[Striping]
-	;Segment1 = ${SPACE}M, /dbs1/lod_database/${LOD}-sl1.db = q1, /dbs2/lod_database/${LOD}-sl2.db = q2, /dbs3/lod_database/${LOD}-sl3.db = q3, /dbs4/lod_database/${LOD}-sl4.db = q4
-
-	[Replication]
-	ServerName   = $LOD
-	ServerEnable = 1
-
-	[!URIQA]
-	DefaultHost = localhost:8890
-EOF_VIRTUOSO
-
-if test $i -eq 1
-then
-    cat >> "$CLUSTER"/virtuoso.ini <<-EOF_VIRTUOSO_HTTP
-
-	[HTTPServer]
-	ServerPort                  = 8890
-	ServerRoot                  = $VIRTUOSO_HOME/vsp
-	ServerThreads               = 15
-	MaxKeepAlives               = 10
-	KeepAliveTimeout            = 10
-	MaxCachedProxyConnections   = 10
-	ProxyConnectionCacheTimeout = 10
-	DavRoot                     = DAV
-	HTTPLogFile                 = logs/http.log
-EOF_VIRTUOSO_HTTP
-fi
-    # Create cluster control
-    cat > "$CLUSTER"/cluster.ini <<-EOF_CLUSTER
-	[Cluster]
-	Threads = 50
-	ThisHost = $HOST
-	Master = Host1
-	ReqBatchSize = 10000
-	BatchesPerRPC = 4
-	BatchBufferBytes = 20000
-	LocalOnly = 2
-	MaxKeepAlivesMissed = 1000
-	MaxHosts = 100
-
-EOF_CLUSTER
-    let n=0
-    while true
-    do
-	let n+=1
-	CLPORT="`expr 22200 + $n`"
-	echo "Host$n = $CLPORT" >> "$CLUSTER"/cluster.ini
-	if test $n -ge $NUM_NODES
-	then
-	    break
-	fi
-    done
-
-    # Linking virtuoso executable in place
-    cd "$CLUSTER"
-    ln -sf "$VIRTUOSO_HOME"/bin/virtuoso-iodbc-t virtuoso
-    cd ..
-
-    let i+=1
-    if test $i -gt $NUM_NODES
-    then
-	break
-    fi
-done
-
-exit 0
-
-]]></programlisting>
-</listitem>
-</itemizedlist>
-</listitem>
-  <listitem>If you are using EC2 instance, make sure you set the environment by running:
-<programlisting><![CDATA[
-. ./virtuoso-environment.sh
-]]></programlisting>
- </listitem>
-  <listitem>Run the mk_cluster.sh file from the .\install folder with option number of the desired nodes:
-<programlisting><![CDATA[
-..# bash
-..# . ./mk_cluster.sh  4
-....
-Creating cluster_01 on Host Host1 port 12201
-Creating cluster_02 on Host Host2 port 12202
-Creating cluster_03 on Host Host3 port 12203
-Creating cluster_04 on Host Host4 port 12204
-
-]]></programlisting>
-</listitem>
-</orderedlist>
-<sect3 id="clusterstcnfbackuprestore">
-<title>Backup and Restore</title>
-    <para><emphasis>Backup</emphasis></para>
-<para>There are 2 ways to backup Virtuoso Cluster DB:</para>
-<orderedlist>
-  <listitem>Backup every node using <link linkend="fn_backup_online"><function>back_online</function></link>
-    <para><emphasis>For example, for every cluster in its backup folder execute:</emphasis></para>
-<programlisting><![CDATA[
-backup_online ('dbp', 10000000, 0, 'backup');
-]]></programlisting>
-</listitem>
-  <listitem>Make backup of all nodes at once using
-<link linkend="clusteroperationadmclexec"><function>cl_exec</function></link>. For example, execute:
-<programlisting><![CDATA[
-cl_exec ('backup_online ('dbp', 10000000, 0, 'backup')', vector ('dbp', 0, 10000000, './backup'));
-]]></programlisting>
-</listitem>
-</orderedlist>
-    <para><emphasis>Restore from Backup</emphasis></para>
-<para>After backup is done for every node in its backup folder, in order to restore,
-execute from the ..\bin folder the virtuoso-restore.sh:</para>
-<programlisting><![CDATA[
-# . ./virtuoso-restore.sh all dbp
-]]></programlisting>
-<para>where the second parameter is the restore prefix.</para>
-</sect3>
-    </sect2>
-    <sect2 id="clusterstcnfconfig"><title>Cluster Config</title>
-<orderedlist>
-  <listitem>Set "FAST_START=1" in the viruoso-start.sh file and then run:
-<programlisting><![CDATA[
-viruoso-start.sh
-]]></programlisting>
-<para>or</para>
- </listitem>
-  <listitem>Execute the following line:
-<programlisting><![CDATA[
-# /etc/init.d/virtuoso start
-Starting OpenLink Virtuoso:                                [  OK  ]
-]]></programlisting>
-</listitem>
-  <listitem>In order to check the nodes, connect to port 12201 using the ISQL tool:
-<programlisting><![CDATA[
-isql 12201
-]]></programlisting>
-</listitem>
-  <listitem>To check the cluster status, execute the following command:
-<programlisting><![CDATA[
-SQL> status('cluster');
-REPORT
-VARCHAR
-_______________________________________________________________________________
-
-Cluster 4 nodes, 293 s. 0 m/s 0 KB/s  0% cpu 0%  read 0% clw threads 1r 0w 0i buffers 1781 0 d 0 w 0 pfs
-
-1 Rows. -- 4 msec.
-]]></programlisting>
-</listitem>
-</orderedlist>
-    </sect2>
-   <tip><title>See Also:</title>
-        <para><link linkend="clusteroperation">Setting up and operating Virtuoso on a cluster.</link></para>
-        <para><link linkend="clusterprogramming">Virtuoso Cluster Programming</link></para>
-        <para><link linkend="fault">Virtuoso Cluster Fault Tolerance.</link></para>
-   </tip>
-</sect1>
-
 </chapter>
diff --git a/docsrc/xmlsource/internetservices.xml b/docsrc/xmlsource/internetservices.xml
index 61412f4..0d491f8 100644
--- a/docsrc/xmlsource/internetservices.xml
+++ b/docsrc/xmlsource/internetservices.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/intl.xml b/docsrc/xmlsource/intl.xml
index 799d8f2..8575630 100644
--- a/docsrc/xmlsource/intl.xml
+++ b/docsrc/xmlsource/intl.xml
@@ -5,7 +5,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -23,8 +23,7 @@
  -  
 -->
 <!--
-  $Id: intl.xml,v 1.2 2008/02/06 23:09:33 source Exp $
-  (C)Copyright 2005 OpenLink Software
+  $Id: intl.xml,v 1.2.2.2 2012/03/08 13:13:48 source Exp $
 -->
 <chapter label="intl.xml" id="intl">
 	<title>International Character Support and Compatibility</title>
diff --git a/docsrc/xmlsource/isql.xml b/docsrc/xmlsource/isql.xml
index 58cd07e..71a2e6c 100644
--- a/docsrc/xmlsource/isql.xml
+++ b/docsrc/xmlsource/isql.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/jsphosting.xml b/docsrc/xmlsource/jsphosting.xml
index 1c8261e..9d34e5c 100644
--- a/docsrc/xmlsource/jsphosting.xml
+++ b/docsrc/xmlsource/jsphosting.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/jvmapi.xml b/docsrc/xmlsource/jvmapi.xml
index f069668..e265cf5 100644
--- a/docsrc/xmlsource/jvmapi.xml
+++ b/docsrc/xmlsource/jvmapi.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ldap.xml b/docsrc/xmlsource/ldap.xml
index 433398f..a9911c5 100644
--- a/docsrc/xmlsource/ldap.xml
+++ b/docsrc/xmlsource/ldap.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/mailsrv.xml b/docsrc/xmlsource/mailsrv.xml
index 0abea41..f283088 100644
--- a/docsrc/xmlsource/mailsrv.xml
+++ b/docsrc/xmlsource/mailsrv.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/migrate27to30.xml b/docsrc/xmlsource/migrate27to30.xml
index 0f3a75d..94d928c 100644
--- a/docsrc/xmlsource/migrate27to30.xml
+++ b/docsrc/xmlsource/migrate27to30.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/mime.xml b/docsrc/xmlsource/mime.xml
index 11a3c1a..eeb4f02 100644
--- a/docsrc/xmlsource/mime.xml
+++ b/docsrc/xmlsource/mime.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/odbcimplementation.xml b/docsrc/xmlsource/odbcimplementation.xml
index b00832b..b7e0925 100644
--- a/docsrc/xmlsource/odbcimplementation.xml
+++ b/docsrc/xmlsource/odbcimplementation.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1288,7 +1288,7 @@ gcc -o odbc_iri -I/usr/local/iODBC odbc_iri.c -L/usr/local/iODBC/lib -liodbc -ld
      *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
      *  project.
      *
-     *  Copyright (C) 1998-2009 OpenLink Software
+     *  Copyright (C) 1998-2012 OpenLink Software
      *
      *  This project is free software; you can redistribute it and/or modify it
      *  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/oledbimplementation.xml b/docsrc/xmlsource/oledbimplementation.xml
index 99242e6..355e214 100644
--- a/docsrc/xmlsource/oledbimplementation.xml
+++ b/docsrc/xmlsource/oledbimplementation.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/overview.xml b/docsrc/xmlsource/overview.xml
index eb72e05..523fc5e 100644
--- a/docsrc/xmlsource/overview.xml
+++ b/docsrc/xmlsource/overview.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -698,7 +698,7 @@ These are then enforced for SPARUL (the SPARQL update language) and SPARQL.
 </para>
 <para>
 When an RDF graph is based on relationally stored data in Virtuoso or another RDBMS through Virtuoso's
-SQL federation feature (i.e., if the graph is an RDF View of underlying SQL data), then all relational
+SQL federation feature (i.e., if the graph is an Linked Data View of underlying SQL data), then all relational
 security controls apply.
 </para>
 <para>
@@ -780,12 +780,12 @@ MaxCheckpointRemap = 246837
        say 1/4 of the DB size will resolve the issue.</para>
     </sect2>                  
     <sect2 id="virtuosotipsandtricksrdftriggersoptions">
-      <title>What are "Generate RDB2RDF triggers" and "Enable Data Syncs with Physical Quad Store" RDF Views options?</title>
-      <para>These RDF Views options basically persist the triples in the transient View Graph in the Native Quad Store. The Data Sync is how you keep the transient views in sync with the persisted triples.</para>	      
+      <title>What are "Generate RDB2RDF triggers" and "Enable Data Syncs with Physical Quad Store" Linked Data Views options?</title>
+      <para>These Linked Data Views options basically persist the triples in the transient View Graph in the Native Quad Store. The Data Sync is how you keep the transient views in sync with the persisted triples.</para>	      
       <para>Without this capability you cannot exploit faceted browsing without severe performance overhead when using Linked Data based conceptual views over ODBC or JDBC accessible data sources.</para>	
       <para>Note: Using these options when the RFViews have already been created is not currently possible via the Conductor UI. Instead you should be able to add them manually from isql:</para>	            
 <orderedlist>
-  <listitem>Drop the RDF View graph and Quad Map.</listitem>
+  <listitem>Drop the Linked Data View graph and Quad Map.</listitem>
   <listitem>Create it again with the RDB2RDF Triggers options enabled.</listitem>
 </orderedlist>  
      <tip><title>See Also:</title>
@@ -834,7 +834,7 @@ LIMIT 10
     </sect2>  
     <sect2 id="virtuosotipsandtricksquadstorageinternally">
       <title>How can I see which quad storages exist and in which quad storage a graph resides?</title>
-      <para>Let's take for example a <ulink url="http://virtuoso.openlinksw.com/whitepapers/relational%20rdf%20views%20mapping.html">created RDF view from relational data in Virtuoso</ulink>. The RDF output therefor should have two graphs which reside in a quad storage named for ex.:
+      <para>Let's take for example a <ulink url="http://virtuoso.openlinksw.com/whitepapers/relational%20rdf%20views%20mapping.html">created Linked Data View from relational data in Virtuoso</ulink>. The RDF output therefor should have two graphs which reside in a quad storage named for ex.:
       </para>	
 <programlisting><![CDATA[
 http://localhost:8890/rdfv_demo/quad_storage/default	
@@ -874,12 +874,12 @@ http://www.openlinksw.com/schemas/virtrdf#SyncToQuads
       <itemizedlist mark="bullet">
         <listitem><emphasis>virtrdf:DefaultQuadStorage</emphasis> is what's in use if no input:storage specified.</listitem>
         <listitem><emphasis>virtrdf:DefaultServiceStorage</emphasis> will be used for SPARQL federation.</listitem>
-        <listitem><emphasis>virtrdf:SyncToQuads</emphasis> is to keep the list of RDF Views that are translated into RDB2RDF triggers.</listitem>        
+        <listitem><emphasis>virtrdf:SyncToQuads</emphasis> is to keep the list of Linked Data Views that are translated into RDB2RDF triggers.</listitem>        
       </itemizedlist>      
-      <para>There are two ways of using the RDF View from above in SPARQL endpoint without 
+      <para>There are two ways of using the Linked Data View from above in SPARQL endpoint without 
       	<emphasis>define input:storage</emphasis>:</para>	
       <orderedlist>
-        <listitem>Create RDF View right in <emphasis>virtrdf:DefaultQuadStorage</emphasis> or add the 
+        <listitem>Create Linked Data View right in <emphasis>virtrdf:DefaultQuadStorage</emphasis> or add the 
         view in other storage and then copy it from there to <emphasis>virtrdf:DefaultQuadStorage</emphasis>.
           <itemizedlist mark="bullet">
             <listitem>In any of these two variants, use: 
@@ -910,7 +910,7 @@ SPARQL ALTER QUAD STORAGE virtrdf:DefaultQuadStorage . . .
       some other built-in thing, it can be safely recovered by 
       <link linkend="fn_rdf_audit_metadata"><function>DB.DBA.RDF_AUDIT_METADATA</function></link>, 
       with first parameter set to 1. This will keep your own data intact. However we recommend to write 
-      a script that declares all your formats, RDF Views and storages, to be able to reproduce the 
+      a script that declares all your formats, Linked Data Views and storages, to be able to reproduce the 
       configuration after any failures.</para>
     </sect2>    
     <sect2 id="virtuosotipsandtricksgraphsecurity">
@@ -1434,7 +1434,7 @@ WHERE
       <tip><title>See Also:</title>
        <para><link linkend="rdfsparqlrule">Inference Rules and Reasoning</link></para>
        <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtFacetBrowserInstallConfig">Virtuoso Faceted Browser Installation and configuration</ulink></para>
-       <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtuosoFacetsWebService">Virtuoso Facets Web Service</ulink></para>       
+       <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtuosoFacetsWebService">Virtuoso Faceted Web Service</ulink></para>       
      </tip>          
     </sect2>   
     <sect2 id="virtuosotipsandtricksdumparbqntr">
@@ -1998,6 +1998,48 @@ Done. -- 866 msec.
   </listitem>
 </orderedlist>
     </sect2> 
+    <sect2 id="cxmlurlptrn">
+      <title>What CXML params are supported for the SPARQL URL pattern?</title>     
+      <para>The following options are supported for CXML link behavior in the SPARQL URL Pattern:</para>
+<orderedlist>
+  <listitem>Local faceted navigation links: 
+<programlisting><![CDATA[ 
+# CXML_redir_for_subjs=&CXML_redir_for_hrefs=&: 
+
+http://lod.openlinksw.com/sparql?default-graph-uri=&should-sponge=&query=SELECT+DISTINCT+%3Fcafe+%3Flat+%3Flong+%3Fcafename+%3Fchurchname++%28+bif%3Around%28bif%3Ast_distance+%28%3Fchurchgeo%2C+%3Fcafegeo%29%29+%29++WHERE++{++++%3Fchurch+a+lgv%3Aplace_of_worship+.++++%3Fchurch+geo%3Ageometry+%3Fchurchgeo+.++++%3Fchurch+lgv%3Aname+%3Fchurchname+.++++%3Fcafe+a+lgv%3Acafe+.++++%3Fcafe+lgv%3Aname+%3Fcafename+.++++%3Fcafe+geo%3Ageometry+%3Fcafegeo+.++++%3Fcafe+geo%3Alat+%3Flat+.++++%3Fcafe+geo%3Along+%3Flong+.++++FILTER+%28+bif%3Ast_intersects+%28%3Fchurchgeo%2C+bif%3Ast_point+%282.3498%2C48.853%29%2C5%29++%26%26+bif%3Ast_intersects+%28%3Fcafegeo%2C+%3Fchurchgeo%2C+0.2%29+%29+}+LIMIT+50&debug=on&timeout=&format=text%2Fhtml&CXML_redir_for_subjs=&CXML_redir_for_hrefs=&save=display&fname=
+]]></programlisting>   	
+  </listitem>
+  <listitem>External Resource Links: 
+<programlisting><![CDATA[ 
+# CXML_redir_for_subjs=&CXML_redir_for_hrefs=121: 
+
+http://lod.openlinksw.com/sparql?default-graph-uri=&should-sponge=&query=SELECT+DISTINCT+%3Fcafe+%3Flat+%3Flong+%3Fcafename+%3Fchurchname++%28+bif%3Around%28bif%3Ast_distance+%28%3Fchurchgeo%2C+%3Fcafegeo%29%29+%29++WHERE++{++++%3Fchurch+a+lgv%3Aplace_of_worship+.++++%3Fchurch+geo%3Ageometry+%3Fchurchgeo+.++++%3Fchurch+lgv%3Aname+%3Fchurchname+.++++%3Fcafe+a+lgv%3Acafe+.++++%3Fcafe+lgv%3Aname+%3Fcafename+.++++%3Fcafe+geo%3Ageometry+%3Fcafegeo+.++++%3Fcafe+geo%3Alat+%3Flat+.++++%3Fcafe+geo%3Along+%3Flong+.++++FILTER+%28+bif%3Ast_intersects+%28%3Fchurchgeo%2C+bif%3Ast_point+%282.3498%2C48.853%29%2C5%29++%26%26+bif%3Ast_intersects+%28%3Fcafegeo%2C+%3Fchurchgeo%2C+0.2%29+%29+}+LIMIT+50&debug=on&timeout=&format=text%2Fhtml&CXML_redir_for_subjs=&CXML_redir_for_hrefs=121&save=display&fname=
+
+]]></programlisting>   	
+  </listitem>
+  <listitem>External faceted navigation links: 
+<programlisting><![CDATA[ 
+# CXML_redir_for_subjs=&CXML_redir_for_hrefs=LOCAL_PIVOT: 
+
+http://lod.openlinksw.com/sparql?default-graph-uri=&should-sponge=&query=SELECT+DISTINCT+%3Fcafe+%3Flat+%3Flong+%3Fcafename+%3Fchurchname++%28+bif%3Around%28bif%3Ast_distance+%28%3Fchurchgeo%2C+%3Fcafegeo%29%29+%29++WHERE++{++++%3Fchurch+a+lgv%3Aplace_of_worship+.++++%3Fchurch+geo%3Ageometry+%3Fchurchgeo+.++++%3Fchurch+lgv%3Aname+%3Fchurchname+.++++%3Fcafe+a+lgv%3Acafe+.++++%3Fcafe+lgv%3Aname+%3Fcafename+.++++%3Fcafe+geo%3Ageometry+%3Fcafegeo+.++++%3Fcafe+geo%3Alat+%3Flat+.++++%3Fcafe+geo%3Along+%3Flong+.++++FILTER+%28+bif%3Ast_intersects+%28%3Fchurchgeo%2C+bif%3Ast_point+%282.3498%2C48.853%29%2C5%29++%26%26+bif%3Ast_intersects+%28%3Fcafegeo%2C+%3Fchurchgeo%2C+0.2%29+%29+}+LIMIT+50&debug=on&timeout=&format=text%2Fhtml&CXML_redir_for_subjs=&CXML_redir_for_hrefs=LOCAL_PIVOT&save=display&fname=
+]]></programlisting>   	
+  </listitem>
+  <listitem>External description resource(TTL): 
+<programlisting><![CDATA[ 
+# CXML_redir_for_subjs=&CXML_redir_for_hrefs=LOCAL_TTL:
+
+http://lod.openlinksw.com/sparql?default-graph-uri=&should-sponge=&query=SELECT+DISTINCT+%3Fcafe+%3Flat+%3Flong+%3Fcafename+%3Fchurchname++%28+bif%3Around%28bif%3Ast_distance+%28%3Fchurchgeo%2C+%3Fcafegeo%29%29+%29++WHERE++{++++%3Fchurch+a+lgv%3Aplace_of_worship+.++++%3Fchurch+geo%3Ageometry+%3Fchurchgeo+.++++%3Fchurch+lgv%3Aname+%3Fchurchname+.++++%3Fcafe+a+lgv%3Acafe+.++++%3Fcafe+lgv%3Aname+%3Fcafename+.++++%3Fcafe+geo%3Ageometry+%3Fcafegeo+.++++%3Fcafe+geo%3Alat+%3Flat+.++++%3Fcafe+geo%3Along+%3Flong+.++++FILTER+%28+bif%3Ast_intersects+%28%3Fchurchgeo%2C+bif%3Ast_point+%282.3498%2C48.853%29%2C5%29++%26%26+bif%3Ast_intersects+%28%3Fcafegeo%2C+%3Fchurchgeo%2C+0.2%29+%29+}+LIMIT+50&debug=on&timeout=&format=text%2Fhtml&CXML_redir_for_subjs=&CXML_redir_for_hrefs=LOCAL_TTL&save=display&fname=
+]]></programlisting>   	
+  </listitem>
+  <listitem>External description resource(CXML): 
+<programlisting><![CDATA[ 
+# CXML_redir_for_subjs=&CXML_redir_for_hrefs=LOCAL_CXML: 
+
+http://lod.openlinksw.com/sparql?default-graph-uri=&should-sponge=&query=SELECT+DISTINCT+%3Fcafe+%3Flat+%3Flong+%3Fcafename+%3Fchurchname++%28+bif%3Around%28bif%3Ast_distance+%28%3Fchurchgeo%2C+%3Fcafegeo%29%29+%29++WHERE++{++++%3Fchurch+a+lgv%3Aplace_of_worship+.++++%3Fchurch+geo%3Ageometry+%3Fchurchgeo+.++++%3Fchurch+lgv%3Aname+%3Fchurchname+.++++%3Fcafe+a+lgv%3Acafe+.++++%3Fcafe+lgv%3Aname+%3Fcafename+.++++%3Fcafe+geo%3Ageometry+%3Fcafegeo+.++++%3Fcafe+geo%3Alat+%3Flat+.++++%3Fcafe+geo%3Along+%3Flong+.++++FILTER+%28+bif%3Ast_intersects+%28%3Fchurchgeo%2C+bif%3Ast_point+%282.3498%2C48.853%29%2C5%29++%26%26+bif%3Ast_intersects+%28%3Fcafegeo%2C+%3Fchurchgeo%2C+0.2%29+%29+}+LIMIT+50&debug=on&timeout=&format=text%2Fhtml&CXML_redir_for_subjs=&CXML_redir_for_hrefs=LOCAL_CXML&save=display&fname=
+]]></programlisting>   	
+  </listitem>
+</orderedlist>
+    </sect2> 
     <sect2 id="replallgr">
       <title>How can I replicate all graphs?</title>     
       <para>To replicate all graphs ( except the system graph http://www.openlinksw.com/schemas/virtrdf# ), 
@@ -2006,7 +2048,1130 @@ Done. -- 866 msec.
 SQL> DB.DBA.RDF_RDF_REPL_GRAPH_INS ('http://www.openlinksw.com/schemas/virtrdf#rdf_repl_all');
 ]]></programlisting>   	
     </sect2>        	
-  </sect1>    
-</chapter>
+    <sect2 id="rndsalltr">
+      <title>What is best method to get a random sample of all triples for a subset of all the resources 
+      	of a SPARQL endpoint?</title>     
+      <para>The best method to get a random sample of all triples for a subset of all the resources of 
+      	a SPARQL endpoint, is decimation in its original style:</para>
+<programlisting><![CDATA[ 
+SELECT ?s ?p ?o 
+FROM <some-graph>
+WHERE 
+  { 
+    ?s ?p ?o .
+    FILTER ( 1 > bif:rnd (10, ?s, ?p, ?o) )
+  }
+]]></programlisting>   	
+      <para>By tweaking first argument of <emphasis>bif:rnd()</emphasis> and the left side of the 
+      inequality you can tweak decimation ratio from 1/10 to the desired value. What's important is 
+      to know that the SQL optimizer has a right to execute <emphasis>bif:rnd (10)</emphasis> only once 
+      at the beginning of the query, so we had to pass additional three arguments that can be known only 
+      when a table row is fetched so <emphasis>bif:rnd (10, ?s, ?p, ?o)</emphasis> is calculated for every 
+      row and thus any given row is either returned or ignored independently from others.</para>
+      <para>However, <emphasis>bif:rnd (10, ?s, ?p, ?o)</emphasis> contains a subtle inefficiency. In RDF 
+      store, graph nodes are stored as numeric IRI IDs and literal objects can be stored in a separate 
+      table. The call of an SQL function needs arguments of traditional SQL datatypes, so the query 
+      processor will extract the text of IRI for each node and the full value for each literal object. 
+      That is significant waste of time. The workaround is:</para>      
+<programlisting><![CDATA[ 
+SPARQL 
+SELECT ?s ?p ?o 
+FROM <some-graph> 
+WHERE 
+  { 
+    ?s ?p ?o .
+    FILTER ( 1>  <SHORT_OR_LONG::bif:rnd>  (10, ?s, ?p, ?o))  
+  }
+]]></programlisting>   	
+      <para>This tells the SPARQL front-end to omit redundant conversions of values.</para>
+    </sect2>   
+    <sect2 id="replallgr">
+      <title>How can I replicate all graphs?</title>     
+      <para>To replicate all graphs ( except the system graph http://www.openlinksw.com/schemas/virtrdf# ), 
+      	one should use http://www.openlinksw.com/schemas/virtrdf#rdf_repl_all as graph IRI:</para>
+<programlisting><![CDATA[ 
+SQL> DB.DBA.RDF_RDF_REPL_GRAPH_INS ('http://www.openlinksw.com/schemas/virtrdf#rdf_repl_all');
+]]></programlisting>   	
+    </sect2>  
+    <sect2 id="sparqlmkmeshup">
+      <title>How can I use SPARQL to make Meshups?</title>     
+      <para>The following example demonstrates how to use SPARQL in order to make Meshups:</para>
+<programlisting><![CDATA[ 
+PREFIX dbo: <http://dbpedia.org/ontology/>
+PREFIX rtb: <http://www.openlinksw.com/schemas/oat/rdftabs#>
+
+CONSTRUCT 
+  {
+    ?museum geo:geometry ?museumgeo ;
+             rtb:useMarker 'star' ;
+             foaf:name ?musname;
+             rdfs:comment ?muscomment.
+    ?edu geo:geometry ?edugeo ;
+          rtb:useMarker 'book' ;
+          foaf:name ?eduname;
+          rdfs:comment ?educomment.
+    ?wh geo:geometry ?whgeo;
+            rtb:useMarker '03';
+            foaf:name ?whname;
+            rdfs:comment ?whcomment.
+  }
+WHERE 
+  { 
+    {
+      ?museum a dbo:Museum;
+              geo:geometry ?museumgeo;
+              foaf:name ?musname;
+              rdfs:comment ?muscomment.
+      filter (lang(?musname)='en' && lang(?muscomment)='en')
+    } 
+    UNION 
+    {
+      ?edu a dbo:University;
+           geo:geometry ?edugeo;
+           foaf:name ?eduname;
+           rdfs:comment ?educomment.
+      filter (lang(?eduname)='en' && lang(?educomment)='en')
+    } 
+    UNION 
+    {
+      ?wh a dbo:WorldHeritageSite;
+            geo:geometry ?whgeo;
+            rdfs:label ?whname;
+            rdfs:comment ?whcomment. 
+      filter (lang(?whname)='en' && lang(?whcomment)='en')
+    } 
+  }
+]]></programlisting>   	
+    </sect2> 
+    <sect2 id="clusternetmeter">
+      <title>How can I use the net_meter utility before starting the ingestion to a cluster?</title>                 	
+      <para>The <link linkend="">net_meter</link> utility is a SQL procedure that runs a network 
+test procedure on every host of the cluster. The network test procedure sends a message 
+to every other host of the cluster and waits for the replies from each host. After the last 
+reply is received the action is repeated. This results in a symmetrical load of the network, 
+all points acting as both clients and servers to all other points.
+      </para>
+<programlisting><![CDATA[
+net_meter ( 
+  in n_threads int, 
+  in n_batches int, 
+  in bytes int, 
+  in ops_per_batch int)
+]]></programlisting>
+      <para>The parameters have the following meaning:</para>
+      <itemizedlist mark="bullet">
+        <listitem><emphasis>n_threads</emphasis>: The number of network test instances started on 
+each host. A value of 4 on a cluster of 4 hosts would result in a total of 16 network test 
+procedures spread over 4 processes.
+        </listitem>
+        <listitem><emphasis>n_batches</emphasis>: The number of message exchanges done by each network 
+test procedure. A message exchange consists of sending one request to every other host of the cluster 
+and of waiting for all to have replied.
+        </listitem>
+        <listitem><emphasis>bytes</emphasis>: The number of bytes sent to each host in each message 
+exchange. The reply from each host has the same number of bytes.
+        </listitem>
+        <listitem><emphasis>ops_per_batch</emphasis>: This causes each message batch to contain several 
+operations. In practice this is a multiplier on the number of bytes.
+        </listitem>
+      </itemizedlist>
+      <sect3 id="clusternetmeterex">
+        <title>Example</title>
+        <para>Assume anuser has run 2 sets of tests on a cluster:</para>
+        <para>The first one was 1 thread, 1000 batches, 1000 bytes per exchange, 1 operation per batch:</para>
+<programlisting><![CDATA[
+SQL> net_meter (1, 1000, 1000, 1);
+
+round_trips     MBps
+REAL            REAL
+    
+_______________________________________
+
+1245.393315542000254  2.489418401123078
+
+1 Rows. -- 39345 msec.	
+]]></programlisting>
+        <para>resulted in a measured throughput of 2.5 MBps</para>
+        <para>The second one was 1 thread, 5000 batches, 10000 bytes per exchange, 1 operation per batch:</para>
+<programlisting><![CDATA[
+SQL> net_meter (1, 5000, 10000, 1);
+
+round_trips     MBps
+REAL            REAL
+    
+___________________________________________
+
+15915.291672080031181  305.017186586494738
+
+1 Rows. -- 15394 msec.	
+]]></programlisting>
+        <para>resulted in a measured throughput of 305 MBps.</para>
+        <para>This indicates that the user's network is slow when sending multiple short messages.</para>
+        <para>When using the ingestion you should check the:</para>
+<programlisting><![CDATA[
+status('cluster');	
+]]></programlisting>        	   
+        <para>command a few times and check the XX KB/s amount which should be around or above the 2500 mark.</para>
+      </sect3>	
+    </sect2>   
+    <sect2 id="loadcmrdf">
+      <title>How can I use the LOAD command to import RDF data?</title>                 	
+      <para>SPARQL INSERT can be done using the LOAD command:</para>
+<programlisting><![CDATA[  
+SPARQL INSERT INTO <..> { .... } [[FROM ...] { ... }]
+
+SPARQL LOAD <x> [INTO <y>]
+
+-- <ResourceURL> will be the Graph IRI of the loaded data:
+SPARQL LOAD <ResourceURL>	
+]]></programlisting>  	  
+      <sect3 id="loadcmrdfex"> 
+      	<title>Examples</title> 
+        <sect4 id="loadcmrdfex1">  
+      	  <title>Load from Resource URL</title>         	
+      	  <para>In order to load data from resource URL for ex: 
+http://www.w3.org/People/Berners-Lee/card#i , execute from isql the following command:</para>
+<programlisting><![CDATA[  
+SQL> SPARQL LOAD <http://www.w3.org/People/Berners-Lee/card#i>;
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Load <http://www.w3.org/People/Berners-Lee/card#i> into graph <http://www.w3.org/People/Berners-Lee/card#i> -- done
+
+1 Rows. -- 703 msec.
+SQL>	
+]]></programlisting> 
+        </sect4>      	
+        <sect4 id="loadcmrdfex2">         	
+      	  <title>Load from file</title>         	
+          <orderedlist>
+            <listitem>Create DAV collection which is visible to public, for ex: http://localhost:8890/DAV/tmp</listitem>
+            <listitem>Upload to the DAV collection a file for ex. with name listall.rq and with the following content:
+<programlisting><![CDATA[  
+SPARQL
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX sioc: <http://rdfs.org/sioc/ns#>
+SELECT ?x ?p ?o
+FROM <http://mygraph.com>
+WHERE
+  {
+    ?x rdf:type sioc:User .
+    ?x ?p ?o.
+    ?x sioc:id ?id .
+    FILTER REGEX(str(?id), "^King")
+  }
+ORDER BY ?x	
+]]></programlisting>             	
+            </listitem>
+            <listitem>Execute from ISQL the following command:
+<programlisting><![CDATA[  
+SQL>SPARQL LOAD bif:concat ("http://", bif:registry_get("URIQADefaultHost"), "/DAV/tmp/listall.rq") into graph <http://myNewGraph.com>;
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Load <http://localhost:8890/DAV/tmp/listall.rq> into graph <http://myNewGraph.com> -- done
+
+1 Rows. -- 321 msec.	
+]]></programlisting>            	
+            </listitem>
+          </orderedlist>      	  
+        </sect4>      	
+        <sect4 id="loadcmrdfex3">  
+      	  <title>Directly LOAD triples using ISQL</title>         	
+<programlisting><![CDATA[
+SQL>SPARQL INSERT INTO graph <http://mygraph.com>
+{
+  <http://myopenlink.net/dataspace/Kingsley#this>
+  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
+  <http://rdfs.org/sioc/ns#User> .
+
+  <http://myopenlink.net/dataspace/Kingsley#this>
+  <http://rdfs.org/sioc/ns#id>
+  <Kingsley> .
+
+  <http://myopenlink.net/dataspace/Caroline#this>
+  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
+  <http://rdfs.org/sioc/ns#User> .
+
+  <http://myopenlink.net/dataspace/Caroline#this>
+  <http://rdfs.org/sioc/ns#id>
+  <Caroline> .
+};	
+]]></programlisting>
+        </sect4>      	
+      </sect3>      	
+    </sect2>       
+    <sect2 id="degrprc">
+      <title>How can I delete graphs using stored procedure?</title>     
+      <para>The following script demonstrates the use of custom stored procedures for deleting graph(s). 
+      	It first creates a table <emphasis>GRAPHS_TO_DELETE</emphasis>, into which the names of the graphs 
+      	to be deleted should be inserted, as follows:</para>
+<programlisting><![CDATA[ 
+use MYUSR;
 
+create procedure GRAPHS_TO_DELETE_SP (in gd_iris any)
+{
+  declare gd_iri iri_id;
+  declare dp, row any;
+  result_names (gd_iri);
+  dp := dpipe (0, '__I2IDN');
+  foreach (varchar iri in GD_IRIS) do
+    {
+      dpipe_input (dp, iri);
+    }
+  while (0 <> (row := dpipe_next (dp, 0)))
+    {
+      result (row[0]);
+    }
+}
+;
 
+drop view GRAPHS_TO_DELETE_VIEW;
+create procedure view GRAPHS_TO_DELETE_VIEW as MYUSR.DBA.GRAPHS_TO_DELETE_SP (gd_iris) (gd_iri any);
+
+create procedure DELETE_GRAPHS (in g_iris any)
+{
+  declare g_iids any;
+  if (not isvector (g_iris) and g_iris is not null)
+    signal ('22023', '.....', 'The input argument must be an array of strings or null');
+  if (not length (g_iris))
+    return 0;
+  delete from DB.DBA.RDF_QUAD where G in (select * from GRAPHS_TO_DELETE_VIEW where gd_iris = g_iris) option (loop exists);
+  return row_count ();
+}
+;
+]]></programlisting>   	
+      <para>Finally call the procedure DELETE_GRAPHS to perform the deletion of the specified graphs. 
+      	Note it does not return a result set and can be called as follows:</para> 
+<programlisting><![CDATA[ 
+SQL> select MYUSR.DBA.DELETE_GRAPHS (vector ('g1', 'g2', 'g3'));	
+]]></programlisting>   	
+      <para>This will return the number of triples removed from the specified graphs.</para>       
+      <para>Note: the procedure only applies to the cluster so to get IRI IDs via partitioned 
+      	pipe (DAQ). It is not usable on single.</para>
+    </sect2>     
+    <sect2 id="sparulspongertut">
+      <title>How can I use SPARUL to add missing triples to a Named Graph?</title>         
+      <sect3 id="sparulspongertutwhat">
+      	<title>What?</title>
+        <para>Use of SPARUL to add missing triples to a Named Graph. For example, an ontology/vocabulary 
+        	extension.</para>         
+      </sect3>           
+      <sect3 id="sparulspongertutwhy">
+      	<title>Why?</title>
+        <para>A lot of ontologies and vocabularies started life prior to emergence of the Linked Data 
+        	meme. As a result, many do not include rdfs:isDefinedBy relations (via triples) that associate 
+        	Classes and Properties in an ontology with the ontology itself, using de-referencable URIs. 
+        	The downside of this pattern is that Linked Data's follow-your-nose pattern isn't exploitable 
+        	when viewing these ontologies e.g., when using contemporary Linked Data aware browsers.</para>         
+      </sect3>           
+      <sect3 id="sparulspongertuthow">
+      	<title>How?</title>
+        <para>If SPARUL privileges are assigned to SPARQL or other accounts associated with SPARQL 
+        	Endpoint. Or via WebID? protected SPARQL endpoint with SPARUL is granted to SPARQL or specific 
+        	accounts or WebIDs in a group.</para>         
+<programlisting><![CDATA[
+INSERT INTO <LocalNamedGraphIRI>
+  { ?s rdfs:DefinedBy <LocalOntologyEntityURI>.
+    ?o rdfs:isDefinedBy <http://www.w3.org/ns/auth/acl>. }
+FROM <ExtSourceNamedGraphIRI> 
+WHERE 
+  { 
+    ?s a ?o 
+  }
+]]></programlisting>  
+        <sect4 id="sparulspongertutex">
+      	  <title>Example</title>      
+          <orderedlist>
+            <listitem>Load Quad Named Graph via Sponger based query: 
+<programlisting><![CDATA[
+DEFINE get:soft "replace"
+SELECT DISTINCT *
+FROM <http://www.w3.org/ns/auth/acl#>
+WHERE 
+  { 
+    ?s ?p ?o 
+  }
+]]></programlisting>
+            </listitem>
+            <listitem>Added Triples via SPARUL to Ontology Named Graph: 
+<programlisting><![CDATA[
+INSERT INTO <http://www.w3.org/ns/auth/acl#>
+  {  ?s rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>.
+     ?o rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>. }
+FROM <http://www.w3.org/ns/auth/acl#> 
+WHERE 
+  {
+    ?s a ?o
+  }
+]]></programlisting>
+            </listitem>
+            <listitem>Via Conductor or Command-line iSQL courtesy of SPASQL execute the following statements: 
+            	<orderedlist>
+                <listitem>Remove an existing graph: 
+<programlisting><![CDATA[
+SPARQL
+CLEAR GRAPH <http://www.w3.org/ns/auth/acl/> ;
+
+SPARQL
+CLEAR GRAPH <http://www.w3.org/ns/auth/acl> ;
+
+SPARQL
+CLEAR GRAPH <http://www.w3.org/ns/auth/acl#> ;
+]]></programlisting>
+                </listitem>
+                <listitem>Load a new graph: 
+<programlisting><![CDATA[
+SPARQL
+LOAD <http://www.w3.org/ns/auth/acl> ;
+]]></programlisting>
+                </listitem>
+                <listitem>Add missing rdfs:isDefinedBy triples via SPARUL: 
+<programlisting><![CDATA[
+SPARQL
+INSERT INTO <http://www.w3.org/ns/auth/acl>
+  {  ?s rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>.
+     ?o rdfs:DefinedBy <http://www.w3.org/ns/auth/acl>. }
+FROM <http://www.w3.org/ns/auth/acl> 
+WHERE 
+  {
+    ?s a ?o
+  } ;
+]]></programlisting>
+                </listitem>
+              </orderedlist>
+            </listitem>
+            <listitem>Verification: Access the following url: <emphasis>http://<cname>/describe/?uri=http://www.w3.org/ns/auth/acl></emphasis>
+            </listitem>
+          </orderedlist>      	
+          <tip><title>See Also:</title>
+            <para><link linkend="rdfsparul">SPARUL -- an Update Language For RDF Graphs</link></para>
+            <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSponger">Virtuoso Sponger</ulink><link linkend="rdfsparul"></link></para>            
+          </tip>  	
+        </sect4>                 	  
+      </sect3>           
+    </sect2>           
+    <sect2 id="ifsparqlbi">
+      <title>How can I use the SPARQL IF operator for SPARQL-BI endpoint?</title>                 	
+      <para>Assume a SPARQL query is to be executed against the Virtuoso DBpedia SPARQL endpoint 
+      	(<ulink url="http://dbpedia.org/sparql">http://dbpedia.org/sparql</ulink>) to retrieve the 
+      	decimal longitude of the "NJ Devils' hometown" with cardinal direction, which determines 
+      	whether the decimal is positive (in the case of East) or negative (in the case of West).</para>
+      <para>Virtuoso supports SPARQL-BI, an extended SPARQL 1.0 implementation from before SPARQL 1.1 
+      	was ratified, thus the "IF" operator is not currently supported, but an equivalent 
+      	<link linkend="fn_either"><function>bif:either</function></link> built-in SQL function does 
+      	exist enabling an equivalent query to be executed:</para>
+<programlisting><![CDATA[
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX dbo: <http://dbpedia.org/ontology/>
+PREFIX dbp: <http://dbpedia.org/property/>
+SELECT ?team ( (bif:either( ?ew = 'W', -1, 1)) * (?d + (((?m * 60) + ?s) / 3600.0)) as ?v)
+  { 
+    ?team a dbo:HockeyTeam . ?team rdfs:label 'New Jersey Devils'@en . 
+    ?team dbp:city ?cityname . ?city rdfs:label ?cityname . 
+    ?city dbp:longd ?d; dbp:longm ?m; dbp:longs ?s; dbp:longew ?ew . 
+  }  	
+]]></programlisting>      
+      <figure id="spbi1" float="1">
+        <title>SPARQL IF operator for SPARQL-BI endpoint</title>
+        <graphic fileref="ui/spbi1.png"/>
+      </figure>
+      <tip><title>See Also:</title>
+        <para><link linkend="rdfsparqlimplementatioptragmas">Supported SPARQL-BI "define" pragmas</link></para>
+        <para><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSArticleBISPARQL2">SPARQL-BI</ulink><link linkend="rdfsparul"></link></para>            
+      </tip>      
+    </sect2>  
+    <sect2 id="chpntset">
+      <title>How can I handle checkpoint condition?</title>
+      <para>In general, to control checkpoint in order to bypass client timeouts during long checkpoints when inserting triples into the Virtuoso server, one must disable automatic checkpoint by:</para>
+<programlisting><![CDATA[
+SQL> checkpoint_interval (0);	
+]]></programlisting>      
+      <para>and also to make sure the AutoCheckpointLogSize is off. Then can be performed checkpoint whenever the client wants using the 'checkpoint' command.</para>
+      <para>However the need of cache check is not needed unless instance shows regular errors. By default the cache check is disabled.</para>
+      <para>Virtuoso offers a new option in the Virtuoso ini file to enable the check of page maps: <emphasis>PageMapCheck</emphasis>, 1/0 default 0: </para>
+<programlisting><![CDATA[
+-- Virtuoso.ini
+
+...
+[Parameters]
+...
+PageMapCheck  = 0
+...	
+]]></programlisting>      
+      <para>Also customer can add <emphasis>CheckpointSyncMode = 0</emphasis> in order to disable sync during checkpoint to speed the operations.</para>
+    </sect2>    
+    <sect2 id="inccntnegt">
+      <title>How can I incorporate Content Negotiation into RDF bulk loaders?</title>       
+      <para>The examples from below demonstrate how to incorporate Content Negotiation into RDF bulk loaders:</para>
+      <itemizedlist mark="bullet">
+        <listitem>Using the <link linkend="fn_rdf_load_rdfxml"><function>DB.DBA.RDF_LOAD_RDFXML</function></link> function:
+<programlisting><![CDATA[
+DB.DBA.RDF_LOAD_RDFXML (http_get ('http://purl.org/ontology/mo/', null, 'GET', 'Accept: application/rdf+xml', null, null, 3), 'http://purl.org/ontology/mo/', 'http://purl.org/ontology/mo/') .	
+]]></programlisting>
+        </listitem>
+        <listitem>Using the <link linkend="fn_ttlp"><function>DB.DBA.TTLP</function></link> function: The call to http client should be modified to ask for appropriate content type as for ex: 
+<programlisting><![CDATA[
+DB.DBA.TTLP (http_get ('http://purl.org/ontology/mo/', null, 'GET', 'Accept: text/n3', null, null, 3), 'http://purl.org/ontology/mo/', 'http://purl.org/ontology/mo/'), '...', '...');
+]]></programlisting>        	
+        </listitem>
+      </itemizedlist>
+    </sect2>      
+    <sect2 id="linkeddata3simplesteps">    
+       <title>Virtuoso Linked Data Deployment In 3 Simple Steps?</title>	    
+       <para>Injecting Linked Data into the Web has been a major pain point for those who seek personal, service, or organization-specific variants of DBpedia. Basically, the sequence goes something like this:</para>
+       <orderedlist>
+         <listitem>You encounter DBpedia or the LOD Cloud Pictorial.</listitem>
+         <listitem>You look around (typically following your nose from link to link).</listitem>
+         <listitem>You attempt to publish your own stuff.</listitem>
+         <listitem>You get stuck.</listitem>         
+       </orderedlist>       
+       <para>The problems typically take the following form:</para>
+       <orderedlist>
+         <listitem>Functionality confusion about the complementary Name and Address functionality of a single URI abstraction.</listitem>
+         <listitem>Terminology confusion due to conflation and over-loading of terms such as Resource, URL, Representation, Document, etc.</listitem>
+         <listitem>Inability to find robust tools with which to generate Linked Data from existing data sources such as relational databases, CSV files, XML, Web Services, etc.</listitem>
+       </orderedlist>              
+       <para>To start addressing these problems, here is a simple guide for generating and publishing Linked Data using Virtuoso.</para>
+       <sect3 id="linkeddata3simplesteps1">  
+       	 <title>Step 1 - RDF Data Generation</title>    
+         <para>Existing RDF data can be added to the Virtuoso RDF Quad Store via a variety of built-in data loader utilities.</para>
+         <para>Many options allow you to easily and quickly generate RDF data from other data sources:</para>       	    
+         <itemizedlist mark="bullet">
+           <listitem>Install the Sponger Bookmarklet for the URIBurner service. Bind this to your own SPARQL-compliant backend RDF database (in this scenario, your local Virtuoso instance), and then perform Network Resource Fetch of some HTTP-accessible resources.</listitem>
+           <listitem>Convert relational DBMS data to RDF using the Virtuoso Linked Data Views Wizard.</listitem>
+           <listitem>Starting with CSV files, you can:
+             <itemizedlist mark="bullet">
+               <listitem>Place them at an HTTP-accessible location, and use the Virtuoso Sponger to convert them to RDF or;</listitem>
+               <listitem>Use the CVS import feature to import their content into Virtuoso's relational 
+               	data engine; then use the built-in Linked Data Views Wizard as with other RDBMS data.</listitem>
+             </itemizedlist>           	
+           </listitem>
+           <listitem>Starting from XML files, you can:
+             <itemizedlist mark="bullet">
+               <listitem>Use Virtuoso's inbuilt XSLT-Processor for manual XML to RDF/XML transformation or;</listitem>
+               <listitem>Leverage the Sponger Cartridge for GRDDL, if there is a transformation service associated with your XML data source, or;</listitem>
+               <listitem>Let the Sponger analyze the XML data source and make a best-effort transformation to RDF.</listitem>               
+             </itemizedlist>           	
+           </listitem>                      
+         </itemizedlist>         
+       </sect3>       	
+       <sect3 id="linkeddata3simplesteps2">   
+       	 <title>Step 2 - Linked Data Deployment</title>           	     
+         <para>Install the Faceted Browser VAD package (fct_dav.vad) which delivers the following:</para>       	 
+         <orderedlist>
+           <listitem>Faceted Browser Engine UI</listitem>
+           <listitem>Dynamic Hypermedia Resource Generator:
+             <itemizedlist mark="bullet">
+               <listitem>delivers descriptor resources for every entity (data object) in the Native or Virtual Quad Stores</listitem>
+               <listitem>supports a broad array of output formats, including HTML+RDFa, RDF/XML, N3/Turtle, NTriples, RDF-JSON, OData+Atom, and OData+JSON.</listitem>
+             </itemizedlist>           	
+           </listitem>
+         </orderedlist>         
+       </sect3>       	       
+       <sect3 id="linkeddata3simplesteps3">        
+       	 <title>Step 3 - Linked Data Consumption & Exploitation</title>           	
+         <para>Three simple steps allow you, your enterprise, and your customers to consume and exploit your newly deployed Linked Data --</para>
+           <orderedlist>
+             <listitem>Load a page like this in your browser: http://<cname>[:<port>]/describe/?uri=<entity-uri> 
+               <itemizedlist mark="bullet">
+                 <listitem><cname>[:<port>] gets replaced by the host and port of your Virtuoso instance </listitem>
+                 <listitem><entity-uri> gets replaced by the URI you want to see described -- for instance, the URI of one of the resources you let the Sponger handle.</listitem>
+               </itemizedlist>             	
+             </listitem>
+             <listitem>Follow the links presented in the descriptor page.</listitem>
+             <listitem>If you ever see a blank page with a hyperlink subject name in the About: section at the top of the page, simply add the parameter "&sp=1" to the URL in the browser's Address box, and hit [ENTER]. This will result in an "on the fly" resource retrieval, transformation, and descriptor page generation.</listitem>
+             <listitem>Use the navigator controls to page up and down the data associated with the "in scope" resource descriptor.</listitem>             
+           </orderedlist>         
+       </sect3>       	       
+    </sect2>          	
+    <sect2 id="difcrdrdelgr">
+      <title>What are the differences between create, drop, clear and delete Graph?</title>
+      <para>In Virtuoso it does not matter whether <emphasis>CREATE GRAPH</emphasis> and 
+      <emphasis>DROP GRAPH</emphasis> are called or not. Their purpose is to provide compatibility with 
+      the original SPARUL that was designed for Jena. Some Jena triple stores require explicit creation 
+      of each graph (like CREATE TABLE in SQL), they report errors if one tries to create a graph twice 
+      and so on.</para>
+      <para>For Virtuoso, a new graph is not an important system event, it has single quad store shared 
+      	by all graphs. When a graph is made by <emphasis>CREATE GRAPH</emphasis>, its name is placed in 
+      	an auxiliary table that is used solely to signal appropriate errors on CREATE graph that is 
+      	CREATE-d already or on DROP of a missing graph; this table is not used in any way in SPARQL or 
+      	other subsystems. In a perfect world, smart development tools will query that table to give 
+      	hints to a programmer regarding available graphs, but the reality is not so perfect.</para>
+      <para>What's more important is a difference between 
+      	<emphasis>DELETE FROM g { ?s ?p ?o } FROM g WHERE { ?s ?p ?o }</emphasis> and 
+      	<emphasis>CLEAR GRAPH g</emphasis>, as both will delete all triples from the specified graph <g> with 
+      	equal speed, but <emphasis>CLEAR GRAPH</emphasis> will also delete free-text index data about 
+      	occurrences of literals in this specific graph. So <emphasis>CLEAR GRAPH</emphasis> will make 
+      	the database slightly more compact and the text search slightly faster. (Naturally, 
+      	<emphasis>DROP GRAPH</emphasis> makes <emphasis>CLEAR GRAPH</emphasis> inside, not just 
+      	<emphasis>DELETE FROM ...</emphasis> )</para>      
+     <tip><title>See Also:</title>
+       <para><link linkend="rdfinsertmethods">RDF Insert Methods in Virtuoso</link></para>
+     </tip>    
+    </sect2>          	      
+    <sect2 id="srchprd">  
+      <title>How can I perform search for predicate values?</title>	  
+      <para><emphasis>What?</emphasis></para>
+      <para>Creation of a stored procedure that enables users to find properties based on their string based token patterns.</para>
+      <para><emphasis>Why?</emphasis></para>
+      <para>When working with datasets from disparate datasources in a common named graph, there are times when you seek to scope sparql or spasql queries to specific property IRI/URI patterns without embarking upon inefficient regex heuristics.</para>      
+      <para><emphasis>What?</emphasis></para>
+      <para>Make a stored procedure for querying against the main quad store table (rdf_quad). Surface the procedure as a magic predicate using "bif:" prefix. To find all the properties whose predicates start with "http://www.openlinksw.com/", a Virtuoso/PL procedure can be used as listed below:</para>
+<programlisting><![CDATA[
+SQL> create procedure PREDICATES_OF_IRI_PATH ( 
+  in path varchar, 
+  in dump_iri_ids integer := 0)
+{
+  declare PRED_IRI varchar;
+  declare PRED_IRI_ID IRI_ID;
+  declare path_head_len integer;
+  
+  if (dump_iri_ids)
+    result_names (PRED_IRI_ID);
+  else
+    result_names (PRED_IRI);
+    
+  for ( SELECT RP_NAME, RP_ID 
+        FROM RDF_PREFIX
+        WHERE (RP_NAME >= path) AND (RP_NAME < path || chr(255)) ) do
+    {
+      declare fourbytes varchar;
+      fourbytes := '----';
+      fourbytes[0] := bit_shift (RP_ID, -24);
+      fourbytes[1] := bit_and (bit_shift (RP_ID, -16), 255);
+      fourbytes[2] := bit_and (bit_shift (RP_ID, -8), 255);
+      fourbytes[3] := bit_and (RP_ID, 255);
+      
+      for ( SELECT RI_NAME, RI_ID from RDF_IRI
+            WHERE (RI_NAME >= fourbytes) AND (RI_NAME < fourbytes || chr(255)) ) do
+        {
+          if (exists (SELECT TOP 1 1 FROM RDF_QUAD WHERE P=RI_ID))
+            result (case when (dump_iri_ids) then RI_ID else RP_NAME || subseq (RI_NAME, 4) end);
+        }
+    }
+    
+  for ( path_head_len := length (path)-1; path_head_len >= 0; path_head_len := path_head_len - 1)
+    {
+      for ( SELECT RP_NAME, RP_ID from RDF_PREFIX
+            WHERE RP_NAME = subseq (path, 0, path_head_len) ) do
+        {
+          declare fourbytes varchar;
+          fourbytes := '----';
+          fourbytes[0] := bit_shift (RP_ID, -24);
+          fourbytes[1] := bit_and (bit_shift (RP_ID, -16), 255);
+          fourbytes[2] := bit_and (bit_shift (RP_ID, -8), 255);
+          fourbytes[3] := bit_and (RP_ID, 255);
+          
+          for ( SELECT RI_NAME, RI_ID from RDF_IRI
+                WHERE (RI_NAME >= fourbytes || subseq (path, path_head_len))
+                AND (RI_NAME < fourbytes || subseq (path, path_head_len) || chr(255)) ) do
+            {
+              if (exists (SELECT TOP 1 1 FROM RDF_QUAD WHERE P=RI_ID))
+                result (case when (dump_iri_ids) then RI_ID else RP_NAME || subseq (RI_NAME, 4) end);
+            }
+        }
+    }
+}
+;
+
+
+Done. -- 16 msec.	
+]]></programlisting>      
+      <para><emphasis>Example Usage</emphasis></para>
+      <orderedlist>
+        <listitem>Execute:
+<programlisting><![CDATA[
+set echo on;	
+]]></programlisting>        	
+        </listitem>
+        <listitem>Collect all predicates that start with: 
+<programlisting><![CDATA[
+-- http://www.openlinksw.com/
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/', 1);
+VARCHAR
+_______________________________________________________________________________
+
+#i351
+#i159
+#i10
+#i8
+...
+
+-- http://www.openlinksw.com/schemas/virtrdf
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/schemas/virtrdf', 1);
+PRED_IRI_ID
+VARCHAR
+_______________________________________________________________________________
+
+#i159
+#i10
+#i8
+#i6
+#i160
+#i269
+#i278
+#i275
+
+
+-- http://www.openlinksw.com/schemas/virtrdf#
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/schemas/virtrdf#',1);
+PRED_IRI_ID
+VARCHAR
+_______________________________________________________________________________
+
+#i159
+#i10
+#i8
+#i6
+#i160
+#i269
+#i278
+...
+
+-- http://www.openlinksw.com/schemas/virtrdf#i
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/schemas/virtrdf#i',1);
+PRED_IRI_ID
+VARCHAR
+_______________________________________________________________________________
+
+#i159
+#i10
+#i8
+
+-- other
+SQL>PREDICATES_OF_IRI_PATH ('no://such :)', 1);
+0 Rows. -- 0 msec.
+	
+]]></programlisting>        	
+        </listitem>
+        <listitem>Show all predicates that start with: 
+<programlisting><![CDATA[
+-- http://www.openlinksw.com/
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/');
+PRED_IRI
+VARCHAR
+_______________________________________________________________________________
+
+http://www.openlinksw.com/schemas/DAV#ownerUser
+http://www.openlinksw.com/schemas/virtrdf#inheritFrom
+http://www.openlinksw.com/schemas/virtrdf#isSpecialPredicate
+http://www.openlinksw.com/schemas/virtrdf#item
+http://www.openlinksw.com/schemas/virtrdf#loadAs
+http://www.openlinksw.com/schemas/virtrdf#noInherit
+http://www.openlinksw.com/schemas/virtrdf#qmGraphMap
+http://www.openlinksw.com/schemas/virtrdf#qmMatchingFlags
+http://www.openlinksw.com/schemas/virtrdf#qmObjectMap
+http://www.openlinksw.com/schemas/virtrdf#qmPredicateMap
+http://www.openlinksw.com/schemas/virtrdf#qmSubjectMap
+...
+
+-- http://www.openlinksw.com/schemas/virtrdf
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/schemas/virtrdf');
+PRED_IRI
+VARCHAR
+_______________________________________________________________________________
+
+http://www.openlinksw.com/schemas/virtrdf#inheritFrom
+http://www.openlinksw.com/schemas/virtrdf#isSpecialPredicate
+http://www.openlinksw.com/schemas/virtrdf#item
+http://www.openlinksw.com/schemas/virtrdf#loadAs
+http://www.openlinksw.com/schemas/virtrdf#noInherit
+http://www.openlinksw.com/schemas/virtrdf#qmGraphMap
+http://www.openlinksw.com/schemas/virtrdf#qmMatchingFlags
+http://www.openlinksw.com/schemas/virtrdf#qmObjectMap
+http://www.openlinksw.com/schemas/virtrdf#qmPredicateMap
+http://www.openlinksw.com/schemas/virtrdf#qmSubjectMap
+http://www.openlinksw.com/schemas/virtrdf#qmTableName
+...
+
+-- http://www.openlinksw.com/schemas/virtrdf#
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/schemas/virtrdf#');
+PRED_IRI
+VARCHAR
+_______________________________________________________________________________
+
+http://www.openlinksw.com/schemas/virtrdf#inheritFrom
+http://www.openlinksw.com/schemas/virtrdf#isSpecialPredicate
+http://www.openlinksw.com/schemas/virtrdf#item
+http://www.openlinksw.com/schemas/virtrdf#loadAs
+http://www.openlinksw.com/schemas/virtrdf#noInherit
+http://www.openlinksw.com/schemas/virtrdf#qmGraphMap
+http://www.openlinksw.com/schemas/virtrdf#qmMatchingFlags
+http://www.openlinksw.com/schemas/virtrdf#qmObjectMap
+http://www.openlinksw.com/schemas/virtrdf#qmPredicateMap
+http://www.openlinksw.com/schemas/virtrdf#qmSubjectMap
+http://www.openlinksw.com/schemas/virtrdf#qmTableName
+http://www.openlinksw.com/schemas/virtrdf#qmf01blankOfShortTmpl
+http://www.openlinksw.com/schemas/virtrdf#qmf01uriOfShortTmpl
+http://www.openlinksw.com/schemas/virtrdf#qmfBoolOfShortTmpl
+http://www.openlinksw.com/schemas/virtrdf#qmfBoolTmpl
+...
+
+-- http://www.openlinksw.com/schemas/virtrdf#i
+SQL>PREDICATES_OF_IRI_PATH ('http://www.openlinksw.com/schemas/virtrdf#i');
+PRED_IRI
+VARCHAR
+_______________________________________________________________________________
+
+http://www.openlinksw.com/schemas/virtrdf#inheritFrom
+http://www.openlinksw.com/schemas/virtrdf#isSpecialPredicate
+http://www.openlinksw.com/schemas/virtrdf#item
+
+3 Rows. -- 15 msec.
+
+-- other
+SQL>PREDICATES_OF_IRI_PATH ('no://such :)');
+PRED_IRI
+VARCHAR
+_______________________________________________________________________________
+
+
+0 Rows. -- 15 msec.
+]]></programlisting>        	
+        </listitem>
+      </orderedlist>      
+      <para>If you want to use the procedure's output inside SPARQL queries, it can be wrapped by a procedure view and it in turn can be used in an Linked Data View but it is redundant for most applications.</para>
+      <para>For typical "almost static" data, it is more practical to write a procedure that will store all found predicates in some dedicated "dictionary" graph and then use the graph as usual.</para>
+    </sect2>          	         	
+    <sect2 id="constrinserst">  
+      <title>How can I use INSERT via CONSTRUCT Statements?</title>	  
+      <para>You can write an ordinary CONSTRUCT statement, ensure that it generates the triples intended to be added, and then replace the leading CONSTRUCT keyword with the INSERT INTO phrase.</para>
+      <para><emphasis>Example:</emphasis></para>
+      <orderedlist>
+        <listitem>Assume new triples need to be added for the equivalentClass:
+<programlisting><![CDATA[
+CONSTRUCT 
+  {  
+    ?s <http://www.w3.org/2002/07/owl#equivalentClass> `iri (bif:replace(?o,'http://schema.rdfs.org/', 'http://schema.org/'))`
+   } 
+FROM <http://www.openlinksw.com/schemas/rdfs> 
+WHERE 
+  { 
+    ?s <http://www.w3.org/2002/07/owl#equivalentClass> ?o
+  };	
+]]></programlisting>        	
+        </listitem>
+        <listitem>Execute the CONSTRUCT query from the htp://cname/sparql SPARQL endpoint.</listitem>        
+        <listitem>View the generated triples to ensure they are correct.</listitem>
+        <listitem>Replace CONSTRUCT with INSERT INTO:
+<programlisting><![CDATA[
+SPARQL INSERT INTO <http://www.openlinksw.com/schemas/rdfs>  
+  {  
+    ?s <http://www.w3.org/2002/07/owl#equivalentClass> `iri (bif:replace(?o,'http://schema.rdfs.org/', 'http://schema.org/'))`
+   } 
+FROM <http://www.openlinksw.com/schemas/rdfs> 
+WHERE 
+  { 
+    ?s <http://www.w3.org/2002/07/owl#equivalentClass> ?o
+  } ;	
+]]></programlisting>        	
+        </listitem>
+      </orderedlist>
+    </sect2>          	         	      
+    <sect2 id="cleargraphrelemtgr">  
+      <title>How to clear graphs which are related to empty graphs?</title>	      
+      <para>The following example demonstrates how to remove graphs which are related to empty graphs:</para>
+<programlisting><![CDATA[     
+PREFIX nrl:<http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#>
+SELECT ( bif:exec(bif:sprintf("SPARQL CLEAR GRAPH<%s>", str(?mg))))
+WHERE 
+  {
+    ?mg nrl:coreGraphMetadataFor ?g .
+    FILTER(?g in ( <urn:nepomuk:local:8a9e692a> )) .
+    FILTER ( !bif:exists((SELECT (1) WHERE { GRAPH ?g { ?s ?p ?o . } . })) ) .
+  }	 
+]]></programlisting>     
+    </sect2>   
+    <sect2 id="subqrbl">  
+      <title>How can I use sub-queries to enable literal values based joins?</title>	            	         	            
+      <sect3 id="subqrblwhat">  
+        <title>What?</title>	   
+        <para>Use of subqueries to enable literal values based joins.</para>         	         	            
+      </sect3>    
+      <sect3 id="subqrblwhy">  
+        <title>Why?</title>	            	         	            
+        <para>Sophisticated access to literal values via subqueries provides powerful mechanism for enhancing sparql graph patterns via dynamic literal value generation.</para>
+      </sect3>
+      <sect3 id="subqrblhow">  
+        <title>How?</title>	            	         	            
+        <para>Use select list variables from subqueries to produce literal object values in sparql graph patterns.</para>        
+      <sect4 id="subqrblhowex">  
+        <title>Example</title>	            	         	            
+        <para>Assume in the following query, where should be used a sub-query to replace ?app:</para>   
+<programlisting><![CDATA[
+SELECT DISTINCT ?r 
+WHERE 
+  {
+    graph ?g 
+      {
+        ?r nie:url ?url .
+      }  .
+      ?g nao:maintainedBy ?app .
+      ?app nao:identifier "nepomukindexer" .
+  }	
+]]></programlisting>             
+        <para>If it is not sure that ?app is the only, for e.g., the triple ?app nao:identifier "nepomukindexer" can appear in more than one graph, then the query should be changed to:</para>   
+<programlisting><![CDATA[
+SELECT DISTINCT ?r 
+WHERE 
+  {
+    graph ?g 
+      {
+        ?r nie:url ?url .
+      }  .
+      ?g nao:maintainedBy ?app .
+      FILTER (?app = (SELECT ?a WHERE { ?a nao:identifier "nepomukindexer" }))
+}	
+]]></programlisting>        
+        <para>or even shorter:</para>   
+<programlisting><![CDATA[
+SELECT DISTINCT ?r 
+WHERE 
+  {
+   graph ?g 
+     {
+       ?r nie:url ?url .
+     }  .
+   ?g nao:maintainedBy `(SELECT ?a WHERE { ?a nao:identifier "nepomukindexer" })` .
+ }	
+]]></programlisting>        
+      </sect4>                   
+      </sect3>
+    </sect2>  
+    <sect2 id="sparqlpreforder">  
+      <title>How can I execute query with labels preference order?</title>	      
+      <para>The way to prefer one label to the other can be done as follows:</para>
+      <itemizedlist mark="bullet">
+        <listitem>Have a procedure which returns preference order:
+<programlisting><![CDATA[
+create procedure lbl_order (in p any)
+{    
+  declare r int;
+  r := vector (
+  'http://www.w3.org/2000/01/rdf-schema#label',
+  'http://xmlns.com/foaf/0.1/name',
+  'http://purl.org/dc/elements/1.1/title',
+  'http://purl.org/dc/terms/title',
+  'http://xmlns.com/foaf/0.1/nick',
+  'http://usefulinc.com/ns/doap#name',
+  'http://rdf.data-vocabulary.org/name',
+  'http://www.w3.org/2002/12/cal/ical#summary',
+  'http://aims.fao.org/aos/geopolitical.owl#nameListEN',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.crunchbase.com/source_description',
+  'http://dbpedia.org/property/name',
+  'http://www.geonames.org/ontology#name',
+  'http://purl.org/ontology/bibo/shortTitle',
+  'http://www.w3.org/1999/02/22-rdf-syntax-ns#value',
+  'http://xmlns.com/foaf/0.1/accountName',
+  'http://www.w3.org/2004/02/skos/core#prefLabel',
+  'http://rdf.freebase.com/ns/type.object.name',
+  'http://s.opencalais.com/1/pred/name',
+  'http://www.w3.org/2008/05/skos#prefLabel',
+  'http://www.w3.org/2002/12/cal/icaltzd#summary',
+  'http://rdf.data-vocabulary.org/name',
+  'http://rdf.freebase.com/ns/common.topic.alias',
+  'http://opengraphprotocol.org/schema/title',
+  'http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema.rdf#Name',
+  'http://poolparty.punkt.at/demozone/ont#title'
+   );
+  if (isiri_id (p))
+    p := id_to_iri (p);   
+  r := position (p, r);
+  if (r = 0)
+    return 100;
+  return r;
+}
+;	
+]]></programlisting>        	
+        </listitem>
+        <listitem>Execute the following query:
+<programlisting><![CDATA[
+SPARQL 
+DEFINE input:inference "facets" 
+SELECT ?o 
+WHERE 
+  { 
+    <http://uriburner.com/about/id/entity/http/www.linkedin.com/in/kidehen#CV_mfrTl4s6Jy> virtrdf:label ?o ; 
+       ?p ?o . 
+  } 
+ORDER BY (sql:lbl_order (?p));
+]]></programlisting>        	
+        </listitem>
+        <listitem>Or execute the following query using sql:
+<programlisting><![CDATA[
+
+SELECT __ro2sq (O), lbl_order (P) 
+FROM RDF_QUAD table option (with ''facets'') 
+WHERE G = __i2id (?) 
+  AND S = __i2id (?) 
+  AND P = __i2id (''http://www.openlinksw.com/schemas/virtrdf#label'', 0) 
+ORDER BY 2
+]]></programlisting>        	
+        </listitem>
+      </itemizedlist>      
+    </sect2>  
+    <sect2 id="getobjdtype">  
+      <title>How can I get object datatype?</title>	      
+      <para>To get object datatype should be used the internal Virtuoso/PL function 
+      	<link linkend="fn_rdf_datatype_of_obj"><function>DB.DBA.RDF_DATATYPE_OF_OBJ</function></link>, visible in SPARQL as sql:RDF_DATATYPE_OF_OBJ.
+      </para>           
+      <para>Suppose the following scenario:</para>	
+<programlisting><![CDATA[
+# Explicit typecast (insert) 
+SQL> sparql insert into <test_datatype> { <a> <string> "string 1"^^xsd:string . };
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Insert into <test_datatype>, 1 (or less) triples -- done
+
+1 Rows. -- 94 msec.
+
+
+#Not explicit typecast (insert)
+SQL> sparql insert into <test_datatype> { <a> <string> "string 2". };
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Insert into <test_datatype>, 1 (or less) triples -- done
+
+1 Rows. -- 16 msec.
+
+SQL> SPARQL 
+SELECT ?o (iri(sql:RDF_DATATYPE_OF_OBJ(?o, 'untyped!'))) 
+FROM <test_datatype> { <a> <string> ?o} ;
+o                       callret-1
+VARCHAR                 VARCHAR
+_______________________________________________________________________________
+
+string 1                http://www.w3.org/2001/XMLSchema#string 
+string 2                untyped!
+
+2 Rows. -- 16 msec.
+SQL>	
+]]></programlisting>      
+    </sect2>        
+    <sect2 id="howbackuprestoreind">  
+        <title>How Can I Backup and Restore individual table(s) and individual index(s)?</title>	   
+        <para>See more details <link linkend="procindexrecov">here</link>.</para>
+    </sect2> 
+    <sect2 id="bifcontainsoptions">  
+      <title>What bif:contains free-text options can I use?</title>	   
+      <para>Virtuoso supports the following free-text options for bif:contains:</para>
+      <orderedlist>
+        <listitem><emphasis>OFFBAND</emphasis>: See description for this free-text option in 
+        <link linkend="offbanddata">this section</link>.           
+          <itemizedlist mark="bullet">
+            <listitem>Note: it is useful only if data comers via an Linked Data View and the source 
+            	relational table uses this trick;</listitem>
+          </itemizedlist>          
+        </listitem>
+        <listitem><emphasis>SCORE</emphasis>: This free-text option is calculated as described in 
+        <link linkend="hitscores">this section</link>:
+<programlisting><![CDATA[
+SQL>SPARQL 
+SELECT ?s1 as ?c1, ?sc, ?rank 
+WHERE 
+  {
+    {
+      { 
+        SELECT ?s1, (?sc * 3e-1) as ?sc, ?o1, 
+          (sql:rnk_scale (<LONG::IRI_RANK> (?s1))) as ?rank  
+        WHERE 
+          { 
+            ?s1 ?s1textp ?o1 . 
+            ?o1 bif:contains  '"CNET"'  option (score ?sc)  . 
+          } 
+        ORDER BY DESC (?sc * 3e-1 + sql:rnk_scale (<LONG::IRI_RANK> (?s1)))  
+        LIMIT 20  
+        OFFSET 0 
+      }
+    }
+  };
+
+c1                                              sc      rank
+_________________________________________________________________________
+http://www.mixx.com/stories/45003360/justi...   3 	    5.881291583872891e-14
+http://www.mixx.com/stories/45099313/bing_...   2.7     5.881291583872891e-14
+http://dbpedia.org/resource/CBS_Interactive 	  1.5 	  5.881291583872891e-14
+http://dbpedia.org/resource/CBS_Interactive 	  1.5 	  5.881291583872891e-14
+
+
+4 Rows. -- 1 msec.
+]]></programlisting>
+      </listitem>
+      <listitem><emphasis>SCORE_LIMIT</emphasis>: This free-text option works as it is in plain 
+      SQL free-text. <link linkend="queryingftcols">See more details</link> :
+<programlisting><![CDATA[
+SQL> SPARQL 
+SELECT ?s ?sc 
+WHERE 
+  { 
+    ?s ?p ?o . 
+    ?o bif:contains "tree" OPTION (score ?sc , score_limit 20)
+  };
+  
+s                                                                      sc
+VARCHAR                                                                INTEGER
+________________________________________________________________________________   
+
+                                                                      
+http://www.openlinksw.com/virtrdf-data-formats#default                 24
+http://www.openlinksw.com/virtrdf-data-formats#default                 24
+http://www.openlinksw.com/virtrdf-data-formats#sql-longvarbinary       21
+http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt          20
+http://www.openlinksw.com/virtrdf-data-formats#sql-nvarchar-dt         20
+http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-lang        20
+http://www.openlinksw.com/virtrdf-data-formats#sql-nvarchar-lang       20
+
+7 Rows. -- 2 msec.
+]]></programlisting>          
+        </listitem>
+      </orderedlist>
+    </sect2>              
+    <sect2 id="sparqlendpointprotection">  
+      <title>What SPARQL Endpoint Protection Methods can I use?</title>	   
+      <para>Virtuoso supports the following SPARQL Endpoint protection methods:</para>
+      <orderedlist>
+        <listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtAuthPolicyFOAFSSL">Secure SPARQL Endpoint Guide using WebID Protocol</ulink></listitem>
+        <listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtOAuthSPARQL">Secure SPARQL Endpoint Guide via OAuth</ulink></listitem>
+        <listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSPARQLProtectSQLDigestAuthentication">Secure SPARQL Endpoint Guide via SQL Accounts -- usage path digest authentication</ulink></listitem>
+      </orderedlist>
+    </sect2>   
+    <sect2 id="sparqlassignrole">    
+    	<title>How do I assign SPARQL role to SQL user?</title>	   
+    	<para>This section a sample scenario how to assign SPARQL ( for ex. SPARQL_SELECT ) role to 
+    		Virtuoso SQL user:</para>
+      <orderedlist>
+      	<listitem>Go to <ulink url="http://cname/conductor">http://cname/conductor</ulink>.</listitem>
+      	<listitem>Enter dba credentials.</listitem> 
+        <listitem>Go to System Admin -> User Accounts: 
+          <figure id="role1" float="1">
+            <title>Assign SPARQL Role to SQL User</title>
+            <graphic fileref="ui/ag1.png"/>
+          </figure>
+        </listitem>
+        <listitem>Click "Edit" for a given user from the very last right column:
+          <figure id="role2" float="1">
+            <title>Assign SPARQL Role to SQL User</title>
+            <graphic fileref="ui/ag2.png"/>
+          </figure>
+        </listitem>
+        <listitem>From "Accounts Roles" drop-down list select a SPARQL Role, for ex. 
+        	<emphasis>SPARQL_SELECT</emphasis> and click the ">>" button:
+          <figure id="role1" float="1">
+            <title>Assign SPARQL Role to SQL User</title>
+            <graphic fileref="ui/ag3.png"/>
+          </figure>
+        </listitem>
+        <listitem>Click "Save". </listitem>
+      </orderedlist>    	                   
+    </sect2>   
+  </sect1>    
+</chapter>
diff --git a/docsrc/xmlsource/perfdiag.xml b/docsrc/xmlsource/perfdiag.xml
index 07b1a2f..72ef444 100644
--- a/docsrc/xmlsource/perfdiag.xml
+++ b/docsrc/xmlsource/perfdiag.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -85,7 +85,7 @@ the resident size is normally less than the buffer pool's size.
 To see the count of major page faults. i.e. ones that read the disk, do:
     </para>
 <programlisting><![CDATA[
-select getrusage ()[]4];
+getrusage ()[]4];
 ]]></programlisting>
     <para>through interactive SQL. The result is the count of major faults since
 starting the process. The count should not vary between samples, at least not more
diff --git a/docsrc/xmlsource/perl.xml b/docsrc/xmlsource/perl.xml
index 85588b4..5af3fa4 100644
--- a/docsrc/xmlsource/perl.xml
+++ b/docsrc/xmlsource/perl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/php.xml b/docsrc/xmlsource/php.xml
index fc5011e..c6dd61a 100644
--- a/docsrc/xmlsource/php.xml
+++ b/docsrc/xmlsource/php.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/pldebugger.xml b/docsrc/xmlsource/pldebugger.xml
index 3cde2fd..aee34b8 100644
--- a/docsrc/xmlsource/pldebugger.xml
+++ b/docsrc/xmlsource/pldebugger.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/plugins.xml b/docsrc/xmlsource/plugins.xml
index 59a004d..c212fa0 100644
--- a/docsrc/xmlsource/plugins.xml
+++ b/docsrc/xmlsource/plugins.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/preface.xml b/docsrc/xmlsource/preface.xml
index 11e57f2..04843ec 100644
--- a/docsrc/xmlsource/preface.xml
+++ b/docsrc/xmlsource/preface.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ptune.xml b/docsrc/xmlsource/ptune.xml
index 504797b..d6fab40 100644
--- a/docsrc/xmlsource/ptune.xml
+++ b/docsrc/xmlsource/ptune.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/python.xml b/docsrc/xmlsource/python.xml
index 9962b91..9922efc 100644
--- a/docsrc/xmlsource/python.xml
+++ b/docsrc/xmlsource/python.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/quicktours.xml b/docsrc/xmlsource/quicktours.xml
index a068510..ebbdc0f 100644
--- a/docsrc/xmlsource/quicktours.xml
+++ b/docsrc/xmlsource/quicktours.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/rdfandsparql.xml b/docsrc/xmlsource/rdfandsparql.xml
index 63b7e52..4eb5c08 100644
--- a/docsrc/xmlsource/rdfandsparql.xml
+++ b/docsrc/xmlsource/rdfandsparql.xml
@@ -17,6 +17,7 @@ This discusses storing RDF data as well as mapping existing relational data into
   <tip><title>See Also:</title>
     <itemizedlist mark="bullet">
       <listitem><link linkend="virtodbcsparql">Virtuoso ODBC RDF extensions for SPASQL</link></listitem>
+      <listitem><link linkend="sqlrefgeospatial">Geometry Data Types and Spatial Index Support</link></listitem>
     </itemizedlist>
   </tip>
 
@@ -199,7 +200,7 @@ O to the explicit SQL type in a programmatic way, should be used the following h
   <listitem>The language can be extracted as <emphasis>DB.DBA.RDF_LANGUAGE_OF_OBJ (O)</emphasis>.</listitem>
 </itemizedlist>
 
-<para>It could be helpful to be created an RDF View for a custom table with formats rdfdf:default or rdfdf:default-nullable
+<para>It could be helpful to be created an Linked Data View for a custom table with formats rdfdf:default or rdfdf:default-nullable
 for columns similar to O, and let SPARQL perform the rest.</para>
 
 <para>To track SPARQL, use the following functions:</para>
@@ -304,7 +305,10 @@ FROM .... OPTION (QUIETCAST)
 
 <sect1 id="rdfsparql"><title>SPARQL</title>
 <sect2 id="rdfsparqlimplementationextent"><title>SPARQL Implementation Details</title>
-<para>Virtuoso's RDF support includes in-built support for the SPARQL query language. It also includes a number of powerful extensions that cover path traversal and business intelligence features. In addition, there is in-built security based on Virtuoso's support for row level policy-based security, custom authentication, and named graphs.</para>
+<para>Virtuoso's RDF support includes in-built support for the SPARQL query language. 
+	It also includes a number of powerful extensions that cover path traversal and business 
+intelligence features. In addition, there is in-built security based on Virtuoso's support 
+for row level policy-based security, custom authentication, and named graphs.</para>
 <para>The current implementation does not support some SPARQL features:</para>
 <itemizedlist mark="bullet" spacing="compact">
 <listitem>Unicode characters in names are not supported.</listitem>
@@ -319,7 +323,7 @@ FROM .... OPTION (QUIETCAST)
 <listitem>Parameters can be passed to the query from outside, using <emphasis>?:variablename</emphasis> syntax.</listitem>
 <listitem>Aggregate functions are supported.</listitem>
 <listitem>Subqueries may appear where group patterns are allowed.</listitem>
-<listitem>A set of operators has been added to configure the mapping of relational data to RDF (aka RDF Views).</listitem>
+<listitem>A set of operators has been added to configure the mapping of relational data to RDF (aka Linked Data Views).</listitem>
 </itemizedlist>
 <para>The following listing shows the SPARQL grammar expressed in BNF, including all Virtuoso extensions but excluding rules for the syntax of each lexical element. 
 Rule numbers in square brackets are from W3C normative SPARQL grammar. An asterisk indicates that the rule differs from the W3C grammar due to Virtuoso extensions -
@@ -605,7 +609,8 @@ xsd:integer (in strg varchar) returns integer
 <sect2 id="rdfpredicatessparql"><title>Query Constructs</title>
   <para>Starting from Version 5.0, Virtuoso supports filtering RDF objects triples by a given predicate.</para>
   <sect3 id="rdfpredicatessparqlexamples"><title>Examples</title>
-    <para>The boolean functions bif:contains, bif:xcontains, bif:xpath_contains and bif:xquery_contains can be used for objects that come from RDF Views as well
+    <para>The boolean functions bif:contains, bif:xcontains, bif:xpath_contains and bif:xquery_contains 
+    	can be used for objects that come from Linked Data Views as well
 as for regular "physical" triples. Each of these functions takes two arguments and returns a boolean value.
 The first argument is a local variable which should also be used as an object field in
 the group pattern where the filter condition is placed.
@@ -696,6 +701,20 @@ At present this uses additional query parameters.</para>
 <listitem>Support for a <emphasis>default-graph-uri</emphasis> parameter</listitem>
 <listitem>Support for a variety of query types including CONSTRUCT and DESCRIBE</listitem>
 </itemizedlist>
+<para>Virtuoso also supports /sparql-graph-crud/ web service endpoint that
+implements the current draft of <ulink url="http://www.w3.org/TR/sparql11-http-rdf-update/">W3C SPARQL Graph Update protocol</ulink>. 
+Both /sparql /sparql-graph-crud/ endpoints use the same SPARQL user account, 
+so this user should be member of SPARQL_UPDATE group in order to modify data via Graph Update protocol.
+Note that /sparql/ endpoint has /sparql-auth/ variant that uses web authentication.
+Similarly, /sparql-graph-crud/ has /sparql-graph-crud-auth/ variant. As
+soon as user is member of SPARQL_UPDATE group, she/he can modify the stored
+data via /sparql-graph-crud-auth/ as well as via /sparql-auth/ .
+
+The /sparql-graph-crud/ endpoint is primarily for serving requests from applications, not for manual interactions via browser.
+
+See more information in our <link linkend="sparqloauthendpointauth">SPARQL Authentication</link> section.
+
+</para>
 </sect3>
 
 <sect3 id="rdfsupportedprotocolendpoint"><title>Service Endpoint</title>
@@ -710,62 +729,12 @@ automatically, using the length of query text as the criterion. If the SPARQL en
 any URL and requisite SPARQL protocol parameters, an interactive HTML page for capturing SPARQL input will
 be presented.</para>
 <sect4 id="rdfsupportedprotocolendpointuricustm"><title>Customizing SPARQL Endpoint Page</title>
-<para>The following steps describe how to change the sparql endpoint page:
-</para>
-<orderedlist>
-  <listitem>Create a patched version of the procedure named WS.WS."/!sparql/". Its source text resides in libsrc/Wi/sparql_io.sql .</listitem>
-  <listitem>Name the new version of the procedure from above with different name, for ex.: WS.WS."/!sparql_new/" </listitem>
-  <listitem>Load it in ISQL:
-<programlisting><![CDATA[
-SQL>create procedure WS.WS."/!sparql_new/" (inout path varchar, inout params any, inout lines any)
-{..
-http('			<p>TEST This query page is designed to help you test OpenLink Virtuoso
-..
-}
-;
-Done. -- 60 msec.
-SQL>
-]]></programlisting>
-</listitem>
-  <listitem>Execute:
-<programlisting><![CDATA[
-SQL>DB.DBA.VHOST_REMOVE (lpath=>'/sparql');
-]]></programlisting>
-</listitem>
-  <listitem>Execute:
-<programlisting><![CDATA[
-SQL>DB.DBA.VHOST_DEFINE (lpath=>'/sparql/', ppath => '/your-function-name/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1));
--- so for ex.:
-SQL>DB.DBA.VHOST_DEFINE (lpath=>'/sparql/', ppath => '/!sparql_new/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1));
-]]></programlisting>
-</listitem>
-  <listitem>Execute:
-<programlisting><![CDATA[
-SQL>grant execute on WS.WS."your-function" to "SPARQL";
--- so for ex.:
-SQL>grant execute on WS.WS."/!sparql_new/" to "SPARQL";
-]]></programlisting>
-   <itemizedlist mark="bullet">
-     <listitem>Note: you should use double quotes around name of "SPARQL" user and the upper case, otherwise it will be confused with keyword SPARQL.</listitem>
-   </itemizedlist>
-</listitem>
-  <listitem>Execute:
+<para>The SPARQL Endpoint Page can now be customized using a xsl stylesheet.</para>
+<para>This works by adding the following line with isql:</para>
 <programlisting><![CDATA[
-SQL>registry_set ('/your-function-name/', 'no_vsp_recompile');
--- so for ex.:
-SQL>registry_set ('/!sparql_new/', 'no_vsp_recompile');
+SQL> registry_set ('sparql_endpoint_xsl', 'http://host:port/path/isparql.xsl');
 ]]></programlisting>
-   <itemizedlist mark="bullet">
-     <listitem>Note: if this step is omitted, the HTTP server will try to find the physical path in DAV storage or a filesystem, to read and compile the content as a procedure.</listitem>
-   </itemizedlist>
-</listitem>
-  <listitem>Access the sparql endpoint page which now as result should contain your changes:
-     <figure id="spqc1" float="1">
-       <title>SPARQL Endpoint page</title>
-       <graphic fileref="ui/spqc1.png"/>
-     </figure>
-</listitem>
-</orderedlist>
+<para>where obviously host, port, path and the name isparql.xsl can be set to anything.</para>
 </sect4>
 </sect3>
 
@@ -1100,6 +1069,44 @@ Results in JSON". When a client specifies obsolete MIME type but not its standar
 variant is returned for interoperability.
 </para>
 </sect4>
+<sect4 id="viewresultspagesparqlqex"><title>View Results Page of SPARQL Query Execution</title>
+<para>To view SPARQL Endpoint Results page of SPARQL query execution should be used the parameter 
+<emphasis>query</emphasis> i.e the SPARQL Protocol URL should look like:</para> 
+<programlisting><![CDATA[
+http://cname/sparql?default-graph-uri=&query=... 
+]]></programlisting>
+<para><emphasis>Example</emphasis></para>
+<para>Suppose the following simple query:</para>
+<programlisting><![CDATA[
+SELECT * 
+WHERE 
+  {
+    ?s ?p ?o
+  }	
+LIMIT 10  
+]]></programlisting>
+<para>See <ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=SELECT+*+%0D%0AWHERE+%0D%0A++{%0D%0A++++%3Fs+%3Fp+%3Fo%0D%0A++}%09%0D%0ALIMIT+10++&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">this example link</ulink> against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URL.</para>
+</sect4>
+<sect4 id="viewresultspagesparqlqed"><title>View Editor Page of SPARQL Query </title>
+<para>To view the SPARQL Endpoint editor page of SPARQL query execution should be used the parameter 
+<emphasis>qtxt</emphasis> i.e the SPARQL Protocol URL should look like:</para>
+<programlisting><![CDATA[
+http://cname/sparql?default-graph-uri=&qtxt=... 
+]]></programlisting>
+<para><emphasis>Example</emphasis></para>
+<para>Suppose the following simple query:</para>
+<programlisting><![CDATA[
+SELECT * 
+WHERE 
+  {
+    ?s ?p ?o
+  }	
+LIMIT 10  
+]]></programlisting>
+<para>Suppose also <ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=SELECT+*+%0D%0AWHERE+%0D%0A++{%0D%0A++++%3Fs+%3Fp+%3Fo%0D%0A++}%09%0D%0ALIMIT+10++&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">this results page link</ulink> against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URL. </para>
+<para>Replace the parameter name <emphasis>query</emphasis> with <emphasis>qtxt</emphasis>.</para>
+<para><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=SELECT+*+%0D%0AWHERE+%0D%0A++{%0D%0A++++%3Fs+%3Fp+%3Fo%0D%0A++}%09%0D%0ALIMIT+10++&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">Access the new link</ulink>, which should present the SPARQL Endpoint Editor page with "Query Text" area filled in with the SPARQL Query from above.</para>
+</sect4>
 <sect4 id="rdfsupportedmimesaddofprotocol"><title>Virtuoso/PL APIs</title>
 <para>Virtuoso also provides SPARQL protocol client APIs in Virtuoso PL, so you can communicate with SPARQL
 Query Services from Virtuoso stored procedures. The APIs are as follows:
@@ -1206,11 +1213,12 @@ DB.DBA.TABLE_SET_POLICY ('DB.DBA.RDF_QUAD', 'DB.DBA.RDF_POLICY', 'S');
 where DB.DBA.WA_CNAME () is an ODS function returning the default host name.
 </para>
 <para>The effect of this policy is to restrict user 'user' to the graph http://cname/dataspace/user/private#</para>
+<sect4 id="rdfsupportedprotocolendpointurisparqlauthex"><title>SPARQL Auth Endpoint Usage Example</title>
 <para>Virtuoso reserves the path '/sparql-auth/' for a SPARQL service supporting authenticated SPARUL.
 This endpoint allows specific SQL accounts to perform SPARUL over the SPARQL protocol.
 To be allowed to login via SQL or ODBC and update physical triples, a user must be granted "SPARQL_UPDATE" privileges. To grant this role:
 </para>
-<itemizedlist>
+<orderedlist>
   <listitem>Go to the Virtuoso administration UI i.e. http://host:port/conductor</listitem>
   <listitem>Login as user dba</listitem>
   <listitem>Go to System Admin->User Accounts->Users
@@ -1220,7 +1228,7 @@ To be allowed to login via SQL or ODBC and update physical triples, a user must
     </figure>
   </listitem>
   <listitem>Click the link "Edit"</listitem>
-  <listitem>In the displayed form check the "Allow SQL/ODBC Logins" check-box.</listitem>
+  <listitem>Set "User type" to "SQL/ODBC Logins and WebDAV".</listitem>
   <listitem>Select from the list of available Account Roles "SPARQL_UPDATE" role and
 click the ">>" button so to add it to the right-hand list.</listitem>
     <figure id="rdf2" float="1">
@@ -1228,11 +1236,13 @@ click the ">>" button so to add it to the right-hand list.</listitem>
       <graphic fileref="ui/usr2.png"/>
     </figure>
   <listitem>Click the "Save" button.</listitem>
-</itemizedlist>
-<para>Note that if a table is used in an RDF view, and this table is not granted to SPARQL_SELECT permission
-(or SPARQL_UPDATE, which implicitly confers SPARQL_SELECT), then all SELECTs on a graph defined by an RDF view will return an access violation error as the user
+</orderedlist>
+<para>Note that if a table is used in an Linked Data View, and this table is not granted to SPARQL_SELECT permission
+(or SPARQL_UPDATE, which implicitly confers SPARQL_SELECT), then all SELECTs on a graph defined by an 
+Linked Data View will return an access violation error as the user
 account has no permissions to read the table. The user must have appropriate privileges on all tables included
-in an RDF View in order to be able to select on <emphasis>all</emphasis> graphs.</para>
+in an Linked Data View in order to be able to select on <emphasis>all</emphasis> graphs.</para>
+</sect4>
 <sect4 id="sparqwebservicetbl"><title>Managing a SPARQL Web Service Endpoint</title>
 <para>
 Virtuoso web service endpoints may provide different default configurations for different host names mentioned in an HTTP request.
@@ -1265,9 +1275,10 @@ Virtuoso 5.0.11 onwards added three new methods for securing SPARQL endpoints th
 <para> 
 Each of these authentication methods is associated with a purpose specific default SPARQL endpoint along the following lines:
 </para> 
-<itemizedlist mark="bullet">
+<itemizedlist>
   <listitem>http://<cname>/sparql-auth (SQL authentication)</listitem>
   <listitem>http://<cname>/sparql-oauth (OAuth)</listitem>
+  <listitem>http://<cname>/sparql-graph-crud-auth (OAuth CRUD)</listitem>
   <listitem>https://<cname>/sparql and https://<cname>/sparql-ssl (WebID Protocol)</listitem>
 </itemizedlist>
 <para>The Virtuoso Authentication Server offers a UI with options for managing:</para>
@@ -1283,132 +1294,211 @@ protocol that links a Web ID to a public key to create a global, decentralized/d
 yet secure authentication system that functions with existing browsers.</listitem>
 </itemizedlist>
 <para>Virtuoso Authentication Server can be installed by downloading and installing the
-policy_manager_dav.vad package.</para>
-<para>The Authentication UI is accessible from the URL http://cname:port/policy_manager</para>
-<para>The menu options are:</para>
-<itemizedlist mark="bullet">
-  <listitem><emphasis>Go to Application Keys</emphasis> - in order to create Consumer Key and Secret for the relevant ODS applications.</listitem>
-  <listitem><emphasis>Go to WebID Protocol ACLs</emphasis> - in order to use URIs for setup DB level controls for SELECT, UPDATE and DELETE.
-(This option requires you be logged in as user dba.)
+conductor_dav.vad package.</para>
+<para>The Authentication UI is accessible from the Conductor UI -> Linked Data -> Access Control -> SPARQL-SSL. Here is sample scenario:</para>
+<orderedlist>
+  <listitem>Download and install the <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad">conductor_dav.vad</ulink> package.</listitem>
+  <listitem><ulink url="http://ods.openlinksw.com/dataspace/dav/wiki/ODS/ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID</ulink>.</listitem>
+  <listitem>Go to http://<cname>:<port>/conductor, where <cname>:<port> are replaced by your 
+  	local server values.</listitem> 
+  <listitem>Log in as user "dba" or another user with DBA privileges.</listitem>
+  <listitem>Go to Linked Data -> Access Controls -> SPARQL-SSL:
+     <figure id="sparqlssl1" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth1.png"/>
+     </figure>  	
 </listitem>
-  <listitem><emphasis>Go to Protected SPARQL Endpoint</emphasis> - in order to enter your Application Consumer Key and perform secure SPARQL queries.</listitem>
-</itemizedlist>
-   <figure id="sparqloauthendpoint4" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth4.png"/>
+  <listitem>Enter in the presented form Web ID for ex.:
+<programlisting><![CDATA[
+http://id.myopenlink.net/dataspace/person/demo#this
+]]></programlisting>  	
+  <para> and select "SPARQL Role" for ex. "Sponge".</para>
+     <figure id="sparqlssl2" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth3.png"/>
+     </figure>    
+  </listitem>
+  <listitem>Click the "Register" button.</listitem>
+  <listitem>As result the WebID Protocol ACLs will be created:
+     <figure id="sparqlssl3" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth4.png"/>
+     </figure>  	
+  </listitem>          
+  <listitem>Go to the SPARQL+SSL endpoint https://<cname>:<port>/sparql-ssl</listitem>          
+  <listitem>Select the user's certificate from above:
+     <figure id="sparqlssl4" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth5.png"/>
     </figure>
-<para>Users must have SQL privileges in order to run secure SPARQL statements.</para>
+  </listitem>          
+  <listitem>As result the SPARQL Query UI will be presented:
+     <figure id="sparqlssl5" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth6.png"/>
+     </figure>   	
+  </listitem>          
+  <listitem>Execute sample query and view the results:
+  	 <figure id="sparqlssl7" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth6.png"/>
+     </figure>   	
+  </listitem>                  
+</orderedlist>
 </sect4>
 <sect4 id="sparqloauthendpoint"><title>SPARQL OAuth Endpoint</title>
 <para>OAuth provides a secure data transmission level mechanism for your SPARQL endpoint.
 It enables you to interact securely with your RDF database from a variety of locations. It also
 allows you to provide controlled access to private data to selected users.</para>
-<para>Virtuoso OAuth Server can be installed by downloading and installing the oauth_dav.vad package. 
+<para>Virtuoso OAuth Server can be installed by downloading and installing the <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/ods_framework_dav.vad">ods_framework_dav.vad</ulink> package.
 The OAuth UI is accessible from the URL http://cname:port/oauth</para>
 <para>A user must have SQL privileges in order to run secured SPARQL statements.</para>
 <para>Here is a sample scenario:</para>
+
 <orderedlist>
-<listitem>Install the conductor_dav.vad and policy_manager_dav.vad packages.</listitem>
-<listitem>From the Conductor UI, create user test1, allow both SQL/ODBC and DAV logins and assign the SPARQL_UPDATE role to this user:
-<orderedlist>
-<listitem>Go to http://cname:port/conductor</listitem>
-<listitem>Log in as user dba</listitem>
-<listitem>Go to System Admin->User Account and click the "Create New Account" link
+  <listitem>Download and install the <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad">conductor_dav.vad</ulink> 
+and <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/ods_framework_dav.vad">ods_framework_dav.vad</ulink> packages.</listitem>
+
+  <listitem><ulink url="http://ods.openlinksw.com/dataspace/dav/wiki/ODS/ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID</ulink>.</listitem>
+  
+  <listitem>Go to http://<cname>:<port>/conductor, where <cname>:<port> are replaced by your 
+  	local server values.</listitem> 
+  	
+  <listitem>Log in as user "dba" or another user with DBA privileges.</listitem>
+  
+  <listitem>Go to System Admin->User Accounts:
 <figure id="sparqloauthendpoint1" float="1">
-      <title>Conductor UI</title>
-      <graphic fileref="ui/SparqlOAuth1.png"/>
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so1.png"/>
     </figure>
 </listitem>
-<listitem>In the displayed form:
-<orderedlist>
-<listitem>Enter a user name, for example test1, a password and then confirm the password </listitem>
-<listitem>Check "Allow DAV Logins" </listitem>
-<listitem>Check "Allow SQL/ODBC Logins" </listitem>
-<listitem>Add role "SPARQL_UPDATE" from the list of available roles to the "Selected" box.
+
+<listitem>Click "Create New Account":
 <figure id="sparqloauthendpoint2" float="1">
-      <title>Conductor UI</title>
-      <graphic fileref="ui/SparqlOAuth2.png"/>
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so2.png"/>
     </figure>
 </listitem>
-</orderedlist>
-</listitem>
-<listitem>Click the "Save" button. </listitem>
-<listitem>User test1 will then be created.
+
+<listitem>In the presented form enter respectively:
+  <orderedlist>
+    <listitem>Account name, for ex:demo1; a password and then confirm the password;</listitem>
+    <listitem>User type: SQL/ODBC and WebDAV;</listitem>
+    <listitem>Account role: SPARQL_UPDATE
 <figure id="sparqloauthendpoint3" float="1">
-      <title>Conductor UI</title>
-      <graphic fileref="ui/SparqlOAuth3.png"/>
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so3.png"/>
     </figure>
 </listitem>
 </orderedlist>
 </listitem>
-<listitem>Go to http://cname:port/policy_manager/
+
+<listitem>Click the "Save" button. </listitem>
+
+<listitem>The created user should be shown in the list of registered users:
 <figure id="sparqloauthendpoint4" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth4.png"/>
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so4.png"/>
     </figure>
 </listitem>
-<listitem>Click the "OAuth keys" link</listitem>
-<listitem>Log in as user test1
+
+
+<listitem>Go to http://<cname>:<port>/oauth/, where <cname>:<port> are replaced by your local server values. 
 <figure id="sparqloauthendpoint5" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth5.png"/>
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so5.png"/>
     </figure>
 </listitem>
-<listitem>The OAuth application registration form will then be shown.
+
+<listitem>Click the "OAuth keys" link:
 <figure id="sparqloauthendpoint6" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth6.png"/>
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so6.png"/>
+    </figure>	
+	</listitem>
+	
+<listitem>Log in as user demo1: 
+		<figure id="sparqloauthendpoint7" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so7.png"/>
+    </figure>	
+</listitem>
+
+<listitem>The OAuth application registration form will be shown. 
+		<figure id="sparqloauthendpoint8" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so8.png"/>
     </figure>
 </listitem>
-<listitem>Generate a key for SPARQL by selecting it from the list of application names and clicking the "Generate Keys" button.</listitem>
-<listitem>A SPARQL consumer key will then be generated e.g.:
+
+<listitem>Select SPARQL from the "Application name" list, and click the "Generate Keys" button. </listitem>
+
+<listitem>A Consumer Key for SPARQL will be generated: 
 <programlisting><![CDATA[
-cf92411e17f59960a4189451bfb5bf6b92c856e3
+90baa79108b1d972525bacc76c0279c02d6421e8
 ]]></programlisting>
-<figure id="sparqloauthendpoint7" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth7.png"/>
+		<figure id="sparqloauthendpoint9" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so9.png"/>
     </figure>
 </listitem>
+
 <listitem>Click the "Back to main menu" link.</listitem>
+
 <listitem>Click the "Protected SPARQL Endpoint" link.</listitem>
+
 <listitem>The OpenLink Virtuoso SPARQL Query form will be displayed.
-<figure id="sparqloauthendpoint8" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth8.png"/>
+		<figure id="sparqloauthendpoint11" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so11.png"/>
+    </figure>	
+    		<figure id="sparqloauthendpoint12" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so12.png"/>
     </figure>
 </listitem>
-<listitem>Enter the following URI for Default Graph URI:
+
+<listitem>Enter a simple query, for ex: 
 <programlisting><![CDATA[
-http://myopenlink.net/dataspace/person/kidehen#this
+SELECT * 
+WHERE 
+  {
+    ?s ?p ?o
+  }
+LIMIT 10
 ]]></programlisting>
 </listitem>
-<listitem>Enter for the value below for the "OAuth token":
+
+<listitem>Enter the value from below for the "OAuth token":
 <programlisting><![CDATA[
-cf92411e17f59960a4189451bfb5bf6b92c856e3
+90baa79108b1d972525bacc76c0279c02d6421e8
 ]]></programlisting>
-<figure id="sparqloauthendpoint9" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth9.png"/>
+		<figure id="sparqloauthendpoint13" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so13.png"/>
     </figure>
 </listitem>
+
 <listitem>Click the "Run Query" button.</listitem>
-<listitem>In the OAuth Authorization Service form enter the password for user test1 and click the "Login" button.
-<figure id="sparqloauthendpoint10" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth10.png"/>
+
+<listitem>In the OAuth Authorization Service form enter the password for user demo1 and click the "Login" button.
+		<figure id="sparqloauthendpoint14" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so16.png"/>
     </figure>
 </listitem>
-<listitem>In the form depicted below, click the "Authorize" button.
-<figure id="sparqloauthendpoint11" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth11.png"/>
+
+<listitem>Next you should authorize the request: 
+		<figure id="sparqloauthendpoint15" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so15.png"/>
     </figure>
 </listitem>
-<listitem>Once authorized, the query results will be returned to the requesting client:
-<figure id="sparqloauthendpoint12" float="1">
-      <title>OAuth UI</title>
-      <graphic fileref="ui/SparqlOAuth12.png"/>
+
+<listitem>On successful authentication and authorization, the query results should be shown: 
+		<figure id="sparqloauthendpoint14" float="1">
+      <title>SPARQL OAuth Endpoint</title>
+      <graphic fileref="ui/so14.png"/>
     </figure>
 </listitem>
 </orderedlist>
@@ -1417,70 +1507,65 @@ cf92411e17f59960a4189451bfb5bf6b92c856e3
 <para>WebID Protocol is an implementation of a conceptual authentication and authorization protocol that
 links a Web ID to a public key, to create a global decentralized/distributed, and open yet secure
 authentication system that functions with existing browsers.</para>
-<para>To use WebID Protocol, download and install the policy_manager_dav.vad VAD package. Once installed, to access the WebID Protocol ACLs UI, use the URL http://cname:port/policy_manager,
-then click the link WebID Protocol ACLs.</para>
+<para>To use WebID Protocol, download and install the <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad">conductor_dav.vad</ulink> 
+VAD package. Once installed, to access the WebID Protocol ACLs UI, go to 
+URL http://cname:port/conductor -> Linked Data -> Access Controls -> SPARQL-SSL .</para>
   <figure id="sparqloauthendpoint1" float="1">
     <title>FOAFSSL</title>
-    <graphic fileref="ui/SparqlOAuth4.png"/>
+    <graphic fileref="ui/auth4.png"/>
   </figure>
-<para>Note: You must log in as user dba</para>
 <para>
 Configuring WebID Protocol ACLs is with a WebID Protocol certificate and a Web ID allows secure SPARQL queries to be performed against a Virtuoso SPARQL-SSL endpoint and viewing of the query results.
 The SPARQL-SSL endpoint URL is of the form https://cname:port/sparql-ssl</para>
 <para>The steps required to configure a sample  WebID Protocol ACL are outlined below:</para>
 <orderedlist>
-<listitem>Install the ods_framework_dav.vad, conductor_dav.vad and policy_manager_dav.vad packages.</listitem>
-<listitem>Using the ODS UI, register an ODS user, e.g. user <emphasis>demo</emphasis>.</listitem>
-<listitem>Go to http://cname:port/policy_manager/
-<figure id="sparqloauthendpoint4" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlOAuth4.png"/>
-    </figure>
-</listitem>
-<listitem>Click the "FOAF+ACLs" link</listitem>
-<listitem>Log in as user dba 
-<figure id="sparqloauthendpoint5" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlFOAFSSL1.png"/>
-    </figure>
-</listitem>
-<listitem>The WebID Protocol ACLs management form will be displayed.
-<figure id="sparqloauthendpoint6" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlFOAFSSL2.png"/>
+  <listitem>Download and install the <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad">conductor_dav.vad</ulink> package.</listitem>
+  <listitem><ulink url="http://ods.openlinksw.com/dataspace/dav/wiki/ODS/ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID</ulink>.</listitem>
+  <listitem>Go to http://<cname>:<port>/conductor, where <cname>:<port> are replaced by your 
+  	local server values.</listitem> 
+  <listitem>Log in as user "dba" or another user with DBA privileges.</listitem>
+  <listitem>Go to Linked Data -> Access Controls -> SPARQL-SSL:
+     <figure id="sparqlssl1" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth1.png"/>
     </figure>
 </listitem>
-<listitem>Enter a Web ID, for example:
+  <listitem>Enter in the presented form Web ID for ex.:
 <programlisting><![CDATA[
-http://demo.openlinksw.com/dataspace/person/demo#this
+http://id.myopenlink.net/dataspace/person/demo#this
 ]]></programlisting>
-<para>You can also click the "Browse" button and select a user from the displayed list.
-A Web ID will be generated automatically for the selected user.</para></listitem>
-<listitem>Select a "SPARQL Role", e.g. "SPONGE".
-<figure id="sparqloauthendpoint7" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlFOAFSSL3.png"/>
+  <para> and select "SPARQL Role" for ex. "Sponge".</para>
+     <figure id="sparqlssl2" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth3.png"/>
     </figure>
 </listitem>
-<listitem>Click the "Register" button to create a new WebID Protocol ACL.
-<figure id="sparqloauthendpoint7" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlFOAFSSL4.png"/>
+  <listitem>Click the "Register" button.</listitem>
+  <listitem>As result the WebID Protocol ACLs will be created:
+     <figure id="sparqlssl3" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth4.png"/>
     </figure>
 </listitem>
-<listitem>Go to the SPARQL+SSL endpoint https://cname:port/sparql-ssl</listitem>
-<listitem>Select the user's certificate
-<figure id="sparqloauthendpoint7" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlFOAFSSL5.png"/>
+  <listitem>Go to the SPARQL+SSL endpoint https://<cname>:<port>/sparql-ssl</listitem>          
+  <listitem>Select the user's certificate from above:
+     <figure id="sparqlssl4" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth5.png"/>
     </figure>
 </listitem>
-<listitem>The SPARQL Query UI is displayed next:
-<figure id="sparqloauthendpoint9" float="1">
-      <title>FOAFSSL UI</title>
-      <graphic fileref="ui/SparqlFOAFSSL6.png"/>
+  <listitem>As result the SPARQL Query UI will be presented:
+     <figure id="sparqlssl5" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth6.png"/>
     </figure>
 </listitem>
+  <listitem>Execute sample query and view the results:
+  	 <figure id="sparqlssl7" float="1">
+       <title>SPARQL-SSL</title>
+       <graphic fileref="ui/auth6.png"/>
+     </figure>   	
+  </listitem>                  
 </orderedlist>
   <tip><title>See Also:</title>
     <para><link linkend="secureodbcx509foafsll">WebID Protocol ODBC Login</link></para>
@@ -1713,7 +1798,7 @@ _:_ res:solution [
 </sect4>
 <sect4 id="sparqloauthendpointfoafsslsparqldisable"><title>Disable Default SPARQL Endpoint</title>
   <sect5 id="sparqloauthendpointfoafsslsparqldisableisql"><title>Using iSQL:</title>
-    <itemizedlist mark="bullet">
+    <orderedlist>
       <listitem>To disable /sparql, execute:
 <programlisting><![CDATA[
 DB.DBA.VHOST_REMOVE (lpath=>'/sparql');	
@@ -1724,10 +1809,10 @@ DB.DBA.VHOST_REMOVE (lpath=>'/sparql');
 DB.DBA.VHOST_DEFINE (lpath=>'/sparql/', ppath => '/!sparql/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1)); 	
 ]]></programlisting>      	
       </listitem>
-    </itemizedlist>    
+    </orderedlist>    
   </sect5>
   <sect5 id="sparqloauthendpointfoafsslsparqldisablecond"><title>Using Conductor UI:</title>
-    <itemizedlist mark="bullet">
+    <orderedlist>
       <listitem>Go to http://cname:port/conductor .</listitem>
       <listitem>Enter user dba credentials.</listitem>
       <listitem>Go to "Web Application Server" -> "Virtual Domains & Directories".
@@ -1761,7 +1846,7 @@ DB.DBA.VHOST_DEFINE (lpath=>'/sparql/', ppath => '/!sparql/', is_dav => 1, vsp_u
           <graphic fileref="ui/s5.png"/>
         </figure>      	
       </listitem>
-    </itemizedlist>  
+    </orderedlist>  
   </sect5>
 </sect4>
 </sect3>
@@ -2367,7 +2452,7 @@ w9yJ2saU1vgHuFxWcughai5cZY%3D"
 SELECT * WHERE {?s ?p ?o}
 </programlisting>
 <para>Click the "Run Query" button.</para>
-<para>The query results, shown below, are cached locally (sponged). The remote RDF data is saved in the local RDF quad store as  graph http://www.w3.org/2001/sw/DataAccess/proto-tests/data/construct/simple-data.rdf</para>
+<para>The query results, shown below, are cached locally ( network resources being fetched ). The remote RDF data is saved in the local RDF quad store as  graph http://www.w3.org/2001/sw/DataAccess/proto-tests/data/construct/simple-data.rdf</para>
 <programlisting>
 s  	                                  p  	                                           o
 http://www.example/jose/foaf.rdf#jose 	  http://www.w3.org/1999/02/22-rdf-syntax-ns#type  http://xmlns.com/foaf/0.1/Person
@@ -2574,18 +2659,18 @@ initialized from the contents of a given graph.
 	The piggybank-generated-name is a Virtuoso DAV user ID.
        </para>
 </sect3>
-<sect3 id="rdfsparqlexnpointnorthwindexample"><title>Making RDF Views Dereferenceable - Northwind Example</title>
-<para>Consider an application that makes some relational data available for SPARQL requests, as described in the <link linkend="rdfviewnorthwindexample1">first part of the Northwind RDF View example</link>. This may be sufficient for some clients but the IRIs of the described subjects are not dereferenceable. 
+<sect3 id="rdfsparqlexnpointnorthwindexample"><title>Making Linked Data Views Dereferenceable - Northwind Example</title>
+<para>Consider an application that makes some relational data available for SPARQL requests, as described in the <link linkend="rdfviewnorthwindexample1">first part of the Northwind Linked Data View example</link>. This may be sufficient for some clients but the IRIs of the described subjects are not dereferenceable.
 This means that external SPARQL processors cannot retrieve that data using the Virtuoso Sponger or the like. It also means that if some external resources refer to the IRI of 
 some Northwind subject and a user browses that resource then he cannot look at the application's data by clicking on the subject link.</para>
 <para>To make RDF access complete, applications can do the following:</para>
-<itemizedlist mark="bullet" spacing="compact">
+<orderedlist>
 <listitem>Create a virtual directory</listitem>
 <listitem>Instruct the server how to prepare RDF resources on demand</listitem>
 <listitem>Configure rendering of RDF resources for non-RDF clients (including Web search engines)</listitem>
 <listitem>Make the used ontology available</listitem>
 <listitem>Provide an index or sitemap page to help users who try to browse published data but do not know the proper URLs</listitem>
-</itemizedlist>
+</orderedlist>
 <para>The following sequence of operations demonstrates how to implement the listed features without writing any special web pages.
 All requests (except the application-specific index/sitemap) will be handled by existing web service endpoints.</para>
 <para>As a precaution, we erase any URL rewriting rule lists created by this example that may be in the database following a previous run of the script.</para>
@@ -2669,7 +2754,7 @@ SQL>DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
     null
     );
 ]]></programlisting>
-<para>To configure the server to furnish the ontology underpinning the example Northwind RDF view, the procedure LOAD_NW_ONTOLOGY_FROM_DAV, listed
+<para>To configure the server to furnish the ontology underpinning the example Northwind Linked Data View, the procedure LOAD_NW_ONTOLOGY_FROM_DAV, listed
 below, takes the ontology described in file /DAV/VAD/demo/sql/nw.owl and loads it into graph http://demo.openlinksw.com/schemas/NorthwindOntology/1.0/
 in the local quad store. A rewrite rule is then created to query this graph when the input path identifies entities from this ontology.
 </para>
@@ -2759,7 +2844,7 @@ you must grant the SPARQL_UPDATE role to user SPARQL and grant execute permissio
 <para>
 To enable SPARQL_UPDATE using the Conductor UI:
 </para>
-<itemizedlist>
+<orderedlist>
   <listitem>Go to the Virtuoso Administration Conductor i.e. http://host:port/conductor</listitem>
   <listitem>Login as dba user</listitem>
   <listitem>Go to System Admin->User Accounts->Roles</listitem>
@@ -2774,7 +2859,7 @@ To enable SPARQL_UPDATE using the Conductor UI:
       <graphic fileref="ui/cn2.png"/>
     </figure>
   <listitem>Click the button "Update".</listitem>
-</itemizedlist>
+</orderedlist>
     <para>
        To grant execute permission on RDF_SPONGE_UP:
     </para>
@@ -2909,10 +2994,11 @@ aml.org/services/owl-s/1.1/Service.owl#ServiceProfile" }} ] } })
 especially if data comes from many quad map patterns. A moderately sized
 application with 50 tables and 10 columns per table may create
 thousands of quad map patterns for subjects spanning hundreds of different
-types. An attempt to "select everything" from RDF view of
+types. An attempt to "select everything" from Linked Data View of
 that complexity may easily create 5000 lines of SQL code. Thus it is
 to be expected that some queries will be rejected even if the same
-queries would work fine if the RDF data were held as physical quads in default storage, rather than synthesized through an RDF view.
+queries would work fine if the RDF data were held as physical quads in default storage, rather than 
+synthesized through an Linked Data View.
 </para>
 
 <para>In addition, the SQL compiler catches typos efficiently, signalling an error if a table or column
@@ -2945,7 +3031,7 @@ recognition and plain old code inspection. "Automatic" means
 "cheap" so the very first step of debugging is to ensure
 that every triple pattern of the query may in principle return
 something.  This helps in finding typos when the query gets data from
-RDF views. It also helps when a query tries to join two disjoint
+Linked Data Views. It also helps when a query tries to join two disjoint
 sorts of subjects. If the <emphasis>define sql:signal-void-variables
 1</emphasis> directive is placed in the preamble of the SPARQL query,
 the compiler will signal an error if it finds any triple pattern that cannot 
@@ -2967,9 +3053,9 @@ QUAD MAP quad-map-name { group-pattern }
 
 <note><para>Although it is technically possible to use <emphasis>QUAD
 MAP</emphasis> to improve the performance of a query that tries to
-access redundant RDF Views, it is much better to achieve the same
+access redundant Linked Data Views, it is much better to achieve the same
 effect by providing a more restrictive query or by changing/extending
-the RDF View. If an application relies on this trick then interoperable third-party SPARQL
+the Linked Data View. If an application relies on this trick then interoperable third-party SPARQL
 clients may experience problems because they cannot use Virtuoso-specific
 extensions.</para></note>
 
@@ -3897,8 +3983,8 @@ Timothy Berners-Lee TimBL
     <tip><title>See Also:</title>
       <itemizedlist mark="bullet">
         <listitem><link linkend="rdfsparqlgeospatexmp11">Example "Things around highly populated places"</link></listitem>
-        <listitem><link linkend="virtuosospongerfacent">Virtuoso Facets Web Service Examples</link></listitem>
-        <listitem><link linkend="VirtFacetUsage6">Virtuoso Facets Usage Statistics Examples</link></listitem>
+        <listitem><link linkend="virtuosospongerfacent">Virtuoso Faceted Web Service Examples</link></listitem>
+        <listitem><link linkend="VirtFacetUsage6">Virtuoso Faceted Usage Statistics Examples</link></listitem>
       </itemizedlist>
     </tip>
   </sect3>
@@ -4031,7 +4117,7 @@ ns1:me	foaf:knows	ns9:me .
   <para>In each pair, both procedures have the same semantics but the second one is used if and
 only if the SPARQL compiler can prove that all subjects to process are
 from physical storage <emphasis>(DB.DBA.RDF_QUAD)</emphasis>. Thus the second procedure
-will not search for subjects in RDF Views.
+will not search for subjects in Linked Data Views.
   </para>
   <para>Each procedure should return a dictionary with triples as keys and
 integer 1 as values. So the dictionary is filled by calls like:
@@ -4125,21 +4211,23 @@ _______________________________________________________________________________
   <para>The SPARQL syntax is slightly different from the SQL, although the option names
 and meanings are the same.</para>
   <para>In SPARQL, the transitive options occur after a subquery enclosed in braces:</para>
-  <para>The below produces all the IRI's that are the same as <alice>.</para>
+  <para>The below produces all the IRI's that are the same as <http://dbpedia.org/resource/New_York>.</para>
   <programlisting><![CDATA[
 SPARQL
 SELECT ?syn
-where
+WHERE
   {
     {
       SELECT ?x ?syn
-      where
+      WHERE
         {
-          { ?x owl:sameAs ?syn } union { ?syn owl:sameAs ?x }
+          { ?x owl:sameAs ?syn } 
+          UNION 
+          { ?syn owl:sameAs ?x }
         }
     }
-    option ( transitive, t_in (?x), t_out (?syn), t_distinct, t_min (0) )
-    filter (?x = <Alice>) .
+    OPTION ( TRANSITIVE, t_in (?x), t_out (?syn), t_distinct, t_min (0) )
+    FILTER (?x = <http://dbpedia.org/resource/New_York>) .
   }
   ]]></programlisting>
   <para>In this case, we provide a binding for ?x in the filter outside of the
@@ -4156,7 +4244,11 @@ where
   {
     { SELECT ?x ?syn
       WHERE
-       {{ ?x owl:sameAs ?syn } UNION { ?syn owl:sameAs ?x}}
+       {
+         { ?x owl:sameAs ?syn } 
+         UNION 
+         { ?syn owl:sameAs ?x}
+       }
     } OPTION (TRANSITIVE, t_in (?x), t_out (?syn), t_distinct, t_min (0) )
   }
 } .
@@ -4201,13 +4293,23 @@ where
 <programlisting><![CDATA[
   SELECT ?g ?x count (*) as ?count
    WHERE {
-           {SELECT ?x ?alias ?g
+           {
+             SELECT ?x ?alias ?g
             WHERE {
-                    { GRAPH ?g {?x owl:sameAs ?alias }
+                     { 
+                       GRAPH ?g {?x owl:sameAs ?alias }
                   }
             UNION
-           {GRAPH ?g {?alias owl:sameAs ?x}}}}
-   OPTION (TRANSITIVE, t_in (?x), t_out (?alias), t_distinct, t_min (1)) .
+                     {
+                      GRAPH ?g {?alias owl:sameAs ?x}
+                     }
+                   }
+           }
+           OPTION ( TRANSITIVE, 
+                    t_in (?x), 
+                    t_out (?alias), 
+                    t_distinct, 
+                    t_min (1)) .
    FILTER (?x = <http://dbpedia.org/resource/New_York> ) .
          }
 ]]></programlisting>
@@ -4236,7 +4338,42 @@ WHERE
           {
             ?s foaf:knows ?o
           }
-      } OPTION (TRANSITIVE, t_distinct, t_in(?s), t_out(?o), t_min (1), t_max (4), t_step ('step_no') as ?dist) .
+      } OPTION ( TRANSITIVE, 
+                 t_distinct, 
+                 t_in(?s), 
+                 t_out(?o), 
+                 t_min (1), 
+                 t_max (4), 
+                 t_step ('step_no') as ?dist ) .
+      FILTER (?s= <http://www.w3.org/People/Berners-Lee/card#i>)
+    }
+  ORDER BY ?dist DESC 3
+  LIMIT 50
+  ]]></programlisting>
+</sect4>
+<sect4 id="rdfsparqlimplementatiotransexamples3"><title>Example for query that takes all the people known by Tim Berners-Lee, to a depth between 2 and 4 applications of the subquery</title>
+  <para>This query takes all the people known by kidehen, to a depth between 2
+  and 4 applications of the subquery. It then sorts them by the
+  distance and the descending count of connections of each found connection. This is
+  equivalent to the default connections list shown by LinkedIn.</para>
+  <programlisting><![CDATA[
+  SPARQL
+  SELECT ?o ?dist ((SELECT COUNT (*) WHERE {?o foaf:knows ?xx}))
+  WHERE
+    {
+      {
+        SELECT ?s ?o
+        WHERE
+          {
+            ?s foaf:knows ?o
+          }
+      } OPTION ( TRANSITIVE, 
+                 t_distinct, 
+                 t_in(?s), 
+                 t_out(?o), 
+                 t_min (2), 
+                 t_max (4), 
+                 t_step ('step_no') as ?dist) .
       FILTER (?s= <http://www.w3.org/People/Berners-Lee/card#i>)
     }
   ORDER BY ?dist DESC 3
@@ -4256,8 +4393,16 @@ WHERE
           {
             graph ?g {?s foaf:knows ?o }
           }
-      } OPTION (TRANSITIVE, t_distinct, t_in(?s), t_out(?o), t_no_cycles, T_shortest_only,
-      t_step (?s) as ?link, t_step ('path_id') as ?path, t_step ('step_no') as ?step, t_direction 3) .
+      } OPTION ( TRANSITIVE, 
+                 t_distinct, 
+                 t_in(?s), 
+                 t_out(?o), 
+                 t_no_cycles, 
+                 T_shortest_only,
+                 t_step (?s) as ?link, 
+                 t_step ('path_id') as ?path, 
+                 t_step ('step_no') as ?step, 
+                 t_direction 3) .
       FILTER (?s= <http://www.w3.org/People/Berners-Lee/card#i>
       && ?o = <http://www.advogato.org/person/mparaz/foaf.rdf#me>)
   }
@@ -4277,6 +4422,9 @@ LIMIT 20
 <para>Yago Class Hierarchy (TBox) Subsumption</para>
 <para>AlphaReceptors</para>
 <programlisting><![CDATA[
+# all subjects with IRI: <http://dbpedia.org/class/yago/AlphaReceptor105609111>, 
+# that are sub-classes of anything (hence ?y) 
+# without restrictions on tree levels	
 SELECT ?y
 FROM <http://dbpedia.org/resource/classes/yago#>
 WHERE
@@ -4405,8 +4553,12 @@ WHERE
   	  ?m skos:subject ?c.
   	  ?c skos:broaderTransitive category:Protestant_churches .
   	  ?c skos:broaderTransitive ?trans
-            OPTION ( TRANSITIVE, t_distinct, t_in (?c), t_out (?trans),
-                     t_max (3),  t_step ( 'step_no' ) as ?dist ) .
+                OPTION ( TRANSITIVE, 
+                         t_distinct, 
+                         t_in (?c), 
+                         t_out (?trans),
+                         t_max (3),  
+                         t_step ( 'step_no' ) as ?dist ) .
   	  ?m p:abstract ?d.
   	  ?m geo:point ?p
   	  FILTER ( lang(?n) = "en" )
@@ -4470,19 +4622,19 @@ input:named-graph-exclude works like "NOT FROM NAMED" clause.
   does not understand SPARQL-BI extensions then the text may contain variable ?X and define 
   input:param "X" . This does not work for positional parameters, one can not replace a reference 
   to ?::3 with ?3 and define input:param "3".</listitem>
-  <listitem><code>input:grab-var</code>: sponge values of variable;</listitem>
-  <listitem><code>input:grab-iri</code>: sponge the constant IRI;</listitem>
-  <listitem><code>input:grab-all</code>: sponge all constants and variables of the query;</listitem>
+  <listitem><code>input:grab-var</code>: Network Resource Fetch values of variable;</listitem>
+  <listitem><code>input:grab-iri</code>: Network Resource Fetch the constant IRI;</listitem>
+  <listitem><code>input:grab-all</code>: Network Resource Fetch all constants and variables of the query;</listitem>
   <listitem><code>input:grab-seealso (and synonym input:grab-follow-predicate)</code>: sets predicate 
-  that tells where to sponge more data about a subject;</listitem>
-  <listitem><code>input:grab-limit</code>: how many resources can be sponged;</listitem>
+  that tells where to Fetch more Network Resource data about a subject;</listitem>
+  <listitem><code>input:grab-limit</code>: how many resources can be fetched;</listitem>
   <listitem><code>input:grab-depth</code>: how many iterations can be done, sponging additional data 
   on each iteration;</listitem>
-  <listitem><code>input:grab-base</code>: base to resolve relative IRIs before passing to sponge;</listitem>
+  <listitem><code>input:grab-base</code>: base to resolve relative IRIs before passing to Sponger;</listitem>
   <listitem><code>input:grab-resolver</code>: IRI resolving procedure (i.e., one that turns base and 
   relative IRI to an absolute IRI);</listitem>
   <listitem><code>input:grab-destination</code>: single resource that should be filled in with results 
-  of all sponges;</listitem>
+  of all fetchings;</listitem>
   <listitem><code>input:grab-loader</code>: a name of procedure that retrieve the resource via HTTP, 
   parse it and store it.</listitem>
 </itemizedlist>
@@ -4492,12 +4644,12 @@ input:named-graph-exclude works like "NOT FROM NAMED" clause.
 </para>
 <itemizedlist mark="bullet">
   <listitem><code>input:grab-intermediate</code>: extends the set of IRIs to sponge, useful in 
-  combination with input:grab-seealso. If present then for a given subject, sponge will retrieve 
+  combination with input:grab-seealso. If present then for a given subject, Network Resource Fetch will retrieve 
   not only values of see-also predicates for that subject but the subject itself. The define value 
   is not used in current implementation.</listitem>
   <listitem><code>input:grab-group-destination</code>: resembles input:grab-destination but sponges will 
-  create individual graphs for sponge results, and in additional to this common routine, a copy of each 
-  sponge result is added to the resource specified by the value of input:grab-group-destination. 
+  create individual graphs for Network Resource Fetch results, and in additional to this common routine, a copy of each 
+  Network Resource Fetch result is added to the resource specified by the value of input:grab-group-destination. 
   input:grab-destination redirects loadings, input:grab-group-destination duplicates them.</listitem>
   <listitem><code>get:soft</code>: "soft" or "replacing", depending on mode of loading source graph;
   </listitem>
@@ -4548,7 +4700,7 @@ input:named-graph-exclude works like "NOT FROM NAMED" clause.
   contains all X ?p ?o and all ?s ?p X triples for each given X. In "SPO" mode, the result contains 
   X ?p ?o triples only. In "CBD" mode, the result contains concise bound descriptions of given 
   subjects. Application developers may add more modes.</listitem>
-  <listitem><code>sql:signal-void-variables</code>: the most useful debugging variable if RDF Views 
+  <listitem><code>sql:signal-void-variables</code>: the most useful debugging variable if Linked Data Views 
   are in use. It tells the SPARQL compiler to signal an error if it can prove that some variable can 
   never be bound. Usually it means error in query, like typo in IRI or totally wrong triple 
   pattern.</listitem> 
@@ -4674,6 +4826,93 @@ WHERE
   </listitem>
 </itemizedlist>
 </sect2>
+<sect2 id="rdfsparqlsoap"><title>Sending SOAP Requests to Virtuoso SPARQL Endpoint</title>
+  <para>This section presents a sample scenario on how to execute a SPARQL query as a SOAP 
+  	request to the Virtuoso SPARQL Endpoint.
+  </para>	
+  <orderedlist>
+    <listitem>Assume the following sample SOAP request containing simple SPARQL query:
+<programlisting><![CDATA[
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+   <soapenv:Body>
+      <query-request xmlns="http://www.w3.org/2005/09/sparql-protocol-types/#">
+         <query xmlns="">SELECT DISTINCT ?z FROM virtrdf: {?x ?y ?z .} LIMIT 10</query>
+      </query-request>
+   </soapenv:Body>
+</soapenv:Envelope>	
+]]></programlisting>    	
+    </listitem>
+    <listitem>Save locally the content from above for ex. to file with the name "soap.xml".</listitem>
+    <listitem>To pass the SOAP request to a Virtuoso SPARQL Endpoint, execute the following curl command:
+<programlisting><![CDATA[
+$ curl -d at soap.xml -H "Content-Type:text/xml" -H "SOAPAction: ''" http://localhost:8890/sparql
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+  <soapenv:Body>
+    <query-result xmlns="http://www.w3.org/2005/09/sparql-protocol-types/#">
+      <sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/sw/DataAccess/rf1/result2.xsd">
+        <head>
+         <variable name="z"/>
+        </head>
+        <results distinct="false" ordered="true">
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadStorage</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#array-of-QuadMapFormat</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadMap</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadMapValue</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#array-of-QuadMapColumn</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadMapColumn</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#array-of-QuadMapATable</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadMapATable</uri>
+            </binding>
+          </result>
+          <result>
+            <binding name="z">
+             <uri>http://www.openlinksw.com/schemas/virtrdf#QuadMapFText</uri>
+            </binding>
+          </result>          
+        </results>        
+      </sparql>
+    </query-result>
+  </soapenv:Body>
+</soapenv:Envelope>	
+]]></programlisting>    	
+    </listitem>
+  </orderedlist>  
+</sect2>
 </sect1>
 
 
@@ -4883,7 +5122,7 @@ This will make free-text index data incomplete.
 Calling procedure <emphasis>DB.DBA.RDF_OBJ_FT_RECOVER ()</emphasis> will insert all missing free-text index items by dropping and re-inserting every existing free-text index rule.
 </para>
 </sect3>
-<sect3 id="rdfviewsandfreetext"><title>Free-Text Indexes on RDF Views</title>
+<sect3 id="rdfviewsandfreetext"><title>Free-Text Indexes on Linked Data Views</title>
 <para>
 If an <emphasis>O</emphasis> field of a quad map pattern gets its value from a database column that has a free text index then this index can be used in SPARQL for efficient text searching. As a variation of this facility, the free-text index of another table may be used.
 </para>
@@ -4949,7 +5188,8 @@ Adding a free-text predicate will add <emphasis>DB.DBA.RDF_OBJ</emphasis> to the
 As a result, "you pay only for what you use": adding free-text index to the declaration does not add tables to the query unless the index is actually used.
 </para>
 <para>
-Boolean functions <function>bif:contains</function> and <function>bif:xcontains</function> are used for objects that come from RDF Views as well as for regular "physical" triples.
+Boolean functions <function>bif:contains</function> and <function>bif:xcontains</function> are used 
+for objects that come from Linked Data Views as well as for regular "physical" triples.
 Every function takes two arguments and returns a boolean value. The first argument is an local variable.
 The argument variable should be used as an object field in the group pattern where the filter condition is placed.
 Moreover, the occurrence of the variable in an object field should be placed <emphasis>before</emphasis> the filter.
@@ -5095,10 +5335,10 @@ Insert into <http://mygraph.com>, 1 triples -- done
 1 Rows. -- 20 msec.
 ]]></programlisting>
 </sect4>
-<sect4 id="rdfsparulexamples2"><title>Example for delete graph equivalents</title>
+<sect4 id="rdfsparulexamples2"><title>Example for delete graph equivalence</title>
        <para>The following two statements are equivalent but the latter may work faster, especially
-if there are many RDF views in the system or if the graph in question contains triples from RDF views.
-Note that neither of these two statements affects data coming from RDF views.
+if there are many Linked Data Views in the system or if the graph in question contains triples from Linked Data Views.
+Note that neither of these two statements affects data coming from Linked Data Views.
 </para>
 <programlisting><![CDATA[
 SQL> SPARQL DELETE FROM GRAPH <http://mygraph.com> { ?s ?p ?o } FROM <http://mygraph> WHERE { ?s ?p ?o };
@@ -5119,6 +5359,37 @@ Clear <http://mygraph.com> -- done
 
 1 Rows. -- 10 msec.
 ]]></programlisting>
+   <para>DROP GRAPH is equivalent of CLEAR GRAPH. It requires initially the graph to be 
+   	created explicitly.</para>
+   <para>Note: All SPARQL commands should work via SPARUL ( i.e. executed from the /sparql endpoint) 
+   	as soon as "SPARQL" user has "SPARQL_UPDATE" privilege.</para>
+   <para>Assume the following sequence of commands to be executed from the /sparql endpoint:</para>
+   <itemizedlist mark="bullet">
+     <listitem>Create explicitly a graph:
+<programlisting><![CDATA[
+CREATE GRAPH <qq>
+	
+callret-0
+Create graph <qq> -- done
+]]></programlisting>     	
+     </listitem>
+     <listitem>If you don't know whether the graph is created explicitly or not, use <emphasis>DROP SILENT GRAPH</emphasis>:
+<programlisting><![CDATA[
+DROP SILENT	GRAPH <qq> 
+	
+callret-0	
+Drop silent graph <qq> -- done	
+]]></programlisting>     	
+     </listitem>
+     <listitem>If you know the graph is created explicitly, use <emphasis>DROP GRAPH</emphasis>:
+<programlisting><![CDATA[
+DROP GRAPH <qq> 	
+	
+callret-0
+Drop graph <qq> -- done	
+]]></programlisting>     	
+     </listitem>
+   </itemizedlist>
 </sect4>
 <sect4 id="rdfsparulexamples3"><title>Example for deleting all triples for given subject</title>
 <para>The following statement deletes all records with <http://myopenlink.net/dataspace/Kingsley#this> as the subject:</para>
@@ -5282,8 +5553,31 @@ http://dbpedia.org/resource/Poverty 	         http://dbpedia.org/resource/Tanzan
        <para>'Modify graph' may be used as a form of 'update' operation.
        </para>
 <programlisting><![CDATA[
-SQL>SPARQL MODIFY GRAPH <http://mygraph.com> DELETE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o } INSERT { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> ?o } WHERE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o };
+-- update a graph with insert scoped on the same graph	
+SQL>SPARQL 
+MODIFY GRAPH <http://mygraph.com> 
+DELETE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o } 
+INSERT { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> ?o } 
+FROM <http://mygraph.com> 	
+WHERE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o };
+
+-- update a graph with insert scoped on another graph	
+SQL>SPARQL 
+MODIFY GRAPH <http://mygraph.com> 
+DELETE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o } 
+INSERT { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> ?o } 
+FROM <http://mytest.com> 	
+WHERE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o };
+	
 
+-- update a graph with insert scoped over the whole RDF Quad Store
+SQL>SPARQL 
+MODIFY GRAPH <http://mygraph.com> 
+DELETE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o } 
+INSERT { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> ?o } 
+WHERE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o };
+	
+-- update a graph with delete of particular tripple
 SQL>SPARQL
 DELETE FROM GRAPH <http://mygraph.com> { <http://myopenlink.net/dataspace/Caroline#this> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> <http://rdfs.org/sioc/ns#User> };
 
@@ -5291,7 +5585,7 @@ DELETE FROM GRAPH <http://mygraph.com> { <http://myopenlink.net/dataspace/Caroli
 </sect4>
 <sect4 id="rdfsparulexamples8"><title>Example for generating RDF information resource URI</title>
        <para>The RDF information resource URI can be generated via a string expression.</para>
-<itemizedlist mark="bullet">
+<orderedlist>
   <listitem>Suppose there is a sample file kidehen.n3:
 <programlisting><![CDATA[
 <http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/sioc/ns#User> .
@@ -5354,7 +5648,7 @@ http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this    http://www.w3
 3 Rows. -- 10 msec.
 ]]></programlisting>
   </listitem>
-</itemizedlist>
+</orderedlist>
 </sect4>
 <sect4 id="rdfsparulexamples9"><title>Example for operations over a web service endpoint</title>
        <para>Several operations can be sent to a web service endpoint as a single statement and
@@ -5386,6 +5680,7 @@ SQL>SPARQL
 MODIFY GRAPH <http://mygraph.com>
 DELETE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o }
 INSERT { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> ?o }
+FROM <http://mygraph.com>	
 WHERE { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o };
 
 SQL>DELETE FROM GRAPH <http://mygraph.com> { <http://myopenlink.net/dataspace/Caroline#this> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type1> <http://rdfs.org/sioc/ns#User> };
@@ -5393,6 +5688,9 @@ SQL>DELETE FROM GRAPH <http://mygraph.com> { <http://myopenlink.net/dataspace/Ca
 SQL>SPARQL
 load bif:concat ("http://", bif:registry_get("URIQADefaultHost"), "/DAV/n3_collection/kidehen.n3") INTO GRAPH <http://mygraph.com>;
 ]]></programlisting>
+  <tip><title>See Also:</title>
+    <para><link linkend="rdfsparulexamples7">Examples for Modify used as Update</link></para>
+  </tip>
 </sect4>
 <sect4 id="rdfsparulexamples10"><title>Example for Dropping graph</title>
 <para>When handling very large RDF data collections (e.g. 600 million triples ) loaded into Virtuoso
@@ -5973,6 +6271,9 @@ Modify <http://BookStore.com>, delete 1 and insert 1 triples -- done
 
 1 Rows. -- 20 msec.
 ]]></programlisting>
+  <tip><title>See Also:</title>
+    <para><link linkend="rdfsparulexamples7">Examples for Modify used as Update</link></para>
+  </tip>
 </sect4>
 <sect4 id="rdfsparulexamples14"><title>Example for Deleting triples from graph</title>
 <para>The example below has a request to delete all records of old books (dated before year 2000)
@@ -6345,6 +6646,108 @@ __________________________________________________
 SQL>	
 ]]></programlisting>
      </sect4>
+     <sect4 id="rdfsparulexamples22"><title>Example for executing INSERT/DELETE (SPARUL) statements 
+     against a WebID protected SPARQL endpoint</title>
+       <para>The following sample scenario demonstrates how to perform INSERT/DELETE (SPARUL) statements 
+       	against a protected SPARQL Endpoint by setting WebID Protocol ACLs using the Virtuoso 
+       	Authentication Server UI:</para>
+       	<orderedlist>
+          <listitem>Obtain a WebID:
+            <orderedlist>
+              <listitem>Download and install the <ulink url="http://opldownload.s3.amazonaws.com/uda/vad-packages/6.3/virtuoso/ods_framework_dav.vad">ods_framework_dav.vad</ulink>.
+                <itemizedlist mark="bullet">
+                  <listitem>Note: an existing ODS DataSpace user instance can also be used, for example at 
+                  	<ulink url="http://id.myopenlink.net/ods/">http://id.myopenlink.net/ods/</ulink>
+                  </listitem>
+                </itemizedlist>
+              </listitem>
+              <listitem>Register an ODS Data Space user, for example with name "demo".</listitem>
+              <listitem>The generated WebID will be for example:
+<programlisting><![CDATA[
+http://id.myopenlink.net/dataspace/person/demo#this 	
+]]></programlisting>              	
+              </listitem>
+              <listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/ODSGenerateX509Certificate">Generate a Personal HTTP based Identifier</ulink> 
+              for the "demo" user and then bind the personal Identifier to an X.509 Certificate, thereby 
+              giving assigning the user a WebID.
+              </listitem>	
+            </orderedlist>          	
+          </listitem>
+          <listitem>Download and install the 
+          	<ulink url="http://opldownload.s3.amazonaws.com/uda/vad-packages/6.3/virtuoso/conductor_dav.vad">conductor_dav.vad</ulink> 
+          	package, if not already installed.
+          </listitem>
+          <listitem>Go to http://<cname>:<port>/conductor, where <cname>:<port> 
+          	are replaced by your local server values.</listitem>
+          <listitem>Go to System Admin -> Linked Data -> Access Control -> SPARQL-SSL
+            <figure id="si1" float="1">
+              <title>Conductor SPARQL-SSL</title>
+              <graphic fileref="ui/si1.png"/>
+            </figure>          	
+          </listitem>
+          <listitem>In the displayed form:
+            <orderedlist>
+              <listitem>Enter the Web ID for the user registered above, for example:
+<programlisting><![CDATA[
+http://id.myopenlink.net/dataspace/person/demo#this	
+]]></programlisting>              	
+              </listitem>
+              <listitem>Select "SPARQL Role": "<emphasis>UPDATE</emphasis>".
+                <figure id="si2" float="1">
+                  <title>Conductor SPARQL-SSL</title>
+                  <graphic fileref="ui/si2.png"/>
+                </figure>                  
+              </listitem>
+            </orderedlist>          	
+          </listitem>
+          <listitem>Click the "Register" button.</listitem>
+          <listitem>The WebID Protocol ACL will be created:
+            <figure id="si3" float="1">
+              <title>Conductor SPARQL-SSL</title>
+              <graphic fileref="ui/si3.png"/>
+            </figure>          	          	
+          </listitem>
+          <listitem>Go to the SPARQL+SSL endpoint, https://<cname>:<port>/sparql-ssl, 
+          	where <cname>:<port> are replaced by your local server values.
+          </listitem>
+          <listitem>Select the user's certificate:
+            <figure id="si4" float="1">
+              <title>Conductor SPARQL-SSL</title>
+              <graphic fileref="ui/si4.png"/>
+            </figure>          	          	          	
+          </listitem>
+          <listitem>The SPARQL Query UI will be displayed:
+            <figure id="si5" float="1">
+              <title>Conductor SPARQL-SSL</title>
+              <graphic fileref="ui/si5.png"/>
+            </figure>          	          	          	          	
+          </listitem>
+          <listitem>Execute the query:
+<programlisting><![CDATA[
+INSERT INTO GRAPH <http://mytest.com> {
+  <s1> <p1> <o1> .
+  <s2> <p2> <o2> .
+  <s3> <p3> <o3> 
+}	
+]]></programlisting> 
+            <figure id="si6" float="1">
+              <title>Conductor SPARQL-SSL</title>
+              <graphic fileref="ui/si6.png"/>
+            </figure>          	
+            <figure id="si7" float="1">
+              <title>Conductor SPARQL-SSL</title>
+              <graphic fileref="ui/si7.png"/>
+            </figure>          	            
+          </listitem>
+        </orderedlist>
+       <para>Note: If the SPARQL Role "Sponge" is set instead, in order to be able to execute 
+       	DELETE/INSERT statements over the protected SPARQL Endpoint, the following grants need to be 
+       	performed for the user, associated with the WebID ACL Role:</para>	
+<programlisting><![CDATA[
+grant execute on DB.DBA.SPARQL_INSERT_DICT_CONTENT to "demo";
+grant execute on DB.DBA.SPARQL_DELETE_DICT_CONTENT to "demo";	
+]]></programlisting>       	
+     </sect4>
    </sect3>
    </sect2>
 <sect2 id="sparqlbi"><title>Business Intelligence Extensions for SPARQL</title>
@@ -6352,7 +6755,7 @@ SQL>
 Virtuoso extends SPARQL with expressions in results, subqueries, aggregates and grouping.
 These extensions allow a straightforward translation of arbitrary SQL queries to SPARQL.
 This extension is called  "SPARQL BI", because the primary objective is to match needs of Business Intelligence.
-The extended features apply equally to querying physical quads or relational tables mapped through RDF views.
+The extended features apply equally to querying physical quads or relational tables mapped through Linked Data Views.
   </para>
 <note><para>In this section, many examples use the TPC-H namespace. You may test them on your local demo database.
 They use data from the TPC-H dataset that is mapped into a graph with an IRI of the form
@@ -6402,7 +6805,7 @@ simple paths in expressions and has a separate feature for transitivity:</para>
   <listitem>S*>P: for "zero or many values of P of S", so *> may form a LEFT OUTER JOIN whereas +> forms an INNER JOIN.</listitem>
   <listitem>S|>P: is reserved for potential "single value of P of S or an error if there are many values"</listitem>
    </itemizedlist>
-<para>If this property is set (for example by an RDF View) then +> should be used.</para>
+<para>If this property is set (for example by an Linked Data View) then +> should be used.</para>
 
 <para><emphasis>Simple Example</emphasis></para>
   <programlisting><![CDATA[
@@ -7094,7 +7497,7 @@ the order of checks is as follows:</para>
 <para>It is convenient to configure the RDF storage security by adding restrictions in the order inverse
 to the order of checks:</para>
 
-<itemizedlist mark="bullet">
+<orderedlist>
   <listitem>Step 1: Set public permissions on all graphs to the most restricted level of any application
 that will be installed. So if any single graph will be unreadable for public, then public permissions on
 all graphs should be set to 0 or 8.</listitem>
@@ -7104,16 +7507,16 @@ may be set to 1.</listitem>
   <listitem>Step3: Configure trusted users, such as administrative DBA-like accounts, and to specify their
 permissions on all graphs.</listitem>
   <listitem>Step 4: Some additional right can be granted to some specific users on some specific graphs.</listitem>
-</itemizedlist>
+</orderedlist>
 
 <para>Note that there's no need to permit something to DBA itself, because DBA's default permissions are
 set automatically.</para>
 <sect3 id="rdfgraphsecurityintconfsecuser"><title>Configuring New User</title>
-<itemizedlist mark="bullet">
+<orderedlist>
   <listitem>Step 1: Grant SPARQL_SELECT, SPARQL_SPONGE or SPARQL_UPDATE to the user.</listitem>
   <listitem>Step 2: Set user's permissions on all graphs.</listitem>
   <listitem>Step 3: Grant rights on some specific graphs.</listitem>
-</itemizedlist>
+</orderedlist>
 </sect3>
 <sect3 id="rdfgraphsecurityintex"><title>Example: Blogs and Resource Sharing</title>
 <para>Consider a "groupware" application that let users create personal resources with access policies.</para>
@@ -7229,17 +7632,17 @@ SELECT ?g ?s WHERE { ?s <p> ?o }
 </sect2>
 </sect1>
 
-<sect1 id="rdfviews"><title>RDF Views over RDBMS Data Source</title>
+<sect1 id="rdfviews"><title>Linked Data Views over RDBMS Data Source</title>
 <para>
-RDF Views map relational data into RDF and allow customizing RDF representation of locally stored RDF data.
+Linked Data Views map relational data into RDF and allow customizing RDF representation of locally stored RDF data.
 To let SPARQL clients access relational data as well as physical RDF graphs in a single query, we introduce a declarative Meta Schema Language for mapping SQL Data to RDF Ontologies.
 As a result, all types of clients can efficiently access all data stored on the server.
 The mapping functionality dynamically generates RDF Data Sets for popular ontologies such as SIOC, SKOS, FOAF, and ATOM/OWL without disruption to the existing database infrastructure of Web 1.0 or Web 2.0 solutions.
-RDF views are also suitable for declaring custom representation for RDF triples, e.g. property tables, where one row holds many single-valued properties.
+Linked Data Views are also suitable for declaring custom representation for RDF triples, e.g. property tables, where one row holds many single-valued properties.
 </para>
 <sect2 id="rdfviewsintro"><title>Introduction</title>
 <para>
-The Virtuoso RDF Views meta schema is a built-in feature of Virtuoso's SPARQL to SQL translator.
+The Virtuoso Linked Data Views meta schema is a built-in feature of Virtuoso's SPARQL to SQL translator.
 It recognizes triple patterns that refer to graphs for which an alternate representation is declared and translates these into SQL accordingly.
 The main purpose of this is evaluating SPARQL queries against existing relational databases.
 There exists previous work from many parties for rendering relational data as RDF and opening it to SPARQL access.
@@ -7304,7 +7707,7 @@ E.g., variable <emphasis>?g</emphasis> in expression <emphasis>GRAPH ?g {...}</e
 SPARQL has special syntax for "graph group patterns" that is convenient for sets of triple patterns with a common graph, but it also has shorthands for common subject and predicate, so the difference is no more than in syntax.
 There is only one feature that is specific for graphs but not for other fields: the SPARQL compiler can create restrictions on graphs according to <emphasis>FROM</emphasis> and <emphasis>FROM NAMED</emphasis> clauses.
 </para><para>
-Virtuoso RDF Views should offer the same flexibility with the graphs as SPARQL addressing physical triples.
+Virtuoso Linked Data Views should offer the same flexibility with the graphs as SPARQL addressing physical triples.
 A transformation cannot always be identified by the graph used for ranges because graph may be composed from SQL data. The key element of the meta schema is a "<emphasis>quad map pattern</emphasis>".
 A simple quad map pattern fully defines one particular transformation from one set of relational columns into triples that match one SPARQL graph pattern.
 The main part of quad map pattern is four declarations of "<emphasis>quad map values</emphasis>", each declaration specifies how to calculate the value of the corresponding triple field from the SQL data.
@@ -7887,25 +8290,25 @@ Subclasses can be declared for literal classes as well as for IRI classes, but t
     </sect2>
 <sect2 id="rdfmetadatarecovery"><title>RDF Metadata Maintenance and Recovery</title>
    <para>
-This section refers to checking and backing up RDF view and storage declarations only. The checks and backup/restore do not affect physical quads, relational schema or tables or data therein. For general backup and restore, see server administration.
+This section refers to checking and backing up Linked Data View and storage declarations only. The checks and backup/restore do not affect physical quads, relational schema or tables or data therein. For general backup and restore, see server administration.
      To detect and fix automatically most popular sorts of RDF metadata corruption use <link linkend="fn_rdf_audit_metadata"><function>DB.DBA.RDF_AUDIT_METADATA</function></link>.
 It is also possible to backup RDF data by
     <link linkend="fn_rdf_backup_metadata"><function>DB.DBA.RDF_BACKUP_METADATA</function></link>
 and restore the saved state later by using
     <link linkend="fn_rdf_restore_metadata"><function>DB.DBA.RDF_RESTORE_METADATA</function></link>.
-It is convenient to make a backup before any modification of quad storages, quad map patterns or IRI classes, especially during debugging new RDF Views.
+It is convenient to make a backup before any modification of quad storages, quad map patterns or IRI classes, especially during debugging new Linked Data Views.
    </para>
 <note><para>In SQL, adding a new view can not break anything. This is because SQL lacks the ability of querying "everything" so data sources are always specified. This is not true for SPARQL, so please treat <emphasis>any</emphasis> metadata manipulation as potentially destructive operation. If an RDF storage is supposed to be used by more than one application then these applications should be tested together, not one after other, and they should be installed/upgraded on live database in the very same order as they were installed/upgraded on instrumental machine during testing. Always remember that these applications share RDF tables so they may interfere.</para></note>
 </sect2>
-<sect2 id="splitrdfview"><title>Split RDF View</title>
-<para>RDF View can be created by two or more "sparql alter storage" statements. In each statement
+<sect2 id="splitrdfview"><title>Split Linked Data View</title>
+<para>Linked Data View can be created by two or more "sparql alter storage" statements. In each statement
 can be created one quad map that contains mappings for half or a third of all tables. Quad maps
 created should have distinct names but may mention same graph. The important fact is that if the
-RDF View in question is exclusive for a graph then only the last quad map should be exclusive but
+Linked Data View in question is exclusive for a graph then only the last quad map should be exclusive but
 all previous should not have this option. This is because if a map is exclusive on a graph the rest
 of maps on that graph will be silently ignored.</para>
 <para>The example below shows a sample part of the Virtuoso eCRM Views code,
-where the RDF view is split in two parts: with quad map virtrdf:ecrmDemo1 and with
+where the Linked Data View is split in two parts: with quad map virtrdf:ecrmDemo1 and with
 quad map virtrdf:ecrmDemo2:</para>
 <programlisting><![CDATA[
 SPARQL
@@ -8211,7 +8614,7 @@ WHERE (^{products_table.}^.FREETEXT_ID = ^{products.}^.FREETEXT_ID)
 
 ]]></programlisting>
 </sect2>
-<sect2 id="rdfviewsrcur"><title>RDF views and recursive FK relationships</title>
+<sect2 id="rdfviewsrcur"><title>Linked Data Views and recursive FK relationships</title>
   <para>Here is sample example of a script to include an additional table alias for a table:</para>
 <programlisting><![CDATA[
 alter quad storage virtrdf:DefaultQuadStorage
@@ -8233,7 +8636,7 @@ are needed two different aliases for one table if you want to join it with itsel
   </para>
     </sect2>
 </sect1>
-<sect1 id="rdfrdfviewgnr"><title>Automated Generation of RDF Views over Relational Data Sources</title>
+<sect1 id="rdfrdfviewgnr"><title>Automated Generation of Linked Data Views over Relational Data Sources</title>
 <sect2 id="rdfrdfviewgnrintro"><title>Introduction</title>
 <para>Virtuoso offers from Conductor UI an HTML based Wizard interface for dynamically generating &
 publishing RDF based Linked Data from ODBC or JDBC accessible relational data sources. Basically,
@@ -8269,11 +8672,11 @@ These steps may be largely automated (the "One-Click" Deployment below), or perf
 <para>The following steps provide a one-click guide for publishing ODBC- or JDBC-accessible RDBMS data in RDF Linked Data form, using the "Generate & Publish" Conductor feature.
 </para>
     <orderedlist>
-  <listitem>Go to http://<cname>:port/conductor</listitem>
-  <listitem>Log in as user dba (or another user with DBA privileges)</listitem>
-  <listitem>Follow menu path Database -> RDF Views
+  <listitem>Go to http://<cname>:port/conductor ;</listitem>
+  <listitem>Log in as user dba (or another user with DBA privileges);</listitem>
+  <listitem>Follow menu path Linked Data -> Views;
     <figure id="rd1" float="1">
-      <title>RDF Views</title>
+      <title>Linked Data Views</title>
       <graphic fileref="ui/rd1.png"/>
     </figure>
 </listitem>
@@ -8283,20 +8686,20 @@ These steps may be largely automated (the "One-Click" Deployment below), or perf
 that exposes the Tables / Views for this exercise </listitem>
   <listitem>Enter the Base URL to which your URL rewrite rules will be bound
 (e.g. http://<cname>:8890/Demo)</listitem>
-  <listitem>Select specific Tables containing the data to be published (e.g. Demo.demo.Shippers and Demo.demo.Suppliers)</listitem>
+  <listitem>Select specific Tables containing the data to be published (e.g. Demo.demo.Orders and Demo.demo.Products)</listitem>
   <listitem>Click the "Generate & Publish" button</listitem>
     </orderedlist>
     <figure id="rd2" float="1">
-      <title>RDF Views Generate and Publish</title>
+      <title>Linked Data Views Generate and Publish</title>
       <graphic fileref="ui/rd2.png"/>
     </figure>
 </listitem>
   <listitem>Virtuoso will perform the entire process of ontology generation, instance data generation, and
 linked data deployment (re-write rules generation and application).</listitem>
   <listitem>Error messages will be presented if the Wizard encounters problems. If there are no error
-messages, your RDF view declarations and Linked Data publishing activities will have completed successfully.
+messages, your Linked Data View declarations and Linked Data publishing activities will have completed successfully.
     <figure id="rd13" float="1">
-      <title>RDF View declarations and Linked Data publishing activities</title>
+      <title>Linked Data View declarations and Linked Data publishing activities</title>
       <graphic fileref="ui/rd13.png"/>
     </figure>
       </listitem>
@@ -8304,7 +8707,7 @@ messages, your RDF view declarations and Linked Data publishing activities will
 <orderedlist>
   <listitem>Save Data Mappings: when clicked, offers to save the generated Definitions to local file system</listitem>
   <listitem>Save Ontology Mappings: when clicked, offers to save the generated Ontology to local file system</listitem>
-  <listitem>Click on the "Cancel" should you want to return to the initial RDF View Generation form.</listitem>
+  <listitem>Click on the "Cancel" should you want to return to the initial Linked Data View Generation form.</listitem>
 </orderedlist>
   </listitem>
 </orderedlist>
@@ -8316,9 +8719,9 @@ data in RDF Linked Data form, using the Conductor's HTML-based wizard:
 <orderedlist>
   <listitem>Go to http://<cname>:port/conductor</listitem>
   <listitem>Log in as user dba (or another user with DBA privileges)</listitem>
-  <listitem>Follow menu path Database -> RDF Views
+  <listitem>Follow menu path Linked Data -> Views
     <figure id="rd1" float="1">
-      <title>RDF Views</title>
+      <title>Linked Data Views</title>
       <graphic fileref="ui/rd1.png"/>
     </figure>
 </listitem>
@@ -8327,7 +8730,7 @@ data in RDF Linked Data form, using the Conductor's HTML-based wizard:
       <listitem>Select the Database Name Qualifier (e.g., "Demo") that exposes the Tables / Views for this
 exercise</listitem>
       <listitem>Enter the Base URL to which your URL rewrite rules will be bound (e.g. http://<cname>:8890/Demo)</listitem>
-      <listitem>Select specific Tables containing the data to be published (e.g., Demo.demo.Shippers and Demo.demo.Suppliers)</listitem>
+      <listitem>Select specific Tables containing the data to be published (e.g., Demo.demo.Orders and Demo.demo.Products)</listitem>
       <listitem>Click the "Generate via Wizard" button
         <figure id="rd2" float="1">
           <title>Generate via Wizard</title>
@@ -8337,7 +8740,7 @@ exercise</listitem>
     </orderedlist>
 </listitem>
   <listitem>At this point, you are presented with the option to edit your column selection. Select the
-"Edit" link, for example, for table Demo.demo.Shippers.
+"Edit" link, for example, for table Demo.demo.Products.
     <figure id="rd3" float="1">
       <title>Column Selection</title>
       <graphic fileref="ui/rd3.png"/>
@@ -8346,11 +8749,11 @@ exercise</listitem>
   <listitem>For images or other binary data in MIME formats to be revealed as anything other than generic "binary objects", you must map large
 varbinary types to the appropriate MIME types like image/gif. To do so, select the Edit link for Binding/MIME Type of the relevant table columns.
 You can:
-    <itemizedlist mark="bullet">
+    <orderedlist>
       <listitem>Leave the Binding/MIME Type literal; or</listitem>
       <listitem>Set to skip, such that the column will not be used in RDF generation; or </listitem>
       <listitem>Select the binary object value in order for the column to be referenced as binary.</listitem>
-    </itemizedlist>
+    </orderedlist>
     <figure id="rd14" float="1">
       <title>Binding/MIME Types</title>
       <graphic fileref="ui/rd14.png"/>
@@ -8359,7 +8762,7 @@ You can:
   <listitem>After finishing with your changes click the Save button, or cancel the changes and go back by
 clicking the Cancel button.</listitem>
   <listitem>Make sure you click the "Next" button.</listitem>
-  <listitem>At this point, the RDF View Definition form will let you Select Generation Targets options:
+  <listitem>At this point, the Linked Data View Definition form will let you Select Generation Targets options:
     <orderedlist>
       <listitem>Data Source Ontology Mappings</listitem>
       <listitem>Instance Data View Mappings</listitem>
@@ -8371,7 +8774,7 @@ clicking the Cancel button.</listitem>
     </figure>
 </listitem>
   <listitem>Make sure you click the "Next" button.</listitem>
-  <listitem>Based on your selections in the prior form, the RDF View Definition Deployment Options form will be offered:
+  <listitem>Based on your selections in the prior form, the Linked Data View Definition Deployment Options form will be offered:
     <orderedlist>
       <listitem>Data Source Ontology Rules</listitem>
       <listitem>Instance Data Rules
@@ -8407,10 +8810,10 @@ system</listitem>
       <listitem>Save Ontology Mappings: when clicked, offers to save the generated Ontology to local file
 system</listitem>
       <listitem>Export as WebDAV resource: exports the selected objects/items as a WebDAV resource:
-       <itemizedlist mark="bullet">
+       <orderedlist>
           <listitem>Click "Browse"</listitem>
           <listitem>Enter a WebDAV resource and click the "Select" button.</listitem>
-</itemizedlist>
+        </orderedlist>
         <figure id="rd7" float="1">
           <title>WebDAV resource</title>
           <graphic fileref="ui/rd7.png"/>
@@ -8425,13 +8828,14 @@ system</listitem>
       <graphic fileref="ui/rd8.png"/>
     </figure>
 </listitem>
-  <listitem>Error messages will be presented if the Wizard encounters problems. If there are no error messages, your RDF view declarations and Linked Data publishing activities will have completed successfully.
+  <listitem>Error messages will be presented if the Wizard encounters problems. If there are no error 
+  	messages, your Linked Data View declarations and Linked Data publishing activities will have completed successfully.
     <figure id="rd9" float="1">
-      <title>RDF view declarations and Linked Data publishing activities Finish</title>
+      <title>Linked Data View declarations and Linked Data publishing activities Finish</title>
       <graphic fileref="ui/rd9.png"/>
     </figure>
 </listitem>
-  <listitem>Click on Cancel to return to the initial RDF View Generation form.</listitem>
+  <listitem>Click on Cancel to return to the initial Linked Data View Generation form.</listitem>
 </orderedlist>
 </sect2>
 </sect1>
@@ -8470,7 +8874,7 @@ multiple streams and load these in parallel using this function.</listitem>
       </itemizedlist>
       <para>See <link linkend="rdfperfloading">more details</link> for loading Performance Tuning specifics.</para>
     </sect2>
-    <sect2 id="rdfinsertmethodshttppost"><title>HTTP Post using Content-Type: application/sparql-query</title>
+    <sect2 id="rdfinsertmethodshttppost"><title>SPARQL endpoint REST API</title>
 	<para>With POST can be accomplished SPARQL Insert/Update etc.</para>
 	<para>The result is in the rdf_quad.</para>
 	<para>With GET Methods you can get the triples which are saved.</para>
@@ -8535,7 +8939,7 @@ MS-Author-Via: SPARQL
 Content-Length: 0
 ]]></programlisting>
         <para>Now let's check the inserted triples. Go to the sparql endpoint, i.e. http://localhost:8890/sparql and:</para>
-<itemizedlist>
+<orderedlist>
 <listitem>Enter for Default Graph URI:
 <programlisting><![CDATA[
 http://mygraph.com
@@ -8555,7 +8959,7 @@ http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this   http://www.w3.
 http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this   http://rdfs.org/sioc/ns#creator_of                http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/weblog/kidehen@openlinksw.com%27s%20BLOG%20%5B127%5D/1300
 ]]></programlisting>
    </listitem>
-</itemizedlist>
+</orderedlist>
 </sect2>
      <sect2 id="rdfinsertmethodshttpput"><title>HTTP PUT using Content-Type: application/rdf+xml</title>
 	<para>The URI in a PUT request identifies the entity enclosed with the request. Therefore using HTTP PUT is a more useful and meaningful command than using POST (which is more about submitting data to a script).</para>
@@ -8657,9 +9061,20 @@ curl -F "query=SELECT distinct ?Concept FROM <http://openlinksw.com/dataspace/or
 ]]></programlisting>
     </sect2>
      <sect2 id="rdfinsertmethodsload"><title>SPARQL Insert using LOAD</title>
-        <para>SPARQL INSERT operation can be done using the LOAD feature.</para>
-        <para><emphasis>Example:</emphasis></para>
-        <para>Execute from ISQL:</para>
+        <para>SPARQL INSERT operation can be done using the LOAD features:</para>
+<programlisting><![CDATA[        
+	
+SPARQL INSERT INTO <..> { .... } [[FROM ...] { ... }]
+	
+SPARQL LOAD <x> [INTO <y>]
+
+-- <ResourceURL> will be the Graph IRI of the loaded data:
+SPARQL LOAD <ResourceURL> 
+	
+]]></programlisting> 
+        <para>Examples:</para>               
+<orderedlist>
+   <listitem>Load from ISQL:
 <programlisting><![CDATA[
 SPARQL insert in graph <http://mygraph.com>
     {
@@ -8695,8 +9110,11 @@ SPARQL insert in graph <http://mygraph.com>
   <http://rdfs.org/sioc/ns#id>
   <demo> .};
 ]]></programlisting>
-        <para>Create DAV collection which is visible to public, for ex: http://localhost:8890/DAV/tmp</para>
-        <para>Upload to the DAV collection the following file for ex. with name listall.rq and with the following content:</para>
+   </listitem>
+   <listitem>Load from .rq file:
+     <orderedlist>
+       <listitem>Create DAV collection which is visible to public, for ex: http://localhost:8890/DAV/tmp</listitem>
+       <listitem>Upload to the DAV collection the following file for ex. with name listall.rq and with the following content:
 <programlisting><![CDATA[
 SPARQL
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@@ -8713,7 +9131,8 @@ WHERE
   }
 ORDER BY ?x
 ]]></programlisting>
-        <para>Now from ISQL execute the following command:</para>
+       </listitem>
+       <listitem>Execute from ISQL the following command:
 <programlisting><![CDATA[
 SQL>SPARQL
 load bif:concat ("http://", bif:registry_get("URIQADefaultHost"), "/DAV/tmp/listall.rq") into graph <http://myNewGraph.com>;
@@ -8728,12 +9147,30 @@ Load <http://localhost:8890/DAV/tmp/listall.rq> into graph <http://myNewGraph.co
 
 1 Rows. -- 321 msec.
 ]]></programlisting>
+       </listitem>       
+     </orderedlist>	
+   </listitem>
+   <listitem>Load from Resource URL:
+<programlisting><![CDATA[   	
+SQL> SPARQL LOAD <http://www.w3.org/People/Berners-Lee/card#i>;
+callret-0
+VARCHAR
+_______________________________________________________________________________
+
+Load <http://www.w3.org/People/Berners-Lee/card#i> into graph <http://www.w3.org/People/Berners-Lee/card#i> -- done
+
+1 Rows. -- 703 msec.
+SQL>
+
+]]></programlisting>	
+   </listitem>
+</orderedlist>
     </sect2>
      <sect2 id="rdfindertmethodsparqlendpoint"><title>SPARQL Insert via /sparql endpoint</title>
         <para>SPARQL INSERT operation can be sent to a web service endpoint as a single statement and executed in sequence.</para>
         <para><emphasis>Example:</emphasis></para>
         <para>Using the Virtuoso ISQL tool or using the /sparql UI at http://host:port/sparql, execute the following:</para>
-<itemizedlist>
+<orderedlist>
 <listitem>Insert into graph http://BookStore.com 3 triples:
 <programlisting><![CDATA[
 SQL>SPARQL insert in graph <http://BookStore.com>
@@ -8811,9 +9248,9 @@ http://www.dajobe.org/foaf.rdf#i              http://purl.org/dc/elements/1.1/da
 2 Rows. -- 10 msec.
 ]]></programlisting>
    </listitem>
-</itemizedlist>
+</orderedlist>
 </sect2>
-     <sect2 id="rdfinsertmethodsparqlqueryandodswiki"><title>SPARQL Insert via HTTP Post using Content-Type: application/sparql-query and ODS wiki</title>
+     <sect2 id="rdfinsertmethodsparqlqueryandodswiki"><title>SPARQL Insert via SPARQL endpoint REST API and ODS wiki</title>
         <para>With HTTP Post and ODS wiki can be written an rdf document and respectively to be performed over it INSERT/UPDATE action.</para>
         <para>You can write to a file using SIOC terms for ODS-Wiki</para>
         <para>You can check with sparql the inserted / updated triples in the Quad Store.</para>
@@ -8851,7 +9288,7 @@ i.e. the content will be "test".
    </listitem>
 </itemizedlist>
         <para>Now let's check what data was inserted in the Quad Store:</para>
-<itemizedlist>
+<orderedlist>
 <listitem>Go to the sparql endpoint, i.e. for ex. to http://localhost:8890/sparql</listitem>
 <listitem>Enter for Default Graph URI:
 <programlisting><![CDATA[
@@ -8880,7 +9317,7 @@ http://localhost:8890/dataspace/test3/wiki/testWiki/MyTest  http://rdfs.org/sioc
 http://localhost:8890/dataspace/test3/wiki/testWiki/MyTest  http://atomowl.org/ontologies/atomrdf#source     http://localhost:8890/dataspace/test3/wiki/testWiki
 ]]></programlisting>
    </listitem>
-</itemizedlist>
+</orderedlist>
     </sect2>
     <sect2 id="rdfinsertmethodwebdav">
       <title>Using WebDAV</title>
@@ -8888,7 +9325,7 @@ http://localhost:8890/dataspace/test3/wiki/testWiki/MyTest  http://atomowl.org/o
 the Quad Store is updated automatically, or you can load from DAV manually to quad store)</para>
       <para><emphasis>Example:</emphasis></para>
       <para><emphasis>Example 1: Using ODS Briefcase</emphasis></para>
-      <itemizedlist>
+      <orderedlist>
         <listitem>Go to your ods location, for ex. http://localhost:8890/ods</listitem>
         <listitem>Register user, for ex. user test1</listitem>
         <listitem>Login if not already in ods</listitem>
@@ -8948,7 +9385,7 @@ the Quad Store is updated automatically, or you can load from DAV manually to qu
         <listitem>You can also perform the steps from above by uploading the file in the rdf_sink
 folder i.e. in Briefcase it will be with this path: DAV/home/test2/rdf_sink and respectively the "RDF graph name"
 will have this value: http://host:port/DAV/home/username/rdf_sink/</listitem>
-      </itemizedlist>
+      </orderedlist>
       <para>Execute from ISQL or from the SPARQL endpoint the following query:</para>
 <programlisting><![CDATA[
 SELECT * FROM <http://localhost:8890/DAV/home/test2/mytest/>
@@ -8970,39 +9407,45 @@ http://www.example/jose/foaf.rdf#juan 	  http://www.w3.org/1999/02/22-rdf-syntax
 http://www.example/jose/foaf.rdf#juan 	  http://xmlns.com/foaf/0.1/mbox 	            mailto:juan at mail.example
 ]]></programlisting>
       <para><emphasis>Example 2: Using Conductor UI</emphasis></para>
-      <itemizedlist>
+      <orderedlist>
         <listitem>Go to Conductor UI, for ex. at http://localhost:8890/conductor</listitem>
         <listitem>Login as dba user</listitem>
-        <listitem>Go to RDF -> RDF Store Upload
+        <listitem>Go to Linked Data -> Quad Store Upload
           <figure id="uc1" float="1">
-	    <title>RDF Store Upload</title>
+	    <title>Quad Store Upload</title>
 	    <graphic fileref="ui/uc1.png"/>
           </figure>
   </listitem>
-        <listitem>In the shown form click the "Browse" button in order to select a file, for ex. the file jose.rdf
-and set the "RDF IRI*"
+        <listitem>In the shown form click the "Browse" button in order to select a file, for ex. 
+        	the file jose.rdf and set the "RDF IRI*"
           <figure id="uc2" float="1">
-	    <title>RDF Store Upload</title>
+	    <title>Quad Store Upload</title>
 	    <graphic fileref="ui/uc2.png"/>
           </figure>
   </listitem>
-         <listitem>Click the "Upload" button.</listitem>
-      </itemizedlist>
+         <listitem>Click the "Upload" button.
+          <figure id="uc3" float="1">
+	    <title>Quad Store Upload</title>
+	    <graphic fileref="ui/uc3.png"/>
+          </figure>         	
+         	</listitem>
+      </orderedlist>
     </sect2>
     <sect2 id="rdfinsertmethodvirtuosocrawler">
       <title>Using Virtuoso Crawler</title>
       <para>Using Virtuoso Crawler (which includes the Sponger options so you crawl
 non-RDF but get RDF and this can go to the Quad Store)</para>
       <para><emphasis>Example:</emphasis></para>
-      <para>Go to Conductor UI. For ex. at http://localhost:8890/conductor</para>
-      <para>Login as dba user</para>
-      <para>Go to tab Web Application Server</para>
-      <para>Go to tab Content Imports</para>
-      <para>Click the "New Target" button</para>
-      <para>In the shown form:</para>
-      <itemizedlist>
+      <orderedlist>
+        <listitem>Go to Conductor UI. For ex. at http://localhost:8890/conductor</listitem>
+        <listitem>Login as dba user</listitem>
+        <listitem>Go to tab Web Application Server</listitem>
+        <listitem>Go to tab Content Imports</listitem>
+        <listitem>Click the "New Target" button</listitem>
+        <listitem>In the shown form:
+          <orderedlist>
         <listitem>Enter for "Target description": Tim Berners-Lee's electronic Business Card</listitem>
-        <listitem>Enter for "Target URL": http://www.w3.org/People/Berners-Lee</listitem>
+        <listitem>Enter for "Target URL": http://www.w3.org/People/Berners-Lee/</listitem>
         <listitem>Enter for "Copy to local DAV collection" for ex.: /DAV/home/demo/rdf_sink/</listitem>
         <listitem>Choose from the list "Local resources owner": demo</listitem>
         <listitem>Check the check.box with label "Store metadata".</listitem>
@@ -9014,23 +9457,26 @@ non-RDF but get RDF and this can go to the Quad Store)</para>
 	    <graphic fileref="ui/rdfinsert1.png"/>
           </figure>
         </listitem>
-      </itemizedlist>
-      <para>Click the button "Import Queues".</para>
-      <para>For "Robot target" with label "Tim Berners-Lee's electronic Business Card"
-click the start link.</para>
-      <para>As result should be shown the number of the pages retrieved.</para>
+          </orderedlist>        	
+        </listitem>
+        <listitem>Click the button "Import Queues".</listitem>
+        <listitem>For "Robot target" with label "Tim Berners-Lee's electronic Business Card"
+click the start link.</listitem>
+        <listitem>As result should be shown the number of the pages retrieved.
       <figure id="rdfinsertwebdav2" float="1">
         <title>Using Virtuoso Crawler</title>
 	<graphic fileref="ui/rdfinsert2.png"/>
       </figure>
-      <para>Now using the sparql endpoint with sponger option "Use only local data"
-enter for Default Graph URI: http://www.w3.org/People/Berners-Lee and execute the following query: </para>
+        </listitem>
+        <listitem>Now using the sparql endpoint with sponger option "Use only local data"
+enter for Default Graph URI: http://www.w3.org/People/Berners-Lee and execute the following query:
 <programlisting><![CDATA[
 SELECT *
 FROM <http://www.w3.org/People/Berners-Lee>
 WHERE {?s ?p ?o}
 ]]></programlisting>
-      <para>As result should be shown the following triples:</para>
+        </listitem>
+        <listitem>As result should be shown the following triples:
 <programlisting><![CDATA[
 s                                       p  	                                            o
 http://www.w3.org/People/Berners-Lee 	http://www.w3.org/1999/02/22-rdf-syntax-ns#type     http://xmlns.com/foaf/0.1/Document
@@ -9051,6 +9497,9 @@ http://www.w3.org/People/Berners-Lee 	http://purl.org/dc/elements/1.1/title
 http://www.w3.org/People/Berners-Lee 	http://purl.org/dc/elements/1.1/title 	            Tim Berners-Lee: WWW and UU and I
 http://www.w3.org/People/Berners-Lee 	http://purl.org/dc/elements/1.1/title 	            Tim Berners-Lee: WorldWideWeb, the first Web client
 ]]></programlisting>
+        </listitem>
+        <listitem></listitem>        
+      </orderedlist>      
     <para><emphasis>Example: Use of schedular to interface Virtuoso Quad Store with PTSW using the following program:</emphasis></para>
 <programlisting><![CDATA[
 
@@ -9087,7 +9536,7 @@ insert soft SYS_SCHEDULED_EVENT (SE_SQL, SE_START, SE_INTERVAL, SE_NAME)
       </tip>
     </sect2>
     <sect2 id="rdfinsertmethodsparqlqueryandsponger">
-      <title>Using SPARQL Query and Sponger (i.e. we Sponge the Resources in the FROM Clause or values for the graph-uri parameter in SPARQL protocol URLs)</title>
+      <title>Using SPARQL Query and Sponger (i.e. we Fetch the Network Resources in the FROM Clause or values for the graph-uri parameter in SPARQL protocol URLs)</title>
       <para><emphasis>Example:</emphasis></para>
       <para>Execute the following query: </para>
 <programlisting><![CDATA[
@@ -9210,7 +9659,7 @@ http://cname/DAV/home/username/Public/summary.txt  urn:txt:v0.0:Chars
 </orderedlist>
       <para><emphasis>Important: Setting Sponger Permissions</emphasis></para>
       <para>In order to allow the Sponger to update the local RDF quad store with triples
-constituting the sponged structured data, the role "SPARQL_SPONGE" must be granted to the
+constituting the fetched Network Resource structured data, the role "SPARQL_SPONGE" must be granted to the
 account "SPARQL", i.e., to the owner account of /sparql web service endpoint.
 This should normally be the case. If not, you must manually grant this
 permission. As with most Virtuoso DBA tasks, the Conductor provides the simplest means of
@@ -9497,8 +9946,8 @@ limit 10;
         <para>But what if some or all of these resources were not present in Virtuoso's quad store? 
         	The highly distributed nature of the Linked Data Web makes it highly likely that these 
         	interlinked resources would be spread across several data spaces. Virtuoso's 'input:grab-...' 
-        	extensions to SPARQL enable IRI dereferencing in such a way that all appropriate resources 
-        	are loaded, i.e. "sponged", during query execution, even if some of the resources are not 
+        	extensions to SPARQL enable IRI dereferencing in such a way that all appropriate Network resources 
+        	are loaded, i.e. "being fetched", during query execution, even if some of the Network resources are not 
         	known beforehand. For any particular resource matched, and if necessary downloaded, by the 
         	query, it is possible to download related resources via a designated predicate path(s) to 
         	a specifiable depth i.e. number of 'hops', distance, or degrees of separation (i.e compute 
@@ -9567,7 +10016,7 @@ limit 10;
           </itemizedlist>
       </sect4>
       <sect4 id="virtuosospongerusageprocessorex"><title>SPARQL Processor Usage Example</title>
-        <para>Sponge can be performed directly from within the SPARQL processor.</para>
+        <para>Network Resource Fetch can be performed directly from within the SPARQL processor.</para>
         <para>After logging into Virtuoso's Conductor interface, the following query can be 
         issued from the Interactive SQL (iSQL) panel: 
         </para> 	
@@ -9578,7 +10027,7 @@ define get:soft "soft"
 select * from <http://mygraph> where {?s ?p ?o}
 ]]></programlisting>        
         <para>Here the sparql keyword invokes the SPARQL processor from the SQL interface and the 
-        	RDF data sponged from page http://www.ivan-herman.net/foaf.html is loaded into the local 
+        	RDF data fetched from page http://www.ivan-herman.net/foaf.html is loaded into the local 
         	RDF quad store as graph http://mygraph .
         </para>	
         <para>The new graph can then be queried using the basic SPARQL client normally available 
@@ -9601,7 +10050,7 @@ the service uses the path '/proxy/rdf/'.</para>
     <para>Note: The old Sponger Proxy URI Service pattern '/proxy/' is now deprecated.</para>
       <sect4 id="virtuosospongerusageproxyex1"><title>Example 1</title>
     <para>The following URLs return information about musician John Cale, gleaned from the MusicBrainz
-music metadatabase, rendered as RDF or HTML respectively. (The sponged data is available in the HTML
+music metadatabase, rendered as RDF or HTML respectively. (The Network Resource fetched data is available in the HTML
 rendering through the foaf:primaryTopic property.)</para>
     <itemizedlist mark="bullet">
       <listitem>http://demo.openlinksw.com/about/rdf/http://musicbrainz.org/artist/72c090b6-a68e-4cb9-b330-85278681a714.html</listitem>
@@ -9615,14 +10064,63 @@ rendering through the foaf:primaryTopic property.)</para>
         	RDF, as can be seen by executing:
         </para>
 <programlisting><![CDATA[
-curl -H "Accept: application/rdf+xml" http://linkeddata.uriburner.com/about/rdf/http://www.ivan-herman.net/foaf.html	
+$ curl -L -H "Accept:application/rdf+xml" http://linkeddata.uriburner.com/about/id/entity/http/www.ivan-herman.net/foaf.html
+<?xml version="1.0" encoding="utf-8" ?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
+  <rdf:Description rdf:about="http://linkeddata.uriburner.com/about/id/http/www.ivan-herman.net/foaf.html#Person1Stat"><scovo:dimension xmlns:scovo="http://purl.org/NET/scovo#" rdf:resource="http://rdfs.org/ns/void#numberOfResources"/></rdf:Description>
+  <rdf:Description rdf:nodeID="b145981159"><rdf:rest rdf:nodeID="b145981158"/></rdf:Description>
+  <rdf:Description rdf:about="http://linkeddata.uriburner.com/about/id/entity/http/www.mendeley.com/profiles/ivan-herman"><foaf:accountName xmlns:foaf="http://xmlns.com/foaf/0.1/">ivan-herman</foaf:accountName></rdf:Description>	
+  etc ..
+  <rdf:Description rdf:nodeID="b145981130"><http-voc:elementName xmlns:http-voc="http://www.w3.org/2006/http#">text/html</http-voc:elementName></rdf:Description>
+</rdf:RDF>
 ]]></programlisting>
         <para>(linkeddata.uriburner.com hosts a public Virtuoso instance.) Though this example 
-        	demonstrates the action of the /about/rdf/ service quite transparently, it is a basic and 
+        	demonstrates the action of the /about/id/entity/ service quite transparently, it is a basic and 
         	unwieldy way to view RDF. As described earlier, the OpenLink Data Explorer uses the same 
-        	proxy service to provide a more polished means to extract and view sponged RDF data.
+        	proxy service to provide a more polished means to extract and view fetched RDF data.
         </para>	
       </sect4>
+      <sect4 id="virtuosospongerusageproxyurlist"><title>Usage of the Sponger Middleware via REST patterns</title>
+        <para>Delegation and proxies are part of the Internet and Web's federated architecture. Thus, 
+        	developers of RESTful applications benefit immensely from the ability to leverage Sponger 
+        	functionality via delegation to it as a proxy.</para>
+        <para>The following table presents list of the supported URL parameters:</para>
+        <table>
+          <tgroup cols="4">
+            <thead>
+              <row>
+                <entry>Parameter</entry><entry>Value</entry><entry>Description</entry><entry>Example</entry>
+              </row>
+            </thead>
+            <tbody>
+              <row>
+                <entry><emphasis>refresh</emphasis></entry>
+                <entry>clean</entry>
+                <entry><emphasis>Usage</emphasis>: for overwriting. <br/>The 'clean' usage explicitly clears the graph i.e. will cause the Sponger to drop cache even if it is marked to be in the fly.<br/>Thus, if fetched cache by some reason is left in some inconsistent state like shutdown during Network Resource fetching, then 'clean' is required as it doesn't check cache state.<br/><emphasis>Note</emphasis>: must be used with caution as other threads may be doing fetching of network resources at same time.</entry>
+                <entry><ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?@Lookup@=&refresh=clean">Explicitly clear the graph</ulink></entry>
+              </row>
+              <row>
+                <entry><emphasis>sponger:get</emphasis></entry>
+                <entry>add</entry>
+                <entry><emphasis>Usage</emphasis>: Add new triples to named graphs, progressively. This is the default value for the parameter sponger:get. May be used together with refresh=<seconds> to overwrite the expiration in the cache.</entry>
+                <entry><ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?sponger:get=add&refresh=10">Add new triples and refresh on every 10 seconds</ulink></entry>
+              </row>            
+              <row>
+                <entry><emphasis>sponger:get</emphasis></entry>
+                <entry>soft</entry>
+                <entry><emphasis>Usage</emphasis>: Network Resource Fetch data subject to cache invalidation mode and associated rules of instance. May be used together with refresh=<seconds> to overwrite the expiration in the cache.</entry>
+                <entry><ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?sponger:get=soft&refresh=10">Network Resource Fetch data with option <emphasis>soft</emphasis> and refresh on every 10 seconds</ulink></entry>
+              </row>            
+              <row>
+                <entry><emphasis>sponger:get</emphasis></entry>
+                <entry>replace</entry>
+                <entry><emphasis>Usage</emphasis>: Replace subject to cache invalidation mode and rules, but coverage includes non fetched triples if such exist in a given named graph. may be used together with refresh=<seconds> to overwrite the expiration in the cache.</entry>
+                <entry><ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?sponger:get=replace&refresh=10">Replace data and refresh on every 10 seconds</ulink></entry>
+              </row>               
+            </tbody>
+          </tgroup>
+        </table>
+      </sect4>
     </sect3>
     <sect3 id="virtuosospongerusageclapp"><title>OpenLink RDF Client Applications</title>
       <para>OpenLink currently provides two main RDF client applications:</para>
@@ -9644,9 +10142,9 @@ curl -H "Accept: application/rdf+xml" http://linkeddata.uriburner.com/about/rdf/
         <title>Launching ODE's RDF browser</title>
         <graphic fileref="twitter_home.png"/>
       </figure>
-      <para>The RDF browser then displays RDF data sponged via the Crunchbase cartridge.</para>
+      <para>The RDF browser then displays RDF data fetched via the Crunchbase cartridge.</para>
       <figure id="ODEBrowserRDF" float="1">
-        <title>ODE RDF browser displaying sponged Crunchbase data</title>
+        <title>ODE RDF browser displaying Crunchbase network resource fetched data</title>
         <graphic fileref="twitter_ode_rdf.png"/>
       </figure>      
       <para>iSPARQL directs queries to the configured SPARQL endpoint. When targetting a Virtuoso 
@@ -9738,11 +10236,19 @@ $ curl -v -T wine.rdf -H content-type:application/rdf+xml http://demo.openlinksw
         </para>
         <figure id="cninp1" float="1">
           <title>Conductor's content import configuration panel</title>
-          <graphic fileref="fig2_top.jpg"/>
+          <graphic fileref="fig2_top.png"/>
+        </figure>
+        <figure id="cninp2" float="1">
+          <title>Conductor's content import configuration panel</title>
+          <graphic fileref="fig2_bottom.png"/>
         </figure>
         <figure id="cninp2" float="1">
           <title>Conductor's content import configuration panel</title>
-          <graphic fileref="fig2_bottom.jpg"/>
+          <graphic fileref="fig2_bottom2.png"/>
+        </figure>  
+        <figure id="cninp2" float="1">
+          <title>Conductor's content import configuration panel</title>
+          <graphic fileref="fig2_bottom3.png"/>
         </figure>
        </sect4> 
     </sect3>
@@ -9906,7 +10412,7 @@ example: http://www.google.com/base/feeds/snippets/17891817243016304554
   </tgroup>
 </table>
 <sect3 id="virtuosospongerrdfmappers"><title>SPARQL IRI Dereferencing</title>
-<para>The Virtuoso SPARQL engine (called for brevity just SPARQL bellow) supports IRI Dereferencing,
+<para>The Virtuoso SPARQL engine (called for brevity just SPARQL below) supports IRI Dereferencing,
 however it understands only RDF data, that is it can retrieve only files containing RDF/XML, turtle
 or N3 serialized RDF data, if format is unknown it will try mapping with built-in WebDAV metadata
 extractor. In order to extend this feature with dereferencing web or file resources which naturally
@@ -9993,7 +10499,7 @@ SPARQL clear graph <A-Named-Graph>;
 </tgroup>
 </table>
     </sect4>
-    <sect4 id="virtuosospongercartridgesnonstand"><title>Supported Standard Non-RDF Data Formats</title>
+    <sect4 id="virtuosospongercartridgesnonstand"><title>Supported Vendor-specific Non-RDF Data Formats</title>
 <para>These Cartridges handle closed formats - typically proprietary; sometimes undocumented; possibly 
 	licensed to no-one except the format originator. Sometimes data may not be parsed as desired or 
 	expected, as many of these Cartridges have required reverse-engineering of the data format 
@@ -10002,73 +10508,74 @@ SPARQL clear graph <A-Named-Graph>;
 <tgroup cols="4">
 <thead>
   <row>
-    <entry>Cartridge</entry><entry>Sample URI</entry><entry>Resource Description</entry><entry>Linked Data Graph</entry>
+              <entry>Cartridge</entry><entry>Needs</entry><entry>Sample URI</entry><entry>Resource Description</entry><entry>Linked Data Graph</entry>
   </row>
 </thead>
 <tbody>
-<row><entry>Amazon</entry><entry>   <ulink url="http://www.amazon.com/gp/product/0553383043">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.amazon.com/gp/product/0553383043">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/gp/product/0553383043">Data Explorer View</ulink> </entry></row>
-<row><entry>BestBuy</entry><entry>   <ulink url="http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">Data Explorer View</ulink> </entry></row>
-<row><entry>Bing</entry><entry>   <ulink url="http://www.bing.com/community/members/livesearch/default.aspx">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.bing.com/community/members/livesearch/default.aspx">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.bing.com/community/members/livesearch/default.aspx">Data Explorer View</ulink> </entry></row>
-<row><entry>Bugzillas</entry><entry>   <ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=251714">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/https://bugzilla.mozilla.org/show_bug.cgi?id=251714">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=https://bugzilla.mozilla.org/show_bug.cgi?id=251714">Data Explorer View</ulink> </entry></row>
-<row><entry>CNET</entry><entry>   <ulink url="http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html">Data Explorer View</ulink> </entry></row>
-<row><entry>CrunchBase</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos">Data Explorer View</ulink> </entry></row>
-<row><entry>Delicious</entry><entry>   <ulink url="http://delicious.com/popular/blog">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/delicious.com/popular/blog">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://delicious.com/popular/blogI">Data Explorer View</ulink> </entry></row>
-<row><entry>Digg</entry><entry>   <ulink url="http://digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_">Data Explorer View</ulink> </entry></row>
-<row><entry>Discogs</entry><entry>   <ulink url="http://www.discogs.com/Todd-Barton-and...ic-Poetry-Of-The-Kesh/release/2053074">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink> </entry></row>
-<row><entry>Disqus</entry><entry>   <ulink url="http://www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread">Data Explorer View</ulink> </entry></row>
-<row><entry>DOI</entry><entry>   <ulink url="http://doi.ieeecomputersociety.org/10.1109/MIC.2008.16">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/doi.ieeecomputersociety.org/10.1109/MIC.2008.16">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://doi.ieeecomputersociety.org/10.1109/MIC.2008.16">Data Explorer View</ulink> </entry></row>
-<row><entry>Dublin Core</entry><entry>   <ulink url="http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml">Data Explorer View</ulink> </entry></row>
-<row><entry>eBay</entry><entry>   <ulink url="http://cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776">Data Explorer View</ulink> </entry></row>
-<row><entry>Evri</entry><entry>   <ulink url="http://www.evri.com/organization/general-motors-0x4938f">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.evri.com/organization/general-motors-0x4938f">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.evri.com/organization/general-motors-0x4938f">Data Explorer View</ulink> </entry></row>
-<row><entry>FaceBook</entry><entry>   <ulink url="http://www.facebook.com/people/Richard-Max-Koster/1319314117">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.facebook.com/people/Richard-Max-Koster/1319314117">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.facebook.com/people/Richard-Max-Koster/1319314117">Data Explorer View</ulink> </entry></row>
-<row><entry>Flickr</entry><entry>   <ulink url="http://farm1.static.flickr.com/212/496684670_7122c831ed.jpg">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink> </entry></row>
-<row><entry>Freebase</entry><entry>   <ulink url="http://www.freebase.com/view/location">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.freebase.com/view/location">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.freebase.com/view/location">Data Explorer View</ulink> </entry></row>
-<row><entry>Geonames</entry><entry>   <ulink url="http://ws.geonames.org/search?q=london&amp;maxRows=10&amp;type=rdf">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/ws.geonames.org/search?q=london&amp;maxRows=10&amp;type=rdf">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://ws.geonames.org/search?q=london&amp;maxRows=10&amp;type=rdf">Data Explorer View</ulink> </entry></row>
-<row><entry>geoURL</entry><entry>   <ulink url="http://geourl.org/near?p=wiki.worldflicks.org/saanen.html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/geourl.org/near?p=wiki.worldflicks.org/saanen.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://geourl.org/near?p=wiki.worldflicks.org/saanen.html">Data Explorer View</ulink> </entry></row>
-<row><entry>Get Satisfaction</entry><entry>   <ulink url="http://getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc">Data Explorer View</ulink> </entry></row>
-<row><entry>Google Base</entry><entry>   <ulink url="http://www.google.com/base/feeds/snippets">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.google.com/base/feeds/snippets/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/base/feeds/snippets">Data Explorer View</ulink> </entry></row>
-<row><entry>Google Book</entry><entry>   <ulink url="http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata">Data Explorer View</ulink> </entry></row>
-<row><entry>Google Document</entry><entry>   <ulink url="http://docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp">Data Explorer View</ulink> </entry></row>
-<row><entry>Google Social Graph</entry><entry>   <ulink url="http://socialgraph.apis.google.com/lookup?q=http://example.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/socialgraph.apis.google.com/lookup?q=http://example.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://socialgraph.apis.google.com/lookup?q=http://example.com/">Data Explorer View</ulink> </entry></row>
-<row><entry>Google Spreadsheet</entry><entry>   <ulink url="http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">Data Explorer View</ulink> </entry></row>
-<row><entry>Hoovers</entry><entry>   <ulink url="http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">Data Explorer View</ulink> </entry></row>
-<row><entry>ISBN</entry><entry>   <ulink url="http://isbndb.com/search-all.html?kw=King+Stephen">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/isbndb.com/search-all.html?kw=King+Stephen">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://isbndb.com/search-all.html?kw=King+Stephen">Data Explorer View</ulink> </entry></row>
-<row><entry>LastFM</entry><entry>   <ulink url="http://www.last.fm/music/+noredirect/Teddy+Pendegrass">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.last.fm/music/+noredirect/Teddy+Pendegrass">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.last.fm/music/+noredirect/Teddy+Pendegrass">Data Explorer View</ulink> </entry></row>
-<row><entry>LibraryThing</entry><entry>   <ulink url="http://www.librarything.com/work/1060">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.librarything.com/work/1060">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.librarything.com/work/1060">Data Explorer View</ulink> </entry></row>
-<row><entry>LSID</entry><entry>   <ulink url="http://lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815">Data Explorer View</ulink> </entry></row>
-<row><entry>Meetup</entry><entry>   <ulink url="http://www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/">Data Explorer View</ulink> </entry></row>
-<row><entry>MusicBrainz</entry><entry>   <ulink url="http://musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html">Data Explorer View</ulink> </entry></row>
-<row><entry>Ning Metadata</entry><entry>   <ulink url="http://www.ning.com/search?q=new+york+city&sf=rs&rs=1">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.ning.com/search?q=new+york+city&sf=rs&rs=1">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ning.com/search?q=new+york+city&sf=rs&rs=1">Data Explorer View</ulink> </entry></row>
-<row><entry>OAI</entry><entry>   <ulink url="http://news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html">Data Explorer View</ulink> </entry></row>
-<row><entry>Open Social</entry><entry>   <ulink url="http://socialgraph.apis.google.com/otherme?pretty=1&amp;q=www.openlinksw.com/blog/~kidehen/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/socialgraph.apis.google.com/otherme?pretty=1&amp;q=www.openlinksw.com/blog/~kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://socialgraph.apis.google.com/otherme?pretty=1&amp;q=www.openlinksw.com/blog/~kidehen/">Data Explorer View</ulink> </entry></row>
-<row><entry>OpenLibrary</entry><entry>   <ulink url="http://openlibrary.org/b/OL1230137M">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/openlibrary.org/b/OL1230137M">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://openlibrary.org/b/OL1230137M">Data Explorer View</ulink> </entry></row>
-<row><entry>OpenStreetMap</entry><entry>   <ulink url="http://openstreetmap.org/?lat=57.6569&amp;lon=11.8886&amp;zoom=14&amp;layers=B000FTF">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/openstreetmap.org/?lat=57.6569&amp;lon=11.8886&amp;zoom=14&amp;layers=B000FTF">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://openstreetmap.org/?lat=57.6569&amp;lon=11.8886&amp;zoom=14&amp;layers=B000FTF">Data Explorer View</ulink> </entry></row>
-<row><entry>oReilly</entry><entry>   <ulink url="http://oreilly.com/catalog/9780596523206/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/oreilly.com/catalog/9780596523206/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://oreilly.com/catalog/9780596523206/">Data Explorer View</ulink> </entry></row>
-<row><entry>Picasa</entry><entry>   <ulink url="http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin">Data Explorer View</ulink> </entry></row>
-<row><entry>PowerPoint</entry><entry>   <ulink url="http://virtuoso.openlinksw.com/presentations/Creating_Deploying_Exploiting_Linked_Data2/Linked_Data_2008_keynote.ppt">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/virtuoso.openlinksw.com/presentations/Creating_Deploying_Exploiting_Linked_Data2/Linked_Data_2008_keynote.ppt">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://virtuoso.openlinksw.com/presentations/Creating_Deploying_Exploiting_Linked_Data2/Linked_Data_2008_keynote.ppt">Data Explorer View</ulink> </entry></row>
-<row><entry>Radio Pop</entry><entry>   <ulink url="http://www.radiopop.co.uk/users/tristanf/friends.xml">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.radiopop.co.uk/users/tristanf/friends.xml">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.radiopop.co.uk/users/tristanf/friends.xml">Data Explorer View</ulink> </entry></row>
-<row><entry>relLicense</entry><entry>   <ulink url="http://creativecommons.org/licenses/by-nc/3.0/us/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/creativecommons.org/licenses/by-nc/3.0/us/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://creativecommons.org/licenses/by-nc/3.0/us/">Data Explorer View</ulink> </entry></row>
-<row><entry>Revyu</entry><entry>   <ulink url="http://revyu.com/people/smonroe/about/html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/revyu.com/people/smonroe/about/html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://revyu.com/people/smonroe/about/html">Data Explorer View</ulink> </entry></row>
-<row><entry>Rhapsody</entry><entry>   <ulink url="http://mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413">Data Explorer View</ulink> </entry></row>
-<row><entry>SalesForce.com</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this">Data Explorer View</ulink> </entry></row>
-<row><entry>SlideShare</entry><entry>   <ulink url="http://www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/">Data Explorer View</ulink> </entry></row>
-<row><entry>SlideSix</entry><entry>   <ulink url="http://slidesix.com/view/ESWC2008SPARQLBIOpenLink">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/slidesix.com/view/ESWC2008SPARQLBIOpenLink">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://slidesix.com/view/ESWC2008SPARQLBIOpenLink">Data Explorer View</ulink> </entry></row>
-<row><entry>SVG</entry><entry>   <ulink url="http://www.schepers.cc/semweb/rdf-diagram.svg">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.schepers.cc/semweb/rdf-diagram.svg">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.schepers.cc/semweb/rdf-diagram.svg">Data Explorer View</ulink> </entry></row>
-<row><entry>Tesco</entry><entry>   <ulink url="http://www.tesco.com/superstore/xpi/6/xpi54427686.htm">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.tesco.com/superstore/xpi/6/xpi54427686.htm">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.tesco.com/superstore/xpi/6/xpi54427686.htm">Data Explorer View</ulink> </entry></row>
-<row><entry>Tumblr</entry><entry>   <ulink url="http://cupcakesoftheday.tumblr.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://cupcakesoftheday.tumblr.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://cupcakesoftheday.tumblr.com/">Data Explorer View</ulink> </entry></row>
-<row><entry>TWFY (theyworkforyou)</entry><entry>   <ulink url="http://www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington">Data Explorer View</ulink> </entry></row>
-<row><entry>Twitter</entry><entry>   <ulink url="http://twitter.com/kidehen">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://twitter.com/kidehen">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/kidehen">Data Explorer View</ulink> </entry></row>
-<row><entry>Ustream</entry><entry>   <ulink url="http://www.ustream.tv/recorded/4848859/highlight/55618">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.ustream.tv/recorded/4848859/highlight/55618">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ustream.tv/recorded/4848859/highlight/55618">Data Explorer View</ulink> </entry></row>
-<row><entry>Web Resource CC (Licenses) </entry><entry>   <ulink url="http://creativecommons.org/licenses/by-nc-nd/2.5/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/creativecommons.org/licenses/by-nc-nd/2.5/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://creativecommons.org/licenses/by-nc-nd/2.5/">Data Explorer View</ulink> </entry></row>
-<row><entry>Wikipedia</entry><entry>   <ulink url="http://en.wikipedia.org/wiki/House_MD">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://en.wikipedia.org/wiki/House_MD">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://en.wikipedia.org/wiki/House_MD">Data Explorer View</ulink> </entry></row>
-<row><entry>xFolk</entry><entry>   <ulink url="http://blogmarks.net/marks/tag/hdd">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/blogmarks.net/marks/tag/hdd">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://blogmarks.net/marks/tag/hdd">Data Explorer View</ulink> </entry></row>
-<row><entry>Yahoo! Finance</entry><entry>   <ulink url="http://finance.yahoo.com/q?s=AAPL">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/finance.yahoo.com/q?s=AAPL">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://finance.yahoo.com/q?s=AAPL">Data Explorer View</ulink> </entry></row>
-<row><entry>Yahoo! SearchMonkey</entry><entry>   <ulink url="http://tech.groups.yahoo.com/group/ysearchboss/message/1983">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/tech.groups.yahoo.com/group/ysearchboss/message/1983">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://tech.groups.yahoo.com/group/ysearchboss/message/1983">Data Explorer View</ulink> </entry></row>
-<row><entry>Yahoo! Traffic Data</entry><entry>   <ulink url="http://local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA">Data Explorer View</ulink> </entry></row>
-<row><entry>Yahoo! Weather</entry><entry>   <ulink url="http://weather.yahooapis.com/forecastrss?p=94089">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/weather.yahooapis.com/forecastrss?p=94089">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://weather.yahooapis.com/forecastrss?p=94089">Data Explorer View</ulink> </entry></row>
-<row><entry>Yelp</entry><entry>   <ulink url="http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX">Data Explorer View</ulink> </entry></row>
-<row><entry>Youtube</entry><entry>   <ulink url="http://www.youtube.com/watch?v=rOsPKjbMvxY">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.youtube.com/watch?v=rOsPKjbMvxY">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.youtube.com/watch?v=rOsPKjbMvxY">Data Explorer View</ulink> </entry></row>
-<row><entry>Zillow</entry><entry>   <ulink url="http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid">Data Explorer View</ulink> </entry></row>
+            <row><entry>Amazon</entry><entry>API Key</entry><entry><ulink url="http://www.amazon.com/gp/product/0553383043">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.amazon.com/gp/product/0553383043">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/gp/product/0553383043">Data Explorer View</ulink>  </entry></row>
+            <row><entry>BestBuy</entry><entry> API Key </entry><entry><ulink url="http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Bing</entry><entry> none </entry><entry><ulink url="http://www.bing.com/community/members/livesearch/default.aspx">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.bing.com/community/members/livesearch/default.aspx">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.bing.com/community/members/livesearch/default.aspx">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Bugzillas</entry><entry> none</entry><entry><ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=251714">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/https://bugzilla.mozilla.org/show_bug.cgi?id=251714">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=https://bugzilla.mozilla.org/show_bug.cgi?id=251714">Data Explorer View</ulink>  </entry></row>
+            <row><entry>CNET</entry><entry> API Key </entry><entry><ulink url="http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/http://shopper.cnet.com/samsung-moment-sprint/4014-6452_9-33775546.html">Data Explorer View</ulink>  </entry></row>
+            <row><entry>CrunchBase</entry><entry> none </entry><entry><ulink url="http://linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/http://www.crunchbase.com/company/radar-music-videos">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Delicious</entry><entry> none </entry><entry><ulink url="http://delicious.com/popular/blog">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/delicious.com/popular/blog">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://delicious.com/popular/blogI">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Digg</entry><entry> none </entry><entry><ulink url="http://digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://digg.com/general_sciences/At_Last-Stem_Cells_without_Side_Effects_">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Discogs</entry><entry> php plugin, DBpedia Extractor </entry><entry><ulink url="http://www.discogs.com/Todd-Barton-and...ic-Poetry-Of-The-Kesh/release/2053074">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Disqus</entry><entry> API Key, API Account </entry><entry><ulink url="http://www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.scripting.com/stories/2009/02/01/wheresYourData.html#disqus_thread">Data Explorer View</ulink>  </entry></row>
+            <row><entry>DOI</entry><entry> hslookup plugin; relevant html-, pdf-, xml-, etc., -mappers enabled </entry><entry><ulink url="http://doi.ieeecomputersociety.org/10.1109/MIC.2008.16">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/doi.ieeecomputersociety.org/10.1109/MIC.2008.16">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://doi.ieeecomputersociety.org/10.1109/MIC.2008.16">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Dublin Core</entry><entry> none </entry><entry><ulink url="http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.shtml">Data Explorer View</ulink>  </entry></row>
+            <row><entry>eBay</entry><entry> account, API Key </entry><entry><ulink url="http://cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://cell-phones.shop.ebay.com/Cell-Phones-Smartphones-/3312/i.html?LH_TopRatedSellers=1&LH_ItemCondition=1&Brand=Apple%2520iPhone&LH_Price=100..%40c&_nkw=%22iphone+4%22&_trkparms=65%253A15%257C66%253A2%257C39%253A1&_dmd=1&_dmpt=Cell_Phones&_mPrRngCbx=1&_sc=1&_sticky=1&_trksid=p3907.m551&_sop=12&_sc=1%26clkid%3D6198561558861688578&_qi=RTM733776">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Evri</entry><entry> none </entry><entry><ulink url="http://www.evri.com/organization/general-motors-0x4938f">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.evri.com/organization/general-motors-0x4938f">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.evri.com/organization/general-motors-0x4938f">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Facebook</entry><entry> API key and secret, OAuth token <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtCartConfigFacebook">See details</ulink></entry><entry><ulink url="http://www.facebook.com/people/Richard-Max-Koster/1319314117">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.facebook.com/people/Richard-Max-Koster/1319314117">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.facebook.com/people/Richard-Max-Koster/1319314117">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Flickr</entry><entry> API Key </entry><entry><ulink url="http://farm1.static.flickr.com/212/496684670_7122c831ed.jpg">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Freebase</entry><entry> none </entry><entry><ulink url="http://www.freebase.com/view/location">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.freebase.com/view/location">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.freebase.com/view/location">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Geonames</entry><entry> none </entry><entry><ulink url="http://ws.geonames.org/search?q=london&amp;maxRows=10&amp;type=rdf">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/ws.geonames.org/search?q=london&amp;maxRows=10&amp;type=rdf">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://ws.geonames.org/search?q=london&amp;maxRows=10&amp;type=rdf">Data Explorer View</ulink>  </entry></row>
+            <row><entry>geoURL</entry><entry> none </entry><entry><ulink url="http://geourl.org/near?p=wiki.worldflicks.org/saanen.html">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/geourl.org/near?p=wiki.worldflicks.org/saanen.html">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://geourl.org/near?p=wiki.worldflicks.org/saanen.html">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Get Satisfaction</entry><entry> none </entry><entry><ulink url="http://getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://getsatisfaction.com/mozilla/topics/ubiquity_mostly_fails_on_mac_ppc">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Google+</entry><entry>API key <ulink url="http://edit-wiki.usnet.private/dataspace/dav/wiki/VOS/VirtCartConfigGooglePlus">See details</ulink></entry><entry><ulink url="https://plus.google.com/106795562240032292110">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/https/plus.google.com/106795562240032292110">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=https://plus.google.com/106795562240032292110">Data Explorer View</ulink>  </entry></row>            
+            <row><entry>Google Base</entry><entry> none </entry><entry><ulink url="http://www.google.com/base/feeds/snippets">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.google.com/base/feeds/snippets/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/base/feeds/snippets">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Google Book</entry><entry> none  </entry><entry><ulink url="http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://books.google.com/books?id=SRadJIuhVjAC&dq=GOOGLE&ie=ISO-8859-1&source=gbs_gdata">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Google Document</entry><entry> none </entry><entry><ulink url="http://docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://docs.google.com/Present?docid=dc7jvc6m_1056g8fs54hp">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Google Social Graph</entry><entry> none </entry><entry><ulink url="http://socialgraph.apis.google.com/lookup?q=http://example.com/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/socialgraph.apis.google.com/lookup?q=http://example.com/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://socialgraph.apis.google.com/lookup?q=http://example.com/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Google Spreadsheet</entry><entry> none </entry><entry><ulink url="http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Hoovers</entry><entry> none </entry><entry><ulink url="http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">Data Explorer View</ulink>  </entry></row>
+            <row><entry>ISBN</entry><entry> API Key </entry><entry><ulink url="http://isbndb.com/search-all.html?kw=King+Stephen">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/isbndb.com/search-all.html?kw=King+Stephen">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://isbndb.com/search-all.html?kw=King+Stephen">Data Explorer View</ulink>  </entry></row>
+            <row><entry>LastFM</entry><entry> API Key </entry><entry><ulink url="http://www.last.fm/music/+noredirect/Teddy+Pendegrass">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.last.fm/music/+noredirect/Teddy+Pendegrass">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.last.fm/music/+noredirect/Teddy+Pendegrass">Data Explorer View</ulink>  </entry></row>
+            <row><entry>LibraryThing</entry><entry> API Key </entry><entry><ulink url="http://www.librarything.com/work/1060">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.librarything.com/work/1060">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.librarything.com/work/1060">Data Explorer View</ulink>  </entry></row>
+            <row><entry>LinkedIn</entry><entry> API key and secret, OAuth token <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtCartConfigLinkedIn">See details</ulink> </entry><entry><ulink url="http://www.linkedin.com/in/kidehen">example</ulink></entry><entry><ulink url="http://uriburner.com/about/html/http/uriburner.com/about/id/entity/http/www.linkedin.com/in/kidehen">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.linkedin.com/in/kidehen">Data Explorer View</ulink>  </entry></row>
+            <row><entry>LSID</entry><entry> none </entry><entry><ulink url="http://lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://lsid.tdwg.org/urn:lsid:ubio.org:namebank:11815">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Meetup</entry><entry> API Key </entry><entry><ulink url="http://www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.meetup.com/Nonpracticing-Lawyers-Social-Support-Group/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>MusicBrainz</entry><entry> none </entry><entry><ulink url="http://musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://musicbrainz.org/release/37e955d4-a53c-45aa-a812-1b23b88dbc13.html">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Ning Metadata</entry><entry> none </entry><entry><ulink url="http://www.ning.com/search?q=new+york+city&sf=rs&rs=1">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.ning.com/search?q=new+york+city&sf=rs&rs=1">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ning.com/search?q=new+york+city&sf=rs&rs=1">Data Explorer View</ulink>  </entry></row>
+            <row><entry>OAI</entry><entry> none </entry><entry><ulink url="http://news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://news.cnet.com/IBM%2C-screensaver-to-tackle-smallpox/2100-1008_3-983374.html">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Open Social</entry><entry> none </entry><entry><ulink url="http://socialgraph.apis.google.com/otherme?pretty=1&amp;q=www.openlinksw.com/blog/~kidehen/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/socialgraph.apis.google.com/otherme?pretty=1&amp;q=www.openlinksw.com/blog/~kidehen/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://socialgraph.apis.google.com/otherme?pretty=1&amp;q=www.openlinksw.com/blog/~kidehen/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>OpenLibrary</entry><entry> none </entry><entry><ulink url="http://openlibrary.org/b/OL1230137M">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/openlibrary.org/b/OL1230137M">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://openlibrary.org/b/OL1230137M">Data Explorer View</ulink>  </entry></row>
+            <row><entry>OpenStreetMap</entry><entry> none </entry><entry><ulink url="http://openstreetmap.org/?lat=57.6569&amp;lon=11.8886&amp;zoom=14&amp;layers=B000FTF">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/openstreetmap.org/?lat=57.6569&amp;lon=11.8886&amp;zoom=14&amp;layers=B000FTF">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://openstreetmap.org/?lat=57.6569&amp;lon=11.8886&amp;zoom=14&amp;layers=B000FTF">Data Explorer View</ulink>  </entry></row>
+            <row><entry>oReilly</entry><entry> none </entry><entry><ulink url="http://oreilly.com/catalog/9780596523206/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/oreilly.com/catalog/9780596523206/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://oreilly.com/catalog/9780596523206/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Picasa</entry><entry> none </entry><entry><ulink url="http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://picasaweb.google.com/lh/explore#utm_medium=embed&utm_source=pwalogin">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Radio Pop</entry><entry> none </entry><entry><ulink url="http://www.radiopop.co.uk/users/tristanf/friends.xml">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.radiopop.co.uk/users/tristanf/friends.xml">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.radiopop.co.uk/users/tristanf/friends.xml">Data Explorer View</ulink>  </entry></row>
+            <row><entry>relLicense</entry><entry> none </entry><entry><ulink url="http://creativecommons.org/licenses/by-nc/3.0/us/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/creativecommons.org/licenses/by-nc/3.0/us/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://creativecommons.org/licenses/by-nc/3.0/us/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Revyu</entry><entry> none </entry><entry><ulink url="http://revyu.com/people/smonroe/about/html">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/revyu.com/people/smonroe/about/html">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://revyu.com/people/smonroe/about/html">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Rhapsody</entry><entry> none </entry><entry><ulink url="http://mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://mp3.rhapsody.com/playlistdetail?playlistId=ply.25288413">Data Explorer View</ulink>  </entry></row>
+            <row><entry>SalesForce.com</entry><entry>API Key,user login</entry><entry><ulink url="http://linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/rdf/https://na6.salesforce.com/0038000000ViF6k#this">Data Explorer View</ulink>  </entry></row>
+            <row><entry>SlideShare</entry><entry> API Key, SharedSecret </entry><entry><ulink url="http://www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.slideshare.net/rumito/rdf-views-of-sql-data-power-point-presentation-1-173180/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>SlideSix</entry><entry> none </entry><entry><ulink url="http://slidesix.com/view/ESWC2008SPARQLBIOpenLink">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/slidesix.com/view/ESWC2008SPARQLBIOpenLink">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://slidesix.com/view/ESWC2008SPARQLBIOpenLink">Data Explorer View</ulink>  </entry></row>
+            <row><entry>SVG</entry><entry> none </entry><entry><ulink url="http://www.schepers.cc/semweb/rdf-diagram.svg">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.schepers.cc/semweb/rdf-diagram.svg">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.schepers.cc/semweb/rdf-diagram.svg">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Tesco</entry><entry> none </entry><entry><ulink url="http://www.tesco.com/superstore/xpi/6/xpi54427686.htm">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.tesco.com/superstore/xpi/6/xpi54427686.htm">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.tesco.com/superstore/xpi/6/xpi54427686.htm">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Tumblr</entry><entry> none </entry><entry><ulink url="http://cupcakesoftheday.tumblr.com/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://cupcakesoftheday.tumblr.com/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://cupcakesoftheday.tumblr.com/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>TWFY (theyworkforyou)</entry><entry>	API Key  </entry><entry><ulink url="http://www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.theyworkforyou.com/mp/diane_abbott/hackney_north_and_stoke_newington">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Twitter</entry><entry> API key and secret, OAuth token <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtCartConfigTwitter">See details</ulink> </entry><entry><ulink url="http://twitter.com/kidehen">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://twitter.com/kidehen">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/kidehen">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Ustream</entry><entry> none </entry><entry><ulink url="http://www.ustream.tv/recorded/4848859/highlight/55618">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.ustream.tv/recorded/4848859/highlight/55618">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ustream.tv/recorded/4848859/highlight/55618">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Web Resource CC (Licenses) </entry><entry> none </entry><entry><ulink url="http://creativecommons.org/licenses/by-nc-nd/2.5/">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/creativecommons.org/licenses/by-nc-nd/2.5/">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://creativecommons.org/licenses/by-nc-nd/2.5/">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Wikipedia</entry><entry> none </entry><entry><ulink url="http://en.wikipedia.org/wiki/House_MD">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://en.wikipedia.org/wiki/House_MD">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://en.wikipedia.org/wiki/House_MD">Data Explorer View</ulink>  </entry></row>
+            <row><entry>xFolk</entry><entry> none </entry><entry><ulink url="http://blogmarks.net/marks/tag/hdd">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/blogmarks.net/marks/tag/hdd">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://blogmarks.net/marks/tag/hdd">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Yahoo! Finance</entry><entry> none </entry><entry><ulink url="http://finance.yahoo.com/q?s=AAPL">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/finance.yahoo.com/q?s=AAPL">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://finance.yahoo.com/q?s=AAPL">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Yahoo! SearchMonkey</entry><entry> none </entry><entry><ulink url="http://tech.groups.yahoo.com/group/ysearchboss/message/1983">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/tech.groups.yahoo.com/group/ysearchboss/message/1983">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://tech.groups.yahoo.com/group/ysearchboss/message/1983">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Yahoo! Traffic Data</entry><entry> none </entry><entry><ulink url="http://local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://local.yahooapis.com/MapsService/rss/trafficData.xml?appid=YdnDemo&street=701+First+Avenue&city=Sunnyvale&state=CA">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Yahoo! Weather</entry><entry> none </entry><entry><ulink url="http://weather.yahooapis.com/forecastrss?p=94089">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/weather.yahooapis.com/forecastrss?p=94089">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://weather.yahooapis.com/forecastrss?p=94089">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Yelp</entry><entry> none </entry><entry><ulink url="http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Youtube</entry><entry> none </entry><entry><ulink url="http://www.youtube.com/watch?v=rOsPKjbMvxY">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/www.youtube.com/watch?v=rOsPKjbMvxY">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.youtube.com/watch?v=rOsPKjbMvxY">Data Explorer View</ulink>  </entry></row>
+            <row><entry>Zillow</entry><entry> none </entry><entry><ulink url="http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid">example</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid">HTML Representation</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid">Data Explorer View</ulink>  </entry></row>
 </tbody>
 </tgroup>
 </table>
@@ -10087,81 +10594,92 @@ SPARQL clear graph <A-Named-Graph>;
 <tgroup cols="5">
 <thead>
   <row>
-    <entry>Cartridge</entry><entry>Sample URI</entry><entry>Resource Description</entry><entry>Linked Data Graph</entry><entry>Notes</entry>
+    <entry>Cartridge</entry><entry>Needs</entry><entry>Sample URI</entry><entry>Resource Description</entry><entry>Linked Data Graph</entry><entry>Notes</entry>
   </row>
 </thead>
 <tbody>
-<row><entry>Alchemy</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/jira.codehaus.org/browse/CONTINUUM-884%01alchemy_entity_1">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/jira.codehaus.org/browse/CONTINUUM-884">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://jira.codehaus.org/browse/CONTINUUM-884">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Amazon Search for products</entry><entry>   <ulink url="http://www.amazon.com/o/ASIN/0553383043#this">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>BBC</entry><entry>   <ulink url="http://news.bbc.co.uk">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://twitter.com/bbcnews">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/bbcnews">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>BestBuy Search for products</entry><entry>   <ulink url="http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Bing</entry><entry>   <ulink url="http://www.bing.com/videos/watch/video/cap-reattached-to-leaking-bp-well/6kn9out">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/twitter.com/bing">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/bing">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Bit.ly</entry><entry>   <ulink url="http://bit.ly/cGwRgc">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.springerlink.com/content/528h15634q332p02/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.springerlink.com/content/528h15634q332p02/">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>CNET</entry><entry>   <ulink url="http://www.xomreviews.com/shopper.cnet.com">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.xomreviews.com/shopper.cnet.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.xomreviews.com/shopper.cnet.com">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Collecta</entry><entry>   <ulink url="http://www.crunchbase.com/company/microsoft">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/microsoft">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/microsoft">Data Explorer View</ulink> </entry><entry>seeAlso links found for microsoft: http://localhost:9301/about/html/http/social.msdn.microsoft.com/Forums/en-US/wpf/thread/108fbffc-c849-4d60-ab3e-00c425342aaf and etc. </entry></row>
-<row><entry>Crunchbase</entry><entry>   <ulink url="http://www.crunchbase.com/company/radar-music-videos">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://techcrunch.com/2010/05/02/rapportive/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://techcrunch.com/2010/05/02/rapportive/">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Dapper</entry><entry>   <ulink url="http://www.dapper.net/dapplications/Blotter/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.alexa.com/siteinfo/dapper.net">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.alexa.com/siteinfo/dapper.net">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>DBpedia</entry><entry>   <ulink url="http://dbpedia.org/page/TweetDeck">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.programmableweb.com/api/dbpedia">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.programmableweb.com/api/dbpedia">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Delicious Meta</entry><entry>   <ulink url="http://delicious.com/tag/crunchbase">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.crunchbase.com/company/google">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/www.crunchbase.com/company/google">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Digg.com</entry><entry>   <ulink url="http://google.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>check the rdfs:seeAlso: http://mashable.com/2010/07/12/google-app-inventor/ and etc. from Digg.com</entry></row>
-<row><entry>Discogs</entry><entry>   <ulink url="http://www.discogs.com/Todd-Barton-and...ic-Poetry-Of-The-Kesh/release/2053074">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Document Links</entry><entry>example</entry><entry>HTML Representation</entry><entry>Data Explorer View</entry><entry></entry></row>
-<row><entry>eBay</entry><entry>   <ulink url="http://shop.ebay.com/stores/__W0QQLHQ5fSellerWithStoreZ1QQ_nkwZtoys?_rdc=1">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/wordpress.xdroop.com/space/HotWheels/Buying+Hotwheels+On+eBay">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://wordpress.xdroop.com/space/HotWheels/Buying+Hotwheels+On+eBay">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Evri Meta</entry><entry>   <ulink url="http://www.evri.com/organization/apple-store-0x60ee5">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.evri.com/organization/apple-store-0x60ee5">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.evri.com/organization/apple-store-0x60ee5">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Flickr Search for photos</entry><entry>   <ulink url="http://farm5.static.flickr.com/4034/4406875198_7e562051cc.jpg">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>FOAF-Search</entry><entry>   <ulink url="http://www.slideshare.net/kidehen">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.slideshare.net/kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.slideshare.net/kidehen">Data Explorer View</ulink> </entry><entry>Check seeAlso links: http://identi.ca/user/14092, http://myopenlink.net/dataspace/person/kidehen@openlinksw.com#this, http://semantictweet.com/kidehen#me, http://foaf.qdos.com/flickr/people/80409833@N00#me, http://myopenlink.net:8890/dataspace/person/kidehen#this           </entry></row>
-<row><entry>Freebase NYTC</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/rdf.freebase.com/ns/en.john_kerry">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Freebase NYTCF</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/rdf.freebase.com/ns/en.john_kerry">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>FriendFeed</entry><entry>   <ulink url="http://friendfeed.com/informationweek/0f212311/web-link-shrinkage-powers-spam-surge">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.informationweek.com/news/security/vulnerabilities/showArticle.jhtml?articleID=218401098">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.informationweek.com/news/security/vulnerabilities/showArticle.jhtml?articleID=218401098">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Geonames Meta</entry><entry>   <ulink url="http://sws.geonames.org/6630397/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.lastfm.ru/music/Phoenix">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.lastfm.ru/music/Phoenix">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Geopoints</entry><entry>   <ulink url="http://www.geopoint.nl/en/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.mit.edu/~6.170/api/ps2/GeoPoint.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.mit.edu/~6.170/api/ps2/GeoPoint.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Get Glue Meta</entry><entry>   <ulink url="http://getglue.com">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://blog.adaptiveblue.com/?p=4746">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://blog.adaptiveblue.com/?p=4746">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Get Glue</entry><entry>   <ulink url="http://getglue.com/smartlinks">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.readwriteweb.com/archives/get_glue_on_your_iphone.php">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.readwriteweb.com/archives/get_glue_on_your_iphone.php">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Google Book</entry><entry>   <ulink url="http://www.google.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/">Data Explorer View</ulink> </entry><entry> Please check seeAlso links like http://books.google.com/* </entry></row>
-<row><entry>Google Buzz </entry><entry>   <ulink url="http://google.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>there should added seeAlso Buzz links based on Buzz search by title</entry></row>
-<row><entry>Google Search</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/finance?q=NYSE:MON%01Recognition1">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.google.com/finance?q=NYSE:MON">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/finance?q=NYSE:MON">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Google Social Graph</entry><entry>   <ulink url="http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com/about.rdf">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.openlinksw.com/blog/~kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.openlinksw.com/blog/~kidehen/">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Guardian</entry><entry>   <ulink url="http://www.guardian.co.uk/politics/2010/mar/15/gordon-brown-continue-as-labour-leader">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.alexa.com/siteinfo/guardian.co.uk">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.alexa.com/siteinfo/guardian.co.uk">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Hoovers</entry><entry>   <ulink url="http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.hoovers.com/company/OpenLink_Software_Inc/rfcyfci-1.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.hoovers.com/company/OpenLink_Software_Inc/rfcyfci-1.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Jigsaw (company)</entry><entry>   <ulink url="http://google.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>check the c:location proxy:entity/http/www.google.com/#address</entry></row>
-<row><entry>Jigsaw (person)</entry><entry>   <ulink url="http://www.crunchbase.com/person/todd-sharp">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.crunchbase.com/person/todd-sharp">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/person/todd-sharp">Data Explorer View</ulink> </entry><entry>check several Jigsaw search seeAlso links: http://www.jigsaw.com/scid5307274/todd_sharp.xhtml and etc.</entry></row>
-<row><entry>Journalisted</entry><entry>   <ulink url="http://journalisted.com/walter-gammie">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/whois.domaintools.com/journalisted.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://whois.domaintools.com/journalisted.com">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Last.FM</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.last.fm/music/Rod+Stewart/Greatest+Hits">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.last.fm/music/Rod+Stewart/Greatest+Hits">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.last.fm/music/Rod+Stewart/Greatest+Hits">Data Explorer View</ulink> </entry><entry> There should be a set of last.fm seeAlso links</entry></row>
-<row><entry>Local Search</entry><entry>example</entry><entry>HTML Representation</entry><entry>Data Explorer View</entry><entry> </entry></row>
-<row><entry>LOD</entry><entry>   <ulink url="http://lod.openlinksw.com/b3s/search.vsp?q=1">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/lod.openlinksw.com/b3s/search.vsp?q=1">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://lod.openlinksw.com/b3s/search.vsp?q=1">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>MIME Type</entry><entry>example</entry><entry>HTML Representation</entry><entry>Data Explorer View</entry><entry> </entry></row>
-<row><entry>New York Times</entry><entry>   <ulink url="http://www.nytimes.com/2005/03/17/technology/circuits/17stat.html?ex=1268715600&amp;en=6840507aca561cf8&amp;ei=5090&amp;partner=rssuserland">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/download.cnet.com/New-York-Times-Crosswords-Monthly-Subscription/3000-2111_4-10918973.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://download.cnet.com/New-York-Times-Crosswords-Monthly-Subscription/3000-2111_4-10918973.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>NPR</entry><entry>   <ulink url="http://www.crunchbase.com/company/google">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/google">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/google">Data Explorer View</ulink> </entry><entry> There should be a set of npr stations rdfs:seeAlso links like: http://www.npr.org/templates/rss/podcast.php?id=510236; http://www.npr.org/templates/rss/podcast.php?id=510235; http://www.npr.org/templates/rss/podcast.php?id=510213 and etc. </entry></row>
-<row><entry>NYT: The Article Search</entry><entry>   <ulink url="http://twitter.com/bbcnews">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/bbcnews">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/bbcnews">Data Explorer View</ulink> </entry><entry> check the rdfs:seeAlso: proxy:entity/http/twitter.com/bbcnews#nytimes_1 and etc. </entry></row>
-<row><entry>NYT: The TimesTags</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/rdf.freebase.com/ns/en.john_kerry">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>OpenCalais</entry><entry>   <ulink url="http://d.opencalais.com/er/company/ralg-tr1r/7cf71bb9-2969-35d3-8fa1-3723bdb5958c">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/news.cnet.com/8301-13505_3-9805771-16.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://news.cnet.com/8301-13505_3-9805771-16.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Oreilly Search for products</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/oreilly.com/catalog/9780596007973">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/oreilly.com/catalog/9780596007973/?@Lookup@=17&refresh=0">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/oreilly.com/catalog/9780596007973/?@Lookup@=17&refresh=0">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Primal</entry><entry>   <ulink url="http://www.google.com">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.google.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com">Data Explorer View</ulink> </entry><entry>check the set of sioc:topic and scot:hasScot</entry></row>
-<row><entry>RapLeaf</entry><entry>   <ulink url="http://www.facebook.com/people/Roman-Korolenko/1465877213">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/service-provider/ivan-pr">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/service-provider/ivan-pr">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>SameAs.org</entry><entry>   <ulink url="http://sameas.org/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.ckan.net/package/sameas">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ckan.net/package/sameas">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Sindice</entry><entry>   <ulink url="http://sindice.com/developers/inspector?doReasoning=true&amp;q=tim+berners+lee&amp;qt=term&amp;url=http%3A%2F%2Fwww.nylon.gr%2Ftag%2Ftim-berners-lee%2F">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.killerstartups.com/Web20/sindice-com-the-semantic-web-index">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.killerstartups.com/Web20/sindice-com-the-semantic-web-index">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Technorati</entry><entry>   <ulink url="http://support.technorati.com/support/siteguide/tags">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/download.cnet.com/Technorati-Tag/3000-12565_4-10658084.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://download.cnet.com/Technorati-Tag/3000-12565_4-10658084.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Tesco</entry><entry>   <ulink url="http://www.tesco.com/groceries/Product/Details/?id=252330678">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.tesco.com/groceries/Product/Details/?id=252330678">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.tesco.com/groceries/Product/Details/?id=252330678">Data Explorer View</ulink> </entry><entry> There should be a set of tesco rdfs:seeAlso links like: tesco:groceries/Product/Details/?id=252990345 </entry></row>
-<row><entry>Topsy.com</entry><entry>   <ulink url="http://google.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>check the rdfs:seeAlso: http://www1.folha.uol.com.br/folha/informatica/ult124u675304.shtml and etc. from topsy.com</entry></row>
-<row><entry>TrueKnowledge</entry><entry>   <ulink url="http://www.microsoft.com">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.microsoft.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.microsoft.com">Data Explorer View</ulink> </entry><entry> There should be a set of trueknowledge rdfs:seeAlso links like: http://www.microsoft.com/; http://www.microsoft.com/worldwide; http://en.wikipedia.org/wiki/Microsoft. Question is "What's Microsoft Corporation?" </entry></row>
-<row><entry>Tweetme</entry><entry>   <ulink url="http://google.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>check the rdfs:seeAlso: http://tweetmeme.com/story/12017895</entry></row>
-<row><entry>Twitter</entry><entry>   <ulink url="http://twitter.com/Techmeme/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.techmeme.com/081001/p43">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.techmeme.com/081001/p43">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>uClassify</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.openlinksw.com/blog/~kidehen/%01Russian">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.openlinksw.com/blog/~kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.openlinksw.com/blog/~kidehen/">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Uclassify</entry><entry>   <ulink url="http://www.crunchbase.com/company/google">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/google">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/google">Data Explorer View</ulink> </entry><entry> There should be a set of uclass values for diff langs uc:class: proxy:entity/http/www.crunchbase.com/company/google#Arabic;  proxy:entity/http/www.crunchbase.com/company/google#Bulgarian and etc. </entry></row>
-<row><entry>UMBEL</entry><entry>   <ulink url="http://fgiasson.com/blog/index.php/2008/08/29/umbel-as-a-coherent-framework-to-support-ontology-development/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/umbel.zitgist.com/api_philosophy.php">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http/umbel.zitgist.com/api_philosophy.php">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Ustream</entry><entry>   <ulink url="http://www.ustream.tv/recorded/4848859/highlight/55618">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.ustream.tv/recorded/4848859/highlight/55618">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ustream.tv/recorded/4848859/highlight/55618">Data Explorer View</ulink> </entry><entry> There are several rdfs:seeAlso links like: http://www.ustream.tv/recorded/7039249/highlight/75027 </entry></row>
-<row><entry>Virtuoso Facets Web Service</entry><entry>example</entry><entry>HTML Representation</entry><entry>Data Explorer View</entry><entry> </entry></row>
-<row><entry>voID Statistics</entry><entry>example</entry><entry>HTML Representation</entry><entry>Data Explorer View</entry><entry> </entry></row>
-<row><entry>whoisi?</entry><entry>   <ulink url="http://whoisi.com/api/getPersonForURL?app=example&url=http://boatcovers.bestdealsoffer.com/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>World Bank</entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/web.worldbank.org/WBSITE/EXTERNAL/TOPICS/EXTEDUCATION/0,,contentMDK:20263110~menuPK:531742~pagePK:210058~piPK:210062~theSitePK:282386,00.html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.lib.berkeley.edu/doemoff/govinfo/intl/gov_ibrd.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.lib.berkeley.edu/doemoff/govinfo/intl/gov_ibrd.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>WorldCat Basic</entry><entry>   <ulink url="http://www.crunchbase.com/company/yahoo">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/yahoo">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/yahoo">Data Explorer View</ulink> </entry><entry>check seeAlso links: http://worldcat.org/oclc/613205142 and etc. </entry></row>
-<row><entry>xISBN</entry><entry>   <ulink url="http://isbndb.com/d/book/a_concise_history_of_italy_a02.html">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://isbndb.com/d/book/a_concise_history_of_italy_a02.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://isbndb.com/d/book/a_concise_history_of_italy_a02.html">Data Explorer View</ulink> </entry><entry>check the set of owl:sameAs links: http://purl.org/NET/book/isbn/0670236489#book;  http://purl.org/NET/book/isbn/0500450102#book </entry></row>
-<row><entry>XRD</entry><entry>   <ulink url="http://s2.googleusercontent.com/webfinger/?q=john@gmail.com">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/hueniverse.com/xrd/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://hueniverse.com/xrd/">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Yahoo BOSS</entry><entry>   <ulink url="http://boss.yahooapis.com/ysearch/web/v1/UNITED+STATES?appid=cxgCRk3V34ElK7Amd8ieyy9eELzD7QrpAHTzOv6MeEBz56JUUgGi1x2vf_.pE.c-&format=xml&view=searchmonkey_rdf">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?@Lookup@=10&refresh=0">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?@Lookup@=10&refresh=0">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Yahoo Geocode</entry><entry>   <ulink url="http://local.yahooapis.com">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http://www.programmableweb.com/api/yahoo-local-search">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.programmableweb.com/api/yahoo-local-search">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Yelp Search for business</entry><entry>   <ulink url="http://www.smallbusinesssem.com/inc-magazine-goes-deep-on-yelp/2669/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.readwriteweb.com/archives/yelp_assembles_small_business_advisory_board.php">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.readwriteweb.com/archives/yelp_assembles_small_business_advisory_board.php">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Zemanta</entry><entry>   <ulink url="http://developer.zemanta.com/wiki/helloworld/ruby">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/kobesearch.cpan.org/htdocs/Net-Zemanta/Net/Zemanta/Suggest.pm.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://kobesearch.cpan.org/htdocs/Net-Zemanta/Net/Zemanta/Suggest.pm.html">Data Explorer View</ulink> </entry><entry> </entry></row>
-<row><entry>Zillow</entry><entry>   <ulink url="http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid/">example</ulink> </entry><entry>   <ulink url="http://linkeddata.uriburner.com/about/html/http/www.crunchbase.com/company/zillow">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http/www.crunchbase.com/company/zillow">Data Explorer View</ulink> </entry><entry> </entry></row>
+<row><entry>Alchemy</entry><entry>API Key</entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/jira.codehaus.org/browse/CONTINUUM-884%01alchemy_entity_1">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/jira.codehaus.org/browse/CONTINUUM-884">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://jira.codehaus.org/browse/CONTINUUM-884">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Amazon Search for products</entry><entry>API Key, secret</entry><entry><ulink url="http://www.amazon.com/o/ASIN/0553383043#this">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>BBC Links</entry><entry></entry><entry><ulink url="http://news.bbc.co.uk">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://twitter.com/bbcnews">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/bbcnews">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>BestBuy Search for products</entry><entry>API Key</entry><entry><ulink url="http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.bestbuy.com/site/KOSS+-+Pro+DJ100+Professional+Over-the-Ear+Headphones+-+Black/9745789.p?skuId=9745789&id=1218165774336">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Bing</entry><entry>API Key</entry><entry><ulink url="http://www.bing.com/videos/watch/video/cap-reattached-to-leaking-bp-well/6kn9out">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/twitter.com/bing">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/bing">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Bit.ly</entry><entry></entry><entry><ulink url="http://bit.ly/cGwRgc">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.springerlink.com/content/528h15634q332p02/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.springerlink.com/content/528h15634q332p02/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>CNET Search for products</entry><entry>API Key</entry><entry><ulink url="http://www.xomreviews.com/shopper.cnet.com">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.xomreviews.com/shopper.cnet.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.xomreviews.com/shopper.cnet.com">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Collecta</entry><entry></entry><entry><ulink url="http://www.crunchbase.com/company/microsoft">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/microsoft">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/microsoft">Data Explorer View</ulink> </entry><entry>Check rdfs:seeAlso <ulink url="http://localhost:9301/about/html/http/social.msdn.microsoft.com/Forums/en-US/wpf/thread/108fbffc-c849-4d60-ab3e-00c425342aaf">links</ulink> found for microsoft.</entry></row>
+<row><entry>Crunchbase</entry><entry></entry><entry><ulink url="http://www.crunchbase.com/company/radar-music-videos">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://techcrunch.com/2010/05/02/rapportive/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://techcrunch.com/2010/05/02/rapportive/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Dapper Search</entry><entry></entry><entry><ulink url="http://www.dapper.net/dapplications/Blotter/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.alexa.com/siteinfo/dapper.net">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.alexa.com/siteinfo/dapper.net">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>DBpedia Meta</entry><entry></entry><entry><ulink url="http://dbpedia.org/page/TweetDeck">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.programmableweb.com/api/dbpedia">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.programmableweb.com/api/dbpedia">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Delicious Meta</entry><entry>User Login</entry><entry><ulink url="http://delicious.com/tag/crunchbase">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.crunchbase.com/company/google">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/www.crunchbase.com/company/google">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Digg.com</entry><entry></entry><entry><ulink url="http://google.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>Check rdfs:seeAlso the <ulink url="http://mashable.com/2010/07/12/google-app-inventor/">links</ulink> from Digg.com .</entry></row>
+<row><entry>Discogs</entry><entry>API Key, php plugin, DBpedia Extractor</entry><entry><ulink url="http://www.discogs.com/Todd-Barton-and...ic-Poetry-Of-The-Kesh/release/2053074">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/o/ASIN/0553383043">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/o/ASIN/0553383043">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Document Links</entry><entry></entry><entry>example </entry><entry> HTML Representation </entry><entry> Data Explorer View </entry><entry></entry></row>
+<row><entry>eBay Search for products</entry><entry>account, API Key</entry><entry><ulink url="http://shop.ebay.com/stores/__W0QQLHQ5fSellerWithStoreZ1QQ_nkwZtoys?_rdc=1">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/wordpress.xdroop.com/space/HotWheels/Buying+Hotwheels+On+eBay">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://wordpress.xdroop.com/space/HotWheels/Buying+Hotwheels+On+eBay">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Evri Meta</entry><entry></entry><entry><ulink url="http://www.evri.com/organization/apple-store-0x60ee5">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.evri.com/organization/apple-store-0x60ee5">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.evri.com/organization/apple-store-0x60ee5">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Facebook</entry><entry>API Key, secret, persistent-session-id.</entry><entry> <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtCartConfigFacebook">See details</ulink></entry><entry><ulink url="http://www.facebook.com/people/Richard-Max-Koster/1319314117">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.facebook.com/people/Richard-Max-Koster/1319314117">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.facebook.com/people/Richard-Max-Koster/1319314117">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Flickr Search for photos</entry><entry>API Key</entry><entry><ulink url="http://farm5.static.flickr.com/4034/4406875198_7e562051cc.jpg">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>FOAF-Search</entry><entry></entry><entry><ulink url="http://www.slideshare.net/kidehen">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.slideshare.net/kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.slideshare.net/kidehen">Data Explorer View</ulink> </entry><entry>Check rdfs:seeAlso at: <ulink url="http://identi.ca/user/14092">link1</ulink>, <ulink url="http://semantictweet.com/kidehen#me">link2</ulink>, <ulink url="http://myopenlink.net:8890/dataspace/person/kidehen#this">link3</ulink></entry></row>
+<row><entry>Foursquare</entry><entry></entry><entry><ulink url="http://foursquare.com/scobleizer">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/foursquare.com/scobleizer">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://foursquare.com/scobleizer">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Freebase NYTC</entry><entry>API Key</entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/rdf.freebase.com/ns/en.john_kerry">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Freebase NYTCF</entry><entry>API Key</entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/rdf.freebase.com/ns/en.john_kerry">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>FriendFeed</entry><entry></entry><entry><ulink url="http://friendfeed.com/informationweek/0f212311/web-link-shrinkage-powers-spam-surge">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.informationweek.com/news/security/vulnerabilities/showArticle.jhtml?articleID=218401098">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.informationweek.com/news/security/vulnerabilities/showArticle.jhtml?articleID=218401098">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Geonames Meta</entry><entry></entry><entry><ulink url="http://ws.geonames.org/search?q=london&maxRows=10&type=rdf">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/ws.geonames.org/search?q=london&maxRows=10&type=rdf">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://ws.geonames.org/search?q=london&maxRows=10&type=rdf">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Geopoints</entry><entry></entry><entry><ulink url="http://www.geopoint.nl/en/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.mit.edu/~6.170/api/ps2/GeoPoint.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.mit.edu/~6.170/api/ps2/GeoPoint.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Gowalla</entry><entry></entry><entry><ulink url="http://gowalla.com/spots/7163409">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://gowalla.com/spots/7163409">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://gowalla.com/spots/7163409">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Get Glue Meta</entry><entry>User Login</entry><entry><ulink url="http://getglue.com">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://blog.adaptiveblue.com/?p=4746">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://blog.adaptiveblue.com/?p=4746">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Get Glue</entry><entry></entry><entry><ulink url="http://getglue.com/smartlinks">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.readwriteweb.com/archives/get_glue_on_your_iphone.php">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.readwriteweb.com/archives/get_glue_on_your_iphone.php">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Google Buzz</entry><entry></entry><entry> <ulink url="http://google.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Google Book</entry><entry></entry><entry><ulink url="http://www.google.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/">Data Explorer View</ulink> </entry><entry>Check rdfs:seeAlso links like <ulink url="http://books.google.com/*">this one</ulink></entry></row>
+<row><entry>Google Plus</entry><entry></entry><entry><ulink url="https://plus.google.com/112399767740508618350">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/https://plus.google.com/112399767740508618350">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=https://plus.google.com/112399767740508618350">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Google Places</entry><entry></entry><entry><ulink url="http://maps.google.com/maps?cid=9095091124955696692">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://maps.google.com/maps?cid=9095091124955696692">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://maps.google.com/maps?cid=9095091124955696692">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Google Search</entry><entry></entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.google.com/finance?q=NYSE:MON%01Recognition1">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.google.com/finance?q=NYSE:MON">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com/finance?q=NYSE:MON">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Google Social Graph</entry><entry></entry><entry><ulink url="http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com/about.rdf">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.openlinksw.com/blog/~kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.openlinksw.com/blog/~kidehen/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Guardian</entry><entry>API Key</entry><entry><ulink url="http://www.guardian.co.uk/politics/2010/mar/15/gordon-brown-continue-as-labour-leader">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.alexa.com/siteinfo/guardian.co.uk">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.alexa.com/siteinfo/guardian.co.uk">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Hoovers</entry><entry>API Key</entry><entry><ulink url="http://www.hoovers.com/openlink/--ID__104304--/free-co-factsheet.xhtml">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.hoovers.com/company/OpenLink_Software_Inc/rfcyfci-1.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.hoovers.com/company/OpenLink_Software_Inc/rfcyfci-1.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Jigsaw (company)</entry><entry></entry><entry><ulink url="http://google.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>Check the c:location <ulink url="proxy:entity/http/www.google.com/%23address">link</ulink></entry></row>
+<row><entry>Jigsaw (person)</entry><entry></entry><entry><ulink url="http://www.crunchbase.com/person/todd-sharp">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.crunchbase.com/person/todd-sharp">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/person/todd-sharp">Data Explorer View</ulink> </entry><entry>Check several Jigsaw search seeAlso <ulink url="http://www.jigsaw.com/scid5307274/todd_sharp.xhtml">link</ulink>.</entry></row>
+<row><entry>Journalisted</entry><entry></entry><entry><ulink url="http://journalisted.com/walter-gammie">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/whois.domaintools.com/journalisted.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://whois.domaintools.com/journalisted.com">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Last.FM</entry><entry>API Key</entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.last.fm/music/Rod+Stewart/Greatest+Hits">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.last.fm/music/Rod+Stewart/Greatest+Hits">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.last.fm/music/Rod+Stewart/Greatest+Hits">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>LinkedIn</entry><entry>API Key and Session Key;</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtLinkedInMeta">See details</ulink></entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.jigsaw.com/scid34931678/vinod_khosla.xhtml">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.jigsaw.com/scid34931678/vinod_khosla.xhtml">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.jigsaw.com/scid34931678/vinod_khosla.xhtml">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Local Search</entry><entry></entry><entry>example </entry><entry> HTML Representation </entry><entry> Data Explorer View </entry><entry></entry></row>
+<row><entry>LOD</entry><entry></entry><entry><ulink url="http://lod.openlinksw.com/b3s/search.vsp?q=1">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/lod.openlinksw.com/b3s/search.vsp?q=1">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://lod.openlinksw.com/b3s/search.vsp?q=1">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>MIME Type</entry><entry></entry><entry>example </entry><entry> HTML Representation </entry><entry> Data Explorer View </entry><entry></entry></row>
+<row><entry>New York Times</entry><entry>API Key</entry><entry><ulink url="http://www.nytimes.com/2005/03/17/technology/circuits/17stat.html?ex=1268715600&amp;en=6840507aca561cf8&amp;ei=5090&amp;partner=rssuserland">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/download.cnet.com/New-York-Times-Crosswords-Monthly-Subscription/3000-2111_4-10918973.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://download.cnet.com/New-York-Times-Crosswords-Monthly-Subscription/3000-2111_4-10918973.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>NPR Meta</entry><entry>API Key</entry><entry><ulink url="http://www.crunchbase.com/company/google">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/google">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/google">Data Explorer View</ulink> </entry><entry>Check rdfs:seeAlso links like: <ulink url="http://www.npr.org/templates/rss/podcast.php?id=510236">link1</ulink>; <ulink url="http://www.npr.org/templates/rss/podcast.php?id=510235">link2</ulink>; <ulink url="http://www.npr.org/templates/rss/podcast.php?id=510213">link3</ulink>.</entry></row>
+<row><entry>NYT: The Article Search</entry><entry></entry><entry><ulink url="http://twitter.com/bbcnews">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/bbcnews">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://twitter.com/bbcnews">Data Explorer View</ulink> </entry><entry>Check the rdfs:seeAlso: <ulink url="proxy:entity/http/twitter.com/bbcnews%23nytimes_1">link</ulink>. </entry></row>
+<row><entry>NYT: The TimesTags</entry><entry></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/rdf.freebase.com/ns/en.john_kerry">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.freebase.com/view/en/john_kerry">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>OpenCalais</entry><entry>any html page</entry><entry><ulink url="http://d.opencalais.com/er/company/ralg-tr1r/7cf71bb9-2969-35d3-8fa1-3723bdb5958c">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/news.cnet.com/8301-13505_3-9805771-16.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://news.cnet.com/8301-13505_3-9805771-16.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Oreilly Search for products</entry><entry></entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/oreilly.com/catalog/9780596007973">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/oreilly.com/catalog/9780596007973/?@Lookup@=17&refresh=0">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/oreilly.com/catalog/9780596007973/?@Lookup@=17&refresh=0">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Primal</entry><entry></entry><entry><ulink url="http://www.google.com">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.google.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.google.com">Data Explorer View</ulink> </entry><entry>Check the set of sioc:topic and scot:hasScot.</entry></row>
+<row><entry>ProgrammableWeb</entry><entry></entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.productwiki.com/samsung-un46c6400%01Product">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.productwiki.com/samsung-un46c6400%01Product">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/www.productwiki.com/samsung-un46c6400%01Product">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Provenance</entry><entry></entry><entry><ulink url="http://www.amazon.com/Catch-22-Joseph-Heller/dp/0684833395/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.amazon.com/Catch-22-Joseph-Heller/dp/0684833395/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.amazon.com/Catch-22-Joseph-Heller/dp/0684833395/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Punkt</entry><entry></entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.youtube.com/watch?v=DrZvn1qckIs">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/www.youtube.com/watch?v=DrZvn1qckIs">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/id/entity/http/www.youtube.com/watch?v=DrZvn1qckIs">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>RapLeaf</entry><entry></entry><entry><ulink url="http://www.facebook.com/people/Roman-Korolenko/1465877213">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/service-provider/ivan-pr">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/service-provider/ivan-pr">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>SameAs.org</entry><entry></entry><entry><ulink url="http://sameas.org/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.ckan.net/package/sameas">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ckan.net/package/sameas">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Sindice</entry><entry></entry><entry><ulink url="http://sindice.com/developers/inspector?doReasoning=true&amp;q=tim+berners+lee&amp;qt=term&amp;url=http%3A%2F%2Fwww.nylon.gr%2Ftag%2Ftim-berners-lee%2F">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.killerstartups.com/Web20/sindice-com-the-semantic-web-index">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.killerstartups.com/Web20/sindice-com-the-semantic-web-index">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>SimpleGeo</entry><entry></entry><entry><ulink url="https://simplegeo.com/SG_0ODZdCvKJeB22EyTOyiLxO_37.772357_-122.405783@1294081369/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/https://simplegeo.com/SG_0ODZdCvKJeB22EyTOyiLxO_37.772357_-122.405783@1294081369/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=https://simplegeo.com/SG_0ODZdCvKJeB22EyTOyiLxO_37.772357_-122.405783@1294081369/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Technorati</entry><entry>API Key</entry><entry><ulink url="http://support.technorati.com/support/siteguide/tags">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/download.cnet.com/Technorati-Tag/3000-12565_4-10658084.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://download.cnet.com/Technorati-Tag/3000-12565_4-10658084.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Tesco Product Search</entry><entry>User Login, DeveloperKey, ApplicationKey</entry><entry><ulink url="http://www.tesco.com/groceries/Product/Details/?id=252330678">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.tesco.com/groceries/Product/Details/?id=252330678">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.tesco.com/groceries/Product/Details/?id=252330678">Data Explorer View</ulink> </entry><entry>Check set of Tesco rdfs:seeAlso links like <ulink url="tesco:groceries/Product/Details/?id=252990345">this one</ulink>.</entry></row>
+<row><entry>Topsy</entry><entry></entry><entry><ulink url="http://google.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>Check the <ulink url="http://www1.folha.uol.com.br/folha/informatica/ult124u675304.shtml">rdfs:seeAlso</ulink> from topsy.com.</entry></row>
+<row><entry>TrueKnowledge</entry><entry></entry><entry><ulink url="http://www.microsoft.com">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.microsoft.com">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.microsoft.com">Data Explorer View</ulink> </entry><entry>Check set of rdfs:seeAlso links like: <ulink url="http://www.microsoft.com/">link1</ulink>; <ulink url="http://www.microsoft.com/worldwide">link2</ulink>; <ulink url="http://en.wikipedia.org/wiki/Microsoft">link3</ulink>.</entry></row>
+<row><entry>Tweetme</entry><entry></entry><entry><ulink url="http://google.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/google.com/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://google.com/">Data Explorer View</ulink> </entry><entry>Check the <ulink url="http://tweetmeme.com/story/12017895">rdfs:seeAlso</ulink> link.</entry></row>
+<row><entry>Twitter Meta</entry><entry>User Login</entry><entry><ulink url="http://twitter.com/Techmeme/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.techmeme.com/081001/p43">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.techmeme.com/081001/p43">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>uClassify</entry><entry></entry><entry><ulink url="http://linkeddata.uriburner.com/about/id/entity/http/www.openlinksw.com/blog/~kidehen/%01Russian">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://www.openlinksw.com/blog/~kidehen/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://www.openlinksw.com/blog/~kidehen/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Uclassify</entry><entry></entry><entry><ulink url="http://www.crunchbase.com/company/google">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/google">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/google">Data Explorer View</ulink> </entry><entry>Check diff langs uc:class: <ulink url="proxy:entity/http/www.crunchbase.com/company/google%23Arabic">link</ulink></entry></row>
+<row><entry>UMBEL</entry><entry>min-score, max-results</entry><entry><ulink url="http://fgiasson.com/blog/index.php/2008/08/29/umbel-as-a-coherent-framework-to-support-ontology-development/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/umbel.zitgist.com/api_philosophy.php">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http/umbel.zitgist.com/api_philosophy.php">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>USA Today Best-Selling Books</entry><entry></entry><entry><ulink url="http://api.usatoday.com/open/bestsellers/books/titles?title=HARRY+POTTER&api_key=8ge2bvrna8x27wvc84qhz3e7&encoding=xml">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://api.usatoday.com/open/bestsellers/books/titles?title=HARRY+POTTER&api_key=8ge2bvrna8x27wvc84qhz3e7&encoding=xml">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://api.usatoday.com/open/bestsellers/books/titles?title=HARRY+POTTER&api_key=8ge2bvrna8x27wvc84qhz3e7&encoding=xml">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Ustream</entry><entry></entry><entry><ulink url="http://www.ustream.tv/recorded/4848859/highlight/55618">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.ustream.tv/recorded/4848859/highlight/55618">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.ustream.tv/recorded/4848859/highlight/55618">Data Explorer View</ulink> </entry><entry>Check rdfs:seeAlso links like: <ulink url="http://www.ustream.tv/recorded/7039249/highlight/75027">this one</ulink>.</entry></row>
+<row><entry>Virtuoso Faceted Web Service</entry><entry></entry><entry> example </entry><entry> HTML Representation </entry><entry> Data Explorer View </entry><entry></entry></row>
+<row><entry>voID Statistics</entry><entry></entry><entry>example </entry><entry> HTML Representation </entry><entry> Data Explorer View </entry><entry></entry></row>
+<row><entry>whoisi?</entry><entry></entry><entry><ulink url="http://whoisi.com/api/getPersonForURL?app=example&url=http://boatcovers.bestdealsoffer.com/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>World Bank</entry><entry>API Key</entry><entry><ulink url="http://linkeddata.uriburner.com/about/html/http/web.worldbank.org/WBSITE/EXTERNAL/TOPICS/EXTEDUCATION/0,,contentMDK:20263110~menuPK:531742~pagePK:210058~piPK:210062~theSitePK:282386,00.html">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.lib.berkeley.edu/doemoff/govinfo/intl/gov_ibrd.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.lib.berkeley.edu/doemoff/govinfo/intl/gov_ibrd.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>WorldCat Basic Search</entry><entry></entry><entry><ulink url="http://www.crunchbase.com/company/yahoo">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.crunchbase.com/company/yahoo">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.crunchbase.com/company/yahoo">Data Explorer View</ulink> </entry><entry>Check seeAlso links like <ulink url="http://worldcat.org/oclc/613205142">this one</ulink>.</entry></row>
+<row><entry>xISBN</entry><entry>API Key</entry><entry><ulink url="http://isbndb.com/d/book/a_concise_history_of_italy_a02.html">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://isbndb.com/d/book/a_concise_history_of_italy_a02.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://isbndb.com/d/book/a_concise_history_of_italy_a02.html">Data Explorer View</ulink> </entry><entry>Check set of owl:sameAs links: <ulink url="http://purl.org/NET/book/isbn/0670236489#book">link1</ulink>; <ulink url="http://purl.org/NET/book/isbn/0500450102#book">link2</ulink>.</entry></row>
+<row><entry>XRD</entry><entry></entry><entry><ulink url="http://s2.googleusercontent.com/webfinger/?q=john@gmail.com">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/hueniverse.com/xrd/">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://hueniverse.com/xrd/">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Yahoo BOSS</entry><entry>API Key</entry><entry><ulink url="http://boss.yahooapis.com/ysearch/web/v1/UNITED+STATES?appid=cxgCRk3V34ElK7Amd8ieyy9eELzD7QrpAHTzOv6MeEBz56JUUgGi1x2vf_.pE.c-&format=xml&view=searchmonkey_rdf">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?@Lookup@=10&refresh=0">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?@Lookup@=10&refresh=0">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Yahoo Geocode</entry><entry>API Key</entry><entry><ulink url="http://local.yahooapis.com">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http://www.programmableweb.com/api/yahoo-local-search">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.programmableweb.com/api/yahoo-local-search">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Yelp Search for business</entry><entry>API Key</entry><entry><ulink url="http://www.smallbusinesssem.com/inc-magazine-goes-deep-on-yelp/2669/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.readwriteweb.com/archives/yelp_assembles_small_business_advisory_board.php">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://www.readwriteweb.com/archives/yelp_assembles_small_business_advisory_board.php">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Zemanta</entry><entry>API Key, min-score, max-results</entry><entry><ulink url="http://developer.zemanta.com/wiki/helloworld/ruby">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/kobesearch.cpan.org/htdocs/Net-Zemanta/Net/Zemanta/Suggest.pm.html">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http://kobesearch.cpan.org/htdocs/Net-Zemanta/Net/Zemanta/Suggest.pm.html">Data Explorer View</ulink> </entry><entry></entry></row>
+<row><entry>Zillow</entry><entry>API Key</entry><entry><ulink url="http://www.zillow.com/homedetails/26-George-Rd-Maynard-MA-01754/57086765_zpid/">example</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/about/html/http/www.crunchbase.com/company/zillow">HTML Representation</ulink> </entry><entry> <ulink url="http://linkeddata.uriburner.com/ode/?uri=http/www.crunchbase.com/company/zillow">Data Explorer View</ulink> </entry><entry></entry></row>
 </tbody>
 </tgroup>
 </table>
@@ -10202,19 +10720,26 @@ SPARQL clear graph <A-Named-Graph>;
 <row>
   <entry></entry>
   <entry><emphasis>x,y...</emphasis></entry>
-  <entry>A list of meta cartridges to be executed, by their unique IDs. The ID column can be found in <emphasis>Conductor -&gt; RDF -&gt; Sponger -&gt; Meta Cartridges</emphasis></entry>
+  <entry>A list of meta cartridges to be executed, by their unique IDs. The ID column can be found in <emphasis>Conductor -&gt; Linked Data -&gt; Sponger -&gt; Meta Cartridges</emphasis></entry>
   <entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.apple.com/?@Lookup@=19,22&refresh=0">Execute only CNET (ID=19) and NYT: The TimesTags (ID=22) meta cartridges</ulink></entry>
 </row>  
 <row>
-  <entry><emphasis>refresh</emphasis></entry>
+  <entry><emphasis>refresh=0,1,2 etc.</emphasis></entry>
   <entry></entry>
-  <entry>An explicit refresh interval in seconds. A refresh of zero ("0") seconds will make a new graph on the next lookup, with the new '@Lookup@' parameter value.</entry>
+  <entry><emphasis>Usage</emphasis>: for cache invalidation. When used 1 or larger number (n), adds 
+  <emphasis>get:refresh "N"</emphasis> (explicit refresh interval in seconds) as a directive to Sponger. 
+  A refresh of zero ("0") seconds will make a new graph on the next lookup with the 
+  '<emphasis>@Lookup@</emphasis>' parameter value.</entry>
   <entry><ulink url="http://linkeddata.uriburner.com/about/html/http://www.apple.com/?@Lookup@=&refresh=0">Refresh the graph with all current cartridges</ulink></entry>
 </row>  
 <row>
-  <entry><emphasis>@Lookup@=&refresh=clean</emphasis></entry>
+  <entry><emphasis>refresh=clean</emphasis></entry>
   <entry></entry>
-  <entry>The keyword 'clean' will cause sponger to drop cache even it is marked to be in the fly. This must be used with caution as other thread may be doing sponge at same time.</entry>
+  <entry><emphasis>Usage</emphasis>: for overwriting. The 'clean' usage explicitly clears the graph i.e. 
+  will cause the Sponger to drop cache even if it is marked to be in the fly. Thus, if 
+  network resource fetched cache by some reason is left in some inconsistent state like shutdown during the fetching, then 'clean' is required 
+  as it doesn't check cache state. <emphasis>Note</emphasis>: must be used with caution as other threads 
+  may be doing Network Resource Fetch at same time.</entry>
   <entry></entry>
 </row>  
 </tbody>
@@ -10286,7 +10811,7 @@ SPARQL clear graph <A-Named-Graph>;
 <row><entry>uClassify</entry><entry>@Lookup@=3086&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL43">cURL example</ulink></entry></row>  
 <row><entry>UMBEL</entry><entry>@Lookup@=6&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL44">cURL example</ulink></entry></row>  
 <row><entry>Ustream</entry><entry>@Lookup@=3902&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL45">cURL example</ulink></entry></row>  
-<row><entry>Virtuoso Facets Web Service</entry><entry>@Lookup@=21&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL46">cURL example</ulink></entry></row>  
+<row><entry>Virtuoso Faceted Web Service</entry><entry>@Lookup@=21&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL46">cURL example</ulink></entry></row>  
 <row><entry>voID Statistics</entry><entry>@Lookup@=35&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL47">cURL example</ulink></entry></row>  
 <row><entry>whoisi?</entry><entry>@Lookup@=3052&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL48">cURL example</ulink></entry></row>  
 <row><entry>World Bank</entry><entry>@Lookup@=3&refresh=0</entry><entry><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamplescURL49">cURL example</ulink></entry></row>  
@@ -10310,8 +10835,8 @@ pre-written cartridges for RDF data extraction from a wide range of data sources
 are free to develop their own custom cartridges. This programmer's guide describes how.</para>
   <para>The guide is a companion to the <ulink url="http://virtuoso.openlinksw.com/Whitepapers/pdf/sponger_whitepaper_10102007.pdf">Virtuoso Sponger</ulink> whitepaper. The latter describes the Sponger in depth, its architecture, configuration, use and integration with other Virtuoso facilities such as the Open Data Services (ODS) application framework. This guide focuses solely on custom cartridge development.</para>
       <sect3 id="virtuosospongeroverviewxmlset">
-      <title>Configuration of CURIEs used by the sponger</title>
-      <para>For configuring CURIEs used by the Sponger which is exposed via sponger
+      <title>Configuration of CURIEs used by the Sponger</title>
+      <para>For configuring CURIEs used by the Sponger which is exposed via Sponger
 clients such as "description.vsp" - the VSP based information resource description utility,
 you can use the <link linkend="fn_xml_set_ns_decl"><function>xml_set_ns_decl</function></link> function.</para>
       <para>Here is sample example to add curie pattern:</para>
@@ -10396,7 +10921,7 @@ PRIMARY KEY ("RM_PATTERN", "RM_TYPE")
     <sect3 id="virtuosospongeroverviewcartinvo">
       <title>Cartridge Invocation</title>
       <para>The Virtuoso SPARQL processor supports IRI dereferencing via the Sponger. If a SPARQL query
-references non-default graph URIs, the Sponger goes out (via HTTP) to sponge the data source URIs and
+references non-default graph URIs, the Sponger goes out (via HTTP) to Fetch the Network Resource data source URIs and
 inserts the extracted RDF data into the local RDF quad store. The Sponger invokes the appropriate
 cartridge for the data source type to produce RDF instance data. If none of the registered cartridges
 are capable of handling the received content type, the Sponger will attempt to obtain RDF instance
@@ -10448,7 +10973,7 @@ a later section.</para>
 variety of popular Web resources and file types. The cartridges are bundled as part of the rdf_mappers
 VAD (Virtuoso Application Distribution).</para>
         <para>To see which cartridges are available, look at the 'RDF Cartridges' screen in
-Conductor. This can be reached through the 'RDF' > 'RDF Cartridges' tabbed menu items.</para>
+Conductor. This can be reached through the Linked Data -> Sponger -> Extractor Cartridges and Meta Cartridges menu items.</para>
         <figure id="spong2" float="1">
           <title>RDF Cartridges</title>
           <graphic fileref="ui/spong2.png"/>
@@ -10530,7 +11055,7 @@ on the ESW Wiki. The list covers a range of microformats, syndication formats an
     <sect3 id="virtuosospongercreatecustcartr">
       <title>Creating Custom Cartridges</title>
       <para>The Sponger is fully extensible by virtue of its pluggable cartridge architecture. New data formats can
-be sponged by creating new cartridges. While OpenLink is active in adding cartridges for new data sources,
+be fetched by creating new cartridges. While OpenLink is active in adding cartridges for new data sources,
 you are free to develop your own custom cartridges. Entity extractors can be built using Virtuoso PL,
 C/C++, Java or any other external language supported by Virtuoso's Server Extension API. Of course,
 Virtuoso's own entity extractors are written in Virtuoso PL.</para>
@@ -10568,7 +11093,7 @@ how you might do this:</para>
 <programlisting><![CDATA[
 if (xd is not null)
        {
-  -- Sponging successful. Load sponged data in Virtuoso quad store
+  -- Sponging successful. Load network resource data being fetched in the Virtuoso Quad Store:
   DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
   flag := 1;
   }
@@ -10594,13 +11119,13 @@ of origin.</para>
         <para>So, under some circumstances depending on how the Sponger has been invoked and whether
 it is being used to crawl an existing RDF graph, or derive RDF data from a non-RDF data source,
 dest may be null.</para>
-        <para>Consequently, when loading sponged RDF data into the quad store, cartridges typically
+        <para>Consequently, when loading network resource being fetched as RDF data into the quad store, cartridges typically
 specify the graph to receive the data using the coalesce function which returns the first non-null
 parameter. e.g.</para>
 <programlisting><![CDATA[
 DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
 ]]></programlisting>
-        <para>Here xd is an RDF/XML string holding the sponged RDF.</para>
+        <para>Here xd is an RDF/XML string holding the fetched RDF.</para>
         <para><emphasis>Specifying & Retrieving Cartridge Specific Options</emphasis></para>
         <para>The hook function prototype allows cartridge specific data to be passed to a cartridge
 through the RM_OPTIONS parameter, a Virtuoso/PL vector which acts as a heterogeneous array.</para>
@@ -10678,7 +11203,7 @@ http://musicbrainz.org/artist/4d5447d7-c61c-4120-ba1b-d7f471d385b9.html takes yo
 for John Lennon.</para>
         <para>If you were to look at this page in your browser, you would see that the information about
 the artist contains no RDF data. However, the cartridge is configured to intercept requests to URLs of
-the form http://musicbrainz.org/([^/]*)/([^.]*) and redirect to the cartridge to sponge all the
+the form http://musicbrainz.org/([^/]*)/([^.]*) and redirect to the cartridge to Fetch all the
 available information on the given artist, release, track or label.</para>
         <para>The cartridge extracts entities by redirecting to the MusicBrainz XML Web Service using
 as the basis for the initial query the item ID, e.g. an artist or label ID, extracted from the original
@@ -10696,7 +11221,7 @@ DB.DBA.RM_RDF_LOAD_RDFXML (xd, new_origin_uri, coalesce (dest, graph_iri));
 ]]></programlisting>
         <para>In the above outline, RDF_HTTP_URL_GET sends a query to the MusicBrainz web service,
 using query parameters appropriate for the original request, and retrieves the response using
-HTTP GET.</para>
+Network Resource Fetch.</para>
         <para>The returned XML is parsed into an in-memory parse tree by xtree_doc. Virtuoso/PL
 function RDF_MAPPER_XSLT is a simple wrapper around the function xslt which sets the current user
 to dba before returning an XML document transformed by an XSLT stylesheet, in this case mbz2rdf.xsl.
@@ -10783,7 +11308,7 @@ graph an indication of the external ontologies being used. The attribution takes
 ]]></programlisting>
         <para>where prefix opl: denotes the ontology http://www.openlinksw.com/schema/attribution#.</para>
         <para><emphasis>Deleting Existing Graphs</emphasis></para>
-        <para>Before loading sponged RDF data into a graph, you may want to delete any existing graph
+        <para>Before loading network resource fetched RDF data into a graph, you may want to delete any existing graph
 with the same URI. To do so, select the 'RDF' > 'List of Graphs' menu commands in Conductor, then use
 the 'Delete' command for the appropriate graph. Alternatively, you can use one of the following SQL
 commands:</para>
@@ -10843,7 +11368,7 @@ vector ('baseUri', coalesce (dest, graph_iri), 'base', base, 'suffix', suffix)
         <para><emphasis>An RDF Description Template</emphasis></para>
         <para><emphasis>Defining A Generic Resource Description Wrapper</emphasis></para>
         <para>Many of the OpenLink cartridges create a resource description formed to a common "wrapper"
-template which describes the relationship between the (usually) non-RDF source resource being sponged
+template which describes the relationship between the (usually) non-RDF source network resource being fetched 
 and the RDF description generated by the Sponger. The wrapper is appropriate for resources which can
 broadly be conceived as documents. It provides a generic minimal description of the source document,
 but also links to the much more detailed description provided by the Sponger. So, instead of just
@@ -10903,9 +11428,9 @@ SIOC provides a useful framework for the description which complements the SIOC-
 adopted throughout the ODS framework.</para>
         <para><emphasis>Naming Conventions for Sponger Generated Descriptions</emphasis></para>
         <para>As can be seen from the stylesheet extract just shown, the URI of the resource
-description generated by the Sponger to describe the sponged resource is given by the
-function {vi:proxyIRI ($resourceURL)} where resourceURL is the URL of the original resource
-being sponged. proxyIRI is an XPath extension function defined in rdf_mappers.sql as</para>
+description generated by the Sponger to describe the network resource being fetched, is given by the
+function {vi:proxyIRI ($resourceURL)} where resourceURL is the URL of the original network resource
+being fetched. proxyIRI is an XPath extension function defined in rdf_mappers.sql as</para>
 <programlisting><![CDATA[
 xpf_extension ('http://www.openlinksw.com/virtuoso/xslt/:proxyIRI', 'DB.DBA.RDF_SPONGE_PROXY_IRI');
 ]]></programlisting>
@@ -10925,7 +11450,7 @@ a row to the SYS_REF_MAPPERS table directly using SQL, or by using the Conductor
         <para>If you choose register your cartridge using SQL, possibly as part of a Virtuoso/PL
 script, the required SQL will typically mirror one of the following INSERT commands.</para>
         <para>Below, a cartridge for OpenCalais is being installed which will be tried when
-the MIME type of the data being sponged is one of text/plain, text/xml or text/html.
+the MIME type of the network resource data being fetched is one of text/plain, text/xml or text/html.
 (The definition of the SYS_RDF_MAPPERS table was introduced earlier in section
 'Cartridge Registry'.)</para>
 <programlisting><![CDATA[
@@ -10962,10 +11487,6 @@ WHERE RM_HOOK = 'DB.DBA.RDF_LOAD_BIN_DOCUMENT';
           <title>RDF Cartridges</title>
           <graphic fileref="ui/spong4.png"/>
         </figure>
-        <figure id="spong5" float="1">
-          <title>RDF Cartridges</title>
-          <graphic fileref="ui/spong5.png"/>
-        </figure>
         </sect5>
         <sect5 id="virtuosospongercreatecustcartrrgstit">
         <title>Installing Stylesheets</title>
@@ -10982,7 +11503,7 @@ that the DirsAllowed setting in the virtuoso.ini file is configured appropriatel
         <sect5 id="virtuosospongercreatecustcartrrgstap">
         <title>Setting API Key</title>        
          <para>Some Cartridges require and API account and/or API Key to be 
-provided for accessing the required service. This can be done from the RDF -> Sponger tab of the 
+provided for accessing the required service. This can be done from the Linked Data -> Sponger tab of the 
 Conductor by selecting the cartridge from the list provided, entering the API Account and API Key 
 in the dialog at the bottom of the page and click update to save, as indicated in the screenshot 
 below:</para>
@@ -11374,7 +11895,7 @@ basically the value of RM_KEY column of the DB.DBA.SYS_RDF_MAPPERS table.</listi
 </itemizedlist>
 <para>Note: the names of the parameters are not important, but their order and presence are!</para>
 <para><emphasis>Example Implementation:</emphasis></para>
-<para>In the example script bellow we implement a basic mapper, which maps a text/plain mime type to an
+<para>In the example script below we implement a basic mapper, which maps a text/plain mime type to an
 imaginary ontology, which extends the class Document from FOAF with properties 'txt:UniqueWords'
 and 'txt:Chars', where the prefix 'txt:' we specify as 'urn:txt:v0.0:'.</para>
 <programlisting><![CDATA[
@@ -11440,7 +11961,7 @@ FROM <URL-of-a-txt-file>
 WHERE { ?s ?p ?o }
 ]]></programlisting>
 <para>It is important that the SPARQL_UPDATE role to be granted to "SPARQL" account in order
-to allow local repository update via sponge feature.</para>
+to allow local repository update via Network Resource Fetch feature.</para>
 <para><emphasis>Authentication in Sponger</emphasis></para>
 <para>To enable usage of user defined authentication, there are added more parameters to the
 /proxy/rdf and /sparql endpoints. So to use it, the RDF browser and iSPARQL should send following
@@ -11658,12 +12179,12 @@ SQL> SELECT APERTURE.DBA."MetaExtractor"().getMetaFromFile ('some_pdf_in_server_
 ]]></programlisting>
 </listitem>
          </itemizedlist>
-<para>You should now be able to sponge all document types supported by the Aperture framework, (using
+<para>You should now be able to Fetch all Network Resource document types supported by the Aperture framework, (using
 one of the standard Sponger invocation mechanisms, for instance with a URL of the form
 http://localhost:8890/about/rdf/http://targethost/targetfile.pdf), subject to the MIME type pattern
 filters configured for the cartridge in the Conductor UI. By default the Aperture cartridge is
 registered to match MIME types (application/octet-stream)|(application/pdf)|(application/mspowerpoint).
-To sponge all the MIME types Aperture is capable of handling, changed the MIME type pattern to
+To Fetch all the Network Resource MIME types Aperture is capable of handling, changed the MIME type pattern to
 'application/.*'.</para>
 <para>Important: The installation guidelines presented above have been verified on Mac OS X with
 Aperture 1.2.0. Some adjustment may be needed for different operating systems or versions of Aperture.</para>
@@ -11726,8 +12247,8 @@ MC_ENABLED INTEGER		-- a 0 or 1 integer flag to exclude or include
 registered using SQL. A Conductor interface for this task will be added in due course.)</para>
        <para><emphasis>Invocation</emphasis></para>
         <para>Meta-cartridges are invoked through the post-processing hook procedure RDF_LOAD_POST_PROCESS
-which is called, for every document retrieved, after RDF_LOAD_RDFXML loads sponged data into the quad
-store.</para>
+which is called, for every document retrieved, after RDF_LOAD_RDFXML loads fetched data into the Quad
+Store.</para>
         <para>Cartridges in the meta-cartridge registry (RDF_META_CARTRIDGES) are configured to match a given
 MIME type or URI pattern. Matching meta-cartridges are invoked in order of their MC_SEQ value. Ordinarily
 a meta-cartridge should return 0, in which case the next meta-cartridge in the post-processing chain will
@@ -11800,19 +12321,19 @@ http://api.nytimes.com/svc/elections/us/v2/president/2008/finances/candidates/ob
         <para>The following instructions assume you have the <ulink url="http://ode.openlinksw.com/">OpenLink Data Explorer (ODE)</ulink> browser extension installed in your browser.</para>
         <para>An HTML description of Barack Obama can be obtained directly from Freebase by pasting the
  following URL into your browser: http://www.freebase.com/view/en/barack_obama</para>
-        <para>To view RDF data sponged from this page, select 'Linked Data Sources' from the browser's
+        <para>To view RDF data fetched from this page, select 'Linked Data Sources' from the browser's
 'View' menu. An OpenLink Data Explorer interface will load in a new tab.</para>
-        <para>Clicking on the 'Barack Obama' link under the 'Person' category displayed by ODE sponges
+        <para>Clicking on the 'Barack Obama' link under the 'Person' category displayed by ODE fetches 
 RDF data using the Freebase cartridge. Click the 'down arrow' adjacent to the 'Barack Obama' link to
 explore the retrieved data.</para>
         <para>Assuming your Virtuoso instance is running on port 8890 on localhost, the list of data caches displayed
 by ODE should include: http://localhost:8890/about/html/http/www.freebase.com/view/en/barack_obama#this</para>
         <para>The information displayed in the rest of the page relates to the entity instance identified by this URI. The prefix http://localhost:8890/about/html/http/ prepended to the
 original URI indicates that the Sponger Proxy Service has been invoked. The Sponger creates an associated
-entity instance (identified by the above URI with the #this suffix) which holds sponged information
+entity instance (identified by the above URI with the #this suffix) which holds network resource information being fetched 
 about the original entity.</para>
         <para><emphasis>Using the Command Line</emphasis></para>
-        <para>As an alternative to ODE, you can sponge from the command line with the command:</para>
+        <para>As an alternative to ODE, you can perform Network Resource Fetch from the command line with the command:</para>
 <programlisting><![CDATA[
 curl -H "Accept: text/xml" "http://localhost:8890/about/html/http/www.freebase.com/view/en/barack_obama"
 ]]></programlisting>
@@ -11836,7 +12357,7 @@ create procedure INSTALL_RDF_LOAD_NYTCF ()
 };
 ]]></programlisting>
         <para>Looking at the list of cartridges in Conductor's 'RDF Cartridges' screen, you will
-see that the Freebase cartridge is configured by default to sponge URIs which match the pattern
+see that the Freebase cartridge is configured by default to perform Network Resource Fetch of URIs which match the pattern
 "http://www.freebase.com/view/.*" The meta-cartridge is configured to match on the same URI pattern.</para>
         <para>To use the Campaign Finance API, you must register and request an API key. The script
 above shows an invalid key. Replace it with your own key before executing the procedure.</para>
@@ -12183,6 +12704,72 @@ Only then does it make sense to query for campaign finance data from the NYTCF d
         <para>Only if this is the case is the RDF_NYTCF_LOOKUP routine called to query for and return campaign finance data for the candidate. The form of the query and the resulting XML output from the Campaign Finance service were presented earlier.</para>
       </sect4>
     </sect3>
+    <sect3 id="virtuosospongequeue">
+       <title>Sponger Queue API</title>
+       <sect4 id="virtuosospongequeuefn"> 
+         <title>Functions</title>	
+         <itemizedlist mark="bullet">
+           <listitem><emphasis>DB.DBA.RDF_SPONGER_QUEUE_ADD</emphasis>: This function is available when 
+           rdf cartridges vad is installed.
+<programlisting><![CDATA[
+DB.DBA.RDF_SPONGER_QUEUE_ADD  (url, options);	
+]]></programlisting>           
+             <itemizedlist mark="bullet">
+               <listitem><emphasis>url</emphasis>: the URI to perform Network Resource Fetch</listitem>
+               <listitem><emphasis>options</emphasis>: an array usually typical sponger pragmas, for ex:
+<programlisting><![CDATA[
+vector ('get:soft',  'soft',  'refresh_free_text',  1);	
+]]></programlisting>               	
+               	</listitem>
+             </itemizedlist>
+           </listitem>
+         </itemizedlist>
+       </sect4> 
+       <sect4 id="virtuosospongequeuerwebs"> 
+         <title>REST Web service</title>	
+         <para>The Sponger REST Web service has the following characteristics:</para>
+         <itemizedlist mark="bullet">
+           <listitem>endpoint: http://cname/about/service</listitem>
+           <listitem>parameters:
+             <itemizedlist mark="bullet">
+               <listitem>op=add: type of operation, for now addition to the queue is supported</listitem>
+               <listitem>uris=[json array]: an array of URIs to be added to the sponger queue, the format is JSON array, for example:
+<programlisting><![CDATA[
+ { "uris":["http://www.amazon.co.uk/Hama-Stylus-Input-Apple-iPad/dp/B003O0OM0C", "http://www.amazon.co.uk/Krusell-GAIA-Case-Apple-iPad/dp/B003QHXWWC" ] }	
+]]></programlisting>               	
+               </listitem>
+             </itemizedlist>           	
+           </listitem>
+         </itemizedlist>         
+         <para>The service will return a json encoded result of the number of items added, for example:</para>
+<programlisting><![CDATA[
+{ "result":2 }	
+]]></programlisting>  
+         <para>In case of error a JSON with error text will be returned and http status 500.</para>       
+         <emphasis>cURL example</emphasis>
+         <orderedlist>
+           <listitem>Assume file.txt which contains URL encoded JSON string:
+<programlisting><![CDATA[
+uris=%7B%20%22uris%22%3A%5B%22http%3A%2F%2Fwww.amazon.co.uk%2FHama-Stylus-Input-Apple-iPad%2Fdp%2FB003O0OM0C%22%2C%20%22http%3A%2F%2Fwww.amazon.co.uk%2FKrusell-GAIA-Case-Apple-iPad%2Fdp%2FB003QHXWWC%22%20%5D%20%7D	
+]]></programlisting>
+           </listitem>
+           <listitem>Execute the following command:
+<programlisting><![CDATA[
+curl -i -d at file.txt http://cname/about/service?op=add
+HTTP/1.1 200 OK
+Server: Virtuoso/06.02.3129 (Darwin) i686-apple-darwin10.0.0  VDB
+Connection: Keep-Alive
+Date: Thu, 05 May 2011 12:06:24 GMT
+Accept-Ranges: bytes
+Content-Type: applcation/json; charset="UTF-8"
+Content-Length: 14
+
+{ "result":2 }	
+]]></programlisting>
+           </listitem>
+         </orderedlist>
+       </sect4>             	
+    </sect3>
     <sect3 id="virtuosospongerelatedfunc">
     <title>Virtuoso functions usage examples</title>
     <sect4 id="virtuosospongerelatedfuncstring">
@@ -12487,12 +13074,12 @@ create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri va
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  -
- -  $Id: rdfandsparql.xml,v 1.95.2.44 2011/03/24 16:04:34 source Exp $
+ -  $Id: rdfandsparql.xml,v 1.95.2.49 2012/03/14 14:12:40 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2008 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -12615,7 +13202,7 @@ create procedure DB.DBA.RDF_LOAD_MQL (in graph_iri varchar, in new_origin_uri va
       <listitem>Build the latest Python hosting module. It will introduce a new function <code>python_exec ()</code>
 <para>The parameters of python_exec are :</para>
 <itemizedlist mark="bullet">
-  <listitem>string containing a python code, it should define one or more functions, see remarks bellow</listitem>
+  <listitem>string containing a python code, it should define one or more functions, see remarks below</listitem>
   <listitem>string containing name of function to be called</listitem>
   <listitem>list of parameters for the function </listitem>
   </itemizedlist>
@@ -12721,8 +13308,8 @@ sparql define get:soft "soft" select * from <http://www.amazon.com/Apple-touch-G
 <itemizedlist mark="bullet">
 	<listitem><link linkend="virtuosospongerusageprocessorex">SPARQL Processor Usage Example</link></listitem>
 	<listitem><link linkend="virtuosospongerusageproxyex2">RDF Proxy Service Example</link></listitem>
-	<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtDeployingLinkedDataGuide_BrowsingNorthwindRdfView#AncMozToc2">Browsing & Exploring RDF View Example Using ODE</ulink></listitem>
-	<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtDeployingLinkedDataGuide_BrowsingNorthwindRdfView#AncMozToc3">Browsing & Exploring RDF View Example Using iSPARQL</ulink></listitem>
+	<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtDeployingLinkedDataGuide_BrowsingNorthwindRdfView#AncMozToc2">Browsing & Exploring Linked Data View Example Using ODE</ulink></listitem>
+	<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtDeployingLinkedDataGuide_BrowsingNorthwindRdfView#AncMozToc3">Browsing & Exploring Linked Data View Example Using iSPARQL</ulink></listitem>
 	<listitem><link linkend="rdfinsertmethodplapissimpleexample">Basic Sponger Cartridge Example</link></listitem>
   <listitem><link linkend="virtuosospongerusagebriefex">HTTP Example for Extracting Metadata using CURL</link></listitem>
   <listitem><link linkend="virtuosospongercartridgetypesmetarestexamples">RESTFul Interaction Examples</link></listitem>
@@ -12733,10 +13320,10 @@ sparql define get:soft "soft" select * from <http://www.amazon.com/Apple-touch-G
 </sect1>
 
 <sect1 id="virtuosospongerfacetinstall">
-<title>Virtuoso Facet Browser Installation and configuration</title>
+<title>Virtuoso Faceted Browser Installation and configuration</title>
 <sect2 id="virtuosospongerfacetinstallprereq">
 <title>Prerequisites</title>
-<para>Requires Virtuoso 6.0 TP1 or higher for use.
+<para>Requires <ulink url="http://sourceforge.net/project/showfiles.php?group_id=161622&package_id=319652">Virtuoso 6.0 TP1</ulink> or higher for use.
 </para>
 </sect2>
 <sect2 id="virtuosospongerfacetinstallpreinst">
@@ -12746,7 +13333,7 @@ sparql define get:soft "soft" select * from <http://www.amazon.com/Apple-touch-G
 10K worth of triples, please perform the following steps:
 </para>
 <orderedlist>
-  <listitem>Run the following commands using the Virtuoso isql program before installing the Facet
+  <listitem>Run the following commands using the Virtuoso isql program before installing the Faceted
 Browser VAD:
 <programlisting><![CDATA[
   drop index RDF_QUAD_OPGS;
@@ -12782,40 +13369,26 @@ Browser VAD:
 <sect2 id="virtuosospongerfacetinstallvadinst">
 <title>VAD Package Installation</title>
 <orderedlist>
-  <listitem>Download and install the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/fct_dav.vad">Virtuoso Facet Browser VAD</ulink>
+  <listitem>Download and install the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/fct_dav.vad">Virtuoso Faceted Browser VAD</ulink>
 package using the Conductor System Admin - > Packages tab.
     <figure id="fctinst1" float="1">
       <title>Install the FCT package</title>
-      <graphic fileref="ui/fctinst1.png"/>
+      <graphic fileref="ui/fb1.png"/>
     </figure>
 </listitem>
-  <!--listitem>Grant <emphasis>select</emphasis> privileges on the <emphasis>RDF_QUAD</emphasis> table to the
-<emphasis>SPARQL</emphasis> user:
-<programlisting><![CDATA[
-grant SELECT  on DB.DBA.RDF_QUAD to "SPARQL";
-]]></programlisting>
-</listitem-->
-  <!--listitem>An updated Virtuoso RDF Mappers VAD is required. Download and install the
-<ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/rdf_mappers_dav.vad">RDF Mappers VAD</ulink>
-package using the Conductor System Admin - > Packages tab.
-    <figure id="fctinst2" float="1">
-      <title>Install the RDF Mappers package</title>
-      <graphic fileref="ui/fctinst2.png"/>
-    </figure>
-</listitem-->
   <listitem>The HTML interface of the Faceted Browser Engine is exposed at: <emphasis>http://<cname>/fct</emphasis>,
 where "cname" is the hostname:portno your Virtuoso instance is running on.
     <figure id="fctinst3" float="1">
       <title>FCT HTML interface</title>
-      <graphic fileref="ui/fctinst3.png"/>
+      <graphic fileref="ui/fb2.png"/>
     </figure>
 </listitem>
-  <listitem>The Facet Browser Engine exposes a REST API at the endpoint:
+  <listitem>The Faceted Browser Engine exposes a REST API at the endpoint:
 <emphasis>http://<cname>/fct/service</emphasis>.
   <tip><title>See Also:</title>
     <itemizedlist mark="bullet">
-      <listitem><link linkend="virtuosospongerfacentuirestapi">Virtuoso APIs for Facet REST services</link></listitem>
-      <listitem><link linkend="rdfiridereferencingfacetws">Facets Web Service and Linked Data</link></listitem>
+      <listitem><link linkend="virtuosospongerfacentuirestapi">Virtuoso APIs for Faceted REST services</link></listitem>
+      <listitem><link linkend="rdfiridereferencingfacetws">Faceted Web Service and Linked Data</link></listitem>
 </itemizedlist>
   </tip>
 </listitem>
@@ -12833,7 +13406,7 @@ VT_INC_INDEX_DB_DBA_RDF_OBJ ();
 </listitem>
   <listitem>Run the following procedure using the Virtuoso <emphasis>isql</emphasis> program to
 populate label lookup tables periodically and activate the <emphasis>Label</emphasis> text box of the
-<emphasis>URI Lookup(by Label)</emphasis> tab:
+<emphasis>Entity Label Lookup</emphasis> tab:
 <programlisting><![CDATA[
 urilbl_ac_init_db()
 ]]></programlisting>
@@ -12844,50 +13417,62 @@ Note this should be run periodically as the data grows to re-rank the IRIs.
 s_rank()
 ]]></programlisting>
 </listitem>
-  <listitem>Sponge some data to load some RDF triples in the quad store. This can easily be done using
+  <listitem>Perform Network Resource Fetch of some data to load some RDF triples in the quad store. This can easily be done using
 the Virtuoso <emphasis>description.vsp</emphasis> page which provides a hypertext description of RDF Linked Data, by describing
 the following page for example (or one of your choice):
 <programlisting><![CDATA[
 http://cname/about/html/http/news.cnet.com
 ]]></programlisting>
     <figure id="fctinst4" float="1">
-      <title>Sponge data</title>
-      <graphic fileref="ui/fctinst4.png"/>
+      <title>Network Resource Fetch data</title>
+      <graphic fileref="ui/fb3.png"/>
+    </figure>
+    <figure id="fctinst4" float="1">
+      <title>Network Resource Fetch data</title>
+      <graphic fileref="ui/fb4.png"/>
     </figure>
 </listitem>
-  <listitem>Use the Facet Browser Search and Find User Interface to search for information on "CNET"
+  <listitem>Use the Faceted Browser Search and Find User Interface to search for information on "CNET":
     <figure id="fctinst5" float="1">
-      <title>Facet Browser Search</title>
-      <graphic fileref="ui/fctinst5.png"/>
+      <title>Faceted Browser Search</title>
+      <graphic fileref="ui/fb5.png"/>
     </figure>
 </listitem>
-  <listitem>Results of the following form should be returned for the data sponged.
+  <listitem>Results of the following form should be returned for the network resource data being fetched.
     <figure id="fctinst6" float="1">
-      <title>Facet Browser Search Results</title>
-      <graphic fileref="ui/fctinst6.png"/>
+      <title>Faceted Browser Search Results</title>
+      <graphic fileref="ui/fb6.png"/>
     </figure>
 </listitem>
   <listitem>Click "Types" link shown at the right vertical Navigation</listitem>
   <listitem>Results of the classes/properties should be returned:
     <figure id="fctinst7" float="1">
       <title>Results of the classes/properties</title>
-      <graphic fileref="ui/fctinst7.png"/>
+      <graphic fileref="ui/fb7.png"/>
+    </figure>
+</listitem>
+  <listitem>To get Type description, click "Describe" link for a given type, for ex. "Person". </listitem>
+  <listitem>A list of attributes and values should be presented for the given resource. Note that automatically is generated QRCode image for the described entity. 
+  	<figure id="fctinst7" float="1">
+      <title>Results of the classes/properties</title>
+      <graphic fileref="ui/fb8.png"/>
     </figure>
 </listitem>
-  <listitem>To exclude a type unhatch the checkbox associated with the type:
+  <listitem>Return back to the Attributes list from above by going to the "Facets" tab. </listitem>
+  <listitem>To exclude a type, un-tick the checkbox associated with the type: 
     <figure id="fctinst8" float="1">
       <title>Exclude Type(s)</title>
-      <graphic fileref="ui/fctinst8.png"/>
+      <graphic fileref="ui/fb9.png"/>
     </figure>
 </listitem>
   <listitem>Click the Type URI link</listitem>
   <listitem>Results of excluding the Type(s) should be shown:
     <figure id="fctinst9" float="1">
       <title>Results of Excluded Type(s)</title>
-      <graphic fileref="ui/fctinst9.png"/>
+      <graphic fileref="ui/fb10.png"/>
     </figure>
 </listitem>
-  <listitem>The Facet Browser Web service endpoint can also be queried to obtain the same results:
+  <listitem>The Faceted Browser Web service endpoint can also be queried to obtain the same results:
 <programlisting><![CDATA[
 $ more cnet.xml
 <?xml version="1.0"?>
@@ -13006,30 +13591,48 @@ $ curl -H "Content-Type: text/xml" -d @cnet.xml  http://cname/fct/service
 </fct:facets>
 ]]></programlisting>
 </listitem>
-  <listitem>In the <emphasis>Label</emphasis> text box of the <emphasis>URI Lookup (by Label)</emphasis>
-tab enter the name of a rdfs label to be <emphasis>Describe</emphasis>'d:
+  <listitem>Click "New search" from the Entity Relations Navigation and go to "Entity Label Lookup" tab: 
     <figure id="fctinst10" float="1">
-      <title>Query Facet Browser Web service endpoint</title>
-      <graphic fileref="ui/fctinst10.png"/>
+      <title>Query Faceted Browser Web service endpoint</title>
+      <graphic fileref="ui/fb11.png"/>
+    </figure>
+</listitem>
+  <listitem>In the Label auto-complete text box of the Entity Label Lookup tab, enter the name of an rdfs label to be Described: 
+    <figure id="fctinst11" float="1">
+      <title>Select a URI from the list of available Labels</title>
+      <graphic fileref="ui/fb12.png"/>
     </figure>
 </listitem>
   <listitem>Select a URI from the list of available Labels to obtain a description of the URI:
     <figure id="fctinst11" float="1">
       <title>Select a URI from the list of available Labels</title>
-      <graphic fileref="ui/fctinst11.png"/>
+      <graphic fileref="ui/fb13.png"/>
+    </figure>
+      <figure id="fctinst11" float="1">
+      <title>Select a URI from the list of available Labels</title>
+      <graphic fileref="ui/fb14.png"/>
+    </figure>
+  </listitem>
+  <listitem>Click "Facets" and go to "Entity URI Lookup" tab:
+    <figure id="fctinst12" float="1">
+      <title>Enter URI</title>
+      <graphic fileref="ui/fb15.png"/>
     </figure>
 </listitem>
-  <listitem>In the <emphasis>URI</emphasis> text box of the <emphasis>URI Lookup</emphasis> tab enter
-the name URI to be <emphasis>Describe</emphasis>'d:
+  <listitem>In the URI auto-complete text box of the Entity URI Lookup tab enter the name URI to be Described: 
     <figure id="fctinst12" float="1">
       <title>Enter URI</title>
-      <graphic fileref="ui/fctinst12.png"/>
+      <graphic fileref="ui/fb16.png"/>
     </figure>
 </listitem>
   <listitem>Select a URI from the list of available Labels to obtain a description of the URI:
     <figure id="fctinst13" float="1">
       <title>Obtain a description of the URI</title>
-      <graphic fileref="ui/fctinst13.png"/>
+      <graphic fileref="ui/fb17.png"/>
+    </figure>
+        <figure id="fctinst13" float="1">
+      <title>Obtain a description of the URI</title>
+      <graphic fileref="ui/fb18.png"/>
     </figure>
 </listitem>
   <listitem>If data is loaded into the quad store via DML functions (TTLP, RDF_LOAD_RDFXML etc.) the
@@ -13040,72 +13643,120 @@ VT_INC_INDEX_DB_DBA_RDF_OBJ ()
 </listitem>
         </orderedlist>
 </sect2>
+<sect2 id="virtuosospongerfaceurilabels">
+	<title>URI Labels</title>
+
+	<orderedlist>
+   <listitem>Go to http://cname/fct</listitem>
+   <listitem>Enter a free text search pattern (for example, "Camcorder" as consumer product), and click Search: 
+    <figure id="fctinst13" float="1">
+      <title>URI Labels</title>
+      <graphic fileref="ui/fb19.png"/>
+    </figure>   	
+   	</listitem>
+   <listitem>Your initial query results page will display a list of literal value snippets where for each URL will be displayed a label: 
+    <figure id="fctinst13" float="1">
+      <title>URI Labels</title>
+      <graphic fileref="ui/fb20.png"/>
+    </figure>   	
+   	</listitem>
+   <listitem>Click for ex. on the URL link of the first row result.</listitem>
+   <listitem>The product description page should be shown and a list of Attributes and Values will be presented. An URL label of the product also will be shown: "Charges Lithium Ion 800 series batteries": 
+    <figure id="fctinst13" float="1">
+      <title>URI Labels</title>
+      <graphic fileref="ui/fb21.png"/>
+    </figure>   	
+    <figure id="fctinst13" float="1">
+      <title>URI Labels</title>
+      <graphic fileref="ui/fb22.png"/>
+    </figure>   	
+    <figure id="fctinst13" float="1">
+      <title>URI Labels</title>
+      <graphic fileref="ui/fb23.png"/>
+    </figure>   	
+   </listitem>
+  </orderedlist>   	
+</sect2>
 <sect2 id="virtuosospongerfaceusagest">
 <title>Usage Statistics</title>
 <orderedlist>
    <listitem>Use the Faceted Browser Search and Find User Interface to search for information on "Michael Jackson":
      <figure id="VirtFacetUsage1" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage1.png"/>
+       <graphic fileref="ui/fb24.png"/>
      </figure>
    </listitem>
-   <listitem>Results of the following form should be returned for the data sponged:
+   <listitem>Results of the following form should be returned for the network resource data being fetched.
      <figure id="VirtFacetUsage2" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage2.png"/>
+       <graphic fileref="ui/fb25.png"/>
      </figure>
    </listitem>
-   <listitem>Click the "Types" link under "Navigation"
+   <listitem>Click the "Types" link under "Entity Relations Navigation". 
    </listitem>
-   <listitem>Results about "Michael Jackson" as Type/Label/Count list should be returned.
+   <listitem>Results about "Michael Jackson" as Type/Label/Count list should be displayed: 
+     <figure id="VirtFacetUsage2" float="1">
+       <title>Usage Statistics</title>
+       <graphic fileref="ui/fb26.png"/>
+     </figure>
+   </listitem>
+   <listitem>You can navigate amongst the search results pages by using the "Prev" and "Next" buttons. Click for ex. "Next": 
+     <figure id="VirtFacetUsage2" float="1">
+       <title>Usage Statistics</title>
+       <graphic fileref="ui/fb27.png"/>
+     </figure>
    </listitem>
    <listitem>Click a type link, for ex.:
 <programlisting><![CDATA[
-dbpedia-owl:Artist
+http://dbpedia.org/class/yago/Artist109812338
 ]]></programlisting>
-     <figure id="VirtFacetUsage8" float="1">
-       <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage8.png"/>
-     </figure>
    </listitem>
    <listitem>Should be shown type results and:
 <programlisting><![CDATA[
-Displaying types of e1 where:
-e1 has any property whose value contains "Michael Jackson".
+Displaying Ranked Entity Names and Text summaries where:
 
-e1 is a dbpedia-owl:Artist . Drop
+Entity1 has any Attribute with Value "Michael Jackson" Drop.
+Entity1 is a yago:Artist109812338 . Drop
 ]]></programlisting>
      <figure id="VirtFacetUsage9" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage9.png"/>
+       <graphic fileref="ui/fb28.png"/>
      </figure>
    </listitem>
-   <listitem>Click the "Show values" link under "Navigation"
-   </listitem>
-   <listitem>Results should be shown for "Michael Jackson" as values and text summaries associated with pattern:
-<programlisting><![CDATA[
-Displaying values and text summaries associated with pattern e1 where:
-e1 has any property whose value contains "Michael Jackson".
-e1 is a dbpedia-owl:Artist . Drop
-]]></programlisting>
-   </listitem>
    <listitem>Click the link:
 <programlisting><![CDATA[
 dbpedia:Michael_Jackson
 ]]></programlisting>
-     <figure id="VirtFacetUsage10" float="1">
+   </listitem>
+   <listitem>Results about "Michael Jackson" as Attribute/Value list should be presented: 
+     <figure id="VirtFacetUsage9" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage10.png"/>
+       <graphic fileref="ui/fb29.png"/>
      </figure>
-   </listitem>
-   <listitem>Results about "Michael Jackson" as property/value list should be returned:
-     <figure id="VirtFacetUsage3" float="1">
+     <figure id="VirtFacetUsage9" float="1">
+       <title>Usage Statistics</title>
+       <graphic fileref="ui/fb30.png"/>
+     </figure>   	
+     <figure id="VirtFacetUsage9" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage3.png"/>
+       <graphic fileref="ui/fb31.png"/>
+     </figure>   	
+     <figure id="VirtFacetUsage9" float="1">
+       <title>Usage Statistics</title>
+       <graphic fileref="ui/fb32.png"/>
      </figure>
    </listitem>
-   <listitem>Click the "Usage Statistics" link under "Actions" shown right of the list.
+   <listitem>You can navigate amongst the search results pages by using the "First", "Prev", "Next" and "Last" buttons. Click for ex. "Last": 
+     <figure id="VirtFacetUsage10" float="1">
+       <title>Usage Statistics</title>
+       <graphic fileref="ui/fb33.png"/>
+     </figure>
+     <figure id="VirtFacetUsage10" float="1">
+       <title>Usage Statistics</title>
+       <graphic fileref="ui/fb34.png"/>
+     </figure>     
    </listitem>
+   <listitem>"Metadata" tab.</listitem>
    <listitem>Results of usage statistics for "Michael Jackson" grouped in 4 tabs should be shown:
 <orderedlist>
    <listitem>Referenced by Graphs: shows how many times the URI is found as subject in the relevant graph(s):
@@ -13122,7 +13773,7 @@ limit 20
 ]]></programlisting>
      <figure id="VirtFacetUsage4" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage4.png"/>
+       <graphic fileref="ui/fb35.png"/>
      </figure>
    </listitem>
    <listitem>Source Graphs:  shows how many times the URI is found as object in the relevant graph(s):
@@ -13139,7 +13790,7 @@ limit 20
 ]]></programlisting>
      <figure id="VirtFacetUsage5" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage5.png"/>
+       <graphic fileref="ui/fb36.png"/>
      </figure>
    </listitem>
    <listitem>Direct co-references: shows results as subject and calculated rank, based on running transitive closure over owl:sameAs of the URI in subject or object:
@@ -13161,7 +13812,7 @@ limit 20
 ]]></programlisting>
      <figure id="VirtFacetUsage6" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage6.png"/>
+       <graphic fileref="ui/fb37.png"/>
      </figure>
    </listitem>
    <listitem>Indirect co-references: shows expanded results for objects concur with the URI by IFP:
@@ -13177,7 +13828,7 @@ limit 20
 ]]></programlisting>
      <figure id="VirtFacetUsage7" float="1">
        <title>Usage Statistics</title>
-       <graphic fileref="ui/VirtFacetUsage7.png"/>
+       <graphic fileref="ui/fb38.png"/>
      </figure>
    </listitem>
 </orderedlist>
@@ -13185,122 +13836,208 @@ limit 20
 </orderedlist>
 </sect2>
 <sect2 id="virtuosospongerfacetexample"><title>Examples</title>
-<para><emphasis>Example for Use Faceted Navigation to Explore Virtuoso hosted Linked Data</emphasis></para>
+<para><emphasis>Faceted Browsing Sample using LOD Cloud Cache data space</emphasis></para>
 <para>The following example demonstrates a simple scenario of tracking Kingsley Idehen's conversations 
 across the Web, using the Virtuoso Faceted Browser hosted on LOD.</para>
 <orderedlist>
    <listitem>Go to http://lod.openlinksw.com/fct/
-     <figure id="fct1" float="1">
+     <figure id="fb2" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct1.png"/>
+       <graphic fileref="ui/fb2.png"/>
      </figure>
    </listitem>
    <listitem>Enter a free text search pattern (for example, "Kingsley Idehen"), and click Search
-     <figure id="fct2" float="1">
+     <figure id="f1" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct2.png"/>
+       <graphic fileref="ui/f1.png"/>
      </figure>
    </listitem>
    <listitem>Your initial query results page will display a list of literal value snippets from property
 values associated with the query text pattern
-     <figure id="fct3" float="1">
+     <figure id="f2" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct3.png"/>
+       <graphic fileref="ui/f2.png"/>
      </figure>
    </listitem>
    <listitem>Using the Navigation section on the right, click on "Types", which alters the contents
 of the query results area by presenting CURIE based hyperlinks for each of the Entity Types associated
 with Property values that contains the query text pattern
-     <figure id="fct4" float="1">
+     <figure id="f3" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct4.png"/>
+       <graphic fileref="ui/f3.png"/>
      </figure>
    </listitem>
+   <listitem>You can perform <b>Describe</b> for a given found type, by clicking the "Describe" link in the "Type" column. For ex, for "atom:Entry" the produced describe type page would show a list of Attributes and Values + automatically generated QRCode image:
+     <figure id="f4" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f4.png"/>
+     </figure>
+   </listitem>
+   <listitem>Click "Facets" tab to return to the Types content page from the previous step.</listitem>
    <listitem>Click on the "foaf:Person" link to narrow the result set down to Entities of this Type,
 un-hatch the checkbox beside this link for Negation (filtering out) based on this Entity Type
-     <figure id="fct5" float="1">
+     <figure id="f7" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f7.png"/>
+     </figure>
+     <itemizedlist mark="bullet">
+     	 <listitem>For Negation (filtering out) based on this Entity Type un-hatch the check-box shown besides the link:
+         <figure id="f5" float="1">
+           <title>Faceted Navigation Example</title>
+           <graphic fileref="ui/f5.png"/>
+         </figure>
+         <figure id="f6" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct5.png"/>
+           <graphic fileref="ui/f6.png"/>
      </figure>
    </listitem>
    <listitem>You can filter further, by switching (pivoting) to the a Property based view, by returning
 to the Navigation section and then clicking on "Properties" or "Referencing Properties" links; in either
 case, you have further filtering of based on the combination of Properties and Entities where Entities
 in the result-set contain values matching the query text pattern
-     <figure id="fct6" float="1">
+         <figure id="f8" float="1">
+           <title>Faceted Navigation Example</title>
+           <graphic fileref="ui/f8.png"/>
+         </figure>
+       </listitem>
+       <listitem></listitem>
+     </itemizedlist>
+   </listitem>
+   <listitem>From "Entity Relations Navigation" click "Attributes".
+     <figure id="f9" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f9.png"/>
+     </figure>   	
+   </listitem>
+   <listitem>You can navigate amongst the search results pages by using the "Prev" and "Next" buttons. Click for ex. "Next": 
+     <figure id="f10" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct6.png"/>
+       <graphic fileref="ui/f10.png"/>
      </figure>
    </listitem>
    <listitem>From the list of Property Types, click on the "foaf:interest" link to filter further,
-based on the values of this property
-     <figure id="fct7" float="1">
+based on the values of this property:
+     <figure id="f11" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct7.png"/>
+       <graphic fileref="ui/f11.png"/>
      </figure>
    </listitem>
-   <listitem>From the list of "foaf:interest" Values, click on "dbpedia:Linked_Data", which filters
+   <listitem>From the list of "foaf:interest" Values, click on "About:Linked Data", which filters
 the result-set further to display reveal Entity Identifier Links (Generic HTTP URIs) and Labels for
-each "foaf:Person" associated with the property "foaf:interest", in the URIBurner data space. 
-     <figure id="fct8" float="1">
+each "foaf:Person" associated with the property "foaf:interest", in the LOD data space:
+     <figure id="f12" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct8.png"/>
+       <graphic fileref="ui/f12.png"/>
      </figure>
    </listitem>
    <listitem>Click on one of the HTTP URIs in the filtered results-set to obtain a detailed structured
-description of a given Entity. Each listed Property is a Link; thus, each Property is a link to other
-structured Entity descriptions
-     <figure id="fct9" float="1">
+   	description of a given Entity i.e. about the person Kingsley Uyi Idehen. Each listed Property is 
+   	a <b>Link</b>; thus, each Property is a link to other structured Entity descriptions. Additionally, 
+   	a QRCode image will be produced automatically for the given entity:
+     <figure id="f13" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f13.png"/>
+     </figure>
+     <figure id="f14" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f14.png"/>
+     </figure>
+     <figure id="f15" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct9.png"/>
+       <graphic fileref="ui/f15.png"/>
+     </figure>  
+     <figure id="f16" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f16.png"/>
      </figure>
    </listitem>
-   <listitem>Click on "Usage Statistics" link to get a summary view of this Linked Data Space,
-"Reference" and "Source" graphs are akin to saying "Table X" and "Table Y" where each table
-is the container of Records re. RDBMS or Worksheet re. Spreadsheet.:
-     <figure id="fct10" float="1">
+   <listitem>You can navigate amongst the search results pages by using the "First", "Prev", "Next" and "Last" buttons. Click for ex. "Last":
+     <figure id="f17" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct10.png"/>
+       <graphic fileref="ui/f17.png"/>
      </figure>
-     <figure id="fct11" float="1">
+     <figure id="f18" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct11.png"/>
+       <graphic fileref="ui/f18.png"/>
      </figure>
    </listitem>
-   <listitem>"Direct" and "In-Direct" co-references show other references (Identifiers) that relate
-associated with Kingsley Idehen (like saying: here are his other names or his know by this name in
-this other place)
-     <figure id="fct12" float="1">
+   <listitem>Click on "<b>Metadata</b>" link to get a summary view of this Linked Data Space, "Source" ¨
+   and "Reference" graphs are akin to saying "Table X" and "Table Y" where each table is the container 
+   of Records re. RDBMS or Worksheet re. Spreadsheet.:
+     <figure id="f19" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/f19.png"/>
+     </figure>
+     <figure id="f20" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct12.png"/>
+       <graphic fileref="ui/f20.png"/>
      </figure>
-     <figure id="fct13" float="1">
+   </listitem>
+   <listitem>"Direct" and "InDirect" coreferences show other references (Identifiers) that relate 
+   	associated with Kingsley Idehen (like saying: here are his other names or his know by this name 
+   	in this other place):
+     <figure id="fct12" float="1">
+       <title>f21 Navigation Example</title>
+       <graphic fileref="ui/f21.png"/>
+     </figure>
+     <figure id="f22" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct13.png"/>
+       <graphic fileref="ui/f22.png"/>
      </figure>
    </listitem>
    <listitem>Click on "Settings" check "owl:sameAs" and it sets a context mode for the session
-(meaning: a set of rules to take place)
-     <figure id="fct14" float="1">
+(meaning: a set of rules to take place):
+     <figure id="f23" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct14.png"/>
+       <graphic fileref="ui/f23.png"/>
      </figure>
    </listitem>
-   <listitem>Go back to the "Direct Co-reference" tab
-     <figure id="fct15" float="1">
+   <listitem>Go back to the "Direct Co-reference" tab:
+     <figure id="f24" float="1">
        <title>Faceted Navigation Example</title>
-       <graphic fileref="ui/fct15.png"/>
+       <graphic fileref="ui/f24.png"/>
      </figure>
    </listitem>
    <listitem>As result each link will unveil a union (combination) of all the the data associated
 with all Kingsley Idehen's other Identifiers (other Names in other places), i.e., they all show the
 same data.</listitem>
+   <listitem>Go to "Facets" and then from "Entity Relations Navigation" click "New Search".</listitem>
+   <listitem>Enter a free text search pattern  (for example, "<code>Camcorder</code>" as consumer product), 
+   and click Search:
+     <figure id="fb19" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/fb19.png"/>
+     </figure>   
+   </listitem>
+   <listitem>Your initial query results page will display a list of literal value snippets where for 
+   	each URI will be displayed a label:
+     <figure id="fb20" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/fb20.png"/>
+     </figure>   
+   </listitem>   
+   <listitem>Click for ex. on the URL link ofthe first row result.</listitem>
+   <listitem>The product description page should be shown and a list of Attributes and Values will be 
+   	presented. An URI label of the product also will be shown: "CG-800":
+     <figure id="fb21" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/fb21.png"/>
+     </figure> 
+     <figure id="fb22" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/fb22.png"/>
+     </figure>   
+     <figure id="fb23" float="1">
+       <title>Faceted Navigation Example</title>
+       <graphic fileref="ui/fb23.png"/>
+     </figure>                 
+   </listitem>   
 </orderedlist>
 </sect2>
 </sect1>
 <sect1 id="virtuosospongerfacent">
-<title>Virtuoso Facets Web Service</title>
-<para>The Virtuoso Facets web service is a general purpose RDF query facility for facet based browsing.
+<title>Virtuoso Faceted Web Service</title>
+<para>The Virtuoso Faceted web service is a general purpose RDF query facility for facet based browsing.
 It takes an XML description of the view desired and generates the reply as an XML tree containing the
 requested data. The user agent or a local web page can use XSLT for rendering this for the end user.
 The selection of facets and values is represented as an XML tree. The rationale for this is the fact
@@ -13698,7 +14435,7 @@ restriction, click the shown variable in the navigation and set it to s1.</para>
   <title>WebService Interface</title>
 <sect3 id="virtuosospongerfacentuirest">
   <title>REST interface</title>
-  <para>The Virtuoso Facets web service provide following REST interface:</para>
+  <para>The Virtuoso Faceted web service provide following REST interface:</para>
   <para>Service description:</para>
       <itemizedlist mark="bullet">
   <listitem>Endpoint: http://<cname>/fct/service for ex. http://lod.openlinksw.com/fct/service </listitem>
@@ -13748,7 +14485,7 @@ curl -H "Content-Type: text/xml" -d @post.xml  http://lod.openlinksw.com/fct/ser
 ]]></programlisting>
 </sect3>
 <sect3 id="virtuosospongerfacentuirestapi">
-  <title>Virtuoso APIs for Facet REST services</title>
+  <title>Virtuoso APIs for Faceted REST services</title>
 <para>The Virtuoso APIs for FCT REST services are Virtuoso Stored Procedures that enable faceted browsing
 over Linked Data hosted in the RDF Quad Store. This also includes Linked Data that is progressively
 added to the Quad Store via URI de-referencing.
@@ -14100,7 +14837,7 @@ http (txt);
       </listitem>
   <listitem>The result of executing the fct_example.vsp should be:
      <figure id="fcapiex1" float="1">
-       <title>Facet API Example</title>
+       <title>Faceted API Example</title>
        <graphic fileref="ui/fcapiex1.png"/>
      </figure>
 </listitem>
@@ -14926,11 +15663,11 @@ we will stick with the nice to long conversion using regex-based rules.
 </sect4>
 </sect3>
 <sect3 id="urlrewriteruleexamplenorthwind">
-   <title>Example - URL Rewriting For the Northwind RDF View</title>
+   <title>Example - URL Rewriting For the Northwind Linked Data View</title>
 <para>The Northwind schema is comprised of commonly understood SQL Tables that include: Customers,
 Orders, Employees, Products, Product Categories, Shippers, Countries, Provinces etc.
 </para>
-<para>An RDF View of SQL data is an RDF named graph (RDF data set) comprised of RDF Linked Data
+<para>An Linked Data View of SQL data is an RDF named graph (RDF data set) comprised of RDF Linked Data
 (triples) stored in a Virtuoso Quad Store (the native RDF Data Management realm of Virtuoso).
 </para>
 <para>In this example we are going interact with Linked Data deployed into the Data-Web from
@@ -15573,7 +16310,7 @@ condition on ?o1.
 </para>
 <para>This query is a typical example of queries that are executed all the time when a user refines a
 search. We will now look at how we can make an efficient execution plan for the query. First, we must
-know the cardinalities of the search conditions:
+know the cardinalities of the search conditions.
 </para>
 <para>To see the count of subclasses of Yago performer, we can do:
 </para>
@@ -15746,8 +16483,7 @@ WHERE
         T_MIN (0),
         T_MAX (1)
       )
-    FILTER
-      ( ?org  =  ?k ) .
+    FILTER ( ?org = ?k ) .
     ?syn foaf:knows ?f .
   }
 ]]></programlisting>
@@ -15959,8 +16695,8 @@ is still accumulating results, thus a query is guaranteed to return in no more t
 where n is the number of nested aggregations or subqueries.
 </para>
   </sect3>
-  <sect3 id="rdfiridereferencingfacetws"><title>Facets Web Service and Linked Data</title>
-<para>The Virtuoso Facets web service is a general purpose RDF query facility for facet based browsing.
+  <sect3 id="rdfiridereferencingfacetws"><title>Faceted Web Service and Linked Data</title>
+<para>The Virtuoso Faceted Web Service is a general purpose RDF query facility for Faceted based browsing.
 It takes an XML description of the view desired and generates the reply as an XML tree containing the
 requested data. The user agent or a local web page can use XSLT for rendering this for the end user.
 The selection of facets and values is represented as an XML tree. The rationale for this is the fact
@@ -16057,8 +16793,8 @@ object has a location. The map has the objects and their locations.
 </para>
   <tip><title>See Also:</title>
     <itemizedlist mark="bullet">
-      <listitem><link linkend="virtuosospongerfacent">Virtuoso Facets Web Service</link></listitem>
-      <listitem><link linkend="virtuosospongerfacentuirestapi">Virtuoso APIs for Facet REST services</link></listitem>
+      <listitem><link linkend="virtuosospongerfacent">Virtuoso Faceted Web Service</link></listitem>
+      <listitem><link linkend="virtuosospongerfacentuirestapi">Virtuoso APIs for Faceted REST services</link></listitem>
     </itemizedlist>
   </tip>
   </sect3>
@@ -16100,7 +16836,7 @@ managed by a separate server process.
 </sect2>
   <tip><title>See Also:</title>
     <itemizedlist mark="bullet">
-      <listitem><link linkend="virtuosospongerfacetinstall">Virtuoso Facet Browser Installation and configuration</link></listitem>
+      <listitem><link linkend="virtuosospongerfacetinstall">Virtuoso Faceted Browser Installation and configuration</link></listitem>
     </itemizedlist>
   </tip>
 </sect1>
@@ -16109,7 +16845,7 @@ managed by a separate server process.
 <sect1 id="rdfsparqlrule"><title>Inference Rules & Reasoning</title>
 <sect2 id="rdfsparqlruleintro"><title>Introduction</title>
 <para>Virtuoso SPARQL can use an inference context for inferring triples that are not physically stored.
-This functionality applies to physically stored quads and not to virtual triples generated from relational data with RDF views.
+This functionality applies to physically stored quads and not to virtual triples generated from relational data with Linked Data Views.
 Such an inference context can be built from one or more graphs containing RDF Schema triples. The supported
 RDF Schema or OWL constraints are imported from these graphs and are grouped together into rule bases.
 A rule base is a persistent entity that can be referenced by a SPARQL query or end point. Queries running
@@ -16147,8 +16883,7 @@ the rule set to correspond to the state of the stored graphs.
 </para>
 </sect2>
 <sect2 id="rdfsparqlrulesubclassandsubprop"><title>Subclasses and Subproperties</title>
-<para>Virtuoso SPARQL supports RDF Schema subclasses and subproperties.
-</para>
+  <para>Virtuoso SPARQL supports RDF Schema subclasses and subproperties.</para>
 <para>The predicates <emphasis>rdfs:subClassOf</emphasis> and <emphasis>rdfs:subPropertyOf</emphasis> are
 recognized when they appear in graphs included in a rule set. When such a rule set is specified as a context
 for a SPARQL query, the following extra triples are generated as needed.
@@ -16166,124 +16901,512 @@ of <emphasis>?predicate</emphasis>. This is done by having the triple <emphasis>
 as part of the graphs making up the rule context. Transitivity is observed, thus if a is a subpredicate of b and b
 a subpredicate of c, then a is also a subpredicate of c.
 </para>
-</sect2>
-<sect2 id="rdfsameas"><title>OWL sameAs Support</title>
-<para>
-Virtuoso has limited support for the OWL sameAs predicate.
-</para>
-<para>
-If sameAs traversal is enabled and a triple pattern with a given
-subject or object is being matched, all the synonyms of the S and O
-will be tried and results generated for all the tried bindings of S
-and O. The set of synonyms is generated at run time by following all
-owl:sameAs triples where the IRI in question is either the subject or
-the object. These are followed recursively from object to subject and
-subject to object until the complete transitive closure is generated.
-All sameAs triples from all the graphs applicable to instantiating
-the triple pattern at hand are considered.
-</para>
-<para>
-Thus for example:
-</para>
-<para>The inital SPARQL query:</para>
+
+  <para>Two methods can be used for typical recursions, transitivity on inference and plain transitive patterns 
+(or subqueries).</para>
+  <para>The advantage of inference is that queries are short and one inference rule set may be maintained for 
+numerous queries.</para>
+  <para>If queries are about trees of classes or properties, or about equivalences of nodes, consider using 
+inference rule sets.</para>
+  <para>Transitive patterns are inconvenient and may easily result in queries that runs too long or hard 
+to debug, but they're unavoidable in traversing social networks or plain querying of RDF lists.</para>
+  <para>So consider a rule set, a handful of nodes with classes from the rule set and a couple of RDF 
+Lisp-style lists defined on demo.openlinksw.com:</para>
 <programlisting><![CDATA[
-SQL>SPARQL
-prefix foaf: <http://xmlns.com/foaf/0.1/>
-prefix owl: <http://www.w3.org/2002/07/owl#>
-prefix sioc: <http://rdfs.org/sioc/ns#>
-SELECT *
-from <http://myopenlink.net/dataspace>
-where
- {
-    ?person a foaf:Person FILTER REGEX(?person ,"http://myopenlink.net/dataspace/person/kidehen#this").
-    ?person foaf:name ?name .
-    ?person owl:sameAs ?sameas .
-  }
-limit 10;
-person                                               name             sameas
-VARCHAR                                              VARCHAR          VARCHAR
+SQL> SPARQL CLEAR GRAPH <http://example.com/2/owl>;
+callret-0
+VARCHAR
 _______________________________________________________________________________
 
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://my.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://kidehen.idehen.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://qdos.com/user/e922b748a2eb667bf37b188018002dec
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://knowee.net/kidehen/ids/id3684976382
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://dbpedia.org/resource/Kingsley_Idehen
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://dbtune.org/last-fm/kidehen
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://revyu.com/people/kidehen
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://identi.ca/user/14092
-http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://myopenlink.net/proxy?url=http%3A%2F%2Fwww.facebook.com%2Fpeople%2FKingsley_Idehen%2F605980750&force=rdf&login=kidehen
+Clear <http://example.com/2/owl>  -- done
 
-10 Rows. -- 181 msec.
+1 Rows. -- 0 msec.
+
+SQL> TTLP (' @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  . 
+  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>  . 
+  @prefix owl: <http://www.w3.org/2002/07/owl#>  . 
+  @prefix e: <http://example.com/e/>  .   
+  e:c1 rdfs:subClassOf e:c1or2 . 
+  e:c2 rdfs:subClassOf e:c1or2 . 
+  e:c1-10 rdfs:subClassOf e:c1 . 
+  e:c1-20 rdfs:subClassOf e:c1 . 
+  e:c2-30 rdfs:subClassOf e:c2 . 
+  e:c2-40 rdfs:subClassOf e:c2 . 
+  ', 'http://example.com/2/owl', 'http://example.com/2/owl' );
+
+Done. -- 0 msec.
 ]]></programlisting>
-<para>So if we have:</para>
+   <para>You can also use the SPARUL equivalent variant:</para>
 <programlisting><![CDATA[
-<http://myopenlink.net/dataspace/person/kidehen#this>  	<http://www.w3.org/2002/07/owl#sameAs> <http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this> .
-<http://myopenlink.net/dataspace/person/kidehen#this>  	<http://xmlns.com/foaf/0.1/name>  	Kingsley Idehen
+SPARQL 
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>  
+PREFIX owl: <http://www.w3.org/2002/07/owl#>  
+PREFIX e: <http://example.com/e/>  
+
+INSERT IN GRAPH <http://example.com/2/owl>
+  {
+    e:c1 rdfs:subClassOf e:c1or2 .
+    e:c2 rdfs:subClassOf e:c1or2 .
+    e:c1-10 rdfs:subClassOf e:c1 .
+    e:c1-20 rdfs:subClassOf e:c1 .
+    e:c2-30 rdfs:subClassOf e:c2 .
+    e:c2-40 rdfs:subClassOf e:c2 .
+  } ;
 ]]></programlisting>
-<para>
-and we instantiate <emphasis>?s <http://xmlns.com/foaf/0.1/name> "Kingsley Idehen"</emphasis>
-we get <emphasis>?s</emphasis> bound to <emphasis><http://myopenlink.net/dataspace/person/kidehen#this></emphasis>.
-</para>
-<para>
-If we instantiate <emphasis><http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this>
-<http://xmlns.com/foaf/0.1/name> ?l</emphasis>
-we get <emphasis>?l</emphasis> bound to <emphasis>"Kingsley Idehen"</emphasis> because the subject was given and it was expanded to its synonyms.
-</para>
+   <para>Define the inference rule:</para>
+<programlisting><![CDATA[
+SQL> rdfs_rule_set ('http://example.com/2/owl', 'http://example.com/2/owl');
 
+Done. -- 0 msec.
 
+SQL> SPARQL CLEAR GRAPH <http://example.com/2/data> ;
+callret-0
+VARCHAR
+_______________________________________________________________________________
 
+Clear <http://example.com/2/data>  -- done
 
-<para>
-If binding a variable in a pattern where the variable was free, we do not expand the value to the complete set of its synonyms.
-</para>
-<para>
-Same-as expansion is enabled in a query by <emphasis>define input:same-as "yes"</emphasis> in the beginning of the SPARQL query.
-This has a significant run time cost but is in some cases useful when joining data between sets which are mapped to each other with same-as.
-</para>
-<para>
-We note that the number of same-as expansions will depend on the join order used for the SPARQL query.
-The compiler does not know the number of synonyms and cannot set the join order accordingly.
-Regardless of the join order we will however get at least one IRI of the each synonym set as answer.
-Also when interactively navigating a graph with a browser, the same-as expansion will take all synonyms into account.
-</para>
-<para>
-For getting the complete entailment of same-as, a forward
-chaining approach should be used, effectively asserting all the
-implied triples.
-</para>
-<sect3 id="rdfsameasexmp"><title>OWL sameAs Example</title>
-<programlisting><![CDATA[
-SQL>SPARQL
-DEFINE input:same-as "yes"
-SELECT *
-WHERE
- {
-   ?s <http://xmlns.com/foaf/0.1/name> "Kingsley Idehen" .
- }
-LIMIT 10;
+1 Rows. -- 0 msec.
 
-s
-VARCHAR
-___________________________________________________
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-http://demo.openlinksw.com/dataspace/kingsley#person
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-http://myopenlink.net/dataspace/person/kidehen#this
-No. of rows in result: 10
+SQL>  TTLP ('
+  @prefix e: <http://example.com/e/>  .
+  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
+  @prefix owl: <http://www.w3.org/2002/07/owl#>  .
+  e:s1 a e:c1 ; e:p1 "Value of p1 for s1" .
+  e:s2 a e:c2 ; e:p1 "Value of p1 for s2" .
+  e:s1-10 a e:c1-10 ; e:p1 "Value of p1 for s1-10" .
+  e:s1-20 a e:c1-20 ; e:p1 "Value of p1 for s1-20" .
+  e:s2-30 a e:c2-30 ; e:p1 "Value of p1 for s2-30" .
+  e:s2-40 a e:c2-40 ; e:p1 "Value of p1 for s2-40" .
+  e:lists
+       rdf:_1 ( e:list1-item1 e:list1-item2 e:list1-item3 ) ;
+       rdf:_2 (
+           [ e:p2 "Value of p2 of item1 of list2" ; e:p3 "Value of p3 of item1 of list2" ]
+           [ e:p2 "Value of p2 of item2 of list2" ; e:p3 "Value of p3 of item2 of list2" ]
+           [ e:p2 "Value of p2 of item3 of list2" ; e:p3 "Value of p3 of item3 of list2" ] ) .
+  ', 'http://example.com/2/data', 'http://example.com/2/data' );
+
+Done. -- 0 msec.
 ]]></programlisting>
-</sect3>
-</sect2>
-<sect2 id="rdfsparqlruleintro"><title>Implementation</title>
-<para>Triples entailed by subclass or subproperty statements in an inference context are not physically stored.
-Such triples are added to the result set by the query run time as needed. Also queries involving subclass or subproperty
+  <para>You can also use the SPARUL equivalent variant:</para>
+<programlisting><![CDATA[
+SPARQL 
+PREFIX e: <http://example.com/e/>  
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  
+PREFIX owl: <http://www.w3.org/2002/07/owl#>  
+
+INSERT IN GRAPH <http://example.com/2/data>
+  {
+    e:s1 a e:c1 ; e:p1 "Value of p1 for s1" .
+    e:s2 a e:c2 ; e:p1 "Value of p1 for s2" .
+    e:s1-10 a e:c1-10 ; e:p1 "Value of p1 for s1-10" .
+    e:s1-20 a e:c1-20 ; e:p1 "Value of p1 for s1-20" .
+    e:s2-30 a e:c2-30 ; e:p1 "Value of p1 for s2-30" .
+    e:s2-40 a e:c2-40 ; e:p1 "Value of p1 for s2-40" .
+    e:lists
+      rdf:_1 ( e:list1-item1 e:list1-item2 e:list1-item3 ) ;
+      rdf:_2 (
+           [ e:p2 "Value of p2 of item1 of list2" ; e:p3 "Value of p3 of item1 of list2" ]
+           [ e:p2 "Value of p2 of item2 of list2" ; e:p3 "Value of p3 of item2 of list2" ]
+           [ e:p2 "Value of p2 of item3 of list2" ; e:p3 "Value of p3 of item3 of list2" ] )
+  };
+]]></programlisting>  
+  <para>SPARQL DESCRIBE works fine with inference, deriving additional type information:</para>
+<programlisting><![CDATA[
+DEFINE input:inference <http://example.com/2/owl>
+DESCRIBE <http://example.com/e/s1>
+FROM <http://example.com/2/data>
+
+fmtaggret-
+LONG VARCHAR
+_______________________________________________________________________________
+
+ at prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
+ at prefix ns1: <http://example.com/e/>  .
+ns1:s1 rdf:type ns1:c1or2 ,
+ns1:c1 ;
+ns1:p1 "Value of p1 for s1" .
+
+1 Rows. -- 0 msec.
+]]></programlisting>
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E%0D%0ADESCRIBE+%3Chttp%3A%2F%2Fexample.com%2Fe%2Fs1%3E%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E&should-sponge=&format=application%2Frdf%2Bxml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E%0D%0ADESCRIBE+%3Chttp%3A%2F%2Fexample.com%2Fe%2Fs1%3E%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E&should-sponge=&format=application%2Frdf%2Bxml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+  
+<programlisting><![CDATA[
+DEFINE input:inference <http://example.com/2/owl>
+DESCRIBE <http://example.com/e/s2> 
+FROM <http://example.com/2/data>
+fmtaggret-
+LONG VARCHAR
+_______________________________________________________________________________
+
+ at prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
+ at prefix ns1: <http://example.com/e/>  .
+ns1:s2 rdf:type ns1:c1or2 ,
+ns1:c2 ;
+ns1:p1 "Value of p1 for s2" .
+
+1 Rows. -- 0 msec.
+]]></programlisting>
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E%0D%0ADESCRIBE+%3Chttp%3A%2F%2Fexample.com%2Fe%2Fs2%3E+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E&should-sponge=&format=application%2Frdf%2Bxml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E%0D%0ADESCRIBE+%3Chttp%3A%2F%2Fexample.com%2Fe%2Fs2%3E+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E&should-sponge=&format=application%2Frdf%2Bxml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+  <para>Querying is simple as well:</para>
+
+<programlisting><![CDATA[
+SQL>SPARQL DEFINE input:inference <http://example.com/2/owl>  
+PREFIX e:<http://example.com/e/>
+SELECT * 
+FROM <http://example.com/2/data> 
+WHERE 
+  { 
+    ?s a e:c1or2 ; 
+          e:p1 ?o 
+  }
+  
+s                            o
+VARCHAR                      VARCHAR
+___________________________
+
+http://example.com/e/s1      Value of p1 for s1
+http://example.com/e/s1-10   Value of p1 for s1-10
+http://example.com/e/s1-20   Value of p1 for s1-20
+http://example.com/e/s2-30   Value of p1 for s2-30
+http://example.com/e/s2-40   Value of p1 for s2-40
+http://example.com/e/s2      Value of p1 for s2
+
+6 Rows. -- 0 msec.
+]]></programlisting>
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E++%0D%0APREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+*+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E+%0D%0AWHERE+%0D%0A++{+%0D%0A++++%3Fs+a+e%3Ac1or2+%3B+%0D%0A++++++++++e%3Ap1+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E++%0D%0APREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+*+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E+%0D%0AWHERE+%0D%0A++{+%0D%0A++++%3Fs+a+e%3Ac1or2+%3B+%0D%0A++++++++++e%3Ap1+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+<programlisting><![CDATA[
+SQL>SPARQL DEFINE input:inference <http://example.com/2/owl>  
+PREFIX e:<http://example.com/e/>
+SELECT * FROM <http://example.com/2/data>  
+WHERE 
+  { 
+    ?s a e:c1 ; 
+       e:p1 ?o 
+  }
+  
+s                            o
+VARCHAR                      VARCHAR
+___________________________
+
+http://example.com/e/s1      Value of p1 for s1
+http://example.com/e/s1-10   Value of p1 for s1-10
+http://example.com/e/s1-20   Value of p1 for s1-20
+
+3 Rows. -- 0 msec.
+]]></programlisting>
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E++%0D%0APREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+*+FROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{+%0D%0A++++%3Fs+a+e%3Ac1+%3B+%0D%0A+++++++e%3Ap1+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E++%0D%0APREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+*+FROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{+%0D%0A++++%3Fs+a+e%3Ac1+%3B+%0D%0A+++++++e%3Ap1+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+
+  <para>However you should care about duplicates if both types and properties are queried: the join will 
+  result in all combinations of types and property values.</para>
+
+<programlisting><![CDATA[
+SQL>SPARQL DEFINE input:inference <http://example.com/2/owl>  
+PREFIX e:<http://example.com/e/>
+SELECT * FROM <http://example.com/2/data>  
+WHERE 
+  { 
+    ?s a ?t ; 
+     e:p1 ?o 
+  }
+  
+s                            t                            o
+VARCHAR                      VARCHAR                      VARCHAR
+___________________________
+
+http://example.com/e/s1      http://example.com/e/c1      Value of p1 for s1
+http://example.com/e/s1      http://example.com/e/c1or2   Value of p1 for s1
+http://example.com/e/s1-10   http://example.com/e/c1-10   Value of p1 for s1-10
+http://example.com/e/s1-10   http://example.com/e/c1      Value of p1 for s1-10
+http://example.com/e/s1-10   http://example.com/e/c1or2   Value of p1 for s1-10
+http://example.com/e/s1-20   http://example.com/e/c1-20   Value of p1 for s1-20
+http://example.com/e/s1-20   http://example.com/e/c1      Value of p1 for s1-20
+http://example.com/e/s1-20   http://example.com/e/c1or2   Value of p1 for s1-20
+http://example.com/e/s2-30   http://example.com/e/c2-30   Value of p1 for s2-30
+http://example.com/e/s2-30   http://example.com/e/c2      Value of p1 for s2-30
+http://example.com/e/s2-30   http://example.com/e/c1or2   Value of p1 for s2-30
+http://example.com/e/s2-40   http://example.com/e/c2-40   Value of p1 for s2-40
+http://example.com/e/s2-40   http://example.com/e/c2      Value of p1 for s2-40
+http://example.com/e/s2-40   http://example.com/e/c1or2   Value of p1 for s2-40
+http://example.com/e/s2      http://example.com/e/c2      Value of p1 for s2
+http://example.com/e/s2      http://example.com/e/c1or2   Value of p1 for s2
+
+16 Rows. -- 0 msec.
+]]></programlisting>
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E++%0D%0APREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+*+FROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{+%0D%0A++++%3Fs+a+%3Ft+%3B+%0D%0A+++++e%3Ap1+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=DEFINE+input%3Ainference+%3Chttp%3A%2F%2Fexample.com%2F2%2Fowl%3E++%0D%0APREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+*+FROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{+%0D%0A++++%3Fs+a+%3Ft+%3B+%0D%0A+++++e%3Ap1+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+
+  <para>Transitive queries are convenient as SPARQL 1.1 "predicate+" equivalent. The equivalent of 
+  "predicate*" requires the use of a union:</para>
+
+<programlisting><![CDATA[
+SQL>SPARQL PREFIX e:<http://example.com/e/>
+SELECT ?item 
+FROM <http://example.com/2/data>  
+WHERE 
+  {
+    { 
+      ?lists rdf:_1 ?node 
+    }
+    UNION
+    { 
+      ?lists rdf:_1 ?l .
+      ?l rdf:rest ?node option (transitive) . 
+    }
+    ?node rdf:first ?item 
+  }
+  
+item
+VARCHAR
+_______________________________________________________________________________
+
+http://example.com/e/list1-item1
+http://example.com/e/list1-item2
+http://example.com/e/list1-item3
+
+3 Rows. -- 0 msec.
+]]></programlisting>
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=PREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+%3Fitem+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_1+%3Fnode+%0D%0A++++}%0D%0A++++UNION%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_1+%3Fl+.%0D%0A++++++%3Fl+rdf%3Arest+%3Fnode+option+%28transitive%29+.+%0D%0A++++}%0D%0A++++%3Fnode+rdf%3Afirst+%3Fitem+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=PREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+%3Fitem+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_1+%3Fnode+%0D%0A++++}%0D%0A++++UNION%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_1+%3Fl+.%0D%0A++++++%3Fl+rdf%3Arest+%3Fnode+option+%28transitive%29+.+%0D%0A++++}%0D%0A++++%3Fnode+rdf%3Afirst+%3Fitem+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+
+<programlisting><![CDATA[
+SQL> SPARQL PREFIX e:<http://example.com/e/>
+SELECT ?p ?o 
+FROM <http://example.com/2/data>  
+WHERE 
+  {
+    { 
+      ?lists rdf:_2 ?node 
+    }
+    UNION
+    { 
+      ?lists rdf:_2 ?l .
+      ?l rdf:rest ?node option (transitive) . 
+    }
+    ?node rdf:first ?item .
+    ?item ?p ?o 
+  }
+  
+p                         o
+VARCHAR                   VARCHAR
+________________________
+
+http://example.com/e/p2   Value of p2 of item1 of list2
+http://example.com/e/p3   Value of p3 of item1 of list2
+http://example.com/e/p2   Value of p2 of item2 of list2
+http://example.com/e/p3   Value of p3 of item2 of list2
+http://example.com/e/p2   Value of p2 of item3 of list2
+http://example.com/e/p3   Value of p3 of item3 of list2
+
+6 Rows. -- 0 msec.
+]]></programlisting>
+
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=PREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+%3Fp+%3Fo+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fnode+%0D%0A++++}%0D%0A++++UNION%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fl+.%0D%0A++++++%3Fl+rdf%3Arest+%3Fnode+option+%28transitive%29+.+%0D%0A++++}%0D%0A++++%3Fnode+rdf%3Afirst+%3Fitem+.%0D%0A++++%3Fitem+%3Fp+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=PREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+%3Fp+%3Fo+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fnode+%0D%0A++++}%0D%0A++++UNION%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fl+.%0D%0A++++++%3Fl+rdf%3Arest+%3Fnode+option+%28transitive%29+.+%0D%0A++++}%0D%0A++++%3Fnode+rdf%3Afirst+%3Fitem+.%0D%0A++++%3Fitem+%3Fp+%3Fo+%0D%0A++}&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+
+  <para>Note that the result set can be in order of items in the list, but it don't have to. 
+  If the order should be preserved, then fix the direction of transitive scan, get step number as a 
+  variable, order by that variable.</para>
+
+<programlisting><![CDATA[
+-- Line 82:
+SQL> SPARQL PREFIX e:<http://example.com/e/>
+SELECT ?p ?o bif:coalesce(?step_no, 0) 
+FROM <http://example.com/2/data>  
+WHERE 
+  {
+    { 
+      ?lists rdf:_2 ?node 
+    }
+    UNION
+    { 
+      ?lists rdf:_2 ?l .
+      ?l rdf:rest ?node OPTION (transitive, t_direction 1, t_step("step_no") as ?step_no) . 
+    }
+    ?node rdf:first ?item .
+    ?item ?p ?o 
+  } 
+ORDER BY ASC (?step_no)
+
+p                         o                               callret-2
+VARCHAR                   VARCHAR                         VARCHAR
+________________________
+
+http://example.com/e/p2   Value of p2 of item1 of list2   0
+http://example.com/e/p3   Value of p3 of item1 of list2   0
+http://example.com/e/p2   Value of p2 of item2 of list2   1
+http://example.com/e/p3   Value of p3 of item2 of list2   1
+http://example.com/e/p2   Value of p2 of item3 of list2   2
+http://example.com/e/p3   Value of p3 of item3 of list2   2
+
+6 Rows. -- 7 msec.
+]]></programlisting>
+
+
+  <para>Example links against <ulink url="http://demo.openlinksw.com/sparql">Virtuoso Demo Server SPARQL Endpoint</ulink> with SPARQl Protocol URLs:</para>
+  <itemizedlist mark="bullet">
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&query=PREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+%3Fp+%3Fo+bif%3Acoalesce%28%3Fstep_no%2C+0%29+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fnode+%0D%0A++++}%0D%0A++++UNION%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fl+.%0D%0A++++++%3Fl+rdf%3Arest+%3Fnode+OPTION+%28transitive%2C+t_direction+1%2C+t_step%28%22step_no%22%29+as+%3Fstep_no%29+.+%0D%0A++++}%0D%0A++++%3Fnode+rdf%3Afirst+%3Fitem+.%0D%0A++++%3Fitem+%3Fp+%3Fo+%0D%0A++}+%0D%0AORDER+BY+ASC+%28%3Fstep_no%29%0D%0A&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View results page</ulink></listitem>
+    <listitem><ulink url="http://demo.openlinksw.com/sparql?default-graph-uri=&qtxt=PREFIX+e%3A%3Chttp%3A%2F%2Fexample.com%2Fe%2F%3E%0D%0ASELECT+%3Fp+%3Fo+bif%3Acoalesce%28%3Fstep_no%2C+0%29+%0D%0AFROM+%3Chttp%3A%2F%2Fexample.com%2F2%2Fdata%3E++%0D%0AWHERE+%0D%0A++{%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fnode+%0D%0A++++}%0D%0A++++UNION%0D%0A++++{+%0D%0A++++++%3Flists+rdf%3A_2+%3Fl+.%0D%0A++++++%3Fl+rdf%3Arest+%3Fnode+OPTION+%28transitive%2C+t_direction+1%2C+t_step%28%22step_no%22%29+as+%3Fstep_no%29+.+%0D%0A++++}%0D%0A++++%3Fnode+rdf%3Afirst+%3Fitem+.%0D%0A++++%3Fitem+%3Fp+%3Fo+%0D%0A++}+%0D%0AORDER+BY+ASC+%28%3Fstep_no%29%0D%0A&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=0&debug=on">View editor page</ulink></listitem>
+  </itemizedlist>
+
+
+</sect2>
+<sect2 id="rdfsameas"><title>OWL sameAs Support</title>
+<para>
+Virtuoso has limited support for the OWL sameAs predicate.
+</para>
+<para>
+If sameAs traversal is enabled and a triple pattern with a given
+subject or object is being matched, all the synonyms of the S and O
+will be tried and results generated for all the tried bindings of S
+and O. The set of synonyms is generated at run time by following all
+owl:sameAs triples where the IRI in question is either the subject or
+the object. These are followed recursively from object to subject and
+subject to object until the complete transitive closure is generated.
+All sameAs triples from all the graphs applicable to instantiating
+the triple pattern at hand are considered.
+</para>
+<para>
+Thus for example:
+</para>
+<para>The inital SPARQL query:</para>
+<programlisting><![CDATA[
+SQL>SPARQL
+prefix foaf: <http://xmlns.com/foaf/0.1/>
+prefix owl: <http://www.w3.org/2002/07/owl#>
+prefix sioc: <http://rdfs.org/sioc/ns#>
+SELECT *
+from <http://myopenlink.net/dataspace>
+where
+ {
+    ?person a foaf:Person FILTER REGEX(?person ,"http://myopenlink.net/dataspace/person/kidehen#this").
+    ?person foaf:name ?name .
+    ?person owl:sameAs ?sameas .
+  }
+limit 10;
+person                                               name             sameas
+VARCHAR                                              VARCHAR          VARCHAR
+_______________________________________________________________________________
+
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://my.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://kidehen.idehen.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://qdos.com/user/e922b748a2eb667bf37b188018002dec
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://knowee.net/kidehen/ids/id3684976382
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://dbpedia.org/resource/Kingsley_Idehen
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://dbtune.org/last-fm/kidehen
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://revyu.com/people/kidehen
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://identi.ca/user/14092
+http://myopenlink.net/dataspace/person/kidehen#this  Kingsley Idehen  http://myopenlink.net/proxy?url=http%3A%2F%2Fwww.facebook.com%2Fpeople%2FKingsley_Idehen%2F605980750&force=rdf&login=kidehen
+
+10 Rows. -- 181 msec.
+]]></programlisting>
+<para>So if we have:</para>
+<programlisting><![CDATA[
+<http://myopenlink.net/dataspace/person/kidehen#this>  	<http://www.w3.org/2002/07/owl#sameAs> <http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this> .
+<http://myopenlink.net/dataspace/person/kidehen#this>  	<http://xmlns.com/foaf/0.1/name>  	Kingsley Idehen
+]]></programlisting>
+<para>
+and we instantiate <emphasis>?s <http://xmlns.com/foaf/0.1/name> "Kingsley Idehen"</emphasis>
+we get <emphasis>?s</emphasis> bound to <emphasis><http://myopenlink.net/dataspace/person/kidehen#this></emphasis>.
+</para>
+<para>
+If we instantiate <emphasis><http://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this>
+<http://xmlns.com/foaf/0.1/name> ?l</emphasis>
+we get <emphasis>?l</emphasis> bound to <emphasis>"Kingsley Idehen"</emphasis> because the subject was given and it was expanded to its synonyms.
+</para>
+
+
+
+
+<para>
+If binding a variable in a pattern where the variable was free, we do not expand the value to the complete set of its synonyms.
+</para>
+<para>
+Same-as expansion is enabled in a query by <emphasis>define input:same-as "yes"</emphasis> in the beginning of the SPARQL query.
+This has a significant run time cost but is in some cases useful when joining data between sets which are mapped to each other with same-as.
+</para>
+<para>
+We note that the number of same-as expansions will depend on the join order used for the SPARQL query.
+The compiler does not know the number of synonyms and cannot set the join order accordingly.
+Regardless of the join order we will however get at least one IRI of the each synonym set as answer.
+Also when interactively navigating a graph with a browser, the same-as expansion will take all synonyms into account.
+</para>
+<para>
+For getting the complete entailment of same-as, a forward
+chaining approach should be used, effectively asserting all the
+implied triples.
+</para>
+<sect3 id="rdfsameasexmp"><title>OWL sameAs Example</title>
+<programlisting><![CDATA[
+SQL>SPARQL
+DEFINE input:same-as "yes"
+SELECT *
+WHERE
+ {
+   ?s <http://xmlns.com/foaf/0.1/name> "Kingsley Idehen" .
+ }
+LIMIT 10;
+
+s
+VARCHAR
+___________________________________________________
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+http://demo.openlinksw.com/dataspace/kingsley#person
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+http://myopenlink.net/dataspace/person/kidehen#this
+No. of rows in result: 10
+]]></programlisting>
+</sect3>
+</sect2>
+<sect2 id="rdfsparqlruleintro"><title>Implementation</title>
+<para>Triples entailed by subclass or subproperty statements in an inference context are not physically stored.
+Such triples are added to the result set by the query run time as needed. Also queries involving subclass or subproperty
 rules are not rewritten into unions of all the possible triple patterns that might imply the pattern that is requested.
 Instead, the SQL compiler adds special nodes that iterate over subclasses or subproperties at run time. The cost model
 also takes subclasses and subproperties into account when determining the approximate cardinality of triple patterns.
@@ -17174,8 +18297,8 @@ WHERE
 </sect1>
 
 <sect1 id="rdfsparqlgeospat"><title>RDF and Geometry</title>
-<para>A geometry may occur as an object of an RDF quad. The SQL MM functions can then be used for
-querying for geometries.
+<para>A geometry may occur as an object of an RDF quad. The SQL MM functions can then 
+	be used for geospatial queries.
 </para>
 <para>
 For geometry functions, see the <link linkend="sqlrefgeospatial">SQL Geometry support section</link>.
@@ -18296,7 +19419,7 @@ that acts like <function><link linkend="fn_repl_sync">repl_sync</link></function
 <function>DB.DBA.RDF_REPL_SYNC</function> will not only initial synchronisation but also wait for the end of subscription to guarantee that the total effect of INSERT and DELETE operations is correct even if these operations were made in an order that differs from the original one.</para>
 </sect1>
 -->
-<sect1 id="rdfperformancetuning"><title>Performance Tuning</title>
+<sect1 id="rdfperformancetuning"><title>RDF Performance Tuning</title>
 <para>For RDF query performance, we have the following possible questions:</para>
 <itemizedlist mark="bullet" spacing="compact">
 <listitem>Is the Virtuoso process properly configured to handle big data sets?</listitem>
@@ -18306,9 +19429,56 @@ that acts like <function><link linkend="fn_repl_sync">repl_sync</link></function
 <listitem>Is there a bad query plan because of cost model error?</listitem>
 </itemizedlist>
 <sect2 id="rdfperfgeneral"><title>General</title>
-	<para>For running with large data sets, one should configure the Virtuoso process to use between 2/3 to  3/5 of system RAM and to stripe storage on all available disks.  See <link linkend="VIRTINI">NumberOfBuffers</link> and <link linkend="VIRTINI">Striping</link> ini parameters.</para>
-<para> Also, if running with a large database, setting <link linkend="VIRTINI">MaxCheckpointRemap</link> to 1/4th of
- the database size is recommended.  This is in pages, 8K per page.</para>
+	    <para>When running with large data sets, one should configure the Virtuoso process to use between 2/3 
+		to 3/5 of system RAM and to stripe storage on all available disks. 
+		See <link linkend="VIRTINI">NumberOfBuffers</link>, 
+		<link linkend="VIRTINI">MaxDirtyBuffers</link>, and 
+		<link linkend="VIRTINI">Striping</link> INI file parameters. 
+		  </para>
+<programlisting><![CDATA[
+; default installation
+NumberOfBuffers          = 2000
+MaxDirtyBuffers          = 1200	
+]]></programlisting>		
+      <para>Typical sizes for the <emphasis>NumberOfBuffers</emphasis> and 
+      <emphasis>MaxDirtyBuffers</emphasis> (3/4 of NumberOfBuffers) parameters in the Virtuoso 
+      configuration file (virtuoso.ini) for various memory sizes are as follows, with each buffer 
+      consisting of 8K bytes:      
+      </para>	
+      <table><title>recommended NumberOfBUffers and MaxDirtyBuffers</title>
+        <tgroup cols="3">
+          <thead>
+          	<row>
+              <entry>System RAM</entry>
+              <entry>NumberOfBuffers</entry>
+              <entry>MaxDirtyBuffers</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+            	<entry>2 GB</entry><entry>170000</entry><entry>130000</entry>
+            </row>
+            <row>
+            	<entry>4 GB</entry><entry>340000</entry><entry>250000</entry>
+            </row>
+            <row>
+            	<entry>8 GB</entry><entry>680000</entry><entry>500000</entry>
+            </row>
+            <row>
+            	<entry>16 GB</entry><entry>1360000</entry><entry>1000000</entry>
+            </row>
+            <row>
+            	<entry>32 GB</entry><entry>2720000</entry><entry>2000000</entry>
+            </row>
+            <row>
+            	<entry>48 GB</entry><entry>4000000</entry><entry>3000000</entry>
+            </row>
+            <row>
+            	<entry>64 GB</entry><entry>5450000</entry><entry>4000000</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </table>      
     </sect2>
     <sect2 id="rdfperfrdfscheme"><title>RDF Index Scheme</title>
 <para>
@@ -18404,69 +19574,81 @@ significant space savings resulting in better working set. Typically this layout
 </para>
     </sect2>
     <sect2 id="rdfperfindexes"><title>Index Scheme Selection</title>
-<para>If the graph is always given, as one or more <emphasis>FROM</emphasis> or <emphasis>FROM NAMED</emphasis>, and there are no patterns where only graph and predicate are given, then the default indices should be appropriate.
-If the predicate and graph are given but subject is not, then it is sometimes useful to add</para>
+      <para>The indexes in place on the RDF_QUAD table can greatly affect the performance of 
+      	SPARQL queries, as can be determined by running the STATISTICS command on the table as follows:
+      </para>	
+<programlisting><![CDATA[
+SQL> STATISTICS DB.DBA.RDF_QUAD;
+Showing SQLStatistics of table(s) 'DB.DBA.RDF_QUAD'
+TABLE_QUALIFIER  TABLE_OWNER      TABLE_NAME       NON_UNIQUE  INDEX_QUALIFIER  INDEX_NAME       TYPE        SEQ_IN_INDEX  COLUMN_NAME      COLLATION  CARDINALITY  PAGES       FILTER_CONDITION
+VARCHAR          VARCHAR          VARCHAR          SMALLINT    VARCHAR          VARCHAR          SMALLINT    SMALLINT    VARCHAR          VARCHAR  INTEGER     INTEGER     VARCHAR
+_______________________________________________________________________________
 
+DB               DBA              RDF_QUAD         NULL        NULL             NULL             0           NULL        NULL             NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         0           DB               RDF_QUAD         3           1           P                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         0           DB               RDF_QUAD         3           2           S                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         0           DB               RDF_QUAD         3           3           O                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         0           DB               RDF_QUAD         3           4           G                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_GS      3           1           G                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_GS      3           2           S                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_OP      3           1           O                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_OP      3           2           P                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_POGS    3           1           P                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_POGS    3           2           O                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_POGS    3           3           G                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_POGS    3           4           S                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_SP      3           1           S                NULL     NULL        NULL        NULL
+DB               DBA              RDF_QUAD         1           DB               RDF_QUAD_SP      3           2           P                NULL     NULL        NULL        NULL
+
+15 Rows. -- 24 msec.
+SQL> 	
+]]></programlisting>      
+<para>With only one index (OGPS) created by default, if the graph is always given, as with one or more 
+	<emphasis>FROM</emphasis> or <emphasis>FROM NAMED</emphasis> clauses, and there are no patterns where 
+	only graph and predicate are given, then the default indices should be sufficient. If predicate and 
+	graph are given but subject is not, then it is sometimes useful to add:</para>
 <programlisting><![CDATA[
-create bitmap index RDF_QUAD_PGOS on DB.DBA.RDF_QUAD (G, P, O, S) partition (O varchar (-1, 0hexffff));
+CREATE BITMAP INDEX RDF_QUAD_PGOS
+  ON DB.DBA.RDF_QUAD (G, P, O, S) 
+  PARTITION (O VARCHAR (-1, 0hexffff));
 ]]></programlisting>
 
-<note><para>If the server is pre 5.0.7, leave out the partitioning clause.</para></note>
+<note><para>Note: If the server version is pre-5.0.7, leave out the partitioning clause.</para></note>
 
-<para>Making the PGOS index can help in some cases even if it is not readily apparent from the queries that one is needed.  This is so for example if the predicate by itself is selective, i.e. there is a predicate that occurs in only a few triples.</para>
+<para>Making the PGOS index can help in some cases even if it is not readily apparent from the queries 
+	that one is needed. This is so, for example, if the predicate by itself is selective, i.e. there is 
+	a predicate that occurs in only a few triples.</para>
 <para>If the graph itself is not given in the queries, then the default index scheme will be unworkable.
 For this, the appropriate scheme is:</para>
 
 <programlisting><![CDATA[
-create table RDF_QUAD (G iri_id_8, S iri_id_8, P iri_id_8, O any, primary key (S, P, O, G))
-alter index RDF_QUAD on RDF_QUAD partition (S int (0hexffff00));
-create bitmap index RDF_QUAD_OPGS on DB.DBA.RDF_QUAD (O, P, G, S) partition (O varchar (-1, 0hexffff));
-create bitmap index RDF_QUAD_POGS on DB.DBA.RDF_QUAD (P, O, G, S) partition (O varchar (-1, 0hexffff));
-create bitmap index RDF_QUAD_GPOS on DB.DBA.RDF_QUAD (G, P, O, S) partition (O varchar (-1, 0hexffff));
-]]></programlisting>
-
-<note><para>For a pre 5.0.7 server, leave the partition clauses and the alter index statement out.</para></note>
-
-<para>If there are existing triples and one does not wish to reload them, then the following sequence will convert the data:</para>
+CREATE TABLE RDF_QUAD
+  ( 
+    G IRI_ID_8, 
+    S IRI_ID_8, 
+    P IRI_ID_8, 
+    O ANY, 
+    PRIMARY KEY (S, P, O, G)
+  )
+ALTER INDEX RDF_QUAD 
+  ON RDF_QUAD 
+  PARTITION (S INT (0hexffff00));
 
-<programlisting><![CDATA[
-log_enable (2);
-drop index RDF_QUAD_OGPS;
-checkpoint;
-create table R2 (G iri_id_8, S iri_id_8, P iri_id_8, O any, primary key (S, P, O, G))
-alter index R2 on R2 partition (S int (0hexffff00));
+CREATE BITMAP INDEX RDF_QUAD_OPGS
+  ON DB.DBA.RDF_QUAD (O, P, G, S) 
+  PARTITION (O VARCHAR (-1, 0hexffff));
 
-insert into r2 (g, s, p, o) SELECT g, s, p, o from rdf_quad;
+CREATE BITMAP INDEX RDF_QUAD_POGS
+  ON DB.DBA.RDF_QUAD (P, O, G, S)
+  PARTITION (O VARCHAR (-1, 0hexffff));
 
-drop table RDF_QUAD;
-checkpoint;
-alter table r2 rename RDF_QUAD;
-create bitmap index RDF_QUAD_OPGS on DB.DBA.RDF_QUAD (O, P, G, S) partition (O varchar (-1, 0hexffff));
-create bitmap index RDF_QUAD_POGS on RDF_QUAD (P, O, G, S) partition (O varchar (-1, 0hexffff));
-create bitmap index RDF_QUAD_GPOS on RDF_QUAD (G, P, O, S) partition (O varchar (-1, 0hexffff));
-checkpoint;
-log_enable (1);
+CREATE BITMAP INDEX RDF_QUAD_GPOS 
+  ON DB.DBA.RDF_QUAD (G, P, O, S)
+  PARTITION (O VARCHAR (-1, 0hexffff));
 ]]></programlisting>
 
-<para>First drop the OGPS index to make space.  Then, in row autocommit mode
-and without logging, copy the quads into a new primary key layout.
-Drop the old and rename the new over the old.  Make the additional
-indices.  Do a checkpoint after the drops so as to actually free the
-space also in the checkpointed state.  Finish with a checkpoint so as
-to finalize the changes, since logging was turned off.  Even if
-logging had been on, one would not wish to have to replay the
-reindexing if the server terminated abnormally.
-Finally turn logging back on for the session.</para>
-
-<note><para>This is all meant to be done with a SQL client like isql and not through a web interface.
-The web interface has no real session and the log_enables do nothing there.</para></note>
-
-<para>Other indexing schemes may be tried.  We note however that in all
-cases, one or other of the indices should begin with G.  This is
-because for schema operations it is necessary to read through a
-graph. If no index begins with G, this becomes a full table scan and
-is unworkable, leading to an extremely slow server start and making
-operations like drop graph as good as unusable.</para>
+<note><para>Note: If the server version is pre-5.0.7, leave out the <emphasis>PARTITION</emphasis> 
+clauses and the <emphasis>ALTER INDEX</emphasis> statement.</para></note>
 
 <para>Public web service endpoints are proven to be sources of especially bad queries. While local
 application develpers can obtain instructions from database administrator and use ISQL access to
@@ -18494,10 +19676,146 @@ will provide meaningful queries. If no graph names are specified then the query
 preset graph because this will give the compiler some more indexes to choose from -- indexes that begin
 with G.</para>
 <para>Sometimes web service endpoint is used to access data of only one application, not all data in the
-system. In that case one may wish to declare a separate storage that consists of only RDF Views made
+system. In that case one may wish to declare a separate storage that consists of only Linked Data Views made
 by that application and define <emphasis>input:storage</emphasis> in appropriate row of
 <emphasis>DB.DBA.SYS_SPARQL_HOST</emphasis>.</para>
 </sect2>
+
+<sect2 id="rdfperfcost"><title>Erroneous Cost Estimates and Explicit Join Order</title>
+	<para>The selectivity of triple patterns is determined at query compile time from sampling the data.
+It is possible that misleading data is produced. To see if the cardinality guesses are generally valid, 
+look at the query plan with <link linkend="fn_explain"><function>explain</function> ()</link>.</para>
+<para>Below is a sample from the LUBM qualification data set in the Virtuoso distribution.
+After running <emphasis>make test</emphasis> in <emphasis>binsrc/test/lubm</emphasis>, there is a 
+loaded database with the data. Start a server in the same directory to see the data.</para>
+
+<programlisting><![CDATA[
+SQL> EXPLAIN 
+  ('SPARQL 
+  PREFIX  ub:  <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
+  SELECT *
+  FROM <lubm>
+  WHERE { ?x  rdf:type  ub:GraduateStudent }
+  ');
+
+REPORT
+VARCHAR
+_______________________________________________________________________________
+
+{
+
+Precode:
+      0: $25 "callret" := Call __BOX_FLAGS_TWEAK (<constant (lubm)>, <constant (1)>)
+      5: $26 "lubm" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($25 "callret")
+      12: $27 "callret" := Call __BOX_FLAGS_TWEAK (<constant (http://www.w3.org/1999/02/22-rdf-syntax-ns#type)>, <constant (1)>)
+      17: $28 "-ns#type" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($27 "callret")
+      24: $29 "callret" := Call __BOX_FLAGS_TWEAK (<constant (http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#GraduateStudent)>, <constant (1)>)
+      29: $30 "owl#GraduateStudent" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($29 "callret")
+      36: BReturn 0
+from DB.DBA.RDF_QUAD by RDF_QUAD_OGPS    1.9e+03 rows
+Key RDF_QUAD_OGPS  ASC ($32 "s-3-1-t0.S")
+<col=415 O = $30 "owl#GraduateStudent"> , <col=412 G = $26 "lubm"> , <col=414 P = $28 "-ns#type">
+row specs: <col=415 O LIKE <constant (T)>>
+
+Current of: <$34 "<DB.DBA.RDF_QUAD s-3-1-t0>" spec 5>
+
+After code:
+      0: $35 "x" := Call ID_TO_IRI ($32 "s-3-1-t0.S")
+      5: BReturn 0
+Select ($35 "x", <$34 "<DB.DBA.RDF_QUAD s-3-1-t0>" spec 5>)
+}
+
+22 Rows. -- 1 msec.
+]]></programlisting>
+<para>This finds the graduate student instances in the LUBM graph. First the query 
+	converts the IRI literals to IDs. Then, using a match of OG on OGPS, it finds the 
+	IRIs of the graduate students. Then, it converts the IRI ID to return to the string form.</para>
+<para>The cardinality estimate of 1.9e+03 rows is on the FROM line.</para>
+<para>Doing an EXPLAIN() on the queries will show the cardinality estimates. To drill down further, one can split the query into smaller chunks and see the estimates for these, up to doing it at the triple pattern level.
+To indicate a variable that is bound but whose value is not a literal known at compile time, one can use the parameter marker <emphasis>??</emphasis>.</para>
+
+<programlisting><![CDATA[
+SQL> EXPLAIN 
+  ('
+      SPARQL 
+      DEFINE  sql:table-option "order"  
+      PREFIX  ub:  <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
+      SELECT *
+      FROM <lubm>
+      WHERE { ?x  rdf:type  ?? }
+  ');
+]]></programlisting>
+
+<para>This will not know the type but will know that a type will be
+provided. So instead of guessing 1900 matches, this will guess a
+smaller number, which is obviously less precise. Thus literals are generally better.</para>
+<para>In some cases, generally to work around an optimization error, one can specify an explicit 
+	<emphasis>JOIN</emphasis> order. This is done with the <emphasis>sql:select-option "order"</emphasis> 
+	clause in the SPARQL query prefix.</para>
+
+<programlisting><![CDATA[
+SQL> SELECT SPARQL_to_sql_text 
+  ('  
+      DEFINE sql:select-option "order" 
+      PREFIX  ub:  <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
+      SELECT *
+      FROM <lubm>
+      WHERE
+        {
+          ?x  rdf:type        ub:GraduateStudent                                       .
+          ?x  ub:takesCourse  <http://www.Department0.University0.edu/GraduateCourse0>
+        }
+  ');
+]]></programlisting>
+
+<para>shows the SQL text with the order option at the end.</para>
+<para>If an estimate is radically wrong then this should be reported as a bug.</para>
+<para>If there is a FROM with a KEY on the next line and no column specs then this is a full table scan. 
+	The more columns are specified the less rows will be passed to the next operation in the chain. In 
+	the example above, there are three columns whose values are known before  reading the table and 
+	these columns are leading columns of the index in use so column specs are:</para>
+<programlisting><![CDATA[
+<col=415 O = $30 "owl#GraduateStudent"> , 
+<col=412 G = $26 "lubm"> , 
+<col=414 P = $28 "-ns#type">
+]]></programlisting>
+<note><para>Note: A KEY with only a row spec is a full table scan with the row spec applied as a filter.
+This is usually not good unless this is specifically intended.</para></note>
+<para>If queries are compiled to make full table scans when this is not specifically intended, this should be reported as a bug.
+The explain () output and the query text should be included in the report.</para>
+<para>Consider:</para>
+
+<programlisting><![CDATA[
+SQL> EXPLAIN 
+  ('
+      SPARQL 
+      DEFINE sql:select-option "order, loop" 
+      PREFIX  ub:  <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
+      SELECT *
+      FROM <lubm>
+      WHERE
+        {
+          ?x  ub:takesCourse  ?c                  .
+          ?x  rdf:type        ub:GraduateStudent
+        }
+  ');
+]]></programlisting>
+
+<para>One will see in the output that the first table access is to retrieve
+all in the LUBM graph which take some course and then later to check
+if this is a graduate student. This is obviously not the preferred
+order but the <emphasis>sql:select-option "order"</emphasis> forces the optimizer to join
+from left to right.</para>
+<para>It is very easy to end up with completely unworkable query plans in
+this manner but if the optimizer really is in error, then this is the
+only way of overriding its preferences. The effect of <emphasis>sql:select-option</emphasis> is pervasive, extending inside unions, optionals, subqueries etc within the statement.</para>
+<para>We note that if, in the above query, both the course taken by the
+student and the type of the student are given, the query compilation
+will be, at least for all non-cluster cases, an index intersection.
+This is not overridden by the sql:select-option clause since an index
+intersection is always a safe guess, regardless of the correctness of
+the cardinality guesses of the patterns involved.</para>
+</sect2>
 <sect2 id="rdfperfgetallgraphs"><title>Get All Graphs</title>
 <para>In order to get all graphs URIs, one might use the Virtuoso 
 <link linkend="fn_sparql_select_known_graphs"><function>DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS()</function></link> 
@@ -18507,65 +19825,92 @@ built-in function.</para>
 In order to dump all graphs with extension exclude those graphs of a certain type by using a
 sparql ask query, you may use the following script sequence:
 <programlisting><![CDATA[
-create procedure dump_graphs (in dir varchar := 'dumps', in file_length_limit integer := 1000000000)
+CREATE PROCEDURE dump_graphs 
+  ( IN  dir               VARCHAR  :=  'dumps'   , 
+    IN  file_length_limit INTEGER  :=  1000000000
+  )
 {
-  declare inx int;
+    DECLARE inx INT;
   inx := 1;
-  set isolation = 'uncommitted';
-  for (select * from (sparql define input:storage "" select distinct ?g { graph ?g { ?s ?p ?o } . filter ( ?g != virtrdf: ) } ) as sub option (loop)) do
-    {
-
-      if (exists (sparql define input:storage "" ask where { ?:g <http://www.strigi.org/fields#indexGraphFor> ?r . }))
-	{
-      dump_one_graph ("g", sprintf ('%s/graph%06d_', dir, inx), file_length_limit);
-        }
-      else
-	{
-	  dump_one_graph ("g", sprintf ('%s/graph%06d_', dir, inx), file_length_limit);
-	}
+    SET ISOLATION = 'uncommitted';
+    FOR ( SELECT * 
+            FROM ( SPARQL DEFINE input:storage "" 
+                   SELECT DISTINCT ?g { GRAPH ?g { ?s ?p ?o } . 
+                                        FILTER ( ?g != virtrdf: ) 
+                                      } 
+                 ) AS sub OPTION ( LOOP )) DO
+      {
+        dump_one_graph ( "g", 
+                         sprintf ('%s/graph%06d_', dir, inx), 
+                         file_length_limit
+                       );
       inx := inx + 1;
     }
 }
 ;
 
-create procedure dump_one_graph (in srcgraph varchar, in out_file_prefix varchar, in file_length_limit integer := 1000000000)
+
+CREATE PROCEDURE dump_one_graph 
+  ( IN  srcgraph           VARCHAR  , 
+    IN  out_file           VARCHAR  , 
+    IN  file_length_limit  INTEGER  := 1000000000
+  )
 {
-  declare file_name varchar;
-  declare env, ses any;
-  declare ses_len, max_ses_len, file_len, file_idx integer;
-  set isolation = 'uncommitted';
+    DECLARE  file_name  varchar;
+    DECLARE  env, ses      any;
+    DECLARE  ses_len, 
+             max_ses_len, 
+             file_len, 
+             file_idx      integer;
+    SET ISOLATION = 'uncommitted';
   max_ses_len := 10000000;
   file_len := 0;
   file_idx := 1;
-  file_name := sprintf ('%s%06d.ttl', out_file_prefix, file_idx);
-  string_to_file (file_name || '.graph', srcgraph, -2);
-  string_to_file (file_name, sprintf ('# Dump of graph <%s>, as of %s\n', srcgraph, cast (now() as varchar)), -2);
-  --env := vector (dict_new (16000), 0, '', '', '', 0, 0);
+    file_name := sprintf ('%s%06d.ttl', out_file, file_idx);
+    string_to_file ( file_name || '.graph', 
+                     srcgraph, 
+                     -2
+                   );
+    string_to_file ( file_name, 
+                     sprintf ( '# Dump of graph <%s>, as of %s\n', 
+                               srcgraph, 
+                               CAST (NOW() AS VARCHAR)
+                             ), 
+                     -2
+                   );
   env := vector (dict_new (16000), 0, '', '', '', 0, 0, 0, 0);
   ses := string_output ();
-  for (select * from (sparql define input:storage "" select ?s ?p ?o { graph `iri(?:srcgraph)` { ?s ?p ?o } } ) as sub option (loop)) do
+    FOR (SELECT * FROM ( SPARQL DEFINE input:storage "" 
+                         SELECT ?s ?p ?o { GRAPH `iri(?:srcgraph)` { ?s ?p ?o } } 
+                       ) AS sub OPTION (LOOP)) DO
     {
       http_ttl_triple (env, "s", "p", "o", ses);
       ses_len := length (ses);
-      if (ses_len > max_ses_len)
+        IF (ses_len > max_ses_len)
         {
           file_len := file_len + ses_len;
-          if (file_len > file_length_limit)
+            IF (file_len > file_length_limit)
             {
               http (' .\n', ses);
               string_to_file (file_name, ses, -1);
               file_len := 0;
               file_idx := file_idx + 1;
-              file_name := sprintf ('%s%06d.ttl', out_file_prefix, file_idx);
-              string_to_file (file_name, sprintf ('# Dump of graph <%s>, as of %s (part %d)\n', srcgraph, cast (now() as varchar), file_idx), -2);
+                file_name := sprintf ('%s%06d.ttl', out_file, file_idx);
+                string_to_file ( file_name, 
+                                 sprintf ( '# Dump of graph <%s>, as of %s (part %d)\n', 
+                                           srcgraph, 
+                                           CAST (NOW() AS VARCHAR), 
+                                           file_idx), 
+                                 -2
+                               );
 	      env := vector (dict_new (16000), 0, '', '', '', 0, 0, 0, 0);
             }
-          else
+            ELSE
             string_to_file (file_name, ses, -1);
           ses := string_output ();
         }
     }
-  if (length (ses))
+    IF (LENGTH (ses))
     {
       http (' .\n', ses);
       string_to_file (file_name, ses, -1);
@@ -18601,7 +19946,7 @@ SQL>dump_one_graph ('http://daas.openlinksw.com/data#', './bbc_data_', 100000000
 SQL>dump_one_graph ('http://daas.openlinksw.com/data#', './bbc_data_');
    </sect3>
 </sect2>
-<sect2 id="rdfperfdumpandreloadgraphsn3"><title>Dump RDF View Graph to n3</title>
+<sect2 id="rdfperfdumpandreloadgraphsn3"><title>Dump Linked Data View Graph to n3</title>
 <para>The RDF_QM_TREE_DUMP procedure and its associated procedures below are used 
 for dumping one or more RDFView Graphs in a Virtuoso server to a set of 
 turtle ttl dataset files in the specified dump directory. The dump generation 
@@ -18628,7 +19973,7 @@ a Virtuoso RDF QUAD store.
   <listitem><code>in</code> <emphasis>dest_dir</emphasis> <code>VARCHAR</code> - dump directory </listitem>
   <listitem><code>in</code> <emphasis>graph_iri</emphasis> <code>VARCHAR</code> - IRI of the graph to be dumped; triples from other graphs will be excluded. If NULL, then there's no restriction by graph.</listitem>
   <listitem><code>in</code> <emphasis>storage</emphasis> <code>VARCHAR</code> - IRI of the quad map storage to use. NULL means use default storage.</listitem>
-  <listitem><code>in</code> <emphasis>root</emphasis> <code>VARCHAR</code> - IRI of the quad map to use, e.g., an IRI of an RDF View (or its part). NULL means use all RDF Views of the storage (and the default mapping as well).</listitem>    
+  <listitem><code>in</code> <emphasis>root</emphasis> <code>VARCHAR</code> - IRI of the quad map to use, e.g., an IRI of an Linked Data View (or its part). NULL means use all Linked Data Views of the storage (and the default mapping as well).</listitem>    
 </itemizedlist>
 </sect3>
 <sect3 id="rdfperfdumpandreloadgraphsn3code"><title>Procedure Code</title>
@@ -18850,122 +20195,6 @@ CREATE FUNCTION DB.DBA.RDF_QM_GROUP_BY_SOURCE_TABLES (in qms ANY) returns ANY
 ]]></programlisting>
 </sect3>	
 </sect2>	
-<sect2 id="rdfperfcost"><title>Erroneous Cost Estimates and Explicit Join Order</title>
-
-	<para>The selectivity of triple patterns is determined at query compile time from sampling the data.
-It is possible that misleading data is produced.
-To see if the cardinality guesses are generally valid, look at the query plan with <link linkend="fn_explain"><function>explain</function> ()</link>.</para>
-<para>Below is a sample from the LUBM qualification data set in the Virtuoso distribution.
-After running <emphasis>make test</emphasis> in <emphasis>binsrc/test/lubm</emphasis>, there is a loaded database with the data.
-Start a server in the same directory to see the data.</para>
-
-<programlisting><![CDATA[
-SQL> explain ('SPARQL prefix ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
-SELECT *
-FROM <lubm>
-WHERE { ?x rdf:type ub:GraduateStudent }');
-
-REPORT
-VARCHAR
-_______________________________________________________________________________
-
-{ 
- 
-Precode:
-      0: $25 "callret" := Call __BOX_FLAGS_TWEAK (<constant (lubm)>, <constant (1)>)
-      5: $26 "lubm" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($25 "callret")
-      12: $27 "callret" := Call __BOX_FLAGS_TWEAK (<constant (http://www.w3.org/1999/02/22-rdf-syntax-ns#type)>, <constant (1)>)
-      17: $28 "-ns#type" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($27 "callret")
-      24: $29 "callret" := Call __BOX_FLAGS_TWEAK (<constant (http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#GraduateStudent)>, <constant (1)>)
-      29: $30 "owl#GraduateStudent" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($29 "callret")
-      36: BReturn 0
-from DB.DBA.RDF_QUAD by RDF_QUAD_OGPS    1.9e+03 rows
-Key RDF_QUAD_OGPS  ASC ($32 "s-3-1-t0.S")
-<col=415 O = $30 "owl#GraduateStudent"> , <col=412 G = $26 "lubm"> , <col=414 P = $28 "-ns#type">
-row specs: <col=415 O LIKE <constant (T)>>
- 
-Current of: <$34 "<DB.DBA.RDF_QUAD s-3-1-t0>" spec 5>
- 
-After code:
-      0: $35 "x" := Call ID_TO_IRI ($32 "s-3-1-t0.S")
-      5: BReturn 0
-Select ($35 "x", <$34 "<DB.DBA.RDF_QUAD s-3-1-t0>" spec 5>)
-}
-
-22 Rows. -- 1 msec.
-]]></programlisting>
-<para>
-This finds the graduate student instances in the lubm graph.  First
-the query converts the IRI literals to id's.  Then, using a match of
-OG on OGPS it finds the IRI's of the graduate students.  Then it
-converts the IRI id to return to the string form.</para>
-<para>The cardinality estimate of 1.9e+03 rows is on the FROM line.</para>
-<para>Doing an explain on the queries will show the cardinality estimates.  To drill down further, one can split the query into smaller chunks and see the estimates for these, up to doing it at the triple pattern level.  
-To indicate a variable that is bound but whose value is not a literal known at compile time, one can use the parameter marker <emphasis>??</emphasis>.</para>
-
-<programlisting><![CDATA[
-SQL>explain ('SPARQL define sql:table-option "order"  prefix ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
-SELECT *
-FROM <lubm>
-WHERE { ?x rdf:type ?? }');
-]]></programlisting>
-
-<para>This will not know the type but will know that a type will be
-provided.  So instead of guessing 1900 matches, this will guess a
-smaller number, which is obviously less precise.  Thus literals are generally better.</para>
-<para>In some cases, generally to work around an optimization error, one can specify an explicit join order. 
-This is done with the sql:select-option "order"  clause in the SPARQL query prefix.</para>
-
-<programlisting><![CDATA[
-SQL>SELECT SPARQL_to_sql_text (' define sql:select-option "order" prefix ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
-SELECT *
-FROM <lubm>
-WHERE
-  {
-    ?x rdf:type ub:GraduateStudent .
-    ?x ub:takesCourse <http://www.Department0.University0.edu/GraduateCourse0>
-  }');
-]]></programlisting>
-
-<para>shows the SQL text with the order option at the end.</para>
-<para>If an estimate is radically wrong then this should be reported as a bug.</para>
-<para>If there is a FROM with a KEY on the next line and no column specs then this is a full table scan. The more columns are specified the less rows will be passed to the next operation in the chain. In the example above, there are three columns whose values are known before  reading the table and these columns are leading columns of the index in use so column specs are</para>
-<programlisting><![CDATA[
-<col=415 O = $30 "owl#GraduateStudent"> , <col=412 G = $26 "lubm"> , <col=414 P = $28 "-ns#type">
-]]></programlisting>
-<note><para>A KEY with only a row spec is a full table scan with the row spec applied as a filter.
-This is usually not good unless this is specifically intended.</para></note>
-<para>If queries are compiled to make full table scans when this is not specifically intended, this should be reported as a bug.
-The explain output and the query text should be included in the report.</para>
-<para>An explicit join order is specified by the <emphasis>define sql:select-option "order"</emphasis> clause in the SPARQL query prefix:
-Consider:</para>
-
-<programlisting><![CDATA[
-SQL>explain ('SPARQL define sql:select-option "order, loop" prefix ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
-SELECT *
-FROM <lubm>
-WHERE
-  {
-    ?x ub:takesCourse ?c .
-    ?x rdf:type ub:GraduateStudent
-  }');
-]]></programlisting>
-
-<para>One will see in the output that the first table access is to retrieve
-all in the lubm graph which take some course and then later to check
-if this is a graduate student.  This is obviously not the preferred
-order but the <emphasis>sql:select-option "order"</emphasis> forces the optimizer to join
-from left to right.</para>
-<para>It is very easy to end up with completely unworkable query plans in
-this manner but if the optimizer really is in error, then this is the
-only way of overriding its preferences. The effect of <emphasis>sql:select-option</emphasis> is pervasive, extending inside unions, optionals, subqueries etc within the statement.</para>
-<para>We note that if, in the above query, both the course taken by the
-student and the type of the student are given, the query compilation
-will be, at least for all non-cluster cases, an index intersection.
-This is not overridden by the sql:select-option clause since an index
-intersection is always a safe guess, regardless of the correctness of
-the cardinality guesses of the patterns involved.</para>
-</sect2>
     <sect2 id="rdfperfloading"><title>Loading RDF</title>
 	<para>There are many functions for loading RDF text, in RDF/XML and Turtle.</para>
 	<para>For loading RDF/XML, the best way is to split the data to be loaded into
@@ -19118,14 +20347,14 @@ cl_exec ('checkpoint');
   <listitem>Execute the file:
 <programlisting><![CDATA[
 --
---  $Id: rdfandsparql.xml,v 1.95.2.44 2011/03/24 16:04:34 source Exp $
+--  $Id: rdfandsparql.xml,v 1.95.2.49 2012/03/14 14:12:40 source Exp $
 --
 --  Alternate RDF index scheme for cases where G unspecified
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -19160,356 +20389,6 @@ create bitmap index RDF_QUAD_GPOS on RDF_QUAD (G, P, O, S) partition (O varchar
 checkpoint;
 ]]></programlisting>
 </listitem>
-  <listitem>Execute the file:
-<programlisting><![CDATA[
-
-
-create table load_list (
-  ll_file varchar,
-  ll_graph varchar,
-  ll_state int default 0, -- 0 not started, 1 going, 2 done
-  ll_started datetime,
-  ll_done datetime,
-  ll_host int,
-  ll_work_time integer,
-  ll_error varchar,
-  primary key (ll_file))
-alter index load_list on load_list partition (ll_file varchar)
-;
-
-create index ll_state on load_list (ll_state, ll_file, ll_graph) partition (ll_state int)
-;
-
-
-create table ldlock (id int primary key)
-  alter index ldlock on ldlock partition (id int)
-;
-
-insert into ldlock values (0);
-
-
-create procedure
-ld_dir (in path varchar, in mask varchar, in graph varchar)
-{
-  declare ls any;
-  declare inx int;
-  ls := sys_dirlist (path, 1);
-  for (inx := 0; inx < length (ls); inx := inx + 1)
-    {
-      if (ls[inx] like mask)
-	{
-	  set isolation = 'serializable';
-
-	  if (not (exists (SELECT 1 FROM DB.DBA.LOAD_LIST WHERE LL_FILE = path || '/' || ls[inx] for update)))
-	    {
-	      declare gfile, cgfile, ngraph varchar;
-	      gfile := path || '/' || replace (ls[inx], '.gz', '') || '.graph';
-	      cgfile := path || '/' || regexp_replace (replace (ls[inx], '.gz', ''), '\\-[0-9]+\\.n', '.n') || '.graph';
-	      if (file_stat (gfile) <> 0)
-		ngraph := trim (file_to_string (gfile), ' \r\n');
-              else if (file_stat (cgfile) <> 0)
-		ngraph := trim (file_to_string (cgfile), ' \r\n');
-	      else if (file_stat (path || '/' || 'global.graph') <> 0)
-		ngraph := trim (file_to_string (path || '/' || 'global.graph'), ' \r\n');
-	      else
-	        ngraph := graph;
-              if (ngraph is not null)
-                {
-		  insert into DB.DBA.LOAD_LIST (ll_file, ll_graph) values (path || '/' || ls[inx], ngraph);
-		}
-	    }
-
-	  commit work;
-	}
-    }
-}
-;
-
-create procedure
-ld_dir_all (in path varchar, in mask varchar, in graph varchar)
-{
-  declare ls any;
-  declare inx int;
-  ls := sys_dirlist (path, 0);
-  ld_dir (path, mask, graph);
-  for (inx := 0; inx < length (ls); inx := inx + 1)
-    {
-      if (ls[inx] <> '.' and ls[inx] <> '..')
-	{
-	  ld_dir_all (path||'/'||ls[inx], mask, graph);
-	}
-    }
-}
-;
-
-create procedure
-ld_add (in _fname varchar, in _graph varchar)
-{
-  --log_message (sprintf ('ld_add: %s, %s', _fname, _graph));
-
-  set isolation = 'serializable';
-
-  if (not (exists (SELECT 1 FROM DB.DBA.LOAD_LIST WHERE LL_FILE = _fname for update)))
-    {
-      insert into DB.DBA.LOAD_LIST (LL_FILE, LL_GRAPH) values (_fname, _graph);
-    }
-  commit work;
-}
-;
-
-create procedure ld_ttlp_flags (in fname varchar)
-{
-  if (fname like '%/btc-2009%' or fname like '%.nq%')
-    return 255 + 512;
-  return 255;
-}
-
-create procedure
-ld_file (in f varchar, in graph varchar)
-{
-  declare gzip_name varchar;
-  declare exit handler for sqlstate '*' {
-    rollback work;
-    UPDATE DB.DBA.LOAD_LIST
-      SET LL_STATE = 2,
-          LL_DONE = curdatetime (),
-          LL_ERROR = __sql_state || ' ' || __sql_message
-      WHERE LL_FILE = f;
-    commit work;
-
-    log_message (sprintf (' File %s error %s %s', f, __sql_state, __sql_message));
-    return;
-  };
-
-  if (f like '%.grdf' or f like '%.grdf.gz')
-    {
-      load_grdf (f);
-    }
-  else if (f like '%.gz')
-    {
-      gzip_name := regexp_replace (f, '\.gz\x24', '');
-      if (gzip_name like '%.xml' or gzip_name like '%.owl' or gzip_name like '%.rdf')
-	DB.DBA.RDF_LOAD_RDFXML (gz_file_open (f), graph, graph);
-      else if  (gzip_name like '%.n4')
-	TTLP (gz_file_open (f), graph, graph, 512 + 255);
-      else
-	TTLP (gz_file_open (f), graph, graph, ld_ttlp_flags (f));
-    }
-  else
-    {
-      if (f like '%.xml' or f like '%.owl' or f like '%.rdf')
-	DB.DBA.RDF_LOAD_RDFXML (file_open (f), graph, graph);
-      else if  (f like '%.n4')
-	TTLP (file_open (f), graph, graph, 512 + 255);
-      else
-	TTLP (file_open (f), graph, graph, ld_ttlp_flags (f));
-    }
-
-  --log_message (sprintf ('loaded %s', f));
-}
-;
-
-create procedure
-rdf_load_dir (in path varchar,
-              in mask varchar := '%.nt',
-              in graph varchar := 'http://dbpedia.org')
-{
-
-  DELETE FROM DB.DBA.LOAD_LIST WHERE LL_FILE = '##stop';
-  commit work;
-
-  ld_dir (path, mask, graph);
-
-  rdf_loader_run ();
-}
-;
-
-
-create procedure ld_array ()
-{
-  declare first, last, arr, len, local any;
-  declare cr cursor for
-      SELECT top 100 LL_FILE, LL_GRAPH
-        FROM DB.DBA.LOAD_LIST table option (index ll_state)
-        WHERE LL_STATE = 0
-	for update;
-  declare fill int;
-  declare f, g varchar;
-  declare r any;
-  whenever not found goto done;
-  first := 0;
-  last := 0;
- arr := make_array (100, 'any');
-  fill := 0;
-  open cr;
-  len := 0;
-  for (;;)
-    {
-      fetch cr into f, g;
-      if (0 = first) first := f;
-      last := f;
-      arr[fill] := vector (f, g);
-    len := len + cast (file_stat (f, 1) as int);
-      fill := fill + 1;
-      if (len > 2000000)
-	goto done;
-    }
- done:
-  if (0 = first)
-    return 0;
-  if (1 <> sys_stat ('cl_run_local_only'))
-    local := sys_stat ('cl_this_host');
-  UPDATE load_list set ll_state = 1, ll_started = curdatetime (), LL_HOST = local
-    WHERE ll_file >= first and ll_file <= last;
-  return arr;
-}
-;
-
-create procedure
-rdf_loader_run (in max_files integer := null, in log_enable int := 2)
-{
-  declare sec_delay float;
-  declare _f, _graph varchar;
-  declare arr any;
-  declare xx, inx, tx_mode, ld_mode int;
-  ld_mode := log_enable;
-  if (0 = sys_stat ('cl_run_local_only'))
-    {
-      if (log_enable = 2 and cl_this_host () = 1)
-	{
-	  cl_exec ('checkpoint_interval (0)');
-	  cl_exec ('__dbf_set (''cl_non_logged_write_mode'', 1)');
-	}
-      if (cl_this_host () = 1)
-	cl_exec('__dbf_set(''cl_max_keep_alives_missed'',3000)');
-    }
-  tx_mode := bit_and (1, log_enable);
-  log_message ('Loader started');
-
-  DELETE FROM DB.DBA.LOAD_LIST WHERE LL_FILE = '##stop';
-  commit work;
-
-  while (1)
-    {
-      set isolation = 'repeatable';
-      declare exit handler for sqlstate '40001' {
-	rollback work;
-        sec_delay := rnd(1000)*0.001;
-	log_message(sprintf('deadlock in loader, waiting %d milliseconds', cast (sec_delay * 1000 as integer)));
-	delay(sec_delay);
-	goto again;
-      };
-
-     again:;
-
-      if (exists (SELECT 1 FROM DB.DBA.LOAD_LIST WHERE LL_FILE = '##stop'))
-	{
-	  log_message ('File load stopped by rdf_load_stop.');
-	  return;
-	}
-
-      log_enable (tx_mode, 1);
-
-      if (max_files is not null and max_files <= 0)
-        {
-	  commit work;
-	  log_message ('Max_files reached. Finishing.');
-          return;
-	}
-
-      whenever not found goto looks_empty;
-
-      --      log_message ('Getting next file.');
-      set isolation = 'serializable';
-      SELECT id into xx FROM ldlock WHERE id = 0 for update;
-      arr := ld_array ();
-      commit work;
-      if (0 = arr)
-	goto looks_empty;
-      log_enable (ld_mode, 1);
-
-      for (inx := 0; inx < 100; inx := inx + 1)
-	{
-	  if (0 = arr[inx])
-	    goto arr_done;
-	  ld_file (arr[inx][0], arr[inx][1]);
-	  UPDATE DB.DBA.LOAD_LIST set LL_STATE = 2, LL_DONE = curdatetime () WHERE LL_FILE = arr[inx][0];
-	}
-    arr_done:
-      log_enable (tx_mode, 1);
-
-
-      if (max_files is not null) max_files := max_files - 100;
-
-      commit work;
-    }
-
- looks_empty:
-  commit work;
-  log_message ('No more files to load. Loader has finished,');
-  return;
-
-}
-;
-
-create procedure rdf_load_stop (in force int := 0)
-{
-  insert into DB.DBA.LOAD_LIST (LL_FILE) values ('##stop');
-  commit work;
-  if (force)
-    cl_exec ('txn_killall (1)');
-}
-;
-
-
-create procedure RDF_LOADER_RUN_1 (in x int, in y int)
-{
-  rdf_loader_run (x, y);
-}
-;
-
-create procedure rdf_ld_srv (in log_enable int)
-{
-  declare aq any;
-  aq := async_queue (1);
-  aq_request (aq, 'DB.DBA.RDF_LOADER_RUN_1', vector (null, log_enable));
-  aq_wait_all (aq);
-}
-;
-
-
-create procedure load_grdf (in f varchar)
-{
-  declare line any;
-  declare inx int;
-  declare ses any;
-  declare gr varchar;
-
-  if (f like '%.gz')
-    ses := gz_file_open (f);
-  else
-    ses := file_open (f);
-  inx := 0;
-  line := '';
-  while (line <> 0)
-    {
-      gr := ses_read_line (ses, 0, 0, 1);
-      if (gr = 0) return;
-      line := ses_read_line (ses, 0, 0, 1);
-      if (line = 0) return;
-      DB.DBA.RDF_LOAD_RDFXML (line, gr, gr);
-      inx := inx + 1;
-    }
-}
-;
-
-
-
--- cl_exec ('set lock_escalation_pct = 110');
--- cl_exec ('DB.DBA.RDF_LD_SRV (1)') &
--- cl_exec ('DB.DBA.RDF_LD_SRV (2)') &
-]]></programlisting>
-</listitem>
   <listitem>Execute:
 <programlisting><![CDATA[
 SQL>cl_exec ('checkpoint);
@@ -20316,35 +21195,35 @@ if the patch can not be reverted then the result is "suspicious".
 </sect3>
 </sect2>
   <sect2 id="rdb2rdftriggers"><title>RDB2RDF Triggers</title>
-<para>RDF Views have many advantages, if compared to static dumps of the database in RDF triples. 
+<para>Linked Data Views have many advantages, if compared to static dumps of the database in RDF triples. 
 	However, they does not solve few problems. First, inference is supported only for physically stored 
-	triples, so one had to chose between convenience of inference and convenience of RDF Views. Next, 
+	triples, so one had to chose between convenience of inference and convenience of Linked Data Views. Next, 
 	algorithms that selects triples with non-constant graphs and predicates tend to produce enormous 
-	texts of SQL queries if RDF Views are complicated enough. Finally, there may be a need in export 
+	texts of SQL queries if Linked Data Views are complicated enough. Finally, there may be a need in export 
 	of big and fresh static RDF dump but preparing this dump would take too much time via both RDF 
 	Views and traditional methods.
 </para>
-<para>The solution is set of triggers on source tables of an RDF View that edit parts of physical 
-	dump on each change of source data. Unlike RDF Views that cost nothing while not queried, these 
+<para>The solution is set of triggers on source tables of an Linked Data View that edit parts of physical 
+	dump on each change of source data. Unlike Linked Data Views that cost nothing while not queried, these 
 	triggers add a significant overhead on any data manipulation on sources, continuously. To 
-	compensate this, the dump should be in an intensive use and not replaceable by RDF Views. In 
+	compensate this, the dump should be in an intensive use and not replaceable by Linked Data Views. In 
 	other cases, do not add these triggers.
 </para>
 <para>It is next to impossible to write such triggers by hands so a small API is provided to 
-	generate SQL texts from metadata of RDF Views.
+	generate SQL texts from metadata of Linked Data Views.
 </para>
 <para>First of all, views in an RDF storage does not work in full isolation from each other. 
 	Some of them may partially disable others due to OPTION(EXCLUSIVE) and some may produce one 
 	triple in different ways. As a result, triggers are not made on per-view basis. Instead, a 
 	special RDF storage is introduced, namely virtrdf:SyncToQuads , all required triples are 
-	added to it and triggers are created for the whole storage. Typically an RDF View is created 
+	added to it and triggers are created for the whole storage. Typically an Linked Data View is created 
 	in some other storage, e.g., virtrdf:DefaultQuadStorage and then added to virtrdf:SyncToQuads via:
 </para>
 <programlisting><![CDATA[
 sparql alter quad storage virtrdf:SyncToQuads {
    create <my_rdf_view> using storage virtrdf:DefaultQuadStorage };
 ]]></programlisting>
-<para>The following example procedure copies all user-defined RDF Views from default quad storage 
+<para>The following example procedure copies all user-defined Linked Data Views from default quad storage 
 	to virtrdf:SyncToQuads:
 </para>
 <programlisting><![CDATA[
@@ -20363,10 +21242,10 @@ create procedure DB.DBA.RDB2RDF_COPY_ALL_RDF_VIEWS_TO_SYNC ()
 </para>
 <itemizedlist mark="bullet">
   <listitem><link linkend="fn_sparql_rdb2rdf_list_tables">DB.DBA.SPARQL_RDB2RDF_LIST_TABLES</link>: 
-  The function returns a vector of names of tables that are used as sources for RDF Views. Application 
+  The function returns a vector of names of tables that are used as sources for Linked Data Views. Application 
   developer should decide what to do with each of them - create triggers or do some application-specific 
   workarounds.
-  <para>Note that if some SQL views are used as sources for RDF Views and these views does not have 
+  <para>Note that if some SQL views are used as sources for Linked Data Views and these views does not have 
   	INSTEAD triggers then workarounds become mandatory for them, not just a choice, because BEFORE 
   	or AFTER triggers on views are not allowed if there is no appropriate INSTEAD trigger. The mode 
   	argument should be zero in current version.
@@ -20376,7 +21255,7 @@ create procedure DB.DBA.RDB2RDF_COPY_ALL_RDF_VIEWS_TO_SYNC ()
   function creates an SQL text for a given table and an operation specified by an opcode.
   </listitem>
 </itemizedlist>
-<para>In some cases, RDF Views are complicated enough so that BEFORE UPDATE and AFTER DELETE 
+<para>In some cases, Linked Data Views are complicated enough so that BEFORE UPDATE and AFTER DELETE 
 	triggers are required in additional to the minimal set. In this case, sparql_rdb2rdf_codegen 
 	calls will return a vector of two string sessions, not single string session, and both sessions 
 	are sql texts to inspect or execute. In this case, the BEFORE trigger will not delete obsolete 
@@ -20441,7 +21320,7 @@ create procedure DB.DBA.RDB2RDF_PREPARE_TABLE (in dump_prefix varchar, in tbl va
 }
 ;
 
--- This creates and loads all triggers, init procedure and debug dump related to all tables used by and RDF View.
+-- This creates and loads all triggers, init procedure and debug dump related to all tables used by and Linked Data View.
 create procedure DB.DBA.RDB2RDF_PREPARE_ALL_TABLES (in dump_prefix varchar)
 {
   declare tbl_list any;
@@ -20453,7 +21332,7 @@ create procedure DB.DBA.RDB2RDF_PREPARE_ALL_TABLES (in dump_prefix varchar)
 }
 ;
 ]]></programlisting>
-<para>The following combination of calls prepares all triggers for all RDF Views of the default storage:
+<para>The following combination of calls prepares all triggers for all Linked Data Views of the default storage:
 </para>
 <programlisting><![CDATA[
 DB.DBA.RDB2RDF_COPY_ALL_RDF_VIEWS_TO_SYNC ();
@@ -20502,10 +21381,11 @@ the <ulink url="http://jena.sourceforge.net/">Jena 2.5.5</ulink> version current
     <sect3 id="rdfnativestorageprovidersjenasetup"><title>Setup</title>
     <sect4 id="rdfnativestorageprovidersjenareqfiles"><title>Required Files</title>
     <itemizedlist mark="bullet">
-      <listitem>Virtuoso Jena Provider JAR file, <ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtJenaProvider/virt_jena.jar">virt_jena.jar</ulink></listitem>
-      <listitem>Virtuoso JDBC Driver JAR file, <ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtJenaProvider/virtjdbc3.jar">virtjdbc3.jar</ulink></listitem>
-      <listitem>Jena Framework and associated classes, <ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtJenaProvider/jenajars.zip">jenajars.zip</ulink></listitem>
-      <listitem>Sample programs, <ulink url="http://virtuoso.openlinksw.com/wiki/main/Main/VirtJenaProvider/virtjenasamples.zip">virtjenasamples.zip</ulink></listitem>
+      <listitem>Virtuoso Jena Provider JAR file, <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload/virt_jena.jar">virt_jena.jar</ulink></listitem>
+      <listitem>Virtuoso JDBC Driver 3 JAR file, <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload/virtjdbc3.jar">virtjdbc3.jar</ulink></listitem>
+      <listitem>Virtuoso JDBC Driver 4 JAR file, <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload/virtjdbc4.jar">virtjdbc4.jar</ulink></listitem>      
+      <listitem>Jena Framework and associated classes, <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload/jenajars.zip">jenajars.zip</ulink></listitem>
+      <listitem>Sample programs, <ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload/virtjenasamples.zip">virtjenasamples.zip</ulink></listitem>
     </itemizedlist>
     </sect4>
     <sect4 id="rdfnativestorageprovidersjenacmsmpr"><title>Compiling Jena Sample Programs</title>
@@ -22416,6 +23296,380 @@ with the above options.
    <listitem>Finally, see how a change in the publisher's graph will appear in the subscriber's 
    	graph.</listitem>
 </itemizedlist>
+  <sect2 id="rdfgraphreplicationscenr"><title>Replication Scenarios</title>
+     <figure id="topo_scenario" float="1">
+      <title></title>
+      <graphic fileref="ui/topo-scenario.png"/>
+    </figure> 
+    <sect3 id="rdfgraphreplicationscenrint"><title>Introduction</title>
+      <para>In this section we will examine a proposed setup for a back-end server called MASTER which 
+      	publishes a number of graphs to a set of front-end machines called FARM-1 .. FARM-n and discuss 
+      	a couple of common scenarios like adding an extra machine to the farm, or replacing a broken 
+      	instance of MASTER.</para>    
+      <para>In this example we will assume each virtuoso instance running on its own machine, so they can 
+      	use the same port numbers for both the main server (default 1111) as well as the http port 
+      	(default 8890) as each machine has an unique IP addresses. In the example we use MASTER-IP and 
+      	FARM-x-IP which should be replaced by either the real IP address or the DNS name of the machine 
+      	in question.</para>      
+      <para>Since there will be a reverse-proxy service in front of the farm, all virtuoso instances 
+      	should have the URIQA Default host set to the outside name for this service. In this example 
+      	we will use http://test.example.com as the web service we are trying to setup.</para>            
+    </sect3> 
+    <sect3 id="rdfgraphreplicationscenrsup"><title>Setup</title>
+      <sect4 id="rdfgraphreplicationscenrsupinstv"><title>Installing Virtuoso</title>
+        <para>All machines in this setup should be installed with similar installation paths like:</para>
+        <itemizedlist mark="bullet">
+          <listitem>/opt/virtuoso</listitem>
+          <listitem>/dbs/virtuoso</listitem>
+          <listitem>/virtuoso</listitem>
+          <listitem>...</listitem>          
+        </itemizedlist>        
+        <para>The partition should be big enough to have room for the Virtuoso binaries and libraries, 
+        	the transaction logs, backups and, if you do not want to use the striping feature of Virtuoso, 
+        	it will need to have room for the main database files as well.</para>
+        <para>Here are the quick installation steps:</para>                
+        <orderedlist>
+          <listitem>Login as root.</listitem>
+          <listitem>Create local user called virtuoso using the chosen installation path as home 
+          	direcotory.</listitem>
+          <listitem>Login as virtuoso.</listitem>
+          <listitem>Extract virtuoso-universal-server-6.1.tar in home directory.</listitem>
+          <listitem>Run sh install.sh to install Virtuoso.</listitem>
+          <listitem>Remove the file install.sh virtuoso-universal-server-6.1.tar virtuoso-server.taz if 
+          	not otherwise needed.</listitem>
+          <listitem>Run bin/virtuoso-stop.sh to shutdown this Virtuoso instance.</listitem>
+          <listitem>Install virtuoso.lic for this system in $HOME/bin directory.</listitem>
+        </orderedlist>        
+        <para>As the replication process needs to make an ODBC connection to the MASTER machine, all 
+        	machines should have the following information in the $HOME/bin/odbc.ini:</para>
+<programlisting><![CDATA[
+[ODBC Data Sources]
+..
+MASTER_DSN = OpenLink Virtuoso
+
+..
+[MASTER_DSN]
+Driver = OpenLink Virtuoso
+Address = MASTER_IP:1111	
+]]></programlisting>        	        
+      </sect4>    
+      <sect4 id="rdfgraphreplicationscenrsupinstm"><title>Setting up MASTER</title>
+        <para>The MASTER machine is the back-end server machine. Various applications feed SPARQL data 
+        	into this machine it publishes a set of graphs using RDF Replication.</para>      
+        <para>The MASTER machine should ideally be equipped with multiple redundant disks in RAID-1 
+        	or RAID-6 mode to minimize the risk that a single bad disk takes down the system. From a 
+        	Virtuoso point of view we will use a combination of online backups combined with checkpoint 
+        	audit trail to backup the content of the database in a safe way. The online backups, the 
+        	checkpoint audit trail as well as the replication logs can also be copied to secondary 
+        	storage using the rsync command and can be easily scripted as a cron job.</para>   
+        <para>Changes to database/virtuoso.ini:</para>   
+<programlisting><![CDATA[
+...
+[Parameters]
+SchedulerInterval    = 1     ; run the internal scheduler every minute
+CheckpointAuditTrail = 1     ; enable audit trail on transaction logs
+CheckpointInterval   = 60    ; perform an automated checkpoint every 60 minutes
+...
+[URIQA]
+DefaultHost = test.example.com
+...  
+[Replication]
+ServerName   = MASTER
+ServerEnable = 1 
+QueueMax     = 5000000
+...
+]]></programlisting>        
+        <para>Once the MASTER is started using the bin/virtuoso-start.sh script we must enable RDF 
+        	replication before we start add data to the graphs we wish to replicate, so every record is 
+        	accounted for by the replication process. If there is existing data in the graphs to be 
+        	published, then this data would need to be added to a subscriber manually since the 
+        	replication process creates a delta set of changes since publishing was enabled.</para>   
+        <para>To enable publishing of the graph we use the isql program to connect to the MASTER 
+        	instance:</para>            
+<programlisting><![CDATA[
+$ isql MASTER-IP:1111
+
+-- and run the following commands:
+
+-- enable this instance as a publisher
+rdf_repl_start();
+
+-- add graphs to replication list
+rdf_repl_graph_ins('http://test.example.com');
+]]></programlisting>        	
+        <para>Next we create a backup directory inside the database directory and setup the online 
+        	backup, again using the isql program:</para>   
+<programlisting><![CDATA[
+$ cd database
+$ mkdir backup
+$ isql MASTER_IP:1111
+
+-- and run the following commands:
+
+-- clear any previous context
+backup_context_clear();
+
+-- start the backup
+backup_online ('bkup-#', 1000000, 0, vector ('backup'));
+
+]]></programlisting>        	
+        <para>The following files can now be backed up using rsync or similar tool to another machine:</para> 
+<table><title>Files that can be backed up using rsync or similar tool to another machine</title>
+<tgroup cols="2">
+<thead><row>
+<entry>Files</entry><entry>Description</entry>
+</row></thead>
+<tbody>
+<row><entry>database/backup/*.bp</entry><entry>	the incremental backup files</entry></row>
+<row><entry>database/virtuoso.trx</entry><entry>	the main transaction log containing the most recent updates to the database that have not been checkpointed into the database</entry></row>
+<row><entry>database/virtuosoTIMESTAMP.trx</entry><entry>all the previous transaction logs which can be used to reconstruct the database</entry></row>
+<row><entry>database/__rdf_repl*.log</entry><entry>all the replication logs containing the changes to the published graph</entry></row>
+</tbody>
+</tgroup>
+</table>        
+        <para>NOTE: Since the database is constantly modified during operation, it is of NO use to 
+        	backup the virtuoso.db using an rsync script unless the virtuoso instance was shutdown 
+        	beforehand, or certain extra precautions are taken which we will explain later on.</para>   
+      </sect4>     
+      <sect4 id="rdfgraphreplicationscenrsupinstp"><title>Setup SPARE master</title>
+        <para>The SPARE machine is a replica of the MASTER machine. This machine subscribes to the 
+        	publication of the MASTER to keep an exact match of the RDF graphs, but also publishes 
+        	this data without any initial subscribers.</para>      
+        <para>The SPARE machine should ideally be equipped similar to the MASTER machine, with multiple 
+        	redundant disks in RAID-1 or RAID-6 mode to minimize the risk that a single bad disk takes down 
+        	the system. From a Virtuoso point of view we will use a combination of online backups combined 
+        	with checkpoint audit trail to backup the content of the database in a safe way. The online 
+        	backups, the checkpoint audit trail as well as the replication logs can also be copied to 
+        	secondary storage using the rsync command and can be easily scripted as a cron job.</para>   
+        <para>Changes to database/virtuoso.ini:</para>                                                
+<programlisting><![CDATA[
+...
+[Parameters]
+SchedulerInterval    = 1     ; run the internal scheduler every minute
+CheckpointAuditTrail = 1     ; enable audit trail on transaction logs
+CheckpointInterval   = 60    ; perform an automated checkpoint every 60 minutes
+...
+[URIQA]
+DefaultHost = test.example.com
+...  
+[Replication]
+ServerName   = SPARE
+ServerEnable = 1 
+QueueMax     = 5000000
+...
+]]></programlisting>        
+        <para>We must enable RDF replication before we start add data to the graphs we wish to 
+        	replicate, so every record is accounted for by the replication process. If there is 
+        	existing data in the graphs to be published, then this data would need to be added 
+        	to a subscriber manually since the replication process creates a delta set of changes 
+        	since publishing was enabled.</para>                                                
+        <para>To enable publishing of the graph, as well as subscribing to the MASTER, we first start 
+        	up this Virtuoso instance with bin/virtuoso-start.sh and then use the isql program to connect 
+        	to the SPARE instance:</para>                                                
+<programlisting><![CDATA[
+$ bin/virtuoso-start.sh
+$ isql SPARE-IP:1111
+
+-- and run the following commands:
+
+-- enable this instance as a publisher
+rdf_repl_start();
+
+-- add graphs to replication list
+rdf_repl_graph_ins('http://test.example.com');
+
+-- connect to master
+repl_server ('MASTER', 'MASTER_DSN');
+
+-- start subscribing to __rdf_repl
+repl_subscribe ('MASTER', '__rdf_repl', 'dav', 'dav', 'dba', 'dba');
+
+-- start initial replication
+repl_sync_all ();
+
+-- add subscription to scheduler
+DB.DBA.SUB_SCHEDULE ('MASTER', '__rdf_repl', 1);
+]]></programlisting>        	
+        <para>Next we create a backup directory inside the database directory and setup the online backup, 
+        	again using the isql program:</para>    
+<programlisting><![CDATA[
+$ cd database
+$ mkdir backup
+$ isql SPARE_IP:1111
+
+--and run the following commands:
+
+-- clear any previous context
+backup_context_clear();
+
+-- start the backup
+backup_online ('bkup-#', 1000000, 0, vector ('backup'));
+]]></programlisting>        	                                            
+        <para>The following files can now be backed up using rsync or similar tool to another machine:</para> 
+<table><title>Files that can be backed up using rsync or similar tool to another machine</title>
+<tgroup cols="2">
+<thead><row>
+<entry>Files</entry><entry>Description</entry>
+</row></thead>
+<tbody>
+<row><entry>database/backup/*.bp</entry><entry>	the incremental backup files</entry></row>
+<row><entry>database/virtuoso.trx</entry><entry>the main transaction log containing the most recent updates to the database that have not been checkpointed into the database</entry></row>
+<row><entry>database/virtuosoTIMESTAMP.trx</entry><entry>all the previous transaction logs which can be used to reconstruct the database</entry></row>
+<row><entry>database/__rdf_repl*.log</entry><entry>all the replication logs containing the changes to the published graph</entry></row>
+</tbody>
+</tgroup>
+</table>          
+        <para>Note: Since the database is constantly modified during operation, it is of NO use to 
+        	backup the virtuoso.db using an rsync script unless the virtuoso instance was shutdown 
+        	beforehand, or certain extra precautions are taken which we will explain later on.</para>
+      </sect4>      
+      <sect4 id="rdfgraphreplicationscenrsupinstpf"><title>Setup FARM-1</title>
+        <para>The FARM-1 machine is the first front-end server machine. It subscribes to the publication 
+        	of the MASTER instance to keep up-to-date.</para>   
+        <para>The FARM-1 machine can be run on simpler hardware than the MASTER instance.It does not 
+        	require the same level of redundancy in terms of hard disks etc, as there are a number of 
+        	these machines running in parallel each capable of returning results to the proxy. If one 
+        	FARM machine dies, it can simply be taken from the reverse-proxy list, repaired or replaced 
+        	with a fresh machine before it is added to the list of servers in the reverse proxy. As such 
+        	it does not need to be backed up separately, although we could make a backup of this 
+        	installation to quickly install the rest of the identical FARM boxes.</para>
+        <para>Change the database/virtuoso.ini file:</para>
+<programlisting><![CDATA[
+...
+[Parameters]
+SchedulerInterval    = 1     ; run the internal scheduler every minute
+CheckpointAuditTrail = 0     ; disable audit trail on transaction logs
+CheckpointInterval   = 60    ; perform an automated checkpoint every 60 minutes
+...
+[URIQA]
+DefaultHost = test.example.com
+...  
+[Replication]
+ServerName   = FARM-1        ; each FARM machine needs to have a unique replication name
+ServerEnable = 1 
+QueueMax     = 5000000
+...
+]]></programlisting>        
+        <para>Next we start up the Virtuoso instance using the bin/virtuoso-start.sh command and 
+        	use the isql program to subscribe to the MASTER:</para>            
+<programlisting><![CDATA[
+$ bin/virtuoso-start.sh
+$ isql FARM-1-IP:1111
+
+-- connect to master
+repl_server ('MASTER', 'MASTER_DSN');
+
+-- start subscribing to __rdf_repl
+repl_subscribe ('MASTER', '__rdf_repl', 'dav', 'dav', 'dba', 'dba');
+
+-- start initial replication
+repl_sync_all ();
+
+-- add subscription to scheduler
+DB.DBA.SUB_SCHEDULE ('MASTER', '__rdf_repl', 1);
+]]></programlisting>        	
+        <para>At this point we can shutdown this Virtuoso instance using the bin/virtuoso-stop.sh 
+        	command and make a copy of the whole virtuoso installation as a blueprint to copy to 
+        	another FARM-x machine.</para>            
+      </sect4>    
+      <sect4 id="rdfgraphreplicationscenrsupinstpfs"><title>Setup FARM-2 from scratch</title>
+        <para>We can repeat the same steps we did for the FARM-1 machine, and just make sure we use 
+        	FARM-2 as the replication name in the database/virtuoso.ini file and use FARM-2-IP:1111 as 
+        	an argument to the isql program.</para>      
+        <para>Change bin/virtuoso.ini:</para>            
+<programlisting><![CDATA[
+[Replication]
+ServerName = FARM-2	
+]]></programlisting>        
+      </sect4>
+      <sect4 id="rdfgraphreplicationscenrsupinstpfsi"><title>Setup FARM-3 using blueprint from FARM-1 installation</title>
+        <para>Extract the tarred/zipped copy of the installation made at the end of the setup of FARM-1.</para>  
+        <para>Before starting up the instance, we only need to give this instance a unique name for 
+        	replication:</para>            
+        <para>Change bin/virtuoso.ini:</para>            
+<programlisting><![CDATA[
+[Replication]
+ServerName = FARM-3	
+]]></programlisting>        
+        <para>Next we start up the Virtuoso instance using the bin/virtuoso-start.sh command and since 
+        	the subscription records and schedule are already performed in the previous step, we just 
+        	use the isql program to perform a sync against the MASTER:</para>                                                            
+<programlisting><![CDATA[
+$ bin/virtuoso-start.sh
+$ isql FARM-3-IP:1111
+
+-- change replication name
+DB.DBA.REPL_SERVER_RENAME ('FARM-1', 'FARM-3')
+
+-- sync against master
+repl_sync_all();
+]]></programlisting>        	
+      </sect4>     
+      <sect4 id="rdfgraphreplicationscenrsupinstpfsc"><title>Setup FARM-4 using clone of FARM-1</title>
+        <para>If the system has been running for some time, it may not be practical to do a replication 
+        	from start, so there is an alternative way to setup a new FARM-4 machine.</para>      
+        <para>We can either restore the blue-print backup we make at the end of FARM-1 installation, 
+        	or we do a fresh installation of virtuoso on the FARM-4 machine.</para>              
+        <para>In both cases we shutdown the virtuoso instance and remove the database, as we are going 
+        	to replace this.</para>      
+<programlisting><![CDATA[
+$ bin/virtuoso-stop.sh
+$ cd database
+$ rm virtuoso.db virtuoso.trx virtuoso.log virtuoso.pxa	
+]]></programlisting>        	
+        <para>Change the database/virtuoso.ini file:</para>      
+<programlisting><![CDATA[
+...
+[Parameters]
+SchedulerInterval    = 1     ; run the internal scheduler every minute
+CheckpointAuditTrail = 0     ; disable audit trail on transaction logs
+CheckpointInterval   = 60    ; perform an automated checkpoint every 60 minutes
+...
+[URIQA]
+DefaultHost = test.example.com
+...  
+[Replication]
+ServerName   = FARM-4        ; each FARM machine needs to have a unique replication name
+ServerEnable = 1 
+QueueMax     = 5000000
+...
+]]></programlisting>        
+        <para>Next we are going to temporarily disable checkpointing on FARM-1 machine so 
+        	we can copy its database without risking corruption: </para>            
+<programlisting><![CDATA[
+$ isql FARM-1-IP:1111
+
+-- disable automatic checkpointing
+checkpoint_interval (-1);
+
+-- and do an explicit checkpoint
+checkpoint;	
+]]></programlisting>        	
+        <para>It is now safe to copy the database across using the rsync command:</para> 
+<programlisting><![CDATA[
+$ rsync -avz virtuoso at FARM-1-IP:/path/to/virtuoso/database/virtuoso.db database/virtuoso.db
+]]></programlisting>        
+        <para>Next we re-enable checkpoint interval on FARM-1:</para> 
+<programlisting><![CDATA[
+$ isql FARM-1-IP:1111
+
+-- re-enable checkpointing
+checkpoint_interval(60);	
+]]></programlisting>        
+        <para>The last step is to start the database:</para>                                           
+<programlisting><![CDATA[
+$ bin/virtuoso-start.sh
+$ isql FARM-4-IP:1111
+
+-- change replication name
+DB.DBA.REPL_SERVER_RENAME ('FARM-1', 'FARM-4')
+
+-- sync against master
+repl_sync_all();	
+]]></programlisting>        
+      </sect4>                             
+    </sect3>     
+  </sect2>
   <sect2 id="rdfgraphreplicationtopl"><title>Replication Topologies</title>
 <para>Typical replication topologies are Chains, Stars and Bi-directional. They can be achieved with 
 	Virtuoso, by repeating the "Publish" and/or "Subscribe" steps on each relevant node.</para>
@@ -22561,17 +23815,13 @@ http://example.org
            <para>There are several ways to insert data into a Virtuoso Named Graph. In this example, we 
            	will use the Virtuoso Conductor's Import RDF feature:</para>
 <orderedlist>
-  <listitem>In the Virtuoso Conductor, go to RDF -> RDF Store Upload 
+  <listitem>In the Virtuoso Conductor, go to Linked Data -> Quad Store Upload:
      <figure id="star7" float="1">
        <title>Replication Topology</title>
-       <graphic fileref="ui/r1.png"/>
+       <graphic fileref="ui/uc1.png"/>
      </figure>
   </listitem> 
   <listitem>In the form: 
-     <figure id="star8" float="1">
-       <title>Replication Topology</title>
-       <graphic fileref="ui/r2.png"/>
-     </figure>
     <itemizedlist mark="bullet">
   <listitem>Tick the box for Resource URL and enter your resource URL, for e.g.: 
 <programlisting><![CDATA[
@@ -22584,6 +23834,10 @@ http://example.org
 ]]></programlisting>  	
 </listitem>
     </itemizedlist>
+     <figure id="star8" float="1">
+       <title>Replication Topology</title>
+       <graphic fileref="ui/r2.png"/>
+     </figure>
       </listitem>
   <listitem>Click Upload</listitem> 
   <listitem>A successful upload will result in this message: 
@@ -23061,10 +24315,10 @@ http://example.org
          <sect5 id="rdfgraphreplicationtoplchainind"><title>Insert Data into a Named Graph on the db1 Virtuoso Instance</title>                                    
 <orderedlist>
   <listitem>Log in at http://localhost:8891/conductor</listitem> 
-  <listitem>Go to RDF - > RDF Store Upload 
+  <listitem>Go to Linked Data -> Quad Store Upload:
      <figure id="chain32" float="1">
        <title>Chain Replication Topology</title>
-       <graphic fileref="ui/m31.png"/>
+       <graphic fileref="ui/uc1.png"/>
      </figure>
   </listitem>    
   <listitem>In the shown form:
@@ -23104,7 +24358,7 @@ WHERE { ?s ?p ?o }
        <graphic fileref="ui/m34.png"/>
      </figure>
   </listitem>    
-  <listitem>Should return <emphasis>55</emphasis> as total.
+  <listitem>Should return <emphasis>57</emphasis> as total.
      <figure id="chain36" float="1">
        <title>Chain Replication Topology</title>
        <graphic fileref="ui/m35.png"/>
@@ -23121,7 +24375,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem> 
-  <listitem>Should return <emphasis>55</emphasis> as total.
+  <listitem>Should return <emphasis>57</emphasis> as total.
      <figure id="chain37" float="1">
        <title>Chain Replication Topology</title>
        <graphic fileref="ui/m35.png"/>
@@ -23155,14 +24409,14 @@ SPARQL INSERT INTO GRAPH <http://example.org>
 ]]></programlisting>
      <figure id="chain38" float="1">
        <title>Chain Replication Topology</title>
-       <graphic fileref="ui/m35.png"/>
+       <graphic fileref="ui/m36.png"/>
      </figure>
   </listitem>    
   <listitem>Click "Execute"</listitem> 
   <listitem>As result the triples will be inserted
      <figure id="chain39" float="1">
        <title>Chain Replication Topology</title>
-       <graphic fileref="ui/m36.png"/>
+       <graphic fileref="ui/m36a.png"/>
      </figure>
   </listitem>    
   <listitem>Check the count of the destination instance graph's triples by executing the following query like against the SPARQL endpoint, 
@@ -23173,7 +24427,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem>  
-  <listitem>Should return <emphasis>58</emphasis> as total.
+  <listitem>Should return <emphasis>60</emphasis> as total.
      <figure id="chain40" float="1">
        <title>Chain Replication Topology</title>
        <graphic fileref="ui/m38.png"/>
@@ -23191,7 +24445,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem>  
-  <listitem>Should return <emphasis>58</emphasis> as total.
+  <listitem>Should return <emphasis>60</emphasis> as total.
      <figure id="chain41" float="1">
        <title>Chain Replication Topology</title>
        <graphic fileref="ui/m38.png"/>
@@ -23499,10 +24753,10 @@ http://example.org
 <orderedlist>
   <listitem>Log in at http://localhost:8892/conductor
   </listitem>
-  <listitem>Go to RDF -> RDF Store Upload 
+  <listitem>Go to Linked Data -> Quad Store Upload:
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
-        <graphic fileref="ui/bd31.png"/>
+        <graphic fileref="ui/uc1.png"/>
      </figure>
   </listitem>
   <listitem>In the shown form:
@@ -23526,7 +24780,7 @@ http://example.org
   <listitem>A successful upload will result in a shown message.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
-        <graphic fileref="ui/bd33.png"/>
+        <graphic fileref="ui/m33.png"/>
      </figure>
   </listitem>
   <listitem>Check the count of the inserted triples by executing a query like the following against the SPARQL endpoint, 
@@ -23541,7 +24795,7 @@ WHERE { ?s ?p ?o }
         <graphic fileref="ui/bd34.png"/>
      </figure>
   </listitem>
-  <listitem>Should return <emphasis>55</emphasis> as total.
+  <listitem>Should return <emphasis>57</emphasis> as total.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
         <graphic fileref="ui/bd35.png"/>
@@ -23558,7 +24812,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem>
-  <listitem>Should return <emphasis>55</emphasis> as total.
+  <listitem>Should return <emphasis>57</emphasis> as total.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
         <graphic fileref="ui/bd35.png"/>
@@ -23600,7 +24854,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem>
-  <listitem>Should return <emphasis>56</emphasis> as total.
+  <listitem>Should return <emphasis>58</emphasis> as total.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
         <graphic fileref="ui/bd38.png"/>
@@ -23619,7 +24873,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem>
-  <listitem>Should return <emphasis>56</emphasis> as total.
+  <listitem>Should return <emphasis>58</emphasis> as total.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
         <graphic fileref="ui/bd38.png"/>
@@ -23667,7 +24921,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
 </listitem>
-  <listitem>Should return <emphasis>58</emphasis> as total.
+  <listitem>Should return <emphasis>60</emphasis> as total.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
         <graphic fileref="ui/bd41.png"/>
@@ -23686,7 +24940,7 @@ SELECT COUNT(*)
 WHERE { ?s ?p ?o }
 ]]></programlisting>
   </listitem>
-  <listitem>Should return <emphasis>58</emphasis> as total.
+  <listitem>Should return <emphasis>60</emphasis> as total.
      <figure id="bid1" float="1">
         <title>Bi-directional Replication Topology</title>
         <graphic fileref="ui/bd41.png"/>
diff --git a/docsrc/xmlsource/rdfviewssamples.xml b/docsrc/xmlsource/rdfviewssamples.xml
index 15b1e82..8bab858 100644
--- a/docsrc/xmlsource/rdfviewssamples.xml
+++ b/docsrc/xmlsource/rdfviewssamples.xml
@@ -1,8 +1,18 @@
-<sect1 id="rdfviewsenterpr"><title>Examples of RDF Views</title>
-<sect2 id="rdfviewnorthwindexample1"><title>Simple Mapping Example -- Northwind RDF View</title>
-<para>Here is example of the basic Northwind RDF Views deployment. The sequence of operations is very common for adding SPARQL access to existing application.</para>
-<para>There exist few important questions to answer. Who should have access to data behind RDF View? Should someone have access to other sorts of RDF data but not to the new View? What are applications that should be interoperable with the new RDF data source? Are there any applications that produce similar data but that data sould be kept apart from data made by view? How to ensure that deployment the view will not cause problems for other applications?</para>
-<para>First of all, we decide whether the default web service endpoint should have access to the data in question. If it should then we have to grant SELECT privileges to the account "SPARQL" that is used for the default endpoint; if it should not but some custom edpoint should then grant to the owner account of that account. Granting access is less trivial that it is usual. On one hand, those who can make SQL SELECT statements on application's tables can also make SPARQL queries on RDF View over that tables, because it makes SQL inside. On the other hand, those who do not intend to query that data at all may get unexpected "permission denied" errors on queries that worked fine before adding an RDF View. If SPARQL compiler can not prove that the query can not access data from the view then it will generate SQL code that will access tables behind the view. In some cases permission problems should be resolved by creating RDF View in a separate <link linkend="rdfviewconfiguringrdfstorages">RDF storage</link>. In this example, data are public:</para>
+<sect1 id="rdfviewsenterpr"><title>Examples of Linked Data Views</title>
+<sect2 id="rdfviewnorthwindexample1"><title>Simple Mapping Example -- Northwind Linked Data View</title>
+<para>Here is example of the basic Northwind Linked Data Views deployment. The sequence of operations is very common for adding SPARQL access to existing application.</para>
+<para>There exist few important questions to answer. Who should have access to data behind Linked Data View? Should someone have access to other sorts of RDF data but not to the new View? What are applications that should be interoperable with the new RDF data source? Are there any applications that produce similar data but that data sould be kept apart from data made by view? How to ensure that deployment the view will not cause problems for other applications?</para>
+<para>First of all, we decide whether the default web service endpoint should have access to the data 
+	in question. If it should then we have to grant SELECT privileges to the account "SPARQL" that is used 
+	for the default endpoint; if it should not but some custom edpoint should then grant to the owner 
+	account of that account. Granting access is less trivial that it is usual. On one hand, those who 
+	can make SQL SELECT statements on application's tables can also make SPARQL queries on Linked Data View 
+	over that tables, because it makes SQL inside. On the other hand, those who do not intend to query that 
+	data at all may get unexpected "permission denied" errors on queries that worked fine before 
+	adding an Linked Data View. If SPARQL compiler can not prove that the query can not access data from the view 
+	then it will generate SQL code that will access tables behind the view. In some cases permission 
+	problems should be resolved by creating Linked Data View in a separate 
+	<link linkend="rdfviewconfiguringrdfstorages">RDF storage</link>. In this example, data are public:</para>
 <programlisting><![CDATA[
 use DB;
 
@@ -46,7 +56,7 @@ access more than one installation of the application. If this is
 the case, use some fixed graph IRI, not necessarily starting with
 hostname at all; this is much more convenient for querying because you
 don't have to calculate the graph name in each query. With fixed graph
-in use, it is still possible to clone the RDF View to map to a unique
+in use, it is still possible to clone the Linked Data View to map to a unique
 graph as soon as the application become "public" and requires
 merging data from many installations.</para></note>
 
@@ -458,7 +468,9 @@ where (^{orders.}^.ShipCountry = ^{countries.}^.Name)
 }.
 ;
 ]]></programlisting>
-<para>The created RDF View is sufficient for querying relational data via SPARQL but not for accessing data by dereferencing IRIs of subjects. Making IRIs dereferenceable requires configuring HTTP server; that is explained in <link linkend="rdfsparqlexnpointnorthwindexample">second part of the example</link>.</para>
+<para>The created Linked Data View is sufficient for querying relational data via SPARQL but not for 
+	accessing data by dereferencing IRIs of subjects. Making IRIs dereferenceable requires configuring 
+	HTTP server; that is explained in <link linkend="rdfsparqlexnpointnorthwindexample">second part of the example</link>.</para>
 </sect2>
 <sect2 id="rdfviewsenterprbsm">
       <title>BSBM to RDF</title>
@@ -2448,7 +2460,7 @@ WHERE
 </sect2>
 <sect2 id="rdfviewsbusintmbr">
       <title>Musicbrainz to RDF</title>
-<para>The following code creates the Musicbrainz RDF Views Deployment and Demo Scripts:</para>
+<para>The following code creates the Musicbrainz Linked Data Views Deployment and Demo Scripts:</para>
 <programlisting><![CDATA[
 create text index on ZITGIST.MO.artist ("name") with key id;
 create text index on ZITGIST.MO.artistalias ("name") with key id;
@@ -3352,7 +3364,7 @@ DB.DBA.XML_SET_NS_DECL ('mbz', 'http://musibrainz.org/schemas/mbz#', 2);
 </sect2>
 <sect2 id="rdfviewsbusintods">
       <title>Virtuoso ODS to RDF</title>
-<para><emphasis>RDF View for ODS (the consolidated Graph)</emphasis></para>
+<para><emphasis>Linked Data View for ODS (the consolidated Graph)</emphasis></para>
 <programlisting><![CDATA[
 SPARQL drop quad map virtrdf:ODS_DS . ;
 
@@ -4876,5041 +4888,10 @@ DB.DBA.URLREWRITE_CREATE_RULELIST ('ods_rule_list1', 1,
 DB.DBA.XML_SET_NS_DECL ('ods', 'http://www.openlinksw.com/virtuoso/ods/', 2);
 ]]></programlisting>
 </sect2>
-<sect2 id="rdfviewsbusintoplweb">
-      <title>Oplweb to RDF</title>
-<programlisting><![CDATA[
--- Setup script for RDF view of OpenLink Product Portfolio version 2
---
-
-/*
- * This view is currently designed to SPECIFICALLY load on data.openlinksw.com. We recommend you
- * search for `openlinksw.com'  (as `http://' is sometimes encoded) and replace with either the default
- * URIQA macro or your own hostname as appropriate.
- */
-
--- views to get the codes out instead of the id's
----- in hindsight these should ALL have been handled with
----- proper IRI functions like the rest, oh well, no harm AFAIK
----- will know for next time or might even replace this later.
-DROP VIEW oplweb2.oplweb.product_formats_categories;
-
-CREATE VIEW oplweb2.oplweb.product_formats_categories (
-    product_cat_code, product_cat_id, product_format_code, product_format_id, product_family_id
-  ) as
-SELECT distinct
-  pc.product_cat_code,
-  pc.product_cat_id,
-  pf.product_format_code,
-  pf.product_format_id,
-  pc.product_family_id
-FROM
-  oplweb2.oplweb.product_category pc,
-  oplweb2.oplweb.product_format pf,
-  oplweb2.oplweb.product p
-WHERE
-  p.product_cat_id = pc.product_cat_id and
-  p.product_format_id = pf.product_format_id
-  AND EXISTS (
-	SELECT 1 FROM oplweb2.oplweb.component_archive ca
-	WHERE ca.product_id = p.product_id
-	)
-;
-
-
-DROP VIEW oplweb2.oplweb.product_with_code;
-
-CREATE VIEW oplweb2.oplweb.product_with_code as
-  SELECT p.*, pc.product_cat_code, pf.product_format_code
-  FROM
-  oplweb2.oplweb.product_category pc,
-  oplweb2.oplweb.product_format pf,
-  oplweb2.oplweb.product p
-WHERE
-  p.product_cat_id = pc.product_cat_id and
-  p.product_format_id = pf.product_format_id ;
-
-
-DROP VIEW oplweb2.oplweb.product_category_with_code;
-
-CREATE VIEW oplweb2.oplweb.product_category_with_code as
-  SELECT pc.*, pf.product_family_code
-  from
-  oplweb2.oplweb.product_category pc,
-  oplweb2.oplweb.product_family pf
-where
-  pc.product_family_id = pf.product_family_id ;
-
-
-DROP VIEW oplweb2.oplweb.product_family_features_with_code;
-
-CREATE VIEW oplweb2.oplweb.product_family_features_with_code as
-  SELECT a.*, b.product_family_code
-  from
-  oplweb2.oplweb.product_family_features a,
-  oplweb2.oplweb.product_family b
-where
-  a.product_family_id = b.product_family_id
-;
-
-DROP VIEW oplweb2.oplweb.product_format_features_with_code;
-
-CREATE VIEW oplweb2.oplweb.product_format_features_with_code as
-  SELECT a.*, b.product_format_code
-  from
-  oplweb2.oplweb.product_format_features a,
-  oplweb2.oplweb.product_format b
-where
-  a.product_format_id = b.product_format_id
-;
-
-DROP VIEW oplweb2.oplweb.product_category_features_with_code;
-
-CREATE VIEW oplweb2.oplweb.product_category_features_with_code as
-  SELECT a.*, b.product_cat_code
-  from
-  oplweb2.oplweb.product_category_features a,
-  oplweb2.oplweb.product_category b
-where
-  a.product_cat_id = b.product_cat_id
-;
-
-DROP VIEW oplweb2.oplweb.components_for_rdfs;
-
-CREATE VIEW oplweb2.oplweb.components_for_rdfs as
-  SELECT *, cast(filesize as varchar) as str_filesize
-  from
-  oplweb2.oplweb.components
-;
-
-
-DROP VIEW oplweb2.oplweb.product_release_with_family;
-
-CREATE VIEW oplweb2.oplweb.product_release_with_family as
-  SELECT a.*, b.opsys_family_id, c.dbms_family_id
-  from
-  oplweb2.oplweb.product_release a,
-  oplweb2.oplweb.opsys b,
-  oplweb2.oplweb.dbms_engine c
-where
-  a.opsys_name = b.opsys_name and
-  a.dbms_name = c.dbms_name
-;
-
-drop view oplweb2.oplweb.archive_coverage_osdb;
-
-create view oplweb2.oplweb.archive_coverage_osdb as
-	SELECT distinct
-	  pfam.product_family_id, pfam.product_family_code,
-	  p.product_format_id, pf.product_format_code,
-	  p.product_cat_id, pc.product_cat_code,
-	  p.product_id,
-	  ca.opsys_name,
-	  os.opsys_family_id,
-	  ca.dbms_name,
-	  db.dbms_family_id,
-	  pr.processor_name,
-	  pr.processor_mode_id,
-	  pr.processor_family_id
-	from
-	   oplweb2.oplweb.product p
-  join oplweb2.oplweb.product_category pc on (p.product_cat_id = pc.product_cat_id)
-  join oplweb2.oplweb.product_format pf on (p.product_format_id = pf.product_format_id)
-  join oplweb2.oplweb.product_family pfam on (pc.product_family_id = pfam.product_family_id)
-  join oplweb2.oplweb.component_archive ca on (ca.product_id = p.product_id)
-  join oplweb2.oplweb.opsys os on (os.opsys_name = ca.opsys_name)
-  join oplweb2.oplweb.dbms_engine db on (db.dbms_name = ca.dbms_name)
-  join oplweb2.oplweb.processors pr on (pr.processor_name = os.processor_name and pr.processor_mode_id = os.processor_mode_id)
-;
-
-GRANT SELECT ON oplweb2.oplweb.component_archive TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.component_archive_type TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.component_category TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.component_mode TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.component_type TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.components TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.components_for_rdfs TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.dbms_engine TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.dbms_family TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.download_location TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.download_protocol TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.download_partner TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.opsys TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.opsys_family TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.opsys_type TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.processor_family TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.processor_mode TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.processors TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_benefits TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_benefits_category TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_category TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_category_with_code TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_category_features TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_family TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_family_features TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_features TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_format TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_format_features TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_feature_category TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_release TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_release_features TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.vendor_category TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.vendor_category_family TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.vendors TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_formats_categories TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_with_code TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_family_features_with_code TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_format_features_with_code TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_category_features_with_code TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.product_release_with_family TO "SPARQL", "SPARQL_UPDATE";
-GRANT SELECT ON oplweb2.oplweb.archive_coverage_osdb TO "SPARQL", "SPARQL_UPDATE";
-
-
-drop index oplweb2_product_price_format_cat;
-
-create index oplweb2_product_price_format_cat on oplweb2.oplweb.product_price(product_cat_id, product_format_id, product_price_type_id);
-
-drop index oplweb2_product_discount_format_cat;
-
-create index oplweb2_product_discount_format_cat on oplweb2.oplweb.product_general_discount(product_cat_id, product_format_id, product_price_type_id);
-
-
-drop view oplweb2.DBA.license_model_type;
-
-create view oplweb2.DBA.license_model_type (
-	product_release_id, product_cat_id, product_format_id, product_id, product_price_type_id
-	)
-	as
-	SELECT distinct
-	product_release_id,
-	pp.product_cat_id, pp.product_format_id, product_id,
-	product_price_type_id
-	FROM
-	  oplweb2.oplweb.product_price pp,
-	  oplweb2.oplweb.product p
-	WHERE p.product_cat_id = pp.product_cat_id AND
-	p.product_format_id = pp.product_format_id
-	;
-
-grant SELECT on oplweb2.DBA.license_model_type to "SPARQL", "SPARQL_UPDATE";--, rdf;
-
-
-
-drop view oplweb2.DBA.license_model;
-
-create view oplweb2.DBA.license_model as
-  SELECT  distinct
-      product_release_id,
-      pc.product_cat_id,
-      pc.product_format_id,
-      pc.product_cat_code,
-      pc.product_format_code,
-      pc.product_id,
-      pp.opsys_family_id, pp.dbms_family_id,
-      replace(oo.opsys_family_name, ' ', '') as opsys_family_name,
-      replace(dd.dbms_family_name,  ' ', '') as dbms_family_name,
-      pp.opsys_type_id,
-      pp.product_price_type_id,
-	  pp.product_price_unit_type_id
-    from
-      oplweb2.oplweb.product_price pp,
-      oplweb2.oplweb.product_with_code pc, --category pc,
-      --oplweb2.oplweb.product_format pf,
-      oplweb2.oplweb.opsys os,
-      oplweb2.oplweb.dbms_engine dbe,
-      oplweb2.oplweb.dbms_family dd,
-      oplweb2.oplweb.opsys_family oo
-      --oplweb2.oplweb.product p
-    where
-      pp.product_format_id = pc.product_format_id and
-      pp.product_cat_id = pc.product_cat_id and
-      pp.opsys_family_id = oo.opsys_family_id and
-      pp.dbms_family_id = dd.dbms_family_id
-      --p.product_cat_id = pc.product_cat_id and
-      --p.product_format_id = pf.product_format_id and
-  ;
-
-grant SELECT on oplweb2.DBA.license_model to "SPARQL", "SPARQL_UPDATE";--, rdf;
-
-
-drop view oplweb2.DBA.license_model_units;
-
-create view oplweb2.DBA.license_model_units as
-  SELECT distinct
-      lm1.product_release_id,
-	  lm1.product_id,
-	  lm1.opsys_family_
-      pp.opsys_family_id, pp.dbms_family_id,
-      replace(oo.opsys_family_name, ' ', '') as opsys_family_name,
-      replace(dd.dbms_family_name,  ' ', '') as dbms_family_name,
-      pp.opsys_type_id, ot.short_description as opsys_type_code
-    from
-      oplweb2.oplweb.product_price pp,
-      oplweb2.oplweb.opsys_type ot,
-      oplweb2.oplweb.dbms_family dd,
-      oplweb2.oplweb.opsys_family oo
-    where
-      pp.opsys_type_id = ot.opsys_type_id and
-      pp.opsys_family_id = oo.opsys_family_id and
-      pp.dbms_family_id = dd.dbms_family_id
-      and
-      pp.product_release_id = '6.1'
-  ;
-
-grant SELECT on oplweb2.DBA.license_model_units to "SPARQL", "SPARQL_UPDATE";--, rdf;
-
-
-
-drop view oplweb2.DBA.product_general_discount_vc;
-
-create view oplweb2.DBA.product_general_discount_vc as
-  SELECT  distinct
-      product_release_id,
-      pgd.product_cat_id, pc.product_cat_code,
-      pgd.product_format_id, pc.product_format_code,
-	  pc.product_id,
-      pgd.opsys_family_id, pgd.dbms_family_id,
-      pgd.opsys_type_id,
-      product_discount_description,
-      product_price_type_id,
-      cast(unit_discount as varchar) as unit_discount,
-      discount_start,
-      discount_end,
-      discount_token
-    from
-      oplweb2.oplweb.product_general_discount pgd,
-      oplweb2.oplweb.product_with_code pc
-    where
-      pgd.product_format_id = pc.product_format_id and
-      pgd.product_cat_id = pc.product_cat_id
-  ;
-
-drop view oplweb2.DBA.product_price_varchar;
-
-create view oplweb2.DBA.product_price_varchar as
-  select
-      pp.product_price_id,
-      pp.product_release_id,
-      pp.product_cat_id, pc.product_cat_code,
-      pp.product_format_id, pf.product_format_code,
-      pp.opsys_family_id, pp.dbms_family_id,
-      replace(oo.opsys_family_name, ' ', '') as opsys_family_name,
-      replace(dd.dbms_family_name,  ' ', '') as dbms_family_name,
-      pp.opsys_type_id, ot.short_description as opsys_type_code,
-			pp.product_price_type_id,
-      pp.product_price_unit_type_id, cast(pp.unit_price as varchar) as unit_price,
-      pp.component_archive_available
-    from
-      oplweb2.oplweb.product_price pp,
-      oplweb2.oplweb.product_category pc,
-      oplweb2.oplweb.product_format pf,
-      oplweb2.oplweb.opsys_type ot,
-      oplweb2.oplweb.dbms_family dd,
-      oplweb2.oplweb.opsys_family oo
-    where
-      pp.product_format_id = pf.product_format_id and
-      pp.product_cat_id = pc.product_cat_id and
-      pp.opsys_type_id = ot.opsys_type_id and
-      pp.opsys_family_id = oo.opsys_family_id and
-      pp.dbms_family_id = dd.dbms_family_id
-      --and
-      --pp.product_release_id = '6.1'
-  ;
-
-grant SELECT on oplweb2.oplweb.product_price to "SPARQL", "SPARQL_UPDATE";--, rdf;
-grant SELECT on oplweb2.oplweb.product_price_type to "SPARQL", "SPARQL_UPDATE";--, rdf;
-grant SELECT on oplweb2.oplweb.product_price_unit_type to "SPARQL", "SPARQL_UPDATE";--, rdf;
-grant SELECT on oplweb2.DBA.product_general_discount_vc to "SPARQL", "SPARQL_UPDATE";--, rdf;
-grant SELECT on oplweb2.DBA.product_price_varchar to "SPARQL", "SPARQL_UPDATE";--, rdf;
-grant SELECT on oplweb2.DBA.license_model_type to "SPARQL", "SPARQL_UPDATE";--, rdf;
-
-
-
-DB.DBA.RDF_AUDIT_METADATA (1, '*');
---DB.DBA.RDF_AUDIT_METADATA (2, '*');
-
---sparql drop graph <http://www.openlinksw.com/dataspace/organization/openlink/ProductPortfolioOntology/1.0/>;
-
---possible previous graph now merging with this oplweb graph
-sparql drop graph <http://data.openlinksw.com/shop_pricing/>;
-
---others that have a dependency on this graph that may need kicking first
---sparql drop graph <http://data.openlinksw.com/customer/>;
---sparql drop graph <http://data.openlinksw.com/support/>;
---sparql drop graph <http://data.openlinksw.com/shop_pricing/>;
-
-SPARQL drop graph <http://www.openlinksw.com/schemas/oplweb#> ;
-
-SPARQL drop graph <http://www.openlinksw.com/dataspace/organization/openlink/oplweb#> ;
-SPARQL drop graph <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/> ;
-
-
--- should now use <http://www.openlinksw.com/dataspace/organization/openlink#this>
-
-SPARQL drop quad map virtrdf:product_portfolio ;
-
---only use this if you really really mean it, it will totally nuke your RDF data, useful on
---test boxes in a bit of jam (hasn't happened to me for a while now)
---rdf_global_reset();
-
---utility for stripping url killing stuff from friendly strings used as ids
-create function oplweb2.oplweb.FIXUP4URI (in _string varchar)
-	returns varchar
-	{
-	  declare _s varchar;
-      _s := replace (_string, ' ', '');
-      _s := replace (_s, '&', '_');
-      _s := replace (_s, '/', '');
-      return _s;
-	}
-	;
-
---URI-IRI mapping functions
-create function oplweb2.oplweb.DOWNLOAD_LOCATION_URI (in uri varchar)
-returns varchar
-{
-  return sprintf('http://data.openlinksw.com/oplweb/download_location/%s#this',
-  	replace(uri, 'http://', ''));
-};
-
-create function oplweb2.oplweb.DOWNLOAD_LOCATION_URI_INVERSE (in dl_iri varchar)
-returns varchar
-{
-  declare parts any;
-
-  parts := sprintf_inverse(dl_iri,
-  	'http://data.openlinksw.com/oplweb/download_location/%s#this', 1);
-  if (parts is not null)
-    {
-      return sprintf('http://%s', parts[0]);
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.DOWNLOAD_LOCATION_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.DOWNLOAD_LOCATION_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.DBMS_FAMILY_URI (in _family_id integer)
-returns varchar
-{
-  declare _family_string varchar;
-  SELECT dbms_family_name into _family_string
-    FROM oplweb2.oplweb.dbms_family
-    WHERE dbms_family_id = _family_id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/dbms_family/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_family_string));
-};
-
-create function oplweb2.oplweb.DBMS_FAMILY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _family_id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/dbms_family/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 dbms_family_id into _family_id FROM oplweb2.oplweb.dbms_family
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(dbms_family_name)) = lower(parts[0]);
-      return _family_id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.DBMS_FAMILY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.DBMS_FAMILY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.COMPONENT_CATEGORY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.component_category
-    WHERE component_category_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/component_category/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.COMPONENT_CATEGORY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/component_category/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 component_category_id into _id FROM oplweb2.oplweb.component_category
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_CATEGORY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_CATEGORY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.COMPONENT_MODE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.component_mode
-    WHERE component_mode_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/component_mode/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.COMPONENT_MODE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/component_mode/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 component_mode_id into _id FROM oplweb2.oplweb.component_mode
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_MODE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_MODE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.COMPONENT_TYPE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.component_type
-    WHERE component_type_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/component_type/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.COMPONENT_TYPE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/component_type/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 component_type_id into _id FROM oplweb2.oplweb.component_type
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_TYPE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_TYPE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-
-create function oplweb2.oplweb.COMPONENT_ARCHIVE_TYPE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT component_archive_short_name into _string
-    FROM oplweb2.oplweb.component_archive_type
-    WHERE component_archive_type_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/component_archive_type/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.COMPONENT_ARCHIVE_TYPE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/component_archive_type/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 component_archive_type_id into _id FROM oplweb2.oplweb.component_archive_type
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(component_archive_short_name)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_ARCHIVE_TYPE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.COMPONENT_ARCHIVE_TYPE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-
-create function oplweb2.oplweb.FEATURE_BENEFIT_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT product_benefit_desc into _string
-    FROM oplweb2.oplweb.product_benefits
-    WHERE product_benefit_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/feature_benefit/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.FEATURE_BENEFIT_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/feature_benefit/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_benefit_id into _id FROM oplweb2.oplweb.product_benefits
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(product_benefit_desc)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.FEATURE_BENEFIT_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.FEATURE_BENEFIT_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-
-create function oplweb2.oplweb.OPSYS_FAMILY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT opsys_family_name into _string
-    FROM oplweb2.oplweb.opsys_family
-    WHERE opsys_family_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/opsys_family/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.OPSYS_FAMILY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/opsys_family/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 opsys_family_id into _id FROM oplweb2.oplweb.opsys_family
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(opsys_family_name)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.OPSYS_FAMILY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.OPSYS_FAMILY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-
-create function oplweb2.oplweb.OPSYS_TYPE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.opsys_type
-    WHERE opsys_type_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/opsys_type/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.OPSYS_TYPE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/opsys_type/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT TOP 1 opsys_type_id into _id FROM oplweb2.oplweb.opsys_type
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.OPSYS_TYPE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.OPSYS_TYPE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PROCESSOR_FAMILY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT processor_family_name into _string
-    FROM oplweb2.oplweb.processor_family
-    WHERE processor_family_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/processor_family/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PROCESSOR_FAMILY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/processor_family/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 processor_family_id into _id FROM oplweb2.oplweb.processor_family
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(processor_family_name)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PROCESSOR_FAMILY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PROCESSOR_FAMILY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
---FIXME might have to do something with possible & symbols
-create function oplweb2.oplweb.PROCESSOR_MODE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT processor_mode_name into _string
-    FROM oplweb2.oplweb.processor_mode
-    where processor_mode_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/processor_mode/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PROCESSOR_MODE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/processor_mode/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 processor_mode_id into _id FROM oplweb2.oplweb.processor_mode
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(processor_mode_name)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PROCESSOR_MODE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PROCESSOR_MODE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_CATEGORY_FEATURE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.product_category_features
-    WHERE product_category_feature_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_category_feature/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_CATEGORY_FEATURE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_category_feature/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_category_feature_id into _id FROM oplweb2.oplweb.product_category_features
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_CATEGORY_FEATURE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_CATEGORY_FEATURE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_FAMILY_FEATURE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.product_family_features
-    WHERE product_family_feature_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_family_feature/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_FAMILY_FEATURE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_family_feature/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_family_feature_id into _id FROM oplweb2.oplweb.product_family_features
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FAMILY_FEATURE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FAMILY_FEATURE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_FEATURE_CATEGORY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_desc into _string
-    FROM oplweb2.oplweb.product_feature_category
-    WHERE product_feature_category_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_feature_category/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_FEATURE_CATEGORY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_feature_category/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_feature_category_id into _id FROM oplweb2.oplweb.product_feature_category
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_desc)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FEATURE_CATEGORY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FEATURE_CATEGORY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_FEATURE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.product_features
-    WHERE product_feature_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_feature/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_FEATURE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_feature/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_feature_id into _id FROM oplweb2.oplweb.product_features
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FEATURE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FEATURE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_FORMAT_FEATURE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.product_format_features
-    WHERE product_format_feature_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_format_feature/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_FORMAT_FEATURE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_format_feature/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_format_feature_id into _id FROM oplweb2.oplweb.product_format_features
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FORMAT_FEATURE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_FORMAT_FEATURE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_RELEASE_FEATURE_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT short_description into _string
-    FROM oplweb2.oplweb.product_release_features
-    WHERE product_release_feature_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_release_feature/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_RELEASE_FEATURE_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_release_feature/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_release_feature_id into _id FROM oplweb2.oplweb.product_release_features
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(short_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_RELEASE_FEATURE_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_RELEASE_FEATURE_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_BENEFIT_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT product_benefit_desc into _string
-    FROM oplweb2.oplweb.product_benefits
-    WHERE product_benefit_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_benefit/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_BENEFIT_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_benefit/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_benefit_id into _id FROM oplweb2.oplweb.product_benefits
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(product_benefit_desc)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_BENEFIT_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_BENEFIT_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.PRODUCT_BENEFIT_CATEGORY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT description into _string
-    FROM oplweb2.oplweb.product_benefits_category
-    WHERE product_benefit_category_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/product_benefit_category/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.PRODUCT_BENEFIT_CATEGORY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/product_benefit_category/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 product_benefit_category_id into _id FROM oplweb2.oplweb.product_benefits_category
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_BENEFIT_CATEGORY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.PRODUCT_BENEFIT_CATEGORY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.VENDOR_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT vendor_name into _string
-    FROM oplweb2.oplweb.vendors
-    where vendor_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/vendor/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.VENDOR_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/vendor/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 vendor_id into _id FROM oplweb2.oplweb.vendors
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(vendor_name)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.VENDOR_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.VENDOR_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.VENDOR_CATEGORY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT vendor_category_description into _string
-    FROM oplweb2.oplweb.vendor_category
-    where vendor_category_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/vendor_category/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.VENDOR_CATEGORY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/vendor_category/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 vendor_category_id into _id FROM oplweb2.oplweb.vendor_category
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(vendor_category_description)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.VENDOR_CATEGORY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.VENDOR_CATEGORY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.VENDOR_CATEGORY_FAMILY_URI (in _id integer)
-returns varchar
-{
-  declare _string varchar;
-  SELECT vendor_category_family_desc into _string
-    FROM oplweb2.oplweb.vendor_category_family
-    where vendor_category_family_id = _id ;
-
-  return sprintf('http://data.openlinksw.com/oplweb/vendor_category_family/%s#this',
-  	oplweb2.oplweb.FIXUP4URI(_string));
-};
-
-create function oplweb2.oplweb.VENDOR_CATEGORY_FAMILY_URI_INVERSE (in _iri varchar)
-returns integer
-{
-  declare parts any;
-  declare _id integer;
-
-  parts := sprintf_inverse(_iri,
-  	'http://data.openlinksw.com/oplweb/vendor_category_family/%s#this', 1);
-  if (parts is not null)
-    {
-      declare exit handler for not found return null;
-      SELECT top 1 vendor_category_family_id into _id FROM oplweb2.oplweb.vendor_category_family
-        WHERE lower(oplweb2.oplweb.FIXUP4URI(vendor_category_family_desc)) = lower(parts[0]);
-      return _id;
-    }
-  return NULL;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.VENDOR_CATEGORY_FAMILY_URI TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON oplweb2.oplweb.VENDOR_CATEGORY_FAMILY_URI_INVERSE TO "SPARQL", "SPARQL_UPDATE";
-
-
-
-
-
-create function oplweb2.oplweb.LIT_PRODUCT_RELEASE_LABEL (
-	in _product_id varchar, in _id integer, in _opsys_name varchar, in _dbms_name varchar
-	)
-returns varchar
-{
-  declare _string varchar;
-  SELECT 'OpenLink ' || poduct_description || ' (Release ' || product_release_id || ') on ' || commercial_name into _string
-    FROM oplweb2.oplweb.product_release pr,
-      oplweb2.oplweb.product p,
-      oplweb2.oplweb.opsys o
-    where
-      p.product_id = pr.product_id and
-      o.opsys_name = pr.opsys_name and
-      pr.product_release_id = _id and
-      pr.product_id = _product_id and
-      pr.opsys_name = _opsys_name and
-      pr.dbms_name = _dbms_name ;
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LIT_PRODUCT_RELEASE_LABEL TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LIT_FORMAT_CAT_LABEL (
-	in _format integer, in _cat integer
-	)
-returns varchar
-{
-  declare _string varchar;
-  SELECT top 1 'OpenLink ' || cast(product_format_description as varchar) || ' ' || cast(product_category_description as varchar) into _string
-    from
-      oplweb2.oplweb.product_formats_categories fc,
-      oplweb2.oplweb.product_format f,
-      oplweb2.oplweb.product_category c
-    where
-fc.product_format_id = f.product_format_id and
-fc.product_cat_id = c.product_cat_id and
-    fc.product_format_id = _format and
-    fc.product_cat_id = _cat;
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LIT_FORMAT_CAT_LABEL TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_openlink_logo (in _code varchar)
-returns varchar
-{
-  declare _string varchar;
-  SELECT top 1 product_family_logo_url into _string
-    FROM oplweb2.oplweb.product_family
-    WHERE product_family_code = _code;
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_openlink_logo TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_homepage (in _code varchar)
-returns varchar
-{
-  declare _string varchar;
-  SELECT top 1 product_family_homepage into _string
-    FROM oplweb2.oplweb.product_family
-    WHERE product_family_code = _code;
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_homepage TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_opsys_icon (in _id integer)
-returns varchar
-{
-  declare _string varchar; _string := '';
-  SELECT top 1 opsys_icon_name into _string
-    FROM oplweb2.oplweb.opsys_family
-    where opsys_family_id = _id;
-
-  _string := 'http://download.openlinksw.com/download/images/'||_string;
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_opsys_icon TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_to_shop (
-	in release_id varchar,
-	in product_id varchar,
-	in opsys varchar,
-	in dbms varchar
-	)
-returns varchar
-{
-  declare _string varchar; _string := '';
-  declare _cat, _format, _prod varchar;
-
-  _prod := product_id;
-
-  SELECT top 1 cast(product_cat_id as varchar), cast(product_format_id as varchar)
-      into _cat, _format
-    FROM oplweb2.oplweb.product p
-    WHERE p.product_id = _prod;
-
-  _string := sprintf(
-	'https://shop.openlinksw.com/?product_release_id=%s&product=%s&product_cat=%V&product_format=%V&os=%s&db=%s&buyme=yes',
-	release_id, product_id, _cat, _format, opsys, dbms
-	);
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_to_shop TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_license_model_type (
-		in _product_price_type_id integer
-	)
-returns varchar
-{
-  declare _string varchar; _string := '';
-
-  SELECT top 1 product_price_type_description into _string FROM oplweb2.oplweb.product_price_type
-    WHERE product_price_type_id = _product_price_type_id;
-
-  return _string || ' License';
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_license_model_type TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_license_model_explain (
-		in _product_price_type_id integer
-	)
-returns varchar
-{
-  declare _string varchar; _string := '';
-
-  SELECT top 1 product_price_type_long_description into _string FROM oplweb2.oplweb.product_price_type
-    WHERE product_price_type_id = _product_price_type_id;
-
-  return _string;
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_license_model_explain TO "SPARQL", "SPARQL_UPDATE";
-
-
-create function oplweb2.oplweb.LITRDF_shop_sample (
-	in release_id varchar,
-	in product_id varchar,
-	in opsys varchar,
-	in dbms varchar
-	)
-returns varchar
-{
-  declare _string varchar; _string := '';
-  declare _cat, _format, _prod, _pricetype varchar;
-
-  _prod := product_id;
-
-  SELECT top 1 cast(product_cat_id as varchar), cast(product_format_id as varchar), cast(product_price_type_id as varchar)
-      into _cat, _format, _pricetype
-    FROM oplweb2.DBA.license_model p, oplweb2.oplweb.opsys o, oplweb2.oplweb.dbms_engine e
-    WHERE p.product_id = _prod and product_release_id = release_id and o.opsys_name = opsys and e.dbms_name = dbms
-      and p.dbms_family_id = e.dbms_family_id and o.opsys_family_id = p.opsys_family_id;
-
-  _string := sprintf(
-	'https://shop.openlinksw.com/price_calc.vsp?release=%s&cat=%V&format=%V&os=%s&db=%s&lictype=%V',
-	release_id, _cat, _format, opsys, dbms, _pricetype
-	);
-
-  return http_client(_string);
-};
-
-GRANT EXECUTE ON oplweb2.oplweb.LITRDF_shop_sample TO "SPARQL", "SPARQL_UPDATE";
-
-
--- $Id: rdfviewssamples.xml,v 1.1.2.1 2010/10/07 12:45:00 source Exp $
--- Setup script for RDF view of OpenLink Product Portfolio version 2
---
-
---
--- This view is currently designed to SPECIFICALLY load on data.openlinksw.com. The default URI macro has NOT
--- been used here because it makes no sense on the target box which is actually my.usnet.private:8891 or
--- something similar. If you want to use this view on another box, a simple search-replace should do the trick,
--- but search-replace just`data.openlinksw.com' because http:// is sometimes encoded and you would miss it.
---
---
-
-
-
-SPARQL drop quad map virtrdf:product_portfolio2 ;
-SPARQL drop quad map virtrdf:product_portfolio ;
-
-SPARQL
-
-prefix opl: <http://www.openlinksw.com/schemas/oplweb#>
-
-drop iri class opl:DownloadLocation .
-drop iri class opl:ComponentCategory .
-drop iri class opl:Component .
-drop iri class opl:ComponentArchive .
-drop iri class opl:ComponentArchiveType .
-drop iri class opl:ComponentCategory .
-drop iri class opl:ComponentMode .
-drop iri class opl:ComponentType .
-drop iri class opl:DbmsEngine .
-drop iri class opl:DbmsFamily .
-drop iri class opl:DownloadProtocol .
-drop iri class opl:DownloadPartner .
-drop iri class opl:FeatureBenefit .
-drop iri class opl:Opsys .
-drop iri class opl:OpsysFamily .
-drop iri class opl:OpsysType .
-drop iri class opl:Processor .
-drop iri class opl:ProcessorFamily .
-drop iri class opl:ProcessorMode .
-drop iri class opl:ProductRelease .
-drop iri class opl:Product .
-drop iri class opl:ProductCategory .
-drop iri class opl:ProductCategoryFeature .
-drop iri class opl:ProductPortfolio .
-drop iri class opl:ProductFamily .
-drop iri class opl:ProductFamilyFeature .
-drop iri class opl:ProductFeatureCategory .
-drop iri class opl:ProductFeature .
-drop iri class opl:ProductFormat .
-drop iri class opl:ProductFormatCategory .
-drop iri class opl:ProductFormatFeature .
-drop iri class opl:ProductReleaseFeature .
-drop iri class opl:ProductBenefit .
-drop iri class opl:ProductBenefitCategory .
-drop iri class opl:Vendor .
-drop iri class opl:VendorCategory .
-drop iri class opl:VendorCategoryFamily .
-drop iri class opl:PriceType .
-drop iri class opl:PriceUnitType .
-drop iri class opl:PriceUnitIncrementalDiscount .
-drop iri class opl:ProductPrice .
-drop iri class opl:LicenseType .
-drop iri class opl:LicenseModel .
-drop iri class opl:LicenseClass .
-drop iri class opl:Discount .
-drop literal class opl:lit_product_release_label .
-drop literal class opl:lit_format_cat_label .
-drop literal class opl:lit_openlink_logo .
-drop iri class opl:lit_openlink_logo .
-drop literal class opl:lit_homepage .
-drop iri class opl:lit_homepage .
-drop literal class opl:lit_opsys_icon .
-drop iri class opl:lit_opsys_icon .
-drop literal class opl:lit_to_shop .
-drop iri class opl:lit_to_shop .
-drop literal class opl:lit_license_model_type .
-drop literal class opl:lit_license_model_explain .
-drop literal class opl:lit_shop_sample .
-drop literal class opl:lit_wikipedia_to_dbpedia .
-drop iri class opl:lit_wikipedia_to_dbpedia .
-drop literal class opl:lit_to_string .
-drop iri class opl:wwwsitefamily .
-drop iri class opl:wwwsiteformat .
-drop iri class opl:wwwsitecategory .
-drop iri class opl:wwwsiteproduct .
-;
-
-DB.DBA.RDF_AUDIT_METADATA (1, '*');
-
-
-SPARQL
-
-prefix opl: <http://www.openlinksw.com/schemas/oplweb#>
-
-create iri class opl:Component "http://data.openlinksw.com/oplweb/component/%s#this"
-	(in component_name varchar not null) .
-
-create iri class opl:ComponentArchive "http://data.openlinksw.com/oplweb/component_archive/%s#this"
-	(in component_archive_name varchar not null) .
-
-create iri class opl:ComponentArchiveType using
-	function oplweb2.oplweb.COMPONENT_CATEGORY_URI (in _id integer not null)
-		returns varchar,
-	function oplweb2.oplweb.COMPONENT_CATEGORY_URI_INVERSE (in _iri varchar)
-		returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/component_archive_type/%s#this' ).
-
-
-create iri class opl:ComponentCategory using
-	function oplweb2.oplweb.COMPONENT_CATEGORY_URI (in _id integer not null)
-		returns varchar,
-	function oplweb2.oplweb.COMPONENT_CATEGORY_URI_INVERSE (in _iri varchar)
-		returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/component_category/%s#this' ).
-
-create iri class opl:ComponentMode using
-	function oplweb2.oplweb.COMPONENT_MODE_URI (in _id integer not null)
-		returns varchar,
-	function oplweb2.oplweb.COMPONENT_MODE_URI_INVERSE (in _iri varchar)
-		returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/component_mode/%s#this' ).
-
-create iri class opl:ComponentType using
-	function oplweb2.oplweb.COMPONENT_TYPE_URI (in _id integer not null)
-		returns varchar,
-	function oplweb2.oplweb.COMPONENT_TYPE_URI_INVERSE (in _iri varchar)
-		returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/component_type/%s#this' ).
-
-create iri class opl:DbmsFamily using
-	function oplweb2.oplweb.DBMS_FAMILY_URI (in _family_id integer not null)
-		returns varchar,
-	function oplweb2.oplweb.DBMS_FAMILY_URI_INVERSE (in _iri varchar)
-		returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/dbms_family/%s#this' ).
-
-create iri class opl:DbmsEngine "http://data.openlinksw.com/oplweb/dbms_engine/%s#this"
-	(in dbms_name varchar not null) .
-
-create iri class opl:DownloadLocation using
-	function oplweb2.oplweb.DOWNLOAD_LOCATION_URI (in uri varchar not null)
-		returns varchar,
-	function oplweb2.oplweb.DOWNLOAD_LOCATION_URI_INVERSE (in dl_iri varchar)
-		returns varchar
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/download_location/%s#this' ).
-
-create iri class opl:DownloadProtocol "http://data.openlinksw.com/oplweb/download_protocol/%s#this"
-	(in protocol_name varchar not null) .
-
-create iri class opl:DownloadPartner "http://data.openlinksw.com/oplweb/download_partner/%s/%s#this"
-	(
-	  in host_name varchar not null,
-	  in domain_name varchar not null
-	) .
-
-create iri class opl:FeatureBenefit using
-  function oplweb2.oplweb.FEATURE_BENEFIT_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.FEATURE_BENEFIT_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/feature_benefit/%s#this' ).
-
-create iri class opl:Opsys "http://data.openlinksw.com/oplweb/opsys/%s#this"
-	(in opsys_name varchar not null) .
-
-create iri class opl:OpsysFamily 	using
-  function oplweb2.oplweb.OPSYS_FAMILY_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.OPSYS_FAMILY_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/opsys_family/%s#this' ).
-
-create iri class opl:OpsysType 			using
-  function oplweb2.oplweb.OPSYS_TYPE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.OPSYS_TYPE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/opsys_type/%s#this' ).
-
-create iri class opl:Processor "http://data.openlinksw.com/oplweb/processor/%s/%d#this"
-	(in processor_name varchar not null, in processor_mode_id integer not null) .
-
-create iri class opl:ProcessorFamily 	using
-  function oplweb2.oplweb.PROCESSOR_FAMILY_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PROCESSOR_FAMILY_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/processor_family/%s#this' ).
-
-create iri class opl:ProcessorMode 			using
-  function oplweb2.oplweb.PROCESSOR_MODE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PROCESSOR_MODE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/processor_mode/%s#this' ).
-
-create iri class opl:Product "http://data.openlinksw.com/oplweb/product/%s#this"
-	(in product_id varchar not null) .
-
-create iri class opl:ProductCategory "http://data.openlinksw.com/oplweb/product_category/%s#this"
-	(in product_cat_code varchar not null) .
-
-create iri class opl:ProductCategoryFeature 	using
-  function oplweb2.oplweb.PRODUCT_CATEGORY_FEATURE_URI (in _id integer not null) returns varchar,
-		function oplweb2.oplweb.PRODUCT_CATEGORY_FEATURE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_category_feature/%s#this' ).
-
-create iri class opl:ProductPortfolio "http://data.openlinksw.com/oplweb/portfolio/%s#this"
-	(in x varchar not null) .
-
-create iri class opl:ProductFamily "http://data.openlinksw.com/oplweb/product_family/%s#this"
-	(in product_family_code varchar not null) .
-
-create iri class opl:ProductFamilyFeature 	using
-  function oplweb2.oplweb.PRODUCT_FAMILY_FEATURE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_FAMILY_FEATURE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_family_feature/%s#this' ).
-
-create iri class opl:ProductFeatureCategory 			using
-  function oplweb2.oplweb.PRODUCT_FEATURE_CATEGORY_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_FEATURE_CATEGORY_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_feature_category/%s#this' ).
-
-create iri class opl:ProductFeature 					using
-  function oplweb2.oplweb.PRODUCT_FEATURE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_FEATURE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_feature/%s#this' ).
-
-create iri class opl:ProductFormat "http://data.openlinksw.com/oplweb/product_format/%s#this"
-	(in product_format_code varchar not null) .
-
-create iri class opl:ProductFormatCategory "http://data.openlinksw.com/oplweb/product_format_category/%s/%s#this"
-	(in product_format_code varchar not null, in product_cat_code varchar not null) .
-
-create iri class opl:ProductFormatFeature 	using
-  function oplweb2.oplweb.PRODUCT_FORMAT_FEATURE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_FORMAT_FEATURE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_format_feature/%s#this' ).
-
-create iri class opl:ProductReleaseFeature 			using
-  function oplweb2.oplweb.PRODUCT_RELEASE_FEATURE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_RELEASE_FEATURE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_release_feature/%s#this' ).
-
-create iri class opl:ProductBenefit 					using
-  function oplweb2.oplweb.PRODUCT_BENEFIT_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_BENEFIT_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_benefit/%s#this' ).
-
-create iri class opl:ProductBenefitCategory 							using
-  function oplweb2.oplweb.PRODUCT_BENEFIT_CATEGORY_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.PRODUCT_BENEFIT_CATEGORY_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/product_benefit_category/%s#this' ).
-
-create iri class opl:ProductRelease "http://data.openlinksw.com/oplweb/product_release/%s/%s/%s/%s#this"
-	(
-	 in product_id varchar not null,
-	 in product_release_id varchar not null,
-	 in opsys_name varchar not null,
-	 in dbms_name varchar not null
-	) .
-
-create iri class opl:Vendor 	using
-  function oplweb2.oplweb.VENDOR_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.VENDOR_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/vendor/%s#this' ).
-
-create iri class opl:VendorCategory 			using
-  function oplweb2.oplweb.VENDOR_CATEGORY_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.VENDOR_CATEGORY_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/vendor_category/%s#this' ).
-
-create iri class opl:VendorCategoryFamily 					using
-  function oplweb2.oplweb.VENDOR_CATEGORY_FAMILY_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.VENDOR_CATEGORY_FAMILY_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/vendor_category_family/%s#this' ).
-
-create iri class opl:PriceType "http://data.openlinksw.com/oplweb/price_type/%d#this"
-    (in product_price_type_id integer not null) .
-
-create iri class opl:LicenseType using
-  function oplweb2.oplweb.LICENSE_MODEL_TYPE_URI (in _id integer not null) returns varchar,
-  function oplweb2.oplweb.LICENSE_MODEL_TYPE_URI_INVERSE (in _iri varchar) returns integer
-	option (bijection, returns 'http://data.openlinksw.com/oplweb/license_type/%s#this' ).
-
-create iri class opl:PriceUnitType "http://data.openlinksw.com/oplweb/price_unit_type/%s_%s_%d_%d_%d_%s#this"
-    (
-    in product_release_id varchar not null,
-    in product_id varchar not null,
-    in opsys_family_id integer not null,
-    in dbms_family_id integer not null,
-    in product_price_type_id integer not null,
-	in product_price_unit_type_id varchar not null) .
-
-create iri class opl:PriceUnitIncrementalDiscount "http://data.openlinksw.com/oplweb/price_unit_discount/%s_%s_%d_%d_%d_%s#this"
-    (
-    in product_release_id varchar not null,
-    in product_id varchar not null,
-    in opsys_family_id integer not null,
-    in dbms_family_id integer not null,
-    in product_price_type_id integer not null,
-	in product_price_unit_type_id varchar not null) .
-
-create iri class opl:ProductPrice "http://data.openlinksw.com/oplweb/product_price/%d#this"
-    (in product_price_id integer not null) .
-
-
-create iri class opl:LicenseModel "http://data.openlinksw.com/oplweb/license_model/%s_%s_%d_%d_%d#this"
-    (
-      in product_release_id varchar not null,
-      in product_id varchar not null,
-      in opsys_family_id integer not null,
-      in dbms_family_id integer not null,
-	  in product_price_type_id integer not null
-    ) .
-
-create iri class opl:Discount "http://data.openlinksw.com/oplweb/discount/%s/%d/%s/%d/%d/%d#this"
-    (
-      in product_release_id varchar not null,
-      in opsys_type_id integer not null,
-      in product_id varchar not null,
-      in opsys_family_id integer not null,
-      in dbms_family_id integer not null,
-      in product_price_type_id integer not null
-    ) .
-
-create iri class opl:wwwsitefamily "http://%s.openlinksw.com/"
-    (
-      in product_family_code varchar not null
-    ) .
-
-create iri class opl:wwwsitecategory "http://%s.openlinksw.com/%s/"
-    (
-      in product_family_code varchar not null,
-      in product_category_code varchar not null
-    ) .
-
-create iri class opl:wwwsiteformat "http://%s.openlinksw.com/%s/%s/"
-    (
-      in product_family_code varchar not null,
-      in product_category_code varchar not null,
-      in product_format_code varchar not null
-    ) .
-
-create iri class opl:Uri "%s"
-    ( in uri varchar not null
-		) .
-
-create literal class opl:lit_product_release_label using
-	function oplweb2.oplweb.LIT_PRODUCT_RELEASE_LABEL(
-		in _product_id varchar, in _id integer, in _opsys_name varchar, in _dbms_name varchar
-		)
-	returns varchar .
-
-create literal class opl:lit_format_cat_label using
-	function oplweb2.oplweb.LIT_FORMAT_CAT_LABEL(
-		in _format integer, in _cat integer
-		)
-	returns varchar .
-
-create iri class opl:lit_openlink_logo using
-  function oplweb2.oplweb.LITRDF_openlink_logo(
-    in _code varchar
-  )
-	returns varchar .
-
-create iri class opl:lit_homepage using
-  function oplweb2.oplweb.LITRDF_homepage(
-    in _code varchar
-  )
-	returns varchar .
-
-create iri class opl:lit_opsys_icon using
-  function oplweb2.oplweb.LITRDF_opsys_icon(
-    in _id integer
-  )
-	returns varchar .
-
-create iri class opl:lit_to_shop using
-  function oplweb2.oplweb.LITRDF_to_shop(
-	in release_id varchar,
-	in product_id varchar,
-	in opsys varchar,
-	in dbms varchar
-  )
-  returns varchar .
-
-create literal class opl:lit_license_model_type using
-	function oplweb2.oplweb.LITRDF_license_model_type (
-		in _product_price_type_id integer
-	)
-	returns varchar .
-
-create literal class opl:lit_license_model_explain using
-	function oplweb2.oplweb.LITRDF_license_model_explain (
-		in _product_price_type_id integer
-	)
-	returns varchar .
-
-create literal class opl:lit_shop_sample using
-	function oplweb2.oplweb.LITRDF_shop_sample (
-	  in release_id varchar,
-	  in product_id varchar,
-	  in opsys varchar,
-  	  in dbms varchar
-	)
-	returns varchar .
-
-create iri class opl:lit_wikipedia_to_dbpedia using
-	function oplweb2.oplweb.LITRDF_wikipedia_to_dbpedia (
-	  in wikipedia_url varchar
-	)
-	returns varchar .
-
-create literal class opl:lit_to_string using
-	function oplweb2.oplweb.LITRDF_to_string (
-	  in _s varchar
-	)
-	returns varchar .
-
-create iri class opl:wwwsiteproduct using
-  function oplweb2.oplweb.wwwsiteproduct_URI (in _id varchar not null) returns varchar,
-  function oplweb2.oplweb.wwwsiteproduct_URI_INVERSE (in _iri varchar) returns varchar
-  .
-
-
-make opl:ProductCategory 	subclass of opl:ProductFamily .
-make opl:Product 			subclass of opl:ProductCategory .
-make opl:Product 			subclass of opl:ProductFormat .
-make opl:ProductRelease		subclass of opl:Product .
-make opl:Opsys		 		subclass of opl:OpsysFamily .
-make opl:DbmsEngine		 	subclass of opl:DbmsFamily .
-
-;
-
-
-
-DB.DBA.RDF_AUDIT_METADATA (1, '*');
-
-
-SPARQL
-prefix opl: <http://www.openlinksw.com/schemas/oplweb#>
-prefix dc: <http://purl.org/dc/terms#>
-prefix oplsioc: <http://www.openlinksw.com/schemas/oplsioc#>
-prefix sioc: <http://rdfs.org/sioc/ns#>
-prefix foaf: <http://xmlns.com/foaf/0.1/>
-prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
-prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
-prefix oplds: <http://www.openlinksw.com/dataspace/organization/openlink#>
-prefix owl: <http://www.w3.org/2002/07/owl#>
-prefix umbel: <http://umbel.org/umbel/sc/>
-prefix gr: <http://purl.org/goodrelations/v1#>
-
-alter quad storage virtrdf:DefaultQuadStorage
-FROM oplweb2.oplweb.component_archive as component_archive_tbl
-FROM oplweb2.oplweb.component_archive_type as component_archive_type_tbl
-FROM oplweb2.oplweb.component_category as component_category_tbl text literal component_category_long_description
-FROM oplweb2.oplweb.component_mode as component_mode_tbl
-FROM oplweb2.oplweb.component_type as component_type_tbl
-FROM oplweb2.oplweb.components_for_rdfs as components_tbl
-FROM oplweb2.oplweb.dbms_engine as dbms_engine_tbl
-FROM oplweb2.oplweb.dbms_family as dbms_family_tbl
-FROM oplweb2.oplweb.download_location as download_location_tbl
-FROM oplweb2.oplweb.download_protocol as download_protocol_tbl
-FROM oplweb2.oplweb.download_partner as download_partner_tbl
-FROM oplweb2.oplweb.opsys as opsys_tbl
-FROM oplweb2.oplweb.opsys_family as opsys_family_tbl
-FROM oplweb2.oplweb.opsys_type as opsys_type_tbl
-FROM oplweb2.oplweb.processor_family as processor_family_tbl
-FROM oplweb2.oplweb.processor_mode as processor_mode_tbl
-FROM oplweb2.oplweb.processors as processors_tbl
-FROM oplweb2.oplweb.product as product_tbl text literal long_description
-FROM oplweb2.oplweb.product_benefits as product_benefits_tbl text literal product_benefit_explanation
-FROM oplweb2.oplweb.product_benefits_category as product_benefits_category_tbl
-FROM oplweb2.oplweb.product_category as product_category_tbl
-FROM oplweb2.oplweb.product_category_features_with_code as product_category_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_family as product_family_tbl
-FROM oplweb2.oplweb.product_family as product_family_tbl_2
-FROM oplweb2.oplweb.product_family_features_with_code as product_family_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_features as product_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_feature_category as product_feature_category_tbl text literal description
-FROM oplweb2.oplweb.product_format_features_with_code as product_format_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_release_features as product_release_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_release_with_family as product_release_tbl
-FROM oplweb2.oplweb.vendor_category as vendor_category_tbl
-FROM oplweb2.oplweb.vendor_category_family as vendor_category_family_tbl
-FROM oplweb2.oplweb.vendors as vendors_tbl
-FROM oplweb2.oplweb.product_formats_categories as product_formats_categories
-FROM oplweb2.oplweb.product_with_code as product_with_code
-FROM oplweb2.oplweb.product_category_with_code as product_category_with_code
-FROM oplweb2.oplweb.product_format as product_format_with_code
-FROM oplweb2.oplweb.product_price as pp
-FROM oplweb2.oplweb.product_price_type as pt
-FROM oplweb2.DBA.license_model_unit_type as put
-FROM oplweb2.DBA.license_model_unit_type as put2
-FROM oplweb2.DBA.license_model as lm
-FROM oplweb2.DBA.license_model as lm2
-FROM oplweb2.DBA.license_model_type as license_model_type_tbl
-FROM oplweb2.DBA.product_price_varchar as ppv
-FROM oplweb2.DBA.product_general_discount_vc as gd
-FROM oplweb2.oplweb.archive_coverage_osdb as ac1
-{
-	create virtrdf:product_portfolio as
-		graph <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-	{
-  opl:ProductPortfolio(product_family_tbl.product_family_code)
-    a opl:ProductPortfolio
-    as virtrdf:OplProductPortfolio .
-
-  opl:ProductPortfolio(product_family_tbl.product_family_code) opl:hasProductFamilies
-    opl:ProductFamily(product_family_tbl.product_family_code)
-	as virtrdf:OplProductPortfolioProductFamily .
-
-	  opl:ProductFamily(product_family_tbl.product_family_code)
-	    a opl:ProductFamily
-	    as virtrdf:OplProductFamily ;
-	  rdfs:label product_family_tbl.product_family_description
-	    as virtrdf:rdfsOplProductFamilyDescription ;
-	  foaf:name 	product_family_tbl.product_family_description
-		    as virtrdf:nameOplProductFamilyDescription ;
-	  foaf:logo  opl:lit_openlink_logo(product_family_tbl.product_family_code)
-	        as virtrdf:logoOpenLinkSoftware ;
-	  foaf:homepage opl:lit_homepage(product_family_tbl.product_family_code)
-	        as virtrdf:homepageProductFamily ;
-	  foaf:homepage opl:wwwsitefamily(product_family_tbl.product_family_code)
-#	    where (
-#			^{product_family_tbl.}^.product_family_code = 'uda'
-#		)
-	        as virtrdf:homepageProductFamilyUda ;
-	  foaf:maker oplds:this
-	        as virtrdf:OplDataspaceOpenLinkUri ;
-  	  owl:sameAs product_family_tbl.dbpedia_uri
-        as virtrdf:OplFamilyOwlSameAsDBPediaUri ;
-	  opl:ProductFamilyCode product_family_tbl.product_family_code
-	    as virtrdf:OplProductFamilyCode ;
-	  opl:ProductFamilyDescription product_family_tbl.product_family_description
-	    as virtrdf:OplProductFamilyDescription ;
-	  dc:description opl:lit_to_string(product_family_tbl.long_description)
-	    as virtrdf:OplProductFamilyLongDescription 		;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy owl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	  opl:ProductCategory(product_category_with_code.product_cat_code)
-	    a opl:ProductCategory
-	    as virtrdf:OplProductCategory ;
-	    a opl:ProductFamily
-	    as virtrdf:OplProductCategorySubClassOfProductFamily ;
-	  rdfs:label product_category_with_code.product_category_description
-	    as virtrdf:rdfsOplProductCategoryDescription ;
-	  foaf:homepage opl:wwwsitecategory(product_category_with_code.product_family_code, product_category_with_code.product_cat_code)
-#	    where (
-#			^{product_category_with_code.}^.product_family_code = 'uda'
-#		)
-	        as virtrdf:homepageProductFamilyCategoryUda ;
-	  opl:ProductCategoryCode product_category_with_code.product_cat_code
-	    as virtrdf:OplProductCategoryCode ;
-  	  owl:sameAs product_category_with_code.dbpedia_uri
-        as virtrdf:OplCategoryOwlSameAsDBPediaUri ;
-	  opl:hasFamily opl:ProductFamily(product_category_with_code.product_family_code)
-	    as virtrdf:OplProductCategoryIsOfFamily ;
-	  opl:ProductCategoryDescription product_category_with_code.product_category_description
-	    as virtrdf:OplProductCategoryDescription ;
-	  dc:description opl:lit_to_string(product_category_with_code.long_description)
-	    as virtrdf:OplProductCategoryLongDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy owl:
-		.
-
-	  opl:ProductFormat(product_format_with_code.product_format_code)
-	    a opl:ProductFormat
-	    as virtrdf:OplProductFormat ;
-	  opl:ProductFormatCode product_format_with_code.product_format_code
-	    as virtrdf:OplProductFormatCode ;
-	  rdfs:label product_format_with_code.product_format_description
-	    as virtrdf:rdfsOplProductFormatDescription ;
-	  dc:description product_format_with_code.product_format_description
-	    as virtrdf:OplProductFormatDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs: ;
-      rdfs:isDefinedBy dc:
-		.
-
-	  opl:ProductFormatCategory(product_formats_categories.product_format_code, product_formats_categories.product_cat_code)
-	    a opl:ProductFormatCategory
-	    as virtrdf:OplProductFormatCategory ;
-	    a opl:ProductFormat
-	    as virtrdf:OplProductFormatCategoryProductFormat ;
-	    a opl:ProductCategory
-	    as virtrdf:OplProductFormatCategoryProductCategory ;
-	  foaf:homepage opl:wwwsiteformat(product_category_with_code.product_family_code, product_formats_categories.product_cat_code, product_formats_categories.product_format_code)
-	    where (
-			^{product_category_with_code.}^.product_cat_code = ^{product_formats_categories.}^.product_cat_code
-#			and
-#			^{product_category_with_code.}^.product_family_code = 'uda'
-		)
-	        as virtrdf:homepageProductFamilyCategoryFormatUda ;
-	  opl:ProductFormatCode product_formats_categories.product_format_code
-	    as virtrdf:OplProductFormatCategoryFormatCode ;
-	  opl:ProductCategoryCode product_formats_categories.product_cat_code
-	    as virtrdf:OplProductFormatCategoryCategoryCode ;
-      opl:isProductCategory opl:ProductCategory(product_formats_categories.product_cat_code)
-        as virtrdf:OplProductFormatCategoryisCategory ;
-      opl:isProductFormat opl:ProductFormat(product_formats_categories.product_format_code)
-        as virtrdf:OplProductFormatCategoryisFormat ;
-	  rdfs:label opl:lit_format_cat_label(product_formats_categories.product_format_id, product_formats_categories.product_cat_id)
-	    as virtrdf:rdfsOplProductFormatCategoryDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-	  opl:ProductCategory(product_category_with_code.product_cat_code) opl:hasProduct
-	    opl:Product(product_with_code.product_id)
-	      where (^{product_with_code.}^.product_cat_id = ^{product_category_with_code.}^.product_cat_id)
-	    as virtrdf:OplProductCategoryIsCategoryOfProduct .
-
-	  opl:ProductFormat(product_format_with_code.product_format_code) opl:hasProduct
-	    opl:Product(product_with_code.product_id)
-	      where (^{product_with_code.}^.product_format_id = ^{product_format_with_code.}^.product_format_id)
-	    as virtrdf:OplProductFormatIsFormatOfProduct .
-
-	  opl:ProductFamily(product_family_tbl.product_family_code) opl:hasCategory
-	    opl:ProductCategory(product_category_with_code.product_cat_code)
-	      where (^{product_family_tbl.}^.product_family_id = ^{product_category_with_code.}^.product_family_id)
-	    as virtrdf:OplProductFamilyIsFamilyOfProductCategory .
-
-	  opl:ProductFamily(product_family_tbl.product_family_code) opl:hasFormat
-	    opl:ProductFormat(product_formats_categories.product_format_code)
-	      where (
-		    ^{product_family_tbl.}^.product_family_id = ^{product_formats_categories.}^.product_family_id
-		  )
-	    as virtrdf:OplProductFamilyIsFamilyOfProductFormats .
-
-	  opl:ProductFamily(product_family_tbl.product_family_code) opl:otherProductFamilies
-	    opl:ProductFamily(product_family_tbl_2.product_family_code)
-	      where (
-		    ^{product_family_tbl.}^.product_family_id <> ^{product_family_tbl_2.}^.product_family_id
-		  )
-	    as virtrdf:OplProductFamilyHasOtherProductFamilies .
-
-	  opl:ProductFormat(product_format_with_code.product_format_code) opl:hasCategory
-	    opl:ProductFormatCategory(product_formats_categories.product_format_code, product_formats_categories.product_cat_code)
-	      where (^{product_formats_categories.}^.product_format_id = ^{product_format_with_code.}^.product_format_id)
-	    as virtrdf:OplProductFormatIsFormatOfProductFormatCategories .
-
-	  opl:ProductFormatCategory(product_formats_categories.product_format_code, product_formats_categories.product_cat_code)
-	    opl:hasProduct
-	    opl:Product(product_with_code.product_id)
-	      where (
-		    ^{product_with_code.}^.product_cat_id = ^{product_formats_categories.}^.product_cat_id
-		    and
-		    ^{product_with_code.}^.product_format_id = ^{product_formats_categories.}^.product_format_id
-		  )
-	    as virtrdf:OplProductFormatCategoryIsFormatCategoryOfProduct .
-
-
-
-	  opl:VendorCategoryFamily(vendor_category_family_tbl.vendor_category_family_id)
-	    a opl:VendorCategoryFamily
-	    as virtrdf:OplVendorCategoryFamily ;
-	  opl:VendorCategoryFamilyDescription vendor_category_family_tbl.vendor_category_family_desc
-	    as virtrdf:OplVendorCategoryFamilyDesc .
-
-
-	  opl:VendorCategory(vendor_category_tbl.vendor_category_id)
-	    a opl:VendorCategory
-	    as virtrdf:OplVendorCategory ;
-	    a opl:VendorCategoryFamily
-	    as virtrdf:OplVendorCategorySubClassOfVendorCategoryFamily ;
-	  rdfs:label vendor_category_tbl.vendor_category_description
-	    as virtrdf:rdfsOplVendorCategoryDescription ;
-	  opl:VendorCategoryDescription vendor_category_tbl.vendor_category_description
-	    as virtrdf:OplVendorCategoryDescription ;
-	  opl:isVendorCategoryOf opl:VendorCategoryFamily(vendor_category_tbl.vendor_category_family_id)
-	    as virtrdf:OplVendorCategoryIsOfCategoryFamily ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	  opl:Vendor(vendors_tbl.vendor_id)
-	    a opl:Vendor
-	    as virtrdf:OplVendor ;
-	    a opl:VendorCategory
-	    as virtrdf:OplVendorSubClassOfVendorCategory ;
-	  rdfs:label vendors_tbl.vendor_name
-	    as virtrdf:rdfsOplVendorsName ;
-	  opl:VendorName vendors_tbl.vendor_name
-	    as virtrdf:OplVendorsName ;
-	  opl:WikipediaPage opl:Uri(vendors_tbl.wikipedia_url)
-	    as virtrdf:OplVendorsWikipediaUrl ;
-	  owl:sameAs opl:lit_wikipedia_to_dbpedia(vendors_tbl.wikipedia_url)
-	    as virtrdf:OplVendorsWikipediaUrlOwlSameAs ;
-	  foaf:homepage opl:Uri(vendors_tbl.vendor_homepage)
-	    as virtrdf:OplFoafVendorHomepage ;
-	  opl:isOfVendorCategory opl:VendorCategory(vendors_tbl.vendor_category_id)
-	    as virtrdf:OplVendorIsOfVendorCategory ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy owl:
-		.
-
-	  opl:VendorCategoryFamily(vendor_category_family_tbl.vendor_category_family_id)
-	    opl:hasVendorCategory
-	    opl:VendorCategory(vendor_category_tbl.vendor_category_id)
-	      where (
-		    ^{vendor_category_family_tbl.}^.vendor_category_family_id = ^{vendor_category_tbl.}^.vendor_category_family_id
-		  )
-	    as virtrdf:OplVendorCategoryFamilyHasVendorCategory .
-
-      opl:VendorCategory(vendor_category_tbl.vendor_category_id)
-	    opl:hasVendorCategory
-  	    opl:Vendor(vendors_tbl.vendor_id)
-	      where (
-		    ^{vendor_category_tbl.}^.vendor_category_id = ^{vendors_tbl.}^.vendor_category_id
-		  )
-	    as virtrdf:OplVendorCategoryHasVendors .
-
-  	opl:OpsysFamily(opsys_family_tbl.opsys_family_id)
-	    a opl:OpsysFamily
-	    as virtrdf:OplOpsysFamily ;
-	  rdfs:label opsys_family_tbl.opsys_family_name
-  	  as virtrdf:rdfsOplOpsysFamilyName ;
-	  opl:OpsysFamilyName opsys_family_tbl.opsys_family_name
-  	  as virtrdf:OplOpsysFamilyName ;
-  	opl:OpsysFamilyLicenseCode opsys_family_tbl.opsys_license_code
-	    as virtrdf:OplOpsysFamilyLicenseCode ;
-	  opl:OpsysFamilyVendor opl:Vendor(opsys_family_tbl.vendor_id)
-  	  as virtrdf:OplOpsysFamilyVendor ;
-  	opl:OpsysFamilyRating opsys_family_tbl.rating
-	    as virtrdf:OplOpsysFamilyRating ;
-	foaf:logo opl:lit_opsys_icon(opsys_family_tbl.opsys_family_id)
-	  as virtrdf:OplLogoOpsysFamily ;
-	foaf:homepage opl:Uri(opsys_family_tbl.wikipedia_url)
-	  as virtrdf:FoafHomepageOpsysFamilyWikipediaUrl ;
-	owl:sameAs opl:lit_wikipedia_to_dbpedia(opsys_family_tbl.wikipedia_url)
-	  as virtrdf:FoafHomepageOpsysFamilyPediaUrlOwlSameAs ;
-	opl:WikipediaPage opl:Uri(opsys_family_tbl.wikipedia_url)
-	  as virtrdf:OplOpsysFamilyWikipediaUrl ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy owl:
-		.
-
-	  opl:OpsysFamily(opsys_family_tbl.opsys_family_id) opl:hasOpsys
-	    opl:Opsys(opsys_tbl.opsys_name)
-	    where (^{opsys_tbl.}^.opsys_family_id = ^{opsys_family_tbl.}^.opsys_family_id)
-	    as virtrdf:OplOpsysFamilyIsOpsysFamilyOfOpsys .
-
-
-	  opl:DbmsFamily(dbms_family_tbl.dbms_family_id)
-  	  a opl:DbmsFamily
-	    as virtrdf:OplDbmsFamily ;
-	  rdfs:label dbms_family_tbl.dbms_family_name
-  	  as virtrdf:rdfsOplDbmsFamilyName ;
-	  opl:DbmsFamilyName dbms_family_tbl.dbms_family_name
-  	  as virtrdf:OplDbmsFamilyName ;
-  	opl:DbmsFamilyVendor opl:Vendor(dbms_family_tbl.vendor_id)
-      as virtrdf:OplDbmsFamilyVendor ;
-	foaf:homepage opl:Uri(dbms_family_tbl.wikipedia_url)
- 	  as virtrdf:FoafHomepageDbmsFamilyWikipediaUrl ;
-	owl:sameAs opl:lit_wikipedia_to_dbpedia(dbms_family_tbl.wikipedia_url)
- 	  as virtrdf:OwnSameAsDbmsFamilyPediaUrl ;
-	opl:WikipediaPage opl:Uri(dbms_family_tbl.wikipedia_url)
-	  as virtrdf:OplDbmsFamilyWikipediaUrl ;
-	  opl:DbmsFamilyRating dbms_family_tbl.rating
-  	  as virtrdf:OplDbmsFamilyRating ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy owl:
-		.
-
-	  opl:DbmsEngine(dbms_engine_tbl.dbms_name)
-  	  a opl:DbmsEngine
-	    as virtrdf:OplDbmsEngine ;
-  	  a opl:DbmsFamily
-	    as virtrdf:DbmsEngineSubClassOfDbmsFamily ;
-	    a umbel:RelationalDatabaseServerProgram
-	    as virtrdf:DbmEngineSubClassOfUmbel ;
-	  opl:isOfDbmsFamily opl:DbmsFamily(dbms_engine_tbl.dbms_family_id)
-  	  as virtrdf:OplDbmsEngineisOfDbmsFamily ;
-	  rdfs:label dbms_engine_tbl.dbms_name
-  	  as virtrdf:rdfsOplLabelDbmsName ;
-  	opl:DbmsEngineVersion dbms_engine_tbl.dbms_version
-	    as virtrdf:OplDbmsEngineVersion ;
-	  opl:DbmsEngineUpwardCompatible dbms_engine_tbl.upward_compatible
-  	  as virtrdf:OplDbmsEngineUpwardCompatible ;
-  	opl:DbmsEngineDownwardCompatible dbms_engine_tbl.downward_compatible
-	    as virtrdf:OplDbmsEngineDownwardCompatible ;
-	  opl:DbmsEngineRating dbms_engine_tbl.rating
-  	  as virtrdf:OplDbmsEngineRating ;
-  	opl:DbmsEngineOldArchiveCode dbms_engine_tbl.old_archive_code
-	    as virtrdf:OplDbmsEngineOldArchiveCode ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-  opl:DbmsFamily(dbms_family_tbl.dbms_family_id)
-    opl:hasDatabaseVersions
-    opl:DbmsEngine(dbms_engine_tbl.dbms_name)
-    where (
-        ^{dbms_family_tbl.}^.dbms_family_id = ^{dbms_engine_tbl.}^.dbms_family_id
-    )
-    as virtrdf:OplDbmsFamilyToDbms .
-
-
-	  opl:OpsysType(opsys_type_tbl.opsys_type_id)
-   	  a opl:OpsysType
-	    as virtrdf:OplOpsysType ;
-	  rdfs:label opsys_type_tbl.opsys_type_description
-  	  as virtrdf:rdfsOplOpsysTypeDescription ;
-	  opl:OpsysTypeDescription opsys_type_tbl.opsys_type_description
-  	  as virtrdf:OplOpsysTypeDescription ;
-  	opl:OpsysTypeShortDescription opsys_type_tbl.short_description
-	    as virtrdf:OplOpsysTypeShortDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-	  opl:OpsysType(opsys_type_tbl.opsys_type_id) opl:hasOpsys
-	    opl:Opsys(opsys_tbl.opsys_name)
-	    where (^{opsys_tbl.}^.opsys_type_id = ^{opsys_type_tbl.}^.opsys_type_id)
-	    as virtrdf:OplOpsysTypeIsOpsysTypeOfOpsys .
-
-
-	  opl:ProcessorMode(processor_mode_tbl.processor_mode_id)
-  	  a opl:ProcessorMode
-	    as virtrdf:OplProcessorMode ;
-	  opl:ProcessorModeName processor_mode_tbl.processor_mode_name
-  	  as virtrdf:OplProcessorModeName .
-
-  	opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-	    a opl:Processor
-	    as virtrdf:OplProcessor ;
-	  opl:ProcessorName processors_tbl.processor_name
-  	  as virtrdf:OplProcessorName ;
-  	opl:ProcessorVersion processors_tbl.processor_version
-	    as virtrdf:OplProcessorVersion ;
-	  rdfs:label processors_tbl.processor_description
-  	  as virtrdf:rdfsOplProcessorDescription ;
-	  opl:ProcessorDescription processors_tbl.processor_description
-  	  as virtrdf:OplProcessorDescription ;
-  	opl:ProcessorMode opl:ProcessorMode(processors_tbl.processor_mode_id)
-	    as virtrdf:OplProcessorProcessorMode ;
-	  opl:isOfProcessorFamily opl:ProcessorFamily(processors_tbl.processor_family_id)
-  	  as virtrdf:OplProcessorIsOfProcessorFamily ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	opl:ProcessorFamily(processor_family_tbl.processor_family_id)
-  	  a opl:ProcessorFamily
-	    as virtrdf:OplProcessorFamily ;
-    opl:ProcessorFamilyName processor_family_tbl.processor_family_name
-  	  as virtrdf:OplProcessorFamilyName ;
-    opl:ProcessorFamilyVendor opl:Vendor(processor_family_tbl.vendor_id)
-	  as virtrdf:OplProcessorFamilyVendor ;
-	foaf:homepage opl:Uri(processor_family_tbl.wikipedia_url)
-	  as virtrdf:FoafHomepageProcessorFamilyWikipediaUrl ;
-	owl:sameAs opl:lit_wikipedia_to_dbpedia(processor_family_tbl.wikipedia_url)
-	  as virtrdf:OwlSameAsProcessorFamilyPediaUrl ;
-    opl:WikipediaPage opl:Uri(processor_family_tbl.wikipedia_url)
-	  as virtrdf:OplProcessorFamilyWikipediaUrl ;
-	rdfs:label processor_family_tbl.processor_family_description
-  	  as virtrdf:rdfsOplProcessorFamilyDescription ;
-	opl:ProcessorFamilyDescription processor_family_tbl.processor_family_description
-  	  as virtrdf:OplProcessorFamilyDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy owl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	  opl:Opsys(opsys_tbl.opsys_name)
-  	  a opl:Opsys
-	    as virtrdf:OplOpsys ;
-  	  a opl:OpsysFamily
-	    as virtrdf:OpsysSubClassOfOplOpsysFamily ;
-  	  a umbel:OperatingSystem
-	    as virtrdf:OpsysSubClassOfUmbelOpsys ;
-	  opl:OpsysVersion opsys_tbl.opsys_version
-  	  as virtrdf:OplOpsysVersion ;
-  	opl:OpsysUpwardCompatible opsys_tbl.upward_compatible
-	    as virtrdf:OplOpsysUpwardCompatible ;
-	  opl:OpsysDownwardCompatible opsys_tbl.downward_compatible
-  	  as virtrdf:OplOpsysDownwardCompatible ;
-  	opl:OpsysSupported opsys_tbl.supported
-	    as virtrdf:OplOpsysSupported ;
-	  opl:OpsysLicenseCode opsys_tbl.opsys_license_code
-  	  as virtrdf:OplOpsysLicenseCode ;
-  	rdfs:label opsys_tbl.commercial_name
-	    as virtrdf:rdfsOplOpsysCommercialName ;
-  	opl:OpsysCommercialName opsys_tbl.commercial_name
-	    as virtrdf:OplOpsysCommercialName ;
-	  opl:OpsysEmulationMode opl:ProcessorMode(opsys_tbl.emulation_mode_id)
-  	  as virtrdf:OplOpsysEmulationMode ;
-  	opl:OpsysProcessor opl:Processor(opsys_tbl.processor_name, opsys_tbl.processor_mode_id)
-	    as virtrdf:OplOpsysProcessor ;
-	  opl:isOfOpsysFamily opl:OpsysFamily(opsys_tbl.opsys_family_id)
-  	  as virtrdf:OplOpsysIsOfOpsysFamily ;
-  	opl:isOfOpsysType opl:OpsysType(opsys_tbl.opsys_type_id)
-	    as virtrdf:OplOpsysIsOfOpsysType ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-	  opl:Product(product_with_code.product_id)
-	    a opl:Product
-	    as virtrdf:OplProduct ;
-	    a opl:ProductFormat
-	    as virtrdf:ProductSubClassOfProductFormat ;
-	    a opl:ProductCategory
-	    as virtrdf:ProductSubClassOfProductCategory ;
-	    a opl:ProductFormatCategory
-	    as virtrdf:OplProductProductFormatCategory ;
-	  rdfs:label product_with_code.poduct_description
-	    as virtrdf:rdfsOplProductDescription ;
-	  foaf:homepage opl:wwwsiteproduct(product_with_code.product_id)
-        as virtrdf:homepageProductFamilyCategoryFormatProductUda ;
-	  opl:ProductDescription product_with_code.poduct_description
-	    as virtrdf:OplProductDescription ;
-	  dc:description opl:lit_to_string(product_with_code.long_description)
-	    as virtrdf:OplProductLongDescription ;
-	  opl:isOfCategory opl:ProductCategory(product_with_code.product_cat_code)
-	    as virtrdf:OplProductIsOfCategory ;
-	  opl:isOfFormat opl:ProductFormat(product_with_code.product_format_code)
-	    as virtrdf:OplProductIsOfFormat ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy foaf: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-	  opl:Product(product_with_code.product_id) opl:hasProductRelease
-	    opl:ProductRelease(
-	      product_release_tbl.product_id,
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	      )
-	      where (^{product_with_code.}^.product_id = ^{product_release_tbl.}^.product_id)
-	    as virtrdf:OplProductIsProductOfProductRelease .
-
-
-
-	  opl:ProductRelease(
-	      product_release_tbl.product_id,
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	      )
-	    a opl:ProductRelease
-	    as virtrdf:OplProductRelease ;
-	    a opl:Product
-	    as virtrdf:OplProductReleaseSubClassProduct ;
-		a gr:ProductOrService
-		as virtrdf:OplProductReleaseAgrProductOrService ;
-	  rdfs:label opl:lit_product_release_label(
-	      product_release_tbl.product_id,
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	  )
-	    as virtrdf:rdfsOplProductReleaseProductReleaseId ;
-	  opl:ProductReleaseProductReleaseId product_release_tbl.product_release_id
-	    as virtrdf:OplProductReleaseProductReleaseId ;
-	  opl:isOfProduct opl:Product(product_release_tbl.product_id)
-	    as virtrdf:OplProductReleaseIsOfProduct ;
-	  opl:isForOpsys opl:Opsys(product_release_tbl.opsys_name)
-	    as virtrdf:OplProductReleaseIsForOpsys ;
-	  opl:isForDbmsEngine opl:DbmsEngine(product_release_tbl.dbms_name)
-	    as virtrdf:OplProductReleaseIsForDbmsEngine ;
-  	  opl:UpwardCompatible product_release_tbl.upward_compatible
-	    as virtrdf:OplProductReleaseUpwardCompatible ;
-	  opl:DownwardCompatible product_release_tbl.downward_compatible
-  	    as virtrdf:OplProductReleaseDownwardCompatible ;
-      opl:PurchaseInShop opl:lit_to_shop (
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.product_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	 	)
-   		as virtrdf:OplProductReleaseToShop ;
-	  gr:hasBusinessFunction gr:Sell as virtrdf:grbusinessfunctionsell;
-  	  opl:Supported product_release_tbl.supported
-	    as virtrdf:OplProductReleaseSupported ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy gr:
-		.
-
-	  opl:ProductRelease(
-	      product_release_tbl.product_id,
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	      ) opl:hasComponentArchive
-	  opl:ComponentArchive(component_archive_tbl.component_archive_name)
-			where (
-					^{product_release_tbl.}^.product_id = ^{component_archive_tbl.}^.product_id and
-					^{product_release_tbl.}^.product_release_id = ^{component_archive_tbl.}^.product_release_id and
-					^{product_release_tbl.}^.opsys_name = ^{component_archive_tbl.}^.opsys_name and
-					^{product_release_tbl.}^.dbms_name = ^{component_archive_tbl.}^.dbms_name
-			)
-	    as virtrdf:OplProductReleaseIsProductReleaseOfComponentArchive .
-
-
-	  opl:Component(components_tbl.component_name)
-	    a opl:Component
-	    as virtrdf:OplComponent ;
-	  opl:isOfComponentCategory opl:ComponentCategory(components_tbl.component_category_id)
-	    as virtrdf:OplComponentIsOfComponentCategory ;
-	  opl:isOfComponentType opl:ComponentType(components_tbl.component_type_id)
-	    as virtrdf:OplComponentIsOfComponentType ;
-	  opl:isOfComponentMode opl:ComponentMode(components_tbl.component_mode_id)
-	    as virtrdf:OplComponentIsOfComponentMode ;
-	  opl:isForOpsys opl:Opsys(components_tbl.opsys_name)
-	    as virtrdf:OplComponentIsForOpsys ;
-	  opl:isForDbmsEngine opl:DbmsEngine(components_tbl.dbms_name)
-	    as virtrdf:OplComponentIsForDbmsEngine ;
-	  opl:ComponentCvsid components_tbl.component_cvsid
-	    as virtrdf:OplComponentComponentCvsId ;
-	  opl:ComponentBuildDate components_tbl.component_build_date
-	    as virtrdf:OplComponentComponentBuildDate ;
-	  opl:Notes components_tbl.notes
-	    as virtrdf:OplComponentNotes ;
-	  opl:BuildComments components_tbl.build_comments
-	    as virtrdf:OplComponentBuildComments ;
-	  opl:Filesize components_tbl.str_filesize
-	    as virtrdf:OplComponentFilesize ;
-      rdfs:isDefinedBy opl:
-		.
-
-    opl:DbmsEngine (dbms_engine_tbl.dbms_name) opl:hasComponents
-      opl:Component(components_tbl.component_name)
-      where (^{components_tbl.}^.dbms_name = ^{dbms_engine_tbl.}^.dbms_name)
-      as virtrdf:OplDbmsEngineForComponents .
-
-    opl:Opsys (opsys_tbl.opsys_name) opl:hasComponents
-      opl:Component(components_tbl.component_name)
-      where (^{components_tbl.}^.opsys_name = ^{opsys_tbl.}^.opsys_name)
-      as virtrdf:OplOpsysForComponents .
-
-
-	  opl:ComponentMode(component_mode_tbl.component_mode_id)
-	    a opl:ComponentMode
-	    as virtrdf:OplComponentMode ;
-	  rdfs:label component_mode_tbl.component_mode_description
-	    as virtrdf:rdfsOplComponentModeDescription ;
-	  opl:ComponentModeDescription component_mode_tbl.component_mode_description
-	    as virtrdf:OplComponentModeDescription ;
-	  opl:ComponentModeShortDescription component_mode_tbl.short_description
-	    as virtrdf:OplComponentModeShortDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	  opl:ComponentType(component_type_tbl.component_type_id)
-	    a opl:ComponentType
-	    as virtrdf:OplComponentType ;
-	  rdfs:label component_type_tbl.component_type_description
-	    as virtrdf:rdfsOplComponentTypeDescription ;
-	  opl:ComponentTypeDescription component_type_tbl.component_type_description
-	    as virtrdf:OplComponentTypeDescription ;
-	  opl:ComponentTypeShortDescription component_type_tbl.short_description
-	    as virtrdf:OplComponentTypeShortDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	  opl:ComponentCategory(component_category_tbl.component_category_id)
-	    a opl:ComponentCategory
-	    as virtrdf:OplComponentCategory ;
-	  rdfs:label component_category_tbl.component_category_description
-	    as virtrdf:rdfsOplComponentCategoryDescription ;
-	  opl:ComponentCategoryDescription component_category_tbl.component_category_description
-	    as virtrdf:OplComponentCategoryDescription ;
-	  opl:ComponentCategoryShortDescription component_category_tbl.short_description
-	    as virtrdf:OplComponentCategoryShortDescription ;
-	  dc:description opl:lit_to_string(component_category_tbl.component_category_long_description)
-	    as virtrdf:OplComponentCategoryLongDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	  opl:ComponentArchive(component_archive_tbl.component_archive_name)
-	    a opl:ComponentArchive
-	    as virtrdf:OplComponentArchive ;
-	    a opl:Component
-	    as virtrdf:ComponentArchiveSubClassOfComponent ;
-	  opl:ComponentArchiveName component_archive_tbl.component_archive_name
-	    as virtrdf:OplComponentArchiveComponentArchiveName ;
-	  rdfs:label component_archive_tbl.component_archive_name
-	    as virtrdf:rdfsComponentArchiveComponentArchiveName ;
-  	opl:ComponentArchiveType opl:ComponentArchiveType(component_archive_tbl.component_archive_type_id)
-	  	as virtrdf:ComponentArchiveComponentArchiveType ;
-	  opl:isOfComponent opl:Component(component_archive_tbl.component_name)
-	    as virtrdf:OplComponentArchiveIsOfComponent ;
-	  opl:isOfProductRelease opl:ProductRelease(
-	      component_archive_tbl.product_id,
-	      component_archive_tbl.product_release_id,
-	      component_archive_tbl.opsys_name,
-	      component_archive_tbl.dbms_name
-	      )
-	    as virtrdf:OplComponentArchiveIsOfProductRelease ;
-  	opl:AssemblyDate component_archive_tbl.assembly_date
-	  	as virtrdf:OplComponentArchiveAssemblyDate ;
-	  opl:FileUri component_archive_tbl.file_uri
-  		as virtrdf:OplComponentArchiveFileUri ;
-  	opl:LicenseCode component_archive_tbl.license_code
-		  as virtrdf:OplComponentArchiveLicenseCode ;
-	  opl:ResFullPath component_archive_tbl.res_full_path
-  		as virtrdf:OplComponentArchiveResFullPath ;
-  	opl:ResName component_archive_tbl.res_name
-		  as virtrdf:OplComponentArchiveResName ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-	opl:ComponentArchiveType(component_archive_type_tbl.component_archive_type_id)
-	  a opl:ComponentArchiveType
-		as virtrdf:OplComponentArchiveType ;
-	opl:ComponentArchiveShortName component_archive_type_tbl.component_archive_short_name
-		as virtrdf:OplComponentArchiveTypeComponentArchiveShortName ;
-	rdfs:label component_archive_type_tbl.component_archive_type_name
-		as virtrdf:rdfsOplComponentArchiveTypeComponentArchiveTypeName ;
-	opl:ComponentArchiveTypeName component_archive_type_tbl.component_archive_type_name
-		as virtrdf:OplComponentArchiveTypeComponentArchiveTypeName ;
-	opl:Extension component_archive_type_tbl.extension
-		as virtrdf:OplComponentArchiveTypeExtension ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-	opl:DownloadLocation(download_location_tbl.uri)
-	  a opl:DownloadLocation
-		as virtrdf:OplDownloadLocation ;
-	opl:isOfComponentArchive opl:ComponentArchive(download_location_tbl.component_archive_name)
-		as virtrdf:OplDownloadLocationIsOfComponentArchive ;
-	opl:hasDownloadProtocol opl:DownloadProtocol(download_location_tbl.protocol_name)
-		as virtrdf:DownloadLocationHasProtocolName ;
-	rdfs:label download_location_tbl.uri_old
-		as virtrdf:rdfsOplDownloadLocationLabel ;
-	opl:isOfProductRelease opl:ProductRelease(
-		download_location_tbl.product_id,
-		download_location_tbl.product_release_id,
-		download_location_tbl.opsys_name,
-		download_location_tbl.dbms_name
-		)
-		as virtrdf:OplDownloadLocationIsOfProductRelease ;
-	opl:Uri download_location_tbl.uri
-		as virtrdf:OplDownloadLocationUri ;
-	opl:UriOld download_location_tbl.uri_old
-		as virtrdf:OplDownloadLocationUriOld ;
-    opl:hasDownloadPartner opl:DownloadPartner(
-        download_location_tbl.host_name,
-        download_location_tbl.domain_name
-      )
-        as virtrdf:OplDownloadLocationHasDownloadPartner ;
-	opl:DomainName download_location_tbl.domain_name
-		as virtrdf:OplDownloadLocationDomainName ;
-	opl:HostName download_location_tbl.host_name
-		as virtrdf:OplDownloadLocationHostName ;
-	opl:ResName download_location_tbl.res_name
-		as virtrdf:OplDownloadLocationResName ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	opl:DownloadProtocol(download_protocol_tbl.protocol_name)
-	  a opl:DownloadProtocol
-		as virtrdf:OplDownloadProtocolProtocolName ;
-	opl:ProtocolDescription download_protocol_tbl.protocol_description
-		as virtrdf:OplDownloadProtocolProtocolDescription .
-
-	opl:DownloadPartner(
-	  download_partner_tbl.host_name,
-	  download_partner_tbl.domain_name
-	  )
-	  a opl:DownloadPartner
-	  as virtrdf:OplDownloadPartner;
-	rdfs:label download_partner_tbl.partner_name
-	  as virtrdf:rdfsOplDownloadPartnerPartnerNamelabel ;
-	opl:DownloadPartner download_partner_tbl.partner_name
-	  as virtrdf:OplDownloadPartnerPartnerName ;
-	opl:PortNumber download_partner_tbl.port_number
-	  as virtrdf:OplDownloadPartnerPortNumber ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-    opl:ComponentArchive(component_archive_tbl.component_archive_name)
-      opl:hasDownloadLocation
-      opl:DownloadLocation(download_location_tbl.uri)
-		where (
-				^{component_archive_tbl.}^.component_archive_name = ^{download_location_tbl.}^.component_archive_name
-		)
-      as virtrdf:OplComponentArchiveIsComponentArchiveOfDownloadLocation .
-
-    opl:DownloadLocation(download_location_tbl.uri)
-      opl:isDownloadLocationOf
-      opl:ComponentArchive(component_archive_tbl.component_archive_name)
-		where (
-				 ^{download_location_tbl.}^.component_archive_name = ^{component_archive_tbl.}^.component_archive_name
-		)
-      as virtrdf:OplDownloadLocationIsDownloadLocationOfComponentArchive .
-
-
-#
-# Extra Peripheral family/cat/format/etc... to/from... dbfamily/opsysfamily/....
-# ==================================================================================
-
-
-# ---------------------> product_family
-
-#  opl:ProductFamily(product_family_tbl.product_family_code)
-#    opl:OperatingSystems
-#    opl:Opsys(ac1.opsys_name)
-#    where (
-#        ^{product_family_tbl.}^.product_family_code = ^{ac1.}^.product_family_code
-#    )
-#    as virtrdf:OplProductFamilyToOpsys .
-
-  opl:ProductFamily(product_family_tbl.product_family_code)
-    opl:OperatingSystemsFamilies
-    opl:OpsysFamily(ac1.opsys_family_id)
-    where (
-        ^{product_family_tbl.}^.product_family_code = ^{ac1.}^.product_family_code
-    )
-    as virtrdf:OplProductFamilyToOpsysFamily .
-
-#  opl:ProductFamily(product_family_tbl.product_family_code)
-#    opl:Databases
-#    opl:DbmsEngine(ac1.dbms_name)
-#    where (
-#        ^{product_family_tbl.}^.product_family_code = ^{ac1.}^.product_family_code
-#    )
-#    as virtrdf:OplProductFamilyToDbms .
-
-  opl:ProductFamily(product_family_tbl.product_family_code)
-    opl:DatabaseFamilies
-    opl:DbmsFamily(ac1.dbms_family_id)
-    where (
-        ^{product_family_tbl.}^.product_family_code = ^{ac1.}^.product_family_code
-    )
-    as virtrdf:OplProductFamilyToDbmsFamily .
-
-#  opl:ProductFamily(product_family_tbl.product_family_code)
-#    opl:Processors
-#  	opl:Processor(ac1.processor_name, ac1.processor_mode_id)
-#    where (
-#        ^{product_family_tbl.}^.product_family_code = ^{ac1.}^.product_family_code
-#    )
-#    as virtrdf:OplProductFamilyToProcessor .
-
-  opl:ProductFamily(product_family_tbl.product_family_code)
-    opl:ProcessorFamilies
-	opl:ProcessorFamily(ac1.processor_family_id)
-    where (
-        ^{product_family_tbl.}^.product_family_code = ^{ac1.}^.product_family_code
-    )
-    as virtrdf:OplProductFamilyToProcessorFamily .
-
-
-
-# ---------------------> product_format
-
-#  opl:ProductFormat(product_format_with_code.product_format_code)
-#    opl:OperatingSystems
-#    opl:Opsys(ac1.opsys_name)
-#    where (
-#        ^{product_format_with_code.}^.product_format_code = ^{ac1.}^.product_format_code
-#    )
-#    as virtrdf:OplProductFormatToOpsys .
-
-  opl:ProductFormat(product_format_with_code.product_format_code)
-    opl:OperatingSystemsFamilies
-    opl:OpsysFamily(ac1.opsys_family_id)
-    where (
-        ^{product_format_with_code.}^.product_format_code = ^{ac1.}^.product_format_code
-    )
-    as virtrdf:OplProductFormatToOpsysFamily .
-
-#  opl:ProductFormat(product_format_with_code.product_format_code)
-#    opl:Databases
-#    opl:DbmsEngine(ac1.dbms_name)
-#    where (
-#        ^{product_format_with_code.}^.product_format_code = ^{ac1.}^.product_format_code
-#    )
-#    as virtrdf:OplProductFormatToDbms .
-
-  opl:ProductFormat(product_format_with_code.product_format_code)
-    opl:DatabaseFamilies
-    opl:DbmsFamily(ac1.dbms_family_id)
-    where (
-        ^{product_format_with_code.}^.product_format_code = ^{ac1.}^.product_format_code
-    )
-    as virtrdf:OplProductFormatToDbmsFamily .
-
-  opl:ProductFormat(product_format_with_code.product_format_code)
-    opl:Processors
-  	opl:Processor(ac1.processor_name, ac1.processor_mode_id)
-    where (
-        ^{product_format_with_code.}^.product_format_code = ^{ac1.}^.product_format_code
-    )
-    as virtrdf:OplProductFormatToProcessor .
-
-  opl:ProductFormat(product_format_with_code.product_format_code)
-    opl:ProcessorFamilies
-	opl:ProcessorFamily(ac1.processor_family_id)
-    where (
-        ^{product_format_with_code.}^.product_format_code = ^{ac1.}^.product_format_code
-    )
-    as virtrdf:OplProductFormatToProcessorFamily .
-
-
-
-# ---------------------> product_category
-
-#  opl:ProductCategory(product_category_with_code.product_cat_code)
-#    opl:OperatingSystems
-#    opl:Opsys(ac1.opsys_name)
-#    where (
-#        ^{product_category_with_code.}^.product_cat_code = ^{ac1.}^.product_cat_code
-#    )
-#    as virtrdf:OplProductCatToOpsys .
-
-  opl:ProductCategory(product_category_with_code.product_cat_code)
-    opl:OperatingSystemsFamilies
-    opl:OpsysFamily(ac1.opsys_family_id)
-    where (
-        ^{product_category_with_code.}^.product_cat_code = ^{ac1.}^.product_cat_code
-    )
-    as virtrdf:OplProductCatToOpsysFamily .
-
-#  opl:ProductCategory(product_category_with_code.product_cat_code)
-#    opl:Databases
-#    opl:DbmsEngine(ac1.dbms_name)
-#    where (
-#        ^{product_category_with_code.}^.product_cat_code = ^{ac1.}^.product_cat_code
-#    )
-#    as virtrdf:OplProductCatToDbms .
-
-  opl:ProductCategory(product_category_with_code.product_cat_code)
-    opl:DatabaseFamilies
-    opl:DbmsFamily(ac1.dbms_family_id)
-    where (
-        ^{product_category_with_code.}^.product_cat_code = ^{ac1.}^.product_cat_code
-    )
-    as virtrdf:OplProductCatToDbmsFamily .
-
-#  opl:ProductCategory(product_category_with_code.product_cat_code)
-#    opl:Processors
-#  	opl:Processor(ac1.processor_name, ac1.processor_mode_id)
-#    where (
-#        ^{product_category_with_code.}^.product_cat_code = ^{ac1.}^.product_cat_code
-#    )
-#    as virtrdf:OplProductCatToProcessor .
-
-  opl:ProductCategory(product_category_with_code.product_cat_code)
-    opl:ProcessorFamilies
-	opl:ProcessorFamily(ac1.processor_family_id)
-    where (
-        ^{product_category_with_code.}^.product_cat_code = ^{ac1.}^.product_cat_code
-    )
-    as virtrdf:OplProductCatToProcessorFamily .
-
-
-
-
-# ---------------------> product
-
-  opl:Product(product_with_code.product_id)
-    opl:OperatingSystems
-    opl:Opsys(ac1.opsys_name)
-    where (
-        ^{product_with_code.}^.product_id = ^{ac1.}^.product_id
-    )
-    as virtrdf:OplProductToOpsys .
-
-  opl:Product(product_with_code.product_id)
-    opl:OperatingSystemsFamilies
-    opl:OpsysFamily(ac1.opsys_family_id)
-    where (
-        ^{product_with_code.}^.product_id = ^{ac1.}^.product_id
-    )
-    as virtrdf:OplProductToOpsysFamily .
-
-  opl:Product(product_with_code.product_id)
-    opl:Databases
-    opl:DbmsEngine(ac1.dbms_name)
-    where (
-        ^{product_with_code.}^.product_id = ^{ac1.}^.product_id
-    )
-    as virtrdf:OplProductToDbms .
-
-  opl:Product(product_with_code.product_id)
-    opl:DatabaseFamilies
-    opl:DbmsFamily(ac1.dbms_family_id)
-    where (
-        ^{product_with_code.}^.product_id = ^{ac1.}^.product_id
-    )
-    as virtrdf:OplProductToDbmsFamily .
-
-  opl:Product(product_with_code.product_id)
-    opl:Processors
-  	opl:Processor(ac1.processor_name, ac1.processor_mode_id)
-    where (
-        ^{product_with_code.}^.product_id = ^{ac1.}^.product_id
-    )
-    as virtrdf:OplProductToProcessor .
-
-  opl:Product(product_with_code.product_id)
-    opl:ProcessorFamilies
-	opl:ProcessorFamily(ac1.processor_family_id)
-    where (
-        ^{product_with_code.}^.product_id = ^{ac1.}^.product_id
-    )
-    as virtrdf:OplProductToProcessorFamily .
-
-
-
-
-# ---------------------> to product
-
-  opl:Opsys(opsys_tbl.opsys_name)
-    opl:hasProducts
-    opl:Product(ac1.product_id)
-    where (
-        ^{opsys_tbl.}^.opsys_name = ^{ac1.}^.opsys_name
-    )
-    as virtrdf:OplOpsysToProduct .
-
-  opl:OpsysFamily(opsys_family_tbl.opsys_family_id)
-    opl:hasProducts
-    opl:Product(ac1.product_id)
-    where (
-        ^{opsys_family_tbl.}^.opsys_family_id = ^{ac1.}^.opsys_family_id
-    )
-    as virtrdf:OplOpsysFamilyToProduct .
-
-  opl:DbmsEngine(dbms_engine_tbl.dbms_name)
-    opl:hasProducts
-    opl:Product(ac1.product_id)
-    where (
-        ^{dbms_engine_tbl.}^.dbms_name = ^{ac1.}^.dbms_name
-    )
-    as virtrdf:OplDbmsToProduct .
-
-  opl:DbmsFamily(dbms_family_tbl.dbms_family_id)
-    opl:hasProducts
-    opl:Product(ac1.product_id)
-    where (
-        ^{dbms_family_tbl.}^.dbms_family_id = ^{ac1.}^.dbms_family_id
-    )
-    as virtrdf:OplDbmsFamilyToProduct .
-
-  opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-    opl:hasProducts
-    opl:Product(ac1.product_id)
-    where (
-        ^{processors_tbl.}^.processor_name = ^{ac1.}^.processor_name
-        and
-        ^{processors_tbl.}^.processor_mode_id = ^{ac1.}^.processor_mode_id
-    )
-    as virtrdf:OplProcessorToProduct .
-
-  opl:ProcessorFamily(processor_family_tbl.processor_family_id)
-    opl:hasProducts
-    opl:Product(ac1.product_id)
-    where (
-        ^{processor_family_tbl.}^.processor_family_id = ^{ac1.}^.processor_family_id
-    )
-    as virtrdf:OplProcessorFamilyProduct .
-
-
-
-
-# ---------------------> to product_cat
-
-#  opl:Opsys(opsys_tbl.opsys_name)
-#    opl:hasProductCategory
-#    opl:ProductCategory(ac1.product_cat_code)
-#    where (
-#        ^{opsys_tbl.}^.opsys_name = ^{ac1.}^.opsys_name
-#    )
-#    as virtrdf:OplOpsysToProductCategory .
-
-  opl:OpsysFamily(opsys_family_tbl.opsys_family_id)
-    opl:hasProductCategory
-    opl:ProductCategory(ac1.product_cat_code)
-    where (
-        ^{opsys_family_tbl.}^.opsys_family_id = ^{ac1.}^.opsys_family_id
-    )
-    as virtrdf:OplOpsysFamilyToProductCategory .
-
-#  opl:DbmsEngine(dbms_engine_tbl.dbms_name)
-#    opl:hasProductCategory
-#    opl:ProductCategory(ac1.product_cat_code)
-#    where (
-#        ^{dbms_engine_tbl.}^.dbms_name = ^{ac1.}^.dbms_name
-#    )
-#    as virtrdf:OplDbmsToProductCategory .
-
-  opl:DbmsFamily(dbms_family_tbl.dbms_family_id)
-    opl:hasProductCategory
-    opl:ProductCategory(ac1.product_cat_code)
-    where (
-        ^{dbms_family_tbl.}^.dbms_family_id = ^{ac1.}^.dbms_family_id
-    )
-    as virtrdf:OplDbmsFamilyToProductCategory .
-
-#  opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-#    opl:hasProductCategory
-#    opl:ProductCategory(ac1.product_cat_code)
-#    where (
-#        ^{processors_tbl.}^.processor_name = ^{ac1.}^.processor_name
-#        and
-#        ^{processors_tbl.}^.processor_mode_id = ^{ac1.}^.processor_mode_id
-#    )
-#    as virtrdf:OplProcessorToProductCategory .
-
-  opl:ProcessorFamily(processor_family_tbl.processor_family_id)
-    opl:hasProductCategory
-    opl:ProductCategory(ac1.product_cat_code)
-    where (
-        ^{processor_family_tbl.}^.processor_family_id = ^{ac1.}^.processor_family_id
-    )
-    as virtrdf:OplProcessorFamilyProductCategory .
-
-
-
-
-# ---------------------> to product_format
-
-#  opl:Opsys(opsys_tbl.opsys_name)
-#    opl:hasProductFormat
-#    opl:ProductFormat(ac1.product_format_code)
-#    where (
-#        ^{opsys_tbl.}^.opsys_name = ^{ac1.}^.opsys_name
-#    )
-#    as virtrdf:OplOpsysToProductFormat .
-
-  opl:OpsysFamily(opsys_family_tbl.opsys_family_id)
-    opl:hasProductFormat
-    opl:ProductFormat(ac1.product_format_code)
-    where (
-        ^{opsys_family_tbl.}^.opsys_family_id = ^{ac1.}^.opsys_family_id
-    )
-    as virtrdf:OplOpsysFamilyToProductFormat .
-
-#  opl:DbmsEngine(dbms_engine_tbl.dbms_name)
-#    opl:hasProductFormat
-#    opl:ProductFormat(ac1.product_format_code)
-#    where (
-#        ^{dbms_engine_tbl.}^.dbms_name = ^{ac1.}^.dbms_name
-#    )
-#    as virtrdf:OplDbmsToProductFormat .
-
-  opl:DbmsFamily(dbms_family_tbl.dbms_family_id)
-    opl:hasProductFormat
-    opl:ProductFormat(ac1.product_format_code)
-    where (
-        ^{dbms_family_tbl.}^.dbms_family_id = ^{ac1.}^.dbms_family_id
-    )
-    as virtrdf:OplDbmsFamilyToProductFormat .
-
-#  opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-#    opl:hasProductFormat
-#    opl:ProductFormat(ac1.product_format_code)
-#    where (
-#        ^{processors_tbl.}^.processor_name = ^{ac1.}^.processor_name
-#        and
-#        ^{processors_tbl.}^.processor_mode_id = ^{ac1.}^.processor_mode_id
-#    )
-#    as virtrdf:OplProcessorToProductFormat .
-
-  opl:ProcessorFamily(processor_family_tbl.processor_family_id)
-    opl:hasProductFormat
-    opl:ProductFormat(ac1.product_format_code)
-    where (
-        ^{processor_family_tbl.}^.processor_family_id = ^{ac1.}^.processor_family_id
-    )
-    as virtrdf:OplProcessorFamilyProductFormat .
-
-
-
-
-# ---------------------> to product_family
-
-#  opl:Opsys(opsys_tbl.opsys_name)
-#    opl:hasProductFamily
-#    opl:ProductFamily(ac1.product_family_code)
-#    where (
-#        ^{opsys_tbl.}^.opsys_name = ^{ac1.}^.opsys_name
-#    )
-#    as virtrdf:OplOpsysToProductFamily .
-
-  opl:OpsysFamily(opsys_family_tbl.opsys_family_id)
-    opl:hasProductFamily
-    opl:ProductFamily(ac1.product_family_code)
-    where (
-        ^{opsys_family_tbl.}^.opsys_family_id = ^{ac1.}^.opsys_family_id
-    )
-    as virtrdf:OplOpsysFamilyToProductFamily .
-
-#  opl:DbmsEngine(dbms_engine_tbl.dbms_name)
-#    opl:hasProductFamily
-#    opl:ProductFamily(ac1.product_family_code)
-#    where (
-#        ^{dbms_engine_tbl.}^.dbms_name = ^{ac1.}^.dbms_name
-#    )
-#    as virtrdf:OplDbmsToProductFamily .
-
-  opl:DbmsFamily(dbms_family_tbl.dbms_family_id)
-    opl:hasProductFamily
-    opl:ProductFamily(ac1.product_family_code)
-    where (
-        ^{dbms_family_tbl.}^.dbms_family_id = ^{ac1.}^.dbms_family_id
-    )
-    as virtrdf:OplDbmsFamilyToProductFamily .
-
-#  opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-#    opl:hasProductFamily
-#    opl:ProductFamily(ac1.product_family_code)
-#    where (
-#        ^{processors_tbl.}^.processor_name = ^{ac1.}^.processor_name
-#        and
-#        ^{processors_tbl.}^.processor_mode_id = ^{ac1.}^.processor_mode_id
-#    )
-#    as virtrdf:OplProcessorToProductFamily .
-
-  opl:ProcessorFamily(processor_family_tbl.processor_family_id)
-    opl:hasProductFamily
-    opl:ProductFamily(ac1.product_family_code)
-    where (
-        ^{processor_family_tbl.}^.processor_family_id = ^{ac1.}^.processor_family_id
-    )
-    as virtrdf:OplProcessorFamilyProductFamily .
-
-
-#
-# Product Benefits and things
-# =========================================
-
-	opl:ProductBenefit(product_benefits_tbl.product_benefit_id)
-	  a opl:ProductBenefit
-	  as virtrdf:OplProductBenefit ;
-	rdfs:label product_benefits_tbl.product_benefit_desc
-	  as virtrdf:rdfsLabelProductBenefitDescription ;
-	opl:isOfProductBenefitCategory opl:ProductBenefitCategory(product_benefits_tbl.product_benefit_category_id)
-	  as virtrdf:OplProductBenefitIsOfProductBenefitCategory ;
-	opl:Description product_benefits_tbl.product_benefit_desc
-	  as virtrdf:OplProductBenefitDescription ;
-	opl:Acronym product_benefits_tbl.product_benefit_acronym
-	  as virtrdf:OplProductBenefitAcronym ;
-  opl:Explanation product_benefits_tbl.product_benefit_explanation
-    as virtrdf:OplProductBenefitExplanation ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	opl:ProductBenefitCategory(product_benefits_category_tbl.product_benefit_category_id)
-	  a opl:ProductBenefitCategory
-	  as virtrdf:OplProductBenefitCategory ;
-	rdfs:label product_benefits_category_tbl.description
-	  as virtrdf:rdfsLabelProductBenefitCategoryDescription ;
-	opl:Description product_benefits_category_tbl.description
-	  as virtrdf:OplProductBenefitCategoryDescription ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	opl:ProductFeatureCategory(product_feature_category_tbl.product_feature_category_id)
-	  a opl:ProductFeatureCategory
-	  as virtrdf:OplProductFeatureCategory ;
-	rdfs:label product_feature_category_tbl.short_desc
-	  as virtrdf:rdfsLabelProductFeatureCategoryShortDescription ;
-	opl:ShortDescription product_feature_category_tbl.short_desc
-	  as virtrdf:OplProductFeatureCategoryShortDescription ;
-	opl:Description product_feature_category_tbl.description
-	  as virtrdf:OplProductFeatureCategoryDescription ;
-	opl:StandardsId product_feature_category_tbl.standards_id
-	  as virtrdf:OplProductFeatureCategoryStandardsId ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	opl:ProductFeature(product_features_tbl.product_feature_id)
-	  a opl:ProductFeature
-	  as virtrdf:OplProductFeature ;
-	rdfs:label product_features_tbl.short_description
-		as virtrdf:rdfsLabelProductFeaturesShortDescription ;
-	opl:Description product_features_tbl.short_description
-		as virtrdf:OplProductFeaturesShortDescription ;
-	dc:description opl:lit_to_string(product_features_tbl.long_description)
-		as virtrdf:OplProductFeaturesLongDescription ;
-	opl:isOfProductBenefit opl:ProductBenefit(product_features_tbl.product_feature_benefit_id)
-		as virtrdf:ProductFeaturesIsOfProductBenefit ;
-	opl:isOfProductFeatureCategory opl:ProductFeatureCategory(product_features_tbl.product_feature_category_id)
-		as virtrdf:ProductFeaturesIsOfProductFeatureCategory ;
-	opl:isOfProduct opl:Product(product_features_tbl.product_id)
-		as virtrdf:ProductFeaturesIsOfProduct ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-    opl:Product(product_with_code.product_id)
-      opl:hasFeature
-      opl:ProductFeature(product_features_tbl.product_feature_id)
-      where (
-	    ^{product_with_code.}^.product_id = ^{product_features_tbl.}^.product_id
-	)
-	as virtrdf:OplProductHasProductFeaturesProductFeatures .
-
-    opl:ProductFeature(product_features_tbl.product_feature_id)
-      opl:isFeatureOf
-      opl:Product(product_with_code.product_id)
-      where (
-        ^{product_with_code.}^.product_id = ^{product_features_tbl.}^.product_id
-    )
-    as virtrdf:OplProductFeaturesAreProductFeaturesProduct .
-
-
-	opl:ProductFamilyFeature(product_family_features_tbl.product_family_feature_id)
-	  a opl:ProductFamilyFeature
-		as virtrdf:OplProductFamilyFeature ;
-	rdfs:label product_family_features_tbl.short_description
-		as virtrdf:rdfsLabelProductFamilyFeaturesShortDescription ;
-	opl:Description product_family_features_tbl.short_description
-		as virtrdf:OplProductFamilyFeaturesShortDescription ;
-	dc:description opl:lit_to_string(product_family_features_tbl.long_description)
-		as virtrdf:OplProductFamilyFeaturesLongDescription ;
-	opl:isOfProductBenefit opl:ProductBenefit(product_family_features_tbl.product_family_feature_benefit_id)
-		as virtrdf:ProductFamilyFeaturesIsOfProductBenefit ;
-	opl:isOfProductFeatureCategory opl:ProductFeatureCategory(product_family_features_tbl.product_family_feature_cat_id)
-		as virtrdf:ProductFamilyFeaturesIsOfProductFeatureCategory ;
-	opl:isOfProductFamily opl:ProductFamily(product_family_features_tbl.product_family_code)
-		as virtrdf:ProductFamilyFeaturesIsOfProductFamily ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-    opl:ProductFamily(product_family_tbl.product_family_code)
-      opl:hasFeature
-      opl:ProductFamilyFeature(product_family_features_tbl.product_family_feature_id)
-      where (
-	    ^{product_family_tbl.}^.product_family_id = ^{product_family_features_tbl.}^.product_family_id
-	)
-	as virtrdf:OplProductFamilyHasProductFamilyFeaturesProductFamilyFeatures .
-
-    opl:ProductFamilyFeature(product_family_features_tbl.product_family_feature_id)
-      opl:isFeatureOf
-      opl:Product(product_family_tbl.product_family_code)
-      where (
-        ^{product_family_tbl.}^.product_family_id = ^{product_family_features_tbl.}^.product_family_id
-    )
-    as virtrdf:OplProductFamilyFeaturesAreProductFamilyFeaturesProductFamily .
-
-
-	opl:ProductFormatFeature(product_format_features_tbl.product_format_feature_id)
-	  a opl:ProductFormatFeature
-	  as virtrdf:OplProductFormatFeature ;
-	rdfs:label product_format_features_tbl.short_description
-		as virtrdf:rdfsLabelProductFormatFeaturesShortDescription ;
-	opl:Description product_format_features_tbl.short_description
-		as virtrdf:OplProductFormatFeaturesShortDescription ;
-	dc:description opl:lit_to_string(product_format_features_tbl.long_description)
-		as virtrdf:OplProductFormatFeaturesLongDescription ;
-	opl:isOfProductBenefit opl:ProductBenefit(product_format_features_tbl.product_format_feature_benefit_id)
-		as virtrdf:ProductFormatFeaturesIsOfProductBenefit ;
-	opl:isOfProductFeatureCategory opl:ProductFeatureCategory(product_format_features_tbl.product_format_feature_cat_id)
-		as virtrdf:ProductFormatFeaturesIsOfProductFeatureCategory ;
-	opl:isOfProductFormat opl:ProductFormat(product_format_features_tbl.product_format_code)
-		as virtrdf:ProductFormatFeaturesIsOfProductFormat ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-    opl:ProductFormat(product_format_with_code.product_format_code)
-      opl:hasFeature
-      opl:ProductFormatFeature(product_format_features_tbl.product_format_feature_id)
-      where (
-	    ^{product_format_with_code.}^.product_format_id = ^{product_format_features_tbl.}^.product_format_id
-	)
-	as virtrdf:OplProductFormatHasProductFormatFeaturesProductFormatFeatures .
-
-    opl:ProductFormatFeature(product_format_features_tbl.product_format_feature_id)
-      opl:isFeatureOf
-      opl:ProductFormat(product_format_with_code.product_format_code)
-      where (
-        ^{product_format_with_code.}^.product_format_id = ^{product_format_features_tbl.}^.product_format_id
-    )
-    as virtrdf:OplProductFormatFeaturesAreProductFormatFeaturesProductFormat .
-
-
-
-	opl:ProductCategoryFeature(product_category_features_tbl.product_category_feature_id)
-	  a opl:ProductCategoryFeature
-	  as virtrdf:OplProductCategoryFeature ;
-	rdfs:label product_category_features_tbl.short_description
-		as virtrdf:rdfsLabelProductCategoryFeaturesShortDescription ;
-	opl:Description product_category_features_tbl.short_description
-		as virtrdf:OplProductCategoryFeaturesShortDescription ;
-	dc:description opl:lit_to_string(product_category_features_tbl.long_description)
-		as virtrdf:OplProductCategoryFeaturesLongDescription ;
-	opl:isOfProductBenefit opl:ProductBenefit(product_category_features_tbl.product_category_feature_benefit_id)
-		as virtrdf:ProductCategoryFeaturesIsOfProductBenefit ;
-	opl:isOfProductFeatureCategory opl:ProductFeatureCategory(product_category_features_tbl.product_category_feature_category_id)
-		as virtrdf:ProductCategoryFeaturesIsOfProductFeatureCategory ;
-	opl:isOfProductCategory opl:ProductCategory(product_category_features_tbl.product_cat_code)
-		as virtrdf:ProductCategoryFeaturesIsOfProductCategory ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-    opl:ProductCategory(product_category_with_code.product_cat_code)
-      opl:hasFeature
-      opl:ProductCategoryFeature(product_category_features_tbl.product_category_feature_id)
-      where (
-	    ^{product_category_with_code.}^.product_cat_id = ^{product_category_features_tbl.}^.product_cat_id
-	)
-	as virtrdf:OplProductCategoryHasProductCategoryFeaturesProductCategoryFeatures .
-
-    opl:ProductCategoryFeature(product_category_features_tbl.product_category_feature_id)
-      opl:isFeatureOf
-      opl:ProductCategory(product_category_with_code.product_cat_code)
-      where (
-        ^{product_category_with_code.}^.product_cat_id = ^{product_category_features_tbl.}^.product_cat_id
-    )
-    as virtrdf:OplProductCategoryFeaturesAreProductCategoryFeaturesProductCategory .
-
-
-	opl:ProductReleaseFeature(product_release_features_tbl.product_release_feature_id)
-	  a opl:ProductReleaseFeature
-	  as virtrdf:OplProductReleaseFeature ;
-	rdfs:label product_release_features_tbl.short_description
-		as virtrdf:rdfsLabelProductReleaseFeaturesShortDescription ;
-	opl:Description product_release_features_tbl.short_description
-		as virtrdf:OplProductReleaseFeaturesShortDescription ;
-	dc:description opl:lit_to_string(product_release_features_tbl.long_description)
-		as virtrdf:OplProductReleaseFeaturesLongDescription ;
-	opl:isOfProductBenefit opl:ProductBenefit(product_release_features_tbl.product_release_feature_benefit_id)
-		as virtrdf:ProductReleaseFeaturesIsOfProductBenefit ;
-	opl:isOfProductFeatureCategory opl:ProductFeatureCategory(product_release_features_tbl.product_release_feature_cat_id)
-		as virtrdf:ProductReleaseFeaturesIsOfProductFeatureCategory ;
-	opl:isOfProduct opl:Product(product_release_features_tbl.product_id)
-		as virtrdf:ProductReleaseFeaturesIsOfProduct ;
-	opl:ProductReleaseId product_release_features_tbl.product_release_id
-		as virtrdf:ProductReleaseFeaturesProductRelease ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-	.
-
-
-	} .
-} .
-;
-
-
-
-
-DB.DBA.RDF_AUDIT_METADATA (1, '*');
-
-
-SPARQL
-prefix opl: <http://www.openlinksw.com/schemas/oplweb#>
-prefix dc: <http://purl.org/dc/terms#>
-prefix oplsioc: <http://www.openlinksw.com/schemas/oplsioc#>
-prefix sioc: <http://rdfs.org/sioc/ns#>
-prefix foaf: <http://xmlns.com/foaf/0.1/>
-prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
-prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
-prefix oplds: <http://www.openlinksw.com/dataspace/organization/openlink#>
-prefix owl: <http://www.w3.org/2002/07/owl#>
-prefix umbel: <http://umbel.org/umbel/sc/>
-prefix gr: <http://purl.org/goodrelations/v1#>
-
-alter quad storage virtrdf:DefaultQuadStorage
-FROM oplweb2.oplweb.component_archive as component_archive_tbl
-FROM oplweb2.oplweb.component_archive_type as component_archive_type_tbl
-FROM oplweb2.oplweb.component_category as component_category_tbl text literal component_category_long_description
-FROM oplweb2.oplweb.component_mode as component_mode_tbl
-FROM oplweb2.oplweb.component_type as component_type_tbl
-FROM oplweb2.oplweb.components_for_rdfs as components_tbl
-FROM oplweb2.oplweb.dbms_engine as dbms_engine_tbl
-FROM oplweb2.oplweb.dbms_family as dbms_family_tbl
-FROM oplweb2.oplweb.download_location as download_location_tbl
-FROM oplweb2.oplweb.download_protocol as download_protocol_tbl
-FROM oplweb2.oplweb.download_partner as download_partner_tbl
-FROM oplweb2.oplweb.opsys as opsys_tbl
-FROM oplweb2.oplweb.opsys_family as opsys_family_tbl
-FROM oplweb2.oplweb.opsys_type as opsys_type_tbl
-FROM oplweb2.oplweb.processor_family as processor_family_tbl
-FROM oplweb2.oplweb.processor_mode as processor_mode_tbl
-FROM oplweb2.oplweb.processors as processors_tbl
-FROM oplweb2.oplweb.product as product_tbl text literal long_description
-FROM oplweb2.oplweb.product_benefits as product_benefits_tbl text literal product_benefit_explanation
-FROM oplweb2.oplweb.product_benefits_category as product_benefits_category_tbl
-FROM oplweb2.oplweb.product_category as product_category_tbl
-FROM oplweb2.oplweb.product_category_features_with_code as product_category_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_family as product_family_tbl
-FROM oplweb2.oplweb.product_family as product_family_tbl_2
-FROM oplweb2.oplweb.product_family_features_with_code as product_family_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_features as product_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_feature_category as product_feature_category_tbl text literal description
-FROM oplweb2.oplweb.product_format_features_with_code as product_format_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_release_features as product_release_features_tbl text literal long_description
-FROM oplweb2.oplweb.product_release_with_family as product_release_tbl
-FROM oplweb2.oplweb.vendor_category as vendor_category_tbl
-FROM oplweb2.oplweb.vendor_category_family as vendor_category_family_tbl
-FROM oplweb2.oplweb.vendors as vendors_tbl
-FROM oplweb2.oplweb.product_formats_categories as product_formats_categories
-FROM oplweb2.oplweb.product_with_code as product_with_code
-FROM oplweb2.oplweb.product_category_with_code as product_category_with_code
-FROM oplweb2.oplweb.product_format as product_format_with_code
-FROM oplweb2.oplweb.product_price as pp
-FROM oplweb2.oplweb.product_price_type as pt
-FROM oplweb2.DBA.license_model_unit_type as put
-FROM oplweb2.DBA.license_model_unit_type as put2
-FROM oplweb2.DBA.license_model as lm
-FROM oplweb2.DBA.license_model as lm2
-FROM oplweb2.DBA.license_model_type as license_model_type_tbl
-FROM oplweb2.DBA.product_price_varchar as ppv
-FROM oplweb2.DBA.product_general_discount_vc as gd
-FROM oplweb2.oplweb.archive_coverage_osdb as ac1
-{
-	create virtrdf:product_portfolio2 as
-		graph <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-	  option (exclusive)
-	{
-
-  opl:ProcessorFamily(processor_family_tbl.processor_family_id)
-    opl:hasProcessors
-    opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-    where (
-        ^{processor_family_tbl.}^.processor_family_id = ^{processors_tbl.}^.processor_family_id
-    )
-    as virtrdf:OplProcessorFamilyHasProcessors .
-
-
-  opl:Processor(processors_tbl.processor_name, processors_tbl.processor_mode_id)
-    opl:hasProductFamily
-    opl:ProductFamily(ac1.product_family_code)
-    where (
-        ^{processors_tbl.}^.processor_name = ^{ac1.}^.processor_name
-        and
-        ^{processors_tbl.}^.processor_mode_id = ^{ac1.}^.processor_mode_id
-    )
-    as virtrdf:OplProcessorToProductFamily .
-
-
-
-#
-# Product Licensing and Shop stuff
-# =========================================
-
-
-	  opl:ProductRelease(
-	      product_release_tbl.product_id,
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	      )
-      opl:hasLicenseModel
-      opl:LicenseModel(
-        lm.product_release_id,
-        lm.product_id,
-        lm.opsys_family_id,
-        lm.dbms_family_id,
-        lm.product_price_type_id
-	  )
-      where (
-        ^{lm.}^.product_id = ^{product_release_tbl.}^.product_id and
-        ^{lm.}^.product_release_id = ^{product_release_tbl.}^.product_release_id and
-        ^{lm.}^.opsys_family_id = ^{product_release_tbl.}^.opsys_family_id and
-        ^{lm.}^.dbms_family_id = ^{product_release_tbl.}^.dbms_family_id
-    )
-    as virtrdf:OplProductReleaseHasLicenseModel .
-
-	  opl:ProductRelease(
-	      product_release_tbl.product_id,
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-	      )
-      opl:hasPriceSample
-	  opl:lit_shop_sample (
-	      product_release_tbl.product_release_id,
-	      product_release_tbl.product_id,
-	      product_release_tbl.opsys_name,
-	      product_release_tbl.dbms_name
-      	)
-      as virtrdf:OplPriceSamples .
-
-
-	opl:LicenseModel(
-	    lm.product_release_id,
-        lm.product_id,
-        lm.opsys_family_id,
-        lm.dbms_family_id,
-		lm.product_price_type_id)
-	a opl:LicenseModel
-	as virtrdf:OplLicenseModel;
-	a gr:Sell
-	as virtrdf:OplLicenseModelAgrSell ;
-	a gr:ActualProductOrServiceInstance
-	as virtrdf:OplLicenseModelAgrProductOrServiceInstance ;
-	rdfs:label opl:lit_license_model_type(
-		lm.product_price_type_id
-	) as virtrdf:OplLabelLicenseModel ;
-	rdfs:description opl:lit_license_model_explain (
-		lm.product_price_type_id
-	) as virtrdf:OplLicenseModelExplain ;
-	opl:ProductReleaseId
-	  lm.product_release_id
-	  as virtrdf:lm_shop_price_product_release;
-	opl:isOfFormat
-	  opl:ProductFormat(lm.product_format_code)
-	  as virtrdf:lm_shop_price_product_format;
-	opl:isOfCategory
-	  opl:ProductCategory(lm.product_cat_code)
-	  as virtrdf:lm_shop_price_product_cat;
-	opl:OpsysFamily
-	  opl:OpsysFamily(lm.opsys_family_id)
-	  as virtrdf:lm_shop_price_opsys_family_oplweb;
-	opl:OpsysType
-	  opl:OpsysType(lm.opsys_type_id)
-	  as virtrdf:lm_shop_price_opsys_type;
-	opl:DbmsFamily
-	  opl:DbmsFamily(lm.dbms_family_id)
-	  as virtrdf:lm_shop_price_dbms_family	;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs: ;
-      rdfs:isDefinedBy gr:
-		.
-
-
-	opl:LicenseModel(
-	    lm.product_release_id,
-        lm.product_id,
-        lm.opsys_family_id,
-        lm.dbms_family_id,
-		lm.product_price_type_id)
-	opl:hasPriceUnitType
-	opl:PriceUnitType(
-	    lm2.product_release_id,
-        lm2.product_id,
-        lm2.opsys_family_id,
-        lm2.dbms_family_id,
-		lm2.product_price_type_id,
-		lm2.product_price_unit_type_id)
-      where (
-        ^{lm.}^.product_release_id = ^{lm2.}^.product_release_id AND
-        ^{lm.}^.product_id = ^{lm2.}^.product_id AND
-        ^{lm.}^.opsys_family_id = ^{lm2.}^.opsys_family_id AND
-        ^{lm.}^.opsys_type_id = ^{lm2.}^.opsys_type_id AND
-        ^{lm.}^.product_price_type_id = ^{lm2.}^.product_price_type_id AND
-		^{lm2.}^.product_price_unit_type_id <> 'db_sessions'
-        and
-        (
-          ^{lm.}^.dbms_family_id = ^{lm2.}^.dbms_family_id
-    	  OR
-          ^{lm2.}^.dbms_family_id = 15
-        )
-    )
-    as virtrdf:OplLicenseModelPriceUnitTypes .
-
-
-
-	opl:LicenseModel(
-	    lm.product_release_id,
-        lm.product_id,
-        lm.opsys_family_id,
-        lm.dbms_family_id,
-		lm.product_price_type_id)
-	gr:hasPriceSpecification
-	opl:PriceUnitType(
-	    lm2.product_release_id,
-        lm2.product_id,
-        lm2.opsys_family_id,
-        lm2.dbms_family_id,
-		lm2.product_price_type_id,
-		lm2.product_price_unit_type_id)
-      where (
-        ^{lm.}^.product_release_id = ^{lm2.}^.product_release_id AND
-        ^{lm.}^.product_id = ^{lm2.}^.product_id AND
-        ^{lm.}^.opsys_family_id = ^{lm2.}^.opsys_family_id AND
-        ^{lm.}^.opsys_type_id = ^{lm2.}^.opsys_type_id AND
-        ^{lm.}^.product_price_type_id = ^{lm2.}^.product_price_type_id AND
-		^{lm2.}^.product_price_unit_type_id = 'db_sessions'
-        and
-        (
-          ^{lm.}^.dbms_family_id = ^{lm2.}^.dbms_family_id
-    	  OR
-          ^{lm2.}^.dbms_family_id = 15
-        )
-    )
-    as virtrdf:OplLicenseModelBasePriceUnitTypes .
-
-
-	opl:Discount(
-	    gd.product_release_id,
-	    gd.opsys_type_id,
-	    gd.product_id,
-	    gd.opsys_family_id,
-	    gd.dbms_family_id,
-	    gd.product_price_type_id)
-	a opl:Discount
-	as virtrdf:product_discount;
-	rdfs:label gd.product_discount_description as virtrdf:OplLabelDiscount ;
-	rdfs:description gd.product_discount_description as virtrdf:OplDiscountExplain ;
-	opl:discount_description
-	  gd.product_discount_description
-	  as virtrdf:gd_discount_description;
-	opl:discount_start
-	  gd.discount_start
-	  as virtrdf:gd_discount_start;
-	opl:discount_end
-	  gd.discount_end
-	  as virtrdf:gd_discount_end;
-	opl:ProductPriceType
-	  opl:PriceType(gd.product_price_type_id)
-	  as virtrdf:gd_shop_price_type;
-	gr:hasUnitOfMeasurement
-	  opl:PriceType(gd.product_price_type_id)
-	  as virtrdf:gd_shop_price_type_grUnitOfMeasurement;
-	opl:ProductReleaseId
-	  gd.product_release_id
-	  as virtrdf:gd_shop_price_product_release;
-	opl:ProductFormat
-	  opl:ProductFormat(gd.product_format_code)
-	  as virtrdf:gd_shop_price_product_format;
-	opl:ProductCategory
-	  opl:ProductCategory(gd.product_cat_code)
-	  as virtrdf:gd_shop_price_product_cat;
-	opl:OpsysFamily
-	  opl:OpsysFamily(gd.opsys_family_id)
-	  as virtrdf:gd_shop_price_opsys_family_oplweb;
-	opl:OpsysType
-	  opl:OpsysType(gd.opsys_type_id)
-	  as virtrdf:gd_shop_price_opsys_type;
-	opl:DbmsFamily
-	  opl:DbmsFamily(gd.dbms_family_id)
-	  as virtrdf:gd_shop_price_dbms_family;
-	opl:discount_token
-	  gd.discount_token
-	  as virtrdf:gd_discount_token ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-
-
-	opl:PriceType(pt.product_price_type_id)
-	  a opl:PriceType
-	  as virtrdf:shop_product_price_type;
-	rdfs:label pt.product_price_type_description as virtrdf:OplLabelPriceType ;
-	rdfs:description pt.product_price_type_description as virtrdf:OplPriceTypeExplain ;
-	opl:PriceTypeDescription
-	  pt.product_price_type_description
-	  as virtrdf:shop_product_price_type_description;
-	dc:description
-	  pt.product_price_type_long_description
-	  as virtrdf:shop_product_price_type_long_description ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy dc: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-	opl:PriceUnitType(
-		put.product_release_id,
-        put.product_id,
-        put.opsys_family_id,
-        put.dbms_family_id,
-		put.product_price_type_id,
-		put.product_price_unit_type_id)
-	  a opl:PriceUnitType
-	  as virtrdf:shop_product_price_unit_type;
-	rdfs:label put.product_price_unit_description as virtrdf:OplLabelproductpriceunitdescription ;
-	rdfs:description put.product_price_unit_description as virtrdf:OplproductpriceunitdescriptionExplain ;
-	gr:hasUnitOfMeasurement
-	  opl:PriceType(put.product_price_type_id)
-	  as virtrdf:put_shop_price_type_grUnitOfMeasurement;
-	opl:unitValue
-	  put.unit_price
-	  as virtrdf:unit_type_unit_price;
-	gr:hasValue
-	  put.unit_price
-	  as virtrdf:unit_type_unit_price_grHasValue;
-	opl:graceUnits
-	  put.unit_grace
-	  as virtrdf:unit_type_unit_grace;
-	opl:minUnits
-	  put.unit_low
-	  as virtrdf:unit_type_unit_low;
-	opl:maxUnits
-	  put.unit_cap
-	  as virtrdf:unit_type_unit_cap;
-	opl:unit_type_description
-	  put.product_price_unit_description
-	  as virtrdf:unit_type_description ;
-      rdfs:isDefinedBy opl: ;
-      rdfs:isDefinedBy rdfs:
-		.
-
-
-    opl:PriceUnitType(
-		put.product_release_id,
-        put.product_id,
-        put.opsys_family_id,
-        put.dbms_family_id,
-		put.product_price_type_id,
-		put.product_price_unit_type_id
-	  )
-      opl:hasIncrementalDiscount
-      opl:PriceUnitIncrementalDiscount(
-		put2.product_release_id,
-        put2.product_id,
-        put2.opsys_family_id,
-        put2.dbms_family_id,
-		put2.product_price_type_id,
-		put2.product_price_unit_type_id
-	  )
-      where (
-		^{put.}^.product_release_id = ^{put2.}^.product_release_id and
-        ^{put.}^.product_id = ^{put2.}^.product_id and
-        ^{put.}^.opsys_family_id = ^{put2.}^.opsys_family_id and
-        ^{put.}^.dbms_family_id = ^{put2.}^.dbms_family_id and
-		^{put.}^.product_price_type_id = ^{put2.}^.product_price_type_id and
-		^{put.}^.product_price_unit_type_id = ^{put2.}^.product_price_unit_type_id
-    )
-    as virtrdf:OplLicenseModelUnitsIncrementalDiscounts .
-
-
-	opl:PriceUnitIncrementalDiscount(
-		put.product_release_id,
-        put.product_id,
-        put.opsys_family_id,
-        put.dbms_family_id,
-		put.product_price_type_id,
-		put.product_price_unit_type_id)
-	  a opl:PriceUnitIncrementalDiscount
-	  as virtrdf:shop_product_price_unit_type_incremental_discount;
-	rdfs:label put.product_price_unit_description as virtrdf:OplLabelproductpriceunitIncDisdescription ;
-	rdfs:description put.product_price_unit_description as virtrdf:OplproductpriceunitIncDisdescriptionExplain ;
-	opl:percentageOfBase
-	  put.unit_discount
-	  as virtrdf:unit_type_unit_discount;
-	opl:triggerPoint
-	  put.quantity
-	  as virtrdf:unit_type_unit_discount_quantity
-	.
-
-
-      opl:LicenseModel(
-        lm.product_release_id,
-        lm.product_id,
-        lm.opsys_family_id,
-        lm.dbms_family_id,
-        lm.product_price_type_id
-	  )
-      opl:hasGeneralDiscounts
-      opl:Discount(
-	    gd.product_release_id,
-	    gd.opsys_type_id,
-	    gd.product_id,
-	    gd.opsys_family_id,
-	    gd.dbms_family_id,
-	    gd.product_price_type_id
-	  )
-      where (
-        ^{lm.}^.product_release_id = ^{gd.}^.product_release_id AND
-        ^{lm.}^.product_id = ^{gd.}^.product_id AND
-        ^{lm.}^.opsys_family_id = ^{gd.}^.opsys_family_id AND
-        ^{lm.}^.dbms_family_id = ^{gd.}^.dbms_family_id AND
-        ^{lm.}^.opsys_type_id = ^{gd.}^.opsys_type_id AND
-        ^{lm.}^.product_price_type_id = ^{gd.}^.product_price_type_id
-    )
-    as virtrdf:OplLicenseModelGeneralDiscounts .
-
-
-
-	} .
-} .
-;
-
-
-DB.DBA.XML_SET_NS_DECL ('OpenLink', 'http://www.openlinksw.com/schemas/oplweb#', 2);
-DB.DBA.XML_SET_NS_DECL ('OplProductCategory', 'http://data.openlinksw.com/oplweb/product_category/', 2);
-DB.DBA.XML_SET_NS_DECL ('OplProductFamily', 'http://data.openlinksw.com/oplweb/product_family/', 2);
-DB.DBA.XML_SET_NS_DECL ('OplProductFormat', 'http://data.openlinksw.com/oplweb/product_format/', 2);
-DB.DBA.XML_SET_NS_DECL ('OplProduct', 'http://data.openlinksw.com/oplweb/product/', 2);
-DB.DBA.XML_SET_NS_DECL ('OplProductRelease', 'http://data.openlinksw.com/oplweb/product_release/', 2);
-
-
-DB.DBA.RDF_AUDIT_METADATA (1, '*');
-
-
-commit work;
--- Clear the 'cache' for immediate effects
-SELECT hs_local_iri, exec ('SPARQL clear graph <'||hs_local_iri||'>')
-  FROM sys_http_sponge
-  WHERE hs_local_iri like '%oplweb%';
-
-SELECT id_to_iri(G), exec ('SPARQL clear graph <'||id_to_iri(G)||'>')
-  FROM rdf_quad
-  WHERE id_to_iri(G) like '%oplweb%';
-
-SPARQL CLEAR GRAPH <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>;
-commit work;
-
-
-SPARQL CONSTRUCT { <http://data.openlinksw.com/oplweb/product_family/uda#this> ?p ?o }
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/product_family/uda#this> ?p ?o }
-;
-
-SPARQL SELECT *
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/product_category/odbc#this> ?p ?o }
-  limit 100
-;
-
-SPARQL define get:soft "soft" SELECT *
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/product_category/odbc#this> ?p ?o }
-  limit 100
-;
-
-SPARQL CONSTRUCT { <http://data.openlinksw.com/oplweb/product_category/jdbc#this> ?p ?o }
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/product_category/jdbc#this> ?p ?o }
-  limit 100
-;
-
-SPARQL CONSTRUCT { <http://data.openlinksw.com/oplweb/product_format/mt#this> ?p ?o }
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/product_format/mt#this> ?p ?o }
-  limit 1
-;
-
-
-SPARQL SELECT  ?p ?o
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/product_family/uda#this> ?p ?o }
-  limit 1
-;
-
-SPARQL
-prefix opl: <http://www.openlinksw.com/schemas/oplweb#>
-SELECT  ?s ?o
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { ?s opl:hasProcessors ?o }
-  limit 1
-;
-
-SPARQL
-prefix opl: <http://www.openlinksw.com/schemas/oplweb#>
-SELECT distinct ?o
-  FROM <http://www.openlinksw.com/dataspace/organization/openlink/oplweb/>
-  WHERE { <http://data.openlinksw.com/oplweb/processor/i686_1#this> opl:hasProductFamily ?o }
-  limit 10
-;
-
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/price_unit_type/6.1_odbc-sqlserver-st_1_2_1_db_sessions#this"
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/price_unit_type/6.1_odbc-sqlserver-st_1_2_1_cpu#this"
-
---SELECT top 10 * FROM oplweb2.DBA.license_model_unit_type WHERE product_release_id = '6.1' and product_id = 'odbc-sqlserver-st'
---  and opsys_family_id = 1 and dbms_family_id = 15 and product_price_type_id = 1 and product_price_unit_type_id = 'cpu';
-
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/rdfbrowser/index.html?uri=http%3A//data.openlinksw.com/oplweb/component_archive/6.1-odbc-oracle-st-i686-generic-win-32-ora10-odbclt-clnt-only_mv.msi"
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/product_family/uda"
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/product_category/odbc"
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/dbms_family/MySQL"
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/product_release/odbc-oracle-mt_6.1_i686-generic-win-32_ora9"
--- curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/license_model/6.1_odbc-sqlserver-st_1_2_1"
-
-
-
-
-curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/rdfbrowser/index.html?uri=http%3A//data.openlinksw.com/oplweb/component_archive/6.1-odbc-oracle-st-i686-generic-win-32-ora10-odbclt-clnt-only_mv.msi"
-curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/product_family/uda"
-curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/product_release/odbc-oracle-mt_6.1_i686-generic-win-32_ora9"
-curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/license_model/6.1_odbc-sqlserver-st_1_2_1"
-
---
--- XXX: note , the below would work only if www.openlinksw.com has the GRAPH <http://data.openlinksw.com/oplweb/>
--- if experimenting on other box, then www.openlinksw.com should be replaced with [URIQA] DefaultHost INI value
---
-
-
-
-DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
-    'oplweb2_rule2',
-    1,
-    '/oplweb(/[^#]*)',
-    vector('path'),
-    1,
-    '/sparql?query=CONSTRUCT+{+%%3Chttp%%3A//data.openlinksw.com/oplweb%U%%23this%%3E+%%3Fp+%%3Fo+}+FROM+%%3Chttp%%3A//www.openlinksw.com/dataspace/organization/openlink/oplweb/%%3E+WHERE+{+%%3Chttp%%3A//data.openlinksw.com/oplweb%U%%23this%%3E+%%3Fp+%%3Fo+}&format=%U',
-    vector('path', 'path', '*accept*'),
-    null,
-    '(text/rdf.n3)|(application/rdf.xml)',
-    0,
-    null
-    );
-
-DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
-    'oplweb2_rule1',
-    1,
-    '(/oplweb/[^#]*)',
-    vector('path'),
-    1,
-    '/rdfbrowser/index.html?uri=http%%3A//data.openlinksw.com%U%',
---    '/DAV/RDF/rdfqry.vsp?uri=http%%3A//data.openlinksw.com%U%%23this',
-    vector('path'),
-    null,
-    '(text/html)|(\\*/\\*)',
-    0,
-    303
-    );
-
-DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
-    'oplweb2_rule3',
-    1,
-    '(/[^#]*)/\x24',
-    vector('path'),
-    1,
-    '%s',
-    vector('path'),
-    null,
-    null,
-    0,
-    null
-    );
-
-
-
-create procedure DB.DBA.REDO_OPLWEB2_RDF_DET()
-{
-  declare colid int;
-  colid := DAV_SEARCH_ID('/DAV/RDF/oplweb2/', 'C');
-  if (colid < 0)
-    return;
-  update WS.WS.SYS_DAV_COL set COL_DET=null where COL_ID = colid;
-}
-;
-
-DB.DBA.REDO_OPLWEB2_RDF_DET();
-
-drop procedure DB.DBA.REDO_OPLWEB2_RDF_DET;
-
-DB.DBA."RDFData_MAKE_DET_COL" ('/DAV/RDF/oplweb2/', 'http://data.openlinksw.com/oplweb', NULL);
-VHOST_REMOVE (lpath=>'/oplweb/data/rdf');
-DB.DBA.VHOST_DEFINE (lpath=>'/oplweb/data/rdf', ppath=>'/DAV/RDF/oplweb2/All/', is_dav=>1, vsp_user=>'dba');
-
--- procedure to convert path to DET resource name
-create procedure DB.DBA.OPLWEB2_DET_REF (in par varchar, in fmt varchar, in val varchar)
-{
-  declare res, iri any;
-  iri := 'http://data.openlinksw.com/oplweb' || val;
-  res := sprintf ('iid (%d).rdf', iri_id_num (iri_to_id (iri)));
-  return sprintf (fmt, res);
-}
-;
-
-DB.DBA.URLREWRITE_CREATE_REGEX_RULE ('oplweb2_rdf', 1,
-    '/oplweb/(.*)', vector('path'), 1,
-    '/oplweb/data/rdf/%U', vector('path'),
-    'DB.DBA.OPLWEB2_DET_REF',
-    'application/rdf.xml',
-    2,
-    303);
-
-
-DB.DBA.URLREWRITE_CREATE_RULELIST (
-    'oplweb2_rule_list1',
-    1,
-    vector (
-                'oplweb2_rule1',
-                'oplweb2_rule2',
-                'oplweb2_rule3',
-                'oplweb2_rdf'
-          ));
-
-
-VHOST_REMOVE (vhost=>'data.openlinksw.com:80', lpath=>'/oplweb');
-DB.DBA.VHOST_DEFINE (vhost=>'data.openlinksw.com:80', lpath=>'/oplweb', ppath=>'/DAV/RDF/oplweb2/',
-  vsp_user=>'dba', is_dav=>1, def_page=>'sfront.vspx', is_brws=>0, opts=>vector ('url_rewrite', 'oplweb2_rule_list1'));
-
-
-/*
-
-DB.DBA.VHOST_DEFINE (vhost=>'data.openlinksw.com:80', lhost=>':80', lpath=>'/rdf_net', ppath=>'/rdf_net');
-DB.DBA.VHOST_DEFINE (vhost=>'data.openlinksw.com:80', lhost=>':80', lpath=>'/sparql/',
-  ppath => '/!sparql/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1));
-
-VHOST_REMOVE (vhost=>'data.openlinksw.com', lpath=>'/proxy');
-DB.DBA.VHOST_DEFINE (vhost=>'data.openlinksw.com', lhost=>':80', lpath=>'/proxy',
-  ppath=>'/SOAP/Http/ext_http_proxy', soap_user=>'PROXY');
-
-DB.DBA.VHOST_DEFINE (vhost=>'data.openlinksw.com:80', lhost=>':80', lpath=>'/xml_a',
-  ppath=>'/SOAP/',soap_user=>'XML_A');
-DB.DBA.VHOST_DEFINE (vhost=>'data.openlinksw.com:80', lhost=>':80', lpath=>'/XMLA',
-  ppath=>'/SOAP/', soap_user=>'XMLA', soap_opts => vector ('ServiceName', 'XMLAnalysis', 'elementFormDefault', 'qualified'))
-
-GRANT EXECUTE ON DB.DBA.RDF_SPONGE_UP TO "SPARQL", "SPARQL_UPDATE";
-GRANT EXECUTE ON DB.DBA.TTLP_EV_NEW_GRAPH TO "SPARQL", "SPARQL_UPDATE";
-grant SPARQL_UPDATE to "SPARQL";
-
-curl -H "Accept: application/rdf+xml" "http://data.openlinksw.com/oplweb/product_family/uda#this"
-
-SELECT hs_local_iri, exec ('sparql clear graph <'||hs_local_iri||'>') from sys_http_sponge;
-
-*/
-
-
-
-OWL based Ontology
-
---sparql construct { ?x ?y ?z } from --<http://www.openlinksw.com/dataspace/organization/openlink#this>
---	where { ?x ?y ?z }
-
-DB.DBA.RDF_LOAD_RDFXML_MT (
-'<?xml version="1.0"?>
-<rdf:RDF
-    xmlns="http://www.openlinksw.com/dataspace/organization/openlink/oplweb#"
-    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
-    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-    xmlns:owl="http://www.w3.org/2002/07/owl#"
-    xmlns:foaf="http://xmlns.com/foaf/0.1/"
-    xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#"
-    xml:base="http://www.openlinksw.com/schemas/oplweb#">
-  <owl:Ontology rdf:about="http://www.openlinksw.com/schemas/oplweb#">
-        <rdfs:label>ProductPortfolio</rdfs:label>
-        <rdfs:comment>OpenLink Product Portfolio</rdfs:comment>
-        <virtrdf:catName>oplweb</virtrdf:catName>
-        <virtrdf:version>1.00</virtrdf:version>
-  </owl:Ontology>
-
-	<!-- Family / Category / Format -->
-
-	<rdfs:Class rdf:ID="ProductFamily">
-		<rdfs:label>Product Family</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Family
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductCategory">
-		<rdfs:label>Product Category</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Category
-		</rdfs:comment>
-    <rdfs:subPropertyOf rdf:resource="#ProductFamily"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductFormat">
-		<rdfs:label>Product Format</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Format
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductFormatCategory">
-		<rdfs:label>Product Format Category</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Format Category
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdf:Property rdf:ID="ProductFamilyDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:label>Product Family Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductFamilyLongDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:label>Product Family Long Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductFamilyCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:label>Product Family Long Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductFormatDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:label>Product Format Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductFormatLongDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:label>Product Format Long Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductFormatCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFormatCategory"/>
-    <rdfs:label>Product Format Long Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductCategoryDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:label>Product Category Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductCategoryLongDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:label>Product Category Long Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductCategoryCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFormatCategory"/>
-    <rdfs:label>Product Category Long Description</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="hasProduct">
-    <rdfs:range rdf:resource="#Product"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFormatCategory"/>
-    <rdfs:label>Product</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="hasCategory">
-    <rdfs:range rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:label>Product</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="hasFormat">
-    <rdfs:range rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:label>Product</rdfs:label>
-  </rdf:Property>
-
-
-	<!-- Vendor -->
-
-	<rdfs:Class rdf:ID="VendorCategoryFamily">
-		<rdfs:label>vendor_category_family</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			vendor_category_family
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="VendorCategory">
-		<rdfs:label>vendor_category</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			vendor_category
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="VendorCategoryFamily"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="Vendors">
-		<rdfs:label>vendors</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			vendors
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="VendorCategory"/>
-	</rdfs:Class>
-
-	<rdf:Property rdf:ID="VendorName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Vendors"/>
-    <rdfs:label>vendor name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="VendorCategoryFamilyDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#VendorCategoryFamily"/>
-    <rdfs:label>vendor_category_family_description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="VendorCategoryDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#VendorCategory"/>
-    <rdfs:label>vendor_category_description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="isOfVendorCategory">
-    <rdfs:range rdf:resource="#VendorCategory"/>
-    <rdfs:domain rdf:resource="#Vendors"/>
-    <rdfs:label>vendor_category_description</rdfs:label>
-  </rdf:Property>
-
-	<!-- Opsys / DBMS -->
-
-	<rdfs:Class rdf:ID="OpsysFamily">
-		<rdfs:label>Opsys Family</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Opsys Family
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="DbmsFamily">
-		<rdfs:label>Dbms Family</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Dbms Family
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="DbmsEngine">
-		<rdfs:label>Dbms Engine</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Dbms Engine
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="DbmsFamily"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="OpsysType">
-		<rdfs:label>Opsys Type</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Opsys Type
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProcessorMode">
-		<rdfs:label>Processor Mode</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Processor Mode
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="Processor">
-		<rdfs:label>Processor</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Processor
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="ProcessorFamily"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProcessorFamily">
-		<rdfs:label>Processor Family</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Processor Family
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="Opsys">
-		<rdfs:label>Dbms Engine</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			opsys
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="OpsysFamily"/>
-    <rdfs:subClassOf rdf:resource="OpsysType"/>
-	</rdfs:Class>
-
-	<rdf:Property rdf:ID="OpsysFamilyName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#OpsysFamily"/>
-    <rdfs:label>Opsys Family Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysFamilyRating">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#OpsysFamily"/>
-    <rdfs:label>Opsys Family Rating</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysFamilyLicenseCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#OpsysFamily"/>
-    <rdfs:label>Opsys Family License Code</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysFamilyVendor">
-    <rdfs:range rdf:resource="#Vendors"/>
-    <rdfs:domain rdf:resource="#OpsysFamily"/>
-    <rdfs:label>Opsys Family Vendor</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsFamilyName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsFamily"/>
-    <rdfs:label>DBMS Family Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsFamilyVendor">
-    <rdfs:range rdf:resource="#Vendors"/>
-    <rdfs:domain rdf:resource="#DbmsFamily"/>
-    <rdfs:label>DBMS Family Vendor</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:label>DBMS Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsVersion">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:label>DBMS Version</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsEngineRating">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:label>DBMS Engine Rating</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsEngineOldArchiveCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:label>DBMS Engine old Archive Code</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsUpwardCompatible">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:label>DBMS Upward Compatible</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="DbmsDownwardCompatible">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:label>DBMS Downward Compatible</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysTypeDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#OpsysType"/>
-    <rdfs:label>Opsys Type Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysTypeShortDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#OpsysType"/>
-    <rdfs:label>Opsys Type Short Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysVersion">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Version</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysUpwardCompatible">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Compatible</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysDownwardCompatible">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Downward Compatible</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysLicenseCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys License Code</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysCommercialName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Commercial Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysProcessor">
-    <rdfs:range rdf:resource="#Processor"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Processor</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="OpsysEmulation">
-    <rdfs:range rdf:resource="#ProcessorMode"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:label>Opsys Emulation Mode</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorModeName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProcessorMode"/>
-    <rdfs:label>Processor Mode Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Processor"/>
-    <rdfs:label>Processor Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorProcessorMode">
-    <rdfs:range rdf:resource="#ProcessorMode"/>
-    <rdfs:domain rdf:resource="#Processor"/>
-    <rdfs:label>Processor Mode</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Processor"/>
-    <rdfs:label>Processor Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorFamilyName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProcessorFamily"/>
-    <rdfs:label>Processor Family Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorFamilyDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProcessorFamily"/>
-    <rdfs:label>Processor Family Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProcessorFamilyVendor">
-    <rdfs:range rdf:resource="#Vendors"/>
-    <rdfs:domain rdf:resource="#ProcessorFamily"/>
-    <rdfs:label>Processor Family Vendor</rdfs:label>
-  </rdf:Property>
-
-
-	<!-- Product / Product Release -->
-
-	<rdfs:Class rdf:ID="Product">
-		<rdfs:label>Product</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product
-		</rdfs:comment>
-    <rdfs:subPropertyOf rdf:resource="#ProductFormat"/>
-    <rdfs:subPropertyOf rdf:resource="#ProductCategory"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductRelease">
-		<rdfs:label>Product Release</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Release
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#Product"/>
-	</rdfs:Class>
-
-	<rdf:Property rdf:ID="ProductId">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:label>Product ID</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="isOfCategory">
-    <rdfs:range rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:label>Product Category</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="isOfFormat">
-    <rdfs:range rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:label>Product Category</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductDescription">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:label>Product Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductLongDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:label>Product Long Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductReleaseId">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Product Release ID</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductReleaseOpsys">
-    <rdfs:range rdf:resource="#Opsys"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Product Release Opsys</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductReleaseDbms">
-    <rdfs:range rdf:resource="#DbmsEngine"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Product Release DBMS</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductReleaseUpwardCompatible">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Product Release upward compatible</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductReleaseDownwardCompatible">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Product Release downward compatible</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ProductReleaseSupported">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Product Release Supported</rdfs:label>
-  </rdf:Property>
-
-	<!-- Components -->
-
-	<rdfs:Class rdf:ID="Component">
-		<rdfs:label>Components</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Components
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ComponentMode">
-		<rdfs:label>Component Mode</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Component
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ComponentType">
-		<rdfs:label>Component</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Component Type
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ComponentCategory">
-		<rdfs:label>Component Category</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Component
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdf:Property rdf:ID="ComponentModeDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentMode"/>
-    <rdfs:label>Component Mode Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentModeShortDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentMode"/>
-    <rdfs:label>Component Mode Short Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentTypeDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentType"/>
-    <rdfs:label>Component Type Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentTypeShortDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentType"/>
-    <rdfs:label>Component Type Short Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentCategoryDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentCategory"/>
-    <rdfs:label>Component Category Description</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentCategoryLongDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentCategory"/>
-    <rdfs:label>Component Category Long Description</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentCategoryShortDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentCategory"/>
-    <rdfs:label>Component Category Short Description</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentCvsid">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components CVSID</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentBuildDate">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Build Date</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="Notes">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Notes</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="BuildComments">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Build Comments</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="Filesize">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Name</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentComponentCategory">
-    <rdfs:range rdf:resource="#ComponentCategory"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Component Category</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentComponentType">
-    <rdfs:range rdf:resource="#ComponentType"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Component Type</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentComponentMode">
-    <rdfs:range rdf:resource="#ComponentMode"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Component Mode</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentOpsys">
-    <rdfs:range rdf:resource="#Opsys"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components Opsys</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentDbmsEngine">
-    <rdfs:range rdf:resource="#DbmsEngine"/>
-    <rdfs:domain rdf:resource="#Component"/>
-    <rdfs:label>Components DBMS</rdfs:label>
-  </rdf:Property>
-
-	<!-- Component Archives -->
-
-	<rdfs:Class rdf:ID="ComponentArchive">
-		<rdfs:label>Component Archive</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Component Archives
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductRelease"/>
-    <rdfs:subClassOf rdf:resource="#Component"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ComponentArchiveType">
-		<rdfs:label>Component Archive Type</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Component Archives Type
-		</rdfs:comment>
-	</rdfs:Class>
-
-  <rdf:Property rdf:ID="ComponentArchiveTypeName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchiveType"/>
-    <rdfs:label>Component Archive Type Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveTypeShortName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchiveType"/>
-    <rdfs:label>Component Archive Type Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveTypeExtension">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchiveType"/>
-    <rdfs:label>Component Archive Type Extension</rdfs:label>
-  </rdf:Property>
-
-	<rdf:Property rdf:ID="ComponentArchiveComponentArchiveType">
-    <rdfs:range rdf:resource="#ComponentArchiveType"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive Component Archive Type</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveName">
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveAssemblyDate">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive Assembly Date</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveFileUri">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive File URI</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveLicenseCode">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive License Code</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveResName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive DAV Resource Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveResFullPath">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive DAV Full Path</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ComponentArchiveResFileSize">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:label>Component Archive File Size in DAV</rdfs:label>
-  </rdf:Property>
-
-	<!-- Download locations -->
-
-	<rdfs:Class rdf:ID="DownloadLocation">
-		<rdfs:label>Download Location</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Download Location
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ComponentArchive"/>
-    <rdfs:subClassOf rdf:resource="#DownloadPartner"/>
-    <rdfs:subClassOf rdf:resource="#DownloadProtocol"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="DownloadProtocol">
-		<rdfs:label>Download Protocol</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Download Protocol
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="DownloadPartner">
-		<rdfs:label>Download Partner</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Download Partner
-		</rdfs:comment>
-	</rdfs:Class>
-
-  <rdf:Property rdf:ID="ProtocolName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadProtocol"/>
-    <rdfs:label>Protocol Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ProtocolDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadProtocol"/>
-    <rdfs:label>Protocol Description</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ProtocolActive">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadProtocol"/>
-    <rdfs:label>Protocol Active</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="PartnerName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadPartner"/>
-    <rdfs:label>Download Partner Partner Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="HostName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadPartner"/>
-    <rdfs:label>Download Partner Hostname</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="DomainName">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadPartner"/>
-    <rdfs:label>Download Partner Domain Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="PortNumber">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadPartner"/>
-    <rdfs:label>Download Partner Port Number</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="Uri">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadLocation"/>
-    <rdfs:label>Download Location URI</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="UriOld">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#DownloadLocation"/>
-    <rdfs:label>Download Location URI Old</rdfs:label>
-  </rdf:Property>
-
-	<!-- Features and Benefits -->
-
-	<rdfs:Class rdf:ID="ProductBenefit">
-		<rdfs:label>Product Benefit</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Benefit
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductBenefitCategory"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductBenefitCategory">
-		<rdfs:label>Product Benefit</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Benefit
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductFeatureCategory">
-		<rdfs:label>Product Feature Category</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Feature Category
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductFeature">
-		<rdfs:label>Product Features</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Features
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:subClassOf rdf:resource="#ProductBenefit"/>
-    <rdfs:subClassOf rdf:resource="#Product"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductFamilyFeature">
-		<rdfs:label>Product Family Features</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Family Features
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:subClassOf rdf:resource="#ProductBenefit"/>
-    <rdfs:subClassOf rdf:resource="#ProductFamily"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductFormatFeature">
-		<rdfs:label>Product Format Features</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Format Features
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:subClassOf rdf:resource="#ProductBenefit"/>
-    <rdfs:subClassOf rdf:resource="#ProductFormat"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductCategoryFeature">
-		<rdfs:label>Product Category Features</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Category Features
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:subClassOf rdf:resource="#ProductBenefit"/>
-    <rdfs:subClassOf rdf:resource="#ProductCategory"/>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="ProductReleaseFeature">
-		<rdfs:label>Product Benefit</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Product Benefit
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:subClassOf rdf:resource="#ProductBenefit"/>
-    <rdfs:subClassOf rdf:resource="#ProductRelease"/>
-	</rdfs:Class>
-
-  <rdf:Property rdf:ID="ProductBenefitsCategoryDescription">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductBenefitsCategory"/>
-    <rdfs:label>product Benefits Category</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="Description">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductBenefit"/>
-    <rdfs:domain rdf:resource="#ProductBenefitCategory"/>
-    <rdfs:domain rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:domain rdf:resource="#ProductFeature"/>
-    <rdfs:domain rdf:resource="#ProductFamilyFeature"/>
-    <rdfs:domain rdf:resource="#ProductFormatFeature"/>
-    <rdfs:domain rdf:resource="#ProductCategoryFeature"/>
-    <rdfs:domain rdf:resource="#ProductReleaseFeature"/>
-    <rdfs:label>Product Benefits Description</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="Details">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductFeature"/>
-    <rdfs:domain rdf:resource="#ProductFamilyFeature"/>
-    <rdfs:domain rdf:resource="#ProductFormatFeature"/>
-    <rdfs:domain rdf:resource="#ProductCategoryFeature"/>
-    <rdfs:domain rdf:resource="#ProductReleaseFeature"/>
-    <rdfs:label>Product Benefits Description Details</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ProductBenefitsAcronym">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductBenefit"/>
-    <rdfs:label>Product Benefits Acronym</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="ProductBenefitsExplanation">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductBenefit"/>
-    <rdfs:label>Product Benefits Explanation</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="DemoUrl">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductCategoryFeature"/>
-    <rdfs:domain rdf:resource="#ProductFormatFeature"/>
-    <rdfs:domain rdf:resource="#ProductFamilyFeature"/>
-    <rdfs:domain rdf:resource="#ProductReleaseFeature"/>
-    <rdfs:label>The Features Demo URL</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="HypesPerSecond">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
-    <rdfs:domain rdf:resource="#ProductCategoryFeature"/>
-    <rdfs:domain rdf:resource="#ProductFormatFeature"/>
-    <rdfs:domain rdf:resource="#ProductFamilyFeature"/>
-    <rdfs:domain rdf:resource="#ProductreleaseFeature"/>
-    <rdfs:label>The Features Number of Hypes per second</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="Implemented">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#ProductCategoryFeature"/>
-    <rdfs:domain rdf:resource="#ProductFormatFeature"/>
-    <rdfs:domain rdf:resource="#ProductFamilyFeature"/>
-    <rdfs:domain rdf:resource="#ProductReleaseFeature"/>
-    <rdfs:label>The Features Short Description</rdfs:label>
-  </rdf:Property>
-
-<!-- shop / pricing stuff -->
-
-	<rdfs:Class rdf:ID="LicenseType">
-		<rdfs:label>License Type</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			License Type
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="UnitType">
-		<rdfs:label>Unit Type</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Unit Type
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="GeneralDiscount">
-		<rdfs:label>General Discount</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			General Discount
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="IncrementalDiscount">
-		<rdfs:label>Incremental Discount</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			Incremental Discount
-		</rdfs:comment>
-	</rdfs:Class>
-
-	<rdfs:Class rdf:ID="License">
-		<rdfs:label>License</rdfs:label>
-    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
-			License
-		</rdfs:comment>
-    <rdfs:subClassOf rdf:resource="#LicenseType"/>
-    <rdfs:subClassOf rdf:resource="#ProductRelease"/>
-	</rdfs:Class>
-
-  <rdf:Property rdf:ID="BaseCostUnit">
-    <rdfs:range rdf:resource="#UnitType"/>
-    <rdfs:domain rdf:resource="#License"/>
-    <rdfs:label>Base Unit Cost</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="PriceUnit">
-    <rdfs:range rdf:resource="#UnitType"/>
-    <rdfs:domain rdf:resource="#License"/>
-    <rdfs:label>Price Unit Cost</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="hasDiscount">
-    <rdfs:range rdf:resource="#IncrementalDiscount"/>
-    <rdfs:domain rdf:resource="#UnitType"/>
-    <rdfs:label>Base Unit Cost</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="hasGeneralDiscount">
-    <rdfs:range rdf:resource="#GeneralDiscount"/>
-    <rdfs:domain rdf:resource="#License"/>
-    <rdfs:label>General Discount</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="unitValue">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#UnitType"/>
-    <rdfs:label>Unit Value</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="graceUnit">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#UnitType"/>
-    <rdfs:label>Grace Unit</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="minUnits">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#UnitType"/>
-    <rdfs:label>Minimum Units</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="maxUnits">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#UnitType"/>
-    <rdfs:label>Maximum Units</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="codeWord">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#GeneralDiscount"/>
-    <rdfs:label>Code Word needed to activate this discount</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="startDate">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#GeneralDiscount"/>
-    <rdfs:label>Discount Start Date</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="endDate">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#GeneralDiscount"/>
-    <rdfs:label>Discount End Date</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="percentageOfCost">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#GeneralDiscount"/>
-    <rdfs:label>Percentage of cost attributing as discount</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="triggerPoint">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#IncrementalDiscount"/>
-    <rdfs:label>Discount Trigger Point</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="percentageOfBase">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:domain rdf:resource="#IncrementalDiscount"/>
-    <rdfs:label>Percentage of base cost attributing as discount</rdfs:label>
-  </rdf:Property>
-
-<!-- common properties -->
-
-  <rdf:Property rdf:ID="label">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2001/XMLSchema#label"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:domain rdf:resource="#VendorCategory"/>
-    <rdfs:domain rdf:resource="#Vendor"/>
-    <rdfs:domain rdf:resource="#OpsysFamily"/>
-    <rdfs:domain rdf:resource="#DbmsFamily"/>
-    <rdfs:domain rdf:resource="#DbmsEngine"/>
-    <rdfs:domain rdf:resource="#OpsysType"/>
-    <rdfs:domain rdf:resource="#Processor"/>
-    <rdfs:domain rdf:resource="#ProcessorFamily"/>
-    <rdfs:domain rdf:resource="#Opsys"/>
-    <rdfs:domain rdf:resource="#Product"/>
-    <rdfs:domain rdf:resource="#ComponentMode"/>
-    <rdfs:domain rdf:resource="#ComponentType"/>
-    <rdfs:domain rdf:resource="#ComponentCategory"/>
-    <rdfs:domain rdf:resource="#ComponentArchive"/>
-    <rdfs:domain rdf:resource="#ComponentArchiveType"/>
-    <rdfs:domain rdf:resource="#DownloadLocation"/>
-    <rdfs:domain rdf:resource="#ProductBenefit"/>
-    <rdfs:domain rdf:resource="#ProductBenefitCategory"/>
-    <rdfs:domain rdf:resource="#ProductFeatureCategory"/>
-    <rdfs:domain rdf:resource="#ProductFeature"/>
-    <rdfs:domain rdf:resource="#ProductFamilyFeature"/>
-    <rdfs:domain rdf:resource="#ProductFormatFeature"/>
-    <rdfs:domain rdf:resource="#ProductCategoryFeature"/>
-    <rdfs:domain rdf:resource="#ProductReleaseFeature"/>
-    <rdfs:domain rdf:resource="#LicenseModel"/>
-    <rdfs:domain rdf:resource="#Discount"/>
-    <rdfs:domain rdf:resource="#PriceType"/>
-    <rdfs:domain rdf:resource="#PriceUnitType"/>
-    <rdfs:label>Label</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="name">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/name"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Name</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="logo">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/logo"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:label>logo</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="homepage">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/homepage"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#ProcessorFamily"/>
-    <rdfs:domain rdf:resource="#OpsysFamily"/>
-    <rdfs:domain rdf:resource="#DbmsFamily"/>
-    <rdfs:label>homepage</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="maker">
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-    <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/maker"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:label>Maker</rdfs:label>
-  </rdf:Property>
-
-  <rdf:Property rdf:ID="sameAs">
-    <rdfs:range rdf:resource="owl#sameAs"/>
-    <rdfs:domain rdf:resource="#ProductCategory"/>
-    <rdfs:domain rdf:resource="#ProductFormat"/>
-    <rdfs:domain rdf:resource="#ProductFamily"/>
-    <rdfs:domain rdf:resource="#ProductRelease"/>
-    <rdfs:domain rdf:resource="#ProductFormatCategory"/>
-    <rdfs:label>Name</rdfs:label>
-  </rdf:Property>
-
-</rdf:RDF>
-
-',
-'http://www.openlinksw.com/schemas/oplweb#',
-'http://www.openlinksw.com/schemas/oplweb#')
---'http://www.openlinksw.com/dataspace/organization/openlink/ProductPortfolioOntology/1.0/')
-;
-
-rdfs_rule_set ('oplweb2_owlset', 'http://www.openlinksw.com/schemas/oplweb#', 1);
-
-DB.DBA.XML_SET_NS_DECL ('opl', 'http://www.openlinksw.com/schemas/oplweb#', 2);
-]]></programlisting>
-</sect2>
   <sect2 id="rdfviewsenterprsyb">
       <title>Sybase using demonstration 'pubs2' database</title>
 <programlisting><![CDATA[
--- Setup script for RDF views of Sybase 15 PUBS2 Sample Database --
+-- Setup script for Linked Data Views of Sybase 15 PUBS2 Sample Database --
 
 DB..vd_remote_data_source ('syb15ma-pubs2', '', '<uid>','<pwd>');
 
@@ -12070,7 +7051,7 @@ DB.DBA.XML_SET_NS_DECL ('northwind', 'http://demo.openlinksw.com/schemas/northwi
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -12536,7 +7517,7 @@ DB.DBA.XML_SET_NS_DECL ('northwind', 'http://demo.openlinksw.com/schemas/northwi
 </itemizedlist>
 <para><emphasis>Script to set up your own instance</emphasis></para>
 <programlisting><![CDATA[
--- Setup script for RDF views of Oracle 10 Human Resources Sample Database --
+-- Setup script for Linked Data Views of Oracle 10 Human Resources Sample Database --
 
 GRANT SELECT ON HR.orama.COUNTRIES TO "SPARQL", "SPARQL_UPDATE";
 GRANT SELECT ON HR.orama.REGIONS TO "SPARQL", "SPARQL_UPDATE";
@@ -13026,7 +8007,7 @@ DB.DBA.XML_SET_NS_DECL ('hr', 'http://^{URIQADefaultHost}^/schemas/oraclehr/', 2
 </itemizedlist>
 <para><emphasis>Script to set up your own instance</emphasis></para>
 <programlisting><![CDATA[
--- Setup script for RDF views of Oracle 10 Human Resources Sample Database --
+-- Setup script for Linked Data Views of Oracle 10 Human Resources Sample Database --
 
 GRANT SELECT ON HR.orama.COUNTRIES TO "SPARQL", "SPARQL_UPDATE";
 GRANT SELECT ON HR.orama.REGIONS TO "SPARQL", "SPARQL_UPDATE";
@@ -13511,8 +8492,8 @@ DB.DBA.XML_SET_NS_DECL ('hr', 'http://^{URIQADefaultHost}^/schemas/oraclehr/', 2
       <title>DB2 using the demonstration 'Sample' database</title>
 <para><emphasis>Version defined using explicit host - localhost:8890</emphasis></para>
 <programlisting><![CDATA[
--- $Id: rdfviewssamples.xml,v 1.1.2.1 2010/10/07 12:45:00 source Exp $
--- Setup script for RDF view of portions of DB2 SAMPLE database included
+-- $Id: rdfviewssamples.xml,v 1.1.2.3 2012/03/07 15:28:57 source Exp $
+-- Setup script for Linked Data Views of portions of DB2 SAMPLE database included
 -- in DB2 Express Edition v9.5
 --
 -- The script assumes external DB2 tables are linked into Virtuoso using
@@ -15167,7 +10148,7 @@ DB.DBA.XML_SET_NS_DECL ('custc',   'http://^{URIQADefaultHost}^/schemas/informix
     <sect2 id="rdfviewsenterpringr">
       <title>Ingres using demonstration 'Tutorial' database</title>
 <programlisting><![CDATA[
--- Setup script for RDF views of Ingres R3 Tutorial Sample Database --
+-- Setup script for Linked Data Views of Ingres R3 Tutorial Sample Database --
 
 DB..vd_remote_data_source ('ingiima-tut', '', '<uid>','<pwd>');
 
diff --git a/docsrc/xmlsource/relnotes.xml b/docsrc/xmlsource/relnotes.xml
index e8c1c9f..202e180 100644
--- a/docsrc/xmlsource/relnotes.xml
+++ b/docsrc/xmlsource/relnotes.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/rendezvous.xml b/docsrc/xmlsource/rendezvous.xml
index 50bfe4d..7c44ebe 100644
--- a/docsrc/xmlsource/rendezvous.xml
+++ b/docsrc/xmlsource/rendezvous.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/repl.xml b/docsrc/xmlsource/repl.xml
index 6664d85..df52e4d 100644
--- a/docsrc/xmlsource/repl.xml
+++ b/docsrc/xmlsource/repl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1049,65 +1049,44 @@ a procedure name and set of parameters to a publication inside a transaction.  W
 publication entries are appended to the publication, forming a replication entry with
 its unique number.
 </para>
-<para>
-These functions are available to the publishing Virtuoso server.</para>
-
-<link linkend="fn_repl_publish"><function>repl_publish()</function></link>
-
-<link linkend="fn_repl_unpublish"><function>repl_unpublish()</function></link>
-
-<link linkend="fn_repl_pub_add"><function>repl_pub_add()</function></link>
-
-<link linkend="fn_repl_pub_remove"><function>repl_pub_remove()</function></link>
-
-<link linkend="fn_repl_pub_init_image"><function>repl_pub_init_image()</function></link>
-
-<link linkend="fn_repl_new_log"><function>repl_new_log()</function></link>
-
-<link linkend="fn_repl_text"><function>repl_text()</function></link>
-
-<link linkend="fn_repl_grant"><function>repl_grant()</function></link>
-
-<link linkend="fn_repl_revoke"><function>repl_revoke()</function></link>
-
+<para>These functions are available to the publishing Virtuoso server:</para>
+<itemizedlist mark="bullet">
+  <listitem><link linkend="fn_repl_publish"><function>repl_publish()</function></link></listitem>
+  <listitem><link linkend="fn_repl_unpublish"><function>repl_unpublish()</function></link></listitem>
+  <listitem><link linkend="fn_repl_pub_add"><function>repl_pub_add()</function></link></listitem>
+  <listitem><link linkend="fn_repl_pub_remove"><function>repl_pub_remove()</function></link></listitem>
+  <listitem><link linkend="fn_repl_pub_init_image"><function>repl_pub_init_image()</function></link></listitem>
+  <listitem><link linkend="fn_repl_new_log"><function>repl_new_log()</function></link></listitem>
+  <listitem><link linkend="fn_repl_text"><function>repl_text()</function></link></listitem>
+  <listitem><link linkend="fn_repl_grant"><function>repl_grant()</function></link></listitem>
+  <listitem><link linkend="fn_repl_revoke"><function>repl_revoke()</function></link></listitem>
+</itemizedlist>
 </sect2>
 
 <sect2 id="SubscriberFunctions">
 <title>Subscriber Functions</title>
-<para>
-These are the functions that are available to the subscribing Virtuoso server.
-</para>
-
-<link linkend="fn_repl_server"><function>repl_server()</function></link>
-
-<link linkend="fn_repl_subscribe"><function>repl_subscribe()</function></link>
-
-<link linkend="fn_repl_unsubscribe"><function>repl_unsubscribe()</function></link>
-
-<link linkend="fn_repl_init_copy"><function>repl_init_copy()</function></link>
-
-<link linkend="fn_repl_sync"><function>repl_sync()</function></link>
-
-<link linkend="fn_repl_sync_all"><function>repl_sync_all()</function></link>
-
-<link linkend="fn_repl_sched_init"><function>repl_sched_init()</function></link>
-
-<link linkend="fn_sub_schedule"><function>sub_schedule()</function></link>
-
-<link linkend="fn_repl_disconnect"><function>repl_disconnect()</function></link>
-
-<link linkend="fn_repl_this_server"><function>repl_this_server()</function></link>
-<link linkend="fn_repl_purge"><function>repl_purge()</function></link>
-
+<para>These are the functions that are available to the subscribing Virtuoso server:</para>
+<itemizedlist mark="bullet">
+  <listitem><link linkend="fn_repl_server"><function>repl_server()</function></link></listitem>
+  <listitem><link linkend="fn_repl_subscribe"><function>repl_subscribe()</function></link></listitem>
+  <listitem><link linkend="fn_repl_unsubscribe"><function>repl_unsubscribe()</function></link></listitem>
+  <listitem><link linkend="fn_repl_init_copy"><function>repl_init_copy()</function></link></listitem>
+  <listitem><link linkend="fn_repl_sync"><function>repl_sync()</function></link></listitem>
+  <listitem><link linkend="fn_repl_sync_all"><function>repl_sync_all()</function></link></listitem>
+  <listitem><link linkend="fn_repl_sched_init"><function>repl_sched_init()</function></link></listitem>
+  <listitem><link linkend="fn_sub_schedule"><function>sub_schedule()</function></link></listitem>
+  <listitem><link linkend="fn_repl_disconnect"><function>repl_disconnect()</function></link></listitem>
+  <listitem><link linkend="fn_repl_this_server"><function>repl_this_server()</function></link></listitem>
+  <listitem><link linkend="fn_repl_purge"><function>repl_purge()</function></link></listitem>
+</itemizedlist>
 </sect2>
 
 <sect2 id="ReplStatusFunctions">
 <title>Common Status Functions</title>
-
-<link linkend="fn_repl_stat"><function>repl_stat()</function></link>
-
-<link linkend="fn_repl_status"><function>repl_status()</function></link>
-
+<itemizedlist mark="bullet">
+  <listitem><link linkend="fn_repl_stat"><function>repl_stat()</function></link></listitem>
+  <listitem><link linkend="fn_repl_status"><function>repl_status()</function></link></listitem>
+</itemizedlist>
 	<para>
 The status () function shows a replication status summary.
 The same data can be obtained with the repl_stat and repl_status procedures.
@@ -1233,8 +1212,9 @@ executes each command which applies to the current time. Note that overdue comma
 only once.
 </para>
 		<para>
-There is a virtuoso.ini parameter "Scheduler interval" under "Parameters" section which defines
-the scheduler wake-up interval. Set this to 0 (the default) to disable the scheduler.
+There is a virtuoso.ini parameter "SchedulerInterval" under 
+<link linkend="ini_Parameters">Parameters</link> section which defines the scheduler wake-up interval. 
+Set this to 0 (the default) to disable the scheduler.
 </para>
 		<sect2 id="replschSYSTABLES">
 			<title>SYS_SCHEDULED_EVENT</title>
diff --git a/docsrc/xmlsource/rowlevelsecurity.xml b/docsrc/xmlsource/rowlevelsecurity.xml
index 710f35d..602ac20 100644
--- a/docsrc/xmlsource/rowlevelsecurity.xml
+++ b/docsrc/xmlsource/rowlevelsecurity.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/rth.aspx.xml b/docsrc/xmlsource/rth.aspx.xml
index 8162dcc..89b6d8d 100644
--- a/docsrc/xmlsource/rth.aspx.xml
+++ b/docsrc/xmlsource/rth.aspx.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ruby.xml b/docsrc/xmlsource/ruby.xml
index 91b4518..6dd0cb2 100644
--- a/docsrc/xmlsource/ruby.xml
+++ b/docsrc/xmlsource/ruby.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/runtimehosting.xml b/docsrc/xmlsource/runtimehosting.xml
index 1db522a..ae04893 100644
--- a/docsrc/xmlsource/runtimehosting.xml
+++ b/docsrc/xmlsource/runtimehosting.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/sampleapps.xml b/docsrc/xmlsource/sampleapps.xml
index ee5221c..66fa9e8 100644
--- a/docsrc/xmlsource/sampleapps.xml
+++ b/docsrc/xmlsource/sampleapps.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/secureodbc.xml b/docsrc/xmlsource/secureodbc.xml
index eb01119..9d8c8d6 100644
--- a/docsrc/xmlsource/secureodbc.xml
+++ b/docsrc/xmlsource/secureodbc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/server.xml b/docsrc/xmlsource/server.xml
index f0665b2..d569b45 100644
--- a/docsrc/xmlsource/server.xml
+++ b/docsrc/xmlsource/server.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -274,14 +274,14 @@ In this case it is important to rename the already produced crash dump or change
 				</listitem>
 				<listitem id="ini_Database_Syslog">
 					<formalpara>
-						<title>Syslog = 1/0 (default 1)</title>
-						<para>Virtuoso normally writes log worthy messages to the system log
-            (Unix based operating systems including Linux) or the Windows Event Log (Windows
+						<title>Syslog = 1/0 (default 0)</title>
+						<para>Virtuoso can writes log worthy messages to the system log (Unix based  
+operating systems including Linux) or the Windows Event Log (Windows  
             operating systems).  Messages are written in the system/event log
             before the virtuoso.log file is opened, therefore errors due to
-            absence of virtuoso.ini log are loggable there.
-            This system/event logging can be disabled using this option,
-            by default it is set to 1 meaning on.  </para></formalpara>
+absence of virtuoso.ini log are loggable there. This system/event  
+logging can be enabled using this option, by default it is set to 0  
+meaning off.</para></formalpara>
             <para>On Unix/Linux messages are written as "Virtuoso" events.</para>
             <para>On Windows messages are written in the Application event log.</para>
 				</listitem>
@@ -366,6 +366,13 @@ threads in the thread pool should be released.</para>
 the thread queue after thread clean-up interval has expired.</para>
 					</formalpara>
 				</listitem>
+				<listitem id="ini_Parameters_SchedulerInterval">
+					<formalpara>
+						<title>SchedulerInterval</title>
+						<para>Defines the scheduler wake-up interval ( in minutes). 
+							By default is 0 i.e. the scheduler is disabled. </para>
+					</formalpara>
+				</listitem>
 				<listitem id="ini_Parameters_ResourceCleanupInterval">
 					<formalpara>
 						<title>ResourcesCleanupInterval</title>
@@ -427,6 +434,15 @@ write system calls it needs it can do one of the following depending on this set
 						<para>2. - Block until the OS has flushed all writes pertaining to any of the database files.</para>
 					</formalpara>
 				</listitem>
+				<listitem id="ini_Parameters_PageMapCheck">
+					<formalpara>
+						<title>PageMapCheck=0</title>
+						<para>This controls the check of page maps:
+</para>
+						<para>0. - disables the check of page maps.</para>
+						<para>1. - enables the check of page maps.</para>
+					</formalpara>
+				</listitem>
 				<listitem id="ini_Parameters_NumberOfBuffers">
 					<formalpara>
 						<title>NumberOfBuffers=2000</title>
@@ -1007,6 +1023,80 @@ lite is 2 in 'normal' mode is 256 by default.
 		    <para>Default is 40000.</para>
 	    </formalpara>
 	  </listitem>
+	  <listitem id="ini_AsyncQueueMaxThreads">
+	    <formalpara>
+		    <title>AsyncQueueMaxThreads</title>
+		    <para>Sets the number of threads in a pool that is used for getting extra threads for running 
+		    	queries and for aq_request. Each running statement has at least one thread that is not allocated 
+		    	from this pool plus zero or more threads from this pool.</para>
+		    <para>Setting the pool size to the number of cores plus a few is a reasonable default. On 
+		    	platforms with core multithreading, one can count a core thread as a core for purposes of 
+		    	this parameter.</para>
+		    <para>If one expects to run many slow <link linkend="fn_aq_requests"><function>aq_requests()</function></link> 
+		    (see <link linkend="fn_async_queue"><function>async_queue()</function></link>, 
+		    <link linkend="fn_aq_request"><function>aq_request()</function></link>, etc.), 
+		    then the number of threads should be increased by the number of slow threads one expects.
+		    </para>
+		    <para>Slow threads are typically I/O bound threads used for web crawling or similar long-latency, 
+		    	low-CPU activity.</para>
+		    <para>Note: Only effective with Virtuoso 7.0 and later.</para>
+	    </formalpara>
+	  </listitem>
+	  <listitem id="ini_ThreadsPerQuery">
+	    <formalpara>
+		    <title>ThreadsPerQuery</title>
+		    <para>This is maximum number of threads that can be claimed from the thread pool by a single 
+		    	query. A value of one means that no query parallelization will take place, and all queries 
+		    	will run single threaded.</para>
+		    <para>The number of cores on the machine is a reasonable default if running large queries.</para>	
+		    <para>Note that since every query is served by at least one thread, a single query taking 
+		    	all the extra threads will not prevent other queries from progressing.</para>
+		    <para>Note: Only effective with Virtuoso 7.0 and later.</para>	
+	    </formalpara>
+	  </listitem>
+	  <listitem id="ini_VectorSize">
+	    <formalpara>
+		    <title>VectorSize</title>
+		    <para>This the number of simultaneous sets of query variable bindings processed at one time. 
+		    	The default is 10,000, which is good for most cases.</para>
+		    <para>If we are evaluating the query:</para>	
+<programlisting><![CDATA[
+SELECT COUNT (*) 
+FROM t1 a, 
+     t1 b 
+WHERE a.row_no + 1 = b.row_no 
+OPTION (LOOP, ORDER) 
+]]></programlisting>
+        <para>with vector size of 10,000, then 10,000 rows of t1 a will be fetched first; 
+        	1 will be added to the 10,000 row_no values; 
+        	and then the corresponding row of t1 b will be fetched for the 10,000 row_no of t1 a. 
+        	This process will repeat until enough batches of t1 a have been fetched to come to its end.</para>
+        <para>Note: Only effective with Virtuoso 7.0 and later.</para>	
+	    </formalpara>
+	  </listitem>
+	  <listitem id="ini_AdjustVectorSize">
+	    <formalpara>
+		    <title>AdjustVectorSize</title>
+		    <para>Using a larger vector size when evaluating large queries with indexed random-access can 
+		    	yield up to a 3x speed-up relative to using the default vector size. However, always using a 
+		    	large vector size will prohibitively increase the overhead of running small queries. For this 
+		    	reason, there is the option to adaptively select the vector size. Set AdjustVectorSize = 1 
+		    	to enable this feature. The SQL execution engine will increase the vector size when it sees 
+		    	an index lookup that does not get good locality, (e.g., after sorting the keys to look for, 
+		    	too few consecutive lookups fall on the same page). Having more keys to look up increases 
+		    	the chance that consecutive keys should be found on the same page, thus eliminating much of 
+		    	the index lookup cost.</para>
+		    <para>Note: Only effective with Virtuoso 7.0 and later.</para>	
+	    </formalpara>
+	  </listitem>
+	  <listitem id="ini_MaxVectorSize">
+	    <formalpara>
+		    <title>MaxVectorSize</title>
+		    <para>When AdjustVectorSize is on, this setting gives the maximum vector size. The 
+		    	default is 1,000,000 and the largest allowed value is about 3,500,000.</para>	
+		    <para>Note: Only effective with Virtuoso 7.0 and later.</para>		
+	    </formalpara>
+	  </listitem>
           </itemizedlist>
           <para>Note: The default for startup behavior is to always read full extents and the default for the normal 
 behavior is to trigger preread on the third read inside one second.</para>
@@ -1528,6 +1618,17 @@ Section <link linkend="rdfandsparql">RDF Data Access and Data Management</link>
 	</para>
     </formalpara>
 </listitem>
+<listitem id="ini_SPARQL_ShortenLongURIs">
+  <formalpara>
+  	<title>ShortenLongURIs  = 1</title>
+  	<para>Shorten extremely long URIs in datasets when loading with the RDF Bulk Loader. Default is 0. </para>
+  	<para><emphasis>Note</emphasis>: This parameter is only in the Virtuoso 06.03.3131+ commercial builds, 
+  	at the time of writing it is not included in the open source 6.1.4 archives but will be in the 
+  	next 6.1.5 release. A patch to enable this feature is however available from the 
+  	<ulink url="http://sourceforge.net/tracker/?func=detail&aid=3496331&group_id=161622&atid=820576">Virtuso patches page on source forge</ulink>, which can be applied to a 6.1.4 archive from source forge and the Virtuoso 
+  	server binary rebuilt.</para>
+  </formalpara>		
+</listitem>
 <listitem id="ini_SPARQL_MaxMemInUse">
     <formalpara>
 	<title>MaxMemInUse = 0</title>
diff --git a/docsrc/xmlsource/soap.xml b/docsrc/xmlsource/soap.xml
index 44b1f49..986ef1f 100644
--- a/docsrc/xmlsource/soap.xml
+++ b/docsrc/xmlsource/soap.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/sqlinverse.xml b/docsrc/xmlsource/sqlinverse.xml
index 1d5a07f..902a706 100644
--- a/docsrc/xmlsource/sqlinverse.xml
+++ b/docsrc/xmlsource/sqlinverse.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/sqloptimizer.xml b/docsrc/xmlsource/sqloptimizer.xml
index 81026db..27a3273 100644
--- a/docsrc/xmlsource/sqloptimizer.xml
+++ b/docsrc/xmlsource/sqloptimizer.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/sqlprocedures.xml b/docsrc/xmlsource/sqlprocedures.xml
index ddb6000..8406afc 100644
--- a/docsrc/xmlsource/sqlprocedures.xml
+++ b/docsrc/xmlsource/sqlprocedures.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/sqlreference.xml b/docsrc/xmlsource/sqlreference.xml
index d1152fd..c000d5d 100644
--- a/docsrc/xmlsource/sqlreference.xml
+++ b/docsrc/xmlsource/sqlreference.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/support.xml b/docsrc/xmlsource/support.xml
index 92462df..8878b3c 100644
--- a/docsrc/xmlsource/support.xml
+++ b/docsrc/xmlsource/support.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/syncml.xml b/docsrc/xmlsource/syncml.xml
index b2cc431..043d164 100644
--- a/docsrc/xmlsource/syncml.xml
+++ b/docsrc/xmlsource/syncml.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/systemtables.xml b/docsrc/xmlsource/systemtables.xml
index 07c4683..925d992 100644
--- a/docsrc/xmlsource/systemtables.xml
+++ b/docsrc/xmlsource/systemtables.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/tpcc.xml b/docsrc/xmlsource/tpcc.xml
index f862681..5654ce2 100644
--- a/docsrc/xmlsource/tpcc.xml
+++ b/docsrc/xmlsource/tpcc.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
-  $Id: tpcc.xml,v 1.4.2.1 2010/01/25 22:55:37 source Exp $
+  $Id: tpcc.xml,v 1.4.2.2 2012/03/07 15:28:58 source Exp $
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -618,7 +618,7 @@ read in the client (SQL_CONCURRENCY option).
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -784,7 +784,7 @@ CREATE TABLE STOCK (
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/uddi.xml b/docsrc/xmlsource/uddi.xml
index d74ff80..610d39f 100644
--- a/docsrc/xmlsource/uddi.xml
+++ b/docsrc/xmlsource/uddi.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/udt.xml b/docsrc/xmlsource/udt.xml
index ee25d53..4e8ba87 100644
--- a/docsrc/xmlsource/udt.xml
+++ b/docsrc/xmlsource/udt.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/uriqa.xml b/docsrc/xmlsource/uriqa.xml
index e616f4a..ae1fe89 100644
--- a/docsrc/xmlsource/uriqa.xml
+++ b/docsrc/xmlsource/uriqa.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/usermodel.xml b/docsrc/xmlsource/usermodel.xml
index e4c28d0..2c29e2e 100644
--- a/docsrc/xmlsource/usermodel.xml
+++ b/docsrc/xmlsource/usermodel.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vad.xml b/docsrc/xmlsource/vad.xml
index f1b22d0..535c3a1 100644
--- a/docsrc/xmlsource/vad.xml
+++ b/docsrc/xmlsource/vad.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -712,7 +712,7 @@ set of documentation files. </para>
   <name package="rdf_lib">
    <prop name="Title" value="RDF Support Library" />
    <prop name="Developer" value="OpenLink Software" />
-   <prop name="Copyright" value="(C) 2003 OpenLink Software" />
+   <prop name="Copyright" value="(C) 2012 OpenLink Software" />
    <prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
    <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
   </name>
diff --git a/docsrc/xmlsource/vaddistr.xml b/docsrc/xmlsource/vaddistr.xml
index 46716dc..a9d3794 100644
--- a/docsrc/xmlsource/vaddistr.xml
+++ b/docsrc/xmlsource/vaddistr.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -707,7 +707,7 @@ set of documentation files.</para>
   <name package="rdf_lib">
    <prop name="Title" value="RDF Support Library" />
    <prop name="Developer" value="OpenLink Software" />
-   <prop name="Copyright" value="(C) 2003 OpenLink Software" />
+   <prop name="Copyright" value="(C) 2012 OpenLink Software" />
    <prop name="Download" value="http://www.openlinksw.com/virtuoso/rdf_lib/download" />
    <prop name="Download" value="http://www.openlinksw.co.uk/virtuoso/rdf_lib/download" />
   </name>
diff --git a/docsrc/xmlsource/vdbconcepts.xml b/docsrc/xmlsource/vdbconcepts.xml
index 8a26707..a6a1d7b 100644
--- a/docsrc/xmlsource/vdbconcepts.xml
+++ b/docsrc/xmlsource/vdbconcepts.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vfoafssl.xml b/docsrc/xmlsource/vfoafssl.xml
index 4c41738..6f95a4a 100644
--- a/docsrc/xmlsource/vfoafssl.xml
+++ b/docsrc/xmlsource/vfoafssl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -212,13 +212,13 @@ takes the following steps:</para>
 </orderedlist>
   <para>If there is a service that requires a different key, the Conductor can be used to import another
 certificate for the relevant user.</para>
-  <para>You can use a Key from a global signing authority or produce a self-signed key using the <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/identity_manager_dav.vad">ODS Identity Manager</ulink>.</para>
+  <para>You can use a Key from a global signing authority or produce a self-signed key using the <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad">Virtuoso Conductor</ulink>.</para>
   <para>Details and more information how to generate the key see in the next section.</para>
   </sect2>
   <sect2 id="vfoafsslst509issuer"><title>Set Up X.509 certificate issuer, HTTPS listener and generate ODS user's certificates</title>
   <para>The following Step-by-Step guide walks you through set up of an X.509 certificate issuer and HTTPS listener, and generation of ODS user certificates.</para>
 <orderedlist>
-   <listitem>Install <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/ods_framework_dav.vad">ODS</ulink> and <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/identity_manager_dav.vad">Identity manager</ulink> VAD packages.
+   <listitem>Install <ulink url="http://download.openlinksw.com/packages/5.0/virtuoso/ods_framework_dav.vad">ODS</ulink> and <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad">Virtuoso Conductor</ulink> VAD packages.
      <figure id="foafssl6" float="1">
        <title>Setting-Up issuer CA</title>
        <graphic fileref="ui/foafssl6.png"/>
diff --git a/docsrc/xmlsource/virtclientref.xml b/docsrc/xmlsource/virtclientref.xml
index 4f748b5..1f9fb2d 100644
--- a/docsrc/xmlsource/virtclientref.xml
+++ b/docsrc/xmlsource/virtclientref.xml
@@ -5,7 +5,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/virtdocs.xml b/docsrc/xmlsource/virtdocs.xml
index 9c67d1a..2747f49 100644
--- a/docsrc/xmlsource/virtdocs.xml
+++ b/docsrc/xmlsource/virtdocs.xml
@@ -85,6 +85,7 @@
 <!ENTITY client_attr				SYSTEM "funcref/client_attr.xml">
 <!ENTITY collation_define			SYSTEM "funcref/collation_define.xml">
 <!ENTITY complete_table_name			SYSTEM "funcref/complete_table_name.xml">
+<!ENTITY sparql_to_sql_text	SYSTEM	"funcref/sparql_to_sql_text.xml">
 <!ENTITY composite				SYSTEM "funcref/composite.xml">
 <!ENTITY composite_ref				SYSTEM "funcref/composite_ref.xml">
 <!ENTITY concat					SYSTEM "funcref/concat.xml">
@@ -185,6 +186,8 @@
 <!ENTITY gz_uncompress				SYSTEM "funcref/gz_uncompress.xml">
 <!ENTITY hour					SYSTEM "funcref/hour.xml">
 <!ENTITY http					SYSTEM "funcref/http.xml">
+<!ENTITY http_lock				  SYSTEM	"funcref/http_lock.xml">
+<!ENTITY http_unlock				SYSTEM	"funcref/http_unlock.xml">
 <!ENTITY http_acl_set				SYSTEM	"funcref/http_acl_set.xml">
 <!ENTITY http_acl_get				SYSTEM "funcref/http_acl_get.xml">
 <!ENTITY http_acl_remove			SYSTEM	"funcref/http_acl_remove.xml">
@@ -214,6 +217,7 @@
 <!ENTITY http_rewrite				SYSTEM "funcref/http_rewrite.xml">
 <!ENTITY http_root				SYSTEM "funcref/http_root.xml">
 <!ENTITY http_value				SYSTEM "funcref/http_value.xml">
+<!ENTITY json_parse				SYSTEM	"funcref/json_parse.xml">
 <!ENTITY urlrewrite_create_regex_rule		SYSTEM "funcref/urlrewrite_create_regex_rule.xml">
 <!ENTITY http_url				SYSTEM "funcref/http_url.xml">
 <!ENTITY http_xslt				SYSTEM "funcref/http_xslt.xml">
@@ -232,8 +236,13 @@
 <!ENTITY isinteger				SYSTEM "funcref/isinteger.xml">
 <!ENTITY isnull					SYSTEM "funcref/isnull.xml">
 <!ENTITY isnumeric				SYSTEM "funcref/isnumeric.xml">
+<!ENTITY isfinitenumeric				SYSTEM	"funcref/isfinitenumeric.xml">
 <!ENTITY isstring				SYSTEM "funcref/isstring.xml">
 <!ENTITY iszero					SYSTEM "funcref/iszero.xml">
+<!ENTITY __min					SYSTEM	"funcref/nm_min.xml">
+<!ENTITY __max					SYSTEM	"funcref/nm_max.xml">
+<!ENTITY __max_notnull					SYSTEM	"funcref/nm_max_notnull.xml">
+<!ENTITY __min_notnull					SYSTEM	"funcref/nm_min_notnull.xml">
 <!ENTITY java_call_method			SYSTEM "funcref/java_call_method.xml">
 <!ENTITY java_get_property			SYSTEM "funcref/java_get_property.xml">
 <!ENTITY java_load_class			SYSTEM "funcref/java_load_class.xml">
@@ -259,6 +268,7 @@
 <!ENTITY log_text				SYSTEM "funcref/log_text.xml">
 <!ENTITY lower					SYSTEM "funcref/lower.xml">
 <!ENTITY ltrim					SYSTEM "funcref/ltrim.xml">
+<!ENTITY __dbf_set				SYSTEM	"funcref/dbf_set.xml">
 <!ENTITY make_array				SYSTEM "funcref/make_array.xml">
 <!ENTITY make_string				SYSTEM "funcref/make_string.xml">
 <!-- ENTITY make_vector				SYSTEM "funcref/make_vector.xml" -->
@@ -308,6 +318,8 @@
 <!ENTITY rdf_graph_group_create                 SYSTEM  "funcref/rdf_graph_group_create.xml">
 <!ENTITY rdf_graph_group_ins                    SYSTEM  "funcref/rdf_graph_group_ins.xml">
 <!ENTITY rdfs_rule_set                          SYSTEM  "funcref/rdfs_rule_set.xml">
+<!ENTITY rdf_view_sync_to_physical              SYSTEM  "funcref/rdf_view_sync_to_physical.xml">
+
 
 <!ENTITY rdf_load_rdfa                          SYSTEM  "funcref/rdf_load_rdfa.xml">
 <!ENTITY rdf_load_rdfxml        		SYSTEM "funcref/rdf_load_rdfxml.xml">
@@ -323,15 +335,21 @@
 
 <!ENTITY ld_dir                                 SYSTEM  "funcref/ld_dir.xml">
 <!ENTITY ttlp                   		SYSTEM "funcref/ttlp.xml">
+<!ENTITY http_ttl_triple                        SYSTEM  "funcref/http_ttl_triple.xml">
+<!ENTITY http_nt_triple                         SYSTEM  "funcref/http_nt_triple.xml">
 <!ENTITY ttlp_mt                		SYSTEM "funcref/ttlp_mt.xml">
 <!ENTITY ttlp_mt_local_file                     SYSTEM  "funcref/ttlp_mt_local_file.xml">
 <!ENTITY rdf_triples_to_rdf_xml_text		SYSTEM "funcref/rdf_triples_to_rdf_xml_text.xml">
 <!ENTITY rdf_triples_to_ttl             	SYSTEM "funcref/rdf_triples_to_ttl.xml">
+<!ENTITY rdf_datatype_of_obj                    SYSTEM  "funcref/rdf_datatype_of_obj.xml">
 <!-- ENTITY rdf_load_turtle             	SYSTEM "funcref/rdf_load_turtle.xml" -->
 <!ENTITY rdf_restore_metadata           	SYSTEM "funcref/rdf_restore_metadata.xml">
 <!ENTITY rdf_64bit_upgrade              	SYSTEM "funcref/rdf_64bit_upgrade.xml">
 <!ENTITY rdf_convert_rdfxml_to_ttl      	SYSTEM "funcref/rdf_convert_rdfxml_to_ttl.xml">
 <!ENTITY isref                                  SYSTEM  "funcref/isref.xml">
+<!ENTITY SAMPLE                                 SYSTEM  "funcref/SAMPLE.xml">
+<!ENTITY GROUP_CONCAT                           SYSTEM  "funcref/GROUP_CONCAT.xml">
+<!ENTITY GROUP_DIGEST                           SYSTEM  "funcref/GROUP_DIGEST.xml">
 
 <!--
 - Uncommented for Virtuoso 6 Release-->
@@ -493,6 +511,9 @@
 <!ENTITY string_to_file				SYSTEM "funcref/string_to_file.xml">
 <!ENTITY strrchr				SYSTEM "funcref/strrchr.xml">
 <!ENTITY strstr					SYSTEM "funcref/strstr.xml">
+<!ENTITY strcontains					SYSTEM	"funcref/strcontains.xml">
+<!ENTITY starts_with					SYSTEM	"funcref/starts_with.xml">
+<!ENTITY ends_with					SYSTEM	"funcref/ends_with.xml">
 <!ENTITY subseq					SYSTEM "funcref/subseq.xml">
 <!ENTITY substring				SYSTEM "funcref/substring.xml">
 <!ENTITY sub_schedule				SYSTEM "funcref/sub_schedule.xml">
@@ -570,6 +591,7 @@
 <!ENTITY vad_fail_check				SYSTEM "funcref/vad_fail_check.xml">
 <!ENTITY vad_install				SYSTEM "funcref/vad_install.xml">
 <!ENTITY vad_load_file				SYSTEM "funcref/vad_load_file.xml">
+<!ENTITY vad_load_sql_file				SYSTEM	"funcref/vad_load_sql_file.xml">
 <!ENTITY vad_pack				SYSTEM "funcref/vad_pack.xml">
 <!ENTITY vad_safe_exec				SYSTEM "funcref/vad_safe_exec.xml">
 <!ENTITY vad_uninstall				SYSTEM "funcref/vad_uninstall.xml">
@@ -852,6 +874,9 @@ ls xpf_*.xml | sed 's/.xml//g' | sed 's/^\(.*\)$/\<!ENTITY \1 		SYSTEM "xmlref\/
 <!ENTITY xenc_key_3des_rand_create 		SYSTEM "funcref/xenc_key_3des_rand_create.xml">
 <!ENTITY xenc_key_DSA_read 			SYSTEM "funcref/xenc_key_DSA_read.xml">
 <!ENTITY xenc_key_RSA_read 			SYSTEM "funcref/xenc_key_RSA_read.xml">
+<!ENTITY xenc_key_rsa_create SYSTEM "funcref/xenc_key_rsa_create.xml">
+<!ENTITY xenc_x509_csr_generate SYSTEM "funcref/xenc_x509_csr_generate.xml">
+<!ENTITY xenc_x509_from_csr SYSTEM "funcref/xenc_x509_from_csr.xml">
 <!ENTITY xenc_key_aes_create 			SYSTEM "funcref/xenc_key_aes_create.xml">
 <!ENTITY xenc_key_aes_rand_create 		SYSTEM "funcref/xenc_key_aes_rand_create.xml">
 <!ENTITY xenc_key_create_cert 			SYSTEM "funcref/xenc_key_create_cert.xml">
diff --git a/docsrc/xmlsource/virtwhitepaper.xml b/docsrc/xmlsource/virtwhitepaper.xml
index 6139a03..01111a0 100644
--- a/docsrc/xmlsource/virtwhitepaper.xml
+++ b/docsrc/xmlsource/virtwhitepaper.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/voauth.xml b/docsrc/xmlsource/voauth.xml
index 856948b..8f5c7c5 100644
--- a/docsrc/xmlsource/voauth.xml
+++ b/docsrc/xmlsource/voauth.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vsmx.xml b/docsrc/xmlsource/vsmx.xml
index 43fb4d1..764638a 100644
--- a/docsrc/xmlsource/vsmx.xml
+++ b/docsrc/xmlsource/vsmx.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vsp.xml b/docsrc/xmlsource/vsp.xml
index e08e158..b158597 100644
--- a/docsrc/xmlsource/vsp.xml
+++ b/docsrc/xmlsource/vsp.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vsptraining.xml b/docsrc/xmlsource/vsptraining.xml
index 1c494e9..d3b6d43 100644
--- a/docsrc/xmlsource/vsptraining.xml
+++ b/docsrc/xmlsource/vsptraining.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -373,8 +373,8 @@ CREATE TABLE DB.DBA.DEMO_PEOPLE (
 </sect3>
 
 <sect3 id="insertingvalues"><title>Basic Form Input Page</title>
-<para>After the table has been created — for example via Virtuoso's
-iSQL utility — it will need some data.
+<para>After the table has been created; for example via Virtuoso's
+iSQL utility; it will need some data.
 For this we create a "New Person" page.  This page uses form
 inputs and some VSP code to determine whether
 an insert button was pressed.  If the insert button is pressed then the
@@ -1006,4 +1006,189 @@ a:hover{color:#a2a2a2}
 </sect3>
 </sect2>
 
+<sect2 id="corsshare">
+	  <title>Setting up server-side Cross-Origin Resource Sharing (CORS) with Virtuoso</title>
+	  <para>User agents (e.g., Web browsers) have traditionally restricted scripts within web pages by a Same Origin Policy, which allowed scripts to make requests only to resources within the same domain from which the scripts themselves originated. This restriction is meant to protect the user and their computer from "Trojan horse websites" which may appear to be safe, but which then make unsafe HTTP requests to other, invisible sites. This restriction also protects the second website from potential "Denial of Service" and other attacks, whether accidental or intentional.</para>
+	  <para>This policy has the unfortunate side-effect of also preventing client-side Web applications served from one website ("Origin") from retrieving data from another website ("Origin").</para>
+	  <para><ulink url="http://www.w3.org/TR/cors/">Cross-Origin Resource Sharing (CORS)</ulink> is a mechanism intended to enable safer client-side cross-origin requests, primarily focused on data.</para>
+	  <sect3 id="corssharewk">  
+	  	 <title>How does CORS work?</title>
+	  	 <para>Authentication and session-management information methods are extended in several ways:</para>
+	  	 <itemizedlist mark="bullet">
+	  	 	 <listitem>Enforcement by User Agent
+           <itemizedlist mark="bullet">
+             <listitem>A server providing a resource can include an <emphasis>Access-Control-Allow-Origin</emphasis> HTTP response header, with a value of the 
+         	request's triggering script's site of origin (that is, the site which provided the script which 
+         	made the request for the resource), to indicate whether access to the resource's contents may be 
+         	allowed. The user agent validates that the value in this header matches the actual origin of the 
+         	script which made the request.
+         	   </listitem>
+             <listitem>User agents can use a "pre-flight request" to discover whether a cross-origin resource 
+         	is prepared to accept requests from a given script origin, using a complex method (which we will 
+         	not detail here). Again, the response is validated by the user agent.
+         	    </listitem>
+           </itemizedlist>	  	 	 	
+	  	 	 </listitem>
+         <listitem>Enforcement by Server-side Application
+           <itemizedlist mark="bullet">
+             <listitem>Server-side applications can refer to the <emphasis>Origin</emphasis> HTTP request header 
+         to discover whether the user agent deemed it a cross-origin request. Here, the server-side 
+         application enforces limitations (e.g., returning nothing, partial results, or full results) on 
+         the cross-origin requests that they are willing to service at all.
+             </listitem>       
+           </itemizedlist>	
+         </listitem>	
+       </itemizedlist>
+	  </sect3> 
+	  <sect3 id="corssharesetup">  
+	  	 <title>CORS Setup for Virtuoso servers</title>
+	  	 <para>With Virtuoso 6 and later (specific earliest versions as noted below), CORS support may be configured at the server-level or enabled through application logic (scripting, PL, etc.).</para>
+	  	 <para>When working with older versions of Virtuoso, CORS support cannot be configured at the server-level, but it may be enabled within application logic (scripting, PL, etc.).</para>
+	  	 <sect4 id="corssharesetupapplv">  
+	  	   <title>Application-level CORS Setup</title>
+	  	   <para>Any Virtuoso PL (VSP)-based application can implement CORS checking through well-known 
+	  	   	HTTP functions <link linkend="fn_http_request_header"><function>http_request_header()</function></link> and 
+	  	 	<link linkend="fn_http_header"><function>http_header()</function></link>. This method will 
+	  	 	  work with any version of Virtuoso. For instance:</para>
+<programlisting><![CDATA[
+<?vsp 
+    IF (http_request_header (lines, 'Origin', NULL) = 'http://host.org')
+      {
+          http_header ('Access-Control-Allow-Origin: http://host.org\r\n');
+      }
+   ELSE 
+      {
+         RETURN;
+      }
+-- Additional code here ---
+
+?>
+]]></programlisting>	  	 	  
+         <para>Applications running in other hosted environments (Perl, Python, PHP, ASP.NET, etc.) may also use their specific scripting options to add and/or check relevent headers.</para>
+	     </sect4> 	  	   
+	  	 <sect4 id="corssharesetupsrvlv">  
+	  	   <title>Server-level CORS Setup</title>
+	  	   <para>Note: These instance/server-level configuration instructions require 
+	  	   	 <ulink url="http://edit-wiki.usnet.private/dataspace/dav/wiki/VOS/VOSNews">Virtuoso Open Source (VOS) 6.1.3 or later</ulink>, 
+	  	   	 or <ulink url="http://download.openlinksw.com/virtwiz/">Virtuoso Commercial Edition 6.2.3129 or later</ulink>.</para>
+	  	   <orderedlist>
+           <listitem>In the Virtuoso Conductor, go to <emphasis>Web Application Server -> Virtual Directories & Directories</emphasis>.
+             <figure id="oc1" float="1">
+               <title>Server-side Cross-Origin Resource Sharing (CORS) Example Setup</title>
+               <graphic fileref="ui/oc1.png"/>
+             </figure>	
+           </listitem>
+           <listitem>Expand the <emphasis>Interface</emphasis> store. 
+             <figure id="oc2" float="1">
+               <title>Server-side Cross-Origin Resource Sharing (CORS) Example Setup</title>
+               <graphic fileref="ui/oc2.png"/>
+             </figure>	
+           </listitem>
+           <listitem>Click <emphasis>New Directory</emphasis>.</listitem>
+           <listitem>Specify the desired <emphasis>Virtual Directory Type</emphasis>, or choose an existing virtual directory to use as a template.
+             <figure id="oc3" float="1">
+               <title>Server-side Cross-Origin Resource Sharing (CORS) Example Setup</title>
+               <graphic fileref="ui/oc3.png"/>
+             </figure>	
+           </listitem>
+           <listitem>Click <emphasis>Next</emphasis>.</listitem>
+           <listitem>Specify the <emphasis>Directory Path</emphasis> value.
+             <figure id="oc4" float="1">
+               <title>Server-side Cross-Origin Resource Sharing (CORS) Example Setup</title>
+               <graphic fileref="ui/oc4.png"/>
+             </figure>	
+           </listitem>
+           <listitem>Set the <emphasis>CORS</emphasis> options.
+             <figure id="oc5" float="1">
+               <title>Server-side Cross-Origin Resource Sharing (CORS) Example Setup</title>
+               <graphic fileref="ui/oc5.png"/>
+             </figure>	
+             <itemizedlist mark="bullet">
+               <listitem><emphasis>Cross-Origin Resource Sharing</emphasis>: Contains a single wildcard 
+                asterisk, i.e., "<emphasis>*</emphasis>", or a space-delimited list of HTTP server URIs, 
+                e.g., "<emphasis>http://example.com:8080 http://blah.example.com http://foo.example.com</emphasis>". 
+                Scripts originating on the listed HTTP servers are authorized to retrieve the specified 
+                resource(s); the wildcard means scripts from any HTTP server will be authorized. For this 
+                example, enter the following single URI:
+<programlisting><![CDATA[
+http://demo.openlinksw.com	
+]]></programlisting>             	
+               </listitem>
+               <listitem><emphasis>Reject Unintended CORs</emphasis> checkbox: When ticked (and the application does not overwrite headers), unmatched Origins will be rejected by sending an empty response. For this example, tick this box.</listitem>
+             </itemizedlist>
+           </listitem>
+           <listitem>Click Save changes.</listitem>
+         </orderedlist>
+       </sect4>  
+	    <sect4 id="corssharewkspcurlexmp">  
+	    	 <title>Example Usage with cURL</title>
+	    	 <sect5 id="corssharewkspcurlexmp1">  
+	    	 	 <title>Example 1</title>
+           <orderedlist>
+             <listitem>Suppose the example setup above is performed, and http://demo.openlinksw.com/ is in the CORS list.</listitem>
+             <listitem>In this case, the request below will return an empty response:
+<programlisting><![CDATA[
+$ curl -i  http://demo.openlinksw.com/mytest/test.vsp
+HTTP/1.1 200 OK
+Server: Virtuoso/06.02.3128 (Win32) i686-generic-win-32  VDB
+Connection: Keep-Alive
+Content-Type: text/html; charset=ISO-8859-1
+Date: Thu, 28 Oct 2010 09:27:54 GMT
+Accept-Ranges: bytes
+Content-Length: 0
+]]></programlisting>           	
+            </listitem>
+          </orderedlist>	  	 	
+	      </sect5> 	  	 	
+	  	  <sect5 id="corssharewkspcurlexmp2">  
+	  	  	<title>Example 2</title>
+          <orderedlist>
+            <listitem>Suppose the example Setup above is performed, and http://demo.openlinksw.com/ is in the CORS list.</listitem>
+            <listitem>Also, suppose the curl command includes a proper Origin value, e.g.:
+<programlisting><![CDATA[
+-H "Origin: http://demo.openlinksw.com"
+]]></programlisting>
+           </listitem>
+           <listitem>In this case, the request below will return a response including the retrieved content, etc.
+<programlisting><![CDATA[
+$ curl -i -H "Origin: http://demo.openlinksw.com"  http://demo.openlinksw.com/mytest/test.vsp
+HTTP/1.1 200 OK
+Server: Virtuoso/06.02.3128 (Win32) i686-generic-win-32  VDB
+Connection: Keep-Alive
+Content-Type: text/html; charset=ISO-8859-1
+Date: Thu, 28 Oct 2010 09:40:21 GMT
+Access-Control-Allow-Origin: http://demo.openlinksw.com
+Accept-Ranges: bytes
+Content-Length: 7
+]]></programlisting>           	
+           </listitem>
+         </orderedlist>	  	 	
+	     </sect5> 	  	 	
+	  	 <sect5 id="corssharewkspcurlexmp3">  
+	  	 	 <title>Example 3</title>
+         <orderedlist>
+           <listitem>Suppose the Example Setup above is performed, but reject is off (i.e., "Reject Unintended CORs" check-box is not ticked).</listitem>
+           <listitem>In this case, the request below will return a response that lacks Access-Control-Allow-Origin:
+<programlisting><![CDATA[
+$ curl -i  http://demo.openlinksw.com/mytest/test.vsp
+HTTP/1.1 200 OK
+Server: Virtuoso/06.02.3128 (Win32) i686-generic-win-32  VDB
+Connection: Keep-Alive
+Content-Type: text/html; charset=ISO-8859-1
+Date: Thu, 28 Oct 2010 09:45:01 GMT
+Accept-Ranges: bytes
+Content-Length: 7
+]]></programlisting>           	
+           </listitem>
+         </orderedlist>	  	 	
+	     </sect5> 	  
+	   </sect4>	 	
+	  </sect3> 
+	  <tip><title>See Also:</title>
+      <para><ulink url="https://wiki.mozilla.org/Security/Origin">Origin header proposal for CSRF and click-jacking mitigation</ulink></para>
+      <para><ulink url="http://arunranga.com/examples/access-control/">CORS In Action</ulink></para>
+      <para><ulink url="http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/">Cross-domain Ajax with Cross-Origin Resource Sharing</ulink></para>
+      <para><ulink url="http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity">Guide to Secure Implementation of Cross Origin Requests in HTML5</ulink></para>
+    </tip>
+  </sect2>		
 </sect1>
diff --git a/docsrc/xmlsource/vspx.xml b/docsrc/xmlsource/vspx.xml
index 3572527..0f6321b 100644
--- a/docsrc/xmlsource/vspx.xml
+++ b/docsrc/xmlsource/vspx.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_button.xml b/docsrc/xmlsource/vspx_ref/vc_button.xml
index ac9a59a..7f0b4ff 100644
--- a/docsrc/xmlsource/vspx_ref/vc_button.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_button.xml
@@ -322,12 +322,12 @@ constructor method vspx_button (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -373,12 +373,12 @@ placed into the resulting HTML with no changes.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -429,12 +429,12 @@ The form accepts two numbers and calculates their sum.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__2.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__2.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -486,12 +486,12 @@ The form allows to select a file from server's file system
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__3.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__3.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -539,12 +539,12 @@ The form allows to select a two values from a different page
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__4.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__4.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_calendar.xml b/docsrc/xmlsource/vspx_ref/vc_calendar.xml
index 5a26264..6a7f503 100644
--- a/docsrc/xmlsource/vspx_ref/vc_calendar.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_calendar.xml
@@ -137,12 +137,12 @@ constructor method vspx_calendar (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: calendar__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: calendar__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_check_box.xml b/docsrc/xmlsource/vspx_ref/vc_check_box.xml
index 3fa9d9b..ec3ead6 100644
--- a/docsrc/xmlsource/vspx_ref/vc_check_box.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_check_box.xml
@@ -274,12 +274,12 @@ overriding method vc_set_model () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: check_box__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: check_box__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_code_file.xml b/docsrc/xmlsource/vspx_ref/vc_code_file.xml
index 4312f54..3358880 100644
--- a/docsrc/xmlsource/vspx_ref/vc_code_file.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_code_file.xml
@@ -65,12 +65,12 @@
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: code_file__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: code_file__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_data_grid.xml b/docsrc/xmlsource/vspx_ref/vc_data_grid.xml
index c659ab6..61923c9 100644
--- a/docsrc/xmlsource/vspx_ref/vc_data_grid.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_data_grid.xml
@@ -239,12 +239,12 @@ as (
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_grid__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_grid__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_data_list.xml b/docsrc/xmlsource/vspx_ref/vc_data_list.xml
index 339f612..1cae64b 100644
--- a/docsrc/xmlsource/vspx_ref/vc_data_list.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_data_list.xml
@@ -303,12 +303,12 @@ constructor method vspx_data_list (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -350,12 +350,12 @@ with a option values their customer IDs.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_data_set.xml b/docsrc/xmlsource/vspx_ref/vc_data_set.xml
index 2448209..9af2c80 100644
--- a/docsrc/xmlsource/vspx_ref/vc_data_set.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_data_set.xml
@@ -264,12 +264,12 @@ as (
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -370,12 +370,12 @@ Allows editing, addtion and removal of existing records.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_data_source.xml b/docsrc/xmlsource/vspx_ref/vc_data_source.xml
index 78bccdd..0d5ada3 100644
--- a/docsrc/xmlsource/vspx_ref/vc_data_source.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_data_source.xml
@@ -284,12 +284,12 @@ constructor method vspx_data_source (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_source__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_source__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_error_summary.xml b/docsrc/xmlsource/vspx_ref/vc_error_summary.xml
index 397ed01..3febe29 100644
--- a/docsrc/xmlsource/vspx_ref/vc_error_summary.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_error_summary.xml
@@ -67,12 +67,12 @@ different places of the page to print errors for different controls.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -127,12 +127,12 @@ in the place specified by v:error-summary element.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_form.xml b/docsrc/xmlsource/vspx_ref/vc_form.xml
index 21fcf60..bd9b03a 100644
--- a/docsrc/xmlsource/vspx_ref/vc_form.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_form.xml
@@ -226,12 +226,12 @@ create type vspx_form under vspx_control
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -278,12 +278,12 @@ The OK button of the form submits data from the form back to the same page.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_include.xml b/docsrc/xmlsource/vspx_ref/vc_include.xml
index 701bd6e..40e08a4 100644
--- a/docsrc/xmlsource/vspx_ref/vc_include.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_include.xml
@@ -86,12 +86,12 @@ Unlike 'active' attribute, this one is effective only when the page is d
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: include__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: include__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_label.xml b/docsrc/xmlsource/vspx_ref/vc_label.xml
index 08678b6..40e652d 100644
--- a/docsrc/xmlsource/vspx_ref/vc_label.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_label.xml
@@ -225,12 +225,12 @@ overriding method vc_render () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: label__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: label__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_login.xml b/docsrc/xmlsource/vspx_ref/vc_login.xml
index 46564c3..6985b9b 100644
--- a/docsrc/xmlsource/vspx_ref/vc_login.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_login.xml
@@ -238,12 +238,12 @@ constructor method vspx_login (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_login_form.xml b/docsrc/xmlsource/vspx_ref/vc_login_form.xml
index 84fecd6..30ead50 100644
--- a/docsrc/xmlsource/vspx_ref/vc_login_form.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_login_form.xml
@@ -181,12 +181,12 @@ overriding method vc_render () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login_form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login_form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_page.xml b/docsrc/xmlsource/vspx_ref/vc_page.xml
index ef4fa17..8ebd893 100644
--- a/docsrc/xmlsource/vspx_ref/vc_page.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_page.xml
@@ -178,12 +178,12 @@ as (
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: page__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: page__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_radio_button.xml b/docsrc/xmlsource/vspx_ref/vc_radio_button.xml
index 563b774..4df443c 100644
--- a/docsrc/xmlsource/vspx_ref/vc_radio_button.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_radio_button.xml
@@ -243,12 +243,12 @@ overriding method vc_set_model () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_radio_group.xml b/docsrc/xmlsource/vspx_ref/vc_radio_group.xml
index 45edd27..a8431a2 100644
--- a/docsrc/xmlsource/vspx_ref/vc_radio_group.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_radio_group.xml
@@ -151,12 +151,12 @@ overriding method vc_set_model () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_group__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_select_list.xml b/docsrc/xmlsource/vspx_ref/vc_select_list.xml
index 7150068..092d5df 100644
--- a/docsrc/xmlsource/vspx_ref/vc_select_list.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_select_list.xml
@@ -253,12 +253,12 @@ constructor method vspx_select_list (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: select_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: select_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_tab.xml b/docsrc/xmlsource/vspx_ref/vc_tab.xml
index 7ff177a..1293e53 100644
--- a/docsrc/xmlsource/vspx_ref/vc_tab.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_tab.xml
@@ -175,12 +175,12 @@ as
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tab__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_text.xml b/docsrc/xmlsource/vspx_ref/vc_text.xml
index c89e24a..2f8af3a 100644
--- a/docsrc/xmlsource/vspx_ref/vc_text.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_text.xml
@@ -293,12 +293,12 @@ as
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: text__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: text__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_tree.xml b/docsrc/xmlsource/vspx_ref/vc_tree.xml
index 9836d47..5791654 100644
--- a/docsrc/xmlsource/vspx_ref/vc_tree.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_tree.xml
@@ -247,12 +247,12 @@ constructor method vspx_tree (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tree__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tree__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_url.xml b/docsrc/xmlsource/vspx_ref/vc_url.xml
index 7f9d8f2..5b9d53a 100644
--- a/docsrc/xmlsource/vspx_ref/vc_url.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_url.xml
@@ -242,12 +242,12 @@ constructor method vspx_url (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: url__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: url__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_validator.xml b/docsrc/xmlsource/vspx_ref/vc_validator.xml
index 4d71a28..d107058 100644
--- a/docsrc/xmlsource/vspx_ref/vc_validator.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_validator.xml
@@ -178,12 +178,12 @@ The value of this attribute will not be used when the resulting HTML is rendered
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: validator__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: validator__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_variable.xml b/docsrc/xmlsource/vspx_ref/vc_variable.xml
index 7e57f35..3a94d9e 100644
--- a/docsrc/xmlsource/vspx_ref/vc_variable.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_variable.xml
@@ -152,12 +152,12 @@ The value of this attribute will not be used when the resulting HTML is rendered
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: variable__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: variable__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vc_vscx.xml b/docsrc/xmlsource/vspx_ref/vc_vscx.xml
index 2aa9d0d..59e93ab 100644
--- a/docsrc/xmlsource/vspx_ref/vc_vscx.xml
+++ b/docsrc/xmlsource/vspx_ref/vc_vscx.xml
@@ -136,12 +136,12 @@ overriding method vc_pre_render (stream any, n int) returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -197,12 +197,12 @@ as a child of outer page.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_button.xml b/docsrc/xmlsource/vspx_ref/vspx_button.xml
index 656eb84..8964a8b 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_button.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_button.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_check_box.xml b/docsrc/xmlsource/vspx_ref/vspx_check_box.xml
index d2600e5..31667a2 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_check_box.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_check_box.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_data_grid.xml b/docsrc/xmlsource/vspx_ref/vspx_data_grid.xml
index dedac92..0ff605d 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_data_grid.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_data_grid.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_data_list.xml b/docsrc/xmlsource/vspx_ref/vspx_data_list.xml
index c02b163..3041d46 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_data_list.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_data_list.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_data_set.xml b/docsrc/xmlsource/vspx_ref/vspx_data_set.xml
index 9cf7d1e..215f632 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_data_set.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_data_set.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_error_summary.xml b/docsrc/xmlsource/vspx_ref/vspx_error_summary.xml
index 3aecac1..5abdbce 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_error_summary.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_error_summary.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_field.xml b/docsrc/xmlsource/vspx_ref/vspx_field.xml
index 84a1a61..8131d26 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_field.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_field.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_form.xml b/docsrc/xmlsource/vspx_ref/vspx_form.xml
index 5d45572..3928ba2 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_form.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_form.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_include.xml b/docsrc/xmlsource/vspx_ref/vspx_include.xml
index 91f8770..224ddbd 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_include.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_include.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_label.xml b/docsrc/xmlsource/vspx_ref/vspx_label.xml
index 1fcc43f..3dd9b78 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_label.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_label.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_login.xml b/docsrc/xmlsource/vspx_ref/vspx_login.xml
index 24421ce..0e70fe8 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_login.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_login.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_login_form.xml b/docsrc/xmlsource/vspx_ref/vspx_login_form.xml
index 2608644..3a7b9e6 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_login_form.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_login_form.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_page.xml b/docsrc/xmlsource/vspx_ref/vspx_page.xml
index 67c7a8c..9c7abbe 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_page.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_page.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_radio_button.xml b/docsrc/xmlsource/vspx_ref/vspx_radio_button.xml
index 10a305c..53e90df 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_radio_button.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_radio_button.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_select_list.xml b/docsrc/xmlsource/vspx_ref/vspx_select_list.xml
index da9e07c..2d356e6 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_select_list.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_select_list.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_tab.xml b/docsrc/xmlsource/vspx_ref/vspx_tab.xml
index 091814e..a590bc5 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_tab.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_tab.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_template.xml b/docsrc/xmlsource/vspx_ref/vspx_template.xml
index dc0941f..21389c7 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_template.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_template.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_text.xml b/docsrc/xmlsource/vspx_ref/vspx_text.xml
index d822ae6..e3ce27b 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_text.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_text.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_textarea.xml b/docsrc/xmlsource/vspx_ref/vspx_textarea.xml
index 4bf0f4c..128a883 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_textarea.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_textarea.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_tree.xml b/docsrc/xmlsource/vspx_ref/vspx_tree.xml
index bcbf0de..905034e 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_tree.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_tree.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_update_field.xml b/docsrc/xmlsource/vspx_ref/vspx_update_field.xml
index 9a7ec41..b978fb7 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_update_field.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_update_field.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_url.xml b/docsrc/xmlsource/vspx_ref/vspx_url.xml
index bae0897..1d746c5 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_url.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_url.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_validator.xml b/docsrc/xmlsource/vspx_ref/vspx_validator.xml
index 1225397..8f4a939 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_validator.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_validator.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspx_ref/vspx_variable.xml b/docsrc/xmlsource/vspx_ref/vspx_variable.xml
index 7912b31..b47ec07 100644
--- a/docsrc/xmlsource/vspx_ref/vspx_variable.xml
+++ b/docsrc/xmlsource/vspx_ref/vspx_variable.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/vspxdoc.xml b/docsrc/xmlsource/vspxdoc.xml
index bf665ad..d340bea 100644
--- a/docsrc/xmlsource/vspxdoc.xml
+++ b/docsrc/xmlsource/vspxdoc.xml
@@ -564,12 +564,12 @@ constructor method vspx_button (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -615,12 +615,12 @@ placed into the resulting HTML with no changes.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -671,12 +671,12 @@ The form accepts two numbers and calculates their sum.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__2.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__2.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -728,12 +728,12 @@ The form allows to select a file from server's file system
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__3.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__3.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -781,12 +781,12 @@ The form allows to select a two values from a different page
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: button__4.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: button__4.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -978,12 +978,12 @@ constructor method vspx_calendar (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: calendar__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: calendar__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1341,12 +1341,12 @@ overriding method vc_set_model () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: check_box__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: check_box__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1458,12 +1458,12 @@ Depending on the state of the checkbox, the submitted value is either 'check
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: code_file__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: code_file__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1867,12 +1867,12 @@ as (
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_grid__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_grid__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2271,12 +2271,12 @@ constructor method vspx_data_list (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2318,12 +2318,12 @@ with a option values their customer IDs.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_list__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_list__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2631,12 +2631,12 @@ as (
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -2737,12 +2737,12 @@ Allows editing, addtion and removal of existing records.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_set__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_set__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -3094,12 +3094,12 @@ constructor method vspx_data_source (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: data_source__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: data_source__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -3226,12 +3226,12 @@ different places of the page to print errors for different controls.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -3286,12 +3286,12 @@ in the place specified by v:error-summary element.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: error_summary__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: error_summary__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -3742,12 +3742,12 @@ create type vspx_form under vspx_control
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -3794,12 +3794,12 @@ The OK button of the form submits data from the form back to the same page.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: form__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: form__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -4130,12 +4130,12 @@ Unlike 'active' attribute, this one is effective only when the page is d
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: include__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: include__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -4789,12 +4789,12 @@ overriding method vc_render () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: label__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: label__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -5369,12 +5369,12 @@ constructor method vspx_login (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -5611,12 +5611,12 @@ overriding method vc_render () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: login_form__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: login_form__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -6148,12 +6148,12 @@ as (
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: page__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: page__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -6563,12 +6563,12 @@ overriding method vc_set_model () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_button__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -6782,12 +6782,12 @@ overriding method vc_set_model () returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: radio_group__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: radio_group__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -7146,12 +7146,12 @@ constructor method vspx_select_list (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: select_list__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: select_list__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -7429,12 +7429,12 @@ as
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tab__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tab__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -8095,12 +8095,12 @@ as
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: text__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: text__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -8658,12 +8658,12 @@ constructor method vspx_tree (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: tree__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: tree__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -8961,12 +8961,12 @@ constructor method vspx_url (name varchar, parent vspx_control)
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: url__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: url__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -9180,12 +9180,12 @@ The value of this attribute will not be used when the resulting HTML is rendered
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: validator__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: validator__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -9390,12 +9390,12 @@ The value of this attribute will not be used when the resulting HTML is rendered
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: variable__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: variable__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -9573,12 +9573,12 @@ overriding method vc_pre_render (stream any, n int) returns any
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__0.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -9634,12 +9634,12 @@ as a child of outer page.
 <?xml version="1.0"?>
 <!--
  -  
- -  $Id: vscx__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
+ -  $Id: vscx__1.vspx,v 1.2.2.1 2012/03/08 12:55:23 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/web_acl.xml b/docsrc/xmlsource/web_acl.xml
index bd225cb..efc940f 100644
--- a/docsrc/xmlsource/web_acl.xml
+++ b/docsrc/xmlsource/web_acl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -143,12 +143,15 @@ start to collect statistics), and then to check with http_acl_stats () what valu
 
 <itemizedlist>
   <listitem>From Admin UI main menu open "System Admin" node.</listitem>
-  <listitem>Choose "Access Control"</listitem>
+  <listitem>Go to Security -> Access Control</listitem>
   <listitem>By default three default ACLs are listed:
   <simplelist>
    <member>HTTP - rules for the Web server </member>
    <member>NEWS - rules for the Internet News</member>
    <member>PROXY - rules for the Web Proxy Server</member>
+   <member>PSH and PSH-SSL - available only when the 
+	    <ulink url="http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/pubsubhub_dav.vad">pubsubhub_dav.vad</ulink> 
+	    is installed.</member>
   </simplelist>
   <figure id="admacl1" float="1">
       <title>Access Control</title>
diff --git a/docsrc/xmlsource/webandxml.xml b/docsrc/xmlsource/webandxml.xml
index 060cdd8..d8919e6 100644
--- a/docsrc/xmlsource/webandxml.xml
+++ b/docsrc/xmlsource/webandxml.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/webappdevelopment.xml b/docsrc/xmlsource/webappdevelopment.xml
index 32f446d..8c491cd 100644
--- a/docsrc/xmlsource/webappdevelopment.xml
+++ b/docsrc/xmlsource/webappdevelopment.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/webdav.xml b/docsrc/xmlsource/webdav.xml
index 89fd283..815438c 100644
--- a/docsrc/xmlsource/webdav.xml
+++ b/docsrc/xmlsource/webdav.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/webserver.xml b/docsrc/xmlsource/webserver.xml
index 4e26d55..5d27a6e 100644
--- a/docsrc/xmlsource/webserver.xml
+++ b/docsrc/xmlsource/webserver.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -1388,7 +1388,7 @@ configured, i.e. https://virtuoso.example.com:4443/</listitem>
 	<orderedlist>
 		<listitem>In the Preferences dialog, open the Advanced tab, and click the "View certificates" button.</listitem> 
 		<listitem>Click the "Add exception" button and enter the address of the HTTPS server you've just
-configured, i.e. https://virtuoso.example.com:4433/
+configured, i.e. https://virtuoso.example.com:443/
 </listitem>
 <listitem>Click OK, and confirm the exception.
   	<figure id="sphttps10" float="1">
diff --git a/docsrc/xmlsource/webservices.xml b/docsrc/xmlsource/webservices.xml
index 5972b44..21316da 100644
--- a/docsrc/xmlsource/webservices.xml
+++ b/docsrc/xmlsource/webservices.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ws-rm.xml b/docsrc/xmlsource/ws-rm.xml
index ff0b0b2..3b74cf2 100644
--- a/docsrc/xmlsource/ws-rm.xml
+++ b/docsrc/xmlsource/ws-rm.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ws-routing.xml b/docsrc/xmlsource/ws-routing.xml
index f20f1fc..1b9f7ed 100644
--- a/docsrc/xmlsource/ws-routing.xml
+++ b/docsrc/xmlsource/ws-routing.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ws-security.xml b/docsrc/xmlsource/ws-security.xml
index 264ffcc..49c97bb 100644
--- a/docsrc/xmlsource/ws-security.xml
+++ b/docsrc/xmlsource/ws-security.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/ws-trust.xml b/docsrc/xmlsource/ws-trust.xml
index 4cf5971..6e2f87c 100644
--- a/docsrc/xmlsource/ws-trust.xml
+++ b/docsrc/xmlsource/ws-trust.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/wsdl.xml b/docsrc/xmlsource/wsdl.xml
index 31b9147..04ff958 100644
--- a/docsrc/xmlsource/wsdl.xml
+++ b/docsrc/xmlsource/wsdl.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xa.xml b/docsrc/xmlsource/xa.xml
index b68cbc4..ae7d92b 100644
--- a/docsrc/xmlsource/xa.xml
+++ b/docsrc/xmlsource/xa.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmla.xml b/docsrc/xmlsource/xmla.xml
index 705f4e6..d656148 100644
--- a/docsrc/xmlsource/xmla.xml
+++ b/docsrc/xmlsource/xmla.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/_xpf_template.xml b/docsrc/xmlsource/xmlref/_xpf_template.xml
index 0403de5..f4efdb3 100644
--- a/docsrc/xmlsource/xmlref/_xpf_template.xml
+++ b/docsrc/xmlsource/xmlref/_xpf_template.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf__sql__column.xml b/docsrc/xmlsource/xmlref/xpf__sql__column.xml
index 72cc6ab..f45a0c0 100644
--- a/docsrc/xmlsource/xmlref/xpf__sql__column.xml
+++ b/docsrc/xmlsource/xmlref/xpf__sql__column.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_and.xml b/docsrc/xmlsource/xmlref/xpf_and.xml
index bd59d4c..0d20c83 100644
--- a/docsrc/xmlsource/xmlref/xpf_and.xml
+++ b/docsrc/xmlsource/xmlref/xpf_and.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_append.xml b/docsrc/xmlsource/xmlref/xpf_append.xml
index 31c0685..58ccd98 100644
--- a/docsrc/xmlsource/xmlref/xpf_append.xml
+++ b/docsrc/xmlsource/xmlref/xpf_append.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_assign.xml b/docsrc/xmlsource/xmlref/xpf_assign.xml
index 7025809..63b8db8 100644
--- a/docsrc/xmlsource/xmlref/xpf_assign.xml
+++ b/docsrc/xmlsource/xmlref/xpf_assign.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_avg.xml b/docsrc/xmlsource/xmlref/xpf_avg.xml
index 65a4b6d..867a412 100644
--- a/docsrc/xmlsource/xmlref/xpf_avg.xml
+++ b/docsrc/xmlsource/xmlref/xpf_avg.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_boolean.xml b/docsrc/xmlsource/xmlref/xpf_boolean.xml
index 8a16027..8d5e48d 100644
--- a/docsrc/xmlsource/xmlref/xpf_boolean.xml
+++ b/docsrc/xmlsource/xmlref/xpf_boolean.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_ceiling.xml b/docsrc/xmlsource/xmlref/xpf_ceiling.xml
index bcd6e44..93e5aa8 100644
--- a/docsrc/xmlsource/xmlref/xpf_ceiling.xml
+++ b/docsrc/xmlsource/xmlref/xpf_ceiling.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_collection.xml b/docsrc/xmlsource/xmlref/xpf_collection.xml
index 9e99aae..ad0b327 100644
--- a/docsrc/xmlsource/xmlref/xpf_collection.xml
+++ b/docsrc/xmlsource/xmlref/xpf_collection.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_concat.xml b/docsrc/xmlsource/xmlref/xpf_concat.xml
index ddf0689..2158752 100644
--- a/docsrc/xmlsource/xmlref/xpf_concat.xml
+++ b/docsrc/xmlsource/xmlref/xpf_concat.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_contains.xml b/docsrc/xmlsource/xmlref/xpf_contains.xml
index a405d88..ca4eb96 100644
--- a/docsrc/xmlsource/xmlref/xpf_contains.xml
+++ b/docsrc/xmlsource/xmlref/xpf_contains.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_count.xml b/docsrc/xmlsource/xmlref/xpf_count.xml
index bb5821c..16ccdc2 100644
--- a/docsrc/xmlsource/xmlref/xpf_count.xml
+++ b/docsrc/xmlsource/xmlref/xpf_count.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_create_attribute.xml b/docsrc/xmlsource/xmlref/xpf_create_attribute.xml
index 512c9e5..0816b3e 100644
--- a/docsrc/xmlsource/xmlref/xpf_create_attribute.xml
+++ b/docsrc/xmlsource/xmlref/xpf_create_attribute.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_create_comment.xml b/docsrc/xmlsource/xmlref/xpf_create_comment.xml
index 64be7a1..789b8a6 100644
--- a/docsrc/xmlsource/xmlref/xpf_create_comment.xml
+++ b/docsrc/xmlsource/xmlref/xpf_create_comment.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_create_element.xml b/docsrc/xmlsource/xmlref/xpf_create_element.xml
index b59ca82..6edc294 100644
--- a/docsrc/xmlsource/xmlref/xpf_create_element.xml
+++ b/docsrc/xmlsource/xmlref/xpf_create_element.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_create_pi.xml b/docsrc/xmlsource/xmlref/xpf_create_pi.xml
index a56585e..8734e1d 100644
--- a/docsrc/xmlsource/xmlref/xpf_create_pi.xml
+++ b/docsrc/xmlsource/xmlref/xpf_create_pi.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_current.xml b/docsrc/xmlsource/xmlref/xpf_current.xml
index 77af5c4..431d70f 100644
--- a/docsrc/xmlsource/xmlref/xpf_current.xml
+++ b/docsrc/xmlsource/xmlref/xpf_current.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_deass.xml b/docsrc/xmlsource/xmlref/xpf_deass.xml
index 0403de5..f4efdb3 100644
--- a/docsrc/xmlsource/xmlref/xpf_deass.xml
+++ b/docsrc/xmlsource/xmlref/xpf_deass.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_distinct.xml b/docsrc/xmlsource/xmlref/xpf_distinct.xml
index 1960c6d..e9a58b6 100644
--- a/docsrc/xmlsource/xmlref/xpf_distinct.xml
+++ b/docsrc/xmlsource/xmlref/xpf_distinct.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_doc.xml b/docsrc/xmlsource/xmlref/xpf_doc.xml
index bea3f9f..f2a0131 100644
--- a/docsrc/xmlsource/xmlref/xpf_doc.xml
+++ b/docsrc/xmlsource/xmlref/xpf_doc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_document.xml b/docsrc/xmlsource/xmlref/xpf_document.xml
index 48c7d6a..a302f18 100644
--- a/docsrc/xmlsource/xmlref/xpf_document.xml
+++ b/docsrc/xmlsource/xmlref/xpf_document.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_document_literal.xml b/docsrc/xmlsource/xmlref/xpf_document_literal.xml
index 70c62eb..bbccfef 100644
--- a/docsrc/xmlsource/xmlref/xpf_document_literal.xml
+++ b/docsrc/xmlsource/xmlref/xpf_document_literal.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_empty.xml b/docsrc/xmlsource/xmlref/xpf_empty.xml
index 3ad3fd0..3f2e0c8 100644
--- a/docsrc/xmlsource/xmlref/xpf_empty.xml
+++ b/docsrc/xmlsource/xmlref/xpf_empty.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_ends_with.xml b/docsrc/xmlsource/xmlref/xpf_ends_with.xml
index 073efdb..cd3983a 100644
--- a/docsrc/xmlsource/xmlref/xpf_ends_with.xml
+++ b/docsrc/xmlsource/xmlref/xpf_ends_with.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_every.xml b/docsrc/xmlsource/xmlref/xpf_every.xml
index c2678f4..3cb6765 100644
--- a/docsrc/xmlsource/xmlref/xpf_every.xml
+++ b/docsrc/xmlsource/xmlref/xpf_every.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_except.xml b/docsrc/xmlsource/xmlref/xpf_except.xml
index bc35788..3d58468 100644
--- a/docsrc/xmlsource/xmlref/xpf_except.xml
+++ b/docsrc/xmlsource/xmlref/xpf_except.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_false.xml b/docsrc/xmlsource/xmlref/xpf_false.xml
index bb9aa81..dc9a1ab 100644
--- a/docsrc/xmlsource/xmlref/xpf_false.xml
+++ b/docsrc/xmlsource/xmlref/xpf_false.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_filter.xml b/docsrc/xmlsource/xmlref/xpf_filter.xml
index 06fc213..71472bb 100644
--- a/docsrc/xmlsource/xmlref/xpf_filter.xml
+++ b/docsrc/xmlsource/xmlref/xpf_filter.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_floor.xml b/docsrc/xmlsource/xmlref/xpf_floor.xml
index 373088f..dc2fce9 100644
--- a/docsrc/xmlsource/xmlref/xpf_floor.xml
+++ b/docsrc/xmlsource/xmlref/xpf_floor.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_for.xml b/docsrc/xmlsource/xmlref/xpf_for.xml
index eef5893..f84a258 100644
--- a/docsrc/xmlsource/xmlref/xpf_for.xml
+++ b/docsrc/xmlsource/xmlref/xpf_for.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_format_number.xml b/docsrc/xmlsource/xmlref/xpf_format_number.xml
index e2ce92c..0ceaa38 100644
--- a/docsrc/xmlsource/xmlref/xpf_format_number.xml
+++ b/docsrc/xmlsource/xmlref/xpf_format_number.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_function_available.xml b/docsrc/xmlsource/xmlref/xpf_function_available.xml
index e277ff6..321a471 100644
--- a/docsrc/xmlsource/xmlref/xpf_function_available.xml
+++ b/docsrc/xmlsource/xmlref/xpf_function_available.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_generate_id.xml b/docsrc/xmlsource/xmlref/xpf_generate_id.xml
index ac23bcd..4fc91aa 100644
--- a/docsrc/xmlsource/xmlref/xpf_generate_id.xml
+++ b/docsrc/xmlsource/xmlref/xpf_generate_id.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_id.xml b/docsrc/xmlsource/xmlref/xpf_id.xml
index 48fdce8..0338be1 100644
--- a/docsrc/xmlsource/xmlref/xpf_id.xml
+++ b/docsrc/xmlsource/xmlref/xpf_id.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_if.xml b/docsrc/xmlsource/xmlref/xpf_if.xml
index 9a8e7e4..3fcc022 100644
--- a/docsrc/xmlsource/xmlref/xpf_if.xml
+++ b/docsrc/xmlsource/xmlref/xpf_if.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_intersect.xml b/docsrc/xmlsource/xmlref/xpf_intersect.xml
index a748ebe..02eeae3 100644
--- a/docsrc/xmlsource/xmlref/xpf_intersect.xml
+++ b/docsrc/xmlsource/xmlref/xpf_intersect.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_is_after.xml b/docsrc/xmlsource/xmlref/xpf_is_after.xml
index 9c1c890..e78b907 100644
--- a/docsrc/xmlsource/xmlref/xpf_is_after.xml
+++ b/docsrc/xmlsource/xmlref/xpf_is_after.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_is_before.xml b/docsrc/xmlsource/xmlref/xpf_is_before.xml
index fd103c5..ce4da8b 100644
--- a/docsrc/xmlsource/xmlref/xpf_is_before.xml
+++ b/docsrc/xmlsource/xmlref/xpf_is_before.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_iterate.xml b/docsrc/xmlsource/xmlref/xpf_iterate.xml
index 6c40532..35b6563 100644
--- a/docsrc/xmlsource/xmlref/xpf_iterate.xml
+++ b/docsrc/xmlsource/xmlref/xpf_iterate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_iterate_rev.xml b/docsrc/xmlsource/xmlref/xpf_iterate_rev.xml
index 883456e..77c43f7 100644
--- a/docsrc/xmlsource/xmlref/xpf_iterate_rev.xml
+++ b/docsrc/xmlsource/xmlref/xpf_iterate_rev.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_key.xml b/docsrc/xmlsource/xmlref/xpf_key.xml
index 79178ec..ca75eeb 100644
--- a/docsrc/xmlsource/xmlref/xpf_key.xml
+++ b/docsrc/xmlsource/xmlref/xpf_key.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_lang.xml b/docsrc/xmlsource/xmlref/xpf_lang.xml
index ec18420..ecf4daa 100644
--- a/docsrc/xmlsource/xmlref/xpf_lang.xml
+++ b/docsrc/xmlsource/xmlref/xpf_lang.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_last.xml b/docsrc/xmlsource/xmlref/xpf_last.xml
index 902f567..f18f4d4 100644
--- a/docsrc/xmlsource/xmlref/xpf_last.xml
+++ b/docsrc/xmlsource/xmlref/xpf_last.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_let.xml b/docsrc/xmlsource/xmlref/xpf_let.xml
index 81addbf..70f0270 100644
--- a/docsrc/xmlsource/xmlref/xpf_let.xml
+++ b/docsrc/xmlsource/xmlref/xpf_let.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_list.xml b/docsrc/xmlsource/xmlref/xpf_list.xml
index fc267db..f578993 100644
--- a/docsrc/xmlsource/xmlref/xpf_list.xml
+++ b/docsrc/xmlsource/xmlref/xpf_list.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_local_name.xml b/docsrc/xmlsource/xmlref/xpf_local_name.xml
index c065f3a..79efcf3 100644
--- a/docsrc/xmlsource/xmlref/xpf_local_name.xml
+++ b/docsrc/xmlsource/xmlref/xpf_local_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_max.xml b/docsrc/xmlsource/xmlref/xpf_max.xml
index 8a57bc7..ed71c12 100644
--- a/docsrc/xmlsource/xmlref/xpf_max.xml
+++ b/docsrc/xmlsource/xmlref/xpf_max.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_min.xml b/docsrc/xmlsource/xmlref/xpf_min.xml
index 7163ea3..f690a28 100644
--- a/docsrc/xmlsource/xmlref/xpf_min.xml
+++ b/docsrc/xmlsource/xmlref/xpf_min.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_name.xml b/docsrc/xmlsource/xmlref/xpf_name.xml
index e2cfc2c..0554e2d 100644
--- a/docsrc/xmlsource/xmlref/xpf_name.xml
+++ b/docsrc/xmlsource/xmlref/xpf_name.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_namespace_uri.xml b/docsrc/xmlsource/xmlref/xpf_namespace_uri.xml
index 4cc087e..b67ea6a 100644
--- a/docsrc/xmlsource/xmlref/xpf_namespace_uri.xml
+++ b/docsrc/xmlsource/xmlref/xpf_namespace_uri.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_normalize_space.xml b/docsrc/xmlsource/xmlref/xpf_normalize_space.xml
index 2aef058..7d48f4f 100644
--- a/docsrc/xmlsource/xmlref/xpf_normalize_space.xml
+++ b/docsrc/xmlsource/xmlref/xpf_normalize_space.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_not.xml b/docsrc/xmlsource/xmlref/xpf_not.xml
index 9e04660..53ab01e 100644
--- a/docsrc/xmlsource/xmlref/xpf_not.xml
+++ b/docsrc/xmlsource/xmlref/xpf_not.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_number.xml b/docsrc/xmlsource/xmlref/xpf_number.xml
index d63d455..0131a37 100644
--- a/docsrc/xmlsource/xmlref/xpf_number.xml
+++ b/docsrc/xmlsource/xmlref/xpf_number.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_or.xml b/docsrc/xmlsource/xmlref/xpf_or.xml
index 80d9578..b0aac07 100644
--- a/docsrc/xmlsource/xmlref/xpf_or.xml
+++ b/docsrc/xmlsource/xmlref/xpf_or.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_position.xml b/docsrc/xmlsource/xmlref/xpf_position.xml
index 20c3856..c26f508 100644
--- a/docsrc/xmlsource/xmlref/xpf_position.xml
+++ b/docsrc/xmlsource/xmlref/xpf_position.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_processXQuery.xml b/docsrc/xmlsource/xmlref/xpf_processXQuery.xml
index fb312b0..3909c6f 100644
--- a/docsrc/xmlsource/xmlref/xpf_processXQuery.xml
+++ b/docsrc/xmlsource/xmlref/xpf_processXQuery.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_processXSLT.xml b/docsrc/xmlsource/xmlref/xpf_processXSLT.xml
index 983208e..60383d2 100644
--- a/docsrc/xmlsource/xmlref/xpf_processXSLT.xml
+++ b/docsrc/xmlsource/xmlref/xpf_processXSLT.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_processXSQL.xml b/docsrc/xmlsource/xmlref/xpf_processXSQL.xml
index 99790b2..c3c2cc0 100644
--- a/docsrc/xmlsource/xmlref/xpf_processXSQL.xml
+++ b/docsrc/xmlsource/xmlref/xpf_processXSQL.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_progn.xml b/docsrc/xmlsource/xmlref/xpf_progn.xml
index fbc5d47..48b1919 100644
--- a/docsrc/xmlsource/xmlref/xpf_progn.xml
+++ b/docsrc/xmlsource/xmlref/xpf_progn.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -79,7 +79,7 @@ This function is not a part of library of standard XQuery 1.0 functions.
       <screen>
 [xmlns:fileio='http://www.example.com/file-io']
 if (function-available ('fileio:printf'),
-  prong (
+  progn (
     fileio:open('greeting.txt', 'wt'),
     fileio:printf('Hello %s', /userinfo/name),
     fileio:close(),
diff --git a/docsrc/xmlsource/xmlref/xpf_replace.xml b/docsrc/xmlsource/xmlref/xpf_replace.xml
index 6d1c8af..d1c49e0 100644
--- a/docsrc/xmlsource/xmlref/xpf_replace.xml
+++ b/docsrc/xmlsource/xmlref/xpf_replace.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_round.xml b/docsrc/xmlsource/xmlref/xpf_round.xml
index 1f62b6b..16a47b8 100644
--- a/docsrc/xmlsource/xmlref/xpf_round.xml
+++ b/docsrc/xmlsource/xmlref/xpf_round.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_round_number.xml b/docsrc/xmlsource/xmlref/xpf_round_number.xml
index 14f67ac..a2d46fb 100644
--- a/docsrc/xmlsource/xmlref/xpf_round_number.xml
+++ b/docsrc/xmlsource/xmlref/xpf_round_number.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_serialize.xml b/docsrc/xmlsource/xmlref/xpf_serialize.xml
index 714dfdf..9dffaf9 100644
--- a/docsrc/xmlsource/xmlref/xpf_serialize.xml
+++ b/docsrc/xmlsource/xmlref/xpf_serialize.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_shallow.xml b/docsrc/xmlsource/xmlref/xpf_shallow.xml
index a367a6b..e7f7df0 100644
--- a/docsrc/xmlsource/xmlref/xpf_shallow.xml
+++ b/docsrc/xmlsource/xmlref/xpf_shallow.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_some.xml b/docsrc/xmlsource/xmlref/xpf_some.xml
index c36434c..b6c298c 100644
--- a/docsrc/xmlsource/xmlref/xpf_some.xml
+++ b/docsrc/xmlsource/xmlref/xpf_some.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_starts_with.xml b/docsrc/xmlsource/xmlref/xpf_starts_with.xml
index 81aadb9..b16dbf0 100644
--- a/docsrc/xmlsource/xmlref/xpf_starts_with.xml
+++ b/docsrc/xmlsource/xmlref/xpf_starts_with.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_string.xml b/docsrc/xmlsource/xmlref/xpf_string.xml
index ff683ed..a747ec3 100644
--- a/docsrc/xmlsource/xmlref/xpf_string.xml
+++ b/docsrc/xmlsource/xmlref/xpf_string.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_string_length.xml b/docsrc/xmlsource/xmlref/xpf_string_length.xml
index 6430790..1b875f0 100644
--- a/docsrc/xmlsource/xmlref/xpf_string_length.xml
+++ b/docsrc/xmlsource/xmlref/xpf_string_length.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_substring.xml b/docsrc/xmlsource/xmlref/xpf_substring.xml
index fa7e1f5..42317a4 100644
--- a/docsrc/xmlsource/xmlref/xpf_substring.xml
+++ b/docsrc/xmlsource/xmlref/xpf_substring.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_substring_after.xml b/docsrc/xmlsource/xmlref/xpf_substring_after.xml
index e943cab..4bcc928 100644
--- a/docsrc/xmlsource/xmlref/xpf_substring_after.xml
+++ b/docsrc/xmlsource/xmlref/xpf_substring_after.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_substring_before.xml b/docsrc/xmlsource/xmlref/xpf_substring_before.xml
index df60e92..ddcc638 100644
--- a/docsrc/xmlsource/xmlref/xpf_substring_before.xml
+++ b/docsrc/xmlsource/xmlref/xpf_substring_before.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_sum.xml b/docsrc/xmlsource/xmlref/xpf_sum.xml
index 8beb316..c79fa1c 100644
--- a/docsrc/xmlsource/xmlref/xpf_sum.xml
+++ b/docsrc/xmlsource/xmlref/xpf_sum.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_system_property.xml b/docsrc/xmlsource/xmlref/xpf_system_property.xml
index 5e64a69..61d678c 100644
--- a/docsrc/xmlsource/xmlref/xpf_system_property.xml
+++ b/docsrc/xmlsource/xmlref/xpf_system_property.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_text_contains.xml b/docsrc/xmlsource/xmlref/xpf_text_contains.xml
index 0721c67..07e35e3 100644
--- a/docsrc/xmlsource/xmlref/xpf_text_contains.xml
+++ b/docsrc/xmlsource/xmlref/xpf_text_contains.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_translate.xml b/docsrc/xmlsource/xmlref/xpf_translate.xml
index acf7f98..63635cc 100644
--- a/docsrc/xmlsource/xmlref/xpf_translate.xml
+++ b/docsrc/xmlsource/xmlref/xpf_translate.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_true.xml b/docsrc/xmlsource/xmlref/xpf_true.xml
index 2bbab60..d1cf05b 100644
--- a/docsrc/xmlsource/xmlref/xpf_true.xml
+++ b/docsrc/xmlsource/xmlref/xpf_true.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_tuple.xml b/docsrc/xmlsource/xmlref/xpf_tuple.xml
index 3e181c3..30d3494 100644
--- a/docsrc/xmlsource/xmlref/xpf_tuple.xml
+++ b/docsrc/xmlsource/xmlref/xpf_tuple.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_union.xml b/docsrc/xmlsource/xmlref/xpf_union.xml
index da3b825..6e18056 100644
--- a/docsrc/xmlsource/xmlref/xpf_union.xml
+++ b/docsrc/xmlsource/xmlref/xpf_union.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_unordered.xml b/docsrc/xmlsource/xmlref/xpf_unordered.xml
index 0130bda..aada128 100644
--- a/docsrc/xmlsource/xmlref/xpf_unordered.xml
+++ b/docsrc/xmlsource/xmlref/xpf_unordered.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_unparsed_entity_uri.xml b/docsrc/xmlsource/xmlref/xpf_unparsed_entity_uri.xml
index e79ce80..a19188f 100644
--- a/docsrc/xmlsource/xmlref/xpf_unparsed_entity_uri.xml
+++ b/docsrc/xmlsource/xmlref/xpf_unparsed_entity_uri.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_urlify.xml b/docsrc/xmlsource/xmlref/xpf_urlify.xml
index af25373..6f14571 100644
--- a/docsrc/xmlsource/xmlref/xpf_urlify.xml
+++ b/docsrc/xmlsource/xmlref/xpf_urlify.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlref/xpf_xmlview.xml b/docsrc/xmlsource/xmlref/xpf_xmlview.xml
index 7ef7763..a31108a 100644
--- a/docsrc/xmlsource/xmlref/xpf_xmlview.xml
+++ b/docsrc/xmlsource/xmlref/xpf_xmlview.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlrpc.xml b/docsrc/xmlsource/xmlrpc.xml
index b6e658b..a9eda3f 100644
--- a/docsrc/xmlsource/xmlrpc.xml
+++ b/docsrc/xmlsource/xmlrpc.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmlschema.xml b/docsrc/xmlsource/xmlschema.xml
index 1bc4dd6..1ac6d36 100644
--- a/docsrc/xmlsource/xmlschema.xml
+++ b/docsrc/xmlsource/xmlschema.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmltableview.xml b/docsrc/xmlsource/xmltableview.xml
index 163725c..eed7725 100644
--- a/docsrc/xmlsource/xmltableview.xml
+++ b/docsrc/xmlsource/xmltableview.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xmltemplates.xml b/docsrc/xmlsource/xmltemplates.xml
index 5e64791..f040e75 100644
--- a/docsrc/xmlsource/xmltemplates.xml
+++ b/docsrc/xmlsource/xmltemplates.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
@@ -193,8 +193,8 @@
   <para>Using the Conductor Administration Interface, we are going to make
   and save a query to an XML template in WebDav, and then demonstration its
   use from a browser.</para>
-  <para>First we will make a new WebDAV directory. From Web Application Server / Content Management
-/ Base click the "New folder" icon and in the shown form enter for "Folder Name": xmlt. Choose for
+  <para>First we will make a new WebDAV directory. From Web Application Server -> Content Management
+-> Repository click the "New folder" icon and in the shown form enter for "Folder Name": xmlt. Choose for
 "Owner" dav and click the "Create" button.</para>
 
     <figure id="xmltemplate001" float="1"><title>Creating a new directory (collection) in WebDAV</title>
@@ -223,7 +223,7 @@ SQL>vhost_define(lpath=>'/DAV/xmlt',
     <figure id="xmltemplate002a" float="1"><title>Results</title>
     <graphic fileref="xmltemplate002a.png"/></figure>
 
-  <para>Now go to XML/SQL-XML and enter in the query area the sql statement from above.
+  <para>Now go to XML -> SQL-XML and enter in the query area the sql statement from above.
 Here we can supply some "FOR XML" clause, "FOR XML AUTO" being the simplest.
 Enter in the field "WebDAV resource path for the result" the directory we created earlier, i.e.
 it should be /DAV/xmlt and add the name of the xmltemplate to which the result will be saved,
@@ -250,8 +250,8 @@ for example: sql-template.xml So finally the value should be <computeroutput>/DA
   <para>Using the Conductor Administration Interface, we are going to make
   and save a query to an XML template in WebDav, and then demonstration its
   use from a browser.</para>
-  <para>First we will make a new WebDAV directory. From Web Application Server / Content Management
-/ Base click the "New folder" icon and in the shown form enter for "Folder Name": xmlt. Choose for
+  <para>First we will make a new WebDAV directory. From Web Application Server -> Content Management
+-> Repository click the "New folder" icon and in the shown form enter for "Folder Name": xmlt. Choose for
 "Owner" dav and click the "Create" button.</para>
 
   <figure id="xmltemplate001x" float="1"><title>Creating a new directory (collection) in WebDAV</title>
@@ -272,7 +272,7 @@ SQL>vhost_define(lpath=>'/DAV/xmlt',
                  opts=>vector('xml_templates', 'yes'));
 ]]></programlisting>
 
-  <para>Now we go to XML / XQuery / XQuery Advanced.</para>
+  <para>Now we go to XML -> XQuery -> XQuery Advanced.</para>
 
   <para>We will start by testing the following query against the Demo database</para>
 
@@ -311,15 +311,15 @@ SQL>vhost_define(lpath=>'/DAV/xmlt',
   <para>Using the Conductor Administration Interface, we are going to make
   and save a query to an XML template in WebDav, and then demonstration its
   use from a browser.</para>
-  <para>First we will make a new WebDAV directory. From Web Application Server / Content Management
-/ Base click the "New folder" icon and in the shown form enter for "Folder Name": xmlt. Choose for
-"Owner" dav and click the "Create" button.</para>
+  <para>First we will make a new WebDAV directory. From Web Application Server -> Content 
+  	Management -> Repository click the "New folder" icon and in the shown form enter for 
+  	"Folder Name": xmlt. Choose for "Owner" dav and click the "Create" button.</para>
 
 <figure id="xmltemplate001y" float="1"><title>Creating a new directory (collection) in WebDAV</title>
     <graphic fileref="xmltemplate001.png"/></figure>
 
   <para>Next we need to configure a virtual directory mapping to this so
-  that XML Templates can be executed later. Go to Web Application Server / Virtual Domains & Directories
+  that XML Templates can be executed later. Go to Web Application Server -> Virtual Domains & Directories
 and for your {Default Web Site} click the link "New Directory". In the shown form click "Next":</para>
 
     <figure id="xmltemplate004y" float="1"><title>Configuring a Virtual Directory to respond to XML Template requests from our Dav</title>
diff --git a/docsrc/xmlsource/xmlview.xml b/docsrc/xmlsource/xmlview.xml
index db39ba0..e6551dd 100644
--- a/docsrc/xmlsource/xmlview.xml
+++ b/docsrc/xmlsource/xmlview.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xpfs.xml b/docsrc/xmlsource/xpfs.xml
index 76d5efa..cb39a84 100644
--- a/docsrc/xmlsource/xpfs.xml
+++ b/docsrc/xmlsource/xpfs.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xquery.xml b/docsrc/xmlsource/xquery.xml
index 32d7c62..0fe30eb 100644
--- a/docsrc/xmlsource/xquery.xml
+++ b/docsrc/xmlsource/xquery.xml
@@ -3,7 +3,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xslttrans.xml b/docsrc/xmlsource/xslttrans.xml
index 9bbe8a8..13036e8 100644
--- a/docsrc/xmlsource/xslttrans.xml
+++ b/docsrc/xmlsource/xslttrans.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/xsql.xml b/docsrc/xmlsource/xsql.xml
index e1d7358..7e78f01 100644
--- a/docsrc/xmlsource/xsql.xml
+++ b/docsrc/xmlsource/xsql.xml
@@ -4,7 +4,7 @@
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -  
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -  
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/docsrc/xmlsource/yacsqlgrammar.xml b/docsrc/xmlsource/yacsqlgrammar.xml
index e796010..2067a69 100644
--- a/docsrc/xmlsource/yacsqlgrammar.xml
+++ b/docsrc/xmlsource/yacsqlgrammar.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
-  $Id: yacsqlgrammar.xml,v 1.1.1.1.2.1 2010/01/25 22:55:37 source Exp $
+  $Id: yacsqlgrammar.xml,v 1.1.1.1.2.2 2012/03/07 15:28:58 source Exp $
 
   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
   project.
 
-  Copyright (C) 1998-2010 OpenLink Software
+  Copyright (C) 1998-2012 OpenLink Software
   
   This project is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -32,7 +32,7 @@
  * This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  * project.
  *
- * Copyright (C) 1998-2010 OpenLink Software
+ * Copyright (C) 1998-2012 OpenLink Software
  * 
  * This project is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk.h b/libsrc/Dk.h
index 2734876..b967563 100644
--- a/libsrc/Dk.h
+++ b/libsrc/Dk.h
@@ -1,14 +1,14 @@
 /*
  *  Dk.h
  *
- *  $Id: Dk.h,v 1.2 2009/04/09 17:39:31 source Exp $
+ *  $Id: Dk.h,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  All configuration options
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkalloc.c b/libsrc/Dk/Dkalloc.c
index 9e10f64..fba4277 100644
--- a/libsrc/Dk/Dkalloc.c
+++ b/libsrc/Dk/Dkalloc.c
@@ -1,14 +1,14 @@
 /*
  *  Dkalloc.c
  *
- *  $Id: Dkalloc.c,v 1.9.2.1 2011/02/14 12:33:59 source Exp $
+ *  $Id: Dkalloc.c,v 1.9.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Memory Allocation
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkalloc.h b/libsrc/Dk/Dkalloc.h
index 19d9e66..9409e6e 100644
--- a/libsrc/Dk/Dkalloc.h
+++ b/libsrc/Dk/Dkalloc.h
@@ -1,14 +1,14 @@
 /*
  *  Dkalloc.h
  *
- *  $Id: Dkalloc.h,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkalloc.h,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Memory Allocation
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkbasket.c b/libsrc/Dk/Dkbasket.c
index 4744ca8..0244cd3 100644
--- a/libsrc/Dk/Dkbasket.c
+++ b/libsrc/Dk/Dkbasket.c
@@ -1,14 +1,14 @@
 /*
  *  Dkbasket.c
  *
- *  $Id: Dkbasket.c,v 1.4.2.1 2009/04/15 15:35:41 source Exp $
+ *  $Id: Dkbasket.c,v 1.4.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Baskets
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkbasket.h b/libsrc/Dk/Dkbasket.h
index 8c2eaf7..d83bcca 100644
--- a/libsrc/Dk/Dkbasket.h
+++ b/libsrc/Dk/Dkbasket.h
@@ -1,14 +1,14 @@
 /*
  *  Dkbasket.c
  *
- *  $Id: Dkbasket.h,v 1.4.2.1 2009/04/15 15:35:41 source Exp $
+ *  $Id: Dkbasket.h,v 1.4.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Baskets
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkbox.c b/libsrc/Dk/Dkbox.c
index f1362bd..1fa4259 100644
--- a/libsrc/Dk/Dkbox.c
+++ b/libsrc/Dk/Dkbox.c
@@ -1,7 +1,7 @@
 /*
  *  Dkbox.c
  *
- *  $Id: Dkbox.c,v 1.22.2.7 2011/01/05 12:50:16 source Exp $
+ *  $Id: Dkbox.c,v 1.22.2.12 2012/03/08 12:55:30 source Exp $
  *
  *  Boxes
  *
@@ -18,7 +18,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -803,6 +803,8 @@ dk_check_tree_heads_iter (box_t box, box_t parent, dk_hash_t * known, int count_
     GPF_T1 ("Tree contains a pointer to a freed box");
   if (TAG_BAD == tag)
     GPF_T1 ("Tree contains a pointer to a box marked bad");
+  if (tag < FIRST_DV_DTP)
+    GPF_T1 ("Tree contains a pointer to a Box with weird tag");
   if (!box_can_appear_twice_in_tree[tag])
     {
       box_t other_parent = gethash (box, known);
@@ -1006,6 +1008,17 @@ DBG_NAME (box_num_nonull) (DBG_PARAMS boxint n)
 }
 
 
+box_t
+DBG_NAME (box_iri_id) (DBG_PARAMS int64 n)
+{
+  iri_id_t * box = (iri_id_t*) dk_alloc_box (sizeof (iri_id_t), DV_IRI_ID);
+  *box = n;
+  return (caddr_t) box;
+}
+
+
+
+
 /*
  * Box a null-terminated string into a
  * DV_<XX>_STRING tagged box
@@ -1140,6 +1153,10 @@ DBG_NAME (box_copy) (DBG_PARAMS cbox_t box)
 #endif
 
     default:
+#ifdef MALLOC_DEBUG
+      if (tag < FIRST_DV_DTP)
+        GPF_T1 ("Copy of a box with weird tag");
+#endif
       if (box_copier[tag])
 	return (box_copier[tag] ((caddr_t) box));
     }
@@ -1191,6 +1208,10 @@ box_t DBG_NAME (box_copy_tree) (DBG_PARAMS cbox_t box)
 
 #endif
     default:
+#ifdef MALLOC_DEBUG
+      if (tag < FIRST_DV_DTP)
+        GPF_T1 ("Copy of a box with weird tag");
+#endif
       if (box_copier[tag])
 	return (box_copier[tag] ((caddr_t) box));
     }
@@ -1275,6 +1296,10 @@ DBG_NAME (box_try_copy_tree) (DBG_PARAMS box_t box, box_t stub)
 #endif
 
     default:
+#ifdef MALLOC_DEBUG
+      if (tag < FIRST_DV_DTP)
+        GPF_T1 ("Copy of a box with weird tag");
+#endif
       if (box_copier[tag])
 	return (box_copier[tag] (box));
     }
@@ -1341,12 +1366,18 @@ rbb_allocate (void)
 caddr_t 
 rbb_from_id (int64 n)
 {
-  rdf_box_t * rb = (rdf_box_t*)rbb_allocate ();
-  rb->rb_ro_id = n;
-  rb->rb_is_outlined = 1;
-  rb->rb_type = RDF_BOX_DEFAULT_TYPE;
-  rb->rb_lang = RDF_BOX_DEFAULT_LANG;
-  return (caddr_t)rb;
+  rdf_bigbox_t * rbb = rbb_allocate ();
+  rbb->rbb_base.rb_ro_id = n;
+  rbb->rbb_base.rb_is_outlined = 1;
+#if 0
+  rbb->rbb_base.rb_type = RDF_BOX_ILL_TYPE;
+  rbb->rbb_base.rb_lang = RDF_BOX_ILL_LANG;
+#else
+  rbb->rbb_base.rb_type = RDF_BOX_DEFAULT_TYPE;
+  rbb->rbb_base.rb_lang = RDF_BOX_DEFAULT_LANG;
+#endif
+  rbb->rbb_box_dtp = DV_STRING;
+  return (caddr_t)rbb;
 }
 
 
@@ -1359,6 +1390,8 @@ rdf_box_audit_impl (rdf_box_t * rb)
   if ((0 == rb->rb_ro_id) && (0 == rb->rb_is_complete))
     GPF_T1 ("RDF box is too incomplete");
 #endif
+  if (rb->rb_is_complete)
+    rb_dt_lang_check(rb);
 }
 
 
@@ -1435,6 +1468,17 @@ DBG_NAME (box_dv_short_strconcat) (DBG_PARAMS const char *str1, const char *str2
 }
 
 
+box_t
+DBG_NAME (box_dv_wide_nchars) (DBG_PARAMS const wchar_t *buf, size_t buf_wchar_count)
+{
+  wchar_t *box;
+  box = (wchar_t *)DBG_NAME (dk_alloc_box) (DBG_ARGS (uint32) ((buf_wchar_count + 1) * sizeof (wchar_t)), DV_WIDE);
+  memcpy (box, buf, buf_wchar_count * sizeof (wchar_t));
+  box[buf_wchar_count] = (wchar_t)'\0';
+  return (box_t)box;
+}
+
+
 caddr_t
 DBG_NAME (box_vsprintf) (DBG_PARAMS size_t buflen_eval, const char *format, va_list tail)
 {
@@ -1996,6 +2040,7 @@ box_dv_uname_make_immortal (caddr_t tree)
   switch (DV_TYPE_OF (tree))
     {
     case DV_UNAME:
+      /*printf ("\nUNAME %s is about to become immortal", tree);*/
       mutex_enter (uname_mutex);
 #ifdef MALLOC_DEBUG
       len = box_length (tree) - 1;
@@ -2400,6 +2445,14 @@ box_num_nonull (boxint n)
 }
 
 
+#undef box_iri_id
+box_t
+box_iri_id (int64 n)
+{
+  return dbg_box_iri_id (__FILE__, __LINE__, n);
+}
+
+
 #undef box_dv_ubuf
 char *
 box_dv_ubuf (size_t buf_strlen)
@@ -2456,6 +2509,14 @@ box_float (float d)
 }
 
 
+#undef box_dv_wide_nchars
+box_t
+box_dv_wide_nchars (const wchar_t *buf, size_t buf_wchar_count)
+{
+  return dbg_box_dv_wide_nchars (__FILE__, __LINE__, buf, buf_wchar_count);
+}
+
+
 #undef box_vsprintf
 caddr_t
 box_vsprintf (size_t buflen_eval, const char *format, va_list tail)
diff --git a/libsrc/Dk/Dkbox.h b/libsrc/Dk/Dkbox.h
index b39f1ed..7cbf6d3 100644
--- a/libsrc/Dk/Dkbox.h
+++ b/libsrc/Dk/Dkbox.h
@@ -1,14 +1,14 @@
 /*
  *  Dkbox.h
  *
- *  $Id: Dkbox.h,v 1.32.2.9 2011/03/08 13:41:56 source Exp $
+ *  $Id: Dkbox.h,v 1.32.2.15 2012/03/08 12:55:30 source Exp $
  *
  *  Boxes
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -251,12 +251,14 @@ ptr += 4
 
 #ifdef DOUBLE_ALIGN
 
+#define ALIGN_LIKE_BOX(x)		ALIGN_8(x)
 #define STATIC_DV_NULL 			{0,0,0,0,0,0,0,(char)DV_DB_NULL}
 #define BOX_AUTO_OVERHEAD 		8
 #define BOX_BEGIN_IN_AREA(area) 	(((char *) (~((ptrlong)7) & (ptrlong)(area))) + BOX_AUTO_OVERHEAD)
 
 #else /* DOUBLE_ALIGN */
 
+#define ALIGN_LIKE_BOX(x)		ALIGN_4(x)
 #define STATIC_DV_NULL 			{0,0,0,(char)DV_DB_NULL}
 #define BOX_AUTO_OVERHEAD 		4
 #define BOX_BEGIN_IN_AREA(area) 	(((char *) area) + BOX_AUTO_OVERHEAD)
@@ -305,7 +307,7 @@ ptr += 4
 
 #define DV_NON_BOX 			101
 
-#define FIRST_DV_DTP 			180
+#define FIRST_DV_DTP 			125
 
 /* Data types */
 
@@ -602,6 +604,8 @@ uname_blk_t;
 #define RDF_BOX_DEFAULT_LANG 		0x0101
 #define RDF_BOX_MAX_TYPE 		0x7F01
 #define RDF_BOX_MAX_LANG 		0x7F01
+#define RDF_BOX_ILL_TYPE 		0x7F02
+#define RDF_BOX_ILL_LANG 		0x7F03
 #define RDF_BOX_GEO 			0x100
 #define RDF_BOX_INTERVAL 		0xff
 #define RDF_BOX_STRING_ID 		0xfe /* Like a type 257 but no string inlined, collates by lang and id alone */
@@ -621,6 +625,15 @@ typedef struct rdf_box_s
   caddr_t 		rb_box;
 } rdf_box_t;
 
+#ifndef NDEBUG
+#define rb_dt_lang_check(rb) do { \
+    if (RDF_BOX_ILL_TYPE == (rb)->rb_type) GPF_T1("Bad rb_type"); \
+    if (RDF_BOX_ILL_LANG == (rb)->rb_lang) GPF_T1("Bad rb_lang"); \
+  } while (0)
+#else
+#define rb_dt_lang_check(rb)
+#endif
+
 #define RB_MAX_INLINED_CHARS 		20
 
 #define RBS_OUTLINED			0x01
@@ -650,6 +663,7 @@ EXE_EXPORT (box_t, dk_try_alloc_box, (size_t bytes, dtp_t tag));
 EXE_EXPORT (box_t, dk_alloc_box_zero, (size_t bytes, dtp_t tag));
 
 #define dk_alloc_list(n) 		((caddr_t *)dk_alloc_box ((n) * sizeof (caddr_t), DV_ARRAY_OF_POINTER))
+#define dk_alloc_list_zero(n) 		((caddr_t *)dk_alloc_box_zero ((n) * sizeof (caddr_t), DV_ARRAY_OF_POINTER))
 
 #ifdef MALLOC_DEBUG
 #define DK_ALLOC_BOX_DEBUG
@@ -683,6 +697,7 @@ EXE_EXPORT (ptrlong, unbox_ptrlong, (ccaddr_t n));
 EXE_EXPORT (int64, unbox_int64, (ccaddr_t n));
 EXE_EXPORT (box_t, box_num, (boxint n));
 EXE_EXPORT (box_t, box_num_nonull, (boxint n));
+EXE_EXPORT (box_t, box_iri_id, (int64 n));
 EXE_EXPORT (box_t, box_string, (const char *string));
 EXE_EXPORT (box_t, box_dv_short_string, (const char *string));
 EXE_EXPORT (box_t, box_dv_short_nchars, (const char *buf, size_t buf_len));
@@ -697,6 +712,7 @@ EXE_EXPORT (box_t, box_dv_uname_nchars, (const char *buf, size_t buf_len));
 EXE_EXPORT (box_t, box_dv_uname_substr, (ccaddr_t box, int n1, int n2));
 EXE_EXPORT (box_t, box_double, (double d));
 EXE_EXPORT (box_t, box_float, (float d));
+EXE_EXPORT (box_t, box_dv_wide_nchars, (const wchar_t *buf, size_t buf_wchar_count));
 #ifdef _DKSYSTEM_H
 EXE_EXPORT (caddr_t, box_vsprintf, (size_t buflen_eval, const char *format, va_list tail));
 #endif
@@ -754,6 +770,7 @@ box_t dbg_box_copy_tree (const char *file, int line, cbox_t box);
 box_t dbg_box_try_copy_tree (const char *file, int line, cbox_t box, box_t stub);
 box_t dbg_box_num (const char *file, int line, boxint n);
 box_t dbg_box_num_nonull (const char *file, int line, boxint n);
+box_t dbg_box_iri_id (const char *file, int line, int64 n);
 char *dbg_box_dv_ubuf (const char *file, int line, size_t buf_strlen);
 box_t dbg_box_dv_uname_from_ubuf (const char *file, int line, char *ubuf);
 box_t dbg_box_dv_uname_string (const char *file, int line, const char *string);
@@ -761,6 +778,7 @@ box_t dbg_box_dv_uname_nchars (const char *file, int line, const char *buf, size
 box_t dbg_box_dv_uname_substr (const char *file, int line, ccaddr_t box, int n1, int n2);
 box_t dbg_box_double (const char *file, int line, double d);
 box_t dbg_box_float (const char *file, int line, float d);
+box_t dbg_box_dv_wide_nchars (const char *file, int line, const wchar_t *buf, size_t buf_wchar_count);
 #ifdef _DKSYSTEM_H
 caddr_t dbg_box_vsprintf (const char *file, int line, size_t buflen_eval, const char *format, va_list tail);
 #endif
@@ -783,6 +801,7 @@ caddr_t dbg_box_vsprintf (const char *file, int line, size_t buflen_eval, const
 #define box_try_copy_tree(S,STUB)		dbg_box_try_copy_tree (__FILE__, __LINE__, (S), (STUB))
 #define box_num(S)				dbg_box_num (__FILE__, __LINE__, (S))
 #define box_num_nonull(S)			dbg_box_num_nonull (__FILE__, __LINE__, (S))
+#define box_iri_id(S)				dbg_box_iri_id (__FILE__, __LINE__, (S))
 #define box_dv_ubuf(B)				dbg_box_dv_ubuf (__FILE__, __LINE__, (B))
 #define box_dv_uname_from_ubuf(U)		dbg_box_dv_uname_from_ubuf (__FILE__, __LINE__, (U))
 #define box_dv_uname_string(S)			dbg_box_dv_uname_string (__FILE__, __LINE__, (S))
@@ -790,6 +809,7 @@ caddr_t dbg_box_vsprintf (const char *file, int line, size_t buflen_eval, const
 #define box_dv_uname_substr(S,N1,N2)		dbg_box_dv_uname_substr (__FILE__, __LINE__, (S), (N1), (N2))
 #define box_double(D)				dbg_box_double (__FILE__, __LINE__, (D))
 #define box_float(D)				dbg_box_float (__FILE__, __LINE__, (D))
+#define box_dv_wide_nchars(B,WCHAR_COUNT)	dbg_box_dv_wide_nchars (__FILE__, __LINE__, (B), (WCHAR_COUNT))
 #define box_vsprintf(L,F,T)			dbg_box_vsprintf (__FILE__, __LINE__, (L), (F), (T))
 
 #endif
diff --git a/libsrc/Dk/Dkconfig.h b/libsrc/Dk/Dkconfig.h
index d03c02f..bab9add 100644
--- a/libsrc/Dk/Dkconfig.h
+++ b/libsrc/Dk/Dkconfig.h
@@ -1,14 +1,14 @@
 /*
  *  Dkconfig.h
  *
- *  $Id: Dkconfig.h,v 1.2.2.1 2009/10/14 20:13:10 source Exp $
+ *  $Id: Dkconfig.h,v 1.2.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Configuration
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkconfig.w32 b/libsrc/Dk/Dkconfig.w32
index 0b16b13..0a8d9e4 100644
--- a/libsrc/Dk/Dkconfig.w32
+++ b/libsrc/Dk/Dkconfig.w32
@@ -1,12 +1,12 @@
 /*
- *  $Id: Dkconfig.w32,v 1.6.2.2 2010/02/02 19:39:43 source Exp $
+ *  $Id: Dkconfig.w32,v 1.6.2.3 2012/03/08 12:55:30 source Exp $
  *
  *  Configuration Options for win32
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkconfig.w64 b/libsrc/Dk/Dkconfig.w64
index 712a1b1..f1aab01 100644
--- a/libsrc/Dk/Dkconfig.w64
+++ b/libsrc/Dk/Dkconfig.w64
@@ -1,10 +1,10 @@
 /*
- *  $Id: Dkconfig.w64,v 1.5.2.2 2010/02/02 19:39:43 source Exp $
+ *  $Id: Dkconfig.w64,v 1.5.2.3 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkdevice.c b/libsrc/Dk/Dkdevice.c
index bbeb099..2591d03 100644
--- a/libsrc/Dk/Dkdevice.c
+++ b/libsrc/Dk/Dkdevice.c
@@ -1,14 +1,14 @@
 /*
  *  Dkdevice.c
  *
- *  $Id: Dkdevice.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkdevice.c,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Devices
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkdevice.h b/libsrc/Dk/Dkdevice.h
index 0620a4f..ae1c3c3 100644
--- a/libsrc/Dk/Dkdevice.h
+++ b/libsrc/Dk/Dkdevice.h
@@ -1,14 +1,14 @@
 /*
  *  Dkdevice.h
  *
- *  $Id: Dkdevice.h,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkdevice.h,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Devices
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkernel.c b/libsrc/Dk/Dkernel.c
index 309030f..ecb381e 100644
--- a/libsrc/Dk/Dkernel.c
+++ b/libsrc/Dk/Dkernel.c
@@ -1,14 +1,14 @@
 /*
  *  Dkernel.c
  *
- *  $Id: Dkernel.c,v 1.25.2.12 2011/03/08 13:41:56 source Exp $
+ *  $Id: Dkernel.c,v 1.25.2.16 2012/03/14 13:58:52 source Exp $
  *
  *  RPC Kernel
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -4644,19 +4644,13 @@ ssl_report_errors (char *client_ip)
 int
 cli_ssl_get_error_string (char *out_data, int out_data_len)
 {
-  unsigned long l;
-  const char *file, *data;
-  int line, flags;
-
-  if ((l = ERR_get_error_line_data (&file, &line, &data, &flags)) != 0)
-    {
-#if 0
-      ERR_error_string_n (l, out_data, out_data_len);
-#else
-      ERR_error_string (l, out_data);
-#endif
-      return 1;
-    }
+  unsigned long err = ERR_get_error ();
+  const char *reason = ERR_reason_error_string (err);
+  const char *lib = ERR_lib_error_string (err);
+  const char *func = ERR_func_error_string (err);
+  out_data[out_data_len - 1] = 0;
+  snprintf (out_data, out_data_len - 1, "%s (%s:%s)",
+      reason ? reason : (err == 0 ? "No error" : "Unknown error"), lib ? lib : "?", func ? func : "?");
   return 0;
 }
 
@@ -4764,9 +4758,12 @@ ssl_cert_verify_callback (int ok, void *_ctx)
       ok = 1;
     }
 
+#if 0
   log_debug ("%s Certificate Verification: depth: %d, subject: %s, issuer: %s",
   	app_ctx->ssci_name_ptr, errdepth, cp != NULL ? cp : "-unknown-",
 	cp2 != NULL ? cp2 : "-unknown");
+#endif
+
   /*
    * Additionally perform CRL-based revocation checks
    *
@@ -4843,114 +4840,91 @@ dk_ssl_free (void *old)
 }
 #endif
 
-static void
-ssl_server_init ()
-{
-  const SSL_METHOD *ssl_server_method;
-  unsigned char tmp[1024];
-#ifndef NO_THREAD
-  char err_buf[1024];
-#ifdef SSL_DK_ALLOC
-  CRYPTO_set_mem_functions (dk_ssl_alloc, dk_ssl_realloc, dk_ssl_free);
-  CRYPTO_set_locked_mem_functions (dk_ssl_alloc, dk_ssl_free);
-#endif
-  SSL_load_error_strings ();
-  ERR_load_X509_strings ();
-#ifndef WIN32
-  RAND_bytes (tmp, sizeof (tmp));
-  RAND_add (tmp, sizeof (tmp), (double) (sizeof (tmp)));
-#endif
-# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-  SSL_library_init ();
-# endif
-  SSLeay_add_all_algorithms ();
-#else
-#ifdef SSL_DK_ALLOC
-  CRYPTO_set_mem_functions (dk_ssl_alloc, dk_ssl_realloc, dk_ssl_free);
-  CRYPTO_set_locked_mem_functions (dk_ssl_alloc, dk_ssl_free);
-#endif
-  SSL_load_error_strings ();
-  ERR_load_X509_strings ();
-  ERR_load_PKCS12_strings ();
-#ifndef WIN32
-  RAND_bytes (tmp, sizeof (tmp));
-  RAND_add (tmp, sizeof (tmp), (double) (sizeof (tmp)));
-#endif
-# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
-  SSL_library_init ();
-# else
-  SSLeay_add_ssl_algorithms ();
-# endif
-  PKCS12_PBE_add ();
-#endif
-#ifdef NO_THREAD
-  ssl_server_method = SSLv23_client_method ();
-#else
-  ssl_server_method = SSLv23_server_method ();
-#endif
-  ssl_server_ctx = SSL_CTX_new (ssl_server_method);
-  if (!ssl_server_ctx)
-    {
-      ERR_print_errors_fp (stderr);
-      call_exit (-1);
-    }
+#if defined (_SSL) && !defined (NO_THREAD)
+int ssl_server_set_certificate (SSL_CTX* ssl_ctx, char * cert_name, char * key_name);
 
-#ifndef NO_THREAD
-  if (!c_ssl_server_port)
-    return;
-
-  if (SSL_CTX_use_certificate_file (ssl_server_ctx, c_ssl_server_cert, SSL_FILETYPE_PEM) <= 0)
-    {
-      cli_ssl_get_error_string (err_buf, sizeof (err_buf));
-      if (!c_ssl_server_key)
-	log_error ("ODBC Server X509 certificate is required");
-      else
-	log_error ("Error loading the ODBC server X509 certificate %s : %s", c_ssl_server_key, err_buf);
-      call_exit (-1);
-    }
-  if (SSL_CTX_use_PrivateKey_file (ssl_server_ctx, c_ssl_server_key, SSL_FILETYPE_PEM) <= 0)
+static int 
+ssl_server_key_setup ()
+{
+  if (!c_ssl_server_cert || !c_ssl_server_key)
     {
-      if (!c_ssl_server_key)
-	log_error ("ODBC Server X509 private key is required");
-      else
-	log_error ("Error loading the ODBC server X509 private key %s : %s", c_ssl_server_key, err_buf);
-      call_exit (-1);
+      log_error ("SSL: Server certificate and private key must both be specified");
+      return 0;
     }
 
-  if (!SSL_CTX_check_private_key (ssl_server_ctx))
-    {
-      log_error ("X509 Private key in %s does not match the X509 certificate public key in %s", c_ssl_server_key ? c_ssl_server_key : "<empty>", c_ssl_server_cert ? c_ssl_server_cert : "<empty>");
-      call_exit (-1);
-    }
+  if (!ssl_server_set_certificate (ssl_server_ctx, c_ssl_server_cert, c_ssl_server_key))
+    return 0;
 
   if (ssl_server_verify)
     {
       int i, session_id_context = 2, verify = SSL_VERIFY_NONE;
       STACK_OF (X509_NAME) * skCAList = NULL;
 
-      SSL_CTX_load_verify_locations (ssl_server_ctx, ssl_server_verify_file, NULL);
-      SSL_CTX_set_client_CA_list (ssl_server_ctx, SSL_load_client_CA_file (ssl_server_verify_file));
+      if (ssl_server_verify_file && ssl_server_verify_file[0])
+	{
+	  SSL_CTX_load_verify_locations (ssl_server_ctx, ssl_server_verify_file, NULL);
+	  SSL_CTX_set_client_CA_list (ssl_server_ctx, SSL_load_client_CA_file (ssl_server_verify_file));
+	}
       SSL_CTX_set_app_data (ssl_server_ctx, &ssl_server_ctx_info);
-      if (ssl_server_verify == 1) /* required */
+      if (ssl_server_verify == 1)	/* required */
 	verify |= SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_CLIENT_ONCE;
-      else /* 2 optional OR 3 optional no ca */
+      else			/* 2 optional OR 3 optional no ca */
 	verify |= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
       SSL_CTX_set_verify (ssl_server_ctx, verify, (int (*)(int, X509_STORE_CTX *)) ssl_cert_verify_callback);
       SSL_CTX_set_verify_depth (ssl_server_ctx, (int) ssl_server_verify_depth);
       SSL_CTX_set_session_id_context (ssl_server_ctx, (unsigned char *) &session_id_context, sizeof session_id_context);
 
       skCAList = SSL_CTX_get_client_CA_list (ssl_server_ctx);
-      if (sk_X509_NAME_num (skCAList) == 0)
-	log_warning ("ODBC X509 Client authentication requested but no CA known for verification");
+      if (ssl_server_verify != 3 && sk_X509_NAME_num (skCAList) == 0)
+	log_warning ("SSL: Client authentication requested but no CA known for verification");
       for (i = 0; i < sk_X509_NAME_num (skCAList); i++)
 	{
 	  char ca_buf[1024];
 	  X509_NAME *ca_name = (X509_NAME *) sk_X509_NAME_value (skCAList, i);
 	  if (X509_NAME_oneline (ca_name, ca_buf, sizeof (ca_buf)))
-	    log_debug ("ODBC Server Using X509 Client CA %s", ca_buf);
+	    log_debug ("SSL: Using X509 client CA %s", ca_buf);
 	}
     }
+
+  return 1;
+}
+#endif
+
+static void
+ssl_server_init ()
+{
+  const SSL_METHOD *ssl_server_method;
+
+#ifdef SSL_DK_ALLOC
+  CRYPTO_set_mem_functions (dk_ssl_alloc, dk_ssl_realloc, dk_ssl_free);
+  CRYPTO_set_locked_mem_functions (dk_ssl_alloc, dk_ssl_free);
+#endif
+  SSL_load_error_strings ();
+  ERR_load_crypto_strings ();
+#ifndef WIN32
+  {
+    unsigned char tmp[1024];
+    RAND_bytes (tmp, sizeof (tmp));
+    RAND_add (tmp, sizeof (tmp), (double) (sizeof (tmp)));
+  }
 #endif
+# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+  SSL_library_init ();
+# endif
+  SSLeay_add_all_algorithms ();
+  PKCS12_PBE_add ();		/* stub */
+
+#ifdef NO_THREAD
+  ssl_server_method = SSLv23_client_method ();
+#else
+  ssl_server_method = SSLv23_server_method ();
+#endif
+  ssl_server_ctx = SSL_CTX_new (ssl_server_method);
+  if (!ssl_server_ctx)
+    {
+      ERR_print_errors_fp (stderr);
+      call_exit (-1);
+    }
 }
 
 
@@ -5081,69 +5055,53 @@ int
 ssl_client_use_pkcs12 (SSL * ssl, char *pkcs12file, char *passwd, char *ca)
 {
   int /*session_id_context = 2, */ i;
-  FILE *fi = fopen (pkcs12file, "rb");
-  PKCS12 *p12;
+  FILE *fi;
+  PKCS12 *p12 = NULL;
   EVP_PKEY *pkey;
   X509 *cert;
   STACK_OF (X509) * ca_list = NULL;
   SSL_CTX *ssl_ctx = SSL_get_SSL_CTX (ssl);
 
-  if (0 != PEM_parse (pkcs12file, passwd, &pkey, &cert, &ca_list))
-    goto ssl_setup;
-
-  if (!fi || NULL == (p12 = d2i_PKCS12_fp (fi, NULL)))
+  if (0 == PEM_parse (pkcs12file, passwd, &pkey, &cert, &ca_list))
     {
-      if (fi)
-	fclose (fi);
-      return 0;
-    }
-  if (!PKCS12_parse (p12, passwd, &pkey, &cert, &ca_list))
-    {
-      if (fi)
-	fclose (fi);
-      return 0;
+      if ((fi = fopen (pkcs12file, "rb")) != NULL)
+	{
+	  p12 = d2i_PKCS12_fp (fi, NULL);
+	  fclose (fi);
+	}
+      if (p12)
+	{
+	  i = PKCS12_parse (p12, passwd, &pkey, &cert, &ca_list);
+	  PKCS12_free (p12);
+	  if (!i)
+	    return 0;
+	}
     }
-  PKCS12_free (p12);
-
-ssl_setup:
-  fclose (fi);
 
   if (ca && ca[0] != 0)
     {
       sk_X509_pop_free (ca_list, X509_free);
-      ca_list = NULL;
       ca_list = PEM_load_certs (ca, passwd);
     }
 
-  if (!SSL_use_PrivateKey (ssl, pkey))
-    {
-      X509_free (cert);
-      EVP_PKEY_free (pkey);
-      sk_X509_pop_free (ca_list, X509_free);
-      return 0;
-    }
-  EVP_PKEY_free (pkey);
-  if (!SSL_use_certificate (ssl, cert))
+  i = SSL_use_certificate (ssl, cert);
+  if (i)
+    i = SSL_use_PrivateKey (ssl, pkey);
+  if (i)
+    i = SSL_check_private_key (ssl);
+  if (i)
     {
-      X509_free (cert);
-      sk_X509_pop_free (ca_list, X509_free);
-      return 0;
+      for (i = 0; i < sk_X509_num (ca_list); i++)
+	{
+	  X509 *ca = (X509 *) sk_X509_value (ca_list, i);
+	  SSL_add_client_CA (ssl, ca);
+	  X509_STORE_add_cert (SSL_CTX_get_cert_store (ssl_ctx), ca);
+	}
     }
   X509_free (cert);
-
-  if (!SSL_check_private_key (ssl))
-    {
-      sk_X509_pop_free (ca_list, X509_free);
-      return 0;
-    }
-  for (i = 0; i < sk_X509_num (ca_list); i++)
-    {
-      X509 *ca = (X509 *) sk_X509_value (ca_list, i);
-      SSL_add_client_CA (ssl, ca);
-      X509_STORE_add_cert (SSL_CTX_get_cert_store (ssl_ctx), ca);
-    }
+  EVP_PKEY_free (pkey);
   sk_X509_pop_free (ca_list, X509_free);
-  return 1;
+  return i ? 1 : 0;
 }
 
 
@@ -5368,22 +5326,23 @@ void
 ssl_server_listen ()
 {
 #ifdef _SSL
+  dk_session_t *listening;
   if (!c_ssl_server_port)
     return;
-  else
-    {
-      dk_session_t *listening = PrpcListen (c_ssl_server_port, SESCLASS_TCPIP);
+
+  if (!ssl_server_key_setup ())
+    goto failed;
+
+  listening = PrpcListen (c_ssl_server_port, SESCLASS_TCPIP);
       if (!SESSTAT_ISSET (listening->dks_session, SST_LISTENING))
 	{
-	  log_error ("Failed ODBC Server SSL listen at %s.", c_ssl_server_port);
-	  call_exit (-1);
-	};
-      ssl_server_port = tcpses_get_port (listening->dks_session);
-      if (ssl_server_verify)
-	log_info ("ODBC SSL/X509 server online at %s", c_ssl_server_port);
-      else
-	log_info ("ODBC SSL server online at %s", c_ssl_server_port);
+    failed:
+      log_error ("SSL: Failed listen at %s", c_ssl_server_port);
+      return;
     }
+      ssl_server_port = tcpses_get_port (listening->dks_session);
+
+  log_info ("SSL server online at %s", c_ssl_server_port);
 #endif
 }
 
diff --git a/libsrc/Dk/Dkernel.h b/libsrc/Dk/Dkernel.h
index 93ce380..4dc25d0 100644
--- a/libsrc/Dk/Dkernel.h
+++ b/libsrc/Dk/Dkernel.h
@@ -1,14 +1,14 @@
 /*
  *  Dkernel.h
  *
- *  $Id: Dkernel.h,v 1.19.2.3 2011/01/05 12:50:32 source Exp $
+ *  $Id: Dkernel.h,v 1.19.2.5 2012/03/08 12:55:30 source Exp $
  *
  *  RPC Kernel
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -750,6 +750,7 @@ extern timeout_t time_now;
 
 EXE_EXPORT (dk_session_t *, strses_allocate, (void));
 EXE_EXPORT (caddr_t, strses_string, (dk_session_t * ses));
+EXE_EXPORT (caddr_t, strses_wide_string, (dk_session_t * ses));
 extern caddr_t t_strses_string (dk_session_t * ses);
 void strses_set_utf8 (dk_session_t * ses, int is_utf8);
 int strses_is_utf8 (dk_session_t * ses);
@@ -757,10 +758,12 @@ int strses_is_utf8 (dk_session_t * ses);
 #ifdef MALLOC_DEBUG
 dk_session_t *dbg_strses_allocate (DBG_PARAMS_0);
 caddr_t dbg_strses_string (DBG_PARAMS dk_session_t * ses);
+caddr_t dbg_strses_wide_string (DBG_PARAMS dk_session_t * ses);
 #ifndef _USRDLL
 #ifndef EXPORT_GATE
 #define strses_allocate() 		dbg_strses_allocate (__FILE__, __LINE__)
 #define strses_string(S) 		dbg_strses_string (__FILE__, __LINE__, (S))
+#define strses_wide_string(S) 		dbg_strses_wide_string (__FILE__, __LINE__, (S))
 #endif
 #endif
 #endif
diff --git a/libsrc/Dk/Dkhash.c b/libsrc/Dk/Dkhash.c
index 4718dac..75a1e1a 100644
--- a/libsrc/Dk/Dkhash.c
+++ b/libsrc/Dk/Dkhash.c
@@ -1,14 +1,14 @@
 /*
  *  Dkhash.c
  *
- *  $Id: Dkhash.c,v 1.8 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkhash.c,v 1.8.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Hash tables
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkhash.h b/libsrc/Dk/Dkhash.h
index d810291..da39c51 100644
--- a/libsrc/Dk/Dkhash.h
+++ b/libsrc/Dk/Dkhash.h
@@ -1,14 +1,14 @@
 /*
  *  Dkhash.h
  *
- *  $Id: Dkhash.h,v 1.11.2.1 2011/03/08 13:41:56 source Exp $
+ *  $Id: Dkhash.h,v 1.11.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Hash tables
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkhash64.h b/libsrc/Dk/Dkhash64.h
index 70899ef..c6f4c65 100644
--- a/libsrc/Dk/Dkhash64.h
+++ b/libsrc/Dk/Dkhash64.h
@@ -1,14 +1,14 @@
 /*
  *  Dkhash64.h
  *
- *  $Id: Dkhash64.h,v 1.4 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkhash64.h,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  int64 hashtable for 32 bit platforms
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkhashext.c b/libsrc/Dk/Dkhashext.c
index 3aa6551..cace2f6 100644
--- a/libsrc/Dk/Dkhashext.c
+++ b/libsrc/Dk/Dkhashext.c
@@ -1,14 +1,14 @@
 /*
  *  Dkhashext.c
  *
- *  $Id: Dkhashext.c,v 1.17.2.2 2010/05/07 09:14:31 source Exp $
+ *  $Id: Dkhashext.c,v 1.17.2.3 2012/03/08 12:55:30 source Exp $
  *
  *  Hashing
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkhashext.h b/libsrc/Dk/Dkhashext.h
index b6a8844..d30087d 100644
--- a/libsrc/Dk/Dkhashext.h
+++ b/libsrc/Dk/Dkhashext.h
@@ -1,12 +1,12 @@
 /*
  *  hashext.h
  *
- *  $Id: Dkhashext.h,v 1.15.2.1 2010/06/25 11:22:38 source Exp $
+ *  $Id: Dkhashext.h,v 1.15.2.3 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -60,8 +60,8 @@ struct id_hash_s
   {
     int			ht_key_length;		/*!< Number of bytes in key */
     int			ht_data_length;		/*!< Number of bytes in dependent data */
-    id_hashed_key_t	ht_buckets;	/*!< Number of buckets */
-    int			ht_bucket_length;
+    id_hashed_key_t	ht_buckets;		/*!< Buckets */
+    int			ht_bucket_length;	/*!< Number of buckets */
     int			ht_data_inx;
     int			ht_ext_inx;
     char *		ht_array;
diff --git a/libsrc/Dk/Dkhashext_t.c b/libsrc/Dk/Dkhashext_t.c
index 6baa2de..dfc4cdb 100644
--- a/libsrc/Dk/Dkhashext_t.c
+++ b/libsrc/Dk/Dkhashext_t.c
@@ -1,14 +1,14 @@
 /*
  *  Dkstkern.c
  *
- *  $Id: Dkhashext_t.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkhashext_t.c,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  RPC Kernel (single threaded, without server side support)
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkhashext_template.c b/libsrc/Dk/Dkhashext_template.c
index 49fbef1..fd6d2c2 100644
--- a/libsrc/Dk/Dkhashext_template.c
+++ b/libsrc/Dk/Dkhashext_template.c
@@ -1,12 +1,12 @@
 /*
  *  Dkhashext_template.c
  *
- *  $Id: Dkhashext_template.c,v 1.9.2.2 2010/06/25 11:22:38 source Exp $
+ *  $Id: Dkhashext_template.c,v 1.9.2.3 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dklongjmp.c b/libsrc/Dk/Dklongjmp.c
index 55b11e8..3e6626f 100644
--- a/libsrc/Dk/Dklongjmp.c
+++ b/libsrc/Dk/Dklongjmp.c
@@ -1,12 +1,12 @@
 /*
  *  Dklongjump.c
  *
- *  $Id: Dklongjmp.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dklongjmp.c,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkmarshal.c b/libsrc/Dk/Dkmarshal.c
index 0010c85..abe2dde 100644
--- a/libsrc/Dk/Dkmarshal.c
+++ b/libsrc/Dk/Dkmarshal.c
@@ -1,14 +1,14 @@
 /*
  *  Dkmarshal.c
  *
- *  $Id: Dkmarshal.c,v 1.16.2.5 2011/01/25 14:32:56 source Exp $
+ *  $Id: Dkmarshal.c,v 1.16.2.6 2012/03/08 12:55:30 source Exp $
  *
  *  Marshalling on top of sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkmarshal.h b/libsrc/Dk/Dkmarshal.h
index 92438ec..b85bc21 100644
--- a/libsrc/Dk/Dkmarshal.h
+++ b/libsrc/Dk/Dkmarshal.h
@@ -1,14 +1,14 @@
 /*
  *  nmarsh.h
  *
- *  $Id: Dkmarshal.h,v 1.5.2.1 2009/11/17 21:38:44 source Exp $
+ *  $Id: Dkmarshal.h,v 1.5.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Marshalling on top of sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkparam.h b/libsrc/Dk/Dkparam.h
index e24120c..c9b619b 100644
--- a/libsrc/Dk/Dkparam.h
+++ b/libsrc/Dk/Dkparam.h
@@ -1,14 +1,14 @@
 /*
  *  Dkparam.h
  *
- *  $Id: Dkparam.h,v 1.4 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkparam.h,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Global parameters
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkpool.c b/libsrc/Dk/Dkpool.c
index 55ed6b8..bd02b79 100644
--- a/libsrc/Dk/Dkpool.c
+++ b/libsrc/Dk/Dkpool.c
@@ -1,7 +1,7 @@
 /*
  *  Dkpool.c
  *
- *  $Id: Dkpool.c,v 1.24.2.1 2009/09/22 09:32:30 source Exp $
+ *  $Id: Dkpool.c,v 1.24.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Temp memory pool for objects that should be allocated one by one but freed
  *  together.
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkpool.h b/libsrc/Dk/Dkpool.h
index 8ab1acf..6d4caba 100644
--- a/libsrc/Dk/Dkpool.h
+++ b/libsrc/Dk/Dkpool.h
@@ -1,7 +1,7 @@
 /*
  *  Dkpool.h
  *
- *  $Id: Dkpool.h,v 1.20.2.1 2009/04/15 15:35:41 source Exp $
+ *  $Id: Dkpool.h,v 1.20.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Temp memory pool for objects that should be allocated one by one but freed
  *  together.
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkresource.c b/libsrc/Dk/Dkresource.c
index 82048ad..5168b4d 100644
--- a/libsrc/Dk/Dkresource.c
+++ b/libsrc/Dk/Dkresource.c
@@ -1,14 +1,14 @@
 /*
  *  Dkresource.c
  *
- *  $Id: Dkresource.c,v 1.3 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkresource.c,v 1.3.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Resource management
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkresource.h b/libsrc/Dk/Dkresource.h
index a8fe771..41ad247 100644
--- a/libsrc/Dk/Dkresource.h
+++ b/libsrc/Dk/Dkresource.h
@@ -1,14 +1,14 @@
 /*
  *  Dkresource.h
  *
- *  $Id: Dkresource.h,v 1.3 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkresource.h,v 1.3.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Resource Management
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkrusage.c b/libsrc/Dk/Dkrusage.c
index 2a9386f..82ed63d 100644
--- a/libsrc/Dk/Dkrusage.c
+++ b/libsrc/Dk/Dkrusage.c
@@ -1,14 +1,14 @@
 /*
  *  Dkrusage.c
  *
- *  $Id: Dkrusage.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkrusage.c,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Helper function to increase server resources on BSD machines
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkses2.c b/libsrc/Dk/Dkses2.c
index e9d6d51..93a56fc 100644
--- a/libsrc/Dk/Dkses2.c
+++ b/libsrc/Dk/Dkses2.c
@@ -1,14 +1,14 @@
 /*
  *  Dkses2.h
  *
- *  $Id: Dkses2.c,v 1.8.2.1 2009/06/14 18:35:42 source Exp $
+ *  $Id: Dkses2.c,v 1.8.2.2 2012/03/08 12:55:30 source Exp $
  *
  *  Upper layer sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksesinp.c b/libsrc/Dk/Dksesinp.c
index bab35c4..79cebbf 100644
--- a/libsrc/Dk/Dksesinp.c
+++ b/libsrc/Dk/Dksesinp.c
@@ -1,14 +1,14 @@
 /*
  *  Dksesinp.c
  *
- *  $Id: Dksesinp.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dksesinp.c,v 1.2.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  In-process sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksession.c b/libsrc/Dk/Dksession.c
index a6d97b9..82f2284 100644
--- a/libsrc/Dk/Dksession.c
+++ b/libsrc/Dk/Dksession.c
@@ -1,14 +1,14 @@
 /*
  *  Dksession.c
  *
- *  $Id: Dksession.c,v 1.4 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dksession.c,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
  *
  *  Sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksession.h b/libsrc/Dk/Dksession.h
index b0272cc..dc69c3b 100644
--- a/libsrc/Dk/Dksession.h
+++ b/libsrc/Dk/Dksession.h
@@ -1,14 +1,14 @@
 /*
  *  Dksession.h
  *
- *  $Id: Dksession.h,v 1.8 2009/04/10 23:06:43 source Exp $
+ *  $Id: Dksession.h,v 1.8.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Lower layer sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksesstr.c b/libsrc/Dk/Dksesstr.c
index c97e817..4698a17 100644
--- a/libsrc/Dk/Dksesstr.c
+++ b/libsrc/Dk/Dksesstr.c
@@ -1,14 +1,14 @@
 /*
  *  Dksesstr.c
  *
- *  $Id: Dksesstr.c,v 1.15 2009/04/10 23:06:43 source Exp $
+ *  $Id: Dksesstr.c,v 1.15.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  String sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -61,30 +61,51 @@ char *ses_tmp_dir;
 
 */
 
+long strses_file_reads = 0;
+long strses_file_seeks = 0;
+long strses_file_writes = 0;
+long strses_file_wait_msec = 0;
+
 long read_wides_from_utf8_file (dk_session_t * ses, long nchars, unsigned char *dest, int copy_as_utf8, unsigned char **dest_ptr_out);
 
 OFF_T 
 strf_lseek (strsestmpfile_t * sesfile, OFF_T offset, int whence)
 {
+  OFF_T ret;
+  long start_time = get_msec_real_time ();
+  strses_file_seeks ++;
   if (NULL != sesfile->ses_lseek_func)
-    return sesfile->ses_lseek_func (sesfile, offset, whence);
-  return LSEEK (sesfile->ses_file_descriptor, offset, whence);
+    ret = sesfile->ses_lseek_func (sesfile, offset, whence);
+  else
+    ret = LSEEK (sesfile->ses_file_descriptor, offset, whence);
+  strses_file_wait_msec += (get_msec_real_time () - start_time);
+  return ret;
 }
 
 size_t 
 strf_read (strsestmpfile_t * sesfile, void *buf, size_t nbyte)
 {
+  size_t ret;
+  long start_time = get_msec_real_time ();
+  strses_file_reads ++;
   if (NULL != sesfile->ses_read_func)
-    return sesfile->ses_read_func (sesfile, buf, nbyte);
-  return read (sesfile->ses_file_descriptor, buf, nbyte);
+    ret = sesfile->ses_read_func (sesfile, buf, nbyte);
+  else
+    ret = read (sesfile->ses_file_descriptor, buf, nbyte);
+  strses_file_wait_msec += (get_msec_real_time () - start_time);
+  return ret;
 }
 
 static size_t 
 strf_write (strsestmpfile_t * sesfile, const void *buf, size_t nbyte)
 {
+  size_t ret;
+  strses_file_writes ++;
   if (NULL != sesfile->ses_wrt_func)
-    return sesfile->ses_wrt_func (sesfile, buf, nbyte);
-  return write (sesfile->ses_file_descriptor, buf, nbyte);
+    ret = sesfile->ses_wrt_func (sesfile, buf, nbyte);
+  else
+    ret = write (sesfile->ses_file_descriptor, buf, nbyte);
+  return ret;
 }
 
 /*
@@ -1089,6 +1110,19 @@ DBG_NAME (strses_string) (DBG_PARAMS dk_session_t * ses)
 
 
 caddr_t
+DBG_NAME (strses_wide_string) (DBG_PARAMS dk_session_t * ses)
+{
+  int64 len = strses_length (ses);
+  caddr_t box;
+  if (NULL == (box = DBG_NAME (dk_alloc_box) (DBG_ARGS len + sizeof (wchar_t), DV_WIDE)))
+    return NULL;
+  strses_to_array (ses, box);
+  ((wchar_t *)(box+len))[0] = 0;
+  return box;
+}
+
+
+caddr_t
 t_strses_string (dk_session_t * ses)
 {
   int64 len = strses_length (ses);
@@ -1635,6 +1669,14 @@ strses_string (dk_session_t * ses)
 {
   return dbg_strses_string (__FILE__, __LINE__, ses);
 }
+
+
+#undef strses_wide_string
+caddr_t
+strses_wide_string (dk_session_t * ses)
+{
+  return dbg_strses_wide_string (__FILE__, __LINE__, ses);
+}
 #endif
 
 caddr_t
diff --git a/libsrc/Dk/Dksesstr.h b/libsrc/Dk/Dksesstr.h
index 23495e6..ab7c5de 100644
--- a/libsrc/Dk/Dksesstr.h
+++ b/libsrc/Dk/Dksesstr.h
@@ -1,14 +1,14 @@
 /*
  *  Dksesstr.h
  *
- *  $Id: Dksesstr.h,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dksesstr.h,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  String sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksestcp.c b/libsrc/Dk/Dksestcp.c
index 240bf25..6456abc 100644
--- a/libsrc/Dk/Dksestcp.c
+++ b/libsrc/Dk/Dksestcp.c
@@ -1,14 +1,14 @@
 /*
  *  Dksestcp.c
  *
- *  $Id: Dksestcp.c,v 1.14.2.2 2011/03/08 13:41:56 source Exp $
+ *  $Id: Dksestcp.c,v 1.14.2.4 2012/03/08 12:55:31 source Exp $
  *
  *  TCP/IP sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2425,6 +2425,7 @@ sslses_to_tcpses (session_t * ses)
   ses->ses_device->dev_funs->dfp_write = tcpses_write;
   ses->ses_device->dev_funs->dfp_free = tcpdev_free;
   ses->ses_device->dev_connection->ssl = NULL;
+  ses->ses_device->dev_connection->ssl_ctx = NULL;
 }
 
 
diff --git a/libsrc/Dk/Dksestcp.h b/libsrc/Dk/Dksestcp.h
index f109c37..56f689b 100644
--- a/libsrc/Dk/Dksestcp.h
+++ b/libsrc/Dk/Dksestcp.h
@@ -1,14 +1,14 @@
 /*
  *  Dksestcp.h
  *
- *  $Id: Dksestcp.h,v 1.3 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dksestcp.h,v 1.3.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  TCP sessions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -64,7 +64,9 @@ extern int last_errno;
 # define init_tcpip()
 /* if (!pctcp_started) {pctcp_started=1;init_pctcp();};
   Init called from level 2.  */
+# ifndef EMSGSIZE
 # define EMSGSIZE WSAEMSGSIZE
+# endif
 #else /* PCTCP */
 # define init_tcpip()
 #endif
diff --git a/libsrc/Dk/Dksestcpint.h b/libsrc/Dk/Dksestcpint.h
index e775dc7..80a6e50 100644
--- a/libsrc/Dk/Dksestcpint.h
+++ b/libsrc/Dk/Dksestcpint.h
@@ -1,14 +1,14 @@
 /*
  *  Dksestcpint.h
  *
- *  $Id: Dksestcpint.h,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dksestcpint.h,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Internal of Dksestcp.h
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksets.c b/libsrc/Dk/Dksets.c
index b87e5ef..81f2d45 100644
--- a/libsrc/Dk/Dksets.c
+++ b/libsrc/Dk/Dksets.c
@@ -1,14 +1,14 @@
 /*
  *  Dksets.c
  *
- *  $Id: Dksets.c,v 1.7.2.2 2010/12/06 10:37:13 source Exp $
+ *  $Id: Dksets.c,v 1.7.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  Sets
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksets.h b/libsrc/Dk/Dksets.h
index faf0011..84598fd 100644
--- a/libsrc/Dk/Dksets.h
+++ b/libsrc/Dk/Dksets.h
@@ -1,14 +1,14 @@
 /*
  *  Dksets.h
  *
- *  $Id: Dksets.h,v 1.7.2.2 2010/12/06 10:37:13 source Exp $
+ *  $Id: Dksets.h,v 1.7.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  Sets
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkstkern.c b/libsrc/Dk/Dkstkern.c
index e8dab00..187a181 100644
--- a/libsrc/Dk/Dkstkern.c
+++ b/libsrc/Dk/Dkstkern.c
@@ -1,14 +1,14 @@
 /*
  *  Dkstkern.c
  *
- *  $Id: Dkstkern.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkstkern.c,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  RPC Kernel (single threaded, without server side support)
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkstubs.c b/libsrc/Dk/Dkstubs.c
index 8b88703..3c6ce64 100644
--- a/libsrc/Dk/Dkstubs.c
+++ b/libsrc/Dk/Dkstubs.c
@@ -1,14 +1,14 @@
 /*
  *  Dkstubs.c
  *
- *  $Id: Dkstubs.c,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkstubs.c,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Systems specific code
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkstubs.h b/libsrc/Dk/Dkstubs.h
index cb5d39e..1d26aa6 100644
--- a/libsrc/Dk/Dkstubs.h
+++ b/libsrc/Dk/Dkstubs.h
@@ -1,14 +1,14 @@
 /*
  *  Dkstubs.h
  *
- *  $Id: Dkstubs.h,v 1.3 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkstubs.h,v 1.3.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Systems specific code
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dksystem.h b/libsrc/Dk/Dksystem.h
index 38da468..8ff478a 100644
--- a/libsrc/Dk/Dksystem.h
+++ b/libsrc/Dk/Dksystem.h
@@ -1,14 +1,14 @@
 /*
  *  Dksystem.h
  *
- *  $Id: Dksystem.h,v 1.5 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dksystem.h,v 1.5.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  system common include files
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dktrace.h b/libsrc/Dk/Dktrace.h
index 61e221b..8e7b58d 100644
--- a/libsrc/Dk/Dktrace.h
+++ b/libsrc/Dk/Dktrace.h
@@ -1,14 +1,14 @@
 /*
  *  Dktrace.h
  *
- *  $Id: Dktrace.h,v 1.3.2.1 2011/03/08 13:41:57 source Exp $
+ *  $Id: Dktrace.h,v 1.3.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  Tracing & Debugging
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dktypes.h b/libsrc/Dk/Dktypes.h
index 18012c9..8871169 100644
--- a/libsrc/Dk/Dktypes.h
+++ b/libsrc/Dk/Dktypes.h
@@ -1,14 +1,14 @@
 /*
  *  Dktypes.c
  *
- *  $Id: Dktypes.h,v 1.5 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dktypes.h,v 1.5.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Global types
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkutil.c b/libsrc/Dk/Dkutil.c
index f662d22..047007c 100644
--- a/libsrc/Dk/Dkutil.c
+++ b/libsrc/Dk/Dkutil.c
@@ -1,14 +1,14 @@
 /*
  *  Dkutil.c
  *
- *  $Id: Dkutil.c,v 1.3 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkutil.c,v 1.3.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Helper functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkutil.h b/libsrc/Dk/Dkutil.h
index a972610..5fb7950 100644
--- a/libsrc/Dk/Dkutil.h
+++ b/libsrc/Dk/Dkutil.h
@@ -1,14 +1,14 @@
 /*
  *  Dkutil.h
  *
- *  $Id: Dkutil.h,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkutil.h,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  Helper functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Dkword.h b/libsrc/Dk/Dkword.h
index 1877834..018dc57 100644
--- a/libsrc/Dk/Dkword.h
+++ b/libsrc/Dk/Dkword.h
@@ -1,12 +1,12 @@
 /*
  *  Dkword.h
  *
- *  $Id: Dkword.h,v 1.2 2009/04/07 22:00:54 source Exp $
+ *  $Id: Dkword.h,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Makefile.am b/libsrc/Dk/Makefile.am
index aef20a2..8b78c2a 100644
--- a/libsrc/Dk/Makefile.am
+++ b/libsrc/Dk/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Dk/Makefile.in b/libsrc/Dk/Makefile.in
index b6b0330..524fe6e 100644
--- a/libsrc/Dk/Makefile.in
+++ b/libsrc/Dk/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -150,6 +150,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -198,6 +199,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -249,6 +251,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -295,7 +298,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/JDBCDriverType4/Makefile.am b/libsrc/JDBCDriverType4/Makefile.am
index 30cacf0..6239b2d 100644
--- a/libsrc/JDBCDriverType4/Makefile.am
+++ b/libsrc/JDBCDriverType4/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/Makefile.in b/libsrc/JDBCDriverType4/Makefile.in
index 60f752f..b080f6b 100644
--- a/libsrc/JDBCDriverType4/Makefile.in
+++ b/libsrc/JDBCDriverType4/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -139,6 +139,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -187,6 +188,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -238,6 +240,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -284,7 +287,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/JDBCDriverType4/openlink/util/BaseMessage.java b/libsrc/JDBCDriverType4/openlink/util/BaseMessage.java
index 5f81ef6..fc58bee 100644
--- a/libsrc/JDBCDriverType4/openlink/util/BaseMessage.java
+++ b/libsrc/JDBCDriverType4/openlink/util/BaseMessage.java
@@ -1,12 +1,12 @@
 /*
- *  $Id: BaseMessage.java,v 1.2.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: BaseMessage.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  Implementation of the BaseMessage class
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/OPLHeapBlob.java b/libsrc/JDBCDriverType4/openlink/util/OPLHeapBlob.java
index 94b0785..f9ee2f4 100644
--- a/libsrc/JDBCDriverType4/openlink/util/OPLHeapBlob.java
+++ b/libsrc/JDBCDriverType4/openlink/util/OPLHeapBlob.java
@@ -1,12 +1,12 @@
 /*
- *  $Id: OPLHeapBlob.java,v 1.2.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: OPLHeapBlob.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  Implementation of the JDBC Blob class
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/OPLHeapClob.java b/libsrc/JDBCDriverType4/openlink/util/OPLHeapClob.java
index 5be8524..e1d2890 100644
--- a/libsrc/JDBCDriverType4/openlink/util/OPLHeapClob.java
+++ b/libsrc/JDBCDriverType4/openlink/util/OPLHeapClob.java
@@ -1,12 +1,12 @@
 /*
- *  $Id: OPLHeapClob.java,v 1.2.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: OPLHeapClob.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  Implementation of the JDBC Clob class
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/OPLHeapNClob.java b/libsrc/JDBCDriverType4/openlink/util/OPLHeapNClob.java
index 34e5d0b..e2c1c8b 100644
--- a/libsrc/JDBCDriverType4/openlink/util/OPLHeapNClob.java
+++ b/libsrc/JDBCDriverType4/openlink/util/OPLHeapNClob.java
@@ -1,12 +1,12 @@
 /*
- *  $Id: OPLHeapNClob.java,v 1.1.2.2 2010/02/02 23:03:58 source Exp $
+ *  $Id: OPLHeapNClob.java,v 1.1.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  Implementation of the JDBC Clob class
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/OPLMessage_u.java b/libsrc/JDBCDriverType4/openlink/util/OPLMessage_u.java
index 1e2b069..a3be996 100644
--- a/libsrc/JDBCDriverType4/openlink/util/OPLMessage_u.java
+++ b/libsrc/JDBCDriverType4/openlink/util/OPLMessage_u.java
@@ -1,12 +1,12 @@
 /*
- *  $Id: OPLMessage_u.java,v 1.2.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: OPLMessage_u.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  Implementation of the OPLMessage_x class
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/Vector.java b/libsrc/JDBCDriverType4/openlink/util/Vector.java
index 5e2d1d0..3827221 100644
--- a/libsrc/JDBCDriverType4/openlink/util/Vector.java
+++ b/libsrc/JDBCDriverType4/openlink/util/Vector.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Vector.java,v 1.1.1.1.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: Vector.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/VectorOfDouble.java b/libsrc/JDBCDriverType4/openlink/util/VectorOfDouble.java
index 10ef159..89e4ba9 100644
--- a/libsrc/JDBCDriverType4/openlink/util/VectorOfDouble.java
+++ b/libsrc/JDBCDriverType4/openlink/util/VectorOfDouble.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VectorOfDouble.java,v 1.1.1.1.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: VectorOfDouble.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/VectorOfFloat.java b/libsrc/JDBCDriverType4/openlink/util/VectorOfFloat.java
index 7f86a7d..3a37ed7 100644
--- a/libsrc/JDBCDriverType4/openlink/util/VectorOfFloat.java
+++ b/libsrc/JDBCDriverType4/openlink/util/VectorOfFloat.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VectorOfFloat.java,v 1.1.1.1.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: VectorOfFloat.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/VectorOfLong.java b/libsrc/JDBCDriverType4/openlink/util/VectorOfLong.java
index 9832c73..31527b3 100644
--- a/libsrc/JDBCDriverType4/openlink/util/VectorOfLong.java
+++ b/libsrc/JDBCDriverType4/openlink/util/VectorOfLong.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VectorOfLong.java,v 1.1.1.1.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: VectorOfLong.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/openlink/util/messages_u.java b/libsrc/JDBCDriverType4/openlink/util/messages_u.java
index 9a71292..df3c88b 100644
--- a/libsrc/JDBCDriverType4/openlink/util/messages_u.java
+++ b/libsrc/JDBCDriverType4/openlink/util/messages_u.java
@@ -1,12 +1,12 @@
 /*
- *  $Id: messages_u.java,v 1.2.2.1 2010/02/02 23:03:58 source Exp $
+ *  $Id: messages_u.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  Error messages
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test.bat b/libsrc/JDBCDriverType4/test.bat
index 26dd435..23cd6cf 100644
--- a/libsrc/JDBCDriverType4/test.bat
+++ b/libsrc/JDBCDriverType4/test.bat
@@ -1,10 +1,10 @@
 rem
-rem  $Id: test.bat,v 1.2.2.1 2009/07/01 10:30:28 source Exp $
+rem  $Id: test.bat,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
 rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2009 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test.sh b/libsrc/JDBCDriverType4/test.sh
index 684a5ad..299d832 100755
--- a/libsrc/JDBCDriverType4/test.sh
+++ b/libsrc/JDBCDriverType4/test.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: test.sh,v 1.2.2.2 2009/07/14 20:15:00 source Exp $
+#  $Id: test.sh,v 1.2.2.3 2012/03/08 12:55:31 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test2.bat b/libsrc/JDBCDriverType4/test2.bat
index f188bc7..3073a8c 100644
--- a/libsrc/JDBCDriverType4/test2.bat
+++ b/libsrc/JDBCDriverType4/test2.bat
@@ -1,10 +1,10 @@
 rem
-rem  $Id: test2.bat,v 1.2.2.1 2009/07/01 10:30:28 source Exp $
+rem  $Id: test2.bat,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
 rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2009 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test2.sh b/libsrc/JDBCDriverType4/test2.sh
index 9632b17..18c43f7 100755
--- a/libsrc/JDBCDriverType4/test2.sh
+++ b/libsrc/JDBCDriverType4/test2.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: test2.sh,v 1.2.2.2 2009/07/14 20:15:00 source Exp $
+#  $Id: test2.sh,v 1.2.2.3 2012/03/08 12:55:31 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test3.bat b/libsrc/JDBCDriverType4/test3.bat
index c44e7fc..e655a90 100644
--- a/libsrc/JDBCDriverType4/test3.bat
+++ b/libsrc/JDBCDriverType4/test3.bat
@@ -1,10 +1,10 @@
 rem
-rem  $Id: test3.bat,v 1.2.2.1 2009/07/01 10:30:29 source Exp $
+rem  $Id: test3.bat,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
 rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2009 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test3.sh b/libsrc/JDBCDriverType4/test3.sh
index c564f9a..bb9d155 100755
--- a/libsrc/JDBCDriverType4/test3.sh
+++ b/libsrc/JDBCDriverType4/test3.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: test3.sh,v 1.2.2.3 2009/07/14 20:15:00 source Exp $
+#  $Id: test3.sh,v 1.2.2.4 2012/03/08 12:55:31 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test4.bat b/libsrc/JDBCDriverType4/test4.bat
index b121e91..ac39d01 100644
--- a/libsrc/JDBCDriverType4/test4.bat
+++ b/libsrc/JDBCDriverType4/test4.bat
@@ -1,10 +1,10 @@
 rem
-rem  $Id: test4.bat,v 1.2.2.1 2009/07/01 10:30:29 source Exp $
+rem  $Id: test4.bat,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
 rem
 rem  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 rem  project.
 rem
-rem  Copyright (C) 1998-2009 OpenLink Software
+rem  Copyright (C) 1998-2012 OpenLink Software
 rem
 rem  This project is free software; you can redistribute it and/or modify it
 rem  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/test4.sh b/libsrc/JDBCDriverType4/test4.sh
index 86935c1..db9903d 100755
--- a/libsrc/JDBCDriverType4/test4.sh
+++ b/libsrc/JDBCDriverType4/test4.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: test4.sh,v 1.2.2.2 2009/07/14 20:15:00 source Exp $
+#  $Id: test4.sh,v 1.2.2.3 2012/03/08 12:55:31 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.am b/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.am
index 02070f1..f0eb6b7 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.am
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.in b/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.in
index 673a579..debbdf9 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.in
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/SPRgetColumns.java b/libsrc/JDBCDriverType4/testsuite_2.0/SPRgetColumns.java
index 86e3883..f964ed9 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/SPRgetColumns.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/SPRgetColumns.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestBlob.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestBlob.java
index c7378ca..d429814 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestBlob.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestBlob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestCallableExecute.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestCallableExecute.java
index 6ce7452..553c03b 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestCallableExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestCallableExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestClean.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestClean.java
index 849f99a..e1e2f35 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestClean.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestClean.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestDatabaseMetaData.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestDatabaseMetaData.java
index 5032f8f..f42d01b 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestDatabaseMetaData.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestDatabaseMetaData.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteBlob.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteBlob.java
index 8462d2f..34198cb 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteBlob.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteBlob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteClob.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteClob.java
index 92a641a..5fb4636 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteClob.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteClob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteFetch.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteFetch.java
index 385df1c..2b412d8 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteFetch.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestExecuteFetch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestMoreRes.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestMoreRes.java
index 7d2a47a..c5a279e 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestMoreRes.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestMoreRes.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestNumeric.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestNumeric.java
index a5fcaa1..e6ba210 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestNumeric.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestNumeric.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareBatch.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareBatch.java
index a849c40..49d11c3 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareBatch.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareBatch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareExecute.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareExecute.java
index ba137ae..3a05265 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestPrepareExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestScroll.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestScroll.java
index 3e971de..41d345b 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestScroll.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestScroll.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollManual.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollManual.java
index 32c15c9..4965ec3 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollManual.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollManual.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollPrepare.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollPrepare.java
index f0826da..8f368cd 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollPrepare.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestScrollPrepare.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecute.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecute.java
index aaf23ef..ee7f2b4 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecuteBatch.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecuteBatch.java
index 8aec913..5f7cd4e 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecuteBatch.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestSimpleExecuteBatch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestTagProc.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestTagProc.java
index 2904d4e..3ad2fa7 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestTagProc.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestTagProc.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestTimeUpdate.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestTimeUpdate.java
index 08f0232..15f708a 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestTimeUpdate.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestTimeUpdate.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestURL.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestURL.java
index 801867b..46758ca 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestURL.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestURL.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/TestVarbinary.java b/libsrc/JDBCDriverType4/testsuite_2.0/TestVarbinary.java
index b952360..6db1df8 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/TestVarbinary.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/TestVarbinary.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/tagproc.sql b/libsrc/JDBCDriverType4/testsuite_2.0/tagproc.sql
index 2c024da..6d5fd27 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/tagproc.sql
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/tagproc.sql
@@ -1,10 +1,10 @@
 --  
---  $Id: tagproc.sql,v 1.2 2006/08/16 07:58:14 source Exp $
+--  $Id: tagproc.sql,v 1.2.2.1 2012/03/08 12:55:31 source Exp $
 --  
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --  
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --  
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_2.0/test2276.java b/libsrc/JDBCDriverType4/testsuite_2.0/test2276.java
index 12d3e5a..819290e 100644
--- a/libsrc/JDBCDriverType4/testsuite_2.0/test2276.java
+++ b/libsrc/JDBCDriverType4/testsuite_2.0/test2276.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.am b/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.am
index 8d70271..08e563e 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.am
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.in b/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.in
index 458b523..bf94a77 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.in
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/SPRgetColumns.java b/libsrc/JDBCDriverType4/testsuite_3.0/SPRgetColumns.java
index 7a1ab78..e9adff5 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/SPRgetColumns.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/SPRgetColumns.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestBlob.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestBlob.java
index 62809b3..15b9225 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestBlob.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestBlob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestCallableExecute.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestCallableExecute.java
index c7fdfac..40daca4 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestCallableExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestCallableExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestClean.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestClean.java
index a3b520d..d733522 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestClean.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestClean.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestDataSource.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestDataSource.java
index dfa792e..8546adb 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestDataSource.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestDataSource.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestDatabaseMetaData.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestDatabaseMetaData.java
index 8b4b7c1..dc1f916 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestDatabaseMetaData.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestDatabaseMetaData.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteBlob.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteBlob.java
index b599294..b7a3c94 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteBlob.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteBlob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteClob.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteClob.java
index abcdbb0..b290b0b 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteClob.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteClob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteFetch.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteFetch.java
index a947179..dbfc250 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteFetch.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestExecuteFetch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestLongXml.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestLongXml.java
index 7d952e7..2022587 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestLongXml.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestLongXml.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestMoreRes.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestMoreRes.java
index 0e16991..19f2079 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestMoreRes.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestMoreRes.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestNumeric.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestNumeric.java
index 541d501..295db68 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestNumeric.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestNumeric.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareBatch.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareBatch.java
index f6aa245..d33f3fe 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareBatch.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareBatch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareExecute.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareExecute.java
index 1758720..8be79e7 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestPrepareExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestScroll.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestScroll.java
index 91d97a0..5d4ca91 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestScroll.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestScroll.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollManual.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollManual.java
index f688ace..f6715e4 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollManual.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollManual.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollPrepare.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollPrepare.java
index d4514fe..5187087 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollPrepare.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestScrollPrepare.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecute.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecute.java
index 93e20ee..c068407 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecuteBatch.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecuteBatch.java
index 978da8a..f22946f 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecuteBatch.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestSimpleExecuteBatch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestTagProc.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestTagProc.java
index cc72151..d7cd150 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestTagProc.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestTagProc.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestTimeUpdate.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestTimeUpdate.java
index 08ce511..b700992 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestTimeUpdate.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestTimeUpdate.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestURL.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestURL.java
index 0c6179c..13ce3e6 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestURL.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestURL.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/TestVarbinary.java b/libsrc/JDBCDriverType4/testsuite_3.0/TestVarbinary.java
index 9b75ca5..c9db19a 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/TestVarbinary.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/TestVarbinary.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_3.0/test2276.java b/libsrc/JDBCDriverType4/testsuite_3.0/test2276.java
index 9be4f3a..abf6d06 100644
--- a/libsrc/JDBCDriverType4/testsuite_3.0/test2276.java
+++ b/libsrc/JDBCDriverType4/testsuite_3.0/test2276.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.am b/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.am
index 35ef4b4..f7fe139 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.am
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.in b/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.in
index 1cfceb0..f175cf2 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.in
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/SPRgetColumns.java b/libsrc/JDBCDriverType4/testsuite_4.0/SPRgetColumns.java
index 06d7837..2a6c81c 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/SPRgetColumns.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/SPRgetColumns.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestBlob.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestBlob.java
index b1be52d..2abd077 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestBlob.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestBlob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestCallableExecute.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestCallableExecute.java
index 8b84538..27930d2 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestCallableExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestCallableExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestClean.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestClean.java
index b10ccb2..83a7d50 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestClean.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestClean.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestDataSource.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestDataSource.java
index 4213f99..c8dbf37 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestDataSource.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestDataSource.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestDatabaseMetaData.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestDatabaseMetaData.java
index 955d1b9..c8dd605 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestDatabaseMetaData.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestDatabaseMetaData.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteBlob.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteBlob.java
index a0506c0..48bb38a 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteBlob.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteBlob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteClob.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteClob.java
index 93f6cbc..5e2fbdb 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteClob.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteClob.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteFetch.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteFetch.java
index 878c2f3..387f36f 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteFetch.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestExecuteFetch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestLongXml.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestLongXml.java
index a2edd2d..ed00a98 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestLongXml.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestLongXml.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestMoreRes.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestMoreRes.java
index 4ac7874..4efb659 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestMoreRes.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestMoreRes.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestNumeric.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestNumeric.java
index 83d1561..1881fc2 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestNumeric.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestNumeric.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareBatch.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareBatch.java
index 8eabf0e..025e95b 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareBatch.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareBatch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareExecute.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareExecute.java
index 9430f2c..6b31425 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestPrepareExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestScroll.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestScroll.java
index 6fae219..b221739 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestScroll.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestScroll.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollManual.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollManual.java
index 94e68e9..71f4e99 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollManual.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollManual.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollPrepare.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollPrepare.java
index e35cbf0..448a7de 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollPrepare.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestScrollPrepare.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecute.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecute.java
index a5d5cbe..68d3903 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecute.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecute.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecuteBatch.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecuteBatch.java
index 1399c17..6a7bc48 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecuteBatch.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestSimpleExecuteBatch.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestTagProc.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestTagProc.java
index 7ded213..a5cf567 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestTagProc.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestTagProc.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestTimeUpdate.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestTimeUpdate.java
index 658e975..aa0f56f 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestTimeUpdate.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestTimeUpdate.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestURL.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestURL.java
index 6232d90..b8cda99 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestURL.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestURL.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/TestVarbinary.java b/libsrc/JDBCDriverType4/testsuite_4.0/TestVarbinary.java
index 515e016..1bda35d 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/TestVarbinary.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/TestVarbinary.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/testsuite_4.0/test2276.java b/libsrc/JDBCDriverType4/testsuite_4.0/test2276.java
index 148bd34..606bfc0 100644
--- a/libsrc/JDBCDriverType4/testsuite_4.0/test2276.java
+++ b/libsrc/JDBCDriverType4/testsuite_4.0/test2276.java
@@ -2,7 +2,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/Makefile.am b/libsrc/JDBCDriverType4/virtuoso/Makefile.am
index b7bd501..56a8462 100644
--- a/libsrc/JDBCDriverType4/virtuoso/Makefile.am
+++ b/libsrc/JDBCDriverType4/virtuoso/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/Makefile.in b/libsrc/JDBCDriverType4/virtuoso/Makefile.in
index 55096fc..7ec86d6 100644
--- a/libsrc/JDBCDriverType4/virtuoso/Makefile.in
+++ b/libsrc/JDBCDriverType4/virtuoso/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -139,6 +139,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -187,6 +188,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -238,6 +240,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -284,7 +287,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/JDBCDriverType4/virtuoso/javax/BaseRowSet.java b/libsrc/JDBCDriverType4/virtuoso/javax/BaseRowSet.java
index 6acab22..e74004f 100644
--- a/libsrc/JDBCDriverType4/virtuoso/javax/BaseRowSet.java
+++ b/libsrc/JDBCDriverType4/virtuoso/javax/BaseRowSet.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: BaseRowSet.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: BaseRowSet.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/javax/OPLCachedRowSet.java b/libsrc/JDBCDriverType4/virtuoso/javax/OPLCachedRowSet.java
index d3912e0..7f2cab1 100644
--- a/libsrc/JDBCDriverType4/virtuoso/javax/OPLCachedRowSet.java
+++ b/libsrc/JDBCDriverType4/virtuoso/javax/OPLCachedRowSet.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: OPLCachedRowSet.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: OPLCachedRowSet.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/javax/OPLJdbcRowSet.java b/libsrc/JDBCDriverType4/virtuoso/javax/OPLJdbcRowSet.java
index 4c7142a..07d3175 100644
--- a/libsrc/JDBCDriverType4/virtuoso/javax/OPLJdbcRowSet.java
+++ b/libsrc/JDBCDriverType4/virtuoso/javax/OPLJdbcRowSet.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: OPLJdbcRowSet.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: OPLJdbcRowSet.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/javax/OPLMessage_x.java b/libsrc/JDBCDriverType4/virtuoso/javax/OPLMessage_x.java
index da56eae..f17cfbd 100644
--- a/libsrc/JDBCDriverType4/virtuoso/javax/OPLMessage_x.java
+++ b/libsrc/JDBCDriverType4/virtuoso/javax/OPLMessage_x.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: OPLMessage_x.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: OPLMessage_x.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/javax/OPLRowSetMetaData.java b/libsrc/JDBCDriverType4/virtuoso/javax/OPLRowSetMetaData.java
index 1486eb4..78d0bd5 100644
--- a/libsrc/JDBCDriverType4/virtuoso/javax/OPLRowSetMetaData.java
+++ b/libsrc/JDBCDriverType4/virtuoso/javax/OPLRowSetMetaData.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: OPLRowSetMetaData.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: OPLRowSetMetaData.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/javax/messages_x.java b/libsrc/JDBCDriverType4/virtuoso/javax/messages_x.java
index 6d6f818..ef9f559 100644
--- a/libsrc/JDBCDriverType4/virtuoso/javax/messages_x.java
+++ b/libsrc/JDBCDriverType4/virtuoso/javax/messages_x.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: messages_x.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: messages_x.java,v 1.2.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/BatchUpdateException.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/BatchUpdateException.java
index 8534b42..92c5f7d 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/BatchUpdateException.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/BatchUpdateException.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: BatchUpdateException.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: BatchUpdateException.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/CallableStatementWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/CallableStatementWrapper.java
index f8738e7..00fcaa2 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/CallableStatementWrapper.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/CallableStatementWrapper.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: CallableStatementWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: CallableStatementWrapper.java,v 1.2.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Closeable.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Closeable.java
index d660b70..5e74428 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Closeable.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Closeable.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Closeable.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: Closeable.java,v 1.2.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ConnectionWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/ConnectionWrapper.java
index 4c741d2..8290960 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ConnectionWrapper.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/ConnectionWrapper.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: ConnectionWrapper.java,v 1.2.2.8 2010/01/15 12:22:15 source Exp $
+ *  $Id: ConnectionWrapper.java,v 1.2.2.9 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/DatabaseMetaDataWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/DatabaseMetaDataWrapper.java
deleted file mode 100644
index e7de19b..0000000
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/DatabaseMetaDataWrapper.java
+++ /dev/null
@@ -1,1902 +0,0 @@
-/*
- *  $Id: DatabaseMetaDataWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2009 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.jdbc2;
-
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Types;
-#if JDK_VER >= 16
-import java.sql.RowIdLifetime;
-#endif
-
-public class DatabaseMetaDataWrapper implements DatabaseMetaData {
-
-  private ConnectionWrapper wconn;
-  private DatabaseMetaData dbmd;
-
-  protected DatabaseMetaDataWrapper(ConnectionWrapper _wconn, DatabaseMetaData _dbmd) {
-    wconn = _wconn;
-    dbmd = _dbmd;
-  }
-
-  private void exceptionOccurred(SQLException sqlEx) {
-    if (wconn != null)
-      wconn.exceptionOccurred(sqlEx);
-  }
-
-  public synchronized void finalize () throws Throwable {
-    close();
-  }
-
-  protected void close() throws SQLException {
-    if (dbmd == null)
-      return;
-    dbmd = null;
-    wconn = null;
-  }
-
-  public boolean allProceduresAreCallable() throws SQLException {
-    check_close();
-    try {
-      return dbmd.allProceduresAreCallable();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean allTablesAreSelectable() throws SQLException {
-    check_close();
-    try {
-      return dbmd.allTablesAreSelectable();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getURL() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getURL();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getUserName() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getUserName();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isReadOnly() throws SQLException {
-    check_close();
-    try {
-      return dbmd.isReadOnly();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean nullsAreSortedHigh() throws SQLException {
-    check_close();
-    try {
-      return dbmd.nullsAreSortedHigh();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean nullsAreSortedLow() throws SQLException {
-    check_close();
-    try {
-      return dbmd.nullsAreSortedLow();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean nullsAreSortedAtStart() throws SQLException {
-    check_close();
-    try {
-      return dbmd.nullsAreSortedAtStart();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean nullsAreSortedAtEnd() throws SQLException {
-    check_close();
-    try {
-      return dbmd.nullsAreSortedAtEnd();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getDatabaseProductName() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDatabaseProductName();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getDatabaseProductVersion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDatabaseProductVersion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getDriverName() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDriverName();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getDriverVersion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDriverVersion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getDriverMajorVersion(){
-    return dbmd.getDriverMajorVersion();
-  }
-
-  public int getDriverMinorVersion(){
-    return dbmd.getDriverMinorVersion();
-  }
-
-  public boolean usesLocalFiles() throws SQLException {
-    check_close();
-    try {
-      return dbmd.usesLocalFiles();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean usesLocalFilePerTable() throws SQLException {
-    check_close();
-    try {
-      return dbmd.usesLocalFilePerTable();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsMixedCaseIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsMixedCaseIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean storesUpperCaseIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.storesUpperCaseIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean storesLowerCaseIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.storesLowerCaseIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean storesMixedCaseIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.storesMixedCaseIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsMixedCaseQuotedIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.storesUpperCaseQuotedIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.storesLowerCaseQuotedIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
-    check_close();
-    try {
-      return dbmd.storesMixedCaseQuotedIdentifiers();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getIdentifierQuoteString() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getIdentifierQuoteString();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getSQLKeywords() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getSQLKeywords();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getNumericFunctions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getNumericFunctions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getStringFunctions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getStringFunctions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getSystemFunctions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getSystemFunctions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getTimeDateFunctions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getTimeDateFunctions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getSearchStringEscape() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getSearchStringEscape();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getExtraNameCharacters() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getExtraNameCharacters();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsAlterTableWithAddColumn() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsAlterTableWithAddColumn();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsAlterTableWithDropColumn() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsAlterTableWithDropColumn();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsColumnAliasing() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsColumnAliasing();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean nullPlusNonNullIsNull() throws SQLException {
-    check_close();
-    try {
-      return dbmd.nullPlusNonNullIsNull();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsConvert() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsConvert();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsConvert(int fromType, int toType) throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsConvert(fromType, toType);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsTableCorrelationNames() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsTableCorrelationNames();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsDifferentTableCorrelationNames() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsDifferentTableCorrelationNames();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsExpressionsInOrderBy() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsExpressionsInOrderBy();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsOrderByUnrelated() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsOrderByUnrelated();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsGroupBy() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsGroupBy();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsGroupByUnrelated() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsGroupByUnrelated();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsGroupByBeyondSelect() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsGroupByBeyondSelect();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsLikeEscapeClause() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsLikeEscapeClause();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsMultipleResultSets() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsMultipleResultSets();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsMultipleTransactions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsMultipleTransactions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsNonNullableColumns() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsNonNullableColumns();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsMinimumSQLGrammar() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsMinimumSQLGrammar();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCoreSQLGrammar() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCoreSQLGrammar();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsExtendedSQLGrammar() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsExtendedSQLGrammar();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsANSI92EntryLevelSQL() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsANSI92EntryLevelSQL();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsANSI92IntermediateSQL() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsANSI92IntermediateSQL();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsANSI92FullSQL() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsANSI92FullSQL();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsIntegrityEnhancementFacility() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsIntegrityEnhancementFacility();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsOuterJoins() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsOuterJoins();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsFullOuterJoins() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsFullOuterJoins();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsLimitedOuterJoins() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsLimitedOuterJoins();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getSchemaTerm() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getSchemaTerm();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getProcedureTerm() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getProcedureTerm();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getCatalogTerm() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getCatalogTerm();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isCatalogAtStart() throws SQLException {
-    check_close();
-    try {
-      return dbmd.isCatalogAtStart();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getCatalogSeparator() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getCatalogSeparator();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSchemasInDataManipulation() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSchemasInDataManipulation();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSchemasInProcedureCalls() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSchemasInProcedureCalls();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSchemasInTableDefinitions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSchemasInTableDefinitions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSchemasInIndexDefinitions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSchemasInIndexDefinitions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSchemasInPrivilegeDefinitions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCatalogsInDataManipulation() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCatalogsInDataManipulation();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCatalogsInProcedureCalls() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCatalogsInProcedureCalls();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCatalogsInTableDefinitions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCatalogsInTableDefinitions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCatalogsInIndexDefinitions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCatalogsInPrivilegeDefinitions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsPositionedDelete() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsPositionedDelete();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsPositionedUpdate() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsPositionedUpdate();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSelectForUpdate() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSelectForUpdate();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsStoredProcedures() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsStoredProcedures();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSubqueriesInComparisons() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSubqueriesInComparisons();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSubqueriesInExists() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSubqueriesInExists();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSubqueriesInIns() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSubqueriesInIns();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsSubqueriesInQuantifieds() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSubqueriesInQuantifieds();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsCorrelatedSubqueries() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsCorrelatedSubqueries();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsUnion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsUnion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsUnionAll() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsUnionAll();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsOpenCursorsAcrossCommit();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsOpenCursorsAcrossRollback();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsOpenStatementsAcrossCommit();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsOpenStatementsAcrossRollback();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxBinaryLiteralLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxBinaryLiteralLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxCharLiteralLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxCharLiteralLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxColumnNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxColumnNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxColumnsInGroupBy() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxColumnsInGroupBy();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxColumnsInIndex() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxColumnsInIndex();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxColumnsInOrderBy() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxColumnsInOrderBy();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxColumnsInSelect() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxColumnsInSelect();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxColumnsInTable() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxColumnsInTable();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxConnections() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxConnections();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxCursorNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxCursorNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxIndexLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxIndexLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxSchemaNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxSchemaNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxProcedureNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxProcedureNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxCatalogNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxCatalogNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxRowSize() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxRowSize();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
-    check_close();
-    try {
-      return dbmd.doesMaxRowSizeIncludeBlobs();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxStatementLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxStatementLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxStatements() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxStatements();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxTableNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxTableNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxTablesInSelect() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxTablesInSelect();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getMaxUserNameLength() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getMaxUserNameLength();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getDefaultTransactionIsolation() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDefaultTransactionIsolation();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsTransactions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsTransactions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsTransactionIsolationLevel(int level) throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsTransactionIsolationLevel(level);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsDataDefinitionAndDataManipulationTransactions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsDataManipulationTransactionsOnly() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsDataManipulationTransactionsOnly();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
-    check_close();
-    try {
-      return dbmd.dataDefinitionCausesTransactionCommit();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
-    check_close();
-    try {
-      return dbmd.dataDefinitionIgnoredInTransactions();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getProcedures(catalog, schemaPattern, procedureNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getProcedureColumns(catalog, schemaPattern, procedureNamePattern, columnNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getTables(catalog, schemaPattern, tableNamePattern, types);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getSchemas() throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getSchemas();
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getCatalogs() throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getCatalogs();
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getTableTypes() throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getTableTypes();
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getColumns(catalog, schemaPattern, tableNamePattern, columnNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getColumnPrivileges(catalog, schema, table, columnNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getTablePrivileges(catalog, schemaPattern, tableNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getBestRowIdentifier(catalog, schema, table, scope, nullable);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getVersionColumns(catalog, schema, table);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getPrimaryKeys(catalog, schema, table);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getImportedKeys(catalog, schema, table);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getExportedKeys(catalog, schema, table);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getCrossReference(primaryCatalog, primarySchema, primaryTable, foreignCatalog, foreignSchema, foreignTable);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getTypeInfo() throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getTypeInfo();
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getIndexInfo(catalog, schema, table, unique, approximate);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsResultSetType(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsResultSetType(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsResultSetConcurrency(type, concurrency);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean ownUpdatesAreVisible(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.ownUpdatesAreVisible(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean ownDeletesAreVisible(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.ownDeletesAreVisible(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean ownInsertsAreVisible(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.ownInsertsAreVisible(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean othersUpdatesAreVisible(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.othersUpdatesAreVisible(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean othersDeletesAreVisible(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.othersDeletesAreVisible(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean othersInsertsAreVisible(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.othersInsertsAreVisible(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean updatesAreDetected(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.updatesAreDetected(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean deletesAreDetected(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.deletesAreDetected(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean insertsAreDetected(int type) throws SQLException {
-    check_close();
-    try {
-      return dbmd.insertsAreDetected(type);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsBatchUpdates() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsBatchUpdates();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getUDTs(catalog, schemaPattern, typeNamePattern, types);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public Connection getConnection() throws SQLException {
-    check_close();
-    return wconn;
-  }
-
-#if JDK_VER >= 14
-    // ------------------- JDBC 3.0 -------------------------
-
-  public boolean supportsSavepoints() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsSavepoints();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsNamedParameters() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsNamedParameters();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsMultipleOpenResults() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsMultipleOpenResults();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsGetGeneratedKeys() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsGetGeneratedKeys();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getSuperTypes(String catalog, String schemaPattern,
-			    String typeNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getSuperTypes(catalog, schemaPattern, typeNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getSuperTables(String catalog, String schemaPattern,
-			     String tableNamePattern) throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getSuperTables(catalog, schemaPattern, tableNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getAttributes(String catalog, String schemaPattern,
-			    String typeNamePattern, String attributeNamePattern)
-	throws SQLException {
-    check_close();
-    try {
-      ResultSet rs = dbmd.getAttributes(catalog, schemaPattern, typeNamePattern, attributeNamePattern);
-      if (rs != null)
-        return new ResultSetWrapper(wconn, rs);
-      else
-        return null;
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsResultSetHoldability(int holdability) throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsResultSetHoldability(holdability);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getResultSetHoldability() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getResultSetHoldability();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getDatabaseMajorVersion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDatabaseMajorVersion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getDatabaseMinorVersion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getDatabaseMinorVersion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getJDBCMajorVersion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getJDBCMajorVersion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getJDBCMinorVersion() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getJDBCMinorVersion();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public int getSQLStateType() throws SQLException {
-    check_close();
-    try {
-      return dbmd.getSQLStateType();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean locatorsUpdateCopy() throws SQLException {
-    check_close();
-    try {
-      return dbmd.locatorsUpdateCopy();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsStatementPooling() throws SQLException {
-    check_close();
-    try {
-      return dbmd.supportsStatementPooling();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-#if JDK_VER >= 16
-    //------------------------- JDBC 4.0 -----------------------------------
-
-  public RowIdLifetime getRowIdLifetime() throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.getRowIdLifetime();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.getSchemas(catalog, schemaPattern);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.supportsStoredFunctionsUsingCallSyntax();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean autoCommitFailureClosesAllResultSets() throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.autoCommitFailureClosesAllResultSets();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getClientInfoProperties() throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.getClientInfoProperties();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getFunctions(String catalog, String schemaPattern,
-			    String functionNamePattern) throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.getFunctions(catalog, schemaPattern, functionNamePattern);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public ResultSet getFunctionColumns(String catalog,
-				  String schemaPattern,
-				  String functionNamePattern,
-				  String columnNamePattern) throws SQLException
-  {
-    check_close();
-    try {
-      return dbmd.getFunctionColumns(catalog, schemaPattern, functionNamePattern, columnNamePattern);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
-  {
-    check_close();
-    try {
-      return dbmd.unwrap(iface);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
-  {
-    check_close();
-    try {
-      return dbmd.isWrapperFor(iface);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-#endif
-#endif
-
-
-  private void check_close()
-    throws SQLException
-  {
-    if (dbmd == null)
-      throw new VirtuosoException("The connection is closed.",VirtuosoException.OK);
-  }
-}
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Driver.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Driver.java
index 49e9dac..b7247ac 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Driver.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Driver.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Driver.java,v 1.16.2.30 2011/03/23 12:01:46 source Exp $
+ *  $Id: Driver.java,v 1.16.2.35 2012/03/15 11:17:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -62,7 +62,7 @@ public class Driver implements java.sql.Driver
    // The major and minor version number
    protected static final int major = 3;
 
-   protected static final int minor = 57;
+   protected static final int minor = 61;
 
    // Some variables
    private String host = "localhost";
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/LRUCache.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/LRUCache.java
index ef8be59..09528e9 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/LRUCache.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/LRUCache.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: LRUCache.java,v 1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: LRUCache.java,v 1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.am b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.am
index 7dd8b60..cbe0385 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.am
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -86,12 +86,8 @@ in3files = \
 	CallableStatementWrapper.java \
 	Closeable.java \
 	ConnectionWrapper.java \
-	DatabaseMetaDataWrapper.java \
-	ParameterMetaDataWrapper.java \
 	PreparedStatementWrapper.java \
-	ResultSetMetaDataWrapper.java \
 	ResultSetWrapper.java \
-	SavepointWrapper.java \
 	StatementWrapper.java \
 	VirtuosoConnectionPoolDataSource.java \
 	VirtuosoDataSource.java \
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.in b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.in
index 37e0405..28c5ab6 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.in
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -103,6 +103,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -151,6 +152,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -202,6 +204,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -248,7 +251,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -324,12 +326,8 @@ in3files = \
 	CallableStatementWrapper.java \
 	Closeable.java \
 	ConnectionWrapper.java \
-	DatabaseMetaDataWrapper.java \
-	ParameterMetaDataWrapper.java \
 	PreparedStatementWrapper.java \
-	ResultSetMetaDataWrapper.java \
 	ResultSetWrapper.java \
-	SavepointWrapper.java \
 	StatementWrapper.java \
 	VirtuosoConnectionPoolDataSource.java \
 	VirtuosoDataSource.java \
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ParameterMetaDataWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/ParameterMetaDataWrapper.java
deleted file mode 100644
index 48dc323..0000000
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ParameterMetaDataWrapper.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *  $Id: ParameterMetaDataWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2009 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.jdbc2;
-
-import java.sql.ParameterMetaData;
-import java.sql.SQLException;
-import java.sql.ParameterMetaData;
-import java.sql.Types;
-
-public class ParameterMetaDataWrapper implements ParameterMetaData {
-
-  private ParameterMetaData wmd;
-  private ConnectionWrapper wconn;
-
-  protected ParameterMetaDataWrapper(ParameterMetaData _prmd,
-  	ConnectionWrapper _wconn)
-  {
-    wmd = _prmd;
-    wconn = _wconn;
-  }
-
-
-  private void exceptionOccurred(SQLException sqlEx) {
-    if (wconn != null)
-      wconn.exceptionOccurred(sqlEx);
-  }
-
-
-  public synchronized void finalize () throws Throwable {
-    close();
-  }
-
-  protected void close() throws SQLException {
-    if (wmd == null)
-      return;
-    wmd = null;
-    wconn = null;
-  }
-
-  public int getParameterCount() throws java.sql.SQLException {
-    try {
-      return wmd.getParameterCount();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public int isNullable(int param) throws java.sql.SQLException {
-    try {
-      return wmd.isNullable(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public boolean isSigned(int param) throws java.sql.SQLException {
-    try {
-      return wmd.isSigned(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public int getPrecision(int param) throws java.sql.SQLException {
-    try {
-      return wmd.getPrecision(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public int getScale(int param) throws java.sql.SQLException {
-    try {
-      return wmd.getScale(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public int getParameterType(int param) throws java.sql.SQLException {
-    try {
-      return wmd.getParameterType(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public String getParameterTypeName(int param) throws java.sql.SQLException {
-    try {
-      return wmd.getParameterTypeName(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public String getParameterClassName(int param) throws java.sql.SQLException {
-    try {
-      return wmd.getParameterClassName(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public int getParameterMode(int param) throws java.sql.SQLException {
-    try {
-      return wmd.getParameterMode(param);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-#if JDK_VER >= 16
-  public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
-  {
-    try {
-      return wmd.unwrap(iface);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
-  {
-    try {
-      return wmd.isWrapperFor(iface);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-#endif
-
-}
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/PreparedStatementWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/PreparedStatementWrapper.java
index cd3f1ca..b1b4c61 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/PreparedStatementWrapper.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/PreparedStatementWrapper.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: PreparedStatementWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: PreparedStatementWrapper.java,v 1.2.2.5 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -425,11 +425,7 @@ public class PreparedStatementWrapper
   public ResultSetMetaData getMetaData() throws SQLException {
     check_close();
     try {
-      ResultSetMetaData rsmd = ((PreparedStatement)stmt).getMetaData();
-      if (rsmd != null)
-        return new ResultSetMetaDataWrapper(rsmd, wconn);
-      else
-        return null;
+      return ((PreparedStatement)stmt).getMetaData();
     } catch (SQLException ex) {
       exceptionOccurred(ex);
       throw ex;
@@ -492,11 +488,7 @@ public class PreparedStatementWrapper
   public java.sql.ParameterMetaData getParameterMetaData() throws SQLException {
     check_close();
     try {
-      java.sql.ParameterMetaData prmd = ((PreparedStatement)stmt).getParameterMetaData();
-      if (prmd != null)
-        return new ParameterMetaDataWrapper(prmd, wconn);
-      else
-        return null;
+      return ((PreparedStatement)stmt).getParameterMetaData();
     } catch (SQLException ex) {
       exceptionOccurred(ex);
       throw ex;
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetMetaDataWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetMetaDataWrapper.java
deleted file mode 100644
index 7aa62ea..0000000
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetMetaDataWrapper.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- *  $Id: ResultSetMetaDataWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2009 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.jdbc2;
-
-import java.sql.*;
-
-
-public class ResultSetMetaDataWrapper implements ResultSetMetaData {
-
-  private ResultSetMetaData wmd;
-  private ConnectionWrapper wconn;
-
-  protected ResultSetMetaDataWrapper(ResultSetMetaData _rmd,
-  	ConnectionWrapper _wconn)
-  {
-    wmd = _rmd;
-    wconn = _wconn;
-  }
-
-
-  private void exceptionOccurred(SQLException sqlEx) {
-    if (wconn != null)
-      wconn.exceptionOccurred(sqlEx);
-  }
-
-
-  public synchronized void finalize () throws Throwable {
-    close();
-  }
-
-  protected void close() throws SQLException {
-    if (wmd == null)
-      return;
-    wmd = null;
-    wconn = null;
-  }
-
-
-  public int getColumnCount() throws SQLException {
-    try {
-      return wmd.getColumnCount();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public boolean isAutoIncrement(int column) throws SQLException {
-    try {
-      return wmd.isAutoIncrement(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isCaseSensitive(int column) throws SQLException {
-    try {
-      return wmd.isCaseSensitive(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isSearchable(int column) throws SQLException {
-    try {
-      return wmd.isSearchable(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isCurrency(int column) throws SQLException {
-    try {
-      return wmd.isCurrency(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int isNullable(int column) throws SQLException {
-    try {
-      return wmd.isNullable(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isSigned(int column) throws SQLException {
-    try {
-      return wmd.isSigned(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getColumnDisplaySize(int column) throws SQLException {
-    try {
-      return wmd.getColumnDisplaySize(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getColumnLabel(int column) throws SQLException {
-    try {
-      return wmd.getColumnLabel(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getColumnName(int column) throws SQLException {
-    try {
-      return wmd.getColumnName(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getSchemaName(int column) throws SQLException {
-    try {
-      return wmd.getSchemaName(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getPrecision(int column) throws SQLException {
-    try {
-      return wmd.getPrecision(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getScale(int column) throws SQLException {
-    try {
-      return wmd.getScale(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getTableName(int column) throws SQLException {
-    try {
-      return wmd.getTableName(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getCatalogName(int column) throws SQLException {
-    try {
-      return wmd.getCatalogName(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public int getColumnType(int column) throws SQLException {
-    try {
-      return wmd.getColumnType(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public String getColumnTypeName(int column) throws SQLException {
-    try {
-      return wmd.getColumnTypeName(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isReadOnly(int column) throws SQLException {
-    try {
-      return wmd.isReadOnly(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isWritable(int column) throws SQLException {
-    try {
-      return wmd.isWritable(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isDefinitelyWritable(int column) throws SQLException {
-    try {
-      return wmd.isDefinitelyWritable(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-    //--------------------------JDBC 2.0-----------------------------------
-  public String getColumnClassName(int column) throws SQLException {
-    try {
-      return wmd.getColumnClassName(column);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-#if JDK_VER >= 16
-  public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
-  {
-    try {
-      return wmd.unwrap(iface);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-  public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
-  {
-    try {
-      return wmd.isWrapperFor(iface);
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-#endif
-
-}
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetWrapper.java
index 080744e..93c87a2 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetWrapper.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/ResultSetWrapper.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: ResultSetWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: ResultSetWrapper.java,v 1.2.2.4 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -85,7 +85,10 @@ public class ResultSetWrapper implements ResultSet, Closeable {
       if (wstmt == null) //DBMetaDataResultSet
         wconn.removeObjFromClose(this);
       else
-        wstmt.removeObjFromClose(this);
+        {
+          wstmt.removeObjFromClose(this);
+          wstmt.close();
+        }
       rs = null;
       wstmt = null;
       wconn = null;
@@ -468,11 +471,7 @@ public class ResultSetWrapper implements ResultSet, Closeable {
   public ResultSetMetaData getMetaData() throws SQLException {
     check_close();
     try {
-      ResultSetMetaData rsmd = rs.getMetaData();
-      if (rsmd != null)
-        return new ResultSetMetaDataWrapper(rsmd, wconn);
-      else
-        return null;
+      return rs.getMetaData();
     } catch (SQLException ex) {
       exceptionOccurred(ex);
       throw ex;
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/SavepointWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/SavepointWrapper.java
deleted file mode 100644
index 33e9faa..0000000
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/SavepointWrapper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  $Id: SavepointWrapper.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
- *
- *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- *  project.
- *
- *  Copyright (C) 1998-2009 OpenLink Software
- *
- *  This project 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; only version 2 of the License, dated June 1991.
- *
- *  This program 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
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-package virtuoso.jdbc2;
-
-import java.sql.Savepoint;
-import java.sql.SQLException;
-
-public class SavepointWrapper implements Savepoint {
-
-  private Savepoint wsp;
-  private ConnectionWrapper wconn;
-
-  protected SavepointWrapper(Savepoint _sp, ConnectionWrapper _wconn) {
-    wsp = _sp;
-    wconn = _wconn;
-  }
-
-
-  private void exceptionOccurred(SQLException sqlEx) {
-    if (wconn != null)
-      wconn.exceptionOccurred(sqlEx);
-  }
-
-
-  public int getSavepointId() throws java.sql.SQLException {
-    try {
-      return wsp.getSavepointId();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-
-  public String getSavepointName() throws java.sql.SQLException {
-    try {
-      return wsp.getSavepointName();
-    } catch (SQLException ex) {
-      exceptionOccurred(ex);
-      throw ex;
-    }
-  }
-
-}
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/StatementWrapper.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/StatementWrapper.java
index b4da882..3e96291 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/StatementWrapper.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/StatementWrapper.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: StatementWrapper.java,v 1.2.2.3 2009/09/18 16:12:13 source Exp $
+ *  $Id: StatementWrapper.java,v 1.2.2.4 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Types.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Types.java
index 5058d7e..8186c33 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/Types.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/Types.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: Types.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: Types.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoAsciiInputStream.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoAsciiInputStream.java
index c5adcc1..9de29e6 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoAsciiInputStream.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoAsciiInputStream.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoAsciiInputStream.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoAsciiInputStream.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlob.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlob.java
index de2c9ce..845a802 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlob.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlob.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoBlob.java,v 1.3.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoBlob.java,v 1.3.2.3 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlobStream.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlobStream.java
index af5b15a..a33bc14 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlobStream.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoBlobStream.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoBlobStream.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoBlobStream.java,v 1.1.1.1.2.2 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoCallableStatement.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoCallableStatement.java
index 4008a67..f399482 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoCallableStatement.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoCallableStatement.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoCallableStatement.java,v 1.2.2.4 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoCallableStatement.java,v 1.2.2.5 2012/03/08 12:55:31 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClob.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClob.java
index f1a7fdf..b1af1ec 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClob.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClob.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoClob.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoClob.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobCharStream.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobCharStream.java
index 3a5eae1..e6f5d7b 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobCharStream.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobCharStream.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoClobCharStream.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoClobCharStream.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobStream.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobStream.java
index ccc81b6..e8bf15f 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobStream.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoClobStream.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoClobStream.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoClobStream.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoColumn.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoColumn.java
index 28ffd25..049fbac 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoColumn.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoColumn.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoColumn.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoColumn.java,v 1.2.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnection.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnection.java
index 0a55932..b8d5f7e 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnection.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnection.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoConnection.java,v 1.9.2.12 2010/09/27 14:37:00 source Exp $
+ *  $Id: VirtuosoConnection.java,v 1.9.2.14 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1632,7 +1632,7 @@ public class VirtuosoConnection implements Connection
    protected byte[] charsetBytes1(String source, String from, String to) throws VirtuosoException
     {
        byte ans[] = new byte[0];
-       System.err.println ("charsetBytes1(" + from + " , " + to);
+       //System.err.println ("charsetBytes1(" + from + " , " + to);
        //System.err.println ("charsetBytes1 src len=" + source.length());
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream( source.length() );
        try
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnectionPoolDataSource.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnectionPoolDataSource.java
index ced8158..4f45bd8 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnectionPoolDataSource.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoConnectionPoolDataSource.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoConnectionPoolDataSource.java,v 1.1.1.1.2.5 2010/03/08 20:39:36 source Exp $
+ *  $Id: VirtuosoConnectionPoolDataSource.java,v 1.1.1.1.2.7 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -575,7 +575,7 @@ public class VirtuosoConnectionPoolDataSource
     }
 
     public void run() {
-      if (connPool.cacheSize >= count || (maxPoolSize != 0 && connPool.cacheSize > maxPoolSize))
+      if (connPool.cacheSize >= count || (maxPoolSize != 0 && connPool.cacheSize >= maxPoolSize))
         return;
 
       for(int i = 0; i < count; i++)
@@ -747,9 +747,11 @@ public class VirtuosoConnectionPoolDataSource
           if (pooledConn.hashConnURL == _hashKey && pooledConn.connURL.equals(_Key)) {
             iterator.remove();
 	    if (pooledConn.isConnectionLost()) {
-              if (cacheSize > 1) 
-                --cacheSize;
-              closeTmp.add(pooledConn);
+	      synchronized(this) {              
+                if (cacheSize > 1) 
+                  --cacheSize;
+                closeTmp.add(pooledConn);
+              }
 	    } else {
               return pooledConn;
 	    }
@@ -786,48 +788,49 @@ public class VirtuosoConnectionPoolDataSource
         }
       }
     // if couldn't found an unused Connection
-      if (maxPoolSize == 0 || cacheSize < maxPoolSize) {
-       // establish a new Connection
-        synchronized(this) {
+      synchronized(this) { 
+        if (maxPoolSize == 0 || cacheSize < maxPoolSize) {
+         // establish a new Connection
           conn = new VirtuosoConnection (conn_url, "localhost", 1111, info);
           cacheSize++;
           pconn = new VirtuosoPooledConnection(conn, connKey, cpds);
           in_Use.put(pconn, pconn);
+          return pconn;
         }
-        return pconn;
 
-      } else {
+      } 
+
       // wait a free Connection
-        long start = System.currentTimeMillis();
-        long _timeout = loginTimeout * 1000L;
-        Thread thr = Thread.currentThread();
-        while (pconn == null) {
-//      System.out.println("Thread "+thr+" begin a waiting...");
-          synchronized(this) {
-            if (!unUsed.isEmpty() && (pconn = lookup(connKey)) != null) {
-//            System.out.println("Thread "+thr+" has found a free connection");
-              pconn.init(cpds);
-              in_Use.put(pconn, pconn);
-              return pconn;
-            }
+      long start = System.currentTimeMillis();
+      long _timeout = loginTimeout * 1000L;
+      Thread thr = Thread.currentThread();
+      while (pconn == null) {
+//    System.out.println("Thread "+thr+" begin a waiting...");
+        synchronized(this) {
+          if (!unUsed.isEmpty() && (pconn = lookup(connKey)) != null) {
+//          System.out.println("Thread "+thr+" has found a free connection");
+            pconn.init(cpds);
+            in_Use.put(pconn, pconn);
+            return pconn;
+          }
 
-            try {
-              if (loginTimeout > 0) {
-                wait(_timeout);
-                _timeout -= (System.currentTimeMillis() - start);
-                if (_timeout < 0) {
-//                System.out.println("Thread "+thr+" : loginTimeout has expired");
-                  throw new VirtuosoException("Connection failed loginTimeout has expired", VirtuosoException.TIMEOUT);
-                }
-              } else {
-                wait();
+          try {
+            if (loginTimeout > 0) {
+              wait(_timeout);
+              _timeout -= (System.currentTimeMillis() - start);
+              if (_timeout < 0) {
+//              System.out.println("Thread "+thr+" : loginTimeout has expired");
+                throw new VirtuosoException("Connection failed loginTimeout has expired", VirtuosoException.TIMEOUT);
               }
-//            System.out.println("Thread "+thr+" has woken ");
-            } catch (InterruptedException e) {
+            } else {
+              wait();
             }
+//          System.out.println("Thread "+thr+" has woken ");
+          } catch (InterruptedException e) {
           }
         }
       }
+
       return null;
     }
 
@@ -857,9 +860,9 @@ public class VirtuosoConnectionPoolDataSource
         }
       }
 
-      if (maxPoolSize != 0 && cacheSize > maxPoolSize) {
-       //remove connections
-        synchronized(this) {
+      synchronized(this) {
+        if (maxPoolSize != 0 && cacheSize > maxPoolSize) {
+         //remove connections
           int count = cacheSize - maxPoolSize;
           for(l_iter = unUsed.listIterator(); l_iter.hasNext() && count > 0; count--) {
             closeTmp.add(l_iter.next());
@@ -875,12 +878,14 @@ public class VirtuosoConnectionPoolDataSource
         helpThread.start();
       }
 
-      if (minPoolSize != 0 && cacheSize < minPoolSize) {
-       //add connections
-        Properties info = createConnProperties();
-        int count = minPoolSize - cacheSize;
-        OpenHelper helpThread = new OpenHelper(count, info);
-        helpThread.start();
+      synchronized(this) {
+        if (minPoolSize != 0 && cacheSize < minPoolSize) {
+         //add connections
+          Properties info = createConnProperties();
+          int count = minPoolSize - cacheSize;
+          OpenHelper helpThread = new OpenHelper(count, info);
+          helpThread.start();
+        }
       }
     }
 
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSource.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSource.java
index 48e1585..3c9e3fe 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSource.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSource.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoDataSource.java,v 1.2.2.2 2009/08/21 11:36:14 source Exp $
+ *  $Id: VirtuosoDataSource.java,v 1.2.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSourceFactory.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSourceFactory.java
index 1589c92..8b82bc5 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSourceFactory.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDataSourceFactory.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoDataSourceFactory.java,v 1.1.2.2 2009/08/21 11:36:14 source Exp $
+ *  $Id: VirtuosoDataSourceFactory.java,v 1.1.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDatabaseMetaData.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDatabaseMetaData.java
index 88813fd..74e4164 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDatabaseMetaData.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoDatabaseMetaData.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoDatabaseMetaData.java,v 1.3.2.4 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoDatabaseMetaData.java,v 1.3.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoException.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoException.java
index 25646d0..dea0fd7 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoException.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoException.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoException.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoException.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExplicitString.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExplicitString.java
index a95edea..8dbfe80 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExplicitString.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExplicitString.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoExplicitString.java,v 1.4.2.3 2011/03/23 12:01:46 source Exp $
+ *  $Id: VirtuosoExplicitString.java,v 1.4.2.4 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExtendedString.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExtendedString.java
index 14d4364..d26bbf9 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExtendedString.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoExtendedString.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoExtendedString.java,v 1.3.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoExtendedString.java,v 1.3.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFNSException.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFNSException.java
index 87f6af1..7b72e7f 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFNSException.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFNSException.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoFNSException.java,v 1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoFNSException.java,v 1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFuture.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFuture.java
index 923e1a9..0976090 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFuture.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoFuture.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoFuture.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoFuture.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoInputStream.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoInputStream.java
index a6bff7f..280b530 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoInputStream.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoInputStream.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoInputStream.java,v 1.9.2.2 2010/05/29 12:22:05 source Exp $
+ *  $Id: VirtuosoInputStream.java,v 1.9.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoNullParameter.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoNullParameter.java
index 5a3c981..e647926 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoNullParameter.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoNullParameter.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoNullParameter.java,v 1.1.1.1.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoNullParameter.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoOutputStream.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoOutputStream.java
index 86eb87f..ad37bad 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoOutputStream.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoOutputStream.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoOutputStream.java,v 1.7.2.3 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoOutputStream.java,v 1.7.2.4 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoParameterMetaData.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoParameterMetaData.java
index 38e8e61..8dace50 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoParameterMetaData.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoParameterMetaData.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoParameterMetaData.java,v 1.2.2.1 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoParameterMetaData.java,v 1.2.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPoolManager.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPoolManager.java
index bfa6eb9..933ef3a 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPoolManager.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPoolManager.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoPoolManager.java,v 1.2.2.2 2009/08/20 20:13:28 source Exp $
+ *  $Id: VirtuosoPoolManager.java,v 1.2.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPooledConnection.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPooledConnection.java
index 754237b..93274da 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPooledConnection.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPooledConnection.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoPooledConnection.java,v 1.2.2.7 2011/02/18 10:25:13 source Exp $
+ *  $Id: VirtuosoPooledConnection.java,v 1.2.2.8 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPreparedStatement.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPreparedStatement.java
index e5c8848..38af975 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPreparedStatement.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoPreparedStatement.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoPreparedStatement.java,v 1.6.2.7 2011/03/23 12:01:46 source Exp $
+ *  $Id: VirtuosoPreparedStatement.java,v 1.6.2.9 2012/03/15 11:17:00 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -340,7 +340,8 @@ public class VirtuosoPreparedStatement extends VirtuosoStatement implements Prep
 	     // Build the args array
 	     Object[] args = new Object[2];
 	     args[0] = statid;
-	     args[1] = new Long(VirtuosoTypes.STAT_CLOSE);
+//	     args[1] = new Long(VirtuosoTypes.STAT_CLOSE);
+	     args[1] = new Long(VirtuosoTypes.STAT_DROP);
 	     // Create and get a future for this
 	     future = connection.getFuture(VirtuosoFuture.close,args, this.rpc_timeout);
 	     // Read the answer
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRdfBox.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRdfBox.java
index 054059f..7b6e76b 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRdfBox.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRdfBox.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRdfBox.java,v 1.2.2.4 2010/07/09 14:22:28 source Exp $
+ *  $Id: VirtuosoRdfBox.java,v 1.2.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSet.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSet.java
index 9eb369e..c605b2d 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSet.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSet.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoResultSet.java,v 1.4.2.8 2010/11/22 11:27:19 source Exp $
+ *  $Id: VirtuosoResultSet.java,v 1.4.2.9 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSetMetaData.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSetMetaData.java
index 6ccdcc8..b8b70dc 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSetMetaData.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoResultSetMetaData.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoResultSetMetaData.java,v 1.2.2.3 2009/08/21 11:36:14 source Exp $
+ *  $Id: VirtuosoResultSetMetaData.java,v 1.2.2.4 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRow.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRow.java
index 73439d7..6c521d8 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRow.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoRow.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoRow.java,v 1.1.1.1.2.3 2009/08/21 11:36:14 source Exp $
+ *  $Id: VirtuosoRow.java,v 1.1.1.1.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -740,6 +740,20 @@ class VirtuosoRow
 		     return (new java.sql.Time (ts.getTime())).toString();
 	       }
 	   }
+	 else if (obj instanceof VirtuosoBlob)
+	   {
+	     try {
+	       Reader r = ((VirtuosoBlob)obj).getCharacterStream();
+	       char[] data = new char[1024];
+	       StringWriter w =  new StringWriter();
+	       int l;
+	       while((l = r.read(data)) != -1)
+	         w.write(data,0,l);
+	       return w.toString();
+	     } catch (IOException e) {
+	       throw new VirtuosoException(e, VirtuosoException.MISCERROR);
+	     }
+	   }
          return obj.toString();
       }
       resultSet.wasNull(true);
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoStatement.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoStatement.java
index dc1fd40..07472f5 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoStatement.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoStatement.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoStatement.java,v 1.5.2.5 2010/11/22 11:27:19 source Exp $
+ *  $Id: VirtuosoStatement.java,v 1.5.2.6 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoString.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoString.java
index aaf3694..0d40f1f 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoString.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoString.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoString.java,v 1.1.1.1.2.1 2009/08/20 20:13:29 source Exp $
+ *  $Id: VirtuosoString.java,v 1.1.1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoTypes.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoTypes.java
index b591634..3445987 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoTypes.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoTypes.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoTypes.java,v 1.6.2.4 2011/03/23 12:01:46 source Exp $
+ *  $Id: VirtuosoTypes.java,v 1.6.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAConnection.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAConnection.java
index a242a14..43324bc 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAConnection.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAConnection.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoXAConnection.java,v 1.1.1.1.2.2 2009/09/17 14:26:37 source Exp $
+ *  $Id: VirtuosoXAConnection.java,v 1.1.1.1.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXADataSource.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXADataSource.java
index 8515992..a8cb12e 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXADataSource.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXADataSource.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoXADataSource.java,v 1.1.1.1.2.2 2009/08/21 11:36:14 source Exp $
+ *  $Id: VirtuosoXADataSource.java,v 1.1.1.1.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAResource.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAResource.java
index 0bc4a50..055a8a3 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAResource.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXAResource.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoXAResource.java,v 1.1.1.1.2.8 2010/03/04 12:18:04 source Exp $
+ *  $Id: VirtuosoXAResource.java,v 1.1.1.1.2.9 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXid.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXid.java
index 2d86c03..f1acded 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXid.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/VirtuosoXid.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: VirtuosoXid.java,v 1.1.1.1.2.3 2009/09/17 14:26:37 source Exp $
+ *  $Id: VirtuosoXid.java,v 1.1.1.1.2.4 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/XAResourceManager.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/XAResourceManager.java
index f4bcebd..001c3d0 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/XAResourceManager.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/XAResourceManager.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: XAResourceManager.java,v 1.1.1.1.2.3 2009/11/05 19:49:53 source Exp $
+ *  $Id: XAResourceManager.java,v 1.1.1.1.2.4 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/jdbc2/XATransaction.java b/libsrc/JDBCDriverType4/virtuoso/jdbc2/XATransaction.java
index 0b5b30e..1851366 100644
--- a/libsrc/JDBCDriverType4/virtuoso/jdbc2/XATransaction.java
+++ b/libsrc/JDBCDriverType4/virtuoso/jdbc2/XATransaction.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: XATransaction.java,v 1.1.1.1.2.5 2010/03/26 19:48:17 source Exp $
+ *  $Id: XATransaction.java,v 1.1.1.1.2.6 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/sql/ExtendedString.java b/libsrc/JDBCDriverType4/virtuoso/sql/ExtendedString.java
index 85ffcd2..3b565c8 100644
--- a/libsrc/JDBCDriverType4/virtuoso/sql/ExtendedString.java
+++ b/libsrc/JDBCDriverType4/virtuoso/sql/ExtendedString.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: ExtendedString.java,v 1.1.2.1 2009/08/20 20:13:29 source Exp $
+ *  $Id: ExtendedString.java,v 1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/JDBCDriverType4/virtuoso/sql/RdfBox.java b/libsrc/JDBCDriverType4/virtuoso/sql/RdfBox.java
index 02dda3b..6e2d2bc 100644
--- a/libsrc/JDBCDriverType4/virtuoso/sql/RdfBox.java
+++ b/libsrc/JDBCDriverType4/virtuoso/sql/RdfBox.java
@@ -1,10 +1,10 @@
 /*
- *  $Id: RdfBox.java,v 1.1.2.1 2009/08/20 20:13:29 source Exp $
+ *  $Id: RdfBox.java,v 1.1.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Makefile.am b/libsrc/Makefile.am
index 3f61ce4..7f264ab 100644
--- a/libsrc/Makefile.am
+++ b/libsrc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Makefile.in b/libsrc/Makefile.in
index ca8ebb9..b2970c4 100644
--- a/libsrc/Makefile.in
+++ b/libsrc/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -142,6 +142,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -190,6 +191,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -241,6 +243,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -287,7 +290,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/Thread/Dkthread.h b/libsrc/Thread/Dkthread.h
index 3b4c311..426a3eb 100644
--- a/libsrc/Thread/Dkthread.h
+++ b/libsrc/Thread/Dkthread.h
@@ -1,14 +1,14 @@
 /*
  *  Dkthread.h
  *
- *  $Id: Dkthread.h,v 1.7 2008/04/02 10:13:42 source Exp $
+ *  $Id: Dkthread.h,v 1.7.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Threads, Mutexes and Semaphores
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/Makefile.am b/libsrc/Thread/Makefile.am
index a08cb56..f55d2f9 100644
--- a/libsrc/Thread/Makefile.am
+++ b/libsrc/Thread/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/Makefile.in b/libsrc/Thread/Makefile.in
index b94aeb8..d403ee7 100644
--- a/libsrc/Thread/Makefile.in
+++ b/libsrc/Thread/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -150,6 +150,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -198,6 +199,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -249,6 +251,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -295,7 +298,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/Thread/fiber1_generic.c b/libsrc/Thread/fiber1_generic.c
index ff02eae..72ba4a8 100644
--- a/libsrc/Thread/fiber1_generic.c
+++ b/libsrc/Thread/fiber1_generic.c
@@ -1,7 +1,7 @@
 /*
  *  fiber1_generic.c
  *
- *  $Id: fiber1_generic.c,v 1.2 2008/07/11 11:44:32 source Exp $
+ *  $Id: fiber1_generic.c,v 1.2.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  _fiber_boot and _fiber_switch
  *  Implementations for simulated threads
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/fiber1_win32.c b/libsrc/Thread/fiber1_win32.c
index f27b1c2..319c3c9 100644
--- a/libsrc/Thread/fiber1_win32.c
+++ b/libsrc/Thread/fiber1_win32.c
@@ -1,7 +1,7 @@
 /*
  *  fiber1_win32.c
  *
- *  $Id: fiber1_win32.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fiber1_win32.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Win32 Native implementation for fibers
  *  Use this instead of fiber[12]_generic.c
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/fiber2_generic.c b/libsrc/Thread/fiber2_generic.c
index 5c76299..f318a01 100644
--- a/libsrc/Thread/fiber2_generic.c
+++ b/libsrc/Thread/fiber2_generic.c
@@ -1,7 +1,7 @@
 /*
  *  fiber2_generic.c
  *
- *  $Id: fiber2_generic.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fiber2_generic.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  _fiber_for_thread and spinlocks
  *  Implementation for simulated threads
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/fiber_unix.c b/libsrc/Thread/fiber_unix.c
index 71b6e6a..e6815f4 100644
--- a/libsrc/Thread/fiber_unix.c
+++ b/libsrc/Thread/fiber_unix.c
@@ -1,14 +1,14 @@
 /*
  *  fiber_unix.c
  *
- *  $Id: fiber_unix.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fiber_unix.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Fiber Event Loop (Unix implementation)
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/fiber_win32.c b/libsrc/Thread/fiber_win32.c
index 59b3d0f..f6dac07 100644
--- a/libsrc/Thread/fiber_win32.c
+++ b/libsrc/Thread/fiber_win32.c
@@ -1,14 +1,14 @@
 /*
  *  fiber_win32.c
  *
- *  $Id: fiber_win32.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fiber_win32.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Fiber Event Loop (Win32 implementation)
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/io_unix.c b/libsrc/Thread/io_unix.c
index d3a5eb4..ff1f137 100644
--- a/libsrc/Thread/io_unix.c
+++ b/libsrc/Thread/io_unix.c
@@ -1,14 +1,14 @@
 /*
  *  io_unix.c
  *
- *  $Id: io_unix.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: io_unix.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Unix specific I/O for fibers
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/mtest.c b/libsrc/Thread/mtest.c
index c627d02..3d3db21 100644
--- a/libsrc/Thread/mtest.c
+++ b/libsrc/Thread/mtest.c
@@ -1,14 +1,14 @@
 /*
  *  mtest.c
  *
- *  $Id: mtest.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: mtest.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Fiber test program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/mtest1.c b/libsrc/Thread/mtest1.c
index e4f0caf..760e9fa 100644
--- a/libsrc/Thread/mtest1.c
+++ b/libsrc/Thread/mtest1.c
@@ -1,14 +1,14 @@
 /*
  *  mtest1.c
  *
- *  $Id: mtest1.c,v 1.2 2009/03/19 10:12:21 source Exp $
+ *  $Id: mtest1.c,v 1.2.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Fiber test program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/mtest2.c b/libsrc/Thread/mtest2.c
index c9b4d34..48b9904 100644
--- a/libsrc/Thread/mtest2.c
+++ b/libsrc/Thread/mtest2.c
@@ -1,14 +1,14 @@
 /*
  *  mtest1.c
  *
- *  $Id: mtest2.c,v 1.2 2009/03/19 10:12:21 source Exp $
+ *  $Id: mtest2.c,v 1.2.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Fiber test program
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/sched_fiber.c b/libsrc/Thread/sched_fiber.c
index 6cf88ef..0a9ef36 100644
--- a/libsrc/Thread/sched_fiber.c
+++ b/libsrc/Thread/sched_fiber.c
@@ -1,14 +1,14 @@
 /*
  *  sched_fiber.c
  *
- *  $Id: sched_fiber.c,v 1.3 2008/01/18 14:03:32 source Exp $
+ *  $Id: sched_fiber.c,v 1.3.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Simulated threads, using fibers
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/sched_pthread.c b/libsrc/Thread/sched_pthread.c
index 99afa2d..2800747 100644
--- a/libsrc/Thread/sched_pthread.c
+++ b/libsrc/Thread/sched_pthread.c
@@ -1,14 +1,14 @@
 /*
  *  sched_pthread.c
  *
- *  $Id: sched_pthread.c,v 1.8.2.3 2009/07/16 19:51:19 source Exp $
+ *  $Id: sched_pthread.c,v 1.8.2.6 2012/03/12 14:28:38 source Exp $
  *
  *  Scheduler for pthreads
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -883,6 +883,11 @@ semaphore_allocate (int entry_count)
 
   sem->sem_entry_count = entry_count;
   sem->sem_handle = (void *) ptm;
+#ifdef SEM_NO_ORDER
+  sem->sem_cv = _alloc_cv ();
+  if (!sem->sem_cv) goto failed;
+  sem->sem_any_signalled = 0;
+#endif
   thread_queue_init (&sem->sem_waiting);
   return sem;
 
@@ -898,6 +903,9 @@ semaphore_free (semaphore_t *sem)
 {
   pthread_mutex_destroy ((pthread_mutex_t*) sem->sem_handle);
   dk_free (sem->sem_handle, sizeof (pthread_mutex_t));
+#ifdef SEM_NO_ORDER
+  dk_free (sem->sem_cv, sizeof (pthread_cond_t));
+#endif
   dk_free (sem, sizeof (semaphore_t));
 }
 
@@ -915,6 +923,7 @@ semaphore_enter (semaphore_t * sem)
     sem->sem_entry_count--;
   else
     {
+#ifndef SEM_NO_ORDER
       thread_queue_to (&sem->sem_waiting, thr);
       _thread_num_wait++;
       thr->thr_status = WAITSEM;
@@ -923,6 +932,20 @@ semaphore_enter (semaphore_t * sem)
 	  rc = pthread_cond_wait ((pthread_cond_t *) thr->thr_cv, (pthread_mutex_t*) sem->sem_handle);
 	  CKRET (rc);
 	} while (thr->thr_status == WAITSEM);
+#else      
+      thread_queue_to (&sem->sem_waiting, thr);
+      _thread_num_wait++;
+      thr->thr_status = WAITSEM;
+      do 
+	{
+	  rc = pthread_cond_wait ((pthread_cond_t *) sem->sem_cv, (pthread_mutex_t*) sem->sem_handle);
+	  CKRET (rc);
+	}
+      while (!sem->sem_any_signalled);
+      thr->thr_status = RUNNING;
+      sem->sem_any_signalled = 0;
+      thread_queue_remove (&sem->sem_waiting, thr);
+#endif
     }
 
   pthread_mutex_unlock ((pthread_mutex_t*) sem->sem_handle);
@@ -988,6 +1011,7 @@ semaphore_leave (semaphore_t *sem)
     sem->sem_entry_count++;
   else
     {
+#ifndef SEM_NO_ORDER
       thr = thread_queue_from (&sem->sem_waiting);
       if (thr)
 	{
@@ -998,6 +1022,16 @@ semaphore_leave (semaphore_t *sem)
 	}
       else
 	sem->sem_entry_count++;
+#else
+      if (sem->sem_waiting.thq_count)
+	{
+	  _thread_num_wait--;
+	  sem->sem_any_signalled = 1;
+	  pthread_cond_signal ((pthread_cond_t *) sem->sem_cv);
+	}
+      else
+	sem->sem_entry_count++;
+#endif
     }
 
   rc = pthread_mutex_unlock ((pthread_mutex_t*) sem->sem_handle);
@@ -1299,6 +1333,7 @@ mutex_enter (dk_mutex_t *mtx)
     rc = pthread_mutex_trylock ((pthread_mutex_t*) &mtx->mtx_mtx);
   if (TRYLOCK_SUCCESS != rc)
     {
+      long long wait_ts = rdtsc ();
       static int unnamed_waits;
 #if HAVE_SPINLOCK
       if (MUTEX_TYPE_SPIN == mtx->mtx_type)
@@ -1306,6 +1341,7 @@ mutex_enter (dk_mutex_t *mtx)
       else
 #endif
 	rc = pthread_mutex_lock ((pthread_mutex_t*) &mtx->mtx_mtx);
+      mtx->mtx_wait_clocks += rdtsc () - wait_ts;
       mtx->mtx_waits++;
       if (!mtx->mtx_name)
 	unnamed_waits++; /*for dbg breakpoint */
@@ -1421,8 +1457,8 @@ mutex_stat ()
       printf ("%s %p E: %ld W %ld  spinw: %ld spin: %d\n", mtx->mtx_name ? mtx->mtx_name : "<?>",  mtx,
 	      mtx->mtx_enters, mtx->mtx_waits, mtx->mtx_spin_waits, mtx->mtx_spins);
 #else
-      printf ("%s %p E: %ld W %ld \n", mtx->mtx_name ? mtx->mtx_name : "<?>",  mtx,
-	      mtx->mtx_enters, mtx->mtx_waits);
+      printf ("%s %p E: %ld W %ld wclk %ld \n", mtx->mtx_name ? mtx->mtx_name : "<?>",  mtx,
+	      mtx->mtx_enters, mtx->mtx_waits, mtx->mtx_wait_clocks);
 #endif
     }
   END_DO_SET();
diff --git a/libsrc/Thread/sched_pthread_gc.c b/libsrc/Thread/sched_pthread_gc.c
index b04bb52..cea6686 100644
--- a/libsrc/Thread/sched_pthread_gc.c
+++ b/libsrc/Thread/sched_pthread_gc.c
@@ -1,14 +1,14 @@
 /*
  *  sched_pthread_gc.c
  *
- *  $Id: sched_pthread_gc.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: sched_pthread_gc.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Scheduler for pthreads
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/sched_single.c b/libsrc/Thread/sched_single.c
index cdb8c28..b985328 100644
--- a/libsrc/Thread/sched_single.c
+++ b/libsrc/Thread/sched_single.c
@@ -1,14 +1,14 @@
 /*
  *  sched_dummy.c
  *
- *  $Id: sched_single.c,v 1.6 2008/07/11 11:44:32 source Exp $
+ *  $Id: sched_single.c,v 1.6.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Stubs for NO_THREAD implementation
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/sched_winthread.c b/libsrc/Thread/sched_winthread.c
index b22a32e..ab647ab 100644
--- a/libsrc/Thread/sched_winthread.c
+++ b/libsrc/Thread/sched_winthread.c
@@ -1,14 +1,14 @@
 /*
  *  sched_winthread.c
  *
- *  $Id: sched_winthread.c,v 1.3 2007/02/27 13:23:35 source Exp $
+ *  $Id: sched_winthread.c,v 1.3.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  Scheduler for Win32 threads
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -831,6 +831,7 @@ mutex_enter (dk_mutex_t *mtx)
     EnterCriticalSection(mtx->mtx_handle);
   _thread_num_wait--;
 #ifdef MTX_DEBUG
+  assert (mtx->mtx_owner == NULL);
   mtx->mtx_owner = thr;
   mtx->mtx_entry_file = file;
   mtx->mtx_entry_line = line;
@@ -840,30 +841,43 @@ mutex_enter (dk_mutex_t *mtx)
 
 
 int
-mutex_try_enter (dk_mutex_t *self)
+mutex_try_enter (dk_mutex_t *mtx)
 {
 #ifdef MTX_DEBUG
   thread_t* thr = thread_current();
 #endif
-  if (self->mtx_type == MUTEX_TYPE_LONG)
+  if (mtx->mtx_type == MUTEX_TYPE_LONG)
     {
-      if (WaitForSingleObject (self->mtx_handle, 0) == WAIT_TIMEOUT)
+      if (WaitForSingleObject (mtx->mtx_handle, 0) == WAIT_TIMEOUT)
+	return 0;
+    }
+  else
+    {
+      if (!TryEnterCriticalSection (mtx->mtx_handle))
 	return 0;
     }
-  EnterCriticalSection(self->mtx_handle);
 
 #ifdef MTX_DEBUG
-  self->mtx_owner = thr;
+  assert (mtx->mtx_owner == NULL);
+  mtx->mtx_owner = thr;
+  mtx->mtx_entry_file = __FILE__;
+  mtx->mtx_entry_line = __LINE__;
 #endif
   return 1;
 }
 
 
-void
-mutex_leave (dk_mutex_t *self)
+#ifdef MTX_DEBUG
+void mutex_leave_dbg (int line, char * file, dk_mutex_t *self)
+#else
+void mutex_leave (dk_mutex_t *self)
+#endif
 {
 #ifdef MTX_DEBUG
+  assert (self->mtx_owner == thread_current ());
   self->mtx_owner = NULL;
+  self->mtx_leave_line = line;
+  self->mtx_leave_file = file;
 #endif
   if (self->mtx_type == MUTEX_TYPE_LONG)
     ReleaseMutex (self->mtx_handle);
@@ -936,4 +950,10 @@ mutex_enter (dk_mutex_t * mtx)
 {
   return (mutex_enter_dbg (__LINE__, __FILE__, mtx));
 }
+#undef mutex_leave
+void
+mutex_leave (dk_mutex_t * mtx)
+{
+  mutex_leave_dbg (__LINE__, __FILE__, mtx);
+}
 #endif
diff --git a/libsrc/Thread/sched_winthread_gc.c b/libsrc/Thread/sched_winthread_gc.c
index 9723fe2..81045a0 100644
--- a/libsrc/Thread/sched_winthread_gc.c
+++ b/libsrc/Thread/sched_winthread_gc.c
@@ -1,14 +1,14 @@
 /*
  *  sched_pthread_gc.c
  *
- *  $Id: sched_winthread_gc.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: sched_winthread_gc.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Scheduler for pthreads
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/thread_attr.c b/libsrc/Thread/thread_attr.c
index 17745cf..53189a3 100644
--- a/libsrc/Thread/thread_attr.c
+++ b/libsrc/Thread/thread_attr.c
@@ -1,14 +1,14 @@
 /*
  *  thread_attr.c
  *
- *  $Id: thread_attr.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: thread_attr.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Manages thread local storage attributes
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/thread_int.h b/libsrc/Thread/thread_int.h
index a026d84..9bb31c3 100644
--- a/libsrc/Thread/thread_int.h
+++ b/libsrc/Thread/thread_int.h
@@ -1,14 +1,14 @@
 /*
  *  thread_int.h
  *
- *  $Id: thread_int.h,v 1.6.2.1 2010/11/09 11:01:45 source Exp $
+ *  $Id: thread_int.h,v 1.6.2.5 2012/03/12 14:28:38 source Exp $
  *
  *  Thread internals
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -38,6 +38,13 @@
 /*#include <Wi/statuslog.h>*/
 #undef _THREAD_INT_HS
 
+#if defined (__APPLE__)
+#include <AvailabilityMacros.h>
+
+# if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
+#  define SEM_NO_ORDER 1
+# endif
+#endif
 
 /* Default stack size for the main thread */
 #define MAIN_STACK_SIZE		800000
@@ -132,6 +139,7 @@ struct thread_s
   void *		thr_sql_scs;
   int                   thr_attached;
   caddr_t		thr_dbg;
+  struct lock_trx_s *	thr_lt; /* use to access lt during checkpoint wait */
 #ifndef NDEBUG
   void *		thr_pg_dbg;
 #endif  
@@ -177,6 +185,10 @@ struct semaphore_s
     /* simulated threads */
     int			sem_entry_count;
     thread_queue_t	sem_waiting;
+#ifdef SEM_NO_ORDER
+    void *		sem_cv;			/* condition variable */
+    int 		sem_any_signalled;
+#endif
 #ifdef SEM_DEBUG
     int			sem_last_left_line[MAX_SEM_ENT];
     char *		sem_last_left_file[MAX_SEM_ENT];
@@ -225,6 +237,7 @@ struct mutex_s
     long		mtx_spin_waits;
     long		mtx_waits;
     long		mtx_enters;
+    long long		mtx_wait_clocks;
 #endif
     int			mtx_type;
   };
diff --git a/libsrc/Thread/thread_queue.c b/libsrc/Thread/thread_queue.c
index eb291ed..101c04e 100644
--- a/libsrc/Thread/thread_queue.c
+++ b/libsrc/Thread/thread_queue.c
@@ -1,14 +1,14 @@
 /*
  *  threadqueue.c
  *
- *  $Id: thread_queue.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: thread_queue.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Thread Queues
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/thread_rwlock.c b/libsrc/Thread/thread_rwlock.c
index 896e9ac..175bf98 100644
--- a/libsrc/Thread/thread_rwlock.c
+++ b/libsrc/Thread/thread_rwlock.c
@@ -1,14 +1,14 @@
 /*
  *  thread_rwlock.c
  *
- *  $Id: thread_rwlock.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: thread_rwlock.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Read-write locks implementation
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/timer_queue.c b/libsrc/Thread/timer_queue.c
index 5fc579a..49e907d 100644
--- a/libsrc/Thread/timer_queue.c
+++ b/libsrc/Thread/timer_queue.c
@@ -1,14 +1,14 @@
 /*
  *  timer_queue.c
  *
- *  $Id: timer_queue.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: timer_queue.c,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Timers and Timer Queues
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/timer_queue.h b/libsrc/Thread/timer_queue.h
index d004996..f2874be 100644
--- a/libsrc/Thread/timer_queue.h
+++ b/libsrc/Thread/timer_queue.h
@@ -1,14 +1,14 @@
 /*
  *  timer_queue.h
  *
- *  $Id: timer_queue.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: timer_queue.h,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Timers and Timer Queues
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Thread/tvmac.h b/libsrc/Thread/tvmac.h
index 3419a8b..2398a43 100644
--- a/libsrc/Thread/tvmac.h
+++ b/libsrc/Thread/tvmac.h
@@ -1,14 +1,14 @@
 /*
  *  tvmac.c
  *
- *  $Id: tvmac.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: tvmac.h,v 1.1.1.1.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Macros for time structure manipulation
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Tidy/Makefile.am b/libsrc/Tidy/Makefile.am
index eb956b4..dee84a5 100644
--- a/libsrc/Tidy/Makefile.am
+++ b/libsrc/Tidy/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Tidy/Makefile.in b/libsrc/Tidy/Makefile.in
index c2ade91..a062888 100644
--- a/libsrc/Tidy/Makefile.in
+++ b/libsrc/Tidy/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2010 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -129,6 +129,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -177,6 +178,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -228,6 +230,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -274,7 +277,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/Wi/2pc.c b/libsrc/Wi/2pc.c
index 9967381..ff38be4 100644
--- a/libsrc/Wi/2pc.c
+++ b/libsrc/Wi/2pc.c
@@ -1,12 +1,12 @@
 /*
  *  2pc.c
  *
- *  $Id: 2pc.c,v 1.15.2.17 2010/10/05 09:39:17 source Exp $
+ *  $Id: 2pc.c,v 1.15.2.18 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/2pc.h b/libsrc/Wi/2pc.h
index 4a07adf..0e2528e 100644
--- a/libsrc/Wi/2pc.h
+++ b/libsrc/Wi/2pc.h
@@ -1,12 +1,12 @@
 /*
  *  2pc.h
  *
- *  $Id: 2pc.h,v 1.5.2.4 2010/03/04 16:39:40 source Exp $
+ *  $Id: 2pc.h,v 1.5.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/2pc.sql b/libsrc/Wi/2pc.sql
index 53354f2..f1eaac0 100644
--- a/libsrc/Wi/2pc.sql
+++ b/libsrc/Wi/2pc.sql
@@ -1,10 +1,10 @@
 --
---  $Id: 2pc.sql,v 1.3.2.2 2009/07/21 19:24:57 source Exp $
+--  $Id: 2pc.sql,v 1.3.2.3 2012/03/08 12:55:32 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/2pc_client.c b/libsrc/Wi/2pc_client.c
index 0a8a5ab..d5dd552 100644
--- a/libsrc/Wi/2pc_client.c
+++ b/libsrc/Wi/2pc_client.c
@@ -1,12 +1,12 @@
 /*
  *  2pc_client.c
  *
- *  $Id: 2pc_client.c,v 1.3.2.1 2009/04/18 21:55:09 source Exp $
+ *  $Id: 2pc_client.c,v 1.3.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/2pc_client.h b/libsrc/Wi/2pc_client.h
index 00ef622..1e9c158 100644
--- a/libsrc/Wi/2pc_client.h
+++ b/libsrc/Wi/2pc_client.h
@@ -1,12 +1,12 @@
 /*
  *  2pc_client.h
  *
- *  $Id: 2pc_client.h,v 1.3.2.1 2009/04/18 21:55:09 source Exp $
+ *  $Id: 2pc_client.h,v 1.3.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/CLI.h b/libsrc/Wi/CLI.h
index 25eb276..17b0e5f 100644
--- a/libsrc/Wi/CLI.h
+++ b/libsrc/Wi/CLI.h
@@ -1,14 +1,14 @@
 /*
  *  CLI.h
  *
- *  $Id: CLI.h,v 1.17.2.3 2010/07/06 14:24:06 source Exp $
+ *  $Id: CLI.h,v 1.17.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  SQL client data structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -902,7 +902,7 @@ if (wsz##param) \
     if ((con)->con_defs.cdef_utf8_execs) \
       { \
 	SQLSMALLINT len1; \
-	len1 = (SQLSMALLINT) cli_utf8_to_narrow (con->con_charset, sz##param, _cb##param, wsz##param, cb##param); \
+	len1 = (SQLSMALLINT) cli_utf8_to_narrow (con->con_charset, sz##param, _vpcb##param, wsz##param, cb##param); \
 	if (pcb##param) \
 	  *pcb##param = *_pcb##param; \
 	dk_free_box ((box_t) sz##param); \
diff --git a/libsrc/Wi/CLIcr.c b/libsrc/Wi/CLIcr.c
index 11834fb..2e22451 100644
--- a/libsrc/Wi/CLIcr.c
+++ b/libsrc/Wi/CLIcr.c
@@ -1,14 +1,14 @@
 /*
  *  CLIcr.c
  *
- *  $Id: CLIcr.c,v 1.8 2006/07/17 13:28:25 source Exp $
+ *  $Id: CLIcr.c,v 1.8.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  Client API, ODBC Extensions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/CLIodbc3.c b/libsrc/Wi/CLIodbc3.c
index 0376f9b..24461ab 100644
--- a/libsrc/Wi/CLIodbc3.c
+++ b/libsrc/Wi/CLIodbc3.c
@@ -1,12 +1,12 @@
 /*
  *  CLIodbc3.c
  *
- *  $Id: CLIodbc3.c,v 1.26.2.4 2011/03/04 14:46:59 source Exp $
+ *  $Id: CLIodbc3.c,v 1.26.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/CLIsql1.c b/libsrc/Wi/CLIsql1.c
index 596ef28..4ec2d9b 100644
--- a/libsrc/Wi/CLIsql1.c
+++ b/libsrc/Wi/CLIsql1.c
@@ -1,14 +1,14 @@
 /*
  *  CLIsql1.c
  *
- *  $Id: CLIsql1.c,v 1.22.2.9 2010/09/21 11:20:07 source Exp $
+ *  $Id: CLIsql1.c,v 1.22.2.11 2012/03/08 12:55:32 source Exp $
  *
  *  Client API
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1679,6 +1679,8 @@ virtodbc__SQLFreeConnect (SQLHDBC hdbc)
 {
   CON (con, hdbc);
 
+  set_error (&con->con_error, NULL, NULL, NULL);
+
   if (con->con_session)
     {
       /* if client by some reason do SQLFreeConnect but not SQLDisconnect */
@@ -1708,6 +1710,12 @@ virtodbc__SQLFreeConnect (SQLHDBC hdbc)
   if (con->con_dsn)
     dk_free_box ((box_t) con->con_dsn);
 
+  if (con->con_rdf_langs)
+    hash_table_free (con->con_rdf_langs);
+
+  if (con->con_rdf_types)
+    hash_table_free (con->con_rdf_types);
+
   mutex_free (con->con_mtx);
 
   dk_set_delete (&con->con_environment->env_connections, (void *) con);
@@ -1729,6 +1737,8 @@ virtodbc__SQLFreeEnv (SQLHENV henv)
 {
   ENV (env, henv);
 
+  set_error (&env->env_error, NULL, NULL, NULL);
+
   mutex_free (env->env_mtx);
 
   dk_free ((caddr_t) env, sizeof (cli_environment_t));
@@ -1744,6 +1754,7 @@ virtodbc__SQLFreeStmt (SQLHSTMT hstmt, SQLUSMALLINT fOption)
   future_t *f;
 
   cli_dbg_printf (("virtodbc__SQLFreeStmt (hstmt=%p, fOption=%u)\n", (void *) hstmt, (unsigned) fOption));
+  set_error (&stmt->stmt_error, NULL, NULL, NULL);
 
   switch (fOption)
     {
diff --git a/libsrc/Wi/CLIsql2.c b/libsrc/Wi/CLIsql2.c
index a78ba0f..9c32b4c 100644
--- a/libsrc/Wi/CLIsql2.c
+++ b/libsrc/Wi/CLIsql2.c
@@ -1,14 +1,14 @@
 /*
  *  CLIsql2.c
  *
- *  $Id: CLIsql2.c,v 1.21.2.5 2011/03/02 12:24:08 source Exp $
+ *  $Id: CLIsql2.c,v 1.21.2.6 2012/03/08 12:55:32 source Exp $
  *
  *  Client API, ODBC Extensions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/CLIsql3.c b/libsrc/Wi/CLIsql3.c
index c29a15b..4104808 100644
--- a/libsrc/Wi/CLIsql3.c
+++ b/libsrc/Wi/CLIsql3.c
@@ -1,14 +1,14 @@
 /*
  *  CLIsql3.c
  *
- *  $Id: CLIsql3.c,v 1.14.2.2 2010/07/06 14:24:06 source Exp $
+ *  $Id: CLIsql3.c,v 1.14.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  ODBC API - SQLDriverConnect & SQLConnect
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/CLIsql3W.c b/libsrc/Wi/CLIsql3W.c
index 00f36dc..063d233 100644
--- a/libsrc/Wi/CLIsql3W.c
+++ b/libsrc/Wi/CLIsql3W.c
@@ -1,14 +1,14 @@
 /*
  *  CLIsql3.c
  *
- *  $Id: CLIsql3W.c,v 1.2 2006/06/22 21:05:22 source Exp $
+ *  $Id: CLIsql3W.c,v 1.2.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  ODBC API - SQLDriverConnect & SQLConnect
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/CLIuti.c b/libsrc/Wi/CLIuti.c
index 0e02a1f..55acdc6 100644
--- a/libsrc/Wi/CLIuti.c
+++ b/libsrc/Wi/CLIuti.c
@@ -1,14 +1,14 @@
 /*
  *  CLIuti.c
  *
- *  $Id: CLIuti.c,v 1.35.2.5 2010/12/20 18:09:05 source Exp $
+ *  $Id: CLIuti.c,v 1.35.2.7 2012/03/14 19:47:17 source Exp $
  *
  *  Auxiliary functions for the ODBC driver
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -205,7 +205,7 @@ dv_to_sql_type (dtp_t dv, int cli_binary_timestamp)
       return SQL_WVARCHAR;
 
     case DV_ANY:
-      return SQL_VARCHAR;
+      return SQL_LONGVARCHAR;
 
     case DV_INT64:
       return SQL_INTEGER;
diff --git a/libsrc/Wi/CLIw.c b/libsrc/Wi/CLIw.c
index 872d1fe..844cb42 100644
--- a/libsrc/Wi/CLIw.c
+++ b/libsrc/Wi/CLIw.c
@@ -1,12 +1,12 @@
 /*
  *  CLIw.c
  *
- *  $Id: CLIw.c,v 1.10 2009/04/10 11:33:10 source Exp $
+ *  $Id: CLIw.c,v 1.10.2.1 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/Makefile.am b/libsrc/Wi/Makefile.am
index 0d20c0e..117fdde 100644
--- a/libsrc/Wi/Makefile.am
+++ b/libsrc/Wi/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -61,7 +61,8 @@ noinst_HEADERS = \
 	wiservic.h wi_xid.h xmlenc_algos.h xmlenc.h xmlenc_test.h xmlgen.h \
 	xml.h xmlnode.h xmlres.h xmltree.h xpath.h xpathp.h xpathp_impl.h \
 	xpf.h xqf.h xslt_impl.h aqueue.h rdf_mapping_jso.h bitmap.h jso.h \
-	json_p.h bif_audio_tags.h shcompo.h cluster.h extent.h uname_const_decl.h
+	json_p.h bif_audio_tags.h shcompo.h cluster.h extent.h uname_const_decl.h \
+	sparqlwords.h
 
 
 generated_code = \
@@ -79,6 +80,7 @@ generated_code = \
 	sparql_l.c \
 	sparql_p.c \
 	sparql_p.h \
+	sparqlwords.h \
 	sql3.c \
 	sql_code.c \
 	sql_code_1.c \
@@ -93,6 +95,7 @@ generated_code = \
 	sql_code_pldbg.c  \
 	sql_code_repl.c \
 	sql_code_sparql.c \
+	sql_code_sparql_init.c \
 	sql_code_sys.c \
 	sql_code_uddi.c \
 	sql_code_vad.c \
@@ -132,6 +135,7 @@ C_FILES_SPARQL	= \
 	sparql_rdb2rdf.c \
 	sparul2sql.c \
 	sql_code_sparql.c \
+	sql_code_sparql_init.c \
 	turtle_l.c \
 	turtle_p.c
 
@@ -146,6 +150,7 @@ libwi_la_SOURCES = \
 	bif_intl.c \
 	bif_json.c \
 	bif_regexp.c \
+	bif_search_excerpt.c \
 	bif_uuencode.c \
 	bitmap.c \
 	blob.c \
@@ -207,6 +212,7 @@ libwi_la_SOURCES = \
 	sql_code_pldbg.c  \
 	sql_code_repl.c \
 	sql_code_sparql.c \
+	sql_code_sparql_init.c \
 	sql_code_sys.c \
 	sql_code_uddi.c \
 	sql_code_vad.c \
@@ -263,6 +269,7 @@ libwi_odbc_la_SOURCES = \
 	bif_intl.c \
 	bif_json.c \
 	bif_regexp.c \
+	bif_search_excerpt.c \
 	bif_uuencode.c \
 	bitmap.c \
 	blob.c \
@@ -324,6 +331,7 @@ libwi_odbc_la_SOURCES = \
 	sql_code_pldbg.c  \
 	sql_code_repl.c \
 	sql_code_sparql.c \
+	sql_code_sparql_init.c \
 	sql_code_sys.c \
 	sql_code_uddi.c \
 	sql_code_vad.c \
@@ -530,7 +538,6 @@ SQL_FILES		= \
 	$(srcdir)/system.sql \
 	$(srcdir)/system2.sql \
 	$(srcdir)/odbccat.sql \
-	$(srcdir)/useraggr.sql \
 	$(srcdir)/vt_text.sql \
 	$(srcdir)/phrasematch.sql \
 	$(srcdir)/hosting.sql
@@ -609,6 +616,10 @@ SQL_FILES_REPL		= \
 	$(srcdir)/snapshot_repl.sql \
 	$(srcdir)/repl.sql
 
+SQL_FILES_SPARQL_INIT = \
+	$(srcdir)/useraggr.sql \
+	$(srcdir)/sparql_init.sql
+
 SQL_FILES_SPARQL	= \
 	$(srcdir)/sparql.sql \
 	$(srcdir)/sparql_io.sql \
@@ -680,20 +691,20 @@ json_l.c: $(srcdir)/json.l json_p.h Makefile.am
 	@$(GEN) $(LEX) -o json_l.c -Pjsonyy $(srcdir)/json.l
 
 
-sqlwords.h: $(srcdir)/sqlwords.gperf
+sqlwords.h: $(srcdir)/sqlwords.gperf Makefile.am
 	@${GEN} --stdout ${GPERF} \
 		-o sqlwords.h \
 		-aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$$ \
 		-Nlex_hash_kw \
 		$(srcdir)/sqlwords.gperf
 
-sql3.c sql3.h: sql3.y
+sql3.c sql3.h: sql3.y Makefile.am
 	@$(GEN) $(YACC) -o sql3.c -vd $(srcdir)/sql3.y
 
-scn3.c: scn3.l sql3.c sqlwords.h
+scn3.c: scn3.l sql3.c sqlwords.h Makefile.am
 	@$(GEN) $(LEX) -o scn3.c $(srcdir)/scn3.l
 
-scn3split.c: scn3.l sql3.c sqlwords.h
+scn3split.c: scn3.l sql3.c sqlwords.h Makefile.am
 	@$(GEN) $(LEX) -o scn3split.c -Pscn3splityy $(srcdir)/scn3.l
 
 $(top_srcdir)/binsrc/cached_resources/cached_resources.c:
@@ -705,38 +716,48 @@ sql_code_cache.c: $(top_srcdir)/binsrc/cached_resources/cached_resources.c sql_c
 	@echo "#include \"sql_code_cache_impl.c\"" >> $@
 	@echo "#include \"$(top_srcdir)/binsrc/cached_resources/cached_resources.c\"" >> $@
 
-xpathp.c xpathp.h : xpathp.y
+xpathp.c xpathp.h : xpathp.y Makefile.am
 	@$(GEN) $(YACC) -o xpathp.c -vd -pxpyy $(srcdir)/xpathp.y
 
-xpathp_lex_props.c: list_lex_props.sh xpathp.y
+xpathp_lex_props.c: list_lex_props.sh xpathp.y Makefile.am
 	list_lex_props.sh xpathp.y xpathp_lex_props.c
 
-xpscn.c: xpscn.l xpathp.h
+xpscn.c: xpscn.l xpathp.h Makefile.am
 	@$(GEN) $(LEX) -o xpscn.c -Pxpyy $(srcdir)/xpscn.l
 
-sparql_p.c sparql_p.h: sparql_p.y
+sparqlwords.h: sparqlwords.gperf Makefile.am
+	@$(GEN) --stdout $(GPERF) -o $@ \
+		-aCDGptr \
+		-Kkwd \
+		-L ANSI-C \
+		-k1,2,3,5,7,$$ \
+		--ignore-case \
+		-Nsparql_lex_hash_kw \
+		sparqlwords.gperf
+
+sparql_p.c sparql_p.h: sparql_p.y Makefile.am
 	@$(GEN) $(YACC) -o sparql_p.c -vd -psparyy $(srcdir)/sparql_p.y
 
-sparql_lex_props.c: list_lex_props.sh sparql_p.y
+sparql_lex_props.c: list_lex_props.sh sparql_p.y Makefile.am
 	list_lex_props.sh sparql_p.y sparql_lex_props.c
 
-sparql_l.c: sparql_l.l sparql_p.h
+sparql_l.c: sparql_l.l sparql_p.h Makefile.am
 	@$(GEN) $(LEX) -o sparql_l.c -Psparyy $(srcdir)/sparql_l.l
 
-nquad_p.c nquad_p.h: nquad_p.y
+nquad_p.c nquad_p.h: nquad_p.y Makefile.am
 	@$(GEN) $(YACC) -o nquad_p.c -vd -pnqyy $(srcdir)/nquad_p.y
 
-turtle_p.c turtle_p.h: turtle_p.y
+turtle_p.c turtle_p.h: turtle_p.y Makefile.am
 	@$(GEN) $(YACC) -o turtle_p.c -vd -pttlyy $(srcdir)/turtle_p.y
 
-turtle_lex_props.c: list_lex_props.sh turtle_p.y
+turtle_lex_props.c: list_lex_props.sh turtle_p.y Makefile.am
 	list_lex_props.sh turtle_p.y turtle_lex_props.c
 
-turtle_l.c: turtle_l.l turtle_p.h
+turtle_l.c: turtle_l.l turtle_p.h Makefile.am
 	@$(GEN) $(LEX) -o turtle_l.c -Pttlyy $(srcdir)/turtle_l.l
 
 
-AWK_FILES = $(srcdir)/sql_to_c.awk
+AWK_FILES = $(srcdir)/sql_to_c.awk Makefile.am
 
 sql_code.c: $(SQL_FILES) $(AWK_FILES) Makefile.am
 	@${GEN} ${GAWK} \
@@ -825,7 +846,7 @@ sql_code_2pc.c: $(SQL_FILES_2PC) $(AWK_FILES) Makefile.am
 		-v pl_stats=$(PLSTATS) \
 		$(SQL_FILES_2PC)
 
-#sql_code_blog.c: $(SQL_FILES_BLOG) $(AWK_FILES)
+#sql_code_blog.c: $(SQL_FILES_BLOG) $(AWK_FILES) Makefile.am
 #	@${GEN} ${GAWK} -o sql_code_2pc.c -f $(srcdir)/sql_to_c.awk \
 #		-v init_name=_blog -v pl_stats=$(PLSTATS) $(SQL_FILES_BLOG)
 
@@ -837,6 +858,14 @@ sql_code_vdb.c: $(SQL_FILES_VDB) $(AWK_FILES) Makefile.am
 		-v pl_stats=$(PLSTATS) \
 		$(SQL_FILES_VDB)
 
+sql_code_sparql_init.c: $(SQL_FILES_SPARQL_INIT) $(AWK_FILES) Makefile.am
+	@${GEN} ${GAWK} \
+		-o sql_code_sparql_init.c \
+		-f $(srcdir)/sql_to_c.awk \
+		-v init_name=_sparql_init \
+		-v pl_stats=$(PLSTATS) \
+		$(SQL_FILES_SPARQL_INIT)
+
 sql_code_sparql.c: $(SQL_FILES_SPARQL) $(AWK_FILES) Makefile.am
 	@${GEN} ${GAWK} \
 		-o sql_code_sparql.c \
@@ -927,6 +956,7 @@ generated: \
 	sparql_l.c \
 	sparql_p.c \
 	sparql_p.h \
+	sparqlwords.h \
 	sql3.c \
 	sql_code.c \
 	sql_code_1.c \
@@ -987,5 +1017,6 @@ EXTRA_DIST = \
 	sql_code_cache_impl.c \
 	sql_to_c.awk \
 	sqlwords.gperf \
+	sparqlwords.gperf \
 	ssl.c \
 	string_tmpl.c
diff --git a/libsrc/Wi/Makefile.in b/libsrc/Wi/Makefile.in
index a764d0c..8183c2c 100644
--- a/libsrc/Wi/Makefile.in
+++ b/libsrc/Wi/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -77,27 +77,27 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
 libwi_la_LIBADD =
 am__libwi_la_SOURCES_DIST = aqueue.c arith.c auxfiles.c bif_audio.c \
 	bif_crypto.c bif_diff.c bif_intl.c bif_json.c bif_regexp.c \
-	bif_uuencode.c bitmap.c blob.c blobio.c cl_stubs.c datesupp.c \
-	ddlrun.c disk.c dks_esc.c extent.c eqlcomp.c gate.c hash.c \
-	hosting.c http.c insert.c inxop.c json_l.c json_p.c lisprdr.c \
-	lock.c log.c map_schema.c meta.c mtwrite.c multibyte.c \
-	neodisk.c numeric.c obackup.c page.c plugin_loader.c \
-	recovery.c regist.c rendezvous.c rltrx.c row.c schspace.c \
-	scn3.c search.c search_in.c security.c shcompo.c sort.c \
-	space.c sql3.c sqlbif2.c sqlbif.c sql_code.c sql_code_1.c \
-	sql_code_2pc.c sql_code_adm.c sql_code_auto.c sql_code_blog.c \
-	sql_code_cache.c sql_code_dav.c sql_code_dbp.c sql_code_ddk.c \
-	sql_code_imsg.c sql_code_pldbg.c sql_code_repl.c \
-	sql_code_sparql.c sql_code_sys.c sql_code_uddi.c \
-	sql_code_vad.c sql_code_vdb.c sql_code_ws.c sqlcomp2.c \
-	sqlcomp.c sqlcost.c sqlcr.c sqldf.c sqlexp.c sqlgen.c \
-	sqlhash.c sqlintrp.c sqlinx.c sqloby.c sqlo.c sqlocr.c \
-	sqloinv.c sqloinx.c sqloprt.c sqlorder.c sqlovdb.c sqlpfn.c \
-	sqlprocc.c sqlprt.c sqlrun.c sqlsrv.c sqlstmts.c sqltrig.c \
-	sqltype.c sqlver.c sqlview.c srvcr.c srvmultibyte.c srvstat.c \
-	string.c trans.c update.c uuencode.c wirpc.c wiservic.c \
-	xpathp.c xpscn.c jso.c rdfbox.c rdf_core.c rdfinf.c \
-	rdf_mapping_jso.c rdfxml_parser.c nquad_p.c nquad_p.h \
+	bif_search_excerpt.c bif_uuencode.c bitmap.c blob.c blobio.c \
+	cl_stubs.c datesupp.c ddlrun.c disk.c dks_esc.c extent.c \
+	eqlcomp.c gate.c hash.c hosting.c http.c insert.c inxop.c \
+	json_l.c json_p.c lisprdr.c lock.c log.c map_schema.c meta.c \
+	mtwrite.c multibyte.c neodisk.c numeric.c obackup.c page.c \
+	plugin_loader.c recovery.c regist.c rendezvous.c rltrx.c row.c \
+	schspace.c scn3.c search.c search_in.c security.c shcompo.c \
+	sort.c space.c sql3.c sqlbif2.c sqlbif.c sql_code.c \
+	sql_code_1.c sql_code_2pc.c sql_code_adm.c sql_code_auto.c \
+	sql_code_blog.c sql_code_cache.c sql_code_dav.c sql_code_dbp.c \
+	sql_code_ddk.c sql_code_imsg.c sql_code_pldbg.c \
+	sql_code_repl.c sql_code_sparql.c sql_code_sparql_init.c \
+	sql_code_sys.c sql_code_uddi.c sql_code_vad.c sql_code_vdb.c \
+	sql_code_ws.c sqlcomp2.c sqlcomp.c sqlcost.c sqlcr.c sqldf.c \
+	sqlexp.c sqlgen.c sqlhash.c sqlintrp.c sqlinx.c sqloby.c \
+	sqlo.c sqlocr.c sqloinv.c sqloinx.c sqloprt.c sqlorder.c \
+	sqlovdb.c sqlpfn.c sqlprocc.c sqlprt.c sqlrun.c sqlsrv.c \
+	sqlstmts.c sqltrig.c sqltype.c sqlver.c sqlview.c srvcr.c \
+	srvmultibyte.c srvstat.c string.c trans.c update.c uuencode.c \
+	wirpc.c wiservic.c xpathp.c xpscn.c jso.c rdfbox.c rdf_core.c \
+	rdfinf.c rdf_mapping_jso.c rdfxml_parser.c nquad_p.c nquad_p.h \
 	sparql2sql.c sparql2sqltext.c sparqld.c sparql_core.c \
 	sparql_l.c sparql_p.c sparql_qm.c sparql_sff.c sparql_tree.c \
 	sparql_rdb2rdf.c sparul2sql.c turtle_l.c turtle_p.c pldebug.c \
@@ -118,8 +118,8 @@ am__objects_1 = libwi_la-jso.lo libwi_la-rdfbox.lo \
 	libwi_la-sparql_p.lo libwi_la-sparql_qm.lo \
 	libwi_la-sparql_sff.lo libwi_la-sparql_tree.lo \
 	libwi_la-sparql_rdb2rdf.lo libwi_la-sparul2sql.lo \
-	libwi_la-sql_code_sparql.lo libwi_la-turtle_l.lo \
-	libwi_la-turtle_p.lo
+	libwi_la-sql_code_sparql.lo libwi_la-sql_code_sparql_init.lo \
+	libwi_la-turtle_l.lo libwi_la-turtle_p.lo
 @WITH_PLDEBUG_TRUE at am__objects_2 = libwi_la-pldebug.lo
 @WITH_LDAP_TRUE at am__objects_3 = libwi_la-bif_ldapcli.lo
 @WITH_KERBEROS_TRUE at am__objects_4 = libwi_la-bif_kerberoscli.lo
@@ -129,61 +129,62 @@ am_libwi_la_OBJECTS = libwi_la-aqueue.lo libwi_la-arith.lo \
 	libwi_la-auxfiles.lo libwi_la-bif_audio.lo \
 	libwi_la-bif_crypto.lo libwi_la-bif_diff.lo \
 	libwi_la-bif_intl.lo libwi_la-bif_json.lo \
-	libwi_la-bif_regexp.lo libwi_la-bif_uuencode.lo \
-	libwi_la-bitmap.lo libwi_la-blob.lo libwi_la-blobio.lo \
-	libwi_la-cl_stubs.lo libwi_la-datesupp.lo libwi_la-ddlrun.lo \
-	libwi_la-disk.lo libwi_la-dks_esc.lo libwi_la-extent.lo \
-	libwi_la-eqlcomp.lo libwi_la-gate.lo libwi_la-hash.lo \
-	libwi_la-hosting.lo libwi_la-http.lo libwi_la-insert.lo \
-	libwi_la-inxop.lo libwi_la-json_l.lo libwi_la-json_p.lo \
-	libwi_la-lisprdr.lo libwi_la-lock.lo libwi_la-log.lo \
-	libwi_la-map_schema.lo libwi_la-meta.lo libwi_la-mtwrite.lo \
-	libwi_la-multibyte.lo libwi_la-neodisk.lo libwi_la-numeric.lo \
-	libwi_la-obackup.lo libwi_la-page.lo libwi_la-plugin_loader.lo \
-	libwi_la-recovery.lo libwi_la-regist.lo libwi_la-rendezvous.lo \
-	libwi_la-rltrx.lo libwi_la-row.lo libwi_la-schspace.lo \
-	libwi_la-scn3.lo libwi_la-search.lo libwi_la-search_in.lo \
-	libwi_la-security.lo libwi_la-shcompo.lo libwi_la-sort.lo \
-	libwi_la-space.lo libwi_la-sql3.lo libwi_la-sqlbif2.lo \
-	libwi_la-sqlbif.lo libwi_la-sql_code.lo libwi_la-sql_code_1.lo \
+	libwi_la-bif_regexp.lo libwi_la-bif_search_excerpt.lo \
+	libwi_la-bif_uuencode.lo libwi_la-bitmap.lo libwi_la-blob.lo \
+	libwi_la-blobio.lo libwi_la-cl_stubs.lo libwi_la-datesupp.lo \
+	libwi_la-ddlrun.lo libwi_la-disk.lo libwi_la-dks_esc.lo \
+	libwi_la-extent.lo libwi_la-eqlcomp.lo libwi_la-gate.lo \
+	libwi_la-hash.lo libwi_la-hosting.lo libwi_la-http.lo \
+	libwi_la-insert.lo libwi_la-inxop.lo libwi_la-json_l.lo \
+	libwi_la-json_p.lo libwi_la-lisprdr.lo libwi_la-lock.lo \
+	libwi_la-log.lo libwi_la-map_schema.lo libwi_la-meta.lo \
+	libwi_la-mtwrite.lo libwi_la-multibyte.lo libwi_la-neodisk.lo \
+	libwi_la-numeric.lo libwi_la-obackup.lo libwi_la-page.lo \
+	libwi_la-plugin_loader.lo libwi_la-recovery.lo \
+	libwi_la-regist.lo libwi_la-rendezvous.lo libwi_la-rltrx.lo \
+	libwi_la-row.lo libwi_la-schspace.lo libwi_la-scn3.lo \
+	libwi_la-search.lo libwi_la-search_in.lo libwi_la-security.lo \
+	libwi_la-shcompo.lo libwi_la-sort.lo libwi_la-space.lo \
+	libwi_la-sql3.lo libwi_la-sqlbif2.lo libwi_la-sqlbif.lo \
+	libwi_la-sql_code.lo libwi_la-sql_code_1.lo \
 	libwi_la-sql_code_2pc.lo libwi_la-sql_code_adm.lo \
 	libwi_la-sql_code_auto.lo libwi_la-sql_code_blog.lo \
 	libwi_la-sql_code_cache.lo libwi_la-sql_code_dav.lo \
 	libwi_la-sql_code_dbp.lo libwi_la-sql_code_ddk.lo \
 	libwi_la-sql_code_imsg.lo libwi_la-sql_code_pldbg.lo \
 	libwi_la-sql_code_repl.lo libwi_la-sql_code_sparql.lo \
-	libwi_la-sql_code_sys.lo libwi_la-sql_code_uddi.lo \
-	libwi_la-sql_code_vad.lo libwi_la-sql_code_vdb.lo \
-	libwi_la-sql_code_ws.lo libwi_la-sqlcomp2.lo \
-	libwi_la-sqlcomp.lo libwi_la-sqlcost.lo libwi_la-sqlcr.lo \
-	libwi_la-sqldf.lo libwi_la-sqlexp.lo libwi_la-sqlgen.lo \
-	libwi_la-sqlhash.lo libwi_la-sqlintrp.lo libwi_la-sqlinx.lo \
-	libwi_la-sqloby.lo libwi_la-sqlo.lo libwi_la-sqlocr.lo \
-	libwi_la-sqloinv.lo libwi_la-sqloinx.lo libwi_la-sqloprt.lo \
-	libwi_la-sqlorder.lo libwi_la-sqlovdb.lo libwi_la-sqlpfn.lo \
-	libwi_la-sqlprocc.lo libwi_la-sqlprt.lo libwi_la-sqlrun.lo \
-	libwi_la-sqlsrv.lo libwi_la-sqlstmts.lo libwi_la-sqltrig.lo \
-	libwi_la-sqltype.lo libwi_la-sqlver.lo libwi_la-sqlview.lo \
-	libwi_la-srvcr.lo libwi_la-srvmultibyte.lo libwi_la-srvstat.lo \
-	libwi_la-string.lo libwi_la-trans.lo libwi_la-update.lo \
-	libwi_la-uuencode.lo libwi_la-wirpc.lo libwi_la-wiservic.lo \
-	libwi_la-xpathp.lo libwi_la-xpscn.lo $(am__objects_1) \
-	$(am__objects_2) libwi_la-bif_date.lo libwi_la-bif_dav.lo \
-	libwi_la-bif_explain.lo libwi_la-bif_file.lo \
-	libwi_la-bif_phrasematch.lo libwi_la-bif_smtp.lo \
-	libwi_la-bif_soap.lo libwi_la-bif_text.lo libwi_la-bif_tidy.lo \
-	libwi_la-http_client.lo libwi_la-shuric.lo libwi_la-subseq.lo \
-	libwi_la-text.lo libwi_la-uname_const_decl.lo \
-	libwi_la-xmlenc_algos.lo libwi_la-xmlenc.lo \
-	libwi_la-xmlenc-dec.lo libwi_la-xmlschema.lo \
-	libwi_la-xmlsearch.lo libwi_la-xmlsql.lo libwi_la-xmllazy.lo \
-	libwi_la-xmltree.lo libwi_la-xpath.lo libwi_la-xpf.lo \
-	libwi_la-xqf.lo libwi_la-xslt.lo libwi_la-xslt_fmt.lo \
-	libwi_la-xslt_opt.lo $(am__objects_3) $(am__objects_4) \
-	$(am__objects_5) libwi_la-bif_xper.lo libwi_la-2pc.lo \
-	libwi_la-bif_repl.lo libwi_la-bif_xml.lo libwi_la-odbccat.lo \
-	libwi_la-sqlrbuf.lo libwi_la-sqlrcomp.lo libwi_la-sqlrrun.lo \
-	libwi_la-wi_xid.lo
+	libwi_la-sql_code_sparql_init.lo libwi_la-sql_code_sys.lo \
+	libwi_la-sql_code_uddi.lo libwi_la-sql_code_vad.lo \
+	libwi_la-sql_code_vdb.lo libwi_la-sql_code_ws.lo \
+	libwi_la-sqlcomp2.lo libwi_la-sqlcomp.lo libwi_la-sqlcost.lo \
+	libwi_la-sqlcr.lo libwi_la-sqldf.lo libwi_la-sqlexp.lo \
+	libwi_la-sqlgen.lo libwi_la-sqlhash.lo libwi_la-sqlintrp.lo \
+	libwi_la-sqlinx.lo libwi_la-sqloby.lo libwi_la-sqlo.lo \
+	libwi_la-sqlocr.lo libwi_la-sqloinv.lo libwi_la-sqloinx.lo \
+	libwi_la-sqloprt.lo libwi_la-sqlorder.lo libwi_la-sqlovdb.lo \
+	libwi_la-sqlpfn.lo libwi_la-sqlprocc.lo libwi_la-sqlprt.lo \
+	libwi_la-sqlrun.lo libwi_la-sqlsrv.lo libwi_la-sqlstmts.lo \
+	libwi_la-sqltrig.lo libwi_la-sqltype.lo libwi_la-sqlver.lo \
+	libwi_la-sqlview.lo libwi_la-srvcr.lo libwi_la-srvmultibyte.lo \
+	libwi_la-srvstat.lo libwi_la-string.lo libwi_la-trans.lo \
+	libwi_la-update.lo libwi_la-uuencode.lo libwi_la-wirpc.lo \
+	libwi_la-wiservic.lo libwi_la-xpathp.lo libwi_la-xpscn.lo \
+	$(am__objects_1) $(am__objects_2) libwi_la-bif_date.lo \
+	libwi_la-bif_dav.lo libwi_la-bif_explain.lo \
+	libwi_la-bif_file.lo libwi_la-bif_phrasematch.lo \
+	libwi_la-bif_smtp.lo libwi_la-bif_soap.lo libwi_la-bif_text.lo \
+	libwi_la-bif_tidy.lo libwi_la-http_client.lo \
+	libwi_la-shuric.lo libwi_la-subseq.lo libwi_la-text.lo \
+	libwi_la-uname_const_decl.lo libwi_la-xmlenc_algos.lo \
+	libwi_la-xmlenc.lo libwi_la-xmlenc-dec.lo \
+	libwi_la-xmlschema.lo libwi_la-xmlsearch.lo libwi_la-xmlsql.lo \
+	libwi_la-xmllazy.lo libwi_la-xmltree.lo libwi_la-xpath.lo \
+	libwi_la-xpf.lo libwi_la-xqf.lo libwi_la-xslt.lo \
+	libwi_la-xslt_fmt.lo libwi_la-xslt_opt.lo $(am__objects_3) \
+	$(am__objects_4) $(am__objects_5) libwi_la-bif_xper.lo \
+	libwi_la-2pc.lo libwi_la-bif_repl.lo libwi_la-bif_xml.lo \
+	libwi_la-odbccat.lo libwi_la-sqlrbuf.lo libwi_la-sqlrcomp.lo \
+	libwi_la-sqlrrun.lo libwi_la-wi_xid.lo
 libwi_la_OBJECTS = $(am_libwi_la_OBJECTS)
 libwi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(libwi_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -191,18 +192,19 @@ libwi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 libwi_odbc_la_LIBADD =
 am__libwi_odbc_la_SOURCES_DIST = aqueue.c arith.c auxfiles.c \
 	bif_audio.c bif_crypto.c bif_diff.c bif_intl.c bif_json.c \
-	bif_regexp.c bif_uuencode.c bitmap.c blob.c blobio.c \
-	cl_stubs.c datesupp.c ddlrun.c disk.c dks_esc.c extent.c \
-	eqlcomp.c gate.c hash.c hosting.c http.c insert.c inxop.c \
-	json_l.c json_p.c lisprdr.c lock.c log.c map_schema.c meta.c \
-	mtwrite.c multibyte.c neodisk.c numeric.c obackup.c page.c \
-	plugin_loader.c recovery.c regist.c rendezvous.c rltrx.c row.c \
-	schspace.c scn3.c search.c search_in.c security.c shcompo.c \
-	sort.c space.c sql3.c sqlbif2.c sqlbif.c sql_code.c \
-	sql_code_1.c sql_code_2pc.c sql_code_adm.c sql_code_auto.c \
-	sql_code_blog.c sql_code_cache.c sql_code_dav.c sql_code_dbp.c \
-	sql_code_ddk.c sql_code_imsg.c sql_code_pldbg.c \
-	sql_code_repl.c sql_code_sparql.c sql_code_sys.c \
+	bif_regexp.c bif_search_excerpt.c bif_uuencode.c bitmap.c \
+	blob.c blobio.c cl_stubs.c datesupp.c ddlrun.c disk.c \
+	dks_esc.c extent.c eqlcomp.c gate.c hash.c hosting.c http.c \
+	insert.c inxop.c json_l.c json_p.c lisprdr.c lock.c log.c \
+	map_schema.c meta.c mtwrite.c multibyte.c neodisk.c numeric.c \
+	obackup.c page.c plugin_loader.c recovery.c regist.c \
+	rendezvous.c rltrx.c row.c schspace.c scn3.c search.c \
+	search_in.c security.c shcompo.c sort.c space.c sql3.c \
+	sqlbif2.c sqlbif.c sql_code.c sql_code_1.c sql_code_2pc.c \
+	sql_code_adm.c sql_code_auto.c sql_code_blog.c \
+	sql_code_cache.c sql_code_dav.c sql_code_dbp.c sql_code_ddk.c \
+	sql_code_imsg.c sql_code_pldbg.c sql_code_repl.c \
+	sql_code_sparql.c sql_code_sparql_init.c sql_code_sys.c \
 	sql_code_uddi.c sql_code_vad.c sql_code_vdb.c sql_code_ws.c \
 	sqlcomp2.c sqlcomp.c sqlcost.c sqlcr.c sqldf.c sqlexp.c \
 	sqlgen.c sqlhash.c sqlintrp.c sqlinx.c sqloby.c sqlo.c \
@@ -233,6 +235,7 @@ am__objects_6 = libwi_odbc_la-jso.lo libwi_odbc_la-rdfbox.lo \
 	libwi_odbc_la-sparql_qm.lo libwi_odbc_la-sparql_sff.lo \
 	libwi_odbc_la-sparql_tree.lo libwi_odbc_la-sparql_rdb2rdf.lo \
 	libwi_odbc_la-sparul2sql.lo libwi_odbc_la-sql_code_sparql.lo \
+	libwi_odbc_la-sql_code_sparql_init.lo \
 	libwi_odbc_la-turtle_l.lo libwi_odbc_la-turtle_p.lo
 @WITH_PLDEBUG_TRUE at am__objects_7 = libwi_odbc_la-pldebug.lo
 @WITH_LDAP_TRUE at am__objects_8 = libwi_odbc_la-bif_ldapcli.lo
@@ -245,6 +248,7 @@ am_libwi_odbc_la_OBJECTS = libwi_odbc_la-aqueue.lo \
 	libwi_odbc_la-bif_audio.lo libwi_odbc_la-bif_crypto.lo \
 	libwi_odbc_la-bif_diff.lo libwi_odbc_la-bif_intl.lo \
 	libwi_odbc_la-bif_json.lo libwi_odbc_la-bif_regexp.lo \
+	libwi_odbc_la-bif_search_excerpt.lo \
 	libwi_odbc_la-bif_uuencode.lo libwi_odbc_la-bitmap.lo \
 	libwi_odbc_la-blob.lo libwi_odbc_la-blobio.lo \
 	libwi_odbc_la-cl_stubs.lo libwi_odbc_la-datesupp.lo \
@@ -275,36 +279,38 @@ am_libwi_odbc_la_OBJECTS = libwi_odbc_la-aqueue.lo \
 	libwi_odbc_la-sql_code_dav.lo libwi_odbc_la-sql_code_dbp.lo \
 	libwi_odbc_la-sql_code_ddk.lo libwi_odbc_la-sql_code_imsg.lo \
 	libwi_odbc_la-sql_code_pldbg.lo libwi_odbc_la-sql_code_repl.lo \
-	libwi_odbc_la-sql_code_sparql.lo libwi_odbc_la-sql_code_sys.lo \
-	libwi_odbc_la-sql_code_uddi.lo libwi_odbc_la-sql_code_vad.lo \
-	libwi_odbc_la-sql_code_vdb.lo libwi_odbc_la-sql_code_ws.lo \
-	libwi_odbc_la-sqlcomp2.lo libwi_odbc_la-sqlcomp.lo \
-	libwi_odbc_la-sqlcost.lo libwi_odbc_la-sqlcr.lo \
-	libwi_odbc_la-sqldf.lo libwi_odbc_la-sqlexp.lo \
-	libwi_odbc_la-sqlgen.lo libwi_odbc_la-sqlhash.lo \
-	libwi_odbc_la-sqlintrp.lo libwi_odbc_la-sqlinx.lo \
-	libwi_odbc_la-sqloby.lo libwi_odbc_la-sqlo.lo \
-	libwi_odbc_la-sqlocr.lo libwi_odbc_la-sqloinv.lo \
-	libwi_odbc_la-sqloinx.lo libwi_odbc_la-sqloprt.lo \
-	libwi_odbc_la-sqlorder.lo libwi_odbc_la-sqlovdb.lo \
-	libwi_odbc_la-sqlpfn.lo libwi_odbc_la-sqlprocc.lo \
-	libwi_odbc_la-sqlprt.lo libwi_odbc_la-sqlrun.lo \
-	libwi_odbc_la-sqlsrv.lo libwi_odbc_la-sqlstmts.lo \
-	libwi_odbc_la-sqltrig.lo libwi_odbc_la-sqltype.lo \
-	libwi_odbc_la-sqlver.lo libwi_odbc_la-sqlview.lo \
-	libwi_odbc_la-srvcr.lo libwi_odbc_la-srvmultibyte.lo \
-	libwi_odbc_la-srvstat.lo libwi_odbc_la-string.lo \
-	libwi_odbc_la-trans.lo libwi_odbc_la-update.lo \
-	libwi_odbc_la-uuencode.lo libwi_odbc_la-wirpc.lo \
-	libwi_odbc_la-wiservic.lo libwi_odbc_la-xpathp.lo \
-	libwi_odbc_la-xpscn.lo $(am__objects_6) $(am__objects_7) \
-	libwi_odbc_la-bif_date.lo libwi_odbc_la-bif_dav.lo \
-	libwi_odbc_la-bif_explain.lo libwi_odbc_la-bif_file.lo \
-	libwi_odbc_la-bif_phrasematch.lo libwi_odbc_la-bif_smtp.lo \
-	libwi_odbc_la-bif_soap.lo libwi_odbc_la-bif_text.lo \
-	libwi_odbc_la-bif_tidy.lo libwi_odbc_la-http_client.lo \
-	libwi_odbc_la-shuric.lo libwi_odbc_la-subseq.lo \
-	libwi_odbc_la-text.lo libwi_odbc_la-uname_const_decl.lo \
+	libwi_odbc_la-sql_code_sparql.lo \
+	libwi_odbc_la-sql_code_sparql_init.lo \
+	libwi_odbc_la-sql_code_sys.lo libwi_odbc_la-sql_code_uddi.lo \
+	libwi_odbc_la-sql_code_vad.lo libwi_odbc_la-sql_code_vdb.lo \
+	libwi_odbc_la-sql_code_ws.lo libwi_odbc_la-sqlcomp2.lo \
+	libwi_odbc_la-sqlcomp.lo libwi_odbc_la-sqlcost.lo \
+	libwi_odbc_la-sqlcr.lo libwi_odbc_la-sqldf.lo \
+	libwi_odbc_la-sqlexp.lo libwi_odbc_la-sqlgen.lo \
+	libwi_odbc_la-sqlhash.lo libwi_odbc_la-sqlintrp.lo \
+	libwi_odbc_la-sqlinx.lo libwi_odbc_la-sqloby.lo \
+	libwi_odbc_la-sqlo.lo libwi_odbc_la-sqlocr.lo \
+	libwi_odbc_la-sqloinv.lo libwi_odbc_la-sqloinx.lo \
+	libwi_odbc_la-sqloprt.lo libwi_odbc_la-sqlorder.lo \
+	libwi_odbc_la-sqlovdb.lo libwi_odbc_la-sqlpfn.lo \
+	libwi_odbc_la-sqlprocc.lo libwi_odbc_la-sqlprt.lo \
+	libwi_odbc_la-sqlrun.lo libwi_odbc_la-sqlsrv.lo \
+	libwi_odbc_la-sqlstmts.lo libwi_odbc_la-sqltrig.lo \
+	libwi_odbc_la-sqltype.lo libwi_odbc_la-sqlver.lo \
+	libwi_odbc_la-sqlview.lo libwi_odbc_la-srvcr.lo \
+	libwi_odbc_la-srvmultibyte.lo libwi_odbc_la-srvstat.lo \
+	libwi_odbc_la-string.lo libwi_odbc_la-trans.lo \
+	libwi_odbc_la-update.lo libwi_odbc_la-uuencode.lo \
+	libwi_odbc_la-wirpc.lo libwi_odbc_la-wiservic.lo \
+	libwi_odbc_la-xpathp.lo libwi_odbc_la-xpscn.lo \
+	$(am__objects_6) $(am__objects_7) libwi_odbc_la-bif_date.lo \
+	libwi_odbc_la-bif_dav.lo libwi_odbc_la-bif_explain.lo \
+	libwi_odbc_la-bif_file.lo libwi_odbc_la-bif_phrasematch.lo \
+	libwi_odbc_la-bif_smtp.lo libwi_odbc_la-bif_soap.lo \
+	libwi_odbc_la-bif_text.lo libwi_odbc_la-bif_tidy.lo \
+	libwi_odbc_la-http_client.lo libwi_odbc_la-shuric.lo \
+	libwi_odbc_la-subseq.lo libwi_odbc_la-text.lo \
+	libwi_odbc_la-uname_const_decl.lo \
 	libwi_odbc_la-xmlenc_algos.lo libwi_odbc_la-xmlenc.lo \
 	libwi_odbc_la-xmlenc-dec.lo libwi_odbc_la-xmlschema.lo \
 	libwi_odbc_la-xmlsearch.lo libwi_odbc_la-xmlsql.lo \
@@ -387,6 +393,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -435,6 +442,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -486,6 +494,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -532,7 +541,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -581,7 +589,8 @@ noinst_HEADERS = \
 	wiservic.h wi_xid.h xmlenc_algos.h xmlenc.h xmlenc_test.h xmlgen.h \
 	xml.h xmlnode.h xmlres.h xmltree.h xpath.h xpathp.h xpathp_impl.h \
 	xpf.h xqf.h xslt_impl.h aqueue.h rdf_mapping_jso.h bitmap.h jso.h \
-	json_p.h bif_audio_tags.h shcompo.h cluster.h extent.h uname_const_decl.h
+	json_p.h bif_audio_tags.h shcompo.h cluster.h extent.h uname_const_decl.h \
+	sparqlwords.h
 
 generated_code = \
 	json_l.c \
@@ -598,6 +607,7 @@ generated_code = \
 	sparql_l.c \
 	sparql_p.c \
 	sparql_p.h \
+	sparqlwords.h \
 	sql3.c \
 	sql_code.c \
 	sql_code_1.c \
@@ -612,6 +622,7 @@ generated_code = \
 	sql_code_pldbg.c  \
 	sql_code_repl.c \
 	sql_code_sparql.c \
+	sql_code_sparql_init.c \
 	sql_code_sys.c \
 	sql_code_uddi.c \
 	sql_code_vad.c \
@@ -650,6 +661,7 @@ C_FILES_SPARQL = \
 	sparql_rdb2rdf.c \
 	sparul2sql.c \
 	sql_code_sparql.c \
+	sql_code_sparql_init.c \
 	turtle_l.c \
 	turtle_p.c
 
@@ -661,66 +673,66 @@ C_FILES_SPARQL = \
 #KUBL_UNIV_FILES
 libwi_la_SOURCES = aqueue.c arith.c auxfiles.c bif_audio.c \
 	bif_crypto.c bif_diff.c bif_intl.c bif_json.c bif_regexp.c \
-	bif_uuencode.c bitmap.c blob.c blobio.c cl_stubs.c datesupp.c \
-	ddlrun.c disk.c dks_esc.c extent.c eqlcomp.c gate.c hash.c \
-	hosting.c http.c insert.c inxop.c json_l.c json_p.c lisprdr.c \
-	lock.c log.c map_schema.c meta.c mtwrite.c multibyte.c \
-	neodisk.c numeric.c obackup.c page.c plugin_loader.c \
-	recovery.c regist.c rendezvous.c rltrx.c row.c schspace.c \
-	scn3.c search.c search_in.c security.c shcompo.c sort.c \
-	space.c sql3.c sqlbif2.c sqlbif.c sql_code.c sql_code_1.c \
-	sql_code_2pc.c sql_code_adm.c sql_code_auto.c sql_code_blog.c \
-	sql_code_cache.c sql_code_dav.c sql_code_dbp.c sql_code_ddk.c \
-	sql_code_imsg.c sql_code_pldbg.c sql_code_repl.c \
-	sql_code_sparql.c sql_code_sys.c sql_code_uddi.c \
-	sql_code_vad.c sql_code_vdb.c sql_code_ws.c sqlcomp2.c \
-	sqlcomp.c sqlcost.c sqlcr.c sqldf.c sqlexp.c sqlgen.c \
-	sqlhash.c sqlintrp.c sqlinx.c sqloby.c sqlo.c sqlocr.c \
-	sqloinv.c sqloinx.c sqloprt.c sqlorder.c sqlovdb.c sqlpfn.c \
-	sqlprocc.c sqlprt.c sqlrun.c sqlsrv.c sqlstmts.c sqltrig.c \
-	sqltype.c sqlver.c sqlview.c srvcr.c srvmultibyte.c srvstat.c \
-	string.c trans.c update.c uuencode.c wirpc.c wiservic.c \
-	xpathp.c xpscn.c $(C_FILES_SPARQL) $(PLDEBUG_FILES) bif_date.c \
-	bif_dav.c bif_explain.c bif_file.c bif_phrasematch.c \
-	bif_smtp.c bif_soap.c bif_text.c bif_tidy.c http_client.c \
-	shuric.c subseq.c text.c uname_const_decl.c xmlenc_algos.c \
-	xmlenc.c xmlenc-dec.c xmlschema.c xmlsearch.c xmlsql.c \
-	xmllazy.c xmltree.c xpath.c xpf.c xqf.c xslt.c xslt_fmt.c \
-	xslt_opt.c $(LDAP_BIF) $(KRB_BIF) $(IMSG_BIF) bif_xper.c 2pc.c \
-	bif_repl.c bif_xml.c odbccat.c sqlrbuf.c sqlrcomp.c sqlrrun.c \
-	wi_xid.c $(libwi_base_la_sources)
+	bif_search_excerpt.c bif_uuencode.c bitmap.c blob.c blobio.c \
+	cl_stubs.c datesupp.c ddlrun.c disk.c dks_esc.c extent.c \
+	eqlcomp.c gate.c hash.c hosting.c http.c insert.c inxop.c \
+	json_l.c json_p.c lisprdr.c lock.c log.c map_schema.c meta.c \
+	mtwrite.c multibyte.c neodisk.c numeric.c obackup.c page.c \
+	plugin_loader.c recovery.c regist.c rendezvous.c rltrx.c row.c \
+	schspace.c scn3.c search.c search_in.c security.c shcompo.c \
+	sort.c space.c sql3.c sqlbif2.c sqlbif.c sql_code.c \
+	sql_code_1.c sql_code_2pc.c sql_code_adm.c sql_code_auto.c \
+	sql_code_blog.c sql_code_cache.c sql_code_dav.c sql_code_dbp.c \
+	sql_code_ddk.c sql_code_imsg.c sql_code_pldbg.c \
+	sql_code_repl.c sql_code_sparql.c sql_code_sparql_init.c \
+	sql_code_sys.c sql_code_uddi.c sql_code_vad.c sql_code_vdb.c \
+	sql_code_ws.c sqlcomp2.c sqlcomp.c sqlcost.c sqlcr.c sqldf.c \
+	sqlexp.c sqlgen.c sqlhash.c sqlintrp.c sqlinx.c sqloby.c \
+	sqlo.c sqlocr.c sqloinv.c sqloinx.c sqloprt.c sqlorder.c \
+	sqlovdb.c sqlpfn.c sqlprocc.c sqlprt.c sqlrun.c sqlsrv.c \
+	sqlstmts.c sqltrig.c sqltype.c sqlver.c sqlview.c srvcr.c \
+	srvmultibyte.c srvstat.c string.c trans.c update.c uuencode.c \
+	wirpc.c wiservic.c xpathp.c xpscn.c $(C_FILES_SPARQL) \
+	$(PLDEBUG_FILES) bif_date.c bif_dav.c bif_explain.c bif_file.c \
+	bif_phrasematch.c bif_smtp.c bif_soap.c bif_text.c bif_tidy.c \
+	http_client.c shuric.c subseq.c text.c uname_const_decl.c \
+	xmlenc_algos.c xmlenc.c xmlenc-dec.c xmlschema.c xmlsearch.c \
+	xmlsql.c xmllazy.c xmltree.c xpath.c xpf.c xqf.c xslt.c \
+	xslt_fmt.c xslt_opt.c $(LDAP_BIF) $(KRB_BIF) $(IMSG_BIF) \
+	bif_xper.c 2pc.c bif_repl.c bif_xml.c odbccat.c sqlrbuf.c \
+	sqlrcomp.c sqlrrun.c wi_xid.c $(libwi_base_la_sources)
 
 #KUBL_UNIV_FILES_ODBC
 libwi_odbc_la_SOURCES = aqueue.c arith.c auxfiles.c bif_audio.c \
 	bif_crypto.c bif_diff.c bif_intl.c bif_json.c bif_regexp.c \
-	bif_uuencode.c bitmap.c blob.c blobio.c cl_stubs.c datesupp.c \
-	ddlrun.c disk.c dks_esc.c extent.c eqlcomp.c gate.c hash.c \
-	hosting.c http.c insert.c inxop.c json_l.c json_p.c lisprdr.c \
-	lock.c log.c map_schema.c meta.c mtwrite.c multibyte.c \
-	neodisk.c numeric.c obackup.c page.c plugin_loader.c \
-	recovery.c regist.c rendezvous.c rltrx.c row.c schspace.c \
-	scn3.c search.c search_in.c security.c shcompo.c sort.c \
-	space.c sql3.c sqlbif2.c sqlbif.c sql_code.c sql_code_1.c \
-	sql_code_2pc.c sql_code_adm.c sql_code_auto.c sql_code_blog.c \
-	sql_code_cache.c sql_code_dav.c sql_code_dbp.c sql_code_ddk.c \
-	sql_code_imsg.c sql_code_pldbg.c sql_code_repl.c \
-	sql_code_sparql.c sql_code_sys.c sql_code_uddi.c \
-	sql_code_vad.c sql_code_vdb.c sql_code_ws.c sqlcomp2.c \
-	sqlcomp.c sqlcost.c sqlcr.c sqldf.c sqlexp.c sqlgen.c \
-	sqlhash.c sqlintrp.c sqlinx.c sqloby.c sqlo.c sqlocr.c \
-	sqloinv.c sqloinx.c sqloprt.c sqlorder.c sqlovdb.c sqlpfn.c \
-	sqlprocc.c sqlprt.c sqlrun.c sqlsrv.c sqlstmts.c sqltrig.c \
-	sqltype.c sqlver.c sqlview.c srvcr.c srvmultibyte.c srvstat.c \
-	string.c trans.c update.c uuencode.c wirpc.c wiservic.c \
-	xpathp.c xpscn.c $(C_FILES_SPARQL) $(PLDEBUG_FILES) bif_date.c \
-	bif_dav.c bif_explain.c bif_file.c bif_phrasematch.c \
-	bif_smtp.c bif_soap.c bif_text.c bif_tidy.c http_client.c \
-	shuric.c subseq.c text.c uname_const_decl.c xmlenc_algos.c \
-	xmlenc.c xmlenc-dec.c xmlschema.c xmlsearch.c xmlsql.c \
-	xmllazy.c xmltree.c xpath.c xpathp.c xpf.c xqf.c xslt.c \
-	xslt_fmt.c xslt_opt.c $(LDAP_BIF) $(KRB_BIF) $(IMSG_BIF) \
-	bif_xper.c 2pc.c bif_repl.c bif_xml.c odbccat.c sqlrbuf.c \
-	sqlrcomp.c sqlrrun.c wi_xid.c
+	bif_search_excerpt.c bif_uuencode.c bitmap.c blob.c blobio.c \
+	cl_stubs.c datesupp.c ddlrun.c disk.c dks_esc.c extent.c \
+	eqlcomp.c gate.c hash.c hosting.c http.c insert.c inxop.c \
+	json_l.c json_p.c lisprdr.c lock.c log.c map_schema.c meta.c \
+	mtwrite.c multibyte.c neodisk.c numeric.c obackup.c page.c \
+	plugin_loader.c recovery.c regist.c rendezvous.c rltrx.c row.c \
+	schspace.c scn3.c search.c search_in.c security.c shcompo.c \
+	sort.c space.c sql3.c sqlbif2.c sqlbif.c sql_code.c \
+	sql_code_1.c sql_code_2pc.c sql_code_adm.c sql_code_auto.c \
+	sql_code_blog.c sql_code_cache.c sql_code_dav.c sql_code_dbp.c \
+	sql_code_ddk.c sql_code_imsg.c sql_code_pldbg.c \
+	sql_code_repl.c sql_code_sparql.c sql_code_sparql_init.c \
+	sql_code_sys.c sql_code_uddi.c sql_code_vad.c sql_code_vdb.c \
+	sql_code_ws.c sqlcomp2.c sqlcomp.c sqlcost.c sqlcr.c sqldf.c \
+	sqlexp.c sqlgen.c sqlhash.c sqlintrp.c sqlinx.c sqloby.c \
+	sqlo.c sqlocr.c sqloinv.c sqloinx.c sqloprt.c sqlorder.c \
+	sqlovdb.c sqlpfn.c sqlprocc.c sqlprt.c sqlrun.c sqlsrv.c \
+	sqlstmts.c sqltrig.c sqltype.c sqlver.c sqlview.c srvcr.c \
+	srvmultibyte.c srvstat.c string.c trans.c update.c uuencode.c \
+	wirpc.c wiservic.c xpathp.c xpscn.c $(C_FILES_SPARQL) \
+	$(PLDEBUG_FILES) bif_date.c bif_dav.c bif_explain.c bif_file.c \
+	bif_phrasematch.c bif_smtp.c bif_soap.c bif_text.c bif_tidy.c \
+	http_client.c shuric.c subseq.c text.c uname_const_decl.c \
+	xmlenc_algos.c xmlenc.c xmlenc-dec.c xmlschema.c xmlsearch.c \
+	xmlsql.c xmllazy.c xmltree.c xpath.c xpathp.c xpf.c xqf.c \
+	xslt.c xslt_fmt.c xslt_opt.c $(LDAP_BIF) $(KRB_BIF) \
+	$(IMSG_BIF) bif_xper.c 2pc.c bif_repl.c bif_xml.c odbccat.c \
+	sqlrbuf.c sqlrcomp.c sqlrrun.c wi_xid.c
 libwi_base_la_cflags = @VIRT_AM_CFLAGS@ -I$(top_srcdir)/libsrc \
 	-I$(top_srcdir)/libsrc/Dk @ZLIB_INC@ -I$(srcdir) \
 	-I$(top_srcdir)/libsrc/langfunc -I$(top_srcdir)/libsrc/plugin \
@@ -747,7 +759,6 @@ SQL_FILES = \
 	$(srcdir)/system.sql \
 	$(srcdir)/system2.sql \
 	$(srcdir)/odbccat.sql \
-	$(srcdir)/useraggr.sql \
 	$(srcdir)/vt_text.sql \
 	$(srcdir)/phrasematch.sql \
 	$(srcdir)/hosting.sql
@@ -824,6 +835,10 @@ SQL_FILES_REPL = \
 	$(srcdir)/snapshot_repl.sql \
 	$(srcdir)/repl.sql
 
+SQL_FILES_SPARQL_INIT = \
+	$(srcdir)/useraggr.sql \
+	$(srcdir)/sparql_init.sql
+
 SQL_FILES_SPARQL = \
 	$(srcdir)/sparql.sql \
 	$(srcdir)/sparql_io.sql \
@@ -887,7 +902,7 @@ SQL_FILES_WS = \
 	$(top_srcdir)/binsrc/vspx/vspx.xsd \
 	$(top_srcdir)/binsrc/vspx/vspx.xsl
 
-AWK_FILES = $(srcdir)/sql_to_c.awk
+AWK_FILES = $(srcdir)/sql_to_c.awk Makefile.am
 
 #
 # JSON
@@ -927,6 +942,7 @@ EXTRA_DIST = \
 	sql_code_cache_impl.c \
 	sql_to_c.awk \
 	sqlwords.gperf \
+	sparqlwords.gperf \
 	ssl.c \
 	string_tmpl.c
 
@@ -1008,6 +1024,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_pop3.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_regexp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_repl.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_search_excerpt.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_smtp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_soap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-bif_text.Plo at am__quote@
@@ -1095,6 +1112,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_pldbg.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_repl.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_sparql.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_sparql_init.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_sys.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_uddi.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_la-sql_code_vad.Plo at am__quote@
@@ -1185,6 +1203,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_pop3.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_regexp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_repl.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_search_excerpt.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_smtp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_soap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-bif_text.Plo at am__quote@
@@ -1272,6 +1291,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_pldbg.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_repl.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_sparql.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_sparql_init.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_sys.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_uddi.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libwi_odbc_la-sql_code_vad.Plo at am__quote@
@@ -1441,6 +1461,13 @@ libwi_la-bif_regexp.lo: bif_regexp.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -c -o libwi_la-bif_regexp.lo `test -f 'bif_regexp.c' || echo '$(srcdir)/'`bif_regexp.c
 
+libwi_la-bif_search_excerpt.lo: bif_search_excerpt.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -MT libwi_la-bif_search_excerpt.lo -MD -MP -MF $(DEPDIR)/libwi_la-bif_search_excerpt.Tpo -c -o libwi_la-bif_search_excerpt.lo `test -f 'bif_search_excerpt.c' || echo '$(srcdir)/'`bif_search_excerpt.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_la-bif_search_excerpt.Tpo $(DEPDIR)/libwi_la-bif_search_excerpt.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='bif_search_excerpt.c' object='libwi_la-bif_search_excerpt.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -c -o libwi_la-bif_search_excerpt.lo `test -f 'bif_search_excerpt.c' || echo '$(srcdir)/'`bif_search_excerpt.c
+
 libwi_la-bif_uuencode.lo: bif_uuencode.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -MT libwi_la-bif_uuencode.lo -MD -MP -MF $(DEPDIR)/libwi_la-bif_uuencode.Tpo -c -o libwi_la-bif_uuencode.lo `test -f 'bif_uuencode.c' || echo '$(srcdir)/'`bif_uuencode.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_la-bif_uuencode.Tpo $(DEPDIR)/libwi_la-bif_uuencode.Plo
@@ -1868,6 +1895,13 @@ libwi_la-sql_code_sparql.lo: sql_code_sparql.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -c -o libwi_la-sql_code_sparql.lo `test -f 'sql_code_sparql.c' || echo '$(srcdir)/'`sql_code_sparql.c
 
+libwi_la-sql_code_sparql_init.lo: sql_code_sparql_init.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -MT libwi_la-sql_code_sparql_init.lo -MD -MP -MF $(DEPDIR)/libwi_la-sql_code_sparql_init.Tpo -c -o libwi_la-sql_code_sparql_init.lo `test -f 'sql_code_sparql_init.c' || echo '$(srcdir)/'`sql_code_sparql_init.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_la-sql_code_sparql_init.Tpo $(DEPDIR)/libwi_la-sql_code_sparql_init.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sql_code_sparql_init.c' object='libwi_la-sql_code_sparql_init.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -c -o libwi_la-sql_code_sparql_init.lo `test -f 'sql_code_sparql_init.c' || echo '$(srcdir)/'`sql_code_sparql_init.c
+
 libwi_la-sql_code_sys.lo: sql_code_sys.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_la_CFLAGS) $(CFLAGS) -MT libwi_la-sql_code_sys.lo -MD -MP -MF $(DEPDIR)/libwi_la-sql_code_sys.Tpo -c -o libwi_la-sql_code_sys.lo `test -f 'sql_code_sys.c' || echo '$(srcdir)/'`sql_code_sys.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_la-sql_code_sys.Tpo $(DEPDIR)/libwi_la-sql_code_sys.Plo
@@ -2680,6 +2714,13 @@ libwi_odbc_la-bif_regexp.lo: bif_regexp.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -c -o libwi_odbc_la-bif_regexp.lo `test -f 'bif_regexp.c' || echo '$(srcdir)/'`bif_regexp.c
 
+libwi_odbc_la-bif_search_excerpt.lo: bif_search_excerpt.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -MT libwi_odbc_la-bif_search_excerpt.lo -MD -MP -MF $(DEPDIR)/libwi_odbc_la-bif_search_excerpt.Tpo -c -o libwi_odbc_la-bif_search_excerpt.lo `test -f 'bif_search_excerpt.c' || echo '$(srcdir)/'`bif_search_excerpt.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_odbc_la-bif_search_excerpt.Tpo $(DEPDIR)/libwi_odbc_la-bif_search_excerpt.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='bif_search_excerpt.c' object='libwi_odbc_la-bif_search_excerpt.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -c -o libwi_odbc_la-bif_search_excerpt.lo `test -f 'bif_search_excerpt.c' || echo '$(srcdir)/'`bif_search_excerpt.c
+
 libwi_odbc_la-bif_uuencode.lo: bif_uuencode.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -MT libwi_odbc_la-bif_uuencode.lo -MD -MP -MF $(DEPDIR)/libwi_odbc_la-bif_uuencode.Tpo -c -o libwi_odbc_la-bif_uuencode.lo `test -f 'bif_uuencode.c' || echo '$(srcdir)/'`bif_uuencode.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_odbc_la-bif_uuencode.Tpo $(DEPDIR)/libwi_odbc_la-bif_uuencode.Plo
@@ -3107,6 +3148,13 @@ libwi_odbc_la-sql_code_sparql.lo: sql_code_sparql.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -c -o libwi_odbc_la-sql_code_sparql.lo `test -f 'sql_code_sparql.c' || echo '$(srcdir)/'`sql_code_sparql.c
 
+libwi_odbc_la-sql_code_sparql_init.lo: sql_code_sparql_init.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -MT libwi_odbc_la-sql_code_sparql_init.lo -MD -MP -MF $(DEPDIR)/libwi_odbc_la-sql_code_sparql_init.Tpo -c -o libwi_odbc_la-sql_code_sparql_init.lo `test -f 'sql_code_sparql_init.c' || echo '$(srcdir)/'`sql_code_sparql_init.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_odbc_la-sql_code_sparql_init.Tpo $(DEPDIR)/libwi_odbc_la-sql_code_sparql_init.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sql_code_sparql_init.c' object='libwi_odbc_la-sql_code_sparql_init.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -c -o libwi_odbc_la-sql_code_sparql_init.lo `test -f 'sql_code_sparql_init.c' || echo '$(srcdir)/'`sql_code_sparql_init.c
+
 libwi_odbc_la-sql_code_sys.lo: sql_code_sys.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwi_odbc_la_CFLAGS) $(CFLAGS) -MT libwi_odbc_la-sql_code_sys.lo -MD -MP -MF $(DEPDIR)/libwi_odbc_la-sql_code_sys.Tpo -c -o libwi_odbc_la-sql_code_sys.lo `test -f 'sql_code_sys.c' || echo '$(srcdir)/'`sql_code_sys.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libwi_odbc_la-sql_code_sys.Tpo $(DEPDIR)/libwi_odbc_la-sql_code_sys.Plo
@@ -4175,20 +4223,20 @@ json_p.c json_p.h: $(srcdir)/json.y Makefile.am
 json_l.c: $(srcdir)/json.l json_p.h Makefile.am
 	@$(GEN) $(LEX) -o json_l.c -Pjsonyy $(srcdir)/json.l
 
-sqlwords.h: $(srcdir)/sqlwords.gperf
+sqlwords.h: $(srcdir)/sqlwords.gperf Makefile.am
 	@${GEN} --stdout ${GPERF} \
 		-o sqlwords.h \
 		-aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$$ \
 		-Nlex_hash_kw \
 		$(srcdir)/sqlwords.gperf
 
-sql3.c sql3.h: sql3.y
+sql3.c sql3.h: sql3.y Makefile.am
 	@$(GEN) $(YACC) -o sql3.c -vd $(srcdir)/sql3.y
 
-scn3.c: scn3.l sql3.c sqlwords.h
+scn3.c: scn3.l sql3.c sqlwords.h Makefile.am
 	@$(GEN) $(LEX) -o scn3.c $(srcdir)/scn3.l
 
-scn3split.c: scn3.l sql3.c sqlwords.h
+scn3split.c: scn3.l sql3.c sqlwords.h Makefile.am
 	@$(GEN) $(LEX) -o scn3split.c -Pscn3splityy $(srcdir)/scn3.l
 
 $(top_srcdir)/binsrc/cached_resources/cached_resources.c:
@@ -4200,34 +4248,44 @@ sql_code_cache.c: $(top_srcdir)/binsrc/cached_resources/cached_resources.c sql_c
 	@echo "#include \"sql_code_cache_impl.c\"" >> $@
 	@echo "#include \"$(top_srcdir)/binsrc/cached_resources/cached_resources.c\"" >> $@
 
-xpathp.c xpathp.h : xpathp.y
+xpathp.c xpathp.h : xpathp.y Makefile.am
 	@$(GEN) $(YACC) -o xpathp.c -vd -pxpyy $(srcdir)/xpathp.y
 
-xpathp_lex_props.c: list_lex_props.sh xpathp.y
+xpathp_lex_props.c: list_lex_props.sh xpathp.y Makefile.am
 	list_lex_props.sh xpathp.y xpathp_lex_props.c
 
-xpscn.c: xpscn.l xpathp.h
+xpscn.c: xpscn.l xpathp.h Makefile.am
 	@$(GEN) $(LEX) -o xpscn.c -Pxpyy $(srcdir)/xpscn.l
 
-sparql_p.c sparql_p.h: sparql_p.y
+sparqlwords.h: sparqlwords.gperf Makefile.am
+	@$(GEN) --stdout $(GPERF) -o $@ \
+		-aCDGptr \
+		-Kkwd \
+		-L ANSI-C \
+		-k1,2,3,5,7,$$ \
+		--ignore-case \
+		-Nsparql_lex_hash_kw \
+		sparqlwords.gperf
+
+sparql_p.c sparql_p.h: sparql_p.y Makefile.am
 	@$(GEN) $(YACC) -o sparql_p.c -vd -psparyy $(srcdir)/sparql_p.y
 
-sparql_lex_props.c: list_lex_props.sh sparql_p.y
+sparql_lex_props.c: list_lex_props.sh sparql_p.y Makefile.am
 	list_lex_props.sh sparql_p.y sparql_lex_props.c
 
-sparql_l.c: sparql_l.l sparql_p.h
+sparql_l.c: sparql_l.l sparql_p.h Makefile.am
 	@$(GEN) $(LEX) -o sparql_l.c -Psparyy $(srcdir)/sparql_l.l
 
-nquad_p.c nquad_p.h: nquad_p.y
+nquad_p.c nquad_p.h: nquad_p.y Makefile.am
 	@$(GEN) $(YACC) -o nquad_p.c -vd -pnqyy $(srcdir)/nquad_p.y
 
-turtle_p.c turtle_p.h: turtle_p.y
+turtle_p.c turtle_p.h: turtle_p.y Makefile.am
 	@$(GEN) $(YACC) -o turtle_p.c -vd -pttlyy $(srcdir)/turtle_p.y
 
-turtle_lex_props.c: list_lex_props.sh turtle_p.y
+turtle_lex_props.c: list_lex_props.sh turtle_p.y Makefile.am
 	list_lex_props.sh turtle_p.y turtle_lex_props.c
 
-turtle_l.c: turtle_l.l turtle_p.h
+turtle_l.c: turtle_l.l turtle_p.h Makefile.am
 	@$(GEN) $(LEX) -o turtle_l.c -Pttlyy $(srcdir)/turtle_l.l
 
 sql_code.c: $(SQL_FILES) $(AWK_FILES) Makefile.am
@@ -4317,7 +4375,7 @@ sql_code_2pc.c: $(SQL_FILES_2PC) $(AWK_FILES) Makefile.am
 		-v pl_stats=$(PLSTATS) \
 		$(SQL_FILES_2PC)
 
-#sql_code_blog.c: $(SQL_FILES_BLOG) $(AWK_FILES)
+#sql_code_blog.c: $(SQL_FILES_BLOG) $(AWK_FILES) Makefile.am
 #	@${GEN} ${GAWK} -o sql_code_2pc.c -f $(srcdir)/sql_to_c.awk \
 #		-v init_name=_blog -v pl_stats=$(PLSTATS) $(SQL_FILES_BLOG)
 
@@ -4329,6 +4387,14 @@ sql_code_vdb.c: $(SQL_FILES_VDB) $(AWK_FILES) Makefile.am
 		-v pl_stats=$(PLSTATS) \
 		$(SQL_FILES_VDB)
 
+sql_code_sparql_init.c: $(SQL_FILES_SPARQL_INIT) $(AWK_FILES) Makefile.am
+	@${GEN} ${GAWK} \
+		-o sql_code_sparql_init.c \
+		-f $(srcdir)/sql_to_c.awk \
+		-v init_name=_sparql_init \
+		-v pl_stats=$(PLSTATS) \
+		$(SQL_FILES_SPARQL_INIT)
+
 sql_code_sparql.c: $(SQL_FILES_SPARQL) $(AWK_FILES) Makefile.am
 	@${GEN} ${GAWK} \
 		-o sql_code_sparql.c \
@@ -4412,6 +4478,7 @@ generated: \
 	sparql_l.c \
 	sparql_p.c \
 	sparql_p.h \
+	sparqlwords.h \
 	sql3.c \
 	sql_code.c \
 	sql_code_1.c \
diff --git a/libsrc/Wi/aqueue.c b/libsrc/Wi/aqueue.c
index b2bdba1..c142d52 100644
--- a/libsrc/Wi/aqueue.c
+++ b/libsrc/Wi/aqueue.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: aqueue.c,v 1.19.2.5 2010/02/27 22:21:50 source Exp $
+ *  $Id: aqueue.c,v 1.19.2.6 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/aqueue.h b/libsrc/Wi/aqueue.h
index 576d963..47b7e9e 100644
--- a/libsrc/Wi/aqueue.h
+++ b/libsrc/Wi/aqueue.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: aqueue.h,v 1.4.2.3 2010/01/28 01:14:04 source Exp $
+ *  $Id: aqueue.h,v 1.4.2.4 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/arith.c b/libsrc/Wi/arith.c
index 55bb64c..3c14482 100644
--- a/libsrc/Wi/arith.c
+++ b/libsrc/Wi/arith.c
@@ -1,14 +1,14 @@
 /*
  *  arith.c
  *
- *  $Id: arith.c,v 1.13.2.4 2010/12/13 10:24:21 source Exp $
+ *  $Id: arith.c,v 1.13.2.7 2012/03/08 12:55:32 source Exp $
  *
  *  Arithmetic operators and comparisons.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -456,7 +456,7 @@ cmp_dv_box (caddr_t dv, caddr_t box)
 
 
 int
-cmp_boxes_safe (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2)
+cmp_boxes_safe (ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2)
 {
   int inx, n1, n2;
   NUMERIC_VAR (dn1);
@@ -551,12 +551,20 @@ cmp_boxes_safe (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t
 	default:
 	  collation1 = NULL;
 	}
-
       if (IS_WIDE_STRING_DTP (dtp1) && IS_STRING_DTP (dtp2))
-	return compare_wide_to_narrow ((wchar_t *) box1, n1, (unsigned char *) box2, n2);
+        {
+          if (box_flags (box2) & (BF_IRI | BF_UTF8))
+            return compare_wide_to_utf8_with_collation ((wchar_t *) box1, n1, (utf8char *) box2, n2, NULL);
+          else
+            return compare_wide_to_latin1 ((wchar_t *) box1, n1, (unsigned char *) box2, n2);
+        }
       if (IS_STRING_DTP (dtp1) && IS_WIDE_STRING_DTP (dtp2))
 	{
-	  int res = compare_wide_to_narrow ((wchar_t *)box2, n2, (unsigned char *) box1, n1);
+          int res;
+          if (box_flags (box2) & (BF_IRI | BF_UTF8))
+	    res = compare_wide_to_utf8_with_collation ((wchar_t *)box2, n2, (utf8char *) box1, n1, NULL);
+          else
+	    res = compare_wide_to_latin1 ((wchar_t *)box2, n2, (unsigned char *) box1, n1);
 	  return (res == DVC_LESS ? DVC_GREATER :
 	      (res == DVC_GREATER ? DVC_LESS : res));
 	}
@@ -655,10 +663,10 @@ cmp_boxes_safe (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t
 
 #ifdef CMP_MOREDEBUG
 int
-cmp_boxes_old (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2)
+cmp_boxes_old (ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2)
 #else
 int
-cmp_boxes (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2)
+cmp_boxes (ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2)
 #endif
 {
   NUMERIC_VAR (dn1);
@@ -768,10 +776,19 @@ cmp_boxes (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *col
 	}
 
       if (IS_WIDE_STRING_DTP (dtp1) && IS_STRING_DTP (dtp2))
-	return compare_wide_to_narrow ((wchar_t *) box1, n1, (unsigned char *) box2, n2);
-      else if (IS_STRING_DTP (dtp1) && IS_WIDE_STRING_DTP (dtp2))
+        {
+          if (box_flags (box2) & (BF_IRI | BF_UTF8))
+            return compare_wide_to_utf8_with_collation ((wchar_t *) box1, n1, (utf8char *) box2, n2, NULL);
+          else
+            return compare_wide_to_latin1 ((wchar_t *) box1, n1, (unsigned char *) box2, n2);
+        }
+      if (IS_STRING_DTP (dtp1) && IS_WIDE_STRING_DTP (dtp2))
 	{
-	  int res = compare_wide_to_narrow ((wchar_t *)box2, n2, (unsigned char *) box1, n1);
+          int res;
+          if (box_flags (box2) & (BF_IRI | BF_UTF8))
+	    res = compare_wide_to_utf8_with_collation ((wchar_t *)box2, n2, (utf8char *) box1, n1, NULL);
+          else
+	    res = compare_wide_to_latin1 ((wchar_t *)box2, n2, (unsigned char *) box1, n1);
 	  return (res == DVC_LESS ? DVC_GREATER :
 	      (res == DVC_GREATER ? DVC_LESS : res));
 	}
@@ -857,7 +874,7 @@ cmp_boxes (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *col
 
 #ifdef CMP_MOREDEBUG
 int
-cmp_boxes (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2)
+cmp_boxes (ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2)
 {
   int res_safe = cmp_boxes_safe (box1, box2, collation1, collation2);
   int res_old = cmp_boxes_old (box1, box2, collation1, collation2);
@@ -915,7 +932,7 @@ numeric_bin_op (numeric_bop_t num_op, numeric_t x, numeric_t y, caddr_t * qst,
 
 #define ARTM_BIN_FUNC(name, op, num_op, isdiv) \
 caddr_t \
-name (caddr_t box1, caddr_t box2, caddr_t * qst, state_slot_t * target) \
+name (ccaddr_t box1, ccaddr_t box2, caddr_t * qst, state_slot_t * target) \
 { \
   NUMERIC_VAR (dn1); \
   NUMERIC_VAR (dn2); \
@@ -982,7 +999,7 @@ null_result: \
 
 /* equal to ARTM_BIN_FUNC (box_mod, %, numeric_modulo, 1) with some extensions */
 caddr_t
-box_mod (caddr_t box1, caddr_t box2, caddr_t * qst, state_slot_t * target)
+box_mod (ccaddr_t box1, ccaddr_t box2, caddr_t * qst, state_slot_t * target)
 {
   NUMERIC_VAR (dn1);
   NUMERIC_VAR (dn2);
@@ -1051,7 +1068,7 @@ ARTM_BIN_FUNC (box_div, /, numeric_divide, 1)
 
 
 caddr_t
-box_identity (caddr_t arg, caddr_t ignore, caddr_t * qst, state_slot_t * target)
+box_identity (ccaddr_t arg, ccaddr_t ignore, caddr_t * qst, state_slot_t * target)
 {
   if (target)
     {
diff --git a/libsrc/Wi/arith.h b/libsrc/Wi/arith.h
index 66eff8f..71eac30 100644
--- a/libsrc/Wi/arith.h
+++ b/libsrc/Wi/arith.h
@@ -1,12 +1,12 @@
 /*
  *  arith.h
  *
- *  $Id: arith.h,v 1.4.2.1 2009/04/18 21:55:09 source Exp $
+ *  $Id: arith.h,v 1.4.2.3 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -37,22 +37,16 @@ int cmp_dv_box (caddr_t dv, caddr_t box);
 
 int cmp_double (double x1, double x2, double epsilon);
 
-extern int cmp_boxes (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2);
-extern int cmp_boxes_safe (caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2);
-extern int bool_bop_boxes (int bop, caddr_t box1, caddr_t box2, collation_t *collation1, collation_t *collation2);
+extern int cmp_boxes (ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2);
+extern int cmp_boxes_safe (ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2);
+extern int bool_bop_boxes (int bop, ccaddr_t box1, ccaddr_t box2, collation_t *collation1, collation_t *collation2);
 
-caddr_t box_add (caddr_t l, caddr_t r, caddr_t * qst, state_slot_t * target);
-
-caddr_t box_sub (caddr_t l, caddr_t r, caddr_t * qst, state_slot_t * target);
-
-caddr_t box_div (caddr_t l, caddr_t r, caddr_t * qst, state_slot_t * target);
-
-caddr_t box_mpy (caddr_t l, caddr_t r, caddr_t * qst, state_slot_t * target);
-
-caddr_t box_mod (caddr_t l, caddr_t r, caddr_t * qst, state_slot_t * target);
-
-caddr_t box_identity (caddr_t arg, caddr_t ignore, caddr_t * qst,
-    state_slot_t * target);
+caddr_t box_add (ccaddr_t l, ccaddr_t r, caddr_t * qst, state_slot_t * target);
+caddr_t box_sub (ccaddr_t l, ccaddr_t r, caddr_t * qst, state_slot_t * target);
+caddr_t box_div (ccaddr_t l, ccaddr_t r, caddr_t * qst, state_slot_t * target);
+caddr_t box_mpy (ccaddr_t l, ccaddr_t r, caddr_t * qst, state_slot_t * target);
+caddr_t box_mod (ccaddr_t l, ccaddr_t r, caddr_t * qst, state_slot_t * target);
+caddr_t box_identity (ccaddr_t arg, ccaddr_t ignore, caddr_t * qst, state_slot_t * target);
 
 #ifndef _WI_STRLIKE_H
 #include "strlike.h"
diff --git a/libsrc/Wi/autoexec.sql b/libsrc/Wi/autoexec.sql
index eb43db6..9f0b061 100644
--- a/libsrc/Wi/autoexec.sql
+++ b/libsrc/Wi/autoexec.sql
@@ -1,10 +1,10 @@
 --
---  $Id: autoexec.sql,v 1.6.2.2 2010/01/31 20:36:37 source Exp $
+--  $Id: autoexec.sql,v 1.6.2.3 2012/03/08 12:55:32 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/auxfiles.c b/libsrc/Wi/auxfiles.c
index 1b69fa3..a0d5049 100644
--- a/libsrc/Wi/auxfiles.c
+++ b/libsrc/Wi/auxfiles.c
@@ -1,7 +1,7 @@
 /*
  *  auxfiles.c
  *
- *  $Id: auxfiles.c,v 1.20.2.8 2010/09/17 16:35:46 source Exp $
+ *  $Id: auxfiles.c,v 1.20.2.10 2012/03/08 12:55:32 source Exp $
  *
  *  License file (license.dat)
  *  Error logging (wi.err)
@@ -10,7 +10,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -127,6 +127,7 @@ int c_stripe_unit = 256;
 extern int32 sqlo_compiler_exceeds_run_factor;
 
 int32 c_dense_page_allocation = 0;
+int32 log_proc_overwrite = 1;
 
 void _db_read_cfg (dbe_storage_t * dbs, char *mode);
 dk_set_t _cfg_read_storages (caddr_t **temp_storage);
diff --git a/libsrc/Wi/bif_audio.c b/libsrc/Wi/bif_audio.c
index cdd5c36..3ef6f19 100644
--- a/libsrc/Wi/bif_audio.c
+++ b/libsrc/Wi/bif_audio.c
@@ -1,12 +1,12 @@
 /*
  *  bif_audio.c
  *
- *  $Id: bif_audio.c,v 1.2.2.1 2010/03/08 12:02:22 source Exp $
+ *  $Id: bif_audio.c,v 1.2.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_audio_tags.h b/libsrc/Wi/bif_audio_tags.h
index 1473cd7..e28410a 100644
--- a/libsrc/Wi/bif_audio_tags.h
+++ b/libsrc/Wi/bif_audio_tags.h
@@ -1,12 +1,12 @@
 /*
- *  $Id: bif_audio_tags.h,v 1.2 2009/04/09 13:22:11 source Exp $
+ *  $Id: bif_audio_tags.h,v 1.2.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  Tag definitions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 2007 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_crypto.c b/libsrc/Wi/bif_crypto.c
index 3764ba5..6d18958 100644
--- a/libsrc/Wi/bif_crypto.c
+++ b/libsrc/Wi/bif_crypto.c
@@ -1,14 +1,14 @@
 /*
  *  bif_crypto.c
  *
- *  $Id: bif_crypto.c,v 1.8.2.5 2011/01/27 14:19:53 source Exp $
+ *  $Id: bif_crypto.c,v 1.8.2.9 2012/03/08 12:55:32 source Exp $
  *
  *  Cryptography functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -529,9 +529,11 @@ bif_asn1_to_xml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   int len = 0;
   char tmpbuf[100000];
   caddr_t bytes = bif_string_arg (qst, args, 0, "asn1_to_xml");
-  long length = bif_long_arg (qst, args, 1, "asn1_to_xml");
+  long length = BOX_ELEMENTS (args) > 1 ? bif_long_arg (qst, args, 1, "asn1_to_xml") : 0;
   if (!(out = BIO_new (BIO_s_mem ())))
     return NEW_DB_NULL;
+  if (0 == length)
+    length = box_length (bytes) - 1;
   if (asn1_parse_to_xml (out, (unsigned char **) &bytes, length, 0, 0, 0, 1) != 1)
     {
       res = NEW_DB_NULL;
@@ -1244,7 +1246,13 @@ BN_box (BIGNUM * x)
   return buf;
 }
 
-
+/*
+   1 - info type
+   2 - certificate
+   3 - certifcate file type (1 - DER, 2 - PKCS12, 0 - PEM, 3 - internal key name)
+   4 - password to open pkcs12 bundle
+   5 - extension OID (7); attribute e.g. CN (10)
+*/
 static caddr_t
 bif_get_certificate_info (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
@@ -1382,6 +1390,14 @@ bif_get_certificate_info (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args
 	unsigned int n;
 	unsigned char md[EVP_MAX_MD_SIZE];
 	char tmp[4];
+	char *digest_name = (char *) (BOX_ELEMENTS (args) > 4 ? bif_string_or_null_arg (qst, args, 4, "get_certificate_info") : NULL);
+
+	if (digest_name)
+	  {
+	    digest = EVP_get_digestbyname (digest_name);
+	    if (!digest)
+	      sqlr_new_error ("22023", "SR...", "Can not find digest %s", digest_name);
+	  }
 
 	if (!X509_digest (cert, digest, md, &n))
 	  {
@@ -1501,6 +1517,41 @@ bif_get_certificate_info (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args
 	BIO_free (mem);
 	break;
       }
+    case 11:
+      {
+	X509_NAME *subj = X509_get_subject_name (cert);
+	X509_NAME_ENTRY *ne;
+	int n, i, len;
+	char *s, *data_ptr;
+	dk_set_t set = NULL; 
+	caddr_t val;
+	BIO *mem = BIO_new (BIO_s_mem ());
+	for (i = 0; NULL != subj && i < sk_X509_NAME_ENTRY_num(subj->entries); i++)
+	  {
+	    val = NULL;
+	    ne = sk_X509_NAME_ENTRY_value(subj->entries,i);
+	    n = OBJ_obj2nid (ne->object);
+	    if ((n == NID_undef) || ((s = OBJ_nid2sn (n)) == NULL))
+	      {
+		i2t_ASN1_OBJECT (buffer, sizeof (buffer), ne->object);
+		s = buffer;
+	      }
+	    ASN1_STRING_print (mem, ne->value);
+	    len = BIO_get_mem_data (mem, &data_ptr);
+	    if (len > 0 && data_ptr)
+	      {
+		val = dk_alloc_box (len + 1, DV_SHORT_STRING);
+		memcpy (val, data_ptr, len);
+		val[len] = 0;
+	      }
+	    dk_set_push (&set, box_dv_short_string (s));
+	    dk_set_push (&set, val ? val : NEW_DB_NULL);
+	    BIO_reset (mem);
+	  }
+	BIO_free (mem);
+	ret = list_to_array (dk_set_nreverse (set));
+	break;
+      }
     default:
       {
 	if (!internal)
@@ -1532,6 +1583,33 @@ bif_bin2hex (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 }
 
 static caddr_t
+bif_hex2bin (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t str = bif_string_arg (qst, args, 0, "hex2bin");
+  caddr_t out;
+  uint32 inx, len = box_length (str) - 1;
+  unsigned int tmp;
+
+  if (!len)
+    return NEW_DB_NULL;
+  if (len % 2)
+    sqlr_new_error ("22023", "ENC..", "The input string must have a length multiple by two");
+  out = dk_alloc_box (len / 2, DV_BIN);
+  out[0] = 0;
+  for (inx = 0; inx < len; inx += 2)
+    {
+      if (1 != sscanf (str+inx, "%02x", &tmp))
+	{
+	  dk_free_box (out);
+	  sqlr_new_error ("22023", "ENC..", "The input string does not contains hexadecimal string");
+	}
+      out [inx/2] = (unsigned char) tmp;
+    }
+  return out;
+}
+
+
+static caddr_t
 bif_sha1_digest (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t data = (caddr_t) bif_string_arg (qst, args, 0, "sha1");
@@ -1562,6 +1640,7 @@ bif_crypto_init (void)
   bif_define_typed ("get_certificate_info", bif_get_certificate_info, &bt_any);
   bif_define_typed ("x509_certificate_verify", bif_x509_certificate_verify, &bt_any);
   bif_define_typed ("bin2hex", bif_bin2hex, &bt_varchar);
+  bif_define_typed ("hex2bin", bif_hex2bin, &bt_bin);
 }
 
 #else /* _SSL dummy section for bifs that are defined here to not break existing apps */
diff --git a/libsrc/Wi/bif_date.c b/libsrc/Wi/bif_date.c
index f92a59b..cdd22c6 100644
--- a/libsrc/Wi/bif_date.c
+++ b/libsrc/Wi/bif_date.c
@@ -1,14 +1,14 @@
 /*
  *  bif_date.c
  *
- *  $Id: bif_date.c,v 1.12.2.3 2011/03/03 11:56:44 source Exp $
+ *  $Id: bif_date.c,v 1.12.2.8 2012/03/08 12:55:32 source Exp $
  *
  *  Bifs for date
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -459,6 +459,49 @@ bif_timezone (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return box_num (DT_TZ (arg));
 }
 
+#define NASA_TJD_OFFSET (2440000 - 1721423)
+
+caddr_t
+bif_nasa_tjd_number (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t arg = bif_date_arg (qst, args, 0, "nasa_tjd_number");
+  long n = DT_DAY (arg) - NASA_TJD_OFFSET;
+  return box_num (n);
+}
+
+caddr_t
+bif_nasa_tjd_fraction (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t arg = bif_date_arg (qst, args, 0, "nasa_tjd_fraction");
+  double f = (((DT_HOUR (arg) * (boxint)60 + DT_MINUTE (arg)) * (boxint)60 + DT_SECOND (arg)) * (boxint)1000000 + DT_FRACTION (arg)) / (60*60*24*1000000.0);
+  return box_double (f);
+}
+
+caddr_t
+bif_merge_nasa_tjd_to_datetime (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  boxint num = bif_long_arg (qst, args, 0, "merge_nasa_tjd_to_datetime");
+  caddr_t res = dk_alloc_box_zero (DT_LENGTH, DV_DATETIME);
+  DT_SET_DAY (res, num + NASA_TJD_OFFSET);
+  if (1 < BOX_ELEMENTS (args))
+    {
+      double frac = bif_double_arg (qst, args, 1, "merge_nasa_tjd_to_datetime");
+      boxint frac_microsec = frac * (60*60*24*1000000.0);
+      if ((0 > frac_microsec) || (60*60*24*(boxint)(1000000) <= frac_microsec))
+        sqlr_new_error ("22023", "SR644", "Fraction of julian day should be nonnegative and less than 1");
+      DT_SET_FRACTION (res, (frac_microsec % 1000000) * 1000);
+      frac_microsec = frac_microsec / 1000000;
+      DT_SET_SECOND (res, (frac_microsec % 60));
+      frac_microsec = frac_microsec / 60;
+      DT_SET_MINUTE (res, (frac_microsec % 60));
+      frac_microsec = frac_microsec / 60;
+      DT_SET_HOUR (res, frac_microsec);
+      DT_SET_DT_TYPE (res, DT_TYPE_DATETIME);
+    }
+  else
+    DT_SET_DT_TYPE (res, DT_TYPE_DATE);
+  return res;
+}
 
 caddr_t
 bif_date_add (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
@@ -488,48 +531,42 @@ bif_date_diff (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t unit = bif_string_arg (qst, args, 0, "datediff");
   caddr_t dt1 = bif_date_arg (qst, args, 1, "datediff");
   caddr_t dt2 = bif_date_arg (qst, args, 2, "datediff");
-  TIMESTAMP_STRUCT ts1;
-  TIMESTAMP_STRUCT ts2;
-  boxint s1 = (boxint)DT_DAY (dt1) * 24 * 60 * 60 + DT_HOUR (dt1) * 60 * 60 + DT_MINUTE (dt1) * 60 + DT_SECOND (dt1);
-  boxint s2 = (boxint)DT_DAY (dt2) * 24 * 60 * 60 + DT_HOUR (dt2) * 60 * 60 + DT_MINUTE (dt2) * 60 + DT_SECOND (dt2);
-  int tz_tweak = DT_TZ (dt1);
-
+  boxint s1 = (boxint)DT_DAY (dt1) * 24 * 60 * 60 + (boxint)DT_HOUR (dt1) * 60 * 60 + (boxint)DT_MINUTE (dt1) * 60 + DT_SECOND (dt1);
+  boxint s2 = (boxint)DT_DAY (dt2) * 24 * 60 * 60 + (boxint)DT_HOUR (dt2) * 60 * 60 + (boxint)DT_MINUTE (dt2) * 60 + DT_SECOND (dt2);
+  int frac1, frac2;
+  int diffyear, diffmonth;
   if (0 == stricmp (unit, "day"))
     return box_num ((boxint)DT_DAY (dt2) - (boxint)DT_DAY (dt1));
-
   if (0 == stricmp (unit, "hour"))
     return box_num ((s2 - s1) / (60 * 60));
-
   if (0 == stricmp (unit, "minute"))
     return box_num ((s2 - s1) / 60);
-
   if (0 == stricmp (unit, "second"))
     return box_num (s2 - s1);
-
-  dt_to_GMTimestamp_struct (dt2, &ts2);
-  dt_to_GMTimestamp_struct (dt1, &ts1);
-
-  if (0 == stricmp (unit, "month"))
+  diffyear = !stricmp (unit, "year");
+  diffmonth = (diffyear ? 0 : !stricmp (unit, "month"));
+  if (diffyear || diffmonth)
     {
+      TIMESTAMP_STRUCT ts1;
+      TIMESTAMP_STRUCT ts2;
+      int tz_tweak = DT_TZ (dt1);
+      dt_to_GMTimestamp_struct (dt2, &ts2);
+      dt_to_GMTimestamp_struct (dt1, &ts1);
       ts_add (&ts1, tz_tweak, "minute");
       ts_add (&ts2, tz_tweak, "minute");
-      return box_num ((boxint)(ts2.year * 12 + ts2.month) - (boxint)(ts1.year * 12 + ts1.month));
+      if (diffyear)
+        return box_num ((boxint)ts2.year - (boxint)ts1.year);
+      if (diffmonth)
+        return box_num ((boxint)(ts2.year * 12 + ts2.month) - (boxint)(ts1.year * 12 + ts1.month));
     }
-
-  if (0 == stricmp (unit, "year"))
-    {
-      ts_add (&ts1, tz_tweak, "minute");
-      ts_add (&ts2, tz_tweak, "minute");
-      return box_num ((boxint)ts2.year - (boxint)ts1.year);
-    }
-
+  frac1 = DT_FRACTION(dt1);
+  frac2 = DT_FRACTION(dt2);
   if (0 == stricmp (unit, "millisecond"))
-    return box_num ((s2 - s1) * 1000 + (ts2.fraction / 1000000 - ts1.fraction / 1000000));
+    return box_num ((s2 - s1) * (boxint)1000 + (frac2 / 1000000 - frac1 / 1000000));
   if (0 == stricmp (unit, "microsecond"))
-    return box_num ((s2 - s1) * (boxint)1000000 + (ts2.fraction / 1000 - ts1.fraction / 1000));
+    return box_num ((s2 - s1) * (boxint)1000000 + (frac2 / 1000 - frac1 / 1000));
   if (0 == stricmp (unit, "nanosecond"))
-    return box_num ((s2 - s1) * (boxint)1000000000 + (ts2.fraction - ts1.fraction));
-
+    return box_num ((s2 - s1) * (boxint)1000000000 + (frac2 - frac1));
   sqlr_new_error ("22023", "DT002", "Bad unit in datediff: %s.", unit);
   return NULL;
 }
@@ -819,6 +856,15 @@ bif_date_init ()
   bif_define_typed ("minute", bif_minute, &bt_integer);
   bif_define_typed ("second", bif_second, &bt_integer);
   bif_define_typed ("timezone", bif_timezone, &bt_integer);
+  bif_define_typed ("rdf_now_impl", bif_timestamp, &bt_timestamp);
+  bif_define_typed ("rdf_year_impl", bif_year, &bt_integer);
+  bif_define_typed ("rdf_month_impl", bif_month, &bt_integer);
+  bif_define_typed ("rdf_day_impl", bif_day, &bt_integer);
+  bif_define_typed ("rdf_hours_impl", bif_hour, &bt_integer);
+  bif_define_typed ("rdf_minutes_impl", bif_minute, &bt_integer);
+  bif_define_typed ("nasa_tjd_number", bif_nasa_tjd_number, &bt_integer);
+  bif_define_typed ("nasa_tjd_fraction", bif_nasa_tjd_fraction, &bt_double);
+  bif_define_typed ("merge_nasa_tjd_to_datetime", bif_merge_nasa_tjd_to_datetime, &bt_datetime);
 
   bif_define_typed ("now", bif_timestamp, &bt_timestamp);	/* This is standard name */
   bif_define_typed ("getdate", bif_timestamp, &bt_datetime);	/* This is standard name? */
diff --git a/libsrc/Wi/bif_dav.c b/libsrc/Wi/bif_dav.c
index 9c0ad91..1500cfa 100644
--- a/libsrc/Wi/bif_dav.c
+++ b/libsrc/Wi/bif_dav.c
@@ -1,14 +1,14 @@
 /*
  *  bif_dav.c
  *
- *  $Id: bif_dav.c,v 1.5.2.3 2009/11/19 20:16:37 source Exp $
+ *  $Id: bif_dav.c,v 1.5.2.5 2012/03/08 12:55:32 source Exp $
  *
  *  DAV support
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -162,9 +162,6 @@ ws_dav_put (ws_connection_t * ws, query_t * http_call)
   int inx = 0;
   blob_handle_t *bh = NULL;
   caddr_t content_transfer_encoding = ws_mime_header_field (ws->ws_lines, "Transfer-Encoding", NULL, 0);
-
-  log_dav (ws, 0);
-
   pmethod = strchr (ws->ws_req_line, '\x20');
   if (pmethod)
     {
@@ -299,12 +296,7 @@ ws_dav (ws_connection_t * ws, query_t * http_call)
   char method_name[100];
   int inx = 0;
   char *szContentType = ws_header_field (ws->ws_lines, "Content-type:", "application/octet-stream");
-
-  if (!strcmp (ws->ws_method_name, "PUT"))
-    return ws_dav_put (ws, http_call);
-
   log_dav (ws, 0);
-
   pmethod = strchr (ws->ws_req_line, '\x20');
   if (pmethod)
     {
@@ -314,10 +306,26 @@ ws_dav (ws_connection_t * ws, query_t * http_call)
       strncpy (method_name, ws->ws_req_line, method_len);
       method_name[method_len] = 0;
       snprintf (p_name, sizeof (p_name), "WS.WS.%s", method_name);
+/* The processing of request body does not depend on config or content of our server because the client forms it according to the HTTP specs, not according to our data or bugs */
+      if (ws->ws_req_body && strcmp (p_name, "WS.WS.POST") && strcmp (p_name, "WS.WS.MPUT") && strcmp (p_name, "WS.WS.MDELETE"))
+        {
+          ses = ws->ws_req_body;
+          ws->ws_req_body = NULL;
     }
   else
+        ses = strses_allocate ();
+      dk_set_push (&parts, box_dv_short_string ("Content"));
+      dk_set_push (&parts, ses);
+    }
+  if (ws->ws_map->hm_exec_as_get)
+    {
+      strcpy_ck (p_name, "WS.WS.GET");
+      goto p_name_is_set;
+    }
+  if (!strcmp (ws->ws_method_name, "PUT"))
+    return ws_dav_put (ws, http_call);
+  else if (NULL == pmethod)
     strcpy_ck (p_name, "WS.WS.DEFAULT");
-
   if (!sch_proc_def (/*isp_schema (db_main_tree->it_commit_space)*/ wi_inst.wi_schema, p_name))
     strcpy_ck (p_name, "WS.WS.DEFAULT");
   else
@@ -345,17 +353,8 @@ ws_dav (ws_connection_t * ws, query_t * http_call)
       if (ts1)
 	dk_free_box (ts1);
     }
-  if (ws->ws_req_body && strcmp (p_name, "WS.WS.POST") && strcmp (p_name, "WS.WS.MPUT") && strcmp (p_name, "WS.WS.MDELETE"))
-    {
-      ses = ws->ws_req_body;
-      ws->ws_req_body = NULL;
-    }
-  else
-    ses = strses_allocate ();
-
-  dk_set_push (&parts, box_dv_short_string ("Content"));
-  dk_set_push (&parts, ses);
 
+p_name_is_set:
   while (*szContentType && *szContentType <= '\x20')
     szContentType++;
   if (!strnicmp (szContentType, "multipart", 9))
diff --git a/libsrc/Wi/bif_diff.c b/libsrc/Wi/bif_diff.c
index 6441815..6bb41ba 100644
--- a/libsrc/Wi/bif_diff.c
+++ b/libsrc/Wi/bif_diff.c
@@ -1,14 +1,14 @@
 /*
  *  sqlbif.c
  *
- *  $Id: bif_diff.c,v 1.4.2.1 2009/04/18 21:55:09 source Exp $
+ *  $Id: bif_diff.c,v 1.4.2.2 2012/03/08 12:55:32 source Exp $
  *
  *  Diff functionality
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_explain.c b/libsrc/Wi/bif_explain.c
index ce68e3b..c888a8d 100644
--- a/libsrc/Wi/bif_explain.c
+++ b/libsrc/Wi/bif_explain.c
@@ -1,14 +1,14 @@
 /*
  *  bif_explain.c
  *
- *  $Id: bif_explain.c,v 1.17.2.13 2011/02/11 13:19:31 source Exp $
+ *  $Id: bif_explain.c,v 1.17.2.15 2012/03/08 12:55:32 source Exp $
  *
  *  Implements bif 'explain'
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -863,6 +863,15 @@ node_print (data_source_t * node)
       insert_node_t *ins = (insert_node_t *) node;
       stmt_printf (("Insert %s ", ins->ins_table->tb_name));
       ssl_list_print (ins->ins_values);
+      if (ins->ins_key_only)
+	stmt_printf ((" only key %s ", ins->ins_key_only));
+      if (ins->ins_daq)
+	{
+	  stmt_printf ((" DAQ ("));
+	  ssl_print (ins->ins_daq);
+	  stmt_printf ((")"));
+	}
+      stmt_printf (("\n"));
     }
   else if (in == (qn_input_fn) select_node_input_subq)
     {
diff --git a/libsrc/Wi/bif_file.c b/libsrc/Wi/bif_file.c
index 4cba56b..058e500 100644
--- a/libsrc/Wi/bif_file.c
+++ b/libsrc/Wi/bif_file.c
@@ -1,14 +1,14 @@
 /*
  *  bif_file.c
  *
- *  $Id: bif_file.c,v 1.44.2.34 2011/02/10 20:58:38 source Exp $
+ *  $Id: bif_file.c,v 1.44.2.40 2012/03/08 12:55:32 source Exp $
  *
  *  Bifs for file I/O
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1340,77 +1340,111 @@ file_native_name (caddr_t se_name)
     {
     case DV_WIDE:
       {
-        int wchars;
-        int bufsize;
-        caddr_t buf;
-        char *buf_end, *end_of_dat;
-        wchars = box_length (se_name) / sizeof (wchar_t) - 1;
-        if (wchars > (PATH_MAX * 10))
-          wchars = PATH_MAX * 10;
-        bufsize = wchars * i18n_volume_encoding->eh_maxsize;
-        buf = dk_alloc_box (bufsize + 1, DV_STRING);
-        buf_end = buf + bufsize;
-        end_of_dat = i18n_volume_encoding->eh_encode_wchar_buffer (
-          ((const wchar_t *)se_name), ((const wchar_t *)se_name) + wchars, buf, buf_end,
-          i18n_volume_encoding );
-        if (end_of_dat == buf_end)
-          {
-            buf_end[0] = '\0';
-            volume_fname = buf;
-          }
-        else
-          {
-            volume_fname = box_dv_short_nchars (buf, end_of_dat - buf);
-            dk_free_box (buf);
-          }
-        break;
+	int wchars;
+	int bufsize;
+	caddr_t buf;
+	char *buf_end, *end_of_dat;
+	wchars = box_length (se_name) / sizeof (wchar_t) - 1;
+	if (wchars > (PATH_MAX * 10))
+	  wchars = PATH_MAX * 10;
+	bufsize = wchars * i18n_volume_encoding->eh_maxsize;
+	buf = dk_alloc_box (bufsize + 1, DV_STRING);
+	buf_end = buf + bufsize;
+	end_of_dat = i18n_volume_encoding->eh_encode_wchar_buffer (
+	    ((const wchar_t *) se_name), ((const wchar_t *) se_name) + wchars, buf, buf_end, i18n_volume_encoding);
+	if (end_of_dat == buf_end)
+	  {
+	    buf_end[0] = '\0';
+	    volume_fname = buf;
+	  }
+	else
+	  {
+	    volume_fname = box_dv_short_nchars (buf, end_of_dat - buf);
+	    dk_free_box (buf);
+	  }
+	break;
       }
     case DV_STRING:
       {
-        long len = box_length (se_name) - 1;
-        if (len > PATH_MAX * 30)
-          len = PATH_MAX * 30;
-        volume_fname = box_dv_short_nchars (se_name, len);
-        break;
+	long len = box_length (se_name) - 1;
+	if (len > PATH_MAX * 30)
+	  len = PATH_MAX * 30;
+	volume_fname = box_dv_short_nchars (se_name, len);
+	break;
       }
     case DV_UNAME:
       if (&eh__UTF8 == i18n_volume_encoding)
-        {
-          long len = box_length (se_name) - 1;
-          if (len > PATH_MAX * 30)
-            len = PATH_MAX * 30;
-          volume_fname = box_dv_short_nchars (se_name, len);
-        }
+	{
+	  long len = box_length (se_name) - 1;
+	  if (len > PATH_MAX * 30)
+	    len = PATH_MAX * 30;
+	  volume_fname = box_dv_short_nchars (se_name, len);
+	}
       else
-        {
-          caddr_t se1, res;
-          long len = box_length (se_name) - 1;
-          if (len > PATH_MAX * 30)
-            len = PATH_MAX * 30;
-          se1 = box_utf8_as_wide_char (se_name, NULL, len, 0, DV_WIDE);
-          res = file_native_name (se1);
-          dk_free_box (se1);
-          return res;
-        }
+	{
+	  caddr_t se1, res;
+	  long len = box_length (se_name) - 1;
+	  if (len > PATH_MAX * 30)
+	    len = PATH_MAX * 30;
+	  se1 = box_utf8_as_wide_char (se_name, NULL, len, 0, DV_WIDE);
+	  res = file_native_name (se1);
+	  dk_free_box (se1);
+	  return res;
+	}
       break;
     default:
       {
-        GPF_T1 ("Bad box type for file name");
-        volume_fname = NULL; /* to keep the compiler happy */
+	GPF_T1 ("Bad box type for file name");
+	volume_fname = NULL;	/* to keep the compiler happy */
       }
     }
 #ifdef HAVE_DIRECT_H
   for (fname_tail = volume_fname; fname_tail[0]; fname_tail++)
     {
-      if ('/' == fname_tail[0])
-	fname_tail[0] = '\\';
+      switch (fname_tail[0])
+	{
+	  /* case '|': fname_tail[0] = ':'; break; */
+	case '/':
+	  fname_tail[0] = '\\';
+	  break;
+	}
     }
-   if ((fname_tail - 1) >= volume_fname && *(fname_tail - 1) == '\\')
-      *(fname_tail - 1) = 0;
+  if ((fname_tail - 1) >= volume_fname && *(fname_tail - 1) == '\\')
+    *(fname_tail - 1) = 0;
 #endif
+  dk_check_tree (volume_fname);
   return volume_fname;
 }
 
+caddr_t
+file_native_name_from_iri_path_nchars (const char *iri_path, size_t iri_path_len)
+{
+  caddr_t fname;
+#ifdef WIN32
+  char *fname_ptr, *fname_end;
+  if (iri_path_len >= _MAX_PATH)
+    iri_path_len = _MAX_PATH-1;
+  fname = box_dv_short_nchars (iri_path, iri_path_len);
+  fname_end = fname + iri_path_len;
+  for (fname_ptr = fname; fname_ptr < fname_end; fname_ptr++)
+    {
+      switch (fname_ptr[0])
+        {
+        case '|':
+          fname_ptr[0] = ':';
+          break;
+        case '/':
+          fname_ptr[0] = '\\';
+          break;
+        }
+    }
+#else
+  fname = box_dv_short_nchars (iri_path, iri_path_len);
+#endif
+  return fname;
+}
+
+
 /* IvAn/WinFileNames/000815
    1. File descriptor's leaks has removed.
    2. Error handling extended by the case of "failed lseek".
@@ -1854,6 +1888,27 @@ bif_cfg_item_value (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 }
 
 
+static PCONFIG _bif_pconfig = NULL;
+
+caddr_t
+bif_virtuoso_ini_item_value (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  char *pszSection, *pszItemName;
+  char *pItemValue = NULL;
+
+  pszSection = bif_string_arg (qst, args, 0, "virtuoso_ini_item_value");
+  pszItemName = bif_string_arg (qst, args, 1, "virtuoso_ini_item_value");
+
+  if (!_bif_pconfig || cfg_refresh (_bif_pconfig) != 0)
+    sqlr_new_error ("39000", "FA055", "Could not open %s ", f_config_file);
+
+  if (cfg_find (_bif_pconfig, pszSection, pszItemName) == 0)
+    pItemValue = box_dv_short_string (_bif_pconfig->value);
+
+  return pItemValue ? pItemValue : NEW_DB_NULL;
+}
+
+
 /* sets the value of the named setting in the selected section	  */
 /* arguments :							  */
 /*			  String FileName - the file to parse		 */
@@ -6140,7 +6195,14 @@ signal_error:
 }
 
 
+#if defined(__APPLE__)
+#define fseeko64 fseeko
+#define ftello64 ftello
+#define fopen64  fopen
+#endif
+
 #include "zlib/contrib/minizip/unzip.h"
+#include "zlib/contrib/minizip/ioapi.h"
 #include "zlib/contrib/minizip/ioapi.c"
 #include "zlib/contrib/minizip/unzip.c"
 
@@ -6297,7 +6359,7 @@ err_end:
 #define CSV_FIELD(set,ses) \
     do \
 	{ \
-	  dk_set_push (&set, csv_field (ses)); \
+	  dk_set_push (&set, csv_field (ses, mode)); \
 	  strses_flush (ses); \
 	  quoted = 0; \
 	  state = CSV_FIELD_NOT_STARTED; \
@@ -6324,10 +6386,14 @@ err_end:
 #define CSV_LAX		2
 
 static caddr_t
-csv_field (dk_session_t * ses)
+csv_field (dk_session_t * ses, int mode)
 {
   caddr_t regex, ret = NULL, str = strses_string (ses);
-  if (NULL != (regex = regexp_match_01 ("^[\\+\\-]?[0-9]+\\.[0-9]*$", str, 0)))
+  if (mode == CSV_LAX && !strcmp (str, "NULL"))
+    {
+      ret = NEW_DB_NULL;
+    }
+  else if (NULL != (regex = regexp_match_01 ("^[\\+\\-]?[0-9]+\\.[0-9]*$", str, 0)))
     {
       float d = 0;
       sscanf (str, "%f", &d);
@@ -6577,6 +6643,7 @@ bif_file_init (void)
   bif_define_typed ("file_append_to_string_output", bif_file_append_to_string_session, &bt_integer);
   bif_define_typed ("file_append_to_string_output_utf8", bif_file_append_to_string_session_utf8, &bt_integer);
   bif_define_typed ("virtuoso_ini_path", bif_virtuoso_ini_path, &bt_varchar);
+  bif_define_typed ("virtuoso_ini_item_value", bif_virtuoso_ini_item_value, &bt_varchar);
   bif_define_typed ("cfg_section_count", bif_cfg_section_count, &bt_integer);
   bif_define_typed ("cfg_item_count", bif_cfg_item_count, &bt_integer);
   bif_define_typed ("cfg_section_name", bif_cfg_section_name, &bt_varchar);
@@ -6655,5 +6722,8 @@ bif_file_init (void)
   init_file_acl_set ("/usr/bin/mdimport", &dba_execs_set);
 #endif
   set_ses_tmp_dir ();
+
+  cfg_init (&_bif_pconfig, f_config_file);
+
   dk_mem_hooks(DV_FD, box_non_copiable, (box_destr_f) filep_destroy, 0);
 }
diff --git a/libsrc/Wi/bif_gnw.c b/libsrc/Wi/bif_gnw.c
index 90b4a79..e263f05 100644
--- a/libsrc/Wi/bif_gnw.c
+++ b/libsrc/Wi/bif_gnw.c
@@ -1,14 +1,14 @@
 /*
  *  bif_gnw.c
  *
- *  $Id: bif_gnw.c,v 1.4.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_gnw.c,v 1.4.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  GNW specific extensions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_imap.c b/libsrc/Wi/bif_imap.c
index a5e8432..39a2e08 100644
--- a/libsrc/Wi/bif_imap.c
+++ b/libsrc/Wi/bif_imap.c
@@ -1,14 +1,14 @@
 /*
  *  bif_imap.c
  *
- *  $Id: bif_imap.c,v 1.1.2.8 2011/01/28 13:32:49 source Exp $
+ *  $Id: bif_imap.c,v 1.1.2.11 2012/03/08 12:55:33 source Exp $
  *
  *  IMAP4 client function
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -70,6 +70,7 @@
 	  } \
 	END_WRITE_FAIL (ses)
 
+
 static int
 is_ok (char *resp)
 {
@@ -231,6 +232,7 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   char resp[1024];
   char message[128], err_text[512], err_code[6], login_message[512], username[512], password[512];
   char end_msg[1] = ")";
+  char end_msg3[3] = ")\r\n";
   char *s, *ps;
   caddr_t target_folder_id = NULL;
   dk_session_t *msg = NULL;
@@ -313,60 +315,60 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   if (!stricmp ("list", mode))
     {
       if (folder_id && strlen (folder_id) > 0)
-			snprintf (message, sizeof (message), "3 LIST \"\" \"%s\"", folder_id);
+	snprintf (message, sizeof (message), "3 LIST \"\" \"%s\"", folder_id);
       else
-			snprintf (message, sizeof (message), "3 LIST \"\" \"%%\"");
+	snprintf (message, sizeof (message), "3 LIST \"\" \"%%\"");
       SEND (ses, rc, message, "");
       message_begin = 0;
       strses_flush (msg);
       strses_enable_paging (msg, http_ses_size);
       CATCH_READ_FAIL (ses)
-      {
-	rc = dks_read_line (ses, resp, sizeof (resp));
-	while (strlen (resp) > 2 && strncmp ("3 OK", resp, 4))
-	  {
-	    ps = resp;
-	    ps = imap_next_word (ps);
-	    if (!ascii_strncasecmp ("LIST", ps, 4))
+	{
+	  rc = dks_read_line (ses, resp, sizeof (resp));
+	  while (strlen (resp) > 2 && strncmp ("3 OK", resp, 4))
+	    {
+	      ps = resp;
 	      ps = imap_next_word (ps);
-	    else
-	      {
-		strcpy_ck (err_text, "Some error in the list of folders");
-		strcpy_ck (err_code, "IM006");
-		SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-		goto logout;
-	      }
-	    dk_set_push (ret_v, box_dv_short_string (ps));
-	    if (tcpses_check_disk_error (msg, qst, 0))
-	      {
-		strcpy_ck (err_text, "Server error in accessing temp file");
-		strcpy_ck (err_code, "IM007");
-		SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-		goto logout;
-	      }
-	    rc = dks_read_line (ses, resp, sizeof (resp));
-	  }
-	if (tcpses_check_disk_error (msg, NULL, 0))
-	  {
-	    strcpy_ck (err_text, "Server error in accessing temp file");
-	    strcpy_ck (err_code, "IM008");
-	    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-	    goto logout;
-	  }
-	if (!STRSES_CAN_BE_STRING (msg))
-	  {
-	    strcpy_ck (err_text, "Server error in storing data into a string session");
-	    strcpy_ck (err_code, "IM009");
-	    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-	    goto logout;
-	  }
-      }
+	      if (!ascii_strncasecmp ("LIST", ps, 4))
+		ps = imap_next_word (ps);
+	      else
+		{
+		  strcpy_ck (err_text, "Some error in the list of folders");
+		  strcpy_ck (err_code, "IM006");
+		  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+		  goto logout;
+		}
+	      dk_set_push (ret_v, box_dv_short_string (ps));
+	      if (tcpses_check_disk_error (msg, qst, 0))
+		{
+		  strcpy_ck (err_text, "Server error in accessing temp file");
+		  strcpy_ck (err_code, "IM007");
+		  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+		  goto logout;
+		}
+	      rc = dks_read_line (ses, resp, sizeof (resp));
+	    }
+	  if (tcpses_check_disk_error (msg, NULL, 0))
+	    {
+	      strcpy_ck (err_text, "Server error in accessing temp file");
+	      strcpy_ck (err_code, "IM008");
+	      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+	      goto logout;
+	    }
+	  if (!STRSES_CAN_BE_STRING (msg))
+	    {
+	      strcpy_ck (err_text, "Server error in storing data into a string session");
+	      strcpy_ck (err_code, "IM009");
+	      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+	      goto logout;
+	    }
+	}
       FAILED
-      {
-	strcpy_ck (err_code, "IM010");
-	strcpy_ck (err_text, "Failed reading output of FETCH command on remote IMAP server");
-	goto error_end;
-      }
+	{
+	  strcpy_ck (err_code, "IM010");
+	  strcpy_ck (err_text, "Failed reading output of LIST command on remote IMAP server");
+	  goto error_end;
+	}
       END_READ_FAIL (ses);
       goto logout;
     }
@@ -375,7 +377,7 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   if (!stricmp ("delete", mode))
     {
       if (folder_id && strlen (folder_id) > 0)
-		snprintf (message, sizeof (message), "3 DELETE \"%s\"", folder_id);
+	snprintf (message, sizeof (message), "3 DELETE \"%s\"", folder_id);
       else
 	{
 	  strcpy_ck (err_code, "IM011");
@@ -407,7 +409,7 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   if (!stricmp ("create", mode))
     {
       if (folder_id && strlen (folder_id) > 0)
-		snprintf (message, sizeof (message), "3 CREATE \"%s\"", folder_id);
+	snprintf (message, sizeof (message), "3 CREATE \"%s\"", folder_id);
       else
 	{
 	  strcpy_ck (err_code, "IM015");
@@ -440,9 +442,9 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   if (!stricmp ("select", mode) || !stricmp ("expunge", mode))
     {
       if (folder_id && strlen (folder_id) > 0)
-		snprintf (message, sizeof (message), "4 SELECT \"%s\"", folder_id);
+	snprintf (message, sizeof (message), "4 SELECT \"%s\"", folder_id);
       else
-		snprintf (message, sizeof (message), "4 SELECT \"INBOX\"");
+	snprintf (message, sizeof (message), "4 SELECT \"INBOX\"");
       SEND (ses, rc, message, "");
       while (1)
 	{
@@ -492,82 +494,82 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 	      strses_flush (msg2);
 	      strses_enable_paging (msg2, http_ses_size);
 	      CATCH_READ_FAIL (ses)
-	      {
-		rc = dks_read_line (ses, resp, sizeof (resp));
-		if (strlen (resp) > 2 && !strncmp ("5 OK", resp, 4))
-		  break;
-		while (strncmp (end_msg, resp, sizeof (end_msg)))
-		  {
-		    ps = resp;
-		    if (!message_begin)
-		      {
-			message_begin = 1;
-			ps = imap_next_word (ps);
-			ps = imap_next_word (ps);
-			if (!ascii_strncasecmp ("FETCH", ps, 5))
-			  {
-			    ps = imap_next_word (ps);
-			    if (ps[0] == '(')
-			      ps++;
-			    if (ascii_strncasecmp ("UID", ps, 3) == 0)
-			      {
-				ps = imap_next_word (ps);
-				uid = atoi (ps);
-				ps = imap_next_word (ps);
-				SES_PRINT (msg2, ps);
-				if (tcpses_check_disk_error (msg2, qst, 0))
-				  {
-				    strcpy_ck (err_text, "Server error in accessing temp file");
-				    strcpy_ck (err_code, "IM024");
-				    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-				    goto logout;
-				  }
-				goto next_statement;
-			      }
-			  }
-			else
-			  {
-			    strcpy_ck (err_text, "Some error");
-			    strcpy_ck (err_code, "IM023");
-			    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-			    goto logout;
-			  }
-		      }
-		    SES_PRINT (msg, ps);
-		    if (tcpses_check_disk_error (msg, qst, 0))
-		      {
-			strcpy_ck (err_text, "Server error in accessing temp file");
-			strcpy_ck (err_code, "IM024");
-			SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-			goto logout;
-		      }
-		  next_statement:
-		    rc = dks_read_line (ses, resp, sizeof (resp));
-		  }
-		session_flush_1 (msg);
-		session_flush_1 (msg2);
-		if (tcpses_check_disk_error (msg, NULL, 0) || tcpses_check_disk_error (msg2, NULL, 0))
-		  {
-		    strcpy_ck (err_text, "Server error in accessing temp file");
-		    strcpy_ck (err_code, "IM025");
-		    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-		    goto logout;
-		  }
-		if (!STRSES_CAN_BE_STRING (msg) || !STRSES_CAN_BE_STRING (msg2))
-		  {
-		    strcpy_ck (err_text, "Server error in storing data into a string session");
-		    strcpy_ck (err_code, "IM026");
-		    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-		    goto logout;
-		  }
-		dk_set_push (ret_v, list (3, uid, strses_string (msg2), strses_string (msg)));
-	      }
+		{
+		  rc = dks_read_line (ses, resp, sizeof (resp));
+		  if (strlen (resp) > 2 && !strncmp ("5 OK", resp, 4))
+		    break;
+		  while (strncmp (end_msg, resp, sizeof (end_msg)))
+		    {
+		      ps = resp;
+		      if (!message_begin)
+			{
+			  message_begin = 1;
+			  ps = imap_next_word (ps);
+			  ps = imap_next_word (ps);
+			  if (!ascii_strncasecmp ("FETCH", ps, 5))
+			    {
+			      ps = imap_next_word (ps);
+			      if (ps[0] == '(')
+				ps++;
+			      if (ascii_strncasecmp ("UID", ps, 3) == 0)
+				{
+				  ps = imap_next_word (ps);
+				  uid = atoi (ps);
+				  ps = imap_next_word (ps);
+				  SES_PRINT (msg2, ps);
+				  if (tcpses_check_disk_error (msg2, qst, 0))
+				    {
+				      strcpy_ck (err_text, "Server error in accessing temp file");
+				      strcpy_ck (err_code, "IM024");
+				      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+				      goto logout;
+				    }
+				  goto next_statement;
+				}
+			    }
+			  else
+			    {
+			      strcpy_ck (err_text, "Some error");
+			      strcpy_ck (err_code, "IM023");
+			      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+			      goto logout;
+			    }
+			}
+		      SES_PRINT (msg, ps);
+		      if (tcpses_check_disk_error (msg, qst, 0))
+			{
+			  strcpy_ck (err_text, "Server error in accessing temp file");
+			  strcpy_ck (err_code, "IM024");
+			  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+			  goto logout;
+			}
+		    next_statement:
+		      rc = dks_read_line (ses, resp, sizeof (resp));
+		    }
+		  session_flush_1 (msg);
+		  session_flush_1 (msg2);
+		  if (tcpses_check_disk_error (msg, NULL, 0) || tcpses_check_disk_error (msg2, NULL, 0))
+		    {
+		      strcpy_ck (err_text, "Server error in accessing temp file");
+		      strcpy_ck (err_code, "IM025");
+		      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+		      goto logout;
+		    }
+		  if (!STRSES_CAN_BE_STRING (msg) || !STRSES_CAN_BE_STRING (msg2))
+		    {
+		      strcpy_ck (err_text, "Server error in storing data into a string session");
+		      strcpy_ck (err_code, "IM026");
+		      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+		      goto logout;
+		    }
+		  dk_set_push (ret_v, list (3, box_num (uid), strses_string (msg2), strses_string (msg)));
+		}
 	      FAILED
-	      {
-		strcpy_ck (err_code, "IM027");
-		strcpy_ck (err_text, "Failed reading output of FETCH command on remote IMAP server");
-		goto error_end;
-	      }
+		{
+		  strcpy_ck (err_code, "IM027");
+		  strcpy_ck (err_text, "Failed reading output of FETCH command on remote IMAP server");
+		  goto error_end;
+		}
 	      END_READ_FAIL (ses);
 	    }
 	}
@@ -594,7 +596,7 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 	  strcpy_ck (err_text, "There must be 2 string items in vector of argument 7 (old folder name to rename and a new name)");
 	  goto logout;
 	}
-		snprintf (message, sizeof (message), "4 RENAME \"%s\" \"%s\"", in[0], in[1]);
+      snprintf (message, sizeof (message), "4 RENAME \"%s\" \"%s\"", in[0], in[1]);
       SEND (ses, rc, message, "");
       while (1)
 	{
@@ -616,7 +618,7 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   if (!stricmp ("fetch", mode) || !stricmp ("message_delete", mode) || !stricmp ("message_copy", mode))
     {
       if (folder_id && strlen (folder_id) > 0)
-		snprintf (message, sizeof (message), "4 SELECT \"%s\"", folder_id);
+	snprintf (message, sizeof (message), "4 SELECT \"%s\"", folder_id);
       else
 	snprintf (message, sizeof (message), "4 SELECT INBOX");
       SEND (ses, rc, message, "");
@@ -634,7 +636,7 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
       if (inx_mails > 0)
 	{
 	  volatile int l, br;
-	  int start = 0;
+	  int do_not_read, start = 0;
 	  dtp_t type;
 	  if (in)
 	    l = BOX_ELEMENTS (in);
@@ -660,98 +662,116 @@ imap_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 		  goto logout;
 		}
 	      if (!stricmp ("fetch", mode))
-					snprintf (message, sizeof (message), "5 UID FETCH %d BODY.PEEK[]", (int)(in[br]));
+		snprintf (message, sizeof (message), "5 UID FETCH %d BODY.PEEK[]", (int) (in[br]));
 	      if (!stricmp ("message_delete", mode))
-					snprintf (message, sizeof (message), "5 UID STORE %d +FLAGS (\\Deleted)", (int)(in[br]));
+		snprintf (message, sizeof (message), "5 UID STORE %d +FLAGS (\\Deleted)", (int) (in[br]));
 	      if (!stricmp ("message_copy", mode))
-					snprintf (message, sizeof (message), "5 UID COPY %d \"%s\"", (int)(in[br]), target_folder_id);
+		snprintf (message, sizeof (message), "5 UID COPY %d \"%s\"", (int) (in[br]), target_folder_id);
 	      SEND (ses, rc, message, "");
+	      do_not_read = 0;
 	      while (1)
 		{
 		  message_begin = 0;
 		  strses_flush (msg);
 		  strses_enable_paging (msg, http_ses_size);
 		  CATCH_READ_FAIL (ses)
-		  {
-		    rc = dks_read_line (ses, resp, sizeof (resp));
-		    if (strlen (resp) > 2 && !strncmp ("5 OK", resp, 4))
-		      break;
-		    if (strlen (resp) > 2 && !strncmp ("5 BAD", resp, 5))
-		      {
-			strcpy_ck (err_text, "Error in IMAP command UID STORE");
-			strcpy_ck (err_code, "IM035");
-			break;
-		      }
-		    if (strlen (resp) > 2 && !strncmp ("5 NO", resp, 4))
-		      {
-			strcpy_ck (err_text, "Error in IMAP command UID STORE");
-			strcpy_ck (err_code, "IM036");
+		    {
+		      if (!do_not_read)
+			rc = dks_read_line (ses, resp, sizeof (resp));
+		      if (strlen (resp) > 2 && !strncmp ("5 OK", resp, 4))
 			break;
-		      }
-		    while (strncmp (end_msg, resp, sizeof (end_msg)))
-		      {
-			ps = resp;
-			if (!message_begin)
-			  {
-			    message_begin = 1;
-			    ps = imap_next_word (ps);
-			    ps = imap_next_word (ps);
-			    if (!ascii_strncasecmp ("FETCH", ps, 5))
-			      {
-				ps = imap_next_word (ps);
-				if (ps[0] == '(')
-				  ps++;
-				if (ascii_strncasecmp ("UID", ps, 3) == 0)
-				  {
-				    ps = imap_next_word (ps);
-				    uid = atoi (ps);
-				  }
-			      }
-			    else
-			      {
-				strcpy_ck (err_text, "Some error");
-				strcpy_ck (err_code, "IM037");
-				SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-				goto logout;
-			      }
-			    if (!stricmp ("message_delete", mode) || !stricmp ("message_copy", mode))
+		      if (strlen (resp) > 2 && !strncmp ("5 BAD", resp, 5))
+			{
+			  strcpy_ck (err_text, "Error in IMAP command UID STORE");
+			  strcpy_ck (err_code, "IM035");
+			  break;
+			}
+		      if (strlen (resp) > 2 && !strncmp ("5 NO", resp, 4))
+			{
+			  strcpy_ck (err_text, "Error in IMAP command UID STORE");
+			  strcpy_ck (err_code, "IM036");
+			  break;
+			}
+		      while (resp)
+			{
+			  ps = resp;
+			  if (!message_begin)
+			    {
+			      message_begin = 1;
+			      if (!ascii_strncasecmp ("* ", ps, 2))
+				{
+				  ps = imap_next_word (ps);
+				  ps = imap_next_word (ps);
+				  if (!ascii_strncasecmp ("FETCH", ps, 5))
+				    {
+				      ps = imap_next_word (ps);
+				      if (ps[0] == '(')
+					ps++;
+				      if (ascii_strncasecmp ("UID", ps, 3) == 0)
+					{
+					  ps = imap_next_word (ps);
+					  uid = atoi (ps);
+					}
+				    }
+				}
+			      else
+				{
+				  strcpy_ck (err_text, "Some error");
+				  strcpy_ck (err_code, "IM037");
+				  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+				  goto logout;
+				}
+			      if (!stricmp ("message_delete", mode) || !stricmp ("message_copy", mode))
+				break;
+			      goto next_message;
+			    }
+			  SES_PRINT (msg, ps);
+			  if (tcpses_check_disk_error (msg, qst, 0))
+			    {
+			      strcpy_ck (err_text, "Server error in accessing temp file");
+			      strcpy_ck (err_code, "IM038");
+			      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+			      goto logout;
+			    }
+			next_message:
+			  rc = dks_read_line (ses, resp, sizeof (resp));
+			  if (strlen (resp) > 2 && (!strncmp ("5 OK", resp, 4) || !strncmp ("5 BAD", resp, 5)
+				  || !strncmp ("5 NO", resp, 4)))
+			    {
+			      do_not_read = 1;
 			      break;
-			    goto next_message;
-			  }
-			SES_PRINT (msg, ps);
-			if (tcpses_check_disk_error (msg, qst, 0))
-			  {
-			    strcpy_ck (err_text, "Server error in accessing temp file");
-			    strcpy_ck (err_code, "IM038");
-			    SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-			    goto logout;
-			  }
-		      next_message:
-			rc = dks_read_line (ses, resp, sizeof (resp));
-		      }
-		    session_flush_1 (msg);
-		    if (tcpses_check_disk_error (msg, NULL, 0))
-		      {
-			strcpy_ck (err_text, "Server error in accessing temp file");
-			strcpy_ck (err_code, "IM039");
-			SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-			goto logout;
-		      }
-		    if (!STRSES_CAN_BE_STRING (msg))
-		      {
-			strcpy_ck (err_text, "Server error in storing data into a string session");
-			strcpy_ck (err_code, "IM040");
-			SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
-			goto logout;
-		      }
-		    dk_set_push (ret_v, list (2, uid, strses_string (msg)));
-		  }
+			    }
+			}
+		      session_flush_1 (msg);
+		      if (tcpses_check_disk_error (msg, NULL, 0))
+			{
+			  strcpy_ck (err_text, "Server error in accessing temp file");
+			  strcpy_ck (err_code, "IM039");
+			  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+			  goto logout;
+			}
+		      if (!STRSES_CAN_BE_STRING (msg))
+			{
+			  strcpy_ck (err_text, "Server error in storing data into a string session");
+			  strcpy_ck (err_code, "IM040");
+			  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
+			  goto logout;
+			}
+		      if (uid > 0)
+			{
+			  caddr_t result = NULL;
+			  result = strses_string (msg);
+			  if (!strncmp (result + strlen (result) - 3, end_msg3, sizeof (end_msg3)))
+			    result[strlen (result) - 3] = 0;
+			  dk_set_push (ret_v, list (2, box_num (uid), result));
+			}
+		    }
 		  FAILED
-		  {
-		    strcpy_ck (err_code, "IM041");
-		    strcpy_ck (err_text, "Failed reading output of FETCH command on remote IMAP server");
-		    goto error_end;
-		  }
+		    {
+		      strcpy_ck (err_code, "IM041");
+		      strcpy_ck (err_text, "Failed reading output of FETCH command on remote IMAP server");
+		      goto error_end;
+		    }
 		  END_READ_FAIL (ses);
 		}
 	    }
diff --git a/libsrc/Wi/bif_intl.c b/libsrc/Wi/bif_intl.c
index 3a481de..1b3a9a2 100644
--- a/libsrc/Wi/bif_intl.c
+++ b/libsrc/Wi/bif_intl.c
@@ -1,14 +1,14 @@
 /*
  *  bif_intl.c
  *
- *  $Id: bif_intl.c,v 1.11.2.8 2011/01/28 13:32:49 source Exp $
+ *  $Id: bif_intl.c,v 1.11.2.10 2012/03/08 12:55:33 source Exp $
  *
  *  Internationalization functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -29,6 +29,7 @@
 #include <wchar.h>
 #endif
 #include <limits.h>
+#include "http.h" /* For WS_CHARSET */
 #include "wi.h"
 #include "libutil.h"
 #include "sqlnode.h"
@@ -299,7 +300,7 @@ literal_as_utf8 (encoding_handler_t * enc, caddr_t literal, int len)
 }
 
 caddr_t
-charset_recode_from_named_to_named (caddr_t narrow, const char *cs1_uppercase, const char *cs2_uppercase, int *res_is_new_ret, caddr_t *err_ret)
+charset_recode_from_named_to_named (query_instance_t *qi, caddr_t narrow, const char *cs1_uppercase, const char *cs2_uppercase, int *res_is_new_ret, caddr_t *err_ret)
 {
   wcharset_t *cs1, *cs2;
   int bom_skip_offset = 0;
@@ -317,7 +318,18 @@ charset_recode_from_named_to_named (caddr_t narrow, const char *cs1_uppercase, c
     cs1 = CHARSET_WIDE;
   if (cs2_uppercase && !cs2 && !strcmp (cs2_uppercase, "_WIDE_"))
     cs2 = CHARSET_WIDE;
-
+  if (cs1_uppercase && !cs1 && !strcmp (cs1_uppercase, "_WS_"))
+    {
+      cs1 = ((NULL != qi) ? WS_CHARSET (qi->qi_client->cli_ws, qi) : NULL);
+      if (NULL == cs1)
+        cs1 = default_charset;
+    }
+  if (cs2_uppercase && !cs2 && !strcmp (cs2_uppercase, "_WS_"))
+    {
+      cs2 = ((NULL != qi) ? WS_CHARSET (qi->qi_client->cli_ws, qi) : NULL);
+      if (NULL == cs2)
+        cs2 = default_charset;
+    }
   if (!cs1 && cs1_uppercase && box_length (cs1_uppercase) > 1)
     {
       if (!stricmp (cs1_uppercase, "UTF-16") && box_length (narrow) > 2
@@ -430,7 +442,7 @@ bif_charset_recode (caddr_t *qst, caddr_t *err_ret, state_slot_t ** args)
 
   cs1_uname = cs1_name ? sqlp_box_upcase (cs1_name) : NULL;
   cs2_uname = cs2_name ? sqlp_box_upcase (cs2_name) : NULL;
-  res = charset_recode_from_named_to_named (narrow, cs1_uname, cs2_uname, &res_is_new, &err);
+  res = charset_recode_from_named_to_named ((query_instance_t *)qst, narrow, cs1_uname, cs2_uname, &res_is_new, &err);
   dk_free_box (cs1_uname); dk_free_box (cs2_uname);
   if (NULL != err)
     {
diff --git a/libsrc/Wi/bif_json.c b/libsrc/Wi/bif_json.c
index 320ea64..89b3ddf 100644
--- a/libsrc/Wi/bif_json.c
+++ b/libsrc/Wi/bif_json.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: bif_json.c,v 1.4.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_json.c,v 1.4.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_kerberoscli.c b/libsrc/Wi/bif_kerberoscli.c
index 79132fb..b0067e3 100644
--- a/libsrc/Wi/bif_kerberoscli.c
+++ b/libsrc/Wi/bif_kerberoscli.c
@@ -1,12 +1,12 @@
 /*
  *  bif_kerberoscli.c
  *
- *  $Id: bif_kerberoscli.c,v 1.3.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_kerberoscli.c,v 1.3.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_ldapcli.c b/libsrc/Wi/bif_ldapcli.c
index 232a0f3..685bf90 100644
--- a/libsrc/Wi/bif_ldapcli.c
+++ b/libsrc/Wi/bif_ldapcli.c
@@ -1,12 +1,12 @@
 /*
  *  bif_ldapcli.c
  *
- *  $Id: bif_ldapcli.c,v 1.3.2.2 2011/01/10 11:51:54 source Exp $
+ *  $Id: bif_ldapcli.c,v 1.3.2.4 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -583,6 +583,31 @@ bif_ldap_search (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   dk_set_t s = NULL;
   caddr_t * ret;
   caddr_t alloced_passwd = NULL;
+  int is_null;
+#if !defined (WIN32)
+  struct timeval tv;
+  long secs = 0;
+#endif
+  /* version */
+  if (BOX_ELEMENTS (args) > 6)
+    {
+      long ver;
+      ver = bif_long_or_null_arg (qst, args, 6, "ldap_search", &is_null);
+      if (!is_null && ver >= LDAP_VERSION_MIN && ver <= LDAP_VERSION_MAX)
+	version = ver;
+    }
+#if !defined (WIN32)
+  if (BOX_ELEMENTS (args) > 7)
+    {
+      secs = bif_long_or_null_arg (qst, args, 7, "ldap_search", &is_null);
+      if (secs > 0)
+	{
+	  tv.tv_sec = secs;
+	  tv.tv_usec = 0;
+	}
+    }
+#endif
+
 
 #ifdef WIN32
   if (!ldap_module)
@@ -609,6 +634,11 @@ bif_ldap_search (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	"Failed to set LDAP version option: %s (%d)", ldap_err2string (rc),
 	rc);
 
+#if !defined (WIN32)
+  if (secs > 0 && (rc = ldap_set_option (ld, LDAP_OPT_NETWORK_TIMEOUT, &tv)) != LDAP_OPT_SUCCESS)
+    sqlr_new_error ("2E000", "LD006", "Failed to set LDAP version option: %s (%d)", ldap_err2string (rc), rc);
+#endif
+
 #ifndef WIN32
   if (tls && (rc = ldap_start_tls_s (ld, NULL, NULL)) != LDAP_SUCCESS)
     sqlr_new_error ("2E000", "LD016", "Failed to start TLS: %s (%d)",
diff --git a/libsrc/Wi/bif_mts.c b/libsrc/Wi/bif_mts.c
index acba651..88a9e9d 100644
--- a/libsrc/Wi/bif_mts.c
+++ b/libsrc/Wi/bif_mts.c
@@ -1,12 +1,12 @@
 /*
  *  bif_mts.c
  *
- *  $Id: bif_mts.c,v 1.2.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_mts.c,v 1.2.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_nntp.c b/libsrc/Wi/bif_nntp.c
index af020c0..7b67e79 100644
--- a/libsrc/Wi/bif_nntp.c
+++ b/libsrc/Wi/bif_nntp.c
@@ -1,12 +1,12 @@
 /*
  *  bif_nntp.c
  *
- *  $Id: bif_nntp.c,v 1.2.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_nntp.c,v 1.2.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_phrasematch.c b/libsrc/Wi/bif_phrasematch.c
index 596a32d..40e1dc8 100644
--- a/libsrc/Wi/bif_phrasematch.c
+++ b/libsrc/Wi/bif_phrasematch.c
@@ -1,12 +1,12 @@
 /*
  *  bif_phrasematch.c
  *
- *  $Id: bif_phrasematch.c,v 1.23.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_phrasematch.c,v 1.23.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_pop3.c b/libsrc/Wi/bif_pop3.c
index 770cbf5..a59dee8 100644
--- a/libsrc/Wi/bif_pop3.c
+++ b/libsrc/Wi/bif_pop3.c
@@ -1,14 +1,14 @@
 /*
  *  bif_pop3.c
  *
- *  $Id: bif_pop3.c,v 1.6.2.2 2010/08/02 11:20:51 source Exp $
+ *  $Id: bif_pop3.c,v 1.6.2.5 2012/03/08 12:55:33 source Exp $
  *
  *  POP3 client function
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -74,14 +74,14 @@ is_ok (char *resp)
 
 static void
 pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
-    long end_size, caddr_t mode, dk_set_t * ret_v, caddr_t * in, caddr_t *qst, long cert)
+    long end_size, caddr_t mode, dk_set_t * ret_v, caddr_t * in, caddr_t * qst, long cert)
 {
   int rc;
   volatile int inx, inx_mails;
   unsigned int number;
   volatile long size;
   dk_set_t uidl = NULL;
-  caddr_t * volatile my_list = NULL;
+  caddr_t *volatile my_list = NULL;
   dk_session_t *ses = dk_session_allocate (SESCLASS_TCPIP);
   char num[11], resp[1024];
   char message[16], err_text[512], err_code[6];
@@ -93,7 +93,8 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
   SSL_METHOD *ssl_method;
 #endif
 
-  resp[0] = 0; err_code[0] = 0;
+  resp[0] = 0;
+  err_code[0] = 0;
   if (!_thread_sched_preempt)
     {
       ses->dks_read_block_timeout = dks_fibers_blocking_read_default_to;
@@ -160,8 +161,9 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
     {
       goto error_end;
     }
-  END_READ_FAIL (ses)
-      /*  IS_OK_NEXT (ses, resp, rc, "Bad user name and password"); */
+  END_READ_FAIL (ses);
+
+  /*  IS_OK_NEXT (ses, resp, rc, "Bad user name and password"); */
 
   inx_mails = 0;
   size = 0;
@@ -184,11 +186,11 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 	  rc = dks_read_line (ses, resp, sizeof (resp));
 	  if (!strncmp (end_msg, resp, sizeof (end_msg)))
 	    break;
-	  sscanf (resp, "%i %100s", (int *)(&number), next);
+	  sscanf (resp, "%i %100s", (int *) (&number), next);
 	  if (in)
 	    {
 	      fl = 0;
-	      for (br=0;br<l;br++)
+	      for (br = 0; br < l; br++)
 		{
 		  if (!strcmp (in[br], next))
 		    {
@@ -230,10 +232,10 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 	  sscanf (resp, "%10s %li", num, &msg_size);
 
 	  if (atoi (num) == 0)
-	    if  (num[0] != '.')
+	    if (num[0] != '.')
 	      break;
 
-	  if (my_list[atoi(num)-1])
+	  if (my_list[atoi (num) - 1])
 	    size = size + msg_size;
 
 	  if (size < end_size)
@@ -251,12 +253,11 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
     }
   END_READ_FAIL (ses);
 
-
   for (inx = 1; inx <= inx_mails; inx++)
     {
       snprintf (message, sizeof (message), "%i", inx);
 
-      if (!my_list[inx-1])
+      if (!my_list[inx - 1])
 	continue;
 
       if (stricmp ("uidl", mode))
@@ -273,12 +274,13 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 	      while (strncmp (end_msg, resp, sizeof (end_msg)))
 		{
 		  rc = dks_read_line (ses, resp, sizeof (resp));
-		  SES_PRINT (msg, resp);
+		  if (strncmp (end_msg, resp, sizeof (end_msg)))
+		    SES_PRINT (msg, resp);
 		  if (tcpses_check_disk_error (msg, qst, 0))
 		    {
 		      strcpy_ck (err_text, "Server error in accessing temp file");
 		      strcpy_ck (err_code, "PO010");
-		      SESSION_SCH_DATA(ses)->sio_read_fail_on = 0;
+		      SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
 		      goto error_end;
 		    }
 		}
@@ -287,22 +289,22 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 		{
 		  strcpy_ck (err_text, "Server error in accessing temp file");
 		  strcpy_ck (err_code, "PO010");
-		  SESSION_SCH_DATA(ses)->sio_read_fail_on = 0;
+		  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
 		  goto error_end;
 		}
 	      if (!STRSES_CAN_BE_STRING (msg))
 		{
 		  strcpy_ck (err_text, "Server error in storing data into a string session");
 		  strcpy_ck (err_code, "PO010");
-		  SESSION_SCH_DATA(ses)->sio_read_fail_on = 0;
+		  SESSION_SCH_DATA (ses)->sio_read_fail_on = 0;
 		  goto error_end;
 		}
-	      dk_set_push (ret_v, list (2, my_list[inx-1], strses_string (msg)));
-	      my_list[inx-1]=NULL;
+	      dk_set_push (ret_v, list (2, my_list[inx - 1], strses_string (msg)));
+	      my_list[inx - 1] = NULL;
 	    }
 	  FAILED
 	    {
-              strcpy_ck (err_code, "PO010");
+	      strcpy_ck (err_code, "PO010");
 	      strcpy_ck (err_text, "Failed reading output of LIST command on remote POP3 server");
 	      goto error_end;
 	    }
@@ -310,15 +312,14 @@ pop3_get (char *host, caddr_t * err_ret, caddr_t user, caddr_t pass,
 	}
       else
 	{
-	  dk_set_push (ret_v, my_list[inx-1]);
-	  my_list[inx-1]=NULL;
+	  dk_set_push (ret_v, my_list[inx - 1]);
+	  my_list[inx - 1] = NULL;
 	}
 
       if (!stricmp ("delete", mode))
 	{
 	  SEND (ses, rc, "DELE ", message);
-	  IS_OK_NEXT (ses, resp, rc, "PO011",
-		      "Could not DELE messages from remote POP3 server");
+	  IS_OK_NEXT (ses, resp, rc, "PO011", "Could not DELE messages from remote POP3 server");
 	}
     }
 
@@ -342,7 +343,7 @@ error_end:
   SSL_CTX_free (ssl_ctx);
 
   if (err_code[0] != 0)
-  *err_ret = srv_make_new_error ("08006", err_code, "%s", err_text);
+    *err_ret = srv_make_new_error ("08006", err_code, "%s", err_text);
   else
     *err_ret = srv_make_new_error ("08006", "PO014", "Misc. error in connection in pop3_get");
   return;
@@ -351,7 +352,7 @@ error_end:
 static caddr_t
 bif_pop3_get (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t * in_uidl = NULL;
+  caddr_t *in_uidl = NULL;
   caddr_t addr = bif_string_arg (qst, args, 0, "pop3_get");
   caddr_t user = bif_string_arg (qst, args, 1, "pop3_get");
   caddr_t pass = bif_string_arg (qst, args, 2, "pop3_get");
@@ -362,7 +363,7 @@ bif_pop3_get (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t err = NULL;
   long cert = 0;
   dk_set_t volatile uidl_mes = NULL;
-  IO_SECT(qst);
+  IO_SECT (qst);
 
   if (BOX_ELEMENTS (args) > 4)
     mode = bif_string_arg (qst, args, 4, "pop3_get");
@@ -377,7 +378,7 @@ bif_pop3_get (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   if (BOX_ELEMENTS (args) > 6)
     cert = bif_long_arg (qst, args, 6, "pop3_get");
 
-  pop3_get (addr, &err, user, pass, end_size, mode, (dk_set_t *) &uidl_mes, in_uidl, qst, cert);
+  pop3_get (addr, &err, user, pass, end_size, mode, (dk_set_t *) & uidl_mes, in_uidl, qst, cert);
 
   if (err)
     {
@@ -402,7 +403,7 @@ bif_ses_write (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   dk_session_t *out;
   caddr_t string = bif_arg (qst, args, 0, "ses_write");
   dtp_t volatile dtp = DV_TYPE_OF (string);
-  IO_SECT(qst);
+  IO_SECT (qst);
   if (BOX_ELEMENTS (args) > 1)
     {
       out = http_session_arg (qst, args, 1, "ses_write");
@@ -411,7 +412,7 @@ bif_ses_write (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     {
       if (!qi->qi_client->cli_ws)
 	sqlr_new_error ("37000", "HT043",
-    "ses_write with no argument defaults it direct to the raw client connection.\nAllowed only inside HTTP request");
+	    "ses_write with no argument defaults it direct to the raw client connection.\nAllowed only inside HTTP request");
       out = qi->qi_client->cli_ws->ws_session;
     }
 
@@ -423,18 +424,15 @@ bif_ses_write (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 
   CATCH_WRITE_FAIL (out)
     {
-      if (dtp == DV_SHORT_STRING || dtp == DV_LONG_STRING ||
-	  dtp == DV_C_STRING)
-	session_buffered_write (out, string,
-	    box_length (string) - (IS_STRING_DTP (DV_TYPE_OF (string)) ? 1 : 0));
+      if (dtp == DV_SHORT_STRING || dtp == DV_LONG_STRING || dtp == DV_C_STRING)
+	session_buffered_write (out, string, box_length (string) - (IS_STRING_DTP (DV_TYPE_OF (string)) ? 1 : 0));
       else if ((dtp == DV_BLOB_HANDLE) || (dtp == DV_BLOB_WIDE_HANDLE))
 	{
-	  blob_handle_t *bh = (blob_handle_t *)string;
+	  blob_handle_t *bh = (blob_handle_t *) string;
 	  if (!bh->bh_length)
 	    {
 	      if (bh->bh_ask_from_client)
-		sqlr_new_error ("22023", "HT001",
-		    "An interactive blob can't be passed as argument to ses_write");
+		sqlr_new_error ("22023", "HT001", "An interactive blob can't be passed as argument to ses_write");
 	      goto endwrite;
 	    }
 	  bh->bh_current_page = bh->bh_page;
@@ -448,8 +446,7 @@ bif_ses_write (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	  strses_write_out ((dk_session_t *) string, out);
 	}
       else
-	*err_ret = srv_make_new_error ("22023", "HT002",
-	    "ses_write requires string, string_output or blob as argument 1");
+	*err_ret = srv_make_new_error ("22023", "HT002", "ses_write requires string, string_output or blob as argument 1");
     }
   FAILED
     {
diff --git a/libsrc/Wi/bif_purify.c b/libsrc/Wi/bif_purify.c
index 690b5f4..6fc0403 100644
--- a/libsrc/Wi/bif_purify.c
+++ b/libsrc/Wi/bif_purify.c
@@ -1,14 +1,14 @@
 /*
  *  bif_purify.c
  *
- *  $Id: bif_purify.c,v 1.2.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_purify.c,v 1.2.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  Purify functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_regexp.c b/libsrc/Wi/bif_regexp.c
index f8ab5a1..3021b2d 100644
--- a/libsrc/Wi/bif_regexp.c
+++ b/libsrc/Wi/bif_regexp.c
@@ -1,12 +1,12 @@
 /*
  *  bif_regexp.c
  *
- *  $Id: bif_regexp.c,v 1.6.2.5 2009/08/19 07:29:52 source Exp $
+ *  $Id: bif_regexp.c,v 1.6.2.7 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -82,7 +82,7 @@ static caddr_t get_regexp_code (safe_hash_t * rx_codes, const char *pattern,
 
 caddr_t
 bif_regexp_str_arg (caddr_t * qst, state_slot_t ** args, int nth,
-  char *func, int strg_is_utf8_by_default, int *utf8, caddr_t *ret_to_free, caddr_t *err_ret)
+  const char *func, int strg_is_utf8_by_default, int *utf8, caddr_t *ret_to_free, caddr_t *err_ret)
 {
   caddr_t arg = NULL;
   dtp_t arg_dtp;
@@ -406,46 +406,139 @@ done:
   return *err_ret ? NULL : (ret_str ? ret_str : NEW_DB_NULL);
 }
 
+ptrlong *
+regexp_offvect_to_array_of_long (utf8char *str, int *offvect, int result, int utf8_mode)
+{
+  int i, idx_to_fill;
+  int prev_ofs, ofs, prev_wide_len;
+  dk_set_t skipped_i = NULL;
+  ptrlong *ret_vec;
+  virt_mbstate_t mb;
+  if (0 >= result)
+    return NULL;
+  result *= 2;
+  ret_vec = (ptrlong *)dk_alloc_box (sizeof (ptrlong) * result, DV_ARRAY_OF_LONG);
+  if (!utf8_mode)
+    {
+      for (i = result; i--; /* no step */)
+        ret_vec[i] = offvect[i];
+      return ret_vec;
+    }
+  i = 0;
+  idx_to_fill = 0;
+  prev_ofs = 0;
+  prev_wide_len = 0;
+  memset (&mb, 0, sizeof (virt_mbstate_t));
+
+again:
+  if ((i < result) && (0 >= offvect[i])) /* That's for fragments like "(.?)" that were matched to an empty string */
+    {
+      ret_vec [i] = offvect[i];
+      i++;
+      goto again; /* see above */
+    }
+/*The result vector is { B,E, B1,E1, B2,E2... Bn,En } where B <= B1 <= B2... <= Bn but there's no good order for Es.
+However all out-of-order E-s form a proper backstack. */
+/*...so we push out-of-order E-s as soon as they're found in offvect */
+  if (i % 2)
+    {
+      int next_nonnegative_ofs_i = i + 1;
+      while (next_nonnegative_ofs_i < result)
+        {
+          if (0 > offvect[next_nonnegative_ofs_i])
+            {
+              next_nonnegative_ofs_i++;
+              continue;
+            }
+          if (offvect[i] > offvect[next_nonnegative_ofs_i])
+            {
+              dk_set_push (&skipped_i, (void *)((ptrlong)i));
+              i++;
+              goto again;
+            }
+          break;
+        }
+    }
+/*...and we pop out-of-order E-s as soon as possible */
+  if ((NULL != skipped_i) && ((i >= result) || ((prev_ofs <= offvect[(ptrlong)(skipped_i->data)]) && (offvect[i] >= offvect[(ptrlong)(skipped_i->data)]))))
+    {
+      idx_to_fill = (ptrlong)dk_set_pop (&skipped_i);
+      goto idx_found; /* see below */
+    }
+  if (i >= result)
+    goto done;
+  idx_to_fill = i++;
+
+idx_found:
+  ofs = offvect[idx_to_fill];
+  if (ofs < prev_ofs)
+    GPF_T1 ("Corrupted regexp result");
+  else if (ofs == prev_ofs)
+    {
+      ret_vec [idx_to_fill] = prev_wide_len;
+      goto again; /* see above */
+    }
+  else
+    {
+      int wide_len_diff = (int) virt_mbsnrtowcs (NULL, &str, ofs - prev_ofs, 0, &mb);
+      prev_wide_len += wide_len_diff;
+      prev_ofs = ofs;
+      ret_vec [idx_to_fill] = prev_wide_len;
+      goto again; /* see above */
+    }
+
+done:
+  return ret_vec;
+}
+
+
 /*
- *Function Name: bif_regexp_parse
+ *Function Name: bif_regexp_parse / bif_regexp_parse_list
  *
  *Parameters:	pattern - regular expression pattern,
  *		str - string to be parsed
  *		offset - offset from which parsing must be executed
- *Description:  finds all substrings which match pattern in one iteration.
+ *		options - string of regex option chars, like 'i', default is empty string
+ *		n_hits - number of hits to find (only for bif_regexp_parse_list)
+ *Description:  finds all substrings which match all parenthesised grroups of a pattern, in one iteration.
  *
- *Returns:	vector of offset pairs:
+ *Returns if not a list:
+ *		vector of offset pairs:
  *		1 pair - index of begin of matched substring and
  *			index of matched substrings end
  *		2...n pairs - indexes of begins and ends of matched substrings of first substring.
  *
+ * Returns if not a list:
  */
 
 static caddr_t
-bif_regexp_parse (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+bif_regexp_parse_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, int parse_list, const char *fname)
 {
   int utf8_mode, utf8_mode2;
   char *pattern = NULL;
   char *str = NULL;
-  int offset;
+  int offset, str_len;
   pcre_info_t cd_info;
-  int c_opts = 0, r_opts = 0;
+  int c_opts = 0, r_opts = 0, max_n_hits = 0x1000000 / sizeof (ptrlong);
   caddr_t p_to_free = NULL, str_to_free = NULL;
-  caddr_t ret_vec = NULL;
+  int offvect[NOFFSETS];
+  ptrlong *ret_vec = NULL;
+  dk_set_t ret_revlist = NULL;
 
   utf8_mode = utf8_mode2 = 0;
-  offset = (int) bif_long_arg (qst, args, 2, "regexp_parse");
-  str = bif_regexp_str_arg (qst, args, 1, "regexp_parse", REGEXP_BF, &utf8_mode, &str_to_free, err_ret);
+  offset = (int) bif_long_arg (qst, args, 2, fname);
+  str = bif_regexp_str_arg (qst, args, 1, fname, REGEXP_BF, &utf8_mode, &str_to_free, err_ret);
   if (*err_ret) goto done;
 
   utf8_mode2 = utf8_mode ? utf8_mode : 2;
-  pattern = bif_regexp_str_arg (qst, args, 0, "regexp_parse", REGEXP_BF, &utf8_mode2, &p_to_free, err_ret);
+  pattern = bif_regexp_str_arg (qst, args, 0, fname, REGEXP_BF, &utf8_mode2, &p_to_free, err_ret);
   if (*err_ret) goto done;
 
   switch ((BOX_ELEMENTS (args)))
     {
     default:
-    case 4: c_opts |= regexp_optchars_to_bits (bif_string_arg (qst, args, 3, "regexp_parse"));
+    case 5: if (parse_list) max_n_hits = bif_long_range_arg (qst, args, 4, fname, 0, max_n_hits);
+    case 4: c_opts |= regexp_optchars_to_bits (bif_string_arg (qst, args, 3, fname));
     case 3: case 2: case 1: case 0: ;
     }
 
@@ -453,43 +546,265 @@ bif_regexp_parse (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     goto done;
   *err_ret = get_regexp_code (&regexp_codes, pattern, &cd_info, c_opts);
 
-  if (cd_info.code && !*err_ret)
-    {
-      int offvect[NOFFSETS];
-      int result;
-      int str_len = (int) strlen (str);
-      result = pcre_exec (cd_info.code, cd_info.code_x, str, str_len, offset, r_opts,
-	  offvect, NOFFSETS);
-      if (result != -1)
-	{
-	  int i;
-	  ret_vec = dk_alloc_box (sizeof (ptrlong) * 2 * result, DV_ARRAY_OF_LONG);
-	  for (i = 0; i < (result * 2); i++)
-	    {
-	      if (utf8_mode)
-		{
-		  virt_mbstate_t mb;
-		  int wide_len;
-		  unsigned char *str_tmp = (unsigned char *) str;
+  if (*err_ret || !cd_info.code)
+    goto done;
 
-		  memset (&mb, 0, sizeof (virt_mbstate_t));
-		  wide_len = (int) virt_mbsnrtowcs (NULL, &str_tmp, offvect[i], 0, &mb);
-		  ((ptrlong *) ret_vec)[i] = wide_len;
-		}
-	      else
-		((ptrlong *) ret_vec)[i] = offvect[i];
-	    }
-	}
+  str_len = (int) strlen (str);
+  if (parse_list)
+    {
+      while (0 < max_n_hits--)
+        {
+          int result = pcre_exec (cd_info.code, cd_info.code_x, str, str_len, offset, r_opts,
+            offvect, NOFFSETS);
+          if (0 >= result)
+            break;
+          ret_vec = regexp_offvect_to_array_of_long ((utf8char *)str, offvect, result, utf8_mode);
+          if (offset >= ret_vec[1])
+            offset++;
+          else
+            offset = ret_vec[1];
+          dk_set_push (&ret_revlist, ret_vec);
+        }
+    }
+  else
+    {
+      int result = pcre_exec (cd_info.code, cd_info.code_x, str, str_len, offset, r_opts,
+        offvect, NOFFSETS);
+      ret_vec = regexp_offvect_to_array_of_long ((utf8char *)str, offvect, result, utf8_mode);
     }
 
 done:
-  if (*err_ret)
-    dk_free_box (ret_vec);
   dk_free_tree (p_to_free);
   dk_free_tree (str_to_free);
-  return *err_ret ? NULL : (ret_vec ? ret_vec : NEW_DB_NULL);
+  if (*err_ret)
+    return NULL;
+  if (parse_list)
+    return revlist_to_array (ret_revlist);
+  if (NULL != ret_vec)
+    return (caddr_t)ret_vec;
+  return NEW_DB_NULL;
 }
 
+static caddr_t
+bif_regexp_parse (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_regexp_parse_impl (qst, err_ret, args, 0, "regexp_parse");
+}
+
+static caddr_t
+bif_regexp_parse_list (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_regexp_parse_impl (qst, err_ret, args, 1, "regexp_parse_list");
+}
+
+ptrlong *
+parse_replacing_template (caddr_t tmpl, int tmpl_syntax_is_xpf, int pos_count)
+{
+  int tmpl_is_wide = (DV_WIDE == DV_TYPE_OF (tmpl));
+  int charsize = tmpl_is_wide ? sizeof (wchar_t) : 1;
+  char *tmpl_tail = tmpl;
+  char *tmpl_end = tmpl + box_length (tmpl) - charsize;
+  char *tmpl_cut_start = tmpl_tail;
+  dk_set_t res = NULL;
+  tmpl_cut_start = tmpl_tail;
+#define TMPL_TAIL_CHR(ofs) ((tmpl_is_wide) ? ((wchar_t *)tmpl_tail)[ofs] : tmpl_tail[ofs])
+#define PUSH_TO_RES(beg,end) do { dk_set_push (&res, (void *)((ptrlong)(beg))); dk_set_push (&res, (void *)((ptrlong)(end))); } while (0)
+  if (tmpl_syntax_is_xpf)
+    {
+      while (tmpl_tail < tmpl_end)
+        {
+          if ('\\' == TMPL_TAIL_CHR(0))
+            {
+              if (tmpl_cut_start < tmpl_tail)
+                PUSH_TO_RES ((tmpl_cut_start - tmpl) / charsize, ((tmpl_tail - tmpl) / charsize));
+              tmpl_tail += charsize;
+              tmpl_cut_start = tmpl_tail;
+              if (tmpl_tail < tmpl_end)
+                tmpl_tail += charsize;
+              continue;
+            }
+          else if (('$' == TMPL_TAIL_CHR(0)) && (tmpl_tail < (tmpl_end - charsize))
+             && ('0' <= TMPL_TAIL_CHR(1)) && ('9' >= TMPL_TAIL_CHR(1)) )
+            {
+              int pos_idx = TMPL_TAIL_CHR(1) - '0';
+              if (tmpl_cut_start < tmpl_tail)
+                PUSH_TO_RES ((tmpl_cut_start - tmpl) / charsize, ((tmpl_tail - tmpl) / charsize));
+              tmpl_tail += charsize * 2;
+              if ((pos_count > 9) && (tmpl_tail < tmpl_end) && ('0' <= TMPL_TAIL_CHR(0)) && ('9' >= TMPL_TAIL_CHR(0)))
+                {
+                  pos_idx = pos_idx * 10 + TMPL_TAIL_CHR(0) - '0';
+                  tmpl_tail += charsize;
+                }
+              if (pos_idx < pos_count)
+                PUSH_TO_RES (-1, pos_idx);
+              tmpl_cut_start = tmpl_tail;
+              continue;
+            }
+          tmpl_tail += charsize;
+        }
+    }
+  else
+    {
+      while (tmpl_tail < tmpl_end)
+        {
+          if ('\\' == TMPL_TAIL_CHR(0))
+            {
+              if (tmpl_cut_start < tmpl_tail)
+                PUSH_TO_RES ((tmpl_cut_start - tmpl) / charsize, ((tmpl_tail - tmpl) / charsize));
+              tmpl_tail += charsize;
+              if ((tmpl_tail < tmpl_end)  && ('0' <= TMPL_TAIL_CHR(0)) && ('9' >= TMPL_TAIL_CHR(0)))
+                {
+                  int pos_idx = TMPL_TAIL_CHR(0) - '0';
+                  tmpl_tail += charsize;
+                  if ((pos_count > 9) && (tmpl_tail < tmpl_end) && ('0' <= TMPL_TAIL_CHR(0)) && ('9' >= TMPL_TAIL_CHR(0)))
+                    {
+                      pos_idx = pos_idx * 10 + TMPL_TAIL_CHR(0) - '0';
+                      tmpl_tail += charsize;
+                    }
+                  if (pos_idx < pos_count)
+                    PUSH_TO_RES (-1, pos_idx);
+                  tmpl_cut_start = tmpl_tail;
+                  continue;
+                }
+              tmpl_cut_start = tmpl_tail;
+              if (tmpl_tail < tmpl_end)
+                tmpl_tail += charsize;
+              continue;
+            }
+          tmpl_tail += charsize;
+        }
+    }
+  if (tmpl_cut_start < tmpl_tail)
+    PUSH_TO_RES ((tmpl_cut_start - tmpl) / charsize, ((tmpl_tail - tmpl) / charsize));
+  return (ptrlong *)revlist_to_array (res);
+}
+
+static caddr_t
+bif_regexp_replace_hits_with_template (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  int hit_ctr, hit_count, src_is_wide;
+  int src_charsize;
+  int src_charcount;
+  wcharset_t *src_cs, *tmpl_cs;
+  int pos_count_in_hits;
+  int prev_left_pos = 0;
+  dk_session_t *ses;
+  caddr_t src = bif_string_or_wide_or_uname_arg (qst, args, 0, "regexp_replace_hits_with_template");
+  caddr_t orig_tmpl = bif_string_or_wide_or_uname_arg (qst, args, 1, "regexp_replace_hits_with_template");
+  caddr_t *hit_list = bif_array_of_pointer_arg (qst, args, 2, "regexp_replace_hits_with_template");
+  int tmpl_syntax_is_xpf = bif_long_arg (qst, args, 3, "regexp_replace_hits_with_template");
+  caddr_t tmpl = NULL;
+  ptrlong *parsed_tmpl, *parsed_tmpl_end;
+  caddr_t res_strg;
+  hit_count = BOX_ELEMENTS (hit_list);
+  if (0 == hit_count)
+    return box_copy (src);
+  src_is_wide = (DV_WIDE == DV_TYPE_OF (src));
+  src_charsize = src_is_wide ? sizeof (wchar_t) : 1;
+  src_charcount = (box_length (src) / src_charsize) - 1;
+#define HIT_NTH_POS(pos) ((DV_ARRAY_OF_LONG == hit_dtp) ? hit[pos] : unbox ((caddr_t)(hit[pos])))
+/* Integrity check first */
+  for (hit_ctr = 0; hit_ctr < hit_count; hit_ctr++)
+    {
+      ptrlong *hit = (ptrlong *)(hit_list[hit_ctr]);
+      dtp_t hit_dtp = DV_TYPE_OF (hit);
+      int pos_ctr, pos_count;
+      ptrlong hit_b, hit_e;
+      if ((DV_ARRAY_OF_LONG != hit_dtp) && (DV_ARRAY_OF_POINTER != hit_dtp))
+        sqlr_new_error ("22023", "SR647",
+          "Function regexp_replace_hits_with_template() has invalid hit list count as argument 2 (hit with index %d is not an array)", hit_ctr );
+      pos_count = BOX_ELEMENTS (hit);
+      if ((2 > pos_count) || (200 < pos_count) || (pos_count % 2))
+        sqlr_new_error ("22023", "SR647",
+          "Function regexp_replace_hits_with_template() has invalid hit (index %d) in argument 2 (invalid length of position list)", hit_ctr );
+      if (0 == hit_ctr)
+        pos_count_in_hits = pos_count;
+      else if (pos_count_in_hits != pos_count)
+        sqlr_new_error ("22023", "SR647",
+          "Function regexp_replace_hits_with_template() has invalid hit (index %d) in argument 2 (the length of position list is %d, but it is %d for the first hit)", hit_ctr, pos_count, pos_count_in_hits );
+      hit_b = HIT_NTH_POS(0);
+      hit_e = HIT_NTH_POS(1);
+      if ((hit_b < prev_left_pos) || (hit_e < hit_b) || (hit_e >= src_charcount))
+        sqlr_new_error ("22023", "SR647",
+          "Function regexp_replace_hits_with_template() has invalid hit (index %d) in argument 2 (from %d to %d, limits are %d to %d)",
+          hit_ctr, (int)hit_b, (int)hit_e, prev_left_pos, src_charcount );
+      for (pos_ctr = 2; pos_ctr < pos_count; pos_ctr += 2)
+        {
+          ptrlong pos_b = HIT_NTH_POS(pos_ctr);
+          ptrlong pos_e = HIT_NTH_POS(pos_ctr+1);
+          if ((-1 == pos_b) && (-1 == pos_e))
+            continue;
+          if ((pos_b < prev_left_pos) || (pos_e < pos_b) || (pos_e > hit_e))
+            sqlr_new_error ("22023", "SR647",
+              "Function regexp_replace_hits_with_template() has invalid pos pair (hit index %d, pos %d) in argument 2 (from %d to %d, limits are %d to %d, hit is from %d to %d)",
+              hit_ctr, pos_ctr, (int)pos_b, (int)pos_e, prev_left_pos, (int)hit_e, (int)hit_b, (int)hit_e );
+          prev_left_pos = pos_b;
+        }
+    }
+/* Now we know that the processing will hot hang so we can go on */
+  src_cs = charset_native_for_box (src, tmpl_syntax_is_xpf ? BF_UTF8 : BF_DEFAULT_SERVER_ENC);
+  tmpl_cs = charset_native_for_box (tmpl, tmpl_syntax_is_xpf ? BF_UTF8 : BF_DEFAULT_SERVER_ENC);
+  if (src_cs != tmpl_cs)
+    {
+      int res_is_new = 0;
+      caddr_t err = NULL;
+      caddr_t tmpl_temp_copy = box_copy (orig_tmpl);
+      tmpl = charset_recode_from_cs_or_eh_to_cs (orig_tmpl, 0, NULL, tmpl_cs, src_cs, &res_is_new, &err);
+      if (res_is_new)
+        dk_free_box (tmpl_temp_copy);
+      if (err)
+        sqlr_resignal (err);
+    }
+  else
+    tmpl = orig_tmpl;
+  parsed_tmpl = parse_replacing_template (tmpl, tmpl_syntax_is_xpf, pos_count_in_hits);
+  parsed_tmpl_end = parsed_tmpl + BOX_ELEMENTS (parsed_tmpl);
+  ses = strses_allocate ();
+  prev_left_pos = 0;
+#define PASTE(strg,b,e) session_buffered_write (ses, (strg) + ((b) *src_charsize), ((e)-(b))*src_charsize)
+  for (hit_ctr = 0; hit_ctr < hit_count; hit_ctr++)
+    {
+      ptrlong *hit = (ptrlong *)(hit_list[hit_ctr]);
+      dtp_t hit_dtp = DV_TYPE_OF (hit);
+      ptrlong *parsed_tmpl_tail;
+      ptrlong hit_b = HIT_NTH_POS(0);
+      ptrlong hit_e = HIT_NTH_POS(1);
+      if (hit_b > prev_left_pos)
+        PASTE (src, prev_left_pos,hit_b);
+      for (parsed_tmpl_tail = parsed_tmpl; parsed_tmpl_tail < parsed_tmpl_end; parsed_tmpl_tail += 2)
+        {
+          if (-1 == parsed_tmpl_tail[0])
+            {
+              ptrlong pos_b = HIT_NTH_POS (parsed_tmpl_tail[1] * 2);
+              ptrlong pos_e = HIT_NTH_POS (parsed_tmpl_tail[1] * 2 + 1);
+              PASTE (src, pos_b, pos_e);
+            }
+          else
+            {
+              ptrlong pos_b = parsed_tmpl_tail[0];
+              ptrlong pos_e = parsed_tmpl_tail[1];
+              if (0 <= pos_b)
+                PASTE (tmpl, pos_b, pos_e);
+            }
+        }
+      prev_left_pos = hit_e;
+    }
+  if (prev_left_pos < src_charcount)
+    PASTE (src, prev_left_pos, src_charcount);
+  dk_free_box ((caddr_t)parsed_tmpl);
+  if (tmpl != orig_tmpl)
+    dk_free_box (tmpl);
+  if (src_is_wide)
+    res_strg = strses_wide_string (ses);
+  else
+    {
+      res_strg = strses_string (ses);
+      if (CHARSET_UTF8 == src_cs)
+        box_flags (res_strg) |= BF_UTF8;
+    }
+  strses_free (ses);
+  return res_strg;
+}
 
 static caddr_t
 get_regexp_code (safe_hash_t * rx_codes, const char *pattern,
@@ -560,6 +875,8 @@ bif_regexp_init ()
   bif_define_typed ("rdf_regex_impl", bif_rdf_regex_impl, &bt_varchar);
   bif_define_typed ("regexp_substr", bif_regexp_substr, &bt_varchar);
   bif_define_typed ("regexp_parse", bif_regexp_parse, &bt_any);
+  bif_define_typed ("regexp_parse_list", bif_regexp_parse_list, &bt_any);
+  bif_define_typed ("regexp_replace_hits_with_template", bif_regexp_replace_hits_with_template, &bt_varchar);
   bif_define_typed ("regexp_version", bif_regexp_version, &bt_varchar);
 }
 
diff --git a/libsrc/Wi/bif_repl.c b/libsrc/Wi/bif_repl.c
index 1c54bce..cb5fbc9 100644
--- a/libsrc/Wi/bif_repl.c
+++ b/libsrc/Wi/bif_repl.c
@@ -1,14 +1,14 @@
 /*
  *  bif_repl.c
  *
- *  $Id: bif_repl.c,v 1.8.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_repl.c,v 1.8.2.4 2012/03/09 13:42:56 source Exp $
  *
  *  Replication functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -65,7 +65,7 @@ sched_do_round_1 (const char * text)
   if (!err)
     err = qr_quick_exec (qr, sched_cli, "", NULL, 0);
   qr_free (qr);
-  if (err)
+  if (err && err != (caddr_t) SQL_NO_DATA_FOUND)
     {
       if (strcmp ("40001", ERR_STATE (err)))
 	log_info ("Scheduler error %s : %s", ERR_STATE (err), ERR_MESSAGE (err));
diff --git a/libsrc/Wi/bif_search_excerpt.c b/libsrc/Wi/bif_search_excerpt.c
new file mode 100644
index 0000000..ed872ed
--- /dev/null
+++ b/libsrc/Wi/bif_search_excerpt.c
@@ -0,0 +1,1045 @@
+/*
+ *  bif_search_excerpt.c
+ *
+ *  $Id: bif_search_excerpt.c,v 1.1.2.2 2012/03/08 12:55:33 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef SELF_INCLUDE
+#include "http.h" /* for dks_esc_write and DKS_ESC_... */
+#include "langfunc.h"
+#include "multibyte.h"
+#include "sqlbif.h"
+#include "strlike.h" /* for nc_strstr */
+#include "srvmultibyte.h"
+
+extern const wchar_t *strchr__wide (const wchar_t *str, int c);
+
+
+#define SE_MAX_EXCERPT_HITS	10
+#define SE_HIT_WORD_WEIGHT	100
+
+/*!
+\returns pointer to that point of haystack, where the first instance of needle is found.
+Case and accents of \c haystack does not matter.
+\c needle is supposed to consist only uppercase base letters and non-letters, but no lowercase or accents
+ */
+const wchar_t *
+st_wstr_contains_unaccented_ucase_wstr (const wchar_t *haystack, const wchar_t *needle)
+{
+  int first_is_plain;
+  wchar_t first, hstk_first = 0, ndl_first;
+  const wchar_t *hstk, *ndl;
+  first = *needle;
+  if (!first)
+    return haystack;
+  first_is_plain = !IS_UNICHAR_ALPHA(first);
+  if (first_is_plain)
+    needle++; /* we will optimize it with strchr_wide */
+again:
+  if (first_is_plain)
+    { /* It's some non-letter character (e.g. a digit), then we can search
+it with strchr. If the first letter of needle is not found from haystack, then this surely fails: */
+      haystack = strchr__wide (haystack, first);
+      if (NULL == haystack)
+        return NULL;
+      haystack++;
+    }
+   hstk = haystack, ndl = needle;
+   for (;;)
+     {
+       ndl_first = ndl[0];
+       if (0 == ndl_first)
+         break;
+       hstk_first = hstk[0];
+       if (!hstk_first)
+         return NULL;
+       hstk_first = unicode3_getupperbasechar (hstk_first);
+       if (hstk_first != ndl_first)
+         {
+           if (!first_is_plain)
+             haystack++;
+           goto again; /* see above */
+         }
+       ndl++; hstk++;
+     }
+  return (first_is_plain ? haystack-1 : haystack);
+}
+
+
+/*!
+\returns pointer to that point of haystack, where the first instance of needle is found.
+Case and accents of \c haystack does not matter.
+\c needle is supposed to consist only uppercase base letters and non-letters, but no lowercase or accents.
+If \c hit_end_ptr is not NULL and the function returns non-NULL then \c hit_end_ptr is filled with pointer to the past-the end char of the found occurence. */
+const utf8char *
+st_utf8_str_contains_unaccented_ucase_wstr (const utf8char *haystack, const wchar_t *needle, const utf8char **hit_end_ptr)
+{
+  int first_is_plain;
+  wchar_t first_wide, hstk_first = 0, ndl_first;
+  utf8char first_utf8buf[MAX_UTF8_CHAR+1];
+  int first_utf8len;
+  const wchar_t *ndl;
+  const utf8char *hstk;
+  first_wide = *needle;
+  if (!first_wide)
+    return haystack;
+  first_is_plain = !IS_UNICHAR_ALPHA(first_wide);
+  if (first_is_plain)
+    {
+      utf8char *res = (utf8char *)eh_encode_char__UTF8 (first_wide, (char *)first_utf8buf, (char *)first_utf8buf + MAX_UTF8_CHAR);
+      if (res == first_utf8buf)
+        return NULL; /* can't search for invalid char */
+      first_utf8len = (first_utf8buf - res);
+      res[0] = '\0';
+      needle++;
+    }
+again:
+  if (first_is_plain)
+    { /* It's some non-letter character (e.g. a digit), then we can search
+it with strchr or strstr. If the first letter of needle is not found from haystack, then this surely fails: */
+      haystack = (utf8char *)((1 == first_utf8len) ? strchr ((const char *)haystack, first_wide) : strstr ((const char *)haystack, (char *)first_utf8buf));
+      if (NULL == haystack)
+        return NULL;
+      haystack += first_utf8len;
+    }
+   hstk = haystack, ndl = needle;
+   for (;;)
+     {
+       ndl_first = ndl[0];
+       if (0 == ndl_first)
+         break;
+       hstk_first = eh_decode_char__UTF8 ((__constcharptr *)(&hstk), (const char *)(hstk + MAX_UTF8_CHAR));
+       if (!hstk_first)
+         return NULL;
+       hstk_first = unicode3_getupperbasechar (hstk_first);
+       if (hstk_first != ndl_first)
+         {
+           if (!first_is_plain)
+             do { haystack++; }  while (IS_UTF8_CHAR_CONT(haystack[0]));
+           goto again; /* see above */
+         }
+       ndl++;
+     }
+  if (NULL != hit_end_ptr)
+    hit_end_ptr[0] = hstk;
+  return (first_is_plain ? haystack-1 : haystack);
+}
+
+typedef wchar_t *widecaddr_t;
+typedef const wchar_t *wideccaddr_t;
+
+#define SE_CHARPTR_HAS_WORDTAILDELIM(ptr) \
+ (('.' == (ptr)[0]) || (',' == (ptr)[0]) || (':' == (ptr)[0]) || (';' == (ptr)[0]))
+
+
+#define WORD_POINTS	(caddr_t)1
+#define WORD_POINT_1	(caddr_t)2
+
+#define PUSH_POINT(set) \
+  if ((set) && ((set)->data != WORD_POINT_1)) dk_set_push (&(set), WORD_POINT_1);
+
+#define SE_MODE_HTML	0
+#define SE_MODE_WIKI	1
+#define SE_MODE_TEXT	2
+#define SE_MODE_MAX	3
+
+#define SE_NARROW	0
+#define SE_UTF8		1
+#define SE_WIDE		2
+
+typedef struct se_hit_s
+{
+  ptrlong	seh_idx; /*!< index of hit word in word_hit */
+  const char *	seh_hit_begin; /*!< pointer of hit word found in main doc */
+  const char *	seh_hit_end; /*!< pointer past the end of hit word found in main doc */
+} se_hit_t;
+
+#define SE_HIT_TAG_LEN 80
+typedef struct se_ctx_s
+{
+  union {
+    const char *	se_narrow_doc;
+    const char *	se_utf8_doc;
+    const wchar_t *	se_wide_doc;
+    } se_doc_;
+  caddr_t *	se_hit_words;
+  se_hit_t **	se_hits;
+  int		se_hits_len;
+  int		se_total;
+  int		se_excerpt_max;
+  int		se_text_mode;
+  int		se_wide_mode;
+  char		se_hit_tag[SE_HIT_TAG_LEN];
+  /* result */
+  caddr_t **	se_sentences;
+  /* do not search hit words, just make an excerpt from begin */
+  int		se_from_begin;
+} se_ctx_t;
+
+caddr_t
+se_new_hit (int idx, const void *begin, const void *end)
+{
+  se_hit_t * seh = (se_hit_t*) dk_alloc (sizeof (se_hit_t));
+  seh->seh_idx = idx;
+  seh->seh_hit_begin = begin;
+  seh->seh_hit_end = end;
+  return (caddr_t) seh;
+}
+
+/* creates ordered set from ordered sets of ptrlongs
+ */
+dk_set_t
+se_merge_sets (dk_set_t s1, dk_set_t s2)
+{
+  dk_set_t res = 0;
+  while (s1 && s2)
+    {
+      if (((se_hit_t *)(s1->data))->seh_hit_begin < ((se_hit_t *)(s2->data))->seh_hit_begin)
+        {
+          dk_set_push (&res, s1->data);
+          s1 = s1->next;
+        }
+      else
+        {
+          dk_set_push (&res, s2->data);
+          s2 = s2->next;
+        }
+    }
+  while (s1)
+    {
+      dk_set_push (&res, s1->data);
+      s1 = s1->next;
+    }
+  while (s2)
+    {
+      dk_set_push (&res, s2->data);
+      s2 = s2->next;
+    }
+  return res;
+}
+
+#endif
+
+
+#ifdef SELF_INCLUDE
+
+#ifdef WIDE_EXCERPT
+#define SE_char wchar_t
+#define SE_caddr_t widecaddr_t
+#define SE_ccaddr_t wideccaddr_t
+#define SE_NAME(name) se_wide_##name
+#define SE_box_dv_nchars box_dv_wide_nchars
+#define SE_ISUTF8HALFCHAR(c) 0
+#define SE_SKIP_CHAR(ptr) do { (ptr)++; } while(0)
+
+#define SE_CHARPTR_HAS_HITCHAR(ptr, ptrptr) \
+  (((ptr)[0] & ~0x7f) ? \
+    unichar_getprops((ptr)[0]) & (UCP_ALPHA | UCP_IDEO) : \
+    (isalpha((ptr)[0]) || isdigit((ptr)[0])) )
+
+#define SE_CHARPTR_HAS_WORDCHAR(ptr, ptrptr) \
+  (((ptr)[0] & ~0x7f) ? \
+    unichar_getprops((ptr)[0]) & (UCP_ALPHA | UCP_IDEO) : \
+    (isalpha((ptr)[0]) || isdigit((ptr)[0]) || SE_CHARPTR_HAS_WORDTAILDELIM(ptr)) )
+
+#endif
+
+
+#ifdef UTF8_EXCERPT
+#define SE_char char
+#define SE_caddr_t caddr_t
+#define SE_ccaddr_t ccaddr_t
+#define SE_NAME(name) se_utf8_##name
+#define SE_box_dv_nchars box_dv_short_nchars
+#define SE_ISUTF8HALFCHAR(c) ((c & 0xC0) == 0x80)
+#define SE_SKIP_CHAR(ptr) do { (ptr)++; }  while (SE_ISUTF8HALFCHAR ((ptr)[0]))
+
+#define SE_CHARPTR_HAS_HITCHAR(ptr, ptrptr) \
+  (((ptr)[0] & 0x80) ? \
+    (SE_ISUTF8HALFCHAR ((ptr)[0]) ? 0 : \
+      unichar_getprops((ptrptr[0] = (ptr), eh_decode_char__UTF8 (ptrptr, (ptr)+MAX_UTF8_CHAR))) & (UCP_ALPHA | UCP_IDEO) ) : \
+    (isalpha((ptr)[0]) || isdigit((ptr)[0])) )
+
+#define SE_CHARPTR_HAS_WORDCHAR(ptr, ptrptr) \
+  (((ptr)[0] & 0x80) ? \
+    (SE_ISUTF8HALFCHAR ((ptr)[0]) ? 0 : \
+      unichar_getprops((ptrptr[0] = (ptr), eh_decode_char__UTF8 (ptrptr, (ptr)+MAX_UTF8_CHAR))) & (UCP_ALPHA | UCP_IDEO) ) : \
+    (isalpha((ptr)[0]) || isdigit((ptr)[0]) || SE_CHARPTR_HAS_WORDTAILDELIM(ptr)) )
+
+#endif
+
+
+#ifdef NARROW_EXCERPT
+#define SE_char char
+#define SE_caddr_t caddr_t
+#define SE_ccaddr_t ccaddr_t
+#define SE_NAME(name) se_narrow_##name
+#define SE_box_dv_nchars box_dv_short_nchars
+#define SE_ISUTF8HALFCHAR(c) 0
+#define SE_SKIP_CHAR(ptr) do { (ptr)++; } while(0)
+
+#define SE_CHARPTR_HAS_HITCHAR(ptr, ptrptr) \
+  (((ptr)[0] & 0x80) ? \
+    unichar_getprops((ptr)[0]) & (UCP_ALPHA | UCP_IDEO) : \
+    (isalpha((ptr)[0]) || isdigit((ptr)[0])) )
+
+#define SE_CHARPTR_HAS_WORDCHAR(ptr, ptrptr) \
+  (((ptr)[0] & 0x80) ? \
+    unichar_getprops((ptr)[0]) & (UCP_ALPHA | UCP_IDEO) : \
+    (isalpha((ptr)[0]) || isdigit((ptr)[0]) || SE_CHARPTR_HAS_WORDTAILDELIM(ptr)) )
+
+#endif
+
+
+
+/* search_excerpt */
+
+#define SE_HIT_BEGIN(seh) (const SE_char *)(((se_hit_t*) seh)->seh_hit_begin)
+#define SE_HIT_END(seh) (const SE_char *)(((se_hit_t*) seh)->seh_hit_end)
+
+int
+SE_NAME(check_html_tag) (const SE_char ** wpoint);
+
+caddr_t
+SE_NAME(print) (se_ctx_t * se)
+{
+  caddr_t _result;
+  dk_session_t * strses = strses_allocate();
+  int sent_inx, word_inx;
+  int points = 0;
+  DO_BOX (caddr_t, sentence, sent_inx, se->se_sentences)
+    {
+      if (sent_inx && BOX_ELEMENTS (sentence))
+        SES_PRINT (strses, " ");
+      DO_BOX (caddr_t, word, word_inx, sentence)
+        {
+          if (word == WORD_POINTS)
+            points++;
+          else
+            points = 0;
+          if (points == 2)
+            {
+              points = 0;
+              continue;
+            }
+          if (word == WORD_POINTS)
+            SES_PRINT (strses, "...");
+          else if (word == WORD_POINT_1)
+            SES_PRINT (strses, ".");
+          else if (DV_TYPE_OF (word) != DV_ARRAY_OF_POINTER)
+            {
+#ifdef WIDE_EXCERPT
+              dks_esc_write (strses, (char *)(word), box_length (word) - sizeof(wchar_t), CHARSET_UTF8, CHARSET_WIDE,
+                se->se_text_mode ? DKS_ESC_NONE : DKS_ESC_PTEXT );
+#else
+              session_buffered_write (strses, word, box_length (word) - 1);
+#endif
+            }
+          else
+            {
+              caddr_t *hit = (caddr_t*)word;
+              if (!se->se_text_mode)
+                {
+                  session_buffered_write_char ('<', strses);
+                  SES_PRINT (strses, se->se_hit_tag);
+                  session_buffered_write_char ('>', strses);
+                }
+#ifdef WIDE_EXCERPT
+              dks_esc_write (strses, (char *)(hit[1]), box_length (hit[1]) - sizeof(wchar_t), CHARSET_UTF8, CHARSET_WIDE,
+                se->se_text_mode ? DKS_ESC_NONE : DKS_ESC_PTEXT );
+#else
+              session_buffered_write (strses, hit[1], box_length (hit[1]) - 1);
+#endif
+              if (!se->se_text_mode)
+                {
+                  SES_PRINT (strses, "</");
+                  SES_PRINT (strses, se->se_hit_tag);
+                  session_buffered_write_char ('>', strses);
+                }
+              if (NULL != hit[2])
+                {
+                  session_buffered_write_char ((ptrlong)(hit[2]), strses);
+                }
+            }
+          if (word_inx + 2 < BOX_ELEMENTS (sentence)) /* word before . or ... */
+            SES_PRINT (strses, " ");
+        }
+      END_DO_BOX;
+    }
+  END_DO_BOX;
+  _result = strses_string (strses);
+#ifndef NARROW_EXCERPT
+  box_flags (_result) = BF_UTF8;
+#endif
+  strses_free (strses);
+  return _result;
+}
+
+void SE_NAME(push_hit_word) (dk_set_t* set, const SE_char *start, const SE_char *end)
+{
+  caddr_t * hwrd = (caddr_t *) dk_alloc_box (3 * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
+  hwrd [0] = box_num (1);
+  if (SE_CHARPTR_HAS_WORDTAILDELIM(end-1))
+    {
+      do { end--; } while ((end > (start+1)) && SE_CHARPTR_HAS_WORDTAILDELIM(end-1));
+      hwrd [1] = SE_box_dv_nchars (start, end - start);
+      hwrd [2] = (caddr_t)((ptrlong)((unsigned)(end[0])));
+    }
+  else
+    {
+      hwrd [1] = SE_box_dv_nchars (start, end - start);
+      hwrd [2] = NULL;
+    }
+  dk_set_push (set, hwrd);
+}
+
+/* returns offset to begin of tag */
+int
+SE_NAME(get_html_tag_offset) (SE_ccaddr_t doc, const SE_char *pointer, int max_offset)
+{
+  const SE_char *start = pointer;
+  while (--start > doc)
+    {
+      if (pointer - start > max_offset)
+        return max_offset + 1;
+      if (start[0] == '<')
+        {
+          const SE_char *tag_end = start;
+          if (SE_NAME(check_html_tag) (&tag_end) && (tag_end == (pointer + 1)))
+            return (pointer - start);
+        }
+    }
+  return 0;
+}
+
+/* return 1 if html tag detected,
+   points wpoint to the end of tag
+*/
+int
+SE_NAME(check_html_tag) (const SE_char ** wpoint)
+{
+  const SE_char * p = wpoint[0];
+  if (p[0] == '<')
+    {
+      p++;
+      if ((p[0] == '/') && isalpha(p[1]))
+        { /* close tag */
+          p++;
+          while (p[0] && (p[0] != '>')) p++;
+          if (p[0])
+            {
+              wpoint[0] = p + 1;
+              return 1;
+            }
+        }
+      else if (isalpha (p[0]))
+        { /* open tag, empty tag */
+          while (p[0] && (p[0] != '>')) p++;
+          if (p[0])
+            {
+              wpoint[0] = p + 1;
+              return 1;
+            }
+        }
+      else if (p[0] == '!' &&
+               p[1] == '-' &&
+               p[2] == '-') /* comments */
+        {
+          p += 2;
+          while (p[0] && p[1] && p[2])
+            {
+              if (p[0] == '-' &&
+                  p[1] == '-' &&
+                  p[2] == '>')
+                {
+                  wpoint[0] = p + 3;
+                  return 1;
+                }
+              p++;
+            }
+        }
+    }
+  else if (p[0] == '&')
+    {
+      p++;
+      while (isalpha (p[0])) ++p;
+      if (p[0] == ';')
+        {
+          wpoint[0] = ++p;
+          return 1;
+        }
+    }
+  return 0;
+}
+
+/* return either begin of the sentence or pointer after left_border */
+SE_ccaddr_t
+SE_NAME(ctx_to_begin) (SE_ccaddr_t doc, const SE_char *left_border, const SE_char *start_from, int max_offset, int text_mode, int * hit_left_border)
+{
+  const SE_char *pointer = start_from;
+  while ((max_offset-- >= 0) && (pointer > left_border))
+    {
+      if (pointer[0] == '.')
+        return pointer + 1;
+      else if (!text_mode && (pointer[0] == '>')) /* possible tag */
+        {
+          int back_offset = SE_NAME(get_html_tag_offset) (doc, pointer, max_offset);
+          if (back_offset > max_offset)
+            return pointer + 1;
+          else if (back_offset)
+            {
+              max_offset -= back_offset;
+              pointer -= back_offset + 1;
+              continue;
+            }
+        }
+      pointer--;
+    }
+  if (left_border == pointer)
+    {
+      if (hit_left_border)
+        hit_left_border[0] = 1;
+      if (doc == left_border)
+        return pointer;
+    }
+  SE_SKIP_CHAR(pointer);
+  return pointer;
+}
+
+void
+SE_NAME(ctx_tokenize_doc) (se_ctx_t * se)
+{
+  caddr_t * curr_sentence;
+  dk_set_t curr_sentence_set = 0;
+  dk_set_t sentences_set = 0;
+  const SE_char *wstart, *wpoint;
+  int hidx = 0;
+  int sentence_hit_weight = 0;
+  int total_counter = 0, prev_total_counter = 0;
+  int excerpt_counter = 0;
+  int all_complete = 0;
+  int point_at_the_end = 0;
+  int sentences_count = 0;
+#ifdef UTF8_EXCERPT
+  __constcharptr ptrptr[1];
+#endif
+  if (!se->se_from_begin)
+    wpoint = SE_NAME(ctx_to_begin) (se->se_doc_.SE_NAME(doc), se->se_doc_.SE_NAME(doc), SE_HIT_BEGIN(se->se_hits[0]), se->se_excerpt_max / 2, se->se_text_mode, 0);
+  else
+    wpoint = SE_NAME(ctx_to_begin) (se->se_doc_.SE_NAME(doc), se->se_doc_.SE_NAME(doc), se->se_doc_.SE_NAME(doc), se->se_excerpt_max / 2, se->se_text_mode, 0);
+  wstart = wpoint;
+  /* search sentence */
+ again:
+  while (wpoint[0] && wpoint[0] != '.')
+    {
+#ifndef NDEBUG
+      if (SE_ISUTF8HALFCHAR (wpoint[0]))
+        GPF_T;
+#endif
+      if (!sentences_count)
+        {
+          if (wpoint != se->se_doc_.SE_NAME(doc))
+            dk_set_push (&curr_sentence_set, WORD_POINTS);
+          ++sentences_count;
+        }
+      if (SE_CHARPTR_HAS_WORDCHAR (wpoint, ptrptr))
+        {
+          SE_SKIP_CHAR(wpoint);
+          continue;
+        }
+      if (total_counter + wpoint - wstart >= se->se_total)
+        {
+          all_complete = 1;
+          goto excerpt_end;
+        }
+      if (excerpt_counter +  wpoint - wstart >= se->se_excerpt_max)
+        {
+          wstart = wpoint;
+          goto excerpt_end;
+        }
+      if (!se->se_from_begin)
+        {
+          int curr_sentence_set_is_ok = 0;
+          for (;;)
+            {
+              se_hit_t *seh;
+              caddr_t seh_word;
+              int seh_word_len;
+              if (hidx >= se->se_hits_len)
+                break;
+              seh = se->se_hits[hidx];
+              if (SE_HIT_BEGIN(seh) < wstart)
+                {
+                  hidx++;
+                  continue;
+                }
+              if (SE_HIT_BEGIN(seh) > wstart)
+                break;
+              seh_word = se->se_hit_words[seh->seh_idx];
+              seh_word_len = SE_HIT_END(seh) - SE_HIT_BEGIN(seh);
+              if (((wpoint - wstart) == seh_word_len) || !SE_CHARPTR_HAS_HITCHAR(wstart+seh_word_len, ptrptr))
+                {
+                  SE_NAME(push_hit_word) (&curr_sentence_set, wstart, wpoint);
+                  sentence_hit_weight += SE_HIT_WORD_WEIGHT;
+                }
+              hidx++;
+              curr_sentence_set_is_ok = 1;
+              break;
+             }
+           if ((wpoint - wstart) && !curr_sentence_set_is_ok)
+             {
+               dk_set_push (&curr_sentence_set,
+                     SE_box_dv_nchars (wstart, wpoint - wstart));
+             }
+        }
+      else if (wpoint - wstart)
+        dk_set_push (&curr_sentence_set,
+                     SE_box_dv_nchars (wstart, wpoint - wstart));
+      total_counter += wpoint - wstart;
+      excerpt_counter += wpoint - wstart;
+      if (!se->se_text_mode && SE_NAME(check_html_tag) (&wpoint))
+        wstart = wpoint;
+      while (wpoint[0] && !SE_CHARPTR_HAS_WORDCHAR(wpoint, ptrptr))
+        {
+          if (!se->se_text_mode && SE_NAME(check_html_tag) (&wpoint))
+            wstart = wpoint;
+          else
+            {
+              if (wpoint[0])
+                {
+                  SE_SKIP_CHAR(wpoint);
+                }
+              wstart = wpoint;
+            }
+        }
+    }
+  if ((wstart+1) != wpoint) /* "{ws}." */
+    {
+      int curr_sentence_set_is_ok = 0;
+      if (total_counter + wpoint - wstart >= se->se_total)
+        {
+          all_complete = 1;
+          goto excerpt_end;
+        }
+      if (excerpt_counter + wpoint - wstart >= se->se_excerpt_max)
+        {
+          wstart = wpoint;
+          goto excerpt_end;
+        }
+      for (;;)
+        {
+          se_hit_t *seh;
+          caddr_t seh_word;
+          int seh_word_len;
+          if (se->se_from_begin)
+            break;
+          if (hidx >= se->se_hits_len)
+            break;
+          seh = se->se_hits[hidx];
+          if (SE_HIT_BEGIN(seh) != wstart)
+            break;
+          seh_word = se->se_hit_words[seh->seh_idx];
+          seh_word_len = SE_HIT_END(seh) - SE_HIT_BEGIN(seh);
+          if (((wpoint - wstart) == seh_word_len) || !SE_CHARPTR_HAS_HITCHAR(wstart+seh_word_len, ptrptr))
+            {
+              SE_NAME(push_hit_word) (&curr_sentence_set, wstart, wpoint);
+              sentence_hit_weight += SE_HIT_WORD_WEIGHT;
+            }
+          hidx++;
+          curr_sentence_set_is_ok = 1;
+          break;
+        }
+      if ((wpoint-wstart) && !curr_sentence_set_is_ok)
+        {
+          dk_set_push (&curr_sentence_set,
+                     SE_box_dv_nchars (wstart, wpoint - wstart));
+          wstart = wpoint;
+        }
+      PUSH_POINT(curr_sentence_set);
+      point_at_the_end = 1;
+    }
+excerpt_end:
+  if(!point_at_the_end)
+    dk_set_push (&curr_sentence_set, WORD_POINTS);
+  if (wstart[0] == '.')
+    wstart++;
+  if (wpoint[0] == '.')
+    wpoint++;
+  if (se->se_from_begin || sentence_hit_weight)
+    {
+      /* dk_set_append_1 (&curr_sentence_set, box_num (sentence_hit_weight)); */
+      if (dk_set_length(curr_sentence_set) > 0)
+        {
+          curr_sentence = (caddr_t *) list_to_array (dk_set_nreverse (curr_sentence_set));
+          dk_set_push (&sentences_set, curr_sentence);
+        }
+      ++sentences_count;
+    }
+  else
+    {
+      DO_SET (caddr_t, el, &curr_sentence_set)
+        {
+          dk_free_box (el);
+        }
+      END_DO_SET();
+      all_complete = 0;
+      total_counter = prev_total_counter;
+      dk_set_free (curr_sentence_set);
+      --sentences_count;
+    }
+  curr_sentence_set = 0;
+  if (!se->se_from_begin)
+    {
+      if (!all_complete)
+        {
+          while ((hidx < se->se_hits_len) && (SE_HIT_BEGIN(se->se_hits[hidx]) < wpoint))
+            hidx++;
+          if (hidx < se->se_hits_len)
+            {
+              int hit_left_border = 0;
+              if (!point_at_the_end && !hit_left_border)
+                dk_set_push (&curr_sentence_set, WORD_POINTS);
+              wstart = wpoint = SE_NAME(ctx_to_begin) (se->se_doc_.SE_NAME(doc), wpoint, SE_HIT_BEGIN(se->se_hits[hidx]), se->se_excerpt_max / 2,
+                                                         se->se_text_mode, &hit_left_border);
+              if (!hit_left_border || (se->se_doc_.SE_NAME(doc) != wpoint))
+                {
+                  sentence_hit_weight = 0;
+                  excerpt_counter = 0;
+                  point_at_the_end = 0;
+                  prev_total_counter = total_counter;
+                  goto again;
+                }
+            }
+        }
+    }
+  else if (wpoint[0])
+    {
+      sentence_hit_weight = 0;
+      excerpt_counter = 0;
+      prev_total_counter = total_counter;
+      SE_SKIP_CHAR(wpoint);
+      goto again;
+    }
+  se->se_sentences = (caddr_t**) list_to_array (dk_set_nreverse (sentences_set));
+}
+
+int
+SE_NAME(ctx_search_cluster) (se_hit_t ** hit_index, int hit_index_sz, int cluster_sz)
+{
+  int idx;
+  for (idx = 1; idx < hit_index_sz; idx ++)
+    if ((SE_HIT_BEGIN(hit_index[idx]) - SE_HIT_BEGIN(hit_index[idx-1])) < cluster_sz)
+      return idx - 1;
+  return 0;
+}
+
+#undef SE_char
+#undef SE_caddr_t
+#undef SE_ccaddr_t
+#undef SE_NAME
+#undef SE_box_dv_nchars
+#undef SE_ISUTF8HALFCHAR
+#undef SE_SKIP_CHAR
+#undef SE_CHARPTR_HAS_HITCHAR
+#undef SE_CHARPTR_HAS_WORDCHAR
+
+#endif
+
+#ifndef SELF_INCLUDE
+
+#define SELF_INCLUDE
+#define WIDE_EXCERPT
+#include "bif_search_excerpt.c"
+#undef WIDE_EXCERPT
+#define UTF8_EXCERPT
+#include "bif_search_excerpt.c"
+#undef UTF8_EXCERPT
+#define NARROW_EXCERPT
+#include "bif_search_excerpt.c"
+#undef NARROW_EXCERPT
+#undef SELF_INCLUDE
+
+
+caddr_t
+se_tokenize_and_print (se_ctx_t *se)
+{
+  caddr_t res;
+  switch (se->se_wide_mode)
+    {
+    case SE_NARROW:
+      se_narrow_ctx_tokenize_doc (se);
+      res = se_narrow_print (se);
+      break;
+    case SE_UTF8:
+      se_utf8_ctx_tokenize_doc (se);
+      res = se_utf8_print (se);
+      break;
+    case SE_WIDE:
+      se_wide_ctx_tokenize_doc (se);
+      res = se_wide_print (se);
+      break;
+    }
+  dk_free_tree ((box_t)(se->se_sentences));
+  return res;
+}
+
+
+caddr_t
+bif_search_excerpt (caddr_t *qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t *orig_word_hits = bif_strict_2type_array_arg (DV_STRING, DV_WIDE, qst, args, 0, "search_excerpt");
+  caddr_t *normalized_word_hits = NULL;
+  caddr_t text, text_with_offset = NULL, original_text  = bif_arg (qst, args, 1, "search_excerpt");
+  ptrlong within_first = 200000;
+  ptrlong max_excerpt = 90;
+  ptrlong total = 200;
+  caddr_t html_hit_tag;
+  caddr_t _result = NULL;
+  int wide_mode, word_hits_count;
+  long mode = SE_MODE_HTML;
+  se_hit_t ** hit_index;
+  int hit_inx = 0;
+  int inx, inx2;
+  dk_set_t hit_sets[SE_MAX_EXCERPT_HITS];
+  dk_set_t hit_res_set = 0;
+
+  if (DV_RDF == DV_TYPE_OF (original_text))
+    original_text = ((rdf_box_t*)original_text)->rb_box;
+  if (DV_WIDESTRINGP (original_text))
+    wide_mode = SE_WIDE;
+  else if (DV_STRINGP (original_text))
+    wide_mode = (((BF_UTF8 | BF_IRI) & box_flags(original_text)) ? SE_UTF8 : SE_NARROW);
+  else
+    return NEW_DB_NULL; /* if not a string, can happen in weird join orders with any columns */
+  memset (hit_sets, 0, sizeof (hit_sets));
+  word_hits_count = BOX_ELEMENTS (orig_word_hits);
+  if (word_hits_count > SE_MAX_EXCERPT_HITS)
+    sqlr_new_error ("XXXXX", "SRXXX", "search_excerpt does not support more than %d hits", SE_MAX_EXCERPT_HITS);
+
+  if (BOX_ELEMENTS (args) > 2)
+    within_first = bif_long_range_arg (qst, args, 2, "search_excerpt", 0, MAX_BOX_LENGTH);
+  if (BOX_ELEMENTS (args) > 3)
+    max_excerpt = bif_long_range_arg (qst, args, 3, "search_excerpt", 0, MAX_BOX_LENGTH);
+  if (BOX_ELEMENTS (args) > 4)
+    total = bif_long_arg (qst, args, 4, "search_excerpt");
+  if (BOX_ELEMENTS (args) > 5)
+    html_hit_tag = bif_string_or_null_arg (qst, args, 5, "search_excerpt");
+  else
+    html_hit_tag = "b";
+  if (BOX_ELEMENTS (args) > 6)
+    mode = bif_long_arg (qst, args, 6, "search_excerpt");
+  if ( (mode < 0) && (mode >= SE_MODE_MAX))
+    mode = SE_MODE_HTML;
+  DO_BOX_FAST (caddr_t, hit, inx, orig_word_hits)
+    {
+      if (!box_length (hit) || !hit[0])
+        sqlr_new_error ("XXXXX", "SRXXX", "hit words must be non-zero length");
+    }
+  END_DO_BOX_FAST;
+  normalized_word_hits = (caddr_t *)box_copy /* not _tree */ ((caddr_t)orig_word_hits);
+  DO_BOX_FAST (caddr_t, hit, inx, normalized_word_hits)
+    {
+      caddr_t tmp_wide_hit;
+      wchar_t *tail;
+      if (DV_STRINGP (hit))
+        {
+          if ((BF_UTF8 | BF_IRI) & box_flags (hit))
+            tmp_wide_hit = box_utf8_as_wide_char (hit, NULL, box_length(hit)-1, 0, DV_STRING);
+          else
+            tmp_wide_hit = box_narrow_string_as_wide ((unsigned char *)hit, NULL, 0, qst ? QST_CHARSET (qst) : NULL, NULL /* no err */, 1);
+          if (NULL == tmp_wide_hit)
+            goto fin; /* see below */
+        }
+      else
+        tmp_wide_hit = box_copy (hit);
+      for (tail = (wchar_t *)(tmp_wide_hit + box_length (tmp_wide_hit) - sizeof (wchar_t)); tail >= (wchar_t *)tmp_wide_hit; tail--)
+        {
+          if ((int)(tail[0]) & ~0x7f)
+            tail[0] = unicode3_getupperbasechar (tail[0]);
+          else
+            tail[0] = toupper (tail[0]);
+        }
+      switch (wide_mode)
+        {
+        case SE_WIDE:
+        case SE_UTF8:
+          normalized_word_hits[inx] = tmp_wide_hit;
+          break;
+#if 0
+        case SE_UTF8:
+          normalized_word_hits[inx] = box_wide_as_utf8_char (tmp_wide_hit, box_length (tmp_wide_hit) / sizeof (wchar_t) - 1, DV_STRING);
+          dk_free_box (tmp_wide_hit);
+          break;
+#endif
+        case SE_NARROW:
+          normalized_word_hits[inx] = box_wide_string_as_narrow (tmp_wide_hit, NULL, box_length (tmp_wide_hit) / sizeof (wchar_t) - 1, qst ? QST_CHARSET (qst) : NULL);
+          dk_free_box (tmp_wide_hit);
+          break;
+        }
+    }
+  END_DO_BOX_FAST;
+  for (inx = word_hits_count; inx--; /* no step */)
+    {
+      for (inx2 = inx; inx2--; /* no step */)
+        {
+          caddr_t swap;
+          if (box_length (normalized_word_hits[inx2]) <= box_length (normalized_word_hits[inx]))
+            continue;
+          swap = normalized_word_hits[inx2]; normalized_word_hits[inx2] = normalized_word_hits[inx]; normalized_word_hits[inx] = swap;
+        }
+    }
+  if (SE_WIDE == wide_mode)
+    {
+      if (((box_length (original_text) / sizeof (wchar_t)) - 1) > within_first)
+        text = box_dv_wide_nchars ((wchar_t *)original_text, within_first);
+      else
+        text = original_text;
+    }
+  else if (box_length (original_text) > within_first)
+    text = box_dv_short_nchars (original_text, within_first);
+  else
+    text = original_text;
+
+  if (html_hit_tag && (mode == SE_MODE_HTML))
+    {
+      if (SE_WIDE == wide_mode)
+        text_with_offset = (caddr_t) nc_strstr__wide ((wchar_t *) text, L"<body");
+      else
+        text_with_offset = (caddr_t) nc_strstr ((unsigned char *) text, (unsigned char *) "<body");
+    }
+  if (!text_with_offset)
+    text_with_offset = text;
+
+  DO_BOX (caddr_t, hit, inx, normalized_word_hits)
+    {
+      const char * hit_pointer = text_with_offset;
+      for (;;)
+        {
+          const char *hit_end;
+          switch (wide_mode)
+            {
+            case SE_NARROW:
+              hit_pointer = (char *) nc_strstr ( (unsigned char *) hit_pointer, (unsigned char *) hit);
+              if (hit_pointer)
+                hit_end = (hit_pointer + box_length (hit) - 1);
+              break;
+            case SE_UTF8:
+              hit_pointer = (const char *)st_utf8_str_contains_unaccented_ucase_wstr ((const utf8char *)hit_pointer, (const wchar_t *)hit, (const utf8char **)(&hit_end));
+              break;
+            case SE_WIDE: hit_pointer = (const char *) st_wstr_contains_unaccented_ucase_wstr((wchar_t *) hit_pointer, (wchar_t *) hit);
+              if (hit_pointer)
+                hit_end = (hit_pointer + box_length (hit) - sizeof (wchar_t));
+              break;
+            }
+          if (NULL == hit_pointer)
+            break;
+          dk_set_push (&hit_sets[inx], se_new_hit (inx, hit_pointer, hit_end));
+          hit_pointer = hit_end;
+          hit_inx++;
+        }
+      hit_sets[inx] = dk_set_nreverse (hit_sets[inx]);
+    }
+  END_DO_BOX;
+  if (!hit_inx)
+    goto fin;
+  hit_res_set = hit_sets[0];
+  for (inx = 1; inx < BOX_ELEMENTS (normalized_word_hits); inx++)
+    {
+      dk_set_t _prev = hit_res_set;
+      hit_res_set = dk_set_nreverse (se_merge_sets (_prev, hit_sets[inx]));
+      if (_prev != hit_sets[0])
+        dk_set_free (_prev);
+    }
+  hit_index = (se_hit_t **) dk_set_to_array (hit_res_set);
+  if (hit_res_set != hit_sets[0])
+    dk_set_free (hit_res_set);
+  for (inx = 0; inx < BOX_ELEMENTS (normalized_word_hits); inx++)
+    dk_set_free (hit_sets[inx]);
+
+  { /* check consistency */
+    ccaddr_t prev_el_hit = 0;
+    DO_BOX (se_hit_t*, el, inx, hit_index)
+      {
+        /*        printf ("%s %x\n", el, el);
+                fflush (stdout); */
+        if (prev_el_hit > el->seh_hit_begin)
+          GPF_T;
+        prev_el_hit = el->seh_hit_begin;
+      }
+    END_DO_BOX;
+  }
+  {
+    se_ctx_t se;
+    int hit_index_cluster_ofs;
+    switch (wide_mode)
+      {
+      case SE_NARROW:	hit_index_cluster_ofs = se_narrow_ctx_search_cluster (hit_index, BOX_ELEMENTS (hit_index), max_excerpt / 2); break;
+      case SE_UTF8:	hit_index_cluster_ofs = se_utf8_ctx_search_cluster   (hit_index, BOX_ELEMENTS (hit_index), max_excerpt / 2); break;
+      case SE_WIDE:	hit_index_cluster_ofs = se_wide_ctx_search_cluster   (hit_index, BOX_ELEMENTS (hit_index), max_excerpt / 2); break;
+      }
+    memset (&se, 0, sizeof (se_ctx_t));
+    se.se_doc_.se_narrow_doc = text_with_offset;
+    se.se_hit_words = normalized_word_hits;
+    se.se_hits = hit_index + hit_index_cluster_ofs;
+    se.se_hits_len = BOX_ELEMENTS (hit_index) - hit_index_cluster_ofs;
+    se.se_total = total;
+    se.se_excerpt_max = max_excerpt;
+    se.se_text_mode = (!html_hit_tag);
+    se.se_wide_mode = wide_mode;
+    if (html_hit_tag)
+      strncpy (se.se_hit_tag, html_hit_tag, SE_HIT_TAG_LEN-1);
+    else
+      strcpy (se.se_hit_tag, "b");
+    _result = se_tokenize_and_print (&se);
+  }
+
+  DO_BOX (caddr_t, seh, inx, hit_index)
+    {
+      dk_free (seh, sizeof (se_hit_t));
+    }
+  END_DO_BOX;
+  dk_free_box ((caddr_t)hit_index);
+
+fin:
+  if (!_result)
+    {
+      se_ctx_t se;
+      memset (&se, 0, sizeof (se_ctx_t));
+      se.se_doc_.se_narrow_doc = text_with_offset;
+      se.se_total = total;
+      se.se_excerpt_max = max_excerpt;
+      se.se_text_mode = (!html_hit_tag);
+      se.se_wide_mode = wide_mode;
+      if (html_hit_tag)
+        strncpy (se.se_hit_tag, html_hit_tag, SE_HIT_TAG_LEN-1);
+      else
+        strcpy (se.se_hit_tag, "b");
+      se.se_from_begin = 1;
+      _result = se_tokenize_and_print (&se);
+    }
+  if (text != original_text)
+    dk_free_box (text);
+  dk_free_tree ((caddr_t)normalized_word_hits);
+  return _result;
+}
+
+#endif
diff --git a/libsrc/Wi/bif_smtp.c b/libsrc/Wi/bif_smtp.c
index 1d42e3e..05c4fbe 100644
--- a/libsrc/Wi/bif_smtp.c
+++ b/libsrc/Wi/bif_smtp.c
@@ -1,14 +1,14 @@
 /*
  *  bif_smtp.c
  *
- *  $Id: bif_smtp.c,v 1.3.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_smtp.c,v 1.3.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  SMTP client function
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_soap.c b/libsrc/Wi/bif_soap.c
index 5764d5a..e61f3d8 100644
--- a/libsrc/Wi/bif_soap.c
+++ b/libsrc/Wi/bif_soap.c
@@ -1,12 +1,12 @@
 /*
  *  bif_soap.c
  *
- *  $Id: bif_soap.c,v 1.26.2.9 2010/11/15 10:13:33 source Exp $
+ *  $Id: bif_soap.c,v 1.26.2.10 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_text.c b/libsrc/Wi/bif_text.c
index fb07856..5cd10d5 100644
--- a/libsrc/Wi/bif_text.c
+++ b/libsrc/Wi/bif_text.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: bif_text.c,v 1.12.2.15 2011/03/14 15:46:28 source Exp $
+ *  $Id: bif_text.c,v 1.12.2.17 2012/03/08 12:55:33 source Exp $
  *
  *  Bifs for text index
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1841,7 +1841,7 @@ static char *vt_find_index_text =
 static char *vt_create_text_index_text =
 "create procedure vt_create_text_index (in tb varchar, in col varchar,\n"
 "				       in use_id varchar, in is_xml integer, in defer_generation integer,"
-"				      in obd any, in _func any, in _lang varchar := \'*ini*\', in _enc varchar := \'*ini*\')\n"
+"				      in obd any, in _func any, in _lang varchar := \'*ini*\', in _enc varchar := \'*ini*\', in silent int := 0)\n"
 "{\n"
 "  declare str, text_id_col, kn, vt_name, pk_suits, _colname, func, ufunc, vi_column, text_id_col_type varchar;\n"
 "  declare _coldtp smallint;\n"
@@ -1858,7 +1858,7 @@ static char *vt_create_text_index_text =
 "      signal (\'42S02\', sprintf (\'No table \\\'%s\\\' in create text index\', tb), \'FT021\');\n"
 "  }\n"
 "  if (exists (select 1 from DB.DBA.SYS_VT_INDEX where 0 = casemode_strcmp (VI_TABLE,  tb))) {\n"
-"    if (is_xml = 2) \n"
+"    if (is_xml = 2 or silent) \n"
 "      return; \n"
 "    else\n"
 "      signal (\'42S01\', \'Only one text index allowed per table\', \'FT022\');\n"
diff --git a/libsrc/Wi/bif_text.h b/libsrc/Wi/bif_text.h
index cf7b660..e765f62 100644
--- a/libsrc/Wi/bif_text.h
+++ b/libsrc/Wi/bif_text.h
@@ -1,12 +1,12 @@
 /*
  *  bif_text.h
  *
- *  $Id: bif_text.h,v 1.3.2.2 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_text.h,v 1.3.2.3 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_tidy.c b/libsrc/Wi/bif_tidy.c
index a219211..e1a7b63 100644
--- a/libsrc/Wi/bif_tidy.c
+++ b/libsrc/Wi/bif_tidy.c
@@ -1,14 +1,14 @@
 /*
  *  bif_tidy.c
  *
- *  $Id: bif_tidy.c,v 1.2.2.4 2011/02/18 10:37:24 source Exp $
+ *  $Id: bif_tidy.c,v 1.2.2.6 2012/03/08 12:55:33 source Exp $
  *
  *  Build in Functions for tidying HTML pages
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -48,7 +48,7 @@
 static dk_mutex_t *tidy_mtx;
 
 #ifndef OLD_TIDY
-static void *
+static void * TIDY_CALL
 tidy_malloc (size_t len)
 {
   if (len >= MAX_BOX_LENGTH)
@@ -56,7 +56,7 @@ tidy_malloc (size_t len)
   return t_alloc_box (len, DV_CUSTOM);
 }
 
-static void *
+static void * TIDY_CALL
 tidy_realloc (void * buf, size_t len)
 {
   int buf_size = IS_BOX_POINTER (buf) ? box_length (buf) : 0;
@@ -70,13 +70,13 @@ tidy_realloc (void * buf, size_t len)
   return new;
 }
 
-static void
+static void TIDY_CALL
 tidy_free (void * buf)
 {
   /* void, will release on MP_DONE */
 }
 
-static void
+static void TIDY_CALL
 tidy_panic (const char * err)
 {
   /* log_error ("Tidy panic: %s", err); */
diff --git a/libsrc/Wi/bif_uuencode.c b/libsrc/Wi/bif_uuencode.c
index c62827a..3b6d8e1 100644
--- a/libsrc/Wi/bif_uuencode.c
+++ b/libsrc/Wi/bif_uuencode.c
@@ -1,7 +1,7 @@
 /*
  *  bif_uuencode.c
  *
- *  $Id: bif_uuencode.c,v 1.4.2.2 2010/02/10 16:05:05 source Exp $
+ *  $Id: bif_uuencode.c,v 1.4.2.3 2012/03/08 12:55:33 source Exp $
  *
  *  Build in Functions for UU, XX, Base64, MIME-PlainText and
  *  MIME-QuotedPrintable encodings
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bif_xml.c b/libsrc/Wi/bif_xml.c
index 7ce6a52..4ad6650 100644
--- a/libsrc/Wi/bif_xml.c
+++ b/libsrc/Wi/bif_xml.c
@@ -1,12 +1,12 @@
 /*
  *  bif_xml.c
  *
- *  $Id: bif_xml.c,v 1.31.2.13 2010/12/13 10:23:35 source Exp $
+ *  $Id: bif_xml.c,v 1.31.2.16 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -630,8 +630,6 @@ xp_free (xparse_ctx_t * xp)
 {
   dk_hash_iterator_t hit;
   caddr_t it, k;
-  xp_rdfxml_locals_t *xrl;
-  xp_rdfa_locals_t *xrdfal;
   xp_node_t * xn;
   dk_free_box (xp->xp_id);
   dk_free_box (xp->xp_error_msg);
@@ -709,33 +707,8 @@ xp_free (xparse_ctx_t * xp)
   if ((NULL != xp->xp_doc_cache) && (&(xp->xp_doc_cache) == xp->xp_doc_cache->xdc_owner))
     xml_doc_cache_free (xp->xp_doc_cache);
   dk_free_box (xp->xp_top_excl_res_prefx);
-  while (NULL != xp->xp_rdfxml_locals)
-    xp_pop_rdf_locals (xp);
-  while (NULL != xp->xp_rdfa_locals)
-    {
-#ifndef NDEBUG
-      dk_free_tree (xp->xp_rdfa_locals->xrdfal_ict_buffer);
-      xp->xp_rdfa_locals->xrdfal_ict_buffer = NULL;
-#endif
-      xp_pop_rdfa_locals (xp);
-    }
-  xrl = xp->xp_rdfxml_free_list;
-  while (NULL != xrl)
-    {
-      xp_rdfxml_locals_t *next_xrl = xrl->xrl_parent;
-      dk_free (xrl, sizeof (xp_rdfxml_locals_t));
-      xrl = next_xrl;
-    }
-  xrdfal = xp->xp_rdfa_free_list;
-  while (NULL != xrdfal)
-    {
-      xp_rdfa_locals_t *next_xrdfal = xrdfal->xrdfal_parent;
-      dk_free_tree (xrdfal->xrdfal_ict_buffer);
-      dk_free (xrdfal, sizeof (xp_rdfa_locals_t));
-      xrdfal = next_xrdfal;
-    }
-  dk_free_tree (xp->xp_tmp);
-  /* Note that xp_xf is intentionally left untouched. */
+  if (NULL != xp->xp_tf)
+    xp_free_rdf_parser_fields (xp);
 }
 
 
@@ -5185,6 +5158,9 @@ bif_to_xml_array_arg (caddr_t * qst, state_slot_t ** args, int nth, const char *
 	elem_is_writeable = 0;
         to_be_deleted = NULL;
 #endif
+	if (BOX_ELEMENTS (elem) < 1)
+	  sqlr_new_error ("37000", "XI027", "Argument of %s must be valid xml entity.", func);
+
 	  if ((((caddr_t *) elem)[0]) == XMLATTRIBUTE_FLAG)
 	    { /* XMLATTRIBUTES */
 	      int inx, attr_length = BOX_ELEMENTS (elem);
@@ -5204,6 +5180,8 @@ bif_to_xml_array_arg (caddr_t * qst, state_slot_t ** args, int nth, const char *
 		}
               goto array_arg_done;
 	    }
+	if (DV_ARRAY_OF_POINTER != DV_TYPE_OF (((caddr_t *)elem)[0]) || BOX_ELEMENTS (((caddr_t *)elem)[0]) < 1)
+	  sqlr_new_error ("37000", "XI027", "Argument of %s must be valid xml entity.", func);
         if (DV_UNAME != DV_TYPE_OF (XTE_HEAD_NAME (XTE_HEAD (elem))))
           {
             if (!elem_is_writeable)
diff --git a/libsrc/Wi/bif_xper.c b/libsrc/Wi/bif_xper.c
index 3d71037..bcbcaf4 100644
--- a/libsrc/Wi/bif_xper.c
+++ b/libsrc/Wi/bif_xper.c
@@ -1,12 +1,12 @@
 /*
  *  bif_xper.c
  *
- *  $Id: bif_xper.c,v 1.10.2.6 2011/02/23 17:31:50 source Exp $
+ *  $Id: bif_xper.c,v 1.10.2.8 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -116,6 +116,7 @@ typedef struct xper_ctx_s
     caddr_t vt_batch;		/*!< batch of word indexing information, or NULL */
     int xpc_index_attrs;	/*!< Flags if attributes should be indexed */
     id_hash_t *xpc_id_dict;
+    caddr_t xpc_src_filename;
     FILE *xpc_src_file;
     vxml_parser_t *xpc_parser;
     dk_set_t xpc_cut_chain;	/* Chain of boxes, which will be written into the copy */
@@ -1394,6 +1395,11 @@ xper_destroy_ctx (xper_ctx_t * ctx)
       VXmlParserDestroy (ctx->xpc_parser);
       ctx->xpc_parser = NULL;
     }
+  if (NULL != ctx->xpc_src_filename)
+    {
+      dk_free_box (ctx->xpc_src_filename);
+      ctx->xpc_src_filename = NULL;
+    }
 }
 
 static caddr_t
@@ -2509,38 +2515,21 @@ xper_entity_t *
   if ((dtp_of_source_arg == DV_SHORT_STRING_SERIAL) ||
       (dtp_of_source_arg == DV_STRING) ||
       (dtp_of_source_arg == DV_C_STRING))
-    {
-      if (!strncasecmp (source_arg, "file://", 7 /* strlen(("file://") */ ))
+    {                             /* 01234567 */
+      if (!strncasecmp (source_arg, "file://", 7))
         {
-#ifdef WIN32
-	    char fname[_MAX_PATH], *fname_ptr;
-	    /*fname = dk_alloc(strlen(source+7/ * strlen("file://"* /)+1); */
-	    strncpy (fname, source_arg + 7 /* strlen("file://" */ , _MAX_PATH);
-	    fname[_MAX_PATH - 1] = '\0';
-	    for (fname_ptr = fname; fname_ptr[0]; fname_ptr++)
-	      {
-		switch (fname_ptr[0])
-		  {
-		  case '|':
-		    fname_ptr[0] = ':';
-		    break;
-		  case '/':
-		    fname_ptr[0] = '\\';
-		    break;
-		  }
-	      }
-#else
-	    char *fname = ((char *) source_arg) + 7 /* strlen("file://") */ ;
-#endif
-	    sec_check_dba (qi, "<read XML from URL of type file://...>");
-	    xper_dbg_print_1 ("File '%s'\n", fname);
-	    context.xpc_src_file = fopen (fname, "rb");
-	    if (NULL == context.xpc_src_file)
-	      {
-		xper_destroy_ctx (&context);
-		dk_free_box (uri);
-		sqlr_new_error ("42000", "XP100", "Error opening file '%s'", fname);
-	      }
+          sec_check_dba (qi, "<read XML from URL of type file://...>");
+                 context.xpc_src_filename = file_native_name_from_iri_path_nchars (source_arg + 7, strlen (source_arg + 7));
+          file_path_assert (context.xpc_src_filename, NULL, 1);
+          xper_dbg_print_1 ("File '%s'\n", context.xpc_src_filename);
+          context.xpc_src_file = fopen (context.xpc_src_filename, "rb");
+          if (NULL == context.xpc_src_file)
+            {
+              caddr_t err = srv_make_new_error ("42000", "XP100", "Error opening file '%s'", context.xpc_src_filename);
+              xper_destroy_ctx (&context);
+              dk_free_box (uri);
+              sqlr_resignal (err);
+            }
         source_type = 'F';
 	iter = file_read;
 	iter_data = context.xpc_src_file;
diff --git a/libsrc/Wi/bif_xper.h b/libsrc/Wi/bif_xper.h
index 904b8f4..55d3490 100644
--- a/libsrc/Wi/bif_xper.h
+++ b/libsrc/Wi/bif_xper.h
@@ -1,12 +1,12 @@
 /*
  *  bif_xper.h
  *
- *  $Id: bif_xper.h,v 1.2.2.1 2009/04/18 21:55:10 source Exp $
+ *  $Id: bif_xper.h,v 1.2.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/bitmap.c b/libsrc/Wi/bitmap.c
index 1ca9de6..e477d0f 100644
--- a/libsrc/Wi/bitmap.c
+++ b/libsrc/Wi/bitmap.c
@@ -1,14 +1,14 @@
 /*
  *  bitmap.c
  *
- *  $Id: bitmap.c,v 1.17.2.15 2011/02/17 15:23:40 source Exp $
+ *  $Id: bitmap.c,v 1.17.2.18 2012/03/13 11:50:34 source Exp $
  *
  *  Bitmap Index
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -687,7 +687,8 @@ itc_bm_insert_in_row (it_cursor_t * itc, buffer_desc_t * buf, row_delta_t * rd)
   if (!buf->bd_is_write || buf->bd_readers)
     GPF_T1 ("should have excl buffer in bm ins in row");
   itc_bm_ends (itc, buf, &bm_start, &last, &is_single);
-  if (is_single)
+  row = buf->bd_buffer + buf->bd_content_map->pm_entries[itc->itc_map_pos];
+  if (is_single && !IE_ISSET (row, IEF_DELETE))
     {
       GPF_T1 ("singleton bm not in use");
 #if 0
@@ -728,12 +729,12 @@ itc_bm_insert_in_row (it_cursor_t * itc, buffer_desc_t * buf, row_delta_t * rd)
     }
   /* now the row is a collection of ce's. Insert in there.  If the new value would make a new ce in front, make a singleton row so as not to have to reset the offsets of the c's and maybe splitting just because the start bit no changes.  */
   if (!BITS_IN_RANGE (bm_start, value)
-      || value < bm_start)
+      || value < bm_start
+      || IE_ISSET (row, IEF_DELETE))
     {
       itc_bm_insert_single (itc, buf, rd, DVC_INDEX_END);
       return;
     }
-  row = buf->bd_buffer + buf->bd_content_map->pm_entries[itc->itc_map_pos];
   KEY_PRESENT_VAR_COL (itc->itc_insert_key, itc->itc_row_data, (*key->key_bm_cl), off, len);
   row_reserved = row_length (row, itc->itc_insert_key);
   row_align_len = ROW_ALIGN (off + len);
@@ -1135,7 +1136,11 @@ itc_bm_delete (it_cursor_t * itc, buffer_desc_t ** buf_ret)
   BIT_COL (bm_start, (*buf_ret), itc->itc_row_data, itc->itc_insert_key);
   rc = bm_delete (bm_start, itc->itc_row_data + off, &bm_len, itc->itc_bp.bp_value);
   if (DVC_MATCH != rc)
-    return BM_DEL_DONE; /* the bit was not found, no change */
+    {
+      if (0 == bm_len)
+	GPF_T1("leaving bm with singeleton entry");
+      return BM_DEL_DONE; /* the bit was not found, no change */
+    }
   upd_truncate_row (itc, *buf_ret, off + bm_len);
   CL_SET_LEN (key, key->key_bm_cl, itc->itc_row_data, bm_len);
   itc->itc_bp.bp_is_pos_valid = 1;
@@ -1603,6 +1608,12 @@ pl_next_bit (placeholder_t * itc, db_buf_t bm, short bm_len, bitno_t bm_start, i
   if (!itc->itc_bp.bp_is_pos_valid)
     {
       log_error ("Invalid bit position on index: %s", itc->itc_tree->it_key->key_name);
+      if (itc->itc_type == ITC_CURSOR)
+	{
+	  it_cursor_t * it = (it_cursor_t *) itc;
+	  if (!wi_inst.wi_checkpoint_atomic && it->itc_ltrx)
+	    itc_bust_this_trx (it, NULL, ITC_BUST_THROW);
+	}
       GPF_T1 ("next/prev of non-valid bit pos");
     }
   switch (itc->itc_bp.bp_ce_type)
diff --git a/libsrc/Wi/bitmap.h b/libsrc/Wi/bitmap.h
index d842425..09030a7 100644
--- a/libsrc/Wi/bitmap.h
+++ b/libsrc/Wi/bitmap.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: bitmap.h,v 1.9.2.3 2010/03/08 12:04:11 source Exp $
+ *  $Id: bitmap.h,v 1.9.2.4 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/blob.c b/libsrc/Wi/blob.c
index 60c52ba..3b4a3ff 100644
--- a/libsrc/Wi/blob.c
+++ b/libsrc/Wi/blob.c
@@ -1,14 +1,14 @@
 /*
  *  blob.c
  *
- *  $Id: blob.c,v 1.16.2.8 2010/05/12 12:24:29 source Exp $
+ *  $Id: blob.c,v 1.16.2.10 2012/03/08 12:55:33 source Exp $
  *
  *  BLOBS
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2624,15 +2624,15 @@ bh_string_output_n (lock_trx_t * lt, blob_handle_t * bh, int omit, int free_buff
   return (string_output);
 }
 
-#define bh_string_list(lt, bh, get_bytes, omit) \
+#define bh_string_list(lt, bh, get_bytes, omit, blob_type) \
 ((box_tag (bh) == DV_BLOB_WIDE_HANDLE) ? \
-    bh_string_list_w (lt, bh, get_bytes, omit) : \
-    bh_string_list_n (lt, bh, get_bytes, omit))
+    bh_string_list_w (lt, bh, get_bytes, omit, blob_type) : \
+    bh_string_list_n (lt, bh, get_bytes, omit, blob_type))
 
 
 dk_set_t
 bh_string_list_n (/* this was before 3.0: index_space_t * isp, */ lock_trx_t * lt, blob_handle_t * bh,
-    long get_bytes, int omit)
+    long get_bytes, int omit, long blob_type)
 {
   /* take current page at current place and make string of
      n bytes from the place and return as string list */
@@ -2682,10 +2682,14 @@ bh_string_list_n (/* this was before 3.0: index_space_t * isp, */ lock_trx_t * l
 		  SET_DK_MEM_RESERVE_STATE (lt);
 		  itc_bust_this_trx (tmp_itc, &buf, ITC_BUST_THROW);
 		}
-	      page_string = dk_alloc_box (bytes_on_page + 1, DV_LONG_STRING);
+	      if (blob_type) /* BLOB_BIN */
+		page_string = dk_alloc_box (bytes_on_page, DV_BIN);
+	      else
+		page_string = dk_alloc_box (bytes_on_page + 1, DV_LONG_STRING);
 	      memcpy (page_string, buf->bd_buffer + DP_DATA + from_byte,
 		  bytes_on_page);
-	      page_string[bytes_on_page] = 0;
+	      if (!blob_type) /* BLOB_BIN */
+		page_string[bytes_on_page] = 0;
 	      dk_set_push (&string_list, page_string);
 	    }
 	  bytes_filled += bytes_on_page;
@@ -3091,12 +3095,11 @@ bh_write_out (lock_trx_t * lt, blob_handle_t * bh, dk_session_t * ses)
 
 void
 blob_send_bytes (lock_trx_t * lt, caddr_t bhp, long get_bytes,
-    int send_position)
+    int send_position, long blob_type)
 {
   blob_handle_t *bh = (blob_handle_t *) bhp;
   caddr_t arr;
-  dk_set_t string_list =
-  bh_string_list (/*NULL,*/ lt, (blob_handle_t *) bhp, get_bytes, 0);
+  dk_set_t string_list = bh_string_list (/*NULL,*/ lt, (blob_handle_t *) bhp, get_bytes, 0, blob_type);
 
   if (BH_DIRTYREAD == string_list)
     {
@@ -3177,7 +3180,7 @@ blob_subseq (lock_trx_t * lt, caddr_t bhp, size_t from, size_t to)
 	      if (from)
 		{
 		  bh->bh_position = 0;
-		  bh_string_list (/*NULL,*/ lt, bh, (long) from, 1);
+		  bh_string_list (/*NULL,*/ lt, bh, (long) from, 1, 0);
 		}
 	    }
 	}
@@ -3189,7 +3192,7 @@ blob_subseq (lock_trx_t * lt, caddr_t bhp, size_t from, size_t to)
 	{
 
 	  bh->bh_position = 0;
-	  bh_string_list (/*NULL,*/ lt, bh, (long) from, 1);
+	  bh_string_list (/*NULL,*/ lt, bh, (long) from, 1, 0);
 	}
       else
 	{
@@ -3197,7 +3200,7 @@ blob_subseq (lock_trx_t * lt, caddr_t bhp, size_t from, size_t to)
 	    bh_read_ahead (lt, bh, (unsigned) from, (unsigned) to);
 	}
     }
-  string_list = bh_string_list (/*NULL,*/ lt, bh, (long)(to - from), 0);
+  string_list = bh_string_list (/*NULL,*/ lt, bh, (long)(to - from), 0, 0);
  strings_ready:
   bh->bh_current_page = bh->bh_page;
   bh->bh_position = 0;
@@ -3294,7 +3297,7 @@ blob_to_string_isp (lock_trx_t * lt, caddr_t bhp)
     }
 
   string_list = bh_string_list (lt, bh,
-      10000000, 0);		/* up to 10MB as varchar */
+      10000000, 0, 0);		/* up to 10MB as varchar */
   bh->bh_current_page = bh->bh_page;
   bh->bh_position = 0;
 
diff --git a/libsrc/Wi/blobio.c b/libsrc/Wi/blobio.c
index c861f25..6109aca 100644
--- a/libsrc/Wi/blobio.c
+++ b/libsrc/Wi/blobio.c
@@ -1,7 +1,7 @@
 /*
  *  blobio.c
  *
- *  $Id: blobio.c,v 1.8.2.5 2010/06/25 16:39:58 source Exp $
+ *  $Id: blobio.c,v 1.8.2.7 2012/03/08 12:55:33 source Exp $
  *
  *  Marshallers for DV_BLOB_HANDLE and DV_TIMESTAMP_OBJ
  *  Should really be part of Dk
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -638,15 +638,6 @@ xx_encrypt_passwd (char *thing, int thing_len, char *user_name)
 }
 
 
-caddr_t
-box_iri_id (int64 n)
-{
-  iri_id_t * box = (iri_id_t*) dk_alloc_box (sizeof (iri_id_t), DV_IRI_ID);
-  *box = n;
-  return (caddr_t) box;
-}
-
-
 void
 iri_id_write (iri_id_t * iid, dk_session_t * ses)
 {
diff --git a/libsrc/Wi/blobio.h b/libsrc/Wi/blobio.h
index c5dcc91..1676f45 100644
--- a/libsrc/Wi/blobio.h
+++ b/libsrc/Wi/blobio.h
@@ -1,12 +1,12 @@
 /*
  *  blobio.h
  *
- *  $Id: blobio.h,v 1.13.2.3 2010/02/01 02:45:58 source Exp $
+ *  $Id: blobio.h,v 1.13.2.5 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -122,7 +122,6 @@ typedef struct blob_layout_s blob_layout_t;
 
 void bh_free (blob_handle_t * bh);
 
-caddr_t  box_iri_id (int64 n);
 void iri_id_write (iri_id_t *iid, dk_session_t * ses);
 
 void blobio_init (void);
diff --git a/libsrc/Wi/blog.xsl b/libsrc/Wi/blog.xsl
index eb55679..d03a462 100644
--- a/libsrc/Wi/blog.xsl
+++ b/libsrc/Wi/blog.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: blog.xsl,v 1.4 2009/04/09 13:22:12 source Exp $
+ -  $Id: blog.xsl,v 1.4.2.1 2012/03/08 12:55:33 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/cl_stubs.c b/libsrc/Wi/cl_stubs.c
index 6e99aae..5cbd961 100644
--- a/libsrc/Wi/cl_stubs.c
+++ b/libsrc/Wi/cl_stubs.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: cl_stubs.c,v 1.1.2.5 2010/02/01 09:26:55 source Exp $
+ *  $Id: cl_stubs.c,v 1.1.2.6 2012/03/08 12:55:33 source Exp $
  *
  *  Cluster stubs
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/clrdf23.sql b/libsrc/Wi/clrdf23.sql
index 942ed5c..ed97bc4 100644
--- a/libsrc/Wi/clrdf23.sql
+++ b/libsrc/Wi/clrdf23.sql
@@ -1,12 +1,12 @@
 --
---  $Id: clrdf23.sql,v 1.1.2.1 2010/02/01 15:15:19 source Exp $
+--  $Id: clrdf23.sql,v 1.1.2.2 2012/03/08 12:55:33 source Exp $
 --
 --  Migrate to 2+3 layout
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2010 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/cluster.h b/libsrc/Wi/cluster.h
index d3f2612..c075799 100644
--- a/libsrc/Wi/cluster.h
+++ b/libsrc/Wi/cluster.h
@@ -1,12 +1,12 @@
 /*
- *  $Id: cluster.h,v 1.1.2.7 2010/02/01 02:32:18 source Exp $
+ *  $Id: cluster.h,v 1.1.2.10 2012/03/08 12:55:33 source Exp $
  *
  *  Cluster data structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -45,6 +45,7 @@ extern int64 cl_cum_wait;
 extern int64 cl_cum_wait_msec;
 caddr_t cl_ddl (query_instance_t * qi, lock_trx_t * lt, caddr_t name, int type, caddr_t trig_table);
 void cl_rdf_inf_init (client_connection_t * cli, caddr_t * err_ret);
+
 /* action codes for ddl messages */
 #define CLO_DDL_TABLE 1
 #define CLO_DDL_PROC 2
diff --git a/libsrc/Wi/cov_report.xsl b/libsrc/Wi/cov_report.xsl
index 0bf3e6d..1fbeeea 100644
--- a/libsrc/Wi/cov_report.xsl
+++ b/libsrc/Wi/cov_report.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: cov_report.xsl,v 1.3.2.1 2009/04/16 09:48:07 source Exp $
+ -  $Id: cov_report.xsl,v 1.3.2.2 2012/03/08 12:55:33 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/cov_time.xsl b/libsrc/Wi/cov_time.xsl
index 4559562..52adffb 100644
--- a/libsrc/Wi/cov_time.xsl
+++ b/libsrc/Wi/cov_time.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: cov_time.xsl,v 1.5 2009/04/09 13:22:12 source Exp $
+ -  $Id: cov_time.xsl,v 1.5.2.1 2012/03/08 12:55:33 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/crsr.h b/libsrc/Wi/crsr.h
index 822aace..68cc09e 100644
--- a/libsrc/Wi/crsr.h
+++ b/libsrc/Wi/crsr.h
@@ -1,12 +1,12 @@
 /*
  *  csrs.h
  *
- *  $Id: crsr.h,v 1.2.2.1 2009/04/18 21:55:11 source Exp $
+ *  $Id: crsr.h,v 1.2.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/crypt.c b/libsrc/Wi/crypt.c
index ffba5f8..02fdee5 100644
--- a/libsrc/Wi/crypt.c
+++ b/libsrc/Wi/crypt.c
@@ -1,14 +1,14 @@
 /*
  *  crypt.c
  *
- *  $Id: crypt.c,v 1.2.2.1 2009/04/18 21:55:11 source Exp $
+ *  $Id: crypt.c,v 1.2.2.2 2012/03/08 12:55:33 source Exp $
  *
  *  one-way crypting
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/date.h b/libsrc/Wi/date.h
index a503ac0..5e59ba5 100644
--- a/libsrc/Wi/date.h
+++ b/libsrc/Wi/date.h
@@ -1,14 +1,14 @@
 /*
  *  date.h
  *
- *  $Id: date.h,v 1.4.2.1 2009/04/18 21:55:11 source Exp $
+ *  $Id: date.h,v 1.4.2.3 2012/03/08 12:55:33 source Exp $
  *
  *  Date support
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -66,9 +66,9 @@ extern void dt_audit_fields (char *dt);
  */
 
 #define DT_DAY(dt) \
-  ((CUC (dt, 0) << 16) | \
+  ((int32)((CUC (dt, 0) << 16) | \
     (CUC (dt, 1) << 8) | \
-    CUC (dt, 2))
+    CUC (dt, 2) | ((CUC (dt, 0) & 0x80) ? 0xff000000 : 0)))
 
 #define DT_HOUR(dt) \
   CUC(dt, 3)
@@ -105,49 +105,49 @@ extern void dt_audit_fields (char *dt);
 #endif
 
 #define DT_SET_DAY(dt, y)  \
-  ((UC (dt, 0) = _UC ((y >> 16) & 0xFF), \
-    UC (dt, 1) = _UC ((y >> 8) & 0xFF), \
-    UC (dt, 2) = _UC (y & 0xFF)))
+  ((UC (dt, 0) = _UC (((y) >> 16) & 0xFF), \
+    UC (dt, 1) = _UC (((y) >> 8) & 0xFF), \
+    UC (dt, 2) = _UC ((y) & 0xFF)))
 
 #define DT_SET_HOUR(dt, h) \
   UC(dt, 3) = _UC (h)
 
 #define DT_SET_MINUTE(dt, m) \
   (UC (dt, 4) &= 0x3, \
-   UC (dt, 4) |= m << 2)
+   UC (dt, 4) |= (m) << 2)
 
 #define DT_SET_SECOND(dt, m) \
   (UC (dt, 4) &= 0xFC, \
-   UC (dt, 4) |= (m >> 4) & 0x3, \
+   UC (dt, 4) |= ((m) >> 4) & 0x3, \
    UC (dt, 5) &= 0x0F, \
-   UC (dt, 5) |= (m & 0x0F) << 4)
+   UC (dt, 5) |= ((m) & 0x0F) << 4)
 
 #define DT_SET_FRACTION(dt, f) \
   (UC (dt, 5) &= 0xF0, \
-   UC (dt, 5) |= ((f/1000) >> 16) & 0x0F, \
-   UC (dt, 6) = _UC ((f/1000) >> 8), \
-   UC (dt, 7) = _UC ((f/1000) & 0xFF))
+   UC (dt, 5) |= (((f)/1000) >> 16) & 0x0F, \
+   UC (dt, 6) = _UC (((f)/1000) >> 8), \
+   UC (dt, 7) = _UC (((f)/1000) & 0xFF))
 
 #ifdef NO_DT_TYPE_IN_TZ
 #define DT_SET_TZ(dt, tz) \
-  (SIGNC (dt, 8) = _SIGNC (tz >> 8), \
-   SIGNC (dt, 9) = _SIGNC (tz & 0xFF))
+  (SIGNC (dt, 8) = _SIGNC ((tz) >> 8), \
+   SIGNC (dt, 9) = _SIGNC ((tz) & 0xFF))
 
 #define DT_SET_COMPAT_TZ(dt, tz) DT_SET_TZ(dt, tz)
 
 #define DT_SET_DT_TYPE(dt, type) SIGNC (dt, 8) = SIGNC (dt, 8)
 #else
 #define DT_SET_TZ(dt, tz) \
-    (UC (dt, 8) = (_UC (_UC (UC (dt, 8) >> 3) << 3) | (_UC (tz >> 8) & 0x07)), \
-     UC (dt, 9) = _UC (tz & 0xFF))
+    (UC (dt, 8) = (_UC (_UC (UC (dt, 8) >> 3) << 3) | (_UC ((tz) >> 8) & 0x07)), \
+     UC (dt, 9) = _UC ((tz) & 0xFF))
 
 #define DT_SET_DT_TYPE(dt, type) do { \
-  UC (dt, 8) = _UC (_UC (UC (dt, 8) & 0x07) | _UC (type << 5)); \
+  UC (dt, 8) = _UC (_UC (UC (dt, 8) & 0x07) | _UC ((type) << 5)); \
   DT_AUDIT_FIELDS(dt); } while (0)
 
 #define DT_SET_COMPAT_TZ(dt, tz) \
-  (SIGNC (dt, 8) = _SIGNC (tz >> 8), \
-   SIGNC (dt, 9) = _SIGNC (tz & 0xFF))
+  (SIGNC (dt, 8) = _SIGNC ((tz) >> 8), \
+   SIGNC (dt, 9) = _SIGNC ((tz) & 0xFF))
 #endif
 
 
diff --git a/libsrc/Wi/datesupp.c b/libsrc/Wi/datesupp.c
index 8ffc737..3e4e9da 100644
--- a/libsrc/Wi/datesupp.c
+++ b/libsrc/Wi/datesupp.c
@@ -1,14 +1,14 @@
 /*
  *  datesupp.c
  *
- *  $Id: datesupp.c,v 1.16.2.5 2011/03/03 11:56:44 source Exp $
+ *  $Id: datesupp.c,v 1.16.2.7 2012/03/08 12:55:33 source Exp $
  *
  *  Date support functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -29,6 +29,10 @@
 #include "util/strfuns.h"
 #include "datesupp.h"
 
+#ifdef NDEBUG
+#undef DATE2NUM_DEBUG
+#endif
+
 /*
  *  Important preprocessor symbols for the internal ranges
  */
@@ -165,10 +169,11 @@ yearday2date (int yday, const int is_leap_year, int *month, int *day)
  *  Computes the absolute number of days of the given date since 0001/01/01,
  *  respecting the missing period of the Gregorian Reformation
  */
-uint32
-date2num (const int year, const int month, const int day)
+#ifdef DATE2NUM_DEBUG
+int32
+date2num_old (const int year, const int month, const int day)
 {
-  uint32 julian_days;
+  int32 julian_days;
 
   julian_days = (uint32) ((year - 1) * (uint32) (DAY_LAST) + ((year - 1) >> 2));
 
@@ -191,9 +196,36 @@ date2num (const int year, const int month, const int day)
   julian_days += day;
   if (days_in_february (year) == 29 && month > 2)
     julian_days++;
-
   return julian_days;
 }
+#endif
+
+int32
+date2num (const int year, const int month, const int day)
+{
+  int a, y, m;
+  long jdn, midnight_jdn;
+  a = (14-month)/12;
+  y = ((year < 0) ? year + 1 : year) + 4800 - a;
+  m = month + 12 * a - 3;
+  if (year < GREG_YEAR || ((year == GREG_YEAR) && (month < GREG_MONTH || ((month == GREG_MONTH) && (day < GREG_LAST_DAY)))))
+    {
+      jdn = day + (153*m + 2)/5 + 365*y + y/4 - 32083;
+      if ((1722885 == jdn) && (1 == day))
+        jdn--;
+    }
+  else
+    jdn = day + (153*m + 2)/5 + 365*y + y/4 - y/100 +y/400 - 32045;
+  midnight_jdn = jdn - 1721423; /* A julian day of fake "0001-01-00" */
+#ifdef DATE2NUM_DEBUG
+  do {
+    uint32 old_mjn = date2num_old (year, month, day);
+    if ((5 < year) && (midnight_jdn != old_mjn))
+      GPF_T1 ("date2num(): internal error in calculation of julian day");
+  } while (0);
+#endif
+  return midnight_jdn;
+}
 
 
 /*
@@ -201,8 +233,9 @@ date2num (const int year, const int month, const int day)
  *  a standard date (since 0001/01/01),
  *  respecting the missing period of the Gregorian Reformation
  */
+#ifdef DATE2NUM_DEBUG
 void
-num2date (uint32 julian_days, int *year, int *month, int *day)
+num2date_old (int32 julian_days, int *year, int *month, int *day)
 {
   double x;
   int i;
@@ -249,6 +282,64 @@ num2date (uint32 julian_days, int *year, int *month, int *day)
     i++;
   yearday2date (i, (days_in_february (*year) == 29), month, day);
 }
+#endif
+
+void
+num2date (int32 julian_days, int *year, int *month, int *day)
+{
+  double x;
+  int i;
+  int y_civ, m_civ, d_civ;
+  long midhignt_jdn;
+  int mj, g, dg, c, dc, b, db, a, da, y, m, d;
+  int /*c, d, m,*/ e;
+  midhignt_jdn = julian_days + 1721423;
+  if (2299161 <= midhignt_jdn)
+    {
+      mj = midhignt_jdn + 32044;
+      g = mj / 146097;
+      dg = mj % 146097;
+      c = (dg / 36524 + 1) * 3 / 4;
+      dc = dg - c * 36524;
+      b = dc / 1461;
+      db = dc % 1461;
+      a = (db / 365 + 1) * 3 / 4;
+      da = db - a * 365;
+      y = g * 400 + c * 100 + b * 4 + a;
+      m = (da * 5 + 308) / 153 - 2;
+      d = da - (m + 4) * 153 / 5 + 122;
+      y_civ = y - 4800 + (m+2)/12;
+      m_civ = (m+2)%12 + 1;
+      d_civ = d+1;
+    }
+  else if (1722884 == midhignt_jdn)
+    {
+      d_civ = m_civ = 1; y_civ = 5;
+    }
+  else
+    {
+      c = midhignt_jdn + 32082;
+      d = (4*c+3)/1461;
+      e = c - (1461*d)/4;
+      m = (5*e+2)/153;
+      d_civ = e - (153*m+2)/5+1;
+      m_civ = m + 3 - 12 * (m/10);
+      y_civ = d - 4800 + m/10;
+      if (y_civ < 0)
+        y_civ--;
+    }
+#ifdef DATE2NUM_DEBUG
+  do {
+      int old_year, old_month, old_day;
+      num2date_old (julian_days, &old_year, &old_month, &old_day);
+      if ((2000 < julian_days) && ((old_year != y_civ) || (old_month != m_civ) || (old_day != d_civ)))
+        GPF_T1 ("num2date(): internal error in splitting of julian day");
+  } while (0);
+#endif
+  *year = y_civ;
+  *month = m_civ;
+  *day = d_civ;
+}
 
 
 /*
diff --git a/libsrc/Wi/datesupp.h b/libsrc/Wi/datesupp.h
index 41c7806..8e53691 100644
--- a/libsrc/Wi/datesupp.h
+++ b/libsrc/Wi/datesupp.h
@@ -1,14 +1,14 @@
 /*
  *  datesupp.c
  *
- *  $Id: datesupp.h,v 1.7.2.2 2011/03/03 11:56:44 source Exp $
+ *  $Id: datesupp.h,v 1.7.2.4 2012/03/08 12:55:33 source Exp $
  *
  *  Date support functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -33,8 +33,8 @@
 #define GMTIMESTAMP_STRUCT TIMESTAMP_STRUCT
 
 /* datesupp.c */
-uint32 date2num (const int year, const int month, const int day);
-void num2date (uint32 julian_days, int *year, int *month, int *day);
+int32 date2num (const int year, const int month, const int day);
+void num2date (int32 julian_days, int *year, int *month, int *day);
 int ymd_valid_p (const int year, const int month, const int day);
 int date2weekday (const int year, const int month, const int day);
 void dt_now (caddr_t dt);
diff --git a/libsrc/Wi/ddlrun.c b/libsrc/Wi/ddlrun.c
index 5d06782..58aaaf5 100644
--- a/libsrc/Wi/ddlrun.c
+++ b/libsrc/Wi/ddlrun.c
@@ -1,14 +1,14 @@
 /*
  *  ddlrun.c
  *
- *  $Id: ddlrun.c,v 1.34.2.14 2010/09/17 16:35:46 source Exp $
+ *  $Id: ddlrun.c,v 1.34.2.16 2012/03/08 12:55:33 source Exp $
  *
  *  SQL DDL Functionality
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -4588,10 +4588,9 @@ ddl_read_constraints (char *spec_tb_name, caddr_t *qst)
 
 
 void
-read_proc_tables (int remotes)
+read_proc_and_trigger_tables (int remotes)
 {
   user_t *org_user = bootstrap_cli->cli_user;
-
   caddr_t org_qual = bootstrap_cli->cli_qualifier;
   query_t *proc_qr;
   /* Procedure's calls published for replication */
@@ -4817,8 +4816,22 @@ scan_SYS_PROCEDURES:
   lc_free (lc);
   qr_free (rdproc);
 
+end:;
   bootstrap_cli->cli_user = org_user;
   CLI_RESTORE_QUAL (bootstrap_cli, org_qual);
+  local_commit (bootstrap_cli);
+}
+
+void
+read_utd_method_tables (void)
+{
+  user_t *org_user = bootstrap_cli->cli_user;
+  caddr_t org_qual = bootstrap_cli->cli_qualifier;
+  query_t *proc_qr;
+  /* Procedure's calls published for replication */
+  caddr_t err;
+  query_t *rdproc;
+  local_cursor_t *lc;
   rdproc = sql_compile_static (
       "select blob_to_string (M_TEXT), M_QUAL, M_OWNER from DB.DBA.SYS_METHODS",
       bootstrap_cli, NULL, SQLC_DEFAULT);
diff --git a/libsrc/Wi/disk.c b/libsrc/Wi/disk.c
index e419738..0135132 100644
--- a/libsrc/Wi/disk.c
+++ b/libsrc/Wi/disk.c
@@ -1,14 +1,14 @@
 /*
  *  disk.c
  *
- *  $Id: disk.c,v 1.36.2.27 2011/03/11 12:17:30 source Exp $
+ *  $Id: disk.c,v 1.36.2.30 2012/03/08 12:55:33 source Exp $
  *
  *  Managing buffer rings and paging to disk.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -50,6 +50,16 @@
 #include "srvstat.h"
 #include "recovery.h"
 #include "zlib.h"
+#ifdef _SSL
+#include <openssl/md5.h>
+#define MD5Init   MD5_Init
+#define MD5Update MD5_Update
+#define MD5Final  MD5_Final
+#else
+#include "util/md5.h"
+#endif /* _SSL */
+
+
 
 #ifdef BYTE_ORDER_REV_SUPPORT
 
@@ -2792,6 +2802,28 @@ dbs_byte_order_cmp (char byte_order)
   return 0;
 }
 
+extern caddr_t *local_interfaces;
+extern char *srv_cwd;
+
+static void
+dbs_init_id (char * str)
+{
+  int inx;
+  char buf[100];
+  MD5_CTX ctx;
+  memset (&ctx, 0, sizeof (MD5_CTX));
+  MD5Init (&ctx);
+  DO_BOX (caddr_t, val, inx, local_interfaces)
+    {
+      MD5Update (&ctx, (unsigned char *) val, box_length (val) - 1);
+    }
+  END_DO_BOX;
+  MD5Update (&ctx, (unsigned char *) srv_cwd, strlen (srv_cwd));
+  snprintf (buf, sizeof (buf), "%ld,%p", srv_pid, &str);
+  MD5Update (&ctx, (unsigned char *) buf, strlen (buf));
+  MD5Final (str, &ctx);
+}
+
 void
 dbs_write_cfg_page (dbe_storage_t * dbs, int is_first)
 {
@@ -2831,6 +2863,9 @@ dbs_write_cfg_page (dbe_storage_t * dbs, int is_first)
     }
   db.db_checkpoint_map = dbs->dbs_cp_remap_pages ? (dp_addr_t) (uptrlong) dbs->dbs_cp_remap_pages->data : 0;
   db.db_byte_order = DB_SYS_BYTE_ORDER;
+  if (0 == dbs->dbs_id[0])
+    dbs_init_id (dbs->dbs_id);
+  memcpy (db.db_id, dbs->dbs_id, sizeof (db.db_id));
 
   LSEEK (fd, 0, SEEK_SET);
   memcpy (zero, &db, sizeof (db));
@@ -3460,6 +3495,7 @@ dbs_from_file (char * name, char * file, char type, volatile int * exists)
 	  bp_ctx.db_bp_index = cfg_page.db_bp_index;
 	  bp_ctx.db_bp_wr_bytes = cfg_page.db_bp_wr_bytes;
 	}
+      memcpy (dbs->dbs_id, cfg_page.db_id, sizeof (cfg_page.db_id));
       if (DBS_PRIMARY == type)
 	dbs_init_registry (dbs);
       dbs_extent_open (dbs);
diff --git a/libsrc/Wi/dks_esc.c b/libsrc/Wi/dks_esc.c
index dc7f3b5..5fbf293 100644
--- a/libsrc/Wi/dks_esc.c
+++ b/libsrc/Wi/dks_esc.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: dks_esc.c,v 1.13.2.4 2010/07/08 13:21:23 source Exp $
+ *  $Id: dks_esc.c,v 1.13.2.6 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -43,7 +43,7 @@ unsigned char dks_esc_char_props[0x100] = {
 /* `   a   b   c   d   e   f   g   h   i   j   k   l   m   n   o  */
   '@','@','@','@','@','@','@','@','@','@','@','@','@','@','@','@',
 /* p   q   r   s   t   u   v   w   x   y   z   {   |   }   ~      */
-  '@','@','@','@','@','@','@','@','@','@','@','O','@','O','@','@',
+  '@','@','@','@','@','@','@','@','@','@','@','O','R','O','@','R',
 /* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F  */
   'A','A','A','A','A','A','A','A','A','A','A','A','A','A','A','A',
 /* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F  */
@@ -84,7 +84,7 @@ unsigned char dks_esc_char_props[0x100] = {
 #define REPEAT  'R'
 
 
-dks_charclass_props_t dks_charclasses['Q'+1-'>'] = {
+dks_charclass_props_t dks_charclasses['R'+1-'>'] = {
 /*		|0	|1	|2	|3	|4	|5	|6	|7	|8	|9	|10	|11	|12	|13	|13	*/
 /*		|NONE	|PTEXT	|SQATTR	|DQATTR	|COMMENT|CDATA	|URI	|DAV	|URI_R	|URI_NR	|TTL_SQ	|TTL_DQ	|TTLIRI	|JS_SQ	|JS_DQ	*/
 /* > wide    */ {0	,0	,0	,0	,0	,0	,PCT	,PCT	,PCT	,PCT	,BSLASHU,BSLASHU,BSLASHU,BSLASHU,BSLASHU},
@@ -106,7 +106,8 @@ dks_charclass_props_t dks_charclasses['Q'+1-'>'] = {
 /* N /	     */	{0	,0	,0	,0	,0	,0	,PCT	,0	,PCT	,0	,0	,0	,0	,0	,0	},
 /* O *	     */	{0	,0	,0	,0	,0	,0	,PCT	,0	,0	,0	,0	,0	,0	,0	,0	},
 /* P punct-! */	{0	,0	,0	,0	,0	,0	,PCT	,0	,PCT	,0	,0	,0	,0	,0	,0	},
-/* Q \	     */	{0	,0	,0	,0	,0	,0	,PCT	,0	,0	,0	,BSLASHC,BSLASHC,BSLASHU,BSLASHC,BSLASHC} };
+/* Q \	     */	{0	,0	,0	,0	,0	,0	,PCT	,0	,0	,0	,BSLASHC,BSLASHC,BSLASHU,BSLASHC,BSLASHC},
+/* R |, 0x7f */	{0	,0	,0	,0	,0	,0	,PCT	,PCT	,PCT	,PCT	,0	,0	,0	,0	,0	} };
 
 unsigned char dks_esc_bslashc[0x80] = {
 /* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F  */
diff --git a/libsrc/Wi/eqlcomp.c b/libsrc/Wi/eqlcomp.c
index 26ae627..0291c26 100644
--- a/libsrc/Wi/eqlcomp.c
+++ b/libsrc/Wi/eqlcomp.c
@@ -1,14 +1,14 @@
 /*
  *  eqlcomp.c
  *
- *  $Id: eqlcomp.c,v 1.16.2.13 2011/03/16 10:34:26 source Exp $
+ *  $Id: eqlcomp.c,v 1.16.2.16 2012/03/14 19:47:17 source Exp $
  *
  *  SQL Query Node Constructors.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1711,6 +1711,7 @@ key_source_om (comp_context_t * cc, key_source_t * ks)
     return;
   om = (out_map_t *) dk_alloc_box (sizeof (out_map_t) * n_out, DV_BIN);
   memset (om, 0, n_out * sizeof (out_map_t));
+  ks->ks_out_map = om;
   DO_SET (dbe_column_t *, col, &ks->ks_out_cols)
     {
       if (ks->ks_key->key_bit_cl && col->col_id == ks->ks_key->key_bit_cl->cl_col_id)
@@ -1727,7 +1728,6 @@ key_source_om (comp_context_t * cc, key_source_t * ks)
 	}
     }
   END_DO_SET();
-  ks->ks_out_map = om;
 }
 
 
@@ -2455,7 +2455,7 @@ retry_dupe_check:
 	      desc->cd_scale = box_num (6);
 	    }
 	  if (desc->cd_dtp == DV_ANY)
-  	      prec = ROW_MAX_COL_BYTES;
+	    prec = 0x7fffffff;
 	  if (IS_BLOB_DTP (desc->cd_dtp))
 	    prec = 0x7fffffff;
 	  desc->cd_precision = box_num (prec);
diff --git a/libsrc/Wi/eqlcomp.h b/libsrc/Wi/eqlcomp.h
index e40d9a7..7e94f7d 100644
--- a/libsrc/Wi/eqlcomp.h
+++ b/libsrc/Wi/eqlcomp.h
@@ -1,12 +1,12 @@
 /*
  *  eqlcomp.h
  *
- *  $Id: eqlcomp.h,v 1.8.2.4 2009/12/01 22:38:19 source Exp $
+ *  $Id: eqlcomp.h,v 1.8.2.6 2012/03/08 12:55:33 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -46,6 +46,7 @@ query_t *eql_compile_2 (const char *string, client_connection_t * cli, caddr_t *
 #define SQLC_QR_TEXT_IS_CONSTANT -8
 #define SQLC_IS_RECOMPILE  0x100
 #define SQLC_PARSE_ONLY_REC 	-9
+#define SQLC_STATIC_PRESERVES_TREE 	-10
 
 query_t *eql_compile (const char *string, client_connection_t * cli);
 
diff --git a/libsrc/Wi/extent.c b/libsrc/Wi/extent.c
index 614429a..94e3b42 100644
--- a/libsrc/Wi/extent.c
+++ b/libsrc/Wi/extent.c
@@ -1,14 +1,14 @@
 /*
  *  extent.c
  *
- *  $Id: extent.c,v 1.1.2.13 2010/11/05 20:23:01 source Exp $
+ *  $Id: extent.c,v 1.1.2.17 2012/03/08 12:55:33 source Exp $
  *
  *  Disk extent management
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -58,7 +58,7 @@
 #endif
 
 
-int ext_free_count (extent_t * ext);
+dp_addr_t ext_free_count (extent_t * ext);
 extent_t * em_new_extent (extent_map_t * em, int type, dp_addr_t extends);
 dp_addr_t em_try_get_dp (extent_map_t * em, int pg_type, dp_addr_t near);
 dp_addr_t em_new_dp_1 (extent_map_t * em, int ext_type, dp_addr_t near);
@@ -190,10 +190,10 @@ dbs_extent_allocated (dbe_storage_t * dbs, dp_addr_t n)
     }
 }
 
-int32
+dp_addr_t
 em_free_count (extent_map_t * em, int type)
 {
-  int32 n = 0;
+  dp_addr_t n = 0;
   DO_EXT (ext, em)
     {
       if (type != EXT_TYPE (ext))
@@ -747,7 +747,7 @@ em_find_free_extender (extent_map_t * em, extent_t * near_ext)
 }
 
 
-int
+dp_addr_t
 ext_free_count (extent_t * ext)
 {
   int inx, b_idx, free = 0;
diff --git a/libsrc/Wi/extent.h b/libsrc/Wi/extent.h
index 7853d3b..a4f6639 100644
--- a/libsrc/Wi/extent.h
+++ b/libsrc/Wi/extent.h
@@ -1,12 +1,12 @@
 /*
- *  $Id: extent.h,v 1.1.2.3 2009/06/10 14:13:30 source Exp $
+ *  $Id: extent.h,v 1.1.2.6 2012/03/08 12:55:33 source Exp $
  *
  *  Disk extents
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/ftp.sql b/libsrc/Wi/ftp.sql
index 4261815..411c386 100644
--- a/libsrc/Wi/ftp.sql
+++ b/libsrc/Wi/ftp.sql
@@ -1,10 +1,10 @@
 --
---  $Id: ftp.sql,v 1.7.2.1 2009/04/18 21:55:11 source Exp $
+--  $Id: ftp.sql,v 1.7.2.3 2012/03/08 12:55:33 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -118,7 +118,7 @@ create procedure WS.WS.FTP_SRV (in path any, in params any, in lines any)
 
   if (FTP_ANONYMOUS_CHECK (ftp_user))
     {
-       home_dir := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'FTPServerAnonymousHome');
+       home_dir := virtuoso_ini_item_value ('HTTPServer', 'FTPServerAnonymousHome');
        if (home_dir is NULL)
 	 home_dir := '/DAV/';
        else if (DAV_HIDE_ERROR (DAV_SEARCH_ID (home_dir, 'C')) is null)
@@ -208,7 +208,7 @@ create procedure FTP_GET_COMMAND (in _in varchar, inout command varchar, inout a
 create procedure FTP_ANONYMOUS_CHECK (in _user varchar)
 {
   if (upper (_user) = 'ANONYMOUS' and
-      cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'FTPServerAnonymousLogin') = '1')
+      virtuoso_ini_item_value ('HTTPServer', 'FTPServerAnonymousLogin') = '1')
     return 1;
 
   return 0;
@@ -223,7 +223,7 @@ FTP_AUTHENTICATE (in id any, in what char(1), in req varchar, in a_uname varchar
     {
       if (upper (a_uname) = 'ANONYMOUS')
         {
-          if (cfg_item_value (virtuoso_ini_path(), 'HTTPServer', 'FTPServerAnonymousLogin') = '1')
+          if (virtuoso_ini_item_value ('HTTPServer', 'FTPServerAnonymousLogin') = '1')
             return DAV_AUTHENTICATE (id, what, req, 'anonymous', a_pwd, 1);
           return -12;
         }
@@ -1325,8 +1325,8 @@ create procedure GET_FREE_PORT ()
 {
    declare _last, _min, _max any;
 
-   _min := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'FTPServerMinFreePort');
-   _max := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'FTPServerMaxFreePort');
+   _min := virtuoso_ini_item_value ('HTTPServer', 'FTPServerMinFreePort');
+   _max := virtuoso_ini_item_value ('HTTPServer', 'FTPServerMaxFreePort');
 
    if (_min is NULL) _min := 20000;
    if (_max is NULL) _max := 30000;
@@ -1433,7 +1433,7 @@ create procedure FTP_WRITE (in l_user varchar, in w_str varchar, in command varc
   declare log_file varchar;
   -- dbg_obj_princ ('FTP_WRITE (', l_user, w_str, command, len, ')');
 
-  log_file := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'FTPServerLogFile');
+  log_file := virtuoso_ini_item_value ('HTTPServer', 'FTPServerLogFile');
 
   if (log_file is NULL)
     goto finish;
diff --git a/libsrc/Wi/gate.c b/libsrc/Wi/gate.c
index 57d4196..868acbc 100644
--- a/libsrc/Wi/gate.c
+++ b/libsrc/Wi/gate.c
@@ -1,14 +1,14 @@
 /*
  *  gate.c
  *
- *  $Id: gate.c,v 1.20.2.8 2010/11/17 21:29:09 source Exp $
+ *  $Id: gate.c,v 1.20.2.10 2012/03/08 12:55:33 source Exp $
  *
  *  Hyperspace and gate.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1421,7 +1421,7 @@ itc_register (it_cursor_t * itc, buffer_desc_t * buf)
     GPF_T1 ("must have write on the buffer for registration");
   rdbg_printf_2 (("  register itc=%x on L=%d \n", it, it->itc_page));
   itc->itc_is_registered = 1;
-#if 1
+#ifndef NDEBUG
   {
     it_cursor_t * ck = buf->bd_registered;
     while (ck)
diff --git a/libsrc/Wi/hash.c b/libsrc/Wi/hash.c
index 96e4932..be355db 100644
--- a/libsrc/Wi/hash.c
+++ b/libsrc/Wi/hash.c
@@ -1,14 +1,14 @@
 /*
  *  hash.c
  *
- *  $Id: hash.c,v 1.19.2.18 2011/03/11 12:17:30 source Exp $
+ *  $Id: hash.c,v 1.19.2.21 2012/03/08 12:55:33 source Exp $
  *
  *  Hash Index
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -714,7 +714,11 @@ hash_cast (query_instance_t * qi, hash_area_t * ha, int inx, state_slot_t * ssl,
       || (DV_IRI_ID_8 == target_dtp && DV_IRI_ID == dtp))
     return data;
   if (SSL_CONSTANT == ssl->ssl_type)
+#ifndef NDEBUG
     GPF_T1 ("constant ssl in hash_cast");
+#else
+    sqlr_new_error ("42000", ".....", "constant ssl in hash_cast, please report statement compiled");
+#endif
   if (IS_BLOB_DTP (target_dtp))
     target_dtp = DV_BLOB_INLINE_DTP (target_dtp);  /* non blob value for blob col. Will be inlined */
   data = box_cast_to (qst, data, dtp,
@@ -1077,9 +1081,10 @@ itc_ha_equal (it_cursor_t * itc, hash_area_t * ha, caddr_t * qst, db_buf_t hash_
 	    }
 	  if (IS_WIDE_STRING_DTP(v_dtp))
 	    {
-	      if (DVC_MATCH == compare_wide_to_utf8 ((caddr_t) (hash_row + h_off),
-		    h_len, value, box_length(value) - sizeof (wchar_t),
-		    ssl->ssl_sqt.sqt_collation))
+	      if (DVC_MATCH == compare_wide_to_utf8_with_collation (
+                  (wchar_t *)value, (box_length(value) / sizeof (wchar_t)) - 1,
+                  (utf8char *) (hash_row + h_off), h_len,
+                  ssl->ssl_sqt.sqt_collation ) )
 		continue;
 	      return DVC_LESS;
 	    }
diff --git a/libsrc/Wi/hosting.c b/libsrc/Wi/hosting.c
index 049164a..03280cc 100644
--- a/libsrc/Wi/hosting.c
+++ b/libsrc/Wi/hosting.c
@@ -1,14 +1,14 @@
 /*
  *  hosting.c
  *
- *  $Id: hosting.c,v 1.11.2.2 2009/05/11 07:36:23 source Exp $
+ *  $Id: hosting.c,v 1.11.2.3 2012/03/08 12:55:34 source Exp $
  *
  *  hosting languages plugin type handler
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/hosting.h b/libsrc/Wi/hosting.h
index 0841353..5f1b74a 100644
--- a/libsrc/Wi/hosting.h
+++ b/libsrc/Wi/hosting.h
@@ -1,12 +1,12 @@
 /*
  *  hosting.h
  *
- *  $Id: hosting.h,v 1.4.2.1 2009/04/18 21:55:11 source Exp $
+ *  $Id: hosting.h,v 1.4.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/hosting.sql b/libsrc/Wi/hosting.sql
index 03121b4..deeee02 100644
--- a/libsrc/Wi/hosting.sql
+++ b/libsrc/Wi/hosting.sql
@@ -1,10 +1,10 @@
 --
---  $Id: hosting.sql,v 1.7.2.3 2010/02/09 14:34:24 source Exp $
+--  $Id: hosting.sql,v 1.7.2.4 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/http.c b/libsrc/Wi/http.c
index 51e58dd..c43c45c 100644
--- a/libsrc/Wi/http.c
+++ b/libsrc/Wi/http.c
@@ -1,14 +1,14 @@
 /*
  *  http.c
  *
- *  $Id: http.c,v 1.71.2.57 2011/03/11 13:08:29 source Exp $
+ *  $Id: http.c,v 1.71.2.71 2012/03/14 14:07:40 source Exp $
  *
  *  HTTP access to Virtuoso
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -70,6 +70,9 @@
 #else
 #include <dirent.h>
 #endif
+#ifdef _SSL
+#include "util/sslengine.h"
+#endif
 
 #define XML_VERSION		"1.0"
 
@@ -105,7 +108,7 @@ static id_hash_t * http_url_cache = NULL; /* WS cached URLs */
 long http_ses_trap = 0;
 int www_maintenance = 0;
 
-#define MAINTENANCE (NULL != www_maintenance_page && (wi_inst.wi_is_checkpoint_pending || www_maintenance))
+#define MAINTENANCE (NULL != www_maintenance_page && (wi_inst.wi_is_checkpoint_pending || www_maintenance || cpt_is_global_lock ()))
 
 caddr_t
 temp_aspx_dir_get (void)
@@ -397,7 +400,7 @@ static int http_acl_check_rate (ws_acl_t * elm, caddr_t name, int check_rate, in
 }
 
 static int
-http_acl_match (caddr_t *alist, caddr_t name, caddr_t dst, int obj_id, int rw_flag, int check_rate, acl_hit_t ** hit, ws_connection_t * ws)
+http_acl_match (caddr_t *alist, caddr_t name, ccaddr_t dst, int obj_id, int rw_flag, int check_rate, acl_hit_t ** hit, ws_connection_t * ws)
 {
   int inx;
   DO_BOX (ws_acl_t *, elm, inx, alist)
@@ -408,7 +411,7 @@ http_acl_match (caddr_t *alist, caddr_t name, caddr_t dst, int obj_id, int rw_fl
 	    ws->ws_body_limit = elm->ha_limit;
 	  if (dst == NULL && obj_id < 0 && rw_flag < 0)
 	    return http_acl_check_rate (elm, name, check_rate, rw_flag, hit);
-	  else if (dst != NULL && DVC_MATCH == cmp_like (dst, elm->ha_dest, NULL, 0, LIKE_ARG_CHAR, LIKE_ARG_CHAR))
+	  else if (dst != NULL && DVC_MATCH == cmp_like (dst, elm->ha_dest ? elm->ha_dest : "*", NULL, 0, LIKE_ARG_CHAR, LIKE_ARG_CHAR))
 	    return http_acl_check_rate (elm, name, check_rate, rw_flag, hit);
 	  else if (dst == NULL && elm->ha_obj == obj_id && rw_flag == elm->ha_rw)
 	    return http_acl_check_rate (elm, name, check_rate, rw_flag, hit);
@@ -430,7 +433,10 @@ ws_check_acl (ws_connection_t * ws, acl_hit_t ** hit)
 
   if (list)
     {
-      if (http_acl_match (list, ws->ws_client_ip, NULL, -1, -1, ACL_CHECK_HITS, hit, ws) > 0) /* 1:deny */
+      char * vd = ws->ws_req_line ? strchr (ws->ws_req_line, '\x20') : NULL;
+      while (vd && isspace (*vd))
+	vd++;
+      if (http_acl_match (list, ws->ws_client_ip, vd, -1, -1, ACL_CHECK_HITS, hit, ws) > 0) /* 1:deny */
 	rc = 0;
     }
   return rc;
@@ -1533,7 +1539,7 @@ ws_path_and_params (ws_connection_t * ws)
   else if (ws->ws_method == WM_UNKNOWN)
     ws->ws_method = WM_ERROR;
 #endif
-  if (strcmp (ws->ws_method_name, "PUT"))
+  if (strcmp (ws->ws_method_name, "PUT") || !IS_DAV_DOMAIN(ws, path1))
     ws_http_body_read (ws, &ws->ws_req_body);
   return rc;
 }
@@ -3348,75 +3354,76 @@ request_do_again:
   if (http_ses_trap)
 #endif
     {
-    /* --ches-- */
-    char *uri_begin;
-    char *last_slash;
-    caddr_t save_history_name;
-    caddr_t vdir = NULL;
-    caddr_t err = NULL;
-    /* Detect virtual dir directory */
-    /* Assume first word is method name */
-    if (!ws->ws_req_line)
-      {
-        err = srv_make_new_error ("42000", "HTL01", "The request line is empty.");
-        goto end_hack_block;
-      }
-    uri_begin = strchr(ws->ws_req_line, ' ');
-    if (NULL == uri_begin)
-      {
-        err = srv_make_new_error ("42000", "HTL01", "The request line does not contain method name: %.1000s", ws->ws_req_line);
-        goto end_hack_block;
-      }
-    while (('\0' != uri_begin[0]) && strchr (" \t", uri_begin[0]))
-      uri_begin++;
-    vdir = box_dv_short_string (uri_begin);
-    last_slash = strrchr(vdir, '/');
-    if (NULL == last_slash)
-      {
-        err = srv_make_new_error ("42000", "HTL01", "No virtual directory name found in the request line %.1000s", ws->ws_req_line);
-        dk_free_box (vdir);
-        goto end_hack_block;
-      }
-    /* Get special registry item value */
-    IN_TXN;
-    save_history_name = registry_get("__save_http_history");
-    LEAVE_TXN;
-    if ((DV_STRING == DV_TYPE_OF(save_history_name)) &&
-        ((0 == strncmp(vdir, save_history_name, (box_length (save_history_name) - 1)) &&
-          '/' == vdir[box_length(save_history_name) - 1]) || !strcmp (save_history_name, "/")))
-      {
-	caddr_t sql_text = dk_alloc_box (50 + box_length (vdir), DV_STRING);
-        query_t *stmt;
-        snprintf(sql_text, box_length (sql_text), "DB.DBA.sys_save_http_history('%s', '%s')", save_history_name, last_slash);
-        dk_free_box (save_history_name);
-        dk_free_box (vdir);
-        stmt = sql_compile(sql_text, ws->ws_cli, &err, SQLC_DEFAULT);
-	dk_free_box (sql_text);
-        if(err)
-          goto end_hack_block;
-        err = qr_quick_exec(stmt, ws->ws_cli, NULL, NULL, 0);
-	IN_TXN;
-	if (err && (err != (caddr_t) SQL_NO_DATA_FOUND))
-	  lt_rollback (cli->cli_trx, TRX_CONT);
-	else
-	  rc = lt_commit (cli->cli_trx, TRX_CONT);
-	lt_threads_set_inner (cli->cli_trx, 1);
-	LEAVE_TXN;
-	if (rc != LTE_OK)
-	  {
-	    MAKE_TRX_ERROR (rc, err, LT_ERROR_DETAIL (cli->cli_trx));
-	  }
-        qr_free(stmt);
-      }
-    else
+      /* --ches-- */
+      char *uri_begin;
+      char *last_slash;
+      caddr_t save_history_name;
+      caddr_t vdir = NULL;
+      caddr_t err = NULL;
+      /* Detect virtual dir directory */
+      /* Assume first word is method name */
+      if (!ws->ws_req_line)
+	{
+	  err = srv_make_new_error ("42000", "HTL01", "The request line is empty.");
+	  goto rec_err_end;
+	}
+      uri_begin = strchr(ws->ws_req_line, ' ');
+      if (NULL == uri_begin)
+	{
+	  err = srv_make_new_error ("42000", "HTL01", "The request line does not contain method name: %.1000s", ws->ws_req_line);
+	  goto rec_err_end;
+	}
+      while (('\0' != uri_begin[0]) && strchr (" \t", uri_begin[0]))
+	uri_begin++;
+      vdir = box_dv_short_string (uri_begin);
+      last_slash = strrchr(vdir, '/');
+      if (NULL == last_slash)
+	{
+	  err = srv_make_new_error ("42000", "HTL01", "No virtual directory name found in the request line %.1000s", ws->ws_req_line);
+	  dk_free_box (vdir);
+	  goto rec_err_end;
+	}
+      /* Get special registry item value */
+      IN_TXN;
+      save_history_name = registry_get("__save_http_history");
+      LEAVE_TXN;
+      if ((DV_STRING == DV_TYPE_OF (save_history_name)) &&
+	  ((0 == strncmp(vdir, save_history_name, (box_length (save_history_name) - 1)) &&
+	    '/' == vdir[box_length(save_history_name) - 1]) || !strcmp (save_history_name, "/")))
+	{
+	  static query_t *stmt = NULL;
+	  if (!stmt)
+	    {
+	      stmt = sql_compile ("DB.DBA.sys_save_http_history (?, ?)", ws->ws_cli, &err, SQLC_DEFAULT);
+	      if (err)
+		goto rec_err_end;
+	    }
+
+	  err = qr_quick_exec (stmt, ws->ws_cli, NULL, NULL, 2,
+	      ":0", save_history_name, QRP_STR,
+	      ":1", last_slash, QRP_STR);
+
+	  IN_TXN;
+	  if (err && (err != (caddr_t) SQL_NO_DATA_FOUND))
+	    lt_rollback (cli->cli_trx, TRX_CONT);
+	  else
+	    rc = lt_commit (cli->cli_trx, TRX_CONT);
+	  lt_threads_set_inner (cli->cli_trx, 1);
+	  LEAVE_TXN;
+	  if (rc != LTE_OK)
+	    {
+	      MAKE_TRX_ERROR (rc, err, LT_ERROR_DETAIL (cli->cli_trx));
+	    }
+	}
+      dk_free_box (save_history_name); 
       dk_free_box (vdir);
-end_hack_block:
-    if (err && err != (caddr_t) SQL_NO_DATA_FOUND)
-      {
-        log_warning("Error [%s] : %s", ERR_STATE(err), ERR_MESSAGE(err));
-        dk_free_tree(err);
-      }
-  }
+rec_err_end:
+      if (err && err != (caddr_t) SQL_NO_DATA_FOUND)
+	{
+	  log_warning("Error [%s] : %s", ERR_STATE(err), ERR_MESSAGE(err));
+	  dk_free_tree(err);
+	}
+    }
 
 #ifdef VIRTUAL_DIR
   path1 = (ws->ws_p_path && BOX_ELEMENTS (ws->ws_p_path) )? ws->ws_p_path[0] : NULL;
@@ -4103,7 +4110,7 @@ ws_serve_connection (ws_connection_t * ws)
       SSL * new_ssl = NULL;
 
       if (NULL != tcpses_get_ssl (ses->dks_session))
-	SSL_free ((SSL *) tcpses_get_ssl (ses->dks_session));
+	sslses_to_tcpses (ses->dks_session);
       to = ses->dks_read_block_timeout;
       session_set_control (ses->dks_session, SC_TIMEOUT, (char *)(&to), sizeof (timeout_t));
       dst = tcpses_get_fd (ses->dks_session);
@@ -5119,6 +5126,9 @@ bif_http_lock (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     sqlr_new_error ("22023", "HT042", "Invalid DBA credentials");
   sec_check_dba ((query_instance_t *) qst, "http_lock");
 
+  if (!www_maintenance_page)
+    sqlr_new_error ("22023", "HTERR", "The maintenance page is not specified, must have MaintenancePage setting in the HTTPServer section of the INI");
+
   if (!MAINTENANCE)
     {
       www_maintenance = 1;
@@ -5859,11 +5869,11 @@ http_proxy (ws_connection_t * ws, char * host, caddr_t * req, caddr_t * body, dk
 #define ENC_B64_NAME "encode_base64"
 #define DEC_B64_NAME "decode_base64"
 
-static char base64_vec[] =
-	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+char base64_vec[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+char base64url_vec[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\0";
 
 size_t
-encode_base64(char * input, char * output, size_t len)
+encode_base64_impl (char * input, char * output, size_t len, char * table)
 {
   unsigned char	c;
   int  n = 0,
@@ -5891,7 +5901,7 @@ encode_base64(char * input, char * output, size_t len)
 	}
 
       for (i = 3; i >= 0; i--)
-	output[x++] = base64_vec[enc[i]];
+	output[x++] = table[enc[i]];
       n = 1;
       count += 4;
       val = c;
@@ -5931,7 +5941,7 @@ encode_base64(char * input, char * output, size_t len)
   if (n)
     {
       for (i = 3; i >= 0; i--)
-	output[x++] = base64_vec[enc[i]];
+	output[x++] = table[enc[i]];
     }
 
   return x;
@@ -5962,6 +5972,30 @@ bif_encode_base64(caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return(res);
 }
 
+caddr_t
+bif_encode_base64url(caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t dest;
+  caddr_t res;
+  caddr_t src = bif_string_arg (qst, args, 0, ENC_B64_NAME);
+  dtp_t dtp = DV_TYPE_OF (src);
+  size_t len = box_length(src);
+
+  if (IS_STRING_DTP(dtp) || dtp == DV_C_STRING)
+    len--;
+
+  if ((len * 2 + 1) > MAX_BOX_LENGTH)
+    sqlr_new_error ("22023", "HT081", "The input string is too large");
+
+  dest = dk_alloc_box(len * 2 + 1, DV_SHORT_STRING);
+  len = encode_base64_impl ((char *)src, (char *)dest, len, B64_URL);
+  *(dest+len) = 0;
+
+  res = box_dv_short_string(dest);
+  dk_free_box(dest);
+  return(res);
+}
+
 static void
 base64_store24(char ** d, char * c)
 {
@@ -5971,7 +6005,7 @@ base64_store24(char ** d, char * c)
 }
 
 size_t
-decode_base64(char * src, char * end)
+decode_base64_impl (char * src, char * end, char * table)
 {
     char * start = src;
     char c0, c[4], *p;
@@ -5982,8 +6016,8 @@ decode_base64(char * src, char * end)
     while ((c0 = *src++) && src < end) {
 	if (c0=='=')
 	  break; /* a = symbol is end padding */
-	if ((p=strchr(base64_vec, c0))) {
-	  c[i++]=(char) (p-base64_vec);
+	if ((p=strchr(table, c0))) {
+	  c[i++]=(char) (p-table);
 	  if (i==4) {
 	    base64_store24(&d, c);
 	    i=0;
@@ -6024,6 +6058,26 @@ bif_decode_base64(caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return (res);
 }
 
+caddr_t
+bif_decode_base64url (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t src = bif_string_arg (qst, args, 0, DEC_B64_NAME);
+  caddr_t res, buf;
+  size_t len, blen;
+
+  blen = box_length(src);
+  buf = dk_alloc_box(blen, DV_SHORT_STRING);
+  memcpy (buf, src, blen);
+
+  len = decode_base64_impl (buf, buf + blen, B64_URL);
+  res = dk_alloc_box (len + 1, DV_SHORT_STRING);
+  memcpy (res, buf, len);
+  res[len] = 0;
+  dk_free_box(buf);
+
+  return (res);
+}
+
 
 dk_session_t *
 http_connect (char * uri, caddr_t * err_ret, caddr_t ** head_ret, caddr_t method,
@@ -7134,6 +7188,8 @@ bif_http_request_header_full (caddr_t * qst, caddr_t * err_ret, state_slot_t **
 	  dk_session_t *ses = NULL;
 	  DO_BOX (caddr_t, line, inx, lines)
 	    {
+	      if (!DV_STRINGP (line))
+		continue;
 	      p = strchr (line, ':');
 	      len = p - line;
 	      if (p && !strncasecmp (line, name, len) && !name[len])
@@ -8031,6 +8087,8 @@ bif_http_map_table (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 		map->hm_xml_template = 1;
 	      else if (DV_STRINGP (opts[i]) && !stricmp (opts[i],"executable"))
 		map->hm_executable = 1;
+	      else if (DV_STRINGP (opts[i]) && !stricmp (opts[i],"exec_as_get"))
+		map->hm_exec_as_get = 1;
 	      else if (DV_STRINGP (opts[i]) && !stricmp (opts[i],"url_rewrite"))
 		map->hm_url_rewrite_rule = box_copy_tree (opts[i+1]);
 	      else if (DV_STRINGP (opts[i]) && !stricmp (opts[i],"url_rewrite_keep_lpath"))
@@ -8121,120 +8179,117 @@ https_cert_verify_callback (int ok, void *_ctx)
   X509_STORE_CTX *ctx;
   SSL *ssl;
   X509 *xs;
-  int errnum, verify;
+  int errnum, verify, depth;
   int errdepth;
   char *cp, cp_buf[1024];
   char *cp2, cp2_buf[1024];
   SSL_CTX *ssl_ctx;
-  https_ctx_info_t *app_ctx;
+  uptrlong ap;
 
-  ctx = (X509_STORE_CTX *)_ctx;
-  ssl  = (SSL *)X509_STORE_CTX_get_app_data(ctx);
+  ctx = (X509_STORE_CTX *) _ctx;
+  ssl = (SSL *) X509_STORE_CTX_get_app_data (ctx);
   ssl_ctx = SSL_get_SSL_CTX (ssl);
-  app_ctx = (https_ctx_info_t *) SSL_CTX_get_app_data (ssl_ctx);
+  ap = (uptrlong) SSL_CTX_get_app_data (ssl_ctx);
 
-  xs       = X509_STORE_CTX_get_current_cert(ctx);
-  errnum   = X509_STORE_CTX_get_error(ctx);
-  errdepth = X509_STORE_CTX_get_error_depth(ctx);
+  xs = X509_STORE_CTX_get_current_cert (ctx);
+  errnum = X509_STORE_CTX_get_error (ctx);
+  errdepth = X509_STORE_CTX_get_error_depth (ctx);
 
-  cp  = X509_NAME_oneline(X509_get_subject_name(xs), cp_buf, sizeof (cp_buf));
-  cp2 = X509_NAME_oneline(X509_get_issuer_name(xs),  cp2_buf, sizeof (cp2_buf));
+  cp = X509_NAME_oneline (X509_get_subject_name (xs), cp_buf, sizeof (cp_buf));
+  cp2 = X509_NAME_oneline (X509_get_issuer_name (xs), cp2_buf, sizeof (cp2_buf));
 
-  verify = app_ctx->hci_verify;
+  verify = (int) ((0xff000000 & ap) >> 24);
+  depth = (int) (0xffffff & ap);
 
-  if (( errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
+  if ((errnum == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
 	|| errnum == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN
 	|| errnum == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
 #if OPENSSL_VERSION_NUMBER >= 0x00905000
-	|| errnum == X509_V_ERR_CERT_UNTRUSTED
+	  || errnum == X509_V_ERR_CERT_UNTRUSTED
 #endif
 	|| errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE)
       && verify == HTTPS_VERIFY_OPTIONAL_NO_CA )
     {
-      SSL_set_verify_result(ssl, X509_V_OK);
+      SSL_set_verify_result (ssl, X509_V_OK);
       ok = 1;
     }
 
   if (!ok)
     {
-      log_error ("%s Certificate Verification: Error (%d): %s",
-	  app_ctx->hci_name,
+      log_error ("HTTPS Certificate Verification: Error (%d): %s",
 	  errnum, X509_verify_cert_error_string(errnum));
     }
 
-  if (errdepth > app_ctx->hci_depth)
+  if (errdepth > depth)
     {
-      log_error ("%s Certificate Verification: Certificate Chain too long "
+      log_error ("HTTPS Certificate Verification: Certificate Chain too long "
 	  "(chain has %d certificates, but maximum allowed are only %ld)",
-	  app_ctx->hci_name,
-	  errdepth, app_ctx->hci_depth);
+	  errdepth, depth);
       ok = 0;
     }
   return (ok);
 }
 
 int
-https_set_certificate (SSL_CTX* ssl_ctx, char * https_cert, char * https_key)
+ssl_server_set_certificate (SSL_CTX* ssl_ctx, char * cert_name, char * key_name)
 {
-  char err_buf [1024];
-  if (strstr (https_cert, "db:") == https_cert || strstr (https_key, "db:") == https_key)
+  char err_buf[1024];
+  EVP_PKEY *pkey;
+  X509 *x509;
+
+  if (strstr (cert_name, "db:") == cert_name || strstr (key_name, "db:") == key_name)
     {
-      xenc_key_t * k;
-      client_connection_t * cli = GET_IMMEDIATE_CLIENT_OR_NULL;
-      user_t * saved_user;
+      xenc_key_t *k;
+      client_connection_t *cli = GET_IMMEDIATE_CLIENT_OR_NULL;
+      user_t *saved_user;
       if (!cli)
 	{
-	  log_error ("HTTPS: The certificate & key stored in database cannot be accessed.");
+	  log_error ("SSL: The certificate and private key stored in the database cannot be accessed");
 	  return 0;
 	}
-      if (strcmp (https_cert, https_key))
+      if (strcmp (cert_name, key_name))
 	{
-	  log_error ("HTTPS: The certificate & key stored in database must have same name");
+	  log_error ("SSL: The certificate and private key stored in the database must have the same name");
 	  return 0;
 	}
       saved_user = cli->cli_user;
       if (!cli->cli_user)
 	cli->cli_user = sec_name_to_user ("dba");
-      k = xenc_get_key_by_name (https_key + 3, 1);
+      k = xenc_get_key_by_name (key_name + 3, 1);
       cli->cli_user = saved_user;
       if (!k || !k->xek_x509 || !k->xek_evp_private_key)
 	{
-	  log_error ("HTTPS: Invalid stored key %s", https_key);
-	  return 0;
-	}
-      if (SSL_CTX_use_certificate (ssl_ctx, k->xek_x509) <= 0)
-	{
-	  cli_ssl_get_error_string (err_buf, sizeof (err_buf));
-	  log_error ("HTTPS: Invalid X509 certificate file %s : %s", https_cert, err_buf);
-	  return 0;
-	}
-      if (SSL_CTX_use_PrivateKey (ssl_ctx, k->xek_evp_private_key) <= 0)
-	{
-	  cli_ssl_get_error_string (err_buf, sizeof (err_buf));
-	  log_error ("HTTPS: Invalid X509 private key file %s : %s", https_key, err_buf);
+	  log_error ("SSL: The stored key '%s' is invalid", key_name);
 	  return 0;
 	}
+      x509 = k->xek_x509;
+      pkey = k->xek_evp_private_key;
     }
   else
     {
-      if (SSL_CTX_use_certificate_file (ssl_ctx, https_cert, SSL_FILETYPE_PEM) <= 0)
+      if ((x509 = ssl_load_x509 (cert_name)) == NULL)
 	{
 	  cli_ssl_get_error_string (err_buf, sizeof (err_buf));
-	  log_error ("HTTPS: Invalid X509 certificate file %s : %s", https_cert, err_buf);
+	  log_error ("SSL: Unable to load certificate '%s': %s", cert_name, err_buf);
 	  return 0;
 	}
-      if (SSL_CTX_use_PrivateKey_file (ssl_ctx, https_key, SSL_FILETYPE_PEM) <= 0)
+      if ((pkey = ssl_load_privkey (key_name, NULL)) == NULL)
 	{
 	  cli_ssl_get_error_string (err_buf, sizeof (err_buf));
-	  log_error ("HTTPS: Invalid X509 private key file %s : %s", https_key, err_buf);
+	  log_error ("SSL: Unable to load private key '%s': %s", key_name, err_buf);
 	  return 0;
 	}
     }
-  if (!SSL_CTX_check_private_key (ssl_ctx))
+  if (SSL_CTX_use_certificate (ssl_ctx, x509) <= 0)
+    {
+      cli_ssl_get_error_string (err_buf, sizeof (err_buf));
+      log_error ("SSL: Unable to use certificate '%s': %s", cert_name, err_buf);
+      return 0;
+    }
+  if (SSL_CTX_use_PrivateKey (ssl_ctx, pkey) <= 0)
     {
       cli_ssl_get_error_string (err_buf, sizeof (err_buf));
-      log_error ("HTTPS: X509 Private key %s does not match the X509 certificate public key %s : %s",
-	  https_key, https_cert, err_buf);
+      log_error ("SSL: Unable to use private key '%s': %s", key_name, err_buf);
       return 0;
     }
   return 1;
@@ -8243,15 +8298,15 @@ https_set_certificate (SSL_CTX* ssl_ctx, char * https_cert, char * https_key)
 int
 http_set_ssl_listen (dk_session_t * listening, caddr_t * https_opts)
 {
-  char err_buf [1024];
-  SSL_CTX* ssl_ctx = NULL;
+  char err_buf[1024];
+  SSL_CTX *ssl_ctx = NULL;
   const SSL_METHOD *ssl_meth = NULL;
-  char * https_cvfile = NULL;
+  char *https_cvfile = NULL;
   char *cert = NULL;
   char *skey = NULL;
   long https_cvdepth = -1;
   int i, len, https_client_verify = -1;
-  ssl_meth = SSLv23_server_method();
+  ssl_meth = SSLv23_server_method ();
   ssl_ctx = SSL_CTX_new (ssl_meth);
 
   /* Initialize the parameters */
@@ -8264,22 +8319,22 @@ http_set_ssl_listen (dk_session_t * listening, caddr_t * https_opts)
 
   for (i = 0; i < len; i += 2)
     {
-      if (https_opts [i] && DV_STRINGP (https_opts [i]))
+      if (https_opts[i] && DV_STRINGP (https_opts[i]))
 	{
-	  if (!stricmp (https_opts [i], "https_cv") && DV_STRINGP (https_opts [i + 1])) /* CA file */
-	    https_cvfile = https_opts [i + 1];
-	  else if (!stricmp (https_opts [i], "https_cert") && DV_STRINGP (https_opts [i + 1])) /* x509 cert */
-	    cert = https_opts [i + 1];
-	  else if (!stricmp (https_opts [i], "https_key") && DV_STRINGP (https_opts [i + 1]))  /* private key */
-	    skey = https_opts [i + 1];
-	  else if (!stricmp (https_opts [i], "https_cv_depth")) /* verification depth */
-	    https_cvdepth = unbox(https_opts [i + 1]);
-	  else if (!stricmp (https_opts [i], "https_verify"))   /* verify mode */
-	    https_client_verify = unbox(https_opts [i + 1]);
+	  if (!stricmp (https_opts[i], "https_cv") && DV_STRINGP (https_opts[i + 1]))	/* CA file */
+	    https_cvfile = https_opts[i + 1];
+	  else if (!stricmp (https_opts[i], "https_cert") && DV_STRINGP (https_opts[i + 1]))	/* x509 cert */
+	    cert = https_opts[i + 1];
+	  else if (!stricmp (https_opts[i], "https_key") && DV_STRINGP (https_opts[i + 1]))	/* private key */
+	    skey = https_opts[i + 1];
+	  else if (!stricmp (https_opts[i], "https_cv_depth"))	/* verification depth */
+	    https_cvdepth = unbox (https_opts[i + 1]);
+	  else if (!stricmp (https_opts[i], "https_verify"))	/* verify mode */
+	    https_client_verify = unbox (https_opts[i + 1]);
 	}
     }
 
-  if (https_client_verify < 0 && NULL != https_cvfile) /* compatibility with existing definitions */
+  if (https_client_verify < 0 && NULL != https_cvfile)	/* compatibility with existing definitions */
     https_client_verify = 1;
 
   if (!ssl_ctx)
@@ -8289,6 +8344,9 @@ http_set_ssl_listen (dk_session_t * listening, caddr_t * https_opts)
       goto err_exit;
     }
 
+  if (!ssl_server_set_certificate (ssl_ctx, cert, skey))
+    goto err_exit;
+
   if (https_cvfile)
     {
       if (!SSL_CTX_load_verify_locations (ssl_ctx, https_cvfile, NULL))
@@ -8298,50 +8356,43 @@ http_set_ssl_listen (dk_session_t * listening, caddr_t * https_opts)
 	  goto err_exit;
 	}
     }
-  if (https_set_certificate (ssl_ctx, cert, skey) <= 0)
-    goto err_exit;
 
   if (https_client_verify > 0)
     {
       int verify = SSL_VERIFY_NONE, session_id_context = srv_pid;
-      https_ctx_info_t * https_callback_info = (https_ctx_info_t *) dk_alloc (sizeof (https_ctx_info_t));
+      uptrlong ap;
 
       if (HTTPS_VERIFY_REQUIRED == https_client_verify)
 	verify |= SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_CLIENT_ONCE;
       if (HTTPS_VERIFY_OPTIONAL == https_client_verify || HTTPS_VERIFY_OPTIONAL_NO_CA == https_client_verify)
 	verify |= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
-
       SSL_CTX_set_verify (ssl_ctx, verify, (int (*)(int, X509_STORE_CTX *)) https_cert_verify_callback);
       SSL_CTX_set_verify_depth (ssl_ctx, https_cvdepth);
-
-      https_callback_info->hci_depth = https_cvdepth;
-      https_callback_info->hci_verify = https_client_verify;
-      https_callback_info->hci_name  = "HTTPS";
-
-      SSL_CTX_set_app_data (ssl_ctx, https_callback_info);
-      SSL_CTX_set_session_id_context(ssl_ctx, (unsigned char *)&session_id_context, sizeof session_id_context);
+      ap = ((0xff & https_client_verify) << 24) | (0xffffff & https_cvdepth);
+      SSL_CTX_set_app_data (ssl_ctx, ap);
+      SSL_CTX_set_session_id_context (ssl_ctx, (unsigned char *) &session_id_context, sizeof session_id_context);
     }
 
   if (https_cvfile)
     {
       int i = 0;
-      STACK_OF(X509_NAME) *skCAList = SSL_load_client_CA_file (https_cvfile);
+      STACK_OF (X509_NAME) * skCAList = SSL_load_client_CA_file (https_cvfile);
 
       SSL_CTX_set_client_CA_list (ssl_ctx, skCAList);
-      skCAList = SSL_CTX_get_client_CA_list(ssl_ctx);
+      skCAList = SSL_CTX_get_client_CA_list (ssl_ctx);
 
-      if (sk_X509_NAME_num(skCAList) == 0)
-	log_warning ("HTTPS Client authentication requested but no CA known for verification");
+      if (sk_X509_NAME_num (skCAList) == 0)
+	log_warning ("HTTPS: Client authentication requested but no CA known for verification");
 
-      for (i = 0; i < sk_X509_NAME_num(skCAList); i++)
+      for (i = 0; i < sk_X509_NAME_num (skCAList); i++)
 	{
 	  char ca_buf[1024];
 	  X509_NAME *ca_name = (X509_NAME *) sk_X509_NAME_value (skCAList, i);
 	  if (X509_NAME_oneline (ca_name, ca_buf, sizeof (ca_buf)))
-	    log_debug ("HTTPS Using X509 Client CA %s", ca_buf);
+	    log_debug ("HTTPS: Using X509 Client CA %s", ca_buf);
 	}
     }
-  tcpses_set_sslctx (listening->dks_session, (void *)ssl_ctx);
+  tcpses_set_sslctx (listening->dks_session, (void *) ssl_ctx);
   return 1;
 err_exit:
   SSL_CTX_free (ssl_ctx);
@@ -8867,6 +8918,8 @@ bif_http_map_get (caddr_t *qst, caddr_t * err_ret, state_slot_t **args)
     res = box_num (map->hm_is_dav);
   else if (!strcmp (member, "executable"))
     res = box_num (map->hm_executable);
+  else if (!strcmp (member, "exec_as_get"))
+    res = box_num (map->hm_exec_as_get);
   else if (!strcmp (member, "url_rewrite"))
     res = box_copy_tree ((box_t) map->hm_url_rewrite_rule);
   else if (!strcmp (member, "url_rewrite_keep_lpath"))
@@ -9099,13 +9152,16 @@ static caddr_t
 bif_http_body_read (caddr_t *qst, caddr_t * err_ret, state_slot_t **args)
 {
   query_instance_t *qi = (query_instance_t *)qst;
-  ws_connection_t *ws = NULL;
+  ws_connection_t *ws = qi->qi_client->cli_ws;
   dk_session_t *ses;
-
-  if (!qi->qi_client->cli_ws)
-    sqlr_new_error ("42000", "HT053", "Function http_body_read not allowed outside http context");
-  ws = qi->qi_client->cli_ws;
-  if (ws->ws_req_body)
+  if (!ws)
+    sqlr_new_error ("42000", "HT053", "Function http_body_read() not allowed outside http context");
+  if ((0 < BOX_ELEMENTS (args)) && bif_long_arg (qst, args, 0, "http_body_read"))
+    {
+      ses = strses_allocate ();
+      ws_http_body_read (ws, &ses);
+    }
+  else if (ws->ws_req_body)
     {
       ses = ws->ws_req_body;
       ws->ws_req_body = NULL;
@@ -9921,10 +9977,12 @@ http_on_message_ses_dropped (dk_session_t * ses)
 static caddr_t
 bif_http_on_message (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
+  query_instance_t *qi = (query_instance_t *)qst;
   caddr_t *conn = (caddr_t *) bif_arg (qst, args, 0, "http_on_message");
   caddr_t func = bif_string_arg (qst, args, 1, "http_on_message");
   caddr_t cd = bif_arg (qst, args, 2, "http_on_message");
   dk_session_t * ses = NULL;
+  ws_connection_t * ws = qi->qi_client->cli_ws;
 
   if (DV_CONNECTION == DV_TYPE_OF (conn))
     {
@@ -9934,6 +9992,17 @@ bif_http_on_message (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       else
 	ses = NULL;
     }
+  else if (ws && ws->ws_session)
+    {
+      /* We should mark the session so it will not be disconnected nor freed */
+      if (ws->ws_flushed)
+	sqlr_new_error ("42000", "HT000", "The client session is already flushed");
+      mutex_enter (thread_mtx);
+      ses = qi->qi_client->cli_ws->ws_session;
+      ws->ws_session->dks_ws_status = DKS_WS_CACHED;
+      ws->ws_session->dks_n_threads++;
+      mutex_leave (thread_mtx);
+    }
 
   if (ses == NULL)
     sqlr_new_error ("22023", "HT000", "The http_on_message expects an open connection as 1-st argument");
@@ -10196,6 +10265,8 @@ http_init_part_one ()
   bif_define_typed ("http_request_status_get", bif_http_request_status_get, &bt_varchar);
   bif_define_typed (ENC_B64_NAME, bif_encode_base64, &bt_varchar);
   bif_define_typed (DEC_B64_NAME, bif_decode_base64, &bt_varchar);
+  bif_define_typed ("encode_base64url", bif_encode_base64url, &bt_varchar);
+  bif_define_typed ("decode_base64url", bif_decode_base64url, &bt_varchar);
   bif_define_typed ("http_root", bif_http_root, &bt_varchar);
   bif_define_typed ("dav_root", bif_dav_root, &bt_varchar);
   bif_define_typed ("http_path", bif_http_path, &bt_varchar);
@@ -10422,6 +10493,8 @@ http_init_part_two ()
   /*    CRYPTO_malloc_init();*/
   SSL_load_error_strings();
   SSLeay_add_ssl_algorithms();
+  if (!https_key) /* when key & certificate are in same file */
+    https_key = https_cert;
   if (https_port && https_cert && https_key)
     {
       char err_buf [1024];
@@ -10433,43 +10506,39 @@ http_init_part_two ()
 	{
 	  cli_ssl_get_error_string (err_buf, sizeof (err_buf));
 	  log_error ("HTTPS: Error allocating SSL context: %s", err_buf);
-	  call_exit(-1);
+	  goto init_ssl_exit;
 	}
 
+      if (!ssl_server_set_certificate (ssl_ctx, https_cert, https_key))
+	goto init_ssl_exit;
+
       if (https_client_verify_file)
+	{
 	if (!SSL_CTX_load_verify_locations (ssl_ctx, https_client_verify_file, NULL))
 	  {
 	    cli_ssl_get_error_string (err_buf, sizeof (err_buf));
 	    log_error ("HTTPS: Invalid X509 client CA file %s : %s", https_client_verify_file, err_buf);
-	    call_exit(-1);
+	      goto init_ssl_exit;
 	  }
-
-      if (https_set_certificate (ssl_ctx, https_cert, https_key) <= 0)
-	{
-	  call_exit(-1);
 	}
 
       if (https_client_verify > 0)
 	{
 	  int verify = SSL_VERIFY_NONE, session_id_context = srv_pid;
-	  https_ctx_info_t * https_callback_info = (https_ctx_info_t *) dk_alloc (sizeof (https_ctx_info_t));
+	  uptrlong ap;
 
 	  if (HTTPS_VERIFY_REQUIRED == https_client_verify)
 	    verify |= SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_CLIENT_ONCE;
 	  if (HTTPS_VERIFY_OPTIONAL == https_client_verify || HTTPS_VERIFY_OPTIONAL_NO_CA == https_client_verify)
 	    verify |= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
-
 	  SSL_CTX_set_verify (ssl_ctx, verify , (int (*)(int, X509_STORE_CTX *)) https_cert_verify_callback);
 	  SSL_CTX_set_verify_depth (ssl_ctx, https_client_verify_depth);
-
-	  https_callback_info->hci_depth = https_client_verify_depth;
-	  https_callback_info->hci_verify = https_client_verify;
-	  https_callback_info->hci_name = "HTTPS";
-	  SSL_CTX_set_app_data (ssl_ctx, https_callback_info);
+	  ap = ((0xff & https_client_verify) << 24) | (0xffffff & https_client_verify_depth);
+	  SSL_CTX_set_app_data (ssl_ctx, ap);
 	  SSL_CTX_set_session_id_context(ssl_ctx, (unsigned char  *)&session_id_context, sizeof session_id_context);
 	}
 
-      if (NULL != https_client_verify_file)
+      if (https_client_verify_file)
 	{
 	  int i;
 	  STACK_OF(X509_NAME) *skCAList = SSL_load_client_CA_file (https_client_verify_file);
@@ -10477,45 +10546,44 @@ http_init_part_two ()
 	  SSL_CTX_set_client_CA_list (ssl_ctx, skCAList);
 	  skCAList = SSL_CTX_get_client_CA_list (ssl_ctx);
 	  if (sk_X509_NAME_num(skCAList) == 0)
-	    log_warning ("HTTPS Client authentication requested but no CA known for verification");
+	    log_warning ("HTTPS: Client authentication requested but no CA known for verification");
 
 	  for (i = 0; i < sk_X509_NAME_num(skCAList); i++)
 	    {
 	      char ca_buf[1024];
 	      X509_NAME *ca_name = (X509_NAME *) sk_X509_NAME_value (skCAList, i);
               if (X509_NAME_oneline (ca_name, ca_buf, sizeof (ca_buf)))
-		log_debug ("HTTPS Using X509 Client CA %s", ca_buf);
+		log_debug ("HTTPS: Using X509 Client CA %s", ca_buf);
 	    }
 	}
 
       ssl_port = atoi (https_port);
       if (ssl_port <= 0)
 	{
-	  log_error ("SSL port is not valid port number");
-	  call_exit(-1);
+	  log_error ("HTTPS: SSL port is invalid");
+	  goto init_ssl_exit;
 	}
       ssl_listen = dk_session_allocate (SESCLASS_TCPIP);
       tcpses_set_sslctx (ssl_listen->dks_session, (void *)ssl_ctx);
-      SESSION_SCH_DATA (ssl_listen)->sio_default_read_ready_action
-	  = (io_action_func) ws_ready;
+      SESSION_SCH_DATA (ssl_listen)->sio_default_read_ready_action = (io_action_func) ws_ready;
 
       if (SER_SUCC != session_set_address (ssl_listen->dks_session, https_port))
 	{
-	  log_error ("Failed setting the HTTPS listen address at %s.", https_port);
-	  call_exit (-1);
+	  log_error ("HTTPS: Failed setting listen address at %s", https_port);
+	  goto init_ssl_exit;
 	}
 
       session_listen (ssl_listen->dks_session);
-
       if (!SESSTAT_ISSET (ssl_listen->dks_session, SST_LISTENING))
 	{
-	  log_error ("Failed HTTPS listen at %s.", https_port);
-	  call_exit (-1);
-	};
-      log_info ((char *) (https_client_verify ?
-	  "HTTPS/X509 server online at %s" :
-	  "HTTPS server online at %s"),
-	  https_port);
+	  log_error ("HTTPS: Failed listen at %s", https_port);
+	  goto init_ssl_exit;
+	}
+
+      log_info ("HTTPS server online at %s", https_port);
+
+    init_ssl_exit:
+      ;
     }
 #endif
 
diff --git a/libsrc/Wi/http.h b/libsrc/Wi/http.h
index 2e8e487..8281e96 100644
--- a/libsrc/Wi/http.h
+++ b/libsrc/Wi/http.h
@@ -1,14 +1,14 @@
 /*
  *  http.h
  *
- *  $Id: http.h,v 1.22.2.14 2010/11/12 21:00:15 source Exp $
+ *  $Id: http.h,v 1.22.2.19 2012/03/08 12:55:34 source Exp $
  *
  *  Definitions for HTTP server
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -74,6 +74,7 @@ typedef struct ws_http_map_s
     int 	hm_no_inherit;
     int		hm_xml_template;
     int		hm_executable;
+    int		hm_exec_as_get;
     caddr_t 	hm_htkey;
     caddr_t     hm_url_rewrite_rule;
     int		hm_url_rewrite_keep_lpath;
@@ -329,9 +330,14 @@ the order of columns in dks_charclasses, file dks_esc.c */
 
 extern unsigned char dks_esc_char_props[0x100];
 typedef unsigned char dks_charclass_props_t[COUNTOF__DKS_ESC];
-extern dks_charclass_props_t dks_charclasses['Q'+1-'>'];
+extern dks_charclass_props_t dks_charclasses['R'+1-'>'];
 #define DKS_ESC_CHARCLASS_ACTION(wc,mode) (dks_charclasses[((wc & ~0xff) ? 0 : (dks_esc_char_props[wc] - '>'))][mode])
 
+#define isdatechar(c) (('\0' != (c)) && (NULL != strchr ("0123456789 GMTZ:-", (c))))
+#define isfloatchar(c) (('\0' != (c)) && (NULL != strchr ("0123456789eE+-.", (c))))
+/* This was: #define isplainURIchar(c) (('\0' != (c)) && ('/' != (c)) && ('?' != (c)) && ('=' != (c)) && ('#' != (c))) */
+#define isplainURIchar(c) ('\0' == DKS_ESC_CHARCLASS_ACTION((unsigned)(c), DKS_ESC_URI))
+
 extern void
 dks_esc_write (dk_session_t * ses, const char * str, size_t len,
   wcharset_t * tgt_charset, wcharset_t * src_charset, int dks_esc_mode);
@@ -344,8 +350,15 @@ caddr_t ws_get_opt (caddr_t * opts, char *opt_name, char * def);
 
 void session_buffered_read_n (dk_session_t * ses, char *buf, int max, int *inx);
 
-size_t decode_base64(char * src, char * end);
-size_t encode_base64(char * input, char * output, size_t len);
+extern char base64_vec[];
+extern char base64url_vec[];
+#define B64_CANON base64_vec
+#define B64_URL base64url_vec
+
+size_t decode_base64_impl (char * src, char * end, char * table);
+size_t encode_base64_impl (char * input, char * output, size_t len, char * table);
+#define decode_base64(src,end) decode_base64_impl ((src), (end), B64_CANON)
+#define encode_base64(input,output,len) encode_base64_impl ((input), (output), (len), B64_CANON)
 
 void ws_strses_reply (ws_connection_t * ws, const char * volatile code);
 void ws_write_failed (ws_connection_t * ws);
@@ -376,12 +389,6 @@ typedef enum {
 	HTTPS_VERIFY_OPTIONAL_NO_CA = 3
 } https_verify_t;
 
-typedef struct https_ctx_info_s
-{
-  int32 hci_depth;
-  int32 hci_verify;
-  char *hci_name;
-} https_ctx_info_t;
 #endif
 extern char * http_cli_proxy_server;
 int http_cli_target_is_proxy_exception (char *);
diff --git a/libsrc/Wi/http_auth.sql b/libsrc/Wi/http_auth.sql
index 4059a20..8309d52 100644
--- a/libsrc/Wi/http_auth.sql
+++ b/libsrc/Wi/http_auth.sql
@@ -1,12 +1,12 @@
 --
---  $Id: http_auth.sql,v 1.3.2.2 2009/04/18 21:55:11 source Exp $
+--  $Id: http_auth.sql,v 1.3.2.4 2012/03/08 12:55:34 source Exp $
 --
 --  Authenticate against names and passwords in SYS_USERS, using HP_SECURITY for level
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -58,9 +58,9 @@ DB.DBA.HP_AUTH_SQL_USER (in realm varchar)
 
       select U_NAME, U_PASSWORD, U_GROUP, U_ID
 	into _u_name, _u_password, _u_group, _u_id from DB.DBA.SYS_USERS
-	where U_NAME = _user;
+	where U_NAME = _user and U_ACCOUNT_DISABLED = 0 and U_SQL_ENABLE = 1 and U_IS_ROLE = 0;
 
-      if (0 = _u_group and 1 = DB.DBA.vsp_auth_verify_pass (auth, _u_name,
+      if (1 = DB.DBA.vsp_auth_verify_pass (auth, _u_name,
 					       get_keyword ('realm', auth, ''),
 					       get_keyword ('uri', auth, ''),
 					       get_keyword ('nonce', auth, ''),
@@ -69,6 +69,7 @@ DB.DBA.HP_AUTH_SQL_USER (in realm varchar)
 					       get_keyword ('qop', auth, ''),
 					       _u_password))
 	{
+	  connection_set ('SPARQLUserId', _u_name);
 	  if (http_map_get ('persist_ses_vars'))
 	    {
 	      declare vars any;
diff --git a/libsrc/Wi/http_client.c b/libsrc/Wi/http_client.c
index 36be292..2b27d07 100644
--- a/libsrc/Wi/http_client.c
+++ b/libsrc/Wi/http_client.c
@@ -1,14 +1,14 @@
 /*
  *  http_client.c
  *
- *  $Id: http_client.c,v 1.19.2.18 2010/06/25 16:41:24 source Exp $
+ *  $Id: http_client.c,v 1.19.2.22 2012/03/08 12:55:34 source Exp $
  *
  *  HTTP client for Virtuoso
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1150,6 +1150,7 @@ http_cli_parse_resp_hdr (http_cli_ctx * ctx, char* hdr, int num_chars)
   if (!strnicmp ("Content-Length:", hdr, 15))
     {
       ctx->hcctx_resp_content_length = atol (hdr + 15);
+      ctx->hcctx_resp_content_len_recd = 1;
 
       if (ctx->hcctx_resp_content_length < 0)
 	{
@@ -1275,7 +1276,7 @@ http_cli_read_resp_body (http_cli_ctx * ctx)
   if (F_ISSET (ctx, HC_F_BODY_READ)) return (HC_RET_OK);
   ctx->hcctx_state = HC_STATE_READ_RESP_BODY;
 
-  if (!ctx->hcctx_resp_content_length && !ctx->hcctx_is_chunked && !ctx->hcctx_close)
+  if (!ctx->hcctx_resp_content_length && !ctx->hcctx_is_chunked && (!ctx->hcctx_close || ctx->hcctx_resp_content_len_recd))
     return (HC_RET_OK);
 
   if (ctx->hcctx_method == HC_METHOD_HEAD || ctx->hcctx_respcode == 304)
@@ -1951,7 +1952,16 @@ http_cli_std_handle_redir (http_cli_ctx * ctx, caddr_t parm, caddr_t ret_val, ca
   ctx->hcctx_url = url;
   ctx->hcctx_host = http_cli_get_host_from_url (url);
   ctx->hcctx_uri = http_cli_get_uri_from_url (url);
-
+  if (!strnicmp (url, "https://", 8) && !ctx->hcctx_pkcs12_file)
+    {
+      http_cli_ssl_cert (ctx, (caddr_t)"1");
+      ctx->hcctx_ssl_insecure = '\1';
+      RELEASE (ctx->hcctx_proxy.hcp_proxy);
+    }
+  else
+    {
+      ctx->hcctx_pkcs12_file = NULL;
+    }
   ctx->hcctx_redirects --;
   ctx->hcctx_retry_count = 0;
   F_SET (ctx, HC_F_RETRY);
@@ -2146,6 +2156,7 @@ http_cli_req_init (http_cli_ctx * ctx)
       ctx->hcctx_is_chunked = 0;
       ctx->hcctx_respcode = 0;
       ctx->hcctx_resp_content_length = 0;
+      ctx->hcctx_resp_content_len_recd = 0;
     }
   return (HC_RET_OK);
 }
@@ -2179,6 +2190,7 @@ http_cli_resp_reset (http_cli_ctx * ctx)
   ctx->hcctx_is_chunked = 0;
   ctx->hcctx_respcode = 0;
   ctx->hcctx_resp_content_length = 0;
+  ctx->hcctx_resp_content_len_recd = 0;
 }
 
 HC_RET
@@ -2716,16 +2728,30 @@ init_acl_set (char *acl_string1, dk_set_t * acl_set_ptr)
     }
 }
 
+/*
+   HTTP client
+   http_get
+   1 - URL
+   2 - variable to return response headers
+   3 - HTTP method string
+   4 - request header line(s)
+   5 - request body
+   6 - proxy address
+   7 - number of HTTP redirects to follow
+   8 - time-out (seconds)
+*/
+
 caddr_t
 bif_http_get (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   char * me = "http_get";
   caddr_t uri = bif_string_or_uname_arg (qst, args, 0, me);
-  int n_args = BOX_ELEMENTS (args), follow_redirects = 0;
+  int n_args = BOX_ELEMENTS (args), follow_redirects = 0, to_is_null = 1;
   caddr_t method = NULL;
   caddr_t header = NULL;
   caddr_t body = NULL;
   caddr_t volatile proxy = NULL;
+  uint32 to = 0;
 
   if (n_args > 2)
     method = bif_string_or_uname_arg (qst, args, 2, me);
@@ -2744,12 +2770,14 @@ bif_http_get (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     }
   if (n_args > 5)
     proxy = bif_string_or_null_arg (qst, args, 5, me);
-  if (BOX_ELEMENTS (args) > 6) /* follow redirects */
+  if (n_args > 6) /* follow redirects */
     {
       int dummy = 0;
       follow_redirects = (int) bif_long_or_null_arg (qst, args, 6, me, &dummy);
     }
-  return bif_http_client_impl (qst, err_ret, args, me, uri, NULL, NULL, method, header, body, NULL, NULL, 0, 1 /*no timeout*/, proxy, NULL, 0, 1, follow_redirects);
+  if (n_args > 7) /* time-out */
+    to = (uint32) bif_long_or_null_arg (qst, args, 7, me, &to_is_null);
+  return bif_http_client_impl (qst, err_ret, args, me, uri, NULL, NULL, method, header, body, NULL, NULL, to, to_is_null, proxy, NULL, 0, 1, follow_redirects);
 }
 
 void
diff --git a/libsrc/Wi/http_client.h b/libsrc/Wi/http_client.h
index 9d15bca..71852a4 100644
--- a/libsrc/Wi/http_client.h
+++ b/libsrc/Wi/http_client.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: http_client.h,v 1.5.2.5 2010/06/25 16:41:24 source Exp $
+ *  $Id: http_client.h,v 1.5.2.7 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -188,6 +188,7 @@ typedef struct http_cli_ctx_s
   dk_session_t *    hcctx_prv_req_hdrs;
   dk_session_t *    hcctx_req_body;
   char		    hcctx_resp_content_is_strses;
+  char		    hcctx_resp_content_len_recd;
   long              hcctx_resp_content_length;
   caddr_t           hcctx_response;
   dk_set_t          hcctx_resp_hdrs;
diff --git a/libsrc/Wi/information_schema.sql b/libsrc/Wi/information_schema.sql
index 4fc439d..9713b1c 100644
--- a/libsrc/Wi/information_schema.sql
+++ b/libsrc/Wi/information_schema.sql
@@ -1,14 +1,14 @@
 --
 --  information schema.sql
 --
---  $Id: information_schema.sql,v 1.10 2009/01/19 09:02:33 source Exp $
+--  $Id: information_schema.sql,v 1.10.2.1 2012/03/08 12:55:34 source Exp $
 --
 --  INFORMATION schema support
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/insert.c b/libsrc/Wi/insert.c
index f79472c..7485ba8 100644
--- a/libsrc/Wi/insert.c
+++ b/libsrc/Wi/insert.c
@@ -1,14 +1,14 @@
 /*
  *  insert.c
  *
- *  $Id: insert.c,v 1.19.2.11 2010/11/09 10:59:15 source Exp $
+ *  $Id: insert.c,v 1.19.2.12 2012/03/08 12:55:34 source Exp $
  *
  *  Insert
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/inxop.c b/libsrc/Wi/inxop.c
index 85d5582..171386c 100644
--- a/libsrc/Wi/inxop.c
+++ b/libsrc/Wi/inxop.c
@@ -1,14 +1,14 @@
 /*
  *  inxop.c
  *
- *  $Id: inxop.c,v 1.21.2.4 2010/08/26 18:03:48 source Exp $
+ *  $Id: inxop.c,v 1.21.2.5 2012/03/08 12:55:34 source Exp $
  *
  *  SQL query execution
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/iodbcinst.c b/libsrc/Wi/iodbcinst.c
index 476be70..7303845 100644
--- a/libsrc/Wi/iodbcinst.c
+++ b/libsrc/Wi/iodbcinst.c
@@ -1,7 +1,7 @@
 /*
  *  iodbcinst.c
  *
- *  $Id: iodbcinst.c,v 1.4.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: iodbcinst.c,v 1.4.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  Minimum set of ODBC Installer code to allow Virtuoso to edit odbc.ini
  *  udbc.ini and odbcinst.ini files
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/iodbcinst.h b/libsrc/Wi/iodbcinst.h
index faf39ad..1b2a42b 100644
--- a/libsrc/Wi/iodbcinst.h
+++ b/libsrc/Wi/iodbcinst.h
@@ -1,13 +1,13 @@
 /*
  *  iodbcinst.h
  *
- *  $Id: iodbcinst.h,v 1.4 2009/04/09 13:22:12 source Exp $
+ *  $Id: iodbcinst.h,v 1.4.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  iODBC Installer defines
  *
  *  The iODBC driver manager.
  *
- *  Copyright (C) 1999 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
diff --git a/libsrc/Wi/jso.c b/libsrc/Wi/jso.c
index e1927c4..cd787a9 100644
--- a/libsrc/Wi/jso.c
+++ b/libsrc/Wi/jso.c
@@ -1,12 +1,12 @@
 /*
  *  jso.c
  *
- *  $Id: jso.c,v 1.21.2.2 2009/04/18 21:55:12 source Exp $
+ *  $Id: jso.c,v 1.21.2.4 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -231,6 +231,19 @@ bif_jso_delete (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     case JSO_STATUS_NEW: break;
     default: goto end_delete_private_members; /* see below */
     }
+#ifndef NDEBUG
+  for (fld_ctr = cd->_.sd.jsosd_field_count; fld_ctr--; /*no step*/)
+    {
+      jso_field_descr_t *fldd = cd->_.sd.jsosd_field_list + fld_ctr;
+      jso_class_descr_t *fld_type_cd = gethash (fldd->jsofd_type, jso_classes);
+      jso_rtti_t *sub = (jso_rtti_t *)(JSO_FIELD_PTR (inst, fldd)[0]);
+      if ((JSO_PRIVATE == fldd->jsofd_required) && (NULL != sub))
+        {
+          if ((NULL == fld_type_cd) && (DV_CUSTOM != DV_TYPE_OF (sub)))
+            dk_check_tree (sub);
+        }
+    }
+#endif
   for (fld_ctr = cd->_.sd.jsosd_field_count; fld_ctr--; /*no step*/)
     {
       jso_field_descr_t *fldd = cd->_.sd.jsosd_field_list + fld_ctr;
diff --git a/libsrc/Wi/jso.h b/libsrc/Wi/jso.h
index 1020124..49d2504 100644
--- a/libsrc/Wi/jso.h
+++ b/libsrc/Wi/jso.h
@@ -1,12 +1,12 @@
 /*
  *  jso.h
  *
- *  $Id: jso.h,v 1.12.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: jso.h,v 1.12.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/jso_reformat.awk b/libsrc/Wi/jso_reformat.awk
index 26b79fb..3ffb643 100644
--- a/libsrc/Wi/jso_reformat.awk
+++ b/libsrc/Wi/jso_reformat.awk
@@ -1,14 +1,14 @@
 #
 #  jso_metameta.awk
 #
-#  $Id: jso_reformat.awk,v 1.8.2.1 2009/04/18 21:55:12 source Exp $
+#  $Id: jso_reformat.awk,v 1.8.2.2 2012/03/08 12:55:34 source Exp $
 #
 #  Embeds SQL code into a C file
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/json.l b/libsrc/Wi/json.l
index 9302cd3..b54fe36 100644
--- a/libsrc/Wi/json.l
+++ b/libsrc/Wi/json.l
@@ -1,10 +1,10 @@
 /*
- *  $Id: json.l,v 1.5.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: json.l,v 1.5.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/json.y b/libsrc/Wi/json.y
index c279278..5dcbc50 100644
--- a/libsrc/Wi/json.y
+++ b/libsrc/Wi/json.y
@@ -1,10 +1,10 @@
 /*
- *  $Id: json.y,v 1.9.2.2 2009/04/18 21:55:12 source Exp $
+ *  $Id: json.y,v 1.9.2.3 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/json_l.c b/libsrc/Wi/json_l.c
index 0ed047e..5492db5 100644
--- a/libsrc/Wi/json_l.c
+++ b/libsrc/Wi/json_l.c
@@ -543,12 +543,12 @@ static int yy_more_len = 0;
 char *jsonyytext;
 #line 1 "./json.l"
 /*
- *  $Id: json.l,v 1.5.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: json.l,v 1.5.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/json_p.c b/libsrc/Wi/json_p.c
index 56de9ee..1d87d34 100644
--- a/libsrc/Wi/json_p.c
+++ b/libsrc/Wi/json_p.c
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -93,7 +92,7 @@ int json_line;
 
 
 /* Line 189 of yacc.c  */
-#line 97 "json_p.c"
+#line 96 "json_p.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -163,7 +162,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 167 "json_p.c"
+#line 166 "json_p.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -175,7 +174,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 179 "json_p.c"
+#line 178 "json_p.c"
 
 #ifdef short
 # undef short
@@ -225,7 +224,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -586,9 +585,18 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -645,7 +653,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -1384,21 +1392,21 @@ yyreduce:
     {
         case 2:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 71 "./json.y"
     { json_tree = (caddr_t *) (yyvsp[(1) - (1)].box); }
     break;
 
   case 3:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 72 "./json.y"
     { json_tree = (caddr_t *) (yyvsp[(1) - (1)].box); }
     break;
 
   case 4:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 75 "./json.y"
     {
        					(yyval.box) = (caddr_t)t_list_to_array (
@@ -1415,35 +1423,35 @@ yyreduce:
 
   case 5:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 89 "./json.y"
     { (yyval.set) = NULL; }
     break;
 
   case 7:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 93 "./json.y"
     { (yyval.set) = (yyvsp[(1) - (1)].set); }
     break;
 
   case 8:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 94 "./json.y"
     { (yyval.set) = t_NCONC ((yyvsp[(1) - (3)].set), (yyvsp[(3) - (3)].set)); }
     break;
 
   case 9:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 95 "./json.y"
     { jsonyyerror ("pair of field name and value is expected after ','"); }
     break;
 
   case 10:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 99 "./json.y"
     {
      		dk_set_t set = NULL;
@@ -1454,106 +1462,106 @@ yyreduce:
 
   case 11:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 104 "./json.y"
     { jsonyyerror ("value is expected after ':'"); }
     break;
 
   case 12:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 105 "./json.y"
     { jsonyyerror ("colon is expected after field name"); }
     break;
 
   case 13:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 110 "./json.y"
     { (yyval.box) = (caddr_t)t_list_to_array ((yyvsp[(2) - (3)].set));}
     break;
 
   case 14:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 114 "./json.y"
     { (yyval.set) = NULL; }
     break;
 
   case 16:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 119 "./json.y"
     { (yyval.set) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 17:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 120 "./json.y"
     { (yyval.set) = t_NCONC ((yyvsp[(1) - (3)].set), t_CONS((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 18:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 121 "./json.y"
     { jsonyyerror ("array member is expected after ','"); }
     break;
 
   case 19:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 125 "./json.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 20:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 126 "./json.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 21:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 127 "./json.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
   case 22:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 128 "./json.y"
     { (yyval.box) = t_box_num (0); }
     break;
 
   case 23:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 129 "./json.y"
     { (yyval.box) = t_alloc_box (0, DV_DB_NULL); }
     break;
 
   case 24:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 130 "./json.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 25:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 131 "./json.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
 
 
-/* Line 1455 of yacc.c  */
-#line 1557 "json_p.c"
+/* Line 1464 of yacc.c  */
+#line 1565 "json_p.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1764,7 +1772,7 @@ yyreturn:
 
 
 
-/* Line 1675 of yacc.c  */
+/* Line 1684 of yacc.c  */
 #line 134 "./json.y"
 
 
diff --git a/libsrc/Wi/json_p.h b/libsrc/Wi/json_p.h
index 18450f0..a0e38b5 100644
--- a/libsrc/Wi/json_p.h
+++ b/libsrc/Wi/json_p.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -72,7 +71,7 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
+/* Line 1685 of yacc.c  */
 #line 39 "./json.y"
 
   caddr_t box;
@@ -81,8 +80,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1676 of yacc.c  */
-#line 86 "json_p.h"
+/* Line 1685 of yacc.c  */
+#line 85 "json_p.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/libsrc/Wi/ksrvext.h b/libsrc/Wi/ksrvext.h
index bb9a25d..c89135f 100644
--- a/libsrc/Wi/ksrvext.h
+++ b/libsrc/Wi/ksrvext.h
@@ -1,14 +1,14 @@
 /*
  *  ksrvext.h
  *
- *  $Id: ksrvext.h,v 1.9.2.6 2010/11/26 10:46:33 source Exp $
+ *  $Id: ksrvext.h,v 1.9.2.7 2012/03/08 12:55:34 source Exp $
  *
  *  Virtuoso Server Extension API
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/ksrvextphp.h b/libsrc/Wi/ksrvextphp.h
index d56c10a..68d6bae 100644
--- a/libsrc/Wi/ksrvextphp.h
+++ b/libsrc/Wi/ksrvextphp.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: ksrvextphp.h,v 1.7.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: ksrvextphp.h,v 1.7.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/lisprdr.c b/libsrc/Wi/lisprdr.c
index 77f2984..07ee14b 100644
--- a/libsrc/Wi/lisprdr.c
+++ b/libsrc/Wi/lisprdr.c
@@ -1,14 +1,14 @@
 /*
  *  lisprdr.c
  *
- *  $Id: lisprdr.c,v 1.3.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: lisprdr.c,v 1.3.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  Reader for lisp expressions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/lisprdr.h b/libsrc/Wi/lisprdr.h
index d0dd4bd..3e548fe 100644
--- a/libsrc/Wi/lisprdr.h
+++ b/libsrc/Wi/lisprdr.h
@@ -1,14 +1,14 @@
 /*
  *  lisprdr.h
  *
- *  $Id: lisprdr.h,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: lisprdr.h,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  Lisp Reader
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/list2.h b/libsrc/Wi/list2.h
index 06fccab..2c0c473 100644
--- a/libsrc/Wi/list2.h
+++ b/libsrc/Wi/list2.h
@@ -1,14 +1,14 @@
 /*
  *  list2.h
  *
- *  $Id: list2.h,v 1.4.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: list2.h,v 1.4.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  Doubly linked list
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/list_lex_props.sh b/libsrc/Wi/list_lex_props.sh
index cbf458a..df7e080 100755
--- a/libsrc/Wi/list_lex_props.sh
+++ b/libsrc/Wi/list_lex_props.sh
@@ -1,11 +1,11 @@
 #!/bin/bash
 #
-#  $Id: list_lex_props.sh,v 1.4.2.1 2009/04/18 21:55:12 source Exp $
+#  $Id: list_lex_props.sh,v 1.4.2.2 2012/03/08 12:55:34 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/lock.c b/libsrc/Wi/lock.c
index 11aabd8..942b501 100644
--- a/libsrc/Wi/lock.c
+++ b/libsrc/Wi/lock.c
@@ -1,14 +1,14 @@
 /*
  *  lock.c
  *
- *  $Id: lock.c,v 1.20.2.20 2011/03/23 12:25:08 source Exp $
+ *  $Id: lock.c,v 1.20.2.22 2012/03/08 12:55:34 source Exp $
  *
  *  Locking concurrency control
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -474,6 +474,8 @@ lt_done (lock_trx_t * lt)
   {
     int64 plt = 0;
     int inx;
+    if (local_cll.cll_id_to_trx)
+      gethash_64 (plt, lt->lt_trx_no, local_cll.cll_id_to_trx);
     if (plt)
       GPF_T1 ("lt in id to trx  at lt_done");
     for (inx = 0; inx < trx_rc->rc_fill; inx++)
@@ -667,22 +669,27 @@ lt_rollback_1 (lock_trx_t * lt, int free_trx)
 void
 lt_ack_freeze_inner (lock_trx_t * lt)
 {
-
+  du_thread_t *self = THREAD_CURRENT_THREAD;
   ASSERT_IN_TXN;
   /* Can be called from lt_leave, no itc and bufs but must ack for cpt to proceed */
   lt->lt_status = LT_FREEZE;
   lt->lt_error = LTE_OK;
-  LT_CLOSE_ACK_THREADS(lt);
+  LT_CLOSE_ACK_THREADS (lt);
   lt->lt_close_ack_threads = 1;
   lt_resume_waiting_end (lt);
-  lt_wait_checkpoint();
-  LT_CLOSE_ACK_THREADS(lt);
-  lt->lt_close_ack_threads = 0;
+  self->thr_lt = lt;
+  lt_wait_checkpoint ();
+  self->thr_lt = NULL;
   if (LT_FREEZE == lt->lt_status)
-    lt->lt_status = LT_PENDING;
+    {
+      LT_CLOSE_ACK_THREADS (lt);
+      lt->lt_close_ack_threads = 0;
+      lt->lt_status = LT_PENDING;
+    }
 }
 
 
+
 void
 lt_ack_freeze (lock_trx_t * lt, it_cursor_t * itc, buffer_desc_t ** buf_ret)
 {
diff --git a/libsrc/Wi/log.c b/libsrc/Wi/log.c
index fffde7e..d3174e9 100644
--- a/libsrc/Wi/log.c
+++ b/libsrc/Wi/log.c
@@ -1,14 +1,14 @@
 /*
  *  log.c
  *
- *  $Id: log.c,v 1.16.2.21 2011/01/25 18:54:23 source Exp $
+ *  $Id: log.c,v 1.16.2.24 2012/03/08 12:55:34 source Exp $
  *
  *  Transaction log write and recovery
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -159,6 +159,18 @@ log_set_server_version_check (int in_txn)
 
   sprintf (tmp, "server_version_check ('%s')", DBMS_SRV_VER);
   log_set_compatibility_check (in_txn, tmp);
+  if (wi_inst.wi_master->dbs_id[0])
+    {
+      int inx;
+      char hex[33];
+      for (inx = 0; inx < sizeof (wi_inst.wi_master->dbs_id); inx ++)
+	{
+	  sprintf (hex + (inx * 2), "%02x", (unsigned char) (wi_inst.wi_master->dbs_id[inx]));
+	}
+      hex[32] = 0;
+      sprintf (tmp, "server_id_check ('%s')", hex);
+      log_set_compatibility_check (in_txn, tmp);
+    }
 }
 
 
@@ -1409,7 +1421,7 @@ log_replay_text (lock_trx_t * lt, dk_session_t * in, int is_pushback, int use_st
 cr_done:
   if (use_stmt_cache)
     {
-      sst = cli_get_stmt_access (lt->lt_client, stmt_id, GET_EXCLUSIVE);
+      sst = cli_get_stmt_access (lt->lt_client, stmt_id, GET_EXCLUSIVE, NULL);
       err = stmt_set_query (sst, lt->lt_client, text, opts);
       LEAVE_CLIENT (lt->lt_client);
       if (err != NULL)
diff --git a/libsrc/Wi/log.h b/libsrc/Wi/log.h
index 20290a1..b334fbb 100644
--- a/libsrc/Wi/log.h
+++ b/libsrc/Wi/log.h
@@ -1,12 +1,12 @@
 /*
  *  log.h
  *
- *  $Id: log.h,v 1.5.2.3 2010/05/12 12:24:29 source Exp $
+ *  $Id: log.h,v 1.5.2.4 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/ltrx.h b/libsrc/Wi/ltrx.h
index fbf463b..350a74c 100644
--- a/libsrc/Wi/ltrx.h
+++ b/libsrc/Wi/ltrx.h
@@ -1,14 +1,14 @@
 /*
  *  ltrx.h
  *
- *  $Id: ltrx.h,v 1.14.2.9 2010/03/07 08:20:46 source Exp $
+ *  $Id: ltrx.h,v 1.14.2.11 2012/03/08 12:55:34 source Exp $
  *
  *  Locking transaction structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -323,7 +323,7 @@ typedef struct lock_wait_s {
   ((page_lock_t *) gethash (DP_ADDR2VOID (dp), &IT_DP_MAP (it, dp)->itm_locks))
 
 #define LT_NAME(lt) \
-  (snprintf (lt->lt_name, sizeof (lt->lt_name), "%5d:%10ld", QFID_HOST (lt->lt_w_id), (long)lt->lt_w_id), lt->lt_name)
+  (snprintf (lt->lt_name, sizeof (lt->lt_name), "%d:%u", QFID_HOST (lt->lt_w_id), (uint32)(0xffffffff & (lt)->lt_w_id) ), lt->lt_name)
 
 #define LT_IS_TIMED_OUT(lt) \
   (lt->lt_started && approx_msec_real_time () - lt->lt_started > lt->lt_timeout)
diff --git a/libsrc/Wi/mail_cli.sql b/libsrc/Wi/mail_cli.sql
index a089f86..b90f993 100644
--- a/libsrc/Wi/mail_cli.sql
+++ b/libsrc/Wi/mail_cli.sql
@@ -1,14 +1,14 @@
 --
 --  mail_cli.sql
 --
---  $Id: mail_cli.sql,v 1.2.2.2 2009/04/18 21:55:12 source Exp $
+--  $Id: mail_cli.sql,v 1.2.2.3 2012/03/08 12:55:34 source Exp $
 --
 --  Virtuoso mail client function support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/map_schema.c b/libsrc/Wi/map_schema.c
index b018689..8d04cda 100644
--- a/libsrc/Wi/map_schema.c
+++ b/libsrc/Wi/map_schema.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: map_schema.c,v 1.4.2.2 2010/02/18 10:57:16 source Exp $
+ *  $Id: map_schema.c,v 1.4.2.3 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/map_schema.h b/libsrc/Wi/map_schema.h
index a92d4fe..7a3149d 100644
--- a/libsrc/Wi/map_schema.h
+++ b/libsrc/Wi/map_schema.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: map_schema.h,v 1.3.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: map_schema.h,v 1.3.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/meta.c b/libsrc/Wi/meta.c
index 1917027..3d63ee0 100644
--- a/libsrc/Wi/meta.c
+++ b/libsrc/Wi/meta.c
@@ -1,14 +1,14 @@
 /*
  *  meta.c
  *
- *  $Id: meta.c,v 1.17.2.8 2010/07/19 06:59:14 source Exp $
+ *  $Id: meta.c,v 1.17.2.10 2012/03/08 12:55:34 source Exp $
  *
  *  META
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2317,7 +2317,22 @@ isp_read_schema (lock_trx_t * lt)
 	    col_default = itc_box_column (itc_cols, buf_cols,
 		CI_COLS_DEFAULT, NULL);
 	    if (DV_TYPE_OF (col_default) == DV_SHORT_STRING || DV_TYPE_OF (col_default) == DV_LONG_STRING)
-	      col->col_default = box_deserialize_string (col_default, 0, 0);
+	      {
+		caddr_t def, err_ret = NULL;
+		col->col_default = def = box_deserialize_string (col_default, 0, 0);
+		if (dtp != DV_TYPE_OF (def) && DV_TYPE_OF (def) != DV_DB_NULL)
+		  {
+		    def = box_cast_to (NULL, def, DV_TYPE_OF (def), dtp, NUMERIC_MAX_PRECISION, NUMERIC_MAX_SCALE, &err_ret);
+		    dk_free_tree (col->col_default);
+		    if (!err_ret)
+		      col->col_default = def;
+		    else
+		      {
+			col->col_default = dk_alloc_box (0, DV_DB_NULL);
+			dk_free_tree (err_ret);
+		      }
+		  }
+	      }
 	    else
 	      col->col_default = dk_alloc_box (0, DV_DB_NULL);
 	    dk_free_tree (col_default);
@@ -2569,6 +2584,7 @@ qi_read_table_schema_1 (query_instance_t * qi, char *read_tb, dbe_schema_t * sc)
       dtp_t dtp = (dtp_t) unbox_or_null (lc_nth_col (lc, 3));
       dbe_table_t *tb = sch_name_to_table (sc, tb_name);
       dbe_column_t *col;
+      caddr_t def;
 
       if (!tb)
 	{
@@ -2582,7 +2598,20 @@ qi_read_table_schema_1 (query_instance_t * qi, char *read_tb, dbe_schema_t * sc)
       col->col_scale = (char) unbox_or_null (lc_nth_col (lc, 5));
       col->col_non_null = (1 == unbox_or_null (lc_nth_col (lc, 6)));
       col->col_check = box_copy (lc_nth_col (lc, 7));
-      col->col_default = box_copy_tree (lc_nth_col (lc, 8));
+      col->col_default = def = box_copy_tree (lc_nth_col (lc, 8));
+      if (dtp != DV_TYPE_OF (def) && DV_TYPE_OF (def) != DV_DB_NULL)
+	{
+	  caddr_t err_ret = NULL;
+	  def = box_cast_to (NULL, def, DV_TYPE_OF (def), dtp, NUMERIC_MAX_PRECISION, NUMERIC_MAX_SCALE, &err_ret);
+	  dk_free_tree (col->col_default);
+	  if (!err_ret)
+	    col->col_default = def;
+	  else /* cannot cast and too late */
+	    {
+	      col->col_default = dk_alloc_box (0, DV_DB_NULL);
+	      dk_free_tree (err_ret);
+	    }
+	}
       col->col_options = (caddr_t *) box_copy_tree (lc_nth_col (lc, 9));
       dbe_column_parse_options (col);
       dbe_col_load_stats (qi->qi_client, qi, tb, col);
diff --git a/libsrc/Wi/msdtc.h b/libsrc/Wi/msdtc.h
index 8ff848d..9d5e30e 100644
--- a/libsrc/Wi/msdtc.h
+++ b/libsrc/Wi/msdtc.h
@@ -1,12 +1,12 @@
 /*
  *  hosting.h
  *
- *  $Id: msdtc.h,v 1.3.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: msdtc.h,v 1.3.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mts.h b/libsrc/Wi/mts.h
index fa2c4e5..4d74799 100644
--- a/libsrc/Wi/mts.h
+++ b/libsrc/Wi/mts.h
@@ -1,14 +1,14 @@
 /*
  *  mts.h
  *
- *  $Id: mts.h,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: mts.h,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  MTS related functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mts_client.c b/libsrc/Wi/mts_client.c
index 9821d13..1483bbe 100644
--- a/libsrc/Wi/mts_client.c
+++ b/libsrc/Wi/mts_client.c
@@ -1,12 +1,12 @@
 /*
  *  mts_client.c
  *
- *  $Id: mts_client.c,v 1.7.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: mts_client.c,v 1.7.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mts_client.h b/libsrc/Wi/mts_client.h
index 71327ea..03badca 100644
--- a/libsrc/Wi/mts_client.h
+++ b/libsrc/Wi/mts_client.h
@@ -1,12 +1,12 @@
 /*
  *  mts_client.h
  *
- *  $Id: mts_client.h,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: mts_client.h,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mts_com.cpp b/libsrc/Wi/mts_com.cpp
index 133ef97..387a522 100644
--- a/libsrc/Wi/mts_com.cpp
+++ b/libsrc/Wi/mts_com.cpp
@@ -1,14 +1,14 @@
 /*
  *  mts_com.cpp
  *
- *  $Id: mts_com.cpp,v 1.1.1.1.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: mts_com.cpp,v 1.1.1.1.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  MS DTC support
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mts_com.h b/libsrc/Wi/mts_com.h
index 85df3fe..194062e 100644
--- a/libsrc/Wi/mts_com.h
+++ b/libsrc/Wi/mts_com.h
@@ -1,12 +1,12 @@
 /*
  *  mts_com.h
  *
- *  $Id: mts_com.h,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: mts_com.h,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mtwrite.c b/libsrc/Wi/mtwrite.c
index d2c18bd..14b3872 100644
--- a/libsrc/Wi/mtwrite.c
+++ b/libsrc/Wi/mtwrite.c
@@ -1,14 +1,14 @@
 /*
  *  mtwrite.c
  *
- *  $Id: mtwrite.c,v 1.8.2.8 2010/03/08 12:04:12 source Exp $
+ *  $Id: mtwrite.c,v 1.8.2.9 2012/03/08 12:55:34 source Exp $
  *
  *  Manages buffer rings and paging to disk.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/mtx.cpp b/libsrc/Wi/mtx.cpp
index 6bdeb0d..cdf0969 100644
--- a/libsrc/Wi/mtx.cpp
+++ b/libsrc/Wi/mtx.cpp
@@ -1,14 +1,14 @@
 /*
  *  mtx.cpp
  *
- *  $Id: mtx.cpp,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: mtx.cpp,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  MS DTC support
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/multibyte.c b/libsrc/Wi/multibyte.c
index 6dce82a..860d699 100644
--- a/libsrc/Wi/multibyte.c
+++ b/libsrc/Wi/multibyte.c
@@ -1,12 +1,12 @@
 /*
  *  multibyte.c
  *
- *  $Id: multibyte.c,v 1.9.2.4 2010/01/12 12:19:47 source Exp $
+ *  $Id: multibyte.c,v 1.9.2.6 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -261,7 +261,7 @@ box_read_long_wide_string (dk_session_t *session, dtp_t macro)
 
 
 size_t
-wide_char_length_of_utf8_string (unsigned char *str, size_t utf8_length)
+wide_char_length_of_utf8_string (const unsigned char *str, size_t utf8_length)
 {
   virt_mbstate_t state;
   memset (&state, 0, sizeof (virt_mbstate_t));
@@ -355,6 +355,20 @@ virt_wcsstr (const wchar_t *wcs, const wchar_t *wc)
   return NULL;
 }
 
+wchar_t *
+virt_wcsrstr (const wchar_t *wcs, const wchar_t *wc)
+{
+  size_t len;
+  const wchar_t *cp;
+  const wchar_t *ep;
+
+  len = virt_wcslen (wc);
+  for (cp = wcs + virt_wcslen (wcs) - len; cp >= wcs; --cp)
+    if (*cp == *wc && !virt_wcsncmp (cp, wc, len))
+      return (wchar_t *) cp;
+
+  return NULL;
+}
 
 static unsigned char
 cli_wchar_to_char (wchar_t src, wcharset_t *charset)
diff --git a/libsrc/Wi/multibyte.h b/libsrc/Wi/multibyte.h
index b224e2c..aa79292 100644
--- a/libsrc/Wi/multibyte.h
+++ b/libsrc/Wi/multibyte.h
@@ -1,12 +1,12 @@
 /*
  *  multibyte.h
  *
- *  $Id: multibyte.h,v 1.9.2.3 2010/01/12 12:19:47 source Exp $
+ *  $Id: multibyte.h,v 1.9.2.6 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,11 @@
 
 #include "libutil.h"
 
+#ifndef UTF8CHAR_DEFINED
+#define UTF8CHAR_DEFINED
+typedef unsigned char utf8char;
+#endif
+
 typedef struct wcharset_s {
   char chrs_name[100];
   wchar_t chrs_table[256];
@@ -47,6 +52,7 @@ size_t virt_wcsrtombs (unsigned char *dst, wchar_t **src, size_t len, virt_mbsta
 wchar_t *virt_wcschr (const wchar_t *__wcs, wchar_t __wc);
 wchar_t *virt_wcsrchr (const wchar_t *__wcs, wchar_t __wc);
 wchar_t *virt_wcsstr (const wchar_t *__wcs, const wchar_t *__wc);
+wchar_t *virt_wcsrstr (const wchar_t *__wcs, const wchar_t *__wc);
 size_t virt_wcslen (const wchar_t *__wcs);
 int virt_wcsncmp (const wchar_t *from, const wchar_t *to, size_t len);
 
@@ -69,7 +75,7 @@ wchar_t *virt_wcsdup(const wchar_t *s);
 int virt_wcscasecmp(const wchar_t *s1, const wchar_t *s2);
 
 /* long blob_fill_buffer_from_wide_string (caddr_t bh, caddr_t buf, int *at_end, long *char_len); moved to blob.c as static and excluded */
-size_t wide_char_length_of_utf8_string (unsigned char *str, size_t utf8_length);
+size_t wide_char_length_of_utf8_string (const unsigned char *str, size_t utf8_length);
 
 struct query_instance_s;
 extern wcharset_t *wcharset_by_name_or_dflt (ccaddr_t cs_name, struct query_instance_s *qi);
@@ -95,6 +101,9 @@ size_t wide_as_utf8_len (caddr_t _wide);
 caddr_t box_wide_string (const wchar_t *wstr);
 caddr_t box_wide_nchars (const wchar_t *wstr, size_t len);
 
+extern wcharset_t *charset_native_for_box (ccaddr_t box, int expected_bf_if_zero);
+
+
 #ifdef UTF8_DEBUG
 #define ASSERT_BOX_ENC_MATCHES_BF(box,expected_bf_if_zero) assert_box_enc_matches_bf (__FILE__, __LINE__, (box), (expected_bf_if_zero))
 #define ASSERT_BOX_UTF8(box) assert_box_utf8 (__FILE__, __LINE__, (box))
diff --git a/libsrc/Wi/name.c b/libsrc/Wi/name.c
index 6b012ed..af330bd 100644
--- a/libsrc/Wi/name.c
+++ b/libsrc/Wi/name.c
@@ -1,12 +1,12 @@
 /*
  *  name.c
  *
- *  $Id: name.c,v 1.2.2.2 2010/02/18 10:57:16 source Exp $
+ *  $Id: name.c,v 1.2.2.3 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/neodisk.c b/libsrc/Wi/neodisk.c
index a3a2f01..5f2731d 100644
--- a/libsrc/Wi/neodisk.c
+++ b/libsrc/Wi/neodisk.c
@@ -1,14 +1,14 @@
 /*
  *  neodisk.c
  *
- *  $Id: neodisk.c,v 1.19.2.21 2011/02/25 17:31:18 source Exp $
+ *  $Id: neodisk.c,v 1.19.2.24 2012/03/08 12:55:34 source Exp $
  *
  *  Neodisk Checkpoint
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -235,6 +235,8 @@ lt_wait_checkpoint_1 (int cl_listener_also)
       LEAVE_TXN;
       semaphore_enter (self->thr_sem);
       IN_TXN;
+      if (self->thr_lt)
+	break;
     }
 }
 
@@ -254,6 +256,15 @@ cpt_over (void)
   cpt_thread = NULL;
   DO_SET (du_thread_t *, thr, &wi_inst.wi_waiting_checkpoint)
   {
+    if (thr->thr_lt)
+      {
+	lock_trx_t * lt = thr->thr_lt;
+	if (LT_FREEZE == lt->lt_status)
+	  {
+	    lt->lt_close_ack_threads = 0;
+	    lt->lt_status = LT_PENDING;
+	  }
+      }
     semaphore_leave (thr->thr_sem);
   }
   END_DO_SET();
@@ -2083,8 +2094,8 @@ srv_global_lock (query_instance_t * qi, int flag)
       lt->lt_is_excl = 1;
       lt->lt_replicate = REPL_NO_LOG;
       IN_TXN;
-      cpt_rollback (LT_KILL_ROLLBACK);
       server_lock.sl_owner = THREAD_CURRENT_THREAD;
+      cpt_rollback (LT_KILL_ROLLBACK);
       lt_threads_set_inner (lt, 1);
       LEAVE_TXN;
       server_lock.sl_ac_save = lt->lt_client->cli_row_autocommit;
diff --git a/libsrc/Wi/nn_svr.sql b/libsrc/Wi/nn_svr.sql
index 8ccb29f..3018e1f 100644
--- a/libsrc/Wi/nn_svr.sql
+++ b/libsrc/Wi/nn_svr.sql
@@ -1,10 +1,10 @@
 --
---  $Id: nn_svr.sql,v 1.7.2.2 2009/04/18 21:55:12 source Exp $
+--  $Id: nn_svr.sql,v 1.7.2.4 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -1974,8 +1974,8 @@ create procedure nntp_update_org_path_header ()
 {
   declare _org, _from varchar;
 
-  _org := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'NNTPOrganizationHeader');
-  _from := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'NNTPFromHeader');
+  _org := virtuoso_ini_item_value ('HTTPServer', 'NNTPOrganizationHeader');
+  _from := virtuoso_ini_item_value ('HTTPServer', 'NNTPFromHeader');
 
   if (_org is NULL)
    _org := '';
diff --git a/libsrc/Wi/nquad_p.c b/libsrc/Wi/nquad_p.c
index 5ef61e2..bae193a 100644
--- a/libsrc/Wi/nquad_p.c
+++ b/libsrc/Wi/nquad_p.c
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -122,7 +121,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 
 
 /* Line 189 of yacc.c  */
-#line 126 "nquad_p.c"
+#line 125 "nquad_p.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -157,43 +156,45 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
      _COMMA = 263,
      _DOT_WS = 264,
      _LBRA = 265,
-     _LPAR = 266,
-     _LSQBRA = 267,
-     _LSQBRA_RSQBRA = 268,
-     _RBRA = 269,
-     _RPAR = 270,
-     _RSQBRA = 271,
-     _SEMI = 272,
-     _EQ = 273,
-     _EQ_GT = 274,
-     _LT_EQ = 275,
-     _BANG = 276,
-     _AT_a_L = 277,
-     _AT_base_L = 278,
-     _AT_has_L = 279,
-     _AT_is_L = 280,
-     _AT_keywords_L = 281,
-     _AT_of_L = 282,
-     _AT_prefix_L = 283,
-     _AT_this_L = 284,
-     false_L = 285,
-     true_L = 286,
-     __TTL_PUNCT_END = 287,
-     __TTL_NONPUNCT_START = 288,
-     TURTLE_INTEGER = 289,
-     TURTLE_DECIMAL = 290,
-     TURTLE_DOUBLE = 291,
-     TURTLE_STRING = 292,
-     KEYWORD = 293,
-     LANGTAG = 294,
-     QNAME = 295,
-     QNAME_NS = 296,
-     VARIABLE = 297,
-     BLANK_NODE_LABEL = 298,
-     Q_IRI_REF = 299,
-     _GARBAGE_BEFORE_DOT_WS = 300,
-     TTL_RECOVERABLE_ERROR = 301,
-     __NQUAD_NONPUNCT_END = 302
+     _LBRA_TOP_TRIG = 266,
+     _LPAR = 267,
+     _LSQBRA = 268,
+     _LSQBRA_RSQBRA = 269,
+     _RBRA = 270,
+     _RPAR = 271,
+     _RSQBRA = 272,
+     _SEMI = 273,
+     _EQ = 274,
+     _EQ_TOP_TRIG = 275,
+     _EQ_GT = 276,
+     _LT_EQ = 277,
+     _BANG = 278,
+     _AT_a_L = 279,
+     _AT_base_L = 280,
+     _AT_has_L = 281,
+     _AT_is_L = 282,
+     _AT_keywords_L = 283,
+     _AT_of_L = 284,
+     _AT_prefix_L = 285,
+     _AT_this_L = 286,
+     false_L = 287,
+     true_L = 288,
+     __TTL_PUNCT_END = 289,
+     __TTL_NONPUNCT_START = 290,
+     TURTLE_INTEGER = 291,
+     TURTLE_DECIMAL = 292,
+     TURTLE_DOUBLE = 293,
+     TURTLE_STRING = 294,
+     KEYWORD = 295,
+     LANGTAG = 296,
+     QNAME = 297,
+     QNAME_NS = 298,
+     VARIABLE = 299,
+     BLANK_NODE_LABEL = 300,
+     Q_IRI_REF = 301,
+     _GARBAGE_BEFORE_DOT_WS = 302,
+     TTL_RECOVERABLE_ERROR = 303,
+     __NQUAD_NONPUNCT_END = 304
    };
 #endif
 /* Tokens.  */
@@ -205,43 +206,45 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 #define _COMMA 263
 #define _DOT_WS 264
 #define _LBRA 265
-#define _LPAR 266
-#define _LSQBRA 267
-#define _LSQBRA_RSQBRA 268
-#define _RBRA 269
-#define _RPAR 270
-#define _RSQBRA 271
-#define _SEMI 272
-#define _EQ 273
-#define _EQ_GT 274
-#define _LT_EQ 275
-#define _BANG 276
-#define _AT_a_L 277
-#define _AT_base_L 278
-#define _AT_has_L 279
-#define _AT_is_L 280
-#define _AT_keywords_L 281
-#define _AT_of_L 282
-#define _AT_prefix_L 283
-#define _AT_this_L 284
-#define false_L 285
-#define true_L 286
-#define __TTL_PUNCT_END 287
-#define __TTL_NONPUNCT_START 288
-#define TURTLE_INTEGER 289
-#define TURTLE_DECIMAL 290
-#define TURTLE_DOUBLE 291
-#define TURTLE_STRING 292
-#define KEYWORD 293
-#define LANGTAG 294
-#define QNAME 295
-#define QNAME_NS 296
-#define VARIABLE 297
-#define BLANK_NODE_LABEL 298
-#define Q_IRI_REF 299
-#define _GARBAGE_BEFORE_DOT_WS 300
-#define TTL_RECOVERABLE_ERROR 301
-#define __NQUAD_NONPUNCT_END 302
+#define _LBRA_TOP_TRIG 266
+#define _LPAR 267
+#define _LSQBRA 268
+#define _LSQBRA_RSQBRA 269
+#define _RBRA 270
+#define _RPAR 271
+#define _RSQBRA 272
+#define _SEMI 273
+#define _EQ 274
+#define _EQ_TOP_TRIG 275
+#define _EQ_GT 276
+#define _LT_EQ 277
+#define _BANG 278
+#define _AT_a_L 279
+#define _AT_base_L 280
+#define _AT_has_L 281
+#define _AT_is_L 282
+#define _AT_keywords_L 283
+#define _AT_of_L 284
+#define _AT_prefix_L 285
+#define _AT_this_L 286
+#define false_L 287
+#define true_L 288
+#define __TTL_PUNCT_END 289
+#define __TTL_NONPUNCT_START 290
+#define TURTLE_INTEGER 291
+#define TURTLE_DECIMAL 292
+#define TURTLE_DOUBLE 293
+#define TURTLE_STRING 294
+#define KEYWORD 295
+#define LANGTAG 296
+#define QNAME 297
+#define QNAME_NS 298
+#define VARIABLE 299
+#define BLANK_NODE_LABEL 300
+#define Q_IRI_REF 301
+#define _GARBAGE_BEFORE_DOT_WS 302
+#define TTL_RECOVERABLE_ERROR 303
+#define __NQUAD_NONPUNCT_END 304
 
 
 
@@ -260,7 +263,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 264 "nquad_p.c"
+#line 267 "nquad_p.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -272,7 +275,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 276 "nquad_p.c"
+#line 279 "nquad_p.c"
 
 #ifdef short
 # undef short
@@ -322,7 +325,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -487,10 +490,10 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  2
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   157
+#define YYLAST   154
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  48
+#define YYNTOKENS  50
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  19
 /* YYNRULES -- Number of rules.  */
@@ -500,7 +503,7 @@ union yyalloc
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   302
+#define YYMAXUTOK   304
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -538,7 +541,7 @@ static const yytype_uint8 yytranslate[] =
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47
+      45,    46,    47,    48,    49
 };
 
 #if YYDEBUG
@@ -559,40 +562,40 @@ static const yytype_uint8 yyprhs[] =
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      49,     0,    -1,    -1,    49,    50,    -1,    -1,    26,    51,
-      54,    52,    -1,    23,    44,    52,    -1,    28,    41,    44,
-      52,    -1,    28,     7,    44,    52,    -1,    53,    56,    58,
-       9,    -1,    53,    56,    45,     9,    -1,    53,    45,     9,
-      -1,    45,     9,    -1,     1,    -1,    -1,     9,    -1,    66,
-      -1,    42,    -1,    65,    -1,    57,    -1,    46,    -1,    55,
-      -1,    54,     8,    55,    -1,    40,    -1,    22,    -1,    24,
-      -1,    25,    -1,    27,    -1,    29,    -1,    66,    -1,    42,
-      -1,    22,    -1,    18,    -1,    19,    -1,    13,    -1,    43,
-      -1,    25,    66,    27,    -1,    25,    42,    27,    -1,    20,
-      -1,    31,    -1,    30,    -1,    34,    -1,    35,    -1,    36,
-      -1,    37,    -1,    37,    39,    -1,    37,     6,    66,    -1,
-      -1,    66,    59,    64,    -1,    -1,    42,    60,    64,    -1,
-      -1,    65,    61,    64,    -1,    31,    64,    -1,    30,    64,
-      -1,    34,    64,    -1,    35,    64,    -1,    36,    64,    -1,
-      37,    64,    -1,    37,    39,    64,    -1,    -1,    37,     6,
-      66,    62,    64,    -1,    46,    64,    -1,    37,     6,    46,
-      64,    -1,    -1,    46,     6,    66,    63,    64,    -1,    46,
-       6,    46,    64,    -1,    -1,    66,    -1,    46,    -1,    45,
-      -1,    43,    -1,    13,    -1,    44,    -1,    40,    -1,    41,
+      51,     0,    -1,    -1,    51,    52,    -1,    -1,    28,    53,
+      56,    54,    -1,    25,    46,    54,    -1,    30,    43,    46,
+      54,    -1,    30,     7,    46,    54,    -1,    55,    58,    60,
+       9,    -1,    55,    58,    47,     9,    -1,    55,    47,     9,
+      -1,    47,     9,    -1,     1,    -1,    -1,     9,    -1,    68,
+      -1,    44,    -1,    67,    -1,    59,    -1,    48,    -1,    57,
+      -1,    56,     8,    57,    -1,    42,    -1,    24,    -1,    26,
+      -1,    27,    -1,    29,    -1,    31,    -1,    68,    -1,    44,
+      -1,    24,    -1,    19,    -1,    21,    -1,    14,    -1,    45,
+      -1,    27,    68,    29,    -1,    27,    44,    29,    -1,    22,
+      -1,    33,    -1,    32,    -1,    36,    -1,    37,    -1,    38,
+      -1,    39,    -1,    39,    41,    -1,    39,     6,    68,    -1,
+      -1,    68,    61,    66,    -1,    -1,    44,    62,    66,    -1,
+      -1,    67,    63,    66,    -1,    33,    66,    -1,    32,    66,
+      -1,    36,    66,    -1,    37,    66,    -1,    38,    66,    -1,
+      39,    66,    -1,    39,    41,    66,    -1,    -1,    39,     6,
+      68,    64,    66,    -1,    48,    66,    -1,    39,     6,    48,
+      66,    -1,    -1,    48,     6,    68,    65,    66,    -1,    48,
+       6,    48,    66,    -1,    -1,    68,    -1,    48,    -1,    47,
+      -1,    45,    -1,    14,    -1,    46,    -1,    42,    -1,    43,
       -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   147,   147,   149,   153,   153,   154,   155,   174,   177,
-     178,   179,   180,   181,   184,   186,   190,   193,   195,   197,
-     200,   205,   206,   210,   211,   212,   213,   214,   215,   219,
-     220,   221,   222,   223,   224,   228,   237,   238,   239,   243,
-     244,   245,   246,   247,   248,   249,   250,   256,   256,   262,
-     262,   267,   267,   272,   274,   276,   280,   284,   288,   292,
-     298,   298,   306,   307,   310,   310,   314,   318,   323,   330,
-     331,   336,   343,   347,   354,   362
+       0,   149,   149,   151,   155,   155,   156,   157,   176,   179,
+     180,   181,   182,   183,   186,   188,   192,   195,   197,   199,
+     202,   207,   208,   212,   213,   214,   215,   216,   217,   221,
+     222,   223,   224,   225,   226,   230,   239,   240,   241,   245,
+     246,   247,   248,   249,   250,   251,   252,   258,   258,   264,
+     264,   269,   269,   274,   276,   278,   282,   286,   290,   294,
+     300,   300,   308,   309,   312,   312,   316,   320,   325,   332,
+     333,   338,   345,   349,   356,   364
 };
 #endif
 
@@ -603,13 +606,13 @@ static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "__TTL_PUNCT_BEGIN", "_CARET_WS",
   "_CARET_NOWS", "_CARET_CARET", "_COLON", "_COMMA", "_DOT_WS", "_LBRA",
-  "_LPAR", "_LSQBRA", "_LSQBRA_RSQBRA", "_RBRA", "_RPAR", "_RSQBRA",
-  "_SEMI", "_EQ", "_EQ_GT", "_LT_EQ", "_BANG", "_AT_a_L", "_AT_base_L",
-  "_AT_has_L", "_AT_is_L", "_AT_keywords_L", "_AT_of_L", "_AT_prefix_L",
-  "_AT_this_L", "false_L", "true_L", "__TTL_PUNCT_END",
-  "__TTL_NONPUNCT_START", "TURTLE_INTEGER", "TURTLE_DECIMAL",
-  "TURTLE_DOUBLE", "TURTLE_STRING", "KEYWORD", "LANGTAG", "QNAME",
-  "QNAME_NS", "VARIABLE", "BLANK_NODE_LABEL", "Q_IRI_REF",
+  "_LBRA_TOP_TRIG", "_LPAR", "_LSQBRA", "_LSQBRA_RSQBRA", "_RBRA", "_RPAR",
+  "_RSQBRA", "_SEMI", "_EQ", "_EQ_TOP_TRIG", "_EQ_GT", "_LT_EQ", "_BANG",
+  "_AT_a_L", "_AT_base_L", "_AT_has_L", "_AT_is_L", "_AT_keywords_L",
+  "_AT_of_L", "_AT_prefix_L", "_AT_this_L", "false_L", "true_L",
+  "__TTL_PUNCT_END", "__TTL_NONPUNCT_START", "TURTLE_INTEGER",
+  "TURTLE_DECIMAL", "TURTLE_DOUBLE", "TURTLE_STRING", "KEYWORD", "LANGTAG",
+  "QNAME", "QNAME_NS", "VARIABLE", "BLANK_NODE_LABEL", "Q_IRI_REF",
   "_GARBAGE_BEFORE_DOT_WS", "TTL_RECOVERABLE_ERROR",
   "__NQUAD_NONPUNCT_END", "$accept", "nquaddoc", "clause", "$@1",
   "dot_opt", "subject", "keyword_list", "keyword", "pred",
@@ -627,21 +630,21 @@ static const yytype_uint16 yytoknum[] =
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302
+     295,   296,   297,   298,   299,   300,   301,   302,   303,   304
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    48,    49,    49,    51,    50,    50,    50,    50,    50,
-      50,    50,    50,    50,    52,    52,    53,    53,    53,    53,
-      53,    54,    54,    55,    55,    55,    55,    55,    55,    56,
-      56,    56,    56,    56,    56,    56,    56,    56,    56,    57,
-      57,    57,    57,    57,    57,    57,    57,    59,    58,    60,
-      58,    61,    58,    58,    58,    58,    58,    58,    58,    58,
-      62,    58,    58,    58,    63,    58,    58,    64,    64,    64,
-      64,    65,    65,    66,    66,    66
+       0,    50,    51,    51,    53,    52,    52,    52,    52,    52,
+      52,    52,    52,    52,    54,    54,    55,    55,    55,    55,
+      55,    56,    56,    57,    57,    57,    57,    57,    57,    58,
+      58,    58,    58,    58,    58,    58,    58,    58,    58,    59,
+      59,    59,    59,    59,    59,    59,    59,    61,    60,    62,
+      60,    63,    60,    60,    60,    60,    60,    60,    60,    60,
+      64,    60,    60,    60,    65,    60,    60,    66,    66,    66,
+      66,    67,    67,    68,    68,    68
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -685,28 +688,28 @@ static const yytype_int8 yydefgoto[] =
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -60
+#define YYPACT_NINF -42
 static const yytype_int8 yypact[] =
 {
-     -60,    31,   -60,   -60,   -60,   -37,   -60,     4,   -60,   -60,
-     -60,   -60,   -60,    -5,   -60,   -60,   -60,   -60,   -60,     1,
-     -60,   -60,   105,   -60,   -60,   -60,    10,    -7,   -36,    -4,
-     -17,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -28,   -60,
-     -60,    30,    71,   -60,   -60,   -60,   -60,   -60,   -60,   -60,
-     -60,   -60,    17,   -60,    10,    10,   -60,    16,    19,   -60,
-      88,    88,    88,    88,    88,    42,   -60,    46,    52,    47,
-     -60,   -60,    -7,   -60,   -60,   -60,   -60,   -60,   -60,   -60,
-     -60,   -60,   -60,   -60,   -60,   -60,    95,    88,   -60,    88,
-     -60,   111,   -60,   -60,    88,    88,   -60,    88,   -60,   -60,
-     -60,    88,   -60,   -60,   -60,   -60,    88,   -60,    88,   -60,
-     -60
+     -42,     6,   -42,   -42,   -42,   -38,   -42,    -3,   -42,   -42,
+     -42,   -42,   -42,     5,   -42,   -42,   -42,   -42,   -42,     7,
+     -42,   -42,   107,   -42,   -42,   -42,     9,   -12,   -23,   -14,
+     -33,   -42,   -42,   -42,   -42,   -42,   -42,   -42,   -41,   -42,
+     -42,    24,    72,   -42,   -42,   -42,   -42,   -42,   -42,   -42,
+     -42,   -42,    18,   -42,     9,     9,   -42,    31,    32,   -42,
+      50,    50,    50,    50,    50,    22,   -42,    38,    29,    57,
+     -42,   -42,   -12,   -42,   -42,   -42,   -42,   -42,   -42,   -42,
+     -42,   -42,   -42,   -42,   -42,   -42,    36,    50,   -42,    50,
+     -42,    90,   -42,   -42,    50,    50,   -42,    50,   -42,   -42,
+     -42,    50,   -42,   -42,   -42,   -42,    50,   -42,    50,   -42,
+     -42
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -60,   -60,   -60,   -60,    -2,   -60,   -60,   -21,   -60,   -60,
-     -60,   -60,   -60,   -60,   -60,   -60,   -59,    18,    -1
+     -42,   -42,   -42,   -42,   -30,   -42,   -42,    -5,   -42,   -42,
+     -42,   -42,   -42,   -42,   -42,   -42,    -6,    45,    -1
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -716,60 +719,60 @@ static const yytype_int8 yypgoto[] =
 #define YYTABLE_NINF -1
 static const yytype_uint8 yytable[] =
 {
-      25,    30,    82,    83,    84,    85,    88,    26,    54,    92,
-      32,    28,    14,    15,    57,    46,    18,    47,    48,    44,
-      49,    43,    50,    14,    15,    72,    44,    18,    99,    56,
-     100,     2,     3,    51,    31,   103,   104,    58,   105,    59,
-      55,    71,   107,    76,     4,    29,    77,   109,    86,   110,
-      73,    96,    74,    75,     5,    90,    93,     6,    91,     7,
-      70,     8,     9,     0,     0,    10,    11,    12,    13,     0,
-       0,    14,    15,    16,    17,    18,    19,    20,     0,     0,
-       0,    87,    14,    15,     4,    98,    18,    78,    79,     0,
-     102,     0,    14,    15,     0,     0,    18,    78,    79,     0,
-       0,    60,    61,     0,     0,    62,    63,    64,    65,     0,
-       0,    14,    15,    66,    17,    18,    67,    68,    33,     0,
-       0,     0,     0,    34,    35,    36,     0,    37,    14,    15,
-      38,     0,    18,    78,    79,    14,    15,     0,     0,    18,
-       0,    97,     0,     0,     0,    14,    15,    39,    40,    18,
-      41,    14,    15,     0,     0,    18,     0,   101
+      25,    14,    15,    57,    28,    18,     2,     3,    26,    14,
+      15,    30,    46,    18,    47,    48,    32,    49,    44,    50,
+       4,    43,    73,    54,    74,    75,    72,    44,    86,    56,
+      51,     5,    55,    59,     6,    91,     7,    58,     8,     9,
+      29,    71,    10,    11,    12,    13,    31,    90,    14,    15,
+      16,    17,    18,    19,    20,    82,    83,    84,    85,    88,
+      76,    77,    92,    87,    14,    15,    93,    96,    18,    78,
+      79,    14,    15,     0,     0,    18,    78,    79,    14,    15,
+       0,    99,    18,   100,    97,    98,     4,    70,   103,   104,
+     102,   105,    14,    15,     0,   107,    18,    78,    79,     0,
+     109,     0,   110,     0,    60,    61,     0,     0,    62,    63,
+      64,    65,     0,     0,    14,    15,    66,    17,    18,    67,
+      68,    33,     0,     0,     0,     0,    34,     0,    35,    36,
+       0,    37,    14,    15,    38,     0,    18,     0,   101,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    14,
+      15,    39,    40,    18,    41
 };
 
 static const yytype_int8 yycheck[] =
 {
-       1,     6,    61,    62,    63,    64,    65,    44,    44,    68,
-       9,     7,    40,    41,    42,    22,    44,    24,    25,     9,
-      27,    22,    29,    40,    41,     8,     9,    44,    87,    30,
-      89,     0,     1,    40,    39,    94,    95,    38,    97,     9,
-      44,    42,   101,    27,    13,    41,    27,   106,     6,   108,
-      52,    72,    54,    55,    23,     9,     9,    26,     6,    28,
-      42,    30,    31,    -1,    -1,    34,    35,    36,    37,    -1,
-      -1,    40,    41,    42,    43,    44,    45,    46,    -1,    -1,
-      -1,    39,    40,    41,    13,    86,    44,    45,    46,    -1,
-      91,    -1,    40,    41,    -1,    -1,    44,    45,    46,    -1,
-      -1,    30,    31,    -1,    -1,    34,    35,    36,    37,    -1,
-      -1,    40,    41,    42,    43,    44,    45,    46,    13,    -1,
-      -1,    -1,    -1,    18,    19,    20,    -1,    22,    40,    41,
-      25,    -1,    44,    45,    46,    40,    41,    -1,    -1,    44,
-      -1,    46,    -1,    -1,    -1,    40,    41,    42,    43,    44,
-      45,    40,    41,    -1,    -1,    44,    -1,    46
+       1,    42,    43,    44,     7,    46,     0,     1,    46,    42,
+      43,     6,    24,    46,    26,    27,     9,    29,     9,    31,
+      14,    22,    52,    46,    54,    55,     8,     9,     6,    30,
+      42,    25,    46,     9,    28,     6,    30,    38,    32,    33,
+      43,    42,    36,    37,    38,    39,    41,     9,    42,    43,
+      44,    45,    46,    47,    48,    61,    62,    63,    64,    65,
+      29,    29,    68,    41,    42,    43,     9,    72,    46,    47,
+      48,    42,    43,    -1,    -1,    46,    47,    48,    42,    43,
+      -1,    87,    46,    89,    48,    86,    14,    42,    94,    95,
+      91,    97,    42,    43,    -1,   101,    46,    47,    48,    -1,
+     106,    -1,   108,    -1,    32,    33,    -1,    -1,    36,    37,
+      38,    39,    -1,    -1,    42,    43,    44,    45,    46,    47,
+      48,    14,    -1,    -1,    -1,    -1,    19,    -1,    21,    22,
+      -1,    24,    42,    43,    27,    -1,    46,    -1,    48,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,
+      43,    44,    45,    46,    47
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    49,     0,     1,    13,    23,    26,    28,    30,    31,
-      34,    35,    36,    37,    40,    41,    42,    43,    44,    45,
-      46,    50,    53,    57,    65,    66,    44,    51,     7,    41,
-       6,    39,     9,    13,    18,    19,    20,    22,    25,    42,
-      43,    45,    56,    66,     9,    52,    22,    24,    25,    27,
-      29,    40,    54,    55,    44,    44,    66,    42,    66,     9,
-      30,    31,    34,    35,    36,    37,    42,    45,    46,    58,
-      65,    66,     8,    52,    52,    52,    27,    27,    45,    46,
-      64,    66,    64,    64,    64,    64,     6,    39,    64,    60,
-       9,     6,    64,     9,    61,    59,    55,    46,    66,    64,
-      64,    46,    66,    64,    64,    64,    62,    64,    63,    64,
-      64
+       0,    51,     0,     1,    14,    25,    28,    30,    32,    33,
+      36,    37,    38,    39,    42,    43,    44,    45,    46,    47,
+      48,    52,    55,    59,    67,    68,    46,    53,     7,    43,
+       6,    41,     9,    14,    19,    21,    22,    24,    27,    44,
+      45,    47,    58,    68,     9,    54,    24,    26,    27,    29,
+      31,    42,    56,    57,    46,    46,    68,    44,    68,     9,
+      32,    33,    36,    37,    38,    39,    44,    47,    48,    60,
+      67,    68,     8,    54,    54,    54,    29,    29,    47,    48,
+      66,    68,    66,    66,    66,    66,     6,    41,    66,    62,
+       9,     6,    66,     9,    63,    61,    57,    48,    68,    66,
+      66,    48,    68,    66,    66,    66,    64,    66,    65,    66,
+      66
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -784,9 +787,18 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -843,7 +855,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -1594,26 +1606,26 @@ yyreduce:
     {
         case 4:
 
-/* Line 1455 of yacc.c  */
-#line 153 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 155 "./nquad_p.y"
     { ttlp_arg->ttlp_special_qnames = ~0; }
     break;
 
   case 6:
 
-/* Line 1455 of yacc.c  */
-#line 154 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 156 "./nquad_p.y"
     { dk_free_box (ttlp_arg->ttlp_tf->tf_base_uri); ttlp_arg->ttlp_tf->tf_base_uri = (yyvsp[(2) - (3)].box); }
     break;
 
   case 7:
 
-/* Line 1455 of yacc.c  */
-#line 155 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 157 "./nquad_p.y"
     {
 		caddr_t *old_uri_ptr;
 		if (NULL != ttlp_arg->ttlp_namespaces_prefix2iri)
-		  old_uri_ptr = (caddr_t *)id_hash_get (ttlp_arg->ttlp_namespaces_prefix2iri, &((yyvsp[(2) - (4)].box)));
+		  old_uri_ptr = (caddr_t *)id_hash_get (ttlp_arg->ttlp_namespaces_prefix2iri, (caddr_t)(&((yyvsp[(2) - (4)].box))));
 		else
 		  {
 		    ttlp_arg->ttlp_namespaces_prefix2iri = (id_hash_t *)box_dv_dict_hashtable (31);
@@ -1628,13 +1640,13 @@ yyreduce:
 		      ttlyyerror_action ("Namespace prefix is re-used for a different namespace IRI");
 		  }
 		else
-		  id_hash_set (ttlp_arg->ttlp_namespaces_prefix2iri, &((yyvsp[(2) - (4)].box)), &((yyvsp[(3) - (4)].box))); }
+		  id_hash_set (ttlp_arg->ttlp_namespaces_prefix2iri, (caddr_t)(&((yyvsp[(2) - (4)].box))), (caddr_t)(&((yyvsp[(3) - (4)].box)))); }
     break;
 
   case 8:
 
-/* Line 1455 of yacc.c  */
-#line 174 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 176 "./nquad_p.y"
     {
 		dk_free_box (ttlp_arg->ttlp_default_ns_uri);
 		ttlp_arg->ttlp_default_ns_uri = (yyvsp[(3) - (4)].box); }
@@ -1642,15 +1654,15 @@ yyreduce:
 
   case 13:
 
-/* Line 1455 of yacc.c  */
-#line 181 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 183 "./nquad_p.y"
     { ttlyyerror_action ("Only a triple or a special clause (like prefix declaration) is allowed here"); }
     break;
 
   case 16:
 
-/* Line 1455 of yacc.c  */
-#line 190 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 192 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = ttlp_arg->ttlp_last_complete_uri;
 		ttlp_arg->ttlp_last_complete_uri = NULL; }
@@ -1658,24 +1670,24 @@ yyreduce:
 
   case 17:
 
-/* Line 1455 of yacc.c  */
-#line 193 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 195 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = (yyvsp[(1) - (1)].box); }
     break;
 
   case 18:
 
-/* Line 1455 of yacc.c  */
-#line 195 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 197 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = (yyvsp[(1) - (1)].box); }
     break;
 
   case 19:
 
-/* Line 1455 of yacc.c  */
-#line 197 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 199 "./nquad_p.y"
     {
 		TTLYYERROR_ACTION_COND (TTLP_SKIP_LITERAL_SUBJECTS, "Virtuoso does not support literal subjects");
 		dk_free_tree (ttlp_arg->ttlp_subj_uri); ttlp_arg->ttlp_subj_uri = NULL; }
@@ -1683,107 +1695,107 @@ yyreduce:
 
   case 20:
 
-/* Line 1455 of yacc.c  */
-#line 200 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 202 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = NULL; }
     break;
 
   case 21:
 
-/* Line 1455 of yacc.c  */
-#line 205 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 207 "./nquad_p.y"
     { ttlp_arg->ttlp_special_qnames &= ~((yyvsp[(1) - (1)].token_type)); }
     break;
 
   case 22:
 
-/* Line 1455 of yacc.c  */
-#line 206 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 208 "./nquad_p.y"
     { ttlp_arg->ttlp_special_qnames &= ~((yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 23:
 
-/* Line 1455 of yacc.c  */
-#line 210 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 212 "./nquad_p.y"
     { (yyval.token_type) = ttlp_bit_of_special_qname ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 24:
 
-/* Line 1455 of yacc.c  */
-#line 211 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 213 "./nquad_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_A; }
     break;
 
   case 25:
 
-/* Line 1455 of yacc.c  */
-#line 212 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 214 "./nquad_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_HAS; }
     break;
 
   case 26:
 
-/* Line 1455 of yacc.c  */
-#line 213 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 215 "./nquad_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_IS; }
     break;
 
   case 27:
 
-/* Line 1455 of yacc.c  */
-#line 214 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 216 "./nquad_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_OF; }
     break;
 
   case 28:
 
-/* Line 1455 of yacc.c  */
-#line 215 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 217 "./nquad_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_THIS; }
     break;
 
   case 29:
 
-/* Line 1455 of yacc.c  */
-#line 219 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 221 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = ttlp_arg->ttlp_last_complete_uri; ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
   case 30:
 
-/* Line 1455 of yacc.c  */
-#line 220 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 222 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = (yyvsp[(1) - (1)].box); }
     break;
 
   case 31:
 
-/* Line 1455 of yacc.c  */
-#line 221 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 223 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = uname_rdf_ns_uri_type; }
     break;
 
   case 32:
 
-/* Line 1455 of yacc.c  */
-#line 222 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 224 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = box_dv_uname_string ("http://www.w3.org/2002/07/owl#sameAs"); }
     break;
 
   case 33:
 
-/* Line 1455 of yacc.c  */
-#line 223 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 225 "./nquad_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); }
     break;
 
   case 34:
 
-/* Line 1455 of yacc.c  */
-#line 225 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 227 "./nquad_p.y"
     {
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[]') can not be used as a predicate");
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL); }
@@ -1791,8 +1803,8 @@ yyreduce:
 
   case 35:
 
-/* Line 1455 of yacc.c  */
-#line 229 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 231 "./nquad_p.y"
     {
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '_:...' label) can not be used as a predicate");
                   dk_free_tree (ttlp_arg->ttlp_pred_uri);
@@ -1805,29 +1817,29 @@ yyreduce:
 
   case 36:
 
-/* Line 1455 of yacc.c  */
-#line 237 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 239 "./nquad_p.y"
     { ttlp_arg->ttlp_pred_is_reverse = 1; dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = ttlp_arg->ttlp_last_complete_uri; ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
   case 37:
 
-/* Line 1455 of yacc.c  */
-#line 238 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 240 "./nquad_p.y"
     { ttlp_arg->ttlp_pred_is_reverse = 1; dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = (yyvsp[(2) - (3)].box); }
     break;
 
   case 38:
 
-/* Line 1455 of yacc.c  */
-#line 239 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 241 "./nquad_p.y"
     { ttlp_arg->ttlp_pred_is_reverse = 1; dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); /* Note this 'double reversed' meaning :) */ }
     break;
 
   case 46:
 
-/* Line 1455 of yacc.c  */
-#line 250 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 252 "./nquad_p.y"
     {
 			dk_free_tree (ttlp_arg->ttlp_last_complete_uri);
 			ttlp_arg->ttlp_last_complete_uri = NULL; }
@@ -1835,8 +1847,8 @@ yyreduce:
 
   case 47:
 
-/* Line 1455 of yacc.c  */
-#line 256 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 258 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = ttlp_arg->ttlp_last_complete_uri;
@@ -1845,16 +1857,16 @@ yyreduce:
 
   case 48:
 
-/* Line 1455 of yacc.c  */
-#line 260 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 262 "./nquad_p.y"
     {
 		ttlp_triple_and_inf (ttlp_arg, ttlp_arg->ttlp_obj); }
     break;
 
   case 49:
 
-/* Line 1455 of yacc.c  */
-#line 262 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 264 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box); }
@@ -1862,16 +1874,16 @@ yyreduce:
 
   case 50:
 
-/* Line 1455 of yacc.c  */
-#line 265 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 267 "./nquad_p.y"
     {
 		ttlp_triple_and_inf (ttlp_arg, (yyvsp[(1) - (3)].box)); }
     break;
 
   case 51:
 
-/* Line 1455 of yacc.c  */
-#line 267 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 269 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box); }
@@ -1879,32 +1891,32 @@ yyreduce:
 
   case 52:
 
-/* Line 1455 of yacc.c  */
-#line 270 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 272 "./nquad_p.y"
     {
 		ttlp_triple_and_inf (ttlp_arg, (yyvsp[(1) - (3)].box)); }
     break;
 
   case 53:
 
-/* Line 1455 of yacc.c  */
-#line 272 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 274 "./nquad_p.y"
     {
 		ttlp_triple_l_and_inf (ttlp_arg, (caddr_t)((ptrlong)1), uname_xmlschema_ns_uri_hash_boolean, NULL); }
     break;
 
   case 54:
 
-/* Line 1455 of yacc.c  */
-#line 274 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 276 "./nquad_p.y"
     {
 		ttlp_triple_l_and_inf (ttlp_arg, (caddr_t)((ptrlong)0), uname_xmlschema_ns_uri_hash_boolean, NULL); }
     break;
 
   case 55:
 
-/* Line 1455 of yacc.c  */
-#line 276 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 278 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (2)].box);
@@ -1913,8 +1925,8 @@ yyreduce:
 
   case 56:
 
-/* Line 1455 of yacc.c  */
-#line 280 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 282 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (2)].box);
@@ -1923,8 +1935,8 @@ yyreduce:
 
   case 57:
 
-/* Line 1455 of yacc.c  */
-#line 284 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 286 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (2)].box);
@@ -1933,8 +1945,8 @@ yyreduce:
 
   case 58:
 
-/* Line 1455 of yacc.c  */
-#line 288 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 290 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (2)].box);
@@ -1943,8 +1955,8 @@ yyreduce:
 
   case 59:
 
-/* Line 1455 of yacc.c  */
-#line 292 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 294 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (3)].box);
@@ -1955,8 +1967,8 @@ yyreduce:
 
   case 60:
 
-/* Line 1455 of yacc.c  */
-#line 298 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 300 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (3)].box);
@@ -1967,23 +1979,23 @@ yyreduce:
 
   case 61:
 
-/* Line 1455 of yacc.c  */
-#line 304 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 306 "./nquad_p.y"
     {
 		ttlp_triple_l_and_inf (ttlp_arg, ttlp_arg->ttlp_obj, ttlp_arg->ttlp_obj_type, NULL);	}
     break;
 
   case 62:
 
-/* Line 1455 of yacc.c  */
-#line 306 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 308 "./nquad_p.y"
     { }
     break;
 
   case 63:
 
-/* Line 1455 of yacc.c  */
-#line 307 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 309 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (4)].box); }
@@ -1991,8 +2003,8 @@ yyreduce:
 
   case 64:
 
-/* Line 1455 of yacc.c  */
-#line 310 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 312 "./nquad_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_last_complete_uri);
 		ttlp_arg->ttlp_last_complete_uri = NULL; }
@@ -2000,22 +2012,22 @@ yyreduce:
 
   case 65:
 
-/* Line 1455 of yacc.c  */
-#line 313 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 315 "./nquad_p.y"
     { }
     break;
 
   case 66:
 
-/* Line 1455 of yacc.c  */
-#line 314 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 316 "./nquad_p.y"
     { }
     break;
 
   case 67:
 
-/* Line 1455 of yacc.c  */
-#line 318 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 320 "./nquad_p.y"
     {
 		triple_feed_t *tf = ttlp_arg->ttlp_tf;
 		if ((NULL == tf->tf_current_graph_uri) || strcmp (tf->tf_current_graph_uri, tf->tf_default_graph_uri))
@@ -2025,8 +2037,8 @@ yyreduce:
 
   case 68:
 
-/* Line 1455 of yacc.c  */
-#line 323 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 325 "./nquad_p.y"
     {
 		triple_feed_t *tf = ttlp_arg->ttlp_tf;
 		if ((NULL == tf->tf_current_graph_uri) || strcmp (tf->tf_current_graph_uri, ttlp_arg->ttlp_last_complete_uri))
@@ -2038,22 +2050,22 @@ yyreduce:
 
   case 69:
 
-/* Line 1455 of yacc.c  */
-#line 330 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 332 "./nquad_p.y"
     { }
     break;
 
   case 70:
 
-/* Line 1455 of yacc.c  */
-#line 331 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 333 "./nquad_p.y"
     { }
     break;
 
   case 71:
 
-/* Line 1455 of yacc.c  */
-#line 337 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 339 "./nquad_p.y"
     {
                   if (ttlp_arg->ttlp_formula_iid)
 		    (yyval.box) = tf_formula_bnode_iid (ttlp_arg, (yyvsp[(1) - (1)].box));
@@ -2064,15 +2076,15 @@ yyreduce:
 
   case 72:
 
-/* Line 1455 of yacc.c  */
-#line 343 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 345 "./nquad_p.y"
     { (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL); }
     break;
 
   case 73:
 
-/* Line 1455 of yacc.c  */
-#line 348 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 350 "./nquad_p.y"
     {
                   if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
@@ -2083,8 +2095,8 @@ yyreduce:
 
   case 74:
 
-/* Line 1455 of yacc.c  */
-#line 355 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 357 "./nquad_p.y"
     {
                   if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
@@ -2096,8 +2108,8 @@ yyreduce:
 
   case 75:
 
-/* Line 1455 of yacc.c  */
-#line 363 "./nquad_p.y"
+/* Line 1464 of yacc.c  */
+#line 365 "./nquad_p.y"
     {
                   if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
@@ -2109,8 +2121,8 @@ yyreduce:
 
 
 
-/* Line 1455 of yacc.c  */
-#line 2114 "nquad_p.c"
+/* Line 1464 of yacc.c  */
+#line 2126 "nquad_p.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/libsrc/Wi/nquad_p.h b/libsrc/Wi/nquad_p.h
index 13c125d..d91fe7a 100644
--- a/libsrc/Wi/nquad_p.h
+++ b/libsrc/Wi/nquad_p.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -47,43 +46,45 @@
      _COMMA = 263,
      _DOT_WS = 264,
      _LBRA = 265,
-     _LPAR = 266,
-     _LSQBRA = 267,
-     _LSQBRA_RSQBRA = 268,
-     _RBRA = 269,
-     _RPAR = 270,
-     _RSQBRA = 271,
-     _SEMI = 272,
-     _EQ = 273,
-     _EQ_GT = 274,
-     _LT_EQ = 275,
-     _BANG = 276,
-     _AT_a_L = 277,
-     _AT_base_L = 278,
-     _AT_has_L = 279,
-     _AT_is_L = 280,
-     _AT_keywords_L = 281,
-     _AT_of_L = 282,
-     _AT_prefix_L = 283,
-     _AT_this_L = 284,
-     false_L = 285,
-     true_L = 286,
-     __TTL_PUNCT_END = 287,
-     __TTL_NONPUNCT_START = 288,
-     TURTLE_INTEGER = 289,
-     TURTLE_DECIMAL = 290,
-     TURTLE_DOUBLE = 291,
-     TURTLE_STRING = 292,
-     KEYWORD = 293,
-     LANGTAG = 294,
-     QNAME = 295,
-     QNAME_NS = 296,
-     VARIABLE = 297,
-     BLANK_NODE_LABEL = 298,
-     Q_IRI_REF = 299,
-     _GARBAGE_BEFORE_DOT_WS = 300,
-     TTL_RECOVERABLE_ERROR = 301,
-     __NQUAD_NONPUNCT_END = 302
+     _LBRA_TOP_TRIG = 266,
+     _LPAR = 267,
+     _LSQBRA = 268,
+     _LSQBRA_RSQBRA = 269,
+     _RBRA = 270,
+     _RPAR = 271,
+     _RSQBRA = 272,
+     _SEMI = 273,
+     _EQ = 274,
+     _EQ_TOP_TRIG = 275,
+     _EQ_GT = 276,
+     _LT_EQ = 277,
+     _BANG = 278,
+     _AT_a_L = 279,
+     _AT_base_L = 280,
+     _AT_has_L = 281,
+     _AT_is_L = 282,
+     _AT_keywords_L = 283,
+     _AT_of_L = 284,
+     _AT_prefix_L = 285,
+     _AT_this_L = 286,
+     false_L = 287,
+     true_L = 288,
+     __TTL_PUNCT_END = 289,
+     __TTL_NONPUNCT_START = 290,
+     TURTLE_INTEGER = 291,
+     TURTLE_DECIMAL = 292,
+     TURTLE_DOUBLE = 293,
+     TURTLE_STRING = 294,
+     KEYWORD = 295,
+     LANGTAG = 296,
+     QNAME = 297,
+     QNAME_NS = 298,
+     VARIABLE = 299,
+     BLANK_NODE_LABEL = 300,
+     Q_IRI_REF = 301,
+     _GARBAGE_BEFORE_DOT_WS = 302,
+     TTL_RECOVERABLE_ERROR = 303,
+     __NQUAD_NONPUNCT_END = 304
    };
 #endif
 /* Tokens.  */
@@ -95,43 +96,45 @@
 #define _COMMA 263
 #define _DOT_WS 264
 #define _LBRA 265
-#define _LPAR 266
-#define _LSQBRA 267
-#define _LSQBRA_RSQBRA 268
-#define _RBRA 269
-#define _RPAR 270
-#define _RSQBRA 271
-#define _SEMI 272
-#define _EQ 273
-#define _EQ_GT 274
-#define _LT_EQ 275
-#define _BANG 276
-#define _AT_a_L 277
-#define _AT_base_L 278
-#define _AT_has_L 279
-#define _AT_is_L 280
-#define _AT_keywords_L 281
-#define _AT_of_L 282
-#define _AT_prefix_L 283
-#define _AT_this_L 284
-#define false_L 285
-#define true_L 286
-#define __TTL_PUNCT_END 287
-#define __TTL_NONPUNCT_START 288
-#define TURTLE_INTEGER 289
-#define TURTLE_DECIMAL 290
-#define TURTLE_DOUBLE 291
-#define TURTLE_STRING 292
-#define KEYWORD 293
-#define LANGTAG 294
-#define QNAME 295
-#define QNAME_NS 296
-#define VARIABLE 297
-#define BLANK_NODE_LABEL 298
-#define Q_IRI_REF 299
-#define _GARBAGE_BEFORE_DOT_WS 300
-#define TTL_RECOVERABLE_ERROR 301
-#define __NQUAD_NONPUNCT_END 302
+#define _LBRA_TOP_TRIG 266
+#define _LPAR 267
+#define _LSQBRA 268
+#define _LSQBRA_RSQBRA 269
+#define _RBRA 270
+#define _RPAR 271
+#define _RSQBRA 272
+#define _SEMI 273
+#define _EQ 274
+#define _EQ_TOP_TRIG 275
+#define _EQ_GT 276
+#define _LT_EQ 277
+#define _BANG 278
+#define _AT_a_L 279
+#define _AT_base_L 280
+#define _AT_has_L 281
+#define _AT_is_L 282
+#define _AT_keywords_L 283
+#define _AT_of_L 284
+#define _AT_prefix_L 285
+#define _AT_this_L 286
+#define false_L 287
+#define true_L 288
+#define __TTL_PUNCT_END 289
+#define __TTL_NONPUNCT_START 290
+#define TURTLE_INTEGER 291
+#define TURTLE_DECIMAL 292
+#define TURTLE_DOUBLE 293
+#define TURTLE_STRING 294
+#define KEYWORD 295
+#define LANGTAG 296
+#define QNAME 297
+#define QNAME_NS 298
+#define VARIABLE 299
+#define BLANK_NODE_LABEL 300
+#define Q_IRI_REF 301
+#define _GARBAGE_BEFORE_DOT_WS 302
+#define TTL_RECOVERABLE_ERROR 303
+#define __NQUAD_NONPUNCT_END 304
 
 
 
@@ -140,7 +143,7 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
+/* Line 1685 of yacc.c  */
 #line 76 "./nquad_p.y"
 
   caddr_t box;
@@ -149,8 +152,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1676 of yacc.c  */
-#line 154 "nquad_p.h"
+/* Line 1685 of yacc.c  */
+#line 157 "nquad_p.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/libsrc/Wi/nquad_p.y b/libsrc/Wi/nquad_p.y
index 9031ff2..03e308d 100644
--- a/libsrc/Wi/nquad_p.y
+++ b/libsrc/Wi/nquad_p.y
@@ -1,10 +1,10 @@
 /*
- *  $Id: nquad_p.y,v 1.1.2.4 2011/01/03 10:17:27 source Exp $
+ *  $Id: nquad_p.y,v 1.1.2.7 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -89,6 +89,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 %token _COMMA		/*:: PUNCT_TTL_LAST(",") ::*/
 %token _DOT_WS		/*:: PUNCT("."), TTL, LAST(". "), LAST(".\n"), LAST(".") ::*/
 %token _LBRA		/*:: PUNCT_TTL_LAST("{") ::*/
+%token _LBRA_TOP_TRIG	/*:: PUNCT_TRIG_LAST("{") ::*/
 %token _LPAR		/*:: PUNCT_TTL_LAST("(") ::*/
 %token _LSQBRA		/*:: PUNCT_TTL_LAST("[") ::*/
 %token _LSQBRA_RSQBRA	/*:: PUNCT_TTL_LAST("[]") ::*/
@@ -97,6 +98,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 %token _RSQBRA		/*:: PUNCT_TTL_LAST("[ ]") ::*/
 %token _SEMI		/*:: PUNCT_TTL_LAST(";") ::*/
 %token _EQ		/*:: PUNCT_TTL_LAST("=") ::*/
+%token _EQ_TOP_TRIG	/*:: PUNCT_TRIG_LAST("=") ::*/
 %token _EQ_GT		/*:: PUNCT_TTL_LAST("=>") ::*/
 %token _LT_EQ		/*:: PUNCT_TTL_LAST("<=") ::*/
 %token _BANG		/*:: PUNCT_TTL_LAST("!") ::*/
@@ -155,7 +157,7 @@ clause
         | _AT_prefix_L QNAME_NS Q_IRI_REF dot_opt {
 		caddr_t *old_uri_ptr;
 		if (NULL != ttlp_arg->ttlp_namespaces_prefix2iri)
-		  old_uri_ptr = (caddr_t *)id_hash_get (ttlp_arg->ttlp_namespaces_prefix2iri, &($2));
+		  old_uri_ptr = (caddr_t *)id_hash_get (ttlp_arg->ttlp_namespaces_prefix2iri, (caddr_t)(&($2)));
 		else
 		  {
 		    ttlp_arg->ttlp_namespaces_prefix2iri = (id_hash_t *)box_dv_dict_hashtable (31);
@@ -170,7 +172,7 @@ clause
 		      ttlyyerror_action ("Namespace prefix is re-used for a different namespace IRI");
 		  }
 		else
-		  id_hash_set (ttlp_arg->ttlp_namespaces_prefix2iri, &($2), &($3)); }
+		  id_hash_set (ttlp_arg->ttlp_namespaces_prefix2iri, (caddr_t)(&($2)), (caddr_t)(&($3))); }
 	| _AT_prefix_L _COLON Q_IRI_REF dot_opt	{
 		dk_free_box (ttlp_arg->ttlp_default_ns_uri);
 		ttlp_arg->ttlp_default_ns_uri = $3; }
diff --git a/libsrc/Wi/numeric.c b/libsrc/Wi/numeric.c
index 30dff28..391aa40 100644
--- a/libsrc/Wi/numeric.c
+++ b/libsrc/Wi/numeric.c
@@ -1,14 +1,14 @@
 /*
  *  numeric.c
  *
- *  $Id: numeric.c,v 1.13.2.4 2011/01/28 13:31:34 source Exp $
+ *  $Id: numeric.c,v 1.13.2.6 2012/03/08 12:55:34 source Exp $
  *
  *  Implements numeric data type
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2180,6 +2180,53 @@ numeric_to_dv (numeric_t n, dtp_t *res, size_t reslength)
 /*
  *  Very similar to _numeric_normalize
  *
+ *  "Resizes" n from x to a new precision and a new scale.
+ *  Returns NUMERIC_STS_UNDERFLOW / NUMERIC_STS_OVERFLOW on failure.
+ *
+ *  NOTE: new_prec here is SQL precision (n_len + n_scale)
+ */
+int
+numeric_rescale_noround (numeric_t n, numeric_t x, int new_prec, int new_scale)
+{
+  char *src;
+
+  if (num_is_invalid (x))
+    return numeric_copy (n, x);
+
+  new_prec = MAX (0, MIN (NUMERIC_MAX_PRECISION, new_prec));
+  new_scale = MAX (0, MIN (NUMERIC_MAX_SCALE, new_scale));
+
+  /* too big? */
+  if (x->n_len > new_prec)
+    return _numeric_inf (n, x->n_neg);
+
+  /* adjust scale if not enough digits available */
+  if (x->n_len + new_scale > new_prec + ((1 == x->n_len && 0 == x->n_value[0])?1:0))
+    new_scale = new_prec - x->n_len;
+
+  /* too much fraction? */
+  if (x->n_scale > new_scale)
+    {
+      numeric_copy (n, x);
+      n->n_scale = new_scale;
+      /* Check if we have to remove trailing zeroes. */
+      if (n->n_scale)
+        {
+          src = n->n_value + n->n_len + n->n_scale;
+          while (n->n_scale > 0 && *--src == 0)
+            n->n_scale--;
+        }
+    }
+  else
+    numeric_copy (n, x);
+
+  return NUMERIC_STS_SUCCESS;
+}
+
+
+/*
+ *  Very similar to _numeric_normalize
+ *
  *  Rounds n from x to a new precision and a new scale.
  *  Returns NUMERIC_STS_UNDERFLOW / NUMERIC_STS_OVERFLOW on failure.
  *
diff --git a/libsrc/Wi/numeric.h b/libsrc/Wi/numeric.h
index f8d0a8e..a68b2ba 100644
--- a/libsrc/Wi/numeric.h
+++ b/libsrc/Wi/numeric.h
@@ -1,14 +1,14 @@
 /*
  *  numeric.h
  *
- *  $Id: numeric.h,v 1.5.2.4 2011/01/28 13:31:34 source Exp $
+ *  $Id: numeric.h,v 1.5.2.6 2012/03/08 12:55:34 source Exp $
  *
  *  Numeric data type
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -143,6 +143,7 @@ int numeric_to_double (numeric_t n, double *pvalue);
 int numeric_to_dv (numeric_t n, dtp_t *res, size_t reslength);
 
 int numeric_rescale (numeric_t y, numeric_t x, int prec, int scale);
+int numeric_rescale_noround (numeric_t y, numeric_t x, int prec, int scale);
 
 /* arithmetic & comparison */
 int numeric_compare (numeric_t x, numeric_t y);
@@ -173,4 +174,8 @@ int numeric_scale (numeric_t n);
 int _numeric_size (void);
 uint32 numeric_hash (numeric_t n);
 
+/* Internals listed below are not for common use.
+Functions that use them outside numeric.c should probably be splitted and low-level parts should be added to numeric.c API. */
+extern void num_add (numeric_t sum, numeric_t n1, numeric_t n2, int scale_min);
+
 #endif /* _WI_NUMERIC_H */
diff --git a/libsrc/Wi/obackup.c b/libsrc/Wi/obackup.c
index 3f66c1d..e4e4a7c 100644
--- a/libsrc/Wi/obackup.c
+++ b/libsrc/Wi/obackup.c
@@ -1,14 +1,14 @@
 /*
  *  obackup.c
  *
- *  $Id: obackup.c,v 1.20.2.13 2010/09/17 23:10:41 source Exp $
+ *  $Id: obackup.c,v 1.20.2.14 2012/03/08 12:55:34 source Exp $
  *
  *  Online & Incremental Backup
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/odbccat.c b/libsrc/Wi/odbccat.c
index 6d6338b..b8817d8 100644
--- a/libsrc/Wi/odbccat.c
+++ b/libsrc/Wi/odbccat.c
@@ -1,14 +1,14 @@
 /*
  *  odbccat.c
  *
- *  $Id: odbccat.c,v 1.5.2.2 2009/05/18 10:42:50 source Exp $
+ *  $Id: odbccat.c,v 1.5.2.3 2012/03/08 12:55:34 source Exp $
  *
  *  ODBC Catalogs
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/odbccat.sql b/libsrc/Wi/odbccat.sql
index 462b0b7..ab102c9 100644
--- a/libsrc/Wi/odbccat.sql
+++ b/libsrc/Wi/odbccat.sql
@@ -1,10 +1,10 @@
 --
---  $Id: odbccat.sql,v 1.2.2.2 2009/05/18 10:42:50 source Exp $
+--  $Id: odbccat.sql,v 1.2.2.3 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/odbcinc.h b/libsrc/Wi/odbcinc.h
index f8864be..7316820 100644
--- a/libsrc/Wi/odbcinc.h
+++ b/libsrc/Wi/odbcinc.h
@@ -1,14 +1,14 @@
 /*
  *  odbcinc.h
  *
- *  $Id: odbcinc.h,v 1.6.2.5 2010/09/17 22:49:23 source Exp $
+ *  $Id: odbcinc.h,v 1.6.2.6 2012/03/08 12:55:34 source Exp $
  *
  *  Include the ODBC header, whichever appropriate
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/oledb.sql b/libsrc/Wi/oledb.sql
index c32c349..a4214d2 100644
--- a/libsrc/Wi/oledb.sql
+++ b/libsrc/Wi/oledb.sql
@@ -1,14 +1,14 @@
 --
 --  oledb.sql
 --
---  $Id: oledb.sql,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+--  $Id: oledb.sql,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
 --
 --  VIRTOLEDB supporting procedures.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/openxml.sql b/libsrc/Wi/openxml.sql
index a1009a8..84362db 100644
--- a/libsrc/Wi/openxml.sql
+++ b/libsrc/Wi/openxml.sql
@@ -1,10 +1,10 @@
 --
---  $Id: openxml.sql,v 1.4.2.1 2009/04/18 21:55:12 source Exp $
+--  $Id: openxml.sql,v 1.4.2.2 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/page.c b/libsrc/Wi/page.c
index fdbdca3..ced6ac4 100644
--- a/libsrc/Wi/page.c
+++ b/libsrc/Wi/page.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: page.c,v 1.1.2.16 2011/03/14 15:47:01 source Exp $
+ *  $Id: page.c,v 1.1.2.21 2012/03/08 12:55:34 source Exp $
  *
  *  Page and Row Layout, Key Compression
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -913,6 +913,8 @@ buf_order_ck (buffer_desc_t * buf)
 {
   int inx;
   page_map_t * pm = buf->bd_content_map;
+  if (buf->bd_tree->it_key->key_id == KI_TEMP)
+    return;
   for (inx = 0; inx < pm->pm_count - 1; inx++)
     {
       if (DVC_LESS != buf_row_compare (buf, inx, inx + 1))
@@ -925,9 +927,20 @@ buf_order_ck (buffer_desc_t * buf)
 #define buf_order_ck(b)
 #endif
 
+#ifdef NDEBUG
+static long
+pf_count_registered (buffer_desc_t * buf)
+{
+  long cr_fill = 0;
+  it_cursor_t * cr = buf->bd_registered;
+  for (cr = cr; cr; cr = cr->itc_next_on_page)
+    cr_fill++;
+  return cr_fill;
+}
+#endif
 
 void
-pf_fill_registered (page_fill_t * pf, buffer_desc_t * buf)
+pf_fill_registered (page_fill_t * pf, buffer_desc_t * buf, it_cursor_t * itc)
 {
   int cr_fill = 0;
   it_cursor_t * cr = buf->bd_registered;
@@ -936,7 +949,14 @@ pf_fill_registered (page_fill_t * pf, buffer_desc_t * buf)
     {
       pf->pf_registered[cr_fill++] = (placeholder_t *) cr;
       if (cr_fill >= MAX_ITCS_ON_PAGE)
+	{
+#ifdef NDEBUG
+	  log_error ("Too many cursors: %ld on splitting page.", pf_count_registered (buf));
+	  itc_bust_this_trx (itc, buf, ITC_BUST_THROW);
+#else
 	GPF_T1 ("too many cursors on splitting page.");
+#endif
+	}
     }
   pf->pf_cr_fill = cr_fill;
 }
@@ -1650,6 +1670,25 @@ row_refit_col (buffer_desc_t * buf, int map_pos, dbe_key_t * key, db_buf_t row,
   return 1;
 }
 
+int
+row_refit_col_space_needed (buffer_desc_t * buf, int map_pos, dbe_key_t * key, db_buf_t row, dbe_col_loc_t * cl, db_buf_t bytes, int new_len, int * space_ret)
+{
+  /* insert the new val if fits.  If If fits, return the space left in space_ret.  If did not fit, return how much extra space is needed in space_ret */
+  int space = *space_ret;
+  short off, len;
+  pg_check_map (buf);
+  if (DV_DB_NULL == DV_TYPE_OF (bytes))
+    new_len = 0;
+  KEY_PRESENT_VAR_COL (key, row, (*cl), off, len);
+  if (new_len - len > space)
+    {
+      *space_ret = new_len - len;
+      return 0;
+    }
+  *space_ret -= new_len - len;
+  return 1;
+}
+
 
 void
 page_row_spacing (buffer_desc_t * buf, short row_gap, short ins_inx, int ins_gap)
@@ -1693,12 +1732,13 @@ pf_rd_refit_1 (page_fill_t * pf, row_delta_t * rd, int recursive)
   db_buf_t row = buf->bd_buffer + pm->pm_entries[rd->rd_map_pos];
   dbe_key_t * key = rd->rd_key->key_versions[IE_KEY_VERSION (row)];
   int inx, rc = 0;
-  int space = row_space_after (buf, rd->rd_map_pos), avail, gap;
+  int space = row_space_after (buf, rd->rd_map_pos), avail, gap, space_needed = 0, space_before = space;
   if (!buf->bd_is_write || !buf->bd_is_dirty) GPF_T1 ("refit1 for non excl or non dirty buffer");
   for (inx = 0; inx < rd->rd_n_values; inx++)
     {
       if (rd->rd_upd_change[inx])
 	{
+	  space_before = space;
 	  rc = row_refit_col (buf, rd->rd_map_pos, key, row, rd->rd_upd_change[inx], rd->rd_values[inx], box_length_on_row (rd->rd_values[inx]), &space);
 	  if (!rc)
 	    break;
@@ -1714,8 +1754,26 @@ pf_rd_refit_1 (page_fill_t * pf, row_delta_t * rd, int recursive)
       return 1;
     }
   /* the cols did not fit.  See if need rearrange or split */
-  if (recursive) GPF_T1 ("still did not refit on recursive call");
-  space = ROW_ALIGN (space);
+  if (recursive)
+    {
+      log_error ("can not refit row key: %s space %d, gap: %d pm free: %d, pm count: %d",
+	  	rd->rd_key ? rd->rd_key->key_name : "no key", space, gap, pm->pm_bytes_free, pm->pm_count);
+      GPF_T1 ("still did not refit on recursive call");
+    }
+  for (space = space_before; inx < rd->rd_n_values; inx++)
+    {
+      if (rd->rd_upd_change[inx])
+	{
+	  space_before = space;
+	  rc = row_refit_col_space_needed (buf, rd->rd_map_pos, key, row, rd->rd_upd_change[inx], rd->rd_values[inx], box_length_on_row (rd->rd_values[inx]), &space);
+	  if (!rc)
+	    {
+	      space_needed += space;
+	      space = space_before;
+	    }
+	}
+    }
+  space = ROW_ALIGN (space_needed);
     if (space > pm->pm_bytes_free)
     {
       rd->rd_op = RD_UPDATE;
@@ -2243,7 +2301,7 @@ page_apply_1 (it_cursor_t * itc, buffer_desc_t * buf, int n_delta, row_delta_t *
   pf.pf_org = buf;
   pf.pf_current = t_buf;
   if (op != PA_REWRITE_ONLY)
-    pf_fill_registered (&pf, buf);
+    pf_fill_registered (&pf, buf, itc);
   if (org_pm->pm_bytes_free < bytes_delta)
     {
       if (!itc->itc_n_pages_on_hold && op != PA_REWRITE_ONLY)
diff --git a/libsrc/Wi/phrasematch.sql b/libsrc/Wi/phrasematch.sql
index 4f9426a..13839ba 100644
--- a/libsrc/Wi/phrasematch.sql
+++ b/libsrc/Wi/phrasematch.sql
@@ -1,10 +1,10 @@
 --
---  $Id: phrasematch.sql,v 1.5.2.2 2009/04/18 21:55:12 source Exp $
+--  $Id: phrasematch.sql,v 1.5.2.3 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/pldbgcli.c b/libsrc/Wi/pldbgcli.c
index b464f45..be5526a 100644
--- a/libsrc/Wi/pldbgcli.c
+++ b/libsrc/Wi/pldbgcli.c
@@ -1,14 +1,14 @@
 /*
  *  pldbgcli.c
  *
- *  $Id: pldbgcli.c,v 1.3.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: pldbgcli.c,v 1.3.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  PL debugger client API
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/pldebug.c b/libsrc/Wi/pldebug.c
index c48c85b..539efc2 100644
--- a/libsrc/Wi/pldebug.c
+++ b/libsrc/Wi/pldebug.c
@@ -1,14 +1,14 @@
 /*
  *  pldebug.c
  *
- *  $Id: pldebug.c,v 1.5.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: pldebug.c,v 1.5.2.5 2012/03/08 12:55:34 source Exp $
  *
  *  PL Debugger
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -272,6 +272,12 @@ pldbg_print_value (dk_session_t * ses, box_t box, query_instance_t *qi)
 	    SES_PRINT (ses, "}\n");
 	  }
 	break;
+	case DV_BIN:
+	  {
+	    snprintf (tmp, sizeof (tmp), " LEN %ld", box_length (box));
+	    SES_PRINT (ses, tmp);
+	  }
+	break;
       default:
 	    {
 	      caddr_t err_ret = NULL;
@@ -533,12 +539,15 @@ static query_t *
 pldbg_get_qr (char * name)
 {
   int inx;
-  query_t * qr;
+  query_t * qr = NULL;
+  const char * pname;
 
   if (!name)
     return NULL;
 
-  qr = sch_proc_def (wi_inst.wi_schema, name);
+  pname = sch_full_proc_name (wi_inst.wi_schema, name, "DB", "DBA");
+  if (pname)
+    qr = sch_proc_def (wi_inst.wi_schema, pname);
   if (!qr) /* triggers */
     {
       dbe_table_t *tb;
@@ -823,7 +832,7 @@ pldbg_cmd_execute (dk_session_t * ses, caddr_t * args)
 			}
 		  case PDI_THRE: /* stopped threads */
 			{
-			  char conn_id[20];
+			  char conn_id[30];
 			  client_connection_t * cli;
 			  IN_TXN;
 			  DO_SET (lock_trx_t *, lt, &all_trxs)
@@ -841,7 +850,8 @@ pldbg_cmd_execute (dk_session_t * ses, caddr_t * args)
 					cli->cli_pldbg->pd_id = box_copy (c_ses->dks_peer_name);
 				      else
 					{
-					  snprintf (conn_id, sizeof (conn_id), "INTERNAL:%lX", (unsigned long) (uptrlong) cli);
+					  char * ct = cli && cli->cli_ws ? "HTTP" : "INTERNAL";
+					  snprintf (conn_id, sizeof (conn_id), "%s:%lX", ct, (unsigned long) (uptrlong) cli);
 					  cli->cli_pldbg->pd_id = box_dv_short_string (conn_id);
 					}
 				    }
diff --git a/libsrc/Wi/pldebug.h b/libsrc/Wi/pldebug.h
index 52e37cd..1249110 100644
--- a/libsrc/Wi/pldebug.h
+++ b/libsrc/Wi/pldebug.h
@@ -1,14 +1,14 @@
 /*
  *  pldebug.h
  *
- *  $Id: pldebug.h,v 1.4.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: pldebug.h,v 1.4.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  PL debugger structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/plugin_gate.c b/libsrc/Wi/plugin_gate.c
index 8f7ced6..560ad00 100644
--- a/libsrc/Wi/plugin_gate.c
+++ b/libsrc/Wi/plugin_gate.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: plugin_gate.c,v 1.2.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: plugin_gate.c,v 1.2.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/plugin_loader.c b/libsrc/Wi/plugin_loader.c
index 985e410..345e2e1 100644
--- a/libsrc/Wi/plugin_loader.c
+++ b/libsrc/Wi/plugin_loader.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: plugin_loader.c,v 1.5.2.1 2009/04/18 21:55:12 source Exp $
+ *  $Id: plugin_loader.c,v 1.5.2.2 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/pop3_svr.sql b/libsrc/Wi/pop3_svr.sql
index 394f80b..25d1a86 100644
--- a/libsrc/Wi/pop3_svr.sql
+++ b/libsrc/Wi/pop3_svr.sql
@@ -1,10 +1,10 @@
 --
---  $Id: pop3_svr.sql,v 1.3.2.1 2009/04/18 21:55:12 source Exp $
+--  $Id: pop3_svr.sql,v 1.3.2.3 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -600,7 +600,7 @@ pop_spam_filter_init ()
 {
    declare _from_ini varchar;
 
-   _from_ini := cfg_item_value(virtuoso_ini_path(), 'HTTPServer', 'SpamFilter');
+   _from_ini := virtuoso_ini_item_value ('HTTPServer', 'SpamFilter');
 
    if (_from_ini is NULL or _from_ini <> '1')
      registry_set ('__spam_filtering', '0');
diff --git a/libsrc/Wi/rdf_core.c b/libsrc/Wi/rdf_core.c
index 5ffcb7d..744def6 100644
--- a/libsrc/Wi/rdf_core.c
+++ b/libsrc/Wi/rdf_core.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: rdf_core.c,v 1.59.2.36 2011/02/28 17:02:46 source Exp $
+ *  $Id: rdf_core.c,v 1.59.2.53 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -49,6 +49,16 @@ extern "C" {
 #define rdf_dbg_printf(x)
 #endif
 
+#ifdef _SSL
+#include <openssl/crypto.h>
+#include <openssl/ssl.h>
+#define MD5Init MD5_Init
+#define MD5Update MD5_Update
+#define MD5Final MD5_Final
+#else
+#include "../util/md5.h"
+#endif /* _SSL */
+
 int uriqa_dynamic_local = 0;
 
 caddr_t
@@ -175,6 +185,7 @@ tf_alloc (void)
 {
   NEW_VARZ (triple_feed_t, tf);
   tf->tf_blank_node_ids = id_hash_allocate (1021, sizeof (caddr_t), sizeof (caddr_t), strhash, strhashcmp);
+  id_hash_set_rehash_pct (tf->tf_blank_node_ids, 220);
   return tf;
 }
 
@@ -198,6 +209,9 @@ tf_free (triple_feed_t *tf)
     dk_free_tree (tf->tf_current_graph_uri);
   dk_free_tree (tf->tf_default_graph_iid);
   dk_free_tree (tf->tf_current_graph_iid);
+  dk_free_tree (tf->tf_boxed_input_name);
+  dk_free_tree (tf->tf_base_uri);
+  dk_free_tree (tf->tf_default_graph_uri);
   dk_free (tf, sizeof (triple_feed_t));
 }
 
@@ -268,24 +282,26 @@ sqlr_set_cbk_name_and_proc (client_connection_t *cli, const char *cbk_name, cons
   END_DO_SET();
 }
 
-static const char *tf_cbk_param_types[COUNTOF__TRIPLE_FEED] = {
+static const char *tf_cbk_param_types[COUNTOF__TRIPLE_FEED__ALL] = {
   "RRR",	/* e.g., DB.DBA.TTLP_EV_NEW_GRAPH(?,?) */
   "RRR",	/* e.g., DB.DBA.TTLP_EV_NEW_BLANK(?,?, ?); there was 'select DB.DBA.TTLP_EV_NEW_BLANK(?,?)' */
   "RRRR",	/* e.g., DB.DBA.TTLP_EV_GET_IID(?,?,?, ?); there was 'select DB.DBA.TTLP_EV_GET_IID(?,?,?)'  */
   "RRRRR",	/* e.g., DB.DBA.TTLP_EV_TRIPLE(?, ?, ?, ?, ?) */
   "RRRRRRR",	/* e.g., DB.DBA.TTLP_EV_TRIPLE_L(?, ?, ?, ?,?,?, ?) */
   "RR",		/* e.g., DB.DBA.TTLP_EV_COMMIT(?,?) */
-  "RRRRRRRRRRR" }; /* e.g., DB.DBA.TTLP_EV_REPORT_DEFAULT(?,?,?,?,?,?,?,?,?,?,?) */
+  "RRRRRRRRRRR",	/* e.g., DB.DBA.TTLP_EV_REPORT_DEFAULT(?,?,?,?,?,?,?,?,?,?,?) */
+  "RRR" };		/* e.g., DB.DBA.TTLP_EV_NEW_BASE(?,?,?) */
 
 
 void
-tf_set_cbk_names (triple_feed_t *tf, const char **cbk_names)
+tf_set_cbk_names (triple_feed_t *tf, ccaddr_t *cbk_names)
 {
+  int cbk_count = BOX_ELEMENTS (cbk_names);
   int ctr;
-  for (ctr = 0; ctr < COUNTOF__TRIPLE_FEED; ctr++)
+  for (ctr = 0; ctr < COUNTOF__TRIPLE_FEED__ALL; ctr++)
     {
       caddr_t err = NULL;
-      if ('\0' == cbk_names[ctr][0])
+      if ((ctr >= cbk_count) || ('\0' == cbk_names[ctr][0]))
         {
           tf->tf_cbk_names[ctr] = NULL;
           tf->tf_cbk_qrs[ctr] = NULL;
@@ -400,7 +416,7 @@ tf_report (triple_feed_t *tf, char msg_type, const char *sqlstate, const char *s
   BOX_AUTO_TYPED (void **, params, params_buf, sizeof (caddr_t) * 11, DV_ARRAY_OF_POINTER);
   msg_no_box = box_num (tf->tf_message_count++);
   msg_type_box = box_dv_short_nchars (&msg_type, 1);
-  inp_name_box = box_dv_short_string (tf->tf_input_name);
+  inp_name_box = box_copy (tf->tf_boxed_input_name);
   line_no_box = ((NULL != tf->tf_line_no_ptr) ? box_num (tf->tf_line_no_ptr[0]) : NULL);
   triple_no_box = box_num (tf->tf_triple_count);
   sqlstate_box = box_dv_short_string (sqlstate);
@@ -452,8 +468,52 @@ tf_report (triple_feed_t *tf, char msg_type, const char *sqlstate, const char *s
 #endif
 }
 
+
+void
+tf_new_base (triple_feed_t *tf, caddr_t new_base)
+{
+  if ((NULL != tf->tf_cbk_names[TRIPLE_FEED_NEW_GRAPH]) && (NULL != tf->tf_current_graph_uri))
+    tf_commit (tf);
+  if (tf->tf_current_graph_uri != tf->tf_default_graph_uri)
+    {
+      dk_free_tree (tf->tf_current_graph_uri);
+      tf->tf_current_graph_uri = NULL;
+    }
+  tf->tf_current_graph_uri = tf->tf_default_graph_uri;
+  if (NULL != tf->tf_base_uri)
+    {
+      dk_free_box (new_base);
+      sqlr_new_error ("37000", "SP029", "Multiple base URI declarations are not supported");
+    }
+  dk_free_box (tf->tf_base_uri); tf->tf_base_uri = box_dv_short_string (new_base);
+  do {
+      query_t *cbk_qr = tf->tf_cbk_qrs[TRIPLE_FEED_NEW_BASE];
+      char params_buf [BOX_AUTO_OVERHEAD + sizeof (caddr_t) * 3];
+      void **params;
+      caddr_t err = NULL;
+      if (NULL == cbk_qr)
+        GPF_T;
+      BOX_AUTO_TYPED (void **, params, params_buf, sizeof (caddr_t) * 3, DV_ARRAY_OF_POINTER);
+      params[0] = &(tf->tf_base_uri);
+      params[1] = &(tf->tf_default_graph_uri);
+      params[2] = &(tf->tf_app_env);
+      err = qr_exec (tf->tf_qi->qi_client, cbk_qr, tf->tf_qi, NULL, NULL, NULL, (caddr_t *)params, NULL, 0);
+      BOX_DONE (params, params_buf);
+      if (NULL != err)
+        sqlr_resignal (err);
+    } while (0);
+  if (NULL != tf->tf_cbk_names[TRIPLE_FEED_NEW_GRAPH]) {
+      dk_free_tree (tf->tf_current_graph_iid);
+      if (TF_ONE_GRAPH_AT_TIME (tf)) {
+          tf->tf_current_graph_iid = NULL; /* to avoid double free in case of error in tf_get_iid() below */
+          tf->tf_default_graph_iid = tf_get_iid (tf, tf->tf_default_graph_uri); }
+      tf->tf_current_graph_iid = box_copy (tf->tf_default_graph_iid);
+      tf_new_graph (tf, tf->tf_current_graph_uri); }
+}
+
+
 caddr_t
-bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+bif_rdf_load_rdfxml_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, int mode_bits, const char *bifname)
 {
   caddr_t text_arg;
   dtp_t dtp_of_text_arg;
@@ -467,18 +527,17 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t graph_uri;
   ccaddr_t *cbk_names;
   caddr_t *app_env;
-  int mode_bits = 0;
   int n_args = BOX_ELEMENTS (args);
   /*wcharset_t * volatile charset = QST_CHARSET (qst) ? QST_CHARSET (qst) : default_charset;*/
-  text_arg = bif_arg (qst, args, 0, "rdf_load_rdfxml");
-  mode_bits = bif_long_arg (qst, args, 1, "rdf_load_rdfxml");
-  graph_uri = bif_string_or_wide_or_uname_arg (qst, args, 2, "rdf_load_rdfxml");
-  cbk_names = (ccaddr_t *)bif_strict_type_array_arg (DV_STRING, qst, args, 3, "rdf_load_rdfxml");
-  app_env = (caddr_t *) bif_arg (qst, args, 4, "rdf_load_rdfxml");
-  if (COUNTOF__TRIPLE_FEED != BOX_ELEMENTS (cbk_names))
+  text_arg = bif_arg (qst, args, 0, bifname);
+  mode_bits |= bif_long_arg (qst, args, 1, bifname);
+  graph_uri = bif_string_or_wide_or_uname_arg (qst, args, 2, bifname);
+  cbk_names = (ccaddr_t *)bif_strict_type_array_arg (DV_STRING, qst, args, 3, bifname);
+  app_env = (caddr_t *) bif_arg (qst, args, 4, bifname);
+  if ((COUNTOF__TRIPLE_FEED__REQUIRED > BOX_ELEMENTS (cbk_names)) || (COUNTOF__TRIPLE_FEED__ALL < BOX_ELEMENTS (cbk_names)))
     sqlr_new_error ("22023", "RDF01",
-      "The argument #4 of rdf_load_rdfxml() should be a vector of %d names of stored procedures",
-      COUNTOF__TRIPLE_FEED );
+      "The argument #4 of %.200s() should be a vector of %d to %d names of stored procedures",
+      bifname, COUNTOF__TRIPLE_FEED__REQUIRED, COUNTOF__TRIPLE_FEED__ALL );
   dtp_of_text_arg = DV_TYPE_OF (text_arg);
   /*ns_2dict.xn2_size = 0;*/
   do
@@ -499,12 +558,12 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	  int ses_sort = looks_like_serialized_xml (((query_instance_t *)(qst)), text_arg);
 	  if (XE_XPER_SERIALIZATION == ses_sort)
 	    sqlr_error ("42000",
-	      "Function rdf_load_rdfxml() does not support loading from string session with persistent XML data");
+	      "Function %.200s() does not support loading from string session with persistent XML data", bifname );
 	  if (XE_XPACK_SERIALIZATION == ses_sort)
 	    {
 #if 1
 	    sqlr_error ("42000",
-	      "Function rdf_load_rdfxml() does not support loading from string session with packed XML data");
+	      "Function %.200s() does not support loading from string session with packed XML data", bifname );
 #else
 	      caddr_t *tree_tmp = NULL; /* Solely to avoid dummy warning C4090: 'function' : different 'volatile' qualifiers */
 	      xte_deserialize_packed ((dk_session_t *)text_arg, &tree_tmp, dtd_ptr);
@@ -520,18 +579,18 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	}
       if (dtp_of_text_arg == DV_BLOB_XPER_HANDLE)
 	sqlr_error ("42000",
-	  "Function rdf_load_rdfxml() does not support loading from persistent XML objects");
+	  "Function %.200s() does not support loading from persistent XML objects", bifname );
       if ((DV_BLOB_HANDLE == dtp_of_text_arg) || (DV_BLOB_WIDE_HANDLE == dtp_of_text_arg))
 	{
 	  int blob_sort = looks_like_serialized_xml (((query_instance_t *)(qst)), text_arg);
 	  if (XE_XPER_SERIALIZATION == blob_sort)
 	    sqlr_error ("42000",
-	      "Function rdf_load_rdfxml() does not support loading from BLOBs with persistent XML data");
+	      "Function %.200s() does not support loading from BLOBs with persistent XML data", bifname );
 	  if (XE_XPACK_SERIALIZATION == blob_sort)
 	    {
 #if 1
 	    sqlr_error ("42000",
-	      "Function rdf_load_rdfxml() does not support loading from BLOBs with packed XML data");
+	      "Function %.200s() does not support loading from BLOBs with packed XML data", bifname );
 #else
 	      caddr_t *tree_tmp = NULL; /* Solely to avoid dummy warning C4090: 'function' : different 'volatile' qualifiers */
 	      dk_session_t *ses = blob_to_string_output (((query_instance_t *)(qst))->qi_trx, text_arg);
@@ -541,7 +600,7 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	        dtd_addref (dtd, 0);
 	      strses_free (ses);
 	      if ((NULL == tree) && (DEAD_HTML != (parser_mode & ~(FINE_XSLT | GE_XML | WEBIMPORT_HTML | FINE_XML_SRCPOS))))
-		sqlr_error ("42000", "The BLOB passed to a function rdf_load_rdfxml() contains corrupted packed XML serialization data");
+		sqlr_error ("42000", "The BLOB passed to a function %.200s() contains corrupted packed XML serialization data", bifname);
 	      goto tree_complete; /* see below */
 #endif
 	    }
@@ -549,8 +608,8 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	  break;
 	}
       sqlr_error ("42000",
-	"Function rdf_load_rdfxml() needs a string or string session or BLOB as argument 1, not an arg of type %s (%d)",
-	dv_type_title (dtp_of_text_arg), dtp_of_text_arg);
+	"Function %.200s() needs a string or string session or BLOB as argument 1, not an arg of type %s (%d), bifname",
+	bifname, dv_type_title (dtp_of_text_arg), dtp_of_text_arg);
     } while (0);
   /* Now we have \c text ready to process */
 
@@ -562,13 +621,13 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     {
     default:
 /*    case 9:
-      dtd_config = bif_array_or_null_arg (qst, args, 8, "rdf_load_rdfxml");*/
+      dtd_config = bif_array_or_null_arg (qst, args, 8, bifname);*/
     case 8:
-      lh = lh_get_handler (bif_string_arg (qst, args, 7, "rdf_load_rdfxml"));
+      lh = lh_get_handler (bif_string_arg (qst, args, 7, bifname));
     case 7:
-      enc = bif_string_arg (qst, args, 6, "rdf_load_rdfxml");
+      enc = bif_string_arg (qst, args, 6, bifname);
     case 6:
-      base_uri = bif_string_or_uname_arg (qst, args, 5, "rdf_load_rdfxml");
+      base_uri = bif_string_or_uname_or_wide_or_null_arg (qst, args, 5, bifname);
     case 5:
     case 4:
     case 3:
@@ -585,6 +644,27 @@ bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 }
 
 
+caddr_t
+bif_rdf_load_rdfxml (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_rdf_load_rdfxml_impl (qst, err_ret, args, 0, "rdf_load_rdfxml");
+}
+
+
+caddr_t
+bif_rdf_load_rdfa (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_rdf_load_rdfxml_impl (qst, err_ret, args, RDFXML_IN_ATTRIBUTES, "rdf_load_rdfa");
+}
+
+
+caddr_t
+bif_rdf_load_microdata (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_rdf_load_rdfxml_impl (qst, err_ret, args, RDFXML_IN_MDATA, "rdf_load_microdata");
+}
+
+
 ttlp_t *
 ttlp_alloc (void)
 {
@@ -598,10 +678,46 @@ ttlp_alloc (void)
 }
 
 void
+ttlp_enter_trig_group (ttlp_t *ttlp)
+{
+  ttlp->ttlp_default_ns_uri_saved = ttlp->ttlp_default_ns_uri;
+  ttlp->ttlp_base_uri_saved = ttlp->ttlp_base_uri;
+  ttlp->ttlp_in_trig_graph = 1;
+}
+
+void
+ttlp_leave_trig_group (ttlp_t *ttlp)
+{
+  if (ttlp->ttlp_default_ns_uri_saved != ttlp->ttlp_default_ns_uri)
+    {
+      dk_free_box (ttlp->ttlp_default_ns_uri);
+      ttlp->ttlp_default_ns_uri = ttlp->ttlp_default_ns_uri_saved;
+      ttlp->ttlp_default_ns_uri_saved = NULL;
+    }
+  if (ttlp->ttlp_base_uri_saved != ttlp->ttlp_base_uri)
+    {
+      dk_free_box (ttlp->ttlp_base_uri);
+      ttlp->ttlp_base_uri = ttlp->ttlp_base_uri_saved;
+      ttlp->ttlp_base_uri_saved = NULL;
+    }
+  dk_free_box ((caddr_t)(ttlp->ttlp_inner_namespaces_prefix2iri));
+  ttlp->ttlp_inner_namespaces_prefix2iri = NULL;
+  ttlp->ttlp_in_trig_graph = 0;
+}
+
+void
 ttlp_free (ttlp_t *ttlp)
 {
+  if (ttlp->ttlp_in_trig_graph)
+    {
+      dk_free_box ((caddr_t)(ttlp->ttlp_inner_namespaces_prefix2iri));
+      if (ttlp->ttlp_default_ns_uri_saved != ttlp->ttlp_default_ns_uri)
+        dk_free_box (ttlp->ttlp_default_ns_uri_saved);
+      if (ttlp->ttlp_base_uri_saved != ttlp->ttlp_base_uri)
+        dk_free_box (ttlp->ttlp_base_uri_saved);
+    }
   dk_free_box (ttlp->ttlp_default_ns_uri);
-  dk_free_box (ttlp->ttlp_namespaces_prefix2iri);
+  dk_free_box ((caddr_t)(ttlp->ttlp_namespaces_prefix2iri));
   while (NULL != ttlp->ttlp_saved_uris)
     dk_free_tree ((box_t) dk_set_pop (&(ttlp->ttlp_saved_uris)));
   while (NULL != ttlp->ttlp_unused_seq_bnodes)
@@ -613,8 +729,6 @@ ttlp_free (ttlp_t *ttlp)
   dk_free_tree (ttlp->ttlp_obj_type);
   dk_free_tree (ttlp->ttlp_obj_lang);
   dk_free_tree (ttlp->ttlp_formula_iid);
-  dk_free_tree (ttlp->ttlp_tf->tf_base_uri);
-  dk_free_tree (ttlp->ttlp_tf->tf_default_graph_uri);
   tf_free (ttlp->ttlp_tf);
   dk_free (ttlp, sizeof (ttlp_t));
 }
@@ -740,6 +854,7 @@ caddr_t ttlp_strliteral (ttlp_t *ttlp_arg, const char *strg, int mode, char deli
 	}
     }
   res = box_dv_short_nchars (tmp_buf, tgt_tail - tmp_buf);
+  box_flags (res) = BF_UTF8;
   dk_free_box (tmp_buf);
   return res;
 
@@ -809,25 +924,28 @@ this means that <#foo> can be written :foo and using @keywords one can reduce th
       goto ns_uri_found; /* see below */
     }
   lname++;
-  ns_dict = ttlp_arg[0].ttlp_namespaces_prefix2iri;
   ns_pref = box_dv_short_nchars (qname, lname - qname);
-  ns_uri_ptr = ((NULL == ns_dict) ? NULL : (caddr_t *) id_hash_get (ns_dict, (caddr_t)(&ns_pref)));
-  if (NULL != ns_uri_ptr)
-    ns_uri = ns_uri_ptr[0];
-  else
-    {
-      if (!strcmp (ns_pref, "rdf:"))
-        ns_uri = uname_rdf_ns_uri;
-      else if (!strcmp (ns_pref, "xsd:"))
-        ns_uri = uname_xmlschema_ns_uri_hash;
-      else if (!strcmp (ns_pref, "virtrdf:"))
-        ns_uri = uname_virtrdf_ns_uri;
-      else
+  do {
+      if (ttlp_arg[0].ttlp_in_trig_graph)
         {
-          dk_free_box (ns_pref);
-          ttlyyerror_impl (ttlp_arg, qname, "Undefined namespace prefix");
+          ns_dict = ttlp_arg[0].ttlp_inner_namespaces_prefix2iri;
+          ns_uri_ptr = ((NULL == ns_dict) ? NULL : (caddr_t *) id_hash_get (ns_dict, (caddr_t)(&ns_pref)));
+          if (NULL != ns_uri_ptr)
+            { ns_uri = ns_uri_ptr[0]; break; }
         }
-    }
+      ns_dict = ttlp_arg[0].ttlp_namespaces_prefix2iri;
+      ns_uri_ptr = ((NULL == ns_dict) ? NULL : (caddr_t *) id_hash_get (ns_dict, (caddr_t)(&ns_pref)));
+      if (NULL != ns_uri_ptr)
+        { ns_uri = ns_uri_ptr[0]; break; }
+      if (!strcmp (ns_pref, "rdf:"))
+        { ns_uri = uname_rdf_ns_uri; break; }
+      if (!strcmp (ns_pref, "xsd:"))
+        { ns_uri = uname_xmlschema_ns_uri_hash; break; }
+      if (!strcmp (ns_pref, "virtrdf:"))
+        { ns_uri = uname_virtrdf_ns_uri; break; }
+      dk_free_box (ns_pref);
+      ttlyyerror_impl (ttlp_arg, qname, "Undefined namespace prefix");
+    } while (0);
   dk_free_box (ns_pref);
   ns_uri_len = box_length (ns_uri) - 1;
 
@@ -928,6 +1046,18 @@ ttlp_triple_l_and_inf (ttlp_t *ttlp_arg, caddr_t o_sqlval, caddr_t o_dt, caddr_t
   tf_triple_l (ttlp_arg[0].ttlp_tf, s, p, o_sqlval, o_dt, o_lang);
 }
 
+void
+ttlp_triples_for_bnodes_debug (ttlp_t *ttlp_arg, caddr_t bnode_iid, int lineno, caddr_t label)
+{
+  triple_feed_t *tf = ttlp_arg[0].ttlp_tf;
+  if (NULL != ttlp_arg->ttlp_base_uri)
+    tf_triple_l (tf, bnode_iid, uname_virtrdf_ns_uri_bnode_base, ttlp_arg->ttlp_base_uri, NULL, NULL);
+  tf_triple_l (tf, bnode_iid, uname_virtrdf_ns_uri_bnode_row, box_num_nonull (lineno), NULL, NULL);
+  if (NULL != label)
+    tf_triple_l (tf, bnode_iid, uname_virtrdf_ns_uri_bnode_label, label, NULL, NULL);
+}
+
+
 #ifdef DEBUG
 #define TF_TRIPLE_PROGRESS_MESSAGE_MOD 25
 #else
@@ -1024,10 +1154,10 @@ bif_rdf_load_turtle (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t *app_env = (caddr_t *) bif_arg (qst, args, 5, "rdf_load_turtle");
   caddr_t err = NULL;
   caddr_t res;
-  if (COUNTOF__TRIPLE_FEED != BOX_ELEMENTS (cbk_names))
+  if ((COUNTOF__TRIPLE_FEED__REQUIRED > BOX_ELEMENTS (cbk_names)) || (COUNTOF__TRIPLE_FEED__ALL < BOX_ELEMENTS (cbk_names)))
     sqlr_new_error ("22023", "RDF01",
-      "The argument #4 of rdf_load_turtle() should be a vector of %d texts of SQL statements",
-      COUNTOF__TRIPLE_FEED );
+      "The argument #4 of rdf_load_turtle() should be a vector of %d to %d names of stored procedures",
+      COUNTOF__TRIPLE_FEED__REQUIRED, COUNTOF__TRIPLE_FEED__ALL );
   res = rdf_load_turtle (str, 0, base_uri, graph_uri, flags,
     (ccaddr_t *) cbk_names, app_env,
     (query_instance_t *)qst, QST_CHARSET(qst), &err );
@@ -1050,10 +1180,10 @@ bif_rdf_load_turtle_local_file (caddr_t * qst, caddr_t * err_ret, state_slot_t *
   caddr_t *app_env = (caddr_t *) bif_arg (qst, args, 5, "rdf_load_turtle_local_file");
   caddr_t err = NULL;
   caddr_t res;
-  if (COUNTOF__TRIPLE_FEED != BOX_ELEMENTS (cbk_names))
+  if ((COUNTOF__TRIPLE_FEED__REQUIRED > BOX_ELEMENTS (cbk_names)) || (COUNTOF__TRIPLE_FEED__ALL < BOX_ELEMENTS (cbk_names)))
     sqlr_new_error ("22023", "RDF01",
-      "The argument #4 of rdf_load_turtle() should be a vector of %d texts of SQL statements",
-      COUNTOF__TRIPLE_FEED );
+      "The argument #4 of rdf_load_turtle() should be a vector of %d to %d names of stored procedures",
+      COUNTOF__TRIPLE_FEED__REQUIRED, COUNTOF__TRIPLE_FEED__ALL );
   file_path_assert (str, NULL, 0);
   res = rdf_load_turtle (str, 1, base_uri, graph_uri, flags,
     (ccaddr_t *) cbk_names, app_env,
@@ -1070,7 +1200,8 @@ caddr_t
 bif_turtle_lex_analyze (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t str = bif_string_arg (qst, args, 0, "turtle_lex_analyze");
-  return ttl_query_lex_analyze (str, QST_CHARSET(qst));
+  int mode_flags = ((1 < BOX_ELEMENTS(args)) ? bif_long_arg (qst, args, 1, "turtle_lex_analyze") : 0);
+  return ttl_lex_analyze (str, mode_flags, QST_CHARSET(qst));
 }
 
 #ifdef DEBUG
@@ -1091,6 +1222,7 @@ ttl_lexem_descr_t ttl_lexem_descrs[__TTL_NONPUNCT_END+1];
 #define LITERAL(x) 'L', (x)
 #define FAKE(x) 'F', (x)
 #define TTL "s"
+#define TRIG "t"
 
 #define LAST(x) "L", (x)
 #define LAST1(x) "K", (x)
@@ -1098,6 +1230,7 @@ ttl_lexem_descr_t ttl_lexem_descrs[__TTL_NONPUNCT_END+1];
 #define ERR(x)  "E", (x)
 
 #define PUNCT_TTL_LAST(x) PUNCT(x), TTL, LAST(x)
+#define PUNCT_TRIG_LAST(x) PUNCT(x), TRIG, LAST(x)
 
 
 static void ttl_lex_props (int val, const char *yname, char fmttype, const char *fmt, ...)
@@ -1145,7 +1278,7 @@ bif_turtle_lex_test (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       caddr_t **lexems;
       unsigned lex_count;
       unsigned cmd_idx = 0;
-      int last_lval, last1_lval;
+      int mode_bits = 0, last_lval, last1_lval;
       ttl_lexem_descr_t *ld = ttl_lexem_descrs + tested_lex_val;
       if (0 == ld->ld_val)
 	continue;
@@ -1158,10 +1291,11 @@ bif_turtle_lex_test (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 	  cmd = ld->ld_tests[cmd_idx][0];
 	  switch (cmd)
 	    {
-	    case 's': break;	/* Fake, TURTLE has only one mode */
+	    case 's': mode_bits = 0; break;
+	    case 't': mode_bits = TTLP_ALLOW_TRIG; break;
 	    case 'K': case 'L': case 'M': case 'E':
 	      cmd_idx++;
-	      lexems = (caddr_t **) ttl_query_lex_analyze (ld->ld_tests[cmd_idx], QST_CHARSET(qst));
+	      lexems = (caddr_t **) ttl_lex_analyze (ld->ld_tests[cmd_idx], mode_bits, QST_CHARSET(qst));
 	      dk_set_push (&report, box_dv_short_string (ld->ld_tests[cmd_idx]));
 	      lex_count = BOX_ELEMENTS (lexems);
 	      if (0 == lex_count)
@@ -1407,13 +1541,13 @@ lt_nic_rollback_hook (lock_trx_t * lt)
 
 
 caddr_t
-nic_id_name (name_id_cache_t * nic, boxint id)
+DBG_NAME(nic_id_name) (DBG_PARAMS name_id_cache_t * nic, boxint id)
 {
   caddr_t ret;
   boxint r;
   mutex_enter (nic->nic_mtx);
   gethash_64 (r, id, nic->nic_id_to_name);
-  ret = r ? box_copy ((caddr_t) (ptrlong)r) : NULL;
+  ret = r ? DBG_NAME (box_copy) (DBG_ARGS (caddr_t) (ptrlong)r) : NULL;
   /* read the value inside the mtx because cache replacement may del it before the copy is made if not in the mtx */
   mutex_leave(nic->nic_mtx);
   return ret;
@@ -1775,13 +1909,47 @@ re_search:
   return iri;
 }
 
+int32 rdf_shorten_long_iri = 0;
+
+static const char ctohex[] = "0123456789abcdef";
+
+static char *
+iri_shorten (char * iri, char * buf, size_t buf_len, int * ret_len)
+{
+  unsigned char digest[16];
+  MD5_CTX ctx;
+  int inx = 0;
+  char *end = buf + buf_len - 1, *tail = buf + buf_len - 33, *str = iri + buf_len - 33;
+
+  memcpy (buf, iri, buf_len - 33); /* hex md5 + zero byte */
+  memset (&ctx, 0, sizeof (MD5_CTX));
+  MD5Init (&ctx);
+  MD5Update (&ctx, (unsigned char *) str, strlen (str));
+  MD5Final (digest, &ctx);
+  while (tail < end)
+    {
+      unsigned c = (unsigned) digest[inx++];
+      *(tail++) = ctohex[0xf & (c >> 4)];
+      *(tail++) = ctohex[0xf & c];
+    }
+  *tail = 0;
+  *ret_len = strlen (buf);
+  return buf;
+}
+
 int
 iri_split (char * iri, caddr_t * pref, caddr_t * name)
 {
   char * local_start;
   int len = strlen (iri);
+  char tmp[MAX_RULING_PART_BYTES - 20];
   if (len > MAX_RULING_PART_BYTES - 20)
+    {
+      if (rdf_shorten_long_iri)
+	iri = iri_shorten (iri, tmp, sizeof (tmp), &len);
+      else
     return 0;
+    }
   if (('_' == iri[0]) && (':' == iri[1]))
     { /* named blank node is a special case. Label can contain weird chars but it is treated as */
       local_start = iri + 2;
@@ -1980,6 +2148,7 @@ key_find_rdf_obj_1 (rdf_box_t * rb, caddr_t name)
   caddr_t dtlang = box_num ((rb->rb_type << 16) | rb->rb_lang);
   buffer_desc_t * buf;
   search_spec_t sp, sp2;
+  rb_dt_lang_check(rb);
   if (dk_set_length (key->key_parts) < 3)
     return 0;
   id_col = (dbe_column_t*)key->key_parts->next->next->data;
@@ -2050,7 +2219,7 @@ key_find_rdf_obj (lock_trx_t * lt, rdf_box_t * rb)
     if (DV_XML_ENTITY == cdtp && rb->rb_chksum_tail)
       {
 	QNCAST (rdf_bigbox_t, rbb, rb);
-
+	dk_check_tree (rbb->rbb_chksum);
 	rb->rb_ro_id = key_find_rdf_obj_1 (rb, rbb->rbb_chksum);
       }
     else
@@ -2191,7 +2360,7 @@ again:
               return 0;
             rb_complete (rb, qi->qi_trx, qi);
           }
-        name = rb->rb_box;
+        name = box_copy_tree (rb->rb_box);
         dtp = DV_TYPE_OF (name);
         goto again; /* see above */
       }
@@ -2272,15 +2441,11 @@ canon_iri_to_id (query_instance_t *qi, caddr_t canon_name, int mode, caddr_t *er
       switch (mode)
         {
         case IRI_TO_ID_IF_KNOWN:
-          return key_name_to_iri_id (qi->qi_trx, canon_name, 0); break;
+          return key_name_to_iri_id (qi->qi_trx, canon_name, 0);
         case IRI_TO_ID_WITH_CREATE:
           return key_name_to_iri_id (qi->qi_trx, canon_name, 1);
-#ifdef DEBUG
-	  if (!boxed_iid) bing ();
-#endif
-	  break;
         case IRI_TO_ID_IF_CACHED:
-          return key_name_to_existing_cached_iri_id (qi->qi_trx, canon_name); break;
+          return key_name_to_existing_cached_iri_id (qi->qi_trx, canon_name);
         }
       break;
     default: err_ret[0] = srv_make_new_error ("RDFXX", ".....",
@@ -2358,13 +2523,13 @@ caddr_t
 bif_iri_to_id_repl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t name = bif_arg (qst, args, 0, "iri_to_id_repl");
-  caddr_t tmp_name = NULL;
   caddr_t err = NULL;
   caddr_t res;
   switch (DV_TYPE_OF (name))
     {
     case DV_LONG_INT: case DV_IRI_ID:
       {
+        /* caddr_t tmp_name = NULL; */
         iri_id_t iid = unbox_iri_int64 (name);
         if (iid < min_bnode_iri_id ())
           sqlr_new_error ("22023", "SR626", "The argument of iri_to_id_repl() is an IRI_ID of URI");
@@ -2577,6 +2742,7 @@ key_id_to_canonicalized_iri (query_instance_t * qi, iri_id_t iri_id_no)
 	  caddr_t id_box = box_iri_id (iri_id_no);
 	  caddr_t ret = cl_id_to_iri (qi, id_box);
 	  dk_free_box (id_box);
+	  dk_free_box (local);
 	  return ret;
 	}
       else
@@ -3126,14 +3292,23 @@ bif_rdf_obj_ft_rule_zap_all (caddr_t * qst, caddr_t * err_ret, state_slot_t ** a
 caddr_t
 bif_rdf_obj_ft_rule_check (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  iri_id_t g_id = bif_iri_id_arg (qst, args, 0, "__rdf_obj_ft_rule_check");
-  caddr_t p = bif_arg (qst, args, 1, "__rdf_obj_ft_rule_check");
+  iri_id_t g_id;
+  caddr_t p;
   rdf_obj_ft_rule_iid_hkey_t iid_hkey;
   dtp_t p_dtp;
+  if (CL_RUN_LOCAL != cl_run_local_only)
+    {
+      caddr_t cl_text_set = registry_get ("cl_rdf_text_index");
+      char flag = cl_text_set ? cl_text_set[0] : '\0';
+      dk_free_tree (cl_text_set);
+      if ('1' == flag)
+        return box_num (2);
+    }
+  g_id = bif_iri_id_arg (qst, args, 0, "__rdf_obj_ft_rule_check");
+  p = bif_arg (qst, args, 1, "__rdf_obj_ft_rule_check");
   iid_hkey.hkey_g = 0;
   iid_hkey.hkey_iid_p = 0;
   p_dtp = DV_TYPE_OF (p);
-
   switch (p_dtp)
     {
       case DV_IRI_ID: case DV_STRING: case DV_UNAME:
@@ -3196,7 +3371,16 @@ bif_rdf_obj_ft_rule_count_in_graph (caddr_t * qst, caddr_t * err_ret, state_slot
 {
   ptrlong res = rdf_obj_ft_predonly_rule_count;
   ptrlong *graph_specific;
-  boxint g_id_int = bif_iri_id_arg (qst, args, 0, "__rdf_obj_ft_rule_count_in_graph");
+  boxint g_id_int;
+  if (CL_RUN_LOCAL != cl_run_local_only)
+    {
+      caddr_t cl_text_set = registry_get ("cl_rdf_text_index");
+      char flag = cl_text_set ? cl_text_set[0] : '\0';
+      dk_free_tree (cl_text_set);
+      if ('1' == flag)
+        return box_num (-1);
+    }
+  g_id_int = bif_iri_id_arg (qst, args, 0, "__rdf_obj_ft_rule_count_in_graph");
   mutex_enter (rdf_obj_ft_rules_mtx);
   graph_specific = (ptrlong *)id_hash_get (rdf_obj_ft_graph_rule_counts, (caddr_t)(&g_id_int));
   if (NULL != graph_specific)
@@ -3353,6 +3537,10 @@ rdf_core_init (void)
   prefix_nic_rc = resource_allocate (10, NULL, (rc_destr_t)nic_free, (rc_destr_t)nic_clear, 0);
   bif_define_typed ("rdf_load_rdfxml", bif_rdf_load_rdfxml, &bt_xml_entity);
   bif_set_uses_index (bif_rdf_load_rdfxml);
+  bif_define_typed ("rdf_load_rdfa", bif_rdf_load_rdfa, &bt_xml_entity);
+  bif_set_uses_index (bif_rdf_load_rdfa);
+  bif_define_typed ("rdf_load_microdata", bif_rdf_load_microdata, &bt_xml_entity);
+  bif_set_uses_index (bif_rdf_load_microdata);
   bif_define ("rdf_load_turtle", bif_rdf_load_turtle);
   bif_set_uses_index (bif_rdf_load_turtle);
   bif_define ("rdf_load_turtle_local_file", bif_rdf_load_turtle_local_file);
diff --git a/libsrc/Wi/rdf_core.h b/libsrc/Wi/rdf_core.h
index e2d7b49..c7e6af1 100644
--- a/libsrc/Wi/rdf_core.h
+++ b/libsrc/Wi/rdf_core.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: rdf_core.h,v 1.30.2.23 2011/01/03 10:17:27 source Exp $
+ *  $Id: rdf_core.h,v 1.30.2.30 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -44,7 +44,7 @@ extern int key_id_to_namespace_and_local (query_instance_t *qi, iri_id_t iid, ca
 #define rdf_type_twobyte_to_iri(twobyte) nic_id_name (rdf_type_cache, (twobyte))
 #define rdf_lang_twobyte_to_string(twobyte) nic_id_name (rdf_lang_cache, (twobyte))
 /*! \returns NULL for string, (ccaddr_t)((ptrlong)1) for unsupported, 2 for NULL, UNAME for others */
-extern ccaddr_t xsd_type_of_box (caddr_t arg);
+extern caddr_t xsd_type_of_box (caddr_t arg);
 /*! Casts \c new_val to some datatype appropriate for XPATH/XSLT and stores in an XSLT variable value or XQI slot passed as an address to free and set */
 extern void rb_cast_to_xpath_safe (query_instance_t *qi, caddr_t new_val, caddr_t *retval_ptr);
 #define BNODE_IID_TO_LABEL_BUFFER(buf,iid) (((iid) >= MIN_64BIT_BNODE_IRI_ID) ? \
@@ -73,21 +73,23 @@ extern void rb_cast_to_xpath_safe (query_instance_t *qi, caddr_t new_val, caddr_
 #define TRIPLE_FEED_TRIPLE_L	4
 #define TRIPLE_FEED_COMMIT	5
 #define TRIPLE_FEED_MESSAGE	6
-#define COUNTOF__TRIPLE_FEED	7
+#define COUNTOF__TRIPLE_FEED__REQUIRED	7
+#define TRIPLE_FEED_NEW_BASE	7
+#define COUNTOF__TRIPLE_FEED__ALL	8
 
 typedef struct triple_feed_s {
   query_instance_t *tf_qi;
   id_hash_t *tf_blank_node_ids;
   caddr_t *tf_app_env;		/*!< Environment for use by callbacks, owned by caller. It's "caddr_t *" instead of plain "caddr_t" because it's vector in most cases. */
-  const char *tf_input_name;	/*!< URI or file name or other name of source, can be NULL, owned by caller */
-  caddr_t tf_default_graph_uri;	/*!< Default graph uri, owned by caller */
-  caddr_t tf_current_graph_uri;	/*!< Currently active graph uri, owned by caller if equal to tf_default_graph_uri, local otherwise */
-  caddr_t tf_base_uri;		/*!< Base URI to resolve relative URIs, owned by caller  */
+  caddr_t tf_boxed_input_name;	/*!< URI or file name or other name of source, can be NULL, local */
+  caddr_t tf_default_graph_uri;	/*!< Default graph uri, local */
+  caddr_t tf_current_graph_uri;	/*!< Currently active graph uri, can be equal to tf_default_graph_uri, local */
+  caddr_t tf_base_uri;		/*!< Base URI to resolve relative URIs, local */
   caddr_t tf_default_graph_iid;	/*!< Default graph iri ID, local */
   caddr_t tf_current_graph_iid;	/*!< Current graph iri ID, local */
   const char *tf_creator;	/*!< Name of BIF that created the feed (this name is printed in diagnostics) */
-  ccaddr_t tf_cbk_names[COUNTOF__TRIPLE_FEED];	/*!< Callback names, owned by caller */
-  query_t *tf_cbk_qrs[COUNTOF__TRIPLE_FEED];	/*!< Compiled callback queries, they can be NULLs for empty string names or names that starts with '!' */
+  ccaddr_t tf_cbk_names[COUNTOF__TRIPLE_FEED__ALL];	/*!< Callback names, owned by caller */
+  query_t *tf_cbk_qrs[COUNTOF__TRIPLE_FEED__ALL];	/*!< Compiled callback queries, they can be NULLs for empty string names or names that starts with '!' */
   ptrlong tf_triple_count;	/*!< Number of triples that are sent to callbacks already, must be boxed before sending to SQL callbacks! */
   ptrlong tf_message_count;	/*!< Number of messages that are reported already, must be boxed before sending to SQL callbacks! */
   int *tf_line_no_ptr;		/*!< Pointer to some line number counter somewhere outside, may be NULL */
@@ -95,13 +97,15 @@ typedef struct triple_feed_s {
 
 extern triple_feed_t *tf_alloc (void);
 extern void tf_free (triple_feed_t *tf);
-extern void tf_set_cbk_names (triple_feed_t *tf, const char **cbk_names);
+extern void tf_set_cbk_names (triple_feed_t *tf, ccaddr_t *cbk_names);
 extern void tf_new_graph (triple_feed_t *tf, caddr_t uri);
 extern caddr_t tf_get_iid (triple_feed_t *tf, caddr_t uri);
 extern void tf_commit (triple_feed_t *tf);
 extern void tf_triple (triple_feed_t *tf, caddr_t s_uri, caddr_t p_uri, caddr_t o_uri);
 extern void tf_triple_l (triple_feed_t *tf, caddr_t s_uri, caddr_t p_uri, caddr_t obj_sqlval, caddr_t obj_datatype, caddr_t obj_language);
 extern void tf_report (triple_feed_t *tf, char msg_type, const char *sqlstate, const char *sqlmore, const char *descr);
+extern void tf_new_base (triple_feed_t *tf, caddr_t new_base);
+
 
 #define TF_ONE_GRAPH_AT_TIME(tf) (NULL != (tf)->tf_cbk_names[TRIPLE_FEED_NEW_GRAPH])
 
@@ -134,6 +138,13 @@ extern void tf_report (triple_feed_t *tf, char msg_type, const char *sqlstate, c
         tf_new_graph ((tf), (tf)->tf_current_graph_uri); } \
   } while (0)
 
+#define TF_CHANGE_BASE_AND_DEFAULT_GRAPH(tf,new_uri) do { \
+    if (NULL != (tf)->tf_cbk_names[TRIPLE_FEED_NEW_BASE]) \
+      tf_new_base ((tf),(new_uri)); \
+    else { \
+        dk_free_box ((tf)->tf_base_uri); (tf)->tf_base_uri = (new_uri); } \
+  } while (0)
+
 #define TF_GRAPH_ARG(tf) ((TF_ONE_GRAPH_AT_TIME((tf))) ? &((tf)->tf_current_graph_iid) : &(tf->tf_current_graph_uri))
 
 #define TTLP_STRING_MAY_CONTAIN_CRLF	0x0001	/*!< Single quoted and double quoted strings may contain newlines. */
@@ -146,6 +157,7 @@ extern void tf_report (triple_feed_t *tf, char msg_type, const char *sqlstate, c
 #define TTLP_ERROR_RECOVERY		0x0080	/*!< Try to recover from lexical errors as much as it is possible. */
 #define TTLP_ALLOW_TRIG			0x0100	/*!< Allows TriG syntax, thus loading data in more than one graph. */
 #define TTLP_ALLOW_NQUAD		0x0200	/*!< Enables NQuads syntax but disables TURTLE and TriG */
+#define TTLP_DEBUG_BNODES		0x1000	/*!< Add virtrdf:bnode-base, virtrdf:bnode-row and virtrdf:bnode-label triples for every created blank node. */
 
 #define TTLP_ALLOW_QNAME_A		0x01
 #define TTLP_ALLOW_QNAME_HAS		0x02
@@ -163,7 +175,7 @@ typedef struct ttlp_s
   xml_read_abend_func_t ttlp_iter_abend;
   void *ttlp_iter_data;
   encoding_handler_t *ttlp_enc;	/*!< Encoding of the source */
-  long ttlp_flags;		/*!< Flags for dirty load */
+  long ttlp_flags;		/*!< TTLP_xxx Flags for dirty load, enabling TriG or NQuad, debugging */
   /* lexer */
   int ttlp_lexlineno;		/*!< Current line number */
   int ttlp_lexdepth;		/*!< Current number of not-yet-closed parenthesis */
@@ -176,6 +188,7 @@ typedef struct ttlp_s
   id_hash_t *ttlp_namespaces_prefix2iri;	/*!< A hashtable of namespace prefixes (keys) and IRIs (values) */
   dk_set_t ttlp_saved_uris;	/*!< Stack that keeps URIs. YACC stack is not used to let us free memory on error */
   dk_set_t ttlp_unused_seq_bnodes;	/*!< A list of bnodes that were allocated for use in lists but not used because lists are terminated before use */
+  caddr_t ttlp_base_uri;		/*!< Base URI used to resolve relative URIs of the document and optionally to resolve the relative URI of the graph in "graph CRUD" endpoint */
   caddr_t ttlp_last_complete_uri;	/*!< Last \c QNAME or \c Q_IRI_REF that is expanded and resolved if needed */
   caddr_t ttlp_subj_uri;	/*!< Current subject URI, but it become object URI if ttlp_pred_is_reverse */
   caddr_t ttlp_pred_uri;	/*!< Current predicate URI */
@@ -184,12 +197,18 @@ typedef struct ttlp_s
   caddr_t ttlp_obj_lang;	/*!< Current object language mark */
   int ttlp_pred_is_reverse;	/*!< Flag if ttlp_pred_uri is used as reverse, e.g. in 'O is P of S' syntax */
   caddr_t ttlp_formula_iid;	/*!< IRI ID of the blank node of the formula ( '{ ... }' notation of N3 */
+  int ttlp_in_trig_graph;	/*!< The parser is inside TriG graph so \c ttlp_inner_namespaces_prefix2iri is in use etc. */
+  id_hash_t *ttlp_inner_namespaces_prefix2iri;	/*!< An equivalent of \c ttlp_namespaces_prefix2iri for prefixes defined inside TriG block */
+  caddr_t ttlp_default_ns_uri_saved;	/*!< In TriG, @prefix can be used inside the graph block, in that case global \c ttlp_default_ns_uri is temporarily saved here */
+  caddr_t ttlp_base_uri_saved;	/*!< In TriG, @base can be used inside the graph block, in that case global \c ttlp_base_uri is temporarily saved here */
   /* feeder */
   triple_feed_t *ttlp_tf;
 } ttlp_t;
 
 
 extern ttlp_t *ttlp_alloc (void);
+extern void ttlp_enter_trig_group (ttlp_t *ttlp);
+extern void ttlp_leave_trig_group (ttlp_t *ttlp);
 extern void ttlp_free (ttlp_t *ttlp);
 
 extern caddr_t rdf_load_turtle (
@@ -225,14 +244,16 @@ extern caddr_t ttlp_uri_resolve (ttlp_t *ttlp_arg, caddr_t qname);
 #define TTLP_STRLITERAL_3QUOT 		0x31
 #define TTLP_STRLITERAL_3QUOT_AT	0x41
 extern caddr_t ttlp_strliteral (ttlp_t *ttlp_arg, const char *sparyytext, int mode, char delimiter);
-extern caddr_t ttl_query_lex_analyze (caddr_t str, wcharset_t *query_charset);
+extern caddr_t ttl_lex_analyze (caddr_t str, int mode_bits, wcharset_t *query_charset);
 
 extern void ttlp_triple_and_inf (ttlp_t *ttlp_arg, caddr_t o_uri);
 extern void ttlp_triple_l_and_inf (ttlp_t *ttlp_arg, caddr_t o_sqlval, caddr_t o_dt, caddr_t o_lang);
+extern void ttlp_triples_for_bnodes_debug (ttlp_t *ttlp_arg, caddr_t bnode_iid, int lineno, caddr_t label);
 
 #define RDFXML_COMPLETE		0
 #define RDFXML_OMIT_TOP_RDF	1
 #define RDFXML_IN_ATTRIBUTES	2
+#define RDFXML_IN_MDATA		4
 
 extern void
 rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
diff --git a/libsrc/Wi/rdf_mapping.jso b/libsrc/Wi/rdf_mapping.jso
index a7621f2..a5dca4c 100644
--- a/libsrc/Wi/rdf_mapping.jso
+++ b/libsrc/Wi/rdf_mapping.jso
@@ -1,10 +1,10 @@
 --
---  $Id: rdf_mapping.jso,v 1.24.2.4 2010/09/17 22:49:23 source Exp $
+--  $Id: rdf_mapping.jso,v 1.24.2.7 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -78,6 +78,7 @@ JSO_SCALAR qmfIsrefOfShortTmpl STRING REQUIRED		--!< ... whether the short is re
 JSO_SCALAR qmfIsuriOfShortTmpl STRING REQUIRED		--!< ... whether the short is uri
 JSO_SCALAR qmfIsblankOfShortTmpl STRING REQUIRED	--!< ... whether the short is blank node ref
 JSO_SCALAR qmfIslitOfShortTmpl STRING REQUIRED		--!< ... whether the short is literal
+JSO_SCALAR qmfIsnumericOfShortTmpl STRING OPTIONAL	--!< ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 -- Templates of 0/1 integer expressions that tell whether the short is of some sort:
 JSO_SCALAR qmf01uriOfShortTmpl STRING OPTIONAL		--!< ... whether the short is uri, result is 1 or 0
 JSO_SCALAR qmf01blankOfShortTmpl STRING OPTIONAL	--!< ... whether the short is blank node ref, result is 1 or 0
@@ -214,10 +215,19 @@ JSO_SCALAR qmAllConds STRING_array PRIVATE		--!< Complete list of all join condi
 JSO_SCALAR qmAllCondCount INTEGER PRIVATE		--!< Number of used elements in qmAllCondCount
 JSO_STRUCT_END
 
+JSO_STRUCT_BEGIN sparql_macro_library virtrdf SparqlMacroLibrary	--!< Library of SPARQL macro definitions that are loaded automatically when the storage is used
+JSO_SCALAR smlSourceText STRING REQUIRED				--!< Source text of the library
+JSO_SCALAR smlCompilationState INTEGER PRIVATE				--!< 2 for completely (and successfull compilation, 1 for compilation in progress, 0 for not even started
+JSO_SCALAR smlIncludes ANY PRIVATE					--!< IRIs of included macro libraries
+JSO_SCALAR smlList ANY PRIVATE						--!< The compiled library
+JSO_STRUCT_END
+
+
 JSO_STRUCT_BEGIN quad_storage virtrdf QuadStorage	--!< All mapping patterns plus tracking info
 JSO_POINTER qsMjvMaps quad_map_array OPTIONAL
 JSO_POINTER qsUserMaps quad_map_array OPTIONAL
 JSO_POINTER qsDefaultMap quad_map OPTIONAL
+JSO_POINTER qsMacroLibrary sparql_macro_library OPTIONAL
 JSO_SCALAR qsMatchingFlags BITMASK OPTIONAL
 JSO_SCALAR qsAlterInProgress ANY OPTIONAL
 JSO_STRUCT_END
diff --git a/libsrc/Wi/rdf_mapping_jso.c b/libsrc/Wi/rdf_mapping_jso.c
index f8993ad..6bf26ec 100644
--- a/libsrc/Wi/rdf_mapping_jso.c
+++ b/libsrc/Wi/rdf_mapping_jso.c
@@ -1,10 +1,10 @@
 /*  */
-/* $Id: rdf_mapping.jso,v 1.24.2.4 2010/09/17 22:49:23 source Exp $ */
+/* $Id: rdf_mapping.jso,v 1.24.2.7 2012/03/08 12:55:34 source Exp $ */
 /*  */
 /* This file is part of the OpenLink Software Virtuoso Open-Source (VOS) */
 /* project. */
 /*  */
-/* Copyright (C) 1998-2009 OpenLink Software */
+/* Copyright (C) 1998-2012 OpenLink Software */
 /*  */
 /* This project is free software; you can redistribute it and/or modify it */
 /* under the terms of the GNU General Public License as published by the */
@@ -79,6 +79,7 @@ jso_field_descr_t jso_fields__qm_format[] = {
   { NULL	, "qmfIsuriOfShortTmpl"	, JSO_STRING	, JSO_REQUIRED	, JSO_FIELD_OFFSET(qm_format_t,qmfIsuriOfShortTmpl)	, NULL },
   { NULL	, "qmfIsblankOfShortTmpl"	, JSO_STRING	, JSO_REQUIRED	, JSO_FIELD_OFFSET(qm_format_t,qmfIsblankOfShortTmpl)	, NULL },
   { NULL	, "qmfIslitOfShortTmpl"	, JSO_STRING	, JSO_REQUIRED	, JSO_FIELD_OFFSET(qm_format_t,qmfIslitOfShortTmpl)	, NULL },
+  { NULL	, "qmfIsnumericOfShortTmpl"	, JSO_STRING	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(qm_format_t,qmfIsnumericOfShortTmpl)	, NULL },
 /* Templates of 0/1 integer expressions that tell whether the short is of some sort: */
   { NULL	, "qmf01uriOfShortTmpl"	, JSO_STRING	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(qm_format_t,qmf01uriOfShortTmpl)	, NULL },
   { NULL	, "qmf01blankOfShortTmpl"	, JSO_STRING	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(qm_format_t,qmf01blankOfShortTmpl)	, NULL },
@@ -303,6 +304,31 @@ jso_class_descr_t jso__quad_map = {
       -1, jso_fields__quad_map, NULL },
     { NULL, 0, 0} } };
 
+jso_class_descr_t jso__sparql_macro_library_array = {
+  JSO_CAT_ARRAY,  "array of struct sparql_macro_library_s *",
+  "http://www.openlinksw.com/schemas/virtrdf#array-of-SparqlMacroLibrary" ,
+  "http://www.openlinksw.com/schemas/virtrdf#" , "array-of-SparqlMacroLibrary" ,
+  NULL, {
+    { 0, -1, NULL, NULL },
+    {  "http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary" , 0, (SMALLEST_POSSIBLE_POINTER-2)} } };
+
+jso_field_descr_t jso_fields__sparql_macro_library[] = {
+  { NULL	, "smlSourceText"	, JSO_STRING	, JSO_REQUIRED	, JSO_FIELD_OFFSET(sparql_macro_library_t,smlSourceText)	, NULL },
+  { NULL	, "smlCompilationState"	, JSO_INTEGER	, JSO_PRIVATE	, JSO_FIELD_OFFSET(sparql_macro_library_t,smlCompilationState)	, NULL },
+  { NULL	, "smlIncludes"	, JSO_ANY	, JSO_PRIVATE	, JSO_FIELD_OFFSET(sparql_macro_library_t,smlIncludes)	, NULL },
+  { NULL	, "smlList"	, JSO_ANY	, JSO_PRIVATE	, JSO_FIELD_OFFSET(sparql_macro_library_t,smlList)	, NULL },
+  { NULL	, NULL	, NULL	,0xdeadce11	,0xdeadce11	,NULL } };
+
+jso_class_descr_t jso__sparql_macro_library = {
+  JSO_CAT_STRUCT,  "struct sparql_macro_library_s",
+  "http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary" ,
+  "http://www.openlinksw.com/schemas/virtrdf#" , "SparqlMacroLibrary" ,
+  NULL, {
+    {
+      sizeof (sparql_macro_library_t),
+      -1, jso_fields__sparql_macro_library, NULL },
+    { NULL, 0, 0} } };
+
 jso_class_descr_t jso__quad_storage_array = {
   JSO_CAT_ARRAY,  "array of struct quad_storage_s *",
   "http://www.openlinksw.com/schemas/virtrdf#array-of-QuadStorage" ,
@@ -315,6 +341,7 @@ jso_field_descr_t jso_fields__quad_storage[] = {
   { NULL	, "qsMjvMaps"	, JSO_IRI_OF_quad_map_array	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(quad_storage_t,qsMjvMaps)	, NULL },
   { NULL	, "qsUserMaps"	, JSO_IRI_OF_quad_map_array	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(quad_storage_t,qsUserMaps)	, NULL },
   { NULL	, "qsDefaultMap"	, JSO_IRI_OF_quad_map	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(quad_storage_t,qsDefaultMap)	, NULL },
+  { NULL	, "qsMacroLibrary"	, JSO_IRI_OF_sparql_macro_library	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(quad_storage_t,qsMacroLibrary)	, NULL },
   { NULL	, "qsMatchingFlags"	, JSO_BITMASK	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(quad_storage_t,qsMatchingFlags)	, NULL },
   { NULL	, "qsAlterInProgress"	, JSO_ANY	, JSO_OPTIONAL	, JSO_FIELD_OFFSET(quad_storage_t,qsAlterInProgress)	, NULL },
   { NULL	, NULL	, NULL	,0xdeadce11	,0xdeadce11	,NULL } };
@@ -369,6 +396,8 @@ rdf_mapping_jso_init (void)
   jso_define_class(&jso__qm_value);
   jso_define_class(&jso__quad_map_array);
   jso_define_class(&jso__quad_map);
+  jso_define_class(&jso__sparql_macro_library_array);
+  jso_define_class(&jso__sparql_macro_library);
   jso_define_class(&jso__quad_storage_array);
   jso_define_class(&jso__quad_storage);
 }
diff --git a/libsrc/Wi/rdf_mapping_jso.h b/libsrc/Wi/rdf_mapping_jso.h
index 692bbbc..8196c0d 100644
--- a/libsrc/Wi/rdf_mapping_jso.h
+++ b/libsrc/Wi/rdf_mapping_jso.h
@@ -1,12 +1,12 @@
 #ifndef __RFD_MAPPING_JSO_H
 #define __RFD_MAPPING_JSO_H
 /*  */
-/* $Id: rdf_mapping.jso,v 1.24.2.4 2010/09/17 22:49:23 source Exp $ */
+/* $Id: rdf_mapping.jso,v 1.24.2.7 2012/03/08 12:55:34 source Exp $ */
 /*  */
 /* This file is part of the OpenLink Software Virtuoso Open-Source (VOS) */
 /* project. */
 /*  */
-/* Copyright (C) 1998-2009 OpenLink Software */
+/* Copyright (C) 1998-2012 OpenLink Software */
 /*  */
 /* This project is free software; you can redistribute it and/or modify it */
 /* under the terms of the GNU General Public License as published by the */
@@ -90,6 +90,7 @@ typedef struct qm_format_s
   ccaddr_t	qmfIsuriOfShortTmpl;	/*!< ... whether the short is uri */
   ccaddr_t	qmfIsblankOfShortTmpl;	/*!< ... whether the short is blank node ref */
   ccaddr_t	qmfIslitOfShortTmpl;	/*!< ... whether the short is literal */
+  ccaddr_t	qmfIsnumericOfShortTmpl;	/*!< ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number) */
 /* Templates of 0/1 integer expressions that tell whether the short is of some sort: */
   ccaddr_t	qmf01uriOfShortTmpl;	/*!< ... whether the short is uri, result is 1 or 0 */
   ccaddr_t	qmf01blankOfShortTmpl;	/*!< ... whether the short is blank node ref, result is 1 or 0 */
@@ -224,6 +225,19 @@ typedef struct quad_map_s
   ptrlong	qmAllCondCount;	/*!< Number of used elements in qmAllCondCount */
 } quad_map_t;
 
+#define JSO_IRI_OF_sparql_macro_library_array  "http://www.openlinksw.com/schemas/virtrdf#array-of-SparqlMacroLibrary"
+typedef struct sparql_macro_library_s * *sparql_macro_library_array_t;
+
+/*! Library of SPARQL macro definitions that are loaded automatically when the storage is used */
+#define JSO_IRI_OF_sparql_macro_library  "http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary"
+typedef struct sparql_macro_library_s
+{
+  ccaddr_t	smlSourceText;	/*!< Source text of the library */
+  ptrlong	smlCompilationState;	/*!< 2 for completely (and successfull compilation, 1 for compilation in progress, 0 for not even started */
+  ccaddr_t	smlIncludes;	/*!< IRIs of included macro libraries */
+  ccaddr_t	smlList;	/*!< The compiled library */
+} sparql_macro_library_t;
+
 #define JSO_IRI_OF_quad_storage_array  "http://www.openlinksw.com/schemas/virtrdf#array-of-QuadStorage"
 typedef struct quad_storage_s * *quad_storage_array_t;
 
@@ -234,6 +248,7 @@ typedef struct quad_storage_s
   quad_map_array_t	qsMjvMaps;	/*!<  */
   quad_map_array_t	qsUserMaps;	/*!<  */
   struct quad_map_s *	qsDefaultMap;	/*!<  */
+  struct sparql_macro_library_s *	qsMacroLibrary;	/*!<  */
   ptrlong	qsMatchingFlags;	/*!<  */
   ccaddr_t	qsAlterInProgress;	/*!<  */
 } quad_storage_t;
diff --git a/libsrc/Wi/rdf_mapping_jso.ttl b/libsrc/Wi/rdf_mapping_jso.ttl
index 8db24a8..06bb878 100644
--- a/libsrc/Wi/rdf_mapping_jso.ttl
+++ b/libsrc/Wi/rdf_mapping_jso.ttl
@@ -5,12 +5,12 @@
 @prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> .
 
 <!--  -->
-<!-- $Id: rdf_mapping.jso,v 1.24.2.4 2010/09/17 22:49:23 source Exp $ -->
+<!-- $Id: rdf_mapping.jso,v 1.24.2.7 2012/03/08 12:55:34 source Exp $ -->
 <!--  -->
 <!-- This file is part of the OpenLink Software Virtuoso Open-Source (VOS) -->
 <!-- project. -->
 <!--  -->
-<!-- Copyright (C) 1998-2009 OpenLink Software -->
+<!-- Copyright (C) 1998-2012 OpenLink Software -->
 <!--  -->
 <!-- This project is free software; you can redistribute it and/or modify it -->
 <!-- under the terms of the GNU General Public License as published by the -->
@@ -287,6 +287,13 @@
 	rdfs:Range xsd:string ;
 	virtrdf:cardinality 'single' ;
 	.
+ <http://www.openlinksw.com/schemas/virtrdf#qmfIsnumericOfShortTmpl>
+	rdf:type rdf:Property ;
+	rdfs:comment  "... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)" ;
+	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> ;
+	rdfs:Range xsd:string ;
+	virtrdf:cardinality 'single' ;
+	.
 <!-- Templates of 0/1 integer expressions that tell whether the short is of some sort: -->
  <http://www.openlinksw.com/schemas/virtrdf#qmf01uriOfShortTmpl>
 	rdf:type rdf:Property ;
@@ -1023,6 +1030,43 @@
 	.
 # end of description of quad_map
 
+ <http://www.openlinksw.com/schemas/virtrdf#array-of-SparqlMacroLibrary>
+	rdf:type rdfs:Class ;
+	.
+ <http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary>
+	rdf:type rdfs:Class ;
+	rdfs:comment  "Library of SPARQL macro definitions that are loaded automatically when the storage is used" ;
+	.
+ <http://www.openlinksw.com/schemas/virtrdf#smlSourceText>
+	rdf:type rdf:Property ;
+	rdfs:comment  "Source text of the library" ;
+	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary> ;
+	rdfs:Range xsd:string ;
+	virtrdf:cardinality 'single' ;
+	.
+ <http://www.openlinksw.com/schemas/virtrdf#smlCompilationState>
+	rdf:type rdf:Property ;
+	rdfs:comment  "2 for completely (and successfull compilation, 1 for compilation in progress, 0 for not even started" ;
+	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary> ;
+	rdfs:Range xsd:integer ;
+	virtrdf:cardinality 'single' ;
+	.
+ <http://www.openlinksw.com/schemas/virtrdf#smlIncludes>
+	rdf:type rdf:Property ;
+	rdfs:comment  "IRIs of included macro libraries" ;
+	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary> ;
+	rdfs:Range xsd:any ;
+	virtrdf:cardinality 'single' ;
+	.
+ <http://www.openlinksw.com/schemas/virtrdf#smlList>
+	rdf:type rdf:Property ;
+	rdfs:comment  "The compiled library" ;
+	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary> ;
+	rdfs:Range xsd:any ;
+	virtrdf:cardinality 'single' ;
+	.
+# end of description of sparql_macro_library
+
  <http://www.openlinksw.com/schemas/virtrdf#array-of-QuadStorage>
 	rdf:type rdfs:Class ;
 	.
@@ -1048,6 +1092,12 @@
 	rdfs:Range  <http://www.openlinksw.com/schemas/virtrdf#QuadMap> ;
 	virtrdf:cardinality 'single' ;
 	.
+ <http://www.openlinksw.com/schemas/virtrdf#qsMacroLibrary>
+	rdf:type rdf:Property ;
+	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#QuadStorage> ;
+	rdfs:Range  <http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary> ;
+	virtrdf:cardinality 'single' ;
+	.
  <http://www.openlinksw.com/schemas/virtrdf#qsMatchingFlags>
 	rdf:type rdf:Property ;
 	rdfs:Domain  <http://www.openlinksw.com/schemas/virtrdf#QuadStorage> ;
diff --git a/libsrc/Wi/rdf_mapping_jso.ttl-sample b/libsrc/Wi/rdf_mapping_jso.ttl-sample
index 274cbc3..d7048a4 100644
--- a/libsrc/Wi/rdf_mapping_jso.ttl-sample
+++ b/libsrc/Wi/rdf_mapping_jso.ttl-sample
@@ -5,12 +5,12 @@
 @prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> .
 
 <!--  -->
-<!-- $Id: rdf_mapping.jso,v 1.24.2.4 2010/09/17 22:49:23 source Exp $ -->
+<!-- $Id: rdf_mapping.jso,v 1.24.2.7 2012/03/08 12:55:34 source Exp $ -->
 <!--  -->
 <!-- This file is part of the OpenLink Software Virtuoso Open-Source (VOS) -->
 <!-- project. -->
 <!--  -->
-<!-- Copyright (C) 1998-2009 OpenLink Software -->
+<!-- Copyright (C) 1998-2012 OpenLink Software -->
 <!--  -->
 <!-- This project is free software; you can redistribute it and/or modify it -->
 <!-- under the terms of the GNU General Public License as published by the -->
@@ -60,6 +60,7 @@
 	ns0:qmfIsuriOfShortTmpl '';	# JSO_STRING REQUIRED ... whether the short is uri
 	ns0:qmfIsblankOfShortTmpl '';	# JSO_STRING REQUIRED ... whether the short is blank node ref
 	ns0:qmfIslitOfShortTmpl '';	# JSO_STRING REQUIRED ... whether the short is literal
+	ns0:qmfIsnumericOfShortTmpl '';	# JSO_STRING OPTIONAL ... whether the short is number (unlike SSG_VALMODE_NUM, no DATE/TIME etc., only number)
 <!-- Templates of 0/1 integer expressions that tell whether the short is of some sort: -->
 	ns0:qmf01uriOfShortTmpl '';	# JSO_STRING OPTIONAL ... whether the short is uri, result is 1 or 0
 	ns0:qmf01blankOfShortTmpl '';	# JSO_STRING OPTIONAL ... whether the short is blank node ref, result is 1 or 0
@@ -189,11 +190,20 @@
 	ns0:qmAllCondCount '';	# JSO_INTEGER PRIVATE Number of used elements in qmAllCondCount
 	.
 @prefix ns0:  <http://www.openlinksw.com/schemas/virtrdf#> .
+ <http://example.com/jso-samples#SparqlMacroLibrarySample>
+	rdf_type ns0:SparqlMacroLibrary ;
+	ns0:smlSourceText '';	# JSO_STRING REQUIRED Source text of the library
+	ns0:smlCompilationState '';	# JSO_INTEGER PRIVATE 2 for completely (and successfull compilation, 1 for compilation in progress, 0 for not even started
+	ns0:smlIncludes '';	# JSO_ANY PRIVATE IRIs of included macro libraries
+	ns0:smlList '';	# JSO_ANY PRIVATE The compiled library
+	.
+ at prefix ns0:  <http://www.openlinksw.com/schemas/virtrdf#> .
  <http://example.com/jso-samples#QuadStorageSample>
 	rdf_type ns0:QuadStorage ;
 	ns0:qsMjvMaps '';	# JSO_IRI_OF_quad_map_array OPTIONAL 
 	ns0:qsUserMaps '';	# JSO_IRI_OF_quad_map_array OPTIONAL 
 	ns0:qsDefaultMap '';	# JSO_IRI_OF_quad_map OPTIONAL 
+	ns0:qsMacroLibrary '';	# JSO_IRI_OF_sparql_macro_library OPTIONAL 
 	ns0:qsMatchingFlags '';	# JSO_BITMASK OPTIONAL 
 	ns0:qsAlterInProgress '';	# JSO_ANY OPTIONAL 
 	.
diff --git a/libsrc/Wi/rdf_net.sql b/libsrc/Wi/rdf_net.sql
index c3d8355..bd52db5 100644
--- a/libsrc/Wi/rdf_net.sql
+++ b/libsrc/Wi/rdf_net.sql
@@ -1,10 +1,10 @@
 --
---  $Id: rdf_net.sql,v 1.1 2007/07/26 13:49:42 source Exp $
+--  $Id: rdf_net.sql,v 1.1.2.1 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/rdf_schema_objects.sql b/libsrc/Wi/rdf_schema_objects.sql
index cde31d6..3a55144 100644
--- a/libsrc/Wi/rdf_schema_objects.sql
+++ b/libsrc/Wi/rdf_schema_objects.sql
@@ -1,12 +1,12 @@
 --
---  $Id: rdf_schema_objects.sql,v 1.11.2.17 2010/09/17 23:11:37 source Exp $
+--  $Id: rdf_schema_objects.sql,v 1.11.2.28 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
 --  RDF Schema objects, generator of RDF Views
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -89,15 +89,22 @@ create procedure rdf_view_tbl_pk_cols (inout tbls any, out pkcols any)
 	   declare cols any;
 	   declare j int;
 	   newtb[i/2] := tbls[i];
-	   cols := make_array (length (tbls [i + 1]), 'any');
-	   j := 0;
-	   foreach (varchar c in tbls [i + 1]) do
+	   if (__tag (tbls [i + 1]) = 193)
 	     {
-	       cols[j] := (select vector (sc."COLUMN", sc."COL_DTP", sc."COL_SCALE", sc."COL_PREC")
-	   	from DB.DBA.TABLE_COLS sc where upper (sc."COLUMN") = upper (c) and upper ("TABLE") = upper (tbls[i]));
-	       if (length (cols[j]) = 0)
-		 signal ('22023', sprintf ('Non existing column %s for table %s', c, tbls[i]));
-	       j := j + 1;
+	       cols := make_array (length (tbls [i + 1]), 'any');
+	       j := 0;
+	       foreach (varchar c in tbls [i + 1]) do
+		 {
+		   cols[j] := (select vector (sc."COLUMN", sc."COL_DTP", sc."COL_SCALE", sc."COL_PREC")
+		    from DB.DBA.TABLE_COLS sc where upper (sc."COLUMN") = upper (c) and upper ("TABLE") = upper (tbls[i]));
+		   if (length (cols[j]) = 0)
+		     signal ('22023', sprintf ('Non existing column %s for table %s', c, tbls[i]));
+		   j := j + 1;
+		 }
+	     }
+	   else
+	     {
+	       cols := rdf_view_get_primary_key (tbls[i]);
 	     }
 	   pkcols[i] := tbls[i];
 	   pkcols[i+1] := cols;
@@ -168,27 +175,36 @@ create procedure rdf_view_ns_get_1 (in cols any, inout dict any)
 ;
 
 create procedure
-RDF_VIEW_DROP_STMT (in qualifier varchar)
+RDF_VIEW_DROP_STMT_BY_GRAPH (in gr varchar)
 {
    declare drop_map any;
-   declare  mask varchar;
 
    drop_map := '';
-   mask := sprintf ('http://%s/schemas/%s/qm-%%', cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'), qualifier);
-   for select "o" from (sparql define input:storage ""
-   select ?o from virtrdf:
+   for select "s" from (sparql define input:storage ""
+   select ?s from virtrdf:
    {
-     virtrdf:DefaultQuadStorage-UserMaps ?p ?o .
-     filter ( ?p != rdf:type && ?o like ?:mask)
+     ?s virtrdf:qmGraphRange-rvrFixedValue `iri(?:gr)` ; virtrdf:qmUserSubMaps ?t
    }) x do
    {
-     drop_map := drop_map || sprintf ('SPARQL drop silent quad map <%s> .;\n', "o");
+     drop_map := drop_map || sprintf ('SPARQL drop silent quad map <%s> .;\n', "s");
    }
  return drop_map;
 }
 ;
 
 create procedure
+RDF_VIEW_DROP_STMT (in qualifier varchar)
+{
+   declare drop_map any;
+   declare gr varchar;
+
+   drop_map := '';
+   gr := sprintf ('http://%s/%s#', virtuoso_ini_item_value ('URIQA','DefaultHost'), qualifier);
+   return RDF_VIEW_DROP_STMT_BY_GRAPH (gr);
+}
+;
+
+create procedure
 RDF_VIEW_FROM_TBL (in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any := null)
 {
    declare create_count_count, create_class_stmt, create_view_stmt, sparql_pref, ns, sns, uriqa_str, ret, drop_map any;
@@ -200,7 +216,7 @@ RDF_VIEW_FROM_TBL (in qualifier varchar, in _tbls any, in gen_stat int := 0, in
    cols := rdf_view_tbl_opts (_tbls, cols);
    sparql_pref := 'SPARQL\n';
    uriqa_str := '^{URIQADefaultHost}^';
-   sns := ns := sprintf ('prefix %s: <http://%s/schemas/%s/> \n', qualifier, cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'), qualifier);
+   sns := ns := sprintf ('prefix %s: <http://%s/schemas/%s/> \n', qualifier, virtuoso_ini_item_value ('URIQA','DefaultHost'), qualifier);
 
    --for (declare xx any, xx := 0; xx < length (_tbls) ; xx := xx + 1)
    --   drop_map := drop_map || sprintf ('SPARQL %s drop silent quad map %s:qm-%s\n;\n', ns, qualifier, rdf_view_tb (name_part (_tbls[xx], 2)));
@@ -210,7 +226,7 @@ RDF_VIEW_FROM_TBL (in qualifier varchar, in _tbls any, in gen_stat int := 0, in
    -- ## voID
    if (gen_stat)
      {
-       ns := ns || sprintf ('prefix %s-stat: <http://%s/%s/stat#> \n', lcase (qualifier), cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'),
+       ns := ns || sprintf ('prefix %s-stat: <http://%s/%s/stat#> \n', lcase (qualifier), virtuoso_ini_item_value ('URIQA','DefaultHost'),
 			    qualifier);
        ns := ns || 'prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n';
        ns := ns || 'prefix void: <http://rdfs.org/ns/void#> \n';
@@ -473,9 +489,9 @@ rdf_view_create_view (in nth int, in qualifier varchar, in _tbls any, in gen_sta
 	 }
        inx := inx + 1;
      }
-   if (exists (select top 1 1 from SYS_FOREIGN_KEYS where PK_TABLE = tbl and 0 < position (FK_TABLE, _tbls))
+   if (exists (select top 1 1 from SYS_FOREIGN_KEYS where PK_TABLE = tbl and FK_TABLE <> tbl and 0 < position (FK_TABLE, _tbls))
        or
-       exists (select top 1 1 from SYS_FOREIGN_KEYS where FK_TABLE = tbl and 0 < position (PK_TABLE, _tbls)))
+       exists (select top 1 1 from SYS_FOREIGN_KEYS where FK_TABLE = tbl and PK_TABLE <> tbl and 0 < position (PK_TABLE, _tbls)))
      ret := ret || rdf_view_sp (6) || '# Maps from foreign-key relations of "' || tbl || '"\n';
    ret := ret || rdf_view_get_fk_pk_rel (qualifier, suffix, tbl, _tbls, pkcols);
    ret := ret || rdf_view_get_pk_fk_rel (qualifier, suffix, tbl, _tbls, pkcols);
@@ -531,7 +547,7 @@ rdf_view_create_void_view (in qualifier varchar, in _tbls any, in gen_stat int :
    ret := ret || rdf_view_sp (6) || '# voID Statistics \n';
    ret := ret || rdf_view_sp (6) || sprintf ('%s-stat: a void:Dataset as %s:dataset-%s ; \n', pref_l, qualifier, qual_l);
    ret := ret || rdf_view_sp (6) || sprintf (' void:sparqlEndpoint <http://%s/sparql> as %s:dataset-sparql-%s ; \n',
-		    cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'), qualifier, qual_l);
+		    virtuoso_ini_item_value ('URIQA','DefaultHost'), qualifier, qual_l);
 
    ret := ret || rdf_view_sp (6) ||	sprintf ('void:statItem %s-stat:Stat . \n', pref_l);
    ret := ret || rdf_view_sp (6) || sprintf ('%s-stat:Stat a scovo:Item ; \n', pref_l);
@@ -803,7 +819,7 @@ RDF_OWL_FROM_TBL (in qual varchar, in _tbls any, in cols any := null)
 
   rdf_view_tbl_pk_cols (_tbls, pkcols);
   cols := rdf_view_tbl_opts (_tbls, cols);
-  ns := sprintf ('@prefix %s: <http://%s/schemas/%s/> .\n', qual, cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'), qual);
+  ns := sprintf ('@prefix %s: <http://%s/schemas/%s/> .\n', qual, virtuoso_ini_item_value ('URIQA','DefaultHost'), qual);
   ses := string_output ();
   http ('@prefix owl: <http://www.w3.org/2002/07/owl#> .\n', ses);
   http ('@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n', ses);
@@ -968,7 +984,7 @@ create procedure RDF_VIEW_GEN_VD (in qual varchar)
 
     case when fct_installed
     then
-      '''/describe/?url=http://^{URIQADefaultHost}^%U%%23this&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23'','
+      '''/describe/?url=http%%3A//^{URIQADefaultHost}^%U%%23this&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23'','
     else
       '''/about/html/http://^{URIQADefaultHost}^%s'','
     end
@@ -991,7 +1007,7 @@ create procedure RDF_VIEW_GEN_VD (in qual varchar)
 
     case when fct_installed
     then
-      '''/describe/?url=http://^{URIQADefaultHost}^/<qual>/stat%%23&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23'','
+      '''/describe/?url=http%%3A//^{URIQADefaultHost}^/<qual>/stat%%23&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23'','
     else
       '''/about/html/http://^{URIQADefaultHost}^/<qual>/stat%%01'','
     end
@@ -1080,7 +1096,7 @@ create procedure RDF_OWL_GEN_VD (in qual varchar)
     1,\n',
     case when fct_installed
     then
-    '''/describe/?url=http://^{URIQADefaultHost}^%U&graph=http%%3A//^{URIQADefaultHost}^/schemas/<qual>%%23'','
+    '''/describe/?url=http://^{URIQADefaultHost}^%U'','
     else
     '''/about/html/http://^{URIQADefaultHost}^%s'','
     end,
@@ -1120,21 +1136,43 @@ RDF_VIEW_CHECK_SYNC_TB (in tb varchar)
 ;
 
 create procedure
-RDF_VIEW_DO_SYNC (in qualifier varchar, in load_data int := 0)
+RDF_VIEW_DO_SYNC (in qualifier varchar, in load_data int := 0, in pgraph varchar := null)
 {
-   declare mask varchar;
-   declare txt, tbls, err_ret any;
-   declare stat, msg varchar;
+   declare gr varchar;
+   gr := sprintf ('http://%s/%s#', virtuoso_ini_item_value ('URIQA','DefaultHost'), qualifier);
+   return RDF_VIEW_SYNC_TO_PHYSICAL (gr, load_data, pgraph);
+}
+;
 
+create procedure
+RDF_VIEW_SYNC_TO_PHYSICAL (in vgraph varchar, in load_data int := 0, in pgraph varchar := null, in log_mode int := 1, in load_atomic int := 1)
+{
+   declare mask varchar;
+   declare txt, tbls, err_ret, opt any;
+   declare stat, msg, gr varchar;
+   declare old_mode int;
+
+   old_mode := log_enable (log_mode, 1);
+   declare exit handler for sqlstate '*' {
+     log_enable (old_mode, 1);
+     if (load_atomic)
+       __atomic (0);
+   };
+
+   if (load_atomic)
+     __atomic (1);
    tbls := vector ();
    err_ret := vector ();
-   mask := sprintf ('http://%s/schemas/%s/qm-%%', cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost'), qualifier);
+   opt := vector ();
+   gr := vgraph;
+   if (length (pgraph))
+     opt := vector (gr, pgraph);
    for select "o" from
    (sparql define input:storage "" select ?o from virtrdf:
      {
        virtrdf:DefaultQuadStorage-UserMaps ?p ?o .
        ?o a virtrdf:QuadMap  .
-       filter (?o like ?:mask)
+       ?o virtrdf:qmGraphRange-rvrFixedValue `iri(?:gr)` .
      }
      order by asc (bif:sprintf_inverse (bif:concat (str(rdf:_), "%d"), str (?p), 1))) x do
    {
@@ -1167,7 +1205,7 @@ RDF_VIEW_DO_SYNC (in qualifier varchar, in load_data int := 0)
     {
       for (declare ctr int, ctr := 1; ctr <= 4; ctr := ctr + 1)
         {
-	  txt := sparql_rdb2rdf_codegen (tb, ctr);
+	  txt := sparql_rdb2rdf_codegen (tb, ctr, opt);
 	  stat := '00000';
 	  if (isvector (txt))
 	    {
@@ -1197,6 +1235,129 @@ RDF_VIEW_DO_SYNC (in qualifier varchar, in load_data int := 0)
 	  if (stat <> '00000') err_ret := vector_concat (err_ret, vector (sprintf ('%s: %s', stat, msg)));
 	}
     }
+  log_enable (old_mode, 1);
+  if (load_atomic)
+    {
+      __atomic (0);
+      exec ('checkpoint');
+    }
   return err_ret;
 }
 ;
+
+---------------------
+-- R2RML generator
+---------------------
+create procedure
+R2RML_FROM_TBL (in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any := null)
+{
+   declare create_view_stmt, ns, sns any;
+   declare total_select, total_tb, total, qual, pkcols any;
+   declare vname, mask, graph, uriqa_str varchar;
+
+   rdf_view_tbl_pk_cols (_tbls, pkcols);
+   cols := rdf_view_tbl_opts (_tbls, cols);
+   sns := ns := sprintf ('@prefix rr: <http://www.w3.org/ns/r2rml#> .\n at prefix %s: <http://%s/schemas/%s/> .\n', qualifier, virtuoso_ini_item_value ('URIQA','DefaultHost'), qualifier);
+
+   if (gen_stat)
+     {
+       ns := ns || sprintf ('@prefix %s-stat: <http://%s/%s/stat#> .\n', lcase (qualifier), virtuoso_ini_item_value ('URIQA','DefaultHost'),
+			    qualifier);
+       ns := ns || '@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n';
+       ns := ns || '@prefix void: <http://rdfs.org/ns/void#> .\n';
+       ns := ns || '@prefix scovo: <http://purl.org/NET/scovo#> .\n';
+     }
+   ns := ns || '@prefix aowl: <http://bblfish.net/work/atom-owl/2006-06-06/> .\n';
+   ns := ns || rdf_view_ns_get (cols, 1);
+   ns := ns || '\n';
+
+   uriqa_str := registry_get ('URIQADefaultHost');
+   graph := 'http://' || uriqa_str || '/' || qualifier || '#';
+   create_view_stmt := ns;
+   for (declare inx int, inx := 0; inx < length (_tbls) ; inx := inx + 1)
+      create_view_stmt := create_view_stmt || '\n' || r2rml_create_dataset (inx, qualifier, _tbls, gen_stat, cols, pkcols, graph) || '';
+
+   return create_view_stmt;
+}
+;
+
+create procedure
+r2rml_create_dataset (in nth int, in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any, in pkcols any, in graph varchar := null)
+{
+   declare ret, qual, qual_l, tbl_name, tbl_name_l, pks, pk_text, uriqa_str, graph_def any;
+   declare suffix, tname, tbl, own, pref_l any;
+   declare cols_arr, inx, col_name, owner, owner_l any;
+
+   ret := '';
+   suffix := '_s';
+   uriqa_str := registry_get ('URIQADefaultHost');
+   qual := name_part (_tbls[nth], 0);
+   own := name_part (_tbls[nth], 1);
+   qual_l := lcase (qual);
+   pref_l := lcase (qualifier);
+   tbl := _tbls[nth];
+   cols_arr := get_keyword (tbl, cols);
+   tbl_name := name_part (tbl, 2);
+   owner := name_part (tbl, 1);
+   tbl_name_l := rdf_view_tb (tbl_name);
+   owner_l := rdf_view_tb (owner);
+   tname := tbl_name_l || suffix;
+   pks := get_keyword (tbl, pkcols); 
+   
+   pk_text := '';
+   for (declare i any, i := 0; i < length (pks) ; i := i + 1)
+      pk_text := pk_text || sprintf ('/{%s}', pks[i][0]);
+
+   if (graph is not null)   
+     graph_def := sprintf ('rr:graph <%s> ', graph);  
+    else 
+     graph_def := '';  
+   ret := ret || sprintf ('<#TriplesMap%s> a rr:TriplesMap; rr:logicalTable [ rr:tableSchema "%s" ; rr:tableOwner "%s" ; rr:tableName "%s" ]; \n', tbl_name, qual, own, tbl_name);
+   ret := ret || sprintf ('rr:subjectMap [ rr:termtype "IRI"  ; rr:template "http://%s/%s/%s%s"; rr:class %s:%s; %s];\n', uriqa_str, qual, tbl_name_l, pk_text, qualifier, rdf_view_cls_name (tbl_name), graph_def);
+
+   inx := 0;
+   for select "COLUMN", COL_DTP from TABLE_COLS where "TABLE" = tbl order by COL_ID do
+     {
+       col_name := "COLUMN";
+       if (not exists (select 1 from SYS_FOREIGN_KEYS where FK_TABLE = tbl and FKCOLUMN_NAME = col_name))
+         ret := ret || sprintf ('rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s ] ; rr:objectMap [ rr:column "%s" ]; ] ;\n', 
+	 	qualifier, lower (col_name), col_name);
+       inx := inx + 1;
+     }
+   for select distinct PK_TABLE as pkt from SYS_FOREIGN_KEYS where FK_TABLE = tbl and PK_TABLE <> tbl do
+     {
+       pk_text := '';
+       for select FKCOLUMN_NAME from SYS_FOREIGN_KEYS where FK_TABLE = tbl and PK_TABLE = pkt order by KEY_SEQ do
+	 {
+	   pk_text := pk_text || sprintf ('/{%s}', FKCOLUMN_NAME);
+	 }
+       ret := ret || sprintf ('rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s_has_%s ] ; rr:objectMap [ rr:termtype "IRI" ; rr:template "http://%s/%s/%s%s" ]; ] ;\n',
+                             qualifier, tbl_name_l, lower (name_part (pkt, 3)), uriqa_str, qual, lower (name_part (pkt, 3)), pk_text);
+     }
+ 
+   for select distinct FK_TABLE as fkt from SYS_FOREIGN_KEYS where PK_TABLE = tbl and position (FK_TABLE, _tbls)  do
+     {
+       declare jc varchar;
+       jc := '';
+       pk_text := '';
+       for select FKCOLUMN_NAME, PKCOLUMN_NAME from SYS_FOREIGN_KEYS where FK_TABLE = fkt and PK_TABLE = tbl order by KEY_SEQ do
+   	 {
+   	   jc := jc || sprintf (' rr:joinCondition [ rr:child "%s" ; rr:parent "%s" ] ;', FKCOLUMN_NAME, PKCOLUMN_NAME); 
+	   pk_text := pk_text || sprintf ('/{%s}', FKCOLUMN_NAME);
+   	 }
+       if (tbl <> fkt)
+	 { 
+           ret := ret || sprintf ('rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s_of_%s ] ; rr:objectMap [ rr:parentTriplesMap <#TriplesMap%s>; %s ]; ] ;\n',
+                             qualifier, tbl_name_l, lower (name_part (fkt, 3)), name_part (fkt, 3), jc);
+	 }
+       else
+	 {
+	   ret := ret || sprintf ('rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s_has_%s ] ; rr:objectMap [ rr:termtype "IRI" ; rr:template "http://%s/%s/%s%s" ]; ] ;\n',
+                             qualifier, tbl_name_l, lower (name_part (fkt, 3)), uriqa_str, qual, lower (name_part (fkt, 3)), pk_text);
+	 }
+     }
+ 
+   ret := rtrim (ret, ';\n') || '.\n'; 
+   return ret;
+}
+;
diff --git a/libsrc/Wi/rdf_sponge.sql b/libsrc/Wi/rdf_sponge.sql
index a062b4c..0d62041 100644
--- a/libsrc/Wi/rdf_sponge.sql
+++ b/libsrc/Wi/rdf_sponge.sql
@@ -1,10 +1,10 @@
 --
---  $Id: rdf_sponge.sql,v 1.5.2.38 2011/03/29 22:55:26 source Exp $
+--  $Id: rdf_sponge.sql,v 1.5.2.56 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -21,6 +21,28 @@
 --
 --
 
+-- Function				is called from
+-- RDF_FT_INDEX_GRABBED			RDF_GRAB_SEEALSO, RDF_GRAB
+-- RDF_GRAB_SINGLE			RDF_GRAB_SINGLE_ASYNC
+-- RDF_GRAB_SINGLE_ASYNC			RDF_GRAB_SEEALSO, RDF_GRAB
+-- RDF_GRAB_SEEALSO			RDF_GRAB
+-- RDF_GRAB				code made from codegen for ssg_grabber_codegen() prepared by sparp_rewrite_grab()
+-- RDF_GRAB_RESOLVER_DEFAULT		passed as 'resolver' to RDF_GRAB_SINGLE from SPARUL_LOAD
+-- SYS_HTTP_SPONGE_GET_CACHE_PARAMS	SYS_HTTP_SPONGE_UP
+-- SYS_HTTP_SPONGE_DEP_URL_NOT_CHANGED	unused in server
+-- RDF_HTTP_MAKE_HTTP_REQ		SYS_HTTP_SPONGE_UP
+-- RDF_HTTP_URL_GET			SYS_HTTP_SPONGE_UP
+-- SYS_HTTP_SPONGE_UP			itself, RDF_SPONGE_UP_1
+-- SYS_FILE_SPONGE_UP			RDF_SPONGE_UP_1
+-- RDF_SPONGE_GUESS_CONTENT_TYPE		RDF_LOAD_HTTP_RESPONSE
+-- RDF_SW_PING				RDF_LOAD_HTTP_RESPONSE
+-- RDF_PROC_COLS				RDF_LOAD_HTTP_RESPONSE
+-- RDF_LOAD_HTTP_RESPONSE		SYS_FILE_SPONGE_UP, passed to SYS_HTTP_SPONGE_UP from RDF_SPONGE_UP_1
+-- RDF_FORGET_HTTP_RESPONSE		passed to SYS_FILE_SPONGE_UP and SYS_HTTP_SPONGE_UP from RDF_SPONGE_UP_1
+-- RDF_SPONGE_UP				RDF_SPONGE_UP_LIST, code made by ssg_grabber_codegen passes it to RDF_GRAB proc view as _grabber_loader
+-- RDF_SPONGE_UP_1			RDF_SPONGE_UP
+-- RDF_SPONGE_UP_LIST			unused in server
+
 -----
 -- Procedures for graph grabber
 
@@ -82,7 +104,7 @@ create function DB.DBA.RDF_GRAB_SINGLE (in val any, inout grabbed any, inout env
     {
       declare final_dest, final_gdest varchar;
       final_dest := get_keyword ('get:destination', env, dest);
-      final_gdest := get_keyword ('get:group-destination', env, dest);
+      final_gdest := get_keyword ('get:group-destination', env);
       opts := vector (
         'get:soft', get_keyword_ucase ('get:soft', env, 'soft'),
         'get:refresh', get_keyword_ucase ('get:refresh', env),
@@ -495,9 +517,11 @@ create procedure DB.DBA.SYS_HTTP_SPONGE_GET_CACHE_PARAMS
   ret_dt_expires := http_string_date (ret_expires, NULL, now());
   ret_dt_last_modified := http_string_date (ret_last_modif, NULL, now());
   -- if no cache directive we say it is now
-  if (http_request_header (ret_hdr, 'Pragma', null, null) = 'no-cache' or
-    http_request_header (ret_hdr, 'Cache-Control', null, null) like 'no-cache%' )
+  if (http_request_header (ret_hdr, 'Pragma', null, null) = 'no-cache' or http_request_header (ret_hdr, 'Cache-Control', null, null) like 'no-cache%' )
+    {
     ret_dt_expires := now ();
+      ret_etag := null;
+    }
   -- if not modified and no last given we take old last modified
   if (ret_304_not_modified and ret_dt_last_modified is null)
     ret_dt_last_modified := old_last_modified;
@@ -613,8 +637,9 @@ create function DB.DBA.SYS_HTTP_SPONGE_UP (in local_iri varchar, in get_uri varc
   declare old_last_load, old_expiration, old_last_modified datetime;
   declare load_begin_msec, load_end_msec, old_exp_is_true,
     old_download_size, old_download_msec_time, old_read_count,
-    new_download_size, explicit_refresh integer;
+    new_download_size, explicit_refresh, max_sz integer;
   declare get_method varchar;
+  declare get_soft varchar;
   declare ret_hdr, immg, req_hdr_arr any;
   declare req_hdr varchar;
   declare ret_body, ret_content_type, ret_etag, ret_last_modified, ret_date, ret_last_modif, ret_expires varchar;
@@ -628,9 +653,10 @@ create function DB.DBA.SYS_HTTP_SPONGE_UP (in local_iri varchar, in get_uri varc
   new_origin_uri := cast (get_keyword_ucase ('get:uri', options, get_uri) as varchar);
   new_origin_login := cast (get_keyword_ucase ('get:login', options) as varchar);
   explicit_refresh := get_keyword_ucase ('get:refresh', options);
+  get_soft := get_keyword_ucase ('get:soft', options, '');
   if (explicit_refresh is null)
     {
-      max_refresh := cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'MaxCacheExpiration');
+      max_refresh := virtuoso_ini_item_value ('SPARQL', 'MaxCacheExpiration');
       if (max_refresh is not null)
         {
           max_refresh := atoi (max_refresh);
@@ -640,7 +666,7 @@ create function DB.DBA.SYS_HTTP_SPONGE_UP (in local_iri varchar, in get_uri varc
     }
   else if (isstring (explicit_refresh))
     explicit_refresh := atoi (explicit_refresh);
-  min_expiration := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'MinExpiration'), '-1'));
+  min_expiration := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'MinExpiration'), '-1'));
   if (min_expiration < 0)
     min_expiration := null;
   set isolation='serializable';
@@ -727,8 +753,12 @@ perform_actual_load:
   --!!!TBD: if (get_method in ('MGET', 'GET+MGET')) { ... }
   if (get_method in ('POST', 'GET', 'GET+MGET'))
     {
+      declare acc_hdr varchar; 
       req_hdr := NULL;
       get_proxy := get_keyword_ucase ('get:proxy', options);
+      acc_hdr := trim (get_keyword_ucase ('get:accept', options));
+      if (not length (acc_hdr))
+	acc_hdr := 'application/rdf+xml; q=1.0, text/rdf+n3; q=0.9, application/rdf+turtle; q=0.5, application/x-turtle; q=0.6, application/turtle; q=0.5, text/turtle; q=0.7, application/xml; q=0.2, */*; q=0.1';
       connection_set ('sparql-get:proxy', get_proxy);
       --!!!TBD: proper support for POST
       --!!!TBD: proper authentication if get:login / get:password is provided.
@@ -742,7 +772,7 @@ perform_actual_load:
       -- then it may return rdf instead of html
       req_hdr := req_hdr || case when length (req_hdr) > 0 then '\r\n' else '' end
         || 'User-Agent: OpenLink Virtuoso RDF crawler\r\n'
-	|| 'Accept: application/rdf+xml; q=1.0, text/rdf+n3; q=0.9, application/rdf+turtle; q=0.7, application/x-turtle; q=0.6, application/turtle; q=0.5, application/xml; q=0.2, */*; q=0.1';
+	|| 'Accept: ' || acc_hdr;
 	--|| 'Accept: application/rdf+xml, text/rdf+n3, application/rdf+turtle, application/x-turtle, application/turtle, application/xml, */*';
       -- dbg_obj_princ (get_method, ' method with ', req_hdr);
       {
@@ -797,7 +827,7 @@ perform_actual_load:
 	}
       goto resp_received;
     }
-  if (eraser is not null)
+  if (eraser is not null and (get_soft <> 'add'))
     call (eraser) (local_iri, new_origin_uri, options);
   signal ('RDFZZ', sprintf (
       'Unable to get data from "%.1000s": This version of Virtuoso does not support OPTION (get:method "%.100s")',
@@ -841,6 +871,22 @@ resp_received:
   --!!!TBD: proper character set handling in response
   new_download_size := length (ret_body);
 
+  max_sz := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'MaxDataSourceSize'), '20971520'));
+
+  if (max_sz < new_download_size)
+    {
+      rollback work;
+      update DB.DBA.SYS_HTTP_SPONGE
+	  set HS_SQL_STATE = 'RDFXX',
+	  HS_SQL_MESSAGE = sprintf ('Content length %d is over the limit %d', new_download_size, max_sz),
+	  HS_EXPIRATION = now (),
+	  HS_EXP_IS_TRUE = 0
+	      where
+	      HS_LOCAL_IRI = local_iri and HS_PARSER = parser;
+      commit work;
+      signal ('RDFXX', sprintf ('Content length %d is over the limit %d', new_download_size, max_sz));
+    }
+
   --if (__tag (ret_body) = 185)
   --  ret_body := string_output_string (subseq (ret_body, 0, 10000000));
 
@@ -848,7 +894,7 @@ resp_received:
   whenever sqlstate '*' goto error_during_load;
   parser_rc := 0;
   req_hdr_arr := DB.DBA.RDF_HTTP_MAKE_HTTP_REQ (new_origin_uri, get_method, req_hdr);
-  if (eraser is not null)
+  if (eraser is not null and (get_soft <> 'add'))
     call (eraser) (local_iri, new_origin_uri, options);
   parser_rc := call (parser) (local_iri, new_origin_uri, ret_content_type, ret_hdr, ret_body, options, req_hdr_arr);
   -- dbg_obj_princ (parser, ' returned ', parser_rc, ' to SYS_HTTP_SPONGE_UP()');
@@ -924,17 +970,22 @@ create function DB.DBA.SYS_FILE_SPONGE_UP (in local_iri varchar, in get_uri varc
 {
   declare new_origin_uri, str, base_uri, mime_type, dummy, tmp any;
   declare inx int;
+  declare get_soft varchar;
   new_origin_uri := cast (get_keyword_ucase ('get:uri', options, get_uri) as varchar);
+  get_soft := get_keyword_ucase ('get:soft', options, '');
   inx := 5;
-  base_uri := local_iri;
+  base_uri := new_origin_uri;
   base_uri := charset_recode (base_uri, 'UTF-8', NULL);
   while (length (base_uri) > inx + 1 and aref (base_uri, inx) = ascii ('/'))
     inx := inx + 1;
+  if (inx = 8) -- i.e., it is 'file:///'
+    str := file_to_string (subseq (base_uri, inx-1));
+  else
   str := file_to_string (concat (http_root(), '/' , subseq (base_uri, inx)));
   dummy := vector ();
   tmp := vector ('OK');
   mime_type := null;
-  if (eraser is not null)
+  if (eraser is not null and (get_soft <> 'add'))
     call (eraser) (local_iri, new_origin_uri, options);
   DB.DBA.RDF_LOAD_HTTP_RESPONSE (local_iri, new_origin_uri, mime_type, tmp, str, options, dummy);
   return local_iri;
@@ -944,6 +995,7 @@ create function DB.DBA.SYS_FILE_SPONGE_UP (in local_iri varchar, in get_uri varc
 
 create function DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (in origin_uri varchar, in ret_content_type varchar, inout ret_body any) returns varchar
 {
+  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (', origin_uri, ret_content_type, '...)');
   if (ret_content_type is not null)
     {
       if (strstr (ret_content_type, 'application/sparql-results+xml') is not null)
@@ -959,10 +1011,16 @@ create function DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (in origin_uri varchar, in
         strstr (ret_content_type, 'application/x-turtle') is not null or
         strstr (ret_content_type, 'application/turtle') is not null )
         return 'text/rdf+n3';
+      if (strstr (ret_content_type, 'application/x-trig') is not null)
+        return 'application/x-trig';
     }
   declare ret_begin, ret_html any;
   ret_begin := subseq (ret_body, 0, 4096);
+  if (isstring_session (ret_begin))
+    ret_begin := string_output_string (ret_begin);
+  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE: ret_begin = ', ret_begin);
   ret_html := xtree_doc (ret_begin, 2);
+  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE: ret_html = ', ret_html);
   if (xpath_eval ('/html|/xhtml', ret_html) is not null)
     return 'text/html';
   if (xpath_eval ('[xmlns:rset="http://www.w3.org/2005/sparql-results#"] /rset:sparql', ret_html) is not null
@@ -1121,7 +1179,7 @@ create procedure DB.DBA.RDF_SW_PING (in endp varchar, in url varchar)
   err := '';
   msg := 'n/a';
   xt := null;
-  if (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'RestPingService') = '1')
+  if (virtuoso_ini_item_value ('SPARQL', 'RestPingService') = '1')
     {
       rc := http_get (endp||sprintf ('?url=%U', url));
       xt := xtree_doc (rc);
@@ -1155,13 +1213,13 @@ create procedure DB.DBA.RDF_PROC_COLS (in pname varchar)
 -- /* Load the document in triple store. returns 1 if the document is an RDF , otherwise if it has links etc. it returns 0 */
 create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_origin_uri varchar, inout ret_content_type varchar, inout ret_hdr any, inout ret_body any, inout options any, inout req_hdr_arr any)
 {
-  declare dest, groupdest, cset, base, first_stat, first_msg varchar;
+  declare dest, groupdest, get_soft, cset, base, first_stat, first_msg varchar;
   declare rc any;
   declare aq, ps any;
   declare xd, xt any;
-  declare saved_log_mode, only_rdfa integer;
+  declare saved_log_mode, only_rdfa, retr_count integer;
   aq := null;
-  ps := cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'PingService');
+  ps := virtuoso_ini_item_value ('SPARQL', 'PingService');
   if (length (ps))
     {
       aq := async_queue (1);
@@ -1173,6 +1231,7 @@ create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_ori
   dest := get_keyword_ucase ('get:destination', options);
   groupdest := get_keyword_ucase ('get:group-destination', options);
   base := get_keyword ('http-redirect-to', options, new_origin_uri);
+  get_soft := get_keyword_ucase ('get:soft', options);
   if (get_keyword_ucase ('get:strategy', options, 'default') = 'rdfa-only')
     only_rdfa := 1;
   else
@@ -1181,6 +1240,7 @@ create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_ori
     signal ('RDFXX', sprintf ('Unable to load RDF graph <%.500s> from <%.500s>: the sparql-results XML answer does not contain triples', graph_iri, new_origin_uri));
   if (get_keyword ('http-headers', options) is null)
     options := vector_concat (options, vector ('http-headers', vector (req_hdr_arr, ret_hdr)));
+retry_after_deadlock:
   if (strstr (ret_content_type, 'application/rdf+xml') is not null)
     {
       --if (dest is null)
@@ -1194,6 +1254,8 @@ create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_ori
       DB.DBA.RDF_LOAD_RDFXML (ret_body, base, coalesce (dest, graph_iri));
       if (groupdest is not null)
         DB.DBA.RDF_LOAD_RDFXML (ret_body, base, groupdest);
+      if (exists (select 1 from DB.DBA.SYS_RDF_MAPPERS where RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) and RM_ENABLED = 1))
+	goto load_grddl;
       if (__proc_exists ('DB.DBA.RDF_LOAD_POST_PROCESS') and only_rdfa = 0) -- optional step, by default skip
 	call ('DB.DBA.RDF_LOAD_POST_PROCESS') (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options);
       --log_enable (saved_log_mode, 1);
@@ -1219,6 +1281,8 @@ create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_ori
       DB.DBA.TTLP (ret_body, base, coalesce (dest, graph_iri), 255);
       if (groupdest is not null)
         DB.DBA.TTLP (ret_body, base, groupdest);
+      if (exists (select 1 from DB.DBA.SYS_RDF_MAPPERS where RM_TYPE = 'URL' and regexp_match (RM_PATTERN, new_origin_uri) and RM_ENABLED = 1))
+	goto load_grddl;
       if (__proc_exists ('DB.DBA.RDF_LOAD_POST_PROCESS') and only_rdfa = 0) -- optional step, by default skip
 	call ('DB.DBA.RDF_LOAD_POST_PROCESS') (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options);
       --log_enable (saved_log_mode, 1);
@@ -1244,9 +1308,24 @@ create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_ori
   --    DB.DBA.SPARUL_CLEAR (graph_iri, 1);
   --    commit work;
   --  }
+
 load_grddl:;
+  if (('40001' = __SQL_STATE) and (retr_count < 10))
+    {
+      rollback work;
+      retr_count := retr_count + 1;
+      goto retry_after_deadlock;
+    }
+  if (__proc_exists ('DB.DBA.RDF_RUN_CARTRIDGES') is not null)
+    {
+      rc := DB.DBA.RDF_RUN_CARTRIDGES (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options, ret_hdr, ps, aq, req_hdr_arr);
+      if (rc)
+    return rc;
+    }
+  else
+    {
   cset := http_request_header (ret_hdr, 'Content-Type', 'charset', null);
-  for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do
+  for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS, RM_DESCRIPTION from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do
     {
       declare val_match, pcols, new_opts any;
       declare npars int;
@@ -1281,6 +1360,8 @@ load_grddl:;
           if (registry_get ('__sparql_mappers_debug') = '1')
             dbg_obj_prin1 ('Match ', RM_HOOK);
 	  new_opts := vector_concat (options, RM_OPTIONS, vector ('content-type', ret_content_type, 'charset', cset));
+	  if (__proc_exists ('DB.DBA.RDF_SPONGER_STATUS'))
+	    call ('DB.DBA.RDF_SPONGER_STATUS') (graph_iri, new_origin_uri, dest, RM_DESCRIPTION, options);
 	  if (RM_TYPE <> 'HTTP')
 	    {
 	      if (npars = 7)
@@ -1303,7 +1384,7 @@ load_grddl:;
 	    }
 	  if (__tag(rc) = 193 or rc < 0 or rc > 0)
 	    {
-	      if (__proc_exists ('DB.DBA.RDF_LOAD_POST_PROCESS')) -- optional step, by default skip
+		  if (rc > 0 and __proc_exists ('DB.DBA.RDF_LOAD_POST_PROCESS')) -- optional step, by default skip
 		call ('DB.DBA.RDF_LOAD_POST_PROCESS') (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options);
               if (__tag(rc) = 193)
                 return rc;
@@ -1312,6 +1393,7 @@ load_grddl:;
 	}
       try_next_mapper:;
     }
+    }
 
   -- else if not handled with the above cases
   --xd := DAV_EXTRACT_META_AS_RDF_XML (new_origin_uri, ret_body);
@@ -1323,7 +1405,7 @@ load_grddl:;
   --      DB.DBA.RDF_LOAD_RDFXML (xd, new_origin_uri, groupdest);
   --    return 1;
   --  }
-  if (dest is null)
+  if ((dest is null) and (get_soft is null or (get_soft <> 'add')))
     {
       DB.DBA.SPARUL_CLEAR (graph_iri, 1, 0);
       commit work;
@@ -1363,6 +1445,12 @@ resignal_parse_error:
 load_grddl_after_error:
   first_stat := __SQL_STATE;
   first_msg := __SQL_MESSAGE;
+  if (('40001' = first_stat) and (retr_count < 10))
+    {
+      rollback work;
+      retr_count := retr_count + 1;
+      goto retry_after_deadlock;
+    }
   goto load_grddl;
 }
 ;
@@ -1371,7 +1459,7 @@ create procedure DB.DBA.RDF_FORGET_HTTP_RESPONSE (in graph_iri varchar, in new_o
 {
   declare dest varchar;
   declare deadl int;
-  deadl := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'MaxDeadlockRetries'), '5'));
+  deadl := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'MaxDeadlockRetries'), '5'));
   declare exit handler for sqlstate '40001'
     {
       deadl := deadl - 1;
@@ -1395,7 +1483,7 @@ create function DB.DBA.RDF_SPONGE_UP (in graph_iri varchar, in options any, in u
   declare aq, cookie varchar;
   declare dest, local_iri varchar;
 
-  if (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'AsyncQueue') = '0')
+  if (coalesce (virtuoso_ini_item_value ('SPARQL', 'AsyncQueue'), '0') = '0' or get_keyword ('__rdf_sponge_queue', options) = 1)
     {
       return DB.DBA.RDF_SPONGE_UP_1 (graph_iri, options, uid);
     }
@@ -1428,7 +1516,7 @@ create function DB.DBA.RDF_SPONGE_UP_1 (in graph_iri varchar, in options any, in
 {
   declare dest, get_soft, local_iri, immg, res_graph_iri, cookie varchar;
   declare perms, log_mode integer;
-  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_UP (', graph_iri, options, ')');
+  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_UP_1 (', graph_iri, options, ')');
   graph_iri := cast (graph_iri as varchar);
   --set_user_id ('dba', 1);
   dest := get_keyword_ucase ('get:destination', options);
@@ -1446,7 +1534,7 @@ create function DB.DBA.RDF_SPONGE_UP_1 (in graph_iri varchar, in options any, in
   log_mode := get_keyword ('__rdf_sponge_log_mode', options);
   if (log_mode is not null) -- when in aq mode
     log_enable (log_mode, 1);
-  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_UP (', graph_iri, options, ') set local_iri=', local_iri);
+  -- dbg_obj_princ ('DB.DBA.RDF_SPONGE_UP_1 (', graph_iri, options, ') set local_iri=', local_iri);
   perms := DB.DBA.RDF_GRAPH_USER_PERMS_GET (dest, case (uid) when -1 then http_nobody_uid() else uid end);
   get_soft := get_keyword_ucase ('get:soft', options);
   if ('soft' = get_soft)
@@ -1459,7 +1547,7 @@ create function DB.DBA.RDF_SPONGE_UP_1 (in graph_iri varchar, in options any, in
           -- dbg_obj_princ ('Exists and get:soft=soft, leaving');
           if (not bit_and (perms, 1))
             {
-               -- dbg_obj_princ (dest, ' graph is OK as it is but not returned from RDF_SPONGE_UP due to lack of read permission for user ', uid);
+               -- dbg_obj_princ (dest, ' graph is OK as it is but not returned from RDF_SPONGE_UP_1 due to lack of read permission for user ', uid);
                return null;
             }
           res_graph_iri := local_iri;
@@ -1468,23 +1556,23 @@ create function DB.DBA.RDF_SPONGE_UP_1 (in graph_iri varchar, in options any, in
       -- dbg_obj_princ ('Does not exists, continue despite get:soft=soft');
     }
   else
-    if (('replacing' = get_soft) or ('replace' = get_soft))
+    if (('replacing' = get_soft) or ('replace' = get_soft) or ('add' = get_soft))
       {
         -- dbg_obj_princ ('get:soft=replacing');
         ;
       }
   else
     signal ('RDFZZ', sprintf (
-      'This version of Virtuoso supports only "soft" and "replacing" values of "define get:soft ...", not "%.500s"',
+      'This version of Virtuoso supports only "soft", "replacing" and "add" values of "define get:soft ...", not "%.500s"',
       get_soft ) );
-  if (not bit_and (perms, 8))
+  if (not bit_and (perms, 4))
     {
-       -- dbg_obj_princ (res_graph_iri, ' graph is not sponged by RDF_SPONGE_UP due to lack of read permission for user ', uid);
+       -- dbg_obj_princ (res_graph_iri, ' graph is not sponged by RDF_SPONGE_UP_1 due to lack of sponge permission for user ', uid);
        return null;
     }
   -- if requested iri is immutable, do not try to get it at all
   -- this is to preserve rdf storage in certain cases
-  immg := cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'ImmutableGraphs');
+  immg := virtuoso_ini_item_value ('SPARQL', 'ImmutableGraphs');
   if (immg is not null and user <> 'dba')
     {
       immg := split_and_decode (immg, 0, '\0\0,');
@@ -1541,7 +1629,7 @@ create function DB.DBA.RDF_SPONGE_UP_1 (in graph_iri varchar, in options any, in
 	}
     }
 graph_is_ready:
-  -- dbg_obj_princ (res_graph_iri, ' graph is ready, about to return from RDF_SPONGE_UP');
+  -- dbg_obj_princ (res_graph_iri, ' graph is ready, about to return from RDF_SPONGE_UP_1');
   if (__rdf_obj_ft_rule_check (iri_to_id (res_graph_iri), null) and
     get_keyword ('refresh_free_text', options, 0) )
     VT_INC_INDEX_DB_DBA_RDF_OBJ();
diff --git a/libsrc/Wi/rdf_void.sql b/libsrc/Wi/rdf_void.sql
index 34f0204..63e4008 100644
--- a/libsrc/Wi/rdf_void.sql
+++ b/libsrc/Wi/rdf_void.sql
@@ -1,12 +1,12 @@
 --
---  $Id: rdf_void.sql,v 1.10.2.7 2010/11/17 21:29:42 source Exp $
+--  $Id: rdf_void.sql,v 1.10.2.9 2012/03/08 12:55:34 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
 --  RDF Schema objects, generator of RDF Views
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -76,7 +76,7 @@ create procedure RDF_VOID_STORE (in graph varchar, in to_graph_name varchar := n
     ses := src;
   if (to_graph_name is null)
     {
-      host := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+      host := virtuoso_ini_item_value ('URIQA','DefaultHost');
       to_graph_name := 'http://' || host || '/stats/void#';
     }
   exec (sprintf ('sparql delete from <%s> { ?s1 ?p1 ?s2 } from <%s> where { <%s#Dataset> void:statItem ?s1 . ?s1 ?p1 ?s2 }',
@@ -99,7 +99,7 @@ create procedure RDF_VOID_ALL_GEN (in target_graph varchar, in details int := 0)
   if (is_http_ctx ())
     host := http_request_header(http_request_header (), 'Host', null, null);
   if (host is null)
-    host := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+    host := virtuoso_ini_item_value ('URIQA','DefaultHost');
   if (host is null)
     {
       hf := WS.WS.PARSE_URI (target_graph);
@@ -216,7 +216,7 @@ create procedure RDF_VOID_GEN_1 (in graph varchar, in gr_name varchar := null,
   if (is_http_ctx ())
     host := http_request_header(http_request_header (), 'Host', null, null);
   if (host is null)
-    host := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+    host := virtuoso_ini_item_value ('URIQA','DefaultHost');
   -- if (host is null)
   --  host := 'lod.openlinksw.com';
 
diff --git a/libsrc/Wi/rdfbox.c b/libsrc/Wi/rdfbox.c
index 54be0f7..ea0e54f 100644
--- a/libsrc/Wi/rdfbox.c
+++ b/libsrc/Wi/rdfbox.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: rdfbox.c,v 1.47.2.52 2011/03/23 16:45:20 source Exp $
+ *  $Id: rdfbox.c,v 1.47.2.82 2012/03/08 12:55:34 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -41,7 +41,7 @@ rb_complete_1 (rdf_box_t * rb, lock_trx_t * lt, void * /*actually query_instance
   static query_t *rdf_box_qry_complete_text = NULL;
   static query_t *rdf_box_qry_complete_xml_l;
   static query_t *rdf_box_qry_complete_text_l;
-  query_instance_t *caller_qi = caller_qi_v;
+  query_instance_t *caller_qi = (query_instance_t *)caller_qi_v;
   caddr_t err;
   local_cursor_t *lc;
   dtp_t value_dtp = ((rb->rb_chksum_tail) ? (((rdf_bigbox_t *)rb)->rbb_box_dtp) : DV_TYPE_OF (rb->rb_box));
@@ -51,18 +51,33 @@ rb_complete_1 (rdf_box_t * rb, lock_trx_t * lt, void * /*actually query_instance
 #endif
   if (NULL == rdf_box_qry_complete_text)
     {
-      rdf_box_qry_complete_xml_l = sql_compile_static (
-        "select xml_tree_doc (__xml_deserialize_packed (RO_LONG)), 16843009 from DB.DBA.RDF_OBJ table option (no cluster) where RO_ID = ?",
+      rdf_box_qry_complete_xml_l = sql_compile_static ("select \
+ xml_tree_doc (__xml_deserialize_packed (RO_LONG)), \
+ 16843009, \
+ RO_VAL \
+ from DB.DBA.RDF_OBJ table option (no cluster) where RO_ID = ?",
         bootstrap_cli, NULL, SQLC_DEFAULT );
-      rdf_box_qry_complete_text_l = sql_compile_static (
-        "select case (isnull (RO_LONG)) when 0 then blob_to_string (RO_LONG) else RO_VAL end, RO_DT_AND_LANG from DB.DBA.RDF_OBJ table option (no cluster) where RO_ID = ?",
+      rdf_box_qry_complete_text_l = sql_compile_static ("select \
+ case (isnull (RO_LONG)) \
+   when 0 then case (bit_and (RO_FLAGS, 2)) when 2 then xml_tree_doc (__xml_deserialize_packed (RO_LONG)) else blob_to_string (RO_LONG) end \
+   else RO_VAL end, \
+ RO_DT_AND_LANG, \
+ case (isnull (RO_LONG)) when 0 then RO_VAL else NULL end \
+ from DB.DBA.RDF_OBJ table option (no cluster) where RO_ID = ? ",
         bootstrap_cli, NULL, SQLC_DEFAULT );
-
-      rdf_box_qry_complete_xml = sql_compile_static (
-        "select xml_tree_doc (__xml_deserialize_packed (RO_LONG)), 16843009 from DB.DBA.RDF_OBJ where RO_ID = ?",
+      rdf_box_qry_complete_xml = sql_compile_static ("select \
+ xml_tree_doc (__xml_deserialize_packed (RO_LONG)), \
+ 16843009, \
+ RO_VAL \
+ from DB.DBA.RDF_OBJ where RO_ID = ?",
         bootstrap_cli, NULL, SQLC_DEFAULT );
-      rdf_box_qry_complete_text = sql_compile_static (
-        "select case (isnull (RO_LONG)) when 0 then blob_to_string (RO_LONG) else RO_VAL end, RO_DT_AND_LANG from DB.DBA.RDF_OBJ where RO_ID = ?",
+      rdf_box_qry_complete_text = sql_compile_static ("select \
+ case (isnull (RO_LONG)) \
+   when 0 then case (bit_and (RO_FLAGS, 2)) when 2 then xml_tree_doc (__xml_deserialize_packed (RO_LONG)) else blob_to_string (RO_LONG) end \
+   else RO_VAL end, \
+ RO_DT_AND_LANG, \
+ case (isnull (RO_LONG)) when 0 then RO_VAL else NULL end \
+ from DB.DBA.RDF_OBJ where RO_ID = ?",
         bootstrap_cli, NULL, SQLC_DEFAULT );
     }
   err = qr_rec_exec (
@@ -81,11 +96,35 @@ rb_complete_1 (rdf_box_t * rb, lock_trx_t * lt, void * /*actually query_instance
     {
       caddr_t val = lc_nth_col (lc, 0);
       uint32 dt_lang = unbox (lc_nth_col (lc, 1));
+      caddr_t chksum = lc_nth_col (lc, 2);
       rb->rb_lang = dt_lang & 0xffff;
       rb->rb_type = dt_lang >> 16;
       rb->rb_serialize_id_only = 0; /* may also serialize with value if for order by once it is filled */
+          if (DV_STRING != DV_TYPE_OF (chksum))
+            chksum = NULL;
+      if (sizeof (rdf_bigbox_t) == box_length (rb))
+        {
+          if (rb->rb_chksum_tail)
+            {
+              caddr_t cached_chksum = ((rdf_bigbox_t *)rb)->rbb_chksum;
+              if ((DV_TYPE_OF (cached_chksum) != DV_TYPE_OF (chksum)) ||
+                (box_length (cached_chksum) != box_length (chksum)) ||
+                memcmp (cached_chksum, chksum, box_length (chksum)) )
+                sqlr_new_error ("22023", "SR579", "RDF integrity issue: the checksum of value retrieved from DB.DBA.RDF_OBJ with RO_ID = " BOXINT_FMT " is not equal to checksum stored in RDF box",
+                  (boxint)(rb->rb_ro_id) );
+            }
+          else if (NULL != chksum)
+            {
+              dk_check_tree (chksum);
+              ((rdf_bigbox_t *)rb)->rbb_chksum = box_copy (chksum);
+              ((rdf_bigbox_t *)rb)->rbb_box_dtp = DV_TYPE_OF (val);
+              rb->rb_chksum_tail = 1;
+            }
+        }
+      else if (chksum || rb->rb_chksum_tail)
+        GPF_T;
       if (rb->rb_chksum_tail && (DV_TYPE_OF (val) != ((rdf_bigbox_t *)rb)->rbb_box_dtp))
-        sqlr_new_error ("22023", "SR579", "The type %ld of value retrieved from DB.DBA.RDF_OBJ with RO_ID = " BOXINT_FMT " is not equal to preset type %ld of RDF box",
+        sqlr_new_error ("22023", "SR579", "RDF integrity issue: the type %ld of value retrieved from DB.DBA.RDF_OBJ with RO_ID = " BOXINT_FMT " is not equal to preset type %ld of RDF box",
           (long)DV_TYPE_OF (val), (boxint)(rb->rb_ro_id), ((long)(((rdf_bigbox_t *)rb)->rbb_box_dtp)) );
       dk_free_tree (rb->rb_box);
       if (RDF_BOX_GEO == rb->rb_type)
@@ -95,6 +134,7 @@ rb_complete_1 (rdf_box_t * rb, lock_trx_t * lt, void * /*actually query_instance
       if (DV_STRING == DV_TYPE_OF (rb->rb_box))
         box_flags (rb->rb_box) |= BF_UTF8;
       rb->rb_is_complete = 1;
+      rb_dt_lang_check(rb);
     }
   err = lc->lc_error;
   lc_free (lc);
@@ -132,9 +172,9 @@ bif_rdf_box (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   lang = bif_long_arg (qst, args, 2, "rdf_box");
   ro_id = bif_long_arg (qst, args, 3, "rdf_box");
   is_complete = bif_long_arg (qst, args, 4, "rdf_box");
-  if ((RDF_BOX_MIN_TYPE > type) || (type & ~0xffff))
+  if ((RDF_BOX_MIN_TYPE > type) || (type & ~0xffff) || (RDF_BOX_ILL_TYPE == type))
     sqlr_new_error ("22023", "SR547", "Invalid datatype id %ld as argument 2 of rdf_box()", type);
-  if ((RDF_BOX_DEFAULT_LANG > lang) || (lang & ~0xffff))
+  if ((RDF_BOX_DEFAULT_LANG > lang) || (lang & ~0xffff) || (RDF_BOX_ILL_LANG == lang))
     sqlr_new_error ("22023", "SR548", "Invalid language id %ld as argument 3 of rdf_box()", lang);
   if ((RDF_BOX_DEFAULT_TYPE != type) && (RDF_BOX_DEFAULT_LANG != lang))
     sqlr_new_error ("22023", "SR549", "Both datatype id %ld and language id %ld are not default in call of rdf_box()", type, lang);
@@ -174,12 +214,16 @@ bif_rdf_box (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       rbb->rbb_base.rb_is_complete = is_complete;
       rbb->rbb_base.rb_serialize_id_only = is_complete >> 1;
       rbb->rbb_base.rb_chksum_tail = 1;
-      rbb->rbb_chksum = box_copy_tree (chksum);
+      dk_check_tree (chksum);
+      rbb->rbb_chksum = chksum; /* Not box_copy_tree (chksum) */
       if (6 < BOX_ELEMENTS (args))
         {
           long dtp = bif_long_arg (qst, args, 6, "rdf_box");
           if ((dtp &~0xFF) || ! (dtp & 0x80))
-            sqlr_new_error ("22023", "SR556", "Invalid dtp %ld in call of rdf_box()", dtp);
+            {
+              dk_free_box ((caddr_t *)rbb);
+              sqlr_new_error ("22023", "SR556", "Invalid dtp %ld in call of rdf_box()", dtp);
+            }
            rbb->rbb_box_dtp = (dtp_t)dtp;
         }
       else
@@ -256,6 +300,7 @@ bif_ro_digest_from_parts (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args
       rbb->rbb_base.rb_is_outlined = 1;
       rbb->rbb_base.rb_is_complete = 0;
       rbb->rbb_base.rb_chksum_tail = 1;
+      dk_check_tree (box);
       rbb->rbb_chksum = box_copy_tree (box);
       rbb->rbb_box_dtp = (dtp_t)DV_XML_ENTITY;
       rdf_bigbox_audit(rbb);
@@ -272,6 +317,7 @@ bif_ro_digest_from_parts (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args
         rbb->rbb_base.rb_is_outlined = 1;
       rbb->rbb_base.rb_is_complete = is_complete;
       rbb->rbb_base.rb_chksum_tail = 1;
+      dk_check_tree (chksum);
       rbb->rbb_chksum = box_copy_tree (chksum);
       if (flags & 2)
         rbb->rbb_box_dtp = (dtp_t)DV_XML_ENTITY;
@@ -436,7 +482,7 @@ bif_rdf_box_set_type (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   rdf_box_t *rb = bif_rdf_box_arg (qst, args, 0, "rdf_box_set_type");
   long type = bif_long_arg (qst, args, 1, "rdf_box_set_type");
-  if ((RDF_BOX_MIN_TYPE > type) || (type & ~0xffff))
+  if ((RDF_BOX_MIN_TYPE > type) || (type & ~0xffff) || (RDF_BOX_ILL_TYPE == type))
     sqlr_new_error ("22023", "SR554", "Invalid datatype id %ld as argument 2 of rdf_box_set_type()", type);
   if (0 != rb->rb_ro_id)
     sqlr_new_error ("22023", "SR555", "Datatype id can be changed only if rdf box has no ro_id in call of rdf_box_set_type ()");
@@ -453,6 +499,7 @@ bif_rdf_box_chksum (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   rdf_bigbox_audit (rbb);
   if (!rbb->rbb_base.rb_chksum_tail)
     return NEW_DB_NULL;
+  dk_check_tree (rbb->rbb_chksum);
   return box_copy_tree (rbb->rbb_chksum);
 }
 
@@ -485,7 +532,7 @@ caddr_t
 bif_rdf_box_set_is_text (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t rb = bif_arg (qst, args, 0, "rdf_box_set_is_text");
-  int f = bif_long_arg (qst, args, 1, "rdf_vix_set_is_complete");
+  int f = bif_long_arg (qst, args, 1, "rdf_box_set_is_text");
   if (DV_RDF == DV_TYPE_OF (rb))
     {
       rdf_box_t * rb2 = (rdf_box_t *) rb;
@@ -558,6 +605,7 @@ bif_rdf_box_needs_digest (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args
             if (DV_DB_NULL != dict_dtp)
               return (caddr_t)((ptrlong)3);
 /* This is no longer needed because in Vajra we don't ft-index all typed strings, but only some
+            rb_dt_lang_check(rb2);
             if ((RDF_BOX_DEFAULT_TYPE != rb2->rb_type) || (RDF_BOX_DEFAULT_LANG != rb2->rb_lang))
               return box_num (3);
 */
@@ -594,6 +642,32 @@ bif_rdf_box_strcmp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return box_num (strcmp (rb1->rb_box, rb2->rb_box));
 }
 
+caddr_t
+bif_rdf_box_migrate_after_06_02_3129 (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  rdf_box_t *rb = (rdf_box_t *)bif_arg (qst, args, 0, "rdf_box_migrate_after_06_02_3129");
+  switch (DV_TYPE_OF (rb))
+    {
+    case DV_XML_ENTITY: case DV_GEO: return (caddr_t)((ptrlong)1);
+    case DV_RDF: break;
+    default: return (caddr_t)((ptrlong)0);
+    }
+  switch (DV_TYPE_OF (rb->rb_box))
+    {
+    case DV_XML_ENTITY: case DV_GEO: return (caddr_t)((ptrlong)1);
+    default: break;
+    }
+  if (rb->rb_chksum_tail)
+    {
+      switch (((rdf_bigbox_t *)(rb))->rbb_box_dtp)
+        {
+        case DV_XML_ENTITY: case DV_GEO: return (caddr_t)((ptrlong)1);
+        default: return (caddr_t)((ptrlong)0);
+        }
+    }
+  return (caddr_t)((ptrlong)0);
+}
+
 
 caddr_t
 bif_rdf_box_ro_id (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
@@ -718,6 +792,7 @@ rb_ext_serialize (rdf_box_t * rb, dk_session_t * ses)
   int with_content = DKS_DB_DATA (ses) != NULL || DKS_CL_DATA (ses) != NULL
     || ((DKS_TO_CLUSTER | DKS_TO_OBY_KEY) & ses->dks_cluster_flags);
   dtp_t flags = RBS_EXT_TYPE;
+  rb_dt_lang_check(rb);
   session_buffered_write_char (DV_RDF, ses);
   if (with_content && rb->rb_is_complete)
     flags |= RBS_COMPLETE;
@@ -752,23 +827,26 @@ rb_serialize (caddr_t x, dk_session_t * ses)
   rdf_box_audit (rb);
   if ((RDF_BOX_DEFAULT_TYPE != rb->rb_type) && (RDF_BOX_DEFAULT_LANG != rb->rb_lang))
     sr_report_future_error (ses, "", "Both datatype id %d and language id %d are not default in DV_RDF value, can't serialize");
+  if  ((rdf_no_string_inline || rb->rb_serialize_id_only)
+    && rb->rb_ro_id && !with_content)
+    {
+      rb_id_serialize (rb, ses);
+      return;
+    }
   if (rb->rb_type < RDF_BOX_DEFAULT_TYPE)
     {
       /* geo boxes and strings if string inlining is off */
       rb_ext_serialize (rb, ses);
       return;
     }
-  if  (!unbox_inline (rb->rb_box) && !rb->rb_is_complete)
+  if  (!unbox (rb->rb_box))
     {
-      rb_id_serialize (rb, ses);
-      return;
-    }
-  if  ((rdf_no_string_inline || rb->rb_serialize_id_only)
-    && ((DV_STRINGP (rb->rb_box) && !with_content)) )
+      if (!rb->rb_is_complete)
     {
       rb_id_serialize (rb, ses);
       return;
     }
+    }
       if (!(rb->rb_is_complete) && !(rb->rb_ro_id))
     sr_report_future_error (ses, "", "Zero ro_id in incomplete DV_RDF value, can't serialize");
   if (NULL != cli && cli->cli_version < 3031)
@@ -776,6 +854,7 @@ rb_serialize (caddr_t x, dk_session_t * ses)
   else
     {
       int flags = 0;
+      rb_dt_lang_check(rb);
       session_buffered_write_char (DV_RDF, ses);
       if (rb->rb_ro_id)
 	flags |= RBS_OUTLINED;
@@ -814,7 +893,9 @@ rb_serialize (caddr_t x, dk_session_t * ses)
       else if (rb->rb_chksum_tail)
         {
           caddr_t str = ((rdf_bigbox_t *)rb)->rbb_chksum;
-          int str_len = box_length (str) - 1;
+          int str_len;
+          dk_check_tree (str);
+          str_len = box_length (str) - 1;
 	  if (str_len > RB_MAX_INLINED_CHARS)
 	    str_len = RB_MAX_INLINED_CHARS;
 #ifdef OLD_RDF_BOX_SERIALIZATION
@@ -970,7 +1051,7 @@ dv_rdf_compare (db_buf_t dv1, db_buf_t dv2)
   flags1 = dv1[1];
   if (RBS_EXT_TYPE & flags1)
     return dv_rdf_ext_compare (dv1, dv2);
-  if (dtp2 > DV_RDF)
+  if (dtp_canonical[dtp2] > DV_RDF) /* dtp_canonical because dv int64 is gt dv rdf but here it counts for dv long int */
     return DVC_DTP_LESS;
   if (RBS_SKIP_DTP & flags1)
     {
@@ -1187,6 +1268,8 @@ rdf_box_compare (ccaddr_t a1, ccaddr_t a2)
       tmp_rb2.rb_ro_id = 0;
       rb2 = &tmp_rb2;
     }
+  rb_dt_lang_check(rb1);
+  rb_dt_lang_check(rb2);
   {
     short type1 = rb1->rb_type;
     short type2 = rb2->rb_type;
@@ -1273,6 +1356,7 @@ rdf_box_hash (caddr_t box)
   rdf_box_audit (rb);
   if (0 != rb->rb_ro_id)
     return rb->rb_ro_id + (rb->rb_ro_id << 16);
+  rb_dt_lang_check(rb);
   if (rb->rb_is_complete && (RDF_BOX_DEFAULT_LANG == rb->rb_lang) && (RDF_BOX_DEFAULT_TYPE == rb->rb_type))
         return box_hash (rb->rb_box);
   return rb->rb_lang * 17 + rb->rb_type * 13 + rb->rb_is_complete * 9 +
@@ -1286,11 +1370,7 @@ rdf_box_hash_cmp (ccaddr_t a1, ccaddr_t a2)
 {
   rdf_box_t * rb1 = (rdf_box_t *) a1;
   rdf_box_t * rb2 = (rdf_box_t *) a2;
-  rdf_box_t tmp_rb2;
   dtp_t dtp1 = DV_TYPE_OF (rb1), dtp2 = DV_TYPE_OF (rb2);
-  dtp_t data_dtp1, data_dtp2;
-  int len1, len2, cmp_len, cmp_headlen, mcmp;
-  caddr_t data1 = NULL, data2 = NULL;
   /* arrange so that if both are not rdf boxes, the one that is a box is first */
   if (DV_RDF != dtp1)
     {
@@ -1304,6 +1384,8 @@ rdf_box_hash_cmp (ccaddr_t a1, ccaddr_t a2)
         return (rb1->rb_ro_id == rb2->rb_ro_id) ? 1 : 0;
       else if ((0 != rb1->rb_ro_id) || (0 != rb2->rb_ro_id))
         return 0;
+      rb_dt_lang_check(rb1);
+      rb_dt_lang_check(rb2);
       if ((rb1->rb_lang != rb2->rb_lang) || (rb1->rb_type != rb2->rb_type) || (rb1->rb_is_complete != rb2->rb_is_complete) || (rb1->rb_chksum_tail != rb2->rb_chksum_tail))
         return 0;
       if (rb1->rb_is_complete && (RDF_BOX_DEFAULT_LANG == rb1->rb_lang) && (RDF_BOX_DEFAULT_TYPE == rb1->rb_type)
@@ -1315,6 +1397,7 @@ rdf_box_hash_cmp (ccaddr_t a1, ccaddr_t a2)
     }
   if ((0 == rb1->rb_ro_id) && rb1->rb_is_complete && (RDF_BOX_DEFAULT_LANG == rb1->rb_lang) && (RDF_BOX_DEFAULT_TYPE == rb1->rb_type))
     return box_equal (rb1->rb_box, a2);
+  rb_dt_lang_check(rb1);
   return 0;
 }
 
@@ -1334,6 +1417,7 @@ rb_cast_to_xpath_safe (query_instance_t *qi, caddr_t new_val, caddr_t *retval_pt
     case DV_RDF:
       {
         rdf_box_t *rb = (rdf_box_t *)new_val;
+        rb_dt_lang_check(rb);
         if (!rb->rb_is_complete)
           rb_complete (rb, qi->qi_trx, qi);
 /*
@@ -1425,6 +1509,7 @@ bif_rdf_sqlval_of_obj (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   rb = (rdf_box_t *)shortobj;
   if (!rb->rb_is_complete)
     rb_complete (rb, qi->qi_trx, qi);
+  rb_dt_lang_check(rb);
   if (((RDF_BOX_DEFAULT_TYPE == rb->rb_type) && (RDF_BOX_DEFAULT_LANG == rb->rb_lang))
     || ((1 < BOX_ELEMENTS (args)) && bif_long_arg (qst, args, 1, "__rdf_sqlval_of_obj")) )
     return box_copy_tree (rb->rb_box);
@@ -1525,6 +1610,9 @@ bif_rdf_long_to_ttl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     case DV_STRING:
       dks_esc_write (out, val, box_length (val) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_DQ);
       break;
+    case DV_WIDE:
+      dks_esc_write (out, val, box_length (val) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_TTL_DQ);
+      break;
     default:
       {
         caddr_t tmp_utf8_box = box_cast_to_UTF8 (qst, val);
@@ -1619,14 +1707,13 @@ rdf_dist_or_redu_ser_long (caddr_t val, caddr_t * err_ret, int is_reduiced, cons
       rdf_bigbox_t *rbb = (rdf_bigbox_t *) val;
       caddr_t subbox = NULL;
       caddr_t res;
-#define SER_VEC_SZ (5 * sizeof (caddr_t))
       char buf[6 * sizeof (caddr_t) + BOX_AUTO_OVERHEAD];
       caddr_t *ser_vec;
       caddr_t ptmp;
 
       BOX_AUTO (ptmp, buf, ((rbb->rbb_base.rb_chksum_tail ? 6 : 5) * sizeof (caddr_t)), DV_ARRAY_OF_POINTER);
       ser_vec = (caddr_t *) ptmp;
-
+      rb_dt_lang_check(&(rbb->rbb_base));
       subbox = rbb->rbb_base.rb_box;
       if ((rbb->rbb_base.rb_is_complete) &&
 	  (0 != rbb->rbb_base.rb_ro_id) &&
@@ -1720,17 +1807,22 @@ bif_rdf_dist_deser_long (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       if (rbb->rbb_base.rb_ro_id)
         rbb->rbb_base.rb_is_outlined = 1;
       vec[0] = 0;
+      rb_dt_lang_check(&(rbb->rbb_base));
       dk_free_tree (vec);
       return (caddr_t)rbb;
     }
   return deser;
 }
 
+/*! Description of IRI reference in Turtle and similar formats */
 typedef struct ttl_iriref_s {
-  caddr_t colname;
-  caddr_t uri, ns, prefix, loc;
-  ptrlong is_bnode;
-  ptrlong is_iri;
+  caddr_t colname;	/*!< Name of column, used only for result sets, not for triples */
+  caddr_t uri;		/*!< A complete source URI */
+  caddr_t ns;		/*!< Namespace, if found in the URI, NULL for bnodes and unusual URIs */
+  caddr_t prefix;	/*!< Namespace prefix, if \c ns is not NULL and found in dictionary */
+  caddr_t loc;		/*!< Local part of URI, if namespace can be extracted */
+  ptrlong is_bnode;	/*!< 0 or 1 flag whether \c URI us blank node URI */
+  ptrlong is_iri;	/*!< 0 or 1 flag whether the rest of the structure is filled with URI data, functions that parse/print URI do not check it, it's for their callers only */
 } ttl_iriref_t;
 
 typedef struct ttl_iriref_items_s {
@@ -1744,8 +1836,19 @@ iri_cast_and_split_ttl_qname (query_instance_t *qi, caddr_t iri, caddr_t *ns_pre
   switch (DV_TYPE_OF (iri))
     {
     case DV_STRING: case DV_UNAME:
+	  {
+	    int iri_boxlen = box_length (iri);
+	    /*                                     0123456789 */
+	    if ((iri_boxlen > 9) && !memcmp (iri, "nodeID://", 9))
+	      {
+                ns_prefix_ret[0] = uname___empty;
+		local_ret[0] = box_dv_short_nchars (iri + 9, iri_boxlen - 10);
+		is_bnode_ret[0] = 1;
+		return 1;
+	      }
       iri_split_ttl_qname (iri, ns_prefix_ret, local_ret, 1);
       return 1;
+	  }
     case DV_IRI_ID: case DV_IRI_ID_8:
       {
         int res;
@@ -1801,6 +1904,57 @@ iri_cast_and_split_ttl_qname (query_instance_t *qi, caddr_t iri, caddr_t *ns_pre
   return 0;
 }
 
+
+int
+iri_cast_rdfxml_qname (query_instance_t *qi, caddr_t iri, caddr_t *uri_ret, ptrlong *is_bnode_ret)
+{
+  caddr_t old_uri_ret = uri_ret[0];
+  is_bnode_ret[0] = 0;
+  switch (DV_TYPE_OF (iri))
+    {
+    case DV_STRING: case DV_UNAME:
+	  {
+	    int iri_boxlen = box_length (iri);
+	    /*                                     0123456789 */
+	    if ((iri_boxlen > 9) && !memcmp (iri, "nodeID://", 9))
+	      {
+		uri_ret[0] = box_dv_short_nchars (iri + 9, iri_boxlen - 10);
+		is_bnode_ret[0] = 1;
+		break;
+	      }
+            if (uri_ret[0] != iri)
+              {
+                uri_ret[0] = box_dv_short_nchars (iri, iri_boxlen - 1);
+	        dk_free_box (old_uri_ret);
+              }
+	    return 1;
+	  }
+    case DV_IRI_ID: case DV_IRI_ID_8:
+      {
+        iri_id_t iid = unbox_iri_id (iri);
+        if (0L == iid)
+          return 0;
+        if (min_bnode_iri_id () <= iid)
+          {
+            if (min_named_bnode_iri_id () > iid)
+              {
+                uri_ret[0] = BNODE_IID_TO_TTL_LABEL_LOCAL (iid);
+                is_bnode_ret[0] = 1;
+		dk_free_box (old_uri_ret);
+                return 1;
+              }
+            uri_ret[0] = key_id_to_iri (qi, iid);
+            return 1;
+          }
+        uri_ret[0] = key_id_to_iri (qi, iid);
+        return 1;
+      }
+    default: return 0;
+    }
+  dk_free_box (old_uri_ret);
+  return 1;
+}
+
 int
 iri_cast_nt_absname (query_instance_t *qi, caddr_t iri, caddr_t *iri_ret, ptrlong *is_bnode_ret)
 {
@@ -1813,7 +1967,9 @@ iri_cast_nt_absname (query_instance_t *qi, caddr_t iri, caddr_t *iri_ret, ptrlon
 /*                                             0123456789 */
         if ((iri_boxlen > 9) && !memcmp (iri, "nodeID://", 9))
           {
-            iri_ret[0] = box_dv_short_nchars (iri + 9, iri_boxlen - 9);
+            iri_ret[0] = box_dv_short_nchars (iri + (9-2), iri_boxlen - (9-2));
+            iri_ret[0][0] = '_';
+            iri_ret[0][1] = ':';
             is_bnode_ret[0] = 1;
             return 1;
           }
@@ -1860,7 +2016,7 @@ bif_http_sys_find_best_sparql_accept (caddr_t * qst, caddr_t * err_ret, state_sl
     {
       int ctr;
       caddr_t *tmp;
-      tmp = (caddr_t *)list (25*2,
+      tmp = (caddr_t *)list (23*2,
         "text/rdf+n3"				, "TTL"		, /*  0 */
         "text/rdf+ttl"				, "TTL"		, /*  1 */
         "text/rdf+turtle"			, "TTL"		, /*  2 */
@@ -1876,16 +2032,14 @@ bif_http_sys_find_best_sparql_accept (caddr_t * qst, caddr_t * err_ret, state_sl
         "text/html"				, "HTML"	, /* 12 */
         "application/vnd.ms-excel"		, "HTML"	, /* 13 */
         "application/javascript"		, "JS"		, /* 14 */
-        "application/rdf+json"			, "JSON;TALIS"	, /* 15 */
-        "application/x-rdf+json"		, "JSON;TALIS"	, /* 16 */
-        "application/rdf+xml"			, "RDFXML"	, /* 17 */
-        "application/atom+xml"			, "ATOM;XML"	, /* 18 */
-        "application/odata+json"		, "JSON;ODATA"	, /* 19 */
-        "text/rdf+nt"				, "NT"		, /* 20 */
-        "text/plain"				, "NT"		, /* 21 */
-        "text/cxml+qrcode"			, "CXML"	, /* 22 */
-        "text/cxml"				, "CXML"	, /* 23 */
-        "text/csv"				, "CSV" /* 24 Increase count in this list() call when add more MIME types! */ );
+        "application/rdf+xml"			, "RDFXML"	, /* 15 */
+        "application/atom+xml"			, "ATOM;XML"	, /* 16 */
+        "application/odata+json"		, "JSON;ODATA"	, /* 17 */
+        "text/rdf+nt"				, "NT"		, /* 18 */
+        "text/plain"				, "NT"		, /* 19 */
+        "text/cxml+qrcode"			, "CXML"	, /* 20 */
+        "text/cxml"				, "CXML"	, /* 21 */
+        "text/csv"				, "CSV" /* 22 Increase count in this list() call when add more MIME types! */ );
       for (ctr = BOX_ELEMENTS (tmp); ctr--; /* no step */)
         tmp[ctr] = box_dv_short_string (tmp[ctr]);
       supp_rset = tmp;
@@ -1894,33 +2048,41 @@ bif_http_sys_find_best_sparql_accept (caddr_t * qst, caddr_t * err_ret, state_sl
     {
       int ctr;
       caddr_t *tmp;
-      tmp = (caddr_t *)list (26*2,
-        "text/rdf+n3"				, "TTL"		, /*  0 */
-        "text/rdf+ttl"				, "TTL"		, /*  1 */
-        "text/rdf+turtle"			, "TTL"		, /*  2 */
-        "text/turtle"				, "TTL"		, /*  3 */
-        "text/n3"				, "TTL"		, /*  4 */
-        "application/turtle"			, "TTL"		, /*  5 */
-        "application/x-turtle"			, "TTL"		, /*  6 */
-        "application/json"			, "JSON"	, /*  7 */
-        "application/rdf+json"			, "JSON;TALIS"	, /*  8 */
-        "application/x-rdf+json"		, "JSON;TALIS"	, /*  9 */
-        "application/soap+xml"			, "SOAP"	, /* 10 */
-        "application/soap+xml;11"		, "SOAP"	, /* 11 */
-        "application/rdf+xml"			, "RDFXML"	, /* 12 */
-        "text/rdf+nt"				, "NT"		, /* 13 */
-        "application/xhtml+xml"			, "RDFA;XHTML"	, /* 14 */
-        "text/plain"				, "NT"		, /* 15 */
-        "application/sparql-results+json"	, "JSON;RES"	, /* 16 */
-        "text/html"				, "HTML"	, /* 17 */
-        "application/vnd.ms-excel"		, "HTML"	, /* 18 */
-        "application/javascript"		, "JS"		, /* 19 */
-        "application/atom+xml"			, "ATOM;XML"	, /* 20 */
-        "application/odata+json"		, "JSON;ODATA"	, /* 21 */
-        "application/sparql-results+xml"	, "XML"		, /* 22 */
-        "text/cxml+qrcode"			, "CXML;QRCODE"	, /* 23 */
-        "text/cxml"				, "CXML"	, /* 24 */
-        "text/csv"				, "CSV" /* 25 Increase count in this list() call when add more MIME types! */ );
+      tmp = (caddr_t *)list (34*2,
+        "application/x-trig"			, "TRIG"		, /*  0 */
+        "text/rdf+n3"				, "TTL"			, /*  1 */
+        "text/rdf+ttl"				, "TTL"			, /*  2 */
+        "text/rdf+turtle"			, "TTL"			, /*  3 */
+        "text/turtle"				, "TTL"			, /*  4 */
+        "text/n3"				, "TTL"			, /*  5 */
+        "application/turtle"			, "TTL"			, /*  6 */
+        "application/x-turtle"			, "TTL"			, /*  7 */
+        "application/json"			, "JSON"		, /*  8 */
+        "application/rdf+json"			, "JSON;TALIS"		, /*  9 */
+        "application/x-rdf+json"			, "JSON;TALIS"		, /* 10 */
+        "application/soap+xml"			, "SOAP"		, /* 11 */
+        "application/soap+xml;11"		, "SOAP"		, /* 12 */
+        "application/rdf+xml"			, "RDFXML"		, /* 13 */
+        "text/rdf+nt"				, "NT"			, /* 14 */
+        "application/xhtml+xml"			, "RDFA;XHTML"		, /* 15 */
+        "text/plain"				, "NT"			, /* 16 */
+        "application/sparql-results+json"	, "JSON;RES"		, /* 17 */
+        "text/html"				, "HTML;MICRODATA"	, /* 18 */
+        "application/vnd.ms-excel"		, "HTML"		, /* 19 */
+        "application/javascript"		, "JS"			, /* 20 */
+        "application/atom+xml"			, "ATOM;XML"		, /* 21 */
+        "application/odata+json"		, "JSON;ODATA"		, /* 22 */
+        "application/sparql-results+xml"		, "XML"			, /* 23 */
+        "text/cxml+qrcode"			, "CXML;QRCODE"		, /* 24 */
+        "text/cxml"				, "CXML"		, /* 25 */
+        "text/x-html+ul"				, "HTML;UL"		, /* 26 */
+        "text/x-html+tr"				, "HTML;TR"		, /* 27 */
+        "text/md+html"				, "HTML;MICRODATA"	, /* 28 */
+        "text/microdata+html"			, "HTML;MICRODATA"	, /* 29 */
+        "application/microdata+json"		, "JSON;MICRODATA"	, /* 30 */
+        "application/x-json+ld"			, "JSON;LD"		, /* 31 */
+        "application/ld+json"			, "JSON;LD"		, /* 32 */
+        "text/csv"				, "CSV" /* 33 Increase count in this list() call when add more MIME types! */ );
       for (ctr = BOX_ELEMENTS (tmp); ctr--; /* no step */)
         tmp[ctr] = box_dv_short_string (tmp[ctr]);
       supp_dict = tmp;
@@ -1949,7 +2111,7 @@ typedef struct ttl_env_s {
 } ttl_env_t;
 
 int
-ttl_http_write_prefix_if_needed (caddr_t *qst, dk_session_t *ses, ttl_env_t *env, ptrlong *ns_counter_ptr, ttl_iriref_t *ti)
+ttl_try_to_cache_new_prefix (caddr_t *qst, dk_session_t *ses, ttl_env_t *env, ptrlong *ns_counter_ptr, ttl_iriref_t *ti)
 {
   id_hash_iterator_t *ns2pref_hit = env->te_used_prefixes;
   id_hash_t *ns2pref = ns2pref_hit->hit_hash;
@@ -1992,6 +2154,15 @@ ttl_http_write_prefix_if_needed (caddr_t *qst, dk_session_t *ses, ttl_env_t *env
   ti->prefix = box_copy (ti->prefix);
   ns_counter_ptr[0] = ns_counter_val + 1;
   ti->ns = box_copy (ti->ns);
+  return 1;
+}
+
+int
+ttl_http_write_prefix_if_needed (caddr_t *qst, dk_session_t *ses, ttl_env_t *env, ptrlong *ns_counter_ptr, ttl_iriref_t *ti)
+{
+  int cache_ok = ttl_try_to_cache_new_prefix (qst, ses, env, ns_counter_ptr, ti);
+  if (!cache_ok)
+    return 0;
   if (NULL != env->te_prev_subj_ns)
     {
       session_buffered_write (ses, " .\n", 3);
@@ -2076,13 +2247,12 @@ http_ttl_or_nt_prepare_obj (query_instance_t *qi, caddr_t obj, dtp_t obj_dtp, tt
       rdf_box_t *rb = (rdf_box_t *)obj;
       if (!rb->rb_is_complete)
         rb_complete (rb, qi->qi_trx, qi);
+      rb_dt_lang_check(rb);
       if (RDF_BOX_DEFAULT_TYPE == rb->rb_type)
         return;
       dt_ret->uri = rdf_type_twobyte_to_iri (rb->rb_type);
       if (dt_ret->uri) /* if by some reason rb_type is wrong */
-	{
-	  box_flags (dt_ret->uri) |= BF_IRI;
-	}
+        box_flags (dt_ret->uri) |= BF_IRI;
     }
   else
     {
@@ -2185,22 +2355,26 @@ http_ttl_write_obj (dk_session_t *ses, ttl_env_t *env, query_instance_t *qi, cad
       dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_DQ);
       session_buffered_write_char ('"', ses);
       break;
+    case DV_WIDE:
+      session_buffered_write_char ('"', ses);
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_TTL_DQ);
+      session_buffered_write_char ('"', ses);
+      break;
     case DV_XML_ENTITY:
-      {
-        http_ttl_or_nt_write_xe (ses, qi, (xml_entity_t *)(obj_box_value),
-          ((DV_RDF == obj_dtp) ? (RDF_BOX_DEFAULT_TYPE == ((rdf_box_t *)obj)->rb_type) : 1) );
-        break;
-      }
+      http_ttl_or_nt_write_xe (ses, qi, (xml_entity_t *)(obj_box_value),
+        ((DV_RDF == obj_dtp) ? (RDF_BOX_DEFAULT_TYPE == ((rdf_box_t *)obj)->rb_type) : 1) );
+      break;
     case DV_DB_NULL:
       session_buffered_write (ses, "(NULL)", 6);
       break;
     default:
       {
         caddr_t tmp_utf8_box = box_cast_to_UTF8 ((caddr_t *)qi, obj_box_value);
-        if (DV_RDF == obj_dtp)
+        int need_quotes = ((DV_RDF == obj_dtp) || (DV_BLOB_HANDLE == obj_dtp) || (DV_BLOB_WIDE_HANDLE == obj_dtp));
+        if (need_quotes)
           session_buffered_write_char ('"', ses);
         session_buffered_write (ses, tmp_utf8_box, box_length (tmp_utf8_box) - 1);
-        if (DV_RDF == obj_dtp)
+        if (need_quotes)
           session_buffered_write_char ('"', ses);
         dk_free_box (tmp_utf8_box);
         break;
@@ -2209,6 +2383,7 @@ http_ttl_write_obj (dk_session_t *ses, ttl_env_t *env, query_instance_t *qi, cad
   if (DV_RDF == obj_dtp)
     {
       rdf_box_t *rb = (rdf_box_t *)obj;
+      rb_dt_lang_check(rb);
       if (RDF_BOX_DEFAULT_LANG != rb->rb_lang)
         {
           caddr_t lang_id = rdf_lang_twobyte_to_string (rb->rb_lang);
@@ -2216,6 +2391,7 @@ http_ttl_write_obj (dk_session_t *ses, ttl_env_t *env, query_instance_t *qi, cad
             {
               session_buffered_write_char ('@', ses);
               session_buffered_write (ses, lang_id, box_length (lang_id) - 1);
+	      dk_free_box (lang_id);
             }
         }
       if (rb->rb_type > RDF_BOX_MIN_TYPE && RDF_BOX_DEFAULT_TYPE != rb->rb_type)
@@ -2227,6 +2403,76 @@ http_ttl_write_obj (dk_session_t *ses, ttl_env_t *env, query_instance_t *qi, cad
 }
 
 caddr_t
+bif_http_ttl_prefixes (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_instance_t *qi = (query_instance_t *)qst;
+  ttl_env_t *env = (ttl_env_t *)bif_arg (qst, args, 0, "http_ttl_prefixes");
+  caddr_t subj = bif_arg (qst, args, 1, "http_ttl_prefixes");
+  caddr_t pred = bif_arg (qst, args, 2, "http_ttl_prefixes");
+  caddr_t obj = bif_arg (qst, args, 3, "http_ttl_prefixes");
+  dk_session_t *ses = http_session_no_catch_arg (qst, args, 4, "http_ttl_prefixes");
+  int status = 0;
+  int obj_is_iri = 0;
+  dtp_t obj_dtp = 0;
+  ttl_iriref_items_t tii;
+  memset (&tii,0, sizeof (ttl_iriref_items_t));
+  if (DV_ARRAY_OF_POINTER != DV_TYPE_OF ((caddr_t)env) ||
+    (sizeof (ttl_env_t) != box_length ((caddr_t)env)) ||
+    (DV_DICT_ITERATOR != DV_TYPE_OF (env->te_used_prefixes)) ||
+    (((DV_STRING == DV_TYPE_OF (env->te_prev_subj_ns)) || (DV_UNAME == DV_TYPE_OF (env->te_prev_subj_ns))) &&
+      ((DV_STRING != DV_TYPE_OF (env->te_prev_subj_loc)) ||	
+        ((DV_STRING != DV_TYPE_OF (env->te_prev_pred_ns)) && (DV_UNAME != DV_TYPE_OF (env->te_prev_pred_ns))) ||
+        (DV_STRING != DV_TYPE_OF (env->te_prev_pred_loc)) ) ) ||
+    (DV_LONG_INT != DV_TYPE_OF (env->te_ns_count_s_o)) ||	
+    (DV_LONG_INT != DV_TYPE_OF (env->te_ns_count_p_dt)) )	
+    sqlr_new_error ("22023", "SR601", "Argument 1 of http_ttl_prefixes() should be an array of special format");
+  if (!iri_cast_and_split_ttl_qname (qi, subj, &tii.s.ns, &tii.s.loc, &tii.s.is_bnode))
+    goto fail; /* see below */
+  if (!iri_cast_and_split_ttl_qname (qi, pred, &tii.p.ns, &tii.p.loc, &tii.p.is_bnode))
+    goto fail; /* see below */
+  obj_dtp = DV_TYPE_OF (obj);
+  switch (obj_dtp)
+    {
+    case DV_UNAME: case DV_IRI_ID: case DV_IRI_ID_8: obj_is_iri = 1; break;
+    case DV_STRING: obj_is_iri = (BF_IRI & box_flags (obj)) ? 1 : 0; break;
+    default: obj_is_iri = 0; break;
+    }
+  if (obj_is_iri)
+    {
+      if (!iri_cast_and_split_ttl_qname (qi, obj, &tii.o.ns, &tii.o.loc, &tii.o.is_bnode))
+        goto fail; /* see below */
+    }
+  else
+    {
+      http_ttl_or_nt_prepare_obj (qi, obj, obj_dtp, &tii.dt);
+      if (NULL != tii.dt.uri)
+        iri_split_ttl_qname (tii.dt.uri, &(tii.dt.ns), &(tii.dt.loc), 1);
+    }
+  if ((DV_STRING != DV_TYPE_OF (env->te_prev_subj_ns)) && (DV_UNAME != DV_TYPE_OF (env->te_prev_subj_ns)))
+    {
+      dk_free_tree (env->te_prev_subj_ns);	env->te_prev_subj_ns = NULL;
+      dk_free_tree (env->te_prev_subj_loc);	env->te_prev_subj_loc = NULL;
+      dk_free_tree (env->te_prev_pred_ns);	env->te_prev_pred_ns = NULL;
+      dk_free_tree (env->te_prev_pred_loc);	env->te_prev_pred_loc = NULL;
+    }
+  if ((NULL != tii.dt.ns) && ('\0' != tii.dt.ns[0]))
+    status += ttl_http_write_prefix_if_needed (qst, ses, env, &(env->te_ns_count_p_dt), &(tii.dt));
+  if ((NULL != tii.p.ns) && ('\0' != tii.p.ns[0]))
+    status += ttl_http_write_prefix_if_needed (qst, ses, env, &(env->te_ns_count_p_dt), &(tii.p));
+  if ((NULL != tii.s.ns) && ('\0' != tii.s.ns[0]))
+    status += ttl_http_write_prefix_if_needed (qst, ses, env, &(env->te_ns_count_s_o), &(tii.s));
+  if ((NULL != tii.o.ns) && ('\0' != tii.o.ns[0]))
+    status += ttl_http_write_prefix_if_needed (qst, ses, env, &(env->te_ns_count_s_o), &(tii.o));
+fail:
+  dk_free_box (tii.s.uri);	dk_free_box (tii.s.ns);		dk_free_box (tii.s.loc);	dk_free_box (tii.s.prefix);
+  dk_free_box (tii.p.uri);	dk_free_box (tii.p.ns);		dk_free_box (tii.p.loc);	dk_free_box (tii.p.prefix);
+  dk_free_box (tii.o.uri);	dk_free_box (tii.o.ns);		dk_free_box (tii.o.loc);	dk_free_box (tii.o.prefix);
+  dk_free_box (tii.dt.uri);	dk_free_box (tii.dt.ns);	dk_free_box (tii.dt.loc);	dk_free_box (tii.dt.prefix);
+  return (caddr_t)(ptrlong)(status);
+}
+
+
+caddr_t
 bif_http_ttl_triple (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   query_instance_t *qi = (query_instance_t *)qst;
@@ -2339,47 +2585,167 @@ fail:
   return (caddr_t)(ptrlong)(status);
 }
 
-/*! Environment of Ntriples serializer */
-typedef struct nt_env_s {
-  caddr_t ne_rowctr;			/*!< Item 1 is row counter. */
-  ttl_iriref_t *ne_cols;		/*!< Item 2 is array of temp data for result set columns. */
-  dk_session_t *ne_out_ses;		/*!< Item 3 is output session, used only for sparql_rset_nt_write_row(). */
-} nt_env_t;
+int
+rdfxml_http_write_prefix_if_needed (caddr_t *qst, dk_session_t *ses, ttl_env_t *env, ptrlong *ns_counter_ptr, ttl_iriref_t *ti)
+{
+  int cache_ok = ttl_try_to_cache_new_prefix (qst, ses, env, ns_counter_ptr, ti);
+  if (!cache_ok)
+    return 0;                /* .0.12345678 */
+  session_buffered_write (ses, "\n\txmlns:", 8);
+  session_buffered_write (ses, ti->prefix, strlen (ti->prefix));
+  session_buffered_write (ses, "=\"", 2);
+  dks_esc_write (ses, ti->ns, box_length (ti->ns) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_DQATTR);
+  session_buffered_write_char ('"', ses);
+  return 1;
+}
+
+caddr_t
+bif_http_rdfxml_p_ns (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_instance_t *qi = (query_instance_t *)qst;
+  ttl_env_t *env = (ttl_env_t *)bif_arg (qst, args, 0, "http_rdfxml_p_ns");
+  caddr_t pred = bif_arg (qst, args, 1, "http_rdfxml_p_ns");
+  dk_session_t *ses = http_session_no_catch_arg (qst, args, 2, "http_rdfxml_p_ns");
+  int status = 0;
+  ttl_iriref_t ti;
+  memset (&ti,0, sizeof (ttl_iriref_t));
+  if (DV_ARRAY_OF_POINTER != DV_TYPE_OF ((caddr_t)env) ||
+    (sizeof (ttl_env_t) != box_length ((caddr_t)env)) ||
+    (DV_DICT_ITERATOR != DV_TYPE_OF (env->te_used_prefixes)) /* ||
+    (((DV_STRING == DV_TYPE_OF (env->te_prev_subj_ns)) || (DV_UNAME == DV_TYPE_OF (env->te_prev_subj_ns))) &&
+      ((DV_STRING != DV_TYPE_OF (env->te_prev_subj_loc)) ||	
+        ((DV_STRING != DV_TYPE_OF (env->te_prev_pred_ns)) && (DV_UNAME != DV_TYPE_OF (env->te_prev_pred_ns))) ||
+        (DV_STRING != DV_TYPE_OF (env->te_prev_pred_loc)) ) ) */ ||
+    (DV_LONG_INT != DV_TYPE_OF (env->te_ns_count_s_o)) ||	
+    (DV_LONG_INT != DV_TYPE_OF (env->te_ns_count_p_dt)) )	
+    sqlr_new_error ("22023", "SR601", "Argument 1 of http_rdfxml_p_ns() should be an array of special format");
+  if (!iri_cast_and_split_ttl_qname (qi, pred, &ti.ns, &ti.loc, &ti.is_bnode))
+    goto fail; /* see below */
+  if ((NULL != ti.ns) && ('\0' != ti.ns[0]))
+    status += rdfxml_http_write_prefix_if_needed (qst, ses, env, &(env->te_ns_count_p_dt), &(ti));
+  fail:
+  dk_free_box (ti.uri); dk_free_box (ti.ns); dk_free_box (ti.loc); dk_free_box (ti.prefix);
+  return (caddr_t)(ptrlong)(status);
+}
+
+#define RDFXML_HTTP_WRITE_REF_ABOUT	1
+#define RDFXML_HTTP_WRITE_REF_P_OPEN	2
+#define RDFXML_HTTP_WRITE_REF_P_CLOSE	3
+#define RDFXML_HTTP_WRITE_REF_RES	4
+#define RDFXML_HTTP_WRITE_REF_DT	5
 
 void
-nt_http_write_ref_1 (dk_session_t *ses, nt_env_t *env, ttl_iriref_t *ti, caddr_t dflt_uri, int esc)
+rdfxml_http_write_ref (dk_session_t *ses, ttl_env_t *env, ttl_iriref_t *ti, int opcode)
 {
-  caddr_t uri = ti->uri;
-  if (NULL == uri)
-    uri = dflt_uri;
+  caddr_t full_uri;
+  const char *prefix_to_use;
+  caddr_t loc = ti->loc;
+  int close_attr = 0;
   if (ti->is_bnode)
     {
-      session_buffered_write (ses, uri, strlen (uri));
+      full_uri = ((NULL != ti->uri) ? ti->uri : loc);
+      if ((RDFXML_HTTP_WRITE_REF_ABOUT != opcode) && (RDFXML_HTTP_WRITE_REF_RES != opcode))
+        {                            /* 0123456789012345678901 */
+          session_buffered_write (ses, "rdf:MisusedBlankNode_", 21);
+          session_buffered_write (ses, full_uri, strlen (full_uri));
+          return;
+        }                        /* 012345678901.23 */
+      session_buffered_write (ses, " rdf:nodeID=\"", 13);
+      session_buffered_write (ses, full_uri, strlen (full_uri));
+      session_buffered_write_char ('"', ses);
       return;
     }
-#ifndef NDEBUG
-  if (NULL != ti->prefix)
-    GPF_T;
-#endif
-  if (esc)
-    SES_PRINT (ses, "<");
-  else
-  session_buffered_write_char ('<', ses);
-  dks_esc_write (ses, uri, box_length (uri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_IRI);
-  if (esc)
-    SES_PRINT (ses, ">");
+  switch (opcode)
+    {
+    case RDFXML_HTTP_WRITE_REF_ABOUT: /* 01234567890.12 */
+      session_buffered_write (ses,      " rdf:about=\"", 12);
+      prefix_to_use = NULL;
+      close_attr = 1;
+      break;
+    case RDFXML_HTTP_WRITE_REF_P_OPEN: /* no break */
+    case RDFXML_HTTP_WRITE_REF_P_CLOSE:
+      prefix_to_use = ti->prefix;
+      if ((NULL == prefix_to_use) && (NULL != ti->ns) && ('\0' != ti->ns[0]))
+        prefix_to_use = "p";
+      break;
+    case RDFXML_HTTP_WRITE_REF_RES: /* 01234567890123.45 */
+      session_buffered_write (ses,    " rdf:resource=\"", 15);
+      prefix_to_use = NULL;
+      close_attr = 1;
+      break;
+    case RDFXML_HTTP_WRITE_REF_DT: /* 01234567890123.45 */
+      session_buffered_write (ses,   " rdf:datatype=\"", 15);
+      prefix_to_use = ti->prefix;
+      if ((NULL == prefix_to_use) && (NULL != ti->ns) && ('\0' != ti->ns[0]))
+        prefix_to_use = "dt";
+      close_attr = 1;
+      break;
+    default: prefix_to_use = NULL; GPF_T;
+    }
+  if (NULL != prefix_to_use)
+    {
+      session_buffered_write (ses, prefix_to_use, strlen (prefix_to_use));
+      session_buffered_write_char (':', ses);
+      dks_esc_write (ses, ti->loc, box_length (ti->loc) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_IRI);
+      if ((prefix_to_use != ti->prefix) && (RDFXML_HTTP_WRITE_REF_P_CLOSE != opcode))
+        {
+          session_buffered_write (ses, " xmlns:", 7);
+          session_buffered_write (ses, prefix_to_use, strlen (prefix_to_use));
+          session_buffered_write (ses, "=\"", 2);
+          dks_esc_write (ses, ti->ns, box_length (ti->ns) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_IRI);
+          close_attr = 1;
+        }
+    }
   else
-  session_buffered_write_char ('>', ses);
+    {
+      full_uri = ((NULL != ti->uri) ? ti->uri : loc);
+      dks_esc_write (ses, full_uri, box_length (full_uri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_PTEXT);
+    }
+  if (close_attr)
+    session_buffered_write_char ('"', ses);
 }
 
-void
-nt_http_write_ref (dk_session_t *ses, nt_env_t *env, ttl_iriref_t *ti, caddr_t dflt_uri)
+static void
+http_rdfxml_prepare_obj (query_instance_t *qi, caddr_t obj, dtp_t obj_dtp, ttl_iriref_t *dt_ret)
 {
-  nt_http_write_ref_1 (ses, env, ti, dflt_uri, 0);
+  if (DV_RDF == obj_dtp)
+    {
+      rdf_box_t *rb = (rdf_box_t *)obj;
+      if (!rb->rb_is_complete)
+        rb_complete (rb, qi->qi_trx, qi);
+      rb_dt_lang_check(rb);
+      if (RDF_BOX_DEFAULT_TYPE != rb->rb_type)
+        {
+          dt_ret->uri = rdf_type_twobyte_to_iri (rb->rb_type);
+          if ((uname_rdf_ns_uri_XMLLiteral == dt_ret->uri) && (DV_XML_ENTITY == DV_TYPE_OF (obj)))
+            {
+              dk_free_box (dt_ret->uri);
+              dt_ret->uri = NULL;
+              return;
+            }
+          if (NULL != dt_ret->uri) /* if by some reason rb_type is wrong */
+            box_flags (dt_ret->uri) |= BF_IRI;
+          return;
+        }
+      obj = rb->rb_box;
+    }
+  if ((DV_STRING == DV_TYPE_OF (obj)) || DV_XML_ENTITY == DV_TYPE_OF (obj))
+    {
+      dk_free_box (dt_ret->uri);
+      dt_ret->uri = NULL;
+    }
+  else
+    {
+      caddr_t dt_iri = xsd_type_of_box (obj);
+      if (!IS_BOX_POINTER (dt_iri))
+        dt_ret->uri = NULL;
+      else
+        dt_ret->uri = dt_iri;
+    }
 }
 
 static void
-http_nt_write_obj (dk_session_t *ses, nt_env_t *env, query_instance_t *qi, caddr_t obj, dtp_t obj_dtp, ttl_iriref_t *dt_ptr, int esc_mode)
+http_rdfxml_write_obj (dk_session_t *ses, ttl_env_t *env, query_instance_t *qi, caddr_t obj, dtp_t obj_dtp, ttl_iriref_t *dt_ptr)
 {
   caddr_t obj_box_value;
   dtp_t obj_box_value_dtp;
@@ -2399,64 +2765,290 @@ http_nt_write_obj (dk_session_t *ses, nt_env_t *env, query_instance_t *qi, caddr
       {
         char temp [50];
         dt_to_iso8601_string (obj_box_value, temp, sizeof (temp));
-        session_buffered_write_char ('"', ses);
         session_buffered_write (ses, temp, strlen (temp));
-        session_buffered_write_char ('"', ses);
-        if (DV_RDF != obj_dtp)
-          {
-            session_buffered_write (ses, "^^", 2);
-            nt_http_write_ref (ses, env, dt_ptr, NULL);
-          }
         break;
       }
     case DV_STRING:
-      session_buffered_write_char ('"', ses);
-      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - 1, CHARSET_UTF8, CHARSET_UTF8, esc_mode);
-      session_buffered_write_char ('"', ses);
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_PTEXT);
+      break;
+    case DV_WIDE:
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_PTEXT);
       break;
     case DV_XML_ENTITY:
       {
-        http_ttl_or_nt_write_xe (ses, qi, (xml_entity_t *)(obj_box_value),
-          ((DV_RDF == obj_dtp) ? (RDF_BOX_DEFAULT_TYPE == ((rdf_box_t *)obj)->rb_type) : 1) );
+        client_connection_t *cli = qi->qi_client;
+        wcharset_t *saved_charset = cli->cli_charset;
+        xml_entity_t *xe = (xml_entity_t *)(obj_box_value);
+        cli->cli_charset = CHARSET_UTF8;
+        xe->_->xe_serialize (xe, ses);
+        cli->cli_charset = saved_charset;
         break;
       }
     case DV_DB_NULL:
       session_buffered_write (ses, "(NULL)", 6);
       break;
-    case DV_STRING_SESSION:
+    default:
+      {
+        caddr_t tmp_utf8_box = box_cast_to_UTF8 ((caddr_t *)qi, obj_box_value);
+        session_buffered_write (ses, tmp_utf8_box, box_length (tmp_utf8_box) - 1);
+        dk_free_box (tmp_utf8_box);
+        break;
+      }
+    }
+}
+
+caddr_t
+bif_http_rdfxml_triple (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_instance_t *qi = (query_instance_t *)qst;
+  ttl_env_t *env = (ttl_env_t *)bif_arg (qst, args, 0, "http_rdfxml_triple");
+  caddr_t subj = bif_arg (qst, args, 1, "http_rdfxml_triple");
+  caddr_t pred = bif_arg (qst, args, 2, "http_rdfxml_triple");
+  caddr_t obj = bif_arg (qst, args, 3, "http_rdfxml_triple");
+  dk_session_t *ses = http_session_no_catch_arg (qst, args, 4, "http_rdfxml_triple");
+  int status = 0;
+  int obj_is_iri = 0;
+  int obj_is_xml = 0;
+  dtp_t obj_dtp = 0;
+  ttl_iriref_items_t tii;
+  memset (&tii,0, sizeof (ttl_iriref_items_t));
+  if (DV_ARRAY_OF_POINTER != DV_TYPE_OF ((caddr_t)env) ||
+    (sizeof (ttl_env_t) != box_length ((caddr_t)env)) ||
+    (DV_DICT_ITERATOR != DV_TYPE_OF (env->te_used_prefixes)) /* ||
+    (((DV_STRING == DV_TYPE_OF (env->te_prev_subj_ns)) || (DV_UNAME == DV_TYPE_OF (env->te_prev_subj_ns))) &&
+      ((DV_STRING != DV_TYPE_OF (env->te_prev_subj_loc)) ||
+        ((DV_STRING != DV_TYPE_OF (env->te_prev_pred_ns)) && (DV_UNAME != DV_TYPE_OF (env->te_prev_pred_ns))) ||
+        (DV_STRING != DV_TYPE_OF (env->te_prev_pred_loc)) ) ) */ ||
+    (DV_LONG_INT != DV_TYPE_OF (env->te_ns_count_s_o)) ||	
+    (DV_LONG_INT != DV_TYPE_OF (env->te_ns_count_p_dt)) )	
+    sqlr_new_error ("22023", "SR601", "Argument 1 of http_rdfxml_triple() should be an array of special format");
+  if (!iri_cast_rdfxml_qname (qi, subj, &tii.s.uri, &tii.s.is_bnode))
+    goto fail; /* see below */
+  if (!iri_cast_and_split_ttl_qname (qi, pred, &tii.p.ns, &tii.p.loc, &tii.p.is_bnode))
+    goto fail; /* see below */
+  if ((NULL != tii.p.ns) && ('\0' != tii.p.ns[0]) && (!tii.p.is_bnode))
+    {
+      id_hash_iterator_t *ns2pref_hit = env->te_used_prefixes;
+      id_hash_t *ns2pref = ns2pref_hit->hit_hash;
+#ifndef NDEBUG
+      if ('\0' == tii.p.ns[0])
+        GPF_T1("ttl_" "bif_http_rdfxml_triple: empty p.ns");
+#endif
+      if (('_' != tii.p.ns[0]) || (':' != tii.p.ns[1]))
+        {
+          caddr_t *prefx_ptr = (caddr_t *)id_hash_get (ns2pref, (caddr_t)(&tii.p.ns));
+          if (NULL != prefx_ptr)
+            tii.p.prefix = box_copy (prefx_ptr[0]);
+        }
+    }
+  obj_dtp = DV_TYPE_OF (obj);
+  switch (obj_dtp)
+    {
+    case DV_UNAME: case DV_IRI_ID: case DV_IRI_ID_8: obj_is_iri = 1; break;
+    case DV_STRING: obj_is_iri = (BF_IRI & box_flags (obj)) ? 1 : 0; break;
+    case DV_XML_ENTITY: obj_is_xml = 1; break;
+    case DV_RDF: if (DV_XML_ENTITY == DV_TYPE_OF (((rdf_box_t *)obj)->rb_box)) obj_is_xml = 1; break;
+    }
+  if (obj_is_iri)
+    {
+      if (!iri_cast_rdfxml_qname (qi, obj, &tii.o.uri, &tii.o.is_bnode))
+        goto fail; /* see below */
+    }
+  else
+    {
+      http_rdfxml_prepare_obj (qi, obj, obj_dtp, &tii.dt);
+      if (NULL != tii.dt.uri)
+        iri_cast_rdfxml_qname (qi, tii.dt.uri, &(tii.dt.uri), &(tii.dt.is_bnode));
+    }
+  if (DV_STRING != DV_TYPE_OF (env->te_prev_subj_loc))
+    {
+      dk_free_tree (env->te_prev_subj_loc);	env->te_prev_subj_loc = NULL;
+    }
+  if ((NULL == env->te_prev_subj_loc) ||
+    strcmp (env->te_prev_subj_loc, tii.s.uri) )
+    {
+      if (NULL != env->te_prev_subj_loc)
+        {                            /* .0123456789012345678901 */
+          session_buffered_write (ses, "\n  </rdf:Description>", 21);
+          dk_free_tree (env->te_prev_subj_loc);	env->te_prev_subj_loc = NULL;
+          dk_free_tree (env->te_prev_pred_ns);	env->te_prev_pred_ns = NULL;
+          dk_free_tree (env->te_prev_pred_loc);	env->te_prev_pred_loc = NULL;
+        }
+                                 /* .01234567890123456789 */
+      session_buffered_write (ses, "\n  <rdf:Description", 19);
+      rdfxml_http_write_ref (ses, env, &(tii.s), RDFXML_HTTP_WRITE_REF_ABOUT);
+      session_buffered_write_char ('>', ses);
+      env->te_prev_subj_loc = tii.s.uri;
+      tii.s.uri = NULL;
+    }
+                             /* .0123456 */
+  session_buffered_write (ses, "\n    <", 6);
+  rdfxml_http_write_ref (ses, env, &(tii.p), RDFXML_HTTP_WRITE_REF_P_OPEN);
+  if (obj_is_iri)
+    {
+      rdfxml_http_write_ref (ses, env, &(tii.o), RDFXML_HTTP_WRITE_REF_RES);
+      session_buffered_write (ses, " />", 3);
+    }
+  else
+    {
+      if (NULL != tii.dt.uri)
+        rdfxml_http_write_ref (ses, env, &(tii.dt), RDFXML_HTTP_WRITE_REF_DT);
+      if (obj_is_xml)              /* 012345678901234.56789012.34 */
+        session_buffered_write (ses, " rdf:parseType=\"Literal\"", 24);
+      if (DV_RDF == obj_dtp)
+        {
+          rdf_box_t *rb = (rdf_box_t *)obj;
+          rb_dt_lang_check(rb);
+          if (RDF_BOX_DEFAULT_LANG != rb->rb_lang)
+            {
+              caddr_t lang_id = rdf_lang_twobyte_to_string (rb->rb_lang);
+              if (NULL != lang_id) /* just in case if lang cannot be found, may be signal an error ? */
+                {                            /* 0123456789.01 */
+                  session_buffered_write (ses, " xml:lang=\"", 11);
+                  session_buffered_write (ses, lang_id, box_length (lang_id) - 1);
+                  session_buffered_write_char ('"', ses);
+                  dk_free_box (lang_id);
+                }
+            }
+        }
+      session_buffered_write_char ('>', ses);
+      http_rdfxml_write_obj (ses, env, qi, obj, obj_dtp, &tii.dt);
+      session_buffered_write (ses, "</", 2);
+      rdfxml_http_write_ref (ses, env, &(tii.p), RDFXML_HTTP_WRITE_REF_P_CLOSE);
+      session_buffered_write_char ('>', ses);
+    }
+fail:
+  dk_free_box (tii.s.uri); /*	dk_free_box (tii.s.ns);		dk_free_box (tii.s.loc);	dk_free_box (tii.s.prefix); */
+  dk_free_box (tii.p.uri);	dk_free_box (tii.p.ns);		dk_free_box (tii.p.loc);	dk_free_box (tii.p.prefix);
+  dk_free_box (tii.o.uri); /*	dk_free_box (tii.o.ns);		dk_free_box (tii.o.loc);	dk_free_box (tii.o.prefix); */
+  dk_free_box (tii.dt.uri); /*	dk_free_box (tii.dt.ns);	dk_free_box (tii.dt.loc);	dk_free_box (tii.dt.prefix); */
+  return (caddr_t)(ptrlong)(status);
+}
+
+/*! Environment of Ntriples serializer */
+typedef struct nt_env_s {
+  caddr_t ne_rowctr;			/*!< Item 1 is row counter. */
+  ttl_iriref_t *ne_cols;		/*!< Item 2 is array of temp data for result set columns. */
+  dk_session_t *ne_out_ses;		/*!< Item 3 is output session, used only for sparql_rset_nt_write_row(). */
+} nt_env_t;
+
+void
+nt_http_write_ref_1 (dk_session_t *ses, nt_env_t *env, ttl_iriref_t *ti, caddr_t dflt_uri, int esc)
+{
+  caddr_t uri = ti->uri;
+  if (NULL == uri)
+    {
+      uri = dflt_uri;
+      if (NULL == uri)
+        sqlr_new_error ("22023", "SR645", "NT serialization of RDF data has got NULL instead of an URI");
+    }
+  if (ti->is_bnode)
+    {
+      session_buffered_write (ses, uri, strlen (uri));
+      return;
+    }
+#ifndef NDEBUG
+  if (NULL != ti->prefix)
+    GPF_T;
+#endif
+  if (esc)
+    SES_PRINT (ses, "<");
+  else
+  session_buffered_write_char ('<', ses);
+  dks_esc_write (ses, uri, box_length (uri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_IRI);
+  if (esc)
+    SES_PRINT (ses, ">");
+  else
+  session_buffered_write_char ('>', ses);
+}
+
+void
+nt_http_write_ref (dk_session_t *ses, nt_env_t *env, ttl_iriref_t *ti, caddr_t dflt_uri)
+{
+  nt_http_write_ref_1 (ses, env, ti, dflt_uri, 0);
+}
+
+static void
+http_nt_write_obj (dk_session_t *ses, nt_env_t *env, query_instance_t *qi, caddr_t obj, dtp_t obj_dtp, ttl_iriref_t *dt_ptr, int esc_mode)
+{
+  caddr_t obj_box_value;
+  dtp_t obj_box_value_dtp;
+  if (DV_RDF == obj_dtp)
+    {
+      obj_box_value = ((rdf_box_t *)obj)->rb_box;
+      obj_box_value_dtp = DV_TYPE_OF (obj_box_value);
+    }
+  else
+    {
+      obj_box_value = obj;
+      obj_box_value_dtp = obj_dtp;
+    }
+  switch (obj_box_value_dtp)
+    {
+    case DV_DATETIME:
+      {
+        char temp [50];
+        dt_to_iso8601_string (obj_box_value, temp, sizeof (temp));
+        session_buffered_write_char ('"', ses);
+        session_buffered_write (ses, temp, strlen (temp));
+        session_buffered_write_char ('"', ses);
+        if (DV_RDF != obj_dtp)
+          {
+            session_buffered_write (ses, "^^", 2);
+            nt_http_write_ref (ses, env, dt_ptr, NULL);
+          }
+        break;
+      }
+    case DV_STRING:
       session_buffered_write_char ('"', ses);
       dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - 1, CHARSET_UTF8, CHARSET_UTF8, esc_mode);
       session_buffered_write_char ('"', ses);
       break;
+    case DV_WIDE:
+      session_buffered_write_char ('"', ses);
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, esc_mode);
+      session_buffered_write_char ('"', ses);
+      break;
+    case DV_XML_ENTITY:
+      {
+        http_ttl_or_nt_write_xe (ses, qi, (xml_entity_t *)(obj_box_value),
+          ((DV_RDF == obj_dtp) ? (RDF_BOX_DEFAULT_TYPE == ((rdf_box_t *)obj)->rb_type) : 1) );
+        break;
+      }
+    case DV_DB_NULL:
+      session_buffered_write (ses, "(NULL)", 6);
+      break;
     default:
       {
-        ccaddr_t iri = xsd_type_of_box (obj_box_value);
+        caddr_t iri = xsd_type_of_box (obj_box_value);
         caddr_t tmp_utf8_box = box_cast_to_UTF8 ((caddr_t *)qi, obj_box_value);
         session_buffered_write_char ('"', ses);
         session_buffered_write (ses, tmp_utf8_box, box_length (tmp_utf8_box) - 1);
         dk_free_box (tmp_utf8_box);
         session_buffered_write_char ('"', ses);
-        if (DV_RDF != obj_dtp)
+        if ((DV_RDF != obj_dtp) && (DV_WIDE != obj_box_value_dtp))
           {
             if (!IS_BOX_POINTER (iri))
               sqlr_new_error ("22023", "SR624", "Unsupported datatype %d in NT serialization of an object", obj_dtp);
             SES_PRINT (ses, "^^");
-	    if (esc_mode == DKS_ESC_PTEXT)
-	      SES_PRINT (ses, "<");
-	    else
-	      session_buffered_write_char ('<', ses);
+            if (esc_mode == DKS_ESC_PTEXT)
+              SES_PRINT (ses, "<");
+            else
+              session_buffered_write_char ('<', ses);
             dks_esc_write (ses, iri, box_length_inline (iri)-1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_TTL_IRI);
-	    if (esc_mode == DKS_ESC_PTEXT)
-	      SES_PRINT (ses, ">");
-	    else
-            session_buffered_write_char ('>', ses);
+            if (esc_mode == DKS_ESC_PTEXT)
+              SES_PRINT (ses, ">");
+            else
+              session_buffered_write_char ('>', ses);
           }
+        dk_free_box (iri);
         break;
       }
     }
   if (DV_RDF == obj_dtp)
     {
       rdf_box_t *rb = (rdf_box_t *)obj;
+      rb_dt_lang_check(rb);
       if (RDF_BOX_DEFAULT_LANG != rb->rb_lang)
         {
           caddr_t lang_id = rdf_lang_twobyte_to_string (rb->rb_lang);
@@ -2464,6 +3056,7 @@ http_nt_write_obj (dk_session_t *ses, nt_env_t *env, query_instance_t *qi, caddr
             {
               session_buffered_write_char ('@', ses);
               session_buffered_write (ses, lang_id, box_length (lang_id) - 1);
+	      dk_free_box (lang_id);
             }
         }
       if (RDF_BOX_DEFAULT_TYPE != rb->rb_type)
@@ -2688,7 +3281,7 @@ http_talis_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, cadd
 {
   caddr_t obj_box_value;
   dtp_t obj_box_value_dtp;
-  ccaddr_t type_uri = NULL;
+  caddr_t type_uri = NULL;
   if (DV_RDF == obj_dtp)
     {
       rdf_box_t *rb = (rdf_box_t *)obj;
@@ -2696,6 +3289,7 @@ http_talis_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, cadd
         rb_complete (rb, qi->qi_trx, qi);
       obj_box_value = rb->rb_box;
       obj_box_value_dtp = DV_TYPE_OF (obj_box_value);
+      rb_dt_lang_check(rb);
       if (RDF_BOX_DEFAULT_TYPE != rb->rb_type)
         type_uri = rdf_type_twobyte_to_iri (rb->rb_type);
     }
@@ -2718,7 +3312,7 @@ http_talis_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, cadd
         session_buffered_write (ses, temp, strlen (temp));
         session_buffered_write_char ('\"', ses);
         if (NULL == type_uri)
-          switch (DT_DT_TYPE(obj))
+          switch (DT_DT_TYPE(obj_box_value))
             {
             case DT_TYPE_DATE: type_uri = uname_xmlschema_ns_uri_hash_date; break;
             case DT_TYPE_TIME: type_uri = uname_xmlschema_ns_uri_hash_time; break;
@@ -2731,10 +3325,16 @@ http_talis_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, cadd
       dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
       session_buffered_write_char ('\"', ses);
       break;
+    case DV_WIDE:
+      session_buffered_write_char ('\"', ses);
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_JSWRITE_DQ);
+      session_buffered_write_char ('\"', ses);
+      break;
     case DV_XML_ENTITY:
       {
         http_json_write_xe (ses, qi, (xml_entity_t *)(obj_box_value));
-        type_uri = uname_rdf_ns_uri_XMLLiteral;
+        if (NULL == type_uri)
+          type_uri = uname_rdf_ns_uri_XMLLiteral;
         break;
       }
     case DV_DB_NULL:
@@ -2763,10 +3363,9 @@ http_talis_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, cadd
           if (NULL != lang_id) /* just in case if lang cannot be found, may be signal an error ? */
             {                            /* 012.34567.8901.23 */
               session_buffered_write (ses, " , \"lang\" : \"", 13);
-              lang_id = rdf_lang_twobyte_to_string (((rdf_box_t *)obj)->rb_lang);
-              if (NULL != lang_id)
                 dks_esc_write (ses, lang_id, box_length (lang_id) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
               session_buffered_write_char ('\"', ses);
+	      dk_free_box (lang_id);
             }
         }
     }
@@ -2778,6 +3377,7 @@ http_talis_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, cadd
       session_buffered_write (ses, " , \"datatype\" : \"", 17);
       dks_esc_write (ses, type_uri, box_length (type_uri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
       session_buffered_write_char ('\"', ses);
+      dk_free_box (type_uri);
     }
   session_buffered_write (ses, " }", 2);
 }
@@ -2863,6 +3463,226 @@ fail:
   return (caddr_t)((ptrlong)status);
 }
 
+#define ld_json_env_t talis_json_env_t
+#define iri_cast_ld_json_qname iri_cast_talis_json_qname
+
+static void
+http_ld_json_write_literal_obj (dk_session_t *ses, query_instance_t *qi, caddr_t obj, dtp_t obj_dtp)
+{
+  caddr_t obj_box_value;
+  dtp_t obj_box_value_dtp;
+  caddr_t type_uri = NULL;
+  if (DV_RDF == obj_dtp)
+    {
+      rdf_box_t *rb = (rdf_box_t *)obj;
+      if (!rb->rb_is_complete)
+        rb_complete (rb, qi->qi_trx, qi);
+      obj_box_value = rb->rb_box;
+      obj_box_value_dtp = DV_TYPE_OF (obj_box_value);
+      rb_dt_lang_check(rb);
+      if (RDF_BOX_DEFAULT_TYPE != rb->rb_type)
+        type_uri = rdf_type_twobyte_to_iri (rb->rb_type);
+    }
+  else
+    {
+      obj_box_value = obj;
+      obj_box_value_dtp = obj_dtp;
+      switch (obj_box_value_dtp)
+        {
+        case DV_LONG_INT:
+        case DV_DOUBLE_PREC:
+          {
+            caddr_t tmp_utf8_box = box_cast_to_UTF8 ((caddr_t *)qi, obj_box_value);
+            session_buffered_write (ses, tmp_utf8_box, box_length (tmp_utf8_box) - 1);
+            return;
+          }
+        }
+    }
+  if ((NULL != type_uri) && !strcmp (type_uri, uname_xmlschema_ns_uri_hash_boolean) && (DV_LONG_INT == obj_box_value_dtp))
+    {
+      if (unbox (obj_box_value))
+        session_buffered_write (ses, "true", 4);
+      else
+        session_buffered_write (ses, "false", 5);
+      dk_free_box (type_uri);
+      return;
+    }
+                             /* 0          1     */
+                             /* 01.2345678.90123 */
+  session_buffered_write (ses, "{ \"@value\" : ", 13);
+  switch (obj_box_value_dtp)
+    {
+    case DV_DATETIME:
+      {
+        char temp [50];
+        dt_to_iso8601_string (obj_box_value, temp, sizeof (temp));
+        session_buffered_write_char ('\"', ses);
+        session_buffered_write (ses, temp, strlen (temp));
+        session_buffered_write_char ('\"', ses);
+        if (NULL == type_uri)
+          switch (DT_DT_TYPE(obj_box_value))
+            {
+            case DT_TYPE_DATE: type_uri = uname_xmlschema_ns_uri_hash_date; break;
+            case DT_TYPE_TIME: type_uri = uname_xmlschema_ns_uri_hash_time; break;
+            default : type_uri = uname_xmlschema_ns_uri_hash_dateTime; break;
+            }
+        break;
+      }
+    case DV_STRING:
+      session_buffered_write_char ('\"', ses);
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
+      session_buffered_write_char ('\"', ses);
+      break;
+    case DV_WIDE:
+      session_buffered_write_char ('\"', ses);
+      dks_esc_write (ses, obj_box_value, box_length (obj_box_value) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_JSWRITE_DQ);
+      session_buffered_write_char ('\"', ses);
+      break;
+    case DV_XML_ENTITY:
+      {
+        http_json_write_xe (ses, qi, (xml_entity_t *)(obj_box_value));
+        if (NULL == type_uri)
+          type_uri = uname_rdf_ns_uri_XMLLiteral;
+        break;
+      }
+    case DV_DB_NULL:
+      session_buffered_write (ses, "(NULL)", 6);
+      break;
+    default:
+      {
+        caddr_t tmp_utf8_box = box_cast_to_UTF8 ((caddr_t *)qi, obj_box_value);
+        if (DV_RDF == obj_dtp)
+          session_buffered_write_char ('\"', ses);
+        session_buffered_write (ses, tmp_utf8_box, box_length (tmp_utf8_box) - 1);
+        if (DV_RDF == obj_dtp)
+          session_buffered_write_char ('\"', ses);
+        dk_free_box (tmp_utf8_box);
+        if (NULL == type_uri)
+          type_uri = xsd_type_of_box (obj_box_value);
+        break;
+      }
+    }
+  if (DV_RDF == obj_dtp)
+    {
+      rdf_box_t *rb = (rdf_box_t *)obj;
+      if (RDF_BOX_DEFAULT_LANG != rb->rb_lang)
+        {
+          caddr_t lang_id = rdf_lang_twobyte_to_string (rb->rb_lang);
+          if (NULL != lang_id) /* just in case if lang cannot be found, may be signal an error ? */
+                                         /* 0          1           */
+            {                            /* 012.3456789012.3456.78 */
+              session_buffered_write (ses, " , \"@language\" : \"", 18);
+              lang_id = rdf_lang_twobyte_to_string (((rdf_box_t *)obj)->rb_lang);
+              if (NULL != lang_id)
+                dks_esc_write (ses, lang_id, box_length (lang_id) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
+              session_buffered_write_char ('\"', ses);
+            }
+        }
+    }
+  if (NULL != type_uri)
+    {
+      if (!IS_BOX_POINTER (type_uri))
+        sqlr_new_error ("22023", "SR625", "Unsupported datatype %d in LD-style JSON serialization of an RDF object", obj_dtp);
+                                 /* 0           1      */
+                                 /* 012.345678.9012.34 */
+      session_buffered_write (ses, " , \"@type\" : \"", 14);
+      dks_esc_write (ses, type_uri, box_length (type_uri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
+      session_buffered_write_char ('\"', ses);
+      dk_free_box (type_uri);
+    }
+  session_buffered_write (ses, " }", 2);
+}
+
+caddr_t
+bif_http_ld_json_triple (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_instance_t *qi = (query_instance_t *)qst;
+  ld_json_env_t *env = (ld_json_env_t *)bif_arg (qst, args, 0, "http_ld_json_triple");
+  caddr_t subj_iri_or_id = bif_arg (qst, args, 1, "http_ld_json_triple");
+  caddr_t pred_iri_or_id = bif_arg (qst, args, 2, "http_ld_json_triple");
+  caddr_t obj = bif_arg (qst, args, 3, "http_ld_json_triple");
+  dk_session_t *ses = http_session_no_catch_arg (qst, args, 4, "http_ld_json_triple");
+  int status = 0;
+  int obj_is_iri = 0;
+  dtp_t obj_dtp = 0;
+  caddr_t subj_iri = NULL, pred_iri = NULL, obj_iri = NULL;
+  int subj_iri_is_new = 0, pred_iri_is_new = 0, obj_iri_is_new = 0;
+  int is_bnode, obj_is_bnode;
+  if (DV_ARRAY_OF_POINTER != DV_TYPE_OF ((caddr_t)env) ||
+    (sizeof (ld_json_env_t) != box_length ((caddr_t)env)) ||
+    ((DV_STRING == DV_TYPE_OF (env->tje_prev_subj)) && (DV_STRING != DV_TYPE_OF (env->tje_prev_pred))) )
+    sqlr_new_error ("22023", "SR607", "Argument 1 of http_ld_json_triple() should be an array of special format");
+  if (!iri_cast_ld_json_qname (qi, subj_iri_or_id, &subj_iri, &subj_iri_is_new, &is_bnode /* never used after return */))
+    goto fail; /* see below */
+  if (!iri_cast_ld_json_qname (qi, pred_iri_or_id, &pred_iri, &pred_iri_is_new, &is_bnode /* never used after return */))
+    goto fail; /* see below */
+  obj_dtp = DV_TYPE_OF (obj);
+  switch (obj_dtp)
+    {
+    case DV_UNAME: case DV_IRI_ID: case DV_IRI_ID_8: obj_is_iri = 1; break;
+    case DV_STRING: obj_is_iri = (BF_IRI & box_flags (obj)) ? 1 : 0; break;
+    default: obj_is_iri = 0; break;
+    }
+  if (obj_is_iri)
+    {
+      if (!iri_cast_ld_json_qname (qi, obj, &obj_iri, &obj_iri_is_new, &obj_is_bnode /* used ;) */))
+        goto fail; /* see below */
+    }
+  if ((DV_STRING != DV_TYPE_OF (env->tje_prev_subj)) && (DV_UNAME != DV_TYPE_OF (env->tje_prev_subj)))
+    {
+      dk_free_tree (env->tje_prev_subj);	env->tje_prev_subj = NULL;
+      dk_free_tree (env->tje_prev_pred);	env->tje_prev_pred = NULL;
+    }
+  if ((NULL == env->tje_prev_subj) || strcmp (env->tje_prev_subj, subj_iri))
+    {
+      if (NULL != env->tje_prev_pred)
+        {                            /* 012345.678901 */
+          session_buffered_write (ses, " ] } ,\n    ", 11);
+          dk_free_tree (env->tje_prev_subj);	env->tje_prev_subj = NULL;
+          dk_free_tree (env->tje_prev_pred);	env->tje_prev_pred = NULL;
+        }
+                                 /* 01.2345.678.90 */
+      session_buffered_write (ses, "{ \"@id\": \"", 10);
+      dks_esc_write (ses, subj_iri, box_length (subj_iri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
+                                 /* .01.23456789 */
+      session_buffered_write (ses, "\",\n      ", 9);
+      env->tje_prev_subj = subj_iri_is_new ? subj_iri : box_copy (subj_iri); subj_iri_is_new = 0;
+    }
+  if ((NULL == env->tje_prev_pred) || strcmp (env->tje_prev_pred, pred_iri))
+    {
+      if (NULL != env->tje_prev_pred)
+        {                            /* 0123.45678901 */
+          session_buffered_write (ses, " ] ,\n      ", 11);
+          dk_free_tree (env->tje_prev_pred);	env->tje_prev_pred = NULL;
+        }
+      session_buffered_write_char ('\"', ses);
+      if (!strcmp (pred_iri, uname_rdf_ns_uri_type))
+        session_buffered_write (ses, "@type", 5);
+      else
+        dks_esc_write (ses, pred_iri, box_length (pred_iri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
+                                 /* .0123456 */
+      session_buffered_write (ses, "\" : [ ", 6);
+      env->tje_prev_pred = pred_iri_is_new ? pred_iri : box_copy (pred_iri); pred_iri_is_new = 0;
+    }
+  else                         /* 01.2345678901 */
+    session_buffered_write (ses, " ,\n        ", 11);
+  if (obj_is_iri)
+    {
+      session_buffered_write_char ('\"', ses);
+      dks_esc_write (ses, obj_iri, box_length (obj_iri) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_JSWRITE_DQ);
+      session_buffered_write_char ('\"', ses);
+    }
+  else
+    http_ld_json_write_literal_obj (ses, qi, obj, obj_dtp);
+  status = 1;
+fail:
+  if (subj_iri_is_new) dk_free_box (subj_iri);
+  if (pred_iri_is_new) dk_free_box (pred_iri);
+  if (obj_iri_is_new) dk_free_box (obj_iri);
+  return (caddr_t)((ptrlong)status);
+}
+
+
 caddr_t
 bif_sparql_rset_ttl_write_row (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
@@ -3160,6 +3980,13 @@ sparql_rset_xml_write_row_impl (query_instance_t *qi, dk_session_t *ses, caddr_t
               }
             break;
           }
+        case DV_WIDE:
+          {
+            SES_PRINT (ses, "<literal>");
+            dks_esc_write (ses, val, box_length_inline (val) - sizeof (wchar_t), CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_PTEXT);
+            SES_PRINT (ses, "</literal>");
+            break;
+          }
         case DV_STRING:
           {
             if (!(BF_IRI & box_flags (val)))
@@ -3183,6 +4010,7 @@ sparql_rset_xml_write_row_impl (query_instance_t *qi, dk_session_t *ses, caddr_t
         case DV_RDF:
           {
             rdf_box_t *rb = (rdf_box_t *)val;
+            rb_dt_lang_check(rb);
             if (RDF_BOX_DEFAULT_TYPE != rb->rb_type)
               {
                 caddr_t iri = rdf_type_twobyte_to_iri (rb->rb_type);
@@ -3191,6 +4019,7 @@ sparql_rset_xml_write_row_impl (query_instance_t *qi, dk_session_t *ses, caddr_t
                     SES_PRINT (ses, "<literal datatype=\"");
                     dks_esc_write (ses, iri, box_length_inline (iri)-1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_SQATTR);
                     SES_PRINT (ses, "\">");
+                    dk_free_box (iri);
                     goto literal_elt_printed; /* see below */
                   }
                 else
@@ -3204,6 +4033,7 @@ sparql_rset_xml_write_row_impl (query_instance_t *qi, dk_session_t *ses, caddr_t
                     SES_PRINT (ses, "<literal xml:lang=\"");
                     dks_esc_write (ses, l, box_length_inline (l)-1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_SQATTR);
                     SES_PRINT (ses, "\">");
+                    dk_free_box (l);
                     goto literal_elt_printed; /* see below */
                   }
                 else
@@ -3228,12 +4058,13 @@ literal_elt_printed:
           }
         default:
           {
-            ccaddr_t iri = xsd_type_of_box (val);
+            caddr_t iri = xsd_type_of_box (val);
             if (IS_BOX_POINTER (iri))
               {
                 SES_PRINT (ses, "<literal datatype=\"");
                 dks_esc_write (ses, iri, box_length_inline (iri)-1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_SQATTR);
                 SES_PRINT (ses, "\">");
+                dk_free_box (iri);
               }
             else
               SES_PRINT (ses, "<literal>");
@@ -3296,7 +4127,7 @@ bif_sparql_iri_split_rdfa_qname (caddr_t * qst, caddr_t * err_ret, state_slot_t
   int flags = bif_long_arg (qst, args, 2, "sparql_iri_split_rdfa_qname");
   const char *tail;
   int iri_strlen;
-  caddr_t ns_iri, prefix, *prefix_ptr, res;
+  caddr_t ns_iri, prefix, *prefix_ptr, res, to_free = NULL;
   switch (DV_TYPE_OF (raw_iri))
     {
       case DV_IRI_ID:
@@ -3339,7 +4170,9 @@ bif_sparql_iri_split_rdfa_qname (caddr_t * qst, caddr_t * err_ret, state_slot_t
       res = (flags & 0x2) ? list (3, NULL, box_dv_short_string (""), box_dv_short_nchars (iri, iri_strlen)) : NULL;
       goto res_done; /* see below */
     }
-  ns_iri = box_dv_short_nchars (iri, tail-iri);
+  if (tail > iri && tail[-1] == '%' && (tail <= (iri + iri_strlen - 2)))
+    tail += 2;
+  to_free = ns_iri = box_dv_short_nchars (iri, tail-iri);
   prefix_ptr = (caddr_t *)id_hash_get (ht, (caddr_t)(&ns_iri));
   if (NULL != prefix_ptr)
     prefix = prefix_ptr[0];
@@ -3349,6 +4182,7 @@ bif_sparql_iri_split_rdfa_qname (caddr_t * qst, caddr_t * err_ret, state_slot_t
       sprintf (buf, "n%ld", (long)(ht->ht_count));
       prefix = box_dv_short_string (buf);
       id_hash_set (ht, (caddr_t)(&ns_iri), (caddr_t)(&prefix));
+      to_free = NULL; /* to be released when hash table is free */
     }
   else
     prefix = NULL;
@@ -3356,6 +4190,8 @@ bif_sparql_iri_split_rdfa_qname (caddr_t * qst, caddr_t * err_ret, state_slot_t
 res_done:
   if (iri != raw_iri)
     dk_free_tree (iri);
+  if (to_free)
+    dk_free_box (to_free);
   return res;
 }
 
@@ -3424,6 +4260,28 @@ bif_rdf_graph_default_perms_of_user_dict (caddr_t * qst, caddr_t * err_ret, stat
   return box_copy (rdf_graph_default_world_perms_of_user_dict_hit);
 }
 
+caddr_t
+bif_rdf_cli_mark_qr_to_recompile (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_instance_t * qi = (query_instance_t *) qst;
+  client_connection_t * cli = qi->qi_client;
+  query_t **qr;
+  caddr_t *text;
+  id_hash_iterator_t it;
+
+  if (!cli || !cli->cli_text_to_query)
+    return NULL;
+
+  IN_CLIENT (cli);
+  id_hash_iterator (&it, cli->cli_text_to_query);
+  while (hit_next (&it, (caddr_t *) & text, (caddr_t *) & qr))
+    {
+      qr[0]->qr_to_recompile = 1;
+    }
+  LEAVE_CLIENT (cli);
+  return NULL;
+}
+
 int
 rdf_graph_specific_perms_of_user (user_t *u, iri_id_t g_iid)
 {
@@ -3842,7 +4700,7 @@ rdf_repl_feed_batch_of_rquads (query_instance_t *qi, caddr_t **rquads_vector, cc
   tf->tf_current_graph_uri = NULL;
   tf->tf_app_env = app_env;
   tf->tf_creator = "__rdf_repl_action";
-  tf->tf_input_name = NEW_DB_NULL;
+  tf->tf_boxed_input_name = NEW_DB_NULL;
   tf->tf_line_no_ptr = &fake_lineno;
   tf_set_cbk_names (tf, cbk_names);
   DO_BOX_FAST (caddr_t *, rquad, rquad_ctr, rquads_vector)
@@ -3909,7 +4767,6 @@ rdf_repl_feed_batch_of_rquads (query_instance_t *qi, caddr_t **rquads_vector, cc
   END_DO_BOX_FAST;
   tf_commit (tf);
   tf->tf_current_graph_uri = NULL; /* To not free it twice (there's no box_copy_tree from rquad[1] to it, just copying the pointer) */
-  dk_free_box ((caddr_t) tf->tf_input_name);
   tf_free (tf);
   dk_free_tree (rquads_vector);
 }
@@ -4209,6 +5066,7 @@ rdf_box_init ()
   bif_define_typed ("rdf_box_is_storeable", bif_rdf_box_is_storeable, &bt_integer);
   bif_define_typed ("rdf_box_needs_digest", bif_rdf_box_needs_digest, &bt_integer);
   bif_define_typed ("rdf_box_strcmp", bif_rdf_box_strcmp, &bt_integer);
+  bif_define_typed ("rdf_box_migrate_after_06_02_3129", bif_rdf_box_migrate_after_06_02_3129, &bt_integer);
   bif_define_typed ("__rdf_long_of_obj", bif_rdf_long_of_obj, &bt_any);
   bif_set_uses_index (bif_rdf_long_of_obj);
   bif_define_typed ("__rdf_box_make_complete", bif_rdf_box_make_complete, &bt_integer);
@@ -4227,12 +5085,20 @@ rdf_box_init ()
   bif_define_typed ("__rdf_redu_ser_long", bif_rdf_redu_ser_long, &bt_varchar);
   bif_define_typed ("__rdf_redu_deser_long", bif_rdf_dist_deser_long, &bt_any);
   bif_define ("http_sys_find_best_sparql_accept", bif_http_sys_find_best_sparql_accept);
+  bif_define ("http_ttl_prefixes", bif_http_ttl_prefixes);
+  bif_set_uses_index (bif_http_ttl_prefixes);
   bif_define ("http_ttl_triple", bif_http_ttl_triple);
   bif_set_uses_index (bif_http_ttl_triple);
   bif_define ("http_nt_triple", bif_http_nt_triple);
   bif_set_uses_index (bif_http_nt_triple);
+  bif_define ("http_rdfxml_p_ns", bif_http_rdfxml_p_ns);
+  bif_set_uses_index (bif_http_rdfxml_p_ns);
+  bif_define ("http_rdfxml_triple", bif_http_rdfxml_triple);
+  bif_set_uses_index (bif_http_rdfxml_triple);
   bif_define ("http_talis_json_triple", bif_http_talis_json_triple);
   bif_set_uses_index (bif_http_talis_json_triple);
+  bif_define ("http_ld_json_triple", bif_http_ld_json_triple);
+  bif_set_uses_index (bif_http_ld_json_triple);
   bif_define ("http_nt_object", bif_http_nt_object);
   bif_set_uses_index (bif_http_nt_object);
   bif_define ("http_rdf_object", bif_http_rdf_object);
@@ -4255,6 +5121,7 @@ rdf_box_init ()
   bif_define ("__rdf_graph_public_perms_dict", bif_rdf_graph_public_perms_dict);
   bif_define ("__rdf_graph_group_of_privates_dict", bif_rdf_graph_group_of_privates_dict);
   bif_define ("__rdf_graph_default_perms_of_user_dict", bif_rdf_graph_default_perms_of_user_dict);
+  bif_define ("__rdf_cli_mark_qr_to_recompile", bif_rdf_cli_mark_qr_to_recompile);
   bif_define ("__rdf_graph_approx_perms", bif_rdf_graph_approx_perms);
   bif_define ("__rdf_graph_specific_perms_of_user", bif_rdf_graph_specific_perms_of_user);
   bif_define ("__rgs_assert", bif_rgs_assert);
diff --git a/libsrc/Wi/rdfinf.c b/libsrc/Wi/rdfinf.c
index e1ff9c7..e411829 100644
--- a/libsrc/Wi/rdfinf.c
+++ b/libsrc/Wi/rdfinf.c
@@ -1,14 +1,14 @@
 /*
  *  rdfinf.c
  *
- *  $Id: rdfinf.c,v 1.19.2.28 2011/03/25 12:20:03 source Exp $
+ *  $Id: rdfinf.c,v 1.19.2.35 2012/03/08 12:55:35 source Exp $
  *
  *  RDF Inference
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -322,7 +322,7 @@ iri_ensure (caddr_t * qst, caddr_t name, int flag, caddr_t * err_ret)
 
 char * sas_1_text = "select S from DB.DBA.RDF_QUAD where G = ? and O = ? and P = ? option (quietcast)";
 char * sas_2_text = "select O from DB.DBA.RDF_QUAD where G = ? and S = ? and P = ? option (quietcast)";
-char * sas_tn_text = "select O from DB.DBA.RDF_QUAD where S = :0 and P = rdf_sas_iri () and G = :1 union all select S from DB.DBA.RDF_QUAD where O = :0 and P = rdf_sas_iri () and G = :1 option (quietcast, array)";
+char * sas_tn_text = "select O from DB.DBA.RDF_QUAD where S = :0 and P = rdf_sas_iri () and G = :1 and isiri_id (O) union all select S from DB.DBA.RDF_QUAD where O = :0 and P = rdf_sas_iri () and G = :1 option (quietcast, array)";
 char * sas_tn_no_graph_text = "select O from DB.DBA.RDF_QUAD where S = :0 and P = rdf_sas_iri () union all select S from DB.DBA.RDF_QUAD where O = :0 and P = rdf_sas_iri () option (quietcast, array)";
 char * tn_ifp_text =
   " select S from DB.DBA.RDF_QUAD "
@@ -347,7 +347,7 @@ char * tn_ifp_dist_text =
   " where rorg.P in (rdf_inf_ifp_rel_list (:1)) and rsyn.P in (rdf_inf_ifp_rel_list (:1, rorg.P)) and rorg.S = :0 and isiri_id (:0) and rsyn.O = rorg.O and rorg.G in (:2) and rsyn.G in (:2) and not rdf_inf_ifp_is_excluded (:1, rorg.P, rorg.O) "
   " option (any order)";
 char * tn_ifp_dist_no_graph_text =
-  " select syn.s from rdf_quad org, rdf_quad syn where org.p in (rdf_inf_ifp_list (:1)) and syn.p = org.p and org.s = :0 and isiri_id (:0) and syn.o = org.o and not rdf_inf_ifp_is_excluded (:1, org.P, org.O) "
+  " select syn.s from DB.DBA.RDF_QUAD org, DB.DBA.RDF_QUAD syn where org.p in (rdf_inf_ifp_list (:1)) and syn.p = org.p and org.s = :0 and isiri_id (:0) and syn.o = org.o and not rdf_inf_ifp_is_excluded (:1, org.P, org.O) "
   " union all select rsyn.s from DB.DBA.RDF_QUAD rorg, DB.DBA.RDF_QUAD rsyn "
   " where rorg.P in (rdf_inf_ifp_rel_list (:1)) and rsyn.P in (rdf_inf_ifp_rel_list (:1, rorg.P)) and rorg.S = :0 and isiri_id (:0) and rsyn.o = rorg.O and not rdf_inf_ifp_is_excluded (:1, rorg.P, rorg.O) "
   " option (any order)";
@@ -445,20 +445,22 @@ hash_queue_get (id_hash_t * ht, query_instance_t * qi, int next, int last)
 }
 
 
-void rdf_sas_ensure (caddr_t * qst);
+void rdf_sas_ensure (caddr_t * qst, caddr_t * err_ret);
 
 void
 ri_same_as_iri (rdf_inf_pre_node_t * ri, query_instance_t * qi, caddr_t iri, query_t * qr)
 {
   caddr_t * qst = (caddr_t *)qi;
   ptrlong one = 1;
-  caddr_t err;
+  caddr_t err = NULL;
   local_cursor_t * lc;
   id_hash_t * reached = (id_hash_t *) QST_GET (qi, ri->ri_sas_reached);
   id_hash_t * out = (id_hash_t *) QST_GET (qi, ri->ri_sas_out);
   id_hash_t * follow = (id_hash_t *) QST_GET (qi, ri->ri_sas_follow);
   int ginx;
-  rdf_sas_ensure (qst);
+  rdf_sas_ensure (qst, &err);
+  if (err)
+    sqlr_resignal (err);
   DO_BOX (state_slot_t *, g_ssl, ginx, ri->ri_sas_g)
     {
       caddr_t g = qst_get (qst, g_ssl);
@@ -790,7 +792,6 @@ bif_ctx_arg (caddr_t * qst, state_slot_t ** args, int nth, char * name, int crea
   if (!place)
     {
       caddr_t n2 = box_copy (ctx_name);
-      NEW_VARZ (rdf_inf_ctx_t, c1);
       return ric_allocate (n2);
     }
   else
@@ -1269,7 +1270,7 @@ bif_rdf_owl_iri (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 
 
 void
-rdf_sas_ensure (caddr_t * qst)
+rdf_sas_ensure (caddr_t * qst, caddr_t * err_ret)
 {
 }
 
@@ -1277,7 +1278,7 @@ rdf_sas_ensure (caddr_t * qst)
 caddr_t
 bif_rdf_sas_iri (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  rdf_sas_ensure (qst);
+  rdf_sas_ensure (qst, err_ret);
   return box_copy_tree (same_as_iri);
 }
 
@@ -1341,7 +1342,7 @@ char * cl_rdf_init_srv =
 "   DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (null); \n"
 "   DB.DBA.RDF_QNAME_OF_IID (null); \n"
 "   rdf_inf_const_init (); \n"
-"   select  count (*) into c from sys_rdf_schema where 0 = rdfs_load_schema (rs_name, rs_uri); \n"
+"   select count (*) into c from (select distinct s.RS_NAME from sys_rdf_schema s) sub where 0 = rdfs_load_schema (sub.RS_NAME); \n"
 "   JSO_LOAD_AND_PIN_SYS_GRAPH_RO  (); \n"
 "   commit work; \n"
 "   rdf_init_thread (0); \n"
@@ -2261,7 +2262,7 @@ sqlg_cl_bracket_outer (sqlo_t * so, data_source_t * first)
   sql_comp_t * sc = so->so_sc;
   outer_seq_end_node_t * ose;
   dk_hash_t * res = hash_table_allocate (11);
-  data_source_t * first1 = qn_next (first);
+  data_source_t * first1 = first ? qn_next (first) : NULL;
   data_source_t * org_first = first1;
   void * dp;
   SET_THR_ATTR (THREAD_CURRENT_THREAD, TA_SQLC_ASG_SET, res);
diff --git a/libsrc/Wi/rdfinf.h b/libsrc/Wi/rdfinf.h
index 3db3344..6096c0b 100644
--- a/libsrc/Wi/rdfinf.h
+++ b/libsrc/Wi/rdfinf.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: rdfinf.h,v 1.6.2.6 2011/01/10 20:49:47 source Exp $
+ *  $Id: rdfinf.h,v 1.6.2.7 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/rdflddir2.sql b/libsrc/Wi/rdflddir2.sql
index 0d4aa8d..9558a54 100644
--- a/libsrc/Wi/rdflddir2.sql
+++ b/libsrc/Wi/rdflddir2.sql
@@ -1,10 +1,10 @@
 --
---  $Id: rdflddir2.sql,v 1.1.2.1 2011/03/24 16:15:42 source Exp $
+--  $Id: rdflddir2.sql,v 1.1.2.9 2012/03/08 12:55:35 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2011 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -128,14 +128,28 @@ ld_add (in _fname varchar, in _graph varchar)
 }
 ;
 
-create procedure ld_ttlp_flags (in fname varchar)
+create procedure ld_ttlp_flags (in fname varchar, in opt varchar)
 {
-  if (fname like '%/btc-2009%' or fname like '%.nq%' or fname like '%.n4')
+  if (fname like '%/btc-20%' or fname like '%.nq%' or fname like '%.n4')
+{
+      if (lower (opt) = 'with_delete')
+	return 255 + 512 + 2048;
     return 255 + 512;
+    }
+   if (fname like '%.trig' or fname like '%.trig.gz')
+     return 255 + 256;
   return 255;
 }
 ;
 
+create procedure ld_is_rdfxml (in f any)
+{
+  if (f like '%.xml' or f like '%.owl' or f like '%.rdf' or f like '%.rdfs')
+    return 1;
+  return 0;
+}
+;
+
 create procedure
 ld_file (in f varchar, in graph varchar)
 {
@@ -166,17 +180,17 @@ ld_file (in f varchar, in graph varchar)
   else if (f like '%.gz')
     {
       gzip_name := regexp_replace (f, '\.gz\x24', '');
-      if (gzip_name like '%.xml' or gzip_name like '%.owl' or gzip_name like '%.rdf')
+      if (ld_is_rdfxml (gzip_name))
 	DB.DBA.RDF_LOAD_RDFXML (gz_file_open (f), graph, graph);
       else
-	TTLP (gz_file_open (f), graph, graph, ld_ttlp_flags (gzip_name));
+	TTLP (gz_file_open (f), graph, graph, ld_ttlp_flags (gzip_name, graph));
     }
   else
     {
-      if (f like '%.xml' or f like '%.owl' or f like '%.rdf')
+      if (ld_is_rdfxml (f))
 	DB.DBA.RDF_LOAD_RDFXML (file_open (f), graph, graph);
       else
-	TTLP (file_open (f), graph, graph, ld_ttlp_flags (f));
+	TTLP (file_open (f), graph, graph, ld_ttlp_flags (f, graph));
     }
 
   --log_message (sprintf ('loaded %s', f));
@@ -201,40 +215,46 @@ rdf_load_dir (in path varchar,
 
 create procedure ld_array ()
 {
-  declare first, last, arr, len, local any;
+  declare first, last, arr, fs, len, local any;
   declare cr cursor for
-      select top 100 LL_FILE, LL_GRAPH
+      select top 200 LL_FILE, LL_GRAPH
         from DB.DBA.LOAD_LIST table option (index ll_state)
         where LL_STATE = 0
 	for update;
-  declare fill int;
+  declare fill, inx int;
   declare f, g varchar;
   declare r any;
   whenever not found goto done;
   first := 0;
   last := 0;
  arr := make_array (100, 'any');
-  fill := 0;
+  fs  := make_array (100, 'any');
+  fill := 0; inx := 0;
   open cr;
   len := 0;
   for (;;)
     {
       fetch cr into f, g;
+      inx := inx + 1;
+      if (file_stat (f, 1) = 0)
+	goto next;
       if (0 = first) first := f;
       last := f;
       arr[fill] := vector (f, g);
+      fs[fill] := f;
     len := len + cast (file_stat (f, 1) as int);
       fill := fill + 1;
       if (len > 2000000 or fill >= 100)
 	goto done;
+      next:;
     }
  done:
   if (0 = first)
     return 0;
   if (1 <> sys_stat ('cl_run_local_only'))
     local := sys_stat ('cl_this_host');
-  update load_list set ll_state = 1, ll_started = curdatetime (), LL_HOST = local
-    where ll_file >= first and ll_file <= last;
+  update load_list set ll_state = 1, ll_started = curdatetime (), LL_HOST = local where ll_file in (fs);
+  close cr;
   return arr;
 }
 ;
diff --git a/libsrc/Wi/rdfxml_parser.c b/libsrc/Wi/rdfxml_parser.c
index beb01ff..af802ac 100644
--- a/libsrc/Wi/rdfxml_parser.c
+++ b/libsrc/Wi/rdfxml_parser.c
@@ -1,14 +1,14 @@
 /*
  *  rdfxml_parser.c
  *
- *  $Id: rdfxml_parser.c,v 1.17.2.11 2011/02/23 17:31:50 source Exp $
+ *  $Id: rdfxml_parser.c,v 1.17.2.25 2012/03/08 13:39:43 source Exp $
  *
  *  RDF/XML parser
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -39,12 +39,184 @@ extern "C" {
 }
 #endif
 
+#ifdef NDEBUG
+#undef RDFXML_DEBUG
+#endif
+
 #ifdef RDFXML_DEBUG
 #define rdfxml_dbg_printf(x) dbg_printf (x)
 #else
 #define rdfxml_dbg_printf(x)
 #endif
 
+/*!< RDF/XML parser mode, i.e. what does the parser expect to read */
+#define XRL_PARSETYPE_TOP_LEVEL		0x01	/*!< Top-level element (rdf:RDF) */
+#define XRL_PARSETYPE_RESOURCE		0x02	/*!< Resource description */
+#define XRL_PARSETYPE_LITERAL		0x04	/*!< Literal value */
+#define XRL_PARSETYPE_RES_OR_LIT	0x08	/*!< Either resource description or a literal */
+#define XRL_PARSETYPE_PROPLIST		0x10	/*!< Sequence of properties of a resource */
+#define XRL_PARSETYPE_EMPTYPROP		0x20	/*!< Nothing but ending tag of property */
+#define XRL_PARSETYPE_COLLECTION	0x40	/*!< First resource inside collection, other resources are recognized by */
+#define XRL_PARSETYPE_SET_EXPLICITLY	0x80	/*!< The parser mode is set explicitly by rdf:parseType attribute */
+
+/*! Stack part of RDF/XML-specific context of XML parser.
+These are fields of quad to be created.
+"Inheritable" fields are propagated from the parent. Pointers are copied, strings are not copied. */
+typedef struct xp_rdfxml_locals_s
+{
+  struct xp_rdfxml_locals_s *xrl_parent;	/*!< Pointer to parent context */
+  xp_node_t *	xrl_xn;			/*!< Node whose not-yet-closed element corresponds to the given context */
+  caddr_t	xrl_subject;		/*!< Subject (IRI of named node or blank node IRI_ID); subject is used for nested predicates */
+  caddr_t	xrl_predicate;		/*!< Predicate (IRI of named node or blank node IRI_ID) */
+  caddr_t	xrl_base;		/*!< Base to resolve relative URIs, inheritable */
+  caddr_t	xrl_language;		/*!< Language tag as string or NULL, inheritable */
+  caddr_t	xrl_datatype;		/*!< Object data type (named node IRI_ID), not inheritable */
+  caddr_t	xrl_reification_id;	/*!< ID used to reify a statement as four quads for S,P,O and rdf:type rdfs:Statement. */
+  int		xrl_li_count;		/*!< Counter of used LI, not inheritable */
+  dk_set_t	xrl_seq_items;		/*!< Backstack of "Sequence" parseType subjects */
+  unsigned char	xrl_parsetype;		/*!< Parse type (one of XRL_DATATYPE_NNN), not inheritable */
+  char		xrl_base_set;
+  char		xrl_language_set;
+} xp_rdfxml_locals_t;
+
+#define RDFA_ICT_PRED_REL_OR_TYPEOF	200	/*!< Forward with ref object */
+#define RDFA_ICT_PRED_REV		201	/*!< Reverse predicate */
+#define RDFA_ICT_PRED_PROPERTY		202	/*!< Forward predicate with literal object */
+
+/*! [I]n[C]omplete [T]riple.
+We should keep subject instead of use of innermost xrdfal_subj.
+This is for incomplete triples inside HEAD, they may wait for BASE definition and contain different "about" attributes. */
+typedef struct rdfa_ict_s
+{
+  ptrlong ict_pred_type;	/*!< Predicate type, one of RDFA_ICT_PRED_xxx values */
+  caddr_t ict_left;		/*!< Subject by default and object if \c ict_pred_type == RDFA_ICT_PRED_REV */
+  caddr_t ict_pred;		/*!< Predicate */
+  caddr_t ict_right;		/*!< Object by default and subject if \c ict_pred_type == RDFA_ICT_PRED_REV */
+  caddr_t ict_datatype;		/*!< Datatype of a literal object */
+  caddr_t ict_language;		/*!< Language of a literal object */
+  ptrlong ict_used_as_template;	/*!< The ICT itself was used as a template for cases like <X rel="p"><Y typeof="t" /></X> (even if was not completed) */
+} rdfa_ict_t;
+
+#define RDFA_IN_HTML		0x01	/*!< The current tag is XHTML top (or nested), respect <HEAD> and <BODY> if found inside */
+#define RDFA_IN_HEAD		0x02	/*!< The current tag is HEAD in XHTML (or nested), the doc is now default subject, do not feed triples immediately to handle <BASE> */
+#define RDFA_IN_BASE		0x04	/*!< The current tag is BASE in HEAD in XHTML (or nested), the content will go to all \c xrdfal_base throughout the stack. */
+#define RDFA_IN_BODY		0x08	/*!< The current tag is BODY in XHTML (or nested), the doc is now default subject, do feed triples as soon as they're complete */
+#define RDFA_IN_LITERAL		0x10	/*!< The parser runs inside an XML literal or a string literal or an unused subtree, because there was a "property" attribute */
+#define RDFA_IN_UNUSED		0x20	/*!< The parser runs inside an element with "content" attribute. The attribute is used as a string literal already so there's nothing to do in a subtree. Similarly, it is used for internals of <base href="...">...</base> */
+#define RDFA_IN_STRLITERAL	0x40	/*!< The parser runs inside an element with explicit datatype other than rdf:XMLLiteral, so all non-text items should be ignored, only texts are important. */
+#define RDFA_IN_XMLLITERAL	0x80	/*!< The parser runs inside an element with explicit rdf:XMLLiteral datatype or datatype is not present but non-text nodes were found. */
+
+/*! Stack part of RDFa-specific context of XML parser.
+Unlike RDF/XML, not every opened tag gets its own stack item, because many of them lacks RDFa-specific data at all.
+RDFa locals are popped only when an XML element to close corresponds to xrdfal_xn of the innermost local context */
+
+typedef struct xp_rdfa_locals_s
+{
+  struct xp_rdfa_locals_s *xrdfal_parent;	/*!< Pointer to parent context */
+  xp_node_t *	xrdfal_xn;		/*!< Node whose not-yet-closed element corresponds to the given context */
+  int		xrdfal_place_bits;	/*!< A combination of RDFA_IN_... bits */
+  caddr_t	xrdfal_subj;		/*!< A [new subject] as set at the end of parsing the opening tag. It can be NULL, look up */
+  caddr_t	xrdfal_obj_res;		/*!< A [current object resource] as set at the end of parsing the opening tag or created as bnode after that */
+  caddr_t	xrdfal_datatype;	/*!< Datatype IRI */
+  caddr_t	xrdfal_base;		/*!< Base to resolve relative links as set by <BASE> now in XSLT+RDFa and may be set by xml:base in other XML docs. Automatically inherited from parent */
+  caddr_t	xrdfal_language;	/*!< Language label. Automatically inherited from parent */
+  caddr_t	xrdfal_vocab;		/*!< Vocabulary URI. Automatically inherited from parent */
+  caddr_t *	xrdfal_profile_terms;	/*!< Definitions of terms from an external RDFa profile resource, get-keyword style, sorted by terms for \c ecm_find_name(). Automatically inherited from parent */
+  rdfa_ict_t *	xrdfal_ict_buffer;	/*!< Storage for incomplete triples, may contain NULLs at the end */
+  int		xrdfal_ict_count;	/*!< Count of stored incomplete triples */
+  int		xrdfal_boring_opened_elts;	/*!< Number of opened but not yet closed elements inside RDFA_IN_STRLITERAL or RDFA_IN_UNUSED or "uninteresting" elements between \c xrdfal_xn and next nested \c xp_rdfa_locals_t in chain */
+} xp_rdfa_locals_t;
+
+#define RDFA_ATTR_ABOUT		0
+#define RDFA_ATTR_CONTENT	1
+#define RDFA_ATTR_DATATYPE	2
+#define RDFA_ATTR_HREF		3
+#define RDFA_ATTR_PREFIX	4
+#define RDFA_ATTR_PROFILE	5
+#define RDFA_ATTR_PROPERTY	6
+#define RDFA_ATTR_REL		7
+#define RDFA_ATTR_RESOURCE	8
+#define RDFA_ATTR_REV		9
+#define RDFA_ATTR_SRC		10
+#define RDFA_ATTR_TYPEOF	11
+#define RDFA_ATTR_VOCAB		12
+#define RDFA_ATTR_XML_BASE	13
+#define RDFA_ATTR_XML_LANG	14
+#define COUNTOF__RDFA_ATTR	15
+
+#define MDATA_IN_UNUSED		0x01	/*!< The parser runs inside an "blocking" element. This is not used ATM, but can be used later for tags like XMP */
+#define MDATA_IN_STRLITERAL	0x02	/*!< The parser runs inside an element with explicit datatype other than rdf:XMLLiteral, so all non-text items should be ignored, only texts are important. */
+#define MDATA_IN_XMLLITERAL	0x04	/*!< The parser runs inside an element with explicit rdf:XMLLiteral datatype or datatype is not present but non-text nodes were found. */
+
+/*! Stack part of Microdata-specific context of XML parser.
+Unlike RDF/XML, not every opened tag gets its own stack item, because many of them lacks Microdata-specific data at all.
+Microdata locals are popped only when an XML element to close corresponds to xmdatal_xn of the innermost local context */
+
+typedef struct xp_mdata_locals_s
+{
+  struct xp_mdata_locals_s *xmdatal_parent;	/*!< Pointer to parent context */
+  xp_node_t *	xmdatal_xn;		/*!< Node whose not-yet-closed element corresponds to the given context */
+  int		xmdatal_place_bits;	/*!< A combination of MDATA_IN_... bits */
+  caddr_t	xmdatal_subj;		/*!< An [item] as set at the end of parsing the opening tag. It can be NULL inside MDATA_IN_UNUSED, it can be set to Id instead of ITEMID. Automatically inherited from parent */
+  int		xmdatal_subj_is_id;	/*!< Flags if \c xmldatal_subj is set by document-wide id, not by a global itemid or a "blank node" itemscope. Automatically inherited from parent */
+  int		xmdatal_prop_count;	/*!< Count of predicates set above the current element, they're listed at the beginning of \c xmdatal_preds. Automatically inherited from parent */
+  caddr_t *	xmdatal_props;		/*!< Buffer for predicates set above the current element. Automatically inherited from parent */
+  caddr_t	xmdatal_datatype;	/*!< Datatype IRI. Automatically inherited from parent */
+  int		xmdatal_datatype_is_local;	/*!< Datatype can be removed from \c xpt_subj2type at closing this tag. NOT inherited from parent! */
+  caddr_t	xmdatal_base;		/*!< Base to resolve relative links as set by <BASE> now in XSLT+RDFa and may be set by xml:base in other XML docs. Automatically inherited from parent */
+  caddr_t	xmdatal_language;	/*!< Language label. Automatically inherited from parent */
+  int		xmdatal_boring_opened_elts;	/*!< Number of opened but not yet closed elements inside MDATA_IN_STRLITERAL or MDATA_IN_UNUSED or "uninteresting" elements between \c xmdatal_xn and next nested \c xp_mdata_locals_t in chain */
+} xp_mdata_locals_t;
+
+#define MDATA_ATTR_OBJ_CONTENT_STRLIT	0
+#define MDATA_ATTR_OBJ_DATETIME		1
+#define MDATA_ATTR_OBJ_STRLIT		2
+#define MDATA_ATTR_OBJ_CITE_REF		3
+#define MDATA_ATTR_OBJ_REF		4
+#define MDATA_ATTR_OBJ_NAME		5
+#define MDATA_ATTR_ID			6
+#define MDATA_ATTR_ITEMID		7
+#define MDATA_ATTR_ITEMPROP		8
+#define MDATA_ATTR_ITEMREF		9
+#define MDATA_ATTR_ITEMSCOPE		10
+#define MDATA_ATTR_ITEMTYPE		11
+#define MDATA_ATTR_REL			12
+#define MDATA_ATTR_XML_BASE		13
+#define MDATA_ATTR_XML_LANG		14
+#define COUNTOF__MDATA_ATTR		15
+
+
+/*! This structure is kept in RDFa and Microdata parsers as a DV_ARRAY_OF_POINTER and freed in case of error, to avoid memleaks.
+It is allocated once and only partially cleaned by callback calls. */
+typedef struct xp_tmp_s
+{
+/* Common part: */
+  caddr_t xpt_base;		/*!< Readed but not saved xml:base */
+  caddr_t xpt_lang;		/*!< Readed but not saved xml:lang */
+/* RDFa part: */
+  caddr_t xpt_dt;		/*!< Readed, not expanded and not saved datatype */
+  caddr_t xpt_src;		/*!< Readed, not expanded and not saved subj (obj for reverse preds) */
+  caddr_t xpt_href;		/*!< Readed, not expanded and not saved obj (subj for reverse preds or triple from element w/o "rel" or "rev") */
+  caddr_t *xpt_rel_preds;	/*!< Readed, not expanded and not saved "rel" predicates */
+  caddr_t *xpt_rev_preds;	/*!< Readed, not expanded and not saved "rev" predicates */
+  caddr_t *xpt_prop_preds;	/*!< Readed, not expanded and not saved "property" predicates */
+  caddr_t *xpt_typeofs;		/*!< Readed, not expanded and not saved "typeof" types */
+  caddr_t xpt_obj_res;		/*!< Readed, not expanded and not saved object resource OR composed and not saved bnode object */
+  caddr_t xpt_obj_content;	/*!< Readed but not saved content of literal object */
+/* Microdata part: */
+  id_hash_t *xpt_subj2type;	/*!< Hashtable that maps subjects to type IRIs. itemscopes with itemtype are added here and removed at end of document (if itemscope has itemrefs) or at closing tag (otherwise) */
+  id_hash_t *xpt_id2desc;	/*!< Hashtable that maps ids to \c mdata_id_desc_t (i.e., to validation data + accumulators of subjects that itemref-s to that ids) */
+  id_hash_t *xpt_dangling_triples;	/*!< Hashtable with triples as keys, values are bitmasks about replacing ids to IRIs in the key triple: 1 = no replaces, 2 = replace S, 4 = replace O, 8 = replace both */
+} xp_tmp_t;
+
+#define MDATA_DANGLING_TRIPLE_CVT_BITS(cvt_s,cvt_o) (1 << (((cvt_s) ? 1 : 0) + ((cvt_o) ? 2 : 0)))
+
+
+extern void xp_pop_rdf_locals (xparse_ctx_t *xp);
+extern void xp_pop_rdfa_locals (xparse_ctx_t *xp);
+extern xp_rdfxml_locals_t *xp_push_rdf_locals (xparse_ctx_t *xp);
+
+
 /* Part 1. RDF/XML-specific functions */
 
 #define XRL_SET_INHERITABLE(xrl,name,value,errmsg) do { \
@@ -176,7 +348,12 @@ xp_rdfxml_resolved_iid (xparse_ctx_t *xp, const char *avalue, int is_id_attr)
     }
   else
     local = box_dv_short_string (avalue);
-  res = xml_uri_resolve_like_get (xp->xp_qi, &err, xp->xp_rdfxml_locals->xrl_base, local, "UTF-8");
+#if 1
+  res = rfc1808_expand_uri (xp->xp_rdfxml_locals->xrl_base, local,
+    NULL /*output_cs_name*/, 0, NULL /*base_string_cs_name*/, NULL /*rel_string_cs_name*/, &err);
+#else
+  res = xml_uri_resolve_like_get (xp->xp_qi, &err, xp->xp_rdfxml_locals->xrl_base, local, NULL /* No need to convert into "UTF-8" because it's UTF-8 already */);
+#endif
   dk_free_box (local);
   if (NULL != err)
     sqlr_resignal (err);
@@ -233,7 +410,7 @@ xp_rdfxml_triple_l (xparse_ctx_t *xp, caddr_t s, caddr_t p, caddr_t o, caddr_t d
 void
 xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
 {
-  xparse_ctx_t * xp = (xparse_ctx_t*) userdata;
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
   xp_rdfxml_locals_t *outer = xp->xp_rdfxml_locals;
   xp_rdfxml_locals_t *inner;
   xp_node_t *xn;
@@ -245,12 +422,12 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
 #ifdef RECOVER_RDF_VALUE
   caddr_t rdf_val = NULL;
 #endif
-  if (XRL_PARSETYPE_LITERAL == outer->xrl_parsetype)
+  if (XRL_PARSETYPE_LITERAL & outer->xrl_parsetype)
     {
       xp_element (userdata, name, attrdata);
       return;
     }
-  else if (XRL_PARSETYPE_EMPTYPROP == outer->xrl_parsetype)
+  else if (XRL_PARSETYPE_EMPTYPROP & outer->xrl_parsetype)
     xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Sub-element in a predicate element with object node attribute");
   inner = xp_push_rdf_locals (xp);
   xn = xp->xp_free_list;
@@ -285,17 +462,17 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
     {
       if (!strcmp ("RDF", tmp_local))
         {
-          if (XRL_PARSETYPE_TOP_LEVEL != outer->xrl_parsetype)
+          if (!(XRL_PARSETYPE_TOP_LEVEL & outer->xrl_parsetype))
             xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 200, "Element rdf:RDF can appear only at top level");
           inner->xrl_parsetype = XRL_PARSETYPE_RESOURCE;
         }
       else if (!strcmp ("Description", tmp_local))
         {
-          if (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype)
+          if (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype)
             xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 200, "Element rdf:Description can not appear in list of properties");
           inner->xrl_parsetype = XRL_PARSETYPE_PROPLIST;
         }
-      else if (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype)
+      else if (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype)
         {
           caddr_t full_element_name;
           if (!strcmp ("li", tmp_local))
@@ -321,26 +498,56 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
           return;
         }
 #endif
-      else if (
-        !strcmp ("Property", tmp_local) ||
-        !strcmp ("Bag", tmp_local) ||
-        !strcmp ("Seq", tmp_local) ||
-        !strcmp ("Alt", tmp_local)  ||
-        !strcmp ("List", tmp_local) ||
-        !strcmp ("Statement", tmp_local) )
-        {
-          size_t l1 = strlen (tmp_nsuri), l2 = strlen (tmp_local);
-          caddr_t full_element_name = dk_alloc_box (l1 + l2 + 1, DV_STRING);
+      else
+        {
+          size_t l1, l2;
+          caddr_t full_element_name;
+          if (
+            !strcmp ("Property", tmp_local) ||
+            !strcmp ("Bag", tmp_local) ||
+            !strcmp ("Seq", tmp_local) ||
+            !strcmp ("Alt", tmp_local)  ||
+            !strcmp ("List", tmp_local) ||
+            !strcmp ("Statement", tmp_local) ||
+            !strcmp ("nil", tmp_local) )
+            { ; }
+          else if (
+            !strcmp ("subject", tmp_local) ||
+            !strcmp ("predicate", tmp_local) ||
+            !strcmp ("object", tmp_local) ||
+            !strcmp ("type", tmp_local) ||
+            !strcmp ("value", tmp_local) ||
+            !strcmp ("first", tmp_local) ||
+            !strcmp ("rest", tmp_local) ||
+            '_' == tmp_local[0] )
+            {
+              xmlparser_logprintf (xp->xp_parser, XCFG_WARNING, 200, "Name rdf:%.200s is used for node, not for property (legal, but strange)", tmp_local);
+            }
+          else if (
+            !strcmp ("ID", tmp_local) ||
+            !strcmp ("about", tmp_local) ||
+            !strcmp ("bagID", tmp_local) ||
+            !strcmp ("parseType", tmp_local) ||
+            !strcmp ("resource", tmp_local) ||
+            !strcmp ("nodeID", tmp_local) ||
+            !strcmp ("li", tmp_local) ||
+            !strcmp ("aboutEach", tmp_local) ||
+            !strcmp ("aboutEachPrefix", tmp_local) )
+            {
+              xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 200, "Name rdf:%.200s is used for node", tmp_local);
+            }
+          else
+            {
+              xmlparser_logprintf (xp->xp_parser, XCFG_WARNING, 200, "Unknown name rdf:%.200s is used (legal, but strange)", tmp_local);
+            }
+          l1 = strlen (tmp_nsuri);
+          l2 = strlen (tmp_local);
+          full_element_name = dk_alloc_box (l1 + l2 + 1, DV_STRING);
           memcpy (full_element_name, tmp_nsuri, l1);
           strcpy (full_element_name + l1, tmp_local);
           subj_type = xp->xp_boxed_name = full_element_name;
           inner->xrl_parsetype = XRL_PARSETYPE_PROPLIST;
         }
-      else
-        {
-          xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 200, "Unknown element in RDF namespace");
-          return;
-        }
     }
   else
     {
@@ -348,7 +555,7 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
       caddr_t full_element_name = dk_alloc_box (l1 + l2 + 1, DV_STRING);
       memcpy (full_element_name, tmp_nsuri, l1);
       strcpy (full_element_name + l1, tmp_local);
-      if (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype)
+      if (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype)
         {
           dk_free_tree (inner->xrl_predicate);
           inner->xrl_predicate = full_element_name;
@@ -372,7 +579,10 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
           if (!strcmp (tmp_local, "lang"))
             XRL_SET_INHERITABLE (inner, xrl_language, box_dv_short_string (avalue), "Attribute 'xml:lang' is used twice");
           else if (!strcmp (tmp_local, "base"))
-            XRL_SET_INHERITABLE (inner, xrl_base, box_dv_short_string (avalue), "Attribute 'xml:base' is used twice");
+            {
+              XRL_SET_INHERITABLE (inner, xrl_base, box_dv_short_string (avalue), "Attribute 'xml:base' is used twice");
+              TF_CHANGE_BASE_AND_DEFAULT_GRAPH(xp->xp_tf,box_dv_short_string (avalue));
+            }
           else if (0 != strcmp (tmp_local, "space"))
             xmlparser_logprintf (xp->xp_parser, XCFG_WARNING, 200,
               "Unsupported 'xml:...' attribute, only 'xml:lang', 'xml:base' and 'xml:space' are supported" );
@@ -388,7 +598,7 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
           if (!strcmp (tmp_local, "about"))
             {
               caddr_t inner_subj;
-              if (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype)
+              if (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype)
                 {
                   xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute 'rdf:about' can not appear in element that is supposed to be property name");
                   return;
@@ -400,7 +610,7 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
           else if (!strcmp (tmp_local, "resource"))
             {
               caddr_t inner_subj;
-              if (XRL_PARSETYPE_PROPLIST != outer->xrl_parsetype)
+              if (!(XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype))
                 {
                   xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute 'rdf:resource' can appear only in element that is supposed to be property name");
                   return;
@@ -413,7 +623,7 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
             {
               caddr_t inner_subj = xp_rdfxml_bnode_iid (xp, box_dv_short_string (avalue));
               XRL_SET_NONINHERITABLE (inner, xrl_subject, inner_subj, "Attribute 'rdf:nodeID' conflicts with other attribute that set the subject");
-              if (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype)
+              if (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype)
                 {
                   inner->xrl_parsetype = XRL_PARSETYPE_EMPTYPROP;
                 }
@@ -424,7 +634,7 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
             }
           else if (!strcmp (tmp_local, "ID"))
             {
-              if (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype)
+              if (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype)
                 {
                   caddr_t reif_subj = xp_rdfxml_resolved_iid (xp, avalue, 1);
                   XRL_SET_NONINHERITABLE (inner, xrl_reification_id, reif_subj, "Reification ID of the statement is set twice by 'rdf:ID' attribute of a property element");
@@ -438,17 +648,17 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
             }
           else if (!strcmp (tmp_local, "datatype"))
             {
-              if (XRL_PARSETYPE_PROPLIST != outer->xrl_parsetype)
+              if (!(XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype))
                 {
                   xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute 'rdf:datatype' can appear only in property elements");
                   return;
                 }
-              XRL_SET_NONINHERITABLE (inner, xrl_datatype, xp_rdfxml_resolved_iid (xp, avalue, 0),  "Attribute 'rdf:datatype' us used twice");
+              XRL_SET_NONINHERITABLE (inner, xrl_datatype, xp_rdfxml_resolved_iid (xp, avalue, 0),  "Attribute 'rdf:datatype' is used twice");
               inner->xrl_parsetype = XRL_PARSETYPE_LITERAL;
             }
           else if (!strcmp (tmp_local, "parseType"))
             {
-              if (XRL_PARSETYPE_PROPLIST != outer->xrl_parsetype)
+              if (!(XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype))
                 {
                   xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute 'rdf:parseType' can appear only in property elements");
                   return;
@@ -457,15 +667,15 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
                 {
                   caddr_t inner_subj = xp_rdfxml_bnode_iid (xp, NULL);
                   XRL_SET_NONINHERITABLE (inner, xrl_subject, inner_subj, "Attribute parseType='Resource' can not be used if object is set by other attribute");
-                  inner->xrl_parsetype = XRL_PARSETYPE_PROPLIST;
+                  inner->xrl_parsetype = XRL_PARSETYPE_PROPLIST | XRL_PARSETYPE_SET_EXPLICITLY;
                 }
               else if (!strcmp (avalue, "Literal"))
                 {
-                  inner->xrl_parsetype = XRL_PARSETYPE_LITERAL;
+                  inner->xrl_parsetype = XRL_PARSETYPE_LITERAL | XRL_PARSETYPE_SET_EXPLICITLY;
                 }
               else if (!strcmp (avalue, "Collection"))
                 {
-                  inner->xrl_parsetype = XRL_PARSETYPE_COLLECTION;
+                  inner->xrl_parsetype = XRL_PARSETYPE_COLLECTION | XRL_PARSETYPE_SET_EXPLICITLY;
                   return;
                 }
               else
@@ -474,18 +684,21 @@ xp_rdfxml_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata
                   return;
                 }
             }
-	  else if (!strcmp (tmp_local, "type"))
-	    {
-              goto push_inner_attr_prop; /* see below */
-	    }
-	  else if (!strcmp (tmp_local, "value"))
-	    {
+          else if (!strcmp (tmp_local, "type"))
+            {
+              dk_set_push (&inner_attr_props, avalue);
+              dk_set_push (&inner_attr_props, ((caddr_t)((ptrlong)'T')));
+              inner->xrl_parsetype = XRL_PARSETYPE_PROPLIST;
+              continue;
+            }
+          else if (!strcmp (tmp_local, "value"))
+            {
 #ifdef RECOVER_RDF_VALUE
-	      rdf_val = avalue;
+              rdf_val = avalue;
 #else
               goto push_inner_attr_prop; /* see below */
 #endif
-	    }
+            }
           else
             {
               xmlparser_logprintf (xp->xp_parser, XCFG_WARNING, 200,
@@ -516,30 +729,27 @@ push_inner_attr_prop:
     }
   if ((NULL != inner->xrl_subject) || (NULL != inner_attr_props))
     {
-      if (XRL_PARSETYPE_LITERAL == inner->xrl_parsetype)
+      if (XRL_PARSETYPE_LITERAL & inner->xrl_parsetype)
         {
           xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 200,
             "Conflicting attributes: property value can not be a node and a literal simultaneously" );
           return;
         }
     }
-/*  if ((XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype) && (NULL != outer->xrl_subject))
-    XRL_SET_NONINHERITABLE (inner, xrl_subject, box_copy_tree (outer->xrl_subject));
-*/
   if (NULL == inner->xrl_subject)
     {
       if ((NULL != inner_attr_props) || (NULL != subj_type) ||
 #ifdef RECOVER_RDF_VALUE
         (NULL != rdf_val) ||
 #endif
-        (XRL_PARSETYPE_PROPLIST == inner->xrl_parsetype) )
+        (XRL_PARSETYPE_PROPLIST & inner->xrl_parsetype) )
         {
           caddr_t inner_subj = xp_rdfxml_bnode_iid (xp, NULL);
           XRL_SET_NONINHERITABLE (inner, xrl_subject, inner_subj, "Blank node object can not be defined here");
           inner->xrl_parsetype = XRL_PARSETYPE_PROPLIST;
         }
     }
-  if ((XRL_PARSETYPE_PROPLIST == inner->xrl_parsetype) && (NULL != outer->xrl_predicate))
+  if ((XRL_PARSETYPE_PROPLIST & inner->xrl_parsetype) && (NULL != outer->xrl_predicate))
     XRL_SET_NONINHERITABLE (outer, xrl_subject, box_copy_tree (inner->xrl_subject), "A property can not have two object values");
   if (NULL != subj_type)
     xp_rdfxml_triple (xp, inner->xrl_subject, uname_rdf_ns_uri_type, subj_type);
@@ -561,6 +771,12 @@ push_inner_attr_prop:
       size_t l1, l2;
       caddr_t aname, avalue;
       tmp_nsuri = dk_set_pop (&inner_attr_props);
+      if (!IS_BOX_POINTER (tmp_nsuri))
+        {
+          avalue = dk_set_pop (&inner_attr_props);
+          xp_rdfxml_triple (xp, inner->xrl_subject, uname_rdf_ns_uri_type, avalue);
+          continue;
+        }
       tmp_local = dk_set_pop (&inner_attr_props);
       avalue = dk_set_pop (&inner_attr_props);
       l1 = strlen (tmp_nsuri);
@@ -568,11 +784,11 @@ push_inner_attr_prop:
       xp->xp_boxed_name = aname = dk_alloc_box (l1 + l2 + 1, DV_STRING);
       memcpy (aname, tmp_nsuri, l1);
       strcpy (aname + l1, tmp_local);
-      xp_rdfxml_triple_l (xp, inner->xrl_subject, aname, avalue, NULL, NULL);
+      xp_rdfxml_triple_l (xp, inner->xrl_subject, aname, avalue, NULL, inner->xrl_language);
       dk_free_box (aname);
       xp->xp_boxed_name = NULL;
     }
-  if ((XRL_PARSETYPE_PROPLIST == inner->xrl_parsetype) && (XRL_PARSETYPE_PROPLIST == outer->xrl_parsetype))
+  if ((XRL_PARSETYPE_PROPLIST & inner->xrl_parsetype) && (XRL_PARSETYPE_PROPLIST & outer->xrl_parsetype))
     { /* This means parseType="Resource". It should be handled immediately to prevent error in case of parseType="Resource" nested inside inner. */
       xp_rdfxml_triple (xp, outer->xrl_subject, inner->xrl_predicate, inner->xrl_subject);
       if (NULL != inner->xrl_reification_id)
@@ -593,12 +809,12 @@ xp_rdfxml_element_end (void *userdata, const char * name)
 {
   xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
   xp_rdfxml_locals_t *inner = xp->xp_rdfxml_locals;
-  if (XRL_PARSETYPE_LITERAL != inner->xrl_parsetype)
+  if (!(XRL_PARSETYPE_LITERAL & inner->xrl_parsetype))
     {
       xp_node_t *current_node = xp->xp_current;
       xp_node_t *parent_node = xp->xp_current->xn_parent;
       xp_rdfxml_locals_t *outer = inner->xrl_parent;
-      if ((NULL != outer) && (XRL_PARSETYPE_COLLECTION == outer->xrl_parsetype))
+      if ((NULL != outer) && (XRL_PARSETYPE_COLLECTION & outer->xrl_parsetype))
         {
           xp_rdfxml_locals_t *outer = inner->xrl_parent;
           caddr_t subj;
@@ -611,7 +827,7 @@ xp_rdfxml_element_end (void *userdata, const char * name)
             }
           dk_set_push (&(outer->xrl_seq_items), subj);
         }
-      else if (XRL_PARSETYPE_COLLECTION == inner->xrl_parsetype)
+      else if (XRL_PARSETYPE_COLLECTION & inner->xrl_parsetype)
         {
           caddr_t tail = uname_rdf_ns_uri_nil;
           while (NULL != inner->xrl_seq_items)
@@ -628,15 +844,31 @@ xp_rdfxml_element_end (void *userdata, const char * name)
       else if (NULL != inner->xrl_predicate)
         {
           xp_rdfxml_locals_t *outer = inner->xrl_parent;
-          if (NULL == inner->xrl_subject)
-            inner->xrl_subject = xp_rdfxml_bnode_iid (xp, NULL);
-          xp_rdfxml_triple (xp, outer->xrl_subject, inner->xrl_predicate, inner->xrl_subject);
-          if (NULL != inner->xrl_reification_id)
+          if ((NULL == inner->xrl_subject) && (XRL_PARSETYPE_RES_OR_LIT & inner->xrl_parsetype))
+            {
+              caddr_t obj = box_dv_short_string ("");
+              xp_rdfxml_triple_l (xp, inner->xrl_parent->xrl_subject, inner->xrl_predicate, obj, inner->xrl_datatype, inner->xrl_language);
+              if (NULL != inner->xrl_reification_id)
+                {
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_subject, outer->xrl_subject);
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_predicate, inner->xrl_predicate);
+                  xp_rdfxml_triple_l (xp, inner->xrl_reification_id, uname_rdf_ns_uri_object, obj, inner->xrl_datatype, inner->xrl_language);
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_type, uname_rdf_ns_uri_Statement);
+                }
+              dk_free_tree (obj);
+            }
+          else
             {
-              xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_subject, outer->xrl_subject);
-              xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_predicate, inner->xrl_predicate);
-              xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_object, inner->xrl_subject);
-              xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_type, uname_rdf_ns_uri_Statement);
+              if (NULL == inner->xrl_subject)
+                inner->xrl_subject = xp_rdfxml_bnode_iid (xp, NULL);
+              xp_rdfxml_triple (xp, outer->xrl_subject, inner->xrl_predicate, inner->xrl_subject);
+              if (NULL != inner->xrl_reification_id)
+                {
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_subject, outer->xrl_subject);
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_predicate, inner->xrl_predicate);
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_object, inner->xrl_subject);
+                  xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_type, uname_rdf_ns_uri_Statement);
+                }
             }
         }
       if (0 != strses_length (xp->xp_strses))
@@ -654,12 +886,15 @@ xp_rdfxml_element_end (void *userdata, const char * name)
     {
       xp_node_t * current_node = xp->xp_current;
       xp_node_t * parent_node = xp->xp_current->xn_parent;
+      xp_rdfxml_locals_t *outer = inner->xrl_parent;
+      caddr_t lang_in_effect;
       caddr_t obj;
       xml_tree_ent_t *literal_xte;
-      if (NULL == xp->xp_current->xn_children)
+      if ((NULL == xp->xp_current->xn_children) && !(XRL_PARSETYPE_SET_EXPLICITLY & inner->xrl_parsetype))
         {
           obj = strses_string (xp->xp_strses);
           strses_flush (xp->xp_strses);
+          lang_in_effect = inner->xrl_language;
         }
       else
         {
@@ -673,12 +908,20 @@ xp_rdfxml_element_end (void *userdata, const char * name)
           literal_tree = list_to_array (children);
           literal_xte = xte_from_tree (literal_tree, xp->xp_qi);
           obj = (caddr_t) literal_xte;
+          lang_in_effect = NULL;
         }
       dk_free_tree (current_node->xn_attrs);
       xp->xp_current = parent_node;
       current_node->xn_parent = xp->xp_free_list;
       xp->xp_free_list = current_node;
-      xp_rdfxml_triple_l (xp, inner->xrl_parent->xrl_subject, inner->xrl_predicate, obj, inner->xrl_datatype, inner->xrl_language);
+      xp_rdfxml_triple_l (xp, outer->xrl_subject, inner->xrl_predicate, obj, inner->xrl_datatype, lang_in_effect);
+      if (NULL != inner->xrl_reification_id)
+        {
+          xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_subject, outer->xrl_subject);
+          xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_predicate, inner->xrl_predicate);
+          xp_rdfxml_triple_l (xp, inner->xrl_reification_id, uname_rdf_ns_uri_object, obj, inner->xrl_datatype, lang_in_effect);
+          xp_rdfxml_triple (xp, inner->xrl_reification_id, uname_rdf_ns_uri_type, uname_rdf_ns_uri_Statement);
+        }
       dk_free_tree (obj);
       xp_pop_rdf_locals (xp);
       return;
@@ -690,8 +933,8 @@ xp_rdfxml_element_end (void *userdata, const char * name)
 void
 xp_rdfxml_id (void *userdata, char * name)
 {
-  xparse_ctx_t * xp = (xparse_ctx_t*) userdata;
-  if (XRL_PARSETYPE_LITERAL == xp->xp_rdfxml_locals->xrl_parsetype)
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
+  if (XRL_PARSETYPE_LITERAL & xp->xp_rdfxml_locals->xrl_parsetype)
     xp_id (userdata, name);
 }
 
@@ -700,7 +943,7 @@ void
 xp_rdfxml_character (vxml_parser_t * parser,  char * s, int len)
 {
   xparse_ctx_t *xp = (xparse_ctx_t *) parser;
-  switch (xp->xp_rdfxml_locals->xrl_parsetype)
+  switch (xp->xp_rdfxml_locals->xrl_parsetype & (XRL_PARSETYPE_LITERAL | XRL_PARSETYPE_RES_OR_LIT))
     {
     case XRL_PARSETYPE_LITERAL:
       session_buffered_write (xp->xp_strses, s, len);
@@ -735,7 +978,7 @@ void
 xp_rdfxml_entity (vxml_parser_t * parser, const char * refname, int reflen, int isparam, const xml_def_4_entity_t *edef)
 {
   xparse_ctx_t *xp = (xparse_ctx_t *) parser;
-  switch (xp->xp_rdfxml_locals->xrl_parsetype)
+  switch (xp->xp_rdfxml_locals->xrl_parsetype & (XRL_PARSETYPE_LITERAL | XRL_PARSETYPE_RES_OR_LIT))
     {
     case XRL_PARSETYPE_LITERAL:
       xp_entity (parser, refname, reflen, isparam, edef);
@@ -754,7 +997,7 @@ void
 xp_rdfxml_pi (vxml_parser_t * parser, const char *target, const char *data)
 {
   xparse_ctx_t *xp = (xparse_ctx_t *) parser;
-  switch (xp->xp_rdfxml_locals->xrl_parsetype)
+  switch (xp->xp_rdfxml_locals->xrl_parsetype & (XRL_PARSETYPE_LITERAL | XRL_PARSETYPE_TOP_LEVEL | XRL_PARSETYPE_RES_OR_LIT))
     {
     case XRL_PARSETYPE_LITERAL:
       xp_pi (parser, target, data);
@@ -766,7 +1009,7 @@ xp_rdfxml_pi (vxml_parser_t * parser, const char *target, const char *data)
       xp_pi (parser, target, data);
       break;
     default:
-      xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Processing instruction found instead of XML element");
+      xmlparser_logprintf (xp->xp_parser, XCFG_WARNING, 100, "Processing instruction found instead of XML element");
       break;
     }
 }
@@ -853,7 +1096,22 @@ xp_rdfa_expand_name (xp_node_t * xn, const char *name, const char *colon, int us
       ctx_xn = ctx_xn->xn_parent;
     }
   if (0 != ns_len)
-    return NULL; /* error: undefined namespace prefix */
+    {
+      if (NULL != colon)
+        {
+          caddr_t pref = box_dv_short_nchars (name, ns_len);
+          caddr_t ns_uri = xml_get_ns_uri (xn->xn_xp->xp_qi->qi_client, pref, ~0, 0);
+          dk_free_box (pref);
+          if (NULL != ns_uri)
+            {
+              relative = box_dv_short_strconcat (ns_uri, local);
+              dk_free_box (ns_uri);
+              goto relative_is_set; /* see below */
+            }
+          dk_free_box (ns_uri);
+        }
+      return NULL; /* error: undefined namespace prefix */
+    }
   relative = box_dv_short_string (name);
 
 relative_is_set:
@@ -861,31 +1119,30 @@ relative_is_set:
   return relative;
 }
 
-int
-rdfa_attribute_code (const char *name)
-{
-  static void *names[] = {
-    "about"		, (void *)((ptrlong)RDFA_ATTR_ABOUT)	,
-    "content"		, (void *)((ptrlong)RDFA_ATTR_CONTENT)	,
-    "datatype"		, (void *)((ptrlong)RDFA_ATTR_DATATYPE)	,
-    "href"		, (void *)((ptrlong)RDFA_ATTR_HREF)	,
-    "property"		, (void *)((ptrlong)RDFA_ATTR_PROPERTY)	,
-    "rel"		, (void *)((ptrlong)RDFA_ATTR_REL)	,
-    "resource"		, (void *)((ptrlong)RDFA_ATTR_RESOURCE)	,
-    "rev"		, (void *)((ptrlong)RDFA_ATTR_REV)	,
-    "src"		, (void *)((ptrlong)RDFA_ATTR_SRC)	,
-    "typeof"		, (void *)((ptrlong)RDFA_ATTR_TYPEOF)	,
-    "xml:base"		, (void *)((ptrlong)RDFA_ATTR_XML_BASE)	,
-    "xml:lang"		, (void *)((ptrlong)RDFA_ATTR_XML_LANG)	};
-  int pos = ecm_find_name (name, names, sizeof (names)/(2 * sizeof(void *)), 2 * sizeof(void *));
-  if (ECM_MEM_NOT_FOUND == pos)
-    return 0;
-  return ((ptrlong *)names) [2 * pos + 1];
-}
+
+const char *rdfa_attribute_names[COUNTOF__RDFA_ATTR] = {
+    "about"	,
+    "content"	,
+    "datatype"	,
+    "href"	,
+    "prefix"	,
+    "profile"	,
+    "property"	,
+    "rel"	,
+    "resource"	,
+    "rev"	,
+    "src"	,
+    "typeof"	,
+    "vocab"	,
+    "xml:base"	,
+    "xml:lang"	};
+
 
 caddr_t
 rdfa_rel_rev_value_is_reserved (const char *val)
 {
+  char buf[15];
+  int ctr, pos;
   static void *vals[] = {
     "alternate"		, &uname_xhv_ns_uri_alternate	,
     "appendix"		, &uname_xhv_ns_uri_appendix	,
@@ -912,26 +1169,36 @@ rdfa_rel_rev_value_is_reserved (const char *val)
     "subsection"	, &uname_xhv_ns_uri_subsection	,
     "top"		, &uname_xhv_ns_uri_start	, /* NOT uname_xhv_ns_uri_top, because "top" is synonym for "start", see sect. 9.3. of "RDFa in XHTML:Syntax and Processing" */
     "up"		, &uname_xhv_ns_uri_up		};
-  int pos = ecm_find_name (val, vals, sizeof (vals)/(2 * sizeof(void *)), 2 * sizeof(void *));
+  for (ctr = 0; '\0' != val[ctr]; ctr++)
+    {
+      if ((sizeof (buf)-1) <= ctr)
+        return NULL; /* The buffer is long enough to fit all known strings, overflow means mismatch */
+      buf[ctr] = tolower (val[ctr]);
+    }
+  buf[ctr] = '\0';
+  pos = ecm_find_name (buf, vals, sizeof (vals)/(2 * sizeof(void *)), 2 * sizeof(void *));
   if (ECM_MEM_NOT_FOUND == pos)
     return NULL;
   return ((caddr_t **)vals) [2 * pos + 1][0];
 }
 
-#define RDFA_ATTRSYNTAX_URI			0x01
-#define RDFA_ATTRSYNTAX_SAFECURIE		0x02
-#define RDFA_ATTRSYNTAX_CURIE			0x04
-#define RDFA_ATTRSYNTAX_REL_REV_RESERVED	0x08
-#define RDFA_ATTRSYNTAX_WS_LIST			0x10
-#define RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE	0x20
-#define RDFA_ATTRSYNTAX_EMPTY_MEANS_XSD_STRING	0x40
+#define RDFA_ATTRSYNTAX_TERM			0x0001
+#define RDFA_ATTRSYNTAX_URI			0x0002
+#define RDFA_ATTRSYNTAX_SAFECURIE		0x0004
+#define RDFA_ATTRSYNTAX_CURIE			0x0008
+#define RDFA_ATTRSYNTAX_REL_REV_RESERVED	0x0010
+#define RDFA_ATTRSYNTAX_WS_LIST			0x0020
+#define RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE	0x0040
+#define RDFA_ATTRSYNTAX_EMPTY_MEANS_XSD_STRING	0x0080
+#define RDFA_ATTRSYNTAX_DIRTY_HREF		0x0100
 
 caddr_t
-xp_rdfa_parse_attr_value (xparse_ctx_t *xp, xp_node_t * xn, char *attrname, char *attrvalue, int allowed_syntax, caddr_t **values_ret, int *values_count_ret)
+xp_rdfa_parse_attr_value (xparse_ctx_t *xp, xp_node_t * xn, int attr_id, char **attrvalues, int allowed_syntax, caddr_t **values_ret, int *values_count_ret)
 {
+  char *attrvalue = attrvalues[attr_id];
   char *tail = attrvalue;
   char *token_start, *token_end;
-  int curie_is_safe;
+  int token_syntax;
   char *curie_colon;
   caddr_t /*base = NULL,*/ expanded_token = NULL;
   int values_count, expanded_token_not_saved = 0;
@@ -962,7 +1229,8 @@ next_token:
   else if (isspace (tail[0]))
     {
       free_unsaved_token();
-      xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Whitespaces are not allowed for attribute %.20s", attrname);
+      xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Whitespaces are not allowed for attribute %.20s", rdfa_attribute_names[attr_id]);
+      return expanded_token;
     }
   if ('\0' == tail[0])
     {
@@ -971,7 +1239,7 @@ next_token:
           if (RDFA_ATTRSYNTAX_WS_LIST & allowed_syntax)
             return NULL;
           if (!((RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE | RDFA_ATTRSYNTAX_EMPTY_MEANS_XSD_STRING) & allowed_syntax))
-            xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Empty value is not allowed for attribute %.20s", attrname);
+            xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Empty value is not allowed for attribute %.20s", rdfa_attribute_names[attr_id]);
           expanded_token = (RDFA_ATTRSYNTAX_EMPTY_MEANS_XSD_STRING & allowed_syntax) ? uname_xmlschema_ns_uri_hash_string : uname___empty;
           if (NULL != values_ret)
             { /* I expect that zero length buffer is never passed */
@@ -989,52 +1257,100 @@ next_token:
   if ((1 == values_count) && !(RDFA_ATTRSYNTAX_WS_LIST & allowed_syntax))
     {
       free_unsaved_token();
-      xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Multiple values are not allowed for attribute %.20s", attrname);
+      xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Multiple values are not allowed for attribute %.20s", rdfa_attribute_names[attr_id]);
       if (NULL != values_count_ret)
         values_count_ret[0] = values_count;
-      return expanded_token;
+      return NULL;
     }
-  curie_is_safe = 0;
+  token_syntax = allowed_syntax & (RDFA_ATTRSYNTAX_TERM | RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI);
   if ('[' == tail[0])
     {
       if (!(RDFA_ATTRSYNTAX_SAFECURIE & allowed_syntax))
         {
           free_unsaved_token();
-          xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "\"Safe CURIE\" syntax is not allowed for attribute \"%.20s\", ignored", attrname);
+          xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "\"Safe CURIE\" syntax is not allowed for attribute \"%.20s\", ignored", rdfa_attribute_names[attr_id]);
+          return NULL;
         }
-      curie_is_safe = 1;
+      token_syntax = RDFA_ATTRSYNTAX_SAFECURIE;
       tail++;
     }
+  else if (':' == tail[0])
+    {
+      token_syntax &= ~(RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_TERM);
+      if (0 == token_syntax)
+        {
+          free_unsaved_token();
+          xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "The token value should start with a letter or underscore in attribute \"%.20s\", ignored", rdfa_attribute_names[attr_id]);
+          return NULL;
+        }
+    }
+  else if (!(isalpha (tail[0]) || ('_' == tail[0]) || (tail[0] & ~0x7F) || (':' == tail[0])))
+    {
+      token_syntax &= ~(RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_TERM);
+      if (0 == token_syntax)
+        {
+          free_unsaved_token();
+          xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "The token value should start with a letter, colon or underscore in attribute \"%.20s\", ignored", rdfa_attribute_names[attr_id]);
+          return NULL;
+        }
+    }
   else
-    curie_is_safe = 0;
+    token_syntax &= ~RDFA_ATTRSYNTAX_SAFECURIE;
   token_start = tail;
   curie_colon = NULL;
-  if ((RDFA_ATTRSYNTAX_CURIE & allowed_syntax) || (curie_is_safe && (RDFA_ATTRSYNTAX_SAFECURIE & allowed_syntax)))
+  if ((RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_TERM) & token_syntax)
     {
-      while (('\0' != tail[0]) && ('[' != tail[0]) && (']' != tail[0]) && (':' != tail[0]) && !isspace(tail[0])) tail++;
+      while (isalnum (tail[0]) || ('_' == tail[0]) || (tail[0] & ~0x7F)) tail++;
       if (':' == tail[0])
         {
           curie_colon = tail;
           tail++;
-          while (('\0' != tail[0]) && (']' != tail[0]) && !isspace(tail[0])) tail++;
+          token_syntax &= ~RDFA_ATTRSYNTAX_TERM;
+          if (0 == token_syntax)
+            {
+              free_unsaved_token();
+              xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "The value of attribute \"%.20s\" contains a token that is not a valid NCName, ignored", rdfa_attribute_names[attr_id]);
+              return NULL;
+            }
         }
-      else
-        { /* A CURIE without colon should be silently skipped, with two exceptions */
-          if (curie_is_safe && (']' == tail[0]))
+      if (token_syntax & (RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI))
+        while (('\0' != tail[0]) && (']' != tail[0]) && !isspace(tail[0])) tail++;
+    }
+  else if (RDFA_ATTRSYNTAX_DIRTY_HREF & token_syntax)
+    {
+      int lpar_found = 0;
+      int qmark_found = 0;
+      while ('\0' != tail[0])
+        {
+          if ('?' == tail[0])
+            qmark_found = 1;
+          else if (('[' == tail[0]) || (']' == tail[0]))
             {
-              if (tail != token_start)
-                {
-                   tail++;
-                   goto next_token; /* see above */
-                }
+              if (!lpar_found && strchr (tail, '('))
+                lpar_found = 1;                         /* 012345678901 */
+              if (!qmark_found && !lpar_found && strncmp ("javascript:", attrvalue, 11))
+                break;
+              else
+                allowed_syntax |= ~RDFA_ATTRSYNTAX_WS_LIST;
+            }
+          else if ('(' == tail[0])
+            lpar_found = 1;
+          else if (isspace(tail[0]))
+            {
+              if (RDFA_ATTRSYNTAX_WS_LIST & allowed_syntax)
+                break;
+              if (!lpar_found && strchr (tail, '('))
+                lpar_found = 1;         /* 012345678901 */
+              if (!lpar_found && strncmp ("javascript:", attrvalue, 11))
+                break;
             }
-          else if (!curie_is_safe && !(RDFA_ATTRSYNTAX_REL_REV_RESERVED & allowed_syntax) && (('\0' == tail[0]) || isspace(tail[0])))
-            goto next_token; /* see above */
+          tail++;
         }
     }
   else
     {
-      while (('\0' != tail[0]) && ('[' != tail[0]) && (']' != tail[0]) && !isspace(tail[0])) tail++;
+      while (('\0' != tail[0]) && ('[' != tail[0]) && (']' != tail[0]) && !isspace(tail[0]))
+        tail++;
     }
   token_end = tail;
   switch (tail[0])
@@ -1042,31 +1358,31 @@ next_token:
     case '[':
       free_unsaved_token();
       xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100,
-        (curie_is_safe ?
+        ((RDFA_ATTRSYNTAX_SAFECURIE & token_syntax) ?
           "Unterminated \"safe CURIE\" before '[' in the value of attribute \"%.20s\"" :
           "Character '[' is not allowed inside token in the value of attribute \"%.20s\"" ),
-        attrname );
+        rdfa_attribute_names[attr_id] );
       tail = "";
       break;
     case ']':
-      if (curie_is_safe)
+      if (RDFA_ATTRSYNTAX_SAFECURIE & token_syntax)
         tail++;
       else
         {
           free_unsaved_token();
           xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100,
             "Unexpected character ']' in the value of attribute \"%.20s\"",
-            attrname );
+            rdfa_attribute_names[attr_id] );
           tail = "";
         }
       break;
     default:
-      if (curie_is_safe)
+      if (RDFA_ATTRSYNTAX_SAFECURIE & token_syntax)
         {
           free_unsaved_token();
           xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100,
             "No closing ']' found at the end of \"safe CURIE\" in the value of attribute \"%.20s\"",
-            attrname );
+            rdfa_attribute_names[attr_id] );
           tail = "";
         }
       break;
@@ -1104,24 +1420,69 @@ next_token:
         expanded_token = xp_rdfa_expand_name (xn, token_start, curie_colon, 1/*, base*/);
       token_end[0] = saved_token_delim;
       if (NULL == expanded_token)
-        xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100,
-          "Bad token in the value of attribute \"%.20s\" (undeclared namespace?)",
-          attrname );
+        {
+          if (RDFA_ATTRSYNTAX_URI & token_syntax)
+            expanded_token = box_dv_short_nchars (token_start, token_end-token_start);
+          else
+            {
+#ifndef NDEBUG
+              token_end[0] = '\0';
+              if (('_' == token_start[0]) && (curie_colon == token_start + 1))
+                expanded_token = tf_bnode_iid (xp->xp_tf, box_dv_short_nchars (token_start+2, token_end-(token_start+2)));
+              else if (curie_colon == token_start)
+                { /* Note that the default prefix mapping may differ from usage to usage, it is xhtml vocab namespace only for RDFa */
+                  expanded_token = box_dv_short_strconcat (uname_xhv_ns_uri, curie_colon+1);
+                }
+              else
+                expanded_token = xp_rdfa_expand_name (xn, token_start, curie_colon, 1/*, base*/);
+              token_end[0] = saved_token_delim;
+#endif
+              xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100,
+                "Bad token in the value of attribute \"%.20s\" (undeclared namespace?)",
+                rdfa_attribute_names[attr_id] );
+            }
+        }
     }
-  else if (RDFA_ATTRSYNTAX_REL_REV_RESERVED & allowed_syntax)
+  else if (RDFA_ATTRSYNTAX_TERM & allowed_syntax)
     {
+      xp_rdfa_locals_t *ancestor;
       char saved_token_delim = token_end[0];
       token_end[0] = '\0';
-      expanded_token = rdfa_rel_rev_value_is_reserved (token_start);
+      expanded_token = NULL;
+      for (ancestor = xp->xp_rdfa_locals; NULL != ancestor; ancestor = ancestor->xrdfal_parent)
+        {
+          caddr_t *pterms = ancestor->xrdfal_profile_terms;
+          int pos;
+          if (NULL == pterms)
+            break;
+          pos = ecm_find_name (token_start, pterms, BOX_ELEMENTS (pterms) / 2, 2*sizeof (caddr_t));
+          if (ECM_MEM_NOT_FOUND == pos)
+            continue;
+          expanded_token = box_copy (pterms[pos * 2 + 1]);
+          break;
+        }
+      if (NULL == expanded_token)
+        {
+          if ((RDFA_ATTRSYNTAX_REL_REV_RESERVED & allowed_syntax) ||
+            ((NULL != xp->xp_rdfa_locals) && (RDFA_IN_HTML & xp->xp_rdfa_locals->xrdfal_place_bits)) )
+            expanded_token = rdfa_rel_rev_value_is_reserved (token_start);
+        }
+      if (NULL == expanded_token)
+        {
+          if ((NULL != xp->xp_rdfa_locals) && (NULL != xp->xp_rdfa_locals->xrdfal_vocab))
+            expanded_token = box_dv_short_strconcat (xp->xp_rdfa_locals->xrdfal_vocab, token_start);
+        }
       token_end[0] = saved_token_delim;
       if (NULL == expanded_token)
+        {
 #if 1
-        goto next_token; /* see above */
+          goto next_token; /* see above */
 #else
-        expanded_token = box_dv_short_nchars (token_start, token_end-token_start);
+          expanded_token = box_dv_short_nchars (token_start, token_end-token_start);
 #endif
+        }
     }
-  else if (curie_is_safe && (token_end == token_start))
+  else if ((RDFA_ATTRSYNTAX_SAFECURIE & token_syntax) && (token_end == token_start))
     {
       xp_rdfa_locals_t *ancestor = xp->xp_rdfa_locals;
       while ((NULL != ancestor) && (NULL == ancestor->xrdfal_subj))
@@ -1142,6 +1503,80 @@ next_token:
   goto next_token; /* see above */
 }
 
+
+void
+xp_rdfa_parse_prefix (xparse_ctx_t *xp, char *attrvalue, caddr_t **values_ret, int *values_count_ret)
+{
+  dk_set_t res = NULL;
+  int res_count = 0;
+  char *prefix_begin, *prefix_end, *nsuri_begin, *tail = attrvalue;
+  while ('\0' != tail[0])
+    {
+      while (('\0' != tail[0]) && isspace (tail[0])) tail++;
+      prefix_begin = tail;
+      if (!(isalpha (tail[0]) || ('_' == tail[0]) || (tail[0] & ~0x7F) || (':' == tail[0])))
+        goto err; /* see below */
+      while (isalnum (tail[0]) || ('_' == tail[0]) || (tail[0] & ~0x7F)) tail++;
+      prefix_end = tail;
+      if (':' != tail[0])
+        goto err; /* see below */
+      tail++;
+      while (('\0' != tail[0]) && isspace (tail[0])) tail++;
+      if ('\0' == tail[0])
+        goto err; /* see below */
+      nsuri_begin = tail;
+      while (('\0' != tail[0]) && !isspace (tail[0])) tail++;
+      dk_set_push (&res, box_dv_uname_nchars (prefix_begin, prefix_end - prefix_begin));
+      dk_set_push (&res, box_dv_uname_nchars (nsuri_begin, tail - nsuri_begin));
+      res_count += 2;
+    }
+  values_ret[0] = (caddr_t *)revlist_to_array (res);
+  values_count_ret[0] = res_count;
+  return;
+err:
+  while (NULL != res) dk_free_box (dk_set_pop (&res));
+  xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Attribute \"prefix\" should be well-formed list of namespace prefixe and URI pairs");
+}
+
+void
+xp_rdfa_parse_profile (xparse_ctx_t *xp, caddr_t *parsed_attrvalue, caddr_t **ns_dict_ret, caddr_t **term_dict_ret, caddr_t *vocab_ret, caddr_t *err_ret)
+{
+  client_connection_t *cli = xp->xp_qi->qi_client;
+static caddr_t full_profile_proc_name = NULL;
+static query_t *fetch_profile_qr = NULL;
+  caddr_t err = NULL;
+  char  params_buf [BOX_AUTO_OVERHEAD + sizeof (caddr_t) * 4];
+  caddr_t * params;
+  BOX_AUTO_TYPED (caddr_t *, params, params_buf, sizeof (caddr_t) * 4, DV_ARRAY_OF_POINTER);
+  ns_dict_ret[0] = NULL;
+  term_dict_ret[0] = NULL;
+  vocab_ret[0] = NULL;
+  err_ret[0] = NULL;
+  if (NULL == full_profile_proc_name)
+    full_profile_proc_name = sch_full_proc_name (wi_inst.wi_schema, "DB.DBA.RDF_RDFA11_FETCH_PROFILES", cli_qual (cli), CLI_OWNER (cli));
+  if (NULL == fetch_profile_qr)
+    fetch_profile_qr = sch_proc_def (wi_inst.wi_schema, full_profile_proc_name);
+  if (NULL == fetch_profile_qr)
+    sqlr_new_error ("42001", "SRxxx",
+        "RDFa 1.1 parser needs a procedure named \"%.100s\"", full_profile_proc_name);
+  if (fetch_profile_qr->qr_to_recompile)
+    {
+      fetch_profile_qr = qr_recompile (fetch_profile_qr, &err);
+      if (NULL != err)
+        sqlr_resignal (err);
+    }
+  params[0] = (caddr_t)parsed_attrvalue;
+  params[1] = (caddr_t)ns_dict_ret;
+  params[2] = (caddr_t)term_dict_ret;
+  params[3] = (caddr_t)vocab_ret;
+  err = qr_exec (cli, fetch_profile_qr, xp->xp_qi, NULL, NULL, NULL, (caddr_t *)params, NULL, 0);
+  BOX_DONE (params, params_buf);
+  if (NULL != err)
+    err_ret[0] = err;
+}
+;
+
+
 void
 xp_pop_rdfa_locals (xparse_ctx_t *xp)
 {
@@ -1153,6 +1588,12 @@ xp_pop_rdfa_locals (xparse_ctx_t *xp)
   if ((NULL != inner->xrdfal_language) &&
     ((NULL == parent) || (inner->xrdfal_language != parent->xrdfal_language)) )
     dk_free_tree (inner->xrdfal_language);
+  if ((NULL != inner->xrdfal_vocab) &&
+    ((NULL == parent) || (inner->xrdfal_vocab != parent->xrdfal_vocab)) )
+    dk_free_tree (inner->xrdfal_vocab);
+  if ((NULL != inner->xrdfal_profile_terms) &&
+    ((NULL == parent) || (inner->xrdfal_profile_terms != parent->xrdfal_profile_terms)) )
+    dk_free_tree ((caddr_t)(inner->xrdfal_profile_terms));
   if ((NULL != inner->xrdfal_subj) &&
     ((NULL == parent) || ((inner->xrdfal_subj != parent->xrdfal_subj) && (inner->xrdfal_subj != parent->xrdfal_obj_res))) )
     dk_free_tree (inner->xrdfal_subj);
@@ -1198,6 +1639,13 @@ xp_push_rdfa_locals (xparse_ctx_t *xp)
   memset (inner, 0, sizeof (xp_rdfa_locals_t));
   inner->xrdfal_ict_buffer = reused_buf;
   inner->xrdfal_parent = outer;
+  if (outer)
+    {
+      inner->xrdfal_base = outer->xrdfal_base;
+      inner->xrdfal_language = outer->xrdfal_language;
+      inner->xrdfal_vocab = outer->xrdfal_vocab;
+      inner->xrdfal_profile_terms = outer->xrdfal_profile_terms;
+    }
   xp->xp_rdfa_locals = inner;
   return inner;
 }
@@ -1364,12 +1812,13 @@ rdfa_feed_or_make_ict (xparse_ctx_t *xp, xp_rdfa_locals_t *xrdfal, caddr_t left,
 void
 xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
 {
-  xparse_ctx_t * xp = (xparse_ctx_t*) userdata;
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
   xp_rdfa_locals_t *outer = xp->xp_rdfa_locals;
   xp_rdfa_locals_t *inner = NULL; /* This is not allocated at all if there's nothing "interesting" in the tag */
   xp_tmp_t *xpt = xp->xp_tmp;
   xp_node_t *xn = xp->xp_current;
-  int inx, fill, n_attrs, n_ns, xn_is_allocated = 0;
+  caddr_t avalues[COUNTOF__RDFA_ATTR];
+  int acode, inx, fill, n_attrs, n_ns, xn_is_allocated = 0, inner_is_allocated = 0;
   char *local_name;
   int rel_rev_attrcount = 0, rel_pred_count = 0, rev_pred_count = 0, prop_pred_count = 0, typeof_count = 0;
   int src_prio = 0xff; /* 1 for "about", 2 for "src" */
@@ -1378,7 +1827,7 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
   int inner_place_bits = outer_place_bits; /* Place bits are first inherited, then changed (OR-ed) */
   int need_rdfa_local = 0, parent_obj_should_be_set = 0;
   int ctr;
-  caddr_t subj;
+  caddr_t subj, bnode_subj = NULL;
 #ifdef RDFXML_DEBUG
   if (xpt->xpt_base || xpt->xpt_dt || xpt->xpt_lang || xpt->xpt_obj_content || xpt->xpt_obj_res || xpt->xpt_src || xpt->xpt_href)
     GPF_T1("xp_" "rdfa_element(): nonempty xpt");
@@ -1461,7 +1910,7 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
           need_rdfa_local = 1;
         }
     }
-  if (!strcmp (local_name, "html"))
+  if (!strcmp (local_name, "html") || !strcmp (local_name, "xhtml"))
     {
       if (RDFA_IN_HTML & outer_place_bits)
         xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Element \"html\" can not appear inside other \"html\" element");
@@ -1470,119 +1919,214 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
       need_rdfa_local = 1;
     }
   n_attrs = attrdata->local_attrs_count;
+  memset (avalues, 0, sizeof (avalues));
+  if (0 == n_attrs)
+    goto all_attributes_are_retrieved; /* see below */
   for (inx = 0; inx < n_attrs; inx ++)
     {
       char *raw_aname = attrdata->local_attrs[inx].ta_raw_name.lm_memblock;
-      caddr_t avalue;
-      int acode = rdfa_attribute_code (raw_aname);
-      if (!acode)
+      acode = ecm_find_name (raw_aname, rdfa_attribute_names, sizeof (rdfa_attribute_names)/sizeof(char *), sizeof(char *));
+      if (0 > acode)
         continue;
       need_rdfa_local = 1;
-      avalue = attrdata->local_attrs[inx].ta_value;
-      switch (acode)
+      if (NULL != avalues[acode])
+        xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Duplicate attribute names in one element head");
+      avalues[acode] = attrdata->local_attrs[inx].ta_value;
+    }
+  if ((NULL != avalues[RDFA_ATTR_VOCAB]) || (NULL != avalues[RDFA_ATTR_PROFILE]) || (NULL != avalues[RDFA_ATTR_PREFIX]))
+    {
+      if (!xn_is_allocated)
         {
-        case RDFA_ATTR_ABOUT:
-          if (1 <= src_prio)
-            {
-              dk_free_tree (xpt->xpt_src);
-              xpt->xpt_src = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
-              xpt->xpt_src = xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-                RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
-                NULL, NULL );
-              src_prio = 1;
-            }
-          break;
-        case RDFA_ATTR_CONTENT:
-          xpt->xpt_obj_content = box_dv_short_string (avalue);
-          break;
-        case RDFA_ATTR_DATATYPE:
-          xpt->xpt_dt = xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-            RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
-            NULL, NULL );
-          break;
-        case RDFA_ATTR_HREF:
-          if (RDFA_IN_BASE & inner_place_bits)
-            {
-              dk_free_tree (xpt->xpt_href);
-              xpt->xpt_href = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
-              xpt->xpt_href = xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-                RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
-                NULL, NULL );
-              xp_rdfa_set_base (xp, outer, xpt->xpt_href);
-              xpt->xpt_href = NULL;
-              inner_place_bits |= RDFA_IN_UNUSED;
-            }
-          else if (4 <= href_prio)
+          xn = xp->xp_free_list;
+          xp->xp_free_list = xn->xn_parent;
+          memset (xn, 0, sizeof (xp_node_t));
+          xn->xn_xp = xp;
+          xn->xn_parent = xp->xp_current;
+          xp->xp_current = xn;
+          xn_is_allocated = 1;
+        }
+      if (!inner_is_allocated)
+        {
+          inner = xp_push_rdfa_locals (xp);
+          inner_is_allocated = 1;
+        }
+      if (NULL != avalues[RDFA_ATTR_VOCAB])
+        {
+          caddr_t vocab;
+          if ('\0' == avalues[RDFA_ATTR_VOCAB][0])
+            vocab = uname_xhv_ns_uri;
+          else
+            vocab = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_VOCAB, avalues, RDFA_ATTRSYNTAX_URI, NULL, NULL);
+          inner->xrdfal_vocab = vocab;
+        }
+      if (NULL != avalues[RDFA_ATTR_PROFILE])
+        {
+          caddr_t *profile_uris = NULL;
+          int profile_uri_count = 0;
+          caddr_t *ns_tokens;
+          caddr_t *term_tokens;
+          caddr_t vocab;
+          caddr_t err;
+          int ns_token_count;
+          caddr_t *new_ns;
+          int old_ns_boxlen;
+          xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_PROFILE, avalues,
+            RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE | RDFA_ATTRSYNTAX_WS_LIST,
+            &profile_uris, &profile_uri_count );
+          xp_rdfa_parse_profile (xp, profile_uris, &ns_tokens, &term_tokens, &vocab, &err);
+          old_ns_boxlen = ((NULL != xn->xn_namespaces) ? box_length (xn->xn_namespaces) : 0);
+          ns_token_count = BOX_ELEMENTS_0 (ns_tokens);
+          new_ns = (caddr_t*) dk_alloc_box (ns_token_count * sizeof (caddr_t) + old_ns_boxlen, DV_ARRAY_OF_POINTER);
+          memcpy (new_ns, ns_tokens, ns_token_count * sizeof (caddr_t));
+          if (old_ns_boxlen)
             {
-              dk_free_tree (xpt->xpt_href);
-              xpt->xpt_href = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
-              xpt->xpt_href = xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-                RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
-                NULL, NULL );
-              href_prio = 4;
+              memcpy (new_ns + ns_token_count, xn->xn_namespaces, old_ns_boxlen);
+              dk_free_box ((caddr_t)(xn->xn_namespaces));
             }
-          break;
-        case RDFA_ATTR_PROPERTY:
-          xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-            RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_WS_LIST,
-            &(xpt->xpt_prop_preds), &prop_pred_count );
-          break;
-        case RDFA_ATTR_REL:
-          xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-            RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_REL_REV_RESERVED | RDFA_ATTRSYNTAX_WS_LIST,
-            &(xpt->xpt_rel_preds), &rel_pred_count );
-          rel_rev_attrcount++;
-          break;
-        case RDFA_ATTR_RESOURCE:
-          if (3 <= href_prio)
+          xn->xn_attrs = xn->xn_namespaces = new_ns;
+          if (BOX_ELEMENTS_0 (term_tokens))
+            inner->xrdfal_profile_terms = term_tokens;
+          if ((DV_STRING == DV_TYPE_OF (vocab)) && (NULL == inner->xrdfal_vocab))
+            inner->xrdfal_vocab = vocab;
+          else
+            dk_free_box (vocab);
+          if (NULL != err)
             {
-              dk_free_tree (xpt->xpt_href);
-              xpt->xpt_href = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
-              xpt->xpt_href = xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-                RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
-                NULL, NULL );
-              href_prio = 3;
+              dk_free_tree (err);
+              inner->xrdfal_place_bits |= RDFA_IN_UNUSED;
+              return;
             }
-          break;
-        case RDFA_ATTR_REV:
-          xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-            RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_REL_REV_RESERVED | RDFA_ATTRSYNTAX_WS_LIST,
-            &(xpt->xpt_rev_preds), &rev_pred_count );
-          rel_rev_attrcount++;
-          break;
-        case RDFA_ATTR_SRC:
-          if (2 <= src_prio)
+        }
+      if (NULL != avalues[RDFA_ATTR_PREFIX])
+        {
+          caddr_t *ns_tokens = NULL;
+          int ns_token_count = 0;
+          caddr_t *new_ns;
+          int old_ns_boxlen;
+          xp_rdfa_parse_prefix (xp, avalues[RDFA_ATTR_PREFIX], &ns_tokens, &ns_token_count);
+          old_ns_boxlen = ((NULL != xn->xn_namespaces) ? box_length (xn->xn_namespaces) : 0);
+          new_ns = (caddr_t*) dk_alloc_box (ns_token_count * sizeof (caddr_t) + old_ns_boxlen, DV_ARRAY_OF_POINTER);
+          memcpy (new_ns, ns_tokens, ns_token_count * sizeof (caddr_t));
+          if (old_ns_boxlen)
             {
-              dk_free_tree (xpt->xpt_src);
-              xpt->xpt_src = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
-              xpt->xpt_src = xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-                RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
-                NULL, NULL );
-              src_prio = 2;
+              memcpy (new_ns + ns_token_count, xn->xn_namespaces, old_ns_boxlen);
+              dk_free_box ((caddr_t)(xn->xn_namespaces));
             }
-          break;
-        case RDFA_ATTR_TYPEOF:
-          xp_rdfa_parse_attr_value (xp, xn, raw_aname, avalue,
-            RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_WS_LIST,
-            &(xpt->xpt_typeofs), &typeof_count );
-          break;
-        case RDFA_ATTR_XML_BASE:
-          if (RDFA_IN_HTML & inner_place_bits)
-            break;
+          xn->xn_attrs = xn->xn_namespaces = new_ns;
+        }
+    }
+  if (NULL != avalues[RDFA_ATTR_ABOUT])
+    {
+      if (1 <= src_prio)
+        {
+          dk_free_tree (xpt->xpt_src);
+          xpt->xpt_src = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
+          xpt->xpt_src = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_ABOUT, avalues,
+            RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
+            NULL, NULL );
+          src_prio = 1;
+        }
+    }
+  if (NULL != avalues[RDFA_ATTR_CONTENT])
+    {
+      xpt->xpt_obj_content = box_dv_short_string (avalues[RDFA_ATTR_CONTENT]);
+    }
+  if (NULL != avalues[RDFA_ATTR_DATATYPE])
+    {
+      xpt->xpt_dt = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_DATATYPE, avalues,
+        RDFA_ATTRSYNTAX_TERM | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
+        NULL, NULL );
+    }
+  if (NULL != avalues[RDFA_ATTR_HREF])
+    {
+      if (RDFA_IN_BASE & inner_place_bits)
+        {
+          dk_free_tree (xpt->xpt_href);
+          xpt->xpt_href = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
+          xpt->xpt_href = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_HREF, avalues,
+            RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE | RDFA_ATTRSYNTAX_DIRTY_HREF,
+            NULL, NULL );
+          xp_rdfa_set_base (xp, outer, xpt->xpt_href);
+          xpt->xpt_href = NULL;
+          inner_place_bits |= RDFA_IN_UNUSED;
+        }
+      else if (4 <= href_prio)
+        {
+          dk_free_tree (xpt->xpt_href);
+          xpt->xpt_href = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
+          xpt->xpt_href = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_HREF, avalues,
+            RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE | RDFA_ATTRSYNTAX_DIRTY_HREF,
+            NULL, NULL );
+          href_prio = 4;
+        }
+    }
+  if (NULL != avalues[RDFA_ATTR_PROPERTY])
+    {
+      xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_PROPERTY, avalues,
+        RDFA_ATTRSYNTAX_TERM | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_WS_LIST,
+        &(xpt->xpt_prop_preds), &prop_pred_count );
+    }
+  if (NULL != avalues[RDFA_ATTR_REL])
+    {
+      xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_REL, avalues,
+        RDFA_ATTRSYNTAX_TERM | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_REL_REV_RESERVED | RDFA_ATTRSYNTAX_WS_LIST,
+        &(xpt->xpt_rel_preds), &rel_pred_count );
+      rel_rev_attrcount++;
+    }
+  if (NULL != avalues[RDFA_ATTR_RESOURCE])
+    {
+      if (3 <= href_prio)
+        {
+          dk_free_tree (xpt->xpt_href);
+          xpt->xpt_href = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
+          xpt->xpt_href = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_RESOURCE, avalues,
+            RDFA_ATTRSYNTAX_SAFECURIE | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
+            NULL, NULL );
+          href_prio = 3;
+        }
+    }
+  if (NULL != avalues[RDFA_ATTR_REV])
+    {
+      xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_REV, avalues,
+        RDFA_ATTRSYNTAX_TERM | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_REL_REV_RESERVED | RDFA_ATTRSYNTAX_WS_LIST,
+        &(xpt->xpt_rev_preds), &rev_pred_count );
+      rel_rev_attrcount++;
+    }
+  if (NULL != avalues[RDFA_ATTR_SRC])
+    {
+      if (2 <= src_prio)
+        {
+          dk_free_tree (xpt->xpt_src);
+          xpt->xpt_src = NULL; /* to avoid second delete of freed value in case of error inside xp_rdfa_parse_attr_value() */
+          xpt->xpt_src = xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_SRC, avalues,
+            RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_EMPTY_ACCEPTABLE,
+            NULL, NULL );
+          src_prio = 2;
+        }
+    }
+  if (NULL != avalues[RDFA_ATTR_TYPEOF])
+    {
+      xp_rdfa_parse_attr_value (xp, xn, RDFA_ATTR_TYPEOF, avalues,
+        RDFA_ATTRSYNTAX_TERM | RDFA_ATTRSYNTAX_CURIE | RDFA_ATTRSYNTAX_URI | RDFA_ATTRSYNTAX_WS_LIST,
+        &(xpt->xpt_typeofs), &typeof_count );
+    }
+  if (NULL != avalues[RDFA_ATTR_XML_BASE])
+    {
+      if (!(RDFA_IN_HTML & inner_place_bits))
+        {
           if (NULL != xpt->xpt_base)
             dk_free_tree (xpt->xpt_base);
-          xpt->xpt_base = box_dv_short_string (avalue);
-          break;
-        case RDFA_ATTR_XML_LANG:
-          if (NULL != xpt->xpt_lang)
-            dk_free_tree (xpt->xpt_lang);
-          xpt->xpt_lang = box_dv_short_string (avalue);
-          break;
-#ifdef RDFXML_DEBUG
-        default: GPF_T;
-#endif
+          xpt->xpt_base = box_dv_short_string (avalues[RDFA_ATTR_XML_BASE]);
         }
     }
+  if (NULL != avalues[RDFA_ATTR_XML_LANG])
+    {
+      if (NULL != xpt->xpt_lang)
+        dk_free_tree (xpt->xpt_lang);
+      xpt->xpt_lang = box_dv_short_string (avalues[RDFA_ATTR_XML_LANG]);
+    }
+
+all_attributes_are_retrieved:
 /* At this point, all attributes are retrieved. The rest is straightforward implementation of "Processing model" */
 /* Setting the [new subject] */
   for (;;)
@@ -1599,9 +2143,19 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
       if ((RDFA_IN_HTML & outer_place_bits) &&
         !((RDFA_IN_HEAD | RDFA_IN_BODY) & outer_place_bits) &&
         ((RDFA_IN_HEAD | RDFA_IN_BODY) & inner_place_bits) )
-        subj = uname___empty;
-      else if (0 != typeof_count)
-        subj = tf_bnode_iid (xp->xp_tf, NULL);
+        {
+          subj = uname___empty;
+          need_rdfa_local = 1;
+        }
+      else if (NULL != avalues[RDFA_ATTR_TYPEOF]) /* There was "if (0 != typeof_count)" here but that's wrong for typeof="" needed solely to make a bnode */
+	{
+	  bnode_subj = subj = tf_bnode_iid (xp->xp_tf, NULL);
+	}
+      else if (!(RDFA_IN_HTML & inner_place_bits) && (NULL == xn->xn_parent)) /*1104 */
+        {
+          subj = uname___empty;
+          need_rdfa_local = 1;
+        }
       break;
     }
   if (prop_pred_count)
@@ -1621,6 +2175,8 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
   if (!need_rdfa_local)
     {
       outer->xrdfal_boring_opened_elts++;
+      if (bnode_subj)
+	dk_free_box (bnode_subj);
       return;
     }
 /* There is something interesting so the stack should grow */
@@ -1633,7 +2189,8 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
       xn->xn_parent = xp->xp_current;
       xp->xp_current = xn;
     }
-  inner = xp_push_rdfa_locals (xp);
+  if (!inner_is_allocated)
+    inner = xp_push_rdfa_locals (xp);
 #ifdef DEBUG
   if (NULL != xp->xp_boxed_name)
     GPF_T1("Memory leak in xp->xp_boxed_name");
@@ -1645,8 +2202,6 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
       inner->xrdfal_base = xpt->xpt_base;
       xpt->xpt_base = NULL;
     }
-  else
-    inner->xrdfal_base = outer->xrdfal_base;
   if (NULL != subj)
     {
       inner->xrdfal_subj = subj;
@@ -1683,8 +2238,6 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
       inner->xrdfal_language = xpt->xpt_lang;
       xpt->xpt_lang = NULL;
     }
-  else
-    inner->xrdfal_language = outer->xrdfal_language;
   inner->xrdfal_boring_opened_elts = 0;
 #ifdef RDFXML_DEBUG
   if (inner->xrdfal_ict_count)
@@ -1741,7 +2294,9 @@ xp_rdfa_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
       caddr_t p = xpt->xpt_prop_preds[ctr];
       caddr_t val = xpt->xpt_obj_content;
       caddr_t dt = inner->xrdfal_datatype;
-      caddr_t lang = (NULL == dt) ? box_copy (inner->xrdfal_language) : NULL;
+      caddr_t lang = (((NULL == dt) || ('\0' == dt[0])) ? inner->xrdfal_language : NULL);
+      if (NULL != lang)
+        lang = (('\0' != lang[0]) ? box_copy (lang) : NULL);
       xpt->xpt_prop_preds[ctr] = NULL;
       if (0 < ctr)
         {
@@ -1815,6 +2370,7 @@ xp_rdfa_element_end (void *userdata, const char * name)
           literal_head = (caddr_t *)list (1, uname__root);
           children = CONS (literal_head, children);
           literal_tree = list_to_array (children);
+          current_node->xn_children = NULL;
           if (obj_use_count)
             {
               xml_tree_ent_t *literal_xte;
@@ -1918,7 +2474,7 @@ xp_rdfa_element_end (void *userdata, const char * name)
 void
 xp_rdfa_id (void *userdata, char * name)
 {
-  xparse_ctx_t * xp = (xparse_ctx_t*) userdata;
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
   xp_rdfa_locals_t *inner = xp->xp_rdfa_locals;
   if (RDFA_IN_XMLLITERAL & inner->xrdfal_place_bits)
     xp_id (userdata, name);
@@ -1964,22 +2520,972 @@ xp_rdfa_comment (void *userdata, const char *text)
     xp_comment (userdata, text);
 }
 
+/* Part 3. Microdata parser */
 
+const char *mdata_attribute_lognames[COUNTOF__MDATA_ATTR] = {
+  "meta content",	/* MDATA_ATTR_OBJ_CONTENT_STRLIT	0	*/
+  "datetime",		/* MDATA_ATTR_OBJ_DATETIME		1	*/
+  "literal content",	/* MDATA_ATTR_OBJ_STRLIT		2	*/
+  "cite",		/* MDATA_ATTR_OBJ_CITE			3	*/
+  "href/src/data",	/* MDATA_ATTR_OBJ_REF			4	*/
+  "name",		/* MDATA_ATTR_OBJ_NAME			5	*/
+  "id",			/* MDATA_ATTR_ID			6	*/
+  "itemid",		/* MDATA_ATTR_ITEMID			7	*/
+  "itemprop",		/* MDATA_ATTR_ITEMPROP			8	*/
+  "itemref",		/* MDATA_ATTR_ITEMREF			9	*/
+  "itemscope",		/* MDATA_ATTR_ITEMSCOPE			10	*/
+  "itemtype",		/* MDATA_ATTR_ITEMTYPE			11	*/
+  "rel",		/* MDATA_ATTR_REL			12	*/
+  "xml:base",		/* MDATA_ATTR_XML_BASE			13	*/
+  "xml:lang" };		/* MDATA_ATTR_XML_LANG			14	*/
 
-/* Part 3. Common parser invocation routine */
-
-void
-rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
-  int mode_bits, const char *source_name, caddr_t base_uri, caddr_t graph_uri,
-  ccaddr_t *cbk_names, caddr_t *app_env,
-  const char *enc, lang_handler_t *lh
-   /*, caddr_t dtd_config, dtd_t **ret_dtd,
-   id_hash_t **ret_id_cache, xml_ns_2dict_t *ret_ns_2dict*/ )
+int
+mdata_find_attr_idx (const char *attrname, const char *elname)
 {
-  int dtp_of_text = box_tag (text);
-  vxml_parser_config_t config;
-  vxml_parser_t * parser;
-  xparse_ctx_t context;
+  if (!strcmp (attrname, "href"))
+    {
+      if (!strcmp (elname, "a") || !strcmp (elname, "link") || !strcmp (elname, "area"))
+        return MDATA_ATTR_OBJ_REF;
+      return -1;
+    }
+  if (!strcmp (attrname, "src"))
+    {
+      if (!strcmp (elname, "img") || !strcmp (elname, "iframe") || !strcmp (elname, "audio")
+        || !strcmp (elname, "embed") || !strcmp (elname, "source") || !strcmp (elname, "track") || !strcmp (elname, "video"))
+        return MDATA_ATTR_OBJ_REF;
+      return -1;
+    }
+  if (!strcmp (attrname, "data"))
+    {
+      if (!strcmp (elname, "object"))
+        return MDATA_ATTR_OBJ_REF;
+      return -1;
+    }
+  if (!strcmp (attrname, "content"))
+    {
+      if (!strcmp (elname, "meta"))
+        return MDATA_ATTR_OBJ_CONTENT_STRLIT;
+      return -2;
+    }
+  if (!strcmp (attrname, "cite"))
+    {
+      if (!strcmp (elname, "blockquote") || !strcmp (elname, "q"))
+        return MDATA_ATTR_OBJ_CITE_REF;
+      return -2;
+    }
+  if (!strcmp (attrname, "name"))
+    {
+      if (!strcmp (elname, "meta"))
+        return MDATA_ATTR_OBJ_NAME;
+      return -2;
+    }
+  if (!strcmp (attrname, "id"))
+    return MDATA_ATTR_ID;
+  if (!strcmp (attrname, "rel"))
+    {
+      if (!strcmp (elname, "a") || !strcmp (elname, "link") || !strcmp (elname, "area"))
+        return MDATA_ATTR_REL;
+      return -1;
+    }
+  if (!strncmp (attrname, "xml:", 4))
+    {
+      if (!strcmp (attrname, "xml:base"))
+        return MDATA_ATTR_XML_BASE;
+      if (!strcmp (attrname, "xml:lang"))
+        return MDATA_ATTR_XML_LANG;
+      return -3;
+    }
+  if (!strncmp (attrname, "item", 4))
+    {
+      if (!strcmp (attrname, "itemid"))
+        return MDATA_ATTR_ITEMID;
+      if (!strcmp (attrname, "itemprop"))
+        return MDATA_ATTR_ITEMPROP;
+      if (!strcmp (attrname, "itemref"))
+        return MDATA_ATTR_ITEMREF;
+      if (!strcmp (attrname, "itemscope"))
+        return MDATA_ATTR_ITEMSCOPE;
+      if (!strcmp (attrname, "itemtype"))
+        return MDATA_ATTR_ITEMTYPE;
+      return -4;
+    }
+  if (!strcmp (attrname, "datetime"))
+    {
+      if (!strcmp (elname, "time"))
+        return MDATA_ATTR_OBJ_DATETIME;
+      return -5;
+    }
+  return -6;
+}
+
+
+#define MDATA_ATTRSYNTAX_URI		0x01
+#define MDATA_ATTRSYNTAX_REL		0x02
+#define MDATA_ATTRSYNTAX_ID		0x04
+#define MDATA_ATTRSYNTAX_WS_LIST	0x08
+#define MDATA_ATTRSYNTAX_OPTIONAL	0x10
+#define MDATA_ATTRSYNTAX_SILENT		0x20
+
+caddr_t
+xp_mdata_parse_attr_value (xparse_ctx_t *xp, xp_node_t * xn, int attr_id, char **attrvalues, int allowed_syntax, caddr_t **values_ret, int *values_count_ret)
+{
+  char *attrvalue = attrvalues[attr_id];
+  char *tail = attrvalue;
+  char *token_start, *token_end;
+  int token_syntax;
+  caddr_t expanded_token = NULL;
+  int values_count, expanded_token_not_saved = 0;
+#define free_unsaved_token() do { \
+  if (expanded_token_not_saved) { \
+      dk_free_box (expanded_token); \
+      expanded_token = NULL; \
+      expanded_token_not_saved = 0; } \
+  } while (0)
+#ifdef RDFXML_DEBUG
+  if (((NULL != values_ret) ? 1 : 0) != ((NULL != values_count_ret) ? 1 : 0))
+    GPF_T1 ("xp_" "mdata_parse_attr_value(): bad call (1)");
+  if (((NULL != values_ret) ? 1 : 0) != ((MDATA_ATTRSYNTAX_WS_LIST & allowed_syntax) ? 1 : 0))
+    GPF_T1 ("xp_" "mdata_parse_attr_value(): bad call (2)");
+#endif
+  if (NULL != values_ret)
+    {
+      if (NULL == values_ret[0])
+        values_ret[0] = dk_alloc_list_zero (1);
+      values_count = values_count_ret[0];
+    }
+  else
+    values_count = 0;
+  if (NULL == attrvalue)
+    {
+      if (!(MDATA_ATTRSYNTAX_OPTIONAL & allowed_syntax))
+        {
+          free_unsaved_token();
+          if (MDATA_ATTRSYNTAX_SILENT & allowed_syntax)
+            return NULL;
+          xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Missing attribute %.20s", mdata_attribute_lognames[attr_id]);
+        }
+      return NULL;
+    }
+
+next_token:
+  if ((MDATA_ATTRSYNTAX_WS_LIST | MDATA_ATTRSYNTAX_ID) & allowed_syntax)
+    while (('\0' != tail[0]) && isspace (tail[0])) tail++;
+  else if (isspace (tail[0]))
+    {
+      free_unsaved_token();
+      if (MDATA_ATTRSYNTAX_SILENT & allowed_syntax)
+        return NULL;
+      xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Whitespaces are not allowed for attribute %.20s", mdata_attribute_lognames[attr_id]);
+      return NULL;
+    }
+  if ('\0' == tail[0])
+    {
+      if (0 == values_count)
+        {
+          if (MDATA_ATTRSYNTAX_WS_LIST & allowed_syntax)
+            return NULL;
+          if (MDATA_ATTRSYNTAX_SILENT & allowed_syntax)
+            return NULL;
+          xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Empty value is not allowed for attribute %.20s", mdata_attribute_lognames[attr_id]);
+        }
+      if (NULL != values_count_ret)
+        values_count_ret[0] = values_count;
+      return expanded_token;
+    }
+  if ((1 == values_count) && !(MDATA_ATTRSYNTAX_WS_LIST & allowed_syntax))
+    {
+      free_unsaved_token();
+      if (MDATA_ATTRSYNTAX_SILENT & allowed_syntax)
+        return NULL;
+      xmlparser_logprintf (xp->xp_parser, XCFG_ERROR, 100, "Multiple values are not allowed for attribute %.20s", mdata_attribute_lognames[attr_id]);
+      if (NULL != values_count_ret)
+        values_count_ret[0] = values_count;
+      return NULL;
+    }
+  token_syntax = allowed_syntax & (MDATA_ATTRSYNTAX_URI | MDATA_ATTRSYNTAX_ID);
+  token_start = tail;
+  while (('\0' != tail[0]) && !isspace(tail[0]))
+    tail++;
+  token_end = tail;
+  if (NULL != values_ret)
+    {
+      if (values_count == BOX_ELEMENTS (values_ret[0]))
+        {
+          caddr_t *new_buf = dk_alloc_list_zero (values_count * 2);
+          memcpy (new_buf, values_ret[0], box_length (values_ret[0]));
+          dk_free_box ((caddr_t)(values_ret[0]));
+          values_ret[0] = (caddr_t *)new_buf;
+        }
+      else if (NULL != values_ret[0][values_count]) /* There's some old garbage to delete */
+        {
+#ifdef RDFXML_DEBUG
+          GPF_T1 ("xp_" "mdata_parse_attr_value(): garbage?");
+#endif
+          dk_free_tree (values_ret[0][values_count]);
+          values_ret[0][values_count] = NULL;
+        }
+    }
+  expanded_token = box_dv_short_nchars (token_start, token_end-token_start);
+  if (MDATA_ATTRSYNTAX_REL & token_syntax)
+    {
+      if (NULL != values_ret)
+        {
+          const char *alt_ssheet_compl_name = NULL;
+          if (!strcasecmp (expanded_token, "alternate"))
+            alt_ssheet_compl_name = "http://www.w3.org/1999/xhtml/vocab#stylesheet";
+          else if (!strcasecmp (expanded_token, "stylesheet"))
+            alt_ssheet_compl_name = "http://www.w3.org/1999/xhtml/vocab#alternate";
+          if (NULL != alt_ssheet_compl_name)
+            {
+              int prev_ctr = values_count;
+              while (0 < prev_ctr--)
+                {
+                  if (strcmp (values_ret[0][prev_ctr], alt_ssheet_compl_name))
+                    continue;
+                  dk_free_box (values_ret[0][prev_ctr]);
+                  dk_free_box (expanded_token);
+                  values_ret[0][prev_ctr] = box_dv_short_string ("http://www.w3.org/1999/xhtml/vocab#ALTERNATE-STYLESHEET");
+                  goto token_done; /* see below */
+                }
+            }
+        }
+      if (NULL == strchr (expanded_token, ':'))
+        {
+          caddr_t vocab_token;
+          char *ttail;
+          for (ttail = expanded_token; ('\0' != ttail[0]) && !(ttail[0] & ~0x7f); ttail++) ttail[0] = tolower (ttail[0]);
+          vocab_token = box_dv_short_strconcat ("http://www.w3.org/1999/xhtml/vocab#", expanded_token);
+          dk_free_box (expanded_token);
+          expanded_token = vocab_token;
+          goto token_done; /* see below */
+        }
+    }
+  if (MDATA_ATTRSYNTAX_URI & token_syntax)
+    {
+      caddr_t base = xn->xn_xp->xp_mdata_locals->xmdatal_base;
+      xp_expand_relative_uri (base, &expanded_token);
+      if (NULL == expanded_token)
+        {
+          if (MDATA_ATTRSYNTAX_SILENT & allowed_syntax)
+            return NULL;
+          xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Bad URI token in the value of attribute \"%.20s\"", mdata_attribute_lognames[attr_id]);
+        }
+    }
+token_done:
+  expanded_token_not_saved = 1;
+  if (NULL != values_ret)
+    {
+      values_ret[0][values_count] = expanded_token;
+      expanded_token_not_saved = 0;
+    }
+  values_count++;
+  goto next_token; /* see above */
+}
+
+typedef struct mdata_id_desc_s {
+  ptrlong iddesc_found;
+  ptrlong iddesc_refcount;
+  caddr_t *iddesc_refs;
+}
+mdata_id_desc_t;
+
+void
+mdata_register_id_elt (xparse_ctx_t *xp, ccaddr_t id)
+{
+  id_hash_t *ht = xp->xp_tmp->xpt_id2desc;
+  mdata_id_desc_t **desc;
+  mdata_id_desc_t *new_desc;
+  desc = (mdata_id_desc_t **)id_hash_get (ht, (caddr_t)(&id));
+  if (NULL != desc)
+    {
+      if (desc[0]->iddesc_found)
+        xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Id %.200s is not unique", id);
+      desc[0]->iddesc_found = 1;
+      return;
+    }
+  id = box_copy (id);
+  new_desc = (mdata_id_desc_t *)list (3, (ptrlong)1, (ptrlong)0, dk_alloc_list_zero (2));
+  id_hash_set (ht, (caddr_t)(&id), (caddr_t)(&new_desc));
+}
+
+void
+mdata_register_id_usage (xparse_ctx_t *xp, ccaddr_t id, caddr_t itemid)
+{
+  id_hash_t *ht = xp->xp_tmp->xpt_id2desc;
+  mdata_id_desc_t **desc;
+  mdata_id_desc_t *new_desc;
+  desc = (mdata_id_desc_t **)id_hash_get (ht, (caddr_t)(&id));
+  if (NULL != desc)
+    {
+      int refs_room = BOX_ELEMENTS (desc[0]->iddesc_refs);
+      if (desc[0]->iddesc_refcount >= refs_room)
+        {
+          caddr_t *new_refs = dk_alloc_list_zero (refs_room * 2);
+          memcpy (new_refs, desc[0]->iddesc_refs, refs_room * sizeof (caddr_t));
+          dk_free_box ((caddr_t)(desc[0]->iddesc_refs));
+          desc[0]->iddesc_refs = new_refs;
+        }
+      desc[0]->iddesc_refs [desc[0]->iddesc_refcount++] = box_copy_tree (itemid);
+      return;
+    }
+  new_desc = (mdata_id_desc_t *)list (3, (ptrlong)0, (ptrlong)1, (caddr_t *)dk_alloc_list_zero (2));
+  new_desc->iddesc_refs[0] = box_copy_tree (itemid);
+  id = box_copy (id);
+  id_hash_set (ht, (caddr_t)(&id), (caddr_t)(&new_desc));
+}
+
+void
+mdata_feed_or_keep (xparse_ctx_t *xp, xp_mdata_locals_t *subj_l, caddr_t prop, xp_mdata_locals_t *inner, caddr_t obj, int obj_type)
+{
+  int obj_is_iri = ((MDATA_ATTR_ITEMID == obj_type) || (MDATA_ATTR_ID == obj_type) || (MDATA_ATTR_OBJ_REF == obj_type) || (MDATA_ATTR_OBJ_REF == obj_type));
+  caddr_t obj_datatype = NULL;
+  caddr_t obj_lang = (obj_is_iri ? NULL : inner->xmdatal_language);
+  switch (obj_type)
+    {
+    case MDATA_ATTR_OBJ_DATETIME:
+      {
+        dtp_t dt_dtp = 0;
+        caddr_t dt_obj;
+        caddr_t dt_err = NULL;
+        char month[4], weekday[10], tzstring[10];
+        unsigned day, year, mnth, hour, minute, second;
+        if (6 == sscanf (obj, "%4u-%2u-%2uT%2u:%2u:%2u",
+          &year, &mnth, &day, &hour, &minute, &second) )
+          dt_dtp = DV_DATETIME;
+        else if (6 == sscanf (obj, "%4u-%2u-%2u %2u:%2u:%2u",
+          &year, &mnth, &day, &hour, &minute, &second) )
+          dt_dtp = DV_DATETIME;
+        else if (8 == sscanf (obj, "%9s, %2u-%3s-%2u %2u:%2u:%u %9s",
+          weekday, &day, month, &year, &hour, &minute, &second, tzstring) )
+          dt_dtp = DV_DATETIME;
+        else if (3 == sscanf (obj, "%4u-%2u-%2u",
+          &year, &mnth, &day) )
+          dt_dtp = DV_DATE;
+        else if (3 == sscanf (obj, "%2u-%3s-%2u",
+          &day, month, &year) )
+          dt_dtp = DV_DATE;
+        else if (3 == sscanf (obj, "%2u:%2u:%2u",
+          &hour, &minute, &second) )
+          dt_dtp = DV_TIME;
+        if (0 != dt_dtp)
+          {
+            dt_obj = box_cast_to ((caddr_t *)(xp->xp_qi), obj, DV_STRING, dt_dtp, 0, 0, &dt_err);
+            if (((dt_dtp == DV_TYPE_OF (dt_obj)) || (DV_DATETIME == DV_TYPE_OF (dt_obj))) && (NULL == dt_err))
+              {
+                dk_free_box (obj);
+                obj = dt_obj;
+                obj_datatype = NULL;
+                obj_lang = NULL;
+              }
+            else
+              dk_free_box (dt_obj);
+          }
+        break;
+      }
+    case MDATA_ATTR_OBJ_REF:
+      {
+        caddr_t base = xp->xp_mdata_locals->xmdatal_base;
+        xp_expand_relative_uri (base, &obj);
+        if (NULL == obj)
+          {
+            dk_free_box (prop);
+            return;
+          }
+        break;
+      }
+      default: ;
+    }
+
+  if (subj_l->xmdatal_subj_is_id || (MDATA_ATTR_ID == obj_type))
+    {
+      ptrlong new_cvt_bits = MDATA_DANGLING_TRIPLE_CVT_BITS (subj_l->xmdatal_subj_is_id, ((MDATA_ATTR_ID == obj_type) ? 1 : 0));
+      caddr_t *triple = (caddr_t *)list (6, box_copy (subj_l->xmdatal_subj), prop, obj,
+        (ptrlong)(obj_is_iri ? 1 : 0),
+        ((NULL != obj_datatype) ? NULL : box_copy_tree (obj_datatype)),
+        ((NULL != obj_lang) ? NULL : box_copy_tree (obj_lang)) );
+      ptrlong *cvt_bits_ptr = (ptrlong *)id_hash_get (xp->xp_tmp->xpt_dangling_triples, (caddr_t)(&triple));
+      if (NULL == cvt_bits_ptr)
+        {
+          id_hash_set (xp->xp_tmp->xpt_dangling_triples, (caddr_t)(&triple), (caddr_t)(&new_cvt_bits));
+        }
+      else
+        {
+          cvt_bits_ptr[0] |= new_cvt_bits;
+          dk_free_tree ((caddr_t)triple);
+        }
+    }
+  else
+    {
+      if (obj_is_iri)
+        tf_triple (xp->xp_tf, subj_l->xmdatal_subj, prop, obj);
+      else
+        tf_triple_l (xp->xp_tf, subj_l->xmdatal_subj, prop, obj, obj_datatype, obj_lang);
+      dk_free_box (prop);
+      dk_free_box (obj);
+    }
+}
+
+void
+mdata_feed_single_pending (xparse_ctx_t *xp, caddr_t *triple, int s_is_id, int o_is_id)
+{
+  caddr_t patched_triple[6];
+  patched_triple[0] = triple[0];
+  patched_triple[1] = triple[1];
+  patched_triple[2] = triple[2];
+  patched_triple[3] = triple[3];
+  patched_triple[4] = triple[4];
+  patched_triple[5] = triple[5];
+  if (s_is_id)
+    {
+      caddr_t subj = triple[0];
+      int ctr;
+      mdata_id_desc_t **id_desc_ptr = (mdata_id_desc_t **)id_hash_get (xp->xp_tmp->xpt_id2desc, (caddr_t)(&subj));
+      if (NULL == id_desc_ptr)
+        GPF_T1("unknown id as subj");
+      for (ctr = id_desc_ptr[0]->iddesc_refcount; ctr--; /* no step */)
+        {
+          patched_triple[0] = id_desc_ptr[0]->iddesc_refs[ctr];
+          mdata_feed_single_pending (xp, patched_triple, 0, o_is_id);
+        }
+    }
+  else if (o_is_id)
+    {
+      caddr_t obj = triple[2];
+      int ctr;
+      mdata_id_desc_t **id_desc_ptr = (mdata_id_desc_t **)id_hash_get (xp->xp_tmp->xpt_id2desc, (caddr_t)(&obj));
+      if (NULL == id_desc_ptr)
+        GPF_T1("unknown id as obj");
+      for (ctr = id_desc_ptr[0]->iddesc_refcount; ctr--; /* no step */)
+        {
+          patched_triple[2] = id_desc_ptr[0]->iddesc_refs[ctr];
+          mdata_feed_single_pending (xp, patched_triple, s_is_id, 0);
+        }
+    }
+  else
+    {
+      if (triple[3])
+        tf_triple (xp->xp_tf, triple[0], triple[1], triple[2]);
+      else
+        tf_triple_l (xp->xp_tf, triple[0], triple[1], triple[2], triple[4], triple[5]); /* index 3 is skipped intentionally ;) */
+    }
+}
+
+void
+mdata_process_pending_triples (xparse_ctx_t *xp)
+{
+  id_hash_iterator_t hit;
+  mdata_id_desc_t **id_desc_ptr;
+  caddr_t *id_ptr, **triple_ptr;
+  ptrlong *flags_ptr;
+  id_hash_iterator (&hit, xp->xp_tmp->xpt_id2desc);
+  while (hit_next (&hit, (char **)&id_ptr, (char **)&id_desc_ptr))
+    {
+      if (!(id_desc_ptr[0]->iddesc_found))
+        xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Id '%.200s' is mentioned in an itemref attribute of some itemscope but not found in the whole XHTML/Microdata resource", id_ptr[0]);
+    }
+  id_hash_iterator (&hit, xp->xp_tmp->xpt_dangling_triples);
+  while (hit_next (&hit, (char **)&triple_ptr, (char **)&flags_ptr))
+    {
+      if (flags_ptr[0] & MDATA_DANGLING_TRIPLE_CVT_BITS (0, 0))
+        mdata_feed_single_pending (xp, triple_ptr[0], 0, 0);
+      if (flags_ptr[0] & MDATA_DANGLING_TRIPLE_CVT_BITS (0, 1))
+        mdata_feed_single_pending (xp, triple_ptr[0], 0, 1);
+      if (flags_ptr[0] & MDATA_DANGLING_TRIPLE_CVT_BITS (1, 0))
+        mdata_feed_single_pending (xp, triple_ptr[0], 1, 0);
+      if (flags_ptr[0] & MDATA_DANGLING_TRIPLE_CVT_BITS (1, 1))
+        mdata_feed_single_pending (xp, triple_ptr[0], 1, 1);
+    }
+}
+
+xp_mdata_locals_t *
+xp_push_mdata_locals (xparse_ctx_t *xp)
+{
+  xp_mdata_locals_t *outer = xp->xp_mdata_locals;
+  xp_mdata_locals_t *inner = xp->xp_mdata_free_list;
+  if (NULL == inner)
+    inner = dk_alloc (sizeof (xp_mdata_locals_t));
+  else
+    xp->xp_mdata_free_list = xp->xp_mdata_free_list->xmdatal_parent;
+  memset (inner, 0, sizeof (xp_mdata_locals_t));
+  if (NULL != outer)
+    {
+      inner->xmdatal_subj = outer->xmdatal_subj;
+      inner->xmdatal_subj_is_id = outer->xmdatal_subj_is_id;
+      inner->xmdatal_prop_count = outer->xmdatal_prop_count;
+      inner->xmdatal_props = outer->xmdatal_props;
+      inner->xmdatal_datatype = outer->xmdatal_datatype;
+      inner->xmdatal_base = outer->xmdatal_base;
+      inner->xmdatal_language = outer->xmdatal_language;
+    }
+  inner->xmdatal_parent = outer;
+  xp->xp_mdata_locals = inner;
+  return inner;
+}
+
+void
+xp_pop_mdata_locals (xparse_ctx_t *xp)
+{
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  xp_mdata_locals_t *outer = inner->xmdatal_parent;
+#define XP_FREE_INNER_IF_NEQ_OUTER(fld) do { \
+  if ((NULL != inner->fld) && ((NULL == outer) || (outer->fld != inner->fld))) \
+    dk_free_tree ((caddr_t)(inner->fld)); } while (0)
+  XP_FREE_INNER_IF_NEQ_OUTER (xmdatal_subj);
+  XP_FREE_INNER_IF_NEQ_OUTER (xmdatal_props);
+  XP_FREE_INNER_IF_NEQ_OUTER (xmdatal_datatype);
+  XP_FREE_INNER_IF_NEQ_OUTER (xmdatal_base);
+  XP_FREE_INNER_IF_NEQ_OUTER (xmdatal_language);
+  inner->xmdatal_parent = xp->xp_mdata_free_list;
+  xp->xp_mdata_free_list = inner;
+  xp->xp_mdata_locals = outer;
+}
+
+void
+xp_mdata_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
+  xp_mdata_locals_t *outer = xp->xp_mdata_locals;
+  xp_mdata_locals_t *inner = NULL; /* This is not allocated at all if there's nothing "interesting" in the tag */
+  xp_tmp_t *xpt = xp->xp_tmp;
+  xp_node_t *xn = xp->xp_current;
+  caddr_t avalues[COUNTOF__MDATA_ATTR];
+  int inx, fill, n_attrs, n_ns, xn_is_allocated = 0;
+  char *local_name;
+  int obj_attr_idx = -1;
+  int outer_place_bits = outer->xmdatal_place_bits;
+  int need_mdata_local = 0;
+  int props_connect_local_id_to_local_itemscope = 0;
+#ifdef RDFXML_DEBUG
+  if (xpt->xpt_base || xpt->xpt_dt || xpt->xpt_lang || xpt->xpt_obj_content || xpt->xpt_obj_res || xpt->xpt_src || xpt->xpt_href)
+    GPF_T1("xp_" "mdata_element(): nonempty xpt");
+#endif
+#ifdef RECOVER_RDF_VALUE
+  caddr_t rdf_val = NULL;
+#endif
+  if ((MDATA_IN_UNUSED | MDATA_IN_STRLITERAL) & outer_place_bits)
+    {
+      outer->xmdatal_boring_opened_elts++;
+      return;
+    }
+  if ((MDATA_IN_XMLLITERAL) & outer_place_bits)
+    {
+      xp_element (userdata, name, attrdata);
+      return;
+    }
+/* Let's make xp->xp_free_list nonempty just to not duplicate this code in few places below */
+  if (NULL == xp->xp_free_list)
+    {
+      xp->xp_free_list = (xp_node_t *)dk_alloc (sizeof (xp_node_t));
+      xp->xp_free_list->xn_parent = NULL;
+    }
+  n_ns = attrdata->local_nsdecls_count;
+  if (n_ns)
+    {
+      caddr_t *save_ns;
+      xn = xp->xp_free_list;
+      xp->xp_free_list = xn->xn_parent;
+      memset (xn, 0, sizeof (xp_node_t));
+      xn->xn_xp = xp;
+      xn->xn_parent = xp->xp_current;
+      xp->xp_current = xn;
+      xn_is_allocated = 1;
+      need_mdata_local++;
+      save_ns = (caddr_t*) dk_alloc_box (2 * n_ns * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
+      /* Trick here: xn->xn_attrs is set to xn->xn_namespaces in order to free memory on errors or element end. */
+      xn->xn_attrs = xn->xn_namespaces = save_ns;
+      fill = 0;
+      for (inx = 0; inx < n_ns; inx++)
+        {
+          save_ns[fill++] = box_dv_uname_string (attrdata->local_nsdecls[inx].nsd_prefix);
+          save_ns[fill++] = box_dv_uname_string (attrdata->local_nsdecls[inx].nsd_uri);
+        }
+    }
+/* Setting place bits */
+  local_name = strchr (name, ':');
+  if (NULL == local_name)
+    local_name = name;
+  n_attrs = attrdata->local_attrs_count;
+  memset (avalues, 0, sizeof (avalues));
+  if (0 == n_attrs)
+    goto all_attributes_are_retrieved; /* see below */
+  for (inx = 0; inx < n_attrs; inx ++)
+    {
+      char *raw_aname = attrdata->local_attrs[inx].ta_raw_name.lm_memblock;
+      int mdata_attr_idx = mdata_find_attr_idx (raw_aname, name);
+      if (0 > mdata_attr_idx)
+        continue;
+      need_mdata_local++;
+      if (NULL != avalues[mdata_attr_idx])
+        xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Duplicate/conflicting attribute names in one element head");
+      avalues[mdata_attr_idx] = attrdata->local_attrs[inx].ta_value;
+    }
+  if (!need_mdata_local)
+    {
+      goto all_attributes_are_retrieved; /* see below */
+    }
+  if (NULL != avalues[MDATA_ATTR_ITEMPROP])
+    {
+      if (NULL != avalues[MDATA_ATTR_OBJ_REF])
+        obj_attr_idx = MDATA_ATTR_OBJ_REF;
+      else if (NULL != avalues[MDATA_ATTR_OBJ_STRLIT])
+        obj_attr_idx = MDATA_ATTR_OBJ_STRLIT;
+      else if (NULL != avalues[MDATA_ATTR_OBJ_CONTENT_STRLIT])
+        obj_attr_idx = MDATA_ATTR_OBJ_CONTENT_STRLIT;
+      else if (NULL != avalues[MDATA_ATTR_OBJ_DATETIME])
+        obj_attr_idx = MDATA_ATTR_OBJ_DATETIME;
+    }
+  if ((2 == need_mdata_local) && (NULL != outer->xmdatal_subj) && (0 <= obj_attr_idx))
+    {
+
+      int prop_ctr, prop_count = 0;
+      caddr_t *props = NULL;
+      xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ITEMPROP, avalues,
+            MDATA_ATTRSYNTAX_ID | MDATA_ATTRSYNTAX_WS_LIST, &props, &prop_count );
+      for (prop_ctr = 0; prop_ctr < prop_count; prop_ctr++)
+        {
+          caddr_t prop = props[prop_ctr];
+          props[prop_ctr] = NULL;
+          mdata_feed_or_keep (xp, outer, prop, outer /* yes, not inner */, box_dv_short_string (avalues[obj_attr_idx]), obj_attr_idx );
+        }
+      dk_free_box ((caddr_t)props);
+      outer->xmdatal_boring_opened_elts++; /* This is to disable processing of closing tag because it can not be interesting and it should do nothing. */
+      return;
+    }
+  if (!xn_is_allocated)
+    {
+      xn = xp->xp_free_list;
+      xp->xp_free_list = xn->xn_parent;
+      memset (xn, 0, sizeof (xp_node_t));
+      xn->xn_xp = xp;
+      xn->xn_parent = xp->xp_current;
+      xp->xp_current = xn;
+      xn_is_allocated = 1;
+    }
+  inner = xp_push_mdata_locals (xp);
+  inner->xmdatal_xn = xn;
+  if (NULL != avalues[MDATA_ATTR_XML_BASE])
+    {
+      if (NULL != xpt->xpt_base)
+        dk_free_tree (xpt->xpt_base);
+      xpt->xpt_base = box_dv_short_string (avalues[MDATA_ATTR_XML_BASE]);
+    }
+  if (NULL != avalues[MDATA_ATTR_XML_LANG])
+    {
+      if (NULL != xpt->xpt_lang)
+        dk_free_tree (xpt->xpt_lang);
+      xpt->xpt_lang = box_dv_short_string (avalues[MDATA_ATTR_XML_LANG]);
+    }
+  if (NULL != xpt->xpt_base)
+    {
+      inner->xmdatal_base = xpt->xpt_base;
+      xpt->xpt_base = NULL;
+    }
+  if (NULL != xpt->xpt_lang)
+    {
+      inner->xmdatal_language = xpt->xpt_lang;
+      xpt->xpt_lang = NULL;
+    }
+  if ((NULL != avalues[MDATA_ATTR_ID]) && ((NULL == avalues[MDATA_ATTR_ITEMSCOPE]) || (NULL != avalues[MDATA_ATTR_ITEMPROP])))
+    {
+      caddr_t id = xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ID, avalues, MDATA_ATTRSYNTAX_ID, NULL, NULL);
+      mdata_register_id_elt (xp, id);
+      inner->xmdatal_subj = id;
+      inner->xmdatal_subj_is_id = 1;
+      inner->xmdatal_props = NULL;
+      inner->xmdatal_prop_count = 0;
+    }
+  if (NULL != avalues[MDATA_ATTR_ITEMSCOPE])
+    {
+      caddr_t itemid = xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ITEMID, avalues,
+            MDATA_ATTRSYNTAX_URI | MDATA_ATTRSYNTAX_OPTIONAL, NULL, NULL );
+      if (NULL == itemid)
+        itemid = tf_bnode_iid (xp->xp_tf, NULL);
+      if ((NULL != avalues[MDATA_ATTR_ID]) && (NULL != avalues[MDATA_ATTR_ITEMPROP]))
+        {
+          int prop_ctr, prop_count = 0;
+          caddr_t *props = NULL;
+          xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ITEMPROP, avalues,
+                MDATA_ATTRSYNTAX_ID | MDATA_ATTRSYNTAX_WS_LIST, &props, &prop_count );
+          inner->xmdatal_props = props;
+          inner->xmdatal_prop_count = prop_count;
+          for (prop_ctr = 0; prop_ctr < prop_count; prop_ctr++)
+            {
+              caddr_t prop = props[prop_ctr];
+              props[prop_ctr] = NULL;
+              mdata_feed_or_keep (xp, inner, prop, inner, box_copy (itemid), MDATA_ATTR_ITEMID);
+            }
+          dk_free_box (inner->xmdatal_subj);
+          inner->xmdatal_subj = NULL;
+          dk_free_box ((caddr_t)(inner->xmdatal_props));
+          inner->xmdatal_props = NULL;
+          inner->xmdatal_prop_count = 0;
+          props_connect_local_id_to_local_itemscope = 1;
+        }
+      if (!(props_connect_local_id_to_local_itemscope || outer->xmdatal_prop_count) && (NULL != xp->xp_tf->tf_base_uri))
+        tf_triple (xp->xp_tf, xp->xp_tf->tf_base_uri, box_dv_uname_string ("http://www.w3.org/1999/xhtml/microdata#item"), itemid);
+      inner->xmdatal_subj = itemid;
+      inner->xmdatal_subj_is_id = 0;
+      inner->xmdatal_props = NULL;
+      inner->xmdatal_prop_count = 0;
+      if (NULL != avalues[MDATA_ATTR_ITEMREF])
+        {
+          caddr_t *ref_ids = 0;
+          int ref_id_ctr, ref_id_count = 0;
+          xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ITEMREF, avalues,
+            MDATA_ATTRSYNTAX_ID | MDATA_ATTRSYNTAX_WS_LIST, &ref_ids, &ref_id_count );
+          for (ref_id_ctr = 0; ref_id_ctr < ref_id_count; ref_id_ctr++)
+            mdata_register_id_usage (xp, ref_ids[ref_id_ctr], inner->xmdatal_subj);
+          dk_free_tree ((caddr_t)ref_ids);
+        }
+    }
+  else if (NULL != avalues[MDATA_ATTR_ITEMREF])
+    xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute itemref in an opening tag that has no itemscope attribute");
+  if (outer->xmdatal_prop_count && (NULL != outer->xmdatal_subj) && ((NULL != avalues[MDATA_ATTR_ITEMSCOPE]) || (NULL != avalues[MDATA_ATTR_ID])))
+    {
+      int prop_ctr;
+      for (prop_ctr = 0; prop_ctr < outer->xmdatal_prop_count; prop_ctr++)
+        {
+          caddr_t prop = outer->xmdatal_props[prop_ctr];
+          mdata_feed_or_keep (xp, outer, box_copy (prop), inner,
+            box_dv_short_string (inner->xmdatal_subj), ((NULL != avalues[MDATA_ATTR_ITEMSCOPE]) ? MDATA_ATTR_ITEMSCOPE : MDATA_ATTR_ID) );
+        }
+    }
+  if (NULL != avalues[MDATA_ATTR_ITEMTYPE])
+    {
+      caddr_t itemtype, itemid;
+      caddr_t *old_itemtype_ptr;
+      if (NULL == avalues[MDATA_ATTR_ITEMSCOPE])
+        xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute itemtype without attribute itemscope");
+      itemtype = xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ITEMTYPE, avalues,
+            MDATA_ATTRSYNTAX_URI, NULL, NULL );
+      itemid = inner->xmdatal_subj;
+      old_itemtype_ptr = (caddr_t *)id_hash_get (xpt->xpt_subj2type, (caddr_t)(&itemid));
+      if (NULL != old_itemtype_ptr)
+        {
+          dk_free_tree (itemtype);
+          xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "The subject '%.200s' has more than one itemtype definition", inner->xmdatal_subj);
+        }
+      mdata_feed_or_keep (xp, inner, uname_rdf_ns_uri_type, inner, box_copy (itemtype), MDATA_ATTR_ITEMSCOPE);
+      itemid = box_copy (itemid);
+      id_hash_set (xpt->xpt_subj2type, (caddr_t)(&itemid), (caddr_t)(&itemtype));
+    }
+  if ((NULL != avalues[MDATA_ATTR_ITEMPROP]) && !props_connect_local_id_to_local_itemscope)
+    {
+      int prop_ctr, prop_count = 0;
+      caddr_t *props = NULL;
+      if (NULL == inner->xmdatal_subj)
+        xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Attribute itemprop outside any element with itemscope or id");
+      xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_ITEMPROP, avalues,
+            MDATA_ATTRSYNTAX_ID | MDATA_ATTRSYNTAX_WS_LIST, &props, &prop_count );
+      inner->xmdatal_props = props;
+      inner->xmdatal_prop_count = prop_count;
+      if ((NULL != outer->xmdatal_subj) && (0 <= obj_attr_idx))
+        {
+          if (inner->xmdatal_subj != outer->xmdatal_subj)
+            xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "An opening tag with itemscope or id can not contain both attribute itemprop and some object attribute");
+          for (prop_ctr = 0; prop_ctr < prop_count; prop_ctr++)
+            {
+              caddr_t prop = props[prop_ctr];
+              props[prop_ctr] = NULL;
+              mdata_feed_or_keep (xp, outer, prop, inner, box_dv_short_string (avalues[obj_attr_idx]), obj_attr_idx );
+            }
+          inner->xmdatal_prop_count = 0;
+        }
+      else if ((NULL != outer->xmdatal_subj) && (inner->xmdatal_subj != outer->xmdatal_subj))
+        {
+          for (prop_ctr = 0; prop_ctr < prop_count; prop_ctr++)
+            {
+              caddr_t prop = props[prop_ctr];
+              props[prop_ctr] = NULL;
+              mdata_feed_or_keep (xp, outer, prop, inner, box_copy_tree (inner->xmdatal_subj),
+                (inner->xmdatal_subj_is_id ? MDATA_ATTR_ID : MDATA_ATTR_ITEMID) );
+            }
+          inner->xmdatal_prop_count = 0;
+        }
+      else
+        {
+          inner->xmdatal_place_bits |= MDATA_IN_STRLITERAL;
+        }
+    }
+  if ((NULL != avalues[MDATA_ATTR_REL]) && (NULL != avalues[MDATA_ATTR_OBJ_REF]))
+    {
+      int rel_ctr, rel_count = 0;
+      caddr_t *rels = NULL;
+      caddr_t ref;
+      xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_REL, avalues,
+            MDATA_ATTRSYNTAX_REL | MDATA_ATTRSYNTAX_URI | MDATA_ATTRSYNTAX_WS_LIST, &rels, &rel_count );
+      ref = xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_OBJ_REF, avalues,
+            MDATA_ATTRSYNTAX_URI | MDATA_ATTRSYNTAX_OPTIONAL, NULL, NULL );
+      if ((NULL != ref) && (NULL != xp->xp_tf->tf_base_uri))
+        for (rel_ctr = 0; rel_ctr < rel_count; rel_ctr++)
+          {
+            caddr_t prop = rels[rel_ctr];
+            tf_triple (xp->xp_tf, xp->xp_tf->tf_base_uri, prop, ref);
+          }
+      dk_free_tree ((caddr_t)rels);
+      dk_free_box (ref);
+    }
+  if ((NULL != avalues[MDATA_ATTR_OBJ_NAME]) && (NULL != avalues[MDATA_ATTR_OBJ_CONTENT_STRLIT]))
+    {
+      caddr_t rel = xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_OBJ_NAME, avalues,
+            MDATA_ATTRSYNTAX_REL | MDATA_ATTRSYNTAX_URI | MDATA_ATTRSYNTAX_SILENT, NULL, NULL );
+      if ((NULL != rel) && (NULL != xp->xp_tf->tf_base_uri))
+        tf_triple_l (xp->xp_tf, xp->xp_tf->tf_base_uri, rel, avalues[MDATA_ATTR_OBJ_CONTENT_STRLIT], NULL, inner->xmdatal_language);
+      dk_free_box (rel);
+    }
+  if (NULL != avalues[MDATA_ATTR_OBJ_CITE_REF])
+    {
+      caddr_t ref = xp_mdata_parse_attr_value (xp, xn, MDATA_ATTR_OBJ_CITE_REF, avalues,
+            MDATA_ATTRSYNTAX_URI | MDATA_ATTRSYNTAX_OPTIONAL, NULL, NULL );
+      if ((NULL != ref) && (NULL != xp->xp_tf->tf_base_uri))
+        tf_triple (xp->xp_tf, xp->xp_tf->tf_base_uri, box_dv_uname_string ("http://purl.org/dc/terms/source"), ref);
+      dk_free_box (ref);
+    }
+
+all_attributes_are_retrieved:
+/* Escape if nothing interesting is detected at all */
+  if (!need_mdata_local)
+    {
+      outer->xmdatal_boring_opened_elts++;
+      return;
+    }
+/* There is something interesting so the stack should grow */
+  if (!xn_is_allocated)
+    {
+      xn = xp->xp_free_list;
+      xp->xp_free_list = xn->xn_parent;
+      memset (xn, 0, sizeof (xp_node_t));
+      xn->xn_xp = xp;
+      xn->xn_parent = xp->xp_current;
+      xp->xp_current = xn;
+    }
+}
+
+void
+xp_mdata_element_end (void *userdata, const char * name)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  xp_node_t *current_node, *parent_node;
+  int inner_place_bits = inner->xmdatal_place_bits;
+  if (NULL == inner->xmdatal_xn)
+    return; /* This happens for elements that are closed outside any "interesting" element */
+  if (xp->xp_current != inner->xmdatal_xn)
+    {
+      if (!(MDATA_IN_XMLLITERAL & inner_place_bits))
+        GPF_T1 ("xp_" "mdata_element_end(): misaligned stacks");
+      xp_element_end (userdata, name);
+      return;
+    }
+  if (inner->xmdatal_boring_opened_elts)
+    {
+      inner->xmdatal_boring_opened_elts--;
+      return;
+    }
+  inner_place_bits = inner->xmdatal_place_bits;
+  current_node = xp->xp_current;
+  if ((MDATA_IN_STRLITERAL | MDATA_IN_XMLLITERAL) & inner_place_bits)
+    {
+      caddr_t obj = NULL;
+      int prop_ctr, prop_count;
+      if (MDATA_IN_XMLLITERAL & inner_place_bits)
+        {
+          dk_set_t children;
+          caddr_t *literal_head;
+          caddr_t literal_tree;
+          xml_tree_ent_t *literal_xte;
+          XP_STRSES_FLUSH (xp);
+          children = dk_set_nreverse (current_node->xn_children);
+          literal_head = (caddr_t *)list (1, uname__root);
+          children = CONS (literal_head, children);
+          literal_tree = list_to_array (children);
+          current_node->xn_children = NULL;
+          literal_xte = xte_from_tree (literal_tree, xp->xp_qi);
+          obj = (caddr_t) literal_xte;
+        }
+      else
+        {
+          obj = strses_string (xp->xp_strses);
+          strses_flush (xp->xp_strses);
+        }
+      prop_count = inner->xmdatal_prop_count;
+      for (prop_ctr = prop_count; prop_ctr--; /* no step */)
+        {
+          caddr_t prop = inner->xmdatal_props[prop_ctr];
+          inner->xmdatal_props[prop_ctr] = NULL;
+          mdata_feed_or_keep (xp, inner, prop, inner, (prop_ctr ? box_copy_tree (obj) : obj), MDATA_ATTR_OBJ_STRLIT);
+        }
+    }
+  parent_node = xp->xp_current->xn_parent;
+  dk_free_tree ((caddr_t)(current_node->xn_attrs));
+  xp->xp_current = parent_node;
+  current_node->xn_parent = xp->xp_free_list;
+  xp->xp_free_list = current_node;
+  xp_pop_mdata_locals (xp);
+}
+
+void
+xp_mdata_id (void *userdata, char * name)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  if (RDFA_IN_XMLLITERAL & inner->xmdatal_place_bits)
+    xp_id (userdata, name);
+}
+
+void
+xp_mdata_character (void *userdata,  char * s, int len)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t*) userdata;
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  int inner_place_bits = inner->xmdatal_place_bits;
+  if ((MDATA_IN_STRLITERAL | MDATA_IN_XMLLITERAL) & inner_place_bits)
+    session_buffered_write (xp->xp_strses, s, len);
+}
+
+void
+xp_mdata_entity (void *userdata, const char * refname, int reflen, int isparam, const xml_def_4_entity_t *edef)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t *) userdata;
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  if (MDATA_IN_XMLLITERAL & inner->xmdatal_place_bits)
+    xp_entity (userdata, refname, reflen, isparam, edef);
+  else if (MDATA_IN_STRLITERAL & inner->xmdatal_place_bits)
+    xmlparser_logprintf (xp->xp_parser, XCFG_FATAL, 100, "Entities are not supported in string literal object");
+}
+
+void
+xp_mdata_pi (void *userdata, const char *target, const char *data)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t *) userdata;
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  if (MDATA_IN_XMLLITERAL & inner->xmdatal_place_bits)
+    xp_pi (userdata, target, data);
+}
+
+void
+xp_mdata_comment (void *userdata, const char *text)
+{
+  xparse_ctx_t *xp = (xparse_ctx_t *) userdata;
+  xp_mdata_locals_t *inner = xp->xp_mdata_locals;
+  if (MDATA_IN_XMLLITERAL & inner->xmdatal_place_bits)
+    xp_comment (userdata, text);
+}
+
+/* Part 4. Common parser invocation routine */
+
+void
+rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
+  int mode_bits, const char *source_name, caddr_t base_uri, caddr_t graph_uri,
+  ccaddr_t *cbk_names, caddr_t *app_env,
+  const char *enc, lang_handler_t *lh
+   /*, caddr_t dtd_config, dtd_t **ret_dtd,
+   id_hash_t **ret_id_cache, xml_ns_2dict_t *ret_ns_2dict*/ )
+{
+  int dtp_of_text = box_tag (text);
+  vxml_parser_config_t config;
+  vxml_parser_t * parser;
+  xparse_ctx_t context;
   triple_feed_t *tf;
   int rc;
   xp_node_t *xn;
@@ -1992,14 +3498,18 @@ rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
   if (!xml_set_xml_read_iter (qi, text, &xrie, &enc))
     sqlr_new_error ("42000", "XM032",
       "Unable to parse RDF/XML from data of type %s (%d)", dv_type_title (dtp_of_text), dtp_of_text);
+  if (DV_WIDE == DV_TYPE_OF (base_uri))
+    base_uri = box_cast_to_UTF8 ((caddr_t *)qi, base_uri);
+  else
+    base_uri = box_copy (base_uri);
   xn = (xp_node_t *) dk_alloc (sizeof (xp_node_t));
   memset (xn, 0, sizeof(xp_node_t));
   memset (&context, 0, sizeof (context));
   context.xp_current = xn;
   xn->xn_xp = &context;
-  root_xrl = (xp_rdfxml_locals_t *) dk_alloc (sizeof (xp_rdfxml_locals_t));
-  memset (root_xrl, 0, sizeof (xp_rdfxml_locals_t));
+  root_xrl = (xp_rdfxml_locals_t *) dk_alloc_zero (sizeof (xp_rdfxml_locals_t));
   root_xrl->xrl_base = base_uri;
+  root_xrl->xrl_base_set = 1;
   root_xrl->xrl_parsetype = XRL_PARSETYPE_TOP_LEVEL;
   root_xrl->xrl_xn = xn;
   context.xp_strses = strses_allocate ();
@@ -2028,11 +3538,26 @@ rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
   parser->fill_ns_2dict = 0;
   context.xp_parser = parser;
   VXmlSetUserData (parser, &context);
-  if (mode_bits & RDFXML_IN_ATTRIBUTES)
+  if (mode_bits & RDFXML_IN_MDATA)
+    {
+      xp_mdata_locals_t *root_xmdatal = xp_push_mdata_locals (&context);
+      root_xmdatal->xmdatal_base = box_copy (base_uri);
+      context.xp_tmp = (xp_tmp_t *)dk_alloc_box_zero (sizeof (xp_tmp_t), DV_ARRAY_OF_POINTER);
+      context.xp_tmp->xpt_id2desc = (id_hash_t *)box_dv_dict_hashtable (30);
+      context.xp_tmp->xpt_dangling_triples = (id_hash_t *)box_dv_dict_hashtable (100);
+      context.xp_tmp->xpt_subj2type = (id_hash_t *)box_dv_dict_hashtable (30);
+      VXmlSetElementHandler (parser, (VXmlStartElementHandler) xp_mdata_element, xp_mdata_element_end);
+      VXmlSetIdHandler (parser, (VXmlIdHandler)xp_mdata_id);
+      VXmlSetCharacterDataHandler (parser, (VXmlCharacterDataHandler) xp_mdata_character);
+      VXmlSetEntityRefHandler (parser, (VXmlEntityRefHandler) xp_mdata_entity);
+      VXmlSetProcessingInstructionHandler (parser, (VXmlProcessingInstructionHandler) xp_mdata_pi);
+      VXmlSetCommentHandler (parser, (VXmlCommentHandler) xp_mdata_comment);
+    }
+  else if (mode_bits & RDFXML_IN_ATTRIBUTES)
     {
       xp_rdfa_locals_t *root_xrdfal = xp_push_rdfa_locals (&context);
       root_xrdfal->xrdfal_base = box_copy (base_uri);
-      context.xp_tmp = dk_alloc_box_zero (sizeof (xp_tmp_t), DV_ARRAY_OF_POINTER);
+      context.xp_tmp = (xp_tmp_t *)dk_alloc_box_zero (sizeof (xp_tmp_t), DV_ARRAY_OF_POINTER);
       VXmlSetElementHandler (parser, (VXmlStartElementHandler) xp_rdfa_element, xp_rdfa_element_end);
       VXmlSetIdHandler (parser, (VXmlIdHandler)xp_rdfa_id);
       VXmlSetCharacterDataHandler (parser, (VXmlCharacterDataHandler) xp_rdfa_character);
@@ -2060,10 +3585,11 @@ rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
     }
   tf = tf_alloc ();
   tf->tf_qi = qi;
-  tf->tf_default_graph_uri = graph_uri;
+  tf->tf_base_uri = box_copy (base_uri);
+  tf->tf_default_graph_uri = box_copy (graph_uri);
   tf->tf_app_env = app_env;
   tf->tf_creator = "rdf_load_rdfxml";
-  tf->tf_input_name = source_name;
+  tf->tf_boxed_input_name = box_dv_short_string (source_name);
   tf->tf_line_no_ptr = &(parser->curr_pos.line_num);
   context.xp_tf = tf;
   QR_RESET_CTX
@@ -2073,7 +3599,9 @@ rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
       if (0 == setjmp (context.xp_error_ctx))
         rc = VXmlParse (parser, text, xrie.xrie_text_len);
       else
-	rc = 0;
+        rc = 0;
+      if (mode_bits & RDFXML_IN_MDATA)
+        mdata_process_pending_triples (&context);
       tf_commit (tf);
     }
   QR_RESET_CODE
@@ -2129,3 +3657,47 @@ rdfxml_parse (query_instance_t * qi, caddr_t text, caddr_t *err_ret,
   tf_free (tf);
   return;
 }
+
+void
+xp_free_rdf_parser_fields (xparse_ctx_t *xp)
+{
+  xp_rdfxml_locals_t *xrl;
+  xp_rdfa_locals_t *xrdfal;
+  xp_mdata_locals_t *xmdatal;
+  while (NULL != xp->xp_rdfxml_locals)
+    xp_pop_rdf_locals (xp);
+  while (NULL != xp->xp_rdfa_locals)
+    {
+#ifndef NDEBUG
+      dk_free_tree (xp->xp_rdfa_locals->xrdfal_ict_buffer);
+      xp->xp_rdfa_locals->xrdfal_ict_buffer = NULL;
+#endif
+      xp_pop_rdfa_locals (xp);
+    }
+  while (NULL != xp->xp_mdata_locals)
+    xp_pop_mdata_locals (xp);
+  xrl = xp->xp_rdfxml_free_list;
+  while (NULL != xrl)
+    {
+      xp_rdfxml_locals_t *next_xrl = xrl->xrl_parent;
+      dk_free (xrl, sizeof (xp_rdfxml_locals_t));
+      xrl = next_xrl;
+    }
+  xrdfal = xp->xp_rdfa_free_list;
+  while (NULL != xrdfal)
+    {
+      xp_rdfa_locals_t *next_xrdfal = xrdfal->xrdfal_parent;
+      dk_free_tree (xrdfal->xrdfal_ict_buffer);
+      dk_free (xrdfal, sizeof (xp_rdfa_locals_t));
+      xrdfal = next_xrdfal;
+    }
+  xmdatal = xp->xp_mdata_free_list;
+  while (NULL != xmdatal)
+    {
+      xp_mdata_locals_t *next_xmdatal = xmdatal->xmdatal_parent;
+      dk_free (xmdatal, sizeof (xp_mdata_locals_t));
+      xmdatal = next_xmdatal;
+    }
+  dk_free_tree (xp->xp_tmp);
+  /* Note that xp_tf is intentionally left untouched. */
+}
diff --git a/libsrc/Wi/recovery.c b/libsrc/Wi/recovery.c
index 6d5137c..6627b10 100644
--- a/libsrc/Wi/recovery.c
+++ b/libsrc/Wi/recovery.c
@@ -1,14 +1,14 @@
 /*
  *  recovery.c
  *
- *  $Id: recovery.c,v 1.12.2.9 2010/05/21 12:40:48 source Exp $
+ *  $Id: recovery.c,v 1.12.2.11 2012/03/08 12:55:35 source Exp $
  *
  *  Backup & Recovery procedures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -912,6 +912,7 @@ bif_backup_prepare (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   query_instance_t *qi = (query_instance_t *) qst;
   caddr_t file = bif_string_arg (qst, args, 0, "backup_prepare");
+  sec_check_dba (qi, "backup_prepare");
   backup_prepare (qi, file);
   return NULL;
 }
@@ -930,6 +931,7 @@ bif_backup_row (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t row = bif_arg (qst, args, 0, "backup_row");
   dtp_t tag = DV_TYPE_OF (row);
   ITC_INIT (itc, qi->qi_space, qi->qi_trx);
+  sec_check_dba (qi, "backup_row");
   if (!lt->lt_backup)
     sqlr_new_error ("42000", "SR112", "Transaction not in backup mode");
   if (tag != DV_SHORT_CONT_STRING && tag != DV_LONG_CONT_STRING)
@@ -956,6 +958,7 @@ bif_backup_flush (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   int rc;
   query_instance_t *qi = (query_instance_t *) qst;
   lock_trx_t *lt = qi->qi_trx;
+  sec_check_dba (qi, "backup_flush");
   if (!lt->lt_backup)
     sqlr_new_error ("42000", "SR114", "Transaction not in backup mode");
 
@@ -978,12 +981,14 @@ bif_backup_close (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   query_instance_t *qi = (query_instance_t *) qst;
   lock_trx_t *lt = qi->qi_trx;
+  sec_check_dba (qi, "backup_close");
   if (!lt->lt_backup)
     sqlr_new_error ("42000", "SR116", "Transaction not in backup mode");
 
   backup_close (qi->qi_trx);
   if (!srv_have_global_lock(THREAD_CURRENT_THREAD))
     LEAVE_CPT(qi->qi_trx);
+  log_info ("Backup finished.");
   return NULL;
 }
 
@@ -1227,6 +1232,44 @@ db_check (query_instance_t * qi)
   return 1;
 }
 
+static caddr_t
+bif_log_index (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_instance_t *qi = (query_instance_t *) qst;
+  dbe_key_t * key = bif_key_arg (qst, args, 0, "log_index");
+  buffer_desc_t *buf;
+  it_cursor_t *itc;
+
+  sec_check_dba (qi, "backup_index");
+  memset (levels, 0, sizeof (levels));
+
+  itc = itc_create (NULL , qi->qi_trx);
+  itc_from (itc, key);
+  itc->itc_isolation = ISO_UNCOMMITTED;
+  ITC_FAIL (itc)
+    {
+      itc->itc_random_search = RANDOM_SEARCH_ON; /* do not use root image cache */
+      buf = itc_reset (itc);
+      itc->itc_random_search = RANDOM_SEARCH_OFF;
+      itc_try_land (itc, &buf);
+      /* the whole traversal is in landed (PA_WRITE() mode. page_transit_if_can will not allow mode change in transit */
+      if (!buf->bd_content_map)
+	{
+	  log_error ("Blog ref'referenced as index tree top node dp=%d key=%s\n", buf->bd_page, itc->itc_insert_key->key_name);
+	}
+      else
+	walk_dbtree (itc, &buf, 0, log_page, 0);
+      itc_page_leave (itc, buf);
+    }
+  ITC_FAILED
+    {
+      itc_free (itc);
+    }
+  END_FAIL (itc);
+  itc_free (itc);
+  return NULL;
+}
+
 void
 recovery_init (void)
 {
@@ -1234,6 +1277,7 @@ recovery_init (void)
   bif_define ("backup_row", bif_backup_row);
   bif_define ("backup_flush", bif_backup_flush);
   bif_define ("backup_close", bif_backup_close);
+  bif_define ("backup_index", bif_log_index);
 #if 0
   bif_define ("crash_recovery_log_check", bif_crash_recovery_log_check);
 #endif
diff --git a/libsrc/Wi/recovery.h b/libsrc/Wi/recovery.h
index 8a5ea44..28c935a 100644
--- a/libsrc/Wi/recovery.h
+++ b/libsrc/Wi/recovery.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: recovery.h,v 1.3.2.2 2009/04/18 21:55:13 source Exp $
+ *  $Id: recovery.h,v 1.3.2.3 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/regist.c b/libsrc/Wi/regist.c
index b050b52..01667d9 100644
--- a/libsrc/Wi/regist.c
+++ b/libsrc/Wi/regist.c
@@ -1,14 +1,14 @@
 /*
  *  regist.c
  *
- *  $Id: regist.c,v 1.13.2.6 2010/05/12 12:24:29 source Exp $
+ *  $Id: regist.c,v 1.13.2.7 2012/03/08 12:55:35 source Exp $
  *
  *  Database Registry
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/remote.h b/libsrc/Wi/remote.h
index b80e392..3db672f 100644
--- a/libsrc/Wi/remote.h
+++ b/libsrc/Wi/remote.h
@@ -1,14 +1,14 @@
 /*
  *  remote.h
  *
- *  $Id: remote.h,v 1.8.2.2 2009/06/08 14:27:18 source Exp $
+ *  $Id: remote.h,v 1.8.2.3 2012/03/08 12:55:35 source Exp $
  *
  *  Virtuoso Remote Data Source Access
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/rendezvous.c b/libsrc/Wi/rendezvous.c
index 616adcd..170ce1c 100644
--- a/libsrc/Wi/rendezvous.c
+++ b/libsrc/Wi/rendezvous.c
@@ -1,14 +1,14 @@
 /*
  *  rendezvous.c
  *
- *  $Id: rendezvous.c,v 1.5.2.3 2010/09/17 20:49:12 source Exp $
+ *  $Id: rendezvous.c,v 1.5.2.4 2012/03/08 12:55:35 source Exp $
  *
  *  Rendezvous registration for Virtuoso
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/rendezvous.h b/libsrc/Wi/rendezvous.h
index d536eff..2128fb9 100644
--- a/libsrc/Wi/rendezvous.h
+++ b/libsrc/Wi/rendezvous.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: rendezvous.h,v 1.2.2.1 2009/04/18 21:55:13 source Exp $
+ *  $Id: rendezvous.h,v 1.2.2.2 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/repl.h b/libsrc/Wi/repl.h
index d944e04..bbef864 100644
--- a/libsrc/Wi/repl.h
+++ b/libsrc/Wi/repl.h
@@ -1,12 +1,12 @@
 /*
  *  repl.h
  *
- *  $Id: repl.h,v 1.3.2.2 2010/09/17 16:35:47 source Exp $
+ *  $Id: repl.h,v 1.3.2.3 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/repl.sql b/libsrc/Wi/repl.sql
index e052022..08f7520 100644
--- a/libsrc/Wi/repl.sql
+++ b/libsrc/Wi/repl.sql
@@ -1,14 +1,14 @@
 --
 --  repl.sql
 --
---  $Id: repl.sql,v 1.4.2.2 2010/09/17 22:49:23 source Exp $
+--  $Id: repl.sql,v 1.4.2.4 2012/03/08 12:55:35 source Exp $
 --
 --  TRX replication support
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -1622,6 +1622,7 @@ create procedure __INT_REPL_ALTER_DROP_COL (in tb varchar, in col varchar,
 }
 ;
 
+--!AWK OVERWRITE
 create procedure __INT_REPL_ALTER_REDO_TRIGGERS (in tb varchar)
 {
   for (select
diff --git a/libsrc/Wi/replddk.sql b/libsrc/Wi/replddk.sql
index 56dd749..6caa32a 100644
--- a/libsrc/Wi/replddk.sql
+++ b/libsrc/Wi/replddk.sql
@@ -1,14 +1,14 @@
 --
 --  replddk.sql
 --
---  $Id: replddk.sql,v 1.2.2.1 2009/04/18 21:55:13 source Exp $
+--  $Id: replddk.sql,v 1.2.2.2 2012/03/08 12:55:35 source Exp $
 --
 --  TRX replication support tables definition
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/replsr.h b/libsrc/Wi/replsr.h
index 85cdb12..29d8e20 100644
--- a/libsrc/Wi/replsr.h
+++ b/libsrc/Wi/replsr.h
@@ -1,12 +1,12 @@
 /*
  *  replsr.h
  *
- *  $Id: replsr.h,v 1.3.2.2 2010/02/18 21:37:27 source Exp $
+ *  $Id: replsr.h,v 1.3.2.3 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/rltrx.c b/libsrc/Wi/rltrx.c
index 0013d25..a7f73cc 100644
--- a/libsrc/Wi/rltrx.c
+++ b/libsrc/Wi/rltrx.c
@@ -1,14 +1,14 @@
 /*
  *  rltrx.c
  *
- *  $Id: rltrx.c,v 1.18.2.19 2011/03/14 15:47:01 source Exp $
+ *  $Id: rltrx.c,v 1.18.2.22 2012/03/08 12:55:35 source Exp $
  *
  *  Locking concurrency control
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1491,6 +1491,8 @@ lt_transact (lock_trx_t * lt, int op)
       rdbg_printf (("Host %d:  Own rollback with lte=%d of %d:%d\n", local_cll.cll_this_host, lt->lt_error, LT_W_NO (lt)));
     }
   ASSERT_IN_TXN;
+  if (lt != wi_inst.wi_cpt_lt && wi_inst.wi_checkpoint_atomic)
+    log_error ("transact while cpt atomic, trx no %d, cpt trx no %d", lt->lt_trx_no, (wi_inst.wi_cpt_lt ? wi_inst.wi_cpt_lt->lt_trx_no : 0));
   if (lt->lt_threads != lt->lt_lw_threads + lt->lt_close_ack_threads + lt->lt_vdb_threads)
     {
       lt_log_debug ((
@@ -1519,9 +1521,9 @@ lt_transact (lock_trx_t * lt, int op)
       char user[16];
       char peer[32];
       dks_client_ip (lt->lt_client, from, user, peer, sizeof (from), sizeof (user), sizeof (peer));
-      log_info ("LTRS_1 %s %s %s %s transact %p %li", user, from, peer,
+      log_info ("LTRS_1 %s %s %s %s transact %p %d", user, from, peer,
 	  op == SQL_COMMIT ? "Commit" : "Rollback", lt,
-          lt->lt_client ? lt->lt_client->cli_autocommit : 0);
+          (int) (lt->lt_client ? lt->lt_client->cli_autocommit : 0));
     }
   lt->lt_status = LT_CLOSING;
 #ifdef PAGE_TRACE
@@ -1543,6 +1545,8 @@ lt_transact (lock_trx_t * lt, int op)
 	    pl_finalize_page (pl, itc);
 	  else
 	    pl_rollback_page (pl, itc);
+	  if (lt != wi_inst.wi_cpt_lt && wi_inst.wi_checkpoint_atomic)
+	    log_error ("transact while cpt atomic, trx no: %d, n locks %d", lt->lt_trx_no, n_locks);
 	  ITC_LEAVE_MAPS (itc);
 	}
       if (pl_arr != (page_lock_t**) &pl_arr_auto)
@@ -1581,6 +1585,8 @@ lt_transact (lock_trx_t * lt, int op)
   LT_CLOSE_ACK_THREADS(lt);
   lt->lt_close_ack_threads = 0;
   lt_resume_waiting_end (lt);
+  if (wi_inst.wi_cpt_lt != lt)
+    lt_wait_checkpoint ();
 #ifdef VIRTTP
   if (lt->lt_2pc._2pc_info)
     {
diff --git a/libsrc/Wi/row.c b/libsrc/Wi/row.c
index 6594011..9c449f8 100644
--- a/libsrc/Wi/row.c
+++ b/libsrc/Wi/row.c
@@ -1,14 +1,14 @@
 /*
  *  row.c
  *
- *  $Id: row.c,v 1.18.2.10 2010/12/22 10:25:44 source Exp $
+ *  $Id: row.c,v 1.18.2.13 2012/03/08 12:55:35 source Exp $
  *
  *  Row Operations.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -641,7 +641,7 @@ rd_alloc_box (row_delta_t * rd, int len, dtp_t dtp)
 }
 
 #define RD_IRI_BOX(val) \
-  { if (rd->rd_temp_fill + 16 < rd->rd_temp_max) \
+  { if (rd && (rd->rd_temp_fill + 16 < rd->rd_temp_max)) \
       { rd->rd_temp_fill += 16; *(int64*)(rd->rd_temp + rd->rd_temp_fill - 16) = DV_IRI_TAG_WORD_64; *(iri_id_t*)(rd->rd_temp + rd->rd_temp_fill - 8) = val; return (caddr_t)rd->rd_temp + rd->rd_temp_fill - 8;} \
     else \
       { caddr_t box = rd_alloc_box (rd, sizeof (iri_id_t), DV_IRI_ID); *((iri_id_t*)box) = val; return box;}}
@@ -2354,7 +2354,7 @@ row_set_col (row_fill_t * rf, dbe_col_loc_t * cl, caddr_t data)
 
     case DV_SINGLE_FLOAT:
       {
-	double df = unbox_float (data);
+	double df = IS_BOX_POINTER (data) ? unbox_float (data) : (double) (ptrlong) data;
 	float ft = (float) df;
 	FLOAT_TO_EXT (row + cl->cl_pos[rv], &ft);
 	return;
@@ -2362,7 +2362,7 @@ row_set_col (row_fill_t * rf, dbe_col_loc_t * cl, caddr_t data)
 
     case DV_DOUBLE_FLOAT:
       {
-	double df = unbox_double (data);
+	double df = IS_BOX_POINTER (data) ? unbox_double (data) : (double) (ptrlong) data;
 	DOUBLE_TO_EXT (row + cl->cl_pos[rv], &df);
 	return;
       }
diff --git a/libsrc/Wi/schspace.c b/libsrc/Wi/schspace.c
index c99e7bf..5fae66f 100644
--- a/libsrc/Wi/schspace.c
+++ b/libsrc/Wi/schspace.c
@@ -1,14 +1,14 @@
 /*
  *  schspace.c
  *
- *  $Id: schspace.c,v 1.2.2.1 2009/04/18 21:55:13 source Exp $
+ *  $Id: schspace.c,v 1.2.2.2 2012/03/08 12:55:35 source Exp $
  *
  *  schema space resolution functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/schspace.h b/libsrc/Wi/schspace.h
index d50c88f..210fa2f 100644
--- a/libsrc/Wi/schspace.h
+++ b/libsrc/Wi/schspace.h
@@ -1,12 +1,12 @@
 /*
  *  schspace.h
  *
- *  $Id: schspace.h,v 1.2.2.1 2009/04/18 21:55:13 source Exp $
+ *  $Id: schspace.h,v 1.2.2.2 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/scn3.c b/libsrc/Wi/scn3.c
index 1389bd2..fa4efcb 100644
--- a/libsrc/Wi/scn3.c
+++ b/libsrc/Wi/scn3.c
@@ -1634,14 +1634,14 @@ char *yytext;
 /*
  *  scn3.l
  *
- *  $Id: scn3.l,v 1.21.2.7 2010/10/27 12:51:33 source Exp $
+ *  $Id: scn3.l,v 1.21.2.9 2012/03/08 12:55:35 source Exp $
  *
  *  SQL Scanner
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2934,7 +2934,7 @@ YY_RULE_SETUP
 		   {
 		     caddr_t raw = t_strliteral (yytext + 5 /* == strlen("UNAME")*/);
 		     caddr_t tmp = box_dv_uname_nchars (raw, box_length (raw) - 1);
-		     box_dv_uname_make_immortal (tmp);
+		     /*box_dv_uname_make_immortal (tmp); -- No longer needed because memory pools keep lists of UNAMEs in use and can free them on destroy */
 		     yylval.box = tmp;
 		     RETURN_CODE (UNAME_LITERAL);
 		   }
diff --git a/libsrc/Wi/scn3.l b/libsrc/Wi/scn3.l
index 641993d..24ff27c 100644
--- a/libsrc/Wi/scn3.l
+++ b/libsrc/Wi/scn3.l
@@ -1,14 +1,14 @@
 /*
  *  scn3.l
  *
- *  $Id: scn3.l,v 1.21.2.7 2010/10/27 12:51:33 source Exp $
+ *  $Id: scn3.l,v 1.21.2.9 2012/03/08 12:55:35 source Exp $
  *
  *  SQL Scanner
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -769,7 +769,7 @@ EXEC[ \t]+SQL		{ sqlp_bin_op_serial = 0; BEGIN SQL;  }
 		   {
 		     caddr_t raw = t_strliteral (yytext + 5 /* == strlen("UNAME")*/);
 		     caddr_t tmp = box_dv_uname_nchars (raw, box_length (raw) - 1);
-		     box_dv_uname_make_immortal (tmp);
+		     /*box_dv_uname_make_immortal (tmp); -- No longer needed because memory pools keep lists of UNAMEs in use and can free them on destroy */
 		     yylval.box = tmp;
 		     RETURN_CODE (UNAME_LITERAL);
 		   }
diff --git a/libsrc/Wi/scn3split.c b/libsrc/Wi/scn3split.c
index fbdd667..c6abea1 100644
--- a/libsrc/Wi/scn3split.c
+++ b/libsrc/Wi/scn3split.c
@@ -1653,14 +1653,14 @@ char *scn3splityytext;
 /*
  *  scn3.l
  *
- *  $Id: scn3.l,v 1.21.2.7 2010/10/27 12:51:33 source Exp $
+ *  $Id: scn3.l,v 1.21.2.9 2012/03/08 12:55:35 source Exp $
  *
  *  SQL Scanner
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2953,7 +2953,7 @@ YY_RULE_SETUP
 		   {
 		     caddr_t raw = t_strliteral (scn3splityytext + 5 /* == strlen("UNAME")*/);
 		     caddr_t tmp = box_dv_uname_nchars (raw, box_length (raw) - 1);
-		     box_dv_uname_make_immortal (tmp);
+		     /*box_dv_uname_make_immortal (tmp); -- No longer needed because memory pools keep lists of UNAMEs in use and can free them on destroy */
 		     yylval.box = tmp;
 		     RETURN_CODE (UNAME_LITERAL);
 		   }
diff --git a/libsrc/Wi/search.c b/libsrc/Wi/search.c
index cc77346..adf3444 100644
--- a/libsrc/Wi/search.c
+++ b/libsrc/Wi/search.c
@@ -1,14 +1,14 @@
 /*
  *  search.c
  *
- *  $Id: search.c,v 1.35.2.27 2011/03/18 10:51:37 source Exp $
+ *  $Id: search.c,v 1.35.2.36 2012/03/08 12:55:35 source Exp $
  *
  *  Search
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -36,6 +36,7 @@
 
 
 short db_buf_const_length[256];
+dtp_t dtp_canonical[256];
 
 int  itc_random_leaf (it_cursor_t * itc, buffer_desc_t *buf, dp_addr_t * leaf_ret);
 int itc_down_rnd_check (it_cursor_t * itc, dp_addr_t leaf);
@@ -48,6 +49,7 @@ numeric_t num_int64_min;
 void
 const_length_init (void)
 {
+  int inx;
   db_buf_const_length[DV_SHORT_INT] = 2;
   db_buf_const_length[DV_LONG_INT] = 5;
   db_buf_const_length[DV_INT64] = 9;
@@ -72,6 +74,18 @@ const_length_init (void)
   num_int64_min = numeric_allocate ();
   numeric_from_int64 (num_int64_max, INT64_MAX);
   numeric_from_int64 (num_int64_min, INT64_MIN);
+  for (inx = 0; inx < 256; inx++)
+    dtp_canonical[inx] = inx;
+  dtp_canonical[DV_IRI_ID_8] = DV_IRI_ID;
+  dtp_canonical[DV_SHORT_INT] = DV_LONG_INT;
+  dtp_canonical[DV_INT64] = DV_LONG_INT;
+  dtp_canonical[DV_SHORT_STRING_SERIAL] = DV_STRING;
+  dtp_canonical[DV_C_STRING] = DV_STRING;
+  dtp_canonical[DV_WIDE] = DV_LONG_WIDE;
+  dtp_canonical[DV_TIMESTAMP] = DV_DATETIME;
+  dtp_canonical[DV_DATE] = DV_DATETIME;
+  dtp_canonical[DV_TIME] = DV_DATETIME;
+  dtp_canonical[DV_RDF_ID_8] = DV_RDF_ID;
 }
 
 
@@ -715,7 +729,7 @@ dv_compare (db_buf_t dv1, db_buf_t dv2, collation_t *collation, unsigned short o
 	break;
 
       case DV_IRI_ID:
-	ln1 = (iri_id_t) (unsigned long) LONG_REF_NA (dv1 + 1) + offset;
+	ln1 = (iri_id_t) (unsigned int32) LONG_REF_NA (dv1 + 1) + offset;
 	break;
       case DV_IRI_ID_8:
 	dtp1 = DV_IRI_ID;
@@ -1372,6 +1386,105 @@ itc_row_check (it_cursor_t * itc, buffer_desc_t * buf)
   return DVC_MATCH;
 }
 
+int
+itc_sample_row_check (it_cursor_t * itc, buffer_desc_t * buf)
+{
+  dbe_key_t *row_key = NULL;
+  /* Check the key id's and non-key columns. */
+  search_spec_t *sp;
+  dbe_key_t *key = itc->itc_insert_key;
+
+#if 0
+  if (itc->itc_insert_key && itc->itc_insert_key->key_is_bitmap && !itc->itc_no_bitmap)
+    return DVC_LESS;
+#endif
+
+  if (IE_KEY_VERSION (itc->itc_row_data) == itc->itc_insert_key->key_version)
+    itc->itc_row_key = itc->itc_insert_key;
+  else
+    {
+      ITC_REAL_ROW_KEY (itc);
+      if (!sch_is_subkey (isp_schema (NULL), itc->itc_row_key->key_id, itc->itc_insert_key->key_id))
+	return DVC_LESS;	/* Key specified but this ain't it */
+      row_key = itc->itc_row_key;
+    }
+  sp = itc->itc_row_specs;
+  if (sp)
+    {
+      do
+	{
+	  int op = sp->sp_min_op;
+	  search_spec_t sp_auto;
+
+	  if (row_key)
+	    {
+	      dbe_col_loc_t *cl = key_find_cl (row_key, sp->sp_cl.cl_col_id);
+	      if (cl)
+		{
+		  memcpy (&sp_auto, sp, sizeof (search_spec_t));
+		  sp = &sp_auto;
+		  sp->sp_cl = *cl;
+		}
+	      else
+		{
+		  dbe_column_t * col = sch_id_to_column (wi_inst.wi_schema, sp->sp_cl.cl_col_id);
+		  if (col)
+		    {
+		      if (DVC_CMP_MASK & op)
+			{
+			  if (0 == (op & cmp_boxes (col->col_default, itc->itc_search_params[sp->sp_min], sp->sp_collation, sp->sp_collation)))
+		            return DVC_LESS;
+			}
+		      else if (op == CMP_LIKE)
+			{
+			  caddr_t v = itc->itc_search_params[sp->sp_min];
+			  int st = LIKE_ARG_CHAR, pt = LIKE_ARG_CHAR;
+			  dtp_t rtype = DV_TYPE_OF (v);
+			  dtp_t ltype = DV_TYPE_OF (col->col_default);
+			  if (DV_WIDE == rtype || DV_LONG_WIDE == rtype)
+			    pt = LIKE_ARG_WCHAR;
+			  if (DV_WIDE == ltype || DV_LONG_WIDE == ltype)
+			    st = LIKE_ARG_WCHAR;
+			  if (DVC_MATCH != cmp_like (col->col_default, v, sp->sp_collation, sp->sp_like_escape, st, pt))
+			    return DVC_LESS;
+			}
+		      if (sp->sp_max_op != CMP_NONE
+			  && (0 == (sp->sp_max_op & cmp_boxes (col->col_default, itc->itc_search_params[sp->sp_max],
+				sp->sp_collation, sp->sp_collation))))
+			return DVC_LESS;
+		      goto next_sp;
+		    }
+		  return DVC_LESS;
+		}
+	    }
+
+	  if (ITC_NULL_CK (itc, sp->sp_cl))
+	    return DVC_LESS;
+	  if (DVC_CMP_MASK & op)
+	    {
+	      int res = page_col_cmp_1 (buf, itc->itc_row_data, &sp->sp_cl, itc->itc_search_params[sp->sp_min]);
+	      if (0 == (op & res) || (DVC_NOORDER & res))
+		return DVC_LESS;
+	    }
+	  else if (op == CMP_LIKE)
+	    {
+	      if (DVC_MATCH != itc_like_compare (itc, buf, itc->itc_search_params[sp->sp_min], sp))
+		return DVC_LESS;
+	      goto next_sp;
+	    }
+	  if (sp->sp_max_op != CMP_NONE)
+	    {
+	      int res = page_col_cmp_1 (buf, itc->itc_row_data, &sp->sp_cl, itc->itc_search_params[sp->sp_max]);
+	      if (0 == (sp->sp_max_op & res) || (DVC_NOORDER & res))
+		return DVC_LESS;
+	    }
+	next_sp:
+	  sp = sp->sp_next;
+	} while (sp);
+    }
+  return DVC_MATCH;
+}
+
 
 int
 itc_search (it_cursor_t * it, buffer_desc_t ** buf_ret)
@@ -2720,7 +2833,7 @@ em_ext_ra_pages (extent_map_t * em, it_cursor_t * itc, dp_addr_t ext_dp, dp_addr
 	    continue;
 	  leaves[fill++] = other_dp;
 	  if (fill >= max)
-	    break;
+	    return fill;
 	}
     }
   return fill;
@@ -2961,6 +3074,7 @@ itc_row_col_stat (it_cursor_t * itc, buffer_desc_t * buf)
 	  NEW_VARZ (col_stat_t, cs);
 	  sethash ((void*)current_col, itc->itc_st.cols, (void*) cs);
 	  cs->cs_distinct = id_hash_allocate (1001, sizeof (caddr_t), sizeof (caddr_t), treehash, treehashcmp);
+          id_hash_set_rehash_pct (cs->cs_distinct, 200);
 	  col_stat = cs;
 	}
 
@@ -3187,7 +3301,7 @@ itc_matches_on_page (it_cursor_t * itc, buffer_desc_t * buf, int * leaf_ctr_ret,
   int have_left_leaf = 0, was_left_leaf = 0;
   int pos = itc->itc_map_pos; /* itc is at leftmost match. Nothing at left of the itc */
   int save_pos = itc->itc_map_pos;
-  int ctr = 0, leaf_ctr = 0, row_ctr = 0;
+  int ctr = 0, leaf_ctr = 0, row_ctr = 0, row_match_ctr = 0;
   *ends_with_match = 0;
   for (pos = pos; pos < pm->pm_count; pos++)
     {
@@ -3215,6 +3329,9 @@ itc_matches_on_page (it_cursor_t * itc, buffer_desc_t * buf, int * leaf_ctr_ret,
 		break;
 	      sp = sp->sp_next;
 	    }
+	  if (r_kv && DVC_MATCH == res && itc->itc_row_specs && DVC_MATCH == itc_sample_row_check (itc, buf)) /* check dependant cols */
+	    row_match_ctr ++;
+
 	  if (DVC_MATCH == res)
 	    {
 	      if (r_kv)
@@ -3259,6 +3376,14 @@ itc_matches_on_page (it_cursor_t * itc, buffer_desc_t * buf, int * leaf_ctr_ret,
       int nth = (leaf_ctr * angle) / 1000;
       *alt_leaf_ret = leaves[MIN (nth, leaf_ctr - 1)];
     }
+  /* adjust estimate */
+  if (itc->itc_row_specs && row_ctr)
+    {
+      if (row_match_ctr)
+	ctr = (row_match_ctr * ctr) / row_ctr;
+      else
+	ctr = (int) ((float)ctr * MAX (0.05, ((float) row_ctr / ctr)));
+    }
   return ctr;
 }
 
@@ -3316,8 +3441,7 @@ itc_sample_1 (it_cursor_t * it, buffer_desc_t ** buf_ret, int64 * n_leaves_ret,
 	level_of_single_leaf_match = level;
     }
   if (leaf_estimate)
-    leaf_estimate = (((float)leaf_estimate) - 0.5) * (*buf_ret)->bd_content_map->pm_count * rows_per_bm
-+ leaf_ctr;
+    leaf_estimate = (((float)leaf_estimate) - 0.5) * (*buf_ret)->bd_content_map->pm_count * rows_per_bm + leaf_ctr;
   else if (leaf_ctr > 1)
     leaf_estimate = leaf_ctr - 1;
   if (rnd_leaf)
@@ -3421,7 +3545,7 @@ samples_stddev (int64 * samples, int n_samples, float * mean_ret, float * stddev
   *mean_ret = mean;
 }
 
-int enable_p_stat = 1;
+int32 enable_p_stat = 1;
 
 int
 itc_sample_is_rdf_p (it_cursor_t * itc)
diff --git a/libsrc/Wi/search_in.c b/libsrc/Wi/search_in.c
index 245047a..2da6145 100644
--- a/libsrc/Wi/search_in.c
+++ b/libsrc/Wi/search_in.c
@@ -1,14 +1,14 @@
 /*
  *  search_in.c
  *
- *  $Id: search_in.c,v 1.5.2.4 2010/02/01 12:53:44 source Exp $
+ *  $Id: search_in.c,v 1.5.2.6 2012/03/08 12:55:35 source Exp $
  *
  *  Search
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -367,6 +367,16 @@ match:
 CMPF_END
 
 
+CMPF_HEADER (iri64n_iri64n_anyn_gt_lt)
+IRI64K_NN (0, 0, lt, gt)
+IRI64K_NN (1, 1, lt, gt)
+ANYK1_NN (2, 2, lt, m1)
+m1:
+ANYK1_NN (2, 3, match, gt)
+match:
+CMPF_END
+
+
 CMPF_HEADER (iri64n_iri64n_lte)
 IRI64K_NN (0, 0, lt, gt)
 IRI64K_NN (1, 1, match, gt)
@@ -383,6 +393,14 @@ match:
 CMPF_END
 
 
+CMPF_HEADER (iri64n_anyn_iri64n)
+IRI64K_NN (0, 0, lt, gt)
+ANYK1_NN (1, 1, lt, gt)
+IRI64K_NN (2, 2, lt, gt)
+CMPF_END
+
+
+
 CMPF_HEADER (anyn_iri64n_iri64n_iri64n_lte)
 ANYK1_NN (0, 0, lt, gt)
 IRI64K_NN (1, 1, lt, gt)
@@ -639,6 +657,18 @@ search_inline_init ()
     {CMP_NONE, CMP_LTE, DV_IRI_ID_8, 1}
   SPF_END;
 
+  SPF (iri64n_anyn_iri64n)
+    {CMP_EQ, CMP_NONE, DV_IRI_ID_8, 1},
+    {CMP_EQ, CMP_NONE, DV_ANY, 1},
+    {CMP_EQ, CMP_NONE, DV_IRI_ID_8, 1}
+  SPF_END;
+
+  SPF (iri64n_iri64n_anyn_gt_lt)
+    {CMP_EQ, CMP_NONE, DV_IRI_ID_8, 1},
+    {CMP_EQ, CMP_NONE, DV_IRI_ID_8, 1},
+    {CMP_GT, CMP_LT, DV_ANY, 1}
+  SPF_END;
+
   SPF (iri64n_iri64n_anyn_iri64n_lte)
     {CMP_EQ, CMP_NONE, DV_IRI_ID_8, 1},
     {CMP_EQ, CMP_NONE, DV_IRI_ID_8, 1},
diff --git a/libsrc/Wi/security.c b/libsrc/Wi/security.c
index 0eb00b4..15182e0 100644
--- a/libsrc/Wi/security.c
+++ b/libsrc/Wi/security.c
@@ -1,14 +1,14 @@
 /*
  *  security.c
  *
- *  $Id: security.c,v 1.14.2.8 2010/11/11 15:53:45 source Exp $
+ *  $Id: security.c,v 1.14.2.9 2012/03/08 12:55:35 source Exp $
  *
  *  Security Checks
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/security.h b/libsrc/Wi/security.h
index 9a6b6e8..48b5075 100644
--- a/libsrc/Wi/security.h
+++ b/libsrc/Wi/security.h
@@ -1,12 +1,12 @@
 /*
  *  security.h
  *
- *  $Id: security.h,v 1.6.2.4 2010/11/11 15:53:46 source Exp $
+ *  $Id: security.h,v 1.6.2.5 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/shcompo.c b/libsrc/Wi/shcompo.c
index f7d3321..6be6de0 100644
--- a/libsrc/Wi/shcompo.c
+++ b/libsrc/Wi/shcompo.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: shcompo.c,v 1.3.2.10 2011/03/17 13:53:45 source Exp $
+ *  $Id: shcompo.c,v 1.3.2.12 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -324,6 +324,9 @@ shcompo_alloc__default (void *env)
 {
   shcompo_t *res = (shcompo_t *)dk_alloc (sizeof (shcompo_t));
   res->shcompo_data = NULL;
+#ifndef NDEBUG
+  res->shcompo_owner = NULL;
+#endif
   return res;
 }
 
diff --git a/libsrc/Wi/shcompo.h b/libsrc/Wi/shcompo.h
index 4941cd8..2cde214 100644
--- a/libsrc/Wi/shcompo.h
+++ b/libsrc/Wi/shcompo.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: shcompo.h,v 1.3.2.2 2010/11/26 10:47:00 source Exp $
+ *  $Id: shcompo.h,v 1.3.2.5 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -115,13 +115,14 @@ typedef struct shcompo_s
 #else
 #define SHC_ENTER(s) \
     do { \
+      if (THREAD_CURRENT_THREAD == (s)->shcompo_owner) GPF_T1 ("entering mtx twice"); \
       mutex_enter ((s)->shcompo_comp_mutex); \
       (s)->shcompo_owner = THREAD_CURRENT_THREAD; \
     } while (0)
 #define SHC_LEAVE(s) \
     do { \
-      mutex_leave ((s)->shcompo_comp_mutex); \
       (s)->shcompo_owner = NULL; \
+      mutex_leave ((s)->shcompo_comp_mutex); \
     } while (0)
 #define SHC_COMP_MTX_CHECK(s) \
     if ((s)->shcompo_comp_mutex && (s)->shcompo_owner != NULL) GPF_T
diff --git a/libsrc/Wi/shuric.c b/libsrc/Wi/shuric.c
index c423f00..8fcff81 100644
--- a/libsrc/Wi/shuric.c
+++ b/libsrc/Wi/shuric.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: shuric.c,v 1.4.2.2 2010/02/10 16:03:28 source Exp $
+ *  $Id: shuric.c,v 1.4.2.3 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/shuric.h b/libsrc/Wi/shuric.h
index c81cca2..c109cdc 100644
--- a/libsrc/Wi/shuric.h
+++ b/libsrc/Wi/shuric.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: shuric.h,v 1.4.2.1 2009/04/18 21:55:13 source Exp $
+ *  $Id: shuric.h,v 1.4.2.2 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/simile.sql b/libsrc/Wi/simile.sql
index 9b2d824..1610c49 100644
--- a/libsrc/Wi/simile.sql
+++ b/libsrc/Wi/simile.sql
@@ -1,10 +1,10 @@
 --
---  $Id: simile.sql,v 1.3 2008/11/19 11:24:53 source Exp $
+--  $Id: simile.sql,v 1.3.2.1 2012/03/08 12:55:35 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/snapshot_repl.sql b/libsrc/Wi/snapshot_repl.sql
index 9275fba..f7a90e2 100644
--- a/libsrc/Wi/snapshot_repl.sql
+++ b/libsrc/Wi/snapshot_repl.sql
@@ -1,12 +1,12 @@
 --
---  $Id: snapshot_repl.sql,v 1.3.2.1 2009/04/18 21:55:13 source Exp $
+--  $Id: snapshot_repl.sql,v 1.3.2.2 2012/03/08 12:55:35 source Exp $
 --
 --  SNP replication support
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/soap.h b/libsrc/Wi/soap.h
index 52d6278..58b2a2e 100644
--- a/libsrc/Wi/soap.h
+++ b/libsrc/Wi/soap.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: soap.h,v 1.5.2.1 2009/04/18 21:55:13 source Exp $
+ *  $Id: soap.h,v 1.5.2.2 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/soap.sql b/libsrc/Wi/soap.sql
index b10dd23..190f9c6 100644
--- a/libsrc/Wi/soap.sql
+++ b/libsrc/Wi/soap.sql
@@ -1,10 +1,10 @@
 --
---  $Id: soap.sql,v 1.11.2.4 2011/02/03 09:25:01 source Exp $
+--  $Id: soap.sql,v 1.11.2.7 2012/03/08 12:55:35 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -2284,7 +2284,7 @@ nxt:;
 		      </Error>', __SQL_STATE, __SQL_MESSAGE));
 	goto err;
       };
-      if (atoi (cfg_item_value (virtuoso_ini_path(), 'HTTPServer', 'ServerThreads')) < 2)
+      if (atoi (virtuoso_ini_item_value ('HTTPServer', 'ServerThreads')) < 2)
 	{
 	    result := xml_tree_doc (sprintf ('<Error>
 			  <Code>%V
@@ -2324,7 +2324,7 @@ err:;
 ?>
 </TD></TR></TABLE>
 </DIV>
-<DIV class="foot"><SPAN class="foot">Virtuoso Universal Server <?=sys_stat('st_dbms_ver')?> - Copyright© 1998-2011 OpenLink Software.</SPAN></DIV>
+<DIV class="foot"><SPAN class="foot">Virtuoso Universal Server <?=sys_stat('st_dbms_ver')?> - Copyright© 1998-2012 OpenLink Software.</SPAN></DIV>
  </BODY>
 </HTML>
 <?vsp
diff --git a/libsrc/Wi/soap12_router.xsl b/libsrc/Wi/soap12_router.xsl
index b49100b..31f4687 100644
--- a/libsrc/Wi/soap12_router.xsl
+++ b/libsrc/Wi/soap12_router.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: soap12_router.xsl,v 1.4 2009/04/09 13:22:13 source Exp $
+ -  $Id: soap12_router.xsl,v 1.4.2.1 2012/03/08 12:55:35 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/soap_import_sch.xsl b/libsrc/Wi/soap_import_sch.xsl
index 255f8c4..f2553ef 100644
--- a/libsrc/Wi/soap_import_sch.xsl
+++ b/libsrc/Wi/soap_import_sch.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: soap_import_sch.xsl,v 1.4 2009/04/09 13:22:13 source Exp $
+ -  $Id: soap_import_sch.xsl,v 1.4.2.1 2012/03/08 12:55:35 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/soap_sch.xsl b/libsrc/Wi/soap_sch.xsl
index 28e12b4..12519ff 100644
--- a/libsrc/Wi/soap_sch.xsl
+++ b/libsrc/Wi/soap_sch.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: soap_sch.xsl,v 1.4.2.1 2010/11/05 10:56:48 source Exp $
+ -  $Id: soap_sch.xsl,v 1.4.2.2 2012/03/08 12:55:35 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/soap_xmlrpc.xsl b/libsrc/Wi/soap_xmlrpc.xsl
index f4e8e1c..6f9f109 100644
--- a/libsrc/Wi/soap_xmlrpc.xsl
+++ b/libsrc/Wi/soap_xmlrpc.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -
- -  $Id: soap_xmlrpc.xsl,v 1.4 2009/04/09 13:22:13 source Exp $
+ -  $Id: soap_xmlrpc.xsl,v 1.4.2.1 2012/03/08 12:55:35 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sort.c b/libsrc/Wi/sort.c
index 7994e0c..530bbdf 100644
--- a/libsrc/Wi/sort.c
+++ b/libsrc/Wi/sort.c
@@ -1,14 +1,14 @@
 /*
  *  sort.c
  *
- *  $Id: sort.c,v 1.14.2.7 2010/02/01 01:45:35 source Exp $
+ *  $Id: sort.c,v 1.14.2.9 2012/03/08 12:55:35 source Exp $
  *
  *  SQL ORDER BY sort and DISTINCT
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -855,6 +855,6 @@ set_ctr_input (set_ctr_node_t * sctr, caddr_t * inst, caddr_t * state)
 void
 set_ctr_free (set_ctr_node_t * sctr)
 {
-
+  dk_set_free (sctr->sctr_continuable);
   clb_free (&sctr->clb);
 }
diff --git a/libsrc/Wi/space.c b/libsrc/Wi/space.c
index 4e710b5..3dd8218 100644
--- a/libsrc/Wi/space.c
+++ b/libsrc/Wi/space.c
@@ -1,14 +1,14 @@
 /*
  *  space.c
  *
- *  $Id: space.c,v 1.7.2.8 2011/03/18 10:51:37 source Exp $
+ *  $Id: space.c,v 1.7.2.10 2012/03/08 12:55:35 source Exp $
  *
  *  Delta spaces
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -42,6 +42,7 @@ int space_rehash_threshold = 2;
 
 
 
+int32 dbs_cache_check_enable = 0;
 
 void
 it_cache_check (index_tree_t * it, int mode)
@@ -68,7 +69,7 @@ it_cache_check (index_tree_t * it, int mode)
 	      /* This can be legitimate if a thread is in freeze mode and one itc is on a table scan and another is in order by or hash fill, so that the freeze is in the temp space operation . */
 	      /* error = 1; */
 	    }
-	  if (DPF_INDEX == SHORT_REF (buf->bd_buffer + DP_FLAGS)
+	  if (dbs_cache_check_enable && DPF_INDEX == SHORT_REF (buf->bd_buffer + DP_FLAGS)
 	      && IT_CHECK_FAST != mode)
 	    pg_check_map_1 (buf);
 	    if (buf->bd_is_dirty && !gethash (DP_ADDR2VOID (buf->bd_page), &itm->itm_remap))
diff --git a/libsrc/Wi/sparql.h b/libsrc/Wi/sparql.h
index e360ffe..0aebfbc 100644
--- a/libsrc/Wi/sparql.h
+++ b/libsrc/Wi/sparql.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql.h,v 1.58.2.25 2011/02/18 11:19:39 source Exp $
+ *  $Id: sparql.h,v 1.58.2.34 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -49,7 +49,7 @@ extern "C" {
 /*! Number of NULLs should match number of fields in rdf_val_range_t */
 #define SPART_RVR_LIST_OF_NULLS NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 
-#define SPAR_ALIAS		(ptrlong)1001
+#define SPAR_ALIAS		(ptrlong)1001	/*!< Alias, (expn AS ?varname). spar_dealias() is identity function for non-aliases and returns expn for aliases. Alias of alias can be treated as an error. */
 #define SPAR_BLANK_NODE_LABEL	(ptrlong)1002
 #define SPAR_BUILT_IN_CALL	(ptrlong)1003
 #define SPAR_CONV		(ptrlong)1004	/*!< Tree type for temporary use in SQL printer (conversion from one format to other) */
@@ -69,12 +69,77 @@ extern "C" {
 #define SPAR_WHERE_MODIFS	(ptrlong)1019
 #define SPAR_SERVICE_INV	(ptrlong)1020	/*!< Tree type for details of invocation of an external service endpoint */
 #define SPAR_BINDINGS_INV	(ptrlong)1021	/*!< Tree type for details of bindings associated with gp */
+#define SPAR_DEFMACRO		(ptrlong)1022
+#define SPAR_MACROCALL		(ptrlong)1023
+#define SPAR_MACROPU		(ptrlong)1024	/*!< Macro parameter usage --- the occurence of a variable name in a macro body */
+#define SPAR_MIN_TREE_TYPE	(ptrlong)1001
+#define SPAR_MAX_TREE_TYPE	(ptrlong)1024	/* Don't forget to adjust */
 /* Don't forget to update spart_count_specific_elems_by_type(), sparp_tree_full_clone_int(), sparp_tree_full_copy(), spart_dump() and comments inside typedef struct spar_tree_s */
 
+#define SPAR_BIF_ABS		(ptrlong)1101
+#define SPAR_BIF_BNODE		(ptrlong)1102
+#define SPAR_BIF_CEIL		(ptrlong)1103
+#define SPAR_BIF_COALESCE	(ptrlong)1104
+#define SPAR_BIF_CONCAT		(ptrlong)1105
+#define SPAR_BIF_CONTAINS	(ptrlong)1106
+#define SPAR_BIF_DAY		(ptrlong)1107
+#define SPAR_BIF_ENCODE_FOR_URI	(ptrlong)1108
+#define SPAR_BIF_FLOOR		(ptrlong)1109
+#define SPAR_BIF_HOURS		(ptrlong)1110
+#define SPAR_BIF_IF		(ptrlong)1111
+#define SPAR_BIF_ISBLANK	(ptrlong)1112
+#define SPAR_BIF_ISIRI		(ptrlong)1113
+#define SPAR_BIF_ISLITERAL	(ptrlong)1114
+#define SPAR_BIF_ISNUMERIC	(ptrlong)1115
+#define SPAR_BIF_ISREF		(ptrlong)1116
+#define SPAR_BIF_ISURI		(ptrlong)1117
+#define SPAR_BIF_LANGMATCHES	(ptrlong)1118
+#define SPAR_BIF_LCASE		(ptrlong)1119
+#define SPAR_BIF_MD5		(ptrlong)1120
+#define SPAR_BIF_MINUTES	(ptrlong)1121
+#define SPAR_BIF_MONTH		(ptrlong)1122
+#define SPAR_BIF_NOW		(ptrlong)1123
+#define SPAR_BIF_RAND		(ptrlong)1124
+#define SPAR_BIF_REGEX		(ptrlong)1125
+#define SPAR_BIF_REPLACE	(ptrlong)1126
+#define SPAR_BIF_ROUND		(ptrlong)1127
+#define SPAR_BIF_SAMETERM	(ptrlong)1128
+#define SPAR_BIF_SECONDS	(ptrlong)1129
+#define SPAR_BIF_SHA1		(ptrlong)1130
+#define SPAR_BIF_SHA224		(ptrlong)1131
+#define SPAR_BIF_SHA256		(ptrlong)1132
+#define SPAR_BIF_SHA384		(ptrlong)1133
+#define SPAR_BIF_SHA512		(ptrlong)1134
+#define SPAR_BIF_STR		(ptrlong)1135
+#define SPAR_BIF_STRDT		(ptrlong)1136
+#define SPAR_BIF_STRENDS	(ptrlong)1137
+#define SPAR_BIF_STRLANG	(ptrlong)1138
+#define SPAR_BIF_STRLEN		(ptrlong)1139
+#define SPAR_BIF_STRSTARTS	(ptrlong)1140
+#define SPAR_BIF_SUBSTR		(ptrlong)1141
+#define SPAR_BIF_TIMEZONE	(ptrlong)1142
+#define SPAR_BIF_TZ		(ptrlong)1143
+#define SPAR_BIF_UCASE		(ptrlong)1144
+#define SPAR_BIF_URI		(ptrlong)1145
+#define SPAR_BIF_YEAR		(ptrlong)1146
+
+#define SPAR_SML_CREATE		(ptrlong)1201
+#define SPAR_SML_DROP		(ptrlong)1202
+#define SPAR_SML_ATTACH		(ptrlong)1203
+#define SPAR_SML_DETACH		(ptrlong)1204
+
 #define SPARP_MAX_LEXDEPTH 50
 #define SPARP_MAX_SYNTDEPTH SPARP_MAX_LEXDEPTH+10
 
-#define SPARP_MAXLIMIT 0x7Fffffff /* Default value for LIMIT clause of SELECT */
+#define SPARP_MAXLIMIT -1 /*!< Default value for LIMIT clause of SELECT */
+
+#define SPARP_CALLARG	1 /*!< The parser reads the macro call */
+#define SPARP_DEFARG	2 /*!< The parser reads the arglist of a defmacro and remembers variable names as is in order to know what should be substituted in body */
+#define SPARP_DEFBODY	4 /*!< The parser reads the body of a defmacro and remembers positions of variables in argument lists */
+
+#define SPARP_PU_IN_TRIPLE	1
+#define SPARP_PU_IN_READ	2
+#define SPARP_PU_BGP		3
 
 struct spar_sqlgen_s;
 struct spar_tree_s;
@@ -97,7 +162,6 @@ typedef struct spar_lexbmk_s {
   ptrlong	sparlb_offset;
 } spar_lexbmk_t;
 
-
 #if 0
 typedef struct spar_query_s
   {
@@ -120,7 +184,7 @@ typedef struct spar_qm_ft_s {
   caddr_t	sparqft_type;		/*!< NULL for plain free-text index, something else for text xml index */
   SPART *	sparqft_ft_sqlcol;	/*!< Free-text indexed column */
   SPART **	sparqft_qmv_sqlcols;	/*!< Columns that are used in quad map value */
-  SPART **      sparqft_options;	/*!< Options as declared in 'OPTION (...)' list of 'TEXT LITERAL ...' clause */
+  SPART **	sparqft_options;	/*!< Options as declared in 'OPTION (...)' list of 'TEXT LITERAL ...' clause */
   int		sparqft_use_ctr;	/*!< Use counter. It is an error if a 'TEXT LITERAL ...' clause is not used in the QM statement */
 } spar_qm_ft_t;
 
@@ -139,8 +203,8 @@ typedef struct spar_propvariable_s {
 /*! Configuration of RDF grabber, A.K.A. 'IRI resolver'. */
 typedef struct rdf_grab_config_s {
     int		rgc_pview_mode;		/*!< The query is executed using procedure view that will form a result-set by calling more than one statement via exec() */
-    int		rgc_all;		/*!< Automatically add all IRI constants/vars (except P) to spare_grab_consts */
-    int		rgc_intermediate;	/*!< Automatically add all IRI constants/vars (except P) to spare_grab_consts */
+    int		rgc_all;		/*!< Automatically add all IRI constants/vars (except P) to spare_src.ssrc_grab_consts */
+    int		rgc_intermediate;	/*!< Automatically add all IRI constants/vars (except P) to spare_src.ssrc_grab_consts */
     dk_set_t	rgc_consts;		/*!< Constants to be used as names of additional graphs */
     dk_set_t	rgc_vars;		/*!< Names of variables whose values should be used as names of additional graphs */
     dk_set_t	rgc_sa_graphs;		/*!< SeeAlso graph names. Every time a value can be downloaded, its seeAlso values can also be downloaded */
@@ -164,6 +228,7 @@ typedef struct sparp_sources_s
   {
     rdf_grab_config_t	ssrc_grab;			/*!< Grabber configuration */
     dk_set_t		ssrc_common_sponge_options;	/*!< Options that are added to every FROM ... OPTION ( ... ) list */
+    SPART *		ssrc_graph_set_by_with;		/*!< The precode expression of WITH clause, if exists */
     dk_set_t		ssrc_default_graphs;		/*!< Default graphs and NOT FROM graphs as set by protocol or FROM graph-uri-precode. All NOT FROM are after all FROM! */
     dk_set_t		ssrc_named_graphs;		/*!< Named graphs and NOT FROM NAMED graphs as set by protocol or clauses. All NOT FROM NAMED are after all FROM NAMED! */
     int			ssrc_default_graphs_listed;	/*!< At least one default graph was set, so the list of default graphs is exhaustive even if empty or consists of solely NOT FROM (NOT FROM may remove all FROM, making the list empty) */
@@ -172,16 +237,6 @@ typedef struct sparp_sources_s
     int			ssrc_named_graphs_locked;	/*!< Named graphs are set by protocol and can not be overwritten. There's no locking for NOT FROM NAMED */
   } sparp_sources_t;
 
-#define spare_grab			spare_src.ssrc_grab
-#define spare_common_sponge_options	spare_src.ssrc_common_sponge_options
-#define spare_default_graphs		spare_src.ssrc_default_graphs
-#define spare_named_graphs		spare_src.ssrc_named_graphs
-#define spare_default_graphs_listed	spare_src.ssrc_default_graphs_listed
-#define spare_named_graphs_listed	spare_src.ssrc_named_graphs_listed
-#define spare_default_graphs_locked	spare_src.ssrc_default_graphs_locked
-#define spare_named_graphs_locked	spare_src.ssrc_named_graphs_locked
-
-
 /* When a new field is added here, please check whether it should be added to sparp_clone_for_variant () */
 typedef struct sparp_env_s
   {
@@ -225,6 +280,8 @@ typedef struct sparp_env_s
     dk_set_t		spare_context_gp_subtypes;	/*!< Subtypes of not-yet-completed graph patterns */
     dk_set_t		spare_acc_triples;		/*!< Sets of accumulated triples of GPs */
     dk_set_t		spare_acc_filters;		/*!< Sets of accumulated filters of GPs */
+    int			spare_ctor_dflt_g_tmpl_count;	/*!< For CONSTRUCT and the like --- count of triple templates in the default graph, should be reset to zero after ctor to deal with DELETE{...} INSERT{...} */
+    int			spare_ctor_g_grp_count;		/*!< For CONSTRUCT and the like --- count of graph {...} groups of triple templates, should be reset to zero after ctor to deal with DELETE{...} INSERT{...} */
     SPART **		spare_bindings_vars;		/*!< List of variables enumerated in local BINDINGS Var+ list */
     SPART ***		spare_bindings_rowset;		/*!< Array of arrays of values in BINDINGS {...} */
     dk_set_t		spare_good_graph_varnames;	/*!< Varnames found in non-optional triples before or outside, (including non-optional inside previous non-optional siblings), but not after or inside */
@@ -279,7 +336,7 @@ typedef struct sparp_s {
 #ifdef XPYYDEBUG
   int sparp_yydebug;
 #endif
-  caddr_t sparp_text;
+  ccaddr_t sparp_text;
   int sparp_permitted_syntax;		/*!< Bitmask of permitted syntax extensions, 0 for default */
   int sparp_unictr;			/*!< Unique counter for objects */
 /* Environment of yacc */
@@ -308,10 +365,22 @@ typedef struct sparp_s {
   spar_lexem_t * sparp_curr_lexem_buf_fill;	/*!< Number of lexems in \c sparp_curr_lexem_buf */
 /* Environment of term rewriter of the SPARQL-to-SQL compiler */
   dk_set_t sparp_propvars;		/*!< Set of propvars with distinct \c sparv_key fields that were ever used in the query */
-  struct quad_storage_s	*sparp_storage;		/*!< Default storage that handles arbitrary quads of any sort plus maybe SPMJVs and relational mappings made by user, usually rdf_sys_storage */
+  struct quad_storage_s	*sparp_storage;	/*!< Default storage that handles arbitrary quads of any sort plus maybe SPMJVs and relational mappings made by user, usually rdf_sys_storage */
+  int sparp_storage_is_set;		/*!< The field sparp_storage is set (or at least tried to set with error and the attempt to set should not be retried) */
+  dk_set_t sparp_macro_libs;		/*!< List of IRIs of used macro libraries. */
+  int sparp_disable_storage_macro_lib;	/*!< If nonzero, the macro library of the quad storage is not used. This is set e.g. when the query to compile is the declaration of the macro lib by itself. */
   struct sparp_trav_params_s *sparp_stp;	/*!< Parameters of traverse (callbacks in use). It is filled in by sparp_gp_grav() only, not by sparp_gp_grav_int() */
   struct sparp_trav_state_s *sparp_stss;	/*!< Stack of traverse states. [0] is fake for parent on 'where', [1] is for 'where' etc. */
   sparp_globals_t *sparp_sg;		/*!< Pointer to data common for all sparp_t-s for whole stack of nested sparp-s */
+  int sparp_macrolib_ignore_create;	/*!< True if define input:macrolib-ignore-create is set */
+  caddr_t sparp_macrolib_to_create;	/*!< IRI of macro lib that should be created, NULL if that's not a CREATE MACRO LIBRARY statement */
+  int sparp_macro_mode;			/*!< Indicator of special mode of parsing DEFMACRO arguments, body, or invocation */
+  SPART **sparp_macro_defs;		/*!< Array of locally defined macro defs, with an unused end */
+  int sparp_macro_def_count;		/*!< Count of used items in \c sparp_macro_defs */
+  dk_set_t sparp_funnames_in_defmacros;	/*!< All names of functions used inside bodies of macro definitions. They should not be used later as names of new macro defs, to avoid confusion. */
+  SPART * sparp_current_macro;		/*!< The body of the macro that is being defined now */
+  int sparp_macro_call_count;		/*!< If nonzero then macroexpansion should be made */
+  int sparp_first_equiv_idx;		/*!< The index of the first equivalence class allocated in this sparp, to avoid integrity checks of incomplete equivs of outer sparps */
   int sparp_rewrite_dirty;		/*!< An integer that is incremented when any optimization subroutine rewrites the tree. */
   int sparp_trav_running;		/*!< Flags that some traverse is in progress, in order to GPF if traverse procedure re-enters */
   ccaddr_t *sparp_sprintff_isect_buf;	/*!< Temporary buffer to calculate intersections of value ranges; solely for sparp_rvr_intersect_sprintffs() */
@@ -356,7 +425,10 @@ extern void spar_error_if_unsupported_syntax_imp (sparp_t *sparp, int feature_in
 #define tr_subject	tr_fields[1]
 #define tr_predicate	tr_fields[2]
 #define tr_object	tr_fields[3]
-#define SPART_TRIPLE_FIELDS_COUNT 4
+#define SPART_TRIPLE_FIELDS_COUNT	4
+#define SPART_VAR_OUTSIDE_TRIPLE	5	/*!< This is a value set to var.tr_idx of variables and bnodes in FILTERs, return expressions and other const reads */
+
+extern ptrlong sparp_tr_usage_natural_restrictions[SPART_TRIPLE_FIELDS_COUNT];
 
 /* These values should be greater than any SQL opcode AND greater than 0x7F to not conflict with codepoints of "syntactically important" chars AND less than 0xFF to not conflict with YACC IDs for keywords. */
 #define SPART_GRAPH_FROM		0x100
@@ -447,7 +519,8 @@ typedef struct spar_tree_s
       } bin_exp;
     struct {
         /* #define SPAR_BUILT_IN_CALL	(ptrlong)1003 */
-        ptrlong btype;
+        ptrlong btype;		/*!< Type of particular BIF, as lexem (for lexems other than SPARQL_BIF) or SPAR_BIF_xxx */
+        ptrlong desc_ofs;	/*!< The offset of BIF description in \c sparp_bif_descs array */
         SPART **args;
       } builtin;
     struct {
@@ -590,7 +663,7 @@ typedef struct spar_tree_s
       } wm;
     struct {
         /* define SPAR_SERVICE_INV	(ptrlong)1020 */
-        ptrlong own_idx;	/*!< Boxed serial of the sinv in the parser */
+        ptrlong own_idx;	/*!< Serial of the sinv in the parser */
         caddr_t endpoint;	/*!< An IRI of web service endpoint without static parameters */
         SPART **iri_params;	/*!< A get_keyword style array of parameters to pass in the IRI, like maxrows */
         caddr_t syntax;		/*!< Boxed bitmask of SSG_SD_xxx flags of allowed query serialization features */
@@ -603,10 +676,35 @@ typedef struct spar_tree_s
       } sinv;
     struct {
         /* define SPAR_BINDINGS_INV		(ptrlong)1021 */
-        ptrlong own_idx;	/*!< Boxed serial of the bindings invocation in the parser */
+        ptrlong own_idx;	/*!< Serial of the bindings invocation in the parser */
         SPART *vars;		/*!< Names of variables that are passed as parameters */
-	SPART ***data_rows;	/*!< Rows of data. Note that they're not copied from spare_bindings_rowset and not duplicated if enclosing GP is duplicated. */
+        SPART ***data_rows;	/*!< Rows of data. Note that they're not copied from spare_bindings_rowset and not duplicated if enclosing GP is duplicated. */
       } binv;
+    struct {
+        /* define SPAR_DEFMACRO			(ptrlong)1022 */
+        ptrlong subtype;
+        caddr_t mname;		/*!< IRI of the macro */
+        caddr_t sml_iri;	/*!< IRI UNAME of SPARQL macro library where the macro comes from (as a result of define input:macro-lib... ) */
+        caddr_t *paramnames;	/*!< Names of parameters */
+        caddr_t *localnames;	/*!< Names of variables listed in LOCAL (...) clause */
+        SPART **quad_pattern;	/*!< The template of triple (or quad) patterns */
+        SPART *body;		/*!< The body of the macro, as group graph pattern or scalar expression */
+        caddr_t selid;		/*!< Outermost selid of the \c defmacro.body */
+        ptrlong aggregate_count;  /*!< Count of aggregate functions used inside the \c defmacro.body */
+      } defmacro;
+    struct {
+        /* #define SPAR_MACROCALL		(ptrlong)1023 */
+        caddr_t mname;
+        SPART **argtrees;
+        SPART *context_graph;
+        caddr_t mid;
+      } macrocall;
+    struct {
+        /* #define SPAR_MACROPU		(ptrlong)1024 */
+        caddr_t pname;
+        ptrlong pindex;
+        ptrlong pumode;
+      } macropu;
   } _;
 } sparp_tree_t;
 
@@ -618,8 +716,18 @@ typedef unsigned char SPART_buf[sizeof (sparp_tree_t) + BOX_AUTO_OVERHEAD];
     (ptr)->type = t; \
     } while (0)
 
-extern sparp_t * sparp_query_parse (char * str, spar_query_env_t *sparqre, int rewrite_all);
+#ifndef NDEBUG
+extern SPART **t_spartlist_concat (SPART **list1, SPART **list2);
+#else
+#define t_spartlist_concat(list1,list2) ((SPART **)(t_list_concat((SPART **)(list1), (SPART **)(list2))))
+#endif
+
+extern sparp_t * sparp_query_parse (const char * str, spar_query_env_t *sparqre, int rewrite_all);
 extern int sparyyparse (void *sparp);
+/*! Finds storage by name and sets it, it also finds associated macro library (it it is set of the storage) and copies macro defs from the library
+The search for associated macro lib is disabled if the statement contains CREATE MACRO LIBRARY clause */
+extern void sparp_configure_storage_and_macro_libs (sparp_t *sparp);
+extern void sparp_compile_smllist (sparp_t *sparp, caddr_t sml_iri_uname, void /* actually struct sparql_macro_library_t */ *smlib);
 
 extern const char *spart_dump_opname (ptrlong opname, int is_op);
 extern void spart_dump (void *tree_arg, dk_session_t *ses, int indent, const char *title, int hint);
@@ -662,6 +770,19 @@ extern void spart_dump (void *tree_arg, dk_session_t *ses, int indent, const cha
 #define SPAR_FT_XQUERY_CONTAINS	14
 #define SPAR_GEO_CONTAINS	21
 
+/*! The context of the macro processor */
+typedef struct spar_mproc_ctx_s {
+  SPART *smpc_context_gp;		/*!< A gp where the macroexpansion takes place, if notnull. */
+  caddr_t smpc_context_selid;		/*!< Selid of gp where the macroexpansion takes place. If notnull. */
+  caddr_t smpc_defbody_topselid;	/*!< The topmost selid of a defbody. it is replaced with smpc_context_selid when the body is instantiated. */
+  caddr_t smpc_defbody_currselid;	/*!< The current selid inside a defbody. It is replaced with concatenation of smpc_context_selid and itself when the body is instantiated. */
+  SPART *smpc_defm;			/*!< The defmacro that is being instantiated ATM */
+  SPART *smpc_mcall;			/*!< The macro call that should be replaced with the instantiated \c smpc_defm */
+  SPART **smpc_ins_membs;		/*!< Members made by the instantiation of gp macro that should be placed to the end of list of members of the context */
+  SPART **smpc_ins_filts;		/*!< Filters made by the instantiation of gp macro that should be placed to the end of list of filters of the context */
+  int smpc_unictr;			/*!< An unique serial number of the processor invocation. */
+} spar_mproc_ctx_t;
+
 extern caddr_t spar_var_name_of_ret_column (SPART *tree);
 extern caddr_t spar_alias_name_of_ret_column (SPART *tree);
 /*! If the tree has a fixed value that is either plain SQL value or a QName (but not a typed literal or a literal with language)
@@ -716,14 +837,24 @@ extern void sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_typ
 extern caddr_t spar_selid_push (sparp_t *sparp);
 extern caddr_t spar_selid_push_reused (sparp_t *sparp, caddr_t selid);
 extern caddr_t spar_selid_pop (sparp_t *sparp);
+
+extern SPART *spar_find_defmacro_by_iri_or_fields (sparp_t *sparp, caddr_t mname, SPART **fields);
+extern void sparp_defmacro_store (sparp_t *sparp, SPART *defm);
+extern SPART *sparp_defmacro_init (sparp_t *sparp, caddr_t mname);
+extern void sparp_make_defmacro_paramnames_from_template (sparp_t *sparp, SPART *defm);
+extern void sparp_defmacro_finalize (sparp_t *sparp, SPART *body);
+extern void sparp_check_dm_arg_for_redecl (sparp_t *sparp, dk_set_t recent, caddr_t dm_arg_vname);
 extern void spar_gp_init (sparp_t *sparp, ptrlong subtype);
 #define SPARP_ENV_CONTEXT_GP_SUBTYPE(sparp) ((ptrlong)((sparp)->sparp_env->spare_context_gp_subtypes->data))
 extern SPART *spar_gp_finalize (sparp_t *sparp, SPART **options);
 extern SPART *spar_gp_finalize_with_subquery (sparp_t *sparp, SPART **options, SPART *subquery);
 extern void spar_gp_add_member (sparp_t *sparp, SPART *memb);
-/*! Makes and adds a triple or a filter like CONTAINS or a SELECT group for transitive prop or a UNION prop with inverse props or combination of few, with optional filter on graph.
-\c banned tricks is a bitmask that is 0 by default, 0x1 to ignore transitivity in inf rules or options, 0x2 to ignore inverse props */
-extern SPART *spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subject, SPART *predicate, SPART *object, caddr_t qm_iri, SPART **options, int banned_tricks);
+#define SPAR_ADD_TRIPLELIKE_NO_TRANSITIVE	0x1 /*!< ignore transitivity in inf rules or options */
+#define SPAR_ADD_TRIPLELIKE_NO_INV_UNION	0x2 /*!< ignore inverse props */
+#define SPAR_ADD_TRIPLELIKE_NO_MACRO		0x4 /*!< ignore macro */
+/*! Makes and adds a triple or a macro call or a filter like CONTAINS or a SELECT group for transitive prop or a UNION prop with inverse props or combination of few, with optional filter on graph.
+\c banned tricks is a bitmask that is 0 by default, SPAR_ADD_TRIPLELIKE_NO_xxx */
+extern SPART *spar_gp_add_triplelike (sparp_t *sparp, SPART *graph, SPART *subject, SPART *predicate, SPART *object, caddr_t qm_iri, SPART **options, int banned_tricks);
 /*! Checks if the given \c filt is a freetext filter. If it is so and \c base_triple is not NULL then it additionally checks if var name matches */
 extern int spar_filter_is_freetext (sparp_t *sparp, SPART *filt, SPART *base_triple);
 extern void spar_gp_add_filter (sparp_t *sparp, SPART *filt);
@@ -731,8 +862,14 @@ extern void spar_gp_add_filters_for_graph (sparp_t *sparp, SPART *graph_expn, in
 extern void spar_gp_add_filters_for_named_graph (sparp_t *sparp);
 extern SPART *spar_make_list_of_sources_expn (sparp_t *sparp, ptrlong from_subtype, ptrlong from_group_subtype, ptrlong from2_subtype, ptrlong req_perms, SPART *needle_in);
 extern SPART *spar_add_propvariable (sparp_t *sparp, SPART *lvar, int opcode, SPART *verb_qname, int verb_lexem_type, caddr_t verb_lexem_text);
+/*! Creates a tree for service invocation but does not add it to the array of all invocations.
+Use spar_add_service_inv_to_sg() to assign sinv.own_idx and store it in sparp->sparp_sg->sg_sinvs .
+Also make sure that sparp->sparp_query_uses_sinvs++ is made somewhere before the creation for the current sparp. */
 extern SPART *spar_make_service_inv (sparp_t *sparp, caddr_t endpoint, dk_set_t all_options, ptrlong permitted_syntax, SPART **sources, caddr_t sinv_storage_uri);
+/*! Assigns sinv->_.sinv.own_idx and store the pointer to invocation in sparp->sparp_sg->sg_sinvs. After that it is legal to refer to quad maps inside the sinv and to try optimizations */
+extern void spar_add_service_inv_to_sg (sparp_t *sparp, SPART *sinv);
 extern caddr_t spar_compose_report_flag (sparp_t *sparp);
+extern SPART *spar_simplify_graph_to_patch (sparp_t *sparp, SPART *g);
 extern void spar_compose_retvals_of_construct (sparp_t *sparp, SPART *top, SPART *ctor_gp, const char *formatter, const char *agg_formatter, const char *agg_mdata);
 extern void spar_compose_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top, SPART *graph_to_patch, SPART *ctor_gp);
 extern void spar_compose_retvals_of_modify (sparp_t *sparp, SPART *top, SPART *graph_to_patch, SPART *del_ctor_gp, SPART *ins_ctor_gp);
@@ -742,30 +879,44 @@ extern void spar_optimize_retvals_of_modify (sparp_t *sparp, SPART *top);
 extern SPART **spar_retvals_of_describe (sparp_t *sparp, SPART **retvals, SPART *limit, SPART *offset);
 extern void spar_add_rgc_vars_and_consts_from_retvals (sparp_t *sparp, SPART **retvals);
 extern SPART *spar_make_wm (sparp_t *sparp, SPART *pattern, SPART **groupings, SPART *having, SPART **order, SPART *limit, SPART *offset);
+/*! Creates SPAR_REQ_TOP tree or a codegen for some special case. A macroexpansion is made before recognizing special cases. */
 extern SPART *spar_make_top_or_special_case_from_wm (sparp_t *sparp, ptrlong subtype, SPART **retvals,
   caddr_t retselid, SPART *wm );
 extern void spar_alloc_fake_equivs_for_bindings_inv (sparp_t *sparp, SPART *binv);
-extern SPART **spar_make_sources_like_top (sparp_t *sparp);
+extern SPART **spar_make_sources_like_top (sparp_t *sparp, ptrlong top_subtype);
 extern SPART *spar_make_top (sparp_t *sparp, ptrlong subtype, SPART **retvals,
   caddr_t retselid, SPART *pattern, SPART **groupings, SPART *having, SPART **order, SPART *limit, SPART *offset);
 extern SPART *spar_make_plain_triple (sparp_t *sparp, SPART *graph, SPART *subject, SPART *predicate, SPART *object, caddr_t qm_iri_or_pair, SPART **options);
 extern SPART *spar_make_param_or_variable (sparp_t *sparp, caddr_t name);
 extern SPART *spar_make_variable (sparp_t *sparp, caddr_t name);
+extern SPART *spar_make_macropu (sparp_t *sparp, caddr_t name, ptrlong pos);
 extern SPART *spar_make_blank_node (sparp_t *sparp, caddr_t name, int bracketed);
 extern SPART *spar_make_fake_blank_node (sparp_t *sparp); /*!< Not for use in real parse trees! */
 extern SPART *spar_make_typed_literal (sparp_t *sparp, caddr_t strg, caddr_t type, caddr_t lang);
 extern void sparp_make_and_push_new_graph_source (sparp_t *sparp, ptrlong subtype, SPART *iri_expn, SPART **options);
 extern SPART *sparp_make_graph_precode (sparp_t *sparp, ptrlong subtype, SPART *iriref, SPART **options);
-extern SPART *spar_default_sparul_target (sparp_t *sparp, const char *clause_type);
+extern SPART *spar_default_sparul_target (sparp_t *sparp, const char *clause_type, int may_return_null);
 extern SPART *spar_make_regex_or_like_or_eq (sparp_t *sparp, SPART *strg, SPART *regexpn);
 extern void spar_verify_funcall_security (sparp_t *sparp, ccaddr_t fname, SPART **args);
 extern SPART *spar_make_funcall (sparp_t *sparp, int aggregate_mode, const char *funname, SPART **arguments);
-extern SPART *spar_make_sparul_clear (sparp_t *sparp, SPART *graph_precode);
-extern SPART *spar_make_sparul_load (sparp_t *sparp, SPART *graph_precode, SPART *src_precode);
+extern SPART *sparp_make_builtin_call (sparp_t *sparp, ptrlong bif_id, SPART **arguments);
+extern SPART *sparp_make_macro_call (sparp_t *sparp, caddr_t funname, int call_is_explicit, SPART **arguments);
+extern int sparp_namesake_macro_param (sparp_t *sparp, SPART *dm, caddr_t param_name);
+extern SPART *spar_make_sparul_clear (sparp_t *sparp, SPART *graph_precode, int silent);
+extern SPART *spar_make_sparul_load (sparp_t *sparp, SPART *graph_precode, SPART *src_precode, int silent);
 extern SPART *spar_make_sparul_create (sparp_t *sparp, SPART *graph_precode, int silent);
 extern SPART *spar_make_sparul_drop (sparp_t *sparp, SPART *graph_precode, int silent);
+extern SPART *spar_make_sparul_copymoveadd (sparp_t *sparp, ptrlong opcode, SPART *from_graph_precode, SPART *to_graph_precode, int silent);
+
 extern SPART *spar_make_topmost_sparul_sql (sparp_t *sparp, SPART **actions);
 extern SPART *spar_make_fake_action_solution (sparp_t *sparp);
+extern SPART *spar_make_drop_macro_lib (sparp_t *sparp, SPART *sml_precode, int silent);
+
+/*! Do nothing or macroexpand something locally or alters values by spar_macroprocess_treelist. Returns new version of \c trees, destroying and/or reusing the original */
+extern SPART **spar_macroprocess_define_list (sparp_t *sparp, SPART **trees, spar_mproc_ctx_t *ctx);
+/*! Do nothing or macroexpand something locally or alters the whole list by inserting new items (if an item is expanded into list). Returns new version of \c trees, destroying and/or reusing the original */
+extern SPART **spar_macroprocess_treelist (sparp_t *sparp, SPART **trees, int begin_with, spar_mproc_ctx_t *ctx);
+extern SPART *spar_macroprocess_tree (sparp_t *sparp, SPART *tree, spar_mproc_ctx_t *ctx);
 
 extern void spar_fill_lexem_bufs (sparp_t *sparp);
 extern void spar_copy_lexem_bufs (sparp_t *tgt_sparp, spar_lexbmk_t *begin, spar_lexbmk_t *end, int skip_last_n);
@@ -792,10 +943,14 @@ extern void spar_qm_pop_key (sparp_t *sparp, int key_to_pop);
 
 extern caddr_t spar_make_iri_from_template (sparp_t *sparp, caddr_t tmpl);
 
+#define SPAR_TABLE_IS_SQLQUERY(strg) (('/' == strg[0]) && ('*' == strg[1]))
+#define SPAR_SQLQUERY_PLACE(strg) t_box_dv_short_nchars (strg + 2, strstr (strg, "*/") - (strg+2))
+
+extern caddr_t spar_qm_table_or_sqlquery_report_name (caddr_t atbl);
 extern caddr_t spar_qm_find_base_alias (sparp_t *sparp, caddr_t descendant_alias);
-extern caddr_t spar_qm_find_base_table (sparp_t *sparp, caddr_t descendant_alias);
+extern caddr_t spar_qm_find_base_table_or_sqlquery (sparp_t *sparp, caddr_t descendant_alias);
 extern dk_set_t spar_qm_find_descendants_of_alias (sparp_t *sparp, caddr_t base_alias);
-extern void spar_qm_add_aliased_table (sparp_t *sparp, caddr_t parent_qtable, caddr_t new_alias);
+extern void spar_qm_add_aliased_table_or_sqlquery (sparp_t *sparp, caddr_t parent_qtable, caddr_t new_alias);
 extern void spar_qm_add_aliased_alias (sparp_t *sparp, caddr_t parent_alias, caddr_t new_alias);
 extern void spar_qm_add_table_filter (sparp_t *sparp, caddr_t tmpl);
 extern void spar_qm_add_text_literal (sparp_t *sparp, caddr_t ft_type, caddr_t ft_table_alias, SPART *ft_col, SPART **qmv_cols, SPART **options);
diff --git a/libsrc/Wi/sparql.sql b/libsrc/Wi/sparql.sql
index a1d8933..b114497 100644
--- a/libsrc/Wi/sparql.sql
+++ b/libsrc/Wi/sparql.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sparql.sql,v 1.205.2.91 2011/03/29 22:55:27 source Exp $
+--  $Id: sparql.sql,v 1.205.2.146 2012/03/15 12:00:39 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -36,6 +36,13 @@ create distinct no primary key ref bitmap index RDF_QUAD_GS on RDF_QUAD (G, S) p
 create distinct no primary key ref index RDF_QUAD_OP on RDF_QUAD (O, P) partition (O varchar (-1, 0hexffff))
 ;
 
+create table DB.DBA.RDF_QUAD_RECOV_TMP (
+  G1 IRI_ID_8,  S1 IRI_ID_8,  P1 IRI_ID_8,  O1 any,  primary key (P1, S1, O1, G1))
+alter index RDF_QUAD_RECOV_TMP on DB.DBA.RDF_QUAD_RECOV_TMP partition (S1 int (0hexffff00))
+create bitmap index RDF_QUAD_RECOV_TMP_POGS on RDF_QUAD_RECOV_TMP (P1, O1, G1, S1) partition (O1 varchar (-1, 0hexffff))
+create distinct no primary key ref index RDF_QUAD_RECOV_TMP_OP on RDF_QUAD_RECOV_TMP (O1, P1) partition (O1 varchar (-1, 0hexffff))
+;
+
 create function DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (in qname any) returns IRI_ID
 {
   return iri_to_id_nosignal (qname);
@@ -48,21 +55,18 @@ create function DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP (in qname any) returns IRI_ID
 }
 ;
 
---!AFTER
-DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (null)
-;
-
---!AFTER
-DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP (null)
-;
-
 create function DB.DBA.RDF_QNAME_OF_IID (in iid IRI_ID) returns varchar -- DEPRECATED
 {
   return id_to_iri_nosignal (iid);
 }
 ;
 
---!AFTER
+DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (null)
+;
+
+DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP (null)
+;
+
 DB.DBA.RDF_QNAME_OF_IID (null)
 ;
 
@@ -178,19 +182,19 @@ create table DB.DBA.RDF_QUAD_DELETE_QUEUE (
 )
 ;
 
-create table DB.DBA.SYS_FAKE_0
+create table DB.DBA.SYS_IDONLY_EMPTY
 (
   ID integer not null primary key
 )
 ;
 
-create table DB.DBA.SYS_FAKE_1
+create table DB.DBA.SYS_IDONLY_ONE
 (
   ID integer not null primary key
 )
 ;
 
-insert soft DB.DBA.SYS_FAKE_1 (ID) values (0)
+insert soft DB.DBA.SYS_IDONLY_ONE (ID) values (0)
 ;
 
 sequence_set ('RDF_URL_IID_NAMED', 1000000, 1)
@@ -358,8 +362,10 @@ create procedure DB.DBA.XML_LOAD_ALL_NS_DECLS ()
   DB.DBA.XML_SET_NS_DECL (	'math'	, 'http://www.w3.org/2000/10/swap/math#'	, 2);
   DB.DBA.XML_SET_NS_DECL (	'mf'	, 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#'	, 2);
   DB.DBA.XML_SET_NS_DECL (	'nci'	, 'http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#'	, 2);
+  DB.DBA.XML_SET_NS_DECL (	'product'	, 'http://www.buy.com/rss/module/productV2/'		, 2);
   DB.DBA.XML_SET_NS_DECL (	'protseq'	, 'http://purl.org/science/protein/bysequence/'		, 2);
   DB.DBA.XML_SET_NS_DECL (	'rdf'	, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'	, 2);
+  DB.DBA.XML_SET_NS_DECL (	'rdfa'	, 'http://www.w3.org/ns/rdfa#'	, 2);
   DB.DBA.XML_SET_NS_DECL (	'rdfdf'	, 'http://www.openlinksw.com/virtrdf-data-formats#'	, 2);
   DB.DBA.XML_SET_NS_DECL (	'rdfs'	, 'http://www.w3.org/2000/01/rdf-schema#'	, 2);
   DB.DBA.XML_SET_NS_DECL (	'sc'	, 'http://purl.org/science/owl/sciencecommons/'		, 2);
@@ -561,8 +567,8 @@ create procedure DB.DBA.RDF_GLOBAL_RESET (in hard integer := 0)
   __atomic (1);
   iri_id_cache_flush ();
   __rdf_obj_ft_rule_zap_all ();
-  for select rs_name from sys_rdf_schema do
-    rdf_inf_clear (rs_name);
+  for select RS_NAME from DB.DBA.SYS_RDF_SCHEMA do
+    rdf_inf_clear (RS_NAME);
   delete from sys_rdf_schema;
   delete from DB.DBA.RDF_QUAD;
   delete from DB.DBA.RDF_OBJ_FT_RULES;
@@ -943,7 +949,7 @@ create function rdf_geo_add (in v any)
   insert into rdf_obj (ro_id, ro_val, ro_long, ro_dt_and_lang)
     values (id, h, ser, 0hex1000101);
   if (1 = sys_stat ('cl_run_local_only'))
-  geo_insert ('DB.DBA.RDF_GEO', g, id);
+    geo_insert ('DB.DBA.RDF_GEO', g, id);
   else
     cl_rdf_geo_insert (id, g);
   rdf_box_set_ro_id (v, id);
@@ -1296,6 +1302,7 @@ create function DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL (in v any) returns any
 create function DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (in v any, in g_iid IRI_ID, in p_iid IRI_ID, in ro_id_dict any := null) returns any
 {
   declare t int;
+  -- dbg_obj_princ ('DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (', v, g_iid, p_iid, ro_id_dict, ')');
   t := __tag (v);
   if (not (t in (126, __tag of varchar, 217, __tag of nvarchar, __tag of XML, __tag of rdf_box)))
     return v;
@@ -1323,6 +1330,7 @@ create function DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (in v any, in g_iid IRI_ID, in
 create function DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL (in v any, in dt_iid IRI_ID, in lang varchar) returns any
 {
   declare t, dt_twobyte, lang_twobyte int;
+  -- dbg_obj_princ ('DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL (', v, dt_iid, lang, ')');
 retry_unrdf:
   t := __tag (v);
   if (not (t in (126, __tag of varchar, 217, __tag of nvarchar, __tag of XML)))
@@ -1347,6 +1355,7 @@ retry_unrdf:
     lang_twobyte := DB.DBA.RDF_TWOBYTE_OF_LANGUAGE (lang);
   else
     lang_twobyte := 257;
+  -- dbg_obj_princ ('DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL (', v, dt_iid, lang, ') calls DB.DBA.RDF_OBJ_ADD (', dt_twobyte, v, lang_twobyte, ')');
   return DB.DBA.RDF_OBJ_ADD (dt_twobyte, v, lang_twobyte);
 }
 ;
@@ -1399,6 +1408,7 @@ retry_unrdf:
 create function DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_STRINGS (
   in o_val any, in o_type varchar, in o_lang varchar ) returns any
 {
+  -- dbg_obj_princ ('DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_STRINGS (', o_val, o_type, o_lang, ')');
   if (__tag (o_type) in (__tag of varchar, 217))
     {
       declare parsed any;
@@ -1415,8 +1425,8 @@ create function DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_STRINGS (
               if (256 = rdf_box_type (parsed))
                 db..rdf_geo_add (parsed);
               else
-            rdf_box_set_type (parsed,
-              DB.DBA.RDF_TWOBYTE_OF_DATATYPE (iri_to_id (o_type)));
+                rdf_box_set_type (parsed,
+                  DB.DBA.RDF_TWOBYTE_OF_DATATYPE (iri_to_id (o_type)));
               parsed := DB.DBA.RDF_OBJ_ADD (257, parsed, 257, null);
             }
           return parsed;
@@ -1451,9 +1461,11 @@ create function DB.DBA.RDF_DATATYPE_OF_OBJ (in shortobj any, in dflt varchar :=
         return null;
       if (isstring (shortobj) and bit_and (__box_flags (shortobj), 1))
         return null;
+      -- dbg_obj_princ ('DB.DBA.RDF_DATATYPE_OF_OBJ (', shortobj, ') will return ', __xsd_type (shortobj, dflt), ' for non-rdfbox');
       return iri_to_id (__xsd_type (shortobj, dflt));
     }
   twobyte := rdf_box_type (shortobj);
+  -- dbg_obj_princ ('DB.DBA.RDF_DATATYPE_OF_OBJ (', shortobj, ') found twobyte ', twobyte);
   if (257 = twobyte)
     return case (rdf_box_lang (shortobj)) when 257 then iri_to_id (dflt) else null end;
   whenever not found goto badtype;
@@ -1476,9 +1488,11 @@ create function DB.DBA.RDF_LANGUAGE_OF_OBJ (in shortobj any, in dflt varchar :=
         return null;
       if (isstring (shortobj) and bit_and (__box_flags (shortobj), 1))
         return null;
+      -- dbg_obj_princ ('DB.DBA.RDF_LANGUAGE_OF_OBJ (', shortobj, ') got a non-rdfbox');
       return dflt;
     }
   twobyte := rdf_box_lang (shortobj);
+  -- dbg_obj_princ ('DB.DBA.RDF_LANGUAGE_OF_OBJ (', shortobj, ') found twobyte ', twobyte);
   if (257 = twobyte)
     return dflt;
   whenever not found goto badtype;
@@ -1549,31 +1563,14 @@ create function DB.DBA.RDF_OBJ_OF_LONG (in longobj any) returns any
   t := __tag (longobj);
   if (__tag of rdf_box <> t)
     {
-      if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))
-    return longobj;
-      if (__tag of nvarchar = t)
-        longobj := charset_recode (longobj, '_WIDE_', 'UTF-8');
-      else if (t in (126, 217))
-        longobj := cast (longobj as varchar);
-      else if (bit_and (1, __box_flags (longobj)))
-        return iri_to_id (longobj);
-      return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);
-    }
-  if (0 = rdf_box_needs_digest (longobj))
-    return longobj;
-  return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);
-}
-;
-
-create function DB.DBA.RDF_OBJ_OF_LONG (in longobj any, in g_iid IRI_ID, inout old_g_iid IRI_ID, in ro_id_dict any := null) returns any
-{
-  declare t int;
-  t := __tag (longobj);
-  if (__tag of rdf_box <> t)
-    {
-      if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))
+      if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar, 133, 226)))
         return longobj;
-      if (__tag of nvarchar = t)
+      if (t = 133)
+	{
+	  longobj := cast (longobj as nvarchar);
+	  t := __tag (longobj);
+	}
+      if (__tag of nvarchar = t or t = 226)
         longobj := charset_recode (longobj, '_WIDE_', 'UTF-8');
       else if (t in (126, 217))
         longobj := cast (longobj as varchar);
@@ -1587,6 +1584,29 @@ create function DB.DBA.RDF_OBJ_OF_LONG (in longobj any, in g_iid IRI_ID, inout o
 }
 ;
 
+-- The below is a duplicated code with different signature
+--create function DB.DBA.RDF_OBJ_OF_LONG (in longobj any, in g_iid IRI_ID, inout old_g_iid IRI_ID, in ro_id_dict any := null) returns any
+--{
+--  declare t int;
+--  t := __tag (longobj);
+--  if (__tag of rdf_box <> t)
+--    {
+--      if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))
+--        return longobj;
+--      if (__tag of nvarchar = t)
+--        longobj := charset_recode (longobj, '_WIDE_', 'UTF-8');
+--      else if (t in (126, 217))
+--        longobj := cast (longobj as varchar);
+--      else if (bit_and (1, __box_flags (longobj)))
+--        return iri_to_id (longobj);
+--      return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);
+--    }
+--  if (0 = rdf_box_needs_digest (longobj))
+--    return longobj;
+--  return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);
+--}
+--;
+
 create function DB.DBA.RDF_OBJ_OF_SQLVAL (in v any) returns any
 {
   declare t int;
@@ -1595,7 +1615,7 @@ create function DB.DBA.RDF_OBJ_OF_SQLVAL (in v any) returns any
     {
       if (__tag of rdf_box = __tag(v) and 0 = rdf_box_ro_id (v))
         return DB.DBA.RDF_OBJ_ADD (257, v, 257);
-    return v;
+      return v;
     }
   if (__tag of nvarchar = t)
     v := charset_recode (v, '_WIDE_', 'UTF-8');
@@ -1778,26 +1798,6 @@ badtype:
 }
 ;
 
-create function DB.DBA.RDF_LANGUAGE_OF_LONG (in longobj any, in dflt varchar := '') returns any
-{
-  if (__tag of rdf_box = __tag (longobj))
-    {
-      declare twobyte integer;
-      declare res varchar;
-      twobyte := rdf_box_lang (longobj);
-      if (257 = twobyte)
-        return dflt;
-      whenever not found goto badlang;
-      select lower (RL_ID) into res from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = twobyte;
-      return res;
-
-badlang:
-  signal ('RDFXX', sprintf ('Unknown language in DB.DBA.RDF_LANGUAGE_OF_LONG, bad id %d', twobyte));
-    }
-  return case (isiri_id (longobj)) when 0 then dflt else null end;
-}
-;
-
 create function DB.DBA.RDF_STRSQLVAL_OF_LONG (in longobj any) -- DEPRECATED
 {
   return __rdf_strsqlval (longobj, 0);
@@ -2176,6 +2176,189 @@ create function DB.DBA.__not (in e1 any) returns integer
 }
 ;
 
+-----
+-- SPARQL 1.1 built-in functions, implemented as stored procedures
+
+create function DB.DBA.rdf_strdt_impl (in str varchar, in dt_iri any)
+{
+  declare dt_iid IRI_ID;
+  declare parsed any;
+  dt_iid := __i2id (dt_iri);
+  if (dt_iid is null)
+    signal ('22007', 'Function rdf_strdt_impl needs a valid datatype IRI as its second argument');
+  if (__tag of IRI_ID = __tag (dt_iri))
+    dt_iri := __id2i (dt_iri);
+  parsed := __xqf_str_parse_to_rdf_box (str, dt_iri, isstring (str));
+  if (parsed is not null)
+    {
+      if (__tag of rdf_box = __tag (parsed))
+        rdf_box_set_type (parsed,
+          DB.DBA.RDF_TWOBYTE_OF_DATATYPE (dt_iid));
+      return parsed;
+    }
+  return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, dt_iid, null);
+}
+;
+
+create function DB.DBA.rdf_strlang_impl (in str varchar, in lang any)
+{
+
+  lang := cast (lang as varchar);
+  if ((lang is null) or (regexp_match ('^(([a-z][a-z](-[A-Z][A-Z])?)|(x-[A-Za-z0-9]+))\044', lang) is null))
+    signal ('22007', 'Function rdf_strlang_impl needs a valid language ID as its second argument');
+  return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, null, cast (lang as varchar));
+}
+;
+
+--!AWK PUBLIC
+create function DB.DBA.rdf_replace_impl (in src varchar, in needle varchar, in rpl varchar, in opts varchar := '')
+{
+  declare src_tag, needle_tag, rpl_tag integer;
+  declare res varchar;
+  src_tag := __tag (src);
+  needle_tag := __tag (needle);
+  rpl_tag := __tag (rpl);
+  if (__tag of rdf_box = src_tag)
+    {
+      src := rdf_box_data (src);
+      src_tag := __tag (src);
+    }
+  if (__tag of rdf_box = needle_tag)
+    {
+      needle := rdf_box_data (needle);
+      needle_tag := __tag (needle);
+    }
+  if (__tag of rdf_box = rpl_tag)
+    {
+      rpl := rdf_box_data (rpl);
+      rpl_tag := __tag (rpl);
+    }
+  if (__tag of nvarchar = src_tag)
+    src := charset_recode (src, '_WIDE_', '_UTF8_');
+  else if (__tag of varchar <> src_tag)
+    src := cast (src as varchar);
+  if (__tag of nvarchar = needle_tag)
+    needle := charset_recode (needle, '_WIDE_', '_UTF8_');
+  else if (__tag of varchar <> needle_tag)
+    needle := cast (needle as varchar);
+  if (__tag of nvarchar = rpl_tag)
+    rpl := charset_recode (rpl, '_WIDE_', '_UTF8_');
+  else if (__tag of varchar <> rpl_tag)
+    rpl := cast (rpl as varchar);
+  if (__tag of varchar <> __tag (opts))
+    opts := cast (opts as varchar);
+  if (opts is null)
+    opts := '';
+  if (src is null or needle is null or rpl is null)
+    return null;
+  if ('' = needle)
+    return src;
+  if (regexp_match ('^[^()|+?.:^\044\\\\\\[\\]-]+\044', needle, 0, 'u') is not null and strchr (rpl, '\044') is null and strchr (rpl, 92) is null)
+    {
+      if ('' = opts)
+        {
+          res := replace (src, needle, rpl);
+          __box_flags_set (res, 2);
+          return res;
+        }
+      if (opts in ('i', 'I'))
+        {
+          declare src_lc varchar;
+          declare hit, needle_len integer;
+          declare ses any;
+          src_lc := lcase (src);
+          needle := lcase (needle);
+          hit := strstr (src_lc, needle);
+          if (hit is null)
+            {
+              res := src;
+              __box_flags_set (res, 2);
+              return res;
+            }
+          ses := string_output();
+          needle_len := length (needle);
+          while (hit is not null)
+            {
+              http (subseq (src, 0, hit), ses);
+              http (rpl, ses);
+              src := subseq (src, hit + needle_len);
+              src_lc := subseq (src_lc, hit + needle_len);
+              hit := strstr (src_lc, needle);
+            }
+          http (src, ses);
+          res := string_output_string (ses);
+          __box_flags_set (res, 2);
+          return res;
+        }
+    }
+  if (strchr (opts, 'u') is null and strchr (opts, 'U') is null)
+    opts := opts || 'u';
+  res := regexp_xfn_replace (src, needle, rpl, 0, null, opts);
+  __box_flags_set (res, 2);
+  return res;
+}
+;
+
+--!AWK PUBLIC
+create function DB.DBA.regexp_xfn_replace (in src varchar, in needle varchar, in tmpl varchar, in search_begin_pos integer, in hit_max_count integer, in opts varchar)
+{
+  declare hit_list any;
+  if (0 = length (src))
+    return '';
+  if (regexp_parse (needle, '', 0, opts) is not null)
+    signal ('22023', 'The regex-based XPATH/XQuery/SPARQL replace() function can not search for a pattern that can be found even in an empty string');
+  hit_list := regexp_parse_list (needle, src, search_begin_pos, opts, coalesce (hit_max_count, 2097152));
+  return regexp_replace_hits_with_template (src, tmpl, hit_list, 1);
+}
+;
+
+
+--!AWK PUBLIC
+create function DB.DBA.rdf_timezone_impl (in dt datetime)
+{
+  declare minutes integer;
+  declare sign, str varchar;
+  minutes := timezone (dt);
+  if (minutes is null)
+    signal ('22007', 'Function rdf_timezone_impl needs a datetime with some timezone set as its argument');
+  if (minutes < 0)
+    {
+      sign := '-';
+      minutes := -minutes;
+    }
+  else
+    sign := '';
+  if (mod (minutes, 60))
+    str := sprintf ('%sPT%dH%dM', sign, minutes / 60, mod (minutes, 60));
+  else if (minutes = 0)
+    str := 'PT0S';
+  else
+    str := sprintf ('%sPT%dH', sign, minutes / 60);
+  return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, __i2id (UNAME'http://www.w3.org/2001/XMLSchema#dayTimeDuration'), null);
+}
+;
+
+--!AWK PUBLIC
+create function DB.DBA.rdf_tz_impl (in dt datetime)
+{
+  declare minutes integer;
+  declare sign varchar;
+  minutes := timezone (dt);
+  if (minutes is null)
+    return '';
+  if (minutes = 0)
+    return 'Z';
+  if (minutes < 0)
+    {
+      sign := '-';
+      minutes := -minutes;
+    }
+  else
+    sign := '';
+  return sprintf ('%s%02d:%02d', sign, minutes / 60, mod (minutes, 60));
+}
+;
+
 
 -----
 -- Data loading
@@ -2202,6 +2385,17 @@ create procedure DB.DBA.RDF_QUAD_URI_L (in g_uri varchar, in s_uri varchar, in p
   g_iid := iri_to_id (g_uri);
   s_iid := iri_to_id (s_uri);
   p_iid := iri_to_id (p_uri);
+  -- dbg_obj_princ ('DB.DBA.RDF_QUAD_URI_L will make RDF_INSERT_TRIPLES (', g_iid, '(', s_iid, p_iid, o_obj, '))');
+--  if (ro_id_dict is null
+--    and (rdf_box_data_tag (o_lit) in (__tag of varchar, __tag of XML))
+--    and __rdf_obj_ft_rule_count_in_graph (g_iid) )
+--    {
+--      declare triples any;
+--      -- dbg_obj_princ ('DB.DBA.RDF_QUAD_URI_L will make RDF_INSERT_TRIPLES (', g_iid, '(', s_iid, p_iid, o_lit, '))');
+--      triples := vector (vector (s_iid, p_iid, o_lit));
+--      DB.DBA.RDF_INSERT_TRIPLES (id_to_iri (g_iid), triples);
+--      return;
+--    }
   o_obj := DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (o_lit, g_iid, p_iid, ro_id_dict);
   if (__rdf_graph_is_in_enabled_repl (g_iid))
     {
@@ -2224,6 +2418,15 @@ create procedure DB.DBA.RDF_QUAD_URI_L_TYPED (in g_uri varchar, in s_uri varchar
     o_obj := DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (o_lit, g_iid, p_iid, ro_id_dict);
   else
     o_obj := DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_FT (o_lit, iri_to_id (dt), lang, g_iid, p_iid, ro_id_dict);
+--  if (ro_id_dict is null
+--    and (rdf_box_data_tag (o_obj) in (__tag of varchar, __tag of XML))
+--    and __rdf_obj_ft_rule_count_in_graph (g_iid) )
+--    {
+--      declare triples any;
+--      triples := vector (vector (s_iid, p_iid, o_obj));
+--      DB.DBA.RDF_INSERT_TRIPLES (id_to_iri (g_iid), triples);
+--      return;
+--    }
   if (__rdf_graph_is_in_enabled_repl (g_iid))
     {
       declare triples any;
@@ -2246,11 +2449,16 @@ create procedure DB.DBA.RDF_QUAD_L_RDB2RDF (in g_iid varchar, in s_iid varchar,
   t := __tag (o_val);
   if (__tag of rdf_box <> t)
     {
-      if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))
+      if (not (t in (__tag of varchar, 126, 133, 217, __tag of nvarchar, 226)))
         {
           goto o_val_done;
         }
-      if (__tag of nvarchar = t)
+      if (t = 133)
+	{
+	  o_val := cast (o_val as nvarchar);
+	  t := __tag (o_val);
+	}
+      if (__tag of nvarchar = t or t = 226)
         o_val := charset_recode (o_val, '_WIDE_', 'UTF-8');
       else if (t in (126, 217))
         o_val := cast (o_val as varchar);
@@ -2489,7 +2697,7 @@ create procedure DB.DBA.TTLP (in strg varchar, in base varchar, in graph varchar
     }
   if (1 <> sys_stat ('cl_run_local_only'))
     {
-      DB.DBA.TTLP_CL (strg, base, graph, flags);
+      DB.DBA.TTLP_CL (strg, 0, base, graph, flags);
       return;
     }
   if (126 = __tag (strg))
@@ -2535,11 +2743,11 @@ create procedure DB.DBA.TTLP_WITH_IRI_TRANSLATION (in strg varchar, in base varc
     {
       old_log_mode := log_enable (log_enable, 1);
     }
-  if (1 <> sys_stat ('cl_run_local_only'))
-    {
-      DB.DBA.TTLP_CL (strg, base, graph, flags);
-      return;
-    }
+--  if (1 <> sys_stat ('cl_run_local_only'))
+--    {
+--      DB.DBA.TTLP_CL (strg, 0, base, graph, flags);
+--      return;
+--    }
   if (126 = __tag (strg))
     strg := cast (strg as varchar);
   app_env := vector (flags, null, __max (length (strg) / 100, 100000), null, iri_xlate_cbk, iri_xlate_env);
@@ -2580,6 +2788,23 @@ create procedure DB.DBA.TTLP_VALIDATE_LOCAL_FILE (in strg varchar, in base varch
 }
 ;
 
+create procedure DB.DBA.RDF_VALIDATE_RDFXML (in strg varchar, in base varchar, in graph varchar)
+{
+  declare app_env any;
+  declare old_log_mode int;
+  if (graph = '')
+    signal ('22023', 'Empty string is not a valid graph IRI in DB.DBA.RDF_VALIDATE_RDFXML()');
+  else if (graph is null)
+    {
+      graph := base;
+      if ((graph is null) or (graph = ''))
+        signal ('22023', 'DB.DBA.RDF_VALIDATE_RDFXML() requires a valid IRI as a base argument if graph is not specified');
+    }
+  rdf_load_rdfxml (strg, 0, graph, vector ( '', '', '', '', '', '', '' ), app_env, base );
+  return graph;
+}
+;
+
 create procedure DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH (inout g varchar, inout g_iid IRI_ID, inout app_env any) {
   -- dbg_obj_princ ('DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH(', g, g_iid, app_env, ')');
   ;
@@ -2615,21 +2840,70 @@ create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L (
   inout o_val any, inout o_type varchar, inout o_lang varchar,
   inout app_env any )
 {
-  if (not isstring (o_type))
-    o_type := null;
-  if (not isstring (o_lang))
-    o_lang := null;
   dict_put (app_env,
     vector (
       iri_to_id (s_uri),
       iri_to_id (p_uri),
       DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (o_val,
-        case (isstring (o_type)) when 0 then null else o_type end,
-        case (isstring (o_lang)) when 0 then null else o_lang end) ),
+        case when (isstring (o_type) or __tag (o_type) = 217) then o_type else null end,
+        case when (isstring (o_lang) or __tag (o_lang) = 217) then o_lang else null end) ),
     0 );
 }
 ;
 
+create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_XLAT (
+  inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,
+  inout o_uri varchar,
+  inout app_env any )
+{
+
+  declare xlat_cbk, s_xlat, o_xlat varchar;
+  declare xlat_env, dict any;
+  -- dbg_obj_princ (current_proc_name (), ' (', g_iid, s_uri, p_uri, o_uri, ');');
+  dict := app_env[0];
+  xlat_cbk := app_env[1];
+  xlat_env := app_env[2];
+  if (__proc_params_num (xlat_cbk) = 2)
+    {
+      s_xlat := call(xlat_cbk)(s_uri, xlat_env);
+      o_xlat := call(xlat_cbk)(o_uri, xlat_env);
+    }
+  else
+    {
+      s_xlat := call(xlat_cbk)(s_uri, p_uri, 's', xlat_env);
+      o_xlat := call(xlat_cbk)(o_uri, p_uri, 'o', xlat_env);
+    }
+
+  dict_put (dict, vector (iri_to_id (s_xlat), iri_to_id (p_uri), iri_to_id (o_xlat)), 0);
+}
+;
+
+create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L_XLAT (
+  inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,
+  inout o_val any, inout o_type varchar, inout o_lang varchar,
+  inout app_env any )
+{
+  declare xlat_cbk, s_xlat, o_xlat varchar;
+  declare xlat_env, dict any;
+  -- dbg_obj_princ (current_proc_name (),' (', g_iid, s_uri, p_uri, o_uri, ');');
+  dict := app_env[0];
+  xlat_cbk := app_env[1];
+  xlat_env := app_env[2];
+  if (__proc_params_num (xlat_cbk) = 2)
+    s_xlat := call(xlat_cbk)(s_uri, xlat_env);
+  else
+    s_xlat := call(xlat_cbk)(s_uri, p_uri, 's', xlat_env);
+  dict_put (dict,
+    vector (
+      iri_to_id (s_xlat),
+      iri_to_id (p_uri),
+      DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (o_val,
+        case when (isstring (o_type) or __tag (o_type) = 217) then o_type else null end,
+        case when (isstring (o_lang) or __tag (o_lang) = 217) then o_lang else null end) ),
+    0);
+}
+;
+
 create function DB.DBA.RDF_TTL2HASH (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0) returns any
 {
   declare res any;
@@ -2651,6 +2925,26 @@ create function DB.DBA.RDF_TTL2HASH (in strg varchar, in base varchar, in graph
 }
 ;
 
+create function DB.DBA.RDF_TTL_LOAD_DICT (in strg varchar, in base varchar, in graph varchar, in dict any, in flags integer := 0) returns any
+{
+  if (__tag (dict) <> 214)
+    signal ('22023', 'RDFXX', 'The dict argument must be of type dictionary');
+  if (126 = __tag (strg))
+    strg := cast (strg as varchar);
+  rdf_load_turtle (strg, base, graph, flags,
+    vector (
+      'DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH',
+      'DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK',
+      'DB.DBA.RDF_TTL2HASH_EXEC_GET_IID',
+      'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE',
+      'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L',
+      '',
+      'DB.DBA.TTLP_EV_REPORT_DEFAULT' ),
+    dict);
+  return;
+}
+;
+
 create procedure DB.DBA.RDF_TTL2SQLHASH_EXEC_GET_IID (inout uri varchar, inout g_iid IRI_ID, inout app_env any, inout res IRI_ID) {
   -- dbg_obj_princ ('DB.DBA.RDF_TTL2SQLHASH_EXEC_GET_IID (', uri, g_iid, app_env, ')');
   res := __bft (uri, 1);
@@ -2713,18 +3007,18 @@ create function DB.DBA.RDF_TTL2SQLHASH (in strg varchar, in base varchar, in gra
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_RDFXML (in strg varchar, in base varchar, in graph varchar,
-	in log_enable int := null, in transactional int := 0)
+create procedure DB.DBA.RDF_LOAD_RDFXML_IMPL (inout strg varchar, in base varchar, in graph varchar,
+  in parse_mode integer, in log_enable int := null, in transactional int := 0)
 {
   declare app_env any;
   declare old_log_mode int;
   if (graph = '')
-    signal ('22023', 'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFXML()');
+    signal ('22023', 'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFXML() and the like');
   else if (graph is null)
     {
       graph := base;
       if ((graph is null) or (graph = ''))
-        signal ('22023', 'DB.DBA.RDF_LOAD_RDFXML() requires a valid IRI as a base argument if graph is not specified');
+        signal ('22023', 'DB.DBA.RDF_LOAD_RDFXML() and similar functions require a valid IRI as a base argument if graph is not specified');
     }
   old_log_mode := null;
   if (transactional = 0)
@@ -2737,13 +3031,13 @@ create procedure DB.DBA.RDF_LOAD_RDFXML (in strg varchar, in base varchar, in gr
       old_log_mode := log_enable (log_enable, 1);
     }
   if (1 <> sys_stat ('cl_run_local_only'))
-    return rdf_load_rdfxml_cl (strg, base, graph);
+    return DB.DBA.RDF_LOAD_RDFXML_CL (strg, base, graph, parse_mode);
   app_env := vector (
     null,
     null,
     __max (length (strg) / 100, 100000),
     null );
-  rdf_load_rdfxml (strg, 0,
+  rdf_load_rdfxml (strg, parse_mode,
     graph,
     vector (
       'DB.DBA.TTLP_EV_NEW_GRAPH',
@@ -2761,6 +3055,14 @@ create procedure DB.DBA.RDF_LOAD_RDFXML (in strg varchar, in base varchar, in gr
 }
 ;
 
+create procedure DB.DBA.RDF_LOAD_RDFXML (in strg varchar, in base varchar, in graph varchar := null,
+  in xml_parse_mode integer := 0, in log_enable int := null, in transactional int := 0 )
+{
+  return DB.DBA.RDF_LOAD_RDFXML_IMPL (strg, base, graph, bit_shift (xml_parse_mode, 8), log_enable, transactional);
+}
+;
+
+
 create procedure DB.DBA.RDF_RDFXML_TO_DICT (in strg varchar, in base varchar, in graph varchar := null)
 {
   declare res any;
@@ -2781,63 +3083,143 @@ create procedure DB.DBA.RDF_RDFXML_TO_DICT (in strg varchar, in base varchar, in
 }
 ;
 
-create procedure DB.DBA.RDF_LOAD_RDFA (in strg varchar, in base varchar, in graph varchar := null, in xml_parse_mode integer := 0)
+create procedure DB.DBA.RDF_RDFXML_LOAD_DICT (in strg varchar, in base varchar, in graph varchar, inout dict any, in flag int := 0, in xml_parse_mode int := 0)
+{
+  if (__tag (dict) <> 214)
+    signal ('22023', 'RDFXX', 'The dict argument must be of type dictionary');
+  if (flag = 0)
+    xml_parse_mode := 0;
+  rdf_load_rdfxml (strg, bit_or (flag, bit_shift (xml_parse_mode, 8)), -- 0 rdfxml, 2 rdfa
+    graph,
+    vector (
+      'DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH',
+      'DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK',
+      'DB.DBA.RDF_TTL2HASH_EXEC_GET_IID',
+      'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE',
+      'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L',
+      '',
+      'DB.DBA.TTLP_EV_REPORT_DEFAULT' ),
+    dict,
+    base );
+}
+;
+
+create procedure DB.DBA.RDFA_LOAD_DICT_XLAT (in strg varchar, in base varchar, in graph varchar, inout dict any, in xml_parse_mode int := 0, in iri_xlate_cbk varchar, in iri_xlate_env any)
+{
+  declare app_env any;
+  if (__tag (dict) <> 214)
+    signal ('22023', 'RDFXX', 'The dict argument must be of type dictionary');
+  rdf_load_rdfxml (strg, bit_or (2, bit_shift (xml_parse_mode, 8)), -- 0 rdfxml, 2 rdfa
+    graph,
+    vector (
+      'DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH',
+      'DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK',
+      'DB.DBA.RDF_TTL2HASH_EXEC_GET_IID',
+      'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_XLAT',
+      'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L_XLAT',
+      '',
+      'DB.DBA.TTLP_EV_REPORT_DEFAULT' ),
+    vector (dict, iri_xlate_cbk, iri_xlate_env),
+    base );
+}
+;
+
+
+
+create procedure DB.DBA.RDF_RDFA11_FETCH_PROFILES (in profile_iris any, inout prefixes any, inout terms any, inout vocab any)
+{
+  declare agg any;
+  -- dbg_obj_princ ('DB.DBA.RDF_RDFA11_FETCH_PROFILES (', profile_iris, ')');
+  foreach (varchar profile_iri in profile_iris) do
+    {
+      if (not exists (sparql define input:storage "" ask where { graph `iri(?:profile_iri)` { ?s ?p ?o }}))
+        DB.DBA.SPARUL_LOAD (profile_iri, profile_iri, 0, NULL, 0);
+    }
+  vectorbld_init (agg);
+  foreach (varchar profile_iri in profile_iris) do
+    {
+      for (sparql define input:storage "" prefix rdfa: <http://www.w3.org/ns/rdfa#>
+        select ?p, ?u
+        where {
+            graph `iri(?:profile_iri)` {
+                ?s rdfa:prefix ?p ; rdfa:uri ?u .
+                optional { ?s rdfa:uri ?u2 . filter (?u != ?u2). }
+                filter (isliteral (?p))
+                filter (isliteral (?u))
+                filter (?u != '')
+                filter (!bound (?u2)) } }
+        ) do { vectorbld_acc (agg, "p", "u"); }
+    }
+  vectorbld_final (agg);
+  prefixes := agg;
+  vectorbld_init (agg);
+  foreach (varchar profile_iri in profile_iris) do
+    {
+      for (sparql define input:storage "" prefix rdfa: <http://www.w3.org/ns/rdfa#>
+        select ?t, ?u
+        where {
+            graph `iri(?:profile_iri)` {
+                ?s rdfa:term ?t ; rdfa:uri ?u .
+                optional { ?s rdfa:uri ?u2 . filter (?u != ?u2). }
+                optional { ?s rdfa:term ?t2 . filter (?t != ?t2). }
+                filter (isliteral (?t))
+                filter (isliteral (?u))
+                filter (?t != '')
+                filter (?u != '')
+                filter (!bound (?t2))
+                filter (!bound (?u2)) } }
+        order by ?t
+        ) do { vectorbld_acc (agg, "t", "u"); }
+    }
+  vectorbld_final (agg);
+  if (1 < length (profile_iris))
+    gvector_sort (agg, 2, 0, 1);
+  terms := agg;
+  vocab := null;
+  foreach (varchar profile_iri in profile_iris) do
+    {
+      vocab := (sparql define input:storage "" prefix rdfa: <http://www.w3.org/ns/rdfa#>
+        select (max(str(?v)))
+        where {
+            graph `iri(?:profile_iri)` {
+                ?s rdfa:vocabulary ?v } } );
+      if (isstring (vocab))
+        goto vocab_is_set;
+    }
+vocab_is_set: ;
+  -- dbg_obj_princ ('DB.DBA.RDF_RDFA11_FETCH_PROFILES (', profile_iris, ' returned ', prefixes, terms, vocab);
+}
+;
+
+
+create procedure DB.DBA.RDF_LOAD_RDFA (in strg varchar, in base varchar, in graph varchar := null,
+  in xml_parse_mode integer := 0, in log_enable int := null, in transactional int := 0 )
+{
+  return DB.DBA.RDF_LOAD_RDFXML_IMPL (strg, base, graph, bit_or (2, bit_shift (xml_parse_mode, 8)), log_enable, transactional);
+}
+;
+
+create procedure DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION (in strg varchar, in base varchar, in graph varchar, in xml_parse_mode integer,
+  in iri_xlate_cbk varchar, in iri_xlate_env any)
 {
   declare app_env any;
   if (graph = '')
-    signal ('22023', 'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFA()');
+    signal ('22023', 'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION ()');
   else if (graph is null)
     {
       graph := base;
       if ((graph is null) or (graph = ''))
-        signal ('22023', 'DB.DBA.RDF_LOAD_RDFA() requires a valid IRI as a base argument if graph is not specified');
+        signal ('22023', 'DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION () requires a valid IRI as a base argument if graph is not specified');
     }
   if (1 <> sys_stat ('cl_run_local_only'))
-    return DB.DBA.RDF_LOAD_RDFA_CL (strg, base, graph, xml_parse_mode);
+    return DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION_CL (strg, base, graph, xml_parse_mode, iri_xlate_cbk, iri_xlate_env);
   app_env := vector (
     null,
     null,
     __max (length (strg) / 100, 100000),
-    null );
-  rdf_load_rdfxml (strg, bit_or (2, bit_shift (xml_parse_mode, 8)),
-    graph,
-    vector (
-      'DB.DBA.TTLP_EV_NEW_GRAPH',
-      'DB.DBA.TTLP_EV_NEW_BLANK',
-      'DB.DBA.TTLP_EV_GET_IID',
-      'DB.DBA.TTLP_EV_TRIPLE',
-      'DB.DBA.TTLP_EV_TRIPLE_L',
-      'DB.DBA.TTLP_EV_COMMIT',
-      'DB.DBA.TTLP_EV_REPORT_DEFAULT' ),
-    app_env,
-    base );
-  if (__rdf_graph_is_in_enabled_repl (iri_to_id (graph)))
-    repl_text ('__rdf_repl', '__rdf_repl_flush_queue ()');
-  return graph;
-}
-;
-
-create procedure DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION (in strg varchar, in base varchar, in graph varchar, in xml_parse_mode integer,
-  in iri_xlate_cbk varchar, in iri_xlate_env any )
-{
-  declare app_env any;
-  if (graph = '')
-    signal ('22023', 'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION ()');
-  else if (graph is null)
-    {
-      graph := base;
-      if ((graph is null) or (graph = ''))
-        signal ('22023', 'DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION () requires a valid IRI as a base argument if graph is not specified');
-    }
-  if (1 <> sys_stat ('cl_run_local_only'))
-    return DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION_CL (strg, base, graph, xml_parse_mode, iri_xlate_cbk, iri_xlate_env);
-  app_env := vector (
-    null,
-    null,
-    __max (length (strg) / 100, 100000),
-    null,
-    iri_xlate_cbk,
-    iri_xlate_env );
+    null,
+    iri_xlate_cbk,
+    iri_xlate_env );
   rdf_load_rdfxml (strg, bit_or (2, bit_shift (xml_parse_mode, 8)),
     graph,
     vector (
@@ -2876,6 +3258,13 @@ create procedure DB.DBA.RDF_RDFA_TO_DICT (in strg varchar, in base varchar, in g
 }
 ;
 
+create procedure DB.DBA.RDF_LOAD_XHTML_MICRODATA (in strg varchar, in base varchar, in graph varchar := null,
+  in xml_parse_mode integer := 1, in log_enable int := null, in transactional int := 0 )
+{
+  return DB.DBA.RDF_LOAD_RDFXML_IMPL (strg, base, graph, bit_or (4, bit_shift (xml_parse_mode, 8)), log_enable, transactional);
+}
+;
+
 -----
 -- Fast rewriting from serialization to serialization without storing
 
@@ -3139,6 +3528,15 @@ create procedure DB.DBA.RDF_LONG_TO_TTL (inout obj any, inout ses any)
 }
 ;
 
+--
+-- For VOS only
+--
+create procedure DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (inout triples any)
+{
+  return;
+}
+;
+
 
 create procedure DB.DBA.RDF_TRIPLES_TO_VERBOSE_TTL (inout triples any, inout ses any)
 {
@@ -3189,6 +3587,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_VERBOSE_TTL (inout triples any, inout ses
     rowvector_digit_sort (triples, 1, 1);
   if (not string_subjs_found)
     rowvector_digit_sort (triples, 0, 1);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   prev_s := null;
   prev_p := null;
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
@@ -3291,6 +3690,7 @@ end_pred_sort: ;
     rowvector_subj_sort (triples, 0, 1);
 end_subj_sort: ;
   }
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
     {
       http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
@@ -3299,6 +3699,73 @@ end_subj_sort: ;
 }
 ;
 
+create procedure DB.DBA.RDF_TRIPLES_TO_TRIG (inout triples any, inout ses any)
+{
+  declare env any;
+  declare tcount, tctr, first_dflt_g_idx integer;
+  declare prev_g_iri varchar;
+  declare first_g_idx integer;
+  tcount := length (triples);
+  if (0 = tcount)
+    {
+      http ('# Empty TriG\n', ses);
+      return;
+    }
+  env := vector (dict_new (__min (tcount, 16000)), 0, '', '', '', 0, 0, 0, 0);
+  { whenever sqlstate '*' goto end_pred_sort;
+    rowvector_subj_sort (triples, 1, 1);
+end_pred_sort: ;
+  }
+  { whenever sqlstate '*' goto end_subj_sort;
+    rowvector_subj_sort (triples, 0, 1);
+end_subj_sort: ;
+  }
+  rowvector_graph_sort (triples, 3, 1);
+  -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_TRIG after sort:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) dbg_obj_princ (triples[tctr]);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  for (tctr := 0; (tctr < tcount) and aref_or_default (triples, tctr, 3, null) is null; tctr := tctr + 1)
+    {
+      http_ttl_prefixes (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
+    }
+  first_g_idx := tctr;
+  for (tctr := first_g_idx; tctr < tcount; tctr := tctr + 1)
+    {
+      http_ttl_prefixes (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
+    }
+  if (0 < first_g_idx)
+    {
+      http ('{\n', ses);
+      for (tctr := 0; tctr < first_g_idx; tctr := tctr + 1)
+        {
+          http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
+        }
+      http (' .\n}\n', ses);
+    }
+  prev_g_iri := '';
+  for (tctr := first_g_idx; tctr < tcount; tctr := tctr + 1)
+    {
+      declare g_iri varchar;
+      g_iri := id_to_iri_nosignal (triples[tctr][3]);
+      if (g_iri is not null)
+        {
+          if (g_iri <> prev_g_iri)
+            {
+              if (prev_g_iri <> '')
+                http (' .\n}\n', ses);
+              env[1] := 0;
+              http ('<', ses);
+              http_escape (g_iri, 12, ses, 1, 1);
+              http ('> = {\n', ses);
+              prev_g_iri := g_iri;
+            }
+          http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
+        }
+    }
+  if (prev_g_iri <> '')
+    http (' .\n}\n', ses);
+}
+;
+
 create procedure DB.DBA.RDF_TRIPLES_TO_NT (inout triples any, inout ses any)
 {
   declare env any;
@@ -3311,6 +3778,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_NT (inout triples any, inout ses any)
       return;
     }
   env := vector (0, 0, 0);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
     {
       http_nt_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
@@ -3394,211 +3862,37 @@ print_o:
 
 create procedure DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (inout triples any, in print_top_level integer, inout ses any)
 {
+  declare ns_dict, env any;
   declare tcount, tctr integer;
   tcount := length (triples);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  { whenever sqlstate '*' goto end_pred_sort;
+    rowvector_subj_sort (triples, 1, 1);
+end_pred_sort: ;
+  }
+  ns_dict := dict_new (case (print_top_level) when 0 then 10 else __min (tcount, 16000) end);
+  dict_put (ns_dict, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf');
+  dict_put (ns_dict, 'http://www.w3.org/2000/01/rdf-schema#', 'rdfs');
+  env := vector (ns_dict, 0, 0, '', '', 0, 0, 0, 0);
   if (print_top_level)
     {
-       http ('<?xml version="1.0" encoding="utf-8" ?>\n<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" '||
-      			'xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">', ses);
+       http ('<?xml version="1.0" encoding="utf-8" ?>\n<rdf:RDF\n\txmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n\txmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"', ses);
+       for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+         {
+           http_rdfxml_p_ns (env, triples[tctr][1], ses);
+         }
+       http (' >', ses);
     }
+  { whenever sqlstate '*' goto end_subj_sort;
+    rowvector_subj_sort (triples, 0, 1);
+end_subj_sort: ;
+  }
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
     {
-      declare subj, pred, obj any;
-      declare pred_tagname varchar;
-      declare res varchar;
-      subj := triples[tctr][0];
-      pred := triples[tctr][1];
-      obj := triples[tctr][2];
-      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT: subj:', subj, __tag(subj), __box_flags (subj));
-      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT: pred:', pred, __tag(pred), __box_flags (pred));
-      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT: obj:', obj, __tag(obj), __box_flags (obj));
-      http ('\n<rdf:Description', ses);
-      if (not isiri_id (subj))
-        {
-          if (isstring (subj) and (1 = __box_flags (subj)))
-            {
-              if (subj like 'nodeID://%')
-                {
-                  http (' rdf:nodeID="b', ses); http_value (subseq (subj, 9), 0, ses); http ('">', ses);
-                }
-              else
-                {
-                  http (' rdf:about="', ses); http_value (subj, 0, ses); http ('">', ses);
-                }
-            }
-          else if (subj is null)
-            signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): subject is NULL');
-          else
-            signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): subject is literal');
-        }
-      else if (subj >= min_bnode_iri_id ())
-        http (sprintf (' rdf:nodeID="b%d">', iri_id_num (subj)), ses);
-      else
-        {
-          res := id_to_iri (subj);
---          res := coalesce ((select RU_QNAME from DB.DBA.RDF_URL where RU_IID = subj));
-          http (' rdf:about="', ses); http_value (res, 0, ses); http ('">', ses);
-        }
-      if (not isiri_id (pred))
-        {
-          if (isstring (pred) and (1 = __box_flags (pred)))
-            {
-              if (pred like 'nodeID://%')
-                signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): blank node as predicate');
-              res := pred;
-              goto res_for_pred;
-            }
-          else if (pred is null)
-            signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): predicate is NULL');
-          else
-            signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): predicate is literal');
-        }
-      if (pred >= min_bnode_iri_id ())
-        signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): blank node as predicate');
-      res := id_to_iri (pred);
-res_for_pred:
-      declare delim, delim1, delim2, delim3 integer;
-      delim1 := coalesce (strrchr (res, '/'), -1);
-      delim2 := coalesce (strrchr (res, '#'), -1);
-      delim3 := coalesce (strrchr (res, ':'), -1);
-      delim := __max (delim1, delim2, delim3);
-      if (delim < 0)
-        delim := null;
-      if (delim is null)
-        {
-          pred_tagname := res;
-          http ('<', ses); http (pred_tagname, ses);
-        }
-      else
-        {
-          declare p_ns_uri, p_ns_pref varchar;
-          p_ns_uri := subseq (res, 0, delim+1);
-          if (p_ns_uri = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
-            {
-              pred_tagname := 'rdf:' || subseq (res, delim+1);
-              http ('<', ses); http (pred_tagname, ses);
-            }
-          else if (p_ns_uri = 'http://www.w3.org/2000/01/rdf-schema#')
-            {
-              pred_tagname := 'rdfs:' || subseq (res, delim+1);
-              http ('<', ses); http (pred_tagname, ses);
-            }
-          else
-            {
-              p_ns_pref := coalesce (__xml_get_ns_prefix (p_ns_uri, 3), 'n0pred');
-              pred_tagname := p_ns_pref || ':' || subseq (res, delim+1);
-              http ('<', ses); http (pred_tagname, ses);
-              http (' xmlns:' || p_ns_pref || '="', ses); http_value (p_ns_uri, 0, ses); http ('"', ses);
-            }
-        }
-      if (obj is null)
-        signal ('RDFXX', 'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): object is NULL');
-      if (isiri_id (obj))
-        {
-          if (obj >= min_bnode_iri_id ())
-            http (sprintf (' rdf:nodeID="b%d"/>', iri_id_num (obj)), ses);
-          else
-            {
-              res := coalesce (id_to_iri(obj), sprintf ('_:bad_iid_%d', iri_id_num (obj)));
---              res := coalesce ((select RU_QNAME from DB.DBA.RDF_URL where RU_IID = obj), sprintf ('_:bad_iid_%d', iri_id_num (obj)));
-              http (' rdf:resource="', ses); http_value (res, 0, ses); http ('"/>', ses);
-            }
-        }
-      else if (__tag of rdf_box = __tag (obj))
-        {
-          declare dat any;
-          if (257 <> rdf_box_type (obj))
-            {
-              res := coalesce ((select RDT_QNAME from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));
-              http (' rdf:datatype="', ses); http_value (res, 0, ses); http ('"', ses);
-            }
-          else if (257 <> rdf_box_lang (obj))
-            {
-              res := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));
-              http (' xml:lang="', ses); http_value (res, 0, ses); http ('"', ses);
-            }
-          dat := __rdf_sqlval_of_obj (obj, 1);
-          if (__tag of XML = __tag (dat))
-            {
-              http (' rdf:parseType="Literal">', ses);
-              http_value (dat, 0, ses);
-              http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-            }
-          else if (__tag of datetime = rdf_box_data_tag (obj))
-            {
-	      if (257 = rdf_box_type (obj))
-		{
-		  http (' rdf:datatype="', ses);
-		  http_escape (cast (__xsd_type (dat) as varchar), 12, ses, 1, 1);
-		  http ('">', ses);
-		}
-	      else
-		http ('>', ses);
-              __rdf_long_to_ttl (dat, ses);
-              http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-            }
-          else
-            {
-	      declare tmp any;
-              http ('>', ses);
-	      tmp := __rdf_strsqlval (obj);
-	      if (__tag of varchar = __tag (tmp))
-		tmp := charset_recode (tmp, 'UTF-8', '_WIDE_');
-              http_value (tmp, 0, ses);
-              http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-            }
-        }
-      else if (__tag of varchar = __tag (obj))
-        {
-          if (1 = __box_flags (obj))
-            {
-              if (obj like 'nodeID://%')
-                {
-                  http (' rdf:nodeID="b', ses); http_value (subseq (obj, 9), 0, ses); http ('"/>', ses);
-                }
-              else
-                {
-                  http (' rdf:resource="', ses); http_value (obj, 0, ses); http ('"/>', ses);
-                }
-            }
-          else
-            {
-              http ('>', ses);
-              obj := charset_recode (obj, 'UTF-8', '_WIDE_');
-              http_value (obj, 0, ses);
-              http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-            }
-        }
-      else if (__tag of varbinary = __tag (obj))
-        {
-          http ('>', ses);
-          http_value (obj, 0, ses);
-          http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-        }
-      else if (__tag of XML = __tag (obj))
-        {
-          http (' rdf:parseType="Literal">', ses);
-          http_value (obj, 0, ses);
-          http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-        }
-      else if (__tag of datetime = rdf_box_data_tag (obj))
-        {
-          http (' rdf:datatype="', ses);
-          http_escape (cast (__xsd_type (obj) as varchar), 12, ses, 1, 1);
-          http ('">', ses);
-          __rdf_long_to_ttl (obj, ses);
-          http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-        }
-      else
-        {
-          http (' rdf:datatype="', ses);
-          http_value (__xsd_type (obj), 0, ses);
-          http ('">', ses);
-          http_value (__rdf_strsqlval (obj), 0, ses);
-          http ('</', ses); http (pred_tagname, ses); http ('>', ses);
-        }
-      http ('</rdf:Description>', ses);
+      http_rdfxml_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);
     }
+  if (isstring (env[2]))
+    http ('\n  </rdf:Description>', ses);
   if (print_top_level)
     {
       http ('\n</rdf:RDF>', ses);
@@ -3634,6 +3928,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (inout triples any, inout ses
 -- No error handlers here because failed sorting by predicate or subject would result in poorly structured output.
   rowvector_subj_sort (triples, 1, 1);
   rowvector_subj_sort (triples, 0, 1);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   http ('{\n  ', ses);
   status := 0;
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
@@ -3647,6 +3942,35 @@ create procedure DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (inout triples any, inout ses
 }
 ;
 
+create procedure DB.DBA.RDF_TRIPLES_TO_JSON_LD (inout triples any, inout ses any)
+{
+  declare env any;
+  declare tcount, tctr, status integer;
+  tcount := length (triples);
+  -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_JSON_LD:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) -- dbg_obj_princ (triples[tctr]);
+  if (0 = tcount)
+    {
+      http ('{ }\n', ses);
+      return;
+    }
+  env := vector (0, 0, 0, null);
+-- No error handlers here because failed sorting by predicate or subject would result in poorly structured output.
+  rowvector_subj_sort (triples, 1, 1);
+  rowvector_subj_sort (triples, 0, 1);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  http ('{ "@id": [\n    ', ses);
+  status := 0;
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      if (http_ld_json_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses))
+        status := 1;
+    }
+  if (status)
+    http (' ] }\n', ses);
+  http ('] }\n', ses);
+}
+;
+
 create procedure DB.DBA.RDF_TRIPLES_TO_JSON (inout triples any, inout ses any)
 {
   declare tcount, tctr, env integer;
@@ -3654,6 +3978,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_JSON (inout triples any, inout ses any)
   http ('\n{ "head": { "link": [], "vars": [ "s", "p", "o" ] },\n  "results": { "distinct": false, "ordered": true, "bindings": [', ses);
   tcount := length (triples);
   env := vector (0, 0, vector ('s', 'p', 'o'), null);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
     {
       declare triple any;
@@ -3676,6 +4001,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_CSV (inout triples any, inout ses any)
   -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_CSV:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) -- dbg_obj_princ (triples[tctr]);
   { whenever sqlstate '*' goto p_done; rowvector_subj_sort (triples, 1, 1); p_done: ; }
   { whenever sqlstate '*' goto s_done; rowvector_subj_sort (triples, 0, 1); s_done: ; }
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
     {
       DB.DBA.SPARQL_RESULTS_CSV_WRITE_VALUE (ses, triples[tctr][0]);
@@ -3707,6 +4033,7 @@ This time the service made zero such statements, sorry.</p></body></html>', ses)
   nsdict := dict_new (10 + cast (sqrt(tcount) as integer));
   dict_put (nsdict, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf');
   dict_put (nsdict, 'http://www.w3.org/2001/XMLSchema#', 'xsdh');
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   for (tctr := 0; (tctr < tcount) and (1000 > dict_size (nsdict)); tctr := tctr + 1)
     {
       sparql_iri_split_rdfa_qname (triples[tctr][0], nsdict, 1);
@@ -3727,7 +4054,7 @@ This time the service made zero such statements, sorry.</p></body></html>', ses)
     tcount), ses);
   http ('<p>A generic web browser may not display them but the document can be saved on disk and used by some appropriate program or sent to a third party.
 Use "Save As" or "Send To" menu item of the browser; choose "HTML" file type, not "text file" or "web archive".
-</p><p>The rest of the document may look like garbage for humans or not displayed by the browser.</p>', ses);
+</p><p>The rest of the document may look like garbage for humans or not displayed by the browser.</p>\n<ul>', ses);
   env := vector (0, 0, 0, null);
   rowvector_subj_sort (triples, 0, 1);
   prev_subj := null;
@@ -3745,31 +4072,31 @@ Use "Save As" or "Send To" menu item of the browser; choose "HTML" file type, no
       if (prev_subj is null or (subj <> prev_subj))
         {
           if (prev_subj is not null)
-            http ('\n</div>', ses);
-          http ('\n<div about="[', ses);
+            http ('\n</ul></li>', ses);
+          http ('\n<li about="[', ses);
           split := sparql_iri_split_rdfa_qname (subj, nsdict, 2);
           -- dbg_obj_princ ('Split of ', subj, ' is ', split);
           if ('' = split[1])
             {
               http_escape (split[2], 3, ses, 1, 1);
-              http (']">', ses);
+              http (']">\n<ul>', ses);
             }
           else if (isstring (split[0]))
             {
               http_escape (concat (split[0], ':', split[2]), 3, ses, 1, 1);
-              http (']">', ses);
+              http (']">\n<ul>', ses);
             }
           else
             {
               http_escape (concat ('s:', split[2]), 3, ses, 1, 1);
               http (']" xmlns:s="', ses);
               http_escape (split[1], 3, ses, 1, 1);
-              http ('">', ses);
+              http ('">\n<ul>', ses);
             }
           prev_subj := subj;
         }
       obj_iri_split := sparql_iri_split_rdfa_qname (obj, nsdict, 2);
-      http (case (isvector (obj_iri_split)) when 0 then '\n<div property="' else '\n<div rel="' end, ses);
+      http (case (isvector (obj_iri_split)) when 0 then '\n<li property="' else '\n<li rel="' end, ses);
       split := sparql_iri_split_rdfa_qname (pred, nsdict, 2);
       if ('' = split[1])
         {
@@ -3872,74 +4199,748 @@ Use "Save As" or "Send To" menu item of the browser; choose "HTML" file type, no
                 sqlval := charset_recode (sqlval, 'UTF-8', '_WIDE_');
               http_value (sqlval, 0, ses);
             }
-          http ('</div>', ses);
+          http ('</li>', ses);
         }
     }
   if (prev_subj is not null)
-    http ('\n</div>', ses);
+    http ('\n</ul></li></ul>', ses);
   http ('\n</body></html>\n', ses);
 }
 ;
 
--- /* OData ATOM format */
-create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ATOM_XML (inout triples_dict any) returns long varchar
+create function DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT (in ul_or_tr varchar)
 {
-  declare triples, ses any;
-  ses := string_output ();
-  if (214 <> __tag (triples_dict))
-    {
-      triples := vector ();
-    }
+  declare lpath varchar;
+  lpath := virtuoso_ini_item_value ('URIQA','DefaultHost');
+  if (lpath is null)
+    lpath := '/sparql';
   else
-    triples := dict_list_keys (triples_dict, 1);
-  DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (triples, 1, ses);
-  return ses;
+    lpath := 'http://' || lpath || '/sparql';
+  whenever sqlstate 'HT013' goto no_http_context;
+  lpath := http_path ();
+no_http_context:
+  return ' <a href=" ' || lpath || '?query=describe+%%3C%U%%3E&format=text%%2Fx-html%%2B' || ul_or_tr || '">describe</a> ';
 }
 ;
 
-create procedure DB.DBA.ODATA_EDM_TYPE (in obj any)
+create function DB.DBA.RDF_PIVOT_DESCRIBE_LINK (in iri varchar)
 {
-  if (__tag of int = __tag (obj))
-    return 'Int32';
-  else if (__tag of smallint  = __tag (obj))
-    return 'Int16';
-  else if (__tag of bigint = __tag (obj))
-    return 'Int64';
-  else if (__tag of numeric = __tag (obj))
-    return 'Decimal';
-  else if (__tag of double precision = __tag (obj))
-    return 'Double';
-  else if (__tag of real = __tag (obj))
-    return 'Double';
-  else if (__tag of datetime = __tag (obj))
-    return 'DateTime';
-  else if (__tag of date = __tag (obj))
-    return 'Date';
-  else if (__tag of time = __tag (obj))
-    return 'Time';
-  else if (__tag of varbinary = __tag (obj))
-    return 'Binary';
-  return null;
+  return sprintf ('; <a href="/describe/?url=%U&sid=1&urilookup=1">facets</a> ', iri);
 }
 ;
 
-create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ODATA_JSON (inout triples_dict any) returns long varchar
+create procedure DB.DBA.RDF_TRIPLES_TO_HTML_UL (inout triples any, inout ses any)
 {
-  declare triples, ses any;
-  ses := string_output ();
-  if (214 <> __tag (triples_dict))
+  declare env, prev_subj, prev_pred any;
+  declare can_pivot, ctr, len, tcount, tctr, status, obj_needs_br integer;
+  declare endpoint_fmt, subj_iri, pred_iri varchar;
+  tcount := length (triples);
+  -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_UL:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) -- dbg_obj_princ (triples[tctr]);
+  http ('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">\n', ses);
+  if (0 = tcount)
     {
-      triples := vector ();
+      http ('<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Empty HTML RDFa and Microdata document</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+</head><body>
+<p>This document is empty and basically useless. It is generated by a web service that can make some statements in HTML Microdata format.
+This time the service made zero such statements, sorry.</p></body></html>', ses);
+      return;
     }
-  else
-    triples := dict_list_keys (triples_dict, 1);
-  DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (triples, ses);
-  return ses;
-}
-;
-
-create procedure DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (inout triples any, inout ses any)
-{
+  endpoint_fmt := DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT ('ul');
+  can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION ('PivotViewer'))) when 0 then 1 else 0 end;
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  http ('<html xmlns="http://www.w3.org/1999/xhtml"', ses);
+  http ('>\n<head><title>HTML RDFa and Microdata document</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+</head>\n<body>\n<ul>\n', ses);
+  env := vector (0, 0, 0, null);
+  rowvector_subj_sort (triples, 1, 1);
+  rowvector_subj_sort (triples, 0, 1);
+  prev_subj := prev_pred := null;
+  obj_needs_br := 0;
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      declare subj, pred, obj, split, obj_iri_split any;
+      declare pred_tagname varchar;
+      declare res varchar;
+      subj := triples[tctr][0];
+      pred := triples[tctr][1];
+      obj := triples[tctr][2];
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_UL: subj:', subj, __tag(subj), __box_flags (subj));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_UL: pred:', pred, __tag(pred), __box_flags (pred));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_UL: obj:', obj, __tag(obj), __box_flags (obj));
+      if (prev_subj is null or (subj <> prev_subj))
+        {
+          if (prev_subj is not null)
+            http ('\n          </ul></li>\n      </ul></li>', ses);
+          subj_iri := id_to_iri (subj);
+          http ('\n  <li about="', ses);
+          http_escape (subj_iri, 3, ses, 1, 1);
+          http ('" itemscope="" itemid="', ses);
+          http_escape (subj_iri, 3, ses, 1, 1);
+          http ('"><a href="', ses);
+          http_escape (subj_iri, 3, ses, 1, 1);
+          http ('">', ses);
+          http_escape (subj_iri, 1, ses, 1, 1);
+          http ('</a> (', ses);
+          http (sprintf (endpoint_fmt, subj_iri), ses);
+          if (can_pivot)
+            http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (subj_iri), ses);
+          http (')\n    <ul>', ses);
+          prev_subj := subj;
+          prev_pred := null;
+        }
+      if (prev_pred is null or (pred <> prev_pred))
+        {
+          if (prev_pred is not null)
+            http ('\n        </ul></li>', ses);
+          pred_iri := id_to_iri (pred);
+          http ('\n      <li><a href="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('">', ses);
+          http_escape (pred_iri, 1, ses, 1, 1);
+          http ('</a> (', ses);
+          http (sprintf (endpoint_fmt, pred_iri), ses);
+          if (can_pivot)
+            http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (pred_iri), ses);
+          http (')\n        <ul>', ses);
+          prev_pred := pred;
+          obj_needs_br := 0;
+        }
+      if (obj is null)
+        signal ('RDFXX', 'DB.DBA.TRIPLES_TO_HTML_UL: object is NULL');
+      if (obj_needs_br)
+        http ('\n', ses);
+      else
+        obj_needs_br := 1;
+      if (isiri_id (obj))
+        {
+          declare obj_iri varchar;
+          obj_iri := id_to_iri (obj);
+          http ('\n          <li><a rel="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('" resource="', ses);
+          http_escape (obj_iri, 3, ses, 1, 1);
+          http ('" itemprop="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('" href="', ses);
+          http_escape (obj_iri, 3, ses, 1, 1);
+          http ('">', ses);
+          http_escape (obj_iri, 1, ses, 1, 1);
+          http ('</a> (', ses);
+          http (sprintf (endpoint_fmt, obj_iri), ses);
+          if (can_pivot)
+            http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (obj_iri), ses);
+          http (')</li>', ses);
+        }
+      else
+        {
+          declare sqlval any;
+          declare dt, lang, strval any;
+          http ('\n          <li property="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('" itemprop="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          dt := 0; lang := 0;
+          if (__tag of rdf_box = __tag (obj))
+            {
+              if (257 <> rdf_box_lang (obj))
+                lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));
+              else if (257 <> rdf_box_type (obj))
+                dt := coalesce ((select __bft (RDT_QNAME, 1) from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));
+              sqlval := __rdf_sqlval_of_obj (obj, 1);
+              if (__tag of datetime = __tag (sqlval))
+                {
+                  if (257 = rdf_box_type (obj))
+                    dt := __xsd_type (sqlval);
+                }
+            }
+          else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))
+            {
+              sqlval := obj;
+              dt := __xsd_type (sqlval);
+            }
+          else
+            sqlval := obj;
+          if (not (isinteger (dt)))
+            {
+              http ('" datatype="', ses);
+              http_escape (dt, 3, ses, 1, 1);
+            }
+          if (isstring (lang))
+            {
+              http ('" xml:lang="', ses);
+              http_escape (lang, 3, ses, 1, 1);
+            }
+          http ('">', ses);
+          if (__tag of datetime = __tag(sqlval))
+            __rdf_long_to_ttl (sqlval, ses);
+          else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))
+            http_value (sqlval, 0, ses);
+          else if (__tag of varchar = __tag (sqlval))
+            http_value (charset_recode (sqlval, 'UTF-8', '_WIDE_'), 0, ses);
+          else
+            {
+              sqlval := __rdf_strsqlval (obj);
+              if (__tag of varchar = __tag (sqlval))
+                sqlval := charset_recode (sqlval, 'UTF-8', '_WIDE_');
+              http_value (sqlval, 0, ses);
+            }
+          http ('</li>', ses);
+        }
+    }
+  if (prev_subj is not null)
+    http ('\n        </ul></li></ul></li></ul>', ses);
+  http ('\n</body></html>\n', ses);
+}
+;
+
+
+create procedure DB.DBA.RDF_TRIPLES_TO_HTML_TR (inout triples any, inout ses any)
+{
+  declare env, prev_subj, prev_pred any;
+  declare can_pivot, ctr, len, tcount, tctr, status integer;
+  declare endpoint_fmt, subj_iri, pred_iri, subj_recod, pred_recod, subj_trtd, pred_tdtd varchar;
+  tcount := length (triples);
+  -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_TR:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) -- dbg_obj_princ (triples[tctr]);
+  -- http ('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html>\n', ses);
+  if (0 = tcount)
+    {
+      http ('<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Empty HTML RDFa and Microdata document</title></head><body>
+<p>This document is empty and basically useless. It is generated by a web service that can make some statements in HTML Microdata format.
+This time the service made zero such statements, sorry.</p></body></html>', ses);
+      return;
+    }
+  endpoint_fmt := DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT ('tr');
+  can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION ('PivotViewer'))) when 0 then 1 else 0 end;
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  http ('<html xmlns="http://www.w3.org/1999/xhtml"', ses);
+  http ('>\n<head><title>HTML RDFa and Microdata document</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+</head>\n<body>\n<table>\n', ses);
+  env := vector (0, 0, 0, null);
+  rowvector_subj_sort (triples, 1, 1);
+  rowvector_subj_sort (triples, 0, 1);
+  prev_subj := prev_pred := null;
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      declare subj, pred, obj, split, obj_iri_split any;
+      declare pred_tagname varchar;
+      declare res varchar;
+      subj := triples[tctr][0];
+      pred := triples[tctr][1];
+      obj := triples[tctr][2];
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_TR: subj:', subj, __tag(subj), __box_flags (subj));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_TR: pred:', pred, __tag(pred), __box_flags (pred));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_TR: obj:', obj, __tag(obj), __box_flags (obj));
+      if (prev_subj is null or (subj <> prev_subj))
+        {
+          declare trtd_ses any;
+          subj_iri := id_to_iri (subj);
+          --subj_recod := replace (subj_iri, '"', '%22');
+          --subj_trtd := sprintf ('\n<tr itemscope="itemscope" about="%s" itemid="%s">\n  <td><a href="%s">%V</a> (' || endpoint_fmt || '%s)</td>',
+          --  subj_recod, subj_recod, subj_recod, subj_iri, subj_iri,
+          --  case when (can_pivot) then DB.DBA.RDF_PIVOT_DESCRIBE_LINK (id_to_iri (subj)) else '' end );
+          trtd_ses := string_output ();
+          http ('\n<tr itemscope="itemscope" about="', trtd_ses);
+          http_escape (subj_iri, 3, trtd_ses, 1, 1);
+          http ('" itemid="', trtd_ses);
+          http_escape (subj_iri, 3, trtd_ses, 1, 1);
+          http ('">\n  <td><a href="', trtd_ses);
+          http_escape (subj_iri, 3, trtd_ses, 1, 1);
+          http (sprintf ('">%V</a> (' || endpoint_fmt || '%s)</td>', subj_iri, subj_iri,
+              case when (can_pivot) then DB.DBA.RDF_PIVOT_DESCRIBE_LINK (id_to_iri (subj)) else '' end ),
+            trtd_ses );
+          subj_trtd := string_output_string (trtd_ses);
+          prev_subj := subj;
+        }
+      if (prev_pred is null or (pred <> prev_pred))
+        {
+          declare tdtd_ses any;
+          pred_iri := id_to_iri (pred);
+          --pred_recod := replace (pred_iri, '"', '%22');
+          --pred_tdtd := sprintf ('\n  <td><a href="%s">%s</a> (' || endpoint_fmt || '%s)\n  </td><td',
+          --  pred_recod, pred_recod, pred_iri,
+          --  case when (can_pivot) then DB.DBA.RDF_PIVOT_DESCRIBE_LINK (id_to_iri (pred)) else '' end );
+          tdtd_ses := string_output ();
+          http ('\n  <td><a href="', tdtd_ses);
+          http_escape (pred_iri, 3, tdtd_ses, 1, 1);
+          http ('">', tdtd_ses);
+          http_escape (pred_iri, 1, tdtd_ses, 1, 1);
+          http (sprintf ('</a> (' || endpoint_fmt || '%s)\n  </td><td', pred_iri,
+              case when (can_pivot) then DB.DBA.RDF_PIVOT_DESCRIBE_LINK (id_to_iri (pred)) else '' end ),
+            tdtd_ses );
+          pred_tdtd := string_output_string (tdtd_ses);
+          prev_pred := pred;
+        }
+      if (obj is null)
+        signal ('RDFXX', 'DB.DBA.TRIPLES_TO_HTML_TR: object is NULL');
+      http (subj_trtd, ses);
+      http (pred_tdtd, ses);
+      if (isiri_id (obj))
+        {
+          declare obj_iri varchar;
+          obj_iri := id_to_iri (obj);
+          http ('><a rel="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('" resource="', ses);
+          http_escape (obj_iri, 3, ses, 1, 1);
+          http ('" itemprop="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('" href="', ses);
+          http_escape (obj_iri, 3, ses, 1, 1);
+          http (sprintf ('">%V</a> (' || endpoint_fmt, obj_iri, obj_iri), ses);
+          if (can_pivot)
+            http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (obj_iri), ses);
+          http (')</td></tr>', ses);
+        }
+      else
+        {
+          declare sqlval any;
+          declare dt, lang, strval any;
+          http (' property="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          http ('" itemprop="', ses);
+          http_escape (pred_iri, 3, ses, 1, 1);
+          dt := 0; lang := 0;
+          if (__tag of rdf_box = __tag (obj))
+            {
+              if (257 <> rdf_box_lang (obj))
+                lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));
+              else if (257 <> rdf_box_type (obj))
+                dt := coalesce ((select __bft (RDT_QNAME, 1) from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));
+              sqlval := __rdf_sqlval_of_obj (obj, 1);
+              if (__tag of datetime = __tag (sqlval))
+                {
+                  if (257 = rdf_box_type (obj))
+                    dt := __xsd_type (sqlval);
+                }
+            }
+          else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))
+            {
+              sqlval := obj;
+              dt := __xsd_type (sqlval);
+            }
+          else
+            sqlval := obj;
+          if (not (isinteger (dt)))
+            {
+              http ('" datatype="', ses);
+              http_escape (dt, 3, ses, 1, 1);
+            }
+          if (isstring (lang))
+            {
+              http ('" xml:lang="', ses);
+              http_escape (lang, 3, ses, 1, 1);
+            }
+          http ('">', ses);
+          if (__tag of datetime = __tag(sqlval))
+            __rdf_long_to_ttl (sqlval, ses);
+          else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))
+            http_value (sqlval, 0, ses);
+          else if (__tag of varchar = __tag (sqlval))
+            http_value (charset_recode (sqlval, 'UTF-8', '_WIDE_'), 0, ses);
+          else
+            {
+              sqlval := __rdf_strsqlval (obj);
+              if (__tag of varchar = __tag (sqlval))
+                sqlval := charset_recode (sqlval, 'UTF-8', '_WIDE_');
+              http_value (sqlval, 0, ses);
+            }
+          http ('</td></tr>', ses);
+        }
+    }
+  http ('\n</table></body></html>\n', ses);
+}
+;
+
+
+create procedure DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (inout triples any, inout ses any)
+{
+  declare env, prev_subj, prev_pred, nsdict, nslist any;
+  declare ctr, len, tcount, tctr, status, obj_needs_br integer;
+  tcount := length (triples);
+  -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) -- dbg_obj_princ (triples[tctr]);
+  -- http ('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE html>\n', ses);
+  if (0 = tcount)
+    {
+      http ('<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>Empty HTML Microdata document</title></head><body>
+<p>This document is empty and basically useless. It is generated by a web service that can make some statements in HTML Microdata format.
+This time the service made zero such statements, sorry.</p></body></html>', ses);
+      return;
+    }
+  nsdict := dict_new (10 + cast (sqrt(tcount) as integer));
+  dict_put (nsdict, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf');
+  dict_put (nsdict, 'http://www.w3.org/2001/XMLSchema#', 'xsdh');
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  for (tctr := 0; (tctr < tcount) and (1000 > dict_size (nsdict)); tctr := tctr + 1)
+    {
+      sparql_iri_split_rdfa_qname (triples[tctr][0], nsdict, 1);
+      sparql_iri_split_rdfa_qname (triples[tctr][1], nsdict, 1);
+      sparql_iri_split_rdfa_qname (triples[tctr][2], nsdict, 1);
+    }
+  http ('<html xmlns="http://www.w3.org/1999/xhtml"', ses);
+  http ('>\n<head><title>HTML Microdata document</title></head><body>\n', ses);
+  http (sprintf ('<p>This document contains %d facts in HTML Microdata format.</p>',
+    tcount), ses);
+  http ('<p>A generic web browser may not display them properly but the document can be saved on disk and used by some appropriate program or sent to a third party.
+Use "Save As" or "Send To" menu item of the browser; choose "HTML" file type, not "text file" or "web archive".
+</p><p>The rest of the document may look like garbage for humans or not displayed by the browser.</p>', ses);
+  http ('\n<table><tr><th>Prefix</th><th>Namespace IRI</th></tr>', ses);
+  nslist := dict_to_vector (nsdict, 0);
+  len := length (nslist);
+  for (ctr := len - 2; ctr >= 0; ctr := ctr-2)
+    {
+      http (sprintf ('\n<tr><td>%V</td><td>%V</td></tr>', nslist[ctr+1], nslist[ctr]), ses);
+    }
+  http ('</table>', ses);
+  env := vector (0, 0, 0, null);
+  rowvector_subj_sort (triples, 1, 1);
+  rowvector_subj_sort (triples, 0, 1);
+  prev_subj := prev_pred := null;
+  obj_needs_br := 0;
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      declare subj, pred, obj, split, obj_iri_split any;
+      declare pred_tagname varchar;
+      declare res varchar;
+      subj := triples[tctr][0];
+      pred := triples[tctr][1];
+      obj := triples[tctr][2];
+      if (isstring (subj))
+	subj := iri_to_id (subj);
+      if (isstring (pred))
+	pred := iri_to_id (pred);
+      if (isstring (obj) and __box_flags (obj) = 1)
+	obj := iri_to_id (obj);
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA: subj:', subj, __tag(subj), __box_flags (subj));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA: pred:', pred, __tag(pred), __box_flags (pred));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA: obj:', obj, __tag(obj), __box_flags (obj));
+      if (prev_subj is null or (subj <> prev_subj))
+        {
+          if (prev_subj is not null)
+            http ('\n</dd></dl>', ses);
+          http (sprintf ('\n<dl itemscope itemid="%s">', replace (id_to_iri (subj), '"', '%22')), ses);
+          split := sparql_iri_split_rdfa_qname (subj, nsdict, 2);
+          -- dbg_obj_princ ('Split of ', subj, ' is ', split);
+          if ('' = split[1])
+            http (sprintf ('\n<dt>Subject Item</dt><dd>%V</dd>', split[2]), ses);
+          else if (isstring (split[0]))
+            http (sprintf ('\n<dt>Subject Item</dt><dd>%V:%V</dd>', split[0], split[2]), ses);
+          else
+            http (sprintf ('\n<dt>Subject Item</dt><dd>%V%V</dd>', split[1], split[2]), ses);
+          prev_subj := subj;
+          prev_pred := null;
+        }
+      if (prev_pred is null or (pred <> prev_pred))
+        {
+          if (prev_pred is not null)
+            http ('\n</dd>', ses);
+          split := sparql_iri_split_rdfa_qname (pred, nsdict, 2);
+          -- dbg_obj_princ ('Split of ', pred, ' is ', split);
+          if ('' = split[1])
+            http (sprintf ('\n<dt>%V</dt><dd>', split[2]), ses);
+          else if (isstring (split[0]))
+            http (sprintf ('\n<dt>%V:%V</dt><dd>', split[0], split[2]), ses);
+          else
+            http (sprintf ('\n<dt>%V%V</dt><dd>', split[1], split[2]), ses);
+          prev_pred := pred;
+          obj_needs_br := 0;
+        }
+      if (obj is null)
+        signal ('RDFXX', 'DB.DBA.TRIPLES_TO_HTML_MICRODATA: object is NULL');
+      if (obj_needs_br)
+        http ('\n', ses);
+      else
+        obj_needs_br := 1;
+      obj_iri_split := sparql_iri_split_rdfa_qname (obj, nsdict, 2);
+      if (isvector (obj_iri_split))
+        {
+          http (sprintf ('\n<a itemprop="%s" href="%s">', replace (id_to_iri (pred), '"', '%22'), replace (id_to_iri (obj), '"', '%22')), ses);
+          if ('' = obj_iri_split[1])
+            http (sprintf ('%V</a>', obj_iri_split[2]), ses);
+          else if (isstring (obj_iri_split[0]))
+            http (sprintf ('%V:%V</a>', obj_iri_split[0], obj_iri_split[2]), ses);
+          else
+            http (sprintf ('%V%V</a>', obj_iri_split[1], obj_iri_split[2]), ses);
+        }
+      else
+        {
+          declare sqlval any;
+          declare dt, lang, strval any;
+          http (sprintf ('\n<span itemprop="%s"', replace (id_to_iri (pred), '"', '%22')), ses);
+          dt := 0; lang := 0;
+          if (__tag of rdf_box = __tag (obj))
+            {
+              if (257 <> rdf_box_lang (obj))
+                lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));
+--DT          else if (257 <> rdf_box_type (obj))
+--DT            dt := coalesce ((select __bft (RDT_QNAME, 1) from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));
+              sqlval := __rdf_sqlval_of_obj (obj, 1);
+--DT          if (__tag of datetime = __tag (sqlval))
+--DT            {
+--DT              if (257 = rdf_box_type (obj))
+--DT                dt := __xsd_type (sqlval);
+--DT            }
+            }
+          else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))
+            {
+              sqlval := obj;
+--DT          dt := __xsd_type (sqlval);
+            }
+          else
+            sqlval := obj;
+--DT      if (not (isinteger (dt)))
+--DT        {
+--DT          http (' datatype="', ses);
+--DT          split := sparql_iri_split_rdfa_qname (dt, nsdict, 2);
+--DT          if ('' = split[1])
+--DT            {
+--DT              http_escape (split[2], 3, ses, 1, 1);
+--DT              http ('"', ses);
+--DT            }
+--DT          else if (isstring (split[0]))
+--DT            {
+--DT              http_escape (concat (split[0], ':', split[2]), 3, ses, 1, 1);
+--DT              http ('"', ses);
+--DT            }
+--DT          else
+--DT            {
+--DT              http_escape (concat ('dt:', split[2]), 3, ses, 1, 1);
+--DT              http ('" xmlns:dt="', ses);
+--DT              http_escape (split[1], 3, ses, 1, 1);
+--DT              http ('"', ses);
+--DT            }
+--DT        }
+          if (isstring (lang))
+            {
+              http (' xml:lang="', ses);
+              http_escape (lang, 3, ses, 1, 1);
+              http ('"', ses);
+            }
+          http ('>', ses);
+          if (__tag of datetime = __tag(sqlval))
+            __rdf_long_to_ttl (sqlval, ses);
+          else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))
+            http_value (sqlval, 0, ses);
+          else if (__tag of varchar = __tag (sqlval))
+            http_value (charset_recode (sqlval, 'UTF-8', '_WIDE_'), 0, ses);
+          else
+            {
+              sqlval := __rdf_strsqlval (obj);
+              if (__tag of varchar = __tag (sqlval))
+                sqlval := charset_recode (sqlval, 'UTF-8', '_WIDE_');
+              http_value (sqlval, 0, ses);
+            }
+          http ('</span>', ses);
+        }
+    }
+  if (prev_subj is not null)
+    http ('\n</dd></dl>', ses);
+  http ('\n</body></html>\n', ses);
+}
+;
+
+create procedure DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (inout triples any, inout ses any)
+{
+  declare env, prev_subj, prev_pred any;
+  declare ctr, len, tcount, tctr, status, obj_needs_comma integer;
+  tcount := length (triples);
+  -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA:'); for (tctr := 0; tctr < tcount; tctr := tctr + 1) -- dbg_obj_princ (triples[tctr]);
+  http ('{ "items" : [', ses);
+  env := vector (0, 0, 0, null);
+  rowvector_subj_sort (triples, 1, 1);
+  rowvector_subj_sort (triples, 0, 1);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
+  prev_subj := prev_pred := null;
+  obj_needs_comma := 0;
+  for (tctr := 0; tctr < tcount; tctr := tctr + 1)
+    {
+      declare subj, pred, obj, split, obj_iri_split any;
+      declare pred_tagname varchar;
+      declare res varchar;
+      subj := triples[tctr][0];
+      pred := triples[tctr][1];
+      obj := triples[tctr][2];
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA: subj:', subj, __tag(subj), __box_flags (subj));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA: pred:', pred, __tag(pred), __box_flags (pred));
+      -- dbg_obj_princ ('DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA: obj:', obj, __tag(obj), __box_flags (obj));
+      if (prev_subj is null or (subj <> prev_subj))
+        {
+          declare subj_iri varchar;
+          if (prev_subj is not null)
+            http (' ] } },\n', ses);
+          subj_iri := id_to_iri (subj);
+          if (starts_with (subj_iri, 'nodeID://'))
+            subj_iri := '_:' || subseq (subj_iri, 9);
+          http ('\n    { "id" : "', ses); http_escape (subj_iri, 14, ses, 1, 1); http ('"\n      "properties" : {', ses);
+          prev_subj := subj;
+          prev_pred := null;
+        }
+      if (prev_pred is null or (pred <> prev_pred))
+        {
+          if (prev_pred is not null)
+            http (' ] ,', ses);
+          http ('\n        "', ses); http_escape (id_to_iri (pred), 14, ses, 1, 1); http ('" : [ ', ses);
+          prev_pred := pred;
+          obj_needs_comma := 0;
+        }
+      if (obj is null)
+        signal ('RDFXX', 'DB.DBA.TRIPLES_TO_JSON_MICRODATA: object is NULL');
+      if (obj_needs_comma)
+        http (',\n          ', ses);
+      else
+        obj_needs_comma := 1;
+      if (isiri_id (obj))
+        {
+          declare obj_iri varchar;
+          obj_iri := id_to_iri (obj);
+          if (starts_with (obj_iri, 'nodeID://'))
+            obj_iri := '_:' || subseq (obj_iri, 9);
+          http ('{ "id" : "', ses); http_escape (obj_iri, 14, ses, 1, 1); http ('" }', ses);
+        }
+      else
+        {
+          declare sqlval any;
+          declare dt, lang, strval any;
+          dt := 0; lang := 0;
+          if (__tag of rdf_box = __tag (obj))
+            {
+              if (257 <> rdf_box_lang (obj))
+                lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));
+--DT          else if (257 <> rdf_box_type (obj))
+--DT            dt := coalesce ((select __bft (RDT_QNAME, 1) from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));
+              sqlval := __rdf_sqlval_of_obj (obj, 1);
+--DT          if (__tag of datetime = __tag (sqlval))
+--DT            {
+--DT              if (257 = rdf_box_type (obj))
+--DT                dt := __xsd_type (sqlval);
+--DT            }
+            }
+          else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))
+            {
+              sqlval := obj;
+--DT          dt := __xsd_type (sqlval);
+            }
+          else
+            sqlval := obj;
+--DT      if (not (isinteger (dt)))
+--DT        {
+--DT          http (' datatype="', ses);
+--DT          split := sparql_iri_split_rdfa_qname (dt, nsdict, 2);
+--DT          if ('' = split[1])
+--DT            {
+--DT              http_escape (split[2], 3, ses, 1, 1);
+--DT              http ('"', ses);
+--DT            }
+--DT          else if (isstring (split[0]))
+--DT            {
+--DT              http_escape (concat (split[0], ':', split[2]), 3, ses, 1, 1);
+--DT              http ('"', ses);
+--DT            }
+--DT          else
+--DT            {
+--DT              http_escape (concat ('dt:', split[2]), 3, ses, 1, 1);
+--DT              http ('" xmlns:dt="', ses);
+--DT              http_escape (split[1], 3, ses, 1, 1);
+--DT              http ('"', ses);
+--DT            }
+--DT        }
+--DT      if (isstring (lang))
+--DT        {
+--DT          http (' xml:lang="', ses);
+--DT          http_escape (lang, 3, ses, 1, 1);
+--DT          http ('"', ses);
+--DT        }
+--DT      http ('>', ses);
+          if (__tag (sqlval) in (__tag of integer, __tag of real, __tag of double precision, __tag of decimal))
+            http_value (sqlval, 0, ses);
+          else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))
+            {
+              declare tmpses any;
+              tmpses := string_output();
+              http_value (sqlval, 0, tmpses);
+              http ('"', ses); http_escape (string_output_string (tmpses), 14, ses, 1, 1); http ('"', ses);
+            }
+          else if (__tag of varchar = __tag (sqlval))
+            {
+              http ('"', ses); http_escape (sqlval, 14, ses, 1, 1); http ('"', ses);
+            }
+          else
+            {
+              sqlval := __rdf_strsqlval (obj);
+              http ('"', ses); http_escape (sqlval, 14, ses, 1, 1); http ('"', ses);
+            }
+        }
+    }
+  if (prev_subj is not null)
+    http ('] } }', ses);
+  http (' }\n', ses);
+}
+;
+
+-- /* OData ATOM format */
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ATOM_XML (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (triples, 1, ses);
+  return ses;
+}
+;
+
+create procedure DB.DBA.ODATA_EDM_TYPE (in obj any)
+{
+  if (__tag of int = __tag (obj))
+    return 'Int32';
+  else if (__tag of smallint  = __tag (obj))
+    return 'Int16';
+  else if (__tag of bigint = __tag (obj))
+    return 'Int64';
+  else if (__tag of numeric = __tag (obj))
+    return 'Decimal';
+  else if (__tag of double precision = __tag (obj))
+    return 'Double';
+  else if (__tag of real = __tag (obj))
+    return 'Double';
+  else if (__tag of datetime = __tag (obj))
+    return 'DateTime';
+  else if (__tag of date = __tag (obj))
+    return 'Date';
+  else if (__tag of time = __tag (obj))
+    return 'Time';
+  else if (__tag of varbinary = __tag (obj))
+    return 'Binary';
+  return null;
+}
+;
+
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ODATA_JSON (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (triples, ses);
+  return ses;
+}
+;
+
+create procedure DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (inout triples any, inout ses any)
+{
   declare tcount, tctr, ns_ctr integer;
   declare dict, entries any;
   declare subj, pred, obj any;
@@ -3951,6 +4952,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (inout triples any, inout ses
   ns_dict := dict_new ();
   ns_ctr := 0;
   tcount := length (triples);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   http ('{ "d" : { \n  "results": [ \n', ses);
   for (tctr := 0; tctr < tcount; tctr := tctr + 1)
     {
@@ -4037,6 +5039,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (inout triples any, in prin
   ns_dict := dict_new ();
   ns_ctr := 0; pct := 0;
   tcount := length (triples);
+  DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);
   if (print_top_level)
     {
        http ('<?xml version="1.0" encoding="utf-8" ?>\n<feed \n\t xmlns="http://www.w3.org/2005/Atom" \n'||
@@ -4098,7 +5101,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (inout triples any, in prin
     }
   else
     {
-    http ('\t<id/>\n', ses);
+      http ('\t<id/>\n', ses);
       range := 'en, */*;0.1';
     }
   http (sprintf ('\t<updated>%s</updated>\n', date_iso8601 (dt_set_tz (now (), 0))), ses);
@@ -4158,7 +5161,7 @@ create procedure DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (inout triples any, in prin
 		   rc := langmatches_pct_http (lang, range);
 		   if (pct < rc)
 		     {
-		title := __rdf_strsqlval (obj);
+		       title := __rdf_strsqlval (obj);
 		       pct := rc;
 		     }
 		}
@@ -4657,6 +5660,21 @@ create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TTL (inout triples_dict any) re
 }
 ;
 
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TRIG (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_TRIG (triples, ses);
+  return ses;
+}
+;
+
 create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT (inout triples_dict any) returns long varchar
 {
   declare triples, ses any;
@@ -4702,6 +5720,81 @@ create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON (inout triples_dict
 }
 ;
 
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_LD (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, ses);
+  return ses;
+}
+;
+
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_UL (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_HTML_UL (triples, ses);
+  return ses;
+}
+;
+
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_TR (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_HTML_TR (triples, ses);
+  return ses;
+}
+;
+
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_MICRODATA (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (triples, ses);
+  return ses;
+}
+;
+
+create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_MICRODATA (inout triples_dict any) returns long varchar
+{
+  declare triples, ses any;
+  ses := string_output ();
+  if (214 <> __tag (triples_dict))
+    {
+      triples := vector ();
+    }
+  else
+    triples := dict_list_keys (triples_dict, 1);
+  DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (triples, ses);
+  return ses;
+}
+;
+
 create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CSV (inout triples_dict any) returns long varchar
 {
   declare triples, ses any;
@@ -4927,18 +6020,21 @@ create procedure DB.DBA.RDF_INSERT_TRIPLES_CL (inout graph_iri any, inout triple
 {
   declare is_text, ctr, old_log_enable, l integer;
   declare ro_id_dict, dp any;
-  if ('1' = registry_get ('cl_rdf_text_index'))
-    is_text := 1;
   if (not isiri_id (graph_iri))
     graph_iri := iri_to_id (graph_iri);
+  if (__rdf_obj_ft_rule_count_in_graph (graph_iri))
+    is_text := 1;
   if (__rdf_graph_is_in_enabled_repl (graph_iri))
     DB.DBA.RDF_REPL_INSERT_TRIPLES (id_to_iri (graph_iri), triples);
-  connection_set ('g_iid', graph_iri);
-  ro_id_dict := dict_new ();
+  if (is_text)
+    ro_id_dict := dict_new (length (triples));
+  else
+    ro_id_dict := null;
   connection_set ('g_dict', ro_id_dict);
-  dp := dpipe (0, 'IRI_TO_ID_1', 'IRI_TO_ID_1', 'IRI_TO_ID_1', 'MAKE_RO_1', 'IRI_TO_ID_1');
+  connection_set ('g_iid', graph_iri);
+  dp := dpipe (0, 'IRI_TO_ID_1', 'IRI_TO_ID_1', 'IRI_TO_ID_1', 'MAKE_RO_1');
   dpipe_set_rdf_load (dp);
- l := length (triples);
+  l := length (triples);
   for (ctr := 0; ctr < l; ctr := ctr + 1)
     {
       declare r, o_val any;
@@ -4953,19 +6049,25 @@ create procedure DB.DBA.RDF_INSERT_TRIPLES_CL (inout graph_iri any, inout triple
               o_val_2 := rdf_box (o_val, 300, 257, 0, 1);
               rdf_box_set_is_text (o_val_2, 1);
               rdf_box_set_type (o_val_2, 257);
-              -- dbg_obj_princ ('DB.DBA.RDF_INSERT_TRIPLES_CL inserts text1 ', r[0], r[1], null, o_val_2, null);
-              dpipe_input (dp, r[0], r[1], null, o_val_2, null);
+              -- dbg_obj_princ ('DB.DBA.RDF_INSERT_TRIPLES_CL inserts text1 ', r[0], r[1], null, o_val_2);
+              dpipe_input (dp, r[0], r[1], null, o_val_2);
             }
           else
             {
-              -- dbg_obj_princ ('DB.DBA.RDF_INSERT_TRIPLES_CL inserts text0 ', r[0], r[1], null, o_val, null);
-              dpipe_input (dp, r[0], r[1], null, o_val, null);
+              -- dbg_obj_princ ('DB.DBA.RDF_INSERT_TRIPLES_CL inserts text0 ', r[0], r[1], null, o_val);
+              dpipe_input (dp, r[0], r[1], null, o_val);
             }
         }
+      else if ((__tag (o_val) = __tag of rdf_box) and is_text and rdf_box_data_tag(o_val) in (__tag of varchar, __tag of XML))
+        {
+          rdf_box_set_is_text (o_val, 1);
+          -- dbg_obj_princ ('DB.DBA.RDF_INSERT_TRIPLES_CL inserts text rdf box', r[0], r[1], null, o_val);
+          dpipe_input (dp, r[0], r[1], null, o_val);
+        }
       else
         {
           -- dbg_obj_princ ('DB.DBA.RDF_INSERT_TRIPLES_CL inserts ', r[0], r[1], null, o_val);
-          dpipe_input (dp, r[0], r[1], null, o_val, null);
+          dpipe_input (dp, r[0], r[1], null, o_val);
         }
       if (mod (ctr + 1, 40000) = 0 and l > 60000)
 	{
@@ -4976,6 +6078,7 @@ create procedure DB.DBA.RDF_INSERT_TRIPLES_CL (inout graph_iri any, inout triple
     }
   dpipe_next (dp, 0);
   dpipe_next (dp, 1);
+  dpipe_reuse (dp);
   if (ro_id_dict is not null)
     DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (graph_iri, ro_id_dict);
 }
@@ -5011,17 +6114,17 @@ create procedure DB.DBA.RDF_INSERT_TRIPLES (in graph_iri any, inout triples any,
           o_final := DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (o_final, graph_iri, p_iid, ro_id_dict);
           if (not rdf_box_is_storeable (o_final))
             {
-              -- dbg_obj_princ ('OBLOM', 'Bad O after MAKE_OBJ_OF_SQLVAL_FT', o_orig, '=>', o_final);
+              -- dbg_obj_princ ('OBLOM', 'Bad O after DB.DBA.MAKE_OBJ_OF_SQLVAL_FT', o_orig, '=>', o_final);
               signal ('OBLOM', 'Bad O after MAKE_OBJ_OF_SQLVAL_FT');
-        }
+            }
         }
       else
         {
-	o_final := DB.DBA.RDF_OBJ_ADD (257, o_final, 257);
+          o_final := DB.DBA.RDF_OBJ_ADD (257, o_final, 257);
           if (not rdf_box_is_storeable (o_final))
             {
-              -- dbg_obj_princ ('OBLOM', 'Bad O after RDF_OBJ_OF_LONG', o_orig, '=>', o_final);
-              signal ('OBLOM', 'Bad O after MAKE_OBJ_OF_SQLVAL_FT');
+              -- dbg_obj_princ ('OBLOM', 'Bad O after DB.DBA.RDF_OBJ_ADD', o_orig, '=>', o_final);
+              signal ('OBLOM', 'Bad O after DB.DBA.RDF_OBJ_ADD');
             }
         }
 do_insert:
@@ -5098,9 +6201,9 @@ create procedure DB.DBA.RDF_DELETE_TRIPLES_AGG (in graph_iid any, inout triples
       connection_set ('g_iid', graph_iid);
       l := length (triples);
       for (ctr := 0; ctr < l; ctr := ctr + 1)
-	{
-	  declare r any;
-	r := triples[ctr];
+        {
+          declare r any;
+          r := triples[ctr];
           dpipe_input (dp, r[0], r[1], r[2]);
           if (mod (ctr + 1, 40000) = 0 and l > 60000)
             {
@@ -5109,23 +6212,23 @@ create procedure DB.DBA.RDF_DELETE_TRIPLES_AGG (in graph_iid any, inout triples
               dpipe_reuse (dp);
               if (bit_and (coalesce (log_mode, old_log_enable), 2))
                 commit work;
-	}
+            }
         }
       dpipe_next (dp, 0);
       dpipe_next (dp, 1);
       if (bit_and (coalesce (log_mode, old_log_enable), 2))
-	commit work;
+        commit work;
     }
   else
     {
       for (ctr := length (triples) - 1; ctr >= 0; ctr := ctr - 1)
-	{
-	  declare o_short any;
-	o_short := DB.DBA.RDF_OBJ_OF_LONG (triples[ctr][2]);
+        {
+          declare o_short any;
+          o_short := DB.DBA.RDF_OBJ_OF_LONG (triples[ctr][2]);
           -- dbg_obj_princ ('DB.DBA.RDF_DELETE_TRIPLES_AGG: delete from DB.DBA.RDF_QUAD where G = ', graph_iid, ' and S = ', triples[ctr][0], ' and P = ', triples[ctr][1], ' and O = ', o_short);
-	  delete from DB.DBA.RDF_QUAD
+          delete from DB.DBA.RDF_QUAD
             where G = graph_iid and S = triples[ctr][0] and P = triples[ctr][1] and O = o_short;
-	}
+        }
       log_enable (old_log_enable, 1);
     }
 }
@@ -5185,8 +6288,8 @@ create procedure DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL (inout _env any, in graph_ir
             }
           else if (2 = op)
             {
-	      if (isinteger (blank_ids))
-	        blank_ids := vector (iri_id_from_num (sequence_next ('RDF_URL_IID_BLANK')));
+              if (isinteger (blank_ids))
+                blank_ids := vector (iri_id_from_num (sequence_next ('RDF_URL_IID_BLANK')));
               while (arg >= length (blank_ids))
                 blank_ids := vector_concat (blank_ids, vector (iri_id_from_num (sequence_next ('RDF_URL_IID_BLANK'))));
               if (1 = fld_ctr)
@@ -5482,43 +6585,60 @@ create procedure DB.DBA.RDF_REPL_DEL (inout rquads any)
 --#IF VER=5
 --!AFTER
 --#ENDIF
-create function DB.DBA.SPARUL_CLEAR (in graph_iri any, in inside_sponge integer, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0) returns any
+create function DB.DBA.SPARUL_CLEAR (in graph_iris any, in inside_sponge integer, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any
 {
-  declare g any;
   declare g_iid IRI_ID;
   declare old_log_enable integer;
-  g := graph_iri;
-  if (isiri_id (g))
-   g := id_to_iri (g);
-  g_iid := iri_to_id (g);
-  __rgs_assert_cbk (graph_iri, uid, 2, 'SPARUL CLEAR GRAPH');
-  if (__rdf_graph_is_in_enabled_repl (g_iid))
+  declare txtreport varchar;
+  txtreport := '';
+  if (__tag of vector <> __tag (graph_iris))
+    graph_iris := vector (graph_iris);
+  foreach (any g_iri in graph_iris) do
     {
-      repl_text ('__rdf_repl', '__rdf_repl_flush_queue()');
-      repl_text ('__rdf_repl', 'sparql define input:storage "" clear graph iri ( ?? )', g);
+      if (isiri_id (g_iri))
+        g_iri := id_to_iri (g_iri);
+      g_iid := iri_to_id (g_iri);
+      __rgs_assert_cbk (g_iri, uid, 2, 'SPARUL CLEAR GRAPH');
     }
-  old_log_enable := log_enable (log_mode, 1);
-  declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); resignal; };
-  exec (sprintf ('
-  delete from DB.DBA.RDF_QUAD
-  where G = __i2id (''%S'') ', g));
-  delete from DB.DBA.RDF_OBJ_RO_FLAGS_WORDS
-  where VT_WORD = rdf_graph_keyword (g_iid);
-  if (not inside_sponge)
+  foreach (any g_iri in graph_iris) do
     {
-      delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI = g;
-      delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI like concat ('destMD5=', md5 (g), '&graphMD5=%');
+      if (isiri_id (g_iri))
+        g_iri := id_to_iri (g_iri);
+      g_iid := iri_to_id (g_iri);
+      if (__rdf_graph_is_in_enabled_repl (g_iid))
+        {
+          repl_text ('__rdf_repl', '__rdf_repl_flush_queue()');
+          repl_text ('__rdf_repl', 'sparql define input:storage "" clear graph iri ( ?? )', g_iri);
+        }
+      old_log_enable := log_enable (log_mode, 1);
+      declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); resignal; };
+      exec (sprintf ('
+      delete from DB.DBA.RDF_QUAD
+      where G = __i2id (''%S'') ', g_iri));
+      cl_exec ('delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_GS, index_only, no cluster) where G = ? option (index RDF_QUAD_GS)', vector (g_iid));
+      delete from DB.DBA.RDF_OBJ_RO_FLAGS_WORDS
+      where VT_WORD = rdf_graph_keyword (g_iid);
+      if (not inside_sponge)
+        {
+          delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI = g_iri;
+          delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI like concat ('destMD5=', md5 (g_iri), '&graphMD5=%');
+        }
+      if (compose_report)
+        {
+          if (txtreport <> '')
+            txtreport := txtreport || '\n';
+          txtreport := txtreport || sprintf ('Clear graph <%s> -- done', g_iri);
+        }
     }
   /*091202 commit work; */
   log_enable (old_log_enable, 1);
   if (compose_report)
-    return sprintf ('Clear <%s> -- done', g);
-  else
-    return 1;
+    return txtreport;
+  return 1;
 }
 ;
 
-create function DB.DBA.SPARUL_LOAD (in graph_iri any, in resource varchar, in uid integer, in log_mode integer, in compose_report integer) returns any
+create function DB.DBA.SPARUL_LOAD (in graph_iri any, in resource varchar, in uid integer, in log_mode integer, in compose_report integer, in options any := null, in silent integer := 0) returns any
 {
   declare old_log_enable integer;
   declare grab_params any;
@@ -5526,18 +6646,21 @@ create function DB.DBA.SPARUL_LOAD (in graph_iri any, in resource varchar, in ui
   declare res integer;
   __rgs_assert_cbk (graph_iri, uid, 2, 'SPARUL LOAD');
   old_log_enable := log_enable (log_mode, 1);
-  declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); resignal; };
+  declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); if (silent) goto fail; resignal; };
   grabbed := dict_new();
   if (isiri_id (graph_iri))
     graph_iri := id_to_iri (graph_iri);
-  grab_params := vector ('base_iri', resource, 'get:destination', graph_iri,
-    'resolver', 'DB.DBA.RDF_GRAB_RESOLVER_DEFAULT', 'loader', 'DB.DBA.RDF_SPONGE_UP',
-    'get:soft', 'replacing',
-    'get:refresh', -1,
-    'get:error-recovery', 'signal',
-    -- 'flags', flags,
-    'get:strategy', 'rdfa-only',
-    'grabbed', grabbed );
+  grab_params := vector_concat (vector (
+      'base_iri', resource,
+      'get:destination', graph_iri,
+      'resolver', 'DB.DBA.RDF_GRAB_RESOLVER_DEFAULT', 'loader', 'DB.DBA.RDF_SPONGE_UP',
+      'get:soft', get_keyword ('get:soft', options, 'replacing'),
+      'get:refresh', get_keyword ('get:refresh', options, -1),
+      'get:error-recovery', get_keyword ('get:error-recovery', options, 'signal'),
+      -- 'flags', flags,
+      'get:strategy', get_keyword ('get:strategy', options, 'rdfa-only'),
+      'grabbed', grabbed ),
+    options );
   commit work;
   res := DB.DBA.RDF_GRAB_SINGLE (resource, grabbed, grab_params);
   commit work;
@@ -5556,10 +6679,15 @@ create function DB.DBA.SPARUL_LOAD (in graph_iri any, in resource varchar, in ui
       else
         return 0;
     }
+fail:
+  if (compose_report)
+    return sprintf ('Load silent <%s> into graph <%s> -- failed: %s: %s', resource, graph_iri, __SQL_STATE, __SQL_MESSAGE);
+  else
+    return 0;
 }
 ;
 
-create function DB.DBA.SPARUL_CREATE (in graph_iri any, in silent integer, in uid integer, in log_mode integer, in compose_report integer) returns any
+create function DB.DBA.SPARUL_CREATE (in graph_iri any, in silent1 integer, in uid integer, in log_mode integer, in compose_report integer, in options any := null, in silent integer := 0) returns any
 {
   declare g_iid IRI_ID;
   declare old_log_enable integer;
@@ -5567,6 +6695,8 @@ create function DB.DBA.SPARUL_CREATE (in graph_iri any, in silent integer, in ui
   g_iid := iri_to_id (graph_iri);
   if (__rdf_graph_is_in_enabled_repl (g_iid))
     repl_text ('__rdf_repl', 'sparql define input:storage "" create graph iri ( ?? )', graph_iri);
+  if ((silent1 is not null) and silent1)
+    silent := 1;
   if (exists (select top 1 1 from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid))
     {
       if (silent)
@@ -5609,63 +6739,85 @@ create function DB.DBA.SPARUL_CREATE (in graph_iri any, in silent integer, in ui
 }
 ;
 
-create function DB.DBA.SPARUL_DROP (in graph_iri any, in silent integer, in uid integer, in log_mode integer, in compose_report integer) returns any
+create function DB.DBA.SPARUL_DROP (in graph_iris any, in silent1 integer, in uid integer, in log_mode integer, in compose_report integer, in options any := null, in silent integer := 0) returns any
 {
   declare g_iid IRI_ID;
   declare old_log_enable integer;
-  __rgs_assert_cbk (graph_iri, uid, 2, 'SPARUL DROP GRAPH');
-  g_iid := iri_to_id (graph_iri);
-  if (__rdf_graph_is_in_enabled_repl (g_iid))
+  declare txtreport varchar;
+  txtreport := '';
+  if ((silent1 is not null) and silent1)
+    silent := 1;
+  if (__tag of vector <> __tag (graph_iris))
+    graph_iris := vector (graph_iris);
+  foreach (any g_iri in graph_iris) do
     {
-      repl_text ('__rdf_repl', '__rdf_repl_flush_queue()');
-      repl_text ('__rdf_repl', 'sparql define input:storage "" drop graph iri ( ?? )', graph_iri);
+      if (isiri_id (g_iri))
+        g_iri := id_to_iri (g_iri);
+      g_iid := iri_to_id (g_iri);
+      __rgs_assert_cbk (g_iri, uid, 2, 'SPARUL DROP GRAPH');
     }
-  old_log_enable := log_enable (log_mode, 1);
-  declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); resignal; };
-  if (not exists (select top 1 1 from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = iri_to_id (graph_iri)))
+  foreach (any g_iri in graph_iris) do
     {
-      if (silent)
+      if (isiri_id (g_iri))
+        g_iri := id_to_iri (g_iri);
+      g_iid := iri_to_id (g_iri);
+      if (__rdf_graph_is_in_enabled_repl (g_iid))
+        {
+          repl_text ('__rdf_repl', '__rdf_repl_flush_queue()');
+          repl_text ('__rdf_repl', 'sparql define input:storage "" drop graph iri ( ?? )', g_iri);
+        }
+      old_log_enable := log_enable (log_mode, 1);
+      declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); resignal; };
+      if (not exists (select top 1 1 from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid))
         {
-          if (exists (select top 1 1 from DB.DBA.RDF_QUAD where G = iri_to_id (graph_iri)))
+          if (silent)
             {
-              DB.DBA.SPARUL_CLEAR (graph_iri, 0, uid);
-              log_enable (old_log_enable, 1);
+              if (exists (select top 1 1 from DB.DBA.RDF_QUAD where G = g_iid))
+                {
+                  DB.DBA.SPARUL_CLEAR (g_iri, 0, uid);
+                  log_enable (old_log_enable, 1);
+                  if (compose_report)
+                    return sprintf ('Drop silent graph <%s> -- graph has not been explicitly created before, triples were removed', g_iri);
+                  else
+                    return 2;
+                }
               if (compose_report)
-                return sprintf ('Drop silent graph <%s> -- graph has not been explicitly created before, triples were removed', graph_iri);
+                return sprintf ('Drop silent graph <%s> -- nothing to do', g_iri);
               else
-                return 2;
+                return 0;
             }
-          if (compose_report)
-            return sprintf ('Drop silent graph <%s> -- nothing to do', graph_iri);
           else
-            return 0;
+            signal ('22023', 'SPARUL_DROP() failed: graph <' || g_iri || '> has not been explicitly created before');
         }
-      else
-        signal ('22023', 'SPARUL_DROP() failed: graph <' || graph_iri || '> has not been explicitly created before');
-    }
-  if (silent)
-    {
-      DB.DBA.SPARUL_CLEAR (graph_iri, 0, uid);
-      delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = iri_to_id (graph_iri);
-      /*091202 commit work; */
-      log_enable (old_log_enable, 1);
+      if (silent)
+        {
+          DB.DBA.SPARUL_CLEAR (g_iri, 0, uid);
+          delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid;
+          /*091202 commit work; */
+          log_enable (old_log_enable, 1);
+          if (compose_report)
+            return sprintf ('Drop silent graph <%s> -- done', g_iri);
+          else
+            return 1;
+        }
+      if (exists (sparql define input:storage ""
+        ask from <http://www.openlinksw.com/schemas/virtrdf#>
+        where { ?qmv virtrdf:qmGraphRange-rvrFixedValue `iri(?:g_iri)` } ) )
+        signal ('22023', 'SPARUL_DROP() failed: graph <' || g_iri || '> is used for mapping relational data to RDF');
+      DB.DBA.SPARUL_CLEAR (g_iri, 0, uid);
+      delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid;
       if (compose_report)
-        return sprintf ('Drop silent graph <%s> -- done', graph_iri);
-      else
-        return 1;
+        {
+          if (txtreport <> '')
+            txtreport := txtreport || '\n';
+          txtreport := txtreport || sprintf ('Drop graph <%s> -- done', g_iri);
+        }
     }
-  if (exists (sparql define input:storage ""
-    ask from <http://www.openlinksw.com/schemas/virtrdf#>
-    where { ?qmv virtrdf:qmGraphRange-rvrFixedValue `iri(?:graph_iri)` } ) )
-    signal ('22023', 'SPARUL_CREATE() failed: graph <' || graph_iri || '> is used for mapping relational data to RDF');
-  DB.DBA.SPARUL_CLEAR (graph_iri, 0, uid);
-  delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = iri_to_id (graph_iri);
   log_enable (old_log_enable, 1);
   /*091202 commit work; */
   if (compose_report)
-    return sprintf ('Drop graph <%s> -- done', graph_iri);
-  else
-    return 1;
+    return txtreport;
+  return 1;
 }
 ;
 
@@ -5696,6 +6848,223 @@ create function DB.DBA.SPARUL_RUN (in results any, in compose_report integer :=
 }
 ;
 
+-- SPARQL 1.1 UPDATE functions
+
+create function DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT (in dflt_graph_iri any, in quads_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any
+{
+  declare ins_count, ins_grp_count integer;
+  declare res_ses any;
+  ins_count := 0;
+  ins_grp_count := 0;
+  if (__tag of vector = __tag (dflt_graph_iri))
+    {
+      ins_count := dflt_graph_iri[2]; -- 2, not 1
+      dflt_graph_iri := dflt_graph_iri[0]; -- the last op.
+    }
+  while (dict_size (quads_dict) > 0)
+    {
+      declare quads, groups any;
+      declare group_ctr, group_count, g_ins_count integer;
+      quads := dict_destructive_list_rnd_keys (quads_dict, 80000);
+      rowvector_graph_sort (quads, 3, 1);
+      groups := rowvector_graph_partition (quads, 3);
+      group_count := length (groups);
+      for (group_ctr := 0; group_ctr < group_count; group_ctr := group_ctr+1)
+        {
+          declare g_group, g any;
+          g_group := aref_set_0 (groups, group_ctr);
+          g := aref_or_default (g_group, 0, 3, dflt_graph_iri);
+          __rgs_assert_cbk (g, uid, 2, 'SPARQL 1.1 INSERT');
+          DB.DBA.RDF_INSERT_TRIPLES (g, g_group, log_mode);
+          g_ins_count := length (g_group);
+          ins_count := ins_count + g_ins_count;
+          ins_grp_count := ins_grp_count + 1;
+          if (isiri_id (g))
+            g := id_to_iri (g);
+          if (g is not null and __rdf_graph_is_in_enabled_repl (iri_to_id (g)))
+            repl_text ('__rdf_repl', '__rdf_repl_flush_queue ()');
+          if (compose_report and ins_grp_count < 1000)
+            {
+              if (group_ctr)
+                http ('\n', res_ses);
+              else
+                res_ses := string_output();
+              http (sprintf ('Insert into <%s>, %d (or less) quads -- done', g, g_ins_count), res_ses);
+            }
+        }
+    }
+  if (compose_report)
+    {
+      if (ins_grp_count >= 1000)
+        return sprintf ('Insert into %d (or more) graphs, total %d (or less) quads -- done', ins_grp_count, ins_count);
+      if (ins_count)
+        return string_output_string (res_ses);
+      else
+        return sprintf ('Insert into <%s>, 0 quads -- nothing to do', dflt_graph_iri);
+    }
+  else
+    return ins_count;
+}
+;
+
+
+create function DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT (in dflt_graph_iri any, in quads_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any
+{
+  declare del_count, del_grp_count integer;
+  declare res_ses any;
+  del_count := 0;
+  del_grp_count := 0;
+  if (__tag of vector = __tag (dflt_graph_iri))
+    {
+      del_count := dflt_graph_iri[2]; -- 2, not 1
+      dflt_graph_iri := dflt_graph_iri[0]; -- the last op.
+    }
+  while (dict_size (quads_dict) > 0)
+    {
+      declare quads, groups any;
+      declare group_ctr, group_count, g_del_count integer;
+      quads := dict_destructive_list_rnd_keys (quads_dict, 80000);
+      rowvector_graph_sort (quads, 3, 1);
+      groups := rowvector_graph_partition (quads, 3);
+      group_count := length (groups);
+      for (group_ctr := 0; group_ctr < group_count; group_ctr := group_ctr+1)
+        {
+          declare g_group, g any;
+          g_group := aref_set_0 (groups, group_ctr);
+          g := aref_or_default (g_group, 0, 3, dflt_graph_iri);
+          __rgs_assert_cbk (g, uid, 2, 'SPARQL 1.1L DELETE');
+          DB.DBA.RDF_DELETE_TRIPLES (g, g_group, log_mode);
+          g_del_count := length (g_group);
+          del_count := del_count + g_del_count;
+          del_grp_count := del_grp_count + 1;
+          if (isiri_id (g))
+            g := id_to_iri (g);
+          if (g is not null and __rdf_graph_is_in_enabled_repl (iri_to_id (g)))
+            repl_text ('__rdf_repl', '__rdf_repl_flush_queue ()');
+          if (compose_report and del_grp_count < 1000)
+            {
+              if (group_ctr)
+                http ('\n', res_ses);
+              else
+                res_ses := string_output();
+              http (sprintf ('Delete from <%s>, %d (or less) quads -- done', g, g_del_count), res_ses);
+            }
+        }
+    }
+  if (compose_report)
+    {
+      if (del_grp_count >= 1000)
+        return sprintf ('Delete from %d (or more) graphs, total %d (or less) quads -- done', del_grp_count, del_count);
+      if (del_count)
+        return string_output_string (res_ses);
+      else
+        return sprintf ('Delete from <%s>, 0 quads -- nothing to do', dflt_graph_iri);
+    }
+  else
+    return del_count;
+}
+;
+
+create function DB.DBA.SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS (in dflt_graph_iri any, in del_quads_dict any, in ins_quads_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any
+{
+  declare del_count, ins_count integer;
+  declare del_rep, ins_rep any;
+  del_count := 0;
+  ins_count := 0;
+  if (__tag of vector = __tag (dflt_graph_iri))
+    {
+      del_count := dflt_graph_iri[1];
+      ins_count := dflt_graph_iri[2];
+      dflt_graph_iri := dflt_graph_iri[0]; -- the last op.
+    }
+  if (del_quads_dict is not null)
+    {
+      del_count := del_count + dict_size (del_quads_dict);
+      del_rep := DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT (dflt_graph_iri, del_quads_dict, uid, log_mode, compose_report);
+    }
+  else if (compose_report)
+    del_rep := '';
+  else
+    del_rep := 0;
+  if (ins_quads_dict is not null)
+    {
+      ins_count := ins_count + dict_size (ins_quads_dict);
+      ins_rep := DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT (dflt_graph_iri, ins_quads_dict, uid, log_mode, compose_report);
+    }
+  else if (compose_report)
+    ins_rep := '';
+  else
+    ins_rep := 0;
+  if (compose_report)
+    return concat (del_rep, case when ins_rep <> '' and del_rep <> '' then '\n' else '' end, ins_rep);
+  else
+    return del_count + ins_count;
+}
+;
+
+create function DB.DBA.SPARUL_COPYMOVEADD_IMPL (in opname varchar, in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any
+{
+  declare src_g_iid IRI_ID;
+  declare tgt_g_iid IRI_ID;
+  declare old_log_enable, src_repl, tgt_repl integer;
+  declare qry, stat, msg varchar;
+  if (isiri_id (src_g_iri))
+    src_g_iri := id_to_iri (src_g_iri);
+  src_g_iid := iri_to_id (src_g_iri);
+  if (isiri_id (tgt_g_iri))
+    tgt_g_iri := id_to_iri (tgt_g_iri);
+  tgt_g_iid := iri_to_id (tgt_g_iri);
+  __rgs_assert_cbk (tgt_g_iri, uid, 2, 'SPARQL 1.1 ' || opname);
+  __rgs_assert_cbk (src_g_iri, uid, case (opname) when 'MOVE' then 2 else 1 end, 'SPARQL 1.1 ' || opname);
+  src_repl := __rdf_graph_is_in_enabled_repl (src_g_iid);
+  tgt_repl := __rdf_graph_is_in_enabled_repl (tgt_g_iid);
+  if (src_repl and not tgt_repl)
+    signal ('22023', sprintf ('SPARQL 1.1 can not %s replicated graph <%s> to non-replicated graph <%s>, both should be in same replication status', src_g_iri, tgt_g_iri));
+  if (tgt_repl and not src_repl)
+    signal ('22023', sprintf ('SPARQL 1.1 can not %s non-replicated graph <%s> to replicated graph <%s>, both should be in same replication status', src_g_iri, tgt_g_iri));
+  if ('ADD' <> opname)
+    DB.DBA.SPARUL_CLEAR (tgt_g_iri, 0, uid, log_mode, 0, options, silent);
+  if (src_repl and tgt_repl)
+    {
+      repl_text ('__rdf_repl', '__rdf_repl_flush_queue()');
+      repl_text ('__rdf_repl', 'sparql define input:storage "" add iri( ?? ) to iri( ?? )', src_g_iri, tgt_g_iri);
+    }
+  old_log_enable := log_enable (log_mode, 1);
+  declare exit handler for sqlstate '*' { log_enable (old_log_enable, 1); resignal; };
+  stat := '00000';
+  qry := sprintf ('insert soft DB.DBA.RDF_QUAD (G,S,P,O) select __i2id (''%S''), t.S, t.P, t.O from DB.DBA.RDF_QUAD t where t.G = __i2id (''%S'') ',
+     tgt_g_iri, src_g_iri );
+  exec (qry, stat, msg);
+  if (stat <> '00000')
+    signal (stat, msg);
+  if ('MOVE' = opname)
+    DB.DBA.SPARUL_CLEAR (src_g_iri, 0, uid, log_mode, 0, options, silent);
+  /*091202 commit work; */
+  log_enable (old_log_enable, 1);
+  if (compose_report)
+    return sprintf ('%s <%s> to <%s> -- done', opname, src_g_iri, tgt_g_iri);
+  return 1;
+}
+;
+
+create function DB.DBA.SPARUL_COPY (in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any
+{
+  return DB.DBA.SPARUL_COPYMOVEADD_IMPL ('COPY', src_g_iri, tgt_g_iri, uid, log_mode, compose_report, options, silent);
+}
+;
+
+create function DB.DBA.SPARUL_MOVE (in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any
+{
+  return DB.DBA.SPARUL_COPYMOVEADD_IMPL ('MOVE', src_g_iri, tgt_g_iri, uid, log_mode, compose_report, options, silent);
+}
+;
+
+create function DB.DBA.SPARUL_ADD (in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any
+{
+  return DB.DBA.SPARUL_COPYMOVEADD_IMPL ('ADD', src_g_iri, tgt_g_iri, uid, log_mode, compose_report, options, silent);
+}
+;
+
 create procedure DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS (in return_iris integer := 1, in lim integer := 2000000000)
 {
   declare specials, specials_vec any;
@@ -5905,11 +7274,22 @@ create procedure DB.DBA.SPARQL_CONSTRUCT_ACC (inout _env any, in opcodes any, in
   blank_ids := 0;
   for (triple_ctr := length (opcodes) - 1; triple_ctr >= 0; triple_ctr := triple_ctr-1)
     {
-      declare fld_ctr integer;
+      declare fld_ctr, fld_count integer;
       declare triple_vec any;
-      triple_vec := vector (0,0,0);
+      declare g_opcode integer;
+      g_opcode := aref_or_default (opcodes, triple_ctr, 6, null);
+      if (g_opcode is null)
+        {
+          fld_count := 3;
+          triple_vec := vector (0,0,0);
+        }
+      else
+        {
+          fld_count := 4;
+          triple_vec := vector (0,0,0,0);
+        }
       -- dbg_obj_princ ('opcodes[triple_ctr]=', opcodes[triple_ctr]);
-      for (fld_ctr := 2; fld_ctr >= 0; fld_ctr := fld_ctr - 1)
+      for (fld_ctr := fld_count - 1; fld_ctr >= 0; fld_ctr := fld_ctr - 1)
         {
           declare op integer;
           declare arg any;
@@ -5923,16 +7303,16 @@ create procedure DB.DBA.SPARQL_CONSTRUCT_ACC (inout _env any, in opcodes any, in
                 goto end_of_adding_triple;
               if (isiri_id (i))
                 {
-                  if ((1 = fld_ctr) and is_bnode_iri_id (i))
-                    signal ('RDF01', 'Bad variable value in CONSTRUCT: blank node can not be used as predicate');
+                  if (fld_ctr in (1,3) and is_bnode_iri_id (i))
+                    signal ('RDF01', 'Bad variable value in CONSTRUCT: blank node can not be used as predicate or graph');
                 }
               else if ((isstring (i) and (1 = __box_flags (i))) or (217 = __tag(i)))
                 {
-                  if ((1 = fld_ctr) and (i like 'bnode://%'))
-                    signal ('RDF01', 'Bad variable value in CONSTRUCT: blank node can not be used as predicate');
+                  if (fld_ctr in (1,3) and (i like 'bnode://%'))
+                    signal ('RDF01', 'Bad variable value in CONSTRUCT: blank node can not be used as predicate or graph');
                   i := iri_to_id (i);
                 }
-              else if (2 > fld_ctr)
+              else if (2 <> fld_ctr)
                 signal ('RDF01',
                   sprintf ('Bad variable value in CONSTRUCT: "%.100s" (tag %d box flags %d) is not a valid %s, only object of a triple can be a literal',
                     __tag (i), __box_flags (i),
@@ -5946,8 +7326,8 @@ create procedure DB.DBA.SPARQL_CONSTRUCT_ACC (inout _env any, in opcodes any, in
                 blank_ids := vector (iri_id_from_num (sequence_next ('RDF_URL_IID_BLANK')));
               while (arg >= length (blank_ids))
                 blank_ids := vector_concat (blank_ids, vector (iri_id_from_num (sequence_next ('RDF_URL_IID_BLANK'))));
-              if (1 = fld_ctr)
-                signal ('RDF01', 'Bad triple for CONSTRUCT: blank node can not be used as predicate');
+              if (fld_ctr in (1,3))
+                signal ('RDF01', 'Bad triple for CONSTRUCT: blank node can not be used as predicate or graph');
               triple_vec[fld_ctr] := blank_ids[arg];
             }
           else if (3 = op)
@@ -5957,97 +7337,410 @@ create procedure DB.DBA.SPARQL_CONSTRUCT_ACC (inout _env any, in opcodes any, in
 
               if (isiri_id (arg))
                 {
-                  if ((1 = fld_ctr) and is_bnode_iri_id (arg))
-                    signal ('RDF01', 'Bad const value in CONSTRUCT: blank node can not be used as predicate');
+                  if (fld_ctr in (1,3) and is_bnode_iri_id (arg))
+                    signal ('RDF01', 'Bad const value in CONSTRUCT: blank node can not be used as predicate or graph');
                 }
               else if ((isstring (arg) and (1 = __box_flags (arg))) or (217 = __tag(arg)))
                 {
-                  if ((1 = fld_ctr) and (arg like 'bnode://%'))
-                    signal ('RDF01', 'Bad const value in CONSTRUCT: blank node can not be used as predicate');
+                  if (fld_ctr in (1,3) and (arg like 'bnode://%'))
+                    signal ('RDF01', 'Bad const value in CONSTRUCT: blank node can not be used as predicate or graph');
                   arg := iri_to_id (arg);
                 }
-              else if (2 > fld_ctr)
-                signal ('RDF01',
-                  sprintf ('Bad const value in CONSTRUCT: "%.100s" (tag %d box flags %d) is not a valid %s, only object of a triple can be a literal',
-                    __tag (arg), __box_flags (arg),
-                    __rdf_strsqlval (arg),
-                    case (fld_ctr) when 1 then 'predicate' else 'subject' end ) );
-              else if (__tag of vector = __tag (arg))
-                arg := DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (arg[0], arg[1], arg[2]);
-              triple_vec[fld_ctr] := arg;
+              else if (2 <> fld_ctr)
+                signal ('RDF01',
+                  sprintf ('Bad const value in CONSTRUCT: "%.100s" (tag %d box flags %d) is not a valid %s, only object of a triple can be a literal',
+                    __tag (arg), __box_flags (arg),
+                    __rdf_strsqlval (arg),
+                    case (fld_ctr) when 1 then 'predicate' else 'subject' end ) );
+              else if (__tag of vector = __tag (arg))
+                arg := DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (arg[0], arg[1], arg[2]);
+              triple_vec[fld_ctr] := arg;
+            }
+          else signal ('RDFXX', 'Bad opcode in DB.DBA.SPARQL_CONSTRUCT()');
+        }
+      -- dbg_obj_princ ('generated triple:', triple_vec);
+      dict_put (_env, triple_vec, 0);
+end_of_adding_triple: ;
+    }
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CONSTRUCT_FIN (inout _env any)
+{
+  if (214 <> __tag(_env))
+    _env := dict_new ();
+  return _env;
+}
+;
+
+--!AWK PUBLIC
+create aggregate DB.DBA.SPARQL_CONSTRUCT (in opcodes any, in vars any, in stats any, in use_dict_limit integer) returns any
+from DB.DBA.SPARQL_CONSTRUCT_INIT, DB.DBA.SPARQL_CONSTRUCT_ACC, DB.DBA.SPARQL_CONSTRUCT_FIN
+;
+
+create procedure DB.DBA.SPARQL_DESC_AGG_INIT (inout _env any)
+{
+  _env := 0; -- No actual initialization
+}
+;
+
+create procedure DB.DBA.SPARQL_DESC_AGG_ACC (inout _env any, in vars any)
+{
+  declare var_ctr integer;
+  declare blank_ids any;
+  if (214 <> __tag(_env))
+    {
+      _env := dict_new (31, sys_stat ('sparql_result_set_max_rows'), sys_stat ('sparql_max_mem_in_use'));
+    }
+  for (var_ctr := length (vars) - 1; var_ctr >= 0; var_ctr := var_ctr - 1)
+    {
+      declare i any;
+      i := vars[var_ctr];
+      if (isiri_id (i))
+        dict_put (_env, i, 0);
+    }
+}
+;
+
+create procedure DB.DBA.SPARQL_DESC_AGG_FIN (inout _env any)
+{
+  declare subjects, options, res any;
+  declare subj_ctr integer;
+  if (214 <> __tag(_env))
+    return dict_new ();
+  return _env;
+}
+;
+
+create aggregate DB.DBA.SPARQL_DESC_AGG (in vars any) returns any
+from DB.DBA.SPARQL_DESC_AGG_INIT, DB.DBA.SPARQL_DESC_AGG_ACC, DB.DBA.SPARQL_DESC_AGG_FIN
+;
+
+create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+{
+  declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;
+  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;
+  declare gs_app_callback, gs_app_uid, inf_ruleset, sameas varchar;
+  declare rdf_type_iid IRI_ID;
+  uid := get_keyword ('uid', options, http_nobody_uid());
+  gs_app_callback := get_keyword ('gs-app-callback', options);
+  if (gs_app_callback is not null)
+    gs_app_uid := get_keyword ('gs-app-uid', options);
+  inf_ruleset := get_keyword ('inference', options);
+  sameas := get_keyword ('same-as', options);
+  rdf_type_iid := iri_to_id (UNAME'http://www.w3.org/1999/02/22-rdf-syntax-ns#type');
+  res := dict_new ();
+  if (isinteger (consts))
+    return res;
+  foreach (any c in consts) do
+    {
+      if (isiri_id (c))
+        dict_put (subj_dict, c, 0);
+    }
+  all_subj_descs := dict_list_keys (subj_dict, 1);
+  all_s_count := length (all_subj_descs);
+  if (0 = all_s_count)
+    return res;
+  gvector_sort (all_subj_descs, 1, 0, 0);
+  if (__tag of integer = __tag (good_graphs))
+    graphs_listed := 0;
+  else
+    {
+      vectorbld_init (sorted_good_graphs);
+      foreach (any g in good_graphs) do
+        {
+          if (isiri_id (g) and g < min_bnode_iri_id () and
+            __rgs_ack_cbk (g, uid, 1) and
+            (gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )
+            vectorbld_acc (sorted_good_graphs, g);
+        }
+      vectorbld_final (sorted_good_graphs);
+      good_g_count := length (sorted_good_graphs);
+      if (0 = good_g_count)
+        return res;
+      graphs_listed := 1;
+    }
+  vectorbld_init (sorted_bad_graphs);
+  foreach (any g in bad_graphs) do
+    {
+      if (isiri_id (g) and g < min_bnode_iri_id ())
+        vectorbld_acc (sorted_bad_graphs, g);
+    }
+  vectorbld_final (sorted_bad_graphs);
+  bad_g_count := length (sorted_bad_graphs);
+  vectorbld_init (phys_subjects);
+  if (storage_name is null)
+    storage_name := 'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage';
+  else if (('' = storage_name) and (inf_ruleset is null) and (sameas is null))
+    {
+      for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+        {
+          declare s, phys_s any;
+          s := all_subj_descs [s_ctr];
+          if (isiri_id (s))
+            vectorbld_acc (phys_subjects, s);
+          else
+            {
+              phys_s := iri_to_id (s, 0, 0);
+              if (not isinteger (phys_s))
+                vectorbld_acc (phys_subjects, phys_s);
+            }
+        }
+      vectorbld_final (phys_subjects);
+      goto describe_physical_subjects;
+    }
+  -- dbg_obj_princ ('storage_name=',storage_name, ' sorted_good_graphs=', sorted_good_graphs, ' sorted_bad_graphs=', sorted_bad_graphs);
+  for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+    {
+      declare s, phys_s, maps_s, maps_o any;
+      declare maps_s_len, maps_o_len integer;
+      s := all_subj_descs [s_ctr];
+      maps_s := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);
+      maps_o := sparql_quad_maps_for_quad (NULL, NULL, NULL, s, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);
+      -- dbg_obj_princ ('s = ', s, ' maps_s = ', maps_s, ' maps_o = ', maps_o);
+      maps_s_len := length (maps_s);
+      maps_o_len := length (maps_o);
+      if ((inf_ruleset is null) and (sameas is null))
+        {
+          declare phys_as_s, phys_as_o integer;
+          phys_as_s := case when ((maps_s_len > 0) and (maps_s[maps_s_len-1][0] = UNAME'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap')) then 1 else 0 end;
+          phys_as_o := case when ((maps_o_len > 0) and (maps_o[maps_o_len-1][0] = UNAME'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap')) then 1 else 0 end;
+          if (phys_as_s or phys_as_o)
+            {
+              if (isiri_id (s))
+                {
+                  phys_s := s;
+                  vectorbld_acc (phys_subjects, phys_s);
+                }
+              else
+                {
+                  phys_s := iri_to_id (s, 0, 0);
+                  if (not isinteger (phys_s))
+                    vectorbld_acc (phys_subjects, phys_s);
+                }
+              if (phys_as_s)
+                {
+                  maps_s := subseq (maps_s, 0, maps_s_len-1);
+                  maps_s_len := maps_s_len - 1;
+                }
+              if (phys_as_o)
+                {
+                  maps_o := subseq (maps_o, 0, maps_o_len-1);
+                  maps_o_len := maps_o_len - 1;
+                }
+            }
+        }
+      if ((maps_s_len > 0) or (maps_o_len > 0))
+        all_subj_descs [s_ctr] := vector (s, maps_s, maps_o);
+      else
+        all_subj_descs [s_ctr] := 0;
+      -- dbg_obj_princ ('s = ', s, ' maps = ', maps);
+      -- dbg_obj_princ ('all_subj_descs [', s_ctr, '] = ', all_subj_descs [s_ctr]);
+    }
+  vectorbld_final (phys_subjects);
+  for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+    {
+      declare s_desc, s, maps_s, maps_o any;
+      declare map_ctr, maps_s_len, maps_o_len integer;
+      declare fname varchar;
+      s_desc := all_subj_descs [s_ctr];
+      if (isinteger (s_desc))
+        goto end_of_s;
+      s := s_desc[0];
+      maps_s := s_desc[1];
+      maps_o := s_desc[2];
+      maps_s_len := length (maps_s);
+      maps_o_len := length (maps_o);
+      fname := sprintf ('SPARQL_DESC_DICT_QMV1_%U', md5 (storage_name || ' ' || inf_ruleset || ' ' || sameas || ' ' || cast (graphs_listed as varchar) || md5_box (maps_s) || md5_box (maps_o) || md5_box (sorted_bad_graphs)));
+      if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = 'DB.DBA.' || fname))
+        {
+          declare ses, txt, saved_user any;
+          ses := string_output ();
+          http ('create procedure DB.DBA."' || fname || '" (in subj any, in res any', ses);
+          if (graphs_listed)
+            http (', inout sorted_good_graphs any', ses);
+          http (')\n', ses);
+          http ('{\n', ses);
+          http ('  declare subj_iri varchar;\n', ses);
+          http ('  subj_iri := id_to_iri_nosignal (subj);\n', ses);
+          http ('  for (sparql define output:valmode "LONG" define input:storage <' || storage_name || '> ', ses);
+          foreach (any g in sorted_bad_graphs) do
+            {
+              http ('  define input:named-graph-exclude <' || id_to_iri_nosignal (g) || '>\n', ses);
+            }
+          if (inf_ruleset is not null)
+              http ('  define input:inference <' || inf_ruleset || '>\n', ses);
+          if (sameas is not null)
+              http ('  define input:same-as <' || sameas || '>\n', ses);
+          http ('select ?g1 ?p1 ?o1\n', ses);
+          http ('      where { graph ?g1 {\n', ses);
+          for (map_ctr := 0; map_ctr < maps_s_len; map_ctr := map_ctr + 1)
+            {
+              if (map_ctr > 0) http ('              union\n', ses);
+              http ('              { quad map <' || maps_s[map_ctr][0] || '> { ?:subj_iri ?p1 ?o1 } }\n', ses);
+            }
+          http ('            } } ) do {\n', ses);
+          if (graphs_listed)
+            http ('      if (position (__i2idn ("g1"), sorted_good_graphs))\n', ses);
+          http ('      dict_bitor_or_put (res, vector (subj, "p1", "o1"), 1); }\n', ses);
+          http ('  for (sparql define output:valmode "LONG" define input:storage <' || storage_name || '> ', ses);
+          foreach (any g in sorted_bad_graphs) do
+            {
+              http ('  define input:named-graph-exclude <' || id_to_iri_nosignal (g) || '>\n', ses);
+            }
+          if (inf_ruleset is not null)
+              http ('  define input:inference <' || inf_ruleset || '>\n', ses);
+          if (sameas is not null)
+              http ('  define input:same-as <' || sameas || '>\n', ses);
+          http ('select ?g1 ?s1 ?p1\n', ses);
+          http ('      where { graph ?g1 {\n', ses);
+          for (map_ctr := 0; map_ctr < maps_o_len; map_ctr := map_ctr + 1)
+            {
+              if (map_ctr > 0) http ('              union\n', ses);
+              http ('              { quad map <' || maps_o[map_ctr][0] || '> { ?s1 ?p1 ?o1 . FILTER (?p1 != rdf:type) . FILTER(isREF (?o1)) . FILTER (?o1 = iri(?:subj_iri)) } }\n', ses);
+            }
+          http ('            } } ) do {\n', ses);
+          if (graphs_listed)
+            http ('      if (position (__i2idn ("g1"), sorted_good_graphs))\n', ses);
+          http ('      dict_bitor_or_put (res, vector ("s1", "p1", subj), 4); }\n', ses);
+          http ('  }\n', ses);
+          txt := string_output_string (ses);
+          -- dbg_obj_princ ('Procedure text: ', txt);
+	  saved_user := user;
+	  set_user_id ('dba', 1);
+          exec (txt);
+	  set_user_id (saved_user);
+        }
+      if (graphs_listed)
+        {
+          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, res, sorted_good_graphs, ')');
+          call ('DB.DBA.' || fname)(s, res, sorted_good_graphs);
+        }
+      else
+        {
+          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, res, ')');
+          call ('DB.DBA.' || fname)(s, res);
+        }
+end_of_s: ;
+    }
+
+describe_physical_subjects:
+  gvector_sort (phys_subjects, 1, 0, 0);
+  phys_s_count := length (phys_subjects);
+  -- dbg_obj_princ ('phys_subjects = ', phys_subjects);
+  if (0 = phys_s_count)
+    return res;
+  -- dbg_obj_princ ('sorted_bad_graphs = ', sorted_bad_graphs);
+  if (graphs_listed)
+    {
+      gvector_sort (sorted_good_graphs, 1, 0, 0);
+      -- dbg_obj_princ ('sorted_good_graphs = ', sorted_good_graphs);
+      for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)
+        {
+          declare graph any;
+          graph := sorted_good_graphs [g_ctr];
+          for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+            {
+              declare subj any;
+              subj := phys_subjects [s_ctr];
+              for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
+                {
+                  -- dbg_obj_princ ('found5 ', subj, p1, ' in ', graph);
+                  dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+                }
+	      for (select S as s1, P as p1 from DB.DBA.RDF_QUAD
+		  where G = graph and O = subj and P <> rdf_type_iid
+		  option (QUIETCAST)) do
+		{
+		  -- dbg_obj_princ ('found2 ', s1, p1, subj, ' in ', graph);
+		  dict_bitor_or_put (res, vector (s1, p1, subj), 4);
+		}
             }
-          else signal ('RDFXX', 'Bad opcode in DB.DBA.SPARQL_CONSTRUCT()');
         }
-      -- dbg_obj_princ ('generated triple:', triple_vec);
-      dict_put (_env, triple_vec, 0);
-end_of_adding_triple: ;
+      return res;
     }
-}
-;
-
---!AWK PUBLIC
-create procedure DB.DBA.SPARQL_CONSTRUCT_FIN (inout _env any)
-{
-  if (214 <> __tag(_env))
-    _env := dict_new ();
-  return _env;
-}
-;
-
---!AWK PUBLIC
-create aggregate DB.DBA.SPARQL_CONSTRUCT (in opcodes any, in vars any, in stats any, in use_dict_limit integer) returns any
-from DB.DBA.SPARQL_CONSTRUCT_INIT, DB.DBA.SPARQL_CONSTRUCT_ACC, DB.DBA.SPARQL_CONSTRUCT_FIN
-;
-
-create procedure DB.DBA.SPARQL_DESC_AGG_INIT (inout _env any)
-{
-  _env := 0; -- No actual initialization
-}
-;
-
-create procedure DB.DBA.SPARQL_DESC_AGG_ACC (inout _env any, in vars any)
-{
-  declare var_ctr integer;
-  declare blank_ids any;
-  if (214 <> __tag(_env))
+  g_dict := dict_new ();
+  for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
     {
-      _env := dict_new (31, sys_stat ('sparql_result_set_max_rows'), sys_stat ('sparql_max_mem_in_use'));
+      declare subj, graph any;
+      subj := phys_subjects [s_ctr];
+      graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where O = subj and
+        0 = position (G, sorted_bad_graphs) and
+        __rgs_ack_cbk (G, uid, 1) and
+        (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
+      if (graph is not null)
+        dict_put (g_dict, graph, 0);
     }
-  for (var_ctr := length (vars) - 1; var_ctr >= 0; var_ctr := var_ctr - 1)
+  sorted_good_graphs := dict_list_keys (g_dict, 1);
+  if (0 = length (sorted_good_graphs))
     {
-      declare i any;
-      i := vars[var_ctr];
-      if (isiri_id (i))
-        dict_put (_env, i, 0);
+      g_dict := dict_new ();
+      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+        {
+          declare subj, graph any;
+          subj := phys_subjects [s_ctr];
+          graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where S = subj and P = rdf_type_iid and
+            0 = position (G, sorted_bad_graphs) and
+            __rgs_ack_cbk (G, uid, 1) and
+            (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
+          if (graph is not null)
+            dict_put (g_dict, graph, 0);
+        }
+      sorted_good_graphs := dict_list_keys (g_dict, 1);
     }
+  -- dbg_obj_princ ('sorted_good_graphs = ', sorted_good_graphs);
+  gvector_sort (sorted_good_graphs, 1, 0, 0);
+  good_g_count := length (sorted_good_graphs);
+  -- dbg_obj_princ ('sorted_good_graphs = ', sorted_good_graphs);
+  for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)
+    {
+      declare graph any;
+      graph := sorted_good_graphs [g_ctr];
+      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+        {
+          declare subj any;
+          subj := phys_subjects [s_ctr];
+          for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
+            {
+              -- dbg_obj_princ ('found1 ', subj, p1, ' in ', graph);
+              dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+--              if (isiri_id (obj1))
+--                {
+--                  for (select P as p2, O as obj2
+--                    from DB.DBA.RDF_QUAD
+--                    where G = graph and S = obj1 and not (isiri_id (O)) ) do
+--                    {
+--                      dict_bitor_or_put (dict, vector (obj1, p2, __rdf_long_of_obj (obj2)), 17);
+--                    }
+--                }
+            }
+          for (select S as s1, P as p1 from DB.DBA.RDF_QUAD
+            where G = graph and O = subj and P <> rdf_type_iid
+            option (QUIETCAST)) do
+            {
+              -- dbg_obj_princ ('found2 ', s1, p1, subj, ' in ', graph);
+              dict_bitor_or_put (res, vector (s1, p1, subj), 4);
+            }
+        }
+    }
+  -- dbg_obj_princ ('final result is ', res);
+  return res;
 }
 ;
 
-create procedure DB.DBA.SPARQL_DESC_AGG_FIN (inout _env any)
-{
-  declare subjects, options, res any;
-  declare subj_ctr integer;
-  if (214 <> __tag(_env))
-    return dict_new ();
-  return _env;
-}
-;
-
-create aggregate DB.DBA.SPARQL_DESC_AGG (in vars any) returns any
-from DB.DBA.SPARQL_DESC_AGG_INIT, DB.DBA.SPARQL_DESC_AGG_ACC, DB.DBA.SPARQL_DESC_AGG_FIN
-;
-
-create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
 {
-  declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;
+  declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, res any;
   declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;
-  declare gs_app_callback, gs_app_uid, inf_ruleset varchar;
+  declare gs_app_callback, gs_app_uid, inf_ruleset, sameas varchar;
   declare rdf_type_iid IRI_ID;
   uid := get_keyword ('uid', options, http_nobody_uid());
   gs_app_callback := get_keyword ('gs-app-callback', options);
   if (gs_app_callback is not null)
     gs_app_uid := get_keyword ('gs-app-uid', options);
   inf_ruleset := get_keyword ('inference', options);
+  sameas := get_keyword ('same-as', options);
   rdf_type_iid := iri_to_id (UNAME'http://www.w3.org/1999/02/22-rdf-syntax-ns#type');
   res := dict_new ();
   if (isinteger (consts))
@@ -6089,9 +7782,9 @@ create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in go
   vectorbld_final (sorted_bad_graphs);
   bad_g_count := length (sorted_bad_graphs);
   vectorbld_init (phys_subjects);
-  if (isinteger (storage_name))
+  if (storage_name is null)
     storage_name := 'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage';
-  else if (('' = storage_name) and (inf_ruleset is null))
+  else if (('' = storage_name) and (inf_ruleset is null) and (sameas is null))
     {
       for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
         {
@@ -6118,7 +7811,7 @@ create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in go
       maps := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);
       -- dbg_obj_princ ('s = ', s, ' maps = ', maps);
       maps_len := length (maps);
-      if ((maps_len > 0) and (inf_ruleset is null) and (maps[maps_len-1][0] = UNAME'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap'))
+      if ((maps_len > 0) and (inf_ruleset is null) and (sameas is null) and (maps[maps_len-1][0] = UNAME'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap'))
         {
           if (isiri_id (s))
             {
@@ -6153,7 +7846,7 @@ create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in go
       s := s_desc[0];
       maps := s_desc[1];
       maps_len := length (maps);
-      fname := sprintf ('SPARQL_DESC_DICT_QMV1_%U', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));
+      fname := sprintf ('SPARQL_DESC_DICT_QMV1_%U', md5 (storage_name || ' ' || inf_ruleset || ' ' || sameas || ' ' || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));
       if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = 'DB.DBA.' || fname))
         {
           declare ses, txt, saved_user any;
@@ -6172,6 +7865,8 @@ create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in go
             }
           if (inf_ruleset is not null)
               http ('  define input:inference <' || inf_ruleset || '>\n', ses);
+          if (sameas is not null)
+              http ('  define input:same-as <' || sameas || '>\n', ses);
           http ('select ?g1 ?p1 ?o1\n', ses);
           http ('      where { graph ?g1 {\n', ses);
           for (map_ctr := 0; map_ctr < maps_len; map_ctr := map_ctr + 1)
@@ -6182,7 +7877,7 @@ create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in go
           http ('            } } ) do {\n', ses);
           if (graphs_listed)
             http ('      if (position (__i2idn ("g1"), sorted_good_graphs))\n', ses);
-          http ('      dict_put (res, vector (subj, "p1", "o1"), 1); } }\n', ses);
+          http ('      dict_bitor_or_put (res, vector (subj, "p1", "o1"), 1); } }\n', ses);
           txt := string_output_string (ses);
           -- dbg_obj_princ ('Procedure text: ', txt);
 	  saved_user := user;
@@ -6224,16 +7919,119 @@ describe_physical_subjects:
               subj := phys_subjects [s_ctr];
               for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
                 {
+                  -- dbg_obj_princ ('found3 ', subj, p1, ' in ', graph);
+                  dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+                }
+            }
+        }
+      return res;
+    }
+  for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+    {
+      declare subj any;
+      subj := phys_subjects [s_ctr];
+      for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where
+        0 = position (G, sorted_bad_graphs) and
+        S = subj and
+        __rgs_ack_cbk (G, uid, 1) and
+        (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do
+        {
+          -- dbg_obj_princ ('found4 ', subj, p1);
+          dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+        }
+    }
+  return res;
+}
+;
+
+create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+{
+  declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;
+  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;
+  declare gs_app_callback, gs_app_uid varchar;
+  declare rdf_type_iid IRI_ID;
+  uid := get_keyword ('uid', options, http_nobody_uid());
+  gs_app_callback := get_keyword ('gs-app-callback', options);
+  if (gs_app_callback is not null)
+    gs_app_uid := get_keyword ('gs-app-uid', options);
+  rdf_type_iid := iri_to_id (UNAME'http://www.w3.org/1999/02/22-rdf-syntax-ns#type');
+  res := dict_new ();
+  if (isinteger (consts))
+    return res;
+  foreach (any c in consts) do
+    {
+      if (isiri_id (c))
+        dict_put (subj_dict, c, 0);
+    }
+  all_subj_descs := dict_list_keys (subj_dict, 1);
+  all_s_count := length (all_subj_descs);
+  if (0 = all_s_count)
+    return res;
+  gvector_sort (all_subj_descs, 1, 0, 0);
+  if (__tag of integer = __tag (good_graphs))
+    graphs_listed := 0;
+  else
+    {
+      vectorbld_init (sorted_good_graphs);
+      foreach (any g in good_graphs) do
+        {
+          if (isiri_id (g) and g < min_bnode_iri_id () and
+            __rgs_ack_cbk (g, uid, 1) and
+            (gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )
+            vectorbld_acc (sorted_good_graphs, g);
+        }
+      vectorbld_final (sorted_good_graphs);
+      good_g_count := length (sorted_good_graphs);
+      if (0 = good_g_count)
+        return res;
+      graphs_listed := 1;
+    }
+  vectorbld_init (sorted_bad_graphs);
+  foreach (any g in bad_graphs) do
+    {
+      if (isiri_id (g) and g < min_bnode_iri_id ())
+        vectorbld_acc (sorted_bad_graphs, g);
+    }
+  vectorbld_final (sorted_bad_graphs);
+  bad_g_count := length (sorted_bad_graphs);
+  vectorbld_init (phys_subjects);
+  for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+    {
+      declare s, phys_s any;
+      s := all_subj_descs [s_ctr];
+      if (isiri_id (s))
+        vectorbld_acc (phys_subjects, s);
+      else
+        {
+          phys_s := iri_to_id (s, 0, 0);
+          if (not isinteger (phys_s))
+            vectorbld_acc (phys_subjects, phys_s);
+        }
+    }
+  vectorbld_final (phys_subjects);
+  gvector_sort (phys_subjects, 1, 0, 0);
+  phys_s_count := length (phys_subjects);
+  -- dbg_obj_princ ('phys_subjects = ', phys_subjects);
+  if (0 = phys_s_count)
+    return res;
+  -- dbg_obj_princ ('sorted_bad_graphs = ', sorted_bad_graphs);
+  if (graphs_listed)
+    {
+      gvector_sort (sorted_good_graphs, 1, 0, 0);
+      -- dbg_obj_princ ('sorted_good_graphs = ', sorted_good_graphs);
+      for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)
+        {
+          declare graph any;
+          graph := sorted_good_graphs [g_ctr];
+          for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+            {
+              declare subj any;
+              subj := phys_subjects [s_ctr];
+              for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
+                {
                   -- dbg_obj_princ ('found5 ', subj, p1, ' in ', graph);
-                  dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
+                  dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
                 }
-	      for (select S as s1, P as p1 from DB.DBA.RDF_QUAD
-		  where G = graph and O = subj and P <> rdf_type_iid
-		  option (QUIETCAST)) do
-		{
-		  -- dbg_obj_princ ('found2 ', s1, p1, subj, ' in ', graph);
-		  dict_put (res, vector (s1, p1, subj), 1);
-		}
             }
         }
       return res;
@@ -6244,9 +8042,9 @@ describe_physical_subjects:
       declare subj, graph any;
       subj := phys_subjects [s_ctr];
       graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where O = subj and
-        0 = position (G, sorted_bad_graphs) and
-        __rgs_ack_cbk (G, uid, 1) and
-        (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
+          0 = position (G, sorted_bad_graphs) and
+          __rgs_ack_cbk (G, uid, 1) and
+          (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
       if (graph is not null)
         dict_put (g_dict, graph, 0);
     }
@@ -6257,11 +8055,11 @@ describe_physical_subjects:
       for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
         {
           declare subj, graph any;
-          subj := phys_subjects [s_ctr];
-          graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where S = subj and P = rdf_type_iid and
-            0 = position (G, sorted_bad_graphs) and
-            __rgs_ack_cbk (G, uid, 1) and
-            (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
+          subj := phys_subjects [s_ctr];
+          graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where S = subj and P = rdf_type_iid and
+              0 = position (G, sorted_bad_graphs) and
+              __rgs_ack_cbk (G, uid, 1) and
+              (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
           if (graph is not null)
             dict_put (g_dict, graph, 0);
         }
@@ -6281,25 +8079,25 @@ describe_physical_subjects:
           subj := phys_subjects [s_ctr];
           for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
             {
-              -- dbg_obj_princ ('found1 ', subj, p1, ' in ', graph);
-              dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
+              -- dbg_obj_princ ('found6 ', subj, p1, ' in ', graph);
+              dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
 --              if (isiri_id (obj1))
 --                {
 --                  for (select P as p2, O as obj2
 --                    from DB.DBA.RDF_QUAD
 --                    where G = graph and S = obj1 and not (isiri_id (O)) ) do
 --                    {
---                      dict_put (dict, vector (obj1, p2, __rdf_long_of_obj (obj2)), 0);
+--                      dict_bitor_or_put (dict, vector (obj1, p2, __rdf_long_of_obj (obj2)), 17);
 --                    }
 --                }
             }
-          for (select S as s1, P as p1 from DB.DBA.RDF_QUAD
-            where G = graph and O = subj and P <> rdf_type_iid
-            option (QUIETCAST)) do
-            {
-              -- dbg_obj_princ ('found2 ', s1, p1, subj, ' in ', graph);
-              dict_put (res, vector (s1, p1, subj), 1);
-            }
+--          for (select S as s1, P as p1 from DB.DBA.RDF_QUAD
+--            where G = graph and O = subj and P <> rdf_type_iid
+--            option (QUIETCAST)) do
+--            {
+              -- dbg_obj_princ ('found7 ', s1, p1, subj, ' in ', graph);
+--              dict_bitor_or_put (res, vector (s1, p1, subj), 4);
+--            }
         }
     }
   -- dbg_obj_princ ('final result is ', res);
@@ -6307,9 +8105,9 @@ describe_physical_subjects:
 }
 ;
 
-create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+create procedure DB.DBA.SPARQL_DESC_DICT_CBD (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
 {
-  declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, res any;
+  declare all_subjs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;
   declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;
   declare gs_app_callback, gs_app_uid, inf_ruleset varchar;
   declare rdf_type_iid IRI_ID;
@@ -6327,11 +8125,16 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
       if (isiri_id (c))
         dict_put (subj_dict, c, 0);
     }
-  all_subj_descs := dict_list_keys (subj_dict, 1);
-  all_s_count := length (all_subj_descs);
+  all_subjs := dict_list_keys (subj_dict, 0);
+  next_iter_subjs := dict_new ();
+  all_s_count := length (all_subjs);
   if (0 = all_s_count)
     return res;
-  gvector_sort (all_subj_descs, 1, 0, 0);
+
+next_iteration:
+  all_s_count := length (all_subjs);
+  gvector_sort (all_subjs, 1, 0, 0);
+  -- dbg_obj_princ ('new iteration: all_subjs = ', all_subjs);
   if (__tag of integer = __tag (good_graphs))
     graphs_listed := 0;
   else
@@ -6359,14 +8162,14 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
   vectorbld_final (sorted_bad_graphs);
   bad_g_count := length (sorted_bad_graphs);
   vectorbld_init (phys_subjects);
-  if (isinteger (storage_name))
+  if (storage_name is null)
     storage_name := 'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage';
   else if (('' = storage_name) and (inf_ruleset is null))
     {
       for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
         {
           declare s, phys_s any;
-          s := all_subj_descs [s_ctr];
+          s := all_subjs [s_ctr];
           if (isiri_id (s))
             vectorbld_acc (phys_subjects, s);
           else
@@ -6384,9 +8187,9 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
     {
       declare s, phys_s, maps any;
       declare maps_len integer;
-      s := all_subj_descs [s_ctr];
+      s := all_subjs [s_ctr];
       maps := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);
-      -- dbg_obj_princ ('s = ', s, ' maps = ', maps);
+      -- dbg_obj_princ ('s = ', s, id_to_iri (s), ' maps = ', maps);
       maps_len := length (maps);
       if ((maps_len > 0) and (inf_ruleset is null) and (maps[maps_len-1][0] = UNAME'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap'))
         {
@@ -6405,11 +8208,11 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
           maps_len := maps_len - 1;
         }
       if (maps_len > 0)
-        all_subj_descs [s_ctr] := vector (s, maps);
+        all_subjs [s_ctr] := vector (s, maps);
       else
-        all_subj_descs [s_ctr] := 0;
+        all_subjs [s_ctr] := 0;
       -- dbg_obj_princ ('s = ', s, ' maps = ', maps);
-      -- dbg_obj_princ ('all_subj_descs [', s_ctr, '] = ', all_subj_descs [s_ctr]);
+      -- dbg_obj_princ ('all_subjs [', s_ctr, '] = ', all_subjs [s_ctr]);
     }
   vectorbld_final (phys_subjects);
   for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
@@ -6417,18 +8220,18 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
       declare s_desc, s, maps any;
       declare map_ctr, maps_len integer;
       declare fname varchar;
-      s_desc := all_subj_descs [s_ctr];
+      s_desc := all_subjs [s_ctr];
       if (isinteger (s_desc))
         goto end_of_s;
       s := s_desc[0];
       maps := s_desc[1];
       maps_len := length (maps);
-      fname := sprintf ('SPARQL_DESC_DICT_QMV1_%U', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));
+      fname := sprintf ('SPARQL_DESC_DICT_CBD_QMV1_%U', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));
       if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = 'DB.DBA.' || fname))
         {
           declare ses, txt, saved_user any;
           ses := string_output ();
-          http ('create procedure DB.DBA."' || fname || '" (in subj any, in res any', ses);
+          http ('create procedure DB.DBA."' || fname || '" (in subj any, in subj_dict any, in next_iter_subjs any, in res any', ses);
           if (graphs_listed)
             http (', inout sorted_good_graphs any', ses);
           http (')\n', ses);
@@ -6442,17 +8245,29 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
             }
           if (inf_ruleset is not null)
               http ('  define input:inference <' || inf_ruleset || '>\n', ses);
-          http ('select ?g1 ?p1 ?o1\n', ses);
+          http ('select ?g1 ?p1 ?o1 ?g2 ?st2\n', ses);
           http ('      where { graph ?g1 {\n', ses);
           for (map_ctr := 0; map_ctr < maps_len; map_ctr := map_ctr + 1)
             {
               if (map_ctr > 0) http ('              union\n', ses);
               http ('              { quad map <' || maps[map_ctr][0] || '> { ?:subj_iri ?p1 ?o1 } }\n', ses);
             }
-          http ('            } } ) do {\n', ses);
+          http ('            }\n', ses);
+          http ('          optional { graph ?g2 {\n', ses);
+          http ('                  ?st2 a rdf:Statement ; rdf:subject ?:subj_iri ; rdf:predicate ?p1 ; rdf:object ?o1 } }\n', ses);
+          http ('            } ) do {\n', ses);
           if (graphs_listed)
-            http ('      if (position (__i2idn ("g1"), sorted_good_graphs))\n', ses);
-          http ('      dict_put (res, vector (subj, "p1", "o1"), 1); } }\n', ses);
+            http ('      if (position (__i2idn ("g1"), sorted_good_graphs)) {\n', ses);
+          http ('      dict_bitor_or_put (res, vector (subj, "p1", "o1"), 1);\n', ses);
+          http ('      if (isiri_id ("o1") and "o1" > min_bnode_iri_id() and dict_get (subj_dict, "o1") is null)\n', ses);
+          http ('        dict_put (next_iter_subjs, "o1", 1);\n', ses);
+          if (graphs_listed)
+            http ('      if (position (__i2idn ("g2"), sorted_good_graphs)) {\n', ses);
+          http ('      if ("st2" is not null and dict_get (subj_dict, "st2") is null)\n', ses);
+          http ('        dict_put (next_iter_subjs, "o1", 1);\n', ses);
+          if (graphs_listed)
+            http ('        } }\n', ses);
+          http ('      } }\n', ses);
           txt := string_output_string (ses);
           -- dbg_obj_princ ('Procedure text: ', txt);
 	  saved_user := user;
@@ -6462,13 +8277,13 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, i
         }
       if (graphs_listed)
         {
-          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, res, sorted_good_graphs, ')');
-          call ('DB.DBA.' || fname)(s, res, sorted_good_graphs);
+          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, subj_dict, next_iter_subjs, res, sorted_good_graphs, ')');
+          call ('DB.DBA.' || fname)(s, subj_dict, next_iter_subjs, res, sorted_good_graphs);
         }
       else
         {
-          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, res, ')');
-          call ('DB.DBA.' || fname)(s, res);
+          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, subj_dict, next_iter_subjs, res, ')');
+          call ('DB.DBA.' || fname)(s, subj_dict, next_iter_subjs, res);
         }
 end_of_s: ;
     }
@@ -6495,34 +8310,67 @@ describe_physical_subjects:
               for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
                 {
                   -- dbg_obj_princ ('found3 ', subj, p1, ' in ', graph);
-                  dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
+                  dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+                  if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
+                    dict_put (next_iter_subjs, obj1, 1);
+                  for (sparql define output:valmode "LONG"
+                    select ?g2 ?st2 where {
+                        graph ?g2 {
+                            ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                    {
+                      if (position ("g2", sorted_good_graphs) and dict_get (subj_dict, "st2") is null)
+                        dict_put (next_iter_subjs, "st2", 1);
+                    }
                 }
             }
         }
-      return res;
     }
-  for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+  else
     {
-      declare subj any;
-      subj := phys_subjects [s_ctr];
-      for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where
-        0 = position (G, sorted_bad_graphs) and
-        S = subj and
-        __rgs_ack_cbk (G, uid, 1) and
-        (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do
+      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
         {
-          -- dbg_obj_princ ('found4 ', subj, p1);
-          dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
+          declare subj any;
+          subj := phys_subjects [s_ctr];
+          for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where
+            0 = position (G, sorted_bad_graphs) and
+            S = subj and
+            __rgs_ack_cbk (G, uid, 1) and
+            (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do
+            {
+              -- dbg_obj_princ ('found4 ', subj, p1);
+              dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+              if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
+                dict_put (next_iter_subjs, obj1, 1);
+              for (sparql define output:valmode "LONG"
+                select ?g2 ?st2 where {
+                    graph ?g2 {
+                        ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                {
+                  if (0 = position ("g2", sorted_bad_graphs) and
+                    dict_get (subj_dict, "st2") is null and
+                    __rgs_ack_cbk ("g2", uid, 1) and
+                    (gs_app_callback is null or bit_and (1, call (gs_app_callback) ("g2", gs_app_uid))) )
+                    dict_put (next_iter_subjs, "st2", 1);
+                }
+            }
         }
     }
-  return res;
+ret_or_next_iter:
+  if (0 = dict_size (next_iter_subjs))
+    {
+      -- dbg_obj_princ ('no new subjs, res = ', dict_list_keys (res, 0));
+      return res;
+    }
+  all_subjs := dict_list_keys (next_iter_subjs, 1);
+  foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);
+  goto next_iteration;
 }
 ;
 
-create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+create procedure DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
 {
-  declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;
-  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;
+  declare all_subjs, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;
+  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count integer;
   declare gs_app_callback, gs_app_uid varchar;
   declare rdf_type_iid IRI_ID;
   uid := get_keyword ('uid', options, http_nobody_uid());
@@ -6538,11 +8386,16 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in cons
       if (isiri_id (c))
         dict_put (subj_dict, c, 0);
     }
-  all_subj_descs := dict_list_keys (subj_dict, 1);
-  all_s_count := length (all_subj_descs);
+  all_subjs := dict_list_keys (subj_dict, 0);
+  next_iter_subjs := dict_new ();
+  all_s_count := length (all_subjs);
   if (0 = all_s_count)
     return res;
-  gvector_sort (all_subj_descs, 1, 0, 0);
+
+next_iteration:
+  all_s_count := length (all_subjs);
+  gvector_sort (all_subjs, 1, 0, 0);
+  -- dbg_obj_princ ('new iteration: all_subjs = ', all_subjs);
   if (__tag of integer = __tag (good_graphs))
     graphs_listed := 0;
   else
@@ -6569,25 +8422,8 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in cons
     }
   vectorbld_final (sorted_bad_graphs);
   bad_g_count := length (sorted_bad_graphs);
-  vectorbld_init (phys_subjects);
-  for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
-    {
-      declare s, phys_s any;
-      s := all_subj_descs [s_ctr];
-      if (isiri_id (s))
-        vectorbld_acc (phys_subjects, s);
-      else
-        {
-          phys_s := iri_to_id (s, 0, 0);
-          if (not isinteger (phys_s))
-            vectorbld_acc (phys_subjects, phys_s);
-        }
-    }
-  vectorbld_final (phys_subjects);
-  gvector_sort (phys_subjects, 1, 0, 0);
-  phys_s_count := length (phys_subjects);
-  -- dbg_obj_princ ('phys_subjects = ', phys_subjects);
-  if (0 = phys_s_count)
+  -- dbg_obj_princ ('all_subjs = ', all_subjs);
+  if (0 = all_s_count)
     return res;
   -- dbg_obj_princ ('sorted_bad_graphs = ', sorted_bad_graphs);
   if (graphs_listed)
@@ -6598,92 +8434,75 @@ create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in cons
         {
           declare graph any;
           graph := sorted_good_graphs [g_ctr];
-          for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+          for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
             {
               declare subj any;
-              subj := phys_subjects [s_ctr];
+              subj := all_subjs [s_ctr];
               for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
                 {
-                  -- dbg_obj_princ ('found5 ', subj, p1, ' in ', graph);
-                  dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
+                  -- dbg_obj_princ ('found3 ', subj, p1, ' in ', graph);
+                  dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+                  if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
+                    dict_put (next_iter_subjs, obj1, 1);
+                  for (sparql define output:valmode "LONG"
+                    select ?g2 ?st2 where {
+                        graph ?g2 {
+                            ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                    {
+                      if (position ("g2", sorted_good_graphs) and dict_get (subj_dict, "st2") is null)
+                        dict_put (next_iter_subjs, "st2", 1);
+                    }
                 }
             }
         }
-      return res;
-    }
-      g_dict := dict_new ();
-      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
-        {
-          declare subj, graph any;
-          subj := phys_subjects [s_ctr];
-          graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where O = subj and
-              0 = position (G, sorted_bad_graphs) and
-              __rgs_ack_cbk (G, uid, 1) and
-              (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
-          if (graph is not null)
-            dict_put (g_dict, graph, 0);
-        }
-  sorted_good_graphs := dict_list_keys (g_dict, 1);
-  if (0 = length (sorted_good_graphs))
-    {
-      g_dict := dict_new ();
-      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
-        {
-          declare subj, graph any;
-          subj := phys_subjects [s_ctr];
-          graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where S = subj and P = rdf_type_iid and
-              0 = position (G, sorted_bad_graphs) and
-              __rgs_ack_cbk (G, uid, 1) and
-              (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );
-          if (graph is not null)
-            dict_put (g_dict, graph, 0);
-        }
-      sorted_good_graphs := dict_list_keys (g_dict, 1);
     }
-  -- dbg_obj_princ ('sorted_good_graphs = ', sorted_good_graphs);
-  gvector_sort (sorted_good_graphs, 1, 0, 0);
-  good_g_count := length (sorted_good_graphs);
-  -- dbg_obj_princ ('sorted_good_graphs = ', sorted_good_graphs);
-  for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)
+  else
     {
-      declare graph any;
-      graph := sorted_good_graphs [g_ctr];
-      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+      for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
         {
           declare subj any;
-          subj := phys_subjects [s_ctr];
-          for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
+          subj := all_subjs [s_ctr];
+          for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where
+            0 = position (G, sorted_bad_graphs) and
+            S = subj and
+            __rgs_ack_cbk (G, uid, 1) and
+            (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do
             {
-              -- dbg_obj_princ ('found6 ', subj, p1, ' in ', graph);
-              dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
---              if (isiri_id (obj1))
---                {
---                  for (select P as p2, O as obj2
---                    from DB.DBA.RDF_QUAD
---                    where G = graph and S = obj1 and not (isiri_id (O)) ) do
---                    {
---                      dict_put (dict, vector (obj1, p2, __rdf_long_of_obj (obj2)), 0);
---                    }
---                }
+              -- dbg_obj_princ ('found4 ', subj, p1);
+              dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);
+              if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
+                dict_put (next_iter_subjs, obj1, 1);
+              for (sparql define output:valmode "LONG"
+                select ?g2 ?st2 where {
+                    graph ?g2 {
+                        ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                {
+                  if (0 = position ("g2", sorted_bad_graphs) and
+                    dict_get (subj_dict, "st2") is null and
+                    __rgs_ack_cbk ("g2", uid, 1) and
+                    (gs_app_callback is null or bit_and (1, call (gs_app_callback) ("g2", gs_app_uid))) )
+                    dict_put (next_iter_subjs, "st2", 1);
+                }
             }
---          for (select S as s1, P as p1 from DB.DBA.RDF_QUAD
---            where G = graph and O = subj and P <> rdf_type_iid
---            option (QUIETCAST)) do
---            {
-              -- dbg_obj_princ ('found7 ', s1, p1, subj, ' in ', graph);
---              dict_put (res, vector (s1, p1, subj), 1);
---            }
         }
     }
-  -- dbg_obj_princ ('final result is ', res);
-  return res;
+
+ret_or_next_iter:
+  if (0 = dict_size (next_iter_subjs))
+    {
+      -- dbg_obj_princ ('no new subjs, res = ', dict_list_keys (res, 0));
+      return res;
+    }
+  all_subjs := dict_list_keys (next_iter_subjs, 1);
+  foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);
+  goto next_iteration;
 }
 ;
 
-create procedure DB.DBA.SPARQL_DESC_DICT_CBD (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+create procedure DB.DBA.SPARQL_DESC_DICT_OBJCBD (in obj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
 {
-  declare all_subjs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;
-  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;
+  declare all_objs, phys_objects, sorted_good_graphs, sorted_bad_graphs, next_iter_objs, res any;
+  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, obj_ctr, all_obj_count, phys_obj_count integer;
   declare gs_app_callback, gs_app_uid, inf_ruleset varchar;
   declare rdf_type_iid IRI_ID;
   uid := get_keyword ('uid', options, http_nobody_uid());
@@ -6697,19 +8516,19 @@ create procedure DB.DBA.SPARQL_DESC_DICT_CBD (in subj_dict any, in consts any, i
     return res;
   foreach (any c in consts) do
     {
-      if (isiri_id (c))
-        dict_put (subj_dict, c, 0);
+      if (not isnumeric (c))
+        dict_put (obj_dict, c, 0);
     }
-  all_subjs := dict_list_keys (subj_dict, 0);
-  next_iter_subjs := dict_new ();
-  all_s_count := length (all_subjs);
-  if (0 = all_s_count)
+  all_objs := dict_list_keys (obj_dict, 0);
+  next_iter_objs := dict_new ();
+  all_obj_count := length (all_objs);
+  if (0 = all_obj_count)
     return res;
 
 next_iteration:
-  all_s_count := length (all_subjs);
-  gvector_sort (all_subjs, 1, 0, 0);
-  -- dbg_obj_princ ('new iteration: all_subjs = ', all_subjs);
+  all_obj_count := length (all_objs);
+  gvector_sort (all_objs, 1, 0, 0);
+  -- dbg_obj_princ ('new iteration: all_objs = ', all_objs);
   if (__tag of integer = __tag (good_graphs))
     graphs_listed := 0;
   else
@@ -6717,7 +8536,7 @@ next_iteration:
       vectorbld_init (sorted_good_graphs);
       foreach (any g in good_graphs) do
         {
-          if (isiri_id (g) and g < min_bnode_iri_id () and
+          if (is_named_iri_id (g) and
             __rgs_ack_cbk (g, uid, 1) and
             (gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )
             vectorbld_acc (sorted_good_graphs, g);
@@ -6731,88 +8550,94 @@ next_iteration:
   vectorbld_init (sorted_bad_graphs);
   foreach (any g in bad_graphs) do
     {
-      if (isiri_id (g) and g < min_bnode_iri_id ())
+      if (is_named_iri_id (g))
         vectorbld_acc (sorted_bad_graphs, g);
     }
   vectorbld_final (sorted_bad_graphs);
   bad_g_count := length (sorted_bad_graphs);
-  vectorbld_init (phys_subjects);
-  if (isinteger (storage_name))
+  vectorbld_init (phys_objects);
+  if (storage_name is null)
     storage_name := 'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage';
   else if (('' = storage_name) and (inf_ruleset is null))
     {
-      for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+      for (obj_ctr := 0; obj_ctr < all_obj_count; obj_ctr := obj_ctr + 1)
         {
-          declare s, phys_s any;
-          s := all_subjs [s_ctr];
-          if (isiri_id (s))
-            vectorbld_acc (phys_subjects, s);
-          else
+          declare obj, phys_obj any;
+          obj := all_objs [obj_ctr];
+          if (not isnumeric (obj))
             {
-              phys_s := iri_to_id (s, 0, 0);
-              if (not isinteger (phys_s))
-                vectorbld_acc (phys_subjects, phys_s);
+              if (isiri_id (obj))
+                vectorbld_acc (phys_objects, obj);
+              else
+                {
+                  phys_obj := iri_to_id (obj, 0, 0);
+                  if (not isinteger (phys_obj))
+                    vectorbld_acc (phys_objects, phys_obj);
+                }
             }
         }
-      vectorbld_final (phys_subjects);
-      goto describe_physical_subjects;
+      vectorbld_final (phys_objects);
+      goto describe_physical_objects;
     }
   -- dbg_obj_princ ('storage_name=',storage_name, ' sorted_good_graphs=', sorted_good_graphs, ' sorted_bad_graphs=', sorted_bad_graphs);
-  for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+  for (obj_ctr := 0; obj_ctr < all_obj_count; obj_ctr := obj_ctr + 1)
     {
-      declare s, phys_s, maps any;
+      declare obj, phys_obj, maps any;
       declare maps_len integer;
-      s := all_subjs [s_ctr];
-      maps := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);
-      -- dbg_obj_princ ('s = ', s, id_to_iri (s), ' maps = ', maps);
+      obj := all_objs [obj_ctr];
+      maps := sparql_quad_maps_for_quad (NULL, NULL, NULL, obj, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);
+      -- dbg_obj_princ ('obj = ', obj, id_to_iri (obj), ' maps = ', maps);
       maps_len := length (maps);
       if ((maps_len > 0) and (inf_ruleset is null) and (maps[maps_len-1][0] = UNAME'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap'))
         {
-          if (isiri_id (s))
-            {
-              phys_s := s;
-              vectorbld_acc (phys_subjects, phys_s);
-            }
-          else
+          if (not isnumeric (obj))
             {
-              phys_s := iri_to_id (s, 0, 0);
-              if (not isinteger (phys_s))
-                vectorbld_acc (phys_subjects, phys_s);
+              if (isiri_id (obj))
+                {
+                  phys_obj := obj;
+                  vectorbld_acc (phys_objects, phys_obj);
+                }
+              else
+                {
+                  phys_obj := iri_to_id (obj, 0, 0);
+                  if (not isinteger (phys_obj))
+                    vectorbld_acc (phys_objects, phys_obj);
+                }
             }
           maps := subseq (maps, 0, maps_len-1);
           maps_len := maps_len - 1;
         }
       if (maps_len > 0)
-        all_subjs [s_ctr] := vector (s, maps);
+        all_objs [obj_ctr] := vector (obj, maps);
       else
-        all_subjs [s_ctr] := 0;
-      -- dbg_obj_princ ('s = ', s, ' maps = ', maps);
-      -- dbg_obj_princ ('all_subjs [', s_ctr, '] = ', all_subjs [s_ctr]);
+        all_objs [obj_ctr] := 0;
+      -- dbg_obj_princ ('obj = ', obj, ' maps = ', maps);
+      -- dbg_obj_princ ('all_objs [', obj_ctr, '] = ', all_objs [obj_ctr]);
     }
-  vectorbld_final (phys_subjects);
-  for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)
+  vectorbld_final (phys_objects);
+  for (obj_ctr := 0; obj_ctr < all_obj_count; obj_ctr := obj_ctr + 1)
     {
-      declare s_desc, s, maps any;
+      declare s_desc, obj, maps any;
       declare map_ctr, maps_len integer;
       declare fname varchar;
-      s_desc := all_subjs [s_ctr];
+      s_desc := all_objs [obj_ctr];
       if (isinteger (s_desc))
         goto end_of_s;
-      s := s_desc[0];
+      obj := s_desc[0];
       maps := s_desc[1];
       maps_len := length (maps);
-      fname := sprintf ('SPARQL_DESC_DICT_CBD_QMV1_%U', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));
+      fname := sprintf ('SPARQL_DESC_DICT_OBJCBD_QMV1_%U', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));
       if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = 'DB.DBA.' || fname))
         {
           declare ses, txt, saved_user any;
           ses := string_output ();
-          http ('create procedure DB.DBA."' || fname || '" (in subj any, in subj_dict any, in next_iter_subjs any, in res any', ses);
+          http ('create procedure DB.DBA."' || fname || '" (in obj any, in obj_dict any, in next_iter_objs any, in res any', ses);
           if (graphs_listed)
             http (', inout sorted_good_graphs any', ses);
           http (')\n', ses);
           http ('{\n', ses);
-          http ('  declare subj_iri varchar;\n', ses);
-          http ('  subj_iri := id_to_iri_nosignal (subj);\n', ses);
+          http ('  declare obj_iri varchar;\n', ses);
+          http ('  obj_iri := id_to_iri_nosignal (obj);\n', ses);
           http ('  for (sparql define output:valmode "LONG" define input:storage <' || storage_name || '> ', ses);
           foreach (any g in sorted_bad_graphs) do
             {
@@ -6820,26 +8645,26 @@ next_iteration:
             }
           if (inf_ruleset is not null)
               http ('  define input:inference <' || inf_ruleset || '>\n', ses);
-          http ('select ?g1 ?p1 ?o1 ?g2 ?st2\n', ses);
+          http ('select ?g1 ?p1 ?s1 ?g2 ?st2\n', ses);
           http ('      where { graph ?g1 {\n', ses);
           for (map_ctr := 0; map_ctr < maps_len; map_ctr := map_ctr + 1)
             {
               if (map_ctr > 0) http ('              union\n', ses);
-              http ('              { quad map <' || maps[map_ctr][0] || '> { ?:subj_iri ?p1 ?o1 } }\n', ses);
+              http ('              { quad map <' || maps[map_ctr][0] || '> { ?s1 ?p1 ?:obj_iri } }\n', ses);
             }
           http ('            }\n', ses);
           http ('          optional { graph ?g2 {\n', ses);
-          http ('                  ?st2 a rdf:Statement ; rdf:subject ?:subj_iri ; rdf:predicate ?p1 ; rdf:object ?o1 } }\n', ses);
+          http ('                  ?st2 a rdf:Statement ; rdf:object ?:obj_iri ; rdf:predicate ?p1 ; rdf:subject ?s1 } }\n', ses);
           http ('            } ) do {\n', ses);
           if (graphs_listed)
             http ('      if (position (__i2idn ("g1"), sorted_good_graphs)) {\n', ses);
-          http ('      dict_put (res, vector (subj, "p1", "o1"), 1);\n', ses);
-          http ('      if (isiri_id ("o1") and "o1" > min_bnode_iri_id() and dict_get (subj_dict, "o1") is null)\n', ses);
-          http ('        dict_put (next_iter_subjs, "o1", 1);\n', ses);
+          http ('      dict_bitor_or_put (res, vector ("s1", "p1", obj), 1);\n', ses);
+          http ('      if (is_bnode_iri_id ("s1") and dict_get (obj_dict, "s1") is null)\n', ses);
+          http ('        dict_put (next_iter_objs, "s1", 1);\n', ses);
           if (graphs_listed)
             http ('      if (position (__i2idn ("g2"), sorted_good_graphs)) {\n', ses);
-          http ('      if ("st2" is not null and dict_get (subj_dict, "st2") is null)\n', ses);
-          http ('        dict_put (next_iter_subjs, "o1", 1);\n', ses);
+          http ('      if ("st2" is not null and dict_get (obj_dict, "st2") is null)\n', ses);
+          http ('        dict_put (next_iter_objs, "s1", 1);\n', ses);
           if (graphs_listed)
             http ('        } }\n', ses);
           http ('      } }\n', ses);
@@ -6852,22 +8677,22 @@ next_iteration:
         }
       if (graphs_listed)
         {
-          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, subj_dict, next_iter_subjs, res, sorted_good_graphs, ')');
-          call ('DB.DBA.' || fname)(s, subj_dict, next_iter_subjs, res, sorted_good_graphs);
+          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', obj, obj_dict, next_iter_objs, res, sorted_good_graphs, ')');
+          call ('DB.DBA.' || fname)(obj, obj_dict, next_iter_objs, res, sorted_good_graphs);
         }
       else
         {
-          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', s, subj_dict, next_iter_subjs, res, ')');
-          call ('DB.DBA.' || fname)(s, subj_dict, next_iter_subjs, res);
+          -- dbg_obj_princ ('call (''DB.DBA.', fname, ''')(', obj, obj_dict, next_iter_objs, res, ')');
+          call ('DB.DBA.' || fname)(obj, obj_dict, next_iter_objs, res);
         }
 end_of_s: ;
     }
 
-describe_physical_subjects:
-  gvector_sort (phys_subjects, 1, 0, 0);
-  phys_s_count := length (phys_subjects);
-  -- dbg_obj_princ ('phys_subjects = ', phys_subjects);
-  if (0 = phys_s_count)
+describe_physical_objects:
+  gvector_sort (phys_objects, 1, 0, 0);
+  phys_obj_count := length (phys_objects);
+  -- dbg_obj_princ ('phys_objects = ', phys_objects);
+  if (0 = phys_obj_count)
     return res;
   -- dbg_obj_princ ('sorted_bad_graphs = ', sorted_bad_graphs);
   if (graphs_listed)
@@ -6878,23 +8703,23 @@ describe_physical_subjects:
         {
           declare graph any;
           graph := sorted_good_graphs [g_ctr];
-          for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+          for (obj_ctr := phys_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)
             {
-              declare subj any;
-              subj := phys_subjects [s_ctr];
-              for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
+              declare obj any;
+              obj := phys_objects [obj_ctr];
+              for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where G = graph and O = obj) do
                 {
-                  -- dbg_obj_princ ('found3 ', subj, p1, ' in ', graph);
-                  dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
-                  if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
-                    dict_put (next_iter_subjs, obj1, 1);
+                  -- dbg_obj_princ ('found3 ', subj1, p1, obj, ' in ', graph);
+                  dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);
+                  if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)
+                    dict_put (next_iter_objs, subj1, 1);
                   for (sparql define output:valmode "LONG"
                     select ?g2 ?st2 where {
                         graph ?g2 {
-                            ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                            ?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do
                     {
-                      if (position ("g2", sorted_good_graphs) and dict_get (subj_dict, "st2") is null)
-                        dict_put (next_iter_subjs, "st2", 1);
+                      if (position ("g2", sorted_good_graphs) and dict_get (obj_dict, "st2") is null)
+                        dict_put (next_iter_objs, "st2", 1);
                     }
                 }
             }
@@ -6902,50 +8727,50 @@ describe_physical_subjects:
     }
   else
     {
-      for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+      for (obj_ctr := phys_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)
         {
-          declare subj any;
-          subj := phys_subjects [s_ctr];
-          for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where
+          declare obj any;
+          obj := phys_objects [obj_ctr];
+          for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where
             0 = position (G, sorted_bad_graphs) and
-            S = subj and
+            O = obj and
             __rgs_ack_cbk (G, uid, 1) and
             (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do
             {
-              -- dbg_obj_princ ('found4 ', subj, p1);
-              dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
-              if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
-                dict_put (next_iter_subjs, obj1, 1);
+              -- dbg_obj_princ ('found4 ', obj, p1);
+              dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);
+              if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)
+                dict_put (next_iter_objs, subj1, 1);
               for (sparql define output:valmode "LONG"
                 select ?g2 ?st2 where {
                     graph ?g2 {
-                        ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                        ?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do
                 {
                   if (0 = position ("g2", sorted_bad_graphs) and
-                    dict_get (subj_dict, "st2") is null and
+                    dict_get (obj_dict, "st2") is null and
                     __rgs_ack_cbk ("g2", uid, 1) and
                     (gs_app_callback is null or bit_and (1, call (gs_app_callback) ("g2", gs_app_uid))) )
-                    dict_put (next_iter_subjs, "st2", 1);
+                    dict_put (next_iter_objs, "st2", 1);
                 }
             }
         }
     }
 ret_or_next_iter:
-  if (0 = dict_size (next_iter_subjs))
+  if (0 = dict_size (next_iter_objs))
     {
-      -- dbg_obj_princ ('no new subjs, res = ', dict_list_keys (res, 0));
+      -- dbg_obj_princ ('no new objs, res = ', dict_list_keys (res, 0));
       return res;
     }
-  all_subjs := dict_list_keys (next_iter_subjs, 1);
-  foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);
+  all_objs := dict_list_keys (next_iter_objs, 1);
+  foreach (IRI_ID obj in all_objs) do dict_put (obj_dict, obj, 1);
   goto next_iteration;
 }
 ;
 
-create procedure DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+create procedure DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL (in obj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
 {
-  declare all_subjs, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;
-  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count integer;
+  declare all_objs, sorted_good_graphs, sorted_bad_graphs, next_iter_objs, res any;
+  declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, obj_ctr, all_obj_count integer;
   declare gs_app_callback, gs_app_uid varchar;
   declare rdf_type_iid IRI_ID;
   uid := get_keyword ('uid', options, http_nobody_uid());
@@ -6958,19 +8783,19 @@ create procedure DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (in subj_dict any, in cons
     return res;
   foreach (any c in consts) do
     {
-      if (isiri_id (c))
-        dict_put (subj_dict, c, 0);
+      if (not isnumeric (c))
+        dict_put (obj_dict, c, 0);
     }
-  all_subjs := dict_list_keys (subj_dict, 0);
-  next_iter_subjs := dict_new ();
-  all_s_count := length (all_subjs);
-  if (0 = all_s_count)
+  all_objs := dict_list_keys (obj_dict, 0);
+  next_iter_objs := dict_new ();
+  all_obj_count := length (all_objs);
+  if (0 = all_obj_count)
     return res;
 
 next_iteration:
-  all_s_count := length (all_subjs);
-  gvector_sort (all_subjs, 1, 0, 0);
-  -- dbg_obj_princ ('new iteration: all_subjs = ', all_subjs);
+  all_obj_count := length (all_objs);
+  gvector_sort (all_objs, 1, 0, 0);
+  -- dbg_obj_princ ('new iteration: all_objs = ', all_objs);
   if (__tag of integer = __tag (good_graphs))
     graphs_listed := 0;
   else
@@ -6978,7 +8803,7 @@ next_iteration:
       vectorbld_init (sorted_good_graphs);
       foreach (any g in good_graphs) do
         {
-          if (isiri_id (g) and g < min_bnode_iri_id () and
+          if (is_named_iri_id (g) and
             __rgs_ack_cbk (g, uid, 1) and
             (gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )
             vectorbld_acc (sorted_good_graphs, g);
@@ -6992,13 +8817,13 @@ next_iteration:
   vectorbld_init (sorted_bad_graphs);
   foreach (any g in bad_graphs) do
     {
-      if (isiri_id (g) and g < min_bnode_iri_id ())
+      if (isnamed_iri_id (g))
         vectorbld_acc (sorted_bad_graphs, g);
     }
   vectorbld_final (sorted_bad_graphs);
   bad_g_count := length (sorted_bad_graphs);
-  -- dbg_obj_princ ('all_subjs = ', all_subjs);
-  if (0 = all_s_count)
+  -- dbg_obj_princ ('all_objs = ', all_objs);
+  if (0 = all_obj_count)
     return res;
   -- dbg_obj_princ ('sorted_bad_graphs = ', sorted_bad_graphs);
   if (graphs_listed)
@@ -7009,23 +8834,23 @@ next_iteration:
         {
           declare graph any;
           graph := sorted_good_graphs [g_ctr];
-          for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+          for (obj_ctr := all_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)
             {
-              declare subj any;
-              subj := all_subjs [s_ctr];
-              for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do
+              declare obj any;
+              obj := all_objs [obj_ctr];
+              for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where G = graph and O = obj) do
                 {
-                  -- dbg_obj_princ ('found3 ', subj, p1, ' in ', graph);
-                  dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
-                  if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
-                    dict_put (next_iter_subjs, obj1, 1);
+                  -- dbg_obj_princ ('found3 ', subj1, p1, obj, ' in ', graph);
+                  dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);
+                  if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)
+                    dict_put (next_iter_objs, subj1, 1);
                   for (sparql define output:valmode "LONG"
                     select ?g2 ?st2 where {
                         graph ?g2 {
-                            ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                            ?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do
                     {
-                      if (position ("g2", sorted_good_graphs) and dict_get (subj_dict, "st2") is null)
-                        dict_put (next_iter_subjs, "st2", 1);
+                      if (position ("g2", sorted_good_graphs) and dict_get (obj_dict, "st2") is null)
+                        dict_put (next_iter_objs, "st2", 1);
                     }
                 }
             }
@@ -7033,47 +8858,75 @@ next_iteration:
     }
   else
     {
-      for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)
+      for (obj_ctr := all_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)
         {
-          declare subj any;
-          subj := all_subjs [s_ctr];
-          for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where
+          declare obj any;
+          obj := all_objs [obj_ctr];
+          for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where
             0 = position (G, sorted_bad_graphs) and
-            S = subj and
+            O = obj and
             __rgs_ack_cbk (G, uid, 1) and
             (gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do
             {
-              -- dbg_obj_princ ('found4 ', subj, p1);
-              dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);
-              if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)
-                dict_put (next_iter_subjs, obj1, 1);
+              -- dbg_obj_princ ('found4 ', subj1, p1, obj);
+              dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);
+              if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)
+                dict_put (next_iter_objs, subj1, 1);
               for (sparql define output:valmode "LONG"
                 select ?g2 ?st2 where {
                     graph ?g2 {
-                        ?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do
+                        ?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do
                 {
                   if (0 = position ("g2", sorted_bad_graphs) and
-                    dict_get (subj_dict, "st2") is null and
+                    dict_get (obj_dict, "st2") is null and
                     __rgs_ack_cbk ("g2", uid, 1) and
                     (gs_app_callback is null or bit_and (1, call (gs_app_callback) ("g2", gs_app_uid))) )
-                    dict_put (next_iter_subjs, "st2", 1);
+                    dict_put (next_iter_objs, "st2", 1);
                 }
             }
         }
     }
 
 ret_or_next_iter:
-  if (0 = dict_size (next_iter_subjs))
+  if (0 = dict_size (next_iter_objs))
     {
-      -- dbg_obj_princ ('no new subjs, res = ', dict_list_keys (res, 0));
+      -- dbg_obj_princ ('no new objs, res = ', dict_list_keys (res, 0));
       return res;
     }
-  all_subjs := dict_list_keys (next_iter_subjs, 1);
-  foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);
+  all_objs := dict_list_keys (next_iter_objs, 1);
+  foreach (IRI_ID obj in all_objs) do dict_put (obj_dict, obj, 1);
   goto next_iteration;
 }
 ;
 
+create procedure DB.DBA.SPARQL_DESC_DICT_SCBD (in node_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+{
+  declare cbd_res, objcbd_res, triples any;
+  cbd_res := DB.DBA.SPARQL_DESC_DICT_CBD (node_dict, consts, good_graphs, bad_graphs, storage_name, options);
+  objcbd_res := DB.DBA.SPARQL_DESC_DICT_OBJCBD (node_dict, consts, good_graphs, bad_graphs, storage_name, options);
+again:
+  triples := dict_destructive_list_rnd_keys (objcbd_res, 80000);
+  if (0 = length (triples))
+    return cbd_res;
+  foreach (any triple in triples) do { dict_put (cbd_res, triple, 1); }
+  goto again;
+}
+;
+
+create procedure DB.DBA.SPARQL_DESC_DICT_SCBD_PHYSICAL (in node_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)
+{
+  declare cbd_res, objcbd_res, triples any;
+  cbd_res := DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (node_dict, consts, good_graphs, bad_graphs, storage_name, options);
+  objcbd_res := DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL (node_dict, consts, good_graphs, bad_graphs, storage_name, options);
+again:
+  triples := dict_destructive_list_rnd_keys (objcbd_res, 80000);
+  if (0 = length (triples))
+    return cbd_res;
+  foreach (any triple in triples) do { dict_put (cbd_res, triple, 1); }
+  goto again;
+}
+;
+
 --!AWK PUBLIC
 create procedure DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS (in dict any, in destructive integer := 0)
 {
@@ -7082,8 +8935,7 @@ create procedure DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS (in dict any, in destr
   declare S, P, O_DT, O_LANG varchar;
   declare O_IS_IRI, dt_twobyte, lang_twobyte integer;
   dict := dict_list_keys (dict, destructive);
-  result_names (S, P, O --, O_IS_IRI, O_DT, O_LANG
-  );
+  exec_result_names (vector (vector ('S', 182, 0, 4072, 1, 0, 1, 0, 0, 0, 0, 0), vector ('P', 182, 0, 4072, 1, 0, 1, 0, 0, 0, 0, 0), vector ('O', 125, 0, 2147483647, 1, 0, 0, 0, 0, 0, 0, 0)));
   len := length (dict);
   for (ctr := 0; ctr < len; ctr := ctr+1)
     {
@@ -7105,7 +8957,7 @@ create procedure DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS (in dict any, in destr
 --            (select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = lang_twobyte) ) end;
 --          result (S, P, O, 0, O_DT, O_LANG);
 --        }
-      else
+      else if (S is not null and P is not null and O is not null)
         result (S, P, O --, 0, __xsd_type (O, NULL), NULL
         );
     }
@@ -7300,332 +9152,26 @@ create function DB.DBA.RDF_DIST_SER_LONG (in val any) returns any
 }
 ;
 
---!AWK PUBLIC
-create function DB.DBA.RDF_DIST_DESER_LONG (in strg any) returns any
-{
-  if (not (isstring (strg)))
-    return strg;
-  if ('' = strg)
-    return strg;
-  if (strg[0] < 128)
-    return strg;
-  declare res any;
-  res := deserialize (strg);
-  if (__tag of vector <> __tag (res))
-    return res;
-  return rdf_box (res[0], res[1], res[2], 0, res[3]);
-}
-;
-
------
--- JSO procedures
-
-create function DB.DBA.JSO_MAKE_INHERITANCE (in jgraph varchar, in class varchar, in rootinst varchar, in destinst varchar, in dest_iid iri_id, inout noinherits any, inout inh_stack any)
-{
-  declare base_iid iri_id;
-  declare baseinst varchar;
-  -- dbg_obj_princ ('JSO_MAKE_INHERITANCE (', jgraph, class, rootinst, destinst, ')');
-  inh_stack := vector_concat (inh_stack, vector (destinst));
-  baseinst := null;
-  if (not exists (sparql
-      define input:storage ""
-      prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-      ask where {
-        graph ?:jgraph { ?:dest_iid rdf:type `iri(?:class)`
-          } } ) )
-    signal ('22023', 'JSO_MAKE_INHERITANCE has not found object <' || destinst || '> of type <' || class || '>');
-/* This fails. !!!TBD: fix sparql2sql.c to preserve data about equalities, fixed values and globals when triples are moved from gp to gp
-  for (sparql
-    define input:storage ""
-    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-    select ?srcinst
-    where {
-        graph ?:jgraph {
-            { {
-                ?destnode rdf:type `iri(?:class)` .
-                filter (?destnode = iri(?:destinst)) }
-              union
-              {
-                ?destnode rdf:type `iri(?:class)` .
-                ?destnode rdf:name `iri(?:destinst)` } } .
-            ?destnode virtrdf:inheritFrom ?srcinst .
-            ?srcinst rdf:type `iri(?:class)` .
-          } } ) do
-*/
-  for (sparql
-    define input:storage ""
-    define output:valmode "LONG"
-    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-    select ?src_iid
-    where {
-        graph ?:jgraph { ?:dest_iid virtrdf:inheritFrom ?src_iid } } ) do
-    {
-      declare srcinst varchar;
-      srcinst := id_to_iri_nosignal ("src_iid");
-      if (baseinst is null)
-        {
-          if (not exists (sparql
-              define input:storage ""
-              prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-              ask where { graph ?:jgraph { ?:"src_iid" rdf:type `iri(?:class)` } } ) )
-            signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || destinst || '> has wrong virtrdf:inheritFrom <' || srcinst || '> that is not an instance of type <' || class || '>');
-          base_iid := "src_iid";
-          baseinst := srcinst;
-        }
-      else if (baseinst <> srcinst)
-        signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || destinst || '> has multiple virtrdf:inheritFrom declarations: <' || baseinst || '> and <' || srcinst || '>');
-    }
-  if (position (baseinst, inh_stack))
-    signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || baseinst || '> is recursively inherited from itself');
--- This fails. !!!TBD: fix sparql2sql.c to preserve data about equalities, fixed values and globals when triples are moved from gp to gp
---  for (sparql
---    define input:storage ""
---    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
---    select ?pred
---    where {
---        graph ?:jgraph {
---            { {
---                ?destnode rdf:type `iri(?:class)` .
---                filter (?destnode = iri(?:destinst)) }
---              union
---              {
---                ?destnode rdf:type `iri(?:class)` .
---                ?destnode rdf:name `iri(?:destinst)` } } .
---            ?destnode virtrdf:noInherit ?pred .
---           } } ) do
-  for (sparql
-    define input:storage ""
-    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-    select ?pred
-    where {
-        graph ?:jgraph {
-            ?:dest_iid virtrdf:noInherit ?pred
-          } } ) do
-    {
-      if (baseinst is null)
-        signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || destinst || '> has set virtrdf:noInherit but has no virtrdf:inheritFrom');
-      dict_put (noinherits, "pred", destinst);
-    }
-  if (baseinst is null)
-    return;
-  for (select "pred_id", "predval"
-    from (sparql
-      define input:storage ""
-      define output:valmode "LONG"
-      prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-      select ?pred_id, ?predval
-      where {
-          graph ?:jgraph {
-              ?:base_iid ?pred_id ?predval
-            } } ) as "t00"
-      where not exists (sparql
-          define input:storage ""
-          prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-          ask where { graph ?:jgraph { ?:"t00"."pred_id" virtrdf:loadAs virtrdf:jsoTriple } } )
-      ) do
-    {
-      declare "pred" any;
-      "pred" := id_to_iri ("pred_id");
-      if (DB.DBA.RDF_LANGUAGE_OF_LONG ("predval", null) is not null)
-        signal ('22023', 'JSO_MAKE_INHERITANCE does not support language marks on objects');
-      if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type' = "pred")
-        ;
-      else if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#name' = "pred")
-        ;
-      else if ('http://www.openlinksw.com/schemas/virtrdf#inheritFrom' = "pred")
-        ;
-      else if ('http://www.openlinksw.com/schemas/virtrdf#noInherit' = "pred")
-        ;
-      else if (dict_get (noinherits, "pred", baseinst) = baseinst) -- trick here, instead of (dict_get (noinherits, pred, null) is null) that does not handle inheritance of booleans properly.
-        {
-          jso_set (class, rootinst, "pred", __rdf_sqlval_of_obj ("predval"), isiri_id ("predval"));
-          dict_put (noinherits, "pred", baseinst);
-        }
-    }
-  DB.DBA.JSO_MAKE_INHERITANCE (jgraph, class, rootinst, baseinst, base_iid, noinherits, inh_stack);
-}
-;
-
-create function DB.DBA.JSO_LOAD_INSTANCE (in jgraph varchar, in jinst varchar, in delete_first integer, in make_new integer, in jsubj_iid iri_id := 0)
-{
-  declare jinst_iid, jgraph_iid IRI_ID;
-  declare jclass varchar;
-  declare noinherits, inh_stack, "p" any;
-  -- dbg_obj_princ ('JSO_LOAD_INSTANCE (', jgraph, ')');
-  noinherits := dict_new ();
-  jinst_iid := iri_ensure (jinst);
-  jgraph_iid := iri_ensure (jgraph);
-  if (jsubj_iid is null)
-    {
-      jsubj_iid := (sparql
-        define input:storage ""
-        define output:valmode "LONG"
-        select ?s
-        where { graph ?:jgraph { ?s rdf:name ?:jinst } } );
-      if (jsubj_iid is null)
-        jsubj_iid := jinst_iid;
-    }
-  jclass := (sparql
-    define input:storage ""
-    select ?t
-    where {
-      graph ?:jgraph { ?:jsubj_iid rdf:type ?t } } );
-  if (jclass is null)
-    {
-      if (exists (sparql
-          define input:storage ""
-          select ?x
-            where { graph ?:jgraph {
-                { ?:jinst ?x ?o }
-                union
-                { ?x rdf:name ?ji .
-                  filter (str (?ji) = ?:jinst)
-                  } } } ) )
-        signal ('22023', 'JSO_LOAD_INSTANCE can not detect the type of <' || jinst || '>');
-      else
-        signal ('22023', 'JSO_LOAD_INSTANCE can not find an object <' || jinst || '>');
-    }
-  if (delete_first)
-    jso_delete (jclass, jinst, 1);
-  if (make_new)
-    jso_new (jclass, jinst);
-  for (select "p_id", coalesce ("o2", "o1") as "o"
-      from (sparql
-          define input:storage ""
-          define output:valmode "LONG"
-          select ?p_id ?o1 ?o2
-          where {
-          graph ?:jgraph {
-              { ?:jsubj_iid ?p_id ?o1 }  optional { ?o1 rdf:name ?o2 }
-            } }
-        ) as "t00"
-      where not exists (sparql
-          define input:storage ""
-          prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-          ask where { graph ?:jgraph_iid { ?:"t00"."p_id" virtrdf:loadAs virtrdf:jsoTriple } } ) option (quietcast)
-      ) do
-    {
-      "p" := id_to_iri ("p_id");
-      if (DB.DBA.RDF_LANGUAGE_OF_LONG ("o", null) is not null)
-        signal ('22023', 'JSO_LOAD_INSTANCE does not support language marks on objects');
-      if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type' = "p")
-        {
-	  if (__rdf_sqlval_of_obj ("o") <> jclass)
-            signal ('22023', 'JSO_LOAD_INSTANCE has found that the object <' || jinst || '> has multiple type declarations');
-	}
-      else if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#name' = "p")
-        ;
-      else if ('http://www.openlinksw.com/schemas/virtrdf#inheritFrom' = "p")
-        ;
-      else if ('http://www.openlinksw.com/schemas/virtrdf#noInherit' = "p")
-        ;
-      else
-        {
-          jso_set (jclass, jinst, "p", __rdf_sqlval_of_obj ("o"), isiri_id ("o"));
-          dict_put (noinherits, "p", jinst);
-        }
-    }
-  inh_stack := vector ();
-  DB.DBA.JSO_MAKE_INHERITANCE (jgraph, jclass, jinst, jinst, jsubj_iid, noinherits, inh_stack);
-}
-;
-
-create procedure DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (in jgraph varchar, out instances any)
-{
-  declare md, res, st, msg any;
-  st:= '00000';
-  exec (
-    'select DB.DBA.VECTOR_AGG (
-      vector (
-        id_to_iri ("jclass"),
-        id_to_iri ("jinst"),
-        coalesce ("s", "jinst") ) )
-    from ( sparql
-      define output:valmode "LONG"
-      define input:storage ""
-      select ?jclass ?jinst ?s
-      where {
-        graph ?? {
-          { ?jinst rdf:type ?jclass .
-            filter (!isBLANK (?jinst)) }
-          union
-          { ?s rdf:type ?jclass .
-            ?s rdf:name ?jinst .
-            filter (isBLANK (?s))
-            } } }
-      ) as inst',
-    st, msg, vector (jgraph), 1, md, res);
-  if (st <> '00000') signal (st, msg);
- 	instances := res[0][0];
-}
-;
-
-create function DB.DBA.JSO_LOAD_GRAPH (in jgraph varchar, in pin_now integer := 1)
-{
-  declare jgraph_iid IRI_ID;
-  declare instances, chk any;
-  -- dbg_obj_princ ('JSO_LOAD_GRAPH (', jgraph, ')');
-  jgraph_iid := iri_ensure (jgraph);
-  DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);
-/* Pass 1. Deleting all obsolete instances. */
-  foreach (any j in instances) do
-    jso_delete (j[0], j[1], 1);
-/* Pass 2. Creating all instances. */
-  foreach (any j in instances) do
-    jso_new (j[0], j[1]);
-/* Pass 3. Loading all instances, including loading inherited values. */
-  foreach (any j in instances) do
-    DB.DBA.JSO_LOAD_INSTANCE (jgraph, j[1], 0, 0, j[2]);
-/* Pass 4. Validation all instances. */
-  foreach (any j in instances) do
-    jso_validate (j[0], j[1], 1);
-/* Pass 5. Pin all instances. */
-  if (pin_now)
-    {
-      foreach (any j in instances) do
-        jso_pin (j[0], j[1]);
-    }
-/* Pass 6. Load all separate triples */
-  exec ('sparql
-      define input:storage ""
-      define sql:table-option "LOOP"
-      prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
-      select (bif:jso_triple_add (?s, ?p, ?o))
-      where { graph <' || id_to_iri (jgraph_iid) || '> { ?p virtrdf:loadAs virtrdf:jsoTriple . ?s ?p ?o } }');
-  chk := jso_triple_get_objs (
-    UNAME'http://www.openlinksw.com/schemas/virtrdf#loadAs',
-    UNAME'http://www.openlinksw.com/schemas/virtrdf#loadAs' );
-  if ((1 <> length (chk)) or (cast (chk[0] as varchar) <> 'http://www.openlinksw.com/schemas/virtrdf#jsoTriple'))
-    signal ('22023', 'JSO_LOAD_GRAPH has not found expected metadata in the graph');
-}
-;
-
-create function DB.DBA.JSO_PIN_GRAPH (in jgraph varchar)
-{
-  declare instances any;
-  DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);
-  foreach (any j in instances) do
-    jso_pin (j[0], j[1]);
-}
-;
-
---!AWK PUBLIC
-create function DB.DBA.JSO_SYS_GRAPH () returns varchar
-{
-  return 'http://www.openlinksw.com/schemas/virtrdf#';
-}
-;
-
--- same as DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH but no drop procedures
-create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO (in graphiri varchar := null)
+--!AWK PUBLIC
+create function DB.DBA.RDF_DIST_DESER_LONG (in strg any) returns any
 {
-  if (graphiri is null)
-    graphiri := DB.DBA.JSO_SYS_GRAPH();
-  DB.DBA.JSO_LOAD_GRAPH (graphiri, 0);
-  DB.DBA.JSO_PIN_GRAPH (graphiri);
+  if (not (isstring (strg)))
+    return strg;
+  if ('' = strg)
+    return strg;
+  if (strg[0] < 128)
+    return strg;
+  declare res any;
+  res := deserialize (strg);
+  if (__tag of vector <> __tag (res))
+    return res;
+  return rdf_box (res[0], res[1], res[2], 0, res[3]);
 }
 ;
 
+-----
+-- JSO procedures
+
 create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH (in graphiri varchar := null)
 {
   if (graphiri is null)
@@ -7635,8 +9181,13 @@ create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH (in graphiri varchar := null)
   DB.DBA.JSO_PIN_GRAPH (graphiri);
   for (select P_NAME from SYS_PROCEDURES
     where (
+      (P_NAME > 'DB.DBA.SPARQL_DESC_DICT') and
+      (P_NAME < 'DB.DBA.SPARQL_DESC_DICU') and
+      (
       (P_NAME like 'DB.DBA.SPARQL_DESC_DICT_QMV1_%') or
-      (P_NAME like 'DB.DBA.SPARQL_DESC_DICT_CBD_QMV1_%') )
+        (P_NAME like 'DB.DBA.SPARQL_DESC_DICT_CBD_QMV1_%') or
+        (P_NAME like 'DB.DBA.SPARQL_DESC_DICT_OBJCBD_QMV1_%') or
+        (P_NAME like 'DB.DBA.SPARQL_DESC_DICT_SCBD_QMV1_%') ) )
     for update) do
     {
       exec ('drop procedure DB.DBA."' || subseq (P_NAME, 7) || '"');
@@ -7981,7 +9532,7 @@ create procedure DB.DBA.RDF_AUDIT_METADATA (in fix_bugs integer := 0, in unlocke
             select ?s from <http://www.openlinksw.com/schemas/virtrdf#> where {
                 ?s rdf:type virtrdf:array-of-QuadMap } ) do
             {
-              if (DB.DBA.RDF_QM_GC_SUBTREE ("s", 1) is null)
+              if (DB.DBA.RDF_QM_GC_SUBTREE ("s", 3) is null)
                 result ('00000', 'Quad map array <' || "s" || '> is not used, removed');
             }
           for (sparql define input:storage ""
@@ -7997,7 +9548,7 @@ create procedure DB.DBA.RDF_AUDIT_METADATA (in fix_bugs integer := 0, in unlocke
             select ?s from <http://www.openlinksw.com/schemas/virtrdf#> where {
                 ?s rdf:type virtrdf:array-of-QuadMapFormat } ) do
             {
-              if (DB.DBA.RDF_QM_GC_SUBTREE ("s", 1) is null)
+              if (DB.DBA.RDF_QM_GC_SUBTREE ("s", 3) is null)
                 result ('00000', 'Quad map format array <' || "s" || '> is not used, removed');
             }
           for (sparql define input:storage ""
@@ -8005,7 +9556,7 @@ create procedure DB.DBA.RDF_AUDIT_METADATA (in fix_bugs integer := 0, in unlocke
             select ?s from <http://www.openlinksw.com/schemas/virtrdf#> where {
                 ?s rdf:type virtrdf:QuadMapFormat } ) do
             {
-              if (DB.DBA.RDF_QM_GC_SUBTREE ("s", 1) is null)
+              if (DB.DBA.RDF_QM_GC_SUBTREE ("s", 3) is null)
                 result ('00000', 'Quad map format <' || "s" || '> is not used, removed');
             }
         }
@@ -8154,7 +9705,7 @@ jso_load_failed:
 ;
 
 -----
--- Internal routines for SPARQL quad map syntax extensions
+-- Internal routines for SPARQL macro library and quad map syntax extensions
 
 create procedure DB.DBA.RDF_QM_CHANGE (in warninglist any)
 {
@@ -8199,7 +9750,10 @@ create procedure DB.DBA.RDF_QM_CHANGE_OPT (in cmdlist any)
         }
       http (')', exectext);
       STATE := '00000';
-      warnings := exec (string_output_string (exectext), STATE, MESSAGE, arglist, md, rs);
+      warnings := exec (string_output_string (exectext), STATE, MESSAGE, arglist, 10000, md, rs);
+      -- dbg_obj_princ ('md = ', md, ' rs = ', rs, ' warnings = ', warnings, STATE, MESSAGE);
+      if (__tag of vector <> __tag (warnings) and __tag of vector = __tag (rs))
+        warnings := case (length (rs)) when 0 then null else rs[0][0] end;
       -- dbg_obj_princ ('warnings = ', warnings);
       if (__tag of vector = __tag (warnings))
         {
@@ -8231,10 +9785,16 @@ create function DB.DBA.RDF_QM_APPLY_CHANGES (in deleted any, in affected any) re
   DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH ();
   len := length (deleted);
   for (ctr := 0; ctr < len; ctr := ctr + 2)
-    jso_delete (deleted [ctr], deleted [ctr+1], 1);
+    {
+      jso_delete (deleted [ctr], deleted [ctr+1], 1);
+      log_text ('jso_delete (?,?,1)', deleted [ctr], deleted [ctr+1]);
+    }
   len := length (affected);
   for (ctr := 0; ctr < len; ctr := ctr + 1)
-    jso_mark_affected (affected [ctr]);
+    {
+      jso_mark_affected (affected [ctr]);
+      log_text ('jso_mark_affected (?)', affected [ctr]);
+    }
   return vector (vector ('00000', 'Transaction committed, SPARQL compiler re-configured'));
 }
 ;
@@ -8322,15 +9882,8 @@ create procedure DB.DBA.RDF_QM_ASSERT_STORAGE_CONTAINS_MAPPING (in storage varch
 }
 ;
 
-create procedure DB.DBA.RDF_QM_ASSERT_STORAGE_IS_FLAGGED (in storage varchar)
-{
-  if (not DB.DBA.RDF_QM_GET_STORAGE_FLAG (storage))
-    signal ('22023', 'The quad storage "' || storage || '" is not flagged as being edited' );
-}
-;
-
-create function DB.DBA.RDF_QM_GC_SUBTREE (in seed any, in quick_gc_only integer := 0) returns integer
-{
+create function DB.DBA.RDF_QM_GC_SUBTREE (in seed any, in gc_flags integer := 0) returns integer
+{ -- gc_flags: 0x1 = quick gc only, 0x2 = override virtrdf:isGcResistantType
   declare graphiri varchar;
   declare seed_id, graphiri_id, subjs, objs any;
   declare o_to_s, s_to_o any;
@@ -8351,6 +9904,18 @@ create function DB.DBA.RDF_QM_GC_SUBTREE (in seed any, in quick_gc_only integer
       -- dbg_obj_princ ('DB.DBA.RDF_QM_GC_SUBTREE (', seed, ') found virtrdf:item subject ', "s");
       return "s";
     }
+  if (not bit_and (gc_flags, 2))
+    {
+      for (sparql define input:storage ""
+        define output:valmode "LONG"
+        select ?t ?n
+        from <http://www.openlinksw.com/schemas/virtrdf#>
+        where { ?:seed_id a ?t . ?t virtrdf:isGcResistantType ?n } ) do
+        {
+          -- dbg_obj_princ ('DB.DBA.RDF_QM_GC_SUBTREE (', seed, ') has gc-resistant type ', "t", ' resistance ', "n");
+          return "t";
+        }
+    }
   for (sparql define input:storage ""
     define output:valmode "LONG"
     select ?s
@@ -8358,7 +9923,7 @@ create function DB.DBA.RDF_QM_GC_SUBTREE (in seed any, in quick_gc_only integer
     where { ?s a [] ; ?p ?:seed_id } ) do
     {
       -- dbg_obj_princ ('DB.DBA.RDF_QM_GC_SUBTREE (', seed, ') found use case ', "s");
-      if (quick_gc_only)
+      if (bit_and (gc_flags, 1))
         return "s";
       goto do_full_gc;
     }
@@ -8464,7 +10029,7 @@ nop_nod: ;
 }
 ;
 
-create function DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (in mapname any, in quick_gc integer) returns any
+create function DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (in mapname any, in gc_flags integer) returns any
 {
   declare gc_res, submaps any;
   submaps := (select DB.DBA.VECTOR_AGG (s1."subm") from (
@@ -8473,13 +10038,13 @@ create function DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (in mapname any, in quick_gc in
           graph <http://www.openlinksw.com/schemas/virtrdf#> {
             `iri(?:mapname)` virtrdf:qmUserSubMaps ?submlist .
                     ?submlist ?p ?subm } } ) as s1 );
-  gc_res := DB.DBA.RDF_QM_GC_SUBTREE (mapname, quick_gc);
+  gc_res := DB.DBA.RDF_QM_GC_SUBTREE (mapname, gc_flags);
   if (gc_res is not null)
     return gc_res;
   commit work;
   foreach (any submapname in submaps) do
     {
-      DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (submapname, quick_gc);
+      DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (submapname, gc_flags);
     }
   return NULL;
 }
@@ -8519,6 +10084,8 @@ create function DB.DBA.RDF_QM_DROP_MAPPING (in storage varchar, in mapname any)
   DB.DBA.RDF_QM_ASSERT_JSO_TYPE (qmid, 'http://www.openlinksw.com/schemas/virtrdf#QuadMap');
   if (storage is null)
     {
+      declare report, storages any;
+      vectorbld_init (storages);
       for (sparql
         define input:storage ""
         select ?st where {
@@ -8529,11 +10096,23 @@ create function DB.DBA.RDF_QM_DROP_MAPPING (in storage varchar, in mapname any)
                   { ?st virtrdf:qsDefaultMap `iri(?:qmid)` }
               } } ) do
         {
-          -- dbg_obj_princ ('Will run DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE (', "st", ', NULL, ', qmid, ')');
-          DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE ("st", NULL, qmid);
+          DB.DBA.RDF_QM_ASSERT_STORAGE_FLAG ("st", 0);
+          vectorbld_acc (storages, cast ("st" as varchar));
+        }
+      vectorbld_final (storages);
+      vectorbld_init (report);
+      foreach (varchar alt_st in storages) do
+        {
+          -- dbg_obj_princ ('Will run DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE (', alt_st, ', NULL, ', qmid, ')');
+          DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE (alt_st, NULL, qmid);
+          vectorbld_acc (report, vector ('00000', 'Quad map <' || qmid || '> is no longer used in storage <' || alt_st || '>'));
         }
       DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (qmid, 0);
-      return vector (vector ('00000', 'Quad map <' || qmid || '> is deleted'));
+      vectorbld_acc (report, vector ('00000', 'Quad map <' || qmid || '> is deleted'));
+      vectorbld_final (report);
+      if (length (storages))
+        DB.DBA.RDF_QM_APPLY_CHANGES (null, storages);
+      return report;
     }
   else
     {
@@ -8563,7 +10142,7 @@ create function DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (in iritmpl varchar) returns
       host := registry_get ('URIQADefaultHost');
       if (not isstring (host))
         signal ('22023', 'Can not use ^{DynamicLocalFormat}^ in IRI template if there is no DefaultHost parameter in [URIQA] section of Virtuoso configuration file');
---      if (atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DynamicLocal'), '0')))
+--      if (atoi (coalesce (virtuoso_ini_item_value ('URIQA', 'DynamicLocal'), '0')))
 --        signal ('22023', 'Can not use ^{DynamicLocalFormat}^ in IRI template if DynamicLocal is not set to 1 in [URIQA] section of Virtuoso configuration file');
       if ((pos > 0) and (pos < 10) and strchr (subseq (iritmpl, 0, pos), ':') is not null)
         signal ('22023', 'Misplaced ^{DynamicLocalFormat}^: its expansion will contain protocol prefix but the template contains one already');
@@ -8604,9 +10183,10 @@ create function DB.DBA.RDF_QM_CBD_OF_IRI_CLASS (in classiri varchar) returns any
             optional { ?sffs ?sffp ?sffo . }
           } union {
             `iri(?:classiri)` virtrdf:qmfSuperFormats ?sups .
-            optional { ?sups ?supp ?supo . }
+            optional { ?sups ?supp ?supo . FILTER (str(?supo) != bif:concat (str(?:classiri), '-nullable')) }
           } } ) );
   descr := dict_list_keys (descr, 2);
+  rowvector_digit_sort (descr, 0, 1);
   rowvector_digit_sort (descr, 1, 1);
   return descr;
 }
@@ -8615,7 +10195,7 @@ create function DB.DBA.RDF_QM_CBD_OF_IRI_CLASS (in classiri varchar) returns any
 create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in iritmpl varchar, in arglist any, in options any, in origclassiri varchar := null) returns any
 {
   declare graphiri varchar;
-  declare sprintffsid, superformatsid varchar;
+  declare sprintffsid, superformatsid, nullablesuperformatid varchar;
   declare basetype, basetypeiri varchar;
   declare bij, deref integer;
   declare sffs, res any;
@@ -8623,6 +10203,8 @@ create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in i
   declare needs_arg_dtps integer;
   declare arg_dtps varchar;
   graphiri := DB.DBA.JSO_SYS_GRAPH ();
+  if (get_keyword_ucase ('DATATYPE', options) is not null or get_keyword_ucase ('LANG', options) is not null)
+    signal ('22023', 'IRI class <' || classiri || '> can not have DATATYPE or LANG options specified');
   bij := get_keyword_ucase ('BIJECTION', options, 0);
   deref := get_keyword_ucase ('DEREF', options, 0);
   sffs := get_keyword_ucase ('RETURNS', options);
@@ -8632,6 +10214,7 @@ create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in i
   iritmpl := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (iritmpl);
   sprintffsid := classiri || '--Sprintffs';
   superformatsid := classiri || '--SuperFormats';
+  nullablesuperformatid := null;
   res := vector ();
   foreach (any arg in arglist) do
     if (UNAME'in' <> arg[0])
@@ -8694,15 +10277,16 @@ create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in i
           arglist_copy := arglist;
           for (argctr := 0; (argctr < arglist_len); argctr := argctr + 1)
             arglist_copy[argctr][3] := 0;
+          nullablesuperformatid := classiri || '-nullable';
           res := vector_concat (res,
-            DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (classiri || '-nullable', iritmpl, arglist_copy, options, NULL) );
+            DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (nullablesuperformatid, iritmpl, arglist_copy, options, NULL) );
         }
       origclassiri := classiri;
     }
   if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, 'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat', 1))
     {
       declare side_s IRI_ID;
-      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);
+      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);
       if (side_s is not null)
         {
           declare tmpname varchar;
@@ -8714,6 +10298,8 @@ create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in i
           }
           old_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(classiri);
           new_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(tmpname);
+          -- dbg_obj_princ ('old descr is ', old_descr);
+          -- dbg_obj_princ ('new descr is ', new_descr);
           if (md5 (serialize (old_descr)) = md5 (serialize (new_descr)))
             {
               sparql define input:storage ""
@@ -8805,8 +10391,9 @@ create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in i
             virtrdf:qmfValRange-rvrRestrictions
               virtrdf:SPART_VARR_NOT_NULL .
           `iri(?:superformatsid)`
-            rdf:_1 `iri(bif:concat (?:classiri, "-nullable"))` };
+            rdf:_1 `iri(?:nullablesuperformatid)` };
     }
+  commit work;
   return vector_concat (res, vector_concat (res, vector (vector ('00000', 'IRI class <' || classiri || '> has been defined (inherited from rdfdf:' || basetype || ')'))));
 }
 ;
@@ -8827,12 +10414,15 @@ fheaders is, say,
   declare uriprintname, uriparsename varchar;
   declare arglist_len, isnotnull integer;
   declare graphiri varchar;
-  declare superformatsid varchar;
+  declare superformatsid, nullablesuperformatid varchar;
   declare bij, deref integer;
   declare sffs any;
   declare res any;
   graphiri := DB.DBA.JSO_SYS_GRAPH ();
   superformatsid := classiri || '--SuperFormats';
+  nullablesuperformatid := null;
+  if (get_keyword_ucase ('DATATYPE', options) is not null or get_keyword_ucase ('LANG', options) is not null)
+    signal ('22023', 'IRI class <' || classiri || '> can not have DATATYPE or LANG options specified');
   bij := get_keyword_ucase ('BIJECTION', options, 0);
   deref := get_keyword_ucase ('DEREF', options, 0);
   sffs := get_keyword_ucase ('RETURNS', options);
@@ -8871,7 +10461,7 @@ fheaders is, say,
   if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, 'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat', 1))
     {
       declare side_s IRI_ID;
-      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);
+      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);
       if (side_s is not null)
         {
           declare tmpname varchar;
@@ -8910,65 +10500,272 @@ fheaders is, say,
   prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
   insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
       `iri(?:classiri)`
-        rdf:type virtrdf:QuadMapFormat;
+        rdf:type virtrdf:QuadMapFormat;
+        virtrdf:inheritFrom `iri(?:basetypeiri)`;
+        virtrdf:noInherit virtrdf:qmfName ;
+        virtrdf:noInherit virtrdf:qmfCustomString1 ;
+        virtrdf:qmfName `bif:concat (?:basetype, '-user-', ?:origclassiri)` ;
+        virtrdf:qmfColumnCount ?:arglist_len ;
+        virtrdf:qmfCustomString1 ?:uriprintname ;
+        virtrdf:qmfSuperFormats `iri(?:superformatsid)` ;
+        virtrdf:qmfIsBijection ?:bij ;
+        virtrdf:qmfDerefFlags ?:deref ;
+        virtrdf:qmfValRange-rvrRestrictions
+          virtrdf:SPART_VARR_IS_REF ,
+          virtrdf:SPART_VARR_IS_IRI ,
+          virtrdf:SPART_VARR_IRI_CALC .
+      `iri(?:superformatsid)`
+        rdf:type virtrdf:array-of-QuadMapFormat };
+  if (isnotnull)
+    {
+      sparql define input:storage ""
+      prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+      insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
+          `iri(?:classiri)`
+            virtrdf:qmfValRange-rvrRestrictions
+              virtrdf:SPART_VARR_NOT_NULL };
+    }
+  if (sffs is not null)
+    {
+      declare sff_count, sff_ctr integer;
+      declare sffsid varchar;
+      sffsid := classiri || '--Sprintffs';
+      sff_count := length (sffs);
+      sparql define input:storage ""
+      prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+      delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }
+      from <http://www.openlinksw.com/schemas/virtrdf#>
+      where { ?s ?p ?o . filter (?s = iri(?:sffsid)) };
+      sparql define input:storage ""
+      prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+      insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
+          `iri(?:classiri)`
+            virtrdf:qmfValRange-rvrRestrictions
+              virtrdf:SPART_VARR_SPRINTFF ;
+            virtrdf:qmfValRange-rvrSprintffs `iri(?:sffsid)` ;
+            virtrdf:qmfValRange-rvrSprintffCount ?:sff_count .
+          `iri(?:sffsid)`
+            rdf:type virtrdf:array-of-string };
+      for (sff_ctr := 0; sff_ctr < sff_count; sff_ctr := sff_ctr + 1)
+        {
+          declare sff varchar;
+          sff := sffs [sff_ctr];
+          sff := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (sff);
+          sparql define input:storage ""
+          prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+          insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
+              `iri(?:sffsid)`
+                `iri (bif:sprintf ("%s%d", str (rdf:_), ?:sff_ctr+1))` ?:sff };
+        }
+    }
+  commit work;
+  return vector_concat (res, vector (vector ('00000', 'IRI class <' || classiri || '> has been defined (inherited from rdfdf:' || basetype || ') using ' || uriprintname)));
+}
+;
+
+create function DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT (in classiri varchar, in iritmpl varchar, in arglist any, in options any, in origclassiri varchar := null) returns any
+{
+  declare graphiri varchar;
+  declare sprintffsid, superformatsid, nullablesuperformatid varchar;
+  declare basetype, basetypeiri varchar;
+  declare const_dt, dt_expn, const_lang varchar;
+  declare bij, deref integer;
+  declare sffs, res any;
+  declare argctr, arglist_len, isnotnull, sff_ctr, sff_count, bij_sff_count integer;
+  declare needs_arg_dtps integer;
+  declare arg_dtps varchar;
+  graphiri := DB.DBA.JSO_SYS_GRAPH ();
+  const_dt := get_keyword_ucase ('DATATYPE', options);
+  const_lang := get_keyword_ucase ('LANG', options);
+  bij := get_keyword_ucase ('BIJECTION', options, 0);
+  deref := get_keyword_ucase ('DEREF', options, 0);
+  sffs := get_keyword_ucase ('RETURNS', options);
+  if (sffs is null)
+    sffs := vector (iritmpl); -- note that this is before macroexpand
+  sff_count := length (sffs);
+  iritmpl := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (iritmpl);
+  sprintffsid := classiri || '--Sprintffs';
+  superformatsid := classiri || '--SuperFormats';
+  nullablesuperformatid := null;
+  res := vector ();
+  foreach (any arg in arglist) do
+    if (UNAME'in' <> arg[0])
+      signal ('22023', 'Only "in" parameters are now supported in argument lists of class formats, "' || arg[0] || '" is not supported in CREATE IRI CLASS <' || classiri || '>' );
+  arglist_len := length (arglist);
+  isnotnull := 1;
+  needs_arg_dtps := 0;
+  arg_dtps := '';
+  if (arglist_len <> 1)
+    {
+      declare type_name varchar;
+      declare dtp integer;
+      if (arglist_len = 0)
+        basetype := 'zeropart-literal';
+      else
+        basetype := 'multipart-literal';
+      for (argctr := 0; (argctr < arglist_len) and isnotnull; argctr := argctr + 1)
+        {
+          if (not (coalesce (arglist[argctr][3], 0)))
+            isnotnull := 0;
+          type_name := lower (arglist[argctr][2]);
+          dtp := case (type_name)
+            when 'integer' then __tag of integer
+            when 'varchar' then __tag of varchar
+            when 'date' then __tag of date
+            when 'datetime' then __tag of datetime
+            when 'doubleprecision' then __tag of double precision
+            when 'numeric' then __tag of numeric
+            when 'nvarchar' then __tag of nvarchar
+            else 255 end;
+          if (type_name = 'nvarchar')
+            needs_arg_dtps := 1;
+          arg_dtps := arg_dtps || chr (bit_and (127, dtp));
+        }
+    }
+  else /* arglist is 1 item long */
+    {
+      basetype := lower (arglist[0][2]);
+      if (not (basetype in ('integer', 'varchar', 'date', 'datetime', 'doubleprecision', 'numeric', 'nvarchar')))
+        signal ('22023', 'The datatype "' || basetype || '" is not supported in CREATE LITERAL CLASS <' || classiri || '>' );
+      basetype := 'sql-' || basetype || '-literal';
+      if (not (coalesce (arglist[0][3], 0)))
+        isnotnull := 0;
+      if (basetype = 'nvarchar')
+        {
+          needs_arg_dtps := 1;
+          arg_dtps := chr (bit_and (127, __tag of nvarchar));
+        }
+    }
+  if (not isnotnull)
+    basetype := basetype || '-nullable';
+  basetypeiri := 'http://www.openlinksw.com/virtrdf-data-formats#' || basetype;
+  if (const_dt is not null)
+    dt_expn := ' ' || WS.WS.STR_SQL_APOS (const_dt);
+  else
+    dt_expn := NULL;
+  if (origclassiri is null)
+    {
+      if (isnotnull and (arglist_len > 0))
+        {
+          declare arglist_copy any;
+          if (classiri like '%-nullable')
+            signal ('22023', 'The name of non-nullable literal class in CREATE LITERAL CLASS <' || classiri || '> is misleading' );
+          arglist_copy := arglist;
+          for (argctr := 0; (argctr < arglist_len); argctr := argctr + 1)
+            arglist_copy[argctr][3] := 0;
+          nullablesuperformatid := classiri || '-nullable';
+          res := vector_concat (res,
+            DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (nullablesuperformatid, iritmpl, arglist_copy, options, NULL) );
+        }
+      origclassiri := classiri;
+    }
+  if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, 'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat', 1))
+    {
+      declare side_s IRI_ID;
+      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);
+      if (side_s is not null)
+        {
+          declare tmpname varchar;
+          declare old_descr, new_descr any;
+          tmpname := uuid();
+          { declare exit handler for sqlstate '*' {
+              signal ('22023', 'Can not change literal class <' || classiri || '> because it is used by other quad map objects, e.g., <' || id_to_iri_nosignal (side_s) || '>; moreover, the new declaration may be invalid.'); };
+            DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT (tmpname, iritmpl, arglist, options, classiri);
+          }
+          old_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(classiri);
+          new_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(tmpname);
+          if (md5 (serialize (old_descr)) = md5 (serialize (new_descr)))
+            {
+              sparql define input:storage ""
+              delete from graph <http://www.openlinksw.com/schemas/virtrdf#>  { `iri(?:tmpname)` ?p ?o }
+              where { `iri(?:tmpname)` ?p ?o };
+              return vector (vector ('00000', 'Previous definition of literal class <' || classiri || '> is identical to the new one, not touched'));
+            }
+          signal ('22023', 'Can not change IRI class <' || classiri || '> because it is used by other quad map objects, e.g., <' || id_to_iri_nosignal (side_s) || '>');
+        }
+      res := vector_concat (res, vector (vector ('00000', 'Previous definition of IRI class <' || classiri || '> has been dropped')));
+    }
+  else
+    res := vector ();
+  if (bij)
+    {
+      if (__sprintff_is_proven_unparseable (iritmpl))
+        signal ('22023', 'Literal class <' || classiri || '> has OPTION (BIJECTION) but its format string can not be unambiguously parsed by sprintf_inverse()');
+    }
+  else
+    {
+      if (__sprintff_is_proven_bijection (iritmpl))
+        bij := 1;
+    }
+  bij_sff_count := 0;
+  sparql define input:storage ""
+  prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+  delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }
+  from <http://www.openlinksw.com/schemas/virtrdf#>
+  where { ?s ?p ?o . filter (?s = iri(?:sprintffsid)) };
+  for (sff_ctr := 0; sff_ctr < sff_count; sff_ctr := sff_ctr + 1)
+    {
+      declare sff varchar;
+      sff := sffs [sff_ctr];
+      sff := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (sff);
+      if ((not bij) and __sprintff_is_proven_bijection (sff))
+        bij_sff_count := bij_sff_count + 1;
+      sparql define input:storage ""
+      prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+      insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
+          `iri(?:sprintffsid)`
+            `iri (bif:sprintf ("%s%d", str (rdf:_), ?:sff_ctr+1))` ?:sff };
+    }
+  if ((not bij) and (bij_sff_count = sff_count) and (bij_sff_count > 0))
+    bij := 1;
+  if (not needs_arg_dtps)
+    arg_dtps := NULL;
+  sparql define input:storage ""
+  prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+  delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }
+  from <http://www.openlinksw.com/schemas/virtrdf#>
+  where { ?s ?p ?o . filter (?s = iri(?:classiri)) };
+  sparql define input:storage ""
+  prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+  delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }
+  from <http://www.openlinksw.com/schemas/virtrdf#>
+  where { ?s ?p ?o . filter (?s = iri(?:superformatsid)) };
+  sparql define input:storage ""
+  prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+  insert in graph <http://www.openlinksw.com/schemas/virtrdf#>
+    {
+      `iri(?:classiri)`
+        rdf:type virtrdf:QuadMapFormat ;
         virtrdf:inheritFrom `iri(?:basetypeiri)`;
         virtrdf:noInherit virtrdf:qmfName ;
         virtrdf:noInherit virtrdf:qmfCustomString1 ;
         virtrdf:qmfName `bif:concat (?:basetype, '-user-', ?:origclassiri)` ;
+        virtrdf:qmfCustomString1 ?:iritmpl ;
+        virtrdf:qmfDatatypeOfShortTmpl ?:dt_expn ;
         virtrdf:qmfColumnCount ?:arglist_len ;
-        virtrdf:qmfCustomString1 ?:uriprintname ;
         virtrdf:qmfSuperFormats `iri(?:superformatsid)` ;
         virtrdf:qmfIsBijection ?:bij ;
         virtrdf:qmfDerefFlags ?:deref ;
-        virtrdf:qmfValRange-rvrRestrictions
-          virtrdf:SPART_VARR_IS_REF ,
-          virtrdf:SPART_VARR_IS_IRI ,
-          virtrdf:SPART_VARR_IRI_CALC .
+        virtrdf:qmfArgDtps ?:arg_dtps ;
+        virtrdf:qmfValRange-rvrRestrictions virtrdf:SPART_VARR_IS_LIT ;
+        virtrdf:qmfValRange-rvrDatatype ?:const_dt ;
+        virtrdf:qmfValRange-rvrLanguage ?:const_lang ;
+        virtrdf:qmfValRange-rvrSprintffs `iri(?:sprintffsid)` ;
+        virtrdf:qmfValRange-rvrSprintffCount ?:sff_count .
+      `iri(?:sprintffsid)`
+        rdf:type virtrdf:array-of-string .
       `iri(?:superformatsid)`
         rdf:type virtrdf:array-of-QuadMapFormat };
-  if (isnotnull)
-    {
-      sparql define input:storage ""
-      prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
-      insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
-          `iri(?:classiri)`
-            virtrdf:qmfValRange-rvrRestrictions
-              virtrdf:SPART_VARR_NOT_NULL };
-    }
-  if (sffs is not null)
+  if (const_dt is not null)
     {
-      declare sff_count, sff_ctr integer;
-      declare sffsid varchar;
-      sffsid := classiri || '--Sprintffs';
-      sff_count := length (sffs);
-      sparql define input:storage ""
-      prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
-      delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }
-      from <http://www.openlinksw.com/schemas/virtrdf#>
-      where { ?s ?p ?o . filter (?s = iri(?:sffsid)) };
       sparql define input:storage ""
       prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
       insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
           `iri(?:classiri)`
-            virtrdf:qmfValRange-rvrRestrictions
-              virtrdf:SPART_VARR_SPRINTFF ;
-            virtrdf:qmfValRange-rvrSprintffs `iri(?:sffsid)` ;
-            virtrdf:qmfValRange-rvrSprintffCount ?:sff_count .
-          `iri(?:sffsid)`
-            rdf:type virtrdf:array-of-string };
-      for (sff_ctr := 0; sff_ctr < sff_count; sff_ctr := sff_ctr + 1)
-        {
-          declare sff varchar;
-          sff := sffs [sff_ctr];
-          sff := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (sff);
-          sparql define input:storage ""
-          prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
-          insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
-              `iri(?:sffsid)`
-                `iri (bif:sprintf ("%s%d", str (rdf:_), ?:sff_ctr+1))` ?:sff };
-        }
+            virtrdf:qmfValRange-rvrRestrictions virtrdf:SPART_VARR_TYPED };
     }
-  return vector_concat (res, vector (vector ('00000', 'IRI class <' || classiri || '> has been defined (inherited from rdfdf:' || basetype || ') using ' || uriprintname)));
+  commit work;
+  return vector_concat (res, vector_concat (res, vector (vector ('00000', 'Literal class <' || classiri || '> has been defined (inherited from rdfdf:' || basetype || ')'))));
 }
 ;
 
@@ -8980,11 +10777,12 @@ fheaders is identical to DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS
   declare uriprint any;
   declare uriprintname, uriparsename varchar;
   declare arglist_len integer;
-  declare superformatsid varchar;
+  declare superformatsid, nullablesuperformatid varchar;
   declare res any;
   declare const_dt, dt_expn, const_lang varchar;
   declare bij, deref integer;
   superformatsid := classiri || '--SuperFormats';
+  nullablesuperformatid := null;
   const_dt := get_keyword_ucase ('DATATYPE', options);
   const_lang := get_keyword_ucase ('LANG', options);
   bij := get_keyword_ucase ('BIJECTION', options, 0);
@@ -9022,7 +10820,7 @@ fheaders is identical to DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS
   if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, 'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat', 1))
     {
       declare side_s IRI_ID;
-      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);
+      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);
       if (side_s is not null)
         {
           declare tmpname varchar;
@@ -9085,6 +10883,7 @@ fheaders is identical to DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS
           `iri(?:classiri)`
             virtrdf:qmfValRange-rvrRestrictions virtrdf:SPART_VARR_TYPED };
     }
+  commit work;
   return vector_concat (res, vector (vector ('00000', 'LITERAL class <' || classiri || '> has been defined (inherited from rdfdf:' || basetype || ') using ' || uriprintname)));
 }
 ;
@@ -9239,6 +11038,7 @@ create function DB.DBA.RDF_QM_DEFINE_SUBCLASS (in subclassiri varchar, in superc
   prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
   insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
       `iri(?:subclassiri)` virtrdf:isSubclassOf `iri(?:superclassiri)` };
+  commit work;
   return vector (vector ('00000', 'IRI class <' || subclassiri || '> is now known as a subclass of <' || superclassiri || '>'));
 }
 ;
@@ -9256,10 +11056,11 @@ create function DB.DBA.RDF_QM_DROP_CLASS (in classiri varchar, in silent integer
   if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, 'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat', 1))
     {
       declare side_s IRI_ID;
-      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);
+      side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);
       if (side_s is not null)
         signal ('22023', 'Can not drop class <' || classiri || '> because it is used by other quad map objects, e.g., <' || id_to_iri_nosignal (side_s) || '>');
     }
+  commit work;
   return vector (vector ('00000', 'Previous definition of class <' || classiri || '> has been dropped'));
 }
 ;
@@ -9282,6 +11083,7 @@ create function DB.DBA.RDF_QM_DROP_QUAD_STORAGE (in storage varchar, in silent i
       `iri(?:storage)` ?p ?o
     }
   where { graph ?:graphiri { `iri(?:storage)` ?p ?o } };
+  commit work;
   return vector (vector ('00000', 'Quad storage <' || storage || '> is removed from the quad mapping schema'));
 }
 ;
@@ -9310,6 +11112,7 @@ create function DB.DBA.RDF_QM_DEFINE_QUAD_STORAGE (in storage varchar) returns a
         virtrdf:qsUserMaps `iri(?:qsusermaps)` .
       `iri(?:qsusermaps)`
         rdf:type virtrdf:array-of-QuadMap };
+  commit work;
   return vector (vector ('00000', 'A new empty quad storage <' || storage || '> is added to the quad mapping schema'));
 }
 ;
@@ -9323,6 +11126,7 @@ create function DB.DBA.RDF_QM_BEGIN_ALTER_QUAD_STORAGE (in storage varchar) retu
   prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
   insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
       `iri(?:storage)` virtrdf:qsAlterInProgress `bif:now NIL` };
+  commit work;
   return vector (vector ('00000', 'Quad storage <' || storage || '> is flagged as being edited'));
 }
 ;
@@ -9338,6 +11142,7 @@ create function DB.DBA.RDF_QM_END_ALTER_QUAD_STORAGE (in storage varchar) return
       `iri(?:storage)` virtrdf:qsAlterInProgress ?dtstart }
   where { graph ?:graphiri {
           `iri(?:storage)` virtrdf:qsAlterInProgress ?dtstart } };
+  commit work;
   return vector (vector ('00000', 'Quad storage <' || storage || '> is unflagged and can be edited by other transactions'));
 }
 ;
@@ -9839,7 +11644,7 @@ create function DB.DBA.RDF_QM_DEFINE_MAPPING (in storage varchar,
       qm_empty := NULL;
       if (tablename is null)
         {
-          tablename := 'DB.DBA.SYS_FAKE_1';
+          tablename := 'DB.DBA.SYS_IDONLY_ONE';
           if (0 < length (conds))
             signal ('22023', 'Quad Mapping <' || qmid || '> has four constants and no one quad map value; it does not access tables so it can not have WHERE conditions');
         }
@@ -9946,10 +11751,12 @@ create function DB.DBA.RDF_QM_DEFINE_MAPPING (in storage varchar,
             `iri (bif:sprintf ("%s%d", str (rdf:_), ?:condctr+1))` ?:sqlcond };
     }
   DB.DBA.RDF_ADD_qmAliasesKeyrefdByQuad (qmid);
+  commit work;
   if (qm_is_default is not null)
     DB.DBA.RDF_QM_SET_DEFAULT_MAPPING (storage, qmid);
   else
     DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE (storage, qmparentid, qmid, qm_order);
+  commit work;
   return vector (vector ('00000', 'Quad map <' || qmid || '> has been created and added to the <' || storage || '>'));
 }
 ;
@@ -9993,6 +11800,7 @@ create function DB.DBA.RDF_QM_ATTACH_MAPPING (in storage varchar, in source varc
     DB.DBA.RDF_QM_SET_DEFAULT_MAPPING (storage, qmid);
   else
     DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE (storage, NULL, qmid, NULL /* !!!TBD: place real value instead of constant NULL */);
+  commit work;
   return vector (vector ('00000', 'Quad map <' || qmid || '> is added to the storage <' || storage || '>'));
 }
 ;
@@ -10180,6 +11988,187 @@ create procedure DB.DBA.RDF_QM_SET_DEFAULT_MAPPING (in storage varchar, in qmid
     }
   sparql define input:storage ""
   insert in graph <http://www.openlinksw.com/schemas/virtrdf#> { `iri(?:storage)` virtrdf:qsDefaultMap `iri(?:qmid)` . };
+  commit work;
+}
+;
+
+create function DB.DBA.RDF_SML_DROP (in smliri varchar, in silent integer, in compose_report integer := 1) returns any
+{
+  declare report, affected any;
+  report := '';
+  vectorbld_init (affected);
+  for (sparql define input:storage ""
+    select ?storageiri
+    from virtrdf:
+    where { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` } ) do
+    {
+      report := report || 'SPARQL macro library <' || smliri || '> has been detached from quad storage <' || "storageiri" || '>\n';
+      vectorbld_acc (affected, "storageiri");
+    }
+  vectorbld_final (affected);
+  sparql define input:storage ""
+  delete from virtrdf:
+    { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` }
+  from virtrdf:
+    where { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` };
+  commit work;
+  if (not exists (
+      sparql define input:storage ""
+      select 1 from virtrdf: where { `iri(?:smliri)` ?p ?o } ) )
+    {
+      DB.DBA.RDF_QM_APPLY_CHANGES (null, affected);
+      if (silent)
+        {
+          if (compose_report)
+            return report || 'SPARQL macro library <' || smliri || '> does not exists, nothing to delete';
+          else
+            return 0;
+        }
+      else
+        signal ('22023', 'SPARQL macro library <' || smliri || '> does not exists, nothing to delete');
+    }
+  DB.DBA.RDF_QM_ASSERT_JSO_TYPE (smliri, 'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary');
+  sparql define input:storage ""
+  delete from graph virtrdf: {
+      `iri(?:smliri)` ?p ?o }
+  from virtrdf:
+  where { `iri(?:smliri)` ?p ?o };
+  DB.DBA.RDF_QM_APPLY_CHANGES (vector ('http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary', smliri), affected);
+  if (compose_report)
+    return report || 'SPARQL macro library <' || smliri || '> has been deleted';
+  else
+    return 1;
+}
+;
+
+create function DB.DBA.RDF_SML_CREATE (in smliri varchar, in txt varchar) returns any
+{
+  declare stat, msg, smliri_copy varchar;
+  declare mdata, rset, affected any;
+  DB.DBA.RDF_QM_ASSERT_JSO_TYPE (smliri, 'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary', 1);
+  stat := '00000';
+  if (__tag (txt) = __tag of nvarchar)
+    txt := charset_recode (txt, '_WIDE_', 'UTF-8');
+  exec ('sparql define input:macro-lib-ignore-create "yes" define input:disable-storage-macro-lib "yes" ' || txt, stat, msg, null, 1, mdata, rset);
+  if (stat <> '00000')
+    signal (stat, msg);
+  if (length (rset))
+    signal ('SPAR0', 'Assertion failed: the validation query of macro library should return nothing');
+  vectorbld_init (affected);
+  for (sparql define input:storage ""
+    select ?storageiri
+    from virtrdf:
+    where { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` } ) do
+    {
+      vectorbld_acc (affected, "storageiri");
+    }
+  smliri_copy := smliri;
+  vectorbld_acc (affected, smliri_copy);
+  vectorbld_final (affected);
+  sparql define input:storage ""
+  delete from graph <http://www.openlinksw.com/schemas/virtrdf#> {
+      `iri(?:smliri)` ?p ?o }
+  from <http://www.openlinksw.com/schemas/virtrdf#>
+  where { `iri(?:smliri)` ?p ?o };
+  commit work;
+  sparql define input:storage ""
+  insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {
+      `iri(?:smliri)` a virtrdf:SparqlMacroLibrary ; virtrdf:smlSourceText ?:txt };
+  DB.DBA.RDF_QM_APPLY_CHANGES (null, affected);
+  return 'SPARQL macro library <' || smliri || '> has been (re)created';
+}
+;
+
+create function DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY (in storageiri varchar, in args any) returns any
+{
+  declare expected_smliri varchar;
+  declare old_ctr, expected_found integer;
+  declare silent, report any;
+  expected_smliri := get_keyword_ucase ('ID', args, NULL);
+  silent := get_keyword_ucase ('SILENT', args, 0);
+  expected_found := 0;
+  old_ctr := 0;
+  vectorbld_init (report);
+  for (sparql define input:storage ""
+    select ?oldsmliri
+    from virtrdf:
+    where { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri } ) do
+    {
+      if (expected_smliri is not null and cast (expected_smliri as nvarchar) <> cast ("oldsmliri" as nvarchar))
+        {
+          if (silent)
+            vectorbld_acc (report, vector ('00100', 'The SPARQL macro library to detach from <' || storageiri || '> is <' || expected_smliri || '> but actually attached one is <' || "oldsmliri" || '>, nothing to do'));
+          else
+            signal ('22023', 'The SPARQL macro library to detach from <' || storageiri || '> is <' || expected_smliri || '> but actually attached one is <' || "oldsmliri" || '>');
+        }
+      else
+        {
+          if (expected_smliri is not null)
+            expected_found := 1;
+          vectorbld_acc (report, vector ('00000', 'SPARQL macro library <' || "oldsmliri" || '> has been detached from quad storage <' || storageiri || '>'));
+        }
+      old_ctr := old_ctr + 1;
+    }
+  if (expected_smliri is not null)
+    {
+      sparql define input:storage ""
+      delete from virtrdf:
+        { ?storageiri virtrdf:qsMacroLibrary ?smliri }
+      from virtrdf:
+        where { ?storageiri virtrdf:qsMacroLibrary ?smliri };
+    }
+  else
+    {
+      sparql define input:storage ""
+      delete from virtrdf:
+        { ?storageiri virtrdf:qsMacroLibrary ?smliri }
+      from virtrdf:
+        where { ?storageiri virtrdf:qsMacroLibrary ?smliri };
+    }
+  commit work;
+  if (old_ctr > 1)
+    vectorbld_acc (report, vector ('00100', 'Note that there was a configuration error: more than one macro library was attached to the quad storage <' || storageiri || '>'));
+  else if (old_ctr = 0)
+    {
+      if (silent)
+        vectorbld_acc (report, vector ('00100', 'No one SPARQL macro library is attached to the quad storage <' || storageiri || '>, nothing to detach'));
+      else
+        signal ('22023', 'No one SPARQL macro library is attached to the quad storage <' || storageiri || '>, nothing to detach');
+    }
+  vectorbld_final (report);
+-- dbg_obj_princ ('DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY (', storageiri, args, ') returns ', report);
+  return report;
+}
+;
+
+create function DB.DBA.RDF_QM_ATTACH_MACRO_LIBRARY (in storageiri varchar, in args any) returns any
+{
+  declare smliri varchar;
+  smliri := get_keyword_ucase ('ID', args, NULL);
+  DB.DBA.RDF_QM_ASSERT_JSO_TYPE (storageiri, 'http://www.openlinksw.com/schemas/virtrdf#QuadStorage');
+  DB.DBA.RDF_QM_ASSERT_JSO_TYPE (smliri, 'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary');
+  declare report any;
+  vectorbld_init (report);
+  for (sparql define input:storage ""
+    select ?oldsmliri
+    from virtrdf:
+    where { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri } ) do
+    {
+      vectorbld_acc (report, vector ('00000', 'SPARQL macro library <' || "oldsmliri" || '> has been detached from quad storage <' || storageiri || '>'));
+    }
+  sparql define input:storage ""
+  delete from virtrdf:
+    { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri }
+  from virtrdf:
+    where { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri };
+  commit work;
+  sparql define input:storage ""
+  prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>
+  insert in graph virtrdf: {
+      `iri(?:storageiri)` virtrdf:qsMacroLibrary `iri(?:smliri)` };
+  vectorbld_acc (report, vector ('00000', 'SPARQL macro library <' || smliri || '> has been attached to quad storage <' || storageiri || '>'));
+  vectorbld_final (report);
+  return report;
 }
 ;
 
@@ -10254,6 +12243,7 @@ create procedure DB.DBA.RDF_UPGRADE_METADATA ()
     {
       DB.DBA.RDF_UPGRADE_QUAD_MAP ("qm_iri");
     }
+  commit work;
 }
 ;
 
@@ -10347,8 +12337,8 @@ create procedure DB.DBA.TTLP_EV_TRIPLE_L_W (
 	      if (256 = rdf_box_type (parsed))
 		db..rdf_geo_add (parsed);
 	      else
-              rdf_box_set_type (parsed,
-                DB.DBA.RDF_TWOBYTE_OF_DATATYPE (iri_to_id (o_type)));
+                rdf_box_set_type (parsed,
+                  DB.DBA.RDF_TWOBYTE_OF_DATATYPE (iri_to_id (o_type)));
               parsed := DB.DBA.RDF_OBJ_ADD (257, parsed, 257, ro_id_dict);
               -- dbg_obj_princ ('rdf_box_type is set to ', rdf_box_type (parsed));
             }
@@ -10564,7 +12554,7 @@ create function DB.DBA.TTLP_MT (in strg varchar, in base varchar, in graph varch
     }
   if (1 <> sys_stat ('cl_run_local_only'))
     {
-      DB.DBA.TTLP_CL (strg, base, graph, flags);
+      DB.DBA.TTLP_CL (strg, 0, base, graph, flags);
       return;
     }
   if (126 = __tag (strg))
@@ -10609,7 +12599,7 @@ create function DB.DBA.TTLP_MT_LOCAL_FILE (in filename varchar, in base varchar,
     }
   if (1 <> sys_stat ('cl_run_local_only'))
     {
-      DB.DBA.TTLP_CL_LOCAL_FILE (filename, base, graph, flags);
+      DB.DBA.TTLP_CL (filename, 1, base, graph, flags);
       return;
     }
   app_env := vector (
@@ -10652,7 +12642,7 @@ create function DB.DBA.RDF_LOAD_RDFXML_MT (in strg varchar, in base varchar, in
 	log_mode := log_mode + 2;
     }
   if (1 <> sys_stat ('cl_run_local_only'))
-    return rdf_load_rdfxml_cl (strg, base, graph);
+    return DB.DBA.RDF_LOAD_RDFXML_CL (strg, base, graph, 0);
   if (__rdf_obj_ft_rule_count_in_graph (iri_to_id (graph)))
     ro_id_dict := dict_new ();
   else
@@ -11274,6 +13264,7 @@ create procedure DB.DBA.RDF_GRAPH_GROUP_CREATE_MEMONLY (in group_iri varchar, in
   dict_put (__rdf_graph_id2iri_dict(), group_iid, __uname(group_iri));
   dict_put (__rdf_graph_group_dict(), group_iid, vector ());
   jso_mark_affected (group_iri);
+  __rdf_cli_mark_qr_to_recompile ();
 }
 ;
 
@@ -11314,6 +13305,7 @@ create procedure DB.DBA.RDF_GRAPH_GROUP_DROP_MEMONLY (in group_iri varchar, in g
       foreach (IRI_ID iid in privates) do
         jso_mark_affected (id_to_iri (iid));
     }
+  __rdf_cli_mark_qr_to_recompile ();
 }
 ;
 
@@ -11651,7 +13643,7 @@ create procedure DB.DBA.RDF_DEFAULT_USER_PERMS_SET (in uname varchar, in perms i
     affected_jso := vector (uname);
   commit work;
   DB.DBA.SECURITY_CL_EXEC_AND_LOG ('DB.DBA.RDF_DEFAULT_USER_PERMS_SET_MEMONLY (?,?,?,?,?,?)', vector (uname, uid, perms, special_iid, set_private, affected_jso));
-    }
+}
 ;
 
 create procedure DB.DBA.RDF_GRAPH_USER_PERMS_SET_MEMONLY (in graph_iri varchar, in graph_iid IRI_ID, in uid integer, in perms integer)
@@ -11694,7 +13686,7 @@ create procedure DB.DBA.RDF_GRAPH_USER_PERMS_SET (in graph_iri varchar, in uname
     signal ('RDF99', sprintf ('Default permissions of user "%s" on RDF quad store are broader than new permissions on specific graph <%s>', uname, graph_iri));
   if (uname = 'nobody')
     {
-    jso_mark_affected (graph_iri);
+      jso_mark_affected (graph_iri);
       if (isstring (registry_get ('DB.DBA.RDF_REPL')) and not (bit_and (perms, 1)) and
         exists (select top 1 1 from DB.DBA.RDF_GRAPH_GROUP_MEMBER
           where RGGM_GROUP_IID = iri_to_id (UNAME'http://www.openlinksw.com/schemas/virtrdf#rdf_repl_graph_group') and RGGM_MEMBER_IID = graph_iid) )
@@ -11721,6 +13713,38 @@ create procedure DB.DBA.RDF_GRAPH_USER_PERMS_SET (in graph_iri varchar, in uname
 }
 ;
 
+create procedure DB.DBA.RDF_GRAPH_USER_PERMS_DEL_MEMONLY (in graph_iri varchar, in graph_iid IRI_ID, in uid integer)
+{
+  graph_iri := cast (graph_iri as varchar);
+  dict_put (__rdf_graph_iri2id_dict(), __uname(graph_iri), graph_iid);
+  dict_put (__rdf_graph_id2iri_dict(), graph_iid, __uname(graph_iri));
+  if (uid = http_nobody_uid())
+    dict_remove (__rdf_graph_public_perms_dict(), graph_iid);
+  else
+    __rdf_graph_specific_perms_of_user (graph_iid, uid, -1);
+  jso_mark_affected (graph_iri);
+}
+;
+
+create procedure DB.DBA.RDF_GRAPH_USER_PERMS_DEL (in graph_iri varchar, in uname varchar)
+{
+  declare graph_iid IRI_ID;
+  declare uid integer;
+  declare special_iid IRI_ID;
+  -- dbg_obj_princ ('gs_hist.sql'); string_to_file ('gs_hist.sql', sprintf ('-- DB.DBA.RDF_GRAPH_USER_PERMS_SET (''%s'', ''%s'', %d);\n', graph_iri, uname, perms), -1);
+  graph_iid := iri_to_id (graph_iri);
+  uid := ((select U_ID from DB.DBA.SYS_USERS where U_NAME = uname and (U_NAME='nobody' or (U_SQL_ENABLE and not U_ACCOUNT_DISABLED))));
+  set isolation = 'serializable';
+  commit work;
+  if (uid is null)
+    signal ('RDF99', sprintf ('No active SQL user "%s" found, can not change its permissions on graph <%s>', uname, graph_iri));
+  delete from DB.DBA.RDF_GRAPH_USER where RGU_GRAPH_IID = graph_iid and RGU_USER_ID = uid;
+  -- dbg_obj_princ ('gs_hist.sql'); string_to_file ('gs_hist.sql', sprintf ('delete from DB.DBA.RDF_GRAPH_USER where RGU_GRAPH_IID = %s and RGU_USER_ID = %d;\n', cast (graph_iid as varchar), uid), -1);
+  commit work;
+  DB.DBA.SECURITY_CL_EXEC_AND_LOG ('DB.DBA.RDF_GRAPH_USER_PERMS_DEL_MEMONLY (?,?,?)', vector (graph_iri, graph_iid, uid));
+}
+;
+
 create function DB.DBA.RDF_GRAPH_GROUP_LIST_GET (in group_iri any, in extra_graphs any, in uid any, in gs_app_cbk varchar, in gs_app_uid varchar, in req_perms integer) returns any
 {
   declare group_iid IRI_ID;
@@ -11793,7 +13817,6 @@ create function DB.DBA.RDF_GRAPH_GROUP_LIST_GET (in group_iri any, in extra_grap
       else
         full_list := vector ();
     }
-
   if (bit_and (common_perms, req_perms) = req_perms)
     {
       declare ctr integer;
@@ -11848,7 +13871,7 @@ create procedure DB.DBA.SPARQL_RELOAD_QM_GRAPH ()
 {
   declare ver varchar;
   declare inx int;
-  ver := '2010-08-29 0001v6g';
+  ver := '2012-01-26 0002v6g';
   if (USER <> 'dba')
     signal ('RDFXX', 'Only DBA can reload quad map metadata');
   if (not exists (sparql define input:storage "" ask where {
@@ -11964,8 +13987,8 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant all on DB.DBA.SYS_SPARQL_HOST to SPARQL_UPDATE',
     'grant select on DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH to SPARQL_SELECT',
     'grant all on DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH to SPARQL_UPDATE',
-    'grant select on DB.DBA.SYS_FAKE_0 to SPARQL_SELECT',
-    'grant select on DB.DBA.SYS_FAKE_1 to SPARQL_SELECT',
+    'grant select on DB.DBA.SYS_IDONLY_EMPTY to SPARQL_SELECT',
+    'grant select on DB.DBA.SYS_IDONLY_ONE to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_GLOBAL_RESET to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_MAKE_IID_OF_QNAME to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE to SPARQL_SELECT',
@@ -12007,6 +14030,8 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant execute on DB.DBA.RDF_STRSQLVAL_OF_LONG to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_WIDESTRSQLVAL_OF_LONG to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_LONG_OF_SQLVAL to SPARQL_SELECT',
+    'grant execute on DB.DBA.rdf_strdt_impl to SPARQL_SELECT',
+    'grant execute on DB.DBA.rdf_strlang_impl to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_QUAD_URI to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_QUAD_URI_L to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_QUAD_URI_L_TYPED to SPARQL_UPDATE',
@@ -12026,17 +14051,25 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant execute on DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TTL2HASH to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_LOAD_RDFXML to SPARQL_UPDATE',
+    'grant execute on DB.DBA.RDF_RDFA11_FETCH_PROFILES to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_LOAD_RDFA to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION to SPARQL_UPDATE',
+    'grant execute on DB.DBA.RDF_LOAD_XHTML_MICRODATA to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_RDFXML_TO_DICT to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_LONG_TO_TTL to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_TTL to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_TRIPLES_TO_TRIG to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_NT to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_GRAPH_TO_TTL to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_TALIS_JSON to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_TRIPLES_TO_JSON_LD to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_CSV to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_TRIPLES_TO_HTML_UL to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_TRIPLES_TO_HTML_TR to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_TRIPLES_TO_ODATA_JSON to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_INIT to SPARQL_SELECT',
@@ -12063,6 +14096,9 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_LD to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_MICRODATA to SPARQL_SELECT',
+    'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_MICRODATA to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CSV to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDFA_XHTML to SPARQL_SELECT',
     'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML to SPARQL_SELECT',
@@ -12072,12 +14108,18 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant execute on DB.DBA.RDF_DELETE_TRIPLES_AGG to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_MODIFY_TRIPLES to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARQL_INSERT_DICT_CONTENT to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARQL_DELETE_DICT_CONTENT to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARQL_MODIFY_BY_DICT_CONTENTS to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARUL_ADD to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARUL_CLEAR to SPARQL_UPDATE',
-    'grant execute on DB.DBA.SPARUL_LOAD to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARUL_COPY to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARUL_CREATE to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARUL_DROP to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARUL_LOAD to SPARQL_UPDATE',
+    'grant execute on DB.DBA.SPARUL_MOVE to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARUL_RUN to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_DESC_AGG_INIT to SPARQL_SELECT',
@@ -12088,6 +14130,10 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant execute on DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_DESC_DICT_CBD to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL to SPARQL_SELECT',
+    'grant execute on DB.DBA.SPARQL_DESC_DICT_OBJCBD to SPARQL_SELECT',
+    'grant execute on DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL to SPARQL_SELECT',
+    'grant execute on DB.DBA.SPARQL_DESC_DICT_SCBD to SPARQL_SELECT',
+    'grant execute on DB.DBA.SPARQL_DESC_DICT_SCBD_PHYSICAL to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_CONSTRUCT_INIT to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_CONSTRUCT_ACC to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_CONSTRUCT_FIN to SPARQL_SELECT',
@@ -12109,9 +14155,9 @@ create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()
     'grant execute on DB.DBA.RDF_FORGET_HTTP_RESPONSE to SPARQL_UPDATE',
     'grant execute on DB.DBA.TTLP_EV_COMMIT to SPARQL_UPDATE',
     'grant execute on DB.DBA.RDF_PROC_COLS to "SPARQL"',
-    'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ACK to "SPARQL_SELECT"', -- DEPRECATED
-    'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT to "SPARQL_SELECT"', -- DEPRECATED
-    'grant execute on DB.DBA.RDF_GRAPH_GROUP_LIST_GET to "SPARQL_SELECT"' );
+    'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ACK to SPARQL_SELECT', -- DEPRECATED
+    'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT to SPARQL_SELECT', -- DEPRECATED
+    'grant execute on DB.DBA.RDF_GRAPH_GROUP_LIST_GET to SPARQL_SELECT' );
   foreach (varchar cmd in cmds) do
     {
       exec (cmd, state, msg);
@@ -12191,6 +14237,166 @@ check_new_style:
 }
 ;
 
+create procedure DB.DBA.RDF_QUAD_OUTLINE_ALL (in force integer := 0)
+{
+  declare c_main, c_pogs, c_op integer;
+  declare c_main_tmp, c_pogs_tmp, c_op_tmp integer;
+  declare c_main_fixed, c_pogs_fixed, c_op_fixed integer;
+  declare old_mode integer;
+  declare c_check char;
+
+  if ((registry_get ('__rb_id_only_for_plain_ro_obj') = '1') and not force)
+    return;
+  if (not exists (select top 1 1 from DB.DBA.RDF_QUAD))
+    {
+      registry_set ('__rb_id_only_for_plain_ro_obj', '1');
+      return;
+    }
+  log_message ('This database may contain RDF data that could cause indexing problems on previous versions of the server.');
+  log_message ('The content of the DB.DBA.RDF_QUAD table will be checked and an update may automatically be performed if');
+  log_message ('such data is found.');
+  log_message ('This check will take some time but is made only once.');
+
+  if (not exists (select top 1 1 from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only) where rdf_box_migrate_after_06_02_3129 (O)))
+    {
+      log_message ('No need to update DB.DBA.RDF_QUAD.');
+      registry_set ('__rb_id_only_for_plain_ro_obj', '1');
+      exec ('checkpoint');
+      return;
+    }
+
+  log_message ('');
+  log_message ('An update is required.');
+  c_check := coalesce (virtuoso_ini_item_value ('Parameters', 'AnalyzeFixQuadStore'), '0');
+  if (coalesce (virtuoso_ini_item_value ('Parameters', 'LiteMode'), '0') <> '0') c_check := '1';
+  if (c_check <> '1')
+    {
+	log_message ('');
+	log_message ('NOTICE: Before Virtuoso can continue fixing the DB.DBA.RDF_QUAD table and its indexes');
+ 	log_message ('        the DB Administrator should check make sure that:');
+	log_message ('');
+	log_message ('         * there is a recent backup of the database');
+	log_message ('         * there is enough free disk space available to complete this conversion');
+	log_message ('         * the database can be offline for the duration of this conversion');
+	log_message ('');
+	log_message ('        Since the update can take a considerable amount of time on large databases');
+	log_message ('        it is advisable to schedule this at an appropriate time.');
+	log_message ('');
+	log_message ('To continue the DBA must change the virtuoso.ini file and add the following flag:');
+	log_message ('');
+	log_message ('    [Parameters]');
+	log_message ('    AnalyzeFixQuadStore = 1');
+	log_message ('');
+	log_message ('For additional information please contact OpenLink Support <support at openlinksw.com>');
+	log_message ('This process will now exit.');
+	raw_exit();
+    }
+
+  log_message ('Please be patient.');
+  log_message ('The table DB.DBA.RDF_QUAD and two of its additional indexes will now be patched.');
+  log_message ('In case of an error during the operation, delete the transaction log before restarting the server.');
+  exec ('checkpoint');
+  declare exit handler for sqlstate '*'
+    {
+      log_message (sprintf ('Error %s: %s', __SQL_STATE, __SQL_MESSAGE));
+      log_message ('Do not forget to delete the transaction log before restarting the server.');
+      raw_exit ();
+    };
+
+
+  if (0 = sys_stat ('cl_run_local_only'))
+    {
+      cl_inx_recov (force);
+      return;
+    }
+
+  if (1 <> sys_stat ('cl_run_local_only'))
+    {
+      log_message ('Cluster must be online in order to perform upgrade');
+      return;
+    }
+
+  old_mode := log_enable (2, 1);
+  log_message ('Phase 1 of 9: Gathering statistics ...');
+  c_main := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD) option (no cluster));
+  c_pogs := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS) option (no cluster));
+  if (c_main <> c_pogs)
+    log_message ('* Existing indexes are damaged, will try to recover...');
+  c_op := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only) option (no cluster));
+  log_message (sprintf (' * Index sizes before the processing: %09d RDF_QUAD, %09d POGS, %09d OP', c_main, c_pogs, c_op));
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster) option (index RDF_QUAD_RECOV_TMP, no cluster);
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster) option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster) option (index RDF_QUAD_RECOV_TMP_OP, no cluster);
+
+  log_message ('Phase 2 of 9: Copying all quads to a temporary table ...');
+  insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster);
+  insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP_POGS option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster);
+  insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP_OP option (index_only, no cluster) (P1,O1) select P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only, no cluster);
+  if (c_main <> c_pogs) -- cluster should not do that
+    {
+      log_message ('* Recovering additional data from existing indexes');
+      if (c_main < c_pogs)
+        insert soft DB.DBA.RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS) option (no cluster);
+      if (c_pogs < c_main)
+        insert soft DB.DBA.RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD) option (no cluster);
+    }
+  c_op_tmp := (select count (1) from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only) option (no cluster));
+  log_message (sprintf ('* Index sizes of temporary table: %09d OP', c_op_tmp));
+  if (c_op_tmp < c_op)
+    log_message ('** Some data are lost or the corruption was strong before the processing.');
+
+  log_message ('Phase 3 of 9: Cleaning the quad storage ...');
+  delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster) option (index RDF_QUAD, no cluster);
+  delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster) option (index RDF_QUAD_POGS, no cluster);
+  delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only, no cluster) option (index RDF_QUAD_OP, no cluster);
+
+  log_message ('Phase 4 of 9: Refilling the quad storage from the temporary table...');
+  insert soft DB.DBA.RDF_QUAD index RDF_QUAD option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster);
+  insert soft DB.DBA.RDF_QUAD index RDF_QUAD_POGS option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);
+  insert soft DB.DBA.RDF_QUAD index RDF_QUAD_OP option (index_only, no cluster) (P,O) select P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster);
+
+  log_message ('Phase 5 of 9: Cleaning the temporary table ...');
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster) option (index RDF_QUAD_RECOV_TMP, no cluster);
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster) option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster) option (index RDF_QUAD_RECOV_TMP_OP, no cluster);
+
+  log_message ('Phase 6 of 9: Gathering statistics again ...');
+  c_main_fixed := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD) option (no cluster));
+  c_pogs_fixed := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS) option (no cluster));
+  c_op_fixed := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only) option (no cluster));
+  log_message (sprintf ('* Index sizes after the processing: %09d RDF_QUAD, %09d POGS, %09d OP', c_main_fixed, c_pogs_fixed, c_op_fixed));
+  if ((__min (c_main_fixed, c_pogs_fixed) < __max (c_main, c_pogs)) or (c_op_fixed < c_op))
+    log_message ('** Some data are lost or the corruption was strong before the processing.');
+
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD) where a.G=b.G and a.S=b.S and a.P=b.P and a.O=b.O);
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_POGS) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD_POGS) where a.G=b.G and a.S=b.S and a.P=b.P and a.O=b.O);
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_POGS) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD) where a.G=b.G and a.S=b.S and a.P=b.P and a.O=b.O);
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD_POGS) where a.G=b.G and a.S=b.S and a.P=b.P and a.O=b.O);
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_OP, index_only) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD_OP, index_only) where a.P=b.P and a.O=b.O);
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_OP, index_only) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD) where a.P=b.P and a.O=b.O);
+--select * from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select top 1 1 from DB.DBA.RDF_QUAD b table option (index RDF_QUAD_OP, index_only) where a.P=b.P and a.O=b.O);
+
+  log_message ('Phase 7 of 9: integrity check (completeness of index RDF_QUAD_POGS of DB.DBA.RDF_QUAD) ...');
+  if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index RDF_QUAD_POGS) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))
+    log_message ('** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.');
+
+  log_message ('Phase 8 of 9: integrity check (completeness of primary key of DB.DBA.RDF_QUAD) ...');
+  if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_POGS) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index primary key) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))
+    log_message ('** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.');
+
+  log_message ('Phase 9 of 9: final checkpoint...');
+  registry_set ('__rb_id_only_for_plain_ro_obj', '1');
+  exec ('checkpoint');
+  log_enable (old_mode, 1);
+  log_message ('Update complete.');
+}
+;
+
+--!AFTER
+DB.DBA.RDF_QUAD_OUTLINE_ALL ()
+;
+
+
 create procedure DB.DBA.RDF_QUAD_FT_UPGRADE ()
 {
   declare stat, msg varchar;
@@ -12225,9 +14431,12 @@ create procedure DB.DBA.RDF_QUAD_FT_UPGRADE ()
     from DB.DBA.RDF_GRAPH_USER where RGU_GRAPH_IID = #i8192 );
   fake := (select count (dict_put (__rdf_graph_public_perms_dict(), RGU_GRAPH_IID, RGU_PERMISSIONS))
     from DB.DBA.RDF_GRAPH_USER where RGU_USER_ID = http_nobody_uid () );
+  delete from DB.DBA.RDF_GRAPH_USER where not exists (select 1 from DB.DBA.SYS_USERS where RGU_USER_ID = U_ID);
+  if (row_count ())
+    log_message ('Non-existing users are removed from graph security list');
   fake := (select count (__rdf_graph_specific_perms_of_user (RGU_GRAPH_IID, RGU_USER_ID, RGU_PERMISSIONS))
     from DB.DBA.RDF_GRAPH_USER where RGU_USER_ID <> http_nobody_uid () and not (RGU_GRAPH_IID in (#i0, #i8192)) );
-  if (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'RecoveryMode'), '0') > '0')
+  if (coalesce (virtuoso_ini_item_value ('SPARQL', 'RecoveryMode'), '0') > '0')
     {
       log_message ('Switching to RecoveryMode as set in [SPARQL] section of the configuration.');
       log_message ('For safety, the use of SPARQL_UPDATE role is restricted.');
@@ -12260,8 +14469,8 @@ create procedure DB.DBA.RDF_QUAD_FT_UPGRADE ()
 
 final_qm_reload:
   DB.DBA.SPARQL_RELOAD_QM_GRAPH ();
-  insert soft rdf_datatype (rdt_iid, rdt_twobyte, rdt_qname) values
-    (iri_to_id ('http://www.openlinksw.com/schemas/virtrdf#Geometry'), 256, 'http://www.openlinksw.com/schemas/virtrdf#Geometry');
+  --VOS insert soft rdf_datatype (rdt_iid, rdt_twobyte, rdt_qname) values
+  --VOS (iri_to_id ('http://www.openlinksw.com/schemas/virtrdf#Geometry'), 256, 'http://www.openlinksw.com/schemas/virtrdf#Geometry');
 
   return;
 }
@@ -12334,9 +14543,9 @@ create function rdfs_load_schema (in ri_name varchar, in gn varchar := null) ret
   res := 0;
   if (gn is null)
     {
-      for (select rs_uri from sys_rdf_schema where rs_name=ri_name) do
+      for (select RS_URI from DB.DBA.SYS_RDF_SCHEMA where RS_NAME=ri_name) do
         {
-          from_text := from_text || sprintf (' from <%s>', rs_uri);
+          from_text := from_text || sprintf (' from <%s>', RS_URI);
         }
     }
   else
@@ -12354,19 +14563,19 @@ create function rdfs_load_schema (in ri_name varchar, in gn varchar := null) ret
       txt := sprintf ('sparql define output:valmode "LONG" define input:storage "" select ?s ?o %s where { ?s <%s> ?o . filter (!isLITERAL (?o)) }',
         from_text, id_to_iri (case (idx) when 4 then rdf_sas_iri () else rdf_owl_iri (idx) end) );
       exec (txt, null, null, vector (), 0, meta, null, cc);
-  while (0 = exec_next (cc, null, null, res))
-    {
+      while (0 = exec_next (cc, null, null, res))
+        {
           declare s, o any;
           s := res[0]; o := res[1];
           if (idx = 4)
-	{
-	  rdf_inf_dir (ri_name, s, o, 2);
-	  rdf_inf_dir (ri_name, s, o, 3);
+            {
+              rdf_inf_dir (ri_name, s, o, 2);
+              rdf_inf_dir (ri_name, s, o, 3);
               rules_count := rules_count + 2;
-	}
-      else
+            }
+          else
             {
-            rdf_inf_dir (ri_name, o, s, idx);
+              rdf_inf_dir (ri_name, o, s, idx);
               rules_count := rules_count + 1;
             }
         }
@@ -12433,7 +14642,7 @@ create function rdfs_load_schema (in ri_name varchar, in gn varchar := null) ret
           exec (txt, null, null, vector (v[inx]), 0, meta1, res1);
           excl := meta1[0][0];
           if (length (excl) > 0)
-          rdf_inf_set_ifp_exclude_list (ri_name, v[inx], excl);
+            rdf_inf_set_ifp_exclude_list (ri_name, v[inx], excl);
         }
     }
 -- Loading inverse functions
@@ -12471,16 +14680,17 @@ create function rdfs_load_schema (in ri_name varchar, in gn varchar := null) ret
       rules_count := rules_count + length (v);
     }
   jso_mark_affected (ri_name);
+--  if (not rules_count)
+    rdf_inf_dir (ri_name, null, null, 0);
   return rules_count + 1;
 }
 ;
 
-
 create procedure rdf_schema_ld ()
 {
   if (1 <> sys_stat ('cl_run_local_only'))
     return 0;
-  return (select count (*) from (select distinct s.rs_name from sys_rdf_schema s) sub where 0 = rdfs_load_schema (sub.rs_name));
+  return (select count (*) from (select distinct s.RS_NAME from DB.DBA.SYS_RDF_SCHEMA s) sub where 0 = rdfs_load_schema (sub.RS_NAME));
 }
 ;
 
@@ -12503,7 +14713,7 @@ create procedure CL_RDF_INF_CHANGED (in name varchar)
   declare aq any;
   if (2 = sys_stat ('cl_run_local_only'))
     return;
- aq := async_queue (1);
+  aq := async_queue (1);
   aq_request (aq, 'DB.DBA.CL_RDF_INF_CHANGED_SRV', vector (name));
   aq_wait_all (aq);
 }
@@ -12511,15 +14721,15 @@ create procedure CL_RDF_INF_CHANGED (in name varchar)
 
 create function rdfs_rule_set (in name varchar, in gn varchar, in remove int := 0) returns integer
 {
-    delete from sys_rdf_schema where rs_name = name and rs_uri = gn;
+  delete from DB.DBA.SYS_RDF_SCHEMA where RS_NAME = name and RS_URI = gn;
   if (not remove)
     {
-      insert into sys_rdf_schema (rs_name, rs_uri) values (name, gn);
+      insert into DB.DBA.SYS_RDF_SCHEMA (RS_NAME, RS_URI) values (name, gn);
     }
   commit work;
   if (0 = sys_stat ('cl_run_local_only'))
     {
-    DB.DBA.SECURITY_CL_EXEC_AND_LOG ('DB.DBA.CL_RDF_INF_CHANGED (?)', vector (name));
+      DB.DBA.SECURITY_CL_EXEC_AND_LOG ('DB.DBA.CL_RDF_INF_CHANGED (?)', vector (name));
       return 1;
     }
   else
@@ -12556,7 +14766,7 @@ create procedure SPARQL_INI_PARAMS (inout metas any, inout dta any)
   for (declare i int, i := 0; i < item_cnt; i := i + 1)
     {
       item_name := cfg_item_name (virtuoso_ini_path (), 'SPARQL', i);
-      item_value := cfg_item_value (virtuoso_ini_path (), 'SPARQL', item_name);
+      item_value := virtuoso_ini_item_value ('SPARQL', item_name);
       http (sprintf ('<http://www.openlinksw.com/schemas/virtini#SPARQL> <http://www.openlinksw.com/schemas/virtini#%U> "%s" .\r\n',
 	    item_name, item_value), tmp);
     }
@@ -12567,3 +14777,125 @@ create procedure SPARQL_INI_PARAMS (inout metas any, inout dta any)
 }
 ;
 
+create procedure cl_tmp_inx_recov_fill ()
+{
+  if (registry_get ('__rb_id_only_for_plain_ro_obj') = '1')
+    return;
+  log_enable (2,1);
+  log_message ('Cleaning the temporary table ...');
+  again:
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster) option (index RDF_QUAD_RECOV_TMP, no cluster);
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster) option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);
+  delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster) option (index RDF_QUAD_RECOV_TMP_OP, no cluster);
+
+  if (exists (select 1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster)))
+    goto again;
+
+  log_message ('Copying all quads to a temporary table ...');
+  insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster);
+  insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP_POGS option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster);
+}
+;
+
+create procedure cl_inx_recov_clean ()
+{
+  if (registry_get ('__rb_id_only_for_plain_ro_obj') = '1')
+    return;
+  log_enable (2,1);
+  log_message ('Cleaning the quad storage ...');
+  again:
+  delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster) option (index RDF_QUAD, no cluster);
+  delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster) option (index RDF_QUAD_POGS, no cluster);
+  delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only, no cluster) option (index RDF_QUAD_OP, no cluster);
+  if (exists (select 1 from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster)))
+    goto again;
+
+}
+;
+
+create procedure cl_inx_recov_fill_1 ()
+{
+  if (registry_get ('__rb_id_only_for_plain_ro_obj') = '1')
+    return;
+  log_enable (2,1);
+  log_message ('Refilling the quad storage (PK) from the temporary table...');
+  insert into DB.DBA.RDF_QUAD index RDF_QUAD option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster);
+  log_message ('Refilling the quad storage (POGS) from the temporary table...');
+  insert into DB.DBA.RDF_QUAD index RDF_QUAD_POGS option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);
+  log_message ('Refilling the quad storage (OP) from the temporary table...');
+  insert soft DB.DBA.RDF_QUAD index RDF_QUAD_OP option (index_only, no cluster) (P,O) select P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);
+  log_message ('Done.');
+}
+;
+
+--create procedure AQ_EXEC_SRV (in cmd varchar)
+--{
+--  declare st, msg any;
+--  st := '00000';
+--  exec (cmd, st, msg, vector ());
+--  if ('00000' <> st)
+--    signal (st, msg);
+--}
+--;
+
+
+create procedure exec_from_daq (in cmd varchar)
+{
+  declare aq any;
+  aq := async_queue (1);
+  aq_request (aq, 'DB.DBA.AQ_EXEC_SRV', vector (cmd));
+  aq_wait_all (aq);
+}
+;
+
+create procedure cl_inx_recov (in force int := 0)
+{
+  declare old_mode, tries int;
+  if (force)
+    cl_exec ('registry_remove (''__rb_id_only_for_plain_ro_obj'')');
+  if (registry_get ('__rb_id_only_for_plain_ro_obj') = '1')
+    return;
+  cl_exec ('checkpoint_interval (0)');
+  log_message ('Automatic checkpoint is stopped, must enable manually once upgrade finished.');
+  cl_exec ('__dbf_set (''cl_max_keep_alives_missed'', 10000)');
+  cl_exec ('__dbf_set (''cl_non_logged_write_mode'', 1)');
+  cl_exec ('checkpoint');
+  old_mode := log_enable (2,1);
+  cl_exec ('exec_from_daq (''cl_tmp_inx_recov_fill ()'')');
+clear_retry:
+  cl_exec ('exec_from_daq (''cl_inx_recov_clean ()'')');
+  if (
+       exists (select 1 from rdf_quad table option (index rdf_quad)) or
+       exists (select 1 from rdf_quad table option (index rdf_quad_pogs)) or
+       exists (select 1 from rdf_quad table option (index rdf_quad_op, index_only))
+     )
+   {
+     tries := tries + 1;
+     if (tries > 100)
+       {
+         log_message ('Quad store can not be cleaned, data reloading is strictly recommended.');
+	 cl_exec ('raw_exit ()');
+       }
+     log_message (sprintf ('Quad store is not fully cleaned, will try again [%d]', tries));
+     goto clear_retry;
+   }
+  cl_exec ('exec_from_daq (''cl_inx_recov_fill_1 ()'')');
+  cl_exec ('registry_set (''__rb_id_only_for_plain_ro_obj'', ''1'')');
+  if (not force)
+    cl_exec ('checkpoint');
+  log_message ('integrity check (completeness of index RDF_QUAD_POGS of DB.DBA.RDF_QUAD) ...');
+  if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index RDF_QUAD_POGS)
+		where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))
+    log_message ('** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.');
+
+  log_message ('integrity check (completeness of primary key of DB.DBA.RDF_QUAD) ...');
+  if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_POGS) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index RDF_QUAD)
+	where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))
+    log_message ('** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.');
+  log_enable (old_mode, 1);
+  cl_exec ('__dbf_set (''cl_non_logged_write_mode'', 0)');
+  log_message ('Update complete.');
+  if (force)
+    log_message ('Must do checkpoint to persist the db state.');
+}
+;
diff --git a/libsrc/Wi/sparql2sql.c b/libsrc/Wi/sparql2sql.c
index e584ff8..febd2d0 100644
--- a/libsrc/Wi/sparql2sql.c
+++ b/libsrc/Wi/sparql2sql.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql2sql.c,v 1.88.2.41 2011/03/02 12:24:56 source Exp $
+ *  $Id: sparql2sql.c,v 1.88.2.52 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -71,6 +71,7 @@ int
 sparp_gp_trav_list_subquery_retvals (sparp_t *sparp, SPART *curr, sparp_trav_state_t *sts_this, void *common_env)
 {
   int ctr;
+  SPART **options = curr->_.gp.options;
   if (SPAR_GP != curr->type)
     return 0;
   if (SELECT_L != curr->_.gp.subtype)
@@ -84,20 +85,23 @@ sparp_gp_trav_list_subquery_retvals (sparp_t *sparp, SPART *curr, sparp_trav_sta
           case SPAR_ALIAS: name = retval->_.alias.aname; break;
           default: name = NULL;
         }
-      if (NULL == name)
-        goto ignore_retval_name; /* see below */
-      if (SPART_VARNAME_IS_GLOB(name))
-        goto ignore_retval_name; /* see below */
-      DO_SET (caddr_t, listed, (dk_set_t *)(common_env))
+      if ((NULL != name) && !SPART_VARNAME_IS_GLOB(name) && (0 > dk_set_position_of_string (((dk_set_t *)(common_env))[0], name)))
+        t_set_push ((dk_set_t *)(common_env), name);
+    }
+  END_DO_BOX_FAST;
+  for (ctr = BOX_ELEMENTS_0 (options); 1 < ctr; ctr -= 2)
+        {
+      ptrlong key = ((ptrlong)(options[ctr-2]));
+      SPART *val = options[ctr-1];
+      caddr_t name = NULL;
+      switch (key)
         {
-          if (!strcmp (listed, name))
-            goto ignore_retval_name; /* see below */
+        case OFFBAND_L: case SCORE_L: name = val->_.var.vname; break;
+        case T_STEP_L: name = val->_.alias.aname; break;
         }
-      END_DO_SET()
+      if ((NULL != name) && !SPART_VARNAME_IS_GLOB(name) && (0 > dk_set_position_of_string (((dk_set_t *)(common_env))[0], name)))
       t_set_push ((dk_set_t *)(common_env), name);
-ignore_retval_name: ;
     }
-  END_DO_BOX_FAST;
   return 0;
 }
 
@@ -310,7 +314,7 @@ int sparp_gp_trav_wrap_vars_in_max (sparp_t *sparp, SPART *curr, sparp_trav_stat
     return SPAR_GPT_NODOWN;
   sts_this->sts_curr_array[sts_this->sts_ofs_of_curr_in_array] =
     spartlist (sparp, 4, SPAR_ALIAS,
-      spar_make_funcall (sparp, 1, t_box_dv_uname_string ("SPECIAL::bif:MAX"), (SPART **)t_list (1, curr)),
+      spar_make_funcall (sparp, 1, t_box_dv_uname_string ("SPECIAL::bif:_LONG_MAX"), (SPART **)t_list (1, curr)),
       varname, SSG_VALMODE_AUTO );
   return SPAR_GPT_NODOWN;
 }
@@ -366,7 +370,7 @@ sparp_gp_trav_preopt_expn_subq (sparp_t *sparp, SPART *curr, sparp_trav_state_t
 void
 sparp_rewrite_retvals (sparp_t *sparp, int safely_copy_retvals)
 {
-  rdf_grab_config_t *rgc = &(sparp->sparp_env->spare_grab);
+  rdf_grab_config_t *rgc = &(sparp->sparp_env->spare_src.ssrc_grab);
   SPART *root = sparp->sparp_expr;
   if (rgc->rgc_all)
     spar_add_rgc_vars_and_consts_from_retvals (sparp, root->_.req_top.retvals);
@@ -379,7 +383,6 @@ spar_retvals_of_describe() should wait for obtaining all variables and then
 sparp_expand_top_retvals () to process 'DESCRIBE * ...'. */
   if (DESCRIBE_L == root->_.req_top.subtype)
     {
-      sparp->sparp_storage = sparp_find_storage_by_name (sparp->sparp_expr->_.req_top.storage_name);
       root->_.req_top.retvals =
         spar_retvals_of_describe (sparp,
           root->_.req_top.retvals,
@@ -749,7 +752,7 @@ sparp_rotate_comparisons_by_rank (SPART *filt)
         break;
       }
     case SPAR_BUILT_IN_CALL:
-      if (SAMETERM_L == filt->_.builtin.btype)
+      if (SPAR_BIF_SAMETERM == filt->_.builtin.btype)
         {
           SPART *l = filt->_.builtin.args[0];
           SPART *r = filt->_.builtin.args[1];
@@ -866,7 +869,7 @@ sparp_merge_BOP_OR_of_INs (SPART *first, SPART *second, so_BOP_OR_filter_ctx_t *
   memcpy (res_IN_args + 1, first_vals, first_val_count * sizeof (caddr_t));
   memcpy (res_IN_args + 1 + first_val_count, second_vals, second_val_count * sizeof (caddr_t));
   sparp_equiv_remove_var (sparp, SPARP_EQUIV (sparp, second_var->_.var.equiv_idx), second_var);
-  return spartlist (sparp, 3, SPAR_BUILT_IN_CALL, IN_L, res_IN_args);
+  return sparp_make_builtin_call (sparp, IN_L, res_IN_args);
 }
 
 SPART *
@@ -923,7 +926,7 @@ sparp_optimize_BOP_OR_filter_walk (SPART *filt, so_BOP_OR_filter_ctx_t *ctx)
             }
           return filt;
         }
-      if (SAMETERM_L != filt->_.builtin.btype)
+      if (SPAR_BIF_SAMETERM != filt->_.builtin.btype)
         goto cannot_optimize; /* see below */
       /* no break, try get optimization hints like it is BOP_EQ */
     case BOP_EQ: /* No break */
@@ -1007,7 +1010,7 @@ spar_var_eq_to_equiv (sparp_t *sparp, SPART *curr, sparp_equiv_t *eq_l, SPART *r
   int ret = 0;
   int flags = 0;
   ptrlong tree_restr_bits = sparp_restr_bits_of_expn (sparp, r);
-  eq_l->e_rvr.rvrRestrictions |= (tree_restr_bits & (
+  eq_l->e_rvr.rvrRestrictions |= SPART_VARR_NOT_NULL | (tree_restr_bits & (
     SPART_VARR_IS_REF | SPART_VARR_IS_IRI | SPART_VARR_IS_BLANK |
     SPART_VARR_IS_LIT | SPART_VARR_LONG_EQ_SQL |
     SPART_VARR_NOT_NULL | SPART_VARR_ALWAYS_NULL ) );
@@ -1044,8 +1047,14 @@ spar_var_eq_to_equiv (sparp_t *sparp, SPART *curr, sparp_equiv_t *eq_l, SPART *r
       {
         switch (r->_.builtin.btype)
           {
-          case STR_L: eq_l->e_rvr.rvrRestrictions |= SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL; break;
+          case SPAR_BIF_STR: eq_l->e_rvr.rvrRestrictions |= SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL; break;
           case IRI_L: eq_l->e_rvr.rvrRestrictions |= SPART_VARR_IS_REF | SPART_VARR_NOT_NULL; break;
+          default:
+            {
+              const sparp_bif_desc_t *bif_desc = sparp_bif_descs + r->_.builtin.desc_ofs;
+              if ((SSG_VALMODE_NUM == bif_desc->sbd_ret_valmode) || (SSG_VALMODE_BOOL == bif_desc->sbd_ret_valmode))
+                eq_l->e_rvr.rvrRestrictions |= SPART_VARR_LONG_EQ_SQL;
+            }
           }
         return 0;
       }
@@ -1053,7 +1062,7 @@ spar_var_eq_to_equiv (sparp_t *sparp, SPART *curr, sparp_equiv_t *eq_l, SPART *r
     }
   if (sparp_equiv_contains_t_io (sparp, eq_l))
     return 0;
-  return flags;
+  return flags | SPART_VARR_NOT_NULL;
 }
 
 /* For an != in group \c curr between member of \c eq_l and expression \c r,
@@ -1145,7 +1154,7 @@ sparp_filter_to_equiv (sparp_t *sparp, SPART *curr, SPART *filt)
                         (lval == uname_xmlschema_ns_uri_hash_boolean) ||
                         (lval == uname_xmlschema_ns_uri_hash_string) )
                         {
-                          flags = SPART_VARR_IS_LIT;
+                          flags |= SPART_VARR_IS_LIT;
                         }
                       else if (
                         (lval == uname_xmlschema_ns_uri_hash_date) ||
@@ -1156,7 +1165,7 @@ sparp_filter_to_equiv (sparp_t *sparp, SPART *curr, SPART *filt)
                         (lval == uname_xmlschema_ns_uri_hash_integer) ||
                         (lval == uname_xmlschema_ns_uri_hash_time) )
                         {
-                          flags = SPART_VARR_IS_LIT | SPART_VARR_LONG_EQ_SQL;
+                          flags |= SPART_VARR_IS_LIT | SPART_VARR_LONG_EQ_SQL;
                         }
                       rarg1_eq->e_rvr.rvrRestrictions |= flags;
                       rarg1_eq->e_replaces_filter |= flags;
@@ -1178,7 +1187,7 @@ sparp_filter_to_equiv (sparp_t *sparp, SPART *curr, SPART *filt)
                   str_lval = (caddr_t)l;
                   break;
                 }
-              if ((NULL != str_lval) && (SPAR_BUILT_IN_CALL == SPART_TYPE (r)) && (STR_L == r->_.builtin.btype))
+              if ((NULL != str_lval) && (SPAR_BUILT_IN_CALL == SPART_TYPE (r)) && (SPAR_BIF_STR == r->_.builtin.btype))
                 {
                   SPART *rarg1 = r->_.builtin.args[0];
                   if (SPAR_IS_BLANK_OR_VAR (rarg1))
@@ -1238,56 +1247,49 @@ because const=str(var) is never recognized as a special condition on t_in or t_o
       {
         SPART *arg1 = filt->_.builtin.args[0];
         sparp_equiv_t *arg1_eq;
-	if (SPAR_IS_BLANK_OR_VAR (arg1))
-	  arg1_eq = sparp_equiv_get (sparp, curr, arg1, 0);
-	else
-	  break;
+        if (SPAR_IS_BLANK_OR_VAR (arg1))
+          arg1_eq = sparp_equiv_get (sparp, curr, arg1, 0);
+        else
+          break;
         switch (filt->_.builtin.btype)
           {
-          case isIRI_L:
-          case isURI_L:
+          case SPAR_BIF_ISIRI:
+          case SPAR_BIF_ISURI:
             flags = SPART_VARR_IS_REF | SPART_VARR_IS_IRI | SPART_VARR_NOT_NULL;
             arg1_eq->e_rvr.rvrRestrictions |= flags;
             arg1_eq->e_replaces_filter |= flags;
             return 1;
-          case isBLANK_L:
+          case SPAR_BIF_ISBLANK:
             flags = SPART_VARR_IS_REF | SPART_VARR_IS_BLANK | SPART_VARR_NOT_NULL;
             arg1_eq->e_rvr.rvrRestrictions |= flags;
             arg1_eq->e_replaces_filter |= flags;
             return 1;
-          case isREF_L:
+          case SPAR_BIF_ISREF:
             flags = SPART_VARR_IS_REF | SPART_VARR_NOT_NULL;
             arg1_eq->e_rvr.rvrRestrictions |= flags;
             arg1_eq->e_replaces_filter |= flags;
             return 1;
-          case isLITERAL_L:
+          case SPAR_BIF_ISLITERAL:
             flags = SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL;
             arg1_eq->e_rvr.rvrRestrictions |= flags;
             arg1_eq->e_replaces_filter |= flags;
             return 1;
+          case SPAR_BIF_ISNUMERIC:
+            flags = SPART_VARR_IS_LIT | SPART_VARR_LONG_EQ_SQL | SPART_VARR_NOT_NULL;
+            arg1_eq->e_rvr.rvrRestrictions |= flags;
+            arg1_eq->e_replaces_filter |= flags;
+            break;
           case BOUND_L:
             flags = SPART_VARR_NOT_NULL;
             arg1_eq->e_rvr.rvrRestrictions |= flags;
             arg1_eq->e_replaces_filter |= flags;
             return 1;
-          case SAMETERM_L:
+          case SPAR_BIF_SAMETERM:
             {
               SPART *arg2 = filt->_.builtin.args[1];
               spar_var_eq_to_equiv (sparp, curr, arg1_eq, arg2); /* No return because sameTerm is more strict than merge of equivs */
               break;
             }
-#ifdef DEBUG
-          case IRI_L:
-          case STR_L:
-          case LANG_L: case LANGMATCHES_L: case DATATYPE_L:
-          case REGEX_L:
-          case LIKE_L:
-          case IN_L:
-            break;
-          default: spar_internal_error (sparp, "sparp_" "filter_to_equiv(): unsupported built-in");
-#else
-          default: break;
-#endif
         }
       break;
       }
@@ -1780,11 +1782,12 @@ sparp_label_external_vars (sparp_t *sparp, dk_set_t parent_gps)
 void
 sparp_remove_totally_useless_equivs (sparp_t *sparp)
 {
-  int equiv_ctr, recv_ctr, dirty;
+  int equiv_first_idx, equiv_ctr, recv_ctr, dirty;
 
 again:
   dirty = 0;
-  for (equiv_ctr = sparp->sparp_sg->sg_equiv_count; equiv_ctr--; /* no step */)
+  equiv_first_idx = sparp->sparp_first_equiv_idx;
+  for (equiv_ctr = sparp->sparp_sg->sg_equiv_count; equiv_first_idx < equiv_ctr--; /*no step*/)
     {
       sparp_equiv_t *eq = SPARP_EQUIV (sparp, equiv_ctr);
       if (NULL == eq)
@@ -1822,7 +1825,7 @@ sparp_remove_redundant_connections (sparp_t *sparp, ptrlong flags)
   SPART *top = sparp->sparp_expr;
   SPART *top_pattern = top->_.req_top.pattern;
   sparp_equiv_t **equivs = sparp->sparp_sg->sg_equivs;
-  int eq_ctr;
+  int eq_first_idx, eq_ctr;
   sparp_gp_trav (sparp, top_pattern, NULL,
     sparp_gp_trav_remove_unused_aliases, sparp_gp_trav_cu_out_triples_1,
     NULL, NULL, sparp_gp_trav_remove_redundant_connections,
@@ -1833,7 +1836,8 @@ sparp_remove_redundant_connections (sparp_t *sparp, ptrlong flags)
     NULL );
   if (!(SPARP_UNLINK_IF_ASSIGNED_EXTERNALLY & flags))
     goto skip_ext_ext_unlinks; /* see below */
-  for (eq_ctr = sparp->sparp_sg->sg_equiv_count; eq_ctr--; /*no step*/)
+  eq_first_idx = sparp->sparp_first_equiv_idx;
+  for (eq_ctr = sparp->sparp_sg->sg_equiv_count; eq_first_idx < eq_ctr--; /*no step*/)
     {
       sparp_equiv_t *eq = equivs[eq_ctr];
       int sub_ctr;
@@ -1856,7 +1860,7 @@ sparp_remove_redundant_connections (sparp_t *sparp, ptrlong flags)
             (1 == BOX_ELEMENTS (sub_eq->e_varnames)) &&
             !strcmp (eq->e_varnames[0], sub_eq->e_varnames[0]) )
             can_unlink = 1;
-          else if (sparp_equivs_have_same_fixedvalue (sparp, eq, sub_eq))
+          else if (sparp_equivs_have_same_fixedvalue (sparp, eq, sub_eq) && (0 != eq->e_gspo_uses))
             can_unlink = 1;
           if (can_unlink)
             sparp_equiv_disconnect (sparp, eq, sub_eq);
@@ -2417,7 +2421,7 @@ void
 sparp_equiv_audit_all (sparp_t *sparp, int flags)
 {
   sparp_trav_state_t stss [SPARP_MAX_SYNTDEPTH+2];
-  int eq_ctr, var_ctr, recv_ctr, subv_ctr;
+  int eq_ctr, eq_count, var_ctr, recv_ctr, subv_ctr;
   if (NULL == sparp->sparp_expr)
     return; /* Internal error during parsing phase, there's no complete query to validate equivalence classes in it. */
   memset (stss, 0, sizeof (sparp_trav_state_t) * (SPARP_MAX_SYNTDEPTH+2));
@@ -2427,7 +2431,8 @@ sparp_equiv_audit_all (sparp_t *sparp, int flags)
     sparp_gp_trav_equiv_audit_inner_vars, NULL, sparp_gp_trav_equiv_audit_inner_vars,
     NULL );
   sparp_equiv_audit_retvals (sparp, sparp->sparp_expr);
-  for (eq_ctr = sparp->sparp_sg->sg_equiv_count; eq_ctr--; /*no step*/)
+  eq_count = sparp->sparp_sg->sg_equiv_count;
+  for (eq_ctr = sparp->sparp_first_equiv_idx; eq_ctr < eq_count; eq_ctr++)
     {
       sparp_equiv_t *eq = SPARP_EQUIV (sparp, eq_ctr);
       SPART *gp;
@@ -2643,6 +2648,8 @@ sparp_check_mapping_of_sources (sparp_t *sparp, tc_context_t *tcc,
       int chk_res;
       if (SPART_GRAPH_MIN_NEGATION < source->_.graph.subtype)
         {
+          if (NULL == source->_.graph.iri)
+            continue;
           if ((NULL != rvr) && (NULL != rvr->rvrFixedValue) &&
             sparp_fixedvalues_equal (sparp, (SPART *)(source->_.graph.iri), (SPART *)(rvr->rvrFixedValue)) )
             return SSG_QM_NO_MATCH;
@@ -2653,7 +2660,10 @@ sparp_check_mapping_of_sources (sparp_t *sparp, tc_context_t *tcc,
         }
       if (tcc->tcc_source_invalidation_masks[source_ctr])
         continue;
-      chk_res = sparp_check_field_mapping_of_cvalue (sparp, (SPART *)(source->_.graph.iri), qmv_or_fmt_rvr, rvr);
+      if (NULL == source->_.graph.iri)
+        chk_res = ((NULL != rvr->rvrFixedValue) ? SSG_QM_APPROX_MATCH : SSG_QM_PARTIAL_MATCH);
+      else
+        chk_res = sparp_check_field_mapping_of_cvalue (sparp, (SPART *)(source->_.graph.iri), qmv_or_fmt_rvr, rvr);
       if (SSG_QM_NO_MATCH != chk_res)
         {
           if (chk_res < min_match)
@@ -4227,6 +4237,7 @@ sparp_gp_trav_union_of_joins_out (sparp_t *sparp, SPART *curr, sparp_trav_state_
       int union_idx;
       int case_ctr, case_count;
       int curr_had_one_member = ((1 >= BOX_ELEMENTS (curr->_.gp.members)) ? 1 : 0);
+      int join_glued_filters_count, union_glued_filters_count;
       SPART *sub_union;
       SPART **detached_join_parts;
       SPART **detached_join_filters;
@@ -4260,8 +4271,12 @@ sparp_gp_trav_union_of_joins_out (sparp_t *sparp, SPART *curr, sparp_trav_state_
             return 0; /* This restricts the size of the resulting SQL statement */
         }
       sparp_equiv_audit_all (sparp, 0);
+      union_glued_filters_count = sub_union->_.gp.glued_filters_count;
+      sub_union->_.gp.glued_filters_count = 0;
       detached_union_filters = sparp_gp_detach_all_filters (sparp, sub_union, NULL);
       detached_union_parts = sparp_gp_detach_all_members (sparp, sub_union, NULL);
+      join_glued_filters_count = curr->_.gp.glued_filters_count;
+      curr->_.gp.glued_filters_count = 0;
       detached_join_filters = sparp_gp_detach_all_filters (sparp, curr, NULL);
       detached_join_parts = sparp_gp_detach_all_members (sparp, curr, NULL);
       if (curr_had_one_member)
@@ -4292,7 +4307,6 @@ sparp_gp_trav_union_of_joins_out (sparp_t *sparp, SPART *curr, sparp_trav_state_
           SPART *new_join = new_union->_.gp.members [case_ctr]; /* equal to union_part if curr_had_one_member */
           SPART **new_filts_u = (last_case ? detached_union_filters : sparp_treelist_full_clone (sparp, detached_union_filters));
           SPART **new_filts_j = (last_case ? detached_join_filters : sparp_treelist_full_clone (sparp, detached_join_filters));
-          SPART **new_join_filts = (SPART **)t_list_concat ((caddr_t)new_filts_u, (caddr_t)new_filts_j);
           if (!curr_had_one_member)
             {
               int join_part_ctr;
@@ -4313,7 +4327,10 @@ sparp_gp_trav_union_of_joins_out (sparp_t *sparp, SPART *curr, sparp_trav_state_
               sparp_gp_attach_many_members (sparp, new_join, new_join_parts, 0, NULL);
               sparp_equiv_audit_all (sparp, 0);
             }
-          sparp_gp_attach_many_filters (sparp, new_join, new_join_filts, 0, NULL);
+          sparp_gp_attach_many_filters (sparp, new_join, new_filts_u, BOX_ELEMENTS (new_join->_.gp.filters) - new_join->_.gp.glued_filters_count, NULL);
+          new_join->_.gp.glued_filters_count += union_glued_filters_count;
+          sparp_gp_attach_many_filters (sparp, new_join, new_filts_j, BOX_ELEMENTS (new_join->_.gp.filters) - new_join->_.gp.glued_filters_count, NULL);
+          new_join->_.gp.glued_filters_count += join_glued_filters_count;
           sparp_gp_tighten_by_eq_replaced_filters (sparp, new_join, sub_union, 0);
           sparp_gp_tighten_by_eq_replaced_filters (sparp, new_join, curr, 0);
           sparp_equiv_audit_all (sparp, 0);
@@ -4736,7 +4753,7 @@ sparp_qmv_forms_reusable_key_of_qm (sparp_t *sparp, qm_value_t *key_qmv, quad_ma
     return 0;
   if (!key_qmv->qmvColumnsFormKey) /* No key -- no reuse */
     return 0;
-  if (!key_qmv->qmvFormat->qmfIsBijection)	/* Non-bijection format is unsafe for reuse, different SHORTs may result is same LONG */
+  if (!key_qmv->qmvFormat->qmfIsBijection)	/* Non-bijection format is unsafe for reuse, different SHORTs may result in same LONG */
     return 0;
   DO_BOX_FAST (qm_atable_t *, at, ctr, key_qmv->qmvATables)
     {
@@ -5307,12 +5324,14 @@ void
 sparp_rewrite_all (sparp_t *sparp, int safely_copy_retvals)
 {
   ptrlong top_type = SPART_TYPE (sparp->sparp_expr);
+  if ((NULL == sparp->sparp_env->spare_storage_name) && (NULL == sparp->sparp_storage))
+    sparp->sparp_storage = sparp_find_storage_by_name (NULL);
   if (SPAR_QM_SQL_FUNCALL == top_type)
     return;
   if (SPAR_CODEGEN == top_type)
     return;
   sparp_rewrite_retvals (sparp, safely_copy_retvals);
-  if ((sparp->sparp_env->spare_grab.rgc_pview_mode) && (NULL == sparp->sparp_parent_sparp))
+  if ((sparp->sparp_env->spare_src.ssrc_grab.rgc_pview_mode) && (NULL == sparp->sparp_parent_sparp))
     {
       sparp_rewrite_grab (sparp);
       return;
@@ -5572,7 +5591,7 @@ retry_preopt:
   sparp_rewrite_basic (sparp);
   equivs = sparp->sparp_sg->sg_equivs;
   equiv_count = sparp->sparp_sg->sg_equiv_count;
-  for (equiv_ctr = equiv_count; equiv_ctr--; /* no step */)
+  for (equiv_ctr = sparp->sparp_first_equiv_idx; equiv_ctr < equiv_count; equiv_ctr++)
     {
       sparp_equiv_t *eq = equivs[equiv_ctr];
       if (NULL == eq)
@@ -5595,7 +5614,6 @@ retry_preopt:
             spar_error (sparp, "Variable '%.100s' is used in subexpressions of the query but not assigned", eq->e_varnames[0]);
         }
     }
-  sparp->sparp_storage = sparp_find_storage_by_name (sparp->sparp_expr->_.req_top.storage_name);
 /* Building qm_list for every triple in the tree. */
   sparp_gp_trav (sparp, sparp->sparp_expr->_.req_top.pattern, NULL,
     sparp_gp_trav_refresh_triple_cases, NULL,
@@ -6047,7 +6065,7 @@ void
 sparp_rewrite_grab (sparp_t *sparp)
 {
   sparp_env_t *env = sparp->sparp_env;
-  rdf_grab_config_t *rgc = &(env->spare_grab);
+  rdf_grab_config_t *rgc = &(env->spare_src.ssrc_grab);
   sparp_t *sparp_of_seed;	/* This will compile the statement that will collect the first set of graphs */
   sparp_t *sparp_of_iter;	/* This will compile the statement that will called while the set of graphs growth */
   sparp_t *sparp_of_final;	/* This will compile the statement that will produce the final result set */
@@ -6091,10 +6109,10 @@ sparp_rewrite_grab (sparp_t *sparp)
   sparp_of_seed->sparp_expr->_.req_top.offset = 0;
   sparp_of_seed->sparp_env->spare_globals_mode = SPARE_GLOBALS_ARE_COLONUMBERED;
   sparp_of_seed->sparp_env->spare_global_num_offset = 1;
-  sparp_of_seed->sparp_env->spare_grab.rgc_sa_graphs = env->spare_grab.rgc_sa_graphs;
-  sparp_of_seed->sparp_env->spare_grab.rgc_sa_preds = env->spare_grab.rgc_sa_preds;
-  sparp_of_seed->sparp_env->spare_grab.rgc_sa_vars = env->spare_grab.rgc_sa_vars;
-  sparp_of_seed->sparp_env->spare_grab.rgc_vars = env->spare_grab.rgc_vars;
+  sparp_of_seed->sparp_env->spare_src.ssrc_grab.rgc_sa_graphs = env->spare_src.ssrc_grab.rgc_sa_graphs;
+  sparp_of_seed->sparp_env->spare_src.ssrc_grab.rgc_sa_preds = env->spare_src.ssrc_grab.rgc_sa_preds;
+  sparp_of_seed->sparp_env->spare_src.ssrc_grab.rgc_sa_vars = env->spare_src.ssrc_grab.rgc_sa_vars;
+  sparp_of_seed->sparp_env->spare_src.ssrc_grab.rgc_vars = env->spare_src.ssrc_grab.rgc_vars;
 /* Making subqueries: iter */
   sub_sparps[1] = sparp_of_iter = sparp_clone_for_variant (sparp_of_seed, 0);
   sparp_of_iter->sparp_expr = sparp_tree_full_copy (sparp_of_seed, sparp_of_seed->sparp_expr, NULL);
@@ -6103,10 +6121,10 @@ sparp_rewrite_grab (sparp_t *sparp)
     sparp_tweak_order_of_iter (sparp_of_iter, sparp_of_iter->sparp_expr->_.req_top.order);
   sparp_of_iter->sparp_env->spare_globals_mode = SPARE_GLOBALS_ARE_COLONUMBERED;
   sparp_of_iter->sparp_env->spare_global_num_offset = 1;
-  sparp_of_iter->sparp_env->spare_grab.rgc_sa_graphs = env->spare_grab.rgc_sa_graphs;
-  sparp_of_iter->sparp_env->spare_grab.rgc_sa_preds = env->spare_grab.rgc_sa_preds;
-  sparp_of_iter->sparp_env->spare_grab.rgc_sa_vars = env->spare_grab.rgc_sa_vars;
-  sparp_of_iter->sparp_env->spare_grab.rgc_vars = env->spare_grab.rgc_vars;
+  sparp_of_iter->sparp_env->spare_src.ssrc_grab.rgc_sa_graphs = env->spare_src.ssrc_grab.rgc_sa_graphs;
+  sparp_of_iter->sparp_env->spare_src.ssrc_grab.rgc_sa_preds = env->spare_src.ssrc_grab.rgc_sa_preds;
+  sparp_of_iter->sparp_env->spare_src.ssrc_grab.rgc_sa_vars = env->spare_src.ssrc_grab.rgc_sa_vars;
+  sparp_of_iter->sparp_env->spare_src.ssrc_grab.rgc_vars = env->spare_src.ssrc_grab.rgc_vars;
 /* Only after making the iter subquery from the seed one, seed may loose its ORDER BY */
   sparp_of_seed->sparp_expr->_.req_top.order = NULL;
 /*!!! TBD: relax graph conditions in sparp_of_iter */
@@ -6389,7 +6407,7 @@ ssg_select_known_graphs_codegen (struct spar_sqlgen_s *ssg, struct spar_tree_s *
   ssg_puts ((SSG_VALMODE_LONG == retvalmode) ? ".return_iris=0 " : ".return_iris=1 ");
   ssg_puts (" AND ");
   ssg_prin_id_with_suffix (ssg, retselid, "~pview");
-  snprintf (limplusofs_strg, sizeof (limplusofs_strg), ".lim=" BOXINT_FMT, ((SPARP_MAXLIMIT-ofs) >= lim) ? lim+ofs : SPARP_MAXLIMIT);
+  snprintf (limplusofs_strg, sizeof (limplusofs_strg), ".lim=" BOXINT_FMT, (SPARP_MAXLIMIT == lim) ? SPARP_MAXLIMIT : lim+ofs);
   ssg_puts (limplusofs_strg);
   if ((NULL != formatter) || (NULL != agg_formatter))
     {
diff --git a/libsrc/Wi/sparql2sql.h b/libsrc/Wi/sparql2sql.h
index e9f93c3..7612571 100644
--- a/libsrc/Wi/sparql2sql.h
+++ b/libsrc/Wi/sparql2sql.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql2sql.h,v 1.55.2.22 2011/01/03 10:21:00 source Exp $
+ *  $Id: sparql2sql.h,v 1.55.2.28 2012/03/08 12:55:35 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -126,6 +126,10 @@ extern void sparp_up_from_sub (sparp_t *sparp, SPART *subq_gp_wrapper, sparp_t *
 /*!< Continues the current traversal in the given gp with subquery */
 extern void sparp_continue_gp_trav_in_sub (sparp_t *sparp, SPART *subq_gp_wrapper, void *common_env);
 
+extern SPART **spar_macroexpand_treelist (sparp_t *sparp, SPART **trees, int begin_with);
+/*!< Do nothing or macroexpand a single tree, returns the result, destroying and/or reusing the original */
+extern SPART *spar_macroexpand_tree (sparp_t *sparp, SPART *tree);
+
 struct sparp_equiv_s;
 
 /*! Equivalence class of variables. All instances of \c sparp_equiv_s are enumerated in \c sparp_sg->sg_equivs .
@@ -732,6 +736,22 @@ typedef struct rdf_ds_usage_s
   caddr_t rdfdu_alias;	/*!< Table alias used for the occurrence */
 } rdf_ds_usage_t;
 
+/*! Description of SPARQL Built In Function (one mentioned in spec and in lang syntax) */
+typedef struct sparp_bif_desc_s {
+  const char *		sbd_name;		/*!< Name, uppercased */
+  int			sbd_subtype;		/*!< Assigned SPAR_BIF_xxx value */
+  char			sbd_implementation;	/*!< Type of implementation. '-' for special code generation, 'B' for BIF, 'S' for stored procedures */
+  int			sbd_required_syntax;	/*!< Bits of sparql dialect such that at least one bit should be set in dialect in order to allow the function */
+  int			sbd_minargs;		/*!< Minimum allowed number of arguments */
+  int			sbd_maxargs;		/*!< Maximum allowed number of arguments */
+  ssg_valmode_t 	sbd_ret_valmode;	/*!< Native valmode of the expression */
+  ssg_valmode_t 	sbd_arg_valmodes[3];	/*!< Expected valmodes of the arguments. The valmode of last specified argument is used for the rest of arguments */
+  int			sbd_result_restr_bits;	/*!< (Approximate) restriction bits of the result, they can be changed after inspecting restriction bits of arguments */
+} sparp_bif_desc_t;
+
+extern const sparp_bif_desc_t sparp_bif_descs[];
+
+
 #define NULL_ASNAME ((const char *)NULL)
 #define COL_IDX_ASNAME (((const char *)NULL) + 0x100)
 
@@ -778,6 +798,8 @@ typedef struct spar_sqlgen_s
   const char *          ssg_where_l_text;	/*!< Text to print when (0 == ssg_where_l_printed), usually " WHERE" */
   int			ssg_indent;		/*!< Number of whitespaces to indent. Actually, pairs of whitespaces, not singles */
   int			ssg_line_count;		/*!< Number of lines of generated SQL code */
+  dk_set_t		ssg_valid_ret_selids;	/*!< stack of selids of GPs that can be safely used to generate SQL code for retvals (i.e. their selids are in current scope) */
+  dk_set_t		ssg_valid_ret_tabids;	/*!< stack like ssg_valid_ret_selids, but for tabids */
   int			ssg_seealso_enabled;	/*!< Flags if \c ssg_print_fld_var_restrictions_ex() (or the like) should generate calls of RDF_GRAB_SEEALSO; they should for "init" and "iter" of a pview, but not for "final" */
 /* SPARQL-D Codegen temporary values */
   const char *		ssg_sd_service_name;	/*!< Name of the destination endpoint that will receive the fragment that is printed ATM (for error reporting) */
@@ -835,7 +857,15 @@ extern void spar_sqlprint_error_impl (spar_sqlgen_t *ssg, const char *msg);
     } while (0)
 
 /*! Adds either iri of \c jso_inst or \c jso_name into dependencies of the generated query. \c jso_inst is used only if \c jso_name is NULL */
-extern void ssg_qr_uses_jso (spar_sqlgen_t *ssg, ccaddr_t jso_inst, ccaddr_t jso_name);
+extern void spar_qr_uses_jso_int (comp_context_t *cc, ccaddr_t jso_inst, ccaddr_t jso_name);
+
+#define sparp_qr_uses_jso(sparp,jso_inst,jso_name) do { \
+  struct sql_comp_s *super_sc = (sparp)->sparp_sparqre->sparqre_super_sc; \
+  if (NULL != super_sc) \
+    spar_qr_uses_jso_int (super_sc->sc_cc, (jso_inst), (jso_name)); } while (0)
+
+#define ssg_qr_uses_jso(ssg,jso_inst,jso_name) spar_qr_uses_jso_int ((ssg)->ssg_sc->sc_cc, (jso_inst), (jso_name))
+
 extern void ssg_qr_uses_table (spar_sqlgen_t *ssg, const char *tbl);
 
 extern ssg_valmode_t sparp_lit_native_valmode (SPART *tree);
@@ -861,8 +891,8 @@ extern void ssg_print_literal_as_long (spar_sqlgen_t *ssg, SPART *lit);
 extern void ssg_print_equiv (spar_sqlgen_t *ssg, caddr_t selectid, sparp_equiv_t *eq, ccaddr_t asname);
 
 extern ssg_valmode_t sparp_rettype_of_global_param (sparp_t *sparp, caddr_t name);
-extern ssg_valmode_t sparp_rettype_of_function (sparp_t *sparp, caddr_t name);
-extern ssg_valmode_t sparp_argtype_of_function (sparp_t *sparp, caddr_t name, int arg_idx);
+extern ssg_valmode_t sparp_rettype_of_function (sparp_t *sparp, caddr_t name, SPART *call_tree);
+extern ssg_valmode_t sparp_argtype_of_function (sparp_t *sparp, caddr_t name, SPART *call_tree, int arg_idx);
 extern void ssg_prin_function_name (spar_sqlgen_t *ssg, ccaddr_t name);
 
 extern void ssg_print_global_param (spar_sqlgen_t *ssg, SPART *var, ssg_valmode_t needed);
@@ -949,6 +979,7 @@ An occurrence of a non-blocking feature provides some hint to the optimizer of t
 #define SSG_SD_VOS_6		0x1FFF	/*!< Allows everything that is supported by Virtuoso Open Source 6.0.0 */
 #define SSG_SD_VOS_CURRENT	SSG_SD_VOS_6	/*!< Allows everything that is supported by current version of Virtuoso Open Source */
 #define SSG_SD_SPARQL11		0x2000	/*!< Allows the use of SPARQL 1.1 extensions, blocking in most of cases */
+#define SSG_SD_BI_OR_SPARQL11 (SSG_SD_BI | SSG_SD_SPARQL11)
 #define SSG_SD_DEPRECATED_MASK	0x0	/*!< All bits of deprecated flags (none so far) */
 #define SSG_SD_MAXVALUE		(SSG_SD_VOS_CURRENT | SSG_SD_DEPRECATED_MASK)
 
diff --git a/libsrc/Wi/sparql2sqltext.c b/libsrc/Wi/sparql2sqltext.c
index 3b0ce72..2ded446 100644
--- a/libsrc/Wi/sparql2sqltext.c
+++ b/libsrc/Wi/sparql2sqltext.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql2sqltext.c,v 1.113.2.88 2011/03/29 10:53:08 source Exp $
+ *  $Id: sparql2sqltext.c,v 1.113.2.117 2012/03/15 14:44:19 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -86,6 +86,7 @@ void rdf_ds_load_all (void)
   qmf->qmfIsuriOfShortTmpl = box_dv_short_string (" (^{tree}^ < min_bnode_iri_id ())");
   qmf->qmfIsblankOfShortTmpl = box_dv_short_string (" (^{tree}^ >= min_bnode_iri_id ())");
   qmf->qmfIslitOfShortTmpl = box_dv_short_string (" 0");
+  qmf->qmfIsnumericOfShortTmpl = box_dv_short_string (" 0");
   qmf->qmf01uriOfShortTmpl = box_dv_short_string (" (lt (^{tree}^, min_bnode_iri_id ()))");
   qmf->qmf01blankOfShortTmpl = box_dv_short_string (" (gte (^{tree}^, min_bnode_iri_id ()))");
   qmf->qmfLongOfShortTmpl = box_dv_short_string (" ^{tree}^");
@@ -129,6 +130,7 @@ void rdf_ds_load_all (void)
   qmf->qmfIsuriOfShortTmpl = box_dv_short_string (" is_named_iri_id (^{tree}^)");
   qmf->qmfIsblankOfShortTmpl = box_dv_short_string (" is_bnode_iri_id (^{tree}^)");
   qmf->qmfIslitOfShortTmpl = box_dv_short_string (" (1 - isiri_id (^{tree}^))");
+  qmf->qmfIsnumericOfShortTmpl = box_dv_short_string (" isnumeric (^{tree}^)");
   qmf->qmfLongOfShortTmpl = box_dv_short_string (" __ro2lo (^{tree}^)");
   qmf->qmfDatatypeOfShortTmpl = box_dv_short_string (" DB.DBA.RDF_DATATYPE_OF_OBJ (__ro2sq (^{tree}^))");
   qmf->qmfLanguageOfShortTmpl = box_dv_short_string (" DB.DBA.RDF_LANGUAGE_OF_OBJ (__ro2sq (^{tree}^))");
@@ -229,11 +231,22 @@ ssg_find_valmode_by_name (ccaddr_t name)
   return NULL; /* to keep compiler happy */
 }
 
+int
+ssg_is_odbc_cli ()
+{
+  client_connection_t * cli = sqlc_client ();
+  if (!cli || !cli->cli_session || cli->cli_ws || cli->cli_is_log)
+    return 0;
+  return 1;
+}
+
 void
 ssg_find_formatter_by_name_and_subtype (ccaddr_t name, ptrlong subtype,
   const char **ret_formatter, const char **ret_agg_formatter, const char **ret_agg_mdata )
 {
   ret_formatter[0] = ret_agg_formatter[0] = ret_agg_mdata[0] = NULL;
+  if (NULL == name && ssg_is_odbc_cli ())
+    name = "_UDBC_";
   if (NULL == name)
     return;
   if (!strncmp (name, "HTTP+", 5))
@@ -309,6 +322,12 @@ ssg_find_formatter_by_name_and_subtype (ccaddr_t name, ptrlong subtype,
       case ASK_L: ret_formatter[0] = "DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL"; return;
       default: return;
       }
+  if (!strcmp (name, "TRIG"))
+    switch (subtype)
+      {
+      case CONSTRUCT_L: case DESCRIBE_L: ret_formatter[0] = "DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TRIG"; return;
+      default: return;
+      }
   if (!strcmp (name, "NT"))
     switch (subtype)
       {
@@ -331,7 +350,19 @@ ssg_find_formatter_by_name_and_subtype (ccaddr_t name, ptrlong subtype,
       case CONSTRUCT_L: case DESCRIBE_L: ret_formatter[0] = "DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDFA_XHTML"; return;
       default: return;
       }
-  if (!strcmp (name, "_JAVA_"))
+  if (!strcmp (name, "HTML;MICRODATA"))
+    switch (subtype)
+      {
+      case CONSTRUCT_L: case DESCRIBE_L: ret_formatter[0] = "DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_MICRODATA"; return;
+      default: return;
+      }
+  if (!strcmp (name, "JSON;MICRODATA"))
+    switch (subtype)
+      {
+      case CONSTRUCT_L: case DESCRIBE_L: ret_formatter[0] = "DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_MICRODATA"; return;
+      default: return;
+      }
+  if (!strcmp (name, "_JAVA_") || !strcmp (name, "_UDBC_"))
     switch (subtype)
       {
       case ASK_L: ret_formatter[0] = "COUNT"; return;
@@ -401,23 +432,6 @@ sparp_jso_push_deleted (sparp_t *sparp, ccaddr_t class_iri, ccaddr_t inst_iri)
 }
 
 void
-ssg_qr_uses_jso (spar_sqlgen_t *ssg, ccaddr_t jso_inst, ccaddr_t jso_name)
-{
-  comp_context_t *cc = ssg->ssg_sc->sc_cc;
-  if (NULL == cc)
-    return;
-  if (NULL == jso_name)
-    {
-      jso_rtti_t *jso_rtti = gethash (jso_inst, jso_rttis_of_structs);
-      if (NULL == jso_rtti)
-        return; /* Built-in anonymous JSO, like one used when define input:storage "" */
-      jso_name = jso_rtti->jrtti_inst_iri;
-    }
-  box_dv_uname_make_immortal ((caddr_t)jso_name);
-  qr_uses_jso (cc->cc_super_cc->cc_query, jso_name);
-}
-
-void
 ssg_qr_uses_table (spar_sqlgen_t *ssg, const char *tbl)
 {
   comp_context_t *cc;
@@ -1161,7 +1175,7 @@ sparp_check_tmpl (sparp_t *sparp, ccaddr_t tmpl, int qmv_known, dk_set_t *used_a
       if ('.' == cmd [cmdlen-1])
         {
           caddr_t alias = t_box_dv_short_nchars (cmd, cmdlen - 1);
-          caddr_t qtable = spar_qm_find_base_table (sparp, alias);
+          caddr_t qtable = spar_qm_find_base_table_or_sqlquery (sparp, alias);
           if (NULL == qtable)
             spar_error (sparp, "Template string refers to unspecified alias in macro ^{%.100s.}^", alias);
           if (0 > dk_set_position_of_string (used_aliases[0], alias))
@@ -1496,10 +1510,10 @@ sparp_equiv_native_valmode (sparp_t *sparp, SPART *gp, sparp_equiv_t *eq)
   int gp_member_idx;
   if (NULL == eq)
     return NULL;
+  if (eq->e_rvr.rvrRestrictions & (SPART_VARR_CONFLICT | SPART_VARR_ALWAYS_NULL))
+    return SSG_VALMODE_BOOL; /* A smallest possible type because the equiv is in conflict and no binding exists */
   if (SPART_VARR_FIXED & eq->e_rvr.rvrRestrictions)
-    {
       return SSG_VALMODE_SQLVAL;
-    }
   if (SELECT_L == gp->_.gp.subtype)
     {
       caddr_t varname = eq->e_varnames[0];
@@ -1664,13 +1678,32 @@ sparp_expn_native_valmode (sparp_t *sparp, SPART *tree)
     case SPAR_BUILT_IN_CALL:
       switch (tree->_.builtin.btype)
         {
-        case IN_L: case LIKE_L: case LANGMATCHES_L: case REGEX_L: case BOUND_L:
-	case isIRI_L: case isURI_L: case isBLANK_L: case isREF_L: case isLITERAL_L: return SSG_VALMODE_BOOL;
-        case IRI_L: case DATATYPE_L: return SSG_VALMODE_LONG;
-        default: return SSG_VALMODE_SQLVAL;
+        case IN_L: case LIKE_L: return SSG_VALMODE_BOOL;
+        case SPAR_BIF_COALESCE:
+          {
+            ssg_valmode_t union_valmode = sparp_expn_native_valmode (sparp, tree->_.builtin.args[0]);
+            int argctr;
+            for (argctr = BOX_ELEMENTS (tree->_.builtin.args); --argctr /* not argctr-- */; /* no step */)
+              {
+                ssg_valmode_t arg_valmode = sparp_expn_native_valmode (sparp, tree->_.builtin.args[argctr]);
+                union_valmode = ssg_smallest_union_valmode (union_valmode, arg_valmode);
+              }
+            return union_valmode;
+          }
+        case SPAR_BIF_IF:
+          {
+            ssg_valmode_t t_branch_valmode = sparp_expn_native_valmode (sparp, tree->_.builtin.args[1]);
+            ssg_valmode_t f_branch_valmode = sparp_expn_native_valmode (sparp, tree->_.builtin.args[2]);
+            return ssg_smallest_union_valmode (t_branch_valmode, f_branch_valmode);
+          }
+        default:
+          {
+            const sparp_bif_desc_t *sbd = sparp_bif_descs + tree->_.builtin.desc_ofs;
+            return sbd->sbd_ret_valmode;
+          }
         }
     case SPAR_FUNCALL:
-      return sparp_rettype_of_function (sparp, tree->_.funcall.qname);
+      return sparp_rettype_of_function (sparp, tree->_.funcall.qname, tree);
     case SPAR_CONV:
       {
         ssg_valmode_t needed = tree->_.conv.needed;
@@ -1838,7 +1871,18 @@ sparp_expn_native_valmode (sparp_t *sparp, SPART *tree)
         sub_sparp->sparp_env = subq->_.req_top.shared_spare;
         sub_sparp->sparp_parent_sparp = sparp;
         res = sparp_expn_native_valmode (sub_sparp, subq->_.req_top.retvals[0]);
+        if ((SSG_VALMODE_NUM == res) || (SSG_VALMODE_LONG == res) || (SSG_VALMODE_SQLVAL == res))
+          return res;
+#if 0 /*!!! TBD extend ssg_print_scalar_subquery_exp() to support any valmodes and avoid using casts to SSG_VALMODE_LONG */
+        if (IS_BOX_POINTER (res))
+          {
+            if (res->qmfIsSubformatOfLong)
+              return SSG_VALMODE_LONG;
+          }
         return res;
+#else
+        return SSG_VALMODE_LONG;
+#endif
       }
     default: break;
     }
@@ -1931,22 +1975,107 @@ sparp_restr_bits_of_expn (sparp_t *sparp, SPART *tree)
     case SPAR_ALIAS:
       return sparp_restr_bits_of_expn (sparp, tree->_.alias.arg);
     case SPAR_BUILT_IN_CALL:
-      switch (tree->_.builtin.btype)
-        {
-        case IN_L: case LIKE_L: case LANGMATCHES_L: case REGEX_L:
-        case isIRI_L: case isURI_L: case isBLANK_L: case isREF_L: case isLITERAL_L: case BOUND_L:
-          return SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL;
-        case IRI_L: return SPART_VARR_IS_REF ;
-        case DATATYPE_L: return SPART_VARR_IS_REF | SPART_VARR_IS_IRI ;
-        default: return 0;
-        }
+      {
+        const sparp_bif_desc_t *sbd = sparp_bif_descs + tree->_.builtin.desc_ofs;
+        ptrlong res_bits = sbd->sbd_result_restr_bits;
+        switch (tree->_.builtin.btype)
+          {
+          case SPAR_BIF_ISIRI: case SPAR_BIF_ISURI: case SPAR_BIF_ISBLANK: case SPAR_BIF_ISREF: case SPAR_BIF_ISLITERAL: case SPAR_BIF_ISNUMERIC: case BOUND_L:
+            {
+              ptrlong arg_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[0]);
+              if (!(arg_bits & SPART_VARR_NOT_NULL))
+                return res_bits;
+              if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (arg_bits & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL)))
+                return (res_bits | SPART_VARR_FIXED);
+              switch (tree->_.builtin.btype)
+                {
+                  case SPAR_BIF_ISIRI: case SPAR_BIF_ISURI: case SPAR_BIF_ISBLANK:
+                    if ((arg_bits & SPART_VARR_IS_IRI) || (arg_bits & SPART_VARR_IS_BLANK)
+                      || (arg_bits & SPART_VARR_ALWAYS_NULL) )
+                      return (res_bits | SPART_VARR_FIXED);
+                    /* no break; */
+                  case SPAR_BIF_ISREF: case SPAR_BIF_ISLITERAL:
+                    if ((arg_bits & SPART_VARR_IS_REF) || (arg_bits & SPART_VARR_IS_LIT)
+                      || (arg_bits & SPART_VARR_IS_IRI) || (arg_bits & SPART_VARR_IS_BLANK)
+                      || (arg_bits & SPART_VARR_ALWAYS_NULL))
+                      return (res_bits | SPART_VARR_FIXED);
+                    break;
+                  case SPAR_BIF_ISNUMERIC:
+                    if ((arg_bits & SPART_VARR_IS_REF)
+                      || (arg_bits & SPART_VARR_IS_IRI) || (arg_bits & SPART_VARR_IS_BLANK)
+                      || (arg_bits & SPART_VARR_ALWAYS_NULL))
+                      return (res_bits | SPART_VARR_FIXED);
+                    break;
+                  case BOUND_L: break;
+                }
+              return res_bits;
+            }
+          case IRI_L:
+            {
+              ptrlong arg_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[0]);
+              if (SPART_VARR_ALWAYS_NULL & arg_bits)
+                return (SPART_VARR_ALWAYS_NULL);
+              if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (arg_bits & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL)))
+                return (SPART_VARR_IS_REF | SPART_VARR_FIXED | SPART_VARR_NOT_NULL);
+              return SPART_VARR_IS_REF ;
+            }
+          case DATATYPE_L:
+            {
+              ptrlong arg_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[0]);
+              if (SPART_VARR_ALWAYS_NULL & arg_bits)
+                return (SPART_VARR_ALWAYS_NULL);
+              if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (arg_bits & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL)))
+                return (SPART_VARR_IS_REF | SPART_VARR_IS_IRI | SPART_VARR_FIXED);
+              return SPART_VARR_IS_REF | SPART_VARR_IS_IRI ;
+            }
+          case SPAR_BIF_STR:
+            {
+              ptrlong arg_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[0]);
+              if (SPART_VARR_ALWAYS_NULL & arg_bits)
+                return (SPART_VARR_ALWAYS_NULL);
+              if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (arg_bits & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL)))
+                return (SPART_VARR_IS_LIT | SPART_VARR_FIXED | SPART_VARR_NOT_NULL);
+              if (SPART_VARR_NOT_NULL & arg_bits)
+                return (SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL);
+              return SPART_VARR_IS_LIT ;
+            }
+          case SPAR_BIF_COALESCE:
+            {
+              ptrlong union_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[0]);
+              int argctr;
+              for (argctr = BOX_ELEMENTS (tree->_.builtin.args); --argctr /* not argctr-- */; /* no step */)
+                {
+                  ptrlong arg_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[argctr]);
+                  if (!(arg_bits & (SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT)))
+                    union_bits &= arg_bits;
+                }
+              return union_bits & ~SPART_VARR_NOT_NULL;
+            }
+          case SPAR_BIF_IF:
+            {
+              ptrlong t_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[1]);
+              ptrlong f_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[2]);
+              ptrlong res_bits = t_bits & f_bits;
+              if (res_bits & SPART_VARR_FIXED)
+                {
+                  ptrlong cond_bits = sparp_restr_bits_of_expn (sparp, tree->_.builtin.args[0]);
+                  if (!((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (cond_bits & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL))))
+                    res_bits &= ~SPART_VARR_FIXED;
+                }
+              return res_bits;
+            }
+          default:
+            return res_bits;
+          }
+      }
     case SPAR_FUNCALL:
       {
         caddr_t qname = tree->_.funcall.qname;
-        if ((!strcmp (qname, "bif:MAX") || !strcmp (qname, "bif:MIN") || !strcmp (qname, "SPECIAL::bif:MAX")) &&
+        if ((!strcmp (qname, "SPECIAL::bif:MAX") || !strcmp (qname, "SPECIAL::bif:MIN")) &&
           (1 == BOX_ELEMENTS (tree->_.funcall.argtrees)) )
           return sparp_restr_bits_of_expn (sparp, tree->_.funcall.argtrees[0]) & ~SPART_VARR_NOT_NULL;
-        if (!strcmp (qname, "bif:AVG") && (1 == BOX_ELEMENTS (tree->_.funcall.argtrees)))
+        if ((!strcmp (qname, "SPECIAL::bif:AVG") || !strcmp (qname, "SPECIAL::bif:SUM")) &&
+          (1 == BOX_ELEMENTS (tree->_.funcall.argtrees)) )
           return (SPART_VARR_IS_LIT | SPART_VARR_LONG_EQ_SQL |
             (sparp_restr_bits_of_expn (sparp, tree->_.funcall.argtrees[0]) & ~SPART_VARR_NOT_NULL) );
         if (!strcmp (qname, "SPECIAL::bif:COUNT"))
@@ -1955,6 +2084,7 @@ sparp_restr_bits_of_expn (sparp_t *sparp, SPART *tree)
           {
             caddr_t iduqname = sqlp_box_id_upcase (qname+4);
             bif_type_t ** bt = (bif_type_t **) id_hash_get (name_to_bif_type, (char *) &iduqname);
+            dk_free_box (iduqname);
             if (NULL == bt)
               return 0;
             return sparp_restr_bits_of_dtp (bt[0]->bt_dtp) & ~SPART_VARR_NOT_NULL;
@@ -2266,8 +2396,10 @@ ssg_print_literal_as_sqlval (spar_sqlgen_t *ssg, ccaddr_t type, SPART *lit)
     }
   if ((NULL != type) && (NULL == lang))
     {
-      ccaddr_t dflt_xsd_type_of_box = xsd_type_of_box (value);
-      if ((type == dflt_xsd_type_of_box) || ((uname_xmlschema_ns_uri_hash_decimal == type) && (uname_xmlschema_ns_uri_hash_double == dflt_xsd_type_of_box)))
+      caddr_t dflt_xsd_type_of_box = xsd_type_of_box (value);
+      int box_is_plain_num = ((type == dflt_xsd_type_of_box) || ((uname_xmlschema_ns_uri_hash_decimal == type) && (uname_xmlschema_ns_uri_hash_double == dflt_xsd_type_of_box)));
+      dk_free_box (dflt_xsd_type_of_box);
+      if (box_is_plain_num)
         {
           ssg_print_box_as_sql_atom (ssg, value, SQL_ATOM_NARROW_OR_WIDE);
           return;
@@ -3262,24 +3394,14 @@ ssg_print_bop_cmp_expn (spar_sqlgen_t *ssg, SPART *tree, const char *bool_op, co
 void
 ssg_print_builtin_expn (spar_sqlgen_t *ssg, SPART *tree, int top_filter_op, ssg_valmode_t needed)
 {
-  SPART *arg1 = tree->_.builtin.args[0];
-  ssg_valmode_t arg1_native = sparp_expn_native_valmode (ssg->ssg_sparp, arg1);
+  const sparp_bif_desc_t *sbd = sparp_bif_descs + tree->_.builtin.desc_ofs;
+  SPART **args = tree->_.builtin.args;
+  SPART *arg1 = ((NULL != args) ? args[0] : NULL);
+  ssg_valmode_t arg1_native = ((NULL != args) ? sparp_expn_native_valmode (ssg->ssg_sparp, arg1) : NULL);
   int argctr;
   ssg_valmode_t op_fmt = NULL;
   int arg1_restr_bits;
-  int builtin_ret_bool;
-  switch (tree->_.builtin.btype)
-    {
-    case BOUND_L: case SAMETERM_L: case LIKE_L: case IN_L:
-    case isBLANK_L: case isURI_L: case isIRI_L: case isREF_L: case isLITERAL_L:
-    case REGEX_L: case LANGMATCHES_L:
-      builtin_ret_bool = 1;
-      break;
-    default:
-      builtin_ret_bool = 0;
-      break;
-    }
-  if (builtin_ret_bool && (
+  if ((SSG_VALMODE_BOOL == sbd->sbd_ret_valmode) && (
       (SSG_VALMODE_LONG != needed) && (SSG_VALMODE_SQLVAL != needed) && (SSG_VALMODE_NUM != needed)
       && (SSG_VALMODE_SHORT_OR_LONG != needed) && (SSG_VALMODE_AUTO != needed) && (SSG_VALMODE_BOOL != needed) ) )
     {
@@ -3326,7 +3448,7 @@ ssg_print_builtin_expn (spar_sqlgen_t *ssg, SPART *tree, int top_filter_op, ssg_
         ssg_puts (rtext);
         return;
       }
-    case SAMETERM_L:
+    case SPAR_BIF_SAMETERM:
       {
         SPART *arg2 = tree->_.builtin.args[1];
         SPART *expanded;
@@ -3342,7 +3464,7 @@ ssg_print_builtin_expn (spar_sqlgen_t *ssg, SPART *tree, int top_filter_op, ssg_
           {
             SPART *potential_literal = ((arg1_restrs & SPART_VARR_IS_REF) ? arg2 : arg1);
             expanded = spartlist (ssg->ssg_sparp, 3, BOP_AND,
-              spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)isIRI_L, t_list (1, potential_literal)),
+              sparp_make_builtin_call (ssg->ssg_sparp, IRI_L, (SPART **)t_list (1, potential_literal)),
               spartlist (ssg->ssg_sparp, 3, BOP_EQ, arg1, arg2) );
             goto expanded_sameterm_ready; /* see below */
           }
@@ -3351,29 +3473,29 @@ ssg_print_builtin_expn (spar_sqlgen_t *ssg, SPART *tree, int top_filter_op, ssg_
           spartlist (ssg->ssg_sparp, 3, BOP_AND,
             spartlist (ssg->ssg_sparp, 3, BOP_OR,
               spartlist (ssg->ssg_sparp, 3, BOP_EQ,
-                spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)DATATYPE_L, t_list (1, arg1)),
-                spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)DATATYPE_L, t_list (1, arg2)) ),
+                sparp_make_builtin_call (ssg->ssg_sparp, DATATYPE_L, (SPART **)t_list (1, arg1)),
+                sparp_make_builtin_call (ssg->ssg_sparp, DATATYPE_L, (SPART **)t_list (1, arg2)) ),
               spartlist (ssg->ssg_sparp, 3, BOP_AND,
                 spartlist (ssg->ssg_sparp, 3, BOP_NOT,
-                  spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1,
-                      spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)DATATYPE_L, t_list (1, arg1)) ) ),
+                  sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1,
+                      sparp_make_builtin_call (ssg->ssg_sparp, DATATYPE_L, (SPART **)t_list (1, arg1)) ) ),
                   NULL ),
                 spartlist (ssg->ssg_sparp, 3, BOP_NOT,
-                  spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1,
-                      spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)DATATYPE_L, t_list (1, arg2)) ) ),
+                  sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1,
+                      sparp_make_builtin_call (ssg->ssg_sparp, DATATYPE_L, (SPART **)t_list (1, arg2)) ) ),
                   NULL ) ) ),
             spartlist (ssg->ssg_sparp, 3, BOP_OR,
               spartlist (ssg->ssg_sparp, 3, BOP_EQ,
-                spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANG_L, t_list (1, arg1)),
-                spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANG_L, t_list (1, arg2)) ),
+                sparp_make_builtin_call (ssg->ssg_sparp, LANG_L, (SPART **)t_list (1, arg1)),
+                sparp_make_builtin_call (ssg->ssg_sparp, LANG_L, (SPART **)t_list (1, arg2)) ),
               spartlist (ssg->ssg_sparp, 3, BOP_AND,
                 spartlist (ssg->ssg_sparp, 3, BOP_NOT,
-                  spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1,
-                      spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANG_L, t_list (1, arg1)) ) ),
+                  sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1,
+                      sparp_make_builtin_call (ssg->ssg_sparp, LANG_L, (SPART **)t_list (1, arg1)) ) ),
                   NULL ),
                 spartlist (ssg->ssg_sparp, 3, BOP_NOT,
-                  spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1,
-                      spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANG_L, t_list (1, arg2)) ) ),
+                  sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1,
+                      sparp_make_builtin_call (ssg->ssg_sparp, LANG_L, (SPART **)t_list (1, arg2)) ) ),
                   NULL ) ) ) ) );
 
 expanded_sameterm_ready:
@@ -3396,6 +3518,33 @@ expanded_sameterm_ready:
           ssg_puts (" as varchar))");
         }
       return;
+    case SPAR_BIF_COALESCE:
+      {
+        ssg_valmode_t union_valmode = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
+        if (union_valmode != needed)
+          ssg_print_valmoded_scalar_expn (ssg, tree, needed, union_valmode, NULL_ASNAME);
+        else
+          {
+            int argctr, argcount = BOX_ELEMENTS (tree->_.builtin.args);
+            ssg_puts (" coalesce ("); ssg->ssg_indent++;
+            for (argctr = 0; argctr < argcount; argctr++)
+              {
+                if (argctr) ssg_putchar (',');
+                ssg_print_scalar_expn (ssg, tree->_.builtin.args[argctr], union_valmode, NULL_ASNAME);
+              }
+            ssg_putchar (')'); ssg->ssg_indent--;
+          }
+        return;
+      }
+    case SPAR_BIF_IF:
+      ssg_puts (" case ("); ssg->ssg_indent++;
+      ssg_print_valmoded_scalar_expn (ssg, arg1, SSG_VALMODE_BOOL, arg1_native, NULL_ASNAME);
+      ssg_puts (") when 0 then (");
+      ssg_print_scalar_expn (ssg, tree->_.builtin.args[2], needed, NULL_ASNAME);
+      ssg_puts (") else (");
+      ssg_print_scalar_expn (ssg, tree->_.builtin.args[1], needed, NULL_ASNAME);
+      ssg_puts (") end"); ssg->ssg_indent--;
+      return;
     case IN_L:
       if ((SSG_VALMODE_BOOL != needed) && (SSG_VALMODE_NUM != needed) && (SSG_VALMODE_SQLVAL != needed) && (SSG_VALMODE_LONG != needed))
         {
@@ -3474,7 +3623,7 @@ IN_op_fnt_found:
       END_DO_BOX_FAST;
       ssg_puts ("))");
       return;
-    case isBLANK_L:
+    case SPAR_BIF_ISBLANK:
       if ((SSG_VALMODE_BOOL != needed) && (SSG_VALMODE_SQLVAL != needed) && (SSG_VALMODE_LONG != needed))
         ssg_print_valmoded_scalar_expn (ssg, tree, needed, SSG_VALMODE_BOOL, NULL_ASNAME);
       else
@@ -3489,14 +3638,17 @@ IN_op_fnt_found:
             {
               const char *tmpl = ((top_filter_op || (NULL == arg1_native->qmf01blankOfShortTmpl)) ?
                 arg1_native->qmfIsblankOfShortTmpl : arg1_native->qmf01blankOfShortTmpl );
-              ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
+              if ((arg1_restr_bits & SPART_VARR_NOT_NULL) && !strcmp (tmpl, " isnotnull (^{tree}^)"))
+                ssg_puts_with_comment (" 1", "optimized isBLANK, isnotnull() of nonnull");
+              else
+                ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
             }
           else if (SSG_VALMODE_LONG == arg1_native)
             ssg_print_tmpl (ssg, arg1_native,
               (top_filter_op ?
                 " ((isiri_id (^{tree}^) and (^{tree}^ >= min_bnode_iri_id ()))" :
                 " either (isiri_id (^{tree}^), gte (^{tree}^, min_bnode_iri_id ()), 0)" ),
-              NULL, NULL, arg1, NULL );
+              NULL, NULL, arg1, NULL_ASNAME );
           else if (SSG_VALMODE_SQLVAL == arg1_native)
             ssg_print_tmpl (ssg, arg1_native, " DB.DBA.RDF_IS_BLANK_REF (^{tree}^)", NULL, NULL, arg1, NULL_ASNAME);
           else
@@ -3517,15 +3669,15 @@ IN_op_fnt_found:
           ssg_print_scalar_expn (ssg, arg1, SSG_VALMODE_LANGUAGE, NULL_ASNAME);
         }
       return;
-    case isURI_L:
-    case isIRI_L:
+    case SPAR_BIF_ISURI:
+    case SPAR_BIF_ISIRI:
       arg1_restr_bits = sparp_restr_bits_of_expn (ssg->ssg_sparp, arg1);
       if (arg1_restr_bits & (SPART_VARR_IS_LIT | SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT))
         {
           ssg_puts_with_comment (" 0", "optimized isIRI");
           return;
         }
-      if (arg1_restr_bits & SPART_VARR_IS_REF & SPART_VARR_NOT_NULL)
+      if ((arg1_restr_bits & (SPART_VARR_IS_REF | SPART_VARR_NOT_NULL)) == (SPART_VARR_IS_REF | SPART_VARR_NOT_NULL))
         {
           ssg_puts_with_comment (" 1", "optimized isIRI");
           return;
@@ -3534,33 +3686,42 @@ IN_op_fnt_found:
         {
           const char *tmpl = ((top_filter_op || (NULL == arg1_native->qmf01uriOfShortTmpl)) ?
             arg1_native->qmfIsuriOfShortTmpl : arg1_native->qmf01uriOfShortTmpl );
-          ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
+          if ((arg1_restr_bits & SPART_VARR_NOT_NULL) && !strcmp (tmpl, " isnotnull (^{tree}^)"))
+            ssg_puts_with_comment (" 1", "optimized isIRI, isnotnull() of nonnull");
+          else
+            ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
         }
       else if (SSG_VALMODE_LONG == arg1_native)
         ssg_print_tmpl (ssg, arg1_native,
           (top_filter_op ?
             " ((isiri_id (^{tree}^) and (^{tree}^ < min_bnode_iri_id ()))" :
             " either (isiri_id (^{tree}^), lt (^{tree}^, min_bnode_iri_id ()), 0)" ),
-          NULL, NULL, arg1, NULL );
+          NULL, NULL, arg1, NULL_ASNAME );
       else if (SSG_VALMODE_SQLVAL == arg1_native)
         ssg_print_tmpl (ssg, arg1_native, " DB.DBA.RDF_IS_URI_REF (^{tree}^)", NULL, NULL, arg1, NULL_ASNAME);
       else
         spar_sqlprint_error ("ssg_" "print_builtin_expn(): bad native type for isURI()");
       return;
-    case isREF_L:
+    case SPAR_BIF_ISREF:
       arg1_restr_bits = sparp_restr_bits_of_expn (ssg->ssg_sparp, arg1);
       if (arg1_restr_bits & (SPART_VARR_IS_LIT | SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT))
         {
           ssg_puts_with_comment (" 0", "optimized isREF");
           return;
         }
-      if (arg1_restr_bits & SPART_VARR_IS_REF & SPART_VARR_NOT_NULL)
+      if ((arg1_restr_bits & (SPART_VARR_IS_REF | SPART_VARR_NOT_NULL)) == (SPART_VARR_IS_REF | SPART_VARR_NOT_NULL))
         {
           ssg_puts_with_comment (" 1", "optimized isREF");
           return;
         }
       if (IS_BOX_POINTER (arg1_native))
-        ssg_print_tmpl (ssg, arg1_native, arg1_native->qmfIsrefOfShortTmpl, NULL, NULL, arg1, NULL_ASNAME);
+        {
+          const char *tmpl = arg1_native->qmfIsrefOfShortTmpl;
+          if ((arg1_restr_bits & SPART_VARR_NOT_NULL) && !strcmp (tmpl, " isnotnull (^{tree}^)"))
+            ssg_puts_with_comment (" 1", "optimized isREF, isnotnull() of nonnull");
+          else
+            ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
+        }
       else if (SSG_VALMODE_LONG == arg1_native)
         ssg_print_tmpl (ssg, arg1_native, " isiri_id (^{tree}^)", NULL, NULL, arg1, NULL);
       else if (SSG_VALMODE_SQLVAL == arg1_native)
@@ -3568,30 +3729,65 @@ IN_op_fnt_found:
       else
         spar_sqlprint_error ("ssg_" "print_builtin_expn(): bad native type for isREF()");
       return;
-    case isLITERAL_L:
+    case SPAR_BIF_ISLITERAL:
       arg1_restr_bits = sparp_restr_bits_of_expn (ssg->ssg_sparp, arg1);
       if (arg1_restr_bits & (SPART_VARR_IS_REF | SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT))
         {
           ssg_puts_with_comment (" 0", "optimized isLITERAL");
           return;
         }
-      if (arg1_restr_bits & SPART_VARR_IS_LIT & SPART_VARR_NOT_NULL)
+      if ((arg1_restr_bits & (SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL)) == (SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL))
         {
           ssg_puts_with_comment (" 1", "optimized isLITERAL");
           return;
         }
       if (IS_BOX_POINTER (arg1_native))
-        ssg_print_tmpl (ssg, arg1_native, arg1_native->qmfIslitOfShortTmpl, NULL, NULL, arg1, NULL_ASNAME);
+        {
+          const char *tmpl = arg1_native->qmfIslitOfShortTmpl;
+          if ((arg1_restr_bits & SPART_VARR_NOT_NULL) && !strcmp (tmpl, " isnotnull (^{tree}^)"))
+            ssg_puts_with_comment (" 1", "optimized isLITERAL, isnotnull() of nonnull");
+          else
+            ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
+        }
       else if (SSG_VALMODE_LONG == arg1_native)
         ssg_print_tmpl (ssg, arg1_native,
           (top_filter_op ?
             " (not (isiri_id (^{tree}^)))" : " iszero (isiri_id (^{tree}^))" ),
-          NULL, NULL, arg1, NULL );
+          NULL, NULL, arg1, NULL_ASNAME );
       else if (SSG_VALMODE_SQLVAL == arg1_native)
         ssg_print_tmpl (ssg, arg1_native, " DB.DBA.RDF_IS_LITERAL (^{tree}^)", NULL, NULL, arg1, NULL_ASNAME);
       else
         spar_sqlprint_error ("ssg_" "print_builtin_expn(): bad native type for isLITERAL()");
       return;
+    case SPAR_BIF_ISNUMERIC:
+      arg1_restr_bits = sparp_restr_bits_of_expn (ssg->ssg_sparp, arg1);
+      if (arg1_restr_bits & (SPART_VARR_IS_REF | SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT))
+        {
+          ssg_puts_with_comment (" 0", "optimized isNUMERIC");
+          return;
+        }
+      if (IS_BOX_POINTER (arg1_native))
+        {
+          const char *tmpl = arg1_native->qmfIsnumericOfShortTmpl;
+          if (NULL != tmpl)
+            {
+              if ((arg1_restr_bits & SPART_VARR_NOT_NULL) && !strcmp (tmpl, " isnotnull (^{tree}^)"))
+                ssg_puts_with_comment (" 1", "optimized isNUMERIC, isnotnull() of nonnull");
+              else
+                ssg_print_tmpl (ssg, arg1_native, tmpl, NULL, NULL, arg1, NULL_ASNAME);
+            }
+          else
+            {
+              ssg_puts (" isnumeric (");
+              ssg_print_scalar_expn (ssg, arg1, SSG_VALMODE_SQLVAL, NULL_ASNAME);
+              ssg_putchar (')');
+            }
+        }
+      else if ((SSG_VALMODE_LONG == arg1_native) || (SSG_VALMODE_SQLVAL == arg1_native))
+        ssg_print_tmpl (ssg, arg1_native, " isnumeric (^{tree}^)", NULL, NULL, arg1, NULL_ASNAME);
+      else
+        spar_sqlprint_error ("ssg_" "print_builtin_expn(): bad native type for isNUMERIC()");
+      return;
     case IRI_L:
       {
         if (SSG_VALMODE_BOOL == arg1_native)
@@ -3646,7 +3842,7 @@ IN_op_fnt_found:
           ssg_print_valmoded_scalar_expn (ssg, tree, needed, SSG_VALMODE_LONG, NULL_ASNAME);
         return;
       }
-    case STR_L:
+    case SPAR_BIF_STR:
       {
         if (SSG_VALMODE_SQLVAL == needed)
           {
@@ -3669,20 +3865,7 @@ IN_op_fnt_found:
           ssg_print_valmoded_scalar_expn (ssg, tree, needed, SSG_VALMODE_SQLVAL, NULL_ASNAME);
         return;
       }
-    case REGEX_L:
-      /*!!!TBD extra 'between'*/
-      ssg_puts (" rdf_regex_impl (");
-      ssg_print_scalar_expn (ssg, arg1, SSG_VALMODE_SQLVAL, NULL_ASNAME);
-      ssg_putchar (',');
-      ssg_print_scalar_expn (ssg, tree->_.builtin.args[1], SSG_VALMODE_SQLVAL, NULL_ASNAME);
-      if (3 == BOX_ELEMENTS (tree->_.builtin.args))
-        {
-          ssg_putchar (',');
-          ssg_print_scalar_expn (ssg, tree->_.builtin.args[2], SSG_VALMODE_SQLVAL, NULL_ASNAME);
-        }
-      ssg_putchar (')');
-      return;
-    case LANGMATCHES_L:
+    case SPAR_BIF_LANGMATCHES:
       arg1_restr_bits = sparp_restr_bits_of_expn (ssg->ssg_sparp, arg1);
       if (arg1_restr_bits & (SPART_VARR_IS_REF | SPART_VARR_ALWAYS_NULL))
         {
@@ -3696,7 +3879,33 @@ IN_op_fnt_found:
       ssg_putchar (')');
       return;
     default:
-      spar_sqlprint_error ("ssg_" "print_builtin_expn(): unsupported builtin");
+      {
+        ssg_valmode_t prev_arg_valmode = SSG_VALMODE_AUTO, arg_valmode;
+        int argctr;
+        switch (sbd->sbd_implementation)
+          {
+          case 'B': ssg_puts (" rdf_"); break;
+          case 'S': ssg_puts (" DB.DBA.rdf_"); break;
+          default: spar_internal_error (ssg->ssg_sparp, "Built-in function is not implemented"); break;
+          }
+        ssg_puts (sbd->sbd_name);
+        ssg_puts ("_impl");
+        ssg_puts (" (");
+        ssg->ssg_indent++;
+        DO_BOX_FAST (SPART *, arg, argctr, tree->_.builtin.args)
+          {
+            if (argctr)
+              ssg_puts (", ");
+            arg_valmode = ((argctr < (sizeof (sbd->sbd_arg_valmodes) / sizeof (sbd->sbd_arg_valmodes[0]))) ? sbd->sbd_arg_valmodes[argctr] : NULL);
+            if (NULL == arg_valmode)
+              arg_valmode = prev_arg_valmode;
+            ssg_print_scalar_expn (ssg, arg, arg_valmode, NULL_ASNAME);
+            prev_arg_valmode = arg_valmode;
+          }
+        END_DO_BOX_FAST;
+        ssg->ssg_indent--;
+        ssg_putchar (')');
+      }
       return;
     }
 }
@@ -3705,13 +3914,19 @@ IN_op_fnt_found:
 xqf_str_parser_desc_t *function_is_xqf_str_parser (caddr_t name)
 {
   long desc_idx;
+  if (!strncmp (name, "xpath:", 6))
+    name += 6;
   if (!strncmp (name, XFN_NS_URI, strlen (XFN_NS_URI)))
     name += strlen (XFN_NS_URI);
   else if (!strncmp (name, XS_NS_URI, strlen (XS_NS_URI)))
     name += strlen (XS_NS_URI);
   else
     return NULL;
-  if ('#' != name[0])
+  if ('/' == name[0])
+    name++;
+  if ('#' == name[0])
+    name++;
+  if (':' != name[0])
     return NULL;
   name++;
   desc_idx = ecm_find_name (name, xqf_str_parser_descs_ptr,
@@ -3764,7 +3979,7 @@ sparp_rettype_of_global_param (sparp_t *sparp, caddr_t name)
 
 
 ssg_valmode_t
-sparp_rettype_of_function (sparp_t *sparp, caddr_t name)
+sparp_rettype_of_function (sparp_t *sparp, caddr_t name, SPART *tree)
 {
   ssg_valmode_t res = sparp_find_valmode_by_name_prefix (sparp, name, SSG_VALMODE_SQLVAL);
   if (SSG_VALMODE_SPECIAL == res)
@@ -3777,12 +3992,29 @@ sparp_rettype_of_function (sparp_t *sparp, caddr_t name)
         return SSG_VALMODE_LONG; /* Fake but this works for use as arg of RDF_DIST_DESER_LONG */
       if (!strcmp (name, "SPECIAL::sql:RDF_DIST_DESER_LONG"))
         return SSG_VALMODE_LONG;
-      if (!strcmp (name, "SPECIAL::bif:MAX"))
+      if (!strcmp (name, "SPECIAL::bif:_LONG_MAX"))
         return SSG_VALMODE_LONG;
       if (!strcmp (name, "SPECIAL::bif:iri_to_id"))
         return SSG_VALMODE_LONG;
       if (!strcmp (name, "SPECIAL::bif:COUNT"))
         return SSG_VALMODE_SQLVAL;
+      if (!strcmp (name, "SPECIAL::bif:MIN") || !strcmp (name, "SPECIAL::bif:MAX"))
+        {
+          SPART **args = tree->_.funcall.argtrees;
+          SPART *arg1 = ((0 < BOX_ELEMENTS (args)) ? args[0] : NULL);
+          ssg_valmode_t arg1_native = sparp_expn_native_valmode (sparp, arg1);
+          if (IS_BOX_POINTER (arg1_native))
+            {
+              return SSG_VALMODE_SQLVAL;
+            }
+          if (SSG_VALMODE_NUM == arg1_native)
+            return SSG_VALMODE_NUM;
+          if (SSG_VALMODE_BOOL == arg1_native)
+            return SSG_VALMODE_BOOL;
+          return SSG_VALMODE_SQLVAL;
+        }
+      if (!strcmp (name, "SPECIAL::bif:AVG") || !strcmp (name, "SPECIAL::bif:SUM"))
+        return SSG_VALMODE_NUM;
       if (
         !strcmp (name, "SPECIAL::bif:__rgs_assert_cbk") ||
         !strcmp (name, "SPECIAL::bif:__rgs_assert") ||
@@ -3793,7 +4025,7 @@ sparp_rettype_of_function (sparp_t *sparp, caddr_t name)
     }
   if (!strncmp (name, "bif:", 4))
     {
-      caddr_t iduqname = sqlp_box_id_upcase (name+4);
+      caddr_t iduqname = t_sqlp_box_id_upcase (name+4);
       bif_type_t ** bt = (bif_type_t **) id_hash_get (name_to_bif_type, (char *) &iduqname);
       if (NULL != bt)
         {
@@ -3827,7 +4059,7 @@ sparp_rettype_of_function (sparp_t *sparp, caddr_t name)
 
 
 ssg_valmode_t
-sparp_argtype_of_function (sparp_t *sparp, caddr_t name, int arg_idx)
+sparp_argtype_of_function (sparp_t *sparp, caddr_t name, SPART *tree, int arg_idx)
 {
   ssg_valmode_t res = sparp_find_valmode_by_name_prefix (sparp, name, SSG_VALMODE_SQLVAL);
   if (SSG_VALMODE_SPECIAL == res)
@@ -3840,12 +4072,31 @@ sparp_argtype_of_function (sparp_t *sparp, caddr_t name, int arg_idx)
         return SSG_VALMODE_LONG;
       if (!strcmp (name, "SPECIAL::sql:RDF_DIST_DESER_LONG"))
         return SSG_VALMODE_LONG; /* Fake but this works for retvals of RDF_DIST_SER_LONG */
-      if (!strcmp (name, "SPECIAL::bif:MAX"))
+      if (!strcmp (name, "SPECIAL::bif:_LONG_MAX"))
         return SSG_VALMODE_LONG;
       if (!strcmp (name, "SPECIAL::bif:iri_to_id"))
         return SSG_VALMODE_SQLVAL;
       if (!strcmp (name, "SPECIAL::bif:COUNT"))
         return SSG_VALMODE_AUTO;
+      if (!strcmp (name, "SPECIAL::bif:MIN") || !strcmp (name, "SPECIAL::bif:MAX"))
+        {
+          SPART **args = tree->_.funcall.argtrees;
+          SPART *arg1 = ((0 < BOX_ELEMENTS (args)) ? args[0] : NULL);
+          ssg_valmode_t arg1_native = sparp_expn_native_valmode (sparp, arg1);
+          if (IS_BOX_POINTER (arg1_native))
+            {
+              if (arg1_native->qmfIsSubformatOfLongWhenEqToSql)
+                return arg1_native;
+              return SSG_VALMODE_SQLVAL;
+            }
+          if (SSG_VALMODE_NUM == arg1_native)
+            return SSG_VALMODE_NUM;
+          if (SSG_VALMODE_BOOL == arg1_native)
+            return SSG_VALMODE_BOOL;
+          return SSG_VALMODE_SQLVAL;
+        }
+      if (!strcmp (name, "SPECIAL::bif:AVG") || !strcmp (name, "SPECIAL::bif:SUM"))
+        return SSG_VALMODE_NUM;
       if (
         !strcmp (name, "SPECIAL::bif:__rgs_assert_cbk") ||
         !strcmp (name, "SPECIAL::bif:__rgs_assert") ||
@@ -3868,6 +4119,14 @@ ssg_prin_function_name (spar_sqlgen_t *ssg, ccaddr_t name)
   if (name == strstr (name, "bif:"))
     {
       name = name + 4;
+      if ('_' == name[0])
+        {
+          if (!strcasecmp(name, "_LONG_MAX"))
+            {
+              ssg_puts ("MAX");
+              return;
+            }
+        }
       if (!strcasecmp(name, "left"))
         ssg_puts ("\"LEFT\"");
       else if (!strcasecmp(name, "right"))
@@ -4020,19 +4279,21 @@ const char *ssg_tmpl_ref_short_of_X (qm_format_t *qm_fmt, ssg_valmode_t native)
   return NULL; /* Never reached, to keep compiler happy */
 }
 
+#define SSG_IDENTITY_VALMODED_TMPL ((const char *)1)
+
 const char *ssg_tmpl_X_of_Y (ssg_valmode_t needed, ssg_valmode_t native)
 {
   if (SSG_VALMODE_LONG == needed)
     {
-      if (SSG_VALMODE_LONG	== native)	return " ^{tree}^";
+      if (SSG_VALMODE_LONG	== native)	return SSG_IDENTITY_VALMODED_TMPL;
       if (SSG_VALMODE_SQLVAL	== native)	return " DB.DBA.RDF_LONG_OF_SQLVAL (^{tree}^)";
-      if (SSG_VALMODE_NUM	== native)	return " ^{tree}^";
+      if (SSG_VALMODE_NUM	== native)	return SSG_IDENTITY_VALMODED_TMPL;
     }
   else if (SSG_VALMODE_SQLVAL == needed)
     {
       if (SSG_VALMODE_LONG	== native)	return " __rdf_sqlval_of_obj /*l*/ (^{tree}^)";
-      if (SSG_VALMODE_SQLVAL	== native)	return " ^{tree}^";
-      if (SSG_VALMODE_NUM	== native)	return " ^{tree}^";
+      if (SSG_VALMODE_SQLVAL	== native)	return SSG_IDENTITY_VALMODED_TMPL;
+      if (SSG_VALMODE_NUM	== native)	return SSG_IDENTITY_VALMODED_TMPL;
     }
   else if (SSG_VALMODE_DATATYPE == needed)
     {
@@ -4049,15 +4310,15 @@ const char *ssg_tmpl_X_of_Y (ssg_valmode_t needed, ssg_valmode_t native)
     }
   else if (SSG_VALMODE_BOOL == needed)
     {
-      if (SSG_VALMODE_NUM	== native)	return " (^{tree}^)";
+      if (SSG_VALMODE_NUM	== native)	return SSG_IDENTITY_VALMODED_TMPL;
       if (SSG_VALMODE_LONG	== native)	return " DB.DBA.RDF_BOOL_OF_LONG (^{tree}^)";
-      if (SSG_VALMODE_SQLVAL	== native)	return " (^{tree}^)";
+      if (SSG_VALMODE_SQLVAL	== native)	return SSG_IDENTITY_VALMODED_TMPL;
     }
   else if (SSG_VALMODE_NUM == needed)
     {
-      if (SSG_VALMODE_SQLVAL	== native)	return " (^{tree}^)";
-      if (SSG_VALMODE_LONG	== native)	return " (^{tree}^)";
-      return ((native->qmfIsSubformatOfLong || native->qmfIsSubformatOfLongWhenEqToSql) ? " ^{tree}^" : native->qmfLongOfShortTmpl);
+      if (SSG_VALMODE_SQLVAL	== native)	return SSG_IDENTITY_VALMODED_TMPL;
+      if (SSG_VALMODE_LONG	== native)	return SSG_IDENTITY_VALMODED_TMPL;
+      return ((native->qmfIsSubformatOfLong || native->qmfIsSubformatOfLongWhenEqToSql) ? SSG_IDENTITY_VALMODED_TMPL : native->qmfLongOfShortTmpl);
     }
   spar_internal_error (NULL, "ssg_tmpl_X_of_Y(): bad mode needed");
   return NULL; /* Never reached, to keep compiler happy */
@@ -4067,6 +4328,7 @@ const char *ssg_tmpl_X_of_Y (ssg_valmode_t needed, ssg_valmode_t native)
 void
 ssg_print_valmoded_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, ssg_valmode_t native, const char *asname)
 {
+  const char *tmpl;
   if (native == needed)
     {
 #if 0
@@ -4198,6 +4460,7 @@ ssg_print_valmoded_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t n
         tmpl = ssg_tmpl_ref_short_of_X (needed, native);
       else
         tmpl = ssg_tmpl_literal_short_of_X (needed, native);
+      /* \c needed is passed to ssg_print_tmpl, not native, because custom string is in needed, not in native */
       ssg_print_tmpl (ssg, needed, tmpl, NULL, NULL, tree, asname);
       return;
     }
@@ -4221,7 +4484,11 @@ ssg_print_valmoded_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t n
       ssg_print_valmoded_scalar_expn (ssg, tree, SSG_VALMODE_LONG, native, asname);
       return;
     }
-  ssg_print_tmpl (ssg, native, ssg_tmpl_X_of_Y (needed, native), NULL, NULL, tree, asname);
+  tmpl = ssg_tmpl_X_of_Y (needed, native);
+  if (SSG_IDENTITY_VALMODED_TMPL == tmpl)
+    ssg_print_scalar_expn (ssg, tree, native, asname);
+  else
+    ssg_print_tmpl (ssg, native, tmpl, NULL, NULL, tree, asname);
   return;
 }
 
@@ -4272,11 +4539,12 @@ ssg_triple_retval_alias (spar_sqlgen_t *ssg, SPART *triple, int field_idx, int c
 void
 ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, const char *asname)
 {
+  ssg_valmode_t native = NULL;
   if (THR_IS_STACK_OVERFLOW (THREAD_CURRENT_THREAD, &ssg, 4000))
     spar_internal_error (NULL, "ssg_print_scalar_expn (): stack overflow");
 
   if (SSG_VALMODE_AUTO == needed)
-    needed = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
+    needed = native = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
   switch (SPART_TYPE (tree))
     {
     case BOP_AND:	ssg_print_bop_bool_expn (ssg, tree, " AND "	, " __and ("	, 0, needed); goto print_asname;
@@ -4319,16 +4587,6 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
     case SPAR_BLANK_NODE_LABEL:
     case SPAR_VARIABLE:
       {
-#if 0
-        ssg_valmode_t vmode = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
-        if (vmode == needed)
-          {
-            sparp_equiv_t *eq = ssg->ssg_equivs[tree->_.var.equiv_idx];
-            ssg_print_equiv_retval_expn (ssg, sparp_find_gp_by_alias (ssg->ssg_sparp, tree->_.var.selid), eq, 0, 1, needed, NULL_ASNAME);
-          }
-        else
-          ssg_print_valmoded_scalar_expn (ssg, tree, needed, vmode);
-#else
         if (SPART_VARNAME_IS_GLOB (tree->_.var.vname))
           {
             ssg_print_global_param (ssg, tree, needed);
@@ -4336,15 +4594,15 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
           }
         if (NULL == ssg->ssg_equivs) /* This is for case when parts of the SPARQL front-end are used to produce small SQL fragments */
           {
-            ssg_valmode_t vmode;
-            vmode = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
-            if (vmode == needed)
+            if (NULL == native)
+              native = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
+            if (native == needed)
               {
                 ssg_putchar (' ');
                 ssg_prin_id (ssg, tree->_.var.vname);
                 goto print_asname; /* see below */
               }
-            ssg_print_valmoded_scalar_expn (ssg, tree, needed, vmode, asname);
+            ssg_print_valmoded_scalar_expn (ssg, tree, needed, native, asname);
           }
         else
           {
@@ -4370,7 +4628,6 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
 #endif
             ssg_print_equiv_retval_expn (ssg, gp, eq, SSG_RETVAL_FROM_JOIN_MEMBER | SSG_RETVAL_MUST_PRINT_SOMETHING | SSG_RETVAL_CAN_PRINT_NULL | SSG_RETVAL_USES_ALIAS, needed, asname);
           }
-#endif
         return;
       }
     case SPAR_BUILT_IN_CALL:
@@ -4393,7 +4650,8 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
       {
         int curr_arg_is_long, prev_arg_is_long = 0, arg_ctr, arg_count = BOX_ELEMENTS (tree->_.funcall.argtrees);
         xqf_str_parser_desc_t *parser_desc;
-	ssg_valmode_t native = sparp_rettype_of_function (ssg->ssg_sparp, tree->_.funcall.qname);
+        if (NULL == native)
+          native = sparp_rettype_of_function (ssg->ssg_sparp, tree->_.funcall.qname, tree);
         if (native != needed)
           {
             ssg_print_valmoded_scalar_expn (ssg, tree, needed, native, asname);
@@ -4463,7 +4721,7 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
         for (arg_ctr = 0; arg_ctr < arg_count; arg_ctr++)
           {
             SPART *arg = tree->_.funcall.argtrees[arg_ctr];
-            ssg_valmode_t argtype = sparp_argtype_of_function (ssg->ssg_sparp, tree->_.funcall.qname, arg_ctr);
+            ssg_valmode_t argtype = sparp_argtype_of_function (ssg->ssg_sparp, tree->_.funcall.qname, tree, arg_ctr);
             if (arg_ctr > 0)
               ssg_putchar (',');
             curr_arg_is_long = SPAR_FUNCALL_ARG_IS_LONG (arg);
@@ -4559,7 +4817,8 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
           }
         if (SSG_VALMODE_NUM == needed)
           {
-            ssg_valmode_t native = sparp_lit_native_valmode (tree);
+            if (NULL == native)
+              native = sparp_lit_native_valmode (tree);
             if (SSG_VALMODE_NUM == native)
               ssg_print_literal_as_sqlval (ssg, NULL, tree);
             else
@@ -4653,13 +4912,14 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
       goto print_asname;
     case SPAR_RETVAL:
       {
-        ssg_valmode_t vmode = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
-        if (vmode != needed)
+        if (NULL == native)
+          native = sparp_expn_native_valmode (ssg->ssg_sparp, tree);
+        if (native != needed)
           {
-            ssg_print_valmoded_scalar_expn (ssg, tree, needed, vmode, asname);
+            ssg_print_valmoded_scalar_expn (ssg, tree, needed, native, asname);
             return;
           }
-        ssg_print_retval (ssg, tree, vmode, asname);
+        ssg_print_retval (ssg, tree, native, asname);
         return;
       }
     case SPAR_QM_SQL_FUNCALL:
@@ -4686,7 +4946,9 @@ ssg_print_scalar_expn (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t needed, co
             }
           goto print_asname;
         }
-      if ((SSG_VALMODE_SQLVAL != needed) && (SSG_VALMODE_LONG != needed) && (SSG_VALMODE_NUM != needed))
+      /*if (NULL == native)
+        native = sparp_expn_native_valmode (ssg->ssg_sparp, tree);*/
+      if (/*(native != needed) &&*/ (SSG_VALMODE_SQLVAL != needed) && (SSG_VALMODE_LONG != needed) && (SSG_VALMODE_NUM != needed))
         {
           ssg_print_valmoded_scalar_expn (ssg, tree, needed, SSG_VALMODE_LONG, asname);
           return;
@@ -4725,6 +4987,33 @@ print_asname:
 }
 
 void
+ssg_print_service_rset_item (spar_sqlgen_t *ssg, SPART *service_gp, caddr_t selid, caddr_t e_varname)
+{
+  int pos = -1;
+  char buf[50];
+  SPART *sinv = sparp_get_option (ssg->ssg_sparp, service_gp->_.gp.options, SPAR_SERVICE_INV);
+  DO_BOX_FAST_REV (caddr_t, vname, pos, sinv->_.sinv.rset_varnames)
+    {
+      if (!strcmp (e_varname, vname))
+break;
+    }
+  END_DO_BOX_FAST_REV;
+  if (0 > pos)
+    spar_internal_error (ssg->ssg_sparp, "ssg_" "print_service_rset_item(): service retval not in rset_varnames");
+#ifdef NDEBUG
+  ssg_putchar (' ');
+#else
+  ssg_puts (" /*sinv[*/ ");
+#endif
+  ssg_prin_id (ssg, selid);
+  sprintf (buf, ".rset[%d] ", pos);
+  ssg_puts (buf);
+#ifndef NDEBUG
+  ssg_puts ("/*]sinv*/ ");
+#endif
+}
+
+void
 ssg_print_retval (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t vmode, const char *asname)
 {
   caddr_t e_varname = NULL, full_vname = NULL;
@@ -4749,28 +5038,7 @@ ssg_print_retval (spar_sqlgen_t *ssg, SPART *tree, ssg_valmode_t vmode, const ch
         }
       if (SERVICE_L == tree->_.retval.gp->_.gp.subtype)
     {
-      int pos = -1;
-      char buf[50];
-      SPART *sinv = sparp_get_option (ssg->ssg_sparp, tree->_.retval.gp->_.gp.options, SPAR_SERVICE_INV);
-      DO_BOX_FAST_REV (caddr_t, vname, pos, sinv->_.sinv.rset_varnames)
-        {
-          if (!strcmp (e_varname, vname))
-            break;
-        }
-      END_DO_BOX_FAST_REV;
-      if (0 > pos)
-        spar_internal_error (ssg->ssg_sparp, "ssg_" "print_retval(): service retval not in rset_varnames");
-#ifdef NDEBUG
-      ssg_putchar (' ');
-#else
-      ssg_puts (" /*sinv[*/ ");
-#endif
-      ssg_prin_id (ssg, tree->_.retval.selid);
-      sprintf (buf, ".rset[%d] ", pos);
-      ssg_puts (buf);
-#ifndef NDEBUG
-      ssg_puts ("/*]sinv*/ ");
-#endif
+          ssg_print_service_rset_item (ssg, tree->_.retval.gp, tree->_.retval.selid, e_varname);
       goto print_asname; /* see below */
     }
     }
@@ -4821,12 +5089,16 @@ retval_without_var:
 #endif
   if (NULL != tree->_.retval.tabid)
     {
+      if (0 > dk_set_position_of_string (ssg->ssg_valid_ret_tabids, tree->_.retval.tabid))
+        spar_internal_error (ssg->ssg_sparp, "ssg_" "print_retval(): tabid is used outside its scope");
       ssg_prin_id (ssg, tree->_.retval.tabid);
       ssg_putchar ('.');
       full_vname = ssg_triple_retval_alias (ssg, tree->_.retval.triple, tree->_.retval.tr_idx, 0, tree->_.retval.vname);
     }
   else if (NULL != tree->_.retval.selid)
     {
+      if (0 > dk_set_position_of_string (ssg->ssg_valid_ret_selids, tree->_.retval.selid))
+        spar_internal_error (ssg->ssg_sparp, "ssg_" "print_retval(): selid is used outside its scope");
       ssg_prin_id (ssg, tree->_.retval.selid);
       ssg_putchar ('.');
       full_vname = tree->_.retval.vname;
@@ -5167,13 +5439,13 @@ ssg_print_fld_var_restrictions_ex (spar_sqlgen_t *ssg, quad_map_t *qmap, qm_valu
         ssg_print_tmpl (ssg, field->qmvFormat, "(^{alias-0}^.^{column-0}^ is not null)", tabid, field, NULL, NULL_ASNAME);
     }
 /* SPONGE_SEEALSO () as a fake filter for a variable */
-  if ((NULL != env->spare_grab.rgc_sa_preds) &&
+  if ((NULL != env->spare_src.ssrc_grab.rgc_sa_preds) &&
     ssg->ssg_seealso_enabled &&
     (SPAR_VARIABLE == SPART_TYPE (fld_tree)) &&
     !(SPART_VARR_IS_LIT & tree_restr) &&
     !(SPART_VARR_EXTERNAL & tree_restr) &&
-    ((0 <= dk_set_position_of_string (env->spare_grab.rgc_sa_vars, fld_tree->_.var.vname)) ||
-      (0 <= dk_set_position_of_string (env->spare_grab.rgc_vars, fld_tree->_.var.vname)) ) )
+    ((0 <= dk_set_position_of_string (env->spare_src.ssrc_grab.rgc_sa_vars, fld_tree->_.var.vname)) ||
+      (0 <= dk_set_position_of_string (env->spare_src.ssrc_grab.rgc_vars, fld_tree->_.var.vname)) ) )
     {
 /* External variable should be checked by this fake predicate at place of origin, hence no check here.
 It's an open issue what to do if seealso is enabled only in scalar subquery.
@@ -5248,35 +5520,35 @@ ssg_print_retval_restrictions_ex (spar_sqlgen_t *ssg, SPART *retval, rdf_val_ran
     {
       ssg_print_where_or_and (ssg, "nullable retval is not null");
       ssg_print_scalar_expn (ssg,
-        spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1, retval)),
+        sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1, retval)),
         SSG_VALMODE_BOOL, NULL_ASNAME);
     }
   if ((SPART_VARR_IS_BLANK & tree_restr) && (!(SPART_VARR_IS_BLANK & retval_restr)))
     {
       ssg_print_where_or_and (ssg, "retval is blank node");
       ssg_print_scalar_expn (ssg,
-        spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)isBLANK_L, t_list (1, retval)),
+        sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISBLANK, (SPART **)t_list (1, retval)),
         SSG_VALMODE_BOOL, NULL_ASNAME);
     }
   else if ((SPART_VARR_IS_IRI & tree_restr) && (!(SPART_VARR_IS_IRI & retval_restr)))
     {
       ssg_print_where_or_and (ssg, "retval is IRI");
       ssg_print_scalar_expn (ssg,
-        spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)isIRI_L, t_list (1, retval)),
+        sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISIRI, (SPART **)t_list (1, retval)),
         SSG_VALMODE_BOOL, NULL_ASNAME);
     }
   else if ((SPART_VARR_IS_REF & tree_restr) && (!(SPART_VARR_IS_REF & retval_restr)))
     {
       ssg_print_where_or_and (ssg, "'any' retval is a reference");
       ssg_print_scalar_expn (ssg,
-        spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)isREF_L, t_list (1, retval)),
+        sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISREF, (SPART **)t_list (1, retval)),
         SSG_VALMODE_BOOL, NULL_ASNAME);
     }
   else if ((SPART_VARR_IS_LIT & tree_restr) && (!(SPART_VARR_IS_LIT & retval_restr)))
     {
       ssg_print_where_or_and (ssg, "'any' variable is a literal");
       ssg_print_scalar_expn (ssg,
-        spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)isLITERAL_L, t_list (1, retval)),
+        sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISLITERAL, (SPART **)t_list (1, retval)),
         SSG_VALMODE_BOOL, NULL_ASNAME);
     }
 /*!!! TBD: checks for type, lang */
@@ -5425,6 +5697,8 @@ ssg_print_equiv_retval_expn (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, i
           caddr_t tabid = var->_.var.tabid;
           if (NULL == tabid)
             continue;
+          if (0 > dk_set_position_of_string (ssg->ssg_valid_ret_tabids, tabid))
+            continue;
           ssg_print_tr_var_expn (ssg, var, needed, asname);
           return 1;
         }
@@ -5440,6 +5714,8 @@ ssg_print_equiv_retval_expn (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, i
           caddr_t selid = var->_.var.selid;
           if (NULL == selid)
             continue;
+          if (0 > dk_set_position_of_string (ssg->ssg_valid_ret_selids, selid))
+            continue;
           SPART_AUTO (rv, rv_buf, SPAR_RETVAL);
           memcpy (&(rv->_.retval), &(var->_.var), sizeof (rv->_.var));
           rv->_.var.selid = selid;
@@ -5467,6 +5743,8 @@ ssg_print_equiv_retval_expn (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, i
           SPART_buf rv_buf;
           SPART *rv;
           ssg_valmode_t native;
+          if (0 > dk_set_position_of_string (ssg->ssg_valid_ret_selids, gp->_.gp.selid))
+            spar_internal_error (ssg->ssg_sparp, "ssg_" "print_equiv_retval_expn(): union selid is out of scope");
           SPART_AUTO (rv, rv_buf, SPAR_RETVAL);
           rv->_.retval.equiv_idx = eq->e_own_idx;
           sparp_rvr_copy (ssg->ssg_sparp, &(rv->_.retval.rvr), &(eq->e_rvr));
@@ -5493,6 +5771,10 @@ ssg_print_equiv_retval_expn (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, i
   switch (gp->_.gp.subtype)
     {
     case SELECT_L:
+      if (0 > dk_set_position_of_string (ssg->ssg_valid_ret_selids, gp->_.gp.selid))
+        spar_internal_error (ssg->ssg_sparp, "ssg_" "print_equiv_retval_expn(): select selid is out of scope");
+      /* no break */
+    case SERVICE_L:
       {
         SPART_buf rv_buf;
         SPART *rv;
@@ -5513,6 +5795,8 @@ ssg_print_equiv_retval_expn (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, i
           }
         if (flags & SSG_RETVAL_OPTIONAL_MAKES_NULLABLE)
           rv->_.retval.optional_makes_nullable = 1;
+        if (SERVICE_L == gp->_.gp.subtype)
+          rv->_.retval.gp = gp;
         ssg_print_valmoded_scalar_expn (ssg, rv, needed, native, asname);
         return 1;
       }
@@ -5658,19 +5942,43 @@ ssg_print_nice_equality_for_var_and_eq_fixed_val (spar_sqlgen_t *ssg, rdf_val_ra
 
 void
 ssg_print_equivalences (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, dk_set_t jleft_aliases,
-  ccaddr_t jright_alias, int print_join_conds, int print_equs_to_globals )
+  ccaddr_t jright_alias, int print_cross_join_conds, int print_inner_filter_conds, int print_equs_to_globals )
 {
   int var_ctr, var2_ctr;
   int sub_ctr, sub2_ctr;
   int good_eq_found = 0;
   int retry_count = 0;
   int weak_eq_skipped = 0;
+  int restrs_not_filtered_in_subqs = eq->e_replaces_filter;
   if (!print_equs_to_globals)
     goto print_cross_equs; /* see below */;
-  if ((eq->e_replaces_filter) && (0 == eq->e_gspo_uses) &&
+  /* A special case exists: if the equiv replaces NOT NULL filter then it should be checked for the output of every OPTIONAL subq. */
+  if ((SPART_VARR_NOT_NULL & restrs_not_filtered_in_subqs) && (UNION_L != eq->e_gp->_.gp.subtype))
+    {
+      int sub_ctr;
+      DO_BOX_FAST (ptrlong, sub_eq_idx, sub_ctr, eq->e_subvalue_idxs)
+        {
+          sparp_equiv_t *sub_eq = SPARP_EQUIV (ssg->ssg_sparp, sub_eq_idx);
+          SPART *sub_gp = sub_eq->e_gp;
+          ssg_valmode_t sub_native;
+          int col_count;
+          if ((OPTIONAL_L != sub_gp->_.gp.subtype) && (SPART_VARR_NOT_NULL & sub_eq->e_rvr.rvrRestrictions))
+            continue;
+          sub_native = sparp_equiv_native_valmode (ssg->ssg_sparp, sub_gp, sub_eq);
+          col_count = ((IS_BOX_POINTER (sub_native)) ? sub_native->qmfColumnCount : 1);
+          if (0 < col_count)
+            {
+              const char *eq_asname = ((1 == col_count) ? NULL_ASNAME : (COL_IDX_ASNAME + 0));
+              ssg_print_where_or_and (ssg, "an optional from subq is forced to be not null");
+              ssg_print_equiv_retval_expn (ssg, sub_gp, sub_eq, SSG_RETVAL_FROM_GOOD_SELECTED | SSG_RETVAL_MUST_PRINT_SOMETHING, sub_native, eq_asname);
+              ssg_puts (" IS NOT NULL");
+            }
+        }
+      END_DO_BOX_FAST;
+    }
+  if (restrs_not_filtered_in_subqs && (0 == eq->e_gspo_uses) &&
     ((0 != eq->e_nested_bindings) || (OPTIONAL_L != eq->e_gp->_.gp.subtype)) )
     {
-      int restrs_not_filtered_in_subqs = eq->e_replaces_filter;
       int sub_ctr;
       if (eq->e_replaces_filter & ~(eq->e_rvr.rvrRestrictions) & ~SPART_VARR_EQ_VAR)
         spar_internal_error (ssg->ssg_sparp, "lost filters in equivs");
@@ -5727,38 +6035,38 @@ ssg_print_equivalences (spar_sqlgen_t *ssg, SPART *gp, sparp_equiv_t *eq, dk_set
             }
           else if (SPART_VARR_IS_IRI & restrs_not_filtered_in_subqs)
             {
-              SPART *builtin = spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)(isIRI_L), t_list (1, sample_var));
+              SPART *builtin = sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISIRI, (SPART **)t_list (1, sample_var));
               ssg_print_where_or_and (ssg, "value of equiv class, isIRI check by replaced filter");
               ssg_print_builtin_expn (ssg, builtin, 1, SSG_VALMODE_BOOL);
             }
           else if (SPART_VARR_IS_BLANK & restrs_not_filtered_in_subqs)
             {
-              SPART *builtin = spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)(isBLANK_L), t_list (1, sample_var));
+              SPART *builtin = sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISBLANK, (SPART **)t_list (1, sample_var));
               ssg_print_where_or_and (ssg, "value of equiv class, isBLANK check by replaced filter");
               ssg_print_builtin_expn (ssg, builtin, 1, SSG_VALMODE_BOOL);
             }
           else if (SPART_VARR_IS_REF & restrs_not_filtered_in_subqs)
             {
-              SPART *builtin = spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)(isREF_L), t_list (1, sample_var));
+              SPART *builtin = sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISREF, (SPART **)t_list (1, sample_var));
               ssg_print_where_or_and (ssg, "value of equiv class, isREF check by replaced filter");
               ssg_print_builtin_expn (ssg, builtin, 1, SSG_VALMODE_BOOL);
             }
           else if (SPART_VARR_IS_LIT & restrs_not_filtered_in_subqs)
             {
-              SPART *builtin = spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)(isLITERAL_L), t_list (1, sample_var));
+              SPART *builtin = sparp_make_builtin_call (ssg->ssg_sparp, SPAR_BIF_ISLITERAL, (SPART **)t_list (1, sample_var));
               ssg_print_where_or_and (ssg, "value of equiv class, isLITERAL check by replaced filter");
               ssg_print_builtin_expn (ssg, builtin, 1, SSG_VALMODE_BOOL);
             }
           else if (SPART_VARR_NOT_NULL & restrs_not_filtered_in_subqs)
             {
-              SPART *builtin = spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)(BOUND_L), t_list (1, sample_var));
+              SPART *builtin = sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1, sample_var));
               ssg_print_where_or_and (ssg, "value of equiv class, BOUND check by replaced filter");
               ssg_print_builtin_expn (ssg, builtin, 1, SSG_VALMODE_BOOL);
             }
           else if (SPART_VARR_ALWAYS_NULL & restrs_not_filtered_in_subqs)
             {
               SPART *not_builtin = spartlist (ssg->ssg_sparp, 3, BOP_NOT,
-                spartlist (ssg->ssg_sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)(BOUND_L), t_list (1, sample_var)),
+                sparp_make_builtin_call (ssg->ssg_sparp, BOUND_L, (SPART **)t_list (1, sample_var)),
                 NULL );
               ssg_print_where_or_and (ssg, "value of equiv class, !BOUND check by replaced filter");
               ssg_print_scalar_expn (ssg, not_builtin, SSG_VALMODE_BOOL, NULL_ASNAME);
@@ -5871,8 +6179,12 @@ print_cross_equs:
   /* Printing cross-equalities, i.e. join conditions (what can be placed in ON (...) after join */
   if (SPARP_EQ_IS_ASSIGNED_EXTERNALLY (eq))
     return; /* As soon as all are equal to globals, no need in cross-equalities */
-  if (!print_join_conds)
+  if (!print_cross_join_conds)
+    {
+      if (!print_inner_filter_conds)
     return;
+      goto print_sub_eq_sub; /* see below */
+    }
   for (var_ctr = 0; var_ctr < eq->e_var_count; var_ctr++)
     {
       SPART *var = eq->e_vars[var_ctr];
@@ -6067,6 +6379,7 @@ print_cross_equs:
             }
         }
     }
+print_sub_eq_sub:
   for (sub_ctr = 0; sub_ctr < BOX_ELEMENTS_INT_0 (eq->e_subvalue_idxs); sub_ctr++)
     {
       ptrlong sub_eq_idx = eq->e_subvalue_idxs[sub_ctr];
@@ -6082,7 +6395,10 @@ print_cross_equs:
           ssg_valmode_t sub_native, sub2_native, common_native;
           SPART *left_sub_gp = NULL;
           int col_ctr, col_count, is_good;
-
+          if (!print_inner_filter_conds && (sub_gp == sub2_gp))
+            continue;
+          if (!print_cross_join_conds && (sub_gp != sub2_gp))
+            continue;
           if (NULL != jright_alias)
             { /* Note that left_sub_gp is not set if both subs are from jright_alias */
               if (!strcmp (jright_alias, sub_selid))
@@ -6289,7 +6605,7 @@ ssg_print_retval_simple_expn (spar_sqlgen_t *ssg, SPART *gp, SPART *tree, ssg_va
       {
         int bigtext, arg_ctr, arg_count = BOX_ELEMENTS (tree->_.funcall.argtrees);
         xqf_str_parser_desc_t *parser_desc;
-	ssg_valmode_t native = sparp_rettype_of_function (ssg->ssg_sparp, tree->_.funcall.qname);
+        ssg_valmode_t native = sparp_rettype_of_function (ssg->ssg_sparp, tree->_.funcall.qname, tree);
         if (((SSG_VALMODE_SHORT_OR_LONG == needed) && (SSG_VALMODE_LONG == native)) ||
           ((SSG_VALMODE_NUM == needed) && (SSG_VALMODE_SQLVAL == native)) ||
           ((SSG_VALMODE_SQLVAL == needed) && (SSG_VALMODE_NUM == native)) ||
@@ -6389,7 +6705,7 @@ ssg_print_retval_simple_expn (spar_sqlgen_t *ssg, SPART *gp, SPART *tree, ssg_va
         for (arg_ctr = 0; arg_ctr < arg_count; arg_ctr++)
           {
             SPART *arg = tree->_.funcall.argtrees[arg_ctr];
-            ssg_valmode_t argtype = sparp_argtype_of_function (ssg->ssg_sparp, tree->_.funcall.qname, arg_ctr);
+            ssg_valmode_t argtype = sparp_argtype_of_function (ssg->ssg_sparp, tree->_.funcall.qname, tree, arg_ctr);
             if (arg_ctr > 0)
               ssg_putchar (',');
             if (bigtext) ssg_newline (0); else ssg_putchar (' ');
@@ -6563,7 +6879,9 @@ void ssg_print_retval_cols (spar_sqlgen_t *ssg, SPART *tree, SPART **retvals, cc
 void
 ssg_print_retval_list (spar_sqlgen_t *ssg, SPART *gp, SPART **retlist, int res_len, int flags, ptrlong *retlist_restr_bits, SPART *auto_valmode_gp, ssg_valmode_t needed)
 {
-  int res_ctr;
+  int memb_ctr, res_ctr;
+  dk_set_t saved_valid_ret_selids = ssg->ssg_valid_ret_selids;
+  dk_set_t saved_valid_ret_tabids = ssg->ssg_valid_ret_tabids;
   if (0 == res_len)
     {
       if (SSG_VALMODE_SQLVAL == needed)
@@ -6584,6 +6902,15 @@ ssg_print_retval_list (spar_sqlgen_t *ssg, SPART *gp, SPART **retlist, int res_l
   if ((NULL != retlist_restr_bits) && !(flags & SSG_RETVAL_USES_ALIAS))
     spar_internal_error (ssg->ssg_sparp, "Inconsistent retval list: bits without aliases");
 #endif
+  DO_BOX_FAST_REV (SPART *, memb, memb_ctr, gp->_.gp.members)
+    {
+      switch (memb->type)
+        {
+        case SPAR_GP: t_set_push (&(ssg->ssg_valid_ret_selids), memb->_.gp.selid); break;
+        case SPAR_TRIPLE: t_set_push (&(ssg->ssg_valid_ret_tabids), memb->_.triple.tabid); break;
+        }
+    }
+  END_DO_BOX_FAST_REV;
   for (res_ctr = 0; res_ctr < res_len; res_ctr++)
     {
       SPART *ret_column = retlist[res_ctr];
@@ -6597,12 +6924,14 @@ ssg_print_retval_list (spar_sqlgen_t *ssg, SPART *gp, SPART **retlist, int res_l
         ssg_puts (" ANY");
     }
   ssg->ssg_indent--;
+  ssg->ssg_valid_ret_selids = saved_valid_ret_selids;
+  ssg->ssg_valid_ret_tabids = saved_valid_ret_tabids;
 }
 
 void
 ssg_print_filter (spar_sqlgen_t *ssg, SPART *tree)
 {
-  if (tree == (box_t)(1)) /* The filter has been disabled because it's printed already */
+  if (tree == (SPART *)(1)) /* The filter has been disabled because it's printed already */
     return;
   if (spar_filter_is_freetext (ssg->ssg_sparp, tree, NULL))
     {
@@ -6680,7 +7009,7 @@ ssg_patch_ft_arg1 (spar_sqlgen_t *ssg, SPART *ft_arg1, SPART *g, int contains_in
           idlen = strlen (tmp);
           ft_arg1_strlen = box_length (ft_arg1_str) - 1;
           len = ft_arg1_strlen + (2 + 25 + 2) + idlen;
-          patched_ft_arg1 = (SPART *)(tail = dk_alloc_box (len, DV_STRING));
+          patched_ft_arg1 = (SPART *)(tail = t_alloc_box (len, DV_STRING));
           (tail++)[0] = '^'; (tail++)[0] = '\''; memcpy (tail, tmp, idlen); tail += idlen;
                       /*  0         1          2       */
                       /* .012345678901234.567890.12345 */
@@ -6707,12 +7036,12 @@ ssg_patch_ft_arg1 (spar_sqlgen_t *ssg, SPART *ft_arg1, SPART *g, int contains_in
       int good_len /*, bad_len*/;
       if (SPART_IS_DEFAULT_GRAPH_BLANK(g))
         {
-          if (ssg->ssg_sparp->sparp_env->spare_named_graphs_listed)
-            chk_graphs = ssg->ssg_sparp->sparp_env->spare_default_graphs;
+          if (ssg->ssg_sparp->sparp_env->spare_src.ssrc_named_graphs_listed)
+            chk_graphs = ssg->ssg_sparp->sparp_env->spare_src.ssrc_default_graphs;
           else chk_graphs = NULL;
         }
       else
-        chk_graphs = ssg->ssg_sparp->sparp_env->spare_named_graphs;
+        chk_graphs = ssg->ssg_sparp->sparp_env->spare_src.ssrc_named_graphs;
       DO_SET (SPART *,src, &(chk_graphs))
         {
           if (!((SPART_GRAPH_NOT_FROM == src->_.graph.subtype) || (SPART_GRAPH_NOT_NAMED == src->_.graph.subtype)))
@@ -6757,7 +7086,8 @@ default_modification_only:
 static void
 ssg_print_fake_self_join_subexp (spar_sqlgen_t *ssg, SPART *gp, SPART ***tree_sets, int tree_set_count, int tree_count, int inside_breakup, int fld_restrictions_bitmask)
 {
-  caddr_t tabid = tree_sets[0][0]->_.triple.tabid;
+  SPART *very_first_tree = tree_sets[0][0];
+  caddr_t tabid = very_first_tree->_.triple.tabid;
   caddr_t sub_tabid = t_box_sprintf (100, "%s-int", tabid);
   int save_where_l_printed;
   const char *save_where_l_text;
@@ -6860,8 +7190,9 @@ no_extra_ft_tables: ;
     }
   if (NULL == colcodes)
     { /* This is a special case of quad map with four constants and no one quad map value. */
-      ssg_puts (" DB.DBA.SYS_FAKE_1 AS ");
+      ssg_puts (" DB.DBA.SYS_IDONLY_ONE AS ");
       ssg_prin_id (ssg, tabid);
+      t_set_push (&(ssg->ssg_valid_ret_tabids), tabid);
       ssg->ssg_indent--;
       return;
     }
@@ -7022,6 +7353,7 @@ contains_print_scalar:
   ssg->ssg_where_l_text = save_where_l_text;
   ssg_puts (") AS ");
   ssg_prin_id (ssg, tabid);
+  t_set_push (&(ssg->ssg_valid_ret_tabids), tabid);
   ssg->ssg_indent--;
 }
 
@@ -7064,6 +7396,7 @@ static const char *same_as__names [SAME_AS__VARIANT_COUNT] = {"IFP", "SAME_AS",
       ssg_qr_uses_table (ssg, qm->qmTableName);
       ssg_puts (" AS ");
       ssg_prin_id (ssg, tabid);
+      t_set_push (&(ssg->ssg_valid_ret_tabids), tabid);
       active_inference = ssg->ssg_sparp->sparp_env->spare_inference_name;
       opts = sparp_get_options_of_tree (ssg->ssg_sparp, tree);
       if (NULL != opts)
@@ -7128,6 +7461,7 @@ ssg_print_subquery_table_exp (spar_sqlgen_t *ssg, SPART *wrapping_gp)
 {
   sparp_t *sub_sparp = (sparp_t *)t_box_copy ((caddr_t)(ssg->ssg_sparp));
   sql_comp_t subq_sc;
+  caddr_t wrapping_selid = wrapping_gp->_.gp.selid;
   t_NEW_VARZ (spar_sqlgen_t, subq_ssg);
 #ifdef NDEBUG
   ssg_puts (" (");
@@ -7165,7 +7499,8 @@ ssg_print_subquery_table_exp (spar_sqlgen_t *ssg, SPART *wrapping_gp)
   ssg_puts (" /* subq end */ ) AS ");
 #endif
   ssg->ssg_indent--;
-  ssg_prin_id (ssg, wrapping_gp->_.gp.selid);
+  ssg_prin_id (ssg, wrapping_selid);
+  t_set_push (&(ssg->ssg_valid_ret_selids), wrapping_selid);
 }
 
 void
@@ -7378,7 +7713,9 @@ ssg_print_sinv_table_exp (spar_sqlgen_t *ssg, SPART *gp, int pass)
               ssg_print_scalar_expn (ssg, local_eq->e_vars[0], SSG_VALMODE_LONG, NULL_ASNAME); /*!!!TBD better print for typed/lang literals */
               goto param_value_is_printed; /* see below */
             }
-          if (((SPART_VARR_FIXED | SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT) & local_eq->e_rvr.rvrRestrictions))
+          if ((SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT) & local_eq->e_rvr.rvrRestrictions)
+            goto try_parent_eq; /* see below */
+          if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) & local_eq->e_rvr.rvrRestrictions))
             {
               ssg_print_scalar_expn (ssg, (SPART *)(local_eq->e_rvr.rvrFixedValue), SSG_VALMODE_LONG, NULL_ASNAME); /*!!!TBD better print for typed/lang literals */
               goto param_value_is_printed; /* see below */
@@ -7394,9 +7731,15 @@ ssg_print_sinv_table_exp (spar_sqlgen_t *ssg, SPART *gp, int pass)
                   goto param_value_is_printed; /* see below */
                 }
             }
+try_parent_eq:
           parent_eq = SPARP_EQUIV (sparp, local_eq->e_receiver_idxs[0]);
+          if ((NULL == parent_eq) || ((SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT) & parent_eq->e_rvr.rvrRestrictions))
+            {
+              ssg_puts (" NULL");
+              goto param_value_is_printed; /* see below */
+            }
           parent_gp = parent_eq->e_gp;
-          if (((SPART_VARR_FIXED | SPART_VARR_ALWAYS_NULL | SPART_VARR_CONFLICT) & parent_eq->e_rvr.rvrRestrictions))
+          if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) & parent_eq->e_rvr.rvrRestrictions))
             {
               ssg_print_scalar_expn (ssg, (SPART *)(parent_eq->e_rvr.rvrFixedValue), SSG_VALMODE_LONG, NULL_ASNAME); /*!!!TBD better print for typed/lang literals */
               goto param_value_is_printed; /* see below */
@@ -7457,6 +7800,8 @@ ssg_print_scalar_subquery_exp (spar_sqlgen_t *ssg, SPART *sub_req_top, SPART *wr
   sub_sparp->sparp_env = wrapping_gp->_.gp.subquery->_.req_top.shared_spare;
   subq_ssg->ssg_sources = subq_ssg->ssg_tree->_.req_top.sources;
   subq_ssg->ssg_out = ssg->ssg_out;
+  subq_ssg->ssg_valid_ret_selids = ssg->ssg_valid_ret_selids;
+  subq_ssg->ssg_valid_ret_tabids = ssg->ssg_valid_ret_tabids;
   subq_ssg->ssg_indent = ssg->ssg_indent;
   if ((SSG_VALMODE_LONG == needed) || (SSG_VALMODE_AUTO == needed))
     sub_sparp->sparp_env->spare_output_valmode_name = t_box_dv_short_string ("LONG");
@@ -7492,7 +7837,7 @@ ssg_print_table_exp (spar_sqlgen_t *ssg, SPART *gp, SPART **trees, int tree_coun
       if (SSG_TABLE_SELECT_PASS == pass)
         {
           char buf[200];
-          snprintf (buf, sizeof (buf), " (select top 1 1 as __fake_table_col_%d from DB.DBA.RDF_QUAD) as __fake_table_%d",
+          snprintf (buf, sizeof (buf), " (select 1 as __fake_table_col_%d) as __fake_table_%d",
             ssg->ssg_sparp->sparp_unictr, ssg->ssg_sparp->sparp_unictr );
           ssg->ssg_sparp->sparp_unictr++;
           ssg_puts (buf);
@@ -7539,6 +7884,7 @@ ssg_print_table_exp (spar_sqlgen_t *ssg, SPART *gp, SPART **trees, int tree_coun
             ssg->ssg_indent--;
             ssg_puts (") AS ");
             ssg_prin_id (ssg, tree->_.gp.selid);
+            t_set_push (&(ssg->ssg_valid_ret_selids), tree->_.gp.selid);
           }
         break;
       }
@@ -7719,13 +8065,14 @@ fld_restrictions_may_vary:
       int eq_idx = first_mcase->_.gp.equiv_indexes[equiv_ctr];
       sparp_equiv_t *eq = ssg->ssg_equivs[eq_idx];
       /* ssg_puts (t_box_sprintf (100, "/" "* eq = %d *" "/", eq_idx)); */
-      ssg_print_equivalences (ssg, first_mcase, eq, NULL, NULL, 1 /* print join conds */, 1 /* print equalities to globals */);
+      ssg_print_equivalences (ssg, first_mcase, eq, NULL, NULL, 1 /* print cross join conds */, 1 /* print inner filters */, 1 /* print equalities to globals */);
     }
   ssg->ssg_where_l_printed = save_where_l_printed;
   ssg->ssg_where_l_text = save_where_l_text;
   ssg->ssg_indent--;
   ssg_puts (") AS ");
   ssg_prin_id (ssg, first_mcase->_.gp.selid);
+  t_set_push (&(ssg->ssg_valid_ret_selids), first_mcase->_.gp.selid);
 }
 
 ccaddr_t
@@ -7794,7 +8141,7 @@ ssg_print_union_member_item (spar_sqlgen_t *ssg, SPART *member, int *itm_idx_ptr
           for (equiv_ctr = 0; equiv_ctr < member->_.gp.equiv_count; equiv_ctr++)
             {
               sparp_equiv_t *eq = ssg->ssg_equivs[member->_.gp.equiv_indexes[equiv_ctr]];
-              ssg_print_equivalences (ssg, member, eq, prev_itm_aliases, itm_alias, 1 /* print join conds */, 0 /* do not print equalities to globals */);
+              ssg_print_equivalences (ssg, member, eq, prev_itm_aliases, itm_alias, 1 /* print join conds */, 0 /* do not print inner filters */, 0 /* do not print equalities to globals */);
             }
         }
       if (print_glued_filters)
@@ -7984,10 +8331,11 @@ retval_list_complete:
           ssg_newline (0);
           snprintf (buf, sizeof (buf), "stub-%s", member->_.gp.selid);
           if (SSG_PRINT_UNION_NONEMPTY_STUB & head_flags)
-            ssg_puts ("(SELECT TOP 1 1 AS __stub FROM DB.DBA.RDF_QUAD) AS ");
+            ssg_puts ("(SELECT 1 as __stub) AS ");
           else
-            ssg_puts ("(SELECT TOP 1 1 AS __stub FROM DB.DBA.RDF_QUAD WHERE 0) AS ");
+            ssg_puts ("(SELECT TOP 1 1 AS __stub FROM DB.DBA.SYS_IDONLY_EMPTY WHERE 0) AS ");
           ssg_prin_id (ssg, buf);
+          /* no t_set_push (&(ssg->ssg_valid_ret_selids), ...); because it's single-use stub */
           need_self_joins_in_where = 'Y';
           goto end_of_table_list; /* see below */
         }
@@ -7996,8 +8344,9 @@ retval_list_complete:
           char buf[105]; /* potentially 100 chars long see sparp_clone_id etc. */
           ssg_newline (0);
           snprintf (buf, sizeof (buf), "lojstub-%s", member->_.gp.selid);
-          ssg_puts ("(SELECT TOP 1 1 AS __stub FROM DB.DBA.RDF_QUAD) AS ");
+          ssg_puts ("(SELECT 1 AS __stub) AS ");
           ssg_prin_id (ssg, buf);
+          /* no t_set_push (&(ssg->ssg_valid_ret_selids), ...); because it's single-use stub */
           if (OPTIONAL_L == first_itm->_.gp.subtype)
           ssg_puts (" LEFT OUTER JOIN");
           else
@@ -8071,7 +8420,7 @@ end_of_table_list: ;
       for (equiv_ctr = 0; equiv_ctr < member->_.gp.equiv_count; equiv_ctr++)
         {
           sparp_equiv_t *eq = ssg->ssg_equivs[member->_.gp.equiv_indexes[equiv_ctr]];
-          ssg_print_equivalences (ssg, member, eq, NULL, NULL, ('Y' == need_self_joins_in_where) /* print join conds only for 0 or 1 item */, 1 /* print equalities to globals */);
+          ssg_print_equivalences (ssg, member, eq, NULL, NULL, ('Y' == need_self_joins_in_where) /* print join conds only for 0 or 1 item */, 1 /* print inner filters */, 1 /* print equalities to globals */);
         }
       filter_count = BOX_ELEMENTS_0 (member->_.gp.filters) - member->_.gp.glued_filters_count;
       for (filter_idx = 0; filter_idx < filter_count; filter_idx++)
@@ -8194,7 +8543,8 @@ ssg_req_top_needs_rb_complete (spar_sqlgen_t *ssg)
   ssg_valmode_t retvalmode;
   if ((SELECT_L != subtype) && (DISTINCT_L != subtype))
     return 0;
-  if (NULL != tree->_.req_top.formatmode_name && strcmp (tree->_.req_top.formatmode_name, "_JAVA_"))
+  if ((NULL == tree->_.req_top.formatmode_name && !ssg_is_odbc_cli ()) ||
+     (NULL != tree->_.req_top.formatmode_name && (strcmp (tree->_.req_top.formatmode_name, "_JAVA_") && strcmp (tree->_.req_top.formatmode_name, "_UDBC_"))))
     return 0;
   retvalmode = ssg_find_valmode_by_name (tree->_.req_top.retvalmode_name);
   if ((SSG_VALMODE_SQLVAL != retvalmode) && (NULL != retvalmode))
@@ -8224,6 +8574,7 @@ ssg_make_rb_complete_wrapped (spar_sqlgen_t *ssg)
   ssg->ssg_indent--;
   ssg_puts (") AS ");
   ssg_prin_id (ssg, rbc_selid);
+  t_set_push (&(ssg->ssg_valid_ret_selids), rbc_selid);
 }
 
 void ssg_print_limofs_expn (spar_sqlgen_t *ssg)
@@ -8235,8 +8586,8 @@ void ssg_print_limofs_expn (spar_sqlgen_t *ssg)
       char limofs_strg [50];
       long lim_num = unbox ((caddr_t)(lim));
       long ofs_num = unbox ((caddr_t)(ofs));
-      if ((SPARP_MAXLIMIT == lim_num) && (0 < ofs_num))
-        lim_num -= ofs_num;
+/*      if ((SPARP_MAXLIMIT == lim_num) && (0 < ofs_num))
+        lim_num -= ofs_num;*/
       if (0 != ofs_num)
         snprintf (limofs_strg, sizeof (limofs_strg), " TOP %ld, %ld", ofs_num, lim_num);
       else
@@ -8254,6 +8605,32 @@ void ssg_print_limofs_expn (spar_sqlgen_t *ssg)
    ssg_puts (")");
 }
 
+int
+ssg_expn_is_not_int_const_but_printed_as_some_const (spar_sqlgen_t *ssg, SPART *expn)
+{
+  if (SPAR_IS_BLANK_OR_VAR (expn))
+    {
+      if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (expn->_.var.rvr.rvrRestrictions & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL)))
+        return 1;
+    }
+  else if (SPAR_IS_LIT_OR_QNAME (expn))
+    {
+      int expn_dtp = DV_TYPE_OF(expn);
+      int expn_is_plain_int = ((DV_LONG_INT == expn_dtp)
+        || ((DV_ARRAY_OF_POINTER == expn_dtp) && (SPAR_LIT == expn->type)
+          && (uname_xmlschema_ns_uri_hash_integer == expn->_.lit.datatype) ) );
+      if (!expn_is_plain_int)
+        return 1;
+    }
+  else
+    {
+      ptrlong restr = sparp_restr_bits_of_expn (ssg->ssg_sparp, expn);
+      if ((SPART_VARR_FIXED | SPART_VARR_NOT_NULL) == (restr & (SPART_VARR_FIXED | SPART_VARR_NOT_NULL)))
+        return 1;
+    }
+  return 0;
+}
+
 void
 ssg_print_tail_query_options (spar_sqlgen_t *ssg)
 {
@@ -8271,6 +8648,7 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
 {
   int gby_ctr, oby_ctr;
   int has_limofs = 0;	/* 0 = no limit/offset clause in the output, 1 = it is in limofs_strg, 2 = should be printed in place */
+  int three_cols_procedure = 0;
   caddr_t limofs_alias = NULL;
   SPART	*tree = ssg->ssg_tree;
   ptrlong subtype = tree->_.req_top.subtype;
@@ -8284,7 +8662,7 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
     SSG_RETVAL_MUST_PRINT_SOMETHING |
     SSG_RETVAL_CAN_PRINT_NULL |
     SSG_RETVAL_USES_ALIAS ;
-  ccaddr_t top_selid = tree->_.req_top.pattern->_.gp.selid;
+  caddr_t top_selid = tree->_.req_top.pattern->_.gp.selid;
   retvals = tree->_.req_top.retvals;
   if (NULL != ssg->ssg_sparp->sparp_env->spare_storage_name)
     {
@@ -8393,9 +8771,12 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
       break;
     case CONSTRUCT_L:
     case DESCRIBE_L:
-      if ((NULL != tree->_.req_top.formatmode_name) &&
-        !strcmp ("_JAVA_", tree->_.req_top.formatmode_name) )
-        ssg_puts (" DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS ((");
+      if ((NULL == tree->_.req_top.formatmode_name && ssg_is_odbc_cli ()) ||
+	  ((NULL != tree->_.req_top.formatmode_name) && (!strcmp ("_JAVA_", tree->_.req_top.formatmode_name) || !strcmp ("_UDBC_", tree->_.req_top.formatmode_name))))
+        {
+          ssg_puts (" DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS ((");
+          three_cols_procedure = 1;
+        }
       else if ((NULL == formatter) && (NULL == agg_formatter) && ssg->ssg_sparp->sparp_sparqre->sparqre_direct_client_call)
         {
           ssg_find_formatter_by_name_and_subtype ("TTL", subtype, &formatter, &agg_formatter, &agg_meta);
@@ -8413,6 +8794,8 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
     case SPARUL_RUN_SUBTYPE:
     case SPARUL_INSERT_DATA:
     case SPARUL_DELETE_DATA:
+    case SPAR_SML_CREATE:
+    case SPAR_SML_DROP:
       if ((SPARUL_RUN_SUBTYPE == subtype) && !unbox (spar_compose_report_flag (ssg->ssg_sparp)))
         {
           ssg_puts ("set_row_count (");
@@ -8469,10 +8852,19 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
           const char *fmname = tree->_.req_top.formatmode_name;
           ssg_puts ("SELECT "); ssg_puts (formatter); ssg_puts (" (");
           ssg_prin_id (ssg, top_selid);
-          ssg_puts (".__ask_retval) AS \"fmtaggret-");
-          if (NULL != fmname)
-            ssg_puts (fmname);
-          ssg_puts ("\" LONG VARCHAR \nFROM (");
+	  if ((NULL == fmname && ssg_is_odbc_cli ()) ||
+	      ((NULL != fmname) && (!strcmp ("_JAVA_", fmname) || !strcmp ("_UDBC_", fmname))))
+	    {
+	      ssg_puts (".__ask_retval) AS __ask_retval");
+	    }
+	  else
+	    {
+	      ssg_puts (".__ask_retval) AS \"fmtaggret-");
+	      if (NULL != fmname)
+		ssg_puts (fmname);
+		  ssg_puts ("\"");
+	    }
+          ssg_puts (" LONG VARCHAR \nFROM (");
           ssg->ssg_indent += 1;
         }
       ssg_puts ("SELECT TOP 1 1 AS __ask_retval");
@@ -8492,14 +8884,30 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
     top_retval_flags, retvalmode );
   if (0 < BOX_ELEMENTS_INT_0 (tree->_.req_top.groupings))
     {
-      ssg_newline (0);
-      ssg_puts ("GROUP BY");
-      ssg->ssg_indent++;
+/* Bug 14357, part 2 (see ORDER BY below for more explaination) */
+      int gby_printed = 0;
+      int fake_gby_expn_printed = 0;
       DO_BOX_FAST(SPART *, grouping, gby_ctr, tree->_.req_top.groupings)
         {
           ssg_valmode_t native, needed;
-	  if (gby_ctr > 0)
+          int grouping_is_weird = ssg_expn_is_not_int_const_but_printed_as_some_const (ssg, grouping);
+          if (grouping_is_weird && fake_gby_expn_printed)
+            continue;
+          if (gby_printed)
             ssg_putchar (',');
+          else
+            {
+              ssg_newline (0);
+              ssg_puts ("GROUP BY");
+              gby_printed = 1;
+              ssg->ssg_indent++;
+            }
+          if (grouping_is_weird)
+            {
+              ssg_puts (" 0.0 /* fake, instead of grouping by other const */");
+              fake_gby_expn_printed = 1;
+              continue;
+            }
           native = sparp_expn_native_valmode (ssg->ssg_sparp, grouping);
           if (IS_BOX_POINTER (native) && native->qmfIsBijection)
             needed = native;
@@ -8508,6 +8916,7 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
           ssg_print_retval_simple_expn (ssg, tree->_.req_top.pattern, grouping, needed, NULL_ASNAME);
         }
       END_DO_BOX_FAST;
+      if (gby_printed)
       ssg->ssg_indent--;
     }
   if (NULL != tree->_.req_top.having)
@@ -8524,16 +8933,34 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
     }
   if ((0 < BOX_ELEMENTS_INT_0 (tree->_.req_top.order)) && ((SELECT_L == tree->_.req_top.subtype) || (DISTINCT_L == tree->_.req_top.subtype) || has_limofs))
     {
-      ssg_newline (0);
-      ssg_puts ("ORDER BY");
-      ssg->ssg_indent++;
+/* Bug 14357 had shown a funny problem. If one of ORDER BY expressions can be opimized to an integer
+and thus the integer is printed instead of the original expression then the generated SQL has wrong meaning.
+The SQL will contain an integer that is interpreted as a column number.
+Simple example is
+SELECT ?s ?p ?o WHERE { ?s ?p ?o . FILTER (?o = 12345) } ORDER BY ?o
+that is optimized into SQL equivalent of
+SELECT ?s ?p 12345 WHERE { ?s ?p 12345 } ORDER BY 12345
+The fix is to avoid printing constant expressions at all, with only exception for plain integers that were written in SPARQL as such.
+*/
+      int oby_printed = 0;
       DO_BOX_FAST(SPART *, oby_itm, oby_ctr, tree->_.req_top.order)
         {
-	  if (oby_ctr > 0)
+          SPART *expn = oby_itm->_.oby.expn;
+          if (ssg_expn_is_not_int_const_but_printed_as_some_const (ssg, expn))
+                continue;
+          if (oby_printed)
             ssg_putchar (',');
+          else
+            {
+              ssg_newline (0);
+              ssg_puts ("ORDER BY");
+              oby_printed = 1;
+              ssg->ssg_indent++;
+            }
           ssg_print_orderby_item (ssg, tree->_.req_top.pattern, oby_itm);
         }
       END_DO_BOX_FAST;
+      if (oby_printed)
       ssg->ssg_indent--;
     }
   if (NULL != limofs_alias)
@@ -8553,14 +8980,13 @@ ssg_make_sql_query_text (spar_sqlgen_t *ssg)
         case ASK_L:
           ssg_puts (" ) AS ");
           ssg_prin_id (ssg, top_selid);
+          t_set_push (&(ssg->ssg_valid_ret_selids), top_selid);
           ssg_print_tail_query_options (ssg);
           ssg->ssg_indent--;
           break;
         }
     }
-  else if (((CONSTRUCT_L == subtype) || (DESCRIBE_L == subtype)) &&
-    (NULL != tree->_.req_top.formatmode_name) &&
-    !strcmp ("_JAVA_", tree->_.req_top.formatmode_name) )
+  else if (three_cols_procedure)
     ssg_puts ("))");
 }
 
diff --git a/libsrc/Wi/sparql_core.c b/libsrc/Wi/sparql_core.c
index aea6776..137352f 100644
--- a/libsrc/Wi/sparql_core.c
+++ b/libsrc/Wi/sparql_core.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql_core.c,v 1.87.2.50 2011/02/18 11:19:40 source Exp $
+ *  $Id: sparql_core.c,v 1.87.2.68 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -21,6 +21,7 @@
  *
  */
 
+#include "http.h" /* for isplainURIchar() and the like */
 #include "libutil.h"
 #include "sqlnode.h"
 #include "sqlbif.h"
@@ -86,6 +87,9 @@ spart_count_specific_elems_by_type (ptrlong type)
     case SPAR_GRAPH:		return sizeof (sample._.graph);
     case SPAR_WHERE_MODIFS:	return sizeof (sample._.wm);
     case SPAR_SERVICE_INV:	return sizeof (sample._.sinv);
+    case SPAR_DEFMACRO:		return sizeof (sample._.defmacro);
+    case SPAR_MACROCALL:	return sizeof (sample._.macrocall);
+    case SPAR_MACROPU:		return sizeof (sample._.macropu);
     case ORDER_L:		return sizeof (sample._.oby);
     case BOP_NOT:
     case BOP_OR: case BOP_AND:
@@ -108,12 +112,18 @@ spartlist_impl (sparp_t *sparp, ptrlong length, ptrlong type, ...)
   if (SPAR_CODEGEN == type)
     {
       if (spart_count_specific_elems_by_type (type) > sizeof (caddr_t) * (length-1))
-        spar_internal_error (sparp, "length mismatch in spartlist()");
+	{
+	  va_end (ap);
+	  spar_internal_error (sparp, "length mismatch in spartlist()");
+	}
     }
   else
     {
       if (spart_count_specific_elems_by_type (type) != sizeof (caddr_t) * (length-1))
-        spar_internal_error (sparp, "length mismatch in spartlist()");
+	{
+	  va_end (ap);
+	  spar_internal_error (sparp, "length mismatch in spartlist()");
+	}
     }
 #endif
   length += 1;
@@ -151,7 +161,10 @@ spartlist_with_tail_impl (sparp_t *sparp, ptrlong length, caddr_t tail, ptrlong
   va_start (ap, type);
 #ifdef DEBUG
   if (spart_count_specific_elems_by_type (type) != sizeof (caddr_t) * (length+tail_len-1))
-    spar_internal_error (sparp, "length mismatch in spartlist()");
+    {
+      va_end (ap);
+      spar_internal_error (sparp, "length mismatch in spartlist()");
+    }
 #endif
 #ifdef MALLOC_DEBUG
   tree = (SPART *) dbg_dk_alloc_box (spartlist_impl_file, spartlist_impl_line, sizeof (caddr_t) * (1+length+tail_len), DV_ARRAY_OF_POINTER);
@@ -220,7 +233,24 @@ spar_dbg_string_of_triple_field (sparp_t *sparp, SPART *fld)
         (uname_xmlschema_ns_uri_hash_integer == fld->_.lit.datatype) ||
         (uname_xmlschema_ns_uri_hash_decimal == fld->_.lit.datatype) ||
         (uname_xmlschema_ns_uri_hash_double == fld->_.lit.datatype) )
+	{
+	  if (DV_STRINGP (fld->_.lit.val))
         return t_box_sprintf (210, "%.200s", fld->_.lit.val);
+	  else
+	    {
+	      caddr_t err = NULL, ret, str;
+	      str = box_cast_to (NULL, fld->_.lit.val, DV_TYPE_OF (fld->_.lit.val), DV_SHORT_STRING, NUMERIC_MAX_PRECISION, NUMERIC_MAX_SCALE, &err);
+	      if (!err && str)
+		ret = t_box_sprintf (210, "%.200s", str);
+              else
+                {
+		  dk_free_tree (err);
+		  ret = t_box_sprintf (210, "Value cannot be printed");
+  	        }
+	      dk_free_box (str);
+	      return ret;
+	    }
+	}
       return t_box_sprintf (410, "\"%.200s\"^^<%.200s>", fld->_.lit.val, fld->_.lit.datatype);
     default: return t_box_dv_short_string ("...");
     }
@@ -292,17 +322,15 @@ void
 spar_error (sparp_t *sparp, const char *format, ...)
 {
   va_list ap;
+  caddr_t msg;
   va_start (ap, format);
+  msg = box_vsprintf (1500, format, ap);
+  va_end (ap);
   if (NULL == sparp)
-    sqlr_new_error ("37000", "SP031",
-      "SPARQL generic error: %.1500s",
-      box_vsprintf (1500, format, ap) );
+    sqlr_new_error ("37000", "SP031", "SPARQL generic error: %.1500s", msg);
   else
-    sqlr_new_error ("37000", "SP031",
-      "%.400s: %.1500s",
-      sparp->sparp_err_hdr,
-      t_box_vsprintf (1500, format, ap) );
-  va_end (ap);
+    sqlr_new_error ("37000", "SP031", "%.400s: %.1500s",
+      sparp->sparp_err_hdr, msg );
 }
 
 int
@@ -315,6 +343,7 @@ spar_audit_error (sparp_t *sparp, const char *format, ...)
   caddr_t msg;
   va_start (ap, format);
   msg = t_box_vsprintf (1500, format, ap);
+  va_end (ap);
 #ifdef SPAR_ERROR_DEBUG
   txt = ((NULL != sparp) ? sparp->sparp_text : "(no text, sparp is NULL)");
   printf ("Internal SPARQL audit error %s while processing\n-----8<-----\n%s\n-----8<-----\n", msg, txt);
@@ -475,59 +504,6 @@ sparp_expand_q_iri_ref (sparp_t *sparp, caddr_t ref)
     return ref;
 }
 
-#if 0
-caddr_t
-sparp_exec_Narg (sparp_t *sparp, const char *pl_call_text, query_t **cached_qr_ptr, caddr_t *err_ret, int argctr, ccaddr_t arg1)
-{
-  query_instance_t *qi = sparp->sparp_sparqre->sparqre_qi;
-  client_connection_t *cli = ((CALLER_LOCAL == qi) ? bootstrap_cli : sparp->sparp_sparqre->sparqre_cli);
-  local_cursor_t *lc = NULL;
-  caddr_t err = NULL;
-  if (NULL == cached_qr_ptr[0])
-    {
-      if (NULL == cli) /* This means that the call is made inside the SQL compiler, can't re-enter. */
-        spar_internal_error (sparp, "sparp_exec_Narg () tries to compile static inside the SQL compiler");
-      cached_qr_ptr[0] = sql_compile_static (pl_call_text, cli, &err, SQLC_DEFAULT);
-      if (SQL_SUCCESS != err)
-	{
-	  cached_qr_ptr[0] = NULL;
-	  if (err_ret)
-	    *err_ret = err;
-	  return NULL;
-	}
-    }
-  err = qr_rec_exec (cached_qr_ptr[0], cli, &lc, qi, NULL, 1,
-      ":0", box_copy_tree (arg1), QRP_RAW );
-  if (SQL_SUCCESS != err)
-    {
-      LC_FREE(lc);
-      if (err_ret)
-	*err_ret = err;
-      return NULL;
-    }
-  if (lc)
-    {
-      caddr_t ret = NULL;
-#if 1
-      while (lc_next (lc));
-      if (SQL_SUCCESS != lc->lc_error)
-	{
-	  if (err_ret)
-	    *err_ret = lc->lc_error;
-	  lc_free (lc);
-	  return NULL;
-	}
-      ret = t_full_box_copy_tree (((caddr_t *) lc->lc_proc_ret) [1]);
-#else
-      ret = t_full_box_copy_tree(lc_nth_col (lc, 0));
-#endif
-      lc_free (lc);
-      return ret;
-    }
-  return NULL;
-}
-
-#else
 caddr_t
 sparp_exec_Narg (sparp_t *sparp, const char *pl_call_text, query_t **cached_qr_ptr, caddr_t *err_ret, int argctr, ccaddr_t arg1)
 {
@@ -552,9 +528,9 @@ sparp_exec_Narg (sparp_t *sparp, const char *pl_call_text, query_t **cached_qr_p
   cli->cli_user = sec_name_to_user ("dba");
   if (NULL == cached_qr_ptr[0])
     {
-      if (NULL == cli) /* This means that the call is made inside the SQL compiler, can't re-enter. */
+      if (parse_sem && parse_sem->sem_entry_count) /* This means that the call is made inside the SQL compiler, can't re-enter. */
         spar_internal_error (sparp, "sparp_exec_Narg () tries to compile static inside the SQL compiler");
-      cached_qr_ptr[0] = sql_compile_static (pl_call_text, cli, &err, SQLC_DEFAULT);
+      cached_qr_ptr[0] = sql_compile_static (pl_call_text, cli, &err, SQLC_STATIC_PRESERVES_TREE);
       if (SQL_SUCCESS != err)
 	{
 	  cached_qr_ptr[0] = NULL;
@@ -606,7 +582,6 @@ leave_and_ret:
     }
   return res;
 }
-#endif
 
 caddr_t
 sparp_graph_sec_iri_to_id_nosignal (sparp_t *sparp, ccaddr_t qname)
@@ -766,6 +741,7 @@ caddr_t spar_strliteral (sparp_t *sparp, const char *strg, int strg_is_long, int
 	}
     }
   res = t_box_dv_short_nchars (tmp_buf, tgt_tail - tmp_buf);
+  box_flags (res) = BF_UTF8;
   dk_free_box (tmp_buf);
   return res;
 
@@ -786,7 +762,7 @@ sparp_free (sparp_t * sparp)
 caddr_t
 spar_mkid (sparp_t * sparp, const char *prefix)
 {
-  return t_box_sprintf (0x100, "%s-%ld-%ld",
+  return t_box_sprintf (0x100, "%s_%ld_%ld",
     prefix,
     (long)((NULL != sparp->sparp_curr_lexem) ?
       sparp->sparp_curr_lexem->sparl_lineno : 0),
@@ -815,7 +791,7 @@ void spar_change_sign (caddr_t *lit_ptr)
 }
 
 static const char *sparp_known_get_params[] = {
-    "get:login", "get:method", "get:proxy", "get:query", "get:refresh", "get:soft", "get:uri", NULL };
+    "get:accept", "get:cartridge", "get:login", "get:method", "get:proxy", "get:query", "get:refresh", "get:soft", "get:uri", NULL };
 
 static const char *sparp_integer_defines[] = {
     "input:grab-depth", "input:grab-limit", "output:maxrows", "sql:big-data-const", "sql:log-enable", "sql:signal-void-variables", NULL };
@@ -876,8 +852,8 @@ sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_type, caddr_t v
         }
       if (!strcmp (param, "input:freeze"))
         {
-          sparp->sparp_env->spare_default_graphs_locked = 1;
-          sparp->sparp_env->spare_named_graphs_locked = 1;
+          sparp->sparp_env->spare_src.ssrc_default_graphs_locked = 1;
+          sparp->sparp_env->spare_src.ssrc_named_graphs_locked = 1;
           return;
         }
       if (!strcmp (param, "input:default-graph-exclude"))
@@ -885,7 +861,7 @@ sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_type, caddr_t v
           sparp_make_and_push_new_graph_source ( sparp, SPART_GRAPH_NOT_FROM,
             spartlist (sparp, 2, SPAR_QNAME, t_box_dv_uname_string (value)),
             NULL );
-          /* No sparp->sparp_env->spare_default_graphs_locked = 1; here because NOT FROM can not be overridden */
+          /* No sparp->sparp_env->spare_src.ssrc_default_graphs_locked = 1; here because NOT FROM can not be overridden */
           return;
         }
       if (!strcmp (param, "input:named-graph-uri"))
@@ -900,7 +876,7 @@ sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_type, caddr_t v
           sparp_make_and_push_new_graph_source (sparp, SPART_GRAPH_NOT_NAMED,
             spartlist (sparp, 2, SPAR_QNAME, t_box_dv_uname_string (value)),
             NULL );
-          /* No sparp->sparp_env->spare_default_graphs_locked = 1; here because NOT FROM can not be overridden */
+          /* No sparp->sparp_env->spare_src.ssrc_default_graphs_locked = 1; here because NOT FROM can not be overridden */
           return;
         }
       if (!strcmp (param, "input:ifp"))
@@ -918,6 +894,27 @@ sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_type, caddr_t v
           if (NULL != sparp->sparp_env->spare_storage_name)
             spar_error (sparp, "'define %.30s' is used more than once", param);
           sparp->sparp_env->spare_storage_name = t_box_dv_uname_string (value);
+          sparp->sparp_storage = sparp_find_storage_by_name (sparp->sparp_env->spare_storage_name);
+          if ((NULL == sparp->sparp_storage) && ('\0' != value[0]))
+            spar_error (sparp, "Quad storage <%.100s> does not exists or is in unusable state", value);
+          return;
+        }
+      if (!strcmp (param, "input:macro-lib"))
+        {
+          caddr_t lib_iri_uname = t_box_dv_uname_string (value);
+          if (0 <= dk_set_position (sparp->sparp_macro_libs, lib_iri_uname))
+            spar_error (sparp, "The macro library <%.100s> is loaded more than once", value);
+          t_set_push (&(sparp->sparp_macro_libs), lib_iri_uname);
+          return;
+        }
+      if (!strcmp (param, "input:macro-lib-ignore-create"))
+        {
+          sparp->sparp_macrolib_ignore_create = 1;
+          return;
+        }
+      if (!strcmp (param, "input:disable-storage-macro-lib"))
+        {
+          sparp->sparp_disable_storage_macro_lib = 1;
           return;
         }
       if (!strcmp (param, "input:inference"))
@@ -934,12 +931,12 @@ sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_type, caddr_t v
         }
       if ((11 < strlen (param)) && !memcmp (param, "input:grab-", 11))
         {
-          rdf_grab_config_t *rgc = &(sparp->sparp_env->spare_grab);
+          rdf_grab_config_t *rgc = &(sparp->sparp_env->spare_src.ssrc_grab);
           const char *lock_pragma = NULL;
           rgc->rgc_pview_mode = 1;
-          if (sparp->sparp_env->spare_default_graphs_locked)
+          if (sparp->sparp_env->spare_src.ssrc_default_graphs_locked)
             lock_pragma = "input:default-graph-uri";
-          else if (sparp->sparp_env->spare_named_graphs_locked)
+          else if (sparp->sparp_env->spare_src.ssrc_named_graphs_locked)
             lock_pragma = "input:named-graph-uri";
           if (NULL != lock_pragma)
             spar_error (sparp, "define %s should not appear after define %s", param, lock_pragma);
@@ -1034,7 +1031,7 @@ sparp_define (sparp_t *sparp, caddr_t param, ptrlong value_lexem_type, caddr_t v
       for (chk = sparp_known_get_params; (NULL != chk[0]) && strcmp (chk[0], param); chk++) ;
       if (NULL != chk[0])
         {
-          dk_set_t *opts_ptr = &(sparp->sparp_env->spare_common_sponge_options);
+          dk_set_t *opts_ptr = &(sparp->sparp_env->spare_src.ssrc_common_sponge_options);
           if (0 < dk_set_position_of_string (opts_ptr[0], param))
             spar_error (sparp, "'define %.30s' is used more than once", param);
           t_set_push (opts_ptr, t_box_dv_short_string (value));
@@ -1121,16 +1118,291 @@ spar_selid_push_reused (sparp_t *sparp, caddr_t selid)
 
 caddr_t spar_selid_pop (sparp_t *sparp)
 {
-  caddr_t selid = t_set_pop (&(sparp->sparp_env->spare_selids));
+  caddr_t selid = (caddr_t)t_set_pop (&(sparp->sparp_env->spare_selids));
   spar_dbg_printf (("spar_selid_pop () pops %s\n", selid));
   return selid;
 }
 
-void spar_gp_init (sparp_t *sparp, ptrlong subtype)
+
+void
+sparp_configure_storage_and_macro_libs (sparp_t *sparp)
+{
+  if (sparp->sparp_storage_is_set)
+    return;
+  sparp->sparp_storage_is_set = 1;
+  sparp->sparp_storage = sparp_find_storage_by_name (sparp->sparp_env->spare_storage_name);
+  if ((NULL != sparp->sparp_storage) && !sparp->sparp_disable_storage_macro_lib)
+    {
+      sparql_macro_library_t *smlib = sparp->sparp_storage->qsMacroLibrary;
+      if (NULL != smlib)
+        {
+          SPART **smllist;
+          int new_defm_ctr;
+          if (0 == smlib->smlCompilationState)
+            {
+              jso_rtti_t *sml_rtti = (jso_rtti_t *)gethash (smlib, jso_rttis_of_structs);
+              if (NULL == sml_rtti)
+                spar_error (sparp, "Quad storage <%.100s> refers to inexisting or corrupted SPARQL macro library", sparp->sparp_env->spare_storage_name);
+              sparp_compile_smllist (sparp, sml_rtti->jrtti_inst_iri, smlib);
+              smllist = (SPART **)(smlib->smlList);
+              if (!IS_BOX_POINTER (smllist))
+                spar_error (sparp, "Compilation error in SPARQL macro library <%.100s> refered by quad storage <%.100s>", sml_rtti->jrtti_inst_iri, sparp->sparp_env->spare_storage_name);
+            }
+          smllist = (SPART **)(smlib->smlList);
+          DO_BOX_FAST (SPART *, new_defm, new_defm_ctr, smllist)
+            {
+              sparp_defmacro_store (sparp, new_defm);
+            }
+          END_DO_BOX_FAST;
+          sparp_qr_uses_jso (sparp, (caddr_t)smlib, NULL);
+        }
+    }
+  if ((NULL != sparp->sparp_macro_libs) && (NULL == sparp->sparp_macrolib_to_create))
+    {
+      caddr_t *explicit_includes = t_revlist_to_array (sparp->sparp_macro_libs);
+      jso_class_descr_t *sml_cd;
+      int lib_ctr;
+      DO_BOX_FAST (caddr_t, lib_name, lib_ctr, explicit_includes)
+        {
+          jso_rtti_t *sml_rtti;
+          sparql_macro_library_t *sml;
+          SPART **smllist;
+          caddr_t *smlincludes;
+          int new_defm_ctr, old_defm_count, incl_ctr;
+          jso_get_cd_and_rtti (
+            uname_virtrdf_ns_uri_QuadStorage,
+            lib_name,
+            &sml_cd, &sml_rtti, 1 );
+          if ((NULL == sml_rtti) || (JSO_STATUS_LOADED != sml_rtti->jrtti_status))
+            spar_error (sparp, "Unknown SPARQL macro library <%.100s>", lib_name);
+          sml = (sparql_macro_library_t *)(sml_rtti->jrtti_self);
+          sparp_qr_uses_jso (sparp, (caddr_t)sml, NULL);
+          if (0 == sml->smlCompilationState)
+            {
+              sparp_compile_smllist (sparp, sml_rtti->jrtti_inst_iri, sml);
+              smllist = (SPART **)(sml->smlList);
+              if (!IS_BOX_POINTER (smllist))
+                spar_error (sparp, "Compilation error in SPARQL macro library <%.100s>", lib_name);
+            }
+          smllist = (SPART **)(sml->smlList);
+          old_defm_count = sparp->sparp_macro_def_count;
+          DO_BOX_FAST (SPART *, new_defm, new_defm_ctr, smllist)
+            {
+              int old_defm_ctr;
+              for (old_defm_ctr = old_defm_count; old_defm_ctr--; /* no step */)
+                {
+                  SPART *old_defm = sparp->sparp_macro_defs [old_defm_ctr];
+                  if (strcmp (old_defm->_.defmacro.mname, new_defm->_.defmacro.mname))
+                    continue;
+                  if (old_defm->_.defmacro.sml_iri != new_defm->_.defmacro.sml_iri)
+                    spar_error (sparp, "Macro <%.100s> is defined in both <%100s> and <%100s>", old_defm->_.defmacro.mname, old_defm->_.defmacro.sml_iri, new_defm->_.defmacro.sml_iri);
+                  goto new_defm_done; /* see below */
+                }
+              sparp_defmacro_store (sparp, new_defm);
+new_defm_done: ;
+            }
+          END_DO_BOX_FAST;
+          smlincludes = (caddr_t *)(sml->smlIncludes);
+          DO_BOX_FAST (caddr_t, new_incl, incl_ctr, smlincludes)
+            {
+              t_set_pushnew (&(sparp->sparp_macro_libs), new_incl);
+            }
+          END_DO_BOX_FAST;
+        }
+      END_DO_BOX_FAST;
+    }
+}
+
+void
+sparp_compile_smllist (sparp_t *outer_sparp, caddr_t sml_iri_uname, void /* actually struct sparql_macro_library_t */ *smlib_as_voidptr)
+{
+  sparql_macro_library_t *smlib = (sparql_macro_library_t *)smlib_as_voidptr;
+  spar_query_env_t sparqre;
+  sparp_t *sparp;
+  SPART **mdefs;
+  int ctr;
+  if (DV_STRING != DV_TYPE_OF (smlib->smlSourceText))
+    spar_error (outer_sparp, "Ill metadata of SPARQL macro library that is associated with the quad storage");
+  memset (&sparqre, 0, sizeof (spar_query_env_t));
+  sparqre.sparqre_cli = bootstrap_cli;
+  sparqre.sparqre_qi = outer_sparp->sparp_sparqre->sparqre_qi;
+  sparp = sparp_query_parse (
+    t_box_sprintf (50 + box_length (smlib->smlSourceText), "define input:disable-storage-macro-lib \"yes\" %s", smlib->smlSourceText),
+    &sparqre, 0 );
+  ctr = sparp->sparp_macro_def_count;
+  mdefs = (SPART **)dk_alloc_box (ctr * sizeof (SPART *), DV_ARRAY_OF_POINTER);
+  while (ctr--)
+    {
+      SPART *mdef = sparp->sparp_macro_defs[ctr];
+      if (NULL == mdef->_.defmacro.sml_iri)
+        mdef->_.defmacro.sml_iri = box_copy (sml_iri_uname);
+      mdefs[ctr] = (SPART *)box_copy_tree ((caddr_t)(mdef));
+    }
+  dk_check_tree ((caddr_t)(mdefs));
+  smlib->smlList = (ccaddr_t)mdefs;
+  smlib->smlIncludes = box_copy_tree ((caddr_t)t_revlist_to_array (sparp->sparp_macro_libs));
+}
+
+int
+spar_triple_matches_macro_quad_pattern (sparp_t *sparp, SPART *defm, SPART *graph, SPART *subject, SPART *predicate, SPART *object)
+{
+  SPART *tg, *ts, *tp, *to;
+  if (NULL == defm->_.defmacro.quad_pattern)
+    return 0;
+#define FLD_CHECK(templ_fld, templ_fld_idx, triple_fld) do { \
+      templ_fld = defm->_.defmacro.quad_pattern[(templ_fld_idx)]; \
+      if (SPAR_IS_LIT_OR_QNAME (templ_fld) && \
+         !((SPART_TYPE (triple_fld) == SPART_TYPE (templ_fld)) && \
+         sparp_fixedvalues_equal (sparp, triple_fld, templ_fld) ) ) \
+        return 0; } while (0)
+  FLD_CHECK(tp, SPART_TRIPLE_PREDICATE_IDX, predicate);
+  FLD_CHECK(to, SPART_TRIPLE_OBJECT_IDX, object);
+  FLD_CHECK(ts, SPART_TRIPLE_SUBJECT_IDX, subject);
+
+  switch (defm->_.defmacro.subtype)
+    {
+    case DEFAULT_L:
+      if (!SPART_IS_DEFAULT_GRAPH_BLANK(graph)) return 0;
+      break;
+    case GRAPH_L:
+      if (SPART_IS_DEFAULT_GRAPH_BLANK(graph)) return 0;
+        FLD_CHECK(tg, SPART_TRIPLE_GRAPH_IDX, graph);
+      break;
+    default:
+      break;
+    }
+  return 1;
+}
+
+SPART *
+spar_find_defmacro_by_iri_or_fields (sparp_t *sparp, caddr_t mname, SPART **fields)
+{
+  int ctr;
+#define spar_return_if_macro_matches(sparp,mname,fields,defm) do { \
+  if (NULL == fields) { \
+      if (!strcmp (defm->_.defmacro.mname, mname)) \
+        return defm; } \
+  else if (spar_triple_matches_macro_quad_pattern (sparp, defm, fields[0], fields[1], fields[2], fields[3])) \
+    return defm; } while (0)
+  if (!sparp->sparp_storage_is_set)
+    spar_internal_error (sparp, "spar_" "find_defmacro_by_iri_or_fields(): storage is not set");
+  for (ctr = 0; ctr < sparp->sparp_macro_def_count; ctr++)
+    {
+      SPART *defm = sparp->sparp_macro_defs[ctr];
+      spar_return_if_macro_matches (sparp,mname,fields,defm);
+    }
+  if ((NULL != sparp->sparp_storage) && !sparp->sparp_disable_storage_macro_lib)
+    {
+      sparql_macro_library_t *smlib = sparp->sparp_storage->qsMacroLibrary;
+      if (NULL != smlib)
+        {
+          SPART **smllist = (SPART **)smlib->smlList;
+          if (IS_BOX_POINTER (smllist))
+            {
+              DO_BOX_FAST (SPART *, defm, ctr, smllist)
+                {
+                  spar_return_if_macro_matches (sparp,mname,fields,defm);
+                }
+              END_DO_BOX_FAST;
+            }
+        }
+    }
+  return NULL;
+}
+
+void
+sparp_defmacro_store (sparp_t *sparp, SPART *defm)
+{
+  int old_macro_def_count = sparp->sparp_macro_def_count;
+  if (old_macro_def_count >= BOX_ELEMENTS_0(sparp->sparp_macro_defs))
+    {
+      SPART **new_defs = (SPART **)t_alloc_box ((old_macro_def_count + 2) * 2 * sizeof (SPART *), DV_ARRAY_OF_POINTER);
+      if (old_macro_def_count)
+        memcpy (new_defs, sparp->sparp_macro_defs, old_macro_def_count * sizeof (SPART *));
+      sparp->sparp_macro_defs = new_defs;
+    }
+  sparp->sparp_macro_defs [sparp->sparp_macro_def_count++] = defm;
+}
+
+SPART *
+sparp_defmacro_init (sparp_t *sparp, caddr_t mname)
+{
+  SPART *old, *res;
+  caddr_t selid = spar_mkid (sparp, "@s");
+  old = spar_find_defmacro_by_iri_or_fields (sparp, mname, NULL);
+  if (NULL != old)
+    spar_error (sparp, "Macro name <%.200s> is already defined", mname);
+  if (0 <= dk_set_position_of_string (sparp->sparp_funnames_in_defmacros, mname))
+    spar_error (sparp, "The name of macro <%.200s> is used above as a name of function in the body of other macro", mname);
+  res = spartlist (sparp, 10, SPAR_DEFMACRO, (ptrlong)(1), mname, NULL, NULL, NULL, NULL, NULL, selid, (ptrlong)0);
+  return res;
+}
+
+void
+sparp_make_defmacro_paramnames_from_template (sparp_t *sparp, SPART *defm)
+{
+  dk_set_t paramnames = NULL;
+  int ctr;
+  DO_BOX_FAST (SPART *, fld, ctr, defm->_.defmacro.quad_pattern)
+    {
+      if (SPAR_VARIABLE == SPART_TYPE (fld))
+        {
+          caddr_t vname = fld->_.var.vname;
+          if (0 <= dk_set_position_of_string (sparp->sparp_env->spare_protocol_params, vname))
+            spar_error (sparp, "The name of protocol parameter ?%.200s is (mis)used in the template of the declaration of macro <%.200s>", vname, defm->_.defmacro.mname);
+          if (0 <= dk_set_position_of_string (paramnames, vname))
+            spar_error (sparp, "The name of valiable ?%.200s is used twice in the template of the declaration of macro <%.200s>", vname, defm->_.defmacro.mname);
+          t_set_push (&paramnames, vname);
+        }
+    }
+  END_DO_BOX_FAST;
+  defm->_.defmacro.paramnames = t_revlist_to_array (paramnames);
+}
+
+void
+sparp_defmacro_finalize (sparp_t *sparp, SPART *body)
+{
+  sparp->sparp_current_macro->_.defmacro.body = body;
+  sparp->sparp_current_macro = NULL;
+}
+
+void
+sparp_check_dm_arg_for_redecl (sparp_t *sparp, dk_set_t recent, caddr_t dm_arg_vname)
+{
+  SPART *mdef;
+  int ctr;
+  mdef = sparp->sparp_current_macro;
+  if (0 <= dk_set_position_of_string (sparp->sparp_env->spare_protocol_params, dm_arg_vname))
+    spar_error (sparp, "The name of protocol parameter ?%.200s is (mis)used in the declaration of macro <%.200s>", dm_arg_vname, mdef->_.defmacro.mname);
+  if (0 <= dk_set_position_of_string (recent, dm_arg_vname))
+    goto dupe;
+  DO_BOX_FAST (caddr_t, old_vname, ctr, mdef->_.defmacro.paramnames)
+    {
+      if (!strcmp (old_vname, dm_arg_vname))
+        goto dupe;
+    }
+  END_DO_BOX_FAST;
+  return;
+dupe:
+  spar_error (sparp, "Duplicate variable name ?%.200s in arguments of macro <%.200s>", dm_arg_vname, mdef->_.defmacro.mname);
+}
+
+void
+spar_gp_init (sparp_t *sparp, ptrlong subtype)
 {
   sparp_env_t *env = sparp->sparp_env;
   spar_dbg_printf (("spar_gp_init (..., %ld)\n", (long)subtype));
-  spar_selid_push (sparp);
+  if (sparp->sparp_macro_mode)
+    {
+      caddr_t selid;
+      if (DEFMACRO_L == subtype)
+        selid = sparp->sparp_current_macro->_.defmacro.selid;
+      else
+        selid = spar_mkid (sparp, "@s");
+      spar_selid_push_reused (sparp, selid);
+    }
+  else
+    spar_selid_push (sparp);
   t_set_push (&(env->spare_acc_triples), NULL);
   t_set_push (&(env->spare_acc_filters), NULL);
   t_set_push (&(env->spare_context_gp_subtypes), (caddr_t)subtype);
@@ -1139,7 +1411,8 @@ void spar_gp_init (sparp_t *sparp, ptrlong subtype)
     t_set_push (&(sparp->sparp_env->spare_propvar_sets), NULL); /* For WHERE_L and CONSTRUCT_L it's done at beginning of the result-set. */
 }
 
-void spar_gp_replace_selid (sparp_t *sparp, dk_set_t membs, caddr_t old_selid, caddr_t new_selid)
+void
+spar_gp_replace_selid (sparp_t *sparp, dk_set_t membs, caddr_t old_selid, caddr_t new_selid)
 {
   DO_SET (SPART *, memb, &membs)
     {
@@ -1169,7 +1442,7 @@ SPART *
 spar_gp_finalize (sparp_t *sparp, SPART **options)
 {
   sparp_env_t *env = sparp->sparp_env;
-  caddr_t orig_selid = env->spare_selids->data;
+  caddr_t orig_selid = (caddr_t)(env->spare_selids->data);
   dk_set_t membs;
   int all_ctr, opt_ctr;
   dk_set_t filts;
@@ -1185,7 +1458,7 @@ spar_gp_finalize (sparp_t *sparp, SPART **options)
     {
       if (_STAR_GT == pv->sparpv_op)
         spar_gp_init (sparp, OPTIONAL_L);
-      spar_gp_add_triple_or_special_filter (sparp, NULL,
+          spar_gp_add_triplelike (sparp, NULL,
           spar_make_variable (sparp, pv->sparpv_subj_var->_.var.vname),
           pv->sparpv_verb_qname,
           spar_make_variable (sparp, pv->sparpv_obj_var_name),
@@ -1275,6 +1548,8 @@ spar_gp_finalize_with_subquery (sparp_t *sparp, SPART **options, SPART *subquery
   SPART *gp;
   gp = spar_gp_finalize (sparp, options);
   gp->_.gp.subquery = subquery;
+  if ((SELECT_L != gp->_.gp.subtype) && (0 != gp->_.gp.subtype))
+    spar_internal_error (sparp, "spar_" "gp_finalize_with_subquery(): subquery is composed in a wrong way");
   gp->_.gp.subtype = SELECT_L;
   if (NULL != options)
     sparp_validate_options_of_tree (sparp, gp, options);
@@ -1402,9 +1677,9 @@ spar_gp_add_filter (sparp_t *sparp, SPART *filt)
             opt_value = (SPART *)t_box_copy_tree ((caddr_t)arg_value);
             opt_value->_.var.tabid = triple_with_var_obj->_.triple.tabid;
             opt_value->_.var.tr_idx = (ptrlong)args[argctr];
-            triple_with_var_obj->_.triple.options = (SPART **) t_list_concat (
-              (caddr_t)(triple_with_var_obj->_.triple.options),
-              (caddr_t)t_list (2, args[argctr], opt_value) );
+            triple_with_var_obj->_.triple.options = t_spartlist_concat (
+              triple_with_var_obj->_.triple.options,
+              (SPART **)t_list (2, args[argctr], opt_value) );
           }
       for (fld_ctr = 0; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
         spar_tree_is_var_with_forbidden_ft_name (sparp, triple_with_var_obj->_.triple.tr_fields[fld_ctr], 1);
@@ -1422,7 +1697,7 @@ void
 spar_gp_add_filters_for_graph (sparp_t *sparp, SPART *graph_expn, int graph_is_named, int suppress_filters_for_good_names)
 {
   sparp_env_t *env = sparp->sparp_env;
-  dk_set_t sources = (graph_is_named ? env->spare_named_graphs : env->spare_default_graphs);
+  dk_set_t sources = (graph_is_named ? env->spare_src.ssrc_named_graphs : env->spare_src.ssrc_default_graphs);
   caddr_t varname = NULL;
   SPART *good_list_expn, *bad_list_expn, *filter;
   if (NULL == sources)
@@ -1484,7 +1759,7 @@ spar_make_list_of_sources_expn (sparp_t *sparp, ptrlong from_subtype, ptrlong fr
 {
   dk_set_t single_graphs = NULL;
   dk_set_t graph_groups = NULL;
-  DO_SET (SPART *, g, &(sparp->sparp_env->spare_default_graphs))
+  DO_SET (SPART *, g, &(sparp->sparp_env->spare_src.ssrc_default_graphs))
     {
       ptrlong st = g->_.graph.subtype;
       if ((st == from_subtype) || (st == from2_subtype))
@@ -1493,7 +1768,7 @@ spar_make_list_of_sources_expn (sparp_t *sparp, ptrlong from_subtype, ptrlong fr
         t_set_push (&graph_groups, g->_.graph.expn);
     }
   END_DO_SET()
-  DO_SET (SPART *, g, &(sparp->sparp_env->spare_named_graphs))
+  DO_SET (SPART *, g, &(sparp->sparp_env->spare_src.ssrc_named_graphs))
     {
       ptrlong st = g->_.graph.subtype;
       if ((st == from_subtype) || (st == from2_subtype))
@@ -1542,7 +1817,7 @@ spar_make_list_of_sources_expn (sparp_t *sparp, ptrlong from_subtype, ptrlong fr
       return spar_make_funcall (sparp, 0, "LONG::bif:position",
         (SPART **)t_list (2, needle_expn, lst_expn) );
 #else
-      return spartlist (sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)IN_L,
+      return sparp_make_builtin_call (sparp, IN_L,
         (SPART **)t_list (2, needle_expn, lst_expn) );
 #endif
     }
@@ -1550,7 +1825,7 @@ spar_make_list_of_sources_expn (sparp_t *sparp, ptrlong from_subtype, ptrlong fr
     return spar_make_funcall (sparp, 0, "LONG::bif:vector",
       (SPART **)t_list_to_array (single_graphs) );
   t_set_push (&single_graphs, needle_expn);
-  return spartlist (sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)IN_L,
+  return sparp_make_builtin_call (sparp, IN_L,
     (SPART **)t_list_to_array (single_graphs) );
 }
 
@@ -1656,7 +1931,7 @@ in_local_set:
 }
 
 void
-spar_list_triple_vars_in_gp (sparp_t *sparp, SPART *tree, dk_set_t *all_varnames_ret)
+spar_list_triple_varnames_and_macropunames_in_tree (sparp_t *sparp, SPART *tree, dk_set_t *all_varnames_ret, dk_set_t *undiscovered_ret)
 {
   int ctr;
   switch (SPART_TYPE (tree))
@@ -1667,14 +1942,17 @@ spar_list_triple_vars_in_gp (sparp_t *sparp, SPART *tree, dk_set_t *all_varnames
       for (ctr = SPART_TRIPLE_FIELDS_COUNT; ctr--; /* no step */)
         {
           SPART *fld = tree->_.triple.tr_fields[ctr];
-          if (SPAR_VARIABLE == SPART_TYPE (fld))
-            t_set_push_new_string (all_varnames_ret, fld->_.var.vname);
+          switch (SPART_TYPE (fld))
+            {
+            case SPAR_VARIABLE: t_set_push_new_string (all_varnames_ret, fld->_.var.vname); break;
+            case SPAR_MACROPU: t_set_push_new_string (all_varnames_ret, fld->_.macropu.pname); break;
+            }
         }
       break;
     case SPAR_GP:
       DO_BOX_FAST_REV (SPART *, memb, ctr, tree->_.gp.members)
         {
-          spar_list_triple_vars_in_gp (sparp, memb, all_varnames_ret);
+          spar_list_triple_varnames_and_macropunames_in_tree (sparp, memb, all_varnames_ret, undiscovered_ret);
         }
       END_DO_BOX_FAST_REV;
       if (NULL != tree->_.gp.subquery)
@@ -1682,9 +1960,9 @@ spar_list_triple_vars_in_gp (sparp_t *sparp, SPART *tree, dk_set_t *all_varnames
           SPART **retvals = tree->_.gp.subquery->_.req_top.retvals;
           if (DV_ARRAY_OF_POINTER == DV_TYPE_OF (retvals))
             {
-              DO_BOX_FAST_REV (SPART *, memb, ctr, tree->_.req_top.retvals)
+              DO_BOX_FAST_REV (SPART *, memb, ctr, retvals)
                 {
-                  spar_list_triple_vars_in_gp (sparp, memb, all_varnames_ret);
+                  spar_list_triple_varnames_and_macropunames_in_tree (sparp, memb, all_varnames_ret, undiscovered_ret);
                 }
               END_DO_BOX_FAST_REV;
             }
@@ -1692,7 +1970,34 @@ spar_list_triple_vars_in_gp (sparp_t *sparp, SPART *tree, dk_set_t *all_varnames
             spar_internal_error (sparp, "Usupported combination of subqueries and service invocations");
         }
       break;
+    case SPAR_MACROCALL: case SPAR_MACROPU:
+      t_set_push (undiscovered_ret, tree);
+      break;
+    }
+}
+
+void
+spar_add_service_inv_to_sg (sparp_t *sparp, SPART *sinv)
+{
+  SPART **sinvs = sparp->sparp_sg->sg_sinvs;
+  ptrlong sinvcount = sparp->sparp_sg->sg_sinv_count;
+  if (IS_BOX_POINTER (sparp->sparp_sg->sg_sinv_count))
+    spar_error (sparp, "Too many service invocations, probably due to abnormal macro expansion");
+  sinv->_.sinv.own_idx = sinvcount;
+  if (BOX_ELEMENTS_INT_0 (sinvs) == sinvcount)
+    {
+      size_t new_size = ((NULL == sinvs) ? 4 * sizeof (SPART *) : 2 * box_length (sinvs));
+      SPART **new_sinvs = (SPART **)t_alloc_box (new_size, DV_ARRAY_OF_POINTER);
+      if (NULL != sinvs)
+        memcpy (new_sinvs, sinvs, box_length (sinvs));
+#ifdef DEBUG
+      if (NULL != sinvs)
+        memset (sinvs, -1, box_length (sinvs));
+#endif
+      sparp->sparp_sg->sg_sinvs = sinvs = new_sinvs;
     }
+  sinvs[sinvcount] = sinv;
+  sparp->sparp_sg->sg_sinv_count++;
 }
 
 SPART *
@@ -1703,8 +2008,6 @@ spar_make_service_inv (sparp_t *sparp, caddr_t endpoint, dk_set_t all_options, p
   dk_set_t rset_varnames = NULL;
   dk_set_t defines = NULL;
   int in_list_implicit = 0;
-  ptrlong sinvcount = sparp->sparp_sg->sg_sinv_count;
-  SPART **sinvs = sparp->sparp_sg->sg_sinvs;
   SPART *sinv;
   while (NULL != all_options)
     {
@@ -1724,7 +2027,10 @@ spar_make_service_inv (sparp_t *sparp, caddr_t endpoint, dk_set_t all_options, p
                 {
                   DO_SET (SPART *, member, &members_before)
                     {
-                      spar_list_triple_vars_in_gp (sparp, member, &param_varnames);
+                      dk_set_t undiscovered = NULL;
+                      spar_list_triple_varnames_and_macropunames_in_tree (sparp, member, &param_varnames, &undiscovered);
+                      if (NULL != undiscovered)
+                        spar_error (sparp, "SERVICE invocation is used in combination with macro so it should have explicit list of IN variables in OPTIONS");
                     }
                   END_DO_SET()
                 }
@@ -1744,20 +2050,8 @@ spar_make_service_inv (sparp_t *sparp, caddr_t endpoint, dk_set_t all_options, p
         }
 /*! TBD: add other cases */
     }
-  if (BOX_ELEMENTS_INT_0 (sinvs) == sinvcount)
-    {
-      size_t new_size = ((NULL == sinvs) ? 4 * sizeof (SPART *) : 2 * box_length (sinvs));
-      SPART **new_sinvs = (SPART **)t_alloc_box (new_size, DV_ARRAY_OF_POINTER);
-      if (NULL != sinvs)
-        memcpy (new_sinvs, sinvs, box_length (sinvs));
-#ifdef DEBUG
-      if (NULL != sinvs)
-        memset (sinvs, -1, box_length (sinvs));
-#endif
-      sparp->sparp_sg->sg_sinvs = sinvs = new_sinvs;
-    }
   sinv = spartlist (sparp, 11, SPAR_SERVICE_INV,
-    sparp->sparp_sg->sg_sinv_count,
+    (ptrlong)(0),
     endpoint,
     t_revlist_to_array (iri_params),
     t_box_num (permitted_syntax),
@@ -1767,10 +2061,10 @@ spar_make_service_inv (sparp_t *sparp, caddr_t endpoint, dk_set_t all_options, p
     t_revlist_to_array (defines),
     sources,
     sinv_storage );
-  sinvs[sparp->sparp_sg->sg_sinv_count++] = sinv;
   return sinv;
 }
 
+
 int
 spar_describe_restricted_by_physical (sparp_t *sparp, SPART **retvals)
 {
@@ -1838,9 +2132,11 @@ spar_retvals_of_describe (sparp_t *sparp, SPART **retvals, SPART *limit_expn, SP
   SPART *agg_call;
   SPART *var_vector_expn;
   SPART *var_vector_arg;
+  SPART *opts_arg;
   dk_set_t opts_revlist = NULL;
   caddr_t limofs_name;
-  const char *descr_name;
+  caddr_t storage_name_or_null;
+  const char *descr_name, *postproc_name = NULL;
   int need_limofs_trick = (
     (DV_LONG_INT != DV_TYPE_OF (limit_expn)) ||
     (DV_LONG_INT != DV_TYPE_OF (offset_expn)) ||
@@ -1874,15 +2170,30 @@ spar_retvals_of_describe (sparp_t *sparp, SPART **retvals, SPART *limit_expn, SP
       (SPART **)t_list (1, var_vector_arg ) );
   if (NULL != sparp->sparp_env->spare_describe_mode)
     {
-      int phys_only = ((NULL == sparp->sparp_env->spare_inference_name) && spar_describe_restricted_by_physical (sparp, retvals));
-      if (phys_only)
-        descr_name = t_box_sprintf (100, "sql:SPARQL_DESC_DICT_%.50s_PHYSICAL", sparp->sparp_env->spare_describe_mode);
+      const char *mode = sparp->sparp_env->spare_describe_mode;
+      const char *mode1 = mode, *plus = strchr (mode, '+');
+      int phys_only;
+      if (NULL != plus)
+        {
+          mode1 = t_box_dv_short_nchars (mode, plus-mode);
+          postproc_name = t_box_sprintf (100, "sql:SPARQL_DESC_POSTPROC_%.50s", plus+1);
+        }
+      if ('\0' == mode1[0])
+        descr_name = "sql:SPARQL_DESC_DICT";
       else
-        descr_name = t_box_sprintf (100, "sql:SPARQL_DESC_DICT_%.50s", sparp->sparp_env->spare_describe_mode);
+        {
+          phys_only = ((NULL == sparp->sparp_env->spare_inference_name)
+            && (NULL == sparp->sparp_env->spare_use_same_as)
+            && spar_describe_restricted_by_physical (sparp, retvals) );
+          if (phys_only)
+            descr_name = t_box_sprintf (100, "sql:SPARQL_DESC_DICT_%.50s_PHYSICAL", mode1);
+          else
+            descr_name = t_box_sprintf (100, "sql:SPARQL_DESC_DICT_%.50s", mode1);
+        }
     }
   else
     descr_name = "sql:SPARQL_DESC_DICT";
-  if (sparp->sparp_env->spare_default_graphs_listed || sparp->sparp_env->spare_named_graphs_listed)
+  if (sparp->sparp_env->spare_src.ssrc_default_graphs_listed || sparp->sparp_env->spare_src.ssrc_named_graphs_listed)
     good_graphs = spar_make_list_of_sources_expn (sparp, SPART_GRAPH_FROM, SPART_GRAPH_GROUP, SPART_GRAPH_NAMED, RDF_GRAPH_PERM_READ, NULL);
   else
     good_graphs = (SPART *)t_box_num_nonull (0);
@@ -1904,6 +2215,15 @@ spar_retvals_of_describe (sparp_t *sparp, SPART **retvals, SPART *limit_expn, SP
       t_set_push (&opts_revlist, t_box_dv_short_string ("inference"));
       t_set_push (&opts_revlist, sparp->sparp_env->spare_inference_name);
     }
+  if (NULL != sparp->sparp_env->spare_use_same_as)
+    {
+      t_set_push (&opts_revlist, t_box_dv_short_string ("same-as"));
+      t_set_push (&opts_revlist, sparp->sparp_env->spare_use_same_as);
+    }
+  storage_name_or_null = sparp->sparp_env->spare_storage_name;
+  if (NULL == storage_name_or_null)
+    storage_name_or_null = t_NEW_DB_NULL;
+  opts_arg = spar_make_funcall (sparp, 0, "bif:vector", (SPART **)t_revlist_to_array (opts_revlist)); /*!!!TBD describe options will be added here */
   descr_call = spar_make_funcall (sparp, 0, descr_name,
       (SPART **)t_list (6,
         agg_call,
@@ -1911,8 +2231,16 @@ spar_retvals_of_describe (sparp_t *sparp, SPART **retvals, SPART *limit_expn, SP
           (SPART **)t_list_to_array (consts) ),
         good_graphs,
         bad_graphs,
-        sparp->sparp_env->spare_storage_name,
-        spar_make_funcall (sparp, 0, "bif:vector", (SPART **)t_revlist_to_array (opts_revlist)) ) ); /*!!!TBD describe options will be added here */
+        storage_name_or_null,
+        opts_arg ) );
+  if (NULL != postproc_name)
+    descr_call = spar_make_funcall (sparp, 0, postproc_name,
+      (SPART **)t_list (5,
+        descr_call,
+        good_graphs,
+        bad_graphs,
+        storage_name_or_null,
+        opts_arg ) );
   if (need_limofs_trick)
     return (SPART **)t_list (2, descr_call,
       spartlist (sparp, 4, SPAR_ALIAS, var_vector_expn, t_box_dv_short_string ("describe-1"), SSG_VALMODE_AUTO) );
@@ -1927,10 +2255,10 @@ sparp_gp_trav_add_rgc_vars_and_consts_from_retvals (sparp_t *sparp, SPART *curr,
     {
     case SPAR_VARIABLE:
       if (!(SPART_VARR_GLOBAL & curr->_.var.rvr.rvrRestrictions))
-        t_set_push_new_string (&(sparp->sparp_env->spare_grab.rgc_vars), t_box_dv_uname_string (curr->_.var.vname));
+        t_set_push_new_string (&(sparp->sparp_env->spare_src.ssrc_grab.rgc_vars), t_box_dv_uname_string (curr->_.var.vname));
       break;
     case SPAR_QNAME:
-      t_set_push_new_string (&(sparp->sparp_env->spare_grab.rgc_consts), curr->_.lit.val);
+      t_set_push_new_string (&(sparp->sparp_env->spare_src.ssrc_grab.rgc_consts), curr->_.lit.val);
       break;
     }
   return 0;
@@ -1998,47 +2326,30 @@ spar_make_top_or_special_case_from_wm (sparp_t *sparp, ptrlong subtype, SPART **
   if (SPAR_WHERE_MODIFS != SPART_TYPE (wm))
     spar_internal_error (sparp, "Ill wm");
 #endif
-#if 0
-  if (NULL != having)
-    {
-      caddr_t old_pattern_selid = pattern->_.gp.selid;
-      int ctr;
-      SPART *sub_top, *sub_wrapper_gp, *new_pattern;
-      sparp_gp_trav (sparp, pattern, old_pattern_selid,
-        sparp_gp_trav_rename_for_having, NULL,
-        sparp_gp_trav_rename_for_having, NULL,
-        sparp_gp_trav_rename_for_having, NULL );
-      DO_BOX_FAST (SPART *, grp, ctr, groupings)
-        {
-          sparp_gp_trav (sparp, grp, old_pattern_selid,
-            sparp_gp_trav_rename_for_having, NULL,
-            sparp_gp_trav_rename_for_having, NULL,
-            sparp_gp_trav_rename_for_having, NULL );
-        }
-      END_DO_BOX_FAST;
-      sub_top = spar_make_top (sparp, subtype, (SPART **)((ptrlong)_STAR),
-        t_box_sprintf (100, "%.90s~wmret", old_pattern_selid),
-        pattern, groupings, (SPART **)t_list (0), t_box_num (SPARP_MAXLIMIT), t_box_num (0) );
-      if (SPAR_REQ_TOP == sub_top->type)
-        sparp_expand_top_retvals (sparp, sub_top, 1 /* safely_copy_all_vars */);
-      sub_top->_.req_top.retvalmode_name = t_box_dv_short_string ("AUTO");
-      sub_wrapper_gp = spartlist (sparp, 10, SPAR_GP, SELECT_L,
-        t_list (0), t_list (0), sub_top, t_box_sprintf (100, "%.90s~wmwrap", old_pattern_selid),
-        NULL, (ptrlong)0, (ptrlong)0, NULL );
-      new_pattern = spartlist (sparp, 10, SPAR_GP, WHERE_L,
-        t_list (1, sub_wrapper_gp), t_list (1, having), NULL, old_pattern_selid,
-        NULL, (ptrlong)0, (ptrlong)0, NULL );
-      pattern = new_pattern;
-      having = NULL;
+  if (0 != sparp->sparp_macro_call_count)
+    {
+      spar_mproc_ctx_t ctx;
+      memset (&ctx, 0, sizeof (spar_mproc_ctx_t));
+      ctx.smpc_unictr = (sparp->sparp_unictr)++;
+      ctx.smpc_context_gp = pattern;
+      ctx.smpc_context_selid = pattern->_.gp.selid;
+      pattern = spar_macroprocess_tree (sparp, pattern, &ctx);
+      ctx.smpc_context_gp = pattern;
+      ctx.smpc_context_selid = pattern->_.gp.selid;
+      retvals = spar_macroprocess_treelist (sparp, retvals, 0, &ctx);
+      groupings = spar_macroprocess_treelist (sparp, groupings, 0, &ctx);
+      having = spar_macroprocess_tree (sparp, having, &ctx);
+      order = spar_macroprocess_treelist (sparp, order, 0, &ctx);
+      limit = spar_macroprocess_tree (sparp, limit, &ctx);
+      offset = spar_macroprocess_tree (sparp, offset, &ctx);
     }
-#endif
   do { /* Special case for selection of all distinct graphs */
     SPART *grp, *triple, *retvar, *gvar;
     caddr_t retname, gname;
     int ctr1, ctr2;
     if (NULL != sparp->sparp_env->spare_parent_env) break;
     if (DISTINCT_L != subtype) break;
-    if (NULL != sparp->sparp_env->spare_named_graphs) break;
+    if (NULL != sparp->sparp_env->spare_src.ssrc_named_graphs) break;
     if (!IS_BOX_POINTER (retvals)) break;
     if (1 != BOX_ELEMENTS (retvals)) break;
     if (0 != BOX_ELEMENTS_0 (groupings)) break;
@@ -2165,25 +2476,26 @@ spar_alloc_fake_equivs_for_bindings_inv (sparp_t *sparp, SPART *binv)
 
 
 SPART **
-spar_make_sources_like_top (sparp_t *sparp)
+spar_make_sources_like_top (sparp_t *sparp, ptrlong top_subtype)
 {
   sparp_env_t *env = sparp->sparp_env;
   dk_set_t src = NULL;
   SPART **sources;
-  DO_SET(SPART *, g, &(env->spare_default_graphs))
+  DO_SET(SPART *, g, &(env->spare_src.ssrc_default_graphs))
     {
       t_set_push (&src, sparp_tree_full_copy (sparp, g, NULL));
     }
   END_DO_SET()
-  DO_SET(SPART *, g, &(env->spare_named_graphs))
+  DO_SET(SPART *, g, &(env->spare_src.ssrc_named_graphs))
     {
       t_set_push (&src, sparp_tree_full_copy (sparp, g, NULL));
     }
   END_DO_SET()
   sources = (SPART **)t_revlist_to_array (src);
   if ((0 == BOX_ELEMENTS (sources)) &&
-    (NULL != (env->spare_common_sponge_options)) )
-    spar_error (sparp, "Retrieval options for source graphs (e.g., '%s') may be useless if the query does not contain 'FROM' or 'FROM NAMED'", env->spare_common_sponge_options->data);
+    (NULL != (env->spare_src.ssrc_common_sponge_options)) &&
+    (LOAD_L != top_subtype) )
+    spar_error (sparp, "Retrieval options for source graphs (e.g., '%s') may be useless if the query does not contain 'FROM' or 'FROM NAMED'", env->spare_src.ssrc_common_sponge_options->data);
   return sources;
 }
 
@@ -2193,7 +2505,7 @@ spar_make_top (sparp_t *sparp, ptrlong subtype, SPART **retvals,
 {
   sparp_env_t *env = sparp->sparp_env;
   caddr_t final_output_format_name;
-  SPART **sources = spar_make_sources_like_top (sparp);
+  SPART **sources = spar_make_sources_like_top (sparp, subtype);
   switch (subtype)
     {
     case CONSTRUCT_L: case DESCRIBE_L:
@@ -2237,7 +2549,7 @@ spar_gp_add_union_of_triple_and_inverses (sparp_t *sparp, SPART *graph, SPART *s
     spar_error (sparp, "Options are not supported for a triple pattern with property name \"%.200s\" that is declared in inference rules \"%.200s\" as a property with inverse",
       predicate->_.qname.val, sparp->sparp_env->spare_inference_name );
   sparp->sparp_env->spare_inference_ctx = NULL;
-  triple = spar_gp_add_triple_or_special_filter (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, banned_tricks & 0x2);
+  triple = spar_gp_add_triplelike (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, banned_tricks | SPAR_ADD_TRIPLELIKE_NO_INV_UNION);
   if (SPAR_TRIPLE != SPART_TYPE (triple))
     spar_error (sparp, "Property name \"%.200s\" has special meaning that conflicts with its declaration in inference rules \"%.200s\" as a property with inverse",
       predicate->_.qname.val, sparp->sparp_env->spare_inference_name );
@@ -2250,14 +2562,14 @@ spar_gp_add_union_of_triple_and_inverses (sparp_t *sparp, SPART *graph, SPART *s
     {
       caddr_t inv_p_name = t_box_dv_uname_string (t_set_pop (&inv_props));
       spar_gp_init (sparp, 0);
-      triple = spar_gp_add_triple_or_special_filter (sparp,
+      triple = spar_gp_add_triplelike (sparp,
         (SPART *)t_full_box_copy_tree ((caddr_t)graph),
         (SPART *)t_full_box_copy_tree ((caddr_t)object), /* object is swapped with subject*/
         (SPART *)t_full_box_copy_tree ((caddr_t)predicate),
         (SPART *)t_full_box_copy_tree ((caddr_t)subject),
         t_full_box_copy_tree (qm_iri_or_pair),
         (SPART **)t_full_box_copy_tree ((caddr_t)options),
-        banned_tricks & 0x2 );
+        banned_tricks | SPAR_ADD_TRIPLELIKE_NO_INV_UNION );
       if (SPAR_TRIPLE != SPART_TYPE (triple))
         spar_error (sparp, "Property name \"%.200s\" has special meaning but it is declared in inference rules \"%.200s\" as an inverse property of \"%.200s\"",
           inv_p_name, sparp->sparp_env->spare_inference_name, predicate->_.qname.val );
@@ -2337,7 +2649,7 @@ spar_gp_add_transitive_triple (sparp_t *sparp, SPART *graph, SPART *subject, SPA
       if (SPAR_IS_BLANK_OR_VAR (fields[fld_ctr]))
         fields[fld_ctr]->_.var.selid = gp_selid;
     }
-  spar_gp_add_triple_or_special_filter (sparp, graph, subj_var, predicate, obj_var, qm_iri_or_pair, NULL, 0x1);
+  spar_gp_add_triplelike (sparp, graph, subj_var, predicate, obj_var, qm_iri_or_pair, NULL, banned_tricks | SPAR_ADD_TRIPLELIKE_NO_TRANSITIVE);
   sparp_set_option (sparp, &options, T_IN_L,
     spartlist (sparp, 2, SPAR_LIST, t_list (1, spar_make_variable (sparp, subj_vname))),
     SPARP_SET_OPTION_REPLACING );
@@ -2376,17 +2688,54 @@ spar_gp_add_transitive_triple (sparp_t *sparp, SPART *graph, SPART *subject, SPA
   return wrapper_gp;
 }
 
-static ptrlong usage_natural_restrictions[SPART_TRIPLE_FIELDS_COUNT] = {
+
+#if 0
+SPART *
+spar_const_g_for_defm_search (sparp_env_t *env)
+{
+  SPART *g = NULL;
+  dk_set_t *dflts;
+  if (env->spare_context_graphs)
+    {
+      g = (SPART *)t_box_copy_tree (env->spare_context_graphs->data);
+      goto g_found; /* see below*/
+    }
+  dflts = env->spare_src.ssrc_default_graphs;
+/* Special case: if no FROM clauses specified but there are some FROM NAMED then default graph is totally empty.
+So that's conflict for plain triple, but the processing of a graph-insensitive macro can not be cancelled because the body of macro could be
+GRAPH <vald_named_graph> { ... } */
+  if ((NULL == dflts) && (NULL != env->spare_src.ssrc_named_graphs))
+    return NULL;
+  if ((NULL != dflts) && (SPART_GRAPH_FROM == ((SPART *)(dflts->data))->_.graph.subtype) &&
+     ((NULL == dflts->next) || (SPART_GRAPH_MIN_NEGATION <= ((SPART *)(dflts->next->data))->_.graph.subtype)) )
+    { /* If there's only one default graph then we can cheat and optimize the query a little bit by adding a restriction to the variable */
+      SPART *single_dflt = (SPART *)(dflts->data);
+      caddr_t g_iri = single_dflt->_.graph.iri;
+      if (!SPAR_IS_LIT_OR_QNAME (single_dflt->_.graph.expn) && (NULL != g_iri))	 /* FROM iriref OPTION (...) case */
+        g = g_iri;
+      else
+        g = single_dflt->_.graph.expn;
+    }
+g_found:
+  if (SPAR_IS_LIT_OR_QNAME (g))
+    return g;
+  return NULL;
+}
+#endif
+
+ptrlong sparp_tr_usage_natural_restrictions[SPART_TRIPLE_FIELDS_COUNT] = {
   SPART_VARR_IS_REF | SPART_VARR_IS_IRI | SPART_VARR_NOT_NULL,	/* graph	*/
   SPART_VARR_IS_REF | SPART_VARR_NOT_NULL,			/* subject	*/
   SPART_VARR_IS_REF | SPART_VARR_NOT_NULL,			/* predicate	*/
   SPART_VARR_NOT_NULL };					/* object	*/
 
 SPART *
-spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subject, SPART *predicate, SPART *object, caddr_t qm_iri_or_pair, SPART **options, int banned_tricks)
+spar_gp_add_triplelike (sparp_t *sparp, SPART *graph, SPART *subject, SPART *predicate, SPART *object, caddr_t qm_iri_or_pair, SPART **options, int banned_tricks)
 {
   sparp_env_t *env = sparp->sparp_env;
   rdf_inf_ctx_t *inf_ctx = sparp->sparp_env->spare_inference_ctx;
+  SPART *graph_eq_from_option_expn = NULL;
+  int graph_can_bring_filters = 0;
   SPART *triple;
   if (NULL == subject)
     subject = (SPART *)t_box_copy_tree (env->spare_context_subjects->data);
@@ -2396,7 +2745,15 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
     object = (SPART *)t_box_copy_tree (env->spare_context_objects->data);
   if (CONSTRUCT_L == SPARP_ENV_CONTEXT_GP_SUBTYPE(sparp))
     {
-      graph = spar_make_blank_node (sparp, spar_mkid (sparp, "_::default"), 2);
+      if ((NULL == graph) && (NULL != env->spare_context_graphs))
+        {
+          graph = (SPART *)t_box_copy_tree (env->spare_context_graphs->data);
+        }
+      if (NULL == graph)
+        {
+          graph = spar_make_blank_node (sparp, spar_mkid (sparp, "_::default"), 2);
+          env->spare_ctor_dflt_g_tmpl_count++;
+        }
       goto plain_triple_in_ctor; /* see below */
     }
 #if 1
@@ -2458,8 +2815,8 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
   if (NULL != options)
     {
       SPART *trans = sparp_get_option (sparp, options, TRANSITIVE_L);
-      if ((NULL != trans) && !(0x1 & banned_tricks))
-        return spar_gp_add_transitive_triple (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, 0x1 | banned_tricks);
+      if ((NULL != trans) && !(SPAR_ADD_TRIPLELIKE_NO_TRANSITIVE & banned_tricks))
+        return spar_gp_add_transitive_triple (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, SPAR_ADD_TRIPLELIKE_NO_TRANSITIVE | banned_tricks);
     }
   if ((NULL != inf_ctx) && (SPAR_QNAME == SPART_TYPE (predicate)))
         {
@@ -2473,14 +2830,14 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
           if (ECM_MEM_NOT_FOUND != pp_pos)
             {
               ptrlong flags = (ptrlong)(propprops[pp_pos * 2 + 1]);
-              if ((1 & flags) && !(0x1 & banned_tricks))
+              if ((1 & flags) && !(SPAR_ADD_TRIPLELIKE_NO_TRANSITIVE & banned_tricks))
                 {
                   sparp_set_option (sparp, &options, TRANSITIVE_L, (SPART *)((ptrlong)1), SPARP_SET_OPTION_REPLACING);
-                  return spar_gp_add_transitive_triple (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, 0x1 | banned_tricks);
+                  return spar_gp_add_transitive_triple (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, SPAR_ADD_TRIPLELIKE_NO_TRANSITIVE | banned_tricks);
                 }
             }
         }
-      if ((NULL != invlist) && !(0x2 & banned_tricks))
+      if ((NULL != invlist) && !(SPAR_ADD_TRIPLELIKE_NO_INV_UNION & banned_tricks))
         {
           int invlistlen = BOX_ELEMENTS (invlist);
           int inv_pos = ecm_find_name (p_name, invlist, invlistlen/2, 2 * sizeof (caddr_t));
@@ -2492,7 +2849,7 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
               t_set_push (&inv_names, invlist [1 + 2 * inv_pos]);
               while ((((inv_pos+1) * 2) < invlistlen) && !strcmp (invlist[(inv_pos+1) * 2], p_name))
                 t_set_push (&inv_names, invlist [1 + 2 * ++inv_pos]);
-              return spar_gp_add_union_of_triple_and_inverses (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, 0x2 | banned_tricks, inv_names);
+              return spar_gp_add_union_of_triple_and_inverses (sparp, graph, subject, predicate, object, qm_iri_or_pair, options, SPAR_ADD_TRIPLELIKE_NO_INV_UNION | banned_tricks, inv_names);
             }
         }
     }
@@ -2519,7 +2876,7 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
             }
           spar_gp_add_filter (sparp,
             spar_make_funcall (sparp, 0, pname,
-              (SPART **)t_list_concat ((caddr_t)t_list (2, subject, object), (caddr_t)options) ) );
+              t_spartlist_concat ((SPART **)t_list (2, subject, object), options) ) );
 	  dk_free_tree (spec_pred_names);
           return NULL;
         }
@@ -2535,8 +2892,8 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
           graph = (SPART *)t_box_copy_tree (env->spare_context_graphs->data);
           break;
         }
-      dflts = env->spare_default_graphs;
-      if ((NULL == dflts) && (NULL != env->spare_named_graphs))
+      dflts = env->spare_src.ssrc_default_graphs;
+      if ((NULL == dflts) && (NULL != env->spare_src.ssrc_named_graphs))
         { /* Special case: if no FROM clauses specified but there are some FROM NAMED then default graph is totally empty */
           graph = spar_make_blank_node (sparp, spar_mkid (sparp, "_::default"), 2);
           graph->_.var.rvr.rvrRestrictions |= SPART_VARR_CONFLICT;
@@ -2549,12 +2906,13 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
           if (!SPAR_IS_LIT_OR_QNAME (single_dflt->_.graph.expn))	 /* FROM iriref OPTION (...) case */
             {
               caddr_t iri_arg = single_dflt->_.graph.iri;
-              SPART *eq;
               graph = spar_make_blank_node (sparp, spar_mkid (sparp, "_::default"), 2);
-              eq = spartlist (sparp, 3, BOP_EQ, sparp_tree_full_copy (sparp, graph, NULL), sparp_tree_full_copy (sparp, single_dflt->_.graph.expn, NULL));
-              spar_gp_add_filter (sparp, eq);
-              graph->_.var.rvr.rvrRestrictions |= SPART_VARR_FIXED | SPART_VARR_IS_REF | SPART_VARR_NOT_NULL;
-              graph->_.var.rvr.rvrFixedValue = t_box_copy (iri_arg);
+              graph_eq_from_option_expn = spartlist (sparp, 3, BOP_EQ, sparp_tree_full_copy (sparp, graph, NULL), sparp_tree_full_copy (sparp, single_dflt->_.graph.expn, NULL));
+              if (NULL != iri_arg)
+                {
+                  graph->_.var.rvr.rvrRestrictions |= SPART_VARR_FIXED | SPART_VARR_IS_REF | SPART_VARR_NOT_NULL;
+                  graph->_.var.rvr.rvrFixedValue = t_box_copy (iri_arg);
+                }
             }
           else /* Single FROM iriref without sponge options */
             graph = sparp_tree_full_copy (sparp, single_dflt->_.graph.expn, NULL);
@@ -2563,12 +2921,49 @@ spar_gp_add_triple_or_special_filter (sparp_t *sparp, SPART *graph, SPART *subje
         }
       else
         graph = spar_make_blank_node (sparp, spar_mkid (sparp, "_::default"), 2);
-      spar_gp_add_filters_for_graph (sparp, graph, 0, 0);
+      graph_can_bring_filters = 1;
       break;
     }
+  if (!(banned_tricks & SPAR_ADD_TRIPLELIKE_NO_MACRO))
+    {
+      int ctr, argctr;
+      SPART *match_defm = NULL;
+      SPART *mcall, *fields[4];
+      if (!sparp->sparp_storage_is_set)
+        sparp_configure_storage_and_macro_libs (sparp);
+      if (!sparp->sparp_macro_def_count)
+        goto mcall_not_found; /* see below */
+      fields[0] = graph;
+      fields[1] = subject;
+      fields[2] = predicate;
+      fields[3] = object;
+      match_defm = spar_find_defmacro_by_iri_or_fields (sparp, NULL, fields);
+      if (NULL == match_defm)
+        goto mcall_not_found; /* see below */
+      mcall = sparp_make_macro_call (sparp, match_defm->_.defmacro.mname, 0,
+        (SPART **)t_alloc_box (box_length (match_defm->_.defmacro.paramnames), DV_ARRAY_OF_POINTER) );
+      argctr = 0;
+      DO_BOX_FAST (SPART *, fld, ctr, match_defm->_.defmacro.quad_pattern)
+        {
+          if (SPAR_VARIABLE == SPART_TYPE (fld))
+            mcall->_.macrocall.argtrees[argctr++] = fields[ctr];
+        }
+      END_DO_BOX_FAST;
+      spar_gp_add_member (sparp, mcall);
+      if (!(sparp->sparp_macro_mode & SPARP_DEFBODY))
+        sparp->sparp_macro_call_count++;
+      return mcall;
+    }
+
+mcall_not_found: ;
 plain_triple_in_ctor:
   if (SPAR_IS_BLANK_OR_VAR (graph))
     graph->_.var.selid = env->spare_selids->data;
+  if (graph_can_bring_filters)
+    spar_gp_add_filters_for_graph (sparp, graph, 0, 0);
+  if (NULL != graph_eq_from_option_expn)
+    spar_gp_add_filter (sparp, graph_eq_from_option_expn);
+
   triple = spar_make_plain_triple (sparp, graph, subject, predicate, object, qm_iri_or_pair, options);
   if (NULL != options)
     sparp_validate_options_of_tree (sparp, triple, options);
@@ -2599,33 +2994,33 @@ spar_make_plain_triple (sparp_t *sparp, SPART *graph, SPART *subject, SPART *pre
       ptrlong ft = SPART_TYPE(fld);
       if ((SPAR_VARIABLE == ft) || (SPAR_BLANK_NODE_LABEL == ft))
         {
-          fld->_.var.rvr.rvrRestrictions |= usage_natural_restrictions[fctr];
+          fld->_.var.rvr.rvrRestrictions |= sparp_tr_usage_natural_restrictions[fctr];
           fld->_.var.tabid = key;
           fld->_.var.tr_idx = fctr;
           if (!(SPART_VARR_GLOBAL & fld->_.var.rvr.rvrRestrictions))
             t_set_push_new_string (&(env->spare_good_graph_varnames), fld->_.var.vname);
         }
-      if ((env->spare_grab.rgc_all) && (SPART_TRIPLE_PREDICATE_IDX != fctr))
+      if ((env->spare_src.ssrc_grab.rgc_all) && (SPART_TRIPLE_PREDICATE_IDX != fctr))
         {
           if ((SPAR_VARIABLE == ft) && !(SPART_VARR_GLOBAL & fld->_.var.rvr.rvrRestrictions))
-            t_set_push_new_string (&(env->spare_grab.rgc_vars), t_box_dv_uname_string (fld->_.var.vname));
+            t_set_push_new_string (&(env->spare_src.ssrc_grab.rgc_vars), t_box_dv_uname_string (fld->_.var.vname));
           else if (SPAR_QNAME == ft)
-            t_set_push_new_string (&(env->spare_grab.rgc_consts), fld->_.lit.val);
+            t_set_push_new_string (&(env->spare_src.ssrc_grab.rgc_consts), fld->_.lit.val);
         }
-      if ((NULL != env->spare_grab.rgc_sa_preds) &&
+      if ((NULL != env->spare_src.ssrc_grab.rgc_sa_preds) &&
         (SPART_TRIPLE_SUBJECT_IDX == fctr) &&
         (SPAR_VARIABLE == ft) &&
-        !(env->spare_grab.rgc_all) )
+        !(env->spare_src.ssrc_grab.rgc_all) )
         {
           SPART *obj = triple->_.triple.tr_object;
           ptrlong objt = SPART_TYPE(obj);
           if (
             ((SPAR_VARIABLE == objt) &&
-              (0 <= dk_set_position_of_string (env->spare_grab.rgc_vars, obj->_.var.vname)) ) ||
+              (0 <= dk_set_position_of_string (env->spare_src.ssrc_grab.rgc_vars, obj->_.var.vname)) ) ||
             ((SPAR_QNAME == objt) &&
-              (0 <= dk_set_position_of_string (env->spare_grab.rgc_consts, obj->_.lit.val)) ) )
+              (0 <= dk_set_position_of_string (env->spare_src.ssrc_grab.rgc_consts, obj->_.lit.val)) ) )
             {
-              t_set_push_new_string (&(env->spare_grab.rgc_sa_vars), t_box_dv_uname_string (fld->_.var.vname));
+              t_set_push_new_string (&(env->spare_src.ssrc_grab.rgc_sa_vars), t_box_dv_uname_string (fld->_.var.vname));
             }
         }
     }
@@ -2677,11 +3072,18 @@ spar_make_variable (sparp_t *sparp, caddr_t name)
   res = spartlist (sparp, 6 + (sizeof (rdf_val_range_t) / sizeof (caddr_t)),
       SPAR_VARIABLE, name,
       selid, NULL,
-      (ptrlong)(0), SPART_BAD_EQUIV_IDX, SPART_RVR_LIST_OF_NULLS );
+      (ptrlong)(SPART_VAR_OUTSIDE_TRIPLE), SPART_BAD_EQUIV_IDX, SPART_RVR_LIST_OF_NULLS );
   res->_.var.rvr.rvrRestrictions = (is_global ? SPART_VARR_GLOBAL : 0);
   return res;
 }
 
+SPART *
+spar_make_macropu (sparp_t *sparp, caddr_t name, ptrlong pos)
+{
+  SPART *res = spartlist (sparp, 4, SPAR_MACROPU, name, pos, (ptrlong)0);
+  return res;
+}
+
 SPART *spar_make_blank_node (sparp_t *sparp, caddr_t name, int bracketed)
 {
   sparp_env_t *env = sparp->sparp_env;
@@ -2693,7 +3095,7 @@ SPART *spar_make_blank_node (sparp_t *sparp, caddr_t name, int bracketed)
   res = spartlist (sparp, 7 + (sizeof (rdf_val_range_t) / sizeof (caddr_t)),
       SPAR_BLANK_NODE_LABEL, name,
       env->spare_selids->data, NULL,
-      (ptrlong)0, SPART_BAD_EQUIV_IDX, SPART_RVR_LIST_OF_NULLS, (ptrlong)bracketed );
+      (ptrlong)SPART_VAR_OUTSIDE_TRIPLE, SPART_BAD_EQUIV_IDX, SPART_RVR_LIST_OF_NULLS, (ptrlong)bracketed );
   res->_.var.rvr.rvrRestrictions = /*SPART_VARR_IS_REF | SPART_VARR_IS_BLANK |*/ SPART_VARR_NOT_NULL;
   return res;
 }
@@ -2782,7 +3184,7 @@ void
 sparp_make_and_push_new_graph_source (sparp_t *sparp, ptrlong subtype, SPART *iri_expn, SPART **options)
 {
   sparp_env_t *spare = sparp->sparp_env;
-  caddr_t iri = iri_expn->_.qname.val;
+  caddr_t iri = ((SPAR_QNAME == SPART_TYPE (iri_expn)) ? iri_expn->_.qname.val : NULL);
   dk_set_t *set_ptr;
   int *is_locked_ptr = NULL;
   SPART *dupe_found = NULL;
@@ -2791,58 +3193,61 @@ sparp_make_and_push_new_graph_source (sparp_t *sparp, ptrlong subtype, SPART *ir
   switch (subtype)
     {
     case SPART_GRAPH_FROM:
-      spare->spare_default_graphs_listed++;
-      is_locked_ptr = &(spare->spare_default_graphs_locked);
+      spare->spare_src.ssrc_default_graphs_listed++;
+      is_locked_ptr = &(spare->spare_src.ssrc_default_graphs_locked);
       /* no break */
     case SPART_GRAPH_NOT_FROM:
-      set_ptr = &(spare->spare_default_graphs);
+      set_ptr = &(spare->spare_src.ssrc_default_graphs);
       break;
     case SPART_GRAPH_NAMED:
-      spare->spare_named_graphs_listed++;
-      is_locked_ptr = &(spare->spare_named_graphs_locked);
+      spare->spare_src.ssrc_named_graphs_listed++;
+      is_locked_ptr = &(spare->spare_src.ssrc_named_graphs_locked);
       /* no break */
     case SPART_GRAPH_NOT_NAMED:
-      set_ptr = &(spare->spare_named_graphs);
+      set_ptr = &(spare->spare_src.ssrc_named_graphs);
       break;
     default:
       spar_internal_error (sparp, "sparp_make_and_push_new_graph_source(): bad subtype");
       set_ptr = NULL; /* To keep compiler happy */
       break;
     }
-  DO_SET (SPART *, c, set_ptr)
+  if (NULL != iri)
     {
-      if ((subtype < SPART_GRAPH_MIN_NEGATION) && (SPART_GRAPH_MIN_NEGATION < c->_.graph.subtype))
+      DO_SET (SPART *, c, set_ptr)
         {
-          if (is_locked_ptr && is_locked_ptr[0])
+          if (strcmp (c->_.graph.iri, iri))
+            continue;
+          if ((subtype < SPART_GRAPH_MIN_NEGATION) && (SPART_GRAPH_MIN_NEGATION < c->_.graph.subtype))
             {
-              const char *fty = ((SPART_GRAPH_NAMED == subtype) ? " NAMED" : "");
-              spar_error (sparp, "An IRI <%.200s> can not be used in FROM%s clause because it is excluded by NOT FROM%s already",
-                iri, fty, fty );
+              if (is_locked_ptr && is_locked_ptr[0])
+                {
+                  const char *fty = ((SPART_GRAPH_NAMED == subtype) ? " NAMED" : "");
+                  spar_error (sparp, "An IRI <%.200s> can not be used in FROM%s clause because it is excluded by NOT FROM%s already",
+                    iri, fty, fty );
+                }
+              return; /* A (failed) attempt to overwrite NOT FROM with FROM */
+            }
+          if ((c->_.graph.subtype == subtype) && (SPAR_QNAME != SPART_TYPE (c->_.graph.expn)))
+            t_set_delete (set_ptr, c);
+          else
+            {
+              dupe_found = c;
+              break;
             }
-          return; /* A (failed) attempt to overwrite NOT FROM with FROM */
-        }
-      if (strcmp (c->_.graph.iri, iri))
-        continue;
-      if ((c->_.graph.subtype == subtype) && (SPAR_QNAME != SPART_TYPE (c->_.graph.expn)))
-        t_set_delete (set_ptr, c);
-      else
-        {
-          dupe_found = c;
-          break;
         }
+      END_DO_SET()
     }
-  END_DO_SET()
   if ((NULL == dupe_found) && (subtype < SPART_GRAPH_MIN_NEGATION) && is_locked_ptr && is_locked_ptr[0])
     {
       const char *fty = ((SPART_GRAPH_NAMED == subtype) ? " NAMED" : "");
-      spar_error (sparp, "FROM %s <%.200s> clause violates security restrictions on allowed graph names", fty, iri);
+      spar_error (sparp, "FROM %s <%.200s> clause violates security restrictions on allowed graph names", fty, ((NULL != iri) ? "..." : iri));
     }
   if ((SPART_GRAPH_MIN_NEGATION < subtype) && (NULL != options))
     {
       const char *fty = ((SPART_GRAPH_NAMED == subtype) ? " NAMED" : "");
-      spar_error (sparp, "NOT FROM%s <%.200s> clause can not have options, only FROM and FROM NAMED can", fty, iri);
+      spar_error (sparp, "NOT FROM%s <%.200s> clause can not have options, only FROM and FROM NAMED can", fty, ((NULL != iri) ? "..." : iri));
     }
-  if (rdf_graph_group_dict_htable->ht_count)
+  if ((NULL != iri) && rdf_graph_group_dict_htable->ht_count)
     {
       caddr_t iid = sparp_graph_sec_iri_to_id_nosignal (sparp, iri);
       if (NULL != iid)
@@ -2889,8 +3294,8 @@ sparp_make_and_push_new_graph_source (sparp_t *sparp, ptrlong subtype, SPART *ir
 SPART *
 sparp_make_graph_precode (sparp_t *sparp, ptrlong subtype, SPART *iriref, SPART **options)
 {
-  rdf_grab_config_t *rgc_ptr = &(sparp->sparp_env->spare_grab);
-  dk_set_t *opts_ptr = &(sparp->sparp_env->spare_common_sponge_options);
+  rdf_grab_config_t *rgc_ptr = &(sparp->sparp_env->spare_src.ssrc_grab);
+  dk_set_t *opts_ptr = &(sparp->sparp_env->spare_src.ssrc_common_sponge_options);
   SPART **mixed_options, **mixed_tail;
   int common_count, ctr;
   user_t *exec_user;
@@ -2910,12 +3315,12 @@ sparp_make_graph_precode (sparp_t *sparp, ptrlong subtype, SPART *iriref, SPART
   END_DO_SET()
   for (ctr = BOX_ELEMENTS_0 (options) - 2; 0 <= ctr; ctr -= 2)
     {
-      caddr_t param = (caddr_t)(options[ctr]);
+      ccaddr_t param = (ccaddr_t)(options[ctr]);
       const char **chk;
       for (chk = sparp_known_get_params; (NULL != chk[0]) && strcmp (chk[0], param); chk++) ;
       if (NULL == chk[0])
         spar_error (sparp, "Unsupported parameter '%.30s' in FROM ... (OPTION ...)", param);
-      if (0 < dk_set_position_of_string (opts_ptr[0], param))
+      if (NULL != dk_set_getptr_keyword (opts_ptr[0], param))
         spar_error (sparp, "FROM ... (OPTION ... %s ...) conflicts with 'DEFINE %s ...", param, param);
       (mixed_tail++)[0] = (SPART *)t_full_box_copy_tree (param);
       (mixed_tail++)[0] = (SPART *)t_full_box_copy_tree ((caddr_t)(options[ctr + 1]));
@@ -2936,13 +3341,28 @@ sparp_make_graph_precode (sparp_t *sparp, ptrlong subtype, SPART *iriref, SPART
 }
 
 SPART *
-spar_default_sparul_target (sparp_t *sparp, const char *clause_type)
+spar_default_sparul_target (sparp_t *sparp, const char *clause_type, int may_return_null)
 {
-  dk_set_t dflt_graphs = sparp->sparp_env->spare_default_graphs;
+  dk_set_t dflt_graphs = sparp->sparp_env->spare_src.ssrc_default_graphs;
+  SPART *u_graph = sparp->sparp_env->spare_src.ssrc_graph_set_by_with;
+  if (NULL != u_graph)
+    {
+      if (sparp->sparp_env->spare_src.ssrc_default_graphs_locked)
+        spar_error (sparp, "USING clause is used but default graph is locked in the preamble");
+      return sparp_tree_full_copy (sparp, (SPART *)(u_graph), NULL);
+    }
   if ((NULL == dflt_graphs) || (((SPART *)(dflt_graphs->data))->_.graph.subtype > SPART_GRAPH_MIN_NEGATION))
-    spar_error (sparp, "No %.200s and no default graph specified in the preamble", clause_type);
+    {
+      if (may_return_null)
+        return NULL;
+      spar_error (sparp, "No %.200s and no default graph specified in the preamble", clause_type);
+    }
   if ((NULL != dflt_graphs->next) && (((SPART *)(dflt_graphs->next->data))->_.graph.subtype < SPART_GRAPH_MIN_NEGATION))
-    spar_error (sparp, "No %.200s and more than one default graph specified in the preamble", clause_type);
+    {
+      if (may_return_null)
+        return NULL;
+      spar_error (sparp, "No %.200s and more than one default graph specified in the preamble", clause_type);
+    }
   if (SPART_GRAPH_GROUP == ((SPART *)(dflt_graphs->data))->_.graph.subtype)
     spar_error (sparp, "No %.200s and the IRI in preamble refers to default graph group, not a single default graph", clause_type);
   return sparp_tree_full_copy (sparp, (SPART *)(dflt_graphs->data), NULL);
@@ -2996,12 +3416,12 @@ spar_make_regex_or_like_or_eq (sparp_t *sparp, SPART *strg, SPART *regexpn)
   if (tail != like_tmpl + final_len)
     GPF_T1 ("spar_" "make_regex_or_like_or_eq (): pointer arithmetic error on like_tmpl");
 /*#endif*/
-  return spartlist (sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)LIKE_L,
-    t_list (2, strg,
+  return sparp_make_builtin_call (sparp, LIKE_L,
+    (SPART **)t_list (2, strg,
       spartlist (sparp, 4, SPAR_LIT, like_tmpl, NULL, NULL) ) );
 
 bad_regex:
- return spartlist (sparp, 3, SPAR_BUILT_IN_CALL, (ptrlong)REGEX_L, t_list (2, strg, regexpn));
+ return sparp_make_builtin_call (sparp, SPAR_BIF_REGEX, (SPART **)t_list (2, strg, regexpn));
 }
 
 void
@@ -3013,13 +3433,25 @@ spar_verify_funcall_security (sparp_t *sparp, ccaddr_t fname, SPART **args)
   char buf[30];
   const char *unsafe_sql_names[] = {
     "RDF_INSERT_TRIPLES",
+    "RDF_INSERT_TRIPLES",
     "RDF_DELETE_TRIPLES",
+    "RDF_GLOBAL_RESET",
     "RDF_GRAPH_GROUP_LIST_GET",
     "RDF_LOAD_RDFXML",
     "RDF_LOAD_RDFXML_MT",
     "RDF_MODIFY_TRIPLES",
+    "RDF_REPL_DELETE_TRIPLES",
+    "RDF_REPL_GRAPH_DEL",
+    "RDF_REPL_GRAPH_INS",
+    "RDF_REPL_INSERT_TRIPLES",
+    "RDF_REPL_START",
+    "RDF_REPL_STOP",
+    "RDF_REPL_SYNC",
+    "RDF_SPONGE_UP",
     "SPARQL_INSERT_DICT_CONTENT",
+    "SPARQL_INSERT_QUAD_DICT_CONTENT",
     "SPARQL_DELETE_DICT_CONTENT",
+    "SPARQL_DELETE_QUAD_DICT_CONTENT",
     "SPARQL_DESC_AGG",
     "SPARQL_DESC_AGG_ACC",
     "SPARQL_DESC_AGG_INIT",
@@ -3030,11 +3462,15 @@ spar_verify_funcall_security (sparp_t *sparp, ccaddr_t fname, SPART **args)
     "SPARQL_DESC_DICT_SPO",
     "SPARQL_DESC_DICT_SPO_PHYSICAL",
     "SPARQL_MODIFY_BY_DICT_CONTENTS",
+    "SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS",
     "SPARQL_SELECT_KNOWN_GRAPHS",
-    "SPARUL_LOAD",
+    "SPARUL_ADD",
     "SPARUL_CLEAR",
+    "SPARUL_COPY",
     "SPARUL_CREATE",
     "SPARUL_DROP",
+    "SPARUL_LOAD",
+    "SPARUL_MOVE",
     "SPARUL_RUN",
     "TTLP",
     "TTLP_EV_GET_IID",
@@ -3099,6 +3535,20 @@ restricted:
   spar_error (sparp, "Function %.200s() can not be used in text of SPARQL query due to security restrictions", fname);
 }
 
+caddr_t
+spar_colonize_qname_uname (const char *strg)
+{
+  const char *tail, *strg_end = strg + strlen (strg);
+  for (tail = strg_end; tail > strg; tail--)
+    if (!isplainURIchar (tail[-1]))
+      {
+        caddr_t res;
+        BOX_DV_UNAME_COLONCONCAT5(res, strg, tail-strg, tail, strg_end-tail);
+        return res;
+      }
+  return box_dv_uname_string (strg);
+}
+
 SPART *
 spar_make_funcall (sparp_t *sparp, int aggregate_mode, const char *funname, SPART **args)
 {
@@ -3126,25 +3576,229 @@ spar_make_funcall (sparp_t *sparp, int aggregate_mode, const char *funname, SPAR
   if (!(sparp->sparp_allow_aggregates_in_expn & 1))
     spar_error (sparp, "Aggregate function %.100s() is not allowed outside result-set expressions", funname);
 aggr_checked:
+  if (strncmp (funname, "bif:", 4))
+    {
+      xpf_metadata_t *metas = NULL;
+      caddr_t colonized_funname = spar_colonize_qname_uname (funname);
+      xpf_metadata_t ** metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&colonized_funname));
+      int param_count;
+      if (NULL == metas_ptr)
+        {
+          dk_free_box (colonized_funname);
+          goto xpf_checked; /* see below */
+        }
+      param_count = BOX_ELEMENTS (args);
+      metas = metas_ptr[0];
+      if (metas->xpfm_min_arg_no > param_count)
+        spar_error (sparp, "The XPATH function %.200s() requires %d arguments but the call contains only %d",
+          funname, (int)(metas->xpfm_min_arg_no), param_count );
+      if (metas->xpfm_main_arg_no < param_count)
+        {
+          if (0 == metas->xpfm_tail_arg_no)
+            spar_error (sparp, "The XPATH function %.200s() can handle only %d arguments but the call provides %d",
+              funname, (int)(metas->xpfm_main_arg_no), param_count );
+          else
+            {
+              int tail_mod = (param_count - metas->xpfm_main_arg_no) % metas->xpfm_tail_arg_no;
+              if (tail_mod)
+                spar_error (sparp, "The XPATH function %.200s() can handle %d, %d, %d etc. arguments but the call provides %d",
+                  funname, (int)(metas->xpfm_main_arg_no), (int)(metas->xpfm_main_arg_no + metas->xpfm_tail_arg_no), (int)(metas->xpfm_main_arg_no + 2 * metas->xpfm_tail_arg_no),
+                  param_count );
+            }
+        }
+      return spartlist (sparp, 4, SPAR_FUNCALL, t_box_sprintf (100, "xpath:%.90s", colonized_funname), args, (ptrlong) 0);
+    }
+xpf_checked:
   if (aggregate_mode)
-    sparp->sparp_query_uses_aggregates++;
+    {
+      if (SPARP_DEFBODY & sparp->sparp_macro_mode)
+        sparp->sparp_current_macro->_.defmacro.aggregate_count++;
+      else
+        sparp->sparp_query_uses_aggregates++;
+    }
   return spartlist (sparp, 4, SPAR_FUNCALL, t_box_dv_short_string (funname), args, (ptrlong)aggregate_mode);
 }
 
+const sparp_bif_desc_t sparp_bif_descs[] = {
+/*  sbd_name		| sbd_subtype			, impl	| sbd_required_syntax	| min-/maxargs	| ret_valmode		| sbd_arg_valmodes					| sbd_result_restr_bits		*/
+  { ""			, 0				, '-'	, 0			, 0	, 0	, NULL			, { SSG_VALMODE_SQLVAL, NULL, NULL}			, 0	},
+  { "abs"		, SPAR_BIF_ABS			, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, 0	},
+  { "bnode"		, SPAR_BIF_BNODE		, '-'	, SSG_SD_SPARQL11	, 0	, 1	, SSG_VALMODE_LONG	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_BLANK | SPART_VARR_IS_REF	},
+  { "bound"		, BOUND_L			, '-'	, 0			, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "ceil"		, SPAR_BIF_CEIL			, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, 0	},
+  { "coalesce"		, SPAR_BIF_COALESCE		, '-'	, SSG_SD_SPARQL11	, 0	, 0xFFF	, NULL			, { SSG_VALMODE_SQLVAL, NULL, NULL}			, 0	},
+  { "concat"		, SPAR_BIF_CONCAT		, 'B'	, SSG_SD_SPARQL11	, 0	, 0xFFF	, NULL			, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "contains"		, SPAR_BIF_CONTAINS		, 'B'	, SSG_SD_SPARQL11	, 2	, 2	, SSG_VALMODE_BOOL	, { SSG_VALMODE_LONG, SSG_VALMODE_LONG, NULL}		, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "datatype"		, DATATYPE_L			, '-'	, 0			, 1	, 1	, SSG_VALMODE_LONG	, { SSG_VALMODE_LONG, NULL, NULL}			, SPART_VARR_IS_IRI | SPART_VARR_IS_REF	},
+  { "day"		, SPAR_BIF_DAY			, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "encode_for_uri"	, SPAR_BIF_ENCODE_FOR_URI	, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "floor"		, SPAR_BIF_FLOOR		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "hours"		, SPAR_BIF_HOURS		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "if"		, SPAR_BIF_IF			, '-'	, SSG_SD_SPARQL11	, 3	, 3	, NULL			, { SSG_VALMODE_BOOL, NULL, NULL}			, 0	},
+  { "in operator"	, IN_L				, '-'	, 0			, 1	, 0xFFF	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "iri"		, IRI_L				, '-'	, SSG_SD_BI_OR_SPARQL11	, 1	, 1	, SSG_VALMODE_LONG	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_IRI | SPART_VARR_IS_REF | SPART_VARR_NOT_NULL	},
+  { "isblank"		, SPAR_BIF_ISBLANK		, '-'	, 0			, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "isiri"		, SPAR_BIF_ISIRI		, '-'	, 0			, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "isliteral"		, SPAR_BIF_ISLITERAL		, '-'	, 0			, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "isnumeric"		, SPAR_BIF_ISNUMERIC		, '-'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "isref"		, SPAR_BIF_ISREF		, '-'	, SSG_SD_BI		, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "isuri"		, SPAR_BIF_ISURI		, '-'	, 0			, 1	, 1	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "lang"		, LANG_L			, '-'	, 0			, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_LONG, NULL, NULL}			, SPART_VARR_IS_LIT	},
+  { "langmatches"	, SPAR_BIF_LANGMATCHES		, '-'	, 0			, 2	, 2	, SSG_VALMODE_BOOL	, { SSG_VALMODE_LONG, SSG_VALMODE_SQLVAL, NULL}		, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "like operator"	, LIKE_L			, '-'	, 0			, 2	, 2	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, SSG_VALMODE_SQLVAL, NULL}	, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "lcase"		, SPAR_BIF_LCASE		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_LONG	, { SSG_VALMODE_LONG, NULL, NULL}			, SPART_VARR_IS_LIT	},
+  { "md5"		, SPAR_BIF_MD5			, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "minutes"		, SPAR_BIF_MINUTES		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "month"		, SPAR_BIF_MONTH		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "now"		, SPAR_BIF_NOW			, 'B'	, SSG_SD_SPARQL11	, 0	, 0	, SSG_VALMODE_NUM	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "rand"		, SPAR_BIF_RAND			, 'B'	, SSG_SD_SPARQL11	, 0	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "regex"		, SPAR_BIF_REGEX		, 'B'	, 0			, 2	, 3	, SSG_VALMODE_BOOL	, { SSG_VALMODE_SQLVAL, SSG_VALMODE_SQLVAL, SSG_VALMODE_SQLVAL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "replace"		, SPAR_BIF_REPLACE		, 'S'	, SSG_SD_SPARQL11	, 3	, 4	, SSG_VALMODE_LONG	, { SSG_VALMODE_LONG, SSG_VALMODE_SQLVAL, SSG_VALMODE_SQLVAL}	, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "round"		, SPAR_BIF_ROUND		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "sameterm"		, SPAR_BIF_SAMETERM		, '-'	, 0			, 2	, 2	, SSG_VALMODE_BOOL	, { SSG_VALMODE_LONG, SSG_VALMODE_LONG, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "seconds"		, SPAR_BIF_SECONDS		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "sha1"		, SPAR_BIF_SHA1			, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "sha224"		, SPAR_BIF_SHA224		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "sha256"		, SPAR_BIF_SHA256		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "sha384"		, SPAR_BIF_SHA384		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "sha512"		, SPAR_BIF_SHA512		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL	},
+  { "str"		, SPAR_BIF_STR			, '-'	, 0			, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT	},
+  { "strdt"		, SPAR_BIF_STRDT		, 'S'	, SSG_SD_SPARQL11	, 2	, 2	, SSG_VALMODE_LONG	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT	},
+  { "strends"		, SPAR_BIF_STRENDS		, 'B'	, SSG_SD_SPARQL11	, 2	, 2	, SSG_VALMODE_BOOL	, { SSG_VALMODE_LONG, SSG_VALMODE_LONG, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "strlang"		, SPAR_BIF_STRLANG		, 'S'	, SSG_SD_SPARQL11	, 2	, 2	, SSG_VALMODE_LONG	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT	},
+  { "strlen"		, SPAR_BIF_STRLEN		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "strstarts"		, SPAR_BIF_STRSTARTS		, 'B'	, SSG_SD_SPARQL11	, 2	, 2	, SSG_VALMODE_BOOL	, { SSG_VALMODE_LONG, SSG_VALMODE_LONG, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "substr"		, SPAR_BIF_SUBSTR		, 'B'	, SSG_SD_SPARQL11	, 2	, 3	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_LONG, SSG_VALMODE_NUM, SSG_VALMODE_NUM}			, SPART_VARR_IS_LIT	},
+  { "timezone"		, SPAR_BIF_TIMEZONE		, 'S'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "tz"		, SPAR_BIF_TZ			, 'S'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_SQLVAL	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+  { "ucase"		, SPAR_BIF_UCASE		, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_LONG	, { SSG_VALMODE_LONG, NULL, NULL}			, SPART_VARR_IS_LIT	},
+  { "uri"		, SPAR_BIF_URI			, '-'	, SSG_SD_BI_OR_SPARQL11	, 1	, 1	, SSG_VALMODE_LONG	, { SSG_VALMODE_SQLVAL, NULL, NULL}			, SPART_VARR_IS_IRI | SPART_VARR_IS_REF	},
+  { "year"		, SPAR_BIF_YEAR			, 'B'	, SSG_SD_SPARQL11	, 1	, 1	, SSG_VALMODE_NUM	, { SSG_VALMODE_NUM, NULL, NULL}			, SPART_VARR_IS_LIT | SPART_VARR_NOT_NULL | SPART_VARR_LONG_EQ_SQL	},
+};
+
+SPART *
+sparp_make_builtin_call (sparp_t *sparp, ptrlong bif_id, SPART **arguments)
+{
+  ptrlong ofs;
+  for (ofs = sizeof (sparp_bif_descs)/sizeof (sparp_bif_descs[0]); ofs--; /* no step */)
+    {
+      const sparp_bif_desc_t *sbd = sparp_bif_descs + ofs;
+      int argcount;
+      if (sbd->sbd_subtype != bif_id)
+        continue;
+      argcount = BOX_ELEMENTS_0 (arguments);
+      if (argcount < sbd->sbd_minargs)
+        sparyyerror_impl (sparp, NULL, t_box_sprintf (100, "Insufficient number of arguments of a standard built-in function %s()", sbd->sbd_name));
+      if (argcount > sbd->sbd_maxargs)
+        sparyyerror_impl (sparp, NULL, t_box_sprintf (100, "Too many arguments of a standard built-in function %s()", sbd->sbd_name));
+      goto ofs_found; /* see below */
+    }
+  spar_internal_error (sparp, "sparp" "_make_builtin_call(): bad bif_id");
+ofs_found:
+  return spartlist (sparp, 4, SPAR_BUILT_IN_CALL, bif_id, ofs, arguments);
+}
+
+SPART *
+sparp_make_macro_call (sparp_t *sparp, caddr_t mname, int call_is_explicit, SPART **args)
+{
+  SPART *mdecl = spar_find_defmacro_by_iri_or_fields (sparp, mname, NULL);
+  SPART *g_ctx, *res;
+  dk_set_t g_ctxs;
+  int argcount, paramcount;
+  if (NULL == mdecl)
+    spar_internal_error (sparp, "sparp_" "make_macro_call(): undefined macro");
+  paramcount = BOX_ELEMENTS (mdecl->_.defmacro.paramnames);
+  argcount = BOX_ELEMENTS_0 (args);
+  if (paramcount != argcount)
+    spar_error (sparp, "The macro <%.200s> is used with %d arguments, %d expected", mname, argcount, paramcount);
+  g_ctxs = sparp->sparp_env->spare_context_graphs;
+  g_ctx = ((NULL != g_ctxs) ? (SPART *)t_full_box_copy_tree ((caddr_t)(g_ctxs->data)) : NULL);
+  res = spartlist (sparp, 5, SPAR_MACROCALL, t_box_dv_short_string (mname), args, g_ctx, spar_mkid (sparp, "m"));
+  return res;
+}
+
+int
+sparp_namesake_macro_param (sparp_t *sparp, SPART *dm, caddr_t param_name)
+{
+  int ctr;
+  if (NULL == dm)
+    {
+      dm = sparp->sparp_current_macro;
+      if (NULL == dm)
+        return -3;
+    }
+  DO_BOX_FAST_REV (caddr_t, name, ctr, dm->_.defmacro.paramnames)
+    {
+      if (!strcmp (name, param_name))
+        return ctr;
+    }
+  END_DO_BOX_FAST;
+  DO_BOX_FAST_REV (caddr_t, name, ctr, dm->_.defmacro.localnames)
+    {
+      if (!strcmp (name, param_name))
+        return -1;
+    }
+  END_DO_BOX_FAST;
+  return -2;
+}
+
+SPART *
+spar_make_create_macro_lib (sparp_t *sparp)
+{
+  SPART *fake_sol;
+  SPART *call, *top;
+  spar_selid_push (sparp);
+  fake_sol = spar_make_fake_action_solution (sparp);
+  call = spar_make_funcall (sparp, 0, t_box_dv_short_string ("sql:RDF_SML_CREATE"),
+    (SPART **)t_list (2, sparp->sparp_macrolib_to_create, t_box_dv_short_string (sparp->sparp_text)) );
+  top = spar_make_top_or_special_case_from_wm (sparp, SPAR_SML_CREATE,
+    (SPART **)t_list (1, call),
+    spar_selid_pop (sparp), fake_sol );
+  return top;
+}
+
 SPART *
-spar_make_sparul_mdw (sparp_t *sparp, ptrlong subtype, const char *opname, SPART *graph_precode, SPART *aux_op)
+spar_make_drop_macro_lib (sparp_t *sparp, SPART *sml_precode, int silent)
 {
   SPART *fake_sol;
   SPART *call, *top;
+  spar_selid_push (sparp);
+  fake_sol = spar_make_fake_action_solution (sparp);
+  call = spar_make_funcall (sparp, 0, t_box_dv_short_string ("sql:RDF_SML_DROP"),
+    (SPART **)t_list (2, sml_precode, t_box_num_nonull (silent)) );
+  top = spar_make_top_or_special_case_from_wm (sparp, SPAR_SML_DROP,
+    (SPART **)t_list (1, call),
+    spar_selid_pop (sparp), fake_sol );
+  return top;
+}
+
+SPART *
+spar_make_sparul_mdw (sparp_t *sparp, ptrlong subtype, const char *opname, SPART *graph_precode, SPART *aux_op, int silent)
+{
+  SPART *fake_sol;
+  SPART *call, *top, **options = NULL, *options_vector_call;
   caddr_t log_mode = sparp->sparp_env->spare_sparul_log_mode;
   spar_selid_push (sparp);
   fake_sol = spar_make_fake_action_solution (sparp);
   if (NULL == log_mode)
     log_mode = t_NEW_DB_NULL;
+  if (LOAD_L == subtype)
+    {
+      dk_set_t *opts_ptr = &(sparp->sparp_env->spare_src.ssrc_common_sponge_options);
+      options = (SPART **)t_full_box_copy_tree ((caddr_t)(t_list_to_array (opts_ptr[0])));
+      if (NULL != dk_set_getptr_keyword (opts_ptr[0], "get:destination"))
+        spar_error (sparp, "DEFINE get:destination ... is not applicable for SPARUL LOAD statement, use LOAD ... INTO ... form instead");
+      if (NULL != dk_set_getptr_keyword (opts_ptr[0], "get:uri"))
+        spar_error (sparp, "DEFINE get:uri ... is not applicable for SPARUL LOAD statement, use LOAD ... INTO ... form instead");
+    }
+  if (NULL == options)
+    options_vector_call = (SPART *)t_NEW_DB_NULL;
+  else
+    options_vector_call = spar_make_funcall (sparp, 0, "bif:vector", options);
   if (NULL != sparp->sparp_env->spare_output_route_name)
     call = spar_make_funcall (sparp, 0,
       t_box_sprintf (200, "sql:SPARQL_ROUTE_MDW_%.100s", sparp->sparp_env->spare_output_route_name),
-      (SPART **)t_list (11, graph_precode,
+      (SPART **)t_list (13, graph_precode,
           t_box_dv_short_string (opname),
           ((NULL == sparp->sparp_env->spare_storage_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_storage_name),
           ((NULL == sparp->sparp_env->spare_output_storage_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_output_storage_name),
@@ -3152,38 +3806,106 @@ spar_make_sparul_mdw (sparp_t *sparp, ptrlong subtype, const char *opname, SPART
           aux_op,
           t_NEW_DB_NULL,
           t_NEW_DB_NULL,
-          spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp)) );
+          spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp), options_vector_call,
+          (SPART *)t_box_num_nonull (silent) ) );
   else
     call = spar_make_funcall (sparp, 0, t_box_sprintf (30, "sql:SPARUL_%.15s", opname),
-      (SPART **)t_list (5, graph_precode, aux_op, spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp)) );
+      (SPART **)t_list (7, graph_precode, aux_op,
+      spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp), options_vector_call,
+      (SPART *)t_box_num_nonull (silent) ) );
   top = spar_make_top_or_special_case_from_wm (sparp, subtype,
     (SPART **)t_list (1, call),
     spar_selid_pop (sparp), fake_sol );
   return top;
 }
 
+SPART *spar_make_graph_precode_for_clear (sparp_t *sparp, SPART *graph_precode, const char *opname)
+{
+  int clear_default = 0;
+  int clear_named = 0;
+  dk_set_t graphs = NULL;
+  switch ((ptrlong)graph_precode)
+    {
+    case DEFAULT_L: clear_default = 1; break;
+    case NAMED_L: clear_named = 1; break;
+    case ALL_L: clear_default = clear_named = 1; break;
+    default: return graph_precode;
+    }
+  if (clear_default)
+    {
+      DO_SET (SPART *, src, &(sparp->sparp_env->spare_src.ssrc_default_graphs))
+        {
+          if (SPART_GRAPH_FROM != src->_.graph.subtype)
+            spar_error (sparp, "Graph groups, NOT FROM and its equivalents are not supported for SPARQL %.200s DEFAULT and SPARQL %.200s ALL", opname, opname);
+          t_set_push (&graphs, spar_simplify_graph_to_patch (sparp, src));
+        }
+      END_DO_SET ();
+    }
+  if (clear_named)
+    {
+      DO_SET (SPART *, src, &(sparp->sparp_env->spare_src.ssrc_named_graphs))
+        {
+          if (SPART_GRAPH_NAMED != src->_.graph.subtype)
+            spar_error (sparp, "Graph groups, NOT FROM NAMED and its equivalents are not supported for SPARQL %.200s NAMED and SPARQL %.200s ALL", opname, opname);
+          t_set_push (&graphs, spar_simplify_graph_to_patch (sparp, src));
+        }
+      END_DO_SET ();
+    }
+  return spar_make_funcall (sparp, 0, "bif:vector", (SPART **)t_revlist_to_array (graphs));
+}
+
 SPART *
-spar_make_sparul_clear (sparp_t *sparp, SPART *graph_precode)
+spar_make_sparul_clear (sparp_t *sparp, SPART *graph_precode, int silent)
 {
-  return spar_make_sparul_mdw (sparp, CLEAR_L, "CLEAR", graph_precode, (SPART *)t_box_num_nonull (0) /* i.e. not inside sponge */);
+  SPART *graph_arg = spar_make_graph_precode_for_clear (sparp, graph_precode, "CLEAR");
+  return spar_make_sparul_mdw (sparp, CLEAR_L, "CLEAR", graph_arg, (SPART *)t_box_num_nonull (0) /* i.e. not inside sponge */, silent);
 }
 
 SPART *
-spar_make_sparul_load (sparp_t *sparp, SPART *graph_precode, SPART *src_precode)
+spar_make_sparul_load (sparp_t *sparp, SPART *graph_precode, SPART *src_precode, int silent)
 {
-  return spar_make_sparul_mdw (sparp, LOAD_L, "LOAD", graph_precode, src_precode);
+  return spar_make_sparul_mdw (sparp, LOAD_L, "LOAD", graph_precode, src_precode, silent);
 }
 
 SPART *
 spar_make_sparul_create (sparp_t *sparp, SPART *graph_precode, int silent)
 {
-  return spar_make_sparul_mdw (sparp, CREATE_L, "CREATE", graph_precode, (SPART *)t_box_num_nonull (silent));
+  return spar_make_sparul_mdw (sparp, CREATE_L, "CREATE", graph_precode, NULL, silent);
 }
 
 SPART *
 spar_make_sparul_drop (sparp_t *sparp, SPART *graph_precode, int silent)
 {
-  return spar_make_sparul_mdw (sparp, DROP_L, "DROP", graph_precode, (SPART *)t_box_num_nonull (silent));
+  SPART *graph_arg = spar_make_graph_precode_for_clear (sparp, graph_precode, "DROP");
+  return spar_make_sparul_mdw (sparp, DROP_L, "DROP", graph_arg, NULL, silent);
+}
+
+SPART *
+spar_make_sparul_copymoveadd (sparp_t *sparp, ptrlong opcode, SPART *from_graph_precode, SPART *to_graph_precode, int silent)
+{
+  const char *opname = NULL;
+  switch (opcode)
+    {
+    case COPY_L: opname = "COPY"; break;
+    case MOVE_L: opname = "MOVE"; break;
+    case ADD_L: opname = "ADD"; break;
+    default: GPF_T;
+    }
+  if ((DEFAULT_L == (ptrlong)(from_graph_precode)) || (DEFAULT_L == (ptrlong)(to_graph_precode)))
+    {
+      SPART *single_default;
+      dk_set_t graphs = sparp->sparp_env->spare_src.ssrc_default_graphs;
+      if ((NULL == graphs) || (SPART_GRAPH_FROM != ((SPART *)(graphs->data))->_.graph.subtype))
+        spar_error (sparp, "SPARQL 1.1 %s...DEFAULT operator requires declaration of a plain default graph", opname);
+      if ((NULL != graphs->next) && (SPART_GRAPH_MIN_NEGATION <= ((SPART *)(graphs->next->data))->_.graph.subtype))
+        spar_error (sparp, "SPARQL 1.1 %s...DEFAULT operator requires exactly one default graph", opname);
+      single_default = spar_simplify_graph_to_patch (sparp, (SPART *)(graphs->data));
+      if (DEFAULT_L == (ptrlong)(from_graph_precode))
+        from_graph_precode = single_default;
+      if (DEFAULT_L == (ptrlong)(to_graph_precode))
+        to_graph_precode = single_default;
+    }
+  return spar_make_sparul_mdw (sparp, DROP_L, opname, from_graph_precode, to_graph_precode, silent);
 }
 
 SPART *
@@ -3211,7 +3933,6 @@ spar_make_topmost_sparul_sql (sparp_t *sparp, SPART **actions)
       caddr_t action_sql;
       sparp->sparp_expr = action;
       sparp_rewrite_all (sparp, 0 /* no cloning -- no need in safely_copy_retvals */);
-  /*xt_check (sparp, sparp->sparp_expr);*/
 #ifndef NDEBUG
       t_check_tree (sparp->sparp_expr);
 #endif
@@ -3340,6 +4061,22 @@ spar_exec_uid_and_gs_cbk (sparp_t *sparp)
     (SPART **)t_list (3, uid, sparp->sparp_gs_app_callback, appid) );
 }
 
+void
+spar_qr_uses_jso_int (comp_context_t *cc, ccaddr_t jso_inst, ccaddr_t jso_name)
+{
+  if (NULL == cc)
+    return;
+  if (NULL == jso_name)
+    {
+      jso_rtti_t *jso_rtti = gethash (jso_inst, jso_rttis_of_structs);
+      if (NULL == jso_rtti)
+        return; /* Built-in anonymous JSO, like one used when define input:storage "" */
+      jso_name = jso_rtti->jrtti_inst_iri;
+    }
+  box_dv_uname_make_immortal ((caddr_t)jso_name);
+  qr_uses_jso (cc->cc_super_cc->cc_query, jso_name);
+}
+
 int
 spar_graph_static_perms (sparp_t *sparp, caddr_t graph_iri, int req_perms)
 {
@@ -3553,7 +4290,7 @@ sparp_t * dbg_curr_sparp;
 #endif
 
 sparp_t *
-sparp_query_parse (char * str, spar_query_env_t *sparqre, int rewrite_all)
+sparp_query_parse (const char * str, spar_query_env_t *sparqre, int rewrite_all)
 {
   wcharset_t *query_charset = sparqre->sparqre_query_charset;
   t_NEW_VAR (sparp_t, sparp);
@@ -3612,7 +4349,8 @@ sparp_query_parse (char * str, spar_query_env_t *sparqre, int rewrite_all)
       return sparp; /* see below */
     }
   END_QR_RESET
-  /*xt_check (sparp, sparp->sparp_expr);*/
+  if (NULL != sparp->sparp_macrolib_to_create && !sparp->sparp_macrolib_ignore_create)
+    sparp->sparp_expr = spar_make_create_macro_lib (sparp);
 #ifndef NDEBUG
   t_check_tree (sparp->sparp_expr);
 #endif
@@ -3654,14 +4392,14 @@ sparp_clone_for_variant (sparp_t *sparp, int allow_output_formatting)
     id_hash_t *		spare_vars;			/*!< Known variables as keys, equivs as values */
     id_hash_t *		spare_global_bindings;		/*!< Dictionary of global bindings, varnames as keys, default value expns as values. DV_DB_NULL box for no expn! */
 #endif
-  /* No copy for spare_grab_vars */
-  ENV_SET_COPY (spare_common_sponge_options);
-  ENV_SET_COPY (spare_default_graphs);
-  ENV_SET_COPY (spare_named_graphs);
-  ENV_COPY (spare_default_graphs_listed);
-  ENV_COPY (spare_named_graphs_listed);
-  ENV_COPY (spare_default_graphs_locked);
-  ENV_COPY (spare_named_graphs_locked);
+  /* No copy for spare_src.ssrc_grab_vars */
+  ENV_SET_COPY (spare_src.ssrc_common_sponge_options);
+  ENV_SET_COPY (spare_src.ssrc_default_graphs);
+  ENV_SET_COPY (spare_src.ssrc_named_graphs);
+  ENV_COPY (spare_src.ssrc_default_graphs_listed);
+  ENV_COPY (spare_src.ssrc_named_graphs_listed);
+  ENV_COPY (spare_src.ssrc_default_graphs_locked);
+  ENV_COPY (spare_src.ssrc_named_graphs_locked);
   ENV_SET_COPY (spare_common_sql_table_options);
   ENV_SET_COPY (spare_sql_select_options);
   ENV_SET_COPY (spare_global_var_names);
@@ -3689,12 +4427,12 @@ spar_env_push (sparp_t *sparp)
     id_hash_t *		spare_vars;			/*!< Known variables as keys, equivs as values */
     id_hash_t *		spare_global_bindings;		/*!< Dictionary of global bindings, varnames as keys, default value expns as values. DV_DB_NULL box for no expn! */
 #endif
-  ENV_COPY (spare_grab);
-  ENV_COPY (spare_common_sponge_options);
-  ENV_COPY (spare_default_graphs);
-  ENV_COPY (spare_default_graphs_locked);
-  ENV_COPY (spare_named_graphs);
-  ENV_COPY (spare_named_graphs_locked);
+  ENV_COPY (spare_src.ssrc_grab);
+  ENV_COPY (spare_src.ssrc_common_sponge_options);
+  ENV_COPY (spare_src.ssrc_default_graphs);
+  ENV_COPY (spare_src.ssrc_default_graphs_locked);
+  ENV_COPY (spare_src.ssrc_named_graphs);
+  ENV_COPY (spare_src.ssrc_named_graphs_locked);
   ENV_COPY (spare_common_sql_table_options);
   /* no copy for spare_groupings */
   ENV_COPY (spare_sql_select_options);
@@ -3815,7 +4553,7 @@ sparp_compile_subselect (spar_query_env_t *sparqre)
 caddr_t
 bif_sparql_explain (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  int param_ctr = 0;
+  int ctr, param_ctr = 0;
   spar_query_env_t sparqre;
   sparp_t * sparp;
   caddr_t str = bif_string_arg (qst, args, 0, "sparql_explain");
@@ -3832,6 +4570,11 @@ bif_sparql_explain (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       sqlr_resignal (sparqre.sparqre_catched_error);
     }
   res = strses_allocate ();
+  for (ctr = 0; ctr < sparp->sparp_macro_def_count; ctr++)
+    {
+      SPART *defm = sparp->sparp_macro_defs[ctr];
+      spart_dump (defm, res, 0, "MACRO DEFINITION", -1);
+    }
   spart_dump (sparp->sparp_expr, res, 0, "QUERY", -1);
 #if 1
   {
@@ -4472,8 +5215,8 @@ sparql_init (void)
 {
   caddr_t err;
   rdf_ds_load_all();
-  iri_to_id_nosignal_cached_qr = sql_compile_static (iri_to_id_nosignal_text, bootstrap_cli, &err, SQLC_DEFAULT);
-  id_to_iri_cached_qr = sql_compile_static (id_to_iri_text, bootstrap_cli, &err, SQLC_DEFAULT);
+  iri_to_id_nosignal_cached_qr = sql_compile_static (iri_to_id_nosignal_text, bootstrap_cli, &err, SQLC_STATIC_PRESERVES_TREE);
+  id_to_iri_cached_qr = sql_compile_static (id_to_iri_text, bootstrap_cli, &err, SQLC_STATIC_PRESERVES_TREE);
   bif_define ("sparql_to_sql_text", bif_sparql_to_sql_text);
   bif_define ("sparql_detalize", bif_sparql_detalize);
   bif_define ("sparql_explain", bif_sparql_explain);
diff --git a/libsrc/Wi/sparql_init.sql b/libsrc/Wi/sparql_init.sql
new file mode 100644
index 0000000..7eee8d9
--- /dev/null
+++ b/libsrc/Wi/sparql_init.sql
@@ -0,0 +1,359 @@
+--
+--  $Id: sparql_init.sql,v 1.1.2.2 2012/03/07 11:16:29 source Exp $
+--
+--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+--  project.
+--
+--  Copyright (C) 1998-2012 OpenLink Software
+--
+--  This project 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; only version 2 of the License, dated June 1991.
+--
+--  This program 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
+--  General Public License for more details.
+--
+--  You should have received a copy of the GNU General Public License along
+--  with this program; if not, write to the Free Software Foundation, Inc.,
+--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+--
+--
+
+create function DB.DBA.RDF_LANGUAGE_OF_LONG (in longobj any, in dflt varchar := '') returns any
+{
+  if (__tag of rdf_box = __tag (longobj))
+    {
+      declare twobyte integer;
+      declare res varchar;
+      twobyte := rdf_box_lang (longobj);
+      if (257 = twobyte)
+        return dflt;
+      whenever not found goto badlang;
+      select lower (RL_ID) into res from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = twobyte;
+      return res;
+
+badlang:
+  signal ('RDFXX', sprintf ('Unknown language in DB.DBA.RDF_LANGUAGE_OF_LONG, bad id %d', twobyte));
+    }
+  return case (isiri_id (longobj)) when 0 then dflt else null end;
+}
+;
+
+-----
+-- JSO procedures
+
+create function DB.DBA.JSO_MAKE_INHERITANCE (in jgraph varchar, in class varchar, in rootinst varchar, in destinst varchar, in dest_iid iri_id, inout noinherits any, inout inh_stack any)
+{
+  declare base_iid iri_id;
+  declare baseinst varchar;
+  -- dbg_obj_princ ('JSO_MAKE_INHERITANCE (', jgraph, class, rootinst, destinst, ')');
+  inh_stack := vector_concat (inh_stack, vector (destinst));
+  baseinst := null;
+  if (not exists (sparql
+      define input:storage ""
+      prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+      ask where {
+        graph ?:jgraph { ?:dest_iid rdf:type `iri(?:class)`
+          } } ) )
+    signal ('22023', 'JSO_MAKE_INHERITANCE has not found object <' || destinst || '> of type <' || class || '>');
+/* This fails. !!!TBD: fix sparql2sql.c to preserve data about equalities, fixed values and globals when triples are moved from gp to gp
+  for (sparql
+    define input:storage ""
+    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+    select ?srcinst
+    where {
+        graph ?:jgraph {
+            { {
+                ?destnode rdf:type `iri(?:class)` .
+                filter (?destnode = iri(?:destinst)) }
+              union
+              {
+                ?destnode rdf:type `iri(?:class)` .
+                ?destnode rdf:name `iri(?:destinst)` } } .
+            ?destnode virtrdf:inheritFrom ?srcinst .
+            ?srcinst rdf:type `iri(?:class)` .
+          } } ) do
+*/
+  for (sparql
+    define input:storage ""
+    define output:valmode "LONG"
+    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+    select ?src_iid
+    where {
+        graph ?:jgraph { ?:dest_iid virtrdf:inheritFrom ?src_iid } } ) do
+    {
+      declare srcinst varchar;
+      srcinst := id_to_iri_nosignal ("src_iid");
+      if (baseinst is null)
+        {
+          if (not exists (sparql
+              define input:storage ""
+              prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+              ask where { graph ?:jgraph { ?:"src_iid" rdf:type `iri(?:class)` } } ) )
+            signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || destinst || '> has wrong virtrdf:inheritFrom <' || srcinst || '> that is not an instance of type <' || class || '>');
+          base_iid := "src_iid";
+          baseinst := srcinst;
+        }
+      else if (baseinst <> srcinst)
+        signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || destinst || '> has multiple virtrdf:inheritFrom declarations: <' || baseinst || '> and <' || srcinst || '>');
+    }
+  if (position (baseinst, inh_stack))
+    signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || baseinst || '> is recursively inherited from itself');
+-- This fails. !!!TBD: fix sparql2sql.c to preserve data about equalities, fixed values and globals when triples are moved from gp to gp
+--  for (sparql
+--    define input:storage ""
+--    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+--    select ?pred
+--    where {
+--        graph ?:jgraph {
+--            { {
+--                ?destnode rdf:type `iri(?:class)` .
+--                filter (?destnode = iri(?:destinst)) }
+--              union
+--              {
+--                ?destnode rdf:type `iri(?:class)` .
+--                ?destnode rdf:name `iri(?:destinst)` } } .
+--            ?destnode virtrdf:noInherit ?pred .
+--           } } ) do
+  for (sparql
+    define input:storage ""
+    prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+    select ?pred
+    where {
+        graph ?:jgraph {
+            ?:dest_iid virtrdf:noInherit ?pred
+          } } ) do
+    {
+      if (baseinst is null)
+        signal ('22023', 'JSO_MAKE_INHERITANCE has found that the object <' || destinst || '> has set virtrdf:noInherit but has no virtrdf:inheritFrom');
+      dict_put (noinherits, "pred", destinst);
+    }
+  if (baseinst is null)
+    return;
+  for (select "pred_id", "predval"
+    from (sparql
+      define input:storage ""
+      define output:valmode "LONG"
+      prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+      select ?pred_id, ?predval
+      where {
+          graph ?:jgraph {
+              ?:base_iid ?pred_id ?predval
+            } } ) as "t00"
+      where not exists (sparql
+          define input:storage ""
+          prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+          ask where { graph ?:jgraph { ?:"t00"."pred_id" virtrdf:loadAs virtrdf:jsoTriple } } )
+      ) do
+    {
+      declare "pred" any;
+      "pred" := id_to_iri ("pred_id");
+      if (DB.DBA.RDF_LANGUAGE_OF_LONG ("predval", null) is not null)
+        signal ('22023', 'JSO_MAKE_INHERITANCE does not support language marks on objects');
+      if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type' = "pred")
+        ;
+      else if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#name' = "pred")
+        ;
+      else if ('http://www.openlinksw.com/schemas/virtrdf#inheritFrom' = "pred")
+        ;
+      else if ('http://www.openlinksw.com/schemas/virtrdf#noInherit' = "pred")
+        ;
+      else if (dict_get (noinherits, "pred", baseinst) = baseinst) -- trick here, instead of (dict_get (noinherits, pred, null) is null) that does not handle inheritance of booleans properly.
+        {
+          jso_set (class, rootinst, "pred", __rdf_sqlval_of_obj ("predval"), isiri_id ("predval"));
+          dict_put (noinherits, "pred", baseinst);
+        }
+    }
+  DB.DBA.JSO_MAKE_INHERITANCE (jgraph, class, rootinst, baseinst, base_iid, noinherits, inh_stack);
+}
+;
+
+create function DB.DBA.JSO_LOAD_INSTANCE (in jgraph varchar, in jinst varchar, in delete_first integer, in make_new integer, in jsubj_iid iri_id := 0)
+{
+  declare jinst_iid, jgraph_iid IRI_ID;
+  declare jclass varchar;
+  declare noinherits, inh_stack, "p" any;
+  -- dbg_obj_princ ('JSO_LOAD_INSTANCE (', jgraph, ')');
+  noinherits := dict_new ();
+  jinst_iid := iri_ensure (jinst);
+  jgraph_iid := iri_ensure (jgraph);
+  if (jsubj_iid is null)
+    {
+      jsubj_iid := (sparql
+        define input:storage ""
+        define output:valmode "LONG"
+        select ?s
+        where { graph ?:jgraph { ?s rdf:name ?:jinst } } );
+      if (jsubj_iid is null)
+        jsubj_iid := jinst_iid;
+    }
+  jclass := (sparql
+    define input:storage ""
+    select ?t
+    where {
+      graph ?:jgraph { ?:jsubj_iid rdf:type ?t } } );
+  if (jclass is null)
+    {
+      if (exists (sparql
+          define input:storage ""
+          select ?x
+            where { graph ?:jgraph {
+                { ?:jinst ?x ?o }
+                union
+                { ?x rdf:name ?ji .
+                  filter (str (?ji) = ?:jinst)
+                  } } } ) )
+        signal ('22023', 'JSO_LOAD_INSTANCE can not detect the type of <' || jinst || '>');
+      else
+        signal ('22023', 'JSO_LOAD_INSTANCE can not find an object <' || jinst || '>');
+    }
+  if (delete_first)
+    jso_delete (jclass, jinst, 1);
+  if (make_new)
+    jso_new (jclass, jinst);
+  for (select "p_id", coalesce ("o2", "o1") as "o"
+      from (sparql
+          define input:storage ""
+          define output:valmode "LONG"
+          select ?p_id ?o1 ?o2
+          where {
+          graph ?:jgraph {
+              { ?:jsubj_iid ?p_id ?o1 }  optional { ?o1 rdf:name ?o2 }
+            } }
+        ) as "t00"
+      where not exists (sparql
+          define input:storage ""
+          prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+          ask where { graph ?:jgraph_iid { ?:"t00"."p_id" virtrdf:loadAs virtrdf:jsoTriple } } ) option (quietcast)
+      ) do
+    {
+      "p" := id_to_iri ("p_id");
+      if (DB.DBA.RDF_LANGUAGE_OF_LONG ("o", null) is not null)
+        signal ('22023', 'JSO_LOAD_INSTANCE does not support language marks on objects');
+      if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#type' = "p")
+        {
+	  if (__rdf_sqlval_of_obj ("o") <> jclass)
+            signal ('22023', 'JSO_LOAD_INSTANCE has found that the object <' || jinst || '> has multiple type declarations');
+	}
+      else if ('http://www.w3.org/1999/02/22-rdf-syntax-ns#name' = "p")
+        ;
+      else if ('http://www.openlinksw.com/schemas/virtrdf#inheritFrom' = "p")
+        ;
+      else if ('http://www.openlinksw.com/schemas/virtrdf#noInherit' = "p")
+        ;
+      else
+        {
+          jso_set (jclass, jinst, "p", __rdf_sqlval_of_obj ("o"), isiri_id ("o"));
+          dict_put (noinherits, "p", jinst);
+        }
+    }
+  inh_stack := vector ();
+  DB.DBA.JSO_MAKE_INHERITANCE (jgraph, jclass, jinst, jinst, jsubj_iid, noinherits, inh_stack);
+}
+;
+
+create procedure DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (in jgraph varchar, out instances any)
+{
+  declare md, res, st, msg any;
+  st:= '00000';
+  exec (
+    'select DB.DBA.VECTOR_AGG (
+      vector (
+        id_to_iri ("jclass"),
+        id_to_iri ("jinst"),
+        coalesce ("s", "jinst") ) )
+    from ( sparql
+      define output:valmode "LONG"
+      define input:storage ""
+      select ?jclass ?jinst ?s
+      where {
+        graph ?? {
+          { ?jinst rdf:type ?jclass .
+            filter (!isBLANK (?jinst)) }
+          union
+          { ?s rdf:type ?jclass .
+            ?s rdf:name ?jinst .
+            filter (isBLANK (?s))
+            } } }
+      ) as inst',
+    st, msg, vector (jgraph), 1, md, res);
+  if (st <> '00000') signal (st, msg);
+ 	instances := res[0][0];
+}
+;
+
+create function DB.DBA.JSO_LOAD_GRAPH (in jgraph varchar, in pin_now integer := 1)
+{
+  declare jgraph_iid IRI_ID;
+  declare instances, chk any;
+  -- dbg_obj_princ ('JSO_LOAD_GRAPH (', jgraph, ')');
+  log_text ('DB.DBA.JSO_LOAD_GRAPH (?,?)', jgraph, pin_now);
+  jgraph_iid := iri_ensure (jgraph);
+  DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);
+/* Pass 1. Deleting all obsolete instances. */
+  foreach (any j in instances) do
+    jso_delete (j[0], j[1], 1);
+/* Pass 2. Creating all instances. */
+  foreach (any j in instances) do
+    jso_new (j[0], j[1]);
+/* Pass 3. Loading all instances, including loading inherited values. */
+  foreach (any j in instances) do
+    DB.DBA.JSO_LOAD_INSTANCE (jgraph, j[1], 0, 0, j[2]);
+/* Pass 4. Validation all instances. */
+  foreach (any j in instances) do
+    jso_validate (j[0], j[1], 1);
+/* Pass 5. Pin all instances. */
+  if (pin_now)
+    {
+      foreach (any j in instances) do
+        jso_pin (j[0], j[1]);
+    }
+/* Pass 6. Load all separate triples */
+  exec ('sparql
+      define input:storage ""
+      define sql:table-option "LOOP"
+      prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
+      select (bif:jso_triple_add (?s, ?p, ?o))
+      where { graph <' || id_to_iri (jgraph_iid) || '> { ?p virtrdf:loadAs virtrdf:jsoTriple . ?s ?p ?o } }');
+  chk := jso_triple_get_objs (
+    UNAME'http://www.openlinksw.com/schemas/virtrdf#loadAs',
+    UNAME'http://www.openlinksw.com/schemas/virtrdf#loadAs' );
+  if ((1 <> length (chk)) or (cast (chk[0] as varchar) <> 'http://www.openlinksw.com/schemas/virtrdf#jsoTriple'))
+    signal ('22023', 'JSO_LOAD_GRAPH has not found expected metadata in the graph');
+}
+;
+
+create function DB.DBA.JSO_PIN_GRAPH (in jgraph varchar)
+{
+  declare instances any;
+  log_text ('DB.DBA.JSO_PIN_GRAPH (?)', jgraph);
+  DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);
+  foreach (any j in instances) do
+    jso_pin (j[0], j[1]);
+}
+;
+
+--!AWK PUBLIC
+create function DB.DBA.JSO_SYS_GRAPH () returns varchar
+{
+  return 'http://www.openlinksw.com/schemas/virtrdf#';
+}
+;
+
+-- same as DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH but no drop procedures
+create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO (in graphiri varchar := null)
+{
+  if (graphiri is null)
+    graphiri := DB.DBA.JSO_SYS_GRAPH();
+  if (not exists (select 1 from SYS_KEYS where KEY_TABLE = 'DB.DBA.RDF_QUAD'))
+    return;
+  DB.DBA.JSO_LOAD_GRAPH (graphiri, 0);
+  DB.DBA.JSO_PIN_GRAPH (graphiri);
+}
+;
+
+DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO ()
+;
+
diff --git a/libsrc/Wi/sparql_io.sql b/libsrc/Wi/sparql_io.sql
index 5936791..7c9a5f2 100644
--- a/libsrc/Wi/sparql_io.sql
+++ b/libsrc/Wi/sparql_io.sql
@@ -1,10 +1,10 @@
 --
---  $Id: sparql_io.sql,v 1.14.2.54 2011/03/23 16:45:20 source Exp $
+--  $Id: sparql_io.sql,v 1.14.2.72 2012/03/08 12:55:36 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -449,8 +449,8 @@ create procedure DB.DBA.SPARQL_REXEC_INT (
                         out_fields [var_pos] := DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_STRINGS (
                           var_strval, dt, lang );
                       else
-                      out_fields [var_pos] := DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (
-                        var_strval, dt, lang );
+                        out_fields [var_pos] := DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (
+                          var_strval, dt, lang );
                     }
                   else
                     signal ('RDFZZ', sprintf (
@@ -752,6 +752,7 @@ create procedure DB.DBA.SPARQL_RESULTS_XML_WRITE_ROW (inout ses any, in mdta any
               if (res is null)
                 res := sprintf ('bad://%d', iri_id_num (_val));
               http (sprintf ('\n   <binding name="%s"><uri>', _name), ses);
+	      res := charset_recode (res, 'UTF-8', '_WIDE_');
               http_value (res, 0, ses);
               http ('</uri></binding>', ses);
 	    }
@@ -761,7 +762,7 @@ create procedure DB.DBA.SPARQL_RESULTS_XML_WRITE_ROW (inout ses any, in mdta any
           if (_val like 'nodeID://%')
             http (sprintf ('\n   <binding name="%s"><bnode>%s</bnode></binding>', _name, _val), ses);
           else
-            http (sprintf ('\n   <binding name="%s"><uri>%V</uri></binding>', _name, _val), ses);
+            http (sprintf ('\n   <binding name="%s"><uri>%V</uri></binding>', _name, charset_recode (_val, 'UTF-8', '_WIDE_')), ses);
         }
       else
         {
@@ -888,7 +889,7 @@ create procedure DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_ROW (inout ses any, in mdta
 --              res := coalesce ((select RU_QNAME from DB.DBA.RDF_URL where RU_IID = _val));
               if (res is null)
                 res := sprintf ('bad://%d', iri_id_num (_val));
-              http (sprintf (' rdf:resource="%V"/></res:binding>', res), ses);
+              http (sprintf (' rdf:resource="%V"/></res:binding>', charset_recode (res, 'UTF-8', '_WIDE_')), ses);
 	    }
 	}
       else if (isstring (_val) and (1 = __box_flags (_val)))
@@ -896,7 +897,7 @@ create procedure DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_ROW (inout ses any, in mdta
           if (_val like 'nodeID://%')
             http (sprintf (' rdf:nodeID="b%s"/></res:binding>', subseq(_val, 9)), ses);
           else
-            http (sprintf (' rdf:resource="%V"/></res:binding>', _val), ses);
+            http (sprintf (' rdf:resource="%V"/></res:binding>', charset_recode (_val, 'UTF-8', '_WIDE_')), ses);
         }
       else
         {
@@ -1063,7 +1064,7 @@ create procedure DB.DBA.SPARQL_RESULTS_NT_WRITE_RES (inout ses any, in mdta any,
 }
 ;
 
-create procedure DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE (inout ses any, inout metas any, inout rset any, in is_js integer := 0, in esc_mode integer := 1)
+create procedure DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE (inout ses any, inout metas any, inout rset any, in is_js integer := 0, in esc_mode integer := 1, in pure_html integer := 0)
 {
   declare varctr, varcount, resctr, rescount integer;
   declare trnewline, newline varchar;
@@ -1133,7 +1134,7 @@ create procedure DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE (inout ses any, ino
               --else
                 --http_value (val, 0, ses);
 	    }
-	  else if (__tag of rdf_box = __tag (val))
+	  else if (pure_html and __tag of rdf_box = __tag (val))
 	      http_rdf_object (val, ses, 1);
           else
             {
@@ -1383,14 +1384,35 @@ create function DB.DBA.SPARQL_RESULTS_WRITE (inout ses any, inout metas any, ino
           if (status is not null)
             SPARQL_WRITE_EXEC_STATUS (ses, '#%015s: %s\n', status);
 	}
+      else if (ret_format = 'TRIG')
+        DB.DBA.RDF_TRIPLES_TO_TRIG (triples, ses);
       else if (ret_format = 'NT')
         DB.DBA.RDF_TRIPLES_TO_NT (triples, ses);
       else if (ret_format in ('JSON', 'JSON;TALIS'))
         DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (triples, ses);
+      else if (ret_format = 'JSON;LD')
+        DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, ses);
       else if (ret_format = 'JSON;RES')
         DB.DBA.RDF_TRIPLES_TO_JSON (triples, ses);
       else if (ret_format = 'RDFA;XHTML')
         DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML (triples, ses);
+      else if (ret_format = 'HTML;UL')
+	{
+          DB.DBA.RDF_TRIPLES_TO_HTML_UL (triples, ses);
+	  ret_mime := 'text/html';
+	}
+      else if (ret_format = 'HTML;TR')
+	{
+          DB.DBA.RDF_TRIPLES_TO_HTML_TR (triples, ses);
+	  ret_mime := 'text/html';
+	}
+      else if (ret_format = 'HTML;MICRODATA')
+	{
+          DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (triples, ses);
+	  ret_mime := 'text/html';
+	}
+      else if (ret_format = 'JSON;MICRODATA')
+        DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (triples, ses);
       else if (ret_format = 'ATOM;XML')
         DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (triples, 1, ses);
       else if (ret_format = 'JSON;ODATA')
@@ -1474,7 +1496,7 @@ create function DB.DBA.SPARQL_RESULTS_WRITE (inout ses any, inout metas any, ino
     }
   if (ret_format = 'HTML')
     {
-      SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE(ses, metas, rset, 0);
+      SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE(ses, metas, rset, 0, 1, case when ret_mime = 'text/html' then 1 else 0 end);
       goto body_complete;
     }
   if (ret_format = 'JS')
@@ -1566,12 +1588,16 @@ create procedure WS.WS.SPARQL_VHOST_RESET ()
       DB.DBA.USER_CREATE ('SPARQL', uuid(), vector ('DISABLED', 1, 'LOGIN_QUALIFIER', 'SPARQL'));
       DB.DBA.EXEC_STMT ('grant SPARQL_SELECT to "SPARQL"', 0);
     }
-  if (registry_get ('__SPARQL_VHOST_RESET') = '1')
+  if (registry_get ('__SPARQL_VHOST_RESET') >= '20110703')
     return;
   DB.DBA.VHOST_REMOVE (lpath=>'/SPARQL');
   DB.DBA.VHOST_REMOVE (lpath=>'/sparql');
+  DB.DBA.VHOST_REMOVE (lpath=>'/sparql-auth');
+  DB.DBA.VHOST_REMOVE (lpath=>'/sparql-graph-crud');
+  DB.DBA.VHOST_REMOVE (lpath=>'/sparql-graph-crud-auth');
   DB.DBA.VHOST_REMOVE (lpath=>'/services/sparql-query');
   DB.DBA.VHOST_DEFINE (lpath=>'/sparql/', ppath => '/!sparql/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1));
+  DB.DBA.VHOST_DEFINE (lpath=>'/sparql-graph-crud/', ppath => '/!sparql-graph-crud/', is_dav => 1, vsp_user => 'dba', opts => vector('noinherit', 1, 'exec_as_get', 1));
   DB.DBA.VHOST_REMOVE (lpath=>'/sparql-auth');
   DB.DBA.VHOST_DEFINE (lpath=>'/sparql-auth',
     ppath => '/!sparql/',
@@ -1581,10 +1607,18 @@ create procedure WS.WS.SPARQL_VHOST_RESET ()
     auth_fn=>'DB.DBA.HP_AUTH_SPARQL_USER',
     realm=>'SPARQL',
     sec=>'digest');
+  DB.DBA.VHOST_DEFINE (lpath=>'/sparql-graph-crud-auth',
+    ppath => '/!sparql-graph-crud/',
+    is_dav => 1,
+    vsp_user => 'dba',
+    opts => vector('noinherit', 1, 'exec_as_get', 1),
+    auth_fn=>'DB.DBA.HP_AUTH_SPARQL_USER',
+    realm=>'SPARQL',
+    sec=>'digest');
 --DB.DBA.EXEC_STMT ('grant execute on DB.."querySoap" to "SPARQL", 0);
 --VHOST_DEFINE (lpath=>'/services/sparql-query', ppath=>'/SOAP/', soap_user=>'SPARQL',
 --              soap_opts => vector ('ServiceName', 'XMLAnalysis', 'elementFormDefault', 'qualified'));
-  registry_set ('__SPARQL_VHOST_RESET', '1');
+  registry_set ('__SPARQL_VHOST_RESET', '20110703');
 }
 ;
 
@@ -1750,7 +1784,256 @@ create procedure DB.DBA.rdf_find_str (in x any)
 grant execute on DB.DBA.rdf_find_str to public
 ;
 
-create procedure WS.WS.sparql_enpoint_format_opts (in can_cxml varchar, in can_qrcode varchar, in params varchar, in qr varchar)
+
+create procedure WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE()
+{
+    http('<?xml version="1.0" encoding="UTF-8" ?>\n');
+    http('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n');
+    http('<html version="-//W3C//DTD XHTML 1.1//EN"\n');
+    http('    xmlns="http://www.w3.org/1999/xhtml"\n');
+    http('    xml:lang="en"\n');
+    http('>\n');
+}
+;
+
+
+create procedure WS.WS.SPARQL_ENDPOINT_HTML_HEAD(in title varchar)
+{
+    http('    <title>' || title || '</title>\n');
+    http(sprintf('    <meta name="Copyright" content="Copyright © %d OpenLink Software" />\n', year(now())));
+    http('    <meta name="Keywords" content="OpenLink Virtuoso Sparql" />\n');
+    http('    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
+}
+;
+
+
+create procedure WS.WS.SPARQL_ENDPOINT_STYLE ()
+{
+    http('\n');
+    http('
+    <style type="text/css">
+    /*<![CDATA[*/
+	html { padding: 0; }
+	body {
+	    padding: 0;
+	    margin: 0;
+    	    font-family:Gill Sans, Arial, Helvetica, sans-serif;
+	    font-size: 9pt;
+	    color: #333;
+	    background-color: #FDFDFD;
+	}
+	#header {
+	    padding: 0;
+	    margin: 0;
+	    background-color: #86B9D9;
+	    color: #FFFFFF;
+	    border-bottom: 1px solid #AAA;
+	}
+	#header h1 {
+	    font-size: 16pt;
+	    font-weight: normal;
+	    text-align: left;
+	    vertical-align: middle;
+	    padding: 4px 8px 4px 8px;
+	    margin: 0px 0px 0px 0px;
+	}
+	#menu {
+	    margin-left: 8px;
+	    margin-right: 8px;
+ 	    margin-top: 0px;
+	    clear: right;
+	    float: right;
+	}
+	#intro,#main {
+	    margin-left: 8px;
+	    margin-right: 8px;
+	}
+	#help {
+	    margin-left: 8px;
+	    margin-right: 8px;
+	    width: 80%
+	}
+	#footer {
+	    width: 100%;
+	    float: left;
+	    clear: left;
+	    margin: 2em 0 0;
+	    padding-top: 0.7ex;
+	    border-top: 1px solid #AAA;
+	    font-size: 8pt;
+	    text-align: center;
+	}
+	fieldset {
+	    border: 0;
+	    padding: 0;
+	    margin: 0;
+	}
+	fieldset label {
+	    font-weight: normal;
+	    white-space: nowrap;
+	    font-size: 11pt;
+	    color: #000;
+	}
+	fieldset label.n {
+	    display: block;
+	    vertical-align: bottom;
+	    margin-top:5px;
+	    width: 160px;
+	    float:left;
+	    white-space: nowrap;
+	}
+	fieldset label.n:after { content: ":"; }
+	fieldset label.n1 {
+	    display: block;
+	    vertical-align: bottom;
+	    margin-top:5px;
+	    width: 160px;
+	    float:left;
+	    white-space: nowrap;
+	}
+	fieldset label.ckb {
+	    width: 160px;
+	    font-weight: normal;
+	    font-size: 10pt;
+	}
+	fieldset label.ckb:after { content: ""; }
+	fieldset textarea {
+	    width: 99%;
+	    font-family: monospace;
+	    font-size: 10pt;
+	}
+	#cxml {
+	    clear: both;
+	    display: block;
+	}
+	#savefs {
+	    clear: both;
+	    display: block;
+	}
+	span.info {
+	    font-size: 9pt;
+	    white-space: nowrap;
+	    height: 2em;
+	}
+	br { clear: both; }
+    /*]]>*/
+    </style>
+    ');
+}
+;
+
+
+create procedure WS.WS.SPARQL_ENDPOINT_JAVASCRIPT (in can_cxml integer, in can_qrcode integer)
+{
+    http('\n');
+    http('    <script type="text/javascript">\n');
+    http('    /*<![CDATA[*/\n');
+    http('	var last_format = 1;\n');
+    http('	function format_select(query_obg)\n');
+    http('	{\n');
+    http('		var query = query_obg.value; \n');
+    http('		var format = query_obg.form.format;\n');
+    http('\n');
+    http('		if ((query.match(/\\bconstruct\\b/i) || query.match(/\\bdescribe\\b/i)) && last_format == 1) {\n');
+    http('			for(var i = format.options.length; i > 0; i--)\n');
+    http('				format.options[i] = null;\n');
+    http('			format.options[1] = new Option(\'N3/Turtle\',\'text/rdf+n3\');\n');
+    http('			format.options[2] = new Option(\'RDF/JSON\',\'application/rdf+json\');\n');
+    http('			format.options[3] = new Option(\'RDF/XML\',\'application/rdf+xml\');\n');
+    http('			format.options[4] = new Option(\'N-Triples\',\'text/plain\');\n');
+    http('			format.options[5] = new Option(\'XHTML+RDFa\',\'application/xhtml+xml\');\n');
+    http('			format.options[6] = new Option(\'ATOM+XML\',\'application/atom+xml\');\n');
+    http('			format.options[7] = new Option(\'ODATA/JSON\',\'application/odata+json\');\n');
+    http('			format.options[8] = new Option(\'JSON-LD\',\'application/x-json+ld\');\n');
+    http('			format.options[9] = new Option(\'HTML (list)\',\'text/x-html+ul\');\n');
+    http('			format.options[10] = new Option(\'HTML (table)\',\'text/x-html+tr\');\n');
+    http('			format.options[11] = new Option(\'HTML+Microdata\',\'text/html\');\n');
+    http('			format.options[12] = new Option(\'Microdata/JSON\',\'application/microdata+json\');\n');
+    http('			format.options[13] = new Option(\'CSV\',\'text/csv\');\n');
+    http('			format.options[14] = new Option(\'TriG\',\'application/x-trig\');\n');
+    if (can_cxml)
+      {
+	http('			format.options[15] = new Option(\'CXML (Pivot Collection)\',\'text/cxml\');\n');
+	if (can_qrcode)
+	  http('		format.options[16] = new Option(\'CXML (Pivot Collection with QRcodes)\',\'text/cxml+qrcode\');\n');
+      }
+    http('			format.selectedIndex = 1;\n');
+    http('			last_format = 2;\n');
+    http('		}\n');
+    http('\n');
+    http('		if (!(query.match(/\\bconstruct\\b/i) || query.match(/\\bdescribe\\b/i)) && last_format == 2) {\n');
+    http('			for(var i = format.options.length; i > 0; i--)\n');
+    http('				format.options[i] = null;\n');
+    http('			format.options[1] = new Option(\'HTML\',\'text/html\');\n');
+    http('			format.options[2] = new Option(\'Spreadsheet\',\'application/vnd.ms-excel\');\n');
+    http('			format.options[3] = new Option(\'XML\',\'application/sparql-results+xml\');\n');
+    http('			format.options[4] = new Option(\'JSON\',\'application/sparql-results+json\');\n');
+    http('			format.options[5] = new Option(\'Javascript\',\'application/javascript\');\n');
+    http('			format.options[6] = new Option(\'N3/Turtle\',\'text/rdf+n3\');\n');
+    http('			format.options[7] = new Option(\'RDF/XML\',\'application/rdf+xml\');\n');
+    http('			format.options[8] = new Option(\'N-Triples\',\'text/plain\');\n');
+    http('			format.options[9] = new Option(\'CSV\',\'text/csv\');\n');
+    if (can_cxml)
+      http('			format.options[10] = new Option(\'CXML (Pivot Collection)\',\'text/cxml\');\n');
+    http('			format.selectedIndex = 1;\n');
+    http('			last_format = 1;\n');
+    http('		}\n');
+    http('	}\n');
+    http('
+	function format_change(e)
+	{
+		var format = e.value;
+		var cxml = document.getElementById("cxml");
+		if (!cxml) return;
+		if ((format.match (/\\bCXML\\b/i)))
+		{
+			cxml.style.display="block";
+		} else {
+			cxml.style.display="none";
+		}
+	}
+	function savedav_change(e)
+	{
+		var savefs = document.getElementById("savefs");
+		if (!savefs) return;
+		if (e.checked)
+		{
+			savefs.style.display = "block";
+		}
+		else
+		{
+			savefs.style.display = "none";
+		}
+	}
+	function sparql_endpoint_init()
+	{
+		var cxml = document.getElementById("cxml");
+		if (cxml) cxml.style.display="none";
+		var savefs = document.getElementById("savefs");
+		if (savefs) savefs.style.display="none";
+	}
+    ');
+    http('    /*]]>*/\n');
+    http('    </script>\n');
+}
+;
+
+
+create procedure WS.WS.SPARQL_ENDPOINT_FOOTER()
+{
+    http('    <div id="footer">\n');
+    http(sprintf('	Copyright © %d <a href="http://www.openlinksw.com/virtuoso">OpenLink Software</a>', year(now())));
+    http(sprintf('<br />Virtuoso version %s on %s (%s), ', sys_stat('st_dbms_ver'), sys_stat('st_build_opsys_id'), host_id()));
+    if (1 = sys_stat('cl_run_local_only'))
+	http('Single Server Edition\n');
+    else
+	http(sprintf('Cluster Edition (%d server processes)\n', sys_stat('cl_n_hosts')));
+    http('    </div>\n');
+}
+;
+
+
+create procedure WS.WS.SPARQL_ENDPOINT_FORMAT_OPTS (in can_cxml integer, in can_qrcode integer, in params varchar, in qr varchar)
 {
   declare opts any;
   declare format varchar;
@@ -1760,16 +2043,17 @@ create procedure WS.WS.sparql_enpoint_format_opts (in can_cxml varchar, in can_q
   {
     format := (
       case lower(format)
-        when 'json' then 'application/sparql-results+json'
-        when 'js' then 'application/javascript'
-        when 'html' then 'text/html'
-        when 'sparql' then 'application/sparql-results+xml'
-        when 'xml' then 'application/sparql-results+xml'
-        when 'rdf' then 'application/rdf+xml'
-        when 'n3' then 'text/rdf+n3'
-        when 'cxml' then 'text/cxml'
-        when 'cxml+qrcode' then 'text/cxml+qrcode'
-        when 'csv' then 'text/csv'
+        when 'json'		then 'application/sparql-results+json'
+        when 'js'		then 'application/javascript'
+        when 'html'		then 'text/html'
+        when 'sparql'		then 'application/sparql-results+xml'
+        when 'xml'		then 'application/sparql-results+xml'
+        when 'rdf'		then 'application/rdf+xml'
+        when 'n3'		then 'text/rdf+n3'
+        when 'cxml'		then 'text/cxml'
+        when 'cxml+qrcode'	then 'text/cxml+qrcode'
+        when 'csv'		then 'text/csv'
+	when 'json-ld'		then 'application/ld+json'
         else format
       end);
   }
@@ -1780,51 +2064,368 @@ create procedure WS.WS.sparql_enpoint_format_opts (in can_cxml varchar, in can_q
       )
     {
       opts := vector (
-      		vector ('text/rdf+n3', 'N3/Turtle'),
-      		vector ('application/rdf+json', 'JSON'),
-      		vector ('application/rdf+xml', 'RDF/XML'),
-      		vector ('text/plain', 'NTriples'),
-      		vector ('application/xhtml+xml', 'XHTML+RDFa'),
-      		vector ('application/atom+xml', 'ATOM+XML'),
-      		vector ('application/odata+json', 'ODATA/JSON')
-      );
+	  vector ('text/rdf+n3'				, 'N3/Turtle'		),
+	  vector ('application/rdf+json'		, 'RDF/JSON'		),
+	  vector ('application/rdf+xml'			, 'RDF/XML'		),
+	  vector ('text/plain'				, 'N-Triples'		),
+	  vector ('application/xhtml+xml'		, 'XHTML+RDFa'		),
+	  vector ('application/atom+xml'		, 'ATOM+XML'		),
+	  vector ('application/odata+json'		, 'ODATA/JSON'		),
+	  vector ('application/x-json+ld'		, 'JSON-LD'		),
+	  vector ('text/x-html+ul'			, 'HTML (list)'		),
+	  vector ('text/x-html+tr'			, 'HTML (table)'	),
+	  vector ('text/html'				, 'HTML+Microdata'	),
+	  vector ('application/microdata+json'		, 'Microdata/JSON'	),
+	  vector ('text/csv'				, 'CSV'			),
+	  vector ('application/x-trig'			, 'TriG'		) );
     }
   else
     {
       if (not length (format)) format := 'text/html';
       opts := vector (
-      		vector ('auto', 'Auto'),
-      		vector ('text/html', 'HTML'),
-      		vector ('application/vnd.ms-excel', 'Spreadsheet'),
-      		vector ('application/sparql-results+xml', 'XML'),
-      		vector ('application/sparql-results+json', 'JSON'),
-      		vector ('application/javascript', 'Javascript'),
-      		vector ('text/plain', 'NTriples'),
-      		vector ('application/rdf+xml', 'RDF/XML')
-		);
+	  vector ('auto'				, 'Auto'		),
+	  vector ('text/html'				, 'HTML'		),
+	  vector ('application/vnd.ms-excel'		, 'Spreadsheet'		),
+	  vector ('application/sparql-results+xml'	, 'XML'			),
+	  vector ('application/sparql-results+json'	, 'JSON'		),
+	  vector ('application/javascript'		, 'Javascript'		),
+	  vector ('text/plain'				, 'NTriples'		),
+	  vector ('application/rdf+xml'			, 'RDF/XML'		) );
     }
   foreach (any x in opts) do
     {
-      http(sprintf ('<option value="%V" %s>%V</option>\n',
-	  x[0], case when format = x[0] then 'selected' else '' end , x[1]));
+      http(sprintf ('			<option value="%V" %s>%V</option>\n',
+	  x[0], case when format = x[0] then 'selected="selected"' else '' end , x[1]));
     }
-  http('			    <option value="text/csv">CSV</option>\n');
+  http('			<option value="text/csv">CSV</option>\n');
   if (can_cxml)
     {
-      http('			    <option value="text/cxml">CXML (Pivot Collection)</option>\n');
+      http('			<option value="text/cxml">CXML (Pivot Collection)</option>\n');
       if (can_qrcode)
-	http('			    <option value="text/cxml+qrcode">CXML (Pivot Collection with QRcode)</option>\n');
+	http('			<option value="text/cxml+qrcode">CXML (Pivot Collection with QRcode)</option>\n');
+    }
+}
+;
+
+create procedure WS.WS.SPARQL_ENDPOINT_SPONGE_OPTS (in params varchar)
+{
+  declare s_param varchar;
+  declare opts any;
+
+  s_param := get_keyword ('should-sponge', params, '');
+  opts := vector (
+      vector ('', 		  'Use only local data (including data retrieved before), but do not retrieve more'),
+      vector ('soft', 		  'Retrieve remote RDF data for all missing source graphs'),
+      vector ('grab-all',	  'Retrieve all missing remote RDF data that might be useful'),
+      vector ('grab-all-seealso', 'Retrieve all missing remote RDF data that might be useful, including seeAlso references'),
+      vector ('grab-everything',  'Try to download all referenced resources (this may be very slow and inefficient)')
+      );
+
+  foreach (any x in opts) do
+    {
+      http(sprintf ('			<option value="%V" %s>%V</option>\n',
+	  x[0], case when s_param = x[0] then 'selected="selected"' else '' end , x[1]));
+    }
+}
+;
+
+
+create procedure WS.WS.SPARQL_ENDPOINT_CXML_OPTION (in can_pivot integer, in params varchar, in lbl varchar)
+{
+  declare val varchar;
+  declare opts varchar;
+
+  if ('CXML_redir_for_subjs' = lbl)
+    {
+      val := get_keyword (lbl, params, '121');
+      http ('		<label for="CXML_redir_for_subjs" class="n">External resource link</label>\n');
+      http ('		<select name="CXML_redir_for_subjs" id="CXML_redir_for_subjs">\n');
+      opts := vector (
+	  vector ('',			'No link out'),
+	  vector ('121',		'External resource link'),
+	  vector ('LOCAL_TTL', 		'External description resource (TTL)'),
+	  vector ('LOCAL_NTRIPLES', 	'External description resource (NTRIPLES)'),
+	  vector ('LOCAL_JSON', 	'External description resource (JSON)'),
+	  vector ('LOCAL_XML', 		'External description resource (RDF/XML)')
+      );
+    } else {
+      val := get_keyword (lbl, params, '');
+      http ('		<label for="CXML_redir_for_hrefs" class="n">Facet link behavior</label>\n');
+      http ('		<select name="CXML_redir_for_hrefs" id="CXML_redir_for_hrefs">\n');
+      opts := vector (
+	  vector ('',			'Local faceted navigation link'),
+	  vector ('121',		'External resource link'),
+	  vector ('LOCAL_PIVOT',	'External faceted navigation link'),
+	  vector ('LOCAL_TTL', 		'External description resource (TTL)'),
+	  vector ('LOCAL_CXML',		'External description resource (CXML)'),
+	  vector ('LOCAL_NTRIPLES', 	'External description resource (NTRIPLES)'),
+	  vector ('LOCAL_JSON', 	'External description resource (JSON)'),
+	  vector ('LOCAL_XML', 		'External description resource (RDFXML)')
+      );
+    }
+
+  foreach (any x in opts) do
+    {
+      if ('LOCAL_PIVOT' <> x[0] or can_pivot)
+	  http(sprintf ('			<option value="%V" %s>%V</option>\n',
+	       x[0], case when val = x[0] then 'selected="selected"' else '' end , x[1]));
+    }
+
+  http ('		</select><br />\n');
+}
+;
+
+
+create procedure WS.WS.sparql_predefined_nsdecl ()
+{
+  declare label varchar;
+  label := 'Predefined Namespace Prefixes';
+
+  WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();
+
+  http('<head>\n');
+  WS.WS.SPARQL_ENDPOINT_HTML_HEAD(label);
+  WS.WS.SPARQL_ENDPOINT_STYLE();
+  http('</head>\n');
+
+  http ('<body>\n');
+  http ('    <div id="header">\n');
+  http ('	<h1 id="title">'); http (sprintf ('%s', label)); http ('</h1>\n');
+  http ('    </div>\n\n');
+  http ('    <div id="main">\n');
+  http ('    <br />\n');
+  http ('    <table class="tableresult" border="1">\n');
+  http (sprintf ('	<tr><th>Prefix</th><th>URI</th></tr>\n'));
+  for select NS_PREFIX, NS_URL from SYS_XML_PERSISTENT_NS_DECL order by 1 do
+    {
+       http (sprintf ('	<tr><td>%V</td><td>%V</td></tr>\n', NS_PREFIX, NS_URL));
+    }
+  http ('    </table>\n');
+  http ('    </div>\n\n');
+
+  http('<p>');
+  http ('<button type="button" name="back" value="Back" onclick="javascript:history.go(-1);">Back</button>\n');
+  http('</p>\n');
+
+  WS.WS.SPARQL_ENDPOINT_FOOTER();
+  http('</body>\n');
+  http('</html>\n');
+}
+;
+
+
+create procedure WS.WS.sparql_predefined_rdfinf ()
+{
+  declare label varchar;
+  label := 'Predefined Inference Rules';
+
+  WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();
+
+  http('<head>\n');
+  WS.WS.SPARQL_ENDPOINT_HTML_HEAD(label);
+  WS.WS.SPARQL_ENDPOINT_STYLE();
+  http('</head>\n');
+
+  http ('<body>\n');
+  http ('    <div id="header">\n');
+  http ('	<h1 id="title">'); http (sprintf ('%s', label)); http ('</h1>\n');
+  http ('    </div>\n\n');
+  http ('    <div id="main">\n');
+  http ('    <br />\n');
+  http ('    <table class="tableresult" border="1">\n');
+  http (sprintf ('	<tr><th>Name</th><th>URI</th></tr>\n'));
+  for select * from SYS_RDF_SCHEMA order by 1 do
+    {
+      http (sprintf ('	<tr><td>%V</td><td>%V</td></tr>\n', RS_NAME, RS_URI));
+    }
+  http ('    </table>\n');
+  http ('    </div>\n\n');
+
+  http('<p>');
+  http ('<button type="button" name="back" value="Back" onclick="javascript:history.go(-1);">Back</button>\n');
+  http('</p>\n');
+
+  WS.WS.SPARQL_ENDPOINT_FOOTER();
+  http('</body>\n');
+  http('</html>\n');
+}
+;
+
+create procedure WS.WS.SPARQL_ENDPOINT_GENERATE_FORM(
+    in params any,
+    in ini_dflt_graph varchar,
+    in def_qry varchar,
+    in timeout integer,
+    in debug integer,
+    in save_mode integer,
+    in dav_refresh varchar)
+{
+    declare can_cxml, can_pivot, can_qrcode, can_sponge integer;
+    can_cxml := case (isnull (DB.DBA.VAD_CHECK_VERSION ('sparql_cxml'))) when 0 then 1 else 0 end;
+    can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION ('PivotViewer'))) when 0 then 1 else 0 end;
+    can_qrcode := isstring (__proc_exists ('QRcode encodeString8bit', 2));
+    can_sponge := coalesce ((select top 1 1
+      from DB.DBA.SYS_USERS as sup
+        join DB.DBA.SYS_ROLE_GRANTS as g on (sup.U_ID = g.GI_SUPER)
+        join DB.DBA.SYS_USERS as sub on (g.GI_SUB = sub.U_ID)
+      where sup.U_NAME = 'SPARQL' and sub.U_NAME = 'SPARQL_SPONGE' ), 0);
+
+    declare endpoint_xsl any;
+    endpoint_xsl := registry_get ('sparql_endpoint_xsl');
+    if (0 = endpoint_xsl) endpoint_xsl := '';
+    if ('' <> endpoint_xsl) http_xslt(endpoint_xsl);
+
+    declare user_id varchar;
+    user_id := connection_get ('SPARQLUserId', 'SPARQL');
+
+    declare save_dir varchar;
+    declare save_dir_id any;
+    save_dir := coalesce ((select U_HOME from DB.DBA.SYS_USERS where U_NAME = user_id and U_DAV_ENABLE));
+    if (DAV_HIDE_ERROR (DAV_SEARCH_ID (save_dir, 'C')) is null)
+	save_dir := null;
+    else
+    {
+	save_dir := save_dir || 'saved-sparql-results/';
+	save_dir_id := DAV_SEARCH_ID (save_dir, 'C');
+	if (DAV_HIDE_ERROR (save_dir_id) is null)
+	    save_dir := null;
+    }
+
+    http_header ('Content-Type: text/html; charset=UTF-8\r\n');
+    if (http_request_get ('REQUEST_METHOD') = 'OPTIONS')
+	http_header (http_header_get () || 'MS-Author-Via: SPARQL\r\n');
+
+    WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();
+
+    http('<head>\n');
+    WS.WS.SPARQL_ENDPOINT_HTML_HEAD('Virtuoso SPARQL Query Editor');
+    WS.WS.SPARQL_ENDPOINT_STYLE ();
+    WS.WS.SPARQL_ENDPOINT_JAVASCRIPT(can_cxml, can_qrcode);
+    http('</head>\n');
+
+    http('<body onload="sparql_endpoint_init()">\n');
+
+    http('    <div id="header">\n');
+    http('	<h1>Virtuoso SPARQL Query Editor</h1>\n');
+    http('    </div>\n\n');
+
+    http('    <div id="menu">\n');
+    http('	  <a href="/sparql?help=intro">About</a>\n');
+    http('	| <a href="/sparql?nsdecl">Namespace Prefixes</a>\n');
+    http('	| <a href="/sparql?rdfinf">Inference rules</a>\n');
+    if (DB.DBA.VAD_CHECK_VERSION('iSPARQL') is not null)
+	http('	| <a href="/isparql">iSPARQL</a>\n');
+    http('    </div>\n\n');
+
+    http('    <div id="main">\n');
+    http('    <br />\n');
+    http('	<form action="" method="get">\n');
+    http('	<fieldset>\n');
+    http('		<label for="default-graph-uri">Default Data Set Name (Graph IRI)</label><br />\n');
+    http('		<input type="text" name="default-graph-uri" id="default-graph-uri"');
+    http(sprintf (' value="%s" size="80"/>\n', coalesce (ini_dflt_graph, '') ));
+    http('		<br /><br />\n');
+
+    http('		<label for="query">Query Text</label><br />\n');
+    http('		<textarea rows="18" cols="80" name="query" id="query" onchange="format_select(this)" onkeyup="format_select(this)">'|| def_qry ||'</textarea>\n');
+
+    http('		<br /><br />\n');
+    if (can_sponge)
+    {
+	http('		<label for="should-sponge" class="n">Sponging</label>\n');
+	http('		<select name="should-sponge" id="should-sponge">\n');
+	WS.WS.SPARQL_ENDPOINT_SPONGE_OPTS (params);
+	http('		</select>\n');
+    }
+    else
+    {
+	http('		<span class="info"><i>(Security restrictions of this server do not allow you to retrieve remote RDF data, see <a href="/sparql?help=enable_sponge">details</a>.)</i></span>\n');
+    }
+
+    http('		<br />\n');
+    http('		<label for="format" class="n">Results Format</label>\n');
+    http('		<select name="format" id="format" onchange="format_change(this)">\n');
+    WS.WS.SPARQL_ENDPOINT_FORMAT_OPTS (can_cxml, can_qrcode, params, def_qry);
+    http('		</select>\n');
+    if (sys_stat('st_has_vdb'))
+    {
+	if (not can_cxml)
+	    http('		<span class="info"><i>(The CXML output is disabled, see <a href="/sparql?help=enable_cxml">details</a>)</i></span>\n');
+	else if (not can_qrcode)
+	    http('		<span class="info"><i>(The QRCODE output is disabled, see <a href="/sparql?help=enable_cxml">details</a>)</i></span>\n');
+    }
+    http('		<br />\n');
+
+    if (can_cxml)
+    {
+	http ('		<fieldset id="cxml">\n');
+	WS.WS.SPARQL_ENDPOINT_CXML_OPTION (can_pivot, params, 'CXML_redir_for_subjs');
+
+	WS.WS.SPARQL_ENDPOINT_CXML_OPTION (can_pivot, params, 'CXML_redir_for_hrefs');
+	http ('		</fieldset>\n');
+    }
+
+    http('		<label for="timeout" class="n">Execution timeout</label>\n');
+    http('		<input name="timeout" id="timeout" type="text" value="' || coalesce (cast (timeout as varchar), '') || '" /> milliseconds\n');
+    http('		<span class="info"><i>(values less than 1000 are ignored)</i></span>');
+    http('		<br />\n');
+
+    --http('		<li>\n');
+    --http('		<label for="maxrows">Max Rows</label>\n');
+    --http('		<input type="text" name="maxrows" id="maxrows"\n');
+    --http( sprintf('		value="%d"/>\n',maxrows));
+    --http('		<br />\n');
+
+    http('		<label class="n" for="options">Options</label>\n');
+    http('		<fieldset id="options">\n');
+    http('		<input name="debug" id="debug" type="checkbox"' || case (debug) when '' then '' else ' checked="checked"' end || '/>\n');
+    http('		<label for="debug" class="ckb">Strict checking of void variables</label>\n');
+
+
+    if (save_dir is not null)
+    {
+	http('		<br />\n');
+	http('		<input name="save" id="save" onclick="savedav_change(this)" type="checkbox"' || case when (save_mode is null) then '' else ' checked="checked"' end || ' />\n');
+	http('		<label for="save" class="ckb">Save resultset to WebDAV folder on the server</label>\n');
+	http('		<fieldset id="savefs">\n');
+	http('		    <label for="fname">File name:</label>\n');
+	http('		    <input type="text" id="fname" name="fname" />\n');
+	http('		    <input type="checkbox" name="dav_refresh" id="dav_refresh"' || case when (dav_refresh is null) then '' else ' checked="checked"' end || ' />\n');
+	http('		    <label class="ckb" for="dav_refresh">Refresh periodically</label>\n');
+	http('		</fieldset>\n');
     }
+
+    http('		</fieldset>\n');
+    http('		<br />\n');
+
+    if (save_dir is null)
+    {
+	http('		<span class="info"><i>(The result can only be sent back to browser, not saved on the server, see <a href="/sparql?help=enable_det">details</a>)</i></span>\n');
+        http('		<br />\n');
+    }
+
+    http('		<br />\n');
+    http('		<input type="submit" value="Run Query"/>\n');
+    http('		<input type="reset" value="Reset"/>\n');
+    http('	</fieldset>\n');
+    http('	</form>\n');
+    http('    </div>\n\n');
+    WS.WS.SPARQL_ENDPOINT_FOOTER();
+    http('</body>\n');
+    http('</html>\n');
+
+    return;
 }
 ;
 
+
 -- Web service endpoint.
 
 create procedure WS.WS."/!sparql/" (inout path varchar, inout params any, inout lines any)
 {
   declare query, full_query, format, should_sponge, debug, def_qry varchar;
   declare dflt_graphs, named_graphs any;
-  declare paramctr, paramcount, qry_params, maxrows, can_sponge, can_cxml, can_pivot, can_qrcode, start_time integer;
+  declare paramctr, paramcount, qry_params, maxrows, can_sponge,  start_time integer;
   declare ses, content any;
   declare def_max, add_http_headers, hard_timeout, timeout, client_supports_partial_res, sp_ini, soap_ver int;
   declare http_meth, content_type, ini_dflt_graph, get_user, jsonp_callback varchar;
@@ -1834,7 +2435,7 @@ create procedure WS.WS."/!sparql/" (inout path varchar, inout params any, inout
   declare exec_time, exec_db_activity any;
   declare __debug_mode integer;
   declare qtxt, deadl integer;
-  declare save_mode, save_dir, fname varchar;
+  declare save_mode, save_dir, dav_refresh, fname varchar;
   declare save_dir_id any;
   declare help_topic varchar;
   -- dbg_obj_princ ('===============');
@@ -1877,40 +2478,48 @@ create procedure WS.WS."/!sparql/" (inout path varchar, inout params any, inout
   maxrows := 1024*1024; -- More than enough for web-interface.
   deadl := 0;
   http_meth := http_request_get ('REQUEST_METHOD');
-  ini_dflt_graph := cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'DefaultGraph');
-  hard_timeout := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'MaxQueryExecutionTime'), '0')) * 1000;
-  timeout := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'ExecutionTimeout'), '0')) * 1000;
+  ini_dflt_graph := virtuoso_ini_item_value ('SPARQL', 'DefaultGraph');
+  hard_timeout := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'MaxQueryExecutionTime'), '0')) * 1000;
+  timeout := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'ExecutionTimeout'), '0')) * 1000;
   client_supports_partial_res := 0;
+
   user_id := connection_get ('SPARQLUserId', 'SPARQL');
   help_topic := get_keyword ('help', params, null);
   if (help_topic is not null)
     goto brief_help;
 
   def_qry := get_keyword('qtxt', params, '');
+  ini_dflt_graph := get_keyword ('default-graph-uri', params, ini_dflt_graph);
+  timeout := atoi (get_keyword ('timeout', params, cast (timeout as varchar)));
 
   if ('' <> def_qry)
     qtxt := 1;
-  def_max := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'ResultSetMaxRows'), '-1'));
+  def_max := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'ResultSetMaxRows'), '-1'));
   -- if timeout specified and it's over 1 second
-  save_mode := get_keyword ('save', params, null);
-  if (save_mode is not null and save_mode = 'display')
-    save_mode := null;
-  else if (save_mode is not null)
-    {
-      save_dir := coalesce ((select U_HOME from DB.DBA.SYS_USERS where U_NAME = user_id and U_DAV_ENABLE));
-      if (DAV_HIDE_ERROR (DAV_SEARCH_ID (save_dir, 'C')) is null)
-        save_dir := null;
-      else
-        {
-          save_dir := save_dir || 'saved-sparql-results/';
-          save_dir_id := DAV_SEARCH_ID (save_dir, 'C');
-          if (DAV_HIDE_ERROR (save_dir_id) is null)
-            save_dir := null;
-        }
-    }
+
+
   fname := trim (get_keyword ('fname', params, ''));
   if (fname = '')
     fname := null;
+
+  dav_refresh := get_keyword ('dav_refresh', params, '');
+  if (dav_refresh = '')
+    dav_refresh := null;
+
+  save_mode := get_keyword ('save', params, '');
+
+  if (save_mode = '' OR save_mode = 'display') {
+    save_mode := null;
+    dav_refresh := null;
+    fname := null;
+  } else if (save_mode = 'dynamic' OR dav_refresh is not null) {
+    save_mode := 'dynamic';
+    dav_refresh := '1';
+  } else {
+    save_mode := 'tmpstatic';
+    dav_refresh := null;
+  }
+
   get_user := '';
   soap_ver := 0;
   soap_action := http_request_header (lines, 'SOAPAction', null, null);
@@ -1946,14 +2555,22 @@ create procedure WS.WS."/!sparql/" (inout path varchar, inout params any, inout
 
   if (__debug_mode) dbg_printf ('%d', soap_ver);
 
+  if (get_keyword ('nsdecl', params) is not null)
+    {
+      WS.WS.sparql_predefined_nsdecl ();
+      return;
+    }
+  if (get_keyword ('rdfinf', params) is not null)
+    {
+      WS.WS.sparql_predefined_rdfinf ();
+      return;
+    }
+
   can_sponge := coalesce ((select top 1 1
       from DB.DBA.SYS_USERS as sup
         join DB.DBA.SYS_ROLE_GRANTS as g on (sup.U_ID = g.GI_SUPER)
         join DB.DBA.SYS_USERS as sub on (g.GI_SUB = sub.U_ID)
       where sup.U_NAME = 'SPARQL' and sub.U_NAME = 'SPARQL_SPONGE' ), 0);
-  can_cxml := case (isnull (DB.DBA.VAD_CHECK_VERSION ('sparql_cxml'))) when 0 then 1 else 0 end;
-  can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION ('PivotViewer'))) when 0 then 1 else 0 end;
-  can_qrcode := isstring (__proc_exists ('QRcode encodeString8bit', 2));
 
   paramcount := length (params);
 
@@ -1971,203 +2588,14 @@ create procedure WS.WS."/!sparql/" (inout path varchar, inout params any, inout
          }
       if (not qtxt)
         {
-          def_qry := cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'DefaultQuery');
+          def_qry := virtuoso_ini_item_value ('SPARQL', 'DefaultQuery');
           if (def_qry is null)
             def_qry := 'SELECT * WHERE {?s ?p ?o}';
         }
-http('<html xmlns="http://www.w3.org/1999/xhtml">\n');
-http('	<head>\n');
-http('		<title>Virtuoso SPARQL Query Form</title>\n');
-http('		<style type="text/css">\n');
-http('		label.n { display: inline; margin-top: 10pt; }\n');
-http('		body { font-family: arial, helvetica, sans-serif; font-size: 9pt; color: #234; }\n');
-http('		fieldset { border: 2px solid #86b9d9; }\n');
-http('		legend { font-size: 12pt; color: #86b9d9; }\n');
-http('		label { font-weight: bold; }\n');
-http('		h1 { width: 100%; background-color: #86b9d9; font-size: 18pt; font-weight: normal; color: #fff; height: 4ex; text-align: right; vertical-align: middle; padding-right:  8px; }\n');
-http('		textarea { width: 100%; padding: 3px; }\n');
-http('          #footer { width: 100%; float: left; clear: left; margin: 1.2em 0 0; padding: 0.3em; background-color: #fff;}\n');
-http('          #ft_r { float: right; clear: right;}\n');
-http('          #ft_t { text-align: center; }\n');
-http('          #ft_b { text-align: center; margin-top: 0.7ex }\n');
-http('		</style>\n');
-http('		<script language="JavaScript">\n');
-http('var last_format = 1;\n');
-http('function format_select(query_obg)\n');
-http('{\n');
-http('  var query = query_obg.value; \n');
-http('  var format = query_obg.form.format;\n');
-http('\n');
-http('  if ((query.match(/\\bconstruct\\b/i) || query.match(/\\bdescribe\\b/i)) && last_format == 1) {\n');
-http('    for(var i = format.options.length; i > 0; i--)\n');
-http('      format.options[i] = null;');
-http('    format.options[1] = new Option(\'N3/Turtle\',\'text/rdf+n3\');\n');
-http('    format.options[2] = new Option(\'JSON\',\'application/rdf+json\');\n');
-http('    format.options[3] = new Option(\'RDF/XML\',\'application/rdf+xml\');\n');
-http('    format.options[4] = new Option(\'NTriples\',\'text/plain\');\n');
-http('    format.options[5] = new Option(\'XHTML+RDFa\',\'application/xhtml+xml\');\n');
-http('    format.options[6] = new Option(\'ATOM+XML\',\'application/atom+xml\');\n');
-http('    format.options[7] = new Option(\'ODATA/JSON\',\'application/odata+json\');\n');
-http('    format.options[8] = new Option(\'CSV\',\'text/csv\');\n');
-if (can_cxml)
-  {
-    http('    format.options[9] = new Option(\'CXML (Pivot Collection)\',\'text/cxml\');\n');
-    if (can_qrcode)
-      http('    format.options[10] = new Option(\'CXML (Pivot Collection with QRcodes)\',\'text/cxml+qrcode\');\n');
-  }
-http('    format.selectedIndex = 1;\n');
-http('    last_format = 2;\n');
-http('  }\n');
-http('\n');
-http('  if (!(query.match(/\\bconstruct\\b/i) || query.match(/\\bdescribe\\b/i)) && last_format == 2) {\n');
-http('    for(var i = format.options.length; i > 0; i--)\n');
-http('      format.options[i] = null;\n');
-http('    format.options[1] = new Option(\'HTML\',\'text/html\');\n');
-http('    format.options[2] = new Option(\'Spreadsheet\',\'application/vnd.ms-excel\');\n');
-http('    format.options[3] = new Option(\'XML\',\'application/sparql-results+xml\');\n');
-http('    format.options[4] = new Option(\'JSON\',\'application/sparql-results+json\');\n');
-http('    format.options[5] = new Option(\'Javascript\',\'application/javascript\');\n');
-http('    format.options[6] = new Option(\'N3/Turtle\',\'text/rdf+n3\');\n');
-http('    format.options[7] = new Option(\'RDF/XML\',\'application/rdf+xml\');\n');
-http('    format.options[8] = new Option(\'NTriples\',\'text/plain\');\n');
-http('    format.options[9] = new Option(\'CSV\',\'text/csv\');\n');
-if (can_cxml)
-  http('    format.options[10] = new Option(\'CXML (Pivot Collection)\',\'text/cxml\');\n');
-http('    format.selectedIndex = 1;\n');
-http('    last_format = 1;\n');
-http('  }\n');
-http('}\n');
-http('		</script>\n');
-http('	</head>\n');
-http('	<body>\n');
-http('		<div id="header">\n');
-http('			<h1>OpenLink Virtuoso SPARQL Query</h1>\n');
-http('		</div>\n');
-http('		<div id="main">\n');
-http('			<p>This query page is designed to help you test OpenLink Virtuoso SPARQL protocol endpoint. <br/>\n');
-http('			Consult the <a href="http://virtuoso.openlinksw.com/wiki/main/Main/VOSSparqlProtocol">Virtuoso Wiki page</a> describing the service \n');
-http('			or the <a href="http://docs.openlinksw.com/virtuoso/">Online Virtuoso Documentation</a> section <a href="http://docs.openlinksw.com/virtuoso/rdfandsparql.html">RDF Database and SPARQL</a>.</p>\n');
-http('			<p>There is also a rich Web based user interface with sample queries. \n');
-if (DB.DBA.VAD_CHECK_VERSION('iSPARQL') is null)
-  http('			In order to use it you must install the iSPARQL package (isparql_dav.vad).</p>\n');
-else
-  http('			You can access it at: <a href="/isparql">/isparql</a>.</p>\n');
-http('			<form action="" method="GET">\n');
-http('			<fieldset>\n');
-http('			<legend>Query</legend>\n');
-http('			  <label for="default-graph-uri">Default Graph URI</label>\n');
-http('			  <br />\n');
-http('			  <input type="text" name="default-graph-uri" id="default-graph-uri"\n');
-http(sprintf ('				  	value="%s" size="80"/>\n', coalesce (ini_dflt_graph, '') ));
-http('			  <br /><br />\n');
-if (can_sponge)
-  {
-    declare s_param varchar;
-    s_param := get_keyword ('should-sponge', params, '');
-http('<select name="should-sponge" id="should-sponge">');
-http('  <option' ||
-  case (s_param) when '' then ' selected="selected"' else '' end ||
-  ' value="">Use only local data (including data retrieved before), but do not retrieve more</option>\n');
-http('  <option' ||
-  case (s_param) when 'soft' then ' selected="selected"' else '' end ||
-  ' value="soft">Retrieve remote RDF data for all missing source graphs</option>\n');
-http('  <option' ||
-  case (s_param) when 'grab-all' then ' selected="selected"' else '' end ||
-  ' value="grab-all">Retrieve all missing remote RDF data that might be useful</option>\n');
-http('  <option' ||
-  case (s_param) when 'grab-all-seealso' then ' selected="selected"' else '' end ||
-  ' value="grab-all-seealso">Retrieve all missing remote RDF data that might be useful, including seeAlso references</option>\n');
-http('  <option' ||
-  case (s_param) when 'grab-everything' then ' selected="selected"' else '' end ||
-  ' value="grab-everything">Try to download all referenced resources (this may be very slow and inefficient)</option>\n');
-http('</select>\n');
-http('			  <br />\n');
-  }
-else
-  {
-    http('			  <font size="-1"><i>(Security restrictions of this server do not allow you to retrieve remote RDF data.
-    Database administrator can change them, accodring to these <a href="/sparql?help=enable_sponge">instructions</a>.)</i></font>\n');
-  }
-http('<br /><br />\n');
-http('			  <label for="query">Query text</label>\n');
-http('			  <br />\n');
-http('			  <textarea rows="10" cols="80" name="query" id="query" onchange="format_select(this)" onkeyup="format_select(this)">'|| def_qry ||'</textarea>\n');
-http('			  <br /><br />\n');
---http('			  <label for="maxrows">Max Rows:</label>\n');
---http('			  <input type="text" name="maxrows" id="maxrows"\n');
---http(sprintf('				  	value="%d"/>',maxrows));
---http('			  <br />\n');
-http('<label for="debug" class="n"><nobr>Rigorous check of the query:</nobr></label>');
-http(' <input name="debug" type="checkbox"' || case (debug) when '' then '' else ' checked' end || '/>');
-http('      \n');
-http('<label for="timeout" class="n"><nobr>Execution timeout, in milliseconds, values less than 1000 are ignored:</nobr></label>');
-http(' <input name="timeout" type="text"' || case (isnull (timeout)) when 0 then cast (timeout as varchar) else '' end || '/>');
-http('      \n');
-http('			  <label for="format" class="n">Format Results As:</label>\n');
-http('			  <select name="format">\n');
-	WS.WS.sparql_enpoint_format_opts (can_cxml, can_qrcode, params, def_qry);
-http('			  </select>\n');
-if (can_cxml)
-  {
-http('<div style="display:none">\n');
-http('      \n');
-http('			  <label for="redir_for_subjs" class="n">Style for RDF subjects:</label>\n');
-http('			  <select name="CXML_redir_for_subjs">\n');
-http('			    <option value="" selected="selected">Convert to string facets</option>\n');
-http('			    <option value="121">Make Plain Links</option>\n');
-if (can_pivot is not null)
-  http('			    <option value="LOCAL_PIVOT">Make SPARQL DESCRIBE Pivot links</option>\n');
-http('			    <option value="LOCAL_TTL">Make SPARQL DESCRIBE download links (TTL)</option>\n');
-http('			    <option value="LOCAL_CXML">Make SPARQL DESCRIBE download links (CXML)</option>\n');
-http('			  </select>\n');
-http('</div>\n');
-http('      \n');
--- http('			  <label for="redir_for_hrefs" class="n">Style for other links:</label>\n');
-http('			  <label for="redir_for_hrefs" class="n">CXML link behavior:</label>\n');
-http('			  <select name="CXML_redir_for_hrefs">\n');
-http('			    <option value="" selected="selected">Local faceted navigation links</option>\n');
-http('			    <option value="121">External resource links</option>\n');
-if (can_pivot is not null)
-  http('			    <option value="LOCAL_PIVOT">External faceted navigation links</option>\n');
-http('			    <option value="LOCAL_TTL">External description resource (TTL)</option>\n');
-http('			    <option value="LOCAL_CXML">External description resource (CXML)</option>\n');
-http('			  </select>\n');
-  }
-if (not can_cxml)
-  http(' <font size="-1"><i>(The CXML output is disabled, see <a href="/sparql?help=enable_cxml">details</a>)</i></font>\n');
-else if (not can_qrcode)
-  http(' <font size="-1"><i>(The QRcode output is disabled, no "qrcode" plugin found</a>)</i></font>\n');
-http('      \n');
-if (save_dir is not null)
-{
---http('			  <label for="save" class="n">Save Results As:</label>\n');
-http('			  <select name="save">\n');
-http('			    <option value="display" selected="selected">Display the result and not save</option>\n');
-http('			    <option value="tmpstatic">Save the result to the DAV as a temporary document with the specified name:</option>\n');
-http('			    <option value="dynamic">Save the result to the DAV and refresh it periodically with the specified name:</option>\n');
-http('			  </select>');
-http(' <input name="fname" type="text" />');
-http('      \n');
-}
-else
-  http(' <font size="-1"><i>(The result can only be sent back to browser, but not saved on the server, see <a href="/sparql?help=enable_det">details</a>)</i></font>\n');
-http('<br /><br />\n');
-http('			  <input type="submit" value="Run Query"/>');
-http(' <input type="reset" value="Reset"/>\n');
-http('			</fieldset>\n');
-http('			</form>\n');
-http('		</div>\n');
-http('		<div id="footer">\n');
-http('		<div id="ft_b">\n');
-http('<a href="http://www.openlinksw.com/virtuoso/">OpenLink Virtuoso</a> version '); http(sys_stat ('st_dbms_ver')); http(', on ');
-http(sys_stat ('st_build_opsys_id')); http (sprintf (' (%s), ', host_id ()));
-http(case when sys_stat ('cl_run_local_only') = 1 then 'Single Server' else 'Cluster' end); http (' Edition ');
-http(case when sys_stat ('cl_run_local_only') = 0 then sprintf ('(%d server processes)', sys_stat ('cl_n_hosts')) else '' end);
-http('		</div>\n');
-http('		</div>\n');
-http('	</body>\n');
-http('</html>\n');
-       return;
+
+      WS.WS.SPARQL_ENDPOINT_GENERATE_FORM(params, ini_dflt_graph, def_qry, timeout, debug, save_mode, dav_refresh);
+
+      return;
     }
   qry_params := dict_new (7);
   for (paramctr := 0; paramctr < paramcount; paramctr := paramctr + 2)
@@ -2230,7 +2658,7 @@ http('</html>\n');
       else if ('timeout' = pname and length (pvalue))
         {
           declare t integer;
-          t := cast (pvalue as integer) * 1000;
+          t := cast (pvalue as integer);
           if (t is not null and t >= 1000)
             {
               if (hard_timeout >= 1000)
@@ -2246,7 +2674,7 @@ http('</html>\n');
 	}
       else if (query is null and 'query-uri' = pname and length (pvalue))
 	{
-	  if (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'ExternalQuerySource') = '1')
+	  if (virtuoso_ini_item_value ('SPARQL', 'ExternalQuerySource') = '1')
 	    {
 	      declare uri varchar;
 	      declare hf, hdr, charset any;
@@ -2276,7 +2704,7 @@ http('</html>\n');
 	}
       else if ('xslt-uri' = pname and length (pvalue))
 	{
-	  if (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'ExternalXsltSource') = '1')
+	  if (virtuoso_ini_item_value ('SPARQL', 'ExternalXsltSource') = '1')
 	    {
 	      add_http_headers := 0;
 	      http_xslt (pvalue);
@@ -2335,7 +2763,7 @@ http('</html>\n');
        spt_ns := DB.DBA.SPARQL_PT_NS ();
        ns_decl := '[ xmlns:soap="'||soap_ns||'" xmlns:sp="'||spt_ns||'" ] ';
        content := http_body_read ();
-       if (registry_get ('__sparql_endpoint_debug') = '1')
+       if (__debug_mode)
          dbg_printf ('content=[%s]', string_output_string (content));
        xt := xtree_doc (content);
        query := charset_recode (xpath_eval (ns_decl||'string (/soap:Envelope/soap:Body/sp:query-request/query)', xt), '_WIDE_', 'UTF-8');
@@ -2495,14 +2923,14 @@ host_found:
   state := '00000';
   metas := null;
   rset := null;
-  if (registry_get ('__sparql_endpoint_debug') = '1')
+  if (__debug_mode)
     dbg_printf ('query=[%s]', full_query);
 
   declare sc_max int;
   declare sc decimal;
-  sc_max := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'MaxQueryCostEstimationTime'), '-1'));
+  sc_max := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'MaxQueryCostEstimationTime'), '-1'));
   if (sc_max < 0)
-    sc_max := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), 'SPARQL', 'MaxExecutionTime'), '-1'));
+    sc_max := atoi (coalesce (virtuoso_ini_item_value ('SPARQL', 'MaxExecutionTime'), '-1'));
   if (sc_max > 0)
     {
       state := '00000';
@@ -2518,6 +2946,17 @@ host_found:
   metas := null;
   rset := null;
 
+  save_dir := coalesce ((select U_HOME from DB.DBA.SYS_USERS where U_NAME = user_id and U_DAV_ENABLE));
+  if (DAV_HIDE_ERROR (DAV_SEARCH_ID (save_dir, 'C')) is null)
+    save_dir := null;
+  else
+    {
+      save_dir := save_dir || 'saved-sparql-results/';
+      save_dir_id := DAV_SEARCH_ID (save_dir, 'C');
+      if (DAV_HIDE_ERROR (save_dir_id) is null)
+	save_dir := null;
+    }
+
   -- dbg_obj_princ ('accept = ', accept);
   -- dbg_obj_princ ('format = ', format);
   -- dbg_obj_princ ('full_query = ', full_query);
@@ -2564,7 +3003,7 @@ host_found:
     {
       declare state2, msg2 varchar;
       state2 := '00000';
-      exec ('isnull (sparql_to_sql_text (?))', state2, msg2, vector (full_query));
+      exec ('isnull (sparql_to_sql_text (''define sql:big-data-const 0 '' || ?))', state2, msg2, vector (full_query));
       if (state2 <> '00000')
         {
           DB.DBA.SPARQL_PROTOCOL_ERROR_REPORT (path, params, lines,
@@ -2574,9 +3013,10 @@ host_found:
         }
       DB.DBA.SPARQL_PROTOCOL_ERROR_REPORT (path, params, lines,
         '500', 'SPARQL Request Failed',
-	full_query, state, msg, format);
+        full_query, state, msg, format);
       return;
     }
+
 write_results:
   if (save_mode is not null)
     {
@@ -2639,30 +3079,43 @@ write_results:
           refresh_sec := case (save_mode) when 'tmpstatic' then null else __max (600, coalesce (hard_timeout, 1000)/100) end;
           ttl_sec := 172800;
           full_uri := concat ('http://', registry_get ('URIQADefaultHost'), DAV_SEARCH_PATH (save_dir_id, 'C'), fname);
-          "DynaRes_INSERT_RESOURCE" (detcol_id => save_dir_id, fname => fname,
-            owner_uid => sparql_uid,
-            refresh_seconds => refresh_sec,
-            ttl_seconds => ttl_sec,
-            mime => accept,
-            exec_stmt => 'DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS (?, ?, ?, ?, ?, ?, ?)',
-            exec_params => vector (full_query, qry_params, maxrows, accept, user_id, hard_timeout, jsonp_callback),
-            exec_uname => user_id, content => ses );
-          http ('<html><head><title>The SPARQL result is successfully saved</title></head><body>');
-          http ('<h3>Done!</h3>');
-          http ('<p>The SPARQL result is successfully saved in DAV storage as <a href="');
-          http_value (full_uri);
-          http ('">');
-          http_value (full_uri);
-          http ('</a></p>');
-          if (refresh_sec is not null)
-            http (sprintf ('<p>The content of the linked resource will be re-calculated on demand, and the result will be cached for %d minutes.</p>', refresh_sec/60));
-          if (ttl_sec is not null)
-            http (sprintf ('<p>The link will stay valid for %d days. To preserve the referenced document for future use, copy it to some other location before expiration.</p>', ttl_sec/(60*60*24)));
-          if (accept <> 'text/html')
-            http (sprintf ('<p>The resource MIME type is "%s". This type will be reported to the browser when you click on the link.
-If the browser is unable to open the link itself it can prompt for action like lauching an additional program.
-The program may let you to edit the loaded resource, in this case save the changed version should be saved to a different place, so use "Save As" command, not plain "Save".</p>', accept));
-          http ('</body></html>');
+          "DynaRes_INSERT_RESOURCE" (
+	      detcol_id => save_dir_id,
+	      fname => fname,
+	      owner_uid => sparql_uid,
+	      refresh_seconds => refresh_sec,
+	      ttl_seconds => ttl_sec,
+	      mime => accept,
+	      exec_stmt => 'DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS (?, ?, ?, ?, ?, ?, ?)',
+	      exec_params => vector (full_query, qry_params, maxrows, accept, user_id, hard_timeout, jsonp_callback),
+	      exec_uname => user_id,
+	      content => ses
+	  );
+
+	  WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();
+	  http ('<head>\n');
+	  WS.WS.SPARQL_ENDPOINT_HTML_HEAD('Virtuoso SPARQL Query Editor | Save to DAV');
+	  WS.WS.SPARQL_ENDPOINT_STYLE();
+	  http ('</head>\n');
+	  http ('<body>\n');
+	  http ('    <div id="header">\n');
+	  http ('	<h1 id="title">Virtuoso SPARQL Query Editor</h1>\n');
+	  http ('    </div>\n\n');
+	  http ('<h3>Saved to DAV</h3>');
+	  http ('<p>The SPARQL result is successfully saved in DAV storage as <a href="');
+	  http_value (full_uri);
+	  http ('">');
+	  http_value (full_uri);
+	  http ('</a></p>');
+	  if (refresh_sec is not null)
+	  http (sprintf ('<p>The content of the linked resource will be re-calculated on demand, and the result will be cached for %d minutes.</p>', refresh_sec/60));
+	  if (ttl_sec is not null)
+	  http (sprintf ('<p>The link will stay valid for %d days. To preserve the referenced document for future use, copy it to some other location before expiration.</p>', ttl_sec/(60*60*24)));
+	  if (accept <> 'text/html')
+	  http (sprintf ('<p>The resource MIME type is "%s". This type will be reported to the browser when you click on the link.
+	  If the browser is unable to open the link itself it can prompt for action like launching an additional program.
+	  The program may let you edit the loaded resource, in this case save the changed version should be saved to a different place, so use "Save As" command, not plain "Save".</p>', accept));
+	  http ('</body></html>');
         }
     }
   else
@@ -2678,54 +3131,90 @@ The program may let you to edit the loaded resource, in this case save the chang
 return;
 
 brief_help:
-  http ('<html><head><title>SPARQL Web Service Endpoint | Quick Help</title></head><body>');
-  if (help_topic='enable_sponge')
-    {
-      declare host_ur varchar; host_ur := registry_get ('URIQADefaultHost');
+  WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();
+
+  http('<head>\n');
+  WS.WS.SPARQL_ENDPOINT_HTML_HEAD('Virtuoso SPARQL Query Editor | About');
+  WS.WS.SPARQL_ENDPOINT_STYLE ();
+  http('</head>\n');
+
+  http('<body>\n');
+  http ('    <div id="header">\n');
+  http('	<h1 id="title">Virtuoso SPARQL Query Editor | About</h1>\n');
+  http ('    </div>\n\n');
+
+  http ('    <div id="help">\n');
+  if (help_topic='intro')
+    {
+      http('<h3>Intro</h3>');
+      http('	<p>This page is designed to help you test the OpenLink Virtuoso SPARQL protocol endpoint.<br/>\n');
+      http('	Consult the <a href="http://virtuoso.openlinksw.com/wiki/main/Main/VOSSparqlProtocol">Virtuoso Wiki page</a> describing the service \n');
+      http('	or the <a href="http://docs.openlinksw.com/virtuoso/">Online Virtuoso Documentation</a> section <a href="http://docs.openlinksw.com/virtuoso/rdfandsparql.html">RDF Database and SPARQL</a>.</p>\n');
+      http('	<p>There is also a rich Web based user interface with sample queries. \n');
+      if (DB.DBA.VAD_CHECK_VERSION('iSPARQL') is null)
+	  http('	In order to use it you must install the iSPARQL package (isparql_dav.vad).</p>\n');
+      else
+	  http('	You can access it at: <a href="/isparql">/isparql</a>.</p>\n');
+      http('	<p>For your convenience we have a set of <a href="/sparql?nsdecl">predefined name space prefixes</a> and <a href="/sparql?rdfinf">inference rules</a></p>\n');
+
+      http('	<h3>What is SPARQL?</h3>\n');
+      http('	<p>SPARQL is the W3C''s declaritive query-language for Graph Model Databases and Stores.</p>\n');
+      http('    <p>As is the case with regards to SQL for relational databases and XQUERY for XML databases, ');
+      http('    SPARQL is database and host operating system independent.<p>\n');
+      http('	<p>The development and evolution of this standard is overseen by the\n');
+      http('	<a href="http://www.w3.org/2009/sparql/wiki/Main_Page">SPARQL Working Group</a> within W3C and\n');
+      http('	while parts of the language are still in active <a href="http://www.w3.org/TR/2011/WD-sparql11-query-20110512/">development</a>, it is fully <a href="http://www.w3.org/TR/rdf-sparql-query/">documented</a> and <a href="http://www.w3.org/2009/05/sparql-phase-II-charter">publicly</a> available.</p>\n');
+    }
+  else if (help_topic='enable_sponge')
+    {
+      declare host_ur varchar;
+      host_ur := registry_get ('URIQADefaultHost');
+      host_ur := http_request_header (lines, 'Host', null, host_ur);
       http('<h3>How To Enable Sponge?</h3>
-      <p>When a new Virtuoso server is installed, default security restrictions do not allow SPARQL endpoint users to retrieve remote RDF data.
-      To remove the restriction, DBA should grant "SPARQL_SPONGE" privilege to "SPARQL" account.
-      If you are the administrator, you can perform the following steps:</p>\n');
+      <p>When a new Virtuoso server is installed, the default security restrictions do not allow SPARQL endpoint users to retrieve remote RDF data.
+      To remove this restriction, the DBA should grant "SPARQL_SPONGE" privilege to "SPARQL" account.
+      If you are the Database Administrator and want to enable this feature, you can perform the following steps:</p>\n');
       http('<ol>\n');
       http('<li>Go to the Virtuoso Administration Conductor i.e. \n');
       if (not isstring (host_ur))
           http('http://host:port/conductor .');
       else
           http( sprintf('<a href="http://%s/conductor">http://%s/conductor</a>.', host_ur, host_ur));
-      http('</li>\n<li>Login as dba user.');
-      http('</li>\n<li>Go to System Admin->User Accounts->Roles\n');
-      http('</li>\n<li>Click the link "Edit" for "SPARQL_SPONGE"\n');
-      http('</li>\n<li>Select from the list of available user/groups "SPARQL" and click the ">>" button so to add it to the right-positioned list.\n');
-      http('</li>\n<li>Click the button "Update"\n');
-      http('</li>\n<li>Access again the sparql endpoint in order to be able to retrieve remote data.\n');
-      http('</li></ol>\n');
+      http('</li>\n');
+      http('<li>Login as dba user.</li>\n');
+      http('<li>Go to System Admin->User Accounts->Roles</li>\n');
+      http('<li>Click the link "Edit" for "SPARQL_SPONGE"</li>\n');
+      http('<li>Select from the list of available user/groups "SPARQL" and click the ">>" button so to add it to the right-positioned list.\n</li>');
+      http('<li>Click the button "Update"</li>\n');
+      http('<li>Access again the sparql endpoint in order to be able to retrieve remote data.</li>\n');
+      http('</ol>\n');
     }
   else if (help_topic='enable_cxml')
     {
       http('<h3>How To Enable CXML Support</h3>');
-      http('<p>CXML is data exchange format for so-called "faceted view". It can be displayed by programs like Microsoft Pivot.
-For best results, the result of the query should contain links to images associated with described data and follow some rules, described in the User's Guide.</p>
-<p>This feature is supported by combination of three components:</p>\n');
+      http('<p>CXML is data exchange format for so-called "faceted view". It can be displayed by programs like Microsoft Pivot.</p>');
+      http('<p>For best results, the result of the query should contain links to images associated with described data and follow some rules, described in the User's Guide.</p>');
+      http('<p>This feature is supported by combination of four components:</p>\n');
       http('<ol>\n');
-      http('<li>Virtuoso Universal Server (Virtuoso Open Source does not contain some required functions)\n');
-      http('</li>\n<li>ImageMagick plugin of version 0.6 or newer\n');
-      http('</li>\n<li>sparql_cxml VAD package (it will in turn require "RDF mappers" package)\n');
-      http('</li></ol>\n');
-      http('<p>As soon as all components are installed, SPARQL web service endpoint will contain "CXML" option to the list of available formats.</p>\n');
+      http('<li>The Virtuoso Universal Server (Virtuoso Open Source does not contain some required functions)</li>\n');
+      http('<li>The ImageMagick plugin (version 0.6 or newer) and optionally the QRcode plugin</li>\n');
+      http('<li>The QRcode plugin (version 0.1 or newer)</li>\n');
+      http('<li>The sparql_cxml VAD package (which in turn requires the "RDF mappers" package)</li>\n');
+      http('</ol>\n');
+      http('<p>As soon as all these components are installed, the SPARQL web service endpoint will add the "CXML" option to the list of available formats.</p>\n');
     }
   else if (help_topic='enable_det')
     {
-      declare host_ur varchar; host_ur := registry_get ('URIQADefaultHost');
-      http('<h3>How To Let the SPARQL Endpoint Save Results In DAV?</h3>
-<p>By default, SPARQL endpoint can only sent the result back to the client. That can be inconvenient if the result should be accessible for programs like file managers and archivers.</p>
-<p>The solution is to let the endpoint create "dynamic"resources in DAV storage of the Virtuoso server. A DAV client, e.g., the boilt-in client of Windows Explorer, can connect to that storage and access these resources as if they are plain local files.</p>
-<p>If you are the administrator and want to enable this feature, you can perform the following steps:</p>\n');
+      http('<h3>How To Let the SPARQL Endpoint Save Results In WebDAV?</h3>');
+      http('<p>By default, the SPARQL endpoint can only sent the result back to the client. This can be inconvenient if the result should be accessible for programs like file managers and archivers.</p>');
+      http('<p>The solution is to let the endpoint create "dynamic"resources in a WebDAV folder on the Virtuoso server. A WebDAV client, e.g. the built-in client of Windows Explorer, can connect to that storage and access these resources as if they are plain local files.</p>');
+      http('<p>If you are the Database Administrator and want to enable this feature, you can perform the following steps:</p>\n');
       http('<ol>\n');
-      http( sprintf('<li>This web service endpoint runs under "%.100s" account. This user should have an access to DAV (U_DAV_ENABLE=1 in DB.DBA.SYS_USERS)\n', user_id));
-      http( sprintf('</li>\n<li>The DAV home directory (e.g., <a href="/DAV/home/%.100s/">/DAV/home/%.100s/</a>) should be created and the path to it should be remembered in DB.DBA.SYS_USERS (U_HOME field; do not forget the leading and the trailing slash chars).\n', user_id, user_id));
-      http( sprintf('</li>\n<li>The home directory should contain a subdirectory named "saved-sparql-results", and the subdirectory should be of "DynaRes" DAV Extension Type.'));
-      http('</li></ol>\n');
-      http('<p>As soon as the appropriated directory exists, SPARQL web service endpoint will show additional controls to choose how to save results.</p>\n');
+      http( sprintf('<li>This web service endpoint runs under the "%.100s" account. This user should have an access to WebDAV (U_DAV_ENABLE=1 in DB.DBA.SYS_USERS)</li>\n', user_id));
+      http( sprintf('<li>A WebDAV home directory (e.g. <a href="/DAV/home/%.100s/">/DAV/home/%.100s/</a>) should be created and the path to it should be remembered in DB.DBA.SYS_USERS (U_HOME) field;<br />(do not forget the leading and the trailing slash chars).</li>\n', user_id, user_id));
+      http( sprintf('<li>This home directory should contain a subdirectory named "saved-sparql-results", and the subdirectory should be of "DynaRes" DAV Extension Type.</li>\n'));
+      http('</ol>\n');
+      http('<p>As soon as the appropriate directory exists, the SPARQL web service endpoint will show additional controls to choose how to save results.</p>\n');
     }
   else if (help_topic='enable_det')
     {
@@ -2733,13 +3222,292 @@ For best results, the result of the query should contain links to images associa
         '500', 'Request Failed',
         'Invalid help topic', format);
     }
-  http('<p><font size="-1">To close this help, press the "back" button of the browser.</font></p>\n');
+  http('');
+  http('<p>To close this help, press ');
+  http ('<button type="button" name="back" value="Back" onclick="javascript:history.go(-1);">Back</button>\n');
+  http(' or use the "back" button of the browser.</p>\n');
+  http('</div>\n\n');
+  WS.WS.SPARQL_ENDPOINT_FOOTER();
+  http('</body>\n');
+  http('</html>\n');
 }
 ;
 
 registry_set ('/!sparql/', 'no_vsp_recompile')
 ;
 
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK (inout g_iid IRI_ID, inout app_env any, inout res IRI_ID)
+{
+  res := min_bnode_iri_id ();
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE (
+  inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,
+  inout o_uri varchar,
+  inout app_env any )
+{
+  signal ('22023', 'The graph URI is relative and can not be resolved using the submitted resource (base should be declared before data for the first triple)');
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L (
+  inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,
+  inout o_val any, inout o_type varchar, inout o_lang varchar,
+  inout app_env any )
+{
+  signal ('22023', 'The graph URI is relative and can not be resolved using the submitted resource (base should be declared before data for the first triple)');
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE (
+  inout base_uri varchar,
+  inout graph_uri varchar,
+  inout app_env any )
+{
+  app_env[0] := DB.DBA.XML_URI_RESOLVE_LIKE_GET (base_uri, graph_uri);
+  signal ('ok001', '');
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CRUD_BASE_TTL (inout strg any, in graph_uri varchar, in flags integer := 255)
+{
+  declare app_env any;
+  if (126 = __tag (strg))
+    strg := cast (strg as varchar);
+  app_env := vector (null);
+  whenever sqlstate 'ok001' goto done;
+  rdf_load_turtle (strg, '', graph_uri, flags,
+    vector (
+      '',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK',
+      'DB.DBA.TTLP_EV_GET_IID',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L',
+      '',
+      '',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE' ),
+    app_env);
+done:
+  return app_env[0];
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SPARQL_CRUD_BASE_RDFXML (in strg any, in graph_uri varchar)
+{
+  declare app_env any;
+  app_env := vector (null);
+  whenever sqlstate 'ok001' goto done;
+  rdf_load_rdfxml (strg, 0,
+    graph_uri,
+    vector (
+      '',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK',
+      'DB.DBA.TTLP_EV_GET_IID',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L',
+      '',
+      '',
+      'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE' ),
+    app_env );
+done:
+  return app_env[0];
+}
+;
+
+create procedure WS.WS."/!sparql-graph-crud/" (inout path varchar, inout params any, inout lines any)
+{
+  declare user_id varchar;
+  declare reqbegin varchar;
+  declare graph_uri varchar;
+  declare graph_uri_is_relative integer;
+  -- dbg_obj_princ ('===============');
+  -- dbg_obj_princ ('===============');
+  -- dbg_obj_princ ('===============');
+  -- dbg_obj_princ ('WS.WS."/!sparql-graph-crud/" (', path, params, lines, ')');
+  set http_charset='utf-8';
+  user_id := connection_get ('SPARQLUserId', 'SPARQL');
+  reqbegin := lines[0];
+  graph_uri := trim(get_keyword ('graph-uri', params, ''));
+  if (isstring (get_keyword ('default', params)))
+    {
+      declare req_hosts varchar;
+      declare req_hosts_split any;
+      declare hctr integer;
+      if (graph_uri <> '')
+        signal ('22023', 'The request to SPARQL 1.1 Graph Store endpoint contains both "graph" and "default" params');
+      req_hosts := http_request_header (lines, 'Host', null, null);
+      req_hosts := replace (req_hosts, ', ', ',');
+      req_hosts_split := split_and_decode (req_hosts, 0, '\0\0,');
+      for (hctr := length (req_hosts_split) - 1; hctr >= 0; hctr := hctr - 1)
+        {
+          for (select top 1 SH_GRAPH_URI, SH_DEFINES from DB.DBA.SYS_SPARQL_HOST
+          where req_hosts_split [hctr] like SH_HOST) do
+            {
+              if (length (SH_GRAPH_URI))
+                {
+                  graph_uri := SH_GRAPH_URI;
+                  goto good_host_found;
+                }
+              goto bad_host_found;
+            }
+        }
+bad_host_found:
+      signal ('22023', 'The request to SPARQL 1.1 Graph Store endpoint contains "default" param but the endpoint is not configured to have default graph');
+good_host_found:
+      ;
+    }
+  if (graph_uri <> '')
+    goto graph_processing;
+  http_methods_set ('GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH');
+
+  WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();
+
+  http('<head>\n');
+  WS.WS.SPARQL_ENDPOINT_HTML_HEAD('Virtuoso SPARQL 1.1 Uniform RDF Graph Query Form');
+  WS.WS.SPARQL_ENDPOINT_STYLE ();
+  http('</head>\n');
+
+  http('<body>\n');
+  http('    <div id="header">\n');
+  http('	<h1>Virtuoso SPARQL 1.1 Uniform RDF Graph Query Form</h1>\n');
+  http('    </div>\n\n');
+  http('    <div id="intro">\n');
+  http('	<p>This page is designed to help you test support for <a href="http://www.w3.org/TR/sparql11-http-rdf-update">SPARQL 1.1 Graph Store HTTP Protocol</a> in OpenLink Virtuoso.</p>\n');
+  http('    </div>\n\n');
+  http('    <div id="main">\n');
+  http('	<form action="" method="post" enctype="multipart/form-data">\n');
+  http('	<fieldset>\n');
+  http('		<label for="graph-uri">Graph URI</label>\n');
+  http('		<br />\n');
+  http('		<input type="text" name="graph-uri" id="graph-uri" ');
+  http(sprintf ('value="%s" size="80"/>\n', coalesce ('')));
+  http('		<br /><br />\n');
+  http('		<label for="res-file">File to upload</label>\n');
+  http('		<br />\n');
+  http('		<input type="file" name="res-file" id="res-file"/>\n');
+  http('		<br /><br />\n');
+  http('		<input type="submit" value="Upload the resource"/>');
+  http('	</fieldset>\n');
+  http('	</form>\n');
+  http('    </div>\n\n');
+  WS.WS.SPARQL_ENDPOINT_FOOTER();
+  http('</body>\n');
+  http('</html>\n');
+  return;
+graph_processing:
+  commit work;
+  graph_uri_is_relative := neq (graph_uri, DB.DBA.XML_URI_RESOLVE_LIKE_GET ('zZz://example.com/', graph_uri));
+  if (graph_uri_is_relative)
+    {
+      if (not (reqbegin like 'PUT%') and not (reqbegin like 'POST%'))
+        signal ('22023', 'The graph URI <' || graph_uri || '> is relative and can be passed to SPARQL 1.1 Graph Store endpoint only in some PUT or POST requests');
+    }
+  if ((reqbegin like 'PUT%') or (reqbegin like 'POST%'))
+    {
+      declare res_file, res_content_type varchar;
+      declare full_graph_uri varchar;
+      declare graph_exists integer;
+      set_user_id (user_id, 1);
+      res_file := get_keyword ('res-file', params, '');
+      -- dbg_obj_princ ('res_file/1=', cast (res_file as varchar));
+      if (0 = length (res_file))
+        res_file := get_keyword ('Content', params, '');
+      -- dbg_obj_princ ('res_file/2=', string_output_string (res_file));
+      if (0 = length (res_file))
+        res_file := http_body_read();
+      -- dbg_obj_princ ('res_file/3=', string_output_string (res_file));
+      if (0 = length (res_file))
+        res_file := http_body_read(1);
+      -- dbg_obj_princ ('res_file/4=', string_output_string (res_file));
+      res_content_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (null, null, res_file);
+      -- dbg_obj_princ ('res_content_type=', res_content_type);
+      if (graph_uri_is_relative)
+        {
+          full_graph_uri := null;
+          if (res_content_type = 'text/rdf+n3')
+            full_graph_uri := DB.DBA.SPARQL_CRUD_BASE_TTL (res_file, graph_uri, 255);
+          else if (res_content_type = 'application/rdf+xml')
+            full_graph_uri := DB.DBA.SPARQL_CRUD_BASE_RDFXML (res_file, graph_uri);
+          else
+            signal ('22023', 'The graph URI <' || graph_uri || '> is relative and can not be resolved using the submitted resource of unsupported type ' || coalesce (res_content_type, ''));
+          if (full_graph_uri is null)
+            signal ('22023', 'The graph URI <' || graph_uri || '> is relative and can not be resolved using the submitted resource (resource does not contain any base)');
+        }
+      else
+        full_graph_uri := graph_uri;
+      commit work;
+      graph_exists := (sparql define input:storage "" ask where { graph `iri(?:full_graph_uri)` { ?s ?p ?o }});
+      if (res_content_type = 'text/rdf+n3')
+        {
+          if (reqbegin like 'PUT%')
+            {
+              sparql clear graph ?:full_graph_uri;
+              commit work;
+            }
+          DB.DBA.TTLP (res_file, full_graph_uri, full_graph_uri);
+        }
+      else if (res_content_type = 'application/rdf+xml')
+        {
+          if (reqbegin like 'PUT%')
+            {
+              sparql clear graph ?:full_graph_uri;
+              commit work;
+            }
+          DB.DBA.RDF_LOAD_RDFXML (res_file, full_graph_uri, full_graph_uri);
+        }
+      else
+        signal ('22023', 'The PUT request for graph <' || full_graph_uri || '> is rejected: the submitted resource is of unsupported type ' || coalesce (res_content_type, ''));
+      if (graph_exists is null)
+        http_request_status ('HTTP/1.1 201 Created');
+      else if (length (res_file) <= 2)
+        http_request_status ('HTTP/1.1 204 No Content');
+      return;
+    }
+  else if (reqbegin like 'DELETE%')
+    {
+      set_user_id (user_id, 1);
+      if (not (exists (sparql define input:storage "" select (1) where { graph `iri(?:graph_uri)` { ?s ?p ?o }})))
+        {
+          http_request_status ('HTTP/1.1 404 Not Found');
+          return;
+        }
+      sparql clear graph ?:graph_uri;
+      commit work;
+      return;
+    }
+  else if (reqbegin like 'GET%')
+    {
+      if (not (exists (sparql define input:storage "" select (1) where { graph `iri(?:graph_uri)` { ?s ?p ?o }})))
+        {
+          http_request_status ('HTTP/1.1 404 Not Found');
+          return;
+        }
+      connection_set ('SPARQL_crud_graph', graph_uri);
+      WS.WS."/!sparql/" (path,
+        vector_concat (
+          vector ('query', 'define input:storage "" construct { ?s ?p ?o } where { graph `iri(bif:connection_get("SPARQL_crud_graph"))` { ?s ?p ?o }}'),
+          params ), lines);
+      return;
+    }
+  else
+    {
+      http_request_status ('HTTP/1.1 501 Method Not Implemented');
+      return;
+    }
+}
+;
+
+registry_set ('/!sparql-graph-crud/', 'no_vsp_recompile')
+;
+
+
 create procedure DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS (in full_query varchar, in qry_params any, in maxrows integer, in accept varchar, in user_id varchar, in hard_timeout integer, in jsonp_callback any)
 {
   -- dbg_obj_princ ('DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS (', full_query, qry_params, maxrows, accept, user_id, hard_timeout, ')');
@@ -2854,12 +3622,22 @@ create procedure DB.DBA.SPARQL_ROUTE_DICT_CONTENT_DAV (
         DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (triples, 1, out_ses);
       else if (('text/rdf+n3' = mime) or ('text/rdf+ttl' = mime) or ('text/rdf+turtle' = mime) or ('text/turtle' = mime) or ('text/n3' = mime))
         DB.DBA.RDF_TRIPLES_TO_TTL (triples, out_ses);
+      else if ('application/x-trig' = mime)
+        DB.DBA.RDF_TRIPLES_TO_TRIG (triples, out_ses);
       else if ('text/plain' = mime)
         DB.DBA.RDF_TRIPLES_TO_NT (triples, out_ses);
       else if (('application/json' = mime) or ('application/rdf+json' = mime) or ('application/x-rdf+json' = mime))
         DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (triples, out_ses);
+      else if ('application/x-json+ld' = mime)
+        DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, out_ses);
+      else if ('application/ld+json' = mime)
+        DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, out_ses);
       else if ('application/xhtml+xml' = mime)
         DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML (triples, out_ses);
+      else if ('text/html' = mime)
+        DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (triples, out_ses);
+      else if ('application/microdata+json' = mime)
+        DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (triples, out_ses);
       rc := DB.DBA.DAV_RES_UPLOAD (split, out_ses, mime, old_perms, old_uid, old_gid, uid, pwd);
       if (isinteger (rc) and rc < 0)
         signal ('RDFXX', sprintf ('Unable to change "%.200s" in DAV: %s', split, DB.DBA.DAV_PERROR (rc)));
@@ -2920,6 +3698,7 @@ DB.DBA.http_rq_file_handler (in content any, in params any, in lines any, inout
       strcasestr (accept, 'text/rdf+ttl') is not null or
       strcasestr (accept, 'text/rdf+turtle') is not null or
       strcasestr (accept, 'text/turtle') is not null or
+      strcasestr (accept, 'application/x-trig') is not null or
       strcasestr (accept, 'application/rdf+xml') is not null or
       strcasestr (accept, 'application/javascript') is not null or
       strcasestr (accept, 'application/soap+xml') is not null or
@@ -2951,6 +3730,7 @@ create procedure DB.DBA.RDF_GRANT_SPARQL_IO ()
     'grant execute on DB.DBA.SPARQL_REXEC_TO_ARRAY to SPARQL_SELECT',
     'grant execute on DB.DBA.SPARQL_REXEC_WITH_META to SPARQL_SELECT',
     'grant execute on WS.WS."/!sparql/" to "SPARQL"',
+    'grant execute on WS.WS."/!sparql-graph-crud/" to "SPARQL"',
     'grant execute on DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS to "SPARQL"',
     'grant execute on DB.DBA.SPARQL_ROUTE_DICT_CONTENT_DAV to SPARQL_UPDATE',
     'grant execute on DB.DBA.SPARQL_SINV_IMP to SPARQL_SPONGE',
diff --git a/libsrc/Wi/sparql_l.c b/libsrc/Wi/sparql_l.c
index 9a79756..461d112 100644
--- a/libsrc/Wi/sparql_l.c
+++ b/libsrc/Wi/sparql_l.c
@@ -380,8 +380,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 227
-#define YY_END_OF_BUFFER 228
+#define YY_NUM_RULES 103
+#define YY_END_OF_BUFFER 104
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -389,105 +389,45 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[882] =
+static yyconst flex_int16_t yy_accept[335] =
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,  228,  227,  226,  218,
-      216,  216,    3,  181,  217,  226,  226,  180,  143,  144,
-       19,   15,    6,   13,    7,   18,  164,  151,   17,   12,
-        8,   10,  226,  226,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  147,  148,  226,  160,
-        2,   21,  145,  226,  146,  226,  186,  184,  184,  182,
-      188,  187,  185,  185,  183,  189,  174,  172,  172,  178,
-
-      176,  175,  173,  173,  179,  177,  223,  218,  216,  217,
-      190,  223,  225,  218,  216,  198,  217,  197,  194,  193,
-      224,  218,  216,  217,  224,  199,  199,  199,  209,  207,
-      202,  203,  206,  227,  200,  201,  222,  222,  222,  222,
-      215,  211,  211,  210,  227,  218,  216,   14,    0,    0,
-      167,  217,  216,  216,  154,    0,  158,    1,    0,  167,
-       20,   16,  165,  165,  164,    0,  150,    0,   11,  149,
-        9,  153,    0,  157,  159,    0,    0,  160,  151,  160,
-      160,   23,  160,  160,  160,  160,   31,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-
-      160,  160,  160,   57,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,   86,  160,  142,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,    5,
-        0,  160,    0,    4,    0,  186,    0,  184,    0,    0,
-      187,    0,  185,    0,    0,  174,    0,    0,  172,  172,
-      172,    0,    0,    0,  175,    0,    0,  173,  173,  173,
-        0,    0,    0,    0,    0,    0,  192,  199,  199,  209,
-      205,  219,  222,    0,  221,  220,  215,  211,  214,  213,
-      212,  212,  167,  167,  169,  216,  154,    0,    0,  156,
-
-      156,  168,  165,    0,  166,  150,    0,  153,    0,    0,
-      155,  155,    0,    0,    0,  161,  160,  141,   24,   25,
-       26,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,   56,  160,  160,
-      160,  160,   62,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,   75,   76,   77,  160,  160,   81,
-       82,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  111,
-      160,  114,  160,  160,  160,  160,  160,  160,  160,  160,
-
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      137,    0,  161,  152,    0,    0,    0,    0,    0,  170,
-        0,    0,    0,  171,    0,    0,    0,  196,  195,  208,
-      205,  204,  204,  214,  213,  212,  212,  212,    0,  156,
-        0,  156,  156,    0,  156,    0,  156,    0,  155,    0,
-      155,  155,    0,  155,    0,  155,  159,    0,  161,    0,
-      162,  161,  160,   27,  160,  160,  160,  160,  160,  160,
-      160,  160,   37,  160,  160,  160,  160,   43,  160,   46,
-      160,  160,  160,  160,   51,  160,  160,  160,  160,  160,
-      160,  160,  160,   61,  160,  160,  160,  160,  160,   68,
-
-       70,  160,  160,   73,   74,  160,  160,  160,    0,   84,
-      160,  160,  160,  160,  160,  160,  160,   94,  160,  160,
-      160,  160,  160,  160,  160,  160,  109,  160,  160,  160,
-      160,  160,  136,  160,  131,  160,  160,  160,  160,  160,
-      122,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  135,  162,  161,  152,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,  204,  204,    0,  156,  156,
-        0,  156,    0,    0,  155,  155,    0,  155,    0,    0,
-      162,    0,  162,   22,  160,  160,   30,   32,   33,  160,
-       35,  160,  160,  160,  160,  160,   42,  160,  160,  160,
-
-      160,   49,  160,  160,   53,   54,  160,  160,   58,  160,
-      160,  160,   64,  160,   66,   67,  160,   71,  160,   78,
-      160,   80,    0,  160,  160,  160,  160,   91,  160,  160,
-      160,   95,  160,  160,  160,   98,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  123,  124,  160,  125,  160,  160,  160,  133,  134,
-      139,    0,  162,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,  156,  156,    0,  155,  155,    0,  163,
-      160,  160,  160,   36,  160,  160,   40,   41,  160,  160,
-      160,   48,   50,  160,   55,  160,  160,   60,  160,  160,
-
-      160,  160,   79,    0,   85,  160,   88,   90,  160,   93,
-      160,  160,  160,  160,  160,  106,  160,  108,  140,  160,
-      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  129,  160,  163,    0,    0,    0,    0,
-        0,    0,  163,  163,  160,  160,  160,  160,   39,  160,
-      160,  160,  160,  160,  160,   63,  160,  160,   72,    0,
-       87,  160,  160,   96,   97,  160,  100,  160,  107,  110,
-      160,  113,  160,  160,  160,  160,  160,  160,  160,  160,
-      160,  160,  160,  132,  163,    0,    0,    0,    0,    0,
-      160,   28,  160,   38,   44,   45,  160,   52,  160,  160,
-
-      160,  160,   83,   89,  160,  105,  160,  160,  112,  160,
-      160,  160,  160,  160,  160,  120,  160,  160,  160,  160,
-        0,    0,    0,    0,  191,   29,   34,   47,  160,   59,
-       65,  160,   92,  101,  102,  103,  160,  160,  160,  160,
-      160,  160,  160,  160,  160,  160,  160,    0,    0,    0,
-        0,  138,  160,  160,  160,  160,  130,  160,  160,  118,
-      119,  121,  160,  127,  160,   69,  104,   99,  160,  160,
-      117,  126,  160,  115,  160,  160,  116,  160,  160,  128,
-        0
+        0,    0,    0,    0,    0,    0,  104,  103,  102,   94,
+       92,   92,    3,   57,   93,  102,  102,   56,   22,   23,
+       19,   15,    6,   13,    7,   18,   40,   30,   17,   12,
+        8,   10,  102,   36,   26,   27,  102,   36,    2,   21,
+       24,  102,   25,  102,   62,   60,   60,   58,   64,   63,
+       61,   61,   59,   65,   50,   48,   48,   54,   52,   51,
+       49,   49,   55,   53,   99,   94,   92,   93,   66,   99,
+      101,   94,   92,   74,   93,   73,   70,   69,  100,   94,
+
+       92,   93,  100,   75,   75,   75,   85,   83,   78,   79,
+       82,  103,   76,   77,   98,   98,   98,   98,   91,   87,
+       87,   86,  103,   94,   92,   14,    0,    0,   43,   93,
+       92,   92,   32,    0,   34,    1,    0,   43,   20,   16,
+       41,   41,   40,    0,   29,    0,   11,   28,    9,   35,
+        0,    0,   36,   30,    5,    0,   36,    0,    4,    0,
+       62,    0,   60,    0,    0,   63,    0,   61,    0,    0,
+       50,    0,    0,   48,   48,   48,    0,    0,    0,   51,
+        0,    0,   49,   49,   49,    0,    0,    0,    0,    0,
+        0,   68,   75,   75,   85,   81,   95,   98,    0,   97,
+
+       96,   91,   87,   90,   89,   88,   88,   43,   43,   45,
+       92,   32,    0,    0,   33,   33,   44,   41,    0,   42,
+       29,    0,    0,    0,    0,   37,    0,   37,   31,    0,
+        0,    0,    0,    0,   46,    0,    0,    0,   47,    0,
+        0,    0,   72,   71,   84,   81,   80,   80,   90,   89,
+       88,   88,   88,    0,   33,    0,   33,   33,    0,   33,
+        0,   33,   35,    0,   37,    0,   38,   37,   38,   37,
+       31,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   80,   80,    0,   33,   33,    0,   33,    0,    0,
+       38,    0,   38,    0,   38,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,    0,   33,   33,    0,   39,   39,
+        0,    0,    0,    0,    0,    0,   39,   39,   39,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   67,    0,
+        0,    0,    0,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -498,1116 +438,376 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    2,    5,    6,    7,    8,    9,   10,   11,   12,
        13,   14,   15,   16,   17,   18,   19,   20,   20,   20,
        20,   20,   20,   20,   20,   20,   20,   21,   22,   23,
-       24,   25,   26,   27,   28,   29,   30,   31,   32,   33,
-       34,   35,   36,   37,   38,   39,   40,   41,   42,   43,
-       44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
-       54,   55,   56,   57,   58,   59,   60,   61,   62,   63,
-
-       64,   65,   66,   67,   68,   69,   70,   71,   72,   73,
-       74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
-       84,   85,   86,   87,   88,    9,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,    9
+       24,   25,   26,   27,   28,   29,   30,   31,   32,   28,
+       33,   33,   34,   33,   33,   33,   33,   35,   33,   33,
+       33,   33,   36,   37,   38,   33,   33,   33,   39,   33,
+       40,   41,   42,   43,   44,   45,   46,   47,   48,   49,
+
+       50,   51,   52,   52,   53,   52,   52,   52,   52,   54,
+       52,   52,   52,   55,   56,   57,   58,   55,   52,   52,
+       59,   52,   60,   61,   62,    9,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,   63,   63,   63,   63,   63,   63,
+       63,   63,   63,   63,    9
     } ;
 
-static yyconst flex_int32_t yy_meta[90] =
+static yyconst flex_int32_t yy_meta[64] =
     {   0,
         1,    1,    2,    3,    4,    5,    4,    4,    4,    4,
         6,    7,    7,    4,    4,    4,    8,    9,   10,   11,
        12,    4,    1,    4,    4,   13,    4,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,    4,   15,    4,    1,   16,    1,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   17,    1,   17,   18
+       14,   14,   15,   15,   15,   15,   15,   16,   15,    4,
+       17,    4,    1,   18,    1,   19,   19,   14,   14,   14,
+       19,   15,   15,   16,   16,   15,   16,   16,   15,   20,
+        1,   20,   21
     } ;
 
-static yyconst flex_int16_t yy_base[992] =
+static yyconst flex_int16_t yy_base[459] =
     {   0,
-        0,    0,    0,    0,   87,   89,   91,   98,  102,  104,
-      106,  113,  118,  124,  160,  171,  131,  182,  187,  204,
-      137,  199,  216,  221,    0,    0,  944, 7544, 7544,  932,
-      927,  918,  890,  133,  120,  122,  902,  899, 7544, 7544,
-      883,  879, 7544, 7544,  881, 7544,  177,    0, 7544,  145,
-     7544,  872,  124,    0,  213,  227,  243,  291,  221,  290,
-      260,  312,  385,  232,  311,  324,  345,  394,  344,  417,
-      424,  486,  408,  463,  307,  472, 7544, 7544,  837,   78,
-     7544,  478, 7544,  798, 7544,   93,  828,  877,  875, 7544,
-      514,  818,  866,  862, 7544,  552,   92,  860,  860,  225,
-
-      575,  146,  857,  852,  293,  586, 7544,  851,  848,  176,
-     7544,  158, 7544,  847,  843,  836,  262,  829, 7544, 7544,
-     7544,  799,  796,  264,  153,    0,  794,  794,    0, 7544,
-     7544, 7544,  779,  755, 7544, 7544,  754, 7544,  221,  753,
-        0,  762,  762,  749,  303,  757, 7544, 7544,  208,  752,
-      170,  341,  752,  353,    0,  662, 7544, 7544,  744,  743,
-     7544, 7544,  314,  368,  459,  283,  735,  726,  696, 7544,
-     7544,    0,  742, 7544,  702,  111,  525,  365,    0,  581,
-      484,  588,  811,  598,  813,  818,  443,  820,  826,  839,
-      841,  872,  851,  874,  905,  915,  921,  934,  941,  947,
-
-      668,  953,  960,  966,  984, 1057,  998, 1020, 1044, 1089,
-     1062, 1067, 1096, 1030, 1094, 1103, 1126, 1105, 1132, 1140,
-     1148, 1170, 1179, 1184, 1172, 1199, 1201, 1214, 1232, 1246,
-      858, 1234, 1274, 1334, 1279, 1248, 1293, 1311, 1321, 7544,
-      252,  700,    0, 7544,  373,  661, 1366, 7544, 1404, 1420,
-      633, 1448, 7544, 1486, 1502,  388,  396, 1530, 7544,  678,
-      676, 1021, 1568, 1584,  309,  335, 1612, 7544,  674,  672,
-      443, 1650, 1666,  205,  668,  662, 7544,    0,    0,  666,
-      406, 7544,  657,  655, 7544, 7544,    0, 7544,    0,    0,
-      660,  659,  643, 7544, 7544,  653,    0,  647,  227, 1714,
-
-     1779, 7544,  462,  629,  625,  625,  624,    0,  633,  408,
-     1815, 1880,    0,  632,  744,  663, 1327, 1334, 1366, 1368,
-     1401, 1456, 1480, 1562, 1535, 1644, 1917, 1919, 1553, 1925,
-     1930, 1939, 1620, 1636, 1951, 1945, 1961, 1966, 1999, 2005,
-     1953, 1454, 2031, 2026, 1977, 2042, 2050, 1618, 2055, 2063,
-     2068, 2086, 1684, 2091, 2081, 2100, 2117, 2124, 2129, 2155,
-     2161, 2167, 2173, 2175, 1785, 2138, 2193, 2199, 2191, 2204,
-     2228, 2230, 2236, 2257, 2216, 2274, 2290, 2281, 2242, 2292,
-     2309, 2311, 2316, 2330, 2347, 2356, 2324, 2365, 2390, 2374,
-     2397, 2404, 2412, 2423, 2431, 2439, 2429, 2456, 2444, 2470,
-
-     2490, 2498, 2479, 2519, 2525, 2531, 2533, 2544, 2553, 2559,
-     2565,  631,  609,  606, 2607, 2627, 2633, 2653,  567, 7544,
-     2679, 2699,  566, 7544, 2705, 2725,  373, 7544, 7544, 7544,
-      483,  616,  504,    0,    0,    0,    0,    0,  605,  583,
-      584,  568,    0,  579,  566,  562, 2773,  576,  537,  533,
-      517,    0,  524,  511,  500, 2809,  494,  494,  474,  469,
-     2585, 2611, 2703, 2658, 2846, 2848, 2854, 2856, 2861, 2872,
-     2874, 2879, 2886, 2892, 2906, 2894, 2911, 2939, 2931, 2684,
-     2953, 2968, 2970, 2975, 2779, 2988, 2996, 3001, 3008, 3019,
-     3033, 3035, 3044, 3006, 3051, 3057, 3070, 3082, 3084, 3089,
-
-     3065, 3109, 3117, 3124, 3146, 3151, 3158, 3164,  538, 3166,
-     3172, 3182, 3187, 3194, 3200, 3207, 3220, 3231, 3242, 3249,
-     3263, 3269, 3261, 3277, 3285, 3294, 3296, 3316, 3301, 3324,
-     3338, 3347, 3326, 3354, 3359, 3371, 3376, 3386, 3402, 3423,
-     3391, 3434, 3440, 3408, 3429, 3450, 3413, 3461, 3469, 3477,
-     3482, 3498,  452,  439,  406,  404, 3531, 3545, 3552, 3569,
-     3591, 3607, 3629, 3645,  442, 7544,  413,  398, 7544,    0,
-      371,    0,  268,  363, 7544,    0,  325,    0,  547,  307,
-      275,  907, 3514, 3536, 3664, 3625, 3627, 3662, 3678, 3683,
-     3700, 3702, 3709, 3715, 3720, 3738, 3727, 3729, 3758, 3760,
-
-     3790, 3796, 3803, 3805, 3811, 3816, 3822, 3833, 3840, 3842,
-     3849, 3854, 3860, 3866, 3872, 3886, 3891, 3896, 3916, 3903,
-     3918, 3924,  458, 3935, 3942, 3947, 3956, 3929, 3970, 3972,
-     3978, 3991, 3999, 4017, 4026, 4004, 4035, 4047, 4052, 4057,
-     4066, 4073, 4086, 4101, 4108, 4117, 4122, 4140, 4146, 4132,
-     4152, 4164, 4174, 4184, 4182, 4199, 4206, 4213, 4215, 4221,
-     4230,  250,  204, 4236, 4283, 4297, 4303, 4321, 4359, 4373,
-     4379,  516,  190, 7544,    0,  159, 7544,    0,  152, 4266,
-     4288, 4379, 4377, 4357, 4409, 4411, 4397, 4430, 4432, 4442,
-     4452, 4457, 4459, 4464, 4474, 4484, 4491, 4493, 4505, 4507,
-
-     4512, 4518, 4533,  522, 4544, 4550, 4569, 4581, 4587, 4593,
-     4599, 4606, 4608, 4614, 4625, 4619, 4627, 4633, 4648, 4654,
-     4656, 4662, 4683, 4689, 4694, 4702, 4712, 4721, 4729, 4710,
-     4672, 4742, 4748, 4753, 4767,    0, 4783, 4821, 4835, 4841,
-      542,  148, 7544, 4788, 4818, 4841, 4858, 4891, 4804, 4893,
-     4911, 4873, 4900, 4916, 4921, 4927, 4932, 4946, 4948,  536,
-     4953, 4960, 4976, 4970, 4985, 4994, 4996, 5007, 5001, 5009,
-     5015, 5023, 5030, 5035, 5051, 5059, 5061, 5070, 5090, 5096,
-     5105, 5125, 5134, 5110,    0, 5141, 5180, 5187, 5201,  531,
-     5218, 5165, 5239, 5207, 5250, 5252, 5257, 5259, 5266, 5276,
-
-     5264, 5284, 7544, 5292, 5294, 5299, 5326, 5339, 5306, 5345,
-     5357, 5359, 5316, 5368, 5391, 5373, 5404, 5419, 5424, 5426,
-     5466, 5489, 5504, 5527, 7544, 5449, 5456, 5484, 5553, 5489,
-     5522, 5562, 5564, 5578, 5580, 5585, 5587, 5592, 5597, 5603,
-     5614, 5616, 5623, 5629, 5647, 5676, 5631, 5694, 5709, 5715,
-     5761, 5641, 5765, 5743, 5780, 5745, 5778, 5787, 5789, 5795,
-     5797, 5818, 5820, 5827, 5829, 5834, 5840, 5847, 5853, 5862,
-     5864, 5871, 5878, 5885, 5887, 5893, 5904, 5910, 5920, 5926,
-     7544, 6015, 6033, 6051, 6069, 6087, 6105, 6123, 6141, 6159,
-     6177, 6195, 6213, 6231, 6239, 6255, 6263, 6278, 6286,  104,
-
-     6295, 6305, 6314, 6332, 6350, 6368, 6386, 6404, 6422, 6440,
-     6458, 6476, 6494, 6512, 6520, 6538, 6549, 6564, 6572,  459,
-     6586, 6597, 6605, 6619, 6627, 6633, 6651, 6669, 6687, 6705,
-     6723, 6741, 6759, 6777, 6795, 6813, 6831, 6849, 6867, 6875,
-     6893, 6907, 6916, 6924, 6942, 6956,  566, 6972, 6986, 6997,
-     7008, 7022, 7030, 7039, 7057, 7075, 7093, 7111, 7129, 7147,
-     7165, 7183, 7201, 7209, 7221, 7229, 7245, 7263, 7271, 7283,
-     7291, 7300, 7314, 7332, 7343, 7354, 7365, 7375, 7383, 7392,
-     7410, 7418, 7430, 7446, 7454, 7466, 7478, 7492, 7508, 7519,
-     7527
-
+        0,    0,    0,    0,   61,   63,   65,   72,   76,   78,
+       80,   87,   93,  108,  123,  134,  145,  151,  196,  256,
+       95,  104,  140,  156,    0,    0, 1019, 1955, 1955, 1016,
+     1013, 1008,  983,   88,  128,  135,  996,  994, 1955, 1955,
+      979,  977, 1955, 1955,  981, 1955,  145,    0, 1955,  144,
+     1955,  955,    0,  154, 1955, 1955,  935,   52, 1955,  161,
+     1955,  914, 1955,   67,  930,  966,  966, 1955,  112,  927,
+      962,  962, 1955,  126,   92,  939,  939,  182,  138,  160,
+      935,  932,  184,  153, 1955,  932,  930,  200, 1955,  176,
+     1955,  930,  927,  923,  202,  898, 1955, 1955, 1955,  905,
+
+      903,  215,  173,    0,  899,  896,    0, 1955, 1955, 1955,
+      881,  883, 1955, 1955,  882, 1955,  202,  880,    0,  889,
+      871,  860,  223,  868, 1955, 1955,  216,  861,  222,  227,
+      860,  230,    0,  313, 1955, 1955,  849,  846, 1955, 1955,
+      215,  216,  221,  229,  834,  823,  820, 1955, 1955,  825,
+      224,  237,  259,    0, 1955,  232,  243,    0, 1955,  260,
+      798,  214, 1955,    0,    0,  794,  225, 1955,    0,    0,
+      263,  268,  232, 1955,  828,  825,  282,    0,    0,  276,
+      283,  249, 1955,  803,  801,  288,    0,    0,  252,  795,
+      786, 1955,    0,    0,  790,  292, 1955,  776,  761, 1955,
+
+     1955,    0, 1955,    0,    0,  767,  736,  706, 1955, 1955,
+      486,    0,  483,  231,  355,  394, 1955,  278,  468,  467,
+      468,  467,    0,  474,  295,  314,  472,  455,  454,    0,
+        0,    0,    0,  427, 1955,    0,    0,  415, 1955,    0,
+        0,  268, 1955, 1955, 1955,  299,  451,  317,    0,    0,
+      445,  439,  437,  415,  401,  412,  378,    0,  389,    0,
+      360,    0,  363,  373,  360,  368,  319,  379,  337,  336,
+      335,  321,    0,    0,    0,    0,    0,    0,    0,    0,
+      277, 1955,  323,  293, 1955,    0,  291,    0,   95,  278,
+      196,  428,  399,  183,  155,    0,    0,    0,    0,    0,
+
+        0,    0,    0,  279,  156, 1955,    0,  116,  418,    0,
+        0,    0,    0,    0,  308,   71, 1955,  420,    0,    0,
+        0,    0,    0,  269,    0,    0,    0,    0, 1955,    0,
+        0,    0,    0, 1955,  491,  512,  533,  554,  575,  596,
+      617,  638,  659,  680,  701,  722,  743,  754,  773,  784,
+      802,  810,  822,  835,  847,  868,  885,  904,  921,  940,
+      957,  976,  993, 1012, 1033, 1054, 1075, 1096, 1117, 1128,
+     1142, 1159, 1176, 1185,  433,  439,  440,  446, 1206, 1223,
+      450,  452, 1242, 1259,  456,  463, 1278, 1299, 1320, 1341,
+     1362, 1383, 1404, 1425, 1446, 1457, 1478, 1495, 1507, 1518,
+
+     1537, 1554, 1568, 1585, 1596, 1608,  465,  808,  881,  917,
+     1629,  953,  989, 1650, 1165, 1219, 1671, 1682, 1697, 1716,
+     1730, 1743, 1255, 1493, 1516, 1574, 1583, 1695, 1736, 1749,
+     1768, 1779, 1794, 1809, 1826, 1815, 1824, 1835, 1836, 1837,
+     1846, 1847, 1848, 1867, 1881, 1892, 1890, 1901, 1902, 1903,
+     1912, 1913, 1914, 1923, 1924, 1925, 1934, 1935
     } ;
 
-static yyconst flex_int16_t yy_def[992] =
+static yyconst flex_int16_t yy_def[459] =
     {   0,
-      882,  882,  881,    3,  883,  883,  884,  884,  885,  885,
-      886,  886,  887,  887,  888,  888,  889,  889,  890,  890,
-      891,  891,  892,  892,  882,  882,  881,  881,  881,  881,
-      881,  881,  881,  893,  894,  895,  881,  896,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  897,  881,  898,
-      881,  881,  899,  900,  901,  901,  901,  901,  901,   58,
-      901,  901,  901,  901,   56,   56,   56,  901,  901,  901,
-      901,   56,   58,  901,  901,  901,  881,  881,  881,  902,
-      881,  901,  881,  881,  881,  903,  904,  881,  881,  881,
-      881,  905,  881,  881,  881,  881,  906,  881,  881,  906,
-
-      881,  907,  881,  881,  907,  881,  881,  881,  881,  894,
-      881,  881,  881,  881,  881,  881,  894,  881,  881,  881,
-      881,  881,  881,  894,  881,  908,  908,  908,  909,  881,
-      881,  881,  881,  881,  881,  881,  910,  881,  910,  881,
-      911,  881,  881,  881,  912,  881,  881,  881,  913,  914,
-      881,  894,  881,  894,  915,  881,  881,  881,  916,  881,
-      881,  881,  881,  881,  881,  881,  917,  918,  918,  881,
-      881,  919,  881,  881,  920,  903,  921,  922,  923,  922,
-      922,  922,  922,  922,  922,  922,  922,  922,  922,  922,
-      922,  922,  922,  922,  922,  922,  922,  922,  922,  922,
-
-      922,  922,  922,  922,  922,  922,  922,  922,  922,  922,
-      922,  922,  922,  922,  922,  922,  922,  922,  922,  922,
-      922,  922,  922,  922,  922,  922,  922,  922,  922,  922,
-      922,  922,  922,  204,  922,  922,  922,  922,  922,  881,
-      924,  925,  926,  881,  903,  927,  881,  881,  881,  881,
-      928,  881,  881,  881,  881,  929,  929,  881,  881,  881,
-      881,  929,  881,  881,  930,  930,  881,  881,  881,  881,
-      930,  881,  881,  881,  881,  881,  881,  931,  931,  932,
-      933,  881,  934,  934,  881,  881,  935,  881,  936,  937,
-      938,  939,  881,  881,  881,  881,  940,  941,  942,  881,
-
-      300,  881,  881,  881,  881,  943,  943,  944,  945,  946,
-      881,  311,  947,  948,  949,  950,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-
-      951,  951,  951,  951,  951,  951,  951,  951,  951,  951,
-      951,  952,  953,  954,  881,  881,  881,  881,  955,  881,
-      881,  881,  956,  881,  881,  881,  881,  881,  881,  881,
-      957,  881,  957,  958,  959,  960,  960,  961,  962,  881,
-      963,  881,  964,  965,  966,  881,  966,  967,  881,  968,
-      881,  969,  970,  971,  881,  971,  972,  973,  881,  974,
-      975,  976,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-
-      977,  977,  977,  977,  977,  977,  977,  977,  881,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  978,  979,  980,  980,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  963,  881,  964,
-      981,  982,  983,  968,  881,  969,  984,  985,  986,  974,
-      881,  987,  975,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  881,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  988,  978,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  981,  881,  982,  984,  881,  985,  989,  990,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-
-      977,  977,  977,  881,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  991,  881,  881,  881,  881,
-      881,  989,  881,  990,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  881,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  991,  881,  881,  881,  881,  881,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-
-      977,  977,  881,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      881,  881,  881,  881,  881,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  881,  881,  881,
-      881,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-      977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
-        0,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881
-
+      335,  335,  334,    3,  336,  336,  337,  337,  338,  338,
+      339,  339,  340,  340,  341,  341,  342,  342,  343,  343,
+      344,  344,  345,  345,  335,  335,  334,  334,  334,  334,
+      334,  334,  334,  346,  347,  348,  334,  349,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  350,  334,  351,
+      334,  334,  352,  353,  334,  334,  334,  354,  334,  353,
+      334,  334,  334,  355,  356,  334,  334,  334,  357,  358,
+      334,  334,  334,  359,  360,  334,  334,  360,  361,  362,
+      334,  334,  362,  363,  334,  334,  334,  347,  334,  334,
+      334,  334,  334,  334,  347,  334,  334,  334,  334,  334,
+
+      334,  347,  334,  364,  364,  364,  365,  334,  334,  334,
+      334,  334,  334,  334,  366,  334,  366,  334,  367,  334,
+      334,  334,  368,  334,  334,  334,  346,  369,  334,  347,
+      334,  347,  370,  334,  334,  334,  349,  334,  334,  334,
+      334,  334,  334,  334,  371,  351,  351,  334,  334,  352,
+      355,  372,  353,  350,  334,  373,  354,  374,  334,  355,
+      356,  357,  334,  375,  376,  358,  359,  334,  377,  378,
+      379,  379,  380,  334,  334,  334,  379,  381,  382,  383,
+      383,  384,  334,  334,  334,  383,  385,  386,  334,  334,
+      334,  334,  387,  387,  388,  389,  334,  390,  390,  334,
+
+      334,  391,  334,  392,  393,  394,  395,  334,  334,  334,
+      334,  396,  397,  398,  334,  215,  334,  334,  334,  334,
+      399,  399,  400,  401,  402,  403,  404,  405,  406,  407,
+      408,  409,  410,  411,  334,  412,  413,  414,  334,  415,
+      416,  334,  334,  334,  334,  389,  334,  389,  392,  393,
+      394,  394,  395,  397,  334,  417,  334,  418,  419,  216,
+      334,  215,  400,  401,  334,  420,  421,  403,  422,  405,
+      406,  406,  423,  424,  425,  426,  427,  428,  429,  430,
+      334,  334,  334,  417,  334,  418,  431,  432,  433,  420,
+      334,  434,  421,  435,  422,  436,  437,  438,  439,  440,
+
+      441,  442,  443,  334,  431,  334,  432,  444,  445,  446,
+      447,  448,  449,  450,  334,  444,  334,  445,  446,  451,
+      452,  453,  454,  334,  455,  456,  457,  458,  334,  437,
+      439,  441,  443,    0,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334
     } ;
 
-static yyconst flex_int16_t yy_nxt[7634] =
+static yyconst flex_int16_t yy_nxt[2019] =
     {   0,
        29,   30,   31,   32,   33,   34,   35,   36,   29,   37,
        38,   39,   40,   41,   42,   43,   44,   45,   46,   47,
-       48,   49,   50,   51,   52,   53,   54,   55,   56,   57,
-       58,   59,   60,   61,   62,   63,   64,   64,   65,   66,
-       67,   68,   69,   70,   71,   72,   73,   74,   64,   75,
-       76,   64,   64,   77,   29,   78,   79,   80,   81,   82,
-       56,   57,   58,   59,   60,   61,   62,   63,   64,   64,
-       65,   66,   67,   68,   69,   70,   71,   72,   73,   74,
-       64,   75,   76,   64,   64,   83,   84,   85,   86,   88,
-       89,   88,   89,   93,   94,  241,   95,   90,  243,   90,
-
-       93,   94,  257,   95,   98,   99,   98,   99,  103,  104,
-      245,  105,  100,  179,  100,  103,  104,  175,  105,  108,
-       31,  109,  153,  154,  110,  108,   31,  109,  245,  111,
-      110,  179,  122,   31,  123,  111,  150,  124,  151,   28,
-      138,   91,  156,   91,  173,   96,  258,  157,  112,  174,
-      139,  266,   96,  743,  112,  140,  101,  743,  101,  125,
-      106,  114,   31,  115,  677,  116,  117,  106,  169,  170,
-      118,  119,  114,   31,  115,  295,  116,  117,  153,  154,
-      112,  118,  119,  122,   31,  123,  112,  241,  124,  127,
-      128,  125,  129,  274,  164,  674,  165,  130,  131,  132,
-
-      267,   28,  138,  133,  277,  134,  127,  128,  166,  129,
-      125,  150,  139,  293,  130,  131,  132,  140,  142,  143,
-      133,  662,  134,  142,  143,  274,  144,  260,  261,  176,
-      177,  144,  441,  179,  881,  262,  277,  176,  177,  285,
-      166,  179,  125,  176,  177,  120,  442,  179,  176,  177,
-      427,  180,  179,  181,  184,  679,  120,  314,  182,  176,
-      177,  183,  185,  179,  153,  154,  153,  154,  186,  412,
-      145,  195,  135,  298,  136,  145,  176,  177,  187,  258,
-      179,  188,  427,  180,  189,  181,  184,  190,  299,  135,
-      182,  136,  662,  183,  185,  269,  270,  304,  271,  304,
-
-      186,  176,  305,  195,  200,  291,  292,  176,  177,  176,
-      187,  179,  581,  188,  266,  176,  189,  196,  191,  190,
-      176,  178,  192,  176,  177,  197,  193,  179,  176,  177,
-      677,  176,  179,  163,  198,  194,  200,  199,  207,  201,
-      423,  237,  238,  153,  154,  166,  208,  267,  176,  196,
-      191,  210,  209,  178,  192,  296,  154,  197,  193,  211,
-      176,  177,  178,  267,  179,  212,  198,  194,  575,  199,
-      207,  201,  213,  237,  238,  178,  674,  166,  208,  176,
-      214,  176,  177,  210,  209,  179,  215,  303,  221,  267,
-      245,  211,  216,  881,  178,  176,  178,  212,  257,  166,
-
-      176,  176,  177,  569,  213,  179,  419,  178,  432,  433,
-      176,  177,  214,  450,  179,  202,  566,  203,  215,  565,
-      221,  556,  217,  556,  216,  204,  218,  451,  178,  205,
-      206,  166,  176,  176,  177,  231,  219,  179,  220,  232,
-      176,  177,  258,  178,  179,  269,  270,  202,  424,  203,
-      258,  565,  233,  176,  217,  223,  412,  204,  218,  176,
-      177,  205,  206,  179,  222,  234,  175,  231,  219,  662,
-      220,  232,  175,  176,  581,  178,  164,  672,  165,  176,
-      177,  303,  176,  179,  233,  432,  433,  223,  176,  177,
-      166,  412,  179,  166,  176,  177,  222,  267,  179,  459,
-
-      176,  177,  704,  235,  179,  176,  567,  433,  236,  672,
-      313,  239,  176,  224,  318,  225,  180,  226,  181,  246,
-      579,  227,  166,  182,  246,  166,  183,  228,  453,  577,
-      314,  176,  229,  230,  704,  235,  451,  178,  575,  509,
-      236,  176,  315,  239,  176,  224,  318,  225,  180,  226,
-      181,  176,  309,  227,  453,  182,  741,  251,  183,  228,
-      176,  249,  251,  760,  229,  230,  176,  310,  246,  178,
-      623,  790,  176,  246,  246,  803,  457,  825,  246,  457,
-      256,  449,  573,  444,  571,  256,  246,  442,  741,  569,
-      246,  265,  246,  250,  246,  760,  265,  176,  177,  254,
-
-      444,  179,  623,  790,  176,  177,  251,  803,  179,  825,
-      440,  251,  251,  176,  176,  177,  251,  319,  179,  566,
-      267,  258,  263,  556,  251,  320,  412,  317,  251,  256,
-      251,  255,  251,  272,  256,  256,  460,  459,  449,  256,
-      265,  307,  307,  322,  305,  265,  265,  256,  305,  319,
-      265,  256,  440,  256,  264,  256,  147,  320,  265,  317,
-      241,  437,  265,  437,  265,  273,  265,  298,  881,  176,
-      284,  430,  429,  428,  268,  322,  176,  268,  259,  176,
-      315,  259,  299,  179,  176,  177,  176,  252,  179,  300,
-      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
-
-      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
-      300,  300,  300,  300,  300,  247,  346,  241,  313,  301,
-      170,  301,  301,  301,  301,  301,  301,  301,  301,  301,
-      301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
-      301,  301,  301,  301,  301,  301,  301,  309,  346,  460,
-      170,  176,  307,  302,  294,  147,  176,  294,  146,  289,
-      176,  245,  310,  176,  288,  288,  286,  284,  282,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  281,  279,  279,  147,  312,
-
-      146,  312,  312,  312,  312,  312,  312,  312,  312,  312,
-      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
-      312,  312,  312,  312,  312,  312,  312,  176,  177,  176,
-      177,  179,  176,  179,  176,  177,  176,  177,  179,  276,
-      179,  275,  176,  177,  321,  147,  179,  326,  146,  323,
-      147,  327,  146,  324,  268,  176,  177,  176,  177,  179,
-      268,  179,  259,  259,  253,  325,  328,  176,  177,  253,
-      330,  179,  252,  329,  176,  177,  321,  248,  179,  326,
-      248,  323,  247,  327,  244,  324,  393,  331,  176,  177,
-      176,  177,  179,  240,  179,  171,  336,  325,  328,  176,
-
-      163,  176,  330,  162,  332,  329,  176,  161,  176,  160,
-      333,  158,  679,  148,  176,  337,  334,  335,  393,  331,
-      147,  176,  177,  176,  245,  179,  176,  176,  336,  176,
-      147,  176,  177,  146,  338,  179,  332,  176,  177,  176,
-      339,  179,  333,  881,  881,  881,  176,  337,  334,  335,
-      176,  177,  881,  340,  179,  881,  881,  176,  177,  341,
-      176,  179,  176,  176,  177,  881,  338,  179,  881,  176,
-      177,  881,  339,  179,  344,  342,  176,  177,  881,  881,
-      179,  343,  176,  177,  347,  340,  179,  881,  345,  881,
-      881,  341,  881,  176,  881,  176,  349,  881,  350,  881,
-
-      176,  177,  348,  176,  179,  881,  344,  342,  881,  176,
-      881,  351,  352,  343,  176,  177,  347,  881,  179,  353,
-      345,  881,  176,  260,  261,  881,  881,  881,  349,  176,
-      350,  420,  881,  881,  348,  176,  176,  177,  359,  881,
-      179,  176,  881,  351,  352,  881,  176,  177,  176,  881,
-      179,  353,  881,  881,  176,  881,  881,  360,  881,  361,
-      176,  177,  881,  881,  179,  881,  362,  881,  370,  881,
-      359,  363,  176,  176,  177,  258,  881,  179,  176,  177,
-      881,  881,  179,  176,  177,  354,  176,  179,  881,  360,
-      881,  361,  355,  881,  881,  356,  881,  368,  362,  881,
-
-      370,  357,  367,  363,  358,  176,  177,  881,  176,  179,
-      176,  177,  176,  177,  179,  881,  179,  354,  176,  176,
-      177,  176,  177,  179,  355,  179,  364,  356,  881,  368,
-      881,  365,  176,  357,  367,  369,  358,  374,  881,  366,
-      371,  372,  176,  177,  881,  176,  179,  881,  176,  177,
-      176,  881,  179,  881,  881,  176,  176,  177,  364,  881,
-      179,  881,  373,  365,  176,  177,  881,  369,  179,  374,
-      376,  366,  371,  372,  881,  881,  881,  176,  375,  377,
-      881,  881,  176,  881,  176,  881,  176,  177,  176,  177,
-      179,  176,  179,  176,  373,  176,  177,  378,  881,  179,
-
-      176,  177,  376,  881,  179,  881,  881,  881,  881,  379,
-      375,  377,  380,  383,  176,  176,  177,  176,  177,  179,
-      176,  179,  881,  382,  881,  381,  881,  881,  176,  378,
-      176,  177,  881,  881,  179,  881,  176,  384,  881,  386,
-      881,  379,  881,  385,  380,  383,  387,  881,  176,  177,
-      176,  177,  179,  881,  179,  382,  881,  381,  176,  881,
-      176,  388,  176,  177,  176,  177,  179,  176,  179,  384,
-      881,  386,  176,  389,  391,  385,  390,  881,  387,  881,
-      881,  881,  881,  408,  394,  392,  881,  176,  881,  176,
-      176,  177,  881,  388,  179,  176,  177,  881,  881,  179,
-
-      881,  395,  176,  881,  881,  389,  391,  406,  390,  176,
-      177,  881,  881,  179,  407,  408,  394,  392,  881,  881,
-      176,  396,  176,  881,  409,  881,  881,  176,  177,  881,
-      881,  179,  881,  395,  176,  881,  176,  176,  177,  406,
-      881,  179,  881,  176,  177,  881,  407,  179,  881,  881,
-      176,  177,  881,  396,  179,  881,  409,  410,  463,  411,
-      881,  881,  176,  397,  398,  399,  400,  176,  881,  401,
-      881,  246,  881,  402,  403,  404,  246,  881,  881,  405,
-      178,  176,  176,  177,  176,  177,  179,  881,  179,  410,
-      463,  411,  881,  881,  881,  397,  398,  399,  400,  176,
-
-      881,  401,  881,  881,  881,  402,  403,  404,  881,  176,
-      881,  405,  178,  249,  881,  176,  881,  176,  177,  881,
-      246,  179,  176,  415,  881,  246,  246,  881,  881,  881,
-      246,  415,  415,  415,  415,  415,  415,  881,  246,  416,
-      881,  881,  246,  881,  246,  250,  246,  416,  416,  416,
-      416,  416,  416,  251,  176,  881,  176,  881,  251,  881,
-      881,  881,  881,  415,  415,  415,  415,  415,  415,  881,
-      176,  177,  176,  177,  179,  881,  179,  881,  881,  416,
-      416,  416,  416,  416,  416,  881,  881,  464,  881,  176,
-      881,  881,  881,  485,  881,  254,  176,  177,  881,  881,
-
-      179,  881,  251,  881,  881,  417,  881,  251,  251,  881,
-      881,  465,  251,  417,  417,  417,  417,  417,  417,  464,
-      251,  418,  881,  881,  251,  485,  251,  255,  251,  418,
-      418,  418,  418,  418,  418,  256,  881,  881,  881,  881,
-      256,  881,  176,  465,  176,  417,  417,  417,  417,  417,
-      417,  176,  177,  881,  881,  179,  881,  881,  881,  881,
-      881,  418,  418,  418,  418,  418,  418,  881,  176,  176,
-      177,  881,  881,  179,  881,  467,  881,  263,  176,  177,
-      881,  881,  179,  881,  256,  881,  881,  421,  881,  256,
-      256,  881,  466,  471,  256,  421,  421,  421,  421,  421,
-
-      421,  881,  256,  422,  881,  881,  256,  467,  256,  264,
-      256,  422,  422,  422,  422,  422,  422,  265,  881,  881,
-      881,  881,  265,  176,  466,  471,  881,  421,  421,  421,
-      421,  421,  421,  881,  176,  177,  176,  177,  179,  881,
-      179,  176,  881,  422,  422,  422,  422,  422,  422,  881,
-      176,  476,  176,  177,  881,  881,  179,  881,  881,  272,
-      176,  177,  881,  881,  179,  881,  265,  477,  881,  425,
-      881,  265,  265,  881,  881,  881,  265,  425,  425,  425,
-      425,  425,  425,  476,  265,  426,  881,  881,  265,  468,
-      265,  273,  265,  426,  426,  426,  426,  426,  426,  477,
-
-      176,  177,  881,  881,  179,  881,  176,  881,  176,  425,
-      425,  425,  425,  425,  425,  881,  881,  881,  881,  881,
-      881,  468,  881,  881,  176,  426,  426,  426,  426,  426,
-      426,  444,  176,  445,  446,  881,  881,  881,  881,  881,
-      881,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  881,  881,  881,
-      881,  445,  176,  445,  445,  445,  445,  445,  445,  445,
-      445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
-      445,  445,  445,  445,  445,  445,  445,  445,  445,  881,
-
-      881,  176,  177,  881,  881,  179,  445,  445,  445,  445,
-      445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
-      445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
-      445,  445,  453,  881,  454,  455,  881,  881,  881,  881,
-      881,  881,  456,  456,  456,  456,  456,  456,  456,  456,
-      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
-      456,  456,  456,  456,  456,  456,  456,  456,  881,  881,
-      881,  881,  454,  176,  454,  454,  454,  454,  454,  454,
-      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,
-      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,
-
-      881,  881,  881,  881,  881,  881,  881,  454,  454,  454,
-      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,
-      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,
-      454,  454,  454,  176,  177,  176,  177,  179,  881,  179,
-      881,  176,  177,  881,  469,  179,  176,  177,  881,  881,
-      179,  881,  472,  881,  881,  176,  177,  473,  881,  179,
-      881,  176,  177,  881,  470,  179,  474,  176,  177,  176,
-      177,  179,  881,  179,  475,  881,  469,  176,  177,  881,
-      478,  179,  176,  177,  472,  881,  179,  881,  881,  473,
-      881,  479,  881,  176,  177,  881,  470,  179,  474,  484,
-
-      881,  881,  881,  480,  481,  176,  475,  176,  881,  881,
-      881,  881,  478,  176,  881,  176,  177,  881,  176,  179,
-      881,  176,  177,  479,  488,  179,  881,  176,  881,  881,
-      881,  484,  881,  176,  881,  480,  481,  881,  881,  176,
-      881,  176,  176,  177,  482,  881,  179,  176,  177,  176,
-      483,  179,  881,  881,  176,  881,  488,  881,  176,  177,
-      486,  881,  179,  881,  881,  176,  176,  177,  487,  881,
-      179,  176,  177,  881,  881,  179,  482,  489,  881,  176,
-      177,  881,  483,  179,  176,  177,  491,  176,  179,  881,
-      490,  881,  486,  176,  492,  881,  881,  176,  177,  493,
-
-      487,  179,  176,  177,  881,  881,  179,  176,  177,  489,
-      881,  179,  881,  881,  176,  881,  176,  177,  491,  176,
-      179,  881,  490,  881,  881,  496,  492,  494,  881,  495,
-      176,  493,  881,  176,  177,  497,  881,  179,  176,  881,
-      176,  177,  881,  176,  179,  176,  177,  881,  498,  179,
-      881,  176,  881,  881,  176,  177,  176,  496,  179,  494,
-      881,  495,  500,  881,  881,  881,  881,  497,  499,  176,
-      881,  176,  177,  881,  176,  179,  881,  176,  177,  176,
-      498,  179,  881,  176,  177,  881,  501,  179,  176,  176,
-      177,  176,  177,  179,  500,  179,  502,  881,  503,  881,
-
-      499,  881,  881,  504,  881,  176,  505,  176,  177,  176,
-      177,  179,  176,  179,  881,  176,  177,  176,  501,  179,
-      176,  177,  508,  881,  179,  881,  176,  881,  502,  509,
-      503,  881,  176,  177,  507,  504,  179,  881,  505,  881,
-      506,  881,  881,  176,  176,  177,  176,  177,  179,  176,
-      179,  514,  176,  177,  508,  176,  179,  881,  176,  177,
-      881,  176,  179,  176,  881,  881,  507,  511,  510,  881,
-      881,  881,  506,  176,  177,  881,  881,  179,  881,  176,
-      881,  176,  881,  514,  881,  512,  881,  176,  881,  519,
-      176,  177,  176,  881,  179,  881,  881,  176,  177,  511,
-
-      510,  179,  513,  881,  176,  515,  176,  177,  176,  177,
-      179,  518,  179,  881,  881,  881,  176,  512,  176,  881,
-      516,  519,  517,  520,  176,  176,  177,  176,  177,  179,
-      176,  179,  176,  177,  513,  881,  179,  515,  881,  881,
-      176,  177,  522,  518,  179,  176,  176,  177,  881,  881,
-      179,  881,  516,  881,  517,  520,  521,  881,  881,  881,
-      523,  524,  176,  176,  177,  881,  881,  179,  881,  176,
-      527,  881,  176,  177,  522,  881,  179,  881,  176,  881,
-      176,  176,  177,  881,  881,  179,  881,  526,  521,  881,
-      176,  177,  523,  524,  179,  525,  881,  176,  881,  176,
-
-      881,  881,  527,  881,  176,  881,  176,  177,  881,  528,
-      179,  881,  176,  176,  177,  881,  881,  179,  176,  526,
-      176,  177,  881,  881,  179,  881,  530,  525,  176,  177,
-      881,  881,  179,  531,  529,  176,  881,  881,  881,  176,
-      177,  528,  881,  179,  176,  176,  177,  176,  177,  179,
-      532,  179,  881,  176,  881,  176,  177,  881,  530,  179,
-      176,  177,  176,  881,  179,  531,  529,  881,  881,  533,
-      535,  534,  176,  177,  881,  881,  179,  881,  176,  881,
-      536,  881,  532,  881,  538,  176,  176,  177,  881,  881,
-      179,  537,  176,  881,  539,  176,  177,  881,  881,  179,
-
-      176,  533,  535,  534,  881,  540,  176,  177,  881,  881,
-      179,  176,  536,  881,  176,  177,  538,  176,  179,  176,
-      544,  881,  881,  537,  881,  542,  539,  176,  881,  881,
-      541,  881,  176,  543,  881,  176,  177,  540,  881,  179,
-      881,  176,  177,  881,  176,  179,  881,  176,  177,  176,
-      177,  179,  544,  179,  881,  881,  881,  542,  176,  546,
-      176,  177,  541,  881,  179,  543,  545,  176,  881,  176,
-      177,  547,  548,  179,  549,  176,  177,  881,  176,  179,
-      881,  176,  177,  881,  550,  179,  176,  881,  881,  881,
-      881,  546,  881,  552,  881,  881,  881,  551,  545,  881,
-
-      881,  176,  582,  547,  548,  179,  549,  176,  881,  881,
-      881,  881,  881,  176,  881,  881,  550,  881,  881,  176,
-      881,  176,  881,  881,  881,  552,  557,  176,  315,  551,
-      881,  179,  176,  881,  557,  557,  557,  557,  557,  557,
-      881,  176,  881,  881,  881,  881,  558,  176,  881,  881,
-      881,  881,  559,  176,  558,  558,  558,  558,  558,  558,
-      559,  559,  559,  559,  559,  559,  557,  557,  557,  557,
-      557,  557,  560,  176,  176,  177,  881,  881,  179,  881,
-      560,  560,  560,  560,  560,  560,  558,  558,  558,  558,
-      558,  558,  559,  559,  559,  559,  559,  559,  561,  176,
-
-      176,  177,  881,  881,  179,  881,  561,  561,  561,  561,
-      561,  561,  560,  560,  560,  560,  560,  560,  562,  176,
-      177,  881,  881,  179,  563,  881,  562,  562,  562,  562,
-      562,  562,  563,  563,  563,  563,  563,  563,  561,  561,
-      561,  561,  561,  561,  564,  881,  176,  584,  881,  881,
-      881,  881,  564,  564,  564,  564,  564,  564,  562,  562,
-      562,  562,  562,  562,  563,  563,  563,  563,  563,  563,
-      881,  881,  176,  881,  881,  881,  881,  881,  881,  584,
-      881,  881,  881,  881,  564,  564,  564,  564,  564,  564,
-      444,  176,  881,  446,  881,  176,  177,  881,  881,  179,
-
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  453,  881,  881,  455,
-      881,  881,  881,  881,  881,  881,  456,  456,  456,  456,
-      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
-      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
-      456,  456,  176,  177,  176,  177,  179,  176,  179,  881,
-      176,  177,  176,  177,  179,  585,  179,  176,  177,  881,
-      881,  179,  881,  586,  587,  881,  881,  881,  176,  177,
-      176,  177,  179,  881,  179,  176,  177,  881,  881,  179,
-
-      881,  588,  176,  177,  881,  589,  179,  585,  176,  177,
-      176,  177,  179,  881,  179,  586,  587,  881,  590,  881,
-      591,  881,  176,  177,  881,  592,  179,  176,  177,  881,
-      881,  179,  593,  588,  176,  881,  176,  589,  881,  594,
-      596,  881,  176,  597,  176,  881,  595,  176,  177,  176,
-      590,  179,  591,  881,  881,  176,  177,  592,  881,  179,
-      176,  881,  176,  881,  593,  881,  599,  176,  881,  176,
-      177,  594,  596,  179,  176,  597,  881,  881,  595,  881,
-      176,  881,  176,  598,  176,  177,  176,  177,  179,  881,
-      179,  176,  177,  881,  176,  179,  881,  881,  599,  176,
-
-      600,  602,  881,  881,  176,  177,  603,  881,  179,  881,
-      881,  881,  176,  177,  601,  598,  179,  176,  177,  176,
-      881,  179,  176,  177,  176,  177,  179,  176,  179,  881,
-      605,  881,  600,  602,  604,  176,  177,  881,  603,  179,
-      881,  176,  881,  606,  881,  881,  601,  881,  607,  176,
-      177,  176,  177,  179,  881,  179,  176,  881,  176,  881,
-      176,  177,  605,  176,  179,  608,  604,  176,  177,  881,
-      881,  179,  881,  176,  177,  606,  176,  179,  612,  610,
-      607,  176,  177,  609,  176,  179,  176,  177,  611,  176,
-      179,  881,  613,  881,  176,  881,  176,  608,  176,  177,
-
-      176,  177,  179,  881,  179,  176,  177,  176,  881,  179,
-      612,  610,  881,  881,  615,  609,  614,  881,  881,  616,
-      611,  176,  881,  176,  613,  176,  177,  881,  617,  179,
-      881,  881,  176,  176,  177,  881,  881,  179,  881,  176,
-      176,  177,  881,  881,  179,  176,  615,  881,  614,  881,
-      881,  616,  881,  176,  881,  618,  881,  881,  176,  881,
-      617,  619,  176,  177,  881,  881,  179,  176,  177,  881,
-      176,  179,  176,  881,  176,  177,  881,  176,  179,  881,
-      176,  177,  176,  177,  179,  881,  179,  618,  176,  177,
-      621,  881,  179,  619,  622,  881,  620,  176,  176,  177,
-
-      881,  624,  179,  176,  177,  176,  881,  179,  881,  625,
-      176,  177,  176,  881,  179,  881,  176,  177,  626,  881,
-      179,  881,  621,  176,  177,  881,  622,  179,  620,  881,
-      881,  881,  881,  624,  176,  627,  176,  177,  881,  176,
-      179,  625,  629,  881,  628,  881,  176,  176,  177,  881,
-      626,  179,  176,  881,  176,  630,  881,  881,  176,  177,
-      176,  881,  179,  881,  881,  176,  177,  627,  881,  179,
-      176,  631,  881,  881,  629,  176,  628,  176,  177,  176,
-      177,  179,  176,  179,  881,  176,  177,  630,  176,  179,
-      881,  881,  636,  176,  177,  176,  881,  179,  881,  632,
-
-      881,  176,  177,  631,  881,  179,  637,  633,  176,  881,
-      176,  177,  176,  177,  179,  634,  179,  176,  177,  176,
-      638,  179,  881,  881,  636,  881,  635,  881,  641,  881,
-      176,  632,  176,  177,  639,  881,  179,  176,  637,  633,
-      176,  177,  176,  177,  179,  640,  179,  634,  881,  176,
-      881,  176,  638,  881,  176,  177,  881,  176,  179,  881,
-      641,  881,  642,  176,  177,  176,  639,  179,  881,  643,
-      176,  177,  881,  176,  179,  176,  177,  640,  644,  179,
-      881,  881,  176,  881,  176,  881,  881,  176,  177,  176,
-      881,  179,  176,  177,  642,  881,  179,  881,  881,  645,
-
-      646,  643,  176,  177,  176,  881,  179,  176,  177,  881,
-      644,  179,  176,  881,  176,  881,  649,  881,  176,  177,
-      647,  648,  179,  881,  176,  177,  176,  881,  179,  176,
-      177,  645,  646,  179,  881,  176,  881,  650,  881,  176,
-      177,  881,  176,  179,  657,  176,  177,  176,  649,  179,
-      176,  177,  647,  648,  179,  881,  176,  177,  881,  176,
-      179,  881,  881,  651,  176,  654,  176,  177,  881,  650,
-      179,  881,  881,  881,  176,  655,  657,  176,  177,  176,
-      653,  179,  881,  881,  652,  176,  177,  881,  881,  179,
-      176,  656,  881,  176,  177,  651,  176,  179,  176,  177,
-
-      881,  176,  179,  881,  881,  881,  881,  655,  658,  659,
-      660,  176,  653,  661,  176,  177,  652,  176,  179,  881,
-      881,  881,  176,  656,  881,  881,  881,  881,  176,  881,
-      176,  582,  881,  881,  179,  881,  881,  881,  176,  881,
-      658,  659,  660,  881,  881,  661,  881,  881,  881,  176,
-      664,  881,  176,  177,  881,  881,  179,  176,  664,  664,
-      664,  664,  664,  664,  665,  176,  881,  881,  881,  881,
-      176,  666,  665,  665,  665,  665,  665,  665,  881,  666,
-      666,  666,  666,  666,  666,  881,  176,  881,  667,  881,
-      664,  664,  664,  664,  664,  664,  667,  667,  667,  667,
-
-      667,  667,  176,  881,  665,  665,  665,  665,  665,  665,
-      668,  666,  666,  666,  666,  666,  666,  881,  668,  668,
-      668,  668,  668,  668,  176,  881,  669,  881,  667,  667,
-      667,  667,  667,  667,  669,  669,  669,  669,  669,  669,
-      881,  176,  177,  176,  177,  179,  881,  179,  670,  881,
-      668,  668,  668,  668,  668,  668,  670,  670,  670,  670,
-      670,  670,  881,  881,  671,  682,  669,  669,  669,  669,
-      669,  669,  671,  671,  671,  671,  671,  671,  176,  177,
-      176,  177,  179,  881,  179,  881,  881,  881,  670,  670,
-      670,  670,  670,  670,  176,  177,  881,  682,  179,  176,
-
-      177,  881,  881,  179,  671,  671,  671,  671,  671,  671,
-      681,  881,  881,  176,  881,  176,  176,  177,  176,  177,
-      179,  881,  179,  881,  881,  176,  177,  683,  881,  179,
-      881,  176,  177,  684,  881,  179,  176,  177,  881,  881,
-      179,  881,  681,  176,  177,  176,  177,  179,  881,  179,
-      176,  687,  176,  686,  176,  177,  881,  881,  179,  683,
-      685,  881,  881,  881,  689,  684,  176,  881,  881,  688,
-      881,  176,  881,  881,  176,  177,  176,  177,  179,  881,
-      179,  881,  881,  687,  881,  686,  881,  881,  176,  881,
-      176,  881,  685,  881,  881,  881,  689,  176,  690,  881,
-
-      881,  688,  881,  176,  881,  691,  176,  177,  176,  881,
-      179,  881,  176,  177,  881,  176,  179,  176,  881,  176,
-      177,  176,  177,  179,  881,  179,  176,  176,  177,  881,
-      690,  179,  176,  177,  881,  692,  179,  691,  176,  177,
-      694,  881,  179,  881,  881,  881,  176,  693,  176,  176,
-      177,  881,  881,  179,  881,  695,  176,  177,  176,  177,
-      179,  881,  179,  881,  881,  176,  177,  692,  696,  179,
-      176,  177,  694,  697,  179,  881,  176,  177,  176,  693,
-      179,  881,  176,  177,  176,  881,  179,  695,  176,  177,
-      881,  176,  179,  176,  699,  698,  881,  700,  881,  176,
-
-      696,  881,  176,  177,  176,  697,  179,  176,  177,  881,
-      176,  179,  176,  177,  881,  881,  179,  881,  701,  176,
-      177,  176,  881,  179,  881,  881,  699,  698,  176,  700,
-      176,  881,  176,  177,  176,  177,  179,  176,  179,  881,
-      176,  177,  176,  702,  179,  176,  177,  881,  176,  179,
-      701,  176,  177,  881,  176,  179,  881,  881,  176,  177,
-      176,  881,  179,  176,  177,  881,  881,  179,  881,  703,
-      881,  881,  176,  177,  176,  702,  179,  881,  881,  176,
-      881,  705,  706,  881,  176,  881,  176,  177,  176,  177,
-      179,  176,  179,  707,  176,  177,  708,  881,  179,  709,
-
-      881,  703,  881,  881,  176,  881,  176,  176,  177,  711,
-      881,  179,  176,  705,  706,  176,  177,  176,  881,  179,
-      176,  177,  710,  176,  179,  707,  881,  881,  708,  881,
-      176,  709,  881,  176,  177,  176,  881,  179,  881,  712,
-      881,  711,  176,  177,  176,  881,  179,  881,  713,  881,
-      881,  176,  177,  714,  710,  179,  881,  881,  176,  881,
-      176,  715,  881,  176,  177,  881,  176,  179,  176,  177,
-      881,  712,  179,  176,  177,  881,  717,  179,  881,  176,
-      713,  716,  176,  177,  881,  714,  179,  176,  719,  176,
-      177,  881,  176,  179,  881,  881,  881,  881,  718,  720,
-
-      721,  881,  176,  177,  881,  176,  179,  881,  717,  881,
-      881,  881,  881,  716,  176,  722,  881,  176,  177,  881,
-      719,  179,  881,  176,  176,  177,  881,  881,  179,  881,
-      718,  720,  721,  176,  177,  176,  881,  179,  176,  177,
-      176,  881,  179,  724,  881,  176,  881,  722,  176,  177,
-      881,  881,  179,  726,  176,  725,  176,  177,  723,  881,
-      179,  176,  176,  177,  881,  881,  179,  881,  176,  177,
-      881,  881,  179,  881,  176,  724,  881,  729,  881,  730,
-      176,  177,  881,  881,  179,  726,  727,  725,  881,  176,
-      176,  177,  881,  881,  179,  881,  176,  881,  176,  177,
-
-      176,  177,  179,  728,  179,  176,  881,  881,  881,  729,
-      176,  730,  881,  731,  881,  176,  177,  881,  727,  179,
-      176,  881,  176,  177,  881,  732,  179,  881,  176,  176,
-      177,  176,  177,  179,  176,  179,  881,  176,  177,  881,
-      176,  179,  881,  733,  881,  731,  176,  177,  734,  881,
-      179,  881,  176,  735,  881,  737,  881,  732,  881,  881,
-      881,  881,  176,  737,  737,  737,  737,  737,  737,  881,
-      176,  881,  176,  881,  881,  733,  881,  881,  881,  881,
-      734,  881,  176,  245,  881,  735,  179,  176,  881,  881,
-      881,  881,  881,  881,  176,  737,  737,  737,  737,  737,
-
-      737,  176,  246,  176,  176,  177,  881,  881,  179,  176,
-      246,  246,  246,  246,  246,  246,  738,  881,  176,  881,
-      881,  881,  251,  745,  738,  738,  738,  738,  738,  738,
-      251,  251,  251,  251,  251,  251,  881,  881,  881,  881,
-      739,  881,  246,  246,  246,  246,  246,  246,  739,  739,
-      739,  739,  739,  739,  176,  745,  738,  738,  738,  738,
-      738,  738,  251,  251,  251,  251,  251,  251,  881,  881,
-      881,  881,  881,  176,  177,  881,  176,  179,  256,  881,
-      739,  739,  739,  739,  739,  739,  256,  256,  256,  256,
-      256,  256,  740,  176,  177,  176,  177,  179,  265,  179,
-
-      740,  740,  740,  740,  740,  740,  265,  265,  265,  265,
-      265,  265,  746,  176,  177,  881,  881,  179,  256,  256,
-      256,  256,  256,  256,  747,  176,  177,  176,  177,  179,
-      881,  179,  740,  740,  740,  740,  740,  740,  265,  265,
-      265,  265,  265,  265,  746,  176,  176,  177,  176,  177,
-      179,  748,  179,  881,  881,  881,  747,  749,  176,  177,
-      750,  881,  179,  881,  881,  176,  881,  176,  176,  177,
-      881,  751,  179,  176,  177,  176,  177,  179,  881,  179,
-      176,  177,  881,  748,  179,  176,  881,  752,  881,  749,
-      176,  177,  750,  881,  179,  881,  881,  176,  881,  176,
-
-      176,  177,  881,  751,  179,  753,  881,  176,  177,  176,
-      177,  179,  881,  179,  881,  881,  754,  881,  176,  752,
-      176,  176,  177,  176,  177,  179,  881,  179,  176,  177,
-      176,  755,  179,  881,  176,  177,  881,  753,  179,  881,
-      176,  881,  756,  881,  881,  176,  881,  176,  754,  176,
-      177,  757,  176,  179,  881,  881,  759,  881,  758,  881,
-      176,  177,  176,  755,  179,  881,  176,  177,  881,  881,
-      179,  881,  176,  881,  756,  881,  881,  881,  881,  176,
-      761,  176,  881,  757,  881,  176,  177,  881,  759,  179,
-      758,  881,  881,  176,  881,  176,  881,  176,  177,  881,
-
-      176,  179,  881,  176,  177,  881,  176,  179,  762,  176,
-      177,  881,  761,  179,  763,  176,  177,  881,  881,  179,
-      881,  176,  176,  177,  176,  177,  179,  881,  179,  764,
-      176,  177,  176,  881,  179,  176,  177,  881,  176,  179,
-      762,  176,  177,  176,  177,  179,  763,  179,  881,  176,
-      177,  765,  766,  179,  881,  881,  881,  176,  769,  767,
-      881,  764,  881,  768,  176,  177,  881,  881,  179,  176,
-      176,  177,  176,  177,  179,  176,  179,  881,  176,  177,
-      881,  176,  179,  765,  766,  770,  881,  176,  176,  177,
-      769,  767,  179,  881,  176,  768,  176,  881,  881,  176,
-
-      177,  771,  176,  179,  881,  176,  177,  176,  772,  179,
-      176,  177,  881,  176,  179,  176,  881,  770,  176,  177,
-      881,  176,  179,  781,  773,  775,  176,  177,  176,  177,
-      179,  776,  179,  771,  881,  774,  176,  176,  177,  881,
-      772,  179,  176,  881,  176,  176,  177,  777,  780,  179,
-      176,  881,  881,  778,  881,  781,  773,  775,  176,  177,
-      176,  881,  179,  776,  176,  177,  881,  774,  179,  176,
-      177,  176,  881,  179,  881,  779,  881,  176,  881,  777,
-      780,  881,  176,  176,  177,  778,  782,  179,  881,  881,
-      176,  881,  881,  881,  783,  881,  881,  784,  176,  881,
-
-      176,  881,  786,  881,  176,  245,  881,  779,  179,  176,
-      786,  786,  786,  786,  786,  786,  881,  176,  782,  881,
-      176,  177,  881,  881,  179,  881,  783,  881,  881,  784,
-      176,  881,  881,  881,  176,  177,  176,  881,  179,  881,
-      787,  176,  786,  786,  786,  786,  786,  786,  787,  787,
-      787,  787,  787,  787,  788,  176,  881,  176,  177,  791,
-      789,  179,  788,  788,  788,  788,  788,  788,  789,  789,
-      789,  789,  789,  789,  176,  177,  176,  881,  179,  881,
-      787,  787,  787,  787,  787,  787,  792,  793,  881,  176,
-      177,  791,  176,  179,  788,  788,  788,  788,  788,  788,
-
-      789,  789,  789,  789,  789,  789,  176,  176,  177,  176,
-      177,  179,  881,  179,  881,  881,  176,  177,  792,  793,
-      179,  797,  794,  881,  795,  881,  881,  176,  177,  176,
-      881,  179,  176,  177,  881,  881,  179,  176,  177,  881,
-      798,  179,  881,  176,  177,  881,  176,  179,  176,  177,
-      800,  799,  179,  797,  794,  881,  795,  796,  881,  801,
-      881,  176,  176,  177,  176,  177,  179,  881,  179,  176,
-      177,  881,  798,  179,  881,  802,  176,  177,  881,  176,
-      179,  176,  800,  799,  881,  881,  176,  177,  176,  796,
-      179,  801,  176,  177,  881,  881,  179,  881,  804,  176,
-
-      881,  176,  177,  881,  176,  179,  881,  802,  881,  176,
-      176,  177,  176,  177,  179,  176,  179,  176,  177,  881,
-      176,  179,  805,  176,  177,  176,  177,  179,  881,  179,
-      804,  176,  177,  806,  176,  179,  176,  881,  881,  176,
-      177,  176,  808,  179,  881,  881,  176,  177,  176,  881,
-      179,  176,  177,  807,  805,  179,  881,  881,  176,  881,
-      809,  881,  881,  881,  176,  806,  881,  176,  177,  881,
-      811,  179,  810,  176,  808,  176,  177,  176,  177,  179,
-      881,  179,  176,  881,  176,  881,  176,  177,  881,  176,
-      179,  881,  809,  881,  881,  176,  812,  176,  881,  881,
-
-      881,  814,  811,  176,  810,  813,  176,  177,  815,  881,
-      179,  176,  176,  177,  881,  881,  179,  881,  176,  881,
-      881,  176,  177,  176,  881,  179,  176,  177,  812,  881,
-      179,  881,  881,  814,  818,  816,  881,  813,  881,  176,
-      815,  176,  177,  881,  881,  179,  881,  176,  881,  176,
-      176,  177,  881,  817,  179,  819,  881,  881,  176,  881,
-      821,  881,  881,  881,  881,  820,  818,  816,  821,  821,
-      821,  821,  821,  821,  881,  881,  881,  881,  176,  881,
-      881,  176,  177,  881,  176,  179,  881,  819,  881,  881,
-      881,  881,  881,  176,  881,  881,  881,  820,  176,  822,
-
-      821,  821,  821,  821,  821,  821,  823,  822,  822,  822,
-      822,  822,  822,  176,  823,  823,  823,  823,  823,  823,
-      824,  881,  176,  176,  177,  881,  881,  179,  824,  824,
-      824,  824,  824,  824,  176,  177,  881,  881,  179,  822,
-      822,  822,  822,  822,  822,  881,  823,  823,  823,  823,
-      823,  823,  881,  176,  881,  176,  177,  881,  826,  179,
-      824,  824,  824,  824,  824,  824,  176,  177,  176,  177,
-      179,  881,  179,  176,  177,  176,  177,  179,  881,  179,
-      176,  177,  176,  177,  179,  827,  179,  881,  828,  881,
-      826,  881,  176,  177,  881,  176,  179,  829,  881,  881,
-
-      176,  177,  831,  881,  179,  881,  176,  830,  176,  177,
-      176,  177,  179,  881,  179,  176,  177,  827,  832,  179,
-      828,  881,  176,  177,  881,  833,  179,  176,  881,  829,
-      881,  881,  176,  177,  831,  881,  179,  881,  176,  830,
-      176,  881,  176,  177,  881,  176,  179,  176,  881,  881,
-      832,  841,  176,  881,  176,  176,  177,  833,  881,  179,
-      881,  176,  177,  881,  176,  179,  881,  834,  835,  881,
-      881,  836,  176,  176,  177,  176,  177,  179,  837,  179,
-      176,  881,  176,  841,  176,  177,  881,  176,  179,  176,
-      177,  838,  881,  179,  176,  881,  881,  842,  881,  834,
-
-      835,  881,  881,  836,  176,  839,  881,  176,  177,  881,
-      837,  179,  881,  881,  176,  881,  840,  881,  843,  881,
-      176,  177,  881,  838,  179,  881,  881,  176,  881,  842,
-      881,  844,  881,  176,  881,  176,  177,  839,  881,  179,
-      176,  177,  176,  177,  179,  176,  179,  176,  881,  881,
-      843,  881,  881,  881,  881,  846,  176,  845,  881,  881,
-      881,  176,  881,  844,  881,  176,  177,  881,  881,  179,
-      881,  847,  176,  177,  881,  881,  179,  881,  881,  176,
-      881,  881,  881,  881,  881,  848,  881,  846,  881,  845,
-      881,  881,  176,  848,  848,  848,  848,  848,  848,  881,
-
-      176,  177,  881,  847,  179,  176,  177,  176,  849,  179,
-      881,  881,  176,  881,  176,  881,  849,  849,  849,  849,
-      849,  849,  881,  850,  881,  848,  848,  848,  848,  848,
-      848,  850,  850,  850,  850,  850,  850,  176,  176,  177,
-      881,  881,  179,  881,  176,  881,  851,  881,  849,  849,
-      849,  849,  849,  849,  851,  851,  851,  851,  851,  851,
-      881,  881,  881,  850,  850,  850,  850,  850,  850,  176,
-      177,  881,  176,  179,  881,  881,  881,  176,  176,  177,
-      176,  177,  179,  852,  179,  881,  851,  851,  851,  851,
-      851,  851,  881,  853,  176,  177,  176,  177,  179,  881,
-
-      179,  176,  177,  176,  177,  179,  881,  179,  176,  177,
-      176,  881,  179,  176,  177,  852,  881,  179,  881,  176,
-      177,  881,  855,  179,  881,  853,  881,  856,  857,  881,
-      176,  177,  176,  177,  179,  881,  179,  881,  881,  176,
-      177,  176,  854,  179,  858,  176,  177,  176,  177,  179,
-      176,  179,  176,  881,  855,  859,  861,  176,  177,  856,
-      857,  179,  860,  176,  177,  881,  176,  179,  176,  881,
-      881,  881,  881,  176,  862,  176,  858,  865,  863,  881,
-      176,  881,  881,  881,  881,  176,  881,  859,  861,  881,
-      881,  176,  176,  177,  860,  881,  179,  881,  881,  881,
-
-      881,  881,  176,  881,  176,  881,  862,  881,  881,  865,
-      863,  176,  881,  246,  881,  881,  881,  176,  881,  176,
-      864,  246,  246,  246,  246,  246,  246,  881,  251,  176,
-      881,  881,  881,  881,  256,  176,  251,  251,  251,  251,
-      251,  251,  256,  256,  256,  256,  256,  256,  881,  881,
-      881,  881,  864,  246,  246,  246,  246,  246,  246,  176,
-      177,  176,  177,  179,  176,  179,  881,  881,  251,  251,
-      251,  251,  251,  251,  256,  256,  256,  256,  256,  256,
-      265,  176,  177,  881,  867,  179,  869,  881,  265,  265,
-      265,  265,  265,  265,  176,  177,  176,  177,  179,  881,
-
-      179,  881,  881,  176,  177,  176,  177,  179,  881,  179,
-      866,  176,  177,  176,  177,  179,  867,  179,  869,  881,
-      265,  265,  265,  265,  265,  265,  868,  870,  881,  871,
-      881,  176,  881,  176,  176,  177,  176,  177,  179,  881,
-      179,  881,  866,  176,  177,  176,  177,  179,  881,  179,
-      176,  177,  881,  176,  179,  881,  176,  177,  868,  870,
-      179,  871,  881,  176,  177,  872,  176,  179,  176,  176,
-      177,  881,  881,  179,  881,  176,  881,  176,  176,  177,
-      176,  177,  179,  176,  179,  176,  873,  176,  177,  881,
-      881,  179,  881,  874,  176,  177,  881,  872,  179,  881,
-
-      875,  176,  177,  176,  177,  179,  176,  179,  176,  176,
-      177,  881,  881,  179,  881,  176,  881,  176,  881,  876,
-      176,  177,  176,  881,  179,  874,  176,  177,  176,  881,
-      179,  881,  875,  878,  881,  176,  176,  177,  877,  881,
-      179,  176,  176,  177,  881,  881,  179,  881,  879,  881,
-      176,  876,  176,  881,  881,  881,  881,  881,  881,  176,
-      881,  881,  881,  881,  881,  878,  176,  881,  881,  881,
-      877,  880,  881,  176,  881,  176,  881,  881,  881,  881,
-      879,  176,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  176,  881,  881,  881,  881,  881,  176,  881,
-
-      881,  881,  881,  880,  881,  881,  881,  881,  176,  881,
-      881,  881,  881,  881,  176,   28,   28,   28,   28,   28,
+       48,   49,   50,   51,   52,   36,   53,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   55,
+       29,   56,   57,   58,   59,   60,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   61,
+       62,   63,   64,   66,   67,   66,   67,   71,   72,  156,
+       73,   68,  158,   68,   71,   72,  317,   73,   76,   77,
+       76,   77,   81,   82,  160,   83,   78,  154,   78,   81,
+       82,  128,   83,  129,   86,   31,   87,   28,  116,   88,
+
+      213,   69,  172,   69,   89,   74,   28,  116,  117,   86,
+       31,   87,   74,  118,   88,  214,   79,  117,   79,   89,
+       84,  317,  118,   90,   92,   31,   93,   84,   94,   95,
+      131,  132,  173,   96,   97,   92,   31,   93,   90,   94,
+       95,   90,  120,  121,   96,   97,  100,   31,  101,  164,
+      122,  102,  100,   31,  101,  134,   90,  102,  120,  121,
+      135,  306,  142,  169,  143,  181,  122,  147,  148,  165,
+      151,  152,  294,  103,  154,  178,  144,  151,  152,  103,
+      123,  154,   98,  170,  175,  176,  184,  185,  308,  186,
+      187,  103,  177,   98,  144,  179,  123,  103,  105,  106,
+
+      182,  107,  131,  132,  131,  132,  108,  109,  110,  189,
+      188,  192,  111,  294,  112,  334,  151,  131,  132,  128,
+      200,  208,  173,  151,  182,  206,  207,  210,  189,  131,
+      132,  192,  211,  132,  141,  218,  256,  224,  142,  156,
+      143,  160,  224,  219,  154,  219,  144,  144,  220,  227,
+      257,  164,  144,  151,  225,  113,  151,  114,  105,  106,
+      156,  107,  169,  334,  144,  144,  108,  109,  110,  178,
+      144,  165,  111,  172,  112,  151,  152,  160,  234,  154,
+      334,  181,  170,  291,  175,  176,  187,  242,  238,  179,
+      184,  185,  235,  239,  247,  248,  306,  218,  285,  151,
+
+      266,  247,  248,  173,  281,  329,  188,  242,  173,  144,
+      304,  151,  160,  315,  151,  113,  182,  114,  213,  283,
+      248,  151,  173,  182,  281,  329,  282,  144,  182,  304,
+      151,  225,  315,  214,  154,  151,  292,  324,  272,  154,
+      215,  215,  215,  215,  215,  215,  215,  215,  215,  215,
+      215,  215,  272,  227,  294,  324,  216,  151,  216,  216,
+      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  259,  291,  260,  261,  151,  227,  265,  223,
+      289,  151,  262,  262,  262,  262,  262,  262,  262,  262,
+      262,  262,  262,  262,  287,  151,  225,  257,  260,  154,
+
+      260,  260,  260,  260,  260,  260,  260,  260,  260,  260,
+      260,  260,  260,  260,  334,  151,  292,  285,  259,  154,
+      255,  260,  260,  260,  260,  260,  260,  260,  260,  260,
+      260,  260,  260,  308,  151,  160,  151,  160,  154,  334,
+      154,  151,  334,  230,  151,  160,  230,  151,  334,  231,
+      232,  230,  231,  232,  282,  182,  233,  231,  232,  233,
+      236,  151,  237,  236,  233,  237,  240,  173,  236,  240,
+      237,  272,  227,  241,  240,  273,  241,  266,  273,  265,
+      151,  241,  151,  273,  222,  222,  220,  220,  255,  125,
+      151,   28,   28,   28,   28,   28,   28,   28,   28,   28,
+
        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
-       28,   28,   28,   87,   87,   87,   87,   87,   87,   87,
-       87,   87,   87,   87,   87,   87,   87,   87,   87,   87,
-       87,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-       92,   92,   92,   92,   92,   92,   92,   92,   92,   97,
-       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
-       97,   97,   97,   97,   97,   97,   97,  102,  102,  102,
-      102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
-
-      102,  102,  102,  102,  102,  107,  107,  107,  107,  107,
-      107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
-      107,  107,  107,  113,  113,  113,  113,  113,  113,  113,
-      113,  113,  113,  113,  113,  113,  113,  113,  113,  113,
-      113,  121,  121,  121,  121,  121,  121,  121,  121,  121,
-      121,  121,  121,  121,  121,  121,  121,  121,  121,  126,
-      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
-      126,  126,  126,  126,  126,  126,  126,  137,  137,  137,
-      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
-      137,  137,  137,  137,  137,  141,  141,  141,  141,  141,
-
-      141,  141,  141,  141,  141,  141,  141,  141,  141,  141,
-      141,  141,  141,  149,  881,  149,  149,  149,  149,  149,
-      149,  149,  149,  149,  149,  149,  149,  881,  149,  149,
-      149,  152,  152,  152,  152,  152,  152,  152,  152,  152,
-      152,  152,  152,  152,  152,  152,  152,  152,  152,  155,
-      155,  155,  155,  881,  155,  159,  881,  159,  159,  159,
-      159,  159,  159,  159,  159,  159,  159,  159,  159,  881,
-      159,  159,  159,  167,  881,  881,  167,  881,  167,  881,
-      167,  168,  881,  168,  168,  168,  168,  168,  168,  168,
-      168,  168,  881,  168,  881,  168,  172,  172,  172,  172,
-
-      881,  172,  178,  178,  881,  178,  178,  881,  178,  881,
-      178,  881,  178,  242,  881,  242,  242,  881,  242,  881,
-      242,  176,  176,  881,  176,  176,  881,  176,  881,  176,
-      881,  176,  246,  881,  881,  246,  246,  881,  246,  246,
+       28,   28,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
+       65,   65,   65,   70,   70,   70,   70,   70,   70,   70,
+       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
+       70,   70,   70,   70,   75,   75,   75,   75,   75,   75,
+       75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
+       75,   75,   75,   75,   75,   80,   80,   80,   80,   80,
+       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
+       80,   80,   80,   80,   80,   80,   85,   85,   85,   85,
+
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   99,   99,
+       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
+       99,   99,   99,   99,   99,   99,   99,   99,   99,  104,
+      104,  104,  104,  104,  104,  104,  104,  104,  104,  104,
+      104,  104,  104,  104,  104,  104,  104,  104,  104,  104,
+      115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
+      115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
+
+      115,  119,  119,  119,  119,  119,  119,  119,  119,  119,
+      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
+      119,  119,  127,  156,  127,  127,  127,  127,  127,  127,
+      127,  127,  127,  127,  127,  127,  127,  127,  252,  127,
+      127,  127,  127,  130,  130,  130,  130,  130,  130,  130,
+      130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
+      130,  130,  130,  130,  133,  133,  133,  133,  133,  133,
+      252,  133,  133,  137,  334,  137,  137,  137,  137,  137,
+      137,  137,  137,  137,  137,  137,  137,  137,  137,  199,
+      137,  137,  137,  137,  145,  245,  244,  145,  145,  145,
+
+      243,  145,  145,  183,  145,  146,  183,  146,  146,  146,
+      146,  146,  146,  146,  146,  146,  146,  146,  274,  146,
+      146,  274,  146,  150,  150,  150,  274,  174,  150,  153,
+      153,  174,  153,  153,  167,  153,  153,  153,  162,  153,
+      153,  223,  153,  157,  148,  157,  157,  148,  157,  157,
+      157,  222,  157,  157,  151,  151,  217,  151,  151,  209,
+      151,  151,  151,  125,  151,  151,  209,  151,  161,  124,
+      204,  161,  161,  203,  161,  161,  161,  161,  161,  161,
+      161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
+      161,  275,  203,  201,  275,  199,  197,  196,  194,  275,
+
+      161,  161,  194,  161,  166,  125,  124,  166,  191,  166,
+      166,  166,  166,  166,  166,  166,  166,  166,  166,  166,
+      166,  166,  166,  166,  166,  166,  166,  276,  190,  125,
+      276,  124,  125,  124,  183,  276,  166,  166,  183,  166,
+      171,  174,  174,  171,  171,  171,  171,  171,  171,  171,
+      171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
+      171,  171,  171,  277,  168,  168,  277,  167,  163,  163,
+      162,  277,  171,  171,  159,  171,  180,  155,  149,  180,
+      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,
+      180,  180,  180,  180,  180,  180,  180,  180,  180,  278,
+
+      141,  140,  278,  139,  138,  136,  126,  278,  180,  180,
+      125,  180,  193,  193,  193,  193,  125,  124,  334,  334,
+      193,  334,  193,  193,  193,  193,  193,  193,  193,  193,
+      193,  334,  193,  195,  334,  334,  195,  334,  195,  195,
+      195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
+      195,  195,  195,  195,  198,  334,  334,  198,  198,  198,
+      198,  198,  198,  334,  198,  198,  198,  198,  198,  198,
+      198,  198,  198,  198,  198,  202,  334,  334,  202,  202,
+      334,  202,  202,  202,  202,  202,  202,  202,  202,  202,
+      202,  334,  202,  202,  202,  202,  205,  205,  205,  205,
+
+      205,  205,  205,  205,  205,  205,  205,  205,  205,  205,
+      205,  205,  205,  205,  205,  205,  205,  128,  334,  128,
+      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
+      128,  128,  128,  334,  128,  128,  128,  128,  212,  334,
+      334,  212,  212,  212,  334,  212,  212,  334,  212,  221,
+      221,  334,  221,  334,  334,  221,  221,  221,  334,  221,
+      221,  334,  221,  226,  334,  334,  226,  226,  334,  226,
+      334,  334,  226,  226,  226,  279,  226,  226,  279,  226,
+      228,  334,  334,  279,  228,  334,  334,  334,  334,  228,
+      228,  228,  334,  228,  228,  229,  334,  334,  229,  229,
+
+      229,  334,  229,  229,  334,  229,  171,  334,  334,  171,
+      171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
+      171,  171,  171,  171,  171,  171,  171,  171,  171,  280,
+      334,  334,  280,  334,  334,  334,  334,  280,  171,  171,
+      334,  171,  180,  334,  334,  180,  180,  180,  180,  180,
+      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,
+      180,  180,  180,  180,  180,  296,  334,  334,  296,  334,
+      334,  334,  334,  296,  180,  180,  334,  180,  193,  193,
+      193,  193,  334,  334,  334,  334,  193,  334,  193,  193,
+      193,  193,  193,  193,  193,  193,  193,  334,  193,  195,
+
+      334,  334,  195,  195,  195,  195,  195,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
+      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,
       246,  246,  246,  246,  246,  246,  246,  246,  246,  246,
-      251,  881,  881,  251,  881,  251,  251,  251,  251,  251,
-      251,  251,  251,  251,  251,  251,  251,  251,  256,  881,
-      881,  256,  256,  256,  256,  256,  256,  256,  256,  256,
-      256,  256,  256,  256,  256,  256,  265,  881,  881,  265,
-      265,  265,  265,  265,  265,  265,  265,  265,  265,  265,
-
-      265,  265,  265,  265,  278,  278,  278,  278,  881,  881,
-      881,  881,  278,  881,  278,  278,  278,  278,  278,  278,
-      881,  278,  280,  881,  881,  280,  881,  280,  280,  280,
-      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
-      283,  881,  881,  283,  283,  283,  283,  283,  283,  881,
-      283,  283,  283,  283,  283,  283,  283,  283,  287,  881,
-      881,  287,  287,  881,  287,  287,  287,  287,  287,  287,
-      287,  287,  881,  287,  287,  287,  290,  290,  290,  290,
+      246,  198,  334,  334,  198,  198,  198,  198,  198,  198,
+      334,  198,  198,  198,  198,  198,  198,  198,  198,  198,
+      198,  198,  202,  334,  334,  202,  202,  334,  202,  202,
+      202,  202,  202,  202,  202,  202,  202,  202,  334,  202,
+      202,  202,  202,  249,  334,  334,  249,  249,  334,  249,
+      249,  249,  249,  249,  249,  249,  249,  249,  249,  334,
+
+      249,  249,  249,  249,  250,  334,  334,  250,  250,  334,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      334,  250,  250,  250,  250,  251,  334,  251,  251,  251,
+      334,  251,  251,  251,  251,  251,  251,  251,  251,  251,
+      251,  334,  251,  251,  251,  251,  253,  253,  334,  253,
+      253,  334,  253,  253,  253,  253,  253,  253,  253,  253,
+      253,  253,  334,  253,  253,  253,  253,  212,  334,  334,
+      212,  212,  212,  334,  212,  212,  334,  212,  254,  334,
+      334,  254,  254,  254,  254,  254,  254,  254,  254,  254,
+      254,  254,  254,  254,  334,  254,  254,  254,  254,  258,
+
+      334,  334,  334,  297,  334,  258,  297,  334,  258,  258,
+      258,  297,  258,  258,  221,  221,  334,  221,  334,  334,
+      221,  221,  221,  334,  221,  221,  298,  221,  263,  298,
+      334,  263,  263,  263,  298,  334,  263,  264,  334,  334,
+      264,  264,  264,  264,  264,  264,  264,  264,  264,  264,
+      264,  264,  264,  334,  264,  264,  264,  264,  267,  334,
+      334,  267,  267,  334,  267,  334,  334,  267,  267,  267,
+      334,  267,  267,  334,  267,  268,  268,  334,  268,  268,
+      334,  268,  268,  268,  299,  268,  268,  299,  268,  269,
+      334,  334,  299,  300,  334,  334,  300,  334,  269,  269,
+
+      269,  300,  269,  269,  270,  334,  270,  334,  334,  270,
+      270,  270,  334,  270,  270,  271,  271,  334,  271,  334,
+      334,  271,  271,  271,  334,  271,  271,  334,  271,  171,
+      334,  334,  171,  171,  334,  171,  171,  171,  171,  171,
+      171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
+      180,  334,  334,  180,  334,  180,  180,  180,  180,  180,
+      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,
+      180,  284,  334,  334,  284,  284,  284,  284,  284,  284,
+      284,  284,  284,  284,  284,  284,  284,  334,  284,  284,
+      284,  284,  286,  334,  334,  286,  286,  286,  334,  286,
+
+      286,  288,  334,  334,  334,  301,  334,  334,  301,  334,
+      288,  288,  288,  301,  288,  288,  290,  334,  334,  290,
       290,  290,  290,  290,  290,  290,  290,  290,  290,  290,
-      290,  290,  290,  290,  149,  881,  149,  149,  149,  149,
-
-      149,  149,  149,  149,  149,  149,  149,  149,  881,  149,
-      149,  149,  150,  881,  150,  150,  150,  150,  150,  150,
-      150,  150,  150,  150,  150,  150,  881,  150,  150,  150,
-      297,  881,  881,  297,  881,  297,  881,  297,  159,  881,
-      159,  159,  159,  159,  159,  159,  159,  159,  159,  159,
-      159,  159,  881,  159,  159,  159,  306,  306,  881,  306,
-      881,  881,  306,  881,  306,  881,  306,  168,  881,  168,
-      168,  168,  168,  168,  168,  168,  168,  168,  881,  168,
-      881,  168,  308,  881,  881,  308,  881,  308,  881,  308,
-      316,  881,  881,  316,  316,  881,  316,  881,  881,  316,
-
-      881,  316,  881,  316,  178,  178,  881,  178,  178,  881,
-      178,  881,  178,  881,  178,  167,  881,  881,  167,  881,
-      167,  881,  167,  413,  881,  881,  881,  413,  881,  881,
-      881,  881,  413,  881,  413,  242,  881,  242,  881,  881,
-      242,  881,  242,  414,  881,  881,  414,  881,  414,  881,
-      414,  246,  881,  881,  246,  246,  881,  246,  246,  246,
-      246,  246,  246,  246,  246,  246,  246,  246,  246,  251,
-      881,  881,  251,  881,  251,  251,  251,  251,  251,  251,
-      251,  251,  251,  251,  251,  251,  251,  256,  881,  881,
-      256,  256,  256,  256,  256,  256,  256,  256,  256,  256,
-
-      256,  256,  256,  256,  256,  265,  881,  881,  265,  265,
-      265,  265,  265,  265,  265,  265,  265,  265,  265,  265,
-      265,  265,  265,  278,  278,  278,  278,  881,  881,  881,
-      881,  278,  881,  278,  278,  278,  278,  278,  278,  881,
-      278,  280,  881,  881,  280,  280,  280,  280,  280,  280,
-      280,  280,  280,  280,  280,  280,  280,  280,  280,  431,
-      431,  431,  431,  431,  431,  431,  431,  431,  431,  431,
-      431,  431,  431,  431,  431,  431,  431,  283,  881,  881,
-      283,  283,  283,  283,  283,  283,  881,  283,  283,  283,
-      283,  283,  283,  283,  283,  287,  881,  881,  287,  287,
-
-      881,  287,  287,  287,  287,  287,  287,  287,  287,  881,
-      287,  287,  287,  434,  881,  881,  434,  434,  881,  434,
-      434,  434,  434,  434,  434,  434,  434,  881,  434,  434,
-      434,  435,  881,  881,  435,  435,  881,  435,  435,  435,
-      435,  435,  435,  435,  435,  881,  435,  435,  435,  436,
-      881,  436,  436,  436,  881,  436,  436,  436,  436,  436,
-      436,  436,  436,  881,  436,  436,  436,  438,  438,  881,
-      438,  438,  881,  438,  438,  438,  438,  438,  438,  438,
-      438,  881,  438,  438,  438,  297,  881,  881,  297,  881,
-      297,  881,  297,  439,  881,  881,  439,  439,  439,  439,
-
-      439,  439,  439,  439,  439,  439,  439,  881,  439,  439,
-      439,  443,  881,  881,  881,  881,  881,  443,  881,  881,
-      443,  881,  443,  306,  306,  881,  306,  881,  881,  306,
-      881,  306,  881,  306,  308,  881,  881,  308,  881,  308,
-      881,  308,  448,  881,  881,  448,  448,  448,  448,  448,
-      448,  448,  448,  448,  448,  448,  881,  448,  448,  448,
-      452,  881,  881,  881,  881,  881,  452,  881,  881,  452,
-      881,  452,  458,  881,  881,  458,  458,  458,  458,  458,
-      458,  458,  458,  458,  458,  458,  881,  458,  458,  458,
-      461,  881,  881,  461,  461,  881,  461,  881,  881,  461,
-
-      881,  461,  881,  461,  462,  462,  881,  462,  462,  881,
-      462,  881,  462,  881,  462,  178,  178,  881,  178,  178,
-      881,  178,  881,  178,  881,  178,  553,  881,  881,  881,
-      881,  881,  881,  881,  881,  553,  881,  553,  554,  881,
-      554,  881,  881,  554,  881,  554,  555,  555,  881,  555,
-      881,  881,  555,  881,  555,  881,  555,  256,  881,  881,
-      256,  256,  881,  256,  256,  256,  256,  256,  256,  256,
-      256,  256,  256,  256,  256,  265,  881,  881,  265,  881,
-      265,  265,  265,  265,  265,  265,  265,  265,  265,  265,
-      265,  265,  265,  431,  431,  431,  431,  431,  431,  431,
-
-      431,  431,  431,  431,  431,  431,  431,  431,  431,  431,
-      431,  434,  881,  881,  434,  434,  881,  434,  434,  434,
-      434,  434,  434,  434,  434,  881,  434,  434,  434,  435,
-      881,  881,  435,  435,  881,  435,  435,  435,  435,  435,
-      435,  435,  435,  881,  435,  435,  435,  436,  881,  881,
-      436,  436,  881,  436,  436,  436,  436,  436,  436,  436,
-      436,  881,  436,  436,  436,  438,  881,  881,  438,  438,
-      881,  438,  438,  438,  438,  438,  438,  438,  438,  881,
-      438,  438,  438,  439,  881,  881,  439,  439,  439,  439,
-      439,  439,  439,  439,  439,  439,  439,  881,  439,  439,
-
-      439,  568,  881,  881,  568,  568,  568,  568,  568,  568,
-      568,  568,  568,  568,  568,  881,  568,  568,  568,  570,
-      881,  881,  570,  881,  570,  572,  881,  881,  881,  881,
-      881,  881,  881,  881,  572,  881,  572,  445,  881,  445,
-      881,  881,  445,  881,  445,  448,  881,  881,  448,  448,
-      448,  448,  448,  448,  448,  448,  448,  448,  448,  881,
-      448,  448,  448,  574,  881,  881,  574,  574,  574,  574,
-      574,  574,  574,  574,  574,  574,  574,  881,  574,  574,
-      574,  576,  881,  881,  576,  881,  576,  578,  881,  881,
-      881,  881,  881,  881,  881,  881,  578,  881,  578,  454,
-
-      881,  454,  881,  881,  454,  881,  454,  457,  881,  881,
-      457,  881,  881,  457,  458,  881,  881,  458,  458,  458,
-      458,  458,  458,  458,  458,  458,  458,  458,  881,  458,
-      458,  458,  580,  881,  881,  580,  580,  580,  580,  580,
-      580,  580,  580,  580,  580,  580,  881,  580,  580,  580,
-      583,  583,  881,  583,  583,  881,  583,  881,  583,  881,
-      583,  462,  462,  881,  462,  462,  881,  462,  881,  462,
-      881,  462,  178,  178,  881,  178,  178,  881,  178,  881,
-      178,  881,  178,  663,  881,  663,  881,  881,  663,  881,
-      663,  554,  881,  554,  881,  881,  554,  881,  554,  555,
-
-      555,  881,  555,  881,  881,  555,  881,  555,  881,  555,
-      673,  881,  881,  673,  673,  673,  673,  673,  673,  673,
-      673,  673,  673,  673,  881,  673,  673,  673,  675,  881,
-      881,  675,  881,  675,  301,  881,  881,  881,  881,  881,
-      881,  301,  881,  301,  881,  301,  676,  881,  881,  676,
-      676,  676,  676,  676,  676,  676,  676,  676,  676,  676,
-      881,  676,  676,  676,  678,  881,  881,  678,  881,  678,
-      312,  881,  881,  881,  881,  881,  881,  312,  881,  312,
-      881,  312,  680,  881,  881,  680,  680,  881,  680,  881,
-      881,  680,  881,  680,  881,  680,  736,  881,  881,  881,
-
-      881,  881,  881,  881,  881,  736,  881,  736,  742,  881,
-      881,  742,  742,  742,  742,  742,  742,  742,  742,  742,
-      742,  742,  881,  742,  742,  742,  744,  744,  881,  744,
-      744,  881,  744,  881,  744,  881,  744,  785,  881,  881,
-      785,  881,  785,   27,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881
+      290,  290,  334,  290,  290,  290,  290,  293,  293,  334,
+      293,  293,  334,  293,  293,  293,  302,  293,  293,  302,
+      293,  295,  334,  295,  302,  334,  295,  295,  295,  303,
+      295,  295,  303,  334,  334,  334,  334,  303,  305,  334,
+      334,  305,  305,  305,  305,  305,  305,  305,  305,  305,
+      305,  305,  305,  305,  334,  305,  305,  305,  305,  307,
+      334,  334,  307,  307,  307,  334,  307,  307,  216,  334,
+
+      334,  334,  334,  334,  334,  216,  334,  216,  216,  216,
+      334,  216,  216,  309,  334,  334,  309,  309,  334,  309,
+      334,  334,  309,  309,  309,  311,  309,  309,  311,  309,
+      310,  334,  334,  311,  161,  334,  334,  161,  334,  310,
+      310,  310,  161,  310,  310,  312,  166,  313,  312,  166,
+      313,  334,  334,  312,  166,  313,  171,  314,  180,  171,
+      314,  180,  334,  334,  171,  314,  180,  316,  334,  334,
+      316,  316,  316,  316,  316,  316,  316,  316,  316,  316,
+      316,  316,  316,  334,  316,  316,  316,  316,  318,  318,
+      334,  318,  318,  334,  318,  318,  318,  334,  318,  318,
+
+      320,  318,  319,  320,  334,  319,  319,  319,  320,  319,
+      319,  321,  322,  323,  321,  322,  323,  334,  334,  321,
+      322,  323,  325,  326,  327,  325,  326,  327,  334,  334,
+      325,  326,  327,  328,  330,  331,  328,  330,  331,  334,
+      334,  328,  330,  331,  332,  333,  334,  332,  333,  334,
+      334,  334,  332,  333,   27,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334
     } ;
 
-static yyconst flex_int16_t yy_chk[7634] =
+static yyconst flex_int16_t yy_chk[2019] =
     {   0,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
@@ -1615,840 +815,222 @@ static yyconst flex_int16_t yy_chk[7634] =
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    5,
-        5,    6,    6,    7,    7,   80,    7,    5,   80,    6,
-
-        8,    8,   97,    8,    9,    9,   10,   10,   11,   11,
-       86,   11,    9,   86,   10,   12,   12,  900,   12,   13,
-       13,   13,   35,   35,   13,   14,   14,   14,  176,   13,
-       14,  176,   17,   17,   17,   14,   34,   17,   34,   21,
-       21,    5,   36,    6,   53,    7,   97,   36,   13,   53,
-       21,  102,    8,  742,   14,   21,    9,  679,   10,   17,
-       11,   15,   15,   15,  676,   15,   15,   12,   50,   50,
-       15,   15,   16,   16,   16,  151,   16,   16,  110,  110,
-       13,   16,   16,   18,   18,   18,   14,  151,   18,   19,
-       19,   17,   19,  112,   47,  673,   47,   19,   19,   19,
-
-      102,   22,   22,   19,  125,   19,   20,   20,   47,   20,
-       18,  149,   22,  149,   20,   20,   20,   22,   23,   23,
-       20,  663,   20,   24,   24,  112,   23,  100,  100,   55,
-       55,   24,  299,   55,  139,  100,  125,   59,   59,  139,
-       47,   59,   18,   56,   56,   15,  299,   56,   64,   64,
-      274,   55,   64,   55,   56,  662,   16,  241,   55,   57,
-       57,   55,   56,   57,  117,  117,  124,  124,   56,  241,
-       23,   59,   19,  573,   19,   24,   61,   61,   56,  100,
-       61,   57,  274,   55,   57,   55,   56,   57,  573,   20,
-       55,   20,  581,   55,   56,  105,  105,  166,  105,  166,
-
-       56,   55,  166,   59,   61,  145,  145,   58,   58,   59,
-       56,   58,  580,   57,  265,   56,   57,   60,   58,   57,
-       64,   60,   58,   75,   75,   60,   58,   75,   62,   62,
-      577,   57,   62,  163,   60,   58,   61,   60,   65,   62,
-      266,   75,   75,  152,  152,  163,   65,  105,   61,   60,
-       58,   66,   65,   60,   58,  154,  154,   60,   58,   66,
-       69,   69,   65,  265,   69,   66,   60,   58,  574,   60,
-       65,   62,   67,   75,   75,   66,  571,  163,   65,   58,
-       67,  178,  178,   66,   65,  178,   67,  164,   69,  266,
-      245,   66,   67,  245,   65,   75,   67,   66,  256,  164,
-
-       62,   63,   63,  568,   67,   63,  257,   66,  281,  281,
-       68,   68,   67,  310,   68,   63,  567,   63,   67,  427,
-       69,  556,   68,  555,   67,   63,   68,  310,   67,   63,
-       63,  164,   69,   70,   70,   73,   68,   70,   68,   73,
-       71,   71,  256,   73,   71,  271,  271,   63,  271,   63,
-      257,  427,   73,  178,   68,   71,  554,   63,   68,  187,
-      187,   63,   63,  187,   70,   73,  920,   73,   68,  553,
-       68,   73,  920,   63,  460,   73,  165,  565,  165,   74,
-       74,  303,   68,   74,   73,  431,  431,   71,   76,   76,
-      165,  459,   76,  303,   82,   82,   70,  271,   82,  458,
-
-      181,  181,  623,   74,  181,   70,  433,  433,   74,  565,
-      457,   76,   71,   72,  181,   72,   82,   72,   82,   91,
-      455,   72,  165,   82,   91,  303,   82,   72,  454,  453,
-      177,  187,   72,   72,  623,   74,  451,   72,  450,  509,
-       74,  177,  177,   76,  177,   72,  181,   72,   82,   72,
-       82,   74,  579,   72,  449,   82,  672,   96,   82,   72,
-       76,   91,   96,  704,   72,   72,   82,  579,   91,   72,
-      509,  741,  181,   91,   91,  760,  947,  790,   91,  947,
-      101,  448,  446,  445,  444,  101,   91,  442,  672,  441,
-       91,  106,   91,   91,   91,  704,  106,  180,  180,   96,
-
-      440,  180,  509,  741,  182,  182,   96,  760,  182,  790,
-      439,   96,   96,  177,  184,  184,   96,  182,  184,  432,
-      423,  419,  101,  414,   96,  182,  413,  180,   96,  101,
-       96,   96,   96,  106,  101,  101,  412,  314,  309,  101,
-      106,  307,  306,  184,  305,  106,  106,  101,  304,  182,
-      106,  101,  298,  101,  101,  101,  296,  182,  106,  180,
-      293,  292,  106,  291,  106,  106,  106,  156,  284,  180,
-      283,  280,  276,  275,  270,  184,  182,  269,  261,  316,
-      316,  260,  156,  316,  201,  201,  184,  251,  201,  156,
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  156,  156,  156,  246,  201,  242,  175,  156,
-      169,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  156,  156,  156,  156,  156,  173,  201,  315,
-      168,  316,  167,  160,  159,  153,  201,  150,  146,  144,
-      315,  315,  173,  315,  143,  142,  140,  137,  134,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  133,  128,  127,  123,  173,
-
-      122,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
-      173,  173,  173,  173,  173,  173,  173,  183,  183,  185,
-      185,  183,  315,  185,  186,  186,  188,  188,  186,  118,
-      188,  116,  189,  189,  183,  115,  189,  188,  114,  185,
-      109,  188,  108,  185,  104,  190,  190,  191,  191,  190,
-      103,  191,   99,   98,   94,  186,  189,  193,  193,   93,
-      190,  193,   92,  189,  231,  231,  183,   89,  231,  188,
-       88,  185,   87,  188,   84,  185,  231,  191,  192,  192,
-      194,  194,  192,   79,  194,   52,  193,  186,  189,  183,
-
-       45,  185,  190,   42,  192,  189,  186,   41,  188,   38,
-      192,   37,  582,   33,  189,  194,  192,  192,  231,  191,
-       32,  195,  195,  582,  582,  195,  582,  190,  193,  191,
-       31,  196,  196,   30,  195,  196,  192,  197,  197,  193,
-      195,  197,  192,   27,    0,    0,  231,  194,  192,  192,
-      198,  198,    0,  196,  198,    0,    0,  199,  199,  197,
-      192,  199,  194,  200,  200,    0,  195,  200,    0,  202,
-      202,    0,  195,  202,  200,  198,  203,  203,    0,    0,
-      203,  199,  204,  204,  202,  196,  204,    0,  200,    0,
-        0,  197,    0,  195,    0,  582,  204,    0,  204,    0,
-
-      205,  205,  203,  196,  205,    0,  200,  198,    0,  197,
-        0,  204,  204,  199,  207,  207,  202,    0,  207,  205,
-      200,    0,  198,  262,  262,    0,    0,    0,  204,  199,
-      204,  262,    0,    0,  203,  200,  208,  208,  207,    0,
-      208,  202,    0,  204,  204,    0,  214,  214,  203,    0,
-      214,  205,    0,    0,  204,    0,    0,  208,    0,  208,
-      209,  209,    0,    0,  209,    0,  208,    0,  214,    0,
-      207,  209,  205,  206,  206,  262,    0,  206,  211,  211,
-        0,    0,  211,  212,  212,  206,  207,  212,    0,  208,
-        0,  208,  206,    0,    0,  206,    0,  212,  208,    0,
-
-      214,  206,  211,  209,  206,  210,  210,    0,  208,  210,
-      215,  215,  213,  213,  215,    0,  213,  206,  214,  216,
-      216,  218,  218,  216,  206,  218,  210,  206,    0,  212,
-        0,  210,  209,  206,  211,  213,  206,  218,    0,  210,
-      215,  216,  217,  217,    0,  206,  217,    0,  219,  219,
-      211,    0,  219,    0,    0,  212,  220,  220,  210,    0,
-      220,    0,  217,  210,  221,  221,    0,  213,  221,  218,
-      220,  210,  215,  216,    0,    0,    0,  210,  219,  221,
-        0,    0,  215,    0,  213,    0,  222,  222,  225,  225,
-      222,  216,  225,  218,  217,  223,  223,  222,    0,  223,
-
-      224,  224,  220,    0,  224,    0,    0,    0,    0,  223,
-      219,  221,  223,  225,  217,  226,  226,  227,  227,  226,
-      219,  227,    0,  224,    0,  223,    0,    0,  220,  222,
-      228,  228,    0,    0,  228,    0,  221,  226,    0,  227,
-        0,  223,    0,  226,  223,  225,  228,    0,  229,  229,
-      232,  232,  229,    0,  232,  224,    0,  223,  222,    0,
-      225,  228,  230,  230,  236,  236,  230,  223,  236,  226,
-        0,  227,  224,  229,  230,  226,  229,    0,  228,    0,
-        0,    0,    0,  236,  232,  230,    0,  226,    0,  227,
-      233,  233,    0,  228,  233,  235,  235,    0,    0,  235,
-
-        0,  233,  228,    0,    0,  229,  230,  235,  229,  237,
-      237,    0,    0,  237,  235,  236,  232,  230,    0,    0,
-      229,  233,  232,    0,  237,    0,    0,  238,  238,    0,
-        0,  238,    0,  233,  230,    0,  236,  239,  239,  235,
-        0,  239,    0,  317,  317,    0,  235,  317,    0,    0,
-      318,  318,    0,  233,  318,    0,  237,  238,  317,  239,
-        0,    0,  233,  234,  234,  234,  234,  235,    0,  234,
-        0,  247,    0,  234,  234,  234,  247,    0,    0,  234,
-      234,  237,  319,  319,  320,  320,  319,    0,  320,  238,
-      317,  239,    0,    0,    0,  234,  234,  234,  234,  238,
-
-        0,  234,    0,    0,    0,  234,  234,  234,    0,  239,
-        0,  234,  234,  247,    0,  317,    0,  321,  321,    0,
-      247,  321,  318,  249,    0,  247,  247,    0,    0,    0,
-      247,  249,  249,  249,  249,  249,  249,    0,  247,  250,
-        0,    0,  247,    0,  247,  247,  247,  250,  250,  250,
-      250,  250,  250,  252,  319,    0,  320,    0,  252,    0,
-        0,    0,    0,  249,  249,  249,  249,  249,  249,    0,
-      342,  342,  322,  322,  342,    0,  322,    0,    0,  250,
-      250,  250,  250,  250,  250,    0,    0,  322,    0,  321,
-        0,    0,    0,  342,    0,  252,  323,  323,    0,    0,
-
-      323,    0,  252,    0,    0,  254,    0,  252,  252,    0,
-        0,  323,  252,  254,  254,  254,  254,  254,  254,  322,
-      252,  255,    0,    0,  252,  342,  252,  252,  252,  255,
-      255,  255,  255,  255,  255,  258,    0,    0,    0,    0,
-      258,    0,  342,  323,  322,  254,  254,  254,  254,  254,
-      254,  325,  325,    0,    0,  325,    0,    0,    0,    0,
-        0,  255,  255,  255,  255,  255,  255,    0,  323,  329,
-      329,    0,    0,  329,    0,  325,    0,  258,  324,  324,
-        0,    0,  324,    0,  258,    0,    0,  263,    0,  258,
-      258,    0,  324,  329,  258,  263,  263,  263,  263,  263,
-
-      263,    0,  258,  264,    0,    0,  258,  325,  258,  258,
-      258,  264,  264,  264,  264,  264,  264,  267,    0,    0,
-        0,    0,  267,  325,  324,  329,    0,  263,  263,  263,
-      263,  263,  263,    0,  348,  348,  333,  333,  348,    0,
-      333,  329,    0,  264,  264,  264,  264,  264,  264,    0,
-      324,  333,  334,  334,    0,    0,  334,    0,    0,  267,
-      326,  326,    0,    0,  326,    0,  267,  334,    0,  272,
-        0,  267,  267,    0,    0,    0,  267,  272,  272,  272,
-      272,  272,  272,  333,  267,  273,    0,    0,  267,  326,
-      267,  267,  267,  273,  273,  273,  273,  273,  273,  334,
-
-      353,  353,    0,    0,  353,    0,  348,    0,  333,  272,
-      272,  272,  272,  272,  272,    0,    0,    0,    0,    0,
-        0,  326,    0,    0,  334,  273,  273,  273,  273,  273,
-      273,  300,  326,  300,  300,    0,    0,    0,    0,    0,
-        0,  300,  300,  300,  300,  300,  300,  300,  300,  300,
-      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
-      300,  300,  300,  300,  300,  300,  300,    0,    0,    0,
-        0,  300,  353,  300,  300,  300,  300,  300,  300,  300,
-      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
-      300,  300,  300,  300,  300,  300,  300,  300,  300,  301,
-
-        0,  365,  365,    0,    0,  365,  301,  301,  301,  301,
-      301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
-      301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
-      301,  301,  311,    0,  311,  311,    0,    0,    0,    0,
-        0,    0,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,    0,    0,
-        0,    0,  311,  365,  311,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,  311,  311,
-      311,  311,  311,  311,  311,  311,  311,  311,  311,  311,
-
-      312,    0,    0,    0,    0,    0,    0,  312,  312,  312,
-      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
-      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
-      312,  312,  312,  327,  327,  328,  328,  327,    0,  328,
-        0,  330,  330,    0,  327,  330,  331,  331,    0,    0,
-      331,    0,  330,    0,    0,  332,  332,  331,    0,  332,
-        0,  336,  336,    0,  328,  336,  332,  335,  335,  341,
-      341,  335,    0,  341,  332,    0,  327,  337,  337,    0,
-      335,  337,  338,  338,  330,    0,  338,    0,    0,  331,
-        0,  336,    0,  345,  345,    0,  328,  345,  332,  341,
-
-        0,    0,    0,  337,  338,  327,  332,  328,    0,    0,
-        0,    0,  335,  330,    0,  339,  339,    0,  331,  339,
-        0,  340,  340,  336,  345,  340,    0,  332,    0,    0,
-        0,  341,    0,  336,    0,  337,  338,    0,    0,  335,
-        0,  341,  344,  344,  339,    0,  344,  343,  343,  337,
-      340,  343,    0,    0,  338,    0,  345,    0,  346,  346,
-      343,    0,  346,    0,    0,  345,  347,  347,  344,    0,
-      347,  349,  349,    0,    0,  349,  339,  346,    0,  350,
-      350,    0,  340,  350,  351,  351,  349,  339,  351,    0,
-      347,    0,  343,  340,  350,    0,    0,  355,  355,  351,
-
-      344,  355,  352,  352,    0,    0,  352,  354,  354,  346,
-        0,  354,    0,    0,  344,    0,  356,  356,  349,  343,
-      356,    0,  347,    0,    0,  355,  350,  352,    0,  354,
-      346,  351,    0,  357,  357,  356,    0,  357,  347,    0,
-      358,  358,    0,  349,  358,  359,  359,    0,  357,  359,
-        0,  350,    0,    0,  366,  366,  351,  355,  366,  352,
-        0,  354,  359,    0,    0,    0,    0,  356,  358,  355,
-        0,  360,  360,    0,  352,  360,    0,  361,  361,  354,
-      357,  361,    0,  362,  362,    0,  360,  362,  356,  363,
-      363,  364,  364,  363,  359,  364,  361,    0,  362,    0,
-
-      358,    0,    0,  363,    0,  357,  364,  369,  369,  367,
-      367,  369,  358,  367,    0,  368,  368,  359,  360,  368,
-      370,  370,  369,    0,  370,    0,  366,    0,  361,  371,
-      362,    0,  375,  375,  368,  363,  375,    0,  364,    0,
-      367,    0,    0,  360,  371,  371,  372,  372,  371,  361,
-      372,  375,  373,  373,  369,  362,  373,    0,  379,  379,
-        0,  363,  379,  364,    0,    0,  368,  373,  372,    0,
-        0,    0,  367,  374,  374,    0,    0,  374,    0,  369,
-        0,  367,    0,  375,    0,  374,    0,  368,    0,  379,
-      376,  376,  370,    0,  376,    0,    0,  378,  378,  373,
-
-      372,  378,  374,    0,  375,  376,  377,  377,  380,  380,
-      377,  378,  380,    0,    0,    0,  371,  374,  372,    0,
-      377,  379,  377,  380,  373,  381,  381,  382,  382,  381,
-      379,  382,  383,  383,  374,    0,  383,  376,    0,    0,
-      387,  387,  382,  378,  387,  374,  384,  384,    0,    0,
-      384,    0,  377,    0,  377,  380,  381,    0,    0,    0,
-      383,  384,  376,  385,  385,    0,    0,  385,    0,  378,
-      387,    0,  386,  386,  382,    0,  386,    0,  377,    0,
-      380,  388,  388,    0,    0,  388,    0,  386,  381,    0,
-      390,  390,  383,  384,  390,  385,    0,  381,    0,  382,
-
-        0,    0,  387,    0,  383,    0,  389,  389,    0,  388,
-      389,    0,  387,  391,  391,    0,    0,  391,  384,  386,
-      392,  392,    0,    0,  392,    0,  391,  385,  393,  393,
-        0,    0,  393,  391,  389,  385,    0,    0,    0,  394,
-      394,  388,    0,  394,  386,  397,  397,  395,  395,  397,
-      393,  395,    0,  388,    0,  396,  396,    0,  391,  396,
-      399,  399,  390,    0,  399,  391,  389,    0,    0,  394,
-      396,  395,  398,  398,    0,    0,  398,    0,  389,    0,
-      397,    0,  393,    0,  399,  391,  400,  400,    0,    0,
-      400,  398,  392,    0,  399,  403,  403,    0,    0,  403,
-
-      393,  394,  396,  395,    0,  400,  401,  401,    0,    0,
-      401,  394,  397,    0,  402,  402,  399,  397,  402,  395,
-      403,    0,    0,  398,    0,  402,  399,  396,    0,    0,
-      401,    0,  399,  402,    0,  404,  404,  400,    0,  404,
-        0,  405,  405,    0,  398,  405,    0,  406,  406,  407,
-      407,  406,  403,  407,    0,    0,    0,  402,  400,  405,
-      408,  408,  401,    0,  408,  402,  404,  403,    0,  409,
-      409,  405,  406,  409,  407,  410,  410,    0,  401,  410,
-        0,  411,  411,    0,  408,  411,  402,    0,    0,    0,
-        0,  405,    0,  410,    0,    0,    0,  409,  404,    0,
-
-        0,  461,  461,  405,  406,  461,  407,  404,    0,    0,
-        0,    0,    0,  405,    0,    0,  408,    0,    0,  406,
-        0,  407,    0,    0,    0,  410,  415,  462,  462,  409,
-        0,  462,  408,    0,  415,  415,  415,  415,  415,  415,
-        0,  409,    0,    0,    0,    0,  416,  410,    0,    0,
-        0,    0,  417,  411,  416,  416,  416,  416,  416,  416,
-      417,  417,  417,  417,  417,  417,  415,  415,  415,  415,
-      415,  415,  418,  461,  464,  464,    0,    0,  464,    0,
-      418,  418,  418,  418,  418,  418,  416,  416,  416,  416,
-      416,  416,  417,  417,  417,  417,  417,  417,  421,  462,
-
-      480,  480,    0,    0,  480,    0,  421,  421,  421,  421,
-      421,  421,  418,  418,  418,  418,  418,  418,  422,  463,
-      463,    0,    0,  463,  425,    0,  422,  422,  422,  422,
-      422,  422,  425,  425,  425,  425,  425,  425,  421,  421,
-      421,  421,  421,  421,  426,    0,  464,  463,    0,    0,
-        0,    0,  426,  426,  426,  426,  426,  426,  422,  422,
-      422,  422,  422,  422,  425,  425,  425,  425,  425,  425,
-        0,    0,  480,    0,    0,    0,    0,    0,    0,  463,
-        0,    0,    0,    0,  426,  426,  426,  426,  426,  426,
-      447,  463,    0,  447,    0,  485,  485,    0,    0,  485,
-
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
-      447,  447,  447,  447,  447,  447,  456,    0,    0,  456,
-        0,    0,    0,    0,    0,    0,  456,  456,  456,  456,
-      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
-      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
-      456,  456,  465,  465,  466,  466,  465,  485,  466,    0,
-      467,  467,  468,  468,  467,  465,  468,  469,  469,    0,
-        0,  469,    0,  466,  467,    0,    0,    0,  470,  470,
-      471,  471,  470,    0,  471,  472,  472,    0,    0,  472,
-
-        0,  468,  473,  473,    0,  469,  473,  465,  474,  474,
-      476,  476,  474,    0,  476,  466,  467,    0,  470,    0,
-      471,    0,  475,  475,    0,  472,  475,  477,  477,    0,
-        0,  477,  473,  468,  465,    0,  466,  469,    0,  474,
-      476,    0,  467,  477,  468,    0,  475,  479,  479,  469,
-      470,  479,  471,    0,    0,  478,  478,  472,    0,  478,
-      470,    0,  471,    0,  473,    0,  479,  472,    0,  481,
-      481,  474,  476,  481,  473,  477,    0,    0,  475,    0,
-      474,    0,  476,  478,  482,  482,  483,  483,  482,    0,
-      483,  484,  484,    0,  475,  484,    0,    0,  479,  477,
-
-      481,  483,    0,    0,  486,  486,  484,    0,  486,    0,
-        0,    0,  487,  487,  482,  478,  487,  488,  488,  479,
-        0,  488,  494,  494,  489,  489,  494,  478,  489,    0,
-      487,    0,  481,  483,  486,  490,  490,    0,  484,  490,
-        0,  481,    0,  488,    0,    0,  482,    0,  489,  491,
-      491,  492,  492,  491,    0,  492,  482,    0,  483,    0,
-      493,  493,  487,  484,  493,  490,  486,  495,  495,    0,
-        0,  495,    0,  496,  496,  488,  486,  496,  495,  492,
-      489,  501,  501,  491,  487,  501,  497,  497,  493,  488,
-      497,    0,  496,    0,  494,    0,  489,  490,  498,  498,
-
-      499,  499,  498,    0,  499,  500,  500,  490,    0,  500,
-      495,  492,    0,    0,  498,  491,  497,    0,    0,  499,
-      493,  491,    0,  492,  496,  502,  502,    0,  500,  502,
-        0,    0,  493,  503,  503,    0,    0,  503,    0,  495,
-      504,  504,    0,    0,  504,  496,  498,    0,  497,    0,
-        0,  499,    0,  501,    0,  502,    0,    0,  497,    0,
-      500,  503,  505,  505,    0,    0,  505,  506,  506,    0,
-      498,  506,  499,    0,  507,  507,    0,  500,  507,    0,
-      508,  508,  510,  510,  508,    0,  510,  502,  511,  511,
-      507,    0,  511,  503,  508,    0,  506,  502,  512,  512,
-
-        0,  511,  512,  513,  513,  503,    0,  513,    0,  512,
-      514,  514,  504,    0,  514,    0,  515,  515,  513,    0,
-      515,    0,  507,  516,  516,    0,  508,  516,  506,    0,
-        0,    0,    0,  511,  505,  514,  517,  517,    0,  506,
-      517,  512,  516,    0,  515,    0,  507,  518,  518,    0,
-      513,  518,  508,    0,  510,  517,    0,    0,  519,  519,
-      511,    0,  519,    0,    0,  520,  520,  514,    0,  520,
-      512,  519,    0,    0,  516,  513,  515,  523,  523,  521,
-      521,  523,  514,  521,    0,  522,  522,  517,  515,  522,
-        0,    0,  523,  524,  524,  516,    0,  524,    0,  520,
-
-        0,  525,  525,  519,    0,  525,  524,  521,  517,    0,
-      526,  526,  527,  527,  526,  522,  527,  529,  529,  518,
-      525,  529,    0,    0,  523,    0,  522,    0,  529,    0,
-      519,  520,  528,  528,  526,    0,  528,  520,  524,  521,
-      530,  530,  533,  533,  530,  528,  533,  522,    0,  523,
-        0,  521,  525,    0,  531,  531,    0,  522,  531,    0,
-      529,    0,  530,  532,  532,  524,  526,  532,    0,  531,
-      534,  534,    0,  525,  534,  535,  535,  528,  532,  535,
-        0,    0,  526,    0,  527,    0,    0,  536,  536,  529,
-        0,  536,  537,  537,  530,    0,  537,    0,    0,  534,
-
-      536,  531,  538,  538,  528,    0,  538,  541,  541,    0,
-      532,  541,  530,    0,  533,    0,  538,    0,  539,  539,
-      537,  537,  539,    0,  544,  544,  531,    0,  544,  547,
-      547,  534,  536,  547,    0,  532,    0,  539,    0,  540,
-      540,    0,  534,  540,  547,  545,  545,  535,  538,  545,
-      542,  542,  537,  537,  542,    0,  543,  543,    0,  536,
-      543,    0,    0,  540,  537,  544,  546,  546,    0,  539,
-      546,    0,    0,    0,  538,  545,  547,  548,  548,  541,
-      543,  548,    0,    0,  542,  549,  549,    0,    0,  549,
-      539,  546,    0,  550,  550,  540,  544,  550,  551,  551,
-
-        0,  547,  551,    0,    0,    0,    0,  545,  548,  549,
-      550,  540,  543,  551,  552,  552,  542,  545,  552,    0,
-        0,    0,  542,  546,    0,    0,    0,    0,  543,    0,
-      583,  583,    0,    0,  583,    0,    0,    0,  546,    0,
-      548,  549,  550,    0,    0,  551,    0,    0,    0,  548,
-      557,    0,  584,  584,    0,    0,  584,  549,  557,  557,
-      557,  557,  557,  557,  558,  550,    0,    0,    0,    0,
-      551,  559,  558,  558,  558,  558,  558,  558,    0,  559,
-      559,  559,  559,  559,  559,    0,  552,    0,  560,    0,
-      557,  557,  557,  557,  557,  557,  560,  560,  560,  560,
-
-      560,  560,  583,    0,  558,  558,  558,  558,  558,  558,
-      561,  559,  559,  559,  559,  559,  559,    0,  561,  561,
-      561,  561,  561,  561,  584,    0,  562,    0,  560,  560,
-      560,  560,  560,  560,  562,  562,  562,  562,  562,  562,
-        0,  586,  586,  587,  587,  586,    0,  587,  563,    0,
-      561,  561,  561,  561,  561,  561,  563,  563,  563,  563,
-      563,  563,    0,    0,  564,  586,  562,  562,  562,  562,
-      562,  562,  564,  564,  564,  564,  564,  564,  588,  588,
-      585,  585,  588,    0,  585,    0,    0,    0,  563,  563,
-      563,  563,  563,  563,  589,  589,    0,  586,  589,  590,
-
-      590,    0,    0,  590,  564,  564,  564,  564,  564,  564,
-      585,    0,    0,  586,    0,  587,  591,  591,  592,  592,
-      591,    0,  592,    0,    0,  593,  593,  590,    0,  593,
-        0,  594,  594,  592,    0,  594,  595,  595,    0,    0,
-      595,    0,  585,  597,  597,  598,  598,  597,    0,  598,
-      588,  595,  585,  594,  596,  596,    0,    0,  596,  590,
-      593,    0,    0,    0,  598,  592,  589,    0,    0,  596,
-        0,  590,    0,    0,  599,  599,  600,  600,  599,    0,
-      600,    0,    0,  595,    0,  594,    0,    0,  591,    0,
-      592,    0,  593,    0,    0,    0,  598,  593,  599,    0,
-
-        0,  596,    0,  594,    0,  600,  601,  601,  595,    0,
-      601,    0,  602,  602,    0,  597,  602,  598,    0,  603,
-      603,  604,  604,  603,    0,  604,  596,  605,  605,    0,
-      599,  605,  606,  606,    0,  601,  606,  600,  607,  607,
-      604,    0,  607,    0,    0,    0,  599,  603,  600,  608,
-      608,    0,    0,  608,    0,  607,  609,  609,  610,  610,
-      609,    0,  610,    0,    0,  611,  611,  601,  608,  611,
-      612,  612,  604,  610,  612,    0,  613,  613,  601,  603,
-      613,    0,  614,  614,  602,    0,  614,  607,  615,  615,
-        0,  603,  615,  604,  612,  611,    0,  614,    0,  605,
-
-      608,    0,  616,  616,  606,  610,  616,  617,  617,    0,
-      607,  617,  618,  618,    0,    0,  618,    0,  617,  620,
-      620,  608,    0,  620,    0,    0,  612,  611,  609,  614,
-      610,    0,  619,  619,  621,  621,  619,  611,  621,    0,
-      622,  622,  612,  619,  622,  628,  628,    0,  613,  628,
-      617,  624,  624,    0,  614,  624,    0,    0,  625,  625,
-      615,    0,  625,  626,  626,    0,    0,  626,    0,  621,
-        0,    0,  627,  627,  616,  619,  627,    0,    0,  617,
-        0,  624,  625,    0,  618,    0,  629,  629,  630,  630,
-      629,  620,  630,  626,  631,  631,  627,    0,  631,  629,
-
-        0,  621,    0,    0,  619,    0,  621,  632,  632,  631,
-        0,  632,  622,  624,  625,  633,  633,  628,    0,  633,
-      636,  636,  630,  624,  636,  626,    0,    0,  627,    0,
-      625,  629,    0,  634,  634,  626,    0,  634,    0,  633,
-        0,  631,  635,  635,  627,    0,  635,    0,  634,    0,
-        0,  637,  637,  635,  630,  637,    0,    0,  629,    0,
-      630,  636,    0,  638,  638,    0,  631,  638,  639,  639,
-        0,  633,  639,  640,  640,    0,  638,  640,    0,  632,
-      634,  637,  641,  641,    0,  635,  641,  633,  640,  642,
-      642,    0,  636,  642,    0,    0,    0,    0,  639,  641,
-
-      642,    0,  643,  643,    0,  634,  643,    0,  638,    0,
-        0,    0,    0,  637,  635,  643,    0,  644,  644,    0,
-      640,  644,    0,  637,  645,  645,    0,    0,  645,    0,
-      639,  641,  642,  646,  646,  638,    0,  646,  647,  647,
-      639,    0,  647,  645,    0,  640,    0,  643,  650,  650,
-        0,    0,  650,  647,  641,  646,  648,  648,  644,    0,
-      648,  642,  649,  649,    0,    0,  649,    0,  651,  651,
-        0,    0,  651,    0,  643,  645,    0,  650,    0,  651,
-      652,  652,    0,    0,  652,  647,  648,  646,    0,  644,
-      653,  653,    0,    0,  653,    0,  645,    0,  655,  655,
-
-      654,  654,  655,  649,  654,  646,    0,    0,    0,  650,
-      647,  651,    0,  654,    0,  656,  656,    0,  648,  656,
-      650,    0,  657,  657,    0,  654,  657,    0,  648,  658,
-      658,  659,  659,  658,  649,  659,    0,  660,  660,    0,
-      651,  660,    0,  656,    0,  654,  661,  661,  657,    0,
-      661,    0,  652,  658,    0,  664,    0,  654,    0,    0,
-        0,    0,  653,  664,  664,  664,  664,  664,  664,    0,
-      655,    0,  654,    0,    0,  656,    0,    0,    0,    0,
-      657,    0,  680,  680,    0,  658,  680,  656,    0,    0,
-        0,    0,    0,    0,  657,  664,  664,  664,  664,  664,
-
-      664,  658,  665,  659,  681,  681,    0,    0,  681,  660,
-      665,  665,  665,  665,  665,  665,  666,    0,  661,    0,
-        0,    0,  667,  681,  666,  666,  666,  666,  666,  666,
-      667,  667,  667,  667,  667,  667,    0,    0,    0,    0,
-      668,    0,  665,  665,  665,  665,  665,  665,  668,  668,
-      668,  668,  668,  668,  680,  681,  666,  666,  666,  666,
-      666,  666,  667,  667,  667,  667,  667,  667,    0,    0,
-        0,    0,    0,  684,  684,    0,  681,  684,  669,    0,
-      668,  668,  668,  668,  668,  668,  669,  669,  669,  669,
-      669,  669,  670,  683,  683,  682,  682,  683,  671,  682,
-
-      670,  670,  670,  670,  670,  670,  671,  671,  671,  671,
-      671,  671,  682,  687,  687,    0,    0,  687,  669,  669,
-      669,  669,  669,  669,  683,  685,  685,  686,  686,  685,
-        0,  686,  670,  670,  670,  670,  670,  670,  671,  671,
-      671,  671,  671,  671,  682,  684,  688,  688,  689,  689,
-      688,  685,  689,    0,    0,    0,  683,  686,  690,  690,
-      689,    0,  690,    0,    0,  683,    0,  682,  691,  691,
-        0,  690,  691,  692,  692,  693,  693,  692,    0,  693,
-      694,  694,    0,  685,  694,  687,    0,  691,    0,  686,
-      695,  695,  689,    0,  695,    0,    0,  685,    0,  686,
-
-      696,  696,    0,  690,  696,  694,    0,  697,  697,  698,
-      698,  697,    0,  698,    0,    0,  696,    0,  688,  691,
-      689,  699,  699,  700,  700,  699,    0,  700,  701,  701,
-      690,  697,  701,    0,  702,  702,    0,  694,  702,    0,
-      691,    0,  699,    0,    0,  692,    0,  693,  696,  703,
-      703,  700,  694,  703,    0,    0,  702,    0,  701,    0,
-      705,  705,  695,  697,  705,    0,  706,  706,    0,    0,
-      706,    0,  696,    0,  699,    0,    0,    0,    0,  697,
-      706,  698,    0,  700,    0,  707,  707,    0,  702,  707,
-      701,    0,    0,  699,    0,  700,    0,  708,  708,    0,
-
-      701,  708,    0,  709,  709,    0,  702,  709,  708,  710,
-      710,    0,  706,  710,  709,  711,  711,    0,    0,  711,
-        0,  703,  712,  712,  713,  713,  712,    0,  713,  711,
-      714,  714,  705,    0,  714,  716,  716,    0,  706,  716,
-      708,  715,  715,  717,  717,  715,  709,  717,    0,  718,
-      718,  712,  713,  718,    0,    0,    0,  707,  717,  714,
-        0,  711,    0,  715,  719,  719,    0,    0,  719,  708,
-      720,  720,  721,  721,  720,  709,  721,    0,  722,  722,
-        0,  710,  722,  712,  713,  720,    0,  711,  731,  731,
-      717,  714,  731,    0,  712,  715,  713,    0,    0,  723,
-
-      723,  721,  714,  723,    0,  724,  724,  716,  722,  724,
-      725,  725,    0,  715,  725,  717,    0,  720,  726,  726,
-        0,  718,  726,  731,  723,  725,  730,  730,  727,  727,
-      730,  726,  727,  721,    0,  724,  719,  728,  728,    0,
-      722,  728,  720,    0,  721,  729,  729,  727,  730,  729,
-      722,    0,    0,  728,    0,  731,  723,  725,  732,  732,
-      731,    0,  732,  726,  733,  733,    0,  724,  733,  734,
-      734,  723,    0,  734,    0,  729,    0,  724,    0,  727,
-      730,    0,  725,  735,  735,  728,  732,  735,    0,    0,
-      726,    0,    0,    0,  733,    0,    0,  735,  730,    0,
-
-      727,    0,  737,    0,  744,  744,    0,  729,  744,  728,
-      737,  737,  737,  737,  737,  737,    0,  729,  732,    0,
-      749,  749,    0,    0,  749,    0,  733,    0,    0,  735,
-      732,    0,    0,    0,  745,  745,  733,    0,  745,    0,
-      738,  734,  737,  737,  737,  737,  737,  737,  738,  738,
-      738,  738,  738,  738,  739,  735,    0,  746,  746,  745,
-      740,  746,  739,  739,  739,  739,  739,  739,  740,  740,
-      740,  740,  740,  740,  747,  747,  744,    0,  747,    0,
-      738,  738,  738,  738,  738,  738,  746,  747,    0,  752,
-      752,  745,  749,  752,  739,  739,  739,  739,  739,  739,
-
-      740,  740,  740,  740,  740,  740,  745,  748,  748,  750,
-      750,  748,    0,  750,    0,    0,  753,  753,  746,  747,
-      753,  752,  748,    0,  750,    0,    0,  751,  751,  746,
-        0,  751,  754,  754,    0,    0,  754,  755,  755,    0,
-      753,  755,    0,  756,  756,    0,  747,  756,  757,  757,
-      755,  754,  757,  752,  748,    0,  750,  751,    0,  757,
-        0,  752,  758,  758,  759,  759,  758,    0,  759,  761,
-      761,    0,  753,  761,    0,  758,  762,  762,    0,  748,
-      762,  750,  755,  754,    0,    0,  764,  764,  753,  751,
-      764,  757,  763,  763,    0,    0,  763,    0,  762,  751,
-
-        0,  765,  765,    0,  754,  765,    0,  758,    0,  755,
-      766,  766,  767,  767,  766,  756,  767,  769,  769,    0,
-      757,  769,  763,  768,  768,  770,  770,  768,    0,  770,
-      762,  771,  771,  766,  758,  771,  759,    0,    0,  772,
-      772,  761,  768,  772,    0,    0,  773,  773,  762,    0,
-      773,  774,  774,  767,  763,  774,    0,    0,  764,    0,
-      771,    0,    0,    0,  763,  766,    0,  775,  775,    0,
-      774,  775,  773,  765,  768,  776,  776,  777,  777,  776,
-        0,  777,  766,    0,  767,    0,  778,  778,    0,  769,
-      778,    0,  771,    0,    0,  768,  775,  770,    0,    0,
-
-        0,  777,  774,  771,  773,  776,  779,  779,  778,    0,
-      779,  772,  780,  780,    0,    0,  780,    0,  773,    0,
-        0,  781,  781,  774,    0,  781,  784,  784,  775,    0,
-      784,    0,    0,  777,  781,  779,    0,  776,    0,  775,
-      778,  782,  782,    0,    0,  782,    0,  776,    0,  777,
-      783,  783,    0,  780,  783,  782,    0,    0,  778,    0,
-      786,    0,    0,    0,    0,  783,  781,  779,  786,  786,
-      786,  786,  786,  786,    0,    0,    0,    0,  779,    0,
-        0,  792,  792,    0,  780,  792,    0,  782,    0,    0,
-        0,    0,    0,  781,    0,    0,    0,  783,  784,  787,
-
-      786,  786,  786,  786,  786,  786,  788,  787,  787,  787,
-      787,  787,  787,  782,  788,  788,  788,  788,  788,  788,
-      789,    0,  783,  794,  794,    0,    0,  794,  789,  789,
-      789,  789,  789,  789,  791,  791,    0,    0,  791,  787,
-      787,  787,  787,  787,  787,    0,  788,  788,  788,  788,
-      788,  788,    0,  792,    0,  793,  793,    0,  791,  793,
-      789,  789,  789,  789,  789,  789,  795,  795,  796,  796,
-      795,    0,  796,  797,  797,  798,  798,  797,    0,  798,
-      801,  801,  799,  799,  801,  793,  799,    0,  797,    0,
-      791,    0,  800,  800,    0,  794,  800,  799,    0,    0,
-
-      802,  802,  801,    0,  802,    0,  791,  800,  804,  804,
-      805,  805,  804,    0,  805,  806,  806,  793,  802,  806,
-      797,    0,  809,  809,    0,  805,  809,  793,    0,  799,
-        0,    0,  813,  813,  801,    0,  813,    0,  795,  800,
-      796,    0,  807,  807,    0,  797,  807,  798,    0,    0,
-      802,  813,  801,    0,  799,  808,  808,  805,    0,  808,
-        0,  810,  810,    0,  800,  810,    0,  807,  807,    0,
-        0,  807,  802,  811,  811,  812,  812,  811,  808,  812,
-      804,    0,  805,  813,  814,  814,    0,  806,  814,  816,
-      816,  810,    0,  816,  809,    0,    0,  814,    0,  807,
-
-      807,    0,    0,  807,  813,  811,    0,  815,  815,    0,
-      808,  815,    0,    0,  807,    0,  812,    0,  815,    0,
-      817,  817,    0,  810,  817,    0,    0,  808,    0,  814,
-        0,  817,    0,  810,    0,  818,  818,  811,    0,  818,
-      819,  819,  820,  820,  819,  811,  820,  812,    0,    0,
-      815,    0,    0,    0,    0,  819,  814,  818,    0,    0,
-        0,  816,    0,  817,    0,  826,  826,    0,    0,  826,
-        0,  820,  827,  827,    0,    0,  827,    0,    0,  815,
-        0,    0,    0,    0,    0,  821,    0,  819,    0,  818,
-        0,    0,  817,  821,  821,  821,  821,  821,  821,    0,
-
-      828,  828,    0,  820,  828,  830,  830,  818,  822,  830,
-        0,    0,  819,    0,  820,    0,  822,  822,  822,  822,
-      822,  822,    0,  823,    0,  821,  821,  821,  821,  821,
-      821,  823,  823,  823,  823,  823,  823,  826,  831,  831,
-        0,    0,  831,    0,  827,    0,  824,    0,  822,  822,
-      822,  822,  822,  822,  824,  824,  824,  824,  824,  824,
-        0,    0,    0,  823,  823,  823,  823,  823,  823,  829,
-      829,    0,  828,  829,    0,    0,    0,  830,  832,  832,
-      833,  833,  832,  829,  833,    0,  824,  824,  824,  824,
-      824,  824,    0,  832,  834,  834,  835,  835,  834,    0,
-
-      835,  836,  836,  837,  837,  836,    0,  837,  838,  838,
-      831,    0,  838,  839,  839,  829,    0,  839,    0,  840,
-      840,    0,  837,  840,    0,  832,    0,  838,  839,    0,
-      841,  841,  842,  842,  841,    0,  842,    0,    0,  843,
-      843,  829,  836,  843,  840,  844,  844,  847,  847,  844,
-      832,  847,  833,    0,  837,  841,  843,  852,  852,  838,
-      839,  852,  842,  845,  845,    0,  834,  845,  835,    0,
-        0,    0,    0,  836,  844,  837,  840,  847,  845,    0,
-      838,    0,    0,    0,    0,  839,    0,  841,  843,    0,
-        0,  840,  846,  846,  842,    0,  846,    0,    0,    0,
-
-        0,    0,  841,    0,  842,    0,  844,    0,    0,  847,
-      845,  843,    0,  848,    0,    0,    0,  844,    0,  847,
-      846,  848,  848,  848,  848,  848,  848,    0,  849,  852,
-        0,    0,    0,    0,  850,  845,  849,  849,  849,  849,
-      849,  849,  850,  850,  850,  850,  850,  850,    0,    0,
-        0,    0,  846,  848,  848,  848,  848,  848,  848,  854,
-      854,  856,  856,  854,  846,  856,    0,    0,  849,  849,
-      849,  849,  849,  849,  850,  850,  850,  850,  850,  850,
-      851,  853,  853,    0,  854,  853,  856,    0,  851,  851,
-      851,  851,  851,  851,  857,  857,  855,  855,  857,    0,
-
-      855,    0,    0,  858,  858,  859,  859,  858,    0,  859,
-      853,  860,  860,  861,  861,  860,  854,  861,  856,    0,
-      851,  851,  851,  851,  851,  851,  855,  858,    0,  859,
-        0,  854,    0,  856,  862,  862,  863,  863,  862,    0,
-      863,    0,  853,  864,  864,  865,  865,  864,    0,  865,
-      866,  866,    0,  853,  866,    0,  867,  867,  855,  858,
-      867,  859,    0,  868,  868,  863,  857,  868,  855,  869,
-      869,    0,    0,  869,    0,  858,    0,  859,  870,  870,
-      871,  871,  870,  860,  871,  861,  865,  872,  872,    0,
-        0,  872,    0,  869,  873,  873,    0,  863,  873,    0,
-
-      870,  874,  874,  875,  875,  874,  862,  875,  863,  876,
-      876,    0,    0,  876,    0,  864,    0,  865,    0,  873,
-      877,  877,  866,    0,  877,  869,  878,  878,  867,    0,
-      878,    0,  870,  876,    0,  868,  879,  879,  875,    0,
-      879,  869,  880,  880,    0,    0,  880,    0,  878,    0,
-      870,  873,  871,    0,    0,    0,    0,    0,    0,  872,
-        0,    0,    0,    0,    0,  876,  873,    0,    0,    0,
-      875,  879,    0,  874,    0,  875,    0,    0,    0,    0,
-      878,  876,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,  877,    0,    0,    0,    0,    0,  878,    0,
-
-        0,    0,    0,  879,    0,    0,    0,    0,  879,    0,
-        0,    0,    0,    0,  880,  882,  882,  882,  882,  882,
-      882,  882,  882,  882,  882,  882,  882,  882,  882,  882,
-      882,  882,  882,  883,  883,  883,  883,  883,  883,  883,
-      883,  883,  883,  883,  883,  883,  883,  883,  883,  883,
-      883,  884,  884,  884,  884,  884,  884,  884,  884,  884,
-      884,  884,  884,  884,  884,  884,  884,  884,  884,  885,
-      885,  885,  885,  885,  885,  885,  885,  885,  885,  885,
-      885,  885,  885,  885,  885,  885,  885,  886,  886,  886,
-      886,  886,  886,  886,  886,  886,  886,  886,  886,  886,
-
-      886,  886,  886,  886,  886,  887,  887,  887,  887,  887,
-      887,  887,  887,  887,  887,  887,  887,  887,  887,  887,
-      887,  887,  887,  888,  888,  888,  888,  888,  888,  888,
-      888,  888,  888,  888,  888,  888,  888,  888,  888,  888,
-      888,  889,  889,  889,  889,  889,  889,  889,  889,  889,
-      889,  889,  889,  889,  889,  889,  889,  889,  889,  890,
-      890,  890,  890,  890,  890,  890,  890,  890,  890,  890,
-      890,  890,  890,  890,  890,  890,  890,  891,  891,  891,
-      891,  891,  891,  891,  891,  891,  891,  891,  891,  891,
-      891,  891,  891,  891,  891,  892,  892,  892,  892,  892,
-
-      892,  892,  892,  892,  892,  892,  892,  892,  892,  892,
-      892,  892,  892,  893,    0,  893,  893,  893,  893,  893,
-      893,  893,  893,  893,  893,  893,  893,    0,  893,  893,
-      893,  894,  894,  894,  894,  894,  894,  894,  894,  894,
-      894,  894,  894,  894,  894,  894,  894,  894,  894,  895,
-      895,  895,  895,    0,  895,  896,    0,  896,  896,  896,
-      896,  896,  896,  896,  896,  896,  896,  896,  896,    0,
-      896,  896,  896,  897,    0,    0,  897,    0,  897,    0,
-      897,  898,    0,  898,  898,  898,  898,  898,  898,  898,
-      898,  898,    0,  898,    0,  898,  899,  899,  899,  899,
-
-        0,  899,  901,  901,    0,  901,  901,    0,  901,    0,
-      901,    0,  901,  902,    0,  902,  902,    0,  902,    0,
-      902,  903,  903,    0,  903,  903,    0,  903,    0,  903,
-        0,  903,  904,    0,    0,  904,  904,    0,  904,  904,
-      904,  904,  904,  904,  904,  904,  904,  904,  904,  904,
-      905,    0,    0,  905,    0,  905,  905,  905,  905,  905,
-      905,  905,  905,  905,  905,  905,  905,  905,  906,    0,
-        0,  906,  906,  906,  906,  906,  906,  906,  906,  906,
-      906,  906,  906,  906,  906,  906,  907,    0,    0,  907,
-      907,  907,  907,  907,  907,  907,  907,  907,  907,  907,
-
-      907,  907,  907,  907,  908,  908,  908,  908,    0,    0,
-        0,    0,  908,    0,  908,  908,  908,  908,  908,  908,
-        0,  908,  909,    0,    0,  909,    0,  909,  909,  909,
-      909,  909,  909,  909,  909,  909,  909,  909,  909,  909,
-      910,    0,    0,  910,  910,  910,  910,  910,  910,    0,
-      910,  910,  910,  910,  910,  910,  910,  910,  911,    0,
-        0,  911,  911,    0,  911,  911,  911,  911,  911,  911,
-      911,  911,    0,  911,  911,  911,  912,  912,  912,  912,
-      912,  912,  912,  912,  912,  912,  912,  912,  912,  912,
-      912,  912,  912,  912,  913,    0,  913,  913,  913,  913,
-
-      913,  913,  913,  913,  913,  913,  913,  913,    0,  913,
-      913,  913,  914,    0,  914,  914,  914,  914,  914,  914,
-      914,  914,  914,  914,  914,  914,    0,  914,  914,  914,
-      915,    0,    0,  915,    0,  915,    0,  915,  916,    0,
-      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
-      916,  916,    0,  916,  916,  916,  917,  917,    0,  917,
-        0,    0,  917,    0,  917,    0,  917,  918,    0,  918,
-      918,  918,  918,  918,  918,  918,  918,  918,    0,  918,
-        0,  918,  919,    0,    0,  919,    0,  919,    0,  919,
-      921,    0,    0,  921,  921,    0,  921,    0,    0,  921,
-
-        0,  921,    0,  921,  922,  922,    0,  922,  922,    0,
-      922,    0,  922,    0,  922,  923,    0,    0,  923,    0,
-      923,    0,  923,  924,    0,    0,    0,  924,    0,    0,
-        0,    0,  924,    0,  924,  925,    0,  925,    0,    0,
-      925,    0,  925,  926,    0,    0,  926,    0,  926,    0,
-      926,  927,    0,    0,  927,  927,    0,  927,  927,  927,
-      927,  927,  927,  927,  927,  927,  927,  927,  927,  928,
-        0,    0,  928,    0,  928,  928,  928,  928,  928,  928,
-      928,  928,  928,  928,  928,  928,  928,  929,    0,    0,
-      929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
-
-      929,  929,  929,  929,  929,  930,    0,    0,  930,  930,
-      930,  930,  930,  930,  930,  930,  930,  930,  930,  930,
-      930,  930,  930,  931,  931,  931,  931,    0,    0,    0,
-        0,  931,    0,  931,  931,  931,  931,  931,  931,    0,
-      931,  932,    0,    0,  932,  932,  932,  932,  932,  932,
-      932,  932,  932,  932,  932,  932,  932,  932,  932,  933,
-      933,  933,  933,  933,  933,  933,  933,  933,  933,  933,
-      933,  933,  933,  933,  933,  933,  933,  934,    0,    0,
-      934,  934,  934,  934,  934,  934,    0,  934,  934,  934,
-      934,  934,  934,  934,  934,  935,    0,    0,  935,  935,
-
-        0,  935,  935,  935,  935,  935,  935,  935,  935,    0,
-      935,  935,  935,  936,    0,    0,  936,  936,    0,  936,
-      936,  936,  936,  936,  936,  936,  936,    0,  936,  936,
-      936,  937,    0,    0,  937,  937,    0,  937,  937,  937,
-      937,  937,  937,  937,  937,    0,  937,  937,  937,  938,
-        0,  938,  938,  938,    0,  938,  938,  938,  938,  938,
-      938,  938,  938,    0,  938,  938,  938,  939,  939,    0,
-      939,  939,    0,  939,  939,  939,  939,  939,  939,  939,
-      939,    0,  939,  939,  939,  940,    0,    0,  940,    0,
-      940,    0,  940,  941,    0,    0,  941,  941,  941,  941,
-
-      941,  941,  941,  941,  941,  941,  941,    0,  941,  941,
-      941,  942,    0,    0,    0,    0,    0,  942,    0,    0,
-      942,    0,  942,  943,  943,    0,  943,    0,    0,  943,
-        0,  943,    0,  943,  944,    0,    0,  944,    0,  944,
-        0,  944,  945,    0,    0,  945,  945,  945,  945,  945,
-      945,  945,  945,  945,  945,  945,    0,  945,  945,  945,
-      946,    0,    0,    0,    0,    0,  946,    0,    0,  946,
-        0,  946,  948,    0,    0,  948,  948,  948,  948,  948,
-      948,  948,  948,  948,  948,  948,    0,  948,  948,  948,
-      949,    0,    0,  949,  949,    0,  949,    0,    0,  949,
-
-        0,  949,    0,  949,  950,  950,    0,  950,  950,    0,
-      950,    0,  950,    0,  950,  951,  951,    0,  951,  951,
-        0,  951,    0,  951,    0,  951,  952,    0,    0,    0,
-        0,    0,    0,    0,    0,  952,    0,  952,  953,    0,
-      953,    0,    0,  953,    0,  953,  954,  954,    0,  954,
-        0,    0,  954,    0,  954,    0,  954,  955,    0,    0,
-      955,  955,    0,  955,  955,  955,  955,  955,  955,  955,
-      955,  955,  955,  955,  955,  956,    0,    0,  956,    0,
-      956,  956,  956,  956,  956,  956,  956,  956,  956,  956,
-      956,  956,  956,  957,  957,  957,  957,  957,  957,  957,
-
-      957,  957,  957,  957,  957,  957,  957,  957,  957,  957,
-      957,  958,    0,    0,  958,  958,    0,  958,  958,  958,
-      958,  958,  958,  958,  958,    0,  958,  958,  958,  959,
-        0,    0,  959,  959,    0,  959,  959,  959,  959,  959,
-      959,  959,  959,    0,  959,  959,  959,  960,    0,    0,
-      960,  960,    0,  960,  960,  960,  960,  960,  960,  960,
-      960,    0,  960,  960,  960,  961,    0,    0,  961,  961,
-        0,  961,  961,  961,  961,  961,  961,  961,  961,    0,
-      961,  961,  961,  962,    0,    0,  962,  962,  962,  962,
-      962,  962,  962,  962,  962,  962,  962,    0,  962,  962,
-
-      962,  963,    0,    0,  963,  963,  963,  963,  963,  963,
-      963,  963,  963,  963,  963,    0,  963,  963,  963,  964,
-        0,    0,  964,    0,  964,  965,    0,    0,    0,    0,
-        0,    0,    0,    0,  965,    0,  965,  966,    0,  966,
-        0,    0,  966,    0,  966,  967,    0,    0,  967,  967,
-      967,  967,  967,  967,  967,  967,  967,  967,  967,    0,
-      967,  967,  967,  968,    0,    0,  968,  968,  968,  968,
-      968,  968,  968,  968,  968,  968,  968,    0,  968,  968,
-      968,  969,    0,    0,  969,    0,  969,  970,    0,    0,
-        0,    0,    0,    0,    0,    0,  970,    0,  970,  971,
-
-        0,  971,    0,    0,  971,    0,  971,  972,    0,    0,
-      972,    0,    0,  972,  973,    0,    0,  973,  973,  973,
-      973,  973,  973,  973,  973,  973,  973,  973,    0,  973,
-      973,  973,  974,    0,    0,  974,  974,  974,  974,  974,
-      974,  974,  974,  974,  974,  974,    0,  974,  974,  974,
-      975,  975,    0,  975,  975,    0,  975,    0,  975,    0,
-      975,  976,  976,    0,  976,  976,    0,  976,    0,  976,
-        0,  976,  977,  977,    0,  977,  977,    0,  977,    0,
-      977,    0,  977,  978,    0,  978,    0,    0,  978,    0,
-      978,  979,    0,  979,    0,    0,  979,    0,  979,  980,
-
-      980,    0,  980,    0,    0,  980,    0,  980,    0,  980,
-      981,    0,    0,  981,  981,  981,  981,  981,  981,  981,
-      981,  981,  981,  981,    0,  981,  981,  981,  982,    0,
-        0,  982,    0,  982,  983,    0,    0,    0,    0,    0,
-        0,  983,    0,  983,    0,  983,  984,    0,    0,  984,
-      984,  984,  984,  984,  984,  984,  984,  984,  984,  984,
-        0,  984,  984,  984,  985,    0,    0,  985,    0,  985,
-      986,    0,    0,    0,    0,    0,    0,  986,    0,  986,
-        0,  986,  987,    0,    0,  987,  987,    0,  987,    0,
-        0,  987,    0,  987,    0,  987,  988,    0,    0,    0,
-
-        0,    0,    0,    0,    0,  988,    0,  988,  989,    0,
-        0,  989,  989,  989,  989,  989,  989,  989,  989,  989,
-      989,  989,    0,  989,  989,  989,  990,  990,    0,  990,
-      990,    0,  990,    0,  990,    0,  990,  991,    0,    0,
-      991,    0,  991,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881,  881,  881,  881,  881,  881,  881,  881,
-      881,  881,  881
+        3,    3,    3,    5,    5,    6,    6,    7,    7,   58,
+        7,    5,   58,    6,    8,    8,  316,    8,    9,    9,
+       10,   10,   11,   11,   64,   11,    9,   64,   10,   12,
+       12,   34,   12,   34,   13,   13,   13,   21,   21,   13,
+
+      289,    5,   75,    6,   13,    7,   22,   22,   21,   14,
+       14,   14,    8,   21,   14,  289,    9,   22,   10,   14,
+       11,  308,   22,   13,   15,   15,   15,   12,   15,   15,
+       35,   35,   75,   15,   15,   16,   16,   16,   14,   16,
+       16,   13,   23,   23,   16,   16,   17,   17,   17,   69,
+       23,   17,   18,   18,   18,   36,   14,   18,   24,   24,
+       36,  305,   47,   74,   47,   80,   24,   50,   50,   69,
+       54,   54,  295,   17,   54,   79,   47,   60,   60,   18,
+       23,   60,   15,   74,   78,   78,   83,   83,  294,   83,
+       84,   17,   78,   16,   47,   79,   24,   18,   19,   19,
+
+       80,   19,   88,   88,   95,   95,   19,   19,   19,   90,
+       84,  103,   19,  291,   19,  117,   54,  102,  102,  127,
+      117,  127,   78,   60,   83,  123,  123,  129,   90,  130,
+      130,  103,  132,  132,  141,  142,  214,  156,  143,  129,
+      143,  151,  152,  144,  151,  144,  141,  142,  144,  156,
+      214,  162,  143,  152,  152,   19,  152,   19,   20,   20,
+      157,   20,  167,  157,  141,  142,   20,   20,   20,  173,
+      143,  162,   20,  171,   20,  153,  153,  160,  172,  153,
+      160,  180,  167,  290,  177,  177,  182,  189,  181,  173,
+      186,  186,  177,  186,  196,  196,  287,  218,  284,  152,
+
+      225,  246,  246,  171,  242,  324,  182,  189,  172,  218,
+      281,  225,  225,  304,  225,   20,  180,   20,  134,  248,
+      248,  153,  177,  181,  242,  324,  283,  218,  186,  281,
+      226,  226,  304,  134,  226,  267,  267,  315,  272,  267,
+      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
+      134,  134,  271,  270,  269,  315,  134,  225,  134,  134,
+      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
+      134,  134,  215,  266,  215,  215,  226,  265,  264,  263,
+      261,  267,  215,  215,  215,  215,  215,  215,  215,  215,
+      215,  215,  215,  215,  259,  268,  268,  257,  215,  268,
+
+      215,  215,  215,  215,  215,  215,  215,  215,  215,  215,
+      215,  215,  215,  215,  216,  293,  293,  256,  255,  293,
+      254,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  292,  309,  309,  318,  318,  309,  253,
+      318,  268,  252,  375,  292,  292,  375,  292,  251,  376,
+      377,  375,  376,  377,  247,  238,  378,  376,  377,  378,
+      381,  293,  382,  381,  378,  382,  385,  234,  381,  385,
+      382,  229,  228,  386,  385,  407,  386,  227,  407,  224,
+      309,  386,  318,  407,  222,  221,  220,  219,  213,  211,
+      292,  335,  335,  335,  335,  335,  335,  335,  335,  335,
+
+      335,  335,  335,  335,  335,  335,  335,  335,  335,  335,
+      335,  335,  336,  336,  336,  336,  336,  336,  336,  336,
+      336,  336,  336,  336,  336,  336,  336,  336,  336,  336,
+      336,  336,  336,  337,  337,  337,  337,  337,  337,  337,
+      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
+      337,  337,  337,  337,  338,  338,  338,  338,  338,  338,
+      338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
+      338,  338,  338,  338,  338,  339,  339,  339,  339,  339,
+      339,  339,  339,  339,  339,  339,  339,  339,  339,  339,
+      339,  339,  339,  339,  339,  339,  340,  340,  340,  340,
+
+      340,  340,  340,  340,  340,  340,  340,  340,  340,  340,
+      340,  340,  340,  340,  340,  340,  340,  341,  341,  341,
+      341,  341,  341,  341,  341,  341,  341,  341,  341,  341,
+      341,  341,  341,  341,  341,  341,  341,  341,  342,  342,
+      342,  342,  342,  342,  342,  342,  342,  342,  342,  342,
+      342,  342,  342,  342,  342,  342,  342,  342,  342,  343,
+      343,  343,  343,  343,  343,  343,  343,  343,  343,  343,
+      343,  343,  343,  343,  343,  343,  343,  343,  343,  343,
+      344,  344,  344,  344,  344,  344,  344,  344,  344,  344,
+      344,  344,  344,  344,  344,  344,  344,  344,  344,  344,
+
+      344,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  345,  345,  345,  345,  345,  345,  345,  345,
+      345,  345,  346,  208,  346,  346,  346,  346,  346,  346,
+      346,  346,  346,  346,  346,  346,  346,  346,  207,  346,
+      346,  346,  346,  347,  347,  347,  347,  347,  347,  347,
+      347,  347,  347,  347,  347,  347,  347,  347,  347,  347,
+      347,  347,  347,  347,  348,  348,  348,  348,  348,  348,
+      206,  348,  348,  349,  199,  349,  349,  349,  349,  349,
+      349,  349,  349,  349,  349,  349,  349,  349,  349,  198,
+      349,  349,  349,  349,  350,  195,  191,  350,  350,  350,
+
+      190,  350,  350,  185,  350,  351,  184,  351,  351,  351,
+      351,  351,  351,  351,  351,  351,  351,  351,  408,  351,
+      351,  408,  351,  352,  352,  352,  408,  176,  352,  353,
+      353,  175,  353,  353,  166,  353,  353,  353,  161,  353,
+      353,  150,  353,  354,  147,  354,  354,  146,  354,  354,
+      354,  145,  354,  354,  355,  355,  138,  355,  355,  137,
+      355,  355,  355,  131,  355,  355,  128,  355,  356,  124,
+      122,  356,  356,  121,  356,  356,  356,  356,  356,  356,
+      356,  356,  356,  356,  356,  356,  356,  356,  356,  357,
+      357,  409,  120,  118,  409,  115,  112,  111,  106,  409,
+
+      357,  357,  105,  357,  358,  101,  100,  358,   96,  358,
+      358,  358,  358,  358,  358,  358,  358,  358,  358,  358,
+      358,  358,  358,  358,  358,  359,  359,  410,   94,   93,
+      410,   92,   87,   86,   82,  410,  359,  359,   81,  359,
+      360,   77,   76,  360,  360,  360,  360,  360,  360,  360,
+      360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
+      360,  361,  361,  412,   72,   71,  412,   70,   67,   66,
+       65,  412,  361,  361,   62,  361,  362,   57,   52,  362,
+      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
+      362,  362,  362,  362,  362,  362,  362,  363,  363,  413,
+
+       45,   42,  413,   41,   38,   37,   33,  413,  363,  363,
+       32,  363,  364,  364,  364,  364,   31,   30,   27,    0,
+      364,    0,  364,  364,  364,  364,  364,  364,  364,  364,
+      364,    0,  364,  365,    0,    0,  365,    0,  365,  365,
+      365,  365,  365,  365,  365,  365,  365,  365,  365,  365,
+      365,  365,  365,  365,  366,    0,    0,  366,  366,  366,
+      366,  366,  366,    0,  366,  366,  366,  366,  366,  366,
+      366,  366,  366,  366,  366,  367,    0,    0,  367,  367,
+        0,  367,  367,  367,  367,  367,  367,  367,  367,  367,
+      367,    0,  367,  367,  367,  367,  368,  368,  368,  368,
+
+      368,  368,  368,  368,  368,  368,  368,  368,  368,  368,
+      368,  368,  368,  368,  368,  368,  368,  369,    0,  369,
+      369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
+      369,  369,  369,    0,  369,  369,  369,  369,  370,    0,
+        0,  370,  370,  370,    0,  370,  370,    0,  370,  371,
+      371,    0,  371,    0,    0,  371,  371,  371,    0,  371,
+      371,    0,  371,  372,    0,    0,  372,  372,    0,  372,
+        0,    0,  372,  372,  372,  415,  372,  372,  415,  372,
+      373,    0,    0,  415,  373,    0,    0,    0,    0,  373,
+      373,  373,    0,  373,  373,  374,    0,    0,  374,  374,
+
+      374,    0,  374,  374,    0,  374,  379,    0,    0,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  380,  380,  416,
+        0,    0,  416,    0,    0,    0,    0,  416,  380,  380,
+        0,  380,  383,    0,    0,  383,  383,  383,  383,  383,
+      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  384,  384,  423,    0,    0,  423,    0,
+        0,    0,    0,  423,  384,  384,    0,  384,  387,  387,
+      387,  387,    0,    0,    0,    0,  387,    0,  387,  387,
+      387,  387,  387,  387,  387,  387,  387,    0,  387,  388,
+
+        0,    0,  388,  388,  388,  388,  388,  388,  388,  388,
+      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
+      389,  389,  389,  389,  389,  389,  389,  389,  389,  389,
+      389,  389,  389,  389,  389,  389,  389,  389,  389,  389,
+      389,  390,    0,    0,  390,  390,  390,  390,  390,  390,
+        0,  390,  390,  390,  390,  390,  390,  390,  390,  390,
+      390,  390,  391,    0,    0,  391,  391,    0,  391,  391,
+      391,  391,  391,  391,  391,  391,  391,  391,    0,  391,
+      391,  391,  391,  392,    0,    0,  392,  392,    0,  392,
+      392,  392,  392,  392,  392,  392,  392,  392,  392,    0,
+
+      392,  392,  392,  392,  393,    0,    0,  393,  393,    0,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+        0,  393,  393,  393,  393,  394,    0,  394,  394,  394,
+        0,  394,  394,  394,  394,  394,  394,  394,  394,  394,
+      394,    0,  394,  394,  394,  394,  395,  395,    0,  395,
+      395,    0,  395,  395,  395,  395,  395,  395,  395,  395,
+      395,  395,    0,  395,  395,  395,  395,  396,    0,    0,
+      396,  396,  396,    0,  396,  396,    0,  396,  397,    0,
+        0,  397,  397,  397,  397,  397,  397,  397,  397,  397,
+      397,  397,  397,  397,    0,  397,  397,  397,  397,  398,
+
+        0,    0,    0,  424,    0,  398,  424,    0,  398,  398,
+      398,  424,  398,  398,  399,  399,    0,  399,    0,    0,
+      399,  399,  399,    0,  399,  399,  425,  399,  400,  425,
+        0,  400,  400,  400,  425,    0,  400,  401,    0,    0,
+      401,  401,  401,  401,  401,  401,  401,  401,  401,  401,
+      401,  401,  401,    0,  401,  401,  401,  401,  402,    0,
+        0,  402,  402,    0,  402,    0,    0,  402,  402,  402,
+        0,  402,  402,    0,  402,  403,  403,    0,  403,  403,
+        0,  403,  403,  403,  426,  403,  403,  426,  403,  404,
+        0,    0,  426,  427,    0,    0,  427,    0,  404,  404,
+
+      404,  427,  404,  404,  405,    0,  405,    0,    0,  405,
+      405,  405,    0,  405,  405,  406,  406,    0,  406,    0,
+        0,  406,  406,  406,    0,  406,  406,    0,  406,  411,
+        0,    0,  411,  411,    0,  411,  411,  411,  411,  411,
+      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
+      414,    0,    0,  414,    0,  414,  414,  414,  414,  414,
+      414,  414,  414,  414,  414,  414,  414,  414,  414,  414,
+      414,  417,    0,    0,  417,  417,  417,  417,  417,  417,
+      417,  417,  417,  417,  417,  417,  417,    0,  417,  417,
+      417,  417,  418,    0,    0,  418,  418,  418,    0,  418,
+
+      418,  419,    0,    0,    0,  428,    0,    0,  428,    0,
+      419,  419,  419,  428,  419,  419,  420,    0,    0,  420,
+      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
+      420,  420,    0,  420,  420,  420,  420,  421,  421,    0,
+      421,  421,    0,  421,  421,  421,  429,  421,  421,  429,
+      421,  422,    0,  422,  429,    0,  422,  422,  422,  430,
+      422,  422,  430,    0,    0,    0,    0,  430,  431,    0,
+        0,  431,  431,  431,  431,  431,  431,  431,  431,  431,
+      431,  431,  431,  431,    0,  431,  431,  431,  431,  432,
+        0,    0,  432,  432,  432,    0,  432,  432,  433,    0,
+
+        0,    0,    0,    0,    0,  433,    0,  433,  433,  433,
+        0,  433,  433,  434,    0,    0,  434,  434,    0,  434,
+        0,    0,  434,  434,  434,  436,  434,  434,  436,  434,
+      435,    0,    0,  436,  437,    0,    0,  437,    0,  435,
+      435,  435,  437,  435,  435,  438,  439,  440,  438,  439,
+      440,    0,    0,  438,  439,  440,  441,  442,  443,  441,
+      442,  443,    0,    0,  441,  442,  443,  444,    0,    0,
+      444,  444,  444,  444,  444,  444,  444,  444,  444,  444,
+      444,  444,  444,    0,  444,  444,  444,  444,  445,  445,
+        0,  445,  445,    0,  445,  445,  445,    0,  445,  445,
+
+      447,  445,  446,  447,    0,  446,  446,  446,  447,  446,
+      446,  448,  449,  450,  448,  449,  450,    0,    0,  448,
+      449,  450,  451,  452,  453,  451,  452,  453,    0,    0,
+      451,  452,  453,  454,  455,  456,  454,  455,  456,    0,
+        0,  454,  455,  456,  457,  458,    0,  457,  458,    0,
+        0,    0,  457,  458,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+
+      334,  334,  334,  334,  334,  334,  334,  334,  334,  334,
+      334,  334,  334,  334,  334,  334,  334,  334
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -2469,12 +1051,12 @@ static int yy_more_len = 0;
 char *sparyytext;
 #line 1 "./sparql_l.l"
 /*
- *  $Id: sparql_l.l,v 1.37.2.15 2011/01/03 10:21:01 source Exp $
+ *  $Id: sparql_l.l,v 1.37.2.20 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2496,6 +1078,7 @@ char *sparyytext;
 #include "sparql.h"
 #include "sparql_p.h"
 #include "numeric.h"
+#include "sparqlwords.h"
 
 #define sparyyerror(strg) sparyyerror_impl(sparp, sparyytext, (strg))
 
@@ -2760,7 +1343,7 @@ static int sparscn_NUMBER_double (void *yylval, sparp_t *sparp)
 
 /* Whitespace between 'COUNT' keyword and '(' or 'DISTINCT' after it */
 
-/* Whitespace between 'WHERE' keyword and '(' or '{' after it */
+/* Whitespace between 'WHERE'/'SQLQUERY' keyword and '(' or '{' after it */
 
 /* Whitespace between 'IDENTIFIED' keyword and 'BY' keyword */
 
@@ -2772,7 +1355,7 @@ static int sparscn_NUMBER_double (void *yylval, sparp_t *sparp)
 
 /* Special unreacheable state to fill the first item of sparp->sparp_lexstates */
 
-#line 2776 "sparql_l.c"
+#line 1359 "sparql_l.c"
 
 #define INITIAL 0
 #define SPARQL 1
@@ -2964,12 +1547,12 @@ YY_DECL
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
     
-#line 373 "./sparql_l.l"
+#line 374 "./sparql_l.l"
 
 
 	/* Plain non-keyword punctuators */
 
-#line 2973 "sparql_l.c"
+#line 1556 "sparql_l.c"
 
 	if ( !(yy_init) )
 		{
@@ -3028,13 +1611,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 882 )
+				if ( yy_current_state >= 335 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 881 );
+		while ( yy_current_state != 334 );
 		yy_cp = (yy_last_accepting_cpos);
 		yy_current_state = (yy_last_accepting_state);
 
@@ -3056,1236 +1639,618 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 377 "./sparql_l.l"
+#line 378 "./sparql_l.l"
 { return _AMP_AMP	; }
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 378 "./sparql_l.l"
+#line 379 "./sparql_l.l"
 { return _BACKQUOTE	; }
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 379 "./sparql_l.l"
+#line 380 "./sparql_l.l"
 { return _BANG		; }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 380 "./sparql_l.l"
+#line 381 "./sparql_l.l"
 { return _BAR_BAR	; }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 381 "./sparql_l.l"
+#line 382 "./sparql_l.l"
 { return _CARET_CARET	; }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 382 "./sparql_l.l"
+#line 383 "./sparql_l.l"
 { return _COMMA		; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 383 "./sparql_l.l"
+#line 384 "./sparql_l.l"
 { return _DOT		; }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 384 "./sparql_l.l"
+#line 385 "./sparql_l.l"
 { return _EQ		; }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 385 "./sparql_l.l"
+#line 386 "./sparql_l.l"
 { return _GE		; }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 386 "./sparql_l.l"
+#line 387 "./sparql_l.l"
 { return _GT		; }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 387 "./sparql_l.l"
+#line 388 "./sparql_l.l"
 { return _LE		; }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 388 "./sparql_l.l"
+#line 389 "./sparql_l.l"
 { return _LT		; }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 389 "./sparql_l.l"
+#line 390 "./sparql_l.l"
 { sparyylval.token_type = sparp->sparp_lexdepth; return _MINUS		; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 390 "./sparql_l.l"
+#line 391 "./sparql_l.l"
 { return _NOT_EQ	; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 391 "./sparql_l.l"
+#line 392 "./sparql_l.l"
 { sparyylval.token_type = sparp->sparp_lexdepth; return _PLUS		; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 392 "./sparql_l.l"
+#line 393 "./sparql_l.l"
 { return _PLUS_GT	; }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 393 "./sparql_l.l"
+#line 394 "./sparql_l.l"
 { return _SEMI		; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 394 "./sparql_l.l"
+#line 395 "./sparql_l.l"
 { return _SLASH		; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 395 "./sparql_l.l"
+#line 396 "./sparql_l.l"
 { return _STAR		; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 396 "./sparql_l.l"
+#line 397 "./sparql_l.l"
 { return _STAR_GT	; }
 	YY_BREAK
 /* Keyword punctuators */
 case 21:
 YY_RULE_SETUP
-#line 400 "./sparql_l.l"
+#line 401 "./sparql_l.l"
 { return a_L		; }
 	YY_BREAK
+/* Grouping non-keyword punctuators */
 case 22:
 YY_RULE_SETUP
-#line 401 "./sparql_l.l"
-{ return ALTER_L	; }
+#line 405 "./sparql_l.l"
+TOKPAR_OPEN (_LPAR,')', GET_CURRENT_BEGIN)
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 402 "./sparql_l.l"
-{ return AS_L		; }
+#line 406 "./sparql_l.l"
+TOKPAR_CLOSE (_RPAR,')')
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 403 "./sparql_l.l"
-{ return ASC_L		; }
+#line 407 "./sparql_l.l"
+TOKPAR_OPEN (_LBRA,'}', GET_CURRENT_BEGIN)
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 404 "./sparql_l.l"
-{ return ASK_L		; }
+#line 408 "./sparql_l.l"
+TOKPAR_CLOSE (_RBRA,'}')
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 405 "./sparql_l.l"
-{ return AVG_L		; }
+#line 409 "./sparql_l.l"
+TOKPAR_OPEN (_LSQBRA,']', GET_CURRENT_BEGIN)
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 406 "./sparql_l.l"
-{ return BASE_L		; }
+#line 410 "./sparql_l.l"
+TOKPAR_CLOSE (_RSQBRA,']')
 	YY_BREAK
+/* Name lexems */
 case 28:
 YY_RULE_SETUP
-#line 407 "./sparql_l.l"
-{ return BINDINGS_L	; }
+#line 414 "./sparql_l.l"
+{
+    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 2);
+    return Q_IRI_REF;
+  }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 408 "./sparql_l.l"
-{ return BIJECTION_L	; }
+#line 419 "./sparql_l.l"
+{ TOKBOX_Q(0,QNAME,"qualified URI"); }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 409 "./sparql_l.l"
-{ return BOUND_L	; }
+#line 420 "./sparql_l.l"
+{ TOKBOX_Q(0,QNAME_NS,"namespace"); }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 410 "./sparql_l.l"
-{ return BY_L		; }
+#line 421 "./sparql_l.l"
+{ TOKBOX_Q(0,BLANK_NODE_LABEL,"blank node label"); }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 411 "./sparql_l.l"
-{ return CLASS_L	; }
+#line 423 "./sparql_l.l"
+{
+    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
+    return QD_VARNAME;
+  }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 412 "./sparql_l.l"
-{ return CLEAR_L	; }
+#line 428 "./sparql_l.l"
+{
+    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
+    return QD_COLON_PARAMNAME;
+  }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 413 "./sparql_l.l"
-{ return CONSTRUCT_L	; }
+#line 433 "./sparql_l.l"
+{
+    char buf[20]; sprintf (buf, ":%d", sparp->sparp_sparqre->sparqre_param_ctr[0]);
+    sparp->sparp_sparqre->sparqre_param_ctr[0] += 1;
+    sparyylval.box = t_box_dv_uname_string (buf);
+    return QD_COLON_PARAMNUM;
+  }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 414 "./sparql_l.l"
-{ BEGIN SPARQL_AFTER_COUNT; }
+#line 440 "./sparql_l.l"
+{
+    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
+    return LANGTAG;
+  }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 415 "./sparql_l.l"
-{ return CREATE_L	; }
+#line 445 "./sparql_l.l"
+{
+    const struct sparql_keyword *sk = sparql_lex_hash_kw (sparyytext, sparyyleng);
+    if (NULL == sk)
+      {
+        sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_PLAIN_ID;
+      }
+    switch (sk->token)
+      {
+      case COUNT_L: BEGIN SPARQL_AFTER_COUNT; break;
+      case IDENTIFIED_L: BEGIN SPARQL_AFTER_IDENTIFIED; return IDENTIFIED_L;
+      case WHERE_L: BEGIN SPARQL_AFTER_WHERE; return WHERE_L;
+      case SQLQUERY_L: BEGIN SPARQL_AFTER_WHERE; return SQLQUERY_L;
+      case SPARQL_BIF: sparyylval.token_type = sk->subtype; return SPARQL_BIF;
+      default: return sk->token;
+      } }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 416 "./sparql_l.l"
-{ return DATA_L		; }
+#line 461 "./sparql_l.l"
+{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_ALIASCOLNAME; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 417 "./sparql_l.l"
-{ return DATATYPE_L	; }
+#line 462 "./sparql_l.l"
+{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_QTABLENAME; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 418 "./sparql_l.l"
-{ return DEFAULT_L	; }
+#line 463 "./sparql_l.l"
+{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_QTABLECOLNAME; }
 	YY_BREAK
+/* Numeric lexems */
 case 40:
 YY_RULE_SETUP
-#line 419 "./sparql_l.l"
-{ return DEFINE_L	; }
+#line 467 "./sparql_l.l"
+{ return sparscn_NUMBER_int (yylval, sparp); }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 420 "./sparql_l.l"
-{ return DELETE_L	; }
+#line 468 "./sparql_l.l"
+{ return sparscn_NUMBER_decimal (yylval, sparp); }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 421 "./sparql_l.l"
-{ return DEREF_L	; }
+#line 469 "./sparql_l.l"
+{ return sparscn_NUMBER_double (yylval, sparp); }
 	YY_BREAK
+/* String lexems */
 case 43:
 YY_RULE_SETUP
-#line 422 "./sparql_l.l"
-{ return DESC_L		; }
+#line 473 "./sparql_l.l"
+{
+    sparyylval.box = t_box_dv_short_nchars (sparyytext+1, sparyyleng - 2);
+    return SPARQL_STRING;
+  }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 423 "./sparql_l.l"
-{ return DESCRIBE_L	; }
+#line 478 "./sparql_l.l"
+{ yymore(); SET_INNER_BEGIN(SPARQL_SSSQ); BEGIN_INNER; }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 424 "./sparql_l.l"
-{ return DISTINCT_L	; }
+#line 479 "./sparql_l.l"
+{ yymore(); SET_INNER_BEGIN(SPARQL_DDDQ); BEGIN_INNER; }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 425 "./sparql_l.l"
-{ return DROP_L		; }
+#line 480 "./sparql_l.l"
+{ sparyylval.box = spar_strliteral (sparp, sparyytext, 1, 0); BEGIN_OUTER; return SPARQL_STRING; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 426 "./sparql_l.l"
-{ return EXCLUSIVE_L	; }
+#line 481 "./sparql_l.l"
+{ sparyylval.box = spar_strliteral (sparp, sparyytext, 1, 0); BEGIN_OUTER; return SPARQL_STRING; }
 	YY_BREAK
 case 48:
+/* rule 48 can match eol */
 YY_RULE_SETUP
-#line 427 "./sparql_l.l"
-{ return EXISTS_L	; }
+#line 482 "./sparql_l.l"
+{ sparp->sparp_lexlineno++; yymore(); }
 	YY_BREAK
 case 49:
+/* rule 49 can match eol */
 YY_RULE_SETUP
-#line 428 "./sparql_l.l"
-{ return false_L	; }
+#line 483 "./sparql_l.l"
+{ sparp->sparp_lexlineno++; yymore(); }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 429 "./sparql_l.l"
-{ return FILTER_L	; }
+#line 484 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 430 "./sparql_l.l"
-{ return FROM_L		; }
+#line 485 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 431 "./sparql_l.l"
-{ return FUNCTION_L	; }
+#line 486 "./sparql_l.l"
+{ sparyyerror ("Bad escape sequence in a long single-quoted string"); }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 432 "./sparql_l.l"
-{ return GRAPH_L	; }
+#line 487 "./sparql_l.l"
+{ sparyyerror ("Bad escape sequence in a long double-quoted string"); }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 433 "./sparql_l.l"
-{ return GROUP_L	; }
+#line 488 "./sparql_l.l"
+{ sparyyerror ("Bad character in a long single-quoted string"); }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 434 "./sparql_l.l"
-{ return HAVING_L	; }
+#line 489 "./sparql_l.l"
+{ sparyyerror ("Bad character in a long double-quoted string"); }
+	YY_BREAK
+case YY_STATE_EOF(SPARQL_SSSQ):
+#line 490 "./sparql_l.l"
+{ sparyyerror ("Unterminated long single-quoted string"); }
+	YY_BREAK
+case YY_STATE_EOF(SPARQL_DDDQ):
+#line 491 "./sparql_l.l"
+{ sparyyerror ("Unterminated long double-quoted string"); }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 435 "./sparql_l.l"
-{ return IFP_L		; }
+#line 494 "./sparql_l.l"
+{ yymore(); SET_INNER_BEGIN(SPARQL_SQ); BEGIN_INNER; }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 436 "./sparql_l.l"
-{ return IN_L		; }
+#line 495 "./sparql_l.l"
+{ yymore(); SET_INNER_BEGIN(SPARQL_DQ); BEGIN_INNER; }
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 437 "./sparql_l.l"
-{ return INDEX_L	; }
+#line 496 "./sparql_l.l"
+{ sparyylval.box = spar_strliteral (sparp, sparyytext, 0, 0); BEGIN_OUTER; return SPARQL_STRING; }
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 438 "./sparql_l.l"
-{ return INFERENCE_L	; }
+#line 497 "./sparql_l.l"
+{ sparyylval.box = spar_strliteral (sparp, sparyytext, 0, 0); BEGIN_OUTER; return SPARQL_STRING; }
 	YY_BREAK
 case 60:
+/* rule 60 can match eol */
 YY_RULE_SETUP
-#line 439 "./sparql_l.l"
-{ return INSERT_L	; }
+#line 498 "./sparql_l.l"
+{ sparyyerror ("End-of-line in a short single-quoted string"); yymore(); }
 	YY_BREAK
 case 61:
+/* rule 61 can match eol */
 YY_RULE_SETUP
-#line 440 "./sparql_l.l"
-{ return INTO_L		; }
+#line 499 "./sparql_l.l"
+{ sparyyerror ("End-of-line in a short double-quoted string"); yymore(); }
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 441 "./sparql_l.l"
-{ return IRI_L		; }
+#line 500 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 442 "./sparql_l.l"
-{ return isBLANK_L	; }
+#line 501 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 443 "./sparql_l.l"
-{ return isIRI_L	; }
+#line 502 "./sparql_l.l"
+{ sparyyerror ("Bad escape sequence in a short single-quoted string"); }
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 444 "./sparql_l.l"
-{ return isLITERAL_L	; }
+#line 503 "./sparql_l.l"
+{ sparyyerror ("Bad escape sequence in a short double-quoted string"); }
+	YY_BREAK
+case YY_STATE_EOF(SPARQL_SQ):
+#line 504 "./sparql_l.l"
+{ sparyyerror ("Unterminated short single-quoted string"); }
 	YY_BREAK
+case YY_STATE_EOF(SPARQL_DQ):
+#line 505 "./sparql_l.l"
+{ sparyyerror ("Unterminated short double-quoted string"); }
+	YY_BREAK
+/* Whitespace after COUNT keyword */
 case 66:
 YY_RULE_SETUP
-#line 445 "./sparql_l.l"
-{ return isREF_L	; }
+#line 509 "./sparql_l.l"
+{ BEGIN SPARQL; TOKPAR_OPEN (COUNT_LPAR, ')', GET_CURRENT_BEGIN) }
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 446 "./sparql_l.l"
-{ return isURI_L	; }
+#line 510 "./sparql_l.l"
+{ BEGIN SPARQL; return COUNT_DISTINCT_L; }
+	YY_BREAK
+case YY_STATE_EOF(SPARQL_AFTER_COUNT):
+#line 511 "./sparql_l.l"
+{ sparyyerror ("Unexpected end of SPARQL expression after IDENTIFIED keyword"); }
 	YY_BREAK
+/* Whitespace after IDENTIFIED keyword */
 case 68:
 YY_RULE_SETUP
-#line 447 "./sparql_l.l"
-{ return LANG_L		; }
+#line 515 "./sparql_l.l"
+{ BEGIN SPARQL; return BY_L; }
 	YY_BREAK
+case YY_STATE_EOF(SPARQL_AFTER_IDENTIFIED):
+#line 516 "./sparql_l.l"
+{ sparyyerror ("Unexpected end of SPARQL expression after IDENTIFIED keyword"); }
+	YY_BREAK
+/* SQL fragments */
 case 69:
 YY_RULE_SETUP
-#line 448 "./sparql_l.l"
-{ return LANGMATCHES_L		; }
+#line 520 "./sparql_l.l"
+{ BEGIN SPARQL; TOKPAR_OPEN (_LBRA, '}', GET_CURRENT_BEGIN) }
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 449 "./sparql_l.l"
-{ return LIKE_L		; }
+#line 521 "./sparql_l.l"
+{ BEGIN SPARQL; TOKPAR_OPEN (_LPAR, ')', SPARQL_SQL_FRAGMENT) }
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 450 "./sparql_l.l"
-{ return LIMIT_L	; }
+#line 522 "./sparql_l.l"
+{ SET_INNER_BEGIN(SPARQL_SSSQ); BEGIN_INNER; }
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 451 "./sparql_l.l"
-{ return LITERAL_L	; }
+#line 523 "./sparql_l.l"
+{ SET_INNER_BEGIN(SPARQL_DDDQ); BEGIN_INNER; }
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 452 "./sparql_l.l"
-{ return LOAD_L		; }
+#line 524 "./sparql_l.l"
+{ SET_INNER_BEGIN(SPARQL_SQ); BEGIN_INNER; }
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 453 "./sparql_l.l"
-{ return MAKE_L		; }
+#line 525 "./sparql_l.l"
+{ SET_INNER_BEGIN(SPARQL_DQ); BEGIN_INNER; }
+	YY_BREAK
+case YY_STATE_EOF(SPARQL_AFTER_WHERE):
+#line 526 "./sparql_l.l"
+{ sparyyerror ("Unexpected end of SPARQL expression after WHERE keyword"); }
 	YY_BREAK
 case 75:
+/* rule 75 can match eol */
 YY_RULE_SETUP
-#line 454 "./sparql_l.l"
-{ return MAP_L		; }
+#line 528 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 455 "./sparql_l.l"
-{ return MAX_L		; }
+#line 530 "./sparql_l.l"
+{ TOKPAR_FAKE_OPEN('}', SPARQL_SQL_FRAGMENT); yymore(); }
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 456 "./sparql_l.l"
-{ return MIN_L		; }
+#line 531 "./sparql_l.l"
+{ TOKPAR_FAKE_CLOSE('}'); yymore(); }
 	YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 457 "./sparql_l.l"
-{ return MINUS_L	; }
+#line 532 "./sparql_l.l"
+{ TOKPAR_FAKE_OPEN(')', SPARQL_SQL_FRAGMENT); yymore(); }
 	YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 458 "./sparql_l.l"
-{ return MODIFY_L	; }
+#line 533 "./sparql_l.l"
+{
+    TOKPAR_FAKE_CLOSE(')');
+    if (SPARQL == GET_CURRENT_BEGIN)
+      {
+        sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng-1);
+        return SPARQL_SQLTEXT;
+      }
+    else
+      yymore();
+  }
 	YY_BREAK
 case 80:
+/* rule 80 can match eol */
 YY_RULE_SETUP
-#line 459 "./sparql_l.l"
-{ return NAMED_L	; }
+#line 544 "./sparql_l.l"
+{ sparp->sparp_lexlineno++; yymore(); }
 	YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 460 "./sparql_l.l"
-{ return NIL_L		; }
+#line 545 "./sparql_l.l"
+{ sparyyerror ("Unterminated comment in SQL fragment after WHERE keyword"); }
 	YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 461 "./sparql_l.l"
-{ return NOT_L		; }
+#line 546 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 462 "./sparql_l.l"
-{ return NOT_FROM_L	; }
+#line 547 "./sparql_l.l"
+{ BEGIN SPARQL_SQL_SQSTRING; yymore(); }
 	YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 463 "./sparql_l.l"
-{ return NULL_L		; }
+#line 548 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 464 "./sparql_l.l"
-{ return OBJECT_L	; }
+#line 549 "./sparql_l.l"
+{ sparyyerror ("Unterminated double-quoted identifier in SQL fragment after WHERE keyword"); }
 	YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 465 "./sparql_l.l"
-{ return OF_L		; }
+#line 551 "./sparql_l.l"
+{ BEGIN SPARQL_SQL_FRAGMENT; yymore(); }
 	YY_BREAK
 case 87:
+/* rule 87 can match eol */
 YY_RULE_SETUP
-#line 466 "./sparql_l.l"
-{ return OFFBAND_L	; }
+#line 552 "./sparql_l.l"
+{ sparp->sparp_lexlineno++; yymore(); }
 	YY_BREAK
 case 88:
+/* rule 88 can match eol */
 YY_RULE_SETUP
-#line 467 "./sparql_l.l"
-{ return OFFSET_L	; }
+#line 553 "./sparql_l.l"
+{ sparp->sparp_lexlineno++; yymore(); }
 	YY_BREAK
 case 89:
 YY_RULE_SETUP
-#line 468 "./sparql_l.l"
-{ return OPTIONAL_L	; }
+#line 554 "./sparql_l.l"
+{ yymore(); }
 	YY_BREAK
 case 90:
 YY_RULE_SETUP
-#line 469 "./sparql_l.l"
-{ return OPTION_L	; }
-	YY_BREAK
-case 91:
-YY_RULE_SETUP
-#line 470 "./sparql_l.l"
-{ return ORDER_L	; }
-	YY_BREAK
-case 92:
-YY_RULE_SETUP
-#line 471 "./sparql_l.l"
-{ return PREDICATE_L	; }
-	YY_BREAK
-case 93:
-YY_RULE_SETUP
-#line 472 "./sparql_l.l"
-{ return PREFIX_L	; }
-	YY_BREAK
-case 94:
-YY_RULE_SETUP
-#line 473 "./sparql_l.l"
-{ return QUAD_L		; }
-	YY_BREAK
-case 95:
-YY_RULE_SETUP
-#line 474 "./sparql_l.l"
-{ return REGEX_L	; }
-	YY_BREAK
-case 96:
-YY_RULE_SETUP
-#line 475 "./sparql_l.l"
-{ return REDUCED_L	; }
-	YY_BREAK
-case 97:
-YY_RULE_SETUP
-#line 476 "./sparql_l.l"
-{ return RETURNS_L	; }
-	YY_BREAK
-case 98:
-YY_RULE_SETUP
-#line 477 "./sparql_l.l"
-{ return SCORE_L	; }
-	YY_BREAK
-case 99:
-YY_RULE_SETUP
-#line 478 "./sparql_l.l"
-{ return SCORE_LIMIT_L	; }
-	YY_BREAK
-case 100:
-YY_RULE_SETUP
-#line 479 "./sparql_l.l"
-{ return SAME_AS_L	; }
-	YY_BREAK
-case 101:
-YY_RULE_SETUP
-#line 480 "./sparql_l.l"
-{ return SAME_AS_O_L	; }
-	YY_BREAK
-case 102:
-YY_RULE_SETUP
-#line 481 "./sparql_l.l"
-{ return SAME_AS_P_L	; }
-	YY_BREAK
-case 103:
-YY_RULE_SETUP
-#line 482 "./sparql_l.l"
-{ return SAME_AS_S_L	; }
-	YY_BREAK
-case 104:
-YY_RULE_SETUP
-#line 483 "./sparql_l.l"
-{ return SAME_AS_S_O_L	; }
-	YY_BREAK
-case 105:
-YY_RULE_SETUP
-#line 484 "./sparql_l.l"
-{ return SAMETERM_L	; }
-	YY_BREAK
-case 106:
-YY_RULE_SETUP
-#line 485 "./sparql_l.l"
-{ return SELECT_L	; }
-	YY_BREAK
-case 107:
-YY_RULE_SETUP
-#line 486 "./sparql_l.l"
-{ return SERVICE_L	; }
-	YY_BREAK
-case 108:
-YY_RULE_SETUP
-#line 487 "./sparql_l.l"
-{ return SILENT_L	; }
-	YY_BREAK
-case 109:
-YY_RULE_SETUP
-#line 488 "./sparql_l.l"
-{ return SOFT_L		; }
-	YY_BREAK
-case 110:
-YY_RULE_SETUP
-#line 489 "./sparql_l.l"
-{ return STORAGE_L	; }
-	YY_BREAK
-case 111:
-YY_RULE_SETUP
-#line 490 "./sparql_l.l"
-{ return STR_L		; }
-	YY_BREAK
-case 112:
-YY_RULE_SETUP
-#line 491 "./sparql_l.l"
-{ return SUBCLASS_L	; }
-	YY_BREAK
-case 113:
-YY_RULE_SETUP
-#line 492 "./sparql_l.l"
-{ return SUBJECT_L	; }
-	YY_BREAK
-case 114:
-YY_RULE_SETUP
-#line 493 "./sparql_l.l"
-{ return SUM_L		; }
-	YY_BREAK
-case 115:
-YY_RULE_SETUP
-#line 494 "./sparql_l.l"
-{ return TABLE_OPTION_L	; }
-	YY_BREAK
-case 116:
-YY_RULE_SETUP
-#line 495 "./sparql_l.l"
-{ return T_CYCLES_ONLY_L	; }
-	YY_BREAK
-case 117:
-YY_RULE_SETUP
-#line 496 "./sparql_l.l"
-{ return T_DIRECTION_L	; }
-	YY_BREAK
-case 118:
-YY_RULE_SETUP
-#line 497 "./sparql_l.l"
-{ return T_DISTINCT_L	; }
-	YY_BREAK
-case 119:
-YY_RULE_SETUP
-#line 498 "./sparql_l.l"
-{ return T_END_FLAG_L	; }
-	YY_BREAK
-case 120:
-YY_RULE_SETUP
-#line 499 "./sparql_l.l"
-{ return T_EXISTS_L	; }
-	YY_BREAK
-case 121:
-YY_RULE_SETUP
-#line 500 "./sparql_l.l"
-{ return T_FINAL_AS_L	; }
-	YY_BREAK
-case 122:
-YY_RULE_SETUP
-#line 501 "./sparql_l.l"
-{ return T_IN_L		; }
-	YY_BREAK
-case 123:
-YY_RULE_SETUP
-#line 502 "./sparql_l.l"
-{ return T_MAX_L	; }
-	YY_BREAK
-case 124:
-YY_RULE_SETUP
-#line 503 "./sparql_l.l"
-{ return T_MIN_L	; }
-	YY_BREAK
-case 125:
-YY_RULE_SETUP
-#line 504 "./sparql_l.l"
-{ return T_OUT_L	; }
-	YY_BREAK
-case 126:
-YY_RULE_SETUP
-#line 505 "./sparql_l.l"
-{ return T_NO_CYCLES_L	; }
-	YY_BREAK
-case 127:
-YY_RULE_SETUP
-#line 506 "./sparql_l.l"
-{ return T_NO_ORDER_L	; }
-	YY_BREAK
-case 128:
-YY_RULE_SETUP
-#line 507 "./sparql_l.l"
-{ return T_SHORTEST_ONLY_L	; }
-	YY_BREAK
-case 129:
-YY_RULE_SETUP
-#line 508 "./sparql_l.l"
-{ return T_STEP_L	; }
-	YY_BREAK
-case 130:
-YY_RULE_SETUP
-#line 509 "./sparql_l.l"
-{ return TRANSITIVE_L	; }
-	YY_BREAK
-case 131:
-YY_RULE_SETUP
-#line 510 "./sparql_l.l"
-{ return true_L		; }
-	YY_BREAK
-case 132:
-YY_RULE_SETUP
-#line 511 "./sparql_l.l"
-{ return UNBOUND_L	; }
-	YY_BREAK
-case 133:
-YY_RULE_SETUP
-#line 512 "./sparql_l.l"
-{ return UNION_L	; }
-	YY_BREAK
-case 134:
-YY_RULE_SETUP
-#line 513 "./sparql_l.l"
-{ return USING_L	; }
-	YY_BREAK
-case 135:
-YY_RULE_SETUP
-#line 514 "./sparql_l.l"
-{ return WITH_L		; }
-	YY_BREAK
-case 136:
-YY_RULE_SETUP
-#line 516 "./sparql_l.l"
-{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return TEXT_BL	; }
-	YY_BREAK
-case 137:
-YY_RULE_SETUP
-#line 517 "./sparql_l.l"
-{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return XML_BL	; }
-	YY_BREAK
-case 138:
-YY_RULE_SETUP
-#line 519 "./sparql_l.l"
-{ BEGIN SPARQL_AFTER_IDENTIFIED; return IDENTIFIED_L	; }
-	YY_BREAK
-case 139:
-YY_RULE_SETUP
-#line 520 "./sparql_l.l"
-{ BEGIN SPARQL_AFTER_WHERE; return WHERE_L	; }
-	YY_BREAK
-/* Keyword punctuators of the SPARQL described in first drafts of W3C spec */
-case 140:
-YY_RULE_SETUP
-#line 524 "./sparql_l.l"
-{ return GRAPH_L	; }
-	YY_BREAK
-case 141:
-YY_RULE_SETUP
-#line 525 "./sparql_l.l"
-{ return _AMP_AMP; }
-	YY_BREAK
-case 142:
-YY_RULE_SETUP
-#line 526 "./sparql_l.l"
-{ return _BAR_BAR; }
-	YY_BREAK
-/* Grouping non-keyword punctuators */
-case 143:
-YY_RULE_SETUP
-#line 530 "./sparql_l.l"
-TOKPAR_OPEN (_LPAR,')', GET_CURRENT_BEGIN)
-	YY_BREAK
-case 144:
-YY_RULE_SETUP
-#line 531 "./sparql_l.l"
-TOKPAR_CLOSE (_RPAR,')')
-	YY_BREAK
-case 145:
-YY_RULE_SETUP
-#line 532 "./sparql_l.l"
-TOKPAR_OPEN (_LBRA,'}', GET_CURRENT_BEGIN)
-	YY_BREAK
-case 146:
-YY_RULE_SETUP
-#line 533 "./sparql_l.l"
-TOKPAR_CLOSE (_RBRA,'}')
-	YY_BREAK
-case 147:
-YY_RULE_SETUP
-#line 534 "./sparql_l.l"
-TOKPAR_OPEN (_LSQBRA,']', GET_CURRENT_BEGIN)
-	YY_BREAK
-case 148:
-YY_RULE_SETUP
-#line 535 "./sparql_l.l"
-TOKPAR_CLOSE (_RSQBRA,']')
-	YY_BREAK
-/* Name lexems */
-case 149:
-YY_RULE_SETUP
-#line 539 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 2);
-    return Q_IRI_REF;
-  }
-	YY_BREAK
-case 150:
-YY_RULE_SETUP
-#line 544 "./sparql_l.l"
-{ TOKBOX_Q(0,QNAME,"qualified URI"); }
-	YY_BREAK
-case 151:
-YY_RULE_SETUP
-#line 545 "./sparql_l.l"
-{ TOKBOX_Q(0,QNAME_NS,"namespace"); }
-	YY_BREAK
-case 152:
-YY_RULE_SETUP
-#line 546 "./sparql_l.l"
-{ TOKBOX_Q(0,BLANK_NODE_LABEL,"blank node label"); }
-	YY_BREAK
-case 153:
-YY_RULE_SETUP
-#line 548 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return QUEST_VARNAME;
-  }
-	YY_BREAK
-case 154:
-YY_RULE_SETUP
-#line 553 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return DOLLAR_VARNAME;
-  }
-	YY_BREAK
-case 155:
-YY_RULE_SETUP
-#line 558 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return QUEST_COLON_PARAMNAME;
-  }
-	YY_BREAK
-case 156:
-YY_RULE_SETUP
-#line 563 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return DOLLAR_COLON_PARAMNAME;
-  }
-	YY_BREAK
-case 157:
-YY_RULE_SETUP
-#line 568 "./sparql_l.l"
-{
-    char buf[20]; sprintf (buf, ":%d", sparp->sparp_sparqre->sparqre_param_ctr[0]);
-    sparp->sparp_sparqre->sparqre_param_ctr[0] += 1;
-    sparyylval.box = t_box_dv_uname_string (buf);
-    return QUEST_COLON_PARAMNUM;
-  }
-	YY_BREAK
-case 158:
-YY_RULE_SETUP
-#line 575 "./sparql_l.l"
-{
-    char buf[20]; sprintf (buf, ":%d", sparp->sparp_sparqre->sparqre_param_ctr[0]);
-    sparp->sparp_sparqre->sparqre_param_ctr[0] += 1;
-    sparyylval.box = t_box_dv_uname_string (buf);
-    return DOLLAR_COLON_PARAMNUM;
-  }
-	YY_BREAK
-case 159:
-YY_RULE_SETUP
-#line 582 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return LANGTAG;
-  }
-	YY_BREAK
-case 160:
-YY_RULE_SETUP
-#line 587 "./sparql_l.l"
-{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_PLAIN_ID; }
-	YY_BREAK
-case 161:
-YY_RULE_SETUP
-#line 588 "./sparql_l.l"
-{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_ALIASCOLNAME; }
-	YY_BREAK
-case 162:
-YY_RULE_SETUP
-#line 589 "./sparql_l.l"
-{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_QTABLENAME; }
-	YY_BREAK
-case 163:
-YY_RULE_SETUP
-#line 590 "./sparql_l.l"
-{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_QTABLECOLNAME; }
-	YY_BREAK
-/* Numeric lexems */
-case 164:
-YY_RULE_SETUP
-#line 594 "./sparql_l.l"
-{ return sparscn_NUMBER_int (yylval, sparp); }
-	YY_BREAK
-case 165:
-YY_RULE_SETUP
-#line 595 "./sparql_l.l"
-{ return sparscn_NUMBER_decimal (yylval, sparp); }
-	YY_BREAK
-case 166:
-YY_RULE_SETUP
-#line 596 "./sparql_l.l"
-{ return sparscn_NUMBER_double (yylval, sparp); }
-	YY_BREAK
-/* String lexems */
-case 167:
-YY_RULE_SETUP
-#line 600 "./sparql_l.l"
-{
-    sparyylval.box = t_box_dv_short_nchars (sparyytext+1, sparyyleng - 2);
-    return SPARQL_STRING;
-  }
-	YY_BREAK
-case 168:
-YY_RULE_SETUP
-#line 605 "./sparql_l.l"
-{ yymore(); SET_INNER_BEGIN(SPARQL_SSSQ); BEGIN_INNER; }
-	YY_BREAK
-case 169:
-YY_RULE_SETUP
-#line 606 "./sparql_l.l"
-{ yymore(); SET_INNER_BEGIN(SPARQL_DDDQ); BEGIN_INNER; }
-	YY_BREAK
-case 170:
-YY_RULE_SETUP
-#line 607 "./sparql_l.l"
-{ sparyylval.box = spar_strliteral (sparp, sparyytext, 1, 0); BEGIN_OUTER; return SPARQL_STRING; }
-	YY_BREAK
-case 171:
-YY_RULE_SETUP
-#line 608 "./sparql_l.l"
-{ sparyylval.box = spar_strliteral (sparp, sparyytext, 1, 0); BEGIN_OUTER; return SPARQL_STRING; }
-	YY_BREAK
-case 172:
-/* rule 172 can match eol */
-YY_RULE_SETUP
-#line 609 "./sparql_l.l"
-{ sparp->sparp_lexlineno++; yymore(); }
-	YY_BREAK
-case 173:
-/* rule 173 can match eol */
-YY_RULE_SETUP
-#line 610 "./sparql_l.l"
-{ sparp->sparp_lexlineno++; yymore(); }
-	YY_BREAK
-case 174:
-YY_RULE_SETUP
-#line 611 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 175:
-YY_RULE_SETUP
-#line 612 "./sparql_l.l"
+#line 555 "./sparql_l.l"
 { yymore(); }
 	YY_BREAK
-case 176:
-YY_RULE_SETUP
-#line 613 "./sparql_l.l"
-{ sparyyerror ("Bad escape sequence in a long single-quoted string"); }
-	YY_BREAK
-case 177:
-YY_RULE_SETUP
-#line 614 "./sparql_l.l"
-{ sparyyerror ("Bad escape sequence in a long double-quoted string"); }
-	YY_BREAK
-case 178:
-YY_RULE_SETUP
-#line 615 "./sparql_l.l"
-{ sparyyerror ("Bad character in a long single-quoted string"); }
-	YY_BREAK
-case 179:
-YY_RULE_SETUP
-#line 616 "./sparql_l.l"
-{ sparyyerror ("Bad character in a long double-quoted string"); }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_SSSQ):
-#line 617 "./sparql_l.l"
-{ sparyyerror ("Unterminated long single-quoted string"); }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_DDDQ):
-#line 618 "./sparql_l.l"
-{ sparyyerror ("Unterminated long double-quoted string"); }
-	YY_BREAK
-case 180:
-YY_RULE_SETUP
-#line 621 "./sparql_l.l"
-{ yymore(); SET_INNER_BEGIN(SPARQL_SQ); BEGIN_INNER; }
-	YY_BREAK
-case 181:
-YY_RULE_SETUP
-#line 622 "./sparql_l.l"
-{ yymore(); SET_INNER_BEGIN(SPARQL_DQ); BEGIN_INNER; }
-	YY_BREAK
-case 182:
-YY_RULE_SETUP
-#line 623 "./sparql_l.l"
-{ sparyylval.box = spar_strliteral (sparp, sparyytext, 0, 0); BEGIN_OUTER; return SPARQL_STRING; }
-	YY_BREAK
-case 183:
-YY_RULE_SETUP
-#line 624 "./sparql_l.l"
-{ sparyylval.box = spar_strliteral (sparp, sparyytext, 0, 0); BEGIN_OUTER; return SPARQL_STRING; }
-	YY_BREAK
-case 184:
-/* rule 184 can match eol */
-YY_RULE_SETUP
-#line 625 "./sparql_l.l"
-{ sparyyerror ("End-of-line in a short single-quoted string"); yymore(); }
-	YY_BREAK
-case 185:
-/* rule 185 can match eol */
-YY_RULE_SETUP
-#line 626 "./sparql_l.l"
-{ sparyyerror ("End-of-line in a short double-quoted string"); yymore(); }
-	YY_BREAK
-case 186:
-YY_RULE_SETUP
-#line 627 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 187:
-YY_RULE_SETUP
-#line 628 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 188:
-YY_RULE_SETUP
-#line 629 "./sparql_l.l"
-{ sparyyerror ("Bad escape sequence in a short single-quoted string"); }
-	YY_BREAK
-case 189:
-YY_RULE_SETUP
-#line 630 "./sparql_l.l"
-{ sparyyerror ("Bad escape sequence in a short double-quoted string"); }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_SQ):
-#line 631 "./sparql_l.l"
-{ sparyyerror ("Unterminated short single-quoted string"); }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_DQ):
-#line 632 "./sparql_l.l"
-{ sparyyerror ("Unterminated short double-quoted string"); }
-	YY_BREAK
-/* Whitespace after COUNT keyword */
-case 190:
-YY_RULE_SETUP
-#line 636 "./sparql_l.l"
-{ BEGIN SPARQL; TOKPAR_OPEN (COUNT_LPAR, ')', GET_CURRENT_BEGIN) }
-	YY_BREAK
-case 191:
-YY_RULE_SETUP
-#line 637 "./sparql_l.l"
-{ BEGIN SPARQL; return COUNT_DISTINCT_L; }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_AFTER_COUNT):
-#line 638 "./sparql_l.l"
-{ sparyyerror ("Unexpected end of SPARQL expression after IDENTIFIED keyword"); }
-	YY_BREAK
-/* Whitespace after IDENTIFIED keyword */
-case 192:
-YY_RULE_SETUP
-#line 642 "./sparql_l.l"
-{ BEGIN SPARQL; return BY_L; }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_AFTER_IDENTIFIED):
-#line 643 "./sparql_l.l"
-{ sparyyerror ("Unexpected end of SPARQL expression after IDENTIFIED keyword"); }
-	YY_BREAK
-/* SQL fragments */
-case 193:
-YY_RULE_SETUP
-#line 647 "./sparql_l.l"
-{ BEGIN SPARQL; TOKPAR_OPEN (_LBRA, '}', GET_CURRENT_BEGIN) }
-	YY_BREAK
-case 194:
-YY_RULE_SETUP
-#line 648 "./sparql_l.l"
-{ BEGIN SPARQL; TOKPAR_OPEN (_LPAR, ')', SPARQL_SQL_FRAGMENT) }
-	YY_BREAK
-case 195:
-YY_RULE_SETUP
-#line 649 "./sparql_l.l"
-{ SET_INNER_BEGIN(SPARQL_SSSQ); BEGIN_INNER; }
-	YY_BREAK
-case 196:
-YY_RULE_SETUP
-#line 650 "./sparql_l.l"
-{ SET_INNER_BEGIN(SPARQL_DDDQ); BEGIN_INNER; }
-	YY_BREAK
-case 197:
-YY_RULE_SETUP
-#line 651 "./sparql_l.l"
-{ SET_INNER_BEGIN(SPARQL_SQ); BEGIN_INNER; }
-	YY_BREAK
-case 198:
-YY_RULE_SETUP
-#line 652 "./sparql_l.l"
-{ SET_INNER_BEGIN(SPARQL_DQ); BEGIN_INNER; }
-	YY_BREAK
-case YY_STATE_EOF(SPARQL_AFTER_WHERE):
-#line 653 "./sparql_l.l"
-{ sparyyerror ("Unexpected end of SPARQL expression after WHERE keyword"); }
-	YY_BREAK
-case 199:
-/* rule 199 can match eol */
-YY_RULE_SETUP
-#line 655 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 200:
-YY_RULE_SETUP
-#line 657 "./sparql_l.l"
-{ TOKPAR_FAKE_OPEN('}', SPARQL_SQL_FRAGMENT); yymore(); }
-	YY_BREAK
-case 201:
-YY_RULE_SETUP
-#line 658 "./sparql_l.l"
-{ TOKPAR_FAKE_CLOSE('}'); yymore(); }
-	YY_BREAK
-case 202:
-YY_RULE_SETUP
-#line 659 "./sparql_l.l"
-{ TOKPAR_FAKE_OPEN(')', SPARQL_SQL_FRAGMENT); yymore(); }
-	YY_BREAK
-case 203:
-YY_RULE_SETUP
-#line 660 "./sparql_l.l"
-{
-    TOKPAR_FAKE_CLOSE(')');
-    if (SPARQL == GET_CURRENT_BEGIN)
-      {
-        sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng-1);
-        return SPARQL_CONDITION_AFTER_WHERE_LPAR;
-      }
-    else
-      yymore();
-  }
-	YY_BREAK
-case 204:
-/* rule 204 can match eol */
-YY_RULE_SETUP
-#line 671 "./sparql_l.l"
-{ sparp->sparp_lexlineno++; yymore(); }
-	YY_BREAK
-case 205:
-YY_RULE_SETUP
-#line 672 "./sparql_l.l"
-{ sparyyerror ("Unterminated comment in SQL fragment after WHERE keyword"); }
-	YY_BREAK
-case 206:
-YY_RULE_SETUP
-#line 673 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 207:
-YY_RULE_SETUP
-#line 674 "./sparql_l.l"
-{ BEGIN SPARQL_SQL_SQSTRING; yymore(); }
-	YY_BREAK
-case 208:
-YY_RULE_SETUP
-#line 675 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 209:
-YY_RULE_SETUP
-#line 676 "./sparql_l.l"
-{ sparyyerror ("Unterminated double-quoted identifier in SQL fragment after WHERE keyword"); }
-	YY_BREAK
-case 210:
-YY_RULE_SETUP
-#line 678 "./sparql_l.l"
-{ BEGIN SPARQL_SQL_FRAGMENT; yymore(); }
-	YY_BREAK
-case 211:
-/* rule 211 can match eol */
-YY_RULE_SETUP
-#line 679 "./sparql_l.l"
-{ sparp->sparp_lexlineno++; yymore(); }
-	YY_BREAK
-case 212:
-/* rule 212 can match eol */
-YY_RULE_SETUP
-#line 680 "./sparql_l.l"
-{ sparp->sparp_lexlineno++; yymore(); }
-	YY_BREAK
-case 213:
-YY_RULE_SETUP
-#line 681 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 214:
-YY_RULE_SETUP
-#line 682 "./sparql_l.l"
-{ yymore(); }
-	YY_BREAK
-case 215:
+case 91:
 YY_RULE_SETUP
-#line 683 "./sparql_l.l"
+#line 556 "./sparql_l.l"
 { yymore(); }
 	YY_BREAK
 case YY_STATE_EOF(SPARQL_SQL_SQSTRING):
-#line 684 "./sparql_l.l"
+#line 557 "./sparql_l.l"
 { sparyyerror ("Unterminated single-quoted string in SQL fragment after WHERE keyword"); }
 	YY_BREAK
 /* Whitespace and comments */
-case 216:
-/* rule 216 can match eol */
+case 92:
+/* rule 92 can match eol */
 YY_RULE_SETUP
-#line 688 "./sparql_l.l"
+#line 561 "./sparql_l.l"
 { sparp->sparp_lexlineno++; }
 	YY_BREAK
-case 217:
+case 93:
 YY_RULE_SETUP
-#line 689 "./sparql_l.l"
+#line 562 "./sparql_l.l"
 { }
 	YY_BREAK
-case 218:
+case 94:
 YY_RULE_SETUP
-#line 690 "./sparql_l.l"
+#line 563 "./sparql_l.l"
 { }
 	YY_BREAK
-case 219:
+case 95:
 YY_RULE_SETUP
-#line 692 "./sparql_l.l"
+#line 565 "./sparql_l.l"
 { BEGIN (SPARQL_SQL_COMMENT); yymore(); }
 	YY_BREAK
 case YY_STATE_EOF(SPARQL_SQL_FRAGMENT):
-#line 693 "./sparql_l.l"
+#line 566 "./sparql_l.l"
 { sparyyerror ("Unterminated SQL fragment after WHERE keyword"); }
 	YY_BREAK
-case 220:
+case 96:
 YY_RULE_SETUP
-#line 695 "./sparql_l.l"
+#line 568 "./sparql_l.l"
 { sparyyerror ("Nested C style comments not supported"); }
 	YY_BREAK
-case 221:
+case 97:
 YY_RULE_SETUP
-#line 696 "./sparql_l.l"
+#line 569 "./sparql_l.l"
 { BEGIN (SPARQL_SQL_FRAGMENT); yymore(); }
 	YY_BREAK
-case 222:
+case 98:
 YY_RULE_SETUP
-#line 697 "./sparql_l.l"
+#line 570 "./sparql_l.l"
 { yymore(); }
 	YY_BREAK
 /* Traps; these rules should be latest rules in the file. */
-case 223:
+case 99:
 YY_RULE_SETUP
-#line 701 "./sparql_l.l"
+#line 574 "./sparql_l.l"
 { sparyyerror ("Only '(' and 'DISTINCT' are allowed after COUNT keyword in SPARQL expression"); }
 	YY_BREAK
-case 224:
+case 100:
 YY_RULE_SETUP
-#line 702 "./sparql_l.l"
+#line 575 "./sparql_l.l"
 { sparyyerror ("Ill formed IDENTIFIED BY term"); }
 	YY_BREAK
-case 225:
+case 101:
 YY_RULE_SETUP
-#line 703 "./sparql_l.l"
-{ sparyyerror ("Only '{', '(' and a string literal are allowed after WHERE keyword in SPARQL expression"); }
+#line 576 "./sparql_l.l"
+{ sparyyerror ("Only '{', '(' and a string literal are allowed after WHERE or SQLQUERY keyword in SPARQL expression"); }
 	YY_BREAK
-case 226:
+case 102:
 YY_RULE_SETUP
-#line 704 "./sparql_l.l"
+#line 577 "./sparql_l.l"
 { sparyyerror ("Invalid character in SPARQL expression"); }
 	YY_BREAK
-case 227:
+case 103:
 YY_RULE_SETUP
-#line 706 "./sparql_l.l"
+#line 579 "./sparql_l.l"
 ECHO;
 	YY_BREAK
-#line 4289 "sparql_l.c"
+#line 2254 "sparql_l.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(SPARQL):
 case YY_STATE_EOF(SPARQL_SQL_COMMENT):
@@ -4581,7 +2546,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 882 )
+			if ( yy_current_state >= 335 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -4609,11 +2574,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 882 )
+		if ( yy_current_state >= 335 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 881);
+	yy_is_jam = (yy_current_state == 334);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -5246,7 +3211,7 @@ void sparyyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 706 "./sparql_l.l"
+#line 579 "./sparql_l.l"
 
 
 
diff --git a/libsrc/Wi/sparql_l.l b/libsrc/Wi/sparql_l.l
index 81f5363..b4c02ef 100644
--- a/libsrc/Wi/sparql_l.l
+++ b/libsrc/Wi/sparql_l.l
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql_l.l,v 1.37.2.15 2011/01/03 10:21:01 source Exp $
+ *  $Id: sparql_l.l,v 1.37.2.20 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -32,6 +32,7 @@
 #include "sparql.h"
 #include "sparql_p.h"
 #include "numeric.h"
+#include "sparqlwords.h"
 
 #define sparyyerror(strg) sparyyerror_impl(sparp, sparyytext, (strg))
 
@@ -304,7 +305,7 @@ static int sparscn_NUMBER_double (void *yylval, sparp_t *sparp)
 	/* Whitespace between 'COUNT' keyword and '(' or 'DISTINCT' after it */
 %x SPARQL_AFTER_COUNT
 
-	/* Whitespace between 'WHERE' keyword and '(' or '{' after it */
+	/* Whitespace between 'WHERE'/'SQLQUERY' keyword and '(' or '{' after it */
 %x SPARQL_AFTER_WHERE
 
 	/* Whitespace between 'IDENTIFIED' keyword and 'BY' keyword */
@@ -398,132 +399,6 @@ SPAR_PARAMNAME	(([A-Z]+"::")?(({SPAR_SQLNAME}("."{SPAR_SQLNAME})?)|(":"{SPAR_SQL
 	/* Keyword punctuators */
 
 <SPARQL>"a"				{ return a_L		; }
-<SPARQL>{A}{L}{T}{E}{R}			{ return ALTER_L	; }
-<SPARQL>{A}{S}				{ return AS_L		; }
-<SPARQL>{A}{S}{C}			{ return ASC_L		; }
-<SPARQL>{A}{S}{K}			{ return ASK_L		; }
-<SPARQL>{A}{V}{G}			{ return AVG_L		; }
-<SPARQL>{B}{A}{S}{E}			{ return BASE_L		; }
-<SPARQL>{B}{I}{N}{D}{I}{N}{G}{S}	{ return BINDINGS_L	; }
-<SPARQL>{B}{I}{J}{E}{C}{T}{I}{O}{N}	{ return BIJECTION_L	; }
-<SPARQL>{B}{O}{U}{N}{D}			{ return BOUND_L	; }
-<SPARQL>{B}{Y}				{ return BY_L		; }
-<SPARQL>{C}{L}{A}{S}{S}			{ return CLASS_L	; }
-<SPARQL>{C}{L}{E}{A}{R}			{ return CLEAR_L	; }
-<SPARQL>{C}{O}{N}{S}{T}{R}{U}{C}{T}	{ return CONSTRUCT_L	; }
-<SPARQL>{C}{O}{U}{N}{T}			{ BEGIN SPARQL_AFTER_COUNT; }
-<SPARQL>{C}{R}{E}{A}{T}{E}		{ return CREATE_L	; }
-<SPARQL>{D}{A}{T}{A}			{ return DATA_L		; }
-<SPARQL>{D}{A}{T}{A}{T}{Y}{P}{E}	{ return DATATYPE_L	; }
-<SPARQL>{D}{E}{F}{A}{U}{L}{T}		{ return DEFAULT_L	; }
-<SPARQL>{D}{E}{F}{I}{N}{E}		{ return DEFINE_L	; }
-<SPARQL>{D}{E}{L}{E}{T}{E}		{ return DELETE_L	; }
-<SPARQL>{D}{E}{R}{E}{F}			{ return DEREF_L	; }
-<SPARQL>{D}{E}{S}{C}			{ return DESC_L		; }
-<SPARQL>{D}{E}{S}{C}{R}{I}{B}{E}	{ return DESCRIBE_L	; }
-<SPARQL>{D}{I}{S}{T}{I}{N}{C}{T}	{ return DISTINCT_L	; }
-<SPARQL>{D}{R}{O}{P}			{ return DROP_L		; }
-<SPARQL>{E}{X}{C}{L}{U}{S}{I}{V}{E}	{ return EXCLUSIVE_L	; }
-<SPARQL>{E}{X}{I}{S}{T}{S}		{ return EXISTS_L	; }
-<SPARQL>{F}{A}{L}{S}{E}			{ return false_L	; }
-<SPARQL>{F}{I}{L}{T}{E}{R}		{ return FILTER_L	; }
-<SPARQL>{F}{R}{O}{M}			{ return FROM_L		; }
-<SPARQL>{F}{U}{N}{C}{T}{I}{O}{N}	{ return FUNCTION_L	; }
-<SPARQL>{G}{R}{A}{P}{H}			{ return GRAPH_L	; }
-<SPARQL>{G}{R}{O}{U}{P}			{ return GROUP_L	; }
-<SPARQL>{H}{A}{V}{I}{N}{G}		{ return HAVING_L	; }
-<SPARQL>{I}{F}{P}			{ return IFP_L		; }
-<SPARQL>{I}{N}				{ return IN_L		; }
-<SPARQL>{I}{N}{D}{E}{X}			{ return INDEX_L	; }
-<SPARQL>{I}{N}{F}{E}{R}{E}{N}{C}{E}	{ return INFERENCE_L	; }
-<SPARQL>{I}{N}{S}{E}{R}{T}		{ return INSERT_L	; }
-<SPARQL>{I}{N}{T}{O}			{ return INTO_L		; }
-<SPARQL>{I}{R}{I}			{ return IRI_L		; }
-<SPARQL>{I}{S}{B}{L}{A}{N}{K}		{ return isBLANK_L	; }
-<SPARQL>{I}{S}{I}{R}{I}			{ return isIRI_L	; }
-<SPARQL>{I}{S}{L}{I}{T}{E}{R}{A}{L}	{ return isLITERAL_L	; }
-<SPARQL>{I}{S}{R}{E}{F}			{ return isREF_L	; }
-<SPARQL>{I}{S}{U}{R}{I}			{ return isURI_L	; }
-<SPARQL>{L}{A}{N}{G}			{ return LANG_L		; }
-<SPARQL>{L}{A}{N}{G}{M}{A}{T}{C}{H}{E}{S}	{ return LANGMATCHES_L		; }
-<SPARQL>{L}{I}{K}{E}			{ return LIKE_L		; }
-<SPARQL>{L}{I}{M}{I}{T}			{ return LIMIT_L	; }
-<SPARQL>{L}{I}{T}{E}{R}{A}{L}		{ return LITERAL_L	; }
-<SPARQL>{L}{O}{A}{D}			{ return LOAD_L		; }
-<SPARQL>{M}{A}{K}{E}			{ return MAKE_L		; }
-<SPARQL>{M}{A}{P}			{ return MAP_L		; }
-<SPARQL>{M}{A}{X}			{ return MAX_L		; }
-<SPARQL>{M}{I}{N}			{ return MIN_L		; }
-<SPARQL>{M}{I}{N}{U}{S}			{ return MINUS_L	; }
-<SPARQL>{M}{O}{D}{I}{F}{Y}		{ return MODIFY_L	; }
-<SPARQL>{N}{A}{M}{E}{D}			{ return NAMED_L	; }
-<SPARQL>{N}{I}{L}			{ return NIL_L		; }
-<SPARQL>{N}{O}{T}			{ return NOT_L		; }
-<SPARQL>{N}{O}{T}[ \t]+{F}{R}{O}{M}	{ return NOT_FROM_L	; }
-<SPARQL>{N}{U}{L}{L}			{ return NULL_L		; }
-<SPARQL>{O}{B}{J}{E}{C}{T}		{ return OBJECT_L	; }
-<SPARQL>{O}{F}				{ return OF_L		; }
-<SPARQL>{O}{F}{F}{B}{A}{N}{D}		{ return OFFBAND_L	; }
-<SPARQL>{O}{F}{F}{S}{E}{T}		{ return OFFSET_L	; }
-<SPARQL>{O}{P}{T}{I}{O}{N}{A}{L}	{ return OPTIONAL_L	; }
-<SPARQL>{O}{P}{T}{I}{O}{N}		{ return OPTION_L	; }
-<SPARQL>{O}{R}{D}{E}{R}			{ return ORDER_L	; }
-<SPARQL>{P}{R}{E}{D}{I}{C}{A}{T}{E}	{ return PREDICATE_L	; }
-<SPARQL>{P}{R}{E}{F}{I}{X}		{ return PREFIX_L	; }
-<SPARQL>{Q}{U}{A}{D}			{ return QUAD_L		; }
-<SPARQL>{R}{E}{G}{E}{X}			{ return REGEX_L	; }
-<SPARQL>{R}{E}{D}{U}{C}{E}{D}		{ return REDUCED_L	; }
-<SPARQL>{R}{E}{T}{U}{R}{N}{S}		{ return RETURNS_L	; }
-<SPARQL>{S}{C}{O}{R}{E}			{ return SCORE_L	; }
-<SPARQL>{S}{C}{O}{R}{E}_{L}{I}{M}{I}{T}	{ return SCORE_LIMIT_L	; }
-<SPARQL>{S}{A}{M}{E}_{A}{S}		{ return SAME_AS_L	; }
-<SPARQL>{S}{A}{M}{E}_{A}{S}_{O}		{ return SAME_AS_O_L	; }
-<SPARQL>{S}{A}{M}{E}_{A}{S}_{P}		{ return SAME_AS_P_L	; }
-<SPARQL>{S}{A}{M}{E}_{A}{S}_{S}		{ return SAME_AS_S_L	; }
-<SPARQL>{S}{A}{M}{E}_{A}{S}_{S}_{O}	{ return SAME_AS_S_O_L	; }
-<SPARQL>{S}{A}{M}{E}{T}{E}{R}{M}	{ return SAMETERM_L	; }
-<SPARQL>{S}{E}{L}{E}{C}{T}		{ return SELECT_L	; }
-<SPARQL>{S}{E}{R}{V}{I}{C}{E}		{ return SERVICE_L	; }
-<SPARQL>{S}{I}{L}{E}{N}{T}		{ return SILENT_L	; }
-<SPARQL>{S}{O}{F}{T}			{ return SOFT_L		; }
-<SPARQL>{S}{T}{O}{R}{A}{G}{E}		{ return STORAGE_L	; }
-<SPARQL>{S}{T}{R}			{ return STR_L		; }
-<SPARQL>{S}{U}{B}{C}{L}{A}{S}{S}	{ return SUBCLASS_L	; }
-<SPARQL>{S}{U}{B}{J}{E}{C}{T}		{ return SUBJECT_L	; }
-<SPARQL>{S}{U}{M}			{ return SUM_L		; }
-<SPARQL>{T}{A}{B}{L}{E}_{O}{P}{T}{I}{O}{N}	{ return TABLE_OPTION_L	; }
-<SPARQL>{T}_{C}{Y}{C}{L}{E}{S}_{O}{N}{L}{Y}	{ return T_CYCLES_ONLY_L	; }
-<SPARQL>{T}_{D}{I}{R}{E}{C}{T}{I}{O}{N}	{ return T_DIRECTION_L	; }
-<SPARQL>{T}_{D}{I}{S}{T}{I}{N}{C}{T}	{ return T_DISTINCT_L	; }
-<SPARQL>{T}_{E}{N}{D}_{F}{L}{A}{G}	{ return T_END_FLAG_L	; }
-<SPARQL>{T}_{E}{X}{I}{S}{T}{S}		{ return T_EXISTS_L	; }
-<SPARQL>{T}_{F}{I}{N}{A}{L}_{A}{S}	{ return T_FINAL_AS_L	; }
-<SPARQL>{T}_{I}{N}			{ return T_IN_L		; }
-<SPARQL>{T}_{M}{A}{X}			{ return T_MAX_L	; }
-<SPARQL>{T}_{M}{I}{N}			{ return T_MIN_L	; }
-<SPARQL>{T}_{O}{U}{T}			{ return T_OUT_L	; }
-<SPARQL>{T}_{N}{O}_{C}{Y}{C}{L}{E}{S}	{ return T_NO_CYCLES_L	; }
-<SPARQL>{T}_{N}{O}_{O}{R}{D}{E}{R}	{ return T_NO_ORDER_L	; }
-<SPARQL>{T}_{S}{H}{O}{R}{T}{E}{S}{T}_{O}{N}{L}{Y}	{ return T_SHORTEST_ONLY_L	; }
-<SPARQL>{T}_{S}{T}{E}{P}		{ return T_STEP_L	; }
-<SPARQL>{T}{R}{A}{N}{S}{I}{T}{I}{V}{E}	{ return TRANSITIVE_L	; }
-<SPARQL>{T}{R}{U}{E}			{ return true_L		; }
-<SPARQL>{U}{N}{B}{O}{U}{N}{D}		{ return UNBOUND_L	; }
-<SPARQL>{U}{N}{I}{O}{N}			{ return UNION_L	; }
-<SPARQL>{U}{S}{I}{N}{G}			{ return USING_L	; }
-<SPARQL>{W}{I}{T}{H}			{ return WITH_L		; }
-
-<SPARQL>{T}{E}{X}{T}			{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return TEXT_BL	; }
-<SPARQL>{X}{M}{L}			{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return XML_BL	; }
-
-<SPARQL>{I}{D}{E}{N}{T}{I}{F}{I}{E}{D}	{ BEGIN SPARQL_AFTER_IDENTIFIED; return IDENTIFIED_L	; }
-<SPARQL>{W}{H}{E}{R}{E}			{ BEGIN SPARQL_AFTER_WHERE; return WHERE_L	; }
-
-	/* Keyword punctuators of the SPARQL described in first drafts of W3C spec */
-
-<SPARQL>{S}{O}{U}{R}{C}{E}		{ return GRAPH_L	; }
-<SPARQL>{A}{N}{D}			{ return _AMP_AMP; }
-<SPARQL>{O}{R}				{ return _BAR_BAR; }
 
 	/* Grouping non-keyword punctuators */
 
@@ -545,38 +420,21 @@ SPAR_PARAMNAME	(([A-Z]+"::")?(({SPAR_SQLNAME}("."{SPAR_SQLNAME})?)|(":"{SPAR_SQL
 <SPARQL>({PN_PREFIX}?)":"		{ TOKBOX_Q(0,QNAME_NS,"namespace"); }
 <SPARQL>"_:"{PN_LOCAL}			{ TOKBOX_Q(0,BLANK_NODE_LABEL,"blank node label"); }
 
-<SPARQL>"?"{SPAR_VARNAME}	{
+<SPARQL>[?$]{SPAR_VARNAME}	{
     sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return QUEST_VARNAME;
+    return QD_VARNAME;
   }
 
-<SPARQL>[$]{SPAR_VARNAME}	{
+<SPARQL>[?$]":"{SPAR_PARAMNAME}	{
     sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return DOLLAR_VARNAME;
+    return QD_COLON_PARAMNAME;
   }
 
-<SPARQL>"?:"{SPAR_PARAMNAME}	{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return QUEST_COLON_PARAMNAME;
-  }
-
-<SPARQL>[$]":"{SPAR_PARAMNAME}	{
-    sparyylval.box = t_box_dv_uname_nchars (sparyytext + 1, sparyyleng - 1);
-    return DOLLAR_COLON_PARAMNAME;
-  }
-
-<SPARQL>"??"	{
+<SPARQL>[?$]"?"	{
     char buf[20]; sprintf (buf, ":%d", sparp->sparp_sparqre->sparqre_param_ctr[0]);
     sparp->sparp_sparqre->sparqre_param_ctr[0] += 1;
     sparyylval.box = t_box_dv_uname_string (buf);
-    return QUEST_COLON_PARAMNUM;
-  }
-
-<SPARQL>[$]"?"	{
-    char buf[20]; sprintf (buf, ":%d", sparp->sparp_sparqre->sparqre_param_ctr[0]);
-    sparp->sparp_sparqre->sparqre_param_ctr[0] += 1;
-    sparyylval.box = t_box_dv_uname_string (buf);
-    return DOLLAR_COLON_PARAMNUM;
+    return QD_COLON_PARAMNUM;
   }
 
 <SPARQL>"@"([a-zA-Z]+)(("-"([a-zA-Z0-9]+))*)	{
@@ -584,7 +442,22 @@ SPAR_PARAMNAME	(([A-Z]+"::")?(({SPAR_SQLNAME}("."{SPAR_SQLNAME})?)|(":"{SPAR_SQL
     return LANGTAG;
   }
 
-<SPARQL>{SPAR_PLAIN_SQLNAME}		{ sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_PLAIN_ID; }
+<SPARQL>{SPAR_PLAIN_SQLNAME}	{
+    const struct sparql_keyword *sk = sparql_lex_hash_kw (yytext, yyleng);
+    if (NULL == sk)
+      {
+        sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_PLAIN_ID;
+      }
+    switch (sk->token)
+      {
+      case COUNT_L: BEGIN SPARQL_AFTER_COUNT; break;
+      case IDENTIFIED_L: BEGIN SPARQL_AFTER_IDENTIFIED; return IDENTIFIED_L;
+      case WHERE_L: BEGIN SPARQL_AFTER_WHERE; return WHERE_L;
+      case SQLQUERY_L: BEGIN SPARQL_AFTER_WHERE; return SQLQUERY_L;
+      case SPARQL_BIF: sparyylval.token_type = sk->subtype; return SPARQL_BIF;
+      default: return sk->token;
+      } }
+
 <SPARQL>{SPAR_SQLNAME}"."{SPAR_SQLNAME} { sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_ALIASCOLNAME; }
 <SPARQL>{SPAR_SQLNAME}"."{SPAR_SQLNAME}?"."{SPAR_SQLNAME} { sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_QTABLENAME; }
 <SPARQL>{SPAR_SQLNAME}"."{SPAR_SQLNAME}?"."{SPAR_SQLNAME}"."{SPAR_SQLNAME} { sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng); return SPARQL_SQL_QTABLECOLNAME; }
@@ -662,7 +535,7 @@ SPAR_PARAMNAME	(([A-Z]+"::")?(({SPAR_SQLNAME}("."{SPAR_SQLNAME})?)|(":"{SPAR_SQL
     if (SPARQL == GET_CURRENT_BEGIN)
       {
         sparyylval.box = t_box_dv_short_nchars (sparyytext, sparyyleng-1);
-        return SPARQL_CONDITION_AFTER_WHERE_LPAR;
+        return SPARQL_SQLTEXT;
       }
     else
       yymore();
@@ -700,7 +573,7 @@ SPAR_PARAMNAME	(([A-Z]+"::")?(({SPAR_SQLNAME}("."{SPAR_SQLNAME})?)|(":"{SPAR_SQL
 
 <SPARQL_AFTER_COUNT>.	{ sparyyerror ("Only '(' and 'DISTINCT' are allowed after COUNT keyword in SPARQL expression"); }
 <SPARQL_AFTER_IDENTIFIED>.	{ sparyyerror ("Ill formed IDENTIFIED BY term"); }
-<SPARQL_AFTER_WHERE>.	{ sparyyerror ("Only '{', '(' and a string literal are allowed after WHERE keyword in SPARQL expression"); }
+<SPARQL_AFTER_WHERE>.	{ sparyyerror ("Only '{', '(' and a string literal are allowed after WHERE or SQLQUERY keyword in SPARQL expression"); }
 <SPARQL>.		{ sparyyerror ("Invalid character in SPARQL expression"); }
 
 %%
diff --git a/libsrc/Wi/sparql_p.c b/libsrc/Wi/sparql_p.c
index d617ced..443adce 100644
--- a/libsrc/Wi/sparql_p.c
+++ b/libsrc/Wi/sparql_p.c
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -76,7 +75,7 @@
 /* Copy the first part of user declarations.  */
 
 /* Line 189 of yacc.c  */
-#line 41 "./sparql_p.y"
+#line 42 "./sparql_p.y"
 
 
 #define YYPARSE_PARAM sparp_as_void
@@ -133,7 +132,7 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 
 
 /* Line 189 of yacc.c  */
-#line 137 "sparql_p.c"
+#line 136 "sparql_p.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -188,156 +187,158 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
      _STAR = 283,
      _STAR_GT = 284,
      a_L = 285,
-     ALTER_L = 286,
-     AS_L = 287,
-     ASC_L = 288,
-     ASK_L = 289,
-     AVG_L = 290,
-     BASE_L = 291,
-     BIJECTION_L = 292,
-     BINDINGS_L = 293,
-     BOUND_L = 294,
-     BY_L = 295,
-     CLASS_L = 296,
-     CLEAR_L = 297,
-     CREATE_L = 298,
-     CONSTRUCT_L = 299,
-     COUNT_LPAR = 300,
-     COUNT_DISTINCT_L = 301,
-     DATA_L = 302,
-     DATATYPE_L = 303,
-     DEFAULT_L = 304,
-     DEFINE_L = 305,
-     DELETE_L = 306,
-     DEREF_L = 307,
-     DESC_L = 308,
-     DESCRIBE_L = 309,
-     DISTINCT_L = 310,
-     DROP_L = 311,
-     EXCLUSIVE_L = 312,
-     EXISTS_L = 313,
-     false_L = 314,
-     FILTER_L = 315,
-     FROM_L = 316,
-     FUNCTION_L = 317,
-     GRAPH_L = 318,
-     GROUP_L = 319,
-     HAVING_L = 320,
-     IDENTIFIED_L = 321,
-     IFP_L = 322,
-     IN_L = 323,
-     INDEX_L = 324,
-     INFERENCE_L = 325,
-     INSERT_L = 326,
-     INTO_L = 327,
-     IRI_L = 328,
-     isBLANK_L = 329,
-     isIRI_L = 330,
-     isLITERAL_L = 331,
-     isREF_L = 332,
-     isURI_L = 333,
-     LANG_L = 334,
-     LANGMATCHES_L = 335,
-     LIKE_L = 336,
-     LIMIT_L = 337,
-     LITERAL_L = 338,
-     LOAD_L = 339,
-     MAKE_L = 340,
-     MAP_L = 341,
-     MAX_L = 342,
-     MIN_L = 343,
-     MINUS_L = 344,
-     MODIFY_L = 345,
-     NAMED_L = 346,
-     NIL_L = 347,
-     NOT_L = 348,
-     NOT_FROM_L = 349,
-     NULL_L = 350,
-     OBJECT_L = 351,
-     OF_L = 352,
-     OFFBAND_L = 353,
-     OFFSET_L = 354,
-     OPTIONAL_L = 355,
-     OPTION_L = 356,
-     ORDER_L = 357,
-     PREDICATE_L = 358,
-     PREFIX_L = 359,
-     QUAD_L = 360,
-     REGEX_L = 361,
-     REDUCED_L = 362,
-     RETURNS_L = 363,
-     SAME_AS_L = 364,
-     SAME_AS_O_L = 365,
-     SAME_AS_P_L = 366,
-     SAME_AS_S_L = 367,
-     SAME_AS_S_O_L = 368,
-     SAMETERM_L = 369,
-     SCORE_L = 370,
-     SCORE_LIMIT_L = 371,
-     SELECT_L = 372,
-     SERVICE_L = 373,
-     SILENT_L = 374,
-     SOFT_L = 375,
-     STORAGE_L = 376,
-     STR_L = 377,
-     SUBCLASS_L = 378,
-     SUBJECT_L = 379,
-     SUM_L = 380,
-     TABLE_OPTION_L = 381,
-     T_CYCLES_ONLY_L = 382,
-     T_DIRECTION_L = 383,
-     T_DISTINCT_L = 384,
-     T_END_FLAG_L = 385,
-     T_EXISTS_L = 386,
-     T_FINAL_AS_L = 387,
-     T_IN_L = 388,
-     T_MAX_L = 389,
-     T_MIN_L = 390,
-     T_OUT_L = 391,
-     T_NO_CYCLES_L = 392,
-     T_NO_ORDER_L = 393,
-     T_SHORTEST_ONLY_L = 394,
-     T_STEP_L = 395,
-     TRANSITIVE_L = 396,
-     true_L = 397,
-     UNBOUND_L = 398,
-     UNION_L = 399,
-     USING_L = 400,
-     WHERE_L = 401,
-     WITH_L = 402,
-     __SPAR_PUNCT_END = 403,
-     START_OF_SPARQL_TEXT = 404,
-     END_OF_SPARQL_TEXT = 405,
-     SPARUL_RUN_SUBTYPE = 406,
-     SPARUL_INSERT_DATA = 407,
-     SPARUL_DELETE_DATA = 408,
-     __SPAR_NONPUNCT_START = 409,
-     TEXT_BL = 410,
-     XML_BL = 411,
-     SPARQL_INTEGER = 412,
-     SPARQL_DECIMAL = 413,
-     SPARQL_DOUBLE = 414,
-     SPARQL_STRING = 415,
-     SPARQL_CONDITION_AFTER_WHERE_LPAR = 416,
-     LANGTAG = 417,
-     QNAME = 418,
-     QNAME_NS = 419,
-     BLANK_NODE_LABEL = 420,
-     Q_IRI_REF = 421,
-     QUEST_VARNAME = 422,
-     DOLLAR_VARNAME = 423,
-     QUEST_COLON_PARAMNAME = 424,
-     DOLLAR_COLON_PARAMNAME = 425,
-     QUEST_COLON_PARAMNUM = 426,
-     DOLLAR_COLON_PARAMNUM = 427,
-     SPARQL_PLAIN_ID = 428,
-     SPARQL_SQL_ALIASCOLNAME = 429,
-     SPARQL_SQL_QTABLENAME = 430,
-     SPARQL_SQL_QTABLECOLNAME = 431,
-     __SPAR_NONPUNCT_END = 432,
-     _COLON = 433,
-     UMINUS = 434,
-     UPLUS = 435
+     ADD_L = 286,
+     ALL_L = 287,
+     ALTER_L = 288,
+     AS_L = 289,
+     ASC_L = 290,
+     ASK_L = 291,
+     ATTACH_L = 292,
+     AVG_L = 293,
+     BASE_L = 294,
+     BIJECTION_L = 295,
+     BINDINGS_L = 296,
+     BOUND_L = 297,
+     BY_L = 298,
+     CLASS_L = 299,
+     CLEAR_L = 300,
+     CREATE_L = 301,
+     CONSTRUCT_L = 302,
+     COPY_L = 303,
+     COUNT_L = 304,
+     COUNT_LPAR = 305,
+     COUNT_DISTINCT_L = 306,
+     DATA_L = 307,
+     DATATYPE_L = 308,
+     DEFAULT_L = 309,
+     DEFINE_L = 310,
+     DEFMACRO_L = 311,
+     DELETE_L = 312,
+     DEREF_L = 313,
+     DESC_L = 314,
+     DESCRIBE_L = 315,
+     DETACH_L = 316,
+     DISTINCT_L = 317,
+     DROP_L = 318,
+     EXCLUSIVE_L = 319,
+     EXISTS_L = 320,
+     false_L = 321,
+     FILTER_L = 322,
+     FROM_L = 323,
+     FUNCTION_L = 324,
+     GRAPH_L = 325,
+     GROUP_L = 326,
+     HAVING_L = 327,
+     IDENTIFIED_L = 328,
+     IFP_L = 329,
+     IN_L = 330,
+     INDEX_L = 331,
+     INFERENCE_L = 332,
+     INSERT_L = 333,
+     INTO_L = 334,
+     IRI_L = 335,
+     LANG_L = 336,
+     LIBRARY_L = 337,
+     LIKE_L = 338,
+     LIMIT_L = 339,
+     LITERAL_L = 340,
+     LOCAL_L = 341,
+     LOAD_L = 342,
+     MACRO_L = 343,
+     MAKE_L = 344,
+     MAP_L = 345,
+     MAX_L = 346,
+     MIN_L = 347,
+     MINUS_L = 348,
+     MODIFY_L = 349,
+     MOVE_L = 350,
+     NAMED_L = 351,
+     NIL_L = 352,
+     NOT_L = 353,
+     NULL_L = 354,
+     OBJECT_L = 355,
+     OF_L = 356,
+     OFFBAND_L = 357,
+     OFFSET_L = 358,
+     OPTIONAL_L = 359,
+     OPTION_L = 360,
+     ORDER_L = 361,
+     PREDICATE_L = 362,
+     PREFIX_L = 363,
+     QUAD_L = 364,
+     REDUCED_L = 365,
+     RETURNS_L = 366,
+     SAME_AS_L = 367,
+     SAME_AS_O_L = 368,
+     SAME_AS_P_L = 369,
+     SAME_AS_S_L = 370,
+     SAME_AS_S_O_L = 371,
+     SCORE_L = 372,
+     SCORE_LIMIT_L = 373,
+     SELECT_L = 374,
+     SERVICE_L = 375,
+     SILENT_L = 376,
+     SOFT_L = 377,
+     SQLQUERY_L = 378,
+     STORAGE_L = 379,
+     SUBCLASS_L = 380,
+     SUBJECT_L = 381,
+     SUM_L = 382,
+     TABLE_OPTION_L = 383,
+     TEXT_L = 384,
+     T_CYCLES_ONLY_L = 385,
+     T_DIRECTION_L = 386,
+     T_DISTINCT_L = 387,
+     T_END_FLAG_L = 388,
+     T_EXISTS_L = 389,
+     T_FINAL_AS_L = 390,
+     T_IN_L = 391,
+     T_MAX_L = 392,
+     T_MIN_L = 393,
+     T_OUT_L = 394,
+     T_NO_CYCLES_L = 395,
+     T_NO_ORDER_L = 396,
+     T_SHORTEST_ONLY_L = 397,
+     T_STEP_L = 398,
+     TO_L = 399,
+     TRANSITIVE_L = 400,
+     true_L = 401,
+     UNBOUND_L = 402,
+     UNION_L = 403,
+     USING_L = 404,
+     WHERE_L = 405,
+     WITH_L = 406,
+     XML_L = 407,
+     __SPAR_PUNCT_END = 408,
+     START_OF_SPARQL_TEXT = 409,
+     END_OF_SPARQL_TEXT = 410,
+     SPARUL_RUN_SUBTYPE = 411,
+     SPARUL_INSERT_DATA = 412,
+     SPARUL_DELETE_DATA = 413,
+     __SPAR_NONPUNCT_START = 414,
+     SPARQL_BIF = 415,
+     SPARQL_INTEGER = 416,
+     SPARQL_DECIMAL = 417,
+     SPARQL_DOUBLE = 418,
+     SPARQL_STRING = 419,
+     SPARQL_SQLTEXT = 420,
+     LANGTAG = 421,
+     QNAME = 422,
+     QNAME_NS = 423,
+     BLANK_NODE_LABEL = 424,
+     Q_IRI_REF = 425,
+     QD_VARNAME = 426,
+     QD_COLON_PARAMNAME = 427,
+     QD_COLON_PARAMNUM = 428,
+     SPARQL_PLAIN_ID = 429,
+     SPARQL_SQL_ALIASCOLNAME = 430,
+     SPARQL_SQL_QTABLENAME = 431,
+     SPARQL_SQL_QTABLECOLNAME = 432,
+     __SPAR_NONPUNCT_END = 433,
+     PRECODE_EXPN_PREC = 434,
+     _COLON = 435,
+     UMINUS = 436,
+     UPLUS = 437
    };
 #endif
 /* Tokens.  */
@@ -369,156 +370,158 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 #define _STAR 283
 #define _STAR_GT 284
 #define a_L 285
-#define ALTER_L 286
-#define AS_L 287
-#define ASC_L 288
-#define ASK_L 289
-#define AVG_L 290
-#define BASE_L 291
-#define BIJECTION_L 292
-#define BINDINGS_L 293
-#define BOUND_L 294
-#define BY_L 295
-#define CLASS_L 296
-#define CLEAR_L 297
-#define CREATE_L 298
-#define CONSTRUCT_L 299
-#define COUNT_LPAR 300
-#define COUNT_DISTINCT_L 301
-#define DATA_L 302
-#define DATATYPE_L 303
-#define DEFAULT_L 304
-#define DEFINE_L 305
-#define DELETE_L 306
-#define DEREF_L 307
-#define DESC_L 308
-#define DESCRIBE_L 309
-#define DISTINCT_L 310
-#define DROP_L 311
-#define EXCLUSIVE_L 312
-#define EXISTS_L 313
-#define false_L 314
-#define FILTER_L 315
-#define FROM_L 316
-#define FUNCTION_L 317
-#define GRAPH_L 318
-#define GROUP_L 319
-#define HAVING_L 320
-#define IDENTIFIED_L 321
-#define IFP_L 322
-#define IN_L 323
-#define INDEX_L 324
-#define INFERENCE_L 325
-#define INSERT_L 326
-#define INTO_L 327
-#define IRI_L 328
-#define isBLANK_L 329
-#define isIRI_L 330
-#define isLITERAL_L 331
-#define isREF_L 332
-#define isURI_L 333
-#define LANG_L 334
-#define LANGMATCHES_L 335
-#define LIKE_L 336
-#define LIMIT_L 337
-#define LITERAL_L 338
-#define LOAD_L 339
-#define MAKE_L 340
-#define MAP_L 341
-#define MAX_L 342
-#define MIN_L 343
-#define MINUS_L 344
-#define MODIFY_L 345
-#define NAMED_L 346
-#define NIL_L 347
-#define NOT_L 348
-#define NOT_FROM_L 349
-#define NULL_L 350
-#define OBJECT_L 351
-#define OF_L 352
-#define OFFBAND_L 353
-#define OFFSET_L 354
-#define OPTIONAL_L 355
-#define OPTION_L 356
-#define ORDER_L 357
-#define PREDICATE_L 358
-#define PREFIX_L 359
-#define QUAD_L 360
-#define REGEX_L 361
-#define REDUCED_L 362
-#define RETURNS_L 363
-#define SAME_AS_L 364
-#define SAME_AS_O_L 365
-#define SAME_AS_P_L 366
-#define SAME_AS_S_L 367
-#define SAME_AS_S_O_L 368
-#define SAMETERM_L 369
-#define SCORE_L 370
-#define SCORE_LIMIT_L 371
-#define SELECT_L 372
-#define SERVICE_L 373
-#define SILENT_L 374
-#define SOFT_L 375
-#define STORAGE_L 376
-#define STR_L 377
-#define SUBCLASS_L 378
-#define SUBJECT_L 379
-#define SUM_L 380
-#define TABLE_OPTION_L 381
-#define T_CYCLES_ONLY_L 382
-#define T_DIRECTION_L 383
-#define T_DISTINCT_L 384
-#define T_END_FLAG_L 385
-#define T_EXISTS_L 386
-#define T_FINAL_AS_L 387
-#define T_IN_L 388
-#define T_MAX_L 389
-#define T_MIN_L 390
-#define T_OUT_L 391
-#define T_NO_CYCLES_L 392
-#define T_NO_ORDER_L 393
-#define T_SHORTEST_ONLY_L 394
-#define T_STEP_L 395
-#define TRANSITIVE_L 396
-#define true_L 397
-#define UNBOUND_L 398
-#define UNION_L 399
-#define USING_L 400
-#define WHERE_L 401
-#define WITH_L 402
-#define __SPAR_PUNCT_END 403
-#define START_OF_SPARQL_TEXT 404
-#define END_OF_SPARQL_TEXT 405
-#define SPARUL_RUN_SUBTYPE 406
-#define SPARUL_INSERT_DATA 407
-#define SPARUL_DELETE_DATA 408
-#define __SPAR_NONPUNCT_START 409
-#define TEXT_BL 410
-#define XML_BL 411
-#define SPARQL_INTEGER 412
-#define SPARQL_DECIMAL 413
-#define SPARQL_DOUBLE 414
-#define SPARQL_STRING 415
-#define SPARQL_CONDITION_AFTER_WHERE_LPAR 416
-#define LANGTAG 417
-#define QNAME 418
-#define QNAME_NS 419
-#define BLANK_NODE_LABEL 420
-#define Q_IRI_REF 421
-#define QUEST_VARNAME 422
-#define DOLLAR_VARNAME 423
-#define QUEST_COLON_PARAMNAME 424
-#define DOLLAR_COLON_PARAMNAME 425
-#define QUEST_COLON_PARAMNUM 426
-#define DOLLAR_COLON_PARAMNUM 427
-#define SPARQL_PLAIN_ID 428
-#define SPARQL_SQL_ALIASCOLNAME 429
-#define SPARQL_SQL_QTABLENAME 430
-#define SPARQL_SQL_QTABLECOLNAME 431
-#define __SPAR_NONPUNCT_END 432
-#define _COLON 433
-#define UMINUS 434
-#define UPLUS 435
+#define ADD_L 286
+#define ALL_L 287
+#define ALTER_L 288
+#define AS_L 289
+#define ASC_L 290
+#define ASK_L 291
+#define ATTACH_L 292
+#define AVG_L 293
+#define BASE_L 294
+#define BIJECTION_L 295
+#define BINDINGS_L 296
+#define BOUND_L 297
+#define BY_L 298
+#define CLASS_L 299
+#define CLEAR_L 300
+#define CREATE_L 301
+#define CONSTRUCT_L 302
+#define COPY_L 303
+#define COUNT_L 304
+#define COUNT_LPAR 305
+#define COUNT_DISTINCT_L 306
+#define DATA_L 307
+#define DATATYPE_L 308
+#define DEFAULT_L 309
+#define DEFINE_L 310
+#define DEFMACRO_L 311
+#define DELETE_L 312
+#define DEREF_L 313
+#define DESC_L 314
+#define DESCRIBE_L 315
+#define DETACH_L 316
+#define DISTINCT_L 317
+#define DROP_L 318
+#define EXCLUSIVE_L 319
+#define EXISTS_L 320
+#define false_L 321
+#define FILTER_L 322
+#define FROM_L 323
+#define FUNCTION_L 324
+#define GRAPH_L 325
+#define GROUP_L 326
+#define HAVING_L 327
+#define IDENTIFIED_L 328
+#define IFP_L 329
+#define IN_L 330
+#define INDEX_L 331
+#define INFERENCE_L 332
+#define INSERT_L 333
+#define INTO_L 334
+#define IRI_L 335
+#define LANG_L 336
+#define LIBRARY_L 337
+#define LIKE_L 338
+#define LIMIT_L 339
+#define LITERAL_L 340
+#define LOCAL_L 341
+#define LOAD_L 342
+#define MACRO_L 343
+#define MAKE_L 344
+#define MAP_L 345
+#define MAX_L 346
+#define MIN_L 347
+#define MINUS_L 348
+#define MODIFY_L 349
+#define MOVE_L 350
+#define NAMED_L 351
+#define NIL_L 352
+#define NOT_L 353
+#define NULL_L 354
+#define OBJECT_L 355
+#define OF_L 356
+#define OFFBAND_L 357
+#define OFFSET_L 358
+#define OPTIONAL_L 359
+#define OPTION_L 360
+#define ORDER_L 361
+#define PREDICATE_L 362
+#define PREFIX_L 363
+#define QUAD_L 364
+#define REDUCED_L 365
+#define RETURNS_L 366
+#define SAME_AS_L 367
+#define SAME_AS_O_L 368
+#define SAME_AS_P_L 369
+#define SAME_AS_S_L 370
+#define SAME_AS_S_O_L 371
+#define SCORE_L 372
+#define SCORE_LIMIT_L 373
+#define SELECT_L 374
+#define SERVICE_L 375
+#define SILENT_L 376
+#define SOFT_L 377
+#define SQLQUERY_L 378
+#define STORAGE_L 379
+#define SUBCLASS_L 380
+#define SUBJECT_L 381
+#define SUM_L 382
+#define TABLE_OPTION_L 383
+#define TEXT_L 384
+#define T_CYCLES_ONLY_L 385
+#define T_DIRECTION_L 386
+#define T_DISTINCT_L 387
+#define T_END_FLAG_L 388
+#define T_EXISTS_L 389
+#define T_FINAL_AS_L 390
+#define T_IN_L 391
+#define T_MAX_L 392
+#define T_MIN_L 393
+#define T_OUT_L 394
+#define T_NO_CYCLES_L 395
+#define T_NO_ORDER_L 396
+#define T_SHORTEST_ONLY_L 397
+#define T_STEP_L 398
+#define TO_L 399
+#define TRANSITIVE_L 400
+#define true_L 401
+#define UNBOUND_L 402
+#define UNION_L 403
+#define USING_L 404
+#define WHERE_L 405
+#define WITH_L 406
+#define XML_L 407
+#define __SPAR_PUNCT_END 408
+#define START_OF_SPARQL_TEXT 409
+#define END_OF_SPARQL_TEXT 410
+#define SPARUL_RUN_SUBTYPE 411
+#define SPARUL_INSERT_DATA 412
+#define SPARUL_DELETE_DATA 413
+#define __SPAR_NONPUNCT_START 414
+#define SPARQL_BIF 415
+#define SPARQL_INTEGER 416
+#define SPARQL_DECIMAL 417
+#define SPARQL_DOUBLE 418
+#define SPARQL_STRING 419
+#define SPARQL_SQLTEXT 420
+#define LANGTAG 421
+#define QNAME 422
+#define QNAME_NS 423
+#define BLANK_NODE_LABEL 424
+#define Q_IRI_REF 425
+#define QD_VARNAME 426
+#define QD_COLON_PARAMNAME 427
+#define QD_COLON_PARAMNUM 428
+#define SPARQL_PLAIN_ID 429
+#define SPARQL_SQL_ALIASCOLNAME 430
+#define SPARQL_SQL_QTABLENAME 431
+#define SPARQL_SQL_QTABLECOLNAME 432
+#define __SPAR_NONPUNCT_END 433
+#define PRECODE_EXPN_PREC 434
+#define _COLON 435
+#define UMINUS 436
+#define UPLUS 437
 
 
 
@@ -528,7 +531,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 97 "./sparql_p.y"
+#line 98 "./sparql_p.y"
 
   caddr_t box;
   caddr_t *boxes;
@@ -543,7 +546,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 547 "sparql_p.c"
+#line 550 "sparql_p.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -555,7 +558,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 559 "sparql_p.c"
+#line 562 "sparql_p.c"
 
 #ifdef short
 # undef short
@@ -605,7 +608,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -770,20 +773,20 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  7
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   3668
+#define YYLAST   3373
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  181
+#define YYNTOKENS  183
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  274
+#define YYNNTS  317
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  624
+#define YYNRULES  700
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  1038
+#define YYNSTATES  1150
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   435
+#define YYMAXUTOK   437
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -834,7 +837,7 @@ static const yytype_uint8 yytranslate[] =
      145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
      155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
      165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     175,   176,   177,   178,   179,   180
+     175,   176,   177,   178,   179,   180,   181,   182
 };
 
 #if YYDEBUG
@@ -842,326 +845,363 @@ static const yytype_uint8 yytranslate[] =
    YYRHS.  */
 static const yytype_uint16 yyprhs[] =
 {
-       0,     0,     3,     8,    13,    16,    21,    23,    25,    27,
-      29,    31,    35,    36,    39,    40,    45,    47,    51,    53,
-      55,    57,    59,    61,    62,    65,    68,    69,    72,    76,
-      79,    82,    83,    90,    92,    95,    98,   101,   102,   105,
-     107,   109,   111,   112,   120,   121,   129,   131,   133,   134,
-     139,   140,   143,   147,   149,   152,   155,   159,   161,   164,
-     165,   166,   171,   173,   176,   179,   184,   185,   188,   189,
-     191,   192,   199,   200,   205,   208,   209,   211,   212,   213,
-     221,   223,   226,   228,   230,   232,   233,   235,   237,   240,
-     244,   246,   249,   251,   253,   255,   257,   259,   261,   265,
-     271,   277,   278,   279,   284,   286,   289,   293,   297,   299,
-     301,   303,   304,   305,   309,   310,   311,   316,   318,   321,
-     326,   331,   334,   336,   338,   340,   341,   343,   345,   346,
-     348,   351,   352,   354,   357,   361,   362,   371,   373,   377,
-     382,   384,   386,   388,   390,   392,   394,   395,   400,   403,
-     404,   405,   406,   415,   416,   417,   424,   425,   429,   430,
-     436,   441,   444,   447,   451,   454,   456,   459,   460,   465,
-     466,   467,   468,   478,   479,   483,   485,   488,   491,   495,
-     498,   501,   502,   507,   508,   510,   513,   515,   519,   520,
-     522,   524,   528,   529,   533,   534,   538,   539,   541,   544,
-     548,   549,   553,   554,   560,   564,   568,   570,   572,   576,
-     580,   584,   588,   590,   593,   594,   595,   601,   603,   607,
-     609,   612,   615,   618,   621,   624,   627,   630,   633,   635,
-     638,   640,   643,   645,   648,   653,   656,   659,   661,   663,
-     668,   670,   677,   684,   686,   691,   693,   695,   699,   701,
-     703,   705,   707,   709,   711,   713,   715,   716,   721,   722,
-     727,   730,   732,   735,   737,   740,   742,   744,   746,   748,
-     750,   753,   755,   757,   759,   763,   765,   767,   769,   771,
-     773,   775,   777,   781,   785,   787,   790,   794,   798,   803,
-     805,   807,   810,   813,   816,   819,   821,   823,   825,   828,
-     830,   832,   834,   836,   838,   840,   842,   844,   847,   850,
-     852,   854,   856,   858,   859,   864,   868,   872,   876,   880,
-     884,   888,   889,   894,   895,   902,   906,   910,   914,   918,
-     922,   926,   930,   934,   937,   940,   943,   946,   950,   951,
-     959,   960,   970,   972,   974,   977,   979,   981,   983,   985,
-     987,   992,   997,  1004,  1009,  1014,  1021,  1026,  1031,  1036,
-    1041,  1043,  1044,  1050,  1051,  1057,  1064,  1073,  1076,  1077,
-    1079,  1081,  1084,  1088,  1090,  1094,  1098,  1101,  1103,  1105,
-    1107,  1109,  1112,  1116,  1118,  1120,  1122,  1124,  1126,  1128,
-    1130,  1133,  1136,  1139,  1142,  1144,  1146,  1148,  1150,  1152,
-    1155,  1157,  1160,  1162,  1164,  1166,  1168,  1170,  1172,  1174,
-    1176,  1178,  1179,  1185,  1186,  1192,  1193,  1199,  1200,  1206,
-    1207,  1216,  1219,  1222,  1228,  1233,  1238,  1239,  1244,  1245,
-    1249,  1250,  1254,  1255,  1258,  1260,  1262,  1263,  1265,  1267,
-    1268,  1273,  1275,  1277,  1279,  1281,  1283,  1285,  1287,  1289,
-    1291,  1293,  1301,  1309,  1317,  1323,  1329,  1337,  1343,  1344,
-    1348,  1353,  1355,  1359,  1361,  1363,  1366,  1368,  1372,  1373,
-    1377,  1382,  1384,  1388,  1391,  1394,  1397,  1399,  1401,  1404,
-    1405,  1406,  1416,  1417,  1418,  1428,  1434,  1440,  1447,  1451,
-    1456,  1457,  1458,  1466,  1467,  1475,  1478,  1479,  1482,  1489,
-    1490,  1492,  1493,  1498,  1499,  1504,  1506,  1510,  1512,  1515,
-    1517,  1520,  1524,  1526,  1527,  1532,  1534,  1536,  1538,  1540,
-    1543,  1547,  1549,  1550,  1555,  1556,  1562,  1569,  1577,  1578,
-    1584,  1586,  1588,  1589,  1595,  1599,  1600,  1604,  1606,  1609,
-    1612,  1615,  1618,  1619,  1620,  1627,  1629,  1630,  1635,  1636,
-    1640,  1642,  1645,  1646,  1652,  1653,  1654,  1655,  1656,  1666,
-    1668,  1669,  1672,  1673,  1676,  1682,  1685,  1686,  1689,  1692,
-    1694,  1697,  1699,  1701,  1704,  1706,  1708,  1710,  1715,  1717,
-    1718,  1720,  1722,  1725,  1729,  1732,  1733,  1737,  1742,  1744,
-    1748,  1751,  1753,  1756,  1759,  1760,  1762,  1764,  1768,  1770,
-    1774,  1780,  1784,  1785,  1787,  1789,  1793,  1797,  1799,  1803,
-    1805,  1807,  1809,  1811,  1813,  1815,  1817,  1819,  1821,  1826,
-    1827,  1829,  1831,  1835,  1837
+       0,     0,     3,     9,    14,    19,    22,    27,    29,    31,
+      33,    35,    37,    43,    44,    47,    48,    53,    55,    59,
+      61,    63,    65,    67,    69,    70,    73,    76,    77,    80,
+      84,    87,    90,    91,    92,   101,   102,   105,   106,   111,
+     112,   113,   121,   122,   123,   131,   133,   139,   147,   155,
+     156,   161,   166,   167,   169,   171,   175,   179,   181,   184,
+     186,   188,   190,   192,   194,   196,   198,   201,   204,   206,
+     208,   210,   212,   213,   218,   220,   222,   223,   230,   232,
+     235,   238,   241,   242,   245,   247,   249,   251,   252,   260,
+     261,   269,   271,   273,   274,   279,   280,   283,   287,   289,
+     291,   293,   296,   299,   303,   305,   308,   311,   315,   316,
+     317,   322,   324,   327,   330,   335,   336,   339,   340,   342,
+     343,   350,   351,   356,   359,   360,   362,   363,   364,   372,
+     374,   377,   379,   381,   382,   384,   386,   389,   393,   395,
+     398,   400,   402,   404,   406,   408,   410,   414,   420,   426,
+     427,   428,   433,   435,   438,   442,   446,   448,   450,   452,
+     453,   454,   458,   459,   460,   465,   467,   470,   475,   480,
+     483,   485,   487,   489,   490,   492,   494,   495,   497,   500,
+     501,   503,   506,   510,   511,   520,   522,   526,   531,   535,
+     537,   539,   541,   543,   545,   547,   548,   553,   556,   557,
+     558,   559,   568,   569,   570,   577,   578,   582,   583,   589,
+     594,   597,   600,   604,   607,   609,   612,   613,   618,   619,
+     620,   621,   631,   632,   636,   638,   641,   644,   648,   651,
+     654,   655,   660,   661,   663,   665,   668,   670,   674,   677,
+     679,   683,   686,   687,   689,   691,   695,   696,   697,   705,
+     706,   710,   711,   715,   717,   718,   720,   721,   725,   726,
+     732,   736,   740,   742,   744,   748,   752,   756,   760,   762,
+     765,   766,   767,   773,   775,   779,   781,   784,   787,   790,
+     793,   796,   799,   802,   805,   807,   810,   812,   815,   817,
+     820,   825,   828,   831,   833,   835,   840,   842,   849,   856,
+     858,   863,   865,   867,   871,   873,   875,   877,   879,   881,
+     883,   885,   887,   888,   893,   894,   899,   902,   904,   907,
+     909,   912,   914,   916,   918,   920,   922,   925,   927,   929,
+     931,   935,   937,   939,   941,   943,   945,   947,   949,   953,
+     957,   959,   962,   966,   970,   975,   977,   979,   982,   985,
+     988,   991,   993,   995,   998,  1000,  1002,  1004,  1006,  1008,
+    1010,  1013,  1016,  1018,  1020,  1022,  1024,  1025,  1030,  1034,
+    1038,  1042,  1046,  1050,  1051,  1056,  1057,  1064,  1068,  1072,
+    1076,  1080,  1084,  1088,  1092,  1096,  1099,  1102,  1105,  1108,
+    1112,  1113,  1121,  1122,  1132,  1134,  1136,  1137,  1141,  1143,
+    1145,  1147,  1149,  1151,  1153,  1156,  1161,  1166,  1171,  1176,
+    1177,  1181,  1182,  1187,  1188,  1190,  1192,  1195,  1199,  1201,
+    1205,  1209,  1212,  1213,  1215,  1217,  1220,  1224,  1226,  1230,
+    1234,  1237,  1239,  1240,  1245,  1247,  1249,  1251,  1253,  1256,
+    1260,  1262,  1264,  1266,  1268,  1270,  1272,  1274,  1277,  1280,
+    1283,  1286,  1288,  1290,  1292,  1294,  1296,  1299,  1301,  1304,
+    1306,  1308,  1310,  1312,  1314,  1316,  1318,  1320,  1322,  1324,
+    1330,  1331,  1337,  1338,  1344,  1345,  1351,  1352,  1358,  1359,
+    1368,  1372,  1376,  1383,  1388,  1392,  1393,  1398,  1402,  1406,
+    1408,  1410,  1412,  1415,  1417,  1420,  1421,  1424,  1425,  1430,
+    1432,  1434,  1435,  1437,  1439,  1441,  1443,  1444,  1450,  1451,
+    1456,  1457,  1460,  1466,  1468,  1470,  1472,  1474,  1475,  1480,
+    1482,  1484,  1486,  1488,  1490,  1492,  1494,  1496,  1504,  1512,
+    1518,  1526,  1532,  1533,  1537,  1542,  1544,  1548,  1551,  1554,
+    1557,  1559,  1561,  1564,  1566,  1570,  1571,  1572,  1582,  1584,
+    1586,  1587,  1588,  1598,  1604,  1610,  1617,  1621,  1626,  1627,
+    1628,  1636,  1642,  1643,  1652,  1655,  1656,  1659,  1666,  1667,
+    1669,  1670,  1675,  1676,  1681,  1683,  1687,  1689,  1692,  1694,
+    1697,  1701,  1703,  1704,  1709,  1711,  1713,  1715,  1717,  1719,
+    1724,  1730,  1735,  1737,  1740,  1744,  1746,  1747,  1752,  1753,
+    1759,  1766,  1774,  1775,  1781,  1783,  1785,  1786,  1792,  1796,
+    1797,  1801,  1803,  1806,  1809,  1812,  1815,  1816,  1817,  1824,
+    1826,  1827,  1832,  1833,  1837,  1839,  1842,  1843,  1849,  1850,
+    1851,  1852,  1853,  1863,  1865,  1866,  1869,  1870,  1873,  1879,
+    1882,  1883,  1886,  1889,  1891,  1894,  1896,  1898,  1901,  1903,
+    1905,  1907,  1912,  1914,  1915,  1917,  1919,  1922,  1926,  1929,
+    1932,  1934,  1935,  1939,  1944,  1946,  1950,  1953,  1955,  1958,
+    1961,  1962,  1964,  1966,  1970,  1972,  1976,  1982,  1986,  1987,
+    1989,  1991,  1995,  1999,  2001,  2005,  2007,  2009,  2011,  2013,
+    2015,  2017,  2019,  2021,  2023,  2028,  2029,  2031,  2033,  2037,
+    2039
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-     182,     0,    -1,   149,   184,   183,   150,    -1,   149,   184,
-     340,   150,    -1,   149,   150,    -1,   149,   184,   362,   454,
-      -1,     1,    -1,   193,    -1,   199,    -1,   201,    -1,   204,
-      -1,   185,   190,   191,    -1,    -1,   185,   186,    -1,    -1,
-      50,   187,   163,   188,    -1,   189,    -1,   188,     9,   189,
-      -1,   163,    -1,   166,    -1,   160,    -1,   157,    -1,   313,
-      -1,    -1,    36,   166,    -1,    36,     1,    -1,    -1,   191,
-     192,    -1,   104,   164,   166,    -1,   104,   164,    -1,   104,
-       1,    -1,    -1,   195,   194,   196,   206,   216,   231,    -1,
-     117,    -1,   117,   107,    -1,   117,    55,    -1,   117,    46,
-      -1,    -1,   197,   198,    -1,    28,    -1,   308,    -1,   307,
-      -1,    -1,    44,   200,   274,   206,   219,   231,   220,    -1,
-      -1,    54,   202,   203,   206,   215,   231,   220,    -1,    28,
-      -1,   303,    -1,    -1,    34,   205,   206,   219,    -1,    -1,
-     206,   207,    -1,   208,   337,   209,    -1,    61,    -1,    61,
-      91,    -1,    93,    61,    -1,    93,    61,    91,    -1,    94,
-      -1,    94,    91,    -1,    -1,    -1,   101,    16,   210,   211,
-      -1,    24,    -1,   212,    24,    -1,   163,   213,    -1,   212,
-       9,   163,   213,    -1,    -1,   214,   318,    -1,    -1,   219,
-      -1,    -1,   146,    14,   217,   249,    23,   220,    -1,    -1,
-      14,   218,   249,    23,    -1,   216,   220,    -1,    -1,   221,
-      -1,    -1,    -1,    38,   222,   224,    14,   223,   226,    23,
-      -1,   225,    -1,   224,   225,    -1,   167,    -1,   168,    -1,
-     313,    -1,    -1,   227,    -1,   228,    -1,   227,   228,    -1,
-      16,   229,    24,    -1,   230,    -1,   229,   230,    -1,   337,
-      -1,   331,    -1,   332,    -1,   333,    -1,   339,    -1,   143,
-      -1,   232,   236,   238,    -1,   232,   236,   238,   244,   245,
-      -1,   232,   236,   238,   246,   243,    -1,    -1,    -1,    64,
-      40,   233,   234,    -1,   235,    -1,   234,   235,    -1,    16,
-     318,    24,    -1,    17,   318,    25,    -1,   323,    -1,   327,
-      -1,   312,    -1,    -1,    -1,    65,   237,   318,    -1,    -1,
-      -1,   102,    40,   239,   240,    -1,   241,    -1,   240,   241,
-      -1,   242,    16,   318,    24,    -1,   242,    17,   318,    25,
-      -1,   242,   157,    -1,   323,    -1,   327,    -1,   312,    -1,
-      -1,    33,    -1,    53,    -1,    -1,   244,    -1,    82,   213,
-      -1,    -1,   246,    -1,    99,   213,    -1,   249,    23,   289,
-      -1,    -1,   195,   248,   196,   206,   216,   231,    23,   289,
-      -1,   278,    -1,   278,   250,   249,    -1,   278,   250,    10,
-     249,    -1,   253,    -1,   251,    -1,   260,    -1,   257,    -1,
-     267,    -1,   263,    -1,    -1,   100,    14,   252,   247,    -1,
-     100,     1,    -1,    -1,    -1,    -1,   105,    86,   254,   334,
-     255,    14,   256,   247,    -1,    -1,    -1,    63,   306,   258,
-      14,   259,   247,    -1,    -1,    14,   261,   247,    -1,    -1,
-     260,   144,    14,   262,   247,    -1,    60,    16,   318,    24,
-      -1,    60,   323,    -1,    60,   327,    -1,    60,   264,   265,
-      -1,    89,   265,    -1,    58,    -1,    93,    58,    -1,    -1,
-     266,   206,   219,   289,    -1,    -1,    -1,    -1,   118,   451,
-     268,   271,   269,   206,    14,   270,   247,    -1,    -1,    16,
-     272,    24,    -1,   273,    -1,   272,   273,    -1,   163,   188,
-      -1,    50,   163,   188,    -1,    68,   293,    -1,    68,    28,
-      -1,    -1,    14,   275,   276,    23,    -1,    -1,   277,    -1,
-     277,    10,    -1,   280,    -1,   277,    10,   280,    -1,    -1,
-     279,    -1,   280,    -1,   280,    10,   278,    -1,    -1,   302,
-     281,   284,    -1,    -1,   296,   282,   283,    -1,    -1,   284,
-      -1,   284,    26,    -1,   284,    26,    10,    -1,    -1,   295,
-     285,   287,    -1,    -1,   284,    26,   295,   286,   287,    -1,
-     284,    26,    10,    -1,   284,    26,     1,    -1,     1,    -1,
-     288,    -1,   287,     9,   288,    -1,   287,     9,    26,    -1,
-     287,     9,    10,    -1,   287,     9,     1,    -1,     1,    -1,
-     301,   289,    -1,    -1,    -1,   101,    16,   290,   291,    24,
-      -1,   292,    -1,   291,     9,   292,    -1,    67,    -1,    70,
-     173,    -1,    70,   163,    -1,    70,   166,    -1,    70,   160,
-      -1,    98,   312,    -1,   115,   312,    -1,   116,   318,    -1,
-     126,   160,    -1,   127,    -1,   128,   157,    -1,   129,    -1,
-     130,   157,    -1,   131,    -1,   132,   312,    -1,   133,    16,
-     293,    24,    -1,   135,   318,    -1,   134,   318,    -1,   137,
-      -1,   138,    -1,   136,    16,   293,    24,    -1,   139,    -1,
-     140,    16,   312,    24,    32,   312,    -1,   140,    16,   160,
-      24,    32,   312,    -1,   141,    -1,   294,    16,   330,    24,
-      -1,   294,    -1,   312,    -1,   293,     9,   312,    -1,   109,
-      -1,   110,    -1,   111,    -1,   112,    -1,   113,    -1,   305,
-      -1,    30,    -1,     1,    -1,    -1,    17,   297,   284,   299,
-      -1,    -1,    16,   298,   300,    24,    -1,    16,    24,    -1,
-      25,    -1,    26,    25,    -1,   301,    -1,   300,   301,    -1,
-     302,    -1,   296,    -1,   312,    -1,   315,    -1,   304,    -1,
-     303,   304,    -1,   312,    -1,   337,    -1,   316,    -1,    16,
-     318,    24,    -1,   312,    -1,   337,    -1,   316,    -1,   312,
-      -1,   339,    -1,   337,    -1,   316,    -1,   318,     9,   318,
-      -1,   307,     9,   318,    -1,   318,    -1,   308,   318,    -1,
-     310,   318,    24,    -1,   310,    28,    24,    -1,   310,    55,
-     318,    24,    -1,   311,    -1,    45,    -1,    35,    16,    -1,
-      88,    16,    -1,    87,    16,    -1,   125,    16,    -1,   167,
-      -1,   168,    -1,   313,    -1,   312,   336,    -1,   314,    -1,
-     169,    -1,   170,    -1,   171,    -1,   172,    -1,   337,    -1,
-     332,    -1,   331,    -1,    21,   331,    -1,    19,   331,    -1,
-     333,    -1,   339,    -1,    92,    -1,   316,    -1,    -1,     5,
-     317,   318,     5,    -1,   318,    32,   167,    -1,   318,    32,
-     168,    -1,   318,     7,   318,    -1,   318,     4,   318,    -1,
-     318,    11,   318,    -1,   318,    20,   318,    -1,    -1,   318,
-      81,   319,   318,    -1,    -1,   318,    68,   320,    16,   330,
-      24,    -1,   318,    18,   318,    -1,   318,    13,   318,    -1,
-     318,    15,   318,    -1,   318,    12,   318,    -1,   318,    21,
-     318,    -1,   318,    19,   318,    -1,   318,    28,   318,    -1,
-     318,    27,   318,    -1,     6,   318,    -1,    93,   318,    -1,
-      21,   318,    -1,    19,   318,    -1,    16,   318,    24,    -1,
-      -1,    16,    34,   321,   206,   219,    24,   289,    -1,    -1,
-      16,   195,   322,   196,   206,   216,   231,    24,   289,    -1,
-     309,    -1,   323,    -1,   337,   328,    -1,   332,    -1,   331,
-      -1,   333,    -1,   339,    -1,   312,    -1,   122,    16,   318,
-      24,    -1,    79,    16,   318,    24,    -1,    80,    16,   318,
-       9,   318,    24,    -1,    48,    16,   318,    24,    -1,    39,
-      16,   312,    24,    -1,   114,    16,   318,     9,   318,    24,
-      -1,    75,    16,   318,    24,    -1,    78,    16,   318,    24,
-      -1,    74,    16,   318,    24,    -1,    76,    16,   318,    24,
-      -1,   326,    -1,    -1,    73,   324,    16,   318,    24,    -1,
-      -1,    77,   325,    16,   318,    24,    -1,   106,    16,   318,
-       9,   318,    24,    -1,   106,    16,   318,     9,   318,     9,
-     318,    24,    -1,   337,   329,    -1,    -1,   329,    -1,    92,
-      -1,    16,    24,    -1,    16,   330,    24,    -1,   318,    -1,
-     330,     9,   318,    -1,   330,     9,     1,    -1,   330,     1,
-      -1,   157,    -1,   158,    -1,   159,    -1,   160,    -1,   160,
-     162,    -1,   160,     8,   337,    -1,   142,    -1,    59,    -1,
-     337,    -1,    28,    -1,    49,    -1,    22,    -1,    29,    -1,
-     335,   166,    -1,   335,   163,    -1,   335,   164,    -1,   335,
-       1,    -1,   166,    -1,   338,    -1,   163,    -1,   164,    -1,
-     165,    -1,    17,    25,    -1,   341,    -1,   340,   341,    -1,
-     342,    -1,   344,    -1,   346,    -1,   348,    -1,   350,    -1,
-     352,    -1,   353,    -1,   354,    -1,   355,    -1,    -1,    71,
-     357,   343,   274,   356,    -1,    -1,    71,    47,   357,   345,
-     274,    -1,    -1,    51,   358,   347,   274,   356,    -1,    -1,
-      51,    47,   358,   349,   274,    -1,    -1,    90,   359,   351,
-      51,   274,    71,   274,   356,    -1,    42,   359,    -1,    84,
-     213,    -1,    84,   213,   360,   452,   213,    -1,    43,   361,
-     453,   213,    -1,    56,   361,   453,   213,    -1,    -1,   206,
-     219,   231,   220,    -1,    -1,   360,   452,   213,    -1,    -1,
-      61,   452,   213,    -1,    -1,   452,   213,    -1,    68,    -1,
-      72,    -1,    -1,   119,    -1,   364,    -1,    -1,   362,    10,
-     363,   364,    -1,   365,    -1,   378,    -1,   381,    -1,   366,
-      -1,   367,    -1,   368,    -1,   369,    -1,   370,    -1,   384,
-      -1,   385,    -1,    43,    73,    41,   451,   160,   443,   371,
-      -1,    43,    73,    41,   451,   145,   441,   371,    -1,    43,
-      83,    41,   451,   145,   441,   375,    -1,    56,   361,    73,
-      41,   451,    -1,    56,   361,    83,    41,   451,    -1,    85,
-      73,    41,   451,   123,    97,   451,    -1,    85,   451,   123,
-      97,   451,    -1,    -1,   101,    16,    24,    -1,   101,    16,
-     372,    24,    -1,   373,    -1,   372,     9,   373,    -1,    37,
-      -1,    52,    -1,   108,   374,    -1,   160,    -1,   374,   144,
-     160,    -1,    -1,   101,    16,    24,    -1,   101,    16,   376,
-      24,    -1,   377,    -1,   376,     9,   377,    -1,    48,   451,
-      -1,    79,   160,    -1,    79,   450,    -1,    37,    -1,    52,
-      -1,   108,   374,    -1,    -1,    -1,    43,   105,   121,   451,
-     379,   387,    14,   380,   397,    -1,    -1,    -1,    31,   105,
-     121,   451,   382,   387,    14,   383,   397,    -1,    56,   361,
-     105,   121,   451,    -1,    56,   361,   105,    86,   451,    -1,
-      56,   361,   105,    86,   453,   451,    -1,    56,   361,   451,
-      -1,    56,   361,   453,   451,    -1,    -1,    -1,   387,    61,
-     175,    32,   173,   388,   390,    -1,    -1,   387,    61,   173,
-      32,   173,   389,   390,    -1,   387,   435,    -1,    -1,   390,
-     391,    -1,   155,   392,    83,   449,   393,   394,    -1,    -1,
-     156,    -1,    -1,    97,    16,   440,    24,    -1,    -1,   101,
-      16,   395,    24,    -1,   396,    -1,   395,     9,   396,    -1,
-     173,    -1,   173,   160,    -1,    23,    -1,   398,    23,    -1,
-     398,    10,    23,    -1,   400,    -1,    -1,   398,    10,   399,
-     400,    -1,   404,    -1,   386,    -1,   385,    -1,    23,    -1,
-     402,    23,    -1,   402,    10,    23,    -1,   404,    -1,    -1,
-     402,    10,   403,   404,    -1,    -1,    43,   451,    32,   405,
-     407,    -1,    43,   451,   145,   121,   451,   436,    -1,    43,
-     453,   451,   145,   121,   451,   436,    -1,    -1,   412,   436,
-      14,   406,   401,    -1,   410,    -1,   409,    -1,    -1,   412,
-     436,    14,   408,   401,    -1,   431,   430,   422,    -1,    -1,
-     431,   411,   416,    -1,   413,    -1,   412,   413,    -1,    63,
-     432,    -1,   124,   432,    -1,   103,   432,    -1,    -1,    -1,
-      96,   432,   414,   428,   415,   429,    -1,   418,    -1,    -1,
-     416,    26,   417,   418,    -1,    -1,   430,   419,   420,    -1,
-       1,    -1,   422,   427,    -1,    -1,   420,     9,   421,   422,
-     427,    -1,    -1,    -1,    -1,    -1,   431,   423,   428,   424,
-     429,   425,   433,   426,   436,    -1,     1,    -1,    -1,    32,
-     451,    -1,    -1,    48,   337,    -1,    48,    73,    16,   160,
-      24,    -1,    48,   449,    -1,    -1,    79,   160,    -1,    79,
-     449,    -1,   432,    -1,    17,    25,    -1,    30,    -1,   432,
-      -1,    17,    25,    -1,   451,    -1,   331,    -1,   332,    -1,
-     451,    16,   439,    24,    -1,   449,    -1,    -1,   434,    -1,
-     435,    -1,   434,   435,    -1,   146,    16,   161,    -1,   146,
-     160,    -1,    -1,   101,    16,    24,    -1,   101,    16,   437,
-      24,    -1,   438,    -1,   437,     9,   438,    -1,   120,    57,
-      -1,    57,    -1,   102,   157,    -1,   145,   173,    -1,    -1,
-     440,    -1,   449,    -1,   440,     9,   449,    -1,   442,    -1,
-     441,     9,   442,    -1,    62,   175,   443,   108,   447,    -1,
-      16,   444,    24,    -1,    -1,   445,    -1,   446,    -1,   445,
-       9,   446,    -1,   448,   450,   447,    -1,   450,    -1,   450,
-      93,    95,    -1,    68,    -1,   450,    -1,   450,    -1,   174,
-      -1,   176,    -1,   173,    -1,   155,    -1,   156,    -1,   337,
-      -1,    73,    16,   160,    24,    -1,    -1,   453,    -1,    63,
-      -1,    63,    66,    40,    -1,   150,    -1,    10,   150,    -1
+     184,     0,    -1,   154,   186,   195,   185,   155,    -1,   154,
+     186,   374,   155,    -1,   154,   186,   400,   155,    -1,   154,
+     155,    -1,   154,   186,   408,   499,    -1,     1,    -1,   215,
+      -1,   221,    -1,   223,    -1,   226,    -1,   187,   192,   193,
+     197,   397,    -1,    -1,   187,   188,    -1,    -1,    55,   189,
+     167,   190,    -1,   191,    -1,   190,     9,   191,    -1,   167,
+      -1,   170,    -1,   164,    -1,   161,    -1,   341,    -1,    -1,
+      39,   170,    -1,    39,     1,    -1,    -1,   193,   194,    -1,
+     108,   168,   170,    -1,   108,   168,    -1,   108,     1,    -1,
+      -1,    -1,    46,    88,    82,   371,   196,    14,   197,    23,
+      -1,    -1,   197,   198,    -1,    -1,    56,   371,   199,   200,
+      -1,    -1,    -1,    16,   207,    24,   201,   206,   202,   213,
+      -1,    -1,    -1,   205,   203,   206,    14,   204,   273,    23,
+      -1,     1,    -1,    14,   210,   211,   212,    23,    -1,    70,
+     210,    14,   210,   211,   212,    23,    -1,    54,    70,    14,
+     210,   211,   212,    23,    -1,    -1,    86,    16,   209,    24,
+      -1,    86,    16,   208,    24,    -1,    -1,   209,    -1,   208,
+      -1,   171,     9,   171,    -1,   208,     9,   171,    -1,   171,
+      -1,   209,   171,    -1,   171,    -1,   371,    -1,   171,    -1,
+      30,    -1,   371,    -1,   171,    -1,   365,    -1,    21,   365,
+      -1,    19,   365,    -1,    97,    -1,   366,    -1,   367,    -1,
+     371,    -1,    -1,    14,   214,   273,    23,    -1,   346,    -1,
+       1,    -1,    -1,   217,   216,   218,   228,   240,   255,    -1,
+     119,    -1,   119,   110,    -1,   119,    62,    -1,   119,    51,
+      -1,    -1,   219,   220,    -1,    28,    -1,   336,    -1,   335,
+      -1,    -1,    47,   222,   298,   228,   243,   255,   244,    -1,
+      -1,    60,   224,   225,   228,   239,   255,   244,    -1,    28,
+      -1,   331,    -1,    -1,    36,   227,   228,   243,    -1,    -1,
+     228,   229,    -1,   230,   371,   233,    -1,   231,    -1,   232,
+      -1,    68,    -1,    68,    96,    -1,    98,    68,    -1,    98,
+      68,    96,    -1,   149,    -1,   149,    96,    -1,    98,   149,
+      -1,    98,   149,    96,    -1,    -1,    -1,   105,    16,   234,
+     235,    -1,    24,    -1,   236,    24,    -1,   167,   237,    -1,
+     236,     9,   167,   237,    -1,    -1,   238,   346,    -1,    -1,
+     243,    -1,    -1,   150,    14,   241,   273,    23,   244,    -1,
+      -1,    14,   242,   273,    23,    -1,   240,   244,    -1,    -1,
+     245,    -1,    -1,    -1,    41,   246,   248,    14,   247,   250,
+      23,    -1,   249,    -1,   248,   249,    -1,   171,    -1,   341,
+      -1,    -1,   251,    -1,   252,    -1,   251,   252,    -1,    16,
+     253,    24,    -1,   254,    -1,   253,   254,    -1,   371,    -1,
+     365,    -1,   366,    -1,   367,    -1,   373,    -1,   147,    -1,
+     256,   260,   262,    -1,   256,   260,   262,   268,   269,    -1,
+     256,   260,   262,   270,   267,    -1,    -1,    -1,    71,    43,
+     257,   258,    -1,   259,    -1,   258,   259,    -1,    16,   346,
+      24,    -1,    17,   346,    25,    -1,   352,    -1,   353,    -1,
+     340,    -1,    -1,    -1,    72,   261,   346,    -1,    -1,    -1,
+     106,    43,   263,   264,    -1,   265,    -1,   264,   265,    -1,
+     266,    16,   346,    24,    -1,   266,    17,   346,    25,    -1,
+     266,   161,    -1,   352,    -1,   353,    -1,   340,    -1,    -1,
+      35,    -1,    59,    -1,    -1,   268,    -1,    84,   237,    -1,
+      -1,   270,    -1,   103,   237,    -1,   273,    23,   317,    -1,
+      -1,   217,   272,   218,   228,   240,   255,    23,   317,    -1,
+     303,    -1,   303,   274,   273,    -1,   303,   274,    10,   273,
+      -1,   171,    10,   273,    -1,   277,    -1,   275,    -1,   284,
+      -1,   281,    -1,   291,    -1,   287,    -1,    -1,   104,    14,
+     276,   271,    -1,   104,     1,    -1,    -1,    -1,    -1,   109,
+      90,   278,   368,   279,    14,   280,   271,    -1,    -1,    -1,
+      70,   334,   282,    14,   283,   271,    -1,    -1,    14,   285,
+     271,    -1,    -1,   284,   148,    14,   286,   271,    -1,    67,
+      16,   346,    24,    -1,    67,   352,    -1,    67,   353,    -1,
+      67,   288,   289,    -1,    93,   289,    -1,    65,    -1,    98,
+      65,    -1,    -1,   290,   228,   243,   317,    -1,    -1,    -1,
+      -1,   120,   496,   292,   295,   293,   228,    14,   294,   271,
+      -1,    -1,    16,   296,    24,    -1,   297,    -1,   296,   297,
+      -1,   167,   190,    -1,    55,   167,   190,    -1,    75,   321,
+      -1,    75,    28,    -1,    -1,    14,   299,   300,    23,    -1,
+      -1,   302,    -1,   301,    -1,   301,    10,    -1,   308,    -1,
+     301,    10,   308,    -1,   302,   308,    -1,   305,    -1,   301,
+      10,   305,    -1,   302,   305,    -1,    -1,   304,    -1,   308,
+      -1,   308,    10,   303,    -1,    -1,    -1,    70,   306,   334,
+     307,    14,   304,    23,    -1,    -1,   330,   309,   312,    -1,
+      -1,   324,   310,   311,    -1,   355,    -1,    -1,   312,    -1,
+      -1,   323,   313,   315,    -1,    -1,   312,    26,   323,   314,
+     315,    -1,   312,    26,    10,    -1,   312,    26,     1,    -1,
+       1,    -1,   316,    -1,   315,     9,   316,    -1,   315,     9,
+      26,    -1,   315,     9,    10,    -1,   315,     9,     1,    -1,
+       1,    -1,   329,   317,    -1,    -1,    -1,   105,    16,   318,
+     319,    24,    -1,   320,    -1,   319,     9,   320,    -1,    74,
+      -1,    77,   174,    -1,    77,   167,    -1,    77,   170,    -1,
+      77,   164,    -1,   102,   340,    -1,   117,   340,    -1,   118,
+     346,    -1,   128,   164,    -1,   130,    -1,   131,   161,    -1,
+     132,    -1,   133,   161,    -1,   134,    -1,   135,   340,    -1,
+     136,    16,   321,    24,    -1,   138,   346,    -1,   137,   346,
+      -1,   140,    -1,   141,    -1,   139,    16,   321,    24,    -1,
+     142,    -1,   143,    16,   340,    24,    34,   340,    -1,   143,
+      16,   164,    24,    34,   340,    -1,   145,    -1,   322,    16,
+     359,    24,    -1,   322,    -1,   340,    -1,   321,     9,   340,
+      -1,   112,    -1,   113,    -1,   114,    -1,   115,    -1,   116,
+      -1,   333,    -1,    30,    -1,     1,    -1,    -1,    17,   325,
+     312,   327,    -1,    -1,    16,   326,   328,    24,    -1,    16,
+      24,    -1,    25,    -1,    26,    25,    -1,   329,    -1,   328,
+     329,    -1,   330,    -1,   324,    -1,   340,    -1,   343,    -1,
+     332,    -1,   331,   332,    -1,   340,    -1,   371,    -1,   344,
+      -1,    16,   346,    24,    -1,   340,    -1,   371,    -1,   344,
+      -1,   340,    -1,   373,    -1,   371,    -1,   344,    -1,   346,
+       9,   346,    -1,   335,     9,   346,    -1,   346,    -1,   336,
+     346,    -1,   338,   346,    24,    -1,   338,    28,    24,    -1,
+     338,    62,   346,    24,    -1,   339,    -1,    50,    -1,    38,
+      16,    -1,    92,    16,    -1,    91,    16,    -1,   127,    16,
+      -1,   171,    -1,   341,    -1,   340,   370,    -1,   342,    -1,
+     172,    -1,   173,    -1,   371,    -1,   366,    -1,   365,    -1,
+      21,   365,    -1,    19,   365,    -1,   367,    -1,   373,    -1,
+      97,    -1,   344,    -1,    -1,     5,   345,   346,     5,    -1,
+     346,    34,   171,    -1,   346,     7,   346,    -1,   346,     4,
+     346,    -1,   346,    11,   346,    -1,   346,    20,   346,    -1,
+      -1,   346,    83,   347,   346,    -1,    -1,   346,    75,   348,
+      16,   359,    24,    -1,   346,    18,   346,    -1,   346,    13,
+     346,    -1,   346,    15,   346,    -1,   346,    12,   346,    -1,
+     346,    21,   346,    -1,   346,    19,   346,    -1,   346,    28,
+     346,    -1,   346,    27,   346,    -1,     6,   346,    -1,    98,
+     346,    -1,    21,   346,    -1,    19,   346,    -1,    16,   346,
+      24,    -1,    -1,    16,    36,   349,   228,   243,   317,    24,
+      -1,    -1,    16,   217,   350,   218,   228,   240,   255,   317,
+      24,    -1,   337,    -1,   352,    -1,    -1,   371,   351,   357,
+      -1,   366,    -1,   365,    -1,   367,    -1,   373,    -1,   340,
+      -1,   355,    -1,   160,   358,    -1,    80,    16,   346,    24,
+      -1,    81,    16,   346,    24,    -1,    53,    16,   346,    24,
+      -1,    42,    16,   340,    24,    -1,    -1,   371,   354,   358,
+      -1,    -1,    88,   371,   356,   360,    -1,    -1,   358,    -1,
+      97,    -1,    16,    24,    -1,    16,   359,    24,    -1,   346,
+      -1,   359,     9,   346,    -1,   359,     9,     1,    -1,   359,
+       1,    -1,    -1,   361,    -1,    97,    -1,    16,    24,    -1,
+      16,   362,    24,    -1,   363,    -1,   362,     9,   363,    -1,
+     362,     9,     1,    -1,   362,     1,    -1,   346,    -1,    -1,
+      14,   364,   273,    23,    -1,   161,    -1,   162,    -1,   163,
+      -1,   164,    -1,   164,   166,    -1,   164,     8,   371,    -1,
+     146,    -1,    66,    -1,   371,    -1,    28,    -1,    54,    -1,
+      22,    -1,    29,    -1,   369,   170,    -1,   369,   167,    -1,
+     369,   168,    -1,   369,     1,    -1,   170,    -1,   372,    -1,
+     167,    -1,   168,    -1,   169,    -1,    17,    25,    -1,   375,
+      -1,   374,   375,    -1,   377,    -1,   379,    -1,   381,    -1,
+     383,    -1,   385,    -1,   387,    -1,   388,    -1,   389,    -1,
+     390,    -1,   376,    -1,    63,   399,    88,    82,   237,    -1,
+      -1,    78,   392,   378,   298,   391,    -1,    -1,    78,    52,
+     392,   380,   298,    -1,    -1,    57,   393,   382,   298,   391,
+      -1,    -1,    57,    52,   393,   384,   298,    -1,    -1,    94,
+     396,   386,    57,   298,    78,   298,   391,    -1,    45,   399,
+     394,    -1,    87,   399,   237,    -1,    87,   399,   237,   398,
+     497,   237,    -1,    46,   399,   498,   237,    -1,    63,   399,
+     394,    -1,    -1,   228,   243,   255,   244,    -1,   398,   497,
+     237,    -1,    68,   497,   237,    -1,    32,    -1,    54,    -1,
+      96,    -1,   498,   237,    -1,    54,    -1,   497,   237,    -1,
+      -1,   497,   237,    -1,    -1,   151,   497,   237,   233,    -1,
+      75,    -1,    79,    -1,    -1,   121,    -1,   401,    -1,   403,
+      -1,   406,    -1,    -1,    57,   402,   298,   405,   391,    -1,
+      -1,    78,   404,   298,   391,    -1,    -1,    78,   298,    -1,
+     407,   399,   395,   144,   395,    -1,    48,    -1,    95,    -1,
+      31,    -1,   410,    -1,    -1,   408,    10,   409,   410,    -1,
+     411,    -1,   419,    -1,   423,    -1,   412,    -1,   413,    -1,
+     414,    -1,   426,    -1,   427,    -1,    46,   422,    44,   496,
+     164,   488,   415,    -1,    46,   422,    44,   496,   149,   486,
+     415,    -1,    63,   399,   422,    44,   496,    -1,    89,    80,
+      44,   496,   125,   101,   496,    -1,    89,   496,   125,   101,
+     496,    -1,    -1,   105,    16,    24,    -1,   105,    16,   416,
+      24,    -1,   417,    -1,   416,     9,   417,    -1,    53,   496,
+      -1,    81,   164,    -1,    81,   495,    -1,    40,    -1,    58,
+      -1,   111,   418,    -1,   164,    -1,   418,   148,   164,    -1,
+      -1,    -1,    46,   109,   124,   496,   420,   429,    14,   421,
+     439,    -1,    80,    -1,    85,    -1,    -1,    -1,    33,   109,
+     124,   496,   424,   429,    14,   425,   439,    -1,    63,   399,
+     109,   124,   496,    -1,    63,   399,   109,    90,   496,    -1,
+      63,   399,   109,    90,   498,   496,    -1,    63,   399,   496,
+      -1,    63,   399,   498,   496,    -1,    -1,    -1,   429,    68,
+     176,    34,   174,   430,   432,    -1,   429,    68,   174,    34,
+     174,    -1,    -1,   429,    68,   123,   480,    34,   174,   431,
+     432,    -1,   429,   479,    -1,    -1,   432,   433,    -1,   129,
+     434,    85,   494,   435,   436,    -1,    -1,   152,    -1,    -1,
+     101,    16,   485,    24,    -1,    -1,   105,    16,   437,    24,
+      -1,   438,    -1,   437,     9,   438,    -1,   174,    -1,   174,
+     164,    -1,    23,    -1,   440,    23,    -1,   440,    10,    23,
+      -1,   442,    -1,    -1,   440,    10,   441,   442,    -1,   448,
+      -1,   428,    -1,   427,    -1,   443,    -1,   444,    -1,    37,
+      88,    82,   496,    -1,    61,   399,    88,    82,   496,    -1,
+      61,   399,    88,    82,    -1,    23,    -1,   446,    23,    -1,
+     446,    10,    23,    -1,   448,    -1,    -1,   446,    10,   447,
+     448,    -1,    -1,    46,   496,    34,   449,   451,    -1,    46,
+     496,   149,   124,   496,   481,    -1,    46,   498,   496,   149,
+     124,   496,   481,    -1,    -1,   456,   481,    14,   450,   445,
+      -1,   454,    -1,   453,    -1,    -1,   456,   481,    14,   452,
+     445,    -1,   475,   474,   466,    -1,    -1,   475,   455,   460,
+      -1,   457,    -1,   456,   457,    -1,    70,   476,    -1,   126,
+     476,    -1,   107,   476,    -1,    -1,    -1,   100,   476,   458,
+     472,   459,   473,    -1,   462,    -1,    -1,   460,    26,   461,
+     462,    -1,    -1,   474,   463,   464,    -1,     1,    -1,   466,
+     471,    -1,    -1,   464,     9,   465,   466,   471,    -1,    -1,
+      -1,    -1,    -1,   475,   467,   472,   468,   473,   469,   477,
+     470,   481,    -1,     1,    -1,    -1,    34,   496,    -1,    -1,
+      53,   371,    -1,    53,    80,    16,   164,    24,    -1,    53,
+     494,    -1,    -1,    81,   164,    -1,    81,   494,    -1,   476,
+      -1,    17,    25,    -1,    30,    -1,   476,    -1,    17,    25,
+      -1,   496,    -1,   365,    -1,   366,    -1,   496,    16,   484,
+      24,    -1,   494,    -1,    -1,   478,    -1,   479,    -1,   478,
+     479,    -1,   150,    16,   165,    -1,   150,   164,    -1,    16,
+     165,    -1,   164,    -1,    -1,   105,    16,    24,    -1,   105,
+      16,   482,    24,    -1,   483,    -1,   482,     9,   483,    -1,
+     122,    64,    -1,    64,    -1,   106,   161,    -1,   149,   174,
+      -1,    -1,   485,    -1,   494,    -1,   485,     9,   494,    -1,
+     487,    -1,   486,     9,   487,    -1,    69,   176,   488,   111,
+     492,    -1,    16,   489,    24,    -1,    -1,   490,    -1,   491,
+      -1,   490,     9,   491,    -1,   493,   495,   492,    -1,   495,
+      -1,   495,    98,    99,    -1,    75,    -1,   495,    -1,   495,
+      -1,   175,    -1,   177,    -1,   174,    -1,   129,    -1,   152,
+      -1,   371,    -1,    80,    16,   164,    24,    -1,    -1,   498,
+      -1,    70,    -1,    70,    73,    43,    -1,   155,    -1,    10,
+     155,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   520,   520,   526,   529,   532,   535,   541,   542,   543,
-     544,   548,   552,   553,   557,   557,   567,   568,   572,   573,
-     574,   575,   576,   580,   581,   585,   589,   590,   594,   599,
-     600,   605,   605,   621,   622,   623,   624,   628,   628,   633,
-     635,   636,   642,   642,   660,   660,   676,   677,   681,   681,
-     692,   693,   701,   706,   707,   708,   709,   710,   711,   715,
-     716,   716,   721,   722,   726,   728,   733,   733,   739,   742,
-     746,   746,   750,   750,   757,   761,   762,   766,   770,   766,
-     782,   783,   787,   788,   789,   793,   794,   798,   799,   803,
-     810,   811,   815,   816,   817,   818,   819,   820,   825,   826,
-     827,   831,   832,   832,   841,   842,   847,   848,   849,   850,
-     851,   855,   856,   856,   865,   866,   866,   875,   876,   881,
-     882,   883,   884,   885,   886,   890,   891,   892,   896,   897,
-     901,   905,   906,   910,   914,   917,   917,   945,   946,   947,
-     951,   952,   953,   954,   955,   956,   960,   960,   961,   965,
-     966,   967,   965,   974,   975,   973,   982,   982,   983,   983,
-     994,   995,   996,   997,  1002,  1008,  1009,  1013,  1013,  1034,
-    1039,  1043,  1034,  1062,  1063,  1067,  1068,  1072,  1073,  1083,
-    1084,  1088,  1088,  1093,  1094,  1095,  1099,  1100,  1104,  1105,
-    1109,  1110,  1114,  1114,  1116,  1116,  1121,  1122,  1123,  1124,
-    1128,  1128,  1131,  1130,  1133,  1134,  1135,  1139,  1140,  1141,
-    1142,  1143,  1144,  1148,  1153,  1154,  1154,  1162,  1163,  1167,
-    1168,  1173,  1175,  1176,  1177,  1178,  1179,  1180,  1181,  1182,
-    1183,  1184,  1185,  1186,  1187,  1188,  1189,  1190,  1191,  1192,
-    1193,  1194,  1195,  1196,  1197,  1198,  1202,  1203,  1207,  1208,
-    1209,  1210,  1211,  1215,  1216,  1217,  1221,  1221,  1226,  1226,
-    1238,  1242,  1243,  1247,  1251,  1264,  1265,  1269,  1270,  1274,
-    1275,  1279,  1280,  1281,  1282,  1286,  1287,  1288,  1292,  1293,
-    1294,  1295,  1299,  1300,  1304,  1305,  1309,  1310,  1311,  1315,
-    1319,  1320,  1321,  1322,  1323,  1327,  1328,  1329,  1330,  1334,
-    1339,  1340,  1341,  1342,  1347,  1348,  1349,  1350,  1351,  1352,
-    1353,  1354,  1355,  1359,  1359,  1379,  1380,  1381,  1383,  1386,
-    1390,  1391,  1391,  1394,  1394,  1408,  1409,  1410,  1411,  1412,
-    1416,  1420,  1422,  1423,  1425,  1427,  1430,  1453,  1456,  1456,
-    1474,  1474,  1499,  1505,  1506,  1516,  1517,  1518,  1519,  1520,
-    1524,  1526,  1528,  1530,  1532,  1534,  1536,  1538,  1540,  1542,
-    1544,  1546,  1545,  1550,  1549,  1556,  1558,  1563,  1571,  1572,
-    1576,  1577,  1578,  1582,  1583,  1584,  1585,  1589,  1590,  1591,
-    1595,  1596,  1597,  1601,  1602,  1606,  1607,  1608,  1612,  1613,
-    1617,  1621,  1625,  1629,  1633,  1634,  1638,  1639,  1643,  1644,
-    1650,  1651,  1658,  1659,  1660,  1661,  1662,  1663,  1664,  1665,
-    1666,  1672,  1672,  1684,  1684,  1699,  1699,  1711,  1711,  1727,
-    1727,  1738,  1743,  1745,  1750,  1755,  1760,  1761,  1768,  1769,
-    1773,  1774,  1778,  1779,  1783,  1784,  1788,  1789,  1795,  1796,
-    1796,  1802,  1803,  1804,  1810,  1811,  1812,  1813,  1814,  1815,
-    1816,  1822,  1830,  1842,  1853,  1863,  1873,  1877,  1884,  1885,
-    1886,  1890,  1894,  1901,  1903,  1905,  1911,  1912,  1916,  1917,
-    1918,  1922,  1926,  1933,  1935,  1937,  1939,  1941,  1943,  1949,
-    1963,  1949,  1974,  1981,  1974,  1992,  2003,  2009,  2018,  2024,
-    2033,  2034,  2034,  2039,  2039,  2044,  2049,  2050,  2054,  2061,
-    2062,  2066,  2067,  2071,  2072,  2076,  2080,  2087,  2088,  2092,
-    2093,  2094,  2098,  2099,  2099,  2106,  2107,  2109,  2114,  2115,
-    2116,  2120,  2121,  2121,  2129,  2128,  2131,  2138,  2146,  2145,
-    2155,  2159,  2161,  2160,  2175,  2189,  2189,  2194,  2195,  2199,
-    2200,  2201,  2202,  2203,  2202,  2211,  2212,  2212,  2218,  2218,
-    2223,  2227,  2230,  2230,  2238,  2242,  2244,  2246,  2238,  2249,
-    2253,  2254,  2258,  2259,  2260,  2261,  2265,  2266,  2267,  2271,
-    2272,  2273,  2277,  2278,  2282,  2283,  2284,  2285,  2288,  2293,
-    2294,  2298,  2299,  2303,  2304,  2308,  2309,  2310,  2314,  2318,
-    2325,  2326,  2327,  2328,  2332,  2333,  2337,  2338,  2342,  2343,
-    2347,  2353,  2357,  2358,  2362,  2363,  2367,  2373,  2374,  2378,
-    2379,  2383,  2384,  2385,  2389,  2390,  2391,  2396,  2397,  2402,
-    2403,  2407,  2408,  2412,  2413
+       0,   555,   555,   557,   560,   563,   566,   569,   575,   576,
+     577,   578,   583,   587,   588,   592,   592,   602,   603,   607,
+     608,   609,   610,   611,   615,   616,   620,   624,   625,   629,
+     634,   635,   638,   640,   640,   649,   650,   656,   656,   672,
+     674,   672,   680,   683,   680,   690,   695,   700,   705,   713,
+     714,   715,   719,   720,   721,   725,   730,   737,   738,   745,
+     746,   750,   751,   752,   757,   758,   759,   760,   761,   762,
+     763,   764,   769,   769,   774,   775,   781,   781,   797,   798,
+     799,   800,   804,   804,   809,   811,   812,   818,   818,   836,
+     836,   852,   853,   857,   857,   868,   869,   877,   882,   886,
+     892,   893,   894,   895,   899,   900,   901,   902,   906,   907,
+     907,   912,   913,   917,   919,   924,   924,   930,   933,   937,
+     937,   941,   941,   948,   952,   953,   957,   963,   957,   975,
+     976,   980,   981,   985,   986,   990,   991,   995,  1002,  1003,
+    1007,  1008,  1009,  1010,  1011,  1012,  1017,  1018,  1019,  1023,
+    1024,  1024,  1033,  1034,  1039,  1040,  1041,  1042,  1043,  1047,
+    1048,  1048,  1057,  1058,  1058,  1067,  1068,  1073,  1074,  1075,
+    1076,  1077,  1078,  1082,  1083,  1084,  1088,  1089,  1093,  1097,
+    1098,  1102,  1106,  1109,  1109,  1147,  1148,  1149,  1150,  1167,
+    1168,  1169,  1170,  1171,  1172,  1176,  1176,  1177,  1181,  1182,
+    1183,  1181,  1190,  1191,  1189,  1198,  1198,  1199,  1199,  1210,
+    1211,  1212,  1213,  1218,  1224,  1225,  1229,  1229,  1250,  1255,
+    1259,  1250,  1279,  1280,  1284,  1285,  1289,  1290,  1300,  1301,
+    1305,  1305,  1325,  1326,  1327,  1328,  1332,  1333,  1334,  1338,
+    1339,  1340,  1344,  1345,  1349,  1350,  1354,  1355,  1354,  1362,
+    1362,  1364,  1364,  1366,  1370,  1371,  1377,  1377,  1380,  1379,
+    1382,  1383,  1384,  1388,  1389,  1390,  1391,  1392,  1393,  1397,
+    1402,  1403,  1403,  1411,  1412,  1416,  1417,  1422,  1424,  1425,
+    1426,  1427,  1428,  1429,  1430,  1431,  1432,  1433,  1434,  1435,
+    1436,  1437,  1438,  1439,  1440,  1441,  1442,  1443,  1444,  1445,
+    1446,  1447,  1451,  1452,  1456,  1457,  1458,  1459,  1460,  1464,
+    1465,  1466,  1470,  1470,  1475,  1475,  1487,  1491,  1492,  1496,
+    1500,  1513,  1514,  1518,  1519,  1523,  1524,  1528,  1529,  1530,
+    1531,  1535,  1536,  1537,  1541,  1542,  1543,  1544,  1548,  1549,
+    1553,  1554,  1558,  1559,  1560,  1564,  1568,  1569,  1570,  1571,
+    1572,  1576,  1593,  1598,  1606,  1611,  1612,  1617,  1618,  1619,
+    1620,  1621,  1622,  1623,  1624,  1625,  1629,  1629,  1651,  1652,
+    1654,  1657,  1661,  1662,  1662,  1665,  1665,  1679,  1680,  1681,
+    1682,  1683,  1687,  1691,  1693,  1694,  1696,  1698,  1701,  1724,
+    1727,  1727,  1745,  1745,  1770,  1776,  1777,  1777,  1809,  1810,
+    1811,  1812,  1813,  1814,  1818,  1835,  1837,  1839,  1841,  1846,
+    1846,  1876,  1876,  1898,  1899,  1903,  1904,  1905,  1909,  1910,
+    1911,  1912,  1916,  1917,  1921,  1922,  1923,  1927,  1928,  1929,
+    1930,  1934,  1935,  1935,  1941,  1942,  1943,  1947,  1948,  1949,
+    1953,  1954,  1958,  1959,  1960,  1964,  1965,  1969,  1973,  1977,
+    1981,  1985,  1986,  1990,  1991,  1995,  1996,  2002,  2003,  2010,
+    2011,  2012,  2013,  2014,  2015,  2016,  2017,  2018,  2019,  2023,
+    2030,  2030,  2042,  2042,  2057,  2057,  2069,  2069,  2085,  2085,
+    2096,  2102,  2104,  2109,  2114,  2119,  2120,  2127,  2131,  2135,
+    2136,  2137,  2138,  2142,  2143,  2147,  2148,  2152,  2153,  2160,
+    2161,  2165,  2166,  2174,  2175,  2176,  2183,  2183,  2205,  2205,
+    2217,  2218,  2222,  2228,  2229,  2230,  2236,  2237,  2237,  2243,
+    2244,  2245,  2251,  2252,  2253,  2254,  2255,  2261,  2270,  2282,
+    2292,  2295,  2301,  2302,  2303,  2307,  2311,  2318,  2320,  2322,
+    2324,  2326,  2328,  2334,  2335,  2339,  2353,  2339,  2364,  2365,
+    2369,  2376,  2369,  2387,  2398,  2404,  2413,  2419,  2428,  2429,
+    2429,  2434,  2437,  2437,  2443,  2448,  2449,  2453,  2460,  2461,
+    2465,  2466,  2470,  2471,  2475,  2479,  2486,  2487,  2491,  2492,
+    2493,  2497,  2498,  2498,  2505,  2506,  2508,  2510,  2512,  2517,
+    2526,  2532,  2541,  2542,  2543,  2547,  2548,  2548,  2556,  2555,
+    2558,  2565,  2573,  2572,  2582,  2586,  2588,  2587,  2602,  2616,
+    2616,  2621,  2622,  2626,  2627,  2628,  2629,  2630,  2629,  2638,
+    2639,  2639,  2645,  2645,  2650,  2654,  2657,  2657,  2665,  2669,
+    2671,  2673,  2665,  2676,  2680,  2681,  2685,  2686,  2687,  2688,
+    2692,  2693,  2694,  2698,  2699,  2700,  2704,  2705,  2709,  2710,
+    2711,  2712,  2715,  2720,  2721,  2725,  2726,  2730,  2731,  2735,
+    2736,  2740,  2741,  2742,  2746,  2750,  2757,  2758,  2759,  2760,
+    2764,  2765,  2769,  2770,  2774,  2775,  2779,  2785,  2789,  2790,
+    2794,  2795,  2799,  2805,  2806,  2810,  2811,  2815,  2816,  2817,
+    2821,  2822,  2823,  2828,  2829,  2834,  2835,  2839,  2840,  2844,
+    2845
 };
 #endif
 
@@ -1174,117 +1214,129 @@ static const char *const yytname[] =
   "_BACKQUOTE", "_BANG", "_BAR_BAR", "_CARET_CARET", "_COMMA", "_DOT",
   "_EQ", "_GE", "_GT", "_LBRA", "_LE", "_LPAR", "_LSQBRA", "_LT", "_MINUS",
   "_NOT_EQ", "_PLUS", "_PLUS_GT", "_RBRA", "_RPAR", "_RSQBRA", "_SEMI",
-  "_SLASH", "_STAR", "_STAR_GT", "a_L", "ALTER_L", "AS_L", "ASC_L",
-  "ASK_L", "AVG_L", "BASE_L", "BIJECTION_L", "BINDINGS_L", "BOUND_L",
-  "BY_L", "CLASS_L", "CLEAR_L", "CREATE_L", "CONSTRUCT_L", "COUNT_LPAR",
-  "COUNT_DISTINCT_L", "DATA_L", "DATATYPE_L", "DEFAULT_L", "DEFINE_L",
-  "DELETE_L", "DEREF_L", "DESC_L", "DESCRIBE_L", "DISTINCT_L", "DROP_L",
-  "EXCLUSIVE_L", "EXISTS_L", "false_L", "FILTER_L", "FROM_L", "FUNCTION_L",
-  "GRAPH_L", "GROUP_L", "HAVING_L", "IDENTIFIED_L", "IFP_L", "IN_L",
-  "INDEX_L", "INFERENCE_L", "INSERT_L", "INTO_L", "IRI_L", "isBLANK_L",
-  "isIRI_L", "isLITERAL_L", "isREF_L", "isURI_L", "LANG_L",
-  "LANGMATCHES_L", "LIKE_L", "LIMIT_L", "LITERAL_L", "LOAD_L", "MAKE_L",
-  "MAP_L", "MAX_L", "MIN_L", "MINUS_L", "MODIFY_L", "NAMED_L", "NIL_L",
-  "NOT_L", "NOT_FROM_L", "NULL_L", "OBJECT_L", "OF_L", "OFFBAND_L",
-  "OFFSET_L", "OPTIONAL_L", "OPTION_L", "ORDER_L", "PREDICATE_L",
-  "PREFIX_L", "QUAD_L", "REGEX_L", "REDUCED_L", "RETURNS_L", "SAME_AS_L",
-  "SAME_AS_O_L", "SAME_AS_P_L", "SAME_AS_S_L", "SAME_AS_S_O_L",
-  "SAMETERM_L", "SCORE_L", "SCORE_LIMIT_L", "SELECT_L", "SERVICE_L",
-  "SILENT_L", "SOFT_L", "STORAGE_L", "STR_L", "SUBCLASS_L", "SUBJECT_L",
-  "SUM_L", "TABLE_OPTION_L", "T_CYCLES_ONLY_L", "T_DIRECTION_L",
-  "T_DISTINCT_L", "T_END_FLAG_L", "T_EXISTS_L", "T_FINAL_AS_L", "T_IN_L",
-  "T_MAX_L", "T_MIN_L", "T_OUT_L", "T_NO_CYCLES_L", "T_NO_ORDER_L",
-  "T_SHORTEST_ONLY_L", "T_STEP_L", "TRANSITIVE_L", "true_L", "UNBOUND_L",
-  "UNION_L", "USING_L", "WHERE_L", "WITH_L", "__SPAR_PUNCT_END",
-  "START_OF_SPARQL_TEXT", "END_OF_SPARQL_TEXT", "SPARUL_RUN_SUBTYPE",
-  "SPARUL_INSERT_DATA", "SPARUL_DELETE_DATA", "__SPAR_NONPUNCT_START",
-  "TEXT_BL", "XML_BL", "SPARQL_INTEGER", "SPARQL_DECIMAL", "SPARQL_DOUBLE",
-  "SPARQL_STRING", "SPARQL_CONDITION_AFTER_WHERE_LPAR", "LANGTAG", "QNAME",
-  "QNAME_NS", "BLANK_NODE_LABEL", "Q_IRI_REF", "QUEST_VARNAME",
-  "DOLLAR_VARNAME", "QUEST_COLON_PARAMNAME", "DOLLAR_COLON_PARAMNAME",
-  "QUEST_COLON_PARAMNUM", "DOLLAR_COLON_PARAMNUM", "SPARQL_PLAIN_ID",
-  "SPARQL_SQL_ALIASCOLNAME", "SPARQL_SQL_QTABLENAME",
-  "SPARQL_SQL_QTABLECOLNAME", "__SPAR_NONPUNCT_END", "_COLON", "UMINUS",
-  "UPLUS", "$accept", "sparql", "spar_query_body", "spar_prolog",
-  "spar_defines_opt", "spar_define", "$@1", "spar_define_val_commalist",
-  "spar_define_val", "spar_base_decl_opt", "spar_prefix_decls_opt",
-  "spar_prefix_decl", "spar_select_query", "$@2", "spar_select_query_mode",
-  "spar_select_rset", "@3", "spar_select_rset_1", "spar_construct_query",
-  "$@4", "spar_describe_query", "$@5", "spar_describe_rset",
-  "spar_ask_query", "$@6", "spar_dataset_clauses_opt",
-  "spar_dataset_clause", "spar_dataset_clause_subtype",
-  "spar_sponge_optionlist_opt", "$@7",
-  "spar_sponge_option_commalist_opt_rpar", "spar_sponge_option_commalist",
-  "spar_precode_expn", "$@8", "spar_wherebindings_clause_opt",
-  "spar_where_clause", "$@9", "$@10", "spar_wherebindings_clause",
-  "spar_bindings_clause_opt", "spar_bindings_clause", "$@11", "$@12",
-  "spar_bindings_vars", "spar_bindings_var", "spar_bindings_opt",
-  "spar_bindings", "spar_binding", "spar_bindvals", "spar_bindval",
-  "spar_solution_modifier", "spar_group_clause_opt", "$@13",
-  "spar_group_expns", "spar_group_expn", "spar_having_clause_opt", "$@14",
-  "spar_order_clause_opt", "$@15", "spar_order_conditions",
+  "_SLASH", "_STAR", "_STAR_GT", "a_L", "ADD_L", "ALL_L", "ALTER_L",
+  "AS_L", "ASC_L", "ASK_L", "ATTACH_L", "AVG_L", "BASE_L", "BIJECTION_L",
+  "BINDINGS_L", "BOUND_L", "BY_L", "CLASS_L", "CLEAR_L", "CREATE_L",
+  "CONSTRUCT_L", "COPY_L", "COUNT_L", "COUNT_LPAR", "COUNT_DISTINCT_L",
+  "DATA_L", "DATATYPE_L", "DEFAULT_L", "DEFINE_L", "DEFMACRO_L",
+  "DELETE_L", "DEREF_L", "DESC_L", "DESCRIBE_L", "DETACH_L", "DISTINCT_L",
+  "DROP_L", "EXCLUSIVE_L", "EXISTS_L", "false_L", "FILTER_L", "FROM_L",
+  "FUNCTION_L", "GRAPH_L", "GROUP_L", "HAVING_L", "IDENTIFIED_L", "IFP_L",
+  "IN_L", "INDEX_L", "INFERENCE_L", "INSERT_L", "INTO_L", "IRI_L",
+  "LANG_L", "LIBRARY_L", "LIKE_L", "LIMIT_L", "LITERAL_L", "LOCAL_L",
+  "LOAD_L", "MACRO_L", "MAKE_L", "MAP_L", "MAX_L", "MIN_L", "MINUS_L",
+  "MODIFY_L", "MOVE_L", "NAMED_L", "NIL_L", "NOT_L", "NULL_L", "OBJECT_L",
+  "OF_L", "OFFBAND_L", "OFFSET_L", "OPTIONAL_L", "OPTION_L", "ORDER_L",
+  "PREDICATE_L", "PREFIX_L", "QUAD_L", "REDUCED_L", "RETURNS_L",
+  "SAME_AS_L", "SAME_AS_O_L", "SAME_AS_P_L", "SAME_AS_S_L",
+  "SAME_AS_S_O_L", "SCORE_L", "SCORE_LIMIT_L", "SELECT_L", "SERVICE_L",
+  "SILENT_L", "SOFT_L", "SQLQUERY_L", "STORAGE_L", "SUBCLASS_L",
+  "SUBJECT_L", "SUM_L", "TABLE_OPTION_L", "TEXT_L", "T_CYCLES_ONLY_L",
+  "T_DIRECTION_L", "T_DISTINCT_L", "T_END_FLAG_L", "T_EXISTS_L",
+  "T_FINAL_AS_L", "T_IN_L", "T_MAX_L", "T_MIN_L", "T_OUT_L",
+  "T_NO_CYCLES_L", "T_NO_ORDER_L", "T_SHORTEST_ONLY_L", "T_STEP_L", "TO_L",
+  "TRANSITIVE_L", "true_L", "UNBOUND_L", "UNION_L", "USING_L", "WHERE_L",
+  "WITH_L", "XML_L", "__SPAR_PUNCT_END", "START_OF_SPARQL_TEXT",
+  "END_OF_SPARQL_TEXT", "SPARUL_RUN_SUBTYPE", "SPARUL_INSERT_DATA",
+  "SPARUL_DELETE_DATA", "__SPAR_NONPUNCT_START", "SPARQL_BIF",
+  "SPARQL_INTEGER", "SPARQL_DECIMAL", "SPARQL_DOUBLE", "SPARQL_STRING",
+  "SPARQL_SQLTEXT", "LANGTAG", "QNAME", "QNAME_NS", "BLANK_NODE_LABEL",
+  "Q_IRI_REF", "QD_VARNAME", "QD_COLON_PARAMNAME", "QD_COLON_PARAMNUM",
+  "SPARQL_PLAIN_ID", "SPARQL_SQL_ALIASCOLNAME", "SPARQL_SQL_QTABLENAME",
+  "SPARQL_SQL_QTABLECOLNAME", "__SPAR_NONPUNCT_END", "PRECODE_EXPN_PREC",
+  "_COLON", "UMINUS", "UPLUS", "$accept", "sparql", "spar_query_body",
+  "spar_prolog", "spar_defines_opt", "spar_define", "$@1",
+  "spar_define_val_commalist", "spar_define_val", "spar_base_decl_opt",
+  "spar_prefix_decls_opt", "spar_prefix_decl", "spar_create_macro_lib_opt",
+  "$@2", "spar_defmacros_opt", "spar_defmacro", "$@3",
+  "spar_dm_args_and_body", "$@4", "$@5", "$@6", "$@7",
+  "spar_dm_match_template", "spar_dm_local_args_opt", "spar_dm_args_opt",
+  "spar_dm_arg_commalist", "spar_dm_args", "spar_dm_patitem_gs",
+  "spar_dm_patitem_p", "spar_dm_patitem_o", "spar_dm_gp_or_expn", "$@8",
+  "spar_select_query", "$@9", "spar_select_query_mode", "spar_select_rset",
+  "@10", "spar_select_rset_1", "spar_construct_query", "$@11",
+  "spar_describe_query", "$@12", "spar_describe_rset", "spar_ask_query",
+  "$@13", "spar_dataset_clauses_opt", "spar_dataset_clause",
+  "spar_dataset_clause_subtype", "spar_dataset_clause_subtype_from",
+  "spar_dataset_clause_subtype_using", "spar_sponge_optionlist_opt",
+  "$@14", "spar_sponge_option_commalist_opt_rpar",
+  "spar_sponge_option_commalist", "spar_precode_expn", "$@15",
+  "spar_wherebindings_clause_opt", "spar_where_clause", "$@16", "$@17",
+  "spar_wherebindings_clause", "spar_bindings_clause_opt",
+  "spar_bindings_clause", "$@18", "$@19", "spar_bindings_vars",
+  "spar_bindings_var", "spar_bindings_opt", "spar_bindings",
+  "spar_binding", "spar_bindvals", "spar_bindval",
+  "spar_solution_modifier", "spar_group_clause_opt", "$@20",
+  "spar_group_expns", "spar_group_expn", "spar_having_clause_opt", "$@21",
+  "spar_order_clause_opt", "$@22", "spar_order_conditions",
   "spar_order_condition", "spar_asc_or_desc_opt", "spar_limit_clause_opt",
   "spar_limit_clause", "spar_offset_clause_opt", "spar_offset_clause",
-  "spar_group_gp", "$@16", "spar_gp", "spar_gp_not_triples",
-  "spar_optional_gp", "$@17", "spar_quad_map_gp", "$@18", "$@19", "$@20",
-  "spar_graph_gp", "$@21", "$@22", "spar_group_or_union_gp", "$@23",
-  "$@24", "spar_constraint", "spar_exists_or_not_exists",
-  "spar_constraint_exists_int", "$@25", "spar_service_req", "@26", "@27",
-  "$@28", "spar_service_options_list_opt", "spar_service_options",
-  "spar_service_option", "spar_ctor_template", "$@29",
-  "spar_ctor_triples_opt", "spar_ctor_triples", "spar_triples_opt",
-  "spar_triples", "spar_triples1", "$@30", "$@31", "spar_props_opt",
-  "spar_props", "$@32", "$@33", "spar_objects", "spar_ograph_node",
-  "spar_triple_optionlist_opt", "$@34", "spar_triple_option_commalist",
-  "spar_triple_option", "spar_triple_option_var_commalist",
-  "spar_same_as_option", "spar_verb", "spar_triples_node", "$@35", "$@36",
-  "spar_triples_opt_semi_rsqbra", "spar_cons_collection",
-  "spar_graph_node", "spar_var_or_term",
+  "spar_group_gp", "@23", "spar_gp", "spar_gp_not_triples",
+  "spar_optional_gp", "$@24", "spar_quad_map_gp", "$@25", "$@26", "$@27",
+  "spar_graph_gp", "$@28", "$@29", "spar_group_or_union_gp", "$@30",
+  "$@31", "spar_constraint", "spar_exists_or_not_exists",
+  "spar_constraint_exists_int", "$@32", "spar_service_req", "@33", "@34",
+  "$@35", "spar_service_options_list_opt", "spar_service_options",
+  "spar_service_option", "spar_ctor_template", "$@36",
+  "spar_ctor_triples_or_quads_opt", "spar_ctor_triples_or_quads_triples",
+  "spar_ctor_triples_or_quads_quads", "spar_triples_opt", "spar_triples",
+  "spar_quads1", "$@37", "$@38", "spar_triples1", "$@39", "$@40",
+  "spar_props_opt", "spar_props", "$@41", "$@42", "spar_objects",
+  "spar_ograph_node", "spar_triple_optionlist_opt", "$@43",
+  "spar_triple_option_commalist", "spar_triple_option",
+  "spar_triple_option_var_commalist", "spar_same_as_option", "spar_verb",
+  "spar_triples_node", "$@44", "$@45", "spar_triples_opt_semi_rsqbra",
+  "spar_cons_collection", "spar_graph_node", "spar_var_or_term",
   "spar_var_or_iriref_or_pexpn_or_backquoteds",
   "spar_var_or_iriref_or_pexpn_or_backquoted",
   "spar_var_or_iriref_or_backquoted",
   "spar_var_or_blank_node_or_iriref_or_backquoted",
   "spar_retcol_commalist", "spar_retcols", "spar_ret_agg_call",
   "spar_agg_name", "spar_agg_name_int", "spar_var", "spar_global_var",
-  "spar_global_var_int", "spar_graph_term", "spar_backquoted", "$@37",
-  "spar_expn", "$@38", "$@39", "$@40", "$@41", "spar_built_in_call",
-  "$@42", "$@43", "spar_built_in_regex", "spar_function_call",
+  "spar_global_var_int", "spar_graph_term", "spar_backquoted", "@46",
+  "spar_expn", "$@47", "$@48", "$@49", "$@50", "@51", "spar_built_in_call",
+  "spar_function_call", "@52", "spar_macro_call", "@53",
   "spar_arg_list_opt", "spar_arg_list", "spar_expns",
-  "spar_numeric_literal", "spar_rdf_literal", "spar_boolean_literal",
-  "spar_iriref_or_star_or_default", "spar_arrow", "spar_arrow_iriref",
-  "spar_iriref", "spar_qname", "spar_blank_node", "spar_sparul_actions",
-  "spar_sparul_action", "spar_sparul_insert", "$@44",
-  "spar_sparul_insertdata", "$@45", "spar_sparul_delete", "$@46",
-  "spar_sparul_deletedata", "$@47", "spar_sparul_modify", "$@48",
-  "spar_sparul_clear", "spar_sparul_load", "spar_sparul_create",
-  "spar_sparul_drop", "spar_action_solution", "spar_in_graph_precode_opt",
-  "spar_from_graph_precode_opt", "spar_graph_precode_opt",
-  "spar_in_or_into", "spar_silent_opt", "spar_qm_stmts", "$@49",
-  "spar_qm_stmt", "spar_qm_simple_stmt", "spar_qm_create_iri_class",
-  "spar_qm_create_literal_class", "spar_qm_drop_iri_class",
-  "spar_qm_drop_literal_class", "spar_qm_create_iri_subclass",
-  "spar_qm_iri_class_optionlist_opt", "spar_qm_iri_class_option_commalist",
-  "spar_qm_iri_class_option", "spar_qm_sprintff_list",
-  "spar_qm_literal_class_optionlist_opt",
-  "spar_qm_literal_class_option_commalist", "spar_qm_literal_class_option",
-  "spar_qm_create_quad_storage", "$@50", "$@51",
-  "spar_qm_alter_quad_storage", "$@52", "$@53",
+  "spar_macro_arg_list_opt", "spar_macro_arg_list", "spar_expn_or_ggps",
+  "spar_expn_or_ggp", "$@54", "spar_numeric_literal", "spar_rdf_literal",
+  "spar_boolean_literal", "spar_iriref_or_star_or_default", "spar_arrow",
+  "spar_arrow_iriref", "spar_iriref", "spar_qname", "spar_blank_node",
+  "spar_sparul_action_or_drop_macro_libs",
+  "spar_sparul_action_or_drop_macro_lib", "spar_drop_macro_lib",
+  "spar_sparul_insert", "$@55", "spar_sparul_insertdata", "$@56",
+  "spar_sparul_delete", "$@57", "spar_sparul_deletedata", "$@58",
+  "spar_sparul_modify", "$@59", "spar_sparul_clear", "spar_sparul_load",
+  "spar_sparul_create", "spar_sparul_drop", "spar_action_solution",
+  "spar_in_graph_precode", "spar_from_graph_precode",
+  "spar_all_or_named_or_default_or_graph_precode",
+  "spar_default_or_graph_precode", "spar_graph_precode_opt",
+  "spar_with_graph_precode_opt", "spar_in_or_into", "spar_silent_opt",
+  "spar_sparul11_action", "spar_sparul11_deleteinsert", "@60",
+  "spar_sparul11_insert", "@61", "spar_sparul11_insert_opt",
+  "spar_sparul11_copymoveadd", "spar_sparul11_copymoveadd_op",
+  "spar_qm_stmts", "$@62", "spar_qm_stmt", "spar_qm_simple_stmt",
+  "spar_qm_create_iol_class", "spar_qm_drop_iol_class",
+  "spar_qm_create_iri_subclass", "spar_qm_iol_class_optionlist_opt",
+  "spar_qm_iol_class_option_commalist", "spar_qm_iol_class_option",
+  "spar_qm_sprintff_list", "spar_qm_create_quad_storage", "$@63", "$@64",
+  "spar_iol", "spar_qm_alter_quad_storage", "$@65", "$@66",
   "spar_qm_drop_quad_storage", "spar_qm_drop_quad_map_mapping",
-  "spar_qm_drop_mapping", "spar_qm_from_where_list_opt", "$@54", "$@55",
+  "spar_qm_drop_mapping", "spar_qm_from_where_list_opt", "$@67", "$@68",
   "spar_qm_text_literal_list_opt", "spar_qm_text_literal_decl",
   "spar_xml_opt", "spar_of_sqlcol_opt", "spar_qm_text_literal_options_opt",
   "spar_qm_text_literal_option_commalist", "spar_qm_text_literal_option",
-  "spar_qm_map_top_group", "spar_qm_map_top_dotlist", "$@56",
-  "spar_qm_map_top_op", "spar_qm_map_group", "spar_qm_map_dotlist", "$@57",
-  "spar_qm_map_op", "$@58", "$@59", "spar_qm_map_iddef", "$@60",
-  "spar_qm_map_single", "spar_qm_triples1", "$@61", "spar_qm_named_fields",
-  "spar_qm_named_field", "$@62", "$@63", "spar_qm_props", "$@64",
-  "spar_qm_prop", "$@65", "spar_qm_obj_field_commalist", "$@66",
-  "spar_qm_obj_field", "$@67", "$@68", "$@69", "$@70", "spar_qm_as_id_opt",
+  "spar_qm_map_top_group", "spar_qm_map_top_dotlist", "$@69",
+  "spar_qm_map_top_op", "spar_qm_attach_macro_lib",
+  "spar_qm_detach_macro_lib", "spar_qm_map_group", "spar_qm_map_dotlist",
+  "$@70", "spar_qm_map_op", "$@71", "$@72", "spar_qm_map_iddef", "$@73",
+  "spar_qm_map_single", "spar_qm_triples1", "$@74", "spar_qm_named_fields",
+  "spar_qm_named_field", "$@75", "$@76", "spar_qm_props", "$@77",
+  "spar_qm_prop", "$@78", "spar_qm_obj_field_commalist", "$@79",
+  "spar_qm_obj_field", "$@80", "$@81", "$@82", "$@83", "spar_qm_as_id_opt",
   "spar_qm_obj_datatype_opt", "spar_qm_obj_language_opt", "spar_qm_verb",
   "spar_qm_field_or_blank", "spar_qm_field", "spar_qm_where_list_opt",
-  "spar_qm_where_list", "spar_qm_where", "spar_qm_options_opt",
-  "spar_qm_option_commalist", "spar_qm_option",
+  "spar_qm_where_list", "spar_qm_where", "spar_qm_sqlquery",
+  "spar_qm_options_opt", "spar_qm_option_commalist", "spar_qm_option",
   "spar_qm_sqlcol_commalist_opt", "spar_qm_sqlcol_commalist",
   "spar_qm_sqlfunc_header_commalist", "spar_qm_sqlfunc_header",
   "spar_qm_sqlfunc_arglist", "spar_qm_sqlfunc_arg_commalist_opt",
@@ -1319,144 +1371,160 @@ static const yytype_uint16 yytoknum[] =
      405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
      415,   416,   417,   418,   419,   420,   421,   422,   423,   424,
      425,   426,   427,   428,   429,   430,   431,   432,   433,   434,
-     435
+     435,   436,   437
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint16 yyr1[] =
 {
-       0,   181,   182,   182,   182,   182,   182,   183,   183,   183,
-     183,   184,   185,   185,   187,   186,   188,   188,   189,   189,
-     189,   189,   189,   190,   190,   190,   191,   191,   192,   192,
-     192,   194,   193,   195,   195,   195,   195,   197,   196,   198,
-     198,   198,   200,   199,   202,   201,   203,   203,   205,   204,
-     206,   206,   207,   208,   208,   208,   208,   208,   208,   209,
-     210,   209,   211,   211,   212,   212,   214,   213,   215,   215,
-     217,   216,   218,   216,   219,   220,   220,   222,   223,   221,
-     224,   224,   225,   225,   225,   226,   226,   227,   227,   228,
-     229,   229,   230,   230,   230,   230,   230,   230,   231,   231,
-     231,   232,   233,   232,   234,   234,   235,   235,   235,   235,
-     235,   236,   237,   236,   238,   239,   238,   240,   240,   241,
-     241,   241,   241,   241,   241,   242,   242,   242,   243,   243,
-     244,   245,   245,   246,   247,   248,   247,   249,   249,   249,
-     250,   250,   250,   250,   250,   250,   252,   251,   251,   254,
-     255,   256,   253,   258,   259,   257,   261,   260,   262,   260,
-     263,   263,   263,   263,   263,   264,   264,   266,   265,   268,
-     269,   270,   267,   271,   271,   272,   272,   273,   273,   273,
-     273,   275,   274,   276,   276,   276,   277,   277,   278,   278,
-     279,   279,   281,   280,   282,   280,   283,   283,   283,   283,
-     285,   284,   286,   284,   284,   284,   284,   287,   287,   287,
-     287,   287,   287,   288,   289,   290,   289,   291,   291,   292,
-     292,   292,   292,   292,   292,   292,   292,   292,   292,   292,
-     292,   292,   292,   292,   292,   292,   292,   292,   292,   292,
-     292,   292,   292,   292,   292,   292,   293,   293,   294,   294,
-     294,   294,   294,   295,   295,   295,   297,   296,   298,   296,
-     296,   299,   299,   300,   300,   301,   301,   302,   302,   303,
-     303,   304,   304,   304,   304,   305,   305,   305,   306,   306,
-     306,   306,   307,   307,   308,   308,   309,   309,   309,   310,
-     311,   311,   311,   311,   311,   312,   312,   312,   312,   313,
-     314,   314,   314,   314,   315,   315,   315,   315,   315,   315,
-     315,   315,   315,   317,   316,   318,   318,   318,   318,   318,
-     318,   319,   318,   320,   318,   318,   318,   318,   318,   318,
-     318,   318,   318,   318,   318,   318,   318,   318,   321,   318,
-     322,   318,   318,   318,   318,   318,   318,   318,   318,   318,
-     323,   323,   323,   323,   323,   323,   323,   323,   323,   323,
-     323,   324,   323,   325,   323,   326,   326,   327,   328,   328,
-     329,   329,   329,   330,   330,   330,   330,   331,   331,   331,
-     332,   332,   332,   333,   333,   334,   334,   334,   335,   335,
-     336,   336,   336,   336,   337,   337,   338,   338,   339,   339,
-     340,   340,   341,   341,   341,   341,   341,   341,   341,   341,
-     341,   343,   342,   345,   344,   347,   346,   349,   348,   351,
-     350,   352,   353,   353,   354,   355,   356,   356,   357,   357,
-     358,   358,   359,   359,   360,   360,   361,   361,   362,   363,
-     362,   364,   364,   364,   365,   365,   365,   365,   365,   365,
-     365,   366,   366,   367,   368,   369,   370,   370,   371,   371,
-     371,   372,   372,   373,   373,   373,   374,   374,   375,   375,
-     375,   376,   376,   377,   377,   377,   377,   377,   377,   379,
-     380,   378,   382,   383,   381,   384,   385,   385,   386,   386,
-     387,   388,   387,   389,   387,   387,   390,   390,   391,   392,
-     392,   393,   393,   394,   394,   395,   395,   396,   396,   397,
-     397,   397,   398,   399,   398,   400,   400,   400,   401,   401,
-     401,   402,   403,   402,   405,   404,   404,   404,   406,   404,
-     404,   407,   408,   407,   409,   411,   410,   412,   412,   413,
-     413,   413,   414,   415,   413,   416,   417,   416,   419,   418,
-     418,   420,   421,   420,   423,   424,   425,   426,   422,   422,
-     427,   427,   428,   428,   428,   428,   429,   429,   429,   430,
-     430,   430,   431,   431,   432,   432,   432,   432,   432,   433,
-     433,   434,   434,   435,   435,   436,   436,   436,   437,   437,
-     438,   438,   438,   438,   439,   439,   440,   440,   441,   441,
-     442,   443,   444,   444,   445,   445,   446,   447,   447,   448,
-     448,   449,   449,   449,   450,   450,   450,   451,   451,   452,
-     452,   453,   453,   454,   454
+       0,   183,   184,   184,   184,   184,   184,   184,   185,   185,
+     185,   185,   186,   187,   187,   189,   188,   190,   190,   191,
+     191,   191,   191,   191,   192,   192,   192,   193,   193,   194,
+     194,   194,   195,   196,   195,   197,   197,   199,   198,   201,
+     202,   200,   203,   204,   200,   200,   205,   205,   205,   206,
+     206,   206,   207,   207,   207,   208,   208,   209,   209,   210,
+     210,   211,   211,   211,   212,   212,   212,   212,   212,   212,
+     212,   212,   214,   213,   213,   213,   216,   215,   217,   217,
+     217,   217,   219,   218,   220,   220,   220,   222,   221,   224,
+     223,   225,   225,   227,   226,   228,   228,   229,   230,   230,
+     231,   231,   231,   231,   232,   232,   232,   232,   233,   234,
+     233,   235,   235,   236,   236,   238,   237,   239,   239,   241,
+     240,   242,   240,   243,   244,   244,   246,   247,   245,   248,
+     248,   249,   249,   250,   250,   251,   251,   252,   253,   253,
+     254,   254,   254,   254,   254,   254,   255,   255,   255,   256,
+     257,   256,   258,   258,   259,   259,   259,   259,   259,   260,
+     261,   260,   262,   263,   262,   264,   264,   265,   265,   265,
+     265,   265,   265,   266,   266,   266,   267,   267,   268,   269,
+     269,   270,   271,   272,   271,   273,   273,   273,   273,   274,
+     274,   274,   274,   274,   274,   276,   275,   275,   278,   279,
+     280,   277,   282,   283,   281,   285,   284,   286,   284,   287,
+     287,   287,   287,   287,   288,   288,   290,   289,   292,   293,
+     294,   291,   295,   295,   296,   296,   297,   297,   297,   297,
+     299,   298,   300,   300,   300,   300,   301,   301,   301,   302,
+     302,   302,   303,   303,   304,   304,   306,   307,   305,   309,
+     308,   310,   308,   308,   311,   311,   313,   312,   314,   312,
+     312,   312,   312,   315,   315,   315,   315,   315,   315,   316,
+     317,   318,   317,   319,   319,   320,   320,   320,   320,   320,
+     320,   320,   320,   320,   320,   320,   320,   320,   320,   320,
+     320,   320,   320,   320,   320,   320,   320,   320,   320,   320,
+     320,   320,   321,   321,   322,   322,   322,   322,   322,   323,
+     323,   323,   325,   324,   326,   324,   324,   327,   327,   328,
+     328,   329,   329,   330,   330,   331,   331,   332,   332,   332,
+     332,   333,   333,   333,   334,   334,   334,   334,   335,   335,
+     336,   336,   337,   337,   337,   338,   339,   339,   339,   339,
+     339,   340,   340,   340,   341,   342,   342,   343,   343,   343,
+     343,   343,   343,   343,   343,   343,   345,   344,   346,   346,
+     346,   346,   346,   347,   346,   348,   346,   346,   346,   346,
+     346,   346,   346,   346,   346,   346,   346,   346,   346,   346,
+     349,   346,   350,   346,   346,   346,   351,   346,   346,   346,
+     346,   346,   346,   346,   352,   352,   352,   352,   352,   354,
+     353,   356,   355,   357,   357,   358,   358,   358,   359,   359,
+     359,   359,   360,   360,   361,   361,   361,   362,   362,   362,
+     362,   363,   364,   363,   365,   365,   365,   366,   366,   366,
+     367,   367,   368,   368,   368,   369,   369,   370,   370,   370,
+     370,   371,   371,   372,   372,   373,   373,   374,   374,   375,
+     375,   375,   375,   375,   375,   375,   375,   375,   375,   376,
+     378,   377,   380,   379,   382,   381,   384,   383,   386,   385,
+     387,   388,   388,   389,   390,   391,   391,   392,   393,   394,
+     394,   394,   394,   395,   395,   396,   396,   397,   397,   398,
+     398,   399,   399,   400,   400,   400,   402,   401,   404,   403,
+     405,   405,   406,   407,   407,   407,   408,   409,   408,   410,
+     410,   410,   411,   411,   411,   411,   411,   412,   412,   413,
+     414,   414,   415,   415,   415,   416,   416,   417,   417,   417,
+     417,   417,   417,   418,   418,   420,   421,   419,   422,   422,
+     424,   425,   423,   426,   427,   427,   428,   428,   429,   430,
+     429,   429,   431,   429,   429,   432,   432,   433,   434,   434,
+     435,   435,   436,   436,   437,   437,   438,   438,   439,   439,
+     439,   440,   441,   440,   442,   442,   442,   442,   442,   443,
+     444,   444,   445,   445,   445,   446,   447,   446,   449,   448,
+     448,   448,   450,   448,   448,   451,   452,   451,   453,   455,
+     454,   456,   456,   457,   457,   457,   458,   459,   457,   460,
+     461,   460,   463,   462,   462,   464,   465,   464,   467,   468,
+     469,   470,   466,   466,   471,   471,   472,   472,   472,   472,
+     473,   473,   473,   474,   474,   474,   475,   475,   476,   476,
+     476,   476,   476,   477,   477,   478,   478,   479,   479,   480,
+     480,   481,   481,   481,   482,   482,   483,   483,   483,   483,
+     484,   484,   485,   485,   486,   486,   487,   488,   489,   489,
+     490,   490,   491,   492,   492,   493,   493,   494,   494,   494,
+     495,   495,   495,   496,   496,   497,   497,   498,   498,   499,
+     499
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 static const yytype_uint8 yyr2[] =
 {
-       0,     2,     4,     4,     2,     4,     1,     1,     1,     1,
-       1,     3,     0,     2,     0,     4,     1,     3,     1,     1,
-       1,     1,     1,     0,     2,     2,     0,     2,     3,     2,
-       2,     0,     6,     1,     2,     2,     2,     0,     2,     1,
-       1,     1,     0,     7,     0,     7,     1,     1,     0,     4,
-       0,     2,     3,     1,     2,     2,     3,     1,     2,     0,
-       0,     4,     1,     2,     2,     4,     0,     2,     0,     1,
-       0,     6,     0,     4,     2,     0,     1,     0,     0,     7,
-       1,     2,     1,     1,     1,     0,     1,     1,     2,     3,
-       1,     2,     1,     1,     1,     1,     1,     1,     3,     5,
-       5,     0,     0,     4,     1,     2,     3,     3,     1,     1,
-       1,     0,     0,     3,     0,     0,     4,     1,     2,     4,
-       4,     2,     1,     1,     1,     0,     1,     1,     0,     1,
-       2,     0,     1,     2,     3,     0,     8,     1,     3,     4,
-       1,     1,     1,     1,     1,     1,     0,     4,     2,     0,
-       0,     0,     8,     0,     0,     6,     0,     3,     0,     5,
-       4,     2,     2,     3,     2,     1,     2,     0,     4,     0,
-       0,     0,     9,     0,     3,     1,     2,     2,     3,     2,
-       2,     0,     4,     0,     1,     2,     1,     3,     0,     1,
-       1,     3,     0,     3,     0,     3,     0,     1,     2,     3,
-       0,     3,     0,     5,     3,     3,     1,     1,     3,     3,
-       3,     3,     1,     2,     0,     0,     5,     1,     3,     1,
-       2,     2,     2,     2,     2,     2,     2,     2,     1,     2,
-       1,     2,     1,     2,     4,     2,     2,     1,     1,     4,
-       1,     6,     6,     1,     4,     1,     1,     3,     1,     1,
-       1,     1,     1,     1,     1,     1,     0,     4,     0,     4,
-       2,     1,     2,     1,     2,     1,     1,     1,     1,     1,
-       2,     1,     1,     1,     3,     1,     1,     1,     1,     1,
-       1,     1,     3,     3,     1,     2,     3,     3,     4,     1,
-       1,     2,     2,     2,     2,     1,     1,     1,     2,     1,
-       1,     1,     1,     1,     1,     1,     1,     2,     2,     1,
-       1,     1,     1,     0,     4,     3,     3,     3,     3,     3,
-       3,     0,     4,     0,     6,     3,     3,     3,     3,     3,
-       3,     3,     3,     2,     2,     2,     2,     3,     0,     7,
-       0,     9,     1,     1,     2,     1,     1,     1,     1,     1,
-       4,     4,     6,     4,     4,     6,     4,     4,     4,     4,
-       1,     0,     5,     0,     5,     6,     8,     2,     0,     1,
-       1,     2,     3,     1,     3,     3,     2,     1,     1,     1,
-       1,     2,     3,     1,     1,     1,     1,     1,     1,     1,
-       2,     2,     2,     2,     1,     1,     1,     1,     1,     2,
-       1,     2,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     0,     5,     0,     5,     0,     5,     0,     5,     0,
-       8,     2,     2,     5,     4,     4,     0,     4,     0,     3,
-       0,     3,     0,     2,     1,     1,     0,     1,     1,     0,
-       4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     7,     7,     7,     5,     5,     7,     5,     0,     3,
-       4,     1,     3,     1,     1,     2,     1,     3,     0,     3,
-       4,     1,     3,     2,     2,     2,     1,     1,     2,     0,
-       0,     9,     0,     0,     9,     5,     5,     6,     3,     4,
-       0,     0,     7,     0,     7,     2,     0,     2,     6,     0,
-       1,     0,     4,     0,     4,     1,     3,     1,     2,     1,
-       2,     3,     1,     0,     4,     1,     1,     1,     1,     2,
-       3,     1,     0,     4,     0,     5,     6,     7,     0,     5,
-       1,     1,     0,     5,     3,     0,     3,     1,     2,     2,
-       2,     2,     0,     0,     6,     1,     0,     4,     0,     3,
-       1,     2,     0,     5,     0,     0,     0,     0,     9,     1,
-       0,     2,     0,     2,     5,     2,     0,     2,     2,     1,
-       2,     1,     1,     2,     1,     1,     1,     4,     1,     0,
-       1,     1,     2,     3,     2,     0,     3,     4,     1,     3,
-       2,     1,     2,     2,     0,     1,     1,     3,     1,     3,
-       5,     3,     0,     1,     1,     3,     3,     1,     3,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     4,     0,
-       1,     1,     3,     1,     2
+       0,     2,     5,     4,     4,     2,     4,     1,     1,     1,
+       1,     1,     5,     0,     2,     0,     4,     1,     3,     1,
+       1,     1,     1,     1,     0,     2,     2,     0,     2,     3,
+       2,     2,     0,     0,     8,     0,     2,     0,     4,     0,
+       0,     7,     0,     0,     7,     1,     5,     7,     7,     0,
+       4,     4,     0,     1,     1,     3,     3,     1,     2,     1,
+       1,     1,     1,     1,     1,     1,     2,     2,     1,     1,
+       1,     1,     0,     4,     1,     1,     0,     6,     1,     2,
+       2,     2,     0,     2,     1,     1,     1,     0,     7,     0,
+       7,     1,     1,     0,     4,     0,     2,     3,     1,     1,
+       1,     2,     2,     3,     1,     2,     2,     3,     0,     0,
+       4,     1,     2,     2,     4,     0,     2,     0,     1,     0,
+       6,     0,     4,     2,     0,     1,     0,     0,     7,     1,
+       2,     1,     1,     0,     1,     1,     2,     3,     1,     2,
+       1,     1,     1,     1,     1,     1,     3,     5,     5,     0,
+       0,     4,     1,     2,     3,     3,     1,     1,     1,     0,
+       0,     3,     0,     0,     4,     1,     2,     4,     4,     2,
+       1,     1,     1,     0,     1,     1,     0,     1,     2,     0,
+       1,     2,     3,     0,     8,     1,     3,     4,     3,     1,
+       1,     1,     1,     1,     1,     0,     4,     2,     0,     0,
+       0,     8,     0,     0,     6,     0,     3,     0,     5,     4,
+       2,     2,     3,     2,     1,     2,     0,     4,     0,     0,
+       0,     9,     0,     3,     1,     2,     2,     3,     2,     2,
+       0,     4,     0,     1,     1,     2,     1,     3,     2,     1,
+       3,     2,     0,     1,     1,     3,     0,     0,     7,     0,
+       3,     0,     3,     1,     0,     1,     0,     3,     0,     5,
+       3,     3,     1,     1,     3,     3,     3,     3,     1,     2,
+       0,     0,     5,     1,     3,     1,     2,     2,     2,     2,
+       2,     2,     2,     2,     1,     2,     1,     2,     1,     2,
+       4,     2,     2,     1,     1,     4,     1,     6,     6,     1,
+       4,     1,     1,     3,     1,     1,     1,     1,     1,     1,
+       1,     1,     0,     4,     0,     4,     2,     1,     2,     1,
+       2,     1,     1,     1,     1,     1,     2,     1,     1,     1,
+       3,     1,     1,     1,     1,     1,     1,     1,     3,     3,
+       1,     2,     3,     3,     4,     1,     1,     2,     2,     2,
+       2,     1,     1,     2,     1,     1,     1,     1,     1,     1,
+       2,     2,     1,     1,     1,     1,     0,     4,     3,     3,
+       3,     3,     3,     0,     4,     0,     6,     3,     3,     3,
+       3,     3,     3,     3,     3,     2,     2,     2,     2,     3,
+       0,     7,     0,     9,     1,     1,     0,     3,     1,     1,
+       1,     1,     1,     1,     2,     4,     4,     4,     4,     0,
+       3,     0,     4,     0,     1,     1,     2,     3,     1,     3,
+       3,     2,     0,     1,     1,     2,     3,     1,     3,     3,
+       2,     1,     0,     4,     1,     1,     1,     1,     2,     3,
+       1,     1,     1,     1,     1,     1,     1,     2,     2,     2,
+       2,     1,     1,     1,     1,     1,     2,     1,     2,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     5,
+       0,     5,     0,     5,     0,     5,     0,     5,     0,     8,
+       3,     3,     6,     4,     3,     0,     4,     3,     3,     1,
+       1,     1,     2,     1,     2,     0,     2,     0,     4,     1,
+       1,     0,     1,     1,     1,     1,     0,     5,     0,     4,
+       0,     2,     5,     1,     1,     1,     1,     0,     4,     1,
+       1,     1,     1,     1,     1,     1,     1,     7,     7,     5,
+       7,     5,     0,     3,     4,     1,     3,     2,     2,     2,
+       1,     1,     2,     1,     3,     0,     0,     9,     1,     1,
+       0,     0,     9,     5,     5,     6,     3,     4,     0,     0,
+       7,     5,     0,     8,     2,     0,     2,     6,     0,     1,
+       0,     4,     0,     4,     1,     3,     1,     2,     1,     2,
+       3,     1,     0,     4,     1,     1,     1,     1,     1,     4,
+       5,     4,     1,     2,     3,     1,     0,     4,     0,     5,
+       6,     7,     0,     5,     1,     1,     0,     5,     3,     0,
+       3,     1,     2,     2,     2,     2,     0,     0,     6,     1,
+       0,     4,     0,     3,     1,     2,     0,     5,     0,     0,
+       0,     0,     9,     1,     0,     2,     0,     2,     5,     2,
+       0,     2,     2,     1,     2,     1,     1,     2,     1,     1,
+       1,     4,     1,     0,     1,     1,     2,     3,     2,     2,
+       1,     0,     3,     4,     1,     3,     2,     1,     2,     2,
+       0,     1,     1,     3,     1,     3,     5,     3,     0,     1,
+       1,     3,     3,     1,     3,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     4,     0,     1,     1,     3,     1,
+       2
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -1464,1144 +1532,1127 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint16 yydefact[] =
 {
-       0,     6,    12,     0,     4,     0,    23,     1,     0,    48,
-     619,   436,    42,   430,    44,   436,   428,    66,     0,   619,
-      33,     0,     7,    31,     8,     9,    10,     0,   400,   402,
-     403,   404,   405,   406,   407,   408,   409,   410,     0,   438,
-     441,   444,   445,   446,   447,   448,   442,   443,   449,   450,
-       0,    14,    13,    26,     0,    50,   621,   421,    66,   620,
-       0,     0,     0,   437,     0,     0,   430,   619,   415,     0,
-       0,   428,   434,   435,   411,   619,   422,     0,     0,   396,
-     397,   394,   617,   395,     0,   419,    36,    35,    34,     2,
-      37,   436,   436,     3,   401,   439,   623,     5,    25,    24,
-       0,    11,     0,     0,     0,   433,     0,     0,     0,    66,
-     181,    50,   417,    66,     0,   313,     0,    46,   295,   296,
-     300,   301,   302,   303,    50,    47,   269,   271,   297,   299,
-     273,   272,     0,     0,     0,    66,   413,     0,    66,   619,
-       0,     0,     0,     0,     0,     0,     0,   290,     0,   384,
-     361,     0,     0,     0,   363,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   383,   377,   378,   379,   380,
-     398,   342,     0,   289,   349,    67,   343,   360,   346,   345,
-     347,   368,   348,     0,     0,     0,     0,    50,     0,     0,
-     624,     0,     0,     0,    27,     0,   482,    72,    53,     0,
-      57,     0,    51,     0,    75,    49,   622,     0,     0,   479,
-     424,   183,     0,     0,   431,   426,     0,     0,    68,   270,
-     388,   389,     0,   298,     0,     0,     0,     0,   425,     0,
-     426,   429,    66,   333,   338,   340,     0,   399,   336,   335,
-     291,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   293,   292,   334,     0,     0,     0,   294,     0,   381,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   323,   321,     0,   370,
-     344,   369,     0,     0,     0,     0,     0,    39,    38,    41,
-      40,   284,     0,   436,   440,    21,    20,    18,    19,    15,
-      16,    22,    30,    29,   490,   188,    54,    55,    58,    70,
-      59,    77,    74,    76,     0,     0,     0,   490,   258,   256,
-       0,     0,   311,     0,   184,   186,   194,   192,   267,   268,
-     312,   306,   305,   309,   304,   310,   101,   418,     0,   416,
-       0,   274,   101,    69,   393,   391,   392,   390,   454,   455,
-     486,     0,   485,   414,   412,   423,    50,    37,   337,     0,
+       0,     7,    13,     0,     5,    32,    24,     1,   515,     0,
+     501,   501,   513,   506,   501,   508,   501,     0,   695,   514,
+       0,     0,   457,   468,   459,   460,   461,   462,   463,   464,
+     465,   466,   467,     0,   503,   504,   505,   501,     0,   516,
+     519,   522,   523,   524,   520,   521,   525,   526,     0,    15,
+      14,    27,     0,   502,     0,   548,   549,     0,     0,     0,
+       0,     0,   695,   474,     0,     0,     0,   499,   500,   470,
+     695,     0,   115,     0,   453,   454,   451,   693,   452,     0,
+     697,   478,   115,   696,    93,    87,    89,    78,     0,     8,
+      76,     9,    10,    11,   501,     0,   501,     0,     3,   458,
+       4,   695,   517,   699,     6,    26,    25,     0,    35,     0,
+     489,   490,   491,   480,   115,     0,     0,   115,     0,   476,
+     115,     0,   230,   510,     0,     0,   484,     0,   472,     0,
+     115,    95,   481,     0,     0,     0,     0,     0,     0,   496,
+      95,     0,     0,    81,    80,    79,     2,    82,     0,   493,
+       0,   115,   700,     0,     0,     0,    28,   497,     0,   550,
+     492,    33,   545,   483,     0,     0,   488,   485,   232,     0,
+      95,   115,     0,     0,     0,     0,   485,   487,     0,   509,
+     695,     0,     0,     0,     0,     0,     0,     0,   346,     0,
+     441,     0,     0,     0,     0,     0,     0,     0,   440,     0,
+     434,   435,   436,   437,   455,   351,   355,   356,   394,     0,
+     345,   402,   352,   354,   116,   395,   403,   399,   398,   400,
+     396,   401,     0,     0,     0,   698,     0,     0,    95,   366,
+       0,    91,    95,    92,   325,   327,   329,   328,    95,     0,
+     695,   494,     0,   501,   518,    22,    21,    19,    20,    16,
+      17,    23,    31,    30,     0,   695,    36,    12,   558,     0,
+     558,     0,     0,   477,   475,   314,   312,     0,     0,   246,
+     364,     0,   234,   233,   239,   236,   251,   249,   323,   324,
+     365,   253,   359,   358,   362,   357,   363,   511,   507,   469,
+     554,     0,   553,   529,   473,   471,   121,   100,     0,   104,
+       0,    96,     0,    98,    99,   124,   149,   115,   385,   390,
+     392,     0,   456,   388,   387,   347,     0,     0,     0,     0,
+     411,   349,   348,   386,   350,     0,   415,   404,     0,   438,
+       0,     0,     0,   445,   446,     0,   353,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   382,   287,     0,   286,   318,   317,   319,   328,
-     326,   327,   325,   330,   320,   329,   332,   331,   315,   316,
-       0,     0,   371,   373,     0,   618,     0,   457,     0,   101,
-       0,   285,     0,     0,     0,    28,     0,     0,   137,   189,
-     190,    56,   188,     0,    52,     0,     0,   458,   598,   602,
-     458,   468,     0,   260,     0,     0,   308,   307,   182,   185,
-       0,     0,     0,    75,   111,   101,   314,    75,   487,     0,
-      50,   354,   353,     0,   358,   356,   359,     0,   357,   351,
-       0,     0,     0,   350,   288,     0,   322,   376,     0,   372,
-       0,     0,    32,   283,   282,    17,   483,     0,     0,   495,
-      73,   156,     0,     0,   167,     0,     0,     0,   188,   141,
-     140,   143,   142,   145,   144,   188,     0,    60,    82,    83,
-       0,    80,    84,     0,     0,     0,   452,   609,   615,   616,
-     614,     0,   603,   604,     0,   610,   451,     0,   453,   480,
-     266,     0,   263,   265,   255,   254,     0,   200,   253,   275,
-     277,   276,   187,   195,   197,   193,   102,    43,   112,   114,
-      75,    45,     0,     0,   362,   364,     0,     0,     0,     0,
-     375,   374,   456,   426,     0,     0,     0,     0,   584,   188,
-       0,   165,     0,   167,   161,   162,     0,   153,   278,   281,
-     280,   279,   164,    50,   148,   146,   149,   169,   188,   138,
-       0,   191,    75,     0,    78,    81,     0,   599,     0,   601,
-       0,     0,     0,     0,   259,   264,   261,     0,   257,     0,
-       0,     0,     0,     0,     0,    98,   427,   214,   101,   352,
-       0,   365,   355,   324,   420,     0,   509,     0,   436,     0,
-       0,     0,     0,   612,   613,   575,   576,   517,   516,   484,
-       0,   512,   515,   530,   585,   537,   535,   572,   578,   611,
-     574,     0,     0,   583,   135,   157,     0,     0,   166,   163,
-     367,     0,     0,   188,     0,   173,   139,   158,    71,    62,
-      66,    61,     0,    85,     0,   459,   463,   464,     0,     0,
-     461,   605,   606,   607,   469,   476,     0,   477,     0,     0,
-       0,   471,   481,   255,   204,   262,   202,   212,   201,   207,
-     214,   199,     0,     0,   103,   104,   110,   108,   109,   113,
-     115,    66,    66,   131,   128,     0,   339,     0,     0,   573,
-       0,     0,     0,   539,   542,   541,   540,   513,   510,     0,
-     538,     0,     0,   594,   493,   491,    37,   214,   160,   154,
-     214,   147,   386,   387,   150,   385,     0,   170,   188,    64,
-       0,    63,     0,     0,    86,    87,   600,   466,   465,     0,
-     460,     0,   473,   474,   475,   478,     0,   470,     0,     0,
-     213,     0,     0,   105,   125,   130,   133,    99,   132,   100,
-     129,   215,   214,   366,   524,     0,     0,     0,   488,     0,
-     562,   511,     0,     0,   528,   550,     0,   571,   536,   545,
-     548,   569,     0,   595,   596,   496,   496,    50,   134,   188,
-     168,     0,     0,     0,     0,     0,   175,    50,   159,    66,
-      97,     0,    90,    93,    94,    95,    92,    96,    79,    88,
-       0,   462,   608,   472,   203,   211,   210,   209,   208,   106,
-     107,   126,   127,   116,   117,     0,   124,   122,   123,     0,
-     341,     0,     0,     0,   489,     0,   543,   514,   586,   591,
-       0,     0,     0,     0,   588,     0,   570,   546,     0,   577,
-       0,   494,   492,     0,   155,   151,     0,   180,   179,   246,
-     177,   174,   176,     0,    65,    89,    91,   467,   118,     0,
-       0,   121,   219,     0,     0,   248,   249,   250,   251,   252,
-       0,     0,     0,   228,     0,   230,     0,   232,     0,     0,
-       0,     0,     0,   237,   238,   240,     0,   243,     0,   217,
-     245,   525,   531,   585,     0,   585,     0,     0,   563,   565,
-     566,   592,   590,   593,     0,   587,   518,   529,     0,   521,
-       0,   559,   549,   560,   554,   597,   499,   497,   101,   188,
-     178,     0,   171,     0,     0,   223,   221,   222,   220,   224,
-     225,   226,   227,   229,   231,   233,     0,   236,   235,     0,
-       0,     0,   216,     0,     0,     0,   526,   585,     0,     0,
-     544,   589,   522,   519,   547,   552,     0,   551,   562,   500,
-       0,     0,   152,   247,   188,   119,   120,     0,     0,     0,
-       0,   218,     0,   532,   534,   527,     0,   567,   568,   520,
-       0,     0,   561,   555,     0,   214,   172,   234,   239,     0,
-       0,   244,     0,   564,   523,   560,   566,   501,   136,     0,
-       0,   533,   553,   556,     0,   503,   242,   241,   579,     0,
-       0,   498,   557,   580,   581,     0,     0,   585,   582,   502,
-     507,     0,   505,   558,   508,     0,   504,   506
+     375,   373,   413,   694,     0,   531,     0,    94,     0,     0,
+       0,   117,   326,     0,    84,    83,    86,    85,   340,   512,
+       0,     0,    29,    37,   115,     0,    35,     0,     0,   532,
+     674,   678,   532,   316,     0,     0,   361,   360,     0,   231,
+     235,   241,   238,     0,     0,   555,   242,   101,   102,   106,
+     105,   119,   108,   126,   123,   125,     0,   124,   159,   482,
+      95,    82,   389,     0,     0,     0,     0,   422,   416,   418,
+       0,   439,   343,     0,   342,   450,   448,   449,   447,   370,
+     369,   371,   380,   378,   379,   377,   382,   372,   381,   384,
+     383,   368,     0,     0,   397,   414,     0,     0,   149,     0,
+     330,   149,   118,   149,     0,   341,     0,    18,     0,   108,
+     551,     0,     0,   564,     0,   546,     0,     0,     0,   528,
+     685,   691,   692,   690,     0,   679,   680,     0,   686,   527,
+     322,     0,   319,   321,   311,   310,     0,   256,   309,   331,
+     333,   332,   247,   334,   337,   336,   335,   240,   237,   252,
+     255,   250,   351,     0,   185,   243,   244,   103,   107,   242,
+       0,    97,     0,   150,   486,   160,   162,     0,    95,   408,
+     407,   405,   406,     0,   424,   412,   423,   421,     0,   417,
+     344,     0,   374,   530,   485,   124,   367,   124,    77,   339,
+     338,    45,     0,    52,     0,     0,    38,    42,   498,     0,
+       0,     0,     0,     0,   658,    34,     0,     0,   675,     0,
+     677,     0,     0,   315,   320,   317,     0,   313,     0,     0,
+       0,   242,   122,   205,     0,     0,   216,     0,     0,     0,
+     242,   190,   189,   192,   191,   194,   193,   242,     0,   109,
+     131,     0,   129,   132,     0,     0,     0,   146,   270,     0,
+     432,   425,   431,     0,   427,   420,   419,     0,   479,    88,
+      90,    59,     0,    60,    57,     0,    54,    53,     0,     0,
+      49,     0,   578,     0,     0,   501,   501,     0,     0,     0,
+       0,   688,   689,   649,   650,   586,   585,   552,     0,   581,
+     587,   588,   584,   604,   661,   611,   609,   646,   652,   687,
+     648,     0,   660,     0,     0,     0,   657,   547,     0,   533,
+     540,     0,   541,     0,     0,     0,   535,   681,   682,   683,
+     311,   260,   318,   258,   268,   257,   263,   270,     0,   188,
+     242,     0,   214,     0,   216,   210,   211,   409,   202,   213,
+      95,   197,   195,   198,   218,   242,   186,     0,   245,   124,
+       0,   127,   130,     0,     0,   151,   152,   158,   156,   157,
+     161,   163,   115,   115,   179,   176,     0,     0,   149,   242,
+     430,     0,   426,   376,    62,    61,     0,    63,     0,    39,
+       0,    58,     0,     0,     0,     0,   647,     0,     0,     0,
+       0,     0,   613,   616,   615,   614,   582,   579,     0,   612,
+       0,     0,   670,   659,     0,   561,   559,   676,   537,   538,
+     539,   543,   542,     0,   534,     0,     0,     0,   269,     0,
+     183,   206,     0,     0,   215,   212,     0,     0,     0,   242,
+       0,   222,   187,   207,   120,   111,   115,   110,     0,   133,
+       0,     0,   153,   173,   178,   181,   147,   180,   148,   177,
+     271,   391,   270,     0,   429,   428,     0,     0,    68,    64,
+       0,    65,    69,    70,    71,    55,    49,    56,     0,     0,
+       0,    43,     0,   598,     0,     0,     0,     0,   556,     0,
+     636,   580,     0,     0,   602,   624,     0,   645,   610,   619,
+     622,   643,     0,   671,   672,   562,   565,     0,   536,   684,
+     259,   267,   266,   265,   264,   248,    82,   270,   209,   410,
+     203,   270,   196,   443,   444,   199,   442,     0,   219,   242,
+     113,     0,   112,     0,     0,   134,   135,   154,   155,   174,
+     175,   164,   165,     0,   172,   170,   171,     0,     0,   433,
+      67,    66,    46,    40,     0,     0,     0,     0,   242,   589,
+       0,     0,     0,   591,   557,     0,   617,   583,   662,   667,
+       0,     0,     0,     0,   664,     0,   644,   620,     0,   651,
+       0,   565,   560,   544,    95,   182,   242,   217,     0,     0,
+       0,     0,     0,   224,    95,   208,   115,   145,     0,   138,
+     141,   142,   143,   140,   144,   128,   136,   166,     0,     0,
+     169,   275,     0,     0,   304,   305,   306,   307,   308,     0,
+       0,     0,   284,     0,   286,     0,   288,     0,     0,     0,
+       0,     0,   293,   294,   296,     0,   299,     0,   273,   301,
+     393,     0,     0,     0,    51,    50,     0,   599,   605,   661,
+       0,   661,     0,   590,     0,   637,   639,   640,   668,   666,
+     669,     0,   663,   592,   603,     0,   595,     0,   633,   623,
+     634,   628,   673,   563,   568,   566,     0,   204,   200,     0,
+     229,   228,   302,   226,   223,   225,     0,   114,   137,   139,
+       0,     0,   279,   277,   278,   276,   280,   281,   282,   283,
+     285,   287,   289,     0,   292,   291,     0,     0,     0,   272,
+       0,    75,    72,    41,    74,    48,    47,    44,     0,     0,
+     600,   661,     0,     0,   618,   665,   596,   593,   621,   626,
+       0,   625,   636,   569,     0,   149,   242,   227,     0,   220,
+     167,   168,     0,     0,     0,     0,   274,     0,   242,   606,
+     608,   601,     0,   641,   642,   594,     0,     0,   635,   629,
+       0,     0,   201,   303,   242,   290,   295,     0,     0,   300,
+       0,     0,   638,   597,   634,   640,   570,   270,   221,     0,
+       0,    73,   607,   627,   630,     0,   572,   184,   298,   297,
+     653,     0,     0,   567,   631,   654,   655,     0,     0,   661,
+     656,   571,   576,     0,   574,   632,   577,     0,   573,   575
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,     3,    21,     5,     6,    52,   100,   299,   300,    53,
-     101,   194,    22,    90,   634,   187,   188,   288,    24,    65,
-      25,    69,   124,    26,    55,   338,   202,   203,   414,   573,
-     651,   652,    76,    77,   342,   204,   412,   305,   205,   312,
-     313,   415,   653,   490,   491,   733,   734,   735,   801,   802,
-     433,   434,   592,   684,   685,   529,   593,   595,   754,   823,
-     824,   825,   759,   693,   757,   694,   635,   716,   636,   478,
-     479,   643,   480,   644,   791,   929,   481,   641,   789,   482,
-     549,   728,   483,   553,   562,   563,   484,   645,   797,   974,
-     727,   795,   796,   111,   211,   323,   324,   408,   409,   410,
-     431,   430,   523,   516,   589,   748,   678,   679,   696,   829,
-     898,   899,   858,   900,   517,   326,   425,   424,   588,   511,
-     680,   327,   125,   126,   518,   557,   289,   290,   171,   172,
-     173,   174,   128,   129,   329,   330,   216,   393,   391,   390,
-     356,   357,   176,   243,   247,   177,   688,   280,   281,   394,
-     178,   179,   180,   724,   222,   223,   181,    83,   182,    27,
-      28,    29,   137,    30,   229,    31,   114,    32,   213,    33,
-     186,    34,    35,    36,    37,   339,    74,    68,    57,    75,
-      64,    38,   191,    39,    40,    41,    42,    43,    44,    45,
-     496,   659,   660,   738,   508,   670,   671,    46,   317,   583,
-      47,   304,   544,    48,   617,   618,   406,   786,   785,   851,
-     927,   970,  1015,  1021,  1031,  1032,   619,   620,   772,   621,
-     917,   918,   990,   622,   831,   845,   901,  1002,   902,   623,
-     712,   624,   625,   770,   910,   778,   920,   779,   848,   922,
-     991,   923,   968,  1006,  1018,  1027,   967,   836,   960,   780,
-     626,   627,  1022,  1023,   469,   711,   843,   844,   782,   783,
-     417,   418,   420,   501,   502,   503,   662,   504,   628,   629,
-     630,    58,    59,    97
+      -1,     3,    88,     5,     6,    50,   107,   249,   250,    51,
+     108,   156,    20,   259,   157,   256,   458,   546,   816,   981,
+     620,   898,   547,   735,   615,   616,   617,   612,   726,   810,
+    1053,  1088,    89,   147,   770,   238,   239,   365,    91,   141,
+      92,   142,   232,    93,   140,   178,   301,   302,   303,   304,
+     511,   700,   787,   788,   132,   133,   451,   305,   509,   396,
+     306,   404,   405,   512,   789,   591,   592,   874,   875,   876,
+     938,   939,   407,   408,   594,   705,   706,   516,   595,   597,
+     793,   881,   882,   883,   798,   714,   796,   715,   771,   856,
+     772,   580,   581,   779,   582,   780,   928,  1076,   583,   777,
+     926,   584,   680,   869,   585,   684,   689,   690,   586,   781,
+     934,  1104,   868,   932,   933,   123,   168,   271,   272,   273,
+     504,   505,   274,   388,   569,   506,   394,   393,   499,   486,
+     568,   766,   675,   676,   717,   887,   977,   978,  1021,   979,
+     487,   276,   385,   384,   567,   481,   677,   277,   233,   234,
+     488,   492,   366,   367,   208,   209,   210,   211,   212,   213,
+     279,   280,   359,   419,   443,   442,   410,   411,   352,   215,
+     709,   776,   216,   417,   444,   327,   420,   525,   526,   603,
+     604,   719,   217,   218,   219,   865,   335,   336,   220,    78,
+     221,    21,    22,    23,    24,   129,    25,   175,    26,   121,
+      27,   165,    28,   138,    29,    30,    31,    32,   179,    69,
+      63,   126,   150,    81,   257,    70,    59,    33,    34,    64,
+      35,    71,   170,    36,    37,    38,   153,    39,    40,    41,
+      42,    43,   469,   665,   666,   762,    44,   260,   556,    60,
+      45,   258,   549,    46,   635,   636,   375,   846,   921,   922,
+    1015,  1074,  1126,  1133,  1143,  1144,   637,   638,   832,   639,
+     640,   641,  1004,  1005,  1096,   642,   900,   915,   987,  1111,
+     988,   643,   751,   644,   645,   830,   997,   838,  1007,   839,
+     918,  1009,  1097,  1010,  1072,  1115,  1130,  1139,  1071,   906,
+    1064,   840,   646,   647,  1134,  1135,   463,   653,   750,   913,
+     914,   842,   843,   379,   380,   382,   474,   475,   476,   668,
+     477,   648,   649,   650,   151,    83,   104
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -888
+#define YYPACT_NINF -1049
 static const yytype_int16 yypact[] =
 {
-      26,  -888,   -91,    75,  -888,   718,   121,  -888,    -2,  -888,
-     346,   256,  -888,   185,  -888,   -36,   190,  -888,    13,   389,
-     189,   -39,  -888,  -888,  -888,  -888,  -888,   330,  -888,  -888,
-    -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,    30,  -888,
-    -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,
-      35,  -888,  -888,  -888,    42,  -888,   115,  -888,  -888,  -888,
-     112,   171,    98,  -888,   173,   231,   194,   173,  -888,   763,
-     527,   246,  -888,  -888,  -888,   173,   246,  2260,   114,  -888,
-    -888,  -888,  -888,  -888,   149,  -888,  -888,  -888,  -888,  -888,
-    -888,   -36,   -36,  -888,  -888,   136,  -888,  -888,  -888,  -888,
-     186,   267,   168,   228,   350,  -888,   168,   168,   168,  -888,
-    -888,  -888,  -888,  -888,   231,  -888,  2260,  -888,  -888,  -888,
-    -888,  -888,  -888,  -888,  -888,   901,  -888,   429,  -888,  -888,
-    -888,  -888,   341,   383,    -8,  -888,  -888,   231,  -888,   173,
-    2260,  1787,   404,  2260,  2260,   431,   434,  -888,   445,  -888,
-    -888,   474,   485,   491,  -888,   496,   516,   532,   536,   538,
-    2260,   540,   542,   545,   565,  -888,  -888,  -888,  -888,    49,
-    -888,  -888,  1954,  -888,   429,  3564,  -888,  -888,  -888,  -888,
-    -888,    77,  -888,   266,   168,   480,   548,  -888,  2056,   173,
-    -888,   413,   753,    38,  -888,   567,  -888,  -888,   518,   551,
-     544,   610,  -888,   455,   591,  -888,  -888,   -22,   502,  -888,
-    -888,  1620,   228,   231,  -888,   276,  2260,  2740,   228,  -888,
-    -888,  -888,    34,  -888,   168,   168,   422,   168,  -888,   231,
-     276,  -888,  -888,  1662,  -888,  -888,  2890,  -888,  -888,  -888,
-    -888,   493,  2260,   665,  2260,  2260,  2260,   669,  2260,  2260,
-    2260,  -888,  -888,  1662,  2260,  2260,  2260,  -888,   455,  -888,
-     680,  2260,  2908,  2260,  2260,  2260,  2260,  2260,  2260,  2260,
-    2260,  2260,  2260,  2260,  2260,   447,  -888,  -888,  2158,  -888,
-    -888,  -888,   681,   577,   168,   231,   228,  -888,  -888,   698,
-    2260,  2966,   348,   -36,  -888,  -888,  -888,  -888,  -888,   700,
-    -888,  -888,  -888,   546,  -888,  1620,  -888,   620,  -888,  -888,
-     612,  -888,  -888,  -888,   653,   706,   653,  -888,   699,   404,
-     530,   530,  -888,   705,   719,  -888,  -888,  -888,   429,  -888,
-    -888,  -888,  -888,  -888,  -888,  -888,   668,  -888,   228,  -888,
-    2992,  -888,   668,  -888,  -888,  -888,  -888,  -888,  -888,  -888,
-    -888,   168,  -888,  -888,  -888,  -888,  -888,  -888,  -888,    32,
-    3018,  2260,  3044,  3070,  3096,  2260,  3122,  3148,  3174,  3200,
-    3226,  3252,  -888,  -888,  3278,  -888,  1662,  1829,  2025,   769,
-     769,   769,   769,   629,  2025,   629,  -888,  -888,  -888,  -888,
-     717,  2260,  -888,  3564,   292,  -888,   641,  -888,   670,   668,
-    2260,  3564,  2260,   352,   753,  -888,    59,   716,    56,  -888,
-     732,  -888,  1620,   729,  -888,   676,   571,    43,  -888,    74,
-     652,    46,    87,  -888,  1620,   939,  -888,  -888,  -888,  1620,
-    1257,   939,   715,   591,   692,   668,  -888,   591,  -888,   228,
-    -888,  -888,  -888,  3304,  -888,  -888,  -888,  3330,  -888,  -888,
-    2260,  2260,  2260,  -888,  -888,  2260,   618,  -888,  1326,  -888,
-     168,   231,  -888,  3564,  3564,  -888,  -888,   342,    12,  -888,
-    -888,  -888,  2723,   187,  -888,   251,   673,   168,  1143,  -888,
-    -888,  -888,   619,  -888,  -888,  1620,   741,  -888,  -888,  -888,
-      55,  -888,  -888,   706,   653,   749,  -888,  -888,  -888,  -888,
-    -888,   743,   761,  -888,   -34,  -888,  -888,   757,  -888,  -888,
-    -888,  1534,  -888,  -888,  1624,  -888,   654,  -888,  -888,   429,
-    -888,  -888,  -888,  -888,   750,   752,  -888,  -888,  -888,   678,
-     591,  -888,   751,   228,  -888,  -888,  3356,  1904,  3382,   409,
-    -888,  3564,  -888,   276,  2337,   754,   760,   624,  -888,  1568,
-    2260,  -888,   736,  -888,  -888,  -888,    77,  -888,   429,  -888,
-    -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  1620,  -888,
-     781,  -888,   591,    20,  -888,  -888,   690,  -888,   391,  -888,
-      74,   -34,   487,  2337,  -888,  -888,  -888,   504,  -888,  1498,
-    1449,   696,  2643,  2260,   759,   -17,  -888,   703,   668,  -888,
-    2260,  -888,  -888,  -888,  -888,   775,  -888,   422,   -36,  1726,
-    1726,  1726,  1726,  -888,  -888,  -888,  -888,  -888,  -888,  -888,
-     313,  -888,  -888,  -888,   401,  -888,  -888,  -888,  -888,  -888,
-     790,   634,   636,  -888,  -888,  -888,   788,  3408,  -888,  -888,
-    -888,   798,   228,  1568,    97,   799,  -888,  -888,  -888,  -888,
-    -888,  -888,   103,   800,   -34,  -888,  -888,  -888,   659,   270,
-    -888,  -888,  -888,   727,  -888,  -888,   168,  -888,   151,   659,
-     289,  -888,  -888,  1734,  -888,  -888,  -888,  -888,   813,  -888,
-     703,   797,  2260,  2260,  2643,  -888,   429,  -888,  -888,  3564,
-    -888,  -888,  -888,   725,   744,   809,  -888,   805,  3434,  -888,
-      14,   168,   416,  -888,  -888,  -888,  -888,   808,  -888,   816,
-    -888,   819,   318,   522,  -888,  -888,  -888,   703,  -888,  -888,
-     703,  -888,  -888,  -888,  -888,  -888,    -1,  -888,  1568,  -888,
-     674,  -888,  1029,   817,   800,  -888,  -888,  -888,   695,   340,
-    -888,   746,  -888,  -888,  -888,   695,   505,  -888,  1498,  1040,
-    -888,  3460,  3486,  -888,  2785,  -888,  -888,  -888,  -888,  -888,
-    -888,  -888,   703,  -888,  -888,   730,   691,   764,  -888,   168,
-     804,  -888,  2378,   343,  -888,  -888,   830,  -888,   831,  -888,
-    -888,  -888,   832,   849,  -888,  -888,  -888,  -888,  -888,  1568,
-    -888,   847,   707,   113,   753,    86,  -888,  -888,  -888,  -888,
-    -888,   111,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,
-     709,  -888,  -888,  -888,   813,  -888,  -888,  -888,  -888,  -888,
-    -888,  -888,  -888,  2619,  -888,    31,   429,  -888,  -888,  3527,
-    -888,  2490,   168,   758,  -888,   364,  -888,  -888,  -888,  -888,
-     714,   815,   702,   301,  -888,  2425,  -888,  -888,   561,  -888,
-     522,   723,   723,   228,  -888,  -888,   753,  -888,   871,   429,
-     700,  -888,  -888,    57,  -888,  -888,  -888,  -888,  -888,  2260,
-    2260,  -888,  -888,   438,   493,  -888,  -888,  -888,  -888,  -888,
-     493,  2260,   721,  -888,   734,  -888,   735,  -888,   493,   866,
-    2260,  2260,   868,  -888,  -888,  -888,   873,  -888,   410,  -888,
-     874,  -888,  -888,   401,  1066,   786,   168,   878,  -888,  -888,
-     818,  -888,  -888,  -888,   260,  -888,  -888,  -888,   513,  -888,
-     318,  -888,   887,   867,  -888,  -888,   742,  -888,   668,  1568,
-     700,   493,  -888,  3512,  3538,  -888,  -888,  -888,  -888,   429,
-     429,  3564,  -888,  -888,  -888,   429,   493,  3564,  3564,   493,
-     482,  3527,  -888,  2260,   893,   561,  -888,   786,   748,   467,
-    -888,  -888,   886,  -888,  -888,  -888,   168,  -888,   804,  -888,
-     835,   891,  -888,   429,  1568,  -888,  -888,   414,   459,   877,
-     484,  -888,   509,  -888,  -888,  -888,   896,  -888,  -888,  -888,
-    2466,   561,  -888,  -888,   522,   703,  -888,  -888,  -888,   883,
-     904,  -888,  2425,  -888,  -888,   867,   818,   841,  -888,   493,
-     493,  -888,  -888,  -888,   923,   840,   429,   429,   796,   522,
-     927,  -888,  -888,   796,  -888,   462,   773,   786,  -888,  -888,
-     787,   463,  -888,  -888,  -888,   773,  -888,  -888
+      51, -1049,   -80,   152, -1049,  2453,   103, -1049, -1049,    64,
+      76,   373, -1049,    38,    76,   252,    76,   366,   187, -1049,
+     236,   673, -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049,    25, -1049, -1049, -1049,    76,    53, -1049,
+   -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049,    56, -1049,
+   -1049, -1049,   114, -1049,   260, -1049, -1049,   165,   134,   129,
+     284,   212,   129, -1049,   351,   659,   546, -1049, -1049, -1049,
+     129,   351, -1049,    86, -1049, -1049, -1049, -1049, -1049,   257,
+     316, -1049, -1049, -1049, -1049, -1049, -1049,   131,   283, -1049,
+   -1049, -1049, -1049, -1049,    76,    38,    76,   252, -1049, -1049,
+   -1049,   224,   308, -1049, -1049, -1049, -1049,   318,   383,   460,
+   -1049, -1049, -1049, -1049, -1049,   654,   460, -1049,   460, -1049,
+   -1049,   351, -1049,   426,   439,     5, -1049,   500, -1049,   351,
+   -1049,   406,   546,  2626,   400,   460,   471,   535,   531, -1049,
+   -1049,   351,   375, -1049, -1049, -1049, -1049, -1049,   254, -1049,
+     462, -1049, -1049,   307,   605,    49, -1049,    15,   574, -1049,
+   -1049, -1049, -1049, -1049,   -16,   351, -1049,   214,  1408,   351,
+     406, -1049,   329,   460,   460,   351,   214, -1049,   388, -1049,
+     129,  2626,  2216,   584,  2626,  2626,   600,   615, -1049,   640,
+   -1049,   644,   648,   654,   660,   661,  2626,   665, -1049,   146,
+   -1049, -1049, -1049,    57, -1049, -1049, -1049, -1049, -1049,  2267,
+   -1049,    67, -1049, -1049,  3290, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049,   595,   530,   460, -1049,   351,   388, -1049, -1049,
+    2626, -1049, -1049,   305, -1049,    67, -1049, -1049, -1049,  2447,
+     224, -1049,   380,    76, -1049, -1049, -1049, -1049, -1049,   674,
+   -1049, -1049, -1049,   516,   654,   129, -1049, -1049, -1049,   656,
+   -1049,   620,   678, -1049, -1049,   666,   584,   185,   185, -1049,
+   -1049,   676,   691,  1408, -1049, -1049, -1049, -1049,    67, -1049,
+   -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049,
+   -1049,   460, -1049, -1049, -1049, -1049, -1049,   624,     4,   627,
+     711, -1049,   654, -1049, -1049,   686,   657, -1049,  1909, -1049,
+   -1049,  2551, -1049, -1049, -1049, -1049,   532,  2626,  2626,  2626,
+   -1049, -1049, -1049,  1909, -1049,  2606, -1049, -1049,   654, -1049,
+     707,  2626,  2906, -1049, -1049,    44, -1049,  2626,  2626,  2626,
+    2626,  2626,  2626,  2626,  2626,  2626,  2626,  2626,  2626,   562,
+   -1049, -1049,   146, -1049,   641, -1049,   667, -1049,   388,  2626,
+    2952,   388, -1049,   388, -1049, -1049,   744,  2626,  2981, -1049,
+     410,   605, -1049, -1049, -1049,    52, -1049,    77,   581,    85,
+   -1049,     9,   649, -1049,  2078,   413, -1049, -1049,   432, -1049,
+    1408, -1049, -1049,  1135,   413, -1049,  1959, -1049,   668,   684,
+   -1049, -1049,   680, -1049, -1049, -1049,   716,   686,   689, -1049,
+   -1049, -1049, -1049,   611,  3010,  3039,  3068,   172, -1049,  3290,
+     357, -1049, -1049,  3097, -1049, -1049, -1049, -1049, -1049,  1909,
+    1519,  2060,  1028,  1028,  1028,  1028,   393,  2060,   393, -1049,
+   -1049, -1049,   749,  2626, -1049, -1049,   460,   351,   657,  3129,
+   -1049,   657, -1049,   657,  2626,  3290,  2626, -1049,   371,   680,
+   -1049,    75,    46, -1049,    70, -1049,   678,   620,   754, -1049,
+   -1049, -1049, -1049, -1049,   750,   778, -1049,   209, -1049, -1049,
+   -1049,  1995, -1049, -1049,  2713, -1049,   402, -1049, -1049,    67,
+   -1049, -1049, -1049,    67, -1049, -1049, -1049, -1049, -1049, -1049,
+     762,   762,   785,   773,   578, -1049,   790, -1049, -1049,  1959,
+     798, -1049,   663, -1049, -1049, -1049,   710,   388, -1049, -1049,
+   -1049, -1049, -1049,  2427, -1049, -1049, -1049, -1049,  1703, -1049,
+   -1049,  2626,   771, -1049,   214,   686, -1049,   686, -1049,  3290,
+    3290, -1049,   639,   646,   760,   639, -1049, -1049, -1049,  2164,
+      60,   786,   797,   683, -1049, -1049,  2164,   727, -1049,   536,
+   -1049,     9,   209, -1049, -1049, -1049,   263, -1049,  1826,   835,
+     344,  1959, -1049, -1049,  1569,   432, -1049,   374,   763,   460,
+    1741, -1049, -1049, -1049,   702, -1049, -1049,  2027,   832, -1049,
+   -1049,    59, -1049, -1049,  1510,  2626,   815,     1,   755,   388,
+   -1049, -1049,  3290,   446, -1049, -1049,  3290,   517, -1049, -1049,
+   -1049, -1049,   149, -1049,   850,   837,   854,   698,   856,   857,
+     787,   860, -1049,   791,   329,    76,    76,  1198,  1198,  1198,
+    1198, -1049, -1049, -1049, -1049, -1049, -1049, -1049,   422, -1049,
+   -1049, -1049, -1049, -1049,   401, -1049, -1049, -1049, -1049, -1049,
+     866,   722, -1049,   855,   717,   720, -1049, -1049,   209, -1049,
+   -1049,   460, -1049,   161,   726,   130, -1049, -1049, -1049,   804,
+    2795, -1049, -1049, -1049, -1049,   886, -1049,   755,  2027, -1049,
+    1940,  2626, -1049,   838, -1049, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049, -1049, -1049,  1959, -1049,   890, -1049,   686,
+      37, -1049, -1049,  2626,  2626,  1510, -1049,    67, -1049, -1049,
+    3290, -1049, -1049, -1049,   803,   823,   892,   891,   657,  1959,
+   -1049,  1469, -1049, -1049, -1049, -1049,  1172, -1049,   743, -1049,
+     745, -1049,   639,   639,   902,   906, -1049,   841,    35,   460,
+     840,   225, -1049, -1049, -1049, -1049,   903, -1049,   909, -1049,
+     917,   249,   652, -1049,   758, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049,   792,   515, -1049,   834,  1826,  1771, -1049,   922,
+   -1049, -1049,   927,  3155, -1049, -1049,   146,   938,   388,  1940,
+      95,   937, -1049, -1049, -1049, -1049, -1049, -1049,   328,   939,
+    3181,  3206, -1049,  1798, -1049, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049,   755,   931, -1049, -1049,   185,   185, -1049, -1049,
+     934, -1049, -1049, -1049, -1049, -1049,   787, -1049,   149,   149,
+     646, -1049,   460, -1049,   843,   809,   879,   872, -1049,   460,
+     915, -1049,  2684,   235, -1049, -1049,   949, -1049,   951, -1049,
+   -1049, -1049,   954,   970, -1049, -1049, -1049,   816, -1049, -1049,
+     886, -1049, -1049, -1049, -1049, -1049, -1049,   755, -1049, -1049,
+   -1049,   755, -1049, -1049, -1049, -1049, -1049,    88, -1049,  1940,
+   -1049,   814, -1049,   802,   969,   939, -1049, -1049, -1049, -1049,
+   -1049,   858, -1049,    42,    67, -1049, -1049,  3221,   971, -1049,
+   -1049, -1049, -1049, -1049,  1172,  1172,   335,    29,  1959, -1049,
+    1046,   460,   870,   460, -1049,   767, -1049, -1049, -1049, -1049,
+     836,   932,   824,   435, -1049,  2712, -1049, -1049,   929, -1049,
+     652, -1049,   871, -1049, -1049, -1049,  1940, -1049,   988,   839,
+      81,   605,   117, -1049, -1049, -1049, -1049, -1049,   505, -1049,
+   -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049,  2626,  2626,
+   -1049, -1049,   547,   532, -1049, -1049, -1049, -1049, -1049,   532,
+    2626,   844, -1049,   842, -1049,   846, -1049,   532,   989,  2626,
+    2626,   994, -1049, -1049, -1049,   996, -1049,   445, -1049,   997,
+   -1049,  1652,   991,   992, -1049, -1049,   998, -1049, -1049,   401,
+    1287,   918,   460, -1049,  1008, -1049, -1049,   946, -1049, -1049,
+   -1049,   492, -1049, -1049, -1049,   457, -1049,   249, -1049,  1026,
+    1004, -1049, -1049,   871,   893, -1049,   388, -1049, -1049,   605,
+   -1049,  1035,    67,   674, -1049, -1049,    96, -1049, -1049, -1049,
+    3239,  3265, -1049, -1049, -1049, -1049,    67,    67,  3290, -1049,
+   -1049, -1049,    67,   532,  3290,  3290,   532,   669,  3221, -1049,
+    2626, -1049, -1049, -1049,  3290, -1049, -1049, -1049,  1034,   929,
+   -1049,   918,   888,   533, -1049, -1049,  1027, -1049, -1049, -1049,
+     460, -1049,   915, -1049,   972,   657,  1940,   674,   532, -1049,
+   -1049, -1049,   478,   489,  1030,   719, -1049,   573,  1959, -1049,
+   -1049, -1049,  1036, -1049, -1049, -1049,  2783,   929, -1049, -1049,
+     652,  1039, -1049,    67,  1940, -1049, -1049,  1031,  1033, -1049,
+    1041,  2712, -1049, -1049,  1004,   946,   968,   755, -1049,   532,
+     532, -1049, -1049, -1049, -1049,  1054,   967, -1049,    67,    67,
+     923,   652,  1058, -1049, -1049,   923, -1049,   511,   904,   918,
+   -1049, -1049,   912,   541, -1049, -1049, -1049,   904, -1049, -1049
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -888,  -888,  -888,  -888,  -888,  -888,  -888,  -741,   547,  -888,
-    -888,  -888,  -888,  -888,    45,  -353,  -888,  -888,  -888,  -888,
-    -888,  -888,  -888,  -888,  -888,   -47,  -888,  -888,  -888,  -888,
-    -888,  -888,   -33,  -888,  -888,  -283,  -888,  -888,  -201,  -352,
-    -888,  -888,  -888,  -888,   460,  -888,  -888,   218,  -888,   152,
-    -341,  -888,  -888,  -888,   274,  -888,  -888,  -888,  -888,  -888,
-     131,  -888,  -888,   265,  -888,   268,  -629,  -888,  -260,  -888,
-    -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,
-    -888,  -888,  -888,  -888,   407,  -888,  -888,  -888,  -888,  -888,
-    -888,  -888,   170,   -96,  -888,  -888,  -888,   481,  -888,  -195,
-    -888,  -888,  -888,   262,  -888,  -888,   219,   221,  -654,  -888,
-    -888,    17,  -550,  -888,    15,  -405,  -888,  -888,  -888,  -888,
-    -362,  -402,  -888,   846,  -888,  -888,  -888,  -888,  -888,  -888,
-    -888,   -46,  -187,  -888,  -888,   -27,  -888,   733,  -888,  -888,
-    -888,  -888,  -463,  -888,  -888,  -888,  -459,  -888,   418,  -453,
-     533,   607,  -173,  -888,  -888,  -888,   -18,  -888,  -181,  -888,
-     949,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,  -888,
-    -888,  -888,  -888,  -888,  -888,  -215,   909,   919,   967,   914,
-      -5,  -888,  -888,   801,  -888,  -888,  -888,  -888,  -888,  -888,
-     573,  -888,   252,   326,  -888,  -888,   263,  -888,  -888,  -888,
-    -888,  -888,  -888,  -888,    19,  -888,   693,  -888,  -888,   222,
-    -888,  -888,  -888,  -888,  -888,   -23,   430,  -888,  -888,   242,
-      18,  -888,  -888,  -808,  -888,  -888,  -888,  -888,  -888,  -888,
-    -888,   184,  -604,  -888,  -888,  -888,  -888,    96,  -888,  -888,
-    -888,  -887,  -888,  -888,  -888,  -888,    16,    54,    11,   120,
-    -788,  -578,  -888,  -888,  -703,  -831,  -888,   116,  -888,     6,
-     710,   534,   539,  -888,  -888,   449,   373,  -888,  -692,  -390,
-     -11,    25,   -58,  -888
+   -1049, -1049, -1049, -1049, -1049, -1049, -1049,  -852,   706, -1049,
+   -1049, -1049, -1049, -1049,   709, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049,   267, -1049,   266,   268,  -497,  -288,  -328,
+   -1049, -1049, -1049, -1049,    31,  -406, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049, -1049, -1049,  -121, -1049, -1049, -1049, -1049,
+     630, -1049, -1049, -1049,   -74, -1049, -1049,  -357, -1049, -1049,
+    -226,  -360, -1049, -1049, -1049, -1049,   504, -1049, -1049,   223,
+   -1049,   162,  -441, -1049, -1049, -1049,   396, -1049, -1049, -1049,
+   -1049, -1049,   221, -1049, -1049,   390, -1049,   397,  -761, -1049,
+    -393, -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049, -1049, -1049, -1049,   429, -1049, -1049, -1049,
+   -1049, -1049, -1049, -1049,   178,   -41, -1049, -1049, -1049, -1049,
+     527,   437,  -209, -1049, -1049,  -129, -1049, -1049, -1049,   243,
+   -1049, -1049,   352,   350,  -666, -1049, -1049,    71,  -896, -1049,
+      84,  -362, -1049, -1049, -1049, -1049,  -310,  -359, -1049,   887,
+   -1049,   549, -1049, -1049, -1049, -1049, -1049,   -87,  -152, -1049,
+   -1049,  -118, -1049,  1061, -1049, -1049, -1049, -1049, -1049,  -545,
+    -559, -1049,   113, -1049, -1049,  -336,  -527, -1049, -1049, -1049,
+     404, -1049,   356,   603,   342, -1049, -1049, -1049,   -17, -1049,
+      78, -1049,  1106, -1049, -1049, -1049, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049, -1049, -1049, -1049, -1049, -1049,  -144,  1062,
+    1068,  1076,   894, -1049, -1049,   999,    17, -1049, -1049, -1049,
+   -1049, -1049, -1049, -1049, -1049, -1049, -1049,   979, -1049, -1049,
+   -1049, -1049,   751, -1049,   376, -1049, -1049, -1049, -1049,   -37,
+   -1049, -1049, -1049, -1049,    62, -1049,   877, -1049, -1049,   217,
+   -1049, -1049, -1049, -1049, -1049,    -6,   586, -1049, -1049,   311,
+   -1049, -1049,    33, -1049, -1049,  -871, -1049, -1049, -1049, -1049,
+   -1049, -1049, -1049,   247,  -627, -1049, -1049, -1049, -1049,   141,
+   -1049, -1049, -1049,  -976, -1049, -1049, -1049, -1049,    36,    79,
+      40,   166,  -858,  -592, -1049, -1049, -1048, -1049,  -921, -1049,
+     156, -1049,    30, -1049,   693,   701, -1049, -1049,   607,   506,
+   -1049,  -731,  -340,    -4,    16,   -45, -1049
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -433
+#define YYTABLE_NINF -496
 static const yytype_int16 yytable[] =
 {
-      82,   437,   539,   399,   440,   301,   109,    84,   103,   554,
-      70,   336,   135,   555,   721,   354,   325,   343,   215,   510,
-     710,   784,   513,   127,    49,   105,   750,     1,   547,   505,
-     335,   703,   704,   705,   706,   344,    98,   919,   333,   302,
-      95,   230,   130,   904,   649,   407,   764,   869,   870,   792,
-      23,   131,   494,   860,   220,   494,   441,   258,   462,     4,
-     924,   221,   512,   788,   212,   691,   790,   793,   984,   574,
-     471,   932,   954,   466,   956,     7,   210,   218,   226,   127,
-     214,   527,   692,    63,    82,   531,    78,   189,    82,    82,
-      82,   196,   113,   278,   530,   207,   208,   209,   130,   798,
-     138,   509,   228,    54,  1005,   231,   510,   131,   830,   513,
-     861,    89,   730,   227,   581,   930,   472,   337,   198,   473,
-     467,   498,   499,   314,   335,   722,   985,   731,   142,   687,
-     183,   135,   333,   353,   781,   865,   792,   435,   315,   500,
-     286,   857,   497,   909,   495,   474,   723,   507,   467,   585,
-     199,   200,   486,   106,   793,   184,   475,    50,   925,   765,
-     854,   476,   794,   102,   232,   328,    82,   924,   351,   279,
-     149,    51,   548,   283,   477,     2,    79,    80,   596,    81,
-      96,   104,  1004,   650,   510,   310,   235,   513,   871,   398,
-     505,   663,   115,   334,   919,   359,  1033,   345,   346,   355,
-     347,    99,   303,   924,   142,   468,    82,    82,    82,    82,
-      49,   259,   107,   348,   349,   350,   352,   301,   569,   108,
-     648,   687,   488,   489,   120,   121,   122,   123,   492,   498,
-     499,   335,    66,   468,   522,    86,    56,    71,   532,   333,
-     372,   195,   197,   335,    87,   110,    67,   500,   335,   794,
-     598,   333,   564,   165,   800,    67,   333,   697,    72,   328,
-      79,    80,    73,    81,   663,   565,    82,   988,   166,   167,
-     168,   169,   185,   397,    79,    80,   170,    81,   744,   739,
-     118,   119,   120,   121,   122,   123,   190,   334,   403,   198,
-     -50,   827,   561,   457,   740,   828,    88,   335,   746,   710,
-     972,   458,  1007,   492,   335,   333,   498,   499,   646,   439,
-     914,   743,   333,   747,    72,  1024,   459,   839,    73,   775,
-    1028,   199,   200,   707,   500,   915,   781,   784,   604,    60,
-     335,    79,    80,    82,    81,   776,   708,   -50,   333,    61,
-     438,  1008,   781,   510,   510,   996,   513,   513,   777,   192,
-      79,    80,   170,    81,   118,   119,   120,   121,   122,   123,
-     827,    62,   840,   787,   828,   543,   328,   838,   335,   -50,
-     -50,   193,    10,    91,   201,    63,   333,   656,   328,   519,
-     841,    13,   224,   328,   519,   519,    92,   335,  -432,  -432,
-     206,   195,   657,   533,   334,   333,   977,  -432,   520,   978,
-     839,    16,  -432,   520,   520,   842,   334,   521,   335,    56,
-     457,   334,   521,   521,    17,   655,   333,  -432,   458,   951,
-      19,    60,   -50,   931,   225,   132,   282,   558,   656,   237,
-    -432,    61,   328,   603,   952,   133,  -432,   907,   997,   328,
-    -432,   720,    82,   657,     8,   840,   559,   240,   658,   542,
-     241,   220,    56,    62,   556,   560,   292,   134,   221,    82,
-     334,   242,   335,   841,   609,   328,   567,   334,   931,   293,
-     333,   850,  1035,   498,   499,   166,   167,   168,   169,    56,
-      93,    79,    80,   998,    81,    56,  1029,  1036,   842,   195,
-     244,   500,   613,   334,   614,   195,  -432,   610,    18,   658,
-     982,   245,   709,   328,   611,   673,   220,   246,  1000,   115,
-     457,   664,   248,   221,   674,   545,   642,   546,   458,   498,
-     499,   767,   328,   962,   665,   612,    82,    79,    80,   675,
-      81,   334,   249,  1001,   515,   666,   963,   500,   613,   667,
-     614,   519,   665,   328,   519,   519,   686,   335,   250,   701,
-     334,   807,   251,   666,   252,   333,   254,   667,   255,   805,
-     520,   256,   921,   520,   520,    82,   668,   335,   335,   521,
-     928,   334,   521,   521,   556,   333,   333,   284,   605,    79,
-      80,   257,    81,   183,   668,    79,    80,   971,    81,    82,
-      56,    82,    82,    82,    82,   669,   700,   328,   935,   285,
-     132,   936,   676,   702,   937,   676,   676,   301,   335,   306,
-     133,   938,   307,   669,   388,   389,   333,   729,    79,    80,
-     807,    81,   498,   499,   309,   334,   725,   987,   805,   311,
-     266,   267,   134,   268,   195,   308,   269,   270,   686,   272,
-     500,   613,   979,   614,   769,   273,   274,   316,    82,   118,
-     119,   120,   121,   122,   123,   742,   273,   274,   755,   756,
-     118,   119,   120,   121,   122,   123,   556,    79,    80,   301,
-      81,   118,   119,   120,   121,   122,   123,   498,   499,   586,
-     587,   361,   328,    82,    82,   365,  -433,   166,   167,   168,
-     766,   768,   524,   525,    82,   500,   613,   673,   614,  -433,
-     396,   115,   328,   328,   373,   395,   674,   400,   826,   404,
-     334,   411,   405,   413,   806,   416,   498,   499,   166,   167,
-     168,   169,   419,   423,    79,    80,   515,    81,   428,   429,
-     334,   334,   432,   455,   500,   613,   556,   614,   460,   470,
-     853,   461,   485,   328,   331,   487,   493,   859,   335,     8,
-     863,    82,     9,   495,    82,   526,   333,   528,   834,   566,
-      10,    11,    12,   570,   572,   578,   864,   579,   115,    13,
-     580,   334,    14,   582,    15,   597,   590,   826,   591,   116,
-     594,  -433,  -433,   806,  -433,   633,   631,  -433,   270,    16,
-     272,   117,   632,   335,   638,   647,   273,   274,   654,   690,
-     699,   333,    17,    18,   695,   556,   713,   714,    19,   715,
-     175,   717,   719,    82,    82,   726,   732,   908,   332,   737,
-     741,   905,   749,  -204,   692,   761,   691,    82,   939,   762,
-      82,   771,   773,   774,   940,    20,   833,   799,   331,   810,
-     808,   812,   945,   488,   489,   120,   121,   122,   123,   217,
-     226,   832,   835,   426,   427,   846,   849,   847,   850,    79,
-      80,   855,    81,   118,   119,   120,   121,   122,   123,   867,
-     856,   911,   912,   233,   236,   913,   238,   239,   926,   906,
-     931,   942,   946,   328,   949,   973,    82,   709,    82,   950,
-     953,   943,   944,   253,   958,   957,   965,   959,   969,   966,
-     859,   999,    82,   859,   980,   262,   115,   983,   986,   989,
-     295,   334,   332,   296,   995,  1009,   297,   116,   994,   298,
-    1003,   291,   120,   121,   122,   123,    79,    80,   328,    81,
-     118,   119,   120,   121,   122,   123,  1010,    82,  1014,  1019,
-     514,  1020,   468,  1026,   115,   331,  1030,  1034,    82,   340,
-     575,   465,   809,   866,   868,   992,   334,   331,   753,   760,
-     639,   758,   331,  1016,  1017,   862,   571,   814,   981,   515,
-     818,   219,    82,    82,   640,   360,    94,   362,   363,   364,
-     136,   366,   367,   368,    82,   112,    85,   369,   370,   371,
-     139,   811,   294,   506,   374,   745,   376,   377,   378,   379,
-     380,   381,   382,   383,   384,   385,   386,   387,   852,   813,
-     422,   331,  1037,   672,   837,   903,   964,  1013,   331,   332,
-    1011,  1012,   993,   401,   955,  1025,   421,   736,   577,   661,
-     961,   332,   576,     0,     0,     0,   332,     0,     0,     0,
-       0,   815,     0,     0,   331,   115,   142,     0,     0,     0,
-     816,     0,     0,     0,     0,     0,   318,   319,     0,   320,
-       0,   321,     0,     0,    79,    80,   817,    81,   118,   119,
-     120,   121,   122,   123,     0,     0,     0,   615,     0,     0,
-       0,     0,   331,   776,     0,   332,     0,     0,   149,     0,
-       0,     0,   332,     0,   443,     0,   777,     0,   447,   149,
-       0,   331,    79,    80,     0,    81,   118,   119,   120,   121,
-     122,   123,     0,     0,     0,     0,   615,     0,   332,     0,
-       0,     0,   331,     0,   456,     0,     0,     0,     0,     0,
-       0,     0,   322,   463,     0,   464,     0,     0,     0,   195,
-       0,     0,   615,   615,   615,   615,     0,     0,   115,     0,
-       0,   616,     0,   568,     0,     0,   332,     0,     0,   318,
-     319,     0,   320,     0,   321,     0,     0,     0,     0,     0,
-       0,   165,   800,     0,     0,   332,   331,     0,     0,     0,
-       0,     0,   165,   536,   537,   538,   166,   167,   168,   169,
-     616,   541,    79,    80,   170,    81,   332,   166,   167,   168,
-     169,     0,   149,    79,    80,   170,    81,   118,   119,   120,
-     121,   122,   123,     0,     0,     0,   616,   616,   616,   616,
-       0,   498,   499,   166,   167,   168,   169,     0,     0,    79,
-      80,     0,    81,     0,     0,   322,     0,     0,     0,   500,
-     613,     0,   614,     0,     0,   615,     0,     0,     0,     0,
-     332,     0,     0,     0,     0,     0,     0,     0,   514,     0,
-       0,   331,   115,     0,     0,   803,     0,  -196,     0,     0,
-       0,  -196,     0,     0,     0,     0,     0,     0,     0,     0,
-    -196,   331,   331,   637,     0,   165,     0,   515,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     166,   167,   168,   169,     0,   615,    79,    80,   170,    81,
-     118,   119,   120,   121,   122,   123,     0,  -196,     0,   616,
-    -196,     0,   331,     0,     0,     0,   689,   540,     0,     0,
-       0,     0,   140,   698,   803,   332,     0,     0,     0,   804,
-       0,     0,   141,   142,     0,   143,  -196,   144,     0,     0,
-       0,     0,     0,     0,     0,   332,   332,  -196,     0,     0,
-       0,   145,  -196,     0,   615,   146,     0,     0,     0,     0,
-       0,   147,     0,     0,   148,  -196,     0,     0,   615,   616,
-       0,   615,     0,     0,     0,   149,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   332,     0,     0,   150,
-     151,   152,   153,   154,   155,   156,   157,     0,   804,     0,
-       0,     0,     0,   158,   159,   751,   752,     0,     0,   160,
-      79,    80,     0,    81,   118,   119,   120,   121,   122,   123,
-       0,     0,   161,     0,     0,     0,     0,   615,   616,     0,
-     162,     0,     0,     0,     0,     0,     0,     0,   163,     0,
-     673,   164,   616,   615,   115,   616,     0,     0,     0,   681,
-       0,     0,   331,  -198,     0,     0,     0,     0,   165,     0,
-       0,     0,  -198,     0,     0,     0,     0,     0,     0,   515,
-       0,     0,     0,   166,   167,   168,   169,     0,   615,    79,
-      80,   170,    81,   118,   119,   120,   121,   122,   123,   677,
-       0,     0,     0,   115,     0,     0,     0,   331,     0,  -198,
-       0,   616,  -198,     0,   318,   319,     0,   320,     0,   321,
-       0,     0,     0,   615,   615,     0,     0,   616,     0,     0,
-       0,     0,     0,     0,     0,   615,   332,     0,  -198,   115,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,  -198,
-     318,   319,     0,   320,  -198,   321,     0,   149,   584,     0,
-       0,     0,   616,     0,     0,     0,     0,  -198,     0,     0,
-       0,     0,     0,   115,     0,     0,     0,     0,     0,     0,
-       0,   332,     0,     0,   318,   319,     0,   320,     0,   321,
-     322,     0,     0,   149,     0,     0,     0,   616,   616,     0,
-       0,     0,   933,   934,     0,     0,     0,     0,     0,   616,
-       0,     0,    79,    80,   941,    81,   118,   119,   120,   121,
-     122,   123,     0,   947,   948,   115,   322,   149,     0,     0,
-       0,     0,     0,     0,  -206,     0,   318,   319,  -206,   320,
-     165,   321,     0,     0,     0,     0,     0,  -206,     0,  -206,
-    -206,     0,     0,     0,     0,   166,   167,   168,   169,     0,
-     322,    79,    80,   170,    81,   118,   119,   120,   121,   122,
-     123,     0,     0,   265,   266,   267,   165,   268,     0,   149,
-     269,   270,   271,   272,  -206,    20,     0,  -206,     0,   273,
-     274,   166,   167,   168,   169,     0,     0,    79,    80,   170,
-      81,   118,   119,   120,   121,   122,   123,     0,     0,     0,
-     165,     0,   322,  -206,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  -206,   166,   167,   168,   169,  -206,
-     276,    79,    80,   170,    81,   118,   119,   120,   121,   122,
-     123,     0,  -206,   277,  -205,     0,     0,     0,  -205,     0,
-       0,     0,     0,     0,     0,     0,     0,  -205,     0,  -205,
-    -205,     0,   165,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   166,   167,   168,
-     169,     0,     0,    79,    80,   170,    81,   118,   119,   120,
-     121,   122,   123,   140,  -205,     0,     0,  -205,     0,   195,
-       0,     0,     0,   141,   142,     0,   143,     0,   144,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   234,   145,  -205,     0,     0,   146,     0,     0,     0,
-       0,     0,   147,   263,  -205,   148,     0,     0,     0,  -205,
-     265,   266,   267,     0,   268,     0,   149,   269,   270,   271,
-     272,     0,  -205,     0,     0,     0,   273,   274,     0,     0,
-     150,   151,   152,   153,   154,   155,   156,   157,     0,     0,
-       0,     0,     0,     0,   158,   159,     0,     0,     0,     0,
-     160,   498,   499,   166,   167,   168,   169,     0,     0,    79,
-      80,     0,    81,   161,     0,     0,     0,   276,     0,   500,
-     613,   162,   614,     0,    20,     0,     0,     0,   263,   163,
-     277,   264,   164,   600,     0,   265,   266,   267,     0,   268,
-       0,     0,   269,   270,   271,   272,     0,     0,   601,   165,
-       0,   273,   274,     0,     0,     0,   275,     0,     0,     0,
-       0,     0,     0,     0,   166,   167,   168,   169,     0,     0,
-      79,    80,   170,    81,   118,   119,   120,   121,   122,   123,
-     140,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     141,   142,   276,   143,     0,   144,     0,     0,     0,     0,
-       0,     0,   260,     0,     0,   277,     0,     0,     0,   145,
-       0,     0,     0,   146,     0,     0,     0,     0,     0,   147,
-       0,     0,   148,     0,     0,     0,     0,     0,     0,   261,
-       0,     0,     0,   149,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   150,   151,   152,
-     153,   154,   155,   156,   157,     0,  -433,   266,   267,     0,
-     268,   158,   159,   269,   270,  -433,   272,   160,     0,     0,
-       0,     0,   273,   274,     0,     0,     0,     0,     0,     0,
-     161,     0,   140,     0,     0,     0,     0,     0,   162,     0,
-       0,     0,   141,   142,     0,   143,   163,   144,     0,   164,
-       0,     0,     0,     0,   287,     0,     0,     0,     0,     0,
-       0,   145,     0,   276,     0,   146,   165,     0,     0,     0,
-       0,   147,     0,     0,   148,     0,   277,     0,     0,     0,
-       0,   166,   167,   168,   169,   149,     0,    79,    80,   170,
-      81,   118,   119,   120,   121,   122,   123,     0,     0,   150,
-     151,   152,   153,   154,   155,   156,   157,     0,     0,     0,
-       0,     0,     0,   158,   159,     0,     0,     0,     0,   160,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   161,     0,   140,     0,     0,     0,     0,     0,
-     162,     0,     0,     0,   141,   142,     0,   143,   163,   144,
-       0,   164,   392,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   145,     0,     0,     0,   146,   165,     0,
-       0,     0,     0,   147,     0,     0,   148,     0,     0,     0,
-       0,     0,     0,   166,   167,   168,   169,   149,     0,    79,
-      80,   170,    81,   118,   119,   120,   121,   122,   123,     0,
-       0,   150,   151,   152,   153,   154,   155,   156,   157,     0,
-       0,     0,     0,     0,     0,   158,   159,     0,     0,     0,
-       0,   160,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   161,     0,   140,     0,     0,     0,
-       0,     0,   162,     0,     0,     0,   141,   142,     0,   143,
-     163,   144,     0,   164,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   145,     0,     0,     0,   146,
-     165,     0,     0,     0,     0,   147,     0,     0,   148,     0,
-       0,     0,     0,     0,     0,   166,   167,   168,   169,   149,
-       0,    79,    80,   170,    81,   118,   119,   120,   121,   122,
-     123,     0,     0,   150,   151,   152,   153,   154,   155,   156,
-     157,     0,     0,     0,     0,     0,     0,   158,   159,     0,
-       0,     0,     0,   160,   605,     0,     0,     0,     0,     0,
-     606,     0,     0,     0,     0,     0,   161,     0,     0,     0,
-       0,     0,     0,     0,   162,     0,     0,     0,     0,     0,
-     607,     0,   163,     0,     0,   164,     0,     0,     0,     0,
-       0,     0,     0,   608,     0,   605,     0,     0,     0,     0,
-     609,     0,   165,     0,     0,     0,     0,     0,     0,     0,
-     195,     0,     0,     0,     0,     0,     0,   166,   167,   168,
-     169,   607,     0,    79,    80,   170,    81,   118,   119,   120,
-     121,   122,   123,   610,   608,     0,     0,     0,     0,     0,
-     611,   609,   605,     0,     0,     0,     0,     0,   916,     0,
-       0,   195,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   612,     0,     0,     0,     0,     0,     0,   607,     0,
-       0,     0,     0,     0,   610,     0,     0,     0,     0,     0,
-       0,   611,     0,   605,     0,     0,     0,     0,   609,     0,
-       0,     0,   498,   499,   166,   167,   168,   169,   195,     0,
-      79,    80,   612,    81,     0,     0,     0,   605,     0,   607,
-     500,   613,     0,   614,     0,     0,     0,     0,     0,     0,
-       0,   610,     0,     0,     0,     0,     0,     0,   611,   609,
-       0,     0,     0,   498,   499,   166,   167,   168,   169,   195,
-       0,    79,    80,     0,    81,     0,     0,     0,     0,   612,
-       0,   500,   613,   609,   614,     0,     0,     0,     0,     0,
-       0,     0,   610,   195,     0,     0,     0,     0,     0,   611,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     498,   499,   166,   167,   168,   169,   610,     0,    79,    80,
-     612,    81,     0,   611,     0,     0,     0,     0,   500,   613,
-       0,   614,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   612,     0,     0,     0,     0,     0,
-       0,   498,   499,   166,   167,   168,   169,     0,     0,    79,
-      80,     0,    81,     0,     0,  -125,  -125,     0,     0,   500,
-     613,     0,   614,     0,     0,   498,   499,   166,   167,   168,
-     169,     0,   821,    79,    80,     0,    81,     0,   146,   682,
-     683,     0,     0,   500,   613,     0,   614,   148,     0,     0,
-       0,     0,   822,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   146,     0,     0,     0,     0,     0,     0,     0,
-       0,   148,   150,   151,   152,   153,   154,   155,   156,   157,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   150,   151,   152,   153,
-     154,   155,   156,   157,     0,   161,     0,     0,     0,     0,
-       0,     0,     0,   162,     0,     0,     0,     0,     0,   550,
-       0,   163,     0,     0,   263,     0,     0,   264,     0,   161,
-       0,   265,   266,   267,     0,   268,     0,   162,   269,   270,
-     271,   272,   146,     0,   341,   163,     0,   273,   274,     0,
-       0,   148,   275,     0,     0,     0,  -125,     0,     0,     0,
-       0,   551,    79,    80,     0,    81,   118,   119,   120,   121,
-     122,   123,     0,     0,     0,     0,   150,   151,   152,   153,
-     154,   155,   156,   157,     0,     0,    79,    80,   276,    81,
-     118,   119,   120,   121,   122,   123,   552,     0,   821,     0,
-       0,   277,     0,     0,   146,     0,     0,     0,     0,   161,
-       0,     0,     0,   148,     0,     0,     0,   162,   822,     0,
-       0,     0,     0,     0,     0,   163,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   150,   151,
-     152,   153,   154,   155,   156,   157,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    79,    80,     0,    81,
-       0,   161,     0,     0,   263,     0,     0,   264,     0,   162,
-       0,   265,   266,   267,     0,   268,     0,   163,   269,   270,
-     271,   272,   263,     0,   358,   264,     0,   273,   274,   265,
-     266,   267,   275,   268,     0,     0,   269,   270,   271,   272,
-       0,     0,   375,     0,     0,   273,   274,     0,     0,     0,
-     275,     0,     0,     0,     0,     0,     0,     0,    79,    80,
-       0,    81,   118,   119,   120,   121,   122,   123,   276,     0,
+      77,   357,   251,   503,   607,   518,   453,   535,   139,   114,
+     537,   768,   538,    79,   117,   686,   445,   749,   862,   227,
+     114,   844,   480,   264,   236,   483,   288,    54,   127,   685,
+     131,    65,   295,    72,    82,   742,   743,   744,   745,   275,
+     160,   478,   990,   163,  1006,   425,   166,   514,   619,   708,
+     252,    90,     1,   985,   101,   235,   177,   105,   948,   949,
+    1011,   785,   553,   102,   391,   328,   460,    47,  1058,   823,
+    1060,   254,   398,   701,   482,     4,   651,   241,   120,  1023,
+     167,   278,  1136,  1090,   470,   712,   130,  1140,   176,   333,
+      61,   465,    77,   555,   467,   172,   334,   289,   161,    77,
+     228,    77,   134,   114,   713,   159,    62,   358,   935,  1020,
+    1079,   361,   162,   148,   164,   236,   588,   363,    77,   480,
+     461,  1114,   483,   863,   263,   237,   254,   291,   287,   173,
+     135,   223,   448,   261,   294,   452,   888,   562,   471,   763,
+    1091,  1024,    48,   929,   392,   461,   235,  1082,   262,   864,
+    1083,   285,     7,   399,   764,    77,    77,    77,    49,   841,
+     708,   472,   325,   930,   297,  1017,   255,  1077,   290,   292,
+     293,   564,   929,    52,   996,   609,   320,   610,   679,   724,
+     100,   497,   143,   473,   824,   356,   278,   696,   523,  1012,
+     468,   925,   930,   144,   298,   927,   307,    53,   550,    80,
+     731,  1011,   462,   950,   786,     2,   480,    77,   103,   483,
+     554,   426,   427,   310,   428,    47,   237,   253,  1145,   251,
+     355,   478,   669,   329,   652,  1113,   106,   462,   -95,   413,
+     590,   206,   207,   409,   886,   818,   819,   373,   109,  1011,
+    1006,   145,   718,   326,  -495,   299,   286,   115,   885,   551,
+     835,   552,   205,   206,   207,   931,   285,    80,   116,   908,
+     370,   498,    74,    75,   670,    76,   836,   490,   229,   524,
+     494,   374,    84,   671,    77,   490,   490,   802,   149,   837,
+      62,   281,   -95,    85,   931,   402,   110,   395,   672,   517,
+     471,   598,   110,   485,    80,    80,    86,   278,   489,   909,
+     459,   493,   782,   278,    66,   158,   489,   489,   111,   278,
+     229,   421,   -95,   472,   111,  1102,    74,    75,   669,    76,
+     725,   230,   886,   760,    80,   759,   803,    67,   118,   158,
+      80,    68,  1094,   127,   827,   473,   885,   871,   471,   784,
+       9,   910,   124,  1118,   730,   670,   200,   201,   202,   229,
+     112,   286,   872,   242,   671,    87,   112,   911,   527,   984,
+     593,   472,   749,   -95,   -95,   122,   528,   285,   491,  1116,
+     243,   495,   541,   285,   485,   691,   491,   491,   471,   285,
+     229,   529,   136,   473,   912,   542,   281,   543,   692,   137,
+     608,   230,    74,    75,   278,    76,    17,   599,   841,    80,
+     844,   472,   296,   231,   480,   480,   534,   483,   483,   158,
+     200,   201,   202,   203,   484,   841,    74,    75,   229,    76,
+     347,   348,   278,   473,   631,   544,   632,   565,   566,    77,
+      74,    75,   746,    76,   205,   206,   207,   229,   146,   593,
+     859,   545,   533,   485,  1001,   747,    73,   720,   490,   183,
+     924,  1127,   490,    55,  1048,   721,   297,   494,    56,  1002,
+      55,    57,   286,   152,   285,    56,   496,  1066,   286,  1049,
+     722,   627,    74,    75,   286,    76,   205,   206,   207,   489,
+    1067,   278,    58,   489,   278,   154,   298,  1078,   493,    58,
+      55,   155,   285,   278,    53,    56,    74,    75,  1078,    76,
+     278,   628,  1105,   281,   169,   986,   748,   707,   629,   281,
+     284,    74,    75,  1106,    76,   205,   206,   207,   527,   125,
+     920,   171,   183,  1087,   282,   613,   528,   630,   613,  1028,
+     894,   895,    77,    74,    75,  1141,    76,   299,   300,    77,
+     158,   723,    74,    75,   174,    76,   205,   206,   207,   491,
+    1147,   285,   861,   491,   285,   660,   909,   687,   495,   286,
+     659,  -485,    77,   285,   222,  1148,   982,   983,   661,   778,
+     285,   190,   224,   662,   527,   694,   660,   687,   225,   739,
+      74,    75,   528,    76,   205,   206,   207,   286,   226,   661,
+     134,   278,   573,   278,   662,   727,   663,  1109,   910,    74,
+      75,   204,    76,   205,   206,   207,   240,    77,   278,   312,
+      77,    77,    77,    77,   911,   284,   315,   663,   707,   353,
+     738,    67,   281,   386,   387,    68,   664,    74,    75,   282,
+      76,   316,   278,   333,  1101,   519,   500,   501,   794,   795,
+     334,   912,   740,   741,    77,   574,   286,   664,   575,   286,
+     673,   198,   937,   496,   673,   354,   317,   758,   286,  1075,
+     318,   285,   471,   285,   319,   286,   200,   201,   202,   203,
+     376,   576,    74,    75,   204,    76,   321,   322,   285,   278,
+     278,   324,   577,   371,   281,   472,   372,   578,   687,   378,
+     383,   110,   278,   281,   381,  1110,   829,  1093,   579,   389,
+     281,   390,   285,   205,   206,   207,   884,   473,   631,   814,
+     632,  1032,   870,   111,  1033,   613,   613,  1034,    10,    94,
+     397,  1035,    77,   400,    77,   401,   284,   403,   406,    80,
+      95,   422,   284,   441,    77,   825,    96,   828,   284,    55,
+     282,   333,   446,  1108,    56,   447,   282,   124,   334,   285,
+     285,    97,   282,   454,   468,   112,   286,   466,   286,   513,
+      16,   515,   285,   866,   507,   531,   245,    18,   125,   246,
+     559,   283,   247,   286,   560,   248,   687,   206,   207,   251,
+     508,   471,   278,   340,   341,   510,   342,   561,   570,   343,
+     344,   281,   346,   281,   884,   571,   572,   286,   347,   348,
+     587,   727,   727,  1016,   472,    77,    74,    75,   281,    76,
+     611,   278,    77,  1026,   589,    77,   596,   614,   899,   183,
+     654,    74,    75,   284,    76,   904,   473,   631,    98,   632,
+     618,   655,   281,  1084,   590,   206,   207,   282,   658,   278,
+     205,   206,   207,  1022,   286,   286,  -496,   994,   656,   678,
+     697,   284,   285,   693,  -496,   699,   943,   286,   711,   728,
+     716,   729,  1027,   730,   687,   282,  1036,   251,   190,   731,
+     732,   733,  1037,   734,  -173,  -173,   283,   814,   814,   737,
+    1042,   285,   752,    77,    77,   736,    77,   753,   995,   754,
+     761,   755,   281,   879,   756,   767,   471,   991,    77,   993,
+     187,    77,   765,   774,   783,   633,   713,   712,   800,   285,
+     284,   189,   633,   284,   815,   801,   817,   880,   820,   472,
+     821,   943,   284,   822,   282,   833,   831,   282,   826,   284,
+    1008,   834,   845,   849,    74,    75,   282,    76,   191,   192,
+     847,   473,   631,   282,   632,   855,   621,   286,   198,   937,
+     857,   944,   860,   867,   889,   873,  1022,   892,   902,  1022,
+    1085,   903,   172,   200,   201,   202,   203,   901,   905,    74,
+      75,   204,    76,    77,   916,    77,   286,   917,   919,   920,
+     923,   936,   281,   633,   633,   633,   633,   283,  1061,   278,
+      77,  1103,   945,   283,   992,   980,   999,   998,  1000,   283,
+    1014,   278,  1018,  1040,   286,  1043,  1019,  1041,  1039,   158,
+    1046,   281,  1047,  1050,  1055,  1056,   944,   278,   199,  -173,
+     284,  1057,   284,   748,  1062,    74,    75,  1063,    76,   205,
+     206,   207,  1128,  1129,   282,  1069,   282,   284,  1070,   281,
+    -496,  -496,    77,  -496,  1078,  1073,  -496,   344,  1089,   346,
+    1095,   282,  1092,    77,  1107,   347,   348,  1100,   471,   285,
+    1112,   284,  1117,   621,  1121,  1119,  1098,  1120,   813,  1125,
+    1131,   285,  1132,   462,  1138,   282,  1146,   457,  1142,    77,
+      77,   472,   811,   893,   283,   464,   896,   285,   897,   548,
+     200,   201,   202,   203,    77,   702,    74,    75,   946,    76,
+    1029,   792,   947,   473,   631,   799,   632,   633,   284,   284,
+    1025,   797,   283,   775,   698,   769,   627,   854,   850,  1086,
+     362,   284,   282,   282,   688,   805,   158,    99,   128,   119,
+     113,   180,   244,   479,   369,   282,   484,   377,  1013,   848,
+     229,  1149,   657,   907,  1122,  -254,   628,   989,  1068,  -254,
+    1123,  1099,   634,   629,   286,  1124,  1059,  1065,  -254,   634,
+     558,  1137,   890,   891,   757,   485,   286,   557,   667,     0,
+       0,   283,   630,     0,   283,   471,     0,     0,     0,     0,
+       0,     0,   286,   283,     0,     0,     0,     0,   633,   281,
+     283,   806,     0,   807,   214,     0,     0,     0,   472,     0,
+       0,   281,  -254,     0,     0,  -254,     0,   200,   201,   202,
+     203,   284,     0,    74,    75,   942,    76,   281,     0,     0,
+     473,   631,     0,   632,     0,   282,     0,     0,  -254,   940,
+     634,   634,   634,   634,     0,     0,   813,   813,   190,  -254,
+     284,     0,   308,   311,  -254,   313,   314,     0,     0,     0,
+     811,   811,     0,     0,   282,  -254,   633,   323,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   284,   808,
+     332,   633,     0,     0,   633,     0,     0,     0,   158,     0,
+     942,   283,   282,   283,     0,     0,     0,     0,     0,     0,
+       0,   360,     0,     0,   940,     0,     0,     0,   283,     0,
+     368,     0,    74,    75,   836,    76,   205,   206,   207,     0,
+       0,     0,     0,     0,     0,     0,     0,   837,   198,     0,
+       0,     0,   283,     0,     0,     0,     0,   471,     0,   812,
+       0,     0,     0,   200,   201,   202,   203,     0,     0,    74,
+      75,     0,    76,   809,     0,     0,   633,     0,     0,     0,
+     472,     0,     0,     0,   634,     0,     0,     0,     0,   200,
+     201,   202,   203,   633,     0,    74,    75,   158,    76,   283,
+     283,     0,   473,   631,     0,   632,     0,     0,   414,   415,
+     416,     0,   283,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   423,     0,     0,     0,     0,     0,   429,   430,
+     431,   432,   433,   434,   435,   436,   437,   438,   439,   440,
+       0,     0,     0,   229,     0,   633,   471,     0,   284,     0,
+     449,     0,     0,     0,   265,   266,     0,   267,   455,   268,
+     284,     0,   282,     0,     0,   634,     0,     0,     0,   472,
+       0,     0,     0,     0,   282,     0,   284,     0,   200,   201,
+     202,   203,   633,   633,    74,    75,     0,    76,     0,     0,
+     282,   473,   631,     0,   632,     0,     0,   633,     0,     0,
+     804,     0,   283,     0,   190,   181,   941,     0,   269,     0,
+       0,     0,     0,   600,     0,   182,   183,     0,   184,     0,
+     185,     0,     0,     0,     0,     0,   193,   812,   812,     0,
+       0,   283,     0,   634,   532,   270,     0,   186,     0,     0,
+       0,   187,     0,     0,     0,   539,     0,   540,   634,   188,
+       0,   634,   189,   337,     0,     0,   703,   704,     0,   283,
+     339,   340,   341,     0,   342,   190,     0,   343,   344,   345,
+     346,   941,     0,     0,     0,     0,   347,   348,     0,   191,
+     192,     0,   187,     0,   198,     0,     0,   193,     0,     0,
+     194,   195,     0,   189,     0,     0,     0,   196,     0,   200,
+     201,   202,   203,     0,     0,    74,    75,   204,    76,   205,
+     206,   207,     0,     0,   602,   681,     0,     0,     0,   606,
+     191,   192,     0,   634,   350,     0,   197,     0,     0,     0,
+       0,     0,   351,     0,     0,     0,     0,     0,     0,     0,
+     634,   187,     0,     0,     0,   198,     0,     0,     0,     0,
+       0,     0,   189,     0,     0,     0,     0,     0,     0,   199,
+     200,   201,   202,   203,   682,     0,    74,    75,   204,    76,
+     205,   206,   207,     0,     0,     0,     0,     0,     0,   191,
+     192,     0,     0,  1051,     0,     0,   710,     0,   181,     0,
+       0,     0,   634,     0,     0,     0,  1052,   683,   182,   183,
+     199,   184,     0,   185,     0,     0,     0,    74,    75,   283,
+      76,   205,   206,   207,     0,     0,     0,     0,     0,     0,
+     186,   283,     0,     0,   187,     0,     0,     0,     0,   634,
+     634,     0,   188,     0,   605,   189,     0,   283,     0,   181,
+       0,     0,     0,     0,   634,     0,     0,     0,   190,   182,
+     183,     0,   184,     0,   185,     0,     0,     0,     0,   199,
+       0,     0,   191,   192,     0,     0,    74,    75,     0,    76,
+     193,   186,   773,   194,   195,   187,   229,     0,     0,     0,
+     196,   695,     0,   188,     0,     0,   189,   265,   266,     0,
+     267,     0,   268,     0,   790,   791,     0,     0,     0,   190,
+       0,     0,   851,     0,     0,     0,   229,     0,     0,   197,
+       0,   852,   602,   191,   192,     0,     0,   265,   266,     0,
+     267,   193,   268,     0,   194,   195,     0,   853,   198,     0,
+       0,   196,     0,     0,     0,     0,     0,   190,     0,     0,
+       0,     0,   199,   200,   201,   202,   203,     0,     0,    74,
+      75,   204,    76,   205,   206,   207,     0,   674,     0,   193,
+     197,   229,     0,   879,     0,     0,     0,   190,   270,     0,
+     187,     0,   265,   266,     0,   267,     0,   268,     0,   198,
+       0,   189,     0,     0,     0,     0,     0,   880,     0,     0,
+       0,     0,     0,   199,   200,   201,   202,   203,   270,     0,
+      74,    75,   204,    76,   205,   206,   207,     0,   191,   192,
+       0,     0,     0,     0,     0,     0,     0,   198,     0,     0,
+       0,     0,   190,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   200,   201,   202,   203,     0,     0,    74,    75,
+     204,    76,   502,   206,   207,     0,     0,   198,     0,     0,
+     339,   340,   341,   270,   342,     0,     0,   343,   344,   345,
+     346,     0,   200,   201,   202,   203,   347,   348,    74,    75,
+     204,    76,   205,   206,   207,   229,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   265,   266,   199,   267,
+       0,   268,     0,     0,   229,    74,    75,     0,    76,   205,
+     206,   207,   198,     0,     0,   265,   266,     0,   267,     0,
+     268,     0,     0,     0,   350,     0,     0,   200,   201,   202,
+     203,     0,   351,    74,    75,   204,    76,   205,   206,   207,
+     229,     0,     0,     0,     0,     0,   190,     0,     0,  1030,
+    1031,   265,   266,     0,   267,     0,   268,     0,     0,   563,
+       0,  1038,     0,     0,     0,   190,     0,     0,   193,     0,
+    1044,  1045,   229,     0,     0,     0,     0,   270,     0,     0,
+       0,     0,  1054,   265,   266,     0,   267,   193,   268,     0,
+       0,     0,     0,     0,     0,     0,   270,     0,     0,    87,
+       0,   190,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  -496,   340,   341,     0,   342,     0,     0,   343,   344,
+    -496,   346,     0,   229,     0,     0,   198,   347,   348,     0,
+       0,     0,   270,   190,   265,   266,     0,   267,     0,   268,
+       0,   200,   201,   202,   203,   198,     0,    74,    75,   204,
+      76,   502,   206,   207,     0,   193,     0,     0,     0,     0,
+     200,   201,   202,   203,   270,     0,    74,    75,   204,    76,
+     502,   206,   207,     0,     0,   350,     0,     0,     0,     0,
+       0,   198,     0,   351,   190,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   200,   201,   202,   203,
+       0,     0,    74,    75,   204,    76,   205,   206,   207,     0,
+       0,     0,     0,   198,     0,   270,     0,     0,     0,     0,
+       0,   621,     0,     0,     0,     0,     0,   622,   200,   201,
+     202,   203,     0,     0,    74,    75,   204,    76,   205,   206,
+     207,   623,     0,     0,     0,     0,     0,     0,     0,     0,
+     624,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   181,     0,   198,   625,     0,   626,     0,     0,
+       0,     0,   182,   183,   627,   184,     0,   185,     0,   200,
+     201,   202,   203,     0,   158,    74,    75,   204,    76,   205,
+     206,   207,   309,     0,   186,     0,     0,     0,   187,     0,
+       0,     0,     0,     0,   628,     0,   188,     0,     0,   189,
+       0,   629,     0,   181,     0,     0,     0,     0,     0,     0,
+       0,     0,   190,   182,   183,     0,   184,     0,   185,     0,
+     630,     0,     0,   471,     0,   330,   191,   192,     0,     0,
+       0,     0,     0,     0,   193,   186,     0,   194,   195,   187,
+       0,     0,     0,     0,   196,     0,   472,   188,     0,     0,
+     189,     0,     0,     0,     0,   200,   201,   202,   203,   331,
+       0,    74,    75,   190,    76,    87,     0,     0,   473,   631,
+       0,   632,     0,   197,     0,     0,     0,   191,   192,     0,
+       0,     0,     0,     0,     0,   193,     0,     0,   194,   195,
+       0,     0,   198,     0,     0,   196,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   199,   200,   201,   202,
+     203,     0,     0,    74,    75,   204,    76,   205,   206,   207,
+       0,     0,     0,     0,   197,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     263,   277,     0,   264,     0,   402,   276,   265,   266,   267,
-       0,   268,     0,     0,   269,   270,   271,   272,     0,   277,
-       0,     0,     0,   273,   274,     0,   263,   436,   275,   264,
-       0,     0,     0,   265,   266,   267,     0,   268,     0,     0,
-     269,   270,   271,   272,     0,     0,     0,     0,     0,   273,
-     274,     0,   263,     0,   275,   264,     0,     0,     0,   265,
-     266,   267,     0,   268,   276,     0,   269,   270,   271,   272,
-       0,     0,   442,     0,     0,   273,   274,   277,   263,     0,
-     275,   264,     0,     0,     0,   265,   266,   267,     0,   268,
-     276,     0,   269,   270,   271,   272,     0,     0,   444,     0,
-       0,   273,   274,   277,   263,     0,   275,   264,     0,     0,
-       0,   265,   266,   267,     0,   268,   276,     0,   269,   270,
-     271,   272,     0,     0,   445,     0,     0,   273,   274,   277,
-     263,     0,   275,   264,     0,     0,     0,   265,   266,   267,
-       0,   268,   276,     0,   269,   270,   271,   272,     0,     0,
-     446,     0,     0,   273,   274,   277,   263,     0,   275,   264,
-       0,     0,     0,   265,   266,   267,     0,   268,   276,     0,
-     269,   270,   271,   272,     0,     0,   448,     0,     0,   273,
-     274,   277,   263,     0,   275,   264,     0,     0,     0,   265,
-     266,   267,     0,   268,   276,     0,   269,   270,   271,   272,
-       0,     0,   449,     0,     0,   273,   274,   277,   263,     0,
-     275,   264,     0,   450,     0,   265,   266,   267,     0,   268,
-     276,     0,   269,   270,   271,   272,     0,     0,     0,     0,
-       0,   273,   274,   277,   263,     0,   275,   264,     0,   451,
-       0,   265,   266,   267,     0,   268,   276,     0,   269,   270,
-     271,   272,     0,     0,     0,     0,     0,   273,   274,   277,
-     263,     0,   275,   264,     0,   452,     0,   265,   266,   267,
-       0,   268,   276,     0,   269,   270,   271,   272,     0,     0,
-       0,     0,     0,   273,   274,   277,   263,     0,   275,   264,
-       0,     0,     0,   265,   266,   267,     0,   268,   276,     0,
-     269,   270,   271,   272,     0,     0,   453,     0,     0,   273,
-     274,   277,   263,     0,   275,   264,     0,     0,     0,   265,
-     266,   267,     0,   268,   276,     0,   269,   270,   271,   272,
-       0,     0,   454,     0,     0,   273,   274,   277,   263,     0,
-     275,   264,     0,     0,     0,   265,   266,   267,     0,   268,
-     276,     0,   269,   270,   271,   272,     0,     0,   534,     0,
-       0,   273,   274,   277,   263,     0,   275,   264,     0,     0,
-       0,   265,   266,   267,     0,   268,   276,     0,   269,   270,
-     271,   272,     0,     0,   535,     0,     0,   273,   274,   277,
-     263,     0,   275,   264,     0,     0,     0,   265,   266,   267,
-       0,   268,   276,     0,   269,   270,   271,   272,     0,     0,
-     599,     0,     0,   273,   274,   277,   263,     0,   275,   264,
-       0,     0,     0,   265,   266,   267,     0,   268,   276,     0,
-     269,   270,   271,   272,     0,     0,   602,     0,     0,   273,
-     274,   277,   263,     0,   275,   264,     0,     0,     0,   265,
-     266,   267,     0,   268,   276,     0,   269,   270,   271,   272,
-       0,     0,   718,     0,     0,   273,   274,   277,   263,     0,
-     275,   264,     0,     0,     0,   265,   266,   267,     0,   268,
-     276,     0,   269,   270,   271,   272,     0,     0,   763,     0,
-       0,   273,   274,   277,   263,     0,   275,   264,     0,     0,
-       0,   265,   266,   267,     0,   268,   276,     0,   269,   270,
-     271,   272,     0,     0,   819,     0,     0,   273,   274,   277,
-     263,     0,   275,   264,     0,     0,     0,   265,   266,   267,
-       0,   268,   276,     0,   269,   270,   271,   272,     0,     0,
-       0,   820,     0,   273,   274,   277,   263,     0,   275,   264,
-       0,     0,     0,   265,   266,   267,     0,   268,   276,     0,
-     269,   270,   271,   272,     0,     0,   975,     0,     0,   273,
-     274,   277,   263,     0,   275,   264,     0,     0,     0,   265,
-     266,   267,     0,   268,   276,     0,   269,   270,   271,   272,
-       0,     0,     0,   976,     0,   273,   274,   277,   263,     0,
-     275,   264,     0,     0,     0,   265,   266,   267,     0,   268,
-     276,     0,   269,   270,   271,   272,     0,     0,     0,     0,
-       0,   273,   274,   277,   872,     0,   275,   873,     0,     0,
-       0,     0,     0,     0,     0,     0,   276,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   277,
-       0,     0,     0,     0,     0,   874,     0,     0,     0,     0,
-       0,     0,   276,     0,     0,     0,   875,   876,   877,   878,
-     879,     0,   880,   881,     0,   277,     0,     0,     0,     0,
-       0,     0,     0,   882,   883,   884,   885,   886,   887,   888,
-     889,   890,   891,   892,   893,   894,   895,   896,   897
+       0,     0,     0,   198,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   199,   200,   201,
+     202,   203,     0,   181,    74,    75,   204,    76,   205,   206,
+     207,   600,     0,   182,   183,     0,   184,     0,   185,     0,
+       0,   601,     0,   181,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   182,   183,   186,   184,     0,   185,   187,
+       0,     0,     0,     0,     0,   364,     0,   188,     0,     0,
+     189,     0,     0,     0,     8,   186,     9,     0,     0,   187,
+       0,     0,     0,   190,     0,     0,     0,   188,    10,    11,
+     189,    12,     0,     0,     0,     0,     0,   191,   192,     0,
+      13,     0,     0,   190,     0,   193,    14,     0,   194,   195,
+       0,     0,     0,     0,     0,   196,     0,   191,   192,     0,
+       0,    15,     0,     0,     0,   193,     0,     0,   194,   195,
+      16,     0,    17,     0,     0,   196,     0,    18,    19,     0,
+       0,     0,     0,     0,   197,   337,     0,     0,   338,     0,
+       0,     0,   339,   340,   341,     0,   342,     0,     0,   343,
+     344,   345,   346,   198,   197,   412,     0,     0,   347,   348,
+       0,     0,     0,     0,     0,   349,     0,   199,   200,   201,
+     202,   203,     0,   198,    74,    75,   204,    76,   205,   206,
+     207,     0,     0,     0,     0,     0,     0,   199,   200,   201,
+     202,   203,   181,     0,    74,    75,   204,    76,   205,   206,
+     207,     0,   182,   183,     0,   184,   350,   185,     0,     0,
+     418,     0,   181,     0,   351,     0,     0,     0,     0,     0,
+       0,     0,   182,   183,   186,   184,     0,   185,   187,     0,
+       0,     0,     0,     0,     0,     0,   188,     0,     0,   189,
+       0,     0,     0,     0,   186,     0,     0,     0,   187,     0,
+       0,     0,   190,     0,     0,     0,   188,     0,     0,   189,
+       0,     0,     0,     0,     0,     0,   191,   192,     0,     0,
+       0,     0,   190,     0,   193,     0,     0,   194,   195,     0,
+       0,   621,     0,     0,   196,     0,   191,   192,     0,     0,
+       0,     0,     0,     0,   193,     0,     0,   194,   195,     0,
+       0,   623,     0,  -262,   196,     0,     0,  -262,     0,   621,
+     624,     0,     0,   197,     0,  1003,  -262,     0,  -262,  -262,
+       0,     0,     0,     0,     0,   625,     0,   626,     0,     0,
+       0,     0,   198,   197,   627,     0,     0,     0,   624,     0,
+       0,     0,     0,     0,   158,     0,   199,   200,   201,   202,
+     203,     0,   198,    74,    75,   204,    76,   205,   206,   207,
+    -262,     0,   627,  -262,   628,     0,   199,   200,   201,   202,
+     203,   629,   158,    74,    75,   204,    76,   205,   206,   207,
+     621,     0,     0,     0,     0,  -261,  -262,     0,     0,  -261,
+     630,     0,   628,   471,     0,     0,     0,  -262,  -261,   629,
+    -261,  -261,  -262,     0,     0,     0,     0,     0,     0,   624,
+       0,     0,     0,  -262,     0,     0,   472,     0,   630,     0,
+       0,   471,     0,     0,     0,   200,   201,   202,   203,     0,
+       0,    74,    75,   627,    76,     0,     0,     0,   473,   631,
+       0,   632,  -261,   158,   472,  -261,     0,     0,     0,     0,
+       0,     0,     0,   200,   201,   202,   203,     0,     0,    74,
+      75,     0,    76,   628,     0,     0,   473,   631,  -261,   632,
+     629,     0,     0,     0,     0,     0,     0,     0,     0,  -261,
+       0,     0,     0,     0,  -261,     0,     0,     0,     0,   630,
+     337,     0,   471,   338,     0,  -261,     0,   339,   340,   341,
+       0,   342,     0,     0,   343,   344,   345,   346,     0,     0,
+     424,     0,     0,   347,   348,   472,     0,     0,     0,     0,
+     349,     0,     0,     0,   200,   201,   202,   203,     0,     0,
+      74,    75,     0,    76,     0,     0,   337,   473,   631,   338,
+     632,     0,     0,   339,   340,   341,     0,   342,     0,     0,
+     343,   344,   345,   346,     0,     0,   450,     0,     0,   347,
+     348,   350,     0,     0,     0,   337,   349,     0,   338,   351,
+     456,     0,   339,   340,   341,     0,   342,     0,     0,   343,
+     344,   345,   346,     0,     0,     0,     0,     0,   347,   348,
+       0,     0,     0,     0,   337,   349,     0,   338,     0,     0,
+       0,   339,   340,   341,     0,   342,     0,   350,   343,   344,
+     345,   346,     0,     0,   520,   351,     0,   347,   348,     0,
+       0,     0,     0,   337,   349,     0,   338,     0,     0,     0,
+     339,   340,   341,     0,   342,     0,   350,   343,   344,   345,
+     346,     0,     0,   521,   351,     0,   347,   348,     0,     0,
+       0,     0,   337,   349,     0,   338,     0,     0,     0,   339,
+     340,   341,     0,   342,     0,   350,   343,   344,   345,   346,
+       0,     0,   522,   351,     0,   347,   348,     0,     0,     0,
+       0,   337,   349,     0,   338,     0,     0,     0,   339,   340,
+     341,     0,   342,     0,   350,   343,   344,   345,   346,     0,
+       0,   530,   351,     0,   347,   348,     0,     0,     0,     0,
+       0,   349,     0,   337,   536,     0,   338,     0,     0,     0,
+     339,   340,   341,   350,   342,     0,     0,   343,   344,   345,
+     346,   351,     0,     0,     0,     0,   347,   348,     0,   337,
+       0,     0,   338,   349,     0,     0,   339,   340,   341,     0,
+     342,     0,   350,   343,   344,   345,   346,     0,     0,   858,
+     351,     0,   347,   348,     0,   337,     0,     0,   338,   349,
+       0,     0,   339,   340,   341,     0,   342,     0,     0,   343,
+     344,   345,   346,     0,   350,   877,     0,     0,   347,   348,
+     337,     0,   351,   338,     0,   349,     0,   339,   340,   341,
+       0,   342,     0,     0,   343,   344,   345,   346,     0,     0,
+     350,   878,     0,   347,   348,     0,     0,     0,   351,     0,
+     349,     0,     0,   337,     0,     0,   338,     0,     0,     0,
+     339,   340,   341,     0,   342,     0,   350,   343,   344,   345,
+     346,     0,     0,  1080,   351,     0,   347,   348,     0,   337,
+       0,     0,   338,   349,     0,     0,   339,   340,   341,     0,
+     342,   350,     0,   343,   344,   345,   346,     0,     0,   351,
+    1081,     0,   347,   348,   337,   951,     0,   338,   952,   349,
+       0,   339,   340,   341,     0,   342,     0,     0,   343,   344,
+     345,   346,     0,     0,   350,     0,     0,   347,   348,     0,
+       0,     0,   351,   953,   349,     0,     0,     0,     0,     0,
+       0,     0,     0,   954,   955,   956,   957,   958,   959,   960,
+     350,     0,     0,     0,     0,     0,     0,     0,   351,   961,
+       0,   962,   963,   964,   965,   966,   967,   968,   969,   970,
+     971,   972,   973,   974,   975,   350,   976,     0,     0,     0,
+       0,     0,     0,   351
 };
 
 static const yytype_int16 yycheck[] =
 {
-      18,   342,   455,   286,   357,   192,    64,    18,    55,   472,
-      15,   212,    70,   472,   643,   230,   211,   218,   114,   424,
-     624,   713,   424,    69,     5,    58,   680,     1,    16,   419,
-     211,   609,   610,   611,   612,     1,     1,   845,   211,     1,
-      10,   137,    69,   831,    24,   305,    32,    16,    17,    50,
-       5,    69,     9,   794,    22,     9,    24,     8,   399,   150,
-     848,    29,   424,   717,   111,    82,   720,    68,   955,    14,
-      14,    14,   903,    14,   905,     0,   109,   124,    86,   125,
-     113,   433,    99,   119,   102,   437,    73,    92,   106,   107,
-     108,   102,    67,    16,   435,   106,   107,   108,   125,   728,
-      75,    14,   135,   105,   991,   138,   511,   125,   762,   511,
-      24,   150,     9,   121,   504,   856,    60,   213,    61,    63,
-      61,   155,   156,   145,   305,    28,   957,    24,    17,   592,
-      16,   189,   305,   229,   712,    24,    50,   338,   160,   173,
-     187,    28,    68,   835,   101,    89,    49,   101,    61,   511,
-      93,    94,   412,    41,    68,    41,   100,    36,   850,   145,
-     789,   105,   163,   121,   139,   211,   184,   955,   226,    92,
-      59,    50,   160,   184,   118,   149,   163,   164,   530,   166,
-     150,    66,   990,   163,   589,   203,   141,   589,   157,   285,
-     580,   581,     5,   211,  1002,   241,  1027,   163,   164,   232,
-     166,   166,   164,   991,    17,   146,   224,   225,   226,   227,
-     191,   162,    41,   224,   225,   226,   227,   404,   478,   121,
-     572,   684,   167,   168,   169,   170,   171,   172,   415,   155,
-     156,   412,    47,   146,   429,    46,    63,    47,   439,   412,
-     258,    73,    14,   424,    55,    14,    61,   173,   429,   163,
-     533,   424,     1,   142,   143,    61,   429,   598,    68,   305,
-     163,   164,    72,   166,   654,    14,   284,   959,   157,   158,
-     159,   160,   123,   284,   163,   164,   165,   166,   668,     9,
-     167,   168,   169,   170,   171,   172,   150,   305,   293,    61,
-      14,   754,   473,     1,    24,   754,   107,   478,     9,   903,
-     929,     9,   994,   490,   485,   478,   155,   156,   568,   356,
-       9,   160,   485,    24,    68,  1018,    24,    57,    72,     1,
-    1023,    93,    94,    10,   173,    24,   904,  1019,   543,    73,
-     511,   163,   164,   351,   166,    17,    23,    61,   511,    83,
-     351,   995,   920,   748,   749,   974,   748,   749,    30,   163,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-     823,   105,   102,   716,   823,   461,   412,    24,   549,    93,
-      94,   104,    42,    43,   146,   119,   549,    37,   424,   425,
-     120,    51,    41,   429,   430,   431,    56,   568,    42,    43,
-      40,    73,    52,   440,   412,   568,   946,    51,   425,   949,
-      57,    71,    56,   430,   431,   145,   424,   425,   589,    63,
-       1,   429,   430,   431,    84,    24,   589,    71,     9,     9,
-      90,    73,   146,     9,    41,    73,   160,   473,    37,    25,
-      84,    83,   478,    24,    24,    83,    90,    73,    24,   485,
-      51,   642,   460,    52,    31,   102,   473,    16,   108,   460,
-      16,    22,    63,   105,   472,   473,    43,   105,    29,   477,
-     478,    16,   643,   120,    63,   511,   477,   485,     9,    56,
-     643,     9,     9,   155,   156,   157,   158,   159,   160,    63,
-     150,   163,   164,    24,   166,    63,    24,    24,   145,    73,
-      16,   173,   174,   511,   176,    73,   150,    96,    85,   108,
-     953,    16,   101,   549,   103,     1,    22,    16,    24,     5,
-       1,    24,    16,    29,    10,   173,   563,   175,     9,   155,
-     156,   105,   568,    10,    37,   124,   544,   163,   164,    25,
-     166,   549,    16,    24,    30,    48,    23,   173,   174,    52,
-     176,   587,    37,   589,   590,   591,   592,   728,    16,   607,
-     568,   732,    16,    48,    16,   728,    16,    52,    16,   732,
-     587,    16,     1,   590,   591,   583,    79,   748,   749,   587,
-     853,   589,   590,   591,   592,   748,   749,    97,    17,   163,
-     164,    16,   166,    16,    79,   163,   164,   928,   166,   607,
-      63,   609,   610,   611,   612,   108,   607,   643,   160,    51,
-      73,   163,   587,   608,   166,   590,   591,   794,   789,    91,
-      83,   173,    61,   108,   167,   168,   789,   650,   163,   164,
-     801,   166,   155,   156,    14,   643,   644,   160,   801,    38,
-      12,    13,   105,    15,    73,    91,    18,    19,   684,    21,
-     173,   174,   160,   176,   702,    27,    28,   145,   666,   167,
-     168,   169,   170,   171,   172,   666,    27,    28,   691,   692,
-     167,   168,   169,   170,   171,   172,   684,   163,   164,   856,
-     166,   167,   168,   169,   170,   171,   172,   155,   156,    25,
-      26,    16,   728,   701,   702,    16,    68,   157,   158,   159,
-     701,   702,   430,   431,   712,   173,   174,     1,   176,    81,
-     123,     5,   748,   749,    24,    24,    10,     9,   754,     9,
-     728,    91,   166,   101,   732,    62,   155,   156,   157,   158,
-     159,   160,    16,    24,   163,   164,    30,   166,    23,    10,
-     748,   749,    64,    16,   173,   174,   754,   176,    97,    23,
-     787,    71,    10,   789,   211,    16,   175,   793,   929,    31,
-     797,   769,    34,   101,   772,    40,   929,    65,   769,    86,
-      42,    43,    44,   144,    23,    16,   799,    24,     5,    51,
-       9,   789,    54,    16,    56,    24,    26,   823,    26,    16,
-     102,    12,    13,   801,    15,   161,    32,    18,    19,    71,
-      21,    28,    32,   974,    58,    14,    27,    28,   108,    40,
-      25,   974,    84,    85,   101,   823,    16,   173,    90,   173,
-      77,    23,    14,   831,   832,    16,    16,   835,   211,   160,
-      93,   832,     9,    26,    99,    16,    82,   845,   874,    24,
-     848,    23,    16,    14,   880,   117,   145,   163,   305,   144,
-      23,    95,   888,   167,   168,   169,   170,   171,   172,   116,
-      86,   121,    48,   320,   321,    25,    24,    26,     9,   163,
-     164,    14,   166,   167,   168,   169,   170,   171,   172,   160,
-     163,   157,    57,   140,   141,   173,   143,   144,   155,   121,
-       9,   160,    16,   929,    16,   931,   904,   101,   906,    16,
-      16,   157,   157,   160,    16,   906,     9,    79,   156,    32,
-     946,    24,   920,   949,   950,   172,     5,    14,   160,    23,
-     157,   929,   305,   160,    23,    32,   163,    16,    83,   166,
-      24,   188,   169,   170,   171,   172,   163,   164,   974,   166,
-     167,   168,   169,   170,   171,   172,    32,   955,    97,    16,
-       1,   101,   146,    16,     5,   412,   173,   160,   966,   216,
-     490,   404,   734,   801,   823,   966,   974,   424,   684,   694,
-     553,   693,   429,  1009,  1010,   795,   485,   748,   951,    30,
-     749,   125,   990,   991,   556,   242,    27,   244,   245,   246,
-      71,   248,   249,   250,  1002,    66,    19,   254,   255,   256,
-      76,   739,   191,   420,   261,   669,   263,   264,   265,   266,
-     267,   268,   269,   270,   271,   272,   273,   274,   786,   746,
-     317,   478,  1035,   583,   772,   831,   920,  1006,   485,   412,
-    1002,  1005,   968,   290,   904,  1019,   316,   654,   494,   580,
-     914,   424,   493,    -1,    -1,    -1,   429,    -1,    -1,    -1,
-      -1,     1,    -1,    -1,   511,     5,    17,    -1,    -1,    -1,
-      10,    -1,    -1,    -1,    -1,    -1,    16,    17,    -1,    19,
-      -1,    21,    -1,    -1,   163,   164,    26,   166,   167,   168,
-     169,   170,   171,   172,    -1,    -1,    -1,   544,    -1,    -1,
-      -1,    -1,   549,    17,    -1,   478,    -1,    -1,    59,    -1,
-      -1,    -1,   485,    -1,   361,    -1,    30,    -1,   365,    59,
-      -1,   568,   163,   164,    -1,   166,   167,   168,   169,   170,
-     171,   172,    -1,    -1,    -1,    -1,   583,    -1,   511,    -1,
-      -1,    -1,   589,    -1,   391,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    92,   400,    -1,   402,    -1,    -1,    -1,    73,
-      -1,    -1,   609,   610,   611,   612,    -1,    -1,     5,    -1,
-      -1,   544,    -1,    10,    -1,    -1,   549,    -1,    -1,    16,
-      17,    -1,    19,    -1,    21,    -1,    -1,    -1,    -1,    -1,
-      -1,   142,   143,    -1,    -1,   568,   643,    -1,    -1,    -1,
-      -1,    -1,   142,   450,   451,   452,   157,   158,   159,   160,
-     583,   458,   163,   164,   165,   166,   589,   157,   158,   159,
-     160,    -1,    59,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,    -1,    -1,    -1,   609,   610,   611,   612,
-      -1,   155,   156,   157,   158,   159,   160,    -1,    -1,   163,
-     164,    -1,   166,    -1,    -1,    92,    -1,    -1,    -1,   173,
-     174,    -1,   176,    -1,    -1,   712,    -1,    -1,    -1,    -1,
-     643,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     1,    -1,
-      -1,   728,     5,    -1,    -1,   732,    -1,    10,    -1,    -1,
-      -1,    14,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      23,   748,   749,   550,    -1,   142,    -1,    30,    -1,    -1,
+      17,   227,   154,   396,   531,   411,   363,   448,    82,    54,
+     451,   677,   453,    17,    59,   574,   352,   644,   779,   140,
+      65,   752,   384,   167,   142,   384,   170,    10,    65,   574,
+      71,    14,   176,    16,    18,   627,   628,   629,   630,   168,
+     114,   381,   900,   117,   915,     1,   120,   407,   545,   594,
+       1,    20,     1,    24,    37,   142,   130,     1,    16,    17,
+     918,    24,    16,    10,   273,     8,    14,     5,   989,    34,
+     991,    56,    68,    14,   384,   155,    16,   151,    62,   931,
+     121,   168,  1130,  1059,    75,    84,    70,  1135,   129,    22,
+      52,    14,   109,    23,     9,    90,    29,   171,   115,   116,
+     141,   118,    16,   148,   103,   109,    68,   228,   869,    28,
+      14,   232,   116,    96,   118,   233,   509,   238,   135,   481,
+      68,  1097,   481,    28,   165,   142,    56,   172,   169,   124,
+      44,   135,   358,   149,   175,   361,   802,   477,   129,     9,
+    1061,    24,    39,    55,   273,    68,   233,  1043,   164,    54,
+    1046,   168,     0,   149,    24,   172,   173,   174,    55,   751,
+     705,   152,    16,    75,    68,   926,   151,  1019,   172,   173,
+     174,   481,    55,   109,   905,   535,   193,   537,   571,    30,
+     155,   390,    51,   174,   149,   226,   273,   580,    16,   920,
+     105,   857,    75,    62,    98,   861,   180,   121,   123,    70,
+     171,  1059,   150,   161,   167,   154,   568,   224,   155,   568,
+     164,   167,   168,   182,   170,   153,   233,   168,  1139,   371,
+     224,   561,   562,   166,   164,  1096,   170,   150,    14,   316,
+     171,   172,   173,   307,   793,   732,   733,   254,   124,  1097,
+    1111,   110,   599,    97,    57,   149,   168,    82,   793,   174,
+       1,   176,   171,   172,   173,   167,   273,    70,   124,    24,
+     243,   390,   167,   168,     1,   170,    17,   385,     5,    97,
+     388,   255,    36,    10,   291,   393,   394,   718,    54,    30,
+      68,   168,    68,    47,   167,   302,    32,   291,    25,   410,
+     129,   517,    32,    30,    70,    70,    60,   384,   385,    64,
+     374,   388,   695,   390,    52,    80,   393,   394,    54,   396,
+       5,   328,    98,   152,    54,  1076,   167,   168,   658,   170,
+     171,    16,   881,   663,    70,   164,   719,    75,    44,    80,
+      70,    79,  1063,   370,   109,   174,   881,     9,   129,   699,
+      33,   106,    88,  1104,     9,     1,   161,   162,   163,     5,
+      96,   273,    24,    46,    10,   119,    96,   122,     1,    24,
+     512,   152,   989,   149,   150,    14,     9,   384,   385,  1100,
+      63,   388,     1,   390,    30,     1,   393,   394,   129,   396,
+       5,    24,   125,   174,   149,    14,   273,    16,    14,    73,
+     534,    16,   167,   168,   481,   170,    89,   518,   990,    70,
+    1131,   152,    14,    28,   766,   767,   447,   766,   767,    80,
+     161,   162,   163,   164,     1,  1007,   167,   168,     5,   170,
+      27,    28,   509,   174,   175,    54,   177,    25,    26,   446,
+     167,   168,    10,   170,   171,   172,   173,     5,   155,   591,
+     776,    70,   446,    30,     9,    23,    80,     1,   566,    17,
+     856,  1117,   570,    80,     9,     9,    68,   575,    85,    24,
+      80,    88,   384,   155,   481,    85,   388,    10,   390,    24,
+      24,    70,   167,   168,   396,   170,   171,   172,   173,   566,
+      23,   568,   109,   570,   571,   167,    98,     9,   575,   109,
+      80,   108,   509,   580,   121,    85,   167,   168,     9,   170,
+     587,   100,    24,   390,    78,   898,   105,   594,   107,   396,
+     168,   167,   168,    24,   170,   171,   172,   173,     1,   109,
+       9,    82,    17,  1050,   168,   542,     9,   126,   545,    24,
+     818,   819,   549,   167,   168,    24,   170,   149,   150,   556,
+      80,    24,   167,   168,    44,   170,   171,   172,   173,   566,
+       9,   568,   778,   570,   571,    40,    64,   574,   575,   481,
+      24,   155,   579,   580,   164,    24,   894,   895,    53,   690,
+     587,    66,   101,    58,     1,   579,    40,   594,    43,   624,
+     167,   168,     9,   170,   171,   172,   173,   509,    57,    53,
+      16,   678,    14,   680,    58,   612,    81,    24,   106,   167,
+     168,   169,   170,   171,   172,   173,   144,   624,   695,    25,
+     627,   628,   629,   630,   122,   273,    16,    81,   705,    24,
+     624,    75,   509,   267,   268,    79,   111,   167,   168,   273,
+     170,    16,   719,    22,  1075,    24,   393,   394,   712,   713,
+      29,   149,   625,   626,   661,    67,   568,   111,    70,   571,
+     566,   146,   147,   575,   570,   125,    16,   661,   580,  1016,
+      16,   678,   129,   680,    16,   587,   161,   162,   163,   164,
+      14,    93,   167,   168,   169,   170,    16,    16,   695,   766,
+     767,    16,   104,     9,   571,   152,   170,   109,   705,    69,
+      24,    32,   779,   580,    16,  1088,   741,   164,   120,    23,
+     587,    10,   719,   171,   172,   173,   793,   174,   175,   726,
+     177,   164,   786,    54,   167,   732,   733,   170,    45,    46,
+      96,   174,   739,    96,   741,    14,   384,    41,    71,    70,
+      57,    24,   390,   171,   751,   739,    63,   741,   396,    80,
+     384,    22,   101,    24,    85,    78,   390,    88,    29,   766,
+     767,    78,   396,     9,   105,    96,   678,   176,   680,    43,
+      87,    72,   779,   780,    96,    16,   161,    94,   109,   164,
+      16,   168,   167,   695,    24,   170,   793,   172,   173,   931,
+      96,   129,   869,    12,    13,   105,    15,     9,    26,    18,
+      19,   678,    21,   680,   881,    10,    23,   719,    27,    28,
+      10,   818,   819,   924,   152,   822,   167,   168,   695,   170,
+     171,   898,   829,   934,    16,   832,   106,   171,   822,    17,
+      34,   167,   168,   481,   170,   829,   174,   175,   155,   177,
+      70,    34,   719,   164,   171,   172,   173,   481,   111,   926,
+     171,   172,   173,   930,   766,   767,    75,    80,   165,    14,
+     148,   509,   869,    90,    83,    23,   873,   779,    43,     9,
+     105,    24,   936,     9,   881,   509,   953,  1019,    66,   171,
+      14,    14,   959,    86,    16,    17,   273,   894,   895,    88,
+     967,   898,    16,   900,   901,    25,   903,   165,   905,    34,
+     164,   174,   779,    35,   174,     9,   129,   901,   915,   903,
+      42,   918,    98,    65,    14,   549,   103,    84,    16,   926,
+     568,    53,   556,   571,   171,    24,   171,    59,    16,   152,
+      14,   938,   580,    82,   568,    16,    23,   571,    88,   587,
+       1,    14,   174,    99,   167,   168,   580,   170,    80,    81,
+     148,   174,   175,   587,   177,    23,    17,   869,   146,   147,
+      23,   873,    14,    16,    23,    16,  1043,    23,   149,  1046,
+    1047,    82,    90,   161,   162,   163,   164,   124,    53,   167,
+     168,   169,   170,   990,    25,   992,   898,    26,    24,     9,
+     164,   167,   869,   627,   628,   629,   630,   384,   992,  1076,
+    1007,  1078,    23,   390,   124,    24,    64,   161,   174,   396,
+     129,  1088,    14,   161,   926,    16,   167,   161,   164,    80,
+      16,   898,    16,    16,    23,    23,   938,  1104,   160,   161,
+     678,    23,   680,   105,    16,   167,   168,    81,   170,   171,
+     172,   173,  1119,  1120,   678,     9,   680,   695,    34,   926,
+      12,    13,  1059,    15,     9,   152,    18,    19,    14,    21,
+      23,   695,   164,  1070,    24,    27,    28,    85,   129,  1076,
+      24,   719,    23,    17,    23,    34,  1070,    34,   726,   101,
+      16,  1088,   105,   150,    16,   719,   164,   371,   174,  1096,
+    1097,   152,   726,   816,   481,   376,   820,  1104,   820,   459,
+     161,   162,   163,   164,  1111,   591,   167,   168,   875,   170,
+     938,   705,   881,   174,   175,   715,   177,   751,   766,   767,
+     932,   714,   509,   684,   587,   678,    70,   767,   766,  1048,
+     233,   779,   766,   767,   575,   721,    80,    21,    66,    61,
+      54,   132,   153,   382,   240,   779,     1,   260,   921,   763,
+       5,  1147,   556,   832,  1111,    10,   100,   900,  1007,    14,
+    1114,  1072,   549,   107,  1076,  1115,   990,  1001,    23,   556,
+     467,  1131,   806,   807,   658,    30,  1088,   466,   561,    -1,
+      -1,   568,   126,    -1,   571,   129,    -1,    -1,    -1,    -1,
+      -1,    -1,  1104,   580,    -1,    -1,    -1,    -1,   832,  1076,
+     587,    19,    -1,    21,   133,    -1,    -1,    -1,   152,    -1,
+      -1,  1088,    67,    -1,    -1,    70,    -1,   161,   162,   163,
+     164,   869,    -1,   167,   168,   873,   170,  1104,    -1,    -1,
+     174,   175,    -1,   177,    -1,   869,    -1,    -1,    93,   873,
+     627,   628,   629,   630,    -1,    -1,   894,   895,    66,   104,
+     898,    -1,   181,   182,   109,   184,   185,    -1,    -1,    -1,
+     894,   895,    -1,    -1,   898,   120,   900,   196,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   926,    97,
+     209,   915,    -1,    -1,   918,    -1,    -1,    -1,    80,    -1,
+     938,   678,   926,   680,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   230,    -1,    -1,   938,    -1,    -1,    -1,   695,    -1,
+     239,    -1,   167,   168,    17,   170,   171,   172,   173,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    30,   146,    -1,
+      -1,    -1,   719,    -1,    -1,    -1,    -1,   129,    -1,   726,
+      -1,    -1,    -1,   161,   162,   163,   164,    -1,    -1,   167,
+     168,    -1,   170,   171,    -1,    -1,   990,    -1,    -1,    -1,
+     152,    -1,    -1,    -1,   751,    -1,    -1,    -1,    -1,   161,
+     162,   163,   164,  1007,    -1,   167,   168,    80,   170,   766,
+     767,    -1,   174,   175,    -1,   177,    -1,    -1,   317,   318,
+     319,    -1,   779,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   331,    -1,    -1,    -1,    -1,    -1,   337,   338,
+     339,   340,   341,   342,   343,   344,   345,   346,   347,   348,
+      -1,    -1,    -1,     5,    -1,  1059,   129,    -1,  1076,    -1,
+     359,    -1,    -1,    -1,    16,    17,    -1,    19,   367,    21,
+    1088,    -1,  1076,    -1,    -1,   832,    -1,    -1,    -1,   152,
+      -1,    -1,    -1,    -1,  1088,    -1,  1104,    -1,   161,   162,
+     163,   164,  1096,  1097,   167,   168,    -1,   170,    -1,    -1,
+    1104,   174,   175,    -1,   177,    -1,    -1,  1111,    -1,    -1,
+       1,    -1,   869,    -1,    66,     6,   873,    -1,    70,    -1,
+      -1,    -1,    -1,    14,    -1,    16,    17,    -1,    19,    -1,
+      21,    -1,    -1,    -1,    -1,    -1,    88,   894,   895,    -1,
+      -1,   898,    -1,   900,   443,    97,    -1,    38,    -1,    -1,
+      -1,    42,    -1,    -1,    -1,   454,    -1,   456,   915,    50,
+      -1,   918,    53,     4,    -1,    -1,    16,    17,    -1,   926,
+      11,    12,    13,    -1,    15,    66,    -1,    18,    19,    20,
+      21,   938,    -1,    -1,    -1,    -1,    27,    28,    -1,    80,
+      81,    -1,    42,    -1,   146,    -1,    -1,    88,    -1,    -1,
+      91,    92,    -1,    53,    -1,    -1,    -1,    98,    -1,   161,
+     162,   163,   164,    -1,    -1,   167,   168,   169,   170,   171,
+     172,   173,    -1,    -1,   523,    16,    -1,    -1,    -1,   528,
+      80,    81,    -1,   990,    75,    -1,   127,    -1,    -1,    -1,
+      -1,    -1,    83,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1007,    42,    -1,    -1,    -1,   146,    -1,    -1,    -1,    -1,
+      -1,    -1,    53,    -1,    -1,    -1,    -1,    -1,    -1,   160,
+     161,   162,   163,   164,    65,    -1,   167,   168,   169,   170,
+     171,   172,   173,    -1,    -1,    -1,    -1,    -1,    -1,    80,
+      81,    -1,    -1,     1,    -1,    -1,   595,    -1,     6,    -1,
+      -1,    -1,  1059,    -1,    -1,    -1,    14,    98,    16,    17,
+     160,    19,    -1,    21,    -1,    -1,    -1,   167,   168,  1076,
+     170,   171,   172,   173,    -1,    -1,    -1,    -1,    -1,    -1,
+      38,  1088,    -1,    -1,    42,    -1,    -1,    -1,    -1,  1096,
+    1097,    -1,    50,    -1,     1,    53,    -1,  1104,    -1,     6,
+      -1,    -1,    -1,    -1,  1111,    -1,    -1,    -1,    66,    16,
+      17,    -1,    19,    -1,    21,    -1,    -1,    -1,    -1,   160,
+      -1,    -1,    80,    81,    -1,    -1,   167,   168,    -1,   170,
+      88,    38,   681,    91,    92,    42,     5,    -1,    -1,    -1,
+      98,    10,    -1,    50,    -1,    -1,    53,    16,    17,    -1,
+      19,    -1,    21,    -1,   703,   704,    -1,    -1,    -1,    66,
+      -1,    -1,     1,    -1,    -1,    -1,     5,    -1,    -1,   127,
+      -1,    10,   721,    80,    81,    -1,    -1,    16,    17,    -1,
+      19,    88,    21,    -1,    91,    92,    -1,    26,   146,    -1,
+      -1,    98,    -1,    -1,    -1,    -1,    -1,    66,    -1,    -1,
+      -1,    -1,   160,   161,   162,   163,   164,    -1,    -1,   167,
+     168,   169,   170,   171,   172,   173,    -1,     1,    -1,    88,
+     127,     5,    -1,    35,    -1,    -1,    -1,    66,    97,    -1,
+      42,    -1,    16,    17,    -1,    19,    -1,    21,    -1,   146,
+      -1,    53,    -1,    -1,    -1,    -1,    -1,    59,    -1,    -1,
+      -1,    -1,    -1,   160,   161,   162,   163,   164,    97,    -1,
+     167,   168,   169,   170,   171,   172,   173,    -1,    80,    81,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,    -1,    -1,
+      -1,    -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   161,   162,   163,   164,    -1,    -1,   167,   168,
+     169,   170,   171,   172,   173,    -1,    -1,   146,    -1,    -1,
+      11,    12,    13,    97,    15,    -1,    -1,    18,    19,    20,
+      21,    -1,   161,   162,   163,   164,    27,    28,   167,   168,
+     169,   170,   171,   172,   173,     5,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    16,    17,   160,    19,
+      -1,    21,    -1,    -1,     5,   167,   168,    -1,   170,   171,
+     172,   173,   146,    -1,    -1,    16,    17,    -1,    19,    -1,
+      21,    -1,    -1,    -1,    75,    -1,    -1,   161,   162,   163,
+     164,    -1,    83,   167,   168,   169,   170,   171,   172,   173,
+       5,    -1,    -1,    -1,    -1,    -1,    66,    -1,    -1,   948,
+     949,    16,    17,    -1,    19,    -1,    21,    -1,    -1,    24,
+      -1,   960,    -1,    -1,    -1,    66,    -1,    -1,    88,    -1,
+     969,   970,     5,    -1,    -1,    -1,    -1,    97,    -1,    -1,
+      -1,    -1,   981,    16,    17,    -1,    19,    88,    21,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    97,    -1,    -1,   119,
+      -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    11,    12,    13,    -1,    15,    -1,    -1,    18,    19,
+      20,    21,    -1,     5,    -1,    -1,   146,    27,    28,    -1,
+      -1,    -1,    97,    66,    16,    17,    -1,    19,    -1,    21,
+      -1,   161,   162,   163,   164,   146,    -1,   167,   168,   169,
+     170,   171,   172,   173,    -1,    88,    -1,    -1,    -1,    -1,
+     161,   162,   163,   164,    97,    -1,   167,   168,   169,   170,
+     171,   172,   173,    -1,    -1,    75,    -1,    -1,    -1,    -1,
+      -1,   146,    -1,    83,    66,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   161,   162,   163,   164,
+      -1,    -1,   167,   168,   169,   170,   171,   172,   173,    -1,
+      -1,    -1,    -1,   146,    -1,    97,    -1,    -1,    -1,    -1,
+      -1,    17,    -1,    -1,    -1,    -1,    -1,    23,   161,   162,
+     163,   164,    -1,    -1,   167,   168,   169,   170,   171,   172,
+     173,    37,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      46,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,     6,    -1,   146,    61,    -1,    63,    -1,    -1,
+      -1,    -1,    16,    17,    70,    19,    -1,    21,    -1,   161,
+     162,   163,   164,    -1,    80,   167,   168,   169,   170,   171,
+     172,   173,    36,    -1,    38,    -1,    -1,    -1,    42,    -1,
+      -1,    -1,    -1,    -1,   100,    -1,    50,    -1,    -1,    53,
+      -1,   107,    -1,     6,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    66,    16,    17,    -1,    19,    -1,    21,    -1,
+     126,    -1,    -1,   129,    -1,    28,    80,    81,    -1,    -1,
+      -1,    -1,    -1,    -1,    88,    38,    -1,    91,    92,    42,
+      -1,    -1,    -1,    -1,    98,    -1,   152,    50,    -1,    -1,
+      53,    -1,    -1,    -1,    -1,   161,   162,   163,   164,    62,
+      -1,   167,   168,    66,   170,   119,    -1,    -1,   174,   175,
+      -1,   177,    -1,   127,    -1,    -1,    -1,    80,    81,    -1,
+      -1,    -1,    -1,    -1,    -1,    88,    -1,    -1,    91,    92,
+      -1,    -1,   146,    -1,    -1,    98,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   160,   161,   162,   163,
+     164,    -1,    -1,   167,   168,   169,   170,   171,   172,   173,
+      -1,    -1,    -1,    -1,   127,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     157,   158,   159,   160,    -1,   772,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,   172,    -1,    60,    -1,   712,
-      63,    -1,   789,    -1,    -1,    -1,   593,     1,    -1,    -1,
-      -1,    -1,     6,   600,   801,   728,    -1,    -1,    -1,   732,
-      -1,    -1,    16,    17,    -1,    19,    89,    21,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   748,   749,   100,    -1,    -1,
-      -1,    35,   105,    -1,   831,    39,    -1,    -1,    -1,    -1,
-      -1,    45,    -1,    -1,    48,   118,    -1,    -1,   845,   772,
-      -1,   848,    -1,    -1,    -1,    59,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   789,    -1,    -1,    73,
-      74,    75,    76,    77,    78,    79,    80,    -1,   801,    -1,
-      -1,    -1,    -1,    87,    88,   682,   683,    -1,    -1,    93,
-     163,   164,    -1,   166,   167,   168,   169,   170,   171,   172,
-      -1,    -1,   106,    -1,    -1,    -1,    -1,   904,   831,    -1,
-     114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   122,    -1,
-       1,   125,   845,   920,     5,   848,    -1,    -1,    -1,    10,
-      -1,    -1,   929,    14,    -1,    -1,    -1,    -1,   142,    -1,
-      -1,    -1,    23,    -1,    -1,    -1,    -1,    -1,    -1,    30,
-      -1,    -1,    -1,   157,   158,   159,   160,    -1,   955,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   172,     1,
-      -1,    -1,    -1,     5,    -1,    -1,    -1,   974,    -1,    60,
-      -1,   904,    63,    -1,    16,    17,    -1,    19,    -1,    21,
-      -1,    -1,    -1,   990,   991,    -1,    -1,   920,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,  1002,   929,    -1,    89,     5,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   100,
-      16,    17,    -1,    19,   105,    21,    -1,    59,    24,    -1,
-      -1,    -1,   955,    -1,    -1,    -1,    -1,   118,    -1,    -1,
-      -1,    -1,    -1,     5,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   974,    -1,    -1,    16,    17,    -1,    19,    -1,    21,
-      92,    -1,    -1,    59,    -1,    -1,    -1,   990,   991,    -1,
-      -1,    -1,   869,   870,    -1,    -1,    -1,    -1,    -1,  1002,
-      -1,    -1,   163,   164,   881,   166,   167,   168,   169,   170,
-     171,   172,    -1,   890,   891,     5,    92,    59,    -1,    -1,
-      -1,    -1,    -1,    -1,    10,    -1,    16,    17,    14,    19,
-     142,    21,    -1,    -1,    -1,    -1,    -1,    23,    -1,    25,
-      26,    -1,    -1,    -1,    -1,   157,   158,   159,   160,    -1,
-      92,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,    -1,    -1,    11,    12,    13,   142,    15,    -1,    59,
-      18,    19,    20,    21,    60,   117,    -1,    63,    -1,    27,
-      28,   157,   158,   159,   160,    -1,    -1,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,   172,    -1,    -1,    -1,
-     142,    -1,    92,    89,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   100,   157,   158,   159,   160,   105,
-      68,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,    -1,   118,    81,    10,    -1,    -1,    -1,    14,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    23,    -1,    25,
-      26,    -1,   142,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   157,   158,   159,
-     160,    -1,    -1,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,     6,    60,    -1,    -1,    63,    -1,    73,
-      -1,    -1,    -1,    16,    17,    -1,    19,    -1,    21,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    34,    35,    89,    -1,    -1,    39,    -1,    -1,    -1,
-      -1,    -1,    45,     4,   100,    48,    -1,    -1,    -1,   105,
-      11,    12,    13,    -1,    15,    -1,    59,    18,    19,    20,
-      21,    -1,   118,    -1,    -1,    -1,    27,    28,    -1,    -1,
-      73,    74,    75,    76,    77,    78,    79,    80,    -1,    -1,
-      -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    -1,    -1,
-      93,   155,   156,   157,   158,   159,   160,    -1,    -1,   163,
-     164,    -1,   166,   106,    -1,    -1,    -1,    68,    -1,   173,
-     174,   114,   176,    -1,   117,    -1,    -1,    -1,     4,   122,
-      81,     7,   125,     9,    -1,    11,    12,    13,    -1,    15,
-      -1,    -1,    18,    19,    20,    21,    -1,    -1,    24,   142,
-      -1,    27,    28,    -1,    -1,    -1,    32,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   157,   158,   159,   160,    -1,    -1,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-       6,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      16,    17,    68,    19,    -1,    21,    -1,    -1,    -1,    -1,
-      -1,    -1,    28,    -1,    -1,    81,    -1,    -1,    -1,    35,
-      -1,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    45,
-      -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,    -1,    55,
-      -1,    -1,    -1,    59,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    73,    74,    75,
-      76,    77,    78,    79,    80,    -1,    11,    12,    13,    -1,
-      15,    87,    88,    18,    19,    20,    21,    93,    -1,    -1,
-      -1,    -1,    27,    28,    -1,    -1,    -1,    -1,    -1,    -1,
-     106,    -1,     6,    -1,    -1,    -1,    -1,    -1,   114,    -1,
-      -1,    -1,    16,    17,    -1,    19,   122,    21,    -1,   125,
-      -1,    -1,    -1,    -1,    28,    -1,    -1,    -1,    -1,    -1,
-      -1,    35,    -1,    68,    -1,    39,   142,    -1,    -1,    -1,
-      -1,    45,    -1,    -1,    48,    -1,    81,    -1,    -1,    -1,
-      -1,   157,   158,   159,   160,    59,    -1,   163,   164,   165,
-     166,   167,   168,   169,   170,   171,   172,    -1,    -1,    73,
-      74,    75,    76,    77,    78,    79,    80,    -1,    -1,    -1,
-      -1,    -1,    -1,    87,    88,    -1,    -1,    -1,    -1,    93,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   106,    -1,     6,    -1,    -1,    -1,    -1,    -1,
-     114,    -1,    -1,    -1,    16,    17,    -1,    19,   122,    21,
-      -1,   125,    24,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    35,    -1,    -1,    -1,    39,   142,    -1,
-      -1,    -1,    -1,    45,    -1,    -1,    48,    -1,    -1,    -1,
-      -1,    -1,    -1,   157,   158,   159,   160,    59,    -1,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   172,    -1,
-      -1,    73,    74,    75,    76,    77,    78,    79,    80,    -1,
-      -1,    -1,    -1,    -1,    -1,    87,    88,    -1,    -1,    -1,
-      -1,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   106,    -1,     6,    -1,    -1,    -1,
-      -1,    -1,   114,    -1,    -1,    -1,    16,    17,    -1,    19,
-     122,    21,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    35,    -1,    -1,    -1,    39,
-     142,    -1,    -1,    -1,    -1,    45,    -1,    -1,    48,    -1,
-      -1,    -1,    -1,    -1,    -1,   157,   158,   159,   160,    59,
-      -1,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     172,    -1,    -1,    73,    74,    75,    76,    77,    78,    79,
-      80,    -1,    -1,    -1,    -1,    -1,    -1,    87,    88,    -1,
-      -1,    -1,    -1,    93,    17,    -1,    -1,    -1,    -1,    -1,
-      23,    -1,    -1,    -1,    -1,    -1,   106,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   114,    -1,    -1,    -1,    -1,    -1,
-      43,    -1,   122,    -1,    -1,   125,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    56,    -1,    17,    -1,    -1,    -1,    -1,
-      63,    -1,   142,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      73,    -1,    -1,    -1,    -1,    -1,    -1,   157,   158,   159,
-     160,    43,    -1,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,    96,    56,    -1,    -1,    -1,    -1,    -1,
-     103,    63,    17,    -1,    -1,    -1,    -1,    -1,    23,    -1,
-      -1,    73,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   124,    -1,    -1,    -1,    -1,    -1,    -1,    43,    -1,
-      -1,    -1,    -1,    -1,    96,    -1,    -1,    -1,    -1,    -1,
-      -1,   103,    -1,    17,    -1,    -1,    -1,    -1,    63,    -1,
-      -1,    -1,   155,   156,   157,   158,   159,   160,    73,    -1,
-     163,   164,   124,   166,    -1,    -1,    -1,    17,    -1,    43,
-     173,   174,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    96,    -1,    -1,    -1,    -1,    -1,    -1,   103,    63,
-      -1,    -1,    -1,   155,   156,   157,   158,   159,   160,    73,
-      -1,   163,   164,    -1,   166,    -1,    -1,    -1,    -1,   124,
-      -1,   173,   174,    63,   176,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    96,    73,    -1,    -1,    -1,    -1,    -1,   103,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     155,   156,   157,   158,   159,   160,    96,    -1,   163,   164,
-     124,   166,    -1,   103,    -1,    -1,    -1,    -1,   173,   174,
-      -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   124,    -1,    -1,    -1,    -1,    -1,
-      -1,   155,   156,   157,   158,   159,   160,    -1,    -1,   163,
-     164,    -1,   166,    -1,    -1,    16,    17,    -1,    -1,   173,
-     174,    -1,   176,    -1,    -1,   155,   156,   157,   158,   159,
-     160,    -1,    33,   163,   164,    -1,   166,    -1,    39,    16,
-      17,    -1,    -1,   173,   174,    -1,   176,    48,    -1,    -1,
-      -1,    -1,    53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    48,    73,    74,    75,    76,    77,    78,    79,    80,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    73,    74,    75,    76,
-      77,    78,    79,    80,    -1,   106,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   114,    -1,    -1,    -1,    -1,    -1,    16,
-      -1,   122,    -1,    -1,     4,    -1,    -1,     7,    -1,   106,
-      -1,    11,    12,    13,    -1,    15,    -1,   114,    18,    19,
-      20,    21,    39,    -1,    24,   122,    -1,    27,    28,    -1,
-      -1,    48,    32,    -1,    -1,    -1,   157,    -1,    -1,    -1,
-      -1,    58,   163,   164,    -1,   166,   167,   168,   169,   170,
-     171,   172,    -1,    -1,    -1,    -1,    73,    74,    75,    76,
-      77,    78,    79,    80,    -1,    -1,   163,   164,    68,   166,
-     167,   168,   169,   170,   171,   172,    93,    -1,    33,    -1,
-      -1,    81,    -1,    -1,    39,    -1,    -1,    -1,    -1,   106,
-      -1,    -1,    -1,    48,    -1,    -1,    -1,   114,    53,    -1,
-      -1,    -1,    -1,    -1,    -1,   122,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    73,    74,
-      75,    76,    77,    78,    79,    80,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   163,   164,    -1,   166,
-      -1,   106,    -1,    -1,     4,    -1,    -1,     7,    -1,   114,
-      -1,    11,    12,    13,    -1,    15,    -1,   122,    18,    19,
-      20,    21,     4,    -1,    24,     7,    -1,    27,    28,    11,
-      12,    13,    32,    15,    -1,    -1,    18,    19,    20,    21,
-      -1,    -1,    24,    -1,    -1,    27,    28,    -1,    -1,    -1,
-      32,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   163,   164,
-      -1,   166,   167,   168,   169,   170,   171,   172,    68,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-       4,    81,    -1,     7,    -1,     9,    68,    11,    12,    13,
-      -1,    15,    -1,    -1,    18,    19,    20,    21,    -1,    81,
-      -1,    -1,    -1,    27,    28,    -1,     4,     5,    32,     7,
-      -1,    -1,    -1,    11,    12,    13,    -1,    15,    -1,    -1,
-      18,    19,    20,    21,    -1,    -1,    -1,    -1,    -1,    27,
-      28,    -1,     4,    -1,    32,     7,    -1,    -1,    -1,    11,
-      12,    13,    -1,    15,    68,    -1,    18,    19,    20,    21,
-      -1,    -1,    24,    -1,    -1,    27,    28,    81,     4,    -1,
-      32,     7,    -1,    -1,    -1,    11,    12,    13,    -1,    15,
-      68,    -1,    18,    19,    20,    21,    -1,    -1,    24,    -1,
-      -1,    27,    28,    81,     4,    -1,    32,     7,    -1,    -1,
-      -1,    11,    12,    13,    -1,    15,    68,    -1,    18,    19,
-      20,    21,    -1,    -1,    24,    -1,    -1,    27,    28,    81,
-       4,    -1,    32,     7,    -1,    -1,    -1,    11,    12,    13,
-      -1,    15,    68,    -1,    18,    19,    20,    21,    -1,    -1,
-      24,    -1,    -1,    27,    28,    81,     4,    -1,    32,     7,
-      -1,    -1,    -1,    11,    12,    13,    -1,    15,    68,    -1,
-      18,    19,    20,    21,    -1,    -1,    24,    -1,    -1,    27,
-      28,    81,     4,    -1,    32,     7,    -1,    -1,    -1,    11,
-      12,    13,    -1,    15,    68,    -1,    18,    19,    20,    21,
-      -1,    -1,    24,    -1,    -1,    27,    28,    81,     4,    -1,
-      32,     7,    -1,     9,    -1,    11,    12,    13,    -1,    15,
-      68,    -1,    18,    19,    20,    21,    -1,    -1,    -1,    -1,
-      -1,    27,    28,    81,     4,    -1,    32,     7,    -1,     9,
-      -1,    11,    12,    13,    -1,    15,    68,    -1,    18,    19,
-      20,    21,    -1,    -1,    -1,    -1,    -1,    27,    28,    81,
-       4,    -1,    32,     7,    -1,     9,    -1,    11,    12,    13,
-      -1,    15,    68,    -1,    18,    19,    20,    21,    -1,    -1,
-      -1,    -1,    -1,    27,    28,    81,     4,    -1,    32,     7,
-      -1,    -1,    -1,    11,    12,    13,    -1,    15,    68,    -1,
-      18,    19,    20,    21,    -1,    -1,    24,    -1,    -1,    27,
-      28,    81,     4,    -1,    32,     7,    -1,    -1,    -1,    11,
-      12,    13,    -1,    15,    68,    -1,    18,    19,    20,    21,
-      -1,    -1,    24,    -1,    -1,    27,    28,    81,     4,    -1,
-      32,     7,    -1,    -1,    -1,    11,    12,    13,    -1,    15,
-      68,    -1,    18,    19,    20,    21,    -1,    -1,    24,    -1,
-      -1,    27,    28,    81,     4,    -1,    32,     7,    -1,    -1,
-      -1,    11,    12,    13,    -1,    15,    68,    -1,    18,    19,
-      20,    21,    -1,    -1,    24,    -1,    -1,    27,    28,    81,
-       4,    -1,    32,     7,    -1,    -1,    -1,    11,    12,    13,
-      -1,    15,    68,    -1,    18,    19,    20,    21,    -1,    -1,
-      24,    -1,    -1,    27,    28,    81,     4,    -1,    32,     7,
-      -1,    -1,    -1,    11,    12,    13,    -1,    15,    68,    -1,
+      -1,    -1,    -1,   146,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   160,   161,   162,
+     163,   164,    -1,     6,   167,   168,   169,   170,   171,   172,
+     173,    14,    -1,    16,    17,    -1,    19,    -1,    21,    -1,
+      -1,    24,    -1,     6,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    16,    17,    38,    19,    -1,    21,    42,
+      -1,    -1,    -1,    -1,    -1,    28,    -1,    50,    -1,    -1,
+      53,    -1,    -1,    -1,    31,    38,    33,    -1,    -1,    42,
+      -1,    -1,    -1,    66,    -1,    -1,    -1,    50,    45,    46,
+      53,    48,    -1,    -1,    -1,    -1,    -1,    80,    81,    -1,
+      57,    -1,    -1,    66,    -1,    88,    63,    -1,    91,    92,
+      -1,    -1,    -1,    -1,    -1,    98,    -1,    80,    81,    -1,
+      -1,    78,    -1,    -1,    -1,    88,    -1,    -1,    91,    92,
+      87,    -1,    89,    -1,    -1,    98,    -1,    94,    95,    -1,
+      -1,    -1,    -1,    -1,   127,     4,    -1,    -1,     7,    -1,
+      -1,    -1,    11,    12,    13,    -1,    15,    -1,    -1,    18,
+      19,    20,    21,   146,   127,    24,    -1,    -1,    27,    28,
+      -1,    -1,    -1,    -1,    -1,    34,    -1,   160,   161,   162,
+     163,   164,    -1,   146,   167,   168,   169,   170,   171,   172,
+     173,    -1,    -1,    -1,    -1,    -1,    -1,   160,   161,   162,
+     163,   164,     6,    -1,   167,   168,   169,   170,   171,   172,
+     173,    -1,    16,    17,    -1,    19,    75,    21,    -1,    -1,
+      24,    -1,     6,    -1,    83,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    16,    17,    38,    19,    -1,    21,    42,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    50,    -1,    -1,    53,
+      -1,    -1,    -1,    -1,    38,    -1,    -1,    -1,    42,    -1,
+      -1,    -1,    66,    -1,    -1,    -1,    50,    -1,    -1,    53,
+      -1,    -1,    -1,    -1,    -1,    -1,    80,    81,    -1,    -1,
+      -1,    -1,    66,    -1,    88,    -1,    -1,    91,    92,    -1,
+      -1,    17,    -1,    -1,    98,    -1,    80,    81,    -1,    -1,
+      -1,    -1,    -1,    -1,    88,    -1,    -1,    91,    92,    -1,
+      -1,    37,    -1,    10,    98,    -1,    -1,    14,    -1,    17,
+      46,    -1,    -1,   127,    -1,    23,    23,    -1,    25,    26,
+      -1,    -1,    -1,    -1,    -1,    61,    -1,    63,    -1,    -1,
+      -1,    -1,   146,   127,    70,    -1,    -1,    -1,    46,    -1,
+      -1,    -1,    -1,    -1,    80,    -1,   160,   161,   162,   163,
+     164,    -1,   146,   167,   168,   169,   170,   171,   172,   173,
+      67,    -1,    70,    70,   100,    -1,   160,   161,   162,   163,
+     164,   107,    80,   167,   168,   169,   170,   171,   172,   173,
+      17,    -1,    -1,    -1,    -1,    10,    93,    -1,    -1,    14,
+     126,    -1,   100,   129,    -1,    -1,    -1,   104,    23,   107,
+      25,    26,   109,    -1,    -1,    -1,    -1,    -1,    -1,    46,
+      -1,    -1,    -1,   120,    -1,    -1,   152,    -1,   126,    -1,
+      -1,   129,    -1,    -1,    -1,   161,   162,   163,   164,    -1,
+      -1,   167,   168,    70,   170,    -1,    -1,    -1,   174,   175,
+      -1,   177,    67,    80,   152,    70,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   161,   162,   163,   164,    -1,    -1,   167,
+     168,    -1,   170,   100,    -1,    -1,   174,   175,    93,   177,
+     107,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   104,
+      -1,    -1,    -1,    -1,   109,    -1,    -1,    -1,    -1,   126,
+       4,    -1,   129,     7,    -1,   120,    -1,    11,    12,    13,
+      -1,    15,    -1,    -1,    18,    19,    20,    21,    -1,    -1,
+      24,    -1,    -1,    27,    28,   152,    -1,    -1,    -1,    -1,
+      34,    -1,    -1,    -1,   161,   162,   163,   164,    -1,    -1,
+     167,   168,    -1,   170,    -1,    -1,     4,   174,   175,     7,
+     177,    -1,    -1,    11,    12,    13,    -1,    15,    -1,    -1,
       18,    19,    20,    21,    -1,    -1,    24,    -1,    -1,    27,
-      28,    81,     4,    -1,    32,     7,    -1,    -1,    -1,    11,
-      12,    13,    -1,    15,    68,    -1,    18,    19,    20,    21,
-      -1,    -1,    24,    -1,    -1,    27,    28,    81,     4,    -1,
-      32,     7,    -1,    -1,    -1,    11,    12,    13,    -1,    15,
-      68,    -1,    18,    19,    20,    21,    -1,    -1,    24,    -1,
-      -1,    27,    28,    81,     4,    -1,    32,     7,    -1,    -1,
-      -1,    11,    12,    13,    -1,    15,    68,    -1,    18,    19,
-      20,    21,    -1,    -1,    24,    -1,    -1,    27,    28,    81,
-       4,    -1,    32,     7,    -1,    -1,    -1,    11,    12,    13,
-      -1,    15,    68,    -1,    18,    19,    20,    21,    -1,    -1,
-      -1,    25,    -1,    27,    28,    81,     4,    -1,    32,     7,
-      -1,    -1,    -1,    11,    12,    13,    -1,    15,    68,    -1,
-      18,    19,    20,    21,    -1,    -1,    24,    -1,    -1,    27,
-      28,    81,     4,    -1,    32,     7,    -1,    -1,    -1,    11,
-      12,    13,    -1,    15,    68,    -1,    18,    19,    20,    21,
-      -1,    -1,    -1,    25,    -1,    27,    28,    81,     4,    -1,
-      32,     7,    -1,    -1,    -1,    11,    12,    13,    -1,    15,
-      68,    -1,    18,    19,    20,    21,    -1,    -1,    -1,    -1,
-      -1,    27,    28,    81,    67,    -1,    32,    70,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    68,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    81,
-      -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,    -1,    -1,
-      -1,    -1,    68,    -1,    -1,    -1,   109,   110,   111,   112,
-     113,    -1,   115,   116,    -1,    81,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   126,   127,   128,   129,   130,   131,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141
+      28,    75,    -1,    -1,    -1,     4,    34,    -1,     7,    83,
+       9,    -1,    11,    12,    13,    -1,    15,    -1,    -1,    18,
+      19,    20,    21,    -1,    -1,    -1,    -1,    -1,    27,    28,
+      -1,    -1,    -1,    -1,     4,    34,    -1,     7,    -1,    -1,
+      -1,    11,    12,    13,    -1,    15,    -1,    75,    18,    19,
+      20,    21,    -1,    -1,    24,    83,    -1,    27,    28,    -1,
+      -1,    -1,    -1,     4,    34,    -1,     7,    -1,    -1,    -1,
+      11,    12,    13,    -1,    15,    -1,    75,    18,    19,    20,
+      21,    -1,    -1,    24,    83,    -1,    27,    28,    -1,    -1,
+      -1,    -1,     4,    34,    -1,     7,    -1,    -1,    -1,    11,
+      12,    13,    -1,    15,    -1,    75,    18,    19,    20,    21,
+      -1,    -1,    24,    83,    -1,    27,    28,    -1,    -1,    -1,
+      -1,     4,    34,    -1,     7,    -1,    -1,    -1,    11,    12,
+      13,    -1,    15,    -1,    75,    18,    19,    20,    21,    -1,
+      -1,    24,    83,    -1,    27,    28,    -1,    -1,    -1,    -1,
+      -1,    34,    -1,     4,     5,    -1,     7,    -1,    -1,    -1,
+      11,    12,    13,    75,    15,    -1,    -1,    18,    19,    20,
+      21,    83,    -1,    -1,    -1,    -1,    27,    28,    -1,     4,
+      -1,    -1,     7,    34,    -1,    -1,    11,    12,    13,    -1,
+      15,    -1,    75,    18,    19,    20,    21,    -1,    -1,    24,
+      83,    -1,    27,    28,    -1,     4,    -1,    -1,     7,    34,
+      -1,    -1,    11,    12,    13,    -1,    15,    -1,    -1,    18,
+      19,    20,    21,    -1,    75,    24,    -1,    -1,    27,    28,
+       4,    -1,    83,     7,    -1,    34,    -1,    11,    12,    13,
+      -1,    15,    -1,    -1,    18,    19,    20,    21,    -1,    -1,
+      75,    25,    -1,    27,    28,    -1,    -1,    -1,    83,    -1,
+      34,    -1,    -1,     4,    -1,    -1,     7,    -1,    -1,    -1,
+      11,    12,    13,    -1,    15,    -1,    75,    18,    19,    20,
+      21,    -1,    -1,    24,    83,    -1,    27,    28,    -1,     4,
+      -1,    -1,     7,    34,    -1,    -1,    11,    12,    13,    -1,
+      15,    75,    -1,    18,    19,    20,    21,    -1,    -1,    83,
+      25,    -1,    27,    28,     4,    74,    -1,     7,    77,    34,
+      -1,    11,    12,    13,    -1,    15,    -1,    -1,    18,    19,
+      20,    21,    -1,    -1,    75,    -1,    -1,    27,    28,    -1,
+      -1,    -1,    83,   102,    34,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   112,   113,   114,   115,   116,   117,   118,
+      75,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    83,   128,
+      -1,   130,   131,   132,   133,   134,   135,   136,   137,   138,
+     139,   140,   141,   142,   143,    75,   145,    -1,    -1,    -1,
+      -1,    -1,    -1,    83
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint16 yystos[] =
 {
-       0,     1,   149,   182,   150,   184,   185,     0,    31,    34,
-      42,    43,    44,    51,    54,    56,    71,    84,    85,    90,
-     117,   183,   193,   195,   199,   201,   204,   340,   341,   342,
-     344,   346,   348,   350,   352,   353,   354,   355,   362,   364,
-     365,   366,   367,   368,   369,   370,   378,   381,   384,   385,
-      36,    50,   186,   190,   105,   205,    63,   359,   452,   453,
-      73,    83,   105,   119,   361,   200,    47,    61,   358,   202,
-     361,    47,    68,    72,   357,   360,   213,   214,    73,   163,
-     164,   166,   337,   338,   451,   359,    46,    55,   107,   150,
-     194,    43,    56,   150,   341,    10,   150,   454,     1,   166,
-     187,   191,   121,   206,    66,   213,    41,    41,   121,   453,
-      14,   274,   358,   452,   347,     5,    16,    28,   167,   168,
-     169,   170,   171,   172,   203,   303,   304,   312,   313,   314,
-     316,   337,    73,    83,   105,   453,   357,   343,   452,   360,
-       6,    16,    17,    19,    21,    35,    39,    45,    48,    59,
-      73,    74,    75,    76,    77,    78,    79,    80,    87,    88,
-      93,   106,   114,   122,   125,   142,   157,   158,   159,   160,
-     165,   309,   310,   311,   312,   318,   323,   326,   331,   332,
-     333,   337,   339,    16,    41,   123,   351,   196,   197,   361,
-     150,   363,   163,   104,   192,    73,   451,    14,    61,    93,
-      94,   146,   207,   208,   216,   219,    40,   451,   451,   451,
-     213,   275,   206,   349,   213,   274,   317,   318,   206,   304,
-      22,    29,   335,   336,    41,    41,    86,   121,   213,   345,
-     274,   213,   452,   318,    34,   195,   318,    25,   318,   318,
-      16,    16,    16,   324,    16,    16,    16,   325,    16,    16,
-      16,    16,    16,   318,    16,    16,    16,    16,     8,   162,
-      28,    55,   318,     4,     7,    11,    12,    13,    15,    18,
-      19,    20,    21,    27,    28,    32,    68,    81,    16,    92,
-     328,   329,   160,   451,    97,    51,   206,    28,   198,   307,
-     308,   318,    43,    56,   364,   157,   160,   163,   166,   188,
-     189,   313,     1,   164,   382,   218,    91,    61,    91,    14,
-     337,    38,   220,   221,   145,   160,   145,   379,    16,    17,
-      19,    21,    92,   276,   277,   280,   296,   302,   312,   315,
-     316,   331,   332,   333,   337,   339,   219,   274,   206,   356,
-     318,    24,   215,   219,     1,   163,   164,   166,   451,   451,
-     451,   453,   451,   274,   356,   213,   321,   322,    24,   312,
-     318,    16,   318,   318,   318,    16,   318,   318,   318,   318,
-     318,   318,   337,    24,   318,    24,   318,   318,   318,   318,
-     318,   318,   318,   318,   318,   318,   318,   318,   167,   168,
-     320,   319,    24,   318,   330,    24,   123,   451,   274,   216,
-       9,   318,     9,   361,     9,   166,   387,   249,   278,   279,
-     280,    91,   217,   101,   209,   222,    62,   441,   442,    16,
-     443,   441,   387,    24,   298,   297,   331,   331,    23,    10,
-     282,   281,    64,   231,   232,   219,     5,   231,   451,   206,
-     196,    24,    24,   318,    24,    24,    24,   318,    24,    24,
-       9,     9,     9,    24,    24,    16,   318,     1,     9,    24,
-      97,    71,   231,   318,   318,   189,    14,    61,   146,   435,
-      23,    14,    60,    63,    89,   100,   105,   118,   250,   251,
-     253,   257,   260,   263,   267,    10,   249,    16,   167,   168,
-     224,   225,   313,   175,     9,   101,   371,    68,   155,   156,
-     173,   444,   445,   446,   448,   450,   371,   101,   375,    14,
-     296,   300,   301,   302,     1,    30,   284,   295,   305,   312,
-     316,   337,   280,   283,   284,   284,    40,   220,    65,   236,
-     231,   220,   219,   206,    24,    24,   318,   318,   318,   330,
-       1,   318,   451,   274,   383,   173,   175,    16,   160,   261,
-      16,    58,    93,   264,   323,   327,   337,   306,   312,   316,
-     337,   339,   265,   266,     1,    14,    86,   451,    10,   249,
-     144,   278,    23,   210,    14,   225,   443,   442,    16,    24,
-       9,   450,    16,   380,    24,   301,    25,    26,   299,   285,
-      26,    26,   233,   237,   102,   238,   220,    24,   216,    24,
-       9,    24,    24,    24,   356,    17,    23,    43,    56,    63,
-      96,   103,   124,   174,   176,   331,   332,   385,   386,   397,
-     398,   400,   404,   410,   412,   413,   431,   432,   449,   450,
-     451,    32,    32,   161,   195,   247,   249,   318,    58,   265,
-     329,   258,   206,   252,   254,   268,   249,    14,   220,    24,
-     163,   211,   212,   223,   108,    24,    37,    52,   108,   372,
-     373,   446,   447,   450,    24,    37,    48,    52,    79,   108,
-     376,   377,   397,     1,    10,    25,   295,     1,   287,   288,
-     301,    10,    16,    17,   234,   235,   312,   323,   327,   318,
-      40,    82,    99,   244,   246,   101,   289,   231,   318,    25,
-     451,   453,   361,   432,   432,   432,   432,    10,    23,   101,
-     413,   436,   411,    16,   173,   173,   248,    23,    24,    14,
-     219,   247,    28,    49,   334,   337,    16,   271,   262,   213,
-       9,    24,    16,   226,   227,   228,   447,   160,   374,     9,
-      24,    93,   451,   160,   450,   374,     9,    24,   286,     9,
-     289,   318,   318,   235,   239,   213,   213,   245,   246,   243,
-     244,    16,    24,    24,    32,   145,   451,   105,   451,   453,
-     414,    23,   399,    16,    14,     1,    17,    30,   416,   418,
-     430,   432,   439,   440,   449,   389,   388,   196,   289,   259,
-     289,   255,    50,    68,   163,   272,   273,   269,   247,   163,
-     143,   229,   230,   331,   332,   333,   337,   339,    23,   228,
-     144,   373,    95,   377,   287,     1,    10,    26,   288,    24,
-      25,    33,    53,   240,   241,   242,   312,   323,   327,   290,
-     289,   405,   121,   145,   451,    48,   428,   400,    24,    57,
-     102,   120,   145,   437,   438,   406,    25,    26,   419,    24,
-       9,   390,   390,   206,   247,    14,   163,    28,   293,   312,
-     188,    24,   273,   206,   213,    24,   230,   160,   241,    16,
-      17,   157,    67,    70,    98,   109,   110,   111,   112,   113,
-     115,   116,   126,   127,   128,   129,   130,   131,   132,   133,
-     134,   135,   136,   137,   138,   139,   140,   141,   291,   292,
-     294,   407,   409,   412,   431,   451,   121,    73,   337,   449,
-     415,   157,    57,   173,     9,    24,    23,   401,   402,   404,
-     417,     1,   420,   422,   431,   449,   155,   391,   216,   256,
-     188,     9,    14,   318,   318,   160,   163,   166,   173,   312,
-     312,   318,   160,   157,   157,   312,    16,   318,   318,    16,
-      16,     9,    24,    16,   436,   430,   436,   451,    16,    79,
-     429,   438,    10,    23,   418,     9,    32,   427,   423,   156,
-     392,   231,   247,   312,   270,    24,    25,   293,   293,   160,
-     312,   292,   330,    14,   422,   436,   160,   160,   449,    23,
-     403,   421,   451,   428,    83,    23,   247,    24,    24,    24,
-      24,    24,   408,    24,   404,   422,   424,   449,   289,    32,
-      32,   401,   427,   429,    97,   393,   312,   312,   425,    16,
-     101,   394,   433,   434,   435,   440,    16,   426,   435,    24,
-     173,   395,   396,   436,   160,     9,    24,   396
+       0,     1,   154,   184,   155,   186,   187,     0,    31,    33,
+      45,    46,    48,    57,    63,    78,    87,    89,    94,    95,
+     195,   374,   375,   376,   377,   379,   381,   383,   385,   387,
+     388,   389,   390,   400,   401,   403,   406,   407,   408,   410,
+     411,   412,   413,   414,   419,   423,   426,   427,    39,    55,
+     188,   192,   109,   121,   399,    80,    85,    88,   109,   399,
+     422,    52,    68,   393,   402,   399,    52,    75,    79,   392,
+     398,   404,   399,    80,   167,   168,   170,   371,   372,   496,
+      70,   396,   497,   498,    36,    47,    60,   119,   185,   215,
+     217,   221,   223,   226,    46,    57,    63,    78,   155,   375,
+     155,   399,    10,   155,   499,     1,   170,   189,   193,   124,
+      32,    54,    96,   394,   498,    82,   124,   498,    44,   393,
+     497,   382,    14,   298,    88,   109,   394,   422,   392,   378,
+     497,   298,   237,   238,    16,    44,   125,    73,   386,   237,
+     227,   222,   224,    51,    62,   110,   155,   216,   399,    54,
+     395,   497,   155,   409,   167,   108,   194,   197,    80,   496,
+     237,   371,   496,   237,   496,   384,   237,   298,   299,    78,
+     405,    82,    90,   124,    44,   380,   298,   237,   228,   391,
+     398,     6,    16,    17,    19,    21,    38,    42,    50,    53,
+      66,    80,    81,    88,    91,    92,    98,   127,   146,   160,
+     161,   162,   163,   164,   169,   171,   172,   173,   337,   338,
+     339,   340,   341,   342,   346,   352,   355,   365,   366,   367,
+     371,   373,   164,   496,   101,    43,    57,   228,   298,     5,
+      16,    28,   225,   331,   332,   340,   344,   371,   218,   219,
+     144,   237,    46,    63,   410,   161,   164,   167,   170,   190,
+     191,   341,     1,   168,    56,   151,   198,   397,   424,   196,
+     420,   149,   164,   298,   391,    16,    17,    19,    21,    70,
+      97,   300,   301,   302,   305,   308,   324,   330,   340,   343,
+     344,   355,   365,   366,   367,   371,   373,   298,   391,   237,
+     496,   498,   496,   496,   298,   391,    14,    68,    98,   149,
+     150,   229,   230,   231,   232,   240,   243,   497,   346,    36,
+     217,   346,    25,   346,   346,    16,    16,    16,    16,    16,
+     371,    16,    16,   346,    16,    16,    97,   358,     8,   166,
+      28,    62,   346,    22,    29,   369,   370,     4,     7,    11,
+      12,    13,    15,    18,    19,    20,    21,    27,    28,    34,
+      75,    83,   351,    24,   125,   496,   298,   243,   228,   345,
+     346,   228,   332,   228,    28,   220,   335,   336,   346,   395,
+     399,     9,   170,   371,   497,   429,    14,   429,    69,   486,
+     487,    16,   488,    24,   326,   325,   365,   365,   306,    23,
+      10,   305,   308,   310,   309,   496,   242,    96,    68,   149,
+      96,    14,   371,    41,   244,   245,    71,   255,   256,   237,
+     349,   350,    24,   340,   346,   346,   346,   356,    24,   346,
+     359,   371,    24,   346,    24,     1,   167,   168,   170,   346,
+     346,   346,   346,   346,   346,   346,   346,   346,   346,   346,
+     346,   171,   348,   347,   357,   358,   101,    78,   243,   346,
+      24,   239,   243,   240,     9,   346,     9,   191,   199,   237,
+      14,    68,   150,   479,   197,    14,   176,     9,   105,   415,
+      75,   129,   152,   174,   489,   490,   491,   493,   495,   415,
+     324,   328,   329,   330,     1,    30,   312,   323,   333,   340,
+     344,   371,   334,   340,   344,   371,   373,   305,   308,   311,
+     312,   312,   171,   273,   303,   304,   308,    96,    96,   241,
+     105,   233,   246,    43,   244,    72,   260,   228,   218,    24,
+      24,    24,    24,    16,    97,   360,   361,     1,     9,    24,
+      24,    16,   346,   496,   298,   255,     5,   255,   255,   346,
+     346,     1,    14,    16,    54,    70,   200,   205,   233,   425,
+     123,   174,   176,    16,   164,    23,   421,   488,   487,    16,
+      24,     9,   495,    24,   329,    25,    26,   327,   313,   307,
+      26,    10,    23,    14,    67,    70,    93,   104,   109,   120,
+     274,   275,   277,   281,   284,   287,   291,    10,   273,    16,
+     171,   248,   249,   341,   257,   261,   106,   262,   243,   228,
+      14,    24,   346,   362,   363,     1,   346,   359,   391,   244,
+     244,   171,   210,   371,   171,   207,   208,   209,    70,   210,
+     203,    17,    23,    37,    46,    61,    63,    70,   100,   107,
+     126,   175,   177,   365,   366,   427,   428,   439,   440,   442,
+     443,   444,   448,   454,   456,   457,   475,   476,   494,   495,
+     496,    16,   164,   480,    34,    34,   165,   439,   111,    24,
+      40,    53,    58,    81,   111,   416,   417,   491,   492,   495,
+       1,    10,    25,   323,     1,   315,   316,   329,    14,   273,
+     285,    16,    65,    98,   288,   352,   353,   371,   334,   289,
+     290,     1,    14,    90,   496,    10,   273,   148,   303,    23,
+     234,    14,   249,    16,    17,   258,   259,   340,   352,   353,
+     346,    43,    84,   103,   268,   270,   105,   317,   240,   364,
+       1,     9,    24,    24,    30,   171,   211,   371,     9,    24,
+       9,   171,    14,    14,    86,   206,    25,    88,   496,   498,
+     399,   399,   476,   476,   476,   476,    10,    23,   105,   457,
+     481,   455,    16,   165,    34,   174,   174,   492,   496,   164,
+     495,   164,   418,     9,    24,    98,   314,     9,   317,   304,
+     217,   271,   273,   346,    65,   289,   354,   282,   228,   276,
+     278,   292,   273,    14,   244,    24,   167,   235,   236,   247,
+     346,   346,   259,   263,   237,   237,   269,   270,   267,   268,
+      16,    24,   255,   273,     1,   363,    19,    21,    97,   171,
+     212,   365,   366,   367,   371,   171,   201,   171,   210,   210,
+      16,    14,    82,    34,   149,   496,    88,   109,   496,   498,
+     458,    23,   441,    16,    14,     1,    17,    30,   460,   462,
+     474,   476,   484,   485,   494,   174,   430,   148,   417,    99,
+     315,     1,    10,    26,   316,    23,   272,    23,    24,   358,
+      14,   243,   271,    28,    54,   368,   371,    16,   295,   286,
+     237,     9,    24,    16,   250,   251,   252,    24,    25,    35,
+      59,   264,   265,   266,   340,   352,   353,   318,   317,    23,
+     365,   365,    23,   206,   211,   211,   208,   209,   204,   496,
+     449,   124,   149,    82,   496,    53,   472,   442,    24,    64,
+     106,   122,   149,   482,   483,   450,    25,    26,   463,    24,
+       9,   431,   432,   164,   218,   317,   283,   317,   279,    55,
+      75,   167,   296,   297,   293,   271,   167,   147,   253,   254,
+     365,   366,   367,   371,   373,    23,   252,   265,    16,    17,
+     161,    74,    77,   102,   112,   113,   114,   115,   116,   117,
+     118,   128,   130,   131,   132,   133,   134,   135,   136,   137,
+     138,   139,   140,   141,   142,   143,   145,   319,   320,   322,
+      24,   202,   212,   212,    24,    24,   273,   451,   453,   456,
+     475,   496,   124,   496,    80,   371,   494,   459,   161,    64,
+     174,     9,    24,    23,   445,   446,   448,   461,     1,   464,
+     466,   475,   494,   432,   129,   433,   228,   271,    14,   167,
+      28,   321,   340,   190,    24,   297,   228,   237,    24,   254,
+     346,   346,   164,   167,   170,   174,   340,   340,   346,   164,
+     161,   161,   340,    16,   346,   346,    16,    16,     9,    24,
+      16,     1,    14,   213,   346,    23,    23,    23,   481,   474,
+     481,   496,    16,    81,   473,   483,    10,    23,   462,     9,
+      34,   471,   467,   152,   434,   240,   280,   190,     9,    14,
+      24,    25,   321,   321,   164,   340,   320,   359,   214,    14,
+     466,   481,   164,   164,   494,    23,   447,   465,   496,   472,
+      85,   255,   271,   340,   294,    24,    24,    24,    24,    24,
+     273,   452,    24,   448,   466,   468,   494,    23,   271,    34,
+      34,    23,   445,   471,   473,   101,   435,   317,   340,   340,
+     469,    16,   105,   436,   477,   478,   479,   485,    16,   470,
+     479,    24,   174,   437,   438,   481,   164,     9,    24,   438
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -2616,9 +2667,18 @@ static const yytype_uint16 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -2675,7 +2735,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -3413,15 +3473,15 @@ yyreduce:
     {
         case 2:
 
-/* Line 1455 of yacc.c  */
-#line 525 "./sparql_p.y"
-    { sparp_arg->sparp_expr = (yyval.tree) = (yyvsp[(3) - (4)].tree); }
+/* Line 1464 of yacc.c  */
+#line 556 "./sparql_p.y"
+    { sparp_arg->sparp_expr = (yyval.tree) = (yyvsp[(4) - (5)].tree); }
     break;
 
   case 3:
 
-/* Line 1455 of yacc.c  */
-#line 526 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 557 "./sparql_p.y"
     {
 		sparp_arg->sparp_expr = (yyval.tree) = spar_make_topmost_sparul_sql (sparp_arg,
 		  (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)) ); }
@@ -3429,54 +3489,63 @@ yyreduce:
 
   case 4:
 
-/* Line 1455 of yacc.c  */
-#line 529 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 560 "./sparql_p.y"
     {
 		sparp_arg->sparp_expr = (yyval.tree) = spar_make_topmost_sparul_sql (sparp_arg,
-		  (SPART **)t_list (0) ); }
+		  (SPART **)t_list (1, (yyvsp[(3) - (4)].tree)) ); }
     break;
 
   case 5:
 
-/* Line 1455 of yacc.c  */
-#line 532 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 563 "./sparql_p.y"
+    {
+		sparp_arg->sparp_expr = (yyval.tree) = spar_make_topmost_sparul_sql (sparp_arg,
+		  (SPART **)t_list (0) ); }
+    break;
+
+  case 6:
+
+/* Line 1464 of yacc.c  */
+#line 566 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_topmost_qm_sql (sparp_arg);
 		sparp_arg->sparp_expr = (yyval.tree); }
     break;
 
-  case 6:
+  case 7:
 
-/* Line 1455 of yacc.c  */
-#line 535 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 569 "./sparql_p.y"
     { sparyyerror ("(internal SPARQL processing error) SPARQL mark expected"); }
     break;
 
-  case 12:
+  case 13:
 
-/* Line 1455 of yacc.c  */
-#line 552 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 587 "./sparql_p.y"
     { ; }
     break;
 
-  case 13:
+  case 14:
 
-/* Line 1455 of yacc.c  */
-#line 553 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 588 "./sparql_p.y"
     { ; }
     break;
 
-  case 14:
+  case 15:
 
-/* Line 1455 of yacc.c  */
-#line 557 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 592 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_VIRTSPECIFIC, "DEFINE"); }
     break;
 
-  case 15:
+  case 16:
 
-/* Line 1455 of yacc.c  */
-#line 558 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 593 "./sparql_p.y"
     {
 		dk_set_t vals = (yyvsp[(4) - (4)].backstack);
 		while (NULL != vals) {
@@ -3485,97 +3554,97 @@ yyreduce:
 		  } }
     break;
 
-  case 16:
-
-/* Line 1455 of yacc.c  */
-#line 567 "./sparql_p.y"
-    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
-    break;
-
   case 17:
 
-/* Line 1455 of yacc.c  */
-#line 568 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 602 "./sparql_p.y"
+    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 18:
 
-/* Line 1455 of yacc.c  */
-#line 572 "./sparql_p.y"
-    { (yyval.tree) = (SPART *)t_list (2, QNAME, (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 603 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 19:
 
-/* Line 1455 of yacc.c  */
-#line 573 "./sparql_p.y"
-    { (yyval.tree) = (SPART *)t_list (2, Q_IRI_REF, (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 607 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)t_list (2, (ptrlong)QNAME, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 20:
 
-/* Line 1455 of yacc.c  */
-#line 574 "./sparql_p.y"
-    { (yyval.tree) = (SPART *)t_list (2, SPARQL_STRING, (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 608 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)t_list (2, (ptrlong)Q_IRI_REF, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 21:
 
-/* Line 1455 of yacc.c  */
-#line 575 "./sparql_p.y"
-    { (yyval.tree) = (SPART *)t_list (2, SPARQL_INTEGER, (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 609 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)t_list (2, (ptrlong)SPARQL_STRING, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 22:
 
-/* Line 1455 of yacc.c  */
-#line 576 "./sparql_p.y"
-    { (yyval.tree) = (SPART *)t_list (2, SPAR_VARIABLE, (caddr_t)(yyvsp[(1) - (1)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 610 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)t_list (2, (ptrlong)SPARQL_INTEGER, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 23:
 
-/* Line 1455 of yacc.c  */
-#line 580 "./sparql_p.y"
-    { ; }
+/* Line 1464 of yacc.c  */
+#line 611 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)t_list (2, (ptrlong)SPAR_VARIABLE, (caddr_t)(yyvsp[(1) - (1)].tree)); }
     break;
 
   case 24:
 
-/* Line 1455 of yacc.c  */
-#line 581 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 615 "./sparql_p.y"
+    { ; }
+    break;
+
+  case 25:
+
+/* Line 1464 of yacc.c  */
+#line 616 "./sparql_p.y"
     {
 		if (NULL != sparp_env()->spare_base_uri)
 		  sparyyerror ("Only one base declaration is allowed");
 		sparp_env()->spare_base_uri = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 25:
+  case 26:
 
-/* Line 1455 of yacc.c  */
-#line 585 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 620 "./sparql_p.y"
     { sparyyerror ("Missing <iri-string> after BASE keyword"); }
     break;
 
-  case 26:
+  case 27:
 
-/* Line 1455 of yacc.c  */
-#line 589 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 624 "./sparql_p.y"
     { ; }
     break;
 
-  case 27:
+  case 28:
 
-/* Line 1455 of yacc.c  */
-#line 590 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 625 "./sparql_p.y"
     { ; }
     break;
 
-  case 28:
+  case 29:
 
-/* Line 1455 of yacc.c  */
-#line 594 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 629 "./sparql_p.y"
     {
 		if ((!strcmp ("sql:", (yyvsp[(2) - (3)].box)) && strcmp ("sql:", (yyvsp[(3) - (3)].box))) || (!strcmp ("bif:", (yyvsp[(2) - (3)].box)) && strcmp ("bif:", (yyvsp[(3) - (3)].box))))
 		  sparyyerror ("Prefixes 'sql:' and 'bif:' are reserved for SQL names");
@@ -3583,759 +3652,1059 @@ yyreduce:
 		t_set_push (&(sparp_env()->spare_namespace_prefixes), t_box_dv_short_nchars ((yyvsp[(2) - (3)].box), box_length ((yyvsp[(2) - (3)].box))-2)); }
     break;
 
-  case 29:
-
-/* Line 1455 of yacc.c  */
-#line 599 "./sparql_p.y"
-    { sparyyerror ("Missing <namespace-iri-string> in PREFIX declaration"); }
-    break;
-
   case 30:
 
-/* Line 1455 of yacc.c  */
-#line 600 "./sparql_p.y"
-    { sparyyerror ("Missing namespace prefix after PREFIX keyword"); }
+/* Line 1464 of yacc.c  */
+#line 634 "./sparql_p.y"
+    { sparyyerror ("Missing <namespace-iri-string> in PREFIX declaration"); }
     break;
 
   case 31:
 
-/* Line 1455 of yacc.c  */
-#line 605 "./sparql_p.y"
-    {
-		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
-                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
-		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
-    break;
-
-  case 32:
-
-/* Line 1455 of yacc.c  */
-#line 610 "./sparql_p.y"
-    {
-		SPART *where_gp = spar_gp_finalize (sparp_arg, NULL);
-		SPART *wm = (yyvsp[(6) - (6)].tree);
-		caddr_t retselid = spar_selid_pop (sparp_arg);
-		wm->_.wm.where_gp = where_gp;
-		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, (yyvsp[(1) - (6)].token_type), (yyvsp[(3) - (6)].trees), retselid, wm );
-		if (SPAR_REQ_TOP == (yyval.tree)->type)
-		  sparp_expand_top_retvals (sparp_arg, (yyval.tree), 0 /* never cloned, hence 0 == safely_copy_all_vars */); }
+/* Line 1464 of yacc.c  */
+#line 635 "./sparql_p.y"
+    { sparyyerror ("Missing namespace prefix after PREFIX keyword"); }
     break;
 
   case 33:
 
-/* Line 1455 of yacc.c  */
-#line 621 "./sparql_p.y"
-    { (yyval.token_type) = SELECT_L; }
-    break;
-
-  case 34:
-
-/* Line 1455 of yacc.c  */
-#line 622 "./sparql_p.y"
-    { (yyval.token_type) = SELECT_L; }
+/* Line 1464 of yacc.c  */
+#line 640 "./sparql_p.y"
+    {
+		if (sparp_arg->sparp_macro_def_count)
+		  sparyyerror ("Some macro are defined before CREATE MACRO LIBRARY");
+		sparp_arg->sparp_macrolib_to_create = (yyvsp[(4) - (4)].tree)->_.qname.val;
+		sparp_arg->sparp_disable_storage_macro_lib = 2; }
     break;
 
   case 35:
 
-/* Line 1455 of yacc.c  */
-#line 623 "./sparql_p.y"
-    { (yyval.token_type) = DISTINCT_L; }
+/* Line 1464 of yacc.c  */
+#line 649 "./sparql_p.y"
+    { ; }
     break;
 
   case 36:
 
-/* Line 1455 of yacc.c  */
-#line 624 "./sparql_p.y"
-    { (yyval.token_type) = COUNT_DISTINCT_L; }
+/* Line 1464 of yacc.c  */
+#line 650 "./sparql_p.y"
+    { ; }
     break;
 
   case 37:
 
-/* Line 1455 of yacc.c  */
-#line 628 "./sparql_p.y"
-    { (yyval.token_type) = sparp_arg->sparp_rset_lexdepth_plus_1; sparp_arg->sparp_rset_lexdepth_plus_1 = sparp_arg->sparp_lexdepth + 1; }
+/* Line 1464 of yacc.c  */
+#line 656 "./sparql_p.y"
+    {
+		SPART *new_macro;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		spar_selid_push_reused (sparp_arg, (yyvsp[(2) - (2)].tree)->_.qname.val );
+		sparp_arg->sparp_macro_mode = SPARP_DEFARG;
+		new_macro = sparp_arg->sparp_current_macro = sparp_defmacro_init (sparp_arg, (yyvsp[(2) - (2)].tree)->_.qname.val);
+		sparp_defmacro_store (sparp_arg, new_macro); }
     break;
 
   case 38:
 
-/* Line 1455 of yacc.c  */
-#line 629 "./sparql_p.y"
-    { sparp_arg->sparp_rset_lexdepth_plus_1 = (yyvsp[(1) - (2)].token_type); (yyval.trees) = (yyvsp[(2) - (2)].trees); }
+/* Line 1464 of yacc.c  */
+#line 664 "./sparql_p.y"
+    {
+		sparp_defmacro_finalize (sparp_arg, (yyvsp[(4) - (4)].tree));
+		sparp_arg->sparp_macro_mode = 0;
+		spar_selid_pop (sparp_arg);
+		  }
     break;
 
   case 39:
 
-/* Line 1455 of yacc.c  */
-#line 633 "./sparql_p.y"
-    { (yyval.trees) = (SPART **) _STAR; }
+/* Line 1464 of yacc.c  */
+#line 672 "./sparql_p.y"
+    {
+		sparp_arg->sparp_current_macro->_.defmacro.paramnames = t_revlist_to_array ((yyvsp[(2) - (3)].backstack));	 }
     break;
 
   case 40:
 
-/* Line 1455 of yacc.c  */
-#line 635 "./sparql_p.y"
-    { (yyval.trees) = (SPART **) t_revlist_to_array ((yyvsp[(1) - (1)].backstack)); }
+/* Line 1464 of yacc.c  */
+#line 674 "./sparql_p.y"
+    {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		if (NULL != (yyvsp[(5) - (5)].backstack))
+		  curr->_.defmacro.localnames = t_revlist_to_array ((yyvsp[(5) - (5)].backstack));
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
     break;
 
   case 41:
 
-/* Line 1455 of yacc.c  */
-#line 636 "./sparql_p.y"
-    {
-		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_VIRTSPECIFIC, "comma-delimited list of result set expressions");
-		(yyval.trees) = (SPART **) t_revlist_to_array ((yyvsp[(1) - (1)].backstack)); }
+/* Line 1464 of yacc.c  */
+#line 679 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(7) - (7)].tree); }
     break;
 
   case 42:
 
-/* Line 1455 of yacc.c  */
-#line 642 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 680 "./sparql_p.y"
     {
-		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
-                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+		SPART *curr = sparp_arg->sparp_current_macro;
+	    sparp_make_defmacro_paramnames_from_template (sparp_arg, curr); }
     break;
 
   case 43:
 
-/* Line 1455 of yacc.c  */
-#line 646 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 683 "./sparql_p.y"
     {
-                const char *formatter, *agg_formatter, *agg_mdata;
-		SPART *where_gp = spar_gp_finalize (sparp_arg, NULL);
-		SPART *wm = (yyvsp[(6) - (7)].tree);
-		caddr_t retselid = spar_selid_pop (sparp_arg);
-		wm->_.wm.where_gp = where_gp;
-		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, CONSTRUCT_L, NULL,
-                  retselid, wm );
-                ssg_find_formatter_by_name_and_subtype ((yyval.tree)->_.req_top.formatmode_name, CONSTRUCT_L, &formatter, &agg_formatter, &agg_mdata);
-                spar_compose_retvals_of_construct (sparp_arg, (yyval.tree), (yyvsp[(3) - (7)].tree), formatter, agg_formatter, agg_mdata); }
+		SPART *curr = sparp_arg->sparp_current_macro;
+		if (NULL != (yyvsp[(3) - (4)].backstack))
+		  curr->_.defmacro.localnames = t_revlist_to_array ((yyvsp[(3) - (4)].backstack));
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY;
+		spar_gp_init (sparp_arg, DEFMACRO_L); }
     break;
 
   case 44:
 
-/* Line 1455 of yacc.c  */
-#line 660 "./sparql_p.y"
-    {
-		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
-                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+/* Line 1464 of yacc.c  */
+#line 689 "./sparql_p.y"
+    { (yyval.tree) = spar_gp_finalize (sparp_arg, NULL); }
     break;
 
   case 45:
 
-/* Line 1455 of yacc.c  */
-#line 664 "./sparql_p.y"
-    {
-		SPART * where_gp = spar_gp_finalize (sparp_arg, NULL);
-		SPART *wm = (yyvsp[(6) - (7)].tree);
-		caddr_t retselid = spar_selid_pop (sparp_arg);
-		wm->_.wm.where_gp = where_gp;
-		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, DESCRIBE_L, (yyvsp[(3) - (7)].trees),
-                  retselid, wm );
-		if (((SPART **)_STAR == (yyvsp[(3) - (7)].trees)) && (SPAR_REQ_TOP == (yyval.tree)->type))
-		  sparp_expand_top_retvals (sparp_arg, (yyval.tree), 0 /* never cloned, hence 0 == safely_copy_all_vars */); }
+/* Line 1464 of yacc.c  */
+#line 690 "./sparql_p.y"
+    { sparyyerror ("List of arguments or template is expected after macro name"); }
     break;
 
   case 46:
 
-/* Line 1455 of yacc.c  */
-#line 676 "./sparql_p.y"
-    { (yyval.trees) = (SPART **) _STAR; }
+/* Line 1464 of yacc.c  */
+#line 695 "./sparql_p.y"
+    {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = 0;
+		curr->_.defmacro.quad_pattern = (SPART **)t_list (4, NULL, (yyvsp[(2) - (5)].tree), (yyvsp[(3) - (5)].tree), (yyvsp[(4) - (5)].tree));
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
     break;
 
   case 47:
 
-/* Line 1455 of yacc.c  */
-#line 677 "./sparql_p.y"
-    { (yyval.trees) = (SPART **) t_list_to_array ((yyvsp[(1) - (1)].backstack)); }
+/* Line 1464 of yacc.c  */
+#line 700 "./sparql_p.y"
+    {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = GRAPH_L;
+		curr->_.defmacro.quad_pattern = (SPART **)t_list (4, (yyvsp[(2) - (7)].tree), (yyvsp[(4) - (7)].tree), (yyvsp[(5) - (7)].tree), (yyvsp[(6) - (7)].tree));
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
     break;
 
   case 48:
 
-/* Line 1455 of yacc.c  */
-#line 681 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 705 "./sparql_p.y"
     {
-		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
-                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = DEFAULT_L;
+		curr->_.defmacro.quad_pattern = (SPART **)t_list (4, NULL, (yyvsp[(4) - (7)].tree), (yyvsp[(5) - (7)].tree), (yyvsp[(6) - (7)].tree));
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
     break;
 
   case 49:
 
-/* Line 1455 of yacc.c  */
-#line 685 "./sparql_p.y"
-    {
-		SPART * where_gp = spar_gp_finalize (sparp_arg, NULL);
-		(yyval.tree) = spar_make_top (sparp_arg, ASK_L, (SPART **)t_list(0), spar_selid_pop (sparp_arg),
-		  where_gp, NULL, NULL, NULL, (SPART *)t_box_num(1), (SPART *)t_box_num(0) ); }
+/* Line 1464 of yacc.c  */
+#line 713 "./sparql_p.y"
+    { (yyval.backstack) = NULL; }
     break;
 
   case 50:
 
-/* Line 1455 of yacc.c  */
-#line 692 "./sparql_p.y"
-    { }
+/* Line 1464 of yacc.c  */
+#line 714 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(3) - (4)].backstack); }
     break;
 
   case 51:
 
-/* Line 1455 of yacc.c  */
-#line 693 "./sparql_p.y"
-    { }
+/* Line 1464 of yacc.c  */
+#line 715 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(3) - (4)].backstack); }
     break;
 
   case 52:
 
-/* Line 1455 of yacc.c  */
-#line 701 "./sparql_p.y"
-    {
-		sparp_make_and_push_new_graph_source (sparp_arg, (yyvsp[(1) - (3)].token_type), (yyvsp[(2) - (3)].tree), (yyvsp[(3) - (3)].trees)); }
-    break;
-
-  case 53:
-
-/* Line 1455 of yacc.c  */
-#line 706 "./sparql_p.y"
-    { (yyval.token_type) = SPART_GRAPH_FROM; }
-    break;
-
-  case 54:
-
-/* Line 1455 of yacc.c  */
-#line 707 "./sparql_p.y"
-    { (yyval.token_type) = SPART_GRAPH_NAMED; }
+/* Line 1464 of yacc.c  */
+#line 719 "./sparql_p.y"
+    { (yyval.backstack) = NULL; }
     break;
 
   case 55:
 
-/* Line 1455 of yacc.c  */
-#line 708 "./sparql_p.y"
-    { (yyval.token_type) = SPART_GRAPH_NOT_FROM; }
+/* Line 1464 of yacc.c  */
+#line 725 "./sparql_p.y"
+    {
+		(yyval.backstack) = NULL;
+		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (3)].box));
+		sparp_check_dm_arg_for_redecl (sparp_arg, (yyval.backstack), (yyvsp[(3) - (3)].box));
+		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 56:
 
-/* Line 1455 of yacc.c  */
-#line 709 "./sparql_p.y"
-    { (yyval.token_type) = SPART_GRAPH_NOT_NAMED; }
+/* Line 1464 of yacc.c  */
+#line 730 "./sparql_p.y"
+    {
+		(yyval.backstack) = (yyvsp[(1) - (3)].backstack);
+		sparp_check_dm_arg_for_redecl (sparp_arg, (yyval.backstack), (yyvsp[(3) - (3)].box));
+		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 57:
 
-/* Line 1455 of yacc.c  */
-#line 710 "./sparql_p.y"
-    { (yyval.token_type) = SPART_GRAPH_NOT_FROM; }
+/* Line 1464 of yacc.c  */
+#line 737 "./sparql_p.y"
+    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].box)); }
     break;
 
   case 58:
 
-/* Line 1455 of yacc.c  */
-#line 711 "./sparql_p.y"
-    { (yyval.token_type) = SPART_GRAPH_NOT_NAMED; }
+/* Line 1464 of yacc.c  */
+#line 738 "./sparql_p.y"
+    {
+		(yyval.backstack) = (yyvsp[(1) - (2)].backstack);
+		sparp_check_dm_arg_for_redecl (sparp_arg, (yyval.backstack), (yyvsp[(2) - (2)].box));
+		t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].box)); }
     break;
 
   case 59:
 
-/* Line 1455 of yacc.c  */
-#line 715 "./sparql_p.y"
-    { (yyval.trees) = NULL; }
-    break;
-
-  case 60:
-
-/* Line 1455 of yacc.c  */
-#line 716 "./sparql_p.y"
-    { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_OPTION, "OPTION () sponge configuration"); }
+/* Line 1464 of yacc.c  */
+#line 745 "./sparql_p.y"
+    { (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 61:
 
-/* Line 1455 of yacc.c  */
-#line 717 "./sparql_p.y"
-    { (yyval.trees) = (yyvsp[(4) - (4)].trees); }
+/* Line 1464 of yacc.c  */
+#line 750 "./sparql_p.y"
+    { (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 62:
 
-/* Line 1455 of yacc.c  */
-#line 721 "./sparql_p.y"
-    { (yyval.trees) = (SPART **)t_list (0); }
-    break;
-
-  case 63:
-
-/* Line 1455 of yacc.c  */
-#line 722 "./sparql_p.y"
-    { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(1) - (2)].backstack)); }
+/* Line 1464 of yacc.c  */
+#line 751 "./sparql_p.y"
+    { (yyval.tree) = spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_type); }
     break;
 
   case 64:
 
-/* Line 1455 of yacc.c  */
-#line 726 "./sparql_p.y"
-    {	/* [Virt]	SpongeOption	 ::=  QNAME PrecodeExpn */
-		(yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (2)].box)); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
-    break;
-
-  case 65:
-
-/* Line 1455 of yacc.c  */
-#line 728 "./sparql_p.y"
-    {
-		(yyval.backstack) = (yyvsp[(1) - (4)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (4)].box)); t_set_push (&((yyval.backstack)), (yyvsp[(4) - (4)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 757 "./sparql_p.y"
+    { (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 66:
 
-/* Line 1455 of yacc.c  */
-#line 733 "./sparql_p.y"
-    { sparp_arg->sparp_in_precode_expn = 1; }
+/* Line 1464 of yacc.c  */
+#line 759 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 67:
 
-/* Line 1455 of yacc.c  */
-#line 735 "./sparql_p.y"
-    { sparp_arg->sparp_in_precode_expn = 0; (yyval.tree) = (yyvsp[(2) - (2)].tree); }
+/* Line 1464 of yacc.c  */
+#line 760 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); spar_change_sign (&((yyvsp[(2) - (2)].tree)->_.lit.val)); }
     break;
 
   case 68:
 
-/* Line 1455 of yacc.c  */
-#line 739 "./sparql_p.y"
-    {
-		sparp_arg->sparp_allow_aggregates_in_expn &= ~1;
-		spar_gp_init (sparp_arg, WHERE_L); }
-    break;
-
-  case 69:
-
-/* Line 1455 of yacc.c  */
-#line 742 "./sparql_p.y"
-    {;}
-    break;
-
-  case 70:
-
-/* Line 1455 of yacc.c  */
-#line 746 "./sparql_p.y"
-    {
-		sparp_arg->sparp_allow_aggregates_in_expn &= ~1;
-		spar_gp_init (sparp_arg, WHERE_L); }
-    break;
-
-  case 71:
-
-/* Line 1455 of yacc.c  */
-#line 749 "./sparql_p.y"
-    {;}
+/* Line 1464 of yacc.c  */
+#line 761 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)t_box_dv_uname_string ("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); }
     break;
 
   case 72:
 
-/* Line 1455 of yacc.c  */
-#line 750 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 769 "./sparql_p.y"
     {
-		sparp_arg->sparp_allow_aggregates_in_expn &= ~1;
-		spar_gp_init (sparp_arg, WHERE_L); }
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = 0;
+		spar_gp_init (sparp_arg, DEFMACRO_L); }
     break;
 
   case 73:
 
-/* Line 1455 of yacc.c  */
-#line 753 "./sparql_p.y"
-    {;}
-    break;
-
-  case 74:
-
-/* Line 1455 of yacc.c  */
-#line 757 "./sparql_p.y"
-    {;}
+/* Line 1464 of yacc.c  */
+#line 773 "./sparql_p.y"
+    { (yyval.tree) = spar_gp_finalize (sparp_arg, NULL); }
     break;
 
   case 75:
 
-/* Line 1455 of yacc.c  */
-#line 761 "./sparql_p.y"
-    { (yyval.tree) = NULL; }
+/* Line 1464 of yacc.c  */
+#line 775 "./sparql_p.y"
+    { sparyyerror ("Graph group pattern or expression is expected as the body of the macro"); }
     break;
 
   case 76:
 
-/* Line 1455 of yacc.c  */
-#line 762 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
+/* Line 1464 of yacc.c  */
+#line 781 "./sparql_p.y"
+    {
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
+		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
     break;
 
   case 77:
 
-/* Line 1455 of yacc.c  */
-#line 766 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 786 "./sparql_p.y"
     {
-		if (NULL != sparp_arg->sparp_env->spare_bindings_vars)
-		  sparyyerror ("Only one BINDINGS clause per query is allowed");
-		spar_selid_push (sparp_arg); }
+		SPART *where_gp = spar_gp_finalize (sparp_arg, NULL);
+		SPART *wm = (yyvsp[(6) - (6)].tree);
+		caddr_t retselid = spar_selid_pop (sparp_arg);
+		wm->_.wm.where_gp = where_gp;
+		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, (yyvsp[(1) - (6)].token_type), (yyvsp[(3) - (6)].trees), retselid, wm );
+		if (SPAR_REQ_TOP == (yyval.tree)->type)
+		  sparp_expand_top_retvals (sparp_arg, (yyval.tree), 0 /* never cloned, hence 0 == safely_copy_all_vars */); }
     break;
 
   case 78:
 
-/* Line 1455 of yacc.c  */
-#line 770 "./sparql_p.y"
-    {
-		spar_selid_pop (sparp_arg);
-		sparp_arg->sparp_env->spare_bindings_vars = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
+/* Line 1464 of yacc.c  */
+#line 797 "./sparql_p.y"
+    { (yyval.token_type) = SELECT_L; }
     break;
 
   case 79:
 
-/* Line 1455 of yacc.c  */
-#line 773 "./sparql_p.y"
-    {
-		sparp_arg->sparp_env->spare_bindings_rowset = (SPART ***)t_revlist_to_array ((yyvsp[(6) - (7)].backstack));
-		(yyval.tree) = spartlist (sparp_arg, 4, SPAR_BINDINGS_INV, 0,
-			sparp_arg->sparp_env->spare_bindings_vars,
-			sparp_arg->sparp_env->spare_bindings_rowset );
-		spar_alloc_fake_equivs_for_bindings_inv (sparp_arg, (yyval.tree)); }
+/* Line 1464 of yacc.c  */
+#line 798 "./sparql_p.y"
+    { (yyval.token_type) = SELECT_L; }
     break;
 
   case 80:
 
-/* Line 1455 of yacc.c  */
-#line 782 "./sparql_p.y"
-    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 799 "./sparql_p.y"
+    { (yyval.token_type) = DISTINCT_L; }
     break;
 
   case 81:
 
-/* Line 1455 of yacc.c  */
-#line 783 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), spar_make_variable (sparp_arg, (yyvsp[(2) - (2)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 800 "./sparql_p.y"
+    { (yyval.token_type) = COUNT_DISTINCT_L; }
     break;
 
   case 82:
 
-/* Line 1455 of yacc.c  */
-#line 787 "./sparql_p.y"
-    { ; }
+/* Line 1464 of yacc.c  */
+#line 804 "./sparql_p.y"
+    { (yyval.token_type) = sparp_arg->sparp_rset_lexdepth_plus_1; sparp_arg->sparp_rset_lexdepth_plus_1 = sparp_arg->sparp_lexdepth + 1; }
     break;
 
   case 83:
 
-/* Line 1455 of yacc.c  */
-#line 788 "./sparql_p.y"
-    { ; }
+/* Line 1464 of yacc.c  */
+#line 805 "./sparql_p.y"
+    { sparp_arg->sparp_rset_lexdepth_plus_1 = (yyvsp[(1) - (2)].token_type); (yyval.trees) = (yyvsp[(2) - (2)].trees); }
     break;
 
   case 84:
 
-/* Line 1455 of yacc.c  */
-#line 789 "./sparql_p.y"
-    { sparyyerror ("Global variable can not be used in the header of BINDINGS"); }
+/* Line 1464 of yacc.c  */
+#line 809 "./sparql_p.y"
+    { (yyval.trees) = (SPART **) _STAR; }
     break;
 
   case 85:
 
-/* Line 1455 of yacc.c  */
-#line 793 "./sparql_p.y"
-    { (yyval.backstack) = NULL; }
+/* Line 1464 of yacc.c  */
+#line 811 "./sparql_p.y"
+    { (yyval.trees) = (SPART **) t_revlist_to_array ((yyvsp[(1) - (1)].backstack)); }
     break;
 
   case 86:
 
-/* Line 1455 of yacc.c  */
-#line 794 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (1)].backstack); }
+/* Line 1464 of yacc.c  */
+#line 812 "./sparql_p.y"
+    {
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_VIRTSPECIFIC, "comma-delimited list of result set expressions");
+		(yyval.trees) = (SPART **) t_revlist_to_array ((yyvsp[(1) - (1)].backstack)); }
     break;
 
   case 87:
 
-/* Line 1455 of yacc.c  */
-#line 798 "./sparql_p.y"
-    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)); }
+/* Line 1464 of yacc.c  */
+#line 818 "./sparql_p.y"
+    {
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
     break;
 
   case 88:
 
-/* Line 1455 of yacc.c  */
-#line 799 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].trees)); }
+/* Line 1464 of yacc.c  */
+#line 822 "./sparql_p.y"
+    {
+                const char *formatter, *agg_formatter, *agg_mdata;
+		SPART *where_gp = spar_gp_finalize (sparp_arg, NULL);
+		SPART *wm = (yyvsp[(6) - (7)].tree);
+		caddr_t retselid = spar_selid_pop (sparp_arg);
+		wm->_.wm.where_gp = where_gp;
+		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, CONSTRUCT_L, NULL,
+                  retselid, wm );
+                ssg_find_formatter_by_name_and_subtype ((yyval.tree)->_.req_top.formatmode_name, CONSTRUCT_L, &formatter, &agg_formatter, &agg_mdata);
+                spar_compose_retvals_of_construct (sparp_arg, (yyval.tree), (yyvsp[(3) - (7)].tree), formatter, agg_formatter, agg_mdata); }
     break;
 
   case 89:
 
-/* Line 1455 of yacc.c  */
-#line 803 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 836 "./sparql_p.y"
+    {
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+    break;
+
+  case 90:
+
+/* Line 1464 of yacc.c  */
+#line 840 "./sparql_p.y"
+    {
+		SPART * where_gp = spar_gp_finalize (sparp_arg, NULL);
+		SPART *wm = (yyvsp[(6) - (7)].tree);
+		caddr_t retselid = spar_selid_pop (sparp_arg);
+		wm->_.wm.where_gp = where_gp;
+		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, DESCRIBE_L, (yyvsp[(3) - (7)].trees),
+                  retselid, wm );
+		if (((SPART **)_STAR == (yyvsp[(3) - (7)].trees)) && (SPAR_REQ_TOP == (yyval.tree)->type))
+		  sparp_expand_top_retvals (sparp_arg, (yyval.tree), 0 /* never cloned, hence 0 == safely_copy_all_vars */); }
+    break;
+
+  case 91:
+
+/* Line 1464 of yacc.c  */
+#line 852 "./sparql_p.y"
+    { (yyval.trees) = (SPART **) _STAR; }
+    break;
+
+  case 92:
+
+/* Line 1464 of yacc.c  */
+#line 853 "./sparql_p.y"
+    { (yyval.trees) = (SPART **) t_list_to_array ((yyvsp[(1) - (1)].backstack)); }
+    break;
+
+  case 93:
+
+/* Line 1464 of yacc.c  */
+#line 857 "./sparql_p.y"
+    {
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+                t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+    break;
+
+  case 94:
+
+/* Line 1464 of yacc.c  */
+#line 861 "./sparql_p.y"
+    {
+		SPART * where_gp = spar_gp_finalize (sparp_arg, NULL);
+		(yyval.tree) = spar_make_top (sparp_arg, ASK_L, (SPART **)t_list(0), spar_selid_pop (sparp_arg),
+		  where_gp, NULL, NULL, NULL, (SPART *)t_box_num(1), (SPART *)t_box_num(0) ); }
+    break;
+
+  case 95:
+
+/* Line 1464 of yacc.c  */
+#line 868 "./sparql_p.y"
+    { }
+    break;
+
+  case 96:
+
+/* Line 1464 of yacc.c  */
+#line 869 "./sparql_p.y"
+    { }
+    break;
+
+  case 97:
+
+/* Line 1464 of yacc.c  */
+#line 877 "./sparql_p.y"
+    {
+		sparp_make_and_push_new_graph_source (sparp_arg, (yyvsp[(1) - (3)].token_type), (yyvsp[(2) - (3)].tree), (yyvsp[(3) - (3)].trees)); }
+    break;
+
+  case 98:
+
+/* Line 1464 of yacc.c  */
+#line 882 "./sparql_p.y"
+    {
+		if (NULL != sparp_arg->sparp_env->spare_src.ssrc_graph_set_by_with)
+		  sparyyerror ("FROM can not be used in combination with WITH, use either consistent SPARUL syntax or SPARQL 1.1 syntax, not a mix");
+		(yyval.token_type) = (yyvsp[(1) - (1)].token_type); }
+    break;
+
+  case 99:
+
+/* Line 1464 of yacc.c  */
+#line 886 "./sparql_p.y"
     {
-		(yyval.trees) = t_revlist_to_array ((yyvsp[(2) - (3)].backstack));
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "USING keyword");
+		(yyval.token_type) = (yyvsp[(1) - (1)].token_type); }
+    break;
+
+  case 100:
+
+/* Line 1464 of yacc.c  */
+#line 892 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_FROM; }
+    break;
+
+  case 101:
+
+/* Line 1464 of yacc.c  */
+#line 893 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_NAMED; }
+    break;
+
+  case 102:
+
+/* Line 1464 of yacc.c  */
+#line 894 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_NOT_FROM; }
+    break;
+
+  case 103:
+
+/* Line 1464 of yacc.c  */
+#line 895 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_NOT_NAMED; }
+    break;
+
+  case 104:
+
+/* Line 1464 of yacc.c  */
+#line 899 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_FROM; }
+    break;
+
+  case 105:
+
+/* Line 1464 of yacc.c  */
+#line 900 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_NAMED; }
+    break;
+
+  case 106:
+
+/* Line 1464 of yacc.c  */
+#line 901 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_NOT_FROM; }
+    break;
+
+  case 107:
+
+/* Line 1464 of yacc.c  */
+#line 902 "./sparql_p.y"
+    { (yyval.token_type) = SPART_GRAPH_NOT_NAMED; }
+    break;
+
+  case 108:
+
+/* Line 1464 of yacc.c  */
+#line 906 "./sparql_p.y"
+    { (yyval.trees) = NULL; }
+    break;
+
+  case 109:
+
+/* Line 1464 of yacc.c  */
+#line 907 "./sparql_p.y"
+    { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_OPTION, "OPTION () sponge configuration"); }
+    break;
+
+  case 110:
+
+/* Line 1464 of yacc.c  */
+#line 908 "./sparql_p.y"
+    { (yyval.trees) = (yyvsp[(4) - (4)].trees); }
+    break;
+
+  case 111:
+
+/* Line 1464 of yacc.c  */
+#line 912 "./sparql_p.y"
+    { (yyval.trees) = (SPART **)t_list (0); }
+    break;
+
+  case 112:
+
+/* Line 1464 of yacc.c  */
+#line 913 "./sparql_p.y"
+    { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(1) - (2)].backstack)); }
+    break;
+
+  case 113:
+
+/* Line 1464 of yacc.c  */
+#line 917 "./sparql_p.y"
+    {	/* [Virt]	SpongeOption	 ::=  QNAME PrecodeExpn */
+		(yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (2)].box)); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
+    break;
+
+  case 114:
+
+/* Line 1464 of yacc.c  */
+#line 919 "./sparql_p.y"
+    {
+		(yyval.backstack) = (yyvsp[(1) - (4)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (4)].box)); t_set_push (&((yyval.backstack)), (yyvsp[(4) - (4)].tree)); }
+    break;
+
+  case 115:
+
+/* Line 1464 of yacc.c  */
+#line 924 "./sparql_p.y"
+    { sparp_arg->sparp_in_precode_expn = 1; }
+    break;
+
+  case 116:
+
+/* Line 1464 of yacc.c  */
+#line 926 "./sparql_p.y"
+    { sparp_arg->sparp_in_precode_expn = 0; (yyval.tree) = (yyvsp[(2) - (2)].tree); }
+    break;
+
+  case 117:
+
+/* Line 1464 of yacc.c  */
+#line 930 "./sparql_p.y"
+    {
+		sparp_arg->sparp_allow_aggregates_in_expn &= ~1;
+		spar_gp_init (sparp_arg, WHERE_L); }
+    break;
+
+  case 118:
+
+/* Line 1464 of yacc.c  */
+#line 933 "./sparql_p.y"
+    {;}
+    break;
+
+  case 119:
+
+/* Line 1464 of yacc.c  */
+#line 937 "./sparql_p.y"
+    {
+		sparp_arg->sparp_allow_aggregates_in_expn &= ~1;
+		spar_gp_init (sparp_arg, WHERE_L); }
+    break;
+
+  case 120:
+
+/* Line 1464 of yacc.c  */
+#line 940 "./sparql_p.y"
+    {;}
+    break;
+
+  case 121:
+
+/* Line 1464 of yacc.c  */
+#line 941 "./sparql_p.y"
+    {
+		sparp_arg->sparp_allow_aggregates_in_expn &= ~1;
+		spar_gp_init (sparp_arg, WHERE_L); }
+    break;
+
+  case 122:
+
+/* Line 1464 of yacc.c  */
+#line 944 "./sparql_p.y"
+    {;}
+    break;
+
+  case 123:
+
+/* Line 1464 of yacc.c  */
+#line 948 "./sparql_p.y"
+    {;}
+    break;
+
+  case 124:
+
+/* Line 1464 of yacc.c  */
+#line 952 "./sparql_p.y"
+    { (yyval.tree) = NULL; }
+    break;
+
+  case 126:
+
+/* Line 1464 of yacc.c  */
+#line 957 "./sparql_p.y"
+    {
+		if (NULL != sparp_arg->sparp_env->spare_bindings_vars)
+		  sparyyerror ("Only one BINDINGS clause per query is allowed");
+		if (sparp_arg->sparp_macro_mode)
+		  sparyyerror ("BINDINGS can not be used inside macro");
+		spar_selid_push (sparp_arg); }
+    break;
+
+  case 127:
+
+/* Line 1464 of yacc.c  */
+#line 963 "./sparql_p.y"
+    {
+		spar_selid_pop (sparp_arg);
+		sparp_arg->sparp_env->spare_bindings_vars = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
+    break;
+
+  case 128:
+
+/* Line 1464 of yacc.c  */
+#line 966 "./sparql_p.y"
+    {
+		sparp_arg->sparp_env->spare_bindings_rowset = (SPART ***)t_revlist_to_array ((yyvsp[(6) - (7)].backstack));
+		(yyval.tree) = spartlist (sparp_arg, 4, SPAR_BINDINGS_INV, 0,
+			sparp_arg->sparp_env->spare_bindings_vars,
+			sparp_arg->sparp_env->spare_bindings_rowset );
+		spar_alloc_fake_equivs_for_bindings_inv (sparp_arg, (yyval.tree)); }
+    break;
+
+  case 129:
+
+/* Line 1464 of yacc.c  */
+#line 975 "./sparql_p.y"
+    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].box))); }
+    break;
+
+  case 130:
+
+/* Line 1464 of yacc.c  */
+#line 976 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), spar_make_variable (sparp_arg, (yyvsp[(2) - (2)].box))); }
+    break;
+
+  case 131:
+
+/* Line 1464 of yacc.c  */
+#line 980 "./sparql_p.y"
+    { ; }
+    break;
+
+  case 132:
+
+/* Line 1464 of yacc.c  */
+#line 981 "./sparql_p.y"
+    { sparyyerror ("Global variable can not be used in the header of BINDINGS"); }
+    break;
+
+  case 133:
+
+/* Line 1464 of yacc.c  */
+#line 985 "./sparql_p.y"
+    { (yyval.backstack) = NULL; }
+    break;
+
+  case 135:
+
+/* Line 1464 of yacc.c  */
+#line 990 "./sparql_p.y"
+    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)); }
+    break;
+
+  case 136:
+
+/* Line 1464 of yacc.c  */
+#line 991 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].trees)); }
+    break;
+
+  case 137:
+
+/* Line 1464 of yacc.c  */
+#line 995 "./sparql_p.y"
+    {
+		(yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(2) - (3)].backstack));
 		if (BOX_ELEMENTS ((yyval.trees)) != BOX_ELEMENTS (sparp_arg->sparp_env->spare_bindings_vars))
 		  sparyyerror ("Number of values in a binding does not match number of variables to bind"); }
     break;
 
-  case 90:
+  case 138:
 
-/* Line 1455 of yacc.c  */
-#line 810 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1002 "./sparql_p.y"
     {(yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 91:
+  case 139:
 
-/* Line 1455 of yacc.c  */
-#line 811 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1003 "./sparql_p.y"
     {(yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 97:
+  case 145:
 
-/* Line 1455 of yacc.c  */
-#line 820 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1012 "./sparql_p.y"
     {(yyval.tree) = NULL; }
     break;
 
-  case 98:
+  case 146:
 
-/* Line 1455 of yacc.c  */
-#line 825 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1017 "./sparql_p.y"
     { (yyval.tree) = spar_make_wm (sparp_arg, NULL, (SPART **)t_revlist_to_array ((yyvsp[(1) - (3)].backstack)), (yyvsp[(2) - (3)].tree), (SPART **)t_revlist_to_array ((yyvsp[(3) - (3)].backstack)), (SPART *)t_box_num (SPARP_MAXLIMIT), (SPART *)t_box_num (0)); }
     break;
 
-  case 99:
+  case 147:
 
-/* Line 1455 of yacc.c  */
-#line 826 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1018 "./sparql_p.y"
     { (yyval.tree) = spar_make_wm (sparp_arg, NULL, (SPART **)t_revlist_to_array ((yyvsp[(1) - (5)].backstack)), (yyvsp[(2) - (5)].tree), (SPART **)t_revlist_to_array ((yyvsp[(3) - (5)].backstack)), (yyvsp[(4) - (5)].tree), (yyvsp[(5) - (5)].tree)); }
     break;
 
-  case 100:
+  case 148:
 
-/* Line 1455 of yacc.c  */
-#line 827 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1019 "./sparql_p.y"
     { (yyval.tree) = spar_make_wm (sparp_arg, NULL, (SPART **)t_revlist_to_array ((yyvsp[(1) - (5)].backstack)), (yyvsp[(2) - (5)].tree), (SPART **)t_revlist_to_array ((yyvsp[(3) - (5)].backstack)), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 101:
+  case 149:
 
-/* Line 1455 of yacc.c  */
-#line 831 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1023 "./sparql_p.y"
     { (yyval.backstack) = NULL; }
     break;
 
-  case 102:
+  case 150:
 
-/* Line 1455 of yacc.c  */
-#line 832 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1024 "./sparql_p.y"
     {
 		spar_selid_push_reused (sparp_arg, sparp_arg->sparp_env->spare_top_retval_selid);
 		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
     break;
 
-  case 103:
+  case 151:
 
-/* Line 1455 of yacc.c  */
-#line 835 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1027 "./sparql_p.y"
     {
 		spar_selid_pop (sparp_arg); (yyval.backstack) = (yyvsp[(4) - (4)].backstack);
 		sparp_arg->sparp_allow_aggregates_in_expn &= ~1; }
     break;
 
-  case 104:
+  case 152:
 
-/* Line 1455 of yacc.c  */
-#line 841 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1033 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 105:
+  case 153:
 
-/* Line 1455 of yacc.c  */
-#line 842 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1034 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 106:
+  case 154:
 
-/* Line 1455 of yacc.c  */
-#line 847 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1039 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
-  case 107:
+  case 155:
 
-/* Line 1455 of yacc.c  */
-#line 848 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1040 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
-  case 111:
+  case 159:
 
-/* Line 1455 of yacc.c  */
-#line 855 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1047 "./sparql_p.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 112:
+  case 160:
 
-/* Line 1455 of yacc.c  */
-#line 856 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1048 "./sparql_p.y"
     {
 		spar_selid_push_reused (sparp_arg, sparp_arg->sparp_env->spare_top_retval_selid);
 		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
     break;
 
-  case 113:
+  case 161:
 
-/* Line 1455 of yacc.c  */
-#line 859 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1051 "./sparql_p.y"
     {
 		spar_selid_pop (sparp_arg); (yyval.tree) = (yyvsp[(3) - (3)].tree);
 		sparp_arg->sparp_allow_aggregates_in_expn &= ~1; }
     break;
 
-  case 114:
+  case 162:
 
-/* Line 1455 of yacc.c  */
-#line 865 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1057 "./sparql_p.y"
     { (yyval.backstack) = NULL; }
     break;
 
-  case 115:
+  case 163:
 
-/* Line 1455 of yacc.c  */
-#line 866 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1058 "./sparql_p.y"
     {
 		spar_selid_push_reused (sparp_arg, sparp_arg->sparp_env->spare_top_retval_selid);
 		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
     break;
 
-  case 116:
+  case 164:
 
-/* Line 1455 of yacc.c  */
-#line 869 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1061 "./sparql_p.y"
     {
 		spar_selid_pop (sparp_arg); (yyval.backstack) = (yyvsp[(4) - (4)].backstack);
 		sparp_arg->sparp_allow_aggregates_in_expn &= ~1; }
     break;
 
-  case 117:
+  case 165:
 
-/* Line 1455 of yacc.c  */
-#line 875 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1067 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 118:
+  case 166:
 
-/* Line 1455 of yacc.c  */
-#line 876 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1068 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 119:
+  case 167:
 
-/* Line 1455 of yacc.c  */
-#line 881 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1073 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 3, ORDER_L, (ptrlong)(yyvsp[(1) - (4)].token_type), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 120:
+  case 168:
 
-/* Line 1455 of yacc.c  */
-#line 882 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1074 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 3, ORDER_L, (ptrlong)(yyvsp[(1) - (4)].token_type), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 121:
+  case 169:
 
-/* Line 1455 of yacc.c  */
-#line 883 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1075 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 3, ORDER_L, (ptrlong)(yyvsp[(1) - (2)].token_type), (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 122:
+  case 170:
 
-/* Line 1455 of yacc.c  */
-#line 884 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1076 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 3, ORDER_L, (ptrlong)ASC_L, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 123:
+  case 171:
 
-/* Line 1455 of yacc.c  */
-#line 885 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1077 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 3, ORDER_L, (ptrlong)ASC_L, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 124:
+  case 172:
 
-/* Line 1455 of yacc.c  */
-#line 886 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1078 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 3, ORDER_L, (ptrlong)ASC_L, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 125:
+  case 173:
 
-/* Line 1455 of yacc.c  */
-#line 890 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1082 "./sparql_p.y"
     { (yyval.token_type) = ASC_L; }
     break;
 
-  case 126:
+  case 174:
 
-/* Line 1455 of yacc.c  */
-#line 891 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1083 "./sparql_p.y"
     { (yyval.token_type) = ASC_L; }
     break;
 
-  case 127:
+  case 175:
 
-/* Line 1455 of yacc.c  */
-#line 892 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1084 "./sparql_p.y"
     { (yyval.token_type) = DESC_L; }
     break;
 
-  case 128:
+  case 176:
 
-/* Line 1455 of yacc.c  */
-#line 896 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1088 "./sparql_p.y"
     { (yyval.tree) = (SPART *)t_box_num (SPARP_MAXLIMIT); }
     break;
 
-  case 130:
+  case 178:
 
-/* Line 1455 of yacc.c  */
-#line 901 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1093 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 131:
+  case 179:
 
-/* Line 1455 of yacc.c  */
-#line 905 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1097 "./sparql_p.y"
     { (yyval.tree) = (SPART *)t_box_num (0); }
     break;
 
-  case 133:
+  case 181:
 
-/* Line 1455 of yacc.c  */
-#line 910 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1102 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 134:
+  case 182:
 
-/* Line 1455 of yacc.c  */
-#line 914 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1106 "./sparql_p.y"
     {
 		(yyval.tree) = spar_gp_finalize (sparp_arg, (yyvsp[(3) - (3)].trees));
 		sparp_validate_options_of_tree (sparp_arg, (yyval.tree), (yyval.tree)->_.gp.options); }
     break;
 
-  case 135:
+  case 183:
 
-/* Line 1455 of yacc.c  */
-#line 917 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1109 "./sparql_p.y"
     {
+		(yyval.token_type) = (ptrlong)(sparp_env()->spare_context_gp_subtypes->data);
 		if (NULL == sparp_env()->spare_context_sinvs) { /* There's an exception related to codegen-time optimization SERVICE { SELECT {x}} like it is SERVICE {x}, so no error right here. */
 		    SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "subquery"); }
+		if (SERVICE_L == (yyval.token_type))
+		  spar_gp_init (sparp_arg, SELECT_L);
 		spar_env_push (sparp_arg);
 		spar_selid_push (sparp_arg);
                 t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
@@ -4343,15 +4712,16 @@ yyreduce:
 		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
     break;
 
-  case 136:
+  case 184:
 
-/* Line 1455 of yacc.c  */
-#line 927 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1122 "./sparql_p.y"
     {
 		SPART *subselect_top;
 		SPART *where_gp;
 	        caddr_t retselid;
 		SPART *wm = (yyvsp[(6) - (8)].tree);
+		SPART *res;
 		where_gp = spar_gp_finalize (sparp_arg, NULL);
 		retselid = spar_selid_pop (sparp_arg);
 		wm->_.wm.where_gp = where_gp;
@@ -4360,164 +4730,190 @@ yyreduce:
 		if (SPAR_REQ_TOP == subselect_top->type)
 		  sparp_expand_top_retvals (sparp_arg, subselect_top, 1 /* safely_copy_all_vars */);
 		spar_env_pop (sparp_arg);
-		(yyval.tree) = spar_gp_finalize_with_subquery (sparp_arg, (yyvsp[(8) - (8)].trees), subselect_top);
+		res = spar_gp_finalize_with_subquery (sparp_arg, (yyvsp[(8) - (8)].trees), subselect_top);
+		if (SERVICE_L == (yyvsp[(2) - (8)].token_type))
+		  {
+		    spar_gp_add_member (sparp_arg, res);
+		    res = spar_gp_finalize (sparp_arg, NULL);
+		  }
+		(yyval.tree) = res;
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
     break;
 
-  case 137:
+  case 185:
 
-/* Line 1455 of yacc.c  */
-#line 945 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1147 "./sparql_p.y"
     { }
     break;
 
-  case 138:
+  case 186:
 
-/* Line 1455 of yacc.c  */
-#line 946 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1148 "./sparql_p.y"
     { }
     break;
 
-  case 139:
+  case 187:
 
-/* Line 1455 of yacc.c  */
-#line 947 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1149 "./sparql_p.y"
     { }
     break;
 
-  case 140:
+  case 188:
+
+/* Line 1464 of yacc.c  */
+#line 1150 "./sparql_p.y"
+    {
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  {
+		    SPART *curmacro = sparp_arg->sparp_current_macro;
+		    SPART *mpu;
+		    int pos = sparp_namesake_macro_param (sparp_arg, curmacro, (yyvsp[(1) - (3)].box));
+		    if (0 > pos)
+		      spar_error (sparp_arg, "Pattern variable '%.100s' inside the body of a macro '%.100s' is not listed in list of macro parameters",
+		        (yyvsp[(1) - (3)].box), curmacro->_.defmacro.mname );
+		    mpu = spar_make_macropu (sparp_arg, (yyvsp[(1) - (3)].box), pos);
+		    spar_gp_add_member (sparp_arg, mpu);
+		  }
+		else
+		  sparyyerror ("Ill formed triple pattern or macro pattern variable outside a macro body"); }
+    break;
+
+  case 189:
 
-/* Line 1455 of yacc.c  */
-#line 951 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1167 "./sparql_p.y"
     { spar_gp_add_member (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 141:
+  case 190:
 
-/* Line 1455 of yacc.c  */
-#line 952 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1168 "./sparql_p.y"
     { spar_gp_add_member (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 142:
+  case 191:
 
-/* Line 1455 of yacc.c  */
-#line 953 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1169 "./sparql_p.y"
     { spar_gp_add_member (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 143:
+  case 192:
 
-/* Line 1455 of yacc.c  */
-#line 954 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1170 "./sparql_p.y"
     { spar_gp_add_member (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 144:
+  case 193:
 
-/* Line 1455 of yacc.c  */
-#line 955 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1171 "./sparql_p.y"
     { spar_gp_add_member (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 145:
+  case 194:
 
-/* Line 1455 of yacc.c  */
-#line 956 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1172 "./sparql_p.y"
     { spar_gp_add_filter (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 146:
+  case 195:
 
-/* Line 1455 of yacc.c  */
-#line 960 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1176 "./sparql_p.y"
     { spar_gp_init (sparp_arg, OPTIONAL_L); }
     break;
 
-  case 147:
+  case 196:
 
-/* Line 1455 of yacc.c  */
-#line 960 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1176 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(4) - (4)].tree); }
     break;
 
-  case 148:
+  case 197:
 
-/* Line 1455 of yacc.c  */
-#line 961 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1177 "./sparql_p.y"
     { sparyyerror ("Missing '{' after OPTIONAL keyword"); }
     break;
 
-  case 149:
+  case 198:
 
-/* Line 1455 of yacc.c  */
-#line 965 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1181 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_QUAD_MAP, "QUAD MAP { ... } group pattern"); }
     break;
 
-  case 150:
+  case 199:
 
-/* Line 1455 of yacc.c  */
-#line 966 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1182 "./sparql_p.y"
     { t_set_push (&(sparp_env()->spare_context_qms), (yyvsp[(4) - (4)].tree)); }
     break;
 
-  case 151:
+  case 200:
 
-/* Line 1455 of yacc.c  */
-#line 967 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1183 "./sparql_p.y"
     {
 		spar_gp_init (sparp_arg, 0); }
     break;
 
-  case 152:
+  case 201:
 
-/* Line 1455 of yacc.c  */
-#line 969 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1185 "./sparql_p.y"
     { t_set_pop (&(sparp_env()->spare_context_qms)); (yyval.tree) = (yyvsp[(8) - (8)].tree); }
     break;
 
-  case 153:
+  case 202:
 
-/* Line 1455 of yacc.c  */
-#line 974 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1190 "./sparql_p.y"
     { t_set_push (&(sparp_env()->spare_context_graphs), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 154:
+  case 203:
 
-/* Line 1455 of yacc.c  */
-#line 975 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1191 "./sparql_p.y"
     {
 		spar_gp_init (sparp_arg, 0);
 		spar_gp_add_filters_for_named_graph (sparp_arg); }
     break;
 
-  case 155:
+  case 204:
 
-/* Line 1455 of yacc.c  */
-#line 978 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1194 "./sparql_p.y"
     { t_set_pop (&(sparp_env()->spare_context_graphs)); (yyval.tree) = (yyvsp[(6) - (6)].tree); }
     break;
 
-  case 156:
+  case 205:
 
-/* Line 1455 of yacc.c  */
-#line 982 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1198 "./sparql_p.y"
     { spar_gp_init (sparp_arg, 0); }
     break;
 
-  case 157:
+  case 206:
 
-/* Line 1455 of yacc.c  */
-#line 982 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1198 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
-  case 158:
+  case 207:
 
-/* Line 1455 of yacc.c  */
-#line 983 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1199 "./sparql_p.y"
     {
                 sparp_env()->spare_good_graph_varnames = sparp_env()->spare_good_graph_bmk;
 		spar_gp_init (sparp_arg, UNION_L);
@@ -4525,74 +4921,74 @@ yyreduce:
 		spar_gp_init (sparp_arg, 0); }
     break;
 
-  case 159:
+  case 208:
 
-/* Line 1455 of yacc.c  */
-#line 988 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1204 "./sparql_p.y"
     {
 		spar_gp_add_member (sparp_arg, (yyvsp[(5) - (5)].tree));
 		(yyval.tree) = spar_gp_finalize (sparp_arg, NULL); }
     break;
 
-  case 160:
+  case 209:
 
-/* Line 1455 of yacc.c  */
-#line 994 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1210 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(3) - (4)].tree); }
     break;
 
-  case 161:
+  case 210:
 
-/* Line 1455 of yacc.c  */
-#line 995 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1211 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 162:
+  case 211:
 
-/* Line 1455 of yacc.c  */
-#line 996 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1212 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 163:
+  case 212:
 
-/* Line 1455 of yacc.c  */
-#line 997 "./sparql_p.y"
-    {		/*... | 'NOT'? 'EXISTS' DatasetClause* WhereClause */
+/* Line 1464 of yacc.c  */
+#line 1213 "./sparql_p.y"
+    {		/*... | 'NOT'? 'EXISTS' DatasetClause* WhereClause	*/
 		if ((yyvsp[(2) - (3)].token_type))
 		  (yyval.tree) = (yyvsp[(3) - (3)].tree);
 		else
 		  SPAR_BIN_OP ((yyval.tree), BOP_NOT, (yyvsp[(3) - (3)].tree), NULL); }
     break;
 
-  case 164:
+  case 213:
 
-/* Line 1455 of yacc.c  */
-#line 1002 "./sparql_p.y"
-    {		/*... | 'NOT'? 'EXISTS' DatasetClause* WhereClause */
+/* Line 1464 of yacc.c  */
+#line 1218 "./sparql_p.y"
+    {		/*... | 'MINUS' DatasetClause* WhereClause */
 		/*!!! Dirty hack! Works wrong if MINUS is at the middle of the GP (before smth or not a 2-nd item) */
 		  SPAR_BIN_OP ((yyval.tree), BOP_NOT, (yyvsp[(2) - (2)].tree), NULL); }
     break;
 
-  case 165:
+  case 214:
 
-/* Line 1455 of yacc.c  */
-#line 1008 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1224 "./sparql_p.y"
     { (yyval.token_type) = 1; }
     break;
 
-  case 166:
+  case 215:
 
-/* Line 1455 of yacc.c  */
-#line 1009 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1225 "./sparql_p.y"
     { (yyval.token_type) = 0; }
     break;
 
-  case 167:
+  case 216:
 
-/* Line 1455 of yacc.c  */
-#line 1013 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1229 "./sparql_p.y"
     {
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "SPARQL 1.1 FILTER EXISTS / FILTER NOT EXISTS test");
 		spar_gp_init (sparp_arg, SELECT_L);
@@ -4602,10 +4998,10 @@ yyreduce:
 		sparp_arg->sparp_allow_aggregates_in_expn <<= 1; }
     break;
 
-  case 168:
+  case 217:
 
-/* Line 1455 of yacc.c  */
-#line 1022 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1238 "./sparql_p.y"
     {
 		SPART *subselect_top;
 		SPART *where_gp;
@@ -4617,10 +5013,10 @@ yyreduce:
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
     break;
 
-  case 169:
+  case 218:
 
-/* Line 1455 of yacc.c  */
-#line 1034 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1250 "./sparql_p.y"
     {
 		sparp_arg->sparp_query_uses_sinvs++;
 		(yyval.token_type) = sparp_arg->sparp_permitted_syntax;
@@ -4628,36 +5024,37 @@ yyreduce:
 		}
     break;
 
-  case 170:
+  case 219:
 
-/* Line 1455 of yacc.c  */
-#line 1039 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1255 "./sparql_p.y"
     {
 		(yyval.box) = t_alloc (sizeof (sparp_sources_t));
 		memcpy ((yyval.box), &(sparp_arg->sparp_env->spare_src), sizeof (sparp_sources_t));
 		memset (&(sparp_arg->sparp_env->spare_src), 0, sizeof (sparp_sources_t)); }
     break;
 
-  case 171:
+  case 220:
 
-/* Line 1455 of yacc.c  */
-#line 1043 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1259 "./sparql_p.y"
     {
 		SPART **sources;
 		caddr_t sinv_storage_uri = uname_virtrdf_ns_uri_DefaultServiceStorage /*!!! TBD config */;
 		SPART *sinv;
-		if ((NULL == sparp_arg->sparp_env->spare_default_graphs) && (NULL == sparp_arg->sparp_env->spare_named_graphs))
+		if ((NULL == sparp_arg->sparp_env->spare_src.ssrc_default_graphs) && (NULL == sparp_arg->sparp_env->spare_src.ssrc_named_graphs))
 		  memcpy (&(sparp_arg->sparp_env->spare_src), (yyvsp[(5) - (7)].box), sizeof (sparp_sources_t));
-		sources = spar_make_sources_like_top (sparp_arg);
+		sources = spar_make_sources_like_top (sparp_arg, SELECT_L);
 		sinv = spar_make_service_inv (sparp_arg, (yyvsp[(2) - (7)].box), (yyvsp[(4) - (7)].backstack), sparp_arg->sparp_permitted_syntax, sources, sinv_storage_uri);
+		spar_add_service_inv_to_sg (sparp_arg, sinv);
 		t_set_push (&(sparp_env()->spare_context_sinvs), sinv);
 		spar_gp_init (sparp_arg, SERVICE_L); }
     break;
 
-  case 172:
+  case 221:
 
-/* Line 1455 of yacc.c  */
-#line 1053 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1270 "./sparql_p.y"
     {
 		sparp_arg->sparp_permitted_syntax = (yyvsp[(3) - (9)].token_type);
 		(yyvsp[(9) - (9)].tree)->_.gp.options = (SPART **)t_list_concat_tail (
@@ -4667,45 +5064,45 @@ yyreduce:
 		(yyval.tree) = (yyvsp[(9) - (9)].tree); }
     break;
 
-  case 173:
+  case 222:
 
-/* Line 1455 of yacc.c  */
-#line 1062 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1279 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (SPART *)((ptrlong)IN_L)); t_set_push (&((yyval.backstack)), (SPART *)((ptrlong)_STAR)); }
     break;
 
-  case 174:
+  case 223:
 
-/* Line 1455 of yacc.c  */
-#line 1063 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1280 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(2) - (3)].backstack); }
     break;
 
-  case 175:
+  case 224:
 
-/* Line 1455 of yacc.c  */
-#line 1067 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1284 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[0]); t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[1]); }
     break;
 
-  case 176:
+  case 225:
 
-/* Line 1455 of yacc.c  */
-#line 1068 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1285 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].trees)[0]); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].trees)[1]); }
     break;
 
-  case 177:
+  case 226:
 
-/* Line 1455 of yacc.c  */
-#line 1072 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1289 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (yyvsp[(1) - (2)].box), (yyvsp[(2) - (2)].backstack)); }
     break;
 
-  case 178:
+  case 227:
 
-/* Line 1455 of yacc.c  */
-#line 1073 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1290 "./sparql_p.y"
     {
 		caddr_t defname = (yyvsp[(2) - (3)].box);
 		dk_set_t defvals = (yyvsp[(3) - (3)].backstack);
@@ -4718,301 +5115,367 @@ yyreduce:
 		(yyval.trees) = (SPART **)t_list (2, (SPART *)((ptrlong)DEFINE_L), t_list (2, defname, t_revlist_to_array(defvals))); }
     break;
 
-  case 179:
+  case 228:
 
-/* Line 1455 of yacc.c  */
-#line 1083 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1300 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (SPART *)((ptrlong)IN_L), (yyvsp[(2) - (2)].backstack)); }
     break;
 
-  case 180:
+  case 229:
 
-/* Line 1455 of yacc.c  */
-#line 1084 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1301 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (SPART *)((ptrlong)IN_L), (SPART *)((ptrlong)_STAR)); }
     break;
 
-  case 181:
+  case 230:
 
-/* Line 1455 of yacc.c  */
-#line 1088 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1305 "./sparql_p.y"
     { spar_gp_init (sparp_arg, CONSTRUCT_L); }
     break;
 
-  case 182:
+  case 231:
 
-/* Line 1455 of yacc.c  */
-#line 1089 "./sparql_p.y"
-    { (yyval.tree) = spar_gp_finalize (sparp_arg, NULL); }
+/* Line 1464 of yacc.c  */
+#line 1306 "./sparql_p.y"
+    {
+		int g_grp_count = sparp_env()->spare_ctor_g_grp_count;
+		int g_may_vary = 0;
+		(yyval.tree) = spar_gp_finalize (sparp_arg, NULL);
+		if (1 < (g_grp_count + (sparp_env()->spare_ctor_dflt_g_tmpl_count ? 1 : 0)))
+		  g_may_vary = 1;
+		if ((0 == g_may_vary) && (0 < BOX_ELEMENTS ((yyval.tree)->_.gp.members)))
+		  {
+		    SPART *g = (yyval.tree)->_.gp.members[0]->_.triple.tr_graph;
+		    if ((SPAR_QNAME != SPART_TYPE (g)) && !SPART_IS_DEFAULT_GRAPH_BLANK (g))
+		      g_may_vary = 1;
+		  }
+		if (g_may_vary)
+		  (yyval.tree)->_.gp.options = (SPART **)t_list (2, (SPART *)((ptrlong)QUAD_L), t_box_num_nonull (g_grp_count));
+		sparp_env()->spare_ctor_g_grp_count = 0;
+		sparp_env()->spare_ctor_dflt_g_tmpl_count = 0; }
     break;
 
-  case 183:
+  case 232:
 
-/* Line 1455 of yacc.c  */
-#line 1093 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1325 "./sparql_p.y"
     { }
     break;
 
-  case 184:
+  case 233:
 
-/* Line 1455 of yacc.c  */
-#line 1094 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1326 "./sparql_p.y"
     { }
     break;
 
-  case 185:
+  case 234:
 
-/* Line 1455 of yacc.c  */
-#line 1095 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1327 "./sparql_p.y"
     { }
     break;
 
-  case 186:
+  case 235:
 
-/* Line 1455 of yacc.c  */
-#line 1099 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1328 "./sparql_p.y"
     { }
     break;
 
-  case 187:
+  case 236:
 
-/* Line 1455 of yacc.c  */
-#line 1100 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1332 "./sparql_p.y"
     { }
     break;
 
-  case 188:
+  case 237:
 
-/* Line 1455 of yacc.c  */
-#line 1104 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1333 "./sparql_p.y"
     { }
     break;
 
-  case 189:
+  case 238:
 
-/* Line 1455 of yacc.c  */
-#line 1105 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1334 "./sparql_p.y"
     { }
     break;
 
-  case 190:
+  case 239:
 
-/* Line 1455 of yacc.c  */
-#line 1109 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1338 "./sparql_p.y"
     { }
     break;
 
-  case 191:
+  case 240:
 
-/* Line 1455 of yacc.c  */
-#line 1110 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1339 "./sparql_p.y"
     { }
     break;
 
-  case 192:
+  case 241:
 
-/* Line 1455 of yacc.c  */
-#line 1114 "./sparql_p.y"
-    { t_set_push (&(sparp_env()->spare_context_subjects), (yyvsp[(1) - (1)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 1340 "./sparql_p.y"
+    { }
     break;
 
-  case 193:
+  case 242:
 
-/* Line 1455 of yacc.c  */
-#line 1115 "./sparql_p.y"
-    { t_set_pop (&(sparp_env()->spare_context_subjects)); (yyval.nothing) = (yyvsp[(3) - (3)].nothing); }
+/* Line 1464 of yacc.c  */
+#line 1344 "./sparql_p.y"
+    { }
     break;
 
-  case 194:
+  case 243:
 
-/* Line 1455 of yacc.c  */
-#line 1116 "./sparql_p.y"
-    { t_set_push (&(sparp_env()->spare_context_subjects), (yyvsp[(1) - (1)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 1345 "./sparql_p.y"
+    { }
     break;
 
-  case 195:
+  case 244:
 
-/* Line 1455 of yacc.c  */
-#line 1117 "./sparql_p.y"
-    { t_set_pop (&(sparp_env()->spare_context_subjects)); }
+/* Line 1464 of yacc.c  */
+#line 1349 "./sparql_p.y"
+    { }
     break;
 
-  case 196:
+  case 245:
 
-/* Line 1455 of yacc.c  */
-#line 1121 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1350 "./sparql_p.y"
     { }
     break;
 
-  case 197:
+  case 246:
 
-/* Line 1455 of yacc.c  */
-#line 1122 "./sparql_p.y"
-    { }
+/* Line 1464 of yacc.c  */
+#line 1354 "./sparql_p.y"
+    { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "SPARQL 1.1 quad constructor template"); }
+    break;
+
+  case 247:
+
+/* Line 1464 of yacc.c  */
+#line 1355 "./sparql_p.y"
+    {
+		sparp_env()->spare_ctor_g_grp_count++;
+		t_set_push (&(sparp_env()->spare_context_graphs), (yyvsp[(3) - (3)].tree)); }
+    break;
+
+  case 248:
+
+/* Line 1464 of yacc.c  */
+#line 1358 "./sparql_p.y"
+    { t_set_pop (&(sparp_env()->spare_context_graphs)); }
+    break;
+
+  case 249:
+
+/* Line 1464 of yacc.c  */
+#line 1362 "./sparql_p.y"
+    { t_set_push (&(sparp_env()->spare_context_subjects), (yyvsp[(1) - (1)].tree)); }
+    break;
+
+  case 250:
+
+/* Line 1464 of yacc.c  */
+#line 1363 "./sparql_p.y"
+    { t_set_pop (&(sparp_env()->spare_context_subjects)); (yyval.nothing) = (yyvsp[(3) - (3)].nothing); }
+    break;
+
+  case 251:
+
+/* Line 1464 of yacc.c  */
+#line 1364 "./sparql_p.y"
+    { t_set_push (&(sparp_env()->spare_context_subjects), (yyvsp[(1) - (1)].tree)); }
+    break;
+
+  case 252:
+
+/* Line 1464 of yacc.c  */
+#line 1365 "./sparql_p.y"
+    { t_set_pop (&(sparp_env()->spare_context_subjects)); }
+    break;
+
+  case 253:
+
+/* Line 1464 of yacc.c  */
+#line 1366 "./sparql_p.y"
+    { spar_gp_add_member (sparp_arg, (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 198:
+  case 254:
 
-/* Line 1455 of yacc.c  */
-#line 1123 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1370 "./sparql_p.y"
     { }
     break;
 
-  case 199:
+  case 255:
 
-/* Line 1455 of yacc.c  */
-#line 1124 "./sparql_p.y"
-    { sparyyerror ("Dot immediately after semicolon is permitted in pure SPARQL but not in SPARQL-BI"); }
+/* Line 1464 of yacc.c  */
+#line 1371 "./sparql_p.y"
+    { }
     break;
 
-  case 200:
+  case 256:
 
-/* Line 1455 of yacc.c  */
-#line 1128 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1377 "./sparql_p.y"
     { t_set_push (&(sparp_env()->spare_context_predicates), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 201:
+  case 257:
 
-/* Line 1455 of yacc.c  */
-#line 1129 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1378 "./sparql_p.y"
     { t_set_pop (&(sparp_env()->spare_context_predicates)); }
     break;
 
-  case 202:
+  case 258:
 
-/* Line 1455 of yacc.c  */
-#line 1131 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1380 "./sparql_p.y"
     { t_set_push (&(sparp_env()->spare_context_predicates), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 203:
+  case 259:
 
-/* Line 1455 of yacc.c  */
-#line 1132 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1381 "./sparql_p.y"
     { t_set_pop (&(sparp_env()->spare_context_predicates)); }
     break;
 
-  case 204:
+  case 260:
 
-/* Line 1455 of yacc.c  */
-#line 1133 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1382 "./sparql_p.y"
     { sparyyerror ("Dot immediately after semicolon is permitted in pure SPARQL but not in SPARQL-BI"); }
     break;
 
-  case 205:
+  case 261:
 
-/* Line 1455 of yacc.c  */
-#line 1134 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1383 "./sparql_p.y"
     { sparyyerror ("Predicate expected after semicolon"); }
     break;
 
-  case 206:
+  case 262:
 
-/* Line 1455 of yacc.c  */
-#line 1135 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1384 "./sparql_p.y"
     { sparyyerror ("Predicate expected"); }
     break;
 
-  case 207:
+  case 263:
 
-/* Line 1455 of yacc.c  */
-#line 1139 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1388 "./sparql_p.y"
     { }
     break;
 
-  case 208:
+  case 264:
 
-/* Line 1455 of yacc.c  */
-#line 1140 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1389 "./sparql_p.y"
     { }
     break;
 
-  case 209:
+  case 265:
 
-/* Line 1455 of yacc.c  */
-#line 1141 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1390 "./sparql_p.y"
     { sparyyerror ("Semicolon immediately after colon is permitted in pure SPARQL but not in SPARQL-BI"); }
     break;
 
-  case 210:
+  case 266:
 
-/* Line 1455 of yacc.c  */
-#line 1142 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1391 "./sparql_p.y"
     { sparyyerror ("Dot immediately after colon is permitted in pure SPARQL but not in SPARQL-BI"); }
     break;
 
-  case 211:
+  case 267:
 
-/* Line 1455 of yacc.c  */
-#line 1143 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1392 "./sparql_p.y"
     { sparyyerror ("Object expected after comma"); }
     break;
 
-  case 212:
+  case 268:
 
-/* Line 1455 of yacc.c  */
-#line 1144 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1393 "./sparql_p.y"
     { sparyyerror ("Object expected"); }
     break;
 
-  case 213:
+  case 269:
 
-/* Line 1455 of yacc.c  */
-#line 1148 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1397 "./sparql_p.y"
     {
-		spar_gp_add_triple_or_special_filter (sparp_arg, NULL, NULL, NULL, (yyvsp[(1) - (2)].tree), NULL, (yyvsp[(2) - (2)].trees), 0x0); }
+		spar_gp_add_triplelike (sparp_arg, NULL, NULL, NULL, (yyvsp[(1) - (2)].tree), NULL, (yyvsp[(2) - (2)].trees), 0x0); }
     break;
 
-  case 214:
+  case 270:
 
-/* Line 1455 of yacc.c  */
-#line 1153 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1402 "./sparql_p.y"
     { (yyval.trees) = NULL; }
     break;
 
-  case 215:
+  case 271:
 
-/* Line 1455 of yacc.c  */
-#line 1154 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1403 "./sparql_p.y"
     {
 		if (CONSTRUCT_L == SPARP_ENV_CONTEXT_GP_SUBTYPE(sparp_arg))
-		  sparyyerror ("Triple options are not allowed in contructor template");
+		  sparyyerror ("Triple options are not allowed in constructor template");
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_OPTION, "OPTION () triple matching configuration"); }
     break;
 
-  case 216:
+  case 272:
 
-/* Line 1455 of yacc.c  */
-#line 1158 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1407 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(4) - (5)].backstack)); }
     break;
 
-  case 217:
+  case 273:
 
-/* Line 1455 of yacc.c  */
-#line 1162 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1411 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), ((SPART **)((yyvsp[(1) - (1)].trees)))[0]); t_set_push (&((yyval.backstack)), ((SPART **)((yyvsp[(1) - (1)].trees)))[1]); }
     break;
 
-  case 218:
+  case 274:
 
-/* Line 1455 of yacc.c  */
-#line 1163 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1412 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack);  t_set_push (&((yyval.backstack)), ((SPART **)((yyvsp[(3) - (3)].trees)))[0]); t_set_push (&((yyval.backstack)), ((SPART **)((yyvsp[(3) - (3)].trees)))[1]); }
     break;
 
-  case 219:
+  case 275:
 
-/* Line 1455 of yacc.c  */
-#line 1167 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1416 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)IFP_L, (ptrlong)1); }
     break;
 
-  case 220:
+  case 276:
 
-/* Line 1455 of yacc.c  */
-#line 1168 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1417 "./sparql_p.y"
     {
 		if (strcasecmp ((yyvsp[(2) - (2)].box), "none"))
 		  (yyval.trees) = (SPART **)t_list (2, (ptrlong)INFERENCE_L, (yyvsp[(2) - (2)].box));
@@ -5020,278 +5483,278 @@ yyreduce:
 		  (yyval.trees) = (SPART **)t_list (2, (ptrlong)INFERENCE_L, (ptrlong)1); }
     break;
 
-  case 221:
+  case 277:
 
-/* Line 1455 of yacc.c  */
-#line 1173 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1422 "./sparql_p.y"
     {
 		  (yyval.trees) = (SPART **)t_list (2, (ptrlong)INFERENCE_L, sparp_expand_qname_prefix (sparp_arg, (yyvsp[(2) - (2)].box))); }
     break;
 
-  case 222:
+  case 278:
 
-/* Line 1455 of yacc.c  */
-#line 1175 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1424 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)INFERENCE_L, sparp_expand_q_iri_ref (sparp_arg, (yyvsp[(2) - (2)].box))); }
     break;
 
-  case 223:
+  case 279:
 
-/* Line 1455 of yacc.c  */
-#line 1176 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1425 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)INFERENCE_L, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 224:
+  case 280:
 
-/* Line 1455 of yacc.c  */
-#line 1177 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1426 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)OFFBAND_L, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 225:
+  case 281:
 
-/* Line 1455 of yacc.c  */
-#line 1178 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1427 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)SCORE_L, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 226:
+  case 282:
 
-/* Line 1455 of yacc.c  */
-#line 1179 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1428 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)SCORE_LIMIT_L, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 227:
+  case 283:
 
-/* Line 1455 of yacc.c  */
-#line 1180 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1429 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)TABLE_OPTION_L, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 228:
+  case 284:
 
-/* Line 1455 of yacc.c  */
-#line 1181 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1430 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_CYCLES_ONLY_L, (ptrlong)1); }
     break;
 
-  case 229:
+  case 285:
 
-/* Line 1455 of yacc.c  */
-#line 1182 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1431 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_DIRECTION_L, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 230:
+  case 286:
 
-/* Line 1455 of yacc.c  */
-#line 1183 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1432 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_DISTINCT_L, (ptrlong)1); }
     break;
 
-  case 231:
+  case 287:
 
-/* Line 1455 of yacc.c  */
-#line 1184 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1433 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_END_FLAG_L, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 232:
+  case 288:
 
-/* Line 1455 of yacc.c  */
-#line 1185 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1434 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_EXISTS_L, (ptrlong)1); }
     break;
 
-  case 233:
+  case 289:
 
-/* Line 1455 of yacc.c  */
-#line 1186 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1435 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_FINAL_AS_L, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 234:
+  case 290:
 
-/* Line 1455 of yacc.c  */
-#line 1187 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1436 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_IN_L, spartlist (sparp_arg, 2, SPAR_LIST, t_revlist_to_array ((yyvsp[(3) - (4)].backstack)))); }
     break;
 
-  case 235:
+  case 291:
 
-/* Line 1455 of yacc.c  */
-#line 1188 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1437 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_MIN_L, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 236:
+  case 292:
 
-/* Line 1455 of yacc.c  */
-#line 1189 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1438 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_MAX_L, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 237:
+  case 293:
 
-/* Line 1455 of yacc.c  */
-#line 1190 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1439 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_NO_CYCLES_L, (ptrlong)1); }
     break;
 
-  case 238:
+  case 294:
 
-/* Line 1455 of yacc.c  */
-#line 1191 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1440 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_NO_ORDER_L, (ptrlong)1); }
     break;
 
-  case 239:
+  case 295:
 
-/* Line 1455 of yacc.c  */
-#line 1192 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1441 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_OUT_L, spartlist (sparp_arg, 2, SPAR_LIST, t_revlist_to_array ((yyvsp[(3) - (4)].backstack)))); }
     break;
 
-  case 240:
+  case 296:
 
-/* Line 1455 of yacc.c  */
-#line 1193 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1442 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_SHORTEST_ONLY_L, (ptrlong)1); }
     break;
 
-  case 241:
+  case 297:
 
-/* Line 1455 of yacc.c  */
-#line 1194 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1443 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_STEP_L, spartlist (sparp_arg, 4, SPAR_ALIAS, (yyvsp[(3) - (6)].tree), (yyvsp[(6) - (6)].tree)->_.var.vname, SSG_VALMODE_AUTO)); }
     break;
 
-  case 242:
+  case 298:
 
-/* Line 1455 of yacc.c  */
-#line 1195 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1444 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)T_STEP_L, spartlist (sparp_arg, 4, SPAR_ALIAS, (yyvsp[(3) - (6)].box), (yyvsp[(6) - (6)].tree)->_.var.vname, SSG_VALMODE_AUTO)); }
     break;
 
-  case 243:
+  case 299:
 
-/* Line 1455 of yacc.c  */
-#line 1196 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1445 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (ptrlong)TRANSITIVE_L, (ptrlong)1); }
     break;
 
-  case 244:
+  case 300:
 
-/* Line 1455 of yacc.c  */
-#line 1197 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1446 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (yyvsp[(1) - (4)].token_type), spartlist (sparp_arg, 2, SPAR_LIST, t_revlist_to_array ((yyvsp[(3) - (4)].backstack)))); }
     break;
 
-  case 245:
+  case 301:
 
-/* Line 1455 of yacc.c  */
-#line 1198 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1447 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, (yyvsp[(1) - (1)].token_type), (ptrlong)1); }
     break;
 
-  case 246:
+  case 302:
 
-/* Line 1455 of yacc.c  */
-#line 1202 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1451 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 247:
+  case 303:
 
-/* Line 1455 of yacc.c  */
-#line 1203 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1452 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 248:
+  case 304:
 
-/* Line 1455 of yacc.c  */
-#line 1207 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1456 "./sparql_p.y"
     { (yyval.token_type) = SAME_AS_L; }
     break;
 
-  case 249:
+  case 305:
 
-/* Line 1455 of yacc.c  */
-#line 1208 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1457 "./sparql_p.y"
     { (yyval.token_type) = SAME_AS_O_L; }
     break;
 
-  case 250:
+  case 306:
 
-/* Line 1455 of yacc.c  */
-#line 1209 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1458 "./sparql_p.y"
     { (yyval.token_type) = SAME_AS_P_L; }
     break;
 
-  case 251:
+  case 307:
 
-/* Line 1455 of yacc.c  */
-#line 1210 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1459 "./sparql_p.y"
     { (yyval.token_type) = SAME_AS_S_L; }
     break;
 
-  case 252:
+  case 308:
 
-/* Line 1455 of yacc.c  */
-#line 1211 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1460 "./sparql_p.y"
     { (yyval.token_type) = SAME_AS_S_O_L; }
     break;
 
-  case 254:
+  case 310:
 
-/* Line 1455 of yacc.c  */
-#line 1216 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1465 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_type); }
     break;
 
-  case 255:
+  case 311:
 
-/* Line 1455 of yacc.c  */
-#line 1217 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1466 "./sparql_p.y"
     { sparyyerror ("Predicate expected (i.e., variable or IRI ref or a backquoted expn or 'a' keyword)"); }
     break;
 
-  case 256:
+  case 312:
 
-/* Line 1455 of yacc.c  */
-#line 1221 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1470 "./sparql_p.y"
     {	/* [35]	BlankNodePropertyList	 ::=  '[' PropertyListNotEmpty ']'	*/
 		SPART *bn = spar_make_blank_node (sparp_arg, spar_mkid (sparp_arg, "_:lsqbra"), 1);
 		t_set_push (&(sparp_env()->spare_context_subjects), bn); }
     break;
 
-  case 257:
+  case 313:
 
-/* Line 1455 of yacc.c  */
-#line 1224 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1473 "./sparql_p.y"
     {
 		(yyval.tree) = t_set_pop (&(sparp_env()->spare_context_subjects)); }
     break;
 
-  case 258:
+  case 314:
 
-/* Line 1455 of yacc.c  */
-#line 1226 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1475 "./sparql_p.y"
     {	/* [36]	Collection	 ::=  '(' GraphNode* ')'	*/
 		SPART *bn = spar_make_blank_node (sparp_arg, spar_mkid (sparp_arg, "_:topcons"), 1);
 		t_set_push (&(sparp_env()->spare_context_subjects), bn);
 		t_set_push (&(sparp_env()->spare_context_subjects), bn); }
     break;
 
-  case 259:
+  case 315:
 
-/* Line 1455 of yacc.c  */
-#line 1230 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1479 "./sparql_p.y"
     {
-		spar_gp_add_triple_or_special_filter (sparp_arg,
+		spar_gp_add_triplelike (sparp_arg,
 		  NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_rest),
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_nil),
@@ -5300,301 +5763,271 @@ yyreduce:
 		(yyval.tree) = t_set_pop (&(sparp_env()->spare_context_subjects)); }
     break;
 
-  case 260:
+  case 316:
 
-/* Line 1455 of yacc.c  */
-#line 1238 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1487 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_nil); }
     break;
 
-  case 261:
+  case 317:
 
-/* Line 1455 of yacc.c  */
-#line 1242 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1491 "./sparql_p.y"
     {}
     break;
 
-  case 262:
+  case 318:
 
-/* Line 1455 of yacc.c  */
-#line 1243 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1492 "./sparql_p.y"
     {}
     break;
 
-  case 263:
+  case 319:
 
-/* Line 1455 of yacc.c  */
-#line 1247 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1496 "./sparql_p.y"
     {
-		spar_gp_add_triple_or_special_filter (sparp_arg, NULL, NULL,
+		spar_gp_add_triplelike (sparp_arg, NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_first),
 		  (yyvsp[(1) - (1)].tree), NULL, NULL, 0x0 ); }
     break;
 
-  case 264:
+  case 320:
 
-/* Line 1455 of yacc.c  */
-#line 1251 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1500 "./sparql_p.y"
     {
 		SPART *bn = spar_make_blank_node (sparp_arg, spar_mkid (sparp_arg, "_:cons"), 1);
-		spar_gp_add_triple_or_special_filter (sparp_arg,
+		spar_gp_add_triplelike (sparp_arg,
 		  NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_rest),
 		  bn, NULL, NULL, 0x0 );
 		sparp_env()->spare_context_subjects->data = bn;
-		spar_gp_add_triple_or_special_filter (sparp_arg, NULL, NULL,
+		spar_gp_add_triplelike (sparp_arg, NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_first),
 		  (yyvsp[(2) - (2)].tree), NULL, NULL, 0x0 ); }
     break;
 
-  case 269:
+  case 325:
 
-/* Line 1455 of yacc.c  */
-#line 1274 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1523 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 270:
+  case 326:
 
-/* Line 1455 of yacc.c  */
-#line 1275 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1524 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 274:
+  case 330:
 
-/* Line 1455 of yacc.c  */
-#line 1282 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1531 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
-  case 282:
+  case 338:
 
-/* Line 1455 of yacc.c  */
-#line 1299 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1548 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (3)].tree)); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 283:
+  case 339:
 
-/* Line 1455 of yacc.c  */
-#line 1300 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1549 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 284:
+  case 340:
 
-/* Line 1455 of yacc.c  */
-#line 1304 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1553 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 285:
+  case 341:
 
-/* Line 1455 of yacc.c  */
-#line 1305 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1554 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 286:
+  case 342:
 
-/* Line 1455 of yacc.c  */
-#line 1309 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1558 "./sparql_p.y"
     { (yyval.tree) = spar_make_funcall (sparp_arg, 1, (yyvsp[(1) - (3)].box), (SPART **)t_list (1, (yyvsp[(2) - (3)].tree))); }
     break;
 
-  case 287:
+  case 343:
 
-/* Line 1455 of yacc.c  */
-#line 1310 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1559 "./sparql_p.y"
     { (yyval.tree) = spar_make_funcall (sparp_arg, 1, (yyvsp[(1) - (3)].box), (SPART **)t_list (1, (ptrlong)1)); }
     break;
 
-  case 288:
+  case 344:
 
-/* Line 1455 of yacc.c  */
-#line 1311 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1560 "./sparql_p.y"
     { (yyval.tree) = spar_make_funcall (sparp_arg, DISTINCT_L, (yyvsp[(1) - (4)].box), (SPART **)t_list (1, (yyvsp[(3) - (4)].tree))); }
     break;
 
-  case 289:
+  case 345:
 
-/* Line 1455 of yacc.c  */
-#line 1315 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1564 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "aggregate function call"); (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 290:
+  case 346:
 
-/* Line 1455 of yacc.c  */
-#line 1319 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1568 "./sparql_p.y"
     { (yyval.box) = t_box_dv_uname_string ("SPECIAL::bif:COUNT"); }
     break;
 
-  case 291:
-
-/* Line 1455 of yacc.c  */
-#line 1320 "./sparql_p.y"
-    { (yyval.box) = t_box_dv_uname_string ("bif:AVG"); }
-    break;
-
-  case 292:
+  case 347:
 
-/* Line 1455 of yacc.c  */
-#line 1321 "./sparql_p.y"
-    { (yyval.box) = t_box_dv_uname_string ("bif:MIN"); }
+/* Line 1464 of yacc.c  */
+#line 1569 "./sparql_p.y"
+    { (yyval.box) = t_box_dv_uname_string ("SPECIAL::bif:AVG"); }
     break;
 
-  case 293:
+  case 348:
 
-/* Line 1455 of yacc.c  */
-#line 1322 "./sparql_p.y"
-    { (yyval.box) = t_box_dv_uname_string ("bif:MAX"); }
+/* Line 1464 of yacc.c  */
+#line 1570 "./sparql_p.y"
+    { (yyval.box) = t_box_dv_uname_string ("SPECIAL::bif:MIN"); }
     break;
 
-  case 294:
+  case 349:
 
-/* Line 1455 of yacc.c  */
-#line 1323 "./sparql_p.y"
-    { (yyval.box) = t_box_dv_uname_string ("bif:SUM"); }
+/* Line 1464 of yacc.c  */
+#line 1571 "./sparql_p.y"
+    { (yyval.box) = t_box_dv_uname_string ("SPECIAL::bif:MAX"); }
     break;
 
-  case 295:
+  case 350:
 
-/* Line 1455 of yacc.c  */
-#line 1327 "./sparql_p.y"
-    { (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 1572 "./sparql_p.y"
+    { (yyval.box) = t_box_dv_uname_string ("SPECIAL::bif:SUM"); }
     break;
 
-  case 296:
+  case 351:
 
-/* Line 1455 of yacc.c  */
-#line 1328 "./sparql_p.y"
-    { (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 1576 "./sparql_p.y"
+    {
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  {
+		    SPART *curmacro = sparp_arg->sparp_current_macro;
+		    int pos = sparp_namesake_macro_param (sparp_arg, curmacro, (yyvsp[(1) - (1)].box));
+		    if (-1 > pos)
+		      {
+		        spar_error (sparp_arg, "Variable '%.100s' inside the body of a macro '%.100s' is not listed in list of macro arguments or list of local names",
+		        (yyvsp[(1) - (1)].box), curmacro->_.defmacro.mname );
+		      }
+		    if (0 <= pos)
+		      (yyval.tree) = spar_make_macropu (sparp_arg, (yyvsp[(1) - (1)].box), pos);
+		    else
+		      (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box));
+		  }
+		else
+		  (yyval.tree) = spar_make_param_or_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 297:
+  case 352:
 
-/* Line 1455 of yacc.c  */
-#line 1329 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
+/* Line 1464 of yacc.c  */
+#line 1593 "./sparql_p.y"
+    {
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  spar_error (sparp_arg, "Global variables are not allowed inside the body of a macro '%.100s'",
+		    sparp_arg->sparp_current_macro->_.defmacro.mname );
+		(yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
-  case 298:
+  case 353:
 
-/* Line 1455 of yacc.c  */
-#line 1330 "./sparql_p.y"
-    { (yyval.tree) = spar_add_propvariable (sparp_arg, (yyvsp[(1) - (2)].tree), (ptrlong)((yyvsp[(2) - (2)].trees)[0]), (yyvsp[(2) - (2)].trees)[1], (ptrlong)((yyvsp[(2) - (2)].trees)[2]), (caddr_t)((yyvsp[(2) - (2)].trees)[3]) ); }
+/* Line 1464 of yacc.c  */
+#line 1598 "./sparql_p.y"
+    {
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  spar_error (sparp_arg, "Property path variables are not allowed inside the body of a macro '%.100s'",
+		    sparp_arg->sparp_current_macro->_.defmacro.mname );
+		(yyval.tree) = spar_add_propvariable (sparp_arg, (yyvsp[(1) - (2)].tree), (ptrlong)((yyvsp[(2) - (2)].trees)[0]), (yyvsp[(2) - (2)].trees)[1], (ptrlong)((yyvsp[(2) - (2)].trees)[2]), (caddr_t)((yyvsp[(2) - (2)].trees)[3]) ); }
     break;
 
-  case 299:
+  case 354:
 
-/* Line 1455 of yacc.c  */
-#line 1334 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1606 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_GLOBALS, "global variable"); (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
-  case 300:
-
-/* Line 1455 of yacc.c  */
-#line 1339 "./sparql_p.y"
-    { (yyval.tree) = spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
-    break;
-
-  case 301:
-
-/* Line 1455 of yacc.c  */
-#line 1340 "./sparql_p.y"
-    { (yyval.tree) = spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
-    break;
-
-  case 302:
-
-/* Line 1455 of yacc.c  */
-#line 1341 "./sparql_p.y"
-    { (yyval.tree) = spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
-    break;
-
-  case 303:
+  case 355:
 
-/* Line 1455 of yacc.c  */
-#line 1342 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1611 "./sparql_p.y"
     { (yyval.tree) = spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 304:
-
-/* Line 1455 of yacc.c  */
-#line 1347 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 305:
-
-/* Line 1455 of yacc.c  */
-#line 1348 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 306:
-
-/* Line 1455 of yacc.c  */
-#line 1349 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 307:
-
-/* Line 1455 of yacc.c  */
-#line 1350 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
-    break;
-
-  case 308:
+  case 356:
 
-/* Line 1455 of yacc.c  */
-#line 1351 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(2) - (2)].tree); spar_change_sign (&((yyvsp[(2) - (2)].tree)->_.lit.val)); }
+/* Line 1464 of yacc.c  */
+#line 1612 "./sparql_p.y"
+    { (yyval.tree) = spar_make_variable (sparp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 309:
+  case 360:
 
-/* Line 1455 of yacc.c  */
-#line 1352 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
+/* Line 1464 of yacc.c  */
+#line 1620 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 310:
+  case 361:
 
-/* Line 1455 of yacc.c  */
-#line 1353 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
+/* Line 1464 of yacc.c  */
+#line 1621 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); spar_change_sign (&((yyvsp[(2) - (2)].tree)->_.lit.val)); }
     break;
 
-  case 311:
+  case 364:
 
-/* Line 1455 of yacc.c  */
-#line 1354 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1624 "./sparql_p.y"
     { (yyval.tree) = (SPART *)t_box_dv_uname_string ("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); }
     break;
 
-  case 313:
+  case 366:
 
-/* Line 1455 of yacc.c  */
-#line 1359 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1629 "./sparql_p.y"
     {
-		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "backquoted expression");
+		dk_set_t gp_st = sparp_env()->spare_context_gp_subtypes;
 		if (2 & sparp_arg->sparp_in_precode_expn)
-		  spar_error (sparp_arg, "Backquoted expressions are not allowed in constant clauses"); }
+		  spar_error (sparp_arg, "Backquoted expressions are not allowed in constant clauses");
+		(yyval.token_type) = ((NULL == gp_st) ? -1 : (ptrlong)(gp_st->data));
+		if (CONSTRUCT_L == (yyval.token_type))
+		  SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "backquoted expression in CONSTRUCT"); }
     break;
 
-  case 314:
+  case 367:
 
-/* Line 1455 of yacc.c  */
-#line 1363 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1636 "./sparql_p.y"
     {
-		  dk_set_t gp_st = sparp_env()->spare_context_gp_subtypes;
-                  if ((NULL == gp_st) || (CONSTRUCT_L == (ptrlong)(gp_st->data)))
+		  if ((-1 == (yyvsp[(2) - (4)].token_type)) || (CONSTRUCT_L == (yyvsp[(2) - (4)].token_type)))
                     (yyval.tree) = (yyvsp[(3) - (4)].tree); /* redundant backquotes in retlist or backquotes to bypass syntax limitation in CONSTRUCT gp */
                   else
 		    {
@@ -5607,80 +6040,73 @@ yyreduce:
 		}
     break;
 
-  case 315:
-
-/* Line 1455 of yacc.c  */
-#line 1379 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_ALIAS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].box), SSG_VALMODE_AUTO); }
-    break;
-
-  case 316:
+  case 368:
 
-/* Line 1455 of yacc.c  */
-#line 1380 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1651 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_ALIAS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].box), SSG_VALMODE_AUTO); }
     break;
 
-  case 317:
+  case 369:
 
-/* Line 1455 of yacc.c  */
-#line 1381 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1652 "./sparql_p.y"
     { /* [44]	ConditionalOrExpn	 ::=  ConditionalAndExpn ( '||' ConditionalAndExpn )*	*/
 		  SPAR_BIN_OP ((yyval.tree), BOP_OR, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 318:
+  case 370:
 
-/* Line 1455 of yacc.c  */
-#line 1383 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1654 "./sparql_p.y"
     { /* [45]	ConditionalAndExpn	 ::=  ValueLogical ( '&&' ValueLogical )*	*/
 					/* [46]	ValueLogical	 ::=  RelationalExpn	*/
 		  SPAR_BIN_OP ((yyval.tree), BOP_AND, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 319:
+  case 371:
 
-/* Line 1455 of yacc.c  */
-#line 1386 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1657 "./sparql_p.y"
     {	/* [47]*	RelationalExpn	 ::=  NumericExpn	*/
 					/*... ( ( ('='|'!='|'<'|'>'|'<='|'>='|'LIKE') NumericExpn ) */
 					/*...   | ( 'IN' '(' Expns ')' ) )?	*/
 		  SPAR_BIN_OP ((yyval.tree), BOP_EQ, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 320:
+  case 372:
 
-/* Line 1455 of yacc.c  */
-#line 1390 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1661 "./sparql_p.y"
     { SPAR_BIN_OP ((yyval.tree), BOP_NEQ, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 321:
+  case 373:
 
-/* Line 1455 of yacc.c  */
-#line 1391 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1662 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_LIKE, "LIKE operator"); }
     break;
 
-  case 322:
+  case 374:
 
-/* Line 1455 of yacc.c  */
-#line 1392 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1663 "./sparql_p.y"
     {	/* Virtuoso-specific extension of [47] */
-		(yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)LIKE_L, t_list (2, (yyvsp[(1) - (4)].tree), (yyvsp[(4) - (4)].tree))); }
+		(yyval.tree) = sparp_make_builtin_call (sparp_arg, LIKE_L, (SPART **)t_list (2, (yyvsp[(1) - (4)].tree), (yyvsp[(4) - (4)].tree))); }
     break;
 
-  case 323:
+  case 375:
 
-/* Line 1455 of yacc.c  */
-#line 1394 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1665 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_IN, "IN operator"); }
     break;
 
-  case 324:
+  case 376:
 
-/* Line 1455 of yacc.c  */
-#line 1395 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1666 "./sparql_p.y"
     {	/* Virtuoso-specific extension of [47] */
 		  dk_set_t args = (yyvsp[(5) - (6)].backstack);
                   if (1 == dk_set_length (args))
@@ -5690,104 +6116,104 @@ yyreduce:
                   else
                     {
                       t_set_push (&args, (yyvsp[(1) - (6)].tree));
-		      (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL,  (SPART *) t_box_num(IN_L),
-                        t_list_to_array (args) /* NOT t_revlist_to_array (args), note special first element pushed */ );
+		      (yyval.tree) = sparp_make_builtin_call (sparp_arg, IN_L,
+		        (SPART **)t_list_to_array (args) /* NOT t_revlist_to_array (args), note special first element pushed */ );
                     }
 		}
     break;
 
-  case 325:
+  case 377:
 
-/* Line 1455 of yacc.c  */
-#line 1408 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1679 "./sparql_p.y"
     { SPAR_BIN_OP ((yyval.tree), BOP_LT, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 326:
+  case 378:
 
-/* Line 1455 of yacc.c  */
-#line 1409 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1680 "./sparql_p.y"
     { SPAR_BIN_OP ((yyval.tree), BOP_LT, (yyvsp[(3) - (3)].tree), (yyvsp[(1) - (3)].tree)); }
     break;
 
-  case 327:
+  case 379:
 
-/* Line 1455 of yacc.c  */
-#line 1410 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1681 "./sparql_p.y"
     { SPAR_BIN_OP ((yyval.tree), BOP_LTE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 328:
+  case 380:
 
-/* Line 1455 of yacc.c  */
-#line 1411 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1682 "./sparql_p.y"
     { SPAR_BIN_OP ((yyval.tree), BOP_LTE, (yyvsp[(3) - (3)].tree), (yyvsp[(1) - (3)].tree)); }
     break;
 
-  case 329:
+  case 381:
 
-/* Line 1455 of yacc.c  */
-#line 1412 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1683 "./sparql_p.y"
     {	/* [49]	AdditiveExpn	 ::=  MultiplicativeExpn ( ('+'|'-') MultiplicativeExpn )*	*/
 		if (sparp_arg->sparp_rset_lexdepth_plus_1 == (yyvsp[(2) - (3)].token_type) + 1)
 		  sparyyerror ("Ambiguous (unary or binary) plus operator in result list, please add \"(\" and \")\"");
 		  SPAR_BIN_OP ((yyval.tree), BOP_PLUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 330:
+  case 382:
 
-/* Line 1455 of yacc.c  */
-#line 1416 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1687 "./sparql_p.y"
     {
 		if (sparp_arg->sparp_rset_lexdepth_plus_1 == (yyvsp[(2) - (3)].token_type) + 1)
 		  sparyyerror ("Ambiguous (unary or binary) minus operator in result list, please add \"(\" and \")\"");
 		SPAR_BIN_OP ((yyval.tree), BOP_MINUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 331:
+  case 383:
 
-/* Line 1455 of yacc.c  */
-#line 1420 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1691 "./sparql_p.y"
     {	/* [50]	MultiplicativeExpn	 ::=  UnaryExpn ( ('*'|'/') UnaryExpn )*	*/
 		  SPAR_BIN_OP ((yyval.tree), BOP_TIMES, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 332:
+  case 384:
 
-/* Line 1455 of yacc.c  */
-#line 1422 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1693 "./sparql_p.y"
     { SPAR_BIN_OP ((yyval.tree), BOP_DIV, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 333:
+  case 385:
 
-/* Line 1455 of yacc.c  */
-#line 1423 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1694 "./sparql_p.y"
     {		/* [51]*	UnaryExpn	 ::=   ('!'|'NOT'|'+'|'-')? PrimaryExpn */
 		SPAR_BIN_OP ((yyval.tree), BOP_NOT, (yyvsp[(2) - (2)].tree), NULL); }
     break;
 
-  case 334:
+  case 386:
 
-/* Line 1455 of yacc.c  */
-#line 1425 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1696 "./sparql_p.y"
     {
 		SPAR_BIN_OP ((yyval.tree), BOP_NOT, (yyvsp[(2) - (2)].tree), NULL); }
     break;
 
-  case 335:
+  case 387:
 
-/* Line 1455 of yacc.c  */
-#line 1427 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1698 "./sparql_p.y"
     {
 		SPAR_BIN_OP ((yyval.tree), BOP_PLUS,
 		  spartlist (sparp_arg, 4, SPAR_LIT, (SPART *) t_box_num_nonull(0), uname_xmlschema_ns_uri_hash_integer, NULL), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 336:
+  case 388:
 
-/* Line 1455 of yacc.c  */
-#line 1430 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1701 "./sparql_p.y"
     {
 		caddr_t *val_ptr = NULL;
 		if (DV_ARRAY_OF_POINTER == DV_TYPE_OF ((yyvsp[(2) - (2)].tree))) {
@@ -5813,17 +6239,17 @@ yyreduce:
 		  (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 337:
+  case 389:
 
-/* Line 1455 of yacc.c  */
-#line 1453 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1724 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
-  case 338:
+  case 390:
 
-/* Line 1455 of yacc.c  */
-#line 1456 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1727 "./sparql_p.y"
     {
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "scalar ASK subquery");
                 spar_gp_init (sparp_arg, SELECT_L);
@@ -5833,10 +6259,10 @@ yyreduce:
 		sparp_arg->sparp_allow_aggregates_in_expn <<= 1; }
     break;
 
-  case 339:
+  case 391:
 
-/* Line 1455 of yacc.c  */
-#line 1465 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1736 "./sparql_p.y"
     {
 		SPART *subselect_top;
 		SPART *where_gp;
@@ -5844,14 +6270,14 @@ yyreduce:
 		subselect_top = spar_make_top (sparp_arg, ASK_L, (SPART **)t_list(0), spar_selid_pop (sparp_arg),
 		  where_gp, NULL, NULL, NULL, (SPART *)t_box_num(1), (SPART *)t_box_num(0) );
 		spar_env_pop (sparp_arg);
-		(yyval.tree) = spar_gp_finalize_with_subquery (sparp_arg, (yyvsp[(7) - (7)].trees), subselect_top);
+		(yyval.tree) = spar_gp_finalize_with_subquery (sparp_arg, (yyvsp[(6) - (7)].trees), subselect_top);
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
     break;
 
-  case 340:
+  case 392:
 
-/* Line 1455 of yacc.c  */
-#line 1474 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1745 "./sparql_p.y"
     {
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "scalar subquery");
                 spar_gp_init (sparp_arg, SELECT_L);
@@ -5862,10 +6288,10 @@ yyreduce:
 		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
     break;
 
-  case 341:
+  case 393:
 
-/* Line 1455 of yacc.c  */
-#line 1484 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1755 "./sparql_p.y"
     {
 		SPART *subselect_top;
 		SPART *where_gp;
@@ -5879,14 +6305,14 @@ yyreduce:
 		if (SPAR_REQ_TOP == subselect_top->type)
 		  sparp_expand_top_retvals (sparp_arg, subselect_top, 1 /* safely_copy_all_vars */);
 		spar_env_pop (sparp_arg);
-		(yyval.tree) = spar_gp_finalize_with_subquery (sparp_arg, (yyvsp[(9) - (9)].trees), subselect_top);
+		(yyval.tree) = spar_gp_finalize_with_subquery (sparp_arg, (yyvsp[(8) - (9)].trees), subselect_top);
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
     break;
 
-  case 342:
+  case 394:
 
-/* Line 1455 of yacc.c  */
-#line 1499 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1770 "./sparql_p.y"
     {
 		(yyval.tree) = (yyvsp[(1) - (1)].tree);
 		if (sparp_arg->sparp_in_precode_expn)
@@ -5895,446 +6321,518 @@ yyreduce:
 		  sparyyerror ("Aggregates are allowed only in result sets"); }
     break;
 
-  case 344:
+  case 396:
+
+/* Line 1464 of yacc.c  */
+#line 1777 "./sparql_p.y"
+    {			/* [55*]	IRIrefOrFunctionOrMacro	 ::=  (( IRIref ArgList? ) | ( 'MACRO' IRIref ArgList ))	*/
+		SPART *mdef;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		mdef = spar_find_defmacro_by_iri_or_fields (sparp_arg, (yyvsp[(1) - (1)].tree)->_.lit.val, NULL);
+		(yyval.trees) = (SPART **)t_list (2, (ptrlong)(sparp_arg->sparp_macro_mode), mdef);
+		if (NULL != mdef)
+		  {
+		    if ((SPARP_DEFBODY & sparp_arg->sparp_macro_mode) && (sparp_arg->sparp_current_macro == mdef))
+		      sparyyerror ("The macro is recursively used in its own definition");
+		    sparp_arg->sparp_macro_mode |= SPARP_CALLARG;
+		  } }
+    break;
+
+  case 397:
 
-/* Line 1455 of yacc.c  */
-#line 1506 "./sparql_p.y"
-    {	/* [55]	IRIrefOrFunction	 ::=  IRIref ArgList? */
-                  if (NULL == (yyvsp[(2) - (2)].backstack))
-		    (yyval.tree) = (yyvsp[(1) - (2)].tree);
+/* Line 1464 of yacc.c  */
+#line 1789 "./sparql_p.y"
+    {
+		if (NULL == (yyvsp[(3) - (3)].backstack))
+		    (yyval.tree) = (yyvsp[(1) - (3)].tree);
 		  else
 		    {
-		      SPART **args = (SPART **)(((dk_set_t)NIL_L == (yyvsp[(2) - (2)].backstack)) ? NULL : t_revlist_to_array ((yyvsp[(2) - (2)].backstack)));
-                      caddr_t fname = (yyvsp[(1) - (2)].tree)->_.lit.val;
+		    SPART **args = (SPART **)(((dk_set_t)NIL_L == (yyvsp[(3) - (3)].backstack)) ? NULL : t_revlist_to_array ((yyvsp[(3) - (3)].backstack)));
+                      caddr_t fname = (yyvsp[(1) - (3)].tree)->_.lit.val;
+		    SPART *mdef = ((yyvsp[(2) - (3)].trees))[1];
+		    if (NULL != mdef)
+		      {
+		        sparp_arg->sparp_macro_mode = (ptrlong)(((yyvsp[(2) - (3)].trees))[0]);
+		        (yyval.tree) = sparp_make_macro_call (sparp_arg, fname, 1, args);
+		        if (!(sparp_arg->sparp_macro_mode & SPARP_DEFBODY))
+		          sparp_arg->sparp_macro_call_count++;
+		      }
+		    else
+		      {
                       spar_verify_funcall_security (sparp_arg, fname, args);
 		      (yyval.tree) = spar_make_funcall (sparp_arg, 0, fname, args);
-		    } }
+		      } } }
     break;
 
-  case 345:
+  case 398:
 
-/* Line 1455 of yacc.c  */
-#line 1516 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1809 "./sparql_p.y"
     { (yyval.tree) = (SPART *)((yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 346:
+  case 399:
 
-/* Line 1455 of yacc.c  */
-#line 1517 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1810 "./sparql_p.y"
     { (yyval.tree) = (SPART *)((yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 347:
+  case 400:
 
-/* Line 1455 of yacc.c  */
-#line 1518 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1811 "./sparql_p.y"
     { (yyval.tree) = (SPART *)((yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 350:
+  case 404:
 
-/* Line 1455 of yacc.c  */
-#line 1525 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)STR_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1818 "./sparql_p.y"
+    {
+		SPART **args = (SPART **)(((dk_set_t)NIL_L == (yyvsp[(2) - (2)].backstack)) ? NULL : t_revlist_to_array ((yyvsp[(2) - (2)].backstack)));
+		if ((SPAR_BIF_REGEX == (yyvsp[(1) - (2)].token_type)) && (2 == BOX_ELEMENTS (args)))
+		  (yyval.tree) = spar_make_regex_or_like_or_eq (sparp_arg, args[0], args[1]);
+		else
+		  (yyval.tree) = sparp_make_builtin_call (sparp_arg, (yyvsp[(1) - (2)].token_type), args); }
     break;
 
-  case 351:
+  case 405:
 
-/* Line 1455 of yacc.c  */
-#line 1527 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANG_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1836 "./sparql_p.y"
+    { (yyval.tree) = sparp_make_builtin_call (sparp_arg, IRI_L, (SPART **)t_list (1, (yyvsp[(3) - (4)].tree))); }
     break;
 
-  case 352:
+  case 406:
 
-/* Line 1455 of yacc.c  */
-#line 1529 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANGMATCHES_L, t_list (2, (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1838 "./sparql_p.y"
+    { (yyval.tree) = sparp_make_builtin_call (sparp_arg, LANG_L, (SPART **)t_list (1, (yyvsp[(3) - (4)].tree))); }
     break;
 
-  case 353:
+  case 407:
 
-/* Line 1455 of yacc.c  */
-#line 1531 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)DATATYPE_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1840 "./sparql_p.y"
+    { (yyval.tree) = sparp_make_builtin_call (sparp_arg, DATATYPE_L, (SPART **)t_list (1, (yyvsp[(3) - (4)].tree))); }
     break;
 
-  case 354:
+  case 408:
 
-/* Line 1455 of yacc.c  */
-#line 1533 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1842 "./sparql_p.y"
+    { (yyval.tree) = sparp_make_builtin_call (sparp_arg, BOUND_L, (SPART **)t_list (1, (yyvsp[(3) - (4)].tree))); }
     break;
 
-  case 355:
+  case 409:
 
-/* Line 1455 of yacc.c  */
-#line 1535 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)SAMETERM_L, t_list (2, (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1846 "./sparql_p.y"
+    {
+		SPART *mdef;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		mdef = spar_find_defmacro_by_iri_or_fields (sparp_arg, (yyvsp[(1) - (1)].tree)->_.lit.val, NULL);
+		(yyval.token_type) = sparp_arg->sparp_macro_mode;
+		if (NULL != mdef)
+		  {
+		    if ((SPARP_DEFBODY & sparp_arg->sparp_macro_mode) && (sparp_arg->sparp_current_macro == mdef))
+		      sparyyerror ("The macro is recursively used in its own definition");
+		    sparp_arg->sparp_macro_mode |= SPARP_CALLARG;
+		  } }
     break;
 
-  case 356:
+  case 410:
 
-/* Line 1455 of yacc.c  */
-#line 1537 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isIRI_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1858 "./sparql_p.y"
+    {
+		SPART **args = (SPART **)(((dk_set_t)NIL_L == (yyvsp[(3) - (3)].backstack)) ? NULL : t_revlist_to_array ((yyvsp[(3) - (3)].backstack)));
+                  caddr_t fname = (yyvsp[(1) - (3)].tree)->_.lit.val;
+		if (sparp_arg->sparp_macro_mode & SPARP_CALLARG)
+		  {
+		    sparp_arg->sparp_macro_mode = (yyvsp[(2) - (3)].token_type);
+		    (yyval.tree) = sparp_make_macro_call (sparp_arg, fname, 1, args);
+		    if (!(sparp_arg->sparp_macro_mode & SPARP_DEFBODY))
+		      sparp_arg->sparp_macro_call_count++;
+		  }
+		else
+		  {
+                  spar_verify_funcall_security (sparp_arg, fname, args);
+		    (yyval.tree) = spar_make_funcall (sparp_arg, 0, fname, args);
+		  } }
     break;
 
-  case 357:
+  case 411:
 
-/* Line 1455 of yacc.c  */
-#line 1539 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isURI_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1876 "./sparql_p.y"
+    {
+		SPART *mdef;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		mdef = spar_find_defmacro_by_iri_or_fields (sparp_arg, (yyvsp[(2) - (2)].tree)->_.qname.val, NULL);
+		if (NULL == mdef)
+		  sparyyerror ("Undefined macro IRI");
+		if ((SPARP_DEFBODY & sparp_arg->sparp_macro_mode) && (sparp_arg->sparp_current_macro == mdef))
+		  sparyyerror ("The macro is recursively used in its own definition");
+		(yyval.token_type) = sparp_arg->sparp_macro_mode;
+		sparp_arg->sparp_macro_mode |= SPARP_CALLARG; }
     break;
 
-  case 358:
+  case 412:
 
-/* Line 1455 of yacc.c  */
-#line 1541 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isBLANK_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1887 "./sparql_p.y"
+    {
+		SPART **args = (SPART **)(((dk_set_t)NIL_L == (yyvsp[(4) - (4)].backstack)) ? NULL : t_revlist_to_array ((yyvsp[(4) - (4)].backstack)));
+		sparp_arg->sparp_macro_mode = (yyvsp[(3) - (4)].token_type);
+		(yyval.tree) = sparp_make_macro_call (sparp_arg, (yyvsp[(2) - (4)].tree)->_.qname.val, 1, args);
+		if (!(sparp_arg->sparp_macro_mode & SPARP_DEFBODY))
+		  sparp_arg->sparp_macro_call_count++;
+		 }
     break;
 
-  case 359:
+  case 413:
 
-/* Line 1455 of yacc.c  */
-#line 1543 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isLITERAL_L, t_list (1, (yyvsp[(3) - (4)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1898 "./sparql_p.y"
+    { (yyval.backstack) = NULL; }
     break;
 
-  case 361:
+  case 415:
 
-/* Line 1455 of yacc.c  */
-#line 1546 "./sparql_p.y"
-    { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "IRI (built-in call)"); }
+/* Line 1464 of yacc.c  */
+#line 1903 "./sparql_p.y"
+    { (yyval.backstack) = (dk_set_t)NIL_L; }
     break;
 
-  case 362:
+  case 416:
 
-/* Line 1455 of yacc.c  */
-#line 1548 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)IRI_L, t_list (1, (yyvsp[(4) - (5)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1904 "./sparql_p.y"
+    { (yyval.backstack) = (dk_set_t)NIL_L; }
     break;
 
-  case 363:
+  case 417:
 
-/* Line 1455 of yacc.c  */
-#line 1550 "./sparql_p.y"
-    { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "isREF (built-in call)"); }
+/* Line 1464 of yacc.c  */
+#line 1905 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(2) - (3)].backstack); }
     break;
 
-  case 364:
+  case 418:
 
-/* Line 1455 of yacc.c  */
-#line 1552 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isREF_L, t_list (1, (yyvsp[(4) - (5)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1909 "./sparql_p.y"
+    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 365:
+  case 419:
 
-/* Line 1455 of yacc.c  */
-#line 1557 "./sparql_p.y"
-    { (yyval.tree) = spar_make_regex_or_like_or_eq (sparp_arg, (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 1910 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 366:
+  case 420:
 
-/* Line 1455 of yacc.c  */
-#line 1559 "./sparql_p.y"
-    { (yyval.tree) = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)REGEX_L, t_list (3, (yyvsp[(3) - (8)].tree), (yyvsp[(5) - (8)].tree), (yyvsp[(7) - (8)].tree))); }
+/* Line 1464 of yacc.c  */
+#line 1911 "./sparql_p.y"
+    { sparyyerror ("Argument expected after comma"); }
     break;
 
-  case 367:
+  case 421:
 
-/* Line 1455 of yacc.c  */
-#line 1563 "./sparql_p.y"
-    {
-                  SPART **args = (SPART **)(((dk_set_t)NIL_L == (yyvsp[(2) - (2)].backstack)) ? NULL : t_revlist_to_array ((yyvsp[(2) - (2)].backstack)));
-                  caddr_t fname = (yyvsp[(1) - (2)].tree)->_.lit.val;
-                  spar_verify_funcall_security (sparp_arg, fname, args);
-		  (yyval.tree) = spar_make_funcall (sparp_arg, 0, fname, args); }
+/* Line 1464 of yacc.c  */
+#line 1912 "./sparql_p.y"
+    { sparyyerror ("Comma or ')' expected after function argument"); }
     break;
 
-  case 368:
+  case 422:
 
-/* Line 1455 of yacc.c  */
-#line 1571 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1916 "./sparql_p.y"
     { (yyval.backstack) = NULL; }
     break;
 
-  case 369:
-
-/* Line 1455 of yacc.c  */
-#line 1572 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (1)].backstack); }
-    break;
-
-  case 370:
+  case 424:
 
-/* Line 1455 of yacc.c  */
-#line 1576 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1921 "./sparql_p.y"
     { (yyval.backstack) = (dk_set_t)NIL_L; }
     break;
 
-  case 371:
+  case 425:
 
-/* Line 1455 of yacc.c  */
-#line 1577 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1922 "./sparql_p.y"
     { (yyval.backstack) = (dk_set_t)NIL_L; }
     break;
 
-  case 372:
+  case 426:
 
-/* Line 1455 of yacc.c  */
-#line 1578 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1923 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(2) - (3)].backstack); }
     break;
 
-  case 373:
+  case 427:
 
-/* Line 1455 of yacc.c  */
-#line 1582 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1927 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 374:
+  case 428:
 
-/* Line 1455 of yacc.c  */
-#line 1583 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1928 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 375:
+  case 429:
 
-/* Line 1455 of yacc.c  */
-#line 1584 "./sparql_p.y"
-    { sparyyerror ("Argument expected after comma"); }
+/* Line 1464 of yacc.c  */
+#line 1929 "./sparql_p.y"
+    { sparyyerror ("Macro argument (an expression or a group pattern) expected after comma"); }
     break;
 
-  case 376:
+  case 430:
 
-/* Line 1455 of yacc.c  */
-#line 1585 "./sparql_p.y"
-    { sparyyerror ("Comma or ')' expected after function argument"); }
+/* Line 1464 of yacc.c  */
+#line 1930 "./sparql_p.y"
+    { sparyyerror ("Comma or ')' expected after macro argument"); }
     break;
 
-  case 377:
+  case 432:
+
+/* Line 1464 of yacc.c  */
+#line 1935 "./sparql_p.y"
+    {
+	    spar_gp_init (sparp_arg, SPAR_MACROPU); }
+    break;
+
+  case 433:
 
-/* Line 1455 of yacc.c  */
-#line 1589 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1937 "./sparql_p.y"
+    { (yyval.tree) = spar_gp_finalize (sparp_arg, NULL); }
+    break;
+
+  case 434:
+
+/* Line 1464 of yacc.c  */
+#line 1941 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (yyvsp[(1) - (1)].box), uname_xmlschema_ns_uri_hash_integer, NULL); }
     break;
 
-  case 378:
+  case 435:
 
-/* Line 1455 of yacc.c  */
-#line 1590 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1942 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (yyvsp[(1) - (1)].box), uname_xmlschema_ns_uri_hash_decimal, NULL); }
     break;
 
-  case 379:
+  case 436:
 
-/* Line 1455 of yacc.c  */
-#line 1591 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1943 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (yyvsp[(1) - (1)].box), uname_xmlschema_ns_uri_hash_double, NULL); }
     break;
 
-  case 380:
+  case 437:
 
-/* Line 1455 of yacc.c  */
-#line 1595 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1947 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (yyvsp[(1) - (1)].box), NULL, NULL); }
     break;
 
-  case 381:
+  case 438:
 
-/* Line 1455 of yacc.c  */
-#line 1596 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1948 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (yyvsp[(1) - (2)].box), NULL, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 382:
+  case 439:
 
-/* Line 1455 of yacc.c  */
-#line 1597 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1949 "./sparql_p.y"
     { (yyval.tree) = spar_make_typed_literal (sparp_arg, (yyvsp[(1) - (3)].box), (yyvsp[(3) - (3)].tree)->_.lit.val, NULL); }
     break;
 
-  case 383:
+  case 440:
 
-/* Line 1455 of yacc.c  */
-#line 1601 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1953 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (ptrlong)1, uname_xmlschema_ns_uri_hash_boolean, NULL); }
     break;
 
-  case 384:
+  case 441:
 
-/* Line 1455 of yacc.c  */
-#line 1602 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1954 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 4, SPAR_LIT, (ptrlong)0, uname_xmlschema_ns_uri_hash_boolean, NULL); }
     break;
 
-  case 385:
-
-/* Line 1455 of yacc.c  */
-#line 1606 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 386:
+  case 443:
 
-/* Line 1455 of yacc.c  */
-#line 1607 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1959 "./sparql_p.y"
     { (yyval.tree) = (SPART *)((ptrlong)_STAR); }
     break;
 
-  case 387:
+  case 444:
 
-/* Line 1455 of yacc.c  */
-#line 1608 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1960 "./sparql_p.y"
     { (yyval.tree) = (SPART *)((ptrlong)DEFAULT_L); }
     break;
 
-  case 388:
+  case 445:
 
-/* Line 1455 of yacc.c  */
-#line 1612 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1964 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "\"variable+>property\""); (yyval.token_type) = _PLUS_GT; }
     break;
 
-  case 389:
+  case 446:
 
-/* Line 1455 of yacc.c  */
-#line 1613 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1965 "./sparql_p.y"
     { SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "\"variable*>property\""); (yyval.token_type) = _STAR_GT; }
     break;
 
-  case 390:
+  case 447:
 
-/* Line 1455 of yacc.c  */
-#line 1617 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1969 "./sparql_p.y"
     {
 		(yyval.trees) = (SPART **) t_list ( 4, (yyvsp[(1) - (2)].token_type),
 		  spartlist (sparp_arg, 2, SPAR_QNAME, sparp_expand_q_iri_ref (sparp_arg, (yyvsp[(2) - (2)].box))),
 		  Q_IRI_REF, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 391:
+  case 448:
 
-/* Line 1455 of yacc.c  */
-#line 1621 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1973 "./sparql_p.y"
     {
 		(yyval.trees) = (SPART **) t_list ( 4, (yyvsp[(1) - (2)].token_type),
 		  spartlist (sparp_arg, 2, SPAR_QNAME, sparp_expand_qname_prefix (sparp_arg, (yyvsp[(2) - (2)].box))),
 		  QNAME, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 392:
+  case 449:
 
-/* Line 1455 of yacc.c  */
-#line 1625 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1977 "./sparql_p.y"
     {
 		(yyval.trees) = (SPART **) t_list ( 4, (yyvsp[(1) - (2)].token_type),
 		  spartlist (sparp_arg, 2, SPAR_QNAME, sparp_expand_qname_prefix (sparp_arg, (yyvsp[(2) - (2)].box))),
 		  QNAME_NS, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 393:
+  case 450:
 
-/* Line 1455 of yacc.c  */
-#line 1629 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1981 "./sparql_p.y"
     { sparyyerror ("IRI reference expected after *> or +> operator"); }
     break;
 
-  case 394:
+  case 451:
 
-/* Line 1455 of yacc.c  */
-#line 1633 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1985 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 2, SPAR_QNAME, sparp_expand_q_iri_ref (sparp_arg, (yyvsp[(1) - (1)].box))); }
     break;
 
-  case 395:
-
-/* Line 1455 of yacc.c  */
-#line 1634 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 396:
+  case 453:
 
-/* Line 1455 of yacc.c  */
-#line 1638 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1990 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 2, SPAR_QNAME, sparp_expand_qname_prefix (sparp_arg, (yyvsp[(1) - (1)].box))); }
     break;
 
-  case 397:
+  case 454:
 
-/* Line 1455 of yacc.c  */
-#line 1639 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1991 "./sparql_p.y"
     { (yyval.tree) = spartlist (sparp_arg, 2, SPAR_QNAME/*_NS*/, sparp_expand_qname_prefix (sparp_arg, (yyvsp[(1) - (1)].box))); }
     break;
 
-  case 398:
+  case 455:
 
-/* Line 1455 of yacc.c  */
-#line 1643 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1995 "./sparql_p.y"
     { (yyval.tree) = spar_make_blank_node (sparp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
-  case 399:
+  case 456:
 
-/* Line 1455 of yacc.c  */
-#line 1644 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 1996 "./sparql_p.y"
     { (yyval.tree) = spar_make_blank_node (sparp_arg, spar_mkid (sparp_arg, "_:anon"), 1); }
     break;
 
-  case 400:
+  case 457:
 
-/* Line 1455 of yacc.c  */
-#line 1650 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2002 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 401:
+  case 458:
 
-/* Line 1455 of yacc.c  */
-#line 1651 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2003 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 411:
+  case 469:
+
+/* Line 1464 of yacc.c  */
+#line 2023 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_drop_macro_lib (sparp_arg, (yyvsp[(5) - (5)].tree), (yyvsp[(2) - (5)].token_type) /* yes, $2 after $5 */); }
+    break;
+
+  case 470:
 
-/* Line 1455 of yacc.c  */
-#line 1672 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2030 "./sparql_p.y"
     {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
     break;
 
-  case 412:
+  case 471:
 
-/* Line 1455 of yacc.c  */
-#line 1675 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2033 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, INSERT_L, NULL,
                   spar_selid_pop (sparp_arg), (yyvsp[(5) - (5)].tree) );
                 spar_compose_retvals_of_insert_or_delete (sparp_arg, (yyval.tree), (yyvsp[(2) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 413:
+  case 472:
 
-/* Line 1455 of yacc.c  */
-#line 1684 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2042 "./sparql_p.y"
     {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
 		sparp_arg->sparp_in_precode_expn = 2; }
     break;
 
-  case 414:
+  case 473:
 
-/* Line 1455 of yacc.c  */
-#line 1688 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2046 "./sparql_p.y"
     {
                 SPART *fake = spar_make_fake_action_solution (sparp_arg);
 		sparp_arg->sparp_in_precode_expn = 0;
@@ -6343,39 +6841,39 @@ yyreduce:
                 spar_compose_retvals_of_insert_or_delete (sparp_arg, (yyval.tree), (yyvsp[(3) - (5)].tree), (yyvsp[(5) - (5)].tree)); }
     break;
 
-  case 415:
+  case 474:
 
-/* Line 1455 of yacc.c  */
-#line 1699 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2057 "./sparql_p.y"
     {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
     break;
 
-  case 416:
+  case 475:
 
-/* Line 1455 of yacc.c  */
-#line 1702 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2060 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, DELETE_L, NULL,
                   spar_selid_pop (sparp_arg), (yyvsp[(5) - (5)].tree) );
                 spar_compose_retvals_of_insert_or_delete (sparp_arg, (yyval.tree), (yyvsp[(2) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 417:
+  case 476:
 
-/* Line 1455 of yacc.c  */
-#line 1711 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2069 "./sparql_p.y"
     {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
 		sparp_arg->sparp_in_precode_expn = 2; }
     break;
 
-  case 418:
+  case 477:
 
-/* Line 1455 of yacc.c  */
-#line 1715 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2073 "./sparql_p.y"
     {
                 SPART *fake = spar_make_fake_action_solution (sparp_arg);
 		sparp_arg->sparp_in_precode_expn = 0;
@@ -6384,428 +6882,472 @@ yyreduce:
                 spar_compose_retvals_of_insert_or_delete (sparp_arg, (yyval.tree), (yyvsp[(3) - (5)].tree), (yyvsp[(5) - (5)].tree)); }
     break;
 
-  case 419:
+  case 478:
 
-/* Line 1455 of yacc.c  */
-#line 1727 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2085 "./sparql_p.y"
     {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
     break;
 
-  case 420:
+  case 479:
 
-/* Line 1455 of yacc.c  */
-#line 1731 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2089 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, MODIFY_L, NULL,
                   spar_selid_pop (sparp_arg), (yyvsp[(8) - (8)].tree) );
                 spar_compose_retvals_of_modify (sparp_arg, (yyval.tree), (yyvsp[(2) - (8)].tree), (yyvsp[(5) - (8)].tree), (yyvsp[(7) - (8)].tree)); }
     break;
 
-  case 421:
+  case 480:
 
-/* Line 1455 of yacc.c  */
-#line 1738 "./sparql_p.y"
-    { (yyval.tree) = spar_make_sparul_clear (sparp_arg, (yyvsp[(2) - (2)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 2096 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_sparul_clear (sparp_arg, (yyvsp[(3) - (3)].tree), (yyvsp[(2) - (3)].token_type) /* yes, $2 after $3 */); }
     break;
 
-  case 422:
+  case 481:
 
-/* Line 1455 of yacc.c  */
-#line 1743 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2102 "./sparql_p.y"
     {
-		(yyval.tree) = spar_make_sparul_load (sparp_arg, (yyvsp[(2) - (2)].tree), (yyvsp[(2) - (2)].tree)); }
+		(yyval.tree) = spar_make_sparul_load (sparp_arg, (yyvsp[(3) - (3)].tree), (yyvsp[(3) - (3)].tree), (yyvsp[(2) - (3)].token_type)); }
     break;
 
-  case 423:
+  case 482:
 
-/* Line 1455 of yacc.c  */
-#line 1745 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2104 "./sparql_p.y"
     {
-		(yyval.tree) = spar_make_sparul_load (sparp_arg, (yyvsp[(5) - (5)].tree), (yyvsp[(2) - (5)].tree) /* yes, $2 after $3 */); }
+		(yyval.tree) = spar_make_sparul_load (sparp_arg, (yyvsp[(6) - (6)].tree), (yyvsp[(3) - (6)].tree) /* yes, $3 after $6 */, (yyvsp[(2) - (6)].token_type)); }
     break;
 
-  case 424:
+  case 483:
 
-/* Line 1455 of yacc.c  */
-#line 1750 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2109 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_sparul_create (sparp_arg, (yyvsp[(4) - (4)].tree), (yyvsp[(2) - (4)].token_type) /* yes, $2 after $4 */); }
     break;
 
-  case 425:
+  case 484:
 
-/* Line 1455 of yacc.c  */
-#line 1755 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2114 "./sparql_p.y"
     {
-		(yyval.tree) = spar_make_sparul_drop (sparp_arg, (yyvsp[(4) - (4)].tree), (yyvsp[(2) - (4)].token_type) /* yes, $2 after $4 */); }
+		(yyval.tree) = spar_make_sparul_drop (sparp_arg, (yyvsp[(3) - (3)].tree), (yyvsp[(2) - (3)].token_type) /* yes, $2 after $3 */); }
     break;
 
-  case 426:
+  case 485:
 
-/* Line 1455 of yacc.c  */
-#line 1760 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2119 "./sparql_p.y"
     { (yyval.tree) = spar_make_fake_action_solution (sparp_arg); }
     break;
 
-  case 427:
+  case 486:
 
-/* Line 1455 of yacc.c  */
-#line 1761 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2120 "./sparql_p.y"
     {
 		SPART *where_gp = spar_gp_finalize (sparp_arg, NULL);
 		(yyval.tree) = (yyvsp[(3) - (4)].tree);
 		(yyvsp[(3) - (4)].tree)->_.wm.where_gp = where_gp; }
     break;
 
-  case 428:
+  case 487:
 
-/* Line 1455 of yacc.c  */
-#line 1768 "./sparql_p.y"
-    { (yyval.tree) = spar_default_sparul_target (sparp_arg, "INTO GRAPH IDENTIFIED BY clause"); }
+/* Line 1464 of yacc.c  */
+#line 2127 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
-  case 429:
+  case 488:
 
-/* Line 1455 of yacc.c  */
-#line 1769 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2131 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
-  case 430:
+  case 489:
 
-/* Line 1455 of yacc.c  */
-#line 1773 "./sparql_p.y"
-    { (yyval.tree) = spar_default_sparul_target (sparp_arg, "FROM GRAPH IDENTIFIED BY clause"); }
+/* Line 1464 of yacc.c  */
+#line 2135 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)ALL_L; }
     break;
 
-  case 431:
+  case 490:
 
-/* Line 1455 of yacc.c  */
-#line 1774 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(3) - (3)].tree); }
+/* Line 1464 of yacc.c  */
+#line 2136 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)DEFAULT_L; }
     break;
 
-  case 432:
+  case 491:
 
-/* Line 1455 of yacc.c  */
-#line 1778 "./sparql_p.y"
-    { (yyval.tree) = spar_default_sparul_target (sparp_arg, "GRAPH IDENTIFIED BY clause"); }
+/* Line 1464 of yacc.c  */
+#line 2137 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)NAMED_L; }
     break;
 
-  case 433:
+  case 492:
 
-/* Line 1455 of yacc.c  */
-#line 1779 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2138 "./sparql_p.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 434:
+  case 493:
 
-/* Line 1455 of yacc.c  */
-#line 1783 "./sparql_p.y"
-    {}
+/* Line 1464 of yacc.c  */
+#line 2142 "./sparql_p.y"
+    { (yyval.tree) = (SPART *)DEFAULT_L; }
     break;
 
-  case 435:
+  case 494:
 
-/* Line 1455 of yacc.c  */
-#line 1784 "./sparql_p.y"
-    {}
+/* Line 1464 of yacc.c  */
+#line 2143 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 436:
+  case 495:
 
-/* Line 1455 of yacc.c  */
-#line 1788 "./sparql_p.y"
-    { (yyval.token_type) = 0; }
+/* Line 1464 of yacc.c  */
+#line 2147 "./sparql_p.y"
+    { (yyval.tree) = spar_default_sparul_target (sparp_arg, "GRAPH IDENTIFIED BY clause", 0); }
     break;
 
-  case 437:
+  case 496:
 
-/* Line 1455 of yacc.c  */
-#line 1789 "./sparql_p.y"
-    { (yyval.token_type) = 1; }
+/* Line 1464 of yacc.c  */
+#line 2148 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 439:
+  case 497:
+
+/* Line 1464 of yacc.c  */
+#line 2152 "./sparql_p.y"
+    {}
+    break;
+
+  case 498:
 
-/* Line 1455 of yacc.c  */
-#line 1796 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2153 "./sparql_p.y"
     {
-		sparp_env()->spare_qm_default_table = NULL; }
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "WITH clause");
+		sparp_arg->sparp_env->spare_src.ssrc_graph_set_by_with = (yyvsp[(3) - (4)].tree);
+		sparp_make_and_push_new_graph_source (sparp_arg, SPART_GRAPH_FROM, (yyvsp[(3) - (4)].tree), (yyvsp[(4) - (4)].trees)); }
     break;
 
-  case 441:
+  case 499:
 
-/* Line 1455 of yacc.c  */
-#line 1802 "./sparql_p.y"
-    { t_set_push (&(sparp_env()->spare_acc_qm_sqls), (yyvsp[(1) - (1)].tree)); }
+/* Line 1464 of yacc.c  */
+#line 2160 "./sparql_p.y"
+    {}
     break;
 
-  case 451:
+  case 500:
 
-/* Line 1455 of yacc.c  */
-#line 1822 "./sparql_p.y"
-    {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(4) - (7)].box), NULL))
-		  spar_error (sparp_arg, "The identifier of IRI class %.100s is already used in the previous part of the statement", (yyvsp[(4) - (7)].box));
-		t_set_push (&(sparp_arg->sparp_created_jsos), "IRI class");
-		t_set_push (&(sparp_arg->sparp_created_jsos), (yyvsp[(4) - (7)].box));
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT",
-		  (SPART **)t_list (3, (yyvsp[(4) - (7)].box), (yyvsp[(5) - (7)].box), (yyvsp[(6) - (7)].tree)), (yyvsp[(7) - (7)].trees) );
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+/* Line 1464 of yacc.c  */
+#line 2161 "./sparql_p.y"
+    {}
     break;
 
-  case 452:
+  case 501:
 
-/* Line 1455 of yacc.c  */
-#line 1830 "./sparql_p.y"
-    {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(4) - (7)].box), NULL))
-		  spar_error (sparp_arg, "The identifier of IRI class %.100s is already used in the previous part of the statement", (yyvsp[(4) - (7)].box));
-		t_set_push (&(sparp_arg->sparp_created_jsos), "IRI class");
-		t_set_push (&(sparp_arg->sparp_created_jsos), (yyvsp[(4) - (7)].box));
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS",
-		  (SPART **)t_list (2, (yyvsp[(4) - (7)].box), spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ((yyvsp[(6) - (7)].backstack)))), (yyvsp[(7) - (7)].trees) );
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+/* Line 1464 of yacc.c  */
+#line 2165 "./sparql_p.y"
+    { (yyval.token_type) = 0; }
     break;
 
-  case 453:
+  case 502:
 
-/* Line 1455 of yacc.c  */
-#line 1842 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2166 "./sparql_p.y"
+    { (yyval.token_type) = 1; }
+    break;
+
+  case 506:
+
+/* Line 1464 of yacc.c  */
+#line 2183 "./sparql_p.y"
     {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(4) - (7)].box), NULL))
-		  spar_error (sparp_arg, "The identifier of literal class %.100s is already used in the previous part of the statement", (yyvsp[(4) - (7)].box));
-		t_set_push (&(sparp_arg->sparp_created_jsos), "literal class");
-		t_set_push (&(sparp_arg->sparp_created_jsos), (yyvsp[(4) - (7)].box));
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS",
-		  (SPART **)t_list (2, (yyvsp[(4) - (7)].box), spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ((yyvsp[(6) - (7)].backstack)))), (yyvsp[(7) - (7)].trees) );
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		(yyval.tree) = spar_default_sparul_target (sparp_arg, "SPARQL 1.1 DELETE clause", 1);
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
     break;
 
-  case 454:
+  case 507:
 
-/* Line 1455 of yacc.c  */
-#line 1853 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2188 "./sparql_p.y"
     {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(5) - (5)].box), NULL))
-		  spar_error (sparp_arg, "The identifier of IRI class %.100s is already used in the previous part of the statement", (yyvsp[(5) - (5)].box));
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_CLASS",
-		  (SPART **)t_list (2, (yyvsp[(5) - (5)].box), (yyvsp[(2) - (5)].token_type) /* yes, $2 after $5 */), NULL );
-                sparp_jso_push_deleted (sparp_arg, uname_virtrdf_ns_uri_QuadMapFormat , (yyvsp[(5) - (5)].box));
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != (yyvsp[(4) - (5)].tree))
+		  {
+		    (yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, MODIFY_L, NULL,
+		      spar_selid_pop (sparp_arg), (yyvsp[(5) - (5)].tree) );
+		    spar_compose_retvals_of_modify (sparp_arg, (yyval.tree), (yyvsp[(2) - (5)].tree), (yyvsp[(3) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
+		else
+		  {
+		    (yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, DELETE_L, NULL,
+		      spar_selid_pop (sparp_arg), (yyvsp[(5) - (5)].tree) );
+		    spar_compose_retvals_of_insert_or_delete (sparp_arg, (yyval.tree), (yyvsp[(2) - (5)].tree), (yyvsp[(3) - (5)].tree)); } }
     break;
 
-  case 455:
+  case 508:
 
-/* Line 1455 of yacc.c  */
-#line 1863 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2205 "./sparql_p.y"
     {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(5) - (5)].box), NULL))
-		  spar_error (sparp_arg, "The identifier of literal class %.100s is already used in the previous part of the statement", (yyvsp[(5) - (5)].box));
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_CLASS",
-		  (SPART **)t_list (2, (yyvsp[(5) - (5)].box), (yyvsp[(2) - (5)].token_type) /* yes, $2 after $5 */), NULL );
-                sparp_jso_push_deleted (sparp_arg, uname_virtrdf_ns_uri_QuadMapFormat , (yyvsp[(5) - (5)].box));
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		(yyval.tree) = spar_default_sparul_target (sparp_arg, "SPARQL 1.1 INSERT clause", 1);
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
     break;
 
-  case 456:
+  case 509:
 
-/* Line 1455 of yacc.c  */
-#line 1873 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2210 "./sparql_p.y"
     {
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_SUBCLASS",
-		  (SPART **)t_list (2, (yyvsp[(4) - (7)].box), (yyvsp[(7) - (7)].box)), NULL );
-		sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		(yyval.tree) = spar_make_top_or_special_case_from_wm (sparp_arg, INSERT_L, NULL,
+		  spar_selid_pop (sparp_arg), (yyvsp[(4) - (4)].tree) );
+		spar_compose_retvals_of_insert_or_delete (sparp_arg, (yyval.tree), (yyvsp[(2) - (4)].tree), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 457:
+  case 510:
+
+/* Line 1464 of yacc.c  */
+#line 2217 "./sparql_p.y"
+    { (yyval.tree) = NULL; }
+    break;
+
+  case 511:
+
+/* Line 1464 of yacc.c  */
+#line 2218 "./sparql_p.y"
+    { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
+    break;
+
+  case 512:
 
-/* Line 1455 of yacc.c  */
-#line 1877 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2222 "./sparql_p.y"
     {
-		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_SUBCLASS",
-		  (SPART **)t_list (2, (yyvsp[(2) - (5)].box), (yyvsp[(5) - (5)].box)), NULL );
-		sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "WITH clause");
+		(yyval.tree) = spar_make_sparul_copymoveadd (sparp_arg, (yyvsp[(1) - (5)].token_type), (yyvsp[(3) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(2) - (5)].token_type) /* yes, $2 after $3 */); }
     break;
 
-  case 458:
+  case 513:
 
-/* Line 1455 of yacc.c  */
-#line 1884 "./sparql_p.y"
-    { (yyval.trees) = (SPART **)t_list (0); }
+/* Line 1464 of yacc.c  */
+#line 2228 "./sparql_p.y"
+    { (yyval.token_type) = COPY_L; }
     break;
 
-  case 459:
+  case 514:
 
-/* Line 1455 of yacc.c  */
-#line 1885 "./sparql_p.y"
-    { (yyval.trees) = (SPART **)t_list (0); }
+/* Line 1464 of yacc.c  */
+#line 2229 "./sparql_p.y"
+    { (yyval.token_type) = MOVE_L; }
     break;
 
-  case 460:
+  case 515:
 
-/* Line 1455 of yacc.c  */
-#line 1886 "./sparql_p.y"
-    { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
+/* Line 1464 of yacc.c  */
+#line 2230 "./sparql_p.y"
+    { (yyval.token_type) = ADD_L; }
     break;
 
-  case 461:
+  case 517:
 
-/* Line 1455 of yacc.c  */
-#line 1890 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2237 "./sparql_p.y"
     {
-		(yyval.backstack) = NULL;
-		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[0]);
-		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[1]); }
+		sparp_env()->spare_qm_default_table = NULL; }
     break;
 
-  case 462:
+  case 519:
 
-/* Line 1455 of yacc.c  */
-#line 1894 "./sparql_p.y"
-    {
-		(yyval.backstack) = (yyvsp[(1) - (3)].backstack);
-		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[0]);
-		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[1]); }
+/* Line 1464 of yacc.c  */
+#line 2243 "./sparql_p.y"
+    { t_set_push (&(sparp_env()->spare_acc_qm_sqls), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 463:
+  case 527:
 
-/* Line 1455 of yacc.c  */
-#line 1901 "./sparql_p.y"
-    {			/*... 'BIJECTION'	*/
-		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("BIJECTION"), (ptrlong)1); }
+/* Line 1464 of yacc.c  */
+#line 2261 "./sparql_p.y"
+    {
+		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(4) - (7)].box), NULL))
+		  spar_error (sparp_arg, "The identifier of %s class %.100s is already used in the previous part of the statement",
+		    ((IRI_L == (yyvsp[(2) - (7)].token_type)) ? "IRI" : "literal"), (yyvsp[(4) - (7)].box));
+		t_set_push (&(sparp_arg->sparp_created_jsos), ((IRI_L == (yyvsp[(2) - (7)].token_type)) ? "IRI class" : "literal class"));
+		t_set_push (&(sparp_arg->sparp_created_jsos), (yyvsp[(4) - (7)].box));
+		(yyval.tree) = spar_make_qm_sql (sparp_arg,
+		  ((IRI_L == (yyvsp[(2) - (7)].token_type)) ? "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT" : "DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT"),
+		  (SPART **)t_list (3, (yyvsp[(4) - (7)].box), (yyvsp[(5) - (7)].box), (yyvsp[(6) - (7)].tree)), (yyvsp[(7) - (7)].trees) ); }
     break;
 
-  case 464:
+  case 528:
 
-/* Line 1455 of yacc.c  */
-#line 1903 "./sparql_p.y"
-    {			/*... | 'DEREF'	*/
-		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("DEREF"), (ptrlong)1); }
+/* Line 1464 of yacc.c  */
+#line 2270 "./sparql_p.y"
+    {
+		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(4) - (7)].box), NULL))
+		  spar_error (sparp_arg, "The identifier of %s class %.100s is already used in the previous part of the statement",
+		    ((IRI_L == (yyvsp[(2) - (7)].token_type)) ? "IRI" : "literal"), (yyvsp[(4) - (7)].box));
+		t_set_push (&(sparp_arg->sparp_created_jsos), ((IRI_L == (yyvsp[(2) - (7)].token_type)) ? "IRI class" : "literal class"));
+		t_set_push (&(sparp_arg->sparp_created_jsos), (yyvsp[(4) - (7)].box));
+		(yyval.tree) = spar_make_qm_sql (sparp_arg,
+		  ((IRI_L == (yyvsp[(2) - (7)].token_type)) ? "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS" : "DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS"),
+		  (SPART **)t_list (2, (yyvsp[(4) - (7)].box), spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ((yyvsp[(6) - (7)].backstack)))), (yyvsp[(7) - (7)].trees) ); }
     break;
 
-  case 465:
+  case 529:
 
-/* Line 1455 of yacc.c  */
-#line 1905 "./sparql_p.y"
-    {			/*... | 'RETURNS' STRING ('UNION' STRING)*	*/
-		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("RETURNS"),
-		    spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ((yyvsp[(2) - (2)].backstack))) ); }
+/* Line 1464 of yacc.c  */
+#line 2282 "./sparql_p.y"
+    {
+		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(5) - (5)].box), NULL))
+		  spar_error (sparp_arg, "The identifier of %s class %.100s is already used in the previous part of the statement",
+		    ((IRI_L == (yyvsp[(3) - (5)].token_type)) ? "IRI" : "literal"), (yyvsp[(5) - (5)].box));
+		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_CLASS",
+		  (SPART **)t_list (2, (yyvsp[(5) - (5)].box), (yyvsp[(2) - (5)].token_type) /* yes, $2 after $5 */), NULL );
+		sparp_jso_push_deleted (sparp_arg, uname_virtrdf_ns_uri_QuadMapFormat , (yyvsp[(5) - (5)].box)); }
     break;
 
-  case 466:
+  case 530:
 
-/* Line 1455 of yacc.c  */
-#line 1911 "./sparql_p.y"
-    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].box)); }
+/* Line 1464 of yacc.c  */
+#line 2292 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_SUBCLASS",
+		  (SPART **)t_list (2, (yyvsp[(4) - (7)].box), (yyvsp[(7) - (7)].box)), NULL ); }
     break;
 
-  case 467:
+  case 531:
 
-/* Line 1455 of yacc.c  */
-#line 1912 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].box)); }
+/* Line 1464 of yacc.c  */
+#line 2295 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_SUBCLASS",
+		  (SPART **)t_list (2, (yyvsp[(2) - (5)].box), (yyvsp[(5) - (5)].box)), NULL ); }
     break;
 
-  case 468:
+  case 532:
 
-/* Line 1455 of yacc.c  */
-#line 1916 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2301 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (0); }
     break;
 
-  case 469:
+  case 533:
 
-/* Line 1455 of yacc.c  */
-#line 1917 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2302 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (0); }
     break;
 
-  case 470:
+  case 534:
 
-/* Line 1455 of yacc.c  */
-#line 1918 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2303 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
     break;
 
-  case 471:
+  case 535:
 
-/* Line 1455 of yacc.c  */
-#line 1922 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2307 "./sparql_p.y"
     {
 		(yyval.backstack) = NULL;
-		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].boxes)[0]);
-		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].boxes)[1]); }
+		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[0]);
+		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[1]); }
     break;
 
-  case 472:
+  case 536:
 
-/* Line 1455 of yacc.c  */
-#line 1926 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2311 "./sparql_p.y"
     {
 		(yyval.backstack) = (yyvsp[(1) - (3)].backstack);
-		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].boxes)[0]);
-		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].boxes)[1]); }
+		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[0]);
+		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[1]); }
     break;
 
-  case 473:
+  case 537:
 
-/* Line 1455 of yacc.c  */
-#line 1933 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2318 "./sparql_p.y"
     {	/*... ( 'DATATYPE' QmIRIrefConst )	*/
-		(yyval.boxes) = t_list (2, t_box_dv_uname_string ("DATATYPE"), t_box_dv_uname_string ((yyvsp[(2) - (2)].box))); }
+		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("DATATYPE"), t_box_dv_uname_string ((yyvsp[(2) - (2)].box))); }
     break;
 
-  case 474:
+  case 538:
 
-/* Line 1455 of yacc.c  */
-#line 1935 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2320 "./sparql_p.y"
     {			/*... | ( 'LANG' STRING )	*/
-		(yyval.boxes) = t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ((yyvsp[(2) - (2)].box))); }
+		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ((yyvsp[(2) - (2)].box))); }
     break;
 
-  case 475:
+  case 539:
 
-/* Line 1455 of yacc.c  */
-#line 1937 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2322 "./sparql_p.y"
     {			/*... | ( 'LANG' STRING )	*/
-		(yyval.boxes) = t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ((yyvsp[(2) - (2)].box))); }
+		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ((yyvsp[(2) - (2)].box))); }
     break;
 
-  case 476:
+  case 540:
 
-/* Line 1455 of yacc.c  */
-#line 1939 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2324 "./sparql_p.y"
     {			/*... | 'BIJECTION'	*/
-		(yyval.boxes) = t_list (2, t_box_dv_uname_string ("BIJECTION"), (ptrlong)1); }
+		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("BIJECTION"), (ptrlong)1); }
     break;
 
-  case 477:
+  case 541:
 
-/* Line 1455 of yacc.c  */
-#line 1941 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2326 "./sparql_p.y"
     {			/*... | 'DEREF'	*/
-		(yyval.boxes) = t_list (2, t_box_dv_uname_string ("DEREF"), (ptrlong)1); }
+		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("DEREF"), (ptrlong)1); }
     break;
 
-  case 478:
+  case 542:
 
-/* Line 1455 of yacc.c  */
-#line 1943 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2328 "./sparql_p.y"
     {			/*... | 'RETURNS' STRING ('UNION' STRING)*	*/
-		(yyval.boxes) = t_list (2, t_box_dv_uname_string ("RETURNS"),
+		(yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("RETURNS"),
 		    spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ((yyvsp[(2) - (2)].backstack))) ); }
     break;
 
-  case 479:
+  case 543:
 
-/* Line 1455 of yacc.c  */
-#line 1949 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2334 "./sparql_p.y"
+    { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].box)); }
+    break;
+
+  case 544:
+
+/* Line 1464 of yacc.c  */
+#line 2335 "./sparql_p.y"
+    { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].box)); }
+    break;
+
+  case 545:
+
+/* Line 1464 of yacc.c  */
+#line 2339 "./sparql_p.y"
     {
 		sparp_env()->spare_storage_name = (yyvsp[(4) - (4)].box);
 		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(4) - (4)].box), NULL))
@@ -6821,18 +7363,18 @@ yyreduce:
                 sparp_jso_push_affected (sparp_arg, (yyvsp[(4) - (4)].box)); }
     break;
 
-  case 480:
+  case 546:
 
-/* Line 1455 of yacc.c  */
-#line 1963 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2353 "./sparql_p.y"
     {
 		spar_qm_push_bookmark (sparp_arg); }
     break;
 
-  case 481:
+  case 547:
 
-/* Line 1455 of yacc.c  */
-#line 1965 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2355 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_END_ALTER_QUAD_STORAGE",
@@ -6841,10 +7383,24 @@ yyreduce:
 		sparp_env()->spare_storage_name = NULL; }
     break;
 
-  case 482:
+  case 548:
+
+/* Line 1464 of yacc.c  */
+#line 2364 "./sparql_p.y"
+    { (yyval.token_type) = IRI_L; }
+    break;
+
+  case 549:
 
-/* Line 1455 of yacc.c  */
-#line 1974 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2365 "./sparql_p.y"
+    { (yyval.token_type) = LITERAL_L; }
+    break;
+
+  case 550:
+
+/* Line 1464 of yacc.c  */
+#line 2369 "./sparql_p.y"
     {
 		sparp_env()->spare_storage_name = (yyvsp[(4) - (4)].box);
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
@@ -6853,18 +7409,18 @@ yyreduce:
                 sparp_jso_push_affected (sparp_arg, (yyvsp[(4) - (4)].box)); }
     break;
 
-  case 483:
+  case 551:
 
-/* Line 1455 of yacc.c  */
-#line 1981 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2376 "./sparql_p.y"
     {
 		spar_qm_push_bookmark (sparp_arg); }
     break;
 
-  case 484:
+  case 552:
 
-/* Line 1455 of yacc.c  */
-#line 1983 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2378 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_END_ALTER_QUAD_STORAGE",
@@ -6873,10 +7429,10 @@ yyreduce:
 		sparp_env()->spare_storage_name = NULL; }
     break;
 
-  case 485:
+  case 553:
 
-/* Line 1455 of yacc.c  */
-#line 1992 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2387 "./sparql_p.y"
     {
 		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, (yyvsp[(5) - (5)].box), NULL))
 		  spar_error (sparp_arg, "The identifier of Quad Storage %.100s is already used in the previous part of the statement", (yyvsp[(5) - (5)].box));
@@ -6887,328 +7443,390 @@ yyreduce:
                 sparp_jso_push_affected (sparp_arg, (yyvsp[(5) - (5)].box)); }
     break;
 
-  case 486:
+  case 554:
 
-/* Line 1455 of yacc.c  */
-#line 2003 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2398 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                   (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		  (SPART **)t_list (4, t_box_dv_uname_string ("ID"), (yyvsp[(5) - (5)].box), t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ((yyvsp[(2) - (5)].token_type))) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
     break;
 
-  case 487:
+  case 555:
 
-/* Line 1455 of yacc.c  */
-#line 2009 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2404 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                     (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		    (SPART **)t_list (4, t_box_dv_uname_string ("GRAPH"), (yyvsp[(6) - (6)].box), t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ((yyvsp[(2) - (6)].token_type))) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
     break;
 
-  case 488:
+  case 556:
 
-/* Line 1455 of yacc.c  */
-#line 2018 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2413 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                   (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		  (SPART **)t_list (4, t_box_dv_uname_string ("ID"), (yyvsp[(3) - (3)].box), t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ((yyvsp[(2) - (3)].token_type))) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
     break;
 
-  case 489:
+  case 557:
 
-/* Line 1455 of yacc.c  */
-#line 2024 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2419 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                     (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		    (SPART **)t_list (4, t_box_dv_uname_string ("GRAPH"), (yyvsp[(4) - (4)].box), t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ((yyvsp[(2) - (4)].token_type))) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
     break;
 
-  case 490:
+  case 558:
 
-/* Line 1455 of yacc.c  */
-#line 2033 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2428 "./sparql_p.y"
     {}
     break;
 
-  case 491:
+  case 559:
 
-/* Line 1455 of yacc.c  */
-#line 2034 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2429 "./sparql_p.y"
     {	/*... ( 'FROM' QTABLE 'AS' PLAIN_ID QmTextLiteral* )	*/
-		spar_qm_add_aliased_table (sparp_arg, (yyvsp[(3) - (5)].box), (yyvsp[(5) - (5)].box));
+		spar_qm_add_aliased_table_or_sqlquery (sparp_arg, (yyvsp[(3) - (5)].box), (yyvsp[(5) - (5)].box));
 		sparp_env()->spare_qm_current_table_alias = (yyvsp[(5) - (5)].box); }
     break;
 
-  case 492:
+  case 560:
 
-/* Line 1455 of yacc.c  */
-#line 2037 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2432 "./sparql_p.y"
     {
 		sparp_env()->spare_qm_current_table_alias = NULL; }
     break;
 
-  case 493:
+  case 561:
 
-/* Line 1455 of yacc.c  */
-#line 2039 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2434 "./sparql_p.y"
     {		/*... | ( 'FROM' PLAIN_ID 'AS' PLAIN_ID QmTextLiteral* )	*/
 		spar_qm_add_aliased_alias (sparp_arg, (yyvsp[(3) - (5)].box), (yyvsp[(5) - (5)].box));
 		sparp_env()->spare_qm_current_table_alias = (yyvsp[(5) - (5)].box); }
     break;
 
-  case 494:
+  case 562:
 
-/* Line 1455 of yacc.c  */
-#line 2042 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2437 "./sparql_p.y"
+    {		/*... | ( 'FROM' 'SQLQUERY' QmSqlQuery 'AS' PLAIN_ID QmTextLiteral* )	*/
+		caddr_t qry = t_box_sprintf (100 + strlen((yyvsp[(4) - (6)].box)), "/*???*/ %s", (yyvsp[(4) - (6)].box));
+		spar_qm_add_aliased_table_or_sqlquery (sparp_arg, qry, (yyvsp[(6) - (6)].box));
+		sparp_env()->spare_qm_current_table_alias = (yyvsp[(6) - (6)].box); }
+    break;
+
+  case 563:
+
+/* Line 1464 of yacc.c  */
+#line 2441 "./sparql_p.y"
     {
 		sparp_env()->spare_qm_current_table_alias = NULL; }
     break;
 
-  case 495:
+  case 564:
 
-/* Line 1455 of yacc.c  */
-#line 2044 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2443 "./sparql_p.y"
     {						/*... | QmCondition	*/
 		spar_qm_add_table_filter (sparp_arg, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 496:
+  case 565:
 
-/* Line 1455 of yacc.c  */
-#line 2049 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2448 "./sparql_p.y"
     {}
     break;
 
-  case 498:
+  case 567:
 
-/* Line 1455 of yacc.c  */
-#line 2054 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2453 "./sparql_p.y"
     {
 		spar_qm_add_text_literal (sparp_arg,
 		  sparp_env()->spare_qm_current_table_alias,
 		  (yyvsp[(2) - (6)].box), (yyvsp[(4) - (6)].tree), (yyvsp[(5) - (6)].trees), (yyvsp[(6) - (6)].trees) ); }
     break;
 
-  case 499:
+  case 568:
 
-/* Line 1455 of yacc.c  */
-#line 2061 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2460 "./sparql_p.y"
     { (yyval.box) = NULL; }
     break;
 
-  case 500:
+  case 569:
 
-/* Line 1455 of yacc.c  */
-#line 2062 "./sparql_p.y"
-    { (yyval.box) = (yyvsp[(1) - (1)].box); }
+/* Line 1464 of yacc.c  */
+#line 2461 "./sparql_p.y"
+    { (yyval.box) = (caddr_t)((ptrlong)(XML_L)); }
     break;
 
-  case 501:
+  case 570:
 
-/* Line 1455 of yacc.c  */
-#line 2066 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2465 "./sparql_p.y"
     { (yyval.trees) = NULL; }
     break;
 
-  case 502:
+  case 571:
 
-/* Line 1455 of yacc.c  */
-#line 2067 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2466 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
     break;
 
-  case 503:
+  case 572:
 
-/* Line 1455 of yacc.c  */
-#line 2071 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2470 "./sparql_p.y"
     { (yyval.trees) = NULL; }
     break;
 
-  case 504:
+  case 573:
 
-/* Line 1455 of yacc.c  */
-#line 2072 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2471 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
     break;
 
-  case 505:
+  case 574:
 
-/* Line 1455 of yacc.c  */
-#line 2076 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2475 "./sparql_p.y"
     {
 		(yyval.backstack) = NULL;
 		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[1]);
 		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[0]); }
     break;
 
-  case 506:
+  case 575:
 
-/* Line 1455 of yacc.c  */
-#line 2080 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2479 "./sparql_p.y"
     {
 		(yyval.backstack) = (yyvsp[(1) - (3)].backstack);
 		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[1]);
 		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[0]); }
     break;
 
-  case 507:
+  case 576:
 
-/* Line 1455 of yacc.c  */
-#line 2087 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2486 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ((yyvsp[(1) - (1)].box)), NULL); }
     break;
 
-  case 508:
+  case 577:
 
-/* Line 1455 of yacc.c  */
-#line 2088 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2487 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ((yyvsp[(1) - (2)].box)), (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 509:
+  case 578:
 
-/* Line 1455 of yacc.c  */
-#line 2092 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2491 "./sparql_p.y"
     {}
     break;
 
-  case 510:
+  case 579:
 
-/* Line 1455 of yacc.c  */
-#line 2093 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2492 "./sparql_p.y"
     {}
     break;
 
-  case 511:
+  case 580:
 
-/* Line 1455 of yacc.c  */
-#line 2094 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2493 "./sparql_p.y"
     {}
     break;
 
-  case 512:
+  case 581:
 
-/* Line 1455 of yacc.c  */
-#line 2098 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2497 "./sparql_p.y"
     {}
     break;
 
-  case 513:
+  case 582:
 
-/* Line 1455 of yacc.c  */
-#line 2099 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2498 "./sparql_p.y"
     {
 		spar_qm_clean_locals (sparp_arg);
 		sparp_env()->spare_qm_default_table = NULL; }
     break;
 
-  case 514:
+  case 583:
 
-/* Line 1455 of yacc.c  */
-#line 2102 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2501 "./sparql_p.y"
     {}
     break;
 
-  case 516:
+  case 585:
 
-/* Line 1455 of yacc.c  */
-#line 2107 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2506 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 517:
+  case 586:
 
-/* Line 1455 of yacc.c  */
-#line 2109 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2508 "./sparql_p.y"
+    {
+		t_set_push (&(sparp_env()->spare_acc_qm_sqls), (yyvsp[(1) - (1)].tree)); }
+    break;
+
+  case 587:
+
+/* Line 1464 of yacc.c  */
+#line 2510 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 518:
+  case 588:
 
-/* Line 1455 of yacc.c  */
-#line 2114 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2512 "./sparql_p.y"
+    {
+		t_set_push (&(sparp_env()->spare_acc_qm_sqls), (yyvsp[(1) - (1)].tree)); }
+    break;
+
+  case 589:
+
+/* Line 1464 of yacc.c  */
+#line 2517 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_ATTACH_MACRO_LIBRARY",
+		  (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
+		  (SPART **)t_list (2, t_box_dv_uname_string ("ID"), (yyvsp[(4) - (4)].box)) );
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
+    break;
+
+  case 590:
+
+/* Line 1464 of yacc.c  */
+#line 2526 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY",
+		  (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
+		  (SPART **)t_list (4, t_box_dv_uname_string ("ID"), (yyvsp[(5) - (5)].box), t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ((yyvsp[(2) - (5)].token_type))) );
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
+    break;
+
+  case 591:
+
+/* Line 1464 of yacc.c  */
+#line 2532 "./sparql_p.y"
+    {
+		(yyval.tree) = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY",
+		  (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
+		  (SPART **)t_list (2, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ((yyvsp[(2) - (4)].token_type))) );
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
+    break;
+
+  case 592:
+
+/* Line 1464 of yacc.c  */
+#line 2541 "./sparql_p.y"
     {}
     break;
 
-  case 519:
+  case 593:
 
-/* Line 1455 of yacc.c  */
-#line 2115 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2542 "./sparql_p.y"
     {}
     break;
 
-  case 520:
+  case 594:
 
-/* Line 1455 of yacc.c  */
-#line 2116 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2543 "./sparql_p.y"
     {}
     break;
 
-  case 522:
+  case 596:
 
-/* Line 1455 of yacc.c  */
-#line 2121 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2548 "./sparql_p.y"
     {
 		spar_qm_clean_locals (sparp_arg);
 		sparp_env()->spare_qm_default_table = NULL; }
     break;
 
-  case 524:
+  case 598:
 
-/* Line 1455 of yacc.c  */
-#line 2129 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2556 "./sparql_p.y"
     { spar_qm_push_local (sparp_arg, CREATE_L, (SPART *)((yyvsp[(2) - (3)].box)), 1); }
     break;
 
-  case 525:
+  case 599:
 
-/* Line 1455 of yacc.c  */
-#line 2130 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2557 "./sparql_p.y"
     {;}
     break;
 
-  case 526:
+  case 600:
 
-/* Line 1455 of yacc.c  */
-#line 2132 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2559 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, CREATE_L, (SPART *)((yyvsp[(2) - (6)].box)), 1);
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_ATTACH_MAPPING",
                     (SPART **)t_list (2, t_box_copy (sparp_env()->spare_storage_name), (yyvsp[(5) - (6)].box)),
-		    (SPART **)t_list_concat ((caddr_t)(yyvsp[(6) - (6)].trees), (caddr_t)t_list (2, t_box_dv_uname_string ("ID"), (yyvsp[(2) - (6)].box))) ) ); }
+		    t_spartlist_concat ((yyvsp[(6) - (6)].trees), (SPART **)t_list (2, t_box_dv_uname_string ("ID"), (yyvsp[(2) - (6)].box))) ) ); }
     break;
 
-  case 527:
+  case 601:
 
-/* Line 1455 of yacc.c  */
-#line 2139 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2566 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, GRAPH_L, (SPART *)((yyvsp[(3) - (7)].box)), 1);
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_ATTACH_MAPPING",
                     (SPART **)t_list (2, t_box_copy (sparp_env()->spare_storage_name), (yyvsp[(6) - (7)].box)),
-		    (SPART **)t_list_concat ((caddr_t)(yyvsp[(7) - (7)].trees), (caddr_t)t_list (2, t_box_dv_uname_string ("GRAPH"), (yyvsp[(3) - (7)].box))) ) ); }
+		    t_spartlist_concat ((yyvsp[(7) - (7)].trees), (SPART **)t_list (2, t_box_dv_uname_string ("GRAPH"), (yyvsp[(3) - (7)].box))) ) ); }
     break;
 
-  case 528:
+  case 602:
 
-/* Line 1455 of yacc.c  */
-#line 2146 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2573 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_qm_make_empty_mapping (sparp_arg, NULL, (yyvsp[(2) - (3)].trees)) );
@@ -7218,25 +7836,25 @@ yyreduce:
 		spar_qm_push_bookmark (sparp_arg); }
     break;
 
-  case 529:
+  case 603:
 
-/* Line 1455 of yacc.c  */
-#line 2153 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2580 "./sparql_p.y"
     {
 		spar_qm_pop_bookmark (sparp_arg); }
     break;
 
-  case 531:
+  case 605:
 
-/* Line 1455 of yacc.c  */
-#line 2159 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2586 "./sparql_p.y"
     {;}
     break;
 
-  case 532:
+  case 606:
 
-/* Line 1455 of yacc.c  */
-#line 2161 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2588 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_qm_make_empty_mapping (sparp_arg,
@@ -7248,18 +7866,18 @@ yyreduce:
 		spar_qm_push_bookmark (sparp_arg); }
     break;
 
-  case 533:
+  case 607:
 
-/* Line 1455 of yacc.c  */
-#line 2170 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2597 "./sparql_p.y"
     {
 		spar_qm_pop_bookmark (sparp_arg); }
     break;
 
-  case 534:
+  case 608:
 
-/* Line 1455 of yacc.c  */
-#line 2175 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2602 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, SUBJECT_L,
 		  ((NULL != (yyvsp[(1) - (3)].tree)) ? ((SPART *)((yyvsp[(1) - (3)].tree))) : spar_qm_get_local (sparp_arg, SUBJECT_L, 1)),
@@ -7273,649 +7891,607 @@ yyreduce:
 		    (yyvsp[(3) - (3)].trees) ) ); }
     break;
 
-  case 535:
+  case 609:
 
-/* Line 1455 of yacc.c  */
-#line 2189 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2616 "./sparql_p.y"
     { spar_qm_push_local (sparp_arg, SUBJECT_L, (yyvsp[(1) - (1)].tree), 0); }
     break;
 
-  case 536:
+  case 610:
 
-/* Line 1455 of yacc.c  */
-#line 2190 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2617 "./sparql_p.y"
     {}
     break;
 
-  case 539:
+  case 613:
 
-/* Line 1455 of yacc.c  */
-#line 2199 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2626 "./sparql_p.y"
     { spar_qm_push_local (sparp_arg, GRAPH_L, (yyvsp[(2) - (2)].tree), 0); }
     break;
 
-  case 540:
+  case 614:
 
-/* Line 1455 of yacc.c  */
-#line 2200 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2627 "./sparql_p.y"
     { spar_qm_push_local (sparp_arg, SUBJECT_L, (yyvsp[(2) - (2)].tree), 0); }
     break;
 
-  case 541:
+  case 615:
 
-/* Line 1455 of yacc.c  */
-#line 2201 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2628 "./sparql_p.y"
     { spar_qm_push_local (sparp_arg, PREDICATE_L, (yyvsp[(2) - (2)].tree), 0); }
     break;
 
-  case 542:
+  case 616:
 
-/* Line 1455 of yacc.c  */
-#line 2202 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2629 "./sparql_p.y"
     { spar_qm_push_local (sparp_arg, OBJECT_L, (yyvsp[(2) - (2)].tree), 0); }
     break;
 
-  case 543:
+  case 617:
 
-/* Line 1455 of yacc.c  */
-#line 2203 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2630 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, DATATYPE_L, (SPART *)((yyvsp[(4) - (4)].tree)), 0); }
     break;
 
-  case 544:
+  case 618:
 
-/* Line 1455 of yacc.c  */
-#line 2205 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2632 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, LANG_L, (SPART *)((yyvsp[(6) - (6)].tree)), 0); }
     break;
 
-  case 545:
+  case 619:
 
-/* Line 1455 of yacc.c  */
-#line 2211 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2638 "./sparql_p.y"
     {}
     break;
 
-  case 546:
+  case 620:
 
-/* Line 1455 of yacc.c  */
-#line 2212 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2639 "./sparql_p.y"
     {
 		spar_qm_pop_key (sparp_arg, PREDICATE_L); }
     break;
 
-  case 548:
+  case 622:
 
-/* Line 1455 of yacc.c  */
-#line 2218 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2645 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, PREDICATE_L,
 		  ((NULL != (yyvsp[(1) - (1)].tree)) ? ((SPART *)((yyvsp[(1) - (1)].tree))) : spar_qm_get_local (sparp_arg, PREDICATE_L, 1)),
 		  0 ); }
     break;
 
-  case 549:
+  case 623:
 
-/* Line 1455 of yacc.c  */
-#line 2222 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2649 "./sparql_p.y"
     {}
     break;
 
-  case 550:
+  case 624:
 
-/* Line 1455 of yacc.c  */
-#line 2223 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2650 "./sparql_p.y"
     { sparyyerror ("Description of predicate field is expected here"); }
     break;
 
-  case 551:
+  case 625:
 
-/* Line 1455 of yacc.c  */
-#line 2227 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2654 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_qm_make_real_mapping (sparp_arg, (yyvsp[(2) - (2)].box), (yyvsp[(1) - (2)].trees)) ); }
     break;
 
-  case 552:
+  case 626:
 
-/* Line 1455 of yacc.c  */
-#line 2230 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2657 "./sparql_p.y"
     {
 		spar_qm_pop_key (sparp_arg, OBJECT_L); }
     break;
 
-  case 553:
+  case 627:
 
-/* Line 1455 of yacc.c  */
-#line 2232 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2659 "./sparql_p.y"
     {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_qm_make_real_mapping (sparp_arg, (yyvsp[(5) - (5)].box), (yyvsp[(4) - (5)].trees)) ); }
     break;
 
-  case 554:
+  case 628:
 
-/* Line 1455 of yacc.c  */
-#line 2238 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2665 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, OBJECT_L,
 		  ((NULL != (yyvsp[(1) - (1)].tree)) ? ((SPART *)((yyvsp[(1) - (1)].tree))) : spar_qm_get_local (sparp_arg, OBJECT_L, 1)),
 		  0 ); }
     break;
 
-  case 555:
+  case 629:
 
-/* Line 1455 of yacc.c  */
-#line 2242 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2669 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, DATATYPE_L, (SPART *)((yyvsp[(3) - (3)].tree)), 0); }
     break;
 
-  case 556:
+  case 630:
 
-/* Line 1455 of yacc.c  */
-#line 2244 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2671 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, LANG_L, (SPART *)((yyvsp[(5) - (5)].tree)), 0); }
     break;
 
-  case 557:
+  case 631:
 
-/* Line 1455 of yacc.c  */
-#line 2246 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2673 "./sparql_p.y"
     {
 		spar_qm_push_local (sparp_arg, WHERE_L, (SPART *)t_revlist_to_array ((yyvsp[(7) - (7)].backstack)), 0); }
     break;
 
-  case 558:
+  case 632:
 
-/* Line 1455 of yacc.c  */
-#line 2248 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2675 "./sparql_p.y"
     { (yyval.trees) = (yyvsp[(9) - (9)].trees); }
     break;
 
-  case 559:
+  case 633:
 
-/* Line 1455 of yacc.c  */
-#line 2249 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2676 "./sparql_p.y"
     { sparyyerror ("Description of object field is expected here"); }
     break;
 
-  case 560:
+  case 634:
 
-/* Line 1455 of yacc.c  */
-#line 2253 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2680 "./sparql_p.y"
     { (yyval.box) = NULL; }
     break;
 
-  case 561:
+  case 635:
 
-/* Line 1455 of yacc.c  */
-#line 2254 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2681 "./sparql_p.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 562:
+  case 636:
 
-/* Line 1455 of yacc.c  */
-#line 2258 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2685 "./sparql_p.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 563:
+  case 637:
 
-/* Line 1455 of yacc.c  */
-#line 2259 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2686 "./sparql_p.y"
     { (yyval.tree) = (SPART *)(yyvsp[(2) - (2)].tree)->_.lit.val; }
     break;
 
-  case 564:
+  case 638:
 
-/* Line 1455 of yacc.c  */
-#line 2260 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2687 "./sparql_p.y"
     { sparyyerror ("Datatype of object field should be either constant IRI or table field, not template IRI (string)"); }
     break;
 
-  case 565:
+  case 639:
 
-/* Line 1455 of yacc.c  */
-#line 2261 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2688 "./sparql_p.y"
     { (yyval.tree) = spar_make_qm_col_desc (sparp_arg, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 566:
+  case 640:
 
-/* Line 1455 of yacc.c  */
-#line 2265 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2692 "./sparql_p.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 567:
+  case 641:
 
-/* Line 1455 of yacc.c  */
-#line 2266 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2693 "./sparql_p.y"
     { (yyval.tree) = (SPART *)(yyvsp[(2) - (2)].box); }
     break;
 
-  case 568:
+  case 642:
 
-/* Line 1455 of yacc.c  */
-#line 2267 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2694 "./sparql_p.y"
     { (yyval.tree) = spar_make_qm_col_desc (sparp_arg, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 569:
-
-/* Line 1455 of yacc.c  */
-#line 2271 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 570:
+  case 644:
 
-/* Line 1455 of yacc.c  */
-#line 2272 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2699 "./sparql_p.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 571:
+  case 645:
 
-/* Line 1455 of yacc.c  */
-#line 2273 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2700 "./sparql_p.y"
     { (yyval.tree) = (SPART *)uname_rdf_ns_uri_type; }
     break;
 
-  case 572:
-
-/* Line 1455 of yacc.c  */
-#line 2277 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 573:
+  case 647:
 
-/* Line 1455 of yacc.c  */
-#line 2278 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2705 "./sparql_p.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 574:
+  case 648:
 
-/* Line 1455 of yacc.c  */
-#line 2282 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2709 "./sparql_p.y"
     { (yyval.tree) = (SPART *)(yyvsp[(1) - (1)].box); }
     break;
 
-  case 575:
-
-/* Line 1455 of yacc.c  */
-#line 2283 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 576:
-
-/* Line 1455 of yacc.c  */
-#line 2284 "./sparql_p.y"
-    { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
-    break;
-
-  case 577:
+  case 651:
 
-/* Line 1455 of yacc.c  */
-#line 2286 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2713 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_qm_value (sparp_arg, (yyvsp[(1) - (4)].box), (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack))); }
     break;
 
-  case 578:
+  case 652:
 
-/* Line 1455 of yacc.c  */
-#line 2288 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2715 "./sparql_p.y"
     {			/*... | QmSqlCol	*/
 		(yyval.tree) = spar_make_qm_value (sparp_arg, box_dv_uname_string ("literal"), (SPART **)t_list (1, (yyvsp[(1) - (1)].tree))); }
     break;
 
-  case 579:
+  case 653:
 
-/* Line 1455 of yacc.c  */
-#line 2293 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2720 "./sparql_p.y"
     { (yyval.backstack) = NULL; }
     break;
 
-  case 580:
-
-/* Line 1455 of yacc.c  */
-#line 2294 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (1)].backstack); }
-    break;
-
-  case 581:
+  case 655:
 
-/* Line 1455 of yacc.c  */
-#line 2298 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2725 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 582:
+  case 656:
 
-/* Line 1455 of yacc.c  */
-#line 2299 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2726 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 583:
+  case 657:
 
-/* Line 1455 of yacc.c  */
-#line 2303 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2730 "./sparql_p.y"
     { (yyval.box) = (yyvsp[(3) - (3)].box); }
     break;
 
-  case 584:
+  case 658:
 
-/* Line 1455 of yacc.c  */
-#line 2304 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2731 "./sparql_p.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 585:
+  case 659:
+
+/* Line 1464 of yacc.c  */
+#line 2735 "./sparql_p.y"
+    { (yyval.box) = (yyvsp[(2) - (2)].box); }
+    break;
 
-/* Line 1455 of yacc.c  */
-#line 2308 "./sparql_p.y"
+  case 660:
+
+/* Line 1464 of yacc.c  */
+#line 2736 "./sparql_p.y"
+    { (yyval.box) = (yyvsp[(1) - (1)].box); }
+    break;
+
+  case 661:
+
+/* Line 1464 of yacc.c  */
+#line 2740 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (0); }
     break;
 
-  case 586:
+  case 662:
 
-/* Line 1455 of yacc.c  */
-#line 2309 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2741 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (0); }
     break;
 
-  case 587:
+  case 663:
 
-/* Line 1455 of yacc.c  */
-#line 2310 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2742 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_revlist_to_array ((yyvsp[(3) - (4)].backstack)); }
     break;
 
-  case 588:
+  case 664:
 
-/* Line 1455 of yacc.c  */
-#line 2314 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2746 "./sparql_p.y"
     {
 		(yyval.backstack) = NULL;
 		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[0]);
 		t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)[1]); }
     break;
 
-  case 589:
+  case 665:
 
-/* Line 1455 of yacc.c  */
-#line 2318 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2750 "./sparql_p.y"
     {
 		(yyval.backstack) = (yyvsp[(1) - (3)].backstack);
 		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[0]);
 		t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].trees)[1]); }
     break;
 
-  case 590:
+  case 666:
 
-/* Line 1455 of yacc.c  */
-#line 2325 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2757 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("SOFT_EXCLUSIVE"), (ptrlong)1); }
     break;
 
-  case 591:
+  case 667:
 
-/* Line 1455 of yacc.c  */
-#line 2326 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2758 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("EXCLUSIVE"), (ptrlong)1); }
     break;
 
-  case 592:
+  case 668:
 
-/* Line 1455 of yacc.c  */
-#line 2327 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2759 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("ORDER"), (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 593:
+  case 669:
 
-/* Line 1455 of yacc.c  */
-#line 2328 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2760 "./sparql_p.y"
     { (yyval.trees) = (SPART **)t_list (2, t_box_dv_uname_string ("USING"), (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 594:
+  case 670:
 
-/* Line 1455 of yacc.c  */
-#line 2332 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2764 "./sparql_p.y"
     { (yyval.backstack) = NULL; }
     break;
 
-  case 595:
-
-/* Line 1455 of yacc.c  */
-#line 2333 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (1)].backstack); }
-    break;
-
-  case 596:
+  case 672:
 
-/* Line 1455 of yacc.c  */
-#line 2337 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2769 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 597:
+  case 673:
 
-/* Line 1455 of yacc.c  */
-#line 2338 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2770 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 598:
+  case 674:
 
-/* Line 1455 of yacc.c  */
-#line 2342 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2774 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 599:
+  case 675:
 
-/* Line 1455 of yacc.c  */
-#line 2343 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2775 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 600:
+  case 676:
 
-/* Line 1455 of yacc.c  */
-#line 2347 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2779 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_vector_qm_sql (sparp_arg,
 		  (SPART **)t_list (4, (yyvsp[(2) - (5)].box), (yyvsp[(3) - (5)].tree), (yyvsp[(5) - (5)].boxes)[0], (yyvsp[(5) - (5)].boxes)[1]) ); }
     break;
 
-  case 601:
+  case 677:
 
-/* Line 1455 of yacc.c  */
-#line 2353 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2785 "./sparql_p.y"
     { (yyval.tree) = spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ((yyvsp[(2) - (3)].backstack))); }
     break;
 
-  case 602:
+  case 678:
 
-/* Line 1455 of yacc.c  */
-#line 2357 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2789 "./sparql_p.y"
     { (yyval.backstack) = NULL; }
     break;
 
-  case 603:
-
-/* Line 1455 of yacc.c  */
-#line 2358 "./sparql_p.y"
-    { (yyval.backstack) = (yyvsp[(1) - (1)].backstack); }
-    break;
-
-  case 604:
+  case 680:
 
-/* Line 1455 of yacc.c  */
-#line 2362 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2794 "./sparql_p.y"
     { (yyval.backstack) = NULL; t_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
-  case 605:
+  case 681:
 
-/* Line 1455 of yacc.c  */
-#line 2363 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2795 "./sparql_p.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); t_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
-  case 606:
+  case 682:
 
-/* Line 1455 of yacc.c  */
-#line 2367 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2799 "./sparql_p.y"
     {
 		(yyval.tree) = spar_make_vector_qm_sql (sparp_arg,
 		  (SPART **)t_list (4, (yyvsp[(1) - (3)].box), (yyvsp[(2) - (3)].box), (yyvsp[(3) - (3)].boxes)[0], (yyvsp[(3) - (3)].boxes)[1]) ); }
     break;
 
-  case 607:
+  case 683:
 
-/* Line 1455 of yacc.c  */
-#line 2373 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2805 "./sparql_p.y"
     { (yyval.boxes) = t_list (2, (yyvsp[(1) - (1)].box), (ptrlong)0); }
     break;
 
-  case 608:
+  case 684:
 
-/* Line 1455 of yacc.c  */
-#line 2374 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2806 "./sparql_p.y"
     { (yyval.boxes) = t_list (2, (yyvsp[(1) - (3)].box), (ptrlong)1); }
     break;
 
-  case 609:
+  case 685:
 
-/* Line 1455 of yacc.c  */
-#line 2378 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2810 "./sparql_p.y"
     { (yyval.box) = t_box_dv_uname_string ("in"); }
     break;
 
-  case 610:
+  case 686:
 
-/* Line 1455 of yacc.c  */
-#line 2379 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2811 "./sparql_p.y"
     { (yyval.box) = t_box_dv_uname_string ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 611:
+  case 687:
 
-/* Line 1455 of yacc.c  */
-#line 2383 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2815 "./sparql_p.y"
     { (yyval.tree) = sparp_make_qm_sqlcol (sparp_arg, SPARQL_PLAIN_ID, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 612:
+  case 688:
 
-/* Line 1455 of yacc.c  */
-#line 2384 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2816 "./sparql_p.y"
     { (yyval.tree) = sparp_make_qm_sqlcol (sparp_arg, SPARQL_SQL_ALIASCOLNAME, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 613:
+  case 689:
 
-/* Line 1455 of yacc.c  */
-#line 2385 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2817 "./sparql_p.y"
     { (yyval.tree) = sparp_make_qm_sqlcol (sparp_arg, SPARQL_SQL_QTABLECOLNAME, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 614:
-
-/* Line 1455 of yacc.c  */
-#line 2389 "./sparql_p.y"
-    { (yyval.box) = (yyvsp[(1) - (1)].box); }
-    break;
-
-  case 615:
+  case 691:
 
-/* Line 1455 of yacc.c  */
-#line 2390 "./sparql_p.y"
-    { (yyval.box) = (yyvsp[(1) - (1)].box); }
+/* Line 1464 of yacc.c  */
+#line 2822 "./sparql_p.y"
+    { (yyval.box) = t_box_dv_short_string ("TEXT"); }
     break;
 
-  case 616:
+  case 692:
 
-/* Line 1455 of yacc.c  */
-#line 2391 "./sparql_p.y"
-    { (yyval.box) = (yyvsp[(1) - (1)].box); }
+/* Line 1464 of yacc.c  */
+#line 2823 "./sparql_p.y"
+    { (yyval.box) = t_box_dv_short_string ("XML"); }
     break;
 
-  case 617:
+  case 693:
 
-/* Line 1455 of yacc.c  */
-#line 2396 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2828 "./sparql_p.y"
     { (yyval.box) = (yyvsp[(1) - (1)].tree)->_.lit.val; }
     break;
 
-  case 618:
+  case 694:
 
-/* Line 1455 of yacc.c  */
-#line 2397 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2829 "./sparql_p.y"
     {
 		(yyval.box) = spar_make_iri_from_template (sparp_arg, (yyvsp[(3) - (4)].box)); }
     break;
 
-  case 619:
+  case 695:
 
-/* Line 1455 of yacc.c  */
-#line 2402 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2834 "./sparql_p.y"
     {}
     break;
 
-  case 620:
+  case 696:
 
-/* Line 1455 of yacc.c  */
-#line 2403 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2835 "./sparql_p.y"
     {}
     break;
 
-  case 621:
+  case 697:
 
-/* Line 1455 of yacc.c  */
-#line 2407 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2839 "./sparql_p.y"
     {}
     break;
 
-  case 622:
+  case 698:
 
-/* Line 1455 of yacc.c  */
-#line 2408 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2840 "./sparql_p.y"
     {}
     break;
 
-  case 623:
+  case 699:
 
-/* Line 1455 of yacc.c  */
-#line 2412 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2844 "./sparql_p.y"
     {}
     break;
 
-  case 624:
+  case 700:
 
-/* Line 1455 of yacc.c  */
-#line 2413 "./sparql_p.y"
+/* Line 1464 of yacc.c  */
+#line 2845 "./sparql_p.y"
     {}
     break;
 
 
 
-/* Line 1455 of yacc.c  */
-#line 7919 "sparql_p.c"
+/* Line 1464 of yacc.c  */
+#line 8495 "sparql_p.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/libsrc/Wi/sparql_p.h b/libsrc/Wi/sparql_p.h
index 947a33d..692b19a 100644
--- a/libsrc/Wi/sparql_p.h
+++ b/libsrc/Wi/sparql_p.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -67,156 +66,158 @@
      _STAR = 283,
      _STAR_GT = 284,
      a_L = 285,
-     ALTER_L = 286,
-     AS_L = 287,
-     ASC_L = 288,
-     ASK_L = 289,
-     AVG_L = 290,
-     BASE_L = 291,
-     BIJECTION_L = 292,
-     BINDINGS_L = 293,
-     BOUND_L = 294,
-     BY_L = 295,
-     CLASS_L = 296,
-     CLEAR_L = 297,
-     CREATE_L = 298,
-     CONSTRUCT_L = 299,
-     COUNT_LPAR = 300,
-     COUNT_DISTINCT_L = 301,
-     DATA_L = 302,
-     DATATYPE_L = 303,
-     DEFAULT_L = 304,
-     DEFINE_L = 305,
-     DELETE_L = 306,
-     DEREF_L = 307,
-     DESC_L = 308,
-     DESCRIBE_L = 309,
-     DISTINCT_L = 310,
-     DROP_L = 311,
-     EXCLUSIVE_L = 312,
-     EXISTS_L = 313,
-     false_L = 314,
-     FILTER_L = 315,
-     FROM_L = 316,
-     FUNCTION_L = 317,
-     GRAPH_L = 318,
-     GROUP_L = 319,
-     HAVING_L = 320,
-     IDENTIFIED_L = 321,
-     IFP_L = 322,
-     IN_L = 323,
-     INDEX_L = 324,
-     INFERENCE_L = 325,
-     INSERT_L = 326,
-     INTO_L = 327,
-     IRI_L = 328,
-     isBLANK_L = 329,
-     isIRI_L = 330,
-     isLITERAL_L = 331,
-     isREF_L = 332,
-     isURI_L = 333,
-     LANG_L = 334,
-     LANGMATCHES_L = 335,
-     LIKE_L = 336,
-     LIMIT_L = 337,
-     LITERAL_L = 338,
-     LOAD_L = 339,
-     MAKE_L = 340,
-     MAP_L = 341,
-     MAX_L = 342,
-     MIN_L = 343,
-     MINUS_L = 344,
-     MODIFY_L = 345,
-     NAMED_L = 346,
-     NIL_L = 347,
-     NOT_L = 348,
-     NOT_FROM_L = 349,
-     NULL_L = 350,
-     OBJECT_L = 351,
-     OF_L = 352,
-     OFFBAND_L = 353,
-     OFFSET_L = 354,
-     OPTIONAL_L = 355,
-     OPTION_L = 356,
-     ORDER_L = 357,
-     PREDICATE_L = 358,
-     PREFIX_L = 359,
-     QUAD_L = 360,
-     REGEX_L = 361,
-     REDUCED_L = 362,
-     RETURNS_L = 363,
-     SAME_AS_L = 364,
-     SAME_AS_O_L = 365,
-     SAME_AS_P_L = 366,
-     SAME_AS_S_L = 367,
-     SAME_AS_S_O_L = 368,
-     SAMETERM_L = 369,
-     SCORE_L = 370,
-     SCORE_LIMIT_L = 371,
-     SELECT_L = 372,
-     SERVICE_L = 373,
-     SILENT_L = 374,
-     SOFT_L = 375,
-     STORAGE_L = 376,
-     STR_L = 377,
-     SUBCLASS_L = 378,
-     SUBJECT_L = 379,
-     SUM_L = 380,
-     TABLE_OPTION_L = 381,
-     T_CYCLES_ONLY_L = 382,
-     T_DIRECTION_L = 383,
-     T_DISTINCT_L = 384,
-     T_END_FLAG_L = 385,
-     T_EXISTS_L = 386,
-     T_FINAL_AS_L = 387,
-     T_IN_L = 388,
-     T_MAX_L = 389,
-     T_MIN_L = 390,
-     T_OUT_L = 391,
-     T_NO_CYCLES_L = 392,
-     T_NO_ORDER_L = 393,
-     T_SHORTEST_ONLY_L = 394,
-     T_STEP_L = 395,
-     TRANSITIVE_L = 396,
-     true_L = 397,
-     UNBOUND_L = 398,
-     UNION_L = 399,
-     USING_L = 400,
-     WHERE_L = 401,
-     WITH_L = 402,
-     __SPAR_PUNCT_END = 403,
-     START_OF_SPARQL_TEXT = 404,
-     END_OF_SPARQL_TEXT = 405,
-     SPARUL_RUN_SUBTYPE = 406,
-     SPARUL_INSERT_DATA = 407,
-     SPARUL_DELETE_DATA = 408,
-     __SPAR_NONPUNCT_START = 409,
-     TEXT_BL = 410,
-     XML_BL = 411,
-     SPARQL_INTEGER = 412,
-     SPARQL_DECIMAL = 413,
-     SPARQL_DOUBLE = 414,
-     SPARQL_STRING = 415,
-     SPARQL_CONDITION_AFTER_WHERE_LPAR = 416,
-     LANGTAG = 417,
-     QNAME = 418,
-     QNAME_NS = 419,
-     BLANK_NODE_LABEL = 420,
-     Q_IRI_REF = 421,
-     QUEST_VARNAME = 422,
-     DOLLAR_VARNAME = 423,
-     QUEST_COLON_PARAMNAME = 424,
-     DOLLAR_COLON_PARAMNAME = 425,
-     QUEST_COLON_PARAMNUM = 426,
-     DOLLAR_COLON_PARAMNUM = 427,
-     SPARQL_PLAIN_ID = 428,
-     SPARQL_SQL_ALIASCOLNAME = 429,
-     SPARQL_SQL_QTABLENAME = 430,
-     SPARQL_SQL_QTABLECOLNAME = 431,
-     __SPAR_NONPUNCT_END = 432,
-     _COLON = 433,
-     UMINUS = 434,
-     UPLUS = 435
+     ADD_L = 286,
+     ALL_L = 287,
+     ALTER_L = 288,
+     AS_L = 289,
+     ASC_L = 290,
+     ASK_L = 291,
+     ATTACH_L = 292,
+     AVG_L = 293,
+     BASE_L = 294,
+     BIJECTION_L = 295,
+     BINDINGS_L = 296,
+     BOUND_L = 297,
+     BY_L = 298,
+     CLASS_L = 299,
+     CLEAR_L = 300,
+     CREATE_L = 301,
+     CONSTRUCT_L = 302,
+     COPY_L = 303,
+     COUNT_L = 304,
+     COUNT_LPAR = 305,
+     COUNT_DISTINCT_L = 306,
+     DATA_L = 307,
+     DATATYPE_L = 308,
+     DEFAULT_L = 309,
+     DEFINE_L = 310,
+     DEFMACRO_L = 311,
+     DELETE_L = 312,
+     DEREF_L = 313,
+     DESC_L = 314,
+     DESCRIBE_L = 315,
+     DETACH_L = 316,
+     DISTINCT_L = 317,
+     DROP_L = 318,
+     EXCLUSIVE_L = 319,
+     EXISTS_L = 320,
+     false_L = 321,
+     FILTER_L = 322,
+     FROM_L = 323,
+     FUNCTION_L = 324,
+     GRAPH_L = 325,
+     GROUP_L = 326,
+     HAVING_L = 327,
+     IDENTIFIED_L = 328,
+     IFP_L = 329,
+     IN_L = 330,
+     INDEX_L = 331,
+     INFERENCE_L = 332,
+     INSERT_L = 333,
+     INTO_L = 334,
+     IRI_L = 335,
+     LANG_L = 336,
+     LIBRARY_L = 337,
+     LIKE_L = 338,
+     LIMIT_L = 339,
+     LITERAL_L = 340,
+     LOCAL_L = 341,
+     LOAD_L = 342,
+     MACRO_L = 343,
+     MAKE_L = 344,
+     MAP_L = 345,
+     MAX_L = 346,
+     MIN_L = 347,
+     MINUS_L = 348,
+     MODIFY_L = 349,
+     MOVE_L = 350,
+     NAMED_L = 351,
+     NIL_L = 352,
+     NOT_L = 353,
+     NULL_L = 354,
+     OBJECT_L = 355,
+     OF_L = 356,
+     OFFBAND_L = 357,
+     OFFSET_L = 358,
+     OPTIONAL_L = 359,
+     OPTION_L = 360,
+     ORDER_L = 361,
+     PREDICATE_L = 362,
+     PREFIX_L = 363,
+     QUAD_L = 364,
+     REDUCED_L = 365,
+     RETURNS_L = 366,
+     SAME_AS_L = 367,
+     SAME_AS_O_L = 368,
+     SAME_AS_P_L = 369,
+     SAME_AS_S_L = 370,
+     SAME_AS_S_O_L = 371,
+     SCORE_L = 372,
+     SCORE_LIMIT_L = 373,
+     SELECT_L = 374,
+     SERVICE_L = 375,
+     SILENT_L = 376,
+     SOFT_L = 377,
+     SQLQUERY_L = 378,
+     STORAGE_L = 379,
+     SUBCLASS_L = 380,
+     SUBJECT_L = 381,
+     SUM_L = 382,
+     TABLE_OPTION_L = 383,
+     TEXT_L = 384,
+     T_CYCLES_ONLY_L = 385,
+     T_DIRECTION_L = 386,
+     T_DISTINCT_L = 387,
+     T_END_FLAG_L = 388,
+     T_EXISTS_L = 389,
+     T_FINAL_AS_L = 390,
+     T_IN_L = 391,
+     T_MAX_L = 392,
+     T_MIN_L = 393,
+     T_OUT_L = 394,
+     T_NO_CYCLES_L = 395,
+     T_NO_ORDER_L = 396,
+     T_SHORTEST_ONLY_L = 397,
+     T_STEP_L = 398,
+     TO_L = 399,
+     TRANSITIVE_L = 400,
+     true_L = 401,
+     UNBOUND_L = 402,
+     UNION_L = 403,
+     USING_L = 404,
+     WHERE_L = 405,
+     WITH_L = 406,
+     XML_L = 407,
+     __SPAR_PUNCT_END = 408,
+     START_OF_SPARQL_TEXT = 409,
+     END_OF_SPARQL_TEXT = 410,
+     SPARUL_RUN_SUBTYPE = 411,
+     SPARUL_INSERT_DATA = 412,
+     SPARUL_DELETE_DATA = 413,
+     __SPAR_NONPUNCT_START = 414,
+     SPARQL_BIF = 415,
+     SPARQL_INTEGER = 416,
+     SPARQL_DECIMAL = 417,
+     SPARQL_DOUBLE = 418,
+     SPARQL_STRING = 419,
+     SPARQL_SQLTEXT = 420,
+     LANGTAG = 421,
+     QNAME = 422,
+     QNAME_NS = 423,
+     BLANK_NODE_LABEL = 424,
+     Q_IRI_REF = 425,
+     QD_VARNAME = 426,
+     QD_COLON_PARAMNAME = 427,
+     QD_COLON_PARAMNUM = 428,
+     SPARQL_PLAIN_ID = 429,
+     SPARQL_SQL_ALIASCOLNAME = 430,
+     SPARQL_SQL_QTABLENAME = 431,
+     SPARQL_SQL_QTABLECOLNAME = 432,
+     __SPAR_NONPUNCT_END = 433,
+     PRECODE_EXPN_PREC = 434,
+     _COLON = 435,
+     UMINUS = 436,
+     UPLUS = 437
    };
 #endif
 /* Tokens.  */
@@ -248,156 +249,158 @@
 #define _STAR 283
 #define _STAR_GT 284
 #define a_L 285
-#define ALTER_L 286
-#define AS_L 287
-#define ASC_L 288
-#define ASK_L 289
-#define AVG_L 290
-#define BASE_L 291
-#define BIJECTION_L 292
-#define BINDINGS_L 293
-#define BOUND_L 294
-#define BY_L 295
-#define CLASS_L 296
-#define CLEAR_L 297
-#define CREATE_L 298
-#define CONSTRUCT_L 299
-#define COUNT_LPAR 300
-#define COUNT_DISTINCT_L 301
-#define DATA_L 302
-#define DATATYPE_L 303
-#define DEFAULT_L 304
-#define DEFINE_L 305
-#define DELETE_L 306
-#define DEREF_L 307
-#define DESC_L 308
-#define DESCRIBE_L 309
-#define DISTINCT_L 310
-#define DROP_L 311
-#define EXCLUSIVE_L 312
-#define EXISTS_L 313
-#define false_L 314
-#define FILTER_L 315
-#define FROM_L 316
-#define FUNCTION_L 317
-#define GRAPH_L 318
-#define GROUP_L 319
-#define HAVING_L 320
-#define IDENTIFIED_L 321
-#define IFP_L 322
-#define IN_L 323
-#define INDEX_L 324
-#define INFERENCE_L 325
-#define INSERT_L 326
-#define INTO_L 327
-#define IRI_L 328
-#define isBLANK_L 329
-#define isIRI_L 330
-#define isLITERAL_L 331
-#define isREF_L 332
-#define isURI_L 333
-#define LANG_L 334
-#define LANGMATCHES_L 335
-#define LIKE_L 336
-#define LIMIT_L 337
-#define LITERAL_L 338
-#define LOAD_L 339
-#define MAKE_L 340
-#define MAP_L 341
-#define MAX_L 342
-#define MIN_L 343
-#define MINUS_L 344
-#define MODIFY_L 345
-#define NAMED_L 346
-#define NIL_L 347
-#define NOT_L 348
-#define NOT_FROM_L 349
-#define NULL_L 350
-#define OBJECT_L 351
-#define OF_L 352
-#define OFFBAND_L 353
-#define OFFSET_L 354
-#define OPTIONAL_L 355
-#define OPTION_L 356
-#define ORDER_L 357
-#define PREDICATE_L 358
-#define PREFIX_L 359
-#define QUAD_L 360
-#define REGEX_L 361
-#define REDUCED_L 362
-#define RETURNS_L 363
-#define SAME_AS_L 364
-#define SAME_AS_O_L 365
-#define SAME_AS_P_L 366
-#define SAME_AS_S_L 367
-#define SAME_AS_S_O_L 368
-#define SAMETERM_L 369
-#define SCORE_L 370
-#define SCORE_LIMIT_L 371
-#define SELECT_L 372
-#define SERVICE_L 373
-#define SILENT_L 374
-#define SOFT_L 375
-#define STORAGE_L 376
-#define STR_L 377
-#define SUBCLASS_L 378
-#define SUBJECT_L 379
-#define SUM_L 380
-#define TABLE_OPTION_L 381
-#define T_CYCLES_ONLY_L 382
-#define T_DIRECTION_L 383
-#define T_DISTINCT_L 384
-#define T_END_FLAG_L 385
-#define T_EXISTS_L 386
-#define T_FINAL_AS_L 387
-#define T_IN_L 388
-#define T_MAX_L 389
-#define T_MIN_L 390
-#define T_OUT_L 391
-#define T_NO_CYCLES_L 392
-#define T_NO_ORDER_L 393
-#define T_SHORTEST_ONLY_L 394
-#define T_STEP_L 395
-#define TRANSITIVE_L 396
-#define true_L 397
-#define UNBOUND_L 398
-#define UNION_L 399
-#define USING_L 400
-#define WHERE_L 401
-#define WITH_L 402
-#define __SPAR_PUNCT_END 403
-#define START_OF_SPARQL_TEXT 404
-#define END_OF_SPARQL_TEXT 405
-#define SPARUL_RUN_SUBTYPE 406
-#define SPARUL_INSERT_DATA 407
-#define SPARUL_DELETE_DATA 408
-#define __SPAR_NONPUNCT_START 409
-#define TEXT_BL 410
-#define XML_BL 411
-#define SPARQL_INTEGER 412
-#define SPARQL_DECIMAL 413
-#define SPARQL_DOUBLE 414
-#define SPARQL_STRING 415
-#define SPARQL_CONDITION_AFTER_WHERE_LPAR 416
-#define LANGTAG 417
-#define QNAME 418
-#define QNAME_NS 419
-#define BLANK_NODE_LABEL 420
-#define Q_IRI_REF 421
-#define QUEST_VARNAME 422
-#define DOLLAR_VARNAME 423
-#define QUEST_COLON_PARAMNAME 424
-#define DOLLAR_COLON_PARAMNAME 425
-#define QUEST_COLON_PARAMNUM 426
-#define DOLLAR_COLON_PARAMNUM 427
-#define SPARQL_PLAIN_ID 428
-#define SPARQL_SQL_ALIASCOLNAME 429
-#define SPARQL_SQL_QTABLENAME 430
-#define SPARQL_SQL_QTABLECOLNAME 431
-#define __SPAR_NONPUNCT_END 432
-#define _COLON 433
-#define UMINUS 434
-#define UPLUS 435
+#define ADD_L 286
+#define ALL_L 287
+#define ALTER_L 288
+#define AS_L 289
+#define ASC_L 290
+#define ASK_L 291
+#define ATTACH_L 292
+#define AVG_L 293
+#define BASE_L 294
+#define BIJECTION_L 295
+#define BINDINGS_L 296
+#define BOUND_L 297
+#define BY_L 298
+#define CLASS_L 299
+#define CLEAR_L 300
+#define CREATE_L 301
+#define CONSTRUCT_L 302
+#define COPY_L 303
+#define COUNT_L 304
+#define COUNT_LPAR 305
+#define COUNT_DISTINCT_L 306
+#define DATA_L 307
+#define DATATYPE_L 308
+#define DEFAULT_L 309
+#define DEFINE_L 310
+#define DEFMACRO_L 311
+#define DELETE_L 312
+#define DEREF_L 313
+#define DESC_L 314
+#define DESCRIBE_L 315
+#define DETACH_L 316
+#define DISTINCT_L 317
+#define DROP_L 318
+#define EXCLUSIVE_L 319
+#define EXISTS_L 320
+#define false_L 321
+#define FILTER_L 322
+#define FROM_L 323
+#define FUNCTION_L 324
+#define GRAPH_L 325
+#define GROUP_L 326
+#define HAVING_L 327
+#define IDENTIFIED_L 328
+#define IFP_L 329
+#define IN_L 330
+#define INDEX_L 331
+#define INFERENCE_L 332
+#define INSERT_L 333
+#define INTO_L 334
+#define IRI_L 335
+#define LANG_L 336
+#define LIBRARY_L 337
+#define LIKE_L 338
+#define LIMIT_L 339
+#define LITERAL_L 340
+#define LOCAL_L 341
+#define LOAD_L 342
+#define MACRO_L 343
+#define MAKE_L 344
+#define MAP_L 345
+#define MAX_L 346
+#define MIN_L 347
+#define MINUS_L 348
+#define MODIFY_L 349
+#define MOVE_L 350
+#define NAMED_L 351
+#define NIL_L 352
+#define NOT_L 353
+#define NULL_L 354
+#define OBJECT_L 355
+#define OF_L 356
+#define OFFBAND_L 357
+#define OFFSET_L 358
+#define OPTIONAL_L 359
+#define OPTION_L 360
+#define ORDER_L 361
+#define PREDICATE_L 362
+#define PREFIX_L 363
+#define QUAD_L 364
+#define REDUCED_L 365
+#define RETURNS_L 366
+#define SAME_AS_L 367
+#define SAME_AS_O_L 368
+#define SAME_AS_P_L 369
+#define SAME_AS_S_L 370
+#define SAME_AS_S_O_L 371
+#define SCORE_L 372
+#define SCORE_LIMIT_L 373
+#define SELECT_L 374
+#define SERVICE_L 375
+#define SILENT_L 376
+#define SOFT_L 377
+#define SQLQUERY_L 378
+#define STORAGE_L 379
+#define SUBCLASS_L 380
+#define SUBJECT_L 381
+#define SUM_L 382
+#define TABLE_OPTION_L 383
+#define TEXT_L 384
+#define T_CYCLES_ONLY_L 385
+#define T_DIRECTION_L 386
+#define T_DISTINCT_L 387
+#define T_END_FLAG_L 388
+#define T_EXISTS_L 389
+#define T_FINAL_AS_L 390
+#define T_IN_L 391
+#define T_MAX_L 392
+#define T_MIN_L 393
+#define T_OUT_L 394
+#define T_NO_CYCLES_L 395
+#define T_NO_ORDER_L 396
+#define T_SHORTEST_ONLY_L 397
+#define T_STEP_L 398
+#define TO_L 399
+#define TRANSITIVE_L 400
+#define true_L 401
+#define UNBOUND_L 402
+#define UNION_L 403
+#define USING_L 404
+#define WHERE_L 405
+#define WITH_L 406
+#define XML_L 407
+#define __SPAR_PUNCT_END 408
+#define START_OF_SPARQL_TEXT 409
+#define END_OF_SPARQL_TEXT 410
+#define SPARUL_RUN_SUBTYPE 411
+#define SPARUL_INSERT_DATA 412
+#define SPARUL_DELETE_DATA 413
+#define __SPAR_NONPUNCT_START 414
+#define SPARQL_BIF 415
+#define SPARQL_INTEGER 416
+#define SPARQL_DECIMAL 417
+#define SPARQL_DOUBLE 418
+#define SPARQL_STRING 419
+#define SPARQL_SQLTEXT 420
+#define LANGTAG 421
+#define QNAME 422
+#define QNAME_NS 423
+#define BLANK_NODE_LABEL 424
+#define Q_IRI_REF 425
+#define QD_VARNAME 426
+#define QD_COLON_PARAMNAME 427
+#define QD_COLON_PARAMNUM 428
+#define SPARQL_PLAIN_ID 429
+#define SPARQL_SQL_ALIASCOLNAME 430
+#define SPARQL_SQL_QTABLENAME 431
+#define SPARQL_SQL_QTABLECOLNAME 432
+#define __SPAR_NONPUNCT_END 433
+#define PRECODE_EXPN_PREC 434
+#define _COLON 435
+#define UMINUS 436
+#define UPLUS 437
 
 
 
@@ -406,8 +409,8 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
-#line 97 "./sparql_p.y"
+/* Line 1685 of yacc.c  */
+#line 98 "./sparql_p.y"
 
   caddr_t box;
   caddr_t *boxes;
@@ -421,8 +424,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1676 of yacc.c  */
-#line 426 "sparql_p.h"
+/* Line 1685 of yacc.c  */
+#line 429 "sparql_p.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/libsrc/Wi/sparql_p.y b/libsrc/Wi/sparql_p.y
index 96f0342..d97e1c9 100644
--- a/libsrc/Wi/sparql_p.y
+++ b/libsrc/Wi/sparql_p.y
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql_p.y,v 1.66.2.25 2011/01/03 10:21:01 source Exp $
+ *  $Id: sparql_p.y,v 1.66.2.38 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -37,6 +37,7 @@ One tab before end of single-line BNF comment.
 Whitespaces in all other places, including two whitespaces after "::=" in BNF comments */
 
 %pure_parser
+%expect 9
 
 %{
 
@@ -136,10 +137,13 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token _STAR_GT		/*:: PUNCT_SPAR_LAST("*>") ::*/
 
 %token a_L		/*:: PUNCT_SPAR_LAST("a") ::*/
+%token ADD_L		/*:: PUNCT_SPAR_LAST("ADD") ::*/
+%token ALL_L		/*:: PUNCT_SPAR_LAST("ALL") ::*/
 %token ALTER_L		/*:: PUNCT_SPAR_LAST("ALTER") ::*/
 %token AS_L		/*:: PUNCT_SPAR_LAST("AS") ::*/
 %token ASC_L		/*:: PUNCT_SPAR_LAST("ASC") ::*/
 %token ASK_L		/*:: PUNCT_SPAR_LAST("ASK") ::*/
+%token ATTACH_L		/*:: PUNCT_SPAR_LAST("ATTACH") ::*/
 %token AVG_L		/*:: PUNCT_SPAR_LAST("AVG") ::*/
 %token BASE_L		/*:: PUNCT_SPAR_LAST("BASE") ::*/
 %token BIJECTION_L	/*:: PUNCT_SPAR_LAST("BIJECTION") ::*/
@@ -150,16 +154,20 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token CLEAR_L		/*:: PUNCT_SPAR_LAST("CLEAR") ::*/
 %token CREATE_L		/*:: PUNCT_SPAR_LAST("CREATE") ::*/
 %token CONSTRUCT_L	/*:: PUNCT_SPAR_LAST("CONSTRUCT") ::*/
+%token COPY_L		/*:: PUNCT_SPAR_LAST("COPY") ::*/
+%token COUNT_L		/* Fake, used only in sparqlwords.gperf */
 %token COUNT_LPAR		/*:: PUNCT("COUNT ("), SPAR, LAST1("COUNT ()"), LAST1("COUNT\r\n()"), LAST1("COUNT #qq\r\n()"), ERR("COUNT"), ERR("COUNT bad") ::*/
 %token COUNT_DISTINCT_L		/*:: PUNCT("COUNT DISTINCT"), SPAR, LAST("COUNT DISTINCT"), LAST("COUNT\r\nDISTINCT"), LAST("COUNT #qq\r\nDISTINCT"), ERR("COUNT"), ERR("COUNT bad") ::*/
 %token DATA_L		/*:: PUNCT_SPAR_LAST("DATA") ::*/
 %token DATATYPE_L	/*:: PUNCT_SPAR_LAST("DATATYPE") ::*/
 %token DEFAULT_L	/*:: PUNCT_SPAR_LAST("DEFAULT") ::*/
 %token DEFINE_L		/*:: PUNCT_SPAR_LAST("DEFINE") ::*/
+%token DEFMACRO_L	/*:: PUNCT_SPAR_LAST("DEFMACRO") ::*/
 %token DELETE_L		/*:: PUNCT_SPAR_LAST("DELETE") ::*/
 %token DEREF_L		/*:: PUNCT_SPAR_LAST("DEREF") ::*/
 %token DESC_L		/*:: PUNCT_SPAR_LAST("DESC") ::*/
 %token DESCRIBE_L	/*:: PUNCT_SPAR_LAST("DESCRIBE") ::*/
+%token DETACH_L		/*:: PUNCT_SPAR_LAST("DETACH") ::*/
 %token DISTINCT_L	/*:: PUNCT_SPAR_LAST("DISTINCT") ::*/
 %token DROP_L		/*:: PUNCT_SPAR_LAST("DROP") ::*/
 %token EXCLUSIVE_L	/*:: PUNCT_SPAR_LAST("EXCLUSIVE") ::*/
@@ -179,27 +187,24 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token INSERT_L		/*:: PUNCT_SPAR_LAST("INSERT") ::*/
 %token INTO_L		/*:: PUNCT_SPAR_LAST("INTO") ::*/
 %token IRI_L		/*:: PUNCT_SPAR_LAST("IRI") ::*/
-%token isBLANK_L	/*:: PUNCT_SPAR_LAST("isBLANK") ::*/
-%token isIRI_L		/*:: PUNCT_SPAR_LAST("isIRI") ::*/
-%token isLITERAL_L	/*:: PUNCT_SPAR_LAST("isLITERAL") ::*/
-%token isREF_L		/*:: PUNCT_SPAR_LAST("isREF") ::*/
-%token isURI_L		/*:: PUNCT_SPAR_LAST("isURI") ::*/
 %token LANG_L		/*:: PUNCT_SPAR_LAST("LANG") ::*/
-%token LANGMATCHES_L	/*:: PUNCT_SPAR_LAST("LANGMATCHES") ::*/
+%token LIBRARY_L	/*:: PUNCT_SPAR_LAST("LIBRARY") ::*/
 %token LIKE_L		/*:: PUNCT_SPAR_LAST("LIKE") ::*/
 %token LIMIT_L		/*:: PUNCT_SPAR_LAST("LIMIT") ::*/
 %token LITERAL_L	/*:: PUNCT_SPAR_LAST("LITERAL") ::*/
+%token LOCAL_L		/*:: PUNCT_SPAR_LAST("LOCAL") ::*/
 %token LOAD_L		/*:: PUNCT_SPAR_LAST("LOAD") ::*/
+%token MACRO_L		/*:: PUNCT_SPAR_LAST("MACRO") ::*/
 %token MAKE_L		/*:: PUNCT_SPAR_LAST("MAKE") ::*/
 %token MAP_L		/*:: PUNCT_SPAR_LAST("MAP") ::*/
 %token MAX_L		/*:: PUNCT_SPAR_LAST("MAX") ::*/
 %token MIN_L		/*:: PUNCT_SPAR_LAST("MIN") ::*/
 %token MINUS_L		/*:: PUNCT_SPAR_LAST("MINUS") ::*/
 %token MODIFY_L		/*:: PUNCT_SPAR_LAST("MODIFY") ::*/
+%token MOVE_L		/*:: PUNCT_SPAR_LAST("MOVE") ::*/
 %token NAMED_L		/*:: PUNCT_SPAR_LAST("NAMED") ::*/
 %token NIL_L		/*:: PUNCT_SPAR_LAST("NIL") ::*/
 %token NOT_L		/*:: PUNCT_SPAR_LAST("NOT") ::*/
-%token NOT_FROM_L	/*:: PUNCT_SPAR_LAST("NOT FROM") ::*/
 %token NULL_L		/*:: PUNCT_SPAR_LAST("NULL") ::*/
 %token OBJECT_L		/*:: PUNCT_SPAR_LAST("OBJECT") ::*/
 %token OF_L		/*:: PUNCT_SPAR_LAST("OF") ::*/
@@ -211,7 +216,6 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token PREDICATE_L	/*:: PUNCT_SPAR_LAST("PREDICATE") ::*/
 %token PREFIX_L		/*:: PUNCT_SPAR_LAST("PREFIX") ::*/
 %token QUAD_L		/*:: PUNCT_SPAR_LAST("QUAD") ::*/
-%token REGEX_L		/*:: PUNCT_SPAR_LAST("REGEX") ::*/
 %token REDUCED_L	/*:: PUNCT_SPAR_LAST("REDUCED") ::*/
 %token RETURNS_L	/*:: PUNCT_SPAR_LAST("RETURNS") ::*/
 %token SAME_AS_L	/*:: PUNCT_SPAR_LAST("SAME_AS") ::*/
@@ -219,19 +223,19 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token SAME_AS_P_L	/*:: PUNCT_SPAR_LAST("SAME_AS_P") ::*/
 %token SAME_AS_S_L	/*:: PUNCT_SPAR_LAST("SAME_AS_S") ::*/
 %token SAME_AS_S_O_L	/*:: PUNCT_SPAR_LAST("SAME_AS_S_O") ::*/
-%token SAMETERM_L	/*:: PUNCT_SPAR_LAST("SAMETERM") ::*/
 %token SCORE_L		/*:: PUNCT_SPAR_LAST("SCORE") ::*/
 %token SCORE_LIMIT_L	/*:: PUNCT_SPAR_LAST("SCORE_LIMIT") ::*/
 %token SELECT_L		/*:: PUNCT_SPAR_LAST("SELECT") ::*/
 %token SERVICE_L	/*:: PUNCT_SPAR_LAST("SERVICE") ::*/
 %token SILENT_L		/*:: PUNCT_SPAR_LAST("SILENT") ::*/
 %token SOFT_L		/*:: PUNCT_SPAR_LAST("SOFT") ::*/
+%token SQLQUERY_L	/*:: PUNCT("SQLQUERY"), SPAR, LAST1("SQLQUERY {"), LAST1("SQLQUERY ("), LAST1("SQLQUERY #cmt\n{"), LAST1("SQLQUERY\r\n("), ERR("SQLQUERY"), ERR("SQLQUERY bad") ::*/
 %token STORAGE_L	/*:: PUNCT_SPAR_LAST("STORAGE") ::*/
-%token STR_L		/*:: PUNCT_SPAR_LAST("STR") ::*/
 %token SUBCLASS_L	/*:: PUNCT_SPAR_LAST("SUBCLASS") ::*/
 %token SUBJECT_L	/*:: PUNCT_SPAR_LAST("SUBJECT") ::*/
 %token SUM_L		/*:: PUNCT_SPAR_LAST("SUM") ::*/
 %token TABLE_OPTION_L	/*:: PUNCT_SPAR_LAST("TABLE_OPTION") ::*/
+%token TEXT_L	/*:: PUNCT_SPAR_LAST("TEXT") ::*/
 %token T_CYCLES_ONLY_L	/*:: PUNCT_SPAR_LAST("T_CYCLES_ONLY") ::*/
 %token T_DIRECTION_L	/*:: PUNCT_SPAR_LAST("T_DIRECTION") ::*/
 %token T_DISTINCT_L	/*:: PUNCT_SPAR_LAST("T_DISTINCT") ::*/
@@ -246,6 +250,7 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token T_NO_ORDER_L	/*:: PUNCT_SPAR_LAST("T_NO_ORDER") ::*/
 %token T_SHORTEST_ONLY_L	/*:: PUNCT_SPAR_LAST("T_SHORTEST_ONLY") ::*/
 %token T_STEP_L		/*:: PUNCT_SPAR_LAST("T_STEP") ::*/
+%token TO_L		/*:: PUNCT_SPAR_LAST("TO") ::*/
 %token TRANSITIVE_L	/*:: PUNCT_SPAR_LAST("TRANSITIVE") ::*/
 %token true_L		/*:: PUNCT_SPAR_LAST("true") ::*/
 %token UNBOUND_L	/*:: PUNCT_SPAR_LAST("UNBOUND") ::*/
@@ -253,6 +258,7 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token USING_L		/*:: PUNCT_SPAR_LAST("USING") ::*/
 %token WHERE_L		/*:: PUNCT("WHERE"), SPAR, LAST1("WHERE {"), LAST1("WHERE ("), LAST1("WHERE #cmt\n{"), LAST1("WHERE\r\n("), ERR("WHERE"), ERR("WHERE bad") ::*/
 %token WITH_L		/*:: PUNCT_SPAR_LAST("WITH") ::*/
+%token XML_L	/*:: PUNCT_SPAR_LAST("XML") ::*/
 %token __SPAR_PUNCT_END	/* Delimiting value for syntax highlighting */
 
 %token START_OF_SPARQL_TEXT	/*:: FAKE("the beginning of SPARQL text"), SPAR, NULL ::*/
@@ -263,15 +269,16 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 
 %token __SPAR_NONPUNCT_START	/* Delimiting value for syntax highlighting */
 
-%token <box> TEXT_BL	/*:: PUNCT_SPAR_LAST("TEXT") ::*/
-%token <box> XML_BL	/*:: PUNCT_SPAR_LAST("XML") ::*/
+/* Do NOT try to wrap the following line! */
+%token<token_type> SPARQL_BIF	/*:: LITERAL("%d"), SPAR, LAST("ABS"), LAST("BNODE"), LAST("CEIL"), LAST("COALESCE"), LAST("CONCAT"), LAST("CONTAINS"), LAST("DAY"), LAST("ENCODE_FOR_URI"), LAST("FLOOR"), LAST("HOURS"), LAST("IF"), LAST("ISBLANK"), LAST("ISIRI"), LAST("ISLITERAL"), LAST("ISNUMERIC"), LAST("ISREF"), LAST("ISURI"), LAST("LANGMATCHES"), LAST("LCASE"), LAST("MD5"), LAST("MINUTES"), LAST("MONTH"), LAST("NOW"), LAST("RAND"), LAST("REGEX"), LAST("ROUND"), LAST("SAMETERM"), LAST("SECONDS"), LAST("SHA1"), LAST("SHA224"), LAST("SHA256"), LAST("SHA384"), LAST("SHA512"), LAST("STR"), LAST("STRDT"), LAST("STRENDS"), LAST("STRLANG"), LAST("STRLEN"), LAST("STRSTARTS"), LAST("SUBSTR"), LAST("TIMEZONE"), LAST("TZ"), LAST("UCASE"), LAST("URI"), LAST("YEAR") ::*/
+
 
 %token <box> SPARQL_INTEGER	/*:: LITERAL("%d"), SPAR, LAST("1234") ::*/
 %token <box> SPARQL_DECIMAL	/*:: LITERAL("%d"), SPAR, LAST("1234.56") ::*/
 %token <box> SPARQL_DOUBLE	/*:: LITERAL("%d"), SPAR, LAST("1234.56e1") ::*/
 
 %token <box> SPARQL_STRING /*:: LITERAL("%s"), SPAR, LAST("'sq'"), LAST("\"dq\""), LAST("'''sq1\nsq2'''"), LAST("\"\"\"dq1\ndq2\"\"\""), LAST("'\"'"), LAST("'-\\\\-\\t-\\v-\\r-\\'-\\\"-\\u1234-\\U12345678-\\uaAfF-'") ::*/
-%token <box> SPARQL_CONDITION_AFTER_WHERE_LPAR /*:: LITERAL("%s)"), SPAR, LAST("WHERE ('sq')"), LAST("WHERE (\"dq)\")"), LAST("WHERE ('sq1'')sq2')"), LAST("WHERE (--cmt1)\n)"), LAST("WHERE (/" "*)*" "/") ::*/
+%token <box> SPARQL_SQLTEXT /*:: LITERAL("%s)"), SPAR, LAST("WHERE ('sq')"), LAST("WHERE (\"dq)\")"), LAST("WHERE ('sq1'')sq2')"), LAST("WHERE (--cmt1)\n)"), LAST("WHERE (/" "*)*" "/") ::*/
 %token <box> LANGTAG	/*:: LITERAL("@%s"), SPAR, LAST("@ES") ::*/
 
 %token <box> QNAME	/*:: LITERAL("%s"), SPAR, LAST("pre.fi-X.1:_f.Rag.2"), LAST(":_f.Rag.2") ::*/
@@ -279,12 +286,9 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %token <box> BLANK_NODE_LABEL /*:: LITERAL("%s"), SPAR, LAST("_:_f.Rag.2") ::*/
 %token <box> Q_IRI_REF	/*:: LITERAL("%s"), SPAR, LAST("<something>"), LAST("<http://www.example.com/sample#frag>") ::*/
 
-%token <box> QUEST_VARNAME	/*:: LITERAL("?%s"), SPAR, LAST("?1var_Name1") ::*/
-%token <box> DOLLAR_VARNAME	/*:: LITERAL("$%s"), SPAR, LAST("$2var_Name2") ::*/
-%token <box> QUEST_COLON_PARAMNAME	/*:: LITERAL("?:%s"), SPAR, LAST("?:var_Name1") ::*/
-%token <box> DOLLAR_COLON_PARAMNAME	/*:: LITERAL("$:%s"), SPAR, LAST("$:var_Name2") ::*/
-%token <box> QUEST_COLON_PARAMNUM	/*:: LITERAL("??"), SPAR, LAST("??") ::*/
-%token <box> DOLLAR_COLON_PARAMNUM	/*:: LITERAL("$?"), SPAR, LAST("$?") ::*/
+%token <box> QD_VARNAME		/*:: LITERAL("?%s"), SPAR, LAST("?1var_Name1"), LAST("$2var_Name2") ::*/
+%token <box> QD_COLON_PARAMNAME	/*:: LITERAL("?:%s"), SPAR, LAST("?:var_Name1"), LAST("$:var_Name2") ::*/
+%token <box> QD_COLON_PARAMNUM	/*:: LITERAL("??"), SPAR, LAST("??"), LAST("$?") ::*/
 
 %token <box> SPARQL_PLAIN_ID	/*:: LITERAL("%s"), SPAR, LAST("q"), LAST("a1"), LAST("_ABYZabyz0189") ::*/
 %token <box> SPARQL_SQL_ALIASCOLNAME	/*:: LITERAL("%s"), SPAR, LAST("ALIAS.COL") ::*/
@@ -304,6 +308,16 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <nothing> spar_base_decl_opt
 %type <nothing> spar_prefix_decls_opt
 %type <nothing> spar_prefix_decl
+%type <nothing> spar_defmacro
+%type <tree> spar_dm_args_and_body
+%type <backstack> spar_dm_local_args_opt
+%type <backstack> spar_dm_arg_commalist
+%type <backstack> spar_dm_args_opt
+%type <backstack> spar_dm_args
+%type <tree> spar_dm_patitem_gs
+%type <tree> spar_dm_patitem_p
+%type <tree> spar_dm_patitem_o
+%type <tree> spar_dm_gp_or_expn
 %type <tree> spar_select_query
 %type <token_type> spar_select_query_mode
 %type <trees> spar_select_rset
@@ -315,6 +329,8 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <nothing> spar_dataset_clauses_opt
 %type <nothing> spar_dataset_clause
 %type <token_type> spar_dataset_clause_subtype
+%type <token_type> spar_dataset_clause_subtype_from
+%type <token_type> spar_dataset_clause_subtype_using
 %type <trees> spar_sponge_optionlist_opt
 %type <trees> spar_sponge_option_commalist_opt_rpar
 %type <backstack> spar_sponge_option_commalist
@@ -325,7 +341,7 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <tree> spar_bindings_clause_opt
 %type <tree> spar_bindings_clause
 %type <backstack> spar_bindings_vars
-%type <tree> spar_bindings_var
+%type <box> spar_bindings_var
 %type <backstack> spar_bindings_opt
 %type <backstack> spar_bindings
 %type <trees> spar_binding
@@ -359,9 +375,11 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <backstack> spar_service_options
 %type <trees> spar_service_option
 %type <tree> spar_ctor_template
-%type <nothing> spar_ctor_triples
-%type <nothing> spar_triples_opt
+%type <nothing> spar_ctor_triples_or_quads_opt
+%type <nothing> spar_ctor_triples_or_quads_triples
+%type <nothing> spar_ctor_triples_or_quads_quads
 %type <nothing> spar_triples
+%type <nothing> spar_quads1
 %type <nothing> spar_triples1
 %type <nothing> spar_props_opt
 %type <nothing> spar_props
@@ -391,13 +409,17 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <tree> spar_global_var_int
 %type <tree> spar_graph_term
 %type <tree> spar_backquoted
+%type <backstack> spar_expn_or_ggps
 %type <backstack> spar_expns
+%type <tree> spar_expn_or_ggp
 %type <tree> spar_expn
 %type <tree> spar_built_in_call
-%type <tree> spar_built_in_regex
 %type <tree> spar_function_call
+%type <tree> spar_macro_call
 %type <backstack> spar_arg_list_opt
 %type <backstack> spar_arg_list
+%type <backstack> spar_macro_arg_list_opt
+%type <backstack> spar_macro_arg_list
 %type <tree> spar_numeric_literal
 %type <tree> spar_rdf_literal
 %type <tree> spar_boolean_literal
@@ -408,8 +430,8 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <trees> spar_arrow_iriref
 %type <tree> spar_blank_node
 /* nonterminals from part 1a: */
-%type <backstack> spar_sparul_actions
-%type <tree> spar_sparul_action
+%type <backstack> spar_sparul_action_or_drop_macro_libs
+%type <tree> spar_sparul_action_or_drop_macro_lib
 %type <tree> spar_sparul_insert
 %type <tree> spar_sparul_insertdata
 %type <tree> spar_sparul_delete
@@ -419,9 +441,19 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <tree> spar_sparul_load
 %type <tree> spar_sparul_create
 %type <tree> spar_sparul_drop
+%type <tree> spar_drop_macro_lib
+%type <tree> spar_sparul11_action
+%type <tree> spar_sparul11_deleteinsert
+%type <tree> spar_sparul11_insert
+%type <tree> spar_sparul11_insert_opt
+%type <tree> spar_sparul11_copymoveadd
+%type <token_type> spar_sparul11_copymoveadd_op
 %type <tree> spar_action_solution
-%type <tree> spar_in_graph_precode_opt
-%type <tree> spar_from_graph_precode_opt
+%type <tree> spar_in_graph_precode
+%type <tree> spar_from_graph_precode
+%type <tree> spar_all_or_named_or_default_or_graph_precode
+%type <tree> spar_default_or_graph_precode
+%type <nothing> spar_with_graph_precode_opt
 %type <tree> spar_graph_precode_opt
 %type <nothing> spar_in_or_into
 %type <token_type> spar_silent_opt
@@ -429,23 +461,21 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <nothing> spar_qm_stmts
 %type <nothing> spar_qm_stmt
 %type <tree> spar_qm_simple_stmt
-%type <tree> spar_qm_create_iri_class
-%type <tree> spar_qm_drop_iri_class
+%type <tree> spar_qm_create_iol_class
+%type <tree> spar_qm_drop_iol_class
 %type <tree> spar_qm_create_iri_subclass
-%type <tree> spar_qm_create_literal_class
-%type <tree> spar_qm_drop_literal_class
-%type <trees> spar_qm_iri_class_optionlist_opt
-%type <backstack> spar_qm_iri_class_option_commalist
-%type <trees> spar_qm_iri_class_option
+%type <trees> spar_qm_iol_class_optionlist_opt
+%type <backstack> spar_qm_iol_class_option_commalist
+%type <trees> spar_qm_iol_class_option
 %type <backstack> spar_qm_sprintff_list
-%type <trees> spar_qm_literal_class_optionlist_opt
-%type <backstack> spar_qm_literal_class_option_commalist
-%type <boxes> spar_qm_literal_class_option
+%type <token_type> spar_iol
 %type <nothing> spar_qm_create_quad_storage
 %type <nothing> spar_qm_alter_quad_storage
 %type <tree> spar_qm_drop_quad_storage
 %type <tree> spar_qm_drop_quad_map_mapping
 %type <tree> spar_qm_drop_mapping
+%type <tree> spar_qm_attach_macro_lib
+%type <tree> spar_qm_detach_macro_lib
 %type <nothing> spar_qm_from_where_list_opt
 %type <nothing> spar_qm_map_top_group
 %type <nothing> spar_qm_map_top_dotlist
@@ -478,6 +508,7 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <backstack> spar_qm_where_list_opt
 %type <backstack> spar_qm_where_list
 %type <box> spar_qm_where
+%type <box> spar_qm_sqlquery
 %type <trees> spar_qm_options_opt
 %type <backstack> spar_qm_option_commalist
 %type <trees> spar_qm_option
@@ -499,6 +530,7 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %type <nothing> spar_opt_dot_and_end
 
 %left _SEMI
+%nonassoc PRECODE_EXPN_PREC
 %left _COLON
 %nonassoc AS_L
 %left _BAR_BAR
@@ -516,16 +548,18 @@ int sparyylex_from_sparp_bufs (caddr_t *yylval, sparp_t *sparp)
 %%
 
 /* TOP-LEVEL begin */
-sparql	/* [1]*	Query		 ::=  Prolog ( QueryBody | SparulAction* | ( QmStmt ('.' QmStmt)* '.'? ) )	*/
-	: START_OF_SPARQL_TEXT spar_prolog /* {
-		if (sparp_arg->sparp_env->spare_default_graphs_listed || sparp_arg->sparp_env->spare_named_graphs_listed) {
-		  sparp_arg->sparp_env->spare_default_graphs_locked = 1;
-		  sparp_arg->sparp_env->spare_named_graphs_locked = 1;
-		  } } */
-	    spar_query_body END_OF_SPARQL_TEXT { sparp_arg->sparp_expr = $$ = $3; }
-	| START_OF_SPARQL_TEXT spar_prolog spar_sparul_actions END_OF_SPARQL_TEXT {
+sparql	/* [1]*	Query		 ::=  Prolog (	*/
+			/*... ( CreateMacroLib? QueryBody )	*/
+			/*... | ( SparulAction | DropMacroLib )	*/
+			/*... | ( QmStmt ('.' QmStmt)* '.'? ) )	*/
+	: START_OF_SPARQL_TEXT spar_prolog spar_create_macro_lib_opt
+	    spar_query_body END_OF_SPARQL_TEXT { sparp_arg->sparp_expr = $$ = $4; }
+	| START_OF_SPARQL_TEXT spar_prolog spar_sparul_action_or_drop_macro_libs END_OF_SPARQL_TEXT {
 		sparp_arg->sparp_expr = $$ = spar_make_topmost_sparul_sql (sparp_arg,
 		  (SPART **)t_revlist_to_array ($3) ); }
+	| START_OF_SPARQL_TEXT spar_prolog spar_sparul11_action END_OF_SPARQL_TEXT {
+		sparp_arg->sparp_expr = $$ = spar_make_topmost_sparul_sql (sparp_arg,
+		  (SPART **)t_list (1, $3) ); }
 	| START_OF_SPARQL_TEXT END_OF_SPARQL_TEXT {
 		sparp_arg->sparp_expr = $$ = spar_make_topmost_sparul_sql (sparp_arg,
 		  (SPART **)t_list (0) ); }
@@ -544,8 +578,9 @@ spar_query_body		/* [1]	QueryBody	 ::=  SelectQuery | ConstructQuery | DescribeQ
 	| spar_ask_query
 	;
 
-spar_prolog		/* [2]*	Prolog		 ::=  Define* BaseDecl? PrefixDecl*	*/
-	: spar_defines_opt spar_base_decl_opt spar_prefix_decls_opt
+spar_prolog		/* [2]*	Prolog		 ::=  Define* BaseDecl? PrefixDecl* Defmacro*
+			/*... ( 'WITH' ( 'GRAPH' ( 'IDENTIFIED' 'BY' )? )? PrecodeExpn )?	*/
+	: spar_defines_opt spar_base_decl_opt spar_prefix_decls_opt spar_defmacros_opt spar_with_graph_precode_opt
 	;
 
 spar_defines_opt	/* ::=  Define*	*/
@@ -569,11 +604,11 @@ spar_define_val_commalist
 	;
 
 spar_define_val		/* [Virt]	DefValue	 :=  QNAME | Q_IRI_REF | String	*/
-        : QNAME { $$ = (SPART *)t_list (2, QNAME, $1); }
-        | Q_IRI_REF { $$ = (SPART *)t_list (2, Q_IRI_REF, $1); }
-	| SPARQL_STRING { $$ = (SPART *)t_list (2, SPARQL_STRING, $1); }
-	| SPARQL_INTEGER { $$ = (SPART *)t_list (2, SPARQL_INTEGER, $1); }
-	| spar_global_var { $$ = (SPART *)t_list (2, SPAR_VARIABLE, (caddr_t)$1); }
+	: QNAME { $$ = (SPART *)t_list (2, (ptrlong)QNAME, $1); }
+	| Q_IRI_REF { $$ = (SPART *)t_list (2, (ptrlong)Q_IRI_REF, $1); }
+	| SPARQL_STRING { $$ = (SPART *)t_list (2, (ptrlong)SPARQL_STRING, $1); }
+	| SPARQL_INTEGER { $$ = (SPART *)t_list (2, (ptrlong)SPARQL_INTEGER, $1); }
+	| spar_global_var { $$ = (SPART *)t_list (2, (ptrlong)SPAR_VARIABLE, (caddr_t)$1); }
 	;
 
 spar_base_decl_opt	/* [3]	BaseDecl	 ::=  'BASE' Q_IRI_REF	*/
@@ -600,6 +635,147 @@ spar_prefix_decl	/* [4]	PrefixDecl	 ::=  'PREFIX' QNAME_NS Q_IRI_REF	*/
 	| PREFIX_L error { sparyyerror ("Missing namespace prefix after PREFIX keyword"); }
 	;
 
+spar_create_macro_lib_opt	/* [Virt]	CreateMacroLib	 ::=  'CREATE' 'MACRO' 'LIBRARY' IRIref '{' Defmacro* '}'	*/
+	: /* empty */
+	| CREATE_L MACRO_L LIBRARY_L spar_iriref {
+		if (sparp_arg->sparp_macro_def_count)
+		  sparyyerror ("Some macro are defined before CREATE MACRO LIBRARY");
+		sparp_arg->sparp_macrolib_to_create = $4->_.qname.val;
+		sparp_arg->sparp_disable_storage_macro_lib = 2; }
+	    _LBRA spar_defmacros_opt _RBRA
+	;
+
+spar_defmacros_opt
+	: /* empty */		{ ; }
+	| spar_defmacros_opt spar_defmacro	{ ; }
+	;
+
+spar_defmacro		/* [Virt]	Defmacro	 ::=  'DEFMACRO' IRIref ( */
+			/*... DefmacroArgs ( 'LOCAL' DefmacroArgs )? ( GroupGraphPattern | Expn ) |	*/
+			/*... DefmacroPattern ( 'LOCAL' DefmacroArgs )? GroupGraphPattern )	*/
+	: DEFMACRO_L spar_iriref {
+		SPART *new_macro;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		spar_selid_push_reused (sparp_arg, $2->_.qname.val );
+		sparp_arg->sparp_macro_mode = SPARP_DEFARG;
+		new_macro = sparp_arg->sparp_current_macro = sparp_defmacro_init (sparp_arg, $2->_.qname.val);
+		sparp_defmacro_store (sparp_arg, new_macro); }
+	    spar_dm_args_and_body {
+		sparp_defmacro_finalize (sparp_arg, $4);
+		sparp_arg->sparp_macro_mode = 0;
+		spar_selid_pop (sparp_arg);
+		  }
+	;
+
+spar_dm_args_and_body
+	: _LPAR spar_dm_args_opt _RPAR {
+		sparp_arg->sparp_current_macro->_.defmacro.paramnames = t_revlist_to_array ($2);	 }
+	    spar_dm_local_args_opt {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		if (NULL != $5)
+		  curr->_.defmacro.localnames = t_revlist_to_array ($5);
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
+	    spar_dm_gp_or_expn { $$ = $7; }
+	| spar_dm_match_template {
+		SPART *curr = sparp_arg->sparp_current_macro;
+	    sparp_make_defmacro_paramnames_from_template (sparp_arg, curr); }
+	    spar_dm_local_args_opt _LBRA {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		if (NULL != $3)
+		  curr->_.defmacro.localnames = t_revlist_to_array ($3);
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY;
+		spar_gp_init (sparp_arg, DEFMACRO_L); }
+	    spar_gp _RBRA { $$ = spar_gp_finalize (sparp_arg, NULL); }
+	| error { sparyyerror ("List of arguments or template is expected after macro name"); }
+	;
+
+spar_dm_match_template	/* [Virt]	DefmacroPattern	 ::=  (( 'GRAPH' PatternItemGorS ) | ( 'DEFAULT' 'GRAPH' ))?	*/
+/*... '{' PatternItemGorS PatternItemP PatternItemO '}'	*/
+	: _LBRA spar_dm_patitem_gs spar_dm_patitem_p spar_dm_patitem_o _RBRA {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = 0;
+		curr->_.defmacro.quad_pattern = (SPART **)t_list (4, NULL, $2, $3, $4);
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
+	| GRAPH_L spar_dm_patitem_gs _LBRA spar_dm_patitem_gs spar_dm_patitem_p spar_dm_patitem_o _RBRA {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = GRAPH_L;
+		curr->_.defmacro.quad_pattern = (SPART **)t_list (4, $2, $4, $5, $6);
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
+	| DEFAULT_L GRAPH_L _LBRA spar_dm_patitem_gs spar_dm_patitem_p spar_dm_patitem_o _RBRA {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = DEFAULT_L;
+		curr->_.defmacro.quad_pattern = (SPART **)t_list (4, NULL, $4, $5, $6);
+		sparp_arg->sparp_macro_mode = SPARP_DEFBODY; }
+	;
+
+spar_dm_local_args_opt
+	: /* empty */				{ $$ = NULL; }
+	| LOCAL_L _LPAR spar_dm_args _RPAR	{ $$ = $3; }
+	| LOCAL_L _LPAR spar_dm_arg_commalist _RPAR	{ $$ = $3; }
+	;
+
+spar_dm_args_opt	/* [Virt]	DefmacroArgs	 ::=  '(' ((VAR1 | VAR2)* | ((VAR1 | VAR2) ( ',' (VAR1 | VAR2))+)) ')' */
+	: /* empty */		{ $$ = NULL; }
+	| spar_dm_args
+	| spar_dm_arg_commalist
+	;
+
+spar_dm_arg_commalist
+	: QD_VARNAME _COMMA QD_VARNAME	{
+		$$ = NULL;
+		t_set_push (&($$), $1);
+		sparp_check_dm_arg_for_redecl (sparp_arg, $$, $3);
+		t_set_push (&($$), $3); }
+	| spar_dm_arg_commalist _COMMA QD_VARNAME	{
+		$$ = $1;
+		sparp_check_dm_arg_for_redecl (sparp_arg, $$, $3);
+		t_set_push (&($$), $3); }
+	;
+
+spar_dm_args
+	: QD_VARNAME		{ $$ = NULL; t_set_push (&($$), $1); }
+	| spar_dm_args QD_VARNAME	{
+		$$ = $1;
+		sparp_check_dm_arg_for_redecl (sparp_arg, $$, $2);
+		t_set_push (&($$), $2); }
+	;
+
+spar_dm_patitem_gs	/* [Virt]	PatternItemGorS	 ::=  VAR1 | VAR2 | IRIref	*/
+	: QD_VARNAME { $$ = spar_make_param_or_variable (sparp_arg, $1); }
+	| spar_iriref
+	;
+
+spar_dm_patitem_p	/* [Virt]	PatternItemP	 ::=  VAR1 | VAR2 | 'a' | IRIref	*/
+	: QD_VARNAME { $$ = spar_make_param_or_variable (sparp_arg, $1); }
+	| a_L { $$ = spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_type); }
+	| spar_iriref
+	;
+
+spar_dm_patitem_o	/* [Virt]	PatternItemO	 ::=  VAR1 | VAR2 | IRIref	*/
+			/*... | RDFLiteral | ( '-' | '+' )? NumericLiteral | BooleanLiteral | NIL	*/
+	: QD_VARNAME { $$ = spar_make_param_or_variable (sparp_arg, $1); }
+	| spar_numeric_literal
+	| _PLUS spar_numeric_literal	{ $$ = $2; }
+	| _MINUS spar_numeric_literal	{ $$ = $2; spar_change_sign (&($2->_.lit.val)); }
+	| NIL_L				{ $$ = (SPART *)t_box_dv_uname_string ("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); }
+	| spar_rdf_literal
+	| spar_boolean_literal
+	| spar_iriref
+	;
+
+
+spar_dm_gp_or_expn
+	: _LBRA {
+		SPART *curr = sparp_arg->sparp_current_macro;
+		curr->_.defmacro.subtype = 0;
+		spar_gp_init (sparp_arg, DEFMACRO_L); }
+	    spar_gp _RBRA { $$ = spar_gp_finalize (sparp_arg, NULL); }
+	| spar_expn
+	| error { sparyyerror ("Graph group pattern or expression is expected as the body of the macro"); }
+	;
+
+
 spar_select_query	/* [5]*	SelectQuery	 ::=  'SELECT' ( 'DISTINCT' | 'REDUCED' )? ( ( Retcol ( ','? Retcol )* ) | '*' )	*/
 			/*... DatasetClause* WhereClause SolutionModifier	*/
 	: spar_select_query_mode {
@@ -632,7 +808,7 @@ spar_select_rset	/* ::=  ( ( Retcol ( ','? Retcol )* ) | '*' | 'COUNT' )	*/
 spar_select_rset_1
 	: _STAR		{ $$ = (SPART **) _STAR; }
 	/*| COUNT_LPAR _STAR _RPAR	{ $$ = (SPART **) COUNT_LPAR; }*/
-	| spar_retcols	{ $$ = (SPART **) t_revlist_to_array ($1); }
+	| spar_retcols			{ $$ = (SPART **) t_revlist_to_array ($1); }
 	| spar_retcol_commalist	{
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_VIRTSPECIFIC, "comma-delimited list of result set expressions");
 		$$ = (SPART **) t_revlist_to_array ($1); }
@@ -694,8 +870,8 @@ spar_dataset_clauses_opt
 	;
 
 spar_dataset_clause	/* [9]*	DatasetClause	 ::=   |	*/
-			/*... ( 'FROM' ( DefaultGraphClause | NamedGraphClause ) SpongeOptionList? )	*/
-			/*... | ( 'NOT' 'FROM' ( DefaultGraphClause | NamedGraphClause ) )	*/
+			/*... ( ( 'FROM' | 'USING' ) ( DefaultGraphClause | NamedGraphClause ) SpongeOptionList? )	*/
+			/*... | ( 'NOT' 'FROM' | 'USING' ) ( DefaultGraphClause | NamedGraphClause ) )	*/
 			/* [10]	DefaultGraphClause	 ::=  SourceSelector	*/
 			/* [11]	NamedGraphClause	 ::=  'NAMED' SourceSelector	*/
 	: spar_dataset_clause_subtype spar_iriref spar_sponge_optionlist_opt {
@@ -703,12 +879,27 @@ spar_dataset_clause	/* [9]*	DatasetClause	 ::=   |	*/
 	;
 
 spar_dataset_clause_subtype
+	: spar_dataset_clause_subtype_from {
+		if (NULL != sparp_arg->sparp_env->spare_src.ssrc_graph_set_by_with)
+		  sparyyerror ("FROM can not be used in combination with WITH, use either consistent SPARUL syntax or SPARQL 1.1 syntax, not a mix");
+		$$ = $1; }
+	| spar_dataset_clause_subtype_using {
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "USING keyword");
+		$$ = $1; }
+	;
+
+spar_dataset_clause_subtype_from
 	: FROM_L		{ $$ = SPART_GRAPH_FROM; }
 	| FROM_L NAMED_L	{ $$ = SPART_GRAPH_NAMED; }
 	| NOT_L FROM_L		{ $$ = SPART_GRAPH_NOT_FROM; }
 	| NOT_L FROM_L NAMED_L	{ $$ = SPART_GRAPH_NOT_NAMED; }
-	| NOT_FROM_L		{ $$ = SPART_GRAPH_NOT_FROM; }
-	| NOT_FROM_L NAMED_L	{ $$ = SPART_GRAPH_NOT_NAMED; }
+	;
+
+spar_dataset_clause_subtype_using
+	: USING_L		{ $$ = SPART_GRAPH_FROM; }
+	| USING_L NAMED_L	{ $$ = SPART_GRAPH_NAMED; }
+	| NOT_L USING_L		{ $$ = SPART_GRAPH_NOT_FROM; }
+	| NOT_L USING_L NAMED_L	{ $$ = SPART_GRAPH_NOT_NAMED; }
 	;
 
 spar_sponge_optionlist_opt	/* [Virt]	SpongeOptionList	 ::=  'OPTION' '(' ( SpongeOption ( ',' SpongeOption )* )? ')'	*/
@@ -731,7 +922,7 @@ spar_sponge_option_commalist	/* ::=  SpongeOption ( ',' SpongeOption )* */
 
 spar_precode_expn	/* [Virt]	PrecodeExpn	 ::=  Expn	(* Only global variables can occur in Expn, local can not *)	*/
 	: { sparp_arg->sparp_in_precode_expn = 1; }
-	  spar_expn
+	  spar_expn %prec PRECODE_EXPN_PREC
 	  { sparp_arg->sparp_in_precode_expn = 0; $$ = $2; }
 	;
 
@@ -759,13 +950,15 @@ spar_wherebindings_clause	/* [13*]	WhereBindingsClause	 ::=  'WHERE'? GroupGraph
 
 spar_bindings_clause_opt
 	: /* nothing */		{ $$ = NULL; }
-	| spar_bindings_clause	{ $$ = $1; }
+	| spar_bindings_clause
 	;
 
 spar_bindings_clause		/* [Sparql1.1*]	BindingsClause	 ::=  'BINDINGS' BindingsVar+ '{' Binding* '}'	*/
 	: BINDINGS_L	{
 		if (NULL != sparp_arg->sparp_env->spare_bindings_vars)
 		  sparyyerror ("Only one BINDINGS clause per query is allowed");
+		if (sparp_arg->sparp_macro_mode)
+		  sparyyerror ("BINDINGS can not be used inside macro");
 		spar_selid_push (sparp_arg); }
 	    spar_bindings_vars _LBRA	{
 		spar_selid_pop (sparp_arg);
@@ -784,14 +977,13 @@ spar_bindings_vars
 	;
 
 spar_bindings_var		/* [Sparql1.1*]	BindingsVar	 ::=  VAR1 | VAR2 | GlobalVar	*/
-	: QUEST_VARNAME		{ ; }
-	| DOLLAR_VARNAME	{ ; }
+	: QD_VARNAME		{ ; }
 	| spar_global_var	{ sparyyerror ("Global variable can not be used in the header of BINDINGS"); }
 	;
 
 spar_bindings_opt
 	: /* nothing */		{ $$ = NULL; }
-	| spar_bindings		{ $$ = $1; }
+	| spar_bindings
 	;
 
 spar_bindings
@@ -801,7 +993,7 @@ spar_bindings
 
 spar_binding			/* [Sparql1.1]	Binding	 ::=  '(' ( IRIref | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | 'UNBOUND' )+ ')'	*/
 	: _LPAR spar_bindvals _RPAR {
-		$$ = t_revlist_to_array ($2);
+		$$ = (SPART **)t_revlist_to_array ($2);
 		if (BOX_ELEMENTS ($$) != BOX_ELEMENTS (sparp_arg->sparp_env->spare_bindings_vars))
 		  sparyyerror ("Number of values in a binding does not match number of variables to bind"); }
 	;
@@ -915,8 +1107,11 @@ spar_group_gp		/* [19]*	GroupGraphPattern	 ::=  '{' ( GraphPattern | SelectQuery
 		$$ = spar_gp_finalize (sparp_arg, $3);
 		sparp_validate_options_of_tree (sparp_arg, $$, $$->_.gp.options); }
 	| spar_select_query_mode {
+		$<token_type>$ = (ptrlong)(sparp_env()->spare_context_gp_subtypes->data);
 		if (NULL == sparp_env()->spare_context_sinvs) { /* There's an exception related to codegen-time optimization SERVICE { SELECT {x}} like it is SERVICE {x}, so no error right here. */
 		    SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "subquery"); }
+		if (SERVICE_L == $<token_type>$)
+		  spar_gp_init (sparp_arg, SELECT_L);
 		spar_env_push (sparp_arg);
 		spar_selid_push (sparp_arg);
                 t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
@@ -929,6 +1124,7 @@ spar_group_gp		/* [19]*	GroupGraphPattern	 ::=  '{' ( GraphPattern | SelectQuery
 		SPART *where_gp;
 	        caddr_t retselid;
 		SPART *wm = $6;
+		SPART *res;
 		where_gp = spar_gp_finalize (sparp_arg, NULL);
 		retselid = spar_selid_pop (sparp_arg);
 		wm->_.wm.where_gp = where_gp;
@@ -937,7 +1133,13 @@ spar_group_gp		/* [19]*	GroupGraphPattern	 ::=  '{' ( GraphPattern | SelectQuery
 		if (SPAR_REQ_TOP == subselect_top->type)
 		  sparp_expand_top_retvals (sparp_arg, subselect_top, 1 /* safely_copy_all_vars */);
 		spar_env_pop (sparp_arg);
-		$$ = spar_gp_finalize_with_subquery (sparp_arg, $8, subselect_top);
+		res = spar_gp_finalize_with_subquery (sparp_arg, $8, subselect_top);
+		if (SERVICE_L == $<token_type>2)
+		  {
+		    spar_gp_add_member (sparp_arg, res);
+		    res = spar_gp_finalize (sparp_arg, NULL);
+		  }
+		$$ = res;
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
 	;
 
@@ -945,6 +1147,20 @@ spar_gp			/* [20]	GraphPattern	 ::=  Triples? ( GraphPatternNotTriples '.'? Grap
 	: spar_triples_opt { }
 	| spar_triples_opt spar_gp_not_triples spar_gp { }
 	| spar_triples_opt spar_gp_not_triples _DOT spar_gp { }
+	| QD_VARNAME _DOT spar_gp {
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  {
+		    SPART *curmacro = sparp_arg->sparp_current_macro;
+		    SPART *mpu;
+		    int pos = sparp_namesake_macro_param (sparp_arg, curmacro, $1);
+		    if (0 > pos)
+		      spar_error (sparp_arg, "Pattern variable '%.100s' inside the body of a macro '%.100s' is not listed in list of macro parameters",
+		        $1, curmacro->_.defmacro.mname );
+		    mpu = spar_make_macropu (sparp_arg, $1, pos);
+		    spar_gp_add_member (sparp_arg, mpu);
+		  }
+		else
+		  sparyyerror ("Ill formed triple pattern or macro pattern variable outside a macro body"); }
 	;
 
 spar_gp_not_triples	/* [21]*	GraphPatternNotTriples	 ::=  */
@@ -994,12 +1210,12 @@ spar_constraint		/* [25]*	Constraint	 ::=  'FILTER' ( ( '(' Expn ')' ) | BuiltIn
 	: FILTER_L _LPAR spar_expn _RPAR	{ $$ = $3; }
 	| FILTER_L spar_built_in_call	{ $$ = $2; }
 	| FILTER_L spar_function_call	{ $$ = $2; }
-	| FILTER_L spar_exists_or_not_exists spar_constraint_exists_int {		/*... | 'NOT'? 'EXISTS' DatasetClause* WhereClause */
+	| FILTER_L spar_exists_or_not_exists spar_constraint_exists_int {		/*... | 'NOT'? 'EXISTS' DatasetClause* WhereClause	*/
 		if ($2)
 		  $$ = $3;
 		else
 		  SPAR_BIN_OP ($$, BOP_NOT, $3, NULL); }
-	| MINUS_L spar_constraint_exists_int {		/*... | 'NOT'? 'EXISTS' DatasetClause* WhereClause */
+	| MINUS_L spar_constraint_exists_int {		/*... | 'MINUS' DatasetClause* WhereClause */
 		/*!!! Dirty hack! Works wrong if MINUS is at the middle of the GP (before smth or not a 2-nd item) */
 		  SPAR_BIN_OP ($$, BOP_NOT, $2, NULL); }
 	;
@@ -1044,10 +1260,11 @@ spar_service_req	/* [Virt]	ServiceRequest ::=  'SERVICE' IRIref ServiceOptionLis
 		SPART **sources;
 		caddr_t sinv_storage_uri = uname_virtrdf_ns_uri_DefaultServiceStorage /*!!! TBD config */;
 		SPART *sinv;
-		if ((NULL == sparp_arg->sparp_env->spare_default_graphs) && (NULL == sparp_arg->sparp_env->spare_named_graphs))
+		if ((NULL == sparp_arg->sparp_env->spare_src.ssrc_default_graphs) && (NULL == sparp_arg->sparp_env->spare_src.ssrc_named_graphs))
 		  memcpy (&(sparp_arg->sparp_env->spare_src), $<box>5, sizeof (sparp_sources_t));
-		sources = spar_make_sources_like_top (sparp_arg);
+		sources = spar_make_sources_like_top (sparp_arg, SELECT_L);
 		sinv = spar_make_service_inv (sparp_arg, $2, $4, sparp_arg->sparp_permitted_syntax, sources, sinv_storage_uri);
+		spar_add_service_inv_to_sg (sparp_arg, sinv);
 		t_set_push (&(sparp_env()->spare_context_sinvs), sinv);
 		spar_gp_init (sparp_arg, SERVICE_L); }
 	    spar_group_gp {
@@ -1084,20 +1301,43 @@ spar_service_option
 	| IN_L _STAR					{ $$ = (SPART **)t_list (2, (SPART *)((ptrlong)IN_L), (SPART *)((ptrlong)_STAR)); }
 	;
 
-spar_ctor_template	/* [26]*	ConstructTemplate	 ::=  '{' ConstructTriples '}'	*/
+spar_ctor_template	/* [26]*	ConstructTemplate	 ::=  '{' ( ConstructQuads+ '.'? ) '}'	*/
 	: _LBRA { spar_gp_init (sparp_arg, CONSTRUCT_L); }
-	    spar_ctor_triples_opt _RBRA { $$ = spar_gp_finalize (sparp_arg, NULL); }
+	    spar_ctor_triples_or_quads_opt _RBRA {
+		int g_grp_count = sparp_env()->spare_ctor_g_grp_count;
+		int g_may_vary = 0;
+		$$ = spar_gp_finalize (sparp_arg, NULL);
+		if (1 < (g_grp_count + (sparp_env()->spare_ctor_dflt_g_tmpl_count ? 1 : 0)))
+		  g_may_vary = 1;
+		if ((0 == g_may_vary) && (0 < BOX_ELEMENTS ($$->_.gp.members)))
+		  {
+		    SPART *g = $$->_.gp.members[0]->_.triple.tr_graph;
+		    if ((SPAR_QNAME != SPART_TYPE (g)) && !SPART_IS_DEFAULT_GRAPH_BLANK (g))
+		      g_may_vary = 1;
+		  }
+		if (g_may_vary)
+		  $$->_.gp.options = (SPART **)t_list (2, (SPART *)((ptrlong)QUAD_L), t_box_num_nonull (g_grp_count));
+		sparp_env()->spare_ctor_g_grp_count = 0;
+		sparp_env()->spare_ctor_dflt_g_tmpl_count = 0; }
 	;
 
-spar_ctor_triples_opt	/* [27]	ConstructTriples	 ::=  ( Triples1 ( '.' ConstructTriples )? )?	*/
+spar_ctor_triples_or_quads_opt	/* [27]*	ConstructQuads	 ::=  (Triples1  ( '.' ConstructQuads )? ) | Quads1 ( '.'? ConstructQuads )?	*/
 	: /* empty */ { }
-	| spar_ctor_triples { }
-	| spar_ctor_triples _DOT { }
+	| spar_ctor_triples_or_quads_quads { }
+	| spar_ctor_triples_or_quads_triples { }
+	| spar_ctor_triples_or_quads_triples _DOT { }
 	;
 
-spar_ctor_triples	/* ::=  Triples1 ( '.' Triples1 )* */
+spar_ctor_triples_or_quads_triples
 	: spar_triples1				{ }
-	| spar_ctor_triples _DOT spar_triples1	{ }
+	| spar_ctor_triples_or_quads_triples _DOT spar_triples1	{ }
+	| spar_ctor_triples_or_quads_quads spar_triples1	{ }
+	;
+
+spar_ctor_triples_or_quads_quads
+	: spar_quads1				{ }
+	| spar_ctor_triples_or_quads_triples _DOT spar_quads1	{ }
+	| spar_ctor_triples_or_quads_quads spar_quads1	{ }
 	;
 
 spar_triples_opt	/* ::=  Triples?	*/
@@ -1110,18 +1350,27 @@ spar_triples		/* [28]	Triples		 ::=  Triples1 ( '.' Triples? )?	*/
 	| spar_triples1 _DOT spar_triples_opt	{ }
 	;
 
-spar_triples1		/* [29]	Triples1	 ::=  VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList	*/
+spar_quads1		/* [Virt]	Quads1	 ::=  GRAPH VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList | MacroCall	*/
+	: GRAPH_L	{ SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "SPARQL 1.1 quad constructor template"); }
+	    spar_var_or_blank_node_or_iriref_or_backquoted	{
+		sparp_env()->spare_ctor_g_grp_count++;
+		t_set_push (&(sparp_env()->spare_context_graphs), $3); }
+	    _LBRA spar_triples _RBRA	{ t_set_pop (&(sparp_env()->spare_context_graphs)); }
+	;
+
+spar_triples1		/* [29*]	Triples1	 ::=  VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList | MacroCall	*/
 	: spar_var_or_term { t_set_push (&(sparp_env()->spare_context_subjects), $1); }
 	    spar_props { t_set_pop (&(sparp_env()->spare_context_subjects)); $$ = $3; }
 	| spar_triples_node { t_set_push (&(sparp_env()->spare_context_subjects), $1); }
 	    spar_props_opt { t_set_pop (&(sparp_env()->spare_context_subjects)); }
+	| spar_macro_call { spar_gp_add_member (sparp_arg, $1); }
 	;
 
 spar_props_opt		/* [30]	PropertyList	 ::=  PropertyListNotEmpty?	*/
 	: /* empty */	{ }
 	| spar_props	{ }
-	| spar_props _SEMI	{ }
-	| spar_props _SEMI _DOT	{ sparyyerror ("Dot immediately after semicolon is permitted in pure SPARQL but not in SPARQL-BI"); }
+	/*| spar_props _SEMI	{ }
+	| spar_props _SEMI _DOT	{ sparyyerror ("Dot immediately after semicolon is permitted in pure SPARQL but not in SPARQL-BI"); }*/
 	;
 
 spar_props		/* [31]	PropertyListNotEmpty	 ::=  Verb ObjectList ( ';' PropertyList )?	*/
@@ -1146,14 +1395,14 @@ spar_objects		/* [32]*	ObjectList	 ::=  ObjGraphNode ( ',' ObjectList )?	*/
 
 spar_ograph_node	/* [Virt]	ObjGraphNode	 ::=  GraphNode TripleOptions?	*/
 	: spar_graph_node spar_triple_optionlist_opt {
-		spar_gp_add_triple_or_special_filter (sparp_arg, NULL, NULL, NULL, $1, NULL, $2, 0x0); }
+		spar_gp_add_triplelike (sparp_arg, NULL, NULL, NULL, $1, NULL, $2, 0x0); }
 	;
 
 spar_triple_optionlist_opt	/* [Virt]	TripleOptions	 ::=  'OPTION' '(' TripleOption ( ',' TripleOption )? ')'	*/
 	: /* empty */	{ $$ = NULL; }
 	| OPTION_L _LPAR {
 		if (CONSTRUCT_L == SPARP_ENV_CONTEXT_GP_SUBTYPE(sparp_arg))
-		  sparyyerror ("Triple options are not allowed in contructor template");
+		  sparyyerror ("Triple options are not allowed in constructor template");
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_OPTION, "OPTION () triple matching configuration"); }
 	    spar_triple_option_commalist _RPAR { $$ = (SPART **)t_revlist_to_array ($4); }
 	;
@@ -1228,7 +1477,7 @@ spar_triples_node	/* [34]	TriplesNode	 ::=  Collection | BlankNodePropertyList	*
 		t_set_push (&(sparp_env()->spare_context_subjects), bn);
 		t_set_push (&(sparp_env()->spare_context_subjects), bn); }
 	    spar_cons_collection _RPAR {
-		spar_gp_add_triple_or_special_filter (sparp_arg,
+		spar_gp_add_triplelike (sparp_arg,
 		  NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_rest),
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_nil),
@@ -1245,17 +1494,17 @@ spar_triples_opt_semi_rsqbra	/* ::=  ';'? ']'	*/
 
 spar_cons_collection
 	: spar_graph_node {
-		spar_gp_add_triple_or_special_filter (sparp_arg, NULL, NULL,
+		spar_gp_add_triplelike (sparp_arg, NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_first),
 		  $1, NULL, NULL, 0x0 ); }
 	| spar_cons_collection spar_graph_node {
 		SPART *bn = spar_make_blank_node (sparp_arg, spar_mkid (sparp_arg, "_:cons"), 1);
-		spar_gp_add_triple_or_special_filter (sparp_arg,
+		spar_gp_add_triplelike (sparp_arg,
 		  NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_rest),
 		  bn, NULL, NULL, 0x0 );
 		sparp_env()->spare_context_subjects->data = bn;
-		spar_gp_add_triple_or_special_filter (sparp_arg, NULL, NULL,
+		spar_gp_add_triplelike (sparp_arg, NULL, NULL,
 		  spartlist (sparp_arg, 2, SPAR_QNAME, uname_rdf_ns_uri_first),
 		  $2, NULL, NULL, 0x0 ); }
 	;
@@ -1301,8 +1550,8 @@ spar_retcol_commalist			/* ::=  ( Expn ( ',' Expn )+ )	*/
 	;
 
 spar_retcols		/* ::=  ( Expn+ )	*/
-	: spar_expn			{ $$ = NULL; t_set_push (&($$), $1); }
-	| spar_retcols spar_expn	{ $$ = $1; t_set_push (&($$), $2); }
+	: spar_expn %prec _COMMA		{ $$ = NULL; t_set_push (&($$), $1); }
+	| spar_retcols spar_expn %prec _COMMA	{ $$ = $1; t_set_push (&($$), $2); }
 	;
 
 spar_ret_agg_call	/* [Virt]	RetAggCall	 ::=  AggName '(', ( '*' | ( 'DISTINCT'? Var ) ) ')'	*/
@@ -1317,17 +1566,40 @@ spar_agg_name	/* [Virt]	AggName	 ::=  'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'SUM'	*/
 
 spar_agg_name_int
 	: COUNT_LPAR	{ $$ = t_box_dv_uname_string ("SPECIAL::bif:COUNT"); }
-	| AVG_L	_LPAR	{ $$ = t_box_dv_uname_string ("bif:AVG"); }
-	| MIN_L	_LPAR	{ $$ = t_box_dv_uname_string ("bif:MIN"); }
-	| MAX_L	_LPAR	{ $$ = t_box_dv_uname_string ("bif:MAX"); }
-	| SUM_L	_LPAR	{ $$ = t_box_dv_uname_string ("bif:SUM"); }
+	| AVG_L	_LPAR	{ $$ = t_box_dv_uname_string ("SPECIAL::bif:AVG"); }
+	| MIN_L	_LPAR	{ $$ = t_box_dv_uname_string ("SPECIAL::bif:MIN"); }
+	| MAX_L	_LPAR	{ $$ = t_box_dv_uname_string ("SPECIAL::bif:MAX"); }
+	| SUM_L	_LPAR	{ $$ = t_box_dv_uname_string ("SPECIAL::bif:SUM"); }
 	;
 
 spar_var		/* [41]*	Var	 ::=  VAR1 | VAR2 | GlobalVar | ( Var ( '+>' | '*>' ) IRIref )	*/
-	: QUEST_VARNAME			{ $$ = spar_make_param_or_variable (sparp_arg, $1); }
-	| DOLLAR_VARNAME		{ $$ = spar_make_param_or_variable (sparp_arg, $1); }
-	| spar_global_var		{ $$ = $1; }
-	| spar_var spar_arrow_iriref	{ $$ = spar_add_propvariable (sparp_arg, $1, (ptrlong)($2[0]), $2[1], (ptrlong)($2[2]), (caddr_t)($2[3]) ); }
+	: QD_VARNAME			{
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  {
+		    SPART *curmacro = sparp_arg->sparp_current_macro;
+		    int pos = sparp_namesake_macro_param (sparp_arg, curmacro, $1);
+		    if (-1 > pos)
+		      {
+		        spar_error (sparp_arg, "Variable '%.100s' inside the body of a macro '%.100s' is not listed in list of macro arguments or list of local names",
+		        $1, curmacro->_.defmacro.mname );
+		      }
+		    if (0 <= pos)
+		      $$ = spar_make_macropu (sparp_arg, $1, pos);
+		    else
+		      $$ = spar_make_param_or_variable (sparp_arg, $1);
+		  }
+		else
+		  $$ = spar_make_param_or_variable (sparp_arg, $1); }
+	| spar_global_var		{
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  spar_error (sparp_arg, "Global variables are not allowed inside the body of a macro '%.100s'",
+		    sparp_arg->sparp_current_macro->_.defmacro.mname );
+		$$ = $1; }
+	| spar_var spar_arrow_iriref	{
+		if (sparp_arg->sparp_macro_mode & SPARP_DEFBODY)
+		  spar_error (sparp_arg, "Property path variables are not allowed inside the body of a macro '%.100s'",
+		    sparp_arg->sparp_current_macro->_.defmacro.mname );
+		$$ = spar_add_propvariable (sparp_arg, $1, (ptrlong)($2[0]), $2[1], (ptrlong)($2[2]), (caddr_t)($2[3]) ); }
 	;
 
 spar_global_var		/* [Virt]	GlobalVar	 ::=  QUEST_COLON_PARAMNAME | DOLLAR_COLON_PARAMNAME	*/
@@ -1336,33 +1608,33 @@ spar_global_var		/* [Virt]	GlobalVar	 ::=  QUEST_COLON_PARAMNAME | DOLLAR_COLON_
 
 spar_global_var_int
 			/*... | QUEST_COLON_PARAMNUM | DOLLAR_COLON_PARAMNUM	*/
-	: QUEST_COLON_PARAMNAME		{ $$ = spar_make_variable (sparp_arg, $1); }
-	| DOLLAR_COLON_PARAMNAME	{ $$ = spar_make_variable (sparp_arg, $1); }
-	| QUEST_COLON_PARAMNUM		{ $$ = spar_make_variable (sparp_arg, $1); }
-	| DOLLAR_COLON_PARAMNUM		{ $$ = spar_make_variable (sparp_arg, $1); }
+	: QD_COLON_PARAMNAME		{ $$ = spar_make_variable (sparp_arg, $1); }
+	| QD_COLON_PARAMNUM		{ $$ = spar_make_variable (sparp_arg, $1); }
 	;
 
 spar_graph_term		/* [42]*	GraphTerm	 ::=  IRIref | RDFLiteral | ( '-' | '+' )? NumericLiteral	*/
 			/*... | BooleanLiteral | BlankNode | NIL | Backquoted	*/
-	: spar_iriref			{ $$ = $1; }
-	| spar_rdf_literal		{ $$ = $1; }
-	| spar_numeric_literal		{ $$ = $1; }
+	: spar_iriref
+	| spar_rdf_literal
+	| spar_numeric_literal
 	| _PLUS spar_numeric_literal	{ $$ = $2; }
 	| _MINUS spar_numeric_literal	{ $$ = $2; spar_change_sign (&($2->_.lit.val)); }
-        | spar_boolean_literal		{ $$ = $1; }
-        | spar_blank_node		{ $$ = $1; }
+	| spar_boolean_literal
+	| spar_blank_node
 	| NIL_L				{ $$ = (SPART *)t_box_dv_uname_string ("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"); }
 	| spar_backquoted
 	;
 
 spar_backquoted		/* [Virt]	Backquoted	 ::=  '`' Expn '`'	*/
 	: _BACKQUOTE {
-		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "backquoted expression");
+		dk_set_t gp_st = sparp_env()->spare_context_gp_subtypes;
 		if (2 & sparp_arg->sparp_in_precode_expn)
-		  spar_error (sparp_arg, "Backquoted expressions are not allowed in constant clauses"); }
+		  spar_error (sparp_arg, "Backquoted expressions are not allowed in constant clauses");
+		$<token_type>$ = ((NULL == gp_st) ? -1 : (ptrlong)(gp_st->data));
+		if (CONSTRUCT_L == $<token_type>$)
+		  SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "backquoted expression in CONSTRUCT"); }
 	    spar_expn _BACKQUOTE {
-		  dk_set_t gp_st = sparp_env()->spare_context_gp_subtypes;
-                  if ((NULL == gp_st) || (CONSTRUCT_L == (ptrlong)(gp_st->data)))
+		  if ((-1 == $<token_type>2) || (CONSTRUCT_L == $<token_type>2))
                     $$ = $3; /* redundant backquotes in retlist or backquotes to bypass syntax limitation in CONSTRUCT gp */
                   else
 		    {
@@ -1376,8 +1648,7 @@ spar_backquoted		/* [Virt]	Backquoted	 ::=  '`' Expn '`'	*/
 	;
 
 spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
-	: spar_expn AS_L QUEST_VARNAME		{ $$ = spartlist (sparp_arg, 4, SPAR_ALIAS, $1, $3, SSG_VALMODE_AUTO); }
-	| spar_expn AS_L DOLLAR_VARNAME		{ $$ = spartlist (sparp_arg, 4, SPAR_ALIAS, $1, $3, SSG_VALMODE_AUTO); }
+	: spar_expn AS_L QD_VARNAME		{ $$ = spartlist (sparp_arg, 4, SPAR_ALIAS, $1, $3, SSG_VALMODE_AUTO); }
 	| spar_expn _BAR_BAR spar_expn { /* [44]	ConditionalOrExpn	 ::=  ConditionalAndExpn ( '||' ConditionalAndExpn )*	*/
 		  SPAR_BIN_OP ($$, BOP_OR, $1, $3); }
 	| spar_expn _AMP_AMP spar_expn { /* [45]	ConditionalAndExpn	 ::=  ValueLogical ( '&&' ValueLogical )*	*/
@@ -1390,7 +1661,7 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
 	| spar_expn _NOT_EQ spar_expn	{ SPAR_BIN_OP ($$, BOP_NEQ, $1, $3); }
 	| spar_expn LIKE_L	{ SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_LIKE, "LIKE operator"); }
 	    spar_expn	{	/* Virtuoso-specific extension of [47] */
-		$$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)LIKE_L, t_list (2, $1, $4)); }
+		$$ = sparp_make_builtin_call (sparp_arg, LIKE_L, (SPART **)t_list (2, $1, $4)); }
 	| spar_expn IN_L	{ SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_IN, "IN operator"); }
 	    _LPAR spar_expns _RPAR	{	/* Virtuoso-specific extension of [47] */
 		  dk_set_t args = $5;
@@ -1401,8 +1672,8 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
                   else
                     {
                       t_set_push (&args, $1);
-		      $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL,  (SPART *) t_box_num(IN_L),
-                        t_list_to_array (args) /* NOT t_revlist_to_array (args), note special first element pushed */ );
+		      $$ = sparp_make_builtin_call (sparp_arg, IN_L,
+		        (SPART **)t_list_to_array (args) /* NOT t_revlist_to_array (args), note special first element pushed */ );
                     }
 		}
 	| spar_expn _LT spar_expn	{ SPAR_BIN_OP ($$, BOP_LT, $1, $3); }
@@ -1451,7 +1722,7 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
 		else
 		  $$ = $2; }
         | _LPAR spar_expn _RPAR	{ $$ = $2; }	/* [58]	PrimaryExpn	 ::=  */
-			/*... BracketedExpn | BuiltInCall | IRIrefOrFunction	*/
+			/*... BracketedExpn | BuiltInCall | IRIrefOrFunctionOrMacro	*/
 			/*... | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | Var	*/
 	| _LPAR ASK_L {
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "scalar ASK subquery");
@@ -1462,14 +1733,14 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
 		sparp_arg->sparp_allow_aggregates_in_expn <<= 1; }
             spar_dataset_clauses_opt
 	    spar_wherebindings_clause
-	    _RPAR spar_triple_optionlist_opt {
+	    spar_triple_optionlist_opt _RPAR {
 		SPART *subselect_top;
 		SPART *where_gp;
 		where_gp = spar_gp_finalize (sparp_arg, NULL);
 		subselect_top = spar_make_top (sparp_arg, ASK_L, (SPART **)t_list(0), spar_selid_pop (sparp_arg),
 		  where_gp, NULL, NULL, NULL, (SPART *)t_box_num(1), (SPART *)t_box_num(0) );
 		spar_env_pop (sparp_arg);
-		$$ = spar_gp_finalize_with_subquery (sparp_arg, $7, subselect_top);
+		$$ = spar_gp_finalize_with_subquery (sparp_arg, $6, subselect_top);
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
 	| _LPAR spar_select_query_mode {
 		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "scalar subquery");
@@ -1481,7 +1752,7 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
 		sparp_arg->sparp_allow_aggregates_in_expn |= 1; }
 	    spar_select_rset spar_dataset_clauses_opt
             spar_where_clause spar_solution_modifier
-	    _RPAR spar_triple_optionlist_opt {
+	    spar_triple_optionlist_opt _RPAR {
 		SPART *subselect_top;
 		SPART *where_gp;
 		SPART *wm = $7;
@@ -1494,7 +1765,7 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
 		if (SPAR_REQ_TOP == subselect_top->type)
 		  sparp_expand_top_retvals (sparp_arg, subselect_top, 1 /* safely_copy_all_vars */);
 		spar_env_pop (sparp_arg);
-		$$ = spar_gp_finalize_with_subquery (sparp_arg, $9, subselect_top);
+		$$ = spar_gp_finalize_with_subquery (sparp_arg, $8, subselect_top);
 		sparp_arg->sparp_allow_aggregates_in_expn >>= 1; }
 	| spar_ret_agg_call {
 		$$ = $1;
@@ -1503,76 +1774,132 @@ spar_expn		/* [43]	Expn		 ::=  ConditionalOrExpn	( 'AS' ( VAR1 | VAR2 ) ) */
 		if (!(sparp_arg->sparp_allow_aggregates_in_expn & 1))
 		  sparyyerror ("Aggregates are allowed only in result sets"); }
 	| spar_built_in_call
-	| spar_iriref spar_arg_list_opt {	/* [55]	IRIrefOrFunction	 ::=  IRIref ArgList? */
-                  if (NULL == $2)
+	| spar_iriref {			/* [55*]	IRIrefOrFunctionOrMacro	 ::=  (( IRIref ArgList? ) | ( 'MACRO' IRIref ArgList ))	*/
+		SPART *mdef;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		mdef = spar_find_defmacro_by_iri_or_fields (sparp_arg, $1->_.lit.val, NULL);
+		$<trees>$ = (SPART **)t_list (2, (ptrlong)(sparp_arg->sparp_macro_mode), mdef);
+		if (NULL != mdef)
+		  {
+		    if ((SPARP_DEFBODY & sparp_arg->sparp_macro_mode) && (sparp_arg->sparp_current_macro == mdef))
+		      sparyyerror ("The macro is recursively used in its own definition");
+		    sparp_arg->sparp_macro_mode |= SPARP_CALLARG;
+		  } }
+	     spar_arg_list_opt {
+		if (NULL == $3)
 		    $$ = $1;
 		  else
 		    {
-		      SPART **args = (SPART **)(((dk_set_t)NIL_L == $2) ? NULL : t_revlist_to_array ($2));
+		    SPART **args = (SPART **)(((dk_set_t)NIL_L == $3) ? NULL : t_revlist_to_array ($3));
                       caddr_t fname = $1->_.lit.val;
+		    SPART *mdef = ($<trees>2)[1];
+		    if (NULL != mdef)
+		      {
+		        sparp_arg->sparp_macro_mode = (ptrlong)(($<trees>2)[0]);
+		        $$ = sparp_make_macro_call (sparp_arg, fname, 1, args);
+		        if (!(sparp_arg->sparp_macro_mode & SPARP_DEFBODY))
+		          sparp_arg->sparp_macro_call_count++;
+		      }
+		    else
+		      {
                       spar_verify_funcall_security (sparp_arg, fname, args);
 		      $$ = spar_make_funcall (sparp_arg, 0, fname, args);
-		    } }
+		      } } }
 	| spar_rdf_literal		{ $$ = (SPART *)($1); }
 	| spar_numeric_literal		{ $$ = (SPART *)($1); }
 	| spar_boolean_literal		{ $$ = (SPART *)($1); }
 	| spar_blank_node
 	| spar_var
+	| spar_macro_call
 	;
 
 spar_built_in_call	/* [52]*	BuiltInCall	 ::=  */
-	: STR_L _LPAR spar_expn _RPAR		/*... ( 'STR' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)STR_L, t_list (1, $3)); }
+	: SPARQL_BIF spar_arg_list {
+		SPART **args = (SPART **)(((dk_set_t)NIL_L == $2) ? NULL : t_revlist_to_array ($2));
+		if ((SPAR_BIF_REGEX == $1) && (2 == BOX_ELEMENTS (args)))
+		  $$ = spar_make_regex_or_like_or_eq (sparp_arg, args[0], args[1]);
+		else
+		  $$ = sparp_make_builtin_call (sparp_arg, $1, args); }
+			/*... ( 'STR' '(' Expn ')' ) */
+			/*... | ( 'sameTERM' '(' Expn ',' Expn ')' ) */
+			/*... | ( 'isIRI' '(' Expn ')' ) */
+			/*... | ( 'isURI' '(' Expn ')' ) */
+			/*... | ( 'isBLANK' '(' Expn ')' ) */
+			/*... | ( 'isLITERAL' '(' Expn ')' ) */
+			/*... | ( 'REGEX' '(' Expn ',' Expn ( ',' Expn )? ')' ) */
+			/*... | ( 'isREF' '(' Expn ')' ) */
+			/*... | ( 'LANGMATCHES' '(' Expn ',' Expn ')' ) */
+			/*... | ( 'IF' '(' Expn ',' Expn ',' Expn ')' ) */
+			/*... | ( 'COALESCE' '(' Expn ( ',' Expn )* ')' ) */
+	| IRI_L _LPAR spar_expn _RPAR		/*... | ( 'IRI' '(' Expn ')' ) */
+		{ $$ = sparp_make_builtin_call (sparp_arg, IRI_L, (SPART **)t_list (1, $3)); }
 	| LANG_L _LPAR spar_expn _RPAR		/*... | ( 'LANG' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANG_L, t_list (1, $3)); }
-	| LANGMATCHES_L _LPAR spar_expn _COMMA spar_expn _RPAR	/*... | ( 'LANGMATCHES' '(' Expn ',' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)LANGMATCHES_L, t_list (2, $3, $5)); }
+		{ $$ = sparp_make_builtin_call (sparp_arg, LANG_L, (SPART **)t_list (1, $3)); }
 	| DATATYPE_L _LPAR spar_expn _RPAR	/*... | ( 'DATATYPE' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)DATATYPE_L, t_list (1, $3)); }
+		{ $$ = sparp_make_builtin_call (sparp_arg, DATATYPE_L, (SPART **)t_list (1, $3)); }
 	| BOUND_L _LPAR spar_var _RPAR		/*... | ( 'BOUND' '(' Var ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)BOUND_L, t_list (1, $3)); }
-	| SAMETERM_L _LPAR spar_expn _COMMA spar_expn _RPAR	/*... | ( 'sameTERM' '(' Expn ',' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)SAMETERM_L, t_list (2, $3, $5)); }
-	| isIRI_L _LPAR spar_expn _RPAR		/*... | ( 'isIRI' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isIRI_L, t_list (1, $3)); }
-	| isURI_L _LPAR spar_expn _RPAR		/*... | ( 'isURI' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isURI_L, t_list (1, $3)); }
-	| isBLANK_L _LPAR spar_expn _RPAR	/*... | ( 'isBLANK' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isBLANK_L, t_list (1, $3)); }
-	| isLITERAL_L _LPAR spar_expn _RPAR	/*... | ( 'isLITERAL' '(' Expn ')' ) */
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isLITERAL_L, t_list (1, $3)); }
-	| spar_built_in_regex		/*... | RegexExpn	*/
-	| IRI_L					/*... | ( 'IRI' '(' Expn ')' ) */
-		{ SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "IRI (built-in call)"); }
-	    _LPAR spar_expn _RPAR
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)IRI_L, t_list (1, $4)); }
-	| isREF_L				/*... | ( 'isREF' '(' Expn ')' ) */
-		{ SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_BI, "isREF (built-in call)"); }
-	    _LPAR spar_expn _RPAR
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)isREF_L, t_list (1, $4)); }
-	;
-
-spar_built_in_regex	/* [53]	RegexExpn	 ::=  'REGEX' '(' Expn ',' Expn ( ',' Expn )? ')'	*/
-	: REGEX_L _LPAR spar_expn _COMMA spar_expn _RPAR
-		{ $$ = spar_make_regex_or_like_or_eq (sparp_arg, $3, $5); }
-	| REGEX_L _LPAR spar_expn _COMMA spar_expn _COMMA spar_expn _RPAR
-		{ $$ = spartlist (sparp_arg, 3, SPAR_BUILT_IN_CALL, (ptrlong)REGEX_L, t_list (3, $3, $5, $7)); }
+		{ $$ = sparp_make_builtin_call (sparp_arg, BOUND_L, (SPART **)t_list (1, $3)); }
 	;
 
 spar_function_call	/* [54]	FunctionCall	 ::=  IRIref ArgList	*/
-	: spar_iriref spar_arg_list	{
-                  SPART **args = (SPART **)(((dk_set_t)NIL_L == $2) ? NULL : t_revlist_to_array ($2));
+	: spar_iriref {
+		SPART *mdef;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		mdef = spar_find_defmacro_by_iri_or_fields (sparp_arg, $1->_.lit.val, NULL);
+		$<token_type>$ = sparp_arg->sparp_macro_mode;
+		if (NULL != mdef)
+		  {
+		    if ((SPARP_DEFBODY & sparp_arg->sparp_macro_mode) && (sparp_arg->sparp_current_macro == mdef))
+		      sparyyerror ("The macro is recursively used in its own definition");
+		    sparp_arg->sparp_macro_mode |= SPARP_CALLARG;
+		  } }
+	    spar_arg_list	{
+		SPART **args = (SPART **)(((dk_set_t)NIL_L == $3) ? NULL : t_revlist_to_array ($3));
                   caddr_t fname = $1->_.lit.val;
+		if (sparp_arg->sparp_macro_mode & SPARP_CALLARG)
+		  {
+		    sparp_arg->sparp_macro_mode = $<token_type>2;
+		    $$ = sparp_make_macro_call (sparp_arg, fname, 1, args);
+		    if (!(sparp_arg->sparp_macro_mode & SPARP_DEFBODY))
+		      sparp_arg->sparp_macro_call_count++;
+		  }
+		else
+		  {
                   spar_verify_funcall_security (sparp_arg, fname, args);
-		  $$ = spar_make_funcall (sparp_arg, 0, fname, args); }
+		    $$ = spar_make_funcall (sparp_arg, 0, fname, args);
+		  } }
 	;
 
+spar_macro_call	/* [Virt]	MacroCall	 ::=  'MACRO' IRIref MacroArgList?	*/
+	: MACRO_L spar_iriref {
+		SPART *mdef;
+		if (!sparp_arg->sparp_storage_is_set)
+		  sparp_configure_storage_and_macro_libs (sparp_arg);
+		mdef = spar_find_defmacro_by_iri_or_fields (sparp_arg, $2->_.qname.val, NULL);
+		if (NULL == mdef)
+		  sparyyerror ("Undefined macro IRI");
+		if ((SPARP_DEFBODY & sparp_arg->sparp_macro_mode) && (sparp_arg->sparp_current_macro == mdef))
+		  sparyyerror ("The macro is recursively used in its own definition");
+		$<token_type>$ = sparp_arg->sparp_macro_mode;
+		sparp_arg->sparp_macro_mode |= SPARP_CALLARG; }
+	    spar_macro_arg_list_opt {
+		SPART **args = (SPART **)(((dk_set_t)NIL_L == $4) ? NULL : t_revlist_to_array ($4));
+		sparp_arg->sparp_macro_mode = $<token_type>3;
+		$$ = sparp_make_macro_call (sparp_arg, $2->_.qname.val, 1, args);
+		if (!(sparp_arg->sparp_macro_mode & SPARP_DEFBODY))
+		  sparp_arg->sparp_macro_call_count++;
+		 }
+	;
+
+
 spar_arg_list_opt	/* ::=  ArgList?	*/
 	: /* empty */			{ $$ = NULL; }
-	| spar_arg_list			{ $$ = $1; }
+	| spar_arg_list
 	;
 
-spar_arg_list		/* [56]*	ArgList	 ::=  ( NIL | '(' Expns ')' )	*/
+spar_arg_list		/* [56]*	ArgList	 ::=  '(' Expns? ')'	*/
 	: NIL_L				{ $$ = (dk_set_t)NIL_L; }
 	| _LPAR _RPAR			{ $$ = (dk_set_t)NIL_L; }
 	| _LPAR spar_expns _RPAR	{ $$ = $2; }
@@ -1585,6 +1912,31 @@ spar_expns		/* [Virt]	Expns	 ::=  Expn ( ',' Expn )*	*/
 	| spar_expns error { sparyyerror ("Comma or ')' expected after function argument"); }
 	;
 
+spar_macro_arg_list_opt	/* ::=  ArgList?	*/
+	: /* empty */			{ $$ = NULL; }
+	| spar_macro_arg_list
+	;
+
+spar_macro_arg_list		/* [Virt]	MacroArgList	 ::=  '(' ExpnOrGgps? ')'	*/
+	: NIL_L				{ $$ = (dk_set_t)NIL_L; }
+	| _LPAR _RPAR			{ $$ = (dk_set_t)NIL_L; }
+	| _LPAR spar_expn_or_ggps _RPAR	{ $$ = $2; }
+	;
+
+spar_expn_or_ggps		/* [Virt]	ExpnOrGgps	 ::=  ExpnOrGgp ( ',' ExpnOrGgp )*	*/
+	: spar_expn_or_ggp			{ $$ = NULL; t_set_push (&($$), $1); }
+	| spar_expn_or_ggps _COMMA spar_expn_or_ggp   { $$ = $1; t_set_push (&($$), $3); }
+	| spar_expn_or_ggps _COMMA error { sparyyerror ("Macro argument (an expression or a group pattern) expected after comma"); }
+	| spar_expn_or_ggps error { sparyyerror ("Comma or ')' expected after macro argument"); }
+	;
+
+spar_expn_or_ggp			/* [Virt]	ExpnOrGgp	 ::=  Expn | GroupGraphPattern	*/
+	: spar_expn
+	| _LBRA {
+	    spar_gp_init (sparp_arg, SPAR_MACROPU); }
+	    spar_gp _RBRA { $$ = spar_gp_finalize (sparp_arg, NULL); }
+	;
+
 spar_numeric_literal	/* [59]	NumericLiteral	 ::=  INTEGER | DECIMAL | DOUBLE	*/
 	: SPARQL_INTEGER	{ $$ = spartlist (sparp_arg, 4, SPAR_LIT, $1, uname_xmlschema_ns_uri_hash_integer, NULL); }
 	| SPARQL_DECIMAL	{ $$ = spartlist (sparp_arg, 4, SPAR_LIT, $1, uname_xmlschema_ns_uri_hash_decimal, NULL); }
@@ -1603,7 +1955,7 @@ spar_boolean_literal	/* [61]	BooleanLiteral	 ::=  'true' | 'false'	*/
 	;
 
 spar_iriref_or_star_or_default
-	: spar_iriref		{ $$ = $1; }
+	: spar_iriref
 	| _STAR			{ $$ = (SPART *)((ptrlong)_STAR); }
 	| DEFAULT_L		{ $$ = (SPART *)((ptrlong)DEFAULT_L); }
 	;
@@ -1631,7 +1983,7 @@ spar_arrow_iriref
 
 spar_iriref		/* [63]	IRIref		 ::=  Q_IRI_REF | QName	*/
 	: Q_IRI_REF		{ $$ = spartlist (sparp_arg, 2, SPAR_QNAME, sparp_expand_q_iri_ref (sparp_arg, $1)); }
-	| spar_qname		{ $$ = $1; }
+	| spar_qname
 	;
 
 spar_qname		/* [64]	QName		 ::=  QNAME | QNAME_NS	*/
@@ -1646,12 +1998,12 @@ spar_blank_node		/* [65]*	BlankNode	 ::=  BLANK_NODE_LABEL | ( '[' ']' )	*/
 
 /* PART 1a. SPARUL */
 
-spar_sparul_actions
-	: spar_sparul_action	{ $$ = NULL; t_set_push (&($$), $1); }
-	| spar_sparul_actions spar_sparul_action	{ $$ = $1; t_set_push (&($$), $2); }
+spar_sparul_action_or_drop_macro_libs
+	: spar_sparul_action_or_drop_macro_lib	{ $$ = NULL; t_set_push (&($$), $1); }
+	| spar_sparul_action_or_drop_macro_libs spar_sparul_action_or_drop_macro_lib	{ $$ = $1; t_set_push (&($$), $2); }
 	;
 
-spar_sparul_action		/* [DML]	SparulAction	 ::=  */
+spar_sparul_action_or_drop_macro_lib		/* [DML]	SparulAction	 ::=  */
 			/*... CreateAction | DropAction | LoadAction	*/
 			/*... | InsertAction | InsertDataAction | DeleteAction | DeleteDataAction	*/
 			/*... | ModifyAction | ClearAction	*/
@@ -1664,12 +2016,18 @@ spar_sparul_action		/* [DML]	SparulAction	 ::=  */
 	| spar_sparul_load
 	| spar_sparul_create
 	| spar_sparul_drop
+	| spar_drop_macro_lib
+	;
+
+spar_drop_macro_lib	/* [Virt]	DropMacroLib	 ::=  'DROP' 'SILENT'? 'MACRO' 'LIBRARY' PrecodeExpn	*/
+	: DROP_L spar_silent_opt MACRO_L LIBRARY_L spar_precode_expn {
+		$$ = spar_make_drop_macro_lib (sparp_arg, $5, $2 /* yes, $2 after $5 */); }
 	;
 
 spar_sparul_insert	/* [DML]*	InsertAction	 ::=  */
 			/*... 'INSERT' ( ( 'IN' | 'INTO ) 'GRAPH' ( 'IDENTIFIED' 'BY' )? )? PrecodeExpn	*/
 			/*... ConstructTemplate ( DatasetClause* WhereClause SolutionModifier )?	*/
-	: INSERT_L spar_in_graph_precode_opt {
+	: INSERT_L spar_in_graph_precode {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
             spar_ctor_template spar_action_solution {
@@ -1679,9 +2037,9 @@ spar_sparul_insert	/* [DML]*	InsertAction	 ::=  */
 	;
 
 spar_sparul_insertdata	/* [DML]*	InsertDataAction	 ::=  */
-			/*... 'INSERT' 'DATA' ( ( 'IN' | 'INTO ) 'GRAPH' ( 'IDENTIFIED' 'BY' )? )? */
-			/*... PrecodeExpn ConstructTemplate	*/
-	: INSERT_L DATA_L spar_in_graph_precode_opt {
+			/*... 'INSERT' 'DATA' ( ( ( 'IN' | 'INTO ) 'GRAPH' ( 'IDENTIFIED' 'BY' )? )? PrecodeExpn )? */
+			/*... ConstructTemplate	*/
+	: INSERT_L DATA_L spar_in_graph_precode {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
 		sparp_arg->sparp_in_precode_expn = 2; }
@@ -1696,7 +2054,7 @@ spar_sparul_insertdata	/* [DML]*	InsertDataAction	 ::=  */
 spar_sparul_delete	/* [DML]*	DeleteAction	 ::=  */
 			/*... 'DELETE' ( 'FROM' 'GRAPH' ( 'IDENTIFIED' 'BY' )? )? PrecodeExpn	*/
 			/*... ConstructTemplate ( DatasetClause* WhereClause SolutionModifier )?	*/
-	: DELETE_L spar_from_graph_precode_opt {
+	: DELETE_L spar_from_graph_precode {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
             spar_ctor_template spar_action_solution {
@@ -1706,9 +2064,9 @@ spar_sparul_delete	/* [DML]*	DeleteAction	 ::=  */
 	;
 
 spar_sparul_deletedata	/* [DML]*	DeleteDataAction	 ::=  */
-			/*... 'DELETE' 'DATA' ( 'FROM' 'GRAPH' ( 'IDENTIFIED' 'BY' )? )?	*/
-			/*... PrecodeExpn ConstructTemplate	*/
-	: DELETE_L DATA_L spar_from_graph_precode_opt {
+			/*... 'DELETE' 'DATA' ( ( 'FROM' 'GRAPH' ( 'IDENTIFIED' 'BY' )? )? PrecodeExpn	*/
+			/*... ConstructTemplate	*/
+	: DELETE_L DATA_L spar_from_graph_precode {
 		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
 		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL);
 		sparp_arg->sparp_in_precode_expn = 2; }
@@ -1721,7 +2079,7 @@ spar_sparul_deletedata	/* [DML]*	DeleteDataAction	 ::=  */
 	;
 
 spar_sparul_modify	/* [DML]*	ModifyAction	 ::=  */
-			/*... 'MODIFY' ( 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn?	*/
+			/*... 'MODIFY' (( 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn )?	*/
 			/*... 'DELETE' ConstructTemplate 'INSERT' ConstructTemplate	*/
 			/*... ( DatasetClause* WhereClause SolutionModifier )?	*/
 	: MODIFY_L spar_graph_precode_opt {
@@ -1734,16 +2092,17 @@ spar_sparul_modify	/* [DML]*	ModifyAction	 ::=  */
                 spar_compose_retvals_of_modify (sparp_arg, $$, $2, $5, $7); }
 	;
 
-spar_sparul_clear	/* [DML]*	ClearAction	 ::=  'CLEAR' ( 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn )?	*/
-	: CLEAR_L spar_graph_precode_opt { $$ = spar_make_sparul_clear (sparp_arg, $2); }
+spar_sparul_clear	/* [DML]*	ClearAction	 ::=  'CLEAR' 'SILENT'? DropTarget	*/
+	: CLEAR_L spar_silent_opt spar_all_or_named_or_default_or_graph_precode {
+		$$ = spar_make_sparul_clear (sparp_arg, $3, $2 /* yes, $2 after $3 */); }
 	;
 
-spar_sparul_load	/* [DML]*	LoadAction	 ::=  'LOAD' PrecodeExpn */
+spar_sparul_load	/* [DML]*	LoadAction	 ::=  'LOAD' 'SILENT'? PrecodeExpn */
 			/*... ( ( 'IN' | 'INTO' ) 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn )?	*/
-	: LOAD_L spar_precode_expn {
-		$$ = spar_make_sparul_load (sparp_arg, $2, $2); }
-	| LOAD_L spar_precode_expn spar_in_or_into spar_graph_identified_by_opt spar_precode_expn {
-		$$ = spar_make_sparul_load (sparp_arg, $5, $2 /* yes, $2 after $3 */); }
+	: LOAD_L spar_silent_opt spar_precode_expn {
+		$$ = spar_make_sparul_load (sparp_arg, $3, $3, $2); }
+	| LOAD_L spar_silent_opt spar_precode_expn spar_in_or_into spar_graph_identified_by_opt spar_precode_expn {
+		$$ = spar_make_sparul_load (sparp_arg, $6, $3 /* yes, $3 after $6 */, $2); }
 	;
 
 spar_sparul_create	/* [DML]*	CreateAction	 ::=  'CREATE' 'SILENT'? 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn	*/
@@ -1751,9 +2110,9 @@ spar_sparul_create	/* [DML]*	CreateAction	 ::=  'CREATE' 'SILENT'? 'GRAPH' ( 'ID
 		$$ = spar_make_sparul_create (sparp_arg, $4, $2 /* yes, $2 after $4 */); }
 	;
 
-spar_sparul_drop	/* [DML]*	DropAction	 ::=  'DROP' 'SILENT'? 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn	*/
-	: DROP_L spar_silent_opt spar_graph_identified_by spar_precode_expn {
-		$$ = spar_make_sparul_drop (sparp_arg, $4, $2 /* yes, $2 after $4 */); }
+spar_sparul_drop	/* [DML]*	DropAction	 ::=  'DROP' 'SILENT'? DropTarget	*/
+	: DROP_L spar_silent_opt spar_all_or_named_or_default_or_graph_precode {
+		$$ = spar_make_sparul_drop (sparp_arg, $3, $2 /* yes, $2 after $3 */); }
 	;
 
 spar_action_solution
@@ -1764,21 +2123,39 @@ spar_action_solution
 		$3->_.wm.where_gp = where_gp; }
 	;
 
-spar_in_graph_precode_opt
-	: /* empty */	{ $$ = spar_default_sparul_target (sparp_arg, "INTO GRAPH IDENTIFIED BY clause"); }
-	| spar_in_or_into spar_graph_identified_by_opt spar_precode_expn	{ $$ = $3; }
+spar_in_graph_precode
+	: spar_in_or_into spar_graph_identified_by_opt spar_precode_expn	{ $$ = $3; }
+	;
+
+spar_from_graph_precode
+	: FROM_L spar_graph_identified_by_opt spar_precode_expn	{ $$ = $3; }
+	;
+
+spar_all_or_named_or_default_or_graph_precode    /* [DML11]	DropTarget	 ::=  (( 'GRAPH' ( 'IDENTIFIED' 'BY' )? PrecodeExpn ) | 'DEFAULT' | 'NAMED' | 'ALL' )	*/
+	: ALL_L		{ $$ = (SPART *)ALL_L; }
+	| DEFAULT_L	{ $$ = (SPART *)DEFAULT_L; }
+	| NAMED_L	{ $$ = (SPART *)NAMED_L; }
+	| spar_graph_identified_by spar_precode_expn	{ $$ = $2; }
 	;
 
-spar_from_graph_precode_opt
-	: /* empty */	{ $$ = spar_default_sparul_target (sparp_arg, "FROM GRAPH IDENTIFIED BY clause"); }
-	| FROM_L spar_graph_identified_by_opt spar_precode_expn	{ $$ = $3; }
+spar_default_or_graph_precode
+	: DEFAULT_L	{ $$ = (SPART *)DEFAULT_L; }
+	| spar_graph_identified_by_opt spar_precode_expn	{ $$ = $2; }
 	;
 
 spar_graph_precode_opt
-	: /* empty */	{ $$ = spar_default_sparul_target (sparp_arg, "GRAPH IDENTIFIED BY clause"); }
+	: /* empty */	{ $$ = spar_default_sparul_target (sparp_arg, "GRAPH IDENTIFIED BY clause", 0); }
 	| spar_graph_identified_by_opt spar_precode_expn	{ $$ = $2; }
 	;
 
+spar_with_graph_precode_opt
+	: /* empty */	{}
+	| WITH_L spar_graph_identified_by_opt spar_precode_expn spar_sponge_optionlist_opt	{
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "WITH clause");
+		sparp_arg->sparp_env->spare_src.ssrc_graph_set_by_with = $3;
+		sparp_make_and_push_new_graph_source (sparp_arg, SPART_GRAPH_FROM, $3, $4); }
+	;
+
 spar_in_or_into
 	: IN_L		{}
 	| INTO_L	{}
@@ -1789,6 +2166,70 @@ spar_silent_opt
 	| SILENT_L	{ $$ = 1; }
 	;
 
+/* Part 1b. SPARQL 1.1 Update */
+
+spar_sparul11_action		/* [DML11]	Sparul11Action	 ::=  */
+			/*... | DeleteInsert11Action | Delete11Action	*/
+			/*... | Copy11Action | Move11Action | Add11Action	*/
+	: spar_sparul11_deleteinsert
+	| spar_sparul11_insert
+	| spar_sparul11_copymoveadd
+	;
+
+spar_sparul11_deleteinsert	/* [DML]*	DeleteInsert11Action	 ::=  */
+			/*... WithGraph?	*/
+			/*... 'DELETE' ConstructTemplate ( 'INSERT' ConstructTemplate )?	*/
+			/*... ( DatasetClause* WhereClause SolutionModifier )?	*/
+	: DELETE_L {
+		$<tree>$ = spar_default_sparul_target (sparp_arg, "SPARQL 1.1 DELETE clause", 1);
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+	    spar_ctor_template spar_sparul11_insert_opt
+	    spar_action_solution {
+		if (NULL != $4)
+		  {
+		    $$ = spar_make_top_or_special_case_from_wm (sparp_arg, MODIFY_L, NULL,
+		      spar_selid_pop (sparp_arg), $5 );
+		    spar_compose_retvals_of_modify (sparp_arg, $$, $<tree>2, $3, $4); }
+		else
+		  {
+		    $$ = spar_make_top_or_special_case_from_wm (sparp_arg, DELETE_L, NULL,
+		      spar_selid_pop (sparp_arg), $5 );
+		    spar_compose_retvals_of_insert_or_delete (sparp_arg, $$, $<tree>2, $3); } }
+	;
+
+spar_sparul11_insert	/* [DML]*	Insert11Action	 ::=  */
+			/*... WithGraph?	*/
+			/*... 'INSERT' ConstructTemplate	*/
+			/*... ( DatasetClause* WhereClause SolutionModifier )?	*/
+	: INSERT_L {
+		$<tree>$ = spar_default_sparul_target (sparp_arg, "SPARQL 1.1 INSERT clause", 1);
+		sparp_arg->sparp_env->spare_top_retval_selid = spar_selid_push (sparp_arg);
+		t_set_push (&(sparp_arg->sparp_env->spare_propvar_sets), NULL); }
+	    spar_ctor_template
+	    spar_action_solution {
+		$$ = spar_make_top_or_special_case_from_wm (sparp_arg, INSERT_L, NULL,
+		  spar_selid_pop (sparp_arg), $4 );
+		spar_compose_retvals_of_insert_or_delete (sparp_arg, $$, $<tree>2, $3); }
+	;
+
+spar_sparul11_insert_opt
+	: /* empty */	{ $$ = NULL; }
+	| INSERT_L spar_ctor_template	{ $$ = $2; }
+	;
+
+spar_sparul11_copymoveadd
+	: spar_sparul11_copymoveadd_op spar_silent_opt spar_default_or_graph_precode TO_L spar_default_or_graph_precode {
+		SPAR_ERROR_IF_UNSUPPORTED_SYNTAX (SSG_SD_SPARQL11, "WITH clause");
+		$$ = spar_make_sparul_copymoveadd (sparp_arg, $1, $3, $5, $2 /* yes, $2 after $3 */); }
+	;
+
+spar_sparul11_copymoveadd_op
+	: COPY_L	{ $$ = COPY_L; }
+	| MOVE_L	{ $$ = MOVE_L; }
+	| ADD_L		{ $$ = ADD_L; }
+	;
+
 /* PART 2. Quad Map definition statements */
 
 spar_qm_stmts		/* ::=  QmStmt ('.' QmStmt)* */
@@ -1805,100 +2246,82 @@ spar_qm_stmt		/* [Virt]	QmStmt		 ::=  QmSimpleStmt | QmCreateStorage | QmAlterSt
 	;
 
 spar_qm_simple_stmt	/* [Virt]	QmSimpleStmt	 ::=  */
-			/*... QmCreateIRIClass | QmCreateLiteralClass | QmDropIRIClass | QmDropLiteralClass	*/
+			/*... QmCreateIRIorLiteralClass | QmDropIRIorLiteralClass	*/
 			/*... | QmCreateIRISubclass | QmDropQuadStorage | QmDropQuadMap */
-	: spar_qm_create_iri_class
-	| spar_qm_create_literal_class
-	| spar_qm_drop_iri_class
-	| spar_qm_drop_literal_class
+	: spar_qm_create_iol_class
+	| spar_qm_drop_iol_class
 	| spar_qm_create_iri_subclass
 	| spar_qm_drop_quad_storage
 	| spar_qm_drop_quad_map_mapping
 	;
 
-spar_qm_create_iri_class	/* [Virt]	QmCreateIRIClass	 ::=  'CREATE' 'IRI' 'CLASS' QmIRIrefConst	*/
-			/*... ( ( String QmSqlfuncArglist )	*/
-			/*...| ( 'USING' QmSqlfuncHeader ',' QmSqlfuncHeader ) )	*/
-	: CREATE_L IRI_L CLASS_L spar_qm_iriref_const_expn SPARQL_STRING spar_qm_sqlfunc_arglist spar_qm_iri_class_optionlist_opt {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, $4, NULL))
-		  spar_error (sparp_arg, "The identifier of IRI class %.100s is already used in the previous part of the statement", $4);
-		t_set_push (&(sparp_arg->sparp_created_jsos), "IRI class");
-		t_set_push (&(sparp_arg->sparp_created_jsos), $4);
-		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT",
-		  (SPART **)t_list (3, $4, $5, $6), $7 );
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
-	| CREATE_L IRI_L CLASS_L spar_qm_iriref_const_expn USING_L spar_qm_sqlfunc_header_commalist spar_qm_iri_class_optionlist_opt {
+spar_qm_create_iol_class	/* [Virt]	QmCreateIRIorLiteralClass	 ::=  'CREATE' ( 'IRI' | 'LITERAL' ) 'CLASS' QmIRIrefConst	*/
+			/*... ( ( String QmSqlfuncArglist ) | ( 'USING' QmSqlfuncHeader ( ',' QmSqlfuncHeader )* ) )	*/
+			/*... QmIRIorLiteralClassOptions?	*/
+	: CREATE_L spar_iol CLASS_L spar_qm_iriref_const_expn SPARQL_STRING spar_qm_sqlfunc_arglist spar_qm_iol_class_optionlist_opt {
 		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, $4, NULL))
-		  spar_error (sparp_arg, "The identifier of IRI class %.100s is already used in the previous part of the statement", $4);
-		t_set_push (&(sparp_arg->sparp_created_jsos), "IRI class");
+		  spar_error (sparp_arg, "The identifier of %s class %.100s is already used in the previous part of the statement",
+		    ((IRI_L == $2) ? "IRI" : "literal"), $4);
+		t_set_push (&(sparp_arg->sparp_created_jsos), ((IRI_L == $2) ? "IRI class" : "literal class"));
 		t_set_push (&(sparp_arg->sparp_created_jsos), $4);
-		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS",
-		  (SPART **)t_list (2, $4, spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ($6))), $7 );
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
-	;
-
-spar_qm_create_literal_class	/* [Virt]	QmCreateLiteralClass	 ::=  'CREATE' 'LITERAL' 'CLASS' QmIRIrefConst	*/
-			/*... 'USING' QmSqlfuncHeader ',' QmSqlfuncHeader QmLiteralClassOptions?	*/
-	: CREATE_L LITERAL_L CLASS_L spar_qm_iriref_const_expn USING_L spar_qm_sqlfunc_header_commalist spar_qm_literal_class_optionlist_opt {
+		$$ = spar_make_qm_sql (sparp_arg,
+		  ((IRI_L == $2) ? "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT" : "DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT"),
+		  (SPART **)t_list (3, $4, $5, $6), $7 ); }
+	| CREATE_L spar_iol CLASS_L spar_qm_iriref_const_expn USING_L spar_qm_sqlfunc_header_commalist spar_qm_iol_class_optionlist_opt {
 		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, $4, NULL))
-		  spar_error (sparp_arg, "The identifier of literal class %.100s is already used in the previous part of the statement", $4);
-		t_set_push (&(sparp_arg->sparp_created_jsos), "literal class");
+		  spar_error (sparp_arg, "The identifier of %s class %.100s is already used in the previous part of the statement",
+		    ((IRI_L == $2) ? "IRI" : "literal"), $4);
+		t_set_push (&(sparp_arg->sparp_created_jsos), ((IRI_L == $2) ? "IRI class" : "literal class"));
 		t_set_push (&(sparp_arg->sparp_created_jsos), $4);
-		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS",
-		  (SPART **)t_list (2, $4, spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ($6))), $7 );
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		$$ = spar_make_qm_sql (sparp_arg,
+		  ((IRI_L == $2) ? "DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS" : "DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS"),
+		  (SPART **)t_list (2, $4, spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ($6))), $7 ); }
 	;
 
-spar_qm_drop_iri_class		/* [Virt]	QmDropIRIClass	 ::=  'DROP' 'SILENT'? 'IRI' 'CLASS' QmIRIrefConst	*/
-	: DROP_L spar_silent_opt IRI_L CLASS_L spar_qm_iriref_const_expn {
+spar_qm_drop_iol_class		/* [Virt]	QmDropIRIorLiteralClass	 ::=  'DROP' 'SILENT'? ( 'IRI' | 'LITERAL' ) 'CLASS' QmIRIrefConst	*/
+	: DROP_L spar_silent_opt spar_iol CLASS_L spar_qm_iriref_const_expn {
 		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, $5, NULL))
-		  spar_error (sparp_arg, "The identifier of IRI class %.100s is already used in the previous part of the statement", $5);
+		  spar_error (sparp_arg, "The identifier of %s class %.100s is already used in the previous part of the statement",
+		    ((IRI_L == $3) ? "IRI" : "literal"), $5);
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_CLASS",
 		  (SPART **)t_list (2, $5, $2 /* yes, $2 after $5 */), NULL );
-                sparp_jso_push_deleted (sparp_arg, uname_virtrdf_ns_uri_QuadMapFormat , $5);
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
-	;
-
-spar_qm_drop_literal_class		/* [Virt]	QmDropLiteralClass	 ::=  'DROP' 'SILENT'? 'LITERAL' 'CLASS' QmIRIrefConst	*/
-	: DROP_L spar_silent_opt LITERAL_L CLASS_L spar_qm_iriref_const_expn {
-		if (dk_set_get_keyword (sparp_arg->sparp_created_jsos, $5, NULL))
-		  spar_error (sparp_arg, "The identifier of literal class %.100s is already used in the previous part of the statement", $5);
-		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_CLASS",
-		  (SPART **)t_list (2, $5, $2 /* yes, $2 after $5 */), NULL );
-                sparp_jso_push_deleted (sparp_arg, uname_virtrdf_ns_uri_QuadMapFormat , $5);
-                sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		sparp_jso_push_deleted (sparp_arg, uname_virtrdf_ns_uri_QuadMapFormat , $5); }
 	;
 
 spar_qm_create_iri_subclass	/* [Virt]	QmCreateIRISubclass	 ::=  'IRI' 'CLASS' QmIRIrefConst 'SUBCLASS' 'OF' QmIRIrefConst	*/
 	: MAKE_L IRI_L CLASS_L spar_qm_iriref_const_expn SUBCLASS_L OF_L spar_qm_iriref_const_expn {
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_SUBCLASS",
-		  (SPART **)t_list (2, $4, $7), NULL );
-		sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		  (SPART **)t_list (2, $4, $7), NULL ); }
 	| MAKE_L spar_qm_iriref_const_expn SUBCLASS_L OF_L spar_qm_iriref_const_expn {
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DEFINE_SUBCLASS",
-		  (SPART **)t_list (2, $2, $5), NULL );
-		sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		  (SPART **)t_list (2, $2, $5), NULL ); }
 	;
 
-spar_qm_iri_class_optionlist_opt	/* [Virt]	QmIRIClassOptions	 ::=  'OPTION' '(' QmIRIClassOption (',' QmIRIClassOption)* ')'	*/
+spar_qm_iol_class_optionlist_opt	/* [Virt]	QmIRIorLiteralClassOptions	 ::=  'OPTION' '(' QmIRIorLiteralClassOption (',' QmIRIorLiteralClassOption)* ')'	*/
         : /* empty */		{ $$ = (SPART **)t_list (0); }
 	| OPTION_L _LPAR _RPAR	{ $$ = (SPART **)t_list (0); }
-	| OPTION_L _LPAR spar_qm_iri_class_option_commalist _RPAR	{ $$ = (SPART **)t_revlist_to_array ($3); }
+	| OPTION_L _LPAR spar_qm_iol_class_option_commalist _RPAR	{ $$ = (SPART **)t_revlist_to_array ($3); }
 	;
 
-spar_qm_iri_class_option_commalist
-	: spar_qm_iri_class_option	{
+spar_qm_iol_class_option_commalist
+	: spar_qm_iol_class_option	{
 		$$ = NULL;
 		t_set_push (&($$), $1[0]);
 		t_set_push (&($$), $1[1]); }
-	| spar_qm_iri_class_option_commalist _COMMA spar_qm_iri_class_option	{
+	| spar_qm_iol_class_option_commalist _COMMA spar_qm_iol_class_option	{
 		$$ = $1;
 		t_set_push (&($$), $3[0]);
 		t_set_push (&($$), $3[1]); }
 	;
 
-spar_qm_iri_class_option	/* [Virt]	QmIRIClassOption	 ::=  */
-	: BIJECTION_L		{			/*... 'BIJECTION'	*/
+spar_qm_iol_class_option	/* [Virt]	QmIRIorLiteralClassOption	 ::=  */
+	: DATATYPE_L spar_qm_iriref_const_expn	{	/*... ( 'DATATYPE' QmIRIrefConst )	*/
+		$$ = (SPART **)t_list (2, t_box_dv_uname_string ("DATATYPE"), t_box_dv_uname_string ($2)); }
+	| LANG_L SPARQL_STRING	{			/*... | ( 'LANG' STRING )	*/
+		$$ = (SPART **)t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ($2)); }
+	| LANG_L spar_qm_sql_id	{			/*... | ( 'LANG' STRING )	*/
+		$$ = (SPART **)t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ($2)); }
+	| BIJECTION_L		{			/*... | 'BIJECTION'	*/
 		$$ = (SPART **)t_list (2, t_box_dv_uname_string ("BIJECTION"), (ptrlong)1); }
 	| DEREF_L		{			/*... | 'DEREF'	*/
 		$$ = (SPART **)t_list (2, t_box_dv_uname_string ("DEREF"), (ptrlong)1); }
@@ -1912,39 +2335,6 @@ spar_qm_sprintff_list
 	| spar_qm_sprintff_list UNION_L SPARQL_STRING	{ $$ = $1; t_set_push (&($$), $3); }
 	;
 
-spar_qm_literal_class_optionlist_opt	/* [Virt]	QmLiteralClassOptions	 ::=  'OPTION' '(' QmLiteralClassOption (',' QmLiteralClassOption)* ')'	*/
-        : /* empty */		{ $$ = (SPART **)t_list (0); }
-	| OPTION_L _LPAR _RPAR	{ $$ = (SPART **)t_list (0); }
-	| OPTION_L _LPAR spar_qm_literal_class_option_commalist _RPAR	{ $$ = (SPART **)t_revlist_to_array ($3); }
-	;
-
-spar_qm_literal_class_option_commalist
-	: spar_qm_literal_class_option	{
-		$$ = NULL;
-		t_set_push (&($$), $1[0]);
-		t_set_push (&($$), $1[1]); }
-	| spar_qm_literal_class_option_commalist _COMMA spar_qm_literal_class_option	{
-		$$ = $1;
-		t_set_push (&($$), $3[0]);
-		t_set_push (&($$), $3[1]); }
-	;
-
-spar_qm_literal_class_option	/* [Virt]	QmLiteralClassOption	 ::=  */
-	: DATATYPE_L spar_qm_iriref_const_expn	{	/*... ( 'DATATYPE' QmIRIrefConst )	*/
-		$$ = t_list (2, t_box_dv_uname_string ("DATATYPE"), t_box_dv_uname_string ($2)); }
-	| LANG_L SPARQL_STRING	{			/*... | ( 'LANG' STRING )	*/
-		$$ = t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ($2)); }
-	| LANG_L spar_qm_sql_id	{			/*... | ( 'LANG' STRING )	*/
-		$$ = t_list (2, t_box_dv_uname_string ("LANG"), t_box_dv_uname_string ($2)); }
-	| BIJECTION_L		{			/*... | 'BIJECTION'	*/
-		$$ = t_list (2, t_box_dv_uname_string ("BIJECTION"), (ptrlong)1); }
-	| DEREF_L		{			/*... | 'DEREF'	*/
-		$$ = t_list (2, t_box_dv_uname_string ("DEREF"), (ptrlong)1); }
-	| RETURNS_L spar_qm_sprintff_list	{			/*... | 'RETURNS' STRING ('UNION' STRING)*	*/
-		$$ = t_list (2, t_box_dv_uname_string ("RETURNS"),
-		    spar_make_vector_qm_sql (sparp_arg, (SPART **)t_revlist_to_array ($2)) ); }
-	;
-
 spar_qm_create_quad_storage	/* [Virt]	QmCreateStorage	 ::=  'CREATE' 'QUAD' 'STORAGE' QmIRIrefConst QmSourceDecl* QmMapTopGroup	*/
 	: CREATE_L QUAD_L STORAGE_L spar_qm_iriref_const_expn {
 		sparp_env()->spare_storage_name = $4;
@@ -1970,6 +2360,11 @@ spar_qm_create_quad_storage	/* [Virt]	QmCreateStorage	 ::=  'CREATE' 'QUAD' 'STO
 		sparp_env()->spare_storage_name = NULL; }
         ;
 
+spar_iol
+	: IRI_L		{ $$ = IRI_L; }
+	| LITERAL_L	{ $$ = LITERAL_L; }
+	;
+
 spar_qm_alter_quad_storage	/* [Virt]	QmAlterStorage	 ::=  'ALTER' 'QUAD' 'STORAGE' QmIRIrefConst QmSourceDecl* QmMapTopGroup	*/
 	: ALTER_L QUAD_L STORAGE_L spar_qm_iriref_const_expn {
 		sparp_env()->spare_storage_name = $4;
@@ -2004,14 +2399,14 @@ spar_qm_drop_quad_map_mapping		/* [Virt]	QmDropQuadMap	 ::=  'DROP' 'SILENT'? 'Q
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                   (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		  (SPART **)t_list (4, t_box_dv_uname_string ("ID"), $5, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ($2)) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
 	| DROP_L spar_silent_opt QUAD_L MAP_L spar_graph_identified_by spar_qm_iriref_const_expn	{
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                     (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		    (SPART **)t_list (4, t_box_dv_uname_string ("GRAPH"), $6, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ($2)) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
         ;
 
 spar_qm_drop_mapping		/* [Virt]	QmDrop	 ::=  'DROP' 'SLIENT'? ('GRAPH' ('IDENTIFIED' 'BY')?)? QmIRIrefConst	*/
@@ -2019,26 +2414,30 @@ spar_qm_drop_mapping		/* [Virt]	QmDrop	 ::=  'DROP' 'SLIENT'? ('GRAPH' ('IDENTIF
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                   (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		  (SPART **)t_list (4, t_box_dv_uname_string ("ID"), $3, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ($2)) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
 	| DROP_L spar_silent_opt spar_graph_identified_by spar_qm_iriref_const_expn	{
 		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DROP_MAPPING",
                     (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
 		    (SPART **)t_list (4, t_box_dv_uname_string ("GRAPH"), $4, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ($2)) );
-		if (NULL == sparp_env()->spare_storage_name)
-                  sparp_jso_push_affected (sparp_arg, uname_virtrdf_ns_uri_QuadStorage); }
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
         ;
 
 spar_qm_from_where_list_opt	/* [Virt]	QmSourceDecl	 ::=  */
 	: /* empty */ {}
 	| spar_qm_from_where_list_opt FROM_L SPARQL_SQL_QTABLENAME AS_L SPARQL_PLAIN_ID {	/*... ( 'FROM' QTABLE 'AS' PLAIN_ID QmTextLiteral* )	*/
-		spar_qm_add_aliased_table (sparp_arg, $3, $5);
+		spar_qm_add_aliased_table_or_sqlquery (sparp_arg, $3, $5);
 		sparp_env()->spare_qm_current_table_alias = $5; }
 	    spar_qm_text_literal_list_opt {
 		sparp_env()->spare_qm_current_table_alias = NULL; }
 	| spar_qm_from_where_list_opt FROM_L SPARQL_PLAIN_ID AS_L SPARQL_PLAIN_ID {		/*... | ( 'FROM' PLAIN_ID 'AS' PLAIN_ID QmTextLiteral* )	*/
 		spar_qm_add_aliased_alias (sparp_arg, $3, $5);
 		sparp_env()->spare_qm_current_table_alias = $5; }
+	| spar_qm_from_where_list_opt FROM_L SQLQUERY_L spar_qm_sqlquery AS_L SPARQL_PLAIN_ID {		/*... | ( 'FROM' 'SQLQUERY' QmSqlQuery 'AS' PLAIN_ID QmTextLiteral* )	*/
+		caddr_t qry = t_box_sprintf (100 + strlen($4), "/*???*/ %s", $4);
+		spar_qm_add_aliased_table_or_sqlquery (sparp_arg, qry, $6);
+		sparp_env()->spare_qm_current_table_alias = $6; }
 	    spar_qm_text_literal_list_opt {
 		sparp_env()->spare_qm_current_table_alias = NULL; }
 	| spar_qm_from_where_list_opt spar_qm_where {						/*... | QmCondition	*/
@@ -2051,7 +2450,7 @@ spar_qm_text_literal_list_opt
 	;
 
 spar_qm_text_literal_decl	/* [Virt]	QmTextLiteral	 ::=  'TEXT' 'XML'? 'LITERAL' QmSqlCol ( 'OF' QmSqlCol )? QmTextLiteralOptions? 	*/
-	: TEXT_BL spar_xml_opt LITERAL_L spar_qm_sqlcol spar_of_sqlcol_opt spar_qm_text_literal_options_opt {
+	: TEXT_L spar_xml_opt LITERAL_L spar_qm_sqlcol spar_of_sqlcol_opt spar_qm_text_literal_options_opt {
 		spar_qm_add_text_literal (sparp_arg,
 		  sparp_env()->spare_qm_current_table_alias,
 		  $2, $4, $5, $6 ); }
@@ -2059,7 +2458,7 @@ spar_qm_text_literal_decl	/* [Virt]	QmTextLiteral	 ::=  'TEXT' 'XML'? 'LITERAL'
 
 spar_xml_opt
 	: /* empty */ { $$ = NULL; }
-	| XML_BL { $$ = $1; }
+	| XML_L { $$ = (caddr_t)((ptrlong)(XML_L)); }
 	;
 
 spar_of_sqlcol_opt
@@ -2102,12 +2501,40 @@ spar_qm_map_top_dotlist	/* ::=  QmMapTopOp ( '.' QmMapTopOp )*	*/
 	    spar_qm_map_top_op {}
 	;
 
-spar_qm_map_top_op		/* [Virt]	QmMapTopOp	 ::=  QmMapOp | QmDropQuadMap | QmDrop	*/
+spar_qm_map_top_op		/* [Virt]	QmMapTopOp	 ::=  QmMapOp | QmDropQuadMap | QmDrop | QmAttachMacroLib | QmDetachMacroLib	*/
 	: spar_qm_map_op
 	| spar_qm_drop_mapping {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls), $1); }
 	| spar_qm_drop_quad_map_mapping {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls), $1); }
+	| spar_qm_attach_macro_lib {
+		t_set_push (&(sparp_env()->spare_acc_qm_sqls), $1); }
+	| spar_qm_detach_macro_lib {
+		t_set_push (&(sparp_env()->spare_acc_qm_sqls), $1); }
+	;
+
+spar_qm_attach_macro_lib		/* [Virt]	QmAttachMacroLib	 ::=  'ATTACH' 'MACRO' 'LIBRARY' QmIRIrefConst	*/
+	: ATTACH_L MACRO_L LIBRARY_L spar_qm_iriref_const_expn	{
+		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_ATTACH_MACRO_LIBRARY",
+		  (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
+		  (SPART **)t_list (2, t_box_dv_uname_string ("ID"), $4) );
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
+	;
+
+spar_qm_detach_macro_lib		/* [Virt]	QmDetachMacroLib	 ::=  'DETACH' 'SILENT'? 'MACRO' 'LIBRARY' QmIRIrefConst?	*/
+	: DETACH_L spar_silent_opt MACRO_L LIBRARY_L spar_qm_iriref_const_expn	{
+		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY",
+		  (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
+		  (SPART **)t_list (4, t_box_dv_uname_string ("ID"), $5, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ($2)) );
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
+	| DETACH_L spar_silent_opt MACRO_L LIBRARY_L	{
+		$$ = spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY",
+		  (SPART **)t_list (1, t_box_copy (sparp_env()->spare_storage_name)),
+		  (SPART **)t_list (2, t_box_dv_uname_string ("SILENT"), (SPART *)t_box_num_nonull ($2)) );
+		if (NULL != sparp_env()->spare_storage_name)
+		  sparp_jso_push_affected (sparp_arg, sparp_env()->spare_storage_name); }
 	;
 
 spar_qm_map_group		/* [Virt]	QmMapGroup	 ::=  '{' QmMapOp ( '.' QmMapOp )* '.'? '}'	*/
@@ -2134,14 +2561,14 @@ spar_qm_map_op			/* [Virt]	QmMapOp		 ::=  */
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_ATTACH_MAPPING",
                     (SPART **)t_list (2, t_box_copy (sparp_env()->spare_storage_name), $5),
-		    (SPART **)t_list_concat ((caddr_t)$6, (caddr_t)t_list (2, t_box_dv_uname_string ("ID"), $2)) ) ); }
+		    t_spartlist_concat ($6, (SPART **)t_list (2, t_box_dv_uname_string ("ID"), $2)) ) ); }
 	| CREATE_L spar_graph_identified_by spar_qm_iriref_const_expn	/* note optional 'GRAPH' in previous case */
 	    USING_L STORAGE_L spar_qm_iriref_const_expn spar_qm_options_opt	{
 		spar_qm_push_local (sparp_arg, GRAPH_L, (SPART *)($3), 1);
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
 		  spar_make_qm_sql (sparp_arg, "DB.DBA.RDF_QM_ATTACH_MAPPING",
                     (SPART **)t_list (2, t_box_copy (sparp_env()->spare_storage_name), $6),
-		    (SPART **)t_list_concat ((caddr_t)$7, (caddr_t)t_list (2, t_box_dv_uname_string ("GRAPH"), $3)) ) ); }
+		    t_spartlist_concat ($7, (SPART **)t_list (2, t_box_dv_uname_string ("GRAPH"), $3)) ) ); }
 	| spar_qm_named_fields spar_qm_options_opt	/*... | ( QmNamedField+ QmOptions? QmMapGroup )	*/
 	    _LBRA {
 		t_set_push (&(sparp_env()->spare_acc_qm_sqls),
@@ -2268,20 +2695,20 @@ spar_qm_obj_language_opt
 	;
 
 spar_qm_verb		/* [Virt]	QmVerb		 ::=  QmField | ( '[' ']' ) | 'a'	*/
-	: spar_qm_field	{ $$ = $1; }
+	: spar_qm_field
 	| _LSQBRA _RSQBRA	{ $$ = NULL; }
 	| a_L			{ $$ = (SPART *)uname_rdf_ns_uri_type; }
 	;
 
 spar_qm_field_or_blank	/* [Virt]	QmFieldOrBlank	 ::=  QmField | ( '[' ']' )	*/
-	: spar_qm_field	{ $$ = $1; }
+	: spar_qm_field
 	| _LSQBRA _RSQBRA	{ $$ = NULL; }
 	;
 
 spar_qm_field		/* [Virt]	QmField		 ::=  */
 	: spar_qm_iriref_const_expn { $$ = (SPART *)$1; }	/* see case below */
-	| spar_numeric_literal { $$ = $1; }	/*... NumericLiteral	*/
-	| spar_rdf_literal { $$ = $1; }		/*... | RdfLiteral	*/
+	| spar_numeric_literal			/*... NumericLiteral	*/
+	| spar_rdf_literal			/*... | RdfLiteral	*/
 	| spar_qm_iriref_const_expn		/*... | ( QmIRIrefConst ( '(' ( QmSqlCol ( ',' QmSqlCol )* )? ')' )? )	*/
 	    _LPAR spar_qm_sqlcol_commalist_opt _RPAR {
 		$$ = spar_make_qm_value (sparp_arg, $1, (SPART **)t_revlist_to_array ($3)); }
@@ -2291,7 +2718,7 @@ spar_qm_field		/* [Virt]	QmField		 ::=  */
 
 spar_qm_where_list_opt
 	: /* empty */ { $$ = NULL; }
-        | spar_qm_where_list { $$ = $1; }
+	| spar_qm_where_list
 	;
 
 spar_qm_where_list
@@ -2300,10 +2727,15 @@ spar_qm_where_list
 	;
 
 spar_qm_where	/* [Virt]	QmCondition	 ::=  'WHERE' ( ( '(' SQLTEXT ')' ) | String )	*/
-	: WHERE_L _LPAR SPARQL_CONDITION_AFTER_WHERE_LPAR { $$ = $3; }
+	: WHERE_L _LPAR SPARQL_SQLTEXT { $$ = $3; }
 	| WHERE_L SPARQL_STRING { $$ = $2; }
 	;
 
+spar_qm_sqlquery	/* [Virt]	QmSqlQuery	 ::=  ( '(' SQLTEXT ')' ) | String	*/
+	: _LPAR SPARQL_SQLTEXT { $$ = $2; }
+	| SPARQL_STRING { $$ = $1; }
+	;
+
 spar_qm_options_opt	/* [Virt]	QmOptions	 ::=  'OPTION' '(' QmOption ( ',' QmOption )* ')'	*/
 	: /* empty */	{ $$ = (SPART **)t_list (0); }
 	| OPTION_L _LPAR _RPAR	{ $$ = (SPART **)t_list (0); }
@@ -2330,7 +2762,7 @@ spar_qm_option		/* [Virt]	QmOption	 ::=  ( 'SOFT'? 'EXCLUSIVE' ) | ( 'ORDER' INT
 
 spar_qm_sqlcol_commalist_opt	/* ::=  ( QmSqlCol ( ',' QmSqlCol )* )?	*/
 	: /* empty */			{ $$ = NULL; }
-	| spar_qm_sqlcol_commalist	{ $$ = $1; }
+	| spar_qm_sqlcol_commalist
 	;
 
 spar_qm_sqlcol_commalist	/* ::=  QmSqlCol ( ',' QmSqlCol )*	*/
@@ -2355,7 +2787,7 @@ spar_qm_sqlfunc_arglist	/* [Virt]	QmSqlfuncArglist	 ::=  '(' ( QmSqlfuncArg ( ',
 
 spar_qm_sqlfunc_arg_commalist_opt	/* ::=  ( QmSqlfuncArg ( ',' QmSqlfuncArg )* )?	*/
 	: /* empty */				{ $$ = NULL; }
-	| spar_qm_sqlfunc_arg_commalist		{ $$ = $1; }
+	| spar_qm_sqlfunc_arg_commalist
 	;
 
 spar_qm_sqlfunc_arg_commalist	/* ::=  QmSqlfuncArg ( ',' QmSqlfuncArg )*	*/
@@ -2386,10 +2818,10 @@ spar_qm_sqlcol		/* [Virt]	QmSqlCol	 ::=  QmSqlId | spar_qm_sql_id	*/
 	;
 
 spar_qm_sql_id		/* [Virt]	QmSqlId		 ::=  PLAIN_ID | 'TEXT' | 'XML'	*/
-	: SPARQL_PLAIN_ID		{ $$ = $1; }
-	| TEXT_BL			{ $$ = $1; }
-	| XML_BL			{ $$ = $1; }
-	/*| a_L { $$ = t_box_dv_short_string ("a"); }*/
+	: SPARQL_PLAIN_ID
+	| TEXT_L	{ $$ = t_box_dv_short_string ("TEXT"); }
+	| XML_L		{ $$ = t_box_dv_short_string ("XML"); }
+	/*| a_L		{ $$ = t_box_dv_short_string ("a"); }*/
 	;
 
 spar_qm_iriref_const_expn	/* [Virt]	QmIRIrefConst	 ::=  IRIref | ( 'IRI' '(' String ')' )	*/
diff --git a/libsrc/Wi/sparql_qm.c b/libsrc/Wi/sparql_qm.c
index 21cf095..155ba55 100644
--- a/libsrc/Wi/sparql_qm.c
+++ b/libsrc/Wi/sparql_qm.c
@@ -1,14 +1,14 @@
 /*
  *  sparql_qm.c
  *
- *  $Id: sparql_qm.c,v 1.13.2.2 2009/06/17 09:43:49 source Exp $
+ *  $Id: sparql_qm.c,v 1.13.2.4 2012/03/08 12:55:36 source Exp $
  *
  *  Quad map description language extension for SPARQL
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -181,7 +181,7 @@ sparp_make_qm_sqlcol (sparp_t *sparp, ptrlong type, caddr_t name)
     case SPARQL_PLAIN_ID:
       prefix = sparp->sparp_env->spare_qm_current_table_alias;
       if (NULL != prefix)
-        aliased_table = spar_qm_find_base_table (sparp, prefix);
+        aliased_table = spar_qm_find_base_table_or_sqlquery (sparp, prefix);
       else
         aliased_table = sparp->sparp_env->spare_qm_default_table;
       if (NULL == aliased_table)
@@ -196,7 +196,7 @@ sparp_make_qm_sqlcol (sparp_t *sparp, ptrlong type, caddr_t name)
       {
         if (NULL == right_dot)
           spar_internal_error (sparp, "sparp_" "make_qm_sqlcol(): no dot in SPARQL_SQL_ALIASCOLNAME");
-        aliased_table = spar_qm_find_base_table (sparp, prefix);
+        aliased_table = spar_qm_find_base_table_or_sqlquery (sparp, prefix);
         if (NULL == aliased_table)
           spar_error (sparp, "Undefined table alias %.100s in SQL column name %.100s", prefix, name);
         return spartlist (sparp, 4, SPAR_SQLCOL, aliased_table, prefix, t_box_dv_short_string (right_dot+1));
@@ -210,8 +210,9 @@ sparp_make_qm_sqlcol (sparp_t *sparp, ptrlong type, caddr_t name)
         if (NULL == sparp->sparp_env->spare_qm_default_table)
           sparp->sparp_env->spare_qm_default_table = prefix;
         else if (strcmp (sparp->sparp_env->spare_qm_default_table, prefix))
-          spar_error (sparp, "Table name %.100s of column %.100s does not match previously set default table name %.100s; consider using aliases",
-            prefix, name, sparp->sparp_env->spare_qm_default_table );
+          spar_error (sparp, "%.100s of column %.100s does not match previously set default %.100s; consider using aliases",
+            spar_qm_table_or_sqlquery_report_name (prefix), name,
+            spar_qm_table_or_sqlquery_report_name (sparp->sparp_env->spare_qm_default_table) );
         return spartlist (sparp, 4, SPAR_SQLCOL,
           sparp->sparp_env->spare_qm_default_table, NULL, t_box_dv_short_string (right_dot+1) );
       }
@@ -303,13 +304,21 @@ end_of_free_text: ;
 }
 
 caddr_t
+spar_qm_table_or_sqlquery_report_name (caddr_t atbl)
+{
+  if (!SPAR_TABLE_IS_SQLQUERY(atbl))
+    return t_box_sprintf (500, "table %.300s", atbl);
+  return t_box_sprintf (500, "SQL query at %.100s", SPAR_SQLQUERY_PLACE(atbl));
+}
+
+caddr_t
 spar_qm_find_base_alias (sparp_t *sparp, caddr_t descendant_alias)
 {
   dk_set_t p_a = sparp->sparp_env->spare_qm_parent_aliases_of_aliases;
   caddr_t curr = descendant_alias;
   for (;;)
     {
-      caddr_t prev = dk_set_get_keyword (p_a, curr, NULL);
+      caddr_t prev = (caddr_t)dk_set_get_keyword (p_a, curr, NULL);
       if (NULL == prev)
         break;
       curr = prev;
@@ -359,11 +368,11 @@ cond_is_redundant: ;
 }
 
 caddr_t
-spar_qm_find_base_table (sparp_t *sparp, caddr_t descendant_alias)
+spar_qm_find_base_table_or_sqlquery (sparp_t *sparp, caddr_t descendant_alias)
 {
   dk_set_t p_t = sparp->sparp_env->spare_qm_parent_tables_of_aliases;
   caddr_t base_alias = spar_qm_find_base_alias (sparp, descendant_alias);
-  caddr_t t = dk_set_get_keyword (p_t, (NULL == base_alias) ? descendant_alias : base_alias, NULL);
+  caddr_t t = (caddr_t) dk_set_get_keyword (p_t, (NULL == base_alias) ? descendant_alias : base_alias, NULL);
   return t;
 }
 
@@ -376,12 +385,13 @@ spar_qm_find_descendants_of_alias (sparp_t *sparp, caddr_t base_alias)
 }
 
 void
-spar_qm_add_aliased_table (sparp_t *sparp, caddr_t parent_qtable, caddr_t new_alias)
+spar_qm_add_aliased_table_or_sqlquery (sparp_t *sparp, caddr_t parent_qtable, caddr_t new_alias)
 {
   dk_set_t *atables_ptr = &(sparp->sparp_env->spare_qm_parent_tables_of_aliases);
-  caddr_t prev_use = spar_qm_find_base_table (sparp, new_alias);
+  caddr_t prev_use = spar_qm_find_base_table_or_sqlquery (sparp, new_alias);
   if (NULL != prev_use)
-    spar_error (sparp, "Alias %.100s is in use already (table %.200s above)", new_alias, prev_use);
+    spar_error (sparp, "Alias %.100s is in use already for %.500s",
+      new_alias, spar_qm_table_or_sqlquery_report_name (prev_use) );
   t_set_push (atables_ptr, parent_qtable);
   t_set_push (atables_ptr, new_alias);
 }
@@ -391,12 +401,13 @@ spar_qm_add_aliased_alias (sparp_t *sparp, caddr_t parent_alias, caddr_t new_ali
 {
   dk_set_t *parent_aliases_ptr = &(sparp->sparp_env->spare_qm_parent_aliases_of_aliases);
   dk_set_t *desc_aliases_ptr = &(sparp->sparp_env->spare_qm_descendants_of_aliases);
-  caddr_t prev_use = spar_qm_find_base_table (sparp, new_alias);
+  caddr_t prev_use = spar_qm_find_base_table_or_sqlquery (sparp, new_alias);
   caddr_t curr;
-  if (NULL == spar_qm_find_base_table (sparp, parent_alias))
+  if (NULL == spar_qm_find_base_table_or_sqlquery (sparp, parent_alias))
     spar_error (sparp, "Alias %.100s is not defined", parent_alias);
   if (NULL != prev_use)
-    spar_error (sparp, "Alias %.100s is in use already (table %.200s above)", new_alias, prev_use);
+    spar_error (sparp, "Alias %.100s is in use already for %.500s", new_alias,
+      spar_qm_table_or_sqlquery_report_name (prev_use) );
   t_set_push (parent_aliases_ptr, parent_alias);
   t_set_push (parent_aliases_ptr, new_alias);
 /* Now we register \c new alias as a descendant of \c parent_alias and all ancestors of \c parent_alias */
@@ -581,10 +592,11 @@ spar_qm_get_atables_and_aliases (sparp_t *sparp, caddr_t qm_id, caddr_t alias, c
       t_set_push (map_atables_ret, atbl);
       t_set_push (map_atables_ret, alias);
       t_set_push (map_aliases_ret, alias);
+      return;
     }
-  else if (strcmp (old_atbl, atbl))
-    spar_error (sparp, "One alias %.100s is used for different tables (%.300s and %.300s) in two different quad map values of the quad map pattern <%.300s>",
-      alias, atbl, old_atbl, qm_id );
+  if (strcmp (old_atbl, atbl))
+    spar_error (sparp, "One alias %.100s is used for %.300s and %.300s in two different quad map values of the quad map pattern <%.300s>",
+      alias, spar_qm_table_or_sqlquery_report_name(atbl), spar_qm_table_or_sqlquery_report_name (old_atbl), qm_id );
 }
 
 
@@ -694,9 +706,9 @@ spar_qm_make_mapping_impl (sparp_t *sparp, int is_real, caddr_t qm_id, SPART **o
       all_atables = sub_atables;
       DO_SET (caddr_t, extra_alias, &extra_aliases)
         {
-          caddr_t atbl = spar_qm_find_base_table (sparp, extra_alias);
+          caddr_t atbl = spar_qm_find_base_table_or_sqlquery (sparp, extra_alias);
           if (0 <= dk_set_position_of_string (map_aliases, extra_alias))
-            spar_error (sparp, "Alias names occurs in 'option (using %.100s)' and in some value of the quad map pattern", extra_alias);
+            spar_error (sparp, "Alias name occurs in 'option (using %.100s)' and in some value of the quad map pattern", extra_alias);
           spar_qm_get_atables_and_aliases (sparp, qm_id, extra_alias, atbl, &all_atables, &map_aliases);
         }
       END_DO_SET()
diff --git a/libsrc/Wi/sparql_rdb2rdf.c b/libsrc/Wi/sparql_rdb2rdf.c
index 22448c1..ec4ad02 100644
--- a/libsrc/Wi/sparql_rdb2rdf.c
+++ b/libsrc/Wi/sparql_rdb2rdf.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: sparql_rdb2rdf.c,v 1.1.2.2 2010/11/23 19:28:25 source Exp $
+ *  $Id: sparql_rdb2rdf.c,v 1.1.2.5 2012/03/08 12:55:36 source Exp $
  *
  *  Code genration for triggers that update native RDF data on changes in relational sources
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -57,7 +57,7 @@ If quad map value is specified but not a constant then there's no need to rememb
 
 typedef struct rdb2rdf_blocker_s {
     struct rdb2rdf_blocker_s *rrb_next;			/*!< Next item in list */
-    ccaddr_t rrb_const_vals[SPART_TRIPLE_FIELDS_COUNT];	/*!< Field values */
+    ccaddr_t rrb_const_vals[SPART_TRIPLE_FIELDS_COUNT];	/*!< Field values. No graph translation here, otherwise xlat can merge merge an exclusive graph is merged with non-exclusive */
     int rrb_total_eclipse;				/*!< Nonzero if total eclipse so no further scan required. For debugging, bits 0x1-0x8 indicate positions of non-constant quad map values */
   } rdb2rdf_blocker_t;
 
@@ -94,6 +94,8 @@ typedef struct rdb2rdf_ctx_s {
     dk_set_t			rrc_qm_revlist;	/*!< Accumulator to build \c rrc_all_qms */
     quad_map_t **		rrc_all_qms;	/*!< List of all quad maps of the storage (first */
     char **		rrc_conflicts_of_qms;	/*!< Matrix of RDB2RDF_QMQM_xxx values, one row per quad map (same order as in \c rrc_all_qms), one item per qm-to-qm relation */
+    caddr_t *			rrc_graph_xlat;	/*!< An get_keyword style array of strings; constant graph of RDF View as a key, replacement graph of the dump as a value. Can be NULL. */
+    int			rrc_graph_xlat_count;	/*!< Count of strings (not count of pairs) in rrc_graph_xlat */
     int			rrc_rule_id_seed;	/*!< Value for RULE_ID field of RDF_QUAD_DELETE_QUEUE */
     int				rrc_rule_count;	/*!< Count of rules, if zero then "after delete" code is not needed. */
     sparp_t			rrc_sparp_stub;	/*!< Stub for use its auto-initializable fields in sparp_rvr_intersect_sprintffs() and the like */
@@ -181,6 +183,21 @@ rdb2rdf_pop_rrvs_stack (rdb2rdf_ctx_t *rrc, int expects_empty_after)
    }
 }
 
+void
+rrc_tweak_const_with_graph_xlat (rdb2rdf_ctx_t *rrc, ccaddr_t *fld_const_ptr)
+{
+  int idx;
+  if (NULL == fld_const_ptr[0])
+    return;
+  if (DV_UNAME != DV_TYPE_OF (fld_const_ptr[0]))
+    sqlr_new_error ("22023", "SR637", "A quad map has constant graph that is not an IRI");
+  idx = ecm_find_name (fld_const_ptr[0], rrc->rrc_graph_xlat, rrc->rrc_graph_xlat_count/2, 2 * sizeof (caddr_t));
+  if (0 <= idx)
+    fld_const_ptr[0] = rrc->rrc_graph_xlat [2*idx + 1];
+}
+
+/*! Returns 1 if quad map \c qm does not use table \c table_name in any alias that is keyrefd by resulting quad.
+If 1 is returned then removal of a row in table does not automatically mean removal of some quad made from that row before */
 int
 rdb2rdf_qm_is_self_multi (quad_map_t *qm, ccaddr_t table_name)
 {
@@ -388,15 +405,26 @@ rdb2rdf_calculate_qmqm (rdb2rdf_ctx_t *rrc, rdb2rdf_optree_t *main_optree, int o
 /* Optimistic loop */
   for (fld_ctr = 0; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
     {
-      ccaddr_t main_fld_const = SPARP_FIELD_CONST_OF_QM(main_qm,fld_ctr);
-      ccaddr_t other_fld_const = SPARP_FIELD_CONST_OF_QM(other_qm,fld_ctr);
-      if ((NULL != main_fld_const) && (NULL != other_fld_const))
+      ccaddr_t main_fld_const, other_fld_const;
+      dtp_t fld_const_dtp;
+      main_fld_const = SPARP_FIELD_CONST_OF_QM(main_qm,fld_ctr);
+      if (NULL == main_fld_const)
+        continue;
+      other_fld_const = SPARP_FIELD_CONST_OF_QM(other_qm,fld_ctr);
+      if (NULL == other_fld_const)
+        continue;
+      fld_const_dtp = DV_TYPE_OF (other_fld_const);
+      if (DV_TYPE_OF (main_fld_const) != fld_const_dtp)
+        goto disjoin; /* see below */
+      if ((SPART_TRIPLE_GRAPH_IDX == fld_ctr) && rrc->rrc_graph_xlat_count)
         {
+          rrc_tweak_const_with_graph_xlat (rrc, &main_fld_const);
+          rrc_tweak_const_with_graph_xlat (rrc, &other_fld_const);
+        }
           if ((DV_TYPE_OF (main_fld_const) != DV_TYPE_OF (other_fld_const)) ||
             (DVC_MATCH != cmp_boxes (main_fld_const, other_fld_const, NULL, NULL)) )
               goto disjoin; /* see below */
         }
-    }
 /* Pessimistic loop */
   for (fld_ctr = 0; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
     {
@@ -409,6 +437,11 @@ rdb2rdf_calculate_qmqm (rdb2rdf_ctx_t *rrc, rdb2rdf_optree_t *main_optree, int o
         continue; /* consts are compared in the optimistic loop, so either disjoin is found or there's no need to compare equal values again */
       main_fld_qmv = SPARP_FIELD_QMV_OF_QM(main_qm,fld_ctr);
       other_fld_qmv = SPARP_FIELD_QMV_OF_QM(other_qm,fld_ctr);
+      if ((SPART_TRIPLE_GRAPH_IDX == fld_ctr) && rrc->rrc_graph_xlat_count)
+        {
+          rrc_tweak_const_with_graph_xlat (rrc, &main_fld_const);
+          rrc_tweak_const_with_graph_xlat (rrc, &other_fld_const);
+        }
       rdb2rdf_set_rvr_by_const_or_qmv (rrc, &main_rvr, main_fld_const, main_fld_qmv);
       rdb2rdf_set_rvr_by_const_or_qmv (rrc, &other_rvr, other_fld_const, other_fld_qmv);
       sparp_rvr_audit(&(rrc->rrc_sparp_stub), &main_rvr);
@@ -819,6 +852,8 @@ rdb2rdf_qm_codegen (rdb2rdf_ctx_t *rrc, rdb2rdf_optree_t *rro, caddr_t table_nam
         continue;
       if ((0 != alias_no) && (RDB2RDF_MAX_ALIASES_OF_MAIN_TABLE != alias_no))
         continue;
+      if ((SPART_TRIPLE_GRAPH_IDX == fld_ctr) && rrc->rrc_graph_xlat_count)
+        rrc_tweak_const_with_graph_xlat (rrc, &fld_const);
       if ((NULL != rvvs_jso_ptr[0]) && (DV_ARRAY_OF_POINTER != DV_TYPE_OF (rvvs_jso_ptr[0])) &&
         (DVC_MATCH == cmp_boxes (rvvs_jso_ptr[0], fld_const, NULL, NULL)) )
       continue;
@@ -1059,7 +1094,7 @@ rdb2rdf_optree_codegen (rdb2rdf_ctx_t *rrc, rdb2rdf_optree_t *rro, caddr_t table
     {
     case RDB2RDF_CODEGEN_INITIAL_SUB_SINGLE:
       if (single_use_of_single_main)
-        rdb2rdf_qm_codegen (rrc, rro, table_name, opcode, subopcode, prefix, rro->rro_aliases_of_main_table->data, 0, ssg);
+        rdb2rdf_qm_codegen (rrc, rro, table_name, opcode, subopcode, prefix, (ccaddr_t)(rro->rro_aliases_of_main_table->data), 0, ssg);
       break;
     case RDB2RDF_CODEGEN_INITIAL_SUB_MULTI:
       if (!single_use_of_single_main)
@@ -1237,7 +1272,7 @@ next_qm: ;
 }
 
 caddr_t
-bif_sparql_rdb2rdf_impl (caddr_t * qst, caddr_t table_name, int opcode, int rule_id_seed, int only_list_tables)
+bif_sparql_rdb2rdf_impl (caddr_t * qst, caddr_t table_name, int opcode, caddr_t *graph_xlat, int rule_id_seed, int only_list_tables)
 {
   caddr_t storage_name = uname_virtrdf_ns_uri_SyncToQuads;
   quad_storage_t *storage = sparp_find_storage_by_name (storage_name);
@@ -1256,6 +1291,41 @@ bif_sparql_rdb2rdf_impl (caddr_t * qst, caddr_t table_name, int opcode, int rule
       rdb2rdf_optree_t *prev_top_rro = NULL;
       memset (&rrc, 0, sizeof (rdb2rdf_ctx_t));
       rrc.rrc_rule_id_seed = rule_id_seed;
+      if (NULL != graph_xlat)
+        {
+          rrc.rrc_graph_xlat_count = BOX_ELEMENTS (graph_xlat);
+          if (rrc.rrc_graph_xlat_count % 2)
+            sqlr_new_error ("22023", "SR639", "Vector of graph IRIs to translate should be of even length, not of length %d", rrc.rrc_graph_xlat_count);
+          if (rrc.rrc_graph_xlat_count)
+            {
+              int ctr, ctrL;
+              rrc.rrc_graph_xlat = (caddr_t *)t_alloc_box (rrc.rrc_graph_xlat_count * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
+              for (ctr = rrc.rrc_graph_xlat_count; ctr--; /* no step */)
+                {
+                  caddr_t g = graph_xlat[ctr];
+                  dtp_t g_dtp = DV_TYPE_OF (g);
+                  if ((DV_STRING != g_dtp) && (DV_UNAME != g_dtp))
+                    sqlr_new_error ("22023", "SR639", "Graph IRI should be an UTF-8 string or an UNAME");
+                  rrc.rrc_graph_xlat[ctr] = t_box_dv_uname_string (g);
+                }
+              /* check + sort by keys */
+              for (ctr = 0; ctr < rrc.rrc_graph_xlat_count; ctr += 2)
+                {
+                  for (ctrL = ctr - 2; 0 <= ctrL; ctrL -= 2)
+                    {
+                      int cmp = strcmp (rrc.rrc_graph_xlat[ctrL], rrc.rrc_graph_xlat[ctrL+2]);
+                      if (!cmp)
+                        sqlr_new_error ("22023", "SR639", "Graph IRI '%.100s' is used twice as a key in array of graph translations", rrc.rrc_graph_xlat[ctr]);
+                      if (0 < cmp)
+                        {
+                          caddr_t swap;
+                          swap = rrc.rrc_graph_xlat[ctrL]; rrc.rrc_graph_xlat[ctrL] = rrc.rrc_graph_xlat[ctrL+2]; rrc.rrc_graph_xlat[ctrL+2] = swap;
+                          swap = rrc.rrc_graph_xlat[ctrL+1]; rrc.rrc_graph_xlat[ctrL+1] = rrc.rrc_graph_xlat[ctrL+3]; rrc.rrc_graph_xlat[ctrL+3] = swap;
+                        }
+                    }
+                }
+            }
+        }
       DO_BOX_FAST (quad_map_t *, qm, qm_ctr, storage->qsUserMaps)
         {
           rdb2rdf_optree_t *qm_rro = rdb2rdf_create_optree (&rrc, &(rrc.rrc_root_rro), prev_top_rro, qm, table_name);
@@ -1327,17 +1397,20 @@ bif_sparql_rdb2rdf_impl (caddr_t * qst, caddr_t table_name, int opcode, int rule
 caddr_t
 bif_sparql_rdb2rdf_codegen (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *fname)
 {
+  int argcount = BOX_ELEMENTS (args);
   caddr_t table_name = bif_string_arg (qst, args, 0, "sparql_rdb2rdf_codegen");
   int opcode = bif_long_range_arg (qst, args, 1, "sparql_rdb2rdf_codegen", RDB2RDF_CODEGEN_EXPLAIN, COUNTOF__RDB2RDF_CODEGEN);
-  int rule_id_seed = (3 <= BOX_ELEMENTS (args)) ?
-    bif_long_arg (qst, args, 2, "sparql_rdb2rdf_codegen") :
-    (adler32_of_buffer (table_name, box_length (table_name)-1) ^ opcode);
-  return bif_sparql_rdb2rdf_impl (qst, table_name, opcode, rule_id_seed, 0);
+  caddr_t *graph_xlat = ((3 <= argcount) ?
+    bif_array_of_pointer_arg (qst, args, 2, "sparql_rdb2rdf_codegen") : NULL );
+  int rule_id_seed = (4 <= argcount) ?
+    bif_long_arg (qst, args, 3, "sparql_rdb2rdf_codegen") :
+    (adler32_of_buffer ((unsigned char *)table_name, box_length (table_name)-1) ^ opcode);
+  return bif_sparql_rdb2rdf_impl (qst, table_name, opcode, graph_xlat, rule_id_seed, 0);
 }
 
 caddr_t
 bif_sparql_rdb2rdf_list_tables (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *fname)
 {
   int opcode = bif_long_range_arg (qst, args, 0, "sparql_rdb2rdf_list_tables", RDB2RDF_CODEGEN_EXPLAIN, COUNTOF__RDB2RDF_CODEGEN);
-  return bif_sparql_rdb2rdf_impl (qst, NULL, opcode, 0 /*fake*/, 1);
+  return bif_sparql_rdb2rdf_impl (qst, NULL, opcode, NULL, 0 /*fake*/, 1);
 }
diff --git a/libsrc/Wi/sparql_sff.c b/libsrc/Wi/sparql_sff.c
index fdec2e1..88cc186 100644
--- a/libsrc/Wi/sparql_sff.c
+++ b/libsrc/Wi/sparql_sff.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql_sff.c,v 1.19.2.4 2011/02/04 15:36:04 source Exp $
+ *  $Id: sparql_sff.c,v 1.19.2.7 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -35,10 +35,6 @@ extern "C" {
 #endif
 
 
-#define isdatechar(c) (('\0' != (c)) && (NULL != strchr ("0123456789 GMTZ:-", (c))))
-/* This was: #define isplainURIchar(c) (('\0' != (c)) && ('/' != (c)) && ('?' != (c)) && ('=' != (c)) && ('#' != (c))) */
-#define isplainURIchar(c) ('\0' == DKS_ESC_CHARCLASS_ACTION((unsigned)(c), DKS_ESC_URI))
-
 int
 sprintff_is_proven_bijection (const char *f)
 {
@@ -69,7 +65,7 @@ sprintff_is_proven_bijection (const char *f)
           continue;
         }
       tail++;
-      if (NULL == strchr ("DUdusc", tail[0]))
+      if (NULL == strchr ("DUdgusc", tail[0]))
         return 0; /* Unknown format so the bijection is not proven */
       fmt_type = tail[0];
       tail++;
@@ -95,6 +91,10 @@ sprintff_is_proven_bijection (const char *f)
             if (isplainURIchar (next) || (next & ~ 0x7F))
               return 0;
             continue;
+          case 'g':
+            if (isfloatchar (next))
+              return 0;
+            continue;
         }
     }
   return 1;
@@ -136,7 +136,7 @@ sprintff_is_proven_unparseable (const char *f)
           continue;
         }
       tail++;
-      if (NULL == strchr ("DUdusc", tail[0]))
+      if (NULL == strchr ("DUduscg", tail[0]))
         return 1; /* Unknown format so the format is unparseable OR the filed has modifiers for length and the like */
       fmt_type = tail[0];
       tail++;
@@ -148,11 +148,13 @@ sprintff_is_proven_unparseable (const char *f)
       if ('s' == left_fmt_type)
         return 1; /* %s at left can not be a bijection */
       if (('U' == left_fmt_type) && ('s' != fmt_type))
-        return 1; /* %U can eat anything except unescaped chars like '/' that might be pronted by '%s' */
+        return 1; /* %U can eat anything except unescaped chars like '/' that might be printed by '%s' */
       if ('u' == fmt_type)
         return 1; /* Any character %u can eat is good for any format at left */
       if ('D' == fmt_type)
         return 1; /* Any character %D can eat as first character is good for any format at left */
+      if ('g' == fmt_type)
+        return 1; /* Any character %D can eat as first character is good for any format at left */
    }
   return 0;
 }
@@ -499,7 +501,7 @@ again:
     }
   switch (f1_v)
     {
-    case 'D': case 'U': case 'd': case 's': case 'u': break;
+    case 'D': case 'U': case 'd': case 'g': case 's': case 'u': break;
     default: goto generic_tails; /* see below */
     }
 /* Now we slightly normalize the rest of processing to write code only for a half of f1_v and f2_v combinations */
@@ -521,6 +523,7 @@ again:
     case 'D': goto f1_v_is_D; /* see below */
     case 'U': goto f1_v_is_U; /* see below */
     case 'd': goto f1_v_is_d; /* see below */
+    case 'g': goto f1_v_is_g; /* see below */
     case 's': goto f1_v_is_s; /* see below */
     case 'u': goto f1_v_is_u; /* see below */
     default: GPF_T;
@@ -556,7 +559,7 @@ f1_v_is_D:
           goto res_tail_gets_f1_v; /* see below */
         }
       goto res_tail_gets_f1_v; /* see below */
-    case 'd': case 'u':
+    case 'd': case 'g': case 'u':
       goto res_tail_gets_f2_v; /* see below */
     case 's': goto generic_tails; /* see below */
     goto res_tail_gets_f2_v; /* see below */
@@ -577,13 +580,14 @@ f1_v_is_U:
           goto tails_are_in_sync; /* see below */
         }
       if ('\0' == f1_tail[0])
-        return SFF_ISECT_DIFF_END; /* One string ends with %D, other with non-%D fixed char */
+        return SFF_ISECT_DIFF_END; /* One string ends with %U, other with non-%U fixed char */
       return SFF_ISECT_DISJOIN;
     }
   switch (f2_v)
     {
     case 'U': goto res_tail_gets_f2_v; /* see below */
     case 'd': goto res_tail_gets_f2_v; /* see below */
+    case 'g': goto res_tail_gets_f2_v; /* see below */
     case 's': goto generic_tails; /* see below */
     case 'u': goto res_tail_gets_f2_v; /* see below */
     default: goto generic_tails; /* see below */
@@ -607,12 +611,42 @@ f1_v_is_u:
           goto tails_are_in_sync; /* see below */
         }
       if ('\0' == f1_tail[0])
-        return SFF_ISECT_DIFF_END; /* One string ends with %D, other with non-%D fixed char */
+        return SFF_ISECT_DIFF_END; /* One string ends with %d, other with non-%d fixed char */
       return SFF_ISECT_DISJOIN;
     }
   switch (f2_v)
     {
     case 'd': goto res_tail_gets_f2_v; /* see below */
+    case 'g': goto res_tail_gets_f1_v; /* see below */
+    case 's': goto generic_tails; /* see below */
+    case 'u': goto res_tail_gets_f2_v; /* see below */
+    default: goto generic_tails; /* see below */
+    }
+
+f1_v_is_g:
+  if (isfloatchar (f1_tail[0]))
+    goto generic_tails; /* see below */
+  /* The unambiguous '%g' in f1 may match any %g-like chars, f2 vars (%u to %u) */
+  if ('\0' == f2_v)
+    {
+      if (isdigit (f2_fix) || ('+' == f2_fix) || ('-' == f2_fix))
+        goto res_tail_gets_f2_fix; /* see below */
+      if ((f1_last_replaced != f1) && (('-' == f2_fix) || ('+' == f2_fix) || ('.' == f2_fix)))
+        goto res_tail_gets_f2_fix; /* see below */
+      if ((f1_tail[0] == f2_fix) && /* unambiguous synchronisation between f1 and f2... */
+        (f1_last_replaced == f1) ) /*... but integer output can not be empty so should make if result contains something for the field */
+        {
+          f2_tail = f2;
+          goto tails_are_in_sync; /* see below */
+        }
+      if ('\0' == f1_tail[0])
+        return SFF_ISECT_DIFF_END; /* One string ends with %g, other with non-%g fixed char */
+      return SFF_ISECT_DISJOIN;
+    }
+  switch (f2_v)
+    {
+    case 'd': goto res_tail_gets_f2_v; /* see below */
+    case 'g': goto res_tail_gets_f2_v; /* see below */
     case 's': goto generic_tails; /* see below */
     case 'u': goto res_tail_gets_f2_v; /* see below */
     default: goto generic_tails; /* see below */
@@ -849,6 +883,7 @@ again:
     case 'D': goto f2_v_is_D; /* see below */
     case 'U': goto f2_v_is_U; /* see below */
     case 'd': goto f2_v_is_d; /* see below */
+    case 'g': goto f2_v_is_g; /* see below */
     case 's': goto f2_v_is_s; /* see below */
     case 'u': goto f2_v_is_u; /* see below */
     default: goto generic_tails; /* see below */
@@ -928,7 +963,7 @@ f2_v_is_u:
           s1_tail += 2;
           s1_shifted = 1; continue;
         }
-      else if (f2_tail[0] == s1_tail[0]) /* unambiguous synchronisation between f2 and s1 */
+      else if (s1_shifted && (f2_tail[0] == s1_tail[0])) /* unambiguous synchronisation between f2 and s1 */
         goto tails_are_in_sync; /* see below */
       else if ('\0' == f2_tail[0])
         return SFF_ISECT_DIFF_END; /* One string ends with %d, other with non-%d fixed char */
@@ -937,6 +972,44 @@ f2_v_is_u:
     }
   GPF_T; /* never reached */
 
+f2_v_is_g:
+  if (isfloatchar (f2_tail[0]) || ('%' == f2_tail[0]))
+    goto generic_tails; /* see below */
+  /* The unambiguous '%d' in f2 may match any %d-like chars */
+  s1_tail = s1;
+  s1_shifted = 0;
+  if (('-' == s1_tail[0]) && isdigit (s1_tail[0]))
+    {
+      s1_tail += 2;
+      s1_shifted = 1;
+    }
+  while (isdigit (s1_tail[0]))
+    {
+      s1_tail++;
+      s1_shifted = 1;
+    }
+  if (s1_shifted && ('.' == s1_tail[0]) && isdigit (s1_tail[0]))
+    {
+      s1_tail += 2;
+      while (isdigit (s1_tail[0])) s1_tail++;
+    }
+  if (s1_shifted && (('e' == s1_tail[0]) || ('E' == s1_tail[0])))
+    {
+      if (('-' == s1_tail[1]) && isdigit (s1_tail[2]))
+        s1_tail += 3;
+      else if (isdigit (s1_tail[1]))
+        s1_tail += 2;
+      else
+        return SFF_ISECT_DIFF_END; /* 'E' in string does not match to f2_tail[0] char */
+      while (isdigit (s1_tail[0])) s1_tail++;
+    }
+  if (s1_shifted && (f2_tail[0] == s1_tail[0])) /* unambiguous synchronisation between f2 and s1 */
+    goto tails_are_in_sync; /* see below */
+  else if ('\0' == f2_tail[0])
+    return SFF_ISECT_DIFF_END; /* One string ends with %g, other with non-%g fixed char */
+  else
+    return SFF_ISECT_DISJOIN;
+
 f2_v_is_s:
   if ('\0' == f2_tail[0])
     { /* %s at the end of f2 intersects with any s1 */
diff --git a/libsrc/Wi/sparql_tree.c b/libsrc/Wi/sparql_tree.c
index bc1d93b..765d472 100644
--- a/libsrc/Wi/sparql_tree.c
+++ b/libsrc/Wi/sparql_tree.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparql_tree.c,v 1.21.2.21 2011/03/21 10:44:30 source Exp $
+ *  $Id: sparql_tree.c,v 1.21.2.29 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -52,6 +52,51 @@ extern "C" {
 #define sparp_check_tree(t)
 #endif
 
+#ifndef NDEBUG
+SPART **
+t_spartlist_concat (SPART **list1, SPART **list2)
+{
+  return (SPART **)t_list_concat ((caddr_t)list1, (caddr_t)list2);
+}
+#endif
+
+caddr_t *
+t_modify_list (caddr_t *lst, int edit_idx, int delete_len, caddr_t *ins, int ins_len)
+{
+  int lst_len = BOX_ELEMENTS_0 ((caddr_t)(lst));
+  caddr_t *res;
+  t_check_tree (lst);
+  if ((0 > edit_idx) || (0 > delete_len) || (edit_idx + delete_len > lst_len))
+    GPF_T1 ("t_modify_list(): bad range");
+  if ((ins + ins_len > lst) && (ins < lst+lst_len))
+    GPF_T1 ("t_modify_list(): overlapping arrays");
+  if (delete_len == ins_len)
+    {
+      memcpy (lst + edit_idx, ins, ins_len * sizeof (caddr_t));
+      t_check_tree (lst);
+      return lst;
+    }
+  res = (caddr_t *)t_alloc_box ((lst_len - delete_len + ins_len) * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
+  if (edit_idx)
+    memcpy (res, lst, edit_idx * sizeof (caddr_t));
+  if (ins_len)
+    memcpy (res + edit_idx, ins, ins_len * sizeof (caddr_t));
+  memcpy (res + edit_idx + ins_len, lst + edit_idx + delete_len, (lst_len - (edit_idx + delete_len)) * sizeof (caddr_t));
+  t_check_tree (res);
+  return res;
+}
+
+#ifndef NDEBUG
+#define t_modify_spartlist(lst,edit_idx,delete_len,ins,ins_len) ((SPART **)t_modify_list ((caddr_t *)lst, edit_idx, delete_len, (caddr_t *)ins, ins_len))
+#else
+SPART **
+t_modify_spartlist (SPART **lst, int edit_idx, int delete_len, SPART **ins, int ins_len)
+{
+  return (SPART **)t_modify_list ((caddr_t *)lst, edit_idx, delete_len, (caddr_t *)ins, ins_len);
+}
+#endif
+
+
 /* ROUTINES FOR SPART TREE TRAVERSAL */
 
 int
@@ -113,7 +158,7 @@ scan_for_children:
       {
         tree_cat = 1;
         sub_expns = tree->_.builtin.args;
-	sub_expn_count = BOX_ELEMENTS (sub_expns);
+	sub_expn_count = BOX_ELEMENTS_0 (sub_expns);
         break;
       }
     case SPAR_FUNCALL:
@@ -452,6 +497,7 @@ sparp_down_to_sub (sparp_t *sparp, SPART *subq_gp_wrapper)
   sub_sparp->sparp_expr = subq;
   sub_sparp->sparp_env = subq->_.req_top.shared_spare;
   sub_sparp->sparp_parent_sparp = sparp;
+  sub_sparp->sparp_first_equiv_idx = sparp->sparp_sg->sg_equiv_count;
   return sub_sparp;
 }
 
@@ -496,6 +542,504 @@ sparp_gp_localtrav_treelist (sparp_t *sparp, SPART **treelist,
   END_DO_BOX_FAST;
 }
 
+/* MACRO REWRITING */
+
+void
+spar_macro_xlate_selid (sparp_t *sparp, caddr_t *selid_ptr, spar_mproc_ctx_t *ctx)
+{
+  if (NULL == ctx->smpc_defbody_topselid)
+    {
+      if ((NULL != selid_ptr[0]) && ('@' == selid_ptr[0][0]))
+        spar_internal_error (sparp, "spar_" "macro_xlate_selid(): selid not from defm but has '@'");
+      return;
+    }
+  if (NULL == ctx->smpc_context_selid)
+    spar_internal_error (sparp, "spar_" "macro_xlate_selid(): no context");
+  if ('@' == ctx->smpc_context_selid[0])
+     spar_internal_error (sparp, "spar_" "macro_xlate_selid(): context selid has '@'");
+  if (!strcmp (selid_ptr[0], ctx->smpc_context_selid))
+    return;
+  if (!strcmp (selid_ptr[0], ctx->smpc_defbody_topselid))
+    {
+      selid_ptr[0] = ctx->smpc_context_selid;
+      return;
+    }
+  selid_ptr[0] = t_box_sprintf (100, "%.70s%.20s%.10s", ctx->smpc_mcall->_.macrocall.mname, ctx->smpc_defbody_currselid, selid_ptr[0]);
+}
+
+SPART **
+spar_macroprocess_define_list (sparp_t *sparp, SPART **trees, spar_mproc_ctx_t *ctx)
+{
+  int ctr, len = BOX_ELEMENTS_0 (trees);
+  for (ctr = 1; ctr < len; ctr += 2)
+    {
+      SPART ***vallist = (SPART ***)(trees[ctr]);
+      int valctr, valcount;
+      if (DV_ARRAY_OF_POINTER != DV_TYPE_OF (vallist))
+        spar_internal_error (sparp, "spar_" "macroprocess_define_list(): invalid list of values");
+      valcount = BOX_ELEMENTS (vallist);
+      for (valctr = valcount; valctr--; /* no step */)
+        {
+          ptrlong valtype = ((ptrlong *)(vallist[valctr]))[0];
+          if ((SPAR_VARIABLE == valtype) || (SPAR_MACROPU == valtype))
+            {
+              vallist[valctr][1] = spar_macroprocess_tree (sparp, vallist[valctr][1], ctx);
+            }
+        }
+    }
+  return trees;
+}
+
+SPART **
+spar_macroprocess_treelist (sparp_t *sparp, SPART **trees, int begin_with, spar_mproc_ctx_t *ctx)
+{
+  int ctr, len = BOX_ELEMENTS_0 (trees);
+  for (ctr = begin_with; ctr < len; ctr++)
+    trees[ctr] = spar_macroprocess_tree (sparp, trees[ctr], ctx);
+  return trees;
+}
+
+SPART *
+spar_macro_instantiate (sparp_t *sparp, SPART *tree, SPART *defm, SPART *mcall, spar_mproc_ctx_t *ctx)
+{
+  SPART *cloned_body = sparp_tree_full_copy (sparp, defm->_.defmacro.body, NULL);
+  SPART *res = NULL;
+  spar_mproc_ctx_t local_ctx;
+  memset (&local_ctx, 0, sizeof (spar_mproc_ctx_t));
+  local_ctx.smpc_unictr = (sparp->sparp_unictr)++;
+  local_ctx.smpc_context_gp = ctx->smpc_context_gp;
+  local_ctx.smpc_context_selid = ctx->smpc_context_selid;
+  local_ctx.smpc_defbody_topselid = local_ctx.smpc_defbody_currselid = defm->_.defmacro.selid;
+  local_ctx.smpc_defm = defm;
+  local_ctx.smpc_mcall = mcall;
+  res = spar_macroprocess_tree (sparp, cloned_body, &local_ctx);
+  if (SPAR_GP != SPART_TYPE (res))
+    return res;
+  if ((0 != res->_.gp.subtype) && (DEFMACRO_L != res->_.gp.subtype))
+    return res;
+  if (0 != BOX_ELEMENTS_0 (res->_.gp.members))
+    {
+      if (0 == BOX_ELEMENTS_0 (local_ctx.smpc_ins_membs))
+        local_ctx.smpc_ins_membs = res->_.gp.members;
+      else
+        local_ctx.smpc_ins_membs = t_spartlist_concat (res->_.gp.members, local_ctx.smpc_ins_membs);
+    }
+  if (0 != BOX_ELEMENTS_0 (local_ctx.smpc_ins_membs))
+    {
+      if (0 == BOX_ELEMENTS_0 (ctx->smpc_ins_membs))
+        ctx->smpc_ins_membs = local_ctx.smpc_ins_membs;
+      else
+        ctx->smpc_ins_membs = t_spartlist_concat (ctx->smpc_ins_membs, local_ctx.smpc_ins_membs);
+    }
+  if (0 != BOX_ELEMENTS_0 (res->_.gp.filters))
+    {
+      if (0 == BOX_ELEMENTS_0 (local_ctx.smpc_ins_filts))
+        local_ctx.smpc_ins_filts = res->_.gp.filters;
+      else
+        local_ctx.smpc_ins_filts = t_spartlist_concat (res->_.gp.filters, local_ctx.smpc_ins_filts);
+    }
+  if (0 != BOX_ELEMENTS_0 (local_ctx.smpc_ins_filts))
+    {
+      if (0 == BOX_ELEMENTS_0 (ctx->smpc_ins_filts))
+        ctx->smpc_ins_filts = local_ctx.smpc_ins_filts;
+      else
+        ctx->smpc_ins_filts = t_spartlist_concat (ctx->smpc_ins_filts, local_ctx.smpc_ins_filts);
+    }
+  return NULL;
+}
+
+caddr_t
+spar_macro_sign_inner_varname (sparp_t *sparp, caddr_t vname, spar_mproc_ctx_t *ctx)
+{
+  char *tail;
+  caddr_t res = t_box_sprintf (100, "%.50s_%.50s_%d", vname, ctx->smpc_mcall->_.macrocall.mname, ctx->smpc_unictr);
+  for (tail = res; '\0' != tail[0]; tail++)
+    {
+      if ((':' == tail[0]) || ('/' == tail[0]) || ('-' == tail[0])) tail[0] = '_';
+    }
+  return res;
+}
+
+caddr_t
+spar_macroprocess_varname (sparp_t *sparp, SPART *varname_or_macropu, int allow_macro_arg_namesakes, spar_mproc_ctx_t *ctx)
+{
+  int param_index;
+  SPART *mcall, *argtree;
+  if (NULL == varname_or_macropu)
+    return NULL;
+  mcall = ctx->smpc_mcall;
+  if ((DV_STRING == DV_TYPE_OF (varname_or_macropu)) || (DV_UNAME == DV_TYPE_OF (varname_or_macropu)))
+    {
+      caddr_t varname = (caddr_t)varname_or_macropu;
+      int local_ctr;
+      if (NULL == mcall)
+        return varname;
+      DO_BOX_FAST_REV (caddr_t, nm, param_index, ctx->smpc_defm->_.defmacro.paramnames)
+        {
+          if (strcmp (nm, varname))
+            continue;
+          if (allow_macro_arg_namesakes)
+            goto param_index_found; /* see below */
+          else
+            spar_internal_error (sparp, "spar_" "macroprocess_varname(): plain varname instead of expected macropu");
+        }
+      END_DO_BOX_FAST_REV;
+      DO_BOX_FAST_REV (caddr_t, nm, local_ctr, ctx->smpc_defm->_.defmacro.localnames)
+        {
+          if (strcmp (nm, varname))
+            continue;
+          return spar_macro_sign_inner_varname (sparp, varname, ctx);
+        }
+      END_DO_BOX_FAST_REV;
+      spar_error (sparp, "The variable name '%.100s' in macro '%.100s' is neither argument name nor local name",
+        varname, ctx->smpc_defm->_.defmacro.mname );
+      return varname; /* Never reached */
+    }
+  if (SPAR_MACROPU != SPART_TYPE (varname_or_macropu))
+    spar_internal_error (sparp, "spar_" "macroprocess_varname(): bad arg");
+  if (NULL == mcall)
+    spar_internal_error (sparp, "spar_" "macroprocess_varname(): macroprocessing without macro call");
+  param_index = varname_or_macropu->_.macropu.pindex;
+  if (param_index >= BOX_ELEMENTS (mcall->_.macrocall.argtrees))
+    spar_internal_error (sparp, "spar_" "macroprocess_varname(): more macro parameters than macro call args");
+param_index_found:
+  argtree = mcall->_.macrocall.argtrees[param_index];
+  if (SPAR_VARIABLE != SPART_TYPE (argtree))
+    spar_error (sparp, "The argument #%d (?%.100s) of macro '%.100s' should be a plain variable, because it is used as an alias name",
+      param_index+1, ctx->smpc_defm->_.defmacro.mname, ctx->smpc_defm->_.defmacro.paramnames[param_index] );
+  return argtree->_.var.vname;
+}
+
+SPART *
+spar_macroprocess_tree (sparp_t *sparp, SPART *tree, spar_mproc_ctx_t *ctx)
+{
+  int ctr;
+  switch (SPART_TYPE (tree))
+    {
+    case SPAR_GP:
+      {
+        SPART *saved_gp = ctx->smpc_context_gp;
+        caddr_t saved_selid = ctx->smpc_context_selid;
+        caddr_t saved_defbody_curselid = ctx->smpc_defbody_currselid;
+        if ('@' != tree->_.gp.selid[0]) /* We're outside a defbody (outside macro call at all or in group inside the argument */
+          {
+            if (NULL == ctx->smpc_defm) /* We're outside a macro call */
+              {
+                ctx->smpc_context_gp = tree;
+                ctx->smpc_context_selid = tree->_.gp.selid;
+              }
+          }
+        else
+          ctx->smpc_defbody_currselid = tree->_.gp.selid;
+        spar_macro_xlate_selid (sparp, &(tree->_.gp.selid), ctx);
+        tree->_.gp.options = spar_macroprocess_treelist (sparp, tree->_.gp.options, 0, ctx);
+        switch (tree->_.gp.subtype)
+          {
+          case SELECT_L:
+            {
+              SPART *subq = tree->_.gp.subquery;
+              spar_macro_xlate_selid (sparp, &(subq->_.req_top.retselid), ctx);
+              subq->_.req_top.orig_retvals = spar_macroprocess_treelist (sparp, subq->_.req_top.orig_retvals, 0, ctx);
+              subq->_.req_top.retvals = spar_macroprocess_treelist (sparp, subq->_.req_top.retvals, 0, ctx);
+              subq->_.req_top.pattern = spar_macroprocess_tree (sparp, subq->_.req_top.pattern, ctx);
+              subq->_.req_top.groupings = spar_macroprocess_treelist (sparp, subq->_.req_top.groupings, 0, ctx);
+              subq->_.req_top.having = spar_macroprocess_tree (sparp, subq->_.req_top.having, ctx);
+              subq->_.req_top.order = spar_macroprocess_treelist (sparp, subq->_.req_top.order, 0, ctx);
+              subq->_.req_top.limit = spar_macroprocess_tree (sparp, subq->_.req_top.limit, ctx);
+              subq->_.req_top.offset = spar_macroprocess_tree (sparp, subq->_.req_top.offset, ctx);
+              break;
+            }
+          case UNION_L:
+            DO_BOX_FAST (SPART *, memb, ctr, tree->_.gp.members)
+              {
+                tree->_.gp.members[ctr] = spar_macroprocess_tree (sparp, memb, ctx);
+              }
+            END_DO_BOX_FAST;
+            break;
+          default:
+            {
+              SPART **membs = tree->_.gp.members;
+              SPART **filts = tree->_.gp.filters;
+              int memb_ctr, memb_count = BOX_ELEMENTS (membs);
+              int filt_count = BOX_ELEMENTS_0 (filts);
+              for (memb_ctr = 0; memb_ctr < memb_count; memb_ctr++)
+                {
+                  SPART *memb = membs[memb_ctr];
+                  switch (SPART_TYPE (memb))
+                    {
+                    case SPAR_MACROCALL:
+                      {
+                        caddr_t mname = memb->_.macrocall.mname;
+                        SPART *defm = spar_find_defmacro_by_iri_or_fields (sparp, mname, NULL);
+                        int argctr;
+                        if (SPAR_GP != SPART_TYPE (defm->_.defmacro.body))
+                          spar_error (sparp, "Macro <%.200s> is expanded into expression but used as part of group pattern", mname);
+                        if (defm->_.defmacro.subtype)
+                          {
+                            int context_graph_type = DEFAULT_L;
+                            SPART *context_graph = memb->_.macrocall.context_graph;
+                            if ((NULL != context_graph) && !SPART_IS_DEFAULT_GRAPH_BLANK (context_graph))
+                              context_graph_type = GRAPH_L;
+                            if (defm->_.defmacro.subtype != context_graph_type)
+                              spar_error (sparp, "Macro <%.200s> should be used in context of %s graph but is placed into %s graph pattern", mname,
+                                ((DEFAULT_L == defm->_.defmacro.subtype) ? "default" : "named"),
+                                ((DEFAULT_L == context_graph_type) ? "default" : "named") );
+                          }
+                        DO_BOX_FAST (SPART *, mcarg, argctr, memb->_.macrocall.argtrees)
+                          {
+                            memb->_.macrocall.argtrees[argctr] = spar_macroprocess_tree (sparp, mcarg, ctx);
+                          }
+                        END_DO_BOX_FAST;
+                        spar_macro_instantiate (sparp, tree, defm, memb, ctx);
+                        tree->_.gp.members = membs = t_modify_spartlist (membs, memb_ctr, 1, ctx->smpc_ins_membs, BOX_ELEMENTS_0 (ctx->smpc_ins_membs));
+                        ctx->smpc_ins_membs = NULL;
+                        memb_count = BOX_ELEMENTS (membs);
+                        memb_ctr--;
+                        if (BOX_ELEMENTS_0 (ctx->smpc_ins_filts))
+                          {
+                            tree->_.gp.filters = filts = t_spartlist_concat (tree->_.gp.filters, ctx->smpc_ins_filts);
+                            ctx->smpc_ins_filts = NULL;
+                          }
+                        filt_count = BOX_ELEMENTS (filts);
+                        break;
+                      }
+                    case SPAR_MACROPU:
+                      {
+                        SPART *arg = ctx->smpc_mcall->_.macrocall.argtrees[tree->_.macropu.pindex];
+                        SPART *arg_copy;
+                        spar_mproc_ctx_t gparg_ctx;
+                        if (SPAR_GP != SPART_TYPE (arg))
+                          spar_error (sparp, "The argument #%d (?%.20s) of macro <%.200s> should be a group pattern",
+                            tree->_.macropu.pindex, tree->_.macropu.pname, ctx->smpc_mcall->_.macrocall.mname );
+                        arg_copy = sparp_tree_full_copy (sparp, arg, NULL);
+                        memset (&gparg_ctx, 0, sizeof (spar_mproc_ctx_t));
+                        gparg_ctx.smpc_unictr = (sparp->sparp_unictr)++;
+                        gparg_ctx.smpc_context_gp = tree;
+                        gparg_ctx.smpc_context_selid = tree->_.gp.selid;
+                        gparg_ctx.smpc_defbody_topselid = gparg_ctx.smpc_defbody_currselid = arg_copy->_.gp.selid;
+                        arg_copy = spar_macroprocess_tree (sparp, arg_copy, &gparg_ctx);
+                        tree->_.gp.members = membs = t_modify_spartlist (membs, memb_ctr, 1, arg_copy->_.gp.members, BOX_ELEMENTS_0 (arg_copy->_.gp.members));
+                        memb_count = BOX_ELEMENTS (membs);
+                        memb_ctr--;
+                        if (BOX_ELEMENTS_0 (arg_copy->_.gp.filters))
+                          {
+                            tree->_.gp.filters = filts = t_spartlist_concat (tree->_.gp.filters, arg_copy->_.gp.filters);
+                            filt_count = BOX_ELEMENTS (filts);
+                          }
+                        break;
+                      }
+                    default:
+                      tree->_.gp.members[memb_ctr] = spar_macroprocess_tree (sparp, memb, ctx);
+                      if (NULL != ctx->smpc_ins_filts)
+                        {
+                          if (BOX_ELEMENTS_0 (ctx->smpc_ins_filts))
+                            {
+                              tree->_.gp.filters = filts = t_spartlist_concat (tree->_.gp.filters, ctx->smpc_ins_filts);
+                              ctx->smpc_ins_filts = NULL;
+                            }
+                          filt_count = BOX_ELEMENTS (filts);
+                        }
+                      break;
+                    }
+                }
+              break;
+            }
+          }
+        tree->_.gp.filters = spar_macroprocess_treelist (sparp, tree->_.gp.filters, 0, ctx);
+        ctx->smpc_defbody_currselid = saved_defbody_curselid;
+        ctx->smpc_context_gp = saved_gp;
+        ctx->smpc_context_selid = saved_selid;
+        return tree;
+      }
+    case SPAR_TRIPLE:
+      {
+        int ctr;
+        spar_macro_xlate_selid (sparp, &(tree->_.triple.selid), ctx);
+        if (NULL != tree->_.triple.tabid)
+          spar_macro_xlate_selid (sparp, &(tree->_.triple.tabid), ctx);
+        for (ctr = 0; ctr < SPART_TRIPLE_FIELDS_COUNT; ctr++)
+          {
+            SPART *fld = tree->_.triple.tr_fields[ctr];
+            SPART *new_fld = spar_macroprocess_tree (sparp, fld, ctx);
+            int new_fld_type = SPART_TYPE (new_fld);
+            switch (new_fld_type)
+              {
+              case SPAR_VARIABLE: case SPAR_BLANK_NODE_LABEL:
+                /* This fails if a variable is made from MACROPU so its selid is selid from smpc_context_gp
+                if (strcmp (tree->_.triple.selid, new_fld->_.var.selid) ||
+                  (NULL != new_fld->_.var.tabid && strcmp (tree->_.triple.tabid, new_fld->_.var.tabid)) )
+                  spar_internal_error (sparp, "spar_" "macroprocess_tree(): strange macroprocessing of a triple field variable");
+                */
+                new_fld->_.var.selid = tree->_.triple.selid;
+                new_fld->_.var.tabid = tree->_.triple.tabid;
+                new_fld->_.var.tr_idx = ctr;
+                new_fld->_.var.rvr.rvrRestrictions |= sparp_tr_usage_natural_restrictions[ctr];
+                /* no break */
+              case SPAR_LIT: case SPAR_QNAME:
+                tree->_.triple.tr_fields[ctr] = new_fld;
+                break;
+              default:
+                {
+                  SPART *local_bnode1, *local_bnode2, *eq_bop;
+                  spar_selid_push_reused (sparp, tree->_.triple.selid);
+                  local_bnode1 = spar_make_blank_node (sparp, spar_mkid (sparp, "_:mcall"), 1);
+                  spar_selid_pop (sparp);
+                  tree->_.triple.tr_fields[ctr] = local_bnode1;
+                  local_bnode1->_.var.tr_idx = ctr;
+                  local_bnode1->_.var.tabid = tree->_.triple.tabid;
+                  local_bnode2 = sparp_tree_full_copy (sparp, local_bnode1, NULL);
+                  local_bnode2->_.var.tr_idx = SPART_VAR_OUTSIDE_TRIPLE;
+                  local_bnode2->_.var.tabid = NULL;
+                  eq_bop = spartlist (sparp, 3, BOP_EQ, local_bnode2, new_fld);
+                  ctx->smpc_ins_filts = t_modify_spartlist (ctx->smpc_ins_filts, 0, 0, &eq_bop, 1);
+                  break;
+                }
+              }
+          }
+        for (ctr = 1; ctr < BOX_ELEMENTS_0 (tree->_.triple.options); ctr += 2)
+          {
+            tree->_.triple.options[ctr] = spar_macroprocess_tree (sparp, tree->_.triple.options[ctr], ctx);
+          }
+        return tree;
+      }
+    case SPAR_VARIABLE:
+    case SPAR_BLANK_NODE_LABEL:
+      spar_macro_xlate_selid (sparp, &(tree->_.var.selid), ctx);
+      if (NULL != tree->_.var.tabid)
+        spar_macro_xlate_selid (sparp, &(tree->_.var.tabid), ctx);
+      if (NULL != ctx->smpc_defm)
+        tree->_.var.vname = spar_macro_sign_inner_varname (sparp, tree->_.var.vname, ctx);
+      return tree;
+    case SPAR_MACROCALL:
+      {
+        caddr_t mname;
+        SPART *defm;
+        SPART **context_membs = NULL;
+        SPART *res;
+        int context_memb_count = 0;
+        if (NULL != ctx->smpc_context_gp)
+          {
+            context_membs = ctx->smpc_context_gp->_.gp.members;
+            context_memb_count = BOX_ELEMENTS (context_membs);
+          }
+        mname = tree->_.macrocall.mname;
+        defm = spar_find_defmacro_by_iri_or_fields (sparp, mname, NULL);
+        if ((SPAR_GP == SPART_TYPE (defm->_.defmacro.body)) && (SELECT_L != defm->_.defmacro.body->_.gp.subtype))
+          spar_error (sparp, "Macro <%.200s> is expanded into group pattern but used as part of expression", mname);
+        DO_BOX_FAST (SPART *, mcarg, ctr, tree->_.macrocall.argtrees)
+          {
+            tree->_.macrocall.argtrees[ctr] = spar_macroprocess_tree (sparp, mcarg, ctx);
+          }
+        END_DO_BOX_FAST;
+        res = spar_macro_instantiate (sparp, tree, defm, tree, ctx);
+        if (NULL != ctx->smpc_context_gp)
+          {
+            ctx->smpc_context_gp->_.gp.members = t_modify_spartlist (context_membs, context_memb_count, 0, ctx->smpc_ins_membs, BOX_ELEMENTS_0 (ctx->smpc_ins_membs));
+            ctx->smpc_ins_membs = NULL;
+            if (NULL != ctx->smpc_ins_filts)
+              {
+                ctx->smpc_context_gp->_.gp.filters = t_spartlist_concat (ctx->smpc_context_gp->_.gp.filters, ctx->smpc_ins_filts);
+                ctx->smpc_ins_filts = NULL;
+              }
+          }
+        else
+          {
+            if ((NULL != ctx->smpc_ins_membs) || (NULL != ctx->smpc_ins_filts))
+              spar_error (sparp, "A call of macro <%.200s> forms parts oi graph pattern outside any graph pattern", mname);
+          }
+        return res;
+      }
+    case SPAR_LIT: case SPAR_QNAME: return tree;
+    case ORDER_L:
+      tree->_.oby.expn = spar_macroprocess_tree (sparp, tree->_.oby.expn, ctx);
+      return tree;
+    case SPAR_FUNCALL:
+      DO_BOX_FAST (SPART *, arg, ctr, tree->_.funcall.argtrees)
+        {
+          tree->_.funcall.argtrees[ctr] = spar_macroprocess_tree (sparp, arg, ctx);
+        }
+      END_DO_BOX_FAST;
+      return tree;
+    case SPAR_BUILT_IN_CALL:
+      DO_BOX_FAST (SPART *, arg, ctr, tree->_.builtin.args)
+        {
+          tree->_.builtin.args[ctr] = spar_macroprocess_tree (sparp, arg, ctx);
+        }
+      END_DO_BOX_FAST;
+      return tree;
+    case BOP_OR: case BOP_AND:
+    case BOP_PLUS: case BOP_MINUS: case BOP_TIMES: case BOP_DIV: case BOP_MOD:
+    case BOP_EQ: case BOP_NEQ: case BOP_LT: case BOP_LTE: case BOP_GT: case BOP_GTE:
+    case BOP_LIKE:
+      tree->_.bin_exp.right = spar_macroprocess_tree (sparp, tree->_.bin_exp.right, ctx);
+      /* no break; */
+    case BOP_NOT:
+      tree->_.bin_exp.left = spar_macroprocess_tree (sparp, tree->_.bin_exp.left, ctx);
+      return tree;
+    case SPAR_ALIAS:
+      tree->_.alias.arg = spar_macroprocess_tree (sparp, tree->_.alias.arg, ctx);
+      tree->_.alias.aname = spar_macroprocess_varname (sparp, (SPART *)(tree->_.alias.aname), 0, ctx);
+      return tree;
+    case SPAR_MACROPU:
+      {
+        int idx = tree->_.macropu.pindex;
+        SPART *mcall = ctx->smpc_mcall;
+        SPART *argtree, *argcopy;
+        if (NULL == mcall)
+          spar_internal_error (sparp, "spar_" "macroprocess_tree(): macro parameter without macro call");
+        if (idx >= BOX_ELEMENTS (mcall->_.macrocall.argtrees))
+          spar_internal_error (sparp, "spar_" "macroprocess_tree(): more macro parameters than macro call args");
+        argtree = mcall->_.macrocall.argtrees[idx];
+        argcopy = sparp_tree_full_copy (sparp, argtree, ctx->smpc_context_gp);
+        return argcopy;
+      }
+    case SPAR_SERVICE_INV:
+      {
+       int vctr;
+        tree->_.sinv.iri_params = spar_macroprocess_treelist (sparp, tree->_.sinv.iri_params, 0, ctx);
+        tree->_.sinv.defines = spar_macroprocess_define_list (sparp, tree->_.sinv.defines, ctx);
+        tree->_.sinv.sources = spar_macroprocess_treelist (sparp, tree->_.sinv.sources, 0, ctx);
+        if (DV_ARRAY_OF_POINTER == DV_TYPE_OF ((caddr_t)(tree->_.sinv.param_varnames)))
+          {
+            DO_BOX_FAST_REV (SPART * /* not caddr_t :) */, vname, vctr, tree->_.sinv.param_varnames)
+              {
+                tree->_.sinv.param_varnames[vctr] = spar_macroprocess_varname (sparp, vname, 1, ctx);
+              }
+            END_DO_BOX_FAST_REV;
+          }
+        DO_BOX_FAST_REV (SPART * /* not caddr_t :) */, vname, vctr, tree->_.sinv.rset_varnames)
+          {
+            tree->_.sinv.rset_varnames[vctr] = spar_macroprocess_varname (sparp, vname, 1, ctx);
+          }
+        END_DO_BOX_FAST_REV;
+        sparp->sparp_query_uses_sinvs++;
+        spar_add_service_inv_to_sg (sparp, tree);
+        return tree;
+      }
+    default:
+      {
+        GPF_T;
+#if 0
+        int ctr;
+        DO_BOX_FAST (SPART *, sub, ctr, tree)
+          {
+            ptrlong sub_t;
+            if (!(DV_ARRAY_OF_POINTER == DV_TYPE_OF (sub)))
+              continue;
+            sub_t = sub->type;
+            if (!(((sub_t >= SPAR_MIN_TREE_TYPE) && (sub_t <= SPAR_MAX_TREE_TYPE)) || ((sub_t >= BOP_NOT) && (sub_t <= BOP_MOD))))
+              continue;
+            ((SPART **)tree)[ctr] = spar_macroprocess_tree (sparp, sub, ctx);
+          }
+        END_DO_BOX_FAST;
+#endif
+        return tree;
+      }
+    }
+  
+}
+
+
 /* EQUIVALENCE CLASSES */
 
 sparp_equiv_t *
@@ -628,6 +1172,8 @@ sparp_equiv_get (sparp_t *sparp, SPART *haystack_gp, SPART *needle_var, int flag
         curr_eq->e_const_reads++;
       if (SPARP_EQUIV_ADD_SUBQUERY_USE & flags)
         spar_internal_error (sparp, "SPARP_EQUIV_INS_VARIABLE conflicts with SPARP_EQUIV_ADD_SUBQUERY_USE");
+      if (SPARP_EQUIV_ADD_OPTIONAL_READ & flags)
+        spar_internal_error (sparp, "SPARP_EQUIV_INS_VARIABLE conflicts with SPARP_EQUIV_ADD_OPTIONAL_READ");
     }
   else
     {
@@ -645,7 +1191,13 @@ sparp_equiv_get (sparp_t *sparp, SPART *haystack_gp, SPART *needle_var, int flag
 
 namesake_found:
   if (SPARP_EQUIV_GET_NAMESAKES & flags)
+    {
+      if (SPARP_EQUIV_ADD_SUBQUERY_USE & flags)
+        curr_eq->e_subquery_uses++;
+      if (SPARP_EQUIV_ADD_OPTIONAL_READ & flags)
+        curr_eq->e_optional_reads++;
     return curr_eq;
+    }
   curr_vars = curr_eq->e_vars;
   varcount = curr_eq->e_var_count;
   for (varctr = 0; varctr < varcount; varctr++)
@@ -1145,6 +1697,7 @@ sparp_equiv_merge (sparp_t *sparp, sparp_equiv_t *pri, sparp_equiv_t *sec)
       sec->e_var_count = 0;
     }
   pri->e_replaces_filter |= sec->e_replaces_filter;
+  sec->e_replaces_filter = 0;
   sparp_rvr_tighten (sparp, &(pri->e_rvr), &(sec->e_rvr), ~0);
   pri->e_gspo_uses += sec->e_gspo_uses;
   sec->e_gspo_uses = 0;
@@ -2281,7 +2834,7 @@ sparp_tree_full_clone_int (sparp_t *sparp, SPART *orig, SPART *parent_gp)
       tgt->_.var.selid = sparp_clone_id (sparp, orig->_.var.selid);
       if (NULL != orig->_.var.tabid)
         tgt->_.var.tabid = sparp_clone_id (sparp, orig->_.var.tabid);
-      tgt->_.var.vname = t_box_copy (orig->_.var.vname);
+      /* tgt->_.var.vname = t_box_copy (orig->_.var.vname); */
       sparp_rvr_copy (sparp, &(tgt->_.var.rvr), &(orig->_.var.rvr));
       return tgt;
     case SPAR_GP:
@@ -2444,7 +2997,7 @@ sparp_tree_full_clone_int (sparp_t *sparp, SPART *orig, SPART *parent_gp)
       return tgt;
     case SPAR_QM_SQL_FUNCALL:
       tgt = (SPART *)t_box_copy ((caddr_t) orig);
-      tgt->_.qm_sql_funcall.fname = t_box_copy (orig->_.qm_sql_funcall.fname);
+      /*tgt->_.qm_sql_funcall.fname = t_box_copy (orig->_.qm_sql_funcall.fname);*/
       tgt->_.qm_sql_funcall.fixed = (SPART **)t_box_copy ((caddr_t) orig->_.qm_sql_funcall.fixed);
       DO_BOX_FAST_REV (SPART *, arg, arg_ctr, orig->_.qm_sql_funcall.fixed)
         {
@@ -2462,6 +3015,19 @@ sparp_tree_full_clone_int (sparp_t *sparp, SPART *orig, SPART *parent_gp)
       tgt = (SPART *)t_box_copy ((caddr_t) orig);
       tgt->_.list.items = sparp_treelist_full_clone_int (sparp, orig->_.list.items, parent_gp);
       return tgt;
+    case SPAR_DEFMACRO:
+      spar_internal_error (sparp, "sparp_" "tree_full_clone_int(): attempt of copying a macro definition");
+      return NULL;
+    case SPAR_MACROCALL:
+      tgt = (SPART *)t_box_copy ((caddr_t) orig);
+      /*tgt->_.macrocall.mname = t_box_copy (orig->_.macrocall.mname);*/
+      tgt->_.macrocall.argtrees = sparp_treelist_full_clone_int (sparp, orig->_.macrocall.argtrees, parent_gp);
+      tgt->_.macrocall.context_graph = sparp_tree_full_clone_int (sparp, orig->_.macrocall.context_graph, parent_gp);
+      return tgt;
+    case SPAR_MACROPU:
+      tgt = (SPART *)t_box_copy ((caddr_t) orig);
+      /*tgt->_.macropu.pname = t_box_copy (orig->_.macropu.pname);*/
+      return tgt;
 /* Add more cases right above this line when introducing more SPAR_nnn constants */
     default: break; /* No need to copy names and literals because we will never change them in-place. */
     }
@@ -2516,13 +3082,13 @@ sparp_gp_full_clone (sparp_t *sparp, SPART *gp)
 SPART *
 sparp_tree_full_copy (sparp_t *sparp, const SPART *orig, const SPART *parent_gp)
 {
-  int fld_ctr, eq_idx;
+  int defctr, defcount, fld_ctr, eq_idx;
   SPART *tgt;
   switch (SPART_TYPE (orig))
     {
     case SPAR_ALIAS:
       tgt = (SPART *)t_box_copy ((caddr_t) orig);
-      tgt->_.alias.aname = t_box_copy (orig->_.alias.aname);
+      tgt->_.alias.aname = (caddr_t)sparp_tree_full_copy (sparp, (SPART *)(orig->_.alias.aname), parent_gp); /* not t_box_copy, because it can be macropu */
       tgt->_.alias.arg = sparp_tree_full_copy (sparp, orig->_.alias.arg, parent_gp);
       return tgt;
     case SPAR_BLANK_NODE_LABEL: case SPAR_VARIABLE:
@@ -2539,7 +3105,9 @@ sparp_tree_full_copy (sparp_t *sparp, const SPART *orig, const SPART *parent_gp)
       tgt = (SPART *)t_box_copy ((caddr_t) orig);
       tgt->_.gp.members = sparp_treelist_full_copy (sparp, orig->_.gp.members, (SPART *) orig);
       tgt->_.gp.filters = sparp_treelist_full_copy (sparp, orig->_.gp.filters, (SPART *) orig);
+      tgt->_.gp.subquery = sparp_tree_full_copy (sparp, orig->_.gp.subquery, (SPART *) orig);
       tgt->_.gp.equiv_indexes = (ptrlong *)t_box_copy ((caddr_t)(orig->_.gp.equiv_indexes));
+      tgt->_.gp.options = sparp_treelist_full_copy (sparp, orig->_.gp.options, (SPART *) orig);
       return tgt;
     case SPAR_LIT: case SPAR_QNAME: /* case SPAR_QNAME_NS: */
       return (SPART *)t_full_box_copy_tree ((caddr_t)orig);
@@ -2600,6 +3168,34 @@ sparp_tree_full_copy (sparp_t *sparp, const SPART *orig, const SPART *parent_gp)
       tgt = (SPART *)t_box_copy ((caddr_t) orig);
       tgt->_.list.items = sparp_treelist_full_copy (sparp, orig->_.list.items, parent_gp);
       return tgt;
+    case SPAR_SERVICE_INV:
+      tgt = (SPART *)t_box_copy ((caddr_t) orig);
+      tgt->_.sinv.iri_params = sparp_treelist_full_copy (sparp, orig->_.sinv.iri_params, parent_gp);
+      tgt->_.sinv.param_varnames = (caddr_t *)t_box_copy ((caddr_t)(orig->_.sinv.param_varnames));
+      tgt->_.sinv.rset_varnames = (caddr_t *)t_box_copy ((caddr_t)(orig->_.sinv.rset_varnames));
+      tgt->_.sinv.defines = (SPART **)t_box_copy ((caddr_t)(orig->_.sinv.defines));
+      defcount = BOX_ELEMENTS_0 (tgt->_.sinv.defines);
+      for (defctr = 1; defctr < defcount; defctr += 2)
+        {
+          SPART ***vals = (SPART ***)(t_box_copy ((caddr_t)(orig->_.sinv.defines[defctr])));
+          int valctr, valcount = BOX_ELEMENTS_0 (vals);
+          tgt->_.sinv.defines[defctr] = (void *)vals;
+          for (valctr = valcount; valctr--; /* no step */)
+            vals[valctr] = sparp_treelist_full_copy (sparp, vals[valctr], parent_gp);
+        }
+      tgt->_.sinv.sources = sparp_treelist_full_copy (sparp, orig->_.sinv.sources, parent_gp);
+      return tgt;
+    case SPAR_DEFMACRO:
+      spar_internal_error (sparp, "sparp_" "tree_full_copy(): should not copy macro defs");
+    case SPAR_MACROCALL:
+      tgt = (SPART *)t_box_copy ((caddr_t) orig);
+      tgt->_.macrocall.mname = t_box_copy (orig->_.macrocall.mname);
+      tgt->_.macrocall.argtrees = sparp_treelist_full_copy (sparp, orig->_.macrocall.argtrees, parent_gp);
+      tgt->_.macrocall.context_graph = sparp_tree_full_copy (sparp, orig->_.macrocall.context_graph, parent_gp);
+      return tgt;
+    case SPAR_MACROPU:
+      tgt = (SPART *)t_box_copy ((caddr_t) orig);
+      return tgt;
 /* Add more cases right above this line when introducing more SPAR_nnn constants */
     default: break; /* No need to copy names and literals because we will never change them in-place. */
     }
@@ -3310,7 +3906,6 @@ sparp_find_origin_of_external_var (sparp_t *sparp, SPART *var, int find_exact_sp
     {
       sparp_equiv_t *esub_eq = SPARP_EQUIV (sparp, subeq_idx);
       SPART *esub_gp = esub_eq->e_gp;
-      SPART *rv;
       if (SELECT_L != esub_gp->_.gp.subtype)
         continue;
       esub_res_eq = esub_eq;
@@ -3321,6 +3916,7 @@ sparp_find_origin_of_external_var (sparp_t *sparp, SPART *var, int find_exact_sp
   spar_internal_error (sparp, "sparp_" "find_origin_of_external_var(): external source equiv is found, external source var is not");
 make_rv:
   rv = (SPART *)t_alloc_box (sizeof (SPART), DV_ARRAY_OF_POINTER);
+  rv->type = SPAR_RETVAL;
   rv->_.retval.equiv_idx = esub_res_eq->e_own_idx;
   rv->_.retval.gp = esub_res_gp;
   memcpy (&(rv->_.retval.rvr), &(esub_res_eq->e_rvr), sizeof (rdf_val_range_t));
@@ -3679,6 +4275,8 @@ spart_dump_opname (ptrlong opname, int is_op)
     case CONSTRUCT_L: return "CONSTRUCT result-mode";
     case CREATE_L: return "quad mapping name";
     case DATATYPE_L: return "DATATYPE builtin";
+    case DEFAULT_L: return "default graph context";
+    case DEFMACRO_L: return "DEFMACRO";
     case DESC_L: return "descending";
     case DESCRIBE_L: return "DESCRIBE result-mode";
     case DISTINCT_L: return "SELECT DISTINCT result-mode";
@@ -3686,17 +4284,12 @@ spart_dump_opname (ptrlong opname, int is_op)
     case FILTER_L: return "FILTER";
     /* case FROM_L: return "FROM"; */
     case GRAPH_L: return "GRAPH gp";
-    case IRI_L: return "IRI builtin";
     case IN_L: return "IN";
-    case isBLANK_L: return "isBLANK builtin";
-    case isIRI_L: return "isIRI builtin";
-    case isLITERAL_L: return "isLITERAL builtin";
-    case isREF_L: return "isREF builtin";
-    case isURI_L: return "isURI builtin";
+    case IRI_L: return "IRI builtin";
     case LANG_L: return "LANG builtin";
-    case LANGMATCHES_L: return "LANGMATCHES builtin";
     case LIKE_L: return "LIKE";
     case LIMIT_L: return "LIMIT";
+    case MACRO_L: return "macro invocation";
     /* case NAMED_L: return "NAMED"; */
     case NIL_L: return "NIL";
     case OBJECT_L: return "OBJECT";
@@ -3706,12 +4299,9 @@ spart_dump_opname (ptrlong opname, int is_op)
     case ORDER_L: return "ORDER";
     case PREDICATE_L: return "PREDICATE";
     case PREFIX_L: return "PREFIX";
-    case REGEX_L: return "REGEX builtin";
-    case SAMETERM_L: return "sameTerm builtin";
     case SCORE_L: return "SCORE";
     case SCORE_LIMIT_L: return "SCORE_LIMIT";
     case SELECT_L: return "SELECT result-mode";
-    case STR_L: return "STR builtin";
     case SUBJECT_L: return "SUBJECT";
     case true_L: return "true boolean";
     case UNION_L: return "UNION gp";
@@ -3996,7 +4586,10 @@ spart_dump (void *tree_arg, dk_session_t *ses, int indent, const char *title, in
 	    {
 	      sprintf (buf, "BUILT-IN CALL:");
 	      SES_PRINT (ses, buf);
-	      spart_dump_long ((void *)(tree->_.builtin.btype), ses, -1);
+	      if (tree->_.builtin.desc_ofs)
+	        SES_PRINT (ses, sparp_bif_descs[tree->_.builtin.desc_ofs].sbd_name);
+              else
+	        spart_dump_long ((void *)(tree->_.builtin.btype), ses, -1);
 	      spart_dump (tree->_.builtin.args, ses, indent+2, "ARGUMENT", -2);
 	      break;
 	    }
@@ -4179,7 +4772,8 @@ spart_dump (void *tree_arg, dk_session_t *ses, int indent, const char *title, in
                 default: GPF_T;
                 }
 	      SES_PRINT (ses, buf);
-	      spart_dump (tree->_.graph.iri, ses, indent+2, "IRI", 0);
+              if (NULL != tree->_.graph.iri)
+	        spart_dump (tree->_.graph.iri, ses, indent+2, "IRI", 0);
               if (NULL != tree->_.graph.expn)
 	        spart_dump (tree->_.graph.expn, ses, indent+2, "EXPN", 0);
 	      break;
@@ -4198,6 +4792,38 @@ spart_dump (void *tree_arg, dk_session_t *ses, int indent, const char *title, in
 	      spart_dump (tree->_.list.items, ses, indent+2, "ITEMS", -2);
 	      break;
 	    }
+          case SPAR_DEFMACRO:
+            {
+              int namectr, namecount;
+              spart_dump (tree->_.defmacro.mname, ses, indent+2, "DEFINITION OF MACRO NAME", 0);
+              spart_dump (tree->_.defmacro.quad_pattern, ses, indent+2, "QUAD PATTERN ITEMS", -2);
+              namecount = BOX_ELEMENTS_0 (tree->_.defmacro.paramnames);
+              for (namectr = 0; namectr < namecount; namectr++)
+                spart_dump (tree->_.defmacro.paramnames[namectr], ses, indent+2, "PARAMETER", 0);
+              namecount = BOX_ELEMENTS_0 (tree->_.defmacro.localnames);
+              for (namectr = 0; namectr < namecount; namectr++)
+                spart_dump (tree->_.defmacro.localnames[namectr], ses, indent+2, "LOCAL VAR", 0);
+              spart_dump (tree->_.defmacro.body, ses, indent+2, "BODY", -1);
+              if (tree->_.defmacro.aggregate_count)
+                spart_dump ((void *)(tree->_.defmacro.aggregate_count), ses, indent+2, "AGGREGATE COUNT", 0);
+              break;
+            }
+          case SPAR_MACROCALL:
+            {
+              int argctr, argcount = BOX_ELEMENTS (tree->_.macrocall.argtrees);
+	      sprintf (buf, "MACRO <%.50s> CALL, id %s", tree->_.macrocall.mname, tree->_.macrocall.mid);
+	      SES_PRINT (ses, buf);
+              spart_dump (tree->_.macrocall.argtrees, ses, indent+2, "CONTEXT GRAPH", -1);
+              for (argctr = 0; argctr < argcount; argctr++)
+                spart_dump (tree->_.macrocall.argtrees[argctr], ses, indent+2, "ARGUMENT", -1);
+              break;
+            }
+          case SPAR_MACROPU:
+            {
+              sprintf (buf, "MACRO PARAM %s (#%ld), type %ld\n", tree->_.macropu.pname, (long)(tree->_.macropu.pindex), (long)(tree->_.macropu.pumode));
+              SES_PRINT (ses, buf);
+              break;
+            }
 	  default:
 	    {
 	      sprintf (buf, "NODE OF TYPE %ld (", (ptrlong)(tree->type));
diff --git a/libsrc/Wi/sparqld.c b/libsrc/Wi/sparqld.c
index ad309ac..ea61944 100644
--- a/libsrc/Wi/sparqld.c
+++ b/libsrc/Wi/sparqld.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparqld.c,v 1.8.2.18 2011/01/28 13:34:04 source Exp $
+ *  $Id: sparqld.c,v 1.8.2.24 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -182,14 +182,9 @@ ssg_sd_opname (ptrlong opname, int is_op)
     case FILTER_L: return "FILTER";
     /* case FROM_L: return "FROM"; */
     /* case GRAPH_L: return "GRAPH"; */
-    case IRI_L: return "IRI";
     case IN_L: return "IN";
-    case isBLANK_L: return "isBLANK";
-    case isIRI_L: return "isIRI";
-    case isLITERAL_L: return "isLITERAL";
-    case isURI_L: return "isIRI"; /* no isURI in SPARQL */
+    case IRI_L: return "IRI";
     case LANG_L: return "LANG";
-    case LANGMATCHES_L: return "LANGMATCHES";
     case LIKE_L: return "LIKE";
     case LIMIT_L: return "LIMIT";
     /* case NAMED_L: return "FROM NAMED"; */
@@ -201,12 +196,9 @@ ssg_sd_opname (ptrlong opname, int is_op)
     case ORDER_L: return "ORDER";
     /* case PREDICATE_L: return "PREDICATE"; */
     /* case PREFIX_L: return "PREFIX"; */
-    case REGEX_L: return "REGEX";
-    case SAMETERM_L: return "sameTerm";
     case SCORE_L: return "SCORE";
     case SCORE_LIMIT_L: return "SCORE_LIMIT";
     case SELECT_L: return "SELECT";
-    case STR_L: return "STR";
     /* case SUBJECT_L: return "SUBJECT"; */
     case true_L: return "true";
     case UNION_L: return "UNION";
@@ -289,7 +281,7 @@ ssg_sdprin_varname (spar_sqlgen_t *ssg, ccaddr_t vname)
       if (!(SSG_SD_GLOBALS & ssg->ssg_sd_flags))
     spar_error (ssg->ssg_sparp, "%.100s does not support SPARQL-BI extensions (like external parameters) so SPARQL query can not be composed", ssg->ssg_sd_service_name);
     }
-  else if ((strchr (vname, '_') || strchr (vname, '"') || strchr (vname, ':')) && !(SSG_SD_BI & ssg->ssg_sd_flags))
+  else if ((/* strchr (vname, '_') || --- Bug 14613 */ strchr (vname, '"') || strchr (vname, ':')) && !(SSG_SD_BI & ssg->ssg_sd_flags))
     spar_error (ssg->ssg_sparp, "%.100s does not support SPARQL-BI extensions (say, SQL-like names of variables) so SPARQL query can not be composed", ssg->ssg_sd_service_name);
   ssg_putchar ('?');
   ssg_puts (vname);
@@ -517,8 +509,10 @@ void ssg_sdprint_tree (spar_sqlgen_t *ssg, SPART *tree)
                 ssg->ssg_indent -= 2;
               }
             return;
-          }
-        ssg_puts (ssg_sd_opname (tree->_.builtin.btype, 0));
+          default:
+            {
+              const sparp_bif_desc_t *sbd = sparp_bif_descs + tree->_.builtin.desc_ofs;
+              ssg_puts (sbd->sbd_name);
         ssg_putchar ('(');
         ssg->ssg_indent++;
         ssg_sdprint_tree_list (ssg, tree->_.builtin.args, ',');
@@ -526,11 +520,25 @@ void ssg_sdprint_tree (spar_sqlgen_t *ssg, SPART *tree)
         ssg->ssg_indent--;
         return;
       }
+          }
+      }
     case SPAR_FUNCALL:
       {
-        int argcount = BOX_ELEMENTS (tree->_.funcall.argtrees);
+        caddr_t fname = tree->_.funcall.qname;
         ssg_putchar (' ');
-        ssg_sdprin_qname (ssg, (SPART *)(tree->_.funcall.qname));
+        if (!strncmp (fname, "xpath:", 6))
+          {
+            char *colon = strrchr (fname + 6, ':');
+            if (NULL == colon)
+          fname = t_box_dv_short_string (fname + 6);
+            else
+              {
+                colon[0] = '\0';
+                fname = t_box_sprintf (400, "%.200s%.100s", fname+6, colon+1);
+                colon[0] = ':';
+              }
+          }
+        ssg_sdprin_qname (ssg, (SPART *)(fname));
             ssg_putchar ('(');
             ssg->ssg_indent++;
             ssg_sdprint_tree_list (ssg, tree->_.funcall.argtrees, ',');
@@ -1033,6 +1041,8 @@ void ssg_sdprint_tree (spar_sqlgen_t *ssg, SPART *tree)
       }
     case SPAR_GRAPH:
       {
+        if (NULL == tree->_.graph.iri)
+          spar_error (ssg->ssg_sparp, "%.100s can be invoked only with constant graphs in FROM... clauses so SPARQL query can not be composed", ssg->ssg_sd_service_name);
         switch (tree->_.graph.subtype)
           {
           case SPART_GRAPH_FROM:
diff --git a/libsrc/Wi/sparqlwords.gperf b/libsrc/Wi/sparqlwords.gperf
new file mode 100644
index 0000000..f4858cf
--- /dev/null
+++ b/libsrc/Wi/sparqlwords.gperf
@@ -0,0 +1,195 @@
+/*
+ *  $Id: sparqlwords.gperf,v 1.1.2.3 2012/03/02 23:57:50 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+struct sparql_keyword { char *kwd; int token; int subtype; };
+
+%%
+"ABS",			SPARQL_BIF		, SPAR_BIF_ABS
+"ADD",			ADD_L			, 0
+"ALL",			ALL_L			, 0
+"ALTER",		ALTER_L			, 0
+"AND",			_AMP_AMP		, 0
+"AS",			AS_L			, 0
+"ASC",			ASC_L			, 0
+"ASK",			ASK_L			, 0
+"ATTACH",		ATTACH_L		, 0
+"AVG",			AVG_L			, 0
+"BASE",			BASE_L			, 0
+"BINDINGS",		BINDINGS_L		, 0
+"BIJECTION",		BIJECTION_L		, 0
+"BNODE",		SPARQL_BIF		, SPAR_BIF_BNODE
+"BOUND",		BOUND_L			, 0
+"BY",			BY_L			, 0
+"CLASS",		CLASS_L			, 0
+"CLEAR",		CLEAR_L			, 0
+"CEIL",			SPARQL_BIF		, SPAR_BIF_CEIL
+"COALESCE",		SPARQL_BIF		, SPAR_BIF_COALESCE
+"CONCAT",		SPARQL_BIF		, SPAR_BIF_CONCAT
+"CONSTRUCT",		CONSTRUCT_L		, 0
+"CONTAINS",		SPARQL_BIF		, SPAR_BIF_CONTAINS
+"COPY",			COPY_L			, 0
+"COUNT",		COUNT_L			, 0
+"CREATE",		CREATE_L		, 0
+"DATA",			DATA_L			, 0
+"DATATYPE",		DATATYPE_L		, 0
+"DAY",			SPARQL_BIF		, SPAR_BIF_DAY
+"DEFAULT",		DEFAULT_L		, 0
+"DEFINE",		DEFINE_L		, 0
+"DEFMACRO",		DEFMACRO_L		, 0
+"DELETE",		DELETE_L		, 0
+"DEREF",		DEREF_L			, 0
+"DESC",			DESC_L			, 0
+"DESCRIBE",		DESCRIBE_L		, 0
+"DETACH",		DETACH_L		, 0
+"DISTINCT",		DISTINCT_L		, 0
+"DROP",			DROP_L			, 0
+"ENCODE_FOR_URI",	SPARQL_BIF		, SPAR_BIF_ENCODE_FOR_URI
+"EXCLUSIVE",		EXCLUSIVE_L		, 0
+"EXISTS",		EXISTS_L		, 0
+"FALSE",		false_L			, 0
+"FILTER",		FILTER_L		, 0
+"FLOOR",		SPARQL_BIF		, SPAR_BIF_FLOOR
+"FROM",			FROM_L			, 0
+"FUNCTION",		FUNCTION_L		, 0
+"HOURS",		SPARQL_BIF		, SPAR_BIF_HOURS
+"GRAPH",		GRAPH_L			, 0
+"GROUP",		GROUP_L			, 0
+"HAVING",		HAVING_L		, 0
+"IF",			SPARQL_BIF		, SPAR_BIF_IF
+"IFP",			IFP_L			, 0
+"IDENTIFIED",		IDENTIFIED_L		, 0
+"IN",			IN_L			, 0
+"INDEX",		INDEX_L			, 0
+"INFERENCE",		INFERENCE_L		, 0
+"INSERT",		INSERT_L		, 0
+"INTO",			INTO_L			, 0
+"IRI",			IRI_L			, 0
+"ISBLANK",		SPARQL_BIF		, SPAR_BIF_ISBLANK
+"ISIRI",		SPARQL_BIF		, SPAR_BIF_ISIRI
+"ISLITERAL",		SPARQL_BIF		, SPAR_BIF_ISLITERAL
+"ISNUMERIC",		SPARQL_BIF		, SPAR_BIF_ISNUMERIC
+"ISREF",		SPARQL_BIF		, SPAR_BIF_ISREF
+"ISURI",		SPARQL_BIF		, SPAR_BIF_ISURI
+"LANG",			LANG_L			, 0
+"LANGMATCHES",		SPARQL_BIF		, SPAR_BIF_LANGMATCHES
+"LCASE",		SPARQL_BIF		, SPAR_BIF_LCASE
+"LIBRARY",		LIBRARY_L		, 0
+"LIKE",			LIKE_L			, 0
+"LIMIT",		LIMIT_L			, 0
+"LITERAL",		LITERAL_L		, 0
+"LOCAL",		LOCAL_L			, 0
+"LOAD",			LOAD_L			, 0
+"MACRO",		MACRO_L			, 0
+"MAKE",			MAKE_L			, 0
+"MAP",			MAP_L			, 0
+"MAX",			MAX_L			, 0
+"MD5",			SPARQL_BIF		, SPAR_BIF_MD5
+"MIN",			MIN_L			, 0
+"MINUS",		MINUS_L			, 0
+"MINUTES",		SPARQL_BIF		, SPAR_BIF_MINUTES
+"MODIFY",		MODIFY_L		, 0
+"MONTH",		SPARQL_BIF		, SPAR_BIF_MONTH
+"MOVE",			MOVE_L			, 0
+"NAMED",		NAMED_L			, 0
+"NIL",			NIL_L			, 0
+"NOT",			NOT_L			, 0
+"NOW",			SPARQL_BIF		, SPAR_BIF_NOW
+"NULL",			NULL_L			, 0
+"OBJECT",		OBJECT_L		, 0
+"OF",			OF_L			, 0
+"OFFBAND",		OFFBAND_L		, 0
+"OFFSET",		OFFSET_L		, 0
+"OPTIONAL",		OPTIONAL_L		, 0
+"OPTION",		OPTION_L		, 0
+"OR",			_BAR_BAR		, 0
+"ORDER",		ORDER_L			, 0
+"PREDICATE",		PREDICATE_L		, 0
+"PREFIX",		PREFIX_L		, 0
+"QUAD",			QUAD_L			, 0
+"RAND",			SPARQL_BIF		, SPAR_BIF_RAND
+"REGEX",		SPARQL_BIF		, SPAR_BIF_REGEX
+"REDUCED",		REDUCED_L		, 0
+"REPLACE",		SPARQL_BIF		, SPAR_BIF_REPLACE
+"RETURNS",		RETURNS_L		, 0
+"ROUND",		SPARQL_BIF		, SPAR_BIF_ROUND
+"SCORE",		SCORE_L			, 0
+"SCORE_LIMIT",		SCORE_LIMIT_L		, 0
+"SAME_AS",		SAME_AS_L		, 0
+"SAME_AS_O",		SAME_AS_O_L		, 0
+"SAME_AS_P",		SAME_AS_P_L		, 0
+"SAME_AS_S",		SAME_AS_S_L		, 0
+"SAME_AS_S_O",		SAME_AS_S_O_L		, 0
+"SAMETERM",		SPARQL_BIF		, SPAR_BIF_SAMETERM
+"SECONDS",		SPARQL_BIF		, SPAR_BIF_SECONDS
+"SELECT",		SELECT_L		, 0
+"SERVICE",		SERVICE_L		, 0
+"SHA1",			SPARQL_BIF		, SPAR_BIF_SHA1
+"SHA224",		SPARQL_BIF		, SPAR_BIF_SHA224
+"SHA256",		SPARQL_BIF		, SPAR_BIF_SHA256
+"SHA384",		SPARQL_BIF		, SPAR_BIF_SHA384
+"SHA512",		SPARQL_BIF		, SPAR_BIF_SHA512
+"SILENT",		SILENT_L		, 0
+"SOFT",			SOFT_L			, 0
+"SOURCE",		GRAPH_L			, 0
+"SQLQUERY",		SQLQUERY_L		, 0
+"STORAGE",		STORAGE_L		, 0
+"STR",			SPARQL_BIF		, SPAR_BIF_STR
+"STRDT",		SPARQL_BIF		, SPAR_BIF_STRDT
+"STRENDS",		SPARQL_BIF		, SPAR_BIF_STRENDS
+"STRLANG",		SPARQL_BIF		, SPAR_BIF_STRLANG
+"STRLEN",		SPARQL_BIF		, SPAR_BIF_STRLEN
+"STRSTARTS",		SPARQL_BIF		, SPAR_BIF_STRSTARTS
+"SUBCLASS",		SUBCLASS_L		, 0
+"SUBJECT",		SUBJECT_L		, 0
+"SUBSTR",		SPARQL_BIF		, SPAR_BIF_SUBSTR
+"SUM",			SUM_L			, 0
+"TABLE_OPTION",		TABLE_OPTION_L		, 0
+"TEXT",			TEXT_L			, 0
+"TIMEZONE",		SPARQL_BIF		, SPAR_BIF_TIMEZONE
+"TO",			TO_L			, 0
+"TRANSITIVE",		TRANSITIVE_L		, 0
+"TRUE",			true_L			, 0
+"TZ",			SPARQL_BIF		, SPAR_BIF_TZ
+"T_CYCLES_ONLY",	T_CYCLES_ONLY_L		, 0
+"T_DIRECTION",		T_DIRECTION_L		, 0
+"T_DISTINCT",		T_DISTINCT_L		, 0
+"T_END_FLAG",		T_END_FLAG_L		, 0
+"T_EXISTS",		T_EXISTS_L		, 0
+"T_FINAL_AS",		T_FINAL_AS_L		, 0
+"T_IN",			T_IN_L			, 0
+"T_MAX",		T_MAX_L			, 0
+"T_MIN",		T_MIN_L			, 0
+"T_OUT",		T_OUT_L			, 0
+"T_NO_CYCLES",		T_NO_CYCLES_L		, 0
+"T_NO_ORDER",		T_NO_ORDER_L		, 0
+"T_SHORTEST_ONLY",	T_SHORTEST_ONLY_L	, 0
+"T_STEP",		T_STEP_L		, 0
+"UCASE",		SPARQL_BIF		, SPAR_BIF_UCASE
+"UNBOUND",		UNBOUND_L		, 0
+"UNION",		UNION_L			, 0
+"URI",			SPARQL_BIF		, SPAR_BIF_URI
+"USING",		USING_L			, 0
+"WHERE",		WHERE_L			, 0
+"WITH",			WITH_L			, 0
+"XML",			XML_L			, 0
+"YEAR",			SPARQL_BIF		, SPAR_BIF_YEAR
diff --git a/libsrc/Wi/sparqlwords.h b/libsrc/Wi/sparqlwords.h
new file mode 100644
index 0000000..8c90228
--- /dev/null
+++ b/libsrc/Wi/sparqlwords.h
@@ -0,0 +1,623 @@
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: /usr/bin/gperf -aCDGptr -Kkwd -L ANSI-C -k'1,2,3,5,7,$' --ignore-case -Nsparql_lex_hash_kw sparqlwords.gperf  */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf at gnu.org>."
+#endif
+
+#line 24 "sparqlwords.gperf"
+struct sparql_keyword { char *kwd; int token; int subtype; };
+
+#define TOTAL_KEYWORDS 169
+#define MIN_WORD_LENGTH 2
+#define MAX_WORD_LENGTH 15
+#define MIN_HASH_VALUE 151
+#define MAX_HASH_VALUE 1038
+/* maximum key range = 888, duplicates = 0 */
+
+#ifndef GPERF_DOWNCASE
+#define GPERF_DOWNCASE 1
+static unsigned char gperf_downcase[256] =
+  {
+      0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,
+     15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,
+     30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,
+     45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,
+     60,  61,  62,  63,  64,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
+    107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+    122,  91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104,
+    105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+    120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+    135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+    150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+    165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+    180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+    195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+    210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+    225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+    240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+    255
+  };
+#endif
+
+#ifndef GPERF_CASE_STRCMP
+#define GPERF_CASE_STRCMP 1
+static int
+gperf_case_strcmp (register const char *s1, register const char *s2)
+{
+  for (;;)
+    {
+      unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
+      unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
+      if (c1 != 0 && c1 == c2)
+        continue;
+      return (int)c1 - (int)c2;
+    }
+}
+#endif
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (register const char *str, register unsigned int len)
+{
+  static const unsigned short asso_values[] =
+    {
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,  241,
+       171, 1039,   33,  105,  138, 1039,  239, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039,  239,    5,   85,   56,  114,
+        66,  125,  145,   17,  248,  112,  202,   45,   99,  117,
+       165,   41,  164,  110,  190,  151,  149,  245,  113,   92,
+        64, 1039, 1039, 1039, 1039,  126, 1039,  239,    5,   85,
+        56,  114,   66,  125,  145,   17,  248,  112,  202,   45,
+        99,  117,  165,   41,  164,  110,  190,  151,  149,  245,
+       113,   92,   64, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039,
+      1039, 1039, 1039, 1039, 1039, 1039
+    };
+  register int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[6]];
+      /*FALLTHROUGH*/
+      case 6:
+      case 5:
+        hval += asso_values[(unsigned char)str[4]];
+      /*FALLTHROUGH*/
+      case 4:
+      case 3:
+        hval += asso_values[(unsigned char)str[2]];
+      /*FALLTHROUGH*/
+      case 2:
+        hval += asso_values[(unsigned char)str[1]];
+      /*FALLTHROUGH*/
+      case 1:
+        hval += asso_values[(unsigned char)str[0]];
+        break;
+    }
+  return hval + asso_values[(unsigned char)str[len - 1]];
+}
+
+static const struct sparql_keyword wordlist[] =
+  {
+#line 78 "sparqlwords.gperf"
+    {"IF",			SPARQL_BIF		, SPAR_BIF_IF},
+#line 88 "sparqlwords.gperf"
+    {"ISIRI",		SPARQL_BIF		, SPAR_BIF_ISIRI},
+#line 42 "sparqlwords.gperf"
+    {"BY",			BY_L			, 0},
+#line 81 "sparqlwords.gperf"
+    {"IN",			IN_L			, 0},
+#line 86 "sparqlwords.gperf"
+    {"IRI",			IRI_L			, 0},
+#line 119 "sparqlwords.gperf"
+    {"OF",			OF_L			, 0},
+#line 107 "sparqlwords.gperf"
+    {"MIN",			MIN_L			, 0},
+#line 106 "sparqlwords.gperf"
+    {"MD5",			SPARQL_BIF		, SPAR_BIF_MD5},
+#line 92 "sparqlwords.gperf"
+    {"ISURI",		SPARQL_BIF		, SPAR_BIF_ISURI},
+#line 172 "sparqlwords.gperf"
+    {"TZ",			SPARQL_BIF		, SPAR_BIF_TZ},
+#line 190 "sparqlwords.gperf"
+    {"URI",			SPARQL_BIF		, SPAR_BIF_URI},
+#line 165 "sparqlwords.gperf"
+    {"SUM",			SUM_L			, 0},
+#line 61 "sparqlwords.gperf"
+    {"DESC",			DESC_L			, 0},
+#line 38 "sparqlwords.gperf"
+    {"BINDINGS",		BINDINGS_L		, 0},
+#line 110 "sparqlwords.gperf"
+    {"MODIFY",		MODIFY_L		, 0},
+#line 108 "sparqlwords.gperf"
+    {"MINUS",		MINUS_L			, 0},
+#line 41 "sparqlwords.gperf"
+    {"BOUND",		BOUND_L			, 0},
+#line 72 "sparqlwords.gperf"
+    {"FROM",			FROM_L			, 0},
+#line 82 "sparqlwords.gperf"
+    {"INDEX",		INDEX_L			, 0},
+#line 28 "sparqlwords.gperf"
+    {"ADD",			ADD_L			, 0},
+#line 79 "sparqlwords.gperf"
+    {"IFP",			IFP_L			, 0},
+#line 45 "sparqlwords.gperf"
+    {"CEIL",			SPARQL_BIF		, SPAR_BIF_CEIL},
+#line 169 "sparqlwords.gperf"
+    {"TO",			TO_L			, 0},
+#line 85 "sparqlwords.gperf"
+    {"INTO",			INTO_L			, 0},
+#line 91 "sparqlwords.gperf"
+    {"ISREF",		SPARQL_BIF		, SPAR_BIF_ISREF},
+#line 112 "sparqlwords.gperf"
+    {"MOVE",			MOVE_L			, 0},
+#line 179 "sparqlwords.gperf"
+    {"T_IN",			T_IN_L			, 0},
+#line 124 "sparqlwords.gperf"
+    {"OR",			_BAR_BAR		, 0},
+#line 97 "sparqlwords.gperf"
+    {"LIKE",			LIKE_L			, 0},
+#line 31 "sparqlwords.gperf"
+    {"AND",			_AMP_AMP		, 0},
+#line 40 "sparqlwords.gperf"
+    {"BNODE",		SPARQL_BIF		, SPAR_BIF_BNODE},
+#line 57 "sparqlwords.gperf"
+    {"DEFINE",		DEFINE_L		, 0},
+#line 32 "sparqlwords.gperf"
+    {"AS",			AS_L			, 0},
+#line 50 "sparqlwords.gperf"
+    {"COPY",			COPY_L			, 0},
+#line 27 "sparqlwords.gperf"
+    {"ABS",			SPARQL_BIF		, SPAR_BIF_ABS},
+#line 189 "sparqlwords.gperf"
+    {"UNION",		UNION_L			, 0},
+#line 60 "sparqlwords.gperf"
+    {"DEREF",		DEREF_L			, 0},
+#line 37 "sparqlwords.gperf"
+    {"BASE",			BASE_L			, 0},
+#line 39 "sparqlwords.gperf"
+    {"BIJECTION",		BIJECTION_L		, 0},
+#line 55 "sparqlwords.gperf"
+    {"DAY",			SPARQL_BIF		, SPAR_BIF_DAY},
+#line 64 "sparqlwords.gperf"
+    {"DISTINCT",		DISTINCT_L		, 0},
+#line 152 "sparqlwords.gperf"
+    {"SOFT",			SOFT_L			, 0},
+#line 128 "sparqlwords.gperf"
+    {"QUAD",			QUAD_L			, 0},
+#line 113 "sparqlwords.gperf"
+    {"NAMED",		NAMED_L			, 0},
+#line 65 "sparqlwords.gperf"
+    {"DROP",			DROP_L			, 0},
+#line 80 "sparqlwords.gperf"
+    {"IDENTIFIED",		IDENTIFIED_L		, 0},
+#line 66 "sparqlwords.gperf"
+    {"ENCODE_FOR_URI",	SPARQL_BIF		, SPAR_BIF_ENCODE_FOR_URI},
+#line 105 "sparqlwords.gperf"
+    {"MAX",			MAX_L			, 0},
+#line 103 "sparqlwords.gperf"
+    {"MAKE",			MAKE_L			, 0},
+#line 33 "sparqlwords.gperf"
+    {"ASC",			ASC_L			, 0},
+#line 114 "sparqlwords.gperf"
+    {"NIL",			NIL_L			, 0},
+#line 188 "sparqlwords.gperf"
+    {"UNBOUND",		UNBOUND_L		, 0},
+#line 90 "sparqlwords.gperf"
+    {"ISNUMERIC",		SPARQL_BIF		, SPAR_BIF_ISNUMERIC},
+#line 191 "sparqlwords.gperf"
+    {"USING",		USING_L			, 0},
+#line 168 "sparqlwords.gperf"
+    {"TIMEZONE",		SPARQL_BIF		, SPAR_BIF_TIMEZONE},
+#line 131 "sparqlwords.gperf"
+    {"REDUCED",		REDUCED_L		, 0},
+#line 135 "sparqlwords.gperf"
+    {"SCORE",		SCORE_L			, 0},
+#line 134 "sparqlwords.gperf"
+    {"ROUND",		SPARQL_BIF		, SPAR_BIF_ROUND},
+#line 68 "sparqlwords.gperf"
+    {"EXISTS",		EXISTS_L		, 0},
+#line 111 "sparqlwords.gperf"
+    {"MONTH",		SPARQL_BIF		, SPAR_BIF_MONTH},
+#line 121 "sparqlwords.gperf"
+    {"OFFSET",		OFFSET_L		, 0},
+#line 129 "sparqlwords.gperf"
+    {"RAND",			SPARQL_BIF		, SPAR_BIF_RAND},
+#line 181 "sparqlwords.gperf"
+    {"T_MIN",		T_MIN_L			, 0},
+#line 194 "sparqlwords.gperf"
+    {"XML",			XML_L			, 0},
+#line 83 "sparqlwords.gperf"
+    {"INFERENCE",		INFERENCE_L		, 0},
+#line 70 "sparqlwords.gperf"
+    {"FILTER",		FILTER_L		, 0},
+#line 62 "sparqlwords.gperf"
+    {"DESCRIBE",		DESCRIBE_L		, 0},
+#line 34 "sparqlwords.gperf"
+    {"ASK",			ASK_L			, 0},
+#line 109 "sparqlwords.gperf"
+    {"MINUTES",		SPARQL_BIF		, SPAR_BIF_MINUTES},
+#line 127 "sparqlwords.gperf"
+    {"PREFIX",		PREFIX_L		, 0},
+#line 153 "sparqlwords.gperf"
+    {"SOURCE",		GRAPH_L			, 0},
+#line 84 "sparqlwords.gperf"
+    {"INSERT",		INSERT_L		, 0},
+#line 180 "sparqlwords.gperf"
+    {"T_MAX",		T_MAX_L			, 0},
+#line 63 "sparqlwords.gperf"
+    {"DETACH",		DETACH_L		, 0},
+#line 115 "sparqlwords.gperf"
+    {"NOT",			NOT_L			, 0},
+#line 193 "sparqlwords.gperf"
+    {"WITH",			WITH_L			, 0},
+#line 87 "sparqlwords.gperf"
+    {"ISBLANK",		SPARQL_BIF		, SPAR_BIF_ISBLANK},
+#line 67 "sparqlwords.gperf"
+    {"EXCLUSIVE",		EXCLUSIVE_L		, 0},
+#line 120 "sparqlwords.gperf"
+    {"OFFBAND",		OFFBAND_L		, 0},
+#line 102 "sparqlwords.gperf"
+    {"MACRO",		MACRO_L			, 0},
+#line 167 "sparqlwords.gperf"
+    {"TEXT",			TEXT_L			, 0},
+#line 195 "sparqlwords.gperf"
+    {"YEAR",			SPARQL_BIF		, SPAR_BIF_YEAR},
+#line 104 "sparqlwords.gperf"
+    {"MAP",			MAP_L			, 0},
+#line 101 "sparqlwords.gperf"
+    {"LOAD",			LOAD_L			, 0},
+#line 171 "sparqlwords.gperf"
+    {"TRUE",			true_L			, 0},
+#line 151 "sparqlwords.gperf"
+    {"SILENT",		SILENT_L		, 0},
+#line 164 "sparqlwords.gperf"
+    {"SUBSTR",		SPARQL_BIF		, SPAR_BIF_SUBSTR},
+#line 156 "sparqlwords.gperf"
+    {"STR",			SPARQL_BIF		, SPAR_BIF_STR},
+#line 130 "sparqlwords.gperf"
+    {"REGEX",		SPARQL_BIF		, SPAR_BIF_REGEX},
+#line 143 "sparqlwords.gperf"
+    {"SECONDS",		SPARQL_BIF		, SPAR_BIF_SECONDS},
+#line 74 "sparqlwords.gperf"
+    {"HOURS",		SPARQL_BIF		, SPAR_BIF_HOURS},
+#line 145 "sparqlwords.gperf"
+    {"SERVICE",		SERVICE_L		, 0},
+#line 36 "sparqlwords.gperf"
+    {"AVG",			AVG_L			, 0},
+#line 98 "sparqlwords.gperf"
+    {"LIMIT",		LIMIT_L			, 0},
+#line 118 "sparqlwords.gperf"
+    {"OBJECT",		OBJECT_L		, 0},
+#line 96 "sparqlwords.gperf"
+    {"LIBRARY",		LIBRARY_L		, 0},
+#line 117 "sparqlwords.gperf"
+    {"NULL",			NULL_L			, 0},
+#line 93 "sparqlwords.gperf"
+    {"LANG",			LANG_L			, 0},
+#line 125 "sparqlwords.gperf"
+    {"ORDER",		ORDER_L			, 0},
+#line 52 "sparqlwords.gperf"
+    {"CREATE",		CREATE_L		, 0},
+#line 59 "sparqlwords.gperf"
+    {"DELETE",		DELETE_L		, 0},
+#line 160 "sparqlwords.gperf"
+    {"STRLEN",		SPARQL_BIF		, SPAR_BIF_STRLEN},
+#line 176 "sparqlwords.gperf"
+    {"T_END_FLAG",		T_END_FLAG_L		, 0},
+#line 123 "sparqlwords.gperf"
+    {"OPTION",		OPTION_L		, 0},
+#line 162 "sparqlwords.gperf"
+    {"SUBCLASS",		SUBCLASS_L		, 0},
+#line 175 "sparqlwords.gperf"
+    {"T_DISTINCT",		T_DISTINCT_L		, 0},
+#line 147 "sparqlwords.gperf"
+    {"SHA224",		SPARQL_BIF		, SPAR_BIF_SHA224},
+#line 173 "sparqlwords.gperf"
+    {"T_CYCLES_ONLY",	T_CYCLES_ONLY_L		, 0},
+#line 144 "sparqlwords.gperf"
+    {"SELECT",		SELECT_L		, 0},
+#line 187 "sparqlwords.gperf"
+    {"UCASE",		SPARQL_BIF		, SPAR_BIF_UCASE},
+#line 116 "sparqlwords.gperf"
+    {"NOW",			SPARQL_BIF		, SPAR_BIF_NOW},
+#line 186 "sparqlwords.gperf"
+    {"T_STEP",		T_STEP_L		, 0},
+#line 71 "sparqlwords.gperf"
+    {"FLOOR",		SPARQL_BIF		, SPAR_BIF_FLOOR},
+#line 53 "sparqlwords.gperf"
+    {"DATA",			DATA_L			, 0},
+#line 73 "sparqlwords.gperf"
+    {"FUNCTION",		FUNCTION_L		, 0},
+#line 174 "sparqlwords.gperf"
+    {"T_DIRECTION",		T_DIRECTION_L		, 0},
+#line 44 "sparqlwords.gperf"
+    {"CLEAR",		CLEAR_L			, 0},
+#line 47 "sparqlwords.gperf"
+    {"CONCAT",		SPARQL_BIF		, SPAR_BIF_CONCAT},
+#line 192 "sparqlwords.gperf"
+    {"WHERE",		WHERE_L			, 0},
+#line 51 "sparqlwords.gperf"
+    {"COUNT",		COUNT_L			, 0},
+#line 146 "sparqlwords.gperf"
+    {"SHA1",			SPARQL_BIF		, SPAR_BIF_SHA1},
+#line 69 "sparqlwords.gperf"
+    {"FALSE",		false_L			, 0},
+#line 76 "sparqlwords.gperf"
+    {"GROUP",		GROUP_L			, 0},
+#line 148 "sparqlwords.gperf"
+    {"SHA256",		SPARQL_BIF		, SPAR_BIF_SHA256},
+#line 137 "sparqlwords.gperf"
+    {"SAME_AS",		SAME_AS_L		, 0},
+#line 140 "sparqlwords.gperf"
+    {"SAME_AS_S",		SAME_AS_S_L		, 0},
+#line 43 "sparqlwords.gperf"
+    {"CLASS",		CLASS_L			, 0},
+#line 183 "sparqlwords.gperf"
+    {"T_NO_CYCLES",		T_NO_CYCLES_L		, 0},
+#line 177 "sparqlwords.gperf"
+    {"T_EXISTS",		T_EXISTS_L		, 0},
+#line 138 "sparqlwords.gperf"
+    {"SAME_AS_O",		SAME_AS_O_L		, 0},
+#line 49 "sparqlwords.gperf"
+    {"CONTAINS",		SPARQL_BIF		, SPAR_BIF_CONTAINS},
+#line 141 "sparqlwords.gperf"
+    {"SAME_AS_S_O",		SAME_AS_S_O_L		, 0},
+#line 95 "sparqlwords.gperf"
+    {"LCASE",		SPARQL_BIF		, SPAR_BIF_LCASE},
+#line 46 "sparqlwords.gperf"
+    {"COALESCE",		SPARQL_BIF		, SPAR_BIF_COALESCE},
+#line 77 "sparqlwords.gperf"
+    {"HAVING",		HAVING_L		, 0},
+#line 58 "sparqlwords.gperf"
+    {"DEFMACRO",		DEFMACRO_L		, 0},
+#line 163 "sparqlwords.gperf"
+    {"SUBJECT",		SUBJECT_L		, 0},
+#line 154 "sparqlwords.gperf"
+    {"SQLQUERY",		SQLQUERY_L		, 0},
+#line 149 "sparqlwords.gperf"
+    {"SHA384",		SPARQL_BIF		, SPAR_BIF_SHA384},
+#line 56 "sparqlwords.gperf"
+    {"DEFAULT",		DEFAULT_L		, 0},
+#line 166 "sparqlwords.gperf"
+    {"TABLE_OPTION",		TABLE_OPTION_L		, 0},
+#line 158 "sparqlwords.gperf"
+    {"STRENDS",		SPARQL_BIF		, SPAR_BIF_STRENDS},
+#line 142 "sparqlwords.gperf"
+    {"SAMETERM",		SPARQL_BIF		, SPAR_BIF_SAMETERM},
+#line 178 "sparqlwords.gperf"
+    {"T_FINAL_AS",		T_FINAL_AS_L		, 0},
+#line 139 "sparqlwords.gperf"
+    {"SAME_AS_P",		SAME_AS_P_L		, 0},
+#line 100 "sparqlwords.gperf"
+    {"LOCAL",		LOCAL_L			, 0},
+#line 182 "sparqlwords.gperf"
+    {"T_OUT",		T_OUT_L			, 0},
+#line 126 "sparqlwords.gperf"
+    {"PREDICATE",		PREDICATE_L		, 0},
+#line 75 "sparqlwords.gperf"
+    {"GRAPH",		GRAPH_L			, 0},
+#line 136 "sparqlwords.gperf"
+    {"SCORE_LIMIT",		SCORE_LIMIT_L		, 0},
+#line 185 "sparqlwords.gperf"
+    {"T_SHORTEST_ONLY",	T_SHORTEST_ONLY_L	, 0},
+#line 48 "sparqlwords.gperf"
+    {"CONSTRUCT",		CONSTRUCT_L		, 0},
+#line 29 "sparqlwords.gperf"
+    {"ALL",			ALL_L			, 0},
+#line 157 "sparqlwords.gperf"
+    {"STRDT",		SPARQL_BIF		, SPAR_BIF_STRDT},
+#line 35 "sparqlwords.gperf"
+    {"ATTACH",		ATTACH_L		, 0},
+#line 133 "sparqlwords.gperf"
+    {"RETURNS",		RETURNS_L		, 0},
+#line 184 "sparqlwords.gperf"
+    {"T_NO_ORDER",		T_NO_ORDER_L		, 0},
+#line 155 "sparqlwords.gperf"
+    {"STORAGE",		STORAGE_L		, 0},
+#line 89 "sparqlwords.gperf"
+    {"ISLITERAL",		SPARQL_BIF		, SPAR_BIF_ISLITERAL},
+#line 94 "sparqlwords.gperf"
+    {"LANGMATCHES",		SPARQL_BIF		, SPAR_BIF_LANGMATCHES},
+#line 150 "sparqlwords.gperf"
+    {"SHA512",		SPARQL_BIF		, SPAR_BIF_SHA512},
+#line 132 "sparqlwords.gperf"
+    {"REPLACE",		SPARQL_BIF		, SPAR_BIF_REPLACE},
+#line 161 "sparqlwords.gperf"
+    {"STRSTARTS",		SPARQL_BIF		, SPAR_BIF_STRSTARTS},
+#line 159 "sparqlwords.gperf"
+    {"STRLANG",		SPARQL_BIF		, SPAR_BIF_STRLANG},
+#line 54 "sparqlwords.gperf"
+    {"DATATYPE",		DATATYPE_L		, 0},
+#line 30 "sparqlwords.gperf"
+    {"ALTER",		ALTER_L			, 0},
+#line 99 "sparqlwords.gperf"
+    {"LITERAL",		LITERAL_L		, 0},
+#line 170 "sparqlwords.gperf"
+    {"TRANSITIVE",		TRANSITIVE_L		, 0},
+#line 122 "sparqlwords.gperf"
+    {"OPTIONAL",		OPTIONAL_L		, 0}
+  };
+
+static const short lookup[] =
+  {
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,   0,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,   1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,   2,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,   3,   4,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,   5,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,   6,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,   7,  -1,  -1,   8,  -1,  -1,
+      9,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  10,  -1,  11,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  12,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  13,  14,  -1,  -1,  -1,  15,  -1,  -1,  -1,
+     16,  -1,  -1,  -1,  -1,  -1,  17,  -1,  -1,  -1,
+     -1,  -1,  -1,  18,  -1,  -1,  -1,  -1,  -1,  -1,
+     19,  -1,  -1,  -1,  -1,  -1,  20,  -1,  -1,  -1,
+     -1,  -1,  21,  -1,  -1,  -1,  22,  23,  24,  25,
+     -1,  -1,  -1,  -1,  -1,  -1,  26,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  27,  -1,  28,
+     -1,  -1,  -1,  29,  30,  31,  -1,  -1,  -1,  -1,
+     -1,  32,  -1,  33,  -1,  -1,  -1,  34,  -1,  -1,
+     35,  36,  37,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     38,  -1,  39,  40,  -1,  -1,  -1,  41,  -1,  -1,
+     -1,  42,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     43,  -1,  -1,  -1,  -1,  -1,  44,  -1,  -1,  45,
+     -1,  46,  -1,  47,  48,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  49,  50,  -1,  51,  -1,  -1,  -1,  52,
+     -1,  -1,  -1,  53,  -1,  -1,  -1,  54,  55,  -1,
+     -1,  -1,  -1,  -1,  -1,  56,  -1,  -1,  -1,  57,
+     58,  -1,  -1,  -1,  -1,  -1,  59,  -1,  -1,  60,
+     -1,  -1,  61,  -1,  62,  63,  -1,  -1,  64,  65,
+     -1,  66,  -1,  -1,  -1,  -1,  67,  -1,  68,  69,
+     -1,  -1,  -1,  70,  -1,  -1,  71,  -1,  -1,  -1,
+     -1,  -1,  72,  -1,  -1,  -1,  73,  -1,  -1,  74,
+     -1,  75,  76,  77,  -1,  -1,  -1,  78,  79,  -1,
+     -1,  80,  -1,  81,  -1,  -1,  -1,  82,  83,  -1,
+     -1,  -1,  -1,  84,  85,  -1,  86,  -1,  -1,  -1,
+     -1,  87,  -1,  -1,  88,  89,  -1,  -1,  90,  -1,
+     91,  92,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  93,
+     -1,  94,  -1,  -1,  95,  -1,  -1,  -1,  96,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  97,
+     98,  -1,  -1,  99,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1, 100, 101,  -1,  -1,  -1, 102,  -1,  -1,
+     -1,  -1,  -1,  -1, 103,  -1, 104,  -1,  -1, 105,
+     -1,  -1,  -1,  -1, 106, 107,  -1, 108, 109, 110,
+     -1, 111,  -1,  -1,  -1,  -1,  -1,  -1, 112,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 113,  -1,
+    114, 115,  -1,  -1, 116,  -1, 117, 118, 119, 120,
+    121, 122,  -1, 123,  -1,  -1,  -1, 124,  -1, 125,
+     -1, 126,  -1,  -1, 127, 128, 129, 130, 131, 132,
+     -1,  -1, 133, 134, 135,  -1,  -1, 136, 137,  -1,
+     -1,  -1, 138,  -1, 139,  -1, 140,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    141,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 142,  -1, 143, 144,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1, 145,  -1,  -1,  -1,  -1, 146,  -1,
+     -1,  -1, 147, 148,  -1,  -1,  -1,  -1,  -1, 149,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    150, 151,  -1,  -1,  -1,  -1,  -1,  -1, 152, 153,
+     -1,  -1,  -1,  -1,  -1, 154,  -1,  -1,  -1, 155,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 156,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 157,  -1,  -1, 158,  -1, 159,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1, 160,  -1,  -1,  -1,  -1, 161,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 162,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    163,  -1, 164,  -1, 165,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1, 166,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 167,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 168
+  };
+
+#ifdef __GNUC__
+__inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
+#endif
+const struct sparql_keyword *
+sparql_lex_hash_kw (register const char *str, register unsigned int len)
+{
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register int index = lookup[key];
+
+          if (index >= 0)
+            {
+              register const char *s = wordlist[index].kwd;
+
+              if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strcmp (str, s))
+                return &wordlist[index];
+            }
+        }
+    }
+  return 0;
+}
diff --git a/libsrc/Wi/sparul2sql.c b/libsrc/Wi/sparul2sql.c
index 5bc92ca..2d27624 100644
--- a/libsrc/Wi/sparul2sql.c
+++ b/libsrc/Wi/sparul2sql.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sparul2sql.c,v 1.20.2.12 2011/01/28 13:34:04 source Exp $
+ *  $Id: sparul2sql.c,v 1.20.2.21 2012/03/15 10:32:27 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -53,11 +53,13 @@ extern "C" {
 #define CTOR_DISJOIN_WHERE 1
 #define CTOR_MAY_INTERSECTS_WHERE 0
 
+int ssg_is_odbc_cli ();
+
 caddr_t
 spar_compose_report_flag (sparp_t *sparp)
 {
   const char *fmtname = sparp->sparp_env->spare_output_format_name; /* Report is always a result-set, so no spare_output_XXX_format name */
-  return t_box_num (((NULL != fmtname) && !strcmp (fmtname, "_JAVA_")) ? 0 : 1);
+  return t_box_num ((NULL == fmtname && ssg_is_odbc_cli ()) || ((NULL != fmtname) && (!strcmp (fmtname, "_JAVA_") || !strcmp (fmtname, "_UDBC_"))) ? 0 : 1);
 }
 
 extern int sparp_ctor_fields_are_disjoin_with_where_fields (sparp_t *sparp, SPART **ctor_fields, SPART **where_fields);
@@ -202,12 +204,14 @@ sparp_ctor_fields_are_disjoin_with_data_gathering (sparp_t *sparp, SPART **ctor_
 
 typedef struct ctor_var_enumerator_s
 {
-  dk_set_t cve_dist_vars_acc;	/*!< Accumulator of variables with distinct names used in triple patterns of constructors */
+  dk_set_t cve_dist_vars_acc;		/*!< Accumulator of variables with distinct names used in triple patterns of constructors */
   int cve_dist_vars_count;		/*!< Length of \c cve_dist_vars_acc */
   int cve_total_vars_count;		/*!< Count of all occurrences of variables */
   int cve_bnodes_are_prohibited;	/*!< Bnodes are not allowed in DELETE ctor gp */
-  SPART *cve_limofs_var;	/*!< Variable that is passed from limit-offset subselect */
-  caddr_t cve_limofs_var_alias;	/*!< Alias used for cve_limofs_var */
+  SPART *cve_limofs_var;		/*!< Variable that is passed from limit-offset subselect */
+  caddr_t cve_limofs_var_alias;		/*!< Alias used for cve_limofs_var */
+  int cve_make_quads;			/*!< Contructor should make quads */
+  SPART *cve_default_graph;		/*!< An expression for the dafult graph */
 }
 ctor_var_enumerator_t;
 
@@ -277,15 +281,26 @@ spar_compose_retvals_of_ctor (sparp_t *sparp, SPART *ctor_gp, const char *funnam
       for (triple_ctr = BOX_ELEMENTS_INT (ctor_gp->_.gp.members); triple_ctr--; /* no step */)
         {
           SPART *triple = ctor_gp->_.gp.members[triple_ctr];
-          caddr_t *args = (caddr_t *)list (6,
-            (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
-            (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
-            (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL );
-          for (fld_ctr = 1; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
+          SPART *g = triple->_.triple.tr_fields[SPART_TRIPLE_GRAPH_IDX];
+          int g_is_default = !cve->cve_make_quads || SPART_IS_DEFAULT_GRAPH_BLANK (g);
+          caddr_t *args = (g_is_default ?
+            (caddr_t *)list (6,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL ) :
+            (caddr_t *)list (8,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL,
+              (ptrlong)CTOR_OPCODE_CONST_OR_EXPN, NULL ) );
+          for (fld_ctr = g_is_default ? 1 : 0; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
             {
               SPART *fld = triple->_.triple.tr_fields[fld_ctr];
               ptrlong fld_type = SPART_TYPE(fld);
               caddr_t val;
+              int arg_ofs = ((fld_ctr + SPART_TRIPLE_FIELDS_COUNT - 1) % SPART_TRIPLE_FIELDS_COUNT) * 2;
+              ptrlong *opcode_arg_ptr = (ptrlong *)(args + arg_ofs);
+              caddr_t *val_arg_ptr = args + arg_ofs + 1;
               switch (fld_type)
                 {
                 case SPAR_BLANK_NODE_LABEL:
@@ -302,21 +317,21 @@ spar_compose_retvals_of_ctor (sparp_t *sparp, SPART *ctor_gp, const char *funnam
                   t_set_push (&bnodes_acc, fld);
                   var_ctr = bnode_count++;
 bnode_found_or_added_for_big_ssl:
-                  args [(fld_ctr-1)*2] = (caddr_t)((ptrlong)CTOR_OPCODE_BNODE);
-                  args [(fld_ctr-1)*2 + 1] = box_num (var_ctr);
+                  opcode_arg_ptr[0] = CTOR_OPCODE_BNODE;
+                  val_arg_ptr[0] = box_num (var_ctr);
                   break;
                 case SPAR_LIT:
                   if ((NULL != fld->_.lit.datatype) || (NULL != fld->_.lit.language))
                     val = list (3, box_copy (fld->_.lit.val), box_copy (fld->_.lit.datatype), box_copy (fld->_.lit.language));
                   else
                     val = box_copy (fld->_.qname.val);
-                  args[(fld_ctr-1)*2 + 1] = val;
+                  val_arg_ptr[0] = val;
                   break;
                 case SPAR_QNAME:
                   val = box_copy (fld->_.qname.val);
-                  args[(fld_ctr-1)*2 + 1] = val;
                   if (DV_STRING == DV_TYPE_OF (val))
                     box_flags (val) = BF_IRI;
+                  val_arg_ptr[0] = val;
                   break;
                 default: spar_internal_error (sparp, "Non-const in big ssl const mode constructor pattern");
                 }
@@ -340,15 +355,26 @@ bnode_found_or_added_for_big_ssl:
   for (triple_ctr = BOX_ELEMENTS_INT (ctor_gp->_.gp.members); triple_ctr--; /* no step */)
     {
       SPART *triple = ctor_gp->_.gp.members[triple_ctr];
+      SPART *g = triple->_.triple.tr_fields[SPART_TRIPLE_GRAPH_IDX];
+      int g_is_default = !cve->cve_make_quads || SPART_IS_DEFAULT_GRAPH_BLANK (g);
       SPART **tvector_args;
       SPART *tvector_call;
       int triple_is_const = 1;
-      tvector_args = (SPART **)t_list (6, NULL, NULL, NULL, NULL, NULL, NULL);
+      tvector_args = (g_is_default ?
+        (SPART **)t_list (6, NULL, NULL, NULL, NULL, NULL, NULL) :
+        (SPART **)t_list (8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) );
+#if 0
       tvector_call = spar_make_funcall (sparp, 0, ((NULL == formatter) ? "LONG::bif:vector" :  "bif:vector"), tvector_args);
-      for (fld_ctr = 1; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
+#else /* LONG::bif:vector is needed always, otherwise construct with constant "string"@lang may become plain "string" in a formatted output */
+      tvector_call = spar_make_funcall (sparp, 0, "LONG::bif:vector", tvector_args);
+#endif
+      for (fld_ctr = g_is_default ? 1 : 0; fld_ctr < SPART_TRIPLE_FIELDS_COUNT; fld_ctr++)
         {
           SPART *fld = triple->_.triple.tr_fields[fld_ctr];
           ptrlong fld_type = SPART_TYPE(fld);
+          int arg_ofs = ((fld_ctr + SPART_TRIPLE_FIELDS_COUNT - 1) % SPART_TRIPLE_FIELDS_COUNT) * 2;
+          caddr_t *opcode_arg_ptr = (caddr_t *)(tvector_args + arg_ofs);
+          SPART **val_arg_ptr = tvector_args + arg_ofs + 1;
           switch (fld_type)
             {
             case SPAR_VARIABLE:
@@ -359,8 +385,8 @@ bnode_found_or_added_for_big_ssl:
                   break;
                 }
               var_ctr = spar_cve_find_or_add_variable (sparp, cve, fld);
-              tvector_args [(fld_ctr-1)*2] = (SPART *)t_box_num_nonull (CTOR_OPCODE_VARIABLE);
-              tvector_args [(fld_ctr-1)*2 + 1] = (SPART *)t_box_num_nonull (var_ctr);
+              opcode_arg_ptr[0] = t_box_num_nonull (CTOR_OPCODE_VARIABLE);
+              val_arg_ptr[0] = (SPART *)t_box_num_nonull (var_ctr);
               triple_is_const = 0;
               break;
             case SPAR_BLANK_NODE_LABEL:
@@ -377,19 +403,19 @@ bnode_found_or_added_for_big_ssl:
               t_set_push (&bnodes_acc, fld);
               var_ctr = bnode_count++;
 bnode_found_or_added:
-              tvector_args [(fld_ctr-1)*2] = (SPART *)t_box_num_nonull (CTOR_OPCODE_BNODE);
-              tvector_args [(fld_ctr-1)*2 + 1] = (SPART *)t_box_num_nonull (var_ctr);
+              opcode_arg_ptr[0] = t_box_num_nonull (CTOR_OPCODE_BNODE);
+              val_arg_ptr[0] = (SPART *)t_box_num_nonull (var_ctr);
               triple_is_const = 0;
               break;
             case SPAR_LIT: case SPAR_QNAME:
-              tvector_args [(fld_ctr-1)*2] = (SPART *)t_box_num_nonull (CTOR_OPCODE_CONST_OR_EXPN);
-              tvector_args [(fld_ctr-1)*2 + 1] = fld;
+              opcode_arg_ptr[0] = t_box_num_nonull (CTOR_OPCODE_CONST_OR_EXPN);
+              val_arg_ptr[0] = fld;
             default:
               {
                 int old_total_vars_count = cve->cve_total_vars_count;
                 sparp_gp_trav (sparp, fld, cve, NULL, NULL, sparp_gp_trav_ctor_var_to_limofs_aref, NULL, NULL, NULL);
-                tvector_args [(fld_ctr-1)*2] = (SPART *)t_box_num_nonull (CTOR_OPCODE_CONST_OR_EXPN);
-                tvector_args [(fld_ctr-1)*2 + 1] = fld;
+                opcode_arg_ptr[0] = t_box_num_nonull (CTOR_OPCODE_CONST_OR_EXPN);
+                val_arg_ptr[0] = fld;
                 if (cve->cve_total_vars_count != old_total_vars_count)
                   triple_is_const = 0;
               }
@@ -423,7 +449,8 @@ args_ready:
       (SPART **)t_list (4, arg0, arg1, var_vector_arg, arg3) );
   else
     ctor_call = spar_make_funcall (sparp, 1, funname,
-      (SPART **)t_list (4, arg1, var_vector_arg, arg3, t_box_num (use_limits)) );
+      /* Names arg1 and arg3 become slightly misleading when arg0 is not provided, e.g., in case of SPARQL_CONSTRUCT */
+      (SPART **)t_list (4, arg1, var_vector_arg, arg3, t_box_num_nonull (use_limits)) );
   if (cve->cve_limofs_var_alias)
     {
       SPART *alias = spartlist (sparp, 4, SPAR_ALIAS, var_vector_expn, cve->cve_limofs_var_alias, SSG_VALMODE_AUTO);
@@ -441,8 +468,16 @@ spar_compose_retvals_of_construct (sparp_t *sparp, SPART *top, SPART *ctor_gp,
 {
   int use_limits = 0;
   int need_limofs_trick = CTOR_NEEDS_LIMOFS_TRICK(top);
+  SPART *multigraph = sparp_get_option (sparp, ctor_gp->_.gp.options, QUAD_L);
+  int g_may_vary = (NULL != multigraph);
   ctor_var_enumerator_t cve;
   memset (&cve, 0, sizeof (ctor_var_enumerator_t));
+  if (!g_may_vary && (0 < BOX_ELEMENTS (ctor_gp->_.gp.members)))
+    {
+      SPART *g = ctor_gp->_.gp.members[0]->_.triple.tr_graph;
+      if (!SPART_IS_DEFAULT_GRAPH_BLANK (g))
+        g_may_vary = 1;
+    }
   if (need_limofs_trick)
     {
       caddr_t limofs_name = t_box_dv_short_string (":\"limofs\".\"ctor-1\"");
@@ -452,6 +487,8 @@ spar_compose_retvals_of_construct (sparp_t *sparp, SPART *top, SPART *ctor_gp,
   if ((NULL == sparp->sparp_env->spare_storage_name) ||
     ('\0' != sparp->sparp_env->spare_storage_name) )
     use_limits = 1;
+  cve.cve_make_quads = g_may_vary;
+  cve.cve_default_graph = NULL;
   spar_compose_retvals_of_ctor (sparp, ctor_gp, "sql:SPARQL_CONSTRUCT", NULL /* no big ssl const */, NULL, NULL,
     &(top->_.req_top.retvals), &cve, formatter, agg_formatter, agg_mdata, use_limits );
 
@@ -460,13 +497,17 @@ spar_compose_retvals_of_construct (sparp_t *sparp, SPART *top, SPART *ctor_gp,
 SPART *
 spar_simplify_graph_to_patch (sparp_t *sparp, SPART *g)
 {
-  if (SPAR_GRAPH != SPART_TYPE (g))
-    return g;
-  if ((SPART_GRAPH_NOT_FROM == g->_.graph.subtype) || (SPART_GRAPH_NOT_NAMED == g->_.graph.subtype))
-    spar_internal_error (sparp, "NOT FROM and NOT FROM NAMED are not fully supported by SPARUL operations, sorry");
-  if (SPAR_QNAME == SPART_TYPE (g->_.graph.expn))
-    return (SPART *)(g->_.graph.iri);
-  return g->_.graph.expn;
+  if (SPAR_GRAPH == SPART_TYPE (g))
+    {
+      if ((SPART_GRAPH_NOT_FROM == g->_.graph.subtype) || (SPART_GRAPH_NOT_NAMED == g->_.graph.subtype))
+        spar_internal_error (sparp, "NOT FROM and NOT FROM NAMED are not fully supported by SPARUL operations, sorry");
+      if (SPAR_QNAME == SPART_TYPE (g->_.graph.expn))
+        return (SPART *)(g->_.graph.iri);
+      return g->_.graph.expn;
+    }
+  if (SPAR_QNAME == SPART_TYPE (g))
+    return (SPART *)(g->_.qname.val);
+  return g;
 }
 
 int
@@ -480,10 +521,7 @@ spar_find_sc_for_big_ssl_const (sparp_t *sparp, sql_comp_t **sc_ret)
   sc_ret[0] = sparp->sparp_sparqre->sparqre_super_sc;
   if (NULL == sc_ret[0])
     {
-#ifdef NDEBUG
-      spar_error (sparp, "The query can be compiled and executed but not translated to an accurate SQL text");
-#endif
-      return 0;
+      spar_error (sparp, "The query can be compiled and executed but not translated to an accurate SQL text, add 'define sql:big-data-const 0' for workaround");
     }
   else
     {
@@ -500,11 +538,18 @@ spar_compose_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top, SPART *gra
   int top_subtype = top->_.req_top.subtype;
   int top_subtype_is_insert = ((INSERT_L == top_subtype) || (SPARUL_INSERT_DATA == top_subtype));
   int big_ssl_const_mode = ((SPARUL_INSERT_DATA == top_subtype) || (SPARUL_DELETE_DATA == top_subtype));
+  SPART *multigraph = sparp_get_option (sparp, ctor_gp->_.gp.options, QUAD_L);
   const char *top_fname;
   caddr_t log_mode;
   SPART **rv;
   ctor_var_enumerator_t cve;
   sql_comp_t *sc_for_big_ssl_const = NULL;
+  if ((NULL == multigraph) && (0 != BOX_ELEMENTS_0 (ctor_gp->_.gp.members)))
+    {
+      SPART *first_tmpl = ctor_gp->_.gp.members[0];
+      if (!SPART_IS_DEFAULT_GRAPH_BLANK (first_tmpl->_.triple.tr_graph))
+        graph_to_patch = first_tmpl->_.triple.tr_graph;
+    }
   graph_to_patch = spar_simplify_graph_to_patch (sparp, graph_to_patch);
   memset (&cve, 0, sizeof (ctor_var_enumerator_t));
   log_mode = sparp->sparp_env->spare_sparul_log_mode;
@@ -520,6 +565,8 @@ spar_compose_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top, SPART *gra
     big_ssl_const_mode = spar_find_sc_for_big_ssl_const (sparp, &sc_for_big_ssl_const);
   if ((INSERT_L != top->_.req_top.subtype) && (SPARUL_INSERT_DATA != top->_.req_top.subtype))
     cve.cve_bnodes_are_prohibited = 1;
+  cve.cve_make_quads = ((NULL != multigraph) ? 1 : 0);
+  cve.cve_default_graph = graph_to_patch;
   spar_compose_retvals_of_ctor (sparp, ctor_gp, "sql:SPARQL_CONSTRUCT", sc_for_big_ssl_const, NULL, NULL,
     &(top->_.req_top.retvals), &cve, NULL, NULL, NULL, 0 );
   rv = top->_.req_top.retvals;
@@ -528,7 +575,7 @@ spar_compose_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top, SPART *gra
       top_fname = t_box_sprintf (200, "sql:SPARQL_ROUTE_DICT_CONTENT_%.100s", sparp->sparp_env->spare_output_route_name);
       rv[0] = spar_make_funcall (sparp, 0, top_fname,
         (SPART **)t_list (11, graph_to_patch,
-          t_box_dv_short_string (top_subtype_is_insert ? "INSERT" : "DELETE"),
+          t_box_dv_short_string ((NULL != multigraph) ? (top_subtype_is_insert ? "INSERT_QUAD" : "DELETE_QUAD") : (top_subtype_is_insert ? "INSERT" : "DELETE")),
           ((NULL == sparp->sparp_env->spare_storage_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_storage_name),
           ((NULL == sparp->sparp_env->spare_output_storage_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_output_storage_name),
           ((NULL == sparp->sparp_env->spare_output_format_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_output_format_name),
@@ -539,7 +586,9 @@ spar_compose_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top, SPART *gra
     }
   else
     {
-      top_fname = top_subtype_is_insert ? "sql:SPARQL_INSERT_DICT_CONTENT" : "sql:SPARQL_DELETE_DICT_CONTENT";
+      top_fname = ((NULL != multigraph) ?
+        (top_subtype_is_insert ? "sql:SPARQL_INSERT_QUAD_DICT_CONTENT" : "sql:SPARQL_DELETE_QUAD_DICT_CONTENT") :
+        (top_subtype_is_insert ? "sql:SPARQL_INSERT_DICT_CONTENT" : "sql:SPARQL_DELETE_DICT_CONTENT") );
       rv[0] = spar_make_funcall (sparp, 0, top_fname,
         (SPART **)t_list (5, graph_to_patch, rv[0],
           spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp) ) );
@@ -550,10 +599,36 @@ void
 spar_compose_retvals_of_modify (sparp_t *sparp, SPART *top, SPART *graph_to_patch, SPART *del_ctor_gp, SPART *ins_ctor_gp)
 {
   int need_limofs_trick;
+  SPART *del_multigraph = sparp_get_option (sparp, del_ctor_gp->_.gp.options, QUAD_L);
+  SPART *ins_multigraph = sparp_get_option (sparp, ins_ctor_gp->_.gp.options, QUAD_L);
+  SPART *del_graph_to_patch = graph_to_patch;
+  SPART *ins_graph_to_patch = graph_to_patch;
+  int g_may_vary = ((NULL != del_multigraph) || (NULL != ins_multigraph));
   caddr_t log_mode;
   SPART **ins = NULL;
   SPART **rv;
   ctor_var_enumerator_t cve;
+  if ((NULL == del_multigraph) && (0 != BOX_ELEMENTS_0 (del_ctor_gp->_.gp.members)))
+    {
+      SPART *first_tmpl = del_ctor_gp->_.gp.members[0];
+      if (!SPART_IS_DEFAULT_GRAPH_BLANK (first_tmpl->_.triple.tr_graph))
+        del_graph_to_patch = first_tmpl->_.triple.tr_graph;
+    }
+  del_graph_to_patch = spar_simplify_graph_to_patch (sparp, del_graph_to_patch);
+  if ((NULL == ins_multigraph) && (0 != BOX_ELEMENTS_0 (ins_ctor_gp->_.gp.members)))
+    {
+      SPART *first_tmpl = ins_ctor_gp->_.gp.members[0];
+      if (!SPART_IS_DEFAULT_GRAPH_BLANK (first_tmpl->_.triple.tr_graph))
+        ins_graph_to_patch = first_tmpl->_.triple.tr_graph;
+    }
+  ins_graph_to_patch = spar_simplify_graph_to_patch (sparp, ins_graph_to_patch);
+  if (DV_STRINGP (del_graph_to_patch) && DV_STRINGP (ins_graph_to_patch)
+    && !strcmp ((caddr_t)del_graph_to_patch, (caddr_t)ins_graph_to_patch) )
+    {
+      graph_to_patch = del_graph_to_patch;
+    }
+  else
+    g_may_vary = 1;
   graph_to_patch = spar_simplify_graph_to_patch (sparp, graph_to_patch);
   if (0 == BOX_ELEMENTS (del_ctor_gp->_.gp.members))
     {
@@ -579,6 +654,8 @@ spar_compose_retvals_of_modify (sparp_t *sparp, SPART *top, SPART *graph_to_patc
       cve.cve_limofs_var_alias = t_box_dv_short_string ("ctor-1");
     }
   cve.cve_bnodes_are_prohibited = 1;
+  cve.cve_make_quads = g_may_vary;
+  cve.cve_default_graph = graph_to_patch;
   spar_compose_retvals_of_ctor (sparp, del_ctor_gp, "sql:SPARQL_CONSTRUCT", NULL /* no big ssl const */, NULL, NULL,
     &(top->_.req_top.retvals), &cve, NULL, NULL, NULL, 0 );
   cve.cve_limofs_var_alias = NULL;
@@ -591,7 +668,7 @@ spar_compose_retvals_of_modify (sparp_t *sparp, SPART *top, SPART *graph_to_patc
     rv[0] = spar_make_funcall (sparp, 0,
       t_box_sprintf (200, "sql:SPARQL_ROUTE_DICT_CONTENT_%.100s", sparp->sparp_env->spare_output_route_name),
       (SPART **)t_list (11, graph_to_patch,
-        t_box_dv_short_string ("MODIFY"),
+        t_box_dv_short_string (g_may_vary ? "MODIFY" : "MODIFY_QUAD"),
         ((NULL == sparp->sparp_env->spare_storage_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_storage_name),
         ((NULL == sparp->sparp_env->spare_output_storage_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_output_storage_name),
         ((NULL == sparp->sparp_env->spare_output_format_name) ? t_NEW_DB_NULL : sparp->sparp_env->spare_output_format_name),
@@ -599,7 +676,7 @@ spar_compose_retvals_of_modify (sparp_t *sparp, SPART *top, SPART *graph_to_patc
         t_NEW_DB_NULL,
         spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp) ) );
   else
-    rv[0] = spar_make_funcall (sparp, 0, "sql:SPARQL_MODIFY_BY_DICT_CONTENTS",
+    rv[0] = spar_make_funcall (sparp, 0, (g_may_vary ? "sql:SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS" : "sql:SPARQL_MODIFY_BY_DICT_CONTENTS"),
       (SPART **)t_list (6, graph_to_patch, rv[0], ins[0],
         spar_exec_uid_and_gs_cbk (sparp), log_mode, spar_compose_report_flag (sparp) ) );
 }
@@ -616,7 +693,7 @@ spar_emulate_ctor_field (sparp_t *sparp, SPART *opcode, SPART *oparg, SPART **va
       {
         if (NULL == bnode_emulation)
 #ifdef DEBUG
-          bnode_emulation = box_copy_tree (spartlist (sparp, 7 + (sizeof (rdf_val_range_t) / sizeof (caddr_t)), SPAR_BLANK_NODE_LABEL,
+          bnode_emulation = (SPART *)box_copy_tree ((caddr_t)spartlist (sparp, 7 + (sizeof (rdf_val_range_t) / sizeof (caddr_t)), SPAR_BLANK_NODE_LABEL,
             NULL, NULL, NULL, NULL, NULL, SPART_RVR_LIST_OF_NULLS, NULL ) );
 #else
           bnode_emulation = box_copy_tree (spartlist (sparp, 1, SPAR_BLANK_NODE_LABEL));
@@ -688,32 +765,48 @@ spar_tr_fields_are_similar (sparp_t *sparp, SPART *fld1, SPART *fld2)
   return 0; /* to keep compiler happy */
 }
 
+SPART *
+spar_dealias (sparp_t *sparp, SPART *expn, int expected_type)
+{
+  if (SPAR_ALIAS == SPART_TYPE (expn))
+    expn = expn->_.alias.arg;
+  if ((expected_type > 0) && (expected_type != SPART_TYPE (expn)))
+    spar_internal_error (sparp, "spar_" "deailas(): unexpected type of expression");
+  return expn;
+}
+
 int
 spar_optimize_delete_of_single_triple_pattern (sparp_t *sparp, SPART *top)
 {
   SPART *triple;
-  SPART *ctor;
+  SPART *emu;
   SPART **known_vars;
   SPART **retvals = top->_.req_top.retvals;
   int retvals_count = BOX_ELEMENTS (retvals);
   SPART **var_triples, **args;
-  SPART *graph_expn, *uid_expn, *log_mode_expn, *good_ctor_call, *compose_report_expn;
+  SPART *arg0, *graph_expn, *ctor, *uid_expn, *log_mode_expn, *good_ctor_call, *compose_report_expn;
   if (NULL != sparp->sparp_env->spare_output_route_name)
     return 0; /* If an output may go outside the default storage then there's no way of avoiding the complete filling of the result dictionary */
-  dbg_assert ((SPAR_FUNCALL == SPART_TYPE (retvals[0])) && (5 == BOX_ELEMENTS (retvals[0]->_.funcall.argtrees)));
   triple = spar_find_single_physical_triple_pattern (sparp, top->_.req_top.pattern);
   if (NULL == triple)
     return 0; /* nontrivial pattern, can not be optimized this way */
-  graph_expn		= retvals[0]->_.funcall.argtrees[0];
-  ctor			= retvals[0]->_.funcall.argtrees[1];
-  uid_expn		= retvals[0]->_.funcall.argtrees[2];
-  log_mode_expn		= retvals[0]->_.funcall.argtrees[3];
-  compose_report_expn	= retvals[0]->_.funcall.argtrees[4];
+  arg0 = spar_dealias (sparp, retvals[0], SPAR_FUNCALL);
+  dbg_assert ((SPAR_FUNCALL == SPART_TYPE (arg0)) && (5 == BOX_ELEMENTS (arg0->_.funcall.argtrees)));
+  if (strcmp ("sql:SPARQL_DELETE_DICT_CONTENT", arg0->_.funcall.qname))
+    return 0;
+  graph_expn		= arg0->_.funcall.argtrees[0];
+  ctor			= arg0->_.funcall.argtrees[1];
+  uid_expn		= arg0->_.funcall.argtrees[2];
+  log_mode_expn		= arg0->_.funcall.argtrees[3];
+  compose_report_expn	= arg0->_.funcall.argtrees[4];
   dbg_assert ((SPAR_FUNCALL == SPART_TYPE (ctor)) && (4 == BOX_ELEMENTS (ctor->_.funcall.argtrees)));
   dbg_assert (DELETE_L == top->_.req_top.subtype);
   var_triples = ctor->_.funcall.argtrees[0]->_.funcall.argtrees;
   if (1 < retvals_count)
-    known_vars = retvals [retvals_count-1]->_.funcall.argtrees;
+    {
+      SPART *known_vars_vector = spar_dealias (sparp, retvals [retvals_count-1], SPAR_FUNCALL);
+      known_vars = known_vars_vector->_.funcall.argtrees;
+    }
   else
     known_vars = ctor->_.funcall.argtrees[1]->_.funcall.argtrees;
   if (1 != BOX_ELEMENTS (var_triples))
@@ -724,15 +817,18 @@ spar_optimize_delete_of_single_triple_pattern (sparp_t *sparp, SPART *top)
     (CTOR_OPCODE_BNODE == unbox ((caddr_t)(args[4]))) )
     return 0; /* bnodes in constructor can not be optimized this way (BTW that is blab when inside DELETE) */
   if (!spar_tr_fields_are_similar (sparp, graph_expn,
-      triple->_.triple.tr_fields[SPART_TRIPLE_GRAPH_IDX] ) ||
-    !spar_tr_fields_are_similar (sparp,
-      spar_emulate_ctor_field (sparp, args[0], args[1], known_vars),
-      triple->_.triple.tr_fields[SPART_TRIPLE_SUBJECT_IDX] ) ||
-    !spar_tr_fields_are_similar (sparp,
-      spar_emulate_ctor_field (sparp, args[2], args[3], known_vars),
-      triple->_.triple.tr_fields[SPART_TRIPLE_PREDICATE_IDX] ) ||
-    !spar_tr_fields_are_similar (sparp,
-      spar_emulate_ctor_field (sparp, args[4], args[5], known_vars),
+      triple->_.triple.tr_fields[SPART_TRIPLE_GRAPH_IDX] ) )
+    return 0;
+  emu = spar_emulate_ctor_field (sparp, args[0], args[1], known_vars);
+  if (!spar_tr_fields_are_similar (sparp, emu,
+      triple->_.triple.tr_fields[SPART_TRIPLE_SUBJECT_IDX] ) )
+    return 0;
+  emu = spar_emulate_ctor_field (sparp, args[2], args[3], known_vars);
+  if (!spar_tr_fields_are_similar (sparp, emu,
+      triple->_.triple.tr_fields[SPART_TRIPLE_PREDICATE_IDX] ) )
+    return 0;
+  emu = spar_emulate_ctor_field (sparp, args[4], args[5], known_vars);
+  if (!spar_tr_fields_are_similar (sparp, emu,
       triple->_.triple.tr_fields[SPART_TRIPLE_OBJECT_IDX] ) )
     return 0;
   good_ctor_call = spar_make_funcall (sparp, 1, "sql:SPARQL_DELETE_CTOR",
@@ -750,7 +846,6 @@ spar_optimize_delete_of_single_triple_pattern (sparp_t *sparp, SPART *top)
 void
 spar_optimize_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top)
 {
-  SPART *ctor;
   SPART **known_vars;
   SPART **retvals = top->_.req_top.retvals;
   int retvals_count = BOX_ELEMENTS (retvals);
@@ -761,27 +856,28 @@ spar_optimize_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top)
   dk_set_t bad_triples = NULL;
   int all_triple_count, bad_triple_count, tctr;
   const char *fname;
-  SPART *graph_expn, *uid_expn, *log_mode_expn, *good_ctor_call, *compose_report_expn;
+  SPART *arg0, *graph_expn, *ctor, *uid_expn, *log_mode_expn, *good_ctor_call, *compose_report_expn;
   if (NULL != sparp->sparp_env->spare_output_route_name)
     return; /* If an output may go outside the default storage then there's no way of avoiding the complete filling of the result dictionary */
-  dbg_assert ((SPAR_FUNCALL == SPART_TYPE (retvals[0])) && (5 == BOX_ELEMENTS (retvals[0]->_.funcall.argtrees)));
-  graph_expn		= retvals[0]->_.funcall.argtrees[0];
-  ctor			= retvals[0]->_.funcall.argtrees[1];
-  uid_expn		= retvals[0]->_.funcall.argtrees[2];
-  log_mode_expn		= retvals[0]->_.funcall.argtrees[3];
-  compose_report_expn	= retvals[0]->_.funcall.argtrees[4];
+  arg0 = spar_dealias (sparp, retvals[0], SPAR_FUNCALL);
+  dbg_assert ((SPAR_FUNCALL == SPART_TYPE (arg0)) && (5 == BOX_ELEMENTS (arg0->_.funcall.argtrees)));
+  if (strcmp ("sql:SPARQL_INSERT_DICT_CONTENT", arg0->_.funcall.qname) && strcmp ("sql:SPARQL_DELETE_DICT_CONTENT", arg0->_.funcall.qname))
+    return;
+  graph_expn		= arg0->_.funcall.argtrees[0];
+  ctor			= arg0->_.funcall.argtrees[1];
+  uid_expn		= arg0->_.funcall.argtrees[2];
+  log_mode_expn		= arg0->_.funcall.argtrees[3];
+  compose_report_expn	= arg0->_.funcall.argtrees[4];
   dbg_assert ((SPAR_FUNCALL == SPART_TYPE (ctor)) && (4 == BOX_ELEMENTS (ctor->_.funcall.argtrees)));
   var_triples = ctor->_.funcall.argtrees[0]->_.funcall.argtrees;
+  all_triple_count = bad_triple_count = BOX_ELEMENTS (var_triples);
   if (1 < retvals_count)
     {
-      SPART *call = retvals [retvals_count-1];
-      if (SPAR_ALIAS == SPART_TYPE (call))
-        call = call->_.alias.arg;
-      known_vars = call->_.funcall.argtrees;
+      SPART *known_vars_vector = spar_dealias (sparp, retvals [retvals_count-1], SPAR_FUNCALL);
+      known_vars = known_vars_vector->_.funcall.argtrees;
     }
   else
     known_vars = ctor->_.funcall.argtrees[1]->_.funcall.argtrees;
-  all_triple_count = bad_triple_count = BOX_ELEMENTS (var_triples);
   for (tctr = all_triple_count; tctr--; /* no step */)
     {
       SPART **args = var_triples[tctr]->_.funcall.argtrees;
@@ -837,7 +933,6 @@ spar_optimize_retvals_of_insert_or_delete (sparp_t *sparp, SPART *top)
 void
 spar_optimize_retvals_of_modify (sparp_t *sparp, SPART *top)
 {
-  SPART *del_ctor, *ins_ctor;
   SPART **known_vars;
   SPART **retvals = top->_.req_top.retvals;
   int retvals_count = BOX_ELEMENTS (retvals);
@@ -850,16 +945,19 @@ spar_optimize_retvals_of_modify (sparp_t *sparp, SPART *top)
   dk_set_t bad_ins_triples = NULL;
   int all_del_triple_count, bad_del_triple_count, del_const_count, del_tctr;
   int all_ins_triple_count, bad_ins_triple_count, ins_tctr;
-  SPART *graph_expn, *uid_expn, *log_mode_expn, *good_ctor_call, *compose_report_expn;
+  SPART *arg0, *graph_expn, *del_ctor, *ins_ctor, *uid_expn, *log_mode_expn, *good_ctor_call, *compose_report_expn;
   if (NULL != sparp->sparp_env->spare_output_route_name)
     return; /* If an output may go outside the default storage then there's no way of avoiding the complete filling of the result dictionary */
-  dbg_assert ((SPAR_FUNCALL == SPART_TYPE (retvals[0])) && (6 == BOX_ELEMENTS (retvals[0]->_.funcall.argtrees)));
-  graph_expn		= retvals[0]->_.funcall.argtrees[0];
-  del_ctor		= retvals[0]->_.funcall.argtrees[1];
-  ins_ctor		= retvals[0]->_.funcall.argtrees[2];
-  uid_expn		= retvals[0]->_.funcall.argtrees[3];
-  log_mode_expn		= retvals[0]->_.funcall.argtrees[4];
-  compose_report_expn	= retvals[0]->_.funcall.argtrees[5];
+  arg0 = spar_dealias (sparp, retvals[0], SPAR_FUNCALL);
+  dbg_assert ((SPAR_FUNCALL == SPART_TYPE (arg0)) && (6 == BOX_ELEMENTS (arg0->_.funcall.argtrees)));
+  if (strcmp ("sql:SPARQL_MODIFY_BY_DICT_CONTENT", arg0->_.funcall.qname))
+    return;
+  graph_expn		= arg0->_.funcall.argtrees[0];
+  del_ctor		= arg0->_.funcall.argtrees[1];
+  ins_ctor		= arg0->_.funcall.argtrees[2];
+  uid_expn		= arg0->_.funcall.argtrees[3];
+  log_mode_expn		= arg0->_.funcall.argtrees[4];
+  compose_report_expn	= arg0->_.funcall.argtrees[5];
   dbg_assert ((SPAR_FUNCALL == SPART_TYPE (del_ctor)) && (4 == BOX_ELEMENTS (del_ctor->_.funcall.argtrees)));
   dbg_assert ((SPAR_FUNCALL == SPART_TYPE (ins_ctor)) && (4 == BOX_ELEMENTS (ins_ctor->_.funcall.argtrees)));
   del_var_triples = del_ctor->_.funcall.argtrees[0]->_.funcall.argtrees;
@@ -867,7 +965,10 @@ spar_optimize_retvals_of_modify (sparp_t *sparp, SPART *top)
   del_const_triples = del_ctor->_.funcall.argtrees[2]->_.funcall.argtrees;
   del_const_count = BOX_ELEMENTS (del_const_triples);
   if (1 < retvals_count)
-    known_vars = retvals [retvals_count-1]->_.funcall.argtrees;
+    {
+      SPART *known_vars_vector = spar_dealias (sparp, retvals [retvals_count-1], SPAR_FUNCALL);
+      known_vars = known_vars_vector->_.funcall.argtrees;
+    }
   else
     known_vars = ins_ctor->_.funcall.argtrees[1]->_.funcall.argtrees;
 /* Part 1. Collecting optimized data for DELETE ctor */
diff --git a/libsrc/Wi/sql3.c b/libsrc/Wi/sql3.c
index 2c99c4a..6356701 100644
--- a/libsrc/Wi/sql3.c
+++ b/libsrc/Wi/sql3.c
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -68,7 +67,7 @@
 /* Copy the first part of user declarations.  */
 
 /* Line 189 of yacc.c  */
-#line 57 "./sql3.y"
+#line 30 "./sql3.y"
 
 
 #include "libutil.h"
@@ -107,7 +106,7 @@
 
 
 /* Line 189 of yacc.c  */
-#line 111 "sql3.c"
+#line 110 "sql3.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -866,7 +865,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 95 "./sql3.y"
+#line 68 "./sql3.y"
 
   long intval;
   char *strval;
@@ -879,7 +878,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 883 "sql3.c"
+#line 882 "sql3.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -891,7 +890,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 895 "sql3.c"
+#line 894 "sql3.c"
 
 #ifdef short
 # undef short
@@ -941,7 +940,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1104,18 +1103,18 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  339
+#define YYFINAL  337
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   22182
+#define YYLAST   22097
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  374
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  401
+#define YYNNTS  402
 /* YYNRULES -- Number of rules.  */
 #define YYNRULES  1270
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  2462
+#define YYNSTATES  2459
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
@@ -1218,35 +1217,35 @@ static const yytype_uint16 yyprhs[] =
      475,   477,   480,   485,   487,   489,   492,   493,   495,   505,
      518,   523,   524,   526,   530,   534,   535,   537,   539,   543,
      545,   549,   556,   563,   570,   576,   578,   580,   582,   583,
-     585,   587,   591,   593,   599,   604,   609,   611,   613,   618,
-     623,   624,   630,   643,   644,   648,   649,   653,   654,   658,
-     664,   672,   680,   687,   695,   701,   702,   706,   713,   720,
-     727,   734,   739,   740,   744,   747,   749,   751,   753,   757,
-     760,   762,   764,   767,   770,   772,   776,   778,   780,   785,
-     789,   793,   797,   802,   806,   811,   815,   821,   827,   833,
-     834,   840,   851,   852,   855,   856,   861,   862,   865,   866,
-     870,   872,   874,   876,   882,   889,   890,   894,   896,   900,
-     903,   906,   907,   909,   911,   917,   923,   929,   930,   932,
-     933,   936,   944,   951,   952,   955,   960,   961,   964,   969,
-     985,   986,   989,   990,   994,  1001,  1008,  1009,  1011,  1012,
-    1016,  1017,  1023,  1024,  1027,  1028,  1031,  1032,  1035,  1037,
-    1039,  1041,  1043,  1045,  1047,  1049,  1051,  1053,  1055,  1059,
+     585,   587,   591,   593,   599,   604,   609,   611,   616,   621,
+     622,   628,   641,   642,   646,   647,   651,   652,   656,   662,
+     670,   678,   685,   693,   699,   700,   704,   711,   718,   725,
+     732,   737,   738,   742,   745,   747,   749,   751,   755,   758,
+     760,   762,   765,   768,   770,   774,   776,   778,   783,   787,
+     791,   795,   800,   804,   809,   813,   819,   825,   831,   832,
+     838,   849,   850,   853,   854,   859,   860,   863,   864,   868,
+     870,   872,   874,   880,   887,   888,   892,   894,   898,   901,
+     904,   905,   907,   909,   915,   921,   927,   928,   930,   931,
+     934,   942,   949,   950,   953,   958,   959,   962,   967,   983,
+     984,   987,   988,   992,   999,  1006,  1007,  1009,  1010,  1014,
+    1015,  1021,  1022,  1025,  1026,  1029,  1030,  1033,  1035,  1037,
+    1039,  1041,  1043,  1045,  1047,  1049,  1051,  1055,  1057,  1059,
     1061,  1063,  1065,  1067,  1069,  1071,  1073,  1075,  1077,  1079,
-    1081,  1083,  1085,  1087,  1089,  1091,  1093,  1096,  1099,  1102,
-    1111,  1117,  1122,  1128,  1135,  1137,  1139,  1141,  1142,  1145,
-    1153,  1158,  1160,  1162,  1166,  1168,  1170,  1173,  1175,  1177,
-    1179,  1181,  1183,  1185,  1188,  1193,  1196,  1200,  1204,  1206,
-    1209,  1212,  1215,  1218,  1220,  1224,  1225,  1230,  1231,  1237,
-    1239,  1242,  1244,  1248,  1249,  1253,  1257,  1260,  1261,  1264,
-    1272,  1274,  1278,  1280,  1284,  1289,  1294,  1296,  1298,  1300,
-    1302,  1304,  1306,  1309,  1312,  1315,  1318,  1321,  1323,  1326,
-    1327,  1331,  1332,  1334,  1336,  1337,  1340,  1342,  1347,  1354,
-    1361,  1370,  1372,  1380,  1390,  1391,  1393,  1397,  1401,  1408,
-    1410,  1414,  1416,  1418,  1420,  1421,  1423,  1424,  1426,  1428,
-    1434,  1441,  1446,  1452,  1457,  1463,  1465,  1467,  1469,  1472,
-    1474,  1480,  1487,  1492,  1498,  1503,  1509,  1511,  1514,  1516,
-    1521,  1524,  1530,  1532,  1534,  1535,  1541,  1546,  1551,  1555,
-    1559,  1565,  1567,  1570,  1572,  1575,  1580,  1588,  1591,  1593,
+    1081,  1083,  1085,  1087,  1089,  1092,  1095,  1098,  1107,  1113,
+    1118,  1124,  1131,  1133,  1135,  1137,  1138,  1141,  1149,  1154,
+    1156,  1158,  1162,  1164,  1166,  1169,  1171,  1173,  1175,  1177,
+    1179,  1181,  1184,  1189,  1192,  1196,  1200,  1202,  1205,  1208,
+    1211,  1214,  1216,  1220,  1221,  1226,  1227,  1233,  1235,  1238,
+    1240,  1244,  1245,  1249,  1253,  1256,  1257,  1260,  1268,  1270,
+    1274,  1276,  1280,  1285,  1290,  1292,  1294,  1296,  1298,  1300,
+    1302,  1305,  1308,  1311,  1314,  1317,  1319,  1322,  1323,  1327,
+    1328,  1330,  1332,  1333,  1336,  1338,  1343,  1350,  1357,  1366,
+    1368,  1376,  1386,  1387,  1389,  1393,  1397,  1404,  1406,  1410,
+    1412,  1414,  1416,  1417,  1419,  1420,  1422,  1424,  1430,  1437,
+    1442,  1448,  1453,  1459,  1461,  1463,  1465,  1468,  1470,  1476,
+    1483,  1488,  1494,  1499,  1505,  1507,  1510,  1512,  1517,  1520,
+    1526,  1528,  1530,  1531,  1537,  1542,  1547,  1552,  1556,  1562,
+    1564,  1567,  1569,  1572,  1577,  1578,  1580,  1588,  1591,  1593,
     1597,  1599,  1603,  1607,  1608,  1610,  1612,  1617,  1623,  1625,
     1632,  1634,  1637,  1641,  1645,  1646,  1649,  1652,  1655,  1657,
     1659,  1660,  1662,  1665,  1667,  1669,  1673,  1677,  1683,  1684,
@@ -1330,13 +1329,13 @@ static const yytype_uint16 yyprhs[] =
 static const yytype_int16 yyrhs[] =
 {
      375,     0,    -1,   376,   367,    -1,   376,    -1,   377,    -1,
-     378,    -1,   424,    -1,   705,    -1,   420,    -1,   421,    -1,
-     419,    -1,   758,    -1,   759,    -1,   760,    -1,   761,    -1,
+     378,    -1,   424,    -1,   706,    -1,   420,    -1,   421,    -1,
+     419,    -1,   759,    -1,   760,    -1,   761,    -1,   762,    -1,
      379,    -1,   414,    -1,   378,   379,    -1,   378,   414,    -1,
-     383,    -1,   407,    -1,   774,    -1,   410,    -1,   408,    -1,
+     383,    -1,   407,    -1,   775,    -1,   410,    -1,   408,    -1,
      415,    -1,   429,    -1,   431,    -1,   439,    -1,   440,    -1,
-     438,    -1,   441,    -1,   442,    -1,   443,    -1,   711,    -1,
-     713,    -1,   754,    -1,   770,    -1,     3,    -1,    24,    -1,
+     438,    -1,   441,    -1,   442,    -1,   443,    -1,   712,    -1,
+     714,    -1,   755,    -1,   771,    -1,     3,    -1,    24,    -1,
       25,    -1,    26,    -1,    27,    -1,    28,    -1,    29,    -1,
       30,    -1,    31,    -1,    32,    -1,    33,    -1,    34,    -1,
       35,    -1,    36,    -1,    37,    -1,    38,    -1,    39,    -1,
@@ -1354,221 +1353,221 @@ static const yytype_int16 yyrhs[] =
      332,    -1,   333,    -1,   334,    -1,   335,    -1,   336,    -1,
      337,    -1,   338,    -1,    93,    -1,    94,    -1,    95,    -1,
       -1,   201,    44,    -1,   203,    44,    -1,    -1,    91,    -1,
-     140,    91,    -1,   131,   192,   602,   368,   384,   369,   382,
-      -1,   131,   192,   602,   101,   519,   381,    -1,   385,    -1,
-     384,   370,   385,    -1,   386,    -1,   400,    -1,   610,   609,
+     140,    91,    -1,   131,   192,   603,   368,   384,   369,   382,
+      -1,   131,   192,   603,   101,   519,   381,    -1,   385,    -1,
+     384,   370,   385,    -1,   386,    -1,   400,    -1,   611,   610,
      394,    -1,    -1,   388,    -1,   388,   388,    -1,   172,   195,
      391,    -1,   389,    -1,   172,   138,   391,    -1,    -1,   389,
       -1,   124,    -1,   187,   169,    -1,   187,   137,    -1,    -1,
       47,    48,    -1,    47,    46,    -1,    45,    48,    -1,    45,
-      46,    -1,   181,   599,   427,   387,   392,    -1,    -1,   394,
-     398,    -1,    92,   201,   598,    -1,   305,   123,     7,    -1,
+      46,    -1,   181,   600,   427,   387,   392,    -1,    -1,   394,
+     398,    -1,    92,   201,   599,    -1,   305,   123,     7,    -1,
       41,   306,    -1,   306,   116,    -1,   306,    60,    -1,   395,
       -1,   397,   370,   395,    -1,   106,   169,    -1,   169,    -1,
      281,    -1,   281,   368,   397,   369,    -1,   176,   165,    -1,
-     396,    -1,   137,   598,    -1,   311,   599,    -1,   393,    -1,
-     318,   123,   610,    -1,   126,   368,   552,   369,    -1,   201,
+     396,    -1,   137,   599,    -1,   311,   600,    -1,   393,    -1,
+     318,   123,   611,    -1,   126,   368,   553,   369,    -1,   201,
      185,   399,    -1,   194,    -1,   368,     4,   370,     4,   369,
       -1,   368,     4,   370,     4,   370,     4,   369,    -1,   208,
-     599,    -1,   401,   176,   165,   368,   403,   369,   406,    -1,
+     600,    -1,   401,   176,   165,   368,   403,   369,   406,    -1,
      401,   147,   165,   368,   402,   369,   393,    -1,   401,   126,
-     368,   552,   369,    -1,   401,   194,   368,   402,   369,    -1,
+     368,   553,   369,    -1,   401,   194,   368,   402,   369,    -1,
      401,   153,   406,   368,   403,   369,    -1,    -1,   129,   380,
-      -1,   610,    -1,   402,   370,   610,    -1,   610,   455,    -1,
-     403,   370,   610,   455,    -1,   210,    -1,   194,    -1,   206,
+      -1,   611,    -1,   402,   370,   611,    -1,   611,   455,    -1,
+     403,   370,   611,   455,    -1,   210,    -1,   194,    -1,   206,
       -1,   207,    -1,   140,    -1,    91,    -1,   106,   169,    -1,
       41,   176,   165,    87,    -1,   158,    -1,   404,    -1,   405,
-     404,    -1,    -1,   405,    -1,   131,   406,   157,   611,   172,
-     599,   368,   403,   369,    -1,   131,   406,   157,   611,   172,
-     599,   368,   403,   369,   307,   773,   772,    -1,   142,   157,
-     380,   409,    -1,    -1,   599,    -1,   142,   192,   599,    -1,
-     142,   198,   599,    -1,    -1,    91,    -1,   386,    -1,   412,
-     370,   386,    -1,   610,    -1,   413,   370,   610,    -1,   230,
-     192,   599,   231,   411,   412,    -1,   230,   192,   599,   142,
-     411,   413,    -1,   230,   192,   599,   234,   411,   386,    -1,
-     230,   192,   599,   232,   602,    -1,   231,    -1,   142,    -1,
+     404,    -1,    -1,   405,    -1,   131,   406,   157,   612,   172,
+     600,   368,   403,   369,    -1,   131,   406,   157,   612,   172,
+     600,   368,   403,   369,   307,   774,   773,    -1,   142,   157,
+     380,   409,    -1,    -1,   600,    -1,   142,   192,   600,    -1,
+     142,   198,   600,    -1,    -1,    91,    -1,   386,    -1,   412,
+     370,   386,    -1,   611,    -1,   413,   370,   611,    -1,   230,
+     192,   600,   231,   411,   412,    -1,   230,   192,   600,   142,
+     411,   413,    -1,   230,   192,   600,   234,   411,   386,    -1,
+     230,   192,   600,   232,   603,    -1,   231,    -1,   142,    -1,
      234,    -1,    -1,   124,    -1,   182,    -1,   129,   380,   417,
-      -1,   400,    -1,   230,   192,   599,   416,   418,    -1,   131,
+      -1,   400,    -1,   230,   192,   600,   416,   418,    -1,   131,
      301,   185,     4,    -1,   142,   301,   185,     4,    -1,   519,
-      -1,   529,    -1,   427,   101,   422,   426,    -1,   427,   101,
-     224,   518,    -1,    -1,   131,   198,   602,   425,   423,    -1,
-     131,   178,   198,   602,   101,   599,   368,   539,   369,   368,
-     537,   369,    -1,    -1,   201,   126,   174,    -1,    -1,   368,
-     402,   369,    -1,    -1,   368,   402,   369,    -1,   152,   115,
-     177,   193,   437,    -1,   152,   433,   172,   603,   193,   436,
-     432,    -1,   152,   271,   172,   577,   193,   436,   432,    -1,
-     152,   272,   172,     4,   193,   436,    -1,   152,   208,   172,
-     709,   193,   436,   432,    -1,   152,   436,   193,   436,   430,
-      -1,    -1,   201,    68,   174,    -1,   263,   433,   172,   603,
-     149,   436,    -1,   263,   271,   172,   577,   149,   436,    -1,
-     263,   208,   172,   709,   149,   436,    -1,   263,   272,   172,
-       4,   149,   436,    -1,   263,   436,   149,   436,    -1,    -1,
-     201,   152,   174,    -1,   115,   177,    -1,   115,    -1,   434,
-      -1,   435,    -1,   434,   370,   435,    -1,   186,   428,    -1,
-     161,    -1,   138,    -1,   195,   428,    -1,   181,   428,    -1,
-     437,    -1,   436,   370,   437,    -1,   179,    -1,   614,    -1,
-     187,   264,   380,   380,    -1,   131,   196,   614,    -1,   131,
-      69,   614,    -1,   138,   196,   614,    -1,   138,   196,   614,
-     124,    -1,   142,   196,   614,    -1,   142,   196,   614,   124,
-      -1,   142,    69,   614,    -1,   187,   196,   153,   614,   614,
-      -1,   231,   196,   153,   614,   614,    -1,   138,   196,   153,
-     614,   614,    -1,    -1,   176,   165,   368,   402,   369,    -1,
-     117,   192,   600,   444,   446,   149,   597,   447,   448,   449,
-      -1,    -1,   101,   602,    -1,    -1,   196,   566,   264,   566,
-      -1,    -1,   106,   186,    -1,    -1,    63,   101,   566,    -1,
-      88,    -1,    90,    -1,    64,    -1,   136,   380,   134,    96,
-     519,    -1,   136,   380,   450,   134,    96,   519,    -1,    -1,
-      97,   123,   453,    -1,   454,    -1,   453,   370,   454,    -1,
-     566,   455,    -1,   572,   455,    -1,    -1,   118,    -1,   139,
-      -1,   131,   317,   266,    96,   599,    -1,   142,   317,   266,
-      96,   599,    -1,   316,   317,   266,    96,   599,    -1,    -1,
-       4,    -1,    -1,   200,     4,    -1,   131,   317,   599,   149,
-     599,   459,   460,    -1,   131,   315,   317,   599,   101,     4,
-      -1,    -1,   201,   138,    -1,   142,   317,   599,   462,    -1,
-      -1,   101,   315,    -1,   195,   317,   599,   464,    -1,   131,
-      60,   471,   157,   172,   599,   368,   610,   369,   472,   476,
-     473,   467,   474,   475,    -1,    -1,   289,   242,    -1,    -1,
-     368,   610,   369,    -1,   131,    60,   238,   172,   599,   468,
-      -1,   142,    60,   238,   172,   599,   468,    -1,    -1,   301,
-      -1,    -1,   201,   165,   610,    -1,    -1,   210,   201,   368,
-     402,   369,    -1,    -1,   166,     4,    -1,    -1,   167,     4,
-      -1,    -1,   106,   161,    -1,   477,    -1,   520,    -1,   529,
-      -1,   510,    -1,   513,    -1,   486,    -1,   481,    -1,   482,
-      -1,   664,    -1,   745,    -1,    26,   253,   745,    -1,   749,
-      -1,   666,    -1,   706,    -1,   480,    -1,   498,    -1,   617,
-      -1,   478,    -1,   445,    -1,   456,    -1,   457,    -1,   458,
-      -1,   461,    -1,   463,    -1,   465,    -1,   466,    -1,   469,
-      -1,   470,    -1,   291,   380,    -1,   127,   612,    -1,   128,
-     202,    -1,   138,   149,   603,   200,   133,   171,   612,   492,
-      -1,   138,   149,   603,   516,   492,    -1,   145,   612,   163,
-     514,    -1,   145,   612,     3,   163,   514,    -1,   145,   612,
-       3,   566,   163,   514,    -1,   163,    -1,   215,    -1,   216,
-      -1,    -1,   157,     3,    -1,   161,   484,   603,   485,   492,
-     428,   487,    -1,   197,   368,   488,   369,    -1,   528,    -1,
-     489,    -1,   488,   370,   489,    -1,   566,    -1,    97,    -1,
-     116,    97,    -1,   223,    -1,   221,    -1,   204,    -1,   217,
-      -1,   100,    -1,   218,    -1,   218,   144,    -1,   255,   106,
-     218,   144,    -1,   157,   380,    -1,   157,   176,   165,    -1,
-     157,    60,   165,    -1,   159,    -1,   201,     4,    -1,    41,
-     209,    -1,   163,   566,    -1,     3,     7,    -1,   490,    -1,
-     491,   370,   490,    -1,    -1,   174,   368,   491,   369,    -1,
-      -1,   192,   174,   368,   491,   369,    -1,   256,    -1,   257,
-       7,    -1,   494,    -1,   495,   370,   494,    -1,    -1,   368,
-     495,   369,    -1,   173,   612,   496,    -1,   183,   202,    -1,
-      -1,   201,   496,    -1,   186,   509,   532,   163,   514,   534,
-     499,    -1,     7,    -1,   501,   370,     7,    -1,     7,    -1,
-     368,   501,   369,    -1,   340,   368,   566,   369,    -1,   341,
-     368,   566,   369,    -1,   345,    -1,   346,    -1,   348,    -1,
-     349,    -1,   347,    -1,   344,    -1,   342,   502,    -1,   343,
-     502,    -1,   350,     7,    -1,   339,     3,    -1,   351,     7,
-      -1,   503,    -1,   504,   503,    -1,    -1,   222,   506,   504,
-      -1,    -1,   115,    -1,   140,    -1,    -1,   201,   300,    -1,
-     507,    -1,   507,   298,     7,   508,    -1,   507,   298,   368,
-     566,   369,   508,    -1,   507,   298,     7,   370,     7,   508,
-      -1,   507,   298,   368,   566,   370,   566,   369,   508,    -1,
-     505,    -1,   507,   298,     7,   370,   111,     7,   508,    -1,
-     195,   603,   187,   511,   200,   133,   171,   612,   492,    -1,
-      -1,   512,    -1,   511,   370,   512,    -1,   610,   107,   566,
-      -1,   195,   603,   187,   511,   516,   492,    -1,   515,    -1,
-     514,   370,   515,    -1,   604,    -1,   750,    -1,   575,    -1,
-      -1,   548,    -1,    -1,   297,    -1,   523,    -1,   521,   517,
-      99,   526,   525,    -1,   521,   517,    99,   115,   526,   525,
-      -1,   521,   100,   526,   525,    -1,   521,   100,   115,   526,
-     525,    -1,   521,    98,   526,   525,    -1,   521,    98,   115,
-     526,   525,    -1,   518,    -1,   524,    -1,   518,    -1,   224,
-     518,    -1,   522,    -1,   521,   517,    99,   526,   522,    -1,
-     521,   517,    99,   115,   526,   522,    -1,   521,   100,   526,
-     522,    -1,   521,   100,   115,   526,   522,    -1,   521,    98,
-     526,   522,    -1,   521,    98,   115,   526,   522,    -1,   527,
-      -1,   302,     4,    -1,   528,    -1,   368,   520,   369,   452,
-      -1,   302,     4,    -1,   368,   224,   518,   369,   452,    -1,
-     523,    -1,   524,    -1,    -1,   296,   123,   368,   402,   369,
-      -1,   186,   509,   532,   533,    -1,   186,   509,   532,   534,
-      -1,   186,   509,   532,    -1,   368,   584,   369,    -1,   368,
-     584,   200,   552,   369,    -1,   530,    -1,   531,   530,    -1,
-     584,    -1,   122,   531,    -1,   535,   516,   549,   550,    -1,
-     535,   516,   549,   550,   452,   551,   492,    -1,   149,   536,
-      -1,   540,    -1,   536,   370,   540,    -1,   386,    -1,   537,
-     370,   386,    -1,   368,   537,   369,    -1,    -1,   402,    -1,
-     603,    -1,   368,   520,   369,   380,    -1,   368,   520,   369,
-     101,   380,    -1,   545,    -1,   599,   368,   539,   369,   538,
-     380,    -1,   603,    -1,   565,   380,    -1,   565,   101,   380,
-      -1,   368,   545,   369,    -1,    -1,   282,   543,    -1,   283,
-     543,    -1,   284,   543,    -1,   286,    -1,   287,    -1,    -1,
-     285,    -1,   288,   542,    -1,   542,    -1,   546,    -1,   276,
-     546,   251,    -1,   368,   546,   369,    -1,   540,   544,   290,
-     541,   547,    -1,    -1,   172,   552,    -1,   289,   368,   402,
-     369,    -1,   200,   552,    -1,    -1,   153,   123,   453,    -1,
+      -1,   427,   101,   422,   426,    -1,   427,   101,   224,   518,
+      -1,    -1,   131,   198,   603,   425,   423,    -1,   131,   178,
+     198,   603,   101,   600,   368,   540,   369,   368,   538,   369,
+      -1,    -1,   201,   126,   174,    -1,    -1,   368,   402,   369,
+      -1,    -1,   368,   402,   369,    -1,   152,   115,   177,   193,
+     437,    -1,   152,   433,   172,   604,   193,   436,   432,    -1,
+     152,   271,   172,   578,   193,   436,   432,    -1,   152,   272,
+     172,     4,   193,   436,    -1,   152,   208,   172,   710,   193,
+     436,   432,    -1,   152,   436,   193,   436,   430,    -1,    -1,
+     201,    68,   174,    -1,   263,   433,   172,   604,   149,   436,
+      -1,   263,   271,   172,   578,   149,   436,    -1,   263,   208,
+     172,   710,   149,   436,    -1,   263,   272,   172,     4,   149,
+     436,    -1,   263,   436,   149,   436,    -1,    -1,   201,   152,
+     174,    -1,   115,   177,    -1,   115,    -1,   434,    -1,   435,
+      -1,   434,   370,   435,    -1,   186,   428,    -1,   161,    -1,
+     138,    -1,   195,   428,    -1,   181,   428,    -1,   437,    -1,
+     436,   370,   437,    -1,   179,    -1,   615,    -1,   187,   264,
+     380,   380,    -1,   131,   196,   615,    -1,   131,    69,   615,
+      -1,   138,   196,   615,    -1,   138,   196,   615,   124,    -1,
+     142,   196,   615,    -1,   142,   196,   615,   124,    -1,   142,
+      69,   615,    -1,   187,   196,   153,   615,   615,    -1,   231,
+     196,   153,   615,   615,    -1,   138,   196,   153,   615,   615,
+      -1,    -1,   176,   165,   368,   402,   369,    -1,   117,   192,
+     601,   444,   446,   149,   598,   447,   448,   449,    -1,    -1,
+     101,   603,    -1,    -1,   196,   567,   264,   567,    -1,    -1,
+     106,   186,    -1,    -1,    63,   101,   567,    -1,    88,    -1,
+      90,    -1,    64,    -1,   136,   380,   134,    96,   519,    -1,
+     136,   380,   450,   134,    96,   519,    -1,    -1,    97,   123,
+     453,    -1,   454,    -1,   453,   370,   454,    -1,   567,   455,
+      -1,   573,   455,    -1,    -1,   118,    -1,   139,    -1,   131,
+     317,   266,    96,   600,    -1,   142,   317,   266,    96,   600,
+      -1,   316,   317,   266,    96,   600,    -1,    -1,     4,    -1,
+      -1,   200,     4,    -1,   131,   317,   600,   149,   600,   459,
+     460,    -1,   131,   315,   317,   600,   101,     4,    -1,    -1,
+     201,   138,    -1,   142,   317,   600,   462,    -1,    -1,   101,
+     315,    -1,   195,   317,   600,   464,    -1,   131,    60,   471,
+     157,   172,   600,   368,   611,   369,   472,   476,   473,   467,
+     474,   475,    -1,    -1,   289,   242,    -1,    -1,   368,   611,
+     369,    -1,   131,    60,   238,   172,   600,   468,    -1,   142,
+      60,   238,   172,   600,   468,    -1,    -1,   301,    -1,    -1,
+     201,   165,   611,    -1,    -1,   210,   201,   368,   402,   369,
+      -1,    -1,   166,     4,    -1,    -1,   167,     4,    -1,    -1,
+     106,   161,    -1,   477,    -1,   520,    -1,   510,    -1,   513,
+      -1,   486,    -1,   481,    -1,   482,    -1,   665,    -1,   746,
+      -1,    26,   253,   746,    -1,   750,    -1,   667,    -1,   707,
+      -1,   480,    -1,   498,    -1,   618,    -1,   478,    -1,   445,
+      -1,   456,    -1,   457,    -1,   458,    -1,   461,    -1,   463,
+      -1,   465,    -1,   466,    -1,   469,    -1,   470,    -1,   291,
+     380,    -1,   127,   613,    -1,   128,   202,    -1,   138,   149,
+     604,   200,   133,   171,   613,   492,    -1,   138,   149,   604,
+     516,   492,    -1,   145,   613,   163,   514,    -1,   145,   613,
+       3,   163,   514,    -1,   145,   613,     3,   567,   163,   514,
+      -1,   163,    -1,   215,    -1,   216,    -1,    -1,   157,     3,
+      -1,   161,   484,   604,   485,   492,   428,   487,    -1,   197,
+     368,   488,   369,    -1,   529,    -1,   489,    -1,   488,   370,
+     489,    -1,   567,    -1,    97,    -1,   116,    97,    -1,   223,
+      -1,   221,    -1,   204,    -1,   217,    -1,   100,    -1,   218,
+      -1,   218,   144,    -1,   255,   106,   218,   144,    -1,   157,
+     380,    -1,   157,   176,   165,    -1,   157,    60,   165,    -1,
+     159,    -1,   201,     4,    -1,    41,   209,    -1,   163,   567,
+      -1,     3,     7,    -1,   490,    -1,   491,   370,   490,    -1,
+      -1,   174,   368,   491,   369,    -1,    -1,   192,   174,   368,
+     491,   369,    -1,   256,    -1,   257,     7,    -1,   494,    -1,
+     495,   370,   494,    -1,    -1,   368,   495,   369,    -1,   173,
+     613,   496,    -1,   183,   202,    -1,    -1,   201,   496,    -1,
+     186,   509,   532,   163,   514,   535,   499,    -1,     7,    -1,
+     501,   370,     7,    -1,     7,    -1,   368,   501,   369,    -1,
+     340,   368,   567,   369,    -1,   341,   368,   567,   369,    -1,
+     345,    -1,   346,    -1,   348,    -1,   349,    -1,   347,    -1,
+     344,    -1,   342,   502,    -1,   343,   502,    -1,   350,     7,
+      -1,   339,     3,    -1,   351,     7,    -1,   503,    -1,   504,
+     503,    -1,    -1,   222,   506,   504,    -1,    -1,   115,    -1,
+     140,    -1,    -1,   201,   300,    -1,   507,    -1,   507,   298,
+       7,   508,    -1,   507,   298,   368,   567,   369,   508,    -1,
+     507,   298,     7,   370,     7,   508,    -1,   507,   298,   368,
+     567,   370,   567,   369,   508,    -1,   505,    -1,   507,   298,
+       7,   370,   111,     7,   508,    -1,   195,   604,   187,   511,
+     200,   133,   171,   613,   492,    -1,    -1,   512,    -1,   511,
+     370,   512,    -1,   611,   107,   567,    -1,   195,   604,   187,
+     511,   516,   492,    -1,   515,    -1,   514,   370,   515,    -1,
+     605,    -1,   751,    -1,   576,    -1,    -1,   549,    -1,    -1,
+     297,    -1,   523,    -1,   521,   517,    99,   526,   525,    -1,
+     521,   517,    99,   115,   526,   525,    -1,   521,   100,   526,
+     525,    -1,   521,   100,   115,   526,   525,    -1,   521,    98,
+     526,   525,    -1,   521,    98,   115,   526,   525,    -1,   518,
+      -1,   524,    -1,   518,    -1,   224,   518,    -1,   522,    -1,
+     521,   517,    99,   526,   522,    -1,   521,   517,    99,   115,
+     526,   522,    -1,   521,   100,   526,   522,    -1,   521,   100,
+     115,   526,   522,    -1,   521,    98,   526,   522,    -1,   521,
+      98,   115,   526,   522,    -1,   527,    -1,   302,     4,    -1,
+     528,    -1,   368,   520,   369,   452,    -1,   302,     4,    -1,
+     368,   224,   518,   369,   452,    -1,   523,    -1,   524,    -1,
+      -1,   296,   123,   368,   402,   369,    -1,   186,   509,   532,
+     533,    -1,   186,   509,   532,   534,    -1,   186,   509,   532,
+     535,    -1,   368,   585,   369,    -1,   368,   585,   200,   553,
+     369,    -1,   530,    -1,   531,   530,    -1,   585,    -1,   122,
+     531,    -1,   536,   516,   550,   551,    -1,    -1,   535,    -1,
+     536,   516,   550,   551,   452,   552,   492,    -1,   149,   537,
+      -1,   541,    -1,   537,   370,   541,    -1,   386,    -1,   538,
+     370,   386,    -1,   368,   538,   369,    -1,    -1,   402,    -1,
+     604,    -1,   368,   520,   369,   380,    -1,   368,   520,   369,
+     101,   380,    -1,   546,    -1,   600,   368,   540,   369,   539,
+     380,    -1,   604,    -1,   566,   380,    -1,   566,   101,   380,
+      -1,   368,   546,   369,    -1,    -1,   282,   544,    -1,   283,
+     544,    -1,   284,   544,    -1,   286,    -1,   287,    -1,    -1,
+     285,    -1,   288,   543,    -1,   543,    -1,   547,    -1,   276,
+     547,   251,    -1,   368,   547,   369,    -1,   541,   545,   290,
+     542,   548,    -1,    -1,   172,   553,    -1,   289,   368,   402,
+     369,    -1,   200,   553,    -1,    -1,   153,   123,   453,    -1,
      153,   123,   184,   368,   453,   369,    -1,   153,   123,   132,
-     368,   453,   369,    -1,    -1,   155,   552,    -1,    -1,    96,
+     368,   453,   369,    -1,    -1,   155,   553,    -1,    -1,    96,
      195,    -1,    96,   301,     3,    -1,    96,   301,     3,     3,
-      -1,   552,   104,   552,    -1,   552,   105,   552,    -1,   106,
-     552,    -1,   368,   552,   369,    -1,   553,    -1,   555,    -1,
-     556,    -1,   557,    -1,   559,    -1,   560,    -1,   561,    -1,
-     563,    -1,   554,    -1,   566,    -1,   566,   107,   566,    -1,
-     566,   106,   120,   566,   105,   566,    -1,   566,   120,   566,
-     105,   566,    -1,   566,   106,   168,   566,   558,    -1,   566,
-     168,   566,   558,    -1,    -1,   143,   586,    -1,   250,   143,
-     586,   251,    -1,   566,   164,   106,   169,    -1,   566,   164,
-     169,    -1,   566,   106,   156,   565,    -1,   566,   156,   565,
-      -1,   566,   106,   156,   368,   583,   369,    -1,   566,   156,
-     368,   583,   369,    -1,   566,   107,   562,   565,    -1,   116,
-      -1,   115,    -1,   189,    -1,   144,   565,    -1,   565,    -1,
-     368,   518,   369,    -1,   368,   224,   518,   369,    -1,   566,
-     111,   566,    -1,   566,   110,   566,    -1,   566,   112,   566,
-      -1,   566,   113,   566,    -1,   110,   566,    -1,   111,   566,
-      -1,   659,    -1,   707,    -1,   604,    -1,   567,    -1,   582,
-      -1,   585,    -1,   596,    -1,   564,    -1,   368,   566,   369,
-      -1,   368,   566,   370,   583,   369,    -1,   581,    -1,   753,
-      -1,   569,    -1,   571,    -1,   587,    -1,   588,    -1,   593,
-      -1,   594,    -1,   574,    -1,   745,    -1,   748,    -1,   750,
-      -1,   585,    -1,   596,    -1,   564,    -1,   368,   566,   369,
-      -1,   368,   566,   370,   583,   369,    -1,   581,    -1,   753,
-      -1,   569,    -1,   571,    -1,   587,    -1,   588,    -1,   593,
-      -1,   594,    -1,   574,    -1,   745,    -1,   748,    -1,   751,
-      -1,   278,   368,   606,   370,   566,   369,    -1,    -1,   311,
-     599,    -1,   293,   368,   566,   101,   606,   570,   369,    -1,
+      -1,   553,   104,   553,    -1,   553,   105,   553,    -1,   106,
+     553,    -1,   368,   553,   369,    -1,   554,    -1,   556,    -1,
+     557,    -1,   558,    -1,   560,    -1,   561,    -1,   562,    -1,
+     564,    -1,   555,    -1,   567,    -1,   567,   107,   567,    -1,
+     567,   106,   120,   567,   105,   567,    -1,   567,   120,   567,
+     105,   567,    -1,   567,   106,   168,   567,   559,    -1,   567,
+     168,   567,   559,    -1,    -1,   143,   587,    -1,   250,   143,
+     587,   251,    -1,   567,   164,   106,   169,    -1,   567,   164,
+     169,    -1,   567,   106,   156,   566,    -1,   567,   156,   566,
+      -1,   567,   106,   156,   368,   584,   369,    -1,   567,   156,
+     368,   584,   369,    -1,   567,   107,   563,   566,    -1,   116,
+      -1,   115,    -1,   189,    -1,   144,   566,    -1,   566,    -1,
+     368,   518,   369,    -1,   368,   224,   518,   369,    -1,   567,
+     111,   567,    -1,   567,   110,   567,    -1,   567,   112,   567,
+      -1,   567,   113,   567,    -1,   110,   567,    -1,   111,   567,
+      -1,   660,    -1,   708,    -1,   605,    -1,   568,    -1,   583,
+      -1,   586,    -1,   597,    -1,   565,    -1,   368,   567,   369,
+      -1,   368,   567,   370,   584,   369,    -1,   582,    -1,   754,
+      -1,   570,    -1,   572,    -1,   588,    -1,   589,    -1,   594,
+      -1,   595,    -1,   575,    -1,   746,    -1,   749,    -1,   751,
+      -1,   586,    -1,   597,    -1,   565,    -1,   368,   567,   369,
+      -1,   368,   567,   370,   584,   369,    -1,   582,    -1,   754,
+      -1,   570,    -1,   572,    -1,   588,    -1,   589,    -1,   594,
+      -1,   595,    -1,   575,    -1,   746,    -1,   749,    -1,   752,
+      -1,   278,   368,   607,   370,   567,   369,    -1,    -1,   311,
+     600,    -1,   293,   368,   567,   101,   607,   571,   369,    -1,
       20,    23,    22,    -1,    20,    23,    21,    -1,    20,    23,
-      19,    22,    -1,   566,   101,   380,   606,    -1,   566,   101,
-     380,    -1,   566,   380,    -1,   566,   101,   572,    -1,   566,
-     101,     4,    -1,   566,     4,    -1,   567,   660,    -1,   575,
-      -1,   604,   660,    -1,    -1,   583,    -1,   380,    -1,   380,
-     371,   752,    -1,   380,   371,   380,   371,   752,    -1,   380,
-     371,   380,   371,   380,   371,   752,    -1,   380,   371,   371,
-     752,    -1,   380,   371,   371,   380,   371,   752,    -1,   282,
-      -1,   283,    -1,   266,    -1,   380,   320,   566,    -1,   578,
-     370,   380,   320,   566,    -1,   573,    -1,   579,   370,   573,
-      -1,   579,   370,   566,    -1,    -1,   578,    -1,   583,    -1,
-     583,   370,   578,    -1,   583,   370,   579,    -1,   579,    -1,
-     577,   368,   580,   369,    -1,    17,   368,    16,   370,   566,
-     370,   566,   369,    -1,   319,   368,     3,   149,   566,   369,
-      -1,   274,   380,   368,   576,   369,   251,    -1,   274,   282,
-     368,   576,   369,   251,    -1,   274,   283,   368,   576,   369,
-     251,    -1,   274,   266,   368,   576,   369,   251,    -1,   274,
-     380,   368,   566,   156,   566,   369,   251,    -1,   275,   577,
-     368,   576,   369,   251,    -1,   275,   577,   251,    -1,   274,
-     196,   368,   576,   369,   251,    -1,   274,   125,   368,   576,
-     369,   251,    -1,   274,    17,   368,    16,   370,   566,   370,
-     566,   369,   251,    -1,   274,   278,   368,   566,   370,     3,
-     369,   251,    -1,   274,   319,   368,     3,   149,   566,   369,
-     251,    -1,   253,   368,   566,   369,   368,   580,   369,    -1,
-     322,    -1,   323,    -1,   323,   368,   566,   369,    -1,   324,
-      -1,   324,   368,   566,   369,    -1,   154,   368,   604,   369,
-      -1,    14,   599,   251,    -1,    14,   599,   368,   576,   369,
-     251,    -1,   250,   380,   586,   251,    -1,   277,     4,   251,
-      -1,   566,    -1,   583,   370,   566,    -1,   566,    -1,   573,
-      -1,   584,   370,   566,    -1,   584,   370,   573,    -1,   595,
-      -1,   597,    -1,   196,    -1,   585,    -1,   582,    -1,   279,
-     566,   590,   251,    -1,   279,   589,   251,    -1,   592,    -1,
-     589,   592,    -1,   591,    -1,   590,   591,    -1,   280,   566,
-     246,   566,    -1,   247,   566,    -1,   280,   552,   246,   566,
-      -1,   247,   566,    -1,   292,   368,   583,   369,    -1,   294,
-     368,   566,   370,   566,   369,    -1,   613,    -1,   613,   613,
-      -1,   613,   160,   613,    -1,   241,   577,   368,   580,   369,
-      -1,    11,   368,   140,   566,   369,    -1,    11,   368,   115,
-     566,   369,    -1,    11,   368,   566,   369,    -1,     4,    -1,
+      19,    22,    -1,   567,   101,   380,   607,    -1,   567,   101,
+     380,    -1,   567,   380,    -1,   567,   101,   573,    -1,   567,
+     101,     4,    -1,   567,     4,    -1,   568,   661,    -1,   576,
+      -1,   605,   661,    -1,    -1,   584,    -1,   380,    -1,   380,
+     371,   753,    -1,   380,   371,   380,   371,   753,    -1,   380,
+     371,   380,   371,   380,   371,   753,    -1,   380,   371,   371,
+     753,    -1,   380,   371,   371,   380,   371,   753,    -1,   282,
+      -1,   283,    -1,   266,    -1,   380,   320,   567,    -1,   579,
+     370,   380,   320,   567,    -1,   574,    -1,   580,   370,   574,
+      -1,   580,   370,   567,    -1,    -1,   579,    -1,   584,    -1,
+     584,   370,   579,    -1,   584,   370,   580,    -1,   580,    -1,
+     578,   368,   581,   369,    -1,    17,   368,    16,   370,   567,
+     370,   567,   369,    -1,   319,   368,     3,   149,   567,   369,
+      -1,   274,   380,   368,   577,   369,   251,    -1,   274,   282,
+     368,   577,   369,   251,    -1,   274,   283,   368,   577,   369,
+     251,    -1,   274,   266,   368,   577,   369,   251,    -1,   274,
+     380,   368,   567,   156,   567,   369,   251,    -1,   275,   578,
+     368,   577,   369,   251,    -1,   275,   578,   251,    -1,   274,
+     196,   368,   577,   369,   251,    -1,   274,   125,   368,   577,
+     369,   251,    -1,   274,    17,   368,    16,   370,   567,   370,
+     567,   369,   251,    -1,   274,   278,   368,   567,   370,     3,
+     369,   251,    -1,   274,   319,   368,     3,   149,   567,   369,
+     251,    -1,   253,   368,   567,   369,   368,   581,   369,    -1,
+     322,    -1,   323,    -1,   323,   368,   567,   369,    -1,   324,
+      -1,   324,   368,   567,   369,    -1,   154,   368,   605,   369,
+      -1,    14,   600,   251,    -1,    14,   600,   368,   577,   369,
+     251,    -1,   250,   380,   587,   251,    -1,   277,     4,   251,
+      -1,   567,    -1,   584,   370,   567,    -1,   567,    -1,   574,
+      -1,   585,   370,   567,    -1,   585,   370,   574,    -1,   596,
+      -1,   598,    -1,   196,    -1,   586,    -1,   583,    -1,   279,
+     567,   591,   251,    -1,   279,   590,   251,    -1,   593,    -1,
+     590,   593,    -1,   592,    -1,   591,   592,    -1,   280,   567,
+     246,   567,    -1,   247,   567,    -1,   280,   553,   246,   567,
+      -1,   247,   567,    -1,   292,   368,   584,   369,    -1,   294,
+     368,   567,   370,   567,   369,    -1,   614,    -1,   614,   614,
+      -1,   614,   160,   614,    -1,   241,   578,   368,   581,   369,
+      -1,    11,   368,   140,   567,   369,    -1,    11,   368,   115,
+     567,   369,    -1,    11,   368,   567,   369,    -1,     4,    -1,
        5,    -1,     6,    -1,     7,    -1,     9,    -1,    18,    -1,
-       8,    -1,   169,    -1,    93,   171,   606,    -1,    93,   171,
+       8,    -1,   169,    -1,    93,   171,   607,    -1,    93,   171,
      301,    -1,    93,   171,    94,    -1,    93,   171,    95,    -1,
        4,    -1,     5,    -1,     6,    -1,     7,    -1,   111,     7,
       -1,   110,     7,    -1,     9,    -1,   111,     9,    -1,   110,
@@ -1579,8 +1578,8 @@ static const yytype_int16 yyrhs[] =
      380,    -1,   380,   371,   380,    -1,   380,   371,   380,   371,
      380,    -1,   380,   371,   371,   380,    -1,   380,    -1,   380,
      371,   380,    -1,   380,   371,   380,   371,   380,    -1,   380,
-     371,   371,   380,    -1,   599,   493,    -1,   599,   101,   380,
-     493,    -1,   599,   380,   493,    -1,   380,    -1,   380,   371,
+     371,   371,   380,    -1,   600,   493,    -1,   600,   101,   380,
+     493,    -1,   600,   380,   493,    -1,   380,    -1,   380,   371,
      380,    -1,   380,   371,   380,   371,   380,    -1,   380,   371,
      380,   371,   380,   371,   380,    -1,   380,   371,   371,   380,
      371,   380,    -1,   112,    -1,   380,   371,   112,    -1,   380,
@@ -1596,300 +1595,300 @@ static const yytype_int16 yyrhs[] =
      268,    -1,   312,    -1,   312,   368,     7,   369,    -1,   313,
       -1,   313,   368,     7,   369,    -1,   214,   313,    -1,   116,
       -1,   116,   368,     7,   369,    -1,   219,   368,     7,   369,
-      -1,   219,    -1,   220,    -1,   605,    -1,   125,    -1,   211,
+      -1,   219,    -1,   220,    -1,   606,    -1,   125,    -1,   211,
       -1,   211,   368,     7,   369,    -1,   125,   368,     7,   369,
-      -1,   204,    -1,   204,   372,     7,   373,    -1,   608,   607,
-      -1,   606,    -1,   708,    -1,   605,    -1,   125,    -1,   211,
+      -1,   204,    -1,   204,   372,     7,   373,    -1,   609,   608,
+      -1,   607,    -1,   709,    -1,   606,    -1,   125,    -1,   211,
       -1,   211,   368,     7,   369,    -1,   125,   368,     7,   369,
-      -1,   708,    -1,   214,   708,    -1,   214,   116,    -1,   214,
+      -1,   709,    -1,   214,   709,    -1,   214,   116,    -1,   214,
      301,    -1,   380,    -1,   380,   371,   380,   371,   380,   371,
      380,    -1,   380,    -1,   380,    -1,    12,    -1,    13,    -1,
      380,    -1,    -1,     4,    -1,    -1,   370,     4,    -1,   225,
-     615,    -1,   226,   615,    -1,   226,     4,     4,    -1,   227,
-       4,    -1,   126,    -1,   229,   228,   615,   616,    -1,   233,
-     228,   615,    -1,   266,   172,    -1,   266,   265,    -1,   618,
-      -1,   621,    -1,   624,    -1,   744,    -1,   676,    -1,   684,
-      -1,   685,    -1,   131,   241,   602,   627,   626,   149,   601,
-     370,   601,   370,   601,   619,   620,    -1,    -1,   370,   601,
-      -1,    -1,    97,    -1,   131,   625,   602,   627,   626,   636,
-     641,    -1,   117,   625,   600,   627,   626,   636,   446,   149,
-     597,    -1,   131,   625,   602,   627,   626,   636,   166,   741,
-     310,    59,     4,   725,    -1,   625,   380,   627,   626,   636,
-     641,    -1,   622,   367,    -1,   623,   622,   367,    -1,   131,
-     273,   602,   250,   623,   251,    -1,   242,    -1,   178,    -1,
-      -1,   254,   608,    -1,   368,   369,    -1,   368,   628,   369,
-      -1,   629,    -1,   628,   370,   629,    -1,   630,   604,   608,
-     636,    -1,   630,   604,   608,   137,   598,   636,    -1,   630,
-     604,   608,   108,   598,   636,    -1,   156,    -1,   243,    -1,
-      62,    -1,    -1,   630,    -1,    -1,    81,   156,    -1,    81,
+     616,    -1,   226,   616,    -1,   226,     4,     4,    -1,   227,
+       4,    -1,   126,    -1,   229,   228,   616,   617,    -1,   233,
+     228,   616,    -1,   266,   172,    -1,   266,   265,    -1,   619,
+      -1,   622,    -1,   625,    -1,   745,    -1,   677,    -1,   685,
+      -1,   686,    -1,   131,   241,   603,   628,   627,   149,   602,
+     370,   602,   370,   602,   620,   621,    -1,    -1,   370,   602,
+      -1,    -1,    97,    -1,   131,   626,   603,   628,   627,   637,
+     642,    -1,   117,   626,   601,   628,   627,   637,   446,   149,
+     598,    -1,   131,   626,   603,   628,   627,   637,   166,   742,
+     310,    59,     4,   726,    -1,   626,   380,   628,   627,   637,
+     642,    -1,   623,   367,    -1,   624,   623,   367,    -1,   131,
+     273,   603,   250,   624,   251,    -1,   242,    -1,   178,    -1,
+      -1,   254,   609,    -1,   368,   369,    -1,   368,   629,   369,
+      -1,   630,    -1,   629,   370,   630,    -1,   631,   605,   609,
+     637,    -1,   631,   605,   609,   137,   599,   637,    -1,   631,
+     605,   609,   108,   599,   637,    -1,   156,    -1,   243,    -1,
+      62,    -1,    -1,   631,    -1,    -1,    81,   156,    -1,    81,
      243,    -1,    81,    62,    -1,    82,   156,    -1,    82,   243,
-      -1,    82,    62,    -1,   634,    -1,   633,   370,   634,    -1,
-       3,   108,   598,    -1,    78,    -1,    75,    -1,    80,    -1,
+      -1,    82,    62,    -1,   635,    -1,   634,   370,   635,    -1,
+       3,   108,   599,    -1,    78,    -1,    75,    -1,    80,    -1,
       73,    -1,    79,    -1,    74,    -1,    76,    -1,    -1,    83,
-     368,   635,   108,     4,   632,   370,   633,   369,    -1,   635,
-       4,   632,    -1,     7,    -1,     9,    -1,   637,    -1,   638,
-     370,   637,    -1,   366,   368,   638,   369,    -1,   500,    -1,
+     368,   636,   108,     4,   633,   370,   634,   369,    -1,   636,
+       4,   633,    -1,     7,    -1,     9,    -1,   638,    -1,   639,
+     370,   638,    -1,   366,   368,   639,   369,    -1,   500,    -1,
      510,    -1,   513,    -1,   486,    -1,   481,    -1,   482,    -1,
      479,    -1,   483,    -1,   497,    -1,   498,    -1,   480,    -1,
-     639,    -1,    -1,    -1,   250,   642,   643,   251,    -1,   644,
-      -1,   643,   644,    -1,   650,   367,    -1,   641,    -1,    -1,
-     645,   646,    -1,   640,   367,    -1,   658,    -1,   380,   103,
-     644,    -1,    15,    -1,   107,   566,    15,    -1,   113,   566,
-      15,    -1,   224,   518,   367,    -1,   641,    -1,    -1,   648,
-     640,   367,    -1,    -1,   649,   658,    -1,   451,    -1,   651,
-      -1,   655,    -1,   136,   652,   608,    -1,   380,    -1,   652,
+     640,    -1,    -1,    -1,   250,   643,   644,   251,    -1,   645,
+      -1,   644,   645,    -1,   651,   367,    -1,   642,    -1,    -1,
+     646,   647,    -1,   641,   367,    -1,   659,    -1,   380,   103,
+     645,    -1,    15,    -1,   107,   567,    15,    -1,   113,   567,
+      15,    -1,   224,   518,   367,    -1,   642,    -1,    -1,   649,
+     641,   367,    -1,    -1,   650,   659,    -1,   451,    -1,   652,
+      -1,   656,    -1,   136,   653,   609,    -1,   380,    -1,   653,
      370,   380,    -1,   106,   148,    -1,   258,     4,    -1,   258,
-      65,     4,    -1,   260,    -1,   259,    -1,   641,    -1,   640,
-      -1,   664,    -1,   748,    -1,   745,    -1,   666,    -1,   262,
-      -1,   262,   566,    -1,   668,    -1,   659,    -1,   662,    -1,
-     667,    -1,   675,    -1,   669,    -1,   199,   653,   150,   380,
-      -1,   199,   653,   151,   193,   380,    -1,   199,   653,   137,
-      -1,   136,   656,   244,    96,   657,   654,    -1,   130,    -1,
-     261,    -1,   653,    -1,   657,   370,   653,    -1,   664,   367,
-      -1,   748,   367,    -1,   745,   367,    -1,   666,   367,    -1,
-     262,   367,    -1,   262,   566,   367,    -1,   668,   367,    -1,
-     659,   367,    -1,   662,    -1,   667,   367,    -1,   675,    -1,
-     669,    -1,   661,   108,   566,    -1,   604,   660,   108,   566,
-      -1,   372,   566,   373,    -1,   660,   372,   566,   373,    -1,
-     604,    -1,   750,    -1,   245,   368,   552,   369,   647,   663,
-      -1,    -1,   247,   647,    -1,   253,   577,   368,   580,   369,
-      -1,   224,   581,    -1,   581,    -1,   334,   336,    -1,   334,
+      65,     4,    -1,   260,    -1,   259,    -1,   642,    -1,   641,
+      -1,   665,    -1,   749,    -1,   746,    -1,   667,    -1,   262,
+      -1,   262,   567,    -1,   669,    -1,   660,    -1,   663,    -1,
+     668,    -1,   676,    -1,   670,    -1,   199,   654,   150,   380,
+      -1,   199,   654,   151,   193,   380,    -1,   199,   654,   137,
+      -1,   136,   657,   244,    96,   658,   655,    -1,   130,    -1,
+     261,    -1,   654,    -1,   658,   370,   654,    -1,   665,   367,
+      -1,   749,   367,    -1,   746,   367,    -1,   667,   367,    -1,
+     262,   367,    -1,   262,   567,   367,    -1,   669,   367,    -1,
+     660,   367,    -1,   663,    -1,   668,   367,    -1,   676,    -1,
+     670,    -1,   662,   108,   567,    -1,   605,   661,   108,   567,
+      -1,   372,   567,   373,    -1,   661,   372,   567,   373,    -1,
+     605,    -1,   751,    -1,   245,   368,   553,   369,   648,   664,
+      -1,    -1,   247,   648,    -1,   253,   578,   368,   581,   369,
+      -1,   224,   582,    -1,   582,    -1,   334,   336,    -1,   334,
      335,    -1,   337,   334,    -1,   338,    -1,   187,   380,   107,
-     566,    -1,   187,   380,   172,    -1,   187,   380,   265,    -1,
-     187,   331,   332,   333,   665,    -1,   150,   380,    -1,   151,
-     193,   380,    -1,   252,   566,    -1,   252,    -1,   249,   368,
-     552,   369,   647,    -1,   659,    -1,   651,    -1,   664,    -1,
-     745,    -1,    -1,   670,    -1,   671,   370,   670,    -1,   659,
-      -1,   664,    -1,   745,    -1,    -1,   672,    -1,   673,   370,
-     672,    -1,    -1,   552,    -1,    96,   519,   255,   647,    -1,
-      96,   368,   671,   367,   674,   367,   673,   369,   647,    -1,
-      84,   368,   608,   380,   156,   566,   369,   255,   647,    -1,
-     131,   238,   380,   679,   680,   172,   599,   677,   681,   678,
-      -1,    -1,    97,     7,    -1,   641,    -1,   235,    -1,   236,
+     567,    -1,   187,   380,   172,    -1,   187,   380,   265,    -1,
+     187,   331,   332,   333,   666,    -1,   150,   380,    -1,   151,
+     193,   380,    -1,   252,   567,    -1,   252,    -1,   249,   368,
+     553,   369,   648,    -1,   660,    -1,   652,    -1,   665,    -1,
+     746,    -1,    -1,   671,    -1,   672,   370,   671,    -1,   660,
+      -1,   665,    -1,   746,    -1,    -1,   673,    -1,   674,   370,
+     673,    -1,    -1,   553,    -1,    96,   519,   255,   648,    -1,
+      96,   368,   672,   367,   675,   367,   674,   369,   648,    -1,
+      84,   368,   609,   380,   156,   567,   369,   255,   648,    -1,
+     131,   238,   380,   680,   681,   172,   600,   678,   682,   679,
+      -1,    -1,    97,     7,    -1,   642,    -1,   235,    -1,   236,
       -1,   237,   171,    -1,   161,    -1,   195,   427,    -1,   138,
-      -1,    -1,   239,   682,    -1,   683,    -1,   682,   370,   683,
+      -1,    -1,   239,   683,    -1,   684,    -1,   683,   370,   684,
       -1,   240,   101,   380,    -1,   295,   101,   380,    -1,   142,
-     238,   599,    -1,   142,   241,   599,    -1,   142,   625,   599,
-      -1,   142,   273,   599,    -1,    -1,   101,   380,    -1,   604,
-      -1,   566,   101,   380,    -1,   566,   156,   380,    -1,   687,
-      -1,   688,   370,   687,    -1,   368,   688,   369,    -1,    -1,
-     176,   165,   368,   402,   369,    -1,    -1,   172,   368,   552,
-     369,    -1,    -1,     3,    -1,   599,   380,   686,   689,   691,
-     690,   692,   694,    -1,    -1,   250,   696,   251,    -1,   528,
-      -1,   250,   696,   251,    -1,   693,    -1,   696,   370,   693,
+     238,   600,    -1,   142,   241,   600,    -1,   142,   626,   600,
+      -1,   142,   273,   600,    -1,    -1,   101,   380,    -1,   605,
+      -1,   567,   101,   380,    -1,   567,   156,   380,    -1,   688,
+      -1,   689,   370,   688,    -1,   368,   689,   369,    -1,    -1,
+     176,   165,   368,   402,   369,    -1,    -1,   172,   368,   553,
+     369,    -1,    -1,     3,    -1,   600,   380,   687,   690,   692,
+     691,   693,   695,    -1,    -1,   250,   697,   251,    -1,   529,
+      -1,   250,   697,   251,    -1,   694,    -1,   697,   370,   694,
       -1,    -1,   303,    -1,    -1,   304,     7,    -1,    -1,   308,
      309,    -1,   308,   310,    -1,   308,     4,    -1,   185,   310,
-      -1,   185,     4,    -1,    -1,   179,     4,   380,     4,   697,
-     698,   699,    -1,     3,    -1,     4,    -1,     3,   107,   701,
-      -1,   702,    -1,   703,   702,    -1,    -1,   372,   703,   373,
-      -1,   131,   301,   198,   602,   101,   704,   695,   692,   700,
-      -1,   142,   301,   198,   599,    -1,   566,   109,   566,    -1,
+      -1,   185,     4,    -1,    -1,   179,     4,   380,     4,   698,
+     699,   700,    -1,     3,    -1,     4,    -1,     3,   107,   702,
+      -1,   703,    -1,   704,   703,    -1,    -1,   372,   704,   373,
+      -1,   131,   301,   198,   603,   101,   705,   696,   693,   701,
+      -1,   142,   301,   198,   600,    -1,   567,   109,   567,    -1,
      380,    -1,   380,   371,   380,    -1,   380,   371,   380,   371,
      380,    -1,   380,   371,   371,   380,    -1,   380,    -1,   380,
      371,   380,    -1,   380,   371,   380,   371,   380,    -1,   380,
      371,   371,   380,    -1,   380,    -1,   380,   371,   380,    -1,
      380,   371,   380,   371,   380,    -1,   380,   371,   371,   380,
-      -1,    -1,   131,    24,   710,   715,   714,   712,   716,   725,
-     728,    -1,   142,    24,   709,   417,    -1,    -1,   166,   742,
-     310,    59,     4,    -1,   310,    59,     4,   166,   742,    -1,
-     166,   742,    -1,    -1,   208,   708,    -1,    -1,   101,   717,
-      -1,   368,   718,   369,    -1,   722,    -1,   718,   370,   722,
+      -1,    -1,   131,    24,   711,   716,   715,   713,   717,   726,
+     729,    -1,   142,    24,   710,   417,    -1,    -1,   166,   743,
+     310,    59,     4,    -1,   310,    59,     4,   166,   743,    -1,
+     166,   743,    -1,    -1,   208,   709,    -1,    -1,   101,   718,
+      -1,   368,   719,   369,    -1,   723,    -1,   719,   370,   723,
       -1,    -1,   310,    59,     4,    -1,   310,    59,     4,   310,
       24,     4,    -1,   310,    24,     4,    -1,    -1,    77,     4,
       -1,    78,     4,    -1,    78,     4,    77,     4,    -1,    77,
        4,    78,     4,    -1,    -1,   310,    24,     4,    -1,   380,
-     608,   723,   724,   570,   719,   720,    -1,    -1,   181,    86,
+     609,   724,   725,   571,   720,   721,    -1,    -1,   181,    86,
       27,   390,    -1,   181,    86,   106,    27,    -1,    -1,   137,
-     598,    -1,    -1,   726,    -1,   727,    -1,   726,   727,    -1,
-      25,    -1,   106,    25,    -1,    87,   289,   608,    -1,    87,
+     599,    -1,    -1,   727,    -1,   728,    -1,   727,   728,    -1,
+      25,    -1,   106,    25,    -1,    87,   289,   609,    -1,    87,
      149,   368,   402,   369,    -1,    87,   164,    28,    29,    -1,
      293,   368,    30,   101,    87,   369,   201,   380,    -1,   293,
      368,    87,   101,    30,   369,   201,   380,    -1,    35,   101,
       87,    -1,    70,    -1,   330,    -1,    78,     4,    -1,    -1,
-     729,    -1,   735,    -1,   729,   370,   735,    -1,    -1,    88,
-      -1,    33,    -1,   368,   369,    -1,   368,   732,   369,    -1,
-     733,    -1,   732,   370,   733,    -1,   631,   604,   608,   721,
-      -1,   730,    26,   752,   731,   254,   608,   737,    -1,    34,
-      26,   752,   731,   737,    -1,   734,   736,   738,    -1,    36,
-     734,    -1,    -1,    35,   101,    31,    -1,    35,   101,    32,
+     730,    -1,   736,    -1,   730,   370,   736,    -1,    -1,    88,
+      -1,    33,    -1,   368,   369,    -1,   368,   733,   369,    -1,
+     734,    -1,   733,   370,   734,    -1,   632,   605,   609,   722,
+      -1,   731,    26,   753,   732,   254,   609,   738,    -1,    34,
+      26,   753,   732,   738,    -1,   735,   737,   739,    -1,    36,
+     735,    -1,    -1,    35,   101,    31,    -1,    35,   101,    32,
       -1,    35,   101,    31,    35,   101,    32,    -1,    -1,    89,
-     602,    -1,    -1,   739,    -1,   740,    -1,   739,   740,    -1,
-     166,   742,    -1,    66,    37,    38,    -1,    66,    37,    39,
+     603,    -1,    -1,   740,    -1,   741,    -1,   740,   741,    -1,
+     166,   743,    -1,    66,    37,    38,    -1,    66,    37,    39,
       -1,    40,    -1,   106,    40,    -1,    41,    38,    -1,    42,
       38,    -1,    43,    38,    44,    -1,    49,    38,    44,    -1,
      254,   169,   172,   169,    50,    -1,    51,   172,   169,    50,
       -1,   310,    59,     4,    -1,   310,    67,    59,     4,    -1,
      310,    24,     4,    -1,    52,    -1,    53,    -1,    54,    -1,
       55,    -1,    56,    -1,    57,    -1,    58,    -1,    61,    -1,
-      71,    -1,   741,    -1,    38,    -1,    -1,   254,   710,    -1,
-     131,   730,    26,   752,   627,   626,   636,    96,   708,   641,
-      -1,   131,    34,    26,   599,   627,   743,    96,   708,   641,
-      -1,   708,   102,   752,   368,   580,   369,    -1,   380,   371,
-     380,   371,   380,   371,   752,    -1,   380,   371,   371,   380,
-     371,   752,    -1,   380,   371,   746,    -1,   380,   371,   380,
-     371,   380,   371,   380,   371,   752,    -1,   380,   371,   371,
-     380,   371,   380,   371,   752,    -1,   380,   371,   747,    -1,
-     568,   371,   752,   368,   580,   369,    -1,   747,   368,   580,
-     369,    -1,   368,   567,   101,   708,   369,   371,   752,   368,
-     580,   369,    -1,   368,   604,   101,   708,   369,   371,   752,
-     368,   580,   369,    -1,    26,   253,   568,   371,   752,   368,
-     580,   369,    -1,    26,   253,   747,   368,   580,   369,    -1,
-      26,   253,   368,   567,   101,   708,   369,   371,   752,   368,
-     580,   369,    -1,    26,   253,   368,   604,   101,   708,   369,
-     371,   752,   368,   580,   369,    -1,   751,    -1,   380,   371,
-     746,    -1,   568,   371,   752,    -1,   368,   567,   101,   708,
-     369,   371,   752,    -1,   368,   604,   101,   708,   369,   371,
-     752,    -1,   380,    -1,   319,    -1,   295,   708,   368,   580,
-     369,    -1,   230,    24,   708,   755,    -1,   231,    72,   722,
-      -1,   142,    72,   380,   417,    -1,   231,   735,    -1,   142,
-     734,   417,    -1,    -1,   201,   325,   107,   329,    -1,   201,
+      71,    -1,   742,    -1,    38,    -1,    -1,   254,   711,    -1,
+     131,   731,    26,   753,   628,   627,   637,    96,   709,   642,
+      -1,   131,    34,    26,   600,   628,   744,    96,   709,   642,
+      -1,   709,   102,   753,   368,   581,   369,    -1,   380,   371,
+     380,   371,   380,   371,   753,    -1,   380,   371,   371,   380,
+     371,   753,    -1,   380,   371,   747,    -1,   380,   371,   380,
+     371,   380,   371,   380,   371,   753,    -1,   380,   371,   371,
+     380,   371,   380,   371,   753,    -1,   380,   371,   748,    -1,
+     569,   371,   753,   368,   581,   369,    -1,   748,   368,   581,
+     369,    -1,   368,   568,   101,   709,   369,   371,   753,   368,
+     581,   369,    -1,   368,   605,   101,   709,   369,   371,   753,
+     368,   581,   369,    -1,    26,   253,   569,   371,   753,   368,
+     581,   369,    -1,    26,   253,   748,   368,   581,   369,    -1,
+      26,   253,   368,   568,   101,   709,   369,   371,   753,   368,
+     581,   369,    -1,    26,   253,   368,   605,   101,   709,   369,
+     371,   753,   368,   581,   369,    -1,   752,    -1,   380,   371,
+     747,    -1,   569,   371,   753,    -1,   368,   568,   101,   709,
+     369,   371,   753,    -1,   368,   605,   101,   709,   369,   371,
+     753,    -1,   380,    -1,   319,    -1,   295,   709,   368,   581,
+     369,    -1,   230,    24,   709,   756,    -1,   231,    72,   723,
+      -1,   142,    72,   380,   417,    -1,   231,   736,    -1,   142,
+     735,   417,    -1,    -1,   201,   325,   107,   329,    -1,   201,
      325,   107,   330,    -1,    -1,   201,   326,    -1,   131,   327,
-     599,   101,   566,   756,   757,    -1,   131,   328,   599,   149,
-     566,   756,   757,    -1,   142,   327,   599,    -1,   142,   328,
-     599,    -1,   162,    -1,   162,   368,     7,   369,    -1,   121,
+     600,   101,   567,   757,   758,    -1,   131,   328,   600,   149,
+     567,   757,   758,    -1,   142,   327,   600,    -1,   142,   328,
+     600,    -1,   162,    -1,   162,   368,     7,   369,    -1,   121,
       -1,   121,   368,     7,   369,    -1,   211,    -1,   211,   368,
        7,   370,     7,   369,    -1,   211,   368,   111,     7,   370,
-       7,   369,    -1,     3,    -1,   763,    -1,   764,   370,   763,
-      -1,   368,     7,   370,     7,   369,    -1,   765,    -1,   766,
-     370,   765,    -1,   153,   368,   764,   369,    -1,   153,   368,
-     764,   369,   155,   766,    -1,   767,    -1,   768,   370,   767,
-      -1,    -1,   137,    -1,   131,   209,     3,   769,   768,    -1,
-       3,   762,    -1,   772,   370,     3,   762,    -1,    -1,   368,
-     771,   369,    -1,    -1,   209,     3,    -1,   230,   157,     3,
-     172,   599,   307,   773,   772,    -1
+       7,   369,    -1,     3,    -1,   764,    -1,   765,   370,   764,
+      -1,   368,     7,   370,     7,   369,    -1,   766,    -1,   767,
+     370,   766,    -1,   153,   368,   765,   369,    -1,   153,   368,
+     765,   369,   155,   767,    -1,   768,    -1,   769,   370,   768,
+      -1,    -1,   137,    -1,   131,   209,     3,   770,   769,    -1,
+       3,   763,    -1,   773,   370,     3,   763,    -1,    -1,   368,
+     772,   369,    -1,    -1,   209,     3,    -1,   230,   157,     3,
+     172,   600,   307,   774,   773,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   677,   677,   678,   681,   688,   690,   691,   692,   693,
-     694,   695,   696,   697,   698,   714,   715,   716,   717,   721,
-     723,   724,   725,   726,   727,   729,   730,   731,   732,   733,
-     734,   735,   736,   737,   738,   739,   740,   744,   745,   746,
-     747,   748,   749,   750,   751,   752,   753,   754,   755,   756,
-     757,   758,   759,   760,   761,   762,   763,   764,   765,   766,
-     767,   768,   769,   770,   771,   772,   773,   774,   775,   776,
-     777,   778,   779,   780,   781,   782,   783,   784,   785,   786,
-     787,   788,   789,   790,   791,   792,   793,   794,   795,   796,
-     797,   798,   799,   800,   801,   802,   803,   804,   805,   806,
-     807,   808,   809,   810,   811,   812,   813,   814,   815,   816,
-     817,   818,   819,   820,   821,   822,   823,   824,   825,   829,
-     830,   831,   835,   836,   837,   842,   845,   850,   851,   856,
-     857,   861,   866,   867,   871,   882,   883,   887,   891,   892,
-     896,   897,   898,   902,   903,   904,   905,   906,   910,   918,
-     919,   923,   924,   936,   937,   938,   943,   944,   948,   949,
-     950,   951,   952,   953,   954,   955,   956,   957,   959,   960,
-     969,   974,   975,   980,   982,   985,   987,   989,   994,   998,
-     999,  1003,  1004,  1008,  1009,  1013,  1014,  1015,  1016,  1017,
-    1018,  1019,  1020,  1021,  1025,  1026,  1030,  1031,  1035,  1038,
-    1045,  1049,  1050,  1054,  1055,  1059,  1060,  1064,  1065,  1069,
-    1070,  1074,  1084,  1094,  1101,  1107,  1108,  1109,  1113,  1114,
-    1115,  1119,  1123,  1127,  1144,  1151,  1158,  1159,  1163,  1167,
-    1174,  1174,  1177,  1185,  1186,  1190,  1191,  1195,  1196,  1200,
-    1202,  1204,  1210,  1216,  1223,  1228,  1229,  1237,  1240,  1246,
-    1252,  1258,  1263,  1264,  1268,  1281,  1294,  1298,  1299,  1304,
-    1306,  1307,  1308,  1310,  1316,  1317,  1322,  1323,  1327,  1332,
-    1333,  1337,  1338,  1339,  1340,  1341,  1345,  1350,  1355,  1361,
-    1362,  1370,  1380,  1381,  1386,  1389,  1394,  1395,  1399,  1400,
-    1408,  1409,  1410,  1415,  1419,  1426,  1427,  1431,  1432,  1437,
-    1439,  1444,  1445,  1446,  1451,  1458,  1465,  1472,  1473,  1477,
-    1478,  1482,  1486,  1493,  1494,  1498,  1505,  1506,  1510,  1523,
-    1536,  1537,  1541,  1542,  1546,  1554,  1562,  1563,  1567,  1568,
-    1572,  1573,  1577,  1578,  1582,  1583,  1587,  1588,  1593,  1597,
-    1598,  1599,  1600,  1601,  1602,  1603,  1604,  1605,  1606,  1607,
-    1608,  1609,  1610,  1611,  1612,  1613,  1614,  1615,  1616,  1617,
-    1618,  1619,  1620,  1621,  1622,  1623,  1627,  1634,  1639,  1644,
-    1649,  1656,  1658,  1663,  1671,  1672,  1673,  1678,  1679,  1684,
-    1689,  1691,  1695,  1696,  1701,  1707,  1708,  1709,  1710,  1711,
-    1712,  1713,  1714,  1715,  1716,  1717,  1718,  1719,  1720,  1721,
-    1722,  1723,  1724,  1735,  1736,  1740,  1741,  1745,  1746,  1750,
-    1751,  1755,  1756,  1761,  1762,  1766,  1772,  1777,  1778,  1782,
-    1811,  1812,  1816,  1817,  1822,  1823,  1824,  1825,  1826,  1827,
-    1828,  1829,  1830,  1831,  1832,  1833,  1834,  1839,  1840,  1844,
-    1844,  1850,  1851,  1852,  1863,  1864,  1869,  1870,  1872,  1874,
-    1876,  1878,  1879,  1885,  1893,  1894,  1895,  1900,  1904,  1917,
-    1918,  1923,  1924,  1925,  1929,  1930,  1936,  1937,  1941,  1942,
-    1944,  1946,  1948,  1950,  1952,  1957,  1958,  1962,  1963,  1967,
-    1968,  1970,  1972,  1974,  1976,  1978,  1983,  1984,  1988,  1989,
-    1990,  1994,  1998,  1999,  2003,  2004,  2009,  2017,  2024,  2034,
-    2035,  2041,  2042,  2046,  2047,  2051,  2062,  2074,  2078,  2079,
-    2085,  2086,  2092,  2097,  2098,  2102,  2104,  2108,  2112,  2114,
-    2121,  2122,  2126,  2130,  2134,  2135,  2136,  2138,  2139,  2140,
-    2143,  2145,  2149,  2153,  2160,  2161,  2162,  2166,  2174,  2175,
-    2176,  2181,  2185,  2186,  2190,  2202,  2237,  2238,  2242,  2243,
-    2244,  2245,  2251,  2253,  2255,  2257,  2258,  2262,  2263,  2264,
-    2265,  2266,  2267,  2268,  2269,  2273,  2282,  2305,  2313,  2324,
-    2330,  2338,  2339,  2345,  2354,  2359,  2363,  2369,  2372,  2375,
-    2388,  2393,  2394,  2395,  2399,  2409,  2420,  2421,  2426,  2427,
-    2428,  2429,  2430,  2431,  2433,  2434,  2435,  2436,  2437,  2441,
-    2442,  2443,  2458,  2459,  2463,  2464,  2465,  2466,  2467,  2468,
-    2469,  2470,  2471,  2472,  2473,  2474,  2478,  2479,  2480,  2495,
-    2496,  2500,  2501,  2502,  2503,  2504,  2505,  2506,  2507,  2508,
-    2509,  2510,  2511,  2515,  2524,  2525,  2529,  2542,  2544,  2546,
-    2551,  2553,  2555,  2557,  2559,  2561,  2566,  2569,  2573,  2579,
-    2580,  2587,  2588,  2589,  2590,  2591,  2592,  2593,  2594,  2595,
-    2600,  2601,  2606,  2607,  2608,  2612,  2613,  2614,  2615,  2617,
-    2618,  2622,  2634,  2640,  2646,  2648,  2650,  2652,  2654,  2661,
-    2663,  2665,  2668,  2671,  2677,  2686,  2692,  2695,  2699,  2703,
-    2707,  2711,  2715,  2725,  2727,  2747,  2752,  2758,  2759,  2763,
-    2764,  2765,  2766,  2770,  2771,  2772,  2777,  2778,  2782,  2788,
-    2793,  2794,  2798,  2799,  2803,  2805,  2810,  2812,  2817,  2822,
-    2829,  2830,  2832,  2837,  2843,  2844,  2845,  2849,  2850,  2851,
-    2852,  2853,  2854,  2855,  2856,  2857,  2858,  2859,  2860,  2864,
-    2865,  2866,  2867,  2868,  2869,  2870,  2871,  2885,  2886,  2887,
-    2899,  2900,  2901,  2902,  2906,  2907,  2908,  2909,  2913,  2914,
-    2915,  2916,  2920,  2921,  2922,  2923,  2927,  2929,  2933,  2941,
-    2944,  2947,  2950,  2953,  2956,  2959,  2962,  2965,  2968,  2975,
-    2978,  2981,  2984,  2987,  2990,  2993,  2996,  2999,  3002,  3005,
-    3008,  3011,  3014,  3017,  3020,  3023,  3026,  3029,  3032,  3035,
-    3038,  3041,  3044,  3047,  3050,  3053,  3056,  3058,  3063,  3066,
-    3069,  3075,  3076,  3079,  3082,  3085,  3091,  3092,  3096,  3100,
-    3101,  3105,  3106,  3109,  3112,  3115,  3118,  3128,  3138,  3142,
-    3149,  3157,  3165,  3169,  3173,  3174,  3184,  3188,  3189,  3193,
-    3194,  3198,  3200,  3202,  3204,  3206,  3208,  3210,  3212,  3214,
-    3235,  3236,  3237,  3238,  3239,  3240,  3241,  3245,  3255,  3256,
-    3260,  3261,  3265,  3269,  3273,  3281,  3287,  3289,  3294,  3301,
-    3302,  3306,  3307,  3311,  3312,  3316,  3318,  3323,  3325,  3327,
-    3332,  3333,  3334,  3338,  3339,  3343,  3344,  3345,  3346,  3347,
-    3348,  3349,  3353,  3354,  3358,  3362,  3363,  3364,  3365,  3366,
-    3367,  3368,  3372,  3373,  3375,  3379,  3380,  3391,  3392,  3396,
-    3401,  3402,  3403,  3404,  3405,  3406,  3407,  3408,  3409,  3410,
-    3411,  3412,  3413,  3417,  3417,  3427,  3428,  3432,  3433,  3434,
-    3434,  3438,  3439,  3440,  3441,  3442,  3450,  3458,  3465,  3466,
-    3466,  3467,  3467,  3471,  3472,  3473,  3477,  3486,  3488,  3493,
-    3494,  3495,  3499,  3500,  3504,  3505,  3506,  3507,  3508,  3509,
-    3510,  3511,  3512,  3513,  3514,  3515,  3516,  3517,  3521,  3523,
-    3525,  3527,  3532,  3533,  3537,  3538,  3542,  3543,  3544,  3545,
-    3546,  3547,  3548,  3549,  3550,  3551,  3552,  3553,  3557,  3558,
-    3566,  3567,  3571,  3572,  3601,  3609,  3610,  3614,  3616,  3617,
-    3621,  3622,  3623,  3624,  3628,  3631,  3634,  3637,  3643,  3644,
-    3648,  3649,  3653,  3658,  3659,  3660,  3661,  3665,  3666,  3667,
-    3671,  3672,  3673,  3677,  3678,  3679,  3683,  3684,  3688,  3690,
-    3692,  3697,  3703,  3704,  3708,  3712,  3713,  3714,  3718,  3719,
-    3721,  3725,  3726,  3730,  3731,  3735,  3736,  3740,  3749,  3754,
-    3759,  3774,  3775,  3779,  3786,  3787,  3800,  3801,  3806,  3810,
-    3811,  3817,  3818,  3823,  3824,  3829,  3849,  3850,  3855,  3856,
-    3866,  3867,  3871,  3872,  3876,  3877,  3893,  3894,  3895,  3896,
-    3897,  3898,  3902,  3903,  3913,  3914,  3918,  3928,  3931,  3937,
-    3938,  3944,  3951,  3972,  3982,  3983,  3984,  3985,  3989,  3990,
-    3991,  3992,  3996,  3997,  3998,  3999,  4003,  4003,  4014,  4021,
-    4022,  4028,  4034,  4043,  4044,  4048,  4049,  4053,  4058,  4059,
-    4063,  4064,  4065,  4066,  4070,  4071,  4072,  4073,  4074,  4078,
-    4079,  4083,  4090,  4091,  4092,  4096,  4097,  4101,  4102,  4106,
-    4107,  4111,  4112,  4113,  4114,  4115,  4116,  4117,  4118,  4119,
-    4120,  4121,  4125,  4126,  4130,  4131,  4135,  4136,  4137,  4141,
-    4142,  4146,  4148,  4153,  4158,  4163,  4171,  4176,  4184,  4185,
-    4186,  4187,  4191,  4192,  4196,  4197,  4201,  4205,  4213,  4214,
-    4215,  4216,  4217,  4218,  4219,  4220,  4221,  4222,  4223,  4224,
-    4225,  4226,  4230,  4231,  4232,  4233,  4234,  4235,  4236,  4237,
-    4238,  4242,  4243,  4247,  4248,  4252,  4257,  4265,  4270,  4279,
-    4288,  4292,  4302,  4312,  4316,  4318,  4320,  4322,  4327,  4329,
-    4331,  4333,  4338,  4339,  4344,  4346,  4348,  4353,  4354,  4358,
-    4363,  4367,  4368,  4369,  4370,  4374,  4375,  4376,  4380,  4381,
-    4385,  4393,  4401,  4409,  4421,  4422,  4423,  4424,  4425,  4426,
-    4427,  4432,  4436,  4437,  4441,  4445,  4446,  4451,  4452,  4457,
-    4458,  4462,  4463,  4467,  4472,  4473,  4477,  4478,  4481,  4482,
-    4487
+       0,   651,   651,   652,   655,   662,   664,   665,   666,   667,
+     668,   669,   670,   671,   672,   688,   689,   690,   691,   695,
+     697,   698,   699,   700,   701,   703,   704,   705,   706,   707,
+     708,   709,   710,   711,   712,   713,   714,   718,   719,   720,
+     721,   722,   723,   724,   725,   726,   727,   728,   729,   730,
+     731,   732,   733,   734,   735,   736,   737,   738,   739,   740,
+     741,   742,   743,   744,   745,   746,   747,   748,   749,   750,
+     751,   752,   753,   754,   755,   756,   757,   758,   759,   760,
+     761,   762,   763,   764,   765,   766,   767,   768,   769,   770,
+     771,   772,   773,   774,   775,   776,   777,   778,   779,   780,
+     781,   782,   783,   784,   785,   786,   787,   788,   789,   790,
+     791,   792,   793,   794,   795,   796,   797,   798,   799,   803,
+     804,   805,   809,   810,   811,   816,   819,   824,   825,   830,
+     831,   835,   840,   841,   845,   856,   857,   861,   865,   866,
+     870,   871,   872,   876,   877,   878,   879,   880,   884,   892,
+     893,   897,   898,   910,   911,   912,   917,   918,   922,   923,
+     924,   925,   926,   927,   928,   929,   930,   931,   933,   934,
+     943,   948,   949,   954,   956,   959,   961,   963,   968,   972,
+     973,   977,   978,   982,   983,   987,   988,   989,   990,   991,
+     992,   993,   994,   995,   999,  1000,  1004,  1005,  1009,  1012,
+    1019,  1023,  1024,  1028,  1029,  1033,  1034,  1038,  1039,  1043,
+    1044,  1048,  1058,  1068,  1075,  1081,  1082,  1083,  1087,  1088,
+    1089,  1093,  1097,  1101,  1118,  1125,  1132,  1137,  1141,  1148,
+    1148,  1151,  1159,  1160,  1164,  1165,  1169,  1170,  1174,  1176,
+    1178,  1184,  1190,  1197,  1202,  1203,  1211,  1214,  1220,  1226,
+    1232,  1237,  1238,  1242,  1255,  1268,  1272,  1273,  1278,  1280,
+    1281,  1282,  1284,  1290,  1291,  1296,  1297,  1301,  1306,  1307,
+    1311,  1312,  1313,  1314,  1315,  1319,  1324,  1329,  1335,  1336,
+    1344,  1354,  1355,  1360,  1363,  1368,  1369,  1373,  1374,  1382,
+    1383,  1384,  1389,  1393,  1400,  1401,  1405,  1406,  1411,  1413,
+    1418,  1419,  1420,  1425,  1432,  1439,  1446,  1447,  1451,  1452,
+    1456,  1460,  1467,  1468,  1472,  1479,  1480,  1484,  1497,  1510,
+    1511,  1515,  1516,  1520,  1528,  1536,  1537,  1541,  1542,  1546,
+    1547,  1551,  1552,  1556,  1557,  1561,  1562,  1567,  1571,  1573,
+    1574,  1575,  1576,  1577,  1578,  1579,  1580,  1581,  1582,  1583,
+    1584,  1585,  1586,  1587,  1588,  1589,  1590,  1591,  1592,  1593,
+    1594,  1595,  1596,  1597,  1601,  1608,  1613,  1618,  1623,  1630,
+    1632,  1637,  1645,  1646,  1647,  1652,  1653,  1658,  1663,  1665,
+    1669,  1670,  1675,  1681,  1682,  1683,  1684,  1685,  1686,  1687,
+    1688,  1689,  1690,  1691,  1692,  1693,  1694,  1695,  1696,  1697,
+    1698,  1709,  1710,  1714,  1715,  1719,  1720,  1724,  1725,  1729,
+    1730,  1735,  1736,  1740,  1746,  1751,  1752,  1756,  1785,  1786,
+    1790,  1791,  1796,  1797,  1798,  1799,  1800,  1801,  1802,  1803,
+    1804,  1805,  1806,  1807,  1808,  1813,  1814,  1818,  1818,  1824,
+    1825,  1826,  1837,  1838,  1843,  1844,  1846,  1848,  1850,  1852,
+    1853,  1859,  1867,  1868,  1869,  1874,  1878,  1891,  1892,  1897,
+    1898,  1899,  1903,  1904,  1910,  1911,  1915,  1916,  1918,  1920,
+    1922,  1924,  1926,  1931,  1932,  1936,  1937,  1941,  1942,  1944,
+    1946,  1948,  1950,  1952,  1957,  1958,  1962,  1963,  1964,  1968,
+    1972,  1973,  1977,  1978,  1983,  1991,  2003,  2020,  2021,  2027,
+    2028,  2032,  2033,  2037,  2048,  2049,  2053,  2065,  2069,  2070,
+    2076,  2077,  2083,  2088,  2089,  2093,  2095,  2099,  2103,  2105,
+    2112,  2113,  2117,  2121,  2125,  2126,  2127,  2129,  2130,  2131,
+    2134,  2136,  2140,  2144,  2151,  2152,  2153,  2157,  2165,  2166,
+    2167,  2172,  2176,  2177,  2181,  2193,  2228,  2229,  2233,  2234,
+    2235,  2236,  2242,  2244,  2246,  2248,  2249,  2253,  2254,  2255,
+    2256,  2257,  2258,  2259,  2260,  2264,  2273,  2296,  2304,  2315,
+    2321,  2329,  2330,  2336,  2345,  2350,  2354,  2360,  2363,  2366,
+    2379,  2384,  2385,  2386,  2390,  2400,  2405,  2406,  2411,  2412,
+    2413,  2414,  2415,  2416,  2418,  2419,  2420,  2421,  2422,  2426,
+    2427,  2428,  2429,  2430,  2434,  2435,  2436,  2437,  2438,  2439,
+    2440,  2441,  2442,  2443,  2444,  2445,  2449,  2450,  2451,  2452,
+    2453,  2457,  2458,  2459,  2460,  2461,  2462,  2463,  2464,  2465,
+    2466,  2467,  2468,  2472,  2481,  2482,  2486,  2499,  2501,  2503,
+    2508,  2510,  2512,  2514,  2516,  2518,  2523,  2526,  2530,  2536,
+    2537,  2544,  2545,  2546,  2547,  2548,  2549,  2550,  2551,  2552,
+    2557,  2558,  2563,  2564,  2565,  2569,  2570,  2571,  2572,  2574,
+    2575,  2579,  2591,  2597,  2603,  2605,  2607,  2609,  2611,  2618,
+    2620,  2622,  2625,  2628,  2634,  2643,  2649,  2652,  2656,  2660,
+    2664,  2668,  2672,  2682,  2684,  2704,  2709,  2715,  2716,  2720,
+    2721,  2722,  2723,  2727,  2728,  2729,  2734,  2735,  2739,  2745,
+    2750,  2751,  2755,  2756,  2760,  2762,  2767,  2769,  2774,  2779,
+    2786,  2787,  2789,  2794,  2800,  2801,  2802,  2806,  2807,  2808,
+    2809,  2810,  2811,  2812,  2813,  2814,  2815,  2816,  2817,  2821,
+    2822,  2823,  2824,  2825,  2826,  2827,  2828,  2842,  2843,  2844,
+    2850,  2851,  2852,  2853,  2857,  2858,  2859,  2860,  2864,  2865,
+    2866,  2867,  2871,  2872,  2873,  2874,  2878,  2880,  2884,  2892,
+    2895,  2898,  2901,  2904,  2907,  2910,  2913,  2916,  2919,  2926,
+    2929,  2932,  2935,  2938,  2941,  2944,  2947,  2950,  2953,  2956,
+    2959,  2962,  2965,  2968,  2971,  2974,  2977,  2980,  2983,  2986,
+    2989,  2992,  2995,  2998,  3001,  3004,  3007,  3009,  3014,  3017,
+    3020,  3026,  3027,  3030,  3033,  3036,  3042,  3043,  3047,  3051,
+    3052,  3056,  3057,  3060,  3063,  3066,  3069,  3079,  3089,  3093,
+    3100,  3108,  3116,  3120,  3124,  3125,  3129,  3133,  3134,  3138,
+    3139,  3143,  3145,  3147,  3149,  3151,  3153,  3155,  3157,  3159,
+    3180,  3181,  3182,  3183,  3184,  3185,  3186,  3190,  3200,  3201,
+    3205,  3206,  3210,  3214,  3218,  3226,  3232,  3234,  3239,  3246,
+    3247,  3251,  3252,  3256,  3257,  3261,  3263,  3268,  3270,  3272,
+    3277,  3278,  3279,  3283,  3284,  3288,  3289,  3290,  3291,  3292,
+    3293,  3294,  3298,  3299,  3303,  3307,  3308,  3309,  3310,  3311,
+    3312,  3313,  3317,  3318,  3320,  3324,  3325,  3336,  3337,  3341,
+    3346,  3347,  3348,  3349,  3350,  3351,  3352,  3353,  3354,  3355,
+    3356,  3357,  3358,  3362,  3362,  3372,  3373,  3377,  3378,  3379,
+    3379,  3383,  3384,  3385,  3386,  3387,  3395,  3403,  3410,  3411,
+    3411,  3412,  3412,  3416,  3417,  3418,  3422,  3431,  3433,  3438,
+    3439,  3440,  3444,  3445,  3449,  3450,  3451,  3452,  3453,  3454,
+    3455,  3456,  3457,  3458,  3459,  3460,  3461,  3462,  3466,  3468,
+    3470,  3472,  3477,  3478,  3482,  3483,  3487,  3488,  3489,  3490,
+    3491,  3492,  3493,  3494,  3495,  3496,  3497,  3498,  3502,  3503,
+    3511,  3512,  3516,  3517,  3546,  3554,  3555,  3559,  3561,  3562,
+    3566,  3567,  3568,  3569,  3573,  3576,  3579,  3582,  3588,  3589,
+    3593,  3594,  3598,  3603,  3604,  3605,  3606,  3610,  3611,  3612,
+    3616,  3617,  3618,  3622,  3623,  3624,  3628,  3629,  3633,  3635,
+    3637,  3642,  3648,  3649,  3653,  3657,  3658,  3659,  3663,  3664,
+    3666,  3670,  3671,  3675,  3676,  3680,  3681,  3685,  3694,  3699,
+    3704,  3719,  3720,  3724,  3731,  3732,  3745,  3746,  3751,  3755,
+    3756,  3762,  3763,  3768,  3769,  3774,  3794,  3795,  3800,  3801,
+    3811,  3812,  3816,  3817,  3821,  3822,  3838,  3839,  3840,  3841,
+    3842,  3843,  3847,  3848,  3858,  3859,  3863,  3873,  3876,  3882,
+    3883,  3889,  3896,  3917,  3927,  3928,  3929,  3930,  3934,  3935,
+    3936,  3937,  3941,  3942,  3943,  3944,  3948,  3948,  3959,  3966,
+    3967,  3973,  3979,  3988,  3989,  3993,  3994,  3998,  4003,  4004,
+    4008,  4009,  4010,  4011,  4015,  4016,  4017,  4018,  4019,  4023,
+    4024,  4028,  4035,  4036,  4037,  4041,  4042,  4046,  4047,  4051,
+    4052,  4056,  4057,  4058,  4059,  4060,  4061,  4062,  4063,  4064,
+    4065,  4066,  4070,  4071,  4075,  4076,  4080,  4081,  4082,  4086,
+    4087,  4091,  4093,  4098,  4103,  4108,  4116,  4121,  4129,  4130,
+    4131,  4132,  4136,  4137,  4141,  4142,  4146,  4150,  4158,  4159,
+    4160,  4161,  4162,  4163,  4164,  4165,  4166,  4167,  4168,  4169,
+    4170,  4171,  4175,  4176,  4177,  4178,  4179,  4180,  4181,  4182,
+    4183,  4187,  4188,  4192,  4193,  4197,  4202,  4210,  4215,  4224,
+    4233,  4237,  4247,  4257,  4261,  4263,  4265,  4267,  4272,  4274,
+    4276,  4278,  4283,  4284,  4289,  4291,  4293,  4298,  4299,  4303,
+    4308,  4312,  4313,  4314,  4315,  4319,  4320,  4321,  4325,  4326,
+    4330,  4338,  4346,  4354,  4366,  4367,  4368,  4369,  4370,  4371,
+    4372,  4377,  4381,  4382,  4386,  4390,  4391,  4396,  4397,  4402,
+    4403,  4407,  4408,  4412,  4417,  4418,  4422,  4423,  4426,  4427,
+    4432
 };
 #endif
 
@@ -2007,12 +2006,12 @@ static const char *const yytname[] =
   "sqlonly_query_exp", "query_exp", "query_or_sparql_exp",
   "non_final_union_exp", "non_final_query_term", "sqlonly_query_term",
   "sparqlonly_query_term", "query_term", "opt_corresponding",
-  "non_final_query_spec", "query_spec", "query_no_from_spec",
+  "non_final_query_spec", "query_opt_from_spec", "query_spec",
   "breakup_term", "breakup_list", "selection", "non_final_table_exp",
-  "table_exp", "from_clause", "table_ref_commalist", "proc_col_list",
-  "opt_proc_col_list", "column_commalist_or_empty", "table_ref",
-  "table_ref_nj", "jtype", "opt_outer", "join", "joined_table",
-  "joined_table_1", "join_condition", "where_clause",
+  "table_exp_opt", "table_exp", "from_clause", "table_ref_commalist",
+  "proc_col_list", "opt_proc_col_list", "column_commalist_or_empty",
+  "table_ref", "table_ref_nj", "jtype", "opt_outer", "join",
+  "joined_table", "joined_table_1", "join_condition", "where_clause",
   "opt_group_by_clause", "opt_having_clause", "opt_lock_mode",
   "search_condition", "predicate", "scalar_exp_predicate",
   "comparison_predicate", "between_predicate", "like_predicate",
@@ -2154,112 +2153,112 @@ static const yytype_uint16 yyr1[] =
      404,   404,   404,   404,   405,   405,   406,   406,   407,   407,
      408,   409,   409,   410,   410,   411,   411,   412,   412,   413,
      413,   414,   414,   414,   415,   416,   416,   416,   417,   417,
-     417,   418,   418,   419,   420,   421,   422,   422,   423,   423,
-     425,   424,   424,   426,   426,   427,   427,   428,   428,   429,
-     429,   429,   429,   429,   429,   430,   430,   431,   431,   431,
-     431,   431,   432,   432,   433,   433,   433,   434,   434,   435,
-     435,   435,   435,   435,   436,   436,   437,   437,   438,   439,
-     439,   440,   440,   440,   440,   440,   441,   442,   443,   444,
-     444,   445,   446,   446,   447,   447,   448,   448,   449,   449,
-     450,   450,   450,   451,   451,   452,   452,   453,   453,   454,
-     454,   455,   455,   455,   456,   457,   458,   459,   459,   460,
-     460,   461,   461,   462,   462,   463,   464,   464,   465,   466,
-     467,   467,   468,   468,   469,   470,   471,   471,   472,   472,
-     473,   473,   474,   474,   475,   475,   476,   476,   377,   477,
+     417,   418,   418,   419,   420,   421,   422,   423,   423,   425,
+     424,   424,   426,   426,   427,   427,   428,   428,   429,   429,
+     429,   429,   429,   429,   430,   430,   431,   431,   431,   431,
+     431,   432,   432,   433,   433,   433,   434,   434,   435,   435,
+     435,   435,   435,   436,   436,   437,   437,   438,   439,   439,
+     440,   440,   440,   440,   440,   441,   442,   443,   444,   444,
+     445,   446,   446,   447,   447,   448,   448,   449,   449,   450,
+     450,   450,   451,   451,   452,   452,   453,   453,   454,   454,
+     455,   455,   455,   456,   457,   458,   459,   459,   460,   460,
+     461,   461,   462,   462,   463,   464,   464,   465,   466,   467,
+     467,   468,   468,   469,   470,   471,   471,   472,   472,   473,
+     473,   474,   474,   475,   475,   476,   476,   377,   477,   477,
      477,   477,   477,   477,   477,   477,   477,   477,   477,   477,
      477,   477,   477,   477,   477,   477,   477,   477,   477,   477,
-     477,   477,   477,   477,   477,   477,   478,   479,   480,   481,
-     482,   483,   483,   483,   484,   484,   484,   485,   485,   486,
-     487,   487,   488,   488,   489,   490,   490,   490,   490,   490,
+     477,   477,   477,   477,   478,   479,   480,   481,   482,   483,
+     483,   483,   484,   484,   484,   485,   485,   486,   487,   487,
+     488,   488,   489,   490,   490,   490,   490,   490,   490,   490,
      490,   490,   490,   490,   490,   490,   490,   490,   490,   490,
-     490,   490,   490,   491,   491,   492,   492,   493,   493,   494,
-     494,   495,   495,   496,   496,   497,   498,   499,   499,   500,
-     501,   501,   502,   502,   503,   503,   503,   503,   503,   503,
-     503,   503,   503,   503,   503,   503,   503,   504,   504,   506,
-     505,   507,   507,   507,   508,   508,   509,   509,   509,   509,
-     509,   509,   509,   510,   511,   511,   511,   512,   513,   514,
-     514,   515,   515,   515,   516,   516,   517,   517,   518,   518,
-     518,   518,   518,   518,   518,   519,   519,   520,   520,   521,
-     521,   521,   521,   521,   521,   521,   522,   522,   523,   523,
-     523,   524,   525,   525,   526,   526,   527,   528,   529,   530,
-     530,   531,   531,   532,   532,   533,   534,   535,   536,   536,
-     537,   537,   538,   539,   539,   540,   540,   540,   540,   540,
-     541,   541,   541,   541,   542,   542,   542,   542,   542,   542,
-     543,   543,   544,   544,   545,   545,   545,   546,   547,   547,
-     547,   548,   549,   549,   549,   549,   550,   550,   551,   551,
-     551,   551,   552,   552,   552,   552,   552,   553,   553,   553,
-     553,   553,   553,   553,   553,   554,   555,   556,   556,   557,
-     557,   558,   558,   558,   559,   559,   560,   560,   560,   560,
-     561,   562,   562,   562,   563,   564,   565,   565,   566,   566,
-     566,   566,   566,   566,   566,   566,   566,   566,   566,   567,
-     567,   567,   567,   567,   567,   567,   567,   567,   567,   567,
-     567,   567,   567,   567,   567,   567,   568,   568,   568,   568,
+     490,   491,   491,   492,   492,   493,   493,   494,   494,   495,
+     495,   496,   496,   497,   498,   499,   499,   500,   501,   501,
+     502,   502,   503,   503,   503,   503,   503,   503,   503,   503,
+     503,   503,   503,   503,   503,   504,   504,   506,   505,   507,
+     507,   507,   508,   508,   509,   509,   509,   509,   509,   509,
+     509,   510,   511,   511,   511,   512,   513,   514,   514,   515,
+     515,   515,   516,   516,   517,   517,   518,   518,   518,   518,
+     518,   518,   518,   519,   519,   520,   520,   521,   521,   521,
+     521,   521,   521,   521,   522,   522,   523,   523,   523,   524,
+     525,   525,   526,   526,   527,   528,   529,   530,   530,   531,
+     531,   532,   532,   533,   534,   534,   535,   536,   537,   537,
+     538,   538,   539,   540,   540,   541,   541,   541,   541,   541,
+     542,   542,   542,   542,   543,   543,   543,   543,   543,   543,
+     544,   544,   545,   545,   546,   546,   546,   547,   548,   548,
+     548,   549,   550,   550,   550,   550,   551,   551,   552,   552,
+     552,   552,   553,   553,   553,   553,   553,   554,   554,   554,
+     554,   554,   554,   554,   554,   555,   556,   557,   557,   558,
+     558,   559,   559,   559,   560,   560,   561,   561,   561,   561,
+     562,   563,   563,   563,   564,   565,   566,   566,   567,   567,
+     567,   567,   567,   567,   567,   567,   567,   567,   567,   568,
      568,   568,   568,   568,   568,   568,   568,   568,   568,   568,
-     568,   568,   568,   569,   570,   570,   571,   572,   572,   572,
-     573,   573,   573,   573,   573,   573,   574,   574,   575,   576,
-     576,   577,   577,   577,   577,   577,   577,   577,   577,   577,
-     578,   578,   579,   579,   579,   580,   580,   580,   580,   580,
-     580,   581,   581,   581,   581,   581,   581,   581,   581,   581,
-     581,   581,   581,   581,   581,   581,   581,   581,   581,   581,
-     581,   581,   581,   377,   377,   582,   582,   583,   583,   584,
-     584,   584,   584,   585,   585,   585,   586,   586,   587,   588,
-     589,   589,   590,   590,   591,   591,   592,   592,   593,   594,
-     595,   595,   595,   596,   596,   596,   596,   597,   597,   597,
-     597,   597,   597,   597,   597,   597,   597,   597,   597,   598,
-     598,   598,   598,   598,   598,   598,   598,   598,   598,   598,
-     599,   599,   599,   599,   600,   600,   600,   600,   601,   601,
-     601,   601,   602,   602,   602,   602,   603,   603,   603,   604,
-     604,   604,   604,   604,   604,   604,   604,   604,   604,   605,
-     605,   605,   605,   605,   605,   605,   605,   605,   605,   605,
-     605,   605,   605,   605,   605,   605,   605,   605,   605,   605,
-     605,   605,   605,   605,   605,   605,   605,   605,   605,   605,
-     605,   606,   606,   606,   606,   606,   607,   607,   608,   608,
-     608,   609,   609,   609,   609,   609,   609,   609,   609,   609,
-     610,   610,   611,   612,   613,   613,   614,   615,   615,   616,
-     616,   617,   617,   617,   617,   617,   617,   617,   617,   617,
-     377,   377,   377,   377,   377,   377,   377,   618,   619,   619,
-     620,   620,   621,   621,   621,   622,   623,   623,   624,   625,
-     625,   626,   626,   627,   627,   628,   628,   629,   629,   629,
-     630,   630,   630,   631,   631,   632,   632,   632,   632,   632,
-     632,   632,   633,   633,   634,   635,   635,   635,   635,   635,
-     635,   635,   636,   636,   636,   637,   637,   638,   638,   639,
-     640,   640,   640,   640,   640,   640,   640,   640,   640,   640,
-     640,   640,   640,   642,   641,   643,   643,   644,   644,   645,
-     644,   646,   646,   646,   646,   646,   646,   646,   647,   648,
-     647,   649,   647,   650,   650,   650,   651,   652,   652,   653,
-     653,   653,   653,   653,   654,   654,   654,   654,   654,   654,
-     654,   654,   654,   654,   654,   654,   654,   654,   655,   655,
-     655,   655,   656,   656,   657,   657,   658,   658,   658,   658,
-     658,   658,   658,   658,   658,   658,   658,   658,   659,   659,
-     660,   660,   661,   661,   662,   663,   663,   664,   664,   664,
-     665,   665,   665,   665,   666,   666,   666,   666,   667,   667,
-     668,   668,   669,   670,   670,   670,   670,   671,   671,   671,
-     672,   672,   672,   673,   673,   673,   674,   674,   675,   675,
-     675,   676,   677,   677,   678,   679,   679,   679,   680,   680,
-     680,   681,   681,   682,   682,   683,   683,   684,   685,   685,
-     685,   686,   686,   687,   687,   687,   688,   688,   689,   690,
-     690,   691,   691,   692,   692,   693,   694,   694,   695,   695,
-     696,   696,   697,   697,   698,   698,   699,   699,   699,   699,
-     699,   699,   700,   700,   701,   701,   702,   703,   703,   704,
-     704,   705,   706,   707,   708,   708,   708,   708,   709,   709,
-     709,   709,   710,   710,   710,   710,   712,   711,   713,   714,
-     714,   714,   714,   715,   715,   716,   716,   717,   718,   718,
-     719,   719,   719,   719,   720,   720,   720,   720,   720,   721,
-     721,   722,   723,   723,   723,   724,   724,   725,   725,   726,
-     726,   727,   727,   727,   727,   727,   727,   727,   727,   727,
-     727,   727,   728,   728,   729,   729,   730,   730,   730,   731,
-     731,   732,   732,   733,   734,   734,   735,   735,   736,   736,
-     736,   736,   737,   737,   738,   738,   739,   739,   740,   740,
-     740,   740,   740,   740,   740,   740,   740,   740,   740,   740,
-     740,   740,   741,   741,   741,   741,   741,   741,   741,   741,
-     741,   742,   742,   743,   743,   744,   744,   745,   746,   746,
-     746,   747,   747,   747,   748,   748,   748,   748,   749,   749,
-     749,   749,   750,   750,   751,   751,   751,   752,   752,   753,
-     754,   755,   755,   755,   755,   756,   756,   756,   757,   757,
-     758,   759,   760,   761,   762,   762,   762,   762,   762,   762,
-     762,   763,   764,   764,   765,   766,   766,   767,   767,   768,
-     768,   769,   769,   770,   771,   771,   772,   772,   773,   773,
-     774
+     568,   568,   568,   568,   568,   568,   569,   569,   569,   569,
+     569,   569,   569,   569,   569,   569,   569,   569,   569,   569,
+     569,   569,   569,   570,   571,   571,   572,   573,   573,   573,
+     574,   574,   574,   574,   574,   574,   575,   575,   576,   577,
+     577,   578,   578,   578,   578,   578,   578,   578,   578,   578,
+     579,   579,   580,   580,   580,   581,   581,   581,   581,   581,
+     581,   582,   582,   582,   582,   582,   582,   582,   582,   582,
+     582,   582,   582,   582,   582,   582,   582,   582,   582,   582,
+     582,   582,   582,   377,   377,   583,   583,   584,   584,   585,
+     585,   585,   585,   586,   586,   586,   587,   587,   588,   589,
+     590,   590,   591,   591,   592,   592,   593,   593,   594,   595,
+     596,   596,   596,   597,   597,   597,   597,   598,   598,   598,
+     598,   598,   598,   598,   598,   598,   598,   598,   598,   599,
+     599,   599,   599,   599,   599,   599,   599,   599,   599,   599,
+     600,   600,   600,   600,   601,   601,   601,   601,   602,   602,
+     602,   602,   603,   603,   603,   603,   604,   604,   604,   605,
+     605,   605,   605,   605,   605,   605,   605,   605,   605,   606,
+     606,   606,   606,   606,   606,   606,   606,   606,   606,   606,
+     606,   606,   606,   606,   606,   606,   606,   606,   606,   606,
+     606,   606,   606,   606,   606,   606,   606,   606,   606,   606,
+     606,   607,   607,   607,   607,   607,   608,   608,   609,   609,
+     609,   610,   610,   610,   610,   610,   610,   610,   610,   610,
+     611,   611,   612,   613,   614,   614,   615,   616,   616,   617,
+     617,   618,   618,   618,   618,   618,   618,   618,   618,   618,
+     377,   377,   377,   377,   377,   377,   377,   619,   620,   620,
+     621,   621,   622,   622,   622,   623,   624,   624,   625,   626,
+     626,   627,   627,   628,   628,   629,   629,   630,   630,   630,
+     631,   631,   631,   632,   632,   633,   633,   633,   633,   633,
+     633,   633,   634,   634,   635,   636,   636,   636,   636,   636,
+     636,   636,   637,   637,   637,   638,   638,   639,   639,   640,
+     641,   641,   641,   641,   641,   641,   641,   641,   641,   641,
+     641,   641,   641,   643,   642,   644,   644,   645,   645,   646,
+     645,   647,   647,   647,   647,   647,   647,   647,   648,   649,
+     648,   650,   648,   651,   651,   651,   652,   653,   653,   654,
+     654,   654,   654,   654,   655,   655,   655,   655,   655,   655,
+     655,   655,   655,   655,   655,   655,   655,   655,   656,   656,
+     656,   656,   657,   657,   658,   658,   659,   659,   659,   659,
+     659,   659,   659,   659,   659,   659,   659,   659,   660,   660,
+     661,   661,   662,   662,   663,   664,   664,   665,   665,   665,
+     666,   666,   666,   666,   667,   667,   667,   667,   668,   668,
+     669,   669,   670,   671,   671,   671,   671,   672,   672,   672,
+     673,   673,   673,   674,   674,   674,   675,   675,   676,   676,
+     676,   677,   678,   678,   679,   680,   680,   680,   681,   681,
+     681,   682,   682,   683,   683,   684,   684,   685,   686,   686,
+     686,   687,   687,   688,   688,   688,   689,   689,   690,   691,
+     691,   692,   692,   693,   693,   694,   695,   695,   696,   696,
+     697,   697,   698,   698,   699,   699,   700,   700,   700,   700,
+     700,   700,   701,   701,   702,   702,   703,   704,   704,   705,
+     705,   706,   707,   708,   709,   709,   709,   709,   710,   710,
+     710,   710,   711,   711,   711,   711,   713,   712,   714,   715,
+     715,   715,   715,   716,   716,   717,   717,   718,   719,   719,
+     720,   720,   720,   720,   721,   721,   721,   721,   721,   722,
+     722,   723,   724,   724,   724,   725,   725,   726,   726,   727,
+     727,   728,   728,   728,   728,   728,   728,   728,   728,   728,
+     728,   728,   729,   729,   730,   730,   731,   731,   731,   732,
+     732,   733,   733,   734,   735,   735,   736,   736,   737,   737,
+     737,   737,   738,   738,   739,   739,   740,   740,   741,   741,
+     741,   741,   741,   741,   741,   741,   741,   741,   741,   741,
+     741,   741,   742,   742,   742,   742,   742,   742,   742,   742,
+     742,   743,   743,   744,   744,   745,   745,   746,   747,   747,
+     747,   748,   748,   748,   749,   749,   749,   749,   750,   750,
+     750,   750,   751,   751,   752,   752,   752,   753,   753,   754,
+     755,   756,   756,   756,   756,   757,   757,   757,   758,   758,
+     759,   760,   761,   762,   763,   763,   763,   763,   763,   763,
+     763,   764,   765,   765,   766,   767,   767,   768,   768,   769,
+     769,   770,   770,   771,   772,   772,   773,   773,   774,   774,
+     775
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -2287,35 +2286,35 @@ static const yytype_uint8 yyr2[] =
        1,     2,     4,     1,     1,     2,     0,     1,     9,    12,
        4,     0,     1,     3,     3,     0,     1,     1,     3,     1,
        3,     6,     6,     6,     5,     1,     1,     1,     0,     1,
-       1,     3,     1,     5,     4,     4,     1,     1,     4,     4,
-       0,     5,    12,     0,     3,     0,     3,     0,     3,     5,
-       7,     7,     6,     7,     5,     0,     3,     6,     6,     6,
-       6,     4,     0,     3,     2,     1,     1,     1,     3,     2,
-       1,     1,     2,     2,     1,     3,     1,     1,     4,     3,
-       3,     3,     4,     3,     4,     3,     5,     5,     5,     0,
-       5,    10,     0,     2,     0,     4,     0,     2,     0,     3,
-       1,     1,     1,     5,     6,     0,     3,     1,     3,     2,
-       2,     0,     1,     1,     5,     5,     5,     0,     1,     0,
-       2,     7,     6,     0,     2,     4,     0,     2,     4,    15,
-       0,     2,     0,     3,     6,     6,     0,     1,     0,     3,
-       0,     5,     0,     2,     0,     2,     0,     2,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     3,     1,
+       1,     3,     1,     5,     4,     4,     1,     4,     4,     0,
+       5,    12,     0,     3,     0,     3,     0,     3,     5,     7,
+       7,     6,     7,     5,     0,     3,     6,     6,     6,     6,
+       4,     0,     3,     2,     1,     1,     1,     3,     2,     1,
+       1,     2,     2,     1,     3,     1,     1,     4,     3,     3,
+       3,     4,     3,     4,     3,     5,     5,     5,     0,     5,
+      10,     0,     2,     0,     4,     0,     2,     0,     3,     1,
+       1,     1,     5,     6,     0,     3,     1,     3,     2,     2,
+       0,     1,     1,     5,     5,     5,     0,     1,     0,     2,
+       7,     6,     0,     2,     4,     0,     2,     4,    15,     0,
+       2,     0,     3,     6,     6,     0,     1,     0,     3,     0,
+       5,     0,     2,     0,     2,     0,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     3,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     2,     2,     2,     8,
-       5,     4,     5,     6,     1,     1,     1,     0,     2,     7,
-       4,     1,     1,     3,     1,     1,     2,     1,     1,     1,
-       1,     1,     1,     2,     4,     2,     3,     3,     1,     2,
-       2,     2,     2,     1,     3,     0,     4,     0,     5,     1,
-       2,     1,     3,     0,     3,     3,     2,     0,     2,     7,
-       1,     3,     1,     3,     4,     4,     1,     1,     1,     1,
-       1,     1,     2,     2,     2,     2,     2,     1,     2,     0,
-       3,     0,     1,     1,     0,     2,     1,     4,     6,     6,
-       8,     1,     7,     9,     0,     1,     3,     3,     6,     1,
-       3,     1,     1,     1,     0,     1,     0,     1,     1,     5,
-       6,     4,     5,     4,     5,     1,     1,     1,     2,     1,
-       5,     6,     4,     5,     4,     5,     1,     2,     1,     4,
-       2,     5,     1,     1,     0,     5,     4,     4,     3,     3,
-       5,     1,     2,     1,     2,     4,     7,     2,     1,     3,
+       1,     1,     1,     1,     2,     2,     2,     8,     5,     4,
+       5,     6,     1,     1,     1,     0,     2,     7,     4,     1,
+       1,     3,     1,     1,     2,     1,     1,     1,     1,     1,
+       1,     2,     4,     2,     3,     3,     1,     2,     2,     2,
+       2,     1,     3,     0,     4,     0,     5,     1,     2,     1,
+       3,     0,     3,     3,     2,     0,     2,     7,     1,     3,
+       1,     3,     4,     4,     1,     1,     1,     1,     1,     1,
+       2,     2,     2,     2,     2,     1,     2,     0,     3,     0,
+       1,     1,     0,     2,     1,     4,     6,     6,     8,     1,
+       7,     9,     0,     1,     3,     3,     6,     1,     3,     1,
+       1,     1,     0,     1,     0,     1,     1,     5,     6,     4,
+       5,     4,     5,     1,     1,     1,     2,     1,     5,     6,
+       4,     5,     4,     5,     1,     2,     1,     4,     2,     5,
+       1,     1,     0,     5,     4,     4,     4,     3,     5,     1,
+       2,     1,     2,     4,     0,     1,     7,     2,     1,     3,
        1,     3,     3,     0,     1,     1,     4,     5,     1,     6,
        1,     2,     3,     3,     0,     2,     2,     2,     1,     1,
        0,     1,     2,     1,     1,     3,     3,     5,     0,     2,
@@ -2407,592 +2406,590 @@ static const yytype_uint16 yydefact[] =
       74,    75,    76,    77,    78,    79,    80,    81,    84,    83,
       82,    97,    85,    86,    87,    88,    89,    90,    91,    92,
       93,    94,    95,   106,   107,    96,   116,   117,   118,     0,
-     845,     0,   196,     0,     0,     0,     0,     0,     0,   441,
+     845,     0,   196,     0,     0,     0,     0,     0,     0,   439,
        0,     0,     0,   837,   837,     0,     0,     0,     0,     0,
        0,     0,   659,    98,     0,     0,   657,   658,     0,     0,
      105,     0,     0,   687,   688,   690,    99,   100,   101,   102,
      103,   104,   108,   109,   110,   111,   112,   113,   114,   115,
        0,     0,     3,     4,     5,    15,   651,    19,    20,    23,
       22,    16,    24,    10,     8,     9,     6,    25,    26,    29,
-      27,    28,    30,    31,    32,   356,   357,   358,   359,   360,
-     361,   362,   363,   364,   365,   338,   355,   352,   344,   345,
-     343,   353,   341,   342,   477,   339,   466,   479,   468,   486,
-     488,   340,     0,   999,   354,   850,   851,   852,   346,   350,
-     854,   855,   856,     7,   351,     0,    33,    34,   853,   347,
-     349,    35,    11,    12,    13,    14,    36,    21,    40,   750,
-       0,     0,     0,   870,     0,   869,     0,   368,     0,  1158,
-       0,     0,   326,     0,  1157,   190,     0,   189,   193,   870,
-       0,   186,     0,     0,   187,   188,     0,   185,     0,     0,
-       0,     0,     0,     0,     0,     0,   194,   197,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   255,   261,
-     260,   266,   237,   237,   237,     0,     0,    98,   836,     0,
-     256,   257,     0,   264,   267,     0,   374,   375,   376,     0,
-     416,   442,   443,   439,   451,   446,     0,     0,     0,   108,
-       0,     0,   407,     0,   441,     0,   659,   651,   478,   998,
-     838,   841,   838,   842,   844,   837,     0,     0,     0,     0,
-     837,     0,     0,   255,     0,     0,    98,     0,     0,   848,
-     849,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   366,   490,     0,     0,     0,     0,     0,     0,     1,
-       2,   196,     0,     0,     0,     0,    17,    18,     0,   494,
-     494,   467,     0,   665,     0,     0,   693,   649,     0,   727,
-     728,   729,   730,   733,   731,     0,   834,   835,   732,   116,
-     774,   734,   705,     0,     0,     0,     0,     0,     0,     0,
-       0,   769,   601,   585,     0,     0,   606,   607,   612,   647,
-     604,   599,   608,   609,   610,   611,   703,   600,   704,     0,
-     720,   348,     0,   614,   615,  1222,   605,   754,   279,     0,
-    1102,  1113,     0,     0,     0,   327,     0,   270,   191,     0,
-     762,     0,   269,   230,  1261,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   195,     0,     0,     0,   464,
-       0,   271,  1098,   218,     0,   275,   201,   203,   273,   204,
-    1047,  1048,  1050,     0,     0,     0,   313,  1242,  1243,  1049,
-     254,     0,   263,   259,   262,     0,     0,     0,     0,     0,
-       0,     0,   769,     0,   377,     0,     0,     0,     0,     0,
-       0,     0,     0,   498,   699,   597,     0,   700,   598,   503,
-     596,   594,     0,   595,   613,     0,   615,     0,     0,     0,
-       0,  1005,  1006,   316,     0,     0,   407,   766,   454,     0,
-       0,   843,   839,  1094,     0,     0,     0,     0,   847,     0,
-     665,   254,     0,     0,     0,     0,     0,     0,   649,   649,
-     649,     0,   649,   649,     0,   649,   680,   649,     0,     0,
-       0,     0,   295,     0,  1228,     0,  1095,   652,   494,     0,
-       0,   494,     0,   494,   769,   697,   662,   666,   670,     0,
-     667,  1227,     0,     0,   751,   697,     0,   650,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   710,     0,     0,
-       0,     0,     0,     0,     0,     0,   597,   596,     0,     0,
-     646,     0,   648,     0,   721,   665,     0,     0,   282,     0,
-     871,     0,     0,  1109,     0,     0,     0,     0,     0,     0,
-       0,   179,   235,  1262,     0,  1035,  1036,     0,     0,   871,
-       0,   224,     0,     0,     0,     0,     0,     0,   832,     0,
-     871,     0,     0,   405,   465,     0,   272,     0,   219,   220,
-    1108,     0,   200,   202,   274,   225,  1092,     0,     0,   315,
-       0,   830,     0,   181,     0,     0,     0,     0,   258,   245,
-     265,     0,   692,     0,   405,     0,     0,     0,     0,     0,
-     431,   426,   427,   430,   428,   429,     0,     0,   437,   440,
-     444,     0,   592,   593,     0,   501,   504,     0,     0,   597,
-     596,     0,   496,   497,   464,   645,     0,     0,     0,     0,
-       0,     0,   642,     0,     0,   648,     0,   665,     0,   268,
-       0,  1004,     0,   318,   407,     0,   768,   464,   455,     0,
-       0,     0,  1227,     0,   846,     0,  1156,  1156,  1230,     0,
-     205,   205,     0,   205,   179,     0,     0,     0,     0,     0,
-       0,     0,   251,     0,     0,     0,     0,     0,     0,     0,
-       0,   697,     0,     0,     0,     0,   689,   691,     0,   489,
-       0,  1097,   655,     0,     0,     0,     0,   484,   492,   493,
-     473,     0,   482,   471,   494,     0,     0,     0,     0,   671,
-       0,   665,   753,     0,     0,     0,     0,     0,     0,     0,
-     737,   738,   806,   787,   812,   782,     0,   788,   785,   779,
-     790,   786,   813,   794,     0,     0,   809,   810,   797,   800,
-     798,   799,   736,   801,   803,   811,   735,   665,     0,   717,
-       0,     0,     0,     0,   556,   564,   557,   558,   559,   560,
-     561,   562,   563,   565,     0,     0,     0,   712,   709,   711,
-       0,     0,     0,   665,     0,     0,     0,   586,   602,     0,
-       0,     0,   775,     0,   770,  1223,  1213,     0,     0,  1224,
-     722,     0,     0,   755,     0,     0,     0,   882,   880,   881,
-     873,     0,   875,     0,     0,   902,     0,  1103,  1114,     0,
-       0,  1106,  1203,   192,   322,     0,     0,     0,   763,   475,
-     119,   476,     0,     0,     0,   127,   129,   130,     0,     0,
-       0,   231,     0,     0,  1259,  1263,  1037,  1040,  1038,   235,
-       0,     0,     0,     0,     0,  1089,     0,   304,   307,  1235,
-    1235,     0,   902,   871,     0,   541,     0,   370,   278,     0,
-    1099,   322,   305,   314,   239,     0,   238,     0,     0,     0,
-       0,     0,     0,   244,     0,   770,   378,   237,   435,     0,
-       0,   422,     0,   432,   433,   434,   436,   438,     0,     0,
-     447,     0,     0,   502,     0,   707,   706,     0,   696,     0,
-       0,     0,     0,   507,   508,   518,   534,   407,   515,     0,
-     542,   644,     0,   641,   643,  1093,   589,   588,   590,   591,
-    1224,   701,   702,     0,   988,     0,   276,     0,     0,  1003,
-    1007,   317,   767,     0,     0,     0,   405,     0,  1227,     0,
-     840,     0,  1095,     0,     0,     0,   218,  1156,     0,  1168,
-    1233,     0,   206,     0,     0,   214,     0,     0,   222,   223,
-     277,   665,   997,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   306,     0,
-       0,   205,   205,   205,     0,  1096,   653,   485,   474,     0,
-       0,   483,   472,     0,   480,   469,   660,     0,   664,   663,
-     698,   668,   669,     0,   752,   694,   698,     0,     0,     0,
-     726,     0,     0,     0,   791,     0,     0,     0,     0,     0,
-     792,   793,   805,     0,     0,     0,     0,     0,   554,     0,
-     584,     0,     0,   565,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   715,     0,   708,   713,   718,     0,     0,
-       0,   587,     0,     0,     0,     0,  1097,     0,   990,     0,
-     665,  1215,   757,     0,     0,   283,     0,   874,     0,     0,
-     819,   872,   820,   898,   900,   896,   901,   895,   899,   897,
-       0,     0,   282,  1105,     0,  1202,  1192,  1193,  1194,  1195,
-    1196,  1197,  1198,  1199,  1200,  1201,  1112,     0,  1115,     0,
-       0,     0,   324,     0,     0,   765,     0,     0,     0,   126,
-     180,   173,   122,   179,     0,     0,   196,     0,     0,   822,
-     823,     0,   821,   149,   826,     0,     0,     0,     0,  1039,
-       0,     0,   866,   868,     0,     0,     0,     0,   312,   308,
-     309,     0,  1238,  1238,     0,     0,   902,     0,     0,  1101,
-       0,   325,     0,   182,   252,   252,   242,   252,     0,     0,
-       0,     0,     0,     0,   420,     0,   445,   444,     0,   444,
-       0,     0,   499,   695,     0,     0,   524,   534,     0,     0,
-     534,     0,   530,   530,   530,   528,   529,   524,   533,     0,
-     513,     0,   546,     0,   640,   665,   989,  1215,  1001,  1000,
-    1002,     0,     0,   385,   391,     0,     0,   398,     0,     0,
-     389,   390,   392,   388,   387,     0,   403,     0,     0,   456,
-     458,   457,  1227,  1097,     0,     0,   218,     0,  1234,  1167,
-       0,  1231,     0,  1174,  1268,   212,   209,   207,   211,   213,
-     180,     0,   249,   248,   250,   247,     0,   682,   681,   677,
-       0,   675,   676,     0,     0,   674,   679,   673,   296,   297,
-     301,   301,   656,     0,     0,     0,   481,   470,     0,  1207,
-       0,   725,   724,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   723,     0,   555,   552,   553,   716,
-       0,     0,     0,   582,   581,   583,     0,   566,     0,     0,
-     577,     0,   575,   571,     0,   634,     0,  1229,   603,     0,
-       0,     0,   776,     0,   771,  1210,   991,     0,   756,     0,
-     284,   876,   902,   816,   818,     0,   885,     0,  1104,     0,
-       0,     0,  1137,  1204,     0,     0,     0,   513,   764,   120,
-     121,   123,     0,   125,   128,     0,     0,     0,     0,     0,
-       0,     0,   828,   829,   827,   131,   236,     0,   233,   226,
-     227,  1251,  1252,     0,  1260,  1032,   758,     0,   867,   871,
-       0,  1087,     0,   441,     0,  1068,  1063,     0,   311,     0,
-       0,  1240,  1241,     0,     0,   923,   862,     0,   833,   405,
-       0,  1100,     0,     0,   243,   241,   240,   246,     0,   771,
-       0,   379,   381,   424,   425,   423,     0,   449,   444,   448,
-       0,     0,     0,     0,   535,     0,     0,   536,   509,   531,
-     525,   526,   527,   532,     0,   514,     0,     0,     0,   295,
-       0,   638,   637,     0,   402,   400,   386,    74,     0,   395,
-     401,   399,   393,     0,   408,     0,     0,  1096,     0,  1232,
-       0,  1132,     0,  1181,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1166,  1175,  1176,     0,  1266,     0,
-       0,   221,   686,     0,     0,     0,     0,     0,   302,   303,
-     299,   300,   654,   495,   295,   661,   672,   807,   815,   783,
-       0,   789,   780,     0,   814,   795,   796,   808,   802,   804,
-     633,     0,     0,   576,   571,   580,     0,     0,   574,     0,
-       0,   570,   714,     0,     0,   719,     0,     0,   778,   773,
-       0,     0,  1214,   280,     0,   286,     0,     0,   877,     0,
-       0,     0,     0,   904,     0,     0,     0,     0,  1116,  1141,
-       0,  1149,     0,     0,     0,     0,  1150,  1152,  1138,  1139,
-       0,   323,     0,     0,   124,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   159,     0,     0,   170,
-       0,   160,     0,     0,     0,   166,   163,   150,   229,     0,
-     228,  1257,     0,     0,  1041,     0,     0,   902,     0,  1090,
-    1088,     0,     0,  1070,     0,  1064,  1082,   310,     0,  1239,
-       0,   301,     0,   929,     0,   369,   406,     0,     0,   773,
-       0,     0,   421,   452,   444,   500,     0,     0,   295,     0,
-     516,     0,   538,     0,   520,     0,     0,     0,   543,   547,
-     548,   639,  1214,   397,   396,     0,   404,   405,   883,  1172,
-       0,     0,  1135,  1169,  1170,  1183,  1184,     0,     0,     0,
-       0,  1182,  1178,     0,     0,     0,     0,  1177,  1269,  1266,
-    1270,   210,   208,     0,   684,   685,   678,   298,   491,     0,
-       0,     0,     0,   569,   568,   579,   572,     0,   635,   636,
-    1225,  1226,     0,     0,   777,   772,     0,     0,   288,   739,
-     740,   741,   742,   745,   748,     0,     0,   749,   902,   902,
-       0,     0,   888,   886,   887,   891,   889,   890,   863,  1110,
-    1111,     0,  1118,     0,  1151,     0,     0,     0,  1142,     0,
-    1107,  1153,  1154,  1140,  1206,   328,     0,   176,     0,     0,
-       0,   177,   825,   824,   153,   158,     0,   164,   162,   235,
-       0,     0,   155,   154,   165,     0,     0,     0,  1253,  1033,
-       0,     0,     0,   759,     0,     0,  1084,  1085,  1086,     0,
-    1051,  1069,     0,     0,  1091,  1236,  1237,   198,     0,   183,
-       0,     0,     0,   943,   928,   929,   925,   922,     0,   944,
-     945,     0,     0,   253,   772,     0,   382,   384,   450,  1225,
-    1226,   517,   518,     0,     0,   537,     0,   521,     0,     0,
-       0,     0,     0,   405,   394,   453,  1159,   884,     0,     0,
-    1161,     0,  1165,     0,     0,     0,   634,     0,  1185,  1186,
-       0,  1179,  1180,     0,  1191,  1189,     0,     0,     0,     0,
-       0,   784,   781,   567,   578,     0,   665,   665,  1212,  1227,
-    1209,     0,     0,   287,     0,   281,   744,   747,   743,   746,
-     879,   878,   817,   885,  1117,     0,  1148,     0,     0,  1143,
-       0,     0,  1156,     0,   336,     0,     0,   178,   196,     0,
-     132,     0,   169,     0,     0,   156,     0,   167,   234,     0,
-    1255,  1258,     0,     0,  1042,  1043,  1034,  1031,   761,     0,
-       0,   865,   464,     0,     0,  1071,     0,  1268,   301,     0,
-     972,   973,   947,     0,     0,     0,     0,   953,   952,     0,
-     924,   926,   934,   106,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   441,     0,     0,     0,     0,     0,  1011,
-       0,     0,   769,   916,   920,   914,   915,   917,   913,   918,
-     919,   910,   911,   912,   999,   992,   921,     0,   930,   932,
-       0,   984,     0,     0,     0,     0,   987,   986,   613,   614,
-     927,  1205,   831,   380,     0,   665,   665,   523,   539,     0,
-     522,   510,     0,   519,     0,     0,   549,     0,   506,     0,
-    1160,   883,  1173,  1172,   138,     0,  1136,  1120,     0,  1188,
-       0,  1190,  1246,  1244,  1248,  1264,  1267,     0,   683,   573,
-       0,     0,  1227,  1208,   285,     0,     0,  1119,     0,  1145,
-       0,     0,  1155,     0,     0,   330,     0,   175,   174,   168,
-       0,   143,   133,   136,     0,     0,     0,   161,     0,     0,
-       0,     0,     0,     0,   760,   858,   542,  1052,     0,  1061,
-       0,  1266,   184,  1137,   292,   290,   291,     0,     0,     0,
-     946,     0,   949,   950,     0,   970,     0,     0,     0,  1017,
-       0,     0,     0,   367,     0,  1008,     0,   413,     0,     0,
-       0,     0,  1010,   980,     0,     0,   929,   931,   983,   976,
-     979,   985,   982,   978,   977,   383,     0,     0,     0,   512,
-       0,   545,   544,   550,  1129,  1162,  1164,     0,   139,  1133,
-    1134,     0,  1124,  1171,  1187,     0,     0,     0,     0,  1216,
-    1217,   289,     0,  1144,     0,     0,   329,   337,     0,   320,
-     232,     0,     0,     0,     0,   148,   134,     0,   151,   152,
-     157,     0,  1256,  1045,  1046,  1044,     0,   860,   546,     0,
-     596,  1056,     0,     0,  1059,  1072,   199,   864,     0,     0,
-     948,     0,   951,   968,     0,     0,     0,     0,  1014,  1013,
-    1015,  1018,     0,  1016,   941,   935,   936,     0,     0,  1009,
-       0,   415,     0,   937,     0,     0,   981,   905,   906,   907,
-       0,   933,  1216,  1217,   540,   511,   551,     0,  1163,     0,
-       0,     0,     0,  1131,     0,     0,     0,     0,  1265,     0,
-       0,   892,     0,     0,     0,     0,   332,   140,     0,   137,
-     135,   147,   146,   145,   144,     0,     0,   859,   861,   857,
-     295,     0,     0,  1058,     0,     0,     0,  1063,  1073,  1074,
-     293,     0,   974,   922,   969,     0,   947,  1026,     0,   938,
-    1028,   922,     0,     0,     0,   371,   459,   463,   461,   462,
-     409,     0,   411,     0,     0,   941,   941,   909,     0,     0,
-    1123,  1121,  1125,  1126,  1247,  1245,     0,     0,     0,   903,
-       0,     0,     0,     0,   321,     0,   334,   142,   141,   171,
-       0,  1254,  1054,  1055,  1057,     0,     0,  1066,     0,  1076,
-     294,     0,   960,     0,   955,   954,   971,   963,   964,   956,
-     959,   965,   962,   967,   966,   613,   614,     0,  1027,     0,
-    1019,     0,   942,   372,     0,     0,   410,   414,     0,     0,
-     995,  1012,   908,  1130,     0,     0,     0,     0,     0,   894,
-     893,  1146,  1147,     0,   333,     0,   319,     0,  1062,     0,
-       0,  1065,  1075,     0,     0,  1083,   961,   975,     0,  1023,
-     940,   373,   460,   412,   417,   941,   994,     0,  1128,  1127,
-    1249,     0,   331,   335,   172,     0,     0,  1081,  1080,  1079,
-    1077,  1078,     0,  1020,  1021,  1024,     0,  1022,   413,   419,
-     996,  1122,  1250,  1060,  1067,   941,   941,     0,   418,  1030,
-    1029,  1025
+      27,    28,    30,    31,    32,   354,   355,   356,   357,   358,
+     359,   360,   361,   362,   363,   337,   353,   350,   342,   343,
+     341,   351,   339,   340,   475,   338,   464,   477,   466,   484,
+     486,     0,   999,   352,   850,   851,   852,   344,   348,   854,
+     855,   856,     7,   349,     0,    33,    34,   853,   345,   347,
+      35,    11,    12,    13,    14,    36,    21,    40,   750,     0,
+       0,     0,   870,     0,   869,     0,   366,     0,  1158,     0,
+       0,   325,     0,  1157,   190,     0,   189,   193,   870,     0,
+     186,     0,     0,   187,   188,     0,   185,     0,     0,     0,
+       0,     0,     0,     0,     0,   194,   197,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   254,   260,   259,
+     265,   236,   236,   236,     0,     0,    98,   836,     0,   255,
+     256,     0,   263,   266,     0,   372,   373,   374,     0,   414,
+     440,   441,   437,   449,   444,     0,     0,     0,   108,     0,
+       0,   405,     0,     0,   659,   651,   476,   998,   838,   841,
+     838,   842,   844,   837,     0,     0,     0,     0,   837,     0,
+       0,   254,     0,     0,    98,     0,     0,   848,   849,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   364,
+     488,     0,     0,     0,     0,     0,     0,     1,     2,   196,
+       0,     0,     0,     0,    17,    18,     0,   492,   492,   465,
+       0,   665,     0,     0,   693,   649,     0,   727,   728,   729,
+     730,   733,   731,     0,   834,   835,   732,   116,   774,   734,
+     705,     0,     0,     0,     0,     0,     0,     0,     0,   769,
+     601,   585,     0,     0,   606,   607,   612,   647,   604,   599,
+     608,   609,   610,   611,   703,   600,   704,     0,   720,   346,
+       0,   614,   615,  1222,   605,   754,   278,     0,  1102,  1113,
+       0,     0,     0,   326,     0,   269,   191,     0,   762,     0,
+     268,   229,  1261,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   195,     0,     0,     0,   462,     0,   270,
+    1098,   218,     0,   274,   201,   203,   272,   204,  1047,  1048,
+    1050,     0,     0,     0,   312,  1242,  1243,  1049,   253,     0,
+     262,   258,   261,     0,     0,     0,     0,     0,     0,     0,
+     769,     0,   375,     0,     0,     0,     0,     0,     0,     0,
+       0,   504,   699,   597,     0,   700,   598,   501,   596,   594,
+       0,   595,   613,     0,   615,     0,     0,     0,     0,  1005,
+    1006,   315,     0,     0,   405,   766,   452,     0,   843,   839,
+    1094,     0,     0,     0,     0,   847,     0,   665,   253,     0,
+       0,     0,     0,     0,     0,   649,   649,   649,     0,   649,
+     649,     0,   649,   680,   649,     0,     0,     0,     0,   294,
+       0,  1228,     0,  1095,   652,   492,     0,     0,   492,     0,
+     492,   769,   697,   662,   666,   670,     0,   667,  1227,     0,
+       0,   751,   697,     0,   650,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   710,     0,     0,     0,     0,     0,
+       0,     0,     0,   597,   596,     0,     0,   646,     0,   648,
+       0,   721,   665,     0,     0,   281,     0,   871,     0,     0,
+    1109,     0,     0,     0,     0,     0,     0,     0,   179,   234,
+    1262,     0,  1035,  1036,     0,     0,   871,     0,   224,     0,
+       0,     0,     0,     0,     0,   832,     0,   871,     0,     0,
+     403,   463,     0,   271,     0,   219,   220,  1108,     0,   200,
+     202,   273,   225,  1092,     0,     0,   314,     0,   830,     0,
+     181,     0,     0,     0,     0,   257,   244,   264,     0,   692,
+       0,   403,     0,     0,     0,     0,     0,   429,   424,   425,
+     428,   426,   427,     0,     0,   435,   438,   442,     0,   592,
+     593,     0,   499,   502,     0,     0,   597,   596,     0,   494,
+     495,   505,   462,   645,     0,     0,     0,     0,     0,     0,
+     642,     0,     0,   648,     0,   665,     0,   267,     0,  1004,
+       0,   317,   405,     0,   768,   462,   453,     0,     0,  1227,
+       0,   846,     0,  1156,  1156,  1230,     0,   205,   205,     0,
+     205,   179,     0,     0,     0,     0,     0,     0,     0,   250,
+       0,     0,     0,     0,     0,     0,     0,     0,   697,     0,
+       0,     0,     0,   689,   691,     0,   487,     0,  1097,   655,
+       0,     0,     0,     0,   482,   490,   491,   471,     0,   480,
+     469,   492,     0,     0,     0,     0,   671,     0,   665,   753,
+       0,     0,     0,     0,     0,     0,     0,   737,   738,   806,
+     787,   812,   782,     0,   788,   785,   779,   790,   786,   813,
+     794,     0,     0,   809,   810,   797,   800,   798,   799,   736,
+     801,   803,   811,   735,   665,     0,   717,     0,     0,     0,
+       0,   556,   564,   557,   558,   559,   560,   561,   562,   563,
+     565,     0,     0,     0,   712,   709,   711,     0,     0,     0,
+     665,     0,     0,     0,   586,   602,     0,     0,     0,   775,
+       0,   770,  1223,  1213,     0,     0,  1224,   722,     0,     0,
+     755,     0,     0,     0,   882,   880,   881,   873,     0,   875,
+       0,     0,   902,     0,  1103,  1114,     0,     0,  1106,  1203,
+     192,   321,     0,     0,     0,   763,   473,   119,   474,     0,
+       0,     0,   127,   129,   130,     0,     0,     0,   230,     0,
+       0,  1259,  1263,  1037,  1040,  1038,   234,     0,     0,     0,
+       0,     0,  1089,     0,   303,   306,  1235,  1235,     0,   902,
+     871,     0,   541,     0,   368,   277,     0,  1099,   321,   304,
+     313,   238,     0,   237,     0,     0,     0,     0,     0,     0,
+     243,     0,   770,   376,   236,   433,     0,     0,   420,     0,
+     430,   431,   432,   434,   436,     0,     0,   445,     0,     0,
+     500,     0,   707,   706,     0,   696,     0,     0,     0,     0,
+     507,   508,   518,   534,   405,   515,     0,   542,   644,     0,
+     641,   643,  1093,   589,   588,   590,   591,  1224,   701,   702,
+       0,   988,     0,   275,     0,     0,  1003,  1007,   316,   767,
+       0,     0,     0,   403,     0,  1227,     0,   840,     0,  1095,
+       0,     0,     0,   218,  1156,     0,  1168,  1233,     0,   206,
+       0,     0,   214,     0,     0,   222,   223,   276,   665,   997,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   305,     0,     0,   205,   205,
+     205,     0,  1096,   653,   483,   472,     0,     0,   481,   470,
+       0,   478,   467,   660,     0,   664,   663,   698,   668,   669,
+       0,   752,   694,   698,     0,     0,     0,   726,     0,     0,
+       0,   791,     0,     0,     0,     0,     0,   792,   793,   805,
+       0,     0,     0,     0,     0,   554,     0,   584,     0,     0,
+     565,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     715,     0,   708,   713,   718,     0,     0,     0,   587,     0,
+       0,     0,     0,  1097,     0,   990,     0,   665,  1215,   757,
+       0,     0,   282,     0,   874,     0,     0,   819,   872,   820,
+     898,   900,   896,   901,   895,   899,   897,     0,     0,   281,
+    1105,     0,  1202,  1192,  1193,  1194,  1195,  1196,  1197,  1198,
+    1199,  1200,  1201,  1112,     0,  1115,     0,     0,     0,   323,
+       0,     0,   765,     0,     0,     0,   126,   180,   173,   122,
+     179,     0,     0,   196,     0,     0,   822,   823,     0,   821,
+     149,   826,     0,     0,     0,     0,  1039,     0,     0,   866,
+     868,     0,     0,     0,     0,   311,   307,   308,     0,  1238,
+    1238,     0,     0,   902,     0,     0,  1101,     0,   324,     0,
+     182,   251,   251,   241,   251,     0,     0,     0,     0,     0,
+       0,   418,     0,   443,   442,     0,   442,     0,     0,   497,
+     695,     0,     0,   524,   534,     0,     0,   534,     0,   530,
+     530,   530,   528,   529,   524,   533,     0,   513,     0,   546,
+       0,   640,   665,   989,  1215,  1001,  1000,  1002,     0,     0,
+     383,   389,     0,     0,   396,     0,     0,   387,   388,   390,
+     386,   385,     0,   401,     0,     0,   454,   456,   455,  1227,
+    1097,     0,     0,   218,     0,  1234,  1167,     0,  1231,     0,
+    1174,  1268,   212,   209,   207,   211,   213,   180,     0,   248,
+     247,   249,   246,     0,   682,   681,   677,     0,   675,   676,
+       0,     0,   674,   679,   673,   295,   296,   300,   300,   656,
+       0,     0,     0,   479,   468,     0,  1207,     0,   725,   724,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   723,     0,   555,   552,   553,   716,     0,     0,     0,
+     582,   581,   583,     0,   566,     0,     0,   577,     0,   575,
+     571,     0,   634,     0,  1229,   603,     0,     0,     0,   776,
+       0,   771,  1210,   991,     0,   756,     0,   283,   876,   902,
+     816,   818,     0,   885,     0,  1104,     0,     0,     0,  1137,
+    1204,     0,     0,     0,   513,   764,   120,   121,   123,     0,
+     125,   128,     0,     0,     0,     0,     0,     0,     0,   828,
+     829,   827,   131,   235,     0,   232,   226,  1251,  1252,     0,
+    1260,  1032,   758,     0,   867,   871,     0,  1087,     0,   439,
+       0,  1068,  1063,     0,   310,     0,     0,  1240,  1241,     0,
+       0,   923,   862,     0,   833,   403,     0,  1100,     0,     0,
+     242,   240,   239,   245,     0,   771,     0,   377,   379,   422,
+     423,   421,     0,   447,   442,   446,     0,     0,     0,     0,
+     535,     0,     0,   536,   509,   531,   525,   526,   527,   532,
+       0,   514,     0,     0,     0,   294,     0,   638,   637,     0,
+     400,   398,   384,    74,     0,   393,   399,   397,   391,     0,
+     406,     0,     0,  1096,     0,  1232,     0,  1132,     0,  1181,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    1166,  1175,  1176,     0,  1266,     0,     0,   221,   686,     0,
+       0,     0,     0,     0,   301,   302,   298,   299,   654,   493,
+     294,   661,   672,   807,   815,   783,     0,   789,   780,     0,
+     814,   795,   796,   808,   802,   804,   633,     0,     0,   576,
+     571,   580,     0,     0,   574,     0,     0,   570,   714,     0,
+       0,   719,     0,     0,   778,   773,     0,     0,  1214,   279,
+       0,   285,     0,     0,   877,     0,     0,     0,     0,   904,
+       0,     0,     0,     0,  1116,  1141,     0,  1149,     0,     0,
+       0,     0,  1150,  1152,  1138,  1139,     0,   322,     0,     0,
+     124,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   159,     0,     0,   170,     0,   160,     0,     0,
+       0,   166,   163,   150,   228,     0,   227,  1257,     0,     0,
+    1041,     0,     0,   902,     0,  1090,  1088,     0,     0,  1070,
+       0,  1064,  1082,   309,     0,  1239,     0,   300,     0,   929,
+       0,   367,   404,     0,     0,   773,     0,     0,   419,   450,
+     442,   498,     0,     0,   294,     0,   516,     0,   538,     0,
+     520,     0,     0,     0,   543,   547,   548,   639,  1214,   395,
+     394,     0,   402,   403,   883,  1172,     0,     0,  1135,  1169,
+    1170,  1183,  1184,     0,     0,     0,     0,  1182,  1178,     0,
+       0,     0,     0,  1177,  1269,  1266,  1270,   210,   208,     0,
+     684,   685,   678,   297,   489,     0,     0,     0,     0,   569,
+     568,   579,   572,     0,   635,   636,  1225,  1226,     0,     0,
+     777,   772,     0,     0,   287,   739,   740,   741,   742,   745,
+     748,     0,     0,   749,   902,   902,     0,     0,   888,   886,
+     887,   891,   889,   890,   863,  1110,  1111,     0,  1118,     0,
+    1151,     0,     0,     0,  1142,     0,  1107,  1153,  1154,  1140,
+    1206,   327,     0,   176,     0,     0,     0,   177,   825,   824,
+     153,   158,     0,   164,   162,   234,     0,     0,   155,   154,
+     165,     0,     0,     0,  1253,  1033,     0,     0,     0,   759,
+       0,     0,  1084,  1085,  1086,     0,  1051,  1069,     0,     0,
+    1091,  1236,  1237,   198,     0,   183,     0,     0,     0,   943,
+     928,   929,   925,   922,     0,   944,   945,     0,     0,   252,
+     772,     0,   380,   382,   448,  1225,  1226,   517,   518,     0,
+       0,   537,     0,   521,     0,     0,     0,     0,     0,   403,
+     392,   451,  1159,   884,     0,     0,  1161,     0,  1165,     0,
+       0,     0,   634,     0,  1185,  1186,     0,  1179,  1180,     0,
+    1191,  1189,     0,     0,     0,     0,     0,   784,   781,   567,
+     578,     0,   665,   665,  1212,  1227,  1209,     0,     0,   286,
+       0,   280,   744,   747,   743,   746,   879,   878,   817,   885,
+    1117,     0,  1148,     0,     0,  1143,     0,     0,  1156,     0,
+     335,     0,     0,   178,   196,     0,   132,     0,   169,     0,
+       0,   156,     0,   167,   233,     0,  1255,  1258,     0,     0,
+    1042,  1043,  1034,  1031,   761,     0,     0,   865,   496,   462,
+       0,     0,  1071,     0,  1268,   300,     0,   972,   973,   947,
+       0,     0,     0,     0,   953,   952,     0,   924,   926,   934,
+     106,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     439,     0,     0,     0,     0,     0,  1011,     0,     0,   769,
+     916,   920,   914,   915,   917,   913,   918,   919,   910,   911,
+     912,   999,   992,   921,     0,   930,   932,     0,   984,     0,
+       0,     0,     0,   987,   986,   613,   614,   927,  1205,   831,
+     378,     0,   665,   665,   523,   539,     0,   522,   510,     0,
+     519,     0,     0,   549,     0,   506,     0,  1160,   883,  1173,
+    1172,   138,     0,  1136,  1120,     0,  1188,     0,  1190,  1246,
+    1244,  1248,  1264,  1267,     0,   683,   573,     0,     0,  1227,
+    1208,   284,     0,     0,  1119,     0,  1145,     0,     0,  1155,
+       0,     0,   329,     0,   175,   174,   168,     0,   143,   133,
+     136,     0,     0,     0,   161,     0,     0,     0,     0,     0,
+       0,   760,   858,   542,  1052,     0,  1061,     0,  1266,   184,
+    1137,   291,   289,   290,     0,     0,     0,   946,     0,   949,
+     950,     0,   970,     0,     0,     0,  1017,     0,     0,     0,
+     365,     0,  1008,     0,   411,     0,     0,     0,     0,  1010,
+     980,     0,     0,   929,   931,   983,   976,   979,   985,   982,
+     978,   977,   381,     0,     0,     0,   512,     0,   545,   544,
+     550,  1129,  1162,  1164,     0,   139,  1133,  1134,     0,  1124,
+    1171,  1187,     0,     0,     0,     0,  1216,  1217,   288,     0,
+    1144,     0,     0,   328,   336,     0,   319,   231,     0,     0,
+       0,     0,   148,   134,     0,   151,   152,   157,     0,  1256,
+    1045,  1046,  1044,     0,   860,   546,     0,   596,  1056,     0,
+       0,  1059,  1072,   199,   864,     0,     0,   948,     0,   951,
+     968,     0,     0,     0,     0,  1014,  1013,  1015,  1018,     0,
+    1016,   941,   935,   936,     0,     0,  1009,     0,   413,     0,
+     937,     0,     0,   981,   905,   906,   907,     0,   933,  1216,
+    1217,   540,   511,   551,     0,  1163,     0,     0,     0,     0,
+    1131,     0,     0,     0,     0,  1265,     0,     0,   892,     0,
+       0,     0,     0,   331,   140,     0,   137,   135,   147,   146,
+     145,   144,     0,     0,   859,   861,   857,   294,     0,     0,
+    1058,     0,     0,     0,  1063,  1073,  1074,   292,     0,   974,
+     922,   969,     0,   947,  1026,     0,   938,  1028,   922,     0,
+       0,     0,   369,   457,   461,   459,   460,   407,     0,   409,
+       0,     0,   941,   941,   909,     0,     0,  1123,  1121,  1125,
+    1126,  1247,  1245,     0,     0,     0,   903,     0,     0,     0,
+       0,   320,     0,   333,   142,   141,   171,     0,  1254,  1054,
+    1055,  1057,     0,     0,  1066,     0,  1076,   293,     0,   960,
+       0,   955,   954,   971,   963,   964,   956,   959,   965,   962,
+     967,   966,   613,   614,     0,  1027,     0,  1019,     0,   942,
+     370,     0,     0,   408,   412,     0,     0,   995,  1012,   908,
+    1130,     0,     0,     0,     0,     0,   894,   893,  1146,  1147,
+       0,   332,     0,   318,     0,  1062,     0,     0,  1065,  1075,
+       0,     0,  1083,   961,   975,     0,  1023,   940,   371,   458,
+     410,   415,   941,   994,     0,  1128,  1127,  1249,     0,   330,
+     334,   172,     0,     0,  1081,  1080,  1079,  1077,  1078,     0,
+    1020,  1021,  1024,     0,  1022,   411,   417,   996,  1122,  1250,
+    1060,  1067,   941,   941,     0,   416,  1030,  1029,  1025
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,   121,   122,   123,   124,   125,   381,  1179,  1413,   127,
-     894,   895,   896,  2091,  2092,  2093,  2169,  2279,  2195,  1645,
-    1425,  1945,  1646,  1946,  1647,  1942,   897,   898,  1495,  1670,
-     236,   237,   238,   128,   129,   642,   130,  1023,  1308,  1305,
-     131,   132,   734,   640,  1029,   133,   134,   135,  1428,   901,
-     136,   612,  1650,   902,   462,   137,   943,   138,  1464,   269,
-     270,   271,   272,   273,   139,   140,   141,   142,   143,   144,
-     598,   145,   866,  1595,  1758,  1915,  2118,  1843,   759,  1328,
-    1329,  1550,   146,   147,   148,  1210,  1448,   149,   649,   150,
-     713,   151,   152,  2276,  1172,   153,   154,   416,  1934,  2189,
-    2346,  2406,  2085,   155,   156,  2003,  2004,  2005,  2006,  2007,
-     279,   664,  2008,  1471,  1855,  1856,  1286,  1287,   927,   507,
-    2322,  2323,  2241,  2009,  2010,  2449,  2011,  1235,   953,   678,
-     679,   284,   475,   285,   960,   286,  2012,   717,   718,  2013,
-    2315,  2316,   633,   352,   584,   890,   338,   166,   167,   168,
-     769,   770,   550,   169,   170,   171,   685,   686,   483,   692,
-     693,   694,   973,  2042,  1869,  1496,  1246,  1692,  1258,  1490,
-    1259,   975,   976,  1865,   634,  1262,  1499,  1873,   925,   824,
-     825,   826,   827,   828,  1581,   829,   830,   831,  1366,   832,
-     382,   383,   833,   485,   486,   386,  1584,   387,  1331,   556,
-     388,   389,   566,   172,   557,   558,   559,   390,   488,   560,
-     489,   391,   967,   392,   393,   576,   836,   837,   577,   394,
-     395,   396,   397,   398,  1768,   292,   408,  1437,   421,   978,
-     490,   815,  1140,  1394,  1141,  1193,   653,   629,  1459,   400,
-     274,   301,   724,   174,   175,  2207,  2289,   176,   912,   913,
-     177,   914,   875,   600,   871,   872,   873,  1878,  1603,  2270,
-    2271,  1151,  1152,  2249,  2250,  2016,  2017,  2309,  1673,  1845,
-    1846,  1847,  2018,  2310,  2311,  2312,  1848,  1849,  1973,  1979,
-    2366,  1850,  1974,  2303,  2019,   491,   705,   492,  2021,  2426,
-    2022,  1000,  2023,  2024,  2025,  2026,  2231,  2232,  2445,  2446,
-    2379,  2027,   180,  1654,  1957,   618,   910,  1821,  1954,  1955,
-     181,   182,  1964,  2211,  2212,  2109,  2297,  2214,  1666,  1663,
-    2411,  1446,  1664,  2299,  2359,  2415,  1834,  1828,  1441,  1442,
-    1207,   183,   184,   493,   185,   443,   411,   186,  1168,   187,
-     881,   603,  1402,  1608,  1781,  2172,  2263,  2258,  1301,  1712,
-    1886,  1617,  1618,  1619,  1790,  1791,  1015,  1709,  1879,  1880,
-    1019,  1020,  1303,  1882,  1534,  1535,  1536,  1165,  1166,  1170,
-     188,   494,  1385,   495,   403,   190,   496,   405,   547,   406,
-     191,   728,  1212,  1451,   192,   193,   194,   195,  2065,  1432,
-    1433,  1950,  1951,   904,   905,   614,   196,  1898,  1730,  1538,
-     197
+      -1,   121,   122,   123,   124,   125,   379,  1176,  1410,   127,
+     891,   892,   893,  2088,  2089,  2090,  2166,  2276,  2192,  1641,
+    1422,  1941,  1642,  1942,  1643,  1938,   894,   895,  1491,  1666,
+     235,   236,   237,   128,   129,   639,   130,  1020,  1305,  1302,
+     131,   132,   731,   637,  1026,   133,   134,   135,  1425,   898,
+     136,   609,  1646,   899,   460,   137,   940,   138,  1460,   268,
+     269,   270,   271,   272,   139,   140,   141,   142,   143,   144,
+     595,   145,   863,  1591,  1754,  1911,  2115,  1839,   756,  1325,
+    1326,  1546,   146,   147,   148,  1207,  1444,   149,   646,   150,
+     711,   151,   152,  2273,  1169,   153,   154,   414,  1930,  2186,
+    2343,  2403,  2082,   155,   156,  2000,  2001,  2002,  2003,  2004,
+     278,   661,  2005,  1467,  1851,  1852,  1283,  1284,   924,   505,
+    2319,  2320,  2238,  2006,  2007,  2446,  2008,  1232,   950,   675,
+     676,   283,   473,   284,   957,   285,  2009,   715,   716,  2010,
+    2312,  2313,   630,   350,   581,   887,   336,   166,   167,   168,
+     766,   767,   547,   169,   170,  1441,   682,   683,   481,   689,
+     690,   691,  1959,   970,  2039,  1865,  1492,  1243,  1688,  1255,
+    1486,  1256,   972,   973,  1861,   631,  1259,  1495,  1869,   922,
+     821,   822,   823,   824,   825,  1577,   826,   827,   828,  1363,
+     829,   380,   381,   830,   483,   484,   384,  1580,   385,  1328,
+     553,   386,   387,   563,   171,   554,   555,   556,   388,   486,
+     557,   487,   389,   964,   390,   391,   573,   833,   834,   574,
+     392,   393,   394,   395,   396,  1764,   291,   406,  1433,   419,
+     975,   488,   812,  1137,  1391,  1138,  1190,   650,   626,  1455,
+     398,   273,   299,   721,   173,   174,  2204,  2286,   175,   909,
+     910,   176,   911,   872,   597,   868,   869,   870,  1874,  1599,
+    2267,  2268,  1148,  1149,  2246,  2247,  2013,  2014,  2306,  1669,
+    1841,  1842,  1843,  2015,  2307,  2308,  2309,  1844,  1845,  1970,
+    1976,  2363,  1846,  1971,  2300,  2016,   489,   703,   490,  2018,
+    2423,  2019,   997,  2020,  2021,  2022,  2023,  2228,  2229,  2442,
+    2443,  2376,  2024,   179,  1650,  1953,   615,   907,  1817,  1950,
+    1951,   180,   181,  1961,  2208,  2209,  2106,  2294,  2211,  1662,
+    1659,  2408,  1442,  1660,  2296,  2356,  2412,  1830,  1824,  1437,
+    1438,  1204,   182,   183,   491,   184,   441,   409,   185,  1165,
+     186,   878,   600,  1399,  1604,  1777,  2169,  2260,  2255,  1298,
+    1708,  1882,  1613,  1614,  1615,  1786,  1787,  1012,  1705,  1875,
+    1876,  1016,  1017,  1300,  1878,  1530,  1531,  1532,  1162,  1163,
+    1167,   187,   492,  1382,   493,   401,   189,   494,   403,   544,
+     404,   190,   725,  1209,  1447,   191,   192,   193,   194,  2062,
+    1428,  1429,  1946,  1947,   901,   902,   611,   195,  1894,  1726,
+    1534,   196
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -2133
+#define YYPACT_NINF -2149
 static const yytype_int16 yypact[] =
 {
-   11087, -2133, 21529,  -101, -2133, -2133,   125, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,   634,
-   -2133,   164,  2511,    48,   732, 17220,   109,   943,   365,   556,
-   18080, 19404, 14882,   672,   679,   721,   521,   351,   546,   569,
-   15395, 17405,   401, -2133, 17590, 17968, -2133, -2133, 21529,   842,
-   -2133,   554,   509, -2133,   524,   531, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-     273,   904,   552, -2133,  1355, -2133,    36, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133,   204, -2133, -2133, -2133,
-   -2133, -2133,   619, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133,   812, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,   622,
-     -94,   934, 14192, -2133, 21529, -2133, 21529, -2133, 21529, -2133,
-     977,   860,   -97, 21529, -2133, -2133,   877, -2133, -2133,   858,
-   21529, -2133, 21529, 21529, -2133, -2133,  1061, -2133, 21529, 21529,
-   21529,   438,   758, 19487, 21529, 21529, -2133,  1164,   924, 21529,
-    1076, 21529, 19570, 21529,   850, 21529, 21529, 21529, 21529, 21529,
-   21529, 21529, 21529,   547, 19885, 21529, 21529, 21529,   931, -2133,
-   -2133, -2133,   762,   762,   762,   954,   964,   983, -2133,   989,
-     806, -2133,   -53, -2133, -2133, 19968, -2133, -2133, -2133, 21529,
-   -2133, -2133, -2133, -2133, -2133,   882, 11432,  1032, 21529,   856,
-      29, 21529, 18395,  1019,   556,   915, -2133,   839, -2133, -2133,
-   -2133, -2133,  1220, -2133, -2133,   672, 21529,  1303, 21529,  1156,
-     672, 12812,   955,  1155,  1185,  1197,  1207,  1218,   -39, -2133,
-   -2133,  1005,  1018,  1030,  1033,  1043,  1052,  1064,  1083,  1088,
-     -78, -2133,   220,  1193,  1404, 12812, 12812,   280,  1098, -2133,
-   -2133,  1615,  1273,   356,   373,   428, -2133, -2133,  3876,    14,
-      17, -2133,  1376, 12812, 20061,  4782, -2133, 12812,  1111, -2133,
-   -2133, -2133, -2133, -2133, -2133,  1119, -2133, -2133, -2133,  1324,
-   -2133, -2133, -2133, 17968,  1133, 10052,  1135,  1140,  1144, 21529,
-    7982,    35,  1121, -2133,  1126,  1143,  1158,  1160,  1166, -2133,
-    1192,  1194,  1236,  1245,  1256,  1269, -2133,  1274, -2133,  1126,
-     497,   484,  1177,  1276, -2133,  1278,  1279,  1286,  1330,  1182,
-    1287,  1347, 21529,  1407,  1428, -2133,  1502, -2133, -2133, 21529,
-    1291,    26, -2133, -2133,  1534,  1025,  1182,  1423,  1670, 21529,
-   21529,  1579,  1527,  1582,  1538, -2133, 21529,  1182, 20061,  1489,
-   21529,  1566,  1322,   577,  1520, -2133, 21529, -2133,  1574, -2133,
-   -2133, -2133, -2133,  1698, 21529,  1607,  1504, -2133, -2133, -2133,
-    1514, 21529, -2133, -2133, -2133, 21529, 17968,  1720, 21529,  1138,
-   20376, 20376,  1364,  1357,  1581,  1688,    67, 12812, 12812,  1368,
-   21529,  1735,  7982,  1591, 17036,  1126,  1372, -2133, -2133,  1374,
-      -8, -2133,  1638, -2133,  1377,  1381,  1642, 21529, 21529,  1418,
-   12812, -2133, -2133,  1655, 21529,  1584,  1567, -2133, 21529, 11432,
-    4258, -2133,  1393,  1400,   341,  1600,   707, 21529, -2133,   711,
-   12812, -2133, 21529, 17968,  1770, 21529, 20376,  1759, 12812, 12812,
-   12812, 12812, 12812, 12812,  1774, 12812, -2133, 12812,  1682,  1632,
-     852,   897,  1690, 21529, -2133, 20061,   406, -2133,  1493,  1667,
-     299,  1493,   299,    19,    33, 17036, -2133,  1422,  1424,  1427,
-    1429, -2133,  1430, 21529,  1426,  1911,  1434,  1431, 12812, 10397,
-    1441,  1438,  1738, 12812, 10742,  1141,   936, -2133, 12812, 12812,
-   12812,  1440,   280,  8327,  1444,   551,   -14,    -4,  2822, 12812,
-    1447, 20061,  1447,  1008, -2133, 12812,  4865,  1645,  1719,     5,
-    1572,  4948, 21529,   -18,  1182,  1740, 21529,  1659,  1727,  5296,
-     299, 18478,  1464, -2133,  1680, -2133, -2133,  1663,   862,  1572,
-     504, -2133,  1737,  1741, 21529, 21529, 12812, 12812, -2133,  1664,
-    1572,  1182,  8672,  1665, -2133, 21529, -2133,  5379, -2133, -2133,
-   -2133, 21529, -2133, -2133, -2133, -2133, -2133, 21529,  1706, -2133,
-   20376,  1472,   660, -2133,  1652,  1657,  1658,  1669, -2133,   -23,
-   -2133,  4341, -2133,  1853,  1665,  1854,  1497,  1512,    88,    88,
-   -2133, -2133, -2133, -2133, -2133, -2133,  1874,  1875, -2133,  1688,
-     -21, 12812, -2133, -2133, 12812, -2133,  1368,   832,  1636,    13,
-       7, 15823, -2133, -2133,  1683, -2133, 18598, 12812, 12812, 12812,
-   12812, 12812, -2133, 20061, 12812,    -7, 12812, 12812, 21529, -2133,
-     844,  1911,  1573, -2133,  1567,  1522, -2133,   -40, -2133,  1795,
-    1591, 20061,  1528,  1899, -2133,  5462,   846,  1065, -2133, 21529,
-    1362,  1420, 21529,  1594,   426, 21529,  1536,  1540,  1756,  1758,
-    1761,  1764,  1546,  1547,  1558,  1559,  1560,   515,  1561,  1563,
-    1785,  1705,  1576,  1578, 21529, 12812, -2133, -2133,  1813, -2133,
-     764,   588, -2133, 20061,   299,  1580,   313, -2133, -2133, -2133,
-   -2133,   299, -2133, -2133,  1493,   299, 12812, 21529, 12812, -2133,
-   12812, 12812, -2133, 21529,  1702, 12812,   611, 12812, 12812,   941,
-   -2133, -2133,  1587, -2133,  1588,  1597,  1784,  1598, -2133,  1602,
-   -2133, -2133,  1605,  1608,  1609,    59,  1617, -2133, -2133, -2133,
-   -2133, -2133, -2133,  1619,  1620, -2133, -2133, 12812,  1621,  1911,
-   10742,  1624,  6947,   177, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133,  1673, 12812, 12812,   939, -2133, -2133, -2133,
-     776,  1811,   654, 12812,  1606,   280,  1444, -2133,  1618, 12812,
-   21529, 21529, -2133, 20061,    93, -2133, -2133,    42, 12812,  1625,
-   -2133,  1630, 21529,  1641,  1633, 21529,  1860, -2133, -2133, -2133,
-   -2133,   848, -2133, 19968, 16254,  1639, 21529,  1671, -2133,  1840,
-    1951, -2133,  1771, -2133,  1677, 21529, 21529, 21529,  1675, -2133,
-     -31, -2133, 21529, 21529,   888, -2133, -2133, -2133,  1302, 16569,
-   21529, -2133,  1912,  1681, -2133,  1689, -2133, -2133, -2133,  1464,
-    1869,  1909,  1693,   387, 21529,  1692,  2057, -2133,  2058,  1176,
-    1176, 21529,  1639,  1572,  1910,  1167,  1709, -2133, -2133, 21529,
-    1699,  1677, -2133, -2133, -2133, 21529, -2133, 21529, 20376, 20376,
-   20376, 20376,  2014, -2133, 21529,  1712, -2133,   762, -2133, 12812,
-   12812, -2133,  2077, -2133, -2133, -2133, -2133, -2133,  1787,   473,
-   -2133,   642,   176, -2133,  1324, -2133, -2133,  1834, -2133, 21529,
-   21529, 15823, 14967,  1718,  1696, -2133, -2133, 15740, -2133, 10742,
-    1936, -2133,  2067,  1738, -2133,  1124,  1179,  1179, -2133, -2133,
-    1724, 17036, -2133, 12812,  1911,  1725, -2133,   979,  1762, -2133,
-   -2133, -2133, -2133,  1309,  9017, 21529,  1665, 12812,  1722, 20061,
-   -2133, 21529,  1726,  2069, 21529,  2072,   577,   879, 21529,  2064,
-   -2133,  1793, -2133, 21529, 21529, -2133, 21529, 21529, -2133, -2133,
-   -2133, 12812, -2133, 20376, 20376, 20376, 20376, 12812,  1850,  1852,
-    1855,  2099,  1856,  1857, 12812, 12812,  1861,  1862, -2133,   961,
-   11777,  2013,  2013,  2013, 20061,   604, -2133, -2133, -2133, 21529,
-     280, -2133, -2133,   299, -2133, -2133,  1911,  1791, 17036, -2133,
-   17036,  1422,  1424,  1736, -2133, -2133,  1911, 12812,   984,  1003,
-   -2133,  2107,  2109,  2110, -2133,  2111,  2112,  2113,  2114,  2115,
-   -2133, -2133, -2133,  2116,  2117,  2118,  1763, 12812, -2133,   340,
-   -2133,  7292,    21,   722, 10742, 10742, 12812,   627,  9362, 12812,
-    1767,   600, 12812,  1911,  1333, -2133, -2133, -2133,  1738, 12812,
-    1772, -2133,  1606,   957,  1773,  1776,   669,  3345, -2133,   214,
-   12812,    64, -2133, 21529, 21529, -2133,  1432, -2133,   488, 16254,
-   -2133,  1935, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-    1775,  2136,  1719, -2133, 21529, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133,  1836,  2143,  2047, 21529,
-    2054, 21529, -2133,  1783,  1786, -2133, 21529,  2108,  2119, -2133,
-   -2133, -2133,   409, 18478,  1788,  1988,  1164,  1990,  1789,  1790,
-    1794, 17765, -2133, -2133, -2133,   967,   432,  2157,  1680, -2133,
-   21529, 21529, -2133, -2133,  1797,  1182,  2158,   508, -2133, -2133,
-    1965,  1841,  1966,  1966,  1801,    11,  1639, 21529,  1309, -2133,
-   21529, -2133,  1799, -2133,   -15,   -15,  1546,   -15,  1997,  1802,
-   20459,   677,  1009,  1039, -2133,   970, -2133,  1971,  2167,  1971,
-   12812, 10742, -2133, -2133,  1806,  1807,  1792,  1926, 14967,  1809,
-    1810, 15823,  1895,  1895,  1895, -2133, -2133,  1326, -2133,  1891,
-   21529,  2059,  2028,  1201, -2133, 12812,  1911, -2133, -2133, -2133,
-   -2133,  2177,  1976, -2133, -2133,  2091, 20557, -2133, 12812,  2185,
-   -2133, -2133,  2046, -2133, -2133,  2085, -2133,   973,  2021, -2133,
-   -2133,  1911,  1822, -2133, 21529, 20061,   577, 20061, -2133, -2133,
-   16254, -2133,  2093,   644,  1989,  1826, -2133, -2133,  1827, -2133,
-      91,  1830,  1546,  1546,  1546,  1546,   695, -2133, -2133, -2133,
-    1831, -2133, -2133,  1057,  1062, -2133, -2133, -2133,  1832, -2133,
-    1851,   591, -2133, 20061,   975,  1835, -2133, -2133, 12812, -2133,
-    1085, -2133, -2133,  1837,  1838,   982,  1839,   985,  1842,  1843,
-    1844,  1846,  1847,  1848, -2133,  1091, -2133,  2096, -2133,  1911,
-   12812,  1858, 12812, -2133, -2133, -2133,  1624,  1911,  1906,  7982,
-   -2133,  2034, -2133,  1254, 12812,  1894,  1102, -2133,  1849,  1859,
-    1865, 18913, -2133, 21529,    97, -2133, -2133,  1868, -2133,   991,
-    2022, -2133,  1654,  1866, -2133,  1993,  1267,  2070, -2133,  2162,
-    2056,  1863,    96, -2133, 21529,  1870, 21529, 21529, -2133, -2133,
-   -2133, -2133,  2132, -2133, -2133, 10742,  1872,  1873,  1877, 21529,
-    2217,  2218, -2133, -2133, -2133,   963, -2133,   280,  2027, -2133,
-   -2133, -2133, -2133,  1006, -2133,  2145,  1876,  1879, -2133,  1572,
-    2122, -2133,    56,   556, 21529, -2133,  2240,  2242, -2133,  2146,
-    1924, -2133, -2133, 21529,  1814, -2133, -2133,  2156, -2133,  1665,
-    1012, -2133, 21529,  2102, -2133, -2133, -2133, -2133, 20872,  1884,
-    1888, -2133, -2133, -2133, -2133, -2133,  2251, -2133,  1971, -2133,
-    1120,   102,  1890,  1892, -2133,  1893, 20965, -2133,  1696, -2133,
-   -2133, -2133, -2133, -2133, 15909,  1889,  1897,  9707, 10742,    47,
-    2245, -2133, -2133,  1902, -2133, -2133, -2133,  2103,  2120, -2133,
-    1911, -2133, -2133,  2060, -2133,  1309, 21529, -2133,  1896, -2133,
-    1896,    -6,  1353, -2133,  2234,  2236,  2237,  2238,  2105,  2243,
-    2239,  1840,  2121,   899, -2133,   644, -2133,  2280,  1916, 21529,
-   21529, -2133, -2133, 12812,  2035,  2036,  2037, 11777, -2133, -2133,
-   -2133, -2133, -2133, -2133,  1690,  1911, -2133, -2133, -2133, -2133,
-    2282, -2133, -2133,  2284, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133,  1943,  7982, -2133,  1254, -2133, 12812,  1023, -2133,   832,
-    2149, -2133,  1911, 21529,  1925, -2133, 20061, 20061, -2133,   739,
-    1922,  3705,    69, -2133, 12812,  2189,  1289,  1289, -2133,  2289,
-    2193,   514,   517, -2133,  1432,  2293,  1840, 21529, -2133, -2133,
-    2201, -2133,  2303,   332,  2286,  1946, -2133,   950,    96, -2133,
-    2065, -2133,  1947,  1948, -2133,   106, 21529, 21529, 21529,  1035,
-    1949,  1950,  2015,  2151,  1956,  1289, -2133,  2160, 21529, -2133,
-    2141,  1959,   478, 21529,  2205, -2133, -2133, -2133, -2133,  2203,
-   -2133,  2175,  2157,  2325,  2094,  5810, 21529,  1639,  1391, -2133,
-   -2133, 11432, 21529, -2133,   196, -2133,  2155, -2133,  1089, -2133,
-    1060,   591,  2025,   336, 21529, -2133, -2133,  1967,  2163, -2133,
-   21048, 12812, -2133, -2133,  1971, -2133, 20061, 20061, 19006, 21529,
-   -2133, 15312,    62, 21363, -2133,  1968,  1975,  1977,  1832,  1167,
-    2250, -2133, -2133, -2133, -2133,  2195, -2133,  1665,    23,  2258,
-    2098,  2262,  2216,  2319, -2133, -2133, -2133,  2311,  2312,  2188,
-    1396, -2133, -2133,  2186,  2355,  2356,  2304, -2133, -2133,    60,
-   -2133, -2133, -2133,  1130, -2133, -2133, -2133, -2133, -2133,  1995,
-    1996, 12812,  1078, -2133,  1911, -2133, -2133,   832, -2133, -2133,
-    1998,  2000, 20061, 20061, -2133,   772,   579,  2184,  2308, -2133,
-   -2133, -2133, -2133, -2133, -2133,   926,  1007, -2133,  1639,  1639,
-    1999,  2369, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133,  1093, -2133,  2287, -2133,  2007,  2349, 16254, -2133,   159,
-   -2133,  2008, -2133, -2133, -2133,  2178,  2012, -2133,  1095,  1104,
-    1110, -2133, -2133, -2133, -2133, -2133, 10742, -2133, -2133,  1464,
-    2016,    24, -2133, -2133, -2133, 21529,  2207,  2017, -2133, -2133,
-     495,  2065, 21529,  2011,  2018,  2065, -2133, -2133, -2133,  1591,
-    2285, -2133, 21529,  2379, -2133, -2133, -2133,  2080, 21529, -2133,
-    2330, 19089,   454, -2133, -2133,   718, -2133,  6602,  2023, -2133,
-   -2133,  2065, 21529, -2133, -2133,  1115, -2133,  1911, -2133,  2024,
-    2026, -2133,  2029, 10742,  2031, -2133, 21529, -2133, 21529, 21529,
-   11777, 11777,   -56,  1665, -2133, -2133, -2133, -2133, 19968,  1147,
-   -2133, 21529, -2133, 16254,   116,  1289,  1894,  2290, -2133, -2133,
-    2343, -2133, -2133,  2226, -2133, -2133,  2392,   582,  2032,  2030,
-    2152, -2133, -2133,  1911, -2133,  2153, 12812, 12812, -2133,  2038,
-   -2133,  4434, 12812, -2133,  2296, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133,  1267, -2133, 21529, -2133, 21529,  2373,  1935,
-    2305,  2306,   869,  2246,  2299, 21529,  2227, -2133,  1164,   113,
-    2241,  2406, -2133,  2211,  2292, -2133,  1151, -2133, -2133,  2409,
-   -2133,  2052,  2322,  2323,  2055, -2133, -2133, -2133, -2133, 21529,
-   21529, -2133,  1683, 21529,  2061, -2133, 21529,  1989,   591,  2422,
-   -2133, -2133,   863,  6255,  2183,  2283,   676, -2133, -2133,   746,
-   -2133, -2133, -2133,  2062,   304, 12812, 12812, 21529,  2279, 21529,
-   21529,  2244, 21529,   556, 21844, 21529, 14882,  2066,  2068, 12812,
-   12122,  2071,    20, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133,  1162,  1126, -2133,  2073, -2133, -2133,
-    2074, -2133,  2075,  2076,  2078,  2079, -2133, -2133,  -177,  -171,
-   -2133, -2133, -2133, -2133, 12812, 12812, 12812, -2133,  1167, 21529,
-   -2133, -2133,  1153, -2133,  1171,  1174, -2133,  2429, -2133, 16254,
-   -2133,   488, -2133,    74,  2261,  2408, -2133,  2128,  2412, -2133,
-    2397, -2133,  2081,  2082,  2083, -2133, -2133,  2445, -2133, -2133,
-    2084,  2086,  2089,  2088,  1911, 12812,  2092, -2133,  1184, -2133,
-    2365,  2424, -2133, 21529,  2300,  2253,  1189, -2133, -2133, -2133,
-     512,   477,  2241, -2133,  2097,  1289,  2459, -2133,    24,  2100,
-    2017, 21529, 21529,   495, -2133,  2101,  1936, -2133, 12812,  2301,
-    2464,  1916, -2133,    96, -2133, -2133, -2133,  2376,  2340, 21529,
-    1935,  2380, -2133, -2133,  2471, -2133, 21529,  2288, 16254, 13157,
-    2222,  1513,  1556, -2133,   269, -2133, 21529,  2123, 11432,  2125,
-   10742, 10742,  1911, -2133,   756,  1059,   336, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133,  2124,  2126,  1191, -2133,
-   21529, -2133, -2133,  2475,   -42, -2133, -2133,  2341, -2133, -2133,
-   -2133,   803,  1491, -2133, -2133,  2473,  2476,   479,   582,    75,
-      78,  1911,  2479, -2133,  2129,  2130, -2133, -2133,  2302,  2196,
-   -2133,   595,   595,  1219,  1229, -2133, -2133,  2480, -2133, -2133,
-   -2133,  2481, -2133, -2133, -2133, -2133, 21529,  2389,  2028,  1656,
-     187, -2133,  1205,  2133,  2313,  2187, -2133, -2133,   299,  2398,
-   -2133,   454, -2133, -2133, 21529, 21446, 21529, 14882, -2133, -2133,
-   -2133, -2133,   793,   484,  1152, -2133, -2133, 12467, 14537, -2133,
-    1321, -2133,  2334, -2133,   115,   120, -2133, -2133, -2133, -2133,
-    1211, -2133, -2133, -2133, -2133, -2133, -2133,  2478, -2133,  2496,
-    2500,  2501,  2502, -2133,  2139,  2140,  2142,  2503, -2133,  2403,
-    1214, -2133,  2320,  2324,  2159,  2271,  2348, -2133,   358, -2133,
-   -2133, -2133, -2133, -2133, -2133,  1223,  2154, -2133, -2133, -2133,
-    1690, 21529, 21529, -2133, 12812, 10742,  2361,  2240, -2133,  2224,
-   -2133,   299, -2133,  5908, -2133,  2374, -2133, 10742, 13502, -2133,
-   -2133,  1173,  7637, 14537,  1568,  2161, -2133,  1217,  1126,  2164,
-   -2133,  2522, -2133,  1235, 14537,  1152,  1152, -2133,  1059,  2528,
-   -2133,  2223,  2456,  2461, -2133, -2133,  2532,  2170,  1289, -2133,
-    2479, 21529, 21529, 21529, -2133,  2537,  2375, -2133, -2133, -2133,
-    2539, -2133, -2133, -2133, -2133,   122,  2179,  2298,  2542,   272,
-   -2133, 16905, 12812,   454, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133,   448,   573, 12812,  1167,  2190,
-   -2133,  2191, -2133,  2161, 14537, 14537, -2133, -2133,  1321,   -32,
-    2307, -2133, -2133, -2133,  2526,  2547,  2549,  2192,  2552, -2133,
-   -2133, -2133, -2133,  1250, -2133,  2558, -2133,  2194, -2133, 21529,
-   21529, -2133, -2133,    92,    90, -2133,  1911, -2133,  1136, 13847,
-   -2133,  2161, -2133, -2133,  2345,  1152, -2133,  2560, -2133, -2133,
-   -2133,  2199, -2133, -2133, -2133,  1261,   330, -2133, -2133, -2133,
-   -2133, -2133,  2314, -2133, -2133, -2133,  1263,   484,  2123, -2133,
-   -2133, -2133, -2133, -2133, -2133,  1152,  1152, 13847, -2133, -2133,
-   -2133, -2133
+   11002, -2149, 21444,  -178, -2149, -2149,   -46, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,   635,
+   -2149,   252,  1195,    36,   856, 17135,  -140,   576,   262,   666,
+   17995, 19319, 14797,   496,   515,   557,   357,   292,   504,   489,
+   15310, 17320,   -14, -2149, 17505, 17883, -2149, -2149, 21444,   762,
+   -2149,   470,   434, -2149,   448,   458, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+     187,   844,   486, -2149,  1003, -2149,    -8, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149,    22, -2149, -2149, -2149,
+   -2149,   516, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149,   787, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,   590,   215,
+     981, 14107, -2149, 21444, -2149, 21444, -2149, 21444, -2149,   947,
+     833,   250, 21444, -2149, -2149,   843, -2149, -2149,   824, 21444,
+   -2149, 21444, 21444, -2149, -2149,  1015, -2149, 21444, 21444, 21444,
+      33,   710, 19402, 21444, 21444, -2149,  1273,   880, 21444,  1018,
+   21444, 19485, 21444,   812, 21444, 21444, 21444, 21444, 21444, 21444,
+   21444, 21444,   310, 19800, 21444, 21444, 21444,   906, -2149, -2149,
+   -2149,   737,   737,   737,   885,   953,   958, -2149,   971,   783,
+   -2149,   -52, -2149, -2149, 19883, -2149, -2149, -2149, 21444, -2149,
+   -2149, -2149, -2149, -2149,   860, 11347,  1012, 21444,   848,   391,
+   21444, 18310,  1016,   839, -2149,   883, -2149, -2149, -2149, -2149,
+    1227, -2149, -2149,   496, 21444,  1217, 21444,  1098,   496, 12727,
+     889,  1105,  1091,  1132,  1141,  1162,   -53, -2149, -2149,   986,
+    1022,  1024,  1026,  1035,  1042,  1046,  1048,  1064,   285, -2149,
+     370,  1092,  1381, 12727, 12727,   -79,  1007, -2149, -2149,  1851,
+    1238,   869,   390,   395, -2149, -2149,  3790,    55,    57, -2149,
+    1356, 12727, 19976,  4697, -2149, 12727,  1108, -2149, -2149, -2149,
+   -2149, -2149, -2149,  1114, -2149, -2149, -2149,  1288, -2149, -2149,
+   -2149, 17883,  1127,  9967,  1131,  1134,  1138, 21444,  7897,    59,
+    1133, -2149,  1149,  1157,  1174,  1176,  1178, -2149,  1180,  1189,
+    1196,  1200,  1214,  1221, -2149,  1242, -2149,  1149,   558,   299,
+    1165,  1244, -2149,  1254,  1258,  1270,  1359,  1187,  1272,  1375,
+   21444,  1423,  1463, -2149,  1498, -2149, -2149, 21444,  1287,    26,
+   -2149, -2149,  1536,   957,  1187,  1425,  1685, 21444, 21444,  1591,
+    1545,  1595,  1556, -2149, 21444,  1187, 19976,  1510, 21444,  1593,
+    1344,   438,  1552, -2149, 21444, -2149,  1614, -2149, -2149, -2149,
+   -2149,  1736, 21444,  1655,  1571, -2149, -2149, -2149,  1576, 21444,
+   -2149, -2149, -2149, 21444, 17883,  1769, 21444,   928, 20291, 20291,
+    1404,  1408,  1621,  1803,    54, 12727, 12727,  1413, 21444,  1779,
+    7897,  1637, 16951,  1149,  1416, -2149, -2149,  1418,   -23, -2149,
+    1690, -2149,  1429,  1433,  1694, 21444, 21444,  1472, 12727, -2149,
+   -2149,  1705, 21444,  1633,  1616, -2149, 21444,  4173, -2149,  1440,
+    1447,    34,  1652,   580, 21444, -2149,   820, 12727, -2149, 21444,
+   17883,  1823, 21444, 20291,  1809, 12727, 12727, 12727, 12727, 12727,
+   12727,  1827, 12727, -2149, 12727,  1737,  1686,   845,   875,  1740,
+   21444, -2149, 19976,   324, -2149,  1538,  1715,   297,  1538,   297,
+     111,    27, 16951, -2149,  1470,  1471,  1477,  1478, -2149,  1479,
+   21444,  1481,  1814,  1484,  1485, 12727, 10312,  1768,  1486,  1609,
+   12727, 10657,   753,   -56, -2149, 12727, 12727, 12727,  1490,   -79,
+    8242,  1491,   538,    -4,     9,  2737, 12727,  1499, 19976,  1499,
+     734, -2149, 12727,  4780,  1684,  1773,   113,  1626,  4863, 21444,
+     216,  1187,  1794, 21444,  1711,  1785,  5211,   297, 18393,  1523,
+   -2149,  1745, -2149, -2149,  1731,   483,  1626,   243, -2149,  1805,
+    1806, 21444, 21444, 12727, 12727, -2149,  1741,  1626,  1187,  8587,
+    1734, -2149, 21444, -2149,  5294, -2149, -2149, -2149, 21444, -2149,
+   -2149, -2149, -2149, -2149, 21444,  1774, -2149, 20291,  1547,   530,
+   -2149,  1723,  1726,  1735,  1739, -2149,   -73, -2149,  4256, -2149,
+    1930,  1734,  1931,  1567,  1572,    73,    73, -2149, -2149, -2149,
+   -2149, -2149, -2149,  1929,  1934, -2149,  1803,   -69, 12727, -2149,
+   -2149, 12727, -2149,  1413,   834,  1692,    20,    17, 15738, -2149,
+   -2149, -2149,  1744, -2149, 18513, 12727, 12727, 12727, 12727, 12727,
+   -2149, 19976, 12727,    18, 12727, 12727, 21444, -2149,  -128,  1814,
+    1630, -2149,  1616,  1587, -2149,   -41, -2149,  1852, 19976,  1590,
+    1954, -2149,  5377,  1043,   849, -2149, 21444,  1623,  1656, 21444,
+    1895,    52, 21444,  1594,  1597,  1816,  1818,  1820,  1824,  1600,
+    1602,  1605,  1606,  1607,   479,  1608,  1615,  1834,  1610,  1620,
+    1629, 21444, 12727, -2149, -2149,  1862, -2149,   678,   543, -2149,
+   19976,   297,  1622,   257, -2149, -2149, -2149, -2149,   297, -2149,
+   -2149,  1538,   297, 12727, 21444, 12727, -2149, 12727, 12727, -2149,
+   21444,  1751, 12727,   641, 12727, 12727,   990, -2149, -2149,  1635,
+   -2149,  1638,  1639,  1835,  1644, -2149,  1657, -2149, -2149,  1659,
+    1660,  1661,   -29,  1662, -2149, -2149, -2149, -2149, -2149, -2149,
+    1663,  1665, -2149, -2149, 12727,  1650,  1814, 10657,  1666,  6862,
+     527, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+    1840, 12727, 12727,   570, -2149, -2149, -2149,   553,  1703,   685,
+   12727,  1677,   -79,  1491, -2149,  1678, 12727, 21444, 21444, -2149,
+   19976,    82, -2149, -2149,   193, 12727,  1682, -2149,  1687, 21444,
+    1680,  1696, 21444,  1903, -2149, -2149, -2149, -2149,   743, -2149,
+   19883, 16169,  1821, 21444,  1691, -2149,  2021,  1994, -2149,  1801,
+   -2149,  1697, 21444, 21444, 21444,  1695, -2149,   738, -2149, 21444,
+   21444,   857, -2149, -2149, -2149,   916, 16484, 21444, -2149,  1966,
+    1700, -2149,  1702, -2149, -2149, -2149,  1523,  1898,  1935,  1716,
+     532, 21444,  1713,  2082, -2149,  2083,  1452,  1452, 21444,  1821,
+    1626,  1919,  1156,  1725, -2149, -2149, 21444,  1720,  1697, -2149,
+   -2149, -2149, 21444, -2149, 21444, 20291, 20291, 20291, 20291,  2026,
+   -2149, 21444,  1724, -2149,   737, -2149, 12727, 12727, -2149,  2089,
+   -2149, -2149, -2149, -2149, -2149,  1797,   156, -2149,   632,   143,
+   -2149,  1288, -2149, -2149,  1847, -2149, 21444, 21444, 15738, 14882,
+    1729,  1135, -2149, -2149, 15655, -2149, 10657,  1947, -2149,  2078,
+    1609, -2149,   879,  1164,  1164, -2149, -2149,  1742, 16951, -2149,
+   12727,  1814,  1733, -2149,   943,  1770, -2149, -2149, -2149, -2149,
+    1453,  8932, 21444,  1734, 12727,  1738, 19976, -2149, 21444,  1746,
+    2079, 21444,  2085,   438,   929, 21444,  2073, -2149,  1808, -2149,
+   21444, 21444, -2149, 21444, 21444, -2149, -2149, -2149, 12727, -2149,
+   20291, 20291, 20291, 20291, 12727,  1861,  1865,  1867,  2110,  1868,
+    1869, 12727, 12727,  1870,  1871, -2149,  1008, 11692,  2032,  2032,
+    2032, 19976,   610, -2149, -2149, -2149, 21444,   -79, -2149, -2149,
+     297, -2149, -2149,  1814,  1810, 16951, -2149, 16951,  1470,  1471,
+    1760, -2149, -2149,  1814, 12727,  1051,  1089, -2149,  2125,  2127,
+    2129, -2149,  2130,  2131,  2132,  2133,  2148, -2149, -2149, -2149,
+    2150,  2151,  2152,  1791, 12727, -2149,   270, -2149,  7207,    32,
+     651, 10657, 10657, 12727,   669,  9277, 12727,  1793,   521, 12727,
+    1814,  1334, -2149, -2149, -2149,  1609, 12727,  1795, -2149,  1677,
+     915,  1798,  1799,   700,  3258, -2149,   432, 12727,    64, -2149,
+   21444, 21444, -2149,  1568, -2149,    91, 16169, -2149,  1958, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149,  1802,  2159,  1773,
+   -2149, 21444, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149,  1856,  2165,  2070, 21444,  2077, 21444, -2149,
+    1807,  1811, -2149, 21444,  2134,  2136, -2149, -2149, -2149,   596,
+   18393,  1813,  2009,  1273,  2011,  1815,  1819,  1825, 17680, -2149,
+   -2149, -2149,   918,   436,  2174,  1745, -2149, 21444, 21444, -2149,
+   -2149,  1817,  1187,  2179,   447, -2149, -2149,  1988,  1864,  1991,
+    1991,  1826,   326,  1821, 21444,  1453, -2149, 21444, -2149,  1828,
+   -2149,    38,    38,  1600,    38,  2022,  1830, 20374,   638,  1128,
+    1136, -2149,   920, -2149,  1996,  2188,  1996, 12727, 10657, -2149,
+   -2149,  1829,  1833,   985,  1952, 14882,  1837,  1838, 15738,  1923,
+    1923,  1923, -2149, -2149,  1113, -2149,  1914, 21444,  2090,  2057,
+    1085, -2149, 12727,  1814, -2149, -2149, -2149, -2149,  2208,  2007,
+   -2149, -2149,  2120, 20472, -2149, 12727,  2214, -2149, -2149,  2075,
+   -2149, -2149,  2114, -2149,   942,  2051, -2149, -2149,  1814,  1854,
+   -2149, 21444, 19976,   438, 19976, -2149, -2149, 16169, -2149,  2122,
+     642,  2017,  1857, -2149, -2149,  1858, -2149,    84,  1866,  1600,
+    1600,  1600,  1600,   721, -2149, -2149, -2149,  1872, -2149, -2149,
+    1183,  1197, -2149, -2149, -2149,  1863, -2149,  1570,    86, -2149,
+   19976,   948,  1874, -2149, -2149, 12727, -2149,  1220, -2149, -2149,
+    1875,  1879,   950,  1880,   954,  1881,  1882,  1883,  1884,  1886,
+    1888, -2149,  1230, -2149,  2135, -2149,  1814, 12727,  1891, 12727,
+   -2149, -2149, -2149,  1666,  1814,  1376,  7897, -2149,  2065, -2149,
+    1427, 12727,  1925,  1235, -2149,  1890,  1892,  1893, 18828, -2149,
+   21444,    87, -2149, -2149,  1896, -2149,   967,  2066, -2149,  1653,
+    1894, -2149,  1589,  1216,  2118, -2149,  2209,  2103,  1902,   110,
+   -2149, 21444,  1904, 21444, 21444, -2149, -2149, -2149, -2149,  2180,
+   -2149, -2149, 10657,  1906,  1907,  1908, 21444,  2265,  2270, -2149,
+   -2149, -2149,  1010, -2149,   -79,  2084, -2149, -2149, -2149,   980,
+   -2149,  2182,  1909,  1916, -2149,  1626,  2177, -2149,    50,   666,
+   21444, -2149,  2284,  2285, -2149,  2181,  1964, -2149, -2149, 21444,
+    1961, -2149, -2149,  2195, -2149,  1734,   982, -2149, 21444,  2140,
+   -2149, -2149, -2149, -2149, 20787,  1922,  1926, -2149, -2149, -2149,
+   -2149, -2149,  2288, -2149,  1996, -2149,  1257,    35,  1927,  1928,
+   -2149,  1939, 20880, -2149,  1135, -2149, -2149, -2149, -2149, -2149,
+   15824,  1941,  1943,  9622, 10657,   606,  2282, -2149, -2149,  1944,
+   -2149, -2149, -2149,  2149,  2155, -2149,  1814, -2149, -2149,  2097,
+   -2149,  1453, 21444, -2149,  1949, -2149,  1949,    15,  1295, -2149,
+    2283,  2286,  2287,  2289,  2154,  2292,  2290,  2021,  2153,  1023,
+   -2149,   642, -2149,  2320,  1963, 21444, 21444, -2149, -2149, 12727,
+    2081,  2086,  2087, 11692, -2149, -2149, -2149, -2149, -2149, -2149,
+    1740,  1814, -2149, -2149, -2149, -2149,  2326, -2149, -2149,  2327,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149,  1756,  7897, -2149,
+    1427, -2149, 12727,   987, -2149,   834,  2192, -2149,  1814, 21444,
+    1967, -2149, 19976, 19976, -2149,   756,  1968,  3620,    67, -2149,
+   12727,  2234,  1596,  1596, -2149,  2334,  2235,   485,   512, -2149,
+    1568,  2338,  2021, 21444, -2149, -2149,  2243, -2149,  2341,     5,
+    2324,  1982, -2149,  1052,   110, -2149,  2101, -2149,  1983,  1986,
+   -2149,    43, 21444, 21444, 21444,   993,  1987,  1990,  2054,  2193,
+    1989,  1596, -2149,  2196, 21444, -2149,  2178,  1997,   656, 21444,
+    2241, -2149, -2149, -2149, -2149,  2242, -2149,  2212,  2174,  2362,
+    2137,  5725, 21444,  1821,  1368, -2149, -2149, 11347, 21444, -2149,
+     -80, -2149,  2191, -2149,  1045, -2149,  1013,    86,  2061,   550,
+   21444, -2149, -2149,  2001,  2199, -2149, 20963, 12727, -2149, -2149,
+    1996, -2149, 19976, 19976, 18921, 21444, -2149, 15227,   -21, 21278,
+   -2149,  2006,  2010,  2014,  1863,  1156,  2279, -2149, -2149, -2149,
+   -2149,  2233, -2149,  1734,   132,  2294,  2138,  2293,  2247,  2351,
+   -2149, -2149, -2149,  2343,  2344,  2220,  1424, -2149, -2149,  2218,
+    2389,  2390,  2336, -2149, -2149,    56, -2149, -2149, -2149,  1317,
+   -2149, -2149, -2149, -2149, -2149,  2027,  2028, 12727,  1037, -2149,
+    1814, -2149, -2149,   834, -2149, -2149,  2030,  2031, 19976, 19976,
+   -2149,   801,  1039,  2215,  2337, -2149, -2149, -2149, -2149, -2149,
+   -2149,  1086,  1168, -2149,  1821,  1821,  2029,  2400, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149,  1095, -2149,  2318,
+   -2149,  2038,  2379, 16169, -2149,   693, -2149,  2039, -2149, -2149,
+   -2149,  2207,  2042, -2149,  1100,  1123,  1139, -2149, -2149, -2149,
+   -2149, -2149, 10657, -2149, -2149,  1523,  2043,    65, -2149, -2149,
+   -2149, 21444,  2238,  2045, -2149, -2149,   -61,  2101, 21444,  2048,
+    2050,  2101, -2149, -2149, -2149,  1637,  2322, -2149, 21444,  2417,
+   -2149, -2149, -2149,  2117, 21444, -2149,  2366, 19004,   417, -2149,
+   -2149,   526, -2149,  6517,  2059, -2149, -2149,  2101, 21444, -2149,
+   -2149,  1144, -2149,  1814, -2149,  2060,  2068, -2149,  2058, 10657,
+    2072, -2149, 21444, -2149, 21444, 21444, 11692, 11692,   344,  1734,
+   -2149, -2149, -2149, -2149, 19883,  1146, -2149, 21444, -2149, 16169,
+     137,  1596,  1925,  2328, -2149, -2149,  2388, -2149, -2149,  2272,
+   -2149, -2149,  2438,   567,  2074,  2076,  2194, -2149, -2149,  1814,
+   -2149,  2197, 12727, 12727, -2149,  2080, -2149,  4349, 12727, -2149,
+    2346, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,  1216,
+   -2149, 21444, -2149, 21444,  2415,  1958,  2348,  2349,   884,  2295,
+    2347, 21444,  2271, -2149,  1273,    51,  2291,  2453, -2149,  2257,
+    2339, -2149,  1155, -2149, -2149,  2452, -2149,  2091,  2363,  2364,
+    2096, -2149, -2149, -2149, -2149, 21444, 21444, -2149, -2149,  1744,
+   21444,  2099, -2149, 21444,  2017,    86,  2464, -2149, -2149,   781,
+    6170,  2225,  2325,   173, -2149, -2149,   829, -2149, -2149, -2149,
+    2104,   433, 12727, 12727, 21444,  2329, 21444, 21444,  2281, 21444,
+     666, 21759, 21444, 14797,  2108,  2109, 12727, 12037,  2111,     6,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149,  1159,  1149, -2149,  2116, -2149, -2149,  2119, -2149,  2121,
+    2123,  2126,  2128, -2149, -2149,   682,   689, -2149, -2149, -2149,
+   -2149, 12727, 12727, 12727, -2149,  1156, 21444, -2149, -2149,  1209,
+   -2149,  1212,  1228, -2149,  2484, -2149, 16169, -2149,    91, -2149,
+     431,  2317,  2465, -2149,  2184,  2466, -2149,  2446, -2149,  2139,
+    2141,  2142, -2149, -2149,  2496, -2149, -2149,  2143,  2144,  2145,
+    2146,  1814, 12727,  2147, -2149,  1239, -2149,  2413,  2471, -2149,
+   21444,  2342,  2296,  1248, -2149, -2149, -2149,   595,  1140,  2291,
+   -2149,  2156,  1596,  2495, -2149,    65,  2157,  2045, 21444, 21444,
+     -61, -2149,  2160,  1947, -2149, 12727,  2332,  2501,  1963, -2149,
+     110, -2149, -2149, -2149,  2412,  2377, 21444,  1958,  2419, -2149,
+   -2149,  2514, -2149, 21444,  2330, 16169, 13072,  2264,  1527,  1539,
+   -2149,   130, -2149, 21444,  2163, 11347,  2158, 10657, 10657,  1814,
+   -2149,   895,  1188,   550, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149,  2164,  2166,  1251, -2149, 21444, -2149, -2149,
+    2517,   349, -2149, -2149,  2383, -2149, -2149, -2149,   162,  1480,
+   -2149, -2149,  2515,  2525,   161,   567,    70,    72,  1814,  2521,
+   -2149,  2167,  2168, -2149, -2149,  2333,  2249, -2149,   494,   494,
+    1170,  1184, -2149, -2149,  2535, -2149, -2149, -2149,  2533, -2149,
+   -2149, -2149, -2149, 21444,  2444,  2057,  1683,   254, -2149,  1253,
+    2175,  2368,  2239, -2149, -2149,   297,  2449, -2149,   417, -2149,
+   -2149, 21444, 21361, 21444, 14797, -2149, -2149, -2149, -2149,   581,
+     299,  1346, -2149, -2149, 12382, 14452, -2149,  1371, -2149,  2384,
+   -2149,    88,    94, -2149, -2149, -2149, -2149,  1264, -2149, -2149,
+   -2149, -2149, -2149, -2149,  2522, -2149,  2544,  2545,  2546,  2547,
+   -2149,  2183,  2185,  2186,  2548, -2149,  2445,  1276, -2149,  2356,
+    2357,  2198,  2319,  2393, -2149,   338, -2149, -2149, -2149, -2149,
+   -2149, -2149,  1330,  2200, -2149, -2149, -2149,  1740, 21444, 21444,
+   -2149, 12727, 10657,  2395,  2284, -2149,  2258, -2149,   297, -2149,
+    5823, -2149,  2407, -2149, 10657, 13417, -2149, -2149,  1373,  7552,
+   14452,  1340,  2201, -2149,  1332,  1149,  2202, -2149,  2557, -2149,
+    1372, 14452,  1346,  1346, -2149,  1188,  2561, -2149,  2260,  2489,
+    2491, -2149, -2149,  2565,  2203,  1596, -2149,  2521, 21444, 21444,
+   21444, -2149,  2571,  2409, -2149, -2149, -2149,  2573, -2149, -2149,
+   -2149, -2149,    96,  2210,  2331,  2572,   -25, -2149, 16820, 12727,
+     417, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149,   766,   775, 12727,  1156,  2213, -2149,  2217, -2149,
+    2201, 14452, 14452, -2149, -2149,  1371,   -49,  2335, -2149, -2149,
+   -2149,  2563,  2581,  2584,  2221,  2582, -2149, -2149, -2149, -2149,
+    1384, -2149,  2587, -2149,  2223, -2149, 21444, 21444, -2149, -2149,
+      74,   100, -2149,  1814, -2149,  1329, 13762, -2149,  2201, -2149,
+   -2149,  2392,  1346, -2149,  2590, -2149, -2149, -2149,  2226, -2149,
+   -2149, -2149,  1389,   211, -2149, -2149, -2149, -2149, -2149,  2350,
+   -2149, -2149, -2149,  1393,   299,  2163, -2149, -2149, -2149, -2149,
+   -2149, -2149,  1346,  1346, 13762, -2149, -2149, -2149, -2149
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-   -2133, -2133, -2133, -2133, -2133,  2449,     8, -2133, -2133, -2133,
-   -2133,  1392, -1004, -2133,   482,   523, -2133,   386, -2133,   643,
-   -2133,   483, -2133, -2133, -2133, -2133,  1864, -2133,  -437,    10,
-    2346, -2133, -1158, -2133, -2133, -2133, -2133,  -603, -2133, -2133,
-    2460, -2133, -2133,  -939, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133,  -894,  -219, -2133, -2133, -2133,   104,  2494,
-   -2133,  2127,    51,  -322, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133,  1435, -2133, -2133, -2133, -2133, -2133, -1474, -1449,
-    1041, -1289, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133,  1660, -2133, -2133, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133,  2586,  2589,  2590, -2133,
-   -2133, -2133,  2592, -2133, -2133,   559,  1079,  1379,  -646,  -373,
-     207, -2133,   152, -2133,  2601, -2133, -2133, -2133,  1934,  1927,
-   -2133, -2133, -2133, -2133, -1177,  -289,  2604, -2133,  1603,  2605,
-   -2132,   222,  -680, -2133,    30, -1173,    16, -2133,  -495,  -432,
-    -601,  -466,  -245, -2133, -1038,  1413,  1929, -2133,  -496, -2133,
-     221, -1782, -2133,   681, -2133,  1204,  -640, -2133,  1361,   390,
-   -2133,   921,  -879, -2133, -2133,   513,   412, -2133,  -543, -2133,
-   -2133, -2133, -2133, -2133,  1047, -2133, -2133, -2133, -2133, -2133,
-   -2133,  -768,  1987,  -175,  2420, -2133,   737, -2133,  1928,  -274,
-   -2133, -1586,  1409,   -25,  1845,  1867,  -484,     0,  -670,  -244,
-    1942,  -668, -1395, -2133, -2133, -2133, -2133,  1796,  2051, -2133,
-   -2133, -2133, -2133, -1084, -1563,   162,  2423, -1606,  -190,   -70,
-     -43,  1729,  -516, -2133, -1113, -2133,  -435, -2133, -1448,  -281,
-     -57,    40, -2133, -2133, -2133, -2133, -2133, -2133,  1717, -2133,
-   -2133,  1055,  -587,  -391, -2133,  1495, -1627, -2133,   708, -2133,
-     294,  1240,  -881,   308, -2133, -2133, -1509, -1186, -2133, -2133,
-   -1769, -2133, -2133, -1608, -2133, -2133, -2133, -1962, -2133, -1848,
-   -2133, -2133, -2133, -2133,   325, -1789,  -378, -2133,   335, -2133,
-       2, -2133,     3,   337,   338,   339,   331, -2133,   186, -2133,
-   -2133,   342, -2133, -2133, -2133, -2133, -2133, -2133, -2133,   541,
-   -2133, -2133, -2133,   352, -2133, -2133, -2133, -2133,   353,   816,
-   -2133, -2133,   239, -2133, -2133, -2133, -2133, -2133,  1210, -2133,
-   -2133, -2133, -2133, -2133,  -197,   296,  1484, -2133, -2133, -2133,
-   -2133, -2133, -2133, -2133, -2133, -2133, -2133, -2133, -1541, -2133,
-   -2133,   542, -2133,  1036, -2133, -2133,  2584,  1137, -2133,   607,
-    -647, -1546, -2133,   606, -2133, -2133,  1125,  1208, -1373, -2133,
-   -2133,     1,  2087,  -195, -1809, -2133,  -198, -2133,  -270, -2133,
-   -2133, -2133,  1743,  1448, -2133, -2133, -2133, -2133,   486,  1013,
-   -2133,   566, -2133,  1469, -2133, -2133, -2133, -2133, -1668,   703,
-   -2133
+   -2149, -2149, -2149, -2149, -2149,  2472,     8, -2149, -2149, -2149,
+   -2149,  1417, -1003, -2149,   509,   548, -2149,   419, -2149,   674,
+   -2149,   518, -2149, -2149, -2149, -2149,  1885, -2149,  -452,   122,
+    2375, -2149, -1155, -2149, -2149, -2149, -2149,  -617, -2149, -2149,
+    2488, -2149, -2149,  -936, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149,  -881,  -224, -2149, -2149, -2149,    28,  2523,
+   -2149,  2161,   -62,  -325, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149,  1466, -2149, -2149, -2149, -2149, -2149, -1464, -1438,
+    1074, -1291, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149,  1693, -2149, -2149, -2149, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149,  2618,  2619,  2620, -2149,
+   -2149, -2149,  2622, -2149, -2149,   592,  1115,  1409,  -645,  -326,
+     240, -2149,   182, -2149,  2629, -2149, -2149, -2149,  1965,  1956,
+   -2149, -2149, -2149, -2149, -1174, -1392,  2630, -2149,  1631,  2634,
+   -2148,   253,  -679, -2149,    30, -1172,    14, -2149,  -491,  -481,
+    -596,  -476,  -274, -2149, -2149,  1410,  1953, -2149, -1603, -2149,
+   -2149, -1783,  2162, -2149,   706, -2149,  1236,  -643, -2149,  1385,
+     517, -2149,   955,  -876, -2149, -2149,   541,   440, -2149,  -544,
+   -2149, -2149, -2149, -2149, -2149,  1071, -2149, -2149, -2149, -2149,
+   -2149, -2149,  -783,  1905,   -63,  2447, -2149,   764, -2149,  1955,
+    -276, -2149, -1139,   683,    29,  1873,  1876,  -426,     0,  -669,
+    -188,  1970,  -662, -1330, -2149, -2149, -2149, -2149,  1822,  2088,
+   -2149, -2149, -2149, -2149, -1084, -1536,    77,  2442, -1608,  -205,
+     -75,  -100,  1758,  -521, -2149, -1110, -2149,  -456, -2149, -1449,
+    -283,   -98,    47, -2149, -2149, -2149, -2149, -2149, -2149,  1748,
+   -2149, -2149,   785,  -584,  -384, -2149,  1517, -1633, -2149,   740,
+   -2149,   319,  1268,  -878,   337, -2149, -2149, -1636, -1178, -2149,
+   -2149, -1765, -2149, -2149, -1428, -2149, -2149, -2149, -1992, -2149,
+   -1745, -2149, -2149, -2149, -2149,   354, -1727,  -378, -2149,   364,
+   -2149,     2, -2149,     3,   365,   366,   367,   363, -2149,   217,
+   -2149, -2149,   369, -2149, -2149, -2149, -2149, -2149, -2149, -2149,
+     572, -2149, -2149, -2149,   379, -2149, -2149, -2149, -2149,   380,
+     847, -2149, -2149,   266, -2149, -2149, -2149, -2149, -2149,  1241,
+   -2149, -2149, -2149, -2149, -2149,  -235,   248,  1511, -2149, -2149,
+   -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -2149, -1528,
+   -2149, -2149,   566, -2149,  1067, -2149, -2149,  2612,  1169, -2149,
+     640,  -642, -1526, -2149,   636, -2149, -2149,  1160,  1243, -1025,
+   -2149, -2149,     1,  2107,  -189, -1791, -2149,  -196, -2149,  -222,
+   -2149, -2149, -2149,  1777,  1487, -2149, -2149, -2149, -2149,   520,
+    1050, -2149,   599, -2149,  1504, -2149, -2149, -2149, -2149, -1660,
+     736, -2149
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -3002,1666 +2999,1626 @@ static const yytype_int16 yypgoto[] =
 #define YYTABLE_NINF -1228
 static const yytype_int16 yytable[] =
 {
-     173,   189,   178,   179,   404,   509,   590,   402,   126,   891,
-     199,   293,   487,   720,   980,  1199,   165,   965,   947,   966,
-    1307,   592,  1309,  1429,   652,  1700,  1392,   384,  1417,  1456,
-     164,   823,   911,   423,  1769,   619,   737,  1006,  2029,   426,
-     427,  1215,  1551,   922,   463,   464,   630,  1962,  1698,   437,
-    1824,   974,  1390,  1100,   816,   767,   818,   772,  2020,  1440,
-    1477,  1899,  1479,  1897, -1219,   312,  1782,   867,  1707, -1218,
-     330,  1792,  1807,   719,   680, -1220,  1981,  1298, -1221,  1016,
-    1738,  1877,   299,   268,   562,   867,   773,   850,   290,   199,
-     297,  -218,  1247,  1250,  2439,   951,  2437,   851,   297,   268,
-    -992,   993,   329,   297,  -992,   552,   331,   590,   970,   514,
-     526,   861,   298,   567,   969,  -992,  1943,   691,   768,   594,
-     768,  1609, -1094,  2146,   303,  1104,  1105,   610,  1024,   548,
-    1026,  1610,   551,   716,   774, -1094,   500, -1094, -1094,  2046,
-     470,   414,   318,  2054,   758,  -505,  -505,  -505,   879,   660,
-     164,   697,   698,   699,   700,   701,   417,   356,  1722,   399,
-    1004,   868,  1393,  1881,   200,   422,  1611,  2228,   631,  1445,
-    1177,   439,  1178,   536,  1612,  1711,   899,  1454,   942,   868,
-     958,  2383,   581,  1613,  1746,   441,  1463,  1521,   445,  1930,
-    2153,   448,  2389,  1472,  -630, -1095,  2154,   241,  1393, -1096,
-    -631,   501,  1614,   401,   415,   586,  1104,  1105,   590,   474,
-    1104,  1105,   407,   882,   407,   638,   410,  1104,  1105,  1104,
-    1105,   268,  2055,   995,  1104,  1105,  1104,  1105,   420,   608,
-     268,   420,   473,  1780,  1863,   487,   425,   420,   420,   622,
-     923,   199,   199,   199,   242,  2047,  1931,   420,   869,   199,
-     268,   442,  2421,   268,   446,   199,   268,   199,   199,   199,
-     199,  1455,   199,   199,   199,   199,   869,   201,  2257,  1057,
-    1090,  1091,  2237,   639,   357,   762,  1061,  1098,  1393,  1102,
-    1064,  1104,  1105,   472,   567,   567,   567,   199,   567,   567,
-     537,   567,   880,   567,   502,  -992,   498,  1073,  1058,   199,
-     506,  1683,   349,   764,   350,  1062,   771,   689,   775,  1065,
-     549,   590,   860,   549,   513,   549,   199,   471,  -487,  -487,
-    -487,   859,  2056,   697,   698,   699,   700,   701,   934,  1944,
-    1005,   471,   768,  1096,   840,  1457,  1216,   587,  2385,   768,
-    2229,  1002,  1370,   768,  -505,   512,  2228,   471,   571,   959,
-     518,  1864,  1905,   776,  2105,   471,   546,  1519,   589,  1120,
-    1290,   554,   561,   564,   589,   858,   207,   298,   589,  1250,
-    1299,  1541,  1092,  2302,   870,   306,  1241,  2251,   202,   589,
-     243,   297,  1839,   635,  2077,   589,  2082,   513,  -651,  1615,
-    1356,   588,  1876,   856,   611,   432,   433,   434,   657,  2440,
-    2441,  -651,  2438,  -651,   588,   878,   588,   348,   689,   447,
-     487,   449,   450,   451,   452,  1128,   456,   457,   458,   459,
-     199,  2044,  2045,  1106,  1877,   245,  1616,   420,  1729,  1659,
-     992, -1219,  2238,   990,  1794,   681, -1218,   420,   199,   690,
-     708,   655, -1220,  2216,   628, -1221,   561,  1831,   268,  1024,
-    1026,   762,   306,   503,   199,   741,   952,  2413,  -218,   294,
-     735, -1227,   199,  1195,  1127, -1227,   294,  1264,  1591,   651,
-     516,  1685,  1841,   442,   297,  1797,   199,   275,   268,   268,
-    1237,  1785,  2089,   726,  2325,   294,  2266,  1844,   687,  2326,
-     294,  2408,   702,  1056,  2376,  2347,  1786,   337,   739,   294,
-    1411,   351,  1223,  2029,  1069,   268,   709,  1858,   307,   366,
-     367,  1598,   714,   246,  2367,  2417,   651,  -487,   722,  2229,
-    1778,   659,  2193,  2020,  2194,   268,   294,  2348,   554,  1063,
-     442,   297,  2198,   199,   268,  1842,  1732,  1060,  1812,  2133,
-     690,  2134,  1025,   308,  2137,  1242,   704,  1311,   247,  1412,
-     867,   199,   248,   761,   249,  1027, -1053, -1053,  1102,   589,
-    1975,  1357,  1358,   702,   582,   203,  1832,   280,  1336,   287,
-     719,   782,   727,   319,   604,    99,  1772,   742,   928,  1775,
-    2414,  2454,    99,   762,  1238,   307,  1455,  1386,  1306,   899,
-    2267,   899,   623,  1573,  1813,   891,   854,  1337,  1575,   561,
-    2287,    99,  1375,   554,   863,  1123,    99,  1962,   643,   877,
-     513,  1488,   844,   846,   199,    99,   646,   888,    79,   651,
-     543,  1787,  1334,   428,   697,   698,   699,   700,   701,   205,
-    2443,   768,   199,   199,   893,  1956,   429,   288,  1203,  1961,
-     889,   120,    99,   268,   868,   930,  1387,   689,   120,   199,
-    2191,   996,  2317,  1124,  1125,   199,  1427,   593,   268,  1844,
-     697,   698,   699,   700,   701,  2031,   320,   766,  2443,   945,
-    1773,   281,  2129,  1776,  1929,  1135,   300,  1142,  1030,  2112,
-    2123,   120,   203,   302,  1523,  1524,  1525,  1526,   697,   698,
-     699,   700,   701,  1527,  1443,  1528,   282,  1389,  1481,   199,
-    1832,   638,  1194,  2062,   983,   760,  1371,  2192,   120,  1548,
-    1529,   561,  1976,  1977,  1978,   554,   268,  2390,  2391,  2277,
-     697,   698,   699,   700,   701,   304,  1693,  2317,  1231,  1008,
-    1549,   869,   453,  1012,    99,  1952,  1405,   199,  2317,  1056,
-     420,  2124,   309,   268,  2063,   454,   205,  1360,   899,   305,
-    1530,   697,   698,   699,   700,   701,   243,  1774,  1444,   639,
-    1777,   654,   199,   697,   698,   699,   700,   701,   884,  1372,
-    2053,  1055,  1244,  1245, -1227,  2399,  1825,   763,   283,   690,
-    2088,  1503,  2278,  1361,  1332,  1067,   917,   918,   554,   554,
-    1953,  1074,   244,  2064,  2364,  1362,   164,   310,  2317,  2317,
-     766,   245,  2381,   931,   697,   698,   699,   700,   701,   932,
-    1531,  2130,   203,  1675,  1439,  -958,  1700,  2450,   738,  -630,
-     697,   698,   699,   700,   701,   554,   204,  2259,  1107,  1108,
-    1139,   697,   698,   699,   700,   701,   359,   360,   361,   362,
-     363,   364,  1109,  1912,   366,   367,   332,  2459,  2460,   730,
-     368,   554,  1657,   977,  1841,  -630,  -613,  1056,   513,   513,
-    2120,  1126,  2260,  1443,  2041,   697,   698,   699,   700,   701,
-    1132,   333,  1625,   420,  1470,  1122,   205,   334,  1110,   209,
-    1013,   472,   513,  2125,  1153,  1041,  1111,  1920,  1921,   246,
-    1112,  1021,   335,   199,   199,  1175,  2126,  2127,  1532,   336,
-    1180,   199,   209,  1013,   339,  1017,  1051,   513,   651,   965,
-     203,   966,   209,  1013,   354,  1940,  1048,  1842,  1014,   340,
-     848,   849,  1205,  1724,   247,   964,   689,  2114,   248,   199,
-     249,  2041,   856,  1916,   214,  1917,  2164,  1219,   731,   732,
-    -957,   733,  1142,  1222,  -631,   651,   268,   268,   268,   268,
-     358,  2115,  1229,  2116,  1533,  1699, -1227,   214,  1725,  1054,
-    1844,   697,   698,   699,   700,   701,  1726,   214,  1455,  1980,
-     250,  1622, -1227,   251,   205,  1333, -1156,   513,   513,   199,
-     199,  1077,  1629,   209,  1013,   506,  1017,   353,  1249,  1224,
-    1225,  1226,  1227,   355,  1424,  1052,   732,  2117,  1053,   702,
-     907,   371,   164,   412,  1632,   252,   697,   698,   699,   700,
-     701,  1239,  1240,   651,  1918,  2225,  1919,  1292,  1671,  1293,
-     366,   367,  1296,   908,  1119,  1518,  1300,  1520,   372,   936,
-     937,   651,   651,   253,   651,  1310,   413, -1227,   214,   554,
-    1381,   268,   268,   268,   268,  2300,   418,  1173,  1174,   254,
-     697,   698,   699,   700,   701,  1181,   419,   909,   690,   255,
-     256,  1875,   561,  1552,   424,  1543,  2247,   651,  2248,  1633,
-     697,   698,   699,   700,   701,   430,   702,   965,   702,   966,
-     736,   436,   480,  1214,  1312,  1313,  1314,  1315,   444,  1634,
-    1335,   848,   849,   697,   698,   699,   700,   701,   209,  1013,
-    1635,  1017,   438,  1142,  1731,   899,   276, -1227,   460,   481,
-    1752,  1332,   697,   698,   699,   700,   701,  2365,   697,   698,
-     699,   700,   701,  2246,   206,  1577,   465,   239,  2360,   257,
-     461,   846,  1636,   977,   977,  1384,   466,  1018,   554,  1637,
-   -1227,  1388,   651,  1911,  1638,  1117,   785,   513,   697,   698,
-     699,   700,   701,   214,  1661,   467,  2255,  1639,   277,   278,
-    2307,   468,  1398,  2308,  1640,  1829,   697,   698,   699,   700,
-     701,   697,   698,   699,   700,   701,   469,   410,   997,   651,
-     476,   998,   999,   573,  1408,   497,   834,   838,   499,  1798,
-    1115,   651,  1671,  1671,   697,   698,   699,   700,   701,   513,
-     697,   698,   699,   700,   701,   211,   508,  1620,   199,  1436,
-     510,   697,   698,   699,   700,   701,   574,  1137,  1138,   835,
-    1500,   756,  1501,  1502,   511,  1458,   889,  2048,  1461,   697,
-     698,   699,   700,   701,   698,   699,   700,   701,  1469,   697,
-     698,   699,   700,   701,  1641,   697,   698,   699,   700,   701,
-     697,   698,   699,   700,   701,   215,   199,  1182,  1183,   199,
-     615,   616,   617,  1939,  1485,  2281,   757,  2282,   651,  1642,
-     216,  1104,  1105,   554,  1643,  2283,   259,  2284,   164,  -939,
-    -939,  1644,  2106,   311,  1509,   697,   698,   699,   700,   701,
-    -939,   700,   701,  1759,  1760,  1761,  1762,  -939,  1763,   260,
-    1987,    71,  1517,   561,   217,   561,   515,  1764,   513,   517,
-    1080,  1988,  1271,  -939,  1268,  1269,  1750,  1751,  1989,   262,
-    2038,  1552,   218,   520,   263,  -939,  1378,   785,  1742,  1465,
-    1327,  1466,   521,   264,    77,  -939,  1426,   937,  -939,  1475,
-    1476,   561,  1514,  1515,  1553,   937,  1992,  -939,  1601,  1602,
-    1272,  1559,  1560,  1341,  1562,  1563,    78,   522,   221,  1993,
-    1593,   937,  1435,   697,   698,   699,   700,   701,  1995,   523,
-     224,   225,  1342,   527,   227,  1651,  1652,  1211,  1473,   524,
-    1947,  1676,  1515,   891,  1713,  1714,   528,   487,   834,  1589,
-     525,  1590,  1745,   785,  1826,  1827,   856,  1579,   529,  1765,
-    1766,   530,  1455,  1968,  1801,   937,  1273,   539,  1474,  1274,
-     977,   531,   513,   977,   651,   651,  1859,  1860,  1835,  1836,
-     532,   835,  2070,  2071,  1694,  1275,  1545,   651,  1184,  1837,
-    1838,  1546,   533,   899,  1891,  1892,   359,   360,   361,   362,
-     363,   364,   697,   698,   699,   700,   701,  1904,   785,  1185,
-     368,   534,   199,  1022,  1556,  1186,   535,  1648,  1767,   538,
-    1570,   651,  1924,  1925,  1936,   937,  1276,   542,  1277,   242,
-    1677,  1585,  1278,  1937,  1838,   553,  1679,  1851,  1187,  1938,
-    1838,   568,  1908,  1910,  2033,  2034,   341,   569,  -216,  1684,
-    2078,  -216,  -618,   342,  1690,   570,  1188,   343,   589,  1900,
-     899,   572,   199,   578,  1580,  2442,   597,    75,   579,  -216,
-    1279,  1022,   580,  1280,   591,  -216,  2050,  2051,  -939,  -939,
-    2097,  2098,  2159,  2160,  1458,   964,  1281,  1282,  2235,  -623,
-    1283,  -624,  1284,  -621,  -604,   790,   791,  -629,  -216,  2001,
-    2161,  1547,   344,  2162,  1547,   595,  -215,   651,   651,  -215,
-     599,  2156,  2157,  2183,   937,   602,  -216,   792,  2190,  2160,
-    2254,   937,   793,  -621,  1285,  -616,   794,  -215,  2261,  2262,
-    -216,  2236,   605,  -215,  2293,  2294,   795,  2320,  2321,  1374,
-    2327,  2328,   796,  2339,  2340,   345,    88,   797,  -647,  -647,
-    1142,   199,  2349,  2350,   561,   561,  -215,  2244,  2245,  1755,
-     606,   371,  2158,   798,  2387,  2388,  1662,  -625,  1252,  1253,
-    1254,   799,  1255,  1256,  -215,  1300,  -626,   891,    91,  2432,
-     937,   800,   697,   698,   699,   700,   701,  -627,  -215,   801,
-    2453,   937,  2456,  2457,   651,   651,   651,  1799,  1800,   208,
-    -628,  2073,  2242,  1491,  1492,  -617,   199,  -631,  2186,  -632,
-    -622,   199,   802,   803,   804,   805,   211,   596,   601,   607,
-     806,   807,   609,  1823,  1436,   697,   698,   699,   700,   701,
-    1830,   613,   384,   620,   621,   624,   625,   697,   698,   699,
-     700,   701,   513,   626,   213,  1022,  1142,   627,  1854,   632,
-     636,  2052,   641,   637,   561,   561,  1690,  1861,   644,   199,
-     891,  1867,   645,   647,  2138,   648,   215,   650,   808,   809,
-     810,   811,  1143,  1144,  1145,  1146,   856,  1147,  1148,  1149,
-    -217,   216,  1150,  -217,   656,   899,   662,  1143,  1144,  1145,
-    1146,  2384,  1147,  1148,  1149,   661,   684,  1150,   663,   688,
-     691,  -217,   812,   703,   704,  1748,   706,  -217,  -630,   707,
-    -993,   710,  2355,   813,   814,   217,   712,  2291,   715,   505,
-     561,  1909,  1596,   723,  2378,   697,   698,   699,   700,   701,
-    -217,   725,   729,   218,   740,   743,  1142,   750,   754,  1107,
-    1108,   755,   697,   698,   699,   700,   701,   758,  -217,   549,
-     765,  1597,   777,  1109,   778,   513,   779,   783,   781,   780,
-    1809,   785,  -217,   784,  2015,  1814,   817,   220,   843,   221,
-     864,   222,  2292,   847,   697,   698,   699,   700,   701,   858,
-     865,   224,   225,   651,   226,   227,   874,   883,   886,  1110,
-    1958,   885,   900,   903,   906,  2049,   921,  1111,   915,   926,
-     199,  1112,   916,   935,   933,   938,   651,  2014,  2028,  1972,
-     939,   940,  1142,   977,   792,  2002,   946,   948,  1393,   793,
-    2032,  1045,   941,   794,   487,   949,  1156,  1157,  1158,  1159,
-    1160,  1161,  1162,   795,  2040,  1163,   651,  2043,  1155,   796,
-     950,   955,   956,   979,   797,  1164,   472,   968,  1001,   420,
-    1003,   513,  1156,  1157,  1158,  1159,  1160,  1161,  1162,  1009,
-     798,  1163,  1007,  1010,  1031,  1033,  2403,  1034,   799,  1032,
-    1035,  1164,  1118,  1036,   554,   554,   471,  1037,   800,  2072,
-     697,   698,   699,   700,   701,   293,   801,  1038,  1039,  1040,
-    1042,  1142,  1043,  1300,  1044,   651,  1050,   744,   745,   746,
-     592,   748,   749,   651,   752,  1046,   753,  1047,  1059,   802,
-     803,   804,   805,  1075,   384,  1081,  1082,   806,   807,  1084,
-     697,   698,   699,   700,   701,  1083,  1085,  2104,  1436,  1548,
-    1086,  2107,  2435,  1087,  2110,  1121,  1088,  1089,  1252,  1253,
-    1254,   513,  1255,  1256,  1257,  1093,  -524,  1094,  1095,  -619,
-    1549,  1097,  1099,  1130,  1662,  1458,   299,  1458,  2135,  1131,
-    1458,  1134,   290,   199,   297,   808,   809,   810,   811,  1136,
-    1167,  1576,  1133,  1196,   889,   697,   698,   699,   700,   701,
-     697,   698,   699,   700,   701,  1169,  2139,   665,   666,   667,
-     668,   669,   670,   671,   672,   673,   674,   675,   676,   677,
-    2319,  1200,  1154,   554,   554,  1171,  1176,   651,  1741,  1197,
-     813,   814,   697,   698,   699,   700,   701,   513,  1201,  1198,
-    1202,  1208,  1209,   384,  1206,  2210,  1143,  1144,  1145,  1146,
-    1220,  1147,  1148,  1149,  1252,  1253,  1254,  1218,  1255,  1256,
-    1257,  1217,  1228,  1230,  1234,  1243,  2015,  1236,  1251,  1261,
-    1263,   651,  1265,  1054,  1267,  1295,  1270,  1294,  1297,  1302,
-    1304,  1317,  1320,  1318,  1022,  1339,  1319,  1321,  1322,  2203,
-    2204,  1338,  1325,  1326,  1343,  2319,  1344,  1345,  1346,  1347,
-    1348,  1349,  1350,  1351,  1352,  1353,  2319,  2220,   384,  2014,
-    2233,  2230,  1354,   384,  2223,  1369,   513,   384,   384,  1393,
-    1396,  1377,  1379,  1395,  2239,  1380,  1399,  1400,  1401,   384,
-    1404,  1406,  1409,  1416,  1407,  1418,  1415,  1419,  1420,   164,
-    1431,  1440,  1421,  1410,  1438,  1447,  1449,  1450,   651,  1453,
-    1462,  1467,   958,  1468,  1478,  1482,  1483,  1484,  1486,  1487,
-    1489,  1494,  1497,  1498,  1504,  1505,  2319,  2319,  1506,  1511,
-    1512,  1513,  1516,  1333,  1522,  2318,  1539,  1540,  1537,  1542,
-    1544,  1105,  1547,  1578,  1554,  1583,  1557,  1558,  1561,   384,
-     384,  1564,  1565,  1566,  1436,  1567,  1568,  1569,  1594,  1604,
-    -620,  1605,  1606,  1624,  1630,  1631,  1572,   299,  1649,  1658,
-    1586,  1607,  2304,  2305,  2306,   297,  1587,  1592,  1599,  1621,
-    1626,  1627,  1653,  1665,   384,  1628,  1667,  1655,   889,  1656,
-    1669,  2210,  1674,  1668,  1678,  1680,  1681,  1335,  1682,   937,
-    2015,  1686,  1688,  1687,  1708,  2015,  1695,  1701,  1703,  2015,
-    2318,  1702,  1715,   484,  1716,  1717,  1718,  1719,  1705,  1721,
-    1720,  2318,   384,  1728,  1729,  1704,  1734,  1735,  1736,  1739,
-    1723,  1740,  1747,  1753,  1749,  1757,  1770,  1779,   519,  2352,
-    2353,  1771,  1783,  2014,  2375,  2369,  2370,  1784,  2014,  2233,
-    2230,  1788,  2014,  2028,  1789,  1455,  1795,  1796,  1802,  1803,
-    1805,  1804,   540,   541,  1806,  1808,  1810,  1811,  1815,  1816,
-    1817,   889,  1819,  1820,  1833,  1840,  1868,  1853,  1852,  1874,
-     555,  2318,  2318,  1870,   565,  1871,  1872,  1881,  1884,  2401,
-    2402,   651,  1883,  1885,  1887,  1888,  1889,  1890,  1893,  1894,
-    1895,   299,   575,  1896,  1901,  1902,  1906,   585,  1907,   297,
-    1913,  1914,  1922,  1923,  1926,  1927,  2015,  1928,  1932,  1933,
-    1935,  1948,  1959,  1966,  1941,  1949,  1963,  1967,  1960,  1969,
-    2030,  2058,  2035,  2059,  2036,  2060,  2061,  2075,  2037,  2039,
-    2067,  2066,  2079,  2068,  2069,  2084,  2080,  2081,  1638,  1752,
-    2094,  2083,  2095,  2090,  2015,  2096,  2099,   651,   199,  2014,
-    2447,  2444,  2100,  2101,  2102,  2103,  2113,  2121,   241,  2108,
-    2128,  2122,  2163,  2167,  2140,  2170,  2141,  2136,  2171,  2145,
-    2147,  2148,  2149,  2150,  2173,  2151,  2152,  2174,  2178,  2175,
-    2176,  2177,  2184,  2179,  2185,  2180, -1211,  2014,  2447,  2444,
-    1911,  2187,  2182,  2188,   682,   683,  2199,  2197,  2215,   585,
-    2201,  2206,  2218,  2213,  2219,  2222,  2221,  2234,  2256,  2191,
-    2264,  2224,  2269,  2265,  2285,  2275,  2288,   711,  2286,  2296,
-    2298,  2240,  2243,  2252,  2301,  2253,   484,  2324,  2272,  2273,
-    2330,  2295,  2329,  2274,  2331,  2332,  2333,   555,  2334,  2335,
-    2337,  2338,  2336,  2344,  2345,   565,   565,   565,   747,   565,
-     565,  2341,   751,  2351,   565,  2342,  2356,  2343,  2358,  2386,
-    2377,  2385,  2393,  2394,  2395,   208,  -615, -1156,  2396,  2397,
-    2398,  2404,  2405,  2407,   209,   210,  2448,  2409,  2410,  2412,
-    2427,  2428,   211,  2429,  2425,   786,   789,  2419,  2420,  2431,
-     819,  2430,  2433,  2434,  2451,   565,   841,   842,  2452,  2455,
-     585,   212,  1662,   346,  2196,  1414,   857,  2168,  2280,  2087,
-     213,  2200,   555,   435,   347,   317,   157,  1397,  1737,   158,
-     159,  1221,   160,  2155,  1706,  2423,   658,  1460,  1028,   214,
-    2458,   161,   215,   954,   162,   163,   957,  2422,  1289,  1430,
-    2424,  1623,  1862,   919,   920,   963,  2086,   216,  1493,  2208,
-    2290,  1743,   385,  2057,   984,  1071,   962,   839,  1192,   409,
-    1204,  2076,  1116,  1391,  2400,  1600,  2392,  2382,  2368,  2380,
-    2371,  2372,  2373,  2461,  2205,  2374,  2354,  1072,  1965,  2436,
-    2357,   217,  1660,  1403,  1793,  2217,   240,  1710,  2165,  2166,
-    1727,  1452,  1672,  1213,  2268,  1818,  2202,  1434,   961,   218,
-    2111,   484,     0,     0,     0,   855,     0,     0,     0,     0,
-       0,     0,     0,     0,   985,   986,   987,   988,   989,   219,
-       0,   991,     0,   994,   555,     0,     0,     0,     0,     0,
-       0,     0,     0,   220,     0,   221,     0,   222,     0,   223,
-       0,     0,     0,     0,     0,     0,     0,   224,   225,     0,
-     226,   227,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,  1049,     0,     0,     0,     0,     0,     0,   228,
-       0,     0,   229,   205,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,  1066,     0,  1068,     0,  1070,   555,     0,
-       0,     0,  1076,     0,  1078,  1079,     0,     0,     0,     0,
-       0,     0,     0,     0,   230,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   555,     0,     0,     0,     0,  1103,
-       0,     0,   231,     0,     0,     0,     0,     0,     0,     0,
-       0,  1113,  1114,     0,     0,     1,   232,     0,   233,     0,
-     555,     0,     0,     0,     0,     0,   565,     0,   234,   235,
-       0,     0,     0,     0,     0,  1129,     4,     5,   198,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,    66,    67,    68,     0,     0,
+     172,   188,   177,   178,   587,   402,   292,   649,   126,   485,
+     198,   888,   400,   977,   165,   962,   944,   421,  1304,   589,
+    1306,  1426,   963,   424,   425,  1196,  1389,   820,  1414,   316,
+     164,  1696,   908,   435,  1452,  1097,  1003,  1547,   461,   462,
+     616,  1212,  1958,   919,  1820,   971,   813,  1657,   815,  1387,
+     717,   627,  2026,  1436,  1825,  1694,   764,  1765,   769,  1893,
+    1473,   677,  1475,  1703, -1219,  1895,   765, -1218,   765,   511,
+   -1220,  1873, -1221,   770,   549,  1778,  1978,  1295,  2434,   199,
+     948,  1013,   297,   267,  -218,  -992,  1734,  1788,   289,   198,
+     295,   734,  1244,  1247, -1094,  1803,   523,   847,   295,   267,
+     688,   397,   327,   295,  2436,   587,   329,    79, -1094,  2143,
+     848,  1021,   296,  1023,   415,   591,  2017,  -992,   967,   310,
+     347,   966,   348,   420,   328,  -992,   990,   607,   939, -1094,
+     559,   301,   955,  2234,  2225,  1605,  1101,  1102,   382,  1101,
+    1102,   468,   578,   439,   657,  1606,   443,  1101,  1102,   446,
+     164,  1859,   896,   864,  1781,  1101,  1102,  1939,   317,  1001,
+    2410, -1094,  2380,  1234,  2051,   437,   858,   564,  2263,  1782,
+     545,  1827,   548,  2386,   471,   864,   723,  2120,   714,  1948,
+    1607,  1024,  1087,  1088, -1095,   240,  2256,  1517,  1608, -1096,
+     200,   570,  1101,  1102,   864,   835,  1707,  1609,  1101,  1102,
+    1101,  1102,   399,   472,  1544,   587,   994,   201,   635,   995,
+     996,   405,   605,   405,   628,   408,  1610,   879,   426,  1390,
+     267,  2257,   619,    99,   571,  1545,   771,   418,   274,   267,
+     418,   427,   241,  2418,  1949,   423,   418,   418,  2121,  1459,
+     198,   198,   198,  2052,   920,  1742,   418,   865,   198,   267,
+     440,   318,   267,   444,   198,   267,   198,   198,   198,   198,
+     890,   198,   198,   198,   198,   724,   636,  1235,  1860,   865,
+    1054,   761,  2264,  1095,   768,  1099,   772,  1058,   584,   992,
+     765,  1061,   470,  2411,  1089,  1055,   198,   765,   865,   120,
+    1828,   765,  1059,  2235,  1783,   496,  1062,   469,   198,   504,
+    1679,   956,   695,   696,   697,   698,   699,   857,   587,   430,
+     431,   432,   510,  2225,   198,   583,   304,   469,   469,   349,
+     759,  2382,   931,   445,  1367,   447,   448,   449,   450,  1002,
+     454,   455,   456,   457,   866,  1453,  1213,   564,   564,   564,
+     632,   564,   564,  1238,   564,  2053,   564,   773,  2102,   586,
+     509,   546,  1070,   546,   543,   515,   866,  1515,  1287,   551,
+     558,   561,  -992,   346,   875,   296,   856,   501,   586,  1247,
+    1940,  1537,  1296,    79,  -651,   866,  1835,   585,  2248,   295,
+     687,   586,   876,   513,  2435,   510,   999,   837,  1093,   586,
+     855,   654,   586,  2074,   608,  -651,   853,   706,   585,  2226,
+     568,  1353,  2079,  1611,  1681,   485,   656,   546,   469,  2437,
+    2438,   335,  1793,  1901,  1117,  1873,   732,   686,   198,   304,
+    2086,   202,   678,  1655,  1725,   418,   989,  -651,  2041,  2042,
+     585, -1219,  1021,  1023, -1218,   418,   198, -1220,  1790, -1221,
+    1612,   949,   625,    79,   558,  1192,   267,   738,  2213,   305,
+   -1227,  -218,   198,  1124,   206, -1227,    79,  2322,  1587,  1261,
+     198,   739,  2451,  2323,   279,  2405,   354,   648,  -485,  -485,
+    -485,   440,   295,  2299,   198,  2344,   267,   267,  1220,   987,
+     687,  1057,   867,    79,   306,   204,   684,   601,   412,    99,
+     700,  1840,  1450,   652,   579,   451,   759,  1060,   498,  1066,
+     298,  1872,  1718,   267,   707,   620,  1854,  2345,   452,  2373,
+     712,  1594,  1239,   702,   648,   719,  1774,   686,  2026,   300,
+    1877,   640,   267,  1972,  1022,   551,   877,   440,   295,   643,
+     198,   267,  2239,  1728,   925,  2130,   533,  2131,  1053,  2043,
+    2134,   695,   696,   697,   698,   699,   717,  1768,   198,   736,
+     758,   413,   305,  1390,  1099,   120,  2195,  1354,  1355,    99,
+     700,   302,   635,   499,  1303,   896,  1125,   896,   779,  1333,
+     364,   365,    99,  2364,  1771,  1569,  1451,  1776,  2226,   765,
+    1571,  1828,  2017,   355,  1334,   303,   286,   540,   695,   696,
+     697,   698,   699,   851,  1372,  2284,   558,   888,  2135,    99,
+     551,   860,  1308,  2421,  1331,  1484,   874,   510,   993,   841,
+     843,   198,  1121,  1122,   885,  2414,   648,   757,  2274,    79,
+     636,   904,    79, -1053, -1053,   120,   586,  1368,   759,   198,
+     198,  1101,  1102,  1439,  1027,  1390,  1139,   886,   120,  1952,
+     267,  1769,   927,  1957,   905,  2044,   198,   695,   696,   697,
+     698,   699,   198,   534,   287,   267,   500,  1132,  1120,  2254,
+    1424,  1191,  1837,  1840,  2361,   763,   942,  -485,  1772,  2028,
+    -630,  -613,  2378,  1925,  2109,  1973,  1974,  1975,   906,  1386,
+     881,  2275,  1519,  1520,  1521,  1522,  1837,  1408,  2059,  2440,
+    1369,  1523, -1227,  1524,  1477,   760,   198,  1440,   914,   915,
+     307,  1384,   980,   755,  -503,  -503,  -503,  1689,  1525,   558,
+     202,   651,  1402,   551,   267,   928,  1808,   308,   590,   687,
+    1228,   929,   727,  1926,   896,  1838,  1005,  2440,  1770,  2060,
+    1009,  1241,  1242,  2188,   198,    99,  1409,   418,    99,   275,
+     267,   695,   696,   697,   698,   699,   364,   365,  1526,  1838,
+     695,   696,   697,   698,   699,  1773,   686,  1104,  1105,   198,
+     695,   696,   697,   698,   699,   974,   330,   735,  1052,  2050,
+    1136,  1106,  1809,  1103,   204,  1821,  1451,  1977,  2061,  2085,
+    1927,   280,  1064,  1200,  1053,   551,   551,   331,  1071,  1357,
+    2189,   276,   277,   164,   695,   696,   697,   698,   699,  2396,
+    1451,  2126,   332,  1018,   763,  1383,   281,  1107,  1527,  2127,
+    1671,   728,   729,   202,   730,  1108,   333,   831,  1435,  1109,
+    1048,  1112,   551,  1696,  1439,  1358,   334,   203,  1045,  1329,
+     695,   696,   697,   698,   699,  1466,  1499,  1359,   357,   358,
+     359,   360,   361,   362,   337,  2111,   364,   365,   551,  1038,
+     832,  1653,   366,   338,   205,   510,   510,   238,  1123,   256,
+    2117,  2038,   695,   696,   697,   698,   699,  1129,  1621,  2112,
+     418,  2113,  1119,  1221,  1222,  1223,  1224,   204,   470,   510,
+     242,  1150,   208,  1010,   351,  1014,  1916,  1917,   282,   352,
+     198,   198,  1172,   242,  2387,  2388,  1528,  1177,   198,   933,
+     934,  1139,  1053,  -503,   510,   648,   962,   845,   846,  1049,
+     729, -1227,  1050,   963,  1051,  2114,   243,   208,  1010,  1202,
+    1014,  1015,  1114,   782,  1936,   244,   198,   961,  2038,   695,
+     696,   697,   698,   699,  1216,   853,  2161,   213,   244,  1174,
+    1219,  1175,   648,   267,   267,   267,   267,  1618,  2304,  1226,
+    1695,  2305,  1529,  1421,   695,   696,   697,   698,   699,  1170,
+    1171,   353,   208,  1010,  1625,  1840,  2122,  1178,  1309,  1310,
+    1311,  1312,   213,   410,   510,   510,   198,   198, -1227,  2123,
+    2124,  1330,   504,  1246,   695,   696,   697,   698,   699,   696,
+     697,   698,   699,  1667,  2447,  1211,   700,   356,   687,   164,
+     831,  1236,  1237,   369,   695,   696,   697,   698,   699,   411,
+     648,  1074,   416,   245,  1289,  2222,  1290,   213,   422,  1293,
+     845,   846,   417,  1297,  2456,  2457,   245,   428,   648,   648,
+     370,   648,  1307,   832,   202,   686,   551,   434,   267,   267,
+     267,   267,  1181,  2297,   436,   974,   974,  1720,   246,  2150,
+     442,  1628,   247,  -630,   248,  1116,  2151,   463,  1871,   558,
+    -631,   246,  1139,  1182,   648,   247,   258,   248, -1227,  1183,
+    1514,  1378,  1516,   700,   962,   700,   208,  1010, -1156,  1727,
+     896,   963,  1721,   458,   478,   208,  1010,  1332,  1014,   259,
+    1722,  1539,  1184,  1912,   249,  1913,  2314,   250,   204,   695,
+     696,   697,   698,   699,  1496,   459,  1497,  1498,  1548,   261,
+    1185,   479,  1134,  1135,   262,  1011,  1629,   695,   696,   697,
+     698,   699,  2362,   263, -1227,   464,  2357,  1748,   843,   251,
+     465,   213,  1381,  -958,   339,   551,  1630,  -630,  1385,   648,
+     213,   340,  -957,   466,   510,   341,  -631,  1631,   695,   696,
+     697,   698,   699,   467,  2252,    75,  1329,   252,   474,  1395,
+     695,   696,   697,   698,   699,   495,  1616,  1667,  1667, -1227,
+    1794,  2314,  1907,   253,   408,  1914,   648,  1915,  1573,  1632,
+     497,  1405,  2314,   254,   255,  2190,  1633,  2191,   648,   733,
+     342,  1634,   612,   613,   614,  2244,   510,  2245,   695,   696,
+     697,   698,   699,   506,  1635,   198,  1432,   309,   741,   742,
+     743,  1636,   745,   746,   753,   749,  2278,   750,  2279,   207,
+     512, -1156,  1454,   886,  2045,  1457,  1179,  1180,   208,   209,
+    2280,   508,  2281,   343,    88,  1465,   210,   695,   696,   697,
+     698,   699,  2314,  2314,   754,   695,   696,   697,   698,   699,
+    1461,   514,  1462,   198,   507,   211,   198,   517,  1935,  1481,
+    1101,  1102,  2243,   519,   212,   648,    91,  1249,  1250,  1251,
+     551,  1252,  1253,  1254,  1431,   164,   698,   699,  1265,  1266,
+    2103,  1505,   518,   213,  1375,   782,   214,  1423,   934,  1471,
+    1472,  1637,   695,   696,   697,   698,   699,  1597,  1598,  1513,
+     558,   215,   558,  1908,   520,   510,   695,   696,   697,   698,
+     699,  1510,  1511,   521,   210,  2035,  1638,  1549,   934,  1555,
+    1556,  1639,   974,  1558,  1559,   974,  1709,  1710,  1640,   695,
+     696,   697,   698,   699,   522,   216,  1589,   934,   558,   695,
+     696,   697,   698,   699,   695,   696,   697,   698,   699,  1647,
+    1648,  1672,  1511,   217,   524,  1943,  1741,   782,   535,  1077,
+    1746,  1747,  1797,   934,   214,  1548,   695,   696,   697,   698,
+     699,  1822,  1823,   218,  1831,  1832,   539,  1324,  1965,   215,
+    1738,   485,  1833,  1834,   536,   888,  1585,   219,  1586,   220,
+     525,   221,   526,   222,   527,  1249,  1250,  1251,   853,  1252,
+    1253,   223,   224,   528,   225,   226,  1900,   782,   896,   510,
+     529,   648,   648,   216,   530,  1690,   531,  1249,  1250,  1251,
+    1338,  1252,  1253,  1254,   648,  -524,   695,   696,   697,   698,
+     699,   217,   532,   227,   241,  1847,   228,   204,   695,   696,
+     697,   698,   699,   695,   696,   697,   698,   699,   198,   695,
+     696,   697,   698,   699,  1644,   550,  1268,   648,  1339,   567,
+    1855,  1856,  1887,  1888,  1920,  1921,  1673,   220,   229,  1932,
+     934,  2075,  1675,  -939,  -939,   896,  2067,  2068,   565,   223,
+     224,  1572,   566,   226,  -939,   695,   696,   697,   698,   699,
+    1686,  -939,  1933,  1834,  1269,   569,   230,  1469,   198,   575,
+    1984,    71,   576,  2381,  -618,  1470,   577,  -939,  1934,  1834,
+     231,  1985,   232,  2030,  2031,  2047,  2048,  1658,  1986,  -939,
+    1454,   586,   233,   234,  2094,  2095,  1904,  1906,   588,  -939,
+    -621,  -604,  -939,   592,    77,   594,   695,   696,   697,   698,
+     699,  -939,  2232,   648,   648,  -623,  1989,  -624,  1139,  -629,
+    1270,  -621,  1541,  1271,  2233,   596,    78,  2258,  2259,  1990,
+    -616,   695,   696,   697,   698,   699,  1542,  -625,  1992,  1272,
+    1575,  -626,   357,   358,   359,   360,   361,   362,  2156,  2157,
+    1371,  2158,  1543,   599,  2155,  -627,   366,   198,   602,  1552,
+     558,   558,  -628,  2241,  2242,  1751,  1451,  2159,  1543,  1566,
+    1755,  1756,  1757,  1758,  1581,  1759,  2153,  2154,  2180,   934,
+    1273,  1297,  1274,  -617,  1760,  -631,  1275,  2187,  2157,   888,
+    2251,   934,  2290,  2291,  2183,  -632,  1680,  2317,  2318,  -622,
+     648,   648,   648,  2324,  2325,   603,   695,   696,   697,   698,
+     699,   593,   198,   598,  1139,  2336,  2337,   198,   695,   696,
+     697,   698,   699,  1208,  1276,   604,  1744,  1277,   606,  1819,
+    1432,   961,  1140,  1141,  1142,  1143,  1826,  1144,  1145,  1146,
+    1278,  1279,  2049,   610,  1280,   617,  1281,  1576,   510,   695,
+     696,   697,   698,   699,  1850,  2070,  1896,   621,  1544,   618,
+     558,   558,  1686,  1857,   622,   198,   623,  1863,  2439,  2346,
+    2347,   896,   888,  -647,  -647,   624,  1761,  1762,  1282,  1545,
+     629,  1805,  -939,  -939,  1019,   634,  1810,   633,   853,   695,
+     696,   697,   698,   699,   638,   789,  1140,  1141,  1142,  1143,
+     790,  1144,  1145,  1146,   791,  1139,  1147,   369,   641,  1998,
+     642,  2384,  2385,  2012,   792,  1795,  1796,  1019,  2352,  -216,
+     793,   644,  -216,  2429,   934,   794,   558,  1905,  2450,   934,
+    2375,  1592,  2453,  2454,   974,  1763,  1042,  1487,  1488,   647,
+    -216,   795,   645,   653,  2046,   658,  -216,   659,   660,   796,
+     382,   681,  -215,   685,  2288,  -215,   688,   701,   702,   797,
+    1593,   510,   695,   696,   697,   698,   699,   798,   704,  -216,
+    -630,   705,  -993,  -215,  1115,   708,   710,   713,   503,  -215,
+     720,  1139,   695,   696,   697,   698,   699,  -216,   722,   648,
+     799,   800,   801,   802,   726,   740,  1954,   737,   803,   804,
+     747,  -216,  -215,   751,   546,   752,   198,   755,   762,  2289,
+     774,   775,   648,  2011,  2025,  1969,   776,   778,   777,   861,
+    -215,  1999,   780,   781,   814,   782,  2029,  1390,   840,   485,
+     844,  1737,   787,   788,  -215,   695,   696,   697,   698,   699,
+    2037,   855,   648,  2040,   862,   207,   805,   806,   807,   808,
+     871,   880,   470,   882,   789,   418,   883,   510,  2400,   790,
+    1139,   897,   210,   791,  1140,  1141,  1142,  1143,   900,  1144,
+    1145,  1146,   903,   792,  1147,  1658,   912,   913,   923,   793,
+     551,   551,   930,   918,   794,  2069,   935,   292,   932,   936,
+     212,   810,   811,   695,   696,   697,   698,   699,   937,  1297,
+     795,   648,   938,   943,   945,   946,   952,   589,   796,   648,
+     947,   953,   214,   965,   976,   998,  1104,  1105,   797,   695,
+     696,   697,   698,   699,  2432,  1000,   798,   215,  1007,  1004,
+    1106,  1006,  1028,  2101,  1432,  1030,  1029,  1031,  2104,  1032,
+     469,  2107,  1034,  1033,  1035,  1036,  1037,  1039,   510,   799,
+     800,   801,   802,  1041,  1040,  1047,  1019,   803,   804,  1043,
+    1056,   216,  1454,   297,  1454,  2132,  1107,  1454,  1044,   289,
+     198,   295,  1072,  1078,  1108,  2207,  1079,  1080,  1109,   217,
+    1081,   886,  1082,  1153,  1154,  1155,  1156,  1157,  1158,  1159,
+    1094,  -217,  1160,  2136,  -217,  1083,  2012,  1084,  1085,  1086,
+    1090,  1091,  1161,  1092,  1096,   805,   806,   807,   808,  2316,
+     551,   551,  -217,   219,   648,   220,  1118,   221,  -217,  -619,
+    1127,  1130,  1133,  1164,   510,  1166,  1128,   223,   224,  1152,
+     225,   226,  1151,   382,  1131,  1168,  1173,  1193,  1194,   809,
+    1197,  -217,  1195,  1153,  1154,  1155,  1156,  1157,  1158,  1159,
+     810,   811,  1160,  1199,  1198,  1203,  1205,  1206,   648,  -217,
+    1214,  1217,  1161,  1215,  1225,  1227,  1231,  1233,  1240,  1248,
+    1258,  1260,  1264,  -217,  1267,  1292,  2200,  2201,  1299,  1051,
+    1262,  1294,  1314,  1317,  2316,  1301,  1315,  1291,  1316,  1318,
+    1319,  1322,  1323,  1019,  2217,  2316,  2011,  2230,  2227,  1336,
+    1335,  2220,  1340,   510,  1341,  2315,  1342,  1343,  1344,  1345,
+    1346,  2236,   662,   663,   664,   665,   666,   667,   668,   669,
+     670,   671,   672,   673,   674,  1347,   164,  1348,  1349,  1350,
+    1351,  1366,  1390,  1393,  1374,   648,  1396,  1376,  1377,  1397,
+    1392,  1398,   382,  1401,  1413,  1403,  1415,  1427,  1406,  1404,
+    1407,  1412,  1436,  1416,  1434,  2316,  2316,  1417,  1443,  1445,
+     482,  2207,  1446,  1418,  1449,  1474,  1463,   955,  1478,  1458,
+    2012,  1464,  1479,  1480,  1490,  2012,  1482,  1483,  1485,  2012,
+    2315,  1432,  1494,  1493,   516,  1500,  1501,  1502,  1507,  1508,
+    1509,  2315,  1512,  1518,   297,  1330,  1533,  1535,  1536,  2301,
+    2302,  2303,   295,  1543,  1574,  1538,  1579,   382,   537,   538,
+    1102,  1540,   382,  1550,  1553,   886,   382,   382,  1554,  1557,
+    1560,  1561,  1562,  1563,  1332,  1564,   552,  1565,   382,  1568,
+     562,  -620,  1590,  1582,  1583,  1588,  1595,  1600,  1601,  1602,
+    1603,  1620,  1626,  1617,  1622,  1623,  1624,  1627,   572,  1649,
+    1651,  2315,  2315,   582,  1654,  1645,  1652,  1661,  1664,  1663,
+    1665,  1670,  1674,  1676,  1677,  1678,  2349,  2350,  1682,  1683,
+    2011,  2372,  2366,  2367,  1697,  2011,  2230,  2227,  1684,  2011,
+    2025,   934,  1691,  1698,  1699,  1701,  2012,  1704,   382,   382,
+    1700,  1711,  1719,  1724,  1712,  1713,  1715,  1714,   886,  1716,
+    1717,  1725,  1730,  1735,  1736,  1743,  1745,  1731,  1732,  1749,
+    1753,  1766,  1775,  1767,  1779,  1780,  2398,  2399,   648,  1784,
+    1785,  1451,  1791,   382,  2012,  1792,  1798,  1802,   297,  1799,
+    1800,  1804,  1801,  1806,  1811,  1807,   295,  1813,  1812,  1815,
+    1829,  1836,  1848,  1849,  1864,  1868,  1816,  1870,  1866,  1880,
+     679,   680,  1867,  1877,  1881,   582,  1883,  1884,  1885,  1886,
+    1889,   382,  1879,  1890,  1891,  1892,  1897,  1898,  1902,  1903,
+    1910,  1909,  1918,   709,  1919,  1922,  1923,  1924,  1929,  1928,
+    1931,  1937,  1944,  1945,   648,   198,  2011,  2444,  2441,  1955,
+    1956,  1963,   552,  1960,  1964,  1966,  2027,  2034,  2032,  2055,
+     562,   562,   562,   744,   562,   562,  2033,   748,  2056,   562,
+    2036,  2057,  2058,  2063,  2076,  2065,  2064,  2072,  2066,  2077,
+    2078,  1748,  1634,  2081,  2011,  2444,  2441,  2091,  2092,  2096,
+    2080,  2097,  2093,  2087,  2098,  2099,  2100,  2105,  2110,  2118,
+     783,   786,  2125,  2119,  2133,   816,  2137,  2138,   240,  2142,
+     562,   838,   839,  2144,  1658,   582,  2145,  2160,  2146,  2164,
+    2147,   854,  2167,  2148,  2168,  2149,  2171,   552,  2170,  2175,
+    2181,  2182,  2196,  2184,  2210,  2212,  2185,  2172,  2215,  2173,
+    2174,  2216,  2176,  2177, -1211,  2218,  1907,  2179,  2219,  2231,
+    2253,  2188,  2261,  2221,  2266,  2240,  2194,  2198,   916,   917,
+    2203,  2237,  2262,  2249,  2271,  2250,  2269,  2270,  2272,  2282,
+    2283,  2285,  2295,  2292,  2293,  2298,  2326,  2321,  2327,  2328,
+    2329,  2330,  2331,  2335,  2332,  2334,  2333,  2338,  2339,  2342,
+    2353,  2341,  2355,  2374,  2383,  2390,  2340,  2392,  2393,  2348,
+    2391,  2382,  2394,  2395,  -615,  2401,  2402,  2404,  2406,  2409,
+    2416,  2407,  2422,   958,  2417,  2425,   482,  2424,  2426,  2428,
+    2427,  2430,  2431,  2445,  2448,  2449,   344,  1411,  2193,  2165,
+     982,   983,   984,   985,   986,  2452,  2084,   988,  2277,   991,
+     552,   433,   345,  2197,   315,  1394,  1025,  1733,   157,   158,
+     159,  1218,   160,  2152,  1456,  2420,  1702,  2455,   655,   161,
+     162,   951,   954,  1286,   163,  2419,   960,  2083,  1468,  1489,
+    1619,  1739,  1858,   692,  2205,  2287,  2054,   407,   383,   981,
+    1068,   959,  1388,  1069,  1189,  1113,  2397,  1046,  1201,  2073,
+    1596,   836,  2389,  2379,  2365,  2368,  2369,  2370,  2377,  2371,
+    2351,  2458,  2202,  2433,  2354,  1962,  2214,  1400,  1063,  1656,
+    1065,  1789,  1067,   552,   239,  1706,  2163,  1073,  2162,  1075,
+    1076,  1723,   852,  1668,  1210,  2265,  2199,  1448,  1814,  1430,
+    2108,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   552,
+       0,     0,     0,     0,  1100,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  1110,  1111,     0,     0,
+       1,     0,     0,     0,     0,   552,     0,     0,     0,     0,
+       0,   562,     0,     0,     0,     0,     0,     0,     0,     0,
+    1126,     4,     5,   197,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
+      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   849,
+       0,  1229,  1230,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   852,     0,  1232,  1233,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1263,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1288,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1266,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1291,     0,     0,     0,     0,     0,
+       0,     0,     0,   552,     0,     0,     0,     0,     0,  1313,
+       0,     0,     0,     0,     0,     0,  1320,  1321,     0,     0,
+       0,     0,  1327,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   555,     0,
-       0,     0,     0,     0,  1316,     0,     0,     0,     0,     0,
-       0,  1323,  1324,     0,     0,     0,     0,  1330,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1337,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1352,
+       0,     0,     0,  1100,     0,     0,     0,     0,  1356,    93,
+    1364,  1365,     0,     0,  1370,     0,     0,     0,     0,     0,
+       0,  1373,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   552,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   541,     0,     0,     0,
+       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1340,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1355,     0,     0,     0,  1103,     0,
-       0,     0,     0,  1359,    93,  1367,  1368,     0,     0,  1373,
-       0,     0,     0,     0,     0,     0,  1376,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   555,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   850,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   544,     0,     0,     0,     0,     0,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   853,     0,     0,     0,     0,     0,     0,
+       0,     0,  1476,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   552,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1480,     0,     0,
+    1506,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   555,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1510,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    1551,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     1,  1567,     0,  1570,     0,     0,     0,     0,     0,
+       0,   562,     0,     0,     0,     0,  1578,     0,     0,     0,
+       0,     0,     4,     5,   197,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
+      65,    66,    67,    68,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1555,     0,     0,     0,     0,
+    1379,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1571,     1,  1574,
-       0,     0,     0,     0,     0,     0,   565,     0,     0,     0,
-       0,  1582,     0,     0,     0,     0,     0,     0,     0,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1382,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  1327,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1330,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,  1729,     0,     0,     0,  1327,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1733,     0,     0,     0,  1330,     0,     0,     0,     0,     0,
+       0,     0,     0,   562,     0,     0,     0,  1740,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   565,
-       0,     0,     0,  1744,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1752,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  1756,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    93,     0,     0,
+      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   484,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   544,     0,     0,     0,  1857,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
+       0,     0,   482,   100,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   541,     0,     0,
+       0,     0,  1853,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
-       0,     0,     0,     0,     0,     0,  1383,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,  1903,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1754,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     1,     0,     0,     0,     0,     0,  1380,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  1899,     0,     4,     5,   197,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
+       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  1750,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1327,  1327,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   552,   552,     0,
+       0,     0,     0,  2071,     4,     5,   197,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
+       0,     0,    65,    66,    67,    68,     0,  2128,  2129,     0,
+       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,  2139,  2141,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  1853,   552,   552,   541,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,  2178,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1380,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    2206,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     482,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   541,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  2311,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1330,  1330,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     1,
+       0,   542,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     1,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   555,   555,     0,     0,     0,     0,  2074,
-       4,     5,   198,     7,     8,     9,    10,    11,    12,    13,
+       0,     0,     0,     0,     0,     0,  2206,     4,     5,   197,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,     1,
+       0,     0,     0,     0,  2413,    65,    66,    67,    68,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  2415,
+       4,     5,   197,     7,     8,     9,    10,    11,    12,    13,
       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
       24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
       44,    45,    46,    47,    48,     0,    49,    50,    51,    52,
       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
       63,    64,     0,     0,     0,     0,     0,     0,    65,    66,
-      67,    68,  2131,  2132,     0,     0,     0,    93,     0,     0,
-       0,     0,     0,     0,     0,     0,  2142,  2144,     0,     0,
+      67,    68,     1,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   849,     0,
+       0,     0,     0,     4,     5,   197,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
+       0,    65,    66,    67,    68,    93,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  1857,   555,   555,   544,     0,     0,     0,     0,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,  2181,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,  1383,     0,     0,     0,
+       0,     0,   541,     0,     0,     0,     0,     0,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  2209,     0,     0,     0,     0,
+       0,     0,     0,     0,   718,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   484,     0,     0,     0,     0,
+       0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    93,     0,     0,     0,     0,     0,   941,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   544,     0,     0,     0,     0,
-       0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  2314,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   541,     0,
+       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       1,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    1380,     4,     5,   197,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,     1,     0,     0,     0,     0,     0,    65,
+      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     4,     5,   197,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,     1,     0,     0,     0,
+       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     4,     5,   197,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
+       0,     0,     0,     0,     0,    65,    66,    67,    68,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    93,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   545,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     1,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  2209,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,     1,     0,     0,     0,     0,  2416,
-      65,    66,    67,    68,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  2418,     4,     5,   198,     7,     8,
+       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   560,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   859,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     1,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   873,     4,     5,   197,     7,     8,
        9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
       39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
        0,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,     0,     0,     0,
-       0,     0,     0,    65,    66,    67,    68,     1,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   852,     0,     0,     0,     0,     4,     5,
-     198,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      58,    59,    60,    61,    62,    63,    64,     1,     0,     0,
+       0,     0,     0,    65,    66,    67,    68,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     4,     5,
+     197,     7,     8,     9,    10,    11,    12,    13,    14,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
       46,    47,    48,     0,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-       0,     0,     0,     0,     0,     0,    65,    66,    67,    68,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   544,     0,     0,
-       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
+       1,     0,     0,     0,     0,     0,    65,    66,    67,    68,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     4,     5,   197,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
+      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,    93,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   721,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   100,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   106,   107,   108,   109,
      110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
-       0,     0,   944,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   884,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   544,     0,     0,     0,     0,     0,   106,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   106,
      107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
      117,   118,   119,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    93,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1383,     4,     5,   198,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,     1,     0,
-       0,     0,     0,     0,    65,    66,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
+       0,     0,     0,     0,     0,   926,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  1008,     4,
+       5,   197,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     1,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
-      65,    66,    67,    68,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    93,     0,     0,     0,     0,     0,
+      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
+      68,     0,     0,     0,     0,     0,     1,   357,   358,   359,
+     360,   361,   362,     0,   363,   364,   365,     0,     0,     0,
+       3,   366,     0,     0,     0,     0,     0,     4,     5,   197,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,  1980,    64,     0,
+       0,     0,     0,     0,     0,    65,   367,    67,    68,  1981,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   368,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+    1984,    71,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1985,     0,     0,     0,     0,     0,     0,  1986,     0,
+       0,     0,     0,  1987,  1988,     0,     0,    76,     0,     0,
+       0,     0,     0,     0,    77,     0,     0,     0,     0,     0,
+       0,     0,   369,     0,     0,     0,  1989,    93,     0,     0,
+       0,     0,     0,     0,     0,     0,    78,     0,     0,  1990,
+    1991,     0,     0,     0,     0,     0,     0,     0,  1992,   370,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    93,     0,     0,
+     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,  2358,     0,     0,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,   371,     0,     0,     0,  1994,     0,
+       0,     0,  1995,  1451,     0,  1996,    90,     0,     0,     0,
+       0,     0,     0,     0,     0,  2359,     0,     0,     0,   294,
+       0,     0,     0,     0,     0,    93,  1818,    94,    95,     0,
+       0,   372,   373,     0,     0,    96,    97,     0,     0,     0,
+       0,     0,     0,     0,     0,   374,   375,   376,   377,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   563,     0,     0,     0,     0,     0,     0,
+       0,     0,   102,     0,     0,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1998,
+       0,   480,     0,  2360,     4,     5,   197,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
+       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   789,     0,     0,     0,
+       0,   790,     0,     0,     0,   791,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   792,     0,     0,     0,     0,
+       0,   793,     0,     0,     0,     0,   794,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
+       0,     0,   795,     0,     0,     0,     0,     0,     0,     0,
+     796,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     797,     0,     0,     0,     0,     0,     0,     0,   798,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   862,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
+       0,   799,   800,   801,   802,     0,     0,     0,     0,   803,
+     804,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     1,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   876,
-       4,     5,   198,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,     0,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,     1,     0,     0,     0,     0,     0,    65,    66,
-      67,    68,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     4,     5,   198,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,     1,     0,     0,     0,     0,
-       0,    65,    66,    67,    68,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     4,     5,   198,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,    66,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   887,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    93,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     929,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   805,   806,   807,
+     808,     0,    93,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,  1011,     4,     5,   198,     7,     8,     9,
-      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
-      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
-       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
-       0,     1,   359,   360,   361,   362,   363,   364,     0,   365,
-     366,   367,     0,     0,     0,     3,   368,     0,     0,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,  1983,    64,     0,     0,     0,     0,     0,     0,
-      65,   369,    67,    68,  1984,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     370,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1987,    71,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,  1988,     0,     0,     0,
-       0,     0,     0,  1989,     0,     0,     0,     0,  1990,  1991,
-       0,     0,    76,     0,     0,     0,     0,     0,     0,    77,
-       0,     0,     0,     0,     0,     0,     0,   371,     0,     0,
-       0,  1992,    93,     0,     0,     0,     0,     0,     0,     0,
-       0,    78,     0,     0,  1993,  1994,     0,     0,     0,     0,
-       0,     0,     0,  1995,   372,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,   810,   811,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,  2361,     0,     0,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   373,
-       0,     0,     0,  1997,     0,     0,     0,  1998,  1455,     0,
-    1999,    90,     0,     0,     0,     0,     0,     0,     0,     0,
-    2362,     0,     0,     0,   296,     0,     0,     0,     0,     0,
-      93,  1822,    94,    95,     0,     0,   374,   375,     0,     0,
-      96,    97,     0,     0,     0,     0,     0,     0,     0,     0,
-     376,   377,   378,   379,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   102,     0,     0,
-     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  2001,     0,   482,     0,  2363,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   792,     0,     0,     0,     0,   793,     0,     0,     0,
-     794,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     795,     0,     0,     0,     0,     0,   796,     0,     0,     0,
-       0,   797,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   798,     0,     0,
-       0,     0,     0,     0,     0,   799,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   800,     0,     0,     0,     0,
-       0,     0,     0,   801,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   802,   803,   804,   805,
-       0,     0,     0,     0,   806,   807,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   808,   809,   810,   811,     0,    93,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,   813,   814,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,  1982,     0,     3,
-     368,     0,     0,     0,     0,  2119,     4,     5,   198,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,  1983,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,  1984,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,  1985,
-       0,     0,     0,     0,   370,  1986,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,  1987,
-      71,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1988,     0,     0,     0,     0,     0,     0,  1989,     0,     0,
-       0,     0,  1990,  1991,     0,     0,    76,     0,     0,     0,
-       0,     0,     0,    77,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,  1992,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    78,     0,     0,  1993,  1994,
-       0,     0,     0,     0,     0,     0,     0,  1995,   372,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,  1996,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,  1997,     0,     0,
-       0,  1998,     0,     0,  1999,    90,     0,     0,     0,     0,
-       0,     0,     0,     0,  2000,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,     0,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
-     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
-     119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,  2001,     0,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,  1979,     0,     3,   366,     0,     0,     0,     0,
+    2116,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   820,     0,     0,     0,   477,   478,   370,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   821,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   294,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   582,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,    99,
+      62,  1980,    64,     0,     0,     0,     0,     0,     0,    65,
+     367,    67,    68,  1981,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,  1982,     0,     0,     0,     0,   368,
+    1983,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,  1984,    71,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1985,     0,     0,     0,     0,
+       0,     0,  1986,     0,     0,     0,     0,  1987,  1988,     0,
+       0,    76,     0,     0,     0,     0,     0,     0,    77,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
+    1989,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      78,     0,     0,  1990,  1991,     0,     0,     0,     0,     0,
+       0,     0,  1992,   370,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1993,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,  1994,     0,     0,     0,  1995,     0,     0,  1996,
+      90,     0,     0,     0,     0,     0,     0,     0,     0,  1997,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,     0,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,  1101,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,  1998,     0,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   820,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   817,     0,
+       0,     0,   475,   476,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   821,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   818,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    79,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   845,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   579,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-    1101,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+    1098,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,  1983,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,  1984,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   370,
+      62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   817,     0,     0,     0,   475,   476,   368,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1990,  1991,     0,
+       0,   818,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1994,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    79,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  2361,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,  1997,     0,     0,     0,  1998,     0,     0,  1999,
-      90,     0,     0,     0,     0,     0,     0,     0,     0,  2000,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,     0,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,   842,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,    99,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,  1098,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
+      57,    58,    59,    60,    61,    62,  1980,    64,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,  1981,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
+       0,     0,  1987,  1988,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1991,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   582,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  2358,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
-       0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,  1994,     0,     0,
+       0,  1995,     0,     0,  1996,    90,     0,     0,     0,     0,
+       0,     0,     0,     0,  1997,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,     0,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-     583,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   477,   478,   370,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   475,   476,   368,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   294,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    79,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   845,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,    99,
+       0,   579,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,    99,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   583,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,   580,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   820,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   924,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   821,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
+       0,     0,   475,   476,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    79,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,   842,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
+       0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-     822,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     580,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   820,     0,     0,     0,   477,   478,   370,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   817,     0,     0,     0,   475,   476,   368,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1288,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   821,     0,     0,     0,     0,     0,     0,     0,     0,
+     921,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   818,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   822,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,   819,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,   478,   370,     0,     0,  1363,  1364,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   817,     0,
+       0,     0,   475,   476,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1285,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   818,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  1365,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,   982,     0,     0,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     819,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   477,   478,   370,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   475,   476,   368,
+       0,     0,  1360,  1361,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,  1696,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  1697,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  1362,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,   979,     0,     0,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   475,   476,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,  1692,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  1693,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,   573,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,   574,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   477,   478,   370,
-       0,     0,   787,     0,     0,     0,     0,     0,     0,     0,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   475,   476,   368,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   788,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,   570,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,   571,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   820,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   475,   476,   368,     0,     0,   784,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   821,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   785,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     2,     0,     0,     3,     0,     0,     0,     0,     0,
-     822,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   817,     0,     0,     0,   475,   476,   368,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    69,     0,     0,     0,     0,     0,
-       0,     0,     0,    70,     0,    71,     0,     0,    72,     0,
-       0,     0,     0,     0,     0,    73,     0,     0,     0,    74,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    75,
-       0,    76,     0,     0,     0,     0,     0,     0,    77,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   818,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      78,     0,     0,    79,    80,     0,     0,     0,     0,     0,
-       0,     0,    81,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    82,    83,    84,    85,     0,    86,    87,    88,     0,
-      89,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      90,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      91,     0,     0,    92,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,     0,     0,     0,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,    98,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    99,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   101,     0,     0,   102,     0,     0,   103,
+       0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   120,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     2,     0,     0,     3,
+       0,     0,     0,     0,     0,   819,     4,     5,     6,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   479,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,     0,     0,     0,    65,    66,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    69,
+       0,     0,     0,     0,     0,     0,     0,     0,    70,     0,
+      71,     0,     0,    72,     0,     0,     0,     0,     0,     0,
+      73,     0,     0,     0,    74,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    75,     0,    76,     0,     0,     0,
+       0,     0,     0,    77,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    78,     0,     0,    79,    80,
+       0,     0,     0,     0,     0,     0,     0,    81,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,    82,    83,    84,    85,
+       0,    86,    87,    88,     0,    89,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    90,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    91,     0,     0,    92,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,     0,
+       0,     0,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,    98,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   101,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,   982,     0,     0,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     120,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   477,   478,   370,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   475,   476,   368,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   477,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,   979,     0,     0,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,   475,   476,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,  2143,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   477,   478,   370,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   475,   476,   368,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-    2313,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
-       0,     0,     0,     0,     0,     0,     0,   480,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,   481,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,  2140,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   477,   478,   370,     0,     0,     0,     0,     0,
+       0,     0,   475,   476,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
+       0,     0,     0,     0,     0,  2310,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,   480,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,     0,    93,     0,    94,    95,     0,   481,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,   478,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,   479,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   370,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   475,   476,   368,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,  2226,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   294,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  2227,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      90,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,     0,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,    99,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
+       0,     0,     0,     0,     0,     0,     0,   478,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,   479,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   583,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,  2226,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  2223,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    79,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,  2361,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  2224,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,    90,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
        0,     0,     0,     0,    93,     0,    94,    95,     0,     0,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
+       0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-     482,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     580,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   370,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   368,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,  2223,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  2361,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
+       0,  2358,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       90,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,     0,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,     0,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,   359,   360,   361,   362,
-     363,   364,     0,   365,   366,   367,     0,     0,     0,     3,
-     368,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,   480,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,   369,    67,    68,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   370,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   371,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   372,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  2358,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   373,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    90,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
        0,     0,     0,     0,    93,     0,    94,    95,     0,     0,
-     374,   375,     0,     0,    96,    97,     0,     0,     0,     0,
-       0,     0,     0,     0,   376,   377,   378,   379,     0,     0,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       1,   359,   360,   361,   362,   363,   364,     0,   365,   366,
-     367,     0,     0,     0,     3,   368,     0,     0,     0,     0,
-     380,     4,     5,   198,     7,     8,     9,    10,    11,    12,
+       1,   357,   358,   359,   360,   361,   362,     0,   363,   364,
+     365,     0,     0,     0,     3,   366,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
       23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-     369,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   370,
+     367,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   368,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,    76,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   371,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   369,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   372,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   370,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   373,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   371,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     295,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   296,     0,     0,     0,     0,     0,    93,
-       0,    94,    95,     0,     0,   374,   375,     0,     0,    96,
-      97,     0,     0,     0,     0,     0,     0,     0,     0,   376,
-     377,   378,   379,     0,     0,     0,     0,     0,     0,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,     0,    93,
+       0,    94,    95,     0,     0,   372,   373,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,   374,
+     375,   376,   377,     0,     0,     0,     0,     0,     0,     0,
        0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
      104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
      114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     3,
-       0,     0,     0,     0,     0,   482,     4,     5,   198,     7,
+       0,     0,     0,     0,     0,     1,   357,   358,   359,   360,
+     361,   362,     0,   363,   364,   365,     0,     0,     0,     3,
+     366,     0,     0,     0,     0,   378,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       1,     0,     0,     0,    65,    66,    67,    68,     0,     0,
+       0,     0,     0,     0,    65,   367,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     4,     5,   198,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    76,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
-      66,    67,    68,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,   368,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   369,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   370,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   295,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   296,     0,
-       0,     0,     0,   294,    93,     0,    94,    95,     0,     0,
-       0,     0,     0,     0,    96,    97,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
-       0,   337,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   371,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   293,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+       0,     0,     0,     0,    93,     0,    94,    95,     0,     0,
+     372,   373,     0,     0,    96,    97,     0,     0,     0,     0,
+       0,     0,     0,     0,   374,   375,   376,   377,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   102,     0,     0,   103,   104,   105,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    93,
-       0,     0,     0,   971,     0,     0,     0,     0,     0,     0,
-     120,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    99,
-       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1248,     4,     5,   198,     7,
+       1,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     3,     0,     0,     0,     0,     0,
+     480,     4,     5,   197,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,     0,     0,     1,     0,     0,     0,    65,
+      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,     1,     0,
+      48,    76,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
        0,     0,     0,     0,    65,    66,    67,    68,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,   294,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    79,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   582,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    93,     0,     0,     0,   971,     0,
+     293,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   294,     0,     0,     0,     0,    79,    93,
+       0,    94,    95,     0,     0,     0,     0,     0,     0,    96,
+      97,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    99,
+       0,     0,   100,     0,     0,     0,   335,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   102,     0,     0,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    93,     0,     0,     0,   968,     0,
+       0,     0,     0,     0,     0,   120,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,    99,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   296,     0,     0,     0,     0,     0,    93,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    96,    97,     0,
-    1248,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
+       1,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   311,     4,     5,   198,     7,     8,     9,
+    1245,     4,     5,   197,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,     1,     0,     0,     0,     0,     0,    65,
+      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     4,     5,   197,     7,     8,     9,
       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,     1,     0,     0,     0,
+      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
        0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
-       0,   504,     0,     0,     0,     0,     0,     4,     5,   198,
-       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
-       0,     0,     1,     0,     0,    65,    66,    67,    68,     0,
+       0,     0,     0,    79,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   505,     4,     5,   198,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
-       0,    65,    66,    67,    68,     0,     0,     0,     0,     0,
-       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,   579,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    93,     0,     0,     0,   971,
-       0,     0,     0,     0,     0,     0,     0,     0,  1260,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    93,
+       0,     0,     0,   968,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   106,   107,
-     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
-     118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    99,
+       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   972,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   294,     0,     0,     0,
+       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    96,    97,     0,  1245,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     1,     0,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,  1691,     4,     5,
-     198,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+       0,     0,     0,     0,     0,     0,     0,     0,   309,     4,
+       5,   197,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,     1,     0,     0,     0,     0,     0,    65,    66,    67,
+      68,     0,     0,     0,     0,     0,   502,     0,     0,     0,
+       0,     0,     4,     5,   197,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,     0,     0,     0,     1,     0,     0,
+      65,    66,    67,    68,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   503,     4,     5,
+     197,     7,     8,     9,    10,    11,    12,    13,    14,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
       46,    47,    48,     0,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
        0,     0,     0,     0,     0,     0,    65,    66,    67,    68,
+       0,     0,     0,     0,     0,     0,     0,    93,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     792,     0,     0,     0,     0,   793,     0,     0,     0,   794,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   795,
-       0,     0,     0,     0,     0,   796,     0,     0,     0,     0,
-     797,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   798,     0,     0,     0,
-       0,     0,     0,     0,   799,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   800,     0,     0,     0,     0,     0,
-       0,     0,   801,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   802,   803,   804,   805,     0,
-       0,     0,     0,   806,   807,     0,     0,     0,     0,     0,
+     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
+     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      93,     0,     0,     0,   968,     0,     0,     0,     0,     0,
+       0,     0,     0,  1257,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   808,   809,   810,   811,     0,    93,     0,     0,     0,
+       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   969,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
-       0,     0,     0,     0,     0,     0,   813,   814,     0,     0,
-       0,     0,     1,     0,     0,     0,     0,     0,     0,   106,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   106,
      107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,     4,     5,   198,     7,     8,     9,    10,
+     117,   118,   119,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     1,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  1687,     4,     5,   197,     7,     8,     9,    10,
       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
@@ -4670,338 +4627,264 @@ static const yytype_int16 yytable[] =
       60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
        0,    65,    66,    67,    68,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   792,     0,     0,     0,     0,
-     793,     0,     0,     0,  1189,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   795,     0,     0,     0,     0,     0,
-     796,     0,     0,     0,     0,   797,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   789,     0,     0,     0,     0,
+     790,     0,     0,     0,   791,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   792,     0,     0,     0,     0,     0,
+     793,     0,     0,     0,     0,   794,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   798,     0,     0,     0,     0,     0,     0,     0,   799,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   800,
-       0,     0,     0,     0,     0,     0,     0,   801,     0,     0,
+       0,   795,     0,     0,     0,     0,     0,     0,     0,   796,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   797,
+       0,     0,     0,     0,     0,     0,     0,   798,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1190,   803,   804,  1191,     0,     0,     0,     0,   806,   807,
+     799,   800,   801,   802,     0,     0,     0,     0,   803,   804,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   808,   809,   810,   811,
+       0,     0,     0,     0,     0,     0,   805,   806,   807,   808,
        0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
-       0,   813,   814,     0,     0,     0,     0,     0,     0,     0,
+       0,   810,   811,     0,     0,     0,     0,     1,     0,     0,
        0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,     1,     0,
+     112,   113,   114,   115,   116,   117,   118,   119,     4,     5,
+     197,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,     0,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+       0,     0,     0,     0,     0,     0,    65,    66,    67,    68,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     3,     0,     0,     0,     0,     0,     0,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     789,     0,     0,     0,     0,   790,     0,     0,     0,  1186,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   792,
+       0,     0,     0,     0,     0,   793,     0,     0,     0,     0,
+     794,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   795,     0,     0,     0,
+       0,     0,     0,     0,   796,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   797,     0,     0,     0,     0,     0,
+       0,     0,   798,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     1,
-     695,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    76,
-       4,     5,   198,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,     0,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,     0,     0,     0,     0,     0,     0,    65,    66,
-      67,    68,     0,     0,     0,     0,     0,   696,     0,     0,
-       0,     0,     0,     0,     0,   697,   698,   699,   700,   701,
-       0,     0,     0,     0,     0,     0,     0,     0,   295,     0,
+       0,     0,     0,     0,     0,  1187,   800,   801,  1188,     0,
+       0,     0,     0,   803,   804,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   296,     0,     0,     0,     0,     0,    93,     0,    94,
-      95,     0,     0,     0,     0,     0,     0,    96,    97,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     1,   102,     0,     0,   103,   104,   105,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     4,     5,   198,     7,     8,     9,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   805,   806,   807,   808,     0,    93,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
+       0,     0,     0,     0,     0,     0,   810,   811,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,     1,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     3,     0,     0,
+       0,     0,     0,     0,     4,     5,   197,     7,     8,     9,
       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,     0,     0,    93,     0,
+      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
        0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   258,     0,     0,     0,     0,
-       0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   259,     0,
-       0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
-       0,   260,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   261,
-       0,   262,     0,     0,     0,     0,   263,     0,     1,     0,
-       0,     0,     0,     0,     0,   264,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   265,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     1,   693,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    76,     4,     5,   197,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+       0,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,     0,     0,     0,
+       0,     0,     0,    65,    66,    67,    68,     0,     0,     0,
+       0,     0,   694,     0,     0,     0,     0,     0,     0,     0,
+     695,   696,   697,   698,   699,     0,     0,     0,     0,     0,
+       0,     0,     0,   293,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   294,     0,     0,     0,
+       0,     0,    93,     0,    94,    95,     0,     0,     0,     0,
+       0,     0,    96,    97,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     1,   102,
+       0,     0,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     4,
+       5,   197,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,   266,   267,     0,     0,     0,     0,    65,    66,    67,
+      64,     0,     0,    93,     0,     0,     0,    65,    66,    67,
       68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     313,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+     257,     0,     0,     0,     0,     0,   100,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   259,     0,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
-       0,     0,     0,     0,     0,     0,   260,     0,     0,     0,
+       0,     0,     0,   258,     0,     0,   106,   107,   108,   109,
+     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
+       0,     0,     0,     0,     0,     0,   259,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   261,     0,   262,     0,     0,     0,
-       0,   263,     0,     1,     0,     0,     0,     0,     0,     0,
-     264,     0,     0,     0,     0,     0,     0,   321,     0,     0,
-       0,     0,     0,   314,     4,     5,   198,     7,     8,     9,
+       0,     0,     0,     0,   260,     0,   261,     0,     0,     0,
+       0,   262,     0,     1,     0,     0,     0,     0,     0,     0,
+     263,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   264,     4,     5,   197,     7,     8,     9,
       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,   315,   316,     0,     0,
+      59,    60,    61,    62,    63,    64,   265,   266,     0,     0,
        0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,   322,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   311,     0,     0,     0,     0,
+     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   258,     0,
      106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
      116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   323,     0,     0,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
+       0,   259,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   260,
+       0,   261,     0,     0,     0,     0,   262,     0,     1,     0,
+       0,     0,     0,     0,     0,   263,     0,     0,     0,     0,
+       0,     0,   319,     0,     0,     0,     0,     0,   312,     4,
+       5,   197,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     0,     0,     0,     0,     0,   324,    65,    66,    67,
-      68,     0,    93,     0,     0,     0,     0,     0,   325,     0,
-       0,     0,   326,   327,     0,     0,     0,     0,     0,     0,
-       0,  1422,     0,     0,     0,     0,     0,     0,     0,     0,
+      64,   313,   314,     0,     0,     0,     0,    65,    66,    67,
+      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   328,
+     320,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
      111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     1,     0,     0,     0,     0,  1090,  1091,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    93,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
-      65,    66,    67,    68,     0,     0,  1423,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,  1092,     0,
        0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     4,     5,   198,     7,     8,     9,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   321,     0,     0,     4,     5,   197,     7,     8,     9,
       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
-       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   322,    65,    66,    67,    68,     0,    93,     0,     0,
+       0,     0,     0,   323,     0,     0,     0,   324,   325,     0,
+       0,     0,     0,     0,     0,     0,  1419,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   296,     0,     0,     0,     0,     0,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      96,    97,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,   287,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   288,     0,     0,     0,     0,     0,
-       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
-       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
-     111,   289,   113,   114,   115,   116,   117,   118,   119,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     1,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,   504,     0,     0,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
-      65,    66,    67,    68,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   505,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     1,   981,     0,     0,     0,     0,   892,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   982,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    93,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,     0,     0,   893,     0,     0,     0,
-      65,    66,    67,    68,     0,     0,     0,     0,     0,     0,
      100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   326,     0,     0,     0,     0,     0,
      106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
      116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     1,     0,     0,     0,
-       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     4,     5,   198,
+       0,  1087,  1088,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     4,     5,   197,
        7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
+      47,    48,    93,    49,    50,    51,    52,    53,    54,    55,
       56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
-       0,     0,     0,     0,     0,    65,    66,    67,    68,     1,
+       0,     0,     0,     0,     0,    65,    66,    67,    68,     0,
+       0,  1420,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,  1089,     0,     0,     0,     0,     1,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     4,
+       5,   197,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
+      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,  1588,     0,     0,     0,     0,
-       4,     5,   198,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,     0,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,     1,     0,     0,     0,     0,     0,    65,    66,
-      67,    68,     0,   758,     0,     0,     0,  1689,     0,     0,
-       0,     0,     0,     4,     5,   198,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
-       0,    65,    66,    67,    68,    93,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   100,  1970,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   544,     0,     0,     0,     0,     0,   106,   107,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   294,
+       0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    96,    97,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
+       0,   286,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   106,   107,
      108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
      118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
-    1971,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   287,
+       0,     0,     0,     0,     0,     0,     0,    93,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     1,     0,     0,
-       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,     4,     5,
-     198,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,     0,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-       1,     0,     0,     0,     0,     0,    65,    66,    67,    68,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     4,     5,   198,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,     1,     0,     0,     0,     0,     0,    65,
-      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     4,     5,   198,     7,     8,     9,
+     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
+     106,   107,   108,   109,   110,   111,   288,   113,   114,   115,
+     116,   117,   118,   119,     4,     5,   197,     7,     8,     9,
       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
       20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
+      59,    60,    61,    62,    63,    64,     1,     0,     0,     0,
        0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
+       0,   502,     0,     0,     0,     0,     0,     4,     5,   197,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
+       0,     0,     0,     0,     0,    65,    66,    67,    68,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   503,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     1,   978,     0,     0,
+       0,     0,   889,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   979,     0,     0,     0,     4,     5,   197,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    93,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
+       0,   890,     0,     0,     0,    65,    66,    67,    68,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
+       0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   291,     0,   440,     0,     0,     0,     0,     0,   106,
-     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   431,     0,     0,     0,     0,     0,    93,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     1,     0,
-       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     1,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     1,     0,     0,     0,     0,     0,     0,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,     4,     5,   197,     7,     8,     9,    10,    11,
       12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
       22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
@@ -5010,27 +4893,27 @@ static const yytype_int16 yytable[] =
       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
       65,    66,    67,    68,     1,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     370,     0,     0,     0,     0,     4,     5,   198,     7,     8,
+    1584,     0,     0,     0,     0,     4,     5,   197,     7,     8,
        9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
       19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
       39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
        0,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,     0,     0,     0,
-       0,   455,     0,    65,    66,    67,    68,    93,     0,     0,
+      58,    59,    60,    61,    62,    63,    64,     1,     0,     0,
+       0,     0,     0,    65,    66,    67,    68,     0,   755,     0,
+       0,     0,  1685,     0,     0,     0,     0,     0,     4,     5,
+     197,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,     0,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+       0,     0,     0,     0,     0,     0,    65,    66,    67,    68,
+      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   100,  1967,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   541,     0,     0,
        0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
      113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
@@ -5039,157 +4922,231 @@ static const yytype_int16 yytable[] =
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,   100,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     1,
-     544,     0,     0,     0,     0,     0,   106,   107,   108,   109,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   106,   107,   108,   109,
      110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-       4,     5,   198,     7,     8,     9,    10,    11,    12,    13,
-      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,     0,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,     1,     0,     0,     0,     0,     0,    65,    66,
-      67,    68,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     4,     5,   198,     7,     8,     9,    10,
+       0,     0,     0,     0,     0,  1968,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     1,     0,     0,     0,     0,     0,     0,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,     4,     5,   197,     7,     8,     9,    10,
       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
       41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
-       0,    65,    66,    67,    68,   261,     0,     0,     0,     0,
-       1,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,  1382,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     4,     5,   198,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,  1507,    41,    42,
-      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,     0,     0,     0,     0,     0,    93,    65,
-      66,    67,    68,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    93,     0,  1508,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    93,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     1,     0,     0,     0,     0,
-       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
-     114,   115,   116,   117,   118,   119,     4,     5,   198,     7,
+      60,    61,    62,    63,    64,     1,     0,     0,     0,     0,
+       0,    65,    66,    67,    68,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     4,     5,   197,     7,
        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
-       0,     0,     0,     0,    65,    66,    67,    68,     1,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,  1588,     0,     0,     0,     0,     4,
-       5,   198,     7,     8,     9,    10,    11,    12,    13,    14,
+      57,    58,    59,    60,    61,    62,    63,    64,     1,     0,
+       0,     0,     0,     0,    65,    66,    67,    68,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     4,
+       5,   197,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,     0,    49,    50,    51,    52,    53,
       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,     1,     0,     0,     0,     0,     0,    65,    66,    67,
-      68,     0,     0,     0,     0,     0,  1689,     0,     0,     0,
-       0,     0,     4,     5,   198,     7,     8,     9,    10,    11,
-      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
-      65,    66,    67,    68,    93,     0,     0,     0,     0,     0,
+      64,     0,     0,     0,     0,     0,     0,    65,    66,    67,
+      68,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   290,     0,   438,     0,
+       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   115,   116,   117,   118,   119,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   429,     0,
+       0,     0,     0,     0,    93,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1754,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,   106,   107,   108,
      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,    93,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      100,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     1,     0,     0,     0,     0,     0,     0,
      106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
-     116,   117,   118,   119,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     1,     0,     0,     0,
-       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,     4,     5,   198,
+     116,   117,   118,   119,     4,     5,   197,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,     1,     0,     0,     0,
+       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     4,     5,   197,
        7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
       47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,     1,
-       0,     0,     0,     0,     0,    65,    66,    67,    68,     0,
-       0,     0,     0,     0,  1866,     0,     0,     0,     0,     0,
-       4,     5,   198,     7,     8,     9,    10,    11,    12,    13,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
+       0,     0,     0,     0,     0,    65,    66,    67,    68,     1,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   368,     0,     0,     0,     0,
+       4,     5,   197,     7,     8,     9,    10,    11,    12,    13,
       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
       24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
       44,    45,    46,    47,    48,     0,    49,    50,    51,    52,
       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,     1,     0,     0,     0,     0,     0,    65,    66,
-      67,    68,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     4,     5,   198,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
-       0,    65,    66,    67,    68,     0,     0,     0,     0,     0,
+      63,    64,     0,     0,     0,     0,   453,     0,    65,    66,
+      67,    68,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-    1393,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,   106,   107,
      108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
      118,   119,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,    93,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,   100,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     1,   541,     0,     0,     0,     0,
        0,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119,     0,     0,     0,     0,     0,
+     115,   116,   117,   118,   119,     4,     5,   197,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+       0,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,     1,     0,     0,
+       0,     0,     0,    65,    66,    67,    68,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     4,     5,
+     197,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,     0,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+       0,     0,     0,     0,     0,     0,    65,    66,    67,    68,
+     260,     0,     0,     0,     0,     1,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,  1379,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     4,     5,   197,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,  1503,    41,    42,    43,    44,    45,    46,    47,
+      48,     0,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
+       0,     0,     0,    93,    65,    66,    67,    68,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   100,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     1,     0,     0,
-       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
-     112,   113,   114,   115,   116,   117,   118,   119,     4,     5,
-     198,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+       0,     0,     0,     0,     0,     0,   106,   107,   108,   109,
+     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    93,     0,  1504,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    93,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   100,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       1,     0,     0,     0,     0,     0,     0,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
+     119,     4,     5,   197,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,     0,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,     0,     0,     0,     0,     0,     0,    65,
+      66,    67,    68,     1,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,  1584,
+       0,     0,     0,     0,     4,     5,   197,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,     1,     0,     0,     0,
+       0,     0,    65,    66,    67,    68,     0,     0,     0,     0,
+       0,  1685,     0,     0,     0,     0,     0,     4,     5,   197,
+       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
+      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,     0,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
+       0,     0,     0,     0,     0,    65,    66,    67,    68,    93,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1750,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   100,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   115,   116,   117,   118,   119,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    93,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   100,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    93,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   100,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     1,     0,     0,     0,     0,     0,     0,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,   115,   116,   117,
+     118,   119,     4,     5,   197,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,     0,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,     1,     0,     0,     0,     0,     0,
+      65,    66,    67,    68,     0,     0,     0,     0,     0,  1862,
+       0,     0,     0,     0,     0,     4,     5,   197,     7,     8,
+       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+      19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+       0,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,     1,     0,     0,
+       0,     0,     0,    65,    66,    67,    68,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     4,     5,
+     197,     7,     8,     9,    10,    11,    12,    13,    14,    15,
       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
@@ -5197,8 +5154,37 @@ static const yytype_int16 yytable[] =
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
        0,     0,     0,     0,     0,     0,    65,    66,    67,    68,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      93,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,  1390,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   100,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    93,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   100,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   106,   107,   108,   109,
+     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     1,     0,     0,     0,     0,     0,     0,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,     4,     5,   197,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
+       0,    65,    66,    67,    68,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
@@ -5213,408 +5199,448 @@ static const yytype_int16 yytable[] =
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    93,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   100,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   106,
-     107,   108,   109,   110,   111,   289,   113,   114,   115,   116,
-     117,   118,   119
+       0,    93,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   100,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   106,   107,   108,   109,   110,   111,
+     288,   113,   114,   115,   116,   117,   118,   119
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,     0,     0,     0,   202,   294,   384,   202,     0,   610,
-       2,    81,   286,   509,   694,   909,     0,   687,   664,   687,
-    1024,   399,  1026,  1196,   461,  1499,  1139,   202,  1186,  1215,
-       0,   574,   619,   223,  1597,   426,   520,   717,  1847,   229,
-     230,   922,  1331,   630,   263,   264,   437,  1829,  1497,   239,
-    1656,   691,  1136,   821,   570,   550,   572,   552,  1847,     3,
-    1237,  1729,  1239,     3,     0,    90,  1607,    62,  1516,     0,
-      95,  1617,  1635,   508,     7,     0,  1845,  1016,     0,   726,
-    1554,  1708,    82,    75,   354,    62,   552,   101,    80,    81,
-      82,     0,   971,   972,     4,     7,     4,   101,    90,    91,
-     108,   108,    94,    95,   108,   350,    98,   485,   101,   306,
-     149,   595,    82,   357,   101,   108,    92,   149,   550,   400,
-     552,    25,   102,   103,    84,   104,   105,   101,   731,   115,
-     733,    35,   115,   506,   115,   102,   107,   102,   102,   195,
-     193,   238,    91,    27,    97,    98,    99,   100,   166,   471,
-     120,   109,   110,   111,   112,   113,   213,   251,  1531,   202,
-     200,   156,   204,    89,     2,   222,    70,  2129,   438,  1207,
-     201,   241,   203,   251,    78,   181,   611,   166,   201,   156,
-     201,  2313,   379,    87,  1579,   242,   201,  1300,   245,    30,
-     367,   248,  2324,  1231,   371,   102,   367,   149,   204,   102,
-     371,   172,   106,   202,   301,   380,   104,   105,   586,   279,
-     104,   105,   204,   604,   206,   124,   208,   104,   105,   104,
-     105,   213,   106,   707,   104,   105,   104,   105,   220,   419,
-     222,   223,   275,  1606,   172,   509,   228,   229,   230,   429,
-     631,   233,   234,   235,   196,   301,    87,   239,   243,   241,
-     242,   243,  2384,   245,   246,   247,   248,   249,   250,   251,
-     252,   250,   254,   255,   256,   257,   243,   368,   310,   764,
-     211,   212,     3,   182,   368,   545,   771,   820,   204,   822,
-     775,   104,   105,   275,   528,   529,   530,   279,   532,   533,
-     368,   535,   310,   537,   265,   108,   288,   781,   764,   291,
-     292,  1478,    98,   548,   100,   771,   551,   482,   553,   775,
-     296,   689,   593,   296,   306,   296,   308,   370,    98,    99,
-     100,   591,  1885,   109,   110,   111,   112,   113,   650,   305,
-     370,   370,   764,   817,   578,  1216,   923,   380,   370,   771,
-    2129,   714,  1110,   775,   297,   305,  2308,   370,   373,   370,
-     310,   289,  1747,   320,  1960,   370,   348,  1296,   372,   843,
-    1006,   353,   354,   355,   372,   372,   202,   337,   372,  1248,
-    1017,  1310,   313,  2221,   369,    24,   200,  2146,   253,   372,
-      24,   373,  1671,   440,  1925,   372,  1932,   379,   368,   293,
-     369,   371,   369,   588,   368,   233,   234,   235,   468,   309,
-     310,   368,   310,   368,   371,   602,   371,   371,   583,   247,
-     684,   249,   250,   251,   252,   373,   254,   255,   256,   257,
-     412,  1870,  1871,   246,  2051,    69,   330,   419,   368,   373,
-     704,   367,   163,   703,  1620,   368,   367,   429,   430,   482,
-     497,   466,   367,  2111,   436,   367,   438,   251,   440,  1052,
-    1053,   721,    24,   291,   446,   525,   368,   185,   367,   186,
-     517,   368,   454,   900,   371,   368,   186,   983,   371,   461,
-     308,   369,   136,   465,   466,   369,   468,   368,   470,   471,
-       7,   149,   369,   142,   369,   186,     7,  1673,   480,   369,
-     186,   369,   484,   763,  2303,   137,   164,   224,   523,   186,
-      91,   297,   937,  2312,   778,   497,   498,  1684,   157,    12,
-      13,  1392,   504,   157,  2303,  2363,   508,   297,   510,  2308,
-    1604,   470,    45,  2312,    47,   517,   186,   169,   520,   774,
-     522,   523,  2095,   525,   526,   199,  1540,   224,    60,  1987,
-     583,  1989,   732,   192,  1992,   369,   370,  1031,   192,   140,
-      62,   543,   196,   545,   198,   129,   369,   370,  1101,   372,
-     106,  1104,  1105,   555,   224,   178,   370,   202,  1063,   196,
-    1005,   563,   231,   172,   412,   302,    62,   526,   635,    62,
-     308,   251,   302,   853,   111,   157,   250,   373,  1023,  1024,
-     111,  1026,   430,  1361,   116,  1196,   588,  1063,  1366,   591,
-    2206,   302,  1118,   595,   596,   849,   302,  2389,   446,   601,
-     602,  1251,   582,   583,   606,   302,   454,   609,   186,   611,
-     192,   289,  1059,   185,   109,   110,   111,   112,   113,   242,
-    2419,  1063,   624,   625,   208,  1821,   198,   264,   251,  1825,
-     610,   368,   302,   635,   156,   637,  1130,   822,   368,   641,
-     138,   708,  2238,   850,   851,   647,   224,   160,   650,  1845,
-     109,   110,   111,   112,   113,  1851,   265,   368,  2457,   661,
-     156,   115,   368,   156,  1787,   865,     4,   874,   735,  1968,
-       4,   368,   178,     4,    40,    41,    42,    43,   109,   110,
-     111,   112,   113,    49,   186,    51,   140,  1134,  1241,   691,
-     370,   124,   899,   121,   696,   543,   106,   195,   368,   118,
-      66,   703,   258,   259,   260,   707,   708,  2325,  2326,   124,
-     109,   110,   111,   112,   113,     4,  1494,  2313,   947,   721,
-     139,   243,   185,   725,   302,   240,  1171,   729,  2324,  1009,
-     732,    65,   196,   735,   162,   198,   242,   120,  1183,   228,
-     106,   109,   110,   111,   112,   113,    24,   243,   250,   182,
-     243,   465,   754,   109,   110,   111,   112,   113,   606,   169,
-    1883,   763,   969,   970,   368,  2338,  1657,   371,   222,   822,
-    1938,  1265,   187,   156,  1054,   777,   624,   625,   780,   781,
-     295,   783,    60,   211,  2303,   168,   766,   228,  2384,  2385,
-     368,    69,  2311,   641,   109,   110,   111,   112,   113,   647,
-     166,  1984,   178,  1459,  1205,   367,  2290,  2425,   522,   371,
-     109,   110,   111,   112,   113,   817,   192,    24,   106,   107,
-     873,   109,   110,   111,   112,   113,     4,     5,     6,     7,
-       8,     9,   120,   264,    12,    13,     4,  2455,  2456,   142,
-      18,   843,  1439,   691,   136,   371,   372,  1127,   850,   851,
-    1973,   853,    59,   186,  1868,   109,   110,   111,   112,   113,
-     862,   317,  1415,   865,   197,   845,   242,   368,   156,    33,
-      34,   873,   874,   137,   876,   370,   164,  1768,  1769,   157,
-     168,   729,   368,   885,   886,   887,   150,   151,   254,   368,
-     892,   893,    33,    34,     0,    36,   142,   899,   900,  1579,
-     178,  1579,    33,    34,   102,  1809,   754,   199,    72,   367,
-     369,   370,   914,    24,   192,    93,  1101,    64,   196,   921,
-     198,  1935,  1127,     7,    88,     9,  2049,   929,   231,   232,
-     367,   234,  1139,   935,   371,   937,   938,   939,   940,   941,
-      16,    88,   944,    90,   310,  1498,   368,    88,    59,   371,
-    2146,   109,   110,   111,   112,   113,    67,    88,   250,   251,
-     238,  1406,   368,   241,   242,   371,    26,   969,   970,   971,
-     972,   370,  1419,    33,    34,   977,    36,   368,   972,   938,
-     939,   940,   941,   371,  1191,   231,   232,   134,   234,   991,
-     138,   169,   972,    26,    41,   273,   109,   110,   111,   112,
-     113,   369,   370,  1005,     7,  2128,     9,  1009,  1453,  1011,
-      12,    13,  1014,   161,   370,  1295,  1018,  1297,   196,   369,
-     370,  1023,  1024,   301,  1026,  1027,   176,   368,    88,  1031,
-     371,  1033,  1034,  1035,  1036,  2218,   169,   885,   886,   317,
-     109,   110,   111,   112,   113,   893,   198,   195,  1101,   327,
-     328,  1707,  1054,  1333,     3,   370,     7,  1059,     9,   106,
-     109,   110,   111,   112,   113,   317,  1068,  1747,  1070,  1747,
-     369,   157,   250,   921,  1033,  1034,  1035,  1036,   238,   126,
-    1060,   369,   370,   109,   110,   111,   112,   113,    33,    34,
-     137,    36,    26,  1300,  1539,  1540,   163,   368,   177,   277,
-     371,  1381,   109,   110,   111,   112,   113,  2303,   109,   110,
-     111,   112,   113,   367,    69,  1369,   172,    72,  2301,    74,
-     368,  1101,   169,   971,   972,  1127,   172,    72,  1130,   176,
-     368,  1133,  1134,   371,   181,   369,   370,  1139,   109,   110,
-     111,   112,   113,    88,  1443,   172,  2160,   194,   215,   216,
-     367,   172,  1154,   370,   201,  1661,   109,   110,   111,   112,
-     113,   109,   110,   111,   112,   113,   370,  1169,   334,  1171,
-     298,   337,   338,   247,  1176,   153,   247,   251,   332,  1626,
-     251,  1183,  1627,  1628,   109,   110,   111,   112,   113,  1191,
-     109,   110,   111,   112,   113,    41,   187,  1404,  1200,  1201,
-     371,   109,   110,   111,   112,   113,   280,   369,   370,   280,
-      19,   369,    21,    22,     4,  1217,  1196,  1873,  1220,   109,
-     110,   111,   112,   113,   110,   111,   112,   113,  1230,   109,
-     110,   111,   112,   113,   281,   109,   110,   111,   112,   113,
-     109,   110,   111,   112,   113,    91,  1248,   369,   370,  1251,
-     235,   236,   237,  1806,  1248,    46,   369,    48,  1260,   306,
-     106,   104,   105,  1265,   311,    46,   138,    48,  1248,   127,
-     128,   318,  1962,   368,  1276,   109,   110,   111,   112,   113,
-     138,   112,   113,     4,     5,     6,     7,   145,     9,   161,
-     127,   128,  1294,  1295,   140,  1297,     3,    18,  1300,   153,
-     369,   138,     3,   161,   335,   336,  1586,  1587,   145,   181,
-    1863,  1591,   158,   368,   186,   173,   369,   370,  1572,  1225,
-     369,  1227,   177,   195,   161,   183,   369,   370,   186,   369,
-     370,  1333,   369,   370,   369,   370,   173,   195,    81,    82,
-      41,   369,   370,   369,   369,   370,   183,   172,   194,   186,
-     369,   370,  1200,   109,   110,   111,   112,   113,   195,   172,
-     206,   207,   369,   368,   210,   369,   370,   201,   369,   172,
-    1815,   369,   370,  1984,    31,    32,   368,  1661,   247,  1381,
-     172,  1383,   369,   370,     3,     4,  1591,   143,   368,   110,
-     111,   368,   250,  1838,   369,   370,    97,     3,   369,   100,
-    1248,   368,  1404,  1251,  1406,  1407,  1686,  1687,   329,   330,
-     368,   280,  1906,  1907,  1494,   116,   369,  1419,   126,   369,
-     370,   369,   368,  1868,    38,    39,     4,     5,     6,     7,
-       8,     9,   109,   110,   111,   112,   113,   369,   370,   147,
-      18,   368,  1444,    91,   369,   153,   368,  1427,   169,   266,
-     369,  1453,   369,   370,   369,   370,   157,   369,   159,   196,
-    1462,   369,   163,   369,   370,    99,  1468,  1674,   176,   369,
-     370,   370,  1752,  1753,   369,   370,   131,   368,   126,   369,
-    1927,   129,   371,   138,  1486,   171,   194,   142,   372,   369,
-    1935,   368,  1494,   368,   250,   369,   176,   152,   368,   147,
-     201,    91,   368,   204,   371,   153,   369,   370,   366,   367,
-     369,   370,   369,   370,  1516,    93,   217,   218,    15,   371,
-     221,   371,   223,   371,   372,    94,    95,   371,   176,   366,
-     369,   370,   187,   369,   370,   368,   126,  1539,  1540,   129,
-     368,  2035,  2036,   369,   370,   208,   194,   116,   369,   370,
-     369,   370,   121,   371,   255,   371,   125,   147,    77,    78,
-     208,    15,   165,   153,   369,   370,   135,   256,   257,   246,
-     369,   370,   141,   369,   370,   230,   231,   146,   371,   372,
-    1787,  1583,   369,   370,  1586,  1587,   176,  2140,  2141,  1591,
-     172,   169,  2039,   162,   369,   370,  1444,   371,   282,   283,
-     284,   170,   286,   287,   194,  1607,   371,  2218,   263,   369,
-     370,   180,   109,   110,   111,   112,   113,   371,   208,   188,
-     369,   370,   369,   370,  1626,  1627,  1628,  1627,  1628,    24,
-     371,  1911,  2138,  1253,  1254,   371,  1638,   371,  2083,   371,
-     371,  1643,   211,   212,   213,   214,    41,   371,   371,   157,
-     219,   220,   371,  1655,  1656,   109,   110,   111,   112,   113,
-    1662,   137,  1847,   250,     4,    96,   149,   109,   110,   111,
-     112,   113,  1674,   101,    69,    91,  1883,   149,  1680,   200,
-     124,  1881,   172,   371,  1686,  1687,  1688,  1689,   124,  1691,
-    2301,  1693,     4,    96,  1993,   201,    91,   193,   267,   268,
-     269,   270,    73,    74,    75,    76,  1911,    78,    79,    80,
-     126,   106,    83,   129,     4,  2160,   369,    73,    74,    75,
-      76,   163,    78,    79,    80,   371,   368,    83,   157,     4,
-     149,   147,   301,   371,   370,  1583,   108,   153,   371,   368,
-     108,   333,  2295,   312,   313,   140,   101,   101,   174,   192,
-    1752,  1753,   108,   370,  2307,   109,   110,   111,   112,   113,
-     176,   371,   172,   158,     4,    16,  1973,     3,    96,   106,
-     107,   149,   109,   110,   111,   112,   113,    97,   194,   296,
-     123,   137,   370,   120,   370,  1787,   369,   371,   368,   370,
-    1638,   370,   208,   369,  1847,  1643,   368,   192,   368,   194,
-     165,   196,   156,   369,   109,   110,   111,   112,   113,   372,
-     101,   206,   207,  1815,   209,   210,   254,    87,   101,   156,
-    1822,   172,   368,   153,   171,  1878,   172,   164,   101,   174,
-    1832,   168,   101,   371,   138,   193,  1838,  1847,  1847,  1841,
-     193,   193,  2049,  1691,   116,  1847,     3,     3,   204,   121,
-    1852,   156,   193,   125,  2138,   368,    52,    53,    54,    55,
-      56,    57,    58,   135,  1866,    61,  1868,  1869,    38,   141,
-     368,     7,     7,   200,   146,    71,  1878,   251,   315,  1881,
-     368,  1883,    52,    53,    54,    55,    56,    57,    58,   371,
-     162,    61,   107,     4,   368,   149,  2343,   149,   170,   369,
-     149,    71,   101,   149,  1906,  1907,   370,   370,   180,  1911,
-     109,   110,   111,   112,   113,  1995,   188,   369,   369,   369,
-     369,  2128,   369,  1925,   149,  1927,   123,   528,   529,   530,
-    2318,   532,   533,  1935,   535,   369,   537,   369,   368,   211,
-     212,   213,   214,   251,  2129,   368,   368,   219,   220,   175,
-     109,   110,   111,   112,   113,   368,   368,  1959,  1960,   118,
-     368,  1963,  2409,   368,  1966,   369,   368,   368,   282,   283,
-     284,  1973,   286,   287,   288,   368,   290,   368,   368,   371,
-     139,   370,   368,   368,  1832,  1987,  1996,  1989,  1990,   369,
-    1992,   368,  1994,  1995,  1996,   267,   268,   269,   270,   149,
-      59,   105,   371,   101,  1984,   109,   110,   111,   112,   113,
-     109,   110,   111,   112,   113,   254,  1996,   339,   340,   341,
-     342,   343,   344,   345,   346,   347,   348,   349,   350,   351,
-    2238,   172,   371,  2035,  2036,   368,   371,  2039,   105,   368,
-     312,   313,   109,   110,   111,   112,   113,  2049,   149,   370,
-     367,     4,     4,  2238,   372,  2108,    73,    74,    75,    76,
-     371,    78,    79,    80,   282,   283,   284,   368,   286,   287,
-     288,   171,    68,   371,     7,   251,  2129,   300,   370,   153,
-      23,  2083,   368,   371,   369,    26,   334,   371,    26,    35,
-     307,   251,     3,   251,    91,   369,   251,   251,   251,  2101,
-    2102,   320,   251,   251,     7,  2313,     7,     7,     7,     7,
-       7,     7,     7,     7,     7,     7,  2324,  2119,  2303,  2129,
-    2129,  2129,   369,  2308,  2126,   368,  2128,  2312,  2313,   204,
-       4,   369,   369,   368,  2136,   369,   310,     4,   101,  2324,
-      96,   368,    44,   165,   368,   165,   368,   368,   368,  2129,
-       3,     3,   368,    44,   367,   200,   325,   201,  2160,   368,
-     371,   174,   201,   371,     7,   369,   369,   251,   369,   369,
-     285,   290,   123,   155,     7,   209,  2384,  2385,    97,     4,
-     144,   106,   171,   371,   101,  2238,   370,   370,   209,   369,
-     369,   105,   370,   169,   369,   311,   369,   369,   369,  2384,
-    2385,   369,   369,   369,  2206,   369,   369,   369,   196,   149,
-     371,    59,   166,    91,     7,     7,   368,  2227,   201,   107,
-     371,   368,  2224,  2225,  2226,  2227,   371,   369,   372,   369,
-     368,   368,    97,     3,  2419,   368,     4,   371,  2218,   370,
-     326,  2294,    96,   107,   152,   371,   368,  2227,     7,   370,
-    2303,   371,   369,   371,   368,  2308,   369,    22,   165,  2312,
-    2313,   369,    38,   286,    38,    38,    38,   172,   218,    40,
-      37,  2324,  2457,     3,   368,   165,   251,   251,   251,     7,
-     169,     7,   143,   371,   369,   106,     7,     4,   311,  2291,
-    2292,   108,   101,  2303,  2303,  2303,  2303,     4,  2308,  2308,
-    2308,    25,  2312,  2312,   368,   250,   369,   369,   369,   369,
-     169,   306,   335,   336,   368,   165,   185,   368,   123,   126,
-     155,  2301,     7,   239,   179,   310,   368,   174,   371,   144,
-     353,  2384,  2385,   368,   357,   368,    96,    89,    86,  2341,
-    2342,  2343,   254,   137,    35,    44,    44,   169,   172,     4,
-       4,  2361,   375,    59,   369,   369,   368,   380,   368,  2361,
-     186,    63,   373,     4,    87,   368,  2419,    28,   370,   201,
-     368,   174,   371,     4,   368,   368,   101,   307,   370,    59,
-     367,   101,   368,    50,   368,   169,     4,   101,   369,   368,
-     370,   369,    29,   251,   251,   106,   101,   101,   181,   371,
-       4,   165,   201,   172,  2457,   123,     7,  2409,  2410,  2419,
-    2419,  2419,   370,   101,   101,   370,     4,   244,   149,   368,
-     368,   148,     3,   172,   368,    27,   368,   193,   310,   368,
-     367,   367,   367,   367,    32,   367,   367,    50,     3,   368,
-     368,   368,    87,   369,    30,   369,   368,  2457,  2457,  2457,
-     371,   161,   370,   210,   477,   478,     7,   370,     4,   482,
-     370,   370,    96,   172,   134,     4,    96,   255,     3,   138,
-       7,   193,     3,     7,     4,   289,    97,   500,     7,   176,
-     303,   368,   367,   369,    96,   369,   509,   163,   369,   369,
-       4,   368,    24,   201,     4,     4,     4,   520,   369,   369,
-       7,   108,   370,   242,   166,   528,   529,   530,   531,   532,
-     533,   201,   535,   369,   537,   201,   165,   368,   304,     7,
-     156,   370,     4,   310,    78,    24,   372,    26,    77,     7,
-     370,     4,   167,     4,    33,    34,   201,   368,   250,     7,
-      24,     4,    41,     4,   247,   568,   569,   367,   367,     7,
-     573,   369,     4,   369,     4,   578,   579,   580,   369,   255,
-     583,    60,  2410,   124,  2092,  1183,   589,  2054,  2192,  1936,
-      69,  2098,   595,   237,   124,    91,     0,  1152,  1547,     0,
-       0,   931,     0,  2034,  1515,  2388,   469,  1218,   734,    88,
-    2448,     0,    91,   669,     0,     0,   679,  2385,  1005,  1196,
-    2389,  1407,  1691,   626,   627,   686,  1935,   106,  1257,  2106,
-    2208,  1574,   202,  1886,   696,   780,   684,   576,   899,   206,
-     913,  1923,   836,  1138,  2340,  1395,  2328,  2312,  2303,  2308,
-    2303,  2303,  2303,  2457,  2103,  2303,  2294,   780,  1832,  2410,
-    2297,   140,  1442,  1169,  1618,  2113,    72,  1520,  2051,  2053,
-    1535,  1213,  1454,   920,  2178,  1652,  2100,  1198,   681,   158,
-    1967,   684,    -1,    -1,    -1,   588,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   697,   698,   699,   700,   701,   178,
-      -1,   704,    -1,   706,   707,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   192,    -1,   194,    -1,   196,    -1,   198,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   206,   207,    -1,
-     209,   210,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   755,    -1,    -1,    -1,    -1,    -1,    -1,   238,
-      -1,    -1,   241,   242,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   776,    -1,   778,    -1,   780,   781,    -1,
-      -1,    -1,   785,    -1,   787,   788,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   273,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   817,    -1,    -1,    -1,    -1,   822,
-      -1,    -1,   301,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   834,   835,    -1,    -1,     3,   315,    -1,   317,    -1,
-     843,    -1,    -1,    -1,    -1,    -1,   849,    -1,   327,   328,
-      -1,    -1,    -1,    -1,    -1,   858,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
-      -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   112,    -1,   949,   950,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+       0,     0,     0,     0,   382,   201,    81,   459,     0,   285,
+       2,   607,   201,   692,     0,   684,   661,   222,  1021,   397,
+    1023,  1193,   684,   228,   229,   906,  1136,   571,  1183,    91,
+       0,  1495,   616,   238,  1212,   818,   715,  1328,   262,   263,
+     424,   919,  1825,   627,  1652,   688,   567,  1439,   569,  1133,
+     506,   435,  1843,     3,  1657,  1493,   547,  1593,   549,     3,
+    1234,     7,  1236,  1512,     0,  1725,   547,     0,   549,   304,
+       0,  1704,     0,   549,   348,  1603,  1841,  1013,     4,     2,
+       7,   723,    82,    75,     0,   108,  1550,  1613,    80,    81,
+      82,   517,   968,   969,   102,  1631,   149,   101,    90,    91,
+     149,   201,    94,    95,     4,   483,    98,   186,   102,   103,
+     101,   728,    82,   730,   212,   398,  1843,   108,   101,    90,
+      98,   101,   100,   221,    95,   108,   108,   101,   201,   102,
+     352,    84,   201,     3,  2126,    25,   104,   105,   201,   104,
+     105,   193,   377,   241,   469,    35,   244,   104,   105,   247,
+     120,   172,   608,    62,   149,   104,   105,    92,   172,   200,
+     185,   102,  2310,     7,    27,   240,   592,   355,     7,   164,
+     115,   251,   115,  2321,   274,    62,   142,     4,   504,   240,
+      70,   129,   211,   212,   102,   149,    24,  1297,    78,   102,
+     368,   247,   104,   105,    62,   251,   181,    87,   104,   105,
+     104,   105,   201,   278,   118,   583,   334,   253,   124,   337,
+     338,   203,   417,   205,   436,   207,   106,   601,   185,   204,
+     212,    59,   427,   302,   280,   139,   115,   219,   368,   221,
+     222,   198,   196,  2381,   295,   227,   228,   229,    65,   201,
+     232,   233,   234,   106,   628,  1575,   238,   156,   240,   241,
+     242,   265,   244,   245,   246,   247,   248,   249,   250,   251,
+     208,   253,   254,   255,   256,   231,   182,   111,   289,   156,
+     761,   545,   111,   817,   548,   819,   550,   768,   378,   705,
+     761,   772,   274,   308,   313,   761,   278,   768,   156,   368,
+     370,   772,   768,   163,   289,   287,   772,   370,   290,   291,
+    1474,   370,   109,   110,   111,   112,   113,   590,   686,   232,
+     233,   234,   304,  2305,   306,   378,    24,   370,   370,   297,
+     542,   370,   647,   246,  1107,   248,   249,   250,   251,   370,
+     253,   254,   255,   256,   243,  1213,   920,   525,   526,   527,
+     438,   529,   530,   200,   532,  1881,   534,   320,  1956,   372,
+     303,   296,   778,   296,   346,   308,   243,  1293,  1003,   351,
+     352,   353,   108,   371,   599,   335,   588,   290,   372,  1245,
+     305,  1307,  1014,   186,   368,   243,  1667,   371,  2143,   371,
+     480,   372,   166,   306,   310,   377,   712,   575,   814,   372,
+     372,   466,   372,  1921,   368,   368,   585,   495,   371,  2126,
+     371,   369,  1928,   293,   369,   681,   468,   296,   370,   309,
+     310,   224,   369,  1743,   840,  2048,   514,   480,   410,    24,
+     369,   178,   368,   373,   368,   417,   702,   368,  1866,  1867,
+     371,   367,  1049,  1050,   367,   427,   428,   367,  1616,   367,
+     330,   368,   434,   186,   436,   897,   438,   522,  2108,   157,
+     368,   367,   444,   371,   202,   368,   186,   369,   371,   980,
+     452,   523,   251,   369,   202,   369,   251,   459,    98,    99,
+     100,   463,   464,  2218,   466,   137,   468,   469,   934,   701,
+     580,   224,   369,   186,   192,   242,   478,   410,   238,   302,
+     482,  1669,   166,   464,   224,   185,   718,   771,   107,   775,
+       4,   369,  1527,   495,   496,   428,  1680,   169,   198,  2300,
+     502,  1389,   369,   370,   506,   507,  1600,   580,  2309,     4,
+      89,   444,   514,   106,   729,   517,   310,   519,   520,   452,
+     522,   523,  2135,  1536,   632,  1984,   251,  1986,   760,   195,
+    1989,   109,   110,   111,   112,   113,  1002,    62,   540,   520,
+     542,   301,   157,   204,  1098,   368,  2092,  1101,  1102,   302,
+     552,     4,   124,   172,  1020,  1021,   373,  1023,   560,  1060,
+      12,    13,   302,  2300,    62,  1358,   250,  1602,  2305,  1060,
+    1363,   370,  2309,   368,  1060,   228,   196,   192,   109,   110,
+     111,   112,   113,   585,  1115,  2203,   588,  1193,  1990,   302,
+     592,   593,  1028,  2386,  1056,  1248,   598,   599,   706,   579,
+     580,   603,   847,   848,   606,  2360,   608,   540,   124,   186,
+     182,   138,   186,   369,   370,   368,   372,   106,   850,   621,
+     622,   104,   105,   186,   732,   204,   871,   607,   368,  1817,
+     632,   156,   634,  1821,   161,   301,   638,   109,   110,   111,
+     112,   113,   644,   368,   264,   647,   265,   862,   846,   310,
+     224,   896,   136,  1841,  2300,   368,   658,   297,   156,  1847,
+     371,   372,  2308,  1783,  1965,   258,   259,   260,   195,  1131,
+     603,   187,    40,    41,    42,    43,   136,    91,   121,  2416,
+     169,    49,   368,    51,  1238,   371,   688,   250,   621,   622,
+     196,  1127,   694,    97,    98,    99,   100,  1490,    66,   701,
+     178,   463,  1168,   705,   706,   638,    60,   228,   160,   819,
+     944,   644,   142,    30,  1180,   199,   718,  2454,   243,   162,
+     722,   966,   967,   138,   726,   302,   140,   729,   302,   163,
+     732,   109,   110,   111,   112,   113,    12,    13,   106,   199,
+     109,   110,   111,   112,   113,   243,   819,   106,   107,   751,
+     109,   110,   111,   112,   113,   688,     4,   519,   760,  1879,
+     870,   120,   116,   246,   242,  1653,   250,   251,   211,  1934,
+      87,   115,   774,   251,  1006,   777,   778,   317,   780,   120,
+     195,   215,   216,   763,   109,   110,   111,   112,   113,  2335,
+     250,   368,   368,   726,   368,   373,   140,   156,   166,  1981,
+    1455,   231,   232,   178,   234,   164,   368,   247,  1202,   168,
+     142,   251,   814,  2287,   186,   156,   368,   192,   751,  1051,
+     109,   110,   111,   112,   113,   197,  1262,   168,     4,     5,
+       6,     7,     8,     9,     0,    64,    12,    13,   840,   370,
+     280,  1435,    18,   367,    69,   847,   848,    72,   850,    74,
+    1970,  1864,   109,   110,   111,   112,   113,   859,  1412,    88,
+     862,    90,   842,   935,   936,   937,   938,   242,   870,   871,
+      24,   873,    33,    34,   368,    36,  1764,  1765,   222,   102,
+     882,   883,   884,    24,  2322,  2323,   254,   889,   890,   369,
+     370,  1136,  1124,   297,   896,   897,  1575,   369,   370,   231,
+     232,   368,   234,  1575,   371,   134,    60,    33,    34,   911,
+      36,    72,   369,   370,  1805,    69,   918,    93,  1931,   109,
+     110,   111,   112,   113,   926,  1124,  2046,    88,    69,   201,
+     932,   203,   934,   935,   936,   937,   938,  1403,   367,   941,
+    1494,   370,   310,  1188,   109,   110,   111,   112,   113,   882,
+     883,   371,    33,    34,  1416,  2143,   137,   890,  1030,  1031,
+    1032,  1033,    88,    26,   966,   967,   968,   969,   368,   150,
+     151,   371,   974,   969,   109,   110,   111,   112,   113,   110,
+     111,   112,   113,  1449,  2422,   918,   988,    16,  1098,   969,
+     247,   369,   370,   169,   109,   110,   111,   112,   113,   176,
+    1002,   370,   169,   157,  1006,  2125,  1008,    88,     3,  1011,
+     369,   370,   198,  1015,  2452,  2453,   157,   317,  1020,  1021,
+     196,  1023,  1024,   280,   178,  1098,  1028,   157,  1030,  1031,
+    1032,  1033,   126,  2215,    26,   968,   969,    24,   192,   367,
+     238,    41,   196,   371,   198,   370,   367,   172,  1703,  1051,
+     371,   192,  1297,   147,  1056,   196,   138,   198,   368,   153,
+    1292,   371,  1294,  1065,  1743,  1067,    33,    34,    26,  1535,
+    1536,  1743,    59,   177,   250,    33,    34,  1057,    36,   161,
+      67,   370,   176,     7,   238,     9,  2235,   241,   242,   109,
+     110,   111,   112,   113,    19,   368,    21,    22,  1330,   181,
+     194,   277,   369,   370,   186,    72,   106,   109,   110,   111,
+     112,   113,  2300,   195,   368,   172,  2298,   371,  1098,   273,
+     172,    88,  1124,   367,   131,  1127,   126,   371,  1130,  1131,
+      88,   138,   367,   172,  1136,   142,   371,   137,   109,   110,
+     111,   112,   113,   370,  2157,   152,  1378,   301,   298,  1151,
+     109,   110,   111,   112,   113,   153,  1401,  1623,  1624,   368,
+    1622,  2310,   371,   317,  1166,     7,  1168,     9,  1366,   169,
+     332,  1173,  2321,   327,   328,    45,   176,    47,  1180,   369,
+     187,   181,   235,   236,   237,     7,  1188,     9,   109,   110,
+     111,   112,   113,   187,   194,  1197,  1198,   368,   525,   526,
+     527,   201,   529,   530,   369,   532,    46,   534,    48,    24,
+       3,    26,  1214,  1193,  1869,  1217,   369,   370,    33,    34,
+      46,     4,    48,   230,   231,  1227,    41,   109,   110,   111,
+     112,   113,  2381,  2382,   369,   109,   110,   111,   112,   113,
+    1222,   153,  1224,  1245,   371,    60,  1248,   368,  1802,  1245,
+     104,   105,   367,   172,    69,  1257,   263,   282,   283,   284,
+    1262,   286,   287,   288,  1197,  1245,   112,   113,   335,   336,
+    1959,  1273,   177,    88,   369,   370,    91,   369,   370,   369,
+     370,   281,   109,   110,   111,   112,   113,    81,    82,  1291,
+    1292,   106,  1294,   264,   172,  1297,   109,   110,   111,   112,
+     113,   369,   370,   172,    41,  1859,   306,   369,   370,   369,
+     370,   311,  1245,   369,   370,  1248,    31,    32,   318,   109,
+     110,   111,   112,   113,   172,   140,   369,   370,  1330,   109,
+     110,   111,   112,   113,   109,   110,   111,   112,   113,   369,
+     370,   369,   370,   158,   368,  1811,   369,   370,   266,   369,
+    1582,  1583,   369,   370,    91,  1587,   109,   110,   111,   112,
+     113,     3,     4,   178,   329,   330,   369,   369,  1834,   106,
+    1568,  1657,   369,   370,     3,  1981,  1378,   192,  1380,   194,
+     368,   196,   368,   198,   368,   282,   283,   284,  1587,   286,
+     287,   206,   207,   368,   209,   210,   369,   370,  1864,  1401,
+     368,  1403,  1404,   140,   368,  1490,   368,   282,   283,   284,
+     369,   286,   287,   288,  1416,   290,   109,   110,   111,   112,
+     113,   158,   368,   238,   196,  1670,   241,   242,   109,   110,
+     111,   112,   113,   109,   110,   111,   112,   113,  1440,   109,
+     110,   111,   112,   113,  1424,    99,     3,  1449,   369,   171,
+    1682,  1683,    38,    39,   369,   370,  1458,   194,   273,   369,
+     370,  1923,  1464,   127,   128,  1931,  1902,  1903,   370,   206,
+     207,   105,   368,   210,   138,   109,   110,   111,   112,   113,
+    1482,   145,   369,   370,    41,   368,   301,   369,  1490,   368,
+     127,   128,   368,   163,   371,   369,   368,   161,   369,   370,
+     315,   138,   317,   369,   370,   369,   370,  1440,   145,   173,
+    1512,   372,   327,   328,   369,   370,  1748,  1749,   371,   183,
+     371,   372,   186,   368,   161,   176,   109,   110,   111,   112,
+     113,   195,    15,  1535,  1536,   371,   173,   371,  1783,   371,
+      97,   371,   369,   100,    15,   368,   183,    77,    78,   186,
+     371,   109,   110,   111,   112,   113,   369,   371,   195,   116,
+     143,   371,     4,     5,     6,     7,     8,     9,   369,   370,
+     246,   369,   370,   208,  2036,   371,    18,  1579,   165,   369,
+    1582,  1583,   371,  2137,  2138,  1587,   250,   369,   370,   369,
+       4,     5,     6,     7,   369,     9,  2032,  2033,   369,   370,
+     157,  1603,   159,   371,    18,   371,   163,   369,   370,  2215,
+     369,   370,   369,   370,  2080,   371,   369,   256,   257,   371,
+    1622,  1623,  1624,   369,   370,   172,   109,   110,   111,   112,
+     113,   371,  1634,   371,  1879,   369,   370,  1639,   109,   110,
+     111,   112,   113,   201,   201,   157,  1579,   204,   371,  1651,
+    1652,    93,    73,    74,    75,    76,  1658,    78,    79,    80,
+     217,   218,  1877,   137,   221,   250,   223,   250,  1670,   109,
+     110,   111,   112,   113,  1676,  1907,   369,    96,   118,     4,
+    1682,  1683,  1684,  1685,   149,  1687,   101,  1689,   369,   369,
+     370,  2157,  2298,   371,   372,   149,   110,   111,   255,   139,
+     200,  1634,   366,   367,    91,   371,  1639,   124,  1907,   109,
+     110,   111,   112,   113,   172,   116,    73,    74,    75,    76,
+     121,    78,    79,    80,   125,  1970,    83,   169,   124,   366,
+       4,   369,   370,  1843,   135,  1623,  1624,    91,  2292,   126,
+     141,    96,   129,   369,   370,   146,  1748,  1749,   369,   370,
+    2304,   108,   369,   370,  1687,   169,   156,  1250,  1251,   193,
+     147,   162,   201,     4,  1874,   371,   153,   369,   157,   170,
+    1843,   368,   126,     4,   101,   129,   149,   371,   370,   180,
+     137,  1783,   109,   110,   111,   112,   113,   188,   108,   176,
+     371,   368,   108,   147,   101,   333,   101,   174,   192,   153,
+     370,  2046,   109,   110,   111,   112,   113,   194,   371,  1811,
+     211,   212,   213,   214,   172,    16,  1818,     4,   219,   220,
+       3,   208,   176,    96,   296,   149,  1828,    97,   123,   156,
+     370,   370,  1834,  1843,  1843,  1837,   369,   368,   370,   165,
+     194,  1843,   371,   369,   368,   370,  1848,   204,   368,  2135,
+     369,   105,    94,    95,   208,   109,   110,   111,   112,   113,
+    1862,   372,  1864,  1865,   101,    24,   267,   268,   269,   270,
+     254,    87,  1874,   172,   116,  1877,   101,  1879,  2340,   121,
+    2125,   368,    41,   125,    73,    74,    75,    76,   153,    78,
+      79,    80,   171,   135,    83,  1828,   101,   101,   174,   141,
+    1902,  1903,   138,   172,   146,  1907,   193,  1992,   371,   193,
+      69,   312,   313,   109,   110,   111,   112,   113,   193,  1921,
+     162,  1923,   193,     3,     3,   368,     7,  2315,   170,  1931,
+     368,     7,    91,   251,   200,   315,   106,   107,   180,   109,
+     110,   111,   112,   113,  2406,   368,   188,   106,     4,   107,
+     120,   371,   368,  1955,  1956,   149,   369,   149,  1960,   149,
+     370,  1963,   370,   149,   369,   369,   369,   369,  1970,   211,
+     212,   213,   214,   149,   369,   123,    91,   219,   220,   369,
+     368,   140,  1984,  1993,  1986,  1987,   156,  1989,   369,  1991,
+    1992,  1993,   251,   368,   164,  2105,   368,   368,   168,   158,
+     175,  1981,   368,    52,    53,    54,    55,    56,    57,    58,
+     370,   126,    61,  1993,   129,   368,  2126,   368,   368,   368,
+     368,   368,    71,   368,   368,   267,   268,   269,   270,  2235,
+    2032,  2033,   147,   192,  2036,   194,   369,   196,   153,   371,
+     368,   371,   149,    59,  2046,   254,   369,   206,   207,    38,
+     209,   210,   371,  2126,   368,   368,   371,   101,   368,   301,
+     172,   176,   370,    52,    53,    54,    55,    56,    57,    58,
+     312,   313,    61,   367,   149,   372,     4,     4,  2080,   194,
+     171,   371,    71,   368,    68,   371,     7,   300,   251,   370,
+     153,    23,   369,   208,   334,    26,  2098,  2099,    35,   371,
+     368,    26,   251,     3,  2310,   307,   251,   371,   251,   251,
+     251,   251,   251,    91,  2116,  2321,  2126,  2126,  2126,   369,
+     320,  2123,     7,  2125,     7,  2235,     7,     7,     7,     7,
+       7,  2133,   339,   340,   341,   342,   343,   344,   345,   346,
+     347,   348,   349,   350,   351,     7,  2126,     7,     7,     7,
+     369,   368,   204,     4,   369,  2157,   310,   369,   369,     4,
+     368,   101,  2235,    96,   165,   368,   165,     3,    44,   368,
+      44,   368,     3,   368,   367,  2381,  2382,   368,   200,   325,
+     285,  2291,   201,   368,   368,     7,   174,   201,   369,   371,
+    2300,   371,   369,   251,   290,  2305,   369,   369,   285,  2309,
+    2310,  2203,   155,   123,   309,     7,   209,    97,     4,   144,
+     106,  2321,   171,   101,  2224,   371,   209,   370,   370,  2221,
+    2222,  2223,  2224,   370,   169,   369,   311,  2300,   333,   334,
+     105,   369,  2305,   369,   369,  2215,  2309,  2310,   369,   369,
+     369,   369,   369,   369,  2224,   369,   351,   369,  2321,   368,
+     355,   371,   196,   371,   371,   369,   372,   149,    59,   166,
+     368,    91,     7,   369,   368,   368,   368,     7,   373,    97,
+     371,  2381,  2382,   378,   107,   201,   370,     3,   107,     4,
+     326,    96,   152,   371,   368,     7,  2288,  2289,   371,   371,
+    2300,  2300,  2300,  2300,    22,  2305,  2305,  2305,   369,  2309,
+    2309,   370,   369,   369,   165,   218,  2416,   368,  2381,  2382,
+     165,    38,   169,     3,    38,    38,   172,    38,  2298,    37,
+      40,   368,   251,     7,     7,   143,   369,   251,   251,   371,
+     106,     7,     4,   108,   101,     4,  2338,  2339,  2340,    25,
+     368,   250,   369,  2416,  2454,   369,   369,   368,  2358,   369,
+     306,   165,   169,   185,   123,   368,  2358,   155,   126,     7,
+     179,   310,   371,   174,   368,    96,   239,   144,   368,    86,
+     475,   476,   368,    89,   137,   480,    35,    44,    44,   169,
+     172,  2454,   254,     4,     4,    59,   369,   369,   368,   368,
+      63,   186,   373,   498,     4,    87,   368,    28,   201,   370,
+     368,   368,   174,   368,  2406,  2407,  2416,  2416,  2416,   371,
+     370,     4,   517,   101,   307,    59,   367,   369,   368,   101,
+     525,   526,   527,   528,   529,   530,   368,   532,    50,   534,
+     368,   169,     4,   369,    29,   251,   370,   101,   251,   101,
+     101,   371,   181,   106,  2454,  2454,  2454,     4,   201,     7,
+     165,   370,   123,   172,   101,   101,   370,   368,     4,   244,
+     565,   566,   368,   148,   193,   570,   368,   368,   149,   368,
+     575,   576,   577,   367,  2407,   580,   367,     3,   367,   172,
+     367,   586,    27,   367,   310,   367,    50,   592,    32,     3,
+      87,    30,     7,   161,   172,     4,   210,   368,    96,   368,
+     368,   134,   369,   369,   368,    96,   371,   370,     4,   255,
+       3,   138,     7,   193,     3,   367,   370,   370,   623,   624,
+     370,   368,     7,   369,   201,   369,   369,   369,   289,     4,
+       7,    97,   303,   368,   176,    96,    24,   163,     4,     4,
+       4,     4,   369,   108,   369,     7,   370,   201,   201,   166,
+     165,   242,   304,   156,     7,     4,   368,    78,    77,   369,
+     310,   370,     7,   370,   372,     4,   167,     4,   368,     7,
+     367,   250,   247,   678,   367,     4,   681,    24,     4,     7,
+     369,     4,   369,   201,     4,   369,   124,  1180,  2089,  2051,
+     695,   696,   697,   698,   699,   255,  1932,   702,  2189,   704,
+     705,   236,   124,  2095,    91,  1149,   731,  1543,     0,     0,
+       0,   928,     0,  2031,  1215,  2385,  1511,  2445,   467,     0,
+       0,   666,   676,  1002,     0,  2382,   683,  1931,  1228,  1254,
+    1404,  1570,  1687,   481,  2103,  2205,  1882,   205,   201,   694,
+     777,   681,  1135,   777,   896,   833,  2337,   752,   910,  1919,
+    1392,   573,  2325,  2309,  2300,  2300,  2300,  2300,  2305,  2300,
+    2291,  2454,  2100,  2407,  2294,  1828,  2110,  1166,   773,  1438,
+     775,  1614,   777,   778,    72,  1516,  2050,   782,  2048,   784,
+     785,  1531,   585,  1450,   917,  2175,  2097,  1210,  1648,  1195,
+    1964,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   814,
+      -1,    -1,    -1,    -1,   819,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   831,   832,    -1,    -1,
+       3,    -1,    -1,    -1,    -1,   840,    -1,    -1,    -1,    -1,
+      -1,   846,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     855,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
+      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
+      -1,   946,   947,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     993,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  1007,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1031,    -1,
-      -1,    -1,    -1,    -1,  1037,    -1,    -1,    -1,    -1,    -1,
-      -1,  1044,  1045,    -1,    -1,    -1,    -1,  1050,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   990,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1004,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  1077,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  1097,    -1,    -1,    -1,  1101,    -1,
-      -1,    -1,    -1,  1106,   272,  1108,  1109,    -1,    -1,  1112,
-      -1,    -1,    -1,    -1,    -1,    -1,  1119,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1130,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,  1028,    -1,    -1,    -1,    -1,    -1,  1034,
+      -1,    -1,    -1,    -1,    -1,    -1,  1041,  1042,    -1,    -1,
+      -1,    -1,  1047,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   319,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
-     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
-     338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1074,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1094,
+      -1,    -1,    -1,  1098,    -1,    -1,    -1,    -1,  1103,   272,
+    1105,  1106,    -1,    -1,  1109,    -1,    -1,    -1,    -1,    -1,
+      -1,  1116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,  1127,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,    -1,
+      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1240,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,  1265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,  1278,    -1,    -1,    -1,    -1,
+      -1,    -1,  1237,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1262,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1275,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,  1338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1360,     3,  1362,
-      -1,    -1,    -1,    -1,    -1,    -1,  1369,    -1,    -1,    -1,
-      -1,  1374,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    1335,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  1497,    -1,    -1,    -1,    -1,    -1,
+      -1,     3,  1357,    -1,  1359,    -1,    -1,    -1,    -1,    -1,
+      -1,  1366,    -1,    -1,    -1,    -1,  1371,    -1,    -1,    -1,
+      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
+      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     112,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1493,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-    1543,    -1,    -1,    -1,  1547,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1572,
-      -1,    -1,    -1,  1576,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,  1594,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,  1539,    -1,    -1,    -1,  1543,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
+      -1,    -1,    -1,  1568,    -1,    -1,    -1,  1572,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,  1590,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1661,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   319,    -1,    -1,    -1,  1681,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  1741,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,  1657,   305,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,
+      -1,    -1,  1677,   325,   326,   327,   328,   329,   330,   331,
+     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,   371,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,  1737,    -1,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   112,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,  1866,  1867,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1902,  1903,    -1,
+      -1,    -1,    -1,  1908,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,  1982,  1983,    -1,
+      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,  1996,  1997,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,  2031,  2032,  2033,   319,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  2072,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    2105,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    2135,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  2234,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1870,  1871,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
+      -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,  1906,  1907,    -1,    -1,    -1,    -1,  1912,
+      -1,    -1,    -1,    -1,    -1,    -1,  2291,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,     3,
+      -1,    -1,    -1,    -1,  2359,    92,    93,    94,    95,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  2374,
       24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
       34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
@@ -5622,341 +5648,260 @@ static const yytype_int16 yycheck[] =
       64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
       74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
       84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
-      94,    95,  1985,  1986,    -1,    -1,    -1,   272,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,  1999,  2000,    -1,    -1,
+      94,    95,     3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,
+      -1,    -1,    -1,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    -1,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
+      81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,
+      -1,    92,    93,    94,    95,   272,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,  2034,  2035,  2036,   319,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   319,    -1,    -1,    -1,    -1,    -1,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,  2075,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   371,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,  2108,    -1,    -1,    -1,    -1,
+      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,  2138,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,
+      -1,   272,    -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,
+      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
+     331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,    -1,    -1,
-      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
-     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  2237,    -1,    -1,    -1,    -1,    -1,
+       3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     371,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,    84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,
+      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,     3,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,  2294,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,     3,    -1,    -1,    -1,    -1,  2362,
-      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,  2377,    24,    25,    26,    27,    28,
+      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   371,    24,    25,    26,    27,    28,
       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
       39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
       59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
       -1,    70,    71,    72,    73,    74,    75,    76,    77,    78,
-      79,    80,    81,    82,    83,    84,    85,    -1,    -1,    -1,
-      -1,    -1,    -1,    92,    93,    94,    95,     3,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,    24,    25,
+      79,    80,    81,    82,    83,    84,    85,     3,    -1,    -1,
+      -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
       66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
+       3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
+      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,
      329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,
-      -1,    -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   319,    -1,    -1,    -1,    -1,    -1,   325,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,
      326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
      336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   371,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,     3,    -1,
-      -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,
+      -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
-      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,
+      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
+      95,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,
+       7,     8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,
+      17,    18,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,    96,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+     127,   128,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,    -1,
+      -1,    -1,    -1,   150,   151,    -1,    -1,   154,    -1,    -1,
+      -1,    -1,    -1,    -1,   161,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   169,    -1,    -1,    -1,   173,   272,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   183,    -1,    -1,   186,
+     187,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   195,   196,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
-     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
-     338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
+     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   224,    -1,    -1,
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+     335,   336,   337,   338,   241,    -1,    -1,    -1,   245,    -1,
+      -1,    -1,   249,   250,    -1,   252,   253,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   262,    -1,    -1,    -1,   266,
+      -1,    -1,    -1,    -1,    -1,   272,   371,   274,   275,    -1,
+      -1,   278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   371,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   319,    -1,    -1,   322,   323,   324,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   366,
+      -1,   368,    -1,   370,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   116,    -1,    -1,    -1,
+      -1,   121,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   135,    -1,    -1,    -1,    -1,
+      -1,   141,    -1,    -1,    -1,    -1,   146,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   162,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     170,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   188,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   211,   212,   213,   214,    -1,    -1,    -1,    -1,   219,
+     220,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,
-      94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    -1,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,     3,    -1,    -1,    -1,    -1,
-      -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
-      -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
-     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   371,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
-     331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     371,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
-     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
-     338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+     270,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   371,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
-      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
-      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
-      -1,     3,     4,     5,     6,     7,     8,     9,    -1,    11,
-      12,    13,    -1,    -1,    -1,    17,    18,    -1,    -1,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
-      92,    93,    94,    95,    96,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     112,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   127,   128,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,
-      -1,    -1,    -1,   145,    -1,    -1,    -1,    -1,   150,   151,
-      -1,    -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,   161,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,
-      -1,   173,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   183,    -1,    -1,   186,   187,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   195,   196,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,    -1,   312,   313,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   224,    -1,    -1,   325,   326,   327,   328,   329,
-     330,   331,   332,   333,   334,   335,   336,   337,   338,   241,
-      -1,    -1,    -1,   245,    -1,    -1,    -1,   249,   250,    -1,
-     252,   253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     262,    -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,
-     272,   371,   274,   275,    -1,    -1,   278,   279,    -1,    -1,
-     282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     292,   293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,
-     322,   323,   324,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   366,    -1,   368,    -1,   370,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   116,    -1,    -1,    -1,    -1,   121,    -1,    -1,    -1,
-     125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     135,    -1,    -1,    -1,    -1,    -1,   141,    -1,    -1,    -1,
-      -1,   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   162,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   170,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   188,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   211,   212,   213,   214,
-      -1,    -1,    -1,    -1,   219,   220,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   267,   268,   269,   270,    -1,   272,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,   312,   313,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
-       8,     9,    -1,    11,    12,    13,    -1,    15,    -1,    17,
-      18,    -1,    -1,    -1,    -1,   370,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
-      -1,    -1,    -1,    -1,    92,    93,    94,    95,    96,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   107,
-      -1,    -1,    -1,    -1,   112,   113,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,
-     128,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     138,    -1,    -1,    -1,    -1,    -1,    -1,   145,    -1,    -1,
-      -1,    -1,   150,   151,    -1,    -1,   154,    -1,    -1,    -1,
-      -1,    -1,    -1,   161,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   169,    -1,    -1,    -1,   173,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   183,    -1,    -1,   186,   187,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   195,   196,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   224,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   241,    -1,    -1,    -1,   245,    -1,    -1,
-      -1,   249,    -1,    -1,   252,   253,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   262,    -1,    -1,    -1,   266,    -1,
-      -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,    -1,
-     278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
-     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
-     338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
        3,     4,     5,     6,     7,     8,     9,    -1,    11,    12,
-      13,    -1,    -1,    -1,    17,    18,    -1,    -1,   366,    -1,
-     368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      13,    -1,    15,    -1,    17,    18,    -1,    -1,    -1,    -1,
+     370,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
       63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
-      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   106,    -1,    -1,    -1,   110,   111,   112,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   144,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      93,    94,    95,    96,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   107,    -1,    -1,    -1,    -1,   112,
+     113,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   127,   128,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,    -1,
+      -1,    -1,   145,    -1,    -1,    -1,    -1,   150,   151,    -1,
+      -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,   161,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   186,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,
+     173,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     183,    -1,    -1,   186,   187,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   195,   196,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   224,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   241,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   250,    -1,    -1,
-     253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   245,    -1,    -1,    -1,   249,    -1,    -1,   252,
+     253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   262,
       -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
-      -1,   274,   275,    -1,   277,   278,   279,    -1,    -1,   282,
+      -1,   274,   275,    -1,    -1,   278,   279,    -1,    -1,   282,
      283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   292,
-     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,   322,
      323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
      333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
        8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,    17,
-      18,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+      18,    -1,    -1,   366,    -1,   368,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
@@ -5998,27 +5943,27 @@ static const yytype_int16 yycheck[] =
       63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
-      93,    94,    95,    96,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
+      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   106,    -1,    -1,    -1,   110,   111,   112,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   150,   151,    -1,
+      -1,   144,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   187,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   186,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   224,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   241,    -1,
-      -1,    -1,   245,    -1,    -1,    -1,   249,    -1,    -1,   252,
-     253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   262,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   250,    -1,    -1,
+     253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
-      -1,   274,   275,    -1,    -1,   278,   279,    -1,    -1,   282,
+      -1,   274,   275,    -1,   277,   278,   279,    -1,    -1,   282,
      283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   292,
-     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,   302,
       -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,   322,
      323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
@@ -6032,28 +5977,28 @@ static const yytype_int16 yycheck[] =
       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
       68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
       78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
-      -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    94,    95,    96,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
+      -1,    -1,   150,   151,    -1,    -1,   154,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   186,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   187,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   224,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   250,    -1,    -1,   253,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,
-      -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,   277,
+      -1,    -1,    -1,   241,    -1,    -1,    -1,   245,    -1,    -1,
+      -1,   249,    -1,    -1,   252,   253,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   262,    -1,    -1,    -1,   266,    -1,
+      -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,    -1,
      278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
-      -1,    -1,    -1,    -1,   302,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
@@ -6102,19 +6047,19 @@ static const yytype_int16 yycheck[] =
       68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
       78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
       -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   133,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   144,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   186,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   224,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   250,    -1,    -1,   253,    -1,    -1,    -1,    -1,
@@ -6122,7 +6067,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,   277,
      278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,    -1,   302,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
@@ -6171,16 +6116,16 @@ static const yytype_int16 yycheck[] =
       68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
       78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
       -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,    -1,
+      -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   110,   111,   112,    -1,    -1,   115,   116,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   133,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   144,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   189,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6197,7 +6142,7 @@ static const yytype_int16 yycheck[] =
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
      338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
        3,     4,     5,     6,     7,     8,     9,    -1,    11,    12,
-      13,    -1,    -1,    -1,    17,    18,    -1,    20,    -1,    -1,
+      13,    -1,    -1,    -1,    17,    18,    -1,    -1,    -1,    -1,
      368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
@@ -6207,14 +6152,14 @@ static const yytype_int16 yycheck[] =
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
       93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,   111,   112,
+      -1,    -1,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   132,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   184,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   189,    -1,    -1,    -1,
       -1,    -1,    -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6232,7 +6177,7 @@ static const yytype_int16 yycheck[] =
      333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
        8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,    17,
-      18,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+      18,    -1,    20,    -1,    -1,   368,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
@@ -6243,22 +6188,22 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   132,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   184,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,   247,
+      -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   250,    -1,    -1,   253,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,
       -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,   277,
-     278,   279,   280,    -1,   282,   283,    -1,    -1,    -1,    -1,
+     278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6276,9 +6221,9 @@ static const yytype_int16 yycheck[] =
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
       93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,   111,   112,
-      -1,    -1,   115,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   140,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
@@ -6289,10 +6234,10 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   241,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   250,    -1,    -1,
+      -1,    -1,    -1,    -1,   247,    -1,    -1,   250,    -1,    -1,
      253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
-      -1,   274,   275,    -1,   277,   278,   279,    -1,    -1,   282,
+      -1,   274,   275,    -1,   277,   278,   279,   280,    -1,   282,
      283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   292,
      293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6309,11 +6254,11 @@ static const yytype_int16 yycheck[] =
       68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
       78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
       -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   106,    -1,
-      -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   110,   111,   112,    -1,    -1,   115,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   144,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   140,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6334,8 +6279,8 @@ static const yytype_int16 yycheck[] =
       -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
      338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-       3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    14,    -1,    -1,    17,    -1,    -1,    -1,    -1,    -1,
+       3,     4,     5,     6,     7,     8,     9,    -1,    11,    12,
+      13,    -1,    -1,    -1,    17,    18,    -1,    -1,    -1,    -1,
      368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
@@ -6344,33 +6289,33 @@ static const yytype_int16 yycheck[] =
       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
       93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   106,    -1,    -1,    -1,   110,   111,   112,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   117,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   126,    -1,   128,    -1,    -1,   131,    -1,
-      -1,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,   142,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   152,
-      -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,   161,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     183,    -1,    -1,   186,   187,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   195,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   144,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   224,   225,   226,   227,    -1,   229,   230,   231,    -1,
-     233,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   241,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   250,    -1,    -1,
      253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     263,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
-      -1,   274,   275,    -1,    -1,    -1,    -1,    -1,    -1,   282,
-     283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   291,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+      -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
+      -1,   274,   275,    -1,   277,   278,   279,    -1,    -1,   282,
+     283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   292,
+     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   316,    -1,    -1,   319,    -1,    -1,   322,
+      -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,   322,
      323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
      333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
-       8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,    17,
-      18,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+      -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    14,    -1,    -1,    17,
+      -1,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
@@ -6379,32 +6324,32 @@ static const yytype_int16 yycheck[] =
       78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
       -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   122,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   117,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   126,    -1,
+     128,    -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,
+     138,    -1,    -1,    -1,   142,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   152,    -1,   154,    -1,    -1,    -1,
+      -1,    -1,    -1,   161,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   183,    -1,    -1,   186,   187,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   195,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   250,    -1,    -1,   253,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,
-      -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,   277,
-     278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   224,   225,   226,   227,
+      -1,   229,   230,   231,    -1,   233,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   253,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   263,    -1,    -1,   266,    -1,
+      -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,    -1,
+      -1,    -1,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   291,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   302,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   316,    -1,
       -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
      338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
        3,     4,     5,     6,     7,     8,     9,    -1,    11,    12,
-      13,    -1,    -1,    -1,    17,    18,    -1,    20,    -1,    -1,
+      13,    -1,    -1,    -1,    17,    18,    -1,    -1,    -1,    -1,
      368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
@@ -6414,7 +6359,7 @@ static const yytype_int16 yycheck[] =
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
       93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,   111,   112,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   122,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6439,7 +6384,7 @@ static const yytype_int16 yycheck[] =
      333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
        8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,    17,
-      18,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+      18,    -1,    20,    -1,    -1,   368,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
@@ -6473,7 +6418,7 @@ static const yytype_int16 yycheck[] =
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
      338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
        3,     4,     5,     6,     7,     8,     9,    -1,    11,    12,
-      13,    -1,    -1,    -1,    17,    18,    -1,    -1,    -1,   367,
+      13,    -1,    -1,    -1,    17,    18,    -1,    -1,    -1,    -1,
      368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
@@ -6488,7 +6433,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     163,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6508,7 +6453,7 @@ static const yytype_int16 yycheck[] =
      333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
        8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,    17,
-      18,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+      18,    -1,    -1,    -1,   367,   368,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
@@ -6522,7 +6467,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   163,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
@@ -6551,26 +6496,26 @@ static const yytype_int16 yycheck[] =
       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
       83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
       93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   110,   111,   112,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   136,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   186,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   224,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   241,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   241,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   250,    -1,    -1,
      253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
-      -1,   274,   275,    -1,    -1,   278,   279,    -1,    -1,   282,
+      -1,   274,   275,    -1,   277,   278,   279,    -1,    -1,   282,
      283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   292,
-     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+     293,   294,   295,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,   322,
      323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
@@ -6593,7 +6538,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   186,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -6605,7 +6550,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,    -1,
      278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,    -1,   302,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
@@ -6623,7 +6568,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   136,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   154,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   169,    -1,    -1,    -1,
@@ -6666,7 +6611,7 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   224,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,   253,    -1,    -1,    -1,    -1,
@@ -6713,146 +6658,146 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,   322,
      323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
      333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    17,
-      -1,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
+       8,     9,    -1,    11,    12,    13,    -1,    -1,    -1,    17,
+      18,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
       68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
       78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
-       3,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,   154,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
-      93,    94,    95,    -1,    -1,    -1,    -1,    -1,   186,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   154,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   241,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,   253,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,
-      -1,    -1,    -1,   186,   272,    -1,   274,   275,    -1,    -1,
-      -1,    -1,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   272,    -1,   274,   275,    -1,    -1,
+     278,   279,    -1,    -1,   282,   283,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   292,   293,   294,   295,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   302,    -1,    -1,   305,    -1,    -1,
-      -1,   224,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,   319,    -1,    -1,   322,   323,   324,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
      338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,
-      -1,    -1,    -1,   276,    -1,    -1,    -1,    -1,    -1,    -1,
-     368,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,
-      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
-     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   368,    24,    25,    26,    27,
+       3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    17,    -1,    -1,    -1,    -1,    -1,
+     368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,    84,    85,    -1,    -1,     3,    -1,    -1,    -1,    92,
+      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
       58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,     3,    -1,
+      68,   154,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
       -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   186,    -1,
+      -1,    -1,    -1,   186,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   224,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     253,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,   186,   272,
+      -1,   274,   275,    -1,    -1,    -1,    -1,    -1,    -1,   282,
+     283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+      -1,    -1,   305,    -1,    -1,    -1,   224,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,   322,
+     323,   324,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,   276,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   368,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   302,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
      338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   266,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   282,   283,    -1,
-     368,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+       3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   368,    24,    25,    26,    27,    28,    29,
+     368,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
+      63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
+      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
+      83,    84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,
+      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
       60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
       70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,     3,    -1,    -1,    -1,
+      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
       -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
-      -1,   101,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
-      -1,    -1,     3,    -1,    -1,    92,    93,    94,    95,    -1,
+      -1,    -1,    -1,   186,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   192,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    -1,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,
-      -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,   224,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
-     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,   276,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   368,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,
+      -1,    -1,    -1,   276,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
-     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
-     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   368,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,    -1,    -1,
+      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   282,   283,    -1,   368,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
-     331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   368,    24,    25,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   368,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
+      95,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,
+      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    -1,    -1,    -1,     3,    -1,    -1,
+      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   192,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
@@ -6860,31 +6805,34 @@ static const yytype_int16 yycheck[] =
       66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
       -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     116,    -1,    -1,    -1,    -1,   121,    -1,    -1,    -1,   125,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,
-      -1,    -1,    -1,    -1,    -1,   141,    -1,    -1,    -1,    -1,
-     146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   162,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   170,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   188,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   211,   212,   213,   214,    -1,
-      -1,    -1,    -1,   219,   220,    -1,    -1,    -1,    -1,    -1,
+     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     272,    -1,    -1,    -1,   276,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   368,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   267,   268,   269,   270,    -1,   272,    -1,    -1,    -1,
+      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
+     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   368,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
-      -1,    -1,    -1,    -1,    -1,    -1,   312,   313,    -1,    -1,
-      -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,   325,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,
      326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
-     336,   337,   338,    24,    25,    26,    27,    28,    29,    30,
+     336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   368,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
       41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
       51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
@@ -6913,79 +6861,92 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
-      -1,   312,   313,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   312,   313,    -1,    -1,    -1,    -1,     3,    -1,    -1,
       -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
-     331,   332,   333,   334,   335,   336,   337,   338,     3,    -1,
+     331,   332,   333,   334,   335,   336,   337,   338,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    17,    -1,    -1,    -1,    -1,    -1,    -1,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     116,    -1,    -1,    -1,    -1,   121,    -1,    -1,    -1,   125,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,
+      -1,    -1,    -1,    -1,    -1,   141,    -1,    -1,    -1,    -1,
+     146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   162,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   170,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   188,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
-       4,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   154,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,
-      94,    95,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   109,   110,   111,   112,   113,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   253,    -1,
+      -1,    -1,    -1,    -1,    -1,   211,   212,   213,   214,    -1,
+      -1,    -1,    -1,   219,   220,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   266,    -1,    -1,    -1,    -1,    -1,   272,    -1,   274,
-     275,    -1,    -1,    -1,    -1,    -1,    -1,   282,   283,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,     3,   319,    -1,    -1,   322,   323,   324,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    24,    25,    26,    27,    28,    29,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   267,   268,   269,   270,    -1,   272,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
+      -1,    -1,    -1,    -1,    -1,    -1,   312,   313,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,
+     326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+     336,   337,   338,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    17,    -1,    -1,
+      -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
       60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
       70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    -1,    -1,   272,    -1,
+      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
       -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   115,    -1,    -1,    -1,    -1,
-      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,
-      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
-     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
-      -1,   161,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   179,
-      -1,   181,    -1,    -1,    -1,    -1,   186,    -1,     3,    -1,
-      -1,    -1,    -1,    -1,    -1,   195,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   208,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,   271,   272,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     115,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   138,    -1,   325,   326,   327,   328,   329,
-     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   161,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,     3,     4,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   179,    -1,   181,    -1,    -1,    -1,
-      -1,   186,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
-     195,    -1,    -1,    -1,    -1,    -1,    -1,    17,    -1,    -1,
+      -1,    -1,    -1,    -1,   154,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
+      -1,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,    -1,    -1,    -1,
+      -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,
+      -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     109,   110,   111,   112,   113,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   253,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,    -1,    -1,
+      -1,    -1,   272,    -1,   274,   275,    -1,    -1,    -1,    -1,
+      -1,    -1,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,   319,
+      -1,    -1,   322,   323,   324,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
+      85,    -1,    -1,   272,    -1,    -1,    -1,    92,    93,    94,
+      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     115,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   138,    -1,    -1,   325,   326,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+      -1,    -1,    -1,    -1,    -1,    -1,   161,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   179,    -1,   181,    -1,    -1,    -1,
+      -1,   186,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+     195,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,   208,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
@@ -6995,76 +6956,63 @@ static const yytype_int16 yycheck[] =
       80,    81,    82,    83,    84,    85,   271,   272,    -1,    -1,
       -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   115,    -1,    -1,    -1,    -1,
+     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,
      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
      335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   196,    -1,    -1,    24,
+      -1,   161,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   179,
+      -1,   181,    -1,    -1,    -1,    -1,   186,    -1,     3,    -1,
+      -1,    -1,    -1,    -1,    -1,   195,    -1,    -1,    -1,    -1,
+      -1,    -1,    17,    -1,    -1,    -1,    -1,    -1,   208,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    -1,    -1,    -1,    -1,    -1,   266,    92,    93,    94,
-      95,    -1,   272,    -1,    -1,    -1,    -1,    -1,   278,    -1,
-      -1,    -1,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      85,   271,   272,    -1,    -1,    -1,    -1,    92,    93,    94,
+      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,
+     125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
      330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,     3,    -1,    -1,    -1,    -1,   211,   212,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,   272,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
-      92,    93,    94,    95,    -1,    -1,   301,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   313,    -1,
       -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    24,    25,    26,    27,    28,    29,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   196,    -1,    -1,    24,    25,    26,    27,    28,    29,
       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
       60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
       70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
       80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
-      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,   196,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   266,    92,    93,    94,    95,    -1,   272,    -1,    -1,
+      -1,    -1,    -1,   278,    -1,    -1,    -1,   282,   283,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   116,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   319,    -1,    -1,    -1,    -1,    -1,
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   264,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,
+      -1,   211,   212,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,   272,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,
+      -1,   301,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   313,    -1,    -1,    -1,    -1,     3,    -1,
       -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
      330,   331,   332,   333,   334,   335,   336,   337,   338,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
@@ -7073,314 +7021,377 @@ static const yytype_int16 yycheck[] =
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
-      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   192,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,     3,     4,    -1,    -1,    -1,    -1,   129,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,   272,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,   208,    -1,    -1,    -1,
-      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
+      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
+      95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   266,
+      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   282,   283,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
+      -1,   196,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   264,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    24,    25,    26,
+     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+     335,   336,   337,   338,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,     3,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
+      -1,   101,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
       67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
       77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
-      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,     3,
+      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,
-      94,    95,    -1,    97,    -1,    -1,    -1,   101,    -1,    -1,
-      -1,    -1,    -1,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    -1,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,
-      -1,    92,    93,    94,    95,   272,    -1,    -1,    -1,    -1,
+      -1,    -1,   192,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,
+      -1,    -1,   129,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    20,    -1,    -1,    -1,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,   272,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
+      -1,   208,    -1,    -1,    -1,    92,    93,    94,    95,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,   130,
+      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   319,    -1,    -1,    -1,    -1,    -1,   325,   326,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
      327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
      337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
-     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
-     261,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,
-      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
-     331,   332,   333,   334,   335,   336,   337,   338,    24,    25,
+      -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    24,    25,    26,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
+      92,    93,    94,    95,     3,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     112,    -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
+      -1,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,     3,    -1,    -1,
+      -1,    -1,    -1,    92,    93,    94,    95,    -1,    97,    -1,
+      -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,    24,    25,
       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
       66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-       3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    24,    25,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,
-      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
-      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,
-      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
+     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
+      -1,    -1,    -1,   305,   130,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   319,    -1,    -1,
+      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
+     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   317,    -1,   153,    -1,    -1,    -1,    -1,    -1,   325,
-     326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
-     336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   266,    -1,    -1,    -1,    -1,    -1,   272,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
-     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+      -1,    -1,    -1,    -1,    -1,   261,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,
-      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
-     330,   331,   332,   333,   334,   335,   336,   337,   338,    24,
+      -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,   325,
+     326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+     336,   337,   338,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    -1,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
+      81,    82,    83,    84,    85,     3,    -1,    -1,    -1,    -1,
+      -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,     3,    -1,
+      -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
+      85,    -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
       95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
-      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
-      92,    93,    94,    95,     3,    -1,    -1,    -1,    -1,    -1,
+      -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     112,    -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      -1,    70,    71,    72,    73,    74,    75,    76,    77,    78,
-      79,    80,    81,    82,    83,    84,    85,    -1,    -1,    -1,
-      -1,   266,    -1,    92,    93,    94,    95,   272,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   317,    -1,   153,    -1,
+      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
+     331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   266,    -1,
+      -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
+     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
+     338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,
      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
+     335,   336,   337,   338,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,     3,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,     3,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,
+      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
+      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    -1,    -1,    -1,    -1,   266,    -1,    92,    93,
+      94,    95,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,     3,   319,    -1,    -1,    -1,    -1,
+      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+     334,   335,   336,   337,   338,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
+      -1,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,     3,    -1,    -1,
+      -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
+     179,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
+      -1,    -1,    -1,   272,    92,    93,    94,    95,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
-     319,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,
      329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,
-      94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    24,    25,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
-      61,    62,    63,    64,    65,    66,    67,    68,    -1,    70,
-      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,
-      -1,    92,    93,    94,    95,   179,    -1,    -1,    -1,    -1,
-       3,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   112,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    24,    25,    26,    27,    28,    29,    30,    31,    32,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,   176,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,
+     326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+     336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+       3,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
+     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
+     338,    24,    25,    26,    27,    28,    29,    30,    31,    32,
       33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
       63,    64,    65,    66,    67,    68,    -1,    70,    71,    72,
       73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    -1,    -1,    -1,    -1,    -1,   272,    92,
-      93,    94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,    92,
+      93,    94,    95,     3,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   112,
+      -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    -1,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,     3,    -1,    -1,    -1,
+      -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,
+      -1,   101,    -1,    -1,    -1,    -1,    -1,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
+      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
+      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,   272,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
-     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   272,    -1,   176,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
+     333,   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
-     331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,
+      -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,
+     330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,    -1,
-      -1,    -1,   325,   326,   327,   328,   329,   330,   331,   332,
-     333,   334,   335,   336,   337,   338,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    -1,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    -1,    -1,
-      -1,    -1,    -1,    -1,    92,    93,    94,    95,     3,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   112,    -1,    -1,    -1,    -1,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    -1,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,
-      95,    -1,    -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,
-      -1,    -1,    24,    25,    26,    27,    28,    29,    30,    31,
+      -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+     337,   338,    24,    25,    26,    27,    28,    29,    30,    31,
       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
       52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
       62,    63,    64,    65,    66,    67,    68,    -1,    70,    71,
       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,    -1,
-      92,    93,    94,    95,   272,    -1,    -1,    -1,    -1,    -1,
+      82,    83,    84,    85,     3,    -1,    -1,    -1,    -1,    -1,
+      92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,   101,
+      -1,    -1,    -1,    -1,    -1,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
+      -1,    70,    71,    72,    73,    74,    75,    76,    77,    78,
+      79,    80,    81,    82,    83,    84,    85,     3,    -1,    -1,
+      -1,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     112,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,
+     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   204,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,
-     328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
-     338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,
+      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
+     332,   333,   334,   335,   336,   337,   338,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   325,   326,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,    -1,
-      -1,    -1,    -1,   325,   326,   327,   328,   329,   330,   331,
-     332,   333,   334,   335,   336,   337,   338,    24,    25,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
-      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    -1,    70,    71,    72,    73,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,     3,
-      -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,    -1,
-      -1,    -1,    -1,    -1,   101,    -1,    -1,    -1,    -1,    -1,
-      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
-      64,    65,    66,    67,    68,    -1,    70,    71,    72,    73,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    85,     3,    -1,    -1,    -1,    -1,    -1,    92,    93,
-      94,    95,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    24,    25,    26,    27,    28,    29,    30,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,     3,    -1,    -1,    -1,    -1,    -1,    -1,   325,
+     326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+     336,   337,   338,    24,    25,    26,    27,    28,    29,    30,
       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
       41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
       51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
@@ -7388,39 +7399,9 @@ static const yytype_int16 yycheck[] =
       71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
       81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    -1,
       -1,    92,    93,    94,    95,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     204,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,
-     327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
-     337,   338,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   305,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   325,   326,   327,   328,   329,   330,   331,   332,   333,
-     334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,    -1,    -1,
-      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
-     331,   332,   333,   334,   335,   336,   337,   338,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
-      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,    -1,    70,    71,    72,    73,    74,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      -1,    -1,    -1,    -1,    -1,    -1,    92,    93,    94,    95,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
@@ -7435,15 +7416,13 @@ static const yytype_int16 yycheck[] =
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   272,    -1,    -1,    -1,
+      -1,   272,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
+      -1,    -1,    -1,    -1,   305,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,
-     326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
-     336,   337,   338
+      -1,    -1,    -1,    -1,   325,   326,   327,   328,   329,   330,
+     331,   332,   333,   334,   335,   336,   337,   338
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -7467,236 +7446,235 @@ static const yytype_uint16 yystos[] =
      439,   440,   441,   442,   443,   445,   456,   457,   458,   461,
      463,   465,   466,   469,   470,   477,   478,   480,   481,   482,
      486,   498,   510,   513,   518,   520,   521,   522,   523,   527,
-     528,   529,   577,   581,   617,   618,   621,   624,   664,   666,
-     676,   684,   685,   705,   706,   708,   711,   713,   744,   745,
-     749,   754,   758,   759,   760,   761,   770,   774,    26,   380,
-     599,   368,   253,   178,   192,   242,   625,   202,    24,    33,
-      34,    41,    60,    69,    88,    91,   106,   140,   158,   178,
-     192,   194,   196,   198,   206,   207,   209,   210,   238,   241,
-     273,   301,   315,   317,   327,   328,   404,   405,   406,   625,
-     730,   149,   196,    24,    60,    69,   157,   192,   196,   198,
-     238,   241,   273,   301,   317,   327,   328,   625,   115,   138,
-     161,   179,   181,   186,   195,   208,   271,   272,   380,   433,
-     434,   435,   436,   437,   614,   368,   163,   215,   216,   484,
-     202,   115,   140,   222,   505,   507,   509,   196,   264,   331,
-     380,   317,   599,   603,   186,   253,   266,   380,   518,   581,
-       4,   615,     4,   615,     4,   228,    24,   157,   192,   196,
-     228,   368,   577,   115,   208,   271,   272,   433,   436,   172,
-     265,    17,   125,   196,   266,   278,   282,   283,   319,   380,
-     577,   380,     4,   317,   368,   368,   368,   224,   520,     0,
-     367,   131,   138,   142,   187,   230,   379,   414,   371,    98,
-     100,   297,   517,   368,   102,   371,   251,   368,    16,     4,
-       5,     6,     7,     8,     9,    11,    12,    13,    18,    93,
-     112,   169,   196,   241,   278,   279,   292,   293,   294,   295,
-     368,   380,   564,   565,   567,   568,   569,   571,   574,   575,
-     581,   585,   587,   588,   593,   594,   595,   596,   597,   604,
-     613,   745,   747,   748,   750,   751,   753,   380,   600,   600,
-     380,   710,    26,   176,   238,   301,   471,   614,   169,   198,
-     380,   602,   614,   602,     3,   380,   602,   602,   185,   198,
-     317,   266,   599,   599,   599,   404,   157,   602,    26,   603,
-     153,   614,   380,   709,   238,   614,   380,   599,   614,   599,
-     599,   599,   599,   185,   198,   266,   599,   599,   599,   599,
-     177,   368,   428,   428,   428,   172,   172,   172,   172,   370,
-     193,   370,   380,   604,   603,   506,   298,   110,   111,   122,
-     250,   277,   368,   532,   566,   567,   568,   573,   582,   584,
-     604,   659,   661,   707,   745,   747,   750,   153,   380,   332,
-     107,   172,   265,   599,   101,   192,   380,   493,   187,   509,
-     371,     4,   615,   380,   708,     3,   599,   153,   615,   566,
-     368,   177,   172,   172,   172,   172,   149,   368,   368,   368,
-     368,   368,   368,   368,   368,   368,   251,   368,   266,     3,
-     566,   566,   369,   192,   319,   371,   380,   752,   115,   296,
-     526,   115,   526,    99,   380,   566,   573,   578,   579,   580,
-     583,   380,   752,   371,   380,   566,   576,   583,   370,   368,
-     171,   577,   368,   247,   280,   566,   589,   592,   368,   368,
-     368,   708,   224,   368,   518,   566,   567,   604,   371,   372,
-     660,   371,   660,   160,   613,   368,   371,   176,   444,   368,
-     627,   371,   208,   715,   599,   165,   172,   157,   602,   371,
-     101,   368,   425,   137,   769,   235,   236,   237,   679,   627,
-     250,     4,   602,   599,    96,   149,   101,   149,   380,   611,
-     627,   752,   200,   516,   548,   614,   124,   371,   124,   182,
-     417,   172,   409,   599,   124,     4,   599,    96,   201,   462,
-     193,   380,   402,   610,   709,   577,     4,   603,   435,   436,
-     437,   371,   369,   157,   485,   339,   340,   341,   342,   343,
-     344,   345,   346,   347,   348,   349,   350,   351,   503,   504,
-       7,   368,   566,   566,   368,   530,   531,   380,     4,   567,
-     604,   149,   533,   534,   535,     4,   101,   109,   110,   111,
-     112,   113,   380,   371,   370,   660,   108,   368,   614,   380,
-     333,   566,   101,   464,   380,   174,   493,   511,   512,   610,
-     532,   371,   380,   370,   616,   371,   142,   231,   755,   172,
-     142,   231,   232,   234,   416,   614,   369,   580,   709,   577,
-       4,   603,   436,    16,   576,   576,   576,   566,   576,   576,
-       3,   566,   576,   576,    96,   149,   369,   369,    97,   452,
-     599,   380,   752,   371,   526,   123,   368,   522,   523,   524,
-     525,   526,   522,   525,   115,   526,   320,   370,   370,   369,
-     370,   368,   380,   371,   369,   370,   566,   115,   140,   566,
-      94,    95,   116,   121,   125,   135,   141,   146,   162,   170,
-     180,   188,   211,   212,   213,   214,   219,   220,   267,   268,
-     269,   270,   301,   312,   313,   605,   606,   368,   606,   566,
-     106,   144,   368,   552,   553,   554,   555,   556,   557,   559,
-     560,   561,   563,   566,   247,   280,   590,   591,   251,   592,
-     583,   566,   566,   368,   518,   224,   518,   369,   369,   370,
-     101,   101,   112,   371,   380,   746,   747,   566,   372,   752,
-     613,   580,   371,   380,   165,   101,   446,    62,   156,   243,
-     369,   628,   629,   630,   254,   626,   371,   380,   708,   166,
-     310,   714,   627,    87,   599,   172,   101,   371,   380,   518,
-     519,   524,   129,   208,   384,   385,   386,   400,   401,   610,
-     368,   423,   427,   153,   767,   768,   171,   138,   161,   195,
-     680,   626,   622,   623,   625,   101,   101,   599,   599,   566,
-     566,   172,   626,   627,   133,   552,   174,   492,   614,   371,
-     380,   599,   599,   138,   437,   371,   369,   370,   193,   193,
-     193,   193,   201,   430,   371,   380,     3,   492,     3,   368,
-     368,     7,   368,   502,   502,     7,     7,   503,   201,   370,
-     508,   566,   584,   530,    93,   582,   585,   586,   251,   101,
-     101,   276,   368,   536,   540,   545,   546,   599,   603,   200,
-     516,     4,    20,   380,   572,   566,   566,   566,   566,   566,
-     752,   566,   573,   108,   566,   580,   614,   334,   337,   338,
-     665,   315,   493,   368,   200,   370,   516,   107,   380,   371,
-       4,   371,   380,    34,    72,   730,   734,    36,    72,   734,
-     735,   599,    91,   411,   411,   602,   411,   129,   400,   418,
-     614,   368,   369,   149,   149,   149,   149,   370,   369,   369,
-     369,   370,   369,   369,   149,   156,   369,   369,   599,   566,
-     123,   142,   231,   234,   371,   380,   752,   522,   525,   368,
-     224,   522,   525,   526,   522,   525,   566,   380,   566,   573,
-     566,   578,   579,   580,   380,   251,   566,   370,   566,   566,
-     369,   368,   368,   368,   175,   368,   368,   368,   368,   368,
-     211,   212,   313,   368,   368,   368,   580,   370,   552,   368,
-     565,   368,   552,   566,   104,   105,   246,   106,   107,   120,
-     156,   164,   168,   566,   566,   251,   591,   369,   101,   370,
-     580,   369,   518,   583,   708,   708,   380,   371,   373,   566,
-     368,   369,   380,   371,   368,   602,   149,   369,   370,   604,
-     606,   608,   708,    73,    74,    75,    76,    78,    79,    80,
-      83,   635,   636,   380,   371,    38,    52,    53,    54,    55,
-      56,    57,    58,    61,    71,   741,   742,    59,   712,   254,
-     743,   368,   468,   599,   599,   380,   371,   201,   203,   381,
-     380,   599,   369,   370,   126,   147,   153,   176,   194,   125,
-     211,   214,   605,   609,   708,   402,   101,   368,   370,   427,
-     172,   149,   367,   251,   622,   380,   372,   704,     4,     4,
-     459,   201,   756,   756,   599,   636,   626,   171,   368,   380,
-     371,   468,   380,   610,   436,   436,   436,   436,    68,   380,
-     371,   428,   566,   566,     7,   501,   300,     7,   111,   369,
-     370,   200,   369,   251,   708,   708,   540,   546,   368,   520,
-     546,   370,   282,   283,   284,   286,   287,   288,   542,   544,
-     368,   153,   549,    23,   606,   368,   566,   369,   335,   336,
-     334,     3,    41,    97,   100,   116,   157,   159,   163,   201,
-     204,   217,   218,   221,   223,   255,   490,   491,   133,   512,
-     492,   566,   380,   380,   371,    26,   380,    26,   417,   734,
-     380,   722,    35,   736,   307,   413,   610,   386,   412,   386,
-     380,   580,   436,   436,   436,   436,   566,   251,   251,   251,
-       3,   251,   251,   566,   566,   251,   251,   369,   453,   454,
-     566,   572,   752,   371,   402,   518,   522,   525,   320,   369,
-     566,   369,   369,     7,     7,     7,     7,     7,     7,     7,
-       7,     7,     7,     7,   369,   566,   369,   552,   552,   566,
-     120,   156,   168,   115,   116,   189,   562,   566,   566,   368,
-     565,   106,   169,   566,   246,   606,   566,   369,   369,   369,
-     369,   371,   112,   371,   380,   746,   373,   580,   380,   402,
-     597,   629,   608,   204,   607,   368,     4,   446,   380,   310,
-       4,   101,   716,   710,    96,   610,   368,   368,   380,    44,
-      44,    91,   140,   382,   385,   368,   165,   406,   165,   368,
-     368,   368,   116,   301,   708,   394,   369,   224,   422,   519,
-     529,     3,   763,   764,   767,   599,   380,   601,   367,   627,
-       3,   702,   703,   186,   250,   528,   695,   200,   460,   325,
-     201,   757,   757,   368,   166,   250,   641,   636,   380,   612,
-     491,   380,   371,   201,   432,   432,   432,   174,   371,   380,
-     197,   487,   528,   369,   369,   369,   370,   508,     7,   508,
-     566,   552,   369,   369,   251,   520,   369,   369,   540,   285,
-     543,   543,   543,   542,   290,   402,   539,   123,   155,   550,
-      19,    21,    22,   580,     7,   209,    97,    60,   176,   380,
-     566,     4,   144,   106,   369,   370,   171,   380,   752,   417,
-     752,   608,   101,    40,    41,    42,    43,    49,    51,    66,
-     106,   166,   254,   310,   738,   739,   740,   209,   773,   370,
-     370,   417,   369,   370,   369,   369,   369,   370,   118,   139,
-     455,   455,   752,   369,   369,   566,   369,   369,   369,   369,
-     370,   369,   369,   370,   369,   369,   369,   369,   369,   369,
-     369,   566,   368,   565,   566,   565,   105,   583,   169,   143,
-     250,   558,   566,   311,   570,   369,   371,   371,   112,   380,
-     380,   371,   369,   369,   196,   447,   108,   137,   636,   372,
-     635,    81,    82,   632,   149,    59,   166,   368,   717,    25,
-      35,    70,    78,    87,   106,   293,   330,   725,   726,   727,
-     708,   369,   610,   539,    91,   552,   368,   368,   368,   402,
-       7,     7,    41,   106,   126,   137,   169,   176,   181,   194,
-     201,   281,   306,   311,   318,   393,   396,   398,   518,   201,
-     426,   369,   370,    97,   677,   371,   370,   626,   107,   373,
-     702,   509,   599,   693,   696,     3,   692,     4,   107,   326,
-     403,   610,   741,   642,    96,   492,   369,   380,   152,   380,
-     371,   368,     7,   508,   369,   369,   371,   371,   369,   101,
-     380,   368,   541,   565,   603,   369,   132,   184,   453,   552,
-     452,    22,   369,   165,   165,   218,   490,   612,   368,   731,
-     731,   181,   723,    31,    32,    38,    38,    38,    38,   172,
-      37,    40,   742,   169,    24,    59,    67,   740,     3,   368,
-     772,   610,   386,   566,   251,   251,   251,   454,   452,     7,
-       7,   105,   583,   558,   566,   369,   586,   143,   599,   369,
-     752,   752,   371,   371,   112,   380,   566,   106,   448,     4,
-       5,     6,     7,     9,    18,   110,   111,   169,   598,   598,
-       7,   108,    62,   156,   243,    62,   156,   243,   597,     4,
-     742,   718,   722,   101,     4,   149,   164,   289,    25,   368,
-     728,   729,   735,   727,   641,   369,   369,   369,   402,   403,
-     403,   369,   369,   369,   306,   169,   368,   598,   165,   599,
-     185,   368,    60,   116,   599,   123,   126,   155,   763,     7,
-     239,   681,   371,   380,   601,   636,     3,     4,   701,   532,
-     380,   251,   370,   179,   700,   329,   330,   369,   370,   455,
-     310,   136,   199,   451,   641,   643,   644,   645,   650,   651,
-     655,   708,   371,   174,   380,   488,   489,   566,   508,   752,
-     752,   380,   545,   172,   289,   547,   101,   380,   368,   538,
-     368,   368,    96,   551,   144,   492,   369,   630,   631,   732,
-     733,    89,   737,   254,    86,   137,   724,    35,    44,    44,
-     169,    38,    39,   172,     4,     4,    59,     3,   771,   772,
-     369,   369,   369,   566,   369,   586,   368,   368,   752,   380,
-     752,   371,   264,   186,    63,   449,     7,     9,     7,     9,
-     636,   636,   373,     4,   369,   370,    87,   368,    28,   608,
-      30,    87,   370,   201,   472,   368,   369,   369,   369,   552,
-     427,   368,   399,    92,   305,   395,   397,   610,   174,   368,
-     765,   766,   240,   295,   682,   683,   641,   678,   380,   371,
-     370,   641,   535,   101,   686,   693,     4,   307,   610,    59,
-     130,   261,   380,   652,   656,   106,   258,   259,   260,   653,
-     251,   644,    15,    84,    96,   107,   113,   127,   138,   145,
-     150,   151,   173,   186,   187,   195,   224,   245,   249,   252,
-     262,   366,   380,   479,   480,   481,   482,   483,   486,   497,
-     498,   500,   510,   513,   581,   604,   639,   640,   646,   658,
-     659,   662,   664,   666,   667,   668,   669,   675,   745,   748,
-     367,   641,   380,   369,   370,   368,   368,   369,   552,   368,
-     380,   386,   537,   380,   453,   453,   195,   301,   492,   604,
-     369,   370,   602,   608,    27,   106,   598,   570,   101,    50,
-     169,     4,   121,   162,   211,   762,   369,   370,   251,   251,
-     580,   580,   380,   752,   566,   101,   632,   722,   402,    29,
-     101,   101,   735,   165,   106,   476,   537,   393,   406,   369,
-     172,   387,   388,   389,     4,   201,   123,   369,   370,     7,
-     370,   101,   101,   370,   380,   601,   516,   380,   368,   689,
-     380,   773,   455,     4,    64,    88,    90,   134,   450,   370,
-     608,   244,   148,     4,    65,   137,   150,   151,   368,   368,
-     519,   566,   566,   612,   612,   380,   193,   612,   509,   518,
-     368,   368,   566,   367,   566,   368,   103,   367,   367,   367,
-     367,   367,   367,   367,   367,   489,   580,   580,   402,   369,
-     370,   369,   369,     3,   608,   733,   737,   172,   389,   390,
-      27,   310,   719,    32,    50,   368,   368,   368,     3,   369,
-     369,   566,   370,   369,    87,    30,   610,   161,   210,   473,
-     369,   138,   195,    45,    47,   392,   388,   370,   598,     7,
-     395,   370,   765,   380,   380,   683,   370,   619,   549,   566,
-     604,   687,   688,   172,   691,     4,   772,   725,    96,   134,
-     380,    96,     4,   380,   193,   608,   136,   224,   651,   659,
-     664,   670,   671,   745,   255,    15,    15,     3,   163,   380,
-     368,   496,   532,   367,   552,   552,   367,     7,     9,   637,
-     638,   644,   369,   369,   369,   386,     3,   310,   721,    24,
-      59,    77,    78,   720,     7,     7,     7,   111,   762,     3,
-     633,   634,   369,   369,   201,   289,   467,   124,   187,   391,
-     391,    46,    48,    46,    48,     4,     7,   601,    97,   620,
-     550,   101,   156,   369,   370,   368,   176,   690,   303,   697,
-     519,    96,   653,   657,   380,   380,   380,   367,   370,   641,
-     647,   648,   649,   163,   566,   514,   515,   575,   604,   750,
-     256,   257,   494,   495,   163,   369,   369,   369,   370,    24,
-       4,     4,     4,     4,   369,   369,   370,     7,   108,   369,
-     370,   201,   201,   368,   242,   166,   474,   137,   169,   369,
-     370,   369,   380,   380,   687,   552,   165,   692,   304,   698,
-     519,   224,   262,   370,   640,   641,   654,   659,   662,   664,
-     666,   667,   668,   669,   675,   745,   748,   156,   552,   674,
-     670,   640,   658,   514,   163,   370,     7,   369,   370,   514,
-     647,   647,   637,     4,   310,    78,    77,     7,   370,   598,
-     634,   380,   380,   402,     4,   167,   475,     4,   369,   368,
-     250,   694,     7,   185,   308,   699,   566,   653,   566,   367,
-     367,   514,   515,   494,   534,   247,   663,    24,     4,     4,
-     369,     7,   369,     4,   369,   402,   696,     4,   310,     4,
-     309,   310,   369,   659,   664,   672,   673,   745,   201,   499,
-     647,     4,   369,   369,   251,   255,   369,   370,   496,   647,
-     647,   672
+     528,   578,   582,   618,   619,   622,   625,   665,   667,   677,
+     685,   686,   706,   707,   709,   712,   714,   745,   746,   750,
+     755,   759,   760,   761,   762,   771,   775,    26,   380,   600,
+     368,   253,   178,   192,   242,   626,   202,    24,    33,    34,
+      41,    60,    69,    88,    91,   106,   140,   158,   178,   192,
+     194,   196,   198,   206,   207,   209,   210,   238,   241,   273,
+     301,   315,   317,   327,   328,   404,   405,   406,   626,   731,
+     149,   196,    24,    60,    69,   157,   192,   196,   198,   238,
+     241,   273,   301,   317,   327,   328,   626,   115,   138,   161,
+     179,   181,   186,   195,   208,   271,   272,   380,   433,   434,
+     435,   436,   437,   615,   368,   163,   215,   216,   484,   202,
+     115,   140,   222,   505,   507,   509,   196,   264,   331,   380,
+     317,   600,   604,   253,   266,   380,   518,   582,     4,   616,
+       4,   616,     4,   228,    24,   157,   192,   196,   228,   368,
+     578,   115,   208,   271,   272,   433,   436,   172,   265,    17,
+     125,   196,   266,   278,   282,   283,   319,   380,   578,   380,
+       4,   317,   368,   368,   368,   224,   520,     0,   367,   131,
+     138,   142,   187,   230,   379,   414,   371,    98,   100,   297,
+     517,   368,   102,   371,   251,   368,    16,     4,     5,     6,
+       7,     8,     9,    11,    12,    13,    18,    93,   112,   169,
+     196,   241,   278,   279,   292,   293,   294,   295,   368,   380,
+     565,   566,   568,   569,   570,   572,   575,   576,   582,   586,
+     588,   589,   594,   595,   596,   597,   598,   605,   614,   746,
+     748,   749,   751,   752,   754,   380,   601,   601,   380,   711,
+      26,   176,   238,   301,   471,   615,   169,   198,   380,   603,
+     615,   603,     3,   380,   603,   603,   185,   198,   317,   266,
+     600,   600,   600,   404,   157,   603,    26,   604,   153,   615,
+     380,   710,   238,   615,   380,   600,   615,   600,   600,   600,
+     600,   185,   198,   266,   600,   600,   600,   600,   177,   368,
+     428,   428,   428,   172,   172,   172,   172,   370,   193,   370,
+     380,   605,   604,   506,   298,   110,   111,   122,   250,   277,
+     368,   532,   567,   568,   569,   574,   583,   585,   605,   660,
+     662,   708,   746,   748,   751,   153,   380,   332,   107,   172,
+     265,   600,   101,   192,   380,   493,   187,   371,     4,   616,
+     380,   709,     3,   600,   153,   616,   567,   368,   177,   172,
+     172,   172,   172,   149,   368,   368,   368,   368,   368,   368,
+     368,   368,   368,   251,   368,   266,     3,   567,   567,   369,
+     192,   319,   371,   380,   753,   115,   296,   526,   115,   526,
+      99,   380,   567,   574,   579,   580,   581,   584,   380,   753,
+     371,   380,   567,   577,   584,   370,   368,   171,   578,   368,
+     247,   280,   567,   590,   593,   368,   368,   368,   709,   224,
+     368,   518,   567,   568,   605,   371,   372,   661,   371,   661,
+     160,   614,   368,   371,   176,   444,   368,   628,   371,   208,
+     716,   600,   165,   172,   157,   603,   371,   101,   368,   425,
+     137,   770,   235,   236,   237,   680,   628,   250,     4,   603,
+     600,    96,   149,   101,   149,   380,   612,   628,   753,   200,
+     516,   549,   615,   124,   371,   124,   182,   417,   172,   409,
+     600,   124,     4,   600,    96,   201,   462,   193,   380,   402,
+     611,   710,   578,     4,   604,   435,   436,   437,   371,   369,
+     157,   485,   339,   340,   341,   342,   343,   344,   345,   346,
+     347,   348,   349,   350,   351,   503,   504,     7,   368,   567,
+     567,   368,   530,   531,   380,     4,   568,   605,   149,   533,
+     534,   535,   536,     4,   101,   109,   110,   111,   112,   113,
+     380,   371,   370,   661,   108,   368,   615,   380,   333,   567,
+     101,   464,   380,   174,   493,   511,   512,   611,   371,   380,
+     370,   617,   371,   142,   231,   756,   172,   142,   231,   232,
+     234,   416,   615,   369,   581,   710,   578,     4,   604,   436,
+      16,   577,   577,   577,   567,   577,   577,     3,   567,   577,
+     577,    96,   149,   369,   369,    97,   452,   600,   380,   753,
+     371,   526,   123,   368,   522,   523,   524,   525,   526,   522,
+     525,   115,   526,   320,   370,   370,   369,   370,   368,   380,
+     371,   369,   370,   567,   115,   140,   567,    94,    95,   116,
+     121,   125,   135,   141,   146,   162,   170,   180,   188,   211,
+     212,   213,   214,   219,   220,   267,   268,   269,   270,   301,
+     312,   313,   606,   607,   368,   607,   567,   106,   144,   368,
+     553,   554,   555,   556,   557,   558,   560,   561,   562,   564,
+     567,   247,   280,   591,   592,   251,   593,   584,   567,   567,
+     368,   518,   224,   518,   369,   369,   370,   101,   101,   112,
+     371,   380,   747,   748,   567,   372,   753,   614,   581,   371,
+     380,   165,   101,   446,    62,   156,   243,   369,   629,   630,
+     631,   254,   627,   371,   380,   709,   166,   310,   715,   628,
+      87,   600,   172,   101,   371,   380,   518,   519,   524,   129,
+     208,   384,   385,   386,   400,   401,   611,   368,   423,   427,
+     153,   768,   769,   171,   138,   161,   195,   681,   627,   623,
+     624,   626,   101,   101,   600,   600,   567,   567,   172,   627,
+     628,   133,   553,   174,   492,   615,   371,   380,   600,   600,
+     138,   437,   371,   369,   370,   193,   193,   193,   193,   201,
+     430,   371,   380,     3,   492,     3,   368,   368,     7,   368,
+     502,   502,     7,     7,   503,   201,   370,   508,   567,   585,
+     530,    93,   583,   586,   587,   251,   101,   101,   276,   368,
+     537,   541,   546,   547,   600,   604,   200,   516,     4,    20,
+     380,   573,   567,   567,   567,   567,   567,   753,   567,   574,
+     108,   567,   581,   615,   334,   337,   338,   666,   315,   493,
+     368,   200,   370,   516,   107,   380,   371,     4,   371,   380,
+      34,    72,   731,   735,    36,    72,   735,   736,   600,    91,
+     411,   411,   603,   411,   129,   400,   418,   615,   368,   369,
+     149,   149,   149,   149,   370,   369,   369,   369,   370,   369,
+     369,   149,   156,   369,   369,   600,   567,   123,   142,   231,
+     234,   371,   380,   753,   522,   525,   368,   224,   522,   525,
+     526,   522,   525,   567,   380,   567,   574,   567,   579,   580,
+     581,   380,   251,   567,   370,   567,   567,   369,   368,   368,
+     368,   175,   368,   368,   368,   368,   368,   211,   212,   313,
+     368,   368,   368,   581,   370,   553,   368,   566,   368,   553,
+     567,   104,   105,   246,   106,   107,   120,   156,   164,   168,
+     567,   567,   251,   592,   369,   101,   370,   581,   369,   518,
+     584,   709,   709,   380,   371,   373,   567,   368,   369,   380,
+     371,   368,   603,   149,   369,   370,   605,   607,   609,   709,
+      73,    74,    75,    76,    78,    79,    80,    83,   636,   637,
+     380,   371,    38,    52,    53,    54,    55,    56,    57,    58,
+      61,    71,   742,   743,    59,   713,   254,   744,   368,   468,
+     600,   600,   380,   371,   201,   203,   381,   380,   600,   369,
+     370,   126,   147,   153,   176,   194,   125,   211,   214,   606,
+     610,   709,   402,   101,   368,   370,   427,   172,   149,   367,
+     251,   623,   380,   372,   705,     4,     4,   459,   201,   757,
+     757,   600,   637,   627,   171,   368,   380,   371,   468,   380,
+     611,   436,   436,   436,   436,    68,   380,   371,   428,   567,
+     567,     7,   501,   300,     7,   111,   369,   370,   200,   369,
+     251,   709,   709,   541,   547,   368,   520,   547,   370,   282,
+     283,   284,   286,   287,   288,   543,   545,   368,   153,   550,
+      23,   607,   368,   567,   369,   335,   336,   334,     3,    41,
+      97,   100,   116,   157,   159,   163,   201,   204,   217,   218,
+     221,   223,   255,   490,   491,   133,   512,   492,   567,   380,
+     380,   371,    26,   380,    26,   417,   735,   380,   723,    35,
+     737,   307,   413,   611,   386,   412,   386,   380,   581,   436,
+     436,   436,   436,   567,   251,   251,   251,     3,   251,   251,
+     567,   567,   251,   251,   369,   453,   454,   567,   573,   753,
+     371,   402,   518,   522,   525,   320,   369,   567,   369,   369,
+       7,     7,     7,     7,     7,     7,     7,     7,     7,     7,
+       7,   369,   567,   369,   553,   553,   567,   120,   156,   168,
+     115,   116,   189,   563,   567,   567,   368,   566,   106,   169,
+     567,   246,   607,   567,   369,   369,   369,   369,   371,   112,
+     371,   380,   747,   373,   581,   380,   402,   598,   630,   609,
+     204,   608,   368,     4,   446,   380,   310,     4,   101,   717,
+     711,    96,   611,   368,   368,   380,    44,    44,    91,   140,
+     382,   385,   368,   165,   406,   165,   368,   368,   368,   116,
+     301,   709,   394,   369,   224,   422,   519,     3,   764,   765,
+     768,   600,   380,   602,   367,   628,     3,   703,   704,   186,
+     250,   529,   696,   200,   460,   325,   201,   758,   758,   368,
+     166,   250,   642,   637,   380,   613,   491,   380,   371,   201,
+     432,   432,   432,   174,   371,   380,   197,   487,   529,   369,
+     369,   369,   370,   508,     7,   508,   567,   553,   369,   369,
+     251,   520,   369,   369,   541,   285,   544,   544,   544,   543,
+     290,   402,   540,   123,   155,   551,    19,    21,    22,   581,
+       7,   209,    97,    60,   176,   380,   567,     4,   144,   106,
+     369,   370,   171,   380,   753,   417,   753,   609,   101,    40,
+      41,    42,    43,    49,    51,    66,   106,   166,   254,   310,
+     739,   740,   741,   209,   774,   370,   370,   417,   369,   370,
+     369,   369,   369,   370,   118,   139,   455,   455,   753,   369,
+     369,   567,   369,   369,   369,   369,   370,   369,   369,   370,
+     369,   369,   369,   369,   369,   369,   369,   567,   368,   566,
+     567,   566,   105,   584,   169,   143,   250,   559,   567,   311,
+     571,   369,   371,   371,   112,   380,   380,   371,   369,   369,
+     196,   447,   108,   137,   637,   372,   636,    81,    82,   633,
+     149,    59,   166,   368,   718,    25,    35,    70,    78,    87,
+     106,   293,   330,   726,   727,   728,   709,   369,   611,   540,
+      91,   553,   368,   368,   368,   402,     7,     7,    41,   106,
+     126,   137,   169,   176,   181,   194,   201,   281,   306,   311,
+     318,   393,   396,   398,   518,   201,   426,   369,   370,    97,
+     678,   371,   370,   627,   107,   373,   703,   509,   600,   694,
+     697,     3,   693,     4,   107,   326,   403,   611,   742,   643,
+      96,   492,   369,   380,   152,   380,   371,   368,     7,   508,
+     369,   369,   371,   371,   369,   101,   380,   368,   542,   566,
+     604,   369,   132,   184,   453,   553,   452,    22,   369,   165,
+     165,   218,   490,   613,   368,   732,   732,   181,   724,    31,
+      32,    38,    38,    38,    38,   172,    37,    40,   743,   169,
+      24,    59,    67,   741,     3,   368,   773,   611,   386,   567,
+     251,   251,   251,   454,   452,     7,     7,   105,   584,   559,
+     567,   369,   587,   143,   600,   369,   753,   753,   371,   371,
+     112,   380,   567,   106,   448,     4,     5,     6,     7,     9,
+      18,   110,   111,   169,   599,   599,     7,   108,    62,   156,
+     243,    62,   156,   243,   598,     4,   743,   719,   723,   101,
+       4,   149,   164,   289,    25,   368,   729,   730,   736,   728,
+     642,   369,   369,   369,   402,   403,   403,   369,   369,   369,
+     306,   169,   368,   599,   165,   600,   185,   368,    60,   116,
+     600,   123,   126,   155,   764,     7,   239,   682,   371,   380,
+     602,   637,     3,     4,   702,   532,   380,   251,   370,   179,
+     701,   329,   330,   369,   370,   455,   310,   136,   199,   451,
+     642,   644,   645,   646,   651,   652,   656,   709,   371,   174,
+     380,   488,   489,   567,   508,   753,   753,   380,   546,   172,
+     289,   548,   101,   380,   368,   539,   368,   368,    96,   552,
+     144,   492,   369,   631,   632,   733,   734,    89,   738,   254,
+      86,   137,   725,    35,    44,    44,   169,    38,    39,   172,
+       4,     4,    59,     3,   772,   773,   369,   369,   369,   567,
+     369,   587,   368,   368,   753,   380,   753,   371,   264,   186,
+      63,   449,     7,     9,     7,     9,   637,   637,   373,     4,
+     369,   370,    87,   368,    28,   609,    30,    87,   370,   201,
+     472,   368,   369,   369,   369,   553,   427,   368,   399,    92,
+     305,   395,   397,   611,   174,   368,   766,   767,   240,   295,
+     683,   684,   642,   679,   380,   371,   370,   642,   535,   536,
+     101,   687,   694,     4,   307,   611,    59,   130,   261,   380,
+     653,   657,   106,   258,   259,   260,   654,   251,   645,    15,
+      84,    96,   107,   113,   127,   138,   145,   150,   151,   173,
+     186,   187,   195,   224,   245,   249,   252,   262,   366,   380,
+     479,   480,   481,   482,   483,   486,   497,   498,   500,   510,
+     513,   582,   605,   640,   641,   647,   659,   660,   663,   665,
+     667,   668,   669,   670,   676,   746,   749,   367,   642,   380,
+     369,   370,   368,   368,   369,   553,   368,   380,   386,   538,
+     380,   453,   453,   195,   301,   492,   605,   369,   370,   603,
+     609,    27,   106,   599,   571,   101,    50,   169,     4,   121,
+     162,   211,   763,   369,   370,   251,   251,   581,   581,   380,
+     753,   567,   101,   633,   723,   402,    29,   101,   101,   736,
+     165,   106,   476,   538,   393,   406,   369,   172,   387,   388,
+     389,     4,   201,   123,   369,   370,     7,   370,   101,   101,
+     370,   380,   602,   516,   380,   368,   690,   380,   774,   455,
+       4,    64,    88,    90,   134,   450,   370,   609,   244,   148,
+       4,    65,   137,   150,   151,   368,   368,   519,   567,   567,
+     613,   613,   380,   193,   613,   509,   518,   368,   368,   567,
+     367,   567,   368,   103,   367,   367,   367,   367,   367,   367,
+     367,   367,   489,   581,   581,   402,   369,   370,   369,   369,
+       3,   609,   734,   738,   172,   389,   390,    27,   310,   720,
+      32,    50,   368,   368,   368,     3,   369,   369,   567,   370,
+     369,    87,    30,   611,   161,   210,   473,   369,   138,   195,
+      45,    47,   392,   388,   370,   599,     7,   395,   370,   766,
+     380,   380,   684,   370,   620,   550,   567,   605,   688,   689,
+     172,   692,     4,   773,   726,    96,   134,   380,    96,     4,
+     380,   193,   609,   136,   224,   652,   660,   665,   671,   672,
+     746,   255,    15,    15,     3,   163,   380,   368,   496,   532,
+     367,   553,   553,   367,     7,     9,   638,   639,   645,   369,
+     369,   369,   386,     3,   310,   722,    24,    59,    77,    78,
+     721,     7,     7,     7,   111,   763,     3,   634,   635,   369,
+     369,   201,   289,   467,   124,   187,   391,   391,    46,    48,
+      46,    48,     4,     7,   602,    97,   621,   551,   101,   156,
+     369,   370,   368,   176,   691,   303,   698,   519,    96,   654,
+     658,   380,   380,   380,   367,   370,   642,   648,   649,   650,
+     163,   567,   514,   515,   576,   605,   751,   256,   257,   494,
+     495,   163,   369,   369,   369,   370,    24,     4,     4,     4,
+       4,   369,   369,   370,     7,   108,   369,   370,   201,   201,
+     368,   242,   166,   474,   137,   169,   369,   370,   369,   380,
+     380,   688,   553,   165,   693,   304,   699,   519,   224,   262,
+     370,   641,   642,   655,   660,   663,   665,   667,   668,   669,
+     670,   676,   746,   749,   156,   553,   675,   671,   641,   659,
+     514,   163,   370,     7,   369,   370,   514,   648,   648,   638,
+       4,   310,    78,    77,     7,   370,   599,   635,   380,   380,
+     402,     4,   167,   475,     4,   369,   368,   250,   695,     7,
+     185,   308,   700,   567,   654,   567,   367,   367,   514,   515,
+     494,   535,   247,   664,    24,     4,     4,   369,     7,   369,
+       4,   369,   402,   697,     4,   310,     4,   309,   310,   369,
+     660,   665,   673,   674,   746,   201,   499,   648,     4,   369,
+     369,   251,   255,   369,   370,   496,   648,   648,   673
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -7711,9 +7689,18 @@ static const yytype_uint16 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -7770,7 +7757,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -8509,787 +8496,787 @@ yyreduce:
     {
         case 2:
 
-/* Line 1455 of yacc.c  */
-#line 677 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 651 "./sql3.y"
     { }
     break;
 
   case 3:
 
-/* Line 1455 of yacc.c  */
-#line 678 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 652 "./sql3.y"
     { }
     break;
 
   case 4:
 
-/* Line 1455 of yacc.c  */
-#line 681 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 655 "./sql3.y"
     { parse_tree = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 5:
 
-/* Line 1455 of yacc.c  */
-#line 688 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 662 "./sql3.y"
     { (yyval.tree) = t_listst (2, SCHEMA_ELEMENT_LIST,
 							t_list_to_array ((yyvsp[(1) - (1)].list))); }
     break;
 
   case 6:
 
-/* Line 1455 of yacc.c  */
-#line 690 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 664 "./sql3.y"
     { (yyval.tree) = t_listst (2, SCHEMA_ELEMENT_LIST, t_list (1, (yyvsp[(1) - (1)].tree))); }
     break;
 
   case 7:
 
-/* Line 1455 of yacc.c  */
-#line 691 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 665 "./sql3.y"
     { (yyval.tree) = t_listst (2, SCHEMA_ELEMENT_LIST, t_list (1, (yyvsp[(1) - (1)].tree))); }
     break;
 
   case 8:
 
-/* Line 1455 of yacc.c  */
-#line 692 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 666 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 9:
 
-/* Line 1455 of yacc.c  */
-#line 693 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 667 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 10:
 
-/* Line 1455 of yacc.c  */
-#line 694 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 668 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 11:
 
-/* Line 1455 of yacc.c  */
-#line 695 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 669 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 12:
 
-/* Line 1455 of yacc.c  */
-#line 696 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 670 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 13:
 
-/* Line 1455 of yacc.c  */
-#line 697 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 671 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 14:
 
-/* Line 1455 of yacc.c  */
-#line 698 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 672 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 15:
 
-/* Line 1455 of yacc.c  */
-#line 714 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 688 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 16:
 
-/* Line 1455 of yacc.c  */
-#line 715 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 689 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 17:
 
-/* Line 1455 of yacc.c  */
-#line 716 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 690 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 18:
 
-/* Line 1455 of yacc.c  */
-#line 717 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 691 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); }
     break;
 
   case 37:
 
-/* Line 1455 of yacc.c  */
-#line 744 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 718 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 38:
 
-/* Line 1455 of yacc.c  */
-#line 745 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 719 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 39:
 
-/* Line 1455 of yacc.c  */
-#line 746 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 720 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 40:
 
-/* Line 1455 of yacc.c  */
-#line 747 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 721 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 41:
 
-/* Line 1455 of yacc.c  */
-#line 748 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 722 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 42:
 
-/* Line 1455 of yacc.c  */
-#line 749 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 723 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 43:
 
-/* Line 1455 of yacc.c  */
-#line 750 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 724 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 44:
 
-/* Line 1455 of yacc.c  */
-#line 751 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 725 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 45:
 
-/* Line 1455 of yacc.c  */
-#line 752 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 726 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 46:
 
-/* Line 1455 of yacc.c  */
-#line 753 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 727 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 47:
 
-/* Line 1455 of yacc.c  */
-#line 754 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 728 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 48:
 
-/* Line 1455 of yacc.c  */
-#line 755 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 729 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 49:
 
-/* Line 1455 of yacc.c  */
-#line 756 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 730 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 50:
 
-/* Line 1455 of yacc.c  */
-#line 757 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 731 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 51:
 
-/* Line 1455 of yacc.c  */
-#line 758 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 732 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 52:
 
-/* Line 1455 of yacc.c  */
-#line 759 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 733 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 53:
 
-/* Line 1455 of yacc.c  */
-#line 760 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 734 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 54:
 
-/* Line 1455 of yacc.c  */
-#line 761 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 735 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 55:
 
-/* Line 1455 of yacc.c  */
-#line 762 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 736 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 56:
 
-/* Line 1455 of yacc.c  */
-#line 763 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 737 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 57:
 
-/* Line 1455 of yacc.c  */
-#line 764 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 738 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 58:
 
-/* Line 1455 of yacc.c  */
-#line 765 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 739 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 59:
 
-/* Line 1455 of yacc.c  */
-#line 766 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 740 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 60:
 
-/* Line 1455 of yacc.c  */
-#line 767 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 741 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 61:
 
-/* Line 1455 of yacc.c  */
-#line 768 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 742 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 62:
 
-/* Line 1455 of yacc.c  */
-#line 769 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 743 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 63:
 
-/* Line 1455 of yacc.c  */
-#line 770 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 744 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 64:
 
-/* Line 1455 of yacc.c  */
-#line 771 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 745 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 65:
 
-/* Line 1455 of yacc.c  */
-#line 772 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 746 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 66:
 
-/* Line 1455 of yacc.c  */
-#line 773 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 747 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 67:
 
-/* Line 1455 of yacc.c  */
-#line 774 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 748 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 68:
 
-/* Line 1455 of yacc.c  */
-#line 775 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 749 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 69:
 
-/* Line 1455 of yacc.c  */
-#line 776 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 750 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 70:
 
-/* Line 1455 of yacc.c  */
-#line 777 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 751 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 71:
 
-/* Line 1455 of yacc.c  */
-#line 778 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 752 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 72:
 
-/* Line 1455 of yacc.c  */
-#line 779 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 753 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 73:
 
-/* Line 1455 of yacc.c  */
-#line 780 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 754 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 74:
 
-/* Line 1455 of yacc.c  */
-#line 781 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 755 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 75:
 
-/* Line 1455 of yacc.c  */
-#line 782 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 756 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 76:
 
-/* Line 1455 of yacc.c  */
-#line 783 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 757 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 77:
 
-/* Line 1455 of yacc.c  */
-#line 784 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 758 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 78:
 
-/* Line 1455 of yacc.c  */
-#line 785 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 759 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 79:
 
-/* Line 1455 of yacc.c  */
-#line 786 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 760 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 80:
 
-/* Line 1455 of yacc.c  */
-#line 787 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 761 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 81:
 
-/* Line 1455 of yacc.c  */
-#line 788 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 762 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 82:
 
-/* Line 1455 of yacc.c  */
-#line 789 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 763 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 83:
 
-/* Line 1455 of yacc.c  */
-#line 790 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 764 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 84:
 
-/* Line 1455 of yacc.c  */
-#line 791 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 765 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 85:
 
-/* Line 1455 of yacc.c  */
-#line 792 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 766 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 86:
 
-/* Line 1455 of yacc.c  */
-#line 793 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 767 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 87:
 
-/* Line 1455 of yacc.c  */
-#line 794 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 768 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 88:
 
-/* Line 1455 of yacc.c  */
-#line 795 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 769 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 89:
 
-/* Line 1455 of yacc.c  */
-#line 796 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 770 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 90:
 
-/* Line 1455 of yacc.c  */
-#line 797 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 771 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 91:
 
-/* Line 1455 of yacc.c  */
-#line 798 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 772 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 92:
 
-/* Line 1455 of yacc.c  */
-#line 799 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 773 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 93:
 
-/* Line 1455 of yacc.c  */
-#line 800 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 774 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 94:
 
-/* Line 1455 of yacc.c  */
-#line 801 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 775 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 95:
 
-/* Line 1455 of yacc.c  */
-#line 802 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 776 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 96:
 
-/* Line 1455 of yacc.c  */
-#line 803 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 777 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 97:
 
-/* Line 1455 of yacc.c  */
-#line 804 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 778 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 98:
 
-/* Line 1455 of yacc.c  */
-#line 805 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 779 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 99:
 
-/* Line 1455 of yacc.c  */
-#line 806 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 780 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 100:
 
-/* Line 1455 of yacc.c  */
-#line 807 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 781 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 101:
 
-/* Line 1455 of yacc.c  */
-#line 808 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 782 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 102:
 
-/* Line 1455 of yacc.c  */
-#line 809 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 783 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 103:
 
-/* Line 1455 of yacc.c  */
-#line 810 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 784 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 104:
 
-/* Line 1455 of yacc.c  */
-#line 811 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 785 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 105:
 
-/* Line 1455 of yacc.c  */
-#line 812 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 786 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 106:
 
-/* Line 1455 of yacc.c  */
-#line 813 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 787 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 107:
 
-/* Line 1455 of yacc.c  */
-#line 814 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 788 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 108:
 
-/* Line 1455 of yacc.c  */
-#line 815 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 789 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 109:
 
-/* Line 1455 of yacc.c  */
-#line 816 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 790 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 110:
 
-/* Line 1455 of yacc.c  */
-#line 817 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 791 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 111:
 
-/* Line 1455 of yacc.c  */
-#line 818 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 792 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 112:
 
-/* Line 1455 of yacc.c  */
-#line 819 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 793 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 113:
 
-/* Line 1455 of yacc.c  */
-#line 820 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 794 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 114:
 
-/* Line 1455 of yacc.c  */
-#line 821 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 795 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 115:
 
-/* Line 1455 of yacc.c  */
-#line 822 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 796 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 116:
 
-/* Line 1455 of yacc.c  */
-#line 823 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 797 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ("__tag"); }
     break;
 
   case 117:
 
-/* Line 1455 of yacc.c  */
-#line 824 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 798 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 118:
 
-/* Line 1455 of yacc.c  */
-#line 825 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 799 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 119:
 
-/* Line 1455 of yacc.c  */
-#line 829 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 803 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 120:
 
-/* Line 1455 of yacc.c  */
-#line 830 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 804 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
   case 121:
 
-/* Line 1455 of yacc.c  */
-#line 831 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 805 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 122:
 
-/* Line 1455 of yacc.c  */
-#line 835 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 809 "./sql3.y"
     { (yyval.intval) = T_ROW; }
     break;
 
   case 123:
 
-/* Line 1455 of yacc.c  */
-#line 836 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 810 "./sql3.y"
     { (yyval.intval) = T_COLUMN; }
     break;
 
   case 124:
 
-/* Line 1455 of yacc.c  */
-#line 837 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 811 "./sql3.y"
     { (yyval.intval) = T_DISTINCT_COLUMNS; }
     break;
 
   case 125:
 
-/* Line 1455 of yacc.c  */
-#line 843 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 817 "./sql3.y"
     { (yyval.tree) = t_listst (4, TABLE_DEF, (yyvsp[(3) - (7)].strval),
 				 t_list_to_array (sqlc_ensure_primary_key (sqlp_process_col_options ((yyvsp[(3) - (7)].strval), (yyvsp[(5) - (7)].list)))), (yyvsp[(7) - (7)].intval)); }
     break;
 
   case 126:
 
-/* Line 1455 of yacc.c  */
-#line 846 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 820 "./sql3.y"
     { (yyval.tree) = t_listst (4, CREATE_TABLE_AS, (yyvsp[(3) - (6)].strval), (yyvsp[(5) - (6)].tree), t_box_num ((ptrlong) (yyvsp[(6) - (6)].intval))); }
     break;
 
   case 128:
 
-/* Line 1455 of yacc.c  */
-#line 852 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 826 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 130:
 
-/* Line 1455 of yacc.c  */
-#line 857 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 831 "./sql3.y"
     { (yyval.list) = t_CONS (NULL, t_CONS ((yyvsp[(1) - (1)].tree), NULL)); }
     break;
 
   case 131:
 
-/* Line 1455 of yacc.c  */
-#line 862 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 836 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (3)].strval), t_CONS (t_list (2, (yyvsp[(2) - (3)].tree), t_list_to_array ((yyvsp[(3) - (3)].list))), NULL)); }
     break;
 
   case 132:
 
-/* Line 1455 of yacc.c  */
-#line 866 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 840 "./sql3.y"
     { (yyval.tree) = t_listst (2, 0, 0); }
     break;
 
   case 133:
 
-/* Line 1455 of yacc.c  */
-#line 867 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 841 "./sql3.y"
     {
 			  caddr_t *l = (caddr_t *)(yyvsp[(1) - (1)].tree);
 			(yyval.tree) = (l[0] ? t_listst (2, 0, l[1]) : t_listst (2, l[1], 0));
@@ -9298,8 +9285,8 @@ yyreduce:
 
   case 134:
 
-/* Line 1455 of yacc.c  */
-#line 872 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 846 "./sql3.y"
     {
 			  caddr_t *l  = (caddr_t *)(yyvsp[(1) - (2)].tree);
 			  caddr_t *ll = (caddr_t *)(yyvsp[(2) - (2)].tree);
@@ -9311,99 +9298,99 @@ yyreduce:
 
   case 135:
 
-/* Line 1455 of yacc.c  */
-#line 882 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 856 "./sql3.y"
     { (yyval.tree) = t_listst (2, 0, (ptrlong) (yyvsp[(3) - (3)].intval)); }
     break;
 
   case 136:
 
-/* Line 1455 of yacc.c  */
-#line 883 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 857 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 137:
 
-/* Line 1455 of yacc.c  */
-#line 887 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 861 "./sql3.y"
     { (yyval.tree) = t_listst (2, (ptrlong) 1, (ptrlong) (yyvsp[(3) - (3)].intval)); }
     break;
 
   case 138:
 
-/* Line 1455 of yacc.c  */
-#line 891 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 865 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 139:
 
-/* Line 1455 of yacc.c  */
-#line 892 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 866 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 140:
 
-/* Line 1455 of yacc.c  */
-#line 896 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 870 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
   case 141:
 
-/* Line 1455 of yacc.c  */
-#line 897 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 871 "./sql3.y"
     { (yyval.intval) = 2; }
     break;
 
   case 142:
 
-/* Line 1455 of yacc.c  */
-#line 898 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 872 "./sql3.y"
     { (yyval.intval) = 3; }
     break;
 
   case 143:
 
-/* Line 1455 of yacc.c  */
-#line 902 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 876 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 144:
 
-/* Line 1455 of yacc.c  */
-#line 903 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 877 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 145:
 
-/* Line 1455 of yacc.c  */
-#line 904 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 878 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
   case 146:
 
-/* Line 1455 of yacc.c  */
-#line 905 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 879 "./sql3.y"
     { (yyval.intval) = 2; }
     break;
 
   case 147:
 
-/* Line 1455 of yacc.c  */
-#line 906 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 880 "./sql3.y"
     { (yyval.intval) = 3; }
     break;
 
   case 148:
 
-/* Line 1455 of yacc.c  */
-#line 911 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 885 "./sql3.y"
     {
 		  caddr_t *l = (caddr_t *) (yyvsp[(4) - (5)].tree);
 		  (yyval.tree) = t_listst (9, FOREIGN_KEY, NULL, (yyvsp[(2) - (5)].strval), (yyvsp[(3) - (5)].tree), NULL, l[0], l[1], NULL, (ptrlong) (yyvsp[(5) - (5)].intval));
@@ -9412,148 +9399,148 @@ yyreduce:
 
   case 149:
 
-/* Line 1455 of yacc.c  */
-#line 918 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 892 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
   case 150:
 
-/* Line 1455 of yacc.c  */
-#line 919 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 893 "./sql3.y"
     { (yyval.list) = (yyvsp[(2) - (2)].tree) ? t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].tree), NULL)) : (yyvsp[(1) - (2)].list); }
     break;
 
   case 151:
 
-/* Line 1455 of yacc.c  */
-#line 923 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 897 "./sql3.y"
     { (yyval.tree) = t_listst (2, CO_ID_START, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 152:
 
-/* Line 1455 of yacc.c  */
-#line 924 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 898 "./sql3.y"
     { (yyval.tree) = t_listst (2, CO_ID_INCREMENT_BY, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 153:
 
-/* Line 1455 of yacc.c  */
-#line 936 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 910 "./sql3.y"
     { (yyval.tree) = t_listst (2, CO_COMPRESS, (ptrlong)CC_NONE); }
     break;
 
   case 154:
 
-/* Line 1455 of yacc.c  */
-#line 937 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 911 "./sql3.y"
     { (yyval.tree) = t_listst (2, CO_COMPRESS, (ptrlong)CC_OFFSET); }
     break;
 
   case 155:
 
-/* Line 1455 of yacc.c  */
-#line 938 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 912 "./sql3.y"
     { (yyval.tree) = t_listst (2, CO_COMPRESS, (ptrlong)CC_PREFIX); }
     break;
 
   case 156:
 
-/* Line 1455 of yacc.c  */
-#line 943 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 917 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 157:
 
-/* Line 1455 of yacc.c  */
-#line 944 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 918 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 158:
 
-/* Line 1455 of yacc.c  */
-#line 948 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 922 "./sql3.y"
     { (yyval.tree) = (ST *) COL_NOT_NULL; }
     break;
 
   case 159:
 
-/* Line 1455 of yacc.c  */
-#line 949 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 923 "./sql3.y"
     { (yyval.tree) = (ST *) NULL; }
     break;
 
   case 160:
 
-/* Line 1455 of yacc.c  */
-#line 950 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 924 "./sql3.y"
     { (yyval.tree) = (ST *) CO_IDENTITY; }
     break;
 
   case 161:
 
-/* Line 1455 of yacc.c  */
-#line 951 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 925 "./sql3.y"
     { (yyval.tree) = t_listst (2, CO_IDENTITY, t_list_to_array ((yyvsp[(3) - (4)].list))); }
     break;
 
   case 162:
 
-/* Line 1455 of yacc.c  */
-#line 952 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 926 "./sql3.y"
     { (yyval.tree) = t_listst (5, INDEX_DEF, NULL, NULL, NULL, (ST *) 0); }
     break;
 
   case 163:
 
-/* Line 1455 of yacc.c  */
-#line 953 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 927 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 164:
 
-/* Line 1455 of yacc.c  */
-#line 954 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 928 "./sql3.y"
     { (yyval.tree) = t_listst (2, COL_DEFAULT, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 165:
 
-/* Line 1455 of yacc.c  */
-#line 955 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 929 "./sql3.y"
     { (yyval.tree) = t_listst (2, COL_COLLATE, (yyvsp[(2) - (2)].strval)); }
     break;
 
   case 166:
 
-/* Line 1455 of yacc.c  */
-#line 956 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 930 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 167:
 
-/* Line 1455 of yacc.c  */
-#line 957 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 931 "./sql3.y"
     { (yyval.tree) = t_listst (2, COL_XML_ID, (yyvsp[(3) - (3)].strval)); }
     break;
 
   case 168:
 
-/* Line 1455 of yacc.c  */
-#line 959 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 933 "./sql3.y"
     { (yyval.tree) = t_listst (3, CHECK_CONSTR, (yyvsp[(3) - (4)].tree), NULL); }
     break;
 
   case 169:
 
-/* Line 1455 of yacc.c  */
-#line 961 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 935 "./sql3.y"
     {
 		  ST * check;
 		  BIN_OP (check, BOP_NULL,
@@ -9566,59 +9553,59 @@ yyreduce:
 
   case 170:
 
-/* Line 1455 of yacc.c  */
-#line 969 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 943 "./sql3.y"
     { (yyval.tree) = t_listst (5, UNIQUE_DEF, NULL, NULL, NULL,
 					    (ST *) t_list (1, t_box_string ("unique"))); }
     break;
 
   case 171:
 
-/* Line 1455 of yacc.c  */
-#line 974 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 948 "./sql3.y"
     { (yyval.tree) = t_listst (6, NULL, NULL, NULL, (yyvsp[(2) - (5)].box), (yyvsp[(4) - (5)].box), (caddr_t) t_NULLCONST); }
     break;
 
   case 172:
 
-/* Line 1455 of yacc.c  */
-#line 975 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 949 "./sql3.y"
     { (yyval.tree) = t_listst (6, NULL, NULL, NULL, (yyvsp[(2) - (7)].box), (yyvsp[(4) - (7)].box), (yyvsp[(6) - (7)].box)); }
     break;
 
   case 173:
 
-/* Line 1455 of yacc.c  */
-#line 981 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 955 "./sql3.y"
     { (yyval.tree) = t_listst (2, TABLE_UNDER, t_list (1, (yyvsp[(2) - (2)].strval))); }
     break;
 
   case 174:
 
-/* Line 1455 of yacc.c  */
-#line 983 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 957 "./sql3.y"
     { (yyval.tree) = t_listst (5, INDEX_DEF, NULL, NULL,
 		    sqlp_string_col_list ((caddr_t *) t_list_to_array ((yyvsp[(5) - (7)].list))), (yyvsp[(7) - (7)].tree)); }
     break;
 
   case 175:
 
-/* Line 1455 of yacc.c  */
-#line 986 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 960 "./sql3.y"
     { (yyval.tree) = (yyvsp[(7) - (7)].tree); (yyvsp[(7) - (7)].tree)->_.fkey.fk_cols = (caddr_t*) t_list_to_array ((yyvsp[(5) - (7)].list)); (yyvsp[(7) - (7)].tree)->_.fkey.fk_name = (yyvsp[(1) - (7)].box); }
     break;
 
   case 176:
 
-/* Line 1455 of yacc.c  */
-#line 988 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 962 "./sql3.y"
     { (yyval.tree) = t_listst (3, CHECK_CONSTR, (yyvsp[(4) - (5)].tree), (yyvsp[(1) - (5)].box)); }
     break;
 
   case 177:
 
-/* Line 1455 of yacc.c  */
-#line 990 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 964 "./sql3.y"
     { (yyval.tree) =
 		  t_listst (5, UNIQUE_DEF, (yyvsp[(1) - (5)].box), NULL,
 		      sqlp_string_col_list ((caddr_t *) t_list_to_array ((yyvsp[(4) - (5)].list))),
@@ -9627,240 +9614,240 @@ yyreduce:
 
   case 178:
 
-/* Line 1455 of yacc.c  */
-#line 994 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 968 "./sql3.y"
     { (yyval.tree) = t_listst (4, COLUMN_GROUP, (yyvsp[(1) - (6)].box), (yyvsp[(3) - (6)].tree), sqlp_string_col_list (t_list_to_array ((yyvsp[(5) - (6)].list)))); }
     break;
 
   case 179:
 
-/* Line 1455 of yacc.c  */
-#line 998 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 972 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 180:
 
-/* Line 1455 of yacc.c  */
-#line 999 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 973 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 181:
 
-/* Line 1455 of yacc.c  */
-#line 1003 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 977 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].strval), NULL); }
     break;
 
   case 182:
 
-/* Line 1455 of yacc.c  */
-#line 1004 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 978 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].strval), NULL)); }
     break;
 
   case 183:
 
-/* Line 1455 of yacc.c  */
-#line 1008 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 982 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (2)].strval), NULL); }
     break;
 
   case 184:
 
-/* Line 1455 of yacc.c  */
-#line 1009 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 983 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (4)].list), t_CONS ((yyvsp[(3) - (4)].strval), NULL)); }
     break;
 
   case 185:
 
-/* Line 1455 of yacc.c  */
-#line 1013 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 987 "./sql3.y"
     { (yyval.box) = t_box_string ("clustered"); }
     break;
 
   case 186:
 
-/* Line 1455 of yacc.c  */
-#line 1014 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 988 "./sql3.y"
     { (yyval.box) = t_box_string ("unique"); }
     break;
 
   case 187:
 
-/* Line 1455 of yacc.c  */
-#line 1015 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 989 "./sql3.y"
     { (yyval.box) = t_box_string ("object_id"); }
     break;
 
   case 188:
 
-/* Line 1455 of yacc.c  */
-#line 1016 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 990 "./sql3.y"
     { (yyval.box) = t_box_string ("bitmap"); }
     break;
 
   case 189:
 
-/* Line 1455 of yacc.c  */
-#line 1017 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 991 "./sql3.y"
     { (yyval.box) = t_box_string ("distinct"); }
     break;
 
   case 190:
 
-/* Line 1455 of yacc.c  */
-#line 1018 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 992 "./sql3.y"
     { (yyval.box) = t_box_string ("column"); }
     break;
 
   case 191:
 
-/* Line 1455 of yacc.c  */
-#line 1019 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 993 "./sql3.y"
     { (yyval.box) = t_box_string ("not_null"); }
     break;
 
   case 192:
 
-/* Line 1455 of yacc.c  */
-#line 1020 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 994 "./sql3.y"
     { (yyval.box) = t_box_string ("no_pk"); }
     break;
 
   case 193:
 
-/* Line 1455 of yacc.c  */
-#line 1021 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 995 "./sql3.y"
     { (yyval.box) = t_box_string ("no_fill"); }
     break;
 
   case 194:
 
-/* Line 1455 of yacc.c  */
-#line 1025 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 999 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 195:
 
-/* Line 1455 of yacc.c  */
-#line 1026 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1000 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].box), NULL)); }
     break;
 
   case 196:
 
-/* Line 1455 of yacc.c  */
-#line 1030 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1004 "./sql3.y"
     { (yyval.tree) = (ST *) 0; }
     break;
 
   case 197:
 
-/* Line 1455 of yacc.c  */
-#line 1031 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1005 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
   case 198:
 
-/* Line 1455 of yacc.c  */
-#line 1037 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1011 "./sql3.y"
     { (yyval.tree) = t_listst (5, INDEX_DEF, (yyvsp[(4) - (9)].strval), (yyvsp[(6) - (9)].strval), t_list_to_array ((yyvsp[(8) - (9)].list)), (yyvsp[(2) - (9)].tree)); }
     break;
 
   case 199:
 
-/* Line 1455 of yacc.c  */
-#line 1040 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1014 "./sql3.y"
     { ST * opts = (ST *) t_box_append_1  ((caddr_t) (yyvsp[(2) - (12)].tree), (caddr_t) t_listst (5, PARTITION_DEF,  NULL, NULL, (yyvsp[(11) - (12)].box), t_list_to_array ((yyvsp[(12) - (12)].list))));
 		 (yyval.tree) = t_listst (5, INDEX_DEF, (yyvsp[(4) - (12)].strval), (yyvsp[(6) - (12)].strval), t_list_to_array ((yyvsp[(8) - (12)].list)), opts); }
     break;
 
   case 200:
 
-/* Line 1455 of yacc.c  */
-#line 1045 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1019 "./sql3.y"
     { (yyval.tree) = t_listst (3, INDEX_DROP, (yyvsp[(3) - (4)].box), (yyvsp[(4) - (4)].box)); }
     break;
 
   case 201:
 
-/* Line 1455 of yacc.c  */
-#line 1049 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1023 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 202:
 
-/* Line 1455 of yacc.c  */
-#line 1050 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1024 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].strval); }
     break;
 
   case 203:
 
-/* Line 1455 of yacc.c  */
-#line 1054 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1028 "./sql3.y"
     { (yyval.tree) = t_listst (2, TABLE_DROP, (yyvsp[(3) - (3)].strval)); }
     break;
 
   case 204:
 
-/* Line 1455 of yacc.c  */
-#line 1055 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1029 "./sql3.y"
     { (yyval.tree) = t_listst (2, TABLE_DROP, (yyvsp[(3) - (3)].strval)); }
     break;
 
   case 205:
 
-/* Line 1455 of yacc.c  */
-#line 1059 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1033 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 206:
 
-/* Line 1455 of yacc.c  */
-#line 1060 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1034 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
   case 207:
 
-/* Line 1455 of yacc.c  */
-#line 1064 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1038 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].list), NULL); }
     break;
 
   case 208:
 
-/* Line 1455 of yacc.c  */
-#line 1065 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1039 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].list), NULL)); }
     break;
 
   case 209:
 
-/* Line 1455 of yacc.c  */
-#line 1069 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1043 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].strval), NULL); }
     break;
 
   case 210:
 
-/* Line 1455 of yacc.c  */
-#line 1070 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1044 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].strval), NULL)); }
     break;
 
   case 211:
 
-/* Line 1455 of yacc.c  */
-#line 1075 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1049 "./sql3.y"
     {
 		  dk_set_t ret = NULL, col_defs_list = (yyvsp[(6) - (6)].list);
 		  DO_SET (dk_set_t, col_def, &col_defs_list)
@@ -9874,8 +9861,8 @@ yyreduce:
 
   case 212:
 
-/* Line 1455 of yacc.c  */
-#line 1085 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1059 "./sql3.y"
     {
 		  dk_set_t ret = NULL, col_ref_list = (yyvsp[(6) - (6)].list);
 		  DO_SET (caddr_t, col_ref, &col_ref_list)
@@ -9889,8 +9876,8 @@ yyreduce:
 
   case 213:
 
-/* Line 1455 of yacc.c  */
-#line 1095 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1069 "./sql3.y"
     {
 		  (yyval.list) = t_CONS (t_listst (3, MODIFY_COLUMN, (yyvsp[(3) - (6)].strval), t_list_to_array ((yyvsp[(6) - (6)].list))), NULL);
 		}
@@ -9898,57 +9885,57 @@ yyreduce:
 
   case 214:
 
-/* Line 1455 of yacc.c  */
-#line 1102 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1076 "./sql3.y"
     { (yyval.tree) = t_listst (3, TABLE_RENAME, (yyvsp[(3) - (5)].strval), (yyvsp[(5) - (5)].strval)); }
     break;
 
   case 215:
 
-/* Line 1455 of yacc.c  */
-#line 1107 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1081 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
   case 216:
 
-/* Line 1455 of yacc.c  */
-#line 1108 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1082 "./sql3.y"
     { (yyval.subtok) = 2; }
     break;
 
   case 217:
 
-/* Line 1455 of yacc.c  */
-#line 1109 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1083 "./sql3.y"
     { (yyval.subtok) = 3; }
     break;
 
   case 218:
 
-/* Line 1455 of yacc.c  */
-#line 1113 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1087 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 219:
 
-/* Line 1455 of yacc.c  */
-#line 1114 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1088 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
   case 220:
 
-/* Line 1455 of yacc.c  */
-#line 1115 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1089 "./sql3.y"
     { (yyval.intval) = 2; }
     break;
 
   case 221:
 
-/* Line 1455 of yacc.c  */
-#line 1120 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1094 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (9, FOREIGN_KEY, NULL, NULL, NULL, NULL, NULL, NULL, (ptrlong) (yyvsp[(2) - (3)].box), (ptrlong) 0);
 		}
@@ -9956,15 +9943,15 @@ yyreduce:
 
   case 222:
 
-/* Line 1455 of yacc.c  */
-#line 1123 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1097 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 223:
 
-/* Line 1455 of yacc.c  */
-#line 1128 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1102 "./sql3.y"
     { ST * c = (yyvsp[(5) - (5)].tree);
 	if (INDEX_DEF == c->type)
 	  c->type = 0;
@@ -9982,8 +9969,8 @@ yyreduce:
 
   case 224:
 
-/* Line 1455 of yacc.c  */
-#line 1145 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1119 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.SYS_CREATE_XML_SCHEMA"),
 		  t_list (1, (yyvsp[(4) - (4)].box))); }
@@ -9991,115 +9978,115 @@ yyreduce:
 
   case 225:
 
-/* Line 1455 of yacc.c  */
-#line 1152 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1126 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.SYS_DROP_XML_SCHEMA"),
 		  t_list (1, (yyvsp[(4) - (4)].box))); }
     break;
 
-  case 228:
+  case 227:
 
-/* Line 1455 of yacc.c  */
-#line 1164 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1138 "./sql3.y"
     { (yyval.tree) = t_listst (5, VIEW_DEF, NULL /* temp value, will set in view_def rule */,
 			sqlp_view_def ((ST **) (yyvsp[(1) - (4)].tree),
 			  (yyvsp[(3) - (4)].tree), 0), NULL, (ptrlong) (yyvsp[(4) - (4)].subtok)); }
     break;
 
-  case 229:
+  case 228:
 
-/* Line 1455 of yacc.c  */
-#line 1168 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1142 "./sql3.y"
     { (yyval.tree) = t_listst (5, VIEW_DEF, NULL /* temp value, will set in view_def rule */,
 			sqlp_view_def ((ST **) (yyvsp[(1) - (4)].tree),
 			  (yyvsp[(4) - (4)].tree), 0), NULL, (ptrlong) 0); }
     break;
 
-  case 230:
+  case 229:
 
-/* Line 1455 of yacc.c  */
-#line 1174 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1148 "./sql3.y"
     { sqlp_in_view ((yyvsp[(3) - (3)].strval)); }
     break;
 
-  case 231:
+  case 230:
 
-/* Line 1455 of yacc.c  */
-#line 1176 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1150 "./sql3.y"
     { (yyval.tree) = (yyvsp[(5) - (5)].tree); (yyval.tree)->_.view_def.name = (yyvsp[(3) - (5)].strval); }
     break;
 
-  case 232:
+  case 231:
 
-/* Line 1455 of yacc.c  */
-#line 1178 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1152 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, VIEW_DEF, (yyvsp[(4) - (12)].strval),
 		    t_list (4, PROC_TABLE, (yyvsp[(6) - (12)].strval), (yyvsp[(8) - (12)].tree),
 		      t_list_to_array (sqlc_ensure_primary_key (sqlp_process_col_options ((yyvsp[(4) - (12)].strval), (yyvsp[(11) - (12)].list))))),
 		    NULL, NULL); }
     break;
 
-  case 233:
+  case 232:
 
-/* Line 1455 of yacc.c  */
-#line 1185 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1159 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
-  case 234:
+  case 233:
 
-/* Line 1455 of yacc.c  */
-#line 1186 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1160 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
-  case 235:
+  case 234:
 
-/* Line 1455 of yacc.c  */
-#line 1190 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1164 "./sql3.y"
     { (yyval.tree) = t_listst (0); }
     break;
 
-  case 236:
+  case 235:
 
-/* Line 1455 of yacc.c  */
-#line 1191 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1165 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(2) - (3)].list)); }
     break;
 
-  case 237:
+  case 236:
 
-/* Line 1455 of yacc.c  */
-#line 1195 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1169 "./sql3.y"
     { (yyval.tree) = (ST *) 0; }
     break;
 
-  case 238:
+  case 237:
 
-/* Line 1455 of yacc.c  */
-#line 1196 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1170 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(2) - (3)].list)); }
     break;
 
-  case 239:
+  case 238:
 
-/* Line 1455 of yacc.c  */
-#line 1201 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1175 "./sql3.y"
     { (yyval.tree) = t_listst (3, SET_GROUP_STMT, (yyvsp[(5) - (5)].box), t_box_string ("dba")); }
     break;
 
-  case 240:
+  case 239:
 
-/* Line 1455 of yacc.c  */
-#line 1203 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1177 "./sql3.y"
     { (yyval.tree) = t_listst (4, GRANT_STMT, (yyvsp[(2) - (7)].box), (yyvsp[(4) - (7)].strval), t_list_to_array ((yyvsp[(6) - (7)].list))); }
     break;
 
-  case 241:
+  case 240:
 
-/* Line 1455 of yacc.c  */
-#line 1205 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1179 "./sql3.y"
     { (yyval.tree) = t_listst (4, GRANT_STMT,
 		    t_list (1,
 		      t_listst (3, NULL, GR_EXECUTE, NULL)),
@@ -10107,10 +10094,10 @@ yyreduce:
 		    t_list_to_array ((yyvsp[(6) - (7)].list))); }
     break;
 
-  case 242:
+  case 241:
 
-/* Line 1455 of yacc.c  */
-#line 1211 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1185 "./sql3.y"
     { (yyval.tree) = t_listst (4, GRANT_STMT,
 		    t_list (1,
                       t_listst (3, NULL, GR_REXECUTE, NULL)),
@@ -10118,10 +10105,10 @@ yyreduce:
 		    t_list_to_array ((yyvsp[(6) - (6)].list))); }
     break;
 
-  case 243:
+  case 242:
 
-/* Line 1455 of yacc.c  */
-#line 1217 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1191 "./sql3.y"
     { (yyval.tree) = t_listst (4, GRANT_STMT,
 		    t_list (1,
 		      t_listst (3, NULL, GR_UDT_UNDER, NULL)),
@@ -10129,38 +10116,38 @@ yyreduce:
 		    t_list_to_array ((yyvsp[(6) - (7)].list))); }
     break;
 
-  case 244:
+  case 243:
 
-/* Line 1455 of yacc.c  */
-#line 1224 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1198 "./sql3.y"
     { (yyval.tree) = t_listst (4, GRANT_ROLE_STMT, t_list_to_array ((yyvsp[(2) - (5)].list)), t_list_to_array ((yyvsp[(4) - (5)].list)), (ptrlong) (yyvsp[(5) - (5)].subtok)); }
     break;
 
-  case 245:
+  case 244:
 
-/* Line 1455 of yacc.c  */
-#line 1228 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1202 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
-  case 246:
+  case 245:
 
-/* Line 1455 of yacc.c  */
-#line 1229 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1203 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
-  case 247:
+  case 246:
 
-/* Line 1455 of yacc.c  */
-#line 1238 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1212 "./sql3.y"
     { (yyval.tree) = t_listst (4, REVOKE_STMT, (yyvsp[(2) - (6)].box), (yyvsp[(4) - (6)].strval), t_list_to_array ((yyvsp[(6) - (6)].list))); }
     break;
 
-  case 248:
+  case 247:
 
-/* Line 1455 of yacc.c  */
-#line 1241 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1215 "./sql3.y"
     { (yyval.tree) = t_listst (4, REVOKE_STMT,
 		    t_list (1,
 		      t_listst (3, NULL, GR_EXECUTE, NULL)),
@@ -10168,10 +10155,10 @@ yyreduce:
 		    t_list_to_array ((yyvsp[(6) - (6)].list))); }
     break;
 
-  case 249:
+  case 248:
 
-/* Line 1455 of yacc.c  */
-#line 1247 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1221 "./sql3.y"
     { (yyval.tree) = t_listst (4, REVOKE_STMT,
 		    t_list (1,
 		      t_listst (3, NULL, GR_UDT_UNDER, NULL)),
@@ -10179,10 +10166,10 @@ yyreduce:
 		    t_list_to_array ((yyvsp[(6) - (6)].list))); }
     break;
 
-  case 250:
+  case 249:
 
-/* Line 1455 of yacc.c  */
-#line 1253 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1227 "./sql3.y"
     { (yyval.tree) = t_listst (4, REVOKE_STMT,
 		    t_list (1,
 		      t_listst (3, NULL, GR_REXECUTE, NULL)),
@@ -10190,31 +10177,31 @@ yyreduce:
 		    t_list_to_array ((yyvsp[(6) - (6)].list))); }
     break;
 
-  case 251:
+  case 250:
 
-/* Line 1455 of yacc.c  */
-#line 1259 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1233 "./sql3.y"
     { (yyval.tree) = t_listst (4, REVOKE_ROLE_STMT, t_list_to_array ((yyvsp[(2) - (4)].list)), t_list_to_array ((yyvsp[(4) - (4)].list)), 0); }
     break;
 
-  case 252:
+  case 251:
 
-/* Line 1455 of yacc.c  */
-#line 1263 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1237 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
-  case 253:
+  case 252:
 
-/* Line 1455 of yacc.c  */
-#line 1264 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1238 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
-  case 254:
+  case 253:
 
-/* Line 1455 of yacc.c  */
-#line 1269 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1243 "./sql3.y"
     {
 			  (yyval.box) = t_listbox (5,
 				t_list (3, NULL, GR_SELECT, NULL),
@@ -10229,10 +10216,10 @@ yyreduce:
 			}
     break;
 
-  case 255:
+  case 254:
 
-/* Line 1455 of yacc.c  */
-#line 1282 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1256 "./sql3.y"
     {
 			  (yyval.box) = t_listbox (6,
 				t_list (3, NULL, GR_SELECT, NULL),
@@ -10247,181 +10234,181 @@ yyreduce:
 			}
     break;
 
-  case 256:
+  case 255:
 
-/* Line 1455 of yacc.c  */
-#line 1294 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1268 "./sql3.y"
     { (yyval.box) = t_list_to_array_box ((yyvsp[(1) - (1)].list)); }
     break;
 
-  case 257:
+  case 256:
 
-/* Line 1455 of yacc.c  */
-#line 1298 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1272 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
-  case 258:
+  case 257:
 
-/* Line 1455 of yacc.c  */
-#line 1300 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1274 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
-  case 259:
+  case 258:
 
-/* Line 1455 of yacc.c  */
-#line 1305 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1279 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, GR_SELECT, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 260:
+  case 259:
 
-/* Line 1455 of yacc.c  */
-#line 1306 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1280 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, GR_INSERT, NULL); }
     break;
 
-  case 261:
+  case 260:
 
-/* Line 1455 of yacc.c  */
-#line 1307 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1281 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, GR_DELETE, NULL); }
     break;
 
-  case 262:
+  case 261:
 
-/* Line 1455 of yacc.c  */
-#line 1309 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1283 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, GR_UPDATE, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 263:
+  case 262:
 
-/* Line 1455 of yacc.c  */
-#line 1311 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1285 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, GR_REFERENCES, (yyvsp[(2) - (2)].tree)); }
     break;
 
-  case 264:
+  case 263:
 
-/* Line 1455 of yacc.c  */
-#line 1316 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1290 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
-  case 265:
+  case 264:
 
-/* Line 1455 of yacc.c  */
-#line 1318 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1292 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
-  case 266:
+  case 265:
 
-/* Line 1455 of yacc.c  */
-#line 1322 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1296 "./sql3.y"
     { (yyval.box) = (caddr_t) U_ID_PUBLIC; }
     break;
 
-  case 268:
+  case 267:
 
-/* Line 1455 of yacc.c  */
-#line 1328 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1302 "./sql3.y"
     { (yyval.tree) = t_listst (3, SET_PASS_STMT, (yyvsp[(3) - (4)].box), (yyvsp[(4) - (4)].box)); }
     break;
 
-  case 269:
+  case 268:
 
-/* Line 1455 of yacc.c  */
-#line 1332 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1306 "./sql3.y"
     { (yyval.tree) = t_listst (2, CREATE_USER_STMT, (yyvsp[(3) - (3)].box)); }
     break;
 
-  case 270:
+  case 269:
 
-/* Line 1455 of yacc.c  */
-#line 1333 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1307 "./sql3.y"
     { (yyval.tree) = t_listst (2, CREATE_ROLE_STMT, (yyvsp[(3) - (3)].box)); }
     break;
 
-  case 271:
+  case 270:
 
-/* Line 1455 of yacc.c  */
-#line 1337 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1311 "./sql3.y"
     { (yyval.tree) = t_listst (2, DELETE_USER_STMT, (yyvsp[(3) - (3)].box)); }
     break;
 
-  case 272:
+  case 271:
 
-/* Line 1455 of yacc.c  */
-#line 1338 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1312 "./sql3.y"
     { (yyval.tree) = t_listst (3, DELETE_USER_STMT, (yyvsp[(3) - (4)].box), t_box_num (1)); }
     break;
 
-  case 273:
+  case 272:
 
-/* Line 1455 of yacc.c  */
-#line 1339 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1313 "./sql3.y"
     { (yyval.tree) = t_listst (2, DELETE_USER_STMT, (yyvsp[(3) - (3)].box)); }
     break;
 
-  case 274:
+  case 273:
 
-/* Line 1455 of yacc.c  */
-#line 1340 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1314 "./sql3.y"
     { (yyval.tree) = t_listst (3, DELETE_USER_STMT, (yyvsp[(3) - (4)].box), t_box_num (1)); }
     break;
 
-  case 275:
+  case 274:
 
-/* Line 1455 of yacc.c  */
-#line 1341 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1315 "./sql3.y"
     { (yyval.tree) = t_listst (2, DROP_ROLE_STMT, (yyvsp[(3) - (3)].box)); }
     break;
 
-  case 276:
+  case 275:
 
-/* Line 1455 of yacc.c  */
-#line 1346 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1320 "./sql3.y"
     { (yyval.tree) = t_listst (3, SET_GROUP_STMT, (yyvsp[(4) - (5)].box), (yyvsp[(5) - (5)].box)); }
     break;
 
-  case 277:
+  case 276:
 
-/* Line 1455 of yacc.c  */
-#line 1351 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1325 "./sql3.y"
     { (yyval.tree) = t_listst (3, ADD_GROUP_STMT, (yyvsp[(4) - (5)].box), (yyvsp[(5) - (5)].box)); }
     break;
 
-  case 278:
+  case 277:
 
-/* Line 1455 of yacc.c  */
-#line 1356 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1330 "./sql3.y"
     { (yyval.tree) = t_listst (3, DELETE_GROUP_STMT, (yyvsp[(4) - (5)].box), (yyvsp[(5) - (5)].box)); }
     break;
 
-  case 279:
+  case 278:
 
-/* Line 1455 of yacc.c  */
-#line 1361 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1335 "./sql3.y"
     { (yyval.tree) = (ST *) t_alloc_box (0, DV_DB_NULL); }
     break;
 
-  case 280:
+  case 279:
 
-/* Line 1455 of yacc.c  */
-#line 1363 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1337 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("vector"),
 		      sqlp_string_col_list (t_list_to_array ((yyvsp[(4) - (5)].list))));
 		}
     break;
 
-  case 281:
+  case 280:
 
-/* Line 1455 of yacc.c  */
-#line 1371 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1345 "./sql3.y"
     {
 	      caddr_t *l = (caddr_t *) (yyvsp[(8) - (10)].tree);
 	      (yyval.tree) = t_listst (3, CALL_STMT,
@@ -10430,283 +10417,283 @@ yyreduce:
 	    }
     break;
 
-  case 282:
+  case 281:
 
-/* Line 1455 of yacc.c  */
-#line 1380 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1354 "./sql3.y"
     { (yyval.box) = t_alloc_box (0, DV_DB_NULL); }
     break;
 
-  case 283:
+  case 282:
 
-/* Line 1455 of yacc.c  */
-#line 1381 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1355 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].strval); }
     break;
 
-  case 284:
+  case 283:
 
-/* Line 1455 of yacc.c  */
-#line 1386 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1360 "./sql3.y"
     { (yyval.tree) = t_listst (2, t_alloc_box (0, DV_DB_NULL),
 			t_alloc_box (0, DV_DB_NULL));
 		}
     break;
 
-  case 285:
+  case 284:
 
-/* Line 1455 of yacc.c  */
-#line 1390 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1364 "./sql3.y"
     { (yyval.tree) = t_listst (2, (yyvsp[(2) - (4)].tree), (yyvsp[(4) - (4)].tree)); }
     break;
 
-  case 286:
+  case 285:
 
-/* Line 1455 of yacc.c  */
-#line 1394 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1368 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ("DB.DBA.vd_attach_view"); }
     break;
 
-  case 287:
+  case 286:
 
-/* Line 1455 of yacc.c  */
-#line 1395 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1369 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ("DB.DBA.vd_attach_view_no_select"); }
     break;
 
-  case 288:
+  case 287:
 
-/* Line 1455 of yacc.c  */
-#line 1399 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1373 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 289:
+  case 288:
 
-/* Line 1455 of yacc.c  */
-#line 1401 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1375 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("concat"),
 		      t_list (2, t_box_string ("\1"), (yyvsp[(3) - (3)].tree)));
 		}
     break;
 
-  case 290:
+  case 289:
 
-/* Line 1455 of yacc.c  */
-#line 1408 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1382 "./sql3.y"
     { (yyval.intval) = _SQL_CURSOR_STATIC; }
     break;
 
-  case 291:
+  case 290:
 
-/* Line 1455 of yacc.c  */
-#line 1409 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1383 "./sql3.y"
     { (yyval.intval) = _SQL_CURSOR_DYNAMIC; }
     break;
 
-  case 292:
+  case 291:
 
-/* Line 1455 of yacc.c  */
-#line 1410 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1384 "./sql3.y"
     { (yyval.intval) = _SQL_CURSOR_KEYSET_DRIVEN; }
     break;
 
-  case 293:
+  case 292:
 
-/* Line 1455 of yacc.c  */
-#line 1416 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1390 "./sql3.y"
     {
 				  (yyval.tree) = t_listst (5, CURSOR_DEF, (yyvsp[(2) - (5)].box), (yyvsp[(5) - (5)].tree), _SQL_CURSOR_FORWARD_ONLY, NULL);
 				}
     break;
 
-  case 294:
+  case 293:
 
-/* Line 1455 of yacc.c  */
-#line 1420 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1394 "./sql3.y"
     {
 				  (yyval.tree) = t_listst (5, CURSOR_DEF, (yyvsp[(2) - (6)].box), (yyvsp[(6) - (6)].tree), (ptrlong) (yyvsp[(3) - (6)].intval), NULL);
 				}
     break;
 
-  case 295:
+  case 294:
 
-/* Line 1455 of yacc.c  */
-#line 1426 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1400 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
+  case 295:
+
+/* Line 1464 of yacc.c  */
+#line 1401 "./sql3.y"
+    { (yyval.box) = t_list_to_array_box ((yyvsp[(3) - (3)].list)); }
+    break;
+
   case 296:
 
-/* Line 1455 of yacc.c  */
-#line 1427 "./sql3.y"
-    { (yyval.box) = t_list_to_array_box ((yyvsp[(3) - (3)].list)); }
+/* Line 1464 of yacc.c  */
+#line 1405 "./sql3.y"
+    { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 297:
 
-/* Line 1455 of yacc.c  */
-#line 1431 "./sql3.y"
-    { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
+/* Line 1464 of yacc.c  */
+#line 1407 "./sql3.y"
+    { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 298:
 
-/* Line 1455 of yacc.c  */
-#line 1433 "./sql3.y"
-    { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
+/* Line 1464 of yacc.c  */
+#line 1412 "./sql3.y"
+    { (yyval.tree) = t_listst (3, ORDER_BY, (caddr_t) (yyvsp[(1) - (2)].tree), (ptrlong) (yyvsp[(2) - (2)].subtok));  }
     break;
 
   case 299:
 
-/* Line 1455 of yacc.c  */
-#line 1438 "./sql3.y"
-    { (yyval.tree) = t_listst (3, ORDER_BY, INTEGERP ((yyvsp[(1) - (2)].tree)) ? (caddr_t) unbox_ptrlong ((caddr_t) (yyvsp[(1) - (2)].tree)) : (caddr_t) (yyvsp[(1) - (2)].tree), (ptrlong) (yyvsp[(2) - (2)].subtok));  }
+/* Line 1464 of yacc.c  */
+#line 1414 "./sql3.y"
+    { (yyval.tree) = (ST*) t_list (3, ORDER_BY, t_list (3, COL_DOTTED, NULL, sqlp_xml_col_name ((yyvsp[(1) - (2)].tree))), (ptrlong) (yyvsp[(2) - (2)].subtok)); }
     break;
 
   case 300:
 
-/* Line 1455 of yacc.c  */
-#line 1440 "./sql3.y"
-    { (yyval.tree) = (ST*) t_list (3, ORDER_BY, t_list (3, COL_DOTTED, NULL, sqlp_xml_col_name ((yyvsp[(1) - (2)].tree))), (ptrlong) (yyvsp[(2) - (2)].subtok)); }
+/* Line 1464 of yacc.c  */
+#line 1418 "./sql3.y"
+    { (yyval.subtok) = ORDER_ASC; }
     break;
 
   case 301:
 
-/* Line 1455 of yacc.c  */
-#line 1444 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1419 "./sql3.y"
     { (yyval.subtok) = ORDER_ASC; }
     break;
 
   case 302:
 
-/* Line 1455 of yacc.c  */
-#line 1445 "./sql3.y"
-    { (yyval.subtok) = ORDER_ASC; }
-    break;
-
-  case 303:
-
-/* Line 1455 of yacc.c  */
-#line 1446 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1420 "./sql3.y"
     { (yyval.subtok) = ORDER_DESC; }
     break;
 
-  case 304:
+  case 303:
 
-/* Line 1455 of yacc.c  */
-#line 1452 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1426 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.repl_create_snapshot_log"),
 		  t_list (1, (yyvsp[(5) - (5)].strval))); }
     break;
 
-  case 305:
+  case 304:
 
-/* Line 1455 of yacc.c  */
-#line 1459 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1433 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.repl_drop_snapshot_log"),
 		  t_list (1, (yyvsp[(5) - (5)].strval))); }
     break;
 
-  case 306:
+  case 305:
 
-/* Line 1455 of yacc.c  */
-#line 1466 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1440 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.repl_purge_snapshot_log"),
 		  t_list (1, (yyvsp[(5) - (5)].strval))); }
     break;
 
-  case 307:
+  case 306:
 
-/* Line 1455 of yacc.c  */
-#line 1472 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1446 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
-  case 308:
+  case 307:
 
-/* Line 1455 of yacc.c  */
-#line 1473 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1447 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 309:
+  case 308:
 
-/* Line 1455 of yacc.c  */
-#line 1477 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1451 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
-  case 310:
+  case 309:
 
-/* Line 1455 of yacc.c  */
-#line 1478 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1452 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 311:
+  case 310:
 
-/* Line 1455 of yacc.c  */
-#line 1483 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1457 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.repl_create_inc_snapshot"),
 		  t_list (4, (yyvsp[(6) - (7)].box), (yyvsp[(5) - (7)].strval), (yyvsp[(7) - (7)].box), (yyvsp[(3) - (7)].strval))); }
     break;
 
-  case 312:
+  case 311:
 
-/* Line 1455 of yacc.c  */
-#line 1487 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1461 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.repl_create_snapshot"),
 		  t_list (2, (yyvsp[(6) - (6)].box), (yyvsp[(4) - (6)].strval))); }
     break;
 
-  case 313:
+  case 312:
 
-/* Line 1455 of yacc.c  */
-#line 1493 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1467 "./sql3.y"
     { (yyval.box) = t_box_num (0); }
     break;
 
-  case 314:
+  case 313:
 
-/* Line 1455 of yacc.c  */
-#line 1494 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1468 "./sql3.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
-  case 315:
+  case 314:
 
-/* Line 1455 of yacc.c  */
-#line 1499 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1473 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 		  t_sqlp_box_id_upcase ("DB.DBA.repl_drop_snapshot"),
 		  t_list (2, (yyvsp[(3) - (4)].strval), (yyvsp[(4) - (4)].box))); }
     break;
 
-  case 316:
+  case 315:
 
-/* Line 1455 of yacc.c  */
-#line 1505 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1479 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
-  case 317:
+  case 316:
 
-/* Line 1455 of yacc.c  */
-#line 1506 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1480 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
-  case 318:
+  case 317:
 
-/* Line 1455 of yacc.c  */
-#line 1511 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1485 "./sql3.y"
     {
 	      if ((yyvsp[(4) - (4)].subtok))
 		(yyval.tree) = t_listst (3, CALL_STMT,
@@ -10718,10 +10705,10 @@ yyreduce:
 		    t_list (1, (yyvsp[(3) - (4)].strval))); }
     break;
 
-  case 319:
+  case 318:
 
-/* Line 1455 of yacc.c  */
-#line 1524 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1498 "./sql3.y"
     {
 	    /*  if (!stricmp ($2, "TEXT"))
 		{*/
@@ -10733,397 +10720,397 @@ yyreduce:
 	    }
     break;
 
-  case 320:
+  case 319:
 
-/* Line 1455 of yacc.c  */
-#line 1536 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1510 "./sql3.y"
     { (yyval.box) = t_box_num(0); }
     break;
 
-  case 321:
+  case 320:
 
-/* Line 1455 of yacc.c  */
-#line 1537 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1511 "./sql3.y"
     { (yyval.box) = t_box_num(1); }
     break;
 
-  case 322:
+  case 321:
 
-/* Line 1455 of yacc.c  */
-#line 1541 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1515 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
-  case 323:
+  case 322:
 
-/* Line 1455 of yacc.c  */
-#line 1542 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1516 "./sql3.y"
     { (yyval.box) = t_box_string ((yyvsp[(2) - (3)].strval)); }
     break;
 
-  case 324:
+  case 323:
 
-/* Line 1455 of yacc.c  */
-#line 1547 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1521 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.vt_create_ftt"),
 		  t_list (4, (yyvsp[(5) - (6)].strval), NULL, (yyvsp[(6) - (6)].box), NULL));
 	    }
     break;
 
-  case 325:
+  case 324:
 
-/* Line 1455 of yacc.c  */
-#line 1555 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1529 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.vt_drop_ftt"),
 		  t_list (2, (yyvsp[(5) - (6)].strval), (yyvsp[(6) - (6)].box)));
 	    }
     break;
 
-  case 326:
+  case 325:
 
-/* Line 1455 of yacc.c  */
-#line 1562 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1536 "./sql3.y"
     { (yyval.box) = t_box_num (0); }
     break;
 
-  case 327:
+  case 326:
 
-/* Line 1455 of yacc.c  */
-#line 1563 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1537 "./sql3.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
-  case 328:
+  case 327:
 
-/* Line 1455 of yacc.c  */
-#line 1567 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1541 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
-  case 329:
+  case 328:
 
-/* Line 1455 of yacc.c  */
-#line 1568 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1542 "./sql3.y"
     { (yyval.box) = t_box_string ((yyvsp[(3) - (3)].strval)); }
     break;
 
-  case 330:
+  case 329:
 
-/* Line 1455 of yacc.c  */
-#line 1572 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1546 "./sql3.y"
     { (yyval.tree) = (ST*) t_NULLCONST; }
     break;
 
-  case 331:
+  case 330:
 
-/* Line 1455 of yacc.c  */
-#line 1573 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1547 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(4) - (5)].list)); }
     break;
 
-  case 332:
+  case 331:
 
-/* Line 1455 of yacc.c  */
-#line 1577 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1551 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
-  case 333:
+  case 332:
 
-/* Line 1455 of yacc.c  */
-#line 1578 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1552 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 334:
+  case 333:
 
-/* Line 1455 of yacc.c  */
-#line 1582 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1556 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
-  case 335:
+  case 334:
 
-/* Line 1455 of yacc.c  */
-#line 1583 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1557 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 336:
+  case 335:
 
-/* Line 1455 of yacc.c  */
-#line 1587 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1561 "./sql3.y"
     { (yyval.box) = t_box_num (0); }
     break;
 
-  case 337:
+  case 336:
 
-/* Line 1455 of yacc.c  */
-#line 1588 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1562 "./sql3.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
-  case 348:
+  case 346:
 
-/* Line 1455 of yacc.c  */
-#line 1606 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1580 "./sql3.y"
     { (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
-  case 366:
+  case 364:
 
-/* Line 1455 of yacc.c  */
-#line 1628 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1602 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("set_qualifier"),
 			t_list (1, sqlp_new_qualifier_name ((yyvsp[(2) - (2)].box), box_length ((yyvsp[(2) - (2)].box))))); }
     break;
 
-  case 367:
+  case 365:
 
-/* Line 1455 of yacc.c  */
-#line 1634 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1608 "./sql3.y"
     { (yyval.tree) = t_listst (2, CLOSE_STMT, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 368:
+  case 366:
 
-/* Line 1455 of yacc.c  */
-#line 1639 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1613 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("__commit"), t_list (0)); }
     break;
 
-  case 369:
+  case 367:
 
-/* Line 1455 of yacc.c  */
-#line 1645 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1619 "./sql3.y"
     { (yyval.tree) = t_listst (4, DELETE_POS, (yyvsp[(7) - (8)].box), (yyvsp[(3) - (8)].strval), (yyvsp[(8) - (8)].tree)); }
     break;
 
-  case 370:
+  case 368:
 
-/* Line 1455 of yacc.c  */
-#line 1650 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1624 "./sql3.y"
     { (yyval.tree) = t_listst (2, DELETE_SRC,
 		      sqlp_infoschema_redirect (t_listst (9, TABLE_EXP, t_list (1, (yyvsp[(3) - (5)].strval)),
 		      (yyvsp[(4) - (5)].tree), NULL, NULL, NULL, NULL, (yyvsp[(5) - (5)].tree), NULL))); }
     break;
 
-  case 371:
+  case 369:
 
-/* Line 1455 of yacc.c  */
-#line 1657 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1631 "./sql3.y"
     { (yyval.tree) = t_listst (5, FETCH_STMT, (yyvsp[(2) - (4)].box), t_list_to_array ((yyvsp[(4) - (4)].list)), (ptrlong) _SQL_FETCH_NEXT, t_box_num (1)); }
     break;
 
-  case 372:
+  case 370:
 
-/* Line 1455 of yacc.c  */
-#line 1659 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1633 "./sql3.y"
     {
 		  ptrlong fetch_type = sqlp_fetch_type_to_code ((yyvsp[(3) - (5)].box));
 		  (yyval.tree) = t_listst (5, FETCH_STMT, (yyvsp[(2) - (5)].box), t_list_to_array ((yyvsp[(5) - (5)].list)), fetch_type, t_box_num (1));
 		}
     break;
 
-  case 373:
+  case 371:
 
-/* Line 1455 of yacc.c  */
-#line 1664 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1638 "./sql3.y"
     {
 		  ptrlong fetch_type = sqlp_fetch_type_to_code ((yyvsp[(3) - (6)].box));
 		  (yyval.tree) = t_listst (5, FETCH_STMT, (yyvsp[(2) - (6)].box), t_list_to_array ((yyvsp[(6) - (6)].list)), fetch_type, (yyvsp[(4) - (6)].tree));
 		}
     break;
 
-  case 374:
+  case 372:
 
-/* Line 1455 of yacc.c  */
-#line 1671 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1645 "./sql3.y"
     { (yyval.subtok) = INS_NORMAL; }
     break;
 
-  case 375:
+  case 373:
 
-/* Line 1455 of yacc.c  */
-#line 1672 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1646 "./sql3.y"
     { (yyval.subtok) = INS_REPLACING; }
     break;
 
-  case 376:
+  case 374:
 
-/* Line 1455 of yacc.c  */
-#line 1673 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1647 "./sql3.y"
     { (yyval.subtok) = INS_SOFT; }
     break;
 
-  case 377:
+  case 375:
 
-/* Line 1455 of yacc.c  */
-#line 1678 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1652 "./sql3.y"
     { (yyval.box) = NULL;}
     break;
 
-  case 378:
+  case 376:
 
-/* Line 1455 of yacc.c  */
-#line 1679 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1653 "./sql3.y"
     {(yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 379:
+  case 377:
 
-/* Line 1455 of yacc.c  */
-#line 1685 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1659 "./sql3.y"
     { (yyval.tree) = t_listst (7, INSERT_STMT, (yyvsp[(3) - (7)].strval), (yyvsp[(6) - (7)].tree), (yyvsp[(7) - (7)].tree), (ptrlong) (yyvsp[(2) - (7)].subtok), (yyvsp[(4) - (7)].box), (yyvsp[(5) - (7)].tree)); }
     break;
 
-  case 380:
+  case 378:
 
-/* Line 1455 of yacc.c  */
-#line 1690 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1664 "./sql3.y"
     { (yyval.tree) = t_listst (2, INSERT_VALUES, sqlp_wrapper_sqlxml((ST**)t_list_to_array ((yyvsp[(3) - (4)].list)))); }
     break;
 
-  case 382:
+  case 380:
 
-/* Line 1455 of yacc.c  */
-#line 1695 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1669 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
-  case 383:
+  case 381:
 
-/* Line 1455 of yacc.c  */
-#line 1697 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1671 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
-  case 385:
+  case 383:
 
-/* Line 1455 of yacc.c  */
-#line 1707 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1681 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_ORDER, t_CONS (1, NULL)); }
     break;
 
-  case 386:
+  case 384:
 
-/* Line 1455 of yacc.c  */
-#line 1708 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1682 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_ANY_ORDER, t_CONS (1, NULL)); }
     break;
 
-  case 387:
+  case 385:
 
-/* Line 1455 of yacc.c  */
-#line 1709 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1683 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_SPARQL, t_CONS (1, NULL)); }
     break;
 
-  case 388:
+  case 386:
 
-/* Line 1455 of yacc.c  */
-#line 1710 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1684 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_SAME_AS, t_CONS (1, NULL)); }
     break;
 
-  case 389:
+  case 387:
 
-/* Line 1455 of yacc.c  */
-#line 1711 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1685 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_ARRAY, t_CONS (1, NULL)); }
     break;
 
-  case 390:
+  case 388:
 
-/* Line 1455 of yacc.c  */
-#line 1712 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1686 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_JOIN, t_CONS (OPT_HASH, NULL)); }
     break;
 
-  case 391:
+  case 389:
 
-/* Line 1455 of yacc.c  */
-#line 1713 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1687 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_JOIN, t_CONS (OPT_INTERSECT, NULL)); }
     break;
 
-  case 392:
+  case 390:
 
-/* Line 1455 of yacc.c  */
-#line 1714 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1688 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_JOIN, t_CONS (OPT_LOOP, NULL)); }
     break;
 
-  case 393:
+  case 391:
 
-/* Line 1455 of yacc.c  */
-#line 1715 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1689 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_SUBQ_LOOP, t_CONS (SUBQ_LOOP, NULL)); }
     break;
 
-  case 394:
+  case 392:
 
-/* Line 1455 of yacc.c  */
-#line 1716 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1690 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_SUBQ_LOOP, t_CONS (SUBQ_NO_LOOP, NULL)); }
     break;
 
-  case 395:
+  case 393:
 
-/* Line 1455 of yacc.c  */
-#line 1717 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1691 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_INDEX, t_CONS ((yyvsp[(2) - (2)].box), NULL)); }
     break;
 
-  case 396:
+  case 394:
 
-/* Line 1455 of yacc.c  */
-#line 1718 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1692 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_INDEX, t_CONS (t_box_string ("PRIMARY KEY"), NULL)); }
     break;
 
-  case 397:
+  case 395:
 
-/* Line 1455 of yacc.c  */
-#line 1719 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1693 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_INDEX, t_CONS (t_box_string ("TEXT KEY"), NULL)); }
     break;
 
-  case 398:
+  case 396:
 
-/* Line 1455 of yacc.c  */
-#line 1720 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1694 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_INDEX_ONLY, t_CONS (t_box_num (1), NULL)); }
     break;
 
-  case 399:
+  case 397:
 
-/* Line 1455 of yacc.c  */
-#line 1721 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1695 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_RDF_INFERENCE, t_CONS ((yyvsp[(2) - (2)].box), NULL)); }
     break;
 
-  case 400:
+  case 398:
 
-/* Line 1455 of yacc.c  */
-#line 1722 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1696 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_NO_CLUSTER, t_CONS (1, NULL)); }
     break;
 
-  case 401:
+  case 399:
 
-/* Line 1455 of yacc.c  */
-#line 1723 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1697 "./sql3.y"
     { (yyval.list) = t_CONS (OPT_INTO, t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
-  case 402:
+  case 400:
 
-/* Line 1455 of yacc.c  */
-#line 1724 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1698 "./sql3.y"
     {
 	  if (!stricmp ((yyvsp[(1) - (2)].box), "vacuum"))
 	    (yyval.list) = t_CONS (OPT_VACUUM, t_CONS ((yyvsp[(2) - (2)].box), NULL));
@@ -11134,122 +11121,122 @@ yyreduce:
 	}
     break;
 
-  case 403:
+  case 401:
 
-/* Line 1455 of yacc.c  */
-#line 1735 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1709 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
-  case 404:
+  case 402:
 
-/* Line 1455 of yacc.c  */
-#line 1736 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1710 "./sql3.y"
     { (yyval.list) = NCONC ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); }
     break;
 
-  case 405:
+  case 403:
 
-/* Line 1455 of yacc.c  */
-#line 1740 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1714 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 406:
+  case 404:
 
-/* Line 1455 of yacc.c  */
-#line 1741 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1715 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(3) - (4)].list)); }
     break;
 
-  case 407:
+  case 405:
 
-/* Line 1455 of yacc.c  */
-#line 1745 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1719 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 408:
+  case 406:
 
-/* Line 1455 of yacc.c  */
-#line 1746 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1720 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(4) - (5)].list)); }
     break;
 
-  case 409:
+  case 407:
 
-/* Line 1455 of yacc.c  */
-#line 1750 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1724 "./sql3.y"
     { (yyval.tree)  = (ST *) EXCLUSIVE_OPT; }
     break;
 
-  case 410:
+  case 408:
 
-/* Line 1455 of yacc.c  */
-#line 1751 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1725 "./sql3.y"
     { (yyval.tree) = t_listst (2, PREFETCH_OPT, (yyvsp[(2) - (2)].box)); }
     break;
 
-  case 411:
+  case 409:
 
-/* Line 1455 of yacc.c  */
-#line 1755 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1729 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
-  case 412:
+  case 410:
 
-/* Line 1455 of yacc.c  */
-#line 1757 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1731 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
-  case 413:
+  case 411:
 
-/* Line 1455 of yacc.c  */
-#line 1761 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1735 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
-  case 414:
+  case 412:
 
-/* Line 1455 of yacc.c  */
-#line 1762 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1736 "./sql3.y"
     { (yyval.box) = t_list_to_array_box ((yyvsp[(2) - (3)].list)); }
     break;
 
-  case 415:
+  case 413:
 
-/* Line 1455 of yacc.c  */
-#line 1767 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1741 "./sql3.y"
     { (yyval.tree) = t_listst (4, OPEN_STMT, (yyvsp[(2) - (3)].box), (yyvsp[(3) - (3)].box), NULL); }
     break;
 
-  case 416:
+  case 414:
 
-/* Line 1455 of yacc.c  */
-#line 1772 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1746 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("__rollback"), t_list (0)); }
     break;
 
-  case 417:
+  case 415:
 
-/* Line 1455 of yacc.c  */
-#line 1777 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1751 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
-  case 418:
+  case 416:
 
-/* Line 1455 of yacc.c  */
-#line 1778 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1752 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 419:
+  case 417:
 
-/* Line 1455 of yacc.c  */
-#line 1784 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1758 "./sql3.y"
     { char *tmp_cr = "temp_cr";
 		  ST *qspec = t_listst (5,
 		      SELECT_STMT,
@@ -11273,265 +11260,265 @@ yyreduce:
 		}
     break;
 
-  case 420:
+  case 418:
 
-/* Line 1455 of yacc.c  */
-#line 1811 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1785 "./sql3.y"
     { (yyval.list) = t_CONS (sqlp_col_num ((yyvsp[(1) - (1)].box)), NULL); }
     break;
 
-  case 421:
+  case 419:
 
-/* Line 1455 of yacc.c  */
-#line 1812 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1786 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS (sqlp_col_num ((yyvsp[(3) - (3)].box)), NULL)); }
     break;
 
-  case 422:
+  case 420:
 
-/* Line 1455 of yacc.c  */
-#line 1816 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1790 "./sql3.y"
     { (yyval.box) = t_listbox (1, sqlp_col_num ((yyvsp[(1) - (1)].box))); }
     break;
 
-  case 423:
+  case 421:
 
-/* Line 1455 of yacc.c  */
-#line 1817 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1791 "./sql3.y"
     { (yyval.box) = t_list_to_array_box ((yyvsp[(2) - (3)].list)); }
     break;
 
-  case 424:
+  case 422:
 
-/* Line 1455 of yacc.c  */
-#line 1822 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1796 "./sql3.y"
     { global_trans->_.trans.min = (yyvsp[(3) - (4)].tree); }
     break;
 
-  case 425:
+  case 423:
 
-/* Line 1455 of yacc.c  */
-#line 1823 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1797 "./sql3.y"
     { global_trans->_.trans.max = (yyvsp[(3) - (4)].tree); }
     break;
 
-  case 426:
+  case 424:
 
-/* Line 1455 of yacc.c  */
-#line 1824 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1798 "./sql3.y"
     { global_trans->_.trans.distinct = 1; }
     break;
 
-  case 427:
+  case 425:
 
-/* Line 1455 of yacc.c  */
-#line 1825 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1799 "./sql3.y"
     { global_trans->_.trans.exists = 1; }
     break;
 
-  case 428:
+  case 426:
 
-/* Line 1455 of yacc.c  */
-#line 1826 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1800 "./sql3.y"
     { global_trans->_.trans.no_cycles = 1; }
     break;
 
-  case 429:
+  case 427:
 
-/* Line 1455 of yacc.c  */
-#line 1827 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1801 "./sql3.y"
     { global_trans->_.trans.cycles_only = 1; }
     break;
 
-  case 430:
+  case 428:
 
-/* Line 1455 of yacc.c  */
-#line 1828 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1802 "./sql3.y"
     { global_trans->_.trans.no_order = 1; }
     break;
 
-  case 431:
+  case 429:
 
-/* Line 1455 of yacc.c  */
-#line 1829 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1803 "./sql3.y"
     { global_trans->_.trans.shortest_only = 1; }
     break;
 
-  case 432:
+  case 430:
 
-/* Line 1455 of yacc.c  */
-#line 1830 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1804 "./sql3.y"
     { global_trans->_.trans.in = (ptrlong*) (yyvsp[(2) - (2)].box); }
     break;
 
-  case 433:
+  case 431:
 
-/* Line 1455 of yacc.c  */
-#line 1831 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1805 "./sql3.y"
     { global_trans->_.trans.out = (ptrlong*) (yyvsp[(2) - (2)].box); }
     break;
 
-  case 434:
+  case 432:
 
-/* Line 1455 of yacc.c  */
-#line 1832 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1806 "./sql3.y"
     { global_trans->_.trans.end_flag = (ptrlong)sqlp_col_num ((yyvsp[(2) - (2)].box)); }
     break;
 
-  case 435:
+  case 433:
 
-/* Line 1455 of yacc.c  */
-#line 1833 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1807 "./sql3.y"
     { global_trans->_.trans.final_as = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 436:
+  case 434:
 
-/* Line 1455 of yacc.c  */
-#line 1834 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1808 "./sql3.y"
     { global_trans->_.trans.direction = unbox ((yyvsp[(2) - (2)].box)); }
     break;
 
-  case 439:
+  case 437:
 
-/* Line 1455 of yacc.c  */
-#line 1844 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1818 "./sql3.y"
     { global_trans = (ST *) t_alloc_box (sizeof (sql_tree_t), DV_ARRAY_OF_POINTER); memset (global_trans, 0, box_length ((caddr_t)global_trans));}
     break;
 
-  case 440:
+  case 438:
 
-/* Line 1455 of yacc.c  */
-#line 1845 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1819 "./sql3.y"
     { (yyval.tree) = global_trans; global_trans = NULL; }
     break;
 
-  case 441:
+  case 439:
 
-/* Line 1455 of yacc.c  */
-#line 1850 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1824 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
-  case 442:
+  case 440:
 
-/* Line 1455 of yacc.c  */
-#line 1851 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1825 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
-  case 443:
+  case 441:
 
-/* Line 1455 of yacc.c  */
-#line 1852 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1826 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
-  case 444:
+  case 442:
 
-/* Line 1455 of yacc.c  */
-#line 1863 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1837 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
-  case 445:
+  case 443:
 
-/* Line 1455 of yacc.c  */
-#line 1864 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1838 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
-  case 446:
+  case 444:
 
-/* Line 1455 of yacc.c  */
-#line 1869 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1843 "./sql3.y"
     { (yyval.tree) = (ST*) (ptrlong) (yyvsp[(1) - (1)].intval); }
     break;
 
-  case 447:
+  case 445:
 
-/* Line 1455 of yacc.c  */
-#line 1871 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1845 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (7, SELECT_TOP, (ptrlong) (yyvsp[(1) - (4)].intval), (yyvsp[(3) - (4)].box), t_box_num (0), /*$4, $5*/ 0, (ptrlong) (yyvsp[(4) - (4)].intval), NULL); }
     break;
 
-  case 448:
+  case 446:
 
-/* Line 1455 of yacc.c  */
-#line 1873 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1847 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (7, SELECT_TOP, (ptrlong) (yyvsp[(1) - (6)].intval), (yyvsp[(4) - (6)].tree), t_box_num (0), /*$6, $7*/ 0, (ptrlong) (yyvsp[(6) - (6)].intval), NULL); }
     break;
 
-  case 449:
+  case 447:
 
-/* Line 1455 of yacc.c  */
-#line 1875 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1849 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (7, SELECT_TOP, (ptrlong) (yyvsp[(1) - (6)].intval), (yyvsp[(5) - (6)].box), (yyvsp[(3) - (6)].box), /*$6, $7*/ 0, (ptrlong) (yyvsp[(6) - (6)].intval), NULL); }
     break;
 
-  case 450:
+  case 448:
 
-/* Line 1455 of yacc.c  */
-#line 1877 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1851 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (7, SELECT_TOP, (ptrlong) (yyvsp[(1) - (8)].intval), (yyvsp[(6) - (8)].tree), (yyvsp[(4) - (8)].tree), /*$8, $9*/ 0, (ptrlong) (yyvsp[(8) - (8)].intval), NULL); }
     break;
 
-  case 451:
+  case 449:
 
-/* Line 1455 of yacc.c  */
-#line 1878 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1852 "./sql3.y"
     { (yyval.tree) = t_listst (7, SELECT_TOP, NULL, NULL, NULL, NULL, NULL, (yyvsp[(1) - (1)].tree));}
     break;
 
-  case 452:
+  case 450:
 
-/* Line 1455 of yacc.c  */
-#line 1880 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1854 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (7, SELECT_TOP, (ptrlong) (yyvsp[(1) - (7)].intval), t_box_num_and_zero (-1 * unbox((yyvsp[(6) - (7)].box))), (yyvsp[(3) - (7)].box), /*$6, $7*/ 0, (ptrlong) (yyvsp[(7) - (7)].intval), NULL); }
     break;
 
-  case 453:
+  case 451:
 
-/* Line 1455 of yacc.c  */
-#line 1886 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1860 "./sql3.y"
     { ST ** asg = (ST **) t_list_to_array ((yyvsp[(4) - (9)].list));
 		  ST ** cols = asg_col_list (asg);
 		  ST ** vals = asg_val_list (asg);
 		  (yyval.tree) = t_listst (6, UPDATE_POS, (yyvsp[(2) - (9)].strval), cols, vals, (yyvsp[(8) - (9)].box), (yyvsp[(9) - (9)].tree)); }
     break;
 
-  case 454:
+  case 452:
 
-/* Line 1455 of yacc.c  */
-#line 1893 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1867 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
-  case 455:
+  case 453:
 
-/* Line 1455 of yacc.c  */
-#line 1894 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1868 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
-  case 456:
+  case 454:
 
-/* Line 1455 of yacc.c  */
-#line 1896 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1870 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
-  case 457:
+  case 455:
 
-/* Line 1455 of yacc.c  */
-#line 1900 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1874 "./sql3.y"
     { (yyval.box) = t_listbox (2, (yyvsp[(1) - (3)].strval), sqlp_wrapper_sqlxml_assign((ST*)(yyvsp[(3) - (3)].tree))); }
     break;
 
-  case 458:
+  case 456:
 
-/* Line 1455 of yacc.c  */
-#line 1905 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1879 "./sql3.y"
     {
 		  ST **asg = (ST **) t_list_to_array ((yyvsp[(4) - (6)].list));
 		  ST **cols = asg_col_list (asg);
@@ -11543,264 +11530,268 @@ yyreduce:
 		}
     break;
 
-  case 459:
+  case 457:
 
-/* Line 1455 of yacc.c  */
-#line 1917 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1891 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
-  case 460:
+  case 458:
 
-/* Line 1455 of yacc.c  */
-#line 1918 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1892 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
-  case 464:
+  case 462:
 
-/* Line 1455 of yacc.c  */
-#line 1929 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1903 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 466:
+  case 464:
 
-/* Line 1455 of yacc.c  */
-#line 1936 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1910 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
-  case 467:
+  case 465:
 
-/* Line 1455 of yacc.c  */
-#line 1937 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1911 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
-  case 469:
+  case 467:
 
-/* Line 1455 of yacc.c  */
-#line 1943 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1917 "./sql3.y"
     { (yyval.tree) = t_listst (5, UNION_ST, (yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree), sqlp_bunion_flag ((yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(2) - (5)].subtok))); }
     break;
 
-  case 470:
+  case 468:
 
-/* Line 1455 of yacc.c  */
-#line 1945 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1919 "./sql3.y"
     { (yyval.tree) = t_listst (5, UNION_ALL_ST, (yyvsp[(1) - (6)].tree), (yyvsp[(6) - (6)].tree), (yyvsp[(5) - (6)].tree), sqlp_bunion_flag ((yyvsp[(1) - (6)].tree), (yyvsp[(6) - (6)].tree), (yyvsp[(2) - (6)].subtok))); }
     break;
 
-  case 471:
+  case 469:
 
-/* Line 1455 of yacc.c  */
-#line 1947 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1921 "./sql3.y"
     { (yyval.tree) = t_listst (4, INTERSECT_ST, (yyvsp[(1) - (4)].tree), (yyvsp[(4) - (4)].tree), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 472:
+  case 470:
 
-/* Line 1455 of yacc.c  */
-#line 1949 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1923 "./sql3.y"
     { (yyval.tree) = t_listst (4, INTERSECT_ALL_ST, (yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 473:
+  case 471:
 
-/* Line 1455 of yacc.c  */
-#line 1951 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1925 "./sql3.y"
     { (yyval.tree) = t_listst (4, EXCEPT_ST, (yyvsp[(1) - (4)].tree), (yyvsp[(4) - (4)].tree), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 474:
+  case 472:
 
-/* Line 1455 of yacc.c  */
-#line 1953 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1927 "./sql3.y"
     { (yyval.tree) = t_listst (4, EXCEPT_ALL_ST, (yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 478:
+  case 476:
 
-/* Line 1455 of yacc.c  */
-#line 1963 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1937 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
-  case 480:
+  case 478:
 
-/* Line 1455 of yacc.c  */
-#line 1969 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1943 "./sql3.y"
     { (yyval.tree) = t_listst (5, UNION_ST, (yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree), sqlp_bunion_flag ((yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(2) - (5)].subtok))); }
     break;
 
-  case 481:
+  case 479:
 
-/* Line 1455 of yacc.c  */
-#line 1971 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1945 "./sql3.y"
     { (yyval.tree) = t_listst (5, UNION_ALL_ST, (yyvsp[(1) - (6)].tree), (yyvsp[(6) - (6)].tree), (yyvsp[(5) - (6)].tree), sqlp_bunion_flag ((yyvsp[(1) - (6)].tree), (yyvsp[(6) - (6)].tree), (yyvsp[(2) - (6)].subtok))); }
     break;
 
-  case 482:
+  case 480:
 
-/* Line 1455 of yacc.c  */
-#line 1973 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1947 "./sql3.y"
     { (yyval.tree) = t_listst (4, INTERSECT_ST, (yyvsp[(1) - (4)].tree), (yyvsp[(4) - (4)].tree), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 483:
+  case 481:
 
-/* Line 1455 of yacc.c  */
-#line 1975 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1949 "./sql3.y"
     { (yyval.tree) = t_listst (4, INTERSECT_ALL_ST, (yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 484:
+  case 482:
 
-/* Line 1455 of yacc.c  */
-#line 1977 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1951 "./sql3.y"
     { (yyval.tree) = t_listst (4, EXCEPT_ST, (yyvsp[(1) - (4)].tree), (yyvsp[(4) - (4)].tree), (yyvsp[(3) - (4)].tree)); }
     break;
 
-  case 485:
+  case 483:
 
-/* Line 1455 of yacc.c  */
-#line 1979 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1953 "./sql3.y"
     { (yyval.tree) = t_listst (4, EXCEPT_ALL_ST, (yyvsp[(1) - (5)].tree), (yyvsp[(5) - (5)].tree), (yyvsp[(4) - (5)].tree)); }
     break;
 
-  case 487:
+  case 485:
 
-/* Line 1455 of yacc.c  */
-#line 1984 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1958 "./sql3.y"
     { (yyval.tree) = sqlp_embedded_xpath ((yyvsp[(2) - (2)].box)); }
     break;
 
-  case 489:
+  case 487:
 
-/* Line 1455 of yacc.c  */
-#line 1989 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1963 "./sql3.y"
     { (yyval.tree) = sqlp_inline_order_by ((yyvsp[(2) - (4)].tree), (ST **) (yyvsp[(4) - (4)].box)); }
     break;
 
-  case 490:
+  case 488:
 
-/* Line 1455 of yacc.c  */
-#line 1990 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1964 "./sql3.y"
     { (yyval.tree) = sqlp_embedded_xpath ((yyvsp[(2) - (2)].box)); }
     break;
 
-  case 491:
+  case 489:
 
-/* Line 1455 of yacc.c  */
-#line 1994 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1968 "./sql3.y"
     { (yyval.tree) = sqlp_inline_order_by ((yyvsp[(3) - (5)].tree), (ST **) (yyvsp[(5) - (5)].box)); }
     break;
 
-  case 492:
+  case 490:
 
-/* Line 1455 of yacc.c  */
-#line 1998 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1972 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
-  case 493:
+  case 491:
 
-/* Line 1455 of yacc.c  */
-#line 1999 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1973 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
-  case 494:
+  case 492:
 
-/* Line 1455 of yacc.c  */
-#line 2003 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1977 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
-  case 495:
+  case 493:
 
-/* Line 1455 of yacc.c  */
-#line 2005 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1979 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(4) - (5)].list)); }
     break;
 
-  case 496:
+  case 494:
 
-/* Line 1455 of yacc.c  */
-#line 2010 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 1984 "./sql3.y"
     { (yyval.tree) = t_listst (5, SELECT_STMT, (yyvsp[(2) - (4)].tree),
 		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) (yyvsp[(3) - (4)].tree)), (yyvsp[(4) - (4)].tree)->_.table_exp.from) , NULL, (yyvsp[(4) - (4)].tree));
 		  sqlp_breakup ((yyval.tree)); }
     break;
 
-  case 497:
+  case 495:
 
-/* Line 1455 of yacc.c  */
-#line 2018 "./sql3.y"
-    { (yyval.tree) = t_listst (5, SELECT_STMT, (yyvsp[(2) - (4)].tree),
+/* Line 1464 of yacc.c  */
+#line 1991 "./sql3.y"
+    {
+		  if (NULL == (yyvsp[(4) - (4)].tree))
+		    (yyval.tree) = t_listst (5, SELECT_STMT, NULL,
+		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) (yyvsp[(3) - (4)].tree)), NULL) , NULL, NULL);
+		  else
+		    (yyval.tree) = t_listst (5, SELECT_STMT, (yyvsp[(2) - (4)].tree),
 		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) (yyvsp[(3) - (4)].tree)), (yyvsp[(4) - (4)].tree)->_.table_exp.from) , NULL, (yyvsp[(4) - (4)].tree));
 		  sqlp_breakup ((yyval.tree)); }
     break;
 
-  case 498:
+  case 496:
 
-/* Line 1455 of yacc.c  */
-#line 2025 "./sql3.y"
-    {
-		  (yyval.tree) = t_listst (5, SELECT_STMT, NULL,
-		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) (yyvsp[(3) - (3)].tree)), NULL) , NULL, NULL);
+/* Line 1464 of yacc.c  */
+#line 2004 "./sql3.y"
+    { (yyval.tree) = t_listst (5, SELECT_STMT, (yyvsp[(2) - (4)].tree),
+		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) (yyvsp[(3) - (4)].tree)), (yyvsp[(4) - (4)].tree)->_.table_exp.from) , NULL, (yyvsp[(4) - (4)].tree));
 		  sqlp_breakup ((yyval.tree)); }
     break;
 
-  case 499:
+  case 497:
 
-/* Line 1455 of yacc.c  */
-#line 2034 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2020 "./sql3.y"
     { (yyval.list) = dk_set_conc ((yyvsp[(2) - (3)].list), t_CONS (t_list (5, BOP_AS, (ptrlong) 1, NULL, t_box_string ("__brkup_cond"), NULL), NULL)); }
     break;
 
-  case 500:
+  case 498:
 
-/* Line 1455 of yacc.c  */
-#line 2035 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2021 "./sql3.y"
     {
 	  ST * cond = (ST*) t_list (5, BOP_AS, t_list (2, SEARCHED_CASE, t_list (4, (yyvsp[(4) - (5)].tree), (caddr_t)1,  t_list (2, QUOTE, NULL), 0)), NULL, t_box_string ("__brkup_cond"), NULL);
 	  (yyval.list) = dk_set_conc ((yyvsp[(2) - (5)].list), t_CONS (cond, NULL)); }
     break;
 
-  case 501:
+  case 499:
 
-/* Line 1455 of yacc.c  */
-#line 2041 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2027 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].list), NULL);}
     break;
 
-  case 502:
+  case 500:
 
-/* Line 1455 of yacc.c  */
-#line 2042 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2028 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].list), NULL)); }
     break;
 
-  case 503:
+  case 501:
 
-/* Line 1455 of yacc.c  */
-#line 2046 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2032 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
-  case 504:
+  case 502:
 
-/* Line 1455 of yacc.c  */
-#line 2047 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2033 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array (t_CONS (t_list (1, SELECT_BREAKUP), (yyvsp[(2) - (2)].list))); }
     break;
 
-  case 505:
+  case 503:
 
-/* Line 1455 of yacc.c  */
-#line 2052 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2038 "./sql3.y"
     {
 			ST ** group_by = 0;
 			if ((yyvsp[(3) - (4)].tree))
@@ -11810,10 +11801,17 @@ yyreduce:
 		}
     break;
 
+  case 504:
+
+/* Line 1464 of yacc.c  */
+#line 2048 "./sql3.y"
+    { (yyval.tree) = NULL; }
+    break;
+
   case 506:
 
-/* Line 1455 of yacc.c  */
-#line 2064 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2055 "./sql3.y"
     {
 			ST ** group_by = 0;
 			if ((yyvsp[(3) - (7)].tree))
@@ -11825,71 +11823,71 @@ yyreduce:
 
   case 507:
 
-/* Line 1455 of yacc.c  */
-#line 2074 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2065 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(2) - (2)].list)); }
     break;
 
   case 508:
 
-/* Line 1455 of yacc.c  */
-#line 2078 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2069 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 509:
 
-/* Line 1455 of yacc.c  */
-#line 2080 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2071 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 510:
 
-/* Line 1455 of yacc.c  */
-#line 2085 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2076 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 511:
 
-/* Line 1455 of yacc.c  */
-#line 2086 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2077 "./sql3.y"
     { (yyval.list) =t_NCONC ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 512:
 
-/* Line 1455 of yacc.c  */
-#line 2092 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2083 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(2) - (3)].list)); }
     break;
 
   case 513:
 
-/* Line 1455 of yacc.c  */
-#line 2097 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2088 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (0); }
     break;
 
   case 514:
 
-/* Line 1455 of yacc.c  */
-#line 2098 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2089 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
   case 515:
 
-/* Line 1455 of yacc.c  */
-#line 2103 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2094 "./sql3.y"
     { (yyval.box) = t_listbox (3, TABLE_REF,(yyvsp[(1) - (1)].strval), (caddr_t) NULL); }
     break;
 
   case 516:
 
-/* Line 1455 of yacc.c  */
-#line 2105 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2096 "./sql3.y"
     {
 		  (yyval.box) = t_listbox (3, DERIVED_TABLE, sqlp_view_def (NULL, (yyvsp[(2) - (4)].tree), 0), (yyvsp[(4) - (4)].box));
 		}
@@ -11897,8 +11895,8 @@ yyreduce:
 
   case 517:
 
-/* Line 1455 of yacc.c  */
-#line 2109 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2100 "./sql3.y"
     {
 		  (yyval.box) = t_listbox (3, DERIVED_TABLE, sqlp_view_def (NULL, (yyvsp[(2) - (5)].tree), 0), (yyvsp[(5) - (5)].box));
 		}
@@ -11906,15 +11904,15 @@ yyreduce:
 
   case 518:
 
-/* Line 1455 of yacc.c  */
-#line 2113 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2104 "./sql3.y"
     { (yyval.box) = t_listbox (3, TABLE_REF,(yyvsp[(1) - (1)].tree), (caddr_t) NULL); }
     break;
 
   case 519:
 
-/* Line 1455 of yacc.c  */
-#line 2115 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2106 "./sql3.y"
     {
 		  (yyval.box) =  t_listbox (3, DERIVED_TABLE, t_list (4, PROC_TABLE, (yyvsp[(1) - (6)].strval), (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].tree)), (yyvsp[(6) - (6)].box));
 		}
@@ -11922,15 +11920,15 @@ yyreduce:
 
   case 520:
 
-/* Line 1455 of yacc.c  */
-#line 2121 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2112 "./sql3.y"
     { (yyval.box) = t_listbox (3, TABLE_REF,(yyvsp[(1) - (1)].strval), (caddr_t) NULL); }
     break;
 
   case 521:
 
-/* Line 1455 of yacc.c  */
-#line 2123 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2114 "./sql3.y"
     {
 		  (yyval.box) = t_listbox (3, DERIVED_TABLE, sqlp_view_def (NULL, (yyvsp[(1) - (2)].tree), 0), (caddr_t) (yyvsp[(2) - (2)].box));
 		}
@@ -11938,8 +11936,8 @@ yyreduce:
 
   case 522:
 
-/* Line 1455 of yacc.c  */
-#line 2127 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2118 "./sql3.y"
     {
 		  (yyval.box) = t_listbox (3, DERIVED_TABLE, sqlp_view_def (NULL, (yyvsp[(1) - (3)].tree), 0), (caddr_t) (yyvsp[(3) - (3)].box));
 		}
@@ -11947,57 +11945,57 @@ yyreduce:
 
   case 523:
 
-/* Line 1455 of yacc.c  */
-#line 2130 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2121 "./sql3.y"
     { (yyval.box) = (caddr_t) (yyvsp[(2) - (3)].tree); }
     break;
 
   case 524:
 
-/* Line 1455 of yacc.c  */
-#line 2134 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2125 "./sql3.y"
     { (yyval.subtok) = J_INNER; }
     break;
 
   case 525:
 
-/* Line 1455 of yacc.c  */
-#line 2135 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2126 "./sql3.y"
     { (yyval.subtok) = OJ_LEFT; }
     break;
 
   case 526:
 
-/* Line 1455 of yacc.c  */
-#line 2136 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2127 "./sql3.y"
     { (yyval.subtok) = OJ_RIGHT; }
     break;
 
   case 527:
 
-/* Line 1455 of yacc.c  */
-#line 2138 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2129 "./sql3.y"
     { (yyval.subtok) = OJ_FULL; }
     break;
 
   case 528:
 
-/* Line 1455 of yacc.c  */
-#line 2139 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2130 "./sql3.y"
     { (yyval.subtok) = J_INNER; }
     break;
 
   case 529:
 
-/* Line 1455 of yacc.c  */
-#line 2140 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2131 "./sql3.y"
     { (yyval.subtok) = J_CROSS; }
     break;
 
   case 532:
 
-/* Line 1455 of yacc.c  */
-#line 2150 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2141 "./sql3.y"
     { (yyval.join).type = (yyvsp[(2) - (2)].subtok);
 		  (yyval.join).natural = 1;
 		}
@@ -12005,8 +12003,8 @@ yyreduce:
 
   case 533:
 
-/* Line 1455 of yacc.c  */
-#line 2154 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2145 "./sql3.y"
     { (yyval.join).type = (yyvsp[(1) - (1)].subtok);
 		  (yyval.join).natural = 0;
 		}
@@ -12014,29 +12012,29 @@ yyreduce:
 
   case 534:
 
-/* Line 1455 of yacc.c  */
-#line 2160 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2151 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 535:
 
-/* Line 1455 of yacc.c  */
-#line 2161 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2152 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 536:
 
-/* Line 1455 of yacc.c  */
-#line 2162 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2153 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 537:
 
-/* Line 1455 of yacc.c  */
-#line 2167 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2158 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (6, JOINED_TABLE, (yyvsp[(2) - (5)].join).natural, (yyvsp[(2) - (5)].join).type,
 			(yyvsp[(1) - (5)].box), (yyvsp[(4) - (5)].box), (yyvsp[(5) - (5)].tree));
@@ -12045,43 +12043,43 @@ yyreduce:
 
   case 538:
 
-/* Line 1455 of yacc.c  */
-#line 2174 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2165 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 539:
 
-/* Line 1455 of yacc.c  */
-#line 2175 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2166 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 540:
 
-/* Line 1455 of yacc.c  */
-#line 2177 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2168 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, JC_USING, t_list_to_array ((yyvsp[(3) - (4)].list))); }
     break;
 
   case 541:
 
-/* Line 1455 of yacc.c  */
-#line 2181 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2172 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 542:
 
-/* Line 1455 of yacc.c  */
-#line 2185 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2176 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 543:
 
-/* Line 1455 of yacc.c  */
-#line 2187 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2178 "./sql3.y"
     {
 			(yyval.tree) = (ST*) t_list_to_array(t_CONS (t_list_to_array ((yyvsp[(3) - (3)].list)), NULL));
 		}
@@ -12089,8 +12087,8 @@ yyreduce:
 
   case 544:
 
-/* Line 1455 of yacc.c  */
-#line 2191 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2182 "./sql3.y"
     {
 			dk_set_t group_by_full = 0;
 			dk_set_t first_group_by_key = (dk_set_t)(yyvsp[(5) - (6)].list);
@@ -12106,8 +12104,8 @@ yyreduce:
 
   case 545:
 
-/* Line 1455 of yacc.c  */
-#line 2203 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2194 "./sql3.y"
     {
 		  ST ** etalon = (ST**) t_list_to_array ((yyvsp[(5) - (6)].list));
 		  dk_set_t group_by_full = 0;
@@ -12135,78 +12133,78 @@ yyreduce:
 
   case 546:
 
-/* Line 1455 of yacc.c  */
-#line 2237 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2228 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 547:
 
-/* Line 1455 of yacc.c  */
-#line 2238 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2229 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 548:
 
-/* Line 1455 of yacc.c  */
-#line 2242 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2233 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
   case 549:
 
-/* Line 1455 of yacc.c  */
-#line 2243 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2234 "./sql3.y"
     { (yyval.subtok) = PL_EXCLUSIVE; }
     break;
 
   case 550:
 
-/* Line 1455 of yacc.c  */
-#line 2244 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2235 "./sql3.y"
     { (yyval.subtok) = sqlp_xml_select_flags ((yyvsp[(3) - (3)].box), NULL); }
     break;
 
   case 551:
 
-/* Line 1455 of yacc.c  */
-#line 2245 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2236 "./sql3.y"
     { (yyval.subtok) = sqlp_xml_select_flags ((yyvsp[(3) - (4)].box), (yyvsp[(4) - (4)].box)); }
     break;
 
   case 552:
 
-/* Line 1455 of yacc.c  */
-#line 2252 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2243 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_OR, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)) }
     break;
 
   case 553:
 
-/* Line 1455 of yacc.c  */
-#line 2254 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2245 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_AND, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)) }
     break;
 
   case 554:
 
-/* Line 1455 of yacc.c  */
-#line 2256 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2247 "./sql3.y"
     { UN_OP ((yyval.tree), BOP_NOT, (yyvsp[(2) - (2)].tree)) }
     break;
 
   case 555:
 
-/* Line 1455 of yacc.c  */
-#line 2257 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2248 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 565:
 
-/* Line 1455 of yacc.c  */
-#line 2274 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2265 "./sql3.y"
     {
 		  ST *eq_op;
 		  BIN_OP (eq_op, BOP_EQ, (ST *) t_box_num_and_zero (0), (yyvsp[(1) - (1)].tree));
@@ -12216,8 +12214,8 @@ yyreduce:
 
   case 566:
 
-/* Line 1455 of yacc.c  */
-#line 2283 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2274 "./sql3.y"
     { BIN_OP ((yyval.tree), (yyvsp[(2) - (3)].subtok), (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree));
 		  /*IvAn*/ if ((yyval.tree)->type == BOP_NEQ)
 		    {
@@ -12230,8 +12228,8 @@ yyreduce:
 
   case 567:
 
-/* Line 1455 of yacc.c  */
-#line 2306 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2297 "./sql3.y"
     { ST *copy = (ST *) t_box_copy_tree ((caddr_t) (yyvsp[(1) - (6)].tree));
 		  ST *low_test;
 		  ST *high_test;
@@ -12243,8 +12241,8 @@ yyreduce:
 
   case 568:
 
-/* Line 1455 of yacc.c  */
-#line 2314 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2305 "./sql3.y"
     { ST *copy = (ST *) t_box_copy_tree ((caddr_t) (yyvsp[(1) - (5)].tree));
 		  ST *low_test;
 		  ST *high_test;
@@ -12256,8 +12254,8 @@ yyreduce:
 
   case 569:
 
-/* Line 1455 of yacc.c  */
-#line 2325 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2316 "./sql3.y"
     { ST* tmp;
 		  BIN_OP (tmp, BOP_LIKE, (yyvsp[(1) - (5)].tree), (ST *) (yyvsp[(4) - (5)].tree));
 		  tmp->_.bin_exp.more = (yyvsp[(5) - (5)].box);
@@ -12267,8 +12265,8 @@ yyreduce:
 
   case 570:
 
-/* Line 1455 of yacc.c  */
-#line 2331 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2322 "./sql3.y"
     {
 		  BIN_OP ((yyval.tree), BOP_LIKE, (yyvsp[(1) - (4)].tree), (ST *) (yyvsp[(3) - (4)].tree));
 		  (yyval.tree)->_.bin_exp.more = (yyvsp[(4) - (4)].box);
@@ -12277,15 +12275,15 @@ yyreduce:
 
   case 571:
 
-/* Line 1455 of yacc.c  */
-#line 2338 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2329 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 572:
 
-/* Line 1455 of yacc.c  */
-#line 2340 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2331 "./sql3.y"
     {
 		  if (!DV_STRINGP ((yyvsp[(2) - (2)].box)) || box_length ((yyvsp[(2) - (2)].box)) != 2)
 		    yy_new_error ("Invalid escape character in LIKE", "37000", "SQ136");
@@ -12295,8 +12293,8 @@ yyreduce:
 
   case 573:
 
-/* Line 1455 of yacc.c  */
-#line 2346 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2337 "./sql3.y"
     {
 		  if (!DV_STRINGP ((yyvsp[(3) - (4)].box)) || box_length ((yyvsp[(3) - (4)].box)) != 2)
 		    yy_new_error ("Invalid escape character in LIKE", "37000", "SQ136");
@@ -12306,8 +12304,8 @@ yyreduce:
 
   case 574:
 
-/* Line 1455 of yacc.c  */
-#line 2355 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2346 "./sql3.y"
     { ST *tmp;
 		  BIN_OP (tmp, BOP_NULL, (yyvsp[(1) - (4)].tree), NULL);
 		  NEGATE ((yyval.tree), tmp);
@@ -12316,15 +12314,15 @@ yyreduce:
 
   case 575:
 
-/* Line 1455 of yacc.c  */
-#line 2359 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2350 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_NULL, (yyvsp[(1) - (3)].tree), NULL); }
     break;
 
   case 576:
 
-/* Line 1455 of yacc.c  */
-#line 2364 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2355 "./sql3.y"
     {
 		  ST *in = NULL;
 		  in = SUBQ_PRED (SOME_PRED, (yyvsp[(1) - (4)].tree), sqlp_wpar_nonselect ((yyvsp[(4) - (4)].tree)), BOP_EQ, NULL);
@@ -12334,60 +12332,60 @@ yyreduce:
 
   case 577:
 
-/* Line 1455 of yacc.c  */
-#line 2370 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2361 "./sql3.y"
     {
 		  (yyval.tree) = SUBQ_PRED (SOME_PRED, (yyvsp[(1) - (3)].tree), sqlp_wpar_nonselect ((yyvsp[(3) - (3)].tree)), BOP_EQ, NULL); }
     break;
 
   case 578:
 
-/* Line 1455 of yacc.c  */
-#line 2373 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2364 "./sql3.y"
     { (yyval.tree) = sqlp_in_exp ((yyvsp[(1) - (6)].tree), (yyvsp[(5) - (6)].list), 1);
 		}
     break;
 
   case 579:
 
-/* Line 1455 of yacc.c  */
-#line 2376 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2367 "./sql3.y"
     { (yyval.tree) = sqlp_in_exp ((yyvsp[(1) - (5)].tree), (yyvsp[(4) - (5)].list), 0);
 		}
     break;
 
   case 580:
 
-/* Line 1455 of yacc.c  */
-#line 2389 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2380 "./sql3.y"
     { (yyval.tree) = SUBQ_PRED ((yyvsp[(3) - (4)].intval), (yyvsp[(1) - (4)].tree), sqlp_wpar_nonselect ((yyvsp[(4) - (4)].tree)), (yyvsp[(2) - (4)].subtok), NULL); }
     break;
 
   case 581:
 
-/* Line 1455 of yacc.c  */
-#line 2393 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2384 "./sql3.y"
     { (yyval.intval) = SOME_PRED; }
     break;
 
   case 582:
 
-/* Line 1455 of yacc.c  */
-#line 2394 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2385 "./sql3.y"
     { (yyval.intval) = ALL_PRED; }
     break;
 
   case 583:
 
-/* Line 1455 of yacc.c  */
-#line 2395 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2386 "./sql3.y"
     { (yyval.intval) = SOME_PRED; }
     break;
 
   case 584:
 
-/* Line 1455 of yacc.c  */
-#line 2400 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2391 "./sql3.y"
     {
 		  /* exists (select * ..) becomes exists (select 1 ...) */
 		  ST * ext_subq = (yyvsp[(2) - (2)].tree);
@@ -12398,93 +12396,93 @@ yyreduce:
 
   case 585:
 
-/* Line 1455 of yacc.c  */
-#line 2409 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2400 "./sql3.y"
     { (yyval.tree) = (ST *) t_list (2, SCALAR_SUBQ, sqlp_add_top_1 ((yyvsp[(1) - (1)].tree))); }
     break;
 
   case 586:
 
-/* Line 1455 of yacc.c  */
-#line 2420 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2405 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 587:
 
-/* Line 1455 of yacc.c  */
-#line 2421 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2406 "./sql3.y"
     { (yyval.tree) = (yyvsp[(3) - (4)].tree); }
     break;
 
   case 588:
 
-/* Line 1455 of yacc.c  */
-#line 2426 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2411 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_MINUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)) }
     break;
 
   case 589:
 
-/* Line 1455 of yacc.c  */
-#line 2427 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2412 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_PLUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)) }
     break;
 
   case 590:
 
-/* Line 1455 of yacc.c  */
-#line 2428 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2413 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_TIMES, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)) }
     break;
 
   case 591:
 
-/* Line 1455 of yacc.c  */
-#line 2429 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2414 "./sql3.y"
     { BIN_OP ((yyval.tree), BOP_DIV, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)) }
     break;
 
   case 592:
 
-/* Line 1455 of yacc.c  */
-#line 2430 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2415 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 593:
 
-/* Line 1455 of yacc.c  */
-#line 2431 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2416 "./sql3.y"
     { if (sqlp_is_num_lit ((caddr_t)((yyvsp[(2) - (2)].tree)))) (yyval.tree) = sqlp_minus ((caddr_t)((yyvsp[(2) - (2)].tree)));
 				          else BIN_OP ((yyval.tree), BOP_MINUS, (ST*) t_box_num (0), (yyvsp[(2) - (2)].tree)) }
     break;
 
   case 596:
 
-/* Line 1455 of yacc.c  */
-#line 2435 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2420 "./sql3.y"
     { (yyval.tree) = (sql_tree_t *) (yyvsp[(1) - (1)].tree); }
     break;
 
   case 599:
 
-/* Line 1455 of yacc.c  */
-#line 2441 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2426 "./sql3.y"
     { (yyval.tree) = (sql_tree_t *) (yyvsp[(1) - (1)].box); }
     break;
 
   case 602:
 
-/* Line 1455 of yacc.c  */
-#line 2458 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2429 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 603:
 
-/* Line 1455 of yacc.c  */
-#line 2460 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2431 "./sql3.y"
     { dk_set_t exps = t_CONS ((yyvsp[(2) - (5)].tree), (yyvsp[(4) - (5)].list));
 		  (yyval.tree) = t_listst (2, COMMA_EXP, t_list_to_array (exps));
 		}
@@ -12492,22 +12490,22 @@ yyreduce:
 
   case 616:
 
-/* Line 1455 of yacc.c  */
-#line 2478 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2449 "./sql3.y"
     { (yyval.tree) = (sql_tree_t *) (yyvsp[(1) - (1)].box); }
     break;
 
   case 619:
 
-/* Line 1455 of yacc.c  */
-#line 2495 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2452 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 620:
 
-/* Line 1455 of yacc.c  */
-#line 2497 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2454 "./sql3.y"
     { dk_set_t exps = t_CONS ((yyvsp[(2) - (5)].tree), (yyvsp[(4) - (5)].list));
 		  (yyval.tree) = t_listst (2, COMMA_EXP, t_list_to_array (exps));
 		}
@@ -12515,8 +12513,8 @@ yyreduce:
 
   case 633:
 
-/* Line 1455 of yacc.c  */
-#line 2516 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2473 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("_cvt"),
 			t_list (2,
 			  t_list (2, QUOTE, (yyvsp[(3) - (6)].tree)),
@@ -12526,22 +12524,22 @@ yyreduce:
 
   case 634:
 
-/* Line 1455 of yacc.c  */
-#line 2524 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2481 "./sql3.y"
     { (yyval.strval) = NULL; }
     break;
 
   case 635:
 
-/* Line 1455 of yacc.c  */
-#line 2525 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2482 "./sql3.y"
     { (yyval.strval) = (yyvsp[(2) - (2)].strval); }
     break;
 
   case 636:
 
-/* Line 1455 of yacc.c  */
-#line 2530 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2487 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("_cvt"),
 			t_list ((yyvsp[(6) - (7)].strval) == NULL ? 2 : 3, t_list (2, QUOTE, (yyvsp[(5) - (7)].tree)),
 			sqlp_wrapper_sqlxml_assign ((yyvsp[(3) - (7)].tree)), (yyvsp[(6) - (7)].strval) ) );
@@ -12550,234 +12548,234 @@ yyreduce:
 
   case 637:
 
-/* Line 1455 of yacc.c  */
-#line 2543 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2500 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, XML_COL, (yyvsp[(1) - (3)].box), (yyvsp[(2) - (3)].box), (yyvsp[(3) - (3)].box), XML_COL_ATTR); }
     break;
 
   case 638:
 
-/* Line 1455 of yacc.c  */
-#line 2545 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2502 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, XML_COL, (yyvsp[(1) - (3)].box), (yyvsp[(2) - (3)].box), t_sym_string(""), sqlp_xml_col_directive ((yyvsp[(3) - (3)].box))); }
     break;
 
   case 639:
 
-/* Line 1455 of yacc.c  */
-#line 2547 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2504 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, XML_COL, (yyvsp[(1) - (4)].box), (yyvsp[(2) - (4)].box), (yyvsp[(3) - (4)].box), sqlp_xml_col_directive ((yyvsp[(4) - (4)].box))); }
     break;
 
   case 640:
 
-/* Line 1455 of yacc.c  */
-#line 2552 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2509 "./sql3.y"
     { (yyval.tree) = t_listst (5, BOP_AS, (yyvsp[(1) - (4)].tree), NULL, (yyvsp[(3) - (4)].box), (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 641:
 
-/* Line 1455 of yacc.c  */
-#line 2554 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2511 "./sql3.y"
     { (yyval.tree) = t_listst (5, BOP_AS, (yyvsp[(1) - (3)].tree), NULL, (yyvsp[(3) - (3)].box), NULL); }
     break;
 
   case 642:
 
-/* Line 1455 of yacc.c  */
-#line 2556 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2513 "./sql3.y"
     { (yyval.tree) = t_listst (5, BOP_AS, (yyvsp[(1) - (2)].tree), NULL, (yyvsp[(2) - (2)].box), NULL); }
     break;
 
   case 643:
 
-/* Line 1455 of yacc.c  */
-#line 2558 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2515 "./sql3.y"
     { (yyval.tree) = t_listst (6, BOP_AS, (yyvsp[(1) - (3)].tree), NULL, sqlp_xml_col_name ((yyvsp[(3) - (3)].tree)), NULL, (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 644:
 
-/* Line 1455 of yacc.c  */
-#line 2560 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2517 "./sql3.y"
     { (yyval.tree) = t_listst (5, BOP_AS, (yyvsp[(1) - (3)].tree), NULL, t_sym_string ((yyvsp[(3) - (3)].box)), NULL); }
     break;
 
   case 645:
 
-/* Line 1455 of yacc.c  */
-#line 2562 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2519 "./sql3.y"
     { (yyval.tree) = t_listst (5, BOP_AS, (yyvsp[(1) - (2)].tree), NULL, t_sym_string ((yyvsp[(2) - (2)].box)), NULL); }
     break;
 
   case 646:
 
-/* Line 1455 of yacc.c  */
-#line 2567 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2524 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("aref"),
 		    t_list_to_array (t_CONS ((yyvsp[(1) - (2)].tree), (yyvsp[(2) - (2)].list))) ); }
     break;
 
   case 648:
 
-/* Line 1455 of yacc.c  */
-#line 2574 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2531 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("aref"),
 		    t_list_to_array (t_CONS ((yyvsp[(1) - (2)].tree), (yyvsp[(2) - (2)].list))) ); }
     break;
 
   case 649:
 
-/* Line 1455 of yacc.c  */
-#line 2579 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2536 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
   case 651:
 
-/* Line 1455 of yacc.c  */
-#line 2587 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2544 "./sql3.y"
     { (yyval.box) = sqlp_proc_name (NULL, 0, NULL, 0, NULL, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 652:
 
-/* Line 1455 of yacc.c  */
-#line 2588 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2545 "./sql3.y"
     { (yyval.box) = sqlp_proc_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), NULL, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 653:
 
-/* Line 1455 of yacc.c  */
-#line 2589 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2546 "./sql3.y"
     { (yyval.box) = sqlp_proc_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), NULL, (yyvsp[(5) - (5)].box)); }
     break;
 
   case 654:
 
-/* Line 1455 of yacc.c  */
-#line 2590 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2547 "./sql3.y"
     { (yyval.box) = sqlp_proc_name ((yyvsp[(1) - (7)].box), box_length ((yyvsp[(1) - (7)].box)), (yyvsp[(3) - (7)].box), box_length ((yyvsp[(3) - (7)].box)), (yyvsp[(5) - (7)].box), (yyvsp[(7) - (7)].box)); }
     break;
 
   case 655:
 
-/* Line 1455 of yacc.c  */
-#line 2591 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2548 "./sql3.y"
     { (yyval.box) = sqlp_proc_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, NULL, (yyvsp[(4) - (4)].box)); }
     break;
 
   case 656:
 
-/* Line 1455 of yacc.c  */
-#line 2592 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2549 "./sql3.y"
     { (yyval.box) = sqlp_proc_name ((yyvsp[(1) - (6)].box), box_length ((yyvsp[(1) - (6)].box)), NULL, 0, (yyvsp[(4) - (6)].box), (yyvsp[(6) - (6)].box)); }
     break;
 
   case 657:
 
-/* Line 1455 of yacc.c  */
-#line 2593 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2550 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ("left"); }
     break;
 
   case 658:
 
-/* Line 1455 of yacc.c  */
-#line 2594 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2551 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ("right"); }
     break;
 
   case 659:
 
-/* Line 1455 of yacc.c  */
-#line 2595 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2552 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase ("log"); }
     break;
 
   case 660:
 
-/* Line 1455 of yacc.c  */
-#line 2600 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2557 "./sql3.y"
     { (yyval.list) = t_CONS (t_list (3, KWD_PARAM, (yyvsp[(1) - (3)].box), (yyvsp[(3) - (3)].tree)), NULL);}
     break;
 
   case 661:
 
-/* Line 1455 of yacc.c  */
-#line 2601 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2558 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (5)].list), t_CONS (t_list (3, KWD_PARAM, (yyvsp[(3) - (5)].box), (yyvsp[(5) - (5)].tree)), NULL)); }
     break;
 
   case 662:
 
-/* Line 1455 of yacc.c  */
-#line 2606 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2563 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 663:
 
-/* Line 1455 of yacc.c  */
-#line 2607 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2564 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 664:
 
-/* Line 1455 of yacc.c  */
-#line 2608 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2565 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL));}
     break;
 
   case 665:
 
-/* Line 1455 of yacc.c  */
-#line 2612 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2569 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
   case 666:
 
-/* Line 1455 of yacc.c  */
-#line 2613 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2570 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 667:
 
-/* Line 1455 of yacc.c  */
-#line 2614 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2571 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 668:
 
-/* Line 1455 of yacc.c  */
-#line 2615 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2572 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 669:
 
-/* Line 1455 of yacc.c  */
-#line 2617 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2574 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 670:
 
-/* Line 1455 of yacc.c  */
-#line 2618 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2575 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 671:
 
-/* Line 1455 of yacc.c  */
-#line 2623 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2580 "./sql3.y"
     {
 		  ST **arglist = (ST **)t_list_to_array ((yyvsp[(3) - (4)].list));
 		  ST *fun_ref = sqlp_make_user_aggregate_fun_ref ((yyvsp[(1) - (4)].box), arglist, 0);
@@ -12793,8 +12791,8 @@ yyreduce:
 
   case 672:
 
-/* Line 1455 of yacc.c  */
-#line 2635 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2592 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT,
 		      t_sqlp_box_id_upcase ((yyvsp[(1) - (8)].subtok) == SQL_FN_TIMESTAMPADD ? "timestampadd" : "timestampdiff"),
@@ -12804,8 +12802,8 @@ yyreduce:
 
   case 673:
 
-/* Line 1455 of yacc.c  */
-#line 2641 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2598 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT,
 		      t_sqlp_box_id_upcase ("__extract"),
@@ -12815,36 +12813,36 @@ yyreduce:
 
   case 674:
 
-/* Line 1455 of yacc.c  */
-#line 2647 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2604 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, (yyvsp[(2) - (6)].box), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 675:
 
-/* Line 1455 of yacc.c  */
-#line 2649 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2606 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("left"), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 676:
 
-/* Line 1455 of yacc.c  */
-#line 2651 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2608 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("right"), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 677:
 
-/* Line 1455 of yacc.c  */
-#line 2653 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2610 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("log"), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 678:
 
-/* Line 1455 of yacc.c  */
-#line 2655 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2612 "./sql3.y"
     {
 		  if (stricmp ((yyvsp[(2) - (8)].box), "POSITION"))
 		    yyerror ("syntax error");
@@ -12855,38 +12853,38 @@ yyreduce:
 
   case 679:
 
-/* Line 1455 of yacc.c  */
-#line 2662 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2619 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, (yyvsp[(2) - (6)].box), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 680:
 
-/* Line 1455 of yacc.c  */
-#line 2664 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2621 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, (yyvsp[(2) - (3)].box), t_list_to_array (NULL)); }
     break;
 
   case 681:
 
-/* Line 1455 of yacc.c  */
-#line 2666 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2623 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("get_user"), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 682:
 
-/* Line 1455 of yacc.c  */
-#line 2669 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2626 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("chr"), t_list_to_array ((yyvsp[(4) - (6)].list))); }
     break;
 
   case 683:
 
-/* Line 1455 of yacc.c  */
-#line 2672 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2629 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT,
 		      t_sqlp_box_id_upcase ((yyvsp[(2) - (10)].subtok) == SQL_FN_TIMESTAMPADD ? "timestampadd" : "timestampdiff"),
@@ -12896,8 +12894,8 @@ yyreduce:
 
   case 684:
 
-/* Line 1455 of yacc.c  */
-#line 2678 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2635 "./sql3.y"
     {
 		  caddr_t data_type = sqlc_convert_odbc_to_sql_type ((yyvsp[(6) - (8)].box));
 		  if (!data_type)
@@ -12910,8 +12908,8 @@ yyreduce:
 
   case 685:
 
-/* Line 1455 of yacc.c  */
-#line 2687 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2644 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT,
 		      t_sqlp_box_id_upcase ("__extract"),
@@ -12921,16 +12919,16 @@ yyreduce:
 
   case 686:
 
-/* Line 1455 of yacc.c  */
-#line 2693 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2650 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_list (1, (yyvsp[(3) - (7)].tree)),
 			t_list_to_array ((yyvsp[(6) - (7)].list))); }
     break;
 
   case 687:
 
-/* Line 1455 of yacc.c  */
-#line 2696 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2653 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("curdate"), t_list (0));
 		}
@@ -12938,8 +12936,8 @@ yyreduce:
 
   case 688:
 
-/* Line 1455 of yacc.c  */
-#line 2700 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2657 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("curtime"), t_list (0));
 		}
@@ -12947,8 +12945,8 @@ yyreduce:
 
   case 689:
 
-/* Line 1455 of yacc.c  */
-#line 2704 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2661 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("curtime"), t_list (1, (yyvsp[(3) - (4)].tree)));
 		}
@@ -12956,8 +12954,8 @@ yyreduce:
 
   case 690:
 
-/* Line 1455 of yacc.c  */
-#line 2708 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2665 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("curdatetime"), t_list (0));
 		}
@@ -12965,8 +12963,8 @@ yyreduce:
 
   case 691:
 
-/* Line 1455 of yacc.c  */
-#line 2712 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2669 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("curdatetime"), t_list (1, (yyvsp[(3) - (4)].tree)));
 		}
@@ -12974,8 +12972,8 @@ yyreduce:
 
   case 692:
 
-/* Line 1455 of yacc.c  */
-#line 2716 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2673 "./sql3.y"
     {
 		  caddr_t bit = t_box_num (0);
 		  caddr_t bit_index = t_box_num (0);
@@ -12985,22 +12983,22 @@ yyreduce:
 
   case 693:
 
-/* Line 1455 of yacc.c  */
-#line 2726 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2683 "./sql3.y"
     { (yyval.tree) = t_listst (4, CALL_STMT, (yyvsp[(2) - (3)].strval), t_list_to_array (NULL), (yyvsp[(1) - (3)].box)); }
     break;
 
   case 694:
 
-/* Line 1455 of yacc.c  */
-#line 2728 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2685 "./sql3.y"
     { (yyval.tree) = t_listst (4, CALL_STMT, (yyvsp[(2) - (6)].strval), t_list_to_array ((yyvsp[(4) - (6)].list)), (yyvsp[(1) - (6)].box)); }
     break;
 
   case 695:
 
-/* Line 1455 of yacc.c  */
-#line 2748 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2705 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase (obe_keyword_to_bif_fun_name ((yyvsp[(2) - (4)].box))),
 			t_list (1, (yyvsp[(3) - (4)].box)));
@@ -13009,151 +13007,151 @@ yyreduce:
 
   case 696:
 
-/* Line 1455 of yacc.c  */
-#line 2753 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2710 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("get_keyword"),
 				   t_list (2, (yyvsp[(2) - (3)].box), t_list (3, COL_DOTTED, NULL, t_sqlp_box_id_upcase ("params")))); }
     break;
 
   case 697:
 
-/* Line 1455 of yacc.c  */
-#line 2758 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2715 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 698:
 
-/* Line 1455 of yacc.c  */
-#line 2759 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2716 "./sql3.y"
     { t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 699:
 
-/* Line 1455 of yacc.c  */
-#line 2763 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2720 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 700:
 
-/* Line 1455 of yacc.c  */
-#line 2764 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2721 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 701:
 
-/* Line 1455 of yacc.c  */
-#line 2765 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2722 "./sql3.y"
     { t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 702:
 
-/* Line 1455 of yacc.c  */
-#line 2766 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2723 "./sql3.y"
     { t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 705:
 
-/* Line 1455 of yacc.c  */
-#line 2772 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2729 "./sql3.y"
     { (yyval.box) = t_listbox (3, CALL_STMT,
 				t_sqlp_box_id_upcase ("get_user"), t_list (0)); }
     break;
 
   case 707:
 
-/* Line 1455 of yacc.c  */
-#line 2778 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2735 "./sql3.y"
     { (yyval.box) = (caddr_t) (yyvsp[(1) - (1)].tree); }
     break;
 
   case 708:
 
-/* Line 1455 of yacc.c  */
-#line 2783 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2740 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, SIMPLE_CASE,
 			t_list_to_array (t_CONS ((yyvsp[(2) - (4)].tree), (yyvsp[(3) - (4)].list)))); }
     break;
 
   case 709:
 
-/* Line 1455 of yacc.c  */
-#line 2789 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2746 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, SEARCHED_CASE, t_list_to_array ((yyvsp[(2) - (3)].list))); }
     break;
 
   case 710:
 
-/* Line 1455 of yacc.c  */
-#line 2793 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2750 "./sql3.y"
     { (yyval.list) =  (yyvsp[(1) - (1)].list); }
     break;
 
   case 711:
 
-/* Line 1455 of yacc.c  */
-#line 2794 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2751 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); }
     break;
 
   case 712:
 
-/* Line 1455 of yacc.c  */
-#line 2798 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2755 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 713:
 
-/* Line 1455 of yacc.c  */
-#line 2799 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2756 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list)); }
     break;
 
   case 714:
 
-/* Line 1455 of yacc.c  */
-#line 2804 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2761 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(2) - (4)].tree), t_CONS ((yyvsp[(4) - (4)].tree), NULL)); }
     break;
 
   case 715:
 
-/* Line 1455 of yacc.c  */
-#line 2806 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2763 "./sql3.y"
     { (yyval.list) = t_CONS ( t_list (2, QUOTE, NULL), t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 716:
 
-/* Line 1455 of yacc.c  */
-#line 2811 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2768 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(2) - (4)].tree), t_CONS ((yyvsp[(4) - (4)].tree), NULL)); }
     break;
 
   case 717:
 
-/* Line 1455 of yacc.c  */
-#line 2813 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2770 "./sql3.y"
     { (yyval.list) = t_CONS ( t_list (2, QUOTE, NULL), t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 718:
 
-/* Line 1455 of yacc.c  */
-#line 2818 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2775 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, COALESCE_EXP, t_list_to_array ((yyvsp[(3) - (4)].list))); }
     break;
 
   case 719:
 
-/* Line 1455 of yacc.c  */
-#line 2823 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2780 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, SIMPLE_CASE,
 		  	t_list (5, (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].tree), t_alloc_box (0, DV_DB_NULL),
 			t_list (2, QUOTE, NULL), t_box_copy_tree ((caddr_t) (yyvsp[(3) - (6)].tree)))); }
@@ -13161,22 +13159,22 @@ yyreduce:
 
   case 721:
 
-/* Line 1455 of yacc.c  */
-#line 2831 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2788 "./sql3.y"
     { (yyval.box) = t_listbox (3, PARAM_WITH_IND, (yyvsp[(1) - (2)].box), (yyvsp[(2) - (2)].box)); }
     break;
 
   case 722:
 
-/* Line 1455 of yacc.c  */
-#line 2833 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2790 "./sql3.y"
     { (yyval.box) = t_listbox (3, PARAM_WITH_IND, (yyvsp[(1) - (3)].box), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 723:
 
-/* Line 1455 of yacc.c  */
-#line 2838 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2795 "./sql3.y"
     {
 		  ST **arglist = (ST **)(t_list_to_array ((yyvsp[(4) - (5)].list)));
 		  (yyval.tree) = sqlp_make_user_aggregate_fun_ref ((yyvsp[(2) - (5)].box), arglist, 1);
@@ -13185,78 +13183,78 @@ yyreduce:
 
   case 724:
 
-/* Line 1455 of yacc.c  */
-#line 2843 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2800 "./sql3.y"
     { FN_REF ((yyval.tree), (yyvsp[(1) - (5)].subtok), 1, (yyvsp[(4) - (5)].tree)) }
     break;
 
   case 725:
 
-/* Line 1455 of yacc.c  */
-#line 2844 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2801 "./sql3.y"
     { FN_REF ((yyval.tree), (yyvsp[(1) - (5)].subtok), 0, (yyvsp[(4) - (5)].tree)) }
     break;
 
   case 726:
 
-/* Line 1455 of yacc.c  */
-#line 2845 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2802 "./sql3.y"
     { FN_REF ((yyval.tree), (yyvsp[(1) - (4)].subtok), 0, (yyvsp[(3) - (4)].tree)) }
     break;
 
   case 734:
 
-/* Line 1455 of yacc.c  */
-#line 2856 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2813 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
   case 735:
 
-/* Line 1455 of yacc.c  */
-#line 2857 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2814 "./sql3.y"
     { (yyval.box) = ((caddr_t *)(yyvsp[(3) - (3)].tree))[0]; }
     break;
 
   case 736:
 
-/* Line 1455 of yacc.c  */
-#line 2858 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2815 "./sql3.y"
     { (yyval.box) = (caddr_t) DV_XML_ENTITY; }
     break;
 
   case 737:
 
-/* Line 1455 of yacc.c  */
-#line 2859 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2816 "./sql3.y"
     { (yyval.box) = (caddr_t) DV_RDF; }
     break;
 
   case 738:
 
-/* Line 1455 of yacc.c  */
-#line 2860 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2817 "./sql3.y"
     { (yyval.box) = (caddr_t) DV_ARRAY_OF_POINTER; }
     break;
 
   case 743:
 
-/* Line 1455 of yacc.c  */
-#line 2868 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2825 "./sql3.y"
     { (yyval.box) = t_box_num_and_zero (-1 * unbox ((yyvsp[(2) - (2)].box))); }
     break;
 
   case 744:
 
-/* Line 1455 of yacc.c  */
-#line 2869 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2826 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 746:
 
-/* Line 1455 of yacc.c  */
-#line 2872 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2829 "./sql3.y"
     {
 		  switch (DV_TYPE_OF ((yyvsp[(2) - (2)].box)))
 		    {
@@ -13274,141 +13272,141 @@ yyreduce:
 
   case 747:
 
-/* Line 1455 of yacc.c  */
-#line 2885 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2842 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 749:
 
-/* Line 1455 of yacc.c  */
-#line 2887 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2844 "./sql3.y"
     { (yyval.box) = (caddr_t) t_NULLCONST; }
     break;
 
   case 750:
 
-/* Line 1455 of yacc.c  */
-#line 2899 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2850 "./sql3.y"
     { (yyval.strval) = sqlp_table_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 751:
 
-/* Line 1455 of yacc.c  */
-#line 2900 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2851 "./sql3.y"
     { (yyval.strval) = sqlp_table_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box), 1); }
     break;
 
   case 752:
 
-/* Line 1455 of yacc.c  */
-#line 2901 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2852 "./sql3.y"
     { (yyval.strval) = sqlp_table_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box), 1); }
     break;
 
   case 753:
 
-/* Line 1455 of yacc.c  */
-#line 2902 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2853 "./sql3.y"
     { (yyval.strval) = sqlp_table_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box), 1); }
     break;
 
   case 754:
 
-/* Line 1455 of yacc.c  */
-#line 2906 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2857 "./sql3.y"
     { (yyval.strval) = sqlp_table_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 755:
 
-/* Line 1455 of yacc.c  */
-#line 2907 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2858 "./sql3.y"
     { (yyval.strval) = sqlp_table_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box), 0); }
     break;
 
   case 756:
 
-/* Line 1455 of yacc.c  */
-#line 2908 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2859 "./sql3.y"
     { (yyval.strval) = sqlp_table_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box), 0); }
     break;
 
   case 757:
 
-/* Line 1455 of yacc.c  */
-#line 2909 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2860 "./sql3.y"
     { (yyval.strval) = sqlp_table_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box), 0); }
     break;
 
   case 758:
 
-/* Line 1455 of yacc.c  */
-#line 2913 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2864 "./sql3.y"
     { (yyval.strval) = (bif_find((yyvsp[(1) - (1)].box)) ? (yyvsp[(1) - (1)].box) : sqlp_new_table_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box))); }
     break;
 
   case 759:
 
-/* Line 1455 of yacc.c  */
-#line 2914 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2865 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 760:
 
-/* Line 1455 of yacc.c  */
-#line 2915 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2866 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box)); }
     break;
 
   case 761:
 
-/* Line 1455 of yacc.c  */
-#line 2916 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2867 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box)); }
     break;
 
   case 762:
 
-/* Line 1455 of yacc.c  */
-#line 2920 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2871 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 763:
 
-/* Line 1455 of yacc.c  */
-#line 2921 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2872 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 764:
 
-/* Line 1455 of yacc.c  */
-#line 2922 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2873 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box)); }
     break;
 
   case 765:
 
-/* Line 1455 of yacc.c  */
-#line 2923 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2874 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box)); }
     break;
 
   case 766:
 
-/* Line 1455 of yacc.c  */
-#line 2928 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2879 "./sql3.y"
     { (yyval.strval) = t_listbox (6, TABLE_DOTTED, (yyvsp[(1) - (2)].strval), NULL, sqlp_view_u_id (), sqlp_view_g_id (), (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 767:
 
-/* Line 1455 of yacc.c  */
-#line 2930 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2881 "./sql3.y"
     {
 		  (yyval.strval) = t_listbox (6, TABLE_DOTTED, (yyvsp[(1) - (4)].strval), (yyvsp[(3) - (4)].box), sqlp_view_u_id (), sqlp_view_g_id (), (yyvsp[(4) - (4)].tree));
 		}
@@ -13416,8 +13414,8 @@ yyreduce:
 
   case 768:
 
-/* Line 1455 of yacc.c  */
-#line 2934 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2885 "./sql3.y"
     {
 		  (yyval.strval) = t_listbox (6, TABLE_DOTTED, (yyvsp[(1) - (3)].strval), (yyvsp[(2) - (3)].box), sqlp_view_u_id (), sqlp_view_g_id (), (yyvsp[(3) - (3)].tree));
 		}
@@ -13425,311 +13423,311 @@ yyreduce:
 
   case 769:
 
-/* Line 1455 of yacc.c  */
-#line 2942 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2893 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, NULL, (yyvsp[(1) - (1)].box));
 		}
     break;
 
   case 770:
 
-/* Line 1455 of yacc.c  */
-#line 2945 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2896 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref (NULL, 0, NULL, 0, (yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box));
 		}
     break;
 
   case 771:
 
-/* Line 1455 of yacc.c  */
-#line 2948 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2899 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref (NULL, 0, (yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box));
 		}
     break;
 
   case 772:
 
-/* Line 1455 of yacc.c  */
-#line 2951 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2902 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref ((yyvsp[(1) - (7)].box), box_length ((yyvsp[(1) - (7)].box)), (yyvsp[(3) - (7)].box), box_length ((yyvsp[(3) - (7)].box)), (yyvsp[(5) - (7)].box)), (yyvsp[(7) - (7)].box));
 		}
     break;
 
   case 773:
 
-/* Line 1455 of yacc.c  */
-#line 2954 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2905 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref ((yyvsp[(1) - (6)].box), box_length ((yyvsp[(1) - (6)].box)), NULL, 0, (yyvsp[(4) - (6)].box)), (yyvsp[(6) - (6)].box));
 		}
     break;
 
   case 774:
 
-/* Line 1455 of yacc.c  */
-#line 2957 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2908 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, (long) 0, STAR);
 		}
     break;
 
   case 775:
 
-/* Line 1455 of yacc.c  */
-#line 2960 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2911 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref (NULL, 0, NULL, 0, (yyvsp[(1) - (3)].box)), STAR);
 		}
     break;
 
   case 776:
 
-/* Line 1455 of yacc.c  */
-#line 2963 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2914 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref (NULL, 0, (yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box)), STAR);
 		}
     break;
 
   case 777:
 
-/* Line 1455 of yacc.c  */
-#line 2966 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2917 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref ((yyvsp[(1) - (7)].box), box_length ((yyvsp[(1) - (7)].box)), (yyvsp[(3) - (7)].box), box_length ((yyvsp[(3) - (7)].box)), (yyvsp[(5) - (7)].box)), STAR);
 		}
     break;
 
   case 778:
 
-/* Line 1455 of yacc.c  */
-#line 2969 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2920 "./sql3.y"
     { (yyval.tree) = t_listst (3, COL_DOTTED, c_pref ((yyvsp[(1) - (6)].box), box_length ((yyvsp[(1) - (6)].box)), NULL, 0, (yyvsp[(4) - (6)].box)), STAR);
 		}
     break;
 
   case 779:
 
-/* Line 1455 of yacc.c  */
-#line 2976 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2927 "./sql3.y"
     { (yyval.tree) = sqlp_numeric (0, 0);
 		}
     break;
 
   case 780:
 
-/* Line 1455 of yacc.c  */
-#line 2979 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2930 "./sql3.y"
     { (yyval.tree) = sqlp_numeric ((yyvsp[(3) - (4)].box), 0);
 		}
     break;
 
   case 781:
 
-/* Line 1455 of yacc.c  */
-#line 2982 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2933 "./sql3.y"
     { (yyval.tree) = sqlp_numeric ((yyvsp[(3) - (6)].box), (yyvsp[(5) - (6)].box));
 		}
     break;
 
   case 782:
 
-/* Line 1455 of yacc.c  */
-#line 2985 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2936 "./sql3.y"
     { (yyval.tree) = sqlp_numeric (0, 0);
 		}
     break;
 
   case 783:
 
-/* Line 1455 of yacc.c  */
-#line 2988 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2939 "./sql3.y"
     { (yyval.tree) = sqlp_numeric ((yyvsp[(3) - (4)].box), 0);
 		}
     break;
 
   case 784:
 
-/* Line 1455 of yacc.c  */
-#line 2991 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2942 "./sql3.y"
     { (yyval.tree) = sqlp_numeric ((yyvsp[(3) - (6)].box), (yyvsp[(5) - (6)].box));
 		}
     break;
 
   case 785:
 
-/* Line 1455 of yacc.c  */
-#line 2994 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2945 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_INT, (long) 0);
 		}
     break;
 
   case 786:
 
-/* Line 1455 of yacc.c  */
-#line 2997 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2948 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_SHORT_INT, (long) 0);
 		}
     break;
 
   case 787:
 
-/* Line 1455 of yacc.c  */
-#line 3000 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2951 "./sql3.y"
     { (yyval.tree) = t_listst (3, (ptrlong) DV_INT64, t_box_num (19), t_box_num (0));
 		}
     break;
 
   case 788:
 
-/* Line 1455 of yacc.c  */
-#line 3003 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2954 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_DOUBLE_FLOAT, (long) 0);
 		}
     break;
 
   case 789:
 
-/* Line 1455 of yacc.c  */
-#line 3006 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2957 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_DOUBLE_FLOAT, (long) 0);
 		}
     break;
 
   case 790:
 
-/* Line 1455 of yacc.c  */
-#line 3009 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2960 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_SINGLE_FLOAT, (long) 0);
 		}
     break;
 
   case 791:
 
-/* Line 1455 of yacc.c  */
-#line 3012 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2963 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_DOUBLE_FLOAT, (long) 0);
 		}
     break;
 
   case 792:
 
-/* Line 1455 of yacc.c  */
-#line 3015 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2966 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_BLOB, t_box_num (0x7fffffff));
 		}
     break;
 
   case 793:
 
-/* Line 1455 of yacc.c  */
-#line 3018 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2969 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_BLOB_BIN, t_box_num (0x7fffffff));
 		}
     break;
 
   case 794:
 
-/* Line 1455 of yacc.c  */
-#line 3021 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2972 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_BIN, (long) 0);
 		}
     break;
 
   case 795:
 
-/* Line 1455 of yacc.c  */
-#line 3024 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2975 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_BIN, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 796:
 
-/* Line 1455 of yacc.c  */
-#line 3027 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2978 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_BIN, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 797:
 
-/* Line 1455 of yacc.c  */
-#line 3030 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2981 "./sql3.y"
     { (yyval.tree) = t_listst (3, (long) DV_TIMESTAMP, (long) 10, (long) 6);
 		}
     break;
 
   case 798:
 
-/* Line 1455 of yacc.c  */
-#line 3033 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2984 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_DATETIME, (long) 19);
 		}
     break;
 
   case 799:
 
-/* Line 1455 of yacc.c  */
-#line 3036 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2987 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_TIME, (long) 8);
 		}
     break;
 
   case 800:
 
-/* Line 1455 of yacc.c  */
-#line 3039 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2990 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_DATE, (long) 10);
 		}
     break;
 
   case 801:
 
-/* Line 1455 of yacc.c  */
-#line 3042 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2993 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_WIDE, (long) 1);
 		}
     break;
 
   case 802:
 
-/* Line 1455 of yacc.c  */
-#line 3045 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2996 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_WIDE, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 803:
 
-/* Line 1455 of yacc.c  */
-#line 3048 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 2999 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_WIDE, (long) 0);
 		}
     break;
 
   case 804:
 
-/* Line 1455 of yacc.c  */
-#line 3051 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3002 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_WIDE, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 805:
 
-/* Line 1455 of yacc.c  */
-#line 3054 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3005 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_BLOB_WIDE, t_box_num (0x7fffffff));
 		}
     break;
 
   case 806:
 
-/* Line 1455 of yacc.c  */
-#line 3057 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3008 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_ANY, (long) 0); }
     break;
 
   case 807:
 
-/* Line 1455 of yacc.c  */
-#line 3059 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3010 "./sql3.y"
     {
 		  assert_ms_compat("Columns of type ANY (length) may be created only in MS-compatibility mode");
 		  (yyval.tree) = t_listst (2, (long) DV_ANY, (long) 0);
@@ -13738,78 +13736,78 @@ yyreduce:
 
   case 808:
 
-/* Line 1455 of yacc.c  */
-#line 3064 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3015 "./sql3.y"
     { (yyval.tree) = t_listst (2, (ptrlong) DV_IRI_ID, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 809:
 
-/* Line 1455 of yacc.c  */
-#line 3067 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3018 "./sql3.y"
     { (yyval.tree) = t_listst (2, (ptrlong) DV_IRI_ID, (ptrlong)12); /* #i+10digits */
 		}
     break;
 
   case 810:
 
-/* Line 1455 of yacc.c  */
-#line 3070 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3021 "./sql3.y"
     { (yyval.tree) = t_listst (2, (ptrlong) DV_IRI_ID_8, (ptrlong)22); /* #i+20digits */
 		}
     break;
 
   case 812:
 
-/* Line 1455 of yacc.c  */
-#line 3077 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3028 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (long) 1);
 		}
     break;
 
   case 813:
 
-/* Line 1455 of yacc.c  */
-#line 3080 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3031 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (long) 0);
 		}
     break;
 
   case 814:
 
-/* Line 1455 of yacc.c  */
-#line 3083 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3034 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 815:
 
-/* Line 1455 of yacc.c  */
-#line 3086 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3037 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 816:
 
-/* Line 1455 of yacc.c  */
-#line 3091 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3042 "./sql3.y"
     { (yyval.box) = t_box_num (0x7fffffff); }
     break;
 
   case 817:
 
-/* Line 1455 of yacc.c  */
-#line 3092 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3043 "./sql3.y"
     { (yyval.box) = (yyvsp[(3) - (4)].box); }
     break;
 
   case 818:
 
-/* Line 1455 of yacc.c  */
-#line 3097 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3048 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (5, (long) DV_ARRAY_OF_POINTER, (yyvsp[(2) - (2)].box), 0, 0, (yyvsp[(1) - (2)].tree));
 		}
@@ -13817,54 +13815,54 @@ yyreduce:
 
   case 819:
 
-/* Line 1455 of yacc.c  */
-#line 3100 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3051 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 820:
 
-/* Line 1455 of yacc.c  */
-#line 3101 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3052 "./sql3.y"
     { (yyval.tree) = t_listst (4, (long) DV_OBJECT, 0, 0, (yyvsp[(1) - (1)].strval)); }
     break;
 
   case 822:
 
-/* Line 1455 of yacc.c  */
-#line 3107 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3058 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (long) 1);
 		}
     break;
 
   case 823:
 
-/* Line 1455 of yacc.c  */
-#line 3110 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3061 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (long) 0);
 		}
     break;
 
   case 824:
 
-/* Line 1455 of yacc.c  */
-#line 3113 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3064 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 825:
 
-/* Line 1455 of yacc.c  */
-#line 3116 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3067 "./sql3.y"
     { (yyval.tree) = t_listst (2, (long) DV_LONG_STRING, (yyvsp[(3) - (4)].box));
 		}
     break;
 
   case 826:
 
-/* Line 1455 of yacc.c  */
-#line 3119 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3070 "./sql3.y"
     {
 		  if (!CASEMODESTRCMP ((yyvsp[(1) - (1)].strval), xmltype_class_name))
 		    {
@@ -13878,8 +13876,8 @@ yyreduce:
 
   case 827:
 
-/* Line 1455 of yacc.c  */
-#line 3129 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3080 "./sql3.y"
     {
 		  if (!CASEMODESTRCMP ((yyvsp[(2) - (2)].strval), xmltype_class_name))
 		    {
@@ -13893,8 +13891,8 @@ yyreduce:
 
   case 828:
 
-/* Line 1455 of yacc.c  */
-#line 3139 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3090 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (4, (long) DV_BLOB, t_box_num (0x7fffffff), NULL, t_box_string ("DB.DBA.__ANY"));
 		}
@@ -13902,8 +13900,8 @@ yyreduce:
 
   case 829:
 
-/* Line 1455 of yacc.c  */
-#line 3143 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3094 "./sql3.y"
     { (yyval.tree) = t_listst (5, (long) DV_BLOB, t_box_num (0x7fffffff), NULL, NULL,
 		    t_list (2, t_box_string ("xml_col"), t_box_string ("1")));
 		}
@@ -13911,8 +13909,8 @@ yyreduce:
 
   case 830:
 
-/* Line 1455 of yacc.c  */
-#line 3150 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3101 "./sql3.y"
     {
 		  if (strchr ((yyvsp[(1) - (1)].box), '.'))
 		    yy_new_error ("Dots not allowed inside column names", "37000", "SQ137");
@@ -13923,8 +13921,8 @@ yyreduce:
 
   case 831:
 
-/* Line 1455 of yacc.c  */
-#line 3158 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3109 "./sql3.y"
     {
 		  assert_ms_compat("Qualified column names are allowed only in MS-compatibility mode.");
 		  (yyval.strval) = (yyvsp[(7) - (7)].box);
@@ -13933,134 +13931,134 @@ yyreduce:
 
   case 832:
 
-/* Line 1455 of yacc.c  */
-#line 3165 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3116 "./sql3.y"
     { (yyval.strval) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 833:
 
-/* Line 1455 of yacc.c  */
-#line 3169 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3120 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 834:
 
-/* Line 1455 of yacc.c  */
-#line 3173 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3124 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 835:
 
-/* Line 1455 of yacc.c  */
-#line 3174 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3125 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 836:
 
-/* Line 1455 of yacc.c  */
-#line 3184 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3129 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 837:
 
-/* Line 1455 of yacc.c  */
-#line 3188 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3133 "./sql3.y"
     { (yyval.tree) = (ST *) 0; }
     break;
 
   case 838:
 
-/* Line 1455 of yacc.c  */
-#line 3189 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3134 "./sql3.y"
     { (yyval.tree) = (ST *) (yyvsp[(1) - (1)].box); }
     break;
 
   case 839:
 
-/* Line 1455 of yacc.c  */
-#line 3193 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3138 "./sql3.y"
     { (yyval.tree) = (ST *) 0; }
     break;
 
   case 840:
 
-/* Line 1455 of yacc.c  */
-#line 3194 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3139 "./sql3.y"
     { (yyval.tree) = (ST *) (yyvsp[(2) - (2)].box); }
     break;
 
   case 841:
 
-/* Line 1455 of yacc.c  */
-#line 3199 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3144 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_SHUTDOWN, (yyvsp[(2) - (2)].tree), NULL, NULL); }
     break;
 
   case 842:
 
-/* Line 1455 of yacc.c  */
-#line 3201 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3146 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_CHECKPOINT, (yyvsp[(2) - (2)].tree), NULL, NULL); }
     break;
 
   case 843:
 
-/* Line 1455 of yacc.c  */
-#line 3203 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3148 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_CHECKPOINT, (yyvsp[(2) - (3)].box), (yyvsp[(3) - (3)].box), NULL); }
     break;
 
   case 844:
 
-/* Line 1455 of yacc.c  */
-#line 3205 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3150 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_BACKUP, (yyvsp[(2) - (2)].box), NULL, NULL); }
     break;
 
   case 845:
 
-/* Line 1455 of yacc.c  */
-#line 3207 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3152 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_CHECK, NULL, NULL, NULL); }
     break;
 
   case 846:
 
-/* Line 1455 of yacc.c  */
-#line 3209 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3154 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_SYNC_REPL, (yyvsp[(3) - (4)].tree), (yyvsp[(4) - (4)].tree), NULL); }
     break;
 
   case 847:
 
-/* Line 1455 of yacc.c  */
-#line 3211 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3156 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_DISC_REPL, (yyvsp[(3) - (3)].tree), NULL, NULL); }
     break;
 
   case 848:
 
-/* Line 1455 of yacc.c  */
-#line 3213 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3158 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_LOG_ON, NULL, NULL, NULL); }
     break;
 
   case 849:
 
-/* Line 1455 of yacc.c  */
-#line 3215 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3160 "./sql3.y"
     { (yyval.tree) = t_listst (4, OP_LOG_OFF, NULL, NULL, NULL); }
     break;
 
   case 857:
 
-/* Line 1455 of yacc.c  */
-#line 3248 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3193 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (9, USER_AGGREGATE_DECL, (yyvsp[(3) - (13)].strval), (yyvsp[(4) - (13)].box), (yyvsp[(5) - (13)].tree),
 				 (yyvsp[(7) - (13)].strval), (yyvsp[(9) - (13)].strval), (yyvsp[(11) - (13)].strval), (yyvsp[(12) - (13)].box), (yyvsp[(13) - (13)].box) );
@@ -14069,43 +14067,43 @@ yyreduce:
 
   case 858:
 
-/* Line 1455 of yacc.c  */
-#line 3255 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3200 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 859:
 
-/* Line 1455 of yacc.c  */
-#line 3256 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3201 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].strval); }
     break;
 
   case 860:
 
-/* Line 1455 of yacc.c  */
-#line 3260 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3205 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 861:
 
-/* Line 1455 of yacc.c  */
-#line 3261 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3206 "./sql3.y"
     { (yyval.box) = (caddr_t)1; }
     break;
 
   case 862:
 
-/* Line 1455 of yacc.c  */
-#line 3267 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3212 "./sql3.y"
     { (yyval.tree) = t_listst (7, ROUTINE_DECL, (ptrlong) (yyvsp[(2) - (7)].subtok), (yyvsp[(3) - (7)].strval), (yyvsp[(4) - (7)].box), (yyvsp[(5) - (7)].tree), (yyvsp[(7) - (7)].tree), (yyvsp[(6) - (7)].box)); }
     break;
 
   case 863:
 
-/* Line 1455 of yacc.c  */
-#line 3270 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3215 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (8, REMOTE_ROUTINE_DECL, (ptrlong) (yyvsp[(2) - (9)].subtok), (yyvsp[(3) - (9)].strval), (yyvsp[(4) - (9)].box), (yyvsp[(5) - (9)].tree), (yyvsp[(7) - (9)].box), (yyvsp[(9) - (9)].box), (yyvsp[(6) - (9)].box));
 		}
@@ -14113,37 +14111,37 @@ yyreduce:
 
   case 864:
 
-/* Line 1455 of yacc.c  */
-#line 3275 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3220 "./sql3.y"
     { (yyval.tree) = sqlp_udt_create_external_proc ((ptrlong) (yyvsp[(2) - (12)].subtok), (yyvsp[(3) - (12)].strval),
 		    (yyvsp[(4) - (12)].box), (yyvsp[(5) - (12)].tree), (yyvsp[(6) - (12)].box), (ptrlong) (yyvsp[(8) - (12)].intval), (yyvsp[(11) - (12)].box), (ST **) (yyvsp[(12) - (12)].tree)); }
     break;
 
   case 865:
 
-/* Line 1455 of yacc.c  */
-#line 3283 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3228 "./sql3.y"
     { (yyval.tree) = t_listst (7, ROUTINE_DECL, (ptrlong) (yyvsp[(1) - (6)].subtok), (yyvsp[(2) - (6)].box), (yyvsp[(3) - (6)].box), (yyvsp[(4) - (6)].tree), (yyvsp[(6) - (6)].tree), (yyvsp[(5) - (6)].box)); }
     break;
 
   case 866:
 
-/* Line 1455 of yacc.c  */
-#line 3288 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3233 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (2)].tree), NULL); }
     break;
 
   case 867:
 
-/* Line 1455 of yacc.c  */
-#line 3290 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3235 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(2) - (3)].tree), NULL)); }
     break;
 
   case 868:
 
-/* Line 1455 of yacc.c  */
-#line 3295 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3240 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, MODULE_DECL, (yyvsp[(3) - (6)].strval), t_list_to_array ((yyvsp[(5) - (6)].list)));
 		}
@@ -14151,260 +14149,260 @@ yyreduce:
 
   case 869:
 
-/* Line 1455 of yacc.c  */
-#line 3301 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3246 "./sql3.y"
     { (yyval.subtok) = FUNCTION; }
     break;
 
   case 870:
 
-/* Line 1455 of yacc.c  */
-#line 3302 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3247 "./sql3.y"
     { (yyval.subtok) = PROCEDURE; }
     break;
 
   case 871:
 
-/* Line 1455 of yacc.c  */
-#line 3306 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3251 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 872:
 
-/* Line 1455 of yacc.c  */
-#line 3307 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3252 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 873:
 
-/* Line 1455 of yacc.c  */
-#line 3311 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3256 "./sql3.y"
     { (yyval.box) = (caddr_t) t_list (0); }
     break;
 
   case 874:
 
-/* Line 1455 of yacc.c  */
-#line 3312 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3257 "./sql3.y"
     { (yyval.box) = t_list_to_array_box ((yyvsp[(2) - (3)].list)); }
     break;
 
   case 875:
 
-/* Line 1455 of yacc.c  */
-#line 3317 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3262 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 876:
 
-/* Line 1455 of yacc.c  */
-#line 3319 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3264 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 877:
 
-/* Line 1455 of yacc.c  */
-#line 3324 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3269 "./sql3.y"
     { (yyval.tree) = t_listst (6, LOCAL_VAR, (ptrlong) (yyvsp[(1) - (4)].subtok), (yyvsp[(2) - (4)].tree), (yyvsp[(3) - (4)].tree), NULL, (yyvsp[(4) - (4)].box)); }
     break;
 
   case 878:
 
-/* Line 1455 of yacc.c  */
-#line 3326 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3271 "./sql3.y"
     { (yyval.tree) = t_listst (6, LOCAL_VAR, (ptrlong) (yyvsp[(1) - (6)].subtok), (yyvsp[(2) - (6)].tree), (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].box), (yyvsp[(6) - (6)].box)); }
     break;
 
   case 879:
 
-/* Line 1455 of yacc.c  */
-#line 3328 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3273 "./sql3.y"
     { (yyval.tree) = t_listst (6, LOCAL_VAR, (ptrlong) (yyvsp[(1) - (6)].subtok), (yyvsp[(2) - (6)].tree), (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].box), (yyvsp[(6) - (6)].box)); }
     break;
 
   case 880:
 
-/* Line 1455 of yacc.c  */
-#line 3332 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3277 "./sql3.y"
     { (yyval.subtok) = IN_MODE; }
     break;
 
   case 881:
 
-/* Line 1455 of yacc.c  */
-#line 3333 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3278 "./sql3.y"
     { (yyval.subtok) = OUT_MODE; }
     break;
 
   case 882:
 
-/* Line 1455 of yacc.c  */
-#line 3334 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3279 "./sql3.y"
     { (yyval.subtok) = INOUT_MODE; }
     break;
 
   case 883:
 
-/* Line 1455 of yacc.c  */
-#line 3338 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3283 "./sql3.y"
     { (yyval.subtok) = IN_MODE; }
     break;
 
   case 885:
 
-/* Line 1455 of yacc.c  */
-#line 3343 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3288 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
   case 886:
 
-/* Line 1455 of yacc.c  */
-#line 3344 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3289 "./sql3.y"
     { (yyval.subtok) = SOAP_MSG_IN;    }
     break;
 
   case 887:
 
-/* Line 1455 of yacc.c  */
-#line 3345 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3290 "./sql3.y"
     { (yyval.subtok) = SOAP_MSG_OUT;   }
     break;
 
   case 888:
 
-/* Line 1455 of yacc.c  */
-#line 3346 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3291 "./sql3.y"
     { (yyval.subtok) = SOAP_MSG_INOUT; }
     break;
 
   case 889:
 
-/* Line 1455 of yacc.c  */
-#line 3347 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3292 "./sql3.y"
     { (yyval.subtok) = SOAP_MMSG_IN;    }
     break;
 
   case 890:
 
-/* Line 1455 of yacc.c  */
-#line 3348 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3293 "./sql3.y"
     { (yyval.subtok) = SOAP_MMSG_OUT;   }
     break;
 
   case 891:
 
-/* Line 1455 of yacc.c  */
-#line 3349 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3294 "./sql3.y"
     { (yyval.subtok) = SOAP_MMSG_INOUT; }
     break;
 
   case 892:
 
-/* Line 1455 of yacc.c  */
-#line 3353 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3298 "./sql3.y"
     { (yyval.list) = (yyvsp[(1) - (1)].list); }
     break;
 
   case 893:
 
-/* Line 1455 of yacc.c  */
-#line 3354 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3299 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 894:
 
-/* Line 1455 of yacc.c  */
-#line 3358 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3303 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (3)].box), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 895:
 
-/* Line 1455 of yacc.c  */
-#line 3362 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3307 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 896:
 
-/* Line 1455 of yacc.c  */
-#line 3363 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3308 "./sql3.y"
     { (yyval.intval) = SOAP_MSG_HEADER; }
     break;
 
   case 897:
 
-/* Line 1455 of yacc.c  */
-#line 3364 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3309 "./sql3.y"
     { (yyval.intval) = SOAP_MSG_FAULT; }
     break;
 
   case 898:
 
-/* Line 1455 of yacc.c  */
-#line 3365 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3310 "./sql3.y"
     { (yyval.intval) = SOAP_MSG_LITERAL; }
     break;
 
   case 899:
 
-/* Line 1455 of yacc.c  */
-#line 3366 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3311 "./sql3.y"
     { (yyval.intval) = SOAP_MSG_XML; }
     break;
 
   case 900:
 
-/* Line 1455 of yacc.c  */
-#line 3367 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3312 "./sql3.y"
     { (yyval.intval) = (SOAP_MSG_LITERALW|SOAP_MSG_LITERAL); }
     break;
 
   case 901:
 
-/* Line 1455 of yacc.c  */
-#line 3368 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3313 "./sql3.y"
     { (yyval.intval) = SOAP_MSG_HTTP; }
     break;
 
   case 902:
 
-/* Line 1455 of yacc.c  */
-#line 3372 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3317 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 903:
 
-/* Line 1455 of yacc.c  */
-#line 3374 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3319 "./sql3.y"
     { (yyval.box) = t_listbox (3, (yyvsp[(5) - (9)].box), (ptrlong) ((yyvsp[(3) - (9)].intval)|(yyvsp[(6) - (9)].subtok)), t_list_to_array_box ((yyvsp[(8) - (9)].list))); }
     break;
 
   case 904:
 
-/* Line 1455 of yacc.c  */
-#line 3375 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3320 "./sql3.y"
     { (yyval.box) = t_listbox (3, (yyvsp[(2) - (3)].box), (ptrlong) ((yyvsp[(1) - (3)].intval)|(yyvsp[(3) - (3)].subtok)), NULL); }
     break;
 
   case 905:
 
-/* Line 1455 of yacc.c  */
-#line 3379 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3324 "./sql3.y"
     {  (yyval.box) = t_box_float ((float) unbox ((yyvsp[(1) - (1)].box))); }
     break;
 
   case 906:
 
-/* Line 1455 of yacc.c  */
-#line 3380 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3325 "./sql3.y"
     { double d;
   switch (DV_TYPE_OF ((yyvsp[(1) - (1)].box)))
     {
@@ -14417,43 +14415,43 @@ yyreduce:
 
   case 907:
 
-/* Line 1455 of yacc.c  */
-#line 3391 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3336 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 908:
 
-/* Line 1455 of yacc.c  */
-#line 3392 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3337 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 909:
 
-/* Line 1455 of yacc.c  */
-#line 3396 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3341 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, PROC_COST, t_list_to_array ((yyvsp[(3) - (4)].list))); }
     break;
 
   case 922:
 
-/* Line 1455 of yacc.c  */
-#line 3413 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3358 "./sql3.y"
     { (yyval.tree) = t_listst (1, NULL_STMT); }
     break;
 
   case 923:
 
-/* Line 1455 of yacc.c  */
-#line 3417 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3362 "./sql3.y"
     { BR_PUSH }
     break;
 
   case 924:
 
-/* Line 1455 of yacc.c  */
-#line 3418 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3363 "./sql3.y"
     { (yyval.tree) = t_listst (5, COMPOUND_STMT,
 			   t_list_to_array ((yyvsp[(3) - (4)].list)),
 			   t_box_num (BR_GET),
@@ -14464,50 +14462,50 @@ yyreduce:
 
   case 925:
 
-/* Line 1455 of yacc.c  */
-#line 3427 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3372 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 926:
 
-/* Line 1455 of yacc.c  */
-#line 3428 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3373 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 929:
 
-/* Line 1455 of yacc.c  */
-#line 3434 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3379 "./sql3.y"
     { BR_PUSH }
     break;
 
   case 930:
 
-/* Line 1455 of yacc.c  */
-#line 3434 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3379 "./sql3.y"
     { (yyval.tree) = BR_CSTM ((yyvsp[(2) - (2)].tree)); BR_POP }
     break;
 
   case 933:
 
-/* Line 1455 of yacc.c  */
-#line 3440 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3385 "./sql3.y"
     { (yyval.tree) = t_listst (3, LABELED_STMT, (yyvsp[(1) - (3)].box), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 934:
 
-/* Line 1455 of yacc.c  */
-#line 3441 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3386 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("http"), t_list (1, (yyvsp[(1) - (1)].box))); }
     break;
 
   case 935:
 
-/* Line 1455 of yacc.c  */
-#line 3442 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3387 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, COMPOUND_STMT,
               t_list (2,
 		t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("http_value"), t_list (1, (yyvsp[(2) - (3)].tree))),
@@ -14520,8 +14518,8 @@ yyreduce:
 
   case 936:
 
-/* Line 1455 of yacc.c  */
-#line 3450 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3395 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, COMPOUND_STMT,
               t_list (2,
 		t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("http_url"), t_list (1, (yyvsp[(2) - (3)].tree))),
@@ -14534,8 +14532,8 @@ yyreduce:
 
   case 937:
 
-/* Line 1455 of yacc.c  */
-#line 3458 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3403 "./sql3.y"
     {
           ST *qry = (yyvsp[(2) - (3)].tree);
           ST *scalar_qry = (yyval.tree) = (ST *) t_list (2, SCALAR_SUBQ, sqlp_add_top_1 (qry));
@@ -14544,36 +14542,36 @@ yyreduce:
 
   case 939:
 
-/* Line 1455 of yacc.c  */
-#line 3466 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3411 "./sql3.y"
     { BR_PUSH }
     break;
 
   case 940:
 
-/* Line 1455 of yacc.c  */
-#line 3466 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3411 "./sql3.y"
     { (yyval.tree) = BR_CSTM ((yyvsp[(2) - (3)].tree)); BR_POP }
     break;
 
   case 941:
 
-/* Line 1455 of yacc.c  */
-#line 3467 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3412 "./sql3.y"
     { BR_PUSH }
     break;
 
   case 942:
 
-/* Line 1455 of yacc.c  */
-#line 3467 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3412 "./sql3.y"
     { (yyval.tree) = BR_CSTM ((yyvsp[(2) - (2)].tree)); BR_POP }
     break;
 
   case 946:
 
-/* Line 1455 of yacc.c  */
-#line 3478 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3423 "./sql3.y"
     {
 		  ST **temp = (ST **) t_list_to_array ((yyvsp[(2) - (3)].list));
 		  (yyval.tree) = t_listst (2, VARIABLE_DECL,
@@ -14583,36 +14581,36 @@ yyreduce:
 
   case 947:
 
-/* Line 1455 of yacc.c  */
-#line 3487 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3432 "./sql3.y"
     { (yyval.list) = t_CONS (t_list (3, COL_DOTTED, NULL, (yyvsp[(1) - (1)].box)), NULL); }
     break;
 
   case 948:
 
-/* Line 1455 of yacc.c  */
-#line 3489 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3434 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS (t_list (3, COL_DOTTED, NULL, (yyvsp[(3) - (3)].box)), NULL)); }
     break;
 
   case 949:
 
-/* Line 1455 of yacc.c  */
-#line 3493 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3438 "./sql3.y"
     { (yyval.box) = (caddr_t) SQL_NO_DATA_FOUND; }
     break;
 
   case 950:
 
-/* Line 1455 of yacc.c  */
-#line 3494 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3439 "./sql3.y"
     { (yyval.box) = (caddr_t) t_list (2, (yyvsp[(2) - (2)].box), sqlp_handler_star_pos ((yyvsp[(2) - (2)].box))); }
     break;
 
   case 951:
 
-/* Line 1455 of yacc.c  */
-#line 3496 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3441 "./sql3.y"
     {
 		  (yyval.box) = t_listbox (2, (yyvsp[(3) - (3)].box), sqlp_handler_star_pos ((yyvsp[(3) - (3)].box)));
 		}
@@ -14620,113 +14618,113 @@ yyreduce:
 
   case 952:
 
-/* Line 1455 of yacc.c  */
-#line 3499 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3444 "./sql3.y"
     { (yyval.box) = (caddr_t) SQL_SQLEXCEPTION; }
     break;
 
   case 953:
 
-/* Line 1455 of yacc.c  */
-#line 3500 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3445 "./sql3.y"
     { (yyval.box) = t_listbox (2, t_box_string ("01*"), 2); }
     break;
 
   case 960:
 
-/* Line 1455 of yacc.c  */
-#line 3510 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3455 "./sql3.y"
     { (yyval.tree) = sqlp_resignal (NULL); }
     break;
 
   case 961:
 
-/* Line 1455 of yacc.c  */
-#line 3511 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3456 "./sql3.y"
     { (yyval.tree) = sqlp_resignal ((yyvsp[(2) - (2)].tree)); }
     break;
 
   case 968:
 
-/* Line 1455 of yacc.c  */
-#line 3522 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3467 "./sql3.y"
     { (yyval.tree) = t_listst (4, HANDLER_DECL, HANDT_CONTINUE, t_list (1, (yyvsp[(2) - (4)].box)), t_list (2, GOTO_STMT, (yyvsp[(4) - (4)].box))); }
     break;
 
   case 969:
 
-/* Line 1455 of yacc.c  */
-#line 3524 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3469 "./sql3.y"
     { (yyval.tree) = t_listst (4, HANDLER_DECL, HANDT_CONTINUE, t_list (1, (yyvsp[(2) - (5)].box)), t_list (2, GOTO_STMT, (yyvsp[(5) - (5)].box))); }
     break;
 
   case 970:
 
-/* Line 1455 of yacc.c  */
-#line 3526 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3471 "./sql3.y"
     { (yyval.tree) = t_listst (4, HANDLER_DECL, HANDT_CONTINUE, t_list (1, (yyvsp[(2) - (3)].box)), sqlp_resignal (NULL)); }
     break;
 
   case 971:
 
-/* Line 1455 of yacc.c  */
-#line 3528 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3473 "./sql3.y"
     { (yyval.tree) = t_listst (4, HANDLER_DECL, (ptrlong) (yyvsp[(2) - (6)].intval), t_list_to_array ((yyvsp[(5) - (6)].list)), (yyvsp[(6) - (6)].tree)); }
     break;
 
   case 972:
 
-/* Line 1455 of yacc.c  */
-#line 3532 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3477 "./sql3.y"
     { (yyval.intval) = HANDT_CONTINUE; }
     break;
 
   case 973:
 
-/* Line 1455 of yacc.c  */
-#line 3533 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3478 "./sql3.y"
     { (yyval.intval) = HANDT_EXIT; }
     break;
 
   case 974:
 
-/* Line 1455 of yacc.c  */
-#line 3537 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3482 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 975:
 
-/* Line 1455 of yacc.c  */
-#line 3538 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3483 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 980:
 
-/* Line 1455 of yacc.c  */
-#line 3546 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3491 "./sql3.y"
     { (yyval.tree) = sqlp_resignal (NULL); }
     break;
 
   case 981:
 
-/* Line 1455 of yacc.c  */
-#line 3547 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3492 "./sql3.y"
     { (yyval.tree) = sqlp_resignal ((yyvsp[(2) - (3)].tree)); }
     break;
 
   case 988:
 
-/* Line 1455 of yacc.c  */
-#line 3557 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3502 "./sql3.y"
     { (yyval.tree) = t_listst (3, ASG_STMT, (yyvsp[(1) - (3)].tree), sqlp_wrapper_sqlxml_assign((ST*)(yyvsp[(3) - (3)].tree))); }
     break;
 
   case 989:
 
-/* Line 1455 of yacc.c  */
-#line 3559 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3504 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 	    					t_sqlp_box_id_upcase ("aset"),
 						t_list_to_array (t_CONS ((yyvsp[(1) - (4)].tree), t_NCONC ((yyvsp[(2) - (4)].list), t_CONS ((yyvsp[(4) - (4)].tree), NULL)))) ); }
@@ -14734,22 +14732,22 @@ yyreduce:
 
   case 990:
 
-/* Line 1455 of yacc.c  */
-#line 3566 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3511 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(2) - (3)].tree), NULL); }
     break;
 
   case 991:
 
-/* Line 1455 of yacc.c  */
-#line 3567 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3512 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (4)].list), t_CONS ((yyvsp[(3) - (4)].tree), NULL)); }
     break;
 
   case 994:
 
-/* Line 1455 of yacc.c  */
-#line 3602 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3547 "./sql3.y"
     { ST *first = t_listst (3, COND_CLAUSE, (yyvsp[(3) - (6)].tree), (yyvsp[(5) - (6)].tree));
 		  ST *cond_list = t_listst (1, first);
 		  (yyval.tree) = t_listst (3, IF_STMT, cond_list, (yyvsp[(6) - (6)].tree));
@@ -14758,320 +14756,320 @@ yyreduce:
 
   case 995:
 
-/* Line 1455 of yacc.c  */
-#line 3609 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3554 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 996:
 
-/* Line 1455 of yacc.c  */
-#line 3610 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3555 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 997:
 
-/* Line 1455 of yacc.c  */
-#line 3615 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3560 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, (yyvsp[(2) - (5)].box), t_list_to_array ((yyvsp[(4) - (5)].list))); }
     break;
 
   case 998:
 
-/* Line 1455 of yacc.c  */
-#line 3616 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3561 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 999:
 
-/* Line 1455 of yacc.c  */
-#line 3617 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3562 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 1000:
 
-/* Line 1455 of yacc.c  */
-#line 3621 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3566 "./sql3.y"
     { (yyval.box) = t_box_string ((yyvsp[(2) - (2)].box)); }
     break;
 
   case 1001:
 
-/* Line 1455 of yacc.c  */
-#line 3622 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3567 "./sql3.y"
     { (yyval.box) = t_box_string ((yyvsp[(2) - (2)].box)); }
     break;
 
   case 1002:
 
-/* Line 1455 of yacc.c  */
-#line 3623 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3568 "./sql3.y"
     { (yyval.box) = t_box_string ((yyvsp[(1) - (2)].box)); }
     break;
 
   case 1003:
 
-/* Line 1455 of yacc.c  */
-#line 3624 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3569 "./sql3.y"
     { (yyval.box) = t_box_string ((yyvsp[(1) - (1)].box)); }
     break;
 
   case 1004:
 
-/* Line 1455 of yacc.c  */
-#line 3629 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3574 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("__set"),
 		      t_list (2, t_sqlp_box_upcase ((yyvsp[(2) - (4)].box)), (yyvsp[(4) - (4)].tree))); }
     break;
 
   case 1005:
 
-/* Line 1455 of yacc.c  */
-#line 3632 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3577 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("__set"),
 		      t_list (2, t_sqlp_box_upcase ((yyvsp[(2) - (3)].box)), t_box_num (1))); }
     break;
 
   case 1006:
 
-/* Line 1455 of yacc.c  */
-#line 3635 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3580 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("__set"),
 		      t_list (2, t_sqlp_box_upcase ((yyvsp[(2) - (3)].box)), t_box_num (0))); }
     break;
 
   case 1007:
 
-/* Line 1455 of yacc.c  */
-#line 3638 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3583 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("__set"),
 		      t_list (2, t_sqlp_box_upcase ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box))); }
     break;
 
   case 1008:
 
-/* Line 1455 of yacc.c  */
-#line 3643 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3588 "./sql3.y"
     { (yyval.tree) = t_listst (2, GOTO_STMT, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 1009:
 
-/* Line 1455 of yacc.c  */
-#line 3644 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3589 "./sql3.y"
     { (yyval.tree) = t_listst (2, GOTO_STMT, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 1010:
 
-/* Line 1455 of yacc.c  */
-#line 3648 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3593 "./sql3.y"
     { (yyval.tree) = t_listst (2, RETURN_STMT, sqlp_wrapper_sqlxml_assign((ST*)(yyvsp[(2) - (2)].tree))); }
     break;
 
   case 1011:
 
-/* Line 1455 of yacc.c  */
-#line 3649 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3594 "./sql3.y"
     { (yyval.tree) = t_listst (2, RETURN_STMT, NULL); }
     break;
 
   case 1012:
 
-/* Line 1455 of yacc.c  */
-#line 3654 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3599 "./sql3.y"
     { (yyval.tree) = t_listst (3, WHILE_STMT, (yyvsp[(3) - (5)].tree), (yyvsp[(5) - (5)].tree)); }
     break;
 
   case 1017:
 
-/* Line 1455 of yacc.c  */
-#line 3665 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3610 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
   case 1018:
 
-/* Line 1455 of yacc.c  */
-#line 3666 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3611 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1019:
 
-/* Line 1455 of yacc.c  */
-#line 3667 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3612 "./sql3.y"
     { (yyval.list) = (yyvsp[(3) - (3)].tree) ? t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)) : (yyvsp[(1) - (3)].list); }
     break;
 
   case 1023:
 
-/* Line 1455 of yacc.c  */
-#line 3677 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3622 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
   case 1024:
 
-/* Line 1455 of yacc.c  */
-#line 3678 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3623 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1025:
 
-/* Line 1455 of yacc.c  */
-#line 3679 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3624 "./sql3.y"
     { (yyval.list) = (yyvsp[(3) - (3)].tree) ? t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)) : (yyvsp[(1) - (3)].list); }
     break;
 
   case 1026:
 
-/* Line 1455 of yacc.c  */
-#line 3683 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3628 "./sql3.y"
     { NEGATE ((yyval.tree), t_listst (3, BOP_EQ, t_box_num_and_zero (0), t_box_num (1))); }
     break;
 
   case 1027:
 
-/* Line 1455 of yacc.c  */
-#line 3684 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3629 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 1028:
 
-/* Line 1455 of yacc.c  */
-#line 3689 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3634 "./sql3.y"
     { (yyval.tree) = sqlp_for_statement ((yyvsp[(2) - (4)].tree), (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 1029:
 
-/* Line 1455 of yacc.c  */
-#line 3691 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3636 "./sql3.y"
     { (yyval.tree) = sqlp_c_for_statement ((ST **) t_list_to_array ((yyvsp[(3) - (9)].list)), (yyvsp[(5) - (9)].tree), (ST **) t_list_to_array ((yyvsp[(7) - (9)].list)), (yyvsp[(9) - (9)].tree)); }
     break;
 
   case 1030:
 
-/* Line 1455 of yacc.c  */
-#line 3693 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3638 "./sql3.y"
     { (yyval.tree) = sqlp_foreach_statement ((yyvsp[(3) - (9)].tree), (yyvsp[(4) - (9)].box), (yyvsp[(6) - (9)].tree), (yyvsp[(9) - (9)].tree)); }
     break;
 
   case 1031:
 
-/* Line 1455 of yacc.c  */
-#line 3699 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3644 "./sql3.y"
     { (yyval.tree) = t_listst (8, TRIGGER_DEF, (yyvsp[(3) - (10)].box), (ptrlong) (yyvsp[(4) - (10)].subtok), (yyvsp[(5) - (10)].box), (yyvsp[(7) - (10)].strval), (yyvsp[(8) - (10)].box), (yyvsp[(9) - (10)].box), (yyvsp[(10) - (10)].tree)); }
     break;
 
   case 1032:
 
-/* Line 1455 of yacc.c  */
-#line 3703 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3648 "./sql3.y"
     { (yyval.box) = 0; }
     break;
 
   case 1033:
 
-/* Line 1455 of yacc.c  */
-#line 3704 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3649 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 1035:
 
-/* Line 1455 of yacc.c  */
-#line 3712 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3657 "./sql3.y"
     { (yyval.subtok) = TRIG_BEFORE; }
     break;
 
   case 1036:
 
-/* Line 1455 of yacc.c  */
-#line 3713 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3658 "./sql3.y"
     { (yyval.subtok) = TRIG_AFTER; }
     break;
 
   case 1037:
 
-/* Line 1455 of yacc.c  */
-#line 3714 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3659 "./sql3.y"
     { (yyval.subtok) = TRIG_INSTEAD; }
     break;
 
   case 1038:
 
-/* Line 1455 of yacc.c  */
-#line 3718 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3663 "./sql3.y"
     { (yyval.box) = (caddr_t) TRIG_INSERT; }
     break;
 
   case 1039:
 
-/* Line 1455 of yacc.c  */
-#line 3719 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3664 "./sql3.y"
     { (yyval.box) = (caddr_t) (yyvsp[(2) - (2)].tree); }
     break;
 
   case 1040:
 
-/* Line 1455 of yacc.c  */
-#line 3721 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3666 "./sql3.y"
     { (yyval.box) = (caddr_t) TRIG_DELETE; }
     break;
 
   case 1041:
 
-/* Line 1455 of yacc.c  */
-#line 3725 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3670 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 1042:
 
-/* Line 1455 of yacc.c  */
-#line 3726 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3671 "./sql3.y"
     { (yyval.box) = (caddr_t) t_list_to_array ((yyvsp[(2) - (2)].list)); }
     break;
 
   case 1043:
 
-/* Line 1455 of yacc.c  */
-#line 3730 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3675 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1044:
 
-/* Line 1455 of yacc.c  */
-#line 3731 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3676 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1045:
 
-/* Line 1455 of yacc.c  */
-#line 3735 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3680 "./sql3.y"
     { (yyval.tree) = t_listst (2, OLD_ALIAS, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 1046:
 
-/* Line 1455 of yacc.c  */
-#line 3736 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3681 "./sql3.y"
     { (yyval.tree) = t_listst (2, NEW_ALIAS, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 1047:
 
-/* Line 1455 of yacc.c  */
-#line 3741 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3686 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("DB.DBA.ddl_drop_trigger"),
 			t_list (1, t_box_string ((yyvsp[(3) - (3)].strval))));
@@ -15080,8 +15078,8 @@ yyreduce:
 
   case 1048:
 
-/* Line 1455 of yacc.c  */
-#line 3750 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3695 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("DB.DBA.ddl_drop_proc"),
 			t_list (2, t_box_string ((yyvsp[(3) - (3)].strval)), 4));
@@ -15090,8 +15088,8 @@ yyreduce:
 
   case 1049:
 
-/* Line 1455 of yacc.c  */
-#line 3755 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3700 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("DB.DBA.ddl_drop_proc"),
 			t_list (1, t_box_string ((yyvsp[(3) - (3)].strval))));
@@ -15100,8 +15098,8 @@ yyreduce:
 
   case 1050:
 
-/* Line 1455 of yacc.c  */
-#line 3760 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3705 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT,
 			t_sqlp_box_id_upcase ("DB.DBA.ddl_drop_proc"),
 			t_list (2, t_box_string ((yyvsp[(3) - (3)].strval)), 0));
@@ -15110,22 +15108,22 @@ yyreduce:
 
   case 1051:
 
-/* Line 1455 of yacc.c  */
-#line 3774 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3719 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 1052:
 
-/* Line 1455 of yacc.c  */
-#line 3775 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3720 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 1053:
 
-/* Line 1455 of yacc.c  */
-#line 3779 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3724 "./sql3.y"
     {
 	  if ((yyvsp[(1) - (1)].tree)->_.col_ref.name == STAR)
 	    yyerror ("No stars allowed inside XML view definition");
@@ -15137,85 +15135,85 @@ yyreduce:
 
   case 1054:
 
-/* Line 1455 of yacc.c  */
-#line 3786 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3731 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, (yyvsp[(1) - (3)].tree), box_dv_uname_string ((yyvsp[(3) - (3)].box)), XV_XC_ATTRIBUTE, NULL, NULL); }
     break;
 
   case 1055:
 
-/* Line 1455 of yacc.c  */
-#line 3787 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3732 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (5, (yyvsp[(1) - (3)].tree), box_dv_uname_string ((yyvsp[(3) - (3)].box)), XV_XC_SUBELEMENT, NULL, NULL); }
     break;
 
   case 1056:
 
-/* Line 1455 of yacc.c  */
-#line 3800 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3745 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1057:
 
-/* Line 1455 of yacc.c  */
-#line 3801 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3746 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1058:
 
-/* Line 1455 of yacc.c  */
-#line 3806 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3751 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(2) - (3)].list)); }
     break;
 
   case 1059:
 
-/* Line 1455 of yacc.c  */
-#line 3810 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3755 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1060:
 
-/* Line 1455 of yacc.c  */
-#line 3811 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3756 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(4) - (5)].list)); }
     break;
 
   case 1061:
 
-/* Line 1455 of yacc.c  */
-#line 3817 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3762 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1062:
 
-/* Line 1455 of yacc.c  */
-#line 3818 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3763 "./sql3.y"
     { (yyval.tree) = (yyvsp[(3) - (4)].tree); }
     break;
 
   case 1063:
 
-/* Line 1455 of yacc.c  */
-#line 3823 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3768 "./sql3.y"
     { (yyval.subtok) = 0; }
     break;
 
   case 1064:
 
-/* Line 1455 of yacc.c  */
-#line 3824 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3769 "./sql3.y"
     { (yyval.subtok) = 1; }
     break;
 
   case 1065:
 
-/* Line 1455 of yacc.c  */
-#line 3830 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3775 "./sql3.y"
     {
 /*mapping schema*/
 	    (yyval.tree) = (ST*) t_list (12,
@@ -15236,29 +15234,29 @@ yyreduce:
 
   case 1066:
 
-/* Line 1455 of yacc.c  */
-#line 3849 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3794 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1067:
 
-/* Line 1455 of yacc.c  */
-#line 3850 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3795 "./sql3.y"
     { (yyval.tree) = (ST*) t_list_to_array ((yyvsp[(2) - (3)].list)); }
     break;
 
   case 1068:
 
-/* Line 1455 of yacc.c  */
-#line 3855 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3800 "./sql3.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 1069:
 
-/* Line 1455 of yacc.c  */
-#line 3856 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3801 "./sql3.y"
     { ST * tmp  = (ST*) t_list_to_array ((yyvsp[(2) - (3)].list));
 /*mapping schema*/
 	(yyval.tree) = (ST *) t_list (12, NULL, NULL, NULL, NULL, NULL, (ptrlong) 1, NULL, tmp, NULL, NULL, NULL, NULL); }
@@ -15266,99 +15264,99 @@ yyreduce:
 
   case 1070:
 
-/* Line 1455 of yacc.c  */
-#line 3866 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3811 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1071:
 
-/* Line 1455 of yacc.c  */
-#line 3867 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3812 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1072:
 
-/* Line 1455 of yacc.c  */
-#line 3871 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3816 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 1073:
 
-/* Line 1455 of yacc.c  */
-#line 3872 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3817 "./sql3.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
   case 1074:
 
-/* Line 1455 of yacc.c  */
-#line 3876 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3821 "./sql3.y"
     { (yyval.box) = t_box_num (0); }
     break;
 
   case 1075:
 
-/* Line 1455 of yacc.c  */
-#line 3877 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3822 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 1076:
 
-/* Line 1455 of yacc.c  */
-#line 3893 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3838 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, t_box_num(0), t_box_string("")); }
     break;
 
   case 1077:
 
-/* Line 1455 of yacc.c  */
-#line 3894 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3839 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, t_box_num(1), t_box_string("")); }
     break;
 
   case 1078:
 
-/* Line 1455 of yacc.c  */
-#line 3895 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3840 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, t_box_num(2), t_box_string("")); }
     break;
 
   case 1079:
 
-/* Line 1455 of yacc.c  */
-#line 3896 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3841 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, t_box_num(3), (yyvsp[(2) - (2)].box)); }
     break;
 
   case 1080:
 
-/* Line 1455 of yacc.c  */
-#line 3897 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3842 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, t_box_num(5), t_box_string("")); }
     break;
 
   case 1081:
 
-/* Line 1455 of yacc.c  */
-#line 3898 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3843 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (2, t_box_num(6), (yyvsp[(2) - (2)].box)); }
     break;
 
   case 1082:
 
-/* Line 1455 of yacc.c  */
-#line 3902 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3847 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1083:
 
-/* Line 1455 of yacc.c  */
-#line 3904 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3849 "./sql3.y"
     {
 	     if (stricmp ((yyvsp[(3) - (7)].box), "OWNER") && stricmp ((yyvsp[(3) - (7)].box), "NAME"))
 	       yyerror ("syntax error at WebDAV OWNER keyword");
@@ -15368,8 +15366,8 @@ yyreduce:
 
   case 1086:
 
-/* Line 1455 of yacc.c  */
-#line 3919 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3864 "./sql3.y"
     {
               if ((yyvsp[(2) - (3)].subtok) != BOP_EQ)
 		yyerror ("'=' expected");
@@ -15379,51 +15377,51 @@ yyreduce:
 
   case 1087:
 
-/* Line 1455 of yacc.c  */
-#line 3930 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3875 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1088:
 
-/* Line 1455 of yacc.c  */
-#line 3932 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3877 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 1089:
 
-/* Line 1455 of yacc.c  */
-#line 3937 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3882 "./sql3.y"
     { (yyval.list) = NULL; }
     break;
 
   case 1090:
 
-/* Line 1455 of yacc.c  */
-#line 3939 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3884 "./sql3.y"
     { (yyval.list) = (yyvsp[(2) - (3)].list); }
     break;
 
   case 1091:
 
-/* Line 1455 of yacc.c  */
-#line 3945 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3890 "./sql3.y"
     { (yyval.tree) = (ST*) t_list (12, XML_VIEW, (yyvsp[(4) - (9)].strval), NULL, NULL, 0,
 			     (yyvsp[(7) - (9)].tree), (ptrlong) (yyvsp[(8) - (9)].subtok), (yyvsp[(9) - (9)].tree), t_list_to_array ((yyvsp[(6) - (9)].list)), NULL, NULL, NULL); }
     break;
 
   case 1092:
 
-/* Line 1455 of yacc.c  */
-#line 3952 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3897 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.xml_view_drop"), t_list (1, (yyvsp[(4) - (4)].strval))); }
     break;
 
   case 1093:
 
-/* Line 1455 of yacc.c  */
-#line 3973 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3918 "./sql3.y"
     {
 		  (yyval.tree) = t_listst (3, CALL_STMT,
 		      t_sqlp_box_id_upcase ("concat"),
@@ -15433,99 +15431,99 @@ yyreduce:
 
   case 1094:
 
-/* Line 1455 of yacc.c  */
-#line 3982 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3927 "./sql3.y"
     { (yyval.strval) = sqlp_type_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 1095:
 
-/* Line 1455 of yacc.c  */
-#line 3983 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3928 "./sql3.y"
     { (yyval.strval) = sqlp_type_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box), 1); }
     break;
 
   case 1096:
 
-/* Line 1455 of yacc.c  */
-#line 3984 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3929 "./sql3.y"
     { (yyval.strval) = sqlp_type_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box), 1); }
     break;
 
   case 1097:
 
-/* Line 1455 of yacc.c  */
-#line 3985 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3930 "./sql3.y"
     { (yyval.strval) = sqlp_type_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box), 1); }
     break;
 
   case 1098:
 
-/* Line 1455 of yacc.c  */
-#line 3989 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3934 "./sql3.y"
     { (yyval.strval) = sqlp_type_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 1099:
 
-/* Line 1455 of yacc.c  */
-#line 3990 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3935 "./sql3.y"
     { (yyval.strval) = sqlp_type_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box), 0); }
     break;
 
   case 1100:
 
-/* Line 1455 of yacc.c  */
-#line 3991 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3936 "./sql3.y"
     { (yyval.strval) = sqlp_type_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box), 0); }
     break;
 
   case 1101:
 
-/* Line 1455 of yacc.c  */
-#line 3992 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3937 "./sql3.y"
     { (yyval.strval) = sqlp_type_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box), 0); }
     break;
 
   case 1102:
 
-/* Line 1455 of yacc.c  */
-#line 3996 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3941 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name (NULL, 0, NULL, 0, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 1103:
 
-/* Line 1455 of yacc.c  */
-#line 3997 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3942 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name (NULL, 0, (yyvsp[(1) - (3)].box), box_length ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 1104:
 
-/* Line 1455 of yacc.c  */
-#line 3998 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3943 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name ((yyvsp[(1) - (5)].box), box_length ((yyvsp[(1) - (5)].box)), (yyvsp[(3) - (5)].box), box_length ((yyvsp[(3) - (5)].box)), (yyvsp[(5) - (5)].box)); }
     break;
 
   case 1105:
 
-/* Line 1455 of yacc.c  */
-#line 3999 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3944 "./sql3.y"
     { (yyval.strval) = sqlp_new_table_name ((yyvsp[(1) - (4)].box), box_length ((yyvsp[(1) - (4)].box)), NULL, 0, (yyvsp[(4) - (4)].box)); }
     break;
 
   case 1106:
 
-/* Line 1455 of yacc.c  */
-#line 4003 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3948 "./sql3.y"
     { sqlp_udt_current_type = (yyvsp[(3) - (5)].strval); }
     break;
 
   case 1107:
 
-/* Line 1455 of yacc.c  */
-#line 4005 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3950 "./sql3.y"
     {
 	       (yyval.tree) = t_listst (7, UDT_DEF,
 		   (yyvsp[(3) - (9)].strval), (yyvsp[(4) - (9)].strval), (yyvsp[(5) - (9)].tree), (yyvsp[(7) - (9)].tree), (yyvsp[(8) - (9)].tree), (yyvsp[(9) - (9)].tree));
@@ -15536,8 +15534,8 @@ yyreduce:
 
   case 1108:
 
-/* Line 1455 of yacc.c  */
-#line 4015 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3960 "./sql3.y"
     {
 	       (yyval.tree) = t_listst (3, UDT_DROP, (yyvsp[(3) - (4)].strval), (ptrlong) (yyvsp[(4) - (4)].intval));
 	     }
@@ -15545,15 +15543,15 @@ yyreduce:
 
   case 1109:
 
-/* Line 1455 of yacc.c  */
-#line 4021 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3966 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1110:
 
-/* Line 1455 of yacc.c  */
-#line 4023 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3968 "./sql3.y"
     {
 	       (yyval.tree) = t_listst (3, UDT_EXT,
 		   (ptrlong) (yyvsp[(2) - (5)].intval), (yyvsp[(5) - (5)].box));
@@ -15563,8 +15561,8 @@ yyreduce:
 
   case 1111:
 
-/* Line 1455 of yacc.c  */
-#line 4029 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3974 "./sql3.y"
     {
 	       (yyval.tree) = t_listst (3, UDT_EXT,
 		   (ptrlong) (yyvsp[(5) - (5)].intval), (yyvsp[(3) - (5)].box));
@@ -15574,8 +15572,8 @@ yyreduce:
 
   case 1112:
 
-/* Line 1455 of yacc.c  */
-#line 4035 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3980 "./sql3.y"
     {
 	       (yyval.tree) = t_listst (3, UDT_EXT,
 		   (ptrlong) (yyvsp[(2) - (2)].intval), NULL);
@@ -15585,134 +15583,134 @@ yyreduce:
 
   case 1113:
 
-/* Line 1455 of yacc.c  */
-#line 4043 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3988 "./sql3.y"
     { (yyval.strval) = NULL; }
     break;
 
   case 1114:
 
-/* Line 1455 of yacc.c  */
-#line 4044 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3989 "./sql3.y"
     { (yyval.strval) = (yyvsp[(2) - (2)].strval); }
     break;
 
   case 1115:
 
-/* Line 1455 of yacc.c  */
-#line 4048 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3993 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1116:
 
-/* Line 1455 of yacc.c  */
-#line 4049 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3994 "./sql3.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 1117:
 
-/* Line 1455 of yacc.c  */
-#line 4053 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 3998 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(2) - (3)].list)); }
     break;
 
   case 1118:
 
-/* Line 1455 of yacc.c  */
-#line 4058 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4003 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1119:
 
-/* Line 1455 of yacc.c  */
-#line 4059 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4004 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1120:
 
-/* Line 1455 of yacc.c  */
-#line 4063 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4008 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1121:
 
-/* Line 1455 of yacc.c  */
-#line 4064 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4009 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_EXT, UDT_LANG_NONE, (yyvsp[(3) - (3)].box), NULL); }
     break;
 
   case 1122:
 
-/* Line 1455 of yacc.c  */
-#line 4065 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4010 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_EXT, UDT_LANG_NONE, (yyvsp[(3) - (6)].box), (yyvsp[(6) - (6)].box)); }
     break;
 
   case 1123:
 
-/* Line 1455 of yacc.c  */
-#line 4066 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4011 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_EXT, UDT_LANG_NONE, NULL, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 1124:
 
-/* Line 1455 of yacc.c  */
-#line 4070 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4015 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1125:
 
-/* Line 1455 of yacc.c  */
-#line 4071 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4016 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_SOAP, NULL, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 1126:
 
-/* Line 1455 of yacc.c  */
-#line 4072 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4017 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_SOAP, (yyvsp[(2) - (2)].box), NULL); }
     break;
 
   case 1127:
 
-/* Line 1455 of yacc.c  */
-#line 4073 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4018 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_SOAP, (yyvsp[(2) - (4)].box), (yyvsp[(4) - (4)].box)); }
     break;
 
   case 1128:
 
-/* Line 1455 of yacc.c  */
-#line 4074 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4019 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_SOAP, (yyvsp[(4) - (4)].box), (yyvsp[(2) - (4)].box)); }
     break;
 
   case 1129:
 
-/* Line 1455 of yacc.c  */
-#line 4078 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4023 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1130:
 
-/* Line 1455 of yacc.c  */
-#line 4079 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4024 "./sql3.y"
     { (yyval.tree) = (ST *) (yyvsp[(3) - (3)].box); }
     break;
 
   case 1131:
 
-/* Line 1455 of yacc.c  */
-#line 4084 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4029 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (8, UDT_MEMBER, (yyvsp[(1) - (7)].box), (yyvsp[(2) - (7)].tree), (yyvsp[(3) - (7)].tree), (yyvsp[(4) - (7)].box), (yyvsp[(5) - (7)].strval), (yyvsp[(6) - (7)].tree), (yyvsp[(7) - (7)].tree));
 	    }
@@ -15720,232 +15718,232 @@ yyreduce:
 
   case 1132:
 
-/* Line 1455 of yacc.c  */
-#line 4090 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4035 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1133:
 
-/* Line 1455 of yacc.c  */
-#line 4091 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4036 "./sql3.y"
     { (yyval.tree) = (yyvsp[(4) - (4)].tree); }
     break;
 
   case 1134:
 
-/* Line 1455 of yacc.c  */
-#line 4092 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4037 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1135:
 
-/* Line 1455 of yacc.c  */
-#line 4096 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4041 "./sql3.y"
     { (yyval.box) = t_alloc_box (0, DV_DB_NULL); }
     break;
 
   case 1136:
 
-/* Line 1455 of yacc.c  */
-#line 4097 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4042 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 1137:
 
-/* Line 1455 of yacc.c  */
-#line 4101 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4046 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1138:
 
-/* Line 1455 of yacc.c  */
-#line 4102 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4047 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
   case 1139:
 
-/* Line 1455 of yacc.c  */
-#line 4106 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4051 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1140:
 
-/* Line 1455 of yacc.c  */
-#line 4107 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4052 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 1141:
 
-/* Line 1455 of yacc.c  */
-#line 4111 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4056 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_FINAL, 1); }
     break;
 
   case 1142:
 
-/* Line 1455 of yacc.c  */
-#line 4112 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4057 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_FINAL, 0); }
     break;
 
   case 1143:
 
-/* Line 1455 of yacc.c  */
-#line 4113 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4058 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_REF, (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 1144:
 
-/* Line 1455 of yacc.c  */
-#line 4114 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4059 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_REF, (yyvsp[(4) - (5)].list)); }
     break;
 
   case 1145:
 
-/* Line 1455 of yacc.c  */
-#line 4115 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4060 "./sql3.y"
     { (yyval.tree) = t_listst (1, UDT_REF);  }
     break;
 
   case 1146:
 
-/* Line 1455 of yacc.c  */
-#line 4116 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4061 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_REFCAST, 0, (yyvsp[(8) - (8)].box)); }
     break;
 
   case 1147:
 
-/* Line 1455 of yacc.c  */
-#line 4117 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4062 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_REFCAST, 1, (yyvsp[(8) - (8)].box)); }
     break;
 
   case 1148:
 
-/* Line 1455 of yacc.c  */
-#line 4118 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4063 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_REFCAST, 0); }
     break;
 
   case 1149:
 
-/* Line 1455 of yacc.c  */
-#line 4119 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4064 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_REFCAST, 1); }
     break;
 
   case 1150:
 
-/* Line 1455 of yacc.c  */
-#line 4120 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4065 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_UNRESTRICTED, 1); }
     break;
 
   case 1151:
 
-/* Line 1455 of yacc.c  */
-#line 4121 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4066 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_SOAP, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 1152:
 
-/* Line 1455 of yacc.c  */
-#line 4125 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4070 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1153:
 
-/* Line 1455 of yacc.c  */
-#line 4126 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4071 "./sql3.y"
     { (yyval.tree) = (ST *) t_list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
   case 1154:
 
-/* Line 1455 of yacc.c  */
-#line 4130 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4075 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1155:
 
-/* Line 1455 of yacc.c  */
-#line 4131 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4076 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1156:
 
-/* Line 1455 of yacc.c  */
-#line 4135 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4080 "./sql3.y"
     { (yyval.intval) = UDT_METHOD_INSTANCE; }
     break;
 
   case 1157:
 
-/* Line 1455 of yacc.c  */
-#line 4136 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4081 "./sql3.y"
     { (yyval.intval) = UDT_METHOD_STATIC;  }
     break;
 
   case 1158:
 
-/* Line 1455 of yacc.c  */
-#line 4137 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4082 "./sql3.y"
     { (yyval.intval) = UDT_METHOD_INSTANCE; }
     break;
 
   case 1159:
 
-/* Line 1455 of yacc.c  */
-#line 4141 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4086 "./sql3.y"
     { (yyval.box) = (caddr_t) t_list (0); }
     break;
 
   case 1160:
 
-/* Line 1455 of yacc.c  */
-#line 4142 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4087 "./sql3.y"
     { (yyval.box) = t_list_to_array_box ((yyvsp[(2) - (3)].list)); }
     break;
 
   case 1161:
 
-/* Line 1455 of yacc.c  */
-#line 4147 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4092 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1162:
 
-/* Line 1455 of yacc.c  */
-#line 4149 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4094 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1163:
 
-/* Line 1455 of yacc.c  */
-#line 4154 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4099 "./sql3.y"
     { (yyval.tree) = t_listst (6, LOCAL_VAR, IN_L, (yyvsp[(2) - (4)].tree), (yyvsp[(3) - (4)].tree), NULL, (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 1164:
 
-/* Line 1455 of yacc.c  */
-#line 4159 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4104 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (6, UDT_METHOD,
 		  (ptrlong) (yyvsp[(1) - (7)].intval), (yyvsp[(3) - (7)].box), (yyvsp[(4) - (7)].box), (yyvsp[(6) - (7)].tree), (yyvsp[(7) - (7)].strval));
@@ -15954,8 +15952,8 @@ yyreduce:
 
   case 1165:
 
-/* Line 1455 of yacc.c  */
-#line 4164 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4109 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (6, UDT_METHOD,
 		  UDT_METHOD_CONSTRUCTOR, (yyvsp[(3) - (5)].box), (yyvsp[(4) - (5)].box), NULL, (yyvsp[(5) - (5)].strval));
@@ -15964,8 +15962,8 @@ yyreduce:
 
   case 1166:
 
-/* Line 1455 of yacc.c  */
-#line 4172 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4117 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (5, UDT_METHOD_DEF,
 		  0, (yyvsp[(1) - (3)].tree), (ptrlong) (yyvsp[(2) - (3)].intval), (yyvsp[(3) - (3)].tree));
@@ -15974,8 +15972,8 @@ yyreduce:
 
   case 1167:
 
-/* Line 1455 of yacc.c  */
-#line 4177 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4122 "./sql3.y"
     {
 	      (yyval.tree) = t_listst (5, UDT_METHOD_DEF,
 		  1, (yyvsp[(2) - (2)].tree), NULL, NULL);
@@ -15984,64 +15982,64 @@ yyreduce:
 
   case 1168:
 
-/* Line 1455 of yacc.c  */
-#line 4184 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4129 "./sql3.y"
     { (yyval.intval) = 0; }
     break;
 
   case 1169:
 
-/* Line 1455 of yacc.c  */
-#line 4185 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4130 "./sql3.y"
     { (yyval.intval) = 1; }
     break;
 
   case 1170:
 
-/* Line 1455 of yacc.c  */
-#line 4186 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4131 "./sql3.y"
     { (yyval.intval) = 2; }
     break;
 
   case 1171:
 
-/* Line 1455 of yacc.c  */
-#line 4187 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4132 "./sql3.y"
     { (yyval.intval) = 3; }
     break;
 
   case 1172:
 
-/* Line 1455 of yacc.c  */
-#line 4191 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4136 "./sql3.y"
     { (yyval.strval) = NULL; }
     break;
 
   case 1173:
 
-/* Line 1455 of yacc.c  */
-#line 4192 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4137 "./sql3.y"
     { (yyval.strval) = (yyvsp[(2) - (2)].strval); }
     break;
 
   case 1174:
 
-/* Line 1455 of yacc.c  */
-#line 4196 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4141 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1175:
 
-/* Line 1455 of yacc.c  */
-#line 4197 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4142 "./sql3.y"
     { (yyval.tree) = (ST *)t_list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
   case 1176:
 
-/* Line 1455 of yacc.c  */
-#line 4202 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4147 "./sql3.y"
     {
 	      (yyval.list) = ((yyvsp[(1) - (1)].tree) != NULL ? t_CONS ((yyvsp[(1) - (1)].tree), NULL) : NULL);
 	    }
@@ -16049,8 +16047,8 @@ yyreduce:
 
   case 1177:
 
-/* Line 1455 of yacc.c  */
-#line 4206 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4151 "./sql3.y"
     {
 	      if ((yyvsp[(2) - (2)].tree) != NULL)
 		(yyval.list) = t_NCONC ((yyvsp[(1) - (2)].list), t_CONS ((yyvsp[(2) - (2)].tree), NULL));
@@ -16059,190 +16057,190 @@ yyreduce:
 
   case 1178:
 
-/* Line 1455 of yacc.c  */
-#line 4213 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4158 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_EXT, (ptrlong) (yyvsp[(2) - (2)].intval), NULL, NULL); }
     break;
 
   case 1179:
 
-/* Line 1455 of yacc.c  */
-#line 4214 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4159 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1180:
 
-/* Line 1455 of yacc.c  */
-#line 4215 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4160 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1181:
 
-/* Line 1455 of yacc.c  */
-#line 4216 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4161 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1182:
 
-/* Line 1455 of yacc.c  */
-#line 4217 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4162 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1183:
 
-/* Line 1455 of yacc.c  */
-#line 4218 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4163 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1184:
 
-/* Line 1455 of yacc.c  */
-#line 4219 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4164 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1185:
 
-/* Line 1455 of yacc.c  */
-#line 4220 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4165 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1186:
 
-/* Line 1455 of yacc.c  */
-#line 4221 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4166 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1187:
 
-/* Line 1455 of yacc.c  */
-#line 4222 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4167 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1188:
 
-/* Line 1455 of yacc.c  */
-#line 4223 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4168 "./sql3.y"
     { (yyval.tree) = NULL; /* no action for now */ }
     break;
 
   case 1189:
 
-/* Line 1455 of yacc.c  */
-#line 4224 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4169 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_EXT, UDT_LANG_NONE, (yyvsp[(3) - (3)].box), NULL); }
     break;
 
   case 1190:
 
-/* Line 1455 of yacc.c  */
-#line 4225 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4170 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_VAR_EXT, UDT_LANG_NONE, (yyvsp[(4) - (4)].box), NULL); }
     break;
 
   case 1191:
 
-/* Line 1455 of yacc.c  */
-#line 4226 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4171 "./sql3.y"
     { (yyval.tree) = t_listst (4, UDT_EXT, UDT_LANG_NONE, NULL, (yyvsp[(3) - (3)].box)); }
     break;
 
   case 1192:
 
-/* Line 1455 of yacc.c  */
-#line 4230 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4175 "./sql3.y"
     { yyerror ("Language ADA not supported"); }
     break;
 
   case 1193:
 
-/* Line 1455 of yacc.c  */
-#line 4231 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4176 "./sql3.y"
     { (yyval.intval) = UDT_LANG_C; }
     break;
 
   case 1194:
 
-/* Line 1455 of yacc.c  */
-#line 4232 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4177 "./sql3.y"
     { yyerror ("Language COBOL not supported"); }
     break;
 
   case 1195:
 
-/* Line 1455 of yacc.c  */
-#line 4233 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4178 "./sql3.y"
     { yyerror ("Language FORTRAN not supported"); }
     break;
 
   case 1196:
 
-/* Line 1455 of yacc.c  */
-#line 4234 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4179 "./sql3.y"
     { yyerror ("Language MUMPS not supported"); }
     break;
 
   case 1197:
 
-/* Line 1455 of yacc.c  */
-#line 4235 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4180 "./sql3.y"
     { yyerror ("Language PASCAL not supported"); }
     break;
 
   case 1198:
 
-/* Line 1455 of yacc.c  */
-#line 4236 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4181 "./sql3.y"
     { yyerror ("Language PLI not supported"); }
     break;
 
   case 1199:
 
-/* Line 1455 of yacc.c  */
-#line 4237 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4182 "./sql3.y"
     { (yyval.intval) = UDT_LANG_JAVA; }
     break;
 
   case 1200:
 
-/* Line 1455 of yacc.c  */
-#line 4238 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4183 "./sql3.y"
     { (yyval.intval) = UDT_LANG_CLR; }
     break;
 
   case 1202:
 
-/* Line 1455 of yacc.c  */
-#line 4243 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4188 "./sql3.y"
     { (yyval.intval) = UDT_LANG_SQL; }
     break;
 
   case 1203:
 
-/* Line 1455 of yacc.c  */
-#line 4247 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4192 "./sql3.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 1204:
 
-/* Line 1455 of yacc.c  */
-#line 4248 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4193 "./sql3.y"
     { (yyval.tree) = (ST *) (yyvsp[(2) - (2)].strval); }
     break;
 
   case 1205:
 
-/* Line 1455 of yacc.c  */
-#line 4254 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4199 "./sql3.y"
     {
 	     (yyval.tree) = (ST *) sqlp_udt_method_decl (0, (yyvsp[(2) - (10)].intval), (yyvsp[(4) - (10)].box), (yyvsp[(5) - (10)].box), (caddr_t) (yyvsp[(6) - (10)].tree), (yyvsp[(9) - (10)].strval), (caddr_t) (yyvsp[(10) - (10)].tree), (caddr_t) (yyvsp[(7) - (10)].box));
 	   }
@@ -16250,8 +16248,8 @@ yyreduce:
 
   case 1206:
 
-/* Line 1455 of yacc.c  */
-#line 4259 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4204 "./sql3.y"
     {
 	     (yyval.tree) = (ST *) sqlp_udt_method_decl (0, UDT_METHOD_CONSTRUCTOR, (yyvsp[(4) - (9)].strval), (yyvsp[(5) - (9)].box), (caddr_t) (yyvsp[(6) - (9)].tree), (yyvsp[(8) - (9)].strval), (caddr_t) (yyvsp[(9) - (9)].tree), NULL);
 	   }
@@ -16259,15 +16257,15 @@ yyreduce:
 
   case 1207:
 
-/* Line 1455 of yacc.c  */
-#line 4266 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4211 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(3) - (6)].box), t_list_to_array ((yyvsp[(5) - (6)].list)), NULL, (yyvsp[(1) - (6)].strval)); }
     break;
 
   case 1208:
 
-/* Line 1455 of yacc.c  */
-#line 4271 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4216 "./sql3.y"
     {
 	    dk_set_t set = NULL;
 	    t_set_push (&set, (yyvsp[(1) - (7)].box));
@@ -16280,8 +16278,8 @@ yyreduce:
 
   case 1209:
 
-/* Line 1455 of yacc.c  */
-#line 4280 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4225 "./sql3.y"
     {
 	    dk_set_t set = NULL;
 	    t_set_push (&set, (yyvsp[(1) - (6)].box));
@@ -16294,15 +16292,15 @@ yyreduce:
 
   case 1210:
 
-/* Line 1455 of yacc.c  */
-#line 4288 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4233 "./sql3.y"
     { (yyval.list) = t_NCONC (t_CONS ((yyvsp[(1) - (3)].box), NULL), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 1211:
 
-/* Line 1455 of yacc.c  */
-#line 4293 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4238 "./sql3.y"
     {
 	    dk_set_t set = NULL;
 	    t_set_push (&set, (yyvsp[(1) - (9)].box));
@@ -16316,8 +16314,8 @@ yyreduce:
 
   case 1212:
 
-/* Line 1455 of yacc.c  */
-#line 4303 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4248 "./sql3.y"
     {
 	    dk_set_t set = NULL;
 	    t_set_push (&set, (yyvsp[(1) - (8)].box));
@@ -16331,190 +16329,190 @@ yyreduce:
 
   case 1213:
 
-/* Line 1455 of yacc.c  */
-#line 4312 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4257 "./sql3.y"
     { (yyval.list) = t_NCONC (t_CONS ((yyvsp[(1) - (3)].box), NULL), (yyvsp[(3) - (3)].list)); }
     break;
 
   case 1214:
 
-/* Line 1455 of yacc.c  */
-#line 4317 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4262 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(3) - (6)].box), t_list_to_array (t_CONS ((yyvsp[(1) - (6)].tree), (yyvsp[(5) - (6)].list))), NULL, (ptrlong) 1); }
     break;
 
   case 1215:
 
-/* Line 1455 of yacc.c  */
-#line 4319 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4264 "./sql3.y"
     { (yyval.tree) = (ST *) sqlp_udt_identifier_chain_to_member_handler ((yyvsp[(1) - (4)].list), (caddr_t) (yyvsp[(3) - (4)].list), 0); }
     break;
 
   case 1216:
 
-/* Line 1455 of yacc.c  */
-#line 4321 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4266 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(7) - (10)].box), t_list_to_array (t_CONS ((yyvsp[(2) - (10)].tree), (yyvsp[(9) - (10)].list))), NULL, t_list (1, (yyvsp[(4) - (10)].strval))); }
     break;
 
   case 1217:
 
-/* Line 1455 of yacc.c  */
-#line 4323 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4268 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(7) - (10)].box), t_list_to_array (t_CONS ((yyvsp[(2) - (10)].tree), (yyvsp[(9) - (10)].list))), NULL, t_list (1, (yyvsp[(4) - (10)].strval))); }
     break;
 
   case 1218:
 
-/* Line 1455 of yacc.c  */
-#line 4328 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4273 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(5) - (8)].box), t_list_to_array (t_CONS ((yyvsp[(3) - (8)].tree), (yyvsp[(7) - (8)].list))), NULL, (ptrlong) 1); }
     break;
 
   case 1219:
 
-/* Line 1455 of yacc.c  */
-#line 4330 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4275 "./sql3.y"
     { (yyval.tree) = (ST *) sqlp_udt_identifier_chain_to_member_handler ((yyvsp[(3) - (6)].list), (caddr_t) (yyvsp[(5) - (6)].list), 0); }
     break;
 
   case 1220:
 
-/* Line 1455 of yacc.c  */
-#line 4332 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4277 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(9) - (12)].box), t_list_to_array (t_CONS ((yyvsp[(4) - (12)].tree), (yyvsp[(11) - (12)].list))), NULL, t_list (1, (yyvsp[(6) - (12)].strval))); }
     break;
 
   case 1221:
 
-/* Line 1455 of yacc.c  */
-#line 4334 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4279 "./sql3.y"
     { (yyval.tree) = t_listst (5, CALL_STMT, (yyvsp[(9) - (12)].box), t_list_to_array (t_CONS ((yyvsp[(4) - (12)].tree), (yyvsp[(11) - (12)].list))), NULL, t_list (1, (yyvsp[(6) - (12)].strval))); }
     break;
 
   case 1223:
 
-/* Line 1455 of yacc.c  */
-#line 4340 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4285 "./sql3.y"
     { (yyval.tree) = (ST *) sqlp_udt_identifier_chain_to_member_handler (t_NCONC (t_CONS ((yyvsp[(1) - (3)].box), NULL), (yyvsp[(3) - (3)].list)), NULL, 1); }
     break;
 
   case 1224:
 
-/* Line 1455 of yacc.c  */
-#line 4345 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4290 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, (yyvsp[(3) - (3)].box), t_list (1, (yyvsp[(1) - (3)].tree))); }
     break;
 
   case 1225:
 
-/* Line 1455 of yacc.c  */
-#line 4347 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4292 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_list (2, (yyvsp[(7) - (7)].box), (yyvsp[(4) - (7)].strval)), t_list (1, (yyvsp[(2) - (7)].tree))); }
     break;
 
   case 1226:
 
-/* Line 1455 of yacc.c  */
-#line 4349 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4294 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, t_list (2, (yyvsp[(7) - (7)].box), (yyvsp[(4) - (7)].strval)), t_list (1, (yyvsp[(2) - (7)].tree))); }
     break;
 
   case 1227:
 
-/* Line 1455 of yacc.c  */
-#line 4353 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4298 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
   case 1228:
 
-/* Line 1455 of yacc.c  */
-#line 4354 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4299 "./sql3.y"
     { (yyval.box) = t_sqlp_box_id_upcase (yytext); }
     break;
 
   case 1229:
 
-/* Line 1455 of yacc.c  */
-#line 4359 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4304 "./sql3.y"
     { (yyval.tree) = t_listst (3, CALL_STMT, (yyvsp[(2) - (5)].strval), t_list_to_array ((yyvsp[(4) - (5)].list))); }
     break;
 
   case 1230:
 
-/* Line 1455 of yacc.c  */
-#line 4363 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4308 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_ALTER, (yyvsp[(3) - (4)].strval), (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 1231:
 
-/* Line 1455 of yacc.c  */
-#line 4367 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4312 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_MEMBER_ADD, (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 1232:
 
-/* Line 1455 of yacc.c  */
-#line 4368 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4313 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_MEMBER_DROP, (yyvsp[(3) - (4)].box), (ptrlong) (yyvsp[(4) - (4)].intval)); }
     break;
 
   case 1233:
 
-/* Line 1455 of yacc.c  */
-#line 4369 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4314 "./sql3.y"
     { (yyval.tree) = t_listst (2, UDT_METHOD_ADD, (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 1234:
 
-/* Line 1455 of yacc.c  */
-#line 4370 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4315 "./sql3.y"
     { (yyval.tree) = t_listst (3, UDT_METHOD_DROP, (yyvsp[(2) - (3)].tree), (ptrlong) (yyvsp[(3) - (3)].intval)); }
     break;
 
   case 1235:
 
-/* Line 1455 of yacc.c  */
-#line 4374 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4319 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 1236:
 
-/* Line 1455 of yacc.c  */
-#line 4375 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4320 "./sql3.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
   case 1237:
 
-/* Line 1455 of yacc.c  */
-#line 4376 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4321 "./sql3.y"
     { (yyval.box) = t_box_num (2); }
     break;
 
   case 1238:
 
-/* Line 1455 of yacc.c  */
-#line 4380 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4325 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 1239:
 
-/* Line 1455 of yacc.c  */
-#line 4381 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4326 "./sql3.y"
     { (yyval.box) = t_box_num (1); }
     break;
 
   case 1240:
 
-/* Line 1455 of yacc.c  */
-#line 4386 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4331 "./sql3.y"
     {
 	     (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.CLR_CREATE_LIBRARY"),
 		 t_list (4, (yyvsp[(5) - (7)].tree), (yyvsp[(3) - (7)].strval), (yyvsp[(7) - (7)].box), (yyvsp[(6) - (7)].box)));
@@ -16523,8 +16521,8 @@ yyreduce:
 
   case 1241:
 
-/* Line 1455 of yacc.c  */
-#line 4394 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4339 "./sql3.y"
     {
 	     (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.CLR_CREATE_ASSEMBLY"),
 		 t_list (4, (yyvsp[(5) - (7)].tree), (yyvsp[(3) - (7)].strval), (yyvsp[(7) - (7)].box), (yyvsp[(6) - (7)].box)));
@@ -16533,8 +16531,8 @@ yyreduce:
 
   case 1242:
 
-/* Line 1455 of yacc.c  */
-#line 4402 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4347 "./sql3.y"
     {
 	     (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.CLR_DROP_LIBRARY"),
 		 t_list (1, (yyvsp[(3) - (3)].strval)));
@@ -16543,8 +16541,8 @@ yyreduce:
 
   case 1243:
 
-/* Line 1455 of yacc.c  */
-#line 4410 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4355 "./sql3.y"
     {
 	     (yyval.tree) = (ST*) t_list (3, CALL_STMT, t_sqlp_box_id_upcase ("DB.DBA.CLR_DROP_LIBRARY"),
 		 t_list (1, (yyvsp[(3) - (3)].strval)));
@@ -16553,197 +16551,197 @@ yyreduce:
 
   case 1244:
 
-/* Line 1455 of yacc.c  */
-#line 4421 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4366 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_INT, t_box_num (0xffff), NULL); }
     break;
 
   case 1245:
 
-/* Line 1455 of yacc.c  */
-#line 4422 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4367 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_INT, (yyvsp[(3) - (4)].box), NULL); }
     break;
 
   case 1246:
 
-/* Line 1455 of yacc.c  */
-#line 4423 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4368 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_INT, t_box_num (0xffff), NULL); }
     break;
 
   case 1247:
 
-/* Line 1455 of yacc.c  */
-#line 4424 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4369 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_INT, (yyvsp[(3) - (4)].box), NULL); }
     break;
 
   case 1248:
 
-/* Line 1455 of yacc.c  */
-#line 4425 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4370 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_WORD, NULL, t_box_num (0xffff)); }
     break;
 
   case 1249:
 
-/* Line 1455 of yacc.c  */
-#line 4426 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4371 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_WORD, (yyvsp[(3) - (6)].box), (yyvsp[(5) - (6)].box)); }
     break;
 
   case 1250:
 
-/* Line 1455 of yacc.c  */
-#line 4427 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4372 "./sql3.y"
     { (yyval.tree) = t_listst (5, NULL, NULL, (ptrlong)CP_WORD, t_box_num (- unbox ((yyvsp[(4) - (7)].box))), (yyvsp[(6) - (7)].box)); }
     break;
 
   case 1251:
 
-/* Line 1455 of yacc.c  */
-#line 4432 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4377 "./sql3.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); if (!cl_name_to_host ((yyvsp[(1) - (1)].box))) yyerror ("undefined host name in cluster def"); }
     break;
 
   case 1252:
 
-/* Line 1455 of yacc.c  */
-#line 4436 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4381 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 1253:
 
-/* Line 1455 of yacc.c  */
-#line 4437 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4382 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 1254:
 
-/* Line 1455 of yacc.c  */
-#line 4441 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4386 "./sql3.y"
     { (yyval.box) = t_listbox (2, (yyvsp[(2) - (5)].box), (yyvsp[(4) - (5)].box)); }
     break;
 
   case 1255:
 
-/* Line 1455 of yacc.c  */
-#line 4445 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4390 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].box), NULL); }
     break;
 
   case 1256:
 
-/* Line 1455 of yacc.c  */
-#line 4446 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4391 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].box), NULL)); }
     break;
 
   case 1257:
 
-/* Line 1455 of yacc.c  */
-#line 4451 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4396 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, t_list_to_array ((yyvsp[(3) - (4)].list)), NULL); }
     break;
 
   case 1258:
 
-/* Line 1455 of yacc.c  */
-#line 4452 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4397 "./sql3.y"
     { (yyval.tree) = t_listst (3, NULL, t_list_to_array ((yyvsp[(3) - (6)].list)), t_list_to_array ((yyvsp[(6) - (6)].list))); }
     break;
 
   case 1259:
 
-/* Line 1455 of yacc.c  */
-#line 4457 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4402 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 1260:
 
-/* Line 1455 of yacc.c  */
-#line 4458 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4403 "./sql3.y"
     { (yyval.list) = t_NCONC ((yyvsp[(1) - (3)].list), t_CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 1261:
 
-/* Line 1455 of yacc.c  */
-#line 4462 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4407 "./sql3.y"
     { (yyval.box) = NULL; }
     break;
 
   case 1262:
 
-/* Line 1455 of yacc.c  */
-#line 4463 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4408 "./sql3.y"
     { (yyval.box) = (caddr_t) 1;}
     break;
 
   case 1263:
 
-/* Line 1455 of yacc.c  */
-#line 4468 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4413 "./sql3.y"
     { (yyval.tree) = t_listst (4, CLUSTER_DEF, t_box_string ((yyvsp[(3) - (5)].box)), (yyvsp[(4) - (5)].box), t_list_to_array ((yyvsp[(5) - (5)].list))); }
     break;
 
   case 1264:
 
-/* Line 1455 of yacc.c  */
-#line 4472 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4417 "./sql3.y"
     { (yyval.list) = t_CONS ((yyvsp[(2) - (2)].tree), NULL); (yyvsp[(2) - (2)].tree)->_.col_part.col = (yyvsp[(1) - (2)].box); }
     break;
 
   case 1265:
 
-/* Line 1455 of yacc.c  */
-#line 4473 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4418 "./sql3.y"
     { (yyvsp[(4) - (4)].tree)->_.col_part.col = (yyvsp[(3) - (4)].box); (yyval.list) = t_NCONC ((yyvsp[(1) - (4)].list), (yyvsp[(4) - (4)].tree));}
     break;
 
   case 1266:
 
-/* Line 1455 of yacc.c  */
-#line 4477 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4422 "./sql3.y"
     { (yyval.list) = NULL;}
     break;
 
   case 1267:
 
-/* Line 1455 of yacc.c  */
-#line 4478 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4423 "./sql3.y"
     { (yyval.list) = (yyvsp[(2) - (3)].list); }
     break;
 
   case 1268:
 
-/* Line 1455 of yacc.c  */
-#line 4481 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4426 "./sql3.y"
     { (yyval.box) = t_sym_string  ("__ALL"); }
     break;
 
   case 1269:
 
-/* Line 1455 of yacc.c  */
-#line 4482 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4427 "./sql3.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 1270:
 
-/* Line 1455 of yacc.c  */
-#line 4488 "./sql3.y"
+/* Line 1464 of yacc.c  */
+#line 4433 "./sql3.y"
     { (yyval.tree) = t_listst (5, PARTITION_DEF,  (yyvsp[(5) - (8)].strval), (yyvsp[(3) - (8)].box), (yyvsp[(7) - (8)].box), t_list_to_array ((yyvsp[(8) - (8)].list))); }
     break;
 
 
 
-/* Line 1455 of yacc.c  */
-#line 16747 "sql3.c"
+/* Line 1464 of yacc.c  */
+#line 16745 "sql3.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/libsrc/Wi/sql3.h b/libsrc/Wi/sql3.h
index be24eee..880dc0a 100644
--- a/libsrc/Wi/sql3.h
+++ b/libsrc/Wi/sql3.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -770,8 +769,8 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
-#line 95 "./sql3.y"
+/* Line 1685 of yacc.c  */
+#line 68 "./sql3.y"
 
   long intval;
   char *strval;
@@ -783,8 +782,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1676 of yacc.c  */
-#line 788 "sql3.h"
+/* Line 1685 of yacc.c  */
+#line 787 "sql3.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/libsrc/Wi/sql3.y b/libsrc/Wi/sql3.y
index 2a6f0ab..ce6c3bd 100644
--- a/libsrc/Wi/sql3.y
+++ b/libsrc/Wi/sql3.y
@@ -1,14 +1,14 @@
 /*
  *  sql3.y
  *
- *  $Id: sql3.y,v 1.29.2.10 2011/01/28 13:28:30 source Exp $
+ *  $Id: sql3.y,v 1.29.2.14 2012/03/08 12:55:36 source Exp $
  *
  *  SQL Parser
  *
  *   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *   project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *   This project is free software; you can redistribute it and/or modify it
  *   under the terms of the GNU General Public License as published by the
@@ -25,34 +25,7 @@
  *
  */
 
-/*
-   CHANGES SINCE  22-MAR-1997
-
-   22-MAR-1997  AK   Added rule obe_literal (included in atom)
-		     to handle ODBC standard brace escaped literals like
-		     {d 'yyyy-mm-dd'}, {ts 'etc....'} and {t 'hh:mm:ss'} for
-		     date and time(stamp) values. See comment about
-		     the macro obe_keyword_to_bif_fun_name below.
-
-		     Added also three more cases to function_call rule for ODBC
-		     brace-escaped function calls like {fn concat('Bar','bar')}
-		     We should actually run in that case NAME through some kind
-		     of filter, e.g. CHAR -> chr, user -> get_user,
-		     CONCAT -> concat, etc.
-		     That is, to catch standard function names like char and
-		     insert and user that cannot be normally used because
-		     they are reserved words elsewhere,
-		     as well as (maybe) to convert uppercase names to
-		     lowercase, because currently bif-functions are recognized
-		     only in the case they have been defined in.
-		     But, what about if client defines uppercase or mixed case
-		     function names with create procedure and wants
-		     to call them with this {fn NAME} syntax???
-
-		     Added a clause to rule opt_escape to handle ODBC-standard
-		     like escape-syntax: {escape 'escape-character'}
-		     although the escape-checking syntax is not functional yet.
- */
+%expect 18
 
 %{
 
@@ -138,8 +111,9 @@
 %type <strval> new_table_name
 
 %type <tree> selectinto_statement
+%type <tree> query_opt_from_spec
 %type <tree> query_spec
-%type <tree> query_no_from_spec
+/*%type <tree> query_no_from_spec*/
 %type <tree> query_exp
 %type <tree> sqlonly_query_exp
 %type <tree> query_or_sparql_exp
@@ -151,6 +125,7 @@
 %type <tree> sqlonly_query_term
 %type <tree> sparqlonly_query_term
 %type <tree> query_term
+%type <tree> table_exp_opt
 %type <tree> table_exp
 
 %type <box> assignment
@@ -470,7 +445,6 @@
 %type <tree> opt_proc_col_list
 %type <tree> column_commalist_or_empty
 %type <subtok> opt_best
-/*%type <tree> opt_table_exp*/
 %type <box> opt_constraint_name
 %type <box> opt_column
 %type <intval> opt_drop_behavior
@@ -1156,7 +1130,7 @@ drop_xml_schema
 
 view_query_spec
 	: query_exp
-	| query_no_from_spec
+	/*| query_no_from_spec*/
 	;
 
 view_def_select_and_opt
@@ -1435,7 +1409,7 @@ ordering_spec_commalist
 
 ordering_spec
 	: scalar_exp opt_asc_desc
-		{ $$ = t_listst (3, ORDER_BY, INTEGERP ($1) ? (caddr_t) unbox_ptrlong ((caddr_t) $1) : (caddr_t) $1, (ptrlong) $2);  }
+		{ $$ = t_listst (3, ORDER_BY, (caddr_t) $1, (ptrlong) $2);  }
 	|  mssql_xml_col opt_asc_desc
 		{ $$ = (ST*) t_list (3, ORDER_BY, t_list (3, COL_DOTTED, NULL, sqlp_xml_col_name ($1)), (ptrlong) $2); }
 	;
@@ -1595,7 +1569,7 @@ sql
 
 manipulative_statement
 	: query_or_sparql_exp
-	| query_no_from_spec
+	/*| query_no_from_spec*/
 	| update_statement_positioned
 	| update_statement_searched
 	| insert_statement
@@ -1688,7 +1662,7 @@ insert_statement
 values_or_query_spec
 	: VALUES '(' insert_atom_commalist ')'
 		{ $$ = t_listst (2, INSERT_VALUES, sqlp_wrapper_sqlxml((ST**)t_list_to_array ($3))); }
-	| query_spec
+	| query_spec /* FROM is mandatory here */
 	;
 
 insert_atom_commalist
@@ -1985,7 +1959,7 @@ non_final_query_term
 	;
 
 sqlonly_query_term
-	: query_spec
+	: query_opt_from_spec
 	| '(' query_or_sparql_exp ')' opt_order_by_clause	{ $$ = sqlp_inline_order_by ($2, (ST **) $4); }
 	| XPATH STRING { $$ = sqlp_embedded_xpath ($2); }
 	;
@@ -2013,6 +1987,18 @@ non_final_query_spec
 
 	;
 
+query_opt_from_spec
+	: SELECT opt_top selection table_exp_opt	{
+		  if (NULL == $4)
+		    $$ = t_listst (5, SELECT_STMT, NULL,
+		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) $3), NULL) , NULL, NULL);
+		  else
+		    $$ = t_listst (5, SELECT_STMT, $2,
+		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) $3), $4->_.table_exp.from) , NULL, $4);
+		  sqlp_breakup ($$); }
+	;
+
+
 query_spec
 	: SELECT opt_top selection table_exp
 		{ $$ = t_listst (5, SELECT_STMT, $2,
@@ -2020,14 +2006,14 @@ query_spec
 		  sqlp_breakup ($$); }
 	;
 
-query_no_from_spec
+/*query_no_from_spec
 	: SELECT opt_top selection
 		{
 		  $$ = t_listst (5, SELECT_STMT, NULL,
 		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) $3), NULL) , NULL, NULL);
 		  sqlp_breakup ($$); }
 	;
-
+*/
 
 
 breakup_term
@@ -2058,6 +2044,11 @@ non_final_table_exp
 		}
 	;
 
+table_exp_opt
+	: /* empty */ { $$ = NULL; }
+	| table_exp
+	;
+
 table_exp
 	: from_clause opt_where_clause opt_group_by_clause opt_having_clause
 		opt_order_by_clause opt_lock_mode opt_sql_opt
@@ -2411,12 +2402,6 @@ scalar_subquery
 
 
 subquery
-/*	: query_exp */
-/*	: '(' SELECT opt_top selection table_exp ')'
-		{ $$ = t_listst (5, SELECT_STMT, $3,
-		      sqlp_stars (sqlp_wrapper_sqlxml ((ST **) $4), $5->_.table_exp.from), NULL, $5);
-		  sqlp_breakup ((ST*) $$);
-		} */
 	: '(' sqlonly_query_exp ')'	{ $$ = $2; }
 	| '(' SPARQL_L sqlonly_query_exp ')'	{ $$ = $3; }
 	;
@@ -2441,20 +2426,6 @@ scalar_exp_no_col_ref
 	: atom_no_obe				{ $$ = (sql_tree_t *) $1; }
 	| aggregate_ref
 	| scalar_subquery
-/********** pmn
-	| '(' scalar_exp_commalist ')'
-		{ dk_set_t exps = $2;
-		  if (exps -> next)
-		    {
-		      $$ = t_listst (2, COMMA_EXP, t_list_to_array (exps));
-		    }
-		  else
-		    {
-		      $$ = (ST *) exps -> data; dk_set_free (exps);
-		    }
-		}
-	  FIXED reduce/reduce conflict: (pmn)
-*************/
 	| '(' scalar_exp ')'		{ $$ = $2; }
 	| '(' scalar_exp ',' scalar_exp_commalist ')'
 		{ dk_set_t exps = t_CONS ($2, $4);
@@ -2478,20 +2449,6 @@ scalar_exp_no_col_ref_no_mem_obs_chain
 	: atom_no_obe				{ $$ = (sql_tree_t *) $1; }
 	| aggregate_ref
 	| scalar_subquery
-/********** pmn
-	| '(' scalar_exp_commalist ')'
-		{ dk_set_t exps = $2;
-		  if (exps -> next)
-		    {
-		      $$ = t_listst (2, COMMA_EXP, t_list_to_array (exps));
-		    }
-		  else
-		    {
-		      $$ = (ST *) exps -> data; dk_set_free (exps);
-		    }
-		}
-	  FIXED reduce/reduce conflict: (pmn)
-*************/
 	| '(' scalar_exp ')'		{ $$ = $2; }
 	| '(' scalar_exp ',' scalar_exp_commalist ')'
 		{ dk_set_t exps = t_CONS ($2, $4);
@@ -2888,12 +2845,6 @@ signed_literal
 	;
 
 /* miscellaneous */
-/*** pmn
-opt_prefix
-	: identifier { $$ = $1; }
-/ *	| { $$ = NULL; } * /
-	;
-*/
 
 q_table_name
 	: identifier			{ $$ = sqlp_table_name (NULL, 0, NULL, 0, $1, 1); }
@@ -3174,12 +3125,6 @@ parameter
 	| NAMED_PARAMETER	{ $$ = $1; }
 	;
 
-/*** pmn
-range_variable
-	: identifier
-	;
-*/
-
 user
 	: identifier		{ $$ = $1; }
 	;
diff --git a/libsrc/Wi/sql3_vc.c b/libsrc/Wi/sql3_vc.c
index ba81b97..eefbb46 100644
--- a/libsrc/Wi/sql3_vc.c
+++ b/libsrc/Wi/sql3_vc.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sql3_vc.c,v 1.2.2.1 2009/04/18 21:55:15 source Exp $
+ *  $Id: sql3_vc.c,v 1.2.2.2 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sql_code.c b/libsrc/Wi/sql_code.c
index db6e3a0..34f1c1f 100644
--- a/libsrc/Wi/sql_code.c
+++ b/libsrc/Wi/sql_code.c
@@ -5278,7 +5278,7 @@ static const char *proc116 =
 "ret := make_array (2, \'any\');\n"
 "prefix := \'SPARQL\\n\';\n"
 "\n"
-"ns := sprintf (\'prefix %s: <http://%s/%s#>\\n\', _dir, cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DefaultHost\'), _dir);\n"
+"ns := sprintf (\'prefix %s: <http://%s/%s#>\\n\', _dir, virtuoso_ini_item_value (\'URIQA\', \'DefaultHost\'), _dir);\n"
 "ns := ns || \'prefix northwind: <http://demo.openlinksw.com/schemas/northwind#>\n"
 "prefix demo: <http://www.openlinksw.com/schemas/demo#>\n"
 "prefix oplsioc: <http://www.openlinksw.com/schemas/oplsioc#>\n"
@@ -5286,7 +5286,7 @@ static const char *proc116 =
 "prefix foaf: <http://xmlns.com/foaf/0.1/>\n"
 "prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>\\n\';\n"
 "\n"
-"uriqa_str := cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\');\n"
+"uriqa_str := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "\n"
 "create_class_stmt := \'\';\n"
 "\n"
@@ -5313,7 +5313,7 @@ static const char *proc117 =
 "declare ret, qual, qual_l, tbl_name, tbl_name_l, pks, pk_text, uriqa_str any;\n"
 "declare sufix, tname, tbl any;\n"
 "\n"
-"uriqa_str := cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\');\n"
+"uriqa_str := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "qual := name_part (_tbls[0], 0);\n"
 "qual_l := lcase (qual);\n"
 "\n"
@@ -7361,795 +7361,9 @@ static const char *proc168 =
 "}\n"
 "--src odbccat.sql:693\n";
 
-/* useraggr.sql */
-
-static const char *proc169 = 
-"#line 24 \"[executable]/useraggr.sql\"\n"
-" create procedure STD_COUNT (in _env varchar)\n"
-"{\n"
-"return aref (deserialize(_env), 0);\n"
-"}\n"
-"--src useraggr.sql:22\n";
-
-static const char *proc170 = 
-"#line 31 \"[executable]/useraggr.sql\"\n"
-" create procedure STD11_INIT (inout _env varchar)\n"
-"{\n"
-"_env := serialize (vector (0, 0.0));\n"
-"}\n"
-"--src useraggr.sql:29\n";
-
-static const char *proc171 = 
-"#line 38 \"[executable]/useraggr.sql\"\n"
-" create procedure STD12_INIT (inout _env varchar)\n"
-"{\n"
-"_env := serialize (vector (0, 0.0,0.0));\n"
-"}\n"
-"--src useraggr.sql:36\n";
-
-static const char *proc172 = 
-"#line 45 \"[executable]/useraggr.sql\"\n"
-" create procedure STD13_INIT (inout _env varchar)\n"
-"{\n"
-"_env := serialize (vector (0, 0.0,0.0, 0.0));\n"
-"}\n"
-"--src useraggr.sql:43\n";
-
-static const char *proc173 = 
-"#line 52 \"[executable]/useraggr.sql\"\n"
-" create procedure VAR_ACC (inout _env varchar, in val numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if (val is null)\n"
-"return;\n"
-"declare ctx any;\n"
-"ctx := deserialize (_env);\n"
-"\n"
-"aset( ctx, 1, aref (ctx, 1) + val);\n"
-"aset( ctx, 2, aref (ctx, 2) + val*val);\n"
-"aset( ctx, 0, aref (ctx, 0) + 1);\n"
-"_env := serialize (ctx);\n"
-"}\n"
-"--src useraggr.sql:50\n";
-
-static const char *proc174 = 
-"#line 69 \"[executable]/useraggr.sql\"\n"
-" create procedure VAR_POP_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"declare _env any;\n"
-"_env := deserialize (_ctx);\n"
-"declare c integer;\n"
-"c := aref (_env, 0);\n"
-"if (c = 0)\n"
-"return null;\n"
-"return  (aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / c;\n"
-"}\n"
-"--src useraggr.sql:67\n";
-
-static const char *proc175 = 
-"#line 84 \"[executable]/useraggr.sql\"\n"
-" create procedure VAR_SAMP_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"declare _env any;\n"
-"_env := deserialize (_ctx);\n"
-"declare c integer;\n"
-"c := aref (_env, 0);\n"
-"if (c = 0)\n"
-"return null;\n"
-"if (c = 1)\n"
-"return 0.0;\n"
-"return  (aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / (c - 1);\n"
-"}\n"
-"--src useraggr.sql:82\n";
-
-static const char *proc176 = 
-"#line 101 \"[executable]/useraggr.sql\"\n"
-" create procedure VAR_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"if (STD_COUNT (_ctx) = 1)\n"
-"return null;\n"
-"return VAR_SAMP_FIN (_ctx);\n"
-"}\n"
-"--src useraggr.sql:99\n";
-
-static const char *proc177 = 
-"#line 112 \"[executable]/useraggr.sql\"\n"
-" create procedure STDDEV_POP_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"declare c integer;\n"
-"declare _env any;\n"
-"_env := deserialize (_ctx);\n"
-"c := aref (_env, 0);\n"
-"if (c = 0)\n"
-"return null;\n"
-"\n"
-"return  sqrt ((aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / c) ;\n"
-"}\n"
-"--src useraggr.sql:110\n";
-
-static const char *proc178 = 
-"#line 128 \"[executable]/useraggr.sql\"\n"
-" create procedure STDDEV_SAMP_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"declare c integer;\n"
-"declare _env any;\n"
-"_env := deserialize (_ctx);\n"
-"c := aref (_env, 0);\n"
-"if (c = 0)\n"
-"return null;\n"
-"if (c = 1)\n"
-"return 0.0;\n"
-"return  sqrt ((aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / ( c - 1));\n"
-"}\n"
-"--src useraggr.sql:126\n";
-
-static const char *proc179 = 
-"#line 145 \"[executable]/useraggr.sql\"\n"
-" create procedure STDDEV_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"if (STD_COUNT (_ctx) = 1)\n"
-"return null;\n"
-"return STDDEV_SAMP_FIN (_ctx);\n"
-"}\n"
-"--src useraggr.sql:143\n";
-
-static const char *proc180 = 
-"#line 156 \"[executable]/useraggr.sql\"\n"
-" create procedure COVAR_ACC (inout _ctx any,\n"
-"in expr1 numeric,\n"
-"in expr2 numeric)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return;\n"
-"if (expr1 is null or expr2 is null)\n"
-"return;\n"
-"\n"
-"declare _env any;\n"
-"\n"
-"_env := deserialize (_ctx);\n"
-"\n"
-"aset (_env, 1, aref (_env,1)+expr1);\n"
-"aset (_env, 2, aref (_env,2)+expr2);\n"
-"aset (_env, 3, aref (_env,3)+expr2*expr1);\n"
-"aset (_env, 0, aref (_env,0)+1);\n"
-"\n"
-"_ctx := serialize (_env);\n"
-"}\n"
-"--src useraggr.sql:154\n";
-
-static const char *proc181 = 
-"#line 179 \"[executable]/useraggr.sql\"\n"
-" create procedure COVAR_SAMP_FIN (inout _ctx any)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"declare _env any;\n"
-"_env := deserialize (_ctx);\n"
-"if (aref (_env, 0) = 0)\n"
-"return null;\n"
-"if (aref (_env, 0) = 1)\n"
-"return 0.0;\n"
-"\n"
-"return (aref (_env, 3) - aref(_env,2) * aref (_env,1) / aref (_env, 0)) / ( aref (_env, 0) - 1);\n"
-"}\n"
-"--src useraggr.sql:177\n";
-
-static const char *proc182 = 
-"#line 195 \"[executable]/useraggr.sql\"\n"
-" create procedure COVAR_POP_FIN (inout _ctx any)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"declare _env any;\n"
-"_env := deserialize (_ctx);\n"
-"if (aref (_env, 0) = 0)\n"
-"return null;\n"
-"if (aref (_env, 0) = 1)\n"
-"return 0.0;\n"
-"\n"
-"return (aref (_env, 3) - aref(_env,2) * aref (_env,1) / aref (_env, 0))/ aref (_env,0);\n"
-"}\n"
-"--src useraggr.sql:193\n";
-
-static const char *proc183 = 
-"#line 211 \"[executable]/useraggr.sql\"\n"
-" create procedure COVAR_FIN (inout _ctx varchar)\n"
-"{\n"
-"if (_ctx is null)\n"
-"return null;\n"
-"if (STD_COUNT (_ctx) = 1)\n"
-"return null;\n"
-"return COVAR_SAMP_FIN (_ctx);\n"
-"}\n"
-"--src useraggr.sql:209\n";
-
-static const char *other133 = 
-"create aggregate DB.DBA.VAR_POP (in val numeric) returns numeric from\n"
-"STD12_INIT, VAR_ACC, VAR_POP_FIN\n";
-
-static const char *other134 = 
-"create aggregate DB.DBA.VAR_SAMP (in val numeric) returns numeric from\n"
-"STD12_INIT, VAR_ACC, VAR_SAMP_FIN\n";
-
-static const char *other135 = 
-"create aggregate DB.DBA.VAR (in val numeric) returns numeric from\n"
-"STD12_INIT, VAR_ACC, VAR_FIN\n";
-
-static const char *other136 = 
-"create aggregate DB.DBA.STDDEV_POP (in val numeric) returns numeric from\n"
-"STD12_INIT, VAR_ACC, STDDEV_POP_FIN\n";
-
-static const char *other137 = 
-"create aggregate DB.DBA.STDDEV_SAMP (in val numeric) returns numeric from\n"
-"STD12_INIT, VAR_ACC, STDDEV_SAMP_FIN\n";
-
-static const char *other138 = 
-"create aggregate DB.DBA.STDDEV (in val numeric) returns numeric from\n"
-"STD12_INIT, VAR_ACC, STDDEV_FIN\n";
-
-static const char *other139 = 
-"create aggregate DB.DBA.COVAR_SAMP (in expr1 numeric, in expr2 numeric) returns numeric from\n"
-"STD13_INIT, COVAR_ACC, COVAR_SAMP_FIN\n";
-
-static const char *other140 = 
-"create aggregate DB.DBA.COVAR_POP (in expr1 numeric, in expr2 numeric) returns numeric from\n"
-"STD13_INIT, COVAR_ACC, COVAR_POP_FIN\n";
-
-static const char *other141 = 
-"create aggregate DB.DBA.COVAR (in expr1 numeric, in expr2 numeric) returns numeric from\n"
-"STD13_INIT, COVAR_ACC, COVAR_FIN\n";
-
-static const char *proc184 = 
-"#line 250 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SLOPE_INIT (inout _env varchar)\n"
-"{\n"
-"declare _ctx1 varchar;\n"
-"declare _ctx2 varchar;\n"
-"\n"
-"STD13_INIT (_ctx1);\n"
-"STD12_INIT (_ctx2);\n"
-"\n"
-"_env := serialize (vector (0, _ctx1, _ctx2));\n"
-"}\n"
-"--src useraggr.sql:248\n";
-
-static const char *proc185 = 
-"#line 263 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SLOPE_ACC (inout _env varchar, in expr1 numeric, in expr2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if ( (expr1 is null) or (expr2 is null))\n"
-"return;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _ctx1 varchar;\n"
-"declare _ctx2 varchar;\n"
-"\n"
-"_ctx1 := aref (_ctx, 1);\n"
-"_ctx2 := aref (_ctx, 2);\n"
-"\n"
-"aset (_ctx, 0, aref (_ctx,0) + 1);\n"
-"COVAR_ACC (_ctx1, expr1, expr2);\n"
-"VAR_ACC (_ctx2, expr2);\n"
-"\n"
-"aset (_ctx, 1, _ctx1);\n"
-"aset (_ctx, 2, _ctx2);\n"
-"\n"
-"_env := serialize (_ctx);\n"
-"}\n"
-"--src useraggr.sql:261\n";
-
-static const char *proc186 = 
-"#line 290 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SLOPE_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"declare c integer;\n"
-"\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"c := aref (_ctx, 0);\n"
-"if (c = 0)\n"
-"return 0;\n"
-"if (c = 1)\n"
-"return null;\n"
-"\n"
-"declare _ctx1 varchar;\n"
-"declare _ctx2 varchar;\n"
-"declare covar_pop_val numeric;\n"
-"declare var_pop_val numeric;\n"
-"\n"
-"_ctx1 := aref (_ctx, 1);\n"
-"_ctx2 := aref (_ctx, 2);\n"
-"\n"
-"\n"
-"covar_pop_val := COVAR_POP_FIN (_ctx1);\n"
-"var_pop_val := VAR_POP_FIN (_ctx2);\n"
-"\n"
-"if (var_pop_val = 0)\n"
-"return null;\n"
-"return covar_pop_val / var_pop_val;\n"
-"}\n"
-"--src useraggr.sql:288\n";
-
-static const char *other142 = 
-"create aggregate DB.DBA.REGR_SLOPE (in expr1 numeric, in expr2 numeric) returns numeric from REGR_SLOPE_INIT, REGR_SLOPE_ACC, REGR_SLOPE_FIN\n";
-
-static const char *proc187 = 
-"#line 327 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_INTERCEPT_INIT (inout _env varchar)\n"
-"{\n"
-"declare _ctx_regr_slope varchar;\n"
-"\n"
-"REGR_SLOPE_INIT (_ctx_regr_slope);\n"
-"_env := serialize (vector (0, 0.0, 0.0, _ctx_regr_slope));\n"
-"}\n"
-"--src useraggr.sql:325\n";
-
-static const char *proc188 = 
-"#line 337 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_INTERCEPT_ACC (inout _env varchar, in expr1 numeric, in expr2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if ((expr1 is null) or (expr2 is null))\n"
-"return;\n"
-"\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"aset (_ctx, 0, aref (_ctx, 0) + 1);\n"
-"aset (_ctx, 1, aref (_ctx, 1) + expr1);\n"
-"aset (_ctx, 2, aref (_ctx, 2) + expr2);\n"
-"\n"
-"declare _ctx_r varchar;\n"
-"_ctx_r := aref (_ctx, 3);\n"
-"REGR_SLOPE_ACC (_ctx_r, expr1, expr2);\n"
-"aset (_ctx, 3, _ctx_r);\n"
-"\n"
-"_env := serialize (_ctx);\n"
-"}\n"
-"--src useraggr.sql:335\n";
-
-static const char *proc189 = 
-"#line 361 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_INTERCEPT_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"declare c integer;\n"
-"c := aref (_ctx, 0);\n"
-"if ((c = 0) or (c = 1))\n"
-"return null;\n"
-"\n"
-"return aref (_ctx, 1) / c - REGR_SLOPE_FIN (aref (_ctx, 3)) * aref (_ctx, 2) / c;\n"
-"}\n"
-"--src useraggr.sql:359\n";
-
-static const char *other143 = 
-"create aggregate DB.DBA.REGR_INTERCEPT (in expr1 numeric, in expr2 numeric) returns numeric from REGR_INTERCEPT_INIT, REGR_INTERCEPT_ACC, REGR_INTERCEPT_FIN\n";
-
-static const char *proc190 = 
-"#line 380 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_COUNT_INIT (inout _env integer)\n"
-"{\n"
-"_env := 0;\n"
-"}\n"
-"--src useraggr.sql:378\n";
-
-static const char *proc191 = 
-"#line 387 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_COUNT_ACC (inout _env integer, in expr numeric, in expr2 numeric)\n"
-"{\n"
-"if ((_env is null) or (expr is null) or (expr2 is null))\n"
-"return;\n"
-"_env := _env + 1;\n"
-"}\n"
-"--src useraggr.sql:385\n";
-
-static const char *proc192 = 
-"#line 396 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_COUNT_FIN (inout _env integer)\n"
-"{\n"
-"return _env;\n"
-"}\n"
-"--src useraggr.sql:394\n";
-
-static const char *proc193 = 
-"#line 403 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_COUNT_MERGE (inout _e1 integer, inout _e2 integer)\n"
-"{\n"
-"_e1 := _e1 + _e2;\n"
-"}\n"
-"--src useraggr.sql:401\n";
-
-static const char *other144 = 
-"create aggregate DB.DBA.REGR_COUNT (in expr1 numeric, in expr2 numeric) returns numeric from REGR_COUNT_INIT, REGR_COUNT_ACC, REGR_COUNT_FIN, REGR_COUNT_MERGE\n";
-
-static const char *proc194 = 
-"#line 413 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_AVG_ACC (inout _env varchar, in expr1 numeric, in expr2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"\n"
-"if ( (expr1 is null) or (expr2 is null))\n"
-"return;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"aset (_ctx, 0, aref (_ctx, 0) + 1);\n"
-"aset (_ctx, 1, aref (_ctx, 1) + expr1);\n"
-"aset (_ctx, 2, aref (_ctx, 2) + expr2);\n"
-"\n"
-"_env := serialize (_ctx);\n"
-"}\n"
-"--src useraggr.sql:411\n";
-
-static const char *proc195 = 
-"#line 432 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_AVGX_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"if (aref (_ctx, 0) = 0)\n"
-"return null;\n"
-"return aref (_ctx, 1) / aref (_ctx,0);\n"
-"}\n"
-"--src useraggr.sql:430\n";
-
-static const char *proc196 = 
-"#line 445 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_AVGY_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"if (aref (_ctx, 0) = 0)\n"
-"return null;\n"
-"return aref (_ctx, 2) / aref (_ctx,0);\n"
-"}\n"
-"--src useraggr.sql:443\n";
-
-static const char *other145 = 
-"create aggregate DB.DBA.REGR_AVGX (in x numeric, in y numeric) returns numeric from\n"
-"STD12_INIT, REGR_AVG_ACC, REGR_AVGX_FIN\n";
-
-static const char *other146 = 
-"create aggregate DB.DBA.REGR_AVGY (in x numeric, in y numeric) returns numeric from\n"
-"STD12_INIT, REGR_AVG_ACC, REGR_AVGY_FIN\n";
-
-static const char *proc197 = 
-"#line 466 \"[executable]/useraggr.sql\"\n"
-" create procedure CORR_INIT (inout _env varchar)\n"
-"{\n"
-"declare _ctx_cov varchar;\n"
-"declare _ctx_stdev1 varchar;\n"
-"declare _ctx_stdev2 varchar;\n"
-"\n"
-"STD13_INIT (_ctx_cov);\n"
-"STD12_INIT (_ctx_stdev1);\n"
-"STD12_INIT (_ctx_stdev2);\n"
-"\n"
-"_env := serialize (vector (0, _ctx_cov, _ctx_stdev1, _ctx_stdev2));\n"
-"}\n"
-"--src useraggr.sql:464\n";
-
-static const char *proc198 = 
-"#line 481 \"[executable]/useraggr.sql\"\n"
-" create procedure CORR_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if ((e1 is null) or (e2 is null))\n"
-"return;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _ctx_cov varchar;\n"
-"declare _ctx_stdev1 varchar;\n"
-"declare _ctx_stdev2 varchar;\n"
-"\n"
-"_ctx_cov := aref (_ctx, 1);\n"
-"_ctx_stdev1 := aref (_ctx, 2);\n"
-"_ctx_stdev2 := aref (_ctx, 3);\n"
-"\n"
-"COVAR_ACC (_ctx_cov, e1, e2);\n"
-"VAR_ACC (_ctx_stdev1, e1);\n"
-"VAR_ACC (_ctx_stdev2, e2);\n"
-"\n"
-"aset (_ctx, 0, aref (_ctx, 0) + 1);\n"
-"aset (_ctx, 1, _ctx_cov);\n"
-"aset (_ctx, 2, _ctx_stdev1);\n"
-"aset (_ctx, 3, _ctx_stdev2);\n"
-"\n"
-"_env := serialize (_ctx);\n"
-"}\n"
-"--src useraggr.sql:479\n";
-
-static const char *proc199 = 
-"#line 512 \"[executable]/useraggr.sql\"\n"
-" create procedure CORR_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _ctx_cov_val numeric;\n"
-"declare _ctx_stdev1_val numeric;\n"
-"declare _ctx_stdev2_val numeric;\n"
-"\n"
-"_ctx_cov_val := COVAR_POP_FIN (aref (_ctx, 1));\n"
-"_ctx_stdev1_val := STDDEV_POP_FIN (aref (_ctx, 2));\n"
-"_ctx_stdev2_val := STDDEV_POP_FIN (aref (_ctx, 3));\n"
-"\n"
-"if (_ctx_cov_val is null)\n"
-"return null;\n"
-"if (_ctx_stdev1_val is null or _ctx_stdev1_val = 0)\n"
-"return null;\n"
-"if (_ctx_stdev2_val is null or _ctx_stdev2_val = 0)\n"
-"return null;\n"
-"\n"
-"return _ctx_cov_val / _ctx_stdev1_val / _ctx_stdev2_val;\n"
-"}\n"
-"--src useraggr.sql:510\n";
-
-static const char *other147 = 
-"create aggregate DB.DBA.CORR (in x numeric, in y numeric) returns numeric from\n"
-"CORR_INIT, CORR_ACC, CORR_FIN\n";
-
-static const char *proc200 = 
-"#line 543 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_R2_INIT (inout _env varchar)\n"
-"{\n"
-"declare _ctx_vp1 varchar;\n"
-"declare _ctx_vp2 varchar;\n"
-"declare _ctx_corr varchar;\n"
-"\n"
-"STD12_INIT (_ctx_vp1);\n"
-"STD12_INIT (_ctx_vp2);\n"
-"CORR_INIT (_ctx_corr);\n"
-"\n"
-"_env := serialize (vector (_ctx_vp1, _ctx_vp2, _ctx_corr));\n"
-"}\n"
-"--src useraggr.sql:541\n";
-
-static const char *proc201 = 
-"#line 558 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_R2_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if (e1 is null or e2 is null)\n"
-"return;\n"
-"declare _ctx  any;\n"
-"\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _ctx_vp1 varchar;\n"
-"declare _ctx_vp2 varchar;\n"
-"declare _ctx_corr varchar;\n"
-"\n"
-"_ctx_vp1 := aref (_ctx, 0);\n"
-"_ctx_vp2 := aref (_ctx, 1);\n"
-"_ctx_corr := aref (_ctx, 2);\n"
-"\n"
-"VAR_ACC (_ctx_vp1, e1);\n"
-"VAR_ACC (_ctx_vp2, e2);\n"
-"CORR_ACC (_ctx_corr, e1, e2);\n"
-"\n"
-"aset (_ctx, 0, _ctx_vp1);\n"
-"aset (_ctx, 1, _ctx_vp2);\n"
-"aset (_ctx, 2, _ctx_corr);\n"
-"\n"
-"_env := serialize (_ctx);\n"
-"}\n"
-"--src useraggr.sql:556\n";
-
-static const char *proc202 = 
-"#line 589 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_R2_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _vp1 numeric;\n"
-"declare _vp2 numeric;\n"
-"declare _corr numeric;\n"
-"\n"
-"_vp2 := VAR_POP_FIN (aref(_ctx, 1));\n"
-"if (_vp2 is null or _vp2 = 0)\n"
-"return null;\n"
-"_vp1 := VAR_POP_FIN (aref(_ctx, 0));\n"
-"if (_vp1 is null or _vp1 = 0)\n"
-"return 1;\n"
-"_corr := CORR_FIN (aref (_ctx, 2));\n"
-"return _corr * _corr;\n"
-"}\n"
-"--src useraggr.sql:587\n";
-
-static const char *other148 = 
-"create aggregate DB.DBA.REGR_R2 (in e1 numeric, in e2 numeric) returns numeric from\n"
-"REGR_R2_INIT, REGR_R2_ACC, REGR_R2_FIN\n";
-
-static const char *proc203 = 
-"#line 617 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SXX_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if (e1 is null or e2 is null)\n"
-"return;\n"
-"\n"
-"VAR_ACC (_env, e2);\n"
-"}\n"
-"--src useraggr.sql:615\n";
-
-static const char *proc204 = 
-"#line 629 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SYY_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if (e1 is null or e2 is null)\n"
-"return;\n"
-"\n"
-"VAR_ACC (_env, e1);\n"
-"}\n"
-"--src useraggr.sql:627\n";
-
-static const char *proc205 = 
-"#line 641 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SXY_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
-"{\n"
-"if (_env is null)\n"
-"return;\n"
-"if (e1 is null or e2 is null)\n"
-"return;\n"
-"\n"
-"COVAR_ACC (_env, e1, e2);\n"
-"}\n"
-"--src useraggr.sql:639\n";
-
-static const char *proc206 = 
-"#line 653 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_S___FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _var numeric;\n"
-"\n"
-"_var := VAR_POP_FIN (_env);\n"
-"if (_var is null)\n"
-"return null;\n"
-"return aref (_ctx,0) * _var;\n"
-"}\n"
-"--src useraggr.sql:651\n";
-
-static const char *proc207 = 
-"#line 670 \"[executable]/useraggr.sql\"\n"
-" create procedure REGR_SXY_FIN (inout _env varchar)\n"
-"{\n"
-"if (_env is null)\n"
-"return null;\n"
-"declare _ctx any;\n"
-"_ctx := deserialize (_env);\n"
-"\n"
-"declare _var numeric;\n"
-"\n"
-"_var := COVAR_POP_FIN (_env);\n"
-"if (_var is null)\n"
-"return null;\n"
-"return aref (_ctx,0) * _var;\n"
-"}\n"
-"--src useraggr.sql:668\n";
-
-static const char *other149 = 
-"create aggregate DB.DBA.REGR_SXX (in e1 numeric, in e2 numeric) returns numeric from\n"
-"STD12_INIT, REGR_SXX_ACC, REGR_S___FIN\n";
-
-static const char *other150 = 
-"create aggregate DB.DBA.REGR_SYY (in e1 numeric, in e2 numeric) returns numeric from\n"
-"STD12_INIT, REGR_SYY_ACC, REGR_S___FIN\n";
-
-static const char *other151 = 
-"create aggregate DB.DBA.REGR_SXY (in e1 numeric, in e2 numeric) returns numeric from\n"
-"STD13_INIT, REGR_SXY_ACC, REGR_SXY_FIN\n";
-
-static const char *proc208 = 
-"#line 699 \"[executable]/useraggr.sql\"\n"
-" create procedure xte_nodebld_final_root (in acc any) returns any\n"
-"{\n"
-"return xte_nodebld_xmlagg_final (acc, xte_head (UNAME\' root\'));\n"
-"}\n"
-"--src useraggr.sql:697\n";
-
-static const char *other152 = 
-"create aggregate DB.DBA.XMLAGG (in _child any) returns any\n"
-"from xte_nodebld_init, xte_nodebld_xmlagg_acc, xte_nodebld_final_root\n";
-
-static const char *other153 = 
-"create aggregate DB.DBA.VECTOR_AGG (in _child any) returns any\n"
-"from vectorbld_init, vectorbld_agg_acc, vectorbld_agg_final\n"
-"order\n";
-
-static const char *other154 = 
-"create aggregate DB.DBA.VECTOR_OF_NONNULLS_AGG (in _child any) returns any\n"
-"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vectorbld_agg_final\n"
-"order\n";
-
-static const char *other155 = 
-"create aggregate DB.DBA.VECTOR_OR_NULL_AGG (in _child any) returns any\n"
-"from vectorbld_init, vectorbld_agg_acc, vector_or_null_bld_agg_final\n"
-"order\n";
-
-static const char *other156 = 
-"create aggregate DB.DBA.VECTOR_OF_NONNULLS_OR_NULL_AGG (in _child any) returns any\n"
-"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vector_or_null_bld_agg_final\n"
-"order\n";
-
-static const char *other157 = 
-"create aggregate DB.DBA.VECTOR_CONCAT_AGG (in _child any) returns any\n"
-"from vectorbld_init, vectorbld_concat_agg_acc, vectorbld_agg_final\n"
-"order\n";
-
-static const char *other158 = 
-"create aggregate DB.DBA.XQ_SEQUENCE_AGG (in _child any) returns any\n"
-"from xq_sequencebld_init, xq_sequencebld_agg_acc, xq_sequencebld_agg_final\n"
-"order\n";
-
-static const char *other159 = 
-"create aggregate DB.DBA.BAG_AGG (in _child any) returns any\n"
-"from vectorbld_init, vectorbld_agg_acc, vectorbld_agg_final\n";
-
-static const char *other160 = 
-"create aggregate DB.DBA.BAG_OF_NONNULLS_AGG (in _child any) returns any\n"
-"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vectorbld_agg_final\n";
-
-static const char *other161 = 
-"create aggregate DB.DBA.BAG_OR_NULL_AGG (in _child any) returns any\n"
-"from vectorbld_init, vectorbld_agg_acc, vector_or_null_bld_agg_final\n";
-
-static const char *other162 = 
-"create aggregate DB.DBA.BAG_OF_NONNULLS_OR_NULL_AGG (in _child any) returns any\n"
-"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vector_or_null_bld_agg_final\n";
-
-static const char *other163 = 
-"create aggregate DB.DBA.BAG_CONCAT_AGG (in _child any) returns any\n"
-"from vectorbld_init, vectorbld_concat_agg_acc, vectorbld_agg_final\n";
-
 /* vt_text.sql */
 
-static const char *proc209 = 
+static const char *proc169 = 
 "#line 28 \"[executable]/vt_text.sql\"\n"
 "create procedure DB.DBA.execstmt (in stmt varchar, out stat varchar, out msg varchar)\n"
 "{\n"
@@ -8163,7 +7377,7 @@ static const char *proc209 =
 "}\n"
 "--src vt_text.sql:26\n";
 
-static const char *proc210 = 
+static const char *proc170 = 
 "#line 40 \"[executable]/vt_text.sql\"\n"
 "create procedure DB.DBA.vt_create_ftt (in tb varchar, in id varchar, in dbcol varchar, in is_intr integer)\n"
 "{\n"
@@ -8552,7 +7766,7 @@ static const char *proc210 =
 "}\n"
 "--src vt_text.sql:38\n";
 
-static const char *proc211 = 
+static const char *proc171 = 
 "#line 428 \"[executable]/vt_text.sql\"\n"
 "create procedure DB.DBA.vt_drop_ftt (in tb varchar, in dbcol varchar)\n"
 "{\n"
@@ -8603,11 +7817,11 @@ static const char *proc211 =
 "}\n"
 "--src vt_text.sql:426\n";
 
-static const char *other164 = 
+static const char *other133 = 
 "grant execute on DB.DBA.vt_create_text_index to public\n";
 /* phrasematch.sql */
 
-static const char *proc212 = 
+static const char *proc172 = 
 "#line 24 \"[executable]/phrasematch.sql\"\n"
 "create procedure AP_EXEC_NO_ERROR (in expr varchar)\n"
 "{\n"
@@ -8744,7 +7958,7 @@ static const char *trig5 =
 "}\n"
 "--src phrasematch.sql:179\n";
 
-static const char *proc213 = 
+static const char *proc173 = 
 "#line 187 \"[executable]/phrasematch.sql\"\n"
 "create procedure DB.DBA.ANN_BOOT()\n"
 "{\n"
@@ -8760,7 +7974,7 @@ static const char *proc213 =
 "}\n"
 "--src phrasematch.sql:185\n";
 
-static const char *proc214 = 
+static const char *proc174 = 
 "#line 201 \"[executable]/phrasematch.sql\"\n"
 "create function ANN_AUTHENTICATE (in id any, in what char (1), in access char, in auth_uname any, in auth_pwd varchar, inout auth_uid integer := null) returns integer\n"
 "{\n"
@@ -8840,7 +8054,7 @@ static const char *proc214 =
 "}\n"
 "--src phrasematch.sql:199\n";
 
-static const char *proc215 = 
+static const char *proc175 = 
 "#line 279 \"[executable]/phrasematch.sql\"\n"
 "create function ANN_GETID (in what varchar )\n"
 "{\n"
@@ -8876,7 +8090,7 @@ static const char *proc215 =
 "}\n"
 "--src phrasematch.sql:277\n";
 
-static const char *proc216 = 
+static const char *proc176 = 
 "#line 314 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_PHRASE_CLASS_ADD (in _name varchar, in _owner_uid integer, in _reader_gid integer, in _callback varchar, in _app_env any, in mode varchar, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -8899,7 +8113,7 @@ static const char *proc216 =
 "}\n"
 "--src phrasematch.sql:312\n";
 
-static const char *proc217 = 
+static const char *proc177 = 
 "#line 335 \"[executable]/phrasematch.sql\"\n"
 "create function ANN_PHRASE_CLASS_ADD_INT (in _id integer, in _name varchar, in _owner_uid integer, in _reader_gid integer, in _callback varchar, in _app_env any)\n"
 "{\n"
@@ -8909,7 +8123,7 @@ static const char *proc217 =
 "}\n"
 "--src phrasematch.sql:333\n";
 
-static const char *proc218 = 
+static const char *proc178 = 
 "#line 344 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_PHRASE_CLASS_DEL (in _name varchar, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -8932,7 +8146,7 @@ static const char *proc218 =
 "}\n"
 "--src phrasematch.sql:342\n";
 
-static const char *proc219 = 
+static const char *proc179 = 
 "#line 366 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_PHRASE_SET_ADD (in _name varchar, in _owner_uid integer, in _reader_gid integer, in _apc_name varchar, in _lang_name varchar, in _app_env any, in _size integer, in _load_at_boot integer, in mode varchar, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -8962,7 +8176,7 @@ static const char *proc219 =
 "}\n"
 "--src phrasematch.sql:364\n";
 
-static const char *proc220 = 
+static const char *proc180 = 
 "#line 394 \"[executable]/phrasematch.sql\"\n"
 "create function ANN_PHRASE_SET_ADD_INT (in _id integer, in _name varchar, in _owner_uid integer, in _reader_gid integer, in _apc_id integer, in _lang_name varchar, in _app_env any, in _size integer, in _load_at_boot integer)\n"
 "{\n"
@@ -8972,7 +8186,7 @@ static const char *proc220 =
 "}\n"
 "--src phrasematch.sql:392\n";
 
-static const char *proc221 = 
+static const char *proc181 = 
 "#line 403 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_PHRASE_SET_DEL (in _name varchar, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -8996,7 +8210,7 @@ static const char *proc221 =
 "}\n"
 "--src phrasematch.sql:401\n";
 
-static const char *proc222 = 
+static const char *proc182 = 
 "#line 426 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_LINK_ADD (in _owner_uid integer, in _uri varchar, in _text varchar, in _note varchar, in _tags any, in _callback varchar, in _app_env any) returns integer\n"
 "{\n"
@@ -9008,7 +8222,7 @@ static const char *proc222 =
 "}\n"
 "--src phrasematch.sql:424\n";
 
-static const char *proc223 = 
+static const char *proc183 = 
 "#line 437 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_LINK_MODIFY (in _id integer, in _owner_uid integer, in _uri varchar, in _text varchar, in _note varchar, in _tags any, in _callback varchar, in _app_env any, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -9024,7 +8238,7 @@ static const char *proc223 =
 "}\n"
 "--src phrasematch.sql:435\n";
 
-static const char *proc224 = 
+static const char *proc184 = 
 "#line 452 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_LINK_DEL (in _id integer, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -9048,7 +8262,7 @@ static const char *proc224 =
 "}\n"
 "--src phrasematch.sql:450\n";
 
-static const char *proc225 = 
+static const char *proc185 = 
 "#line 475 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_AD_RULE_ADD (in aaa_name varchar, in aps_name varchar, in _text varchar, in _al_id integer, in _app_env any, in _lang_name varchar, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -9098,7 +8312,7 @@ static const char *proc225 =
 "}\n"
 "--src phrasematch.sql:473\n";
 
-static const char *proc226 = 
+static const char *proc186 = 
 "#line 524 \"[executable]/phrasematch.sql\"\n"
 " create function ANN_AD_RULE_DEL (in aaa_name varchar, in aps_name varchar, in _text varchar, in _al_id integer, in _lang_name varchar, in auth_uname varchar, in auth_pwd varchar) returns integer\n"
 "{\n"
@@ -9181,7 +8395,7 @@ static const char *proc226 =
 "}\n"
 "--src phrasematch.sql:522\n";
 
-static const char *proc227 = 
+static const char *proc187 = 
 "#line 605 \"[executable]/phrasematch.sql\"\n"
 "create procedure DB.DBA.ANN_ZAP ()\n"
 "{\n"
@@ -9210,11 +8424,11 @@ static const char *proc227 =
 "}\n"
 "--src phrasematch.sql:603\n";
 
-static const char *other165 = 
+static const char *other134 = 
 "AP_EXEC_NO_ERROR (\'DB.DBA.ANN_BOOT()\')\n";
 /* hosting.sql */
 
-static const char *proc228 = 
+static const char *proc188 = 
 "#line 23 \"[executable]/hosting.sql\"\n"
 "create procedure WS.WS.GET_CGI_VARS_VECTOR (inout lines any) returns ANY\n"
 "{\n"
@@ -9287,23 +8501,25 @@ static const char *proc228 =
 "--src hosting.sql:21\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -9654,90 +8870,16 @@ sqls_define (void)
   DEFINE_PROC ("sql_tables_pre_excel_drv", proc167);
   DEFINE_PROC ("sql_normalize_qon_viaserv_opl", proc168);
 
-  /* useraggr.sql */
- 
-  DEFINE_PUBLIC_PROC ("STD_COUNT", proc169); 
-  DEFINE_PUBLIC_PROC ("STD11_INIT", proc170); 
-  DEFINE_PUBLIC_PROC ("STD12_INIT", proc171); 
-  DEFINE_PUBLIC_PROC ("STD13_INIT", proc172); 
-  DEFINE_PUBLIC_PROC ("VAR_ACC", proc173); 
-  DEFINE_PUBLIC_PROC ("VAR_POP_FIN", proc174); 
-  DEFINE_PUBLIC_PROC ("VAR_SAMP_FIN", proc175); 
-  DEFINE_PUBLIC_PROC ("VAR_FIN", proc176); 
-  DEFINE_PUBLIC_PROC ("STDDEV_POP_FIN", proc177); 
-  DEFINE_PUBLIC_PROC ("STDDEV_SAMP_FIN", proc178); 
-  DEFINE_PUBLIC_PROC ("STDDEV_FIN", proc179); 
-  DEFINE_PUBLIC_PROC ("COVAR_ACC", proc180); 
-  DEFINE_PUBLIC_PROC ("COVAR_SAMP_FIN", proc181); 
-  DEFINE_PUBLIC_PROC ("COVAR_POP_FIN", proc182); 
-  DEFINE_PUBLIC_PROC ("COVAR_FIN", proc183);
-  ddl_ensure_table ("do this always", other133);
-  ddl_ensure_table ("do this always", other134);
-  ddl_ensure_table ("do this always", other135);
-  ddl_ensure_table ("do this always", other136);
-  ddl_ensure_table ("do this always", other137);
-  ddl_ensure_table ("do this always", other138);
-  ddl_ensure_table ("do this always", other139);
-  ddl_ensure_table ("do this always", other140);
-  ddl_ensure_table ("do this always", other141); 
-  DEFINE_PUBLIC_PROC ("REGR_SLOPE_INIT", proc184); 
-  DEFINE_PUBLIC_PROC ("REGR_SLOPE_ACC", proc185); 
-  DEFINE_PUBLIC_PROC ("REGR_SLOPE_FIN", proc186);
-  ddl_ensure_table ("do this always", other142); 
-  DEFINE_PUBLIC_PROC ("REGR_INTERCEPT_INIT", proc187); 
-  DEFINE_PUBLIC_PROC ("REGR_INTERCEPT_ACC", proc188); 
-  DEFINE_PUBLIC_PROC ("REGR_INTERCEPT_FIN", proc189);
-  ddl_ensure_table ("do this always", other143); 
-  DEFINE_PUBLIC_PROC ("REGR_COUNT_INIT", proc190); 
-  DEFINE_PUBLIC_PROC ("REGR_COUNT_ACC", proc191); 
-  DEFINE_PUBLIC_PROC ("REGR_COUNT_FIN", proc192); 
-  DEFINE_PUBLIC_PROC ("REGR_COUNT_MERGE", proc193);
-  ddl_ensure_table ("do this always", other144); 
-  DEFINE_PUBLIC_PROC ("REGR_AVG_ACC", proc194); 
-  DEFINE_PUBLIC_PROC ("REGR_AVGX_FIN", proc195); 
-  DEFINE_PUBLIC_PROC ("REGR_AVGY_FIN", proc196);
-  ddl_ensure_table ("do this always", other145);
-  ddl_ensure_table ("do this always", other146); 
-  DEFINE_PUBLIC_PROC ("CORR_INIT", proc197); 
-  DEFINE_PUBLIC_PROC ("CORR_ACC", proc198); 
-  DEFINE_PUBLIC_PROC ("CORR_FIN", proc199);
-  ddl_ensure_table ("do this always", other147); 
-  DEFINE_PUBLIC_PROC ("REGR_R2_INIT", proc200); 
-  DEFINE_PUBLIC_PROC ("REGR_R2_ACC", proc201); 
-  DEFINE_PUBLIC_PROC ("REGR_R2_FIN", proc202);
-  ddl_ensure_table ("do this always", other148); 
-  DEFINE_PUBLIC_PROC ("REGR_SXX_ACC", proc203); 
-  DEFINE_PUBLIC_PROC ("REGR_SYY_ACC", proc204); 
-  DEFINE_PUBLIC_PROC ("REGR_SXY_ACC", proc205); 
-  DEFINE_PUBLIC_PROC ("REGR_S___FIN", proc206); 
-  DEFINE_PUBLIC_PROC ("REGR_SXY_FIN", proc207);
-  ddl_ensure_table ("do this always", other149);
-  ddl_ensure_table ("do this always", other150);
-  ddl_ensure_table ("do this always", other151); 
-  DEFINE_PUBLIC_PROC ("xte_nodebld_final_root", proc208);
-  ddl_ensure_table ("do this always", other152);
-  ddl_ensure_table ("do this always", other153);
-  ddl_ensure_table ("do this always", other154);
-  ddl_ensure_table ("do this always", other155);
-  ddl_ensure_table ("do this always", other156);
-  ddl_ensure_table ("do this always", other157);
-  ddl_ensure_table ("do this always", other158);
-  ddl_ensure_table ("do this always", other159);
-  ddl_ensure_table ("do this always", other160);
-  ddl_ensure_table ("do this always", other161);
-  ddl_ensure_table ("do this always", other162);
-  ddl_ensure_table ("do this always", other163);
-
   /* vt_text.sql */
 
-  DEFINE_PROC ("DB.DBA.execstmt", proc209);
-  DEFINE_PROC ("DB.DBA.vt_create_ftt", proc210);
-  DEFINE_PROC ("DB.DBA.vt_drop_ftt", proc211);
-  ddl_ensure_table ("do this always", other164);
+  DEFINE_PROC ("DB.DBA.execstmt", proc169);
+  DEFINE_PROC ("DB.DBA.vt_create_ftt", proc170);
+  DEFINE_PROC ("DB.DBA.vt_drop_ftt", proc171);
+  ddl_ensure_table ("do this always", other133);
 
   /* phrasematch.sql */
 
-  DEFINE_PROC ("AP_EXEC_NO_ERROR", proc212);
+  DEFINE_PROC ("AP_EXEC_NO_ERROR", proc172);
   ddl_ensure_table ("DB.DBA.SYS_ANN_PHRASE_CLASS", tbl7);
   ddl_ensure_table ("DB.DBA.SYS_ANN_PHRASE_SET", tbl8);
   ddl_ensure_table ("DB.DBA.SYS_ANN_PHRASE", tbl9);
@@ -9750,26 +8892,26 @@ sqls_define (void)
   ddl_std_proc (trig3, 0x0);
   ddl_std_proc (trig4, 0x0);
   ddl_std_proc (trig5, 0x0);
-  DEFINE_PROC ("DB.DBA.ANN_BOOT", proc213);
-  DEFINE_PROC ("ANN_AUTHENTICATE", proc214);
-  DEFINE_PROC ("ANN_GETID", proc215); 
-  DEFINE_PUBLIC_PROC ("ANN_PHRASE_CLASS_ADD", proc216);
-  DEFINE_PROC ("ANN_PHRASE_CLASS_ADD_INT", proc217); 
-  DEFINE_PUBLIC_PROC ("ANN_PHRASE_CLASS_DEL", proc218); 
-  DEFINE_PUBLIC_PROC ("ANN_PHRASE_SET_ADD", proc219);
-  DEFINE_PROC ("ANN_PHRASE_SET_ADD_INT", proc220); 
-  DEFINE_PUBLIC_PROC ("ANN_PHRASE_SET_DEL", proc221); 
-  DEFINE_PUBLIC_PROC ("ANN_LINK_ADD", proc222); 
-  DEFINE_PUBLIC_PROC ("ANN_LINK_MODIFY", proc223); 
-  DEFINE_PUBLIC_PROC ("ANN_LINK_DEL", proc224); 
-  DEFINE_PUBLIC_PROC ("ANN_AD_RULE_ADD", proc225); 
-  DEFINE_PUBLIC_PROC ("ANN_AD_RULE_DEL", proc226);
-  DEFINE_PROC ("DB.DBA.ANN_ZAP", proc227);
-  ddl_ensure_table ("do this always", other165);
+  DEFINE_PROC ("DB.DBA.ANN_BOOT", proc173);
+  DEFINE_PROC ("ANN_AUTHENTICATE", proc174);
+  DEFINE_PROC ("ANN_GETID", proc175); 
+  DEFINE_PUBLIC_PROC ("ANN_PHRASE_CLASS_ADD", proc176);
+  DEFINE_PROC ("ANN_PHRASE_CLASS_ADD_INT", proc177); 
+  DEFINE_PUBLIC_PROC ("ANN_PHRASE_CLASS_DEL", proc178); 
+  DEFINE_PUBLIC_PROC ("ANN_PHRASE_SET_ADD", proc179);
+  DEFINE_PROC ("ANN_PHRASE_SET_ADD_INT", proc180); 
+  DEFINE_PUBLIC_PROC ("ANN_PHRASE_SET_DEL", proc181); 
+  DEFINE_PUBLIC_PROC ("ANN_LINK_ADD", proc182); 
+  DEFINE_PUBLIC_PROC ("ANN_LINK_MODIFY", proc183); 
+  DEFINE_PUBLIC_PROC ("ANN_LINK_DEL", proc184); 
+  DEFINE_PUBLIC_PROC ("ANN_AD_RULE_ADD", proc185); 
+  DEFINE_PUBLIC_PROC ("ANN_AD_RULE_DEL", proc186);
+  DEFINE_PROC ("DB.DBA.ANN_ZAP", proc187);
+  ddl_ensure_table ("do this always", other134);
 
   /* hosting.sql */
 
-  DEFINE_PROC ("WS.WS.GET_CGI_VARS_VECTOR", proc228);
+  DEFINE_PROC ("WS.WS.GET_CGI_VARS_VECTOR", proc188);
 }
 
 
diff --git a/libsrc/Wi/sql_code_1.c b/libsrc/Wi/sql_code_1.c
index ffe440d..502cdcf 100644
--- a/libsrc/Wi/sql_code_1.c
+++ b/libsrc/Wi/sql_code_1.c
@@ -1125,23 +1125,25 @@ static const char *view12 =
 static const char *other23 = 
 "grant select on INFORMATION_SCHEMA.VIEWS to public\n";
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_2pc.c b/libsrc/Wi/sql_code_2pc.c
index 23559c8..0adfb11 100644
--- a/libsrc/Wi/sql_code_2pc.c
+++ b/libsrc/Wi/sql_code_2pc.c
@@ -186,23 +186,25 @@ static const char *other3 =
 static const char *other4 = 
 "grant execute on \"DB.DBA.XA_GET_ALL_XIDS\" to public\n";
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_adm.c b/libsrc/Wi/sql_code_adm.c
index 60e559d..76bc373 100644
--- a/libsrc/Wi/sql_code_adm.c
+++ b/libsrc/Wi/sql_code_adm.c
@@ -4237,7 +4237,7 @@ static const char *proc105 =
 "http(\'<TR><TD CLASS=\"CopyrightBorder\" COLSPAN=\"2\"><IMG SRC=\"/admin/images/1x1.gif\" WIDTH=\"1\" HEIGHT=\"2\" ALT=\"\"></TD></TR>\');\n"
 "http(\'<TR><TD ALIGN=\"right\" COLSPAN=\"2\"><P CLASS=\"Copyright\">Virtuoso Universal Server \');\n"
 "http(sys_stat(\'st_dbms_ver\'));\n"
-"http(\' - Copyright© 1998-2011 OpenLink Software.</P></TD></TR>\');\n"
+"http(\' - Copyright© 1998-2012 OpenLink Software.</P></TD></TR>\');\n"
 "http(\'</TABLE>\\n</BODY>\');\n"
 "}\n"
 "--src admin.sql:4275\n";
@@ -5933,23 +5933,25 @@ static const char *proc151 =
 "--src admin_dav_browser.sql:474\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_auto.c b/libsrc/Wi/sql_code_auto.c
index c912805..c406c90 100644
--- a/libsrc/Wi/sql_code_auto.c
+++ b/libsrc/Wi/sql_code_auto.c
@@ -80,23 +80,25 @@ static const char *other1 =
 static const char *other2 = 
 " ddl_autoexec (\'\')\n";
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_blog.c b/libsrc/Wi/sql_code_blog.c
index 45c0677..3eaf7ea 100644
--- a/libsrc/Wi/sql_code_blog.c
+++ b/libsrc/Wi/sql_code_blog.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sql_code_blog.c,v 1.1.1.1.2.1 2009/04/18 21:55:15 source Exp $
+ *  $Id: sql_code_blog.c,v 1.1.1.1.2.2 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sql_code_cache_impl.c b/libsrc/Wi/sql_code_cache_impl.c
index 5f271a8..173b0ff 100644
--- a/libsrc/Wi/sql_code_cache_impl.c
+++ b/libsrc/Wi/sql_code_cache_impl.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: sql_code_cache_impl.c,v 1.3.2.1 2009/04/18 21:55:15 source Exp $
+ *  $Id: sql_code_cache_impl.c,v 1.3.2.2 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sql_code_dav.c b/libsrc/Wi/sql_code_dav.c
index be43f44..f3a5597 100644
--- a/libsrc/Wi/sql_code_dav.c
+++ b/libsrc/Wi/sql_code_dav.c
@@ -10,21 +10,75 @@ static const char *proc0 =
 "#line 26 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.\"OPTIONS\" (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
-"declare headers, ctype any;\n"
+"declare full_path varchar;\n"
+"declare path_id any;\n"
+"full_path := \'/\' || DAV_CONCAT_PATH (path, \'/\');\n"
+"path_id := DAV_SEARCH_ID (full_path, \'C\');\n"
+"if (isarray(path_id) = 1)\n"
+"{\n"
+"if (path_id[0] = UNAME\'CalDAV\')\n"
+"{\n"
+"http_header (concat (\n"
+"\'Content-Type: text/xml\\r\\n\',\n"
+"\'Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE\\r\\n\',\n"
+"\'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\\r\\n\',\n"
+"\'DAV: 1, 2, access-control, calendar-access\\r\\n\',\n"
+"\'MS-Author-Via: DAV\\r\\n\'));\n"
+"return;\n"
+"}\n"
+"if (path_id[0] = UNAME\'CardDAV\')\n"
+"{\n"
+"http_header (concat (\n"
+"\'Content-Type: text/xml\\r\\n\',\n"
+"\'Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE\\r\\n\',\n"
+"\'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\\r\\n\',\n"
+"\'DAV: 1, 2, 3, access-control, addressbook\\r\\n\',\n"
+"\'MS-Author-Via: DAV\\r\\n\'));\n"
+"return;\n"
+"}\n"
+"}\n"
+"else\n"
+"{\n"
+"declare is_det int;\n"
+"is_det := (select COL_ID from WS.WS.SYS_DAV_COL where COL_ID = path_id and COL_DET = \'CalDAV\');\n"
+"if (is_det > 0)\n"
+"{\n"
+"http_header (concat (\n"
+"\'Content-Type: text/xml\\r\\n\',\n"
+"\'Allow: OPTIONS, GET, HEAD, POST, TRACE\\r\\n\',\n"
+"\'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\\r\\n\',\n"
+"\'DAV: 1, 2, access-control, calendar-access\\r\\n\',\n"
+"\'MS-Author-Via: DAV\\r\\n\'));\n"
+"return;\n"
+"}\n"
+"is_det := (select COL_ID from WS.WS.SYS_DAV_COL where COL_ID = path_id and COL_DET = \'CardDAV\');\n"
+"if (is_det > 0)\n"
+"{\n"
+"http_header (concat (\n"
+"\'Content-Type: text/xml\\r\\n\',\n"
+"\'Allow: OPTIONS, GET, HEAD, POST, TRACE\\r\\n\',\n"
+"\'Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL\\r\\n\',\n"
+"\'DAV: 1, 2, 3, access-control, addressbook\\r\\n\',\n"
+"\'MS-Author-Via: DAV\\r\\n\'));\n"
+"return;\n"
+"}\n"
+"}\n"
+"declare headers, ctype, msauthor any;\n"
 "http_methods_set (\'OPTIONS\', \'GET\', \'HEAD\', \'POST\', \'PUT\', \'DELETE\', \'TRACE\', \'PROPFIND\', \'PROPPATCH\', \'COPY\', \'MOVE\', \'LOCK\', \'UNLOCK\');\n"
 "WS.WS.GET (path, params, lines);\n"
 "headers := http_header_array_get ();\n"
 "ctype := http_request_header (headers, \'Content-Type\', null, \'text/plain\');\n"
+"msauthor := http_request_header (headers, \'MS-Author-Via\', null, \'DAV\');\n"
 "http_status_set (200);\n"
 "http_rewrite ();\n"
 "http_header (concat (sprintf (\'Content-Type: %s\\r\\n\', ctype),\n"
 "\'DAV: 1,2,<http://www.openlinksw.com/virtuoso/webdav/1.0>\\r\\n\',\n"
-"\'MS-Author-Via: DAV\\r\\n\'));\n"
+"sprintf (\'MS-Author-Via: %s\\r\\n\', msauthor)));\n"
 "}\n"
 "--src dav.sql:24\n";
 
 static const char *proc1 = 
-"#line 41 \"[executable]/dav.sql\"\n"
+"#line 95 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PROPFIND (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare _mod_time datetime;\n"
@@ -37,16 +91,13 @@ static const char *proc1 =
 "declare id any;\n"
 "declare _u_id, _g_id, rc integer;\n"
 "\n"
+"\n"
 "_ses := aref_set_0 (params, 1);\n"
 "_body := string_output_string (_ses);\n"
-"\n"
 "_lpath := http_path ();\n"
 "_ppath := http_physical_path ();\n"
 "if (_lpath = \'\')\n"
 "_lpath := \'/\';\n"
-"\n"
-"\n"
-"\n"
 "id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(\'\'), path, vector(\'\')), \'C\'));\n"
 "if (id is not null)\n"
 "st := \'C\';\n"
@@ -71,7 +122,6 @@ static const char *proc1 =
 "{\n"
 "rc := DAV_AUTHENTICATE_HTTP (DAV_GET_PARENT (id, st, _ppath), \'C\', \'1__\', 1, lines, uname, upwd, _u_id, _g_id, _perms);\n"
 "}\n"
-"\n"
 "if (rc < 0)\n"
 "{\n"
 "if ((rc = -12) or (rc = -13))\n"
@@ -117,6 +167,17 @@ static const char *proc1 =
 "\n"
 "\n"
 "http_request_status (\'HTTP/1.1 207 Multi-Status\');\n"
+"declare full_path varchar;\n"
+"declare path_id any;\n"
+"full_path := \'/\' || DAV_CONCAT_PATH (path, \'/\');\n"
+"path_id := DAV_SEARCH_ID (full_path, \'C\');\n"
+"if (isarray(path_id) = 1)\n"
+"{\n"
+"if (path_id[0] = UNAME\'CalDAV\')\n"
+"http_header (\'DAV: 1, calendar-access, calendar-schedule, calendar-proxy\\r\\nContent-type: application/xml; charset=\"utf-8\"\\r\\n\');\n"
+"if (path_id[0] = UNAME\'CardDAV\')\n"
+"http_header (\'DAV: 1, addressbook\\r\\nContent-type: application/xml; charset=\"utf-8\"\\r\\n\');\n"
+"}\n"
 "http_header (\'Content-type: text/xml; charset=\"utf-8\"\\r\\n\');\n"
 "http (\'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\');\n"
 "http (\'<D:multistatus xmlns:D=\"DAV:\" xmlns:M=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">\\n\');\n"
@@ -131,10 +192,10 @@ static const char *proc1 =
 "}\n"
 "http (\'</D:multistatus>\\n\');\n"
 "}\n"
-"--src dav.sql:39\n";
+"--src dav.sql:93\n";
 
 static const char *proc2 = 
-"#line 152 \"[executable]/dav.sql\"\n"
+"#line 213 \"[executable]/dav.sql\"\n"
 "create function WS.WS.PROPFIND_RESPONSE (in lpath varchar,\n"
 "in ppath varchar,\n"
 "in depth integer,\n"
@@ -243,10 +304,10 @@ static const char *proc2 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:150\n";
+"--src dav.sql:211\n";
 
 static const char *proc3 = 
-"#line 263 \"[executable]/dav.sql\"\n"
+"#line 324 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PROPFIND_RESPONSE_FORMAT (in lpath varchar,\n"
 "in dirlist any,\n"
 "in append_name_to_href integer,\n"
@@ -310,11 +371,10 @@ static const char *proc3 =
 "crt := now ();\n"
 "if (__tag (modt) <> 211)\n"
 "modt := now ();\n"
-"\n"
 "href := case append_name_to_href when 0 then lpath else DAV_CONCAT_PATH (lpath, name) end;\n"
-"if (st = \'C\' and href not like \'%/\')\n"
+"if (st = \'C\' and href not like \'%/\' and href not like \'%.ics\' and href not like \'%.vcf\')\n"
 "href := href || \'/\';\n"
-"http (\'<D:response xmlns:lp0=\"DAV:\" xmlns:i0=\"DAV:\" xmlns:V=\"http://www.openlinksw.com/virtuoso/webdav/1.0/\">\\n\');\n"
+"http (\'<D:response xmlns:D=\"DAV:\" xmlns:lp0=\"DAV:\" xmlns:i0=\"DAV:\" xmlns:V=\"http://www.openlinksw.com/virtuoso/webdav/1.0/\">\\n\');\n"
 "http (\'<D:href>\');\n"
 "http_dav_url (\n"
 "charset_recode (\n"
@@ -351,7 +411,7 @@ static const char *proc3 =
 "}\n"
 "else if (prop = \':getcontenttype\')\n"
 "{\n"
-"http (concat(\'<D:getcontenttype>\', mime_type, \'</D:getcontenttype>\\n\'));\n"
+"http (concat(\'<lp0:getcontenttype>\', mime_type, \'</lp0:getcontenttype>\\n\'));\n"
 "found_sprop := 1;\n"
 "}\n"
 "else if (prop = \':getcontentlength\' and st = \'R\')\n"
@@ -359,10 +419,131 @@ static const char *proc3 =
 "http (concat (\'<lp0:getcontentlength>\', cast (res_len as varchar), \'</lp0:getcontentlength>\\n\'));\n"
 "found_sprop := 1;\n"
 "}\n"
+"else if (prop = \'urn:ietf:params:xml:ns:caldav:supported-calendar-component-set\')\n"
+"{\n"
+"http (\'<C:supported-calendar-component-set xmlns:C=\"urn:ietf:params:xml:ns:caldav\"><C:comp name=\"VEVENT\"/><C:comp name=\"VTODO\"/></C:supported-calendar-component-set>\\r\\n\');\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \'urn:ietf:params:xml:ns:carddav:supported-address-data\')\n"
+"{\n"
+"http (\'<A:supported-address-data xmlns:A=\"urn:ietf:params:xml:ns:carddav\"><C:address-data-type content-type=\"text/vcard\" version=\"3.0\"/></A:supported-address-data>\\r\\n\');\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \':getetag\' and st = \'C\')\n"
+"{\n"
+"http (concat(\'<lp0:getetag>\"\', WS.WS.ETAG (name, parent_col), \'\"</lp0:getetag>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \'http://calendarserver.org/ns/:getctag\')\n"
+"{\n"
+"http (concat(\'<CS:getctag xmlns:CS=\"http://calendarserver.org/ns/\">\', WS.WS.ETAG (name, parent_col), \'</CS:getctag>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \'urn:ietf:params:xml:ns:caldav:calendar-data\')\n"
+"{\n"
+"declare content, type_ any;\n"
+"DB.DBA.DAV_RES_CONTENT_INT (DAV_SEARCH_ID (lpath, \'R\'), content, type_, 0, 0);\n"
+"http (concat(\'<C:calendar-data xmlns:C=\"urn:ietf:params:xml:ns:caldav\">\', content, \'</C:calendar-data>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \'urn:ietf:params:xml:ns:carddav:address-data\')\n"
+"{\n"
+"declare content, type_ any;\n"
+"DB.DBA.DAV_RES_CONTENT_INT (DAV_SEARCH_ID (lpath, \'R\'), content, type_, 0, 0);\n"
+"http (concat(\'<A:address-data xmlns:A=\"urn:ietf:params:xml:ns:carddav\">\', content, \'</A:address-data>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \'urn:ietf:params:xml:ns:caldav:calendar-home-set\')\n"
+"{\n"
+"http (concat(\'<C:calendar-home-set xmlns:C=\"urn:ietf:params:xml:ns:caldav\"><D:href>\', lpath, \'</D:href></C:calendar-home-set>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \'urn:ietf:params:xml:ns:carddav:addressbook-home-set\')\n"
+"{\n"
+"http (concat(\'<C:addressbook-home-set xmlns:C=\"urn:ietf:params:xml:ns:carddav\"><D:href>\', lpath, \'</D:href></C:addressbook-home-set>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \':principal-URL\')\n"
+"{\n"
+"http (concat(\'<D:principal-URL><D:href>\', lpath, \'</D:href></D:principal-URL>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (prop = \':current-user-privilege-set\')\n"
+"{\n"
+"if (mime_type = \'text/vcard\' or mime_type = \'text/calendar\')\n"
+"{\n"
+"http (\'<D:current-user-privilege-set><D:privilege><D:all/></D:privilege></D:current-user-privilege-set>\');\n"
+"found_sprop := 1;\n"
+"}\n"
+"}\n"
+"else if (prop = \':supported-report-set\')\n"
+"{\n"
+"if (mime_type = \'text/vcard\')\n"
+"{\n"
+"http (concat(\'<D:supported-report-set>\', \'<D:supported-report>\n"
+"<D:report>\n"
+"<C:addressbook-query xmlns:C=\"urn:ietf:params:xml:ns:carddav\"/>\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<C:addressbook-multiget xmlns:C=\"urn:ietf:params:xml:ns:carddav\"/>\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<D:expand-property />\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<D:principal-property-search />\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<D:principal-search-property-set />\n"
+"</D:report>\n"
+"</D:supported-report>\', \'</D:supported-report-set>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"else if (mime_type = \'text/calendar\')\n"
+"{\n"
+"http (concat(\'<D:supported-report-set>\', \'<D:supported-report>\n"
+"<D:report>\n"
+"<C:calendar-multiget xmlns:C=\"urn:ietf:params:xml:ns:caldav\"/>\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<C:calendar-query xmlns:C=\"urn:ietf:params:xml:ns:caldav\"/>\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<D:principal-match/>\n"
+"</D:report>\n"
+"</D:supported-report>\n"
+"<D:supported-report>\n"
+"<D:report>\n"
+"<C:free-busy-query xmlns:C=\"urn:ietf:params:xml:ns:caldav\"/>\n"
+"</D:report>\n"
+"</D:supported-report>\', \'</D:supported-report-set>\\n\'));\n"
+"found_sprop := 1;\n"
+"}\n"
+"found_sprop := 1;\n"
+"}\n"
 "else if (prop = \':resourcetype\')\n"
 "{\n"
 "if (st = \'C\')\n"
+"{\n"
+"if (mime_type = \'text/vcard\')\n"
+"http (\'<D:resourcetype><D:collection/><C:addressbook xmlns:C=\"urn:ietf:params:xml:ns:carddav\" /></D:resourcetype>\\n\');\n"
+"else if (mime_type = \'text/calendar\')\n"
+"http (\'<D:resourcetype><D:collection/><C:calendar xmlns:C=\"urn:ietf:params:xml:ns:caldav\" /></D:resourcetype>\\n\');\n"
+"else\n"
 "http (\'<D:resourcetype><D:collection/></D:resourcetype>\\n\');\n"
+"}\n"
 "else\n"
 "http (\'<D:resourcetype/>\\n\');\n"
 "found_sprop := 1;\n"
@@ -550,10 +731,10 @@ static const char *proc3 =
 "goto next_response;\n"
 "\n"
 "}\n"
-"--src dav.sql:261\n";
+"--src dav.sql:322\n";
 
 static const char *proc4 = 
-"#line 568 \"[executable]/dav.sql\"\n"
+"#line 749 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PROPNAMES (in _body varchar)\n"
 "{\n"
 "declare prop, propname, allprop, tree, tmp, ret any;\n"
@@ -601,10 +782,316 @@ static const char *proc4 =
 "\n"
 "return ret;\n"
 "}\n"
-"--src dav.sql:566\n";
+"--src dav.sql:747\n";
 
 static const char *proc5 = 
-"#line 617 \"[executable]/dav.sql\"\n"
+"#line 798 \"[executable]/dav.sql\"\n"
+"create procedure WS.WS.CALENDAR_NAMES (in _body varchar)\n"
+"{\n"
+"declare prop, propname, allprop, tree, tmp, ret any;\n"
+"declare ix, len, sc integer;\n"
+"declare name varchar;\n"
+"if (not isstring(_body) or _body = \'\')\n"
+"return null;\n"
+"prop := string_output ();\n"
+"propname := string_output ();\n"
+"allprop := string_output ();\n"
+"tree := xml_tree_doc (xml_expand_refs (xml_tree (_body)));\n"
+"http_value (xpath_eval (\'//calendar-multiget/prop\', tree , 1), null, prop);\n"
+"http_value (xpath_eval (\'//calendar-multiget/propname\', tree , 1), null, propname);\n"
+"http_value (xpath_eval (\'//calendar-multiget/allprop\', tree , 1), null, allprop);\n"
+"prop := string_output_string (prop);\n"
+"propname := string_output_string (propname);\n"
+"allprop := string_output_string (allprop);\n"
+"ret := null;\n"
+"if (allprop <> \'\')\n"
+"return vector (\'allprop\');\n"
+"else if (propname <> \'\')\n"
+"return vector (\'propname\');\n"
+"else if (prop <> \'\')\n"
+"{\n"
+"declare xp any;\n"
+"tree := xtree_doc (prop);\n"
+"xp := xpath_eval(\'/prop/*\', tree, 0);\n"
+"foreach (any elm in xp) do\n"
+"{\n"
+"name := cast (xpath_eval (\'name()\', elm) as varchar);\n"
+"sc := strrchr (name, \':\');\n"
+"if (sc is not null and (name like \'DAV::%\'\n"
+"or name like \'http://www.openlinksw.com/virtuoso/webdav/1.0/:%\'))\n"
+"name := subseq (name, sc, length (name));\n"
+"if (ret is null)\n"
+"ret := vector (name);\n"
+"else\n"
+"ret := vector_concat (ret, vector (name));\n"
+"}\n"
+"}\n"
+"return ret;\n"
+"}\n"
+"--src dav.sql:796\n";
+
+static const char *proc6 = 
+"#line 842 \"[executable]/dav.sql\"\n"
+"create procedure WS.WS.ADDRESSBOOK_NAMES (in _body varchar)\n"
+"{\n"
+"declare prop, propname, allprop, tree, tmp, ret any;\n"
+"declare ix, len, sc integer;\n"
+"declare name varchar;\n"
+"if (not isstring(_body) or _body = \'\')\n"
+"return null;\n"
+"prop := string_output ();\n"
+"propname := string_output ();\n"
+"allprop := string_output ();\n"
+"tree := xml_tree_doc (xml_expand_refs (xml_tree (_body)));\n"
+"http_value (xpath_eval (\'//addressbook-multiget/prop\', tree , 1), null, prop);\n"
+"http_value (xpath_eval (\'//addressbook-multiget/propname\', tree , 1), null, propname);\n"
+"http_value (xpath_eval (\'//addressbook-multiget/allprop\', tree , 1), null, allprop);\n"
+"prop := string_output_string (prop);\n"
+"propname := string_output_string (propname);\n"
+"allprop := string_output_string (allprop);\n"
+"ret := null;\n"
+"if (allprop <> \'\')\n"
+"return vector (\'allprop\');\n"
+"else if (propname <> \'\')\n"
+"return vector (\'propname\');\n"
+"else if (prop <> \'\')\n"
+"{\n"
+"declare xp any;\n"
+"tree := xtree_doc (prop);\n"
+"xp := xpath_eval(\'/prop/*\', tree, 0);\n"
+"foreach (any elm in xp) do\n"
+"{\n"
+"name := cast (xpath_eval (\'name()\', elm) as varchar);\n"
+"sc := strrchr (name, \':\');\n"
+"if (sc is not null and (name like \'DAV::%\'\n"
+"or name like \'http://www.openlinksw.com/virtuoso/webdav/1.0/:%\'))\n"
+"name := subseq (name, sc, length (name));\n"
+"if (ret is null)\n"
+"ret := vector (name);\n"
+"else\n"
+"ret := vector_concat (ret, vector (name));\n"
+"}\n"
+"}\n"
+"return ret;\n"
+"}\n"
+"--src dav.sql:840\n";
+
+static const char *proc7 = 
+"#line 887 \"[executable]/dav.sql\"\n"
+"create procedure WS.WS.REPORT (in path varchar, inout params varchar, in lines varchar)\n"
+"{\n"
+"declare _mod_time datetime;\n"
+"declare _cr_time datetime;\n"
+"declare _depth integer;\n"
+"declare st, _temp varchar;\n"
+"declare _ms_date integer;\n"
+"declare _lpath, _body, _ses, _props, _ppath, _perms varchar;\n"
+"declare uname, upwd varchar;\n"
+"declare id any;\n"
+"declare _u_id, _g_id, rc, is_calendar, is_addressbook integer;\n"
+"_ses := aref_set_0 (params, 1);\n"
+"_body := string_output_string (_ses);\n"
+"_lpath := http_path ();\n"
+"_ppath := http_physical_path ();\n"
+"is_calendar := 0;\n"
+"is_addressbook := 0;\n"
+"if (_lpath = \'\')\n"
+"_lpath := \'/\';\n"
+"id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(\'\'), path, vector(\'\')), \'C\'));\n"
+"if (id is not null)\n"
+"{\n"
+"if (isarray(id) = 1)\n"
+"{\n"
+"if (id[0] = UNAME\'CalDAV\')\n"
+"is_calendar := 1;\n"
+"if (id[0] = UNAME\'CardDAV\')\n"
+"is_addressbook := 1;\n"
+"}\n"
+"st := \'C\';\n"
+"}\n"
+"else\n"
+"{\n"
+"id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(\'\'), path), \'R\'));\n"
+"if (id is not null)\n"
+"st := \'R\';\n"
+"else\n"
+"{\n"
+"http_request_status (\'HTTP/1.1 404 Not Found\');\n"
+"return;\n"
+"}\n"
+"}\n"
+"_u_id := null;\n"
+"_g_id := null;\n"
+"if (st = \'C\')\n"
+"rc := DAV_AUTHENTICATE_HTTP (id, st, \'1__\', 1, lines, uname, upwd, _u_id, _g_id, _perms);\n"
+"else\n"
+"rc := DAV_AUTHENTICATE_HTTP (DAV_GET_PARENT (id, st, _ppath), \'C\', \'1__\', 1, lines, uname, upwd, _u_id, _g_id, _perms);\n"
+"if (rc < 0)\n"
+"{\n"
+"if ((rc = -12) or (rc = -13))\n"
+"{\n"
+"http_request_status (\'HTTP/1.1 403 Forbidden\');\n"
+"return;\n"
+"}\n"
+"return;\n"
+"}\n"
+"if (strstr (WS.WS.FINDPARAM (lines, \'User-Agent:\'), \'Microsoft\') is not null)\n"
+"_ms_date := 1;\n"
+"else\n"
+"_ms_date := 0;\n"
+"_temp := WS.WS.FINDPARAM (lines, \'Depth:\');\n"
+"if (_temp <> \'\' and _temp <> \'infinity\')\n"
+"_depth := atoi (_temp);\n"
+"else\n"
+"_depth := -1;\n"
+"{\n"
+"declare test_tree any;\n"
+"declare exit handler for sqlstate \'*\'\n"
+"{\n"
+"http_request_status (\'HTTP/1.1 400 Bad Request\');\n"
+"return;\n"
+"};\n"
+"if (length (_body) > 0)\n"
+"test_tree := xml_tree (_body);\n"
+"}\n"
+"if (st = \'C\' and aref (_lpath, length (_lpath) - 1) <> ascii (\'/\'))\n"
+"_lpath := concat (_lpath, \'/\');\n"
+"\n"
+"if (is_calendar = 1)\n"
+"_props := WS.WS.CALENDAR_NAMES (_body);\n"
+"else if (is_addressbook = 1)\n"
+"_props := WS.WS.ADDRESSBOOK_NAMES (_body);\n"
+"else\n"
+"_props := WS.WS.PROPNAMES (_body);\n"
+"if (isarray (_props) and length (_props) = 1 and (aref (_props, 0) = \'propname\'))\n"
+"{\n"
+"WS.WS.CUSTOM_PROP (_lpath, _props, _depth, st);\n"
+"return;\n"
+"}\n"
+"http_request_status (\'HTTP/1.1 207 Multi-Status\');\n"
+"if (is_calendar = 1)\n"
+"{\n"
+"declare urls any; \n"
+"urls := xpath_eval (\'[xmlns:D=\"DAV:\" xmlns=\"urn:ietf:params:xml:ns:caldav:\"] //calendar-multiget/D:href/text()\', xml_tree_doc (xml_expand_refs (xml_tree (_body))), 0);\n"
+"http_header (\'DAV: 1, calendar-access, calendar-schedule, calendar-proxy\\r\\nContent-type: application/xml; charset=\"utf-8\"\\r\\n\');\n"
+"http (\'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\');\n"
+"http (\'<D:multistatus xmlns:D=\"DAV:\" xmlns:M=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">\\n\');\n"
+"foreach (any prop in urls) do\n"
+"{\n"
+"if (-13 = WS.WS.REPORT_RESPONSE (cast(prop as varchar), _ppath, _depth, st, _ms_date, _props, _u_id))\n"
+"{\n"
+"_u_id := null;\n"
+"_g_id := null;\n"
+"\n"
+"http_rewrite ();\n"
+"WS.WS.GET_DAV_AUTH (lines, 0, 1, uname, upwd, _u_id, _g_id, _perms);\n"
+"return;\n"
+"}\n"
+"}\n"
+"http (\'</D:multistatus>\\n\');\n"
+"}\n"
+"else if (is_addressbook = 1)\n"
+"{\n"
+"declare urls any; \n"
+"urls := xpath_eval (\'[xmlns:D=\"DAV:\" xmlns=\"urn:ietf:params:xml:ns:carddav:\"] //addressbook-multiget/D:href/text()\', xml_tree_doc (xml_expand_refs (xml_tree (_body))), 0);\n"
+"http_header (\'DAV: 1, addressbook\\r\\nContent-type: application/xml; charset=\"utf-8\"\\r\\n\');\n"
+"http (\'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\');\n"
+"http (\'<D:multistatus xmlns:D=\"DAV:\" xmlns:M=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">\\n\');\n"
+"foreach (any prop in urls) do\n"
+"{\n"
+"if (-13 = WS.WS.REPORT_RESPONSE (cast(prop as varchar), _ppath, _depth, st, _ms_date, _props, _u_id))\n"
+"{\n"
+"_u_id := null;\n"
+"_g_id := null;\n"
+"\n"
+"http_rewrite ();\n"
+"WS.WS.GET_DAV_AUTH (lines, 0, 1, uname, upwd, _u_id, _g_id, _perms);\n"
+"return;\n"
+"}\n"
+"}\n"
+"http (\'</D:multistatus>\\n\');\n"
+"}\n"
+"else\n"
+"{\n"
+"http_header (\'Content-type: text/xml; charset=\"utf-8\"\\r\\n\');\n"
+"http (\'<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\');\n"
+"http (\'<D:multistatus xmlns:D=\"DAV:\" xmlns:M=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\">\\n\');\n"
+"if (-13 = WS.WS.PROPFIND_RESPONSE (_lpath, _ppath, _depth, st, _ms_date, _props, _u_id))\n"
+"{\n"
+"_u_id := null;\n"
+"_g_id := null;\n"
+"\n"
+"http_rewrite ();\n"
+"WS.WS.GET_DAV_AUTH (lines, 0, 1, uname, upwd, _u_id, _g_id, _perms);\n"
+"return;\n"
+"}\n"
+"http (\'</D:multistatus>\\n\');\n"
+"}\n"
+"}\n"
+"--src dav.sql:885\n";
+
+static const char *proc8 = 
+"#line 1042 \"[executable]/dav.sql\"\n"
+"create function WS.WS.REPORT_RESPONSE (\n"
+"in lpath varchar,\n"
+"in ppath varchar,\n"
+"in depth integer,\n"
+"in st char (1),\n"
+"in ms_date integer,\n"
+"in propnames any,\n"
+"in u_id integer) returns integer\n"
+"{\n"
+"declare all_prop, ppath_len integer;\n"
+"declare dirlist any;\n"
+"declare add_not_found, _this_col integer;\n"
+"all_prop := 0;\n"
+"add_not_found := 1;\n"
+"if (not isstring (lpath) or not isstring (ppath))\n"
+"return -28;\n"
+"if (st = \'C\' and aref (ppath, length (ppath) - 1) <> ascii (\'/\'))\n"
+"ppath := concat (ppath, \'/\');\n"
+"ppath_len := length (ppath);\n"
+"if (not isarray (propnames))\n"
+"{\n"
+"if (ms_date)\n"
+"{\n"
+"propnames := vector (\':getlastmodified\', \':creationdate\',\n"
+"\':lastaccessed\', \':getcontentlength\', \':resourcetype\', \':supportedlock\');\n"
+"add_not_found := 0;\n"
+"}\n"
+"else\n"
+"propnames := vector (\':getlastmodified\', \':getcontentlength\', \':resourcetype\');\n"
+"}\n"
+"else if (aref (propnames, 0) = \'allprop\')\n"
+"{\n"
+"propnames := vector (\':getlastmodified\', \':creationdate\', \':getetag\', \':getcontenttype\',\n"
+"\':getcontentlength\', \':resourcetype\', \':lockdiscovery\', \':supportedlock\');\n"
+"all_prop := 1;\n"
+"}\n"
+"dirlist := DAV_DIR_LIST_INT (ppath, -1, \'%\', null, null, u_id);\n"
+"if (isinteger (dirlist))\n"
+"{\n"
+"if (dirlist = -13)\n"
+"{\n"
+"if (u_id > 0)\n"
+"dirlist := vector ();\n"
+"else\n"
+"return dirlist;\n"
+"}\n"
+"else\n"
+"dirlist := vector ();\n"
+"}\n"
+"if (length (dirlist) = 0)\n"
+"{\n"
+"return -1;\n"
+"}\n"
+"WS.WS.PROPFIND_RESPONSE_FORMAT (lpath, dirlist, 0, ms_date, propnames, all_prop, add_not_found, 0, u_id);\n"
+"return 0;\n"
+"}\n"
+"--src dav.sql:1040\n";
+
+static const char *proc9 = 
+"#line 1100 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.CUSTOM_PROP (in lpath any, in prop any, in depth integer, in st char (1))\n"
 "{\n"
 "declare _name, _lmask, _prop, _ltype, _lscope, _lown, _ltoken, _tp, _pname varchar;\n"
@@ -676,21 +1163,31 @@ static const char *proc5 =
 "http (\'</D:response>\\n\');\n"
 "http (\'</D:multistatus>\\n\');\n"
 "}\n"
-"--src dav.sql:615\n";
+"--src dav.sql:1098\n";
 
-static const char *proc6 = 
-"#line 690 \"[executable]/dav.sql\"\n"
+static const char *proc10 = 
+"#line 1173 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PROPPATCH (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
-"declare _u_id, _g_id, _slen, _len, _ix, id, _pid, _ix1 integer;\n"
+"declare _u_id, _g_id, _slen, _len, _ix, id, _pid, _ix1, is_calendar, is_addressbook integer;\n"
 "declare uname, upwd, st, _perms, _body, _name varchar;\n"
 "declare _ses, _set, _del, _tmp, _val any;\n"
 "declare rc, acc, _proprc, xtree any;\n"
 "\n"
-"\n"
+"is_addressbook := 0;\n"
+"is_calendar := 0;\n"
 "id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(\'\'), path, vector(\'\')), \'C\'));\n"
 "if (id is not null)\n"
+"{\n"
+"if (isarray(id) = 1)\n"
+"{\n"
+"if (id[0] = UNAME\'CalDAV\')\n"
+"is_calendar := 1;\n"
+"if (id[0] = UNAME\'CardDAV\')\n"
+"is_addressbook := 1;\n"
+"}\n"
 "st := \'C\';\n"
+"}\n"
 "else\n"
 "{\n"
 "id := DAV_HIDE_ERROR (DAV_SEARCH_ID (vector_concat (vector(\'\'), path), \'R\'));\n"
@@ -763,8 +1260,12 @@ static const char *proc6 =
 "pn := concat (pns, \':\', pn);\n"
 "\n"
 "xte_nodebld_acc (acc, xte_node (xte_head (pn)));\n"
+"if (is_calendar or is_addressbook)\n"
+"{\n"
 "\n"
-"if (pns = \'http://www.openlinksw.com/virtuoso/webdav/1.0/\'\n"
+" ;\n"
+"}\n"
+"else if (pns = \'http://www.openlinksw.com/virtuoso/webdav/1.0/\'\n"
 "and _prop_name in (\'virtpermissions\', \'virtowneruid\', \'virtownergid\'))\n"
 "{\n"
 "declare tmp, tmp_id any;\n"
@@ -803,8 +1304,7 @@ static const char *proc6 =
 "update WS.WS.SYS_DAV_COL set COL_GROUP = tmp_id where COL_ID = id;\n"
 "}\n"
 "}\n"
-"else if (not exists (select 1 from WS.WS.SYS_DAV_PROP\n"
-"where PROP_NAME = pn and PROP_TYPE = st and PROP_PARENT_ID = id))\n"
+"else if (not exists (select 1 from WS.WS.SYS_DAV_PROP where PROP_NAME = pn and PROP_TYPE = st and PROP_PARENT_ID = id))\n"
 "{\n"
 "_pid := WS.WS.GETID (\'P\');\n"
 "insert into WS.WS.SYS_DAV_PROP (PROP_ID, PROP_NAME, PROP_TYPE, PROP_PARENT_ID, PROP_VALUE)\n"
@@ -854,10 +1354,10 @@ static const char *proc6 =
 "http_header (\'Content-Type: text/xml\\r\\n\');\n"
 "http (string_output_string (rc));\n"
 "}\n"
-"--src dav.sql:688\n";
+"--src dav.sql:1171\n";
 
-static const char *proc7 = 
-"#line 866 \"[executable]/dav.sql\"\n"
+static const char *proc11 = 
+"#line 1362 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.FINDPARAM (inout params varchar, in pkey varchar)\n"
 "{\n"
 "declare ret any;\n"
@@ -875,10 +1375,10 @@ static const char *proc7 =
 "}\n"
 "return \'\';\n"
 "}\n"
-"--src dav.sql:864\n";
+"--src dav.sql:1360\n";
 
-static const char *proc8 = 
-"#line 885 \"[executable]/dav.sql\"\n"
+static const char *proc12 = 
+"#line 1381 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.MKCOL (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare _parent_name varchar;\n"
@@ -938,10 +1438,10 @@ static const char *proc8 =
 "}\n"
 "http_request_status (\'HTTP/1.1 405 Method Not Allowed\');\n"
 "}\n"
-"--src dav.sql:883\n";
+"--src dav.sql:1379\n";
 
-static const char *proc9 = 
-"#line 947 \"[executable]/dav.sql\"\n"
+static const char *proc13 = 
+"#line 1443 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.FINDCOL (in path any, out col integer)\n"
 "{\n"
 "declare inx integer;\n"
@@ -963,10 +1463,10 @@ static const char *proc9 =
 "not_found:\n"
 "return inx;\n"
 "}\n"
-"--src dav.sql:945\n";
+"--src dav.sql:1441\n";
 
-static const char *proc10 = 
-"#line 971 \"[executable]/dav.sql\"\n"
+static const char *proc14 = 
+"#line 1467 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.FINDRES (in path varchar,out _col integer, out _name varchar)\n"
 "{\n"
 "declare depth integer;\n"
@@ -1002,10 +1502,10 @@ static const char *proc10 =
 "not_found:\n"
 "return rc;\n"
 "}\n"
-"--src dav.sql:969\n";
+"--src dav.sql:1465\n";
 
-static const char *proc11 = 
-"#line 1009 \"[executable]/dav.sql\"\n"
+static const char *proc15 = 
+"#line 1505 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.DELCHILDREN (in id integer, in lines varchar)\n"
 "{\n"
 "declare col, res, r_id, n_locks, rc integer;\n"
@@ -1085,10 +1585,10 @@ static const char *proc11 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:1007\n";
+"--src dav.sql:1503\n";
 
-static const char *proc12 = 
-"#line 1091 \"[executable]/dav.sql\"\n"
+static const char *proc16 = 
+"#line 1587 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.\"DELETE\" (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare depth,len integer;\n"
@@ -1151,10 +1651,10 @@ static const char *proc12 =
 "http_request_status (\'HTTP/1.1 500 Internal Server Error\');\n"
 "return;\n"
 "}\n"
-"--src dav.sql:1089\n";
+"--src dav.sql:1585\n";
 
-static const char *proc13 = 
-"#line 1157 \"[executable]/dav.sql\"\n"
+static const char *proc17 = 
+"#line 1653 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.ISCOL (in path varchar)\n"
 "{\n"
 "declare depth, len, col integer;\n"
@@ -1165,10 +1665,10 @@ static const char *proc13 =
 "else\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:1155\n";
+"--src dav.sql:1651\n";
 
-static const char *proc14 = 
-"#line 1171 \"[executable]/dav.sql\"\n"
+static const char *proc18 = 
+"#line 1667 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.ISRES (in path varchar)\n"
 "{\n"
 "declare col, rc integer;\n"
@@ -1178,10 +1678,10 @@ static const char *proc14 =
 "rc := 0;\n"
 "return (rc);\n"
 "}\n"
-"--src dav.sql:1169\n";
+"--src dav.sql:1665\n";
 
-static const char *proc15 = 
-"#line 1183 \"[executable]/dav.sql\"\n"
+static const char *proc19 = 
+"#line 1679 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.ETAG (in name varchar, in col integer)\n"
 "{\n"
 "declare etag, full_path varchar;\n"
@@ -1197,20 +1697,20 @@ static const char *proc15 =
 "etag := md5 (etag);\n"
 "return etag;\n"
 "}\n"
-"--src dav.sql:1181\n";
+"--src dav.sql:1677\n";
 
-static const char *proc16 = 
-"#line 1201 \"[executable]/dav.sql\"\n"
+static const char *proc20 = 
+"#line 1697 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.HEAD (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "\n"
 "WS.WS.GET (path, params, lines);\n"
 "return;\n"
 "}\n"
-"--src dav.sql:1199\n";
+"--src dav.sql:1695\n";
 
-static const char *proc17 = 
-"#line 1210 \"[executable]/dav.sql\"\n"
+static const char *proc21 = 
+"#line 1706 \"[executable]/dav.sql\"\n"
 "create procedure DAV_SET_HTTP_REQUEST_STATUS (in rc integer)\n"
 "{\n"
 "if (rc = -1)	{ http_request_status (\'HTTP/1.1 409 Invalid path\');	return; }\n"
@@ -1228,10 +1728,10 @@ static const char *proc17 =
 "http_request_status (\'HTTP/1.1 405 Method Not Allowed\');\n"
 "return;\n"
 "}\n"
-"--src dav.sql:1208\n";
+"--src dav.sql:1704\n";
 
-static const char *proc18 = 
-"#line 1232 \"[executable]/dav.sql\"\n"
+static const char *proc22 = 
+"#line 1728 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PUT (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare _col_parent_id integer;\n"
@@ -1295,7 +1795,7 @@ static const char *proc18 =
 "\n"
 "if (content_type = \'application/sparql-query\')\n"
 "{\n"
-"WS.WS.SPARQL_QUERY_POST (full_path, ses);\n"
+"WS.WS.SPARQL_QUERY_POST (full_path, ses, uname);\n"
 "is_sparql := 1;\n"
 "}\n"
 "\n"
@@ -1334,10 +1834,10 @@ static const char *proc18 =
 "http_body_read ();\n"
 "DAV_SET_HTTP_REQUEST_STATUS (rc);\n"
 "}\n"
-"--src dav.sql:1230\n";
+"--src dav.sql:1726\n";
 
-static const char *proc19 = 
-"#line 1336 \"[executable]/dav.sql\"\n"
+static const char *proc23 = 
+"#line 1832 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.HEX_TO_DEC (in c char)\n"
 "{\n"
 "if (c >= \'0\' and c <= \'9\')\n"
@@ -1348,10 +1848,10 @@ static const char *proc19 =
 "return (10 + ascii(c) - ascii(\'A\'));\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:1334\n";
+"--src dav.sql:1830\n";
 
-static const char *proc20 = 
-"#line 1348 \"[executable]/dav.sql\"\n"
+static const char *proc24 = 
+"#line 1844 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.STR_TO_URI (in str varchar)\n"
 "{\n"
 "declare tmp varchar;\n"
@@ -1383,10 +1883,10 @@ static const char *proc20 =
 "}\n"
 "return trim(tmp);\n"
 "}\n"
-"--src dav.sql:1346\n";
+"--src dav.sql:1842\n";
 
-static const char *proc21 = 
-"#line 1381 \"[executable]/dav.sql\"\n"
+static const char *proc25 = 
+"#line 1877 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PATHREF (in path varchar, in elem integer, in host varchar, out name_len integer)\n"
 "{\n"
 "declare inx, len, pos, inx1 integer;\n"
@@ -1456,10 +1956,10 @@ static const char *proc21 =
 "}\n"
 "return name;\n"
 "}\n"
-"--src dav.sql:1379\n";
+"--src dav.sql:1875\n";
 
-static const char *proc22 = 
-"#line 1452 \"[executable]/dav.sql\"\n"
+static const char *proc26 = 
+"#line 1948 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.IS_ACTIVE_CONTENT (in f varchar)\n"
 "{\n"
 "declare dot integer;\n"
@@ -1475,10 +1975,10 @@ static const char *proc22 =
 "return 1;\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:1450\n";
+"--src dav.sql:1946\n";
 
-static const char *proc23 = 
-"#line 1469 \"[executable]/dav.sql\"\n"
+static const char *proc27 = 
+"#line 1965 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.GET_DAV_DEFAULT_PAGE (inout path any)\n"
 "{\n"
 "declare _list, path1 any;\n"
@@ -1525,26 +2025,26 @@ static const char *proc23 =
 "\n"
 "return \'\';\n"
 "}\n"
-"--src dav.sql:1467\n";
+"--src dav.sql:1963\n";
 
-static const char *proc24 = 
-"#line 1518 \"[executable]/dav.sql\"\n"
+static const char *proc28 = 
+"#line 2014 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.GET_DAV_CHUNKED_QUOTA () returns integer\n"
 "{\n"
 "declare dav_chunked_quota integer;\n"
 "\n"
 "dav_chunked_quota := atoi (\n"
 "coalesce (\n"
-"cfg_item_value (virtuoso_ini_path(), \'HTTPServer\', \'DAVChunkedQuota\'),\n"
+"virtuoso_ini_item_value (\'HTTPServer\', \'DAVChunkedQuota\'),\n"
 "\'1000000\'));\n"
 "if (dav_chunked_quota < 1)\n"
 "dav_chunked_quota := 1000000;\n"
 "return dav_chunked_quota;\n"
 "}\n"
-"--src dav.sql:1516\n";
+"--src dav.sql:2012\n";
 
-static const char *proc25 = 
-"#line 1534 \"[executable]/dav.sql\"\n"
+static const char *proc29 = 
+"#line 2030 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.GET (in path any, inout params any, in lines any)\n"
 "{\n"
 "declare col_depth, path_len integer;\n"
@@ -1558,13 +2058,13 @@ static const char *proc25 =
 "declare full_path varchar;\n"
 "declare parent_path varchar;\n"
 "declare cont_type varchar;\n"
-"declare server_etag, client_etag varchar;\n"
+"declare server_etag, client_etag, rdf_graph varchar;\n"
 "declare uid, maxres integer;\n"
 "declare p_comm, stat, msg, xpr, sxtag, rxtag, resource_content, str varchar;\n"
 "declare resource_owner, exec_safety_level integer;\n"
 "declare _res_id , _col_id, is_admin_owned_res integer;\n"
 "declare def_page varchar;\n"
-"declare asmx_path any;\n"
+"declare asmx_path, auth_opts, webid_check, webid_check_rc any;\n"
 "\n"
 "\n"
 "if (WS.WS.DAV_CHECK_ASMX (path, asmx_path))\n"
@@ -1672,6 +2172,8 @@ static const char *proc25 =
 "}\n"
 "if (_col_id is null and (rc >= 0))\n"
 "{\n"
+"if (uid = http_nobody_uid () and gid = http_nogroup_gid ()) \n"
+"uid := null;\n"
 "rc := DAV_AUTHENTICATE_HTTP (tgt_id, tgt_type, \'1_1\', 0, lines, uname, upwd, uid, gid, perms);\n"
 "if (rc >= 0)\n"
 "exec_safety_level := 1;\n"
@@ -1680,6 +2182,34 @@ static const char *proc25 =
 "\n"
 "http_rewrite (0);\n"
 "\n"
+"\n"
+"auth_opts := http_map_get (\'auth_opts\');\n"
+"if (isvector (auth_opts) and mod (length (auth_opts), 2) = 0)\n"
+"webid_check := atoi (get_keyword (\'webid_check\', auth_opts, \'0\'));\n"
+"else\n"
+"webid_check := 0;\n"
+"webid_check_rc := 1;  \n"
+"if (is_https_ctx () and webid_check and http_map_get (\'executable\'))\n"
+"{\n"
+"declare gid, perms, _check_id, _check_type any;\n"
+"uid := null;\n"
+"if (isinteger (_res_id)) \n"
+"{ \n"
+"_check_id := _res_id; \n"
+"_check_type := \'R\';\n"
+"} \n"
+"else \n"
+"{ \n"
+"_check_id := _col_id; \n"
+"_check_type := \'C\';\n"
+"} \n"
+"webid_check_rc := DAV_AUTHENTICATE_HTTP (_check_id, _check_type, \'1__\', 1, lines, uname, upwd, uid, gid, perms);\n"
+"if ((webid_check_rc < 0) and (webid_check_rc <> -1))\n"
+"return 0;\n"
+"}  \n"
+"\n"
+"http_rewrite (0);\n"
+"\n"
 "if (_col_id is not null and http_path () not like \'%/\')\n"
 "{\n"
 "http_request_status (\'HTTP/1.1 301 Moved Permanently\');\n"
@@ -1767,7 +2297,7 @@ static const char *proc25 =
 "\n"
 "\n"
 "\n"
-"if (http_map_get (\'executable\') or (exec_safety_level and is_admin_owned_res))\n"
+"if ((http_map_get (\'executable\') and webid_check_rc >= 0) or (exec_safety_level and is_admin_owned_res))\n"
 "exec_safety_level := 2;\n"
 "\n"
 "\n"
@@ -1836,6 +2366,7 @@ static const char *proc25 =
 "if (stat <> \'00000\')\n"
 "{\n"
 "exec_err:\n"
+"http_status_set (500);\n"
 "http (\'<html><body>\');\n"
 "http (concat (\'<H3>Execution of \"\', sprintf (\'%V\', http_path()), \'\" failed.</H3>\'));\n"
 "http (concat (\'<p><b>SQL Error: \', stat, \' \'));\n"
@@ -1956,6 +2487,14 @@ static const char *proc25 =
 "case when is_https_ctx () then \'https\' else \'http\' end,\n"
 "http_request_header (lines, \'Host\', NULL, NULL), http_path ());	\n"
 "}\n"
+"rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where \n"
+"PROP_PARENT_ID = _col and PROP_TYPE = \'C\' and PROP_NAME = \'virt:rdf_graph\');\n"
+"if (rdf_graph is not null)\n"
+"{\n"
+"declare rdf_uri varchar;\n"
+"rdf_uri := rfc1808_expand_uri (DB.DBA.HTTP_REQUESTED_URL (), DAV_RDF_RES_NAME (rdf_graph));\n"
+"hdr_str := hdr_str || sprintf (\'Link: <%s>; rel=\"alternate\"\\r\\n\', rdf_uri);\n"
+"}		  \n"
 "http_header (hdr_str);\n"
 "}\n"
 "else\n"
@@ -2165,10 +2704,10 @@ static const char *proc25 =
 "err_end:\n"
 "return;\n"
 "}\n"
-"--src dav.sql:1532\n";
+"--src dav.sql:2028\n";
 
-static const char *proc26 = 
-"#line 2157 \"[executable]/dav.sql\"\n"
+static const char *proc30 = 
+"#line 2692 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.POST (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare _content_type any;\n"
@@ -2190,17 +2729,17 @@ static const char *proc26 =
 "WS.WS.GET (path, params, lines);\n"
 "}\n"
 "}\n"
-"--src dav.sql:2155\n";
+"--src dav.sql:2690\n";
 
-static const char *proc27 = 
-"#line 2180 \"[executable]/dav.sql\"\n"
-"create procedure WS.WS.SPARQL_QUERY_POST (in path varchar, inout ses varchar)\n"
+static const char *proc31 = 
+"#line 2715 \"[executable]/dav.sql\"\n"
+"create procedure WS.WS.SPARQL_QUERY_POST (in path varchar, inout ses varchar, in uname varchar)\n"
 "{\n"
 "declare def_gr, full_qr, qr, cname any;\n"
 "declare stat, msg, meta, data any;\n"
 "ses := http_body_read ();\n"
 "qr := string_output_string (ses);\n"
-"cname := cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DefaultHost\');\n"
+"cname := virtuoso_ini_item_value (\'URIQA\', \'DefaultHost\');\n"
 "if (cname is null)\n"
 "{\n"
 "declare tmp any;\n"
@@ -2216,6 +2755,8 @@ static const char *proc27 =
 "full_qr := \'SPARQL \';\n"
 "full_qr := full_qr || qr;\n"
 "stat := \'00000\';\n"
+"if (exists (select 1 from DB.DBA.SYS_USERS where U_NAME = uname and U_SQL_ENABLE = 1))\n"
+"set_user_id (uname);\n"
 "exec (full_qr, stat, msg, vector (), 0, meta, data);\n"
 "if (stat <> \'00000\')\n"
 "signal (stat, msg);\n"
@@ -2231,20 +2772,20 @@ static const char *proc27 =
 "}\n"
 "ses := sprintf (\'CONSTRUCT { ?s ?p ?o } FROM <%s> WHERE { ?s ?p ?o }\', def_gr);\n"
 "}\n"
-"--src dav.sql:2178\n";
+"--src dav.sql:2713\n";
 
-static const char *proc28 = 
-"#line 2219 \"[executable]/dav.sql\"\n"
+static const char *proc32 = 
+"#line 2756 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.SPARQL_QUERY_GET (in content any, in path any, inout lines any)\n"
 "{\n"
 "declare pars any;\n"
 "pars := vector (\'query\', string_output_string (content));\n"
 "WS.WS.\"/!sparql/\" (path, pars, lines);\n"
 "}\n"
-"--src dav.sql:2217\n";
+"--src dav.sql:2754\n";
 
-static const char *proc29 = 
-"#line 2230 \"[executable]/dav.sql\"\n"
+static const char *proc33 = 
+"#line 2767 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.\"LOCK\" (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare len, tleft, tright integer;\n"
@@ -2362,10 +2903,10 @@ static const char *proc29 =
 "\'</D:lockdiscovery>\',\n"
 "\'</D:prop>\'));\n"
 "}\n"
-"--src dav.sql:2228\n";
+"--src dav.sql:2765\n";
 
-static const char *proc30 = 
-"#line 2349 \"[executable]/dav.sql\"\n"
+static const char *proc34 = 
+"#line 2886 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.\"UNLOCK\" (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "declare uname, upwd, _perms, token, name, cur_token, location varchar;\n"
@@ -2415,10 +2956,10 @@ static const char *proc30 =
 "http_request_status (\'HTTP/1.1 204 No Content\');\n"
 "return;\n"
 "}\n"
-"--src dav.sql:2347\n";
+"--src dav.sql:2884\n";
 
-static const char *proc31 = 
-"#line 2402 \"[executable]/dav.sql\"\n"
+static const char *proc35 = 
+"#line 2939 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.OPLOCKTOKEN ()\n"
 "{\n"
 "\n"
@@ -2429,10 +2970,10 @@ static const char *proc31 =
 "\n"
 "\n"
 "}\n"
-"--src dav.sql:2400\n";
+"--src dav.sql:2937\n";
 
-static const char *proc32 = 
-"#line 2414 \"[executable]/dav.sql\"\n"
+static const char *proc36 = 
+"#line 2951 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PARENT_PATH (in path varchar)\n"
 "{\n"
 "declare tmp any;\n"
@@ -2451,10 +2992,10 @@ static const char *proc32 =
 "}\n"
 "return tmp;\n"
 "}\n"
-"--src dav.sql:2412\n";
+"--src dav.sql:2949\n";
 
-static const char *proc33 = 
-"#line 2434 \"[executable]/dav.sql\"\n"
+static const char *proc37 = 
+"#line 2971 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.HREF_TO_ARRAY (in path varchar,in host varchar)\n"
 "{\n"
 "declare arr, res any;\n"
@@ -2473,10 +3014,10 @@ static const char *proc33 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src dav.sql:2432\n";
+"--src dav.sql:2969\n";
 
-static const char *proc34 = 
-"#line 2454 \"[executable]/dav.sql\"\n"
+static const char *proc38 = 
+"#line 2991 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.HREF_TO_PATH_ARRAY (in path varchar)\n"
 "{\n"
 "declare arr, res any;\n"
@@ -2500,10 +3041,10 @@ static const char *proc34 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src dav.sql:2452\n";
+"--src dav.sql:2989\n";
 
-static const char *proc35 = 
-"#line 2480 \"[executable]/dav.sql\"\n"
+static const char *proc39 = 
+"#line 3017 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.DSTIS (in path varchar, in host varchar, out rcol integer, out rname varchar)\n"
 "{\n"
 "declare inx, col, res, id, name_len, depth, cols integer;\n"
@@ -2563,26 +3104,26 @@ static const char *proc35 =
 "\n"
 "return rc;\n"
 "}\n"
-"--src dav.sql:2478\n";
+"--src dav.sql:3015\n";
 
-static const char *proc36 = 
-"#line 2542 \"[executable]/dav.sql\"\n"
+static const char *proc40 = 
+"#line 3079 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.MOVE (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "WS.WS.COPY_OR_MOVE (path, params, lines, 0);\n"
 "}\n"
-"--src dav.sql:2540\n";
+"--src dav.sql:3077\n";
 
-static const char *proc37 = 
-"#line 2548 \"[executable]/dav.sql\"\n"
+static const char *proc41 = 
+"#line 3085 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.COPY (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "WS.WS.COPY_OR_MOVE (path, params, lines, 1);\n"
 "}\n"
-"--src dav.sql:2546\n";
+"--src dav.sql:3083\n";
 
-static const char *proc38 = 
-"#line 2554 \"[executable]/dav.sql\"\n"
+static const char *proc42 = 
+"#line 3091 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.COPY_OR_MOVE (in path varchar, inout params varchar, in lines varchar, in is_copy integer)\n"
 "{\n"
 "declare _src_name, st, _dst_name varchar;\n"
@@ -2728,10 +3269,10 @@ static const char *proc38 =
 "if (rc = -3)	{ http_request_status (\'HTTP/1.1 412 Precondition Failed\');	return; }\n"
 "DAV_SET_HTTP_REQUEST_STATUS (rc);\n"
 "}\n"
-"--src dav.sql:2552\n";
+"--src dav.sql:3089\n";
 
-static const char *proc39 = 
-"#line 2703 \"[executable]/dav.sql\"\n"
+static const char *proc43 = 
+"#line 3240 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.ISLOCKED (in path any, in lines varchar, in _u_id integer)\n"
 "{\n"
 "declare name, token, if_token varchar;\n"
@@ -2784,10 +3325,10 @@ static const char *proc39 =
 "close l_cur;\n"
 "return rc;\n"
 "}\n"
-"--src dav.sql:2701\n";
+"--src dav.sql:3238\n";
 
-static const char *proc40 = 
-"#line 2757 \"[executable]/dav.sql\"\n"
+static const char *proc44 = 
+"#line 3294 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.CHECK_AUTH (in lines any)\n"
 "{\n"
 "declare _u_group, _u_id integer;\n"
@@ -2795,10 +3336,10 @@ static const char *proc40 =
 "_u_id := WS.WS.GET_AUTH (lines, _u_group, _perms);\n"
 "return _u_id;\n"
 "}\n"
-"--src dav.sql:2755\n";
+"--src dav.sql:3292\n";
 
-static const char *proc41 = 
-"#line 2767 \"[executable]/dav.sql\"\n"
+static const char *proc45 = 
+"#line 3304 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.GET_IF_AUTH (in lines any, out _u_group integer, out _perms varchar)\n"
 "{\n"
 "declare _u_id integer;\n"
@@ -2817,10 +3358,10 @@ static const char *proc41 =
 "}\n"
 "return _u_id;\n"
 "}\n"
-"--src dav.sql:2765\n";
+"--src dav.sql:3302\n";
 
-static const char *proc42 = 
-"#line 2787 \"[executable]/dav.sql\"\n"
+static const char *proc46 = 
+"#line 3324 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.GET_DAV_AUTH (in lines any, in allow_anon integer, in can_write_http integer,\n"
 "out _u_name varchar, out _u_password varchar, out _uid integer, out _gid integer, out _perms varchar) returns integer\n"
 "{\n"
@@ -2933,10 +3474,10 @@ static const char *proc42 =
 "\'Access to page is forbidden.</BODY></HTML>\'));\n"
 "return -24;\n"
 "}\n"
-"--src dav.sql:2785\n";
+"--src dav.sql:3322\n";
 
-static const char *proc43 = 
-"#line 2901 \"[executable]/dav.sql\"\n"
+static const char *proc47 = 
+"#line 3438 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.PERM_COMP (in perm varchar, in mask varchar)\n"
 "{\n"
 "declare inx integer;\n"
@@ -2954,10 +3495,10 @@ static const char *proc43 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src dav.sql:2899\n";
+"--src dav.sql:3436\n";
 
-static const char *proc44 = 
-"#line 2921 \"[executable]/dav.sql\"\n"
+static const char *proc48 = 
+"#line 3458 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.CHECKPERM ( in path varchar, in _u_id integer, in action varchar)\n"
 "{\n"
 "declare g_id, _user, _group integer;\n"
@@ -3035,10 +3576,10 @@ static const char *proc44 =
 "}\n"
 "return rc;\n"
 "}\n"
-"--src dav.sql:2919\n";
+"--src dav.sql:3456\n";
 
-static const char *proc45 = 
-"#line 3000 \"[executable]/dav.sql\"\n"
+static const char *proc49 = 
+"#line 3537 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.ISPUBLIC (in path varchar, in ask varchar)\n"
 "{\n"
 "declare perms, name, given varchar;\n"
@@ -3063,10 +3604,10 @@ static const char *proc45 =
 "nf:\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:2998\n";
+"--src dav.sql:3535\n";
 
-static const char *proc46 = 
-"#line 3026 \"[executable]/dav.sql\"\n"
+static const char *proc50 = 
+"#line 3563 \"[executable]/dav.sql\"\n"
 "create procedure\n"
 "WS.WS.DAV_VSP_DEF_REMOVE (in path varchar)\n"
 "{\n"
@@ -3081,10 +3622,10 @@ static const char *proc46 =
 "}\n"
 "}\n"
 "}\n"
-"--src dav.sql:3024\n";
+"--src dav.sql:3561\n";
 
-static const char *proc47 = 
-"#line 3042 \"[executable]/dav.sql\"\n"
+static const char *proc51 = 
+"#line 3579 \"[executable]/dav.sql\"\n"
 "create function DAV_PERMS_SET_CHAR (in perms varchar, in ch any, in pos integer) returns varchar\n"
 "{\n"
 "declare l integer;\n"
@@ -3097,10 +3638,10 @@ static const char *proc47 =
 "perms[pos] := ch[0];\n"
 "return perms;\n"
 "}\n"
-"--src dav.sql:3040\n";
+"--src dav.sql:3577\n";
 
-static const char *proc48 = 
-"#line 3056 \"[executable]/dav.sql\"\n"
+static const char *proc52 = 
+"#line 3593 \"[executable]/dav.sql\"\n"
 "create procedure DAV_PERMS_FIX (inout perms varchar, in full_perms varchar)\n"
 "{\n"
 "declare l integer;\n"
@@ -3112,10 +3653,10 @@ static const char *proc48 =
 "if (ascii(\'-\') = perms [10])\n"
 "perms[10] := full_perms[10];\n"
 "}\n"
-"--src dav.sql:3054\n";
+"--src dav.sql:3591\n";
 
-static const char *proc49 = 
-"#line 3069 \"[executable]/dav.sql\"\n"
+static const char *proc53 = 
+"#line 3606 \"[executable]/dav.sql\"\n"
 "create procedure DAV_PERMS_INHERIT (inout perms varchar, in parent_perms varchar, in force_parent integer := 0)\n"
 "{\n"
 "declare l integer;\n"
@@ -3127,10 +3668,10 @@ static const char *proc49 =
 "if ((ascii(\'-\') = perms [10]) or (force_parent and (ascii(\'M\') <> parent_perms [10])))\n"
 "perms[10] := parent_perms[10];\n"
 "}\n"
-"--src dav.sql:3067\n";
+"--src dav.sql:3604\n";
 
 static const char *trig0 = 
-"#line 3083 \"[executable]/dav.sql\"\n"
+"#line 3620 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_RES_FULL_PATH_I after insert on WS.WS.SYS_DAV_RES order 0 referencing new as N\n"
 "{\n"
 "declare full_path, name, _pflags, _rflags, _inh varchar;\n"
@@ -3195,10 +3736,10 @@ static const char *trig0 =
 "xslt_stale (concat (\'virt://WS.WS.SYS_DAV_RES.RES_FULL_PATH.RES_CONTENT:\', N.RES_FULL_PATH));\n"
 "\n"
 "}\n"
-"--src dav.sql:3081\n";
+"--src dav.sql:3618\n";
 
 static const char *trig1 = 
-"#line 3149 \"[executable]/dav.sql\"\n"
+"#line 3686 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_RES_FULL_PATH_BU before update on WS.WS.SYS_DAV_RES referencing old as O, new as N\n"
 "{\n"
 "declare _pflags, _rflags, _inh varchar;\n"
@@ -3223,10 +3764,10 @@ static const char *trig1 =
 "}\n"
 "\n"
 "}\n"
-"--src dav.sql:3147\n";
+"--src dav.sql:3684\n";
 
 static const char *trig2 = 
-"#line 3175 \"[executable]/dav.sql\"\n"
+"#line 3712 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_RES_FULL_PATH_U after update on WS.WS.SYS_DAV_RES referencing old as O, new as N\n"
 "{\n"
 "declare full_path, name varchar;\n"
@@ -3296,10 +3837,10 @@ static const char *trig2 =
 "xslt_stale (concat (\'virt://WS.WS.SYS_DAV_RES.RES_FULL_PATH.RES_CONTENT:\', N.RES_FULL_PATH));\n"
 "\n"
 "}\n"
-"--src dav.sql:3173\n";
+"--src dav.sql:3710\n";
 
 static const char *trig3 = 
-"#line 3246 \"[executable]/dav.sql\"\n"
+"#line 3783 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_COL_U after update on WS.WS.SYS_DAV_COL referencing old as O, new as N\n"
 "{\n"
 "declare full_path, name, _pflags, _cflags varchar;\n"
@@ -3436,10 +3977,10 @@ static const char *trig3 =
 "where RES_COL = res and (case (lt (length (RES_PERMS), 11)) when 1 then 0 else RES_PERMS[10] end) <> _pflags[10];\n"
 "\n"
 "}\n"
-"--src dav.sql:3244\n";
+"--src dav.sql:3781\n";
 
-static const char *proc50 = 
-"#line 3384 \"[executable]/dav.sql\"\n"
+static const char *proc54 = 
+"#line 3921 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.UPDCHILD (in col integer, in root_path varchar, in _pflags varchar, in repl varchar)\n"
 "{\n"
 "declare name, new_path, str varchar;\n"
@@ -3521,10 +4062,10 @@ static const char *proc50 =
 "not_col:\n"
 "close c_cur;\n"
 "}\n"
-"--src dav.sql:3382\n";
+"--src dav.sql:3919\n";
 
 static const char *trig4 = 
-"#line 3467 \"[executable]/dav.sql\"\n"
+"#line 4004 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_COL_I after insert on WS.WS.SYS_DAV_COL referencing new as N\n"
 "{\n"
 "declare _pflags, _cflags, col_path, _inh varchar;\n"
@@ -3575,10 +4116,10 @@ static const char *trig4 =
 "\n"
 "\n"
 "}\n"
-"--src dav.sql:3465\n";
+"--src dav.sql:4002\n";
 
-static const char *proc51 = 
-"#line 3519 \"[executable]/dav.sql\"\n"
+static const char *proc55 = 
+"#line 4056 \"[executable]/dav.sql\"\n"
 "create procedure\n"
 "WS.WS.DAV_VSP_INCLUDES_CHANGED (in full_path varchar, in own varchar)\n"
 "{\n"
@@ -3604,10 +4145,10 @@ static const char *proc51 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:3517\n";
+"--src dav.sql:4054\n";
 
-static const char *proc52 = 
-"#line 3547 \"[executable]/dav.sql\"\n"
+static const char *proc56 = 
+"#line 4084 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.EXPAND_INCLUDES (in path varchar, inout stream varchar, in level integer,\n"
 "in ct integer, in content varchar, inout st any := null)\n"
 "{\n"
@@ -3650,8 +4191,11 @@ static const char *proc52 =
 "select blob_to_string (RES_CONTENT), RES_OWNER, RES_GROUP, RES_PERMS, RES_MOD_TIME\n"
 "into curr_file, _u_id, _grp, _perms, modt from WS.WS.SYS_DAV_RES\n"
 "where RES_NAME = name and RES_COL = col;\n"
+"if (not http_map_get (\'executable\'))\n"
+"{\n"
 "if (_u_id <> http_dav_uid () or _perms like \'____1%\' or _perms like \'_______1%\')\n"
 "signal (\'37000\', \'Includes can be owned only by admin & cannot be writable for others\', \'DA001\');\n"
+"}\n"
 "if (st is not null and isarray (st))\n"
 "st := vector_concat (st, vector (path, datestring(modt)));\n"
 "}\n"
@@ -3688,10 +4232,10 @@ static const char *proc52 =
 "if (length (curr_file) > 0)\n"
 "http (curr_file, stream);\n"
 "}\n"
-"--src dav.sql:3545\n";
+"--src dav.sql:4082\n";
 
 static const char *trig5 = 
-"#line 3629 \"[executable]/dav.sql\"\n"
+"#line 4169 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_RES_FULL_PATH_D after delete on WS.WS.SYS_DAV_RES\n"
 "{\n"
 "set triggers off;\n"
@@ -3721,10 +4265,10 @@ static const char *trig5 =
 "delete from WS.WS.SYS_DAV_TAG where DT_RES_ID = RES_ID;\n"
 "\n"
 "}\n"
-"--src dav.sql:3627\n";
+"--src dav.sql:4167\n";
 
 static const char *trig6 = 
-"#line 3660 \"[executable]/dav.sql\"\n"
+"#line 4200 \"[executable]/dav.sql\"\n"
 "create trigger SYS_DAV_COL_D before delete on WS.WS.SYS_DAV_COL order 100\n"
 "{\n"
 "declare pub, col_path varchar;\n"
@@ -3743,10 +4287,10 @@ static const char *trig6 =
 "delete from WS.WS.SYS_DAV_LOCK where LOCK_PARENT_TYPE = \'C\' and LOCK_PARENT_ID = COL_ID;\n"
 "\n"
 "}\n"
-"--src dav.sql:3658\n";
+"--src dav.sql:4198\n";
 
-static const char *proc53 = 
-"#line 3682 \"[executable]/dav.sql\"\n"
+static const char *proc57 = 
+"#line 4222 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.XML_VIEW_HEADER\n"
 "(\n"
 "in view_name varchar,\n"
@@ -3807,10 +4351,10 @@ static const char *proc53 =
 "}\n"
 "signal (\'22023\', \'Unsupported type of metadata\', \'DA006\');\n"
 "}\n"
-"--src dav.sql:3680\n";
+"--src dav.sql:4220\n";
 
-static const char *proc54 = 
-"#line 3745 \"[executable]/dav.sql\"\n"
+static const char *proc58 = 
+"#line 4285 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.XML_VIEW_EXTERNAL_META\n"
 "(\n"
 "in view_name varchar,\n"
@@ -3840,10 +4384,10 @@ static const char *proc54 =
 "meta_path_suffix := \'\';\n"
 "mime_type := \'\';\n"
 "}\n"
-"--src dav.sql:3743\n";
+"--src dav.sql:4283\n";
 
-static const char *proc55 = 
-"#line 3776 \"[executable]/dav.sql\"\n"
+static const char *proc59 = 
+"#line 4316 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.XML_VIEW_UPDATE (in _view varchar, in _res_id integer, in path varchar, in meta_mode integer, in meta_data varchar)\n"
 "{\n"
 "declare _body any;\n"
@@ -3858,10 +4402,10 @@ static const char *proc55 =
 "_body := string_output_string (_body);\n"
 "update WS.WS.SYS_DAV_RES set RES_CONTENT = _body, RES_MOD_TIME = now () where RES_ID = _res_id;\n"
 "}\n"
-"--src dav.sql:3774\n";
+"--src dav.sql:4314\n";
 
-static const char *proc56 = 
-"#line 3792 \"[executable]/dav.sql\"\n"
+static const char *proc60 = 
+"#line 4332 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.FIXPATH (in path any)\n"
 "{\n"
 "declare inx, len, cp, sl integer;\n"
@@ -3940,10 +4484,10 @@ static const char *proc56 =
 "ret := \'\';\n"
 "return ret;\n"
 "}\n"
-"--src dav.sql:3790\n";
+"--src dav.sql:4330\n";
 
-static const char *proc57 = 
-"#line 3873 \"[executable]/dav.sql\"\n"
+static const char *proc61 = 
+"#line 4413 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.ISPUBL (in __path varchar)\n"
 "{\n"
 "declare _srv, _path varchar;\n"
@@ -3985,10 +4529,10 @@ static const char *proc57 =
 "}\n"
 "return NULL;\n"
 "}\n"
-"--src dav.sql:3871\n";
+"--src dav.sql:4411\n";
 
-static const char *proc58 = 
-"#line 3916 \"[executable]/dav.sql\"\n"
+static const char *proc62 = 
+"#line 4456 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.BODY_ARR (inout __ses any, in __pcs integer)\n"
 "{\n"
 "declare _res, _ses any;\n"
@@ -4038,10 +4582,10 @@ static const char *proc58 =
 "\n"
 "return _res;\n"
 "}\n"
-"--src dav.sql:3914\n";
+"--src dav.sql:4454\n";
 
-static const char *proc59 = 
-"#line 3971 \"[executable]/dav.sql\"\n"
+static const char *proc63 = 
+"#line 4511 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.XML_AUTO_SCHED (in _path varchar)\n"
 "{\n"
 "declare _stmt, ses, _root, _sch, _dtd, _dtd_body, _comments varchar;\n"
@@ -4071,10 +4615,10 @@ static const char *proc59 =
 "WS.WS.XMLSQL_TO_STRSES (_stmt, _root, _sch, _dtd, _comments, ses);\n"
 "update WS.WS.SYS_DAV_RES set RES_CONTENT = ses, RES_MOD_TIME = now () where RES_ID = _res_id;\n"
 "}\n"
-"--src dav.sql:3969\n";
+"--src dav.sql:4509\n";
 
-static const char *proc60 = 
-"#line 4003 \"[executable]/dav.sql\"\n"
+static const char *proc64 = 
+"#line 4543 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.DAV_LOGIN (in path any,\n"
 "in lines any,\n"
 "in __access varchar,\n"
@@ -4120,10 +4664,10 @@ static const char *proc60 =
 "\n"
 "return (1);\n"
 "}\n"
-"--src dav.sql:4001\n";
+"--src dav.sql:4541\n";
 
-static const char *proc61 = 
-"#line 4050 \"[executable]/dav.sql\"\n"
+static const char *proc65 = 
+"#line 4590 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.HTTP_RESP (in hdr any, out descr varchar)\n"
 "{\n"
 "declare line, code varchar;\n"
@@ -4149,10 +4693,10 @@ static const char *proc61 =
 "code := substring (code, 1, 3);\n"
 "return atoi (code);\n"
 "}\n"
-"--src dav.sql:4048\n";
+"--src dav.sql:4588\n";
 
-static const char *proc62 = 
-"#line 4078 \"[executable]/dav.sql\"\n"
+static const char *proc66 = 
+"#line 4618 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.COPY_TO_OTHER (in path varchar,\n"
 "inout params varchar,\n"
 "in lines varchar,\n"
@@ -4268,10 +4812,10 @@ static const char *proc62 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src dav.sql:4076\n";
+"--src dav.sql:4616\n";
 
-static const char *proc63 = 
-"#line 4195 \"[executable]/dav.sql\"\n"
+static const char *proc67 = 
+"#line 4735 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.CHECK_READ_ACCESS (in _u_id integer, in doc_id integer)\n"
 "{\n"
 "declare _perms varchar;\n"
@@ -4293,10 +4837,10 @@ static const char *proc63 =
 "exit_p:;\n"
 "return rc;\n"
 "}\n"
-"--src dav.sql:4193\n";
+"--src dav.sql:4733\n";
 
-static const char *proc64 = 
-"#line 4218 \"[executable]/dav.sql\"\n"
+static const char *proc68 = 
+"#line 4758 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.IS_REDIRECT_REF (inout path any, in lines any, inout location varchar)\n"
 "{\n"
 "declare fpath, fpath1, _ref, lpath, ppath varchar;\n"
@@ -4324,10 +4868,10 @@ static const char *proc64 =
 "set isolation=\'repeatable\';\n"
 "return rc;\n"
 "}\n"
-"--src dav.sql:4216\n";
+"--src dav.sql:4756\n";
 
-static const char *proc65 = 
-"#line 4248 \"[executable]/dav.sql\"\n"
+static const char *proc69 = 
+"#line 4788 \"[executable]/dav.sql\"\n"
 "create function WS.WS.DAV_DIR_LIST (in full_path varchar, in logical_root_path varchar, in col integer, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer) returns integer\n"
 "{\n"
 "declare _dir, _xml, _modify, fsize, _html, _b_opt, _xml_sheet any;\n"
@@ -4432,10 +4976,10 @@ static const char *proc65 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:4246\n";
+"--src dav.sql:4786\n";
 
-static const char *proc66 = 
-"#line 4374 \"[executable]/dav.sql\"\n"
+static const char *proc70 = 
+"#line 4914 \"[executable]/dav.sql\"\n"
 "create function\n"
 "WS.WS.DAV_CHECK_ASMX (in path any, out patched_path any) returns integer\n"
 "{\n"
@@ -4462,10 +5006,10 @@ static const char *proc66 =
 "patched_path := path;\n"
 "return 0;\n"
 "}\n"
-"--src dav.sql:4372\n";
+"--src dav.sql:4912\n";
 
-static const char *proc67 = 
-"#line 4403 \"[executable]/dav.sql\"\n"
+static const char *proc71 = 
+"#line 4943 \"[executable]/dav.sql\"\n"
 "create procedure\n"
 "WS.WS.DAV_REMOVE_ASMX (in path any)\n"
 "{\n"
@@ -4478,10 +5022,10 @@ static const char *proc67 =
 "else\n"
 "return path;\n"
 "}\n"
-"--src dav.sql:4401\n";
+"--src dav.sql:4941\n";
 
-static const char *proc68 = 
-"#line 4418 \"[executable]/dav.sql\"\n"
+static const char *proc72 = 
+"#line 4958 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.XMLSQL_TO_STRSES (\n"
 "in _q varchar,\n"
 "in _root varchar,\n"
@@ -4527,10 +5071,10 @@ static const char *proc68 =
 "\n"
 "return;\n"
 "}\n"
-"--src dav.sql:4416\n";
+"--src dav.sql:4956\n";
 
-static const char *proc69 = 
-"#line 4465 \"[executable]/dav.sql\"\n"
+static const char *proc73 = 
+"#line 5005 \"[executable]/dav.sql\"\n"
 "create procedure WS.WS.\"TRACE\" (in path varchar, inout params varchar, in lines varchar)\n"
 "{\n"
 "http_header (\'Content-Type: message/http\\r\\n\');\n"
@@ -4540,11 +5084,11 @@ static const char *proc69 =
 "http (l);\n"
 "}\n"
 "}\n"
-"--src dav.sql:4463\n";
+"--src dav.sql:5003\n";
 
 /* dav_api.sql */
 
-static const char *proc70 = 
+static const char *proc74 = 
 "#line 51 \"[executable]/dav_api.sql\"\n"
 "create function DAV_PERROR (in x any)\n"
 "{\n"
@@ -4604,7 +5148,7 @@ static const char *proc70 =
 "}\n"
 "--src dav_api.sql:49\n";
 
-static const char *proc71 = 
+static const char *proc75 = 
 "#line 110 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_ADD_USER_INT (in uid varchar,\n"
@@ -4654,7 +5198,7 @@ static const char *proc71 =
 "}\n"
 "--src dav_api.sql:108\n";
 
-static const char *proc72 = 
+static const char *proc76 = 
 "#line 159 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_ADD_USER (in uid varchar, in pwd varchar, in gid varchar,\n"
@@ -4693,7 +5237,7 @@ static const char *proc72 =
 "}\n"
 "--src dav_api.sql:157\n";
 
-static const char *proc73 = 
+static const char *proc77 = 
 "#line 197 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_DELETE_USER (in uid varchar, in auth_uname varchar := NULL, in auth_pwd varchar := NULL)\n"
@@ -4711,21 +5255,21 @@ static const char *proc73 =
 "}\n"
 "--src dav_api.sql:195\n";
 
-static const char *proc74 = 
+static const char *proc78 = 
 "#line 214 \"[executable]/dav_api.sql\"\n"
 " create function DAV_REGEXP_PATTERN_FOR_PERM () returns varchar {\n"
 "return \'^[01][01][01][01][01][01][01][01][01]([NTR-]([NMR-])?)?\\044\';\n"
 "}\n"
 "--src dav_api.sql:212\n";
 
-static const char *proc75 = 
+static const char *proc79 = 
 "#line 219 \"[executable]/dav_api.sql\"\n"
 "create function DAV_REGEXP_PATTERN_FOR_UNIX_PERM () returns varchar {\n"
 "return \'^[r\\\\-][w\\\\-][x\\\\-][r\\\\-][w\\\\-][x\\\\-][r\\\\-][w\\\\-][x\\\\-]([NTR-]([NMR-])?)?\\044\';\n"
 "}\n"
 "--src dav_api.sql:217\n";
 
-static const char *proc76 = 
+static const char *proc80 = 
 "#line 225 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_PERM_D2U (in perms varchar)\n"
@@ -4746,7 +5290,7 @@ static const char *proc76 =
 "}\n"
 "--src dav_api.sql:223\n";
 
-static const char *proc77 = 
+static const char *proc81 = 
 "#line 245 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_PERM_U2D (in perms varchar)\n"
@@ -4770,7 +5314,7 @@ static const char *proc77 =
 "}\n"
 "--src dav_api.sql:243\n";
 
-static const char *proc78 = 
+static const char *proc82 = 
 "#line 267 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_CHECK_AUTH (in auth_uname varchar := NULL, in auth_pwd varchar := NULL, in adm integer := 0) returns integer\n"
@@ -4805,7 +5349,7 @@ static const char *proc78 =
 "}\n"
 "--src dav_api.sql:265\n";
 
-static const char *proc79 = 
+static const char *proc83 = 
 "#line 301 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_HOME_DIR (in uid varchar) returns any\n"
@@ -4819,7 +5363,7 @@ static const char *proc79 =
 "}\n"
 "--src dav_api.sql:299\n";
 
-static const char *proc80 = 
+static const char *proc84 = 
 "#line 313 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_HOME_DIR_CREATE (in uid varchar) returns any\n"
@@ -4843,13 +5387,13 @@ static const char *proc80 =
 "if (isnull (DAV_HIDE_ERROR (rc)))\n"
 "goto _end;\n"
 "\n"
-"host := cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DefaultHost\');\n"
+"host := virtuoso_ini_item_value (\'URIQA\', \'DefaultHost\');\n"
 "if (host is null) {\n"
 "host := sys_stat (\'st_host_name\');\n"
 "if (server_http_port () <> \'80\')\n"
 "host := host ||\':\'|| server_http_port ();\n"
 "}\n"
-"rc := DAV_PROP_SET_INT (path, \'virt:rdf_graph\', \'http://\' || host || path, null, null, 0, 0);\n"
+"rc := DAV_PROP_SET_INT (path, \'virt:rdf_graph\', rtrim (\'http://\' || host || path, \'/\') || \'#this\', null, null, 0, 0);\n"
 "if (isnull (DAV_HIDE_ERROR (rc)))\n"
 "goto _end;\n"
 "rc := DAV_PROP_SET_INT (path, \'virt:rdf_sponger\', \'on\', null, null, 0, 0);\n"
@@ -4861,7 +5405,7 @@ static const char *proc80 =
 "}\n"
 "--src dav_api.sql:311\n";
 
-static const char *proc81 = 
+static const char *proc85 = 
 "#line 353 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_ADD_GROUP_INT (in gid varchar)\n"
@@ -4876,7 +5420,7 @@ static const char *proc81 =
 "}\n"
 "--src dav_api.sql:351\n";
 
-static const char *proc82 = 
+static const char *proc86 = 
 "#line 367 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_ADD_GROUP (in gid varchar, in auth_uname varchar := NULL, in auth_pwd varchar := NULL)\n"
@@ -4887,7 +5431,7 @@ static const char *proc82 =
 "}\n"
 "--src dav_api.sql:365\n";
 
-static const char *proc83 = 
+static const char *proc87 = 
 "#line 377 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_DELETE_GROUP (in gid varchar, in auth_uname varchar := NULL, in auth_pwd varchar := NULL)\n"
@@ -4903,7 +5447,7 @@ static const char *proc83 =
 "}\n"
 "--src dav_api.sql:375\n";
 
-static const char *proc84 = 
+static const char *proc88 = 
 "#line 393 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_DIR_LIST (in path varchar := \'/DAV/\', in recursive integer, in auth_uname varchar, in auth_pwd varchar) returns any\n"
@@ -4917,7 +5461,7 @@ static const char *proc84 =
 "}\n"
 "--src dav_api.sql:391\n";
 
-static const char *proc85 = 
+static const char *proc89 = 
 "#line 406 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_DIR_FILTER (in path varchar := \'/DAV/\', in recursive integer := 0, inout filter any, in auth_uname varchar, in auth_pwd varchar) returns any\n"
@@ -4934,7 +5478,7 @@ static const char *proc85 =
 "}\n"
 "--src dav_api.sql:404\n";
 
-static const char *proc86 = 
+static const char *proc90 = 
 "#line 422 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_GET_PARENT (in id any, in st char(1), in path varchar) returns any\n"
@@ -4952,7 +5496,7 @@ static const char *proc86 =
 "}\n"
 "--src dav_api.sql:420\n";
 
-static const char *proc87 = 
+static const char *proc91 = 
 "#line 439 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_DIR_SINGLE_INT (in did any, in st char (0), in path varchar, in auth_uname varchar := null, in auth_pwd varchar := null, in auth_uid integer := null) returns any\n"
@@ -4998,7 +5542,7 @@ static const char *proc87 =
 "}\n"
 "--src dav_api.sql:437\n";
 
-static const char *proc88 = 
+static const char *proc92 = 
 "#line 484 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_DIR_LIST_INT (in path varchar := \'/DAV/\', in rec_depth integer := 0, in name_mask varchar, in auth_uname varchar := null, in auth_pwd varchar := null, inout auth_uid integer := null) returns any\n"
@@ -5121,7 +5665,7 @@ static const char *proc88 =
 "}\n"
 "--src dav_api.sql:482\n";
 
-static const char *proc89 = 
+static const char *proc93 = 
 "#line 606 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_DIR_FILTER_INT (in path varchar := \'/DAV/\', in rec_depth integer := 0, in compilation any, in auth_uname varchar := null, in auth_pwd varchar := null, in auth_uid integer := null) returns any\n"
@@ -5273,7 +5817,7 @@ static const char *proc89 =
 "}\n"
 "--src dav_api.sql:604\n";
 
-static const char *proc90 = 
+static const char *proc94 = 
 "#line 758 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_SEARCH_PATH (in id any, in what char (1)) returns any\n"
@@ -5308,7 +5852,7 @@ static const char *proc90 =
 "}\n"
 "--src dav_api.sql:756\n";
 
-static const char *proc91 = 
+static const char *proc95 = 
 "#line 793 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_SEARCH_ID (in path any, in what char (1)) returns any\n"
@@ -5397,7 +5941,7 @@ static const char *proc91 =
 "}\n"
 "--src dav_api.sql:791\n";
 
-static const char *proc92 = 
+static const char *proc96 = 
 "#line 881 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_SEARCH_SOME_ID (in path any, out what char (1)) returns any\n"
@@ -5439,7 +5983,7 @@ static const char *proc92 =
 "}\n"
 "--src dav_api.sql:879\n";
 
-static const char *proc93 = 
+static const char *proc97 = 
 "#line 922 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_HIDE_ERROR (in res any, in dflt any := null) returns any\n"
@@ -5452,7 +5996,7 @@ static const char *proc93 =
 "}\n"
 "--src dav_api.sql:920\n";
 
-static const char *proc94 = 
+static const char *proc98 = 
 "#line 935 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_HIDE_ERROR_OR_DET (in res any, in dflt_err any := null, in dflt_det any := -33) returns any\n"
@@ -5465,7 +6009,7 @@ static const char *proc94 =
 "}\n"
 "--src dav_api.sql:933\n";
 
-static const char *proc95 = 
+static const char *proc99 = 
 "#line 948 \"[executable]/dav_api.sql\"\n"
 " create function DAV_CONCAT_PATH (in parts1 any, in parts2 any)\n"
 "{\n"
@@ -5528,7 +6072,7 @@ static const char *proc95 =
 "}\n"
 "--src dav_api.sql:946\n";
 
-static const char *proc96 = 
+static const char *proc100 = 
 "#line 1010 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_SEARCH_SOME_ID_OR_DET (inout path any, out what char (1), out det_ret varchar, out detcol_id integer, out detcol_path_parts any, out unreached_path_parts any) returns integer\n"
@@ -5555,7 +6099,7 @@ static const char *proc96 =
 "}\n"
 "--src dav_api.sql:1008\n";
 
-static const char *proc97 = 
+static const char *proc101 = 
 "#line 1035 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_SEARCH_ID_OR_DET (in path any, in what char (1), out det_ret varchar, out detcol_id integer, out detcol_path_parts any, out unreached_path_parts any) returns integer\n"
@@ -5681,7 +6225,7 @@ static const char *proc97 =
 "}\n"
 "--src dav_api.sql:1033\n";
 
-static const char *proc98 = 
+static const char *proc102 = 
 "#line 1160 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_OWNER_ID (in uid any, in gid any, out _uid integer, out _gid integer)\n"
@@ -5711,7 +6255,7 @@ static const char *proc98 =
 "}\n"
 "--src dav_api.sql:1158\n";
 
-static const char *proc99 = 
+static const char *proc103 = 
 "#line 1189 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_IS_LOCKED_INT (inout id any, inout type char, in owned_tokens varchar := \'\')\n"
 "{\n"
@@ -5778,7 +6322,7 @@ static const char *proc99 =
 "}\n"
 "--src dav_api.sql:1187\n";
 
-static const char *proc100 = 
+static const char *proc104 = 
 "#line 1256 \"[executable]/dav_api.sql\"\n"
 " create function DAV_IS_LOCKED (in id any, in type char, in owned_tokens any := 1) returns integer\n"
 "{\n"
@@ -5793,7 +6337,7 @@ static const char *proc100 =
 "}\n"
 "--src dav_api.sql:1254\n";
 
-static const char *proc101 = 
+static const char *proc105 = 
 "#line 1270 \"[executable]/dav_api.sql\"\n"
 " create function DAV_LIST_LOCKS (in id any, in type char) returns any\n"
 "{\n"
@@ -5801,7 +6345,7 @@ static const char *proc101 =
 "}\n"
 "--src dav_api.sql:1268\n";
 
-static const char *proc102 = 
+static const char *proc106 = 
 "#line 1276 \"[executable]/dav_api.sql\"\n"
 "create function DAV_LIST_LOCKS_INT (in id any, in type char) returns any\n"
 "{\n"
@@ -5825,7 +6369,7 @@ static const char *proc102 =
 "}\n"
 "--src dav_api.sql:1274\n";
 
-static const char *proc103 = 
+static const char *proc107 = 
 "#line 1298 \"[executable]/dav_api.sql\"\n"
 "create function DAV_LOCK (in path any, in locktype varchar, in scope varchar, in token varchar, in owner_name varchar, in owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid varchar, in auth_pwd varchar) returns any\n"
 "{\n"
@@ -5838,7 +6382,7 @@ static const char *proc103 =
 "}\n"
 "--src dav_api.sql:1296\n";
 
-static const char *proc104 = 
+static const char *proc108 = 
 "#line 1309 \"[executable]/dav_api.sql\"\n"
 "create function DAV_LOCK_INT (in path any, inout id any, inout st char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer) returns any\n"
 "{\n"
@@ -5996,7 +6540,7 @@ static const char *proc104 =
 "}\n"
 "--src dav_api.sql:1307\n";
 
-static const char *proc105 = 
+static const char *proc109 = 
 "#line 1465 \"[executable]/dav_api.sql\"\n"
 "create function DAV_UNLOCK (in path varchar, in token varchar, in auth_uname varchar, in auth_pwd varchar) returns any\n"
 "{\n"
@@ -6009,7 +6553,7 @@ static const char *proc105 =
 "}\n"
 "--src dav_api.sql:1463\n";
 
-static const char *proc106 = 
+static const char *proc110 = 
 "#line 1477 \"[executable]/dav_api.sql\"\n"
 "create function DAV_UNLOCK_INT (in id any, in st char(1), in token varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer) returns any\n"
 "{\n"
@@ -6049,7 +6593,7 @@ static const char *proc106 =
 "}\n"
 "--src dav_api.sql:1475\n";
 
-static const char *proc107 = 
+static const char *proc111 = 
 "#line 1516 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_REQ_CHARS_TO_BITMASK (in req varchar) returns integer\n"
@@ -6058,12 +6602,12 @@ static const char *proc107 =
 "}\n"
 "--src dav_api.sql:1514\n";
 
-static const char *proc108 = 
+static const char *proc112 = 
 "#line 1525 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_AUTHENTICATE (in id any, in what char(1), in req varchar, in a_uname varchar, in a_pwd varchar, in a_uid integer := null) returns integer\n"
 "{\n"
-"declare oid, ogid, puid, pgid integer;\n"
+"declare rc, oid, ogid, puid, pgid integer;\n"
 "declare opwd, pperms varchar;\n"
 "declare pacl varbinary;\n"
 "what := upper (what);\n"
@@ -6104,18 +6648,11 @@ static const char *proc108 =
 "}\n"
 "if (isarray (id))\n"
 "{\n"
-"declare detcol_id integer;\n"
+"rc := call (cast (id[0] as varchar) || \'_DAV_AUTHENTICATE\') (id, what, req, a_uname, a_pwd, a_uid);\n"
+"if (rc = -20)\n"
+"rc := DAV_AUTHENTICATE (id[1], \'C\', req, a_uname, a_pwd, a_uid);\n"
 "\n"
-"detcol_id := id[1];\n"
-"select COL_OWNER, COL_GROUP, COL_PERMS, COL_ACL into puid, pgid, pperms, pacl from WS.WS.SYS_DAV_COL where COL_ID = detcol_id;\n"
-"if (not DAV_CHECK_PERM (pperms, req, oid, ogid, pgid, puid))\n"
-"{\n"
-"if (not WS.WS.ACL_IS_GRANTED (pacl, oid, 4))\n"
-"{\n"
-"return -13;\n"
-"}\n"
-"}\n"
-"return call (cast (id[0] as varchar) || \'_DAV_AUTHENTICATE\') (id, what, req, a_uname, a_pwd, a_uid);\n"
+"return rc;\n"
 "}\n"
 "whenever not found goto nf_col_or_res;\n"
 "if (what = \'R\')\n"
@@ -6165,8 +6702,8 @@ static const char *proc108 =
 "}\n"
 "--src dav_api.sql:1523\n";
 
-static const char *proc109 = 
-"#line 1630 \"[executable]/dav_api.sql\"\n"
+static const char *proc113 = 
+"#line 1623 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_AUTHENTICATE_HTTP (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -6187,8 +6724,8 @@ static const char *proc109 =
 "declare d__perms varchar;\n"
 "\n"
 "rc := call (cast (id[0] as varchar) || \'_DAV_AUTHENTICATE_HTTP\') (id, what, req, can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, _perms);\n"
-"if (rc >= 0)\n"
-"rc := DAV_AUTHENTICATE_HTTP (id[1], \'C\', \'1__\', can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, d__perms);\n"
+"if (rc = -20)\n"
+"rc := DAV_AUTHENTICATE_HTTP (id[1], \'C\', req, can_write_http, a_lines, a_uname, a_pwd, a_uid, a_gid, _perms);\n"
 "\n"
 "return rc;\n"
 "}\n"
@@ -6278,10 +6815,10 @@ static const char *proc109 =
 "\n"
 "return -1;\n"
 "}\n"
-"--src dav_api.sql:1628\n";
+"--src dav_api.sql:1621\n";
 
-static const char *proc110 = 
-"#line 1743 \"[executable]/dav_api.sql\"\n"
+static const char *proc114 = 
+"#line 1736 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_AUTHENTICATE_SSL_ITEM (\n"
 "inout id any,\n"
@@ -6302,10 +6839,10 @@ static const char *proc110 =
 "id := DAV_SEARCH_ID (path, what);\n"
 "}\n"
 "}\n"
-"--src dav_api.sql:1741\n";
+"--src dav_api.sql:1734\n";
 
-static const char *proc111 = 
-"#line 1765 \"[executable]/dav_api.sql\"\n"
+static const char *proc115 = 
+"#line 1758 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_AUTHENTICATE_SSL_CONDITION () returns integer\n"
 "{\n"
@@ -6314,100 +6851,51 @@ static const char *proc111 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:1763\n";
+"--src dav_api.sql:1756\n";
 
-static const char *proc112 = 
-"#line 1775 \"[executable]/dav_api.sql\"\n"
+static const char *proc116 = 
+"#line 1770 \"[executable]/dav_api.sql\"\n"
+"create function DAV_WEBID_QR (in gr varchar, in uri varchar)\n"
+"{\n"
+"return sprintf (\'sparql \n"
+"define input:storage \"\"  \n"
+"define input:same-as \"yes\"\n"
+"prefix cert: <http://www.w3.org/ns/auth/cert#>  \n"
+"prefix rsa: <http://www.w3.org/ns/auth/rsa#>  \n"
+"select (str (?exp)) (str (?mod))  \n"
+"from <%S>  \n"
+"where \n"
+"{  	  \n"
+"{ ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod .  } 	  \n"
+"union \n"
+"{ ?id cert:identity <%S> ; rsa:public_exponent ?exp1 ; rsa:modulus ?mod1 . ?exp1 cert:decimal ?exp . ?mod1 cert:hex ?mod . }  	  \n"
+"union \n"
+"{ <%S> cert:key ?key . ?key cert:exponent ?exp . ?key cert:modulus ?mod .  }        \n"
+"}\', gr, uri, uri, uri);\n"
+"}\n"
+"--src dav_api.sql:1768\n";
+
+static const char *proc117 = 
+"#line 1791 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_AUTHENTICATE_SSL_WEBID ()\n"
 "{\n"
-"declare retIRI varchar;\n"
-"declare graph, baseGraph, foafIRI, foafGraph, loadIRI, localIRI any;\n"
-"declare S, V, info, st, msg, data, meta any;\n"
+"declare webid varchar;\n"
+"declare cert, dummy, vtype any;\n"
 "\n"
-"retIRI := null;\n"
-"\n"
-"set_user_id (\'dba\');\n"
-"foafIRI := trim (get_certificate_info (7, null, null, null, \'2.5.29.17\'));\n"
-"V := regexp_replace (foafIRI, \',[ ]*\', \',\', 1, null);\n"
-"V := split_and_decode (V, 0, \'\\0\\0,:\');\n"
-"if (V is null)\n"
-"V := vector ();\n"
-"foafIRI := get_keyword (\'URI\', V);\n"
-"if (isnull (foafIRI))\n"
-"{\n"
-"if (__proc_exists (\'DB.DBA.FOAF_SSL_WEBFINGER\') is not null)\n"
-"{\n"
-"retIRI := DB.DBA.FOAF_SSL_WEBFINGER ();\n"
-"if (not isnull (retIRI))\n"
-"goto _exit;\n"
-"}\n"
-"if (__proc_exists (\'ODS.DBA.FINGERPOINT_WEBID_GET\') is not null)\n"
-"{\n"
-"retIRI := ODS.DBA.FINGERPOINT_WEBID_GET ();\n"
-"if (not isnull (retIRI))\n"
-"goto _exit;\n"
-"}\n"
-"} else {\n"
-"foafGraph := \'http://local.virt/FOAF/\' || cast (rnd (1000) as varchar);\n"
-"localIRI := foafIRI;\n"
-"V := rfc1808_parse_uri (localIRI);\n"
-"if (is_https_ctx () and\n"
-"cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DynamicLocal\') = \'1\' and\n"
-"V[1] = registry_get (\'URIQADefaultHost\'))\n"
-"{\n"
-"V [0] := \'local\';\n"
-"V [1] := \'\';\n"
-"localIRI := db.dba.vspx_uri_compose (V);\n"
-"}\n"
-"V := rfc1808_parse_uri (foafIRI);\n"
-"V[5] := \'\';\n"
-"loadIRI := DB.DBA.vspx_uri_compose (V);\n"
-"S := sprintf (\'sparql load <%s> into graph <%s>\', loadIRI, foafGraph);\n"
-"st := \'00000\';\n"
-"exec (S, st, msg, vector (), 0);\n"
-"if (st = \'00000\')\n"
-"{\n"
-"S := sprintf (\' sparql define input:storage \"\" \' ||\n"
-"\' prefix cert: <http://www.w3.org/ns/auth/cert#> \' ||\n"
-"\' prefix rsa: <http://www.w3.org/ns/auth/rsa#> \' ||\n"
-"\' select (str (bif:coalesce (?exp_val, ?exp))) \' ||\n"
-"\'        (str (bif:coalesce (?mod_val, ?mod))) \' ||\n"
-"\'   from <%s> \' ||\n"
-"\'  where { \' ||\n"
-"\'          ?id cert:identity <%s> ; \' ||\n"
-"\'              rsa:public_exponent ?exp ; \' ||\n"
-"\'              rsa:modulus ?mod . \' ||\n"
-"\'          optional { ?exp cert:decimal ?exp_val . \' ||\n"
-"\'          ?mod cert:hex ?mod_val . } \' ||\n"
-"\'        }\',\n"
-"foafGraph,\n"
-"localIRI);\n"
-"exec (S, st, msg, vector (), 0, meta, data);\n"
-"if (st = \'00000\')\n"
+"webid := null;\n"
+"if (__proc_exists (\'DB.DBA.WEBID_AUTH_GEN_2\') is not null)\n"
 "{\n"
-"info := get_certificate_info (9);\n"
-"foreach (any _row in data) do\n"
-"{\n"
-"if (_row[0] = cast (info[1] as varchar) and\n"
-"lower (regexp_replace (_row[1], \'[^A-Z0-9a-f]\', \'\', 1, null)) = bin2hex (info[2]))\n"
-"{\n"
-"retIRI := foafIRI;\n"
-"goto _break;\n"
-"}\n"
-"}\n"
+"cert := client_attr (\'client_certificate\');\n"
+"dummy := null;\n"
+"DB.DBA.WEBID_AUTH_GEN_2 (cert, 0, null, 1, 0, webid, dummy, 0, vtype);\n"
 "}\n"
+"return webid;\n"
 "}\n"
-"_break:;\n"
-"exec (sprintf (\'SPARQL clear graph <%s>\', foafGraph), st, msg, vector (), 0);\n"
-"}\n"
-"_exit:\n"
-"return retIRI;\n"
-"}\n"
-"--src dav_api.sql:1773\n";
+"--src dav_api.sql:1789\n";
 
-static const char *proc113 = 
-"#line 1863 \"[executable]/dav_api.sql\"\n"
+static const char *proc118 = 
+"#line 1808 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_AUTHENTICATE_SSL (\n"
 "in id any,\n"
@@ -6432,10 +6920,7 @@ static const char *proc113 =
 "goto _exit;\n"
 "\n"
 "set_user_id (\'dba\');\n"
-"foafIRI := DAV_AUTHENTICATE_SSL_WEBID ();\n"
-"if (isnull (foafIRI))\n"
-"goto _exit;\n"
-"\n"
+"foafIRI := null;\n"
 "tmp := \'/\';\n"
 "V := vector ();\n"
 "T := split_and_decode (trim (path, \'/\'), 0, \'\\0\\0/\');\n"
@@ -6453,9 +6938,15 @@ static const char *proc113 =
 "what := \'C\';\n"
 "id := DAV_SEARCH_ID (V[N], what);\n"
 "}\n"
-"if (exists (select 1 from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = id and PROP_TYPE = what and PROP_NAME = \'virt:aci_meta_n3\'))\n"
+"if (isinteger (id) and exists (select 1 from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = id and PROP_TYPE = what and PROP_NAME = \'virt:aci_meta_n3\'))\n"
 "{\n"
 "tmp := null;\n"
+"if (isnull (foafIRI))\n"
+"{\n"
+"foafIRI := DB.DBA.DAV_AUTHENTICATE_SSL_WEBID ();\n"
+"if (isnull (foafIRI))\n"
+"goto _exit;\n"
+"}\n"
 "graph := WS.WS.DAV_IRI (V[N]);\n"
 "for (\n"
 "sparql\n"
@@ -6505,18 +6996,18 @@ static const char *proc113 =
 "}\n"
 "order by ?p3 ?p2 ?p1 ?mode) do\n"
 "{\n"
-"if      (not isnull (p1))\n"
+"if      (not isnull (\"p1\"))\n"
 "I := 0;\n"
-"else if (not isnull (p2))\n"
+"else if (not isnull (\"p2\"))\n"
 "I := 1;\n"
-"else if (not isnull (p3))\n"
+"else if (not isnull (\"p3\"))\n"
 "I := 2;\n"
 "else\n"
 "goto _skip;\n"
 "\n"
-"if (tmp <> coalesce (p1, coalesce (p2, p3)))\n"
+"if (tmp <> coalesce (\"p1\", coalesce (\"p2\", \"p3\")))\n"
 "{\n"
-"tmp := coalesce (p1, coalesce (p2, p3));\n"
+"tmp := coalesce (\"p1\", coalesce (\"p2\", \"p3\"));\n"
 "for (M := 0; M < length (IRIs[I]); M := M + 1)\n"
 "{\n"
 "if (tmp = IRIs[I][M])\n"
@@ -6524,11 +7015,11 @@ static const char *proc113 =
 "}\n"
 "}\n"
 "\n"
-"if      (mode like \'%#Read\')\n"
+"if (\"mode\" like \'%#Read\')\n"
 "realMode[0] := 1;\n"
-"else if (mode like \'%#Write\')\n"
+"else if (\"mode\" like \'%#Write\')\n"
 "realMode[1] := 1;\n"
-"else if (mode like \'%#Control\')\n"
+"else if (\"mode\" like \'%#Execute\')\n"
 "realMode[2] := 1;\n"
 "\n"
 "if ((reqMode[0] <= realMode[0]) and (reqMode[1] <= realMode[1]) and (reqMode[2] <= realMode[2]))\n"
@@ -6550,10 +7041,10 @@ static const char *proc113 =
 "\n"
 "return rc;\n"
 "}\n"
-"--src dav_api.sql:1861\n";
+"--src dav_api.sql:1806\n";
 
-static const char *proc114 = 
-"#line 2009 \"[executable]/dav_api.sql\"\n"
+static const char *proc119 = 
+"#line 1957 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_COL_CREATE (\n"
 "in path varchar,\n"
@@ -6566,10 +7057,10 @@ static const char *proc114 =
 "return DAV_COL_CREATE_INT (\n"
 "path, permissions, uid, gid, auth_uid, auth_pwd, 1, 1, 1, null, null);\n"
 "}\n"
-"--src dav_api.sql:2007\n";
+"--src dav_api.sql:1955\n";
 
-static const char *proc115 = 
-"#line 2024 \"[executable]/dav_api.sql\"\n"
+static const char *proc120 = 
+"#line 1972 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_COL_CREATE_INT (\n"
 "in path varchar,\n"
@@ -6657,10 +7148,10 @@ static const char *proc115 =
 "}\n"
 "return rc;\n"
 "}\n"
-"--src dav_api.sql:2022\n";
+"--src dav_api.sql:1970\n";
 
-static const char *proc116 = 
-"#line 2114 \"[executable]/dav_api.sql\"\n"
+static const char *proc121 = 
+"#line 2062 \"[executable]/dav_api.sql\"\n"
 "create procedure DB.DBA.IS_REDIRECT_REF (inout path any)\n"
 "{\n"
 "for (select blob_to_string (PROP_VALUE) redirectRef\n"
@@ -6677,10 +7168,10 @@ static const char *proc116 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:2112\n";
+"--src dav_api.sql:2060\n";
 
-static const char *proc117 = 
-"#line 2134 \"[executable]/dav_api.sql\"\n"
+static const char *proc122 = 
+"#line 2082 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_RES_UPLOAD (\n"
 "in path varchar,\n"
@@ -6695,10 +7186,10 @@ static const char *proc117 =
 "check_locks := 1;\n"
 "return (DAV_RES_UPLOAD_STRSES_INT (path, content, type, permissions, uid, gid, auth_uid, auth_pwd, 1, null, null, null, null, null, check_locks));\n"
 "}\n"
-"--src dav_api.sql:2132\n";
+"--src dav_api.sql:2080\n";
 
-static const char *proc118 = 
-"#line 2151 \"[executable]/dav_api.sql\"\n"
+static const char *proc123 = 
+"#line 2099 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_RES_UPLOAD_STRSES (\n"
 "in path varchar,\n"
@@ -6713,10 +7204,10 @@ static const char *proc118 =
 "check_locks := 1;\n"
 "return (DAV_RES_UPLOAD_STRSES_INT (path, content, type, permissions, uid, gid, auth_uid, auth_pwd, 1, null, null, null, null, null, check_locks));\n"
 "}\n"
-"--src dav_api.sql:2149\n";
+"--src dav_api.sql:2097\n";
 
-static const char *proc119 = 
-"#line 2168 \"[executable]/dav_api.sql\"\n"
+static const char *proc124 = 
+"#line 2116 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_RES_UPLOAD_STRSES_INT (\n"
 "in path varchar,\n"
@@ -6745,10 +7236,14 @@ static const char *proc119 =
 "log_enable (bit_or (old_log_mode, 4), 1);\n"
 "return rc;\n"
 "}\n"
-"--src dav_api.sql:2166\n";
+"--src dav_api.sql:2114\n";
 
-static const char *proc120 = 
-"#line 2198 \"[executable]/dav_api.sql\"\n"
+static const char *tbl0 = 
+"create table RDF_SINK_QUEUE (RSQ_PATH varchar, RSQ_ID int, RSQ_C_ID int, RSQ_GRAPH varchar, RSQ_STATE int, RSQ_TS timestamp, RSQ_TYPE varchar, RSQ_UID int, RSQ_GID int, primary key (RSQ_ID))\n"
+"create index RDF_SINK_QUEUE_STAT on RDF_SINK_QUEUE (RSQ_STATE, RSQ_TS)    \n";
+
+static const char *proc125 = 
+"#line 2151 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_RES_UPLOAD_STRSES_INT_INNER (\n"
 "in path varchar,\n"
@@ -7022,42 +7517,127 @@ static const char *proc120 =
 "\n"
 "\n"
 "\n"
-"declare c_id integer;\n"
-"declare is_rdf integer;\n"
-"declare rdf_graph, rdf_graph2, rdf_sponger any;\n"
-"declare rdf_graph_resource_id, rdf_graph_resource_name, rdf_graph_resource_path, host any;\n"
+"declare c_id, depth integer;\n"
+"declare rdf_graph any;\n"
+"declare _col_p_id, _inherit any;\n"
 "\n"
 "\n"
 "RDF_SINK_DELETE (path);\n"
 "\n"
 "\n"
-"is_rdf := 0;\n"
-"\n"
-"\n"
 "c_id := (select RES_COL from WS.WS.SYS_DAV_RES where RES_ID = rc);\n"
 "\n"
-"\n"
+"rdf_graph := null;   \n"
+"depth := 0; \n"
+"{\n"
+"whenever not found goto rdfg_found;\n"
+"look_again:  \n"
+"select COL_PARENT, COL_INHERIT into _col_p_id, _inherit from WS.WS.SYS_DAV_COL where COL_ID = c_id;\n"
 "rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = \'C\' and PROP_NAME = \'virt:rdf_graph\');\n"
+"if ((_inherit = \'R\' or (depth = 1 and _inherit = \'M\') or depth = 0) and length (rdf_graph))\n"
+"goto rdfg_found;\n"
+"c_id := _col_p_id;\n"
+"depth := depth + 1;\n"
+"rdf_graph := null;\n"
+"goto look_again;\n"
+"}\n"
+"rdfg_found:; \n"
 "if (not DB.DBA.is_empty_or_null (rdf_graph))\n"
 "{\n"
+"declare aq any;\n"
+"insert soft RDF_SINK_QUEUE (RSQ_PATH, RSQ_ID, RSQ_C_ID, RSQ_GRAPH, RSQ_STATE, RSQ_TYPE, RSQ_UID, RSQ_GID) values (path, rc, c_id, rdf_graph, 0, type, ouid, ogid);\n"
+"set_user_id (user);\n"
+"aq := async_queue (1);\n"
+"aq_request (aq, \'DB.DBA.RDF_SINK_AQ_RUN\', vector ());\n"
+"}\n"
+"return rc;\n"
+"\n"
+"unhappy_upload:\n"
+"if (__SQL_STATE = \'HT507\')\n"
+"return -41;\n"
+"if (__SQL_STATE = \'HT508\')\n"
+"return -42;\n"
+"if (__SQL_STATE = \'HT509\')\n"
+"return -43;\n"
+"return -29;\n"
+"}\n"
+"--src dav_api.sql:2149\n";
+
+static const char *proc126 = 
+"#line 2470 \"[executable]/dav_api.sql\"\n"
+"create procedure RDF_SINK_AQ_GET ()\n"
+"{\n"
+"declare arr any;\n"
+"set isolation = \'serializable\';\n"
+"arr := (select vector_agg (vector (RSQ_PATH, RSQ_ID, RSQ_C_ID, RSQ_GRAPH, RSQ_TYPE, RSQ_UID, RSQ_GID)) from (select top 10 RSQ_PATH, RSQ_ID, RSQ_C_ID, RSQ_GRAPH, RSQ_TYPE, RSQ_UID, RSQ_GID \n"
+"from RDF_SINK_QUEUE where RSQ_STATE = 0 order by RSQ_TS for update) x);\n"
+"foreach (any x in arr) do\n"
+"{\n"
+"update RDF_SINK_QUEUE set RSQ_STATE = 1 where RSQ_ID = x[1];\n"
+"}\n"
+"commit work;\n"
+"return arr;\n"
+"}\n"
+"--src dav_api.sql:2468\n";
+
+static const char *proc127 = 
+"#line 2485 \"[executable]/dav_api.sql\"\n"
+"create procedure DB.DBA.RDF_SINK_AQ_RUN ()\n"
+"{\n"
+"declare aq, arr any;\n"
+"if (exists (select 1 from RDF_SINK_QUEUE where RSQ_STATE = 1))\n"
+"return;\n"
+"aq := async_queue (10);\n"
+"for (;;)\n"
+"{\n"
+"arr := RDF_SINK_AQ_GET ();\n"
+"if (not length (arr))\n"
+"return;\n"
+"foreach (any x in arr) do\n"
+"{\n"
+"aq_request (aq, \'DB.DBA.RDF_SINK_FUNC\', vector (x[0], x[1], x[2], x[3], x[4], x[5], x[6]));\n"
+"}\n"
+"aq_wait_all (aq);\n"
+"delete from RDF_SINK_QUEUE where RSQ_STATE = 2;\n"
+"commit work;\n"
+"}\n"
+"}\n"
+"--src dav_api.sql:2483\n";
+
+static const char *proc128 = 
+"#line 2507 \"[executable]/dav_api.sql\"\n"
+"create procedure DAV_RDF_RES_NAME (in rdf_graph varchar)\n"
+"{\n"
+"return replace ( replace ( replace ( replace ( replace ( replace ( replace (rdf_graph, \'/\', \'_\'), \'\\\\\', \'_\'), \':\', \'_\'), \'+\', \'_\'), \'\\\"\', \'_\'), \'[\', \'_\'), \']\', \'_\') || \'.RDF\';\n"
+"}\n"
+"--src dav_api.sql:2505\n";
+
+static const char *proc129 = 
+"#line 2513 \"[executable]/dav_api.sql\"\n"
+"create procedure RDF_SINK_FUNC (in path varchar, in rc int, in c_id int, in rdf_graph any, in type any, in ouid int, in ogid int)\n"
+"{\n"
+"declare rdf_sponger, rdf_cartridges, rdf_metaCartridges any;\n"
+"declare rdf_graph_resource_id, rdf_graph_resource_name, rdf_graph_resource_path, host, content any;\n"
 "declare exit handler for sqlstate \'*\'\n"
 "{\n"
 "goto _bad_content;\n"
 "};\n"
 "\n"
-"rdf_graph2 := \'http://local.virt\' || path;\n"
 "\n"
 "content := (select RES_CONTENT from WS.WS.SYS_DAV_RES where RES_ID = rc);\n"
 "rdf_sponger := coalesce((select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = \'C\' and PROP_NAME = \'virt:rdf_sponger\'), \'on\');\n"
+"rdf_cartridges := coalesce((select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = \'C\' and PROP_NAME = \'virt:rdf_cartridges\'), \'\');\n"
+"rdf_metaCartridges := coalesce((select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = \'C\' and PROP_NAME = \'virt:rdf_metaCartridges\'), \'\');\n"
 "\n"
-"if (RDF_SINK_UPLOAD (content, type, rdf_graph, rdf_graph2, rdf_sponger))\n"
+"if (RDF_SINK_UPLOAD (path, content, type, rdf_graph, rdf_sponger, rdf_cartridges, rdf_metaCartridges))\n"
 "{\n"
-"rdf_graph_resource_name := replace ( replace ( replace ( replace ( replace ( replace ( replace (rdf_graph, \'/\', \'_\'), \'\\\\\', \'_\'), \':\', \'_\'), \'+\', \'_\'), \'\\\"\', \'_\'), \'[\', \'_\'), \']\', \'_\') || \'.RDF\';\n"
+"rdf_graph_resource_name := DAV_RDF_RES_NAME (rdf_graph);\n"
+"rdf_graph_resource_name := replace (rdf_graph_resource_name, \' \', \'_\');\n"
 "rdf_graph_resource_path := WS.WS.COL_PATH (c_id) || rdf_graph_resource_name;\n"
 "if (isnull (DAV_HIDE_ERROR (DAV_SEARCH_ID (rdf_graph_resource_path, \'R\'))))\n"
 "{\n"
 "\n"
-"host := cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DefaultHost\');\n"
+"host := virtuoso_ini_item_value (\'URIQA\', \'DefaultHost\');\n"
 "if (host is null)\n"
 "{\n"
 "host := sys_stat (\'st_host_name\');\n"
@@ -7067,38 +7647,92 @@ static const char *proc120 =
 "rdf_graph_resource_id := WS.WS.GETID (\'R\');\n"
 "insert into WS.WS.SYS_DAV_RES (RES_ID, RES_NAME, RES_COL, RES_OWNER, RES_GROUP, RES_PERMS, RES_CR_TIME, RES_MOD_TIME, RES_TYPE, RES_CONTENT)\n"
 "values (rdf_graph_resource_id, rdf_graph_resource_name, c_id, ouid, ogid, \'111101101NN\', now (), now (), \'text/xml\', \'\');\n"
-"DB.DBA.DAV_PROP_SET_INT (rdf_graph_resource_path, \'redirectref\', sprintf (\'http://%s/sparql?default-graph-uri=%U&query=%U&format=%U\', host, rdf_graph, \'CONSTRUCT { ?s ?p ?o} WHERE {?s ?p ?o}\', \'text/xml\'), null, null, 0, 0, 1);\n"
+"DB.DBA.DAV_PROP_SET_INT (rdf_graph_resource_path, \'redirectref\', sprintf (\'http://%s/sparql?default-graph-uri=%U&query=%U&format=%U\', host, rdf_graph, \n"
+"\'CONSTRUCT { ?s ?p ?o} WHERE {?s ?p ?o}\', \'text/xml\'), null, null, 0, 0, 1);\n"
 "}\n"
 "}\n"
 "_bad_content:;\n"
+"update RDF_SINK_QUEUE set RSQ_STATE = 2 where RSQ_ID = rc;\n"
+"commit work;\n"
 "}\n"
-"return rc;\n"
-"\n"
-"unhappy_upload:\n"
-"if (__SQL_STATE = \'HT507\')\n"
-"return -41;\n"
-"if (__SQL_STATE = \'HT508\')\n"
-"return -42;\n"
-"if (__SQL_STATE = \'HT509\')\n"
-"return -43;\n"
-"return -29;\n"
-"}\n"
-"--src dav_api.sql:2196\n";
+"--src dav_api.sql:2511\n";
 
-static const char *proc121 = 
-"#line 2534 \"[executable]/dav_api.sql\"\n"
+static const char *proc130 = 
+"#line 2556 \"[executable]/dav_api.sql\"\n"
 "create procedure RDF_SINK_UPLOAD (\n"
-"inout content any,\n"
-"inout type varchar,\n"
+"in path varchar,  \n"
+"inout _content any,\n"
+"in type varchar,\n"
 "in rdf_graph varchar,\n"
-"in rdf_graph2 varchar,\n"
-"in rdf_sponger varchar)\n"
+"in rdf_sponger varchar,\n"
+"in rdf_cartridges varchar,\n"
+"in rdf_metaCartridges varchar)\n"
+"{\n"
+"declare rdf_iri, rdf_graph2 varchar;\n"
+"declare content any;\n"
+"\n"
+"if (length (_content) = 0)\n"
+"return 0; \n"
+"\n"
+"\n"
+"declare exit handler for sqlstate \'*\' {\n"
+"return 0;\n"
+"};\n"
+"\n"
+"if (path like \'%.zip\')\n"
+"{\n"
+"declare lst, tmp_file, zip_graph any;\n"
+"tmp_file := tmp_file_name ();\n"
+"declare exit handler for sqlstate \'*\' {\n"
+"file_delete (tmp_file, 1);\n"
+"return 0;\n"
+"};\n"
+"zip_graph := \'http://local.virt\' || path;\n"
+"string_to_file (tmp_file, _content, -2);\n"
+"lst := unzip_list (tmp_file);\n"
+"foreach (any x in lst) do\n"
+"{\n"
+"declare fname, item_graph, ss any;\n"
+"ss := string_output ();\n"
+"fname := x[0];\n"
+"content := unzip_file (tmp_file, fname);\n"
+"http_dav_url (fname, null, ss);\n"
+"fname := string_output_string (ss);\n"
+"item_graph := \'http://local.virt\' || path || \'/\' || fname;\n"
+"RDF_SINK_UPLOAD (concat (path, \'/\', fname), content, DAV_GUESS_MIME_TYPE_BY_NAME (fname), rdf_graph, rdf_sponger, rdf_cartridges, rdf_metaCartridges);\n"
+"SPARQL insert in graph ?:zip_graph { ?s ?p ?o } where { graph `iri(?:item_graph)` { ?s ?p ?o } };\n"
+"SPARQL clear graph ?:item_graph;\n"
+"} \n"
+"file_delete (tmp_file, 1);\n"
+"return 1;\n"
+"}\n"
+"\n"
+"content := _content; \n"
+"if (path like \'%.gz\' and length (_content) > 2)\n"
 "{\n"
+"declare magic, html_start varchar;\n"
+"magic := subseq (_content, 0, 2);\n"
+"html_start := null;\n"
+"if (magic[0] = 0hex1f and magic[1] = 0hex8b) \n"
+"{\n"
+"content := gzip_uncompress (cast (_content as varchar));\n"
+"path := regexp_replace (path, \'\\.gz\\x24\', \'\');\n"
+"type := DAV_GUESS_MIME_TYPE (path, content, html_start);	\n"
+"}\n"
+"}\n"
+"\n"
+"rdf_iri := WS.WS.DAV_IRI (path);\n"
+"rdf_graph2 := \'http://local.virt\' || path;\n"
 "if (\n"
 "strstr (type, \'application/rdf+xml\') is not null or\n"
 "strstr (type, \'application/foaf+xml\') is not null\n"
 ")\n"
 "{\n"
+"{\n"
+"declare exit handler for sqlstate \'*\'\n"
+"{\n"
+"goto _grddl;\n"
+"};\n"
 "if (rdf_sponger = \'on\')\n"
 "{\n"
 "declare xt any;\n"
@@ -7108,9 +7742,11 @@ static const char *proc121 =
 "goto _grddl;\n"
 "}\n"
 "DB.DBA.RDF_LOAD_RDFXML (blob_to_string (content), rdf_graph2, rdf_graph2);\n"
+"}\n"
 "goto _exit;\n"
 "}\n"
 "if (\n"
+"strstr (type, \'text/n3\') is not null or\n"
 "strstr (type, \'text/rdf+n3\') is not null or\n"
 "strstr (type, \'text/rdf+ttl\') is not null or\n"
 "strstr (type, \'application/rdf+n3\') is not null or\n"
@@ -7119,95 +7755,140 @@ static const char *proc121 =
 "strstr (type, \'application/x-turtle\') is not null\n"
 ")\n"
 "{\n"
-"DB.DBA.TTLP (content, rdf_graph2, rdf_graph2);\n"
+"{\n"
+"declare exit handler for sqlstate \'*\'\n"
+"{\n"
+"goto _grddl;\n"
+"};\n"
+"DB.DBA.TTLP (blob_to_string (content), rdf_graph2, rdf_graph2);\n"
+"}\n"
 "goto _exit;\n"
 "}\n"
 "\n"
 "_grddl:;\n"
 "if (rdf_sponger = \'on\')\n"
 "{\n"
-"declare aq, ps, xrc any;\n"
-"declare ret_body varchar;\n"
+"declare rc, rcMeta integer;\n"
+"declare ret_body varchar;\n"
+"declare exit handler for sqlstate \'*\'\n"
+"{\n"
+"goto _exit;\n"
+"};\n"
+"\n"
+"ret_body := cast (content as varchar);\n"
+"\n"
+"rc := RDF_SINK_UPLOAD_CARTRIDGES (ret_body, type, \'select RM_ID, RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID\', rdf_iri, rdf_graph2, rdf_cartridges);\n"
+"\n"
+"rcMeta := RDF_SINK_UPLOAD_CARTRIDGES (ret_body, type, \'select MC_ID, MC_PATTERN, MC_TYPE, MC_HOOK, MC_KEY, MC_OPTIONS from DB.DBA.RDF_META_CARTRIDGES where MC_ENABLED = 1 order by MC_SEQ, MC_ID\', rdf_iri, rdf_graph2, rdf_metaCartridges);\n"
+"if (rc or rcMeta)\n"
+"goto _exit;\n"
+"}\n"
+"return 0;\n"
+"\n"
+"_exit:\n"
+"SPARQL insert in graph ?:rdf_graph { ?s ?p ?o } where { graph `iri(?:rdf_graph2)` { ?s ?p ?o } };\n"
+"return 1;\n"
+"}\n"
+"--src dav_api.sql:2554\n";
+
+static const char *proc131 = 
+"#line 2688 \"[executable]/dav_api.sql\"\n"
+"create procedure RDF_SINK_UPLOAD_CARTRIDGES (\n"
+"inout content any,\n"
+"inout type varchar,\n"
+"in S varchar,\n"
+"in rdf_iri varchar,\n"
+"in rdf_graph varchar,\n"
+"in rdf_cartridges varchar)\n"
+"{\n"
+"declare cnt, hasSelection integer;\n"
+"declare cname, pname varchar;\n"
+"declare cartridges, aq, ps any;\n"
+"declare xrc, val_match any;\n"
+"declare st, msg, meta, rows, opts any;\n"
 "\n"
-"ret_body := cast (content as varchar);\n"
-"ps := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'PingService\');\n"
-"aq := case when (length (ps)) then async_queue (1) else null end;\n"
-"for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do\n"
+"st := \'00000\';\n"
+"exec (S, st, msg, vector (), vector (\'use_cache\', 1), meta, rows);\n"
+"if (\'00000\' <> st)\n"
+"return 0;\n"
+"\n"
+"cartridges := split_and_decode (rdf_cartridges, 0, \'\\0\\0,\');\n"
+"ps := null;\n"
+"aq := null;\n"
+"foreach (any row in rows) do\n"
 "{\n"
-"declare val_match, pcols, npars any;\n"
+"cname := cast (row[0] as varchar);\n"
+"if (position (cname, cartridges))\n"
+"goto _try;\n"
 "\n"
-"val_match := case when (RM_TYPE = \'MIME\') then type else rdf_graph2 end;\n"
-"if (isstring (val_match) and regexp_match (RM_PATTERN, val_match) is not null)\n"
+"goto _try_next;\n"
+"\n"
+"_try:\n"
+"val_match := case when (row[2] = \'MIME\') then type else rdf_graph end;\n"
+"if (isstring (val_match) and regexp_match (row[1], val_match) is not null)\n"
 "{\n"
-"if (__proc_exists (RM_HOOK) is null)\n"
-"goto try_next_mapper;\n"
+"pname := row[3];\n"
+"if (__proc_exists (pname) is null)\n"
+"goto _try_next;\n"
 "\n"
 "declare exit handler for sqlstate \'*\'\n"
 "{\n"
-"goto try_next_mapper;\n"
+"goto _try_next;\n"
 "};\n"
+"opts := vector_concat (vector (), row[5]);\n"
+"xrc := call (pname) (rdf_graph, rdf_iri, null, content, aq, ps, row[4], opts);\n"
 "\n"
-"pcols := DB.DBA.RDF_PROC_COLS (RM_HOOK);\n"
-"npars := case when (isarray (pcols)) then length (pcols) else 8 end;\n"
-"if (npars = 7)\n"
-"{\n"
-"xrc := call (RM_HOOK) (rdf_graph2, rdf_graph2, null, ret_body, aq, ps, RM_KEY);\n"
-"} else {\n"
-"xrc := call (RM_HOOK) (rdf_graph2, rdf_graph2, null, ret_body, aq, ps, RM_KEY, RM_OPTIONS);\n"
-"}\n"
-"if (__tag(xrc) = 193 or xrc < 0 or xrc > 0)\n"
-"{\n"
-"goto _exit;\n"
-"}\n"
-"}\n"
-"try_next_mapper:;\n"
+"\n"
+"if (not hasSelection and (__tag (xrc) = 193 or xrc < 0 or xrc > 0))\n"
+"return 1;\n"
 "}\n"
+"_try_next:;\n"
 "}\n"
-"return 0;\n"
-"\n"
-"_exit:\n"
-"SPARQL insert in graph ?:rdf_graph { ?s ?p ?o } where { graph `iri(?:rdf_graph2)` { ?s ?p ?o } };\n"
 "return 1;\n"
 "}\n"
-"--src dav_api.sql:2532\n";
+"--src dav_api.sql:2686\n";
 
-static const char *proc122 = 
-"#line 2618 \"[executable]/dav_api.sql\"\n"
+static const char *proc132 = 
+"#line 2743 \"[executable]/dav_api.sql\"\n"
 "create procedure RDF_SINK_DELETE (\n"
-"in path2 any)\n"
+"in path any)\n"
 "{\n"
-"declare c_id integer;\n"
-"declare parts, path, rdf_graph, rdf_graph2 any;\n"
+"declare c_id, _col_p_id, _inherit, depth integer;\n"
+"declare rdf_graph, rdf_graph2 any;\n"
 "\n"
-"parts := split_and_decode (path2, 0, \'\\0\\0/\');\n"
-"if (length (parts) <>  6)\n"
-"return;\n"
-"if (parts[0] <> \'\')\n"
-"return;\n"
-"if (parts[length (parts) - 1] = \'\')\n"
+"c_id := DB.DBA.DAV_SEARCH_ID (subseq (path, 0, strrchr (path, \'/\') + 1), \'C\');\n"
+"if (not isinteger (c_id) or (c_id < 0))\n"
 "return;\n"
-"if (parts[length (parts) - 2] <> \'rdf_sink\')\n"
-"return;\n"
-"\n"
-"rdf_graph2 := \'http://local.virt\' || path2;\n"
 "\n"
-"path := replace (path2, parts[length (parts) - 1], \'\');\n"
-"c_id := DAV_SEARCH_ID (path, \'C\');\n"
-"if (isinteger (c_id) and (c_id > 0))\n"
+"rdf_graph := null;   \n"
+"depth := 0; \n"
 "{\n"
+"whenever not found goto rdfg_found;\n"
+"look_again:  \n"
+"select COL_PARENT, COL_INHERIT into _col_p_id, _inherit from WS.WS.SYS_DAV_COL where COL_ID = c_id;\n"
 "rdf_graph := (select PROP_VALUE from WS.WS.SYS_DAV_PROP where PROP_PARENT_ID = c_id and PROP_TYPE = \'C\' and PROP_NAME = \'virt:rdf_graph\');\n"
-"if (not DB.DBA.is_empty_or_null (rdf_graph))\n"
-"{\n"
-"SPARQL delete from graph ?:rdf_graph { ?s ?p ?o } where { graph `iri(?:rdf_graph2)` { ?s ?p ?o } };\n"
-"}\n"
+"if ((_inherit = \'R\' or (depth = 1 and _inherit = \'M\') or depth = 0) and length (rdf_graph))\n"
+"goto rdfg_found;\n"
+"c_id := _col_p_id;\n"
+"depth := depth + 1;\n"
+"rdf_graph := null;\n"
+"goto look_again;\n"
 "}\n"
+"rdfg_found:; \n"
+"\n"
+"if (DB.DBA.is_empty_or_null (rdf_graph))\n"
+"return;\n"
 "\n"
+"if (path like \'%.gz\')\n"
+"path := regexp_replace (path, \'\\.gz\\x24\', \'\');\n"
+"rdf_graph2 := \'http://local.virt\' || path;\n"
+"SPARQL delete from graph ?:rdf_graph { ?s ?p ?o } where { graph `iri(?:rdf_graph2)` { ?s ?p ?o } };\n"
 "SPARQL clear graph ?:rdf_graph2;\n"
 "}\n"
-"--src dav_api.sql:2616\n";
+"--src dav_api.sql:2741\n";
 
-static const char *proc123 = 
-"#line 2652 \"[executable]/dav_api.sql\"\n"
+static const char *proc133 = 
+"#line 2781 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_DELETE (\n"
 "in path varchar,\n"
@@ -7218,10 +7899,10 @@ static const char *proc123 =
 "{\n"
 "return DAV_DELETE_INT (path, silent, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:2650\n";
+"--src dav_api.sql:2779\n";
 
-static const char *proc124 = 
-"#line 2664 \"[executable]/dav_api.sql\"\n"
+static const char *proc134 = 
+"#line 2793 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_DELETE_INT (\n"
 "in path varchar,\n"
@@ -7305,10 +7986,10 @@ static const char *proc124 =
 "disabled_home:\n"
 "return -43;\n"
 "}\n"
-"--src dav_api.sql:2662\n";
+"--src dav_api.sql:2791\n";
 
-static const char *proc125 = 
-"#line 2750 \"[executable]/dav_api.sql\"\n"
+static const char *proc135 = 
+"#line 2879 \"[executable]/dav_api.sql\"\n"
 "create function DAV_TAG_LIST (in id any, in st char (1), in uid_list any) returns any\n"
 "{\n"
 "if (isarray (id))\n"
@@ -7325,10 +8006,10 @@ static const char *proc125 =
 "else\n"
 "return (select VECTOR_AGG (vector (DT_U_ID, DT_TAGS)) from Ws.WS.SYS_DAV_TAG where DT_RES_ID = id and position (DT_U_ID, uid_list));\n"
 "}\n"
-"--src dav_api.sql:2748\n";
+"--src dav_api.sql:2877\n";
 
-static const char *proc126 = 
-"#line 2768 \"[executable]/dav_api.sql\"\n"
+static const char *proc136 = 
+"#line 2897 \"[executable]/dav_api.sql\"\n"
 "create function DAV_TAG_SET (in id any, in st char (1), in uid integer, in tags varchar) returns integer\n"
 "{\n"
 "if (not exists (select 1 from WS.WS.SYS_DAV_USER where U_ID = uid))\n"
@@ -7346,10 +8027,10 @@ static const char *proc126 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:2766\n";
+"--src dav_api.sql:2895\n";
 
-static const char *proc127 = 
-"#line 2789 \"[executable]/dav_api.sql\"\n"
+static const char *proc137 = 
+"#line 2918 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_COPY (in path varchar,\n"
 "in destination varchar,\n"
@@ -7362,10 +8043,10 @@ static const char *proc127 =
 "{\n"
 "return DAV_COPY_INT (path, destination, overwrite, permissions, uid, gid, auth_uname, auth_pwd, 1);\n"
 "}\n"
-"--src dav_api.sql:2787\n";
+"--src dav_api.sql:2916\n";
 
-static const char *proc128 = 
-"#line 2804 \"[executable]/dav_api.sql\"\n"
+static const char *proc138 = 
+"#line 2933 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_COPY_INT (in path varchar,\n"
 "in destination varchar,\n"
@@ -7628,10 +8309,10 @@ static const char *proc128 =
 "disabled_home:\n"
 "return -43;\n"
 "}\n"
-"--src dav_api.sql:2802\n";
+"--src dav_api.sql:2931\n";
 
-static const char *proc129 = 
-"#line 3070 \"[executable]/dav_api.sql\"\n"
+static const char *proc139 = 
+"#line 3199 \"[executable]/dav_api.sql\"\n"
 "create function DAV_COPY_SUBTREE (in src any, in dst any, in sar any,\n"
 "in dar any, in overwrite integer,\n"
 "in ouid integer := null, in ogid integer := null,\n"
@@ -7691,10 +8372,10 @@ static const char *proc129 =
 "vectorbld_final (ret);\n"
 "return ret;\n"
 "}\n"
-"--src dav_api.sql:3068\n";
+"--src dav_api.sql:3197\n";
 
-static const char *proc130 = 
-"#line 3133 \"[executable]/dav_api.sql\"\n"
+static const char *proc140 = 
+"#line 3262 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_MOVE (in path varchar,\n"
 "in destination varchar,\n"
@@ -7704,10 +8385,10 @@ static const char *proc130 =
 "{\n"
 "return DAV_MOVE_INT (path, destination, overwrite, auth_uname, auth_pwd, 1);\n"
 "}\n"
-"--src dav_api.sql:3131\n";
+"--src dav_api.sql:3260\n";
 
-static const char *proc131 = 
-"#line 3145 \"[executable]/dav_api.sql\"\n"
+static const char *proc141 = 
+"#line 3274 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_MOVE_INT (in path varchar,\n"
 "in destination varchar,\n"
@@ -7952,10 +8633,10 @@ static const char *proc131 =
 "disabled_home:\n"
 "return -43;\n"
 "}\n"
-"--src dav_api.sql:3143\n";
+"--src dav_api.sql:3272\n";
 
-static const char *proc132 = 
-"#line 3392 \"[executable]/dav_api.sql\"\n"
+static const char *proc142 = 
+"#line 3521 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_GET_OWNER (in id any, in st char(1)) returns integer\n"
 "{\n"
@@ -7973,10 +8654,10 @@ static const char *proc132 =
 "return coalesce ((select RES_OWNER from WS.WS.SYS_DAV_RES where RES_ID = id), -1);\n"
 "return -14;\n"
 "}\n"
-"--src dav_api.sql:3390\n";
+"--src dav_api.sql:3519\n";
 
-static const char *proc133 = 
-"#line 3412 \"[executable]/dav_api.sql\"\n"
+static const char *proc143 = 
+"#line 3541 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_PREPARE_PROP_WRITE (\n"
 "in path varchar,\n"
@@ -8055,10 +8736,10 @@ static const char *proc133 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:3410\n";
+"--src dav_api.sql:3539\n";
 
-static const char *proc134 = 
-"#line 3494 \"[executable]/dav_api.sql\"\n"
+static const char *proc144 = 
+"#line 3623 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_PROP_SET (\n"
 "in path varchar,\n"
@@ -8070,10 +8751,10 @@ static const char *proc134 =
 "{\n"
 "return DAV_PROP_SET_INT (path, propname, propvalue, auth_uname, auth_pwd, 1, 1, overwrite);\n"
 "}\n"
-"--src dav_api.sql:3492\n";
+"--src dav_api.sql:3621\n";
 
-static const char *proc135 = 
-"#line 3507 \"[executable]/dav_api.sql\"\n"
+static const char *proc145 = 
+"#line 3636 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_PROP_SET_INT (\n"
 "in path varchar,\n"
@@ -8103,10 +8784,10 @@ static const char *proc135 =
 "}\n"
 "return DAV_PROP_SET_RAW (id, st, propname, propvalue, overwrite, auth_uid, locked, auto_version);\n"
 "}\n"
-"--src dav_api.sql:3505\n";
+"--src dav_api.sql:3634\n";
 
-static const char *proc136 = 
-"#line 3539 \"[executable]/dav_api.sql\"\n"
+static const char *proc146 = 
+"#line 3668 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_PROP_SET_RAW (\n"
 "inout id integer,\n"
@@ -8128,10 +8809,10 @@ static const char *proc136 =
 "log_enable (bit_or (old_log_mode, 4), 1);\n"
 "return rc;\n"
 "}\n"
-"--src dav_api.sql:3537\n";
+"--src dav_api.sql:3666\n";
 
-static const char *proc137 = 
-"#line 3562 \"[executable]/dav_api.sql\"\n"
+static const char *proc147 = 
+"#line 3691 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_PROP_SET_RAW_INNER (\n"
 "inout id integer,\n"
@@ -8337,10 +9018,10 @@ static const char *proc137 =
 "}\n"
 "return pid;\n"
 "}\n"
-"--src dav_api.sql:3560\n";
+"--src dav_api.sql:3689\n";
 
-static const char *proc138 = 
-"#line 3771 \"[executable]/dav_api.sql\"\n"
+static const char *proc148 = 
+"#line 3900 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_PROP_REMOVE (\n"
 "in path varchar,\n"
@@ -8350,10 +9031,10 @@ static const char *proc138 =
 "{\n"
 "return DAV_PROP_REMOVE_INT (path, propname, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:3769\n";
+"--src dav_api.sql:3898\n";
 
-static const char *proc139 = 
-"#line 3783 \"[executable]/dav_api.sql\"\n"
+static const char *proc149 = 
+"#line 3912 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_PROP_REMOVE_INT (\n"
 "in path varchar,\n"
@@ -8382,10 +9063,10 @@ static const char *proc139 =
 "}\n"
 "return DAV_PROP_REMOVE_RAW (id, st, propname, ignore_if_missing, auth_uid, locked, auto_version);\n"
 "}\n"
-"--src dav_api.sql:3781\n";
+"--src dav_api.sql:3910\n";
 
-static const char *proc140 = 
-"#line 3814 \"[executable]/dav_api.sql\"\n"
+static const char *proc150 = 
+"#line 3943 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_PROP_REMOVE_RAW (\n"
 "inout id integer,\n"
@@ -8473,10 +9154,10 @@ static const char *proc140 =
 "else\n"
 "return -11;\n"
 "}\n"
-"--src dav_api.sql:3812\n";
+"--src dav_api.sql:3941\n";
 
-static const char *proc141 = 
-"#line 3905 \"[executable]/dav_api.sql\"\n"
+static const char *proc151 = 
+"#line 4034 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_PROP_GET (\n"
 "in path varchar,\n"
@@ -8491,10 +9172,10 @@ static const char *proc141 =
 "st := \'R\';\n"
 "return DAV_PROP_GET_INT (DAV_SEARCH_ID (path, st), st, propname, 1, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:3903\n";
+"--src dav_api.sql:4032\n";
 
-static const char *proc142 = 
-"#line 3922 \"[executable]/dav_api.sql\"\n"
+static const char *proc152 = 
+"#line 4051 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_PROP_GET_INT (\n"
 "in id any,\n"
@@ -8697,10 +9378,10 @@ static const char *proc142 =
 "no_prop:\n"
 "return -11;\n"
 "}\n"
-"--src dav_api.sql:3920\n";
+"--src dav_api.sql:4049\n";
 
-static const char *proc143 = 
-"#line 4128 \"[executable]/dav_api.sql\"\n"
+static const char *proc153 = 
+"#line 4257 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_PROP_LIST (\n"
 "in path varchar,\n"
@@ -8715,10 +9396,10 @@ static const char *proc143 =
 "st := \'R\';\n"
 "return DAV_PROP_LIST_INT (DAV_SEARCH_ID (path, st), st, propmask, 1, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:4126\n";
+"--src dav_api.sql:4255\n";
 
-static const char *proc144 = 
-"#line 4144 \"[executable]/dav_api.sql\"\n"
+static const char *proc154 = 
+"#line 4273 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_PROP_LIST_INT (\n"
 "in id any,\n"
@@ -8755,10 +9436,10 @@ static const char *proc144 =
 "}\n"
 "return ret;\n"
 "}\n"
-"--src dav_api.sql:4142\n";
+"--src dav_api.sql:4271\n";
 
-static const char *proc145 = 
-"#line 4183 \"[executable]/dav_api.sql\"\n"
+static const char *proc155 = 
+"#line 4312 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_MAKE_DIR (in path any, in own integer, in grp integer, in perms varchar)\n"
 "{\n"
@@ -8795,10 +9476,10 @@ static const char *proc145 =
 "}\n"
 "return col;\n"
 "}\n"
-"--src dav_api.sql:4181\n";
+"--src dav_api.sql:4310\n";
 
-static const char *proc146 = 
-"#line 4221 \"[executable]/dav_api.sql\"\n"
+static const char *proc156 = 
+"#line 4350 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_CHECK_PERM (in perm varchar, in req varchar, in oid integer,\n"
 "in ogid integer, in pgid integer, in puid integer)\n"
 "{\n"
@@ -8816,10 +9497,10 @@ static const char *proc146 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:4219\n";
+"--src dav_api.sql:4348\n";
 
-static const char *proc147 = 
-"#line 4242 \"[executable]/dav_api.sql\"\n"
+static const char *proc157 = 
+"#line 4371 \"[executable]/dav_api.sql\"\n"
 " create procedure DAV_CHECK_USER (in uname varchar, in pwd any := null)\n"
 "{\n"
 "declare rc int;\n"
@@ -8839,10 +9520,10 @@ static const char *proc147 =
 "}\n"
 "return rc;\n"
 "}\n"
-"--src dav_api.sql:4240\n";
+"--src dav_api.sql:4369\n";
 
-static const char *proc148 = 
-"#line 4265 \"[executable]/dav_api.sql\"\n"
+static const char *proc158 = 
+"#line 4394 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_RES_CONTENT (\n"
 "in path varchar,\n"
@@ -8852,10 +9533,10 @@ static const char *proc148 =
 "{\n"
 "return DAV_RES_CONTENT_INT (DAV_SEARCH_ID (path, \'R\'), content, type, 0, 1, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:4263\n";
+"--src dav_api.sql:4392\n";
 
-static const char *proc149 = 
-"#line 4278 \"[executable]/dav_api.sql\"\n"
+static const char *proc159 = 
+"#line 4407 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_RES_CONTENT_STRSES (\n"
 "in path varchar,\n"
@@ -8865,10 +9546,10 @@ static const char *proc149 =
 "{\n"
 "return DAV_RES_CONTENT_INT (DAV_SEARCH_ID (path, \'R\'), content, type, 1, 1, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:4276\n";
+"--src dav_api.sql:4405\n";
 
-static const char *proc150 = 
-"#line 4289 \"[executable]/dav_api.sql\"\n"
+static const char *proc160 = 
+"#line 4418 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_RES_CONTENT_INT (\n"
 "in id any,\n"
@@ -8918,10 +9599,10 @@ static const char *proc150 =
 "}\n"
 "return rc;\n"
 "}\n"
-"--src dav_api.sql:4287\n";
+"--src dav_api.sql:4416\n";
 
-static const char *proc151 = 
-"#line 4340 \"[executable]/dav_api.sql\"\n"
+static const char *proc161 = 
+"#line 4469 \"[executable]/dav_api.sql\"\n"
 "create function DAV_COL_IS_ANCESTOR_OF (in a_id integer, in d_id integer) returns integer\n"
 "{\n"
 "declare p_id integer;\n"
@@ -8937,10 +9618,10 @@ static const char *proc151 =
 "d_id := p_id;\n"
 "goto again;\n"
 "}\n"
-"--src dav_api.sql:4338\n";
+"--src dav_api.sql:4467\n";
 
-static const char *proc152 = 
-"#line 4357 \"[executable]/dav_api.sql\"\n"
+static const char *proc162 = 
+"#line 4486 \"[executable]/dav_api.sql\"\n"
 "create function DAV_COL_PATH_BOUNDARY (in path varchar) returns varchar\n"
 "{\n"
 "declare res varchar;\n"
@@ -8952,10 +9633,10 @@ static const char *proc152 =
 "res := res || \'\\377\\377\\377\\377\';\n"
 "return res;\n"
 "}\n"
-"--src dav_api.sql:4355\n";
+"--src dav_api.sql:4484\n";
 
 static const char *trig7 = 
-"#line 4372 \"[executable]/dav_api.sql\"\n"
+"#line 4501 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_COL_WAC_U after update on WS.WS.SYS_DAV_COL order 100 referencing new as N, old as O\n"
 "{\n"
 "declare aciContent, oldPath, newPath, update_acl any;\n"
@@ -8977,10 +9658,10 @@ static const char *trig7 =
 "WS.WS.WAC_DELETE (oldPath, update_acl);\n"
 "WS.WS.WAC_INSERT (newPath, aciContent, N.COL_OWNER, N.COL_GROUP, update_acl);\n"
 "}\n"
-"--src dav_api.sql:4370\n";
+"--src dav_api.sql:4499\n";
 
 static const char *trig8 = 
-"#line 4395 \"[executable]/dav_api.sql\"\n"
+"#line 4524 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_COL_WAC_D after delete on WS.WS.SYS_DAV_COL order 100 referencing old as O\n"
 "{\n"
 "declare update_acl integer;\n"
@@ -8994,10 +9675,10 @@ static const char *trig8 =
 "\n"
 "WS.WS.WAC_DELETE (path, update_acl);\n"
 "}\n"
-"--src dav_api.sql:4393\n";
+"--src dav_api.sql:4522\n";
 
 static const char *trig9 = 
-"#line 4410 \"[executable]/dav_api.sql\"\n"
+"#line 4539 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_WAC_U after update on WS.WS.SYS_DAV_RES order 100 referencing new as N, old as O\n"
 "{\n"
 "declare aciContent, oldPath, newPath, update_acl any;\n"
@@ -9032,10 +9713,10 @@ static const char *trig9 =
 "WS.WS.WAC_DELETE (oldPath, update_acl);\n"
 "WS.WS.WAC_INSERT (newPath, aciContent, N.RES_OWNER, N.RES_GROUP, update_acl);\n"
 "}\n"
-"--src dav_api.sql:4408\n";
+"--src dav_api.sql:4537\n";
 
 static const char *trig10 = 
-"#line 4446 \"[executable]/dav_api.sql\"\n"
+"#line 4575 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_WAC_D after delete on WS.WS.SYS_DAV_RES order 100 referencing old as O\n"
 "{\n"
 "declare update_acl int;\n"
@@ -9054,10 +9735,10 @@ static const char *trig10 =
 "}\n"
 "WS.WS.WAC_DELETE (path, update_acl);\n"
 "}\n"
-"--src dav_api.sql:4444\n";
+"--src dav_api.sql:4573\n";
 
 static const char *trig11 = 
-"#line 4466 \"[executable]/dav_api.sql\"\n"
+"#line 4595 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_PROP_WAC_I after insert on WS.WS.SYS_DAV_PROP order 100 referencing new as N\n"
 "{\n"
 "if (N.PROP_NAME <> \'virt:aci_meta_n3\')\n"
@@ -9080,10 +9761,10 @@ static const char *trig11 =
 "}\n"
 "WS.WS.WAC_INSERT (_path, N.PROP_VALUE, _owner, _group, 1);\n"
 "}\n"
-"--src dav_api.sql:4464\n";
+"--src dav_api.sql:4593\n";
 
 static const char *trig12 = 
-"#line 4490 \"[executable]/dav_api.sql\"\n"
+"#line 4619 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_PROP_WAC_U after update (PROP_NAME, PROP_VALUE) on WS.WS.SYS_DAV_PROP order 100 referencing new as N, old as O\n"
 "{\n"
 "if (N.PROP_NAME <> \'virt:aci_meta_n3\')\n"
@@ -9107,10 +9788,10 @@ static const char *trig12 =
 "WS.WS.WAC_DELETE (_path, 1);\n"
 "WS.WS.WAC_INSERT (_path, N.PROP_VALUE, _owner, _group, 1);\n"
 "}\n"
-"--src dav_api.sql:4488\n";
+"--src dav_api.sql:4617\n";
 
 static const char *trig13 = 
-"#line 4515 \"[executable]/dav_api.sql\"\n"
+"#line 4644 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_PROP_WAC_D after delete on WS.WS.SYS_DAV_PROP order 100 referencing old as O\n"
 "{\n"
 "if (O.PROP_NAME <> \'virt:aci_meta_n3\')\n"
@@ -9133,10 +9814,10 @@ static const char *trig13 =
 "}\n"
 "WS.WS.WAC_DELETE (_path, 1);\n"
 "}\n"
-"--src dav_api.sql:4513\n";
+"--src dav_api.sql:4642\n";
 
-static const char *proc153 = 
-"#line 4539 \"[executable]/dav_api.sql\"\n"
+static const char *proc163 = 
+"#line 4668 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.WAC_INSERT (\n"
 "in path varchar,\n"
 "in aciContent any,\n"
@@ -9157,10 +9838,10 @@ static const char *proc153 =
 "}\n"
 "DB.DBA.TTLP (aciContent, graph, graph);\n"
 "}\n"
-"--src dav_api.sql:4537\n";
+"--src dav_api.sql:4666\n";
 
-static const char *proc154 = 
-"#line 4561 \"[executable]/dav_api.sql\"\n"
+static const char *proc164 = 
+"#line 4690 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.WAC_DELETE (\n"
 "in path varchar,\n"
 "in update_acl integer)\n"
@@ -9175,12 +9856,13 @@ static const char *proc154 =
 "DAV_DELETE_INT (rtrim (path, \'/\') || \',acl\', 1, null, null, 0, 0);\n"
 "connection_set (\'dav_acl_sync\', null);\n"
 "}\n"
-"exec (sprintf (\'sparql clear graph <%s>\', graph), st, msg);\n"
+"set_user_id (\'dba\');\n"
+"SPARQL clear graph ?:graph;\n"
 "}\n"
-"--src dav_api.sql:4559\n";
+"--src dav_api.sql:4688\n";
 
-static const char *proc155 = 
-"#line 4579 \"[executable]/dav_api.sql\"\n"
+static const char *proc165 = 
+"#line 4709 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.DAV_IRI (\n"
 "in path varchar)\n"
 "{\n"
@@ -9190,7 +9872,7 @@ static const char *proc155 =
 "http_dav_url (path, null, S);\n"
 "S := string_output_string (S);\n"
 "\n"
-"host := cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DefaultHost\');\n"
+"host := virtuoso_ini_item_value (\'URIQA\', \'DefaultHost\');\n"
 "if (host is null)\n"
 "{\n"
 "host := sys_stat (\'st_host_name\');\n"
@@ -9200,10 +9882,10 @@ static const char *proc155 =
 "\n"
 "return sprintf (\'http://%s%s\', host, S);\n"
 "}\n"
-"--src dav_api.sql:4577\n";
+"--src dav_api.sql:4707\n";
 
 static const char *trig14 = 
-"#line 4601 \"[executable]/dav_api.sql\"\n"
+"#line 4731 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_COL_ACL_I after insert on WS.WS.SYS_DAV_COL order 9 referencing new as NC\n"
 "{\n"
 "declare N, colID, parentID integer;\n"
@@ -9228,10 +9910,10 @@ static const char *trig14 =
 "where COL_ID = NC.COL_ID;\n"
 "\n"
 "}\n"
-"--src dav_api.sql:4599\n";
+"--src dav_api.sql:4729\n";
 
-static const char *proc156 = 
-"#line 4627 \"[executable]/dav_api.sql\"\n"
+static const char *proc166 = 
+"#line 4757 \"[executable]/dav_api.sql\"\n"
 "create function WS.WS.ACL_CONTAINS_GRANTEE_AND_FLAG (inout aAcl any, in grantee integer, in flag char(1)) returns integer\n"
 "{\n"
 "foreach (any acl in aAcl) do\n"
@@ -9241,10 +9923,10 @@ static const char *proc156 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:4625\n";
+"--src dav_api.sql:4755\n";
 
 static const char *trig15 = 
-"#line 4638 \"[executable]/dav_api.sql\"\n"
+"#line 4768 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_COL_ACL_U after update (COL_ACL) on WS.WS.SYS_DAV_COL order 9 referencing new as N, old as O\n"
 "{\n"
 "declare aAcl, aLog any;\n"
@@ -9277,10 +9959,10 @@ static const char *trig15 =
 "log_enable (aLog, 1);\n"
 "log_text (\'WS.WS.ACL_UPDATE (?, ?)\', N.COL_ID, WS.WS.ACL_PARSE (N.COL_ACL, \'123\', 0));\n"
 "}\n"
-"--src dav_api.sql:4636\n";
+"--src dav_api.sql:4766\n";
 
 static const char *trig16 = 
-"#line 4672 \"[executable]/dav_api.sql\"\n"
+"#line 4802 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_COL_ACL_D after delete on WS.WS.SYS_DAV_COL order 9 referencing old as O\n"
 "{\n"
 "\n"
@@ -9290,10 +9972,10 @@ static const char *trig16 =
 "and AI_PARENT_ID = O.COL_ID;\n"
 "\n"
 "}\n"
-"--src dav_api.sql:4670\n";
+"--src dav_api.sql:4800\n";
 
 static const char *trig17 = 
-"#line 4685 \"[executable]/dav_api.sql\"\n"
+"#line 4815 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_ACL_I after insert on WS.WS.SYS_DAV_RES order 9 referencing new as N\n"
 "{\n"
 "declare aAcl any;\n"
@@ -9317,10 +9999,10 @@ static const char *trig17 =
 "}\n"
 "\n"
 "}\n"
-"--src dav_api.sql:4683\n";
+"--src dav_api.sql:4813\n";
 
 static const char *trig18 = 
-"#line 4710 \"[executable]/dav_api.sql\"\n"
+"#line 4840 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_ACL_U after update (RES_ACL) on WS.WS.SYS_DAV_RES order 9 referencing new as N, old as O\n"
 "{\n"
 "declare aAcl any;\n"
@@ -9341,10 +10023,10 @@ static const char *trig18 =
 "}\n"
 "\n"
 "}\n"
-"--src dav_api.sql:4708\n";
+"--src dav_api.sql:4838\n";
 
 static const char *trig19 = 
-"#line 4732 \"[executable]/dav_api.sql\"\n"
+"#line 4862 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_ACL_D after delete on WS.WS.SYS_DAV_RES order 9 referencing old as O\n"
 "{\n"
 "\n"
@@ -9354,10 +10036,10 @@ static const char *trig19 =
 "and AI_PARENT_ID = O.RES_ID;\n"
 "\n"
 "}\n"
-"--src dav_api.sql:4730\n";
+"--src dav_api.sql:4860\n";
 
-static const char *proc157 = 
-"#line 4743 \"[executable]/dav_api.sql\"\n"
+static const char *proc167 = 
+"#line 4873 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_UPDATE (in id integer, in parentAcl any)\n"
 "{\n"
 "declare nAcl any;\n"
@@ -9386,10 +10068,10 @@ static const char *proc157 =
 "}\n"
 "}\n"
 "}\n"
-"--src dav_api.sql:4741\n";
+"--src dav_api.sql:4871\n";
 
-static const char *proc158 = 
-"#line 4773 \"[executable]/dav_api.sql\"\n"
+static const char *proc168 = 
+"#line 4903 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_MAKE_INHERITED (\n"
 "inout aAcl any)\n"
 "{\n"
@@ -9404,10 +10086,10 @@ static const char *proc158 =
 "}\n"
 "return aAcl;\n"
 "}\n"
-"--src dav_api.sql:4771\n";
+"--src dav_api.sql:4901\n";
 
-static const char *proc159 = 
-"#line 4790 \"[executable]/dav_api.sql\"\n"
+static const char *proc169 = 
+"#line 4920 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_DBG (\n"
 "in vb varbinary) returns varchar\n"
 "{\n"
@@ -9422,10 +10104,10 @@ static const char *proc159 =
 "}\n"
 "return aResult;\n"
 "}\n"
-"--src dav_api.sql:4788\n";
+"--src dav_api.sql:4918\n";
 
-static const char *proc160 = 
-"#line 4808 \"[executable]/dav_api.sql\"\n"
+static const char *proc170 = 
+"#line 4938 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_SERIALIZE_INT(in I integer) returns varbinary\n"
 "{\n"
 "declare N integer;\n"
@@ -9451,10 +10133,10 @@ static const char *proc160 =
 "\n"
 "return cast(aResult as varbinary);\n"
 "}\n"
-"--src dav_api.sql:4806\n";
+"--src dav_api.sql:4936\n";
 
-static const char *proc161 = 
-"#line 4837 \"[executable]/dav_api.sql\"\n"
+static const char *proc171 = 
+"#line 4967 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_DESERIALIZE_INT(in vb varbinary) returns integer\n"
 "{\n"
 "declare vc varchar;\n"
@@ -9462,35 +10144,35 @@ static const char *proc161 =
 "vc := cast(vb as varchar);\n"
 "return bit_or(bit_or(bit_or(bit_shift(aref(vc, 0), 24), bit_shift(aref(vc, 1), 16)), bit_shift(aref(vc, 2), 8)), aref(vc, 3));\n"
 "}\n"
-"--src dav_api.sql:4835\n";
+"--src dav_api.sql:4965\n";
 
-static const char *proc162 = 
-"#line 4848 \"[executable]/dav_api.sql\"\n"
+static const char *proc172 = 
+"#line 4978 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_GET_ACLLENGTH(in acl varbinary) returns integer\n"
 "{\n"
 "return WS.WS.ACL_DESERIALIZE_INT(cast(substring(cast(acl as varchar), 1, 4) as varbinary));\n"
 "}\n"
-"--src dav_api.sql:4846\n";
+"--src dav_api.sql:4976\n";
 
-static const char *proc163 = 
-"#line 4856 \"[executable]/dav_api.sql\"\n"
+static const char *proc173 = 
+"#line 4986 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_GET_ACESIZE(in acl varbinary) returns integer\n"
 "{\n"
 "return WS.WS.ACL_DESERIALIZE_INT(cast(substring(cast(acl as varchar), 5, 4) as varbinary));\n"
 "}\n"
-"--src dav_api.sql:4854\n";
+"--src dav_api.sql:4984\n";
 
-static const char *proc164 = 
-"#line 4867 \"[executable]/dav_api.sql\"\n"
+static const char *proc174 = 
+"#line 4997 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_CREATE() returns varbinary\n"
 "{\n"
 "return cast(concat(cast(WS.WS.ACL_SERIALIZE_INT(8) as varchar),\n"
 "cast(WS.WS.ACL_SERIALIZE_INT(0) as varchar)) as varbinary);\n"
 "}\n"
-"--src dav_api.sql:4865\n";
+"--src dav_api.sql:4995\n";
 
-static const char *proc165 = 
-"#line 4879 \"[executable]/dav_api.sql\"\n"
+static const char *proc175 = 
+"#line 5009 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_IS_VALID (in acl varbinary) returns integer\n"
 "{\n"
 "declare iAclLength, iAceSize integer;\n"
@@ -9518,10 +10200,10 @@ static const char *proc165 =
 "\n"
 "return 1;\n"
 "}\n"
-"--src dav_api.sql:4877\n";
+"--src dav_api.sql:5007\n";
 
-static const char *proc166 = 
-"#line 4914 \"[executable]/dav_api.sql\"\n"
+static const char *proc176 = 
+"#line 5044 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_ADD_ENTRY(inout acl varbinary, in uid integer, in bitmask integer, in is_grant integer, in inheritance integer := 0) returns varbinary\n"
 "{\n"
 "declare N, bFound integer;\n"
@@ -9553,10 +10235,10 @@ static const char *proc166 =
 "\n"
 "return acl;\n"
 "}\n"
-"--src dav_api.sql:4912\n";
+"--src dav_api.sql:5042\n";
 
-static const char *proc167 = 
-"#line 4954 \"[executable]/dav_api.sql\"\n"
+static const char *proc177 = 
+"#line 5084 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_REMOVE_ENTRY(inout acl varbinary, in uid integer, in bitmask integer, in inheritance integer := 0) returns varbinary\n"
 "{\n"
 "declare N integer;\n"
@@ -9581,10 +10263,10 @@ static const char *proc167 =
 "\n"
 "return acl;\n"
 "}\n"
-"--src dav_api.sql:4952\n";
+"--src dav_api.sql:5082\n";
 
-static const char *proc168 = 
-"#line 4985 \"[executable]/dav_api.sql\"\n"
+static const char *proc178 = 
+"#line 5115 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_IS_GRANTED(in acl varbinary, in uid integer, in bitmask integer) returns integer\n"
 "{\n"
 "declare N, lenAcl integer;\n"
@@ -9624,26 +10306,26 @@ static const char *proc168 =
 "return or_acc;\n"
 "return 0;\n"
 "}\n"
-"--src dav_api.sql:4983\n";
+"--src dav_api.sql:5113\n";
 
-static const char *proc169 = 
-"#line 5031 \"[executable]/dav_api.sql\"\n"
+static const char *proc179 = 
+"#line 5161 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_SET_OWNER(inout acl varbinary, in uid integer)\n"
 "{\n"
 "return;\n"
 "}\n"
-"--src dav_api.sql:5029\n";
+"--src dav_api.sql:5159\n";
 
-static const char *proc170 = 
-"#line 5042 \"[executable]/dav_api.sql\"\n"
+static const char *proc180 = 
+"#line 5172 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_OWNER(in acl varbinary) returns integer\n"
 "{\n"
 "return;\n"
 "}\n"
-"--src dav_api.sql:5040\n";
+"--src dav_api.sql:5170\n";
 
-static const char *proc171 = 
-"#line 5053 \"[executable]/dav_api.sql\"\n"
+static const char *proc181 = 
+"#line 5183 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_PARSE (\n"
 "in acl varbinary,\n"
 "in inheritance varchar := \'0123\',\n"
@@ -9684,10 +10366,10 @@ static const char *proc171 =
 "vectorbld_final (aAcl);\n"
 "return aAcl;\n"
 "}\n"
-"--src dav_api.sql:5051\n";
+"--src dav_api.sql:5181\n";
 
-static const char *proc172 = 
-"#line 5100 \"[executable]/dav_api.sql\"\n"
+static const char *proc182 = 
+"#line 5230 \"[executable]/dav_api.sql\"\n"
 "create procedure WS.WS.ACL_COMPOSE (\n"
 "in aAcl vector) returns varbinary\n"
 "{\n"
@@ -9716,10 +10398,10 @@ static const char *proc172 =
 "\n"
 "return bAcl;\n"
 "}\n"
-"--src dav_api.sql:5098\n";
+"--src dav_api.sql:5228\n";
 
-static const char *proc173 = 
-"#line 5134 \"[executable]/dav_api.sql\"\n"
+static const char *proc183 = 
+"#line 5264 \"[executable]/dav_api.sql\"\n"
 "create function DAV_CAST_STRING_TO_INTEGER (in val varchar) returns integer\n"
 "{\n"
 "if (val is null) return null;\n"
@@ -9728,10 +10410,10 @@ static const char *proc173 =
 "ret_null:\n"
 "return null;\n"
 "}\n"
-"--src dav_api.sql:5132\n";
+"--src dav_api.sql:5262\n";
 
-static const char *proc174 = 
-"#line 5144 \"[executable]/dav_api.sql\"\n"
+static const char *proc184 = 
+"#line 5274 \"[executable]/dav_api.sql\"\n"
 "create function DAV_CAST_STRING_TO_DATETIME (in val varchar) returns datetime\n"
 "{\n"
 "if (val is null) return null;\n"
@@ -9740,10 +10422,10 @@ static const char *proc174 =
 "ret_null:\n"
 "return null;\n"
 "}\n"
-"--src dav_api.sql:5142\n";
+"--src dav_api.sql:5272\n";
 
-static const char *proc175 = 
-"#line 5154 \"[executable]/dav_api.sql\"\n"
+static const char *proc185 = 
+"#line 5284 \"[executable]/dav_api.sql\"\n"
 "create function DAV_CAST_TEXT_TO_VARCHAR (in val varchar) returns varchar\n"
 "{\n"
 "if (val is null) return null;\n"
@@ -9752,10 +10434,10 @@ static const char *proc175 =
 "ret_null:\n"
 "return null;\n"
 "}\n"
-"--src dav_api.sql:5152\n";
+"--src dav_api.sql:5282\n";
 
-static const char *proc176 = 
-"#line 5164 \"[executable]/dav_api.sql\"\n"
+static const char *proc186 = 
+"#line 5294 \"[executable]/dav_api.sql\"\n"
 "create function DAV_CAST_TEXT_TO_INTEGER (in val varchar) returns integer\n"
 "{\n"
 "if (val is null) return null;\n"
@@ -9764,10 +10446,10 @@ static const char *proc176 =
 "ret_null:\n"
 "return null;\n"
 "}\n"
-"--src dav_api.sql:5162\n";
+"--src dav_api.sql:5292\n";
 
-static const char *proc177 = 
-"#line 5174 \"[executable]/dav_api.sql\"\n"
+static const char *proc187 = 
+"#line 5304 \"[executable]/dav_api.sql\"\n"
 "create function DAV_CAST_TEXT_TO_DATETIME (in val varchar) returns datetime\n"
 "{\n"
 "if (val is null) return null;\n"
@@ -9776,10 +10458,10 @@ static const char *proc177 =
 "ret_null:\n"
 "return null;\n"
 "}\n"
-"--src dav_api.sql:5172\n";
+"--src dav_api.sql:5302\n";
 
-static const char *proc178 = 
-"#line 5184 \"[executable]/dav_api.sql\"\n"
+static const char *proc188 = 
+"#line 5314 \"[executable]/dav_api.sql\"\n"
 "create function DAV_FC_CONST_AS_SQL (inout val any)\n"
 "{\n"
 "if (193 = __tag (val))\n"
@@ -9798,10 +10480,10 @@ static const char *proc178 =
 "return sprintf (\'cast (\'\'%s\'\' as datetime)\', cast (val as varchar));\n"
 "signal (\'.....\', \'Internal error in DAV_DIR_FILTER: DAV_FC_CONST_AS_SQL has got bad value\');\n"
 "}\n"
-"--src dav_api.sql:5182\n";
+"--src dav_api.sql:5312\n";
 
-static const char *proc179 = 
-"#line 5210 \"[executable]/dav_api.sql\"\n"
+static const char *proc189 = 
+"#line 5340 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_FC_PRED_METAS (inout pred_metas any)\n"
 "{\n"
 "pred_metas := vector (\n"
@@ -9831,10 +10513,10 @@ static const char *proc179 =
 "\'RDF_OBJ_VALUE\',            vector (\'SYS_DAV_PROP\'  , 3, \'XML\'      , NULL  )\n"
 ");\n"
 "}\n"
-"--src dav_api.sql:5208\n";
+"--src dav_api.sql:5338\n";
 
-static const char *proc180 = 
-"#line 5248 \"[executable]/dav_api.sql\"\n"
+static const char *proc190 = 
+"#line 5378 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_FC_CMP_METAS (inout cmp_metas any)\n"
 "{\n"
 "cmp_metas := vector (\n"
@@ -9867,10 +10549,10 @@ static const char *proc180 =
 "\'xcontains\',                vector (\'scalar\', \'XML\'         , NULL, NULL, \'[^{pattern}^]\' )\n"
 ");\n"
 "}\n"
-"--src dav_api.sql:5246\n";
+"--src dav_api.sql:5376\n";
 
-static const char *proc181 = 
-"#line 5282 \"[executable]/dav_api.sql\"\n"
+static const char *proc191 = 
+"#line 5412 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_FC_TABLE_METAS (inout table_metas any)\n"
 "{\n"
 "table_metas := vector (\n"
@@ -9900,10 +10582,10 @@ static const char *proc181 =
 "\'DT_TAGS\'       , \'DT_TAGS\'     , NULL  )\n"
 ");\n"
 "}\n"
-"--src dav_api.sql:5280\n";
+"--src dav_api.sql:5410\n";
 
-static const char *proc182 = 
-"#line 5314 \"[executable]/dav_api.sql\"\n"
+static const char *proc192 = 
+"#line 5444 \"[executable]/dav_api.sql\"\n"
 "create function DAV_FC_PRINT_COMPARISON (inout pred any, inout pred_metas any, inout cmp_metas any, in varname varchar, in nonsql integer) returns varchar\n"
 "{\n"
 "declare pred_meta any;\n"
@@ -10036,10 +10718,10 @@ static const char *proc182 =
 "type_mismatch:\n"
 "signal (\'.....\', sprintf (\'Can not compile comparison \'\'%s %s %s\'\' due to type mismatch in predicate \'\'%s\'\' in filter of DAV_DIR_FILTER, \', pred_meta[2], pred[1], pattern_type, pred[0]));\n"
 "}\n"
-"--src dav_api.sql:5312\n";
+"--src dav_api.sql:5442\n";
 
-static const char *proc183 = 
-"#line 5449 \"[executable]/dav_api.sql\"\n"
+static const char *proc193 = 
+"#line 5579 \"[executable]/dav_api.sql\"\n"
 "create function DAV_FC_PRINT_WHERE (inout filter any, in param_uid integer) returns varchar\n"
 "{\n"
 "declare pred_metas, cmp_metas, table_metas any;\n"
@@ -10051,10 +10733,10 @@ static const char *proc183 =
 "used_tables := vector (\'SYS_DAV_RES\', vector (\'SYS_DAV_RES\', \'_top\', null, vector (), vector (), vector ()));\n"
 "return DAV_FC_PRINT_WHERE_INT (filter, pred_metas, cmp_metas, table_metas, used_tables, param_uid);\n"
 "}\n"
-"--src dav_api.sql:5447\n";
+"--src dav_api.sql:5577\n";
 
-static const char *proc184 = 
-"#line 5462 \"[executable]/dav_api.sql\"\n"
+static const char *proc194 = 
+"#line 5592 \"[executable]/dav_api.sql\"\n"
 "create function DAV_FC_PRINT_WHERE_INT (in filter any, inout pred_metas any, inout cmp_metas any, inout table_metas any, inout used_tables any, in param_uid integer) returns varchar\n"
 "{\n"
 "\n"
@@ -10393,10 +11075,10 @@ static const char *proc184 =
 "res_strg := replace (res_strg, \'^{nobodyuid}^\', cast (http_nobody_uid() as varchar));\n"
 "return res_strg;\n"
 "}\n"
-"--src dav_api.sql:5460\n";
+"--src dav_api.sql:5590\n";
 
-static const char *proc185 = 
-"#line 5806 \"[executable]/dav_api.sql\"\n"
+static const char *proc195 = 
+"#line 5936 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_REGISTER_RDF_SCHEMA (in schema_uri varchar, in location varchar, in local_addon varchar, in mode varchar)\n"
 "{\n"
@@ -10416,10 +11098,10 @@ static const char *proc185 =
 "values (schema_uri, location, local_addon, 0);\n"
 "DAV_GET_RDF_SCHEMA_N3 (schema_uri);\n"
 "}\n"
-"--src dav_api.sql:5804\n";
+"--src dav_api.sql:5934\n";
 
-static const char *proc186 = 
-"#line 5829 \"[executable]/dav_api.sql\"\n"
+static const char *proc196 = 
+"#line 5959 \"[executable]/dav_api.sql\"\n"
 " create function DAV_RDF_SCHEMA_N3_LIST_PROPERTIES (inout schema_n3 any, in classname varchar)\n"
 "{\n"
 "if (classname is null)\n"
@@ -10453,10 +11135,10 @@ static const char *proc186 =
 "/@N3S )\',\n"
 "schema_n3, 1, vector (\'classname\', classname) );\n"
 "}\n"
-"--src dav_api.sql:5827\n";
+"--src dav_api.sql:5957\n";
 
-static const char *proc187 = 
-"#line 5865 \"[executable]/dav_api.sql\"\n"
+static const char *proc197 = 
+"#line 5995 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_CROP_URI_TO_CATNAME (in uri varchar)\n"
 "{\n"
@@ -10479,10 +11161,10 @@ static const char *proc187 =
 "return subseq (uri, slash + 1);\n"
 "return uri;\n"
 "}\n"
-"--src dav_api.sql:5863\n";
+"--src dav_api.sql:5993\n";
 
-static const char *proc188 = 
-"#line 5891 \"[executable]/dav_api.sql\"\n"
+static const char *proc198 = 
+"#line 6021 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_GET_RDF_SCHEMA_N3 (in schema_uri varchar)\n"
 "{\n"
@@ -10580,10 +11262,10 @@ static const char *proc188 =
 "\n"
 "return xtree_doc (\'<stub/>\');\n"
 "}\n"
-"--src dav_api.sql:5889\n";
+"--src dav_api.sql:6019\n";
 
-static const char *proc189 = 
-"#line 5991 \"[executable]/dav_api.sql\"\n"
+static const char *proc199 = 
+"#line 6121 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_DEPRECATE_RDF_SCHEMA (in schema_uri varchar)\n"
 "{\n"
@@ -10596,10 +11278,10 @@ static const char *proc189 =
 "\n"
 "delete from WS.WS.SYS_RDF_SCHEMAS where RS_URI = schema_uri and RS_LOCAL_ADDONS is null;\n"
 "}\n"
-"--src dav_api.sql:5989\n";
+"--src dav_api.sql:6119\n";
 
-static const char *proc190 = 
-"#line 6005 \"[executable]/dav_api.sql\"\n"
+static const char *proc200 = 
+"#line 6135 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_REGISTER_MIME_TYPE (in m_ident varchar, in descr varchar, in dflt_ext varchar, in badmagic varchar, in mode varchar)\n"
 "{\n"
@@ -10621,29 +11303,29 @@ static const char *proc190 =
 "values (m_ident, descr, dflt_ext, badmagic);\n"
 "insert soft WS.WS.SYS_DAV_RES_TYPES (T_TYPE,T_EXT) values (m_ident, dflt_ext);\n"
 "}\n"
-"--src dav_api.sql:6003\n";
+"--src dav_api.sql:6133\n";
 
-static const char *proc191 = 
-"#line 6028 \"[executable]/dav_api.sql\"\n"
+static const char *proc201 = 
+"#line 6158 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_REGISTER_MIME_RDF (in m_ident varchar, in schema_uri varchar)\n"
 "{\n"
 "insert replacing WS.WS.SYS_MIME_RDFS (MR_MIME_IDENT, MR_RDF_URI, MR_DEPRECATED)\n"
 "values (m_ident, schema_uri, 0);\n"
 "}\n"
-"--src dav_api.sql:6026\n";
+"--src dav_api.sql:6156\n";
 
-static const char *proc192 = 
-"#line 6036 \"[executable]/dav_api.sql\"\n"
+static const char *proc202 = 
+"#line 6166 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_DEPRECATE_MIME_RDF (in m_ident varchar, in schema_uri varchar)\n"
 "{\n"
 "update WS.WS.SYS_MIME_RDFS set MR_DEPRECATED = 1 where MR_MIME_IDENT = m_ident and MR_RDF_URI = schema_uri;\n"
 "}\n"
-"--src dav_api.sql:6034\n";
+"--src dav_api.sql:6164\n";
 
-static const char *proc193 = 
-"#line 6044 \"[executable]/dav_api.sql\"\n"
+static const char *proc203 = 
+"#line 6174 \"[executable]/dav_api.sql\"\n"
 " create function\n"
 "DAV_RDF_PROP_SET (\n"
 "in path varchar,\n"
@@ -10654,10 +11336,10 @@ static const char *proc193 =
 "{\n"
 "return DAV_RDF_PROP_SET_INT (path, single_schema, rdf, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:6042\n";
+"--src dav_api.sql:6172\n";
 
-static const char *proc194 = 
-"#line 6058 \"[executable]/dav_api.sql\"\n"
+static const char *proc204 = 
+"#line 6188 \"[executable]/dav_api.sql\"\n"
 " create procedure\n"
 "DAV_RDF_PROP_GET (\n"
 "in path varchar,\n"
@@ -10672,10 +11354,10 @@ static const char *proc194 =
 "st := \'R\';\n"
 "return DAV_RDF_PROP_GET_INT (DAV_SEARCH_ID (path, st), st, single_schema, 1, auth_uname, auth_pwd);\n"
 "}\n"
-"--src dav_api.sql:6056\n";
+"--src dav_api.sql:6186\n";
 
-static const char *proc195 = 
-"#line 6075 \"[executable]/dav_api.sql\"\n"
+static const char *proc205 = 
+"#line 6205 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_RDF_PREPROCESS_RDFXML_SUB (inout n3_subj_dict any, in main_res nvarchar, in mode integer, inout firsttime_subj_list any) returns any\n"
 "{\n"
@@ -10742,10 +11424,10 @@ static const char *proc195 =
 "xte_nodebld_final (top_acc, top_head);\n"
 "return top_acc;\n"
 "}\n"
-"--src dav_api.sql:6073\n";
+"--src dav_api.sql:6203\n";
 
-static const char *proc196 = 
-"#line 6144 \"[executable]/dav_api.sql\"\n"
+static const char *proc206 = 
+"#line 6274 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_RDF_PREPROCESS_RDFXML (in rdfxml any, in main_res nvarchar, in already_n3 integer := 0)\n"
 "{\n"
@@ -10791,10 +11473,10 @@ static const char *proc196 =
 "xte_nodebld_final (rdf_acc, xte_head (UNAME\'virt:rdf\'));\n"
 "return rdf_acc;\n"
 "}\n"
-"--src dav_api.sql:6142\n";
+"--src dav_api.sql:6272\n";
 
-static const char *proc197 = 
-"#line 6192 \"[executable]/dav_api.sql\"\n"
+static const char *proc207 = 
+"#line 6322 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_RDF_PROP_SET_INT (\n"
 "in path varchar,\n"
@@ -10821,10 +11503,10 @@ static const char *proc197 =
 "davtree := DAV_RDF_PREPROCESS_RDFXML (n3xml, top_subj, 1);\n"
 "return DAV_PROP_SET_INT (path, single_schema, davtree, auth_uname, auth_pwd, extern, check_locks, overwrite, auth_uid);\n"
 "}\n"
-"--src dav_api.sql:6190\n";
+"--src dav_api.sql:6320\n";
 
-static const char *proc198 = 
-"#line 6221 \"[executable]/dav_api.sql\"\n"
+static const char *proc208 = 
+"#line 6351 \"[executable]/dav_api.sql\"\n"
 "create procedure\n"
 "DAV_RDF_PROP_GET_INT (\n"
 "in id any,\n"
@@ -10844,10 +11526,10 @@ static const char *proc198 =
 "davtree := xml_tree_doc (deserialize (davtree));\n"
 "return davtree;\n"
 "}\n"
-"--src dav_api.sql:6219\n";
+"--src dav_api.sql:6349\n";
 
-static const char *proc199 = 
-"#line 6243 \"[executable]/dav_api.sql\"\n"
+static const char *proc209 = 
+"#line 6373 \"[executable]/dav_api.sql\"\n"
 "create function DAV_RDF_MERGE (\n"
 "in old_n3 any,\n"
 "in patch_n3 any,\n"
@@ -10933,10 +11615,10 @@ static const char *proc199 =
 "xte_nodebld_final (merge_acc, xte_head (UNAME\' root\'));\n"
 "return xml_tree_doc (merge_acc);\n"
 "}\n"
-"--src dav_api.sql:6241\n";
+"--src dav_api.sql:6371\n";
 
-static const char *proc200 = 
-"#line 6331 \"[executable]/dav_api.sql\"\n"
+static const char *proc210 = 
+"#line 6461 \"[executable]/dav_api.sql\"\n"
 "create function DAV_RDF_SUBTRACT (\n"
 "in old_n3 any,\n"
 "in sub_n3 any\n"
@@ -10983,10 +11665,10 @@ static const char *proc200 =
 "xte_nodebld_final (res_acc, xte_head (UNAME\' root\'));\n"
 "return xml_tree_doc (res_acc);\n"
 "}\n"
-"--src dav_api.sql:6329\n";
+"--src dav_api.sql:6459\n";
 
 static const char *trig20 = 
-"#line 6380 \"[executable]/dav_api.sql\"\n"
+"#line 6510 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_CONTENT_EXTRACT_RDF_I after insert on WS.WS.SYS_DAV_RES order 20 referencing new as NEWR\n"
 "{\n"
 "whenever sqlstate \'*\' goto no_op;\n"
@@ -11000,10 +11682,10 @@ static const char *trig20 =
 "\n"
 " ;\n"
 "}\n"
-"--src dav_api.sql:6378\n";
+"--src dav_api.sql:6508\n";
 
 static const char *trig21 = 
-"#line 6395 \"[executable]/dav_api.sql\"\n"
+"#line 6525 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_CONTENT_EXTRACT_RDF_U1 after update (RES_ID, RES_NAME, RES_TYPE, RES_PERMS) on WS.WS.SYS_DAV_RES order 20 referencing new as NEWR, old as OLDR\n"
 "{\n"
 "\n"
@@ -11024,10 +11706,10 @@ static const char *trig21 =
 "\n"
 " ;\n"
 "}\n"
-"--src dav_api.sql:6393\n";
+"--src dav_api.sql:6523\n";
 
 static const char *trig22 = 
-"#line 6417 \"[executable]/dav_api.sql\"\n"
+"#line 6547 \"[executable]/dav_api.sql\"\n"
 "create trigger SYS_DAV_RES_CONTENT_EXTRACT_RDF_U2 after update (RES_ID, RES_NAME, RES_TYPE, RES_CONTENT) on WS.WS.SYS_DAV_RES order 21 referencing new as NEWR, old as OLDR\n"
 "{\n"
 "\n"
@@ -11047,10 +11729,10 @@ static const char *trig22 =
 "\n"
 " ;\n"
 "}\n"
-"--src dav_api.sql:6415\n";
+"--src dav_api.sql:6545\n";
 
-static const char *proc201 = 
-"#line 6438 \"[executable]/dav_api.sql\"\n"
+static const char *proc211 = 
+"#line 6568 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_EXTRACT_AND_SAVE_RDF (in resid integer)\n"
 "{\n"
 "declare resname, restype varchar;\n"
@@ -11060,10 +11742,10 @@ static const char *proc201 =
 "DAV_EXTRACT_AND_SAVE_RDF_INT (resid, resname, restype, rescontent);\n"
 "\n"
 "}\n"
-"--src dav_api.sql:6436\n";
+"--src dav_api.sql:6566\n";
 
-static const char *proc202 = 
-"#line 6449 \"[executable]/dav_api.sql\"\n"
+static const char *proc212 = 
+"#line 6579 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_GET_RES_TYPE_URI_BY_MIME_TYPE(in mime_type varchar) returns varchar\n"
 "{\n"
 "if (mime_type = \'application/bpel+xml\')\n"
@@ -11127,18 +11809,37 @@ static const char *proc202 =
 "if (mime_type = \'text/wiki\')\n"
 "return \'http://www.openlinksw.com/schemas/Wiki#\';\n"
 "}\n"
-"--src dav_api.sql:6447\n";
+"--src dav_api.sql:6577\n";
 
-static const char *proc203 = 
-"#line 6515 \"[executable]/dav_api.sql\"\n"
+static const char *proc213 = 
+"#line 6645 \"[executable]/dav_api.sql\"\n"
 "create procedure DAV_EXTRACT_AND_SAVE_RDF_INT (inout resid integer, inout resname varchar, in restype varchar, inout _rescontent any)\n"
 "{\n"
+"declare rescontent any;\n"
+"rescontent := subseq (_rescontent, 0, 10000000-1);\n"
+"if ((length (_rescontent) < 262144) or (registry_get (\'DAV_EXTRACT_RDF_ASYNC\') <> \'1\'))\n"
+"{\n"
+"DAV_EXTRACT_AND_SAVE_RDF_INT2 (resid, resname, restype, rescontent);\n"
+"} \n"
+"else \n"
+"{\n"
+"declare aq any;\n"
+"aq := async_queue (1);\n"
+"if (not isstring (rescontent))\n"
+"rescontent := cast (rescontent as varchar);\n"
+"aq_request (aq, \'DB.DBA.DAV_EXTRACT_AND_SAVE_RDF_INT2\', vector (resid, resname, restype, rescontent));\n"
+"}\n"
+"}\n"
+"--src dav_api.sql:6643\n";
+
+static const char *proc214 = 
+"#line 6665 \"[executable]/dav_api.sql\"\n"
+"create procedure DAV_EXTRACT_AND_SAVE_RDF_INT2 (in resid integer, in resname varchar, in restype varchar, in rescontent any)\n"
+"{\n"
 "declare resttype, res_type_uri, full_name varchar;\n"
 "declare old_prop_id integer;\n"
 "declare html_start, full_xml, type_tree any;\n"
 "declare old_n3, addon_n3, spotlight_addon_n3 any;\n"
-"declare rescontent any;\n"
-"rescontent := subseq (_rescontent, 0, 10000000-1);\n"
 "\n"
 "html_start := null;\n"
 "full_xml := null;\n"
@@ -11211,10 +11912,10 @@ static const char *proc203 =
 "\n"
 " ;\n"
 "}\n"
-"--src dav_api.sql:6513\n";
+"--src dav_api.sql:6663\n";
 
-static const char *proc204 = 
-"#line 6597 \"[executable]/dav_api.sql\"\n"
+static const char *proc215 = 
+"#line 6745 \"[executable]/dav_api.sql\"\n"
 "create function\n"
 "DAV_HOME_DIR_UPDATE ()\n"
 "{\n"
@@ -11224,14 +11925,14 @@ static const char *proc204 =
 "DAV_HOME_DIR_CREATE (U_NAME);\n"
 "registry_set (\'DAV_HOME_DIR_UPDATE\', \'done\');\n"
 "}\n"
-"--src dav_api.sql:6595\n";
+"--src dav_api.sql:6743\n";
 
 
 static const char *other0 = 
 " DAV_HOME_DIR_UPDATE ()\n";
 /* dav_meta.sql */
 
-static const char *proc205 = 
+static const char *proc216 = 
 "#line 23 \"[executable]/dav_meta.sql\"\n"
 "create function DAV_GUESS_MIME_TYPE_BY_NAME (in orig_res_name varchar) returns varchar\n"
 "{\n"
@@ -11344,7 +12045,7 @@ static const char *proc205 =
 "}\n"
 "--src dav_meta.sql:21\n";
 
-static const char *proc206 = 
+static const char *proc217 = 
 "#line 134 \"[executable]/dav_meta.sql\"\n"
 "create function DAV_GUESS_MIME_TYPE (in orig_res_name varchar, inout content any, inout html_start any) returns varchar\n"
 "{\n"
@@ -11475,7 +12176,7 @@ static const char *proc206 =
 "}\n"
 "--src dav_meta.sql:132\n";
 
-static const char *proc207 = 
+static const char *proc218 = 
 "#line 263 \"[executable]/dav_meta.sql\"\n"
 "create procedure file_space_fmt (in d integer) returns varchar\n"
 "{\n"
@@ -11497,7 +12198,7 @@ static const char *proc207 =
 "}\n"
 "--src dav_meta.sql:261\n";
 
-static const char *proc208 = 
+static const char *proc219 = 
 "#line 283 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/x-openlink-license\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11524,7 +12225,7 @@ static const char *proc208 =
 "}\n"
 "--src dav_meta.sql:281\n";
 
-static const char *proc209 = 
+static const char *proc220 = 
 "#line 308 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_opendocument\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11564,7 +12265,7 @@ static const char *proc209 =
 "}\n"
 "--src dav_meta.sql:306\n";
 
-static const char *proc210 = 
+static const char *proc221 = 
 "#line 346 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.text\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11572,7 +12273,7 @@ static const char *proc210 =
 "}\n"
 "--src dav_meta.sql:344\n";
 
-static const char *proc211 = 
+static const char *proc222 = 
 "#line 352 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.database\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11580,7 +12281,7 @@ static const char *proc211 =
 "}\n"
 "--src dav_meta.sql:350\n";
 
-static const char *proc212 = 
+static const char *proc223 = 
 "#line 358 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.graphics\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11588,7 +12289,7 @@ static const char *proc212 =
 "}\n"
 "--src dav_meta.sql:356\n";
 
-static const char *proc213 = 
+static const char *proc224 = 
 "#line 364 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.presentation\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11596,7 +12297,7 @@ static const char *proc213 =
 "}\n"
 "--src dav_meta.sql:362\n";
 
-static const char *proc214 = 
+static const char *proc225 = 
 "#line 369 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.spreadsheet\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11604,7 +12305,7 @@ static const char *proc214 =
 "}\n"
 "--src dav_meta.sql:367\n";
 
-static const char *proc215 = 
+static const char *proc226 = 
 "#line 374 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.chart\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11612,7 +12313,7 @@ static const char *proc215 =
 "}\n"
 "--src dav_meta.sql:372\n";
 
-static const char *proc216 = 
+static const char *proc227 = 
 "#line 379 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.formula\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11620,7 +12321,7 @@ static const char *proc216 =
 "}\n"
 "--src dav_meta.sql:377\n";
 
-static const char *proc217 = 
+static const char *proc228 = 
 "#line 384 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.image\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11628,7 +12329,7 @@ static const char *proc217 =
 "}\n"
 "--src dav_meta.sql:382\n";
 
-static const char *proc218 = 
+static const char *proc229 = 
 "#line 390 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/x-openlink-image\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11667,7 +12368,7 @@ static const char *proc218 =
 "}\n"
 "--src dav_meta.sql:388\n";
 
-static const char *proc219 = 
+static const char *proc230 = 
 "#line 427 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/x-openlink-photo\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11705,7 +12406,7 @@ static const char *proc219 =
 "}\n"
 "--src dav_meta.sql:425\n";
 
-static const char *proc220 = 
+static const char *proc231 = 
 "#line 463 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/audio\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11715,7 +12416,7 @@ static const char *proc220 =
 "}\n"
 "--src dav_meta.sql:461\n";
 
-static const char *proc221 = 
+static const char *proc232 = 
 "#line 471 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_audio/mpeg\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11723,7 +12424,7 @@ static const char *proc221 =
 "}\n"
 "--src dav_meta.sql:469\n";
 
-static const char *proc222 = 
+static const char *proc233 = 
 "#line 477 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_audio/x-flac\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11731,7 +12432,7 @@ static const char *proc222 =
 "}\n"
 "--src dav_meta.sql:475\n";
 
-static const char *proc223 = 
+static const char *proc234 = 
 "#line 483 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_audio/x-mp3\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11739,7 +12440,7 @@ static const char *proc223 =
 "}\n"
 "--src dav_meta.sql:481\n";
 
-static const char *proc224 = 
+static const char *proc235 = 
 "#line 489 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_audio/x-m4a\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11747,7 +12448,7 @@ static const char *proc224 =
 "}\n"
 "--src dav_meta.sql:487\n";
 
-static const char *proc225 = 
+static const char *proc236 = 
 "#line 495 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_audio/x-m4p\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11755,7 +12456,7 @@ static const char *proc225 =
 "}\n"
 "--src dav_meta.sql:493\n";
 
-static const char *proc226 = 
+static const char *proc237 = 
 "#line 501 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/ogg\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -11763,7 +12464,7 @@ static const char *proc226 =
 "}\n"
 "--src dav_meta.sql:499\n";
 
-static const char *proc227 = 
+static const char *proc238 = 
 "#line 507 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msoffice+xml\" (in type_descr varchar, in orig_res_name varchar, inout content any, inout html_start any, inout docprops any)\n"
 "{\n"
@@ -11794,7 +12495,7 @@ static const char *proc227 =
 "}\n"
 "--src dav_meta.sql:505\n";
 
-static const char *proc228 = 
+static const char *proc239 = 
 "#line 537 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msexcel\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11807,7 +12508,7 @@ static const char *proc228 =
 "}\n"
 "--src dav_meta.sql:535\n";
 
-static const char *proc229 = 
+static const char *proc240 = 
 "#line 548 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msaccess\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11820,7 +12521,7 @@ static const char *proc229 =
 "}\n"
 "--src dav_meta.sql:546\n";
 
-static const char *proc230 = 
+static const char *proc241 = 
 "#line 559 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msproject\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11833,7 +12534,7 @@ static const char *proc230 =
 "}\n"
 "--src dav_meta.sql:557\n";
 
-static const char *proc231 = 
+static const char *proc242 = 
 "#line 571 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/mspowerpoint\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11846,7 +12547,7 @@ static const char *proc231 =
 "}\n"
 "--src dav_meta.sql:569\n";
 
-static const char *proc232 = 
+static const char *proc243 = 
 "#line 583 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msword\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11859,7 +12560,7 @@ static const char *proc232 =
 "}\n"
 "--src dav_meta.sql:581\n";
 
-static const char *proc233 = 
+static const char *proc244 = 
 "#line 595 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/pdf\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11872,7 +12573,7 @@ static const char *proc233 =
 "}\n"
 "--src dav_meta.sql:593\n";
 
-static const char *proc234 = 
+static const char *proc245 = 
 "#line 607 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/xbrl+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11891,7 +12592,7 @@ static const char *proc234 =
 "}\n"
 "--src dav_meta.sql:605\n";
 
-static const char *proc235 = 
+static const char *proc246 = 
 "#line 624 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/doap+rdf\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11911,7 +12612,7 @@ static const char *proc235 =
 "}\n"
 "--src dav_meta.sql:622\n";
 
-static const char *proc236 = 
+static const char *proc247 = 
 "#line 642 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/xddl+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11935,7 +12636,7 @@ static const char *proc236 =
 "}\n"
 "--src dav_meta.sql:640\n";
 
-static const char *proc237 = 
+static const char *proc248 = 
 "#line 664 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/archive\" (in type_descr varchar, in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11951,7 +12652,7 @@ static const char *proc237 =
 "}\n"
 "--src dav_meta.sql:662\n";
 
-static const char *proc238 = 
+static const char *proc249 = 
 "#line 678 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/tar\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11959,7 +12660,7 @@ static const char *proc238 =
 "}\n"
 "--src dav_meta.sql:676\n";
 
-static const char *proc239 = 
+static const char *proc250 = 
 "#line 684 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/taz\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11967,7 +12668,7 @@ static const char *proc239 =
 "}\n"
 "--src dav_meta.sql:682\n";
 
-static const char *proc240 = 
+static const char *proc251 = 
 "#line 690 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/gz\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11975,7 +12676,7 @@ static const char *proc240 =
 "}\n"
 "--src dav_meta.sql:688\n";
 
-static const char *proc241 = 
+static const char *proc252 = 
 "#line 696 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msi\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11983,7 +12684,7 @@ static const char *proc241 =
 "}\n"
 "--src dav_meta.sql:694\n";
 
-static const char *proc242 = 
+static const char *proc253 = 
 "#line 702 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/dmg\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11991,7 +12692,7 @@ static const char *proc242 =
 "}\n"
 "--src dav_meta.sql:700\n";
 
-static const char *proc243 = 
+static const char *proc254 = 
 "#line 708 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/arj\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -11999,7 +12700,7 @@ static const char *proc243 =
 "}\n"
 "--src dav_meta.sql:706\n";
 
-static const char *proc244 = 
+static const char *proc255 = 
 "#line 714 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/bz\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12007,7 +12708,7 @@ static const char *proc244 =
 "}\n"
 "--src dav_meta.sql:712\n";
 
-static const char *proc245 = 
+static const char *proc256 = 
 "#line 720 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/bz2\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12015,7 +12716,7 @@ static const char *proc245 =
 "}\n"
 "--src dav_meta.sql:718\n";
 
-static const char *proc246 = 
+static const char *proc257 = 
 "#line 726 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/tgz\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12023,7 +12724,7 @@ static const char *proc246 =
 "}\n"
 "--src dav_meta.sql:724\n";
 
-static const char *proc247 = 
+static const char *proc258 = 
 "#line 732 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/rar\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12031,7 +12732,7 @@ static const char *proc247 =
 "}\n"
 "--src dav_meta.sql:730\n";
 
-static const char *proc248 = 
+static const char *proc259 = 
 "#line 738 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/zip\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12039,7 +12740,7 @@ static const char *proc248 =
 "}\n"
 "--src dav_meta.sql:736\n";
 
-static const char *proc249 = 
+static const char *proc260 = 
 "#line 744 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/cab\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12047,7 +12748,7 @@ static const char *proc249 =
 "}\n"
 "--src dav_meta.sql:742\n";
 
-static const char *proc250 = 
+static const char *proc261 = 
 "#line 750 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/lzh\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12055,7 +12756,7 @@ static const char *proc250 =
 "}\n"
 "--src dav_meta.sql:748\n";
 
-static const char *proc251 = 
+static const char *proc262 = 
 "#line 756 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/ace\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12063,7 +12764,7 @@ static const char *proc251 =
 "}\n"
 "--src dav_meta.sql:754\n";
 
-static const char *proc252 = 
+static const char *proc263 = 
 "#line 762 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/iso\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12071,7 +12772,7 @@ static const char *proc252 =
 "}\n"
 "--src dav_meta.sql:760\n";
 
-static const char *proc253 = 
+static const char *proc264 = 
 "#line 768 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msword+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12081,7 +12782,7 @@ static const char *proc253 =
 "}\n"
 "--src dav_meta.sql:766\n";
 
-static const char *proc254 = 
+static const char *proc265 = 
 "#line 776 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msexcel+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12091,7 +12792,7 @@ static const char *proc254 =
 "}\n"
 "--src dav_meta.sql:774\n";
 
-static const char *proc255 = 
+static const char *proc266 = 
 "#line 784 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msproject+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12101,7 +12802,7 @@ static const char *proc255 =
 "}\n"
 "--src dav_meta.sql:782\n";
 
-static const char *proc256 = 
+static const char *proc267 = 
 "#line 792 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/msvisio+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12111,7 +12812,7 @@ static const char *proc256 =
 "}\n"
 "--src dav_meta.sql:790\n";
 
-static const char *proc257 = 
+static const char *proc268 = 
 "#line 801 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/rss+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12164,7 +12865,7 @@ static const char *proc257 =
 "}\n"
 "--src dav_meta.sql:799\n";
 
-static const char *proc258 = 
+static const char *proc269 = 
 "#line 853 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/atom+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12205,7 +12906,7 @@ static const char *proc258 =
 "}\n"
 "--src dav_meta.sql:851\n";
 
-static const char *proc259 = 
+static const char *proc270 = 
 "#line 892 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_text/eml\" (in orig_res_name varchar, inout content1 any, inout html_start any)\n"
 "{\n"
@@ -12244,7 +12945,7 @@ static const char *proc259 =
 "}\n"
 "--src dav_meta.sql:890\n";
 
-static const char *proc260 = 
+static const char *proc271 = 
 "#line 929 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/xbel+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12271,7 +12972,7 @@ static const char *proc260 =
 "}\n"
 "--src dav_meta.sql:927\n";
 
-static const char *proc261 = 
+static const char *proc272 = 
 "#line 954 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/rdf+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12290,7 +12991,7 @@ static const char *proc261 =
 "}\n"
 "--src dav_meta.sql:952\n";
 
-static const char *proc262 = 
+static const char *proc273 = 
 "#line 971 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_text/rdf+ttl\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12304,7 +13005,7 @@ static const char *proc262 =
 "}\n"
 "--src dav_meta.sql:969\n";
 
-static const char *proc263 = 
+static const char *proc274 = 
 "#line 983 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_text/rdf+n3\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12318,7 +13019,7 @@ static const char *proc263 =
 "}\n"
 "--src dav_meta.sql:981\n";
 
-static const char *proc264 = 
+static const char *proc275 = 
 "#line 995 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/foaf+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12382,7 +13083,7 @@ static const char *proc264 =
 "}\n"
 "--src dav_meta.sql:993\n";
 
-static const char *proc265 = 
+static const char *proc276 = 
 "#line 1058 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/mods+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12414,7 +13115,7 @@ static const char *proc265 =
 "}\n"
 "--src dav_meta.sql:1056\n";
 
-static const char *proc266 = 
+static const char *proc277 = 
 "#line 1089 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/opml+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12468,7 +13169,7 @@ static const char *proc266 =
 "}\n"
 "--src dav_meta.sql:1087\n";
 
-static const char *proc267 = 
+static const char *proc278 = 
 "#line 1141 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/ocs+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12491,7 +13192,7 @@ static const char *proc267 =
 "}\n"
 "--src dav_meta.sql:1139\n";
 
-static const char *proc268 = 
+static const char *proc279 = 
 "#line 1162 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_text/html\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12519,7 +13220,7 @@ static const char *proc268 =
 "}\n"
 "--src dav_meta.sql:1160\n";
 
-static const char *proc269 = 
+static const char *proc280 = 
 "#line 1189 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/x-openlinksw-vsp\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12546,7 +13247,7 @@ static const char *proc269 =
 "}\n"
 "--src dav_meta.sql:1187\n";
 
-static const char *proc270 = 
+static const char *proc281 = 
 "#line 1215 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/x-openlinksw-vspx+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12570,7 +13271,7 @@ static const char *proc270 =
 "}\n"
 "--src dav_meta.sql:1213\n";
 
-static const char *proc271 = 
+static const char *proc282 = 
 "#line 1237 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/bpel+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12591,7 +13292,7 @@ static const char *proc271 =
 "}\n"
 "--src dav_meta.sql:1235\n";
 
-static const char *proc272 = 
+static const char *proc283 = 
 "#line 1256 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/annotea+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12610,7 +13311,7 @@ static const char *proc272 =
 "}\n"
 "--src dav_meta.sql:1254\n";
 
-static const char *proc273 = 
+static const char *proc284 = 
 "#line 1273 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/google-kinds+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12631,7 +13332,7 @@ static const char *proc273 =
 "}\n"
 "--src dav_meta.sql:1271\n";
 
-static const char *proc274 = 
+static const char *proc285 = 
 "#line 1292 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/wsdl+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12652,7 +13353,7 @@ static const char *proc274 =
 "}\n"
 "--src dav_meta.sql:1290\n";
 
-static const char *proc275 = 
+static const char *proc286 = 
 "#line 1311 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/google-base+xml\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12826,7 +13527,7 @@ static const char *proc275 =
 "}\n"
 "--src dav_meta.sql:1309\n";
 
-static const char *proc276 = 
+static const char *proc287 = 
 "#line 1483 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_application/x-openlinksw-vad\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12868,7 +13569,7 @@ static const char *proc276 =
 "}\n"
 "--src dav_meta.sql:1481\n";
 
-static const char *proc277 = 
+static const char *proc288 = 
 "#line 1523 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_text/wiki\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -12936,7 +13637,7 @@ static const char *proc277 =
 "}\n"
 "--src dav_meta.sql:1521\n";
 
-static const char *proc278 = 
+static const char *proc289 = 
 "#line 1591 \"[executable]/dav_meta.sql\"\n"
 "create function IMC_TO_XML (in _src varchar)\n"
 "{\n"
@@ -13004,7 +13705,7 @@ static const char *proc278 =
 "xte_nodebld_init (line_acc);\n"
 "delims := regexp_parse (\n"
 "\n"
-"\'^([A-Za-z0-9-]+[.])?([A-Za-z0-9-]+)(([;][A-Za-z0-9-]+(=(([^\\001-\\037\\200-\\377\";:,]*)|(\"[^\\001-\\037\\200-\\377\"]*\"))(,(([^\\001-\\037\\200-\\377\";:,]*)|(\"[^\\001-\\037\\200-\\377\"]*\")))*)?)*)([:])([\\040-\\377]*)\\044\',\n"
+"\'^([A-Za-z0-9-]+[.])?([A-Za-z0-9-]+)(([;][A-Za-z0-9-]+(=(([^\\001-\\037\\200-\\377\";:,]*)|(\"[^\\001-\\037\\200-\\377\"]*\"))(,(([^\\001-\\037\\200-\\377\";:,]*)|(\"[^\\001-\\037\\200-\\377\"]*\")))*)?)*)([:])([\\011\\040-\\377]*)\\044\',\n"
 "\n"
 "line, 0 );\n"
 "if (delims is null)\n"
@@ -13117,7 +13818,7 @@ static const char *proc278 =
 "}\n"
 "--src dav_meta.sql:1589\n";
 
-static const char *proc279 = 
+static const char *proc290 = 
 "#line 1771 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_text/directory\" (in orig_res_name varchar, inout content any, inout html_start any)\n"
 "{\n"
@@ -13244,7 +13945,7 @@ static const char *proc279 =
 "}\n"
 "--src dav_meta.sql:1769\n";
 
-static const char *proc280 = 
+static const char *proc291 = 
 "#line 1897 \"[executable]/dav_meta.sql\"\n"
 "create function \"DAV_EXTRACT_RDF_BY_METAS\" (inout doc any, inout metas any, inout extras any)\n"
 "{\n"
@@ -13291,7 +13992,7 @@ static const char *proc280 =
 "}\n"
 "--src dav_meta.sql:1895\n";
 
-static const char *proc281 = 
+static const char *proc292 = 
 "#line 1948 \"[executable]/dav_meta.sql\"\n"
 "create function DB.DBA.UNIX_DATETIME_PARSER (in strg varchar, in trap_error integer := 0, in output_mode integer := 0)\n"
 "{\n"
@@ -13395,7 +14096,7 @@ static const char *other1 =
 "grant execute on DB.DBA.UNIX_DATETIME_PARSER to public\n";
 static const char *other2 = 
 "xpf_extension (\'http://www.openlinksw.com/virtuoso/bpel:unix-datetime-parser\', fix_identifier_case (\'DB.DBA.UNIX_DATETIME_PARSER\'), 0)\n";
-static const char *proc282 = 
+static const char *proc293 = 
 "#line 2057 \"[executable]/dav_meta.sql\"\n"
 "create function DB.DBA.UNIX_DATE_PARSER (in strg varchar, in trap_error integer := 0, in output_mode integer := 0)\n"
 "{\n"
@@ -13489,7 +14190,7 @@ static const char *other3 =
 "grant execute on DB.DBA.UNIX_DATE_PARSER to public\n";
 static const char *other4 = 
 "xpf_extension (\'http://www.openlinksw.com/virtuoso/bpel:unix-date-parser\', fix_identifier_case (\'DB.DBA.UNIX_DATE_PARSER\'), 0)\n";
-static const char *proc283 = 
+static const char *proc294 = 
 "#line 2157 \"[executable]/dav_meta.sql\"\n"
 "create function DB.DBA.BPEL_SPLIT_LIST (in strg varchar)\n"
 "{\n"
@@ -13520,7 +14221,7 @@ static const char *other5 =
 "grant execute on DB.DBA.BPEL_SPLIT_LIST to public\n";
 static const char *other6 = 
 "xpf_extension (\'http://www.openlinksw.com/virtuoso/bpel:split-list\', fix_identifier_case (\'DB.DBA.BPEL_SPLIT_LIST\'), 0)\n";
-static const char *proc284 = 
+static const char *proc295 = 
 "#line 2189 \"[executable]/dav_meta.sql\"\n"
 "create function DAV_EXTRACT_SPOTLIGHT (in resname varchar, inout rescontent any) returns any\n"
 "{\n"
@@ -13560,7 +14261,7 @@ static const char *proc284 =
 "}\n"
 "--src dav_meta.sql:2187\n";
 
-static const char *proc285 = 
+static const char *proc296 = 
 "#line 2228 \"[executable]/dav_meta.sql\"\n"
 "create function DAV_CONVERT_SPOTLIGHT_TO_VIRTUOSO (in sp_data any) returns any\n"
 "{\n"
@@ -13606,7 +14307,7 @@ static const char *proc285 =
 "}\n"
 "--src dav_meta.sql:2226\n";
 
-static const char *proc286 = 
+static const char *proc297 = 
 "#line 2273 \"[executable]/dav_meta.sql\"\n"
 "create procedure DAV_SPOTLIGHT_ADD (inout res any, in name varchar, inout val any)\n"
 "{\n"
@@ -13618,7 +14319,7 @@ static const char *proc286 =
 "}\n"
 "--src dav_meta.sql:2271\n";
 
-static const char *proc287 = 
+static const char *proc298 = 
 "#line 2284 \"[executable]/dav_meta.sql\"\n"
 " create procedure DB.DBA.XML_UNIX_DATE_TO_ISO (in unixdt integer)\n"
 "{\n"
@@ -13636,7 +14337,7 @@ static const char *other7 =
 "VALUES (\'http://www.openlinksw.com/xsltext/:unixTime2ISO\', \'DB.DBA.XML_UNIX_DATE_TO_ISO\')\n";
 static const char *other8 = 
 "xpf_extension (\'http://www.openlinksw.com/xsltext/:unixTime2ISO\', \'DB.DBA.XML_UNIX_DATE_TO_ISO\', 0)\n";
-static const char *proc288 = 
+static const char *proc299 = 
 "#line 2302 \"[executable]/dav_meta.sql\"\n"
 "create procedure DAV_EXTRACT_META_AS_RDF_XML (in resname varchar, in rescontent any := null)\n"
 "{\n"
@@ -13690,7 +14391,7 @@ static const char *proc288 =
 
 /* dav_acct.sql */
 
-static const char *proc289 = 
+static const char *proc300 = 
 "#line 23 \"[executable]/dav_acct.sql\"\n"
 "create function DAV_SPACE_QUOTA_PARENT (in res_path varchar, out _u_id integer, out _above_hy datetime, out _dav_use numeric, out _total_use numeric, out _quota numeric) returns varchar\n"
 "{\n"
@@ -13730,7 +14431,7 @@ static const char *proc289 =
 "}\n"
 "--src dav_acct.sql:21\n";
 
-static const char *proc290 = 
+static const char *proc301 = 
 "#line 61 \"[executable]/dav_acct.sql\"\n"
 "create function DAV_ADD_SPACE_QUOTA (in _home_path varchar, in _u_id integer, in _quota numeric) returns integer\n"
 "{\n"
@@ -13821,7 +14522,7 @@ static const char *proc290 =
 "}\n"
 "--src dav_acct.sql:59\n";
 
-static const char *proc291 = 
+static const char *proc302 = 
 "#line 150 \"[executable]/dav_acct.sql\"\n"
 "create function DAV_DEL_SPACE_QUOTA (in _home_path varchar) returns integer\n"
 "{\n"
@@ -13840,7 +14541,7 @@ static const char *proc291 =
 "}\n"
 "--src dav_acct.sql:148\n";
 
-static const char *proc292 = 
+static const char *proc303 = 
 "#line 167 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_SPACE_QUOTA_YELLOW_TRACK (in _home_path varchar, in _u_id integer, in old_above_hy datetime, in total_use numeric, in _quota numeric)\n"
 "{\n"
@@ -13875,7 +14576,7 @@ static const char *proc292 =
 "}\n"
 "--src dav_acct.sql:165\n";
 
-static const char *proc293 = 
+static const char *proc304 = 
 "#line 200 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_SPACE_QUOTA_SIGNAL (in res_path varchar, in home_path varchar, in _u_id integer, in _total_use numeric, in _quota numeric)\n"
 "{\n"
@@ -13903,7 +14604,7 @@ static const char *proc293 =
 "}\n"
 "--src dav_acct.sql:198\n";
 
-static const char *proc294 = 
+static const char *proc305 = 
 "#line 226 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_OWNER_DISABLED_SIGNAL (in res_path varchar, in _u_id integer)\n"
 "{\n"
@@ -13922,7 +14623,7 @@ static const char *proc294 =
 "}\n"
 "--src dav_acct.sql:224\n";
 
-static const char *proc295 = 
+static const char *proc306 = 
 "#line 243 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_HOME_DISABLED_SIGNAL (in res_path varchar, in home_path varchar, in _u_id integer)\n"
 "{\n"
@@ -13939,7 +14640,7 @@ static const char *proc295 =
 "}\n"
 "--src dav_acct.sql:241\n";
 
-static const char *proc296 = 
+static const char *proc307 = 
 "#line 258 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_SPACE_QUOTA_RES_INSERT (in newr_path varchar, in newr_len integer)\n"
 "{\n"
@@ -13976,7 +14677,7 @@ static const char *proc296 =
 "}\n"
 "--src dav_acct.sql:256\n";
 
-static const char *proc297 = 
+static const char *proc308 = 
 "#line 293 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_SPACE_QUOTA_RES_DELETE (in oldr_path varchar, in oldr_len integer)\n"
 "{\n"
@@ -14019,7 +14720,7 @@ static const char *proc297 =
 "}\n"
 "--src dav_acct.sql:291\n";
 
-static const char *proc298 = 
+static const char *proc309 = 
 "#line 334 \"[executable]/dav_acct.sql\"\n"
 "create procedure DAV_SPACE_QUOTA_RES_UPDATE (in oldr_path varchar, in oldr_len integer, in newr_path varchar, in newr_len integer)\n"
 "{\n"
@@ -14117,7 +14818,7 @@ static const char *proc298 =
 
 /* dav_rdf_quad.sql */
 
-static const char *proc299 = 
+static const char *proc310 = 
 "#line 23 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.RDF_DELETE_ENTIRE_GRAPH (in new_dav_graph varchar, in param integer)\n"
 "{\n"
@@ -14125,7 +14826,7 @@ static const char *proc299 =
 "}\n"
 "--src dav_rdf_quad.sql:21\n";
 
-static const char *proc300 = 
+static const char *proc311 = 
 "#line 29 \"[executable]/dav_rdf_quad.sql\"\n"
 "create function DB.DBA.DAV_FULL_PATH_TO_IRI (in dav_iri varchar, in _str varchar) returns varchar\n"
 "{\n"
@@ -14137,12 +14838,12 @@ static const char *proc300 =
 "}\n"
 "--src dav_rdf_quad.sql:27\n";
 
-static const char *proc301 = 
+static const char *proc312 = 
 "#line 39 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_AUTO_REPLICATE_TO_RDF_QUAD ()\n"
 "{\n"
 "declare uriqa_default_host, old_dav_graph, new_dav_graph varchar;\n"
-"uriqa_default_host := cfg_item_value (virtuoso_ini_path (), \'URIQA\',\'DefaultHost\');\n"
+"uriqa_default_host := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "if (isstring (registry_get (\'DB.DBA.DAV_RDF_GRAPH_URI\')))\n"
 "return;\n"
 "if (uriqa_default_host is null or uriqa_default_host = \'\')\n"
@@ -14151,16 +14852,16 @@ static const char *proc301 =
 "}\n"
 "--src dav_rdf_quad.sql:37\n";
 
-static const char *proc302 = 
+static const char *proc313 = 
 "#line 51 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_REPLICATE_ALL_TO_RDF_QUAD (in enable integer)\n"
 "{\n"
 "declare uriqa_default_host, old_dav_graph, new_dav_graph varchar;\n"
 "declare trx_size integer;\n"
-"uriqa_default_host := cfg_item_value (virtuoso_ini_path (), \'URIQA\',\'DefaultHost\');\n"
+"uriqa_default_host := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "if (uriqa_default_host is null or uriqa_default_host = \'\')\n"
 "signal (\'OBLOM\', \'No uriqa_default_host!\');\n"
-"if (cfg_item_value (virtuoso_ini_path (), \'URIQA\', \'DynamicLocal\') = \'1\')\n"
+"if (virtuoso_ini_item_value (\'URIQA\', \'DynamicLocal\') = \'1\')\n"
 "new_dav_graph := \'local:/DAV\';\n"
 "else\n"
 "new_dav_graph := sprintf (\'http://%s/DAV\', uriqa_default_host);\n"
@@ -14218,7 +14919,7 @@ static const char *proc302 =
 "}\n"
 "--src dav_rdf_quad.sql:49\n";
 
-static const char *proc303 = 
+static const char *proc314 = 
 "#line 116 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.RDF_CBD_DELETE (inout triple_list any, in graph_id any, in local_dav_uri any)\n"
 "{\n"
@@ -14294,7 +14995,7 @@ static const char *proc303 =
 "}\n"
 "--src dav_rdf_quad.sql:114\n";
 
-static const char *proc304 = 
+static const char *proc315 = 
 "#line 190 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_RDF_URI_RESOLVE (in dav_rdf_graph_uri varchar, in iri any, in fullpath varchar, in res_type varchar) returns varchar\n"
 "{\n"
@@ -14322,7 +15023,7 @@ static const char *proc304 =
 "}\n"
 "--src dav_rdf_quad.sql:188\n";
 
-static const char *proc305 = 
+static const char *proc316 = 
 "#line 216 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_RDF_REPLICATE_INT (in res_id integer, in restype varchar, in fullpath varchar)\n"
 "{\n"
@@ -14364,7 +15065,7 @@ static const char *proc305 =
 "}\n"
 "--src dav_rdf_quad.sql:214\n";
 
-static const char *proc306 = 
+static const char *proc317 = 
 "#line 256 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_RDF_CBD_DELETE_PROP (in n3v any, in fullpath varchar, in restype varchar, in dav_rdf_graph_iid IRI_ID, in dav_rdf_graph_uri varchar)\n"
 "{\n"
@@ -14406,7 +15107,7 @@ static const char *proc306 =
 "}\n"
 "--src dav_rdf_quad.sql:254\n";
 
-static const char *proc307 = 
+static const char *proc318 = 
 "#line 296 \"[executable]/dav_rdf_quad.sql\"\n"
 "create function DB.DBA.DAV_MAKE_USER_IRI (in userid integer)\n"
 "{\n"
@@ -14415,7 +15116,7 @@ static const char *proc307 =
 "if (email is null or email=\'\')\n"
 "{\n"
 "declare uriqa_default_host varchar;\n"
-"uriqa_default_host := cfg_item_value (virtuoso_ini_path (), \'URIQA\',\'DefaultHost\');\n"
+"uriqa_default_host := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "if (not isstring (uriqa_default_host))\n"
 "signal (\'22023\', \'Function DB.DBA.DAV_MAKE_USER_IRI() has failed to get \"DefaultHost\" parameter of [URIQA] section of Virtuoso configuration file\');\n"
 "email := sprintf (\'mailto:UserId%d@%s\', userid, uriqa_default_host);\n"
@@ -14429,7 +15130,7 @@ static const char *proc307 =
 "}\n"
 "--src dav_rdf_quad.sql:294\n";
 
-static const char *proc308 = 
+static const char *proc319 = 
 "#line 317 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_REPLICATE_RES_TO_RDF_QUAD (in res_id2 integer, in fullpath varchar)\n"
 "{\n"
@@ -14463,7 +15164,7 @@ static const char *proc308 =
 "}\n"
 "--src dav_rdf_quad.sql:315\n";
 
-static const char *proc309 = 
+static const char *proc320 = 
 "#line 349 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_REPLICATE_COL_TO_RDF_QUAD (in col_id2 integer)\n"
 "{\n"
@@ -14764,7 +15465,7 @@ static const char *trig32 =
 "}\n"
 "--src dav_rdf_quad.sql:625\n";
 
-static const char *proc310 = 
+static const char *proc321 = 
 "#line 635 \"[executable]/dav_rdf_quad.sql\"\n"
 "create procedure DB.DBA.DAV_RDF_PROPAGATE_COL_PATH_CHANGE (\n"
 "in dav_rdf_graph_uri varchar, in dav_rdf_graph_iid IRI_ID,\n"
@@ -14920,7 +15621,7 @@ static const char *trig34 =
 
 /* vfs.sql */
 
-static const char *proc311 = 
+static const char *proc322 = 
 "#line 31 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.COPY_PAGE (in _host varchar, in _urls any, in _root varchar, in _upd integer, in _dbg integer)\n"
 "{\n"
@@ -14950,7 +15651,7 @@ static const char *proc311 =
 "}\n"
 "--src vfs.sql:29\n";
 
-static const char *proc312 = 
+static const char *proc323 = 
 "#line 59 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_HTTP_RESP_CODE (inout _resp any)\n"
 "{\n"
@@ -14962,7 +15663,7 @@ static const char *proc312 =
 "}\n"
 "--src vfs.sql:57\n";
 
-static const char *proc313 = 
+static const char *proc324 = 
 "#line 69 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_ENSURE_NEW_SITE (in _host varchar, in _root varchar, in _new_host varchar, in _new_url varchar)\n"
 "{\n"
@@ -14975,21 +15676,37 @@ static const char *proc313 =
 "}\n"
 "--src vfs.sql:67\n";
 
-static const char *proc314 = 
+static const char *proc325 = 
 "#line 80 \"[executable]/vfs.sql\"\n"
+"create procedure WS.WS.VFS_GUESS_CONTENT_TYPE (in origin_uri varchar, in ret_content_type varchar, inout ret_body any)\n"
+"{\n"
+"declare ret_begin, ret_html any;\n"
+"ret_begin := subseq (ret_body, 0, 4096);\n"
+"if (isstring_session (ret_begin))\n"
+"ret_begin := string_output_string (ret_begin);\n"
+"ret_html := xtree_doc (ret_begin, 2);\n"
+"if (xpath_eval (\'/sitemapindex|/urlset\', ret_html) is not null)\n"
+"return \'text/xml\';\n"
+"return ret_content_type;\n"
+"}\n"
+"--src vfs.sql:78\n";
+
+static const char *proc326 = 
+"#line 93 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.COPY_PAGE_1 (in _host varchar, in _urls any, in _root varchar,\n"
 "in _upd integer, in _dbg integer)\n"
 "{\n"
 "declare _header, _etag, _http_resp_code, _start_url varchar;\n"
 "declare _del, _desc, _t_urls, _opts, _c_type varchar;\n"
 "declare _dav_method, _d_imgs, _opage varchar;\n"
-"declare _dav_enabled, _other, ua varchar;\n"
+"declare _dav_enabled, _other, ua, cust_headers varchar;\n"
 "declare dt, redir_flag, store_flag, try_to_get_rdf integer;\n"
 "declare _since datetime;\n"
 "declare _udata, ext_hook, store_hook, _header_arr, _resps, xp_exp any;\n"
-"declare n_urls, conv_html, is_sitemap, accept_rdf int;\n"
+"declare n_urls, conv_html, is_sitemap, accept_rdf, time_out int;\n"
 "\n"
 "conv_html := 1;\n"
+"time_out := null;\n"
 "n_urls := position (0, _urls) - 1;\n"
 "if (n_urls < 0)\n"
 "n_urls := length (_urls);\n"
@@ -14998,26 +15715,28 @@ static const char *proc314 =
 "select VS_NEWER, VS_OPTIONS, coalesce (VS_METHOD, \'\'), VS_URL, VS_SRC, coalesce (VS_OPAGE, \'\'),\n"
 "coalesce (VS_REDIRECT, 1), coalesce (VS_STORE, 1), coalesce (VS_DLOAD_META, 0), \n"
 "deserialize (VS_UDATA), VS_EXTRACT_FN, VS_STORE_FN, coalesce (VS_DEL, \'\'), coalesce (VS_OTHER, \'\'), \n"
-"VS_CONVERT_HTML, VS_IS_SITEMAP, VS_XPATH, VS_ACCEPT_RDF\n"
+"VS_CONVERT_HTML, VS_IS_SITEMAP, VS_XPATH, VS_ACCEPT_RDF, VS_TIMEOUT, VS_HEADERS\n"
 "into _since, _opts, _dav_method, _start_url, _d_imgs, _opage, \n"
 "redir_flag, store_flag, try_to_get_rdf, \n"
 "_udata, ext_hook, store_hook, _del, _other, \n"
-"conv_html, is_sitemap, xp_exp, accept_rdf\n"
+"conv_html, is_sitemap, xp_exp, accept_rdf, time_out, cust_headers\n"
 "from VFS_SITE where VS_HOST = _host and VS_ROOT = _root;\n"
 "nf_opt:\n"
 "\n"
-"_header := \'\';\n"
+"if (length (cust_headers) > 2)\n"
+"cust_headers := rtrim (cust_headers, \' \\r\\n\') || \'\\r\\n\';\n"
+"else\n"
+"cust_headers := null;\n"
+"\n"
+"_header := coalesce (cust_headers, \'\');\n"
 "if (isstring (_opts) and strchr (_opts, \':\') is not null)\n"
 "_header := sprintf (\'Authorization: Basic %s\\r\\n\', encode_base64(_opts));\n"
 "\n"
-"if (_upd = 1 and _since is not null)\n"
-"_header := concat (_header, \'If-Modified-Since: \', soap_print_box (_since, \'\', 1), \'\\r\\n\');\n"
-"\n"
-"if (accept_rdf)\n"
+"if (accept_rdf and strstr (_header, \'Accept:\') is null)\n"
 "_header := _header || \'Accept: application/rdf+xml, text/n3, text/rdf+n3, */*\\r\\n\';\n"
 "\n"
 "ua := registry_get (\'vfs_ua\');\n"
-"if (isstring (ua) and length (ua))\n"
+"if (isstring (ua) and length (ua) and strstr (_header, \'User-Agent:\') is null)\n"
 "{\n"
 "ua := trim (ua, \' \\r\\n\');\n"
 "_header := _header || \'User-Agent: \' || ua || \'\\r\\n\';\n"
@@ -15029,12 +15748,23 @@ static const char *proc314 =
 "for (declare i int, i := 0; i < n_urls; i := i + 1)\n"
 "{\n"
 "declare _url, _hdr varchar;\n"
+"declare _dt datetime;\n"
 "_url := _urls[i];\n"
-"_etag := (select VU_ETAG from VFS_URL where VU_HOST = _host and VU_URL = _url and VU_ROOT = _root);\n"
-"if (_etag is not null and isstring (_etag))\n"
+"\n"
+"_etag := null;\n"
+"_dt := _since;\n"
+"for select VU_ETAG, VU_CPTIME from VFS_URL where VU_HOST = _host and VU_URL = _url and VU_ROOT = _root do\n"
+"{\n"
+"_etag := VU_ETAG;\n"
+"_dt := VU_CPTIME;\n"
+"}\n"
+"if (_etag is not null and isstring (_etag) and length (_etag))\n"
 "_hdr := concat (_header,\'If-None-Match: \', _etag, \'\\r\\n\');\n"
 "else\n"
 "_hdr := _header;\n"
+"\n"
+"if (_upd = 1 and _dt is not null)\n"
+"_hdr := concat (_hdr, \'If-Modified-Since: \', soap_print_box (_dt, \'\', 1), \'\\r\\n\');\n"
 "_header_arr[i] := _hdr;  \n"
 "}\n"
 "}\n"
@@ -15101,7 +15831,7 @@ static const char *proc314 =
 "if (n_urls = 1)\n"
 "{\n"
 "declare _resp, _content any;\n"
-"_content := http_get (_t_urls[0], _resp, \'GET\', case when _upd = 1 then _header_arr[0] else _header_arr end);\n"
+"_content := http_get (_t_urls[0], _resp, \'GET\', case when _upd = 1 then _header_arr[0] else _header_arr end, null, null, redir_flag, time_out);\n"
 "\n"
 "if (isarray(_resp) and length (_resp) and not isstring (_resp [0]))\n"
 "{\n"
@@ -15154,11 +15884,13 @@ static const char *proc314 =
 "goto end_crawl;\n"
 "}\n"
 "\n"
-"_c_type := coalesce (http_request_header (_resp, \'Content-Type\'), \'\');\n"
-"_etag := http_request_header (_resp, \'ETag\', null, \'\');\n"
-"\n"
 "if (_http_resp_code = \'200\' and (isstring (_content) or __tag (_content) = 185))\n"
 "{\n"
+"_c_type := http_request_header (_resp, \'Content-Type\', null, \'\');\n"
+"_c_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (_url, _c_type, _content);\n"
+"_c_type := WS.WS.VFS_GUESS_CONTENT_TYPE (_url, _c_type, _content);\n"
+"_etag := http_request_header (_resp, \'ETag\', null, \'\');\n"
+"\n"
 "if (ext_hook is not null and __proc_exists (ext_hook))\n"
 "call (ext_hook) (_host, _url, _root, _content, _c_type, lev + 1);\n"
 "else if ((_url like \'%.htm%\' or _url like \'%/\' or _c_type like \'text/html%\' or _c_type like \'application/%xml\' or _c_type = \'text/xml\' or _url like \'%.xml\' or _url like \'%.xml.gz\') \n"
@@ -15191,19 +15923,19 @@ static const char *proc314 =
 "commit work;\n"
 "return;\n"
 "}\n"
-"--src vfs.sql:78\n";
+"--src vfs.sql:91\n";
 
-static const char *proc315 = 
-"#line 297 \"[executable]/vfs.sql\"\n"
+static const char *proc327 = 
+"#line 326 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.DELETE_LOCAL_COPY (in _host varchar, in _url varchar, in _root varchar)\n"
 "{\n"
 "delete from VFS_URL where VU_HOST = _host and VU_URL = _url and VU_ROOT = _root;\n"
 "delete from SYS_DAV_RES where RES_FULL_PATH = concat (\'/DAV/\', _root, _url);\n"
 "}\n"
-"--src vfs.sql:295\n";
+"--src vfs.sql:324\n";
 
-static const char *proc316 = 
-"#line 304 \"[executable]/vfs.sql\"\n"
+static const char *proc328 = 
+"#line 333 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_RUN (in url varchar, in threads int := null, in batch_size int := 1, in fn varchar := null, in dta any := null)\n"
 "{\n"
 "declare h, host, s_url, root_collection  any;\n"
@@ -15213,10 +15945,10 @@ static const char *proc316 =
 "root_collection := (select top 1 VS_ROOT from WS.WS.VFS_SITE where VS_HOST = host and VS_URL = s_url);\n"
 "WS.WS.SERV_QUEUE_TOP (host, root_collection, 0, 0, fn, dta, threads, batch_size);\n"
 "}\n"
-"--src vfs.sql:302\n";
+"--src vfs.sql:331\n";
 
-static const char *proc317 = 
-"#line 315 \"[executable]/vfs.sql\"\n"
+static const char *proc329 = 
+"#line 344 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_STATUS_GET (in _tgt varchar, in _root varchar)\n"
 "{\n"
 "declare rc any;\n"
@@ -15225,22 +15957,23 @@ static const char *proc317 =
 "rc := \'not started\';\n"
 "return rc;  \n"
 "}\n"
-"--src vfs.sql:313\n";
+"--src vfs.sql:342\n";
 
-static const char *proc318 = 
-"#line 325 \"[executable]/vfs.sql\"\n"
+static const char *proc330 = 
+"#line 354 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_STATUS_SET (in _tgt varchar, in _root varchar, in _stat varchar)\n"
 "{\n"
 "return registry_set (sprintf (\'__VFS_%s_%s\', _tgt, _root), _stat);\n"
 "}\n"
-"--src vfs.sql:323\n";
+"--src vfs.sql:352\n";
 
-static const char *proc319 = 
-"#line 332 \"[executable]/vfs.sql\"\n"
+static const char *proc331 = 
+"#line 361 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SERV_QUEUE_TOP (in _tgt varchar, in _root varchar, in _upd integer,\n"
 "in _dbg integer, in _fn varchar, in _clnt_data any, in threads int := null, in batch_size int := 1)\n"
 "{\n"
 "declare _msg, _stat, oq varchar;\n"
+"set_user_id (\'dba\');\n"
 "do_again:\n"
 "_stat := \'00000\';\n"
 "_msg := \'\';\n"
@@ -15264,10 +15997,10 @@ static const char *proc319 =
 "WS.WS.VFS_STATUS_SET (_tgt, _root, \'done\');\n"
 "\n"
 "}\n"
-"--src vfs.sql:330\n";
+"--src vfs.sql:359\n";
 
-static const char *proc320 = 
-"#line 366 \"[executable]/vfs.sql\"\n"
+static const char *proc332 = 
+"#line 396 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SERV_QUEUE (in _tgt varchar, in _root varchar, in _upd integer,\n"
 "in _dbg integer, in _fn varchar, in _clnt_data any, in nthreads int := null, in batch_size int := 1)\n"
 "{\n"
@@ -15281,6 +16014,7 @@ static const char *proc320 =
 "declare aq_list, aq, url_batch any;\n"
 "declare err any;\n"
 "declare pid, thr_conf, care_bot int;\n"
+"declare delay_sec float;\n"
 "\n"
 "_total := 0;\n"
 "registry_set (\'WEB_COPY\', \'X __sequence_set (\'\'WEB_COPY_SSHUT\'\', datediff (\'\'second\'\', stringdate (\'\'1980-01-01\'\'), now ()), 0)\');\n"
@@ -15292,15 +16026,15 @@ static const char *proc320 =
 "commit work;\n"
 "\n"
 "whenever not found goto n_site;\n"
-"select VS_URL, VS_METHOD, VS_THREADS, VS_BOT \n"
-"into _tgt_url, _dav_method, thr_conf, care_bot \n"
+"select VS_URL, VS_METHOD, VS_THREADS, VS_BOT, VS_DELAY \n"
+"into _tgt_url, _dav_method, thr_conf, care_bot, delay_sec \n"
 "from VFS_SITE where VS_HOST = _tgt and VS_ROOT = _root with (exclusive);\n"
+"if (care_bot)  \n"
+"VFS_ROBOTS_GET (_tgt, _root, delay_sec);\n"
 "if (thr_conf is not null and thr_conf > 0)\n"
 "nthreads := thr_conf;\n"
 "if (nthreads is null or nthreads < 0)\n"
 "nthreads := 1;\n"
-"if (care_bot)  \n"
-"VFS_ROBOTS_GET (_tgt, _root);\n"
 "commit work;\n"
 "\n"
 "if (_upd = 1)\n"
@@ -15344,11 +16078,19 @@ static const char *proc320 =
 "{\n"
 "ERR_MAIL_SEND (_tgt, vector (), _root, __SQL_STATE, __SQL_MESSAGE);\n"
 "rollback work;\n"
+"__SQL_STATE := cast (__SQL_STATE as varchar);\n"
+"if (__SQL_STATE = \'40001\')\n"
+"{\n"
+"resignal;\n"
+"}\n"
 "goto fn_end;\n"
 "};\n"
 "found_one := 0; ndone := 0;\n"
 "if (WS.WS.VFS_STATUS_GET (_tgt, _root) = \'stopped\')\n"
 "goto fn_end;\n"
+"commit work;\n"
+"if (delay_sec > 0)\n"
+"delay (delay_sec);\n"
 "for (declare i int, i := 0; i < batch_size; i := i + 1)\n"
 "{\n"
 "_rc := call (url_fn) (_tgt, _root, _next_url, _clnt_data);\n"
@@ -15404,10 +16146,10 @@ static const char *proc320 =
 "n_site:;\n"
 "return _total;\n"
 "}\n"
-"--src vfs.sql:364\n";
+"--src vfs.sql:394\n";
 
-static const char *proc321 = 
-"#line 504 \"[executable]/vfs.sql\"\n"
+static const char *proc333 = 
+"#line 543 \"[executable]/vfs.sql\"\n"
 "create procedure ERR_MAIL_SEND (in _tgt varchar, in _urls varchar, in _root varchar, in  _stat varchar, in _msg varchar)\n"
 "{\n"
 "declare n_urls int;\n"
@@ -15426,10 +16168,10 @@ static const char *proc321 =
 "msg := msg || sprintf (\'http://%s%s -> %s\\r\\n\', _tgt, _urls[i], _root); \n"
 "DB.DBA.NEW_MAIL (\'dav\', msg);\n"
 "}\n"
-"--src vfs.sql:502\n";
+"--src vfs.sql:541\n";
 
-static const char *proc322 = 
-"#line 524 \"[executable]/vfs.sql\"\n"
+static const char *proc334 = 
+"#line 563 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.LOCAL_STORE (in _host varchar, in _url varchar, in _root varchar,\n"
 "inout _content varchar, in _s_etag varchar, in _c_type varchar,\n"
 "in store_flag int := 1, in conv_html int := 1)\n"
@@ -15442,6 +16184,9 @@ static const char *proc322 =
 "{\n"
 "insert soft VFS_URL (VU_HOST, VU_URL, VU_CHKSUM, VU_CPTIME, VU_ETAG, VU_ROOT)\n"
 "values (_host, _url, md5 (_content), now (), _s_etag, _root);\n"
+"if (row_count () = 0)\n"
+"update WS.WS.VFS_URL set VU_CHKSUM = md5 (_content), VU_CPTIME = now (), VU_ETAG = _s_etag where\n"
+"VU_HOST = _host and VU_URL = _url and VU_ROOT = _root;\n"
 "return 0;\n"
 "}\n"
 "\n"
@@ -15537,10 +16282,10 @@ static const char *proc322 =
 "err_end:\n"
 "return 0;\n"
 "}\n"
-"--src vfs.sql:522\n";
+"--src vfs.sql:561\n";
 
-static const char *proc323 = 
-"#line 634 \"[executable]/vfs.sql\"\n"
+static const char *proc335 = 
+"#line 676 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.GET_URLS (in _host varchar, in _url varchar, in _root varchar, inout _content varchar, in lev int, in ctype varchar)\n"
 "{\n"
 "declare _stag, _etag, _len, _inx, _htag, _sltag, _count, _t_tag1, _t_tag2, _urls_arr_len, depth integer;\n"
@@ -15548,7 +16293,7 @@ static const char *proc323 =
 "declare _flw, _nflw, _method, _delete, xp_exp, base, robots, care_of_bot varchar;\n"
 "declare _newer datetime;\n"
 "declare _own integer;\n"
-"declare frames, _urls_arr any;\n"
+"declare frames, _urls_arr, origin_iri, urls any;\n"
 "\n"
 "if (WS.WS.SITEMAP_PROCESS (_host, _url, _root, _content, ctype, lev))\n"
 "return;\n"
@@ -15578,6 +16323,8 @@ static const char *proc323 =
 "\n"
 "_inx := 0;\n"
 "base := WS.WS.VFS_URI_COMPOSE (vector (\'http\', _host, _url, \'\', \'\', \'\'));\n"
+"origin_iri := iri_to_id (base, 1);\n"
+"urls := make_array (_urls_arr_len, \'any\');\n"
 "while (_inx < _urls_arr_len)\n"
 "{\n"
 "declare hi, sch any;\n"
@@ -15601,23 +16348,25 @@ static const char *proc323 =
 "_tmp_url := WS.WS.VFS_URI_COMPOSE (hi);\n"
 "if (_tmp_host <> _host)\n"
 "_tmp_url := _tmp;\n"
+"urls [_inx] := _tmp_url;  \n"
 "\n"
 "if ((get_keyword (_tmp_url, frames) is not null or WS.WS.FOLLOW (_host, _root, _tmp_url, _flw, _nflw, _start_url, _d_imgs)))\n"
 "{\n"
-"insert soft VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL)\n"
-"values (_host, now (), _tmp_url, \'waiting\', _root, lev);\n"
+"insert soft VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL, VQ_ORIGIN)\n"
+"values (_host, now (), _tmp_url, \'waiting\', _root, lev, origin_iri);\n"
 "}\n"
 "}\n"
 "next_url:\n"
 "_inx := _inx + 1;\n"
 "}\n"
+"delete from WS.WS.VFS_QUEUE where VQ_HOST = _host and VQ_ROOT = _root and VQ_ORIGIN = origin_iri and not position (VQ_URL, urls);\n"
 "no_site_rec:  \n"
 "return;\n"
 "}\n"
-"--src vfs.sql:632\n";
+"--src vfs.sql:674\n";
 
-static const char *proc324 = 
-"#line 710 \"[executable]/vfs.sql\"\n"
+static const char *proc336 = 
+"#line 756 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SITEMAP_PROCESS (in _host varchar, in _url varchar, in _root varchar, inout _content varchar, in _c_type varchar, in lev int)\n"
 "{\n"
 "declare xt, xp any;\n"
@@ -15659,30 +16408,30 @@ static const char *proc324 =
 "}\n"
 "xp := ar;\n"
 "}\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);\n"
 "return 1;\n"
 "}\n"
 "else if (xpath_eval (\'/sitemapindex/sitemap/loc\', xt) is not null)\n"
 "{\n"
 "\n"
 "xp := WS.WS.SITEMAP_GET_LOC (xt, \'/sitemapindex/sitemap\', \'./loc/text()\', \'./lastmod/text()\');\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);\n"
 "return 1;\n"
 "}\n"
 "else if (xpath_eval (\'/urlset/url/loc\', xt) is not null)\n"
 "{\n"
 "\n"
 "xp := WS.WS.SITEMAP_GET_LOC (xt, \'/urlset/url\', \'./loc/text()\', \'./lastmod/text()\');\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 1);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 1);\n"
 "return 1;\n"
 "}\n"
 "}\n"
 "return 0;\n"
 "}\n"
-"--src vfs.sql:708\n";
+"--src vfs.sql:754\n";
 
-static const char *proc325 = 
-"#line 773 \"[executable]/vfs.sql\"\n"
+static const char *proc337 = 
+"#line 819 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.MAKE_URL (in _host varchar, in _url varchar)\n"
 "{\n"
 "declare hf, _res any;\n"
@@ -15694,10 +16443,10 @@ static const char *proc325 =
 "_res := WS.WS.VFS_URI_COMPOSE (hf);  \n"
 "return _res;\n"
 "}\n"
-"--src vfs.sql:771\n";
+"--src vfs.sql:817\n";
 
-static const char *proc326 = 
-"#line 787 \"[executable]/vfs.sql\"\n"
+static const char *proc338 = 
+"#line 833 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SPLIT_URL (in _host varchar, in _url varchar, in _parent_url varchar,\n"
 "out _o_host varchar, out _o_url varchar)\n"
 "{\n"
@@ -15750,10 +16499,10 @@ static const char *proc326 =
 "_o_url := WS.WS.EXPAND_URL (_url, _parent_url);\n"
 "}\n"
 "}\n"
-"--src vfs.sql:785\n";
+"--src vfs.sql:831\n";
 
-static const char *proc327 = 
-"#line 842 \"[executable]/vfs.sql\"\n"
+static const char *proc339 = 
+"#line 888 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.EXPAND_URL_OLD (in _url varchar, in _c_url varchar)\n"
 "{\n"
 "declare _tmp varchar;\n"
@@ -15812,10 +16561,10 @@ static const char *proc327 =
 "end_loop:\n"
 "return _tmp;\n"
 "}\n"
-"--src vfs.sql:840\n";
+"--src vfs.sql:886\n";
 
-static const char *proc328 = 
-"#line 903 \"[executable]/vfs.sql\"\n"
+static const char *proc340 = 
+"#line 949 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.MKPATH (in _path any, in _own integer, in _grp integer, in _perms varchar)\n"
 "{\n"
 "declare _col, _len, _inx, _t_col integer;\n"
@@ -15847,10 +16596,10 @@ static const char *proc328 =
 "}\n"
 "return _col;\n"
 "}\n"
-"--src vfs.sql:901\n";
+"--src vfs.sql:947\n";
 
-static const char *proc329 = 
-"#line 937 \"[executable]/vfs.sql\"\n"
+static const char *proc341 = 
+"#line 983 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.FOLLOW (in _host varchar, in _root varchar, in _t_url varchar, in _flw_s varchar, in _nflw_s varchar, in _url varchar, in _img varchar)\n"
 "{\n"
 "declare _flw, _nflw any;\n"
@@ -15914,10 +16663,10 @@ static const char *proc329 =
 "end_step:\n"
 "return _rc;\n"
 "}\n"
-"--src vfs.sql:935\n";
+"--src vfs.sql:981\n";
 
-static const char *proc330 = 
-"#line 1003 \"[executable]/vfs.sql\"\n"
+static const char *proc342 = 
+"#line 1049 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.REPLACE_HREF (in _host varchar, in _url varchar, in _root varchar,\n"
 "in _content varchar, in _c_type varchar, in conv_html int := 1)\n"
 "{\n"
@@ -15947,10 +16696,10 @@ static const char *proc330 =
 "_tmp := string_output_string (_str);\n"
 "return _tmp;\n"
 "}\n"
-"--src vfs.sql:1001\n";
+"--src vfs.sql:1047\n";
 
-static const char *proc331 = 
-"#line 1035 \"[executable]/vfs.sql\"\n"
+static const char *proc343 = 
+"#line 1081 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.FIND_URI (in _content varchar, in _d_imgs varchar,\n"
 "in _host varchar, in _url varchar, in xp_exp varchar, out frames any, in ctype varchar)\n"
 "{\n"
@@ -15966,7 +16715,7 @@ static const char *proc331 =
 "\n"
 "if (tidy_external () and ctype like \'text/html\')\n"
 "_content := tidy_html (_content, \'output-xhtml:yes\\r\\ntidy-mark:no\');\n"
-"if (ctype like \'application/%+xml\' or ctype = \'text/xml\')\n"
+"if (ctype like \'application/%xml\' or ctype = \'text/xml\')\n"
 "_xml_tree := xml_tree (_content, 0);\n"
 "else  \n"
 "_xml_tree := xml_tree (_content, 2);\n"
@@ -16046,10 +16795,10 @@ static const char *proc331 =
 "}\n"
 "return arr1;\n"
 "}\n"
-"--src vfs.sql:1033\n";
+"--src vfs.sql:1079\n";
 
-static const char *proc332 = 
-"#line 1133 \"[executable]/vfs.sql\"\n"
+static const char *proc344 = 
+"#line 1179 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.LFS_EXP (in _host varchar, in _url varchar, in _root varchar, in _i_dst varchar)\n"
 "{\n"
 "declare _path, _name, _content, _dest, _tmp, _dst, _err varchar;\n"
@@ -16122,10 +16871,10 @@ static const char *proc332 =
 "close c;\n"
 "return;\n"
 "}\n"
-"--src vfs.sql:1131\n";
+"--src vfs.sql:1177\n";
 
-static const char *proc333 = 
-"#line 1209 \"[executable]/vfs.sql\"\n"
+static const char *proc345 = 
+"#line 1255 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.FIND_KEYWORD (inout params varchar, in _pkey varchar)\n"
 "{\n"
 "declare inx integer;\n"
@@ -16162,10 +16911,10 @@ static const char *proc333 =
 "end_find:\n"
 "return result;\n"
 "}\n"
-"--src vfs.sql:1207\n";
+"--src vfs.sql:1253\n";
 
-static const char *proc334 = 
-"#line 1249 \"[executable]/vfs.sql\"\n"
+static const char *proc346 = 
+"#line 1295 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.GET_HREF_IN_ARRAY (in _content varchar, in _d_imgs varchar)\n"
 "{\n"
 "declare _stag, _etag, _len, _inx, _htag, _sltag, _count, _t_tag1, _t_tag2, _uri_len integer;\n"
@@ -16258,10 +17007,10 @@ static const char *proc334 =
 "end_find:\n"
 "return _res;\n"
 "}\n"
-"--src vfs.sql:1247\n";
+"--src vfs.sql:1293\n";
 
-static const char *proc335 = 
-"#line 1344 \"[executable]/vfs.sql\"\n"
+static const char *proc347 = 
+"#line 1390 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.DAV_EXP (in _host varchar, in _url varchar, in _root varchar, in _i_dst varchar)\n"
 "{\n"
 "declare _path, _name, _content, _dest, _tmp, _etag, _dst varchar;\n"
@@ -16367,10 +17116,10 @@ static const char *proc335 =
 "close c;\n"
 "return 0;\n"
 "}\n"
-"--src vfs.sql:1342\n";
+"--src vfs.sql:1388\n";
 
-static const char *proc336 = 
-"#line 1452 \"[executable]/vfs.sql\"\n"
+static const char *proc348 = 
+"#line 1498 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.DAV_HEAD (inout _url varchar)\n"
 "{\n"
 "declare _res any;\n"
@@ -16387,10 +17136,10 @@ static const char *proc336 =
 "else\n"
 "return _err;\n"
 "}\n"
-"--src vfs.sql:1450\n";
+"--src vfs.sql:1496\n";
 
-static const char *proc337 = 
-"#line 1471 \"[executable]/vfs.sql\"\n"
+static const char *proc349 = 
+"#line 1517 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.DAV_MKCOL (inout _url varchar)\n"
 "{\n"
 "declare _res any;\n"
@@ -16407,10 +17156,10 @@ static const char *proc337 =
 "else\n"
 "return _err;\n"
 "}\n"
-"--src vfs.sql:1469\n";
+"--src vfs.sql:1515\n";
 
-static const char *proc338 = 
-"#line 1490 \"[executable]/vfs.sql\"\n"
+static const char *proc350 = 
+"#line 1536 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.DAV_PUT (inout _url varchar,in _content varchar)\n"
 "{\n"
 "declare _res any;\n"
@@ -16425,10 +17174,10 @@ static const char *proc338 =
 "else\n"
 "return -1;\n"
 "}\n"
-"--src vfs.sql:1488\n";
+"--src vfs.sql:1534\n";
 
-static const char *proc339 = 
-"#line 1507 \"[executable]/vfs.sql\"\n"
+static const char *proc351 = 
+"#line 1553 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.DAV_PROP (inout _url varchar, in _d_imgs varchar, in _auth varchar)\n"
 "{\n"
 "declare _res , _tree, _dav, _href, _responce any;\n"
@@ -16449,10 +17198,10 @@ static const char *proc339 =
 "_res := WS.WS.GET_HREF_FROM_XML (_body, _d_imgs);\n"
 "return _res;\n"
 "}\n"
-"--src vfs.sql:1505\n";
+"--src vfs.sql:1551\n";
 
-static const char *proc340 = 
-"#line 1531 \"[executable]/vfs.sql\"\n"
+static const char *proc352 = 
+"#line 1577 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.GET_HREF_FROM_XML (in _content varchar, in _d_imgs varchar)\n"
 "{\n"
 "declare _stag, _etag, _len, _inx, _htag, _sltag, _count, _t_tag1, _t_tag2, _uri_len integer;\n"
@@ -16555,10 +17304,10 @@ static const char *proc340 =
 "end_find:\n"
 "return _res;\n"
 "}\n"
-"--src vfs.sql:1529\n";
+"--src vfs.sql:1575\n";
 
-static const char *proc341 = 
-"#line 1636 \"[executable]/vfs.sql\"\n"
+static const char *proc353 = 
+"#line 1682 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.ISEMPTY (in x any)\n"
 "{\n"
 "if (\'\' = x or x is null or x = 0)\n"
@@ -16570,10 +17319,10 @@ static const char *proc341 =
 "return 0;\n"
 "}\n"
 "}\n"
-"--src vfs.sql:1634\n";
+"--src vfs.sql:1680\n";
 
-static const char *proc342 = 
-"#line 1658 \"[executable]/vfs.sql\"\n"
+static const char *proc354 = 
+"#line 1704 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.URL_BY_DATE (in host varchar, in coll varchar, out url varchar, in _clnt_data any)\n"
 "{\n"
 "declare next_url varchar;\n"
@@ -16591,10 +17340,10 @@ static const char *proc342 =
 "close cr;\n"
 "return 0;\n"
 "}\n"
-"--src vfs.sql:1656\n";
+"--src vfs.sql:1702\n";
 
-static const char *proc343 = 
-"#line 1677 \"[executable]/vfs.sql\"\n"
+static const char *proc355 = 
+"#line 1723 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_RECOVER_QUEUE_STAT (in host varchar, in coll varchar)\n"
 "{\n"
 "declare next_url varchar;\n"
@@ -16615,10 +17364,10 @@ static const char *proc343 =
 "done:\n"
 "close cr;\n"
 "}\n"
-"--src vfs.sql:1675\n";
+"--src vfs.sql:1721\n";
 
-static const char *proc344 = 
-"#line 1704 \"[executable]/vfs.sql\"\n"
+static const char *proc356 = 
+"#line 1750 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_MAKE_ENTRY (\n"
 "in url varchar,\n"
 "in follow varchar := \'/*\',\n"
@@ -16640,20 +17389,20 @@ static const char *proc344 =
 "select hi[1], hi[1], RM_PID, RM_ID from DB.DBA.SYS_RDF_MAPPERS;\n"
 "}\n"
 "}\n"
-"--src vfs.sql:1702\n";
+"--src vfs.sql:1748\n";
 
-static const char *proc345 = 
-"#line 1727 \"[executable]/vfs.sql\"\n"
+static const char *proc357 = 
+"#line 1773 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_GO (in url varchar)\n"
 "{\n"
 "declare hi any;\n"
 "hi := rfc1808_parse_uri (url);\n"
 "WS.WS.SERV_QUEUE_TOP (hi[1], hi[1], 0, 0, NULL, NULL);\n"
 "}\n"
-"--src vfs.sql:1725\n";
+"--src vfs.sql:1771\n";
 
-static const char *proc346 = 
-"#line 1736 \"[executable]/vfs.sql\"\n"
+static const char *proc358 = 
+"#line 1782 \"[executable]/vfs.sql\"\n"
 "create procedure\n"
 "WS.WS.VFS_URI_COMPOSE (in res any)\n"
 "{\n"
@@ -16689,15 +17438,15 @@ static const char *proc346 =
 "\n"
 "return _full_path;\n"
 "}\n"
-"--src vfs.sql:1734\n";
+"--src vfs.sql:1780\n";
 
-static const char *proc347 = 
-"#line 1774 \"[executable]/vfs.sql\"\n"
+static const char *proc359 = 
+"#line 1820 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.VFS_EXTRACT_RDF (in _host varchar, in _root varchar, in _start_path varchar, in opts any, in url varchar, inout content any, in ctype varchar, inout outhdr any, inout inhdr any)\n"
 "{\n"
 "declare mime_type, _graph, _base, out_arr, tmp varchar;\n"
 "declare html_start, xd any;\n"
-"declare rc int;\n"
+"declare rc, deadl int;\n"
 "\n"
 "html_start := null;\n"
 "\n"
@@ -16706,9 +17455,20 @@ static const char *proc347 =
 "_graph := WS.WS.MAKE_URL (_host, _start_path);\n"
 "_base := WS.WS.MAKE_URL (_host, url);\n"
 "\n"
+"commit work;\n"
+"deadl := 6;\n"
+"\n"
 "declare exit handler for sqlstate \'*\'\n"
 "{\n"
-"return;\n"
+"rollback work;\n"
+"__SQL_STATE := cast (__SQL_STATE as varchar);\n"
+"if (__SQL_STATE = \'40001\')\n"
+"{\n"
+"deadl := deadl - 1;\n"
+"if (deadl > 0)\n"
+"goto again;\n"
+"}\n"
+"resignal;\n"
 "};\n"
 "\n"
 "if (url like \'*.gz\')\n"
@@ -16723,7 +17483,7 @@ static const char *proc347 =
 "}\n"
 "\n"
 "mime_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (url, ctype, content);\n"
-"\n"
+"again:\n"
 "\n"
 "{\n"
 "if (strstr (mime_type, \'application/rdf+xml\') is not null)\n"
@@ -16792,10 +17552,10 @@ static const char *proc347 =
 "}\n"
 "\n"
 "}\n"
-"--src vfs.sql:1772\n";
+"--src vfs.sql:1818\n";
 
-static const char *proc348 = 
-"#line 1877 \"[executable]/vfs.sql\"\n"
+static const char *proc360 = 
+"#line 1934 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SITEMAP_ENSURE_NEW_SITE (in _host varchar, in _root varchar, in _new_host varchar, in _new_url varchar)\n"
 "{\n"
 "if (not exists (select 1 from WS.WS.VFS_SITE where VS_HOST = _new_host and VS_ROOT = _root))\n"
@@ -16807,16 +17567,20 @@ static const char *proc348 =
 "from WS.WS.VFS_SITE where VS_HOST = _host and VS_ROOT = _root;\n"
 "}    \n"
 "}\n"
-"--src vfs.sql:1875\n";
+"--src vfs.sql:1932\n";
 
-static const char *proc349 = 
-"#line 1891 \"[executable]/vfs.sql\"\n"
-"create procedure WS.WS.SITEMAP_URLS_REGISTER (in _host varchar, in _root varchar, inout xp any, in lev int := 0, in sm int := 0)\n"
+static const char *proc361 = 
+"#line 1948 \"[executable]/vfs.sql\"\n"
+"create procedure WS.WS.SITEMAP_URLS_REGISTER (in _host varchar, in _root varchar, in src_url varchar, inout xp any, in lev int := 0, in sm int := 0, in delta int := 1)\n"
 "{\n"
-"declare _flw_s, _nflw_s, _url, _img varchar;\n"
+"declare _flw_s, _nflw_s, _url, _img, origin_iri varchar;\n"
+"declare urls, inx any;\n"
 "whenever not found goto no_ini;\n"
 "select VS_FOLLOW, VS_NFOLLOW, VS_URL, VS_SRC into _flw_s, _nflw_s, _url, _img\n"
 "from VFS_SITE where VS_HOST = _host and VS_ROOT = _root;\n"
+"origin_iri := iri_to_id (WS.WS.MAKE_URL (_host, src_url), 1);\n"
+"urls := make_array (length (xp), \'any\');\n"
+"inx := 0;\n"
 "foreach (any u in xp) do\n"
 "{\n"
 "declare hf, host, url, abs_url varchar;\n"
@@ -16840,26 +17604,30 @@ static const char *proc349 =
 "url := WS.WS.VFS_URI_COMPOSE (hf);\n"
 "if (host <> _host)\n"
 "url := abs_url;\n"
+"urls [inx] := url;	\n"
+"inx := inx + 1;\n"
 "if (WS.WS.FOLLOW (_host, _root, url, _flw_s, _nflw_s, _url, _img))\n"
 "{\n"
-"insert soft WS.WS.VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL, VQ_VIA_SITEMAP) \n"
-"values (_host, now (), url, \'waiting\', _root, lev, sm); \n"
+"insert soft WS.WS.VFS_QUEUE (VQ_HOST, VQ_TS, VQ_URL, VQ_STAT, VQ_ROOT, VQ_LEVEL, VQ_VIA_SITEMAP, VQ_ORIGIN) \n"
+"values (_host, now (), url, \'waiting\', _root, lev, sm, origin_iri); \n"
 "if (row_count () = 0)\n"
 "{\n"
 "update WS.WS.VFS_QUEUE set VQ_STAT = \'waiting\' where VQ_HOST = _host and VQ_ROOT = _root and VQ_URL = url and VQ_TS < ts;\n"
 "}\n"
 "}\n"
 "}\n"
+"if (delta)\n"
+"delete from WS.WS.VFS_QUEUE where VQ_HOST = _host and VQ_ROOT = _root and VQ_ORIGIN = origin_iri and not position (VQ_URL, urls);\n"
 "if (length (xp))\n"
 "update WS.WS.VFS_SITE set VS_IS_SITEMAP = 1 where VS_HOST = _host and VS_ROOT = _root and VS_IS_SITEMAP = 0;\n"
 "commit work;\n"
 "no_ini:\n"
 "return;\n"
 "}\n"
-"--src vfs.sql:1889\n";
+"--src vfs.sql:1946\n";
 
-static const char *proc350 = 
-"#line 1938 \"[executable]/vfs.sql\"\n"
+static const char *proc362 = 
+"#line 2003 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SITEMAP_GET_LOC (inout xt any, in qr varchar, in loc varchar, in ts varchar)\n"
 "{\n"
 "declare xp, res any;\n"
@@ -16880,10 +17648,10 @@ static const char *proc350 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src vfs.sql:1936\n";
+"--src vfs.sql:2001\n";
 
-static const char *proc351 = 
-"#line 1960 \"[executable]/vfs.sql\"\n"
+static const char *proc363 = 
+"#line 2025 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SITEMAP_XML_PARSE (in _host varchar, in _url varchar, in _root varchar, inout _content varchar, \n"
 "in _c_type varchar := null, in lev int := 0)\n"
 "{\n"
@@ -16907,7 +17675,7 @@ static const char *proc351 =
 "if (_url like \'%.xml\' or _url like \'%.xml.gz\' or _c_type = \'text/xml\' or _c_type = \'application/xml\' or _c_type = \'application/sparql-results+xml\')\n"
 "{\n"
 "xt := xtree_doc (_content);\n"
-"if (xpath_eval (\'/urlset/dataset\', xt) is not null)\n"
+"if (xpath_eval (\'/urlset/dataset/dataDumpLocation\', xt) is not null)\n"
 "{\n"
 "declare ts any;\n"
 "xp := xpath_eval (\'/urlset/dataset/dataDumpLocation/text()\', xt, 0);\n"
@@ -16926,36 +17694,36 @@ static const char *proc351 =
 "}\n"
 "xp := ar;\n"
 "}\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);\n"
 "}\n"
 "else if (xpath_eval (\'/sitemapindex/sitemap/loc\', xt) is not null)\n"
 "{\n"
 "\n"
 "xp := WS.WS.SITEMAP_GET_LOC (xt, \'/sitemapindex/sitemap\', \'./loc/text()\', \'./lastmod/text()\');\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);\n"
 "}\n"
 "else if (_c_type = \'application/sparql-results+xml\')\n"
 "{\n"
 "xp := xpath_eval (\'/sparql/results/result/binding/uri/text()\', xt, 0);\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0);\n"
 "}\n"
 "else if (xpath_eval (\'/urlset/url/loc\', xt) is not null)\n"
 "{\n"
 "\n"
 "xp := WS.WS.SITEMAP_GET_LOC (xt, \'/urlset/url\', \'./loc/text()\', \'./lastmod/text()\');\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 1);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 1);\n"
 "}\n"
-"if (xpath_eval (\'/urlset/dataset/sampleURI\', xt) is not null)\n"
+"else if (xpath_eval (\'/urlset/dataset/sampleURI\', xt) is not null)\n"
 "{\n"
 "xp := xpath_eval (\'/urlset/dataset/sampleURI/text()\', xt, 0);\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 1);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 1);\n"
 "}\n"
 "}\n"
 "}\n"
-"--src vfs.sql:1958\n";
+"--src vfs.sql:2023\n";
 
-static const char *proc352 = 
-"#line 2030 \"[executable]/vfs.sql\"\n"
+static const char *proc364 = 
+"#line 2095 \"[executable]/vfs.sql\"\n"
 "create procedure WS.WS.SITEMAP_RDF_STORE (in _host varchar, in _url varchar, in _root varchar,\n"
 "inout _content varchar, in _s_etag varchar, in _c_type varchar,\n"
 "in store_flag int := 1, in udata any := null, in lev int := 0)\n"
@@ -17015,14 +17783,14 @@ static const char *proc352 =
 "arr[i] := iri_to_id (arr[i], 0);  \n"
 "}\n"
 "objs := (select DB.DBA.VECTOR_AGG (id_to_iri (O)) from DB.DBA.RDF_QUAD where G = iri_to_id (graph, 0) and P in (arr) and isiri_id (O));\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, objs, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, objs, lev, 0, 0);\n"
 "} \n"
 "if (_c_type = \'text/html\' and isvector (udata) and 1 = get_keyword (\'follow-meta\', udata, 0))\n"
 "{\n"
 "declare xt, xp any;\n"
 "xt := xtree_doc (_content, 2);\n"
 "xp := xpath_eval (\'/html/head/link[@rel=\"meta\"]/@href\', xt, 0);\n"
-"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, xp, lev, 0);\n"
+"WS.WS.SITEMAP_URLS_REGISTER (_host, _root, _url, xp, lev, 0, 0);\n"
 "}\n"
 "insert soft WS.WS.VFS_URL (VU_HOST, VU_URL, VU_CHKSUM, VU_CPTIME, VU_ETAG, VU_ROOT)\n"
 "values (_host, _url, md5 (_content), now (), _s_etag, _root);\n"
@@ -17031,11 +17799,11 @@ static const char *proc352 =
 "VU_HOST = _host and VU_URL = _url and VU_ROOT = _root;\n"
 "commit work;\n"
 "}\n"
-"--src vfs.sql:2028\n";
+"--src vfs.sql:2093\n";
 
-static const char *proc353 = 
-"#line 2107 \"[executable]/vfs.sql\"\n"
-"create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar)\n"
+static const char *proc365 = 
+"#line 2172 \"[executable]/vfs.sql\"\n"
+"create procedure VFS_ROBOTS_PARSE (in txt varchar, in ua varchar, out delay_sec float)\n"
 "{\n"
 "declare s any;\n"
 "declare v1 any;\n"
@@ -17043,6 +17811,7 @@ static const char *proc353 =
 "s := string_output ();\n"
 "http (txt, s);\n"
 "v1 := \'\';\n"
+"delay_sec := 0;\n"
 "while (1)\n"
 "{\n"
 "declare l, arr any;\n"
@@ -17069,12 +17838,17 @@ static const char *proc353 =
 "exact_match := 1;\n"
 "v1 := \'\';\n"
 "fill := 1;\n"
+"delay_sec := 0;\n"
 "}\n"
 "}\n"
 "else if (fill and lower (arr[0]) = \'disallow\')\n"
 "{\n"
 "v1 := v1 || trim (arr[1]) || \'%;\';\n"
 "}\n"
+"else if (fill and lower (arr[0]) = \'crawl-delay\')\n"
+"{\n"
+"delay_sec := atof (trim (arr[1]));\n"
+"}\n"
 "}\n"
 "ex:\n"
 "v1 := trim (v1);\n"
@@ -17082,13 +17856,13 @@ static const char *proc353 =
 "v1 := null;\n"
 "return v1;\n"
 "}\n"
-"--src vfs.sql:2105\n";
+"--src vfs.sql:2170\n";
 
-static const char *proc354 = 
-"#line 2156 \"[executable]/vfs.sql\"\n"
-"create procedure VFS_ROBOTS_GET (in _host varchar, in _root varchar)\n"
+static const char *proc366 = 
+"#line 2227 \"[executable]/vfs.sql\"\n"
+"create procedure VFS_ROBOTS_GET (in _host varchar, in _root varchar, inout site_delay_sec float)\n"
 "{\n"
-"declare url, ret, head, me, robots any;\n"
+"declare url, ret, head, me, robots, delay_sec any;\n"
 "url := vector (\'http\', _host, \'/robots.txt\', \'\', \'\', \'\');\n"
 "url := vfs_uri_compose (url);\n"
 "robots := null;\n"
@@ -17101,12 +17875,14 @@ static const char *proc354 =
 "goto en;\n"
 "me := coalesce (cfg_item_value (virtuoso_ini_path (), \'HTTPServer\', \'ClientIdString\'), \n"
 "\'Mozilla/4.0 (compatible; OpenLink Virtuoso)\');\n"
-"robots := vfs_robots_parse (ret, me);\n"
+"robots := VFS_ROBOTS_PARSE (ret, me, delay_sec);\n"
+"if (delay_sec > site_delay_sec)\n"
+"site_delay_sec := delay_sec;\n"
 "en:\n"
-"update VFS_SITE set VS_ROBOTS = robots where VS_HOST = _host and VS_ROOT = _root;\n"
+"update VFS_SITE set VS_ROBOTS = robots, VS_DELAY = delay_sec where VS_HOST = _host and VS_ROOT = _root;\n"
 "return robots;\n"
 "}\n"
-"--src vfs.sql:2154\n";
+"--src vfs.sql:2225\n";
 
 /* davxml2rdfxml.xsl */
 
@@ -17114,12 +17890,12 @@ static const char *xsl7[]= {
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: davxml2rdfxml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $\n"
+" -  $Id: davxml2rdfxml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -17235,12 +18011,12 @@ static const char *xsl8[]= {
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: davxml2n3xml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $\n"
+" -  $Id: davxml2n3xml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -17332,12 +18108,12 @@ static const char *xsl9[]= {
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: rdfxml2n3xml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $\n"
+" -  $Id: rdfxml2n3xml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -17582,12 +18358,12 @@ static const char *xsl10[]= {
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: n3xml2uriqahtml.xsl,v 1.1 2007/03/26 14:47:01 source Exp $\n"
+" -  $Id: n3xml2uriqahtml.xsl,v 1.1.2.1 2012/03/08 12:54:59 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -17668,7 +18444,7 @@ static const char *xsl10[]= {
 
 /* uriqa.sql */
 
-static const char *tbl0 = 
+static const char *tbl1 = 
 "create table WS.WS.URIQA_HANDLER\n"
 "(\n"
 "UH_ID integer not null primary key,\n"
@@ -17681,7 +18457,7 @@ static const char *tbl0 =
 ")\n"
 "create index URIQA_HANDLER_ORDER_NAME on WS.WS.URIQA_HANDLER (UH_ORDER, UH_NAME)\n";
 
-static const char *proc355 = 
+static const char *proc367 = 
 "#line 44 \"[executable]/uriqa.sql\"\n"
 "create function WS.WS.URIQA_CFG_ITEM_VALUE (in param_name varchar, in is_list integer, in dflt_value varchar)\n"
 "{\n"
@@ -17689,7 +18465,7 @@ static const char *proc355 =
 "declare string_val varchar;\n"
 "declare list_val any;\n"
 "ini_path := virtuoso_ini_path ();\n"
-"string_val := cfg_item_value (ini_path, \'URIQA\', param_name);\n"
+"string_val := virtuoso_ini_item_value (\'URIQA\', param_name);\n"
 "if (string_val is not null)\n"
 "{\n"
 "if (is_list)\n"
@@ -17723,7 +18499,7 @@ static const char *proc355 =
 "}\n"
 "--src uriqa.sql:42\n";
 
-static const char *proc356 = 
+static const char *proc368 = 
 "#line 84 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.URIQA_LOAD_FROM_INI ()\n"
 "{\n"
@@ -17776,7 +18552,7 @@ static const char *proc356 =
 
 static const char *other9 = 
 "WS.WS.URIQA_LOAD_FROM_INI ()\n";
-static const char *proc357 = 
+static const char *proc369 = 
 "#line 136 \"[executable]/uriqa.sql\"\n"
 "create function WS.WS.URIQA_FULL_URI (inout path varchar, inout params varchar, inout lines varchar, in parse_params integer, in trim_prefix integer) returns varchar\n"
 "{\n"
@@ -17816,7 +18592,7 @@ static const char *proc357 =
 "}\n"
 "--src uriqa.sql:134\n";
 
-static const char *proc358 = 
+static const char *proc370 = 
 "#line 174 \"[executable]/uriqa.sql\"\n"
 "create function WS.WS.URIQA_APPLY_TRIGGERS (in op varchar, inout uri varchar, inout body any, inout params varchar, inout lines varchar) returns any\n"
 "{\n"
@@ -17876,7 +18652,7 @@ static const char *proc358 =
 "}\n"
 "--src uriqa.sql:172\n";
 
-static const char *proc359 = 
+static const char *proc371 = 
 "#line 232 \"[executable]/uriqa.sql\"\n"
 "create function WS.WS.URIQA_N3_DIR_LIST (inout split any, in a_uid integer)\n"
 "{\n"
@@ -17915,7 +18691,7 @@ static const char *proc359 =
 "}\n"
 "--src uriqa.sql:230\n";
 
-static const char *proc360 = 
+static const char *proc372 = 
 "#line 269 \"[executable]/uriqa.sql\"\n"
 "create function DB.DBA.\"DAV_EXTRACT_DYN_RDF_application/xbel+xml\" (in id any, inout split any, inout old_prop any, in a_uid integer) returns any\n"
 "{\n"
@@ -18007,7 +18783,7 @@ static const char *proc360 =
 "}\n"
 "--src uriqa.sql:267\n";
 
-static const char *proc361 = 
+static const char *proc373 = 
 "#line 359 \"[executable]/uriqa.sql\"\n"
 "create function WS.WS.URIQA_HANDLER_LOCALDAV (inout op varchar, inout uri varchar, inout split any, inout body any, inout params varchar, inout lines varchar, inout app_env any, inout is_final integer) returns any\n"
 "{\n"
@@ -18219,7 +18995,7 @@ static const char *proc361 =
 "}\n"
 "--src uriqa.sql:357\n";
 
-static const char *proc362 = 
+static const char *proc374 = 
 "#line 569 \"[executable]/uriqa.sql\"\n"
 "create function WS.WS.URIQA_HANDLER_NATIVE_HTTP (inout op varchar, inout uri varchar, inout split any, inout body any, inout params varchar, inout lines varchar, inout app_env any, inout is_final integer) returns any\n"
 "{\n"
@@ -18289,7 +19065,7 @@ static const char *proc362 =
 "}\n"
 "--src uriqa.sql:567\n";
 
-static const char *proc363 = 
+static const char *proc375 = 
 "#line 637 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.URIQA_STATUS (in err_ret any, in signal_errors integer)\n"
 "{\n"
@@ -18316,7 +19092,7 @@ static const char *proc363 =
 "}\n"
 "--src uriqa.sql:635\n";
 
-static const char *proc364 = 
+static const char *proc376 = 
 "#line 665 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.\"MPUT\" (inout path varchar, inout params varchar, inout lines varchar)\n"
 "{\n"
@@ -18334,7 +19110,7 @@ static const char *proc364 =
 "}\n"
 "--src uriqa.sql:663\n";
 
-static const char *proc365 = 
+static const char *proc377 = 
 "#line 681 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.\"MGET\" (inout path varchar, inout params any, inout lines any)\n"
 "{\n"
@@ -18354,7 +19130,7 @@ static const char *proc365 =
 "}\n"
 "--src uriqa.sql:679\n";
 
-static const char *proc366 = 
+static const char *proc378 = 
 "#line 699 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.\"MDELETE\" (inout path varchar, inout params any, inout lines any)\n"
 "{\n"
@@ -18372,7 +19148,7 @@ static const char *proc366 =
 "}\n"
 "--src uriqa.sql:697\n";
 
-static const char *proc367 = 
+static const char *proc379 = 
 "#line 715 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.\"/!URIQA/\" (inout path varchar, inout params any, inout lines any)\n"
 "{\n"
@@ -18417,7 +19193,7 @@ static const char *proc367 =
 "}\n"
 "--src uriqa.sql:713\n";
 
-static const char *proc368 = 
+static const char *proc380 = 
 "#line 758 \"[executable]/uriqa.sql\"\n"
 "create procedure WS.WS.URIQA_VHOST_RESET()\n"
 "{\n"
@@ -18433,7 +19209,7 @@ static const char *proc368 =
 
 /* DET_CatFilter.sql */
 
-static const char *proc369 = 
+static const char *proc381 = 
 "#line 32 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -18479,7 +19255,7 @@ static const char *proc369 =
 "}\n"
 "--src DET_CatFilter.sql:30\n";
 
-static const char *proc370 = 
+static const char *proc382 = 
 "#line 77 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_GET_CONDITION\" (in detcol_id integer, out cfc_id integer, out rfc_spath varchar, out rfc_list_cond any, out rfc_del_action any)\n"
 "{\n"
@@ -18497,7 +19273,7 @@ static const char *proc370 =
 "}\n"
 "--src DET_CatFilter.sql:75\n";
 
-static const char *proc371 = 
+static const char *proc383 = 
 "#line 94 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_ENCODE_CATVALUE\" (in val varchar) returns varchar\n"
 "{\n"
@@ -18535,7 +19311,7 @@ static const char *proc371 =
 "}\n"
 "--src DET_CatFilter.sql:92\n";
 
-static const char *proc372 = 
+static const char *proc384 = 
 "#line 131 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DECODE_CATVALUE\" (in catval varchar, out crop integer)\n"
 "{\n"
@@ -18572,7 +19348,7 @@ static const char *proc372 =
 "}\n"
 "--src DET_CatFilter.sql:129\n";
 
-static const char *proc373 = 
+static const char *proc385 = 
 "#line 167 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_PATH_PARTS_TO_FILTER\" (inout path_parts any, out schema_uri varchar, out filter_data any) returns integer\n"
 "{\n"
@@ -18627,7 +19403,7 @@ static const char *proc373 =
 "}\n"
 "--src DET_CatFilter.sql:165\n";
 
-static const char *proc374 = 
+static const char *proc386 = 
 "#line 221 \"[executable]/DET_CatFilter.sql\"\n"
 "create procedure \"CatFilter_ACC_FILTER_DATA\" (inout filter any, inout filter_data any)\n"
 "{\n"
@@ -18651,7 +19427,7 @@ static const char *proc374 =
 "}\n"
 "--src DET_CatFilter.sql:219\n";
 
-static const char *proc375 = 
+static const char *proc387 = 
 "#line 244 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_SEARCH_ID_IMPL\" (in detcol_id any, in path_parts any, in what char(1), inout cfc_id integer, inout rfc_spath varchar, inout rfc_list_cond any, inout rfc_del_action any, inout filter_data any) returns any\n"
 "{\n"
@@ -18744,7 +19520,7 @@ static const char *proc375 =
 "}\n"
 "--src DET_CatFilter.sql:242\n";
 
-static const char *proc376 = 
+static const char *proc388 = 
 "#line 336 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -18797,7 +19573,7 @@ static const char *proc376 =
 "}\n"
 "--src DET_CatFilter.sql:334\n";
 
-static const char *proc377 = 
+static const char *proc389 = 
 "#line 388 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -18820,7 +19596,7 @@ static const char *proc377 =
 "}\n"
 "--src DET_CatFilter.sql:386\n";
 
-static const char *proc378 = 
+static const char *proc390 = 
 "#line 410 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -18829,7 +19605,7 @@ static const char *proc378 =
 "}\n"
 "--src DET_CatFilter.sql:408\n";
 
-static const char *proc379 = 
+static const char *proc391 = 
 "#line 418 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -18838,7 +19614,7 @@ static const char *proc379 =
 "}\n"
 "--src DET_CatFilter.sql:416\n";
 
-static const char *proc380 = 
+static const char *proc392 = 
 "#line 426 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -18847,7 +19623,7 @@ static const char *proc380 =
 "}\n"
 "--src DET_CatFilter.sql:424\n";
 
-static const char *proc381 = 
+static const char *proc393 = 
 "#line 434 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -18899,7 +19675,7 @@ static const char *proc381 =
 "}\n"
 "--src DET_CatFilter.sql:432\n";
 
-static const char *proc382 = 
+static const char *proc394 = 
 "#line 485 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_FILTER_TO_CONDITION\" (inout schema_uri varchar, inout filter_data any, inout cond any) returns integer\n"
 "{\n"
@@ -18928,7 +19704,7 @@ static const char *proc382 =
 "}\n"
 "--src DET_CatFilter.sql:483\n";
 
-static const char *proc383 = 
+static const char *proc395 = 
 "#line 512 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -18980,7 +19756,7 @@ static const char *proc383 =
 "}\n"
 "--src DET_CatFilter.sql:510\n";
 
-static const char *proc384 = 
+static const char *proc396 = 
 "#line 562 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_PROP_REMOVE\" (in id any, in st char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -18994,7 +19770,7 @@ static const char *proc384 =
 "}\n"
 "--src DET_CatFilter.sql:560\n";
 
-static const char *proc385 = 
+static const char *proc397 = 
 "#line 575 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_PROP_SET\" (in id any, in st char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -19010,7 +19786,7 @@ static const char *proc385 =
 "}\n"
 "--src DET_CatFilter.sql:573\n";
 
-static const char *proc386 = 
+static const char *proc398 = 
 "#line 590 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
@@ -19030,7 +19806,7 @@ static const char *proc386 =
 "}\n"
 "--src DET_CatFilter.sql:588\n";
 
-static const char *proc387 = 
+static const char *proc399 = 
 "#line 609 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
@@ -19048,7 +19824,7 @@ static const char *proc387 =
 "}\n"
 "--src DET_CatFilter.sql:607\n";
 
-static const char *proc388 = 
+static const char *proc400 = 
 "#line 626 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
@@ -19145,7 +19921,7 @@ static const char *proc388 =
 "}\n"
 "--src DET_CatFilter.sql:624\n";
 
-static const char *proc389 = 
+static const char *proc401 = 
 "#line 722 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_LIST_SCHEMAS\" (in rfc_spath varchar, inout rfc_list_cond any, in auth_uid integer) returns any\n"
 "{\n"
@@ -19153,7 +19929,7 @@ static const char *proc389 =
 "}\n"
 "--src DET_CatFilter.sql:720\n";
 
-static const char *proc390 = 
+static const char *proc402 = 
 "#line 728 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_LIST_SCHEMA_PROPS\" (in rfc_spath varchar, inout rfc_list_cond any, inout schema_uri varchar, inout filter_data any, in auth_uid integer) returns any\n"
 "{\n"
@@ -19184,7 +19960,7 @@ static const char *proc390 =
 "}\n"
 "--src DET_CatFilter.sql:726\n";
 
-static const char *proc391 = 
+static const char *proc403 = 
 "#line 758 \"[executable]/DET_CatFilter.sql\"\n"
 "create procedure \"CatFilter_GET_RDF_INVERSE_HITS_DISTVALS\" (in cfc_id integer, inout filter_data any, inout distval_dict any, in auth_uid integer)\n"
 "{\n"
@@ -19400,7 +20176,7 @@ static const char *proc391 =
 "}\n"
 "--src DET_CatFilter.sql:756\n";
 
-static const char *proc392 = 
+static const char *proc404 = 
 "#line 973 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_GET_RDF_INVERSE_HITS_RES_IDS\" (in cfc_id integer, inout filter_data any, in auth_uid integer) returns any\n"
 "{\n"
@@ -19569,7 +20345,7 @@ static const char *proc392 =
 "}\n"
 "--src DET_CatFilter.sql:971\n";
 
-static const char *proc393 = 
+static const char *proc405 = 
 "#line 1141 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_LIST_PROP_DISTVALS_AUX\" (inout dict any, inout rfp varchar, inout vals any)\n"
 "{\n"
@@ -19583,7 +20359,7 @@ static const char *proc393 =
 "}\n"
 "--src DET_CatFilter.sql:1139\n";
 
-static const char *proc394 = 
+static const char *proc406 = 
 "#line 1153 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_LIST_PROP_DISTVALS\" (in detcol_id integer, in cfc_id integer, in rfc_spath varchar, inout rfc_list_cond any, inout schema_uri varchar, inout filter_data any, in auth_uid integer) returns any\n"
 "{\n"
@@ -19656,7 +20432,7 @@ static const char *proc394 =
 "}\n"
 "--src DET_CatFilter.sql:1151\n";
 
-static const char *proc395 = 
+static const char *proc407 = 
 "#line 1224 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -19902,7 +20678,7 @@ static const char *proc395 =
 "}\n"
 "--src DET_CatFilter.sql:1222\n";
 
-static const char *proc396 = 
+static const char *proc408 = 
 "#line 1469 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path varchar, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -19958,7 +20734,7 @@ static const char *proc396 =
 "}\n"
 "--src DET_CatFilter.sql:1467\n";
 
-static const char *proc397 = 
+static const char *proc409 = 
 "#line 1524 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
@@ -19973,7 +20749,7 @@ static const char *proc397 =
 "}\n"
 "--src DET_CatFilter.sql:1522\n";
 
-static const char *proc398 = 
+static const char *proc410 = 
 "#line 1538 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
@@ -20001,7 +20777,7 @@ static const char *proc398 =
 "}\n"
 "--src DET_CatFilter.sql:1536\n";
 
-static const char *proc399 = 
+static const char *proc411 = 
 "#line 1565 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -20058,7 +20834,7 @@ static const char *proc399 =
 "}\n"
 "--src DET_CatFilter.sql:1563\n";
 
-static const char *proc400 = 
+static const char *proc412 = 
 "#line 1621 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -20112,7 +20888,7 @@ static const char *proc400 =
 "}\n"
 "--src DET_CatFilter.sql:1619\n";
 
-static const char *proc401 = 
+static const char *proc413 = 
 "#line 1674 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
@@ -20128,7 +20904,7 @@ static const char *proc401 =
 "}\n"
 "--src DET_CatFilter.sql:1672\n";
 
-static const char *proc402 = 
+static const char *proc414 = 
 "#line 1689 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -20137,7 +20913,7 @@ static const char *proc402 =
 "}\n"
 "--src DET_CatFilter.sql:1687\n";
 
-static const char *proc403 = 
+static const char *proc415 = 
 "#line 1697 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_LOCK\" (in path any, inout id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -20153,7 +20929,7 @@ static const char *proc403 =
 "}\n"
 "--src DET_CatFilter.sql:1695\n";
 
-static const char *proc404 = 
+static const char *proc416 = 
 "#line 1712 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
@@ -20164,7 +20940,7 @@ static const char *proc404 =
 "}\n"
 "--src DET_CatFilter.sql:1710\n";
 
-static const char *proc405 = 
+static const char *proc417 = 
 "#line 1722 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
@@ -20189,7 +20965,7 @@ static const char *proc405 =
 "}\n"
 "--src DET_CatFilter.sql:1720\n";
 
-static const char *proc406 = 
+static const char *proc418 = 
 "#line 1746 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
@@ -20207,7 +20983,7 @@ static const char *proc406 =
 "}\n"
 "--src DET_CatFilter.sql:1744\n";
 
-static const char *proc407 = 
+static const char *proc419 = 
 "#line 1763 \"[executable]/DET_CatFilter.sql\"\n"
 "create function \"CatFilter_CONFIGURE\" (in col any, in search_path varchar, in filter any, in auth_uname varchar := \'dav\', in auth_upwd varchar := \'dav\', in auth_uid integer := null) returns integer\n"
 "{\n"
@@ -20281,7 +21057,7 @@ static const char *proc407 =
 "}\n"
 "--src DET_CatFilter.sql:1761\n";
 
-static const char *proc408 = 
+static const char *proc420 = 
 "#line 1836 \"[executable]/DET_CatFilter.sql\"\n"
 "create procedure \"CatFilter_FEED_DAV_RDF_INVERSE\" (inout propval any, inout propparent integer, in is_del integer := 0, in cfid integer := null)\n"
 "{\n"
@@ -20411,7 +21187,7 @@ static const char *trig37 =
 "}\n"
 "--src DET_CatFilter.sql:1940\n";
 
-static const char *proc409 = 
+static const char *proc421 = 
 "#line 1962 \"[executable]/DET_CatFilter.sql\"\n"
 "create procedure \"CatFilter_INIT_SYS_DAV_RDF_INVERSE\" (in run_if_once integer)\n"
 "{\n"
@@ -20442,7 +21218,7 @@ static const char *proc409 =
 
 /* DET_HostFs.sql */
 
-static const char *tbl1 = 
+static const char *tbl2 = 
 "create table WS.WS.HOSTFS_COL\n"
 "(\n"
 "COL_ID		integer not null primary key,\n"
@@ -20461,7 +21237,7 @@ static const char *tbl1 =
 static const char *alter0 = 
 "alter table WS.WS.HOSTFS_COL add COL_NAME varchar not null\n";
 
-static const char *tbl2 = 
+static const char *tbl3 = 
 "create table WS.WS.HOSTFS_RES\n"
 "(\n"
 "RES_ID 		integer not null primary key,\n"
@@ -20479,7 +21255,7 @@ static const char *tbl2 =
 "create index HOSTFS_RES_COL on WS.WS.HOSTFS_RES (RES_COL, RES_NAME)\n"
 "create index HOSTFS_RES_NEXT_SCAN_TIME on WS.WS.HOSTFS_RES (RES_NEXT_SCAN_TIME)\n";
 
-static const char *tbl3 = 
+static const char *tbl4 = 
 "create table WS.WS.HOSTFS_RES_CACHE\n"
 "(\n"
 "RESC_ID		integer not null primary key,\n"
@@ -20492,7 +21268,7 @@ static const char *tbl3 =
 static const char *alter1 = 
 "alter table WS.WS.HOSTFS_RES_CACHE add RESC_TOPCOL_ID integer not null\n";
 
-static const char *tbl4 = 
+static const char *tbl5 = 
 "create table WS.WS.HOSTFS_RES_META\n"
 "(\n"
 "RESM_ID		integer not null primary key,\n"
@@ -20504,7 +21280,7 @@ static const char *tbl4 =
 static const char *alter2 = 
 "alter table WS.WS.HOSTFS_RES_META add RESM_TOPCOL_ID integer not null\n";
 
-static const char *tbl5 = 
+static const char *tbl6 = 
 "create table WS.WS.HOSTFS_RDF_INVERSE\n"
 "(\n"
 "HRI_TOPCOL_ID integer not null,\n"
@@ -20514,7 +21290,7 @@ static const char *tbl5 =
 "primary key (HRI_TOPCOL_ID, HRI_PROP_CATID, HRI_CATVALUE, HRI_RES_ID)\n"
 ")\n";
 
-static const char *proc410 = 
+static const char *proc422 = 
 "#line 98 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure WS.WS.HOSTFS_FEED_RDF_INVERSE (inout propval any, in r_id integer, in is_del integer, in topcol_id integer)\n"
 "{\n"
@@ -20583,7 +21359,7 @@ static const char *other10 =
 "DB.DBA.vt_create_text_index (fix_identifier_case (\'WS.WS.HOSTFS_RES_META\'), fix_identifier_case (\'RESM_DATA\'), fix_identifier_case (\'RESM_ID\'), 2, 0, NULL, 0, \'*ini*\', \'*ini*\')\n";
 static const char *other11 = 
 "DB.DBA.vt_batch_update (fix_identifier_case (\'WS.WS.HOSTFS_RES_META\'), \'ON\', 1)\n";
-static const char *proc411 = 
+static const char *proc423 = 
 "#line 171 \"[executable]/DET_HostFs.sql\"\n"
 "create function WS.WS.HOSTFS_RES_TOPCOL_ID (in r_id integer) returns integer\n"
 "{\n"
@@ -20601,7 +21377,7 @@ static const char *proc411 =
 "}\n"
 "--src DET_HostFs.sql:169\n";
 
-static const char *proc412 = 
+static const char *proc424 = 
 "#line 187 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure WS.WS.HOSTFS_EXTRACT_AND_SAVE_RDF (in resid integer, in resname varchar, in restype varchar, inout rescontent any, in topcol_id integer)\n"
 "{\n"
@@ -20631,7 +21407,7 @@ static const char *proc412 =
 "}\n"
 "--src DET_HostFs.sql:185\n";
 
-static const char *proc413 = 
+static const char *proc425 = 
 "#line 215 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure WS.WS.HOSTFS_TEST_RDF (in d_id integer)\n"
 "{\n"
@@ -20667,7 +21443,7 @@ static const char *proc413 =
 "}\n"
 "--src DET_HostFs.sql:213\n";
 
-static const char *proc414 = 
+static const char *proc426 = 
 "#line 249 \"[executable]/DET_HostFs.sql\"\n"
 "create function\n"
 "WS.WS.HOSTFS_RES_CACHE_RESC_DATA_INDEX_HOOK (inout vtb any, inout d_id integer) returns integer\n"
@@ -20710,7 +21486,7 @@ static const char *proc414 =
 "}\n"
 "--src DET_HostFs.sql:247\n";
 
-static const char *proc415 = 
+static const char *proc427 = 
 "#line 290 \"[executable]/DET_HostFs.sql\"\n"
 "create function\n"
 "WS.WS.HOSTFS_RES_CACHE_RESC_DATA_UNINDEX_HOOK (inout vtb any, inout d_id integer) returns integer\n"
@@ -20739,7 +21515,7 @@ static const char *other12 =
 "DB.DBA.vt_create_text_index (fix_identifier_case (\'WS.WS.HOSTFS_RES_CACHE\'), fix_identifier_case (\'RESC_DATA\'), fix_identifier_case (\'RESC_ID\'), 2, 0, NULL, 1, \'*ini*\', \'*ini*\')\n";
 static const char *other13 = 
 "DB.DBA.vt_batch_update (fix_identifier_case (\'WS.WS.HOSTFS_RES_CACHE\'), \'ON\', 5)\n";
-static const char *proc416 = 
+static const char *proc428 = 
 "#line 325 \"[executable]/DET_HostFs.sql\"\n"
 "create function\n"
 "WS.WS.HOSTFS_FIND_COL (in full_path varchar) returns integer\n"
@@ -20779,7 +21555,7 @@ static const char *proc416 =
 "}\n"
 "--src DET_HostFs.sql:323\n";
 
-static const char *proc417 = 
+static const char *proc429 = 
 "#line 363 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure\n"
 "WS.WS.HOSTFS_COL_DISAPPEARS (in full_path varchar)\n"
@@ -20801,7 +21577,7 @@ static const char *proc417 =
 "}\n"
 "--src DET_HostFs.sql:361\n";
 
-static const char *proc418 = 
+static const char *proc430 = 
 "#line 383 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure\n"
 "WS.WS.HOSTFS_HANDLE_RES_SCAN (in full_path varchar, in c_id integer, in flen integer, in cr_time datetime, in mod_time datetime, in mimetype varchar, in ft_mode varchar)\n"
@@ -20851,7 +21627,7 @@ static const char *proc418 =
 "}\n"
 "--src DET_HostFs.sql:381\n";
 
-static const char *proc419 = 
+static const char *proc431 = 
 "#line 431 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure\n"
 "WS.WS.HOSTFS_RES_DISAPPEARS (in full_path varchar)\n"
@@ -20874,7 +21650,7 @@ static const char *proc419 =
 "}\n"
 "--src DET_HostFs.sql:429\n";
 
-static const char *proc420 = 
+static const char *proc432 = 
 "#line 452 \"[executable]/DET_HostFs.sql\"\n"
 "create function\n"
 "WS.WS.HOSTFS_TOUCH_RES (in ospath varchar) returns integer\n"
@@ -20895,7 +21671,7 @@ static const char *proc420 =
 "}\n"
 "--src DET_HostFs.sql:450\n";
 
-static const char *proc421 = 
+static const char *proc433 = 
 "#line 471 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure\n"
 "WS.WS.HOSTFS_GLOBAL_RESET ()\n"
@@ -20910,7 +21686,7 @@ static const char *proc421 =
 "}\n"
 "--src DET_HostFs.sql:469\n";
 
-static const char *proc422 = 
+static const char *proc434 = 
 "#line 484 \"[executable]/DET_HostFs.sql\"\n"
 "create function\n"
 "WS.WS.HOSTFS_PATH_STAT (in full_path varchar, out flen integer, out cr_time datetime, out mod_time datetime) returns integer\n"
@@ -20925,7 +21701,7 @@ static const char *proc422 =
 "}\n"
 "--src DET_HostFs.sql:482\n";
 
-static const char *proc423 = 
+static const char *proc435 = 
 "#line 497 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure\n"
 "WS.WS.HOSTFS_READ_TYPEINFO (in full_path varchar, out mimetype varchar, out ft_mode varchar)\n"
@@ -20948,7 +21724,7 @@ static const char *proc423 =
 "}\n"
 "--src DET_HostFs.sql:495\n";
 
-static const char *proc424 = 
+static const char *proc436 = 
 "#line 519 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -20971,7 +21747,7 @@ static const char *proc424 =
 "}\n"
 "--src DET_HostFs.sql:517\n";
 
-static const char *proc425 = 
+static const char *proc437 = 
 "#line 540 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -21018,7 +21794,7 @@ static const char *proc425 =
 "}\n"
 "--src DET_HostFs.sql:538\n";
 
-static const char *proc426 = 
+static const char *proc438 = 
 "#line 585 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -21027,7 +21803,7 @@ static const char *proc426 =
 "}\n"
 "--src DET_HostFs.sql:583\n";
 
-static const char *proc427 = 
+static const char *proc439 = 
 "#line 592 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21041,7 +21817,7 @@ static const char *proc427 =
 "}\n"
 "--src DET_HostFs.sql:590\n";
 
-static const char *proc428 = 
+static const char *proc440 = 
 "#line 604 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21050,7 +21826,7 @@ static const char *proc428 =
 "}\n"
 "--src DET_HostFs.sql:602\n";
 
-static const char *proc429 = 
+static const char *proc441 = 
 "#line 611 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21059,7 +21835,7 @@ static const char *proc429 =
 "}\n"
 "--src DET_HostFs.sql:609\n";
 
-static const char *proc430 = 
+static const char *proc442 = 
 "#line 618 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -21072,10 +21848,10 @@ static const char *proc430 =
 "}\n"
 "--src DET_HostFs.sql:616\n";
 
-static const char *tbl6 = 
+static const char *tbl7 = 
 "create table \"HostFs_DAV_RES_UPLOAD\" (ID varchar primary key, DT datetime, CNT long varchar)\n";
 
-static const char *proc431 = 
+static const char *proc443 = 
 "#line 632 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21100,7 +21876,7 @@ static const char *proc431 =
 "}\n"
 "--src DET_HostFs.sql:630\n";
 
-static const char *proc432 = 
+static const char *proc444 = 
 "#line 655 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_PROP_REMOVE\" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -21109,7 +21885,7 @@ static const char *proc432 =
 "}\n"
 "--src DET_HostFs.sql:653\n";
 
-static const char *proc433 = 
+static const char *proc445 = 
 "#line 662 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_PROP_SET\" (in id any, in what char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21122,7 +21898,7 @@ static const char *proc433 =
 "}\n"
 "--src DET_HostFs.sql:660\n";
 
-static const char *proc434 = 
+static const char *proc446 = 
 "#line 673 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
@@ -21139,7 +21915,7 @@ static const char *proc434 =
 "}\n"
 "--src DET_HostFs.sql:671\n";
 
-static const char *proc435 = 
+static const char *proc447 = 
 "#line 688 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
@@ -21156,7 +21932,7 @@ static const char *proc435 =
 "}\n"
 "--src DET_HostFs.sql:686\n";
 
-static const char *proc436 = 
+static const char *proc448 = 
 "#line 703 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_ID_TO_OSPATH\" (in col any)\n"
 "{\n"
@@ -21168,7 +21944,7 @@ static const char *proc436 =
 "}\n"
 "--src DET_HostFs.sql:701\n";
 
-static const char *proc437 = 
+static const char *proc449 = 
 "#line 713 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
@@ -21208,7 +21984,7 @@ static const char *proc437 =
 "}\n"
 "--src DET_HostFs.sql:711\n";
 
-static const char *proc438 = 
+static const char *proc450 = 
 "#line 751 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21326,7 +22102,7 @@ static const char *proc438 =
 "}\n"
 "--src DET_HostFs.sql:749\n";
 
-static const char *proc439 = 
+static const char *proc451 = 
 "#line 868 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path varchar, in compilation varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21335,7 +22111,7 @@ static const char *proc439 =
 "}\n"
 "--src DET_HostFs.sql:866\n";
 
-static const char *proc440 = 
+static const char *proc452 = 
 "#line 876 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
@@ -21373,7 +22149,7 @@ static const char *proc440 =
 "}\n"
 "--src DET_HostFs.sql:874\n";
 
-static const char *proc441 = 
+static const char *proc453 = 
 "#line 912 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
@@ -21395,7 +22171,7 @@ static const char *proc441 =
 "}\n"
 "--src DET_HostFs.sql:910\n";
 
-static const char *proc442 = 
+static const char *proc454 = 
 "#line 932 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21423,7 +22199,7 @@ static const char *proc442 =
 "}\n"
 "--src DET_HostFs.sql:930\n";
 
-static const char *proc443 = 
+static const char *proc455 = 
 "#line 958 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21454,7 +22230,7 @@ static const char *proc443 =
 "}\n"
 "--src DET_HostFs.sql:956\n";
 
-static const char *proc444 = 
+static const char *proc456 = 
 "#line 987 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
@@ -21477,7 +22253,7 @@ static const char *proc444 =
 "}\n"
 "--src DET_HostFs.sql:985\n";
 
-static const char *proc445 = 
+static const char *proc457 = 
 "#line 1008 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21486,7 +22262,7 @@ static const char *proc445 =
 "}\n"
 "--src DET_HostFs.sql:1006\n";
 
-static const char *proc446 = 
+static const char *proc458 = 
 "#line 1015 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_LOCK\" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21495,7 +22271,7 @@ static const char *proc446 =
 "}\n"
 "--src DET_HostFs.sql:1013\n";
 
-static const char *proc447 = 
+static const char *proc459 = 
 "#line 1022 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
@@ -21504,7 +22280,7 @@ static const char *proc447 =
 "}\n"
 "--src DET_HostFs.sql:1020\n";
 
-static const char *proc448 = 
+static const char *proc460 = 
 "#line 1029 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
@@ -21525,7 +22301,7 @@ static const char *proc448 =
 "}\n"
 "--src DET_HostFs.sql:1027\n";
 
-static const char *proc449 = 
+static const char *proc461 = 
 "#line 1048 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
@@ -21534,7 +22310,7 @@ static const char *proc449 =
 "}\n"
 "--src DET_HostFs.sql:1046\n";
 
-static const char *proc450 = 
+static const char *proc462 = 
 "#line 1055 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure \"HostFs_CF_LIST_PROP_DISTVALS\" (in detcol_id integer, in cfc_id integer, in rfc_spath varchar, inout rfc_list_cond any, in schema_uri varchar, inout filter_data any, inout distval_dict any, in auth_uid integer)\n"
 "{\n"
@@ -21764,7 +22540,7 @@ static const char *proc450 =
 "}\n"
 "--src DET_HostFs.sql:1053\n";
 
-static const char *proc451 = 
+static const char *proc463 = 
 "#line 1284 \"[executable]/DET_HostFs.sql\"\n"
 "create function \"HostFs_CF_GET_RDF_HITS\" (in detcol_id integer, in cfc_id integer, in rfc_spath varchar, inout rfc_list_cond any, in schema_uri varchar, inout filter_data any, in detcol_path varchar, in make_diritems integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -21983,7 +22759,7 @@ static const char *proc451 =
 "}\n"
 "--src DET_HostFs.sql:1282\n";
 
-static const char *proc452 = 
+static const char *proc464 = 
 "#line 1502 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure \"HostFs_RF_ID2SUFFIX\" (in id any, in what char(1))\n"
 "{\n"
@@ -22019,7 +22795,7 @@ static const char *proc452 =
 "}\n"
 "--src DET_HostFs.sql:1500\n";
 
-static const char *proc453 = 
+static const char *proc465 = 
 "#line 1536 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure \"HostFile_RF_SUFFIX2ID\" (in suffix varchar, in what char(1))\n"
 "{\n"
@@ -22045,7 +22821,7 @@ static const char *proc453 =
 "}\n"
 "--src DET_HostFs.sql:1534\n";
 
-static const char *proc454 = 
+static const char *proc466 = 
 "#line 1560 \"[executable]/DET_HostFs.sql\"\n"
 "create procedure \"HostDir_RF_SUFFIX2ID\" (in suffix varchar, in what char(1))\n"
 "{\n"
@@ -22072,7 +22848,7 @@ static const char *proc454 =
 
 /* DET_ResFilter.sql */
 
-static const char *proc455 = 
+static const char *proc467 = 
 "#line 26 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -22098,7 +22874,7 @@ static const char *proc455 =
 "}\n"
 "--src DET_ResFilter.sql:24\n";
 
-static const char *proc456 = 
+static const char *proc468 = 
 "#line 51 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_NORM\" (in value any) returns varchar\n"
 "{\n"
@@ -22112,7 +22888,7 @@ static const char *proc456 =
 "}\n"
 "--src DET_ResFilter.sql:49\n";
 
-static const char *proc457 = 
+static const char *proc469 = 
 "#line 64 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_ENCODE_FILTER\" (in filt any) returns varchar\n"
 "{\n"
@@ -22124,7 +22900,7 @@ static const char *proc457 =
 "}\n"
 "--src DET_ResFilter.sql:62\n";
 
-static const char *proc458 = 
+static const char *proc470 = 
 "#line 75 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DECODE_FILTER\" (in value any) returns any\n"
 "{\n"
@@ -22136,7 +22912,7 @@ static const char *proc458 =
 "}\n"
 "--src DET_ResFilter.sql:73\n";
 
-static const char *proc459 = 
+static const char *proc471 = 
 "#line 86 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_GET_CONDITION\" (in detcol_id integer, out rfc_spath varchar, out rfc_list_cond any, out rfc_del_action any)\n"
 "{\n"
@@ -22153,7 +22929,7 @@ static const char *proc459 =
 "}\n"
 "--src DET_ResFilter.sql:84\n";
 
-static const char *proc460 = 
+static const char *proc472 = 
 "#line 102 \"[executable]/DET_ResFilter.sql\"\n"
 "create procedure \"ResFilter_FIT_INTO_CONDITION\" (in id any, in what char (1), inout rfc_list_cond any, in auth_uid integer)\n"
 "{\n"
@@ -22308,7 +23084,7 @@ static const char *proc460 =
 "}\n"
 "--src DET_ResFilter.sql:100\n";
 
-static const char *proc461 = 
+static const char *proc473 = 
 "#line 256 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_MAKE_DEL_ACTION_FROM_CONDITION\" (inout rfc_list_cond any) returns any\n"
 "{\n"
@@ -22344,7 +23120,7 @@ static const char *proc461 =
 "}\n"
 "--src DET_ResFilter.sql:254\n";
 
-static const char *proc462 = 
+static const char *proc474 = 
 "#line 291 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_LEAVE_CONDITION\" (in id integer, in what char (1), in rfc_del_action any, in auth_uid integer) returns integer\n"
 "{\n"
@@ -22353,7 +23129,7 @@ static const char *proc462 =
 "}\n"
 "--src DET_ResFilter.sql:289\n";
 
-static const char *proc463 = 
+static const char *proc475 = 
 "#line 299 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_FNMERGE\" (in path any, in id any) returns varchar\n"
 "{\n"
@@ -22374,7 +23150,7 @@ static const char *proc463 =
 "}\n"
 "--src DET_ResFilter.sql:297\n";
 
-static const char *proc464 = 
+static const char *proc476 = 
 "#line 319 \"[executable]/DET_ResFilter.sql\"\n"
 "create procedure \"ResFilter_FNSPLIT\" (in path any, out colpath varchar, out orig_fnameext varchar, out id any)\n"
 "{\n"
@@ -22412,7 +23188,7 @@ static const char *proc464 =
 "}\n"
 "--src DET_ResFilter.sql:317\n";
 
-static const char *proc465 = 
+static const char *proc477 = 
 "#line 356 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_SEARCH_ID_IMPL\" (in detcol_id any, in path_parts any, in what char(1), inout rfc_spath varchar, inout rfc_list_cond any, inout rfc_del_action any) returns any\n"
 "{\n"
@@ -22459,7 +23235,7 @@ static const char *proc465 =
 "}\n"
 "--src DET_ResFilter.sql:354\n";
 
-static const char *proc466 = 
+static const char *proc478 = 
 "#line 402 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -22513,7 +23289,7 @@ static const char *proc466 =
 "}\n"
 "--src DET_ResFilter.sql:400\n";
 
-static const char *proc467 = 
+static const char *proc479 = 
 "#line 455 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -22524,7 +23300,7 @@ static const char *proc467 =
 "}\n"
 "--src DET_ResFilter.sql:453\n";
 
-static const char *proc468 = 
+static const char *proc480 = 
 "#line 465 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22533,7 +23309,7 @@ static const char *proc468 =
 "}\n"
 "--src DET_ResFilter.sql:463\n";
 
-static const char *proc469 = 
+static const char *proc481 = 
 "#line 473 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22542,7 +23318,7 @@ static const char *proc469 =
 "}\n"
 "--src DET_ResFilter.sql:471\n";
 
-static const char *proc470 = 
+static const char *proc482 = 
 "#line 481 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22551,7 +23327,7 @@ static const char *proc470 =
 "}\n"
 "--src DET_ResFilter.sql:479\n";
 
-static const char *proc471 = 
+static const char *proc483 = 
 "#line 489 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -22569,7 +23345,7 @@ static const char *proc471 =
 "}\n"
 "--src DET_ResFilter.sql:487\n";
 
-static const char *proc472 = 
+static const char *proc484 = 
 "#line 505 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22578,7 +23354,7 @@ static const char *proc472 =
 "}\n"
 "--src DET_ResFilter.sql:503\n";
 
-static const char *proc473 = 
+static const char *proc485 = 
 "#line 513 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_PROP_REMOVE\" (in id any, in st char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -22592,7 +23368,7 @@ static const char *proc473 =
 "}\n"
 "--src DET_ResFilter.sql:511\n";
 
-static const char *proc474 = 
+static const char *proc486 = 
 "#line 526 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_PROP_SET\" (in id any, in st char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22608,7 +23384,7 @@ static const char *proc474 =
 "}\n"
 "--src DET_ResFilter.sql:524\n";
 
-static const char *proc475 = 
+static const char *proc487 = 
 "#line 541 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
@@ -22628,7 +23404,7 @@ static const char *proc475 =
 "}\n"
 "--src DET_ResFilter.sql:539\n";
 
-static const char *proc476 = 
+static const char *proc488 = 
 "#line 560 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
@@ -22644,7 +23420,7 @@ static const char *proc476 =
 "}\n"
 "--src DET_ResFilter.sql:558\n";
 
-static const char *proc477 = 
+static const char *proc489 = 
 "#line 575 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
@@ -22696,7 +23472,7 @@ static const char *proc477 =
 "}\n"
 "--src DET_ResFilter.sql:573\n";
 
-static const char *proc478 = 
+static const char *proc490 = 
 "#line 626 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22756,7 +23532,7 @@ static const char *proc478 =
 "}\n"
 "--src DET_ResFilter.sql:624\n";
 
-static const char *proc479 = 
+static const char *proc491 = 
 "#line 685 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path varchar, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22816,7 +23592,7 @@ static const char *proc479 =
 "}\n"
 "--src DET_ResFilter.sql:683\n";
 
-static const char *proc480 = 
+static const char *proc492 = 
 "#line 744 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
@@ -22832,7 +23608,7 @@ static const char *proc480 =
 "}\n"
 "--src DET_ResFilter.sql:742\n";
 
-static const char *proc481 = 
+static const char *proc493 = 
 "#line 759 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
@@ -22841,7 +23617,7 @@ static const char *proc481 =
 "}\n"
 "--src DET_ResFilter.sql:757\n";
 
-static const char *proc482 = 
+static const char *proc494 = 
 "#line 767 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22887,7 +23663,7 @@ static const char *proc482 =
 "}\n"
 "--src DET_ResFilter.sql:765\n";
 
-static const char *proc483 = 
+static const char *proc495 = 
 "#line 812 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22930,7 +23706,7 @@ static const char *proc483 =
 "}\n"
 "--src DET_ResFilter.sql:810\n";
 
-static const char *proc484 = 
+static const char *proc496 = 
 "#line 854 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
@@ -22946,7 +23722,7 @@ static const char *proc484 =
 "}\n"
 "--src DET_ResFilter.sql:852\n";
 
-static const char *proc485 = 
+static const char *proc497 = 
 "#line 869 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22955,7 +23731,7 @@ static const char *proc485 =
 "}\n"
 "--src DET_ResFilter.sql:867\n";
 
-static const char *proc486 = 
+static const char *proc498 = 
 "#line 877 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_LOCK\" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -22971,7 +23747,7 @@ static const char *proc486 =
 "}\n"
 "--src DET_ResFilter.sql:875\n";
 
-static const char *proc487 = 
+static const char *proc499 = 
 "#line 892 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
@@ -22982,7 +23758,7 @@ static const char *proc487 =
 "}\n"
 "--src DET_ResFilter.sql:890\n";
 
-static const char *proc488 = 
+static const char *proc500 = 
 "#line 902 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
@@ -23007,7 +23783,7 @@ static const char *proc488 =
 "}\n"
 "--src DET_ResFilter.sql:900\n";
 
-static const char *proc489 = 
+static const char *proc501 = 
 "#line 926 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
@@ -23025,7 +23801,7 @@ static const char *proc489 =
 "}\n"
 "--src DET_ResFilter.sql:924\n";
 
-static const char *proc490 = 
+static const char *proc502 = 
 "#line 943 \"[executable]/DET_ResFilter.sql\"\n"
 "create function \"ResFilter_CONFIGURE\" (in col any, in search_path varchar, in filter any) returns integer\n"
 "{\n"
@@ -23066,7 +23842,7 @@ static const char *proc490 =
 
 /* DET_PropFilter.sql */
 
-static const char *proc491 = 
+static const char *proc503 = 
 "#line 26 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -23077,7 +23853,7 @@ static const char *proc491 =
 "}\n"
 "--src DET_PropFilter.sql:24\n";
 
-static const char *proc492 = 
+static const char *proc504 = 
 "#line 36 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_NORM\" (in value any) returns varchar\n"
 "{\n"
@@ -23091,7 +23867,7 @@ static const char *proc492 =
 "}\n"
 "--src DET_PropFilter.sql:34\n";
 
-static const char *proc493 = 
+static const char *proc505 = 
 "#line 49 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_GET_CONDITION\" (in detcol_id integer, out pfc_spath varchar, out pfc_name varchar, out pfc_value varchar)\n"
 "{\n"
@@ -23108,7 +23884,7 @@ static const char *proc493 =
 "}\n"
 "--src DET_PropFilter.sql:47\n";
 
-static const char *proc494 = 
+static const char *proc506 = 
 "#line 65 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_FIT_INTO_CONDITION\" (in id integer, in what char (1), in pfc_name varchar, in pfc_value varchar)\n"
 "{\n"
@@ -23132,7 +23908,7 @@ static const char *proc494 =
 "}\n"
 "--src DET_PropFilter.sql:63\n";
 
-static const char *proc495 = 
+static const char *proc507 = 
 "#line 88 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_LEAVE_CONDITION\" (in id integer, in what char (1), in pfc_name varchar, in pfc_value varchar) returns integer\n"
 "{\n"
@@ -23141,7 +23917,7 @@ static const char *proc495 =
 "}\n"
 "--src DET_PropFilter.sql:86\n";
 
-static const char *proc496 = 
+static const char *proc508 = 
 "#line 96 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_FNMERGE\" (in path any, in id integer) returns varchar\n"
 "{\n"
@@ -23153,7 +23929,7 @@ static const char *proc496 =
 "}\n"
 "--src DET_PropFilter.sql:94\n";
 
-static const char *proc497 = 
+static const char *proc509 = 
 "#line 107 \"[executable]/DET_PropFilter.sql\"\n"
 "create procedure \"PropFilter_FNSPLIT\" (in path any, out colpath varchar, out orig_fnameext varchar, out id integer)\n"
 "{\n"
@@ -23180,7 +23956,7 @@ static const char *proc497 =
 "}\n"
 "--src DET_PropFilter.sql:105\n";
 
-static const char *proc498 = 
+static const char *proc510 = 
 "#line 133 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_SEARCH_ID_IMPL\" (in detcol_id any, in path_parts any, in what char(1), inout pfc_spath varchar, inout pfc_name varchar, inout pfc_value varchar) returns any\n"
 "{\n"
@@ -23235,7 +24011,7 @@ static const char *proc498 =
 "}\n"
 "--src DET_PropFilter.sql:131\n";
 
-static const char *proc499 = 
+static const char *proc511 = 
 "#line 187 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -23289,7 +24065,7 @@ static const char *proc499 =
 "}\n"
 "--src DET_PropFilter.sql:185\n";
 
-static const char *proc500 = 
+static const char *proc512 = 
 "#line 240 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -23300,7 +24076,7 @@ static const char *proc500 =
 "}\n"
 "--src DET_PropFilter.sql:238\n";
 
-static const char *proc501 = 
+static const char *proc513 = 
 "#line 250 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23309,7 +24085,7 @@ static const char *proc501 =
 "}\n"
 "--src DET_PropFilter.sql:248\n";
 
-static const char *proc502 = 
+static const char *proc514 = 
 "#line 258 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23318,7 +24094,7 @@ static const char *proc502 =
 "}\n"
 "--src DET_PropFilter.sql:256\n";
 
-static const char *proc503 = 
+static const char *proc515 = 
 "#line 266 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23327,7 +24103,7 @@ static const char *proc503 =
 "}\n"
 "--src DET_PropFilter.sql:264\n";
 
-static const char *proc504 = 
+static const char *proc516 = 
 "#line 274 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -23342,7 +24118,7 @@ static const char *proc504 =
 "}\n"
 "--src DET_PropFilter.sql:272\n";
 
-static const char *proc505 = 
+static const char *proc517 = 
 "#line 288 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23351,7 +24127,7 @@ static const char *proc505 =
 "}\n"
 "--src DET_PropFilter.sql:286\n";
 
-static const char *proc506 = 
+static const char *proc518 = 
 "#line 296 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_PROP_REMOVE\" (in id any, in st char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -23365,7 +24141,7 @@ static const char *proc506 =
 "}\n"
 "--src DET_PropFilter.sql:294\n";
 
-static const char *proc507 = 
+static const char *proc519 = 
 "#line 309 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_PROP_SET\" (in id any, in st char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23381,7 +24157,7 @@ static const char *proc507 =
 "}\n"
 "--src DET_PropFilter.sql:307\n";
 
-static const char *proc508 = 
+static const char *proc520 = 
 "#line 324 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
@@ -23401,7 +24177,7 @@ static const char *proc508 =
 "}\n"
 "--src DET_PropFilter.sql:322\n";
 
-static const char *proc509 = 
+static const char *proc521 = 
 "#line 343 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
@@ -23416,7 +24192,7 @@ static const char *proc509 =
 "}\n"
 "--src DET_PropFilter.sql:341\n";
 
-static const char *proc510 = 
+static const char *proc522 = 
 "#line 357 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
@@ -23464,7 +24240,7 @@ static const char *proc510 =
 "}\n"
 "--src DET_PropFilter.sql:355\n";
 
-static const char *proc511 = 
+static const char *proc523 = 
 "#line 404 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23535,7 +24311,7 @@ static const char *proc511 =
 "}\n"
 "--src DET_PropFilter.sql:402\n";
 
-static const char *proc512 = 
+static const char *proc524 = 
 "#line 474 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path varchar, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23618,7 +24394,7 @@ static const char *proc512 =
 "}\n"
 "--src DET_PropFilter.sql:472\n";
 
-static const char *proc513 = 
+static const char *proc525 = 
 "#line 556 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
@@ -23633,7 +24409,7 @@ static const char *proc513 =
 "}\n"
 "--src DET_PropFilter.sql:554\n";
 
-static const char *proc514 = 
+static const char *proc526 = 
 "#line 570 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
@@ -23642,7 +24418,7 @@ static const char *proc514 =
 "}\n"
 "--src DET_PropFilter.sql:568\n";
 
-static const char *proc515 = 
+static const char *proc527 = 
 "#line 578 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23685,7 +24461,7 @@ static const char *proc515 =
 "}\n"
 "--src DET_PropFilter.sql:576\n";
 
-static const char *proc516 = 
+static const char *proc528 = 
 "#line 620 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23725,7 +24501,7 @@ static const char *proc516 =
 "}\n"
 "--src DET_PropFilter.sql:618\n";
 
-static const char *proc517 = 
+static const char *proc529 = 
 "#line 659 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
@@ -23741,7 +24517,7 @@ static const char *proc517 =
 "}\n"
 "--src DET_PropFilter.sql:657\n";
 
-static const char *proc518 = 
+static const char *proc530 = 
 "#line 674 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23750,7 +24526,7 @@ static const char *proc518 =
 "}\n"
 "--src DET_PropFilter.sql:672\n";
 
-static const char *proc519 = 
+static const char *proc531 = 
 "#line 682 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_LOCK\" (in path any, inout id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23766,7 +24542,7 @@ static const char *proc519 =
 "}\n"
 "--src DET_PropFilter.sql:680\n";
 
-static const char *proc520 = 
+static const char *proc532 = 
 "#line 697 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
@@ -23777,7 +24553,7 @@ static const char *proc520 =
 "}\n"
 "--src DET_PropFilter.sql:695\n";
 
-static const char *proc521 = 
+static const char *proc533 = 
 "#line 707 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
@@ -23802,7 +24578,7 @@ static const char *proc521 =
 "}\n"
 "--src DET_PropFilter.sql:705\n";
 
-static const char *proc522 = 
+static const char *proc534 = 
 "#line 731 \"[executable]/DET_PropFilter.sql\"\n"
 "create function \"PropFilter_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
@@ -23822,7 +24598,7 @@ static const char *proc522 =
 
 /* DET_RDFData.sql */
 
-static const char *proc523 = 
+static const char *proc535 = 
 "#line 26 \"[executable]/DET_RDFData.sql\"\n"
 "create procedure DB.DBA.RDFData_log_message (in x varchar)\n"
 "{\n"
@@ -23831,7 +24607,7 @@ static const char *proc523 =
 "}\n"
 "--src DET_RDFData.sql:24\n";
 
-static const char *proc524 = 
+static const char *proc536 = 
 "#line 33 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -23856,7 +24632,7 @@ static const char *proc524 =
 "}\n"
 "--src DET_RDFData.sql:31\n";
 
-static const char *proc525 = 
+static const char *proc537 = 
 "#line 56 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -23905,7 +24681,7 @@ static const char *proc525 =
 "}\n"
 "--src DET_RDFData.sql:54\n";
 
-static const char *proc526 = 
+static const char *proc538 = 
 "#line 104 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -23914,7 +24690,7 @@ static const char *proc526 =
 "}\n"
 "--src DET_RDFData.sql:102\n";
 
-static const char *proc527 = 
+static const char *proc539 = 
 "#line 111 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23923,7 +24699,7 @@ static const char *proc527 =
 "}\n"
 "--src DET_RDFData.sql:109\n";
 
-static const char *proc528 = 
+static const char *proc540 = 
 "#line 118 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23932,7 +24708,7 @@ static const char *proc528 =
 "}\n"
 "--src DET_RDFData.sql:116\n";
 
-static const char *proc529 = 
+static const char *proc541 = 
 "#line 125 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23941,7 +24717,7 @@ static const char *proc529 =
 "}\n"
 "--src DET_RDFData.sql:123\n";
 
-static const char *proc530 = 
+static const char *proc542 = 
 "#line 133 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -23950,7 +24726,7 @@ static const char *proc530 =
 "}\n"
 "--src DET_RDFData.sql:131\n";
 
-static const char *proc531 = 
+static const char *proc543 = 
 "#line 140 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23959,7 +24735,7 @@ static const char *proc531 =
 "}\n"
 "--src DET_RDFData.sql:138\n";
 
-static const char *proc532 = 
+static const char *proc544 = 
 "#line 148 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_PROP_REMOVE\" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -23968,7 +24744,7 @@ static const char *proc532 =
 "}\n"
 "--src DET_RDFData.sql:146\n";
 
-static const char *proc533 = 
+static const char *proc545 = 
 "#line 155 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_PROP_SET\" (in id any, in what char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -23981,7 +24757,7 @@ static const char *proc533 =
 "}\n"
 "--src DET_RDFData.sql:153\n";
 
-static const char *proc534 = 
+static const char *proc546 = 
 "#line 166 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
@@ -23990,7 +24766,7 @@ static const char *proc534 =
 "}\n"
 "--src DET_RDFData.sql:164\n";
 
-static const char *proc535 = 
+static const char *proc547 = 
 "#line 174 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
@@ -23999,7 +24775,7 @@ static const char *proc535 =
 "}\n"
 "--src DET_RDFData.sql:172\n";
 
-static const char *proc536 = 
+static const char *proc548 = 
 "#line 181 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_ACCESS_PARAMS\" (in detcol_id any, out access varchar, out gid integer, out uid integer)\n"
 "{\n"
@@ -24019,7 +24795,7 @@ static const char *proc536 =
 "}\n"
 "--src DET_RDFData.sql:179\n";
 
-static const char *proc537 = 
+static const char *proc549 = 
 "#line 199 \"[executable]/DET_RDFData.sql\"\n"
 "create procedure DB.DBA.RDFData_cast_dt_silent (in d any)\n"
 "{\n"
@@ -24036,7 +24812,7 @@ static const char *proc537 =
 "}\n"
 "--src DET_RDFData.sql:197\n";
 
-static const char *proc538 = 
+static const char *proc550 = 
 "#line 214 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
@@ -24067,7 +24843,7 @@ static const char *proc538 =
 "}\n"
 "--src DET_RDFData.sql:212\n";
 
-static const char *proc539 = 
+static const char *proc551 = 
 "#line 244 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -24289,7 +25065,7 @@ static const char *proc539 =
 "}\n"
 "--src DET_RDFData.sql:242\n";
 
-static const char *proc540 = 
+static const char *proc552 = 
 "#line 465 \"[executable]/DET_RDFData.sql\"\n"
 "create function RDFData_std_pref (in iri varchar, in rev int := 0)\n"
 "{\n"
@@ -24333,7 +25109,7 @@ static const char *proc540 =
 "}\n"
 "--src DET_RDFData.sql:463\n";
 
-static const char *proc541 = 
+static const char *proc553 = 
 "#line 507 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path varchar, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -24343,7 +25119,7 @@ static const char *proc541 =
 "}\n"
 "--src DET_RDFData.sql:505\n";
 
-static const char *proc542 = 
+static const char *proc554 = 
 "#line 515 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
@@ -24396,7 +25172,7 @@ static const char *proc542 =
 "}\n"
 "--src DET_RDFData.sql:513\n";
 
-static const char *proc543 = 
+static const char *proc555 = 
 "#line 566 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
@@ -24411,7 +25187,7 @@ static const char *proc543 =
 "}\n"
 "--src DET_RDFData.sql:564\n";
 
-static const char *proc544 = 
+static const char *proc556 = 
 "#line 579 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -24420,7 +25196,7 @@ static const char *proc544 =
 "}\n"
 "--src DET_RDFData.sql:577\n";
 
-static const char *proc545 = 
+static const char *proc557 = 
 "#line 586 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -24429,7 +25205,7 @@ static const char *proc545 =
 "}\n"
 "--src DET_RDFData.sql:584\n";
 
-static const char *proc546 = 
+static const char *proc558 = 
 "#line 593 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
@@ -24482,6 +25258,11 @@ static const char *proc546 =
 "ses := sioc..compose_foaf (uname, type, pg);\n"
 "goto ret_place2;\n"
 "}\n"
+"else if (__proc_exists (\'sioc.DBA.ods_obj_describe\') is not null)\n"
+"{\n"
+"ses := sioc..ods_obj_describe (iri, type, pg);\n"
+"goto ret_place2;\n"
+"}\n"
 "else if (regexp_match (\'https?://([^/]*)/dataspace/([^/]*)(#this|/sioc.rdf|/sioc.n3)?\\x24\', iri) is not null\n"
 "and __proc_exists (\'sioc.DBA.ods_sioc_obj_describe\') is not null)\n"
 "{\n"
@@ -24528,70 +25309,70 @@ static const char *proc546 =
 "}\n"
 "--src DET_RDFData.sql:591\n";
 
-static const char *proc547 = 
-"#line 690 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc559 = 
+"#line 695 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "RDFData_log_message (current_proc_name ());\n"
 "return -20;\n"
 "}\n"
-"--src DET_RDFData.sql:688\n";
+"--src DET_RDFData.sql:693\n";
 
-static const char *proc548 = 
-"#line 697 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc560 = 
+"#line 702 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_DEREFERENCE_LIST\" (in detcol_id any, inout report_array any) returns any\n"
 "{\n"
 "RDFData_log_message (current_proc_name ());\n"
 "return -20;\n"
 "}\n"
-"--src DET_RDFData.sql:695\n";
+"--src DET_RDFData.sql:700\n";
 
-static const char *proc549 = 
-"#line 704 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc561 = 
+"#line 709 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_RESOLVE_PATH\" (in detcol_id any, inout reference_item any, inout old_base varchar, inout new_base varchar) returns any\n"
 "{\n"
 "return -20;\n"
 "}\n"
-"--src DET_RDFData.sql:702\n";
+"--src DET_RDFData.sql:707\n";
 
-static const char *proc550 = 
-"#line 710 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc562 = 
+"#line 715 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_LOCK\" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
 "RDFData_log_message (current_proc_name ());\n"
 "return -20;\n"
 "}\n"
-"--src DET_RDFData.sql:708\n";
+"--src DET_RDFData.sql:713\n";
 
-static const char *proc551 = 
-"#line 718 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc563 = 
+"#line 723 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
 "RDFData_log_message (current_proc_name ());\n"
 "return -27;\n"
 "}\n"
-"--src DET_RDFData.sql:716\n";
+"--src DET_RDFData.sql:721\n";
 
-static const char *proc552 = 
-"#line 725 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc564 = 
+"#line 730 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
 "RDFData_log_message (current_proc_name ());\n"
 "return 0;\n"
 "}\n"
-"--src DET_RDFData.sql:723\n";
+"--src DET_RDFData.sql:728\n";
 
-static const char *proc553 = 
-"#line 733 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc565 = 
+"#line 738 \"[executable]/DET_RDFData.sql\"\n"
 "create function DB.DBA.\"RDFData_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
 "RDFData_log_message (current_proc_name ());\n"
 "return vector ();\n"
 "}\n"
-"--src DET_RDFData.sql:731\n";
+"--src DET_RDFData.sql:736\n";
 
-static const char *proc554 = 
-"#line 740 \"[executable]/DET_RDFData.sql\"\n"
+static const char *proc566 = 
+"#line 745 \"[executable]/DET_RDFData.sql\"\n"
 "create procedure DB.DBA.\"RDFData_MAKE_DET_COL\" (in path varchar, in gr varchar := null, in lg varchar := null)\n"
 "{\n"
 "declare colid int;\n"
@@ -24604,11 +25385,11 @@ static const char *proc554 =
 "if (lg is not null)\n"
 "DAV_PROP_SET_INT (path, \'virt:rdfdata_lang\', lg, null, null, 0, 0, 1, http_dav_uid ());\n"
 "}\n"
-"--src DET_RDFData.sql:738\n";
+"--src DET_RDFData.sql:743\n";
 
 /* DET_S3.sql */
 
-static const char *proc555 = 
+static const char *proc567 = 
 "#line 25 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__encode (\n"
 "in S varchar)\n"
@@ -24620,7 +25401,7 @@ static const char *proc555 =
 "}\n"
 "--src DET_S3.sql:23\n";
 
-static const char *proc556 = 
+static const char *proc568 = 
 "#line 37 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__params (\n"
 "in colID integer,\n"
@@ -24634,7 +25415,7 @@ static const char *proc556 =
 "}\n"
 "--src DET_S3.sql:35\n";
 
-static const char *proc557 = 
+static const char *proc569 = 
 "#line 51 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__parts2path (\n"
 "in bucket varchar,\n"
@@ -24655,7 +25436,7 @@ static const char *proc557 =
 "}\n"
 "--src DET_S3.sql:49\n";
 
-static const char *proc558 = 
+static const char *proc570 = 
 "#line 72 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__item2entry (\n"
 "in detcolID integer,\n"
@@ -24705,7 +25486,7 @@ static const char *proc558 =
 "}\n"
 "--src DET_S3.sql:70\n";
 
-static const char *proc559 = 
+static const char *proc571 = 
 "#line 121 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__headers2item (\n"
 "in headers varchat,\n"
@@ -24726,7 +25507,7 @@ static const char *proc559 =
 "}\n"
 "--src DET_S3.sql:119\n";
 
-static const char *proc560 = 
+static const char *proc572 = 
 "#line 143 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__makeHostUrl (\n"
 "in path varchar,\n"
@@ -24760,7 +25541,7 @@ static const char *proc560 =
 "}\n"
 "--src DET_S3.sql:141\n";
 
-static const char *proc561 = 
+static const char *proc573 = 
 "#line 177 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__getBucketFromUrl (\n"
 "in url varchar)\n"
@@ -24774,7 +25555,7 @@ static const char *proc561 =
 "}\n"
 "--src DET_S3.sql:175\n";
 
-static const char *proc562 = 
+static const char *proc574 = 
 "#line 191 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__getNameFromUrl (\n"
 "in url varchar)\n"
@@ -24788,7 +25569,7 @@ static const char *proc562 =
 "}\n"
 "--src DET_S3.sql:189\n";
 
-static const char *proc563 = 
+static const char *proc575 = 
 "#line 205 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__getPathFromUrl (\n"
 "in url varchar)\n"
@@ -24802,7 +25583,7 @@ static const char *proc563 =
 "}\n"
 "--src DET_S3.sql:203\n";
 
-static const char *proc564 = 
+static const char *proc576 = 
 "#line 219 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__makeAWSHeader (\n"
 "in accessCode varchar,\n"
@@ -24823,7 +25604,7 @@ static const char *proc564 =
 "}\n"
 "--src DET_S3.sql:217\n";
 
-static const char *proc565 = 
+static const char *proc577 = 
 "#line 240 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__getBuckets (\n"
 "in accessCode varchar,\n"
@@ -24877,7 +25658,7 @@ static const char *proc565 =
 "}\n"
 "--src DET_S3.sql:238\n";
 
-static const char *proc566 = 
+static const char *proc578 = 
 "#line 296 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__getBucket (\n"
 "in accessCode varchar,\n"
@@ -24942,7 +25723,7 @@ static const char *proc566 =
 "}\n"
 "--src DET_S3.sql:294\n";
 
-static const char *proc567 = 
+static const char *proc579 = 
 "#line 361 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__putObject (\n"
 "in accessCode varchar,\n"
@@ -24983,7 +25764,7 @@ static const char *proc567 =
 "}\n"
 "--src DET_S3.sql:359\n";
 
-static const char *proc568 = 
+static const char *proc580 = 
 "#line 402 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__headObject (\n"
 "in accessCode varchar,\n"
@@ -25035,7 +25816,7 @@ static const char *proc568 =
 "}\n"
 "--src DET_S3.sql:400\n";
 
-static const char *proc569 = 
+static const char *proc581 = 
 "#line 454 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__getObject (\n"
 "in accessCode varchar,\n"
@@ -25070,7 +25851,7 @@ static const char *proc569 =
 "}\n"
 "--src DET_S3.sql:452\n";
 
-static const char *proc570 = 
+static const char *proc582 = 
 "#line 489 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.S3__deleteObject (\n"
 "in accessCode varchar,\n"
@@ -25114,7 +25895,7 @@ static const char *proc570 =
 "}\n"
 "--src DET_S3.sql:487\n";
 
-static const char *proc571 = 
+static const char *proc583 = 
 "#line 533 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -25125,7 +25906,7 @@ static const char *proc571 =
 "}\n"
 "--src DET_S3.sql:531\n";
 
-static const char *proc572 = 
+static const char *proc584 = 
 "#line 547 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -25180,7 +25961,7 @@ static const char *proc572 =
 "}\n"
 "--src DET_S3.sql:545\n";
 
-static const char *proc573 = 
+static const char *proc585 = 
 "#line 603 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -25189,7 +25970,7 @@ static const char *proc573 =
 "}\n"
 "--src DET_S3.sql:601\n";
 
-static const char *proc574 = 
+static const char *proc586 = 
 "#line 612 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_COL_CREATE\" (in detcolID any, in pathParts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -25206,7 +25987,7 @@ static const char *proc574 =
 "}\n"
 "--src DET_S3.sql:610\n";
 
-static const char *proc575 = 
+static const char *proc587 = 
 "#line 628 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_DELETE\" (\n"
 "in detcolID any,\n"
@@ -25224,26 +26005,17 @@ static const char *proc575 =
 "}\n"
 "--src DET_S3.sql:626\n";
 
-static const char *proc576 = 
-"#line 648 \"[executable]/DET_S3.sql\"\n"
-"create function DB.DBA.\"S3_DAV_RES_UPLOAD\" (in detcolID any, in pathParts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
-"{\n"
-"\n"
-"return -20;\n"
-"}\n"
-"--src DET_S3.sql:646\n";
-
-static const char *proc577 = 
-"#line 658 \"[executable]/DET_S3.sql\"\n"
+static const char *proc588 = 
+"#line 659 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_PROP_REMOVE\" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:656\n";
+"--src DET_S3.sql:657\n";
 
-static const char *proc578 = 
-"#line 667 \"[executable]/DET_S3.sql\"\n"
+static const char *proc589 = 
+"#line 668 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_PROP_SET\" (in id any, in what char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
@@ -25252,28 +26024,28 @@ static const char *proc578 =
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:665\n";
+"--src DET_S3.sql:666\n";
 
-static const char *proc579 = 
-"#line 678 \"[executable]/DET_S3.sql\"\n"
+static const char *proc590 = 
+"#line 679 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
 "\n"
 "return -11;\n"
 "}\n"
-"--src DET_S3.sql:676\n";
+"--src DET_S3.sql:677\n";
 
-static const char *proc580 = 
-"#line 687 \"[executable]/DET_S3.sql\"\n"
+static const char *proc591 = 
+"#line 688 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
 "\n"
 "return vector ();\n"
 "}\n"
-"--src DET_S3.sql:685\n";
+"--src DET_S3.sql:686\n";
 
-static const char *proc581 = 
-"#line 695 \"[executable]/DET_S3.sql\"\n"
+static const char *proc592 = 
+"#line 696 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_DIR_SINGLE\" (\n"
 "in id any,\n"
 "in what char(0),\n"
@@ -25294,10 +26066,10 @@ static const char *proc581 =
 "detcolPath := DB.DBA.DAV_SEARCH_PATH (detcolID, \'C\');\n"
 "return DB.DBA.S3__item2entry (detcolID, detcolPath, bucket, s3Object);\n"
 "}\n"
-"--src DET_S3.sql:693\n";
+"--src DET_S3.sql:694\n";
 
-static const char *proc582 = 
-"#line 718 \"[executable]/DET_S3.sql\"\n"
+static const char *proc593 = 
+"#line 719 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_DIR_LIST\" (\n"
 "in detcolID any,\n"
 "in pathParts any,\n"
@@ -25331,19 +26103,19 @@ static const char *proc582 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src DET_S3.sql:716\n";
+"--src DET_S3.sql:717\n";
 
-static const char *proc583 = 
-"#line 754 \"[executable]/DET_S3.sql\"\n"
+static const char *proc594 = 
+"#line 755 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_DIR_FILTER\" (in detcolID any, in pathParts any, in detcol_path varchar, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return vector();\n"
 "}\n"
-"--src DET_S3.sql:752\n";
+"--src DET_S3.sql:753\n";
 
-static const char *proc584 = 
-"#line 762 \"[executable]/DET_S3.sql\"\n"
+static const char *proc595 = 
+"#line 763 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_SEARCH_ID\" (\n"
 "in detcolID any,\n"
 "in pathParts any,\n"
@@ -25360,10 +26132,10 @@ static const char *proc584 =
 "return -1;\n"
 "return vector (UNAME\'S3\', detcolID, s3Path);\n"
 "}\n"
-"--src DET_S3.sql:760\n";
+"--src DET_S3.sql:761\n";
 
-static const char *proc585 = 
-"#line 781 \"[executable]/DET_S3.sql\"\n"
+static const char *proc596 = 
+"#line 782 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_SEARCH_PATH\" (\n"
 "in id any,\n"
 "in what char(1)) returns any\n"
@@ -25384,10 +26156,10 @@ static const char *proc585 =
 "return -23;\n"
 "return rtrim (detcolPath, \'/\') || get_keyword (\'path\', s3Object);\n"
 "}\n"
-"--src DET_S3.sql:779\n";
+"--src DET_S3.sql:780\n";
 
-static const char *proc586 = 
-"#line 803 \"[executable]/DET_S3.sql\"\n"
+static const char *proc597 = 
+"#line 804 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_RES_UPLOAD\" (\n"
 "in detcolID any,\n"
 "in pathParts any,\n"
@@ -25407,10 +26179,10 @@ static const char *proc586 =
 "return -1;\n"
 "return vector (UNAME\'S3\', detcolID, s3Path);\n"
 "}\n"
-"--src DET_S3.sql:801\n";
+"--src DET_S3.sql:802\n";
 
-static const char *proc587 = 
-"#line 825 \"[executable]/DET_S3.sql\"\n"
+static const char *proc598 = 
+"#line 826 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_RES_UPLOAD_COPY\" (in detcolID any, in pathParts any, in sourceID any, in what char(1), in overwrite_flags integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
@@ -25436,10 +26208,10 @@ static const char *proc587 =
 "}\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:823\n";
+"--src DET_S3.sql:824\n";
 
-static const char *proc588 = 
-"#line 853 \"[executable]/DET_S3.sql\"\n"
+static const char *proc599 = 
+"#line 854 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_RES_UPLOAD_MOVE\" (in detcolID any, in pathParts any, in sourceID any, in what char(1), in overwrite_flags integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
@@ -25468,10 +26240,10 @@ static const char *proc588 =
 "}\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:851\n";
+"--src DET_S3.sql:852\n";
 
-static const char *proc589 = 
-"#line 885 \"[executable]/DET_S3.sql\"\n"
+static const char *proc600 = 
+"#line 886 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_RES_CONTENT\" (\n"
 "in id any,\n"
 "inout content any,\n"
@@ -25502,55 +26274,55 @@ static const char *proc589 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src DET_S3.sql:883\n";
+"--src DET_S3.sql:884\n";
 
-static const char *proc590 = 
-"#line 918 \"[executable]/DET_S3.sql\"\n"
+static const char *proc601 = 
+"#line 919 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_SYMLINK\" (in detcolID any, in pathParts any, in sourceID any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:916\n";
+"--src DET_S3.sql:917\n";
 
-static const char *proc591 = 
-"#line 926 \"[executable]/DET_S3.sql\"\n"
+static const char *proc602 = 
+"#line 927 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_DEREFERENCE_LIST\" (in detcolID any, inout report_array any) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:924\n";
+"--src DET_S3.sql:925\n";
 
-static const char *proc592 = 
-"#line 934 \"[executable]/DET_S3.sql\"\n"
+static const char *proc603 = 
+"#line 935 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_RESOLVE_PATH\" (in detcolID any, inout reference_item any, inout old_base varchar, inout new_base varchar) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:932\n";
+"--src DET_S3.sql:933\n";
 
-static const char *proc593 = 
-"#line 942 \"[executable]/DET_S3.sql\"\n"
+static const char *proc604 = 
+"#line 943 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_LOCK\" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_S3.sql:940\n";
+"--src DET_S3.sql:941\n";
 
-static const char *proc594 = 
-"#line 950 \"[executable]/DET_S3.sql\"\n"
+static const char *proc605 = 
+"#line 951 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
 "\n"
 "return -27;\n"
 "}\n"
-"--src DET_S3.sql:948\n";
+"--src DET_S3.sql:949\n";
 
-static const char *proc595 = 
-"#line 959 \"[executable]/DET_S3.sql\"\n"
+static const char *proc606 = 
+"#line 960 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_IS_LOCKED\" (inout id any, inout Type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
 "\n"
@@ -25573,20 +26345,20 @@ static const char *proc595 =
 "return rc;\n"
 "return 0;\n"
 "}\n"
-"--src DET_S3.sql:957\n";
+"--src DET_S3.sql:958\n";
 
-static const char *proc596 = 
-"#line 985 \"[executable]/DET_S3.sql\"\n"
+static const char *proc607 = 
+"#line 986 \"[executable]/DET_S3.sql\"\n"
 "create function DB.DBA.\"S3_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
 "\n"
 "return vector ();\n"
 "}\n"
-"--src DET_S3.sql:983\n";
+"--src DET_S3.sql:984\n";
 
 /* DET_DynaRes.sql */
 
-static const char *tbl7 = 
+static const char *tbl8 = 
 "create table WS.WS.DYNA_RES (\n"
 "DR_RES_ID integer not null primary key,\n"
 "DR_DETCOL_ID integer not null,\n"
@@ -25609,7 +26381,7 @@ static const char *tbl7 =
 "create index DYNA_RES_REFRESH_DT on WS.WS.DYNA_RES (DR_REFRESH_DT)\n"
 "create index DYNA_RES_DELETE_DT on WS.WS.DYNA_RES (DR_DELETE_DT)\n";
 
-static const char *proc597 = 
+static const char *proc608 = 
 "#line 51 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_ACCESS_PARAMS\" (in detcol_id any, out access varchar, out gid integer, out uid integer)\n"
 "{\n"
@@ -25630,7 +26402,7 @@ static const char *proc597 =
 "}\n"
 "--src DET_DynaRes.sql:49\n";
 
-static const char *proc598 = 
+static const char *proc609 = 
 "#line 72 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -25654,7 +26426,7 @@ static const char *proc598 =
 "}\n"
 "--src DET_DynaRes.sql:70\n";
 
-static const char *proc599 = 
+static const char *proc610 = 
 "#line 99 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -25677,8 +26449,13 @@ static const char *proc599 =
 "if ((not allow_anon) or (\'\' <> WS.WS.FINDPARAM (a_lines, \'Authorization:\')))\n"
 "rc := WS.WS.GET_DAV_AUTH (a_lines, allow_anon, can_write_http, a_uname, u_password, a_uid, a_gid, _perms);\n"
 "if (rc < 0)\n"
+"{\n"
+"if (DAV_AUTHENTICATE_SSL (id, what, null, req, a_uid, a_gid, _perms))\n"
+"return a_uid;\n"
+"\n"
 "return rc;\n"
 "}\n"
+"}\n"
 "if (isinteger (a_uid))\n"
 "{\n"
 "if (a_uid < 0)\n"
@@ -25701,8 +26478,8 @@ static const char *proc599 =
 "}\n"
 "--src DET_DynaRes.sql:97\n";
 
-static const char *proc600 = 
-"#line 146 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc611 = 
+"#line 151 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
 "\n"
@@ -25710,37 +26487,37 @@ static const char *proc600 =
 "return -1;\n"
 "return id[1];\n"
 "}\n"
-"--src DET_DynaRes.sql:144\n";
+"--src DET_DynaRes.sql:149\n";
 
-static const char *proc601 = 
-"#line 157 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc612 = 
+"#line 162 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:155\n";
+"--src DET_DynaRes.sql:160\n";
 
-static const char *proc602 = 
-"#line 165 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc613 = 
+"#line 170 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:163\n";
+"--src DET_DynaRes.sql:168\n";
 
-static const char *proc603 = 
-"#line 173 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc614 = 
+"#line 178 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:171\n";
+"--src DET_DynaRes.sql:176\n";
 
-static const char *proc604 = 
-"#line 182 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc615 = 
+"#line 187 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
 "declare id any;\n"
@@ -25753,29 +26530,29 @@ static const char *proc604 =
 "delete from WS.WS.DYNA_RES where DR_RES_ID = id[3] and DR_DETCOL_ID = id[1];\n"
 "return 0;\n"
 "}\n"
-"--src DET_DynaRes.sql:180\n";
+"--src DET_DynaRes.sql:185\n";
 
-static const char *proc605 = 
-"#line 200 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc616 = 
+"#line 205 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "declare res_depth, rc int;\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:198\n";
+"--src DET_DynaRes.sql:203\n";
 
-static const char *proc606 = 
-"#line 211 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc617 = 
+"#line 216 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_PROP_REMOVE\" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:209\n";
+"--src DET_DynaRes.sql:214\n";
 
-static const char *proc607 = 
-"#line 220 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc618 = 
+"#line 225 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_PROP_SET\" (in id any, in what char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
@@ -25785,28 +26562,28 @@ static const char *proc607 =
 "}\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:218\n";
+"--src DET_DynaRes.sql:223\n";
 
-static const char *proc608 = 
-"#line 232 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc619 = 
+"#line 237 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
 "\n"
 "return -11;\n"
 "}\n"
-"--src DET_DynaRes.sql:230\n";
+"--src DET_DynaRes.sql:235\n";
 
-static const char *proc609 = 
-"#line 241 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc620 = 
+"#line 246 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
 "\n"
 "return vector ();\n"
 "}\n"
-"--src DET_DynaRes.sql:239\n";
+"--src DET_DynaRes.sql:244\n";
 
-static const char *proc610 = 
-"#line 249 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc621 = 
+"#line 254 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
@@ -25837,10 +26614,10 @@ static const char *proc610 =
 "}\n"
 "return -1;\n"
 "}\n"
-"--src DET_DynaRes.sql:247\n";
+"--src DET_DynaRes.sql:252\n";
 
-static const char *proc611 = 
-"#line 282 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc622 = 
+"#line 287 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
@@ -25883,10 +26660,10 @@ static const char *proc611 =
 "vectorbld_final (res);\n"
 "return res;\n"
 "}\n"
-"--src DET_DynaRes.sql:280\n";
+"--src DET_DynaRes.sql:285\n";
 
-static const char *proc612 = 
-"#line 327 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc623 = 
+"#line 332 \"[executable]/DET_DynaRes.sql\"\n"
 "create procedure \"DynaRes_DAV_FC_PRED_METAS\" (inout pred_metas any)\n"
 "{\n"
 "pred_metas := vector (\n"
@@ -25916,10 +26693,10 @@ static const char *proc612 =
 "\'RDF_OBJ_VALUE\',	vector (\'DYNA_RES\'	, 3, \'XML\'	, NULL	)\n"
 ");\n"
 "}\n"
-"--src DET_DynaRes.sql:325\n";
+"--src DET_DynaRes.sql:330\n";
 
-static const char *proc613 = 
-"#line 358 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc624 = 
+"#line 363 \"[executable]/DET_DynaRes.sql\"\n"
 "create procedure \"DynaRes_DAV_FC_TABLE_METAS\" (inout table_metas any)\n"
 "{\n"
 "table_metas := vector (\n"
@@ -25948,10 +26725,10 @@ static const char *proc613 =
 "\n"
 ");\n"
 "}\n"
-"--src DET_DynaRes.sql:356\n";
+"--src DET_DynaRes.sql:361\n";
 
-static const char *proc614 = 
-"#line 390 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc625 = 
+"#line 395 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_FC_PRINT_WHERE\" (inout filter any, in param_uid integer) returns varchar\n"
 "{\n"
 "declare pred_metas, cmp_metas, table_metas any;\n"
@@ -25965,10 +26742,10 @@ static const char *proc614 =
 ");\n"
 "return DAV_FC_PRINT_WHERE_INT (filter, pred_metas, cmp_metas, table_metas, used_tables, param_uid);\n"
 "}\n"
-"--src DET_DynaRes.sql:388\n";
+"--src DET_DynaRes.sql:393\n";
 
-static const char *proc615 = 
-"#line 406 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc626 = 
+"#line 411 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path any, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
 "declare st, access, qry_text, execstate, execmessage varchar;\n"
@@ -26004,10 +26781,10 @@ static const char *proc615 =
 "vectorbld_final (res);\n"
 "return res;\n"
 "}\n"
-"--src DET_DynaRes.sql:404\n";
+"--src DET_DynaRes.sql:409\n";
 
-static const char *proc616 = 
-"#line 444 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc627 = 
+"#line 449 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
 "\n"
@@ -26050,37 +26827,43 @@ static const char *proc616 =
 "return -1;\n"
 "return vector (UNAME\'DynaRes\', detcol_id, null, c_res_id);\n"
 "}\n"
-"--src DET_DynaRes.sql:442\n";
+"--src DET_DynaRes.sql:447\n";
 
-static const char *proc617 = 
-"#line 489 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc628 = 
+"#line 494 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
 "\n"
+"if (what <> \'R\')    \n"
 "return NULL;\n"
+"for select DR_NAME from WS.WS.DYNA_RES where DR_RES_ID = id[3] and DR_DETCOL_ID = id[1] do\n"
+"{\n"
+"return concat (DAV_SEARCH_PATH (id[1], \'C\'), DR_NAME);\n"
+"}  \n"
+"return null;  \n"
 "}\n"
-"--src DET_DynaRes.sql:487\n";
+"--src DET_DynaRes.sql:492\n";
 
-static const char *proc618 = 
-"#line 497 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc629 = 
+"#line 508 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:495\n";
+"--src DET_DynaRes.sql:506\n";
 
-static const char *proc619 = 
-"#line 505 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc630 = 
+"#line 516 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:503\n";
+"--src DET_DynaRes.sql:514\n";
 
-static const char *proc620 = 
-"#line 514 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc631 = 
+"#line 525 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
 "\n"
@@ -26165,73 +26948,73 @@ static const char *proc620 =
 "nf:\n"
 "return -1;\n"
 "}\n"
-"--src DET_DynaRes.sql:512\n";
+"--src DET_DynaRes.sql:523\n";
 
-static const char *proc621 = 
-"#line 601 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc632 = 
+"#line 612 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:599\n";
+"--src DET_DynaRes.sql:610\n";
 
-static const char *proc622 = 
-"#line 609 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc633 = 
+"#line 620 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_DEREFERENCE_LIST\" (in detcol_id any, inout report_array any) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:607\n";
+"--src DET_DynaRes.sql:618\n";
 
-static const char *proc623 = 
-"#line 617 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc634 = 
+"#line 628 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_RESOLVE_PATH\" (in detcol_id any, inout reference_item any, inout old_base varchar, inout new_base varchar) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:615\n";
+"--src DET_DynaRes.sql:626\n";
 
-static const char *proc624 = 
-"#line 625 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc635 = 
+"#line 636 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_LOCK\" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
 "\n"
 "return -20;\n"
 "}\n"
-"--src DET_DynaRes.sql:623\n";
+"--src DET_DynaRes.sql:634\n";
 
-static const char *proc625 = 
-"#line 634 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc636 = 
+"#line 645 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
 "\n"
 "return -27;\n"
 "}\n"
-"--src DET_DynaRes.sql:632\n";
+"--src DET_DynaRes.sql:643\n";
 
-static const char *proc626 = 
-"#line 643 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc637 = 
+"#line 654 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
 "\n"
 "return 0;\n"
 "}\n"
-"--src DET_DynaRes.sql:641\n";
+"--src DET_DynaRes.sql:652\n";
 
-static const char *proc627 = 
-"#line 653 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc638 = 
+"#line 664 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
 "\n"
 "return vector ();\n"
 "}\n"
-"--src DET_DynaRes.sql:651\n";
+"--src DET_DynaRes.sql:662\n";
 
-static const char *proc628 = 
-"#line 661 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc639 = 
+"#line 672 \"[executable]/DET_DynaRes.sql\"\n"
 "create procedure \"DynaRes_CF_PROPNAME_TO_COLNAME\" (in prop varchar)\n"
 "{\n"
 "return NULL;\n"
@@ -26242,10 +27025,10 @@ static const char *proc628 =
 "\n"
 "\n"
 "}\n"
-"--src DET_DynaRes.sql:659\n";
+"--src DET_DynaRes.sql:670\n";
 
-static const char *proc629 = 
-"#line 673 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc640 = 
+"#line 684 \"[executable]/DET_DynaRes.sql\"\n"
 "create procedure \"DynaRes_CF_FEED_FROM_AND_WHERE\" (in detcol_id integer, in cfc_id integer, inout rfc_list_cond any, inout filter_data any, in distexpn varchar, in auth_uid integer)\n"
 "{\n"
 "declare where_clause, from_clause varchar;\n"
@@ -26293,10 +27076,10 @@ static const char *proc629 =
 "return from_clause || \' where \' || where_clause;\n"
 "return from_clause;\n"
 "}\n"
-"--src DET_DynaRes.sql:671\n";
+"--src DET_DynaRes.sql:682\n";
 
-static const char *proc630 = 
-"#line 723 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc641 = 
+"#line 734 \"[executable]/DET_DynaRes.sql\"\n"
 "create procedure \"DynaRes_CF_LIST_PROP_DISTVALS\" (in detcol_id integer, in cfc_id integer, in rfc_spath varchar, inout rfc_list_cond any, in schema_uri varchar, inout filter_data any, inout distval_dict any, in auth_uid integer)\n"
 "{\n"
 "declare distprop, distexpn varchar;\n"
@@ -26330,10 +27113,10 @@ static const char *proc630 =
 "return;\n"
 "}\n"
 "}\n"
-"--src DET_DynaRes.sql:721\n";
+"--src DET_DynaRes.sql:732\n";
 
-static const char *proc631 = 
-"#line 758 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc642 = 
+"#line 769 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_CF_GET_RDF_HITS\" (in detcol_id integer, in cfc_id integer, in rfc_spath varchar, inout rfc_list_cond any, in schema_uri varchar, inout filter_data any, in detcol_path varchar, in make_diritems integer, in auth_uid integer) returns any\n"
 "{\n"
 "declare from_and_where_text, qry_text varchar;\n"
@@ -26399,10 +27182,10 @@ static const char *proc631 =
 "\n"
 "return acc;\n"
 "}\n"
-"--src DET_DynaRes.sql:756\n";
+"--src DET_DynaRes.sql:767\n";
 
-static const char *proc632 = 
-"#line 825 \"[executable]/DET_DynaRes.sql\"\n"
+static const char *proc643 = 
+"#line 836 \"[executable]/DET_DynaRes.sql\"\n"
 "create function \"DynaRes_INSERT_RESOURCE\" (in detcol_id integer, inout content any, in fname varchar := null,\n"
 "in perms varchar := null, in owner_uid integer := null, in owner_gid integer := null,\n"
 "in refresh_seconds integer := null, in ttl_seconds integer := 172800, in mime varchar := null,\n"
@@ -26471,11 +27254,11 @@ static const char *proc632 =
 "length (content),\n"
 "content );\n"
 "}\n"
-"--src DET_DynaRes.sql:823\n";
+"--src DET_DynaRes.sql:834\n";
 
 /* DET_Versioning.sql */
 
-static const char *tbl8 = 
+static const char *tbl9 = 
 "CREATE TABLE WS.WS.SYS_DAV_RES_VERSION (\n"
 "RV_RES_ID INTEGER NOT NULL,\n"
 "RV_ID INTEGER NOT NULL,\n"
@@ -26491,7 +27274,7 @@ static const char *tbl8 =
 ")\n"
 "alter index SYS_DAV_RES_VERSION on WS.WS.SYS_DAV_RES_VERSION partition (RV_RES_ID int)\n";
 
-static const char *tbl9 = 
+static const char *tbl10 = 
 "CREATE TABLE WS.WS.SYS_DAV_RES_DIFF (\n"
 "RD_RES_ID       INTEGER NOT NULL,\n"
 "RD_TO_ID        INTEGER NOT NULL,\n"
@@ -26504,7 +27287,7 @@ static const char *tbl9 =
 ")\n"
 "alter index SYS_DAV_RES_DIFF on WS.WS.SYS_DAV_RES_DIFF partition (RD_RES_ID int)\n";
 
-static const char *tbl10 = 
+static const char *tbl11 = 
 "CREATE TABLE WS.WS.SYS_DAV_RES_MERGE (\n"
 "RM_RES_ID INTEGER NOT NULL,\n"
 "RM_ID INTEGER NOT NULL,\n"
@@ -26514,7 +27297,7 @@ static const char *tbl10 =
 ")\n"
 "alter index SYS_DAV_RES_MERGE on WS.WS.SYS_DAV_RES_MERGE partition (RM_RES_ID int)\n";
 
-static const char *tbl11 = 
+static const char *tbl12 = 
 "CREATE TABLE WS.WS.SYS_DAV_ACTIVITY (\n"
 "ACT_ID        INTEGER NOT NULL,\n"
 "ACT_NAME      VARCHAR(256) NOT NULL,\n"
@@ -26524,7 +27307,7 @@ static const char *tbl11 =
 ")\n"
 "alter index SYS_DAV_ACTIVITY on WS.WS.SYS_DAV_ACTIVITY partition (ACT_ID int)\n";
 
-static const char *tbl12 = 
+static const char *tbl13 = 
 "CREATE TABLE WS.WS.SYS_DAV_WORKSPACE (\n"
 "WS_COL_ID  INTEGER NOT NULL,\n"
 "WS_NAME    VARCHAR(256) NOT NULL,\n"
@@ -26534,7 +27317,7 @@ static const char *tbl12 =
 ")\n"
 "alter index SYS_DAV_WORKSPACE on WS.WS.SYS_DAV_WORKSPACE partition (WS_COL_ID int)\n";
 
-static const char *tbl13 = 
+static const char *tbl14 = 
 "CREATE TABLE WS.WS.SYS_DAV_CONFOBJ (\n"
 "CONFO_ID INTEGER NOT NULL,\n"
 "CONFO_NAME VARCHAR(256) NOT NULL,\n"
@@ -26544,7 +27327,7 @@ static const char *tbl13 =
 ")\n"
 "alter index SYS_DAV_CONFOBJ on WS.WS.SYS_DAV_CONFOBJ partition (CONFO_ID int)\n";
 
-static const char *tbl14 = 
+static const char *tbl15 = 
 "CREATE TABLE WS.WS.SYS_DAV_BASELINE (\n"
 "BL_CONFO_ID INTEGER NOT NULL UNIQUE,\n"
 "BL_ID      INTEGER NOT NULL UNIQUE,\n"
@@ -26555,7 +27338,7 @@ static const char *tbl14 =
 ")\n"
 "alter index SYS_DAV_BASELINE on WS.WS.SYS_DAV_BASELINE partition (BL_CONFO_ID int)\n";
 
-static const char *tbl15 = 
+static const char *tbl16 = 
 "CREATE TABLE WS.WS.SYS_DAV_BASELINE_RES (\n"
 "BR_CONFO_ID     INTEGER NOT NULL,\n"
 "BR_BL_ID      INTEGER NOT NULL,\n"
@@ -26604,7 +27387,7 @@ static const char *trig43 =
 "}\n"
 "--src DET_Versioning.sql:165\n";
 
-static const char *proc633 = 
+static const char *proc644 = 
 "#line 182 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure \"Versioning_ADD_NEW_DIFF\" (in _res_id int,\n"
 "in version_id int,\n"
@@ -26725,7 +27508,7 @@ static const char *trig44 =
 
 static const char *trig45 = 
 "#line 297 \"[executable]/DET_Versioning.sql\"\n"
-"CREATE TRIGGER \"Versioning_DAV_RES_UPDATE\" AFTER UPDATE ON WS.WS.SYS_DAV_RES ORDER 10 REFERENCING NEW AS N, OLD AS O\n"
+"CREATE TRIGGER \"Versioning_DAV_RES_UPDATE\" BEFORE UPDATE ON WS.WS.SYS_DAV_RES ORDER 10 REFERENCING NEW AS N, OLD AS O\n"
 "{\n"
 "declare _diff, _diff_type varchar;\n"
 "_diff := NULL;\n"
@@ -26799,7 +27582,7 @@ static const char *trig45 =
 "}\n"
 "--src DET_Versioning.sql:295\n";
 
-static const char *proc634 = 
+static const char *proc645 = 
 "#line 371 \"[executable]/DET_Versioning.sql\"\n"
 "create function DAV_GET_VERSION_CONTENT (in res_id integer, in ver integer, inout content any, out type varchar, inout mode any)\n"
 "{\n"
@@ -26874,7 +27657,7 @@ static const char *proc634 =
 "}\n"
 "--src DET_Versioning.sql:369\n";
 
-static const char *proc635 = 
+static const char *proc646 = 
 "#line 445 \"[executable]/DET_Versioning.sql\"\n"
 "create function DAV_RES_RESTORE (in VVCfolder varchar, in file varchar, in auth varchar, in pwd varchar)\n"
 "{\n"
@@ -26916,7 +27699,7 @@ static const char *proc635 =
 "}\n"
 "--src DET_Versioning.sql:443\n";
 
-static const char *proc636 = 
+static const char *proc647 = 
 "#line 489 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_AUTHENTICATE\" (in id any, in what char(1), in req varchar, in auth_uname varchar, in auth_pwd varchar, in auth_uid integer)\n"
 "{\n"
@@ -26927,7 +27710,7 @@ static const char *proc636 =
 "}\n"
 "--src DET_Versioning.sql:487\n";
 
-static const char *proc637 = 
+static const char *proc648 = 
 "#line 503 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_AUTHENTICATE_HTTP\" (in id any, in what char(1), in req varchar, in can_write_http integer, inout a_lines any, inout a_uname varchar, inout a_pwd varchar, inout a_uid integer, inout a_gid integer, inout _perms varchar) returns integer\n"
 "{\n"
@@ -26976,7 +27759,7 @@ static const char *proc637 =
 "}\n"
 "--src DET_Versioning.sql:501\n";
 
-static const char *proc638 = 
+static const char *proc649 = 
 "#line 552 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_GET_PARENT\" (in id any, in st char(1), in path varchar) returns any\n"
 "{\n"
@@ -26987,7 +27770,7 @@ static const char *proc638 =
 "}\n"
 "--src DET_Versioning.sql:550\n";
 
-static const char *proc639 = 
+static const char *proc650 = 
 "#line 563 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_COL_CREATE\" (in detcol_id any, in path_parts any, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -26996,7 +27779,7 @@ static const char *proc639 =
 "}\n"
 "--src DET_Versioning.sql:561\n";
 
-static const char *proc640 = 
+static const char *proc651 = 
 "#line 571 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_COL_MOUNT\" (in detcol_id any, in path_parts any, in full_mount_path varchar, in mount_det varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27005,7 +27788,7 @@ static const char *proc640 =
 "}\n"
 "--src DET_Versioning.sql:569\n";
 
-static const char *proc641 = 
+static const char *proc652 = 
 "#line 579 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_COL_MOUNT_HERE\" (in parent_id any, in full_mount_path varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27014,7 +27797,7 @@ static const char *proc641 =
 "}\n"
 "--src DET_Versioning.sql:577\n";
 
-static const char *proc642 = 
+static const char *proc653 = 
 "#line 588 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_DELETE\" (in detcol_id any, in path_parts any, in what char(1), in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -27083,7 +27866,7 @@ static const char *proc642 =
 "}\n"
 "--src DET_Versioning.sql:586\n";
 
-static const char *proc643 = 
+static const char *proc654 = 
 "#line 659 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_RES_UPLOAD\" (in detcol_id any, in path_parts any, inout content any, in type varchar, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27092,7 +27875,7 @@ static const char *proc643 =
 "}\n"
 "--src DET_Versioning.sql:657\n";
 
-static const char *proc644 = 
+static const char *proc655 = 
 "#line 669 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_PROP_REMOVE\" (in id any, in what char(0), in propname varchar, in silent integer, in auth_uid integer) returns integer\n"
 "{\n"
@@ -27101,7 +27884,7 @@ static const char *proc644 =
 "}\n"
 "--src DET_Versioning.sql:667\n";
 
-static const char *proc645 = 
+static const char *proc656 = 
 "#line 678 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_PROP_SET\" (in id any, in what char(0), in propname varchar, in propvalue any, in overwrite integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27113,7 +27896,7 @@ static const char *proc645 =
 "}\n"
 "--src DET_Versioning.sql:676\n";
 
-static const char *proc646 = 
+static const char *proc657 = 
 "#line 689 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_PROP_GET\" (in id any, in what char(0), in propname varchar, in auth_uid integer)\n"
 "{\n"
@@ -27169,7 +27952,7 @@ static const char *proc646 =
 "}\n"
 "--src DET_Versioning.sql:687\n";
 
-static const char *proc647 = 
+static const char *proc658 = 
 "#line 743 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_root_version\" (in _res_id int, in _hist_col varchar)\n"
 "{\n"
@@ -27184,7 +27967,7 @@ static const char *proc647 =
 "}\n"
 "--src DET_Versioning.sql:741\n";
 
-static const char *proc648 = 
+static const char *proc659 = 
 "#line 756 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_version_set\" (in _res_id int, in _hist_col varchar)\n"
 "{\n"
@@ -27204,7 +27987,7 @@ static const char *proc648 =
 "}\n"
 "--src DET_Versioning.sql:754\n";
 
-static const char *proc649 = 
+static const char *proc660 = 
 "#line 776 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_PROP_LIST\" (in id any, in what char(0), in propmask varchar, in auth_uid integer)\n"
 "{\n"
@@ -27220,7 +28003,7 @@ static const char *proc649 =
 "}\n"
 "--src DET_Versioning.sql:774\n";
 
-static const char *proc650 = 
+static const char *proc661 = 
 "#line 791 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_DIR_SINGLE\" (in id any, in what char(0), in path any, in auth_uid integer) returns any\n"
 "{\n"
@@ -27321,7 +28104,7 @@ static const char *proc650 =
 "}\n"
 "--src DET_Versioning.sql:789\n";
 
-static const char *proc651 = 
+static const char *proc662 = 
 "#line 890 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_GET_BASE_PATH\" (in detcol_id int)\n"
 "{\n"
@@ -27329,7 +28112,7 @@ static const char *proc651 =
 "}\n"
 "--src DET_Versioning.sql:888\n";
 
-static const char *proc652 = 
+static const char *proc663 = 
 "#line 896 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_GET_ATTIC_PATH\" (in detcol_id int)\n"
 "{\n"
@@ -27337,7 +28120,7 @@ static const char *proc652 =
 "}\n"
 "--src DET_Versioning.sql:894\n";
 
-static const char *proc653 = 
+static const char *proc664 = 
 "#line 904 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_SET_LIST\" (in detcol_id int, in _res_id int, in virt_base_path varchar, inout res any)\n"
 "{\n"
@@ -27375,7 +28158,7 @@ static const char *proc653 =
 "}\n"
 "--src DET_Versioning.sql:902\n";
 
-static const char *proc654 = 
+static const char *proc665 = 
 "#line 943 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_DIR_LIST\" (in detcol_id any, in path_parts any, in detcol_path varchar, in name_mask varchar, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27460,7 +28243,7 @@ static const char *proc654 =
 "}\n"
 "--src DET_Versioning.sql:941\n";
 
-static const char *proc655 = 
+static const char *proc666 = 
 "#line 1027 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_DIR_FILTER\" (in detcol_id any, in path_parts any, in detcol_path varchar, inout compilation any, in recursive integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27469,7 +28252,7 @@ static const char *proc655 =
 "}\n"
 "--src DET_Versioning.sql:1025\n";
 
-static const char *proc656 = 
+static const char *proc667 = 
 "#line 1035 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_SEARCH_ID\" (in detcol_id any, in path_parts any, in what char(1)) returns any\n"
 "{\n"
@@ -27529,7 +28312,7 @@ static const char *proc656 =
 "}\n"
 "--src DET_Versioning.sql:1033\n";
 
-static const char *proc657 = 
+static const char *proc668 = 
 "#line 1094 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_SEARCH_PATH\" (in id any, in what char(1)) returns any\n"
 "{\n"
@@ -27545,7 +28328,7 @@ static const char *proc657 =
 "}\n"
 "--src DET_Versioning.sql:1092\n";
 
-static const char *proc658 = 
+static const char *proc669 = 
 "#line 1109 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_RES_UPLOAD_COPY\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in permissions varchar, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27554,7 +28337,7 @@ static const char *proc658 =
 "}\n"
 "--src DET_Versioning.sql:1107\n";
 
-static const char *proc659 = 
+static const char *proc670 = 
 "#line 1117 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_RES_UPLOAD_MOVE\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite_flags integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27622,7 +28405,7 @@ static const char *proc659 =
 "}\n"
 "--src DET_Versioning.sql:1115\n";
 
-static const char *proc660 = 
+static const char *proc671 = 
 "#line 1185 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_RES_CONTENT\" (in id any, inout content any, out type varchar, in content_mode integer) returns integer\n"
 "{\n"
@@ -27671,7 +28454,7 @@ static const char *proc660 =
 "}\n"
 "--src DET_Versioning.sql:1183\n";
 
-static const char *proc661 = 
+static const char *proc672 = 
 "#line 1233 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_SYMLINK\" (in detcol_id any, in path_parts any, in source_id any, in what char(1), in overwrite integer, in uid integer, in gid integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27680,7 +28463,7 @@ static const char *proc661 =
 "}\n"
 "--src DET_Versioning.sql:1231\n";
 
-static const char *proc662 = 
+static const char *proc673 = 
 "#line 1241 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_DEREFERENCE_LIST\" (in detcol_id any, inout report_array any) returns any\n"
 "{\n"
@@ -27689,7 +28472,7 @@ static const char *proc662 =
 "}\n"
 "--src DET_Versioning.sql:1239\n";
 
-static const char *proc663 = 
+static const char *proc674 = 
 "#line 1249 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_RESOLVE_PATH\" (in detcol_id any, inout reference_item any, inout old_base varchar, inout new_base varchar) returns any\n"
 "{\n"
@@ -27698,7 +28481,7 @@ static const char *proc663 =
 "}\n"
 "--src DET_Versioning.sql:1247\n";
 
-static const char *proc664 = 
+static const char *proc675 = 
 "#line 1257 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_LOCK\" (in path any, in id any, in type char(1), inout locktype varchar, inout scope varchar, in token varchar, inout owner_name varchar, inout owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uid integer) returns any\n"
 "{\n"
@@ -27707,7 +28490,7 @@ static const char *proc664 =
 "}\n"
 "--src DET_Versioning.sql:1255\n";
 
-static const char *proc665 = 
+static const char *proc676 = 
 "#line 1266 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_UNLOCK\" (in id any, in type char(1), in token varchar, in auth_uid integer)\n"
 "{\n"
@@ -27716,7 +28499,7 @@ static const char *proc665 =
 "}\n"
 "--src DET_Versioning.sql:1264\n";
 
-static const char *proc666 = 
+static const char *proc677 = 
 "#line 1275 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_IS_LOCKED\" (inout id any, inout type char(1), in owned_tokens varchar) returns integer\n"
 "{\n"
@@ -27725,7 +28508,7 @@ static const char *proc666 =
 "}\n"
 "--src DET_Versioning.sql:1273\n";
 
-static const char *proc667 = 
+static const char *proc678 = 
 "#line 1285 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_DAV_LIST_LOCKS\" (in id any, in type char(1), in recursive integer) returns any\n"
 "{\n"
@@ -27734,7 +28517,7 @@ static const char *proc667 =
 "}\n"
 "--src DET_Versioning.sql:1283\n";
 
-static const char *proc668 = 
+static const char *proc679 = 
 "#line 1292 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_AUTO_VERSION_PROP\" (in _auto_version varchar)\n"
 "{\n"
@@ -27752,7 +28535,7 @@ static const char *proc668 =
 "}\n"
 "--src DET_Versioning.sql:1290\n";
 
-static const char *proc669 = 
+static const char *proc680 = 
 "#line 1310 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure DAV_SET_VERSIONING_PROPERTIES (in path varchar, in props any)\n"
 "{\n"
@@ -27770,7 +28553,7 @@ static const char *proc669 =
 "}\n"
 "--src DET_Versioning.sql:1308\n";
 
-static const char *proc670 = 
+static const char *proc681 = 
 "#line 1326 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure \"Versioning_REMOVE_V_PROPERTIES\" (in _path varchar)\n"
 "{\n"
@@ -27783,7 +28566,7 @@ static const char *proc670 =
 "}\n"
 "--src DET_Versioning.sql:1324\n";
 
-static const char *proc671 = 
+static const char *proc682 = 
 "#line 1338 \"[executable]/DET_Versioning.sql\"\n"
 "create function DAV_REMOVE_VERSIONING_CONTROL_INT (in _main varchar, in _auth varchar, in _pwd varchar) returns integer\n"
 "{\n"
@@ -27808,7 +28591,7 @@ static const char *proc671 =
 "}\n"
 "--src DET_Versioning.sql:1336\n";
 
-static const char *proc672 = 
+static const char *proc683 = 
 "#line 1361 \"[executable]/DET_Versioning.sql\"\n"
 "create function \"Versioning_SETPROP\" (in _resource varchar, in _propname varchar, in _value varchar,\n"
 "in _auth varchar,\n"
@@ -27824,7 +28607,7 @@ static const char *proc672 =
 "}\n"
 "--src DET_Versioning.sql:1359\n";
 
-static const char *proc673 = 
+static const char *proc684 = 
 "#line 1376 \"[executable]/DET_Versioning.sql\"\n"
 "create function DAV_SET_VERSIONING_CONTROL (in _main varchar, in _vvc varchar, in _auto_version varchar, in _auth varchar, in _pwd varchar)\n"
 "{\n"
@@ -27887,7 +28670,7 @@ static const char *proc673 =
 "}\n"
 "--src DET_Versioning.sql:1374\n";
 
-static const char *proc674 = 
+static const char *proc685 = 
 "#line 1439 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure DAV_MKWORKSPACE (in path varchar)\n"
 "{\n"
@@ -27933,7 +28716,7 @@ static const char *proc674 =
 "}\n"
 "--src DET_Versioning.sql:1437\n";
 
-static const char *proc675 = 
+static const char *proc686 = 
 "#line 1483 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure DAV_CHECKOUT (in path varchar, in auth varchar, in pwd varchar)\n"
 "{\n"
@@ -27941,7 +28724,7 @@ static const char *proc675 =
 "}\n"
 "--src DET_Versioning.sql:1481\n";
 
-static const char *proc676 = 
+static const char *proc687 = 
 "#line 1489 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure DAV_CHECKOUT_INT (in path_or_id any, in auth varchar, in pwd varchar, in extern int := 0)\n"
 "{\n"
@@ -27991,7 +28774,7 @@ static const char *proc676 =
 "}\n"
 "--src DET_Versioning.sql:1487\n";
 
-static const char *proc677 = 
+static const char *proc688 = 
 "#line 1537 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure DAV_CHECKIN (in path varchar, in auth varchar, in pwd varchar)\n"
 "{\n"
@@ -27999,7 +28782,7 @@ static const char *proc677 =
 "}\n"
 "--src DET_Versioning.sql:1535\n";
 
-static const char *proc678 = 
+static const char *proc689 = 
 "#line 1543 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure DAV_CHECKIN_INT (in path varchar, in auth varchar, in pwd varchar, in extern int:=1)\n"
 "{\n"
@@ -28096,7 +28879,7 @@ static const char *proc678 =
 "}\n"
 "--src DET_Versioning.sql:1541\n";
 
-static const char *proc679 = 
+static const char *proc690 = 
 "#line 1638 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure \"Versioning_CHECKOUT_INT\" (\n"
 "in _id int,\n"
@@ -28145,7 +28928,7 @@ static const char *trig46 =
 "}\n"
 "--src DET_Versioning.sql:1660\n";
 
-static const char *proc680 = 
+static const char *proc691 = 
 "#line 1685 \"[executable]/DET_Versioning.sql\"\n"
 "create function DAV_VERSION_CONTROL (in path varchar, in auth varchar, in pwd varchar)\n"
 "{\n"
@@ -28241,7 +29024,7 @@ static const char *proc680 =
 "}\n"
 "--src DET_Versioning.sql:1683\n";
 
-static const char *proc681 = 
+static const char *proc692 = 
 "#line 1780 \"[executable]/DET_Versioning.sql\"\n"
 "create function DAV_UNCHECKOUT (in path varchar, in auth varchar, in pwd varchar)\n"
 "{\n"
@@ -28316,7 +29099,7 @@ static const char *proc681 =
 "}\n"
 "--src DET_Versioning.sql:1778\n";
 
-static const char *proc682 = 
+static const char *proc693 = 
 "#line 1854 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure \"Versioning_Attic\" (in _resource varchar)\n"
 "{\n"
@@ -28335,7 +29118,7 @@ static const char *proc682 =
 "}\n"
 "--src DET_Versioning.sql:1852\n";
 
-static const char *proc683 = 
+static const char *proc694 = 
 "#line 1871 \"[executable]/DET_Versioning.sql\"\n"
 "create procedure \"Versioning_OTHER_FILES_IN_VVC\" (in _res varchar)\n"
 "{\n"
@@ -28344,7 +29127,7 @@ static const char *proc683 =
 "}\n"
 "--src DET_Versioning.sql:1869\n";
 
-static const char *proc684 = 
+static const char *proc695 = 
 "#line 1879 \"[executable]/DET_Versioning.sql\"\n"
 " create procedure DAV_REMOVE_VERSION_CONTROL (in _resource varchar, in auth varchar, in pwd varchar, in tokens any := 1)\n"
 "{\n"
@@ -28400,7 +29183,7 @@ static const char *proc684 =
 "}\n"
 "--src DET_Versioning.sql:1877\n";
 
-static const char *proc685 = 
+static const char *proc696 = 
 "#line 1935 \"[executable]/DET_Versioning.sql\"\n"
 " create procedure DAV_VERSION_FOLD_INT (in path varchar, in target_version int, in auth varchar)\n"
 "{\n"
@@ -28497,7 +29280,7 @@ static const char *trig47 =
 
 /* xml_view.sql */
 
-static const char *proc686 = 
+static const char *proc697 = 
 "#line 32 \"[executable]/xml_view.sql\"\n"
 "create procedure XML_VIEW_PUBLISH\n"
 "(\n"
@@ -28720,7 +29503,7 @@ static const char *proc686 =
 "}\n"
 "--src xml_view.sql:30\n";
 
-static const char *proc687 = 
+static const char *proc698 = 
 "#line 253 \"[executable]/xml_view.sql\"\n"
 "create procedure XML_VIEW_DROP (in view_name varchar)\n"
 "{\n"
@@ -28797,23 +29580,25 @@ static query_t *xslt_define_qr;
   }
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -28833,164 +29618,175 @@ sqls_define_dav (void)
   DEFINE_PROC ("WS.WS.PROPFIND_RESPONSE", proc2);
   DEFINE_PROC ("WS.WS.PROPFIND_RESPONSE_FORMAT", proc3);
   DEFINE_PROC ("WS.WS.PROPNAMES", proc4);
-  DEFINE_PROC ("WS.WS.CUSTOM_PROP", proc5);
-  DEFINE_PROC ("WS.WS.PROPPATCH", proc6);
-  DEFINE_PROC ("WS.WS.FINDPARAM", proc7);
-  DEFINE_PROC ("WS.WS.MKCOL", proc8);
-  DEFINE_PROC ("WS.WS.FINDCOL", proc9);
-  DEFINE_PROC ("WS.WS.FINDRES", proc10);
-  DEFINE_PROC ("WS.WS.DELCHILDREN", proc11);
-  DEFINE_PROC ("WS.WS.DELETE", proc12);
-  DEFINE_PROC ("WS.WS.ISCOL", proc13);
-  DEFINE_PROC ("WS.WS.ISRES", proc14);
-  DEFINE_PROC ("WS.WS.ETAG", proc15);
-  DEFINE_PROC ("WS.WS.HEAD", proc16);
-  DEFINE_PROC ("DAV_SET_HTTP_REQUEST_STATUS", proc17);
-  DEFINE_PROC ("WS.WS.PUT", proc18);
-  DEFINE_PROC ("WS.WS.HEX_TO_DEC", proc19);
-  DEFINE_PROC ("WS.WS.STR_TO_URI", proc20);
-  DEFINE_PROC ("WS.WS.PATHREF", proc21);
-  DEFINE_PROC ("WS.WS.IS_ACTIVE_CONTENT", proc22);
-  DEFINE_PROC ("WS.WS.GET_DAV_DEFAULT_PAGE", proc23);
-  DEFINE_PROC ("WS.WS.GET_DAV_CHUNKED_QUOTA", proc24);
-  DEFINE_PROC ("WS.WS.GET", proc25);
-  DEFINE_PROC ("WS.WS.POST", proc26);
-  DEFINE_PROC ("WS.WS.SPARQL_QUERY_POST", proc27);
-  DEFINE_PROC ("WS.WS.SPARQL_QUERY_GET", proc28);
-  DEFINE_PROC ("WS.WS.LOCK", proc29);
-  DEFINE_PROC ("WS.WS.UNLOCK", proc30);
-  DEFINE_PROC ("WS.WS.OPLOCKTOKEN", proc31);
-  DEFINE_PROC ("WS.WS.PARENT_PATH", proc32);
-  DEFINE_PROC ("WS.WS.HREF_TO_ARRAY", proc33);
-  DEFINE_PROC ("WS.WS.HREF_TO_PATH_ARRAY", proc34);
-  DEFINE_PROC ("WS.WS.DSTIS", proc35);
-  DEFINE_PROC ("WS.WS.MOVE", proc36);
-  DEFINE_PROC ("WS.WS.COPY", proc37);
-  DEFINE_PROC ("WS.WS.COPY_OR_MOVE", proc38);
-  DEFINE_PROC ("WS.WS.ISLOCKED", proc39);
-  DEFINE_PROC ("WS.WS.CHECK_AUTH", proc40);
-  DEFINE_PROC ("WS.WS.GET_IF_AUTH", proc41);
-  DEFINE_PROC ("WS.WS.GET_DAV_AUTH", proc42);
-  DEFINE_PROC ("WS.WS.PERM_COMP", proc43);
-  DEFINE_PROC ("WS.WS.CHECKPERM", proc44);
-  DEFINE_PROC ("WS.WS.ISPUBLIC", proc45);
-  DEFINE_PROC ("WS.WS.DAV_VSP_DEF_REMOVE", proc46);
-  DEFINE_PROC ("DAV_PERMS_SET_CHAR", proc47);
-  DEFINE_PROC ("DAV_PERMS_FIX", proc48);
-  DEFINE_PROC ("DAV_PERMS_INHERIT", proc49);
+  DEFINE_PROC ("WS.WS.CALENDAR_NAMES", proc5);
+  DEFINE_PROC ("WS.WS.ADDRESSBOOK_NAMES", proc6);
+  DEFINE_PROC ("WS.WS.REPORT", proc7);
+  DEFINE_PROC ("WS.WS.REPORT_RESPONSE", proc8);
+  DEFINE_PROC ("WS.WS.CUSTOM_PROP", proc9);
+  DEFINE_PROC ("WS.WS.PROPPATCH", proc10);
+  DEFINE_PROC ("WS.WS.FINDPARAM", proc11);
+  DEFINE_PROC ("WS.WS.MKCOL", proc12);
+  DEFINE_PROC ("WS.WS.FINDCOL", proc13);
+  DEFINE_PROC ("WS.WS.FINDRES", proc14);
+  DEFINE_PROC ("WS.WS.DELCHILDREN", proc15);
+  DEFINE_PROC ("WS.WS.DELETE", proc16);
+  DEFINE_PROC ("WS.WS.ISCOL", proc17);
+  DEFINE_PROC ("WS.WS.ISRES", proc18);
+  DEFINE_PROC ("WS.WS.ETAG", proc19);
+  DEFINE_PROC ("WS.WS.HEAD", proc20);
+  DEFINE_PROC ("DAV_SET_HTTP_REQUEST_STATUS", proc21);
+  DEFINE_PROC ("WS.WS.PUT", proc22);
+  DEFINE_PROC ("WS.WS.HEX_TO_DEC", proc23);
+  DEFINE_PROC ("WS.WS.STR_TO_URI", proc24);
+  DEFINE_PROC ("WS.WS.PATHREF", proc25);
+  DEFINE_PROC ("WS.WS.IS_ACTIVE_CONTENT", proc26);
+  DEFINE_PROC ("WS.WS.GET_DAV_DEFAULT_PAGE", proc27);
+  DEFINE_PROC ("WS.WS.GET_DAV_CHUNKED_QUOTA", proc28);
+  DEFINE_PROC ("WS.WS.GET", proc29);
+  DEFINE_PROC ("WS.WS.POST", proc30);
+  DEFINE_PROC ("WS.WS.SPARQL_QUERY_POST", proc31);
+  DEFINE_PROC ("WS.WS.SPARQL_QUERY_GET", proc32);
+  DEFINE_PROC ("WS.WS.LOCK", proc33);
+  DEFINE_PROC ("WS.WS.UNLOCK", proc34);
+  DEFINE_PROC ("WS.WS.OPLOCKTOKEN", proc35);
+  DEFINE_PROC ("WS.WS.PARENT_PATH", proc36);
+  DEFINE_PROC ("WS.WS.HREF_TO_ARRAY", proc37);
+  DEFINE_PROC ("WS.WS.HREF_TO_PATH_ARRAY", proc38);
+  DEFINE_PROC ("WS.WS.DSTIS", proc39);
+  DEFINE_PROC ("WS.WS.MOVE", proc40);
+  DEFINE_PROC ("WS.WS.COPY", proc41);
+  DEFINE_PROC ("WS.WS.COPY_OR_MOVE", proc42);
+  DEFINE_PROC ("WS.WS.ISLOCKED", proc43);
+  DEFINE_PROC ("WS.WS.CHECK_AUTH", proc44);
+  DEFINE_PROC ("WS.WS.GET_IF_AUTH", proc45);
+  DEFINE_PROC ("WS.WS.GET_DAV_AUTH", proc46);
+  DEFINE_PROC ("WS.WS.PERM_COMP", proc47);
+  DEFINE_PROC ("WS.WS.CHECKPERM", proc48);
+  DEFINE_PROC ("WS.WS.ISPUBLIC", proc49);
+  DEFINE_PROC ("WS.WS.DAV_VSP_DEF_REMOVE", proc50);
+  DEFINE_PROC ("DAV_PERMS_SET_CHAR", proc51);
+  DEFINE_PROC ("DAV_PERMS_FIX", proc52);
+  DEFINE_PROC ("DAV_PERMS_INHERIT", proc53);
   ddl_std_proc (trig0, 0x0);
   ddl_std_proc (trig1, 0x0);
   ddl_std_proc (trig2, 0x0);
   ddl_std_proc (trig3, 0x0);
-  DEFINE_PROC ("WS.WS.UPDCHILD", proc50);
+  DEFINE_PROC ("WS.WS.UPDCHILD", proc54);
   ddl_std_proc (trig4, 0x0);
-  DEFINE_PROC ("WS.WS.DAV_VSP_INCLUDES_CHANGED", proc51);
-  DEFINE_PROC ("WS.WS.EXPAND_INCLUDES", proc52);
+  DEFINE_PROC ("WS.WS.DAV_VSP_INCLUDES_CHANGED", proc55);
+  DEFINE_PROC ("WS.WS.EXPAND_INCLUDES", proc56);
   ddl_std_proc (trig5, 0x0);
   ddl_std_proc (trig6, 0x0);
-  DEFINE_PROC ("WS.WS.XML_VIEW_HEADER", proc53);
-  DEFINE_PROC ("WS.WS.XML_VIEW_EXTERNAL_META", proc54);
-  DEFINE_PROC ("WS.WS.XML_VIEW_UPDATE", proc55);
-  DEFINE_PROC ("WS.WS.FIXPATH", proc56);
-  DEFINE_PROC ("WS.WS.ISPUBL", proc57);
-  DEFINE_PROC ("WS.WS.BODY_ARR", proc58);
-  DEFINE_PROC ("WS.WS.XML_AUTO_SCHED", proc59);
-  DEFINE_PROC ("WS.WS.DAV_LOGIN", proc60);
-  DEFINE_PROC ("WS.WS.HTTP_RESP", proc61);
-  DEFINE_PROC ("WS.WS.COPY_TO_OTHER", proc62);
-  DEFINE_PROC ("WS.WS.CHECK_READ_ACCESS", proc63);
-  DEFINE_PROC ("WS.WS.IS_REDIRECT_REF", proc64);
-  DEFINE_PROC ("WS.WS.DAV_DIR_LIST", proc65);
-  DEFINE_PROC ("WS.WS.DAV_CHECK_ASMX", proc66);
-  DEFINE_PROC ("WS.WS.DAV_REMOVE_ASMX", proc67);
-  DEFINE_PROC ("WS.WS.XMLSQL_TO_STRSES", proc68);
-  DEFINE_PROC ("WS.WS.TRACE", proc69);
+  DEFINE_PROC ("WS.WS.XML_VIEW_HEADER", proc57);
+  DEFINE_PROC ("WS.WS.XML_VIEW_EXTERNAL_META", proc58);
+  DEFINE_PROC ("WS.WS.XML_VIEW_UPDATE", proc59);
+  DEFINE_PROC ("WS.WS.FIXPATH", proc60);
+  DEFINE_PROC ("WS.WS.ISPUBL", proc61);
+  DEFINE_PROC ("WS.WS.BODY_ARR", proc62);
+  DEFINE_PROC ("WS.WS.XML_AUTO_SCHED", proc63);
+  DEFINE_PROC ("WS.WS.DAV_LOGIN", proc64);
+  DEFINE_PROC ("WS.WS.HTTP_RESP", proc65);
+  DEFINE_PROC ("WS.WS.COPY_TO_OTHER", proc66);
+  DEFINE_PROC ("WS.WS.CHECK_READ_ACCESS", proc67);
+  DEFINE_PROC ("WS.WS.IS_REDIRECT_REF", proc68);
+  DEFINE_PROC ("WS.WS.DAV_DIR_LIST", proc69);
+  DEFINE_PROC ("WS.WS.DAV_CHECK_ASMX", proc70);
+  DEFINE_PROC ("WS.WS.DAV_REMOVE_ASMX", proc71);
+  DEFINE_PROC ("WS.WS.XMLSQL_TO_STRSES", proc72);
+  DEFINE_PROC ("WS.WS.TRACE", proc73);
 
   /* dav_api.sql */
 
-  DEFINE_PROC ("DAV_PERROR", proc70);
-  DEFINE_PROC ("DAV_ADD_USER_INT", proc71); 
-  DEFINE_PUBLIC_PROC ("DAV_ADD_USER", proc72); 
-  DEFINE_PUBLIC_PROC ("DAV_DELETE_USER", proc73); 
-  DEFINE_PUBLIC_PROC ("DAV_REGEXP_PATTERN_FOR_PERM", proc74);
-  DEFINE_PROC ("DAV_REGEXP_PATTERN_FOR_UNIX_PERM", proc75); 
-  DEFINE_PUBLIC_PROC ("DAV_PERM_D2U", proc76); 
-  DEFINE_PUBLIC_PROC ("DAV_PERM_U2D", proc77);
-  DEFINE_PROC ("DAV_CHECK_AUTH", proc78); 
-  DEFINE_PUBLIC_PROC ("DAV_HOME_DIR", proc79);
-  DEFINE_PROC ("DAV_HOME_DIR_CREATE", proc80);
-  DEFINE_PROC ("DAV_ADD_GROUP_INT", proc81); 
-  DEFINE_PUBLIC_PROC ("DAV_ADD_GROUP", proc82); 
-  DEFINE_PUBLIC_PROC ("DAV_DELETE_GROUP", proc83); 
-  DEFINE_PUBLIC_PROC ("DAV_DIR_LIST", proc84); 
-  DEFINE_PUBLIC_PROC ("DAV_DIR_FILTER", proc85);
-  DEFINE_PROC ("DAV_GET_PARENT", proc86);
-  DEFINE_PROC ("DAV_DIR_SINGLE_INT", proc87);
-  DEFINE_PROC ("DAV_DIR_LIST_INT", proc88);
-  DEFINE_PROC ("DAV_DIR_FILTER_INT", proc89); 
-  DEFINE_PUBLIC_PROC ("DAV_SEARCH_PATH", proc90); 
-  DEFINE_PUBLIC_PROC ("DAV_SEARCH_ID", proc91); 
-  DEFINE_PUBLIC_PROC ("DAV_SEARCH_SOME_ID", proc92); 
-  DEFINE_PUBLIC_PROC ("DAV_HIDE_ERROR", proc93); 
-  DEFINE_PUBLIC_PROC ("DAV_HIDE_ERROR_OR_DET", proc94); 
-  DEFINE_PUBLIC_PROC ("DAV_CONCAT_PATH", proc95);
-  DEFINE_PROC ("DAV_SEARCH_SOME_ID_OR_DET", proc96);
-  DEFINE_PROC ("DAV_SEARCH_ID_OR_DET", proc97);
-  DEFINE_PROC ("DAV_OWNER_ID", proc98);
-  DEFINE_PROC ("DAV_IS_LOCKED_INT", proc99); 
-  DEFINE_PUBLIC_PROC ("DAV_IS_LOCKED", proc100); 
-  DEFINE_PUBLIC_PROC ("DAV_LIST_LOCKS", proc101);
-  DEFINE_PROC ("DAV_LIST_LOCKS_INT", proc102);
-  DEFINE_PROC ("DAV_LOCK", proc103);
-  DEFINE_PROC ("DAV_LOCK_INT", proc104);
-  DEFINE_PROC ("DAV_UNLOCK", proc105);
-  DEFINE_PROC ("DAV_UNLOCK_INT", proc106); 
-  DEFINE_PUBLIC_PROC ("DAV_REQ_CHARS_TO_BITMASK", proc107); 
-  DEFINE_PUBLIC_PROC ("DAV_AUTHENTICATE", proc108);
-  DEFINE_PROC ("DAV_AUTHENTICATE_HTTP", proc109);
-  DEFINE_PROC ("DAV_AUTHENTICATE_SSL_ITEM", proc110);
-  DEFINE_PROC ("DAV_AUTHENTICATE_SSL_CONDITION", proc111);
-  DEFINE_PROC ("DAV_AUTHENTICATE_SSL_WEBID", proc112);
-  DEFINE_PROC ("DAV_AUTHENTICATE_SSL", proc113); 
-  DEFINE_PUBLIC_PROC ("DAV_COL_CREATE", proc114);
-  DEFINE_PROC ("DAV_COL_CREATE_INT", proc115);
-  DEFINE_PROC ("DB.DBA.IS_REDIRECT_REF", proc116); 
-  DEFINE_PUBLIC_PROC ("DAV_RES_UPLOAD", proc117); 
-  DEFINE_PUBLIC_PROC ("DAV_RES_UPLOAD_STRSES", proc118);
-  DEFINE_PROC ("DAV_RES_UPLOAD_STRSES_INT", proc119);
-  DEFINE_PROC ("DAV_RES_UPLOAD_STRSES_INT_INNER", proc120);
-  DEFINE_PROC ("RDF_SINK_UPLOAD", proc121);
-  DEFINE_PROC ("RDF_SINK_DELETE", proc122); 
-  DEFINE_PUBLIC_PROC ("DAV_DELETE", proc123);
-  DEFINE_PROC ("DAV_DELETE_INT", proc124);
-  DEFINE_PROC ("DAV_TAG_LIST", proc125);
-  DEFINE_PROC ("DAV_TAG_SET", proc126); 
-  DEFINE_PUBLIC_PROC ("DAV_COPY", proc127);
-  DEFINE_PROC ("DAV_COPY_INT", proc128);
-  DEFINE_PROC ("DAV_COPY_SUBTREE", proc129); 
-  DEFINE_PUBLIC_PROC ("DAV_MOVE", proc130);
-  DEFINE_PROC ("DAV_MOVE_INT", proc131);
-  DEFINE_PROC ("DAV_GET_OWNER", proc132);
-  DEFINE_PROC ("DAV_PREPARE_PROP_WRITE", proc133); 
-  DEFINE_PUBLIC_PROC ("DAV_PROP_SET", proc134);
-  DEFINE_PROC ("DAV_PROP_SET_INT", proc135);
-  DEFINE_PROC ("DAV_PROP_SET_RAW", proc136);
-  DEFINE_PROC ("DAV_PROP_SET_RAW_INNER", proc137); 
-  DEFINE_PUBLIC_PROC ("DAV_PROP_REMOVE", proc138);
-  DEFINE_PROC ("DAV_PROP_REMOVE_INT", proc139);
-  DEFINE_PROC ("DAV_PROP_REMOVE_RAW", proc140); 
-  DEFINE_PUBLIC_PROC ("DAV_PROP_GET", proc141);
-  DEFINE_PROC ("DAV_PROP_GET_INT", proc142); 
-  DEFINE_PUBLIC_PROC ("DAV_PROP_LIST", proc143);
-  DEFINE_PROC ("DAV_PROP_LIST_INT", proc144);
-  DEFINE_PROC ("DAV_MAKE_DIR", proc145);
-  DEFINE_PROC ("DAV_CHECK_PERM", proc146); 
-  DEFINE_PUBLIC_PROC ("DAV_CHECK_USER", proc147); 
-  DEFINE_PUBLIC_PROC ("DAV_RES_CONTENT", proc148); 
-  DEFINE_PUBLIC_PROC ("DAV_RES_CONTENT_STRSES", proc149);
-  DEFINE_PROC ("DAV_RES_CONTENT_INT", proc150);
-  DEFINE_PROC ("DAV_COL_IS_ANCESTOR_OF", proc151);
-  DEFINE_PROC ("DAV_COL_PATH_BOUNDARY", proc152);
+  DEFINE_PROC ("DAV_PERROR", proc74);
+  DEFINE_PROC ("DAV_ADD_USER_INT", proc75); 
+  DEFINE_PUBLIC_PROC ("DAV_ADD_USER", proc76); 
+  DEFINE_PUBLIC_PROC ("DAV_DELETE_USER", proc77); 
+  DEFINE_PUBLIC_PROC ("DAV_REGEXP_PATTERN_FOR_PERM", proc78);
+  DEFINE_PROC ("DAV_REGEXP_PATTERN_FOR_UNIX_PERM", proc79); 
+  DEFINE_PUBLIC_PROC ("DAV_PERM_D2U", proc80); 
+  DEFINE_PUBLIC_PROC ("DAV_PERM_U2D", proc81);
+  DEFINE_PROC ("DAV_CHECK_AUTH", proc82); 
+  DEFINE_PUBLIC_PROC ("DAV_HOME_DIR", proc83);
+  DEFINE_PROC ("DAV_HOME_DIR_CREATE", proc84);
+  DEFINE_PROC ("DAV_ADD_GROUP_INT", proc85); 
+  DEFINE_PUBLIC_PROC ("DAV_ADD_GROUP", proc86); 
+  DEFINE_PUBLIC_PROC ("DAV_DELETE_GROUP", proc87); 
+  DEFINE_PUBLIC_PROC ("DAV_DIR_LIST", proc88); 
+  DEFINE_PUBLIC_PROC ("DAV_DIR_FILTER", proc89);
+  DEFINE_PROC ("DAV_GET_PARENT", proc90);
+  DEFINE_PROC ("DAV_DIR_SINGLE_INT", proc91);
+  DEFINE_PROC ("DAV_DIR_LIST_INT", proc92);
+  DEFINE_PROC ("DAV_DIR_FILTER_INT", proc93); 
+  DEFINE_PUBLIC_PROC ("DAV_SEARCH_PATH", proc94); 
+  DEFINE_PUBLIC_PROC ("DAV_SEARCH_ID", proc95); 
+  DEFINE_PUBLIC_PROC ("DAV_SEARCH_SOME_ID", proc96); 
+  DEFINE_PUBLIC_PROC ("DAV_HIDE_ERROR", proc97); 
+  DEFINE_PUBLIC_PROC ("DAV_HIDE_ERROR_OR_DET", proc98); 
+  DEFINE_PUBLIC_PROC ("DAV_CONCAT_PATH", proc99);
+  DEFINE_PROC ("DAV_SEARCH_SOME_ID_OR_DET", proc100);
+  DEFINE_PROC ("DAV_SEARCH_ID_OR_DET", proc101);
+  DEFINE_PROC ("DAV_OWNER_ID", proc102);
+  DEFINE_PROC ("DAV_IS_LOCKED_INT", proc103); 
+  DEFINE_PUBLIC_PROC ("DAV_IS_LOCKED", proc104); 
+  DEFINE_PUBLIC_PROC ("DAV_LIST_LOCKS", proc105);
+  DEFINE_PROC ("DAV_LIST_LOCKS_INT", proc106);
+  DEFINE_PROC ("DAV_LOCK", proc107);
+  DEFINE_PROC ("DAV_LOCK_INT", proc108);
+  DEFINE_PROC ("DAV_UNLOCK", proc109);
+  DEFINE_PROC ("DAV_UNLOCK_INT", proc110); 
+  DEFINE_PUBLIC_PROC ("DAV_REQ_CHARS_TO_BITMASK", proc111); 
+  DEFINE_PUBLIC_PROC ("DAV_AUTHENTICATE", proc112);
+  DEFINE_PROC ("DAV_AUTHENTICATE_HTTP", proc113);
+  DEFINE_PROC ("DAV_AUTHENTICATE_SSL_ITEM", proc114);
+  DEFINE_PROC ("DAV_AUTHENTICATE_SSL_CONDITION", proc115);
+  DEFINE_PROC ("DAV_WEBID_QR", proc116);
+  DEFINE_PROC ("DAV_AUTHENTICATE_SSL_WEBID", proc117);
+  DEFINE_PROC ("DAV_AUTHENTICATE_SSL", proc118); 
+  DEFINE_PUBLIC_PROC ("DAV_COL_CREATE", proc119);
+  DEFINE_PROC ("DAV_COL_CREATE_INT", proc120);
+  DEFINE_PROC ("DB.DBA.IS_REDIRECT_REF", proc121); 
+  DEFINE_PUBLIC_PROC ("DAV_RES_UPLOAD", proc122); 
+  DEFINE_PUBLIC_PROC ("DAV_RES_UPLOAD_STRSES", proc123);
+  DEFINE_PROC ("DAV_RES_UPLOAD_STRSES_INT", proc124);
+  ddl_ensure_table ("DB.DBA.RDF_SINK_QUEUE", tbl0);
+  DEFINE_PROC ("DAV_RES_UPLOAD_STRSES_INT_INNER", proc125);
+  DEFINE_PROC ("RDF_SINK_AQ_GET", proc126);
+  DEFINE_PROC ("DB.DBA.RDF_SINK_AQ_RUN", proc127);
+  DEFINE_PROC ("DAV_RDF_RES_NAME", proc128);
+  DEFINE_PROC ("RDF_SINK_FUNC", proc129);
+  DEFINE_PROC ("RDF_SINK_UPLOAD", proc130);
+  DEFINE_PROC ("RDF_SINK_UPLOAD_CARTRIDGES", proc131);
+  DEFINE_PROC ("RDF_SINK_DELETE", proc132); 
+  DEFINE_PUBLIC_PROC ("DAV_DELETE", proc133);
+  DEFINE_PROC ("DAV_DELETE_INT", proc134);
+  DEFINE_PROC ("DAV_TAG_LIST", proc135);
+  DEFINE_PROC ("DAV_TAG_SET", proc136); 
+  DEFINE_PUBLIC_PROC ("DAV_COPY", proc137);
+  DEFINE_PROC ("DAV_COPY_INT", proc138);
+  DEFINE_PROC ("DAV_COPY_SUBTREE", proc139); 
+  DEFINE_PUBLIC_PROC ("DAV_MOVE", proc140);
+  DEFINE_PROC ("DAV_MOVE_INT", proc141);
+  DEFINE_PROC ("DAV_GET_OWNER", proc142);
+  DEFINE_PROC ("DAV_PREPARE_PROP_WRITE", proc143); 
+  DEFINE_PUBLIC_PROC ("DAV_PROP_SET", proc144);
+  DEFINE_PROC ("DAV_PROP_SET_INT", proc145);
+  DEFINE_PROC ("DAV_PROP_SET_RAW", proc146);
+  DEFINE_PROC ("DAV_PROP_SET_RAW_INNER", proc147); 
+  DEFINE_PUBLIC_PROC ("DAV_PROP_REMOVE", proc148);
+  DEFINE_PROC ("DAV_PROP_REMOVE_INT", proc149);
+  DEFINE_PROC ("DAV_PROP_REMOVE_RAW", proc150); 
+  DEFINE_PUBLIC_PROC ("DAV_PROP_GET", proc151);
+  DEFINE_PROC ("DAV_PROP_GET_INT", proc152); 
+  DEFINE_PUBLIC_PROC ("DAV_PROP_LIST", proc153);
+  DEFINE_PROC ("DAV_PROP_LIST_INT", proc154);
+  DEFINE_PROC ("DAV_MAKE_DIR", proc155);
+  DEFINE_PROC ("DAV_CHECK_PERM", proc156); 
+  DEFINE_PUBLIC_PROC ("DAV_CHECK_USER", proc157); 
+  DEFINE_PUBLIC_PROC ("DAV_RES_CONTENT", proc158); 
+  DEFINE_PUBLIC_PROC ("DAV_RES_CONTENT_STRSES", proc159);
+  DEFINE_PROC ("DAV_RES_CONTENT_INT", proc160);
+  DEFINE_PROC ("DAV_COL_IS_ANCESTOR_OF", proc161);
+  DEFINE_PROC ("DAV_COL_PATH_BOUNDARY", proc162);
   ddl_std_proc (trig7, 0x0);
   ddl_std_proc (trig8, 0x0);
   ddl_std_proc (trig9, 0x0);
@@ -28998,189 +29794,190 @@ sqls_define_dav (void)
   ddl_std_proc (trig11, 0x0);
   ddl_std_proc (trig12, 0x0);
   ddl_std_proc (trig13, 0x0);
-  DEFINE_PROC ("WS.WS.WAC_INSERT", proc153);
-  DEFINE_PROC ("WS.WS.WAC_DELETE", proc154);
-  DEFINE_PROC ("WS.WS.DAV_IRI", proc155);
+  DEFINE_PROC ("WS.WS.WAC_INSERT", proc163);
+  DEFINE_PROC ("WS.WS.WAC_DELETE", proc164);
+  DEFINE_PROC ("WS.WS.DAV_IRI", proc165);
   ddl_std_proc (trig14, 0x0);
-  DEFINE_PROC ("WS.WS.ACL_CONTAINS_GRANTEE_AND_FLAG", proc156);
+  DEFINE_PROC ("WS.WS.ACL_CONTAINS_GRANTEE_AND_FLAG", proc166);
   ddl_std_proc (trig15, 0x0);
   ddl_std_proc (trig16, 0x0);
   ddl_std_proc (trig17, 0x0);
   ddl_std_proc (trig18, 0x0);
   ddl_std_proc (trig19, 0x0);
-  DEFINE_PROC ("WS.WS.ACL_UPDATE", proc157);
-  DEFINE_PROC ("WS.WS.ACL_MAKE_INHERITED", proc158);
-  DEFINE_PROC ("WS.WS.ACL_DBG", proc159);
-  DEFINE_PROC ("WS.WS.ACL_SERIALIZE_INT", proc160);
-  DEFINE_PROC ("WS.WS.ACL_DESERIALIZE_INT", proc161);
-  DEFINE_PROC ("WS.WS.ACL_GET_ACLLENGTH", proc162);
-  DEFINE_PROC ("WS.WS.ACL_GET_ACESIZE", proc163);
-  DEFINE_PROC ("WS.WS.ACL_CREATE", proc164);
-  DEFINE_PROC ("WS.WS.ACL_IS_VALID", proc165);
-  DEFINE_PROC ("WS.WS.ACL_ADD_ENTRY", proc166);
-  DEFINE_PROC ("WS.WS.ACL_REMOVE_ENTRY", proc167);
-  DEFINE_PROC ("WS.WS.ACL_IS_GRANTED", proc168);
-  DEFINE_PROC ("WS.WS.ACL_SET_OWNER", proc169);
-  DEFINE_PROC ("WS.WS.ACL_OWNER", proc170);
-  DEFINE_PROC ("WS.WS.ACL_PARSE", proc171);
-  DEFINE_PROC ("WS.WS.ACL_COMPOSE", proc172);
-  DEFINE_PROC ("DAV_CAST_STRING_TO_INTEGER", proc173);
-  DEFINE_PROC ("DAV_CAST_STRING_TO_DATETIME", proc174);
-  DEFINE_PROC ("DAV_CAST_TEXT_TO_VARCHAR", proc175);
-  DEFINE_PROC ("DAV_CAST_TEXT_TO_INTEGER", proc176);
-  DEFINE_PROC ("DAV_CAST_TEXT_TO_DATETIME", proc177);
-  DEFINE_PROC ("DAV_FC_CONST_AS_SQL", proc178);
-  DEFINE_PROC ("DAV_FC_PRED_METAS", proc179);
-  DEFINE_PROC ("DAV_FC_CMP_METAS", proc180);
-  DEFINE_PROC ("DAV_FC_TABLE_METAS", proc181);
-  DEFINE_PROC ("DAV_FC_PRINT_COMPARISON", proc182);
-  DEFINE_PROC ("DAV_FC_PRINT_WHERE", proc183);
-  DEFINE_PROC ("DAV_FC_PRINT_WHERE_INT", proc184);
-  DEFINE_PROC ("DAV_REGISTER_RDF_SCHEMA", proc185); 
-  DEFINE_PUBLIC_PROC ("DAV_RDF_SCHEMA_N3_LIST_PROPERTIES", proc186);
-  DEFINE_PROC ("DAV_CROP_URI_TO_CATNAME", proc187); 
-  DEFINE_PUBLIC_PROC ("DAV_GET_RDF_SCHEMA_N3", proc188);
-  DEFINE_PROC ("DAV_DEPRECATE_RDF_SCHEMA", proc189);
-  DEFINE_PROC ("DAV_REGISTER_MIME_TYPE", proc190);
-  DEFINE_PROC ("DAV_REGISTER_MIME_RDF", proc191);
-  DEFINE_PROC ("DAV_DEPRECATE_MIME_RDF", proc192); 
-  DEFINE_PUBLIC_PROC ("DAV_RDF_PROP_SET", proc193); 
-  DEFINE_PUBLIC_PROC ("DAV_RDF_PROP_GET", proc194);
-  DEFINE_PROC ("DAV_RDF_PREPROCESS_RDFXML_SUB", proc195);
-  DEFINE_PROC ("DAV_RDF_PREPROCESS_RDFXML", proc196);
-  DEFINE_PROC ("DAV_RDF_PROP_SET_INT", proc197);
-  DEFINE_PROC ("DAV_RDF_PROP_GET_INT", proc198);
-  DEFINE_PROC ("DAV_RDF_MERGE", proc199);
-  DEFINE_PROC ("DAV_RDF_SUBTRACT", proc200);
+  DEFINE_PROC ("WS.WS.ACL_UPDATE", proc167);
+  DEFINE_PROC ("WS.WS.ACL_MAKE_INHERITED", proc168);
+  DEFINE_PROC ("WS.WS.ACL_DBG", proc169);
+  DEFINE_PROC ("WS.WS.ACL_SERIALIZE_INT", proc170);
+  DEFINE_PROC ("WS.WS.ACL_DESERIALIZE_INT", proc171);
+  DEFINE_PROC ("WS.WS.ACL_GET_ACLLENGTH", proc172);
+  DEFINE_PROC ("WS.WS.ACL_GET_ACESIZE", proc173);
+  DEFINE_PROC ("WS.WS.ACL_CREATE", proc174);
+  DEFINE_PROC ("WS.WS.ACL_IS_VALID", proc175);
+  DEFINE_PROC ("WS.WS.ACL_ADD_ENTRY", proc176);
+  DEFINE_PROC ("WS.WS.ACL_REMOVE_ENTRY", proc177);
+  DEFINE_PROC ("WS.WS.ACL_IS_GRANTED", proc178);
+  DEFINE_PROC ("WS.WS.ACL_SET_OWNER", proc179);
+  DEFINE_PROC ("WS.WS.ACL_OWNER", proc180);
+  DEFINE_PROC ("WS.WS.ACL_PARSE", proc181);
+  DEFINE_PROC ("WS.WS.ACL_COMPOSE", proc182);
+  DEFINE_PROC ("DAV_CAST_STRING_TO_INTEGER", proc183);
+  DEFINE_PROC ("DAV_CAST_STRING_TO_DATETIME", proc184);
+  DEFINE_PROC ("DAV_CAST_TEXT_TO_VARCHAR", proc185);
+  DEFINE_PROC ("DAV_CAST_TEXT_TO_INTEGER", proc186);
+  DEFINE_PROC ("DAV_CAST_TEXT_TO_DATETIME", proc187);
+  DEFINE_PROC ("DAV_FC_CONST_AS_SQL", proc188);
+  DEFINE_PROC ("DAV_FC_PRED_METAS", proc189);
+  DEFINE_PROC ("DAV_FC_CMP_METAS", proc190);
+  DEFINE_PROC ("DAV_FC_TABLE_METAS", proc191);
+  DEFINE_PROC ("DAV_FC_PRINT_COMPARISON", proc192);
+  DEFINE_PROC ("DAV_FC_PRINT_WHERE", proc193);
+  DEFINE_PROC ("DAV_FC_PRINT_WHERE_INT", proc194);
+  DEFINE_PROC ("DAV_REGISTER_RDF_SCHEMA", proc195); 
+  DEFINE_PUBLIC_PROC ("DAV_RDF_SCHEMA_N3_LIST_PROPERTIES", proc196);
+  DEFINE_PROC ("DAV_CROP_URI_TO_CATNAME", proc197); 
+  DEFINE_PUBLIC_PROC ("DAV_GET_RDF_SCHEMA_N3", proc198);
+  DEFINE_PROC ("DAV_DEPRECATE_RDF_SCHEMA", proc199);
+  DEFINE_PROC ("DAV_REGISTER_MIME_TYPE", proc200);
+  DEFINE_PROC ("DAV_REGISTER_MIME_RDF", proc201);
+  DEFINE_PROC ("DAV_DEPRECATE_MIME_RDF", proc202); 
+  DEFINE_PUBLIC_PROC ("DAV_RDF_PROP_SET", proc203); 
+  DEFINE_PUBLIC_PROC ("DAV_RDF_PROP_GET", proc204);
+  DEFINE_PROC ("DAV_RDF_PREPROCESS_RDFXML_SUB", proc205);
+  DEFINE_PROC ("DAV_RDF_PREPROCESS_RDFXML", proc206);
+  DEFINE_PROC ("DAV_RDF_PROP_SET_INT", proc207);
+  DEFINE_PROC ("DAV_RDF_PROP_GET_INT", proc208);
+  DEFINE_PROC ("DAV_RDF_MERGE", proc209);
+  DEFINE_PROC ("DAV_RDF_SUBTRACT", proc210);
   ddl_std_proc (trig20, 0x0);
   ddl_std_proc (trig21, 0x0);
   ddl_std_proc (trig22, 0x0);
-  DEFINE_PROC ("DAV_EXTRACT_AND_SAVE_RDF", proc201);
-  DEFINE_PROC ("DAV_GET_RES_TYPE_URI_BY_MIME_TYPE", proc202);
-  DEFINE_PROC ("DAV_EXTRACT_AND_SAVE_RDF_INT", proc203);
-  DEFINE_PROC ("DAV_HOME_DIR_UPDATE", proc204);
+  DEFINE_PROC ("DAV_EXTRACT_AND_SAVE_RDF", proc211);
+  DEFINE_PROC ("DAV_GET_RES_TYPE_URI_BY_MIME_TYPE", proc212);
+  DEFINE_PROC ("DAV_EXTRACT_AND_SAVE_RDF_INT", proc213);
+  DEFINE_PROC ("DAV_EXTRACT_AND_SAVE_RDF_INT2", proc214);
+  DEFINE_PROC ("DAV_HOME_DIR_UPDATE", proc215);
 
   /* dav_meta.sql */
 
-  DEFINE_PROC ("DAV_GUESS_MIME_TYPE_BY_NAME", proc205);
-  DEFINE_PROC ("DAV_GUESS_MIME_TYPE", proc206);
-  DEFINE_PROC ("file_space_fmt", proc207);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlink-license", proc208);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_opendocument", proc209);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.text", proc210);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.database", proc211);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.graphics", proc212);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.presentation", proc213);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.spreadsheet", proc214);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.chart", proc215);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.formula", proc216);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.image", proc217);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlink-image", proc218);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlink-photo", proc219);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/audio", proc220);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/mpeg", proc221);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-flac", proc222);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-mp3", proc223);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-m4a", proc224);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-m4p", proc225);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/ogg", proc226);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msoffice+xml", proc227);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msexcel", proc228);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msaccess", proc229);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msproject", proc230);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/mspowerpoint", proc231);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msword", proc232);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/pdf", proc233);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/xbrl+xml", proc234);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/doap+rdf", proc235);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/xddl+xml", proc236);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/archive", proc237);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/tar", proc238);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/taz", proc239);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/gz", proc240);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msi", proc241);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/dmg", proc242);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/arj", proc243);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/bz", proc244);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/bz2", proc245);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/tgz", proc246);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/rar", proc247);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/zip", proc248);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/cab", proc249);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/lzh", proc250);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/ace", proc251);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/iso", proc252);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msword+xml", proc253);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msexcel+xml", proc254);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msproject+xml", proc255);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msvisio+xml", proc256);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/rss+xml", proc257);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/atom+xml", proc258);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_text/eml", proc259);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/xbel+xml", proc260);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/rdf+xml", proc261);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_text/rdf+ttl", proc262);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_text/rdf+n3", proc263);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/foaf+xml", proc264);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/mods+xml", proc265);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/opml+xml", proc266);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/ocs+xml", proc267);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_text/html", proc268);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlinksw-vsp", proc269);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlinksw-vspx+xml", proc270);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/bpel+xml", proc271);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/annotea+xml", proc272);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/google-kinds+xml", proc273);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/wsdl+xml", proc274);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/google-base+xml", proc275);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlinksw-vad", proc276);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_text/wiki", proc277);
-  DEFINE_PROC ("IMC_TO_XML", proc278);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_text/directory", proc279);
-  DEFINE_PROC ("DAV_EXTRACT_RDF_BY_METAS", proc280);
-  DEFINE_PROC ("DB.DBA.UNIX_DATETIME_PARSER", proc281);
+  DEFINE_PROC ("DAV_GUESS_MIME_TYPE_BY_NAME", proc216);
+  DEFINE_PROC ("DAV_GUESS_MIME_TYPE", proc217);
+  DEFINE_PROC ("file_space_fmt", proc218);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlink-license", proc219);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_opendocument", proc220);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.text", proc221);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.database", proc222);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.graphics", proc223);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.presentation", proc224);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.spreadsheet", proc225);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.chart", proc226);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.formula", proc227);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/vnd.oasis.opendocument.image", proc228);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlink-image", proc229);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlink-photo", proc230);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/audio", proc231);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/mpeg", proc232);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-flac", proc233);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-mp3", proc234);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-m4a", proc235);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_audio/x-m4p", proc236);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/ogg", proc237);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msoffice+xml", proc238);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msexcel", proc239);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msaccess", proc240);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msproject", proc241);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/mspowerpoint", proc242);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msword", proc243);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/pdf", proc244);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/xbrl+xml", proc245);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/doap+rdf", proc246);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/xddl+xml", proc247);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/archive", proc248);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/tar", proc249);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/taz", proc250);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/gz", proc251);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msi", proc252);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/dmg", proc253);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/arj", proc254);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/bz", proc255);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/bz2", proc256);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/tgz", proc257);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/rar", proc258);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/zip", proc259);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/cab", proc260);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/lzh", proc261);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/ace", proc262);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/iso", proc263);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msword+xml", proc264);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msexcel+xml", proc265);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msproject+xml", proc266);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/msvisio+xml", proc267);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/rss+xml", proc268);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/atom+xml", proc269);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_text/eml", proc270);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/xbel+xml", proc271);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/rdf+xml", proc272);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_text/rdf+ttl", proc273);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_text/rdf+n3", proc274);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/foaf+xml", proc275);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/mods+xml", proc276);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/opml+xml", proc277);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/ocs+xml", proc278);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_text/html", proc279);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlinksw-vsp", proc280);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlinksw-vspx+xml", proc281);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/bpel+xml", proc282);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/annotea+xml", proc283);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/google-kinds+xml", proc284);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/wsdl+xml", proc285);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/google-base+xml", proc286);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_application/x-openlinksw-vad", proc287);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_text/wiki", proc288);
+  DEFINE_PROC ("IMC_TO_XML", proc289);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_text/directory", proc290);
+  DEFINE_PROC ("DAV_EXTRACT_RDF_BY_METAS", proc291);
+  DEFINE_PROC ("DB.DBA.UNIX_DATETIME_PARSER", proc292);
   ddl_ensure_table ("do this always", other1);
   ddl_ensure_table ("do this always", other2);
-  DEFINE_PROC ("DB.DBA.UNIX_DATE_PARSER", proc282);
+  DEFINE_PROC ("DB.DBA.UNIX_DATE_PARSER", proc293);
   ddl_ensure_table ("do this always", other3);
   ddl_ensure_table ("do this always", other4);
-  DEFINE_PROC ("DB.DBA.BPEL_SPLIT_LIST", proc283);
+  DEFINE_PROC ("DB.DBA.BPEL_SPLIT_LIST", proc294);
   ddl_ensure_table ("do this always", other5);
   ddl_ensure_table ("do this always", other6);
-  DEFINE_PROC ("DAV_EXTRACT_SPOTLIGHT", proc284);
-  DEFINE_PROC ("DAV_CONVERT_SPOTLIGHT_TO_VIRTUOSO", proc285);
-  DEFINE_PROC ("DAV_SPOTLIGHT_ADD", proc286); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.XML_UNIX_DATE_TO_ISO", proc287);
+  DEFINE_PROC ("DAV_EXTRACT_SPOTLIGHT", proc295);
+  DEFINE_PROC ("DAV_CONVERT_SPOTLIGHT_TO_VIRTUOSO", proc296);
+  DEFINE_PROC ("DAV_SPOTLIGHT_ADD", proc297); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.XML_UNIX_DATE_TO_ISO", proc298);
   ddl_ensure_table ("do this always", other7);
   ddl_ensure_table ("do this always", other8);
-  DEFINE_PROC ("DAV_EXTRACT_META_AS_RDF_XML", proc288);
+  DEFINE_PROC ("DAV_EXTRACT_META_AS_RDF_XML", proc299);
 
   /* dav_acct.sql */
 
-  DEFINE_PROC ("DAV_SPACE_QUOTA_PARENT", proc289);
-  DEFINE_PROC ("DAV_ADD_SPACE_QUOTA", proc290);
-  DEFINE_PROC ("DAV_DEL_SPACE_QUOTA", proc291);
-  DEFINE_PROC ("DAV_SPACE_QUOTA_YELLOW_TRACK", proc292);
-  DEFINE_PROC ("DAV_SPACE_QUOTA_SIGNAL", proc293);
-  DEFINE_PROC ("DAV_OWNER_DISABLED_SIGNAL", proc294);
-  DEFINE_PROC ("DAV_HOME_DISABLED_SIGNAL", proc295);
-  DEFINE_PROC ("DAV_SPACE_QUOTA_RES_INSERT", proc296);
-  DEFINE_PROC ("DAV_SPACE_QUOTA_RES_DELETE", proc297);
-  DEFINE_PROC ("DAV_SPACE_QUOTA_RES_UPDATE", proc298);
+  DEFINE_PROC ("DAV_SPACE_QUOTA_PARENT", proc300);
+  DEFINE_PROC ("DAV_ADD_SPACE_QUOTA", proc301);
+  DEFINE_PROC ("DAV_DEL_SPACE_QUOTA", proc302);
+  DEFINE_PROC ("DAV_SPACE_QUOTA_YELLOW_TRACK", proc303);
+  DEFINE_PROC ("DAV_SPACE_QUOTA_SIGNAL", proc304);
+  DEFINE_PROC ("DAV_OWNER_DISABLED_SIGNAL", proc305);
+  DEFINE_PROC ("DAV_HOME_DISABLED_SIGNAL", proc306);
+  DEFINE_PROC ("DAV_SPACE_QUOTA_RES_INSERT", proc307);
+  DEFINE_PROC ("DAV_SPACE_QUOTA_RES_DELETE", proc308);
+  DEFINE_PROC ("DAV_SPACE_QUOTA_RES_UPDATE", proc309);
 
   /* dav_rdf_quad.sql */
 
-  DEFINE_PROC ("DB.DBA.RDF_DELETE_ENTIRE_GRAPH", proc299);
-  DEFINE_PROC ("DB.DBA.DAV_FULL_PATH_TO_IRI", proc300);
-  DEFINE_PROC ("DB.DBA.DAV_AUTO_REPLICATE_TO_RDF_QUAD", proc301);
-  DEFINE_PROC ("DB.DBA.DAV_REPLICATE_ALL_TO_RDF_QUAD", proc302);
-  DEFINE_PROC ("DB.DBA.RDF_CBD_DELETE", proc303);
-  DEFINE_PROC ("DB.DBA.DAV_RDF_URI_RESOLVE", proc304);
-  DEFINE_PROC ("DB.DBA.DAV_RDF_REPLICATE_INT", proc305);
-  DEFINE_PROC ("DB.DBA.DAV_RDF_CBD_DELETE_PROP", proc306);
-  DEFINE_PROC ("DB.DBA.DAV_MAKE_USER_IRI", proc307);
-  DEFINE_PROC ("DB.DBA.DAV_REPLICATE_RES_TO_RDF_QUAD", proc308);
-  DEFINE_PROC ("DB.DBA.DAV_REPLICATE_COL_TO_RDF_QUAD", proc309);
+  DEFINE_PROC ("DB.DBA.RDF_DELETE_ENTIRE_GRAPH", proc310);
+  DEFINE_PROC ("DB.DBA.DAV_FULL_PATH_TO_IRI", proc311);
+  DEFINE_PROC ("DB.DBA.DAV_AUTO_REPLICATE_TO_RDF_QUAD", proc312);
+  DEFINE_PROC ("DB.DBA.DAV_REPLICATE_ALL_TO_RDF_QUAD", proc313);
+  DEFINE_PROC ("DB.DBA.RDF_CBD_DELETE", proc314);
+  DEFINE_PROC ("DB.DBA.DAV_RDF_URI_RESOLVE", proc315);
+  DEFINE_PROC ("DB.DBA.DAV_RDF_REPLICATE_INT", proc316);
+  DEFINE_PROC ("DB.DBA.DAV_RDF_CBD_DELETE_PROP", proc317);
+  DEFINE_PROC ("DB.DBA.DAV_MAKE_USER_IRI", proc318);
+  DEFINE_PROC ("DB.DBA.DAV_REPLICATE_RES_TO_RDF_QUAD", proc319);
+  DEFINE_PROC ("DB.DBA.DAV_REPLICATE_COL_TO_RDF_QUAD", proc320);
   ddl_std_proc (trig23, 0x0);
   ddl_std_proc (trig24, 0x0);
   ddl_std_proc (trig25, 0x0);
@@ -29191,57 +29988,58 @@ sqls_define_dav (void)
   ddl_std_proc (trig30, 0x0);
   ddl_std_proc (trig31, 0x0);
   ddl_std_proc (trig32, 0x0);
-  DEFINE_PROC ("DB.DBA.DAV_RDF_PROPAGATE_COL_PATH_CHANGE", proc310);
+  DEFINE_PROC ("DB.DBA.DAV_RDF_PROPAGATE_COL_PATH_CHANGE", proc321);
   ddl_std_proc (trig33, 0x0);
   ddl_std_proc (trig34, 0x0);
 
   /* vfs.sql */
   bootstrap_cli->cli_qualifier = box_string ("WS");
 
-  DEFINE_PROC ("WS.WS.COPY_PAGE", proc311);
-  DEFINE_PROC ("WS.WS.VFS_HTTP_RESP_CODE", proc312);
-  DEFINE_PROC ("WS.WS.VFS_ENSURE_NEW_SITE", proc313);
-  DEFINE_PROC ("WS.WS.COPY_PAGE_1", proc314);
-  DEFINE_PROC ("WS.WS.DELETE_LOCAL_COPY", proc315);
-  DEFINE_PROC ("WS.WS.VFS_RUN", proc316);
-  DEFINE_PROC ("WS.WS.VFS_STATUS_GET", proc317);
-  DEFINE_PROC ("WS.WS.VFS_STATUS_SET", proc318);
-  DEFINE_PROC ("WS.WS.SERV_QUEUE_TOP", proc319);
-  DEFINE_PROC ("WS.WS.SERV_QUEUE", proc320);
-  DEFINE_PROC ("ERR_MAIL_SEND", proc321);
-  DEFINE_PROC ("WS.WS.LOCAL_STORE", proc322);
-  DEFINE_PROC ("WS.WS.GET_URLS", proc323);
-  DEFINE_PROC ("WS.WS.SITEMAP_PROCESS", proc324);
-  DEFINE_PROC ("WS.WS.MAKE_URL", proc325);
-  DEFINE_PROC ("WS.WS.SPLIT_URL", proc326);
-  DEFINE_PROC ("WS.WS.EXPAND_URL_OLD", proc327);
-  DEFINE_PROC ("WS.WS.MKPATH", proc328);
-  DEFINE_PROC ("WS.WS.FOLLOW", proc329);
-  DEFINE_PROC ("WS.WS.REPLACE_HREF", proc330);
-  DEFINE_PROC ("WS.WS.FIND_URI", proc331);
-  DEFINE_PROC ("WS.WS.LFS_EXP", proc332);
-  DEFINE_PROC ("WS.WS.FIND_KEYWORD", proc333);
-  DEFINE_PROC ("WS.WS.GET_HREF_IN_ARRAY", proc334);
-  DEFINE_PROC ("WS.WS.DAV_EXP", proc335);
-  DEFINE_PROC ("WS.WS.DAV_HEAD", proc336);
-  DEFINE_PROC ("WS.WS.DAV_MKCOL", proc337);
-  DEFINE_PROC ("WS.WS.DAV_PUT", proc338);
-  DEFINE_PROC ("WS.WS.DAV_PROP", proc339);
-  DEFINE_PROC ("WS.WS.GET_HREF_FROM_XML", proc340);
-  DEFINE_PROC ("WS.WS.ISEMPTY", proc341);
-  DEFINE_PROC ("WS.WS.URL_BY_DATE", proc342);
-  DEFINE_PROC ("WS.WS.VFS_RECOVER_QUEUE_STAT", proc343);
-  DEFINE_PROC ("WS.WS.VFS_MAKE_ENTRY", proc344);
-  DEFINE_PROC ("WS.WS.VFS_GO", proc345);
-  DEFINE_PROC ("WS.WS.VFS_URI_COMPOSE", proc346);
-  DEFINE_PROC ("WS.WS.VFS_EXTRACT_RDF", proc347);
-  DEFINE_PROC ("WS.WS.SITEMAP_ENSURE_NEW_SITE", proc348);
-  DEFINE_PROC ("WS.WS.SITEMAP_URLS_REGISTER", proc349);
-  DEFINE_PROC ("WS.WS.SITEMAP_GET_LOC", proc350);
-  DEFINE_PROC ("WS.WS.SITEMAP_XML_PARSE", proc351);
-  DEFINE_PROC ("WS.WS.SITEMAP_RDF_STORE", proc352);
-  DEFINE_PROC ("VFS_ROBOTS_PARSE", proc353);
-  DEFINE_PROC ("VFS_ROBOTS_GET", proc354);
+  DEFINE_PROC ("WS.WS.COPY_PAGE", proc322);
+  DEFINE_PROC ("WS.WS.VFS_HTTP_RESP_CODE", proc323);
+  DEFINE_PROC ("WS.WS.VFS_ENSURE_NEW_SITE", proc324);
+  DEFINE_PROC ("WS.WS.VFS_GUESS_CONTENT_TYPE", proc325);
+  DEFINE_PROC ("WS.WS.COPY_PAGE_1", proc326);
+  DEFINE_PROC ("WS.WS.DELETE_LOCAL_COPY", proc327);
+  DEFINE_PROC ("WS.WS.VFS_RUN", proc328);
+  DEFINE_PROC ("WS.WS.VFS_STATUS_GET", proc329);
+  DEFINE_PROC ("WS.WS.VFS_STATUS_SET", proc330);
+  DEFINE_PROC ("WS.WS.SERV_QUEUE_TOP", proc331);
+  DEFINE_PROC ("WS.WS.SERV_QUEUE", proc332);
+  DEFINE_PROC ("ERR_MAIL_SEND", proc333);
+  DEFINE_PROC ("WS.WS.LOCAL_STORE", proc334);
+  DEFINE_PROC ("WS.WS.GET_URLS", proc335);
+  DEFINE_PROC ("WS.WS.SITEMAP_PROCESS", proc336);
+  DEFINE_PROC ("WS.WS.MAKE_URL", proc337);
+  DEFINE_PROC ("WS.WS.SPLIT_URL", proc338);
+  DEFINE_PROC ("WS.WS.EXPAND_URL_OLD", proc339);
+  DEFINE_PROC ("WS.WS.MKPATH", proc340);
+  DEFINE_PROC ("WS.WS.FOLLOW", proc341);
+  DEFINE_PROC ("WS.WS.REPLACE_HREF", proc342);
+  DEFINE_PROC ("WS.WS.FIND_URI", proc343);
+  DEFINE_PROC ("WS.WS.LFS_EXP", proc344);
+  DEFINE_PROC ("WS.WS.FIND_KEYWORD", proc345);
+  DEFINE_PROC ("WS.WS.GET_HREF_IN_ARRAY", proc346);
+  DEFINE_PROC ("WS.WS.DAV_EXP", proc347);
+  DEFINE_PROC ("WS.WS.DAV_HEAD", proc348);
+  DEFINE_PROC ("WS.WS.DAV_MKCOL", proc349);
+  DEFINE_PROC ("WS.WS.DAV_PUT", proc350);
+  DEFINE_PROC ("WS.WS.DAV_PROP", proc351);
+  DEFINE_PROC ("WS.WS.GET_HREF_FROM_XML", proc352);
+  DEFINE_PROC ("WS.WS.ISEMPTY", proc353);
+  DEFINE_PROC ("WS.WS.URL_BY_DATE", proc354);
+  DEFINE_PROC ("WS.WS.VFS_RECOVER_QUEUE_STAT", proc355);
+  DEFINE_PROC ("WS.WS.VFS_MAKE_ENTRY", proc356);
+  DEFINE_PROC ("WS.WS.VFS_GO", proc357);
+  DEFINE_PROC ("WS.WS.VFS_URI_COMPOSE", proc358);
+  DEFINE_PROC ("WS.WS.VFS_EXTRACT_RDF", proc359);
+  DEFINE_PROC ("WS.WS.SITEMAP_ENSURE_NEW_SITE", proc360);
+  DEFINE_PROC ("WS.WS.SITEMAP_URLS_REGISTER", proc361);
+  DEFINE_PROC ("WS.WS.SITEMAP_GET_LOC", proc362);
+  DEFINE_PROC ("WS.WS.SITEMAP_XML_PARSE", proc363);
+  DEFINE_PROC ("WS.WS.SITEMAP_RDF_STORE", proc364);
+  DEFINE_PROC ("VFS_ROBOTS_PARSE", proc365);
+  DEFINE_PROC ("VFS_ROBOTS_GET", proc366);
 
   dk_free_box (bootstrap_cli->cli_qualifier);
   bootstrap_cli->cli_qualifier =  saved_qualifier;
@@ -29264,403 +30062,402 @@ sqls_define_dav (void)
 
   /* uriqa.sql */
 
-  ddl_ensure_table ("WS.WS.URIQA_HANDLER", tbl0);
-  DEFINE_PROC ("WS.WS.URIQA_CFG_ITEM_VALUE", proc355);
-  DEFINE_PROC ("WS.WS.URIQA_LOAD_FROM_INI", proc356);
+  ddl_ensure_table ("WS.WS.URIQA_HANDLER", tbl1);
+  DEFINE_PROC ("WS.WS.URIQA_CFG_ITEM_VALUE", proc367);
+  DEFINE_PROC ("WS.WS.URIQA_LOAD_FROM_INI", proc368);
   ddl_ensure_table ("do this always", other9);
-  DEFINE_PROC ("WS.WS.URIQA_FULL_URI", proc357);
-  DEFINE_PROC ("WS.WS.URIQA_APPLY_TRIGGERS", proc358);
-  DEFINE_PROC ("WS.WS.URIQA_N3_DIR_LIST", proc359);
-  DEFINE_PROC ("DB.DBA.DAV_EXTRACT_DYN_RDF_application/xbel+xml", proc360);
-  DEFINE_PROC ("WS.WS.URIQA_HANDLER_LOCALDAV", proc361);
-  DEFINE_PROC ("WS.WS.URIQA_HANDLER_NATIVE_HTTP", proc362);
-  DEFINE_PROC ("WS.WS.URIQA_STATUS", proc363);
-  DEFINE_PROC ("WS.WS.MPUT", proc364);
-  DEFINE_PROC ("WS.WS.MGET", proc365);
-  DEFINE_PROC ("WS.WS.MDELETE", proc366);
-  DEFINE_PROC ("WS.WS./!URIQA/", proc367);
-  DEFINE_PROC ("WS.WS.URIQA_VHOST_RESET", proc368);
+  DEFINE_PROC ("WS.WS.URIQA_FULL_URI", proc369);
+  DEFINE_PROC ("WS.WS.URIQA_APPLY_TRIGGERS", proc370);
+  DEFINE_PROC ("WS.WS.URIQA_N3_DIR_LIST", proc371);
+  DEFINE_PROC ("DB.DBA.DAV_EXTRACT_DYN_RDF_application/xbel+xml", proc372);
+  DEFINE_PROC ("WS.WS.URIQA_HANDLER_LOCALDAV", proc373);
+  DEFINE_PROC ("WS.WS.URIQA_HANDLER_NATIVE_HTTP", proc374);
+  DEFINE_PROC ("WS.WS.URIQA_STATUS", proc375);
+  DEFINE_PROC ("WS.WS.MPUT", proc376);
+  DEFINE_PROC ("WS.WS.MGET", proc377);
+  DEFINE_PROC ("WS.WS.MDELETE", proc378);
+  DEFINE_PROC ("WS.WS./!URIQA/", proc379);
+  DEFINE_PROC ("WS.WS.URIQA_VHOST_RESET", proc380);
 
   /* DET_CatFilter.sql */
 
-  DEFINE_PROC ("CatFilter_DAV_AUTHENTICATE", proc369);
-  DEFINE_PROC ("CatFilter_GET_CONDITION", proc370);
-  DEFINE_PROC ("CatFilter_ENCODE_CATVALUE", proc371);
-  DEFINE_PROC ("CatFilter_DECODE_CATVALUE", proc372);
-  DEFINE_PROC ("CatFilter_PATH_PARTS_TO_FILTER", proc373);
-  DEFINE_PROC ("CatFilter_ACC_FILTER_DATA", proc374);
-  DEFINE_PROC ("CatFilter_DAV_SEARCH_ID_IMPL", proc375);
-  DEFINE_PROC ("CatFilter_DAV_AUTHENTICATE_HTTP", proc376);
-  DEFINE_PROC ("CatFilter_DAV_GET_PARENT", proc377);
-  DEFINE_PROC ("CatFilter_DAV_COL_CREATE", proc378);
-  DEFINE_PROC ("CatFilter_DAV_COL_MOUNT", proc379);
-  DEFINE_PROC ("CatFilter_DAV_COL_MOUNT_HERE", proc380);
-  DEFINE_PROC ("CatFilter_DAV_DELETE", proc381);
-  DEFINE_PROC ("CatFilter_FILTER_TO_CONDITION", proc382);
-  DEFINE_PROC ("CatFilter_DAV_RES_UPLOAD", proc383);
-  DEFINE_PROC ("CatFilter_DAV_PROP_REMOVE", proc384);
-  DEFINE_PROC ("CatFilter_DAV_PROP_SET", proc385);
-  DEFINE_PROC ("CatFilter_DAV_PROP_GET", proc386);
-  DEFINE_PROC ("CatFilter_DAV_PROP_LIST", proc387);
-  DEFINE_PROC ("CatFilter_DAV_DIR_SINGLE", proc388);
-  DEFINE_PROC ("CatFilter_LIST_SCHEMAS", proc389);
-  DEFINE_PROC ("CatFilter_LIST_SCHEMA_PROPS", proc390);
-  DEFINE_PROC ("CatFilter_GET_RDF_INVERSE_HITS_DISTVALS", proc391);
-  DEFINE_PROC ("CatFilter_GET_RDF_INVERSE_HITS_RES_IDS", proc392);
-  DEFINE_PROC ("CatFilter_LIST_PROP_DISTVALS_AUX", proc393);
-  DEFINE_PROC ("CatFilter_LIST_PROP_DISTVALS", proc394);
-  DEFINE_PROC ("CatFilter_DAV_DIR_LIST", proc395);
-  DEFINE_PROC ("CatFilter_DAV_DIR_FILTER", proc396);
-  DEFINE_PROC ("CatFilter_DAV_SEARCH_ID", proc397);
-  DEFINE_PROC ("CatFilter_DAV_SEARCH_PATH", proc398);
-  DEFINE_PROC ("CatFilter_DAV_RES_UPLOAD_COPY", proc399);
-  DEFINE_PROC ("CatFilter_DAV_RES_UPLOAD_MOVE", proc400);
-  DEFINE_PROC ("CatFilter_DAV_RES_CONTENT", proc401);
-  DEFINE_PROC ("CatFilter_DAV_SYMLINK", proc402);
-  DEFINE_PROC ("CatFilter_DAV_LOCK", proc403);
-  DEFINE_PROC ("CatFilter_DAV_UNLOCK", proc404);
-  DEFINE_PROC ("CatFilter_DAV_IS_LOCKED", proc405);
-  DEFINE_PROC ("CatFilter_DAV_LIST_LOCKS", proc406);
-  DEFINE_PROC ("CatFilter_CONFIGURE", proc407);
-  DEFINE_PROC ("CatFilter_FEED_DAV_RDF_INVERSE", proc408);
+  DEFINE_PROC ("CatFilter_DAV_AUTHENTICATE", proc381);
+  DEFINE_PROC ("CatFilter_GET_CONDITION", proc382);
+  DEFINE_PROC ("CatFilter_ENCODE_CATVALUE", proc383);
+  DEFINE_PROC ("CatFilter_DECODE_CATVALUE", proc384);
+  DEFINE_PROC ("CatFilter_PATH_PARTS_TO_FILTER", proc385);
+  DEFINE_PROC ("CatFilter_ACC_FILTER_DATA", proc386);
+  DEFINE_PROC ("CatFilter_DAV_SEARCH_ID_IMPL", proc387);
+  DEFINE_PROC ("CatFilter_DAV_AUTHENTICATE_HTTP", proc388);
+  DEFINE_PROC ("CatFilter_DAV_GET_PARENT", proc389);
+  DEFINE_PROC ("CatFilter_DAV_COL_CREATE", proc390);
+  DEFINE_PROC ("CatFilter_DAV_COL_MOUNT", proc391);
+  DEFINE_PROC ("CatFilter_DAV_COL_MOUNT_HERE", proc392);
+  DEFINE_PROC ("CatFilter_DAV_DELETE", proc393);
+  DEFINE_PROC ("CatFilter_FILTER_TO_CONDITION", proc394);
+  DEFINE_PROC ("CatFilter_DAV_RES_UPLOAD", proc395);
+  DEFINE_PROC ("CatFilter_DAV_PROP_REMOVE", proc396);
+  DEFINE_PROC ("CatFilter_DAV_PROP_SET", proc397);
+  DEFINE_PROC ("CatFilter_DAV_PROP_GET", proc398);
+  DEFINE_PROC ("CatFilter_DAV_PROP_LIST", proc399);
+  DEFINE_PROC ("CatFilter_DAV_DIR_SINGLE", proc400);
+  DEFINE_PROC ("CatFilter_LIST_SCHEMAS", proc401);
+  DEFINE_PROC ("CatFilter_LIST_SCHEMA_PROPS", proc402);
+  DEFINE_PROC ("CatFilter_GET_RDF_INVERSE_HITS_DISTVALS", proc403);
+  DEFINE_PROC ("CatFilter_GET_RDF_INVERSE_HITS_RES_IDS", proc404);
+  DEFINE_PROC ("CatFilter_LIST_PROP_DISTVALS_AUX", proc405);
+  DEFINE_PROC ("CatFilter_LIST_PROP_DISTVALS", proc406);
+  DEFINE_PROC ("CatFilter_DAV_DIR_LIST", proc407);
+  DEFINE_PROC ("CatFilter_DAV_DIR_FILTER", proc408);
+  DEFINE_PROC ("CatFilter_DAV_SEARCH_ID", proc409);
+  DEFINE_PROC ("CatFilter_DAV_SEARCH_PATH", proc410);
+  DEFINE_PROC ("CatFilter_DAV_RES_UPLOAD_COPY", proc411);
+  DEFINE_PROC ("CatFilter_DAV_RES_UPLOAD_MOVE", proc412);
+  DEFINE_PROC ("CatFilter_DAV_RES_CONTENT", proc413);
+  DEFINE_PROC ("CatFilter_DAV_SYMLINK", proc414);
+  DEFINE_PROC ("CatFilter_DAV_LOCK", proc415);
+  DEFINE_PROC ("CatFilter_DAV_UNLOCK", proc416);
+  DEFINE_PROC ("CatFilter_DAV_IS_LOCKED", proc417);
+  DEFINE_PROC ("CatFilter_DAV_LIST_LOCKS", proc418);
+  DEFINE_PROC ("CatFilter_CONFIGURE", proc419);
+  DEFINE_PROC ("CatFilter_FEED_DAV_RDF_INVERSE", proc420);
   ddl_std_proc (trig35, 0x0);
   ddl_std_proc (trig36, 0x0);
   ddl_std_proc (trig37, 0x0);
-  DEFINE_PROC ("CatFilter_INIT_SYS_DAV_RDF_INVERSE", proc409);
+  DEFINE_PROC ("CatFilter_INIT_SYS_DAV_RDF_INVERSE", proc421);
 
   /* DET_HostFs.sql */
 
-  ddl_ensure_table ("WS.WS.HOSTFS_COL", tbl1);
+  ddl_ensure_table ("WS.WS.HOSTFS_COL", tbl2);
   ddl_ensure_column ("WS.WS.HOSTFS_COL", "COL_NAME", alter0, 0);
-  ddl_ensure_table ("WS.WS.HOSTFS_RES", tbl2);
-  ddl_ensure_table ("WS.WS.HOSTFS_RES_CACHE", tbl3);
+  ddl_ensure_table ("WS.WS.HOSTFS_RES", tbl3);
+  ddl_ensure_table ("WS.WS.HOSTFS_RES_CACHE", tbl4);
   ddl_ensure_column ("WS.WS.HOSTFS_RES_CACHE", "RESC_TOPCOL_ID", alter1, 0);
-  ddl_ensure_table ("WS.WS.HOSTFS_RES_META", tbl4);
+  ddl_ensure_table ("WS.WS.HOSTFS_RES_META", tbl5);
   ddl_ensure_column ("WS.WS.HOSTFS_RES_META", "RESM_TOPCOL_ID", alter2, 0);
-  ddl_ensure_table ("WS.WS.HOSTFS_RDF_INVERSE", tbl5);
-  DEFINE_PROC ("WS.WS.HOSTFS_FEED_RDF_INVERSE", proc410);
+  ddl_ensure_table ("WS.WS.HOSTFS_RDF_INVERSE", tbl6);
+  DEFINE_PROC ("WS.WS.HOSTFS_FEED_RDF_INVERSE", proc422);
   ddl_std_proc (trig38, 0x0);
   ddl_std_proc (trig39, 0x0);
   ddl_std_proc (trig40, 0x0);
   ddl_ensure_table ("do this always", other10);
   ddl_ensure_table ("do this always", other11);
-  DEFINE_PROC ("WS.WS.HOSTFS_RES_TOPCOL_ID", proc411);
-  DEFINE_PROC ("WS.WS.HOSTFS_EXTRACT_AND_SAVE_RDF", proc412);
-  DEFINE_PROC ("WS.WS.HOSTFS_TEST_RDF", proc413);
-  DEFINE_PROC ("WS.WS.HOSTFS_RES_CACHE_RESC_DATA_INDEX_HOOK", proc414);
-  DEFINE_PROC ("WS.WS.HOSTFS_RES_CACHE_RESC_DATA_UNINDEX_HOOK", proc415);
+  DEFINE_PROC ("WS.WS.HOSTFS_RES_TOPCOL_ID", proc423);
+  DEFINE_PROC ("WS.WS.HOSTFS_EXTRACT_AND_SAVE_RDF", proc424);
+  DEFINE_PROC ("WS.WS.HOSTFS_TEST_RDF", proc425);
+  DEFINE_PROC ("WS.WS.HOSTFS_RES_CACHE_RESC_DATA_INDEX_HOOK", proc426);
+  DEFINE_PROC ("WS.WS.HOSTFS_RES_CACHE_RESC_DATA_UNINDEX_HOOK", proc427);
   ddl_ensure_table ("do this always", other12);
   ddl_ensure_table ("do this always", other13);
-  DEFINE_PROC ("WS.WS.HOSTFS_FIND_COL", proc416);
-  DEFINE_PROC ("WS.WS.HOSTFS_COL_DISAPPEARS", proc417);
-  DEFINE_PROC ("WS.WS.HOSTFS_HANDLE_RES_SCAN", proc418);
-  DEFINE_PROC ("WS.WS.HOSTFS_RES_DISAPPEARS", proc419);
-  DEFINE_PROC ("WS.WS.HOSTFS_TOUCH_RES", proc420);
-  DEFINE_PROC ("WS.WS.HOSTFS_GLOBAL_RESET", proc421);
-  DEFINE_PROC ("WS.WS.HOSTFS_PATH_STAT", proc422);
-  DEFINE_PROC ("WS.WS.HOSTFS_READ_TYPEINFO", proc423);
-  DEFINE_PROC ("HostFs_DAV_AUTHENTICATE", proc424);
-  DEFINE_PROC ("HostFs_DAV_AUTHENTICATE_HTTP", proc425);
-  DEFINE_PROC ("HostFs_DAV_GET_PARENT", proc426);
-  DEFINE_PROC ("HostFs_DAV_COL_CREATE", proc427);
-  DEFINE_PROC ("HostFs_DAV_COL_MOUNT", proc428);
-  DEFINE_PROC ("HostFs_DAV_COL_MOUNT_HERE", proc429);
-  DEFINE_PROC ("HostFs_DAV_DELETE", proc430);
-  ddl_ensure_table ("DB.DBA.HostFs_DAV_RES_UPLOAD", tbl6);
-  DEFINE_PROC ("HostFs_DAV_RES_UPLOAD", proc431);
-  DEFINE_PROC ("HostFs_DAV_PROP_REMOVE", proc432);
-  DEFINE_PROC ("HostFs_DAV_PROP_SET", proc433);
-  DEFINE_PROC ("HostFs_DAV_PROP_GET", proc434);
-  DEFINE_PROC ("HostFs_DAV_PROP_LIST", proc435);
-  DEFINE_PROC ("HostFs_ID_TO_OSPATH", proc436);
-  DEFINE_PROC ("HostFs_DAV_DIR_SINGLE", proc437);
-  DEFINE_PROC ("HostFs_DAV_DIR_LIST", proc438);
-  DEFINE_PROC ("HostFs_DAV_DIR_FILTER", proc439);
-  DEFINE_PROC ("HostFs_DAV_SEARCH_ID", proc440);
-  DEFINE_PROC ("HostFs_DAV_SEARCH_PATH", proc441);
-  DEFINE_PROC ("HostFs_DAV_RES_UPLOAD_COPY", proc442);
-  DEFINE_PROC ("HostFs_DAV_RES_UPLOAD_MOVE", proc443);
-  DEFINE_PROC ("HostFs_DAV_RES_CONTENT", proc444);
-  DEFINE_PROC ("HostFs_DAV_SYMLINK", proc445);
-  DEFINE_PROC ("HostFs_DAV_LOCK", proc446);
-  DEFINE_PROC ("HostFs_DAV_UNLOCK", proc447);
-  DEFINE_PROC ("HostFs_DAV_IS_LOCKED", proc448);
-  DEFINE_PROC ("HostFs_DAV_LIST_LOCKS", proc449);
-  DEFINE_PROC ("HostFs_CF_LIST_PROP_DISTVALS", proc450);
-  DEFINE_PROC ("HostFs_CF_GET_RDF_HITS", proc451);
-  DEFINE_PROC ("HostFs_RF_ID2SUFFIX", proc452);
-  DEFINE_PROC ("HostFile_RF_SUFFIX2ID", proc453);
-  DEFINE_PROC ("HostDir_RF_SUFFIX2ID", proc454);
+  DEFINE_PROC ("WS.WS.HOSTFS_FIND_COL", proc428);
+  DEFINE_PROC ("WS.WS.HOSTFS_COL_DISAPPEARS", proc429);
+  DEFINE_PROC ("WS.WS.HOSTFS_HANDLE_RES_SCAN", proc430);
+  DEFINE_PROC ("WS.WS.HOSTFS_RES_DISAPPEARS", proc431);
+  DEFINE_PROC ("WS.WS.HOSTFS_TOUCH_RES", proc432);
+  DEFINE_PROC ("WS.WS.HOSTFS_GLOBAL_RESET", proc433);
+  DEFINE_PROC ("WS.WS.HOSTFS_PATH_STAT", proc434);
+  DEFINE_PROC ("WS.WS.HOSTFS_READ_TYPEINFO", proc435);
+  DEFINE_PROC ("HostFs_DAV_AUTHENTICATE", proc436);
+  DEFINE_PROC ("HostFs_DAV_AUTHENTICATE_HTTP", proc437);
+  DEFINE_PROC ("HostFs_DAV_GET_PARENT", proc438);
+  DEFINE_PROC ("HostFs_DAV_COL_CREATE", proc439);
+  DEFINE_PROC ("HostFs_DAV_COL_MOUNT", proc440);
+  DEFINE_PROC ("HostFs_DAV_COL_MOUNT_HERE", proc441);
+  DEFINE_PROC ("HostFs_DAV_DELETE", proc442);
+  ddl_ensure_table ("DB.DBA.HostFs_DAV_RES_UPLOAD", tbl7);
+  DEFINE_PROC ("HostFs_DAV_RES_UPLOAD", proc443);
+  DEFINE_PROC ("HostFs_DAV_PROP_REMOVE", proc444);
+  DEFINE_PROC ("HostFs_DAV_PROP_SET", proc445);
+  DEFINE_PROC ("HostFs_DAV_PROP_GET", proc446);
+  DEFINE_PROC ("HostFs_DAV_PROP_LIST", proc447);
+  DEFINE_PROC ("HostFs_ID_TO_OSPATH", proc448);
+  DEFINE_PROC ("HostFs_DAV_DIR_SINGLE", proc449);
+  DEFINE_PROC ("HostFs_DAV_DIR_LIST", proc450);
+  DEFINE_PROC ("HostFs_DAV_DIR_FILTER", proc451);
+  DEFINE_PROC ("HostFs_DAV_SEARCH_ID", proc452);
+  DEFINE_PROC ("HostFs_DAV_SEARCH_PATH", proc453);
+  DEFINE_PROC ("HostFs_DAV_RES_UPLOAD_COPY", proc454);
+  DEFINE_PROC ("HostFs_DAV_RES_UPLOAD_MOVE", proc455);
+  DEFINE_PROC ("HostFs_DAV_RES_CONTENT", proc456);
+  DEFINE_PROC ("HostFs_DAV_SYMLINK", proc457);
+  DEFINE_PROC ("HostFs_DAV_LOCK", proc458);
+  DEFINE_PROC ("HostFs_DAV_UNLOCK", proc459);
+  DEFINE_PROC ("HostFs_DAV_IS_LOCKED", proc460);
+  DEFINE_PROC ("HostFs_DAV_LIST_LOCKS", proc461);
+  DEFINE_PROC ("HostFs_CF_LIST_PROP_DISTVALS", proc462);
+  DEFINE_PROC ("HostFs_CF_GET_RDF_HITS", proc463);
+  DEFINE_PROC ("HostFs_RF_ID2SUFFIX", proc464);
+  DEFINE_PROC ("HostFile_RF_SUFFIX2ID", proc465);
+  DEFINE_PROC ("HostDir_RF_SUFFIX2ID", proc466);
 
   /* DET_ResFilter.sql */
 
-  DEFINE_PROC ("ResFilter_DAV_AUTHENTICATE", proc455);
-  DEFINE_PROC ("ResFilter_NORM", proc456);
-  DEFINE_PROC ("ResFilter_ENCODE_FILTER", proc457);
-  DEFINE_PROC ("ResFilter_DECODE_FILTER", proc458);
-  DEFINE_PROC ("ResFilter_GET_CONDITION", proc459);
-  DEFINE_PROC ("ResFilter_FIT_INTO_CONDITION", proc460);
-  DEFINE_PROC ("ResFilter_MAKE_DEL_ACTION_FROM_CONDITION", proc461);
-  DEFINE_PROC ("ResFilter_LEAVE_CONDITION", proc462);
-  DEFINE_PROC ("ResFilter_FNMERGE", proc463);
-  DEFINE_PROC ("ResFilter_FNSPLIT", proc464);
-  DEFINE_PROC ("ResFilter_DAV_SEARCH_ID_IMPL", proc465);
-  DEFINE_PROC ("ResFilter_DAV_AUTHENTICATE_HTTP", proc466);
-  DEFINE_PROC ("ResFilter_DAV_GET_PARENT", proc467);
-  DEFINE_PROC ("ResFilter_DAV_COL_CREATE", proc468);
-  DEFINE_PROC ("ResFilter_DAV_COL_MOUNT", proc469);
-  DEFINE_PROC ("ResFilter_DAV_COL_MOUNT_HERE", proc470);
-  DEFINE_PROC ("ResFilter_DAV_DELETE", proc471);
-  DEFINE_PROC ("ResFilter_DAV_RES_UPLOAD", proc472);
-  DEFINE_PROC ("ResFilter_DAV_PROP_REMOVE", proc473);
-  DEFINE_PROC ("ResFilter_DAV_PROP_SET", proc474);
-  DEFINE_PROC ("ResFilter_DAV_PROP_GET", proc475);
-  DEFINE_PROC ("ResFilter_DAV_PROP_LIST", proc476);
-  DEFINE_PROC ("ResFilter_DAV_DIR_SINGLE", proc477);
-  DEFINE_PROC ("ResFilter_DAV_DIR_LIST", proc478);
-  DEFINE_PROC ("ResFilter_DAV_DIR_FILTER", proc479);
-  DEFINE_PROC ("ResFilter_DAV_SEARCH_ID", proc480);
-  DEFINE_PROC ("ResFilter_DAV_SEARCH_PATH", proc481);
-  DEFINE_PROC ("ResFilter_DAV_RES_UPLOAD_COPY", proc482);
-  DEFINE_PROC ("ResFilter_DAV_RES_UPLOAD_MOVE", proc483);
-  DEFINE_PROC ("ResFilter_DAV_RES_CONTENT", proc484);
-  DEFINE_PROC ("ResFilter_DAV_SYMLINK", proc485);
-  DEFINE_PROC ("ResFilter_DAV_LOCK", proc486);
-  DEFINE_PROC ("ResFilter_DAV_UNLOCK", proc487);
-  DEFINE_PROC ("ResFilter_DAV_IS_LOCKED", proc488);
-  DEFINE_PROC ("ResFilter_DAV_LIST_LOCKS", proc489);
-  DEFINE_PROC ("ResFilter_CONFIGURE", proc490);
+  DEFINE_PROC ("ResFilter_DAV_AUTHENTICATE", proc467);
+  DEFINE_PROC ("ResFilter_NORM", proc468);
+  DEFINE_PROC ("ResFilter_ENCODE_FILTER", proc469);
+  DEFINE_PROC ("ResFilter_DECODE_FILTER", proc470);
+  DEFINE_PROC ("ResFilter_GET_CONDITION", proc471);
+  DEFINE_PROC ("ResFilter_FIT_INTO_CONDITION", proc472);
+  DEFINE_PROC ("ResFilter_MAKE_DEL_ACTION_FROM_CONDITION", proc473);
+  DEFINE_PROC ("ResFilter_LEAVE_CONDITION", proc474);
+  DEFINE_PROC ("ResFilter_FNMERGE", proc475);
+  DEFINE_PROC ("ResFilter_FNSPLIT", proc476);
+  DEFINE_PROC ("ResFilter_DAV_SEARCH_ID_IMPL", proc477);
+  DEFINE_PROC ("ResFilter_DAV_AUTHENTICATE_HTTP", proc478);
+  DEFINE_PROC ("ResFilter_DAV_GET_PARENT", proc479);
+  DEFINE_PROC ("ResFilter_DAV_COL_CREATE", proc480);
+  DEFINE_PROC ("ResFilter_DAV_COL_MOUNT", proc481);
+  DEFINE_PROC ("ResFilter_DAV_COL_MOUNT_HERE", proc482);
+  DEFINE_PROC ("ResFilter_DAV_DELETE", proc483);
+  DEFINE_PROC ("ResFilter_DAV_RES_UPLOAD", proc484);
+  DEFINE_PROC ("ResFilter_DAV_PROP_REMOVE", proc485);
+  DEFINE_PROC ("ResFilter_DAV_PROP_SET", proc486);
+  DEFINE_PROC ("ResFilter_DAV_PROP_GET", proc487);
+  DEFINE_PROC ("ResFilter_DAV_PROP_LIST", proc488);
+  DEFINE_PROC ("ResFilter_DAV_DIR_SINGLE", proc489);
+  DEFINE_PROC ("ResFilter_DAV_DIR_LIST", proc490);
+  DEFINE_PROC ("ResFilter_DAV_DIR_FILTER", proc491);
+  DEFINE_PROC ("ResFilter_DAV_SEARCH_ID", proc492);
+  DEFINE_PROC ("ResFilter_DAV_SEARCH_PATH", proc493);
+  DEFINE_PROC ("ResFilter_DAV_RES_UPLOAD_COPY", proc494);
+  DEFINE_PROC ("ResFilter_DAV_RES_UPLOAD_MOVE", proc495);
+  DEFINE_PROC ("ResFilter_DAV_RES_CONTENT", proc496);
+  DEFINE_PROC ("ResFilter_DAV_SYMLINK", proc497);
+  DEFINE_PROC ("ResFilter_DAV_LOCK", proc498);
+  DEFINE_PROC ("ResFilter_DAV_UNLOCK", proc499);
+  DEFINE_PROC ("ResFilter_DAV_IS_LOCKED", proc500);
+  DEFINE_PROC ("ResFilter_DAV_LIST_LOCKS", proc501);
+  DEFINE_PROC ("ResFilter_CONFIGURE", proc502);
 
   /* DET_PropFilter.sql */
 
-  DEFINE_PROC ("PropFilter_DAV_AUTHENTICATE", proc491);
-  DEFINE_PROC ("PropFilter_NORM", proc492);
-  DEFINE_PROC ("PropFilter_GET_CONDITION", proc493);
-  DEFINE_PROC ("PropFilter_FIT_INTO_CONDITION", proc494);
-  DEFINE_PROC ("PropFilter_LEAVE_CONDITION", proc495);
-  DEFINE_PROC ("PropFilter_FNMERGE", proc496);
-  DEFINE_PROC ("PropFilter_FNSPLIT", proc497);
-  DEFINE_PROC ("PropFilter_DAV_SEARCH_ID_IMPL", proc498);
-  DEFINE_PROC ("PropFilter_DAV_AUTHENTICATE_HTTP", proc499);
-  DEFINE_PROC ("PropFilter_DAV_GET_PARENT", proc500);
-  DEFINE_PROC ("PropFilter_DAV_COL_CREATE", proc501);
-  DEFINE_PROC ("PropFilter_DAV_COL_MOUNT", proc502);
-  DEFINE_PROC ("PropFilter_DAV_COL_MOUNT_HERE", proc503);
-  DEFINE_PROC ("PropFilter_DAV_DELETE", proc504);
-  DEFINE_PROC ("PropFilter_DAV_RES_UPLOAD", proc505);
-  DEFINE_PROC ("PropFilter_DAV_PROP_REMOVE", proc506);
-  DEFINE_PROC ("PropFilter_DAV_PROP_SET", proc507);
-  DEFINE_PROC ("PropFilter_DAV_PROP_GET", proc508);
-  DEFINE_PROC ("PropFilter_DAV_PROP_LIST", proc509);
-  DEFINE_PROC ("PropFilter_DAV_DIR_SINGLE", proc510);
-  DEFINE_PROC ("PropFilter_DAV_DIR_LIST", proc511);
-  DEFINE_PROC ("PropFilter_DAV_DIR_FILTER", proc512);
-  DEFINE_PROC ("PropFilter_DAV_SEARCH_ID", proc513);
-  DEFINE_PROC ("PropFilter_DAV_SEARCH_PATH", proc514);
-  DEFINE_PROC ("PropFilter_DAV_RES_UPLOAD_COPY", proc515);
-  DEFINE_PROC ("PropFilter_DAV_RES_UPLOAD_MOVE", proc516);
-  DEFINE_PROC ("PropFilter_DAV_RES_CONTENT", proc517);
-  DEFINE_PROC ("PropFilter_DAV_SYMLINK", proc518);
-  DEFINE_PROC ("PropFilter_DAV_LOCK", proc519);
-  DEFINE_PROC ("PropFilter_DAV_UNLOCK", proc520);
-  DEFINE_PROC ("PropFilter_DAV_IS_LOCKED", proc521);
-  DEFINE_PROC ("PropFilter_DAV_LIST_LOCKS", proc522);
+  DEFINE_PROC ("PropFilter_DAV_AUTHENTICATE", proc503);
+  DEFINE_PROC ("PropFilter_NORM", proc504);
+  DEFINE_PROC ("PropFilter_GET_CONDITION", proc505);
+  DEFINE_PROC ("PropFilter_FIT_INTO_CONDITION", proc506);
+  DEFINE_PROC ("PropFilter_LEAVE_CONDITION", proc507);
+  DEFINE_PROC ("PropFilter_FNMERGE", proc508);
+  DEFINE_PROC ("PropFilter_FNSPLIT", proc509);
+  DEFINE_PROC ("PropFilter_DAV_SEARCH_ID_IMPL", proc510);
+  DEFINE_PROC ("PropFilter_DAV_AUTHENTICATE_HTTP", proc511);
+  DEFINE_PROC ("PropFilter_DAV_GET_PARENT", proc512);
+  DEFINE_PROC ("PropFilter_DAV_COL_CREATE", proc513);
+  DEFINE_PROC ("PropFilter_DAV_COL_MOUNT", proc514);
+  DEFINE_PROC ("PropFilter_DAV_COL_MOUNT_HERE", proc515);
+  DEFINE_PROC ("PropFilter_DAV_DELETE", proc516);
+  DEFINE_PROC ("PropFilter_DAV_RES_UPLOAD", proc517);
+  DEFINE_PROC ("PropFilter_DAV_PROP_REMOVE", proc518);
+  DEFINE_PROC ("PropFilter_DAV_PROP_SET", proc519);
+  DEFINE_PROC ("PropFilter_DAV_PROP_GET", proc520);
+  DEFINE_PROC ("PropFilter_DAV_PROP_LIST", proc521);
+  DEFINE_PROC ("PropFilter_DAV_DIR_SINGLE", proc522);
+  DEFINE_PROC ("PropFilter_DAV_DIR_LIST", proc523);
+  DEFINE_PROC ("PropFilter_DAV_DIR_FILTER", proc524);
+  DEFINE_PROC ("PropFilter_DAV_SEARCH_ID", proc525);
+  DEFINE_PROC ("PropFilter_DAV_SEARCH_PATH", proc526);
+  DEFINE_PROC ("PropFilter_DAV_RES_UPLOAD_COPY", proc527);
+  DEFINE_PROC ("PropFilter_DAV_RES_UPLOAD_MOVE", proc528);
+  DEFINE_PROC ("PropFilter_DAV_RES_CONTENT", proc529);
+  DEFINE_PROC ("PropFilter_DAV_SYMLINK", proc530);
+  DEFINE_PROC ("PropFilter_DAV_LOCK", proc531);
+  DEFINE_PROC ("PropFilter_DAV_UNLOCK", proc532);
+  DEFINE_PROC ("PropFilter_DAV_IS_LOCKED", proc533);
+  DEFINE_PROC ("PropFilter_DAV_LIST_LOCKS", proc534);
 
   /* DET_RDFData.sql */
 
-  DEFINE_PROC ("DB.DBA.RDFData_log_message", proc523);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_AUTHENTICATE", proc524);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_AUTHENTICATE_HTTP", proc525);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_GET_PARENT", proc526);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_COL_CREATE", proc527);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_COL_MOUNT", proc528);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_COL_MOUNT_HERE", proc529);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_DELETE", proc530);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_UPLOAD", proc531);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_REMOVE", proc532);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_SET", proc533);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_GET", proc534);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_LIST", proc535);
-  DEFINE_PROC ("DB.DBA.RDFData_ACCESS_PARAMS", proc536);
-  DEFINE_PROC ("DB.DBA.RDFData_cast_dt_silent", proc537);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_DIR_SINGLE", proc538);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_DIR_LIST", proc539);
-  DEFINE_PROC ("RDFData_std_pref", proc540);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_DIR_FILTER", proc541);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_SEARCH_ID", proc542);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_SEARCH_PATH", proc543);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_UPLOAD_COPY", proc544);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_UPLOAD_MOVE", proc545);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_CONTENT", proc546);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_SYMLINK", proc547);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_DEREFERENCE_LIST", proc548);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_RESOLVE_PATH", proc549);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_LOCK", proc550);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_UNLOCK", proc551);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_IS_LOCKED", proc552);
-  DEFINE_PROC ("DB.DBA.RDFData_DAV_LIST_LOCKS", proc553);
-  DEFINE_PROC ("DB.DBA.RDFData_MAKE_DET_COL", proc554);
+  DEFINE_PROC ("DB.DBA.RDFData_log_message", proc535);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_AUTHENTICATE", proc536);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_AUTHENTICATE_HTTP", proc537);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_GET_PARENT", proc538);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_COL_CREATE", proc539);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_COL_MOUNT", proc540);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_COL_MOUNT_HERE", proc541);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_DELETE", proc542);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_UPLOAD", proc543);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_REMOVE", proc544);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_SET", proc545);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_GET", proc546);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_PROP_LIST", proc547);
+  DEFINE_PROC ("DB.DBA.RDFData_ACCESS_PARAMS", proc548);
+  DEFINE_PROC ("DB.DBA.RDFData_cast_dt_silent", proc549);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_DIR_SINGLE", proc550);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_DIR_LIST", proc551);
+  DEFINE_PROC ("RDFData_std_pref", proc552);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_DIR_FILTER", proc553);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_SEARCH_ID", proc554);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_SEARCH_PATH", proc555);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_UPLOAD_COPY", proc556);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_UPLOAD_MOVE", proc557);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_RES_CONTENT", proc558);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_SYMLINK", proc559);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_DEREFERENCE_LIST", proc560);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_RESOLVE_PATH", proc561);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_LOCK", proc562);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_UNLOCK", proc563);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_IS_LOCKED", proc564);
+  DEFINE_PROC ("DB.DBA.RDFData_DAV_LIST_LOCKS", proc565);
+  DEFINE_PROC ("DB.DBA.RDFData_MAKE_DET_COL", proc566);
 
   /* DET_S3.sql */
 
-  DEFINE_PROC ("DB.DBA.S3__encode", proc555);
-  DEFINE_PROC ("DB.DBA.S3__params", proc556);
-  DEFINE_PROC ("DB.DBA.S3__parts2path", proc557);
-  DEFINE_PROC ("DB.DBA.S3__item2entry", proc558);
-  DEFINE_PROC ("DB.DBA.S3__headers2item", proc559);
-  DEFINE_PROC ("DB.DBA.S3__makeHostUrl", proc560);
-  DEFINE_PROC ("DB.DBA.S3__getBucketFromUrl", proc561);
-  DEFINE_PROC ("DB.DBA.S3__getNameFromUrl", proc562);
-  DEFINE_PROC ("DB.DBA.S3__getPathFromUrl", proc563);
-  DEFINE_PROC ("DB.DBA.S3__makeAWSHeader", proc564);
-  DEFINE_PROC ("DB.DBA.S3__getBuckets", proc565);
-  DEFINE_PROC ("DB.DBA.S3__getBucket", proc566);
-  DEFINE_PROC ("DB.DBA.S3__putObject", proc567);
-  DEFINE_PROC ("DB.DBA.S3__headObject", proc568);
-  DEFINE_PROC ("DB.DBA.S3__getObject", proc569);
-  DEFINE_PROC ("DB.DBA.S3__deleteObject", proc570);
-  DEFINE_PROC ("DB.DBA.S3_DAV_AUTHENTICATE", proc571);
-  DEFINE_PROC ("DB.DBA.S3_DAV_AUTHENTICATE_HTTP", proc572);
-  DEFINE_PROC ("DB.DBA.S3_DAV_GET_PARENT", proc573);
-  DEFINE_PROC ("DB.DBA.S3_DAV_COL_CREATE", proc574);
-  DEFINE_PROC ("DB.DBA.S3_DAV_DELETE", proc575);
-  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD", proc576);
-  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_REMOVE", proc577);
-  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_SET", proc578);
-  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_GET", proc579);
-  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_LIST", proc580);
-  DEFINE_PROC ("DB.DBA.S3_DAV_DIR_SINGLE", proc581);
-  DEFINE_PROC ("DB.DBA.S3_DAV_DIR_LIST", proc582);
-  DEFINE_PROC ("DB.DBA.S3_DAV_DIR_FILTER", proc583);
-  DEFINE_PROC ("DB.DBA.S3_DAV_SEARCH_ID", proc584);
-  DEFINE_PROC ("DB.DBA.S3_DAV_SEARCH_PATH", proc585);
-  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD", proc586);
-  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD_COPY", proc587);
-  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD_MOVE", proc588);
-  DEFINE_PROC ("DB.DBA.S3_DAV_RES_CONTENT", proc589);
-  DEFINE_PROC ("DB.DBA.S3_DAV_SYMLINK", proc590);
-  DEFINE_PROC ("DB.DBA.S3_DAV_DEREFERENCE_LIST", proc591);
-  DEFINE_PROC ("DB.DBA.S3_DAV_RESOLVE_PATH", proc592);
-  DEFINE_PROC ("DB.DBA.S3_DAV_LOCK", proc593);
-  DEFINE_PROC ("DB.DBA.S3_DAV_UNLOCK", proc594);
-  DEFINE_PROC ("DB.DBA.S3_DAV_IS_LOCKED", proc595);
-  DEFINE_PROC ("DB.DBA.S3_DAV_LIST_LOCKS", proc596);
+  DEFINE_PROC ("DB.DBA.S3__encode", proc567);
+  DEFINE_PROC ("DB.DBA.S3__params", proc568);
+  DEFINE_PROC ("DB.DBA.S3__parts2path", proc569);
+  DEFINE_PROC ("DB.DBA.S3__item2entry", proc570);
+  DEFINE_PROC ("DB.DBA.S3__headers2item", proc571);
+  DEFINE_PROC ("DB.DBA.S3__makeHostUrl", proc572);
+  DEFINE_PROC ("DB.DBA.S3__getBucketFromUrl", proc573);
+  DEFINE_PROC ("DB.DBA.S3__getNameFromUrl", proc574);
+  DEFINE_PROC ("DB.DBA.S3__getPathFromUrl", proc575);
+  DEFINE_PROC ("DB.DBA.S3__makeAWSHeader", proc576);
+  DEFINE_PROC ("DB.DBA.S3__getBuckets", proc577);
+  DEFINE_PROC ("DB.DBA.S3__getBucket", proc578);
+  DEFINE_PROC ("DB.DBA.S3__putObject", proc579);
+  DEFINE_PROC ("DB.DBA.S3__headObject", proc580);
+  DEFINE_PROC ("DB.DBA.S3__getObject", proc581);
+  DEFINE_PROC ("DB.DBA.S3__deleteObject", proc582);
+  DEFINE_PROC ("DB.DBA.S3_DAV_AUTHENTICATE", proc583);
+  DEFINE_PROC ("DB.DBA.S3_DAV_AUTHENTICATE_HTTP", proc584);
+  DEFINE_PROC ("DB.DBA.S3_DAV_GET_PARENT", proc585);
+  DEFINE_PROC ("DB.DBA.S3_DAV_COL_CREATE", proc586);
+  DEFINE_PROC ("DB.DBA.S3_DAV_DELETE", proc587);
+  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_REMOVE", proc588);
+  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_SET", proc589);
+  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_GET", proc590);
+  DEFINE_PROC ("DB.DBA.S3_DAV_PROP_LIST", proc591);
+  DEFINE_PROC ("DB.DBA.S3_DAV_DIR_SINGLE", proc592);
+  DEFINE_PROC ("DB.DBA.S3_DAV_DIR_LIST", proc593);
+  DEFINE_PROC ("DB.DBA.S3_DAV_DIR_FILTER", proc594);
+  DEFINE_PROC ("DB.DBA.S3_DAV_SEARCH_ID", proc595);
+  DEFINE_PROC ("DB.DBA.S3_DAV_SEARCH_PATH", proc596);
+  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD", proc597);
+  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD_COPY", proc598);
+  DEFINE_PROC ("DB.DBA.S3_DAV_RES_UPLOAD_MOVE", proc599);
+  DEFINE_PROC ("DB.DBA.S3_DAV_RES_CONTENT", proc600);
+  DEFINE_PROC ("DB.DBA.S3_DAV_SYMLINK", proc601);
+  DEFINE_PROC ("DB.DBA.S3_DAV_DEREFERENCE_LIST", proc602);
+  DEFINE_PROC ("DB.DBA.S3_DAV_RESOLVE_PATH", proc603);
+  DEFINE_PROC ("DB.DBA.S3_DAV_LOCK", proc604);
+  DEFINE_PROC ("DB.DBA.S3_DAV_UNLOCK", proc605);
+  DEFINE_PROC ("DB.DBA.S3_DAV_IS_LOCKED", proc606);
+  DEFINE_PROC ("DB.DBA.S3_DAV_LIST_LOCKS", proc607);
 
   /* DET_DynaRes.sql */
 
-  ddl_ensure_table ("WS.WS.DYNA_RES", tbl7);
-  DEFINE_PROC ("DynaRes_ACCESS_PARAMS", proc597);
-  DEFINE_PROC ("DynaRes_DAV_AUTHENTICATE", proc598);
-  DEFINE_PROC ("DynaRes_DAV_AUTHENTICATE_HTTP", proc599);
-  DEFINE_PROC ("DynaRes_DAV_GET_PARENT", proc600);
-  DEFINE_PROC ("DynaRes_DAV_COL_CREATE", proc601);
-  DEFINE_PROC ("DynaRes_DAV_COL_MOUNT", proc602);
-  DEFINE_PROC ("DynaRes_DAV_COL_MOUNT_HERE", proc603);
-  DEFINE_PROC ("DynaRes_DAV_DELETE", proc604);
-  DEFINE_PROC ("DynaRes_DAV_RES_UPLOAD", proc605);
-  DEFINE_PROC ("DynaRes_DAV_PROP_REMOVE", proc606);
-  DEFINE_PROC ("DynaRes_DAV_PROP_SET", proc607);
-  DEFINE_PROC ("DynaRes_DAV_PROP_GET", proc608);
-  DEFINE_PROC ("DynaRes_DAV_PROP_LIST", proc609);
-  DEFINE_PROC ("DynaRes_DAV_DIR_SINGLE", proc610);
-  DEFINE_PROC ("DynaRes_DAV_DIR_LIST", proc611);
-  DEFINE_PROC ("DynaRes_DAV_FC_PRED_METAS", proc612);
-  DEFINE_PROC ("DynaRes_DAV_FC_TABLE_METAS", proc613);
-  DEFINE_PROC ("DynaRes_DAV_FC_PRINT_WHERE", proc614);
-  DEFINE_PROC ("DynaRes_DAV_DIR_FILTER", proc615);
-  DEFINE_PROC ("DynaRes_DAV_SEARCH_ID", proc616);
-  DEFINE_PROC ("DynaRes_DAV_SEARCH_PATH", proc617);
-  DEFINE_PROC ("DynaRes_DAV_RES_UPLOAD_COPY", proc618);
-  DEFINE_PROC ("DynaRes_DAV_RES_UPLOAD_MOVE", proc619);
-  DEFINE_PROC ("DynaRes_DAV_RES_CONTENT", proc620);
-  DEFINE_PROC ("DynaRes_DAV_SYMLINK", proc621);
-  DEFINE_PROC ("DynaRes_DAV_DEREFERENCE_LIST", proc622);
-  DEFINE_PROC ("DynaRes_DAV_RESOLVE_PATH", proc623);
-  DEFINE_PROC ("DynaRes_DAV_LOCK", proc624);
-  DEFINE_PROC ("DynaRes_DAV_UNLOCK", proc625);
-  DEFINE_PROC ("DynaRes_DAV_IS_LOCKED", proc626);
-  DEFINE_PROC ("DynaRes_DAV_LIST_LOCKS", proc627);
-  DEFINE_PROC ("DynaRes_CF_PROPNAME_TO_COLNAME", proc628);
-  DEFINE_PROC ("DynaRes_CF_FEED_FROM_AND_WHERE", proc629);
-  DEFINE_PROC ("DynaRes_CF_LIST_PROP_DISTVALS", proc630);
-  DEFINE_PROC ("DynaRes_CF_GET_RDF_HITS", proc631);
-  DEFINE_PROC ("DynaRes_INSERT_RESOURCE", proc632);
+  ddl_ensure_table ("WS.WS.DYNA_RES", tbl8);
+  DEFINE_PROC ("DynaRes_ACCESS_PARAMS", proc608);
+  DEFINE_PROC ("DynaRes_DAV_AUTHENTICATE", proc609);
+  DEFINE_PROC ("DynaRes_DAV_AUTHENTICATE_HTTP", proc610);
+  DEFINE_PROC ("DynaRes_DAV_GET_PARENT", proc611);
+  DEFINE_PROC ("DynaRes_DAV_COL_CREATE", proc612);
+  DEFINE_PROC ("DynaRes_DAV_COL_MOUNT", proc613);
+  DEFINE_PROC ("DynaRes_DAV_COL_MOUNT_HERE", proc614);
+  DEFINE_PROC ("DynaRes_DAV_DELETE", proc615);
+  DEFINE_PROC ("DynaRes_DAV_RES_UPLOAD", proc616);
+  DEFINE_PROC ("DynaRes_DAV_PROP_REMOVE", proc617);
+  DEFINE_PROC ("DynaRes_DAV_PROP_SET", proc618);
+  DEFINE_PROC ("DynaRes_DAV_PROP_GET", proc619);
+  DEFINE_PROC ("DynaRes_DAV_PROP_LIST", proc620);
+  DEFINE_PROC ("DynaRes_DAV_DIR_SINGLE", proc621);
+  DEFINE_PROC ("DynaRes_DAV_DIR_LIST", proc622);
+  DEFINE_PROC ("DynaRes_DAV_FC_PRED_METAS", proc623);
+  DEFINE_PROC ("DynaRes_DAV_FC_TABLE_METAS", proc624);
+  DEFINE_PROC ("DynaRes_DAV_FC_PRINT_WHERE", proc625);
+  DEFINE_PROC ("DynaRes_DAV_DIR_FILTER", proc626);
+  DEFINE_PROC ("DynaRes_DAV_SEARCH_ID", proc627);
+  DEFINE_PROC ("DynaRes_DAV_SEARCH_PATH", proc628);
+  DEFINE_PROC ("DynaRes_DAV_RES_UPLOAD_COPY", proc629);
+  DEFINE_PROC ("DynaRes_DAV_RES_UPLOAD_MOVE", proc630);
+  DEFINE_PROC ("DynaRes_DAV_RES_CONTENT", proc631);
+  DEFINE_PROC ("DynaRes_DAV_SYMLINK", proc632);
+  DEFINE_PROC ("DynaRes_DAV_DEREFERENCE_LIST", proc633);
+  DEFINE_PROC ("DynaRes_DAV_RESOLVE_PATH", proc634);
+  DEFINE_PROC ("DynaRes_DAV_LOCK", proc635);
+  DEFINE_PROC ("DynaRes_DAV_UNLOCK", proc636);
+  DEFINE_PROC ("DynaRes_DAV_IS_LOCKED", proc637);
+  DEFINE_PROC ("DynaRes_DAV_LIST_LOCKS", proc638);
+  DEFINE_PROC ("DynaRes_CF_PROPNAME_TO_COLNAME", proc639);
+  DEFINE_PROC ("DynaRes_CF_FEED_FROM_AND_WHERE", proc640);
+  DEFINE_PROC ("DynaRes_CF_LIST_PROP_DISTVALS", proc641);
+  DEFINE_PROC ("DynaRes_CF_GET_RDF_HITS", proc642);
+  DEFINE_PROC ("DynaRes_INSERT_RESOURCE", proc643);
 
   /* DET_Versioning.sql */
 
-  ddl_ensure_table ("WS.WS.SYS_DAV_RES_VERSION", tbl8);
-  ddl_ensure_table ("WS.WS.SYS_DAV_RES_DIFF", tbl9);
-  ddl_ensure_table ("WS.WS.SYS_DAV_RES_MERGE", tbl10);
-  ddl_ensure_table ("WS.WS.SYS_DAV_ACTIVITY", tbl11);
-  ddl_ensure_table ("WS.WS.SYS_DAV_WORKSPACE", tbl12);
-  ddl_ensure_table ("WS.WS.SYS_DAV_CONFOBJ", tbl13);
-  ddl_ensure_table ("WS.WS.SYS_DAV_BASELINE", tbl14);
-  ddl_ensure_table ("WS.WS.SYS_DAV_BASELINE_RES", tbl15);
+  ddl_ensure_table ("WS.WS.SYS_DAV_RES_VERSION", tbl9);
+  ddl_ensure_table ("WS.WS.SYS_DAV_RES_DIFF", tbl10);
+  ddl_ensure_table ("WS.WS.SYS_DAV_RES_MERGE", tbl11);
+  ddl_ensure_table ("WS.WS.SYS_DAV_ACTIVITY", tbl12);
+  ddl_ensure_table ("WS.WS.SYS_DAV_WORKSPACE", tbl13);
+  ddl_ensure_table ("WS.WS.SYS_DAV_CONFOBJ", tbl14);
+  ddl_ensure_table ("WS.WS.SYS_DAV_BASELINE", tbl15);
+  ddl_ensure_table ("WS.WS.SYS_DAV_BASELINE_RES", tbl16);
   ddl_std_proc (trig41, 0x0);
   ddl_std_proc (trig42, 0x0);
   ddl_std_proc (trig43, 0x0);
-  DEFINE_PROC ("Versioning_ADD_NEW_DIFF", proc633);
+  DEFINE_PROC ("Versioning_ADD_NEW_DIFF", proc644);
   ddl_std_proc (trig44, 0x0);
   ddl_std_proc (trig45, 0x0);
-  DEFINE_PROC ("DAV_GET_VERSION_CONTENT", proc634);
-  DEFINE_PROC ("DAV_RES_RESTORE", proc635);
-  DEFINE_PROC ("Versioning_DAV_AUTHENTICATE", proc636);
-  DEFINE_PROC ("Versioning_DAV_AUTHENTICATE_HTTP", proc637);
-  DEFINE_PROC ("Versioning_DAV_GET_PARENT", proc638);
-  DEFINE_PROC ("Versioning_DAV_COL_CREATE", proc639);
-  DEFINE_PROC ("Versioning_DAV_COL_MOUNT", proc640);
-  DEFINE_PROC ("Versioning_DAV_COL_MOUNT_HERE", proc641);
-  DEFINE_PROC ("Versioning_DAV_DELETE", proc642);
-  DEFINE_PROC ("Versioning_DAV_RES_UPLOAD", proc643);
-  DEFINE_PROC ("Versioning_DAV_PROP_REMOVE", proc644);
-  DEFINE_PROC ("Versioning_DAV_PROP_SET", proc645);
-  DEFINE_PROC ("Versioning_DAV_PROP_GET", proc646);
-  DEFINE_PROC ("Versioning_root_version", proc647);
-  DEFINE_PROC ("Versioning_version_set", proc648);
-  DEFINE_PROC ("Versioning_DAV_PROP_LIST", proc649);
-  DEFINE_PROC ("Versioning_DAV_DIR_SINGLE", proc650);
-  DEFINE_PROC ("Versioning_GET_BASE_PATH", proc651);
-  DEFINE_PROC ("Versioning_GET_ATTIC_PATH", proc652);
-  DEFINE_PROC ("Versioning_SET_LIST", proc653);
-  DEFINE_PROC ("Versioning_DAV_DIR_LIST", proc654);
-  DEFINE_PROC ("Versioning_DAV_DIR_FILTER", proc655);
-  DEFINE_PROC ("Versioning_DAV_SEARCH_ID", proc656);
-  DEFINE_PROC ("Versioning_DAV_SEARCH_PATH", proc657);
-  DEFINE_PROC ("Versioning_DAV_RES_UPLOAD_COPY", proc658);
-  DEFINE_PROC ("Versioning_DAV_RES_UPLOAD_MOVE", proc659);
-  DEFINE_PROC ("Versioning_DAV_RES_CONTENT", proc660);
-  DEFINE_PROC ("Versioning_DAV_SYMLINK", proc661);
-  DEFINE_PROC ("Versioning_DAV_DEREFERENCE_LIST", proc662);
-  DEFINE_PROC ("Versioning_DAV_RESOLVE_PATH", proc663);
-  DEFINE_PROC ("Versioning_DAV_LOCK", proc664);
-  DEFINE_PROC ("Versioning_DAV_UNLOCK", proc665);
-  DEFINE_PROC ("Versioning_DAV_IS_LOCKED", proc666);
-  DEFINE_PROC ("Versioning_DAV_LIST_LOCKS", proc667);
-  DEFINE_PROC ("Versioning_AUTO_VERSION_PROP", proc668);
-  DEFINE_PROC ("DAV_SET_VERSIONING_PROPERTIES", proc669);
-  DEFINE_PROC ("Versioning_REMOVE_V_PROPERTIES", proc670);
-  DEFINE_PROC ("DAV_REMOVE_VERSIONING_CONTROL_INT", proc671);
-  DEFINE_PROC ("Versioning_SETPROP", proc672);
-  DEFINE_PROC ("DAV_SET_VERSIONING_CONTROL", proc673);
-  DEFINE_PROC ("DAV_MKWORKSPACE", proc674);
-  DEFINE_PROC ("DAV_CHECKOUT", proc675);
-  DEFINE_PROC ("DAV_CHECKOUT_INT", proc676);
-  DEFINE_PROC ("DAV_CHECKIN", proc677);
-  DEFINE_PROC ("DAV_CHECKIN_INT", proc678);
-  DEFINE_PROC ("Versioning_CHECKOUT_INT", proc679);
+  DEFINE_PROC ("DAV_GET_VERSION_CONTENT", proc645);
+  DEFINE_PROC ("DAV_RES_RESTORE", proc646);
+  DEFINE_PROC ("Versioning_DAV_AUTHENTICATE", proc647);
+  DEFINE_PROC ("Versioning_DAV_AUTHENTICATE_HTTP", proc648);
+  DEFINE_PROC ("Versioning_DAV_GET_PARENT", proc649);
+  DEFINE_PROC ("Versioning_DAV_COL_CREATE", proc650);
+  DEFINE_PROC ("Versioning_DAV_COL_MOUNT", proc651);
+  DEFINE_PROC ("Versioning_DAV_COL_MOUNT_HERE", proc652);
+  DEFINE_PROC ("Versioning_DAV_DELETE", proc653);
+  DEFINE_PROC ("Versioning_DAV_RES_UPLOAD", proc654);
+  DEFINE_PROC ("Versioning_DAV_PROP_REMOVE", proc655);
+  DEFINE_PROC ("Versioning_DAV_PROP_SET", proc656);
+  DEFINE_PROC ("Versioning_DAV_PROP_GET", proc657);
+  DEFINE_PROC ("Versioning_root_version", proc658);
+  DEFINE_PROC ("Versioning_version_set", proc659);
+  DEFINE_PROC ("Versioning_DAV_PROP_LIST", proc660);
+  DEFINE_PROC ("Versioning_DAV_DIR_SINGLE", proc661);
+  DEFINE_PROC ("Versioning_GET_BASE_PATH", proc662);
+  DEFINE_PROC ("Versioning_GET_ATTIC_PATH", proc663);
+  DEFINE_PROC ("Versioning_SET_LIST", proc664);
+  DEFINE_PROC ("Versioning_DAV_DIR_LIST", proc665);
+  DEFINE_PROC ("Versioning_DAV_DIR_FILTER", proc666);
+  DEFINE_PROC ("Versioning_DAV_SEARCH_ID", proc667);
+  DEFINE_PROC ("Versioning_DAV_SEARCH_PATH", proc668);
+  DEFINE_PROC ("Versioning_DAV_RES_UPLOAD_COPY", proc669);
+  DEFINE_PROC ("Versioning_DAV_RES_UPLOAD_MOVE", proc670);
+  DEFINE_PROC ("Versioning_DAV_RES_CONTENT", proc671);
+  DEFINE_PROC ("Versioning_DAV_SYMLINK", proc672);
+  DEFINE_PROC ("Versioning_DAV_DEREFERENCE_LIST", proc673);
+  DEFINE_PROC ("Versioning_DAV_RESOLVE_PATH", proc674);
+  DEFINE_PROC ("Versioning_DAV_LOCK", proc675);
+  DEFINE_PROC ("Versioning_DAV_UNLOCK", proc676);
+  DEFINE_PROC ("Versioning_DAV_IS_LOCKED", proc677);
+  DEFINE_PROC ("Versioning_DAV_LIST_LOCKS", proc678);
+  DEFINE_PROC ("Versioning_AUTO_VERSION_PROP", proc679);
+  DEFINE_PROC ("DAV_SET_VERSIONING_PROPERTIES", proc680);
+  DEFINE_PROC ("Versioning_REMOVE_V_PROPERTIES", proc681);
+  DEFINE_PROC ("DAV_REMOVE_VERSIONING_CONTROL_INT", proc682);
+  DEFINE_PROC ("Versioning_SETPROP", proc683);
+  DEFINE_PROC ("DAV_SET_VERSIONING_CONTROL", proc684);
+  DEFINE_PROC ("DAV_MKWORKSPACE", proc685);
+  DEFINE_PROC ("DAV_CHECKOUT", proc686);
+  DEFINE_PROC ("DAV_CHECKOUT_INT", proc687);
+  DEFINE_PROC ("DAV_CHECKIN", proc688);
+  DEFINE_PROC ("DAV_CHECKIN_INT", proc689);
+  DEFINE_PROC ("Versioning_CHECKOUT_INT", proc690);
   ddl_std_proc (trig46, 0x0);
-  DEFINE_PROC ("DAV_VERSION_CONTROL", proc680);
-  DEFINE_PROC ("DAV_UNCHECKOUT", proc681);
-  DEFINE_PROC ("Versioning_Attic", proc682);
-  DEFINE_PROC ("Versioning_OTHER_FILES_IN_VVC", proc683); 
-  DEFINE_PUBLIC_PROC ("DAV_REMOVE_VERSION_CONTROL", proc684); 
-  DEFINE_PUBLIC_PROC ("DAV_VERSION_FOLD_INT", proc685);
+  DEFINE_PROC ("DAV_VERSION_CONTROL", proc691);
+  DEFINE_PROC ("DAV_UNCHECKOUT", proc692);
+  DEFINE_PROC ("Versioning_Attic", proc693);
+  DEFINE_PROC ("Versioning_OTHER_FILES_IN_VVC", proc694); 
+  DEFINE_PUBLIC_PROC ("DAV_REMOVE_VERSION_CONTROL", proc695); 
+  DEFINE_PUBLIC_PROC ("DAV_VERSION_FOLD_INT", proc696);
   ddl_std_proc (trig47, 0x0);
 
   /* xml_view.sql */
 
-  DEFINE_PROC ("XML_VIEW_PUBLISH", proc686);
-  DEFINE_PROC ("XML_VIEW_DROP", proc687);
+  DEFINE_PROC ("XML_VIEW_PUBLISH", proc697);
+  DEFINE_PROC ("XML_VIEW_DROP", proc698);
 }
 
 
diff --git a/libsrc/Wi/sql_code_dbp.c b/libsrc/Wi/sql_code_dbp.c
index af936f3..1798f47 100644
--- a/libsrc/Wi/sql_code_dbp.c
+++ b/libsrc/Wi/sql_code_dbp.c
@@ -1092,7 +1092,7 @@ static const char *proc28 =
 "http (\'<TR><TD CLASS=\"CopyrightBorder\" COLSPAN=\"2\"><IMG SRC=\"/admin/images/1x1.gif\" WIDTH=\"1\" HEIGHT=\"2\" ALT=\"\"></TD></TR>\');\n"
 "http (\'<TR><TD ALIGN=\"right\" COLSPAN=\"2\"><P CLASS=\"Copyright\">Virtuoso Server \');\n"
 "http (sys_stat(\'st_dbms_ver\'));\n"
-"http (\' DBPUMP Interface - Copyright© 1998-2011 OpenLink Software.</P></TD></TR>\');\n"
+"http (\' DBPUMP Interface - Copyright© 1998-2012 OpenLink Software.</P></TD></TR>\');\n"
 "http (\'</TABLE>\\n</BODY>\');\n"
 "}\n"
 "--src comp_html.sql:199\n";
@@ -2526,23 +2526,25 @@ static const char *proc74 =
 "--src pars_init.sql:22\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_ddk.c b/libsrc/Wi/sql_code_ddk.c
index 879bff7..77ce75c 100644
--- a/libsrc/Wi/sql_code_ddk.c
+++ b/libsrc/Wi/sql_code_ddk.c
@@ -3647,13 +3647,16 @@ static const char *tbl24 =
 "VQ_LEVEL	int default 0,\n"
 "VQ_VIA_SITEMAP int default 0,\n"
 "VQ_DT	timestamp,\n"
+"VQ_ORIGIN	IRI_ID_8,\n"
 "primary key (VQ_HOST, VQ_URL, VQ_ROOT))\n"
 "create index VQ_HOST_ROOT on WS.WS.VFS_QUEUE (VQ_HOST, VQ_ROOT)\n"
 "create index VQ_HOST_TIME on WS.WS.VFS_QUEUE (VQ_HOST, VQ_ROOT, VQ_STAT, VQ_TS, VQ_URL)\n"
-"create index VQ_TS on WS.WS.VFS_QUEUE (VQ_TS)\n";
+"create index VQ_TS on WS.WS.VFS_QUEUE (VQ_TS)\n"
+"create index VQ_ORIGIN on WS.WS.VFS_QUEUE (VQ_ORIGIN)    \n";
 
 static const char *tbl25 = 
 "create table WS.WS.VFS_SITE (\n"
+"VS_ID	integer identity,	\n"
 "VS_DESCR	varchar,\n"
 "VS_HOST 	varchar,\n"
 "VS_URL	varchar,\n"
@@ -3684,6 +3687,9 @@ static const char *tbl25 =
 "VS_ACCEPT_RDF int default 0,\n"
 "VS_THREADS  int default 1,\n"
 "VS_ROBOTS long varchar default null,\n"
+"VS_DELAY	float default 0,\n"
+"VS_TIMEOUT	float default null,\n"
+"VS_HEADERS  long varchar default null,\n"
 "primary key (VS_HOST, VS_ROOT))\n"
 "create index VS_HOST_ROOT on WS.WS.VFS_SITE (VS_HOST, VS_URL, VS_ROOT)\n";
 
@@ -3721,17 +3727,57 @@ static const char *alter7 =
 "alter table WS.WS.VFS_SITE add VS_ROBOTS long varchar default null\n";
 
 static const char *alter8 = 
-"alter table WS.WS.VFS_QUEUE add VQ_LEVEL int default 0\n";
+"alter table WS.WS.VFS_SITE add VS_DELAY float default 0\n";
 
 static const char *alter9 = 
-"alter table WS.WS.VFS_QUEUE add VQ_VIA_SITEMAP int default 0\n";
+"alter table WS.WS.VFS_SITE add VS_TIMEOUT  float default null\n";
 
 static const char *alter10 = 
-"alter table WS.WS.VFS_QUEUE add VQ_DT timestamp\n";
+"alter table WS.WS.VFS_SITE add VS_HEADERS  long varchar default null\n";
 
 static const char *alter11 = 
+"alter table WS.WS.VFS_SITE add VS_ID integer identity\n";
+
+static const char *alter12 = 
+"alter table WS.WS.VFS_QUEUE add VQ_LEVEL int default 0\n";
+
+static const char *alter13 = 
+"alter table WS.WS.VFS_QUEUE add VQ_VIA_SITEMAP int default 0\n";
+
+static const char *alter14 = 
+"alter table WS.WS.VFS_QUEUE add VQ_DT timestamp\n";
+
+static const char *alter15 = 
+"alter table WS.WS.VFS_QUEUE add VQ_ORIGIN IRI_ID_8\n";
+
+static const char *alter16 = 
 "alter table WS.WS.VFS_URL add VU_RES_ID int\n";
 
+static const char *proc26 = 
+"#line 222 \"[executable]/vfsddk.sql\"\n"
+"create procedure WS.WS.VFS_UPGRADE ()\n"
+"{\n"
+"declare inx int;\n"
+"declare arr any;\n"
+"if (not exists (select 1 from WS.WS.VFS_SITE where VS_ID is null))\n"
+"return;\n"
+"inx := 1;\n"
+"arr := (select DB.DBA.VECTOR_AGG (vector (VS_HOST, VS_ROOT)) from WS.WS.VFS_SITE);\n"
+"foreach (any x in arr) do\n"
+"{\n"
+"declare host, root varchar;\n"
+"host := x[0];\n"
+"root := x[1];\n"
+"update WS.WS.VFS_SITE set VS_ID = inx where VS_HOST = host and VS_ROOT = root;\n"
+"inx := inx + 1;\n"
+"}\n"
+"DB.DBA.SET_IDENTITY_COLUMN (\'WS.WS.VFS_SITE\', \'VS_ID\', inx);\n"
+"}\n"
+"--src vfsddk.sql:220\n";
+
+
+static const char *other851 = 
+" WS.WS.VFS_UPGRADE ()\n";
 /* virtual_dir.sql */
 
 static const char *tbl27 = 
@@ -3770,7 +3816,7 @@ static const char *tbl28 =
 "HA_LIMIT  integer default 0,\n"
 "PRIMARY KEY (HA_LIST, HA_ORDER, HA_CLIENT_IP, HA_FLAG))\n";
 
-static const char *alter12 = 
+static const char *alter17 = 
 "alter table HTTP_ACL add HA_LIMIT integer default 0\n";
 
 static const char *trig6 = 
@@ -3814,105 +3860,105 @@ static const char *view11 =
 "as select HA_OBJECT, HA_CLIENT_IP, HA_FLAG, HA_RW from DB.DBA.HTTP_ACL\n"
 "where upper (HA_LIST) = \'NEWS\'\n";
 
-static const char *other851 = 
+static const char *other852 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/DAV\', \'/DAV/\', 1, 1, NULL, NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other852 = 
+static const char *other853 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*sslini*\', \'*sslini*\', \'/DAV\', \'/DAV/\', 1, 1, NULL, NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other853 = 
+static const char *other854 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/admin\', \'/admin/\', 0, 0, \'admin_main.vsp\', NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other854 = 
+static const char *other855 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/install\', \'/install/\', 0, 0, \'install.vspx\', NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other855 = 
+static const char *other856 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*sslini*\', \'*sslini*\', \'/admin\', \'/admin/\', 0, 0, \'admin_main.vsp\', NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other856 = 
+static const char *other857 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/mime\', \'/mime/\', 0, 0, NULL, NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other857 = 
+static const char *other858 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/images\', \'/images/\', 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0\n"
 ")\n";
-static const char *other858 = 
+static const char *other859 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*sslini*\', \'*sslini*\', \'/mime\', \'/mime/\', 0, 0, NULL, NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other859 = 
+static const char *other860 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/doc\', \'/doc/\', 0, 0, NULL, NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other860 = 
+static const char *other861 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*sslini*\', \'*sslini*\', \'/doc\', \'/doc/\', 0, 0, NULL, NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other861 = 
+static const char *other862 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/SOAP\', \'/SOAP/\', 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, \'SOAP\', 0\n"
 ")\n";
-static const char *other862 = 
+static const char *other863 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*sslini*\', \'*sslini*\', \'/SOAP\', \'/SOAP/\', 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, \'SOAP\', 0\n"
 ")\n";
-static const char *other863 = 
+static const char *other864 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*ini*\', \'*ini*\', \'/vsmx\', \'/vsmx/\', 0, 0, \'vsmx.vspx\', NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *other864 = 
+static const char *other865 = 
 "insert soft DB.DBA.HTTP_PATH\n"
 "(\n"
 "HP_HOST, HP_LISTEN_HOST, HP_LPATH, HP_PPATH, HP_STORE_AS_DAV, HP_DIR_BROWSEABLE, HP_DEFAULT,\n"
 "HP_SECURITY, HP_REALM, HP_AUTH_FUNC, HP_POSTPROCESS_FUNC, HP_RUN_VSP_AS, HP_RUN_SOAP_AS, HP_PERSIST_SES_VARS)\n"
 "values ( \'*sslini*\', \'*sslini*\', \'/vsmx\', \'/vsmx/\', 0, 0, \'vsmx.vspx\', NULL, NULL, NULL, NULL, \'dba\', NULL, 0\n"
 ")\n";
-static const char *proc26 = 
+static const char *proc27 = 
 "#line 302 \"[executable]/virtual_dir.sql\"\n"
 "create procedure HTTP_SET_DBA_ADMIN (in realm varchar)\n"
 "{\n"
@@ -3932,7 +3978,7 @@ static const char *proc26 =
 "}\n"
 "--src virtual_dir.sql:300\n";
 
-static const char *proc27 = 
+static const char *proc28 = 
 "#line 321 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "DB.DBA.IS_EMPTY_OR_NULL (in x any)\n"
@@ -3943,7 +3989,7 @@ static const char *proc27 =
 "}\n"
 "--src virtual_dir.sql:319\n";
 
-static const char *proc28 = 
+static const char *proc29 = 
 "#line 332 \"[executable]/virtual_dir.sql\"\n"
 "create procedure INS_VIRTUAL_DIR (in lpath varchar, in ppath varchar)\n"
 "{\n"
@@ -3964,7 +4010,7 @@ static const char *proc28 =
 "}\n"
 "--src virtual_dir.sql:330\n";
 
-static const char *proc29 = 
+static const char *proc30 = 
 "#line 352 \"[executable]/virtual_dir.sql\"\n"
 "create procedure DEL_VIRTUAL_DIR (in lpath varchar)\n"
 "{\n"
@@ -3975,7 +4021,7 @@ static const char *proc29 =
 "}\n"
 "--src virtual_dir.sql:350\n";
 
-static const char *proc30 = 
+static const char *proc31 = 
 "#line 365 \"[executable]/virtual_dir.sql\"\n"
 "create procedure VHOST_DEFINE (in vhost varchar := \'*ini*\',\n"
 "in lhost varchar := \'*ini*\',\n"
@@ -4111,7 +4157,7 @@ static const char *proc30 =
 "}\n"
 "--src virtual_dir.sql:363\n";
 
-static const char *proc31 = 
+static const char *proc32 = 
 "#line 499 \"[executable]/virtual_dir.sql\"\n"
 "create procedure VHOST_MAP_RELOAD (in vhost varchar := \'*ini*\', in lhost varchar := \'*ini*\', in lpath varchar)\n"
 "{\n"
@@ -4170,7 +4216,7 @@ static const char *proc31 =
 "}\n"
 "--src virtual_dir.sql:497\n";
 
-static const char *proc32 = 
+static const char *proc33 = 
 "#line 557 \"[executable]/virtual_dir.sql\"\n"
 "create procedure VHOST_REMOVE (in vhost varchar := \'*ini*\',\n"
 "in lhost varchar := \'*ini*\',\n"
@@ -4250,12 +4296,12 @@ static const char *proc32 =
 "--src virtual_dir.sql:555\n";
 
 
-static const char *other865 = 
+static const char *other866 = 
 " WS.WS.URIQA_VHOST_RESET()\n";
 
-static const char *other866 = 
+static const char *other867 = 
 " WS.WS.SPARQL_VHOST_RESET()\n";
-static const char *proc33 = 
+static const char *proc34 = 
 "#line 644 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "HTTP_PROXY_ACCESS (in dst varchar)\n"
@@ -4327,7 +4373,7 @@ static const char *trig11 =
 "}\n"
 "--src virtual_dir.sql:718\n";
 
-static const char *proc34 = 
+static const char *proc35 = 
 "#line 727 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.HTTP_CACHE_CHECK (inout path any, inout lines any, inout check_fn any)\n"
 "{\n"
@@ -4362,10 +4408,8 @@ static const char *proc34 =
 "{\n"
 "set http_charset=charset;\n"
 "}\n"
-"http_header (concat (http_header_get (), \'ETag: \"\', tag,\n"
-"sprintf (\'\"\\r\\nContent-Length: %d\\r\\n\\r\\n\', length (cnt))));\n"
-"http_flush (2);\n"
-"ses_write (cnt);\n"
+"http_header (concat (http_header_get (), sprintf (\'ETag: \"%s\"\\r\\n\', tag)));\n"
+"http (cnt);\n"
 "}\n"
 "else\n"
 "{\n"
@@ -4391,8 +4435,8 @@ static const char *proc34 =
 "}\n"
 "--src virtual_dir.sql:725\n";
 
-static const char *proc35 = 
-"#line 789 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc36 = 
+"#line 787 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.HTTP_CACHE_STORE (inout path any, inout store int)\n"
 "{\n"
 "declare tag, cnt any;\n"
@@ -4428,10 +4472,10 @@ static const char *proc35 =
 "http_header (concat (http_header_get (), \'ETag: \"\', tag, \'\"\\r\\n\'));\n"
 "}\n"
 "}\n"
-"--src virtual_dir.sql:787\n";
+"--src virtual_dir.sql:785\n";
 
-static const char *proc36 = 
-"#line 827 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc37 = 
+"#line 825 \"[executable]/virtual_dir.sql\"\n"
 "create procedure virt_proxy_init ()\n"
 "{\n"
 "if (not exists (select 1 from \"DB\".\"DBA\".\"SYS_USERS\" where U_NAME = \'PROXY\'))\n"
@@ -4447,10 +4491,10 @@ static const char *proc36 =
 "opts=>vector(\'url_rewrite\', \'ext_http_proxy_rule_list1\'));\n"
 "registry_set (\'DB.DBA.virt_proxy_init_state\', \'1.1\');\n"
 "}\n"
-"--src virtual_dir.sql:825\n";
+"--src virtual_dir.sql:823\n";
 
-static const char *proc37 = 
-"#line 844 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc38 = 
+"#line 842 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "proxy_sp_html_error_page (in title varchar, in hd varchar, in message varchar)\n"
 "{\n"
@@ -4467,10 +4511,10 @@ static const char *proc37 =
 "http (\'</body>\');\n"
 "http (\'</html>\');\n"
 "}\n"
-"--src virtual_dir.sql:842\n";
+"--src virtual_dir.sql:840\n";
 
-static const char *proc38 = 
-"#line 868 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc39 = 
+"#line 866 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "str_fmt (in fmt_str varchar, in parm_arr any)\n"
 "{\n"
@@ -4508,7 +4552,7 @@ static const char *proc38 =
 "st := p + 1;\n"
 "}\n"
 "}\n"
-"--src virtual_dir.sql:866\n";
+"--src virtual_dir.sql:864\n";
 
 static const char *tbl31 = 
 "create table DB.DBA.PROXY_SP_QRY (\n"
@@ -4522,8 +4566,8 @@ static const char *tbl31 =
 "primary key (pspq_id)\n"
 ")\n";
 
-static const char *proc39 = 
-"#line 922 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc40 = 
+"#line 920 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "ext_http_proxy_exec_qry (in exec varchar, in params any)\n"
 "{\n"
@@ -4592,17 +4636,17 @@ static const char *proc39 =
 "\n"
 "http (ses);\n"
 "}\n"
-"--src virtual_dir.sql:920\n";
+"--src virtual_dir.sql:918\n";
 
-static const char *proc40 = 
-"#line 994 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc41 = 
+"#line 992 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "ext_http_proxy (in url varchar := null,\n"
 "in exec varchar := null,\n"
 "in header varchar := null,\n"
 "in force varchar := null,\n"
 "in \"output-format\" varchar := null,\n"
-"in get varchar := \'soft\',\n"
+"in get varchar := \'add\',\n"
 "in login varchar := \'\') __SOAP_HTTP \'text/html\'\n"
 "{\n"
 "declare hdr, content, req_hdr any;\n"
@@ -4699,14 +4743,16 @@ static const char *proc40 =
 "accept := \"output-format\";\n"
 "}\n"
 "stat := \'00000\';\n"
-"if (get not in (\'soft\', \'replacing\'))\n"
-"get := \'soft\';\n"
+"if (get not in (\'soft\', \'replacing\', \'add\'))\n"
+"get := \'add\';\n"
 "if (length (login))\n"
 "login := concat (\'define get:login \"\', login, \'\" \');\n"
 "else\n"
 "login := \'\';\n"
 "host := http_request_header(http_request_header(), \'Host\', null, null);\n"
 "ids := vector (\'rdf\', \'id/entity\', \'id\');\n"
+"if (not exists (select 1 from RDF_QUAD where G = iri_to_id (url, 0)))\n"
+"{\n"
 "foreach (varchar idn in ids) do\n"
 "{\n"
 "pref := \'http://\' || host || http_map_get (\'domain\') || \'/\' || idn || \'/\';\n"
@@ -4721,6 +4767,7 @@ static const char *proc40 =
 "url := \'nodeID:/\' || subseq (url, 6);\n"
 "}\n"
 "}\n"
+"}\n"
 "\n"
 "url := replace (url, \'\'\'\', \'%27\');\n"
 "url := replace (url, \'<\', \'%3C\');\n"
@@ -4822,10 +4869,10 @@ static const char *proc40 =
 "http (content);\n"
 "return \'\';\n"
 "}\n"
-"--src virtual_dir.sql:992\n";
+"--src virtual_dir.sql:990\n";
 
-static const char *proc41 = 
-"#line 1222 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc42 = 
+"#line 1223 \"[executable]/virtual_dir.sql\"\n"
 "create procedure\n"
 "DB.DBA.VHOST_DUMP_SQL (in lpath varchar, in vhost varchar := \'*ini*\', in lhost varchar := \'*ini*\')\n"
 "{\n"
@@ -4889,10 +4936,10 @@ static const char *proc41 =
 "}\n"
 "return string_output_string (ses);\n"
 "}\n"
-"--src virtual_dir.sql:1220\n";
+"--src virtual_dir.sql:1221\n";
 
-static const char *proc42 = 
-"#line 1288 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc43 = 
+"#line 1289 \"[executable]/virtual_dir.sql\"\n"
 "create procedure DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q (in accept varchar)\n"
 "{\n"
 "declare format, itm varchar;\n"
@@ -4927,10 +4974,10 @@ static const char *proc42 =
 "}\n"
 "return format;\n"
 "}\n"
-"--src virtual_dir.sql:1286\n";
+"--src virtual_dir.sql:1287\n";
 
-static const char *proc43 = 
-"#line 1324 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc44 = 
+"#line 1325 \"[executable]/virtual_dir.sql\"\n"
 "create procedure DB.DBA.HTTP_RDF_ACCEPT (in path varchar, in virtual_dir varchar, in lines any, in graph_mode int)\n"
 "{\n"
 "declare host, stat, msg, qry, data, meta, accept, format, graph, url, ssl varchar;\n"
@@ -4977,10 +5024,10 @@ static const char *proc43 =
 "signal (stat, msg);\n"
 "return 0;\n"
 "}\n"
-"--src virtual_dir.sql:1322\n";
+"--src virtual_dir.sql:1323\n";
 
-static const char *proc44 = 
-"#line 1372 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc45 = 
+"#line 1373 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.DIR_INDEX_MAKE_XML (inout _sheet varchar, in curdir varchar := null, in start_from varchar := null)\n"
 "{\n"
 "declare dirarr, filearr, fsize, xte_path, xte_list, xte_entry any;\n"
@@ -5051,9 +5098,9 @@ static const char *proc44 =
 "xte_nodebld_final (xte_path, xte_head (\'PATH\'));\n"
 "return xml_tree_doc (xte_path);\n"
 "}\n"
-"--src virtual_dir.sql:1370\n";
+"--src virtual_dir.sql:1371\n";
 
-static const char *other867 = 
+static const char *other868 = 
 "xslt_sheet (\'http://local.virt/dir_output\', xml_tree_doc (\'\n"
 "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n"
 "<xsl:output method=\"text\" encoding=\"UTF-8\" />\n"
@@ -5103,8 +5150,8 @@ static const char *other867 =
 "</xsl:template>\n"
 "\n"
 "</xsl:stylesheet>\'))\n";
-static const char *proc45 = 
-"#line 1497 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc46 = 
+"#line 1498 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.DIR_INDEX_XML (in path any, in params any, in lines any)\n"
 "{\n"
 "declare _html, _xml, _sheet varchar;\n"
@@ -5142,10 +5189,10 @@ static const char *proc45 =
 "set http_charset=\'UTF-8\';\n"
 "return http_value (xslt (ssheet_name, _xml));\n"
 "}\n"
-"--src virtual_dir.sql:1495\n";
+"--src virtual_dir.sql:1496\n";
 
-static const char *proc46 = 
-"#line 1536 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc47 = 
+"#line 1537 \"[executable]/virtual_dir.sql\"\n"
 "create procedure DB.DBA.SERVICES_WSIL (in path any, in params any, in lines any)\n"
 "{\n"
 "declare host, intf, requrl, proto, rhost varchar;\n"
@@ -5179,7 +5226,7 @@ static const char *proc46 =
 "}\n"
 "http(\'</inspection>\');\n"
 "}\n"
-"--src virtual_dir.sql:1534\n";
+"--src virtual_dir.sql:1535\n";
 
 static const char *tbl32 = 
 "create table WS.WS.HTTP_HOST_META (\n"
@@ -5187,8 +5234,8 @@ static const char *tbl32 =
 "HM_META	long varchar\n"
 ")\n";
 
-static const char *proc47 = 
-"#line 1579 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc48 = 
+"#line 1580 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.host_meta_add (in app varchar, in meta varchar)\n"
 "{\n"
 "\n"
@@ -5196,18 +5243,18 @@ static const char *proc47 =
 "insert replacing WS.WS.HTTP_HOST_META (HM_APP, HM_META)\n"
 "values (app, meta);\n"
 "}\n"
-"--src virtual_dir.sql:1577\n";
+"--src virtual_dir.sql:1578\n";
 
-static const char *proc48 = 
-"#line 1588 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc49 = 
+"#line 1589 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.host_meta_del (in app varchar)\n"
 "{\n"
 "delete from WS.WS.HTTP_HOST_META where HM_APP = app;\n"
 "}\n"
-"--src virtual_dir.sql:1586\n";
+"--src virtual_dir.sql:1587\n";
 
-static const char *proc49 = 
-"#line 1595 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc50 = 
+"#line 1596 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.\"host-meta\" (in format varchar := \'xml\') __SOAP_HTTP \'application/xrd+xml\'\n"
 "{\n"
 "declare ses, lines any;\n"
@@ -5233,15 +5280,15 @@ static const char *proc49 =
 "accept := DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q (http_request_header_full (lines, \'Accept\', \'*/*\'));\n"
 "if (format = \'json\' or accept = \'application/json\')\n"
 "{\n"
-"http_header (\'Content-Type: applicaition/json\\r\\n\');\n"
+"http_header (\'Content-Type: application/json\\r\\n\');\n"
 "http_xslt (\'http://local.virt/xrd2json\');\n"
 "}\n"
 "return ret;\n"
 "}\n"
-"--src virtual_dir.sql:1593\n";
+"--src virtual_dir.sql:1594\n";
 
-static const char *proc50 = 
-"#line 1627 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc51 = 
+"#line 1628 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.host_meta_init ()\n"
 "{\n"
 "if (not exists (select 1 from \"DB\".\"DBA\".\"SYS_USERS\" where U_NAME = \'WebMeta\'))\n"
@@ -5253,12 +5300,12 @@ static const char *proc50 =
 "DB.DBA.VHOST_REMOVE (lpath=>\'/.well-known\');\n"
 "DB.DBA.VHOST_DEFINE (lpath=>\'/.well-known\', ppath=>\'/SOAP/Http\', soap_user=>\'WebMeta\');\n"
 "}\n"
-"--src virtual_dir.sql:1625\n";
+"--src virtual_dir.sql:1626\n";
 
-static const char *other868 = 
+static const char *other869 = 
 "WS.WS.host_meta_init ()\n";
-static const char *proc51 = 
-"#line 1643 \"[executable]/virtual_dir.sql\"\n"
+static const char *proc52 = 
+"#line 1644 \"[executable]/virtual_dir.sql\"\n"
 "create procedure WS.WS.host_meta_dss ()\n"
 "{\n"
 "declare ses any;\n"
@@ -5290,7 +5337,7 @@ static const char *proc51 =
 "http (\'</Signature>\\n\', ses);\n"
 "return string_output_string (ses);\n"
 "}\n"
-"--src virtual_dir.sql:1641\n";
+"--src virtual_dir.sql:1642\n";
 
 /* url_rewrite.sql */
 
@@ -5333,7 +5380,7 @@ static const char *tbl35 =
 "primary key (VM_RULELIST, VM_URI, VM_VARIANT_URI))\n"
 "create unique index HTTP_VARIANT_MAP_ID on DB.DBA.HTTP_VARIANT_MAP (VM_ID)\n";
 
-static const char *proc52 = 
+static const char *proc53 = 
 "#line 87 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_CREATE_RULE (\n"
 "in rule_type int,\n"
@@ -5379,7 +5426,7 @@ static const char *proc52 =
 "}\n"
 "--src url_rewrite.sql:85\n";
 
-static const char *proc53 = 
+static const char *proc54 = 
 "#line 131 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_CREATE_SPRINTF_RULE (\n"
 "in rule_iri varchar,\n"
@@ -5399,7 +5446,7 @@ static const char *proc53 =
 "}\n"
 "--src url_rewrite.sql:129\n";
 
-static const char *proc54 = 
+static const char *proc55 = 
 "#line 149 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_CREATE_REGEX_RULE (\n"
 "in rule_iri varchar,\n"
@@ -5419,7 +5466,7 @@ static const char *proc54 =
 "}\n"
 "--src url_rewrite.sql:147\n";
 
-static const char *proc55 = 
+static const char *proc56 = 
 "#line 167 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_DROP_RULE (\n"
 "in rule_iri varchar,\n"
@@ -5443,7 +5490,7 @@ static const char *proc55 =
 "}\n"
 "--src url_rewrite.sql:165\n";
 
-static const char *proc56 = 
+static const char *proc57 = 
 "#line 189 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_CREATE_RULELIST (\n"
 "in rulelist_iri varchar,\n"
@@ -5472,7 +5519,7 @@ static const char *proc56 =
 "}\n"
 "--src url_rewrite.sql:187\n";
 
-static const char *proc57 = 
+static const char *proc58 = 
 "#line 216 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_DROP_RULELIST (\n"
 "in rulelist_iri varchar,\n"
@@ -5525,7 +5572,7 @@ static const char *proc57 =
 "}\n"
 "--src url_rewrite.sql:214\n";
 
-static const char *proc58 = 
+static const char *proc59 = 
 "#line 267 \"[executable]/url_rewrite.sql\"\n"
 "create function DB.DBA.URLREWRITE_ENUMERATE_RULES (\n"
 "in like_pattern_for_rule_iris varchar,\n"
@@ -5546,7 +5593,7 @@ static const char *proc58 =
 "}\n"
 "--src url_rewrite.sql:265\n";
 
-static const char *proc59 = 
+static const char *proc60 = 
 "#line 286 \"[executable]/url_rewrite.sql\"\n"
 "create function DB.DBA.URLREWRITE_ENUMERATE_RULELISTS (\n"
 "in like_pattern_for_rulelist_iris varchar,\n"
@@ -5568,7 +5615,7 @@ static const char *proc59 =
 "}\n"
 "--src url_rewrite.sql:284\n";
 
-static const char *proc60 = 
+static const char *proc61 = 
 "#line 306 \"[executable]/url_rewrite.sql\"\n"
 "create function DB.DBA.URLREWRITE_VPRINTF (\n"
 "in format varchar,\n"
@@ -5607,7 +5654,7 @@ static const char *proc60 =
 "}\n"
 "--src url_rewrite.sql:304\n";
 
-static const char *proc61 = 
+static const char *proc62 = 
 "#line 343 \"[executable]/url_rewrite.sql\"\n"
 "create function DB.DBA.URLREWRITE_SPRINTF_RESULTS (\n"
 "in nice_params any,\n"
@@ -5705,7 +5752,7 @@ static const char *proc61 =
 "}\n"
 "--src url_rewrite.sql:341\n";
 
-static const char *proc62 = 
+static const char *proc63 = 
 "#line 440 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_APPLY_RECURSIVE (\n"
 "in rulelist_iri varchar,\n"
@@ -5722,7 +5769,9 @@ static const char *proc62 =
 "out target_vhost_pkey any,\n"
 "out http_redir int,\n"
 "out http_headers varchar,\n"
-"inout lines any)\n"
+"inout lines any,\n"
+"in meth varchar\n"
+")\n"
 "returns integer\n"
 "{\n"
 "\n"
@@ -5732,7 +5781,7 @@ static const char *proc62 =
 "{\n"
 "if (DB.DBA.URLREWRITE_APPLY_RECURSIVE (cur_iri, nice_host,\n"
 "nice_lhost, nice_lpath, nice_get_params, nice_frag, post_params, accept_header, long_url, params,\n"
-"rule_iri, target_vhost_pkey, http_redir, http_headers, lines) = 1)\n"
+"rule_iri, target_vhost_pkey, http_redir, http_headers, lines, meth) = 1)\n"
 "return 1;\n"
 "}\n"
 "else\n"
@@ -5758,6 +5807,13 @@ static const char *proc62 =
 "goto next_rule;\n"
 "}\n"
 "\n"
+"if (URR_HTTP_REDIRECT is not null and URR_HTTP_REDIRECT > 299 and URR_HTTP_REDIRECT < 304 and meth not in (\'GET\', \'MGET\', \'HEAD\', \'OPTIONS\'))\n"
+"{\n"
+"if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\'))\n"
+"dbg_printf (\'skipping rule=[%s] because HTTP redirect cannot be done for HTTP %s\', URR_NICE_FORMAT, meth);\n"
+"goto next_rule;\n"
+"}\n"
+"\n"
 "if (URR_RULE_TYPE = 0)\n"
 "{\n"
 "\n"
@@ -5828,8 +5884,8 @@ static const char *proc62 =
 "}\n"
 "--src url_rewrite.sql:438\n";
 
-static const char *proc63 = 
-"#line 561 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc64 = 
+"#line 570 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_APPLY (\n"
 "in nice_url varchar,\n"
 "in post_params any,\n"
@@ -5863,7 +5919,7 @@ static const char *proc63 =
 "\n"
 "whenever not found goto no_rec;\n"
 "select top 1 HP_HOST, HP_LISTEN_HOST, HP_LPATH, get_keyword (\'url_rewrite\', deserialize (HP_OPTIONS), NULL) into db_host, db_lhost, db_lpath, top_rulelist_iri from HTTP_PATH where\n"
-"(HP_LISTEN_HOST = _lhost or HP_LISTEN_HOST = _lhost_port or (HP_LISTEN_HOST = \'*ini*\' and _lhost_port = cfg_item_value (virtuoso_ini_path (), \'HTTPServer\',\'ServerPort\'))) and\n"
+"(HP_LISTEN_HOST = _lhost or HP_LISTEN_HOST = _lhost_port or (HP_LISTEN_HOST = \'*ini*\' and _lhost_port = virtuoso_ini_item_value (\'HTTPServer\',\'ServerPort\'))) and\n"
 "HP_OPTIONS is not null and deserialize (HP_OPTIONS) is not null and\n"
 "left (_lpath, length (HP_LPATH)) = HP_LPATH order by HP_LPATH desc;\n"
 "if (db_host is null and db_lhost is null and db_lpath is null)\n"
@@ -5906,12 +5962,13 @@ static const char *proc63 =
 "target_vhost_pkey,\n"
 "http_redir,\n"
 "http_headers,\n"
-"lines);\n"
+"lines,\n"
+"\'GET\');\n"
 "}\n"
-"--src url_rewrite.sql:559\n";
+"--src url_rewrite.sql:568\n";
 
-static const char *proc64 = 
-"#line 641 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc65 = 
+"#line 651 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_TRY_INVERSE (\n"
 "in rule_iri varchar,\n"
 "in long_path varchar,\n"
@@ -6113,10 +6170,10 @@ static const char *proc64 =
 "nice_path := null;\n"
 "error_report := \'The rule \' || rule_iri || \' is not found\';\n"
 "}\n"
-"--src url_rewrite.sql:639\n";
+"--src url_rewrite.sql:649\n";
 
-static const char *proc65 = 
-"#line 844 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc66 = 
+"#line 854 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.HTTP_VARIANT_ADD (in rulelist_uri varchar,\n"
 "in uri varchar, in variant_uri varchar, in mime varchar,\n"
 "in qs float := 1.0, in _desc varchar := null,\n"
@@ -6156,20 +6213,20 @@ static const char *proc65 =
 "VM_LANG,VM_ENC,VM_DESCRIPTION,VM_ALGO, VM_CONTENT_LOCATION_HOOK)\n"
 "values (rulelist_uri, uri, variant_uri, qs, mime, lang, enc, _desc, algo, location_hook);\n"
 "}\n"
-"--src url_rewrite.sql:842\n";
+"--src url_rewrite.sql:852\n";
 
-static const char *proc66 = 
-"#line 885 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc67 = 
+"#line 895 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.HTTP_VARIANT_REMOVE (in rulelist_uri varchar, in uri varchar, in variant_uri varchar := \'%\')\n"
 "{\n"
 "if (not exists (select 1 from DB.DBA.URL_REWRITE_RULE_LIST where URRL_LIST = rulelist_uri))\n"
 "signal (\'42000\', \'Rule IRI \' || rulelist_uri || \' does not exist.\');\n"
 "delete from DB.DBA.HTTP_VARIANT_MAP where VM_RULELIST = rulelist_uri and VM_URI like uri and VM_VARIANT_URI like variant_uri;\n"
 "}\n"
-"--src url_rewrite.sql:883\n";
+"--src url_rewrite.sql:893\n";
 
-static const char *proc67 = 
-"#line 893 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc68 = 
+"#line 903 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_CALC_QS (in accept varchar, in s_accept varchar)\n"
 "{\n"
 "declare arr, tmp any;\n"
@@ -6210,10 +6267,10 @@ static const char *proc67 =
 "}\n"
 "return best_q;\n"
 "}\n"
-"--src url_rewrite.sql:891\n";
+"--src url_rewrite.sql:901\n";
 
-static const char *proc68 = 
-"#line 935 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc69 = 
+"#line 945 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.HTTP_URLREWRITE_TCN_LIST (inout li any)\n"
 "{\n"
 "http (\'<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\\n\');\n"
@@ -6226,10 +6283,10 @@ static const char *proc68 =
 "http (li);\n"
 "http (\'</ul>\\n</body></html>\');\n"
 "}\n"
-"--src url_rewrite.sql:933\n";
+"--src url_rewrite.sql:943\n";
 
-static const char *proc69 = 
-"#line 949 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc70 = 
+"#line 959 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.HTTP_URLREWRITE_APPLY_PATTERN (in pattern varchar, in str varchar, in format varchar)\n"
 "{\n"
 "declare arr, pars, ret, tmp any;\n"
@@ -6288,10 +6345,10 @@ static const char *proc69 =
 "}\n"
 "return ret;\n"
 "}\n"
-"--src url_rewrite.sql:947\n";
+"--src url_rewrite.sql:957\n";
 
-static const char *proc70 = 
-"#line 1010 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc71 = 
+"#line 1020 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.HTTP_LOC_NEW_URL (in url any)\n"
 "{\n"
 "declare ret, host any;\n"
@@ -6316,10 +6373,10 @@ static const char *proc70 =
 "\n"
 "return ret;\n"
 "}\n"
-"--src url_rewrite.sql:1008\n";
+"--src url_rewrite.sql:1018\n";
 
-static const char *proc71 = 
-"#line 1037 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc72 = 
+"#line 1047 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_APPLY_TCN (in rulelist_uri varchar, inout path varchar, inout lines any,\n"
 "out http_code any, out http_headers any)\n"
 "{\n"
@@ -6475,17 +6532,17 @@ static const char *proc71 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src url_rewrite.sql:1035\n";
+"--src url_rewrite.sql:1045\n";
 
-static const char *proc72 = 
-"#line 1194 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc73 = 
+"#line 1204 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar, in post_params any := null) returns any\n"
 "{\n"
 "declare long_url varchar;\n"
 "declare params, lines any;\n"
 "declare nice_vhost_pkey any;\n"
 "declare top_rulelist_iri varchar;\n"
-"declare rule_iri, in_path, qstr varchar;\n"
+"declare rule_iri, in_path, qstr, meth varchar;\n"
 "declare target_vhost_pkey, hf, accept, http_headers any;\n"
 "declare result, http_redir, http_tcn_code, tcn_rc, keep_lpath int;\n"
 "declare http_tcn_headers varchar;\n"
@@ -6499,6 +6556,7 @@ static const char *proc72 =
 "accept := null;\n"
 "qstr := null;\n"
 "keep_lpath := 0;\n"
+"meth := \'GET\';\n"
 "\n"
 "if (is_http_ctx ())\n"
 "{\n"
@@ -6515,6 +6573,7 @@ static const char *proc72 =
 "accept := http_request_header (lines, \'Accept\');\n"
 "if (not isstring (accept))\n"
 "accept := \'*/*\';\n"
+"meth := http_request_get (\'REQUEST_METHOD\');\n"
 "}\n"
 "else\n"
 "{\n"
@@ -6524,12 +6583,15 @@ static const char *proc72 =
 "if (length (qstr))\n"
 "in_path := in_path || \'?\' || qstr;\n"
 "\n"
+"if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\'))\n"
+"dbg_printf (\'Input URL=[%s]\', in_path);\n"
+"\n"
 "http_tcn_headers := http_headers := null;\n"
 "http_tcn_code := http_redir := null;\n"
 "tcn_rc := DB.DBA.URLREWRITE_APPLY_TCN (rule_list, in_path, lines, http_tcn_code, http_tcn_headers);\n"
 "\n"
 "result := DB.DBA.URLREWRITE_APPLY_RECURSIVE (rule_list, null, null, in_path, \'\', qstr, post_params, accept,\n"
-"long_url, params, rule_iri, target_vhost_pkey, http_redir, http_headers, lines);\n"
+"long_url, params, rule_iri, target_vhost_pkey, http_redir, http_headers, lines, meth);\n"
 "if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\') and length (long_url))\n"
 "dbg_printf (\'*** RETURN rule=[%s] URL=[%s]\', rule_iri, long_url);\n"
 "if (not tcn_rc and length (long_url))\n"
@@ -6590,18 +6652,21 @@ static const char *proc72 =
 "http_status_set (http_redir);\n"
 "http_header (http_header_get () || \'Location: \'|| DB.DBA.HTTP_LOC_NEW_URL (long_url) ||\'\\r\\n\');\n"
 "http_body_read ();\n"
+"if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\')) dbg_printf (\'HTTP redirect\');\n"
 "return 1;\n"
 "}\n"
 "else if (http_redir = 300)\n"
 "{\n"
 "http_status_set (http_redir);\n"
 "http_body_read ();\n"
+"if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\')) dbg_printf (\'HTTP redirect\');\n"
 "return 1;\n"
 "}\n"
 "else if (isinteger (http_redir) and http_redir > 399)\n"
 "{\n"
 "http_status_set (http_redir);\n"
 "http_body_read ();\n"
+"if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\')) dbg_printf (\'HTTP status\');\n"
 "return 1;\n"
 "}\n"
 "else\n"
@@ -6613,14 +6678,15 @@ static const char *proc72 =
 "http_internal_redirect (full_path, p_full_path, long_url, keep_lpath);\n"
 "pars := vector_concat (params, pars);\n"
 "http_set_params (pars);\n"
+"if (registry_get (\'__debug_url_rewrite\') in (\'1\', \'2\')) dbg_printf (\'Internal redirect\');\n"
 "}\n"
 "}\n"
 "return 0;\n"
 "}\n"
-"--src url_rewrite.sql:1192\n";
+"--src url_rewrite.sql:1202\n";
 
-static const char *proc73 = 
-"#line 1334 \"[executable]/url_rewrite.sql\"\n"
+static const char *proc74 = 
+"#line 1353 \"[executable]/url_rewrite.sql\"\n"
 "create procedure DB.DBA.URLREWRITE_DUMP_RULELIST_SQL (in rulelist_iri varchar)\n"
 "{\n"
 "declare ses, rules any;\n"
@@ -6689,30 +6755,32 @@ static const char *proc73 =
 "\n"
 "return string_output_string (ses);\n"
 "}\n"
-"--src url_rewrite.sql:1332\n";
+"--src url_rewrite.sql:1351\n";
 
-static const char *other869 = 
-"virt_proxy_init ()\n";
 static const char *other870 = 
+"virt_proxy_init ()\n";
+static const char *other871 = 
 "grant execute on ext_http_proxy to PROXY\n";
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -7672,10 +7740,16 @@ sqls_define_ddk (void)
   ddl_ensure_column ("WS.WS.VFS_SITE", "VS_ACCEPT_RDF", alter5, 0);
   ddl_ensure_column ("WS.WS.VFS_SITE", "VS_THREADS", alter6, 0);
   ddl_ensure_column ("WS.WS.VFS_SITE", "VS_ROBOTS", alter7, 0);
-  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_LEVEL", alter8, 0);
-  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_VIA_SITEMAP", alter9, 0);
-  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_DT", alter10, 0);
-  ddl_ensure_column ("WS.WS.VFS_URL", "VU_RES_ID", alter11, 0);
+  ddl_ensure_column ("WS.WS.VFS_SITE", "VS_DELAY", alter8, 0);
+  ddl_ensure_column ("WS.WS.VFS_SITE", "VS_TIMEOUT", alter9, 0);
+  ddl_ensure_column ("WS.WS.VFS_SITE", "VS_HEADERS", alter10, 0);
+  ddl_ensure_column ("WS.WS.VFS_SITE", "VS_ID", alter11, 0);
+  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_LEVEL", alter12, 0);
+  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_VIA_SITEMAP", alter13, 0);
+  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_DT", alter14, 0);
+  ddl_ensure_column ("WS.WS.VFS_QUEUE", "VQ_ORIGIN", alter15, 0);
+  ddl_ensure_column ("WS.WS.VFS_URL", "VU_RES_ID", alter16, 0);
+  DEFINE_PROC ("WS.WS.VFS_UPGRADE", proc26);
 
   dk_free_box (bootstrap_cli->cli_qualifier);
   bootstrap_cli->cli_qualifier =  saved_qualifier;
@@ -7684,13 +7758,12 @@ sqls_define_ddk (void)
 
   ddl_ensure_table ("DB.DBA.HTTP_PATH", tbl27);
   ddl_ensure_table ("DB.DBA.HTTP_ACL", tbl28);
-  ddl_ensure_column ("HTTP_ACL", "HA_LIMIT", alter12, 0);
+  ddl_ensure_column ("HTTP_ACL", "HA_LIMIT", alter17, 0);
   ddl_std_proc (trig6, 0x0);
   ddl_std_proc (trig7, 0x0);
   ddl_std_proc (trig8, 0x0);
   ddl_ensure_table ("DB.DBA.HTTP_PROXY_ACL", view10);
   ddl_ensure_table ("DB.DBA.NEWS_ACL", view11);
-  ddl_ensure_table ("do this always", other851);
   ddl_ensure_table ("do this always", other852);
   ddl_ensure_table ("do this always", other853);
   ddl_ensure_table ("do this always", other854);
@@ -7704,80 +7777,91 @@ sqls_define_ddk (void)
   ddl_ensure_table ("do this always", other862);
   ddl_ensure_table ("do this always", other863);
   ddl_ensure_table ("do this always", other864);
-  DEFINE_PROC ("HTTP_SET_DBA_ADMIN", proc26);
-  DEFINE_PROC ("DB.DBA.IS_EMPTY_OR_NULL", proc27);
-  DEFINE_PROC ("INS_VIRTUAL_DIR", proc28);
-  DEFINE_PROC ("DEL_VIRTUAL_DIR", proc29);
-  DEFINE_PROC ("VHOST_DEFINE", proc30);
-  DEFINE_PROC ("VHOST_MAP_RELOAD", proc31);
-  DEFINE_PROC ("VHOST_REMOVE", proc32);
-  DEFINE_PROC ("HTTP_PROXY_ACCESS", proc33);
+  ddl_ensure_table ("do this always", other865);
+  DEFINE_PROC ("HTTP_SET_DBA_ADMIN", proc27);
+  DEFINE_PROC ("DB.DBA.IS_EMPTY_OR_NULL", proc28);
+  DEFINE_PROC ("INS_VIRTUAL_DIR", proc29);
+  DEFINE_PROC ("DEL_VIRTUAL_DIR", proc30);
+  DEFINE_PROC ("VHOST_DEFINE", proc31);
+  DEFINE_PROC ("VHOST_MAP_RELOAD", proc32);
+  DEFINE_PROC ("VHOST_REMOVE", proc33);
+  DEFINE_PROC ("HTTP_PROXY_ACCESS", proc34);
   ddl_ensure_table ("WS.WS.SYS_RC_CACHE", tbl29);
   ddl_ensure_table ("WS.WS.SYS_CACHEABLE", tbl30);
   ddl_std_proc (trig9, 0x0);
   ddl_std_proc (trig10, 0x0);
   ddl_std_proc (trig11, 0x0);
-  DEFINE_PROC ("WS.WS.HTTP_CACHE_CHECK", proc34);
-  DEFINE_PROC ("WS.WS.HTTP_CACHE_STORE", proc35);
-  DEFINE_PROC ("virt_proxy_init", proc36);
-  DEFINE_PROC ("proxy_sp_html_error_page", proc37);
-  DEFINE_PROC ("str_fmt", proc38);
+  DEFINE_PROC ("WS.WS.HTTP_CACHE_CHECK", proc35);
+  DEFINE_PROC ("WS.WS.HTTP_CACHE_STORE", proc36);
+  DEFINE_PROC ("virt_proxy_init", proc37);
+  DEFINE_PROC ("proxy_sp_html_error_page", proc38);
+  DEFINE_PROC ("str_fmt", proc39);
   ddl_ensure_table ("DB.DBA.PROXY_SP_QRY", tbl31);
-  DEFINE_PROC ("ext_http_proxy_exec_qry", proc39);
-  DEFINE_PROC ("ext_http_proxy", proc40);
-  DEFINE_PROC ("DB.DBA.VHOST_DUMP_SQL", proc41);
-  DEFINE_PROC ("DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q", proc42);
-  DEFINE_PROC ("DB.DBA.HTTP_RDF_ACCEPT", proc43);
-  DEFINE_PROC ("WS.WS.DIR_INDEX_MAKE_XML", proc44);
-  ddl_ensure_table ("do this always", other867);
-  DEFINE_PROC ("WS.WS.DIR_INDEX_XML", proc45);
-  DEFINE_PROC ("DB.DBA.SERVICES_WSIL", proc46);
-  ddl_ensure_table ("WS.WS.HTTP_HOST_META", tbl32);
-  DEFINE_PROC ("WS.WS.host_meta_add", proc47);
-  DEFINE_PROC ("WS.WS.host_meta_del", proc48);
-  DEFINE_PROC ("WS.WS.host-meta", proc49);
-  DEFINE_PROC ("WS.WS.host_meta_init", proc50);
+  DEFINE_PROC ("ext_http_proxy_exec_qry", proc40);
+  DEFINE_PROC ("ext_http_proxy", proc41);
+  DEFINE_PROC ("DB.DBA.VHOST_DUMP_SQL", proc42);
+  DEFINE_PROC ("DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q", proc43);
+  DEFINE_PROC ("DB.DBA.HTTP_RDF_ACCEPT", proc44);
+  DEFINE_PROC ("WS.WS.DIR_INDEX_MAKE_XML", proc45);
   ddl_ensure_table ("do this always", other868);
-  DEFINE_PROC ("WS.WS.host_meta_dss", proc51);
+  DEFINE_PROC ("WS.WS.DIR_INDEX_XML", proc46);
+  DEFINE_PROC ("DB.DBA.SERVICES_WSIL", proc47);
+  ddl_ensure_table ("WS.WS.HTTP_HOST_META", tbl32);
+  DEFINE_PROC ("WS.WS.host_meta_add", proc48);
+  DEFINE_PROC ("WS.WS.host_meta_del", proc49);
+  DEFINE_PROC ("WS.WS.host-meta", proc50);
+  DEFINE_PROC ("WS.WS.host_meta_init", proc51);
+  ddl_ensure_table ("do this always", other869);
+  DEFINE_PROC ("WS.WS.host_meta_dss", proc52);
 
   /* url_rewrite.sql */
 
   ddl_ensure_table ("DB.DBA.URL_REWRITE_RULE_LIST", tbl33);
   ddl_ensure_table ("DB.DBA.URL_REWRITE_RULE", tbl34);
   ddl_ensure_table ("DB.DBA.HTTP_VARIANT_MAP", tbl35);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_RULE", proc52);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_SPRINTF_RULE", proc53);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_REGEX_RULE", proc54);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_DROP_RULE", proc55);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_RULELIST", proc56);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_DROP_RULELIST", proc57);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_ENUMERATE_RULES", proc58);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_ENUMERATE_RULELISTS", proc59);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_VPRINTF", proc60);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_SPRINTF_RESULTS", proc61);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_APPLY_RECURSIVE", proc62);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_APPLY", proc63);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_TRY_INVERSE", proc64);
-  DEFINE_PROC ("DB.DBA.HTTP_VARIANT_ADD", proc65);
-  DEFINE_PROC ("DB.DBA.HTTP_VARIANT_REMOVE", proc66);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_CALC_QS", proc67);
-  DEFINE_PROC ("DB.DBA.HTTP_URLREWRITE_TCN_LIST", proc68);
-  DEFINE_PROC ("DB.DBA.HTTP_URLREWRITE_APPLY_PATTERN", proc69);
-  DEFINE_PROC ("DB.DBA.HTTP_LOC_NEW_URL", proc70);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_APPLY_TCN", proc71);
-  DEFINE_PROC ("DB.DBA.HTTP_URLREWRITE", proc72);
-  DEFINE_PROC ("DB.DBA.URLREWRITE_DUMP_RULELIST_SQL", proc73);
-  ddl_ensure_table ("do this always", other869);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_RULE", proc53);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_SPRINTF_RULE", proc54);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_REGEX_RULE", proc55);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_DROP_RULE", proc56);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_CREATE_RULELIST", proc57);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_DROP_RULELIST", proc58);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_ENUMERATE_RULES", proc59);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_ENUMERATE_RULELISTS", proc60);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_VPRINTF", proc61);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_SPRINTF_RESULTS", proc62);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_APPLY_RECURSIVE", proc63);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_APPLY", proc64);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_TRY_INVERSE", proc65);
+  DEFINE_PROC ("DB.DBA.HTTP_VARIANT_ADD", proc66);
+  DEFINE_PROC ("DB.DBA.HTTP_VARIANT_REMOVE", proc67);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_CALC_QS", proc68);
+  DEFINE_PROC ("DB.DBA.HTTP_URLREWRITE_TCN_LIST", proc69);
+  DEFINE_PROC ("DB.DBA.HTTP_URLREWRITE_APPLY_PATTERN", proc70);
+  DEFINE_PROC ("DB.DBA.HTTP_LOC_NEW_URL", proc71);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_APPLY_TCN", proc72);
+  DEFINE_PROC ("DB.DBA.HTTP_URLREWRITE", proc73);
+  DEFINE_PROC ("DB.DBA.URLREWRITE_DUMP_RULELIST_SQL", proc74);
   ddl_ensure_table ("do this always", other870);
+  ddl_ensure_table ("do this always", other871);
 }
 
 
 void
 sqls_arfw_define_ddk (void)
 {
+  caddr_t saved_qualifier = bootstrap_cli->cli_qualifier;
+
+  /* vfsddk.sql */
+  bootstrap_cli->cli_qualifier = box_string ("WS");
+
+  ddl_ensure_table ("do this always", other851);
+
+  dk_free_box (bootstrap_cli->cli_qualifier);
+  bootstrap_cli->cli_qualifier =  saved_qualifier;
+
   /* virtual_dir.sql */
 
-  ddl_ensure_table ("do this always", other865);
   ddl_ensure_table ("do this always", other866);
+  ddl_ensure_table ("do this always", other867);
 
 }
diff --git a/libsrc/Wi/sql_code_imsg.c b/libsrc/Wi/sql_code_imsg.c
index 2fbacbc..2ecae1b 100644
--- a/libsrc/Wi/sql_code_imsg.c
+++ b/libsrc/Wi/sql_code_imsg.c
@@ -603,7 +603,7 @@ static const char *proc24 =
 "{\n"
 "declare _from_ini varchar;\n"
 "\n"
-"_from_ini := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'SpamFilter\');\n"
+"_from_ini := virtuoso_ini_item_value (\'HTTPServer\', \'SpamFilter\');\n"
 "\n"
 "if (_from_ini is NULL or _from_ini <> \'1\')\n"
 "registry_set (\'__spam_filtering\', \'0\');\n"
@@ -1395,7 +1395,7 @@ static const char *proc48 =
 "\n"
 "if (FTP_ANONYMOUS_CHECK (ftp_user))\n"
 "{\n"
-"home_dir := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'FTPServerAnonymousHome\');\n"
+"home_dir := virtuoso_ini_item_value (\'HTTPServer\', \'FTPServerAnonymousHome\');\n"
 "if (home_dir is NULL)\n"
 "home_dir := \'/DAV/\';\n"
 "else if (DAV_HIDE_ERROR (DAV_SEARCH_ID (home_dir, \'C\')) is null)\n"
@@ -1493,7 +1493,7 @@ static const char *proc52 =
 "create procedure FTP_ANONYMOUS_CHECK (in _user varchar)\n"
 "{\n"
 "if (upper (_user) = \'ANONYMOUS\' and\n"
-"cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'FTPServerAnonymousLogin\') = \'1\')\n"
+"virtuoso_ini_item_value (\'HTTPServer\', \'FTPServerAnonymousLogin\') = \'1\')\n"
 "return 1;\n"
 "\n"
 "return 0;\n"
@@ -1510,7 +1510,7 @@ static const char *proc53 =
 "{\n"
 "if (upper (a_uname) = \'ANONYMOUS\')\n"
 "{\n"
-"if (cfg_item_value (virtuoso_ini_path(), \'HTTPServer\', \'FTPServerAnonymousLogin\') = \'1\')\n"
+"if (virtuoso_ini_item_value (\'HTTPServer\', \'FTPServerAnonymousLogin\') = \'1\')\n"
 "return DAV_AUTHENTICATE (id, what, req, \'anonymous\', a_pwd, 1);\n"
 "return -12;\n"
 "}\n"
@@ -2656,8 +2656,8 @@ static const char *proc92 =
 "{\n"
 "declare _last, _min, _max any;\n"
 "\n"
-"_min := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'FTPServerMinFreePort\');\n"
-"_max := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'FTPServerMaxFreePort\');\n"
+"_min := virtuoso_ini_item_value (\'HTTPServer\', \'FTPServerMinFreePort\');\n"
+"_max := virtuoso_ini_item_value (\'HTTPServer\', \'FTPServerMaxFreePort\');\n"
 "\n"
 "if (_min is NULL) _min := 20000;\n"
 "if (_max is NULL) _max := 30000;\n"
@@ -2770,7 +2770,7 @@ static const char *proc98 =
 "declare log_file varchar;\n"
 "\n"
 "\n"
-"log_file := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'FTPServerLogFile\');\n"
+"log_file := virtuoso_ini_item_value (\'HTTPServer\', \'FTPServerLogFile\');\n"
 "\n"
 "if (log_file is NULL)\n"
 "goto finish;\n"
@@ -4905,8 +4905,8 @@ static const char *proc145 =
 "{\n"
 "declare _org, _from varchar;\n"
 "\n"
-"_org := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'NNTPOrganizationHeader\');\n"
-"_from := cfg_item_value(virtuoso_ini_path(), \'HTTPServer\', \'NNTPFromHeader\');\n"
+"_org := virtuoso_ini_item_value (\'HTTPServer\', \'NNTPOrganizationHeader\');\n"
+"_from := virtuoso_ini_item_value (\'HTTPServer\', \'NNTPFromHeader\');\n"
 "\n"
 "if (_org is NULL)\n"
 "_org := \'\';\n"
@@ -4934,36 +4934,6 @@ static const char *proc146 =
 
 /* admin_news.sql */
 
-static const char *proc147 = 
-"#line 23 \"[executable]/admin_news.sql\"\n"
-"create procedure\n"
-"adm_news_status (in STAT integer)\n"
-"{\n"
-"if (STAT = 1) return \'<DIV CLASS=\"status_ok\">OK</DIV>\';\n"
-"else if (STAT is NULL) return \'<DIV CLASS=\"status_ok\">New</DIV>\';\n"
-"else if (STAT = 3) return \'<DIV CLASS=\"status_wip\">OK*</DIV>\';\n"
-"else if (STAT = 7) return \'<DIV CLASS=\"status_wip\">Pending</DIV>\';\n"
-"else if (STAT = 9) return \'<DIV CLASS=\"status_wip\">Updating...</DIV>\';\n"
-"else return \'<DIV CLASS=\"status_err\">Unsuccessful</DIV>\';\n"
-"}\n"
-"--src admin_news.sql:21\n";
-
-static const char *proc148 = 
-"#line 35 \"[executable]/admin_news.sql\"\n"
-"create procedure\n"
-"DB.DBA.adm_mailaddr_pretty (in email_addr varchar)\n"
-"{\n"
-"declare _email, _name varchar;\n"
-"email_addr := coalesce(email_addr, \'Not Provided\');\n"
-"_name := email_addr;\n"
-"_name := substring(_name, 1, coalesce(strstr(_name, \'<\') -1, length(_name)));\n"
-"_email := coalesce(regexp_substr(\'([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)\', email_addr, 0), email_addr);\n"
-"_name := replace (_name, \'\"\', \'\');\n"
-"_name := coalesce(_name, _email);\n"
-"return sprintf(\'\\n<A HREF=\"mailto:%s\">%s</A>\\n\', _email, _name);\n"
-"}\n"
-"--src admin_news.sql:33\n";
-
 static const char *tbl6 = 
 "CREATE TABLE \"DB\".\"DBA\".\"NEWS_GROUPS_AVAILABLE\" (\n"
 "\"NS_ID\" INTEGER NOT NULL REFERENCES \"DB\".\"DBA\".\"NEWS_SERVERS\"(\"NS_ID\") on delete cascade,\n"
@@ -4978,8 +4948,8 @@ static const char *tbl6 =
 ")\n"
 "CREATE UNIQUE INDEX GROUPS_AVAILABLE ON DB.DBA.NEWS_GROUPS_AVAILABLE(NAME, NS_ID)\n";
 
-static const char *proc149 = 
-"#line 64 \"[executable]/admin_news.sql\"\n"
+static const char *proc147 = 
+"#line 39 \"[executable]/admin_news.sql\"\n"
 "CREATE PROCEDURE DB.DBA.populate_groups_available (in _ns_id integer)\n"
 "{\n"
 "declare _list, _row any;\n"
@@ -5031,10 +5001,10 @@ static const char *proc149 =
 "UPDATE \"DB\".\"DBA\".\"NEWS_GROUPS_AVAILABLE\" SET \"UPDATED\" = \'R\' WHERE \"NS_ID\" = _ns_id AND \"UPDATED\" = \'N\';\n"
 "return len;\n"
 "}\n"
-"--src admin_news.sql:62\n";
+"--src admin_news.sql:37\n";
 
 static const char *trig6 = 
-"#line 117 \"[executable]/admin_news.sql\"\n"
+"#line 92 \"[executable]/admin_news.sql\"\n"
 "CREATE TRIGGER GetGroups AFTER INSERT ON \"DB\".\"DBA\".\"NEWS_SERVERS\"\n"
 "{\n"
 "INSERT INTO \"DB\".\"DBA\".\"SYS_SCHEDULED_EVENT\"(SE_NAME, SE_START, SE_SQL, SE_INTERVAL)\n"
@@ -5042,36 +5012,38 @@ static const char *trig6 =
 "concat(\'\"DB\".\"DBA\".\"populate_groups_available\"(\', cast(\"NS_ID\" as varchar), \')\'), 100);\n"
 "\n"
 "}\n"
-"--src admin_news.sql:115\n";
+"--src admin_news.sql:90\n";
 
 static const char *trig7 = 
-"#line 126 \"[executable]/admin_news.sql\"\n"
+"#line 101 \"[executable]/admin_news.sql\"\n"
 "CREATE TRIGGER GetGroupsStop AFTER DELETE ON \"DB\".\"DBA\".\"NEWS_SERVERS\"\n"
 "{\n"
 "delete from \"DB\".\"DBA\".\"SYS_SCHEDULED_EVENT\"\n"
 "where SE_NAME = concat(\'UPD_Avail_Grps_\', NS_SERVER);\n"
 "\n"
 "}\n"
-"--src admin_news.sql:124\n";
+"--src admin_news.sql:99\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -5258,10 +5230,8 @@ sqls_define_imsg (void)
 
   /* admin_news.sql */
 
-  DEFINE_PROC ("adm_news_status", proc147);
-  DEFINE_PROC ("DB.DBA.adm_mailaddr_pretty", proc148);
   ddl_ensure_table ("DB.DBA.NEWS_GROUPS_AVAILABLE", tbl6);
-  DEFINE_PROC ("DB.DBA.populate_groups_available", proc149);
+  DEFINE_PROC ("DB.DBA.populate_groups_available", proc147);
   ddl_std_proc (trig6, 0x0);
   ddl_std_proc (trig7, 0x0);
 }
diff --git a/libsrc/Wi/sql_code_pldbg.c b/libsrc/Wi/sql_code_pldbg.c
index a9c7664..513a143 100644
--- a/libsrc/Wi/sql_code_pldbg.c
+++ b/libsrc/Wi/sql_code_pldbg.c
@@ -10,12 +10,12 @@ static const char *xsl1[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: cov_report.xsl,v 1.3.2.1 2009/04/16 09:48:07 source Exp $\n"
+" -  $Id: cov_report.xsl,v 1.3.2.2 2012/03/08 12:55:33 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2009 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -97,12 +97,12 @@ static const char *xsl2[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: cov_time.xsl,v 1.5 2009/04/09 13:22:12 source Exp $\n"
+" -  $Id: cov_time.xsl,v 1.5.2.1 2012/03/08 12:55:33 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -227,23 +227,25 @@ static query_t *xslt_define_qr;
   }
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_repl.c b/libsrc/Wi/sql_code_repl.c
index c7f6c83..bcb4106 100644
--- a/libsrc/Wi/sql_code_repl.c
+++ b/libsrc/Wi/sql_code_repl.c
@@ -2453,8 +2453,8 @@ static const char *proc45 =
 "--src repl.sql:1604\n";
 
 static const char *proc46 = 
-"#line 1625 \"[executable]/repl.sql\"\n"
-"create procedure __INT_REPL_ALTER_REDO_TRIGGERS (in tb varchar)\n"
+"#line 1626 \"[executable]/repl.sql\"\n"
+" create procedure __INT_REPL_ALTER_REDO_TRIGGERS (in tb varchar)\n"
 "{\n"
 "for (select\n"
 "TI_OPTIONS as _ti_options, TI_ACCT as _ti_acct\n"
@@ -2480,10 +2480,10 @@ static const char *proc46 =
 "_is_updatable);\n"
 "}\n"
 "}\n"
-"--src repl.sql:1623\n";
+"--src repl.sql:1624\n";
 
 static const char *proc47 = 
-"#line 1653 \"[executable]/repl.sql\"\n"
+"#line 1654 \"[executable]/repl.sql\"\n"
 "create procedure __REPL_DDL_FK_MODIFY_PROPAGATE (in tb varchar, in op integer, in decl any, in orig_pkt varchar)\n"
 "{\n"
 "for (select\n"
@@ -2519,10 +2519,10 @@ static const char *proc47 =
 "_next:;\n"
 "}\n"
 "}\n"
-"--src repl.sql:1651\n";
+"--src repl.sql:1652\n";
 
 static const char *proc48 = 
-"#line 1690 \"[executable]/repl.sql\"\n"
+"#line 1691 \"[executable]/repl.sql\"\n"
 "create procedure REPL_SUBSCR_TBL (in serv varchar, in _pub varchar, in tbl varchar, in _is_updatable integer)\n"
 "{\n"
 "declare state, message, stmt, stmtidx  varchar;\n"
@@ -2830,10 +2830,10 @@ static const char *proc48 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src repl.sql:1688\n";
+"--src repl.sql:1689\n";
 
 static const char *proc49 = 
-"#line 1999 \"[executable]/repl.sql\"\n"
+"#line 2000 \"[executable]/repl.sql\"\n"
 "create procedure __REPL_SUBSCR_TBL_TRIGGERS (\n"
 "in serv varchar,\n"
 "in _pub varchar,\n"
@@ -2996,10 +2996,10 @@ static const char *proc49 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src repl.sql:1997\n";
+"--src repl.sql:1998\n";
 
 static const char *proc50 = 
-"#line 2163 \"[executable]/repl.sql\"\n"
+"#line 2164 \"[executable]/repl.sql\"\n"
 "create procedure REPL_GRANT (in _acct varchar, in grantee varchar)\n"
 "{\n"
 "declare acct varchar;\n"
@@ -3015,10 +3015,10 @@ static const char *proc50 =
 "__repl_grant (acct, grantee);\n"
 "}\n"
 "}\n"
-"--src repl.sql:2161\n";
+"--src repl.sql:2162\n";
 
 static const char *proc51 = 
-"#line 2181 \"[executable]/repl.sql\"\n"
+"#line 2182 \"[executable]/repl.sql\"\n"
 "create procedure REPL_REVOKE (in _acct varchar, in grantee varchar)\n"
 "{\n"
 "declare acct varchar;\n"
@@ -3041,10 +3041,10 @@ static const char *proc51 =
 "else\n"
 "signal (\'37000\', concat (\'The grantee \'\'\', grantee, \'\'\' does not exist\'), \'TR051\');\n"
 "}\n"
-"--src repl.sql:2179\n";
+"--src repl.sql:2180\n";
 
 static const char *proc52 = 
-"#line 2205 \"[executable]/repl.sql\"\n"
+"#line 2206 \"[executable]/repl.sql\"\n"
 "create procedure REPL_DAV_PROC (in coltbl varchar, in restbl varchar, in dav_u any, in dav_g any)\n"
 "{\n"
 "declare str, stat, msg varchar;\n"
@@ -3097,10 +3097,10 @@ static const char *proc52 =
 "stat := \'00000\'; msg :=\'\';\n"
 "exec (str, stat, msg);\n"
 "}\n"
-"--src repl.sql:2203\n";
+"--src repl.sql:2204\n";
 
 static const char *proc53 = 
-"#line 2259 \"[executable]/repl.sql\"\n"
+"#line 2260 \"[executable]/repl.sql\"\n"
 "create procedure DAV_MKCOL (in pathstr varchar, in perms varchar, in dav_u integer, in dav_g integer)\n"
 "{\n"
 "declare _path, _np any;\n"
@@ -3131,10 +3131,10 @@ static const char *proc53 =
 "}\n"
 "return _id;\n"
 "}\n"
-"--src repl.sql:2257\n";
+"--src repl.sql:2258\n";
 
 static const char *proc54 = 
-"#line 2292 \"[executable]/repl.sql\"\n"
+"#line 2293 \"[executable]/repl.sql\"\n"
 "create procedure REPL_DAV_FILL (in _srv varchar, in _coll varchar, in dav_u integer, in dav_g integer)\n"
 "{\n"
 "declare _addr, _stat, _msg varchar;\n"
@@ -3171,10 +3171,10 @@ static const char *proc54 =
 "else\n"
 "return _msg;\n"
 "}\n"
-"--src repl.sql:2290\n";
+"--src repl.sql:2291\n";
 
 static const char *proc55 = 
-"#line 2330 \"[executable]/repl.sql\"\n"
+"#line 2331 \"[executable]/repl.sql\"\n"
 "create procedure REPL_INIT_COPY (in srv varchar, in _acct varchar, in ret_err integer := 0)\n"
 "{\n"
 "declare txt, sel, src_cols, src_table, _stat, _msg, server, acct varchar;\n"
@@ -3418,10 +3418,10 @@ static const char *proc55 =
 "_ret_err := NULL;\n"
 "return _ret_err;\n"
 "}\n"
-"--src repl.sql:2328\n";
+"--src repl.sql:2329\n";
 
 static const char *proc56 = 
-"#line 2576 \"[executable]/repl.sql\"\n"
+"#line 2577 \"[executable]/repl.sql\"\n"
 "create procedure REPL_SUB_ITEM (in srv varchar, in _acct varchar,\n"
 "in i varchar, in t integer, in opt varchar, in cm integer)\n"
 "{\n"
@@ -3581,10 +3581,10 @@ static const char *proc56 =
 "\n"
 "return;\n"
 "}\n"
-"--src repl.sql:2574\n";
+"--src repl.sql:2575\n";
 
 static const char *proc57 = 
-"#line 2737 \"[executable]/repl.sql\"\n"
+"#line 2738 \"[executable]/repl.sql\"\n"
 "create procedure REPL_SERVER_RENAME (in old_name varchar, in new_name varchar)\n"
 "{\n"
 "declare rc varchar;\n"
@@ -3614,18 +3614,18 @@ static const char *proc57 =
 "rollback work;\n"
 "signal (\'42000\', rc, \'TR058\');\n"
 "}\n"
-"--src repl.sql:2735\n";
+"--src repl.sql:2736\n";
 
 static const char *proc58 = 
-"#line 2769 \"[executable]/repl.sql\"\n"
+"#line 2770 \"[executable]/repl.sql\"\n"
 "create procedure REPL_SYNC_ALL ()\n"
 "{\n"
 "DB.DBA.SYNC_REPL();\n"
 "}\n"
-"--src repl.sql:2767\n";
+"--src repl.sql:2768\n";
 
 static const char *proc59 = 
-"#line 2775 \"[executable]/repl.sql\"\n"
+"#line 2776 \"[executable]/repl.sql\"\n"
 "create procedure REPL_ADD_CR (\n"
 "in _tbl varchar,\n"
 "\n"
@@ -3863,10 +3863,10 @@ static const char *proc59 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src repl.sql:2773\n";
+"--src repl.sql:2774\n";
 
 static const char *proc60 = 
-"#line 3014 \"[executable]/repl.sql\"\n"
+"#line 3015 \"[executable]/repl.sql\"\n"
 "create procedure REPL_IS_UPDATABLE (in _server varchar, in _account varchar)\n"
 "{\n"
 "declare _is_updatable integer;\n"
@@ -3888,10 +3888,10 @@ static const char *proc60 =
 "\n"
 "return _is_updatable;\n"
 "}\n"
-"--src repl.sql:3012\n";
+"--src repl.sql:3013\n";
 
 static const char *proc61 = 
-"#line 3037 \"[executable]/repl.sql\"\n"
+"#line 3038 \"[executable]/repl.sql\"\n"
 "create procedure REPL_DSN (in _server varchar)\n"
 "{\n"
 "declare _dsn varchar;\n"
@@ -3901,10 +3901,10 @@ static const char *proc61 =
 "nf:\n"
 "return _dsn;\n"
 "}\n"
-"--src repl.sql:3035\n";
+"--src repl.sql:3036\n";
 
 static const char *proc62 = 
-"#line 3048 \"[executable]/repl.sql\"\n"
+"#line 3049 \"[executable]/repl.sql\"\n"
 "create procedure REPL_ENSURE_RDS (\n"
 "in _dsn varchar, in _usr varchar, in _pwd varchar)\n"
 "{\n"
@@ -3917,10 +3917,10 @@ static const char *proc62 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src repl.sql:3046\n";
+"--src repl.sql:3047\n";
 
 static const char *proc63 = 
-"#line 3062 \"[executable]/repl.sql\"\n"
+"#line 3063 \"[executable]/repl.sql\"\n"
 "create procedure REPL_ENSURE_TABLE_ATTACHED (\n"
 "in _dsn varchar, in _tbl varchar, in _local_tbl varchar := null)\n"
 "returns varchar\n"
@@ -3939,10 +3939,10 @@ static const char *proc63 =
 "}\n"
 "return _local_tbl;\n"
 "}\n"
-"--src repl.sql:3060\n";
+"--src repl.sql:3061\n";
 
 static const char *proc64 = 
-"#line 3082 \"[executable]/repl.sql\"\n"
+"#line 3083 \"[executable]/repl.sql\"\n"
 "create procedure REPL_ENSURE_VIEW_ATTACHED (\n"
 "in _dsn varchar, in _tbl varchar, in _pklist any)\n"
 "returns varchar\n"
@@ -3961,10 +3961,10 @@ static const char *proc64 =
 "}\n"
 "return _local_tbl;\n"
 "}\n"
-"--src repl.sql:3080\n";
+"--src repl.sql:3081\n";
 
 static const char *proc65 = 
-"#line 3102 \"[executable]/repl.sql\"\n"
+"#line 3103 \"[executable]/repl.sql\"\n"
 "create procedure DB.DBA.REPL_TRX_CHECK ()\n"
 "{\n"
 "declare ini, cur varchar;\n"
@@ -3987,29 +3987,31 @@ static const char *proc65 =
 "registry_set (\'__repl_this_server\', ini);\n"
 "}\n"
 "}\n"
-"--src repl.sql:3100\n";
+"--src repl.sql:3101\n";
 
 
 static const char *other4 = 
 " DB.DBA.REPL_TRX_CHECK ()\n";
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -4084,8 +4086,8 @@ sqls_define_repl (void)
   DEFINE_PROC ("REPL_SUBSCR_TBL_FKS", proc42);
   DEFINE_PROC ("REPL_PRINT_COL_DEF", proc43); 
   DEFINE_OVERWRITE_PROC ("__INT_REPL_ALTER_ADD_COL", proc44); 
-  DEFINE_OVERWRITE_PROC ("__INT_REPL_ALTER_DROP_COL", proc45);
-  DEFINE_PROC ("__INT_REPL_ALTER_REDO_TRIGGERS", proc46);
+  DEFINE_OVERWRITE_PROC ("__INT_REPL_ALTER_DROP_COL", proc45); 
+  DEFINE_OVERWRITE_PROC ("__INT_REPL_ALTER_REDO_TRIGGERS", proc46);
   DEFINE_PROC ("__REPL_DDL_FK_MODIFY_PROPAGATE", proc47);
   DEFINE_PROC ("REPL_SUBSCR_TBL", proc48);
   DEFINE_PROC ("__REPL_SUBSCR_TBL_TRIGGERS", proc49);
diff --git a/libsrc/Wi/sql_code_sparql.c b/libsrc/Wi/sql_code_sparql.c
index 8196167..8a51b17 100644
--- a/libsrc/Wi/sql_code_sparql.c
+++ b/libsrc/Wi/sql_code_sparql.c
@@ -21,40 +21,44 @@ static const char *tbl0 =
 "create distinct no primary key ref bitmap index RDF_QUAD_GS on RDF_QUAD (G, S) partition (S int (0hexffff00))\n"
 "create distinct no primary key ref index RDF_QUAD_OP on RDF_QUAD (O, P) partition (O varchar (-1, 0hexffff))\n";
 
+static const char *tbl1 = 
+"create table DB.DBA.RDF_QUAD_RECOV_TMP (\n"
+"G1 IRI_ID_8,  S1 IRI_ID_8,  P1 IRI_ID_8,  O1 any,  primary key (P1, S1, O1, G1))\n"
+"alter index RDF_QUAD_RECOV_TMP on DB.DBA.RDF_QUAD_RECOV_TMP partition (S1 int (0hexffff00))\n"
+"create bitmap index RDF_QUAD_RECOV_TMP_POGS on RDF_QUAD_RECOV_TMP (P1, O1, G1, S1) partition (O1 varchar (-1, 0hexffff))\n"
+"create distinct no primary key ref index RDF_QUAD_RECOV_TMP_OP on RDF_QUAD_RECOV_TMP (O1, P1) partition (O1 varchar (-1, 0hexffff))\n";
+
 static const char *proc0 = 
-"#line 39 \"[executable]/sparql.sql\"\n"
+"#line 46 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (in qname any) returns IRI_ID\n"
 "{\n"
 "return iri_to_id_nosignal (qname);\n"
 "}\n"
-"--src sparql.sql:37\n";
+"--src sparql.sql:44\n";
 
 static const char *proc1 = 
-"#line 45 \"[executable]/sparql.sql\"\n"
+"#line 52 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP (in qname any) returns IRI_ID\n"
 "{\n"
 "return iri_to_id_nosignal (qname, 0);\n"
 "}\n"
-"--src sparql.sql:43\n";
-
-
-static const char *other0 = 
-" DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (null)\n";
+"--src sparql.sql:50\n";
 
-static const char *other1 = 
-" DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP (null)\n";
 static const char *proc2 = 
-"#line 59 \"[executable]/sparql.sql\"\n"
+"#line 58 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QNAME_OF_IID (in iid IRI_ID) returns varchar\n"
 "{\n"
 "return id_to_iri_nosignal (iid);\n"
 "}\n"
-"--src sparql.sql:57\n";
-
+"--src sparql.sql:56\n";
 
+static const char *other0 = 
+"DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE (null)\n";
+static const char *other1 = 
+"DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP (null)\n";
 static const char *other2 = 
-" DB.DBA.RDF_QNAME_OF_IID (null)\n";
-static const char *tbl1 = 
+"DB.DBA.RDF_QNAME_OF_IID (null)\n";
+static const char *tbl2 = 
 "create table DB.DBA.RDF_OBJ (\n"
 "RO_ID bigint primary key,\n"
 "RO_VAL varchar not null,\n"
@@ -67,12 +71,12 @@ static const char *tbl1 =
 "create index RO_VAL on DB.DBA.RDF_OBJ (RO_VAL, RO_DT_AND_LANG)\n"
 "partition (RO_VAL varchar (-4, 0hexffff))\n";
 
-static const char *tbl2 = 
+static const char *tbl3 = 
 "create table DB.DBA.RO_START (RS_START varchar, RS_DT_AND_LANG int, RS_RO_ID any,\n"
 "primary key (RS_START, RS_DT_AND_LANG, RS_RO_ID))\n"
 "alter index RO_START on DB.DBA.RO_START partition (RS_RO_ID varchar (-1, 0hexffff))\n";
 
-static const char *tbl3 = 
+static const char *tbl4 = 
 "create table DB.DBA.RDF_DATATYPE (\n"
 "RDT_IID IRI_ID_8 not null primary key,\n"
 "RDT_TWOBYTE integer not null unique,\n"
@@ -81,14 +85,14 @@ static const char *tbl3 =
 "alter index DB_DBA_RDF_DATATYPE_UNQC_RDT_TWOBYTE   on RDF_DATATYPE partition cluster replicated\n"
 "alter index DB_DBA_RDF_DATATYPE_UNQC_RDT_QNAME on RDF_DATATYPE partition cluster replicated\n";
 
-static const char *tbl4 = 
+static const char *tbl5 = 
 "create table DB.DBA.RDF_LANGUAGE (\n"
 "RL_ID varchar not null primary key,\n"
 "RL_TWOBYTE integer not null unique )\n"
 "alter index RDF_LANGUAGE on RDF_LANGUAGE  partition cluster replicated\n"
 "alter index DB_DBA_RDF_LANGUAGE_UNQC_RL_TWOBYTE on RDF_LANGUAGE  partition cluster replicated\n";
 
-static const char *tbl5 = 
+static const char *tbl6 = 
 "create table DB.DBA.SYS_SPARQL_HOST (\n"
 "SH_HOST	varchar not null primary key,\n"
 "SH_GRAPH_URI	varchar,\n"
@@ -96,7 +100,7 @@ static const char *tbl5 =
 "SH_DEFINES	long varchar\n"
 ")\n";
 
-static const char *tbl6 = 
+static const char *tbl7 = 
 "create table DB.DBA.RDF_OBJ_FT_RULES (\n"
 "ROFR_G varchar not null,\n"
 "ROFR_P varchar not null,\n"
@@ -104,7 +108,7 @@ static const char *tbl6 =
 "primary key (ROFR_G, ROFR_P, ROFR_REASON) )\n"
 "alter index RDF_OBJ_FT_RULES on RDF_OBJ_FT_RULES partition cluster replicated\n";
 
-static const char *tbl7 = 
+static const char *tbl8 = 
 "create table DB.DBA.SYS_SPARQL_SW_LOG (\n"
 "PL_SERVER varchar,\n"
 "PL_URI    varchar,\n"
@@ -113,7 +117,7 @@ static const char *tbl7 =
 "PL_MSG    long varchar,\n"
 "primary key (PL_SERVER, PL_URI, PL_TS))\n";
 
-static const char *tbl8 = 
+static const char *tbl9 = 
 "create table DB.DBA.SYS_XML_PERSISTENT_NS_DECL\n"
 "(\n"
 "NS_PREFIX varchar not null primary key,\n"
@@ -121,23 +125,23 @@ static const char *tbl8 =
 ")\n"
 "alter index SYS_XML_PERSISTENT_NS_DECL on SYS_XML_PERSISTENT_NS_DECL partition cluster replicated\n";
 
-static const char *tbl9 = 
+static const char *tbl10 = 
 "create table DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH\n"
 "(\n"
 "REC_GRAPH_IID IRI_ID not null primary key\n"
 ")\n"
 "alter index RDF_EXPLICITLY_CREATED_GRAPH on RDF_EXPLICITLY_CREATED_GRAPH partition cluster replicated\n";
 
-static const char *tbl10 = 
+static const char *tbl11 = 
 "create table RDF_GEO (X real no compress, Y real no compress,X2 real no compress, Y2 real no compress, ID bigint no compress, primary key (X, Y, X2, Y2, ID))\n"
 "alter index RDF_GEO on RDF_GEO partition (ID int (0hexffff00))\n";
 
-static const char *tbl11 = 
+static const char *tbl12 = 
 "create table DB.DBA.RDF_LABEL (RL_O any primary key, RL_RO_ID bigint, RL_TEXT varchar, RL_LANG int)\n"
 "alter index RDF_LABEL on RDF_LABEL partition (RL_O varchar (-1, 0hexffff))\n"
 "create index RDF_LABEL_TEXT on RDF_LABEL (RL_TEXT, RL_O) partition (RL_TEXT varchar (6, 0hexffff))\n";
 
-static const char *tbl12 = 
+static const char *tbl13 = 
 "create table DB.DBA.RDF_QUAD_DELETE_QUEUE (\n"
 "EVENT_ID bigint not null,\n"
 "RULE_ID bigint not null,\n"
@@ -148,20 +152,20 @@ static const char *tbl12 =
 "primary key (EVENT_ID, RULE_ID,  QG, QS, QP, QO)\n"
 ")\n";
 
-static const char *tbl13 = 
-"create table DB.DBA.SYS_FAKE_0\n"
+static const char *tbl14 = 
+"create table DB.DBA.SYS_IDONLY_EMPTY\n"
 "(\n"
 "ID integer not null primary key\n"
 ")\n";
 
-static const char *tbl14 = 
-"create table DB.DBA.SYS_FAKE_1\n"
+static const char *tbl15 = 
+"create table DB.DBA.SYS_IDONLY_ONE\n"
 "(\n"
 "ID integer not null primary key\n"
 ")\n";
 
 static const char *other3 = 
-"insert soft DB.DBA.SYS_FAKE_1 (ID) values (0)\n";
+"insert soft DB.DBA.SYS_IDONLY_ONE (ID) values (0)\n";
 static const char *other4 = 
 "sequence_set (\'RDF_URL_IID_NAMED\', 1000000, 1)\n";
 static const char *other5 = 
@@ -177,7 +181,7 @@ static const char *other9 =
 static const char *other10 = 
 "sequence_set (\'RDF_LANGUAGE_TWOBYTE\', 258, 1)\n";
 static const char *proc3 = 
-"#line 217 \"[executable]/sparql.sql\"\n"
+"#line 221 \"[executable]/sparql.sql\"\n"
 "create procedure RDF_GEO_INIT ()\n"
 "{\n"
 "if (not exists (select 1 from SYS_VT_INDEX where VI_COL = \'o\'))\n"
@@ -189,10 +193,10 @@ static const char *proc3 =
 "__ddl_changed (\'DB.DBA.RDF_QUAD\');\n"
 "}\n"
 "}\n"
-"--src sparql.sql:215\n";
+"--src sparql.sql:219\n";
 
 static const char *proc4 = 
-"#line 230 \"[executable]/sparql.sql\"\n"
+"#line 234 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_OBJ_RO_FLAGS_INDEX_HOOK (inout vtb any, inout d_id any)\n"
 "{\n"
 "for (select RO_LONG, RO_VAL, RO_FLAGS\n"
@@ -205,10 +209,10 @@ static const char *proc4 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:228\n";
+"--src sparql.sql:232\n";
 
 static const char *proc5 = 
-"#line 244 \"[executable]/sparql.sql\"\n"
+"#line 248 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_OBJ_RO_FLAGS_UNINDEX_HOOK (inout vtb any, inout d_id any)\n"
 "{\n"
 "for (select RO_LONG, RO_VAL, RO_FLAGS\n"
@@ -221,16 +225,16 @@ static const char *proc5 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:242\n";
+"--src sparql.sql:246\n";
 
 static const char *proc6 = 
-"#line 258 \"[executable]/sparql.sql\"\n"
+"#line 262 \"[executable]/sparql.sql\"\n"
 "create procedure sparql_exec_quiet (in expn varchar)\n"
 "{\n"
 "declare sta, msg varchar;\n"
 "exec (expn, sta, msg);\n"
 "}\n"
-"--src sparql.sql:256\n";
+"--src sparql.sql:260\n";
 
 static const char *other11 = 
 "sparql_exec_quiet (\'DB.DBA.vt_create_text_index (\n"
@@ -241,7 +245,7 @@ static const char *other11 =
 static const char *other12 = 
 "sparql_exec_quiet (\'DB.DBA.vt_batch_update (fix_identifier_case (\'\'DB.DBA.RDF_OBJ\'\'), \'\'ON\'\', 1)\')\n";
 static const char *proc7 = 
-"#line 279 \"[executable]/sparql.sql\"\n"
+"#line 283 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.XML_SET_NS_DECL (in prefix varchar, in url varchar, in persist integer := 1) returns integer\n"
 "{\n"
 "declare res integer;\n"
@@ -257,10 +261,10 @@ static const char *proc7 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:277\n";
+"--src sparql.sql:281\n";
 
 static const char *proc8 = 
-"#line 297 \"[executable]/sparql.sql\"\n"
+"#line 301 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.XML_REMOVE_NS_BY_PREFIX (in prefix varchar, in persist integer := 1)\n"
 "{\n"
 "declare res integer;\n"
@@ -273,10 +277,10 @@ static const char *proc8 =
 "commit work;\n"
 "}\n"
 "}\n"
-"--src sparql.sql:295\n";
+"--src sparql.sql:299\n";
 
 static const char *proc9 = 
-"#line 312 \"[executable]/sparql.sql\"\n"
+"#line 316 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.XML_CLEAR_ALL_NS_DECLS (in persist integer := 1)\n"
 "{\n"
 "declare res integer;\n"
@@ -289,10 +293,10 @@ static const char *proc9 =
 "commit work;\n"
 "}\n"
 "}\n"
-"--src sparql.sql:310\n";
+"--src sparql.sql:314\n";
 
 static const char *proc10 = 
-"#line 327 \"[executable]/sparql.sql\"\n"
+"#line 331 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.XML_SELECT_ALL_NS_DECLS (in persist integer := 3)\n"
 "{\n"
 "declare decls any;\n"
@@ -304,10 +308,10 @@ static const char *proc10 =
 "for (ctr := 0; ctr < len; ctr := ctr + 2)\n"
 "result (decls[ctr], decls[ctr+1]);\n"
 "}\n"
-"--src sparql.sql:325\n";
+"--src sparql.sql:329\n";
 
 static const char *proc11 = 
-"#line 340 \"[executable]/sparql.sql\"\n"
+"#line 344 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.XML_LOAD_ALL_NS_DECLS ()\n"
 "{\n"
 "for (select NS_PREFIX, NS_URL from DB.DBA.SYS_XML_PERSISTENT_NS_DECL) do\n"
@@ -329,8 +333,10 @@ static const char *proc11 =
 "DB.DBA.XML_SET_NS_DECL (	\'math\'	, \'http://www.w3.org/2000/10/swap/math#\'	, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'mf\'	, \'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#\'	, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'nci\'	, \'http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#\'	, 2);\n"
+"DB.DBA.XML_SET_NS_DECL (	\'product\'	, \'http://www.buy.com/rss/module/productV2/\'		, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'protseq\'	, \'http://purl.org/science/protein/bysequence/\'		, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'rdf\'	, \'http://www.w3.org/1999/02/22-rdf-syntax-ns#\'	, 2);\n"
+"DB.DBA.XML_SET_NS_DECL (	\'rdfa\'	, \'http://www.w3.org/ns/rdfa#\'	, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'rdfdf\'	, \'http://www.openlinksw.com/virtrdf-data-formats#\'	, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'rdfs\'	, \'http://www.w3.org/2000/01/rdf-schema#\'	, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'sc\'	, \'http://purl.org/science/owl/sciencecommons/\'		, 2);\n"
@@ -349,14 +355,14 @@ static const char *proc11 =
 "DB.DBA.XML_SET_NS_DECL (	\'xslwd\'	, \'http://www.w3.org/TR/WD-xsl\'	, 2);\n"
 "DB.DBA.XML_SET_NS_DECL (	\'yago\'	, \'http://dbpedia.org/class/yago/\'	, 2);\n"
 "}\n"
-"--src sparql.sql:338\n";
+"--src sparql.sql:342\n";
 
 static const char *other13 = 
 "DB.DBA.XML_LOAD_ALL_NS_DECLS ()\n";
 static const char *other14 = 
 "rdf_inf_const_init ()\n";
 static const char *proc12 = 
-"#line 389 \"[executable]/sparql.sql\"\n"
+"#line 395 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_LOAD_ALL_FT_RULES ()\n"
 "{\n"
 "whenever sqlstate \'*\' goto again;\n"
@@ -370,12 +376,12 @@ static const char *proc12 =
 "__rdf_obj_ft_rule_add (rule_g_iid, rule_p_iid, reason);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:387\n";
+"--src sparql.sql:393\n";
 
 static const char *other15 = 
 "DB.DBA.RDF_LOAD_ALL_FT_RULES ()\n";
 static const char *proc13 = 
-"#line 407 \"[executable]/sparql.sql\"\n"
+"#line 413 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_START (in quiet integer := 0)\n"
 "{\n"
 "if (repl_this_server () is null)\n"
@@ -398,10 +404,10 @@ static const char *proc13 =
 "registry_set (\'DB.DBA.RDF_REPL\', cast (now() as varchar));\n"
 "exec (\'checkpoint\');\n"
 "}\n"
-"--src sparql.sql:405\n";
+"--src sparql.sql:411\n";
 
 static const char *proc14 = 
-"#line 431 \"[executable]/sparql.sql\"\n"
+"#line 437 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_STOP (in quiet integer := 0)\n"
 "{\n"
 "if (not isstring (registry_get (\'DB.DBA.RDF_REPL\')))\n"
@@ -413,10 +419,10 @@ static const char *proc14 =
 "repl_unpublish (\'__rdf_repl\');\n"
 "registry_remove (\'DB.DBA.RDF_REPL\');\n"
 "}\n"
-"--src sparql.sql:429\n";
+"--src sparql.sql:435\n";
 
 static const char *proc15 = 
-"#line 444 \"[executable]/sparql.sql\"\n"
+"#line 450 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_GRAPH_INS (in memb_iri varchar)\n"
 "{\n"
 "declare memb_iid IRI_ID;\n"
@@ -428,19 +434,19 @@ static const char *proc15 =
 "if (not (bit_and (__rdf_graph_approx_perms (memb_iid, http_nobody_uid()), 1)))\n"
 "signal (\'RDF99\', \'Can not enable RDF replication of graph <\' || memb_iri || \'> because it is not readable by public\');\n"
 "}\n"
-"--src sparql.sql:442\n";
+"--src sparql.sql:448\n";
 
 static const char *proc16 = 
-"#line 457 \"[executable]/sparql.sql\"\n"
+"#line 463 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_GRAPH_DEL (in memb_iri varchar)\n"
 "{\n"
 "declare memb_iid IRI_ID;\n"
 "DB.DBA.RDF_GRAPH_GROUP_DEL (UNAME\'http://www.openlinksw.com/schemas/virtrdf#rdf_repl_graph_group\', memb_iri);\n"
 "}\n"
-"--src sparql.sql:455\n";
+"--src sparql.sql:461\n";
 
 static const char *proc17 = 
-"#line 464 \"[executable]/sparql.sql\"\n"
+"#line 470 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_SYNC (in publisher varchar, in u varchar, in pwd varchar)\n"
 "{\n"
 "declare lvl, stat integer;\n"
@@ -469,10 +475,10 @@ static const char *proc17 =
 "}\n"
 "goto retr;\n"
 "}\n"
-"--src sparql.sql:462\n";
+"--src sparql.sql:468\n";
 
 static const char *proc18 = 
-"#line 495 \"[executable]/sparql.sql\"\n"
+"#line 501 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_INSERT_TRIPLES (in graph_iri varchar, inout triples any)\n"
 "{\n"
 "declare ctr integer;\n"
@@ -500,10 +506,10 @@ static const char *proc18 =
 "}\n"
 "}\n"
 "}\n"
-"--src sparql.sql:493\n";
+"--src sparql.sql:499\n";
 
 static const char *proc19 = 
-"#line 524 \"[executable]/sparql.sql\"\n"
+"#line 530 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_DELETE_TRIPLES (in graph_iri varchar, inout triples any)\n"
 "{\n"
 "declare ctr integer;\n"
@@ -531,11 +537,11 @@ static const char *proc19 =
 "}\n"
 "}\n"
 "}\n"
-"--src sparql.sql:522\n";
+"--src sparql.sql:528\n";
 
 
 static const char *proc20 = 
-"#line 554 \"[executable]/sparql.sql\"\n"
+"#line 560 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_GLOBAL_RESET (in hard integer := 0)\n"
 "{\n"
 "if (isstring (registry_get (\'DB.DBA.RDF_REPL\')))\n"
@@ -546,8 +552,8 @@ static const char *proc20 =
 "__atomic (1);\n"
 "iri_id_cache_flush ();\n"
 "__rdf_obj_ft_rule_zap_all ();\n"
-"for select rs_name from sys_rdf_schema do\n"
-"rdf_inf_clear (rs_name);\n"
+"for select RS_NAME from DB.DBA.SYS_RDF_SCHEMA do\n"
+"rdf_inf_clear (RS_NAME);\n"
 "delete from sys_rdf_schema;\n"
 "delete from DB.DBA.RDF_QUAD;\n"
 "delete from DB.DBA.RDF_OBJ_FT_RULES;\n"
@@ -642,18 +648,18 @@ static const char *proc20 =
 "__atomic (0);\n"
 "exec (\'checkpoint\');\n"
 "}\n"
-"--src sparql.sql:552\n";
+"--src sparql.sql:558\n";
 
 static const char *proc21 = 
-"#line 666 \"[executable]/sparql.sql\"\n"
+"#line 672 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_IID_OF_QNAME (in qname varchar) returns IRI_ID\n"
 "{\n"
 "return iri_to_id (qname);\n"
 "}\n"
-"--src sparql.sql:664\n";
+"--src sparql.sql:670\n";
 
 static const char *proc22 = 
-"#line 673 \"[executable]/sparql.sql\"\n"
+"#line 679 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_IID_OF_LONG (in qname any) returns IRI_ID\n"
 "{\n"
 "if (isiri_id (qname))\n"
@@ -667,10 +673,10 @@ static const char *proc22 =
 "}\n"
 "return iri_to_id_nosignal (qname);\n"
 "}\n"
-"--src sparql.sql:671\n";
+"--src sparql.sql:677\n";
 
 static const char *proc23 = 
-"#line 688 \"[executable]/sparql.sql\"\n"
+"#line 694 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_GRAPH_IIDS_OF_QNAMES (in qnames any) returns any\n"
 "{\n"
 "if (__tag of vector <> __tag (qnames))\n"
@@ -689,10 +695,10 @@ static const char *proc23 =
 "vectorbld_final (res_acc);\n"
 "return res_acc;\n"
 "}\n"
-"--src sparql.sql:686\n";
+"--src sparql.sql:692\n";
 
 static const char *proc24 = 
-"#line 711 \"[executable]/sparql.sql\"\n"
+"#line 717 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_TWOBYTE_OF_DATATYPE (in iid any) returns integer\n"
 "{\n"
 "declare res integer;\n"
@@ -749,10 +755,10 @@ static const char *proc24 =
 "log_text (\'rdf_cache_id (\\\'t\\\', ?, ?)\', qname, res);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:709\n";
+"--src sparql.sql:715\n";
 
 static const char *proc25 = 
-"#line 769 \"[executable]/sparql.sql\"\n"
+"#line 775 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_TWOBYTE_OF_LANGUAGE (in id varchar) returns integer\n"
 "{\n"
 "declare res integer;\n"
@@ -795,34 +801,34 @@ static const char *proc25 =
 "log_text (\'rdf_cache_id (\\\'l\\\', ?, ?)\', id, res);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:767\n";
+"--src sparql.sql:773\n";
 
 static const char *proc26 = 
-"#line 816 \"[executable]/sparql.sql\"\n"
+"#line 822 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RQ_LONG_OF_O (in o_col any) returns any\n"
 "{\n"
 "return __rdf_long_of_obj (o_col);\n"
 "}\n"
-"--src sparql.sql:814\n";
+"--src sparql.sql:820\n";
 
 static const char *proc27 = 
-"#line 822 \"[executable]/sparql.sql\"\n"
+"#line 828 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_BOX_COMPLETE (inout o_col any)\n"
 "{\n"
 "__rdf_box_make_complete (o_col);\n"
 "}\n"
-"--src sparql.sql:820\n";
+"--src sparql.sql:826\n";
 
 static const char *proc28 = 
-"#line 828 \"[executable]/sparql.sql\"\n"
+"#line 834 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RQ_SQLVAL_OF_O (in o_col any) returns any\n"
 "{\n"
 "return __rdf_sqlval_of_obj (o_col);\n"
 "}\n"
-"--src sparql.sql:826\n";
+"--src sparql.sql:832\n";
 
 static const char *proc29 = 
-"#line 834 \"[executable]/sparql.sql\"\n"
+"#line 840 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RQ_BOOL_OF_O (in o_col any) returns any\n"
 "{\n"
 "declare t, len integer;\n"
@@ -864,36 +870,36 @@ static const char *proc29 =
 "retnull:\n"
 "return null;\n"
 "}\n"
-"--src sparql.sql:832\n";
+"--src sparql.sql:838\n";
 
 static const char *proc30 = 
-"#line 877 \"[executable]/sparql.sql\"\n"
+"#line 883 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RQ_IID_OF_O (in shortobj any) returns IRI_ID\n"
 "{\n"
 "return id_to_iri_nosignal (shortobj);\n"
 "}\n"
-"--src sparql.sql:875\n";
+"--src sparql.sql:881\n";
 
 static const char *proc31 = 
-"#line 883 \"[executable]/sparql.sql\"\n"
+"#line 889 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RQ_O_IS_LIT (in shortobj any) returns integer\n"
 "{\n"
 "if (isiri_id (shortobj))\n"
 "return 0;\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:881\n";
+"--src sparql.sql:887\n";
 
 static const char *proc32 = 
-"#line 896 \"[executable]/sparql.sql\"\n"
+"#line 902 \"[executable]/sparql.sql\"\n"
 "create procedure RDF_G_INS (in id int, in g any)\n"
 "{\n"
 "geo_insert (\'DB.DBA.RDF_GEO\', g, id);\n"
 "}\n"
-"--src sparql.sql:894\n";
+"--src sparql.sql:900\n";
 
 static const char *proc33 = 
-"#line 902 \"[executable]/sparql.sql\"\n"
+"#line 908 \"[executable]/sparql.sql\"\n"
 "create procedure cl_rdf_geo_insert (in id int, inout g any)\n"
 "{\n"
 "declare daq any;\n"
@@ -901,10 +907,10 @@ static const char *proc33 =
 "daq_call (daq, \'DB.DBA.RDF_OBJ\', \'RDF_OBJ\', \'DB.DBA.RDF_G_INS\', vector (id, g), 1);\n"
 "daq_results (daq);\n"
 "}\n"
-"--src sparql.sql:900\n";
+"--src sparql.sql:906\n";
 
 static const char *proc34 = 
-"#line 911 \"[executable]/sparql.sql\"\n"
+"#line 917 \"[executable]/sparql.sql\"\n"
 "create function rdf_geo_add (in v any)\n"
 "{\n"
 "declare id, h, ser, g any;\n"
@@ -946,10 +952,10 @@ static const char *proc34 =
 "rdf_box_set_ro_id (v, id);\n"
 "return v;\n"
 "}\n"
-"--src sparql.sql:909\n";
+"--src sparql.sql:915\n";
 
 static const char *proc35 = 
-"#line 954 \"[executable]/sparql.sql\"\n"
+"#line 960 \"[executable]/sparql.sql\"\n"
 "create function rdf_geo_set_id (inout v any)\n"
 "{\n"
 "declare id, h, ser, g any;\n"
@@ -976,10 +982,10 @@ static const char *proc35 =
 "}\n"
 "return null;\n"
 "}\n"
-"--src sparql.sql:952\n";
+"--src sparql.sql:958\n";
 
 static const char *proc36 = 
-"#line 981 \"[executable]/sparql.sql\"\n"
+"#line 987 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_OBJ_ADD (in dt_twobyte integeR, in v varchar, in lang_twobyte integeR, in ro_id_dict any := null) returns varchar\n"
 "{\n"
 "declare llong, id, need_digest integer;\n"
@@ -1234,10 +1240,10 @@ static const char *proc36 =
 "\n"
 "signal (\'FUNNY\', \'Debug code of DB.DBA.RDF_OBJ_ADD() is reached. This can not happen (I believe). Please report this error.\');\n"
 "}\n"
-"--src sparql.sql:979\n";
+"--src sparql.sql:985\n";
 
 static const char *proc37 = 
-"#line 1237 \"[executable]/sparql.sql\"\n"
+"#line 1243 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FIND_RO_DIGEST (in dt_twobyte integeR, in v varchar, in lang_twobyte integeR) returns varchar\n"
 "{\n"
 "declare llong, dt_and_lang int;\n"
@@ -1281,10 +1287,10 @@ static const char *proc37 =
 "and not (bit_and (RO_FLAGS, 2)) );\n"
 "}\n"
 "}\n"
-"--src sparql.sql:1235\n";
+"--src sparql.sql:1241\n";
 
 static const char *proc38 = 
-"#line 1282 \"[executable]/sparql.sql\"\n"
+"#line 1288 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL (in v any) returns any\n"
 "{\n"
 "declare t int;\n"
@@ -1297,13 +1303,14 @@ static const char *proc38 =
 "v := cast (v as varchar);\n"
 "return DB.DBA.RDF_OBJ_ADD (257, v, 257);\n"
 "}\n"
-"--src sparql.sql:1280\n";
+"--src sparql.sql:1286\n";
 
 static const char *proc39 = 
-"#line 1296 \"[executable]/sparql.sql\"\n"
+"#line 1302 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (in v any, in g_iid IRI_ID, in p_iid IRI_ID, in ro_id_dict any := null) returns any\n"
 "{\n"
 "declare t int;\n"
+"\n"
 "t := __tag (v);\n"
 "if (not (t in (126, __tag of varchar, 217, __tag of nvarchar, __tag of XML, __tag of rdf_box)))\n"
 "return v;\n"
@@ -1326,13 +1333,14 @@ static const char *proc39 =
 "}\n"
 "return DB.DBA.RDF_OBJ_ADD (257, v, 257, ro_id_dict);\n"
 "}\n"
-"--src sparql.sql:1294\n";
+"--src sparql.sql:1300\n";
 
 static const char *proc40 = 
-"#line 1323 \"[executable]/sparql.sql\"\n"
+"#line 1330 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL (in v any, in dt_iid IRI_ID, in lang varchar) returns any\n"
 "{\n"
 "declare t, dt_twobyte, lang_twobyte int;\n"
+"\n"
 "retry_unrdf:\n"
 "t := __tag (v);\n"
 "if (not (t in (126, __tag of varchar, 217, __tag of nvarchar, __tag of XML)))\n"
@@ -1357,12 +1365,13 @@ static const char *proc40 =
 "lang_twobyte := DB.DBA.RDF_TWOBYTE_OF_LANGUAGE (lang);\n"
 "else\n"
 "lang_twobyte := 257;\n"
+"\n"
 "return DB.DBA.RDF_OBJ_ADD (dt_twobyte, v, lang_twobyte);\n"
 "}\n"
-"--src sparql.sql:1321\n";
+"--src sparql.sql:1328\n";
 
 static const char *proc41 = 
-"#line 1354 \"[executable]/sparql.sql\"\n"
+"#line 1363 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_FT (in v any, in dt_iid IRI_ID, in lang varchar, in g_iid IRI_ID, in p_iid IRI_ID, in ro_id_dict any := null) returns any\n"
 "{\n"
 "declare t, dt_twobyte, lang_twobyte int;\n"
@@ -1406,13 +1415,14 @@ static const char *proc41 =
 "}\n"
 "return DB.DBA.RDF_OBJ_ADD (dt_twobyte, v, lang_twobyte, ro_id_dict);\n"
 "}\n"
-"--src sparql.sql:1352\n";
+"--src sparql.sql:1361\n";
 
 static const char *proc42 = 
-"#line 1399 \"[executable]/sparql.sql\"\n"
+"#line 1408 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_STRINGS (\n"
 "in o_val any, in o_type varchar, in o_lang varchar ) returns any\n"
 "{\n"
+"\n"
 "if (__tag (o_type) in (__tag of varchar, 217))\n"
 "{\n"
 "declare parsed any;\n"
@@ -1447,18 +1457,18 @@ static const char *proc42 =
 "}\n"
 "return DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL (o_val);\n"
 "}\n"
-"--src sparql.sql:1397\n";
+"--src sparql.sql:1406\n";
 
 static const char *proc43 = 
-"#line 1438 \"[executable]/sparql.sql\"\n"
+"#line 1448 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_LONG_OF_OBJ (in shortobj any) returns any\n"
 "{\n"
 "return __rdf_long_of_obj (shortobj);\n"
 "}\n"
-"--src sparql.sql:1436\n";
+"--src sparql.sql:1446\n";
 
 static const char *proc44 = 
-"#line 1444 \"[executable]/sparql.sql\"\n"
+"#line 1454 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_DATATYPE_OF_OBJ (in shortobj any, in dflt varchar := \'http://www.w3.org/2001/XMLSchema#string\') returns any\n"
 "{\n"
 "declare twobyte integer;\n"
@@ -1469,9 +1479,11 @@ static const char *proc44 =
 "return null;\n"
 "if (isstring (shortobj) and bit_and (__box_flags (shortobj), 1))\n"
 "return null;\n"
+"\n"
 "return iri_to_id (__xsd_type (shortobj, dflt));\n"
 "}\n"
 "twobyte := rdf_box_type (shortobj);\n"
+"\n"
 "if (257 = twobyte)\n"
 "return case (rdf_box_lang (shortobj)) when 257 then iri_to_id (dflt) else null end;\n"
 "whenever not found goto badtype;\n"
@@ -1482,10 +1494,10 @@ static const char *proc44 =
 "signal (\'RDFXX\', sprintf (\'Unknown datatype in DB.DBA.RQ_DATATYPE_OF_OBJ, bad type id %d, string value \"%s\"\',\n"
 "twobyte, cast (rdf_box_data (shortobj) as varchar) ) );\n"
 "}\n"
-"--src sparql.sql:1442\n";
+"--src sparql.sql:1452\n";
 
 static const char *proc45 = 
-"#line 1469 \"[executable]/sparql.sql\"\n"
+"#line 1481 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_LANGUAGE_OF_OBJ (in shortobj any, in dflt varchar := \'\') returns any\n"
 "{\n"
 "declare twobyte integer;\n"
@@ -1496,9 +1508,11 @@ static const char *proc45 =
 "return null;\n"
 "if (isstring (shortobj) and bit_and (__box_flags (shortobj), 1))\n"
 "return null;\n"
+"\n"
 "return dflt;\n"
 "}\n"
 "twobyte := rdf_box_lang (shortobj);\n"
+"\n"
 "if (257 = twobyte)\n"
 "return dflt;\n"
 "whenever not found goto badtype;\n"
@@ -1508,18 +1522,18 @@ static const char *proc45 =
 "badtype:\n"
 "signal (\'RDFXX\', sprintf (\'Unknown language in DB.DBA.RDF_LANGUAGE_OF_OBJ, bad string \"%s\"\', shortobj));\n"
 "}\n"
-"--src sparql.sql:1467\n";
+"--src sparql.sql:1479\n";
 
 static const char *proc46 = 
-"#line 1493 \"[executable]/sparql.sql\"\n"
+"#line 1507 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_SQLVAL_OF_OBJ (in shortobj any) returns any\n"
 "{\n"
 "return __rdf_sqlval_of_obj (shortobj);\n"
 "}\n"
-"--src sparql.sql:1491\n";
+"--src sparql.sql:1505\n";
 
 static const char *proc47 = 
-"#line 1499 \"[executable]/sparql.sql\"\n"
+"#line 1513 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_BOOL_OF_OBJ (in shortobj any) returns any\n"
 "{\n"
 "if (isiri_id (shortobj))\n"
@@ -1553,59 +1567,40 @@ static const char *proc47 =
 "signal (\'RDFXX\', sprintf (\'Unknown datatype in DB.DBA.RDF_BOOL_OF_OBJ, bad type id %d, string value \"%s\"\',\n"
 "twobyte, cast (rdf_box_data (shortobj) as varchar) ) );\n"
 "}\n"
-"--src sparql.sql:1497\n";
+"--src sparql.sql:1511\n";
 
 static const char *proc48 = 
-"#line 1534 \"[executable]/sparql.sql\"\n"
+"#line 1548 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QNAME_OF_OBJ (in shortobj any) returns varchar\n"
 "{\n"
 "return id_to_iri_nosignal (shortobj);\n"
 "}\n"
-"--src sparql.sql:1532\n";
+"--src sparql.sql:1546\n";
 
 static const char *proc49 = 
-"#line 1540 \"[executable]/sparql.sql\"\n"
+"#line 1554 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_STRSQLVAL_OF_OBJ (in shortobj any)\n"
 "{\n"
 "return __rdf_strsqlval (shortobj, 0);\n"
 "}\n"
-"--src sparql.sql:1538\n";
+"--src sparql.sql:1552\n";
 
 static const char *proc50 = 
-"#line 1546 \"[executable]/sparql.sql\"\n"
+"#line 1560 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_OBJ_OF_LONG (in longobj any) returns any\n"
 "{\n"
 "declare t int;\n"
 "t := __tag (longobj);\n"
 "if (__tag of rdf_box <> t)\n"
 "{\n"
-"if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))\n"
-"return longobj;\n"
-"if (__tag of nvarchar = t)\n"
-"longobj := charset_recode (longobj, \'_WIDE_\', \'UTF-8\');\n"
-"else if (t in (126, 217))\n"
-"longobj := cast (longobj as varchar);\n"
-"else if (bit_and (1, __box_flags (longobj)))\n"
-"return iri_to_id (longobj);\n"
-"return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);\n"
-"}\n"
-"if (0 = rdf_box_needs_digest (longobj))\n"
+"if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar, 133, 226)))\n"
 "return longobj;\n"
-"return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);\n"
-"}\n"
-"--src sparql.sql:1544\n";
-
-static const char *proc51 = 
-"#line 1568 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_OBJ_OF_LONG (in longobj any, in g_iid IRI_ID, inout old_g_iid IRI_ID, in ro_id_dict any := null) returns any\n"
+"if (t = 133)\n"
 "{\n"
-"declare t int;\n"
+"longobj := cast (longobj as nvarchar);\n"
 "t := __tag (longobj);\n"
-"if (__tag of rdf_box <> t)\n"
-"{\n"
-"if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))\n"
-"return longobj;\n"
-"if (__tag of nvarchar = t)\n"
+"}\n"
+"if (__tag of nvarchar = t or t = 226)\n"
 "longobj := charset_recode (longobj, \'_WIDE_\', \'UTF-8\');\n"
 "else if (t in (126, 217))\n"
 "longobj := cast (longobj as varchar);\n"
@@ -1617,10 +1612,10 @@ static const char *proc51 =
 "return longobj;\n"
 "return DB.DBA.RDF_OBJ_ADD (257, longobj, 257);\n"
 "}\n"
-"--src sparql.sql:1566\n";
+"--src sparql.sql:1558\n";
 
-static const char *proc52 = 
-"#line 1590 \"[executable]/sparql.sql\"\n"
+static const char *proc51 = 
+"#line 1610 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_OBJ_OF_SQLVAL (in v any) returns any\n"
 "{\n"
 "declare t int;\n"
@@ -1639,10 +1634,10 @@ static const char *proc52 =
 "return iri_to_id (v);\n"
 "return DB.DBA.RDF_OBJ_ADD (257, v, 257);\n"
 "}\n"
-"--src sparql.sql:1588\n";
+"--src sparql.sql:1608\n";
 
-static const char *proc53 = 
-"#line 1613 \"[executable]/sparql.sql\"\n"
+static const char *proc52 = 
+"#line 1633 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (in v any) returns any\n"
 "{\n"
 "declare t int;\n"
@@ -1659,10 +1654,10 @@ static const char *proc53 =
 "res := rdf_box (v, 257, 257, 0, 1);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:1611\n";
+"--src sparql.sql:1631\n";
 
-static const char *proc54 = 
-"#line 1632 \"[executable]/sparql.sql\"\n"
+static const char *proc53 = 
+"#line 1652 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (in v any, in dt_iid IRI_ID, in lang varchar) returns any\n"
 "{\n"
 "declare t, dt_twobyte, lang_twobyte int;\n"
@@ -1697,10 +1692,10 @@ static const char *proc54 =
 "res := rdf_box (v, dt_twobyte, lang_twobyte, 0, 1);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:1630\n";
+"--src sparql.sql:1650\n";
 
-static const char *proc55 = 
-"#line 1668 \"[executable]/sparql.sql\"\n"
+static const char *proc54 = 
+"#line 1688 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (\n"
 "in o_val any, in o_type varchar, in o_lang varchar ) returns any\n"
 "{\n"
@@ -1724,26 +1719,26 @@ static const char *proc55 =
 "return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (o_val, NULL, o_lang);\n"
 "return DB.DBA.RDF_MAKE_LONG_OF_SQLVAL (o_val);\n"
 "}\n"
-"--src sparql.sql:1666\n";
+"--src sparql.sql:1686\n";
 
-static const char *proc56 = 
-"#line 1693 \"[executable]/sparql.sql\"\n"
+static const char *proc55 = 
+"#line 1713 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QNAME_OF_LONG_SAFE (in longobj any) returns varchar\n"
 "{\n"
 "return id_to_iri_nosignal (longobj);\n"
 "}\n"
-"--src sparql.sql:1691\n";
+"--src sparql.sql:1711\n";
 
-static const char *proc57 = 
-"#line 1699 \"[executable]/sparql.sql\"\n"
+static const char *proc56 = 
+"#line 1719 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_SQLVAL_OF_LONG (in longobj any) returns any\n"
 "{\n"
 "return __rdf_sqlval_of_obj (longobj);\n"
 "}\n"
-"--src sparql.sql:1697\n";
+"--src sparql.sql:1717\n";
 
-static const char *proc58 = 
-"#line 1705 \"[executable]/sparql.sql\"\n"
+static const char *proc57 = 
+"#line 1725 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_BOOL_OF_LONG (in longobj any) returns any\n"
 "{\n"
 "if (isiri_id (longobj))\n"
@@ -1774,10 +1769,10 @@ static const char *proc58 =
 "badtype:\n"
 "signal (\'RDFXX\', sprintf (\'Unknown datatype in DB.DBA.RDF_BOOL_OF_LONG (code %d)\', rdf_box_type(longobj)));\n"
 "}\n"
-"--src sparql.sql:1703\n";
+"--src sparql.sql:1723\n";
 
-static const char *proc59 = 
-"#line 1737 \"[executable]/sparql.sql\"\n"
+static const char *proc58 = 
+"#line 1757 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_DATATYPE_OF_LONG (in longobj any, in dflt any := UNAME\'http://www.w3.org/2001/XMLSchema#string\') returns any\n"
 "{\n"
 "if (__tag of rdf_box = __tag (longobj))\n"
@@ -1798,10 +1793,10 @@ static const char *proc59 =
 "return NULL;\n"
 "return iri_to_id (__xsd_type (longobj, dflt));\n"
 "}\n"
-"--src sparql.sql:1735\n";
+"--src sparql.sql:1755\n";
 
-static const char *proc60 = 
-"#line 1759 \"[executable]/sparql.sql\"\n"
+static const char *proc59 = 
+"#line 1779 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_DATATYPE_IRI_OF_LONG (in longobj any, in dflt any := UNAME\'http://www.w3.org/2001/XMLSchema#string\') returns any\n"
 "{\n"
 "if (__tag of rdf_box = __tag (longobj))\n"
@@ -1822,31 +1817,9 @@ static const char *proc60 =
 "return NULL;\n"
 "return __xsd_type (longobj, dflt);\n"
 "}\n"
-"--src sparql.sql:1757\n";
-
-static const char *proc61 = 
-"#line 1781 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_LANGUAGE_OF_LONG (in longobj any, in dflt varchar := \'\') returns any\n"
-"{\n"
-"if (__tag of rdf_box = __tag (longobj))\n"
-"{\n"
-"declare twobyte integer;\n"
-"declare res varchar;\n"
-"twobyte := rdf_box_lang (longobj);\n"
-"if (257 = twobyte)\n"
-"return dflt;\n"
-"whenever not found goto badlang;\n"
-"select lower (RL_ID) into res from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = twobyte;\n"
-"return res;\n"
-"\n"
-"badlang:\n"
-"signal (\'RDFXX\', sprintf (\'Unknown language in DB.DBA.RDF_LANGUAGE_OF_LONG, bad id %d\', twobyte));\n"
-"}\n"
-"return case (isiri_id (longobj)) when 0 then dflt else null end;\n"
-"}\n"
-"--src sparql.sql:1779\n";
+"--src sparql.sql:1777\n";
 
-static const char *proc62 = 
+static const char *proc60 = 
 "#line 1801 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_STRSQLVAL_OF_LONG (in longobj any)\n"
 "{\n"
@@ -1854,7 +1827,7 @@ static const char *proc62 =
 "}\n"
 "--src sparql.sql:1799\n";
 
-static const char *proc63 = 
+static const char *proc61 = 
 "#line 1807 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_WIDESTRSQLVAL_OF_LONG (in longobj any)\n"
 "{\n"
@@ -1918,7 +1891,7 @@ static const char *proc63 =
 "}\n"
 "--src sparql.sql:1805\n";
 
-static const char *proc64 = 
+static const char *proc62 = 
 "#line 1870 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_DATATYPE_OF_SQLVAL (in v any,\n"
 "in strg_datatype any := UNAME\'http://www.w3.org/2001/XMLSchema#string\',\n"
@@ -1942,7 +1915,7 @@ static const char *proc64 =
 "}\n"
 "--src sparql.sql:1868\n";
 
-static const char *proc65 = 
+static const char *proc63 = 
 "#line 1893 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_LONG_OF_SQLVAL (in v varchar) returns any\n"
 "{\n"
@@ -1965,7 +1938,7 @@ static const char *proc65 =
 "}\n"
 "--src sparql.sql:1891\n";
 
-static const char *proc66 = 
+static const char *proc64 = 
 "#line 1918 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_STRSQLVAL_OF_SQLVAL (in sqlval any)\n"
 "{\n"
@@ -1994,7 +1967,7 @@ static const char *proc66 =
 "}\n"
 "--src sparql.sql:1916\n";
 
-static const char *proc67 = 
+static const char *proc65 = 
 "#line 1946 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_LANGUAGE_OF_SQLVAL (in v any, in dflt varchar := \'\') returns any\n"
 "{\n"
@@ -2019,7 +1992,7 @@ static const char *proc67 =
 "}\n"
 "--src sparql.sql:1944\n";
 
-static const char *proc68 = 
+static const char *proc66 = 
 "#line 1970 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_IS_BLANK_REF (in v any) returns any\n"
 "{\n"
@@ -2039,7 +2012,7 @@ static const char *proc68 =
 "}\n"
 "--src sparql.sql:1968\n";
 
-static const char *proc69 = 
+static const char *proc67 = 
 "#line 1989 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_IS_URI_REF (in v any) returns any\n"
 "{\n"
@@ -2059,7 +2032,7 @@ static const char *proc69 =
 "}\n"
 "--src sparql.sql:1987\n";
 
-static const char *proc70 = 
+static const char *proc68 = 
 "#line 2008 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_IS_REF (in v any) returns any\n"
 "{\n"
@@ -2071,7 +2044,7 @@ static const char *proc70 =
 "}\n"
 "--src sparql.sql:2006\n";
 
-static const char *proc71 = 
+static const char *proc69 = 
 "#line 2019 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_IS_LITERAL (in v any) returns any\n"
 "{\n"
@@ -2083,7 +2056,7 @@ static const char *proc71 =
 "}\n"
 "--src sparql.sql:2017\n";
 
-static const char *proc72 = 
+static const char *proc70 = 
 "#line 2033 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#boolean\" (in strg any) returns integer\n"
 "{\n"
@@ -2100,7 +2073,7 @@ static const char *proc72 =
 "}\n"
 "--src sparql.sql:2031\n";
 
-static const char *proc73 = 
+static const char *proc71 = 
 "#line 2049 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#date\" (in strg any) returns date\n"
 "{\n"
@@ -2115,7 +2088,7 @@ static const char *proc73 =
 "}\n"
 "--src sparql.sql:2047\n";
 
-static const char *proc74 = 
+static const char *proc72 = 
 "#line 2063 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#dateTime\" (in strg any) returns datetime\n"
 "{\n"
@@ -2130,7 +2103,7 @@ static const char *proc74 =
 "}\n"
 "--src sparql.sql:2061\n";
 
-static const char *proc75 = 
+static const char *proc73 = 
 "#line 2077 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#double\" (in strg varchar) returns double precision\n"
 "{\n"
@@ -2141,7 +2114,7 @@ static const char *proc75 =
 "}\n"
 "--src sparql.sql:2075\n";
 
-static const char *proc76 = 
+static const char *proc74 = 
 "#line 2087 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#float\" (in strg varchar) returns float\n"
 "{\n"
@@ -2152,7 +2125,7 @@ static const char *proc76 =
 "}\n"
 "--src sparql.sql:2085\n";
 
-static const char *proc77 = 
+static const char *proc75 = 
 "#line 2097 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#integer\" (in strg varchar) returns integer\n"
 "{\n"
@@ -2163,7 +2136,7 @@ static const char *proc77 =
 "}\n"
 "--src sparql.sql:2095\n";
 
-static const char *proc78 = 
+static const char *proc76 = 
 "#line 2107 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#int\" (in strg varchar) returns integer\n"
 "{\n"
@@ -2174,7 +2147,7 @@ static const char *proc78 =
 "}\n"
 "--src sparql.sql:2105\n";
 
-static const char *proc79 = 
+static const char *proc77 = 
 "#line 2117 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#time\" (in strg any) returns time\n"
 "{\n"
@@ -2189,7 +2162,7 @@ static const char *proc79 =
 "}\n"
 "--src sparql.sql:2115\n";
 
-static const char *proc80 = 
+static const char *proc78 = 
 "#line 2131 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.\"http://www.w3.org/2001/XMLSchema#string\" (in strg any) returns any\n"
 "{\n"
@@ -2209,7 +2182,7 @@ static const char *proc80 =
 "}\n"
 "--src sparql.sql:2129\n";
 
-static const char *proc81 = 
+static const char *proc79 = 
 "#line 2153 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.__and (in e1 any, in e2 any) returns integer\n"
 "{\n"
@@ -2219,7 +2192,7 @@ static const char *proc81 =
 "}\n"
 "--src sparql.sql:2151\n";
 
-static const char *proc82 = 
+static const char *proc80 = 
 "#line 2162 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.__or (in e1 any, in e2 any) returns integer\n"
 "{\n"
@@ -2229,7 +2202,7 @@ static const char *proc82 =
 "}\n"
 "--src sparql.sql:2160\n";
 
-static const char *proc83 = 
+static const char *proc81 = 
 "#line 2171 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.__not (in e1 any) returns integer\n"
 "{\n"
@@ -2239,8 +2212,195 @@ static const char *proc83 =
 "}\n"
 "--src sparql.sql:2169\n";
 
+static const char *proc82 = 
+"#line 2182 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.rdf_strdt_impl (in str varchar, in dt_iri any)\n"
+"{\n"
+"declare dt_iid IRI_ID;\n"
+"declare parsed any;\n"
+"dt_iid := __i2id (dt_iri);\n"
+"if (dt_iid is null)\n"
+"signal (\'22007\', \'Function rdf_strdt_impl needs a valid datatype IRI as its second argument\');\n"
+"if (__tag of IRI_ID = __tag (dt_iri))\n"
+"dt_iri := __id2i (dt_iri);\n"
+"parsed := __xqf_str_parse_to_rdf_box (str, dt_iri, isstring (str));\n"
+"if (parsed is not null)\n"
+"{\n"
+"if (__tag of rdf_box = __tag (parsed))\n"
+"rdf_box_set_type (parsed,\n"
+"DB.DBA.RDF_TWOBYTE_OF_DATATYPE (dt_iid));\n"
+"return parsed;\n"
+"}\n"
+"return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, dt_iid, null);\n"
+"}\n"
+"--src sparql.sql:2180\n";
+
+static const char *proc83 = 
+"#line 2203 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.rdf_strlang_impl (in str varchar, in lang any)\n"
+"{\n"
+"\n"
+"lang := cast (lang as varchar);\n"
+"if ((lang is null) or (regexp_match (\'^(([a-z][a-z](-[A-Z][A-Z])?)|(x-[A-Za-z0-9]+))\\044\', lang) is null))\n"
+"signal (\'22007\', \'Function rdf_strlang_impl needs a valid language ID as its second argument\');\n"
+"return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, null, cast (lang as varchar));\n"
+"}\n"
+"--src sparql.sql:2201\n";
+
 static const char *proc84 = 
-"#line 2183 \"[executable]/sparql.sql\"\n"
+"#line 2214 \"[executable]/sparql.sql\"\n"
+" create function DB.DBA.rdf_replace_impl (in src varchar, in needle varchar, in rpl varchar, in opts varchar := \'\')\n"
+"{\n"
+"declare src_tag, needle_tag, rpl_tag integer;\n"
+"declare res varchar;\n"
+"src_tag := __tag (src);\n"
+"needle_tag := __tag (needle);\n"
+"rpl_tag := __tag (rpl);\n"
+"if (__tag of rdf_box = src_tag)\n"
+"{\n"
+"src := rdf_box_data (src);\n"
+"src_tag := __tag (src);\n"
+"}\n"
+"if (__tag of rdf_box = needle_tag)\n"
+"{\n"
+"needle := rdf_box_data (needle);\n"
+"needle_tag := __tag (needle);\n"
+"}\n"
+"if (__tag of rdf_box = rpl_tag)\n"
+"{\n"
+"rpl := rdf_box_data (rpl);\n"
+"rpl_tag := __tag (rpl);\n"
+"}\n"
+"if (__tag of nvarchar = src_tag)\n"
+"src := charset_recode (src, \'_WIDE_\', \'_UTF8_\');\n"
+"else if (__tag of varchar <> src_tag)\n"
+"src := cast (src as varchar);\n"
+"if (__tag of nvarchar = needle_tag)\n"
+"needle := charset_recode (needle, \'_WIDE_\', \'_UTF8_\');\n"
+"else if (__tag of varchar <> needle_tag)\n"
+"needle := cast (needle as varchar);\n"
+"if (__tag of nvarchar = rpl_tag)\n"
+"rpl := charset_recode (rpl, \'_WIDE_\', \'_UTF8_\');\n"
+"else if (__tag of varchar <> rpl_tag)\n"
+"rpl := cast (rpl as varchar);\n"
+"if (__tag of varchar <> __tag (opts))\n"
+"opts := cast (opts as varchar);\n"
+"if (opts is null)\n"
+"opts := \'\';\n"
+"if (src is null or needle is null or rpl is null)\n"
+"return null;\n"
+"if (\'\' = needle)\n"
+"return src;\n"
+"if (regexp_match (\'^[^()|+?.:^\\044\\\\\\\\\\\\[\\\\]-]+\\044\', needle, 0, \'u\') is not null and strchr (rpl, \'\\044\') is null and strchr (rpl, 92) is null)\n"
+"{\n"
+"if (\'\' = opts)\n"
+"{\n"
+"res := replace (src, needle, rpl);\n"
+"__box_flags_set (res, 2);\n"
+"return res;\n"
+"}\n"
+"if (opts in (\'i\', \'I\'))\n"
+"{\n"
+"declare src_lc varchar;\n"
+"declare hit, needle_len integer;\n"
+"declare ses any;\n"
+"src_lc := lcase (src);\n"
+"needle := lcase (needle);\n"
+"hit := strstr (src_lc, needle);\n"
+"if (hit is null)\n"
+"{\n"
+"res := src;\n"
+"__box_flags_set (res, 2);\n"
+"return res;\n"
+"}\n"
+"ses := string_output();\n"
+"needle_len := length (needle);\n"
+"while (hit is not null)\n"
+"{\n"
+"http (subseq (src, 0, hit), ses);\n"
+"http (rpl, ses);\n"
+"src := subseq (src, hit + needle_len);\n"
+"src_lc := subseq (src_lc, hit + needle_len);\n"
+"hit := strstr (src_lc, needle);\n"
+"}\n"
+"http (src, ses);\n"
+"res := string_output_string (ses);\n"
+"__box_flags_set (res, 2);\n"
+"return res;\n"
+"}\n"
+"}\n"
+"if (strchr (opts, \'u\') is null and strchr (opts, \'U\') is null)\n"
+"opts := opts || \'u\';\n"
+"res := regexp_xfn_replace (src, needle, rpl, 0, null, opts);\n"
+"__box_flags_set (res, 2);\n"
+"return res;\n"
+"}\n"
+"--src sparql.sql:2212\n";
+
+static const char *proc85 = 
+"#line 2303 \"[executable]/sparql.sql\"\n"
+" create function DB.DBA.regexp_xfn_replace (in src varchar, in needle varchar, in tmpl varchar, in search_begin_pos integer, in hit_max_count integer, in opts varchar)\n"
+"{\n"
+"declare hit_list any;\n"
+"if (0 = length (src))\n"
+"return \'\';\n"
+"if (regexp_parse (needle, \'\', 0, opts) is not null)\n"
+"signal (\'22023\', \'The regex-based XPATH/XQuery/SPARQL replace() function can not search for a pattern that can be found even in an empty string\');\n"
+"hit_list := regexp_parse_list (needle, src, search_begin_pos, opts, coalesce (hit_max_count, 2097152));\n"
+"return regexp_replace_hits_with_template (src, tmpl, hit_list, 1);\n"
+"}\n"
+"--src sparql.sql:2301\n";
+
+static const char *proc86 = 
+"#line 2317 \"[executable]/sparql.sql\"\n"
+" create function DB.DBA.rdf_timezone_impl (in dt datetime)\n"
+"{\n"
+"declare minutes integer;\n"
+"declare sign, str varchar;\n"
+"minutes := timezone (dt);\n"
+"if (minutes is null)\n"
+"signal (\'22007\', \'Function rdf_timezone_impl needs a datetime with some timezone set as its argument\');\n"
+"if (minutes < 0)\n"
+"{\n"
+"sign := \'-\';\n"
+"minutes := -minutes;\n"
+"}\n"
+"else\n"
+"sign := \'\';\n"
+"if (mod (minutes, 60))\n"
+"str := sprintf (\'%sPT%dH%dM\', sign, minutes / 60, mod (minutes, 60));\n"
+"else if (minutes = 0)\n"
+"str := \'PT0S\';\n"
+"else\n"
+"str := sprintf (\'%sPT%dH\', sign, minutes / 60);\n"
+"return DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL (str, __i2id (UNAME\'http://www.w3.org/2001/XMLSchema#dayTimeDuration\'), null);\n"
+"}\n"
+"--src sparql.sql:2315\n";
+
+static const char *proc87 = 
+"#line 2342 \"[executable]/sparql.sql\"\n"
+" create function DB.DBA.rdf_tz_impl (in dt datetime)\n"
+"{\n"
+"declare minutes integer;\n"
+"declare sign varchar;\n"
+"minutes := timezone (dt);\n"
+"if (minutes is null)\n"
+"return \'\';\n"
+"if (minutes = 0)\n"
+"return \'Z\';\n"
+"if (minutes < 0)\n"
+"{\n"
+"sign := \'-\';\n"
+"minutes := -minutes;\n"
+"}\n"
+"else\n"
+"sign := \'\';\n"
+"return sprintf (\'%s%02d:%02d\', sign, minutes / 60, mod (minutes, 60));\n"
+"}\n"
+"--src sparql.sql:2340\n";
+
+static const char *proc88 = 
+"#line 2366 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QUAD_URI (in g_uri varchar, in s_uri varchar, in p_uri varchar, in o_uri varchar)\n"
 "{\n"
 "declare g_iid IRI_ID;\n"
@@ -2254,10 +2414,10 @@ static const char *proc84 =
 "iri_to_id (p_uri),\n"
 "iri_to_id (o_uri) );\n"
 "}\n"
-"--src sparql.sql:2181\n";
+"--src sparql.sql:2364\n";
 
-static const char *proc85 = 
-"#line 2198 \"[executable]/sparql.sql\"\n"
+static const char *proc89 = 
+"#line 2381 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QUAD_URI_L (in g_uri varchar, in s_uri varchar, in p_uri varchar, in o_lit any, in ro_id_dict any := null)\n"
 "{\n"
 "declare g_iid, s_iid, p_iid IRI_ID;\n"
@@ -2265,6 +2425,17 @@ static const char *proc85 =
 "g_iid := iri_to_id (g_uri);\n"
 "s_iid := iri_to_id (s_uri);\n"
 "p_iid := iri_to_id (p_uri);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
 "o_obj := DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (o_lit, g_iid, p_iid, ro_id_dict);\n"
 "if (__rdf_graph_is_in_enabled_repl (g_iid))\n"
 "{\n"
@@ -2274,10 +2445,10 @@ static const char *proc85 =
 "}\n"
 "insert soft DB.DBA.RDF_QUAD (G,S,P,O) values (g_iid, s_iid, p_iid, o_obj);\n"
 "}\n"
-"--src sparql.sql:2196\n";
+"--src sparql.sql:2379\n";
 
-static const char *proc86 = 
-"#line 2216 \"[executable]/sparql.sql\"\n"
+static const char *proc90 = 
+"#line 2410 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QUAD_URI_L_TYPED (in g_uri varchar, in s_uri varchar, in p_uri varchar, in o_lit any, in dt any, in lang varchar, in ro_id_dict any := null)\n"
 "{\n"
 "declare g_iid, s_iid, p_iid IRI_ID;\n"
@@ -2289,6 +2460,15 @@ static const char *proc86 =
 "o_obj := DB.DBA.RDF_MAKE_OBJ_OF_SQLVAL_FT (o_lit, g_iid, p_iid, ro_id_dict);\n"
 "else\n"
 "o_obj := DB.DBA.RDF_MAKE_OBJ_OF_TYPEDSQLVAL_FT (o_lit, iri_to_id (dt), lang, g_iid, p_iid, ro_id_dict);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
 "if (__rdf_graph_is_in_enabled_repl (g_iid))\n"
 "{\n"
 "declare triples any;\n"
@@ -2297,10 +2477,10 @@ static const char *proc86 =
 "}\n"
 "insert soft DB.DBA.RDF_QUAD (G,S,P,O) values (g_iid, s_iid, p_iid, o_obj);\n"
 "}\n"
-"--src sparql.sql:2214\n";
+"--src sparql.sql:2408\n";
 
-static const char *proc87 = 
-"#line 2237 \"[executable]/sparql.sql\"\n"
+static const char *proc91 = 
+"#line 2440 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QUAD_L_RDB2RDF (in g_iid varchar, in s_iid varchar, in p_iid varchar, inout o_val any, inout old_g_iid any, inout ro_id_dict any)\n"
 "{\n"
 "declare t int;\n"
@@ -2313,12 +2493,17 @@ static const char *proc87 =
 "t := __tag (o_val);\n"
 "if (__tag of rdf_box <> t)\n"
 "{\n"
-"if (not (t in (__tag of varchar, 126, 217, __tag of nvarchar)))\n"
+"if (not (t in (__tag of varchar, 126, 133, 217, __tag of nvarchar, 226)))\n"
 "{\n"
 "goto o_val_done;\n"
 "}\n"
-"if (__tag of nvarchar = t)\n"
-"o_val := charset_recode (o_val, \'_WIDE_\', \'UTF-8\');\n"
+"if (t = 133)\n"
+"{\n"
+"o_val := cast (o_val as nvarchar);\n"
+"t := __tag (o_val);\n"
+"}\n"
+"if (__tag of nvarchar = t or t = 226)\n"
+"o_val := charset_recode (o_val, \'_WIDE_\', \'UTF-8\');\n"
 "else if (t in (126, 217))\n"
 "o_val := cast (o_val as varchar);\n"
 "else if (bit_and (1, __box_flags (o_val)))\n"
@@ -2345,10 +2530,10 @@ static const char *proc87 =
 "o_val_done:\n"
 "insert soft DB.DBA.RDF_QUAD (G,S,P,O) values (g_iid, s_iid, p_iid, o_val);\n"
 "}\n"
-"--src sparql.sql:2235\n";
+"--src sparql.sql:2438\n";
 
-static const char *proc88 = 
-"#line 2283 \"[executable]/sparql.sql\"\n"
+static const char *proc92 = 
+"#line 2491 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_NEW_GRAPH (inout g varchar, inout g_iid IRI_ID, inout app_env any) {\n"
 "\n"
 "if (__rdf_obj_ft_rule_count_in_graph (g_iid))\n"
@@ -2360,27 +2545,27 @@ static const char *proc88 =
 "else\n"
 "app_env[3] := null;\n"
 "}\n"
-"--src sparql.sql:2281\n";
+"--src sparql.sql:2489\n";
 
-static const char *proc89 = 
-"#line 2296 \"[executable]/sparql.sql\"\n"
+static const char *proc93 = 
+"#line 2504 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_NEW_BLANK (inout g_iid IRI_ID, inout app_env any, inout res IRI_ID) {\n"
 "res := iri_id_from_num (sequence_next (\'RDF_URL_IID_BLANK\'));\n"
 "\n"
 "}\n"
-"--src sparql.sql:2294\n";
+"--src sparql.sql:2502\n";
 
-static const char *proc90 = 
-"#line 2302 \"[executable]/sparql.sql\"\n"
+static const char *proc94 = 
+"#line 2510 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_GET_IID (inout uri varchar, inout g_iid IRI_ID, inout app_env any, inout res IRI_ID) {\n"
 "\n"
 "res := iri_to_id (uri);\n"
 "\n"
 "}\n"
-"--src sparql.sql:2300\n";
+"--src sparql.sql:2508\n";
 
-static const char *proc91 = 
-"#line 2309 \"[executable]/sparql.sql\"\n"
+static const char *proc95 = 
+"#line 2517 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -2391,10 +2576,10 @@ static const char *proc91 =
 "__rdf_repl_quad (84, app_env[3], iri_canonicalize (s_uri), iri_canonicalize (p_uri), iri_canonicalize (o_uri));\n"
 "insert soft DB.DBA.RDF_QUAD (G,S,P,O) values (g_iid, iri_to_id (s_uri), iri_to_id (p_uri), iri_to_id (o_uri));\n"
 "}\n"
-"--src sparql.sql:2307\n";
+"--src sparql.sql:2515\n";
 
-static const char *proc92 = 
-"#line 2321 \"[executable]/sparql.sql\"\n"
+static const char *proc96 = 
+"#line 2529 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_L (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
@@ -2472,10 +2657,10 @@ static const char *proc92 =
 "o_val );\n"
 "}\n"
 "}\n"
-"--src sparql.sql:2319\n";
+"--src sparql.sql:2527\n";
 
-static const char *proc93 = 
-"#line 2400 \"[executable]/sparql.sql\"\n"
+static const char *proc97 = 
+"#line 2608 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_COMMIT (inout g varchar, inout app_env any) {\n"
 "\n"
 "declare log_mode integer;\n"
@@ -2485,10 +2670,10 @@ static const char *proc93 =
 "if (ro_id_dict is not null)\n"
 "DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (iri_to_id (g), ro_id_dict);\n"
 "}\n"
-"--src sparql.sql:2398\n";
+"--src sparql.sql:2606\n";
 
-static const char *proc94 = 
-"#line 2411 \"[executable]/sparql.sql\"\n"
+static const char *proc98 = 
+"#line 2619 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_REPORT_DEFAULT (\n"
 "inout msg_no integer, inout msg_type varchar,\n"
 "inout src varchar, inout base varchar, inout graph varchar,\n"
@@ -2499,10 +2684,10 @@ static const char *proc94 =
 "\n"
 " ;\n"
 "}\n"
-"--src sparql.sql:2409\n";
+"--src sparql.sql:2617\n";
 
-static const char *proc95 = 
-"#line 2423 \"[executable]/sparql.sql\"\n"
+static const char *proc99 = 
+"#line 2631 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_XLAT (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -2517,10 +2702,10 @@ static const char *proc95 =
 "o_xlat := call(xlat_cbk)(o_uri, xlat_env);\n"
 "DB.DBA.TTLP_EV_TRIPLE (g_iid, s_xlat, p_uri, o_xlat, app_env);\n"
 "}\n"
-"--src sparql.sql:2421\n";
+"--src sparql.sql:2629\n";
 
-static const char *proc96 = 
-"#line 2439 \"[executable]/sparql.sql\"\n"
+static const char *proc100 = 
+"#line 2647 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_L_XLAT (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
@@ -2534,10 +2719,10 @@ static const char *proc96 =
 "s_xlat := call(xlat_cbk)(s_uri, xlat_env);\n"
 "DB.DBA.TTLP_EV_TRIPLE_L (g_iid, s_xlat, p_uri, o_val, o_type, o_lang, app_env);\n"
 "}\n"
-"--src sparql.sql:2437\n";
+"--src sparql.sql:2645\n";
 
-static const char *proc97 = 
-"#line 2455 \"[executable]/sparql.sql\"\n"
+static const char *proc101 = 
+"#line 2663 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.TTLP_XLAT_CONCAT (\n"
 "inout iri varchar, inout env any )\n"
 "{\n"
@@ -2547,10 +2732,10 @@ static const char *proc97 =
 "return concat (env, subseq (iri, 7));\n"
 "return iri;\n"
 "}\n"
-"--src sparql.sql:2453\n";
+"--src sparql.sql:2661\n";
 
-static const char *proc98 = 
-"#line 2466 \"[executable]/sparql.sql\"\n"
+static const char *proc102 = 
+"#line 2674 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0,\n"
 "in log_enable int := null, in transactional int := 0)\n"
 "{\n"
@@ -2577,7 +2762,7 @@ static const char *proc98 =
 "}\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
 "{\n"
-"DB.DBA.TTLP_CL (strg, base, graph, flags);\n"
+"DB.DBA.TTLP_CL (strg, 0, base, graph, flags);\n"
 "return;\n"
 "}\n"
 "if (126 = __tag (strg))\n"
@@ -2597,10 +2782,10 @@ static const char *proc98 =
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
 "return ret;\n"
 "}\n"
-"--src sparql.sql:2464\n";
+"--src sparql.sql:2672\n";
 
-static const char *proc99 = 
-"#line 2514 \"[executable]/sparql.sql\"\n"
+static const char *proc103 = 
+"#line 2722 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_WITH_IRI_TRANSLATION (in strg varchar, in base varchar, in graph varchar, in flags integer,\n"
 "in log_enable integer, in transactional integer,\n"
 "in iri_xlate_cbk varchar, in iri_xlate_env any )\n"
@@ -2625,11 +2810,11 @@ static const char *proc99 =
 "{\n"
 "old_log_mode := log_enable (log_enable, 1);\n"
 "}\n"
-"if (1 <> sys_stat (\'cl_run_local_only\'))\n"
-"{\n"
-"DB.DBA.TTLP_CL (strg, base, graph, flags);\n"
-"return;\n"
-"}\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
 "if (126 = __tag (strg))\n"
 "strg := cast (strg as varchar);\n"
 "app_env := vector (flags, null, __max (length (strg) / 100, 100000), null, iri_xlate_cbk, iri_xlate_env);\n"
@@ -2644,10 +2829,10 @@ static const char *proc99 =
 "\'DB.DBA.TTLP_EV_REPORT_DEFAULT\' ),\n"
 "app_env);\n"
 "}\n"
-"--src sparql.sql:2512\n";
+"--src sparql.sql:2720\n";
 
-static const char *proc100 = 
-"#line 2559 \"[executable]/sparql.sql\"\n"
+static const char *proc104 = 
+"#line 2767 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_VALIDATE (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0, in report_cbk varchar := \'\')\n"
 "{\n"
 "declare app_env any;\n"
@@ -2658,10 +2843,10 @@ static const char *proc100 =
 "vector (\'\', \'\', \'\', \'\', \'\', \'\', report_cbk),\n"
 "app_env);\n"
 "}\n"
-"--src sparql.sql:2557\n";
+"--src sparql.sql:2765\n";
 
-static const char *proc101 = 
-"#line 2571 \"[executable]/sparql.sql\"\n"
+static const char *proc105 = 
+"#line 2779 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_VALIDATE_LOCAL_FILE (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0, in report_cbk varchar := \'\')\n"
 "{\n"
 "declare app_env any;\n"
@@ -2672,35 +2857,54 @@ static const char *proc101 =
 "vector (\'\', \'\', \'\', \'\', \'\', \'\', report_cbk),\n"
 "app_env);\n"
 "}\n"
-"--src sparql.sql:2569\n";
+"--src sparql.sql:2777\n";
 
-static const char *proc102 = 
-"#line 2583 \"[executable]/sparql.sql\"\n"
+static const char *proc106 = 
+"#line 2791 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_VALIDATE_RDFXML (in strg varchar, in base varchar, in graph varchar)\n"
+"{\n"
+"declare app_env any;\n"
+"declare old_log_mode int;\n"
+"if (graph = \'\')\n"
+"signal (\'22023\', \'Empty string is not a valid graph IRI in DB.DBA.RDF_VALIDATE_RDFXML()\');\n"
+"else if (graph is null)\n"
+"{\n"
+"graph := base;\n"
+"if ((graph is null) or (graph = \'\'))\n"
+"signal (\'22023\', \'DB.DBA.RDF_VALIDATE_RDFXML() requires a valid IRI as a base argument if graph is not specified\');\n"
+"}\n"
+"rdf_load_rdfxml (strg, 0, graph, vector ( \'\', \'\', \'\', \'\', \'\', \'\', \'\' ), app_env, base );\n"
+"return graph;\n"
+"}\n"
+"--src sparql.sql:2789\n";
+
+static const char *proc107 = 
+"#line 2808 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH (inout g varchar, inout g_iid IRI_ID, inout app_env any) {\n"
 "\n"
 " ;\n"
 "}\n"
-"--src sparql.sql:2581\n";
+"--src sparql.sql:2806\n";
 
-static const char *proc103 = 
-"#line 2589 \"[executable]/sparql.sql\"\n"
+static const char *proc108 = 
+"#line 2814 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK (inout g_iid IRI_ID, inout app_env any, inout res IRI_ID) {\n"
 "res := iri_id_from_num (sequence_next (\'RDF_URL_IID_BLANK\'));\n"
 "\n"
 "}\n"
-"--src sparql.sql:2587\n";
+"--src sparql.sql:2812\n";
 
-static const char *proc104 = 
-"#line 2595 \"[executable]/sparql.sql\"\n"
+static const char *proc109 = 
+"#line 2820 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2HASH_EXEC_GET_IID (inout uri varchar, inout g_iid IRI_ID, inout app_env any, inout res IRI_ID) {\n"
 "\n"
 "res := iri_to_id (uri);\n"
 "\n"
 "}\n"
-"--src sparql.sql:2593\n";
+"--src sparql.sql:2818\n";
 
-static const char *proc105 = 
-"#line 2602 \"[executable]/sparql.sql\"\n"
+static const char *proc110 = 
+"#line 2827 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -2710,32 +2914,85 @@ static const char *proc105 =
 "vector (iri_to_id (s_uri), iri_to_id (p_uri), iri_to_id (o_uri)),\n"
 "0 );\n"
 "}\n"
-"--src sparql.sql:2600\n";
+"--src sparql.sql:2825\n";
 
-static const char *proc106 = 
-"#line 2613 \"[executable]/sparql.sql\"\n"
+static const char *proc111 = 
+"#line 2838 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
 "inout app_env any )\n"
 "{\n"
-"if (not isstring (o_type))\n"
-"o_type := null;\n"
-"if (not isstring (o_lang))\n"
-"o_lang := null;\n"
 "dict_put (app_env,\n"
 "vector (\n"
 "iri_to_id (s_uri),\n"
 "iri_to_id (p_uri),\n"
 "DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (o_val,\n"
-"case (isstring (o_type)) when 0 then null else o_type end,\n"
-"case (isstring (o_lang)) when 0 then null else o_lang end) ),\n"
+"case when (isstring (o_type) or __tag (o_type) = 217) then o_type else null end,\n"
+"case when (isstring (o_lang) or __tag (o_lang) = 217) then o_lang else null end) ),\n"
 "0 );\n"
 "}\n"
-"--src sparql.sql:2611\n";
+"--src sparql.sql:2836\n";
 
-static const char *proc107 = 
-"#line 2633 \"[executable]/sparql.sql\"\n"
+static const char *proc112 = 
+"#line 2854 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_XLAT (\n"
+"inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
+"inout o_uri varchar,\n"
+"inout app_env any )\n"
+"{\n"
+"\n"
+"declare xlat_cbk, s_xlat, o_xlat varchar;\n"
+"declare xlat_env, dict any;\n"
+"\n"
+"dict := app_env[0];\n"
+"xlat_cbk := app_env[1];\n"
+"xlat_env := app_env[2];\n"
+"if (__proc_params_num (xlat_cbk) = 2)\n"
+"{\n"
+"s_xlat := call(xlat_cbk)(s_uri, xlat_env);\n"
+"o_xlat := call(xlat_cbk)(o_uri, xlat_env);\n"
+"}\n"
+"else\n"
+"{\n"
+"s_xlat := call(xlat_cbk)(s_uri, p_uri, \'s\', xlat_env);\n"
+"o_xlat := call(xlat_cbk)(o_uri, p_uri, \'o\', xlat_env);\n"
+"}\n"
+"\n"
+"dict_put (dict, vector (iri_to_id (s_xlat), iri_to_id (p_uri), iri_to_id (o_xlat)), 0);\n"
+"}\n"
+"--src sparql.sql:2852\n";
+
+static const char *proc113 = 
+"#line 2881 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L_XLAT (\n"
+"inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
+"inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
+"inout app_env any )\n"
+"{\n"
+"declare xlat_cbk, s_xlat, o_xlat varchar;\n"
+"declare xlat_env, dict any;\n"
+"\n"
+"dict := app_env[0];\n"
+"xlat_cbk := app_env[1];\n"
+"xlat_env := app_env[2];\n"
+"if (__proc_params_num (xlat_cbk) = 2)\n"
+"s_xlat := call(xlat_cbk)(s_uri, xlat_env);\n"
+"else\n"
+"s_xlat := call(xlat_cbk)(s_uri, p_uri, \'s\', xlat_env);\n"
+"dict_put (dict,\n"
+"vector (\n"
+"iri_to_id (s_xlat),\n"
+"iri_to_id (p_uri),\n"
+"DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS (o_val,\n"
+"case when (isstring (o_type) or __tag (o_type) = 217) then o_type else null end,\n"
+"case when (isstring (o_lang) or __tag (o_lang) = 217) then o_lang else null end) ),\n"
+"0);\n"
+"}\n"
+"--src sparql.sql:2879\n";
+
+static const char *proc114 = 
+"#line 2907 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_TTL2HASH (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0) returns any\n"
 "{\n"
 "declare res any;\n"
@@ -2755,19 +3012,41 @@ static const char *proc107 =
 "res);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:2631\n";
+"--src sparql.sql:2905\n";
 
-static const char *proc108 = 
-"#line 2654 \"[executable]/sparql.sql\"\n"
+static const char *proc115 = 
+"#line 2928 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_TTL_LOAD_DICT (in strg varchar, in base varchar, in graph varchar, in dict any, in flags integer := 0) returns any\n"
+"{\n"
+"if (__tag (dict) <> 214)\n"
+"signal (\'22023\', \'RDFXX\', \'The dict argument must be of type dictionary\');\n"
+"if (126 = __tag (strg))\n"
+"strg := cast (strg as varchar);\n"
+"rdf_load_turtle (strg, base, graph, flags,\n"
+"vector (\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_GET_IID\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L\',\n"
+"\'\',\n"
+"\'DB.DBA.TTLP_EV_REPORT_DEFAULT\' ),\n"
+"dict);\n"
+"return;\n"
+"}\n"
+"--src sparql.sql:2926\n";
+
+static const char *proc116 = 
+"#line 2948 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2SQLHASH_EXEC_GET_IID (inout uri varchar, inout g_iid IRI_ID, inout app_env any, inout res IRI_ID) {\n"
 "\n"
 "res := __bft (uri, 1);\n"
 "\n"
 "}\n"
-"--src sparql.sql:2652\n";
+"--src sparql.sql:2946\n";
 
-static const char *proc109 = 
-"#line 2661 \"[executable]/sparql.sql\"\n"
+static const char *proc117 = 
+"#line 2955 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2SQLHASH_EXEC_TRIPLE (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -2780,10 +3059,10 @@ static const char *proc109 =
 "__bft (o_uri, 1) ),\n"
 "0 );\n"
 "}\n"
-"--src sparql.sql:2659\n";
+"--src sparql.sql:2953\n";
 
-static const char *proc110 = 
-"#line 2675 \"[executable]/sparql.sql\"\n"
+static const char *proc118 = 
+"#line 2969 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TTL2SQLHASH_EXEC_TRIPLE_L (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
@@ -2802,10 +3081,10 @@ static const char *proc110 =
 "case (isstring (o_lang)) when 0 then null else o_lang end) ),\n"
 "0 );\n"
 "}\n"
-"--src sparql.sql:2673\n";
+"--src sparql.sql:2967\n";
 
-static const char *proc111 = 
-"#line 2695 \"[executable]/sparql.sql\"\n"
+static const char *proc119 = 
+"#line 2989 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_TTL2SQLHASH (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0) returns any\n"
 "{\n"
 "declare res any;\n"
@@ -2825,22 +3104,22 @@ static const char *proc111 =
 "res);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:2693\n";
+"--src sparql.sql:2987\n";
 
-static const char *proc112 = 
-"#line 2716 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.RDF_LOAD_RDFXML (in strg varchar, in base varchar, in graph varchar,\n"
-"in log_enable int := null, in transactional int := 0)\n"
+static const char *proc120 = 
+"#line 3010 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_LOAD_RDFXML_IMPL (inout strg varchar, in base varchar, in graph varchar,\n"
+"in parse_mode integer, in log_enable int := null, in transactional int := 0)\n"
 "{\n"
 "declare app_env any;\n"
 "declare old_log_mode int;\n"
 "if (graph = \'\')\n"
-"signal (\'22023\', \'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFXML()\');\n"
+"signal (\'22023\', \'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFXML() and the like\');\n"
 "else if (graph is null)\n"
 "{\n"
 "graph := base;\n"
 "if ((graph is null) or (graph = \'\'))\n"
-"signal (\'22023\', \'DB.DBA.RDF_LOAD_RDFXML() requires a valid IRI as a base argument if graph is not specified\');\n"
+"signal (\'22023\', \'DB.DBA.RDF_LOAD_RDFXML() and similar functions require a valid IRI as a base argument if graph is not specified\');\n"
 "}\n"
 "old_log_mode := null;\n"
 "if (transactional = 0)\n"
@@ -2853,13 +3132,13 @@ static const char *proc112 =
 "old_log_mode := log_enable (log_enable, 1);\n"
 "}\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
-"return rdf_load_rdfxml_cl (strg, base, graph);\n"
+"return DB.DBA.RDF_LOAD_RDFXML_CL (strg, base, graph, parse_mode);\n"
 "app_env := vector (\n"
 "null,\n"
 "null,\n"
 "__max (length (strg) / 100, 100000),\n"
 "null );\n"
-"rdf_load_rdfxml (strg, 0,\n"
+"rdf_load_rdfxml (strg, parse_mode,\n"
 "graph,\n"
 "vector (\n"
 "\'DB.DBA.TTLP_EV_NEW_GRAPH\',\n"
@@ -2875,10 +3154,19 @@ static const char *proc112 =
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
 "return graph;\n"
 "}\n"
-"--src sparql.sql:2714\n";
+"--src sparql.sql:3008\n";
 
-static const char *proc113 = 
-"#line 2764 \"[executable]/sparql.sql\"\n"
+static const char *proc121 = 
+"#line 3058 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_LOAD_RDFXML (in strg varchar, in base varchar, in graph varchar := null,\n"
+"in xml_parse_mode integer := 0, in log_enable int := null, in transactional int := 0 )\n"
+"{\n"
+"return DB.DBA.RDF_LOAD_RDFXML_IMPL (strg, base, graph, bit_shift (xml_parse_mode, 8), log_enable, transactional);\n"
+"}\n"
+"--src sparql.sql:3056\n";
+
+static const char *proc122 = 
+"#line 3066 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_RDFXML_TO_DICT (in strg varchar, in base varchar, in graph varchar := null)\n"
 "{\n"
 "declare res any;\n"
@@ -2897,50 +3185,133 @@ static const char *proc113 =
 "base );\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:2762\n";
+"--src sparql.sql:3064\n";
 
-static const char *proc114 = 
-"#line 2784 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.RDF_LOAD_RDFA (in strg varchar, in base varchar, in graph varchar := null, in xml_parse_mode integer := 0)\n"
+static const char *proc123 = 
+"#line 3086 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_RDFXML_LOAD_DICT (in strg varchar, in base varchar, in graph varchar, inout dict any, in flag int := 0, in xml_parse_mode int := 0)\n"
+"{\n"
+"if (__tag (dict) <> 214)\n"
+"signal (\'22023\', \'RDFXX\', \'The dict argument must be of type dictionary\');\n"
+"if (flag = 0)\n"
+"xml_parse_mode := 0;\n"
+"rdf_load_rdfxml (strg, bit_or (flag, bit_shift (xml_parse_mode, 8)),\n"
+"graph,\n"
+"vector (\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_GET_IID\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L\',\n"
+"\'\',\n"
+"\'DB.DBA.TTLP_EV_REPORT_DEFAULT\' ),\n"
+"dict,\n"
+"base );\n"
+"}\n"
+"--src sparql.sql:3084\n";
+
+static const char *proc124 = 
+"#line 3107 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDFA_LOAD_DICT_XLAT (in strg varchar, in base varchar, in graph varchar, inout dict any, in xml_parse_mode int := 0, in iri_xlate_cbk varchar, in iri_xlate_env any)\n"
 "{\n"
 "declare app_env any;\n"
-"if (graph = \'\')\n"
-"signal (\'22023\', \'Empty string is not a valid graph IRI in DB.DBA.RDF_LOAD_RDFA()\');\n"
-"else if (graph is null)\n"
-"{\n"
-"graph := base;\n"
-"if ((graph is null) or (graph = \'\'))\n"
-"signal (\'22023\', \'DB.DBA.RDF_LOAD_RDFA() requires a valid IRI as a base argument if graph is not specified\');\n"
-"}\n"
-"if (1 <> sys_stat (\'cl_run_local_only\'))\n"
-"return DB.DBA.RDF_LOAD_RDFA_CL (strg, base, graph, xml_parse_mode);\n"
-"app_env := vector (\n"
-"null,\n"
-"null,\n"
-"__max (length (strg) / 100, 100000),\n"
-"null );\n"
+"if (__tag (dict) <> 214)\n"
+"signal (\'22023\', \'RDFXX\', \'The dict argument must be of type dictionary\');\n"
 "rdf_load_rdfxml (strg, bit_or (2, bit_shift (xml_parse_mode, 8)),\n"
 "graph,\n"
 "vector (\n"
-"\'DB.DBA.TTLP_EV_NEW_GRAPH\',\n"
-"\'DB.DBA.TTLP_EV_NEW_BLANK\',\n"
-"\'DB.DBA.TTLP_EV_GET_IID\',\n"
-"\'DB.DBA.TTLP_EV_TRIPLE\',\n"
-"\'DB.DBA.TTLP_EV_TRIPLE_L\',\n"
-"\'DB.DBA.TTLP_EV_COMMIT\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_GET_IID\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_XLAT\',\n"
+"\'DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L_XLAT\',\n"
+"\'\',\n"
 "\'DB.DBA.TTLP_EV_REPORT_DEFAULT\' ),\n"
-"app_env,\n"
+"vector (dict, iri_xlate_cbk, iri_xlate_env),\n"
 "base );\n"
-"if (__rdf_graph_is_in_enabled_repl (iri_to_id (graph)))\n"
-"repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
-"return graph;\n"
 "}\n"
-"--src sparql.sql:2782\n";
+"--src sparql.sql:3105\n";
 
-static const char *proc115 = 
-"#line 2820 \"[executable]/sparql.sql\"\n"
+static const char *proc125 = 
+"#line 3129 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_RDFA11_FETCH_PROFILES (in profile_iris any, inout prefixes any, inout terms any, inout vocab any)\n"
+"{\n"
+"declare agg any;\n"
+"\n"
+"foreach (varchar profile_iri in profile_iris) do\n"
+"{\n"
+"if (not exists (sparql define input:storage \"\" ask where { graph `iri(?:profile_iri)` { ?s ?p ?o }}))\n"
+"DB.DBA.SPARUL_LOAD (profile_iri, profile_iri, 0, NULL, 0);\n"
+"}\n"
+"vectorbld_init (agg);\n"
+"foreach (varchar profile_iri in profile_iris) do\n"
+"{\n"
+"for (sparql define input:storage \"\" prefix rdfa: <http://www.w3.org/ns/rdfa#>\n"
+"select ?p, ?u\n"
+"where {\n"
+"graph `iri(?:profile_iri)` {\n"
+"?s rdfa:prefix ?p ; rdfa:uri ?u .\n"
+"optional { ?s rdfa:uri ?u2 . filter (?u != ?u2). }\n"
+"filter (isliteral (?p))\n"
+"filter (isliteral (?u))\n"
+"filter (?u != \'\')\n"
+"filter (!bound (?u2)) } }\n"
+") do { vectorbld_acc (agg, \"p\", \"u\"); }\n"
+"}\n"
+"vectorbld_final (agg);\n"
+"prefixes := agg;\n"
+"vectorbld_init (agg);\n"
+"foreach (varchar profile_iri in profile_iris) do\n"
+"{\n"
+"for (sparql define input:storage \"\" prefix rdfa: <http://www.w3.org/ns/rdfa#>\n"
+"select ?t, ?u\n"
+"where {\n"
+"graph `iri(?:profile_iri)` {\n"
+"?s rdfa:term ?t ; rdfa:uri ?u .\n"
+"optional { ?s rdfa:uri ?u2 . filter (?u != ?u2). }\n"
+"optional { ?s rdfa:term ?t2 . filter (?t != ?t2). }\n"
+"filter (isliteral (?t))\n"
+"filter (isliteral (?u))\n"
+"filter (?t != \'\')\n"
+"filter (?u != \'\')\n"
+"filter (!bound (?t2))\n"
+"filter (!bound (?u2)) } }\n"
+"order by ?t\n"
+") do { vectorbld_acc (agg, \"t\", \"u\"); }\n"
+"}\n"
+"vectorbld_final (agg);\n"
+"if (1 < length (profile_iris))\n"
+"gvector_sort (agg, 2, 0, 1);\n"
+"terms := agg;\n"
+"vocab := null;\n"
+"foreach (varchar profile_iri in profile_iris) do\n"
+"{\n"
+"vocab := (sparql define input:storage \"\" prefix rdfa: <http://www.w3.org/ns/rdfa#>\n"
+"select (max(str(?v)))\n"
+"where {\n"
+"graph `iri(?:profile_iri)` {\n"
+"?s rdfa:vocabulary ?v } } );\n"
+"if (isstring (vocab))\n"
+"goto vocab_is_set;\n"
+"}\n"
+"vocab_is_set: ;\n"
+"\n"
+"}\n"
+"--src sparql.sql:3127\n";
+
+static const char *proc126 = 
+"#line 3195 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_LOAD_RDFA (in strg varchar, in base varchar, in graph varchar := null,\n"
+"in xml_parse_mode integer := 0, in log_enable int := null, in transactional int := 0 )\n"
+"{\n"
+"return DB.DBA.RDF_LOAD_RDFXML_IMPL (strg, base, graph, bit_or (2, bit_shift (xml_parse_mode, 8)), log_enable, transactional);\n"
+"}\n"
+"--src sparql.sql:3193\n";
+
+static const char *proc127 = 
+"#line 3202 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION (in strg varchar, in base varchar, in graph varchar, in xml_parse_mode integer,\n"
-"in iri_xlate_cbk varchar, in iri_xlate_env any )\n"
+"in iri_xlate_cbk varchar, in iri_xlate_env any)\n"
 "{\n"
 "declare app_env any;\n"
 "if (graph = \'\')\n"
@@ -2976,10 +3347,10 @@ static const char *proc115 =
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
 "return graph;\n"
 "}\n"
-"--src sparql.sql:2818\n";
+"--src sparql.sql:3200\n";
 
-static const char *proc116 = 
-"#line 2859 \"[executable]/sparql.sql\"\n"
+static const char *proc128 = 
+"#line 3241 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_RDFA_TO_DICT (in strg varchar, in base varchar, in graph varchar := null)\n"
 "{\n"
 "declare res any;\n"
@@ -2998,10 +3369,19 @@ static const char *proc116 =
 "base );\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:2857\n";
+"--src sparql.sql:3239\n";
 
-static const char *proc117 = 
-"#line 2883 \"[executable]/sparql.sql\"\n"
+static const char *proc129 = 
+"#line 3261 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_LOAD_XHTML_MICRODATA (in strg varchar, in base varchar, in graph varchar := null,\n"
+"in xml_parse_mode integer := 1, in log_enable int := null, in transactional int := 0 )\n"
+"{\n"
+"return DB.DBA.RDF_LOAD_RDFXML_IMPL (strg, base, graph, bit_or (4, bit_shift (xml_parse_mode, 8)), log_enable, transactional);\n"
+"}\n"
+"--src sparql.sql:3259\n";
+
+static const char *proc130 = 
+"#line 3272 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_XML_IRI_TO_TTL (inout obj any, inout ses any)\n"
 "{\n"
 "declare res varchar;\n"
@@ -3045,10 +3425,10 @@ static const char *proc117 =
 "http (\'> \', ses);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:2881\n";
+"--src sparql.sql:3270\n";
 
-static const char *proc118 = 
-"#line 2929 \"[executable]/sparql.sql\"\n"
+static const char *proc131 = 
+"#line 3318 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_XML_OBJ_TO_TTL (\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
 "inout ses any)\n"
@@ -3092,18 +3472,18 @@ static const char *proc118 =
 "else\n"
 "http (\'\" \', ses);\n"
 "}\n"
-"--src sparql.sql:2927\n";
+"--src sparql.sql:3316\n";
 
-static const char *proc119 = 
-"#line 2975 \"[executable]/sparql.sql\"\n"
+static const char *proc132 = 
+"#line 3364 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_NEW_BLANK (inout g_iid IRI_ID, inout app_env any, inout res IRI_ID)\n"
 "{\n"
 " ;\n"
 "}\n"
-"--src sparql.sql:2973\n";
+"--src sparql.sql:3362\n";
 
-static const char *proc120 = 
-"#line 2982 \"[executable]/sparql.sql\"\n"
+static const char *proc133 = 
+"#line 3371 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_TRIPLE (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -3114,10 +3494,10 @@ static const char *proc120 =
 "DB.DBA.RDF_XML_IRI_TO_TTL (o_uri, app_env);\n"
 "http (\'.\\n\', app_env);\n"
 "}\n"
-"--src sparql.sql:2980\n";
+"--src sparql.sql:3369\n";
 
-static const char *proc121 = 
-"#line 2995 \"[executable]/sparql.sql\"\n"
+static const char *proc134 = 
+"#line 3384 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_TRIPLE_L (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
@@ -3128,10 +3508,10 @@ static const char *proc121 =
 "DB.DBA.RDF_XML_OBJ_TO_TTL (o_val, o_type, o_lang, app_env);\n"
 "http (\'.\\n\', app_env);\n"
 "}\n"
-"--src sparql.sql:2993\n";
+"--src sparql.sql:3382\n";
 
-static const char *proc122 = 
-"#line 3008 \"[executable]/sparql.sql\"\n"
+static const char *proc135 = 
+"#line 3397 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_CONVERT_RDFXML_TO_TTL (in strg varchar, in base varchar, inout ttl_ses any)\n"
 "{\n"
 "rdf_load_rdfxml (strg, 0,\n"
@@ -3147,10 +3527,10 @@ static const char *proc122 =
 "ttl_ses,\n"
 "base );\n"
 "}\n"
-"--src sparql.sql:3006\n";
+"--src sparql.sql:3395\n";
 
-static const char *proc123 = 
-"#line 3026 \"[executable]/sparql.sql\"\n"
+static const char *proc136 = 
+"#line 3415 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_CONVERT_RDFXML_FILE_TO_TTL_FILE (in rdfxml_source_filename varchar, in base varchar, in ttl_target_filename varchar)\n"
 "{\n"
 "declare in_ses, out_ses any;\n"
@@ -3159,10 +3539,10 @@ static const char *proc123 =
 "DB.DBA.RDF_CONVERT_RDFXML_TO_TTL (in_ses, base, out_ses);\n"
 "string_to_file (ttl_target_filename, out_ses, -2);\n"
 "}\n"
-"--src sparql.sql:3024\n";
+"--src sparql.sql:3413\n";
 
-static const char *proc124 = 
-"#line 3039 \"[executable]/sparql.sql\"\n"
+static const char *proc137 = 
+"#line 3428 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_LONG_TO_TTL (inout obj any, inout ses any)\n"
 "{\n"
 "declare res varchar;\n"
@@ -3264,10 +3644,18 @@ static const char *proc124 =
 "http (\'> \', ses);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:3037\n";
+"--src sparql.sql:3426\n";
 
-static const char *proc125 = 
-"#line 3143 \"[executable]/sparql.sql\"\n"
+static const char *proc138 = 
+"#line 3534 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (inout triples any)\n"
+"{\n"
+"return;\n"
+"}\n"
+"--src sparql.sql:3532\n";
+
+static const char *proc139 = 
+"#line 3541 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_VERBOSE_TTL (inout triples any, inout ses any)\n"
 "{\n"
 "declare tcount, tctr integer;\n"
@@ -3317,6 +3705,7 @@ static const char *proc125 =
 "rowvector_digit_sort (triples, 1, 1);\n"
 "if (not string_subjs_found)\n"
 "rowvector_digit_sort (triples, 0, 1);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "prev_s := null;\n"
 "prev_p := null;\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
@@ -3397,10 +3786,10 @@ static const char *proc125 =
 "}\n"
 "http (\'.\\n\', ses);\n"
 "}\n"
-"--src sparql.sql:3141\n";
+"--src sparql.sql:3539\n";
 
-static const char *proc126 = 
-"#line 3274 \"[executable]/sparql.sql\"\n"
+static const char *proc140 = 
+"#line 3673 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_TTL (inout triples any, inout ses any)\n"
 "{\n"
 "declare env any;\n"
@@ -3421,37 +3810,108 @@ static const char *proc126 =
 "rowvector_subj_sort (triples, 0, 1);\n"
 "end_subj_sort: ;\n"
 "}\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
 "http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
 "}\n"
 "http (\' .\', ses);\n"
 "}\n"
-"--src sparql.sql:3272\n";
+"--src sparql.sql:3671\n";
 
-static const char *proc127 = 
-"#line 3302 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.RDF_TRIPLES_TO_NT (inout triples any, inout ses any)\n"
+static const char *proc141 = 
+"#line 3702 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_TRIG (inout triples any, inout ses any)\n"
 "{\n"
 "declare env any;\n"
-"declare tcount, tctr integer;\n"
+"declare tcount, tctr, first_dflt_g_idx integer;\n"
+"declare prev_g_iri varchar;\n"
+"declare first_g_idx integer;\n"
 "tcount := length (triples);\n"
-"\n"
 "if (0 = tcount)\n"
 "{\n"
-"http (\'# Empty NT\\n\', ses);\n"
+"http (\'# Empty TriG\\n\', ses);\n"
 "return;\n"
 "}\n"
-"env := vector (0, 0, 0);\n"
-"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
-"{\n"
-"http_nt_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
+"env := vector (dict_new (__min (tcount, 16000)), 0, \'\', \'\', \'\', 0, 0, 0, 0);\n"
+"{ whenever sqlstate \'*\' goto end_pred_sort;\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"end_pred_sort: ;\n"
 "}\n"
+"{ whenever sqlstate \'*\' goto end_subj_sort;\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"end_subj_sort: ;\n"
 "}\n"
-"--src sparql.sql:3300\n";
-
-static const char *proc128 = 
-"#line 3321 \"[executable]/sparql.sql\"\n"
+"rowvector_graph_sort (triples, 3, 1);\n"
+"\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"for (tctr := 0; (tctr < tcount) and aref_or_default (triples, tctr, 3, null) is null; tctr := tctr + 1)\n"
+"{\n"
+"http_ttl_prefixes (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
+"}\n"
+"first_g_idx := tctr;\n"
+"for (tctr := first_g_idx; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"http_ttl_prefixes (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
+"}\n"
+"if (0 < first_g_idx)\n"
+"{\n"
+"http (\'{\\n\', ses);\n"
+"for (tctr := 0; tctr < first_g_idx; tctr := tctr + 1)\n"
+"{\n"
+"http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
+"}\n"
+"http (\' .\\n}\\n\', ses);\n"
+"}\n"
+"prev_g_iri := \'\';\n"
+"for (tctr := first_g_idx; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"declare g_iri varchar;\n"
+"g_iri := id_to_iri_nosignal (triples[tctr][3]);\n"
+"if (g_iri is not null)\n"
+"{\n"
+"if (g_iri <> prev_g_iri)\n"
+"{\n"
+"if (prev_g_iri <> \'\')\n"
+"http (\' .\\n}\\n\', ses);\n"
+"env[1] := 0;\n"
+"http (\'<\', ses);\n"
+"http_escape (g_iri, 12, ses, 1, 1);\n"
+"http (\'> = {\\n\', ses);\n"
+"prev_g_iri := g_iri;\n"
+"}\n"
+"http_ttl_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
+"}\n"
+"}\n"
+"if (prev_g_iri <> \'\')\n"
+"http (\' .\\n}\\n\', ses);\n"
+"}\n"
+"--src sparql.sql:3700\n";
+
+static const char *proc142 = 
+"#line 3769 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_NT (inout triples any, inout ses any)\n"
+"{\n"
+"declare env any;\n"
+"declare tcount, tctr integer;\n"
+"tcount := length (triples);\n"
+"\n"
+"if (0 = tcount)\n"
+"{\n"
+"http (\'# Empty NT\\n\', ses);\n"
+"return;\n"
+"}\n"
+"env := vector (0, 0, 0);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"http_nt_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
+"}\n"
+"}\n"
+"--src sparql.sql:3767\n";
+
+static const char *proc143 = 
+"#line 3789 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_TO_TTL (in graph_iri varchar, inout ses any)\n"
 "{\n"
 "declare tcount integer;\n"
@@ -3511,227 +3971,84 @@ static const char *proc128 =
 "else\n"
 "http (\'.\\n\', ses);\n"
 "}\n"
-"--src sparql.sql:3319\n";
+"--src sparql.sql:3787\n";
 
-static const char *proc129 = 
-"#line 3395 \"[executable]/sparql.sql\"\n"
+static const char *proc144 = 
+"#line 3863 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (inout triples any, in print_top_level integer, inout ses any)\n"
 "{\n"
+"declare ns_dict, env any;\n"
 "declare tcount, tctr integer;\n"
 "tcount := length (triples);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"{ whenever sqlstate \'*\' goto end_pred_sort;\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"end_pred_sort: ;\n"
+"}\n"
+"ns_dict := dict_new (case (print_top_level) when 0 then 10 else __min (tcount, 16000) end);\n"
+"dict_put (ns_dict, \'http://www.w3.org/1999/02/22-rdf-syntax-ns#\', \'rdf\');\n"
+"dict_put (ns_dict, \'http://www.w3.org/2000/01/rdf-schema#\', \'rdfs\');\n"
+"env := vector (ns_dict, 0, 0, \'\', \'\', 0, 0, 0, 0);\n"
 "if (print_top_level)\n"
 "{\n"
-"http (\'<?xml version=\"1.0\" encoding=\"utf-8\" ?>\\n<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" \'||\n"
-"\'xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\', ses);\n"
-"}\n"
+"http (\'<?xml version=\"1.0\" encoding=\"utf-8\" ?>\\n<rdf:RDF\\n\\txmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\\n\\txmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\', ses);\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
-"declare subj, pred, obj any;\n"
-"declare pred_tagname varchar;\n"
-"declare res varchar;\n"
-"subj := triples[tctr][0];\n"
-"pred := triples[tctr][1];\n"
-"obj := triples[tctr][2];\n"
-"\n"
-"\n"
-"\n"
-"http (\'\\n<rdf:Description\', ses);\n"
-"if (not isiri_id (subj))\n"
-"{\n"
-"if (isstring (subj) and (1 = __box_flags (subj)))\n"
-"{\n"
-"if (subj like \'nodeID://%\')\n"
-"{\n"
-"http (\' rdf:nodeID=\"b\', ses); http_value (subseq (subj, 9), 0, ses); http (\'\">\', ses);\n"
-"}\n"
-"else\n"
-"{\n"
-"http (\' rdf:about=\"\', ses); http_value (subj, 0, ses); http (\'\">\', ses);\n"
-"}\n"
-"}\n"
-"else if (subj is null)\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): subject is NULL\');\n"
-"else\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): subject is literal\');\n"
-"}\n"
-"else if (subj >= min_bnode_iri_id ())\n"
-"http (sprintf (\' rdf:nodeID=\"b%d\">\', iri_id_num (subj)), ses);\n"
-"else\n"
-"{\n"
-"res := id_to_iri (subj);\n"
-"\n"
-"http (\' rdf:about=\"\', ses); http_value (res, 0, ses); http (\'\">\', ses);\n"
+"http_rdfxml_p_ns (env, triples[tctr][1], ses);\n"
 "}\n"
-"if (not isiri_id (pred))\n"
-"{\n"
-"if (isstring (pred) and (1 = __box_flags (pred)))\n"
-"{\n"
-"if (pred like \'nodeID://%\')\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): blank node as predicate\');\n"
-"res := pred;\n"
-"goto res_for_pred;\n"
-"}\n"
-"else if (pred is null)\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): predicate is NULL\');\n"
-"else\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): predicate is literal\');\n"
-"}\n"
-"if (pred >= min_bnode_iri_id ())\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): blank node as predicate\');\n"
-"res := id_to_iri (pred);\n"
-"res_for_pred:\n"
-"declare delim, delim1, delim2, delim3 integer;\n"
-"delim1 := coalesce (strrchr (res, \'/\'), -1);\n"
-"delim2 := coalesce (strrchr (res, \'#\'), -1);\n"
-"delim3 := coalesce (strrchr (res, \':\'), -1);\n"
-"delim := __max (delim1, delim2, delim3);\n"
-"if (delim < 0)\n"
-"delim := null;\n"
-"if (delim is null)\n"
-"{\n"
-"pred_tagname := res;\n"
-"http (\'<\', ses); http (pred_tagname, ses);\n"
+"http (\' >\', ses);\n"
 "}\n"
-"else\n"
-"{\n"
-"declare p_ns_uri, p_ns_pref varchar;\n"
-"p_ns_uri := subseq (res, 0, delim+1);\n"
-"if (p_ns_uri = \'http://www.w3.org/1999/02/22-rdf-syntax-ns#\')\n"
-"{\n"
-"pred_tagname := \'rdf:\' || subseq (res, delim+1);\n"
-"http (\'<\', ses); http (pred_tagname, ses);\n"
+"{ whenever sqlstate \'*\' goto end_subj_sort;\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"end_subj_sort: ;\n"
 "}\n"
-"else if (p_ns_uri = \'http://www.w3.org/2000/01/rdf-schema#\')\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
-"pred_tagname := \'rdfs:\' || subseq (res, delim+1);\n"
-"http (\'<\', ses); http (pred_tagname, ses);\n"
+"http_rdfxml_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses);\n"
 "}\n"
-"else\n"
+"if (isstring (env[2]))\n"
+"http (\'\\n  </rdf:Description>\', ses);\n"
+"if (print_top_level)\n"
 "{\n"
-"p_ns_pref := coalesce (__xml_get_ns_prefix (p_ns_uri, 3), \'n0pred\');\n"
-"pred_tagname := p_ns_pref || \':\' || subseq (res, delim+1);\n"
-"http (\'<\', ses); http (pred_tagname, ses);\n"
-"http (\' xmlns:\' || p_ns_pref || \'=\"\', ses); http_value (p_ns_uri, 0, ses); http (\'\"\', ses);\n"
+"http (\'\\n</rdf:RDF>\', ses);\n"
 "}\n"
 "}\n"
-"if (obj is null)\n"
-"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_RDF_XML_TEXT(): object is NULL\');\n"
-"if (isiri_id (obj))\n"
-"{\n"
-"if (obj >= min_bnode_iri_id ())\n"
-"http (sprintf (\' rdf:nodeID=\"b%d\"/>\', iri_id_num (obj)), ses);\n"
-"else\n"
+"--src sparql.sql:3861\n";
+
+static const char *proc145 = 
+"#line 3916 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (inout triples any, inout ses any)\n"
 "{\n"
-"res := coalesce (id_to_iri(obj), sprintf (\'_:bad_iid_%d\', iri_id_num (obj)));\n"
+"declare env any;\n"
+"declare tcount, tctr, status integer;\n"
+"tcount := length (triples);\n"
 "\n"
-"http (\' rdf:resource=\"\', ses); http_value (res, 0, ses); http (\'\"/>\', ses);\n"
-"}\n"
-"}\n"
-"else if (__tag of rdf_box = __tag (obj))\n"
-"{\n"
-"declare dat any;\n"
-"if (257 <> rdf_box_type (obj))\n"
-"{\n"
-"res := coalesce ((select RDT_QNAME from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));\n"
-"http (\' rdf:datatype=\"\', ses); http_value (res, 0, ses); http (\'\"\', ses);\n"
-"}\n"
-"else if (257 <> rdf_box_lang (obj))\n"
-"{\n"
-"res := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));\n"
-"http (\' xml:lang=\"\', ses); http_value (res, 0, ses); http (\'\"\', ses);\n"
-"}\n"
-"dat := __rdf_sqlval_of_obj (obj, 1);\n"
-"if (__tag of XML = __tag (dat))\n"
-"{\n"
-"http (\' rdf:parseType=\"Literal\">\', ses);\n"
-"http_value (dat, 0, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"else if (__tag of datetime = rdf_box_data_tag (obj))\n"
-"{\n"
-"if (257 = rdf_box_type (obj))\n"
-"{\n"
-"http (\' rdf:datatype=\"\', ses);\n"
-"http_escape (cast (__xsd_type (dat) as varchar), 12, ses, 1, 1);\n"
-"http (\'\">\', ses);\n"
-"}\n"
-"else\n"
-"http (\'>\', ses);\n"
-"__rdf_long_to_ttl (dat, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"else\n"
-"{\n"
-"declare tmp any;\n"
-"http (\'>\', ses);\n"
-"tmp := __rdf_strsqlval (obj);\n"
-"if (__tag of varchar = __tag (tmp))\n"
-"tmp := charset_recode (tmp, \'UTF-8\', \'_WIDE_\');\n"
-"http_value (tmp, 0, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"}\n"
-"else if (__tag of varchar = __tag (obj))\n"
-"{\n"
-"if (1 = __box_flags (obj))\n"
-"{\n"
-"if (obj like \'nodeID://%\')\n"
-"{\n"
-"http (\' rdf:nodeID=\"b\', ses); http_value (subseq (obj, 9), 0, ses); http (\'\"/>\', ses);\n"
-"}\n"
-"else\n"
-"{\n"
-"http (\' rdf:resource=\"\', ses); http_value (obj, 0, ses); http (\'\"/>\', ses);\n"
-"}\n"
-"}\n"
-"else\n"
-"{\n"
-"http (\'>\', ses);\n"
-"obj := charset_recode (obj, \'UTF-8\', \'_WIDE_\');\n"
-"http_value (obj, 0, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"}\n"
-"else if (__tag of varbinary = __tag (obj))\n"
-"{\n"
-"http (\'>\', ses);\n"
-"http_value (obj, 0, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"else if (__tag of XML = __tag (obj))\n"
-"{\n"
-"http (\' rdf:parseType=\"Literal\">\', ses);\n"
-"http_value (obj, 0, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"else if (__tag of datetime = rdf_box_data_tag (obj))\n"
-"{\n"
-"http (\' rdf:datatype=\"\', ses);\n"
-"http_escape (cast (__xsd_type (obj) as varchar), 12, ses, 1, 1);\n"
-"http (\'\">\', ses);\n"
-"__rdf_long_to_ttl (obj, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"else\n"
+"if (0 = tcount)\n"
 "{\n"
-"http (\' rdf:datatype=\"\', ses);\n"
-"http_value (__xsd_type (obj), 0, ses);\n"
-"http (\'\">\', ses);\n"
-"http_value (__rdf_strsqlval (obj), 0, ses);\n"
-"http (\'</\', ses); http (pred_tagname, ses); http (\'>\', ses);\n"
-"}\n"
-"http (\'</rdf:Description>\', ses);\n"
+"http (\'{ }\\n\', ses);\n"
+"return;\n"
 "}\n"
-"if (print_top_level)\n"
+"env := vector (0, 0, 0, null);\n"
+"\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"http (\'{\\n  \', ses);\n"
+"status := 0;\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
-"http (\'\\n</rdf:RDF>\', ses);\n"
+"if (http_talis_json_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses))\n"
+"status := 1;\n"
 "}\n"
+"if (status)\n"
+"http (\' ] }\\n\', ses);\n"
+"http (\'}\\n\', ses);\n"
 "}\n"
-"--src sparql.sql:3393\n";
+"--src sparql.sql:3914\n";
 
-static const char *proc130 = 
-"#line 3622 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (inout triples any, inout ses any)\n"
+static const char *proc146 = 
+"#line 3945 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_JSON_LD (inout triples any, inout ses any)\n"
 "{\n"
 "declare env any;\n"
 "declare tcount, tctr, status integer;\n"
@@ -3746,21 +4063,22 @@ static const char *proc130 =
 "\n"
 "rowvector_subj_sort (triples, 1, 1);\n"
 "rowvector_subj_sort (triples, 0, 1);\n"
-"http (\'{\\n  \', ses);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"http (\'{ \"@id\": [\\n    \', ses);\n"
 "status := 0;\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
-"if (http_talis_json_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses))\n"
+"if (http_ld_json_triple (env, triples[tctr][0], triples[tctr][1], triples[tctr][2], ses))\n"
 "status := 1;\n"
 "}\n"
 "if (status)\n"
 "http (\' ] }\\n\', ses);\n"
-"http (\'}\\n\', ses);\n"
+"http (\'] }\\n\', ses);\n"
 "}\n"
-"--src sparql.sql:3620\n";
+"--src sparql.sql:3943\n";
 
-static const char *proc131 = 
-"#line 3650 \"[executable]/sparql.sql\"\n"
+static const char *proc147 = 
+"#line 3974 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_JSON (inout triples any, inout ses any)\n"
 "{\n"
 "declare tcount, tctr, env integer;\n"
@@ -3768,6 +4086,7 @@ static const char *proc131 =
 "http (\'\\n{ \"head\": { \"link\": [], \"vars\": [ \"s\", \"p\", \"o\" ] },\\n  \"results\": { \"distinct\": false, \"ordered\": true, \"bindings\": [\', ses);\n"
 "tcount := length (triples);\n"
 "env := vector (0, 0, vector (\'s\', \'p\', \'o\'), null);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
 "declare triple any;\n"
@@ -3779,10 +4098,10 @@ static const char *proc131 =
 "}\n"
 "http (\' ] } }\', ses);\n"
 "}\n"
-"--src sparql.sql:3648\n";
+"--src sparql.sql:3972\n";
 
-static const char *proc132 = 
-"#line 3670 \"[executable]/sparql.sql\"\n"
+static const char *proc148 = 
+"#line 3995 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_CSV (inout triples any, inout ses any)\n"
 "{\n"
 "declare env any;\n"
@@ -3792,6 +4111,7 @@ static const char *proc132 =
 "\n"
 "{ whenever sqlstate \'*\' goto p_done; rowvector_subj_sort (triples, 1, 1); p_done: ; }\n"
 "{ whenever sqlstate \'*\' goto s_done; rowvector_subj_sort (triples, 0, 1); s_done: ; }\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
 "DB.DBA.SPARQL_RESULTS_CSV_WRITE_VALUE (ses, triples[tctr][0]);\n"
@@ -3802,10 +4122,10 @@ static const char *proc132 =
 "http (\'\\n\', ses);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:3668\n";
+"--src sparql.sql:3993\n";
 
-static const char *proc133 = 
-"#line 3691 \"[executable]/sparql.sql\"\n"
+static const char *proc149 = 
+"#line 4017 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML (inout triples any, inout ses any)\n"
 "{\n"
 "declare env, prev_subj, nsdict, nslist any;\n"
@@ -3825,6 +4145,7 @@ static const char *proc133 =
 "nsdict := dict_new (10 + cast (sqrt(tcount) as integer));\n"
 "dict_put (nsdict, \'http://www.w3.org/1999/02/22-rdf-syntax-ns#\', \'rdf\');\n"
 "dict_put (nsdict, \'http://www.w3.org/2001/XMLSchema#\', \'xsdh\');\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "for (tctr := 0; (tctr < tcount) and (1000 > dict_size (nsdict)); tctr := tctr + 1)\n"
 "{\n"
 "sparql_iri_split_rdfa_qname (triples[tctr][0], nsdict, 1);\n"
@@ -3845,7 +4166,7 @@ static const char *proc133 =
 "tcount), ses);\n"
 "http (\'<p>A generic web browser may not display them but the document can be saved on disk and used by some appropriate program or sent to a third party.\n"
 "Use \"Save As\" or \"Send To\" menu item of the browser; choose \"HTML\" file type, not \"text file\" or \"web archive\".\n"
-"</p><p>The rest of the document may look like garbage for humans or not displayed by the browser.</p>\', ses);\n"
+"</p><p>The rest of the document may look like garbage for humans or not displayed by the browser.</p>\\n<ul>\', ses);\n"
 "env := vector (0, 0, 0, null);\n"
 "rowvector_subj_sort (triples, 0, 1);\n"
 "prev_subj := null;\n"
@@ -3863,31 +4184,31 @@ static const char *proc133 =
 "if (prev_subj is null or (subj <> prev_subj))\n"
 "{\n"
 "if (prev_subj is not null)\n"
-"http (\'\\n</div>\', ses);\n"
-"http (\'\\n<div about=\"[\', ses);\n"
+"http (\'\\n</ul></li>\', ses);\n"
+"http (\'\\n<li about=\"[\', ses);\n"
 "split := sparql_iri_split_rdfa_qname (subj, nsdict, 2);\n"
 "\n"
 "if (\'\' = split[1])\n"
 "{\n"
 "http_escape (split[2], 3, ses, 1, 1);\n"
-"http (\']\">\', ses);\n"
+"http (\']\">\\n<ul>\', ses);\n"
 "}\n"
 "else if (isstring (split[0]))\n"
 "{\n"
 "http_escape (concat (split[0], \':\', split[2]), 3, ses, 1, 1);\n"
-"http (\']\">\', ses);\n"
+"http (\']\">\\n<ul>\', ses);\n"
 "}\n"
 "else\n"
 "{\n"
 "http_escape (concat (\'s:\', split[2]), 3, ses, 1, 1);\n"
 "http (\']\" xmlns:s=\"\', ses);\n"
 "http_escape (split[1], 3, ses, 1, 1);\n"
-"http (\'\">\', ses);\n"
+"http (\'\">\\n<ul>\', ses);\n"
 "}\n"
 "prev_subj := subj;\n"
 "}\n"
 "obj_iri_split := sparql_iri_split_rdfa_qname (obj, nsdict, 2);\n"
-"http (case (isvector (obj_iri_split)) when 0 then \'\\n<div property=\"\' else \'\\n<div rel=\"\' end, ses);\n"
+"http (case (isvector (obj_iri_split)) when 0 then \'\\n<li property=\"\' else \'\\n<li rel=\"\' end, ses);\n"
 "split := sparql_iri_split_rdfa_qname (pred, nsdict, 2);\n"
 "if (\'\' = split[1])\n"
 "{\n"
@@ -3990,63 +4311,747 @@ static const char *proc133 =
 "sqlval := charset_recode (sqlval, \'UTF-8\', \'_WIDE_\');\n"
 "http_value (sqlval, 0, ses);\n"
 "}\n"
-"http (\'</div>\', ses);\n"
+"http (\'</li>\', ses);\n"
 "}\n"
 "}\n"
 "if (prev_subj is not null)\n"
-"http (\'\\n</div>\', ses);\n"
+"http (\'\\n</ul></li></ul>\', ses);\n"
 "http (\'\\n</body></html>\\n\', ses);\n"
 "}\n"
-"--src sparql.sql:3689\n";
+"--src sparql.sql:4015\n";
 
-static const char *proc134 = 
-"#line 3885 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ATOM_XML (inout triples_dict any) returns long varchar\n"
-"{\n"
-"declare triples, ses any;\n"
-"ses := string_output ();\n"
-"if (214 <> __tag (triples_dict))\n"
+static const char *proc150 = 
+"#line 4211 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT (in ul_or_tr varchar)\n"
 "{\n"
-"triples := vector ();\n"
-"}\n"
+"declare lpath varchar;\n"
+"lpath := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
+"if (lpath is null)\n"
+"lpath := \'/sparql\';\n"
 "else\n"
-"triples := dict_list_keys (triples_dict, 1);\n"
-"DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (triples, 1, ses);\n"
-"return ses;\n"
+"lpath := \'http://\' || lpath || \'/sparql\';\n"
+"whenever sqlstate \'HT013\' goto no_http_context;\n"
+"lpath := http_path ();\n"
+"no_http_context:\n"
+"return \' <a href=\" \' || lpath || \'?query=describe+%%3C%U%%3E&format=text%%2Fx-html%%2B\' || ul_or_tr || \'\">describe</a> \';\n"
 "}\n"
-"--src sparql.sql:3883\n";
+"--src sparql.sql:4209\n";
 
-static const char *proc135 = 
-"#line 3900 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.ODATA_EDM_TYPE (in obj any)\n"
+static const char *proc151 = 
+"#line 4226 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_PIVOT_DESCRIBE_LINK (in iri varchar)\n"
 "{\n"
-"if (__tag of int = __tag (obj))\n"
-"return \'Int32\';\n"
-"else if (__tag of smallint  = __tag (obj))\n"
-"return \'Int16\';\n"
-"else if (__tag of bigint = __tag (obj))\n"
-"return \'Int64\';\n"
-"else if (__tag of numeric = __tag (obj))\n"
-"return \'Decimal\';\n"
-"else if (__tag of double precision = __tag (obj))\n"
-"return \'Double\';\n"
-"else if (__tag of real = __tag (obj))\n"
-"return \'Double\';\n"
-"else if (__tag of datetime = __tag (obj))\n"
-"return \'DateTime\';\n"
-"else if (__tag of date = __tag (obj))\n"
-"return \'Date\';\n"
-"else if (__tag of time = __tag (obj))\n"
-"return \'Time\';\n"
-"else if (__tag of varbinary = __tag (obj))\n"
-"return \'Binary\';\n"
-"return null;\n"
+"return sprintf (\'; <a href=\"/describe/?url=%U&sid=1&urilookup=1\">facets</a> \', iri);\n"
 "}\n"
-"--src sparql.sql:3898\n";
+"--src sparql.sql:4224\n";
 
-static const char *proc136 = 
-"#line 3926 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ODATA_JSON (inout triples_dict any) returns long varchar\n"
+static const char *proc152 = 
+"#line 4232 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_HTML_UL (inout triples any, inout ses any)\n"
+"{\n"
+"declare env, prev_subj, prev_pred any;\n"
+"declare can_pivot, ctr, len, tcount, tctr, status, obj_needs_br integer;\n"
+"declare endpoint_fmt, subj_iri, pred_iri varchar;\n"
+"tcount := length (triples);\n"
+"\n"
+"http (\'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML+RDFa 1.0//EN\" \"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd\">\\n\', ses);\n"
+"if (0 = tcount)\n"
+"{\n"
+"http (\'<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
+"<head><title>Empty HTML RDFa and Microdata document</title>\n"
+"<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n"
+"</head><body>\n"
+"<p>This document is empty and basically useless. It is generated by a web service that can make some statements in HTML Microdata format.\n"
+"This time the service made zero such statements, sorry.</p></body></html>\', ses);\n"
+"return;\n"
+"}\n"
+"endpoint_fmt := DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT (\'ul\');\n"
+"can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION (\'PivotViewer\'))) when 0 then 1 else 0 end;\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"http (\'<html xmlns=\"http://www.w3.org/1999/xhtml\"\', ses);\n"
+"http (\'>\\n<head><title>HTML RDFa and Microdata document</title>\n"
+"<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n"
+"</head>\\n<body>\\n<ul>\\n\', ses);\n"
+"env := vector (0, 0, 0, null);\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"prev_subj := prev_pred := null;\n"
+"obj_needs_br := 0;\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"declare subj, pred, obj, split, obj_iri_split any;\n"
+"declare pred_tagname varchar;\n"
+"declare res varchar;\n"
+"subj := triples[tctr][0];\n"
+"pred := triples[tctr][1];\n"
+"obj := triples[tctr][2];\n"
+"\n"
+"\n"
+"\n"
+"if (prev_subj is null or (subj <> prev_subj))\n"
+"{\n"
+"if (prev_subj is not null)\n"
+"http (\'\\n          </ul></li>\\n      </ul></li>\', ses);\n"
+"subj_iri := id_to_iri (subj);\n"
+"http (\'\\n  <li about=\"\', ses);\n"
+"http_escape (subj_iri, 3, ses, 1, 1);\n"
+"http (\'\" itemscope=\"\" itemid=\"\', ses);\n"
+"http_escape (subj_iri, 3, ses, 1, 1);\n"
+"http (\'\"><a href=\"\', ses);\n"
+"http_escape (subj_iri, 3, ses, 1, 1);\n"
+"http (\'\">\', ses);\n"
+"http_escape (subj_iri, 1, ses, 1, 1);\n"
+"http (\'</a> (\', ses);\n"
+"http (sprintf (endpoint_fmt, subj_iri), ses);\n"
+"if (can_pivot)\n"
+"http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (subj_iri), ses);\n"
+"http (\')\\n    <ul>\', ses);\n"
+"prev_subj := subj;\n"
+"prev_pred := null;\n"
+"}\n"
+"if (prev_pred is null or (pred <> prev_pred))\n"
+"{\n"
+"if (prev_pred is not null)\n"
+"http (\'\\n        </ul></li>\', ses);\n"
+"pred_iri := id_to_iri (pred);\n"
+"http (\'\\n      <li><a href=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\">\', ses);\n"
+"http_escape (pred_iri, 1, ses, 1, 1);\n"
+"http (\'</a> (\', ses);\n"
+"http (sprintf (endpoint_fmt, pred_iri), ses);\n"
+"if (can_pivot)\n"
+"http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (pred_iri), ses);\n"
+"http (\')\\n        <ul>\', ses);\n"
+"prev_pred := pred;\n"
+"obj_needs_br := 0;\n"
+"}\n"
+"if (obj is null)\n"
+"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_HTML_UL: object is NULL\');\n"
+"if (obj_needs_br)\n"
+"http (\'\\n\', ses);\n"
+"else\n"
+"obj_needs_br := 1;\n"
+"if (isiri_id (obj))\n"
+"{\n"
+"declare obj_iri varchar;\n"
+"obj_iri := id_to_iri (obj);\n"
+"http (\'\\n          <li><a rel=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\" resource=\"\', ses);\n"
+"http_escape (obj_iri, 3, ses, 1, 1);\n"
+"http (\'\" itemprop=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\" href=\"\', ses);\n"
+"http_escape (obj_iri, 3, ses, 1, 1);\n"
+"http (\'\">\', ses);\n"
+"http_escape (obj_iri, 1, ses, 1, 1);\n"
+"http (\'</a> (\', ses);\n"
+"http (sprintf (endpoint_fmt, obj_iri), ses);\n"
+"if (can_pivot)\n"
+"http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (obj_iri), ses);\n"
+"http (\')</li>\', ses);\n"
+"}\n"
+"else\n"
+"{\n"
+"declare sqlval any;\n"
+"declare dt, lang, strval any;\n"
+"http (\'\\n          <li property=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\" itemprop=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"dt := 0; lang := 0;\n"
+"if (__tag of rdf_box = __tag (obj))\n"
+"{\n"
+"if (257 <> rdf_box_lang (obj))\n"
+"lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));\n"
+"else if (257 <> rdf_box_type (obj))\n"
+"dt := coalesce ((select __bft (RDT_QNAME, 1) from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));\n"
+"sqlval := __rdf_sqlval_of_obj (obj, 1);\n"
+"if (__tag of datetime = __tag (sqlval))\n"
+"{\n"
+"if (257 = rdf_box_type (obj))\n"
+"dt := __xsd_type (sqlval);\n"
+"}\n"
+"}\n"
+"else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))\n"
+"{\n"
+"sqlval := obj;\n"
+"dt := __xsd_type (sqlval);\n"
+"}\n"
+"else\n"
+"sqlval := obj;\n"
+"if (not (isinteger (dt)))\n"
+"{\n"
+"http (\'\" datatype=\"\', ses);\n"
+"http_escape (dt, 3, ses, 1, 1);\n"
+"}\n"
+"if (isstring (lang))\n"
+"{\n"
+"http (\'\" xml:lang=\"\', ses);\n"
+"http_escape (lang, 3, ses, 1, 1);\n"
+"}\n"
+"http (\'\">\', ses);\n"
+"if (__tag of datetime = __tag(sqlval))\n"
+"__rdf_long_to_ttl (sqlval, ses);\n"
+"else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))\n"
+"http_value (sqlval, 0, ses);\n"
+"else if (__tag of varchar = __tag (sqlval))\n"
+"http_value (charset_recode (sqlval, \'UTF-8\', \'_WIDE_\'), 0, ses);\n"
+"else\n"
+"{\n"
+"sqlval := __rdf_strsqlval (obj);\n"
+"if (__tag of varchar = __tag (sqlval))\n"
+"sqlval := charset_recode (sqlval, \'UTF-8\', \'_WIDE_\');\n"
+"http_value (sqlval, 0, ses);\n"
+"}\n"
+"http (\'</li>\', ses);\n"
+"}\n"
+"}\n"
+"if (prev_subj is not null)\n"
+"http (\'\\n        </ul></li></ul></li></ul>\', ses);\n"
+"http (\'\\n</body></html>\\n\', ses);\n"
+"}\n"
+"--src sparql.sql:4230\n";
+
+static const char *proc153 = 
+"#line 4400 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_HTML_TR (inout triples any, inout ses any)\n"
+"{\n"
+"declare env, prev_subj, prev_pred any;\n"
+"declare can_pivot, ctr, len, tcount, tctr, status integer;\n"
+"declare endpoint_fmt, subj_iri, pred_iri, subj_recod, pred_recod, subj_trtd, pred_tdtd varchar;\n"
+"tcount := length (triples);\n"
+"\n"
+"\n"
+"if (0 = tcount)\n"
+"{\n"
+"http (\'<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
+"<head><title>Empty HTML RDFa and Microdata document</title></head><body>\n"
+"<p>This document is empty and basically useless. It is generated by a web service that can make some statements in HTML Microdata format.\n"
+"This time the service made zero such statements, sorry.</p></body></html>\', ses);\n"
+"return;\n"
+"}\n"
+"endpoint_fmt := DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT (\'tr\');\n"
+"can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION (\'PivotViewer\'))) when 0 then 1 else 0 end;\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"http (\'<html xmlns=\"http://www.w3.org/1999/xhtml\"\', ses);\n"
+"http (\'>\\n<head><title>HTML RDFa and Microdata document</title>\n"
+"<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n"
+"</head>\\n<body>\\n<table>\\n\', ses);\n"
+"env := vector (0, 0, 0, null);\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"prev_subj := prev_pred := null;\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"declare subj, pred, obj, split, obj_iri_split any;\n"
+"declare pred_tagname varchar;\n"
+"declare res varchar;\n"
+"subj := triples[tctr][0];\n"
+"pred := triples[tctr][1];\n"
+"obj := triples[tctr][2];\n"
+"\n"
+"\n"
+"\n"
+"if (prev_subj is null or (subj <> prev_subj))\n"
+"{\n"
+"declare trtd_ses any;\n"
+"subj_iri := id_to_iri (subj);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"trtd_ses := string_output ();\n"
+"http (\'\\n<tr itemscope=\"itemscope\" about=\"\', trtd_ses);\n"
+"http_escape (subj_iri, 3, trtd_ses, 1, 1);\n"
+"http (\'\" itemid=\"\', trtd_ses);\n"
+"http_escape (subj_iri, 3, trtd_ses, 1, 1);\n"
+"http (\'\">\\n  <td><a href=\"\', trtd_ses);\n"
+"http_escape (subj_iri, 3, trtd_ses, 1, 1);\n"
+"http (sprintf (\'\">%V</a> (\' || endpoint_fmt || \'%s)</td>\', subj_iri, subj_iri,\n"
+"case when (can_pivot) then DB.DBA.RDF_PIVOT_DESCRIBE_LINK (id_to_iri (subj)) else \'\' end ),\n"
+"trtd_ses );\n"
+"subj_trtd := string_output_string (trtd_ses);\n"
+"prev_subj := subj;\n"
+"}\n"
+"if (prev_pred is null or (pred <> prev_pred))\n"
+"{\n"
+"declare tdtd_ses any;\n"
+"pred_iri := id_to_iri (pred);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"tdtd_ses := string_output ();\n"
+"http (\'\\n  <td><a href=\"\', tdtd_ses);\n"
+"http_escape (pred_iri, 3, tdtd_ses, 1, 1);\n"
+"http (\'\">\', tdtd_ses);\n"
+"http_escape (pred_iri, 1, tdtd_ses, 1, 1);\n"
+"http (sprintf (\'</a> (\' || endpoint_fmt || \'%s)\\n  </td><td\', pred_iri,\n"
+"case when (can_pivot) then DB.DBA.RDF_PIVOT_DESCRIBE_LINK (id_to_iri (pred)) else \'\' end ),\n"
+"tdtd_ses );\n"
+"pred_tdtd := string_output_string (tdtd_ses);\n"
+"prev_pred := pred;\n"
+"}\n"
+"if (obj is null)\n"
+"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_HTML_TR: object is NULL\');\n"
+"http (subj_trtd, ses);\n"
+"http (pred_tdtd, ses);\n"
+"if (isiri_id (obj))\n"
+"{\n"
+"declare obj_iri varchar;\n"
+"obj_iri := id_to_iri (obj);\n"
+"http (\'><a rel=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\" resource=\"\', ses);\n"
+"http_escape (obj_iri, 3, ses, 1, 1);\n"
+"http (\'\" itemprop=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\" href=\"\', ses);\n"
+"http_escape (obj_iri, 3, ses, 1, 1);\n"
+"http (sprintf (\'\">%V</a> (\' || endpoint_fmt, obj_iri, obj_iri), ses);\n"
+"if (can_pivot)\n"
+"http (DB.DBA.RDF_PIVOT_DESCRIBE_LINK (obj_iri), ses);\n"
+"http (\')</td></tr>\', ses);\n"
+"}\n"
+"else\n"
+"{\n"
+"declare sqlval any;\n"
+"declare dt, lang, strval any;\n"
+"http (\' property=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"http (\'\" itemprop=\"\', ses);\n"
+"http_escape (pred_iri, 3, ses, 1, 1);\n"
+"dt := 0; lang := 0;\n"
+"if (__tag of rdf_box = __tag (obj))\n"
+"{\n"
+"if (257 <> rdf_box_lang (obj))\n"
+"lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));\n"
+"else if (257 <> rdf_box_type (obj))\n"
+"dt := coalesce ((select __bft (RDT_QNAME, 1) from DB.DBA.RDF_DATATYPE where RDT_TWOBYTE = rdf_box_type (obj)));\n"
+"sqlval := __rdf_sqlval_of_obj (obj, 1);\n"
+"if (__tag of datetime = __tag (sqlval))\n"
+"{\n"
+"if (257 = rdf_box_type (obj))\n"
+"dt := __xsd_type (sqlval);\n"
+"}\n"
+"}\n"
+"else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))\n"
+"{\n"
+"sqlval := obj;\n"
+"dt := __xsd_type (sqlval);\n"
+"}\n"
+"else\n"
+"sqlval := obj;\n"
+"if (not (isinteger (dt)))\n"
+"{\n"
+"http (\'\" datatype=\"\', ses);\n"
+"http_escape (dt, 3, ses, 1, 1);\n"
+"}\n"
+"if (isstring (lang))\n"
+"{\n"
+"http (\'\" xml:lang=\"\', ses);\n"
+"http_escape (lang, 3, ses, 1, 1);\n"
+"}\n"
+"http (\'\">\', ses);\n"
+"if (__tag of datetime = __tag(sqlval))\n"
+"__rdf_long_to_ttl (sqlval, ses);\n"
+"else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))\n"
+"http_value (sqlval, 0, ses);\n"
+"else if (__tag of varchar = __tag (sqlval))\n"
+"http_value (charset_recode (sqlval, \'UTF-8\', \'_WIDE_\'), 0, ses);\n"
+"else\n"
+"{\n"
+"sqlval := __rdf_strsqlval (obj);\n"
+"if (__tag of varchar = __tag (sqlval))\n"
+"sqlval := charset_recode (sqlval, \'UTF-8\', \'_WIDE_\');\n"
+"http_value (sqlval, 0, ses);\n"
+"}\n"
+"http (\'</td></tr>\', ses);\n"
+"}\n"
+"}\n"
+"http (\'\\n</table></body></html>\\n\', ses);\n"
+"}\n"
+"--src sparql.sql:4398\n";
+
+static const char *proc154 = 
+"#line 4560 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (inout triples any, inout ses any)\n"
+"{\n"
+"declare env, prev_subj, prev_pred, nsdict, nslist any;\n"
+"declare ctr, len, tcount, tctr, status, obj_needs_br integer;\n"
+"tcount := length (triples);\n"
+"\n"
+"\n"
+"if (0 = tcount)\n"
+"{\n"
+"http (\'<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
+"<head><title>Empty HTML Microdata document</title></head><body>\n"
+"<p>This document is empty and basically useless. It is generated by a web service that can make some statements in HTML Microdata format.\n"
+"This time the service made zero such statements, sorry.</p></body></html>\', ses);\n"
+"return;\n"
+"}\n"
+"nsdict := dict_new (10 + cast (sqrt(tcount) as integer));\n"
+"dict_put (nsdict, \'http://www.w3.org/1999/02/22-rdf-syntax-ns#\', \'rdf\');\n"
+"dict_put (nsdict, \'http://www.w3.org/2001/XMLSchema#\', \'xsdh\');\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"for (tctr := 0; (tctr < tcount) and (1000 > dict_size (nsdict)); tctr := tctr + 1)\n"
+"{\n"
+"sparql_iri_split_rdfa_qname (triples[tctr][0], nsdict, 1);\n"
+"sparql_iri_split_rdfa_qname (triples[tctr][1], nsdict, 1);\n"
+"sparql_iri_split_rdfa_qname (triples[tctr][2], nsdict, 1);\n"
+"}\n"
+"http (\'<html xmlns=\"http://www.w3.org/1999/xhtml\"\', ses);\n"
+"http (\'>\\n<head><title>HTML Microdata document</title></head><body>\\n\', ses);\n"
+"http (sprintf (\'<p>This document contains %d facts in HTML Microdata format.</p>\',\n"
+"tcount), ses);\n"
+"http (\'<p>A generic web browser may not display them properly but the document can be saved on disk and used by some appropriate program or sent to a third party.\n"
+"Use \"Save As\" or \"Send To\" menu item of the browser; choose \"HTML\" file type, not \"text file\" or \"web archive\".\n"
+"</p><p>The rest of the document may look like garbage for humans or not displayed by the browser.</p>\', ses);\n"
+"http (\'\\n<table><tr><th>Prefix</th><th>Namespace IRI</th></tr>\', ses);\n"
+"nslist := dict_to_vector (nsdict, 0);\n"
+"len := length (nslist);\n"
+"for (ctr := len - 2; ctr >= 0; ctr := ctr-2)\n"
+"{\n"
+"http (sprintf (\'\\n<tr><td>%V</td><td>%V</td></tr>\', nslist[ctr+1], nslist[ctr]), ses);\n"
+"}\n"
+"http (\'</table>\', ses);\n"
+"env := vector (0, 0, 0, null);\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"prev_subj := prev_pred := null;\n"
+"obj_needs_br := 0;\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"declare subj, pred, obj, split, obj_iri_split any;\n"
+"declare pred_tagname varchar;\n"
+"declare res varchar;\n"
+"subj := triples[tctr][0];\n"
+"pred := triples[tctr][1];\n"
+"obj := triples[tctr][2];\n"
+"if (isstring (subj))\n"
+"subj := iri_to_id (subj);\n"
+"if (isstring (pred))\n"
+"pred := iri_to_id (pred);\n"
+"if (isstring (obj) and __box_flags (obj) = 1)\n"
+"obj := iri_to_id (obj);\n"
+"\n"
+"\n"
+"\n"
+"if (prev_subj is null or (subj <> prev_subj))\n"
+"{\n"
+"if (prev_subj is not null)\n"
+"http (\'\\n</dd></dl>\', ses);\n"
+"http (sprintf (\'\\n<dl itemscope itemid=\"%s\">\', replace (id_to_iri (subj), \'\"\', \'%22\')), ses);\n"
+"split := sparql_iri_split_rdfa_qname (subj, nsdict, 2);\n"
+"\n"
+"if (\'\' = split[1])\n"
+"http (sprintf (\'\\n<dt>Subject Item</dt><dd>%V</dd>\', split[2]), ses);\n"
+"else if (isstring (split[0]))\n"
+"http (sprintf (\'\\n<dt>Subject Item</dt><dd>%V:%V</dd>\', split[0], split[2]), ses);\n"
+"else\n"
+"http (sprintf (\'\\n<dt>Subject Item</dt><dd>%V%V</dd>\', split[1], split[2]), ses);\n"
+"prev_subj := subj;\n"
+"prev_pred := null;\n"
+"}\n"
+"if (prev_pred is null or (pred <> prev_pred))\n"
+"{\n"
+"if (prev_pred is not null)\n"
+"http (\'\\n</dd>\', ses);\n"
+"split := sparql_iri_split_rdfa_qname (pred, nsdict, 2);\n"
+"\n"
+"if (\'\' = split[1])\n"
+"http (sprintf (\'\\n<dt>%V</dt><dd>\', split[2]), ses);\n"
+"else if (isstring (split[0]))\n"
+"http (sprintf (\'\\n<dt>%V:%V</dt><dd>\', split[0], split[2]), ses);\n"
+"else\n"
+"http (sprintf (\'\\n<dt>%V%V</dt><dd>\', split[1], split[2]), ses);\n"
+"prev_pred := pred;\n"
+"obj_needs_br := 0;\n"
+"}\n"
+"if (obj is null)\n"
+"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_HTML_MICRODATA: object is NULL\');\n"
+"if (obj_needs_br)\n"
+"http (\'\\n\', ses);\n"
+"else\n"
+"obj_needs_br := 1;\n"
+"obj_iri_split := sparql_iri_split_rdfa_qname (obj, nsdict, 2);\n"
+"if (isvector (obj_iri_split))\n"
+"{\n"
+"http (sprintf (\'\\n<a itemprop=\"%s\" href=\"%s\">\', replace (id_to_iri (pred), \'\"\', \'%22\'), replace (id_to_iri (obj), \'\"\', \'%22\')), ses);\n"
+"if (\'\' = obj_iri_split[1])\n"
+"http (sprintf (\'%V</a>\', obj_iri_split[2]), ses);\n"
+"else if (isstring (obj_iri_split[0]))\n"
+"http (sprintf (\'%V:%V</a>\', obj_iri_split[0], obj_iri_split[2]), ses);\n"
+"else\n"
+"http (sprintf (\'%V%V</a>\', obj_iri_split[1], obj_iri_split[2]), ses);\n"
+"}\n"
+"else\n"
+"{\n"
+"declare sqlval any;\n"
+"declare dt, lang, strval any;\n"
+"http (sprintf (\'\\n<span itemprop=\"%s\"\', replace (id_to_iri (pred), \'\"\', \'%22\')), ses);\n"
+"dt := 0; lang := 0;\n"
+"if (__tag of rdf_box = __tag (obj))\n"
+"{\n"
+"if (257 <> rdf_box_lang (obj))\n"
+"lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));\n"
+"\n"
+"\n"
+"sqlval := __rdf_sqlval_of_obj (obj, 1);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"}\n"
+"else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))\n"
+"{\n"
+"sqlval := obj;\n"
+"\n"
+"}\n"
+"else\n"
+"sqlval := obj;\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"if (isstring (lang))\n"
+"{\n"
+"http (\' xml:lang=\"\', ses);\n"
+"http_escape (lang, 3, ses, 1, 1);\n"
+"http (\'\"\', ses);\n"
+"}\n"
+"http (\'>\', ses);\n"
+"if (__tag of datetime = __tag(sqlval))\n"
+"__rdf_long_to_ttl (sqlval, ses);\n"
+"else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))\n"
+"http_value (sqlval, 0, ses);\n"
+"else if (__tag of varchar = __tag (sqlval))\n"
+"http_value (charset_recode (sqlval, \'UTF-8\', \'_WIDE_\'), 0, ses);\n"
+"else\n"
+"{\n"
+"sqlval := __rdf_strsqlval (obj);\n"
+"if (__tag of varchar = __tag (sqlval))\n"
+"sqlval := charset_recode (sqlval, \'UTF-8\', \'_WIDE_\');\n"
+"http_value (sqlval, 0, ses);\n"
+"}\n"
+"http (\'</span>\', ses);\n"
+"}\n"
+"}\n"
+"if (prev_subj is not null)\n"
+"http (\'\\n</dd></dl>\', ses);\n"
+"http (\'\\n</body></html>\\n\', ses);\n"
+"}\n"
+"--src sparql.sql:4558\n";
+
+static const char *proc155 = 
+"#line 4747 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (inout triples any, inout ses any)\n"
+"{\n"
+"declare env, prev_subj, prev_pred any;\n"
+"declare ctr, len, tcount, tctr, status, obj_needs_comma integer;\n"
+"tcount := length (triples);\n"
+"\n"
+"http (\'{ \"items\" : [\', ses);\n"
+"env := vector (0, 0, 0, null);\n"
+"rowvector_subj_sort (triples, 1, 1);\n"
+"rowvector_subj_sort (triples, 0, 1);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
+"prev_subj := prev_pred := null;\n"
+"obj_needs_comma := 0;\n"
+"for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
+"{\n"
+"declare subj, pred, obj, split, obj_iri_split any;\n"
+"declare pred_tagname varchar;\n"
+"declare res varchar;\n"
+"subj := triples[tctr][0];\n"
+"pred := triples[tctr][1];\n"
+"obj := triples[tctr][2];\n"
+"\n"
+"\n"
+"\n"
+"if (prev_subj is null or (subj <> prev_subj))\n"
+"{\n"
+"declare subj_iri varchar;\n"
+"if (prev_subj is not null)\n"
+"http (\' ] } },\\n\', ses);\n"
+"subj_iri := id_to_iri (subj);\n"
+"if (starts_with (subj_iri, \'nodeID://\'))\n"
+"subj_iri := \'_:\' || subseq (subj_iri, 9);\n"
+"http (\'\\n    { \"id\" : \"\', ses); http_escape (subj_iri, 14, ses, 1, 1); http (\'\"\\n      \"properties\" : {\', ses);\n"
+"prev_subj := subj;\n"
+"prev_pred := null;\n"
+"}\n"
+"if (prev_pred is null or (pred <> prev_pred))\n"
+"{\n"
+"if (prev_pred is not null)\n"
+"http (\' ] ,\', ses);\n"
+"http (\'\\n        \"\', ses); http_escape (id_to_iri (pred), 14, ses, 1, 1); http (\'\" : [ \', ses);\n"
+"prev_pred := pred;\n"
+"obj_needs_comma := 0;\n"
+"}\n"
+"if (obj is null)\n"
+"signal (\'RDFXX\', \'DB.DBA.TRIPLES_TO_JSON_MICRODATA: object is NULL\');\n"
+"if (obj_needs_comma)\n"
+"http (\',\\n          \', ses);\n"
+"else\n"
+"obj_needs_comma := 1;\n"
+"if (isiri_id (obj))\n"
+"{\n"
+"declare obj_iri varchar;\n"
+"obj_iri := id_to_iri (obj);\n"
+"if (starts_with (obj_iri, \'nodeID://\'))\n"
+"obj_iri := \'_:\' || subseq (obj_iri, 9);\n"
+"http (\'{ \"id\" : \"\', ses); http_escape (obj_iri, 14, ses, 1, 1); http (\'\" }\', ses);\n"
+"}\n"
+"else\n"
+"{\n"
+"declare sqlval any;\n"
+"declare dt, lang, strval any;\n"
+"dt := 0; lang := 0;\n"
+"if (__tag of rdf_box = __tag (obj))\n"
+"{\n"
+"if (257 <> rdf_box_lang (obj))\n"
+"lang := coalesce ((select lower (RL_ID) from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = rdf_box_lang (obj)));\n"
+"\n"
+"\n"
+"sqlval := __rdf_sqlval_of_obj (obj, 1);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"}\n"
+"else if (__tag (obj) not in (__tag of varchar, __tag of varbinary))\n"
+"{\n"
+"sqlval := obj;\n"
+"\n"
+"}\n"
+"else\n"
+"sqlval := obj;\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"if (__tag (sqlval) in (__tag of integer, __tag of real, __tag of double precision, __tag of decimal))\n"
+"http_value (sqlval, 0, ses);\n"
+"else if (__tag (sqlval) in (__tag of varbinary, __tag of XML))\n"
+"{\n"
+"declare tmpses any;\n"
+"tmpses := string_output();\n"
+"http_value (sqlval, 0, tmpses);\n"
+"http (\'\"\', ses); http_escape (string_output_string (tmpses), 14, ses, 1, 1); http (\'\"\', ses);\n"
+"}\n"
+"else if (__tag of varchar = __tag (sqlval))\n"
+"{\n"
+"http (\'\"\', ses); http_escape (sqlval, 14, ses, 1, 1); http (\'\"\', ses);\n"
+"}\n"
+"else\n"
+"{\n"
+"sqlval := __rdf_strsqlval (obj);\n"
+"http (\'\"\', ses); http_escape (sqlval, 14, ses, 1, 1); http (\'\"\', ses);\n"
+"}\n"
+"}\n"
+"}\n"
+"if (prev_subj is not null)\n"
+"http (\'] } }\', ses);\n"
+"http (\' }\\n\', ses);\n"
+"}\n"
+"--src sparql.sql:4745\n";
+
+static const char *proc156 = 
+"#line 4886 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ATOM_XML (inout triples_dict any) returns long varchar\n"
+"{\n"
+"declare triples, ses any;\n"
+"ses := string_output ();\n"
+"if (214 <> __tag (triples_dict))\n"
+"{\n"
+"triples := vector ();\n"
+"}\n"
+"else\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (triples, 1, ses);\n"
+"return ses;\n"
+"}\n"
+"--src sparql.sql:4884\n";
+
+static const char *proc157 = 
+"#line 4901 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.ODATA_EDM_TYPE (in obj any)\n"
+"{\n"
+"if (__tag of int = __tag (obj))\n"
+"return \'Int32\';\n"
+"else if (__tag of smallint  = __tag (obj))\n"
+"return \'Int16\';\n"
+"else if (__tag of bigint = __tag (obj))\n"
+"return \'Int64\';\n"
+"else if (__tag of numeric = __tag (obj))\n"
+"return \'Decimal\';\n"
+"else if (__tag of double precision = __tag (obj))\n"
+"return \'Double\';\n"
+"else if (__tag of real = __tag (obj))\n"
+"return \'Double\';\n"
+"else if (__tag of datetime = __tag (obj))\n"
+"return \'DateTime\';\n"
+"else if (__tag of date = __tag (obj))\n"
+"return \'Date\';\n"
+"else if (__tag of time = __tag (obj))\n"
+"return \'Time\';\n"
+"else if (__tag of varbinary = __tag (obj))\n"
+"return \'Binary\';\n"
+"return null;\n"
+"}\n"
+"--src sparql.sql:4899\n";
+
+static const char *proc158 = 
+"#line 4927 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ODATA_JSON (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
 "ses := string_output ();\n"
@@ -4059,10 +5064,10 @@ static const char *proc136 =
 "DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:3924\n";
+"--src sparql.sql:4925\n";
 
-static const char *proc137 = 
-"#line 3941 \"[executable]/sparql.sql\"\n"
+static const char *proc159 = 
+"#line 4942 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_ODATA_JSON (inout triples any, inout ses any)\n"
 "{\n"
 "declare tcount, tctr, ns_ctr integer;\n"
@@ -4076,6 +5081,7 @@ static const char *proc137 =
 "ns_dict := dict_new ();\n"
 "ns_ctr := 0;\n"
 "tcount := length (triples);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "http (\'{ \"d\" : { \\n  \"results\": [ \\n\', ses);\n"
 "for (tctr := 0; tctr < tcount; tctr := tctr + 1)\n"
 "{\n"
@@ -4145,10 +5151,10 @@ static const char *proc137 =
 "}\n"
 "http (sprintf (\'\\n ], \"__count\": \"%d\"\\n } }\', tcount), ses);\n"
 "}\n"
-"--src sparql.sql:3939\n";
+"--src sparql.sql:4940\n";
 
-static const char *proc138 = 
-"#line 4025 \"[executable]/sparql.sql\"\n"
+static const char *proc160 = 
+"#line 5027 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (inout triples any, in print_top_level integer, inout ses any)\n"
 "{\n"
 "declare tcount, tctr, ns_ctr integer;\n"
@@ -4164,6 +5170,7 @@ static const char *proc138 =
 "ns_dict := dict_new ();\n"
 "ns_ctr := 0; pct := 0;\n"
 "tcount := length (triples);\n"
+"DB.DBA.RDF_TRIPLES_BATCH_COMPLETE (triples);\n"
 "if (print_top_level)\n"
 "{\n"
 "http (\'<?xml version=\"1.0\" encoding=\"utf-8\" ?>\\n<feed \\n\\t xmlns=\"http://www.w3.org/2005/Atom\" \\n\'||\n"
@@ -4355,10 +5362,10 @@ static const char *proc138 =
 "http (\'</feed>\', ses);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:4023\n";
+"--src sparql.sql:5025\n";
 
-static const char *proc139 = 
-"#line 4238 \"[executable]/sparql.sql\"\n"
+static const char *proc161 = 
+"#line 5241 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_INIT (inout _env any)\n"
 "{\n"
 "_env := string_output();\n"
@@ -4367,10 +5374,10 @@ static const char *proc139 =
 "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n"
 "[ rdf:type rs:results ;\', _env);\n"
 "}\n"
-"--src sparql.sql:4236\n";
+"--src sparql.sql:5239\n";
 
-static const char *proc140 = 
-"#line 4248 \"[executable]/sparql.sql\"\n"
+static const char *proc162 = 
+"#line 5251 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_ACC (inout _env any, inout colvalues any, inout colnames any)\n"
 "{\n"
 "declare col_ctr, col_count integer;\n"
@@ -4416,10 +5423,10 @@ static const char *proc140 =
 "}\n"
 "http (\'\\n      ] ;\', _env);\n"
 "}\n"
-"--src sparql.sql:4246\n";
+"--src sparql.sql:5249\n";
 
-static const char *proc141 = 
-"#line 4295 \"[executable]/sparql.sql\"\n"
+static const char *proc163 = 
+"#line 5298 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "if (185 <> __tag(_env))\n"
@@ -4428,15 +5435,15 @@ static const char *proc141 =
 "http (\'\\n    ] .\', _env);\n"
 "return string_output_string (_env);\n"
 "}\n"
-"--src sparql.sql:4293\n";
+"--src sparql.sql:5296\n";
 
 static const char *other16 = 
 "create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL (in colvalues any, in colnames any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_FIN\n"
 "order\n";
 
-static const char *proc142 = 
-"#line 4311 \"[executable]/sparql.sql\"\n"
+static const char *proc164 = 
+"#line 5314 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_INIT (inout _env any)\n"
 "{\n"
 "_env := vector (0, 0, string_output());\n"
@@ -4445,10 +5452,10 @@ static const char *proc142 =
 "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n"
 "_:_ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2005/sparql-results#results> .\\n\', _env[2]);\n"
 "}\n"
-"--src sparql.sql:4309\n";
+"--src sparql.sql:5312\n";
 
-static const char *proc143 = 
-"#line 4321 \"[executable]/sparql.sql\"\n"
+static const char *proc165 = 
+"#line 5324 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_ACC (inout _env any, inout colvalues any, inout colnames any)\n"
 "{\n"
 "declare col_ctr, col_count integer;\n"
@@ -4469,25 +5476,25 @@ static const char *proc143 =
 "}\n"
 "sparql_rset_nt_write_row (0, _env, colvalues);\n"
 "}\n"
-"--src sparql.sql:4319\n";
+"--src sparql.sql:5322\n";
 
-static const char *proc144 = 
-"#line 4343 \"[executable]/sparql.sql\"\n"
+static const char *proc166 = 
+"#line 5346 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "if (__tag of vector <> __tag(_env))\n"
 "DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_INIT (_env);\n"
 "return string_output_string (_env[2]);\n"
 "}\n"
-"--src sparql.sql:4341\n";
+"--src sparql.sql:5344\n";
 
 static const char *other17 = 
 "create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT (in colvalues any, in colnames any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_FIN\n"
 "order\n";
 
-static const char *proc145 = 
-"#line 4356 \"[executable]/sparql.sql\"\n"
+static const char *proc167 = 
+"#line 5359 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_INIT (inout _env any)\n"
 "{\n"
 "_env := string_output();\n"
@@ -4497,10 +5504,10 @@ static const char *proc145 =
 "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" >\n"
 "<rs:results rdf:nodeID=\"rset\">\', _env);\n"
 "}\n"
-"--src sparql.sql:4354\n";
+"--src sparql.sql:5357\n";
 
-static const char *proc146 = 
-"#line 4367 \"[executable]/sparql.sql\"\n"
+static const char *proc168 = 
+"#line 5370 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_ACC (inout _env any, inout colvalues any, inout colnames any)\n"
 "{\n"
 "declare sol_id varchar;\n"
@@ -4568,10 +5575,10 @@ static const char *proc146 =
 "}\n"
 "http (\'\\n  </rs:result>\', _env);\n"
 "}\n"
-"--src sparql.sql:4365\n";
+"--src sparql.sql:5368\n";
 
-static const char *proc147 = 
-"#line 4436 \"[executable]/sparql.sql\"\n"
+static const char *proc169 = 
+"#line 5439 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "if (185 <> __tag(_env))\n"
@@ -4580,23 +5587,23 @@ static const char *proc147 =
 "http (\'\\n </rs:results>\\n</rdf:RDF>\', _env);\n"
 "return string_output_string (_env);\n"
 "}\n"
-"--src sparql.sql:4434\n";
+"--src sparql.sql:5437\n";
 
 static const char *other18 = 
 "create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML (in colvalues any, in colnames any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_FIN\n"
 "order\n";
 
-static const char *proc148 = 
-"#line 4451 \"[executable]/sparql.sql\"\n"
+static const char *proc170 = 
+"#line 5454 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:4449\n";
+"--src sparql.sql:5452\n";
 
-static const char *proc149 = 
-"#line 4457 \"[executable]/sparql.sql\"\n"
+static const char *proc171 = 
+"#line 5460 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_ACC (inout _env any, inout colvalues any, inout colnames any)\n"
 "{\n"
 "declare sol_id varchar;\n"
@@ -4636,10 +5643,10 @@ static const char *proc149 =
 "}\n"
 "http(\'}\', _env);\n"
 "}\n"
-"--src sparql.sql:4455\n";
+"--src sparql.sql:5458\n";
 
-static const char *proc150 = 
-"#line 4498 \"[executable]/sparql.sql\"\n"
+static const char *proc172 = 
+"#line 5501 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "if (185 <> __tag(_env))\n"
@@ -4650,23 +5657,23 @@ static const char *proc150 =
 "http (\' ] } }\', _env);\n"
 "return string_output_string (_env);\n"
 "}\n"
-"--src sparql.sql:4496\n";
+"--src sparql.sql:5499\n";
 
 static const char *other19 = 
 "create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON (in colvalues any, in colnames any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_FIN\n"
 "order\n";
 
-static const char *proc151 = 
-"#line 4517 \"[executable]/sparql.sql\"\n"
+static const char *proc173 = 
+"#line 5520 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:4515\n";
+"--src sparql.sql:5518\n";
 
-static const char *proc152 = 
-"#line 4523 \"[executable]/sparql.sql\"\n"
+static const char *proc174 = 
+"#line 5526 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_CSV_WRITE_VALUE (inout _env any, in val any)\n"
 "{\n"
 "declare t integer;\n"
@@ -4687,10 +5694,10 @@ static const char *proc152 =
 "http (replace (cast (val as varchar), \'\"\', \'\"\"\"\'), _env);\n"
 "http (\'\"\', _env);\n"
 "}\n"
-"--src sparql.sql:4521\n";
+"--src sparql.sql:5524\n";
 
-static const char *proc153 = 
-"#line 4545 \"[executable]/sparql.sql\"\n"
+static const char *proc175 = 
+"#line 5548 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_ACC (inout _env any, inout colvalues any, inout colnames any)\n"
 "{\n"
 "declare sol_id varchar;\n"
@@ -4719,33 +5726,33 @@ static const char *proc153 =
 "}\n"
 "http(\'\\n\', _env);\n"
 "}\n"
-"--src sparql.sql:4543\n";
+"--src sparql.sql:5546\n";
 
-static const char *proc154 = 
-"#line 4575 \"[executable]/sparql.sql\"\n"
+static const char *proc176 = 
+"#line 5578 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "if (185 <> __tag(_env))\n"
 "return \'\';\n"
 "return string_output_string (_env);\n"
 "}\n"
-"--src sparql.sql:4573\n";
+"--src sparql.sql:5576\n";
 
 static const char *other20 = 
 "create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV (in colvalues any, in colnames any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_FIN\n"
 "order\n";
 
-static const char *proc155 = 
-"#line 4588 \"[executable]/sparql.sql\"\n"
+static const char *proc177 = 
+"#line 5591 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:4586\n";
+"--src sparql.sql:5589\n";
 
-static const char *proc156 = 
-"#line 4594 \"[executable]/sparql.sql\"\n"
+static const char *proc178 = 
+"#line 5597 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_ACC (inout _env any, inout colvalues any, inout colnames any)\n"
 "{\n"
 "declare agg, colvalues_copy any;\n"
@@ -4762,46 +5769,148 @@ static const char *proc156 =
 "vectorbld_acc (agg, colvalues_copy);\n"
 "aset_zap_arg (_env, 0, agg);\n"
 "}\n"
-"--src sparql.sql:4592\n";
+"--src sparql.sql:5595\n";
+
+static const char *proc179 = 
+"#line 5615 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_FIN (inout _env any) returns long varchar\n"
+"{\n"
+"declare ses, metas, rset any;\n"
+"declare accept varchar;\n"
+"declare add_http_headers integer;\n"
+"ses := string_output ();\n"
+"if (isinteger (_env))\n"
+"{\n"
+"metas := vector (vector (vector (\'s\')), 1);\n"
+"rset := vector ();\n"
+"DB.DBA.SPARQL_RESULTS_CXML_WRITE (ses, metas, rset, accept, add_http_headers);\n"
+"}\n"
+"else\n"
+"{\n"
+"declare cols any;\n"
+"declare colctr, colcount integer;\n"
+"rset := aref_set_0 (_env, 0);\n"
+"vectorbld_final (rset);\n"
+"cols := aref_set_0 (_env, 1);\n"
+"colcount := length (cols);\n"
+"for (colctr := 0; colctr < colcount; colctr := colctr + 1) cols[colctr] := vector (cols[colctr]);\n"
+"metas := vector (cols, vector ());\n"
+"DB.DBA.SPARQL_RESULTS_CXML_WRITE (ses, metas, rset, accept, add_http_headers);\n"
+"}\n"
+"return string_output_string (ses);\n"
+"}\n"
+"--src sparql.sql:5613\n";
+
+static const char *other21 = 
+"create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML (in colvalues any, in colnames any) returns long varchar\n"
+"from DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_FIN\n"
+"order\n";
+
+static const char *proc180 = 
+"#line 5648 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TTL (inout triples_dict any) returns long varchar\n"
+"{\n"
+"declare triples, ses any;\n"
+"ses := string_output ();\n"
+"if (214 <> __tag (triples_dict))\n"
+"{\n"
+"triples := vector ();\n"
+"}\n"
+"else\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_TTL (triples, ses);\n"
+"return ses;\n"
+"}\n"
+"--src sparql.sql:5646\n";
+
+static const char *proc181 = 
+"#line 5663 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TRIG (inout triples_dict any) returns long varchar\n"
+"{\n"
+"declare triples, ses any;\n"
+"ses := string_output ();\n"
+"if (214 <> __tag (triples_dict))\n"
+"{\n"
+"triples := vector ();\n"
+"}\n"
+"else\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_TRIG (triples, ses);\n"
+"return ses;\n"
+"}\n"
+"--src sparql.sql:5661\n";
+
+static const char *proc182 = 
+"#line 5678 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT (inout triples_dict any) returns long varchar\n"
+"{\n"
+"declare triples, ses any;\n"
+"ses := string_output ();\n"
+"if (214 <> __tag (triples_dict))\n"
+"{\n"
+"triples := vector ();\n"
+"}\n"
+"else\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_NT (triples, ses);\n"
+"return ses;\n"
+"}\n"
+"--src sparql.sql:5676\n";
+
+static const char *proc183 = 
+"#line 5693 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML (inout triples_dict any) returns long varchar\n"
+"{\n"
+"declare triples, ses any;\n"
+"ses := string_output ();\n"
+"if (214 <> __tag (triples_dict))\n"
+"{\n"
+"triples := vector ();\n"
+"}\n"
+"else\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (triples, 1, ses);\n"
+"return ses;\n"
+"}\n"
+"--src sparql.sql:5691\n";
+
+static const char *proc184 = 
+"#line 5708 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON (inout triples_dict any) returns long varchar\n"
+"{\n"
+"declare triples, ses any;\n"
+"ses := string_output ();\n"
+"if (214 <> __tag (triples_dict))\n"
+"{\n"
+"triples := vector ();\n"
+"}\n"
+"else\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (triples, ses);\n"
+"return ses;\n"
+"}\n"
+"--src sparql.sql:5706\n";
 
-static const char *proc157 = 
-"#line 4612 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_FIN (inout _env any) returns long varchar\n"
+static const char *proc185 = 
+"#line 5723 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_LD (inout triples_dict any) returns long varchar\n"
 "{\n"
-"declare ses, metas, rset any;\n"
-"declare accept varchar;\n"
-"declare add_http_headers integer;\n"
+"declare triples, ses any;\n"
 "ses := string_output ();\n"
-"if (isinteger (_env))\n"
+"if (214 <> __tag (triples_dict))\n"
 "{\n"
-"metas := vector (vector (vector (\'s\')), 1);\n"
-"rset := vector ();\n"
-"DB.DBA.SPARQL_RESULTS_CXML_WRITE (ses, metas, rset, accept, add_http_headers);\n"
+"triples := vector ();\n"
 "}\n"
 "else\n"
-"{\n"
-"declare cols any;\n"
-"declare colctr, colcount integer;\n"
-"rset := aref_set_0 (_env, 0);\n"
-"vectorbld_final (rset);\n"
-"cols := aref_set_0 (_env, 1);\n"
-"colcount := length (cols);\n"
-"for (colctr := 0; colctr < colcount; colctr := colctr + 1) cols[colctr] := vector (cols[colctr]);\n"
-"metas := vector (cols, vector ());\n"
-"DB.DBA.SPARQL_RESULTS_CXML_WRITE (ses, metas, rset, accept, add_http_headers);\n"
-"}\n"
-"return string_output_string (ses);\n"
+"triples := dict_list_keys (triples_dict, 1);\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, ses);\n"
+"return ses;\n"
 "}\n"
-"--src sparql.sql:4610\n";
-
-static const char *other21 = 
-"create aggregate DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML (in colvalues any, in colnames any) returns long varchar\n"
-"from DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_INIT, DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_ACC, DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_FIN\n"
-"order\n";
+"--src sparql.sql:5721\n";
 
-static const char *proc158 = 
-"#line 4645 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TTL (inout triples_dict any) returns long varchar\n"
+static const char *proc186 = 
+"#line 5738 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_UL (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
 "ses := string_output ();\n"
@@ -4811,14 +5920,14 @@ static const char *proc158 =
 "}\n"
 "else\n"
 "triples := dict_list_keys (triples_dict, 1);\n"
-"DB.DBA.RDF_TRIPLES_TO_TTL (triples, ses);\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_UL (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4643\n";
+"--src sparql.sql:5736\n";
 
-static const char *proc159 = 
-"#line 4660 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT (inout triples_dict any) returns long varchar\n"
+static const char *proc187 = 
+"#line 5753 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_TR (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
 "ses := string_output ();\n"
@@ -4828,14 +5937,14 @@ static const char *proc159 =
 "}\n"
 "else\n"
 "triples := dict_list_keys (triples_dict, 1);\n"
-"DB.DBA.RDF_TRIPLES_TO_NT (triples, ses);\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_TR (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4658\n";
+"--src sparql.sql:5751\n";
 
-static const char *proc160 = 
-"#line 4675 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML (inout triples_dict any) returns long varchar\n"
+static const char *proc188 = 
+"#line 5768 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_MICRODATA (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
 "ses := string_output ();\n"
@@ -4845,14 +5954,14 @@ static const char *proc160 =
 "}\n"
 "else\n"
 "triples := dict_list_keys (triples_dict, 1);\n"
-"DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (triples, 1, ses);\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4673\n";
+"--src sparql.sql:5766\n";
 
-static const char *proc161 = 
-"#line 4690 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON (inout triples_dict any) returns long varchar\n"
+static const char *proc189 = 
+"#line 5783 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_MICRODATA (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
 "ses := string_output ();\n"
@@ -4862,13 +5971,13 @@ static const char *proc161 =
 "}\n"
 "else\n"
 "triples := dict_list_keys (triples_dict, 1);\n"
-"DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (triples, ses);\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4688\n";
+"--src sparql.sql:5781\n";
 
-static const char *proc162 = 
-"#line 4705 \"[executable]/sparql.sql\"\n"
+static const char *proc190 = 
+"#line 5798 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CSV (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
@@ -4882,10 +5991,10 @@ static const char *proc162 =
 "DB.DBA.RDF_TRIPLES_TO_CSV (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4703\n";
+"--src sparql.sql:5796\n";
 
-static const char *proc163 = 
-"#line 4720 \"[executable]/sparql.sql\"\n"
+static const char *proc191 = 
+"#line 5813 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDFA_XHTML (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
@@ -4899,10 +6008,10 @@ static const char *proc163 =
 "DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML (triples, ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4718\n";
+"--src sparql.sql:5811\n";
 
-static const char *proc164 = 
-"#line 4735 \"[executable]/sparql.sql\"\n"
+static const char *proc192 = 
+"#line 5828 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
@@ -4919,10 +6028,10 @@ static const char *proc164 =
 "DB.DBA.RDF_TRIPLES_TO_CXML (triples, ses, accept, add_http_headers, 0);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4733\n";
+"--src sparql.sql:5826\n";
 
-static const char *proc165 = 
-"#line 4753 \"[executable]/sparql.sql\"\n"
+static const char *proc193 = 
+"#line 5846 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML_QRCODE (inout triples_dict any) returns long varchar\n"
 "{\n"
 "declare triples, ses any;\n"
@@ -4939,26 +6048,26 @@ static const char *proc165 =
 "DB.DBA.RDF_TRIPLES_TO_CXML (triples, ses, accept, add_http_headers, 1);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4751\n";
+"--src sparql.sql:5844\n";
 
-static const char *proc166 = 
-"#line 4772 \"[executable]/sparql.sql\"\n"
+static const char *proc194 = 
+"#line 5865 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:4770\n";
+"--src sparql.sql:5863\n";
 
-static const char *proc167 = 
-"#line 4779 \"[executable]/sparql.sql\"\n"
+static const char *proc195 = 
+"#line 5872 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_ACC (inout _env any, inout one any)\n"
 "{\n"
 "_env := 1;\n"
 "}\n"
-"--src sparql.sql:4777\n";
+"--src sparql.sql:5870\n";
 
-static const char *proc168 = 
-"#line 4786 \"[executable]/sparql.sql\"\n"
+static const char *proc196 = 
+"#line 5879 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "declare ses any;\n"
@@ -4974,30 +6083,30 @@ static const char *proc168 =
 "</sparql>\', ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4784\n";
+"--src sparql.sql:5877\n";
 
 static const char *other22 = 
 "create aggregate DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML (inout one any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_INIT, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_ACC, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_FIN\n";
 
-static const char *proc169 = 
-"#line 4808 \"[executable]/sparql.sql\"\n"
+static const char *proc197 = 
+"#line 5901 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:4806\n";
+"--src sparql.sql:5899\n";
 
-static const char *proc170 = 
-"#line 4815 \"[executable]/sparql.sql\"\n"
+static const char *proc198 = 
+"#line 5908 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_ACC (inout _env any, inout one any)\n"
 "{\n"
 "_env := 1;\n"
 "}\n"
-"--src sparql.sql:4813\n";
+"--src sparql.sql:5906\n";
 
-static const char *proc171 = 
-"#line 4822 \"[executable]/sparql.sql\"\n"
+static const char *proc199 = 
+"#line 5915 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "declare ses any;\n"
@@ -5015,30 +6124,30 @@ static const char *proc171 =
 "<rs:boolean rdf:datatype=\"http://www.w3.org/2001/XMLSchema#boolean\">\' || ans || \'</rs:boolean></rs:results></rdf:RDF>\', ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4820\n";
+"--src sparql.sql:5913\n";
 
 static const char *other23 = 
 "create aggregate DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML (inout one any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_INIT, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_ACC, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_FIN\n";
 
-static const char *proc172 = 
-"#line 4846 \"[executable]/sparql.sql\"\n"
+static const char *proc200 = 
+"#line 5939 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:4844\n";
+"--src sparql.sql:5937\n";
 
-static const char *proc173 = 
-"#line 4853 \"[executable]/sparql.sql\"\n"
+static const char *proc201 = 
+"#line 5946 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_ACC (inout _env any, inout one any)\n"
 "{\n"
 "_env := 1;\n"
 "}\n"
-"--src sparql.sql:4851\n";
+"--src sparql.sql:5944\n";
 
-static const char *proc174 = 
-"#line 4860 \"[executable]/sparql.sql\"\n"
+static const char *proc202 = 
+"#line 5953 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "declare ses any;\n"
@@ -5053,14 +6162,14 @@ static const char *proc174 =
 "http (sprintf (\'[] rdf:type rs:results ; rs:boolean %s .\', ans), ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4858\n";
+"--src sparql.sql:5951\n";
 
 static const char *other24 = 
 "create aggregate DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL (inout one any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_INIT, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_ACC, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_FIN\n";
 
-static const char *proc175 = 
-"#line 4881 \"[executable]/sparql.sql\"\n"
+static const char *proc203 = 
+"#line 5974 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_NT_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "declare ses any;\n"
@@ -5073,7 +6182,7 @@ static const char *proc175 =
 "http (sprintf (\'_:_ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2005/sparql-results#results> .\\n_:_ <http://www.w3.org/2005/sparql-results#boolean> \"%s\"^^<http://www.w3.org/2001/XMLSchema#boolean> .\\n\', ans), ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:4879\n";
+"--src sparql.sql:5972\n";
 
 static const char *other25 = 
 "create aggregate DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_NT (inout one any) returns long varchar\n"
@@ -5085,8 +6194,8 @@ static const char *other26 =
 "create aggregate DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL (inout one any) returns long varchar\n"
 "from DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_INIT, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_ACC, DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_FIN\n";
 
-static const char *proc176 = 
-"#line 4907 \"[executable]/sparql.sql\"\n"
+static const char *proc204 = 
+"#line 6000 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_CSV_FIN (inout _env any) returns long varchar\n"
 "{\n"
 "declare ans varchar;\n"
@@ -5095,7 +6204,7 @@ static const char *proc176 =
 "else\n"
 "return \'\"bool\"\\n0\\n\';\n"
 "}\n"
-"--src sparql.sql:4905\n";
+"--src sparql.sql:5998\n";
 
 static const char *other27 = 
 "create aggregate DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_CSV (inout one any) returns long varchar\n"
@@ -5103,22 +6212,25 @@ static const char *other27 =
 "DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_ACC,\n"
 "DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_CSV_FIN\n";
 
-static const char *proc177 = 
-"#line 4926 \"[executable]/sparql.sql\"\n"
+static const char *proc205 = 
+"#line 6019 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_INSERT_TRIPLES_CL (inout graph_iri any, inout triples any, in log_mode integer := null)\n"
 "{\n"
 "declare is_text, ctr, old_log_enable, l integer;\n"
 "declare ro_id_dict, dp any;\n"
-"if (\'1\' = registry_get (\'cl_rdf_text_index\'))\n"
-"is_text := 1;\n"
 "if (not isiri_id (graph_iri))\n"
 "graph_iri := iri_to_id (graph_iri);\n"
+"if (__rdf_obj_ft_rule_count_in_graph (graph_iri))\n"
+"is_text := 1;\n"
 "if (__rdf_graph_is_in_enabled_repl (graph_iri))\n"
 "DB.DBA.RDF_REPL_INSERT_TRIPLES (id_to_iri (graph_iri), triples);\n"
-"connection_set (\'g_iid\', graph_iri);\n"
-"ro_id_dict := dict_new ();\n"
+"if (is_text)\n"
+"ro_id_dict := dict_new (length (triples));\n"
+"else\n"
+"ro_id_dict := null;\n"
 "connection_set (\'g_dict\', ro_id_dict);\n"
-"dp := dpipe (0, \'IRI_TO_ID_1\', \'IRI_TO_ID_1\', \'IRI_TO_ID_1\', \'MAKE_RO_1\', \'IRI_TO_ID_1\');\n"
+"connection_set (\'g_iid\', graph_iri);\n"
+"dp := dpipe (0, \'IRI_TO_ID_1\', \'IRI_TO_ID_1\', \'IRI_TO_ID_1\', \'MAKE_RO_1\');\n"
 "dpipe_set_rdf_load (dp);\n"
 "l := length (triples);\n"
 "for (ctr := 0; ctr < l; ctr := ctr + 1)\n"
@@ -5136,18 +6248,24 @@ static const char *proc177 =
 "rdf_box_set_is_text (o_val_2, 1);\n"
 "rdf_box_set_type (o_val_2, 257);\n"
 "\n"
-"dpipe_input (dp, r[0], r[1], null, o_val_2, null);\n"
+"dpipe_input (dp, r[0], r[1], null, o_val_2);\n"
 "}\n"
 "else\n"
 "{\n"
 "\n"
-"dpipe_input (dp, r[0], r[1], null, o_val, null);\n"
+"dpipe_input (dp, r[0], r[1], null, o_val);\n"
 "}\n"
 "}\n"
+"else if ((__tag (o_val) = __tag of rdf_box) and is_text and rdf_box_data_tag(o_val) in (__tag of varchar, __tag of XML))\n"
+"{\n"
+"rdf_box_set_is_text (o_val, 1);\n"
+"\n"
+"dpipe_input (dp, r[0], r[1], null, o_val);\n"
+"}\n"
 "else\n"
 "{\n"
 "\n"
-"dpipe_input (dp, r[0], r[1], null, o_val, null);\n"
+"dpipe_input (dp, r[0], r[1], null, o_val);\n"
 "}\n"
 "if (mod (ctr + 1, 40000) = 0 and l > 60000)\n"
 "{\n"
@@ -5158,13 +6276,14 @@ static const char *proc177 =
 "}\n"
 "dpipe_next (dp, 0);\n"
 "dpipe_next (dp, 1);\n"
+"dpipe_reuse (dp);\n"
 "if (ro_id_dict is not null)\n"
 "DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (graph_iri, ro_id_dict);\n"
 "}\n"
-"--src sparql.sql:4924\n";
+"--src sparql.sql:6017\n";
 
-static const char *proc178 = 
-"#line 4984 \"[executable]/sparql.sql\"\n"
+static const char *proc206 = 
+"#line 6087 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_INSERT_TRIPLES (in graph_iri any, inout triples any, in log_mode integer := null)\n"
 "{\n"
 "declare ctr, old_log_enable integer;\n"
@@ -5205,7 +6324,7 @@ static const char *proc178 =
 "if (not rdf_box_is_storeable (o_final))\n"
 "{\n"
 "\n"
-"signal (\'OBLOM\', \'Bad O after MAKE_OBJ_OF_SQLVAL_FT\');\n"
+"signal (\'OBLOM\', \'Bad O after DB.DBA.RDF_OBJ_ADD\');\n"
 "}\n"
 "}\n"
 "do_insert:\n"
@@ -5217,10 +6336,10 @@ static const char *proc178 =
 "DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (graph_iri, ro_id_dict);\n"
 "log_enable (old_log_enable, 1);\n"
 "}\n"
-"--src sparql.sql:4982\n";
+"--src sparql.sql:6085\n";
 
-static const char *proc179 = 
-"#line 5038 \"[executable]/sparql.sql\"\n"
+static const char *proc207 = 
+"#line 6141 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_DELETE_TRIPLES (in graph_iri any, in triples any, in log_mode integer := null)\n"
 "{\n"
 "declare ctr, old_log_enable integer;\n"
@@ -5250,10 +6369,10 @@ static const char *proc179 =
 "}\n"
 "log_enable (old_log_enable, 1);\n"
 "}\n"
-"--src sparql.sql:5036\n";
+"--src sparql.sql:6139\n";
 
-static const char *proc180 = 
-"#line 5070 \"[executable]/sparql.sql\"\n"
+static const char *proc208 = 
+"#line 6173 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_DELETE_TRIPLES_AGG (in graph_iid any, inout triples any, in log_mode integer := null)\n"
 "{\n"
 "declare ctr, old_log_enable, l integer;\n"
@@ -5316,27 +6435,27 @@ static const char *proc180 =
 "log_enable (old_log_enable, 1);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:5068\n";
+"--src sparql.sql:6171\n";
 
-static const char *proc181 = 
-"#line 5134 \"[executable]/sparql.sql\"\n"
+static const char *proc209 = 
+"#line 6237 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_MODIFY_TRIPLES (in graph_iri any, in del_triples any, in ins_triples any, in log_mode integer := null)\n"
 "{\n"
 "DB.DBA.RDF_DELETE_TRIPLES (graph_iri, del_triples, log_mode);\n"
 "DB.DBA.RDF_INSERT_TRIPLES (graph_iri, ins_triples, log_mode);\n"
 "}\n"
-"--src sparql.sql:5132\n";
+"--src sparql.sql:6235\n";
 
-static const char *proc182 = 
-"#line 5142 \"[executable]/sparql.sql\"\n"
+static const char *proc210 = 
+"#line 6245 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:5140\n";
+"--src sparql.sql:6243\n";
 
-static const char *proc183 = 
-"#line 5149 \"[executable]/sparql.sql\"\n"
+static const char *proc211 = 
+"#line 6252 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL (inout _env any, in graph_iri any, in opcodes any, in vars any, in log_mode integer, in ctor_op integer)\n"
 "{\n"
 "declare triple_ctr integer;\n"
@@ -5425,10 +6544,10 @@ static const char *proc183 =
 "_env[ctor_op] := _env[ctor_op] + action_ctr;\n"
 "log_enable (old_log_enable, 1);\n"
 "}\n"
-"--src sparql.sql:5147\n";
+"--src sparql.sql:6250\n";
 
-static const char *proc184 = 
-"#line 5240 \"[executable]/sparql.sql\"\n"
+static const char *proc212 = 
+"#line 6343 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.SPARQL_DELETE_CTOR_ACC (inout _env any, in graph_iri any, in opcodes any, in vars any, in uid integer, in log_mode integer)\n"
 "{\n"
 "if (not (isarray (_env)))\n"
@@ -5437,10 +6556,10 @@ static const char *proc184 =
 "__rgs_assert_cbk (graph_iri, uid, 2, \'SPARUL DELETE\');\n"
 "DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL (_env, graph_iri, opcodes, vars, log_mode, 1);\n"
 "}\n"
-"--src sparql.sql:5238\n";
+"--src sparql.sql:6341\n";
 
-static const char *proc185 = 
-"#line 5251 \"[executable]/sparql.sql\"\n"
+static const char *proc213 = 
+"#line 6354 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_INSERT_CTOR_ACC (inout _env any, in graph_iri any, in opcodes any, in vars any, in uid integer, in log_mode integer)\n"
 "{\n"
 "\n"
@@ -5450,10 +6569,10 @@ static const char *proc185 =
 "__rgs_assert_cbk (graph_iri, uid, 2, \'SPARUL INSERT\');\n"
 "DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL (_env, graph_iri, opcodes, vars, log_mode, 2);\n"
 "}\n"
-"--src sparql.sql:5249\n";
+"--src sparql.sql:6352\n";
 
-static const char *proc186 = 
-"#line 5263 \"[executable]/sparql.sql\"\n"
+static const char *proc214 = 
+"#line 6366 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_MODIFY_CTOR_ACC (inout _env any, in graph_iri any, in del_opcodes any, in ins_opcodes any, in vars any, in uid integer, in log_mode integer)\n"
 "{\n"
 "if (not (isarray (_env)))\n"
@@ -5463,10 +6582,10 @@ static const char *proc186 =
 "DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL (_env, graph_iri, del_opcodes, vars, log_mode, 1);\n"
 "DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL (_env, graph_iri, ins_opcodes, vars, log_mode, 2);\n"
 "}\n"
-"--src sparql.sql:5261\n";
+"--src sparql.sql:6364\n";
 
-static const char *proc187 = 
-"#line 5275 \"[executable]/sparql.sql\"\n"
+static const char *proc215 = 
+"#line 6378 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_FIN (inout _env any)\n"
 "{\n"
 "if (isarray (_env))\n"
@@ -5487,7 +6606,7 @@ static const char *proc187 =
 "}\n"
 "return _env;\n"
 "}\n"
-"--src sparql.sql:5273\n";
+"--src sparql.sql:6376\n";
 
 static const char *other28 = 
 " create aggregate DB.DBA.SPARQL_DELETE_CTOR (in graph_iri any, in opcodes any, in vars any, in uid integer, in log_mode integer) returns any\n"
@@ -5501,8 +6620,8 @@ static const char *other30 =
 " create aggregate DB.DBA.SPARQL_MODIFY_CTOR (in graph_iri any, in del_opcodes any, in ins_opcodes any, in vars any, in uid integer, in log_mode integer) returns any\n"
 "from DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_INIT, DB.DBA.SPARQL_MODIFY_CTOR_ACC, DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_FIN\n";
 
-static const char *proc188 = 
-"#line 5312 \"[executable]/sparql.sql\"\n"
+static const char *proc216 = 
+"#line 6415 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.SPARQL_INSERT_DICT_CONTENT (in graph_iri any, in triples_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any\n"
 "{\n"
 "declare triples any;\n"
@@ -5534,10 +6653,10 @@ static const char *proc188 =
 "else\n"
 "return ins_count;\n"
 "}\n"
-"--src sparql.sql:5310\n";
+"--src sparql.sql:6413\n";
 
-static const char *proc189 = 
-"#line 5345 \"[executable]/sparql.sql\"\n"
+static const char *proc217 = 
+"#line 6448 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.SPARQL_DELETE_DICT_CONTENT (in graph_iri any, in triples_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any\n"
 "{\n"
 "declare triples any;\n"
@@ -5569,10 +6688,10 @@ static const char *proc189 =
 "else\n"
 "return del_count;\n"
 "}\n"
-"--src sparql.sql:5343\n";
+"--src sparql.sql:6446\n";
 
-static const char *proc190 = 
-"#line 5378 \"[executable]/sparql.sql\"\n"
+static const char *proc218 = 
+"#line 6481 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.SPARQL_MODIFY_BY_DICT_CONTENTS (in graph_iri any, in del_triples_dict any, in ins_triples_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any\n"
 "{\n"
 "declare del_count, ins_count integer;\n"
@@ -5604,10 +6723,10 @@ static const char *proc190 =
 "else\n"
 "return del_count + ins_count;\n"
 "}\n"
-"--src sparql.sql:5376\n";
+"--src sparql.sql:6479\n";
 
-static const char *proc191 = 
-"#line 5412 \"[executable]/sparql.sql\"\n"
+static const char *proc219 = 
+"#line 6515 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_REPL_DEL (inout rquads any)\n"
 "{\n"
 "declare rquads_ctr, rquads_count, opcode integer;\n"
@@ -5676,49 +6795,66 @@ static const char *proc191 =
 "connection_set (\'g_dict\', null);\n"
 "commit work;\n"
 "}\n"
-"--src sparql.sql:5410\n";
+"--src sparql.sql:6513\n";
 
-static const char *proc192 = 
-"#line 5485 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.SPARUL_CLEAR (in graph_iri any, in inside_sponge integer, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0) returns any\n"
+static const char *proc220 = 
+"#line 6588 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_CLEAR (in graph_iris any, in inside_sponge integer, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any\n"
 "{\n"
-"declare g any;\n"
 "declare g_iid IRI_ID;\n"
 "declare old_log_enable integer;\n"
-"g := graph_iri;\n"
-"if (isiri_id (g))\n"
-"g := id_to_iri (g);\n"
-"g_iid := iri_to_id (g);\n"
-"__rgs_assert_cbk (graph_iri, uid, 2, \'SPARUL CLEAR GRAPH\');\n"
+"declare txtreport varchar;\n"
+"txtreport := \'\';\n"
+"if (__tag of vector <> __tag (graph_iris))\n"
+"graph_iris := vector (graph_iris);\n"
+"foreach (any g_iri in graph_iris) do\n"
+"{\n"
+"if (isiri_id (g_iri))\n"
+"g_iri := id_to_iri (g_iri);\n"
+"g_iid := iri_to_id (g_iri);\n"
+"__rgs_assert_cbk (g_iri, uid, 2, \'SPARUL CLEAR GRAPH\');\n"
+"}\n"
+"foreach (any g_iri in graph_iris) do\n"
+"{\n"
+"if (isiri_id (g_iri))\n"
+"g_iri := id_to_iri (g_iri);\n"
+"g_iid := iri_to_id (g_iri);\n"
 "if (__rdf_graph_is_in_enabled_repl (g_iid))\n"
 "{\n"
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue()\');\n"
-"repl_text (\'__rdf_repl\', \'sparql define input:storage \"\" clear graph iri ( ?? )\', g);\n"
+"repl_text (\'__rdf_repl\', \'sparql define input:storage \"\" clear graph iri ( ?? )\', g_iri);\n"
 "}\n"
 "old_log_enable := log_enable (log_mode, 1);\n"
 "declare exit handler for sqlstate \'*\' { log_enable (old_log_enable, 1); resignal; };\n"
 "exec (sprintf (\'\n"
 "delete from DB.DBA.RDF_QUAD\n"
-"where G = __i2id (\'\'%S\'\') \', g));\n"
+"where G = __i2id (\'\'%S\'\') \', g_iri));\n"
+"cl_exec (\'delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_GS, index_only, no cluster) where G = ? option (index RDF_QUAD_GS)\', vector (g_iid));\n"
 "delete from DB.DBA.RDF_OBJ_RO_FLAGS_WORDS\n"
 "where VT_WORD = rdf_graph_keyword (g_iid);\n"
 "if (not inside_sponge)\n"
 "{\n"
-"delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI = g;\n"
-"delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI like concat (\'destMD5=\', md5 (g), \'&graphMD5=%\');\n"
+"delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI = g_iri;\n"
+"delete from DB.DBA.SYS_HTTP_SPONGE where HS_LOCAL_IRI like concat (\'destMD5=\', md5 (g_iri), \'&graphMD5=%\');\n"
+"}\n"
+"if (compose_report)\n"
+"{\n"
+"if (txtreport <> \'\')\n"
+"txtreport := txtreport || \'\\n\';\n"
+"txtreport := txtreport || sprintf (\'Clear graph <%s> -- done\', g_iri);\n"
+"}\n"
 "}\n"
 "/*091202 commit work; */\n"
 "log_enable (old_log_enable, 1);\n"
 "if (compose_report)\n"
-"return sprintf (\'Clear <%s> -- done\', g);\n"
-"else\n"
+"return txtreport;\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:5483\n";
+"--src sparql.sql:6586\n";
 
-static const char *proc193 = 
-"#line 5521 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.SPARUL_LOAD (in graph_iri any, in resource varchar, in uid integer, in log_mode integer, in compose_report integer) returns any\n"
+static const char *proc221 = 
+"#line 6641 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_LOAD (in graph_iri any, in resource varchar, in uid integer, in log_mode integer, in compose_report integer, in options any := null, in silent integer := 0) returns any\n"
 "{\n"
 "declare old_log_enable integer;\n"
 "declare grab_params any;\n"
@@ -5726,18 +6862,21 @@ static const char *proc193 =
 "declare res integer;\n"
 "__rgs_assert_cbk (graph_iri, uid, 2, \'SPARUL LOAD\');\n"
 "old_log_enable := log_enable (log_mode, 1);\n"
-"declare exit handler for sqlstate \'*\' { log_enable (old_log_enable, 1); resignal; };\n"
+"declare exit handler for sqlstate \'*\' { log_enable (old_log_enable, 1); if (silent) goto fail; resignal; };\n"
 "grabbed := dict_new();\n"
 "if (isiri_id (graph_iri))\n"
 "graph_iri := id_to_iri (graph_iri);\n"
-"grab_params := vector (\'base_iri\', resource, \'get:destination\', graph_iri,\n"
+"grab_params := vector_concat (vector (\n"
+"\'base_iri\', resource,\n"
+"\'get:destination\', graph_iri,\n"
 "\'resolver\', \'DB.DBA.RDF_GRAB_RESOLVER_DEFAULT\', \'loader\', \'DB.DBA.RDF_SPONGE_UP\',\n"
-"\'get:soft\', \'replacing\',\n"
-"\'get:refresh\', -1,\n"
-"\'get:error-recovery\', \'signal\',\n"
+"\'get:soft\', get_keyword (\'get:soft\', options, \'replacing\'),\n"
+"\'get:refresh\', get_keyword (\'get:refresh\', options, -1),\n"
+"\'get:error-recovery\', get_keyword (\'get:error-recovery\', options, \'signal\'),\n"
 "\n"
-"\'get:strategy\', \'rdfa-only\',\n"
-"\'grabbed\', grabbed );\n"
+"\'get:strategy\', get_keyword (\'get:strategy\', options, \'rdfa-only\'),\n"
+"\'grabbed\', grabbed ),\n"
+"options );\n"
 "commit work;\n"
 "res := DB.DBA.RDF_GRAB_SINGLE (resource, grabbed, grab_params);\n"
 "commit work;\n"
@@ -5756,12 +6895,17 @@ static const char *proc193 =
 "else\n"
 "return 0;\n"
 "}\n"
+"fail:\n"
+"if (compose_report)\n"
+"return sprintf (\'Load silent <%s> into graph <%s> -- failed: %s: %s\', resource, graph_iri, __SQL_STATE, __SQL_MESSAGE);\n"
+"else\n"
+"return 0;\n"
 "}\n"
-"--src sparql.sql:5519\n";
+"--src sparql.sql:6639\n";
 
-static const char *proc194 = 
-"#line 5562 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.SPARUL_CREATE (in graph_iri any, in silent integer, in uid integer, in log_mode integer, in compose_report integer) returns any\n"
+static const char *proc222 = 
+"#line 6690 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_CREATE (in graph_iri any, in silent1 integer, in uid integer, in log_mode integer, in compose_report integer, in options any := null, in silent integer := 0) returns any\n"
 "{\n"
 "declare g_iid IRI_ID;\n"
 "declare old_log_enable integer;\n"
@@ -5769,6 +6913,8 @@ static const char *proc194 =
 "g_iid := iri_to_id (graph_iri);\n"
 "if (__rdf_graph_is_in_enabled_repl (g_iid))\n"
 "repl_text (\'__rdf_repl\', \'sparql define input:storage \"\" create graph iri ( ?? )\', graph_iri);\n"
+"if ((silent1 is not null) and silent1)\n"
+"silent := 1;\n"
 "if (exists (select top 1 1 from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid))\n"
 "{\n"
 "if (silent)\n"
@@ -5809,72 +6955,94 @@ static const char *proc194 =
 "else\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:5560\n";
+"--src sparql.sql:6688\n";
 
-static const char *proc195 = 
-"#line 5612 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.SPARUL_DROP (in graph_iri any, in silent integer, in uid integer, in log_mode integer, in compose_report integer) returns any\n"
+static const char *proc223 = 
+"#line 6742 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_DROP (in graph_iris any, in silent1 integer, in uid integer, in log_mode integer, in compose_report integer, in options any := null, in silent integer := 0) returns any\n"
 "{\n"
 "declare g_iid IRI_ID;\n"
 "declare old_log_enable integer;\n"
-"__rgs_assert_cbk (graph_iri, uid, 2, \'SPARUL DROP GRAPH\');\n"
-"g_iid := iri_to_id (graph_iri);\n"
+"declare txtreport varchar;\n"
+"txtreport := \'\';\n"
+"if ((silent1 is not null) and silent1)\n"
+"silent := 1;\n"
+"if (__tag of vector <> __tag (graph_iris))\n"
+"graph_iris := vector (graph_iris);\n"
+"foreach (any g_iri in graph_iris) do\n"
+"{\n"
+"if (isiri_id (g_iri))\n"
+"g_iri := id_to_iri (g_iri);\n"
+"g_iid := iri_to_id (g_iri);\n"
+"__rgs_assert_cbk (g_iri, uid, 2, \'SPARUL DROP GRAPH\');\n"
+"}\n"
+"foreach (any g_iri in graph_iris) do\n"
+"{\n"
+"if (isiri_id (g_iri))\n"
+"g_iri := id_to_iri (g_iri);\n"
+"g_iid := iri_to_id (g_iri);\n"
 "if (__rdf_graph_is_in_enabled_repl (g_iid))\n"
 "{\n"
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue()\');\n"
-"repl_text (\'__rdf_repl\', \'sparql define input:storage \"\" drop graph iri ( ?? )\', graph_iri);\n"
+"repl_text (\'__rdf_repl\', \'sparql define input:storage \"\" drop graph iri ( ?? )\', g_iri);\n"
 "}\n"
 "old_log_enable := log_enable (log_mode, 1);\n"
 "declare exit handler for sqlstate \'*\' { log_enable (old_log_enable, 1); resignal; };\n"
-"if (not exists (select top 1 1 from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = iri_to_id (graph_iri)))\n"
+"if (not exists (select top 1 1 from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid))\n"
 "{\n"
 "if (silent)\n"
 "{\n"
-"if (exists (select top 1 1 from DB.DBA.RDF_QUAD where G = iri_to_id (graph_iri)))\n"
+"if (exists (select top 1 1 from DB.DBA.RDF_QUAD where G = g_iid))\n"
 "{\n"
-"DB.DBA.SPARUL_CLEAR (graph_iri, 0, uid);\n"
+"DB.DBA.SPARUL_CLEAR (g_iri, 0, uid);\n"
 "log_enable (old_log_enable, 1);\n"
 "if (compose_report)\n"
-"return sprintf (\'Drop silent graph <%s> -- graph has not been explicitly created before, triples were removed\', graph_iri);\n"
+"return sprintf (\'Drop silent graph <%s> -- graph has not been explicitly created before, triples were removed\', g_iri);\n"
 "else\n"
 "return 2;\n"
 "}\n"
 "if (compose_report)\n"
-"return sprintf (\'Drop silent graph <%s> -- nothing to do\', graph_iri);\n"
+"return sprintf (\'Drop silent graph <%s> -- nothing to do\', g_iri);\n"
 "else\n"
 "return 0;\n"
 "}\n"
 "else\n"
-"signal (\'22023\', \'SPARUL_DROP() failed: graph <\' || graph_iri || \'> has not been explicitly created before\');\n"
+"signal (\'22023\', \'SPARUL_DROP() failed: graph <\' || g_iri || \'> has not been explicitly created before\');\n"
 "}\n"
 "if (silent)\n"
 "{\n"
-"DB.DBA.SPARUL_CLEAR (graph_iri, 0, uid);\n"
-"delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = iri_to_id (graph_iri);\n"
+"DB.DBA.SPARUL_CLEAR (g_iri, 0, uid);\n"
+"delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid;\n"
 "/*091202 commit work; */\n"
 "log_enable (old_log_enable, 1);\n"
 "if (compose_report)\n"
-"return sprintf (\'Drop silent graph <%s> -- done\', graph_iri);\n"
+"return sprintf (\'Drop silent graph <%s> -- done\', g_iri);\n"
 "else\n"
 "return 1;\n"
 "}\n"
 "if (exists (sparql define input:storage \"\"\n"
 "ask from <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"where { ?qmv virtrdf:qmGraphRange-rvrFixedValue `iri(?:graph_iri)` } ) )\n"
-"signal (\'22023\', \'SPARUL_CREATE() failed: graph <\' || graph_iri || \'> is used for mapping relational data to RDF\');\n"
-"DB.DBA.SPARUL_CLEAR (graph_iri, 0, uid);\n"
-"delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = iri_to_id (graph_iri);\n"
+"where { ?qmv virtrdf:qmGraphRange-rvrFixedValue `iri(?:g_iri)` } ) )\n"
+"signal (\'22023\', \'SPARUL_DROP() failed: graph <\' || g_iri || \'> is used for mapping relational data to RDF\');\n"
+"DB.DBA.SPARUL_CLEAR (g_iri, 0, uid);\n"
+"delete from DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH where REC_GRAPH_IID = g_iid;\n"
+"if (compose_report)\n"
+"{\n"
+"if (txtreport <> \'\')\n"
+"txtreport := txtreport || \'\\n\';\n"
+"txtreport := txtreport || sprintf (\'Drop graph <%s> -- done\', g_iri);\n"
+"}\n"
+"}\n"
 "log_enable (old_log_enable, 1);\n"
 "/*091202 commit work; */\n"
 "if (compose_report)\n"
-"return sprintf (\'Drop graph <%s> -- done\', graph_iri);\n"
-"else\n"
+"return txtreport;\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:5610\n";
+"--src sparql.sql:6740\n";
 
-static const char *proc196 = 
-"#line 5672 \"[executable]/sparql.sql\"\n"
+static const char *proc224 = 
+"#line 6824 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.SPARUL_RUN (in results any, in compose_report integer := 0) returns any\n"
 "{\n"
 "\n"
@@ -5900,10 +7068,238 @@ static const char *proc196 =
 "return res;\n"
 "}\n"
 "}\n"
-"--src sparql.sql:5670\n";
+"--src sparql.sql:6822\n";
 
-static const char *proc197 = 
-"#line 5699 \"[executable]/sparql.sql\"\n"
+static const char *proc225 = 
+"#line 6853 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT (in dflt_graph_iri any, in quads_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any\n"
+"{\n"
+"declare ins_count, ins_grp_count integer;\n"
+"declare res_ses any;\n"
+"ins_count := 0;\n"
+"ins_grp_count := 0;\n"
+"if (__tag of vector = __tag (dflt_graph_iri))\n"
+"{\n"
+"ins_count := dflt_graph_iri[2];\n"
+"dflt_graph_iri := dflt_graph_iri[0];\n"
+"}\n"
+"while (dict_size (quads_dict) > 0)\n"
+"{\n"
+"declare quads, groups any;\n"
+"declare group_ctr, group_count, g_ins_count integer;\n"
+"quads := dict_destructive_list_rnd_keys (quads_dict, 80000);\n"
+"rowvector_graph_sort (quads, 3, 1);\n"
+"groups := rowvector_graph_partition (quads, 3);\n"
+"group_count := length (groups);\n"
+"for (group_ctr := 0; group_ctr < group_count; group_ctr := group_ctr+1)\n"
+"{\n"
+"declare g_group, g any;\n"
+"g_group := aref_set_0 (groups, group_ctr);\n"
+"g := aref_or_default (g_group, 0, 3, dflt_graph_iri);\n"
+"__rgs_assert_cbk (g, uid, 2, \'SPARQL 1.1 INSERT\');\n"
+"DB.DBA.RDF_INSERT_TRIPLES (g, g_group, log_mode);\n"
+"g_ins_count := length (g_group);\n"
+"ins_count := ins_count + g_ins_count;\n"
+"ins_grp_count := ins_grp_count + 1;\n"
+"if (isiri_id (g))\n"
+"g := id_to_iri (g);\n"
+"if (g is not null and __rdf_graph_is_in_enabled_repl (iri_to_id (g)))\n"
+"repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
+"if (compose_report and ins_grp_count < 1000)\n"
+"{\n"
+"if (group_ctr)\n"
+"http (\'\\n\', res_ses);\n"
+"else\n"
+"res_ses := string_output();\n"
+"http (sprintf (\'Insert into <%s>, %d (or less) quads -- done\', g, g_ins_count), res_ses);\n"
+"}\n"
+"}\n"
+"}\n"
+"if (compose_report)\n"
+"{\n"
+"if (ins_grp_count >= 1000)\n"
+"return sprintf (\'Insert into %d (or more) graphs, total %d (or less) quads -- done\', ins_grp_count, ins_count);\n"
+"if (ins_count)\n"
+"return string_output_string (res_ses);\n"
+"else\n"
+"return sprintf (\'Insert into <%s>, 0 quads -- nothing to do\', dflt_graph_iri);\n"
+"}\n"
+"else\n"
+"return ins_count;\n"
+"}\n"
+"--src sparql.sql:6851\n";
+
+static const char *proc226 = 
+"#line 6911 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT (in dflt_graph_iri any, in quads_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any\n"
+"{\n"
+"declare del_count, del_grp_count integer;\n"
+"declare res_ses any;\n"
+"del_count := 0;\n"
+"del_grp_count := 0;\n"
+"if (__tag of vector = __tag (dflt_graph_iri))\n"
+"{\n"
+"del_count := dflt_graph_iri[2];\n"
+"dflt_graph_iri := dflt_graph_iri[0];\n"
+"}\n"
+"while (dict_size (quads_dict) > 0)\n"
+"{\n"
+"declare quads, groups any;\n"
+"declare group_ctr, group_count, g_del_count integer;\n"
+"quads := dict_destructive_list_rnd_keys (quads_dict, 80000);\n"
+"rowvector_graph_sort (quads, 3, 1);\n"
+"groups := rowvector_graph_partition (quads, 3);\n"
+"group_count := length (groups);\n"
+"for (group_ctr := 0; group_ctr < group_count; group_ctr := group_ctr+1)\n"
+"{\n"
+"declare g_group, g any;\n"
+"g_group := aref_set_0 (groups, group_ctr);\n"
+"g := aref_or_default (g_group, 0, 3, dflt_graph_iri);\n"
+"__rgs_assert_cbk (g, uid, 2, \'SPARQL 1.1L DELETE\');\n"
+"DB.DBA.RDF_DELETE_TRIPLES (g, g_group, log_mode);\n"
+"g_del_count := length (g_group);\n"
+"del_count := del_count + g_del_count;\n"
+"del_grp_count := del_grp_count + 1;\n"
+"if (isiri_id (g))\n"
+"g := id_to_iri (g);\n"
+"if (g is not null and __rdf_graph_is_in_enabled_repl (iri_to_id (g)))\n"
+"repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
+"if (compose_report and del_grp_count < 1000)\n"
+"{\n"
+"if (group_ctr)\n"
+"http (\'\\n\', res_ses);\n"
+"else\n"
+"res_ses := string_output();\n"
+"http (sprintf (\'Delete from <%s>, %d (or less) quads -- done\', g, g_del_count), res_ses);\n"
+"}\n"
+"}\n"
+"}\n"
+"if (compose_report)\n"
+"{\n"
+"if (del_grp_count >= 1000)\n"
+"return sprintf (\'Delete from %d (or more) graphs, total %d (or less) quads -- done\', del_grp_count, del_count);\n"
+"if (del_count)\n"
+"return string_output_string (res_ses);\n"
+"else\n"
+"return sprintf (\'Delete from <%s>, 0 quads -- nothing to do\', dflt_graph_iri);\n"
+"}\n"
+"else\n"
+"return del_count;\n"
+"}\n"
+"--src sparql.sql:6909\n";
+
+static const char *proc227 = 
+"#line 6968 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS (in dflt_graph_iri any, in del_quads_dict any, in ins_quads_dict any, in uid integer, in log_mode integer := null, in compose_report integer := 0) returns any\n"
+"{\n"
+"declare del_count, ins_count integer;\n"
+"declare del_rep, ins_rep any;\n"
+"del_count := 0;\n"
+"ins_count := 0;\n"
+"if (__tag of vector = __tag (dflt_graph_iri))\n"
+"{\n"
+"del_count := dflt_graph_iri[1];\n"
+"ins_count := dflt_graph_iri[2];\n"
+"dflt_graph_iri := dflt_graph_iri[0];\n"
+"}\n"
+"if (del_quads_dict is not null)\n"
+"{\n"
+"del_count := del_count + dict_size (del_quads_dict);\n"
+"del_rep := DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT (dflt_graph_iri, del_quads_dict, uid, log_mode, compose_report);\n"
+"}\n"
+"else if (compose_report)\n"
+"del_rep := \'\';\n"
+"else\n"
+"del_rep := 0;\n"
+"if (ins_quads_dict is not null)\n"
+"{\n"
+"ins_count := ins_count + dict_size (ins_quads_dict);\n"
+"ins_rep := DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT (dflt_graph_iri, ins_quads_dict, uid, log_mode, compose_report);\n"
+"}\n"
+"else if (compose_report)\n"
+"ins_rep := \'\';\n"
+"else\n"
+"ins_rep := 0;\n"
+"if (compose_report)\n"
+"return concat (del_rep, case when ins_rep <> \'\' and del_rep <> \'\' then \'\\n\' else \'\' end, ins_rep);\n"
+"else\n"
+"return del_count + ins_count;\n"
+"}\n"
+"--src sparql.sql:6966\n";
+
+static const char *proc228 = 
+"#line 7005 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_COPYMOVEADD_IMPL (in opname varchar, in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any\n"
+"{\n"
+"declare src_g_iid IRI_ID;\n"
+"declare tgt_g_iid IRI_ID;\n"
+"declare old_log_enable, src_repl, tgt_repl integer;\n"
+"declare qry, stat, msg varchar;\n"
+"if (isiri_id (src_g_iri))\n"
+"src_g_iri := id_to_iri (src_g_iri);\n"
+"src_g_iid := iri_to_id (src_g_iri);\n"
+"if (isiri_id (tgt_g_iri))\n"
+"tgt_g_iri := id_to_iri (tgt_g_iri);\n"
+"tgt_g_iid := iri_to_id (tgt_g_iri);\n"
+"__rgs_assert_cbk (tgt_g_iri, uid, 2, \'SPARQL 1.1 \' || opname);\n"
+"__rgs_assert_cbk (src_g_iri, uid, case (opname) when \'MOVE\' then 2 else 1 end, \'SPARQL 1.1 \' || opname);\n"
+"src_repl := __rdf_graph_is_in_enabled_repl (src_g_iid);\n"
+"tgt_repl := __rdf_graph_is_in_enabled_repl (tgt_g_iid);\n"
+"if (src_repl and not tgt_repl)\n"
+"signal (\'22023\', sprintf (\'SPARQL 1.1 can not %s replicated graph <%s> to non-replicated graph <%s>, both should be in same replication status\', src_g_iri, tgt_g_iri));\n"
+"if (tgt_repl and not src_repl)\n"
+"signal (\'22023\', sprintf (\'SPARQL 1.1 can not %s non-replicated graph <%s> to replicated graph <%s>, both should be in same replication status\', src_g_iri, tgt_g_iri));\n"
+"if (\'ADD\' <> opname)\n"
+"DB.DBA.SPARUL_CLEAR (tgt_g_iri, 0, uid, log_mode, 0, options, silent);\n"
+"if (src_repl and tgt_repl)\n"
+"{\n"
+"repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue()\');\n"
+"repl_text (\'__rdf_repl\', \'sparql define input:storage \"\" add iri( ?? ) to iri( ?? )\', src_g_iri, tgt_g_iri);\n"
+"}\n"
+"old_log_enable := log_enable (log_mode, 1);\n"
+"declare exit handler for sqlstate \'*\' { log_enable (old_log_enable, 1); resignal; };\n"
+"stat := \'00000\';\n"
+"qry := sprintf (\'insert soft DB.DBA.RDF_QUAD (G,S,P,O) select __i2id (\'\'%S\'\'), t.S, t.P, t.O from DB.DBA.RDF_QUAD t where t.G = __i2id (\'\'%S\'\') \',\n"
+"tgt_g_iri, src_g_iri );\n"
+"exec (qry, stat, msg);\n"
+"if (stat <> \'00000\')\n"
+"signal (stat, msg);\n"
+"if (\'MOVE\' = opname)\n"
+"DB.DBA.SPARUL_CLEAR (src_g_iri, 0, uid, log_mode, 0, options, silent);\n"
+"/*091202 commit work; */\n"
+"log_enable (old_log_enable, 1);\n"
+"if (compose_report)\n"
+"return sprintf (\'%s <%s> to <%s> -- done\', opname, src_g_iri, tgt_g_iri);\n"
+"return 1;\n"
+"}\n"
+"--src sparql.sql:7003\n";
+
+static const char *proc229 = 
+"#line 7050 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_COPY (in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any\n"
+"{\n"
+"return DB.DBA.SPARUL_COPYMOVEADD_IMPL (\'COPY\', src_g_iri, tgt_g_iri, uid, log_mode, compose_report, options, silent);\n"
+"}\n"
+"--src sparql.sql:7048\n";
+
+static const char *proc230 = 
+"#line 7056 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_MOVE (in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any\n"
+"{\n"
+"return DB.DBA.SPARUL_COPYMOVEADD_IMPL (\'MOVE\', src_g_iri, tgt_g_iri, uid, log_mode, compose_report, options, silent);\n"
+"}\n"
+"--src sparql.sql:7054\n";
+
+static const char *proc231 = 
+"#line 7062 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.SPARUL_ADD (in src_g_iri any, in tgt_g_iri any, in uid integer := 0, in log_mode integer := null, in compose_report integer := 0, in options any := null, in silent integer := 0) returns any\n"
+"{\n"
+"return DB.DBA.SPARUL_COPYMOVEADD_IMPL (\'ADD\', src_g_iri, tgt_g_iri, uid, log_mode, compose_report, options, silent);\n"
+"}\n"
+"--src sparql.sql:7060\n";
+
+static const char *proc232 = 
+"#line 7068 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS (in return_iris integer := 1, in lim integer := 2000000000)\n"
 "{\n"
 "declare specials, specials_vec any;\n"
@@ -5990,10 +7386,10 @@ static const char *proc197 =
 "else\n"
 "result (specials[ctr]);\n"
 "}\n"
-"--src sparql.sql:5697\n";
+"--src sparql.sql:7066\n";
 
-static const char *proc198 = 
-"#line 5791 \"[executable]/sparql.sql\"\n"
+static const char *proc233 = 
+"#line 7160 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_REGEX (in s varchar, in p varchar, in coll varchar := null)\n"
 "{\n"
 "if (not iswidestring (s) and not isstring (s))\n"
@@ -6002,10 +7398,10 @@ static const char *proc198 =
 "return 1;\n"
 "return 0;\n"
 "}\n"
-"--src sparql.sql:5789\n";
+"--src sparql.sql:7158\n";
 
-static const char *proc199 = 
-"#line 5802 \"[executable]/sparql.sql\"\n"
+static const char *proc234 = 
+"#line 7171 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_LANGMATCHES (in r varchar, in t varchar)\n"
 "{\n"
 "if ((t is null) or (r is null))\n"
@@ -6024,18 +7420,18 @@ static const char *proc199 =
 "return 1;\n"
 "return 0;\n"
 "}\n"
-"--src sparql.sql:5800\n";
+"--src sparql.sql:7169\n";
 
-static const char *proc200 = 
-"#line 5823 \"[executable]/sparql.sql\"\n"
+static const char *proc235 = 
+"#line 7192 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.BEST_LANGMATCH_INIT (inout env any)\n"
 "{\n"
 "env := vector (0, -2);\n"
 "}\n"
-"--src sparql.sql:5821\n";
+"--src sparql.sql:7190\n";
 
-static const char *proc201 = 
-"#line 5830 \"[executable]/sparql.sql\"\n"
+static const char *proc236 = 
+"#line 7199 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.BEST_LANGMATCH_ACC (inout env any, inout obj any, in range varchar, in dflt_lang varchar)\n"
 "{\n"
 "declare lang varchar;\n"
@@ -6072,17 +7468,17 @@ static const char *proc201 =
 "if (env[1] < pct)\n"
 "env := vector (obj, pct);\n"
 "}\n"
-"--src sparql.sql:5828\n";
+"--src sparql.sql:7197\n";
 
-static const char *proc202 = 
-"#line 5869 \"[executable]/sparql.sql\"\n"
+static const char *proc237 = 
+"#line 7238 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.BEST_LANGMATCH_FINAL (inout env any) returns any\n"
 "{\n"
 "if (__tag (env) <> __tag of vector)\n"
 "return null;\n"
 "return env[0];\n"
 "}\n"
-"--src sparql.sql:5867\n";
+"--src sparql.sql:7236\n";
 
 static const char *other31 = 
 " create aggregate DB.DBA.BEST_LANGMATCH (inout obj any, in range varchar, in dflt_lang varchar) from\n"
@@ -6090,16 +7486,16 @@ static const char *other31 =
 "DB.DBA.BEST_LANGMATCH_ACC,\n"
 "DB.DBA.BEST_LANGMATCH_FINAL\n";
 
-static const char *proc203 = 
-"#line 5885 \"[executable]/sparql.sql\"\n"
+static const char *proc238 = 
+"#line 7254 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_CONSTRUCT_INIT (inout _env any)\n"
 "{\n"
 "_env := 0;\n"
 "}\n"
-"--src sparql.sql:5883\n";
+"--src sparql.sql:7252\n";
 
-static const char *proc204 = 
-"#line 5892 \"[executable]/sparql.sql\"\n"
+static const char *proc239 = 
+"#line 7261 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.SPARQL_CONSTRUCT_ACC (inout _env any, in opcodes any, in vars any, in stats any, in use_dict_limit integer)\n"
 "{\n"
 "declare triple_ctr integer;\n"
@@ -6116,11 +7512,22 @@ static const char *proc204 =
 "blank_ids := 0;\n"
 "for (triple_ctr := length (opcodes) - 1; triple_ctr >= 0; triple_ctr := triple_ctr-1)\n"
 "{\n"
-"declare fld_ctr integer;\n"
+"declare fld_ctr, fld_count integer;\n"
 "declare triple_vec any;\n"
+"declare g_opcode integer;\n"
+"g_opcode := aref_or_default (opcodes, triple_ctr, 6, null);\n"
+"if (g_opcode is null)\n"
+"{\n"
+"fld_count := 3;\n"
 "triple_vec := vector (0,0,0);\n"
+"}\n"
+"else\n"
+"{\n"
+"fld_count := 4;\n"
+"triple_vec := vector (0,0,0,0);\n"
+"}\n"
 "\n"
-"for (fld_ctr := 2; fld_ctr >= 0; fld_ctr := fld_ctr - 1)\n"
+"for (fld_ctr := fld_count - 1; fld_ctr >= 0; fld_ctr := fld_ctr - 1)\n"
 "{\n"
 "declare op integer;\n"
 "declare arg any;\n"
@@ -6134,16 +7541,16 @@ static const char *proc204 =
 "goto end_of_adding_triple;\n"
 "if (isiri_id (i))\n"
 "{\n"
-"if ((1 = fld_ctr) and is_bnode_iri_id (i))\n"
-"signal (\'RDF01\', \'Bad variable value in CONSTRUCT: blank node can not be used as predicate\');\n"
+"if (fld_ctr in (1,3) and is_bnode_iri_id (i))\n"
+"signal (\'RDF01\', \'Bad variable value in CONSTRUCT: blank node can not be used as predicate or graph\');\n"
 "}\n"
 "else if ((isstring (i) and (1 = __box_flags (i))) or (217 = __tag(i)))\n"
 "{\n"
-"if ((1 = fld_ctr) and (i like \'bnode://%\'))\n"
-"signal (\'RDF01\', \'Bad variable value in CONSTRUCT: blank node can not be used as predicate\');\n"
+"if (fld_ctr in (1,3) and (i like \'bnode://%\'))\n"
+"signal (\'RDF01\', \'Bad variable value in CONSTRUCT: blank node can not be used as predicate or graph\');\n"
 "i := iri_to_id (i);\n"
 "}\n"
-"else if (2 > fld_ctr)\n"
+"else if (2 <> fld_ctr)\n"
 "signal (\'RDF01\',\n"
 "sprintf (\'Bad variable value in CONSTRUCT: \"%.100s\" (tag %d box flags %d) is not a valid %s, only object of a triple can be a literal\',\n"
 "__tag (i), __box_flags (i),\n"
@@ -6157,8 +7564,8 @@ static const char *proc204 =
 "blank_ids := vector (iri_id_from_num (sequence_next (\'RDF_URL_IID_BLANK\')));\n"
 "while (arg >= length (blank_ids))\n"
 "blank_ids := vector_concat (blank_ids, vector (iri_id_from_num (sequence_next (\'RDF_URL_IID_BLANK\'))));\n"
-"if (1 = fld_ctr)\n"
-"signal (\'RDF01\', \'Bad triple for CONSTRUCT: blank node can not be used as predicate\');\n"
+"if (fld_ctr in (1,3))\n"
+"signal (\'RDF01\', \'Bad triple for CONSTRUCT: blank node can not be used as predicate or graph\');\n"
 "triple_vec[fld_ctr] := blank_ids[arg];\n"
 "}\n"
 "else if (3 = op)\n"
@@ -6168,16 +7575,16 @@ static const char *proc204 =
 "\n"
 "if (isiri_id (arg))\n"
 "{\n"
-"if ((1 = fld_ctr) and is_bnode_iri_id (arg))\n"
-"signal (\'RDF01\', \'Bad const value in CONSTRUCT: blank node can not be used as predicate\');\n"
+"if (fld_ctr in (1,3) and is_bnode_iri_id (arg))\n"
+"signal (\'RDF01\', \'Bad const value in CONSTRUCT: blank node can not be used as predicate or graph\');\n"
 "}\n"
 "else if ((isstring (arg) and (1 = __box_flags (arg))) or (217 = __tag(arg)))\n"
 "{\n"
-"if ((1 = fld_ctr) and (arg like \'bnode://%\'))\n"
-"signal (\'RDF01\', \'Bad const value in CONSTRUCT: blank node can not be used as predicate\');\n"
+"if (fld_ctr in (1,3) and (arg like \'bnode://%\'))\n"
+"signal (\'RDF01\', \'Bad const value in CONSTRUCT: blank node can not be used as predicate or graph\');\n"
 "arg := iri_to_id (arg);\n"
 "}\n"
-"else if (2 > fld_ctr)\n"
+"else if (2 <> fld_ctr)\n"
 "signal (\'RDF01\',\n"
 "sprintf (\'Bad const value in CONSTRUCT: \"%.100s\" (tag %d box flags %d) is not a valid %s, only object of a triple can be a literal\',\n"
 "__tag (arg), __box_flags (arg),\n"
@@ -6190,83 +7597,398 @@ static const char *proc204 =
 "else signal (\'RDFXX\', \'Bad opcode in DB.DBA.SPARQL_CONSTRUCT()\');\n"
 "}\n"
 "\n"
-"dict_put (_env, triple_vec, 0);\n"
-"end_of_adding_triple: ;\n"
+"dict_put (_env, triple_vec, 0);\n"
+"end_of_adding_triple: ;\n"
+"}\n"
+"}\n"
+"--src sparql.sql:7259\n";
+
+static const char *proc240 = 
+"#line 7369 \"[executable]/sparql.sql\"\n"
+" create procedure DB.DBA.SPARQL_CONSTRUCT_FIN (inout _env any)\n"
+"{\n"
+"if (214 <> __tag(_env))\n"
+"_env := dict_new ();\n"
+"return _env;\n"
+"}\n"
+"--src sparql.sql:7367\n";
+
+static const char *other32 = 
+" create aggregate DB.DBA.SPARQL_CONSTRUCT (in opcodes any, in vars any, in stats any, in use_dict_limit integer) returns any\n"
+"from DB.DBA.SPARQL_CONSTRUCT_INIT, DB.DBA.SPARQL_CONSTRUCT_ACC, DB.DBA.SPARQL_CONSTRUCT_FIN\n";
+
+static const char *proc241 = 
+"#line 7382 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_AGG_INIT (inout _env any)\n"
+"{\n"
+"_env := 0;\n"
+"}\n"
+"--src sparql.sql:7380\n";
+
+static const char *proc242 = 
+"#line 7388 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_AGG_ACC (inout _env any, in vars any)\n"
+"{\n"
+"declare var_ctr integer;\n"
+"declare blank_ids any;\n"
+"if (214 <> __tag(_env))\n"
+"{\n"
+"_env := dict_new (31, sys_stat (\'sparql_result_set_max_rows\'), sys_stat (\'sparql_max_mem_in_use\'));\n"
+"}\n"
+"for (var_ctr := length (vars) - 1; var_ctr >= 0; var_ctr := var_ctr - 1)\n"
+"{\n"
+"declare i any;\n"
+"i := vars[var_ctr];\n"
+"if (isiri_id (i))\n"
+"dict_put (_env, i, 0);\n"
+"}\n"
+"}\n"
+"--src sparql.sql:7386\n";
+
+static const char *proc243 = 
+"#line 7406 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_AGG_FIN (inout _env any)\n"
+"{\n"
+"declare subjects, options, res any;\n"
+"declare subj_ctr integer;\n"
+"if (214 <> __tag(_env))\n"
+"return dict_new ();\n"
+"return _env;\n"
+"}\n"
+"--src sparql.sql:7404\n";
+
+static const char *other33 = 
+"create aggregate DB.DBA.SPARQL_DESC_AGG (in vars any) returns any\n"
+"from DB.DBA.SPARQL_DESC_AGG_INIT, DB.DBA.SPARQL_DESC_AGG_ACC, DB.DBA.SPARQL_DESC_AGG_FIN\n";
+
+static const char *proc244 = 
+"#line 7420 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+"{\n"
+"declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;\n"
+"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;\n"
+"declare gs_app_callback, gs_app_uid, inf_ruleset, sameas varchar;\n"
+"declare rdf_type_iid IRI_ID;\n"
+"uid := get_keyword (\'uid\', options, http_nobody_uid());\n"
+"gs_app_callback := get_keyword (\'gs-app-callback\', options);\n"
+"if (gs_app_callback is not null)\n"
+"gs_app_uid := get_keyword (\'gs-app-uid\', options);\n"
+"inf_ruleset := get_keyword (\'inference\', options);\n"
+"sameas := get_keyword (\'same-as\', options);\n"
+"rdf_type_iid := iri_to_id (UNAME\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\');\n"
+"res := dict_new ();\n"
+"if (isinteger (consts))\n"
+"return res;\n"
+"foreach (any c in consts) do\n"
+"{\n"
+"if (isiri_id (c))\n"
+"dict_put (subj_dict, c, 0);\n"
+"}\n"
+"all_subj_descs := dict_list_keys (subj_dict, 1);\n"
+"all_s_count := length (all_subj_descs);\n"
+"if (0 = all_s_count)\n"
+"return res;\n"
+"gvector_sort (all_subj_descs, 1, 0, 0);\n"
+"if (__tag of integer = __tag (good_graphs))\n"
+"graphs_listed := 0;\n"
+"else\n"
+"{\n"
+"vectorbld_init (sorted_good_graphs);\n"
+"foreach (any g in good_graphs) do\n"
+"{\n"
+"if (isiri_id (g) and g < min_bnode_iri_id () and\n"
+"__rgs_ack_cbk (g, uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )\n"
+"vectorbld_acc (sorted_good_graphs, g);\n"
+"}\n"
+"vectorbld_final (sorted_good_graphs);\n"
+"good_g_count := length (sorted_good_graphs);\n"
+"if (0 = good_g_count)\n"
+"return res;\n"
+"graphs_listed := 1;\n"
+"}\n"
+"vectorbld_init (sorted_bad_graphs);\n"
+"foreach (any g in bad_graphs) do\n"
+"{\n"
+"if (isiri_id (g) and g < min_bnode_iri_id ())\n"
+"vectorbld_acc (sorted_bad_graphs, g);\n"
+"}\n"
+"vectorbld_final (sorted_bad_graphs);\n"
+"bad_g_count := length (sorted_bad_graphs);\n"
+"vectorbld_init (phys_subjects);\n"
+"if (storage_name is null)\n"
+"storage_name := \'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage\';\n"
+"else if ((\'\' = storage_name) and (inf_ruleset is null) and (sameas is null))\n"
+"{\n"
+"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"{\n"
+"declare s, phys_s any;\n"
+"s := all_subj_descs [s_ctr];\n"
+"if (isiri_id (s))\n"
+"vectorbld_acc (phys_subjects, s);\n"
+"else\n"
+"{\n"
+"phys_s := iri_to_id (s, 0, 0);\n"
+"if (not isinteger (phys_s))\n"
+"vectorbld_acc (phys_subjects, phys_s);\n"
+"}\n"
+"}\n"
+"vectorbld_final (phys_subjects);\n"
+"goto describe_physical_subjects;\n"
+"}\n"
+"\n"
+"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"{\n"
+"declare s, phys_s, maps_s, maps_o any;\n"
+"declare maps_s_len, maps_o_len integer;\n"
+"s := all_subj_descs [s_ctr];\n"
+"maps_s := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);\n"
+"maps_o := sparql_quad_maps_for_quad (NULL, NULL, NULL, s, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);\n"
+"\n"
+"maps_s_len := length (maps_s);\n"
+"maps_o_len := length (maps_o);\n"
+"if ((inf_ruleset is null) and (sameas is null))\n"
+"{\n"
+"declare phys_as_s, phys_as_o integer;\n"
+"phys_as_s := case when ((maps_s_len > 0) and (maps_s[maps_s_len-1][0] = UNAME\'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap\')) then 1 else 0 end;\n"
+"phys_as_o := case when ((maps_o_len > 0) and (maps_o[maps_o_len-1][0] = UNAME\'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap\')) then 1 else 0 end;\n"
+"if (phys_as_s or phys_as_o)\n"
+"{\n"
+"if (isiri_id (s))\n"
+"{\n"
+"phys_s := s;\n"
+"vectorbld_acc (phys_subjects, phys_s);\n"
+"}\n"
+"else\n"
+"{\n"
+"phys_s := iri_to_id (s, 0, 0);\n"
+"if (not isinteger (phys_s))\n"
+"vectorbld_acc (phys_subjects, phys_s);\n"
+"}\n"
+"if (phys_as_s)\n"
+"{\n"
+"maps_s := subseq (maps_s, 0, maps_s_len-1);\n"
+"maps_s_len := maps_s_len - 1;\n"
+"}\n"
+"if (phys_as_o)\n"
+"{\n"
+"maps_o := subseq (maps_o, 0, maps_o_len-1);\n"
+"maps_o_len := maps_o_len - 1;\n"
+"}\n"
+"}\n"
+"}\n"
+"if ((maps_s_len > 0) or (maps_o_len > 0))\n"
+"all_subj_descs [s_ctr] := vector (s, maps_s, maps_o);\n"
+"else\n"
+"all_subj_descs [s_ctr] := 0;\n"
+"\n"
+"\n"
+"}\n"
+"vectorbld_final (phys_subjects);\n"
+"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"{\n"
+"declare s_desc, s, maps_s, maps_o any;\n"
+"declare map_ctr, maps_s_len, maps_o_len integer;\n"
+"declare fname varchar;\n"
+"s_desc := all_subj_descs [s_ctr];\n"
+"if (isinteger (s_desc))\n"
+"goto end_of_s;\n"
+"s := s_desc[0];\n"
+"maps_s := s_desc[1];\n"
+"maps_o := s_desc[2];\n"
+"maps_s_len := length (maps_s);\n"
+"maps_o_len := length (maps_o);\n"
+"fname := sprintf (\'SPARQL_DESC_DICT_QMV1_%U\', md5 (storage_name || \' \' || inf_ruleset || \' \' || sameas || \' \' || cast (graphs_listed as varchar) || md5_box (maps_s) || md5_box (maps_o) || md5_box (sorted_bad_graphs)));\n"
+"if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = \'DB.DBA.\' || fname))\n"
+"{\n"
+"declare ses, txt, saved_user any;\n"
+"ses := string_output ();\n"
+"http (\'create procedure DB.DBA.\"\' || fname || \'\" (in subj any, in res any\', ses);\n"
+"if (graphs_listed)\n"
+"http (\', inout sorted_good_graphs any\', ses);\n"
+"http (\')\\n\', ses);\n"
+"http (\'{\\n\', ses);\n"
+"http (\'  declare subj_iri varchar;\\n\', ses);\n"
+"http (\'  subj_iri := id_to_iri_nosignal (subj);\\n\', ses);\n"
+"http (\'  for (sparql define output:valmode \"LONG\" define input:storage <\' || storage_name || \'> \', ses);\n"
+"foreach (any g in sorted_bad_graphs) do\n"
+"{\n"
+"http (\'  define input:named-graph-exclude <\' || id_to_iri_nosignal (g) || \'>\\n\', ses);\n"
+"}\n"
+"if (inf_ruleset is not null)\n"
+"http (\'  define input:inference <\' || inf_ruleset || \'>\\n\', ses);\n"
+"if (sameas is not null)\n"
+"http (\'  define input:same-as <\' || sameas || \'>\\n\', ses);\n"
+"http (\'select ?g1 ?p1 ?o1\\n\', ses);\n"
+"http (\'      where { graph ?g1 {\\n\', ses);\n"
+"for (map_ctr := 0; map_ctr < maps_s_len; map_ctr := map_ctr + 1)\n"
+"{\n"
+"if (map_ctr > 0) http (\'              union\\n\', ses);\n"
+"http (\'              { quad map <\' || maps_s[map_ctr][0] || \'> { ?:subj_iri ?p1 ?o1 } }\\n\', ses);\n"
+"}\n"
+"http (\'            } } ) do {\\n\', ses);\n"
+"if (graphs_listed)\n"
+"http (\'      if (position (__i2idn (\"g1\"), sorted_good_graphs))\\n\', ses);\n"
+"http (\'      dict_bitor_or_put (res, vector (subj, \"p1\", \"o1\"), 1); }\\n\', ses);\n"
+"http (\'  for (sparql define output:valmode \"LONG\" define input:storage <\' || storage_name || \'> \', ses);\n"
+"foreach (any g in sorted_bad_graphs) do\n"
+"{\n"
+"http (\'  define input:named-graph-exclude <\' || id_to_iri_nosignal (g) || \'>\\n\', ses);\n"
+"}\n"
+"if (inf_ruleset is not null)\n"
+"http (\'  define input:inference <\' || inf_ruleset || \'>\\n\', ses);\n"
+"if (sameas is not null)\n"
+"http (\'  define input:same-as <\' || sameas || \'>\\n\', ses);\n"
+"http (\'select ?g1 ?s1 ?p1\\n\', ses);\n"
+"http (\'      where { graph ?g1 {\\n\', ses);\n"
+"for (map_ctr := 0; map_ctr < maps_o_len; map_ctr := map_ctr + 1)\n"
+"{\n"
+"if (map_ctr > 0) http (\'              union\\n\', ses);\n"
+"http (\'              { quad map <\' || maps_o[map_ctr][0] || \'> { ?s1 ?p1 ?o1 . FILTER (?p1 != rdf:type) . FILTER(isREF (?o1)) . FILTER (?o1 = iri(?:subj_iri)) } }\\n\', ses);\n"
+"}\n"
+"http (\'            } } ) do {\\n\', ses);\n"
+"if (graphs_listed)\n"
+"http (\'      if (position (__i2idn (\"g1\"), sorted_good_graphs))\\n\', ses);\n"
+"http (\'      dict_bitor_or_put (res, vector (\"s1\", \"p1\", subj), 4); }\\n\', ses);\n"
+"http (\'  }\\n\', ses);\n"
+"txt := string_output_string (ses);\n"
+"\n"
+"saved_user := user;\n"
+"set_user_id (\'dba\', 1);\n"
+"exec (txt);\n"
+"set_user_id (saved_user);\n"
+"}\n"
+"if (graphs_listed)\n"
+"{\n"
+"\n"
+"call (\'DB.DBA.\' || fname)(s, res, sorted_good_graphs);\n"
+"}\n"
+"else\n"
+"{\n"
+"\n"
+"call (\'DB.DBA.\' || fname)(s, res);\n"
+"}\n"
+"end_of_s: ;\n"
+"}\n"
+"\n"
+"describe_physical_subjects:\n"
+"gvector_sort (phys_subjects, 1, 0, 0);\n"
+"phys_s_count := length (phys_subjects);\n"
+"\n"
+"if (0 = phys_s_count)\n"
+"return res;\n"
+"\n"
+"if (graphs_listed)\n"
+"{\n"
+"gvector_sort (sorted_good_graphs, 1, 0, 0);\n"
+"\n"
+"for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)\n"
+"{\n"
+"declare graph any;\n"
+"graph := sorted_good_graphs [g_ctr];\n"
+"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"{\n"
+"declare subj any;\n"
+"subj := phys_subjects [s_ctr];\n"
+"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
+"{\n"
+"\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"}\n"
+"for (select S as s1, P as p1 from DB.DBA.RDF_QUAD\n"
+"where G = graph and O = subj and P <> rdf_type_iid\n"
+"option (QUIETCAST)) do\n"
+"{\n"
+"\n"
+"dict_bitor_or_put (res, vector (s1, p1, subj), 4);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:5890\n";
-
-static const char *proc205 = 
-"#line 5989 \"[executable]/sparql.sql\"\n"
-" create procedure DB.DBA.SPARQL_CONSTRUCT_FIN (inout _env any)\n"
+"}\n"
+"return res;\n"
+"}\n"
+"g_dict := dict_new ();\n"
+"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
 "{\n"
-"if (214 <> __tag(_env))\n"
-"_env := dict_new ();\n"
-"return _env;\n"
+"declare subj, graph any;\n"
+"subj := phys_subjects [s_ctr];\n"
+"graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where O = subj and\n"
+"0 = position (G, sorted_bad_graphs) and\n"
+"__rgs_ack_cbk (G, uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );\n"
+"if (graph is not null)\n"
+"dict_put (g_dict, graph, 0);\n"
 "}\n"
-"--src sparql.sql:5987\n";
-
-static const char *other32 = 
-" create aggregate DB.DBA.SPARQL_CONSTRUCT (in opcodes any, in vars any, in stats any, in use_dict_limit integer) returns any\n"
-"from DB.DBA.SPARQL_CONSTRUCT_INIT, DB.DBA.SPARQL_CONSTRUCT_ACC, DB.DBA.SPARQL_CONSTRUCT_FIN\n";
-
-static const char *proc206 = 
-"#line 6002 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_AGG_INIT (inout _env any)\n"
+"sorted_good_graphs := dict_list_keys (g_dict, 1);\n"
+"if (0 = length (sorted_good_graphs))\n"
 "{\n"
-"_env := 0;\n"
+"g_dict := dict_new ();\n"
+"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"{\n"
+"declare subj, graph any;\n"
+"subj := phys_subjects [s_ctr];\n"
+"graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where S = subj and P = rdf_type_iid and\n"
+"0 = position (G, sorted_bad_graphs) and\n"
+"__rgs_ack_cbk (G, uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );\n"
+"if (graph is not null)\n"
+"dict_put (g_dict, graph, 0);\n"
 "}\n"
-"--src sparql.sql:6000\n";
-
-static const char *proc207 = 
-"#line 6008 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_AGG_ACC (inout _env any, in vars any)\n"
+"sorted_good_graphs := dict_list_keys (g_dict, 1);\n"
+"}\n"
+"\n"
+"gvector_sort (sorted_good_graphs, 1, 0, 0);\n"
+"good_g_count := length (sorted_good_graphs);\n"
+"\n"
+"for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)\n"
 "{\n"
-"declare var_ctr integer;\n"
-"declare blank_ids any;\n"
-"if (214 <> __tag(_env))\n"
+"declare graph any;\n"
+"graph := sorted_good_graphs [g_ctr];\n"
+"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
 "{\n"
-"_env := dict_new (31, sys_stat (\'sparql_result_set_max_rows\'), sys_stat (\'sparql_max_mem_in_use\'));\n"
+"declare subj any;\n"
+"subj := phys_subjects [s_ctr];\n"
+"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
+"{\n"
+"\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
 "}\n"
-"for (var_ctr := length (vars) - 1; var_ctr >= 0; var_ctr := var_ctr - 1)\n"
+"for (select S as s1, P as p1 from DB.DBA.RDF_QUAD\n"
+"where G = graph and O = subj and P <> rdf_type_iid\n"
+"option (QUIETCAST)) do\n"
 "{\n"
-"declare i any;\n"
-"i := vars[var_ctr];\n"
-"if (isiri_id (i))\n"
-"dict_put (_env, i, 0);\n"
+"\n"
+"dict_bitor_or_put (res, vector (s1, p1, subj), 4);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:6006\n";
-
-static const char *proc208 = 
-"#line 6026 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_AGG_FIN (inout _env any)\n"
-"{\n"
-"declare subjects, options, res any;\n"
-"declare subj_ctr integer;\n"
-"if (214 <> __tag(_env))\n"
-"return dict_new ();\n"
-"return _env;\n"
 "}\n"
-"--src sparql.sql:6024\n";
-
-static const char *other33 = 
-"create aggregate DB.DBA.SPARQL_DESC_AGG (in vars any) returns any\n"
-"from DB.DBA.SPARQL_DESC_AGG_INIT, DB.DBA.SPARQL_DESC_AGG_ACC, DB.DBA.SPARQL_DESC_AGG_FIN\n";
+"\n"
+"return res;\n"
+"}\n"
+"--src sparql.sql:7418\n";
 
-static const char *proc209 = 
-"#line 6040 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_DICT (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+static const char *proc245 = 
+"#line 7732 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
 "{\n"
-"declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;\n"
+"declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, res any;\n"
 "declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;\n"
-"declare gs_app_callback, gs_app_uid, inf_ruleset varchar;\n"
+"declare gs_app_callback, gs_app_uid, inf_ruleset, sameas varchar;\n"
 "declare rdf_type_iid IRI_ID;\n"
 "uid := get_keyword (\'uid\', options, http_nobody_uid());\n"
 "gs_app_callback := get_keyword (\'gs-app-callback\', options);\n"
 "if (gs_app_callback is not null)\n"
 "gs_app_uid := get_keyword (\'gs-app-uid\', options);\n"
 "inf_ruleset := get_keyword (\'inference\', options);\n"
+"sameas := get_keyword (\'same-as\', options);\n"
 "rdf_type_iid := iri_to_id (UNAME\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\');\n"
 "res := dict_new ();\n"
 "if (isinteger (consts))\n"
@@ -6308,9 +8030,9 @@ static const char *proc209 =
 "vectorbld_final (sorted_bad_graphs);\n"
 "bad_g_count := length (sorted_bad_graphs);\n"
 "vectorbld_init (phys_subjects);\n"
-"if (isinteger (storage_name))\n"
+"if (storage_name is null)\n"
 "storage_name := \'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage\';\n"
-"else if ((\'\' = storage_name) and (inf_ruleset is null))\n"
+"else if ((\'\' = storage_name) and (inf_ruleset is null) and (sameas is null))\n"
 "{\n"
 "for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
 "{\n"
@@ -6337,7 +8059,7 @@ static const char *proc209 =
 "maps := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);\n"
 "\n"
 "maps_len := length (maps);\n"
-"if ((maps_len > 0) and (inf_ruleset is null) and (maps[maps_len-1][0] = UNAME\'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap\'))\n"
+"if ((maps_len > 0) and (inf_ruleset is null) and (sameas is null) and (maps[maps_len-1][0] = UNAME\'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap\'))\n"
 "{\n"
 "if (isiri_id (s))\n"
 "{\n"
@@ -6372,7 +8094,7 @@ static const char *proc209 =
 "s := s_desc[0];\n"
 "maps := s_desc[1];\n"
 "maps_len := length (maps);\n"
-"fname := sprintf (\'SPARQL_DESC_DICT_QMV1_%U\', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));\n"
+"fname := sprintf (\'SPARQL_DESC_DICT_QMV1_%U\', md5 (storage_name || \' \' || inf_ruleset || \' \' || sameas || \' \' || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));\n"
 "if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = \'DB.DBA.\' || fname))\n"
 "{\n"
 "declare ses, txt, saved_user any;\n"
@@ -6391,6 +8113,8 @@ static const char *proc209 =
 "}\n"
 "if (inf_ruleset is not null)\n"
 "http (\'  define input:inference <\' || inf_ruleset || \'>\\n\', ses);\n"
+"if (sameas is not null)\n"
+"http (\'  define input:same-as <\' || sameas || \'>\\n\', ses);\n"
 "http (\'select ?g1 ?p1 ?o1\\n\', ses);\n"
 "http (\'      where { graph ?g1 {\\n\', ses);\n"
 "for (map_ctr := 0; map_ctr < maps_len; map_ctr := map_ctr + 1)\n"
@@ -6401,7 +8125,7 @@ static const char *proc209 =
 "http (\'            } } ) do {\\n\', ses);\n"
 "if (graphs_listed)\n"
 "http (\'      if (position (__i2idn (\"g1\"), sorted_good_graphs))\\n\', ses);\n"
-"http (\'      dict_put (res, vector (subj, \"p1\", \"o1\"), 1); } }\\n\', ses);\n"
+"http (\'      dict_bitor_or_put (res, vector (subj, \"p1\", \"o1\"), 1); } }\\n\', ses);\n"
 "txt := string_output_string (ses);\n"
 "\n"
 "saved_user := user;\n"
@@ -6444,14 +8168,119 @@ static const char *proc209 =
 "for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
 "}\n"
-"for (select S as s1, P as p1 from DB.DBA.RDF_QUAD\n"
-"where G = graph and O = subj and P <> rdf_type_iid\n"
-"option (QUIETCAST)) do\n"
+"}\n"
+"}\n"
+"return res;\n"
+"}\n"
+"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"{\n"
+"declare subj any;\n"
+"subj := phys_subjects [s_ctr];\n"
+"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where\n"
+"0 = position (G, sorted_bad_graphs) and\n"
+"S = subj and\n"
+"__rgs_ack_cbk (G, uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do\n"
+"{\n"
+"\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"}\n"
+"}\n"
+"return res;\n"
+"}\n"
+"--src sparql.sql:7730\n";
+
+static const char *proc246 = 
+"#line 7947 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+"{\n"
+"declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;\n"
+"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;\n"
+"declare gs_app_callback, gs_app_uid varchar;\n"
+"declare rdf_type_iid IRI_ID;\n"
+"uid := get_keyword (\'uid\', options, http_nobody_uid());\n"
+"gs_app_callback := get_keyword (\'gs-app-callback\', options);\n"
+"if (gs_app_callback is not null)\n"
+"gs_app_uid := get_keyword (\'gs-app-uid\', options);\n"
+"rdf_type_iid := iri_to_id (UNAME\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\');\n"
+"res := dict_new ();\n"
+"if (isinteger (consts))\n"
+"return res;\n"
+"foreach (any c in consts) do\n"
+"{\n"
+"if (isiri_id (c))\n"
+"dict_put (subj_dict, c, 0);\n"
+"}\n"
+"all_subj_descs := dict_list_keys (subj_dict, 1);\n"
+"all_s_count := length (all_subj_descs);\n"
+"if (0 = all_s_count)\n"
+"return res;\n"
+"gvector_sort (all_subj_descs, 1, 0, 0);\n"
+"if (__tag of integer = __tag (good_graphs))\n"
+"graphs_listed := 0;\n"
+"else\n"
+"{\n"
+"vectorbld_init (sorted_good_graphs);\n"
+"foreach (any g in good_graphs) do\n"
+"{\n"
+"if (isiri_id (g) and g < min_bnode_iri_id () and\n"
+"__rgs_ack_cbk (g, uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )\n"
+"vectorbld_acc (sorted_good_graphs, g);\n"
+"}\n"
+"vectorbld_final (sorted_good_graphs);\n"
+"good_g_count := length (sorted_good_graphs);\n"
+"if (0 = good_g_count)\n"
+"return res;\n"
+"graphs_listed := 1;\n"
+"}\n"
+"vectorbld_init (sorted_bad_graphs);\n"
+"foreach (any g in bad_graphs) do\n"
+"{\n"
+"if (isiri_id (g) and g < min_bnode_iri_id ())\n"
+"vectorbld_acc (sorted_bad_graphs, g);\n"
+"}\n"
+"vectorbld_final (sorted_bad_graphs);\n"
+"bad_g_count := length (sorted_bad_graphs);\n"
+"vectorbld_init (phys_subjects);\n"
+"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"{\n"
+"declare s, phys_s any;\n"
+"s := all_subj_descs [s_ctr];\n"
+"if (isiri_id (s))\n"
+"vectorbld_acc (phys_subjects, s);\n"
+"else\n"
+"{\n"
+"phys_s := iri_to_id (s, 0, 0);\n"
+"if (not isinteger (phys_s))\n"
+"vectorbld_acc (phys_subjects, phys_s);\n"
+"}\n"
+"}\n"
+"vectorbld_final (phys_subjects);\n"
+"gvector_sort (phys_subjects, 1, 0, 0);\n"
+"phys_s_count := length (phys_subjects);\n"
+"\n"
+"if (0 = phys_s_count)\n"
+"return res;\n"
+"\n"
+"if (graphs_listed)\n"
+"{\n"
+"gvector_sort (sorted_good_graphs, 1, 0, 0);\n"
+"\n"
+"for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)\n"
+"{\n"
+"declare graph any;\n"
+"graph := sorted_good_graphs [g_ctr];\n"
+"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"{\n"
+"declare subj any;\n"
+"subj := phys_subjects [s_ctr];\n"
+"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (s1, p1, subj), 1);\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
 "}\n"
 "}\n"
 "}\n"
@@ -6501,7 +8330,7 @@ static const char *proc209 =
 "for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
 "\n"
 "\n"
 "\n"
@@ -6512,25 +8341,25 @@ static const char *proc209 =
 "\n"
 "\n"
 "}\n"
-"for (select S as s1, P as p1 from DB.DBA.RDF_QUAD\n"
-"where G = graph and O = subj and P <> rdf_type_iid\n"
-"option (QUIETCAST)) do\n"
-"{\n"
 "\n"
-"dict_put (res, vector (s1, p1, subj), 1);\n"
-"}\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
 "}\n"
 "}\n"
 "\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:6038\n";
+"--src sparql.sql:7945\n";
 
-static const char *proc210 = 
-"#line 6310 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_DICT_SPO (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+static const char *proc247 = 
+"#line 8108 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_CBD (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
 "{\n"
-"declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, res any;\n"
+"declare all_subjs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;\n"
 "declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;\n"
 "declare gs_app_callback, gs_app_uid, inf_ruleset varchar;\n"
 "declare rdf_type_iid IRI_ID;\n"
@@ -6548,11 +8377,16 @@ static const char *proc210 =
 "if (isiri_id (c))\n"
 "dict_put (subj_dict, c, 0);\n"
 "}\n"
-"all_subj_descs := dict_list_keys (subj_dict, 1);\n"
-"all_s_count := length (all_subj_descs);\n"
+"all_subjs := dict_list_keys (subj_dict, 0);\n"
+"next_iter_subjs := dict_new ();\n"
+"all_s_count := length (all_subjs);\n"
 "if (0 = all_s_count)\n"
 "return res;\n"
-"gvector_sort (all_subj_descs, 1, 0, 0);\n"
+"\n"
+"next_iteration:\n"
+"all_s_count := length (all_subjs);\n"
+"gvector_sort (all_subjs, 1, 0, 0);\n"
+"\n"
 "if (__tag of integer = __tag (good_graphs))\n"
 "graphs_listed := 0;\n"
 "else\n"
@@ -6580,14 +8414,14 @@ static const char *proc210 =
 "vectorbld_final (sorted_bad_graphs);\n"
 "bad_g_count := length (sorted_bad_graphs);\n"
 "vectorbld_init (phys_subjects);\n"
-"if (isinteger (storage_name))\n"
+"if (storage_name is null)\n"
 "storage_name := \'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage\';\n"
 "else if ((\'\' = storage_name) and (inf_ruleset is null))\n"
 "{\n"
 "for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
 "{\n"
 "declare s, phys_s any;\n"
-"s := all_subj_descs [s_ctr];\n"
+"s := all_subjs [s_ctr];\n"
 "if (isiri_id (s))\n"
 "vectorbld_acc (phys_subjects, s);\n"
 "else\n"
@@ -6605,7 +8439,7 @@ static const char *proc210 =
 "{\n"
 "declare s, phys_s, maps any;\n"
 "declare maps_len integer;\n"
-"s := all_subj_descs [s_ctr];\n"
+"s := all_subjs [s_ctr];\n"
 "maps := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);\n"
 "\n"
 "maps_len := length (maps);\n"
@@ -6626,9 +8460,9 @@ static const char *proc210 =
 "maps_len := maps_len - 1;\n"
 "}\n"
 "if (maps_len > 0)\n"
-"all_subj_descs [s_ctr] := vector (s, maps);\n"
+"all_subjs [s_ctr] := vector (s, maps);\n"
 "else\n"
-"all_subj_descs [s_ctr] := 0;\n"
+"all_subjs [s_ctr] := 0;\n"
 "\n"
 "\n"
 "}\n"
@@ -6638,18 +8472,18 @@ static const char *proc210 =
 "declare s_desc, s, maps any;\n"
 "declare map_ctr, maps_len integer;\n"
 "declare fname varchar;\n"
-"s_desc := all_subj_descs [s_ctr];\n"
+"s_desc := all_subjs [s_ctr];\n"
 "if (isinteger (s_desc))\n"
 "goto end_of_s;\n"
 "s := s_desc[0];\n"
 "maps := s_desc[1];\n"
 "maps_len := length (maps);\n"
-"fname := sprintf (\'SPARQL_DESC_DICT_QMV1_%U\', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));\n"
+"fname := sprintf (\'SPARQL_DESC_DICT_CBD_QMV1_%U\', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));\n"
 "if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = \'DB.DBA.\' || fname))\n"
 "{\n"
 "declare ses, txt, saved_user any;\n"
 "ses := string_output ();\n"
-"http (\'create procedure DB.DBA.\"\' || fname || \'\" (in subj any, in res any\', ses);\n"
+"http (\'create procedure DB.DBA.\"\' || fname || \'\" (in subj any, in subj_dict any, in next_iter_subjs any, in res any\', ses);\n"
 "if (graphs_listed)\n"
 "http (\', inout sorted_good_graphs any\', ses);\n"
 "http (\')\\n\', ses);\n"
@@ -6663,17 +8497,29 @@ static const char *proc210 =
 "}\n"
 "if (inf_ruleset is not null)\n"
 "http (\'  define input:inference <\' || inf_ruleset || \'>\\n\', ses);\n"
-"http (\'select ?g1 ?p1 ?o1\\n\', ses);\n"
+"http (\'select ?g1 ?p1 ?o1 ?g2 ?st2\\n\', ses);\n"
 "http (\'      where { graph ?g1 {\\n\', ses);\n"
 "for (map_ctr := 0; map_ctr < maps_len; map_ctr := map_ctr + 1)\n"
 "{\n"
 "if (map_ctr > 0) http (\'              union\\n\', ses);\n"
 "http (\'              { quad map <\' || maps[map_ctr][0] || \'> { ?:subj_iri ?p1 ?o1 } }\\n\', ses);\n"
 "}\n"
-"http (\'            } } ) do {\\n\', ses);\n"
+"http (\'            }\\n\', ses);\n"
+"http (\'          optional { graph ?g2 {\\n\', ses);\n"
+"http (\'                  ?st2 a rdf:Statement ; rdf:subject ?:subj_iri ; rdf:predicate ?p1 ; rdf:object ?o1 } }\\n\', ses);\n"
+"http (\'            } ) do {\\n\', ses);\n"
 "if (graphs_listed)\n"
-"http (\'      if (position (__i2idn (\"g1\"), sorted_good_graphs))\\n\', ses);\n"
-"http (\'      dict_put (res, vector (subj, \"p1\", \"o1\"), 1); } }\\n\', ses);\n"
+"http (\'      if (position (__i2idn (\"g1\"), sorted_good_graphs)) {\\n\', ses);\n"
+"http (\'      dict_bitor_or_put (res, vector (subj, \"p1\", \"o1\"), 1);\\n\', ses);\n"
+"http (\'      if (isiri_id (\"o1\") and \"o1\" > min_bnode_iri_id() and dict_get (subj_dict, \"o1\") is null)\\n\', ses);\n"
+"http (\'        dict_put (next_iter_subjs, \"o1\", 1);\\n\', ses);\n"
+"if (graphs_listed)\n"
+"http (\'      if (position (__i2idn (\"g2\"), sorted_good_graphs)) {\\n\', ses);\n"
+"http (\'      if (\"st2\" is not null and dict_get (subj_dict, \"st2\") is null)\\n\', ses);\n"
+"http (\'        dict_put (next_iter_subjs, \"o1\", 1);\\n\', ses);\n"
+"if (graphs_listed)\n"
+"http (\'        } }\\n\', ses);\n"
+"http (\'      } }\\n\', ses);\n"
 "txt := string_output_string (ses);\n"
 "\n"
 "saved_user := user;\n"
@@ -6684,12 +8530,12 @@ static const char *proc210 =
 "if (graphs_listed)\n"
 "{\n"
 "\n"
-"call (\'DB.DBA.\' || fname)(s, res, sorted_good_graphs);\n"
+"call (\'DB.DBA.\' || fname)(s, subj_dict, next_iter_subjs, res, sorted_good_graphs);\n"
 "}\n"
 "else\n"
 "{\n"
 "\n"
-"call (\'DB.DBA.\' || fname)(s, res);\n"
+"call (\'DB.DBA.\' || fname)(s, subj_dict, next_iter_subjs, res);\n"
 "}\n"
 "end_of_s: ;\n"
 "}\n"
@@ -6716,12 +8562,23 @@ static const char *proc210 =
 "for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
+"dict_put (next_iter_subjs, obj1, 1);\n"
+"for (sparql define output:valmode \"LONG\"\n"
+"select ?g2 ?st2 where {\n"
+"graph ?g2 {\n"
+"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"{\n"
+"if (position (\"g2\", sorted_good_graphs) and dict_get (subj_dict, \"st2\") is null)\n"
+"dict_put (next_iter_subjs, \"st2\", 1);\n"
+"}\n"
 "}\n"
 "}\n"
 "}\n"
-"return res;\n"
 "}\n"
+"else\n"
+"{\n"
 "for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
 "{\n"
 "declare subj any;\n"
@@ -6733,19 +8590,41 @@ static const char *proc210 =
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
+"dict_put (next_iter_subjs, obj1, 1);\n"
+"for (sparql define output:valmode \"LONG\"\n"
+"select ?g2 ?st2 where {\n"
+"graph ?g2 {\n"
+"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"{\n"
+"if (0 = position (\"g2\", sorted_bad_graphs) and\n"
+"dict_get (subj_dict, \"st2\") is null and\n"
+"__rgs_ack_cbk (\"g2\", uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (\"g2\", gs_app_uid))) )\n"
+"dict_put (next_iter_subjs, \"st2\", 1);\n"
+"}\n"
+"}\n"
 "}\n"
 "}\n"
+"ret_or_next_iter:\n"
+"if (0 = dict_size (next_iter_subjs))\n"
+"{\n"
+"\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:6308\n";
+"all_subjs := dict_list_keys (next_iter_subjs, 1);\n"
+"foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);\n"
+"goto next_iteration;\n"
+"}\n"
+"--src sparql.sql:8106\n";
 
-static const char *proc211 = 
-"#line 6522 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+static const char *proc248 = 
+"#line 8370 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
 "{\n"
-"declare all_subj_descs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, g_dict, res any;\n"
-"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;\n"
+"declare all_subjs, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;\n"
+"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count integer;\n"
 "declare gs_app_callback, gs_app_uid varchar;\n"
 "declare rdf_type_iid IRI_ID;\n"
 "uid := get_keyword (\'uid\', options, http_nobody_uid());\n"
@@ -6761,11 +8640,16 @@ static const char *proc211 =
 "if (isiri_id (c))\n"
 "dict_put (subj_dict, c, 0);\n"
 "}\n"
-"all_subj_descs := dict_list_keys (subj_dict, 1);\n"
-"all_s_count := length (all_subj_descs);\n"
+"all_subjs := dict_list_keys (subj_dict, 0);\n"
+"next_iter_subjs := dict_new ();\n"
+"all_s_count := length (all_subjs);\n"
 "if (0 = all_s_count)\n"
 "return res;\n"
-"gvector_sort (all_subj_descs, 1, 0, 0);\n"
+"\n"
+"next_iteration:\n"
+"all_s_count := length (all_subjs);\n"
+"gvector_sort (all_subjs, 1, 0, 0);\n"
+"\n"
 "if (__tag of integer = __tag (good_graphs))\n"
 "graphs_listed := 0;\n"
 "else\n"
@@ -6792,25 +8676,8 @@ static const char *proc211 =
 "}\n"
 "vectorbld_final (sorted_bad_graphs);\n"
 "bad_g_count := length (sorted_bad_graphs);\n"
-"vectorbld_init (phys_subjects);\n"
-"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
-"{\n"
-"declare s, phys_s any;\n"
-"s := all_subj_descs [s_ctr];\n"
-"if (isiri_id (s))\n"
-"vectorbld_acc (phys_subjects, s);\n"
-"else\n"
-"{\n"
-"phys_s := iri_to_id (s, 0, 0);\n"
-"if (not isinteger (phys_s))\n"
-"vectorbld_acc (phys_subjects, phys_s);\n"
-"}\n"
-"}\n"
-"vectorbld_final (phys_subjects);\n"
-"gvector_sort (phys_subjects, 1, 0, 0);\n"
-"phys_s_count := length (phys_subjects);\n"
 "\n"
-"if (0 = phys_s_count)\n"
+"if (0 = all_s_count)\n"
 "return res;\n"
 "\n"
 "if (graphs_listed)\n"
@@ -6821,94 +8688,77 @@ static const char *proc211 =
 "{\n"
 "declare graph any;\n"
 "graph := sorted_good_graphs [g_ctr];\n"
-"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
 "{\n"
 "declare subj any;\n"
-"subj := phys_subjects [s_ctr];\n"
+"subj := all_subjs [s_ctr];\n"
 "for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
+"dict_put (next_iter_subjs, obj1, 1);\n"
+"for (sparql define output:valmode \"LONG\"\n"
+"select ?g2 ?st2 where {\n"
+"graph ?g2 {\n"
+"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"{\n"
+"if (position (\"g2\", sorted_good_graphs) and dict_get (subj_dict, \"st2\") is null)\n"
+"dict_put (next_iter_subjs, \"st2\", 1);\n"
 "}\n"
 "}\n"
 "}\n"
-"return res;\n"
 "}\n"
-"g_dict := dict_new ();\n"
-"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
-"{\n"
-"declare subj, graph any;\n"
-"subj := phys_subjects [s_ctr];\n"
-"graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where O = subj and\n"
-"0 = position (G, sorted_bad_graphs) and\n"
-"__rgs_ack_cbk (G, uid, 1) and\n"
-"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );\n"
-"if (graph is not null)\n"
-"dict_put (g_dict, graph, 0);\n"
 "}\n"
-"sorted_good_graphs := dict_list_keys (g_dict, 1);\n"
-"if (0 = length (sorted_good_graphs))\n"
+"else\n"
 "{\n"
-"g_dict := dict_new ();\n"
-"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
 "{\n"
-"declare subj, graph any;\n"
-"subj := phys_subjects [s_ctr];\n"
-"graph := coalesce ((select top 1 G as g1 from DB.DBA.RDF_QUAD where S = subj and P = rdf_type_iid and\n"
+"declare subj any;\n"
+"subj := all_subjs [s_ctr];\n"
+"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where\n"
 "0 = position (G, sorted_bad_graphs) and\n"
+"S = subj and\n"
 "__rgs_ack_cbk (G, uid, 1) and\n"
-"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) );\n"
-"if (graph is not null)\n"
-"dict_put (g_dict, graph, 0);\n"
-"}\n"
-"sorted_good_graphs := dict_list_keys (g_dict, 1);\n"
-"}\n"
-"\n"
-"gvector_sort (sorted_good_graphs, 1, 0, 0);\n"
-"good_g_count := length (sorted_good_graphs);\n"
-"\n"
-"for (g_ctr := good_g_count - 1; g_ctr >= 0; g_ctr := g_ctr - 1)\n"
-"{\n"
-"declare graph any;\n"
-"graph := sorted_good_graphs [g_ctr];\n"
-"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
-"{\n"
-"declare subj any;\n"
-"subj := phys_subjects [s_ctr];\n"
-"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
+"dict_bitor_or_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 1);\n"
+"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
+"dict_put (next_iter_subjs, obj1, 1);\n"
+"for (sparql define output:valmode \"LONG\"\n"
+"select ?g2 ?st2 where {\n"
+"graph ?g2 {\n"
+"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"{\n"
+"if (0 = position (\"g2\", sorted_bad_graphs) and\n"
+"dict_get (subj_dict, \"st2\") is null and\n"
+"__rgs_ack_cbk (\"g2\", uid, 1) and\n"
+"(gs_app_callback is null or bit_and (1, call (gs_app_callback) (\"g2\", gs_app_uid))) )\n"
+"dict_put (next_iter_subjs, \"st2\", 1);\n"
 "}\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
 "}\n"
 "}\n"
+"}\n"
+"\n"
+"ret_or_next_iter:\n"
+"if (0 = dict_size (next_iter_subjs))\n"
+"{\n"
 "\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:6520\n";
+"all_subjs := dict_list_keys (next_iter_subjs, 1);\n"
+"foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);\n"
+"goto next_iteration;\n"
+"}\n"
+"--src sparql.sql:8368\n";
 
-static const char *proc212 = 
-"#line 6683 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_DICT_CBD (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+static const char *proc249 = 
+"#line 8502 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_OBJCBD (in obj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
 "{\n"
-"declare all_subjs, phys_subjects, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;\n"
-"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count, phys_s_count integer;\n"
+"declare all_objs, phys_objects, sorted_good_graphs, sorted_bad_graphs, next_iter_objs, res any;\n"
+"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, obj_ctr, all_obj_count, phys_obj_count integer;\n"
 "declare gs_app_callback, gs_app_uid, inf_ruleset varchar;\n"
 "declare rdf_type_iid IRI_ID;\n"
 "uid := get_keyword (\'uid\', options, http_nobody_uid());\n"
@@ -6922,18 +8772,18 @@ static const char *proc212 =
 "return res;\n"
 "foreach (any c in consts) do\n"
 "{\n"
-"if (isiri_id (c))\n"
-"dict_put (subj_dict, c, 0);\n"
+"if (not isnumeric (c))\n"
+"dict_put (obj_dict, c, 0);\n"
 "}\n"
-"all_subjs := dict_list_keys (subj_dict, 0);\n"
-"next_iter_subjs := dict_new ();\n"
-"all_s_count := length (all_subjs);\n"
-"if (0 = all_s_count)\n"
+"all_objs := dict_list_keys (obj_dict, 0);\n"
+"next_iter_objs := dict_new ();\n"
+"all_obj_count := length (all_objs);\n"
+"if (0 = all_obj_count)\n"
 "return res;\n"
 "\n"
 "next_iteration:\n"
-"all_s_count := length (all_subjs);\n"
-"gvector_sort (all_subjs, 1, 0, 0);\n"
+"all_obj_count := length (all_objs);\n"
+"gvector_sort (all_objs, 1, 0, 0);\n"
 "\n"
 "if (__tag of integer = __tag (good_graphs))\n"
 "graphs_listed := 0;\n"
@@ -6942,7 +8792,7 @@ static const char *proc212 =
 "vectorbld_init (sorted_good_graphs);\n"
 "foreach (any g in good_graphs) do\n"
 "{\n"
-"if (isiri_id (g) and g < min_bnode_iri_id () and\n"
+"if (is_named_iri_id (g) and\n"
 "__rgs_ack_cbk (g, uid, 1) and\n"
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )\n"
 "vectorbld_acc (sorted_good_graphs, g);\n"
@@ -6956,88 +8806,94 @@ static const char *proc212 =
 "vectorbld_init (sorted_bad_graphs);\n"
 "foreach (any g in bad_graphs) do\n"
 "{\n"
-"if (isiri_id (g) and g < min_bnode_iri_id ())\n"
+"if (is_named_iri_id (g))\n"
 "vectorbld_acc (sorted_bad_graphs, g);\n"
 "}\n"
 "vectorbld_final (sorted_bad_graphs);\n"
 "bad_g_count := length (sorted_bad_graphs);\n"
-"vectorbld_init (phys_subjects);\n"
-"if (isinteger (storage_name))\n"
+"vectorbld_init (phys_objects);\n"
+"if (storage_name is null)\n"
 "storage_name := \'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage\';\n"
 "else if ((\'\' = storage_name) and (inf_ruleset is null))\n"
 "{\n"
-"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"for (obj_ctr := 0; obj_ctr < all_obj_count; obj_ctr := obj_ctr + 1)\n"
 "{\n"
-"declare s, phys_s any;\n"
-"s := all_subjs [s_ctr];\n"
-"if (isiri_id (s))\n"
-"vectorbld_acc (phys_subjects, s);\n"
+"declare obj, phys_obj any;\n"
+"obj := all_objs [obj_ctr];\n"
+"if (not isnumeric (obj))\n"
+"{\n"
+"if (isiri_id (obj))\n"
+"vectorbld_acc (phys_objects, obj);\n"
 "else\n"
 "{\n"
-"phys_s := iri_to_id (s, 0, 0);\n"
-"if (not isinteger (phys_s))\n"
-"vectorbld_acc (phys_subjects, phys_s);\n"
+"phys_obj := iri_to_id (obj, 0, 0);\n"
+"if (not isinteger (phys_obj))\n"
+"vectorbld_acc (phys_objects, phys_obj);\n"
 "}\n"
 "}\n"
-"vectorbld_final (phys_subjects);\n"
-"goto describe_physical_subjects;\n"
+"}\n"
+"vectorbld_final (phys_objects);\n"
+"goto describe_physical_objects;\n"
 "}\n"
 "\n"
-"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"for (obj_ctr := 0; obj_ctr < all_obj_count; obj_ctr := obj_ctr + 1)\n"
 "{\n"
-"declare s, phys_s, maps any;\n"
+"declare obj, phys_obj, maps any;\n"
 "declare maps_len integer;\n"
-"s := all_subjs [s_ctr];\n"
-"maps := sparql_quad_maps_for_quad (NULL, s, NULL, NULL, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);\n"
+"obj := all_objs [obj_ctr];\n"
+"maps := sparql_quad_maps_for_quad (NULL, NULL, NULL, obj, storage_name, case (graphs_listed) when 0 then vector() else sorted_good_graphs end, sorted_bad_graphs);\n"
 "\n"
 "maps_len := length (maps);\n"
 "if ((maps_len > 0) and (inf_ruleset is null) and (maps[maps_len-1][0] = UNAME\'http://www.openlinksw.com/schemas/virtrdf#DefaultQuadMap\'))\n"
 "{\n"
-"if (isiri_id (s))\n"
+"if (not isnumeric (obj))\n"
 "{\n"
-"phys_s := s;\n"
-"vectorbld_acc (phys_subjects, phys_s);\n"
+"if (isiri_id (obj))\n"
+"{\n"
+"phys_obj := obj;\n"
+"vectorbld_acc (phys_objects, phys_obj);\n"
 "}\n"
 "else\n"
 "{\n"
-"phys_s := iri_to_id (s, 0, 0);\n"
-"if (not isinteger (phys_s))\n"
-"vectorbld_acc (phys_subjects, phys_s);\n"
+"phys_obj := iri_to_id (obj, 0, 0);\n"
+"if (not isinteger (phys_obj))\n"
+"vectorbld_acc (phys_objects, phys_obj);\n"
+"}\n"
 "}\n"
 "maps := subseq (maps, 0, maps_len-1);\n"
 "maps_len := maps_len - 1;\n"
 "}\n"
 "if (maps_len > 0)\n"
-"all_subjs [s_ctr] := vector (s, maps);\n"
+"all_objs [obj_ctr] := vector (obj, maps);\n"
 "else\n"
-"all_subjs [s_ctr] := 0;\n"
+"all_objs [obj_ctr] := 0;\n"
 "\n"
 "\n"
 "}\n"
-"vectorbld_final (phys_subjects);\n"
-"for (s_ctr := 0; s_ctr < all_s_count; s_ctr := s_ctr + 1)\n"
+"vectorbld_final (phys_objects);\n"
+"for (obj_ctr := 0; obj_ctr < all_obj_count; obj_ctr := obj_ctr + 1)\n"
 "{\n"
-"declare s_desc, s, maps any;\n"
+"declare s_desc, obj, maps any;\n"
 "declare map_ctr, maps_len integer;\n"
 "declare fname varchar;\n"
-"s_desc := all_subjs [s_ctr];\n"
+"s_desc := all_objs [obj_ctr];\n"
 "if (isinteger (s_desc))\n"
 "goto end_of_s;\n"
-"s := s_desc[0];\n"
+"obj := s_desc[0];\n"
 "maps := s_desc[1];\n"
 "maps_len := length (maps);\n"
-"fname := sprintf (\'SPARQL_DESC_DICT_CBD_QMV1_%U\', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));\n"
+"fname := sprintf (\'SPARQL_DESC_DICT_OBJCBD_QMV1_%U\', md5 (storage_name || inf_ruleset || cast (graphs_listed as varchar) || md5_box (maps) || md5_box (sorted_bad_graphs)));\n"
 "if (not exists (select top 1 1 from Db.DBA.SYS_PROCEDURES where P_NAME = \'DB.DBA.\' || fname))\n"
 "{\n"
 "declare ses, txt, saved_user any;\n"
 "ses := string_output ();\n"
-"http (\'create procedure DB.DBA.\"\' || fname || \'\" (in subj any, in subj_dict any, in next_iter_subjs any, in res any\', ses);\n"
+"http (\'create procedure DB.DBA.\"\' || fname || \'\" (in obj any, in obj_dict any, in next_iter_objs any, in res any\', ses);\n"
 "if (graphs_listed)\n"
 "http (\', inout sorted_good_graphs any\', ses);\n"
 "http (\')\\n\', ses);\n"
 "http (\'{\\n\', ses);\n"
-"http (\'  declare subj_iri varchar;\\n\', ses);\n"
-"http (\'  subj_iri := id_to_iri_nosignal (subj);\\n\', ses);\n"
+"http (\'  declare obj_iri varchar;\\n\', ses);\n"
+"http (\'  obj_iri := id_to_iri_nosignal (obj);\\n\', ses);\n"
 "http (\'  for (sparql define output:valmode \"LONG\" define input:storage <\' || storage_name || \'> \', ses);\n"
 "foreach (any g in sorted_bad_graphs) do\n"
 "{\n"
@@ -7045,26 +8901,26 @@ static const char *proc212 =
 "}\n"
 "if (inf_ruleset is not null)\n"
 "http (\'  define input:inference <\' || inf_ruleset || \'>\\n\', ses);\n"
-"http (\'select ?g1 ?p1 ?o1 ?g2 ?st2\\n\', ses);\n"
+"http (\'select ?g1 ?p1 ?s1 ?g2 ?st2\\n\', ses);\n"
 "http (\'      where { graph ?g1 {\\n\', ses);\n"
 "for (map_ctr := 0; map_ctr < maps_len; map_ctr := map_ctr + 1)\n"
 "{\n"
 "if (map_ctr > 0) http (\'              union\\n\', ses);\n"
-"http (\'              { quad map <\' || maps[map_ctr][0] || \'> { ?:subj_iri ?p1 ?o1 } }\\n\', ses);\n"
+"http (\'              { quad map <\' || maps[map_ctr][0] || \'> { ?s1 ?p1 ?:obj_iri } }\\n\', ses);\n"
 "}\n"
 "http (\'            }\\n\', ses);\n"
 "http (\'          optional { graph ?g2 {\\n\', ses);\n"
-"http (\'                  ?st2 a rdf:Statement ; rdf:subject ?:subj_iri ; rdf:predicate ?p1 ; rdf:object ?o1 } }\\n\', ses);\n"
+"http (\'                  ?st2 a rdf:Statement ; rdf:object ?:obj_iri ; rdf:predicate ?p1 ; rdf:subject ?s1 } }\\n\', ses);\n"
 "http (\'            } ) do {\\n\', ses);\n"
 "if (graphs_listed)\n"
 "http (\'      if (position (__i2idn (\"g1\"), sorted_good_graphs)) {\\n\', ses);\n"
-"http (\'      dict_put (res, vector (subj, \"p1\", \"o1\"), 1);\\n\', ses);\n"
-"http (\'      if (isiri_id (\"o1\") and \"o1\" > min_bnode_iri_id() and dict_get (subj_dict, \"o1\") is null)\\n\', ses);\n"
-"http (\'        dict_put (next_iter_subjs, \"o1\", 1);\\n\', ses);\n"
+"http (\'      dict_bitor_or_put (res, vector (\"s1\", \"p1\", obj), 1);\\n\', ses);\n"
+"http (\'      if (is_bnode_iri_id (\"s1\") and dict_get (obj_dict, \"s1\") is null)\\n\', ses);\n"
+"http (\'        dict_put (next_iter_objs, \"s1\", 1);\\n\', ses);\n"
 "if (graphs_listed)\n"
 "http (\'      if (position (__i2idn (\"g2\"), sorted_good_graphs)) {\\n\', ses);\n"
-"http (\'      if (\"st2\" is not null and dict_get (subj_dict, \"st2\") is null)\\n\', ses);\n"
-"http (\'        dict_put (next_iter_subjs, \"o1\", 1);\\n\', ses);\n"
+"http (\'      if (\"st2\" is not null and dict_get (obj_dict, \"st2\") is null)\\n\', ses);\n"
+"http (\'        dict_put (next_iter_objs, \"s1\", 1);\\n\', ses);\n"
 "if (graphs_listed)\n"
 "http (\'        } }\\n\', ses);\n"
 "http (\'      } }\\n\', ses);\n"
@@ -7078,21 +8934,21 @@ static const char *proc212 =
 "if (graphs_listed)\n"
 "{\n"
 "\n"
-"call (\'DB.DBA.\' || fname)(s, subj_dict, next_iter_subjs, res, sorted_good_graphs);\n"
+"call (\'DB.DBA.\' || fname)(obj, obj_dict, next_iter_objs, res, sorted_good_graphs);\n"
 "}\n"
 "else\n"
 "{\n"
 "\n"
-"call (\'DB.DBA.\' || fname)(s, subj_dict, next_iter_subjs, res);\n"
+"call (\'DB.DBA.\' || fname)(obj, obj_dict, next_iter_objs, res);\n"
 "}\n"
 "end_of_s: ;\n"
 "}\n"
 "\n"
-"describe_physical_subjects:\n"
-"gvector_sort (phys_subjects, 1, 0, 0);\n"
-"phys_s_count := length (phys_subjects);\n"
+"describe_physical_objects:\n"
+"gvector_sort (phys_objects, 1, 0, 0);\n"
+"phys_obj_count := length (phys_objects);\n"
 "\n"
-"if (0 = phys_s_count)\n"
+"if (0 = phys_obj_count)\n"
 "return res;\n"
 "\n"
 "if (graphs_listed)\n"
@@ -7103,23 +8959,23 @@ static const char *proc212 =
 "{\n"
 "declare graph any;\n"
 "graph := sorted_good_graphs [g_ctr];\n"
-"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"for (obj_ctr := phys_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)\n"
 "{\n"
-"declare subj any;\n"
-"subj := phys_subjects [s_ctr];\n"
-"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
+"declare obj any;\n"
+"obj := phys_objects [obj_ctr];\n"
+"for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where G = graph and O = obj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
-"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
-"dict_put (next_iter_subjs, obj1, 1);\n"
+"dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);\n"
+"if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)\n"
+"dict_put (next_iter_objs, subj1, 1);\n"
 "for (sparql define output:valmode \"LONG\"\n"
 "select ?g2 ?st2 where {\n"
 "graph ?g2 {\n"
-"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do\n"
 "{\n"
-"if (position (\"g2\", sorted_good_graphs) and dict_get (subj_dict, \"st2\") is null)\n"
-"dict_put (next_iter_subjs, \"st2\", 1);\n"
+"if (position (\"g2\", sorted_good_graphs) and dict_get (obj_dict, \"st2\") is null)\n"
+"dict_put (next_iter_objs, \"st2\", 1);\n"
 "}\n"
 "}\n"
 "}\n"
@@ -7127,52 +8983,52 @@ static const char *proc212 =
 "}\n"
 "else\n"
 "{\n"
-"for (s_ctr := phys_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"for (obj_ctr := phys_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)\n"
 "{\n"
-"declare subj any;\n"
-"subj := phys_subjects [s_ctr];\n"
-"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where\n"
+"declare obj any;\n"
+"obj := phys_objects [obj_ctr];\n"
+"for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where\n"
 "0 = position (G, sorted_bad_graphs) and\n"
-"S = subj and\n"
+"O = obj and\n"
 "__rgs_ack_cbk (G, uid, 1) and\n"
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
-"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
-"dict_put (next_iter_subjs, obj1, 1);\n"
+"dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);\n"
+"if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)\n"
+"dict_put (next_iter_objs, subj1, 1);\n"
 "for (sparql define output:valmode \"LONG\"\n"
 "select ?g2 ?st2 where {\n"
 "graph ?g2 {\n"
-"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do\n"
 "{\n"
 "if (0 = position (\"g2\", sorted_bad_graphs) and\n"
-"dict_get (subj_dict, \"st2\") is null and\n"
+"dict_get (obj_dict, \"st2\") is null and\n"
 "__rgs_ack_cbk (\"g2\", uid, 1) and\n"
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (\"g2\", gs_app_uid))) )\n"
-"dict_put (next_iter_subjs, \"st2\", 1);\n"
+"dict_put (next_iter_objs, \"st2\", 1);\n"
 "}\n"
 "}\n"
 "}\n"
 "}\n"
 "ret_or_next_iter:\n"
-"if (0 = dict_size (next_iter_subjs))\n"
+"if (0 = dict_size (next_iter_objs))\n"
 "{\n"
 "\n"
 "return res;\n"
 "}\n"
-"all_subjs := dict_list_keys (next_iter_subjs, 1);\n"
-"foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);\n"
+"all_objs := dict_list_keys (next_iter_objs, 1);\n"
+"foreach (IRI_ID obj in all_objs) do dict_put (obj_dict, obj, 1);\n"
 "goto next_iteration;\n"
 "}\n"
-"--src sparql.sql:6681\n";
+"--src sparql.sql:8500\n";
 
-static const char *proc213 = 
-"#line 6945 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (in subj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+static const char *proc250 = 
+"#line 8770 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL (in obj_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
 "{\n"
-"declare all_subjs, sorted_good_graphs, sorted_bad_graphs, next_iter_subjs, res any;\n"
-"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, s_ctr, all_s_count integer;\n"
+"declare all_objs, sorted_good_graphs, sorted_bad_graphs, next_iter_objs, res any;\n"
+"declare uid, graphs_listed, g_ctr, good_g_count, bad_g_count, obj_ctr, all_obj_count integer;\n"
 "declare gs_app_callback, gs_app_uid varchar;\n"
 "declare rdf_type_iid IRI_ID;\n"
 "uid := get_keyword (\'uid\', options, http_nobody_uid());\n"
@@ -7185,18 +9041,18 @@ static const char *proc213 =
 "return res;\n"
 "foreach (any c in consts) do\n"
 "{\n"
-"if (isiri_id (c))\n"
-"dict_put (subj_dict, c, 0);\n"
+"if (not isnumeric (c))\n"
+"dict_put (obj_dict, c, 0);\n"
 "}\n"
-"all_subjs := dict_list_keys (subj_dict, 0);\n"
-"next_iter_subjs := dict_new ();\n"
-"all_s_count := length (all_subjs);\n"
-"if (0 = all_s_count)\n"
+"all_objs := dict_list_keys (obj_dict, 0);\n"
+"next_iter_objs := dict_new ();\n"
+"all_obj_count := length (all_objs);\n"
+"if (0 = all_obj_count)\n"
 "return res;\n"
 "\n"
 "next_iteration:\n"
-"all_s_count := length (all_subjs);\n"
-"gvector_sort (all_subjs, 1, 0, 0);\n"
+"all_obj_count := length (all_objs);\n"
+"gvector_sort (all_objs, 1, 0, 0);\n"
 "\n"
 "if (__tag of integer = __tag (good_graphs))\n"
 "graphs_listed := 0;\n"
@@ -7205,7 +9061,7 @@ static const char *proc213 =
 "vectorbld_init (sorted_good_graphs);\n"
 "foreach (any g in good_graphs) do\n"
 "{\n"
-"if (isiri_id (g) and g < min_bnode_iri_id () and\n"
+"if (is_named_iri_id (g) and\n"
 "__rgs_ack_cbk (g, uid, 1) and\n"
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (g, gs_app_uid))) )\n"
 "vectorbld_acc (sorted_good_graphs, g);\n"
@@ -7219,13 +9075,13 @@ static const char *proc213 =
 "vectorbld_init (sorted_bad_graphs);\n"
 "foreach (any g in bad_graphs) do\n"
 "{\n"
-"if (isiri_id (g) and g < min_bnode_iri_id ())\n"
+"if (isnamed_iri_id (g))\n"
 "vectorbld_acc (sorted_bad_graphs, g);\n"
 "}\n"
 "vectorbld_final (sorted_bad_graphs);\n"
 "bad_g_count := length (sorted_bad_graphs);\n"
 "\n"
-"if (0 = all_s_count)\n"
+"if (0 = all_obj_count)\n"
 "return res;\n"
 "\n"
 "if (graphs_listed)\n"
@@ -7236,23 +9092,23 @@ static const char *proc213 =
 "{\n"
 "declare graph any;\n"
 "graph := sorted_good_graphs [g_ctr];\n"
-"for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"for (obj_ctr := all_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)\n"
 "{\n"
-"declare subj any;\n"
-"subj := all_subjs [s_ctr];\n"
-"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where G = graph and S = subj) do\n"
+"declare obj any;\n"
+"obj := all_objs [obj_ctr];\n"
+"for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where G = graph and O = obj) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
-"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
-"dict_put (next_iter_subjs, obj1, 1);\n"
+"dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);\n"
+"if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)\n"
+"dict_put (next_iter_objs, subj1, 1);\n"
 "for (sparql define output:valmode \"LONG\"\n"
 "select ?g2 ?st2 where {\n"
 "graph ?g2 {\n"
-"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do\n"
 "{\n"
-"if (position (\"g2\", sorted_good_graphs) and dict_get (subj_dict, \"st2\") is null)\n"
-"dict_put (next_iter_subjs, \"st2\", 1);\n"
+"if (position (\"g2\", sorted_good_graphs) and dict_get (obj_dict, \"st2\") is null)\n"
+"dict_put (next_iter_objs, \"st2\", 1);\n"
 "}\n"
 "}\n"
 "}\n"
@@ -7260,49 +9116,81 @@ static const char *proc213 =
 "}\n"
 "else\n"
 "{\n"
-"for (s_ctr := all_s_count - 1; s_ctr >= 0; s_ctr := s_ctr - 1)\n"
+"for (obj_ctr := all_obj_count - 1; obj_ctr >= 0; obj_ctr := obj_ctr - 1)\n"
 "{\n"
-"declare subj any;\n"
-"subj := all_subjs [s_ctr];\n"
-"for (select P as p1, O as obj1 from DB.DBA.RDF_QUAD where\n"
+"declare obj any;\n"
+"obj := all_objs [obj_ctr];\n"
+"for (select P as p1, S as subj1 from DB.DBA.RDF_QUAD where\n"
 "0 = position (G, sorted_bad_graphs) and\n"
-"S = subj and\n"
+"O = obj and\n"
 "__rgs_ack_cbk (G, uid, 1) and\n"
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (G, gs_app_uid))) ) do\n"
 "{\n"
 "\n"
-"dict_put (res, vector (subj, p1, __rdf_long_of_obj (obj1)), 0);\n"
-"if (isiri_id (obj1) and obj1 > min_bnode_iri_id() and dict_get (subj_dict, obj1) is null)\n"
-"dict_put (next_iter_subjs, obj1, 1);\n"
+"dict_bitor_or_put (res, vector (subj1, p1, __rdf_long_of_obj (obj)), 1);\n"
+"if (is_bnode_iri_id (subj1) and dict_get (obj_dict, subj1) is null)\n"
+"dict_put (next_iter_objs, subj1, 1);\n"
 "for (sparql define output:valmode \"LONG\"\n"
 "select ?g2 ?st2 where {\n"
 "graph ?g2 {\n"
-"?st2 a rdf:Statement ; rdf:subject ?:subj ; rdf:predicate ?:p1 ; rdf:object ?:obj1 } } ) do\n"
+"?st2 a rdf:Statement ; rdf:object ?:obj ; rdf:predicate ?:p1 ; rdf:subject ?:subj1 } } ) do\n"
 "{\n"
 "if (0 = position (\"g2\", sorted_bad_graphs) and\n"
-"dict_get (subj_dict, \"st2\") is null and\n"
+"dict_get (obj_dict, \"st2\") is null and\n"
 "__rgs_ack_cbk (\"g2\", uid, 1) and\n"
 "(gs_app_callback is null or bit_and (1, call (gs_app_callback) (\"g2\", gs_app_uid))) )\n"
-"dict_put (next_iter_subjs, \"st2\", 1);\n"
+"dict_put (next_iter_objs, \"st2\", 1);\n"
 "}\n"
 "}\n"
 "}\n"
 "}\n"
 "\n"
 "ret_or_next_iter:\n"
-"if (0 = dict_size (next_iter_subjs))\n"
+"if (0 = dict_size (next_iter_objs))\n"
 "{\n"
 "\n"
 "return res;\n"
 "}\n"
-"all_subjs := dict_list_keys (next_iter_subjs, 1);\n"
-"foreach (IRI_ID s in all_subjs) do dict_put (subj_dict, s, 1);\n"
+"all_objs := dict_list_keys (next_iter_objs, 1);\n"
+"foreach (IRI_ID obj in all_objs) do dict_put (obj_dict, obj, 1);\n"
 "goto next_iteration;\n"
 "}\n"
-"--src sparql.sql:6943\n";
+"--src sparql.sql:8768\n";
 
-static const char *proc214 = 
-"#line 7078 \"[executable]/sparql.sql\"\n"
+static const char *proc251 = 
+"#line 8902 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_SCBD (in node_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+"{\n"
+"declare cbd_res, objcbd_res, triples any;\n"
+"cbd_res := DB.DBA.SPARQL_DESC_DICT_CBD (node_dict, consts, good_graphs, bad_graphs, storage_name, options);\n"
+"objcbd_res := DB.DBA.SPARQL_DESC_DICT_OBJCBD (node_dict, consts, good_graphs, bad_graphs, storage_name, options);\n"
+"again:\n"
+"triples := dict_destructive_list_rnd_keys (objcbd_res, 80000);\n"
+"if (0 = length (triples))\n"
+"return cbd_res;\n"
+"foreach (any triple in triples) do { dict_put (cbd_res, triple, 1); }\n"
+"goto again;\n"
+"}\n"
+"--src sparql.sql:8900\n";
+
+static const char *proc252 = 
+"#line 8916 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.SPARQL_DESC_DICT_SCBD_PHYSICAL (in node_dict any, in consts any, in good_graphs any, in bad_graphs any, in storage_name any, in options any)\n"
+"{\n"
+"declare cbd_res, objcbd_res, triples any;\n"
+"cbd_res := DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL (node_dict, consts, good_graphs, bad_graphs, storage_name, options);\n"
+"objcbd_res := DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL (node_dict, consts, good_graphs, bad_graphs, storage_name, options);\n"
+"again:\n"
+"triples := dict_destructive_list_rnd_keys (objcbd_res, 80000);\n"
+"if (0 = length (triples))\n"
+"return cbd_res;\n"
+"foreach (any triple in triples) do { dict_put (cbd_res, triple, 1); }\n"
+"goto again;\n"
+"}\n"
+"--src sparql.sql:8914\n";
+
+static const char *proc253 = 
+"#line 8931 \"[executable]/sparql.sql\"\n"
 " create procedure DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS (in dict any, in destructive integer := 0)\n"
 "{\n"
 "declare ctr, len integer;\n"
@@ -7310,8 +9198,7 @@ static const char *proc214 =
 "declare S, P, O_DT, O_LANG varchar;\n"
 "declare O_IS_IRI, dt_twobyte, lang_twobyte integer;\n"
 "dict := dict_list_keys (dict, destructive);\n"
-"result_names (S, P, O\n"
-");\n"
+"exec_result_names (vector (vector (\'S\', 182, 0, 4072, 1, 0, 1, 0, 0, 0, 0, 0), vector (\'P\', 182, 0, 4072, 1, 0, 1, 0, 0, 0, 0, 0), vector (\'O\', 125, 0, 2147483647, 1, 0, 0, 0, 0, 0, 0, 0)));\n"
 "len := length (dict);\n"
 "for (ctr := 0; ctr < len; ctr := ctr+1)\n"
 "{\n"
@@ -7333,15 +9220,15 @@ static const char *proc214 =
 "\n"
 "\n"
 "\n"
-"else\n"
+"else if (S is not null and P is not null and O is not null)\n"
 "result (S, P, O\n"
 ");\n"
 "}\n"
 "}\n"
-"--src sparql.sql:7076\n";
+"--src sparql.sql:8929\n";
 
-static const char *proc215 = 
-"#line 7119 \"[executable]/sparql.sql\"\n"
+static const char *proc254 = 
+"#line 8971 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_TYPEMIN_OF_OBJ (in obj any) returns any\n"
 "{\n"
 "declare tag integer;\n"
@@ -7358,10 +9245,10 @@ static const char *proc215 =
 "return \'\';\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:7117\n";
+"--src sparql.sql:8969\n";
 
-static const char *proc216 = 
-"#line 7137 \"[executable]/sparql.sql\"\n"
+static const char *proc255 = 
+"#line 8989 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_TYPEMAX_OF_OBJ (in obj any) returns any\n"
 "{\n"
 "declare tag integer;\n"
@@ -7378,18 +9265,18 @@ static const char *proc216 =
 "return \'\\377\\377\\377\\377\\377\\377\';\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:7135\n";
+"--src sparql.sql:8987\n";
 
-static const char *proc217 = 
-"#line 7155 \"[executable]/sparql.sql\"\n"
+static const char *proc256 = 
+"#line 9007 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_IID_CMP (in obj1 any, in obj2 any) returns integer\n"
 "{\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:7153\n";
+"--src sparql.sql:9005\n";
 
-static const char *proc218 = 
-"#line 7161 \"[executable]/sparql.sql\"\n"
+static const char *proc257 = 
+"#line 9013 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_OBJ_CMP (in obj1 any, in obj2 any) returns integer\n"
 "{\n"
 "declare tag1, tag2 integer;\n"
@@ -7463,10 +9350,10 @@ static const char *proc218 =
 "}\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:7159\n";
+"--src sparql.sql:9011\n";
 
-static const char *proc219 = 
-"#line 7236 \"[executable]/sparql.sql\"\n"
+static const char *proc258 = 
+"#line 9088 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_LONG_CMP (in long1 any, in long2 any) returns integer\n"
 "{\n"
 "declare tag1, tag2 integer;\n"
@@ -7510,10 +9397,10 @@ static const char *proc219 =
 "}\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:7234\n";
+"--src sparql.sql:9086\n";
 
-static const char *proc220 = 
-"#line 7283 \"[executable]/sparql.sql\"\n"
+static const char *proc259 = 
+"#line 9135 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_DIST_SER_LONG (in val any) returns any\n"
 "{\n"
 "if (not (isstring (val)))\n"
@@ -7532,10 +9419,10 @@ static const char *proc220 =
 "return val;\n"
 "return serialize (val);\n"
 "}\n"
-"--src sparql.sql:7281\n";
+"--src sparql.sql:9133\n";
 
-static const char *proc221 = 
-"#line 7304 \"[executable]/sparql.sql\"\n"
+static const char *proc260 = 
+"#line 9156 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_DIST_DESER_LONG (in strg any) returns any\n"
 "{\n"
 "if (not (isstring (strg)))\n"
@@ -7550,328 +9437,10 @@ static const char *proc221 =
 "return res;\n"
 "return rdf_box (res[0], res[1], res[2], 0, res[3]);\n"
 "}\n"
-"--src sparql.sql:7302\n";
-
-static const char *proc222 = 
-"#line 7323 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.JSO_MAKE_INHERITANCE (in jgraph varchar, in class varchar, in rootinst varchar, in destinst varchar, in dest_iid iri_id, inout noinherits any, inout inh_stack any)\n"
-"{\n"
-"declare base_iid iri_id;\n"
-"declare baseinst varchar;\n"
-"\n"
-"inh_stack := vector_concat (inh_stack, vector (destinst));\n"
-"baseinst := null;\n"
-"if (not exists (sparql\n"
-"define input:storage \"\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"ask where {\n"
-"graph ?:jgraph { ?:dest_iid rdf:type `iri(?:class)`\n"
-"} } ) )\n"
-"signal (\'22023\', \'JSO_MAKE_INHERITANCE has not found object <\' || destinst || \'> of type <\' || class || \'>\');\n"
-"/* This fails. !!!TBD: fix sparql2sql.c to preserve data about equalities, fixed values and globals when triples are moved from gp to gp\n"
-"for (sparql\n"
-"define input:storage \"\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"select ?srcinst\n"
-"where {\n"
-"graph ?:jgraph {\n"
-"{ {\n"
-"?destnode rdf:type `iri(?:class)` .\n"
-"filter (?destnode = iri(?:destinst)) }\n"
-"union\n"
-"{\n"
-"?destnode rdf:type `iri(?:class)` .\n"
-"?destnode rdf:name `iri(?:destinst)` } } .\n"
-"?destnode virtrdf:inheritFrom ?srcinst .\n"
-"?srcinst rdf:type `iri(?:class)` .\n"
-"} } ) do\n"
-"*/\n"
-"for (sparql\n"
-"define input:storage \"\"\n"
-"define output:valmode \"LONG\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"select ?src_iid\n"
-"where {\n"
-"graph ?:jgraph { ?:dest_iid virtrdf:inheritFrom ?src_iid } } ) do\n"
-"{\n"
-"declare srcinst varchar;\n"
-"srcinst := id_to_iri_nosignal (\"src_iid\");\n"
-"if (baseinst is null)\n"
-"{\n"
-"if (not exists (sparql\n"
-"define input:storage \"\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"ask where { graph ?:jgraph { ?:\"src_iid\" rdf:type `iri(?:class)` } } ) )\n"
-"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || destinst || \'> has wrong virtrdf:inheritFrom <\' || srcinst || \'> that is not an instance of type <\' || class || \'>\');\n"
-"base_iid := \"src_iid\";\n"
-"baseinst := srcinst;\n"
-"}\n"
-"else if (baseinst <> srcinst)\n"
-"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || destinst || \'> has multiple virtrdf:inheritFrom declarations: <\' || baseinst || \'> and <\' || srcinst || \'>\');\n"
-"}\n"
-"if (position (baseinst, inh_stack))\n"
-"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || baseinst || \'> is recursively inherited from itself\');\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"for (sparql\n"
-"define input:storage \"\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"select ?pred\n"
-"where {\n"
-"graph ?:jgraph {\n"
-"?:dest_iid virtrdf:noInherit ?pred\n"
-"} } ) do\n"
-"{\n"
-"if (baseinst is null)\n"
-"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || destinst || \'> has set virtrdf:noInherit but has no virtrdf:inheritFrom\');\n"
-"dict_put (noinherits, \"pred\", destinst);\n"
-"}\n"
-"if (baseinst is null)\n"
-"return;\n"
-"for (select \"pred_id\", \"predval\"\n"
-"from (sparql\n"
-"define input:storage \"\"\n"
-"define output:valmode \"LONG\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"select ?pred_id, ?predval\n"
-"where {\n"
-"graph ?:jgraph {\n"
-"?:base_iid ?pred_id ?predval\n"
-"} } ) as \"t00\"\n"
-"where not exists (sparql\n"
-"define input:storage \"\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"ask where { graph ?:jgraph { ?:\"t00\".\"pred_id\" virtrdf:loadAs virtrdf:jsoTriple } } )\n"
-") do\n"
-"{\n"
-"declare \"pred\" any;\n"
-"\"pred\" := id_to_iri (\"pred_id\");\n"
-"if (DB.DBA.RDF_LANGUAGE_OF_LONG (\"predval\", null) is not null)\n"
-"signal (\'22023\', \'JSO_MAKE_INHERITANCE does not support language marks on objects\');\n"
-"if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\' = \"pred\")\n"
-" ;\n"
-"else if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#name\' = \"pred\")\n"
-" ;\n"
-"else if (\'http://www.openlinksw.com/schemas/virtrdf#inheritFrom\' = \"pred\")\n"
-" ;\n"
-"else if (\'http://www.openlinksw.com/schemas/virtrdf#noInherit\' = \"pred\")\n"
-" ;\n"
-"else if (dict_get (noinherits, \"pred\", baseinst) = baseinst)\n"
-"{\n"
-"jso_set (class, rootinst, \"pred\", __rdf_sqlval_of_obj (\"predval\"), isiri_id (\"predval\"));\n"
-"dict_put (noinherits, \"pred\", baseinst);\n"
-"}\n"
-"}\n"
-"DB.DBA.JSO_MAKE_INHERITANCE (jgraph, class, rootinst, baseinst, base_iid, noinherits, inh_stack);\n"
-"}\n"
-"--src sparql.sql:7321\n";
-
-static const char *proc223 = 
-"#line 7449 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.JSO_LOAD_INSTANCE (in jgraph varchar, in jinst varchar, in delete_first integer, in make_new integer, in jsubj_iid iri_id := 0)\n"
-"{\n"
-"declare jinst_iid, jgraph_iid IRI_ID;\n"
-"declare jclass varchar;\n"
-"declare noinherits, inh_stack, \"p\" any;\n"
-"\n"
-"noinherits := dict_new ();\n"
-"jinst_iid := iri_ensure (jinst);\n"
-"jgraph_iid := iri_ensure (jgraph);\n"
-"if (jsubj_iid is null)\n"
-"{\n"
-"jsubj_iid := (sparql\n"
-"define input:storage \"\"\n"
-"define output:valmode \"LONG\"\n"
-"select ?s\n"
-"where { graph ?:jgraph { ?s rdf:name ?:jinst } } );\n"
-"if (jsubj_iid is null)\n"
-"jsubj_iid := jinst_iid;\n"
-"}\n"
-"jclass := (sparql\n"
-"define input:storage \"\"\n"
-"select ?t\n"
-"where {\n"
-"graph ?:jgraph { ?:jsubj_iid rdf:type ?t } } );\n"
-"if (jclass is null)\n"
-"{\n"
-"if (exists (sparql\n"
-"define input:storage \"\"\n"
-"select ?x\n"
-"where { graph ?:jgraph {\n"
-"{ ?:jinst ?x ?o }\n"
-"union\n"
-"{ ?x rdf:name ?ji .\n"
-"filter (str (?ji) = ?:jinst)\n"
-"} } } ) )\n"
-"signal (\'22023\', \'JSO_LOAD_INSTANCE can not detect the type of <\' || jinst || \'>\');\n"
-"else\n"
-"signal (\'22023\', \'JSO_LOAD_INSTANCE can not find an object <\' || jinst || \'>\');\n"
-"}\n"
-"if (delete_first)\n"
-"jso_delete (jclass, jinst, 1);\n"
-"if (make_new)\n"
-"jso_new (jclass, jinst);\n"
-"for (select \"p_id\", coalesce (\"o2\", \"o1\") as \"o\"\n"
-"from (sparql\n"
-"define input:storage \"\"\n"
-"define output:valmode \"LONG\"\n"
-"select ?p_id ?o1 ?o2\n"
-"where {\n"
-"graph ?:jgraph {\n"
-"{ ?:jsubj_iid ?p_id ?o1 }  optional { ?o1 rdf:name ?o2 }\n"
-"} }\n"
-") as \"t00\"\n"
-"where not exists (sparql\n"
-"define input:storage \"\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"ask where { graph ?:jgraph_iid { ?:\"t00\".\"p_id\" virtrdf:loadAs virtrdf:jsoTriple } } ) option (quietcast)\n"
-") do\n"
-"{\n"
-"\"p\" := id_to_iri (\"p_id\");\n"
-"if (DB.DBA.RDF_LANGUAGE_OF_LONG (\"o\", null) is not null)\n"
-"signal (\'22023\', \'JSO_LOAD_INSTANCE does not support language marks on objects\');\n"
-"if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\' = \"p\")\n"
-"{\n"
-"if (__rdf_sqlval_of_obj (\"o\") <> jclass)\n"
-"signal (\'22023\', \'JSO_LOAD_INSTANCE has found that the object <\' || jinst || \'> has multiple type declarations\');\n"
-"}\n"
-"else if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#name\' = \"p\")\n"
-" ;\n"
-"else if (\'http://www.openlinksw.com/schemas/virtrdf#inheritFrom\' = \"p\")\n"
-" ;\n"
-"else if (\'http://www.openlinksw.com/schemas/virtrdf#noInherit\' = \"p\")\n"
-" ;\n"
-"else\n"
-"{\n"
-"jso_set (jclass, jinst, \"p\", __rdf_sqlval_of_obj (\"o\"), isiri_id (\"o\"));\n"
-"dict_put (noinherits, \"p\", jinst);\n"
-"}\n"
-"}\n"
-"inh_stack := vector ();\n"
-"DB.DBA.JSO_MAKE_INHERITANCE (jgraph, jclass, jinst, jinst, jsubj_iid, noinherits, inh_stack);\n"
-"}\n"
-"--src sparql.sql:7447\n";
-
-static const char *proc224 = 
-"#line 7533 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (in jgraph varchar, out instances any)\n"
-"{\n"
-"declare md, res, st, msg any;\n"
-"st:= \'00000\';\n"
-"exec (\n"
-"\'select DB.DBA.VECTOR_AGG (\n"
-"vector (\n"
-"id_to_iri (\"jclass\"),\n"
-"id_to_iri (\"jinst\"),\n"
-"coalesce (\"s\", \"jinst\") ) )\n"
-"from ( sparql\n"
-"define output:valmode \"LONG\"\n"
-"define input:storage \"\"\n"
-"select ?jclass ?jinst ?s\n"
-"where {\n"
-"graph ?? {\n"
-"{ ?jinst rdf:type ?jclass .\n"
-"filter (!isBLANK (?jinst)) }\n"
-"union\n"
-"{ ?s rdf:type ?jclass .\n"
-"?s rdf:name ?jinst .\n"
-"filter (isBLANK (?s))\n"
-"} } }\n"
-") as inst\',\n"
-"st, msg, vector (jgraph), 1, md, res);\n"
-"if (st <> \'00000\') signal (st, msg);\n"
-"instances := res[0][0];\n"
-"}\n"
-"--src sparql.sql:7531\n";
-
-static const char *proc225 = 
-"#line 7563 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.JSO_LOAD_GRAPH (in jgraph varchar, in pin_now integer := 1)\n"
-"{\n"
-"declare jgraph_iid IRI_ID;\n"
-"declare instances, chk any;\n"
-"\n"
-"jgraph_iid := iri_ensure (jgraph);\n"
-"DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);\n"
-"/* Pass 1. Deleting all obsolete instances. */\n"
-"foreach (any j in instances) do\n"
-"jso_delete (j[0], j[1], 1);\n"
-"/* Pass 2. Creating all instances. */\n"
-"foreach (any j in instances) do\n"
-"jso_new (j[0], j[1]);\n"
-"/* Pass 3. Loading all instances, including loading inherited values. */\n"
-"foreach (any j in instances) do\n"
-"DB.DBA.JSO_LOAD_INSTANCE (jgraph, j[1], 0, 0, j[2]);\n"
-"/* Pass 4. Validation all instances. */\n"
-"foreach (any j in instances) do\n"
-"jso_validate (j[0], j[1], 1);\n"
-"/* Pass 5. Pin all instances. */\n"
-"if (pin_now)\n"
-"{\n"
-"foreach (any j in instances) do\n"
-"jso_pin (j[0], j[1]);\n"
-"}\n"
-"/* Pass 6. Load all separate triples */\n"
-"exec (\'sparql\n"
-"define input:storage \"\"\n"
-"define sql:table-option \"LOOP\"\n"
-"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"select (bif:jso_triple_add (?s, ?p, ?o))\n"
-"where { graph <\' || id_to_iri (jgraph_iid) || \'> { ?p virtrdf:loadAs virtrdf:jsoTriple . ?s ?p ?o } }\');\n"
-"chk := jso_triple_get_objs (\n"
-"UNAME\'http://www.openlinksw.com/schemas/virtrdf#loadAs\',\n"
-"UNAME\'http://www.openlinksw.com/schemas/virtrdf#loadAs\' );\n"
-"if ((1 <> length (chk)) or (cast (chk[0] as varchar) <> \'http://www.openlinksw.com/schemas/virtrdf#jsoTriple\'))\n"
-"signal (\'22023\', \'JSO_LOAD_GRAPH has not found expected metadata in the graph\');\n"
-"}\n"
-"--src sparql.sql:7561\n";
-
-static const char *proc226 = 
-"#line 7603 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.JSO_PIN_GRAPH (in jgraph varchar)\n"
-"{\n"
-"declare instances any;\n"
-"DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);\n"
-"foreach (any j in instances) do\n"
-"jso_pin (j[0], j[1]);\n"
-"}\n"
-"--src sparql.sql:7601\n";
+"--src sparql.sql:9154\n";
 
-static const char *proc227 = 
-"#line 7613 \"[executable]/sparql.sql\"\n"
-" create function DB.DBA.JSO_SYS_GRAPH () returns varchar\n"
-"{\n"
-"return \'http://www.openlinksw.com/schemas/virtrdf#\';\n"
-"}\n"
-"--src sparql.sql:7611\n";
-
-static const char *proc228 = 
-"#line 7620 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO (in graphiri varchar := null)\n"
-"{\n"
-"if (graphiri is null)\n"
-"graphiri := DB.DBA.JSO_SYS_GRAPH();\n"
-"DB.DBA.JSO_LOAD_GRAPH (graphiri, 0);\n"
-"DB.DBA.JSO_PIN_GRAPH (graphiri);\n"
-"}\n"
-"--src sparql.sql:7618\n";
-
-static const char *proc229 = 
-"#line 7629 \"[executable]/sparql.sql\"\n"
+static const char *proc261 = 
+"#line 9175 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH (in graphiri varchar := null)\n"
 "{\n"
 "if (graphiri is null)\n"
@@ -7881,18 +9450,23 @@ static const char *proc229 =
 "DB.DBA.JSO_PIN_GRAPH (graphiri);\n"
 "for (select P_NAME from SYS_PROCEDURES\n"
 "where (\n"
+"(P_NAME > \'DB.DBA.SPARQL_DESC_DICT\') and\n"
+"(P_NAME < \'DB.DBA.SPARQL_DESC_DICU\') and\n"
+"(\n"
 "(P_NAME like \'DB.DBA.SPARQL_DESC_DICT_QMV1_%\') or\n"
-"(P_NAME like \'DB.DBA.SPARQL_DESC_DICT_CBD_QMV1_%\') )\n"
+"(P_NAME like \'DB.DBA.SPARQL_DESC_DICT_CBD_QMV1_%\') or\n"
+"(P_NAME like \'DB.DBA.SPARQL_DESC_DICT_OBJCBD_QMV1_%\') or\n"
+"(P_NAME like \'DB.DBA.SPARQL_DESC_DICT_SCBD_QMV1_%\') ) )\n"
 "for update) do\n"
 "{\n"
 "exec (\'drop procedure DB.DBA.\"\' || subseq (P_NAME, 7) || \'\"\');\n"
 "}\n"
 "commit work;\n"
 "}\n"
-"--src sparql.sql:7627\n";
+"--src sparql.sql:9173\n";
 
-static const char *proc230 = 
-"#line 7648 \"[executable]/sparql.sql\"\n"
+static const char *proc262 = 
+"#line 9199 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.JSO_DUMP_IRI (in v varchar, inout ses any)\n"
 "{\n"
 "\n"
@@ -7923,10 +9497,10 @@ static const char *proc230 =
 "http_escape (v, 12, ses, 1, 1);\n"
 "http (\'>\', ses);\n"
 "}\n"
-"--src sparql.sql:7646\n";
+"--src sparql.sql:9197\n";
 
-static const char *proc231 = 
-"#line 7680 \"[executable]/sparql.sql\"\n"
+static const char *proc263 = 
+"#line 9231 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.JSO_DUMP_FLD (in v any, inout ses any)\n"
 "{\n"
 "declare v_tag integer;\n"
@@ -7956,10 +9530,10 @@ static const char *proc231 =
 "http (\'>\', ses);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:7678\n";
+"--src sparql.sql:9229\n";
 
-static const char *proc232 = 
-"#line 7711 \"[executable]/sparql.sql\"\n"
+static const char *proc264 = 
+"#line 9262 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.JSO_VECTOR_TO_TTL (inout proplist any) returns any\n"
 "{\n"
 "declare prev_obj, ses any;\n"
@@ -8002,10 +9576,10 @@ static const char *proc232 =
 "http (\'.\\n\', ses);\n"
 "return ses;\n"
 "}\n"
-"--src sparql.sql:7709\n";
+"--src sparql.sql:9260\n";
 
-static const char *proc233 = 
-"#line 7755 \"[executable]/sparql.sql\"\n"
+static const char *proc265 = 
+"#line 9306 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.JSO_FILTERED_PROPLIST (in only_custom integer := 0, in loading_status integer := 1, in long_valmode integer := 1) returns any\n"
 "{\n"
 "declare proplist, res any;\n"
@@ -8082,20 +9656,20 @@ static const char *proc233 =
 "vectorbld_final (res);\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:7753\n";
+"--src sparql.sql:9304\n";
 
-static const char *proc234 = 
-"#line 7833 \"[executable]/sparql.sql\"\n"
+static const char *proc266 = 
+"#line 9384 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.JSO_DUMP_ALL (in only_custom integer := 0, in loading_status integer := 1) returns any\n"
 "{\n"
 "declare proplist any;\n"
 "proplist := DB.DBA.JSO_FILTERED_PROPLIST (only_custom, loading_status, 0);\n"
 "return DB.DBA.JSO_VECTOR_TO_TTL (proplist);\n"
 "}\n"
-"--src sparql.sql:7831\n";
+"--src sparql.sql:9382\n";
 
-static const char *proc235 = 
-"#line 7844 \"[executable]/sparql.sql\"\n"
+static const char *proc267 = 
+"#line 9395 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_BACKUP_METADATA (in save_to_file integer := 0, in backup_name varchar := null) returns varchar\n"
 "{\n"
 "declare proplist any;\n"
@@ -8128,10 +9702,10 @@ static const char *proc235 =
 "}\n"
 "return backup_name;\n"
 "}\n"
-"--src sparql.sql:7842\n";
+"--src sparql.sql:9393\n";
 
-static const char *proc236 = 
-"#line 7878 \"[executable]/sparql.sql\"\n"
+static const char *proc268 = 
+"#line 9429 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_RESTORE_METADATA (in read_from_file integer, in backup_name varchar) returns any\n"
 "{\n"
 "declare graphiri_id IRI_ID;\n"
@@ -8172,10 +9746,10 @@ static const char *proc236 =
 "commit work;\n"
 "return backup_name;\n"
 "}\n"
-"--src sparql.sql:7876\n";
+"--src sparql.sql:9427\n";
 
-static const char *proc237 = 
-"#line 7920 \"[executable]/sparql.sql\"\n"
+static const char *proc269 = 
+"#line 9471 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_AUDIT_METADATA (in fix_bugs integer := 0, in unlocker varchar := null, in graphiri varchar := null, in call_result_names integer := 1)\n"
 "{\n"
 "declare chksum varchar;\n"
@@ -8240,7 +9814,7 @@ static const char *proc237 =
 "select ?s from <http://www.openlinksw.com/schemas/virtrdf#> where {\n"
 "?s rdf:type virtrdf:array-of-QuadMap } ) do\n"
 "{\n"
-"if (DB.DBA.RDF_QM_GC_SUBTREE (\"s\", 1) is null)\n"
+"if (DB.DBA.RDF_QM_GC_SUBTREE (\"s\", 3) is null)\n"
 "result (\'00000\', \'Quad map array <\' || \"s\" || \'> is not used, removed\');\n"
 "}\n"
 "for (sparql define input:storage \"\"\n"
@@ -8256,7 +9830,7 @@ static const char *proc237 =
 "select ?s from <http://www.openlinksw.com/schemas/virtrdf#> where {\n"
 "?s rdf:type virtrdf:array-of-QuadMapFormat } ) do\n"
 "{\n"
-"if (DB.DBA.RDF_QM_GC_SUBTREE (\"s\", 1) is null)\n"
+"if (DB.DBA.RDF_QM_GC_SUBTREE (\"s\", 3) is null)\n"
 "result (\'00000\', \'Quad map format array <\' || \"s\" || \'> is not used, removed\');\n"
 "}\n"
 "for (sparql define input:storage \"\"\n"
@@ -8264,7 +9838,7 @@ static const char *proc237 =
 "select ?s from <http://www.openlinksw.com/schemas/virtrdf#> where {\n"
 "?s rdf:type virtrdf:QuadMapFormat } ) do\n"
 "{\n"
-"if (DB.DBA.RDF_QM_GC_SUBTREE (\"s\", 1) is null)\n"
+"if (DB.DBA.RDF_QM_GC_SUBTREE (\"s\", 3) is null)\n"
 "result (\'00000\', \'Quad map format <\' || \"s\" || \'> is not used, removed\');\n"
 "}\n"
 "}\n"
@@ -8410,10 +9984,10 @@ static const char *proc237 =
 "result (\'42000\', \'The previous error can not be fixed automatically. Sorry.\');\n"
 "return;\n"
 "}\n"
-"--src sparql.sql:7918\n";
+"--src sparql.sql:9469\n";
 
-static const char *proc238 = 
-"#line 8159 \"[executable]/sparql.sql\"\n"
+static const char *proc270 = 
+"#line 9710 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_CHANGE (in warninglist any)\n"
 "{\n"
 "declare STATE, MESSAGE varchar;\n"
@@ -8425,10 +9999,10 @@ static const char *proc238 =
 "}\n"
 "commit work;\n"
 "}\n"
-"--src sparql.sql:8157\n";
+"--src sparql.sql:9708\n";
 
-static const char *proc239 = 
-"#line 8172 \"[executable]/sparql.sql\"\n"
+static const char *proc271 = 
+"#line 9723 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_CHANGE_OPT (in cmdlist any)\n"
 "{\n"
 "declare cmdctr, cmdcount integer;\n"
@@ -8459,7 +10033,10 @@ static const char *proc239 =
 "}\n"
 "http (\')\', exectext);\n"
 "STATE := \'00000\';\n"
-"warnings := exec (string_output_string (exectext), STATE, MESSAGE, arglist, md, rs);\n"
+"warnings := exec (string_output_string (exectext), STATE, MESSAGE, arglist, 10000, md, rs);\n"
+"\n"
+"if (__tag of vector <> __tag (warnings) and __tag of vector = __tag (rs))\n"
+"warnings := case (length (rs)) when 0 then null else rs[0][0] end;\n"
 "\n"
 "if (__tag of vector = __tag (warnings))\n"
 "{\n"
@@ -8482,10 +10059,10 @@ static const char *proc239 =
 "}\n"
 "result (\'00000\', sprintf (\'%d RDF metadata manipulation operations done\', cmdcount));\n"
 "}\n"
-"--src sparql.sql:8170\n";
+"--src sparql.sql:9721\n";
 
-static const char *proc240 = 
-"#line 8227 \"[executable]/sparql.sql\"\n"
+static const char *proc272 = 
+"#line 9781 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_APPLY_CHANGES (in deleted any, in affected any) returns any\n"
 "{\n"
 "declare ctr, len integer;\n"
@@ -8493,16 +10070,22 @@ static const char *proc240 =
 "DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH ();\n"
 "len := length (deleted);\n"
 "for (ctr := 0; ctr < len; ctr := ctr + 2)\n"
+"{\n"
 "jso_delete (deleted [ctr], deleted [ctr+1], 1);\n"
+"log_text (\'jso_delete (?,?,1)\', deleted [ctr], deleted [ctr+1]);\n"
+"}\n"
 "len := length (affected);\n"
 "for (ctr := 0; ctr < len; ctr := ctr + 1)\n"
+"{\n"
 "jso_mark_affected (affected [ctr]);\n"
+"log_text (\'jso_mark_affected (?)\', affected [ctr]);\n"
+"}\n"
 "return vector (vector (\'00000\', \'Transaction committed, SPARQL compiler re-configured\'));\n"
 "}\n"
-"--src sparql.sql:8225\n";
+"--src sparql.sql:9779\n";
 
-static const char *proc241 = 
-"#line 8242 \"[executable]/sparql.sql\"\n"
+static const char *proc273 = 
+"#line 9802 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_ASSERT_JSO_TYPE (in inst varchar, in expected varchar, in allow_missing integer := 0) returns integer\n"
 "{\n"
 "declare actual varchar;\n"
@@ -8539,10 +10122,10 @@ static const char *proc241 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:8240\n";
+"--src sparql.sql:9800\n";
 
-static const char *proc242 = 
-"#line 8280 \"[executable]/sparql.sql\"\n"
+static const char *proc274 = 
+"#line 9840 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_ASSERT_STORAGE_FLAG (in storage varchar, in req_flag integer)\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -8563,10 +10146,10 @@ static const char *proc242 =
 "return;\n"
 "signal (\'22023\', \'The quad storage \"\' || storage || \'\" is not flagged as being edited, cannot change it\' );\n"
 "}\n"
-"--src sparql.sql:8278\n";
+"--src sparql.sql:9838\n";
 
-static const char *proc243 = 
-"#line 8302 \"[executable]/sparql.sql\"\n"
+static const char *proc275 = 
+"#line 9862 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_ASSERT_STORAGE_CONTAINS_MAPPING (in storage varchar, in qmid varchar, in must_contain integer)\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -8588,20 +10171,11 @@ static const char *proc243 =
 "return;\n"
 "signal (\'22023\', \'The quad storage \"\' || storage || \'\" does not contains quad map \' || qmid );\n"
 "}\n"
-"--src sparql.sql:8300\n";
+"--src sparql.sql:9860\n";
 
-static const char *proc244 = 
-"#line 8325 \"[executable]/sparql.sql\"\n"
-"create procedure DB.DBA.RDF_QM_ASSERT_STORAGE_IS_FLAGGED (in storage varchar)\n"
-"{\n"
-"if (not DB.DBA.RDF_QM_GET_STORAGE_FLAG (storage))\n"
-"signal (\'22023\', \'The quad storage \"\' || storage || \'\" is not flagged as being edited\' );\n"
-"}\n"
-"--src sparql.sql:8323\n";
-
-static const char *proc245 = 
-"#line 8332 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_QM_GC_SUBTREE (in seed any, in quick_gc_only integer := 0) returns integer\n"
+static const char *proc276 = 
+"#line 9885 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_QM_GC_SUBTREE (in seed any, in gc_flags integer := 0) returns integer\n"
 "{\n"
 "declare graphiri varchar;\n"
 "declare seed_id, graphiri_id, subjs, objs any;\n"
@@ -8623,6 +10197,18 @@ static const char *proc245 =
 "\n"
 "return \"s\";\n"
 "}\n"
+"if (not bit_and (gc_flags, 2))\n"
+"{\n"
+"for (sparql define input:storage \"\"\n"
+"define output:valmode \"LONG\"\n"
+"select ?t ?n\n"
+"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"where { ?:seed_id a ?t . ?t virtrdf:isGcResistantType ?n } ) do\n"
+"{\n"
+"\n"
+"return \"t\";\n"
+"}\n"
+"}\n"
 "for (sparql define input:storage \"\"\n"
 "define output:valmode \"LONG\"\n"
 "select ?s\n"
@@ -8630,7 +10216,7 @@ static const char *proc245 =
 "where { ?s a [] ; ?p ?:seed_id } ) do\n"
 "{\n"
 "\n"
-"if (quick_gc_only)\n"
+"if (bit_and (gc_flags, 1))\n"
 "return \"s\";\n"
 "goto do_full_gc;\n"
 "}\n"
@@ -8734,11 +10320,11 @@ static const char *proc245 =
 "\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:8330\n";
+"--src sparql.sql:9883\n";
 
-static const char *proc246 = 
-"#line 8467 \"[executable]/sparql.sql\"\n"
-"create function DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (in mapname any, in quick_gc integer) returns any\n"
+static const char *proc277 = 
+"#line 10032 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (in mapname any, in gc_flags integer) returns any\n"
 "{\n"
 "declare gc_res, submaps any;\n"
 "submaps := (select DB.DBA.VECTOR_AGG (s1.\"subm\") from (\n"
@@ -8747,20 +10333,20 @@ static const char *proc246 =
 "graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
 "`iri(?:mapname)` virtrdf:qmUserSubMaps ?submlist .\n"
 "?submlist ?p ?subm } } ) as s1 );\n"
-"gc_res := DB.DBA.RDF_QM_GC_SUBTREE (mapname, quick_gc);\n"
+"gc_res := DB.DBA.RDF_QM_GC_SUBTREE (mapname, gc_flags);\n"
 "if (gc_res is not null)\n"
 "return gc_res;\n"
 "commit work;\n"
 "foreach (any submapname in submaps) do\n"
 "{\n"
-"DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (submapname, quick_gc);\n"
+"DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (submapname, gc_flags);\n"
 "}\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:8465\n";
+"--src sparql.sql:10030\n";
 
-static const char *proc247 = 
-"#line 8488 \"[executable]/sparql.sql\"\n"
+static const char *proc278 = 
+"#line 10053 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DROP_MAPPING (in storage varchar, in mapname any) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -8795,6 +10381,8 @@ static const char *proc247 =
 "DB.DBA.RDF_QM_ASSERT_JSO_TYPE (qmid, \'http://www.openlinksw.com/schemas/virtrdf#QuadMap\');\n"
 "if (storage is null)\n"
 "{\n"
+"declare report, storages any;\n"
+"vectorbld_init (storages);\n"
 "for (sparql\n"
 "define input:storage \"\"\n"
 "select ?st where {\n"
@@ -8805,11 +10393,23 @@ static const char *proc247 =
 "{ ?st virtrdf:qsDefaultMap `iri(?:qmid)` }\n"
 "} } ) do\n"
 "{\n"
+"DB.DBA.RDF_QM_ASSERT_STORAGE_FLAG (\"st\", 0);\n"
+"vectorbld_acc (storages, cast (\"st\" as varchar));\n"
+"}\n"
+"vectorbld_final (storages);\n"
+"vectorbld_init (report);\n"
+"foreach (varchar alt_st in storages) do\n"
+"{\n"
 "\n"
-"DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE (\"st\", NULL, qmid);\n"
+"DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE (alt_st, NULL, qmid);\n"
+"vectorbld_acc (report, vector (\'00000\', \'Quad map <\' || qmid || \'> is no longer used in storage <\' || alt_st || \'>\'));\n"
 "}\n"
 "DB.DBA.RDF_QM_GC_MAPPING_SUBTREE (qmid, 0);\n"
-"return vector (vector (\'00000\', \'Quad map <\' || qmid || \'> is deleted\'));\n"
+"vectorbld_acc (report, vector (\'00000\', \'Quad map <\' || qmid || \'> is deleted\'));\n"
+"vectorbld_final (report);\n"
+"if (length (storages))\n"
+"DB.DBA.RDF_QM_APPLY_CHANGES (null, storages);\n"
+"return report;\n"
 "}\n"
 "else\n"
 "{\n"
@@ -8818,10 +10418,10 @@ static const char *proc247 =
 "return vector (vector (\'00000\', \'Quad map <\' || qmid || \'> is no longer used in storage <\' || storage || \'>\'));\n"
 "}\n"
 "}\n"
-"--src sparql.sql:8486\n";
+"--src sparql.sql:10051\n";
 
-static const char *proc248 = 
-"#line 8547 \"[executable]/sparql.sql\"\n"
+static const char *proc279 = 
+"#line 10126 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (in iritmpl varchar) returns varchar\n"
 "{\n"
 "declare pos integer;\n"
@@ -8860,10 +10460,10 @@ static const char *proc248 =
 "}\n"
 "return iritmpl;\n"
 "}\n"
-"--src sparql.sql:8545\n";
+"--src sparql.sql:10124\n";
 
-static const char *proc249 = 
-"#line 8587 \"[executable]/sparql.sql\"\n"
+static const char *proc280 = 
+"#line 10166 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_CBD_OF_IRI_CLASS (in classiri varchar) returns any\n"
 "{\n"
 "declare descr any;\n"
@@ -8884,20 +10484,21 @@ static const char *proc249 =
 "optional { ?sffs ?sffp ?sffo . }\n"
 "} union {\n"
 "`iri(?:classiri)` virtrdf:qmfSuperFormats ?sups .\n"
-"optional { ?sups ?supp ?supo . }\n"
+"optional { ?sups ?supp ?supo . FILTER (str(?supo) != bif:concat (str(?:classiri), \'-nullable\')) }\n"
 "} } ) );\n"
 "descr := dict_list_keys (descr, 2);\n"
+"rowvector_digit_sort (descr, 0, 1);\n"
 "rowvector_digit_sort (descr, 1, 1);\n"
 "return descr;\n"
 "}\n"
-"--src sparql.sql:8585\n";
+"--src sparql.sql:10164\n";
 
-static const char *proc250 = 
-"#line 8615 \"[executable]/sparql.sql\"\n"
+static const char *proc281 = 
+"#line 10195 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (in classiri varchar, in iritmpl varchar, in arglist any, in options any, in origclassiri varchar := null) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
-"declare sprintffsid, superformatsid varchar;\n"
+"declare sprintffsid, superformatsid, nullablesuperformatid varchar;\n"
 "declare basetype, basetypeiri varchar;\n"
 "declare bij, deref integer;\n"
 "declare sffs, res any;\n"
@@ -8905,6 +10506,8 @@ static const char *proc250 =
 "declare needs_arg_dtps integer;\n"
 "declare arg_dtps varchar;\n"
 "graphiri := DB.DBA.JSO_SYS_GRAPH ();\n"
+"if (get_keyword_ucase (\'DATATYPE\', options) is not null or get_keyword_ucase (\'LANG\', options) is not null)\n"
+"signal (\'22023\', \'IRI class <\' || classiri || \'> can not have DATATYPE or LANG options specified\');\n"
 "bij := get_keyword_ucase (\'BIJECTION\', options, 0);\n"
 "deref := get_keyword_ucase (\'DEREF\', options, 0);\n"
 "sffs := get_keyword_ucase (\'RETURNS\', options);\n"
@@ -8914,6 +10517,7 @@ static const char *proc250 =
 "iritmpl := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (iritmpl);\n"
 "sprintffsid := classiri || \'--Sprintffs\';\n"
 "superformatsid := classiri || \'--SuperFormats\';\n"
+"nullablesuperformatid := null;\n"
 "res := vector ();\n"
 "foreach (any arg in arglist) do\n"
 "if (UNAME\'in\' <> arg[0])\n"
@@ -8976,15 +10580,16 @@ static const char *proc250 =
 "arglist_copy := arglist;\n"
 "for (argctr := 0; (argctr < arglist_len); argctr := argctr + 1)\n"
 "arglist_copy[argctr][3] := 0;\n"
+"nullablesuperformatid := classiri || \'-nullable\';\n"
 "res := vector_concat (res,\n"
-"DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (classiri || \'-nullable\', iritmpl, arglist_copy, options, NULL) );\n"
+"DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (nullablesuperformatid, iritmpl, arglist_copy, options, NULL) );\n"
 "}\n"
 "origclassiri := classiri;\n"
 "}\n"
 "if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat\', 1))\n"
 "{\n"
 "declare side_s IRI_ID;\n"
-"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);\n"
+"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);\n"
 "if (side_s is not null)\n"
 "{\n"
 "declare tmpname varchar;\n"
@@ -8996,6 +10601,8 @@ static const char *proc250 =
 "}\n"
 "old_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(classiri);\n"
 "new_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(tmpname);\n"
+"\n"
+"\n"
 "if (md5 (serialize (old_descr)) = md5 (serialize (new_descr)))\n"
 "{\n"
 "sparql define input:storage \"\"\n"
@@ -9087,14 +10694,15 @@ static const char *proc250 =
 "virtrdf:qmfValRange-rvrRestrictions\n"
 "virtrdf:SPART_VARR_NOT_NULL .\n"
 "`iri(?:superformatsid)`\n"
-"rdf:_1 `iri(bif:concat (?:classiri, \"-nullable\"))` };\n"
+"rdf:_1 `iri(?:nullablesuperformatid)` };\n"
 "}\n"
+"commit work;\n"
 "return vector_concat (res, vector_concat (res, vector (vector (\'00000\', \'IRI class <\' || classiri || \'> has been defined (inherited from rdfdf:\' || basetype || \')\'))));\n"
 "}\n"
-"--src sparql.sql:8613\n";
+"--src sparql.sql:10193\n";
 
-static const char *proc251 = 
-"#line 8814 \"[executable]/sparql.sql\"\n"
+static const char *proc282 = 
+"#line 10401 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS (in classiri varchar, in fheaders any, in options any, in origclassiri varchar := null) returns any\n"
 "{\n"
 "/*\n"
@@ -9111,12 +10719,15 @@ static const char *proc251 =
 "declare uriprintname, uriparsename varchar;\n"
 "declare arglist_len, isnotnull integer;\n"
 "declare graphiri varchar;\n"
-"declare superformatsid varchar;\n"
+"declare superformatsid, nullablesuperformatid varchar;\n"
 "declare bij, deref integer;\n"
 "declare sffs any;\n"
 "declare res any;\n"
 "graphiri := DB.DBA.JSO_SYS_GRAPH ();\n"
 "superformatsid := classiri || \'--SuperFormats\';\n"
+"nullablesuperformatid := null;\n"
+"if (get_keyword_ucase (\'DATATYPE\', options) is not null or get_keyword_ucase (\'LANG\', options) is not null)\n"
+"signal (\'22023\', \'IRI class <\' || classiri || \'> can not have DATATYPE or LANG options specified\');\n"
 "bij := get_keyword_ucase (\'BIJECTION\', options, 0);\n"
 "deref := get_keyword_ucase (\'DEREF\', options, 0);\n"
 "sffs := get_keyword_ucase (\'RETURNS\', options);\n"
@@ -9155,7 +10766,7 @@ static const char *proc251 =
 "if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat\', 1))\n"
 "{\n"
 "declare side_s IRI_ID;\n"
-"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);\n"
+"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);\n"
 "if (side_s is not null)\n"
 "{\n"
 "declare tmpname varchar;\n"
@@ -9170,16 +10781,252 @@ static const char *proc251 =
 "if (md5 (serialize (old_descr)) = md5 (serialize (new_descr)))\n"
 "{\n"
 "sparql define input:storage \"\"\n"
-"delete from graph <http://www.openlinksw.com/schemas/virtrdf#>  { `iri(?:tmpname)` ?p ?o }\n"
-"where { `iri(?:tmpname)` ?p ?o };\n"
-"return vector (vector (\'00000\', \'Previous definition of IRI class <\' || classiri || \'> is identical to the new one, not touched\'));\n"
-"}\n"
-"signal (\'22023\', \'Can not change class <\' || classiri || \'> because it is used by other quad map objects, e.g., <\' || id_to_iri_nosignal (side_s) || \'>\');\n"
-"}\n"
-"res := vector (vector (\'00000\', \'Previous definition of class <\' || classiri || \'> has been dropped\'));\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#>  { `iri(?:tmpname)` ?p ?o }\n"
+"where { `iri(?:tmpname)` ?p ?o };\n"
+"return vector (vector (\'00000\', \'Previous definition of IRI class <\' || classiri || \'> is identical to the new one, not touched\'));\n"
+"}\n"
+"signal (\'22023\', \'Can not change class <\' || classiri || \'> because it is used by other quad map objects, e.g., <\' || id_to_iri_nosignal (side_s) || \'>\');\n"
+"}\n"
+"res := vector (vector (\'00000\', \'Previous definition of class <\' || classiri || \'> has been dropped\'));\n"
+"}\n"
+"else\n"
+"res := vector ();\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }\n"
+"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"where { ?s ?p ?o . filter (?s = iri(?:classiri)) };\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }\n"
+"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"where { ?s ?p ?o . filter (?s = iri(?:superformatsid)) };\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:classiri)`\n"
+"rdf:type virtrdf:QuadMapFormat;\n"
+"virtrdf:inheritFrom `iri(?:basetypeiri)`;\n"
+"virtrdf:noInherit virtrdf:qmfName ;\n"
+"virtrdf:noInherit virtrdf:qmfCustomString1 ;\n"
+"virtrdf:qmfName `bif:concat (?:basetype, \'-user-\', ?:origclassiri)` ;\n"
+"virtrdf:qmfColumnCount ?:arglist_len ;\n"
+"virtrdf:qmfCustomString1 ?:uriprintname ;\n"
+"virtrdf:qmfSuperFormats `iri(?:superformatsid)` ;\n"
+"virtrdf:qmfIsBijection ?:bij ;\n"
+"virtrdf:qmfDerefFlags ?:deref ;\n"
+"virtrdf:qmfValRange-rvrRestrictions\n"
+"virtrdf:SPART_VARR_IS_REF ,\n"
+"virtrdf:SPART_VARR_IS_IRI ,\n"
+"virtrdf:SPART_VARR_IRI_CALC .\n"
+"`iri(?:superformatsid)`\n"
+"rdf:type virtrdf:array-of-QuadMapFormat };\n"
+"if (isnotnull)\n"
+"{\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:classiri)`\n"
+"virtrdf:qmfValRange-rvrRestrictions\n"
+"virtrdf:SPART_VARR_NOT_NULL };\n"
+"}\n"
+"if (sffs is not null)\n"
+"{\n"
+"declare sff_count, sff_ctr integer;\n"
+"declare sffsid varchar;\n"
+"sffsid := classiri || \'--Sprintffs\';\n"
+"sff_count := length (sffs);\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }\n"
+"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"where { ?s ?p ?o . filter (?s = iri(?:sffsid)) };\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:classiri)`\n"
+"virtrdf:qmfValRange-rvrRestrictions\n"
+"virtrdf:SPART_VARR_SPRINTFF ;\n"
+"virtrdf:qmfValRange-rvrSprintffs `iri(?:sffsid)` ;\n"
+"virtrdf:qmfValRange-rvrSprintffCount ?:sff_count .\n"
+"`iri(?:sffsid)`\n"
+"rdf:type virtrdf:array-of-string };\n"
+"for (sff_ctr := 0; sff_ctr < sff_count; sff_ctr := sff_ctr + 1)\n"
+"{\n"
+"declare sff varchar;\n"
+"sff := sffs [sff_ctr];\n"
+"sff := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (sff);\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:sffsid)`\n"
+"`iri (bif:sprintf (\"%s%d\", str (rdf:_), ?:sff_ctr+1))` ?:sff };\n"
+"}\n"
+"}\n"
+"commit work;\n"
+"return vector_concat (res, vector (vector (\'00000\', \'IRI class <\' || classiri || \'> has been defined (inherited from rdfdf:\' || basetype || \') using \' || uriprintname)));\n"
+"}\n"
+"--src sparql.sql:10399\n";
+
+static const char *proc283 = 
+"#line 10566 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT (in classiri varchar, in iritmpl varchar, in arglist any, in options any, in origclassiri varchar := null) returns any\n"
+"{\n"
+"declare graphiri varchar;\n"
+"declare sprintffsid, superformatsid, nullablesuperformatid varchar;\n"
+"declare basetype, basetypeiri varchar;\n"
+"declare const_dt, dt_expn, const_lang varchar;\n"
+"declare bij, deref integer;\n"
+"declare sffs, res any;\n"
+"declare argctr, arglist_len, isnotnull, sff_ctr, sff_count, bij_sff_count integer;\n"
+"declare needs_arg_dtps integer;\n"
+"declare arg_dtps varchar;\n"
+"graphiri := DB.DBA.JSO_SYS_GRAPH ();\n"
+"const_dt := get_keyword_ucase (\'DATATYPE\', options);\n"
+"const_lang := get_keyword_ucase (\'LANG\', options);\n"
+"bij := get_keyword_ucase (\'BIJECTION\', options, 0);\n"
+"deref := get_keyword_ucase (\'DEREF\', options, 0);\n"
+"sffs := get_keyword_ucase (\'RETURNS\', options);\n"
+"if (sffs is null)\n"
+"sffs := vector (iritmpl);\n"
+"sff_count := length (sffs);\n"
+"iritmpl := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (iritmpl);\n"
+"sprintffsid := classiri || \'--Sprintffs\';\n"
+"superformatsid := classiri || \'--SuperFormats\';\n"
+"nullablesuperformatid := null;\n"
+"res := vector ();\n"
+"foreach (any arg in arglist) do\n"
+"if (UNAME\'in\' <> arg[0])\n"
+"signal (\'22023\', \'Only \"in\" parameters are now supported in argument lists of class formats, \"\' || arg[0] || \'\" is not supported in CREATE IRI CLASS <\' || classiri || \'>\' );\n"
+"arglist_len := length (arglist);\n"
+"isnotnull := 1;\n"
+"needs_arg_dtps := 0;\n"
+"arg_dtps := \'\';\n"
+"if (arglist_len <> 1)\n"
+"{\n"
+"declare type_name varchar;\n"
+"declare dtp integer;\n"
+"if (arglist_len = 0)\n"
+"basetype := \'zeropart-literal\';\n"
+"else\n"
+"basetype := \'multipart-literal\';\n"
+"for (argctr := 0; (argctr < arglist_len) and isnotnull; argctr := argctr + 1)\n"
+"{\n"
+"if (not (coalesce (arglist[argctr][3], 0)))\n"
+"isnotnull := 0;\n"
+"type_name := lower (arglist[argctr][2]);\n"
+"dtp := case (type_name)\n"
+"when \'integer\' then __tag of integer\n"
+"when \'varchar\' then __tag of varchar\n"
+"when \'date\' then __tag of date\n"
+"when \'datetime\' then __tag of datetime\n"
+"when \'doubleprecision\' then __tag of double precision\n"
+"when \'numeric\' then __tag of numeric\n"
+"when \'nvarchar\' then __tag of nvarchar\n"
+"else 255 end;\n"
+"if (type_name = \'nvarchar\')\n"
+"needs_arg_dtps := 1;\n"
+"arg_dtps := arg_dtps || chr (bit_and (127, dtp));\n"
+"}\n"
+"}\n"
+"else /* arglist is 1 item long */\n"
+"{\n"
+"basetype := lower (arglist[0][2]);\n"
+"if (not (basetype in (\'integer\', \'varchar\', \'date\', \'datetime\', \'doubleprecision\', \'numeric\', \'nvarchar\')))\n"
+"signal (\'22023\', \'The datatype \"\' || basetype || \'\" is not supported in CREATE LITERAL CLASS <\' || classiri || \'>\' );\n"
+"basetype := \'sql-\' || basetype || \'-literal\';\n"
+"if (not (coalesce (arglist[0][3], 0)))\n"
+"isnotnull := 0;\n"
+"if (basetype = \'nvarchar\')\n"
+"{\n"
+"needs_arg_dtps := 1;\n"
+"arg_dtps := chr (bit_and (127, __tag of nvarchar));\n"
+"}\n"
+"}\n"
+"if (not isnotnull)\n"
+"basetype := basetype || \'-nullable\';\n"
+"basetypeiri := \'http://www.openlinksw.com/virtrdf-data-formats#\' || basetype;\n"
+"if (const_dt is not null)\n"
+"dt_expn := \' \' || WS.WS.STR_SQL_APOS (const_dt);\n"
+"else\n"
+"dt_expn := NULL;\n"
+"if (origclassiri is null)\n"
+"{\n"
+"if (isnotnull and (arglist_len > 0))\n"
+"{\n"
+"declare arglist_copy any;\n"
+"if (classiri like \'%-nullable\')\n"
+"signal (\'22023\', \'The name of non-nullable literal class in CREATE LITERAL CLASS <\' || classiri || \'> is misleading\' );\n"
+"arglist_copy := arglist;\n"
+"for (argctr := 0; (argctr < arglist_len); argctr := argctr + 1)\n"
+"arglist_copy[argctr][3] := 0;\n"
+"nullablesuperformatid := classiri || \'-nullable\';\n"
+"res := vector_concat (res,\n"
+"DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT (nullablesuperformatid, iritmpl, arglist_copy, options, NULL) );\n"
+"}\n"
+"origclassiri := classiri;\n"
+"}\n"
+"if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat\', 1))\n"
+"{\n"
+"declare side_s IRI_ID;\n"
+"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);\n"
+"if (side_s is not null)\n"
+"{\n"
+"declare tmpname varchar;\n"
+"declare old_descr, new_descr any;\n"
+"tmpname := uuid();\n"
+"{ declare exit handler for sqlstate \'*\' {\n"
+"signal (\'22023\', \'Can not change literal class <\' || classiri || \'> because it is used by other quad map objects, e.g., <\' || id_to_iri_nosignal (side_s) || \'>; moreover, the new declaration may be invalid.\'); };\n"
+"DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT (tmpname, iritmpl, arglist, options, classiri);\n"
+"}\n"
+"old_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(classiri);\n"
+"new_descr := DB.DBA.RDF_QM_CBD_OF_IRI_CLASS(tmpname);\n"
+"if (md5 (serialize (old_descr)) = md5 (serialize (new_descr)))\n"
+"{\n"
+"sparql define input:storage \"\"\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#>  { `iri(?:tmpname)` ?p ?o }\n"
+"where { `iri(?:tmpname)` ?p ?o };\n"
+"return vector (vector (\'00000\', \'Previous definition of literal class <\' || classiri || \'> is identical to the new one, not touched\'));\n"
+"}\n"
+"signal (\'22023\', \'Can not change IRI class <\' || classiri || \'> because it is used by other quad map objects, e.g., <\' || id_to_iri_nosignal (side_s) || \'>\');\n"
+"}\n"
+"res := vector_concat (res, vector (vector (\'00000\', \'Previous definition of IRI class <\' || classiri || \'> has been dropped\')));\n"
+"}\n"
+"else\n"
+"res := vector ();\n"
+"if (bij)\n"
+"{\n"
+"if (__sprintff_is_proven_unparseable (iritmpl))\n"
+"signal (\'22023\', \'Literal class <\' || classiri || \'> has OPTION (BIJECTION) but its format string can not be unambiguously parsed by sprintf_inverse()\');\n"
+"}\n"
+"else\n"
+"{\n"
+"if (__sprintff_is_proven_bijection (iritmpl))\n"
+"bij := 1;\n"
+"}\n"
+"bij_sff_count := 0;\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }\n"
+"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"where { ?s ?p ?o . filter (?s = iri(?:sprintffsid)) };\n"
+"for (sff_ctr := 0; sff_ctr < sff_count; sff_ctr := sff_ctr + 1)\n"
+"{\n"
+"declare sff varchar;\n"
+"sff := sffs [sff_ctr];\n"
+"sff := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (sff);\n"
+"if ((not bij) and __sprintff_is_proven_bijection (sff))\n"
+"bij_sff_count := bij_sff_count + 1;\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:sprintffsid)`\n"
+"`iri (bif:sprintf (\"%s%d\", str (rdf:_), ?:sff_ctr+1))` ?:sff };\n"
 "}\n"
-"else\n"
-"res := vector ();\n"
+"if ((not bij) and (bij_sff_count = sff_count) and (bij_sff_count > 0))\n"
+"bij := 1;\n"
+"if (not needs_arg_dtps)\n"
+"arg_dtps := NULL;\n"
 "sparql define input:storage \"\"\n"
 "prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
 "delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }\n"
@@ -9192,72 +11039,45 @@ static const char *proc251 =
 "where { ?s ?p ?o . filter (?s = iri(?:superformatsid)) };\n"
 "sparql define input:storage \"\"\n"
 "prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
-"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"{\n"
 "`iri(?:classiri)`\n"
-"rdf:type virtrdf:QuadMapFormat;\n"
+"rdf:type virtrdf:QuadMapFormat ;\n"
 "virtrdf:inheritFrom `iri(?:basetypeiri)`;\n"
 "virtrdf:noInherit virtrdf:qmfName ;\n"
 "virtrdf:noInherit virtrdf:qmfCustomString1 ;\n"
 "virtrdf:qmfName `bif:concat (?:basetype, \'-user-\', ?:origclassiri)` ;\n"
+"virtrdf:qmfCustomString1 ?:iritmpl ;\n"
+"virtrdf:qmfDatatypeOfShortTmpl ?:dt_expn ;\n"
 "virtrdf:qmfColumnCount ?:arglist_len ;\n"
-"virtrdf:qmfCustomString1 ?:uriprintname ;\n"
 "virtrdf:qmfSuperFormats `iri(?:superformatsid)` ;\n"
 "virtrdf:qmfIsBijection ?:bij ;\n"
 "virtrdf:qmfDerefFlags ?:deref ;\n"
-"virtrdf:qmfValRange-rvrRestrictions\n"
-"virtrdf:SPART_VARR_IS_REF ,\n"
-"virtrdf:SPART_VARR_IS_IRI ,\n"
-"virtrdf:SPART_VARR_IRI_CALC .\n"
+"virtrdf:qmfArgDtps ?:arg_dtps ;\n"
+"virtrdf:qmfValRange-rvrRestrictions virtrdf:SPART_VARR_IS_LIT ;\n"
+"virtrdf:qmfValRange-rvrDatatype ?:const_dt ;\n"
+"virtrdf:qmfValRange-rvrLanguage ?:const_lang ;\n"
+"virtrdf:qmfValRange-rvrSprintffs `iri(?:sprintffsid)` ;\n"
+"virtrdf:qmfValRange-rvrSprintffCount ?:sff_count .\n"
+"`iri(?:sprintffsid)`\n"
+"rdf:type virtrdf:array-of-string .\n"
 "`iri(?:superformatsid)`\n"
 "rdf:type virtrdf:array-of-QuadMapFormat };\n"
-"if (isnotnull)\n"
-"{\n"
-"sparql define input:storage \"\"\n"
-"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
-"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
-"`iri(?:classiri)`\n"
-"virtrdf:qmfValRange-rvrRestrictions\n"
-"virtrdf:SPART_VARR_NOT_NULL };\n"
-"}\n"
-"if (sffs is not null)\n"
+"if (const_dt is not null)\n"
 "{\n"
-"declare sff_count, sff_ctr integer;\n"
-"declare sffsid varchar;\n"
-"sffsid := classiri || \'--Sprintffs\';\n"
-"sff_count := length (sffs);\n"
-"sparql define input:storage \"\"\n"
-"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
-"delete from graph <http://www.openlinksw.com/schemas/virtrdf#> { ?s ?p ?o }\n"
-"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
-"where { ?s ?p ?o . filter (?s = iri(?:sffsid)) };\n"
 "sparql define input:storage \"\"\n"
 "prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
 "insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
 "`iri(?:classiri)`\n"
-"virtrdf:qmfValRange-rvrRestrictions\n"
-"virtrdf:SPART_VARR_SPRINTFF ;\n"
-"virtrdf:qmfValRange-rvrSprintffs `iri(?:sffsid)` ;\n"
-"virtrdf:qmfValRange-rvrSprintffCount ?:sff_count .\n"
-"`iri(?:sffsid)`\n"
-"rdf:type virtrdf:array-of-string };\n"
-"for (sff_ctr := 0; sff_ctr < sff_count; sff_ctr := sff_ctr + 1)\n"
-"{\n"
-"declare sff varchar;\n"
-"sff := sffs [sff_ctr];\n"
-"sff := DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE (sff);\n"
-"sparql define input:storage \"\"\n"
-"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
-"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
-"`iri(?:sffsid)`\n"
-"`iri (bif:sprintf (\"%s%d\", str (rdf:_), ?:sff_ctr+1))` ?:sff };\n"
-"}\n"
+"virtrdf:qmfValRange-rvrRestrictions virtrdf:SPART_VARR_TYPED };\n"
 "}\n"
-"return vector_concat (res, vector (vector (\'00000\', \'IRI class <\' || classiri || \'> has been defined (inherited from rdfdf:\' || basetype || \') using \' || uriprintname)));\n"
+"commit work;\n"
+"return vector_concat (res, vector_concat (res, vector (vector (\'00000\', \'Literal class <\' || classiri || \'> has been defined (inherited from rdfdf:\' || basetype || \')\'))));\n"
 "}\n"
-"--src sparql.sql:8812\n";
+"--src sparql.sql:10564\n";
 
-static const char *proc252 = 
-"#line 8975 \"[executable]/sparql.sql\"\n"
+static const char *proc284 = 
+"#line 10772 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS (in classiri varchar, in fheaders any, in options any, in origclassiri varchar := null) returns any\n"
 "{\n"
 "/*\n"
@@ -9266,11 +11086,12 @@ static const char *proc252 =
 "declare uriprint any;\n"
 "declare uriprintname, uriparsename varchar;\n"
 "declare arglist_len integer;\n"
-"declare superformatsid varchar;\n"
+"declare superformatsid, nullablesuperformatid varchar;\n"
 "declare res any;\n"
 "declare const_dt, dt_expn, const_lang varchar;\n"
 "declare bij, deref integer;\n"
 "superformatsid := classiri || \'--SuperFormats\';\n"
+"nullablesuperformatid := null;\n"
 "const_dt := get_keyword_ucase (\'DATATYPE\', options);\n"
 "const_lang := get_keyword_ucase (\'LANG\', options);\n"
 "bij := get_keyword_ucase (\'BIJECTION\', options, 0);\n"
@@ -9308,7 +11129,7 @@ static const char *proc252 =
 "if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat\', 1))\n"
 "{\n"
 "declare side_s IRI_ID;\n"
-"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);\n"
+"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);\n"
 "if (side_s is not null)\n"
 "{\n"
 "declare tmpname varchar;\n"
@@ -9371,20 +11192,21 @@ static const char *proc252 =
 "`iri(?:classiri)`\n"
 "virtrdf:qmfValRange-rvrRestrictions virtrdf:SPART_VARR_TYPED };\n"
 "}\n"
+"commit work;\n"
 "return vector_concat (res, vector (vector (\'00000\', \'LITERAL class <\' || classiri || \'> has been defined (inherited from rdfdf:\' || basetype || \') using \' || uriprintname)));\n"
 "}\n"
-"--src sparql.sql:8973\n";
+"--src sparql.sql:10770\n";
 
-static const char *proc253 = 
-"#line 9093 \"[executable]/sparql.sql\"\n"
+static const char *proc285 = 
+"#line 10892 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_BAD_CLASS_INV_FUNCTION (inout val any) returns any\n"
 "{\n"
 "return NULL;\n"
 "}\n"
-"--src sparql.sql:9091\n";
+"--src sparql.sql:10890\n";
 
-static const char *proc254 = 
-"#line 9100 \"[executable]/sparql.sql\"\n"
+static const char *proc286 = 
+"#line 10899 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.SQLNAME_NOTATION_TO_NAME (in str varchar) returns varchar\n"
 "{\n"
 "if (\'\' = str)\n"
@@ -9393,10 +11215,10 @@ static const char *proc254 =
 "return subseq (str, 1, length (str) - 1);\n"
 "return fix_identifier_case (str);\n"
 "}\n"
-"--src sparql.sql:9098\n";
+"--src sparql.sql:10897\n";
 
-static const char *proc255 = 
-"#line 9111 \"[executable]/sparql.sql\"\n"
+static const char *proc287 = 
+"#line 10910 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.SQLQNAME_NOTATION_TO_QNAME (in str varchar, in expected_part_count integer) returns varchar\n"
 "{\n"
 "declare part_ctr, dot_pos integer;\n"
@@ -9432,10 +11254,10 @@ static const char *proc255 =
 "return NULL;\n"
 "return res || name;\n"
 "}\n"
-"--src sparql.sql:9109\n";
+"--src sparql.sql:10908\n";
 
-static const char *proc256 = 
-"#line 9148 \"[executable]/sparql.sql\"\n"
+static const char *proc288 = 
+"#line 10947 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_CHECK_CLASS_FUNCTION_HEADERS (inout fheaders any, in is_iri_decl integer, in only_one_arg integer, in pdesc varchar, in invdesc varchar, in bij integer, in deref integer)\n"
 "{\n"
 "declare uriprint any;\n"
@@ -9520,10 +11342,10 @@ static const char *proc256 =
 "signal (\'22023\', invdesc || \' function \' || uriparse[0] || \' should have nullable argument\');\n"
 "}\n"
 "}\n"
-"--src sparql.sql:9146\n";
+"--src sparql.sql:10945\n";
 
-static const char *proc257 = 
-"#line 9234 \"[executable]/sparql.sql\"\n"
+static const char *proc289 = 
+"#line 11033 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_SUBCLASS (in subclassiri varchar, in superclassiri varchar) returns any\n"
 "{\n"
 "DB.DBA.RDF_QM_ASSERT_JSO_TYPE (subclassiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat\');\n"
@@ -9532,12 +11354,13 @@ static const char *proc257 =
 "prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
 "insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
 "`iri(?:subclassiri)` virtrdf:isSubclassOf `iri(?:superclassiri)` };\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'IRI class <\' || subclassiri || \'> is now known as a subclass of <\' || superclassiri || \'>\'));\n"
 "}\n"
-"--src sparql.sql:9232\n";
+"--src sparql.sql:11031\n";
 
-static const char *proc258 = 
-"#line 9246 \"[executable]/sparql.sql\"\n"
+static const char *proc290 = 
+"#line 11046 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DROP_CLASS (in classiri varchar, in silent integer := 0) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -9551,16 +11374,17 @@ static const char *proc258 =
 "if (DB.DBA.RDF_QM_ASSERT_JSO_TYPE (classiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat\', 1))\n"
 "{\n"
 "declare side_s IRI_ID;\n"
-"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri);\n"
+"side_s := DB.DBA.RDF_QM_GC_SUBTREE (classiri, 2);\n"
 "if (side_s is not null)\n"
 "signal (\'22023\', \'Can not drop class <\' || classiri || \'> because it is used by other quad map objects, e.g., <\' || id_to_iri_nosignal (side_s) || \'>\');\n"
 "}\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'Previous definition of class <\' || classiri || \'> has been dropped\'));\n"
 "}\n"
-"--src sparql.sql:9244\n";
+"--src sparql.sql:11044\n";
 
-static const char *proc259 = 
-"#line 9267 \"[executable]/sparql.sql\"\n"
+static const char *proc291 = 
+"#line 11068 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DROP_QUAD_STORAGE (in storage varchar, in silent integer := 0) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -9579,12 +11403,13 @@ static const char *proc259 =
 "`iri(?:storage)` ?p ?o\n"
 "}\n"
 "where { graph ?:graphiri { `iri(?:storage)` ?p ?o } };\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'Quad storage <\' || storage || \'> is removed from the quad mapping schema\'));\n"
 "}\n"
-"--src sparql.sql:9265\n";
+"--src sparql.sql:11066\n";
 
-static const char *proc260 = 
-"#line 9289 \"[executable]/sparql.sql\"\n"
+static const char *proc292 = 
+"#line 11091 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_QUAD_STORAGE (in storage varchar) returns any\n"
 "{\n"
 "declare graphiri, qsusermaps varchar;\n"
@@ -9609,12 +11434,13 @@ static const char *proc260 =
 "virtrdf:qsUserMaps `iri(?:qsusermaps)` .\n"
 "`iri(?:qsusermaps)`\n"
 "rdf:type virtrdf:array-of-QuadMap };\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'A new empty quad storage <\' || storage || \'> is added to the quad mapping schema\'));\n"
 "}\n"
-"--src sparql.sql:9287\n";
+"--src sparql.sql:11089\n";
 
-static const char *proc261 = 
-"#line 9317 \"[executable]/sparql.sql\"\n"
+static const char *proc293 = 
+"#line 11120 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_BEGIN_ALTER_QUAD_STORAGE (in storage varchar) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -9624,12 +11450,13 @@ static const char *proc261 =
 "prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
 "insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
 "`iri(?:storage)` virtrdf:qsAlterInProgress `bif:now NIL` };\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'Quad storage <\' || storage || \'> is flagged as being edited\'));\n"
 "}\n"
-"--src sparql.sql:9315\n";
+"--src sparql.sql:11118\n";
 
-static const char *proc262 = 
-"#line 9330 \"[executable]/sparql.sql\"\n"
+static const char *proc294 = 
+"#line 11134 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_END_ALTER_QUAD_STORAGE (in storage varchar) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -9641,12 +11468,13 @@ static const char *proc262 =
 "`iri(?:storage)` virtrdf:qsAlterInProgress ?dtstart }\n"
 "where { graph ?:graphiri {\n"
 "`iri(?:storage)` virtrdf:qsAlterInProgress ?dtstart } };\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'Quad storage <\' || storage || \'> is unflagged and can be edited by other transactions\'));\n"
 "}\n"
-"--src sparql.sql:9328\n";
+"--src sparql.sql:11132\n";
 
-static const char *proc263 = 
-"#line 9345 \"[executable]/sparql.sql\"\n"
+static const char *proc295 = 
+"#line 11150 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_STORE_ATABLES (in qmvid varchar, in atablesid varchar, inout atables any)\n"
 "{\n"
 "declare atablectr, atablecount integer;\n"
@@ -9675,10 +11503,10 @@ static const char *proc263 =
 "virtrdf:qmvaTableName ?:qtable };\n"
 "}\n"
 "}\n"
-"--src sparql.sql:9343\n";
+"--src sparql.sql:11148\n";
 
-static const char *proc264 = 
-"#line 9375 \"[executable]/sparql.sql\"\n"
+static const char *proc296 = 
+"#line 11180 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_FT_USAGE (in ft_type varchar, in ft_alias varchar, in ft_aliased_col any, in sqlcols any, in conds any, in options any := null)\n"
 "{\n"
 "declare ft_tbl, ft_col, ftid, ftcondsid varchar;\n"
@@ -9742,10 +11570,10 @@ static const char *proc264 =
 "}\n"
 "return ftid;\n"
 "}\n"
-"--src sparql.sql:9373\n";
+"--src sparql.sql:11178\n";
 
-static const char *proc265 = 
-"#line 9440 \"[executable]/sparql.sql\"\n"
+static const char *proc297 = 
+"#line 11245 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_CHECK_COLUMNS_FORM_KEY (in sqlcols any) returns integer\n"
 "{\n"
 "declare alias, tbl varchar;\n"
@@ -9783,10 +11611,10 @@ static const char *proc265 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src sparql.sql:9438\n";
+"--src sparql.sql:11243\n";
 
-static const char *proc266 = 
-"#line 9479 \"[executable]/sparql.sql\"\n"
+static const char *proc298 = 
+"#line 11284 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_MAP_VALUE (in qmv any, in fldname varchar, inout tablename varchar, in o_dt any := null, in o_lang any := null) returns varchar\n"
 "{\n"
 "/* iqi qmv: vector ( UNAME\'http://www.openlinksw.com/schemas/oplsioc#user_iri\' ,\n"
@@ -10062,10 +11890,10 @@ static const char *proc266 =
 "}\n"
 "return qmvid;\n"
 "}\n"
-"--src sparql.sql:9477\n";
+"--src sparql.sql:11282\n";
 
-static const char *proc267 = 
-"#line 9756 \"[executable]/sparql.sql\"\n"
+static const char *proc299 = 
+"#line 11561 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_NORMALIZE_QMV (\n"
 "inout qmv any, inout qmvfix any, inout qmvid any,\n"
 "in can_be_literal integer, in fldname varchar, inout tablename varchar, in o_dt any := null, in o_lang any := null )\n"
@@ -10086,10 +11914,10 @@ static const char *proc267 =
 "qmvfix := qmv;\n"
 "\n"
 "}\n"
-"--src sparql.sql:9754\n";
+"--src sparql.sql:11559\n";
 
-static const char *proc268 = 
-"#line 9778 \"[executable]/sparql.sql\"\n"
+static const char *proc300 = 
+"#line 11583 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_DEFINE_MAPPING (in storage varchar,\n"
 "in qmrawid varchar, in qmid varchar, in qmparentid varchar,\n"
 "in qmv_g any, in qmv_s any, in qmv_p any, in qmv_o any, in o_dt any, in o_lang any,\n"
@@ -10154,7 +11982,7 @@ static const char *proc268 =
 "qm_empty := NULL;\n"
 "if (tablename is null)\n"
 "{\n"
-"tablename := \'DB.DBA.SYS_FAKE_1\';\n"
+"tablename := \'DB.DBA.SYS_IDONLY_ONE\';\n"
 "if (0 < length (conds))\n"
 "signal (\'22023\', \'Quad Mapping <\' || qmid || \'> has four constants and no one quad map value; it does not access tables so it can not have WHERE conditions\');\n"
 "}\n"
@@ -10261,16 +12089,18 @@ static const char *proc268 =
 "`iri (bif:sprintf (\"%s%d\", str (rdf:_), ?:condctr+1))` ?:sqlcond };\n"
 "}\n"
 "DB.DBA.RDF_ADD_qmAliasesKeyrefdByQuad (qmid);\n"
+"commit work;\n"
 "if (qm_is_default is not null)\n"
 "DB.DBA.RDF_QM_SET_DEFAULT_MAPPING (storage, qmid);\n"
 "else\n"
 "DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE (storage, qmparentid, qmid, qm_order);\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'Quad map <\' || qmid || \'> has been created and added to the <\' || storage || \'>\'));\n"
 "}\n"
-"--src sparql.sql:9776\n";
+"--src sparql.sql:11581\n";
 
-static const char *proc269 = 
-"#line 9957 \"[executable]/sparql.sql\"\n"
+static const char *proc301 = 
+"#line 11764 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_QM_ATTACH_MAPPING (in storage varchar, in source varchar, in opts any) returns any\n"
 "{\n"
 "declare graphiri varchar;\n"
@@ -10310,12 +12140,13 @@ static const char *proc269 =
 "DB.DBA.RDF_QM_SET_DEFAULT_MAPPING (storage, qmid);\n"
 "else\n"
 "DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE (storage, NULL, qmid, NULL /* !!!TBD: place real value instead of constant NULL */);\n"
+"commit work;\n"
 "return vector (vector (\'00000\', \'Quad map <\' || qmid || \'> is added to the storage <\' || storage || \'>\'));\n"
 "}\n"
-"--src sparql.sql:9955\n";
+"--src sparql.sql:11762\n";
 
-static const char *proc270 = 
-"#line 10000 \"[executable]/sparql.sql\"\n"
+static const char *proc302 = 
+"#line 11808 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE (in storage varchar, in qmparent varchar, in qmid varchar, in qmorder integer)\n"
 "{\n"
 "declare graphiri, lstiri varchar;\n"
@@ -10405,10 +12236,10 @@ static const char *proc270 =
 "ctr := ctr + 1;\n"
 "}\n"
 "}\n"
-"--src sparql.sql:9998\n";
+"--src sparql.sql:11806\n";
 
-static const char *proc271 = 
-"#line 10091 \"[executable]/sparql.sql\"\n"
+static const char *proc303 = 
+"#line 11899 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE (in storage varchar, in qmparent varchar, in qmid varchar)\n"
 "{\n"
 "declare graphiri, lstiri varchar;\n"
@@ -10483,10 +12314,10 @@ static const char *proc271 =
 "}\n"
 "}\n"
 "}\n"
-"--src sparql.sql:10089\n";
+"--src sparql.sql:11897\n";
 
-static const char *proc272 = 
-"#line 10167 \"[executable]/sparql.sql\"\n"
+static const char *proc304 = 
+"#line 11975 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QM_SET_DEFAULT_MAPPING (in storage varchar, in qmid varchar)\n"
 "{\n"
 "declare graphiri, old_qmid varchar;\n"
@@ -10503,11 +12334,200 @@ static const char *proc272 =
 "}\n"
 "sparql define input:storage \"\"\n"
 "insert in graph <http://www.openlinksw.com/schemas/virtrdf#> { `iri(?:storage)` virtrdf:qsDefaultMap `iri(?:qmid)` . };\n"
+"commit work;\n"
 "}\n"
-"--src sparql.sql:10165\n";
+"--src sparql.sql:11973\n";
 
-static const char *proc273 = 
-"#line 10186 \"[executable]/sparql.sql\"\n"
+static const char *proc305 = 
+"#line 11995 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_SML_DROP (in smliri varchar, in silent integer, in compose_report integer := 1) returns any\n"
+"{\n"
+"declare report, affected any;\n"
+"report := \'\';\n"
+"vectorbld_init (affected);\n"
+"for (sparql define input:storage \"\"\n"
+"select ?storageiri\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` } ) do\n"
+"{\n"
+"report := report || \'SPARQL macro library <\' || smliri || \'> has been detached from quad storage <\' || \"storageiri\" || \'>\\n\';\n"
+"vectorbld_acc (affected, \"storageiri\");\n"
+"}\n"
+"vectorbld_final (affected);\n"
+"sparql define input:storage \"\"\n"
+"delete from virtrdf:\n"
+"{ ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` }\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` };\n"
+"commit work;\n"
+"if (not exists (\n"
+"sparql define input:storage \"\"\n"
+"select 1 from virtrdf: where { `iri(?:smliri)` ?p ?o } ) )\n"
+"{\n"
+"DB.DBA.RDF_QM_APPLY_CHANGES (null, affected);\n"
+"if (silent)\n"
+"{\n"
+"if (compose_report)\n"
+"return report || \'SPARQL macro library <\' || smliri || \'> does not exists, nothing to delete\';\n"
+"else\n"
+"return 0;\n"
+"}\n"
+"else\n"
+"signal (\'22023\', \'SPARQL macro library <\' || smliri || \'> does not exists, nothing to delete\');\n"
+"}\n"
+"DB.DBA.RDF_QM_ASSERT_JSO_TYPE (smliri, \'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary\');\n"
+"sparql define input:storage \"\"\n"
+"delete from graph virtrdf: {\n"
+"`iri(?:smliri)` ?p ?o }\n"
+"from virtrdf:\n"
+"where { `iri(?:smliri)` ?p ?o };\n"
+"DB.DBA.RDF_QM_APPLY_CHANGES (vector (\'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary\', smliri), affected);\n"
+"if (compose_report)\n"
+"return report || \'SPARQL macro library <\' || smliri || \'> has been deleted\';\n"
+"else\n"
+"return 1;\n"
+"}\n"
+"--src sparql.sql:11993\n";
+
+static const char *proc306 = 
+"#line 12044 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_SML_CREATE (in smliri varchar, in txt varchar) returns any\n"
+"{\n"
+"declare stat, msg, smliri_copy varchar;\n"
+"declare mdata, rset, affected any;\n"
+"DB.DBA.RDF_QM_ASSERT_JSO_TYPE (smliri, \'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary\', 1);\n"
+"stat := \'00000\';\n"
+"if (__tag (txt) = __tag of nvarchar)\n"
+"txt := charset_recode (txt, \'_WIDE_\', \'UTF-8\');\n"
+"exec (\'sparql define input:macro-lib-ignore-create \"yes\" define input:disable-storage-macro-lib \"yes\" \' || txt, stat, msg, null, 1, mdata, rset);\n"
+"if (stat <> \'00000\')\n"
+"signal (stat, msg);\n"
+"if (length (rset))\n"
+"signal (\'SPAR0\', \'Assertion failed: the validation query of macro library should return nothing\');\n"
+"vectorbld_init (affected);\n"
+"for (sparql define input:storage \"\"\n"
+"select ?storageiri\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary `iri(?:smliri)` } ) do\n"
+"{\n"
+"vectorbld_acc (affected, \"storageiri\");\n"
+"}\n"
+"smliri_copy := smliri;\n"
+"vectorbld_acc (affected, smliri_copy);\n"
+"vectorbld_final (affected);\n"
+"sparql define input:storage \"\"\n"
+"delete from graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:smliri)` ?p ?o }\n"
+"from <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"where { `iri(?:smliri)` ?p ?o };\n"
+"commit work;\n"
+"sparql define input:storage \"\"\n"
+"insert in graph <http://www.openlinksw.com/schemas/virtrdf#> {\n"
+"`iri(?:smliri)` a virtrdf:SparqlMacroLibrary ; virtrdf:smlSourceText ?:txt };\n"
+"DB.DBA.RDF_QM_APPLY_CHANGES (null, affected);\n"
+"return \'SPARQL macro library <\' || smliri || \'> has been (re)created\';\n"
+"}\n"
+"--src sparql.sql:12042\n";
+
+static const char *proc307 = 
+"#line 12082 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY (in storageiri varchar, in args any) returns any\n"
+"{\n"
+"declare expected_smliri varchar;\n"
+"declare old_ctr, expected_found integer;\n"
+"declare silent, report any;\n"
+"expected_smliri := get_keyword_ucase (\'ID\', args, NULL);\n"
+"silent := get_keyword_ucase (\'SILENT\', args, 0);\n"
+"expected_found := 0;\n"
+"old_ctr := 0;\n"
+"vectorbld_init (report);\n"
+"for (sparql define input:storage \"\"\n"
+"select ?oldsmliri\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri } ) do\n"
+"{\n"
+"if (expected_smliri is not null and cast (expected_smliri as nvarchar) <> cast (\"oldsmliri\" as nvarchar))\n"
+"{\n"
+"if (silent)\n"
+"vectorbld_acc (report, vector (\'00100\', \'The SPARQL macro library to detach from <\' || storageiri || \'> is <\' || expected_smliri || \'> but actually attached one is <\' || \"oldsmliri\" || \'>, nothing to do\'));\n"
+"else\n"
+"signal (\'22023\', \'The SPARQL macro library to detach from <\' || storageiri || \'> is <\' || expected_smliri || \'> but actually attached one is <\' || \"oldsmliri\" || \'>\');\n"
+"}\n"
+"else\n"
+"{\n"
+"if (expected_smliri is not null)\n"
+"expected_found := 1;\n"
+"vectorbld_acc (report, vector (\'00000\', \'SPARQL macro library <\' || \"oldsmliri\" || \'> has been detached from quad storage <\' || storageiri || \'>\'));\n"
+"}\n"
+"old_ctr := old_ctr + 1;\n"
+"}\n"
+"if (expected_smliri is not null)\n"
+"{\n"
+"sparql define input:storage \"\"\n"
+"delete from virtrdf:\n"
+"{ ?storageiri virtrdf:qsMacroLibrary ?smliri }\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary ?smliri };\n"
+"}\n"
+"else\n"
+"{\n"
+"sparql define input:storage \"\"\n"
+"delete from virtrdf:\n"
+"{ ?storageiri virtrdf:qsMacroLibrary ?smliri }\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary ?smliri };\n"
+"}\n"
+"commit work;\n"
+"if (old_ctr > 1)\n"
+"vectorbld_acc (report, vector (\'00100\', \'Note that there was a configuration error: more than one macro library was attached to the quad storage <\' || storageiri || \'>\'));\n"
+"else if (old_ctr = 0)\n"
+"{\n"
+"if (silent)\n"
+"vectorbld_acc (report, vector (\'00100\', \'No one SPARQL macro library is attached to the quad storage <\' || storageiri || \'>, nothing to detach\'));\n"
+"else\n"
+"signal (\'22023\', \'No one SPARQL macro library is attached to the quad storage <\' || storageiri || \'>, nothing to detach\');\n"
+"}\n"
+"vectorbld_final (report);\n"
+"\n"
+"return report;\n"
+"}\n"
+"--src sparql.sql:12080\n";
+
+static const char *proc308 = 
+"#line 12144 \"[executable]/sparql.sql\"\n"
+"create function DB.DBA.RDF_QM_ATTACH_MACRO_LIBRARY (in storageiri varchar, in args any) returns any\n"
+"{\n"
+"declare smliri varchar;\n"
+"smliri := get_keyword_ucase (\'ID\', args, NULL);\n"
+"DB.DBA.RDF_QM_ASSERT_JSO_TYPE (storageiri, \'http://www.openlinksw.com/schemas/virtrdf#QuadStorage\');\n"
+"DB.DBA.RDF_QM_ASSERT_JSO_TYPE (smliri, \'http://www.openlinksw.com/schemas/virtrdf#SparqlMacroLibrary\');\n"
+"declare report any;\n"
+"vectorbld_init (report);\n"
+"for (sparql define input:storage \"\"\n"
+"select ?oldsmliri\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri } ) do\n"
+"{\n"
+"vectorbld_acc (report, vector (\'00000\', \'SPARQL macro library <\' || \"oldsmliri\" || \'> has been detached from quad storage <\' || storageiri || \'>\'));\n"
+"}\n"
+"sparql define input:storage \"\"\n"
+"delete from virtrdf:\n"
+"{ ?storageiri virtrdf:qsMacroLibrary ?oldsmliri }\n"
+"from virtrdf:\n"
+"where { ?storageiri virtrdf:qsMacroLibrary ?oldsmliri };\n"
+"commit work;\n"
+"sparql define input:storage \"\"\n"
+"prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#>\n"
+"insert in graph virtrdf: {\n"
+"`iri(?:storageiri)` virtrdf:qsMacroLibrary `iri(?:smliri)` };\n"
+"vectorbld_acc (report, vector (\'00000\', \'SPARQL macro library <\' || smliri || \'> has been attached to quad storage <\' || storageiri || \'>\'));\n"
+"vectorbld_final (report);\n"
+"return report;\n"
+"}\n"
+"--src sparql.sql:12142\n";
+
+static const char *proc309 = 
+"#line 12175 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_ADD_qmAliasesKeyrefdByQuad (in qm_iri varchar)\n"
 "{\n"
 "declare kr_iri varchar;\n"
@@ -10561,10 +12581,10 @@ static const char *proc273 =
 "}\n"
 "\n"
 "}\n"
-"--src sparql.sql:10184\n";
+"--src sparql.sql:12173\n";
 
-static const char *proc274 = 
-"#line 10241 \"[executable]/sparql.sql\"\n"
+static const char *proc310 = 
+"#line 12230 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_UPGRADE_QUAD_MAP (in qm_iri varchar)\n"
 "{\n"
 "declare keyrefd any;\n"
@@ -10573,21 +12593,22 @@ static const char *proc274 =
 "if (not exists (sparql define input:storage \"\" select (1) from virtrdf: where { `iri(?:qm_iri)` virtrdf:qmAliasesKeyrefdByQuad ?keyrefs }))\n"
 "DB.DBA.RDF_ADD_qmAliasesKeyrefdByQuad (qm_iri);\n"
 "}\n"
-"--src sparql.sql:10239\n";
+"--src sparql.sql:12228\n";
 
-static const char *proc275 = 
-"#line 10251 \"[executable]/sparql.sql\"\n"
+static const char *proc311 = 
+"#line 12240 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_UPGRADE_METADATA ()\n"
 "{\n"
 "for (sparql define input:storage \"\" select ?qm_iri from virtrdf: where { ?qm_iri a virtrdf:QuadMap }) do\n"
 "{\n"
 "DB.DBA.RDF_UPGRADE_QUAD_MAP (\"qm_iri\");\n"
 "}\n"
+"commit work;\n"
 "}\n"
-"--src sparql.sql:10249\n";
+"--src sparql.sql:12238\n";
 
-static const char *proc276 = 
-"#line 10264 \"[executable]/sparql.sql\"\n"
+static const char *proc312 = 
+"#line 12254 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_W (\n"
 "in g_iid IRI_ID, in s_uri varchar, in p_uri varchar,\n"
 "in o_uri varchar, in env any )\n"
@@ -10650,10 +12671,10 @@ static const char *proc276 =
 "rollback work;\n"
 "goto again_2;\n"
 "}\n"
-"--src sparql.sql:10262\n";
+"--src sparql.sql:12252\n";
 
-static const char *proc277 = 
-"#line 10329 \"[executable]/sparql.sql\"\n"
+static const char *proc313 = 
+"#line 12319 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_L_W (\n"
 "in g_iid IRI_ID, in s_uri varchar, in p_uri varchar,\n"
 "in o_val any, in o_type any, in o_lang any, in env any )\n"
@@ -10725,10 +12746,10 @@ static const char *proc277 =
 "rollback work;\n"
 "goto again;\n"
 "}\n"
-"--src sparql.sql:10327\n";
+"--src sparql.sql:12317\n";
 
-static const char *proc278 = 
-"#line 10402 \"[executable]/sparql.sql\"\n"
+static const char *proc314 = 
+"#line 12392 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_NEW_GRAPH_A (inout g varchar, inout g_iid IRI_ID, inout app_env any) {\n"
 "\n"
 "if (__rdf_obj_ft_rule_count_in_graph (g_iid))\n"
@@ -10740,10 +12761,10 @@ static const char *proc278 =
 "else\n"
 "app_env[4] := null;\n"
 "}\n"
-"--src sparql.sql:10400\n";
+"--src sparql.sql:12390\n";
 
-static const char *proc279 = 
-"#line 10415 \"[executable]/sparql.sql\"\n"
+static const char *proc315 = 
+"#line 12405 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_A (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -10765,10 +12786,10 @@ static const char *proc279 =
 "aq_wait_all (app_env[0]);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:10413\n";
+"--src sparql.sql:12403\n";
 
-static const char *proc280 = 
-"#line 10438 \"[executable]/sparql.sql\"\n"
+static const char *proc316 = 
+"#line 12428 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_L_A (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
@@ -10802,10 +12823,10 @@ static const char *proc280 =
 "aq_wait_all (app_env[0]);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:10436\n";
+"--src sparql.sql:12426\n";
 
-static const char *proc281 = 
-"#line 10473 \"[executable]/sparql.sql\"\n"
+static const char *proc317 = 
+"#line 12463 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_COMMIT_A (\n"
 "inout graph_iri varchar, inout app_env any )\n"
 "{\n"
@@ -10816,10 +12837,10 @@ static const char *proc281 =
 "DB.DBA.TTLP_EV_COMMIT (graph_iri, app_env[2]);\n"
 "commit work;\n"
 "}\n"
-"--src sparql.sql:10471\n";
+"--src sparql.sql:12461\n";
 
-static const char *proc282 = 
-"#line 10486 \"[executable]/sparql.sql\"\n"
+static const char *proc318 = 
+"#line 12476 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_R (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_uri varchar,\n"
@@ -10839,10 +12860,10 @@ static const char *proc282 =
 "DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (g_iid, ro_id_dict);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:10484\n";
+"--src sparql.sql:12474\n";
 
-static const char *proc283 = 
-"#line 10507 \"[executable]/sparql.sql\"\n"
+static const char *proc319 = 
+"#line 12497 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_TRIPLE_L_R (\n"
 "inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
 "inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
@@ -10874,20 +12895,20 @@ static const char *proc283 =
 "DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (g_iid, ro_id_dict);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:10505\n";
+"--src sparql.sql:12495\n";
 
-static const char *proc284 = 
-"#line 10540 \"[executable]/sparql.sql\"\n"
+static const char *proc320 = 
+"#line 12530 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.TTLP_EV_COMMIT_R (\n"
 "inout graph_iri varchar, inout app_env any )\n"
 "{\n"
 "\n"
 "DB.DBA.TTLP_EV_COMMIT (graph_iri, app_env[2]);\n"
 "}\n"
-"--src sparql.sql:10538\n";
+"--src sparql.sql:12528\n";
 
-static const char *proc285 = 
-"#line 10548 \"[executable]/sparql.sql\"\n"
+static const char *proc321 = 
+"#line 12538 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.TTLP_MT (in strg varchar, in base varchar, in graph varchar := null, in flags integer := 0,\n"
 "in log_mode integer := 2, in threads integer := 3, in transactional int := 0)\n"
 "{\n"
@@ -10907,7 +12928,7 @@ static const char *proc285 =
 "}\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
 "{\n"
-"DB.DBA.TTLP_CL (strg, base, graph, flags);\n"
+"DB.DBA.TTLP_CL (strg, 0, base, graph, flags);\n"
 "return;\n"
 "}\n"
 "if (126 = __tag (strg))\n"
@@ -10931,10 +12952,10 @@ static const char *proc285 =
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
 "return graph;\n"
 "}\n"
-"--src sparql.sql:10546\n";
+"--src sparql.sql:12536\n";
 
-static const char *proc286 = 
-"#line 10593 \"[executable]/sparql.sql\"\n"
+static const char *proc322 = 
+"#line 12583 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.TTLP_MT_LOCAL_FILE (in filename varchar, in base varchar, in graph varchar := null, in flags integer := 0,\n"
 "in log_mode integer := 2, in threads integer := 3, in transactional int := 0)\n"
 "{\n"
@@ -10954,7 +12975,7 @@ static const char *proc286 =
 "}\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
 "{\n"
-"DB.DBA.TTLP_CL_LOCAL_FILE (filename, base, graph, flags);\n"
+"DB.DBA.TTLP_CL (filename, 1, base, graph, flags);\n"
 "return;\n"
 "}\n"
 "app_env := vector (\n"
@@ -10977,10 +12998,10 @@ static const char *proc286 =
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
 "return graph;\n"
 "}\n"
-"--src sparql.sql:10591\n";
+"--src sparql.sql:12581\n";
 
-static const char *proc287 = 
-"#line 10637 \"[executable]/sparql.sql\"\n"
+static const char *proc323 = 
+"#line 12627 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_LOAD_RDFXML_MT (in strg varchar, in base varchar, in graph varchar,\n"
 "in log_mode integer := 2, in threads integer := 3, in transactional int := 0)\n"
 "{\n"
@@ -10999,7 +13020,7 @@ static const char *proc287 =
 "log_mode := log_mode + 2;\n"
 "}\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
-"return rdf_load_rdfxml_cl (strg, base, graph);\n"
+"return DB.DBA.RDF_LOAD_RDFXML_CL (strg, base, graph, 0);\n"
 "if (__rdf_obj_ft_rule_count_in_graph (iri_to_id (graph)))\n"
 "ro_id_dict := dict_new ();\n"
 "else\n"
@@ -11026,10 +13047,10 @@ static const char *proc287 =
 "repl_text (\'__rdf_repl\', \'__rdf_repl_flush_queue ()\');\n"
 "return graph;\n"
 "}\n"
-"--src sparql.sql:10635\n";
+"--src sparql.sql:12625\n";
 
-static const char *proc288 = 
-"#line 10688 \"[executable]/sparql.sql\"\n"
+static const char *proc324 = 
+"#line 12678 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.VT_DECODE_KEYWORD_ITM (inout vtdata varchar, inout ofs integer)\n"
 "{\n"
 "declare res integer;\n"
@@ -11039,10 +13060,10 @@ static const char *proc288 =
 "ofs := ofs + 6;\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:10686\n";
+"--src sparql.sql:12676\n";
 
-static const char *proc289 = 
-"#line 10699 \"[executable]/sparql.sql\"\n"
+static const char *proc325 = 
+"#line 12689 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.VT_ENCODE_KEYWORD_ITM (in id integer, inout ses any)\n"
 "{\n"
 "declare strg varchar;\n"
@@ -11055,10 +13076,10 @@ static const char *proc289 =
 "strg[0] := 5;\n"
 "http (strg, ses);\n"
 "}\n"
-"--src sparql.sql:10697\n";
+"--src sparql.sql:12687\n";
 
-static const char *proc290 = 
-"#line 10713 \"[executable]/sparql.sql\"\n"
+static const char *proc326 = 
+"#line 12703 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.VT_COMPOSE_KEYWORD_INDEX_LINES (\n"
 "inout carry_d_id integer,\n"
 "inout carry_d_id_2 integer,\n"
@@ -11163,10 +13184,10 @@ static const char *proc290 =
 "\n"
 "return res_acc;\n"
 "}\n"
-"--src sparql.sql:10711\n";
+"--src sparql.sql:12701\n";
 
-static const char *proc291 = 
-"#line 10820 \"[executable]/sparql.sql\"\n"
+static const char *proc327 = 
+"#line 12810 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_OBJ_PATCH_CONTAINS_BY_GRAPH (in phrase varchar, in graph_iri varchar)\n"
 "{\n"
 "declare graph_keyword any;\n"
@@ -11179,10 +13200,10 @@ static const char *proc291 =
 "err:\n"
 "return \'^\"#nosuch\"\';\n"
 "}\n"
-"--src sparql.sql:10818\n";
+"--src sparql.sql:12808\n";
 
-static const char *proc292 = 
-"#line 10835 \"[executable]/sparql.sql\"\n"
+static const char *proc328 = 
+"#line 12825 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_OBJ_PATCH_CONTAINS_BY_MANY_GRAPHS (in phrase varchar, in graph_iris any)\n"
 "{\n"
 "declare isfirst, gctr, gcount integer;\n"
@@ -11211,10 +13232,10 @@ static const char *proc292 =
 "err:\n"
 "return \'^\"#nosuch\"\';\n"
 "}\n"
-"--src sparql.sql:10833\n";
+"--src sparql.sql:12823\n";
 
-static const char *proc293 = 
-"#line 10865 \"[executable]/sparql.sql\"\n"
+static const char *proc329 = 
+"#line 12855 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH (in graph_iid IRI_ID, inout ro_id_dict any, in daq any := 0)\n"
 "{\n"
 "declare ro_id_offset, ro_ids_count integer;\n"
@@ -11268,10 +13289,10 @@ static const char *proc293 =
 "rollback work;\n"
 "goto again;\n"
 "}\n"
-"--src sparql.sql:10863\n";
+"--src sparql.sql:12853\n";
 
-static const char *proc294 = 
-"#line 10920 \"[executable]/sparql.sql\"\n"
+static const char *proc330 = 
+"#line 12910 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH_OLD (in graph_iid IRI_ID, inout ro_id_dict any)\n"
 "{\n"
 "declare start_vt_d_id, aligned_start_vt_d_id, uncommited_ro_id_offset, ro_id_offset, ro_ids_count integer;\n"
@@ -11397,10 +13418,10 @@ static const char *proc294 =
 "rollback work;\n"
 "goto again;\n"
 "}\n"
-"--src sparql.sql:10918\n";
+"--src sparql.sql:12908\n";
 
-static const char *proc295 = 
-"#line 11047 \"[executable]/sparql.sql\"\n"
+static const char *proc331 = 
+"#line 13037 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_OBJ_FT_RULE_ADD (in rule_g varchar, in rule_p varchar, in reason varchar) returns integer\n"
 "{\n"
 "declare rule_g_iid, rule_p_iid IRI_ID;\n"
@@ -11538,10 +13559,10 @@ static const char *proc295 =
 "__rdf_obj_ft_rule_add (rule_g_iid, rule_p_iid, reason);\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:11045\n";
+"--src sparql.sql:13035\n";
 
-static const char *proc296 = 
-"#line 11186 \"[executable]/sparql.sql\"\n"
+static const char *proc332 = 
+"#line 13176 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_OBJ_FT_RULE_DEL (in rule_g varchar, in rule_p varchar, in reason varchar) returns integer\n"
 "{\n"
 "declare rule_g_iid, rule_p_iid IRI_ID;\n"
@@ -11562,10 +13583,10 @@ static const char *proc296 =
 "__rdf_obj_ft_rule_del (rule_g_iid, rule_p_iid, reason);\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:11184\n";
+"--src sparql.sql:13174\n";
 
-static const char *proc297 = 
-"#line 11208 \"[executable]/sparql.sql\"\n"
+static const char *proc333 = 
+"#line 13198 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_OBJ_FT_RECOVER ()\n"
 "{\n"
 "declare stat, msg, STRG varchar;\n"
@@ -11596,9 +13617,9 @@ static const char *proc297 =
 "VT_INC_INDEX_DB_DBA_RDF_OBJ();\n"
 "result (\'... done\');\n"
 "}\n"
-"--src sparql.sql:11206\n";
+"--src sparql.sql:13196\n";
 
-static const char *tbl15 = 
+static const char *tbl16 = 
 "create table DB.DBA.RDF_GRAPH_GROUP (\n"
 "RGG_IID IRI_ID not null primary key,\n"
 "RGG_IRI varchar not null,\n"
@@ -11608,7 +13629,7 @@ static const char *tbl15 =
 "alter index RDF_GRAPH_GROUP on DB.DBA.RDF_GRAPH_GROUP partition cluster replicated\n"
 "create index RDF_GRAPH_GROUP_IRI on DB.DBA.RDF_GRAPH_GROUP (RGG_IRI) partition cluster replicated\n";
 
-static const char *tbl16 = 
+static const char *tbl17 = 
 "create table DB.DBA.RDF_GRAPH_GROUP_MEMBER (\n"
 "RGGM_GROUP_IID IRI_ID not null,\n"
 "RGGM_MEMBER_IID IRI_ID not null,\n"
@@ -11616,7 +13637,7 @@ static const char *tbl16 =
 ")\n"
 "alter index RDF_GRAPH_GROUP_MEMBER on DB.DBA.RDF_GRAPH_GROUP_MEMBER partition cluster replicated\n";
 
-static const char *tbl17 = 
+static const char *tbl18 = 
 "create table DB.DBA.RDF_GRAPH_USER (\n"
 "RGU_GRAPH_IID IRI_ID not null,\n"
 "RGU_USER_ID integer not null,\n"
@@ -11625,8 +13646,8 @@ static const char *tbl17 =
 ")\n"
 "alter index RDF_GRAPH_USER on DB.DBA.RDF_GRAPH_USER partition cluster replicated\n";
 
-static const char *proc298 = 
-"#line 11270 \"[executable]/sparql.sql\"\n"
+static const char *proc334 = 
+"#line 13260 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_CREATE_MEMONLY (in group_iri varchar, in group_iid IRI_ID)\n"
 "{\n"
 "group_iri := cast (group_iri as varchar);\n"
@@ -11634,11 +13655,12 @@ static const char *proc298 =
 "dict_put (__rdf_graph_id2iri_dict(), group_iid, __uname(group_iri));\n"
 "dict_put (__rdf_graph_group_dict(), group_iid, vector ());\n"
 "jso_mark_affected (group_iri);\n"
+"__rdf_cli_mark_qr_to_recompile ();\n"
 "}\n"
-"--src sparql.sql:11268\n";
+"--src sparql.sql:13258\n";
 
-static const char *proc299 = 
-"#line 11280 \"[executable]/sparql.sql\"\n"
+static const char *proc335 = 
+"#line 13271 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_CREATE (in group_iri varchar, in quiet integer, in member_pattern varchar := null, in comment varchar := null)\n"
 "{\n"
 "declare group_iid IRI_ID;\n"
@@ -11659,10 +13681,10 @@ static const char *proc299 =
 "commit work;\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_GRAPH_GROUP_CREATE_MEMONLY (?, ?)\', vector (group_iri, group_iid));\n"
 "}\n"
-"--src sparql.sql:11278\n";
+"--src sparql.sql:13269\n";
 
-static const char *proc300 = 
-"#line 11302 \"[executable]/sparql.sql\"\n"
+static const char *proc336 = 
+"#line 13293 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_DROP_MEMONLY (in group_iri varchar, in group_iid IRI_ID)\n"
 "{\n"
 "group_iri := cast (group_iri as varchar);\n"
@@ -11678,11 +13700,12 @@ static const char *proc300 =
 "foreach (IRI_ID iid in privates) do\n"
 "jso_mark_affected (id_to_iri (iid));\n"
 "}\n"
+"__rdf_cli_mark_qr_to_recompile ();\n"
 "}\n"
-"--src sparql.sql:11300\n";
+"--src sparql.sql:13291\n";
 
-static const char *proc301 = 
-"#line 11320 \"[executable]/sparql.sql\"\n"
+static const char *proc337 = 
+"#line 13312 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_DROP (in group_iri varchar, in quiet integer)\n"
 "{\n"
 "declare group_iid IRI_ID;\n"
@@ -11704,10 +13727,10 @@ static const char *proc301 =
 "commit work;\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_GRAPH_GROUP_DROP_MEMONLY (?, ?)\', vector (group_iri, group_iid));\n"
 "}\n"
-"--src sparql.sql:11318\n";
+"--src sparql.sql:13310\n";
 
-static const char *proc302 = 
-"#line 11343 \"[executable]/sparql.sql\"\n"
+static const char *proc338 = 
+"#line 13335 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_CHECK_VISIBILITY_CHANGE (in memb_iri varchar, in special_iid IRI_ID)\n"
 "{\n"
 "declare memb_iid IRI_ID;\n"
@@ -11734,10 +13757,10 @@ static const char *proc302 =
 "case (equ (special_iid, #i8192)) when 0 then \'removed from the \"private area\"\' else \'added to the \"private area\"\' end ) );\n"
 "}\n"
 "}\n"
-"--src sparql.sql:11341\n";
+"--src sparql.sql:13333\n";
 
-static const char *proc303 = 
-"#line 11371 \"[executable]/sparql.sql\"\n"
+static const char *proc339 = 
+"#line 13363 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_INS_MEMONLY (in group_iri varchar, in group_iid IRI_ID, in memb_iri varchar, in memb_iid IRI_ID)\n"
 "{\n"
 "group_iri := cast (group_iri as varchar);\n"
@@ -11757,10 +13780,10 @@ static const char *proc303 =
 "jso_mark_affected (memb_iri);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:11369\n";
+"--src sparql.sql:13361\n";
 
-static const char *proc304 = 
-"#line 11392 \"[executable]/sparql.sql\"\n"
+static const char *proc340 = 
+"#line 13384 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_INS (in group_iri varchar, in memb_iri varchar)\n"
 "{\n"
 "declare group_iid, memb_iid IRI_ID;\n"
@@ -11779,10 +13802,10 @@ static const char *proc304 =
 "commit work;\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_GRAPH_GROUP_INS_MEMONLY (?, ?, ?, ?)\', vector (group_iri, group_iid, memb_iri, memb_iid));\n"
 "}\n"
-"--src sparql.sql:11390\n";
+"--src sparql.sql:13382\n";
 
-static const char *proc305 = 
-"#line 11412 \"[executable]/sparql.sql\"\n"
+static const char *proc341 = 
+"#line 13404 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_DEL_MEMONLY (in group_iri varchar, in group_iid IRI_ID, in memb_iri varchar, in memb_iid IRI_ID)\n"
 "{\n"
 "group_iri := cast (group_iri as varchar);\n"
@@ -11802,10 +13825,10 @@ static const char *proc305 =
 "jso_mark_affected (memb_iri);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:11410\n";
+"--src sparql.sql:13402\n";
 
-static const char *proc306 = 
-"#line 11433 \"[executable]/sparql.sql\"\n"
+static const char *proc342 = 
+"#line 13425 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_GROUP_DEL (in group_iri varchar, in memb_iri varchar)\n"
 "{\n"
 "declare group_iid, memb_iid IRI_ID;\n"
@@ -11824,10 +13847,10 @@ static const char *proc306 =
 "commit work;\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_GRAPH_GROUP_DEL_MEMONLY (?, ?, ?, ?)\', vector (group_iri, group_iid, memb_iri, memb_iid));\n"
 "}\n"
-"--src sparql.sql:11431\n";
+"--src sparql.sql:13423\n";
 
-static const char *proc307 = 
-"#line 11453 \"[executable]/sparql.sql\"\n"
+static const char *proc343 = 
+"#line 13445 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_GRAPH_USER_PERMS_GET (in graph_iri varchar, in uid any) returns integer\n"
 "{\n"
 "declare graph_iid IRI_ID;\n"
@@ -11844,10 +13867,10 @@ static const char *proc307 =
 "__rdf_graph_approx_perms (graph_iid, uid) );\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:11451\n";
+"--src sparql.sql:13443\n";
 
-static const char *proc308 = 
-"#line 11471 \"[executable]/sparql.sql\"\n"
+static const char *proc344 = 
+"#line 13463 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_GRAPH_USER_PERMS_ACK (in graph_iri any, in uid any, in req_perms integer) returns integer\n"
 "{\n"
 "declare app_cbk, app_uid varchar;\n"
@@ -11885,10 +13908,10 @@ static const char *proc308 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src sparql.sql:11469\n";
+"--src sparql.sql:13461\n";
 
-static const char *proc309 = 
-"#line 11511 \"[executable]/sparql.sql\"\n"
+static const char *proc345 = 
+"#line 13503 \"[executable]/sparql.sql\"\n"
 " create function DB.DBA.RDF_GRAPH_USER_PERM_TITLE (in perms integer) returns varchar\n"
 "{\n"
 "if (bit_and (perms, 1))\n"
@@ -11901,10 +13924,10 @@ static const char *proc309 =
 "return \'get-group-list\';\n"
 "return sprintf (\'\"%d\"\', perms);\n"
 "}\n"
-"--src sparql.sql:11509\n";
+"--src sparql.sql:13501\n";
 
-static const char *proc310 = 
-"#line 11525 \"[executable]/sparql.sql\"\n"
+static const char *proc346 = 
+"#line 13517 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT (in graph_iri varchar, in uid any, in req_perms integer, in opname varchar) returns varchar\n"
 "{\n"
 "declare app_cbk, app_uid varchar;\n"
@@ -11950,10 +13973,10 @@ static const char *proc310 =
 "}\n"
 "return graph_iri;\n"
 "}\n"
-"--src sparql.sql:11523\n";
+"--src sparql.sql:13515\n";
 
-static const char *proc311 = 
-"#line 11572 \"[executable]/sparql.sql\"\n"
+static const char *proc347 = 
+"#line 13564 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_DEFAULT_USER_PERMS_SET_MEMONLY (in uname varchar, in uid integer, in perms integer, in special_iid IRI_ID, in set_private integer, in affected_jso any)\n"
 "{\n"
 "dict_put (__rdf_graph_default_perms_of_user_dict (set_private), uid, perms);\n"
@@ -11962,10 +13985,10 @@ static const char *proc311 =
 "foreach (varchar jso_key in affected_jso) do\n"
 "jso_mark_affected (jso_key);\n"
 "}\n"
-"--src sparql.sql:11570\n";
+"--src sparql.sql:13562\n";
 
-static const char *proc312 = 
-"#line 11582 \"[executable]/sparql.sql\"\n"
+static const char *proc348 = 
+"#line 13574 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_DEFAULT_USER_PERMS_SET (in uname varchar, in perms integer, in set_private integer := 0)\n"
 "{\n"
 "declare uid integer;\n"
@@ -12039,10 +14062,10 @@ static const char *proc312 =
 "commit work;\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_DEFAULT_USER_PERMS_SET_MEMONLY (?,?,?,?,?,?)\', vector (uname, uid, perms, special_iid, set_private, affected_jso));\n"
 "}\n"
-"--src sparql.sql:11580\n";
+"--src sparql.sql:13572\n";
 
-static const char *proc313 = 
-"#line 11657 \"[executable]/sparql.sql\"\n"
+static const char *proc349 = 
+"#line 13649 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_USER_PERMS_SET_MEMONLY (in graph_iri varchar, in graph_iid IRI_ID, in uid integer, in perms integer)\n"
 "{\n"
 "graph_iri := cast (graph_iri as varchar);\n"
@@ -12054,10 +14077,10 @@ static const char *proc313 =
 "__rdf_graph_specific_perms_of_user (graph_iid, uid, perms);\n"
 "jso_mark_affected (graph_iri);\n"
 "}\n"
-"--src sparql.sql:11655\n";
+"--src sparql.sql:13647\n";
 
-static const char *proc314 = 
-"#line 11670 \"[executable]/sparql.sql\"\n"
+static const char *proc350 = 
+"#line 13662 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_GRAPH_USER_PERMS_SET (in graph_iri varchar, in uname varchar, in perms integer)\n"
 "{\n"
 "declare graph_iid IRI_ID;\n"
@@ -12110,10 +14133,46 @@ static const char *proc314 =
 "commit work;\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_GRAPH_USER_PERMS_SET_MEMONLY (?,?,?,?)\', vector (graph_iri, graph_iid, uid, perms));\n"
 "}\n"
-"--src sparql.sql:11668\n";
+"--src sparql.sql:13660\n";
 
-static const char *proc315 = 
-"#line 11724 \"[executable]/sparql.sql\"\n"
+static const char *proc351 = 
+"#line 13716 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_GRAPH_USER_PERMS_DEL_MEMONLY (in graph_iri varchar, in graph_iid IRI_ID, in uid integer)\n"
+"{\n"
+"graph_iri := cast (graph_iri as varchar);\n"
+"dict_put (__rdf_graph_iri2id_dict(), __uname(graph_iri), graph_iid);\n"
+"dict_put (__rdf_graph_id2iri_dict(), graph_iid, __uname(graph_iri));\n"
+"if (uid = http_nobody_uid())\n"
+"dict_remove (__rdf_graph_public_perms_dict(), graph_iid);\n"
+"else\n"
+"__rdf_graph_specific_perms_of_user (graph_iid, uid, -1);\n"
+"jso_mark_affected (graph_iri);\n"
+"}\n"
+"--src sparql.sql:13714\n";
+
+static const char *proc352 = 
+"#line 13729 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_GRAPH_USER_PERMS_DEL (in graph_iri varchar, in uname varchar)\n"
+"{\n"
+"declare graph_iid IRI_ID;\n"
+"declare uid integer;\n"
+"declare special_iid IRI_ID;\n"
+"\n"
+"graph_iid := iri_to_id (graph_iri);\n"
+"uid := ((select U_ID from DB.DBA.SYS_USERS where U_NAME = uname and (U_NAME=\'nobody\' or (U_SQL_ENABLE and not U_ACCOUNT_DISABLED))));\n"
+"set isolation = \'serializable\';\n"
+"commit work;\n"
+"if (uid is null)\n"
+"signal (\'RDF99\', sprintf (\'No active SQL user \"%s\" found, can not change its permissions on graph <%s>\', uname, graph_iri));\n"
+"delete from DB.DBA.RDF_GRAPH_USER where RGU_GRAPH_IID = graph_iid and RGU_USER_ID = uid;\n"
+"\n"
+"commit work;\n"
+"DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'DB.DBA.RDF_GRAPH_USER_PERMS_DEL_MEMONLY (?,?,?)\', vector (graph_iri, graph_iid, uid));\n"
+"}\n"
+"--src sparql.sql:13727\n";
+
+static const char *proc353 = 
+"#line 13748 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_GRAPH_GROUP_LIST_GET (in group_iri any, in extra_graphs any, in uid any, in gs_app_cbk varchar, in gs_app_uid varchar, in req_perms integer) returns any\n"
 "{\n"
 "declare group_iid IRI_ID;\n"
@@ -12186,7 +14245,6 @@ static const char *proc315 =
 "else\n"
 "full_list := vector ();\n"
 "}\n"
-"\n"
 "if (bit_and (common_perms, req_perms) = req_perms)\n"
 "{\n"
 "declare ctr integer;\n"
@@ -12232,15 +14290,15 @@ static const char *proc315 =
 "vectorbld_final (filtered_list);\n"
 "return filtered_list;\n"
 "}\n"
-"--src sparql.sql:11722\n";
+"--src sparql.sql:13746\n";
 
-static const char *proc316 = 
-"#line 11847 \"[executable]/sparql.sql\"\n"
+static const char *proc354 = 
+"#line 13870 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.SPARQL_RELOAD_QM_GRAPH ()\n"
 "{\n"
 "declare ver varchar;\n"
 "declare inx int;\n"
-"ver := \'2010-08-29 0001v6g\';\n"
+"ver := \'2012-01-26 0002v6g\';\n"
 "if (USER <> \'dba\')\n"
 "signal (\'RDFXX\', \'Only DBA can reload quad map metadata\');\n"
 "if (not exists (sparql define input:storage \"\" ask where {\n"
@@ -12325,10 +14383,10 @@ static const char *proc316 =
 "sequence_set (\'RDF_PREF_SEQ\', 101, 1);\n"
 "sequence_set (\'RDF_RO_ID\', 1001, 1);\n"
 "}\n"
-"--src sparql.sql:11845\n";
+"--src sparql.sql:13868\n";
 
-static const char *proc317 = 
-"#line 11938 \"[executable]/sparql.sql\"\n"
+static const char *proc355 = 
+"#line 13961 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_CREATE_SPARQL_ROLES ()\n"
 "{\n"
 "declare state, msg varchar;\n"
@@ -12358,8 +14416,8 @@ static const char *proc317 =
 "\'grant all on DB.DBA.SYS_SPARQL_HOST to SPARQL_UPDATE\',\n"
 "\'grant select on DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH to SPARQL_SELECT\',\n"
 "\'grant all on DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH to SPARQL_UPDATE\',\n"
-"\'grant select on DB.DBA.SYS_FAKE_0 to SPARQL_SELECT\',\n"
-"\'grant select on DB.DBA.SYS_FAKE_1 to SPARQL_SELECT\',\n"
+"\'grant select on DB.DBA.SYS_IDONLY_EMPTY to SPARQL_SELECT\',\n"
+"\'grant select on DB.DBA.SYS_IDONLY_ONE to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_GLOBAL_RESET to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_MAKE_IID_OF_QNAME to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE to SPARQL_SELECT\',\n"
@@ -12401,6 +14459,8 @@ static const char *proc317 =
 "\'grant execute on DB.DBA.RDF_STRSQLVAL_OF_LONG to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_WIDESTRSQLVAL_OF_LONG to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_LONG_OF_SQLVAL to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.rdf_strdt_impl to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.rdf_strlang_impl to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_QUAD_URI to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_QUAD_URI_L to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_QUAD_URI_L_TYPED to SPARQL_UPDATE\',\n"
@@ -12420,17 +14480,25 @@ static const char *proc317 =
 "\'grant execute on DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TTL2HASH to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_LOAD_RDFXML to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.RDF_RDFA11_FETCH_PROFILES to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_LOAD_RDFA to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.RDF_LOAD_XHTML_MICRODATA to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_RDFXML_TO_DICT to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_LONG_TO_TTL to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_TTL to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_TRIPLES_TO_TRIG to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_NT to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_GRAPH_TO_TTL to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_TALIS_JSON to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_TRIPLES_TO_JSON_LD to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_CSV to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_TRIPLES_TO_HTML_UL to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_TRIPLES_TO_HTML_TR to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_TRIPLES_TO_ODATA_JSON to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_INIT to SPARQL_SELECT\',\n"
@@ -12457,6 +14525,9 @@ static const char *proc317 =
 "\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_LD to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_MICRODATA to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_MICRODATA to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CSV to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDFA_XHTML to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML to SPARQL_SELECT\',\n"
@@ -12466,12 +14537,18 @@ static const char *proc317 =
 "\'grant execute on DB.DBA.RDF_DELETE_TRIPLES_AGG to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_MODIFY_TRIPLES to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARQL_INSERT_DICT_CONTENT to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARQL_DELETE_DICT_CONTENT to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARQL_MODIFY_BY_DICT_CONTENTS to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARUL_ADD to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARUL_CLEAR to SPARQL_UPDATE\',\n"
-"\'grant execute on DB.DBA.SPARUL_LOAD to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARUL_COPY to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARUL_CREATE to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARUL_DROP to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARUL_LOAD to SPARQL_UPDATE\',\n"
+"\'grant execute on DB.DBA.SPARUL_MOVE to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARUL_RUN to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_DESC_AGG_INIT to SPARQL_SELECT\',\n"
@@ -12482,6 +14559,10 @@ static const char *proc317 =
 "\'grant execute on DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_DESC_DICT_CBD to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.SPARQL_DESC_DICT_OBJCBD to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.SPARQL_DESC_DICT_SCBD to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.SPARQL_DESC_DICT_SCBD_PHYSICAL to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_CONSTRUCT_INIT to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_CONSTRUCT_ACC to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_CONSTRUCT_FIN to SPARQL_SELECT\',\n"
@@ -12503,18 +14584,18 @@ static const char *proc317 =
 "\'grant execute on DB.DBA.RDF_FORGET_HTTP_RESPONSE to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.TTLP_EV_COMMIT to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.RDF_PROC_COLS to \"SPARQL\"\',\n"
-"\'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ACK to \"SPARQL_SELECT\"\',\n"
-"\'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT to \"SPARQL_SELECT\"\',\n"
-"\'grant execute on DB.DBA.RDF_GRAPH_GROUP_LIST_GET to \"SPARQL_SELECT\"\' );\n"
+"\'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ACK to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT to SPARQL_SELECT\',\n"
+"\'grant execute on DB.DBA.RDF_GRAPH_GROUP_LIST_GET to SPARQL_SELECT\' );\n"
 "foreach (varchar cmd in cmds) do\n"
 "{\n"
 "exec (cmd, state, msg);\n"
 "}\n"
 "}\n"
-"--src sparql.sql:11936\n";
+"--src sparql.sql:13959\n";
 
-static const char *proc318 = 
-"#line 12122 \"[executable]/sparql.sql\"\n"
+static const char *proc356 = 
+"#line 14168 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QUAD_AUDIT ()\n"
 "{\n"
 "declare stat, msg varchar;\n"
@@ -12585,10 +14666,170 @@ static const char *proc318 =
 "if (not isstring (registry_get (\'DB.DBA.RDF_QUAD_FT_UPGRADE\')))\n"
 "result (\'ERRft\', \'new layout but not isstring (registry_get (\'\'DB.DBA.RDF_QUAD_FT_UPGRADE\'\'))\');\n"
 "}\n"
-"--src sparql.sql:12120\n";
+"--src sparql.sql:14166\n";
 
-static const char *proc319 = 
-"#line 12194 \"[executable]/sparql.sql\"\n"
+static const char *proc357 = 
+"#line 14240 \"[executable]/sparql.sql\"\n"
+"create procedure DB.DBA.RDF_QUAD_OUTLINE_ALL (in force integer := 0)\n"
+"{\n"
+"declare c_main, c_pogs, c_op integer;\n"
+"declare c_main_tmp, c_pogs_tmp, c_op_tmp integer;\n"
+"declare c_main_fixed, c_pogs_fixed, c_op_fixed integer;\n"
+"declare old_mode integer;\n"
+"declare c_check char;\n"
+"\n"
+"if ((registry_get (\'__rb_id_only_for_plain_ro_obj\') = \'1\') and not force)\n"
+"return;\n"
+"if (not exists (select top 1 1 from DB.DBA.RDF_QUAD))\n"
+"{\n"
+"registry_set (\'__rb_id_only_for_plain_ro_obj\', \'1\');\n"
+"return;\n"
+"}\n"
+"log_message (\'This database may contain RDF data that could cause indexing problems on previous versions of the server.\');\n"
+"log_message (\'The content of the DB.DBA.RDF_QUAD table will be checked and an update may automatically be performed if\');\n"
+"log_message (\'such data is found.\');\n"
+"log_message (\'This check will take some time but is made only once.\');\n"
+"\n"
+"if (not exists (select top 1 1 from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only) where rdf_box_migrate_after_06_02_3129 (O)))\n"
+"{\n"
+"log_message (\'No need to update DB.DBA.RDF_QUAD.\');\n"
+"registry_set (\'__rb_id_only_for_plain_ro_obj\', \'1\');\n"
+"exec (\'checkpoint\');\n"
+"return;\n"
+"}\n"
+"\n"
+"log_message (\'\');\n"
+"log_message (\'An update is required.\');\n"
+"c_check := coalesce (virtuoso_ini_item_value (\'Parameters\', \'AnalyzeFixQuadStore\'), \'0\');\n"
+"if (coalesce (virtuoso_ini_item_value (\'Parameters\', \'LiteMode\'), \'0\') <> \'0\') c_check := \'1\';\n"
+"if (c_check <> \'1\')\n"
+"{\n"
+"log_message (\'\');\n"
+"log_message (\'NOTICE: Before Virtuoso can continue fixing the DB.DBA.RDF_QUAD table and its indexes\');\n"
+"log_message (\'        the DB Administrator should check make sure that:\');\n"
+"log_message (\'\');\n"
+"log_message (\'         * there is a recent backup of the database\');\n"
+"log_message (\'         * there is enough free disk space available to complete this conversion\');\n"
+"log_message (\'         * the database can be offline for the duration of this conversion\');\n"
+"log_message (\'\');\n"
+"log_message (\'        Since the update can take a considerable amount of time on large databases\');\n"
+"log_message (\'        it is advisable to schedule this at an appropriate time.\');\n"
+"log_message (\'\');\n"
+"log_message (\'To continue the DBA must change the virtuoso.ini file and add the following flag:\');\n"
+"log_message (\'\');\n"
+"log_message (\'    [Parameters]\');\n"
+"log_message (\'    AnalyzeFixQuadStore = 1\');\n"
+"log_message (\'\');\n"
+"log_message (\'For additional information please contact OpenLink Support <support at openlinksw.com>\');\n"
+"log_message (\'This process will now exit.\');\n"
+"raw_exit();\n"
+"}\n"
+"\n"
+"log_message (\'Please be patient.\');\n"
+"log_message (\'The table DB.DBA.RDF_QUAD and two of its additional indexes will now be patched.\');\n"
+"log_message (\'In case of an error during the operation, delete the transaction log before restarting the server.\');\n"
+"exec (\'checkpoint\');\n"
+"declare exit handler for sqlstate \'*\'\n"
+"{\n"
+"log_message (sprintf (\'Error %s: %s\', __SQL_STATE, __SQL_MESSAGE));\n"
+"log_message (\'Do not forget to delete the transaction log before restarting the server.\');\n"
+"raw_exit ();\n"
+"};\n"
+"\n"
+"\n"
+"if (0 = sys_stat (\'cl_run_local_only\'))\n"
+"{\n"
+"cl_inx_recov (force);\n"
+"return;\n"
+"}\n"
+"\n"
+"if (1 <> sys_stat (\'cl_run_local_only\'))\n"
+"{\n"
+"log_message (\'Cluster must be online in order to perform upgrade\');\n"
+"return;\n"
+"}\n"
+"\n"
+"old_mode := log_enable (2, 1);\n"
+"log_message (\'Phase 1 of 9: Gathering statistics ...\');\n"
+"c_main := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD) option (no cluster));\n"
+"c_pogs := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS) option (no cluster));\n"
+"if (c_main <> c_pogs)\n"
+"log_message (\'* Existing indexes are damaged, will try to recover...\');\n"
+"c_op := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only) option (no cluster));\n"
+"log_message (sprintf (\' * Index sizes before the processing: %09d RDF_QUAD, %09d POGS, %09d OP\', c_main, c_pogs, c_op));\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster) option (index RDF_QUAD_RECOV_TMP, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster) option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster) option (index RDF_QUAD_RECOV_TMP_OP, no cluster);\n"
+"\n"
+"log_message (\'Phase 2 of 9: Copying all quads to a temporary table ...\');\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster);\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP_POGS option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster);\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP_OP option (index_only, no cluster) (P1,O1) select P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only, no cluster);\n"
+"if (c_main <> c_pogs)\n"
+"{\n"
+"log_message (\'* Recovering additional data from existing indexes\');\n"
+"if (c_main < c_pogs)\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS) option (no cluster);\n"
+"if (c_pogs < c_main)\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD) option (no cluster);\n"
+"}\n"
+"c_op_tmp := (select count (1) from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only) option (no cluster));\n"
+"log_message (sprintf (\'* Index sizes of temporary table: %09d OP\', c_op_tmp));\n"
+"if (c_op_tmp < c_op)\n"
+"log_message (\'** Some data are lost or the corruption was strong before the processing.\');\n"
+"\n"
+"log_message (\'Phase 3 of 9: Cleaning the quad storage ...\');\n"
+"delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster) option (index RDF_QUAD, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster) option (index RDF_QUAD_POGS, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only, no cluster) option (index RDF_QUAD_OP, no cluster);\n"
+"\n"
+"log_message (\'Phase 4 of 9: Refilling the quad storage from the temporary table...\');\n"
+"insert soft DB.DBA.RDF_QUAD index RDF_QUAD option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster);\n"
+"insert soft DB.DBA.RDF_QUAD index RDF_QUAD_POGS option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);\n"
+"insert soft DB.DBA.RDF_QUAD index RDF_QUAD_OP option (index_only, no cluster) (P,O) select P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster);\n"
+"\n"
+"log_message (\'Phase 5 of 9: Cleaning the temporary table ...\');\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster) option (index RDF_QUAD_RECOV_TMP, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster) option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster) option (index RDF_QUAD_RECOV_TMP_OP, no cluster);\n"
+"\n"
+"log_message (\'Phase 6 of 9: Gathering statistics again ...\');\n"
+"c_main_fixed := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD) option (no cluster));\n"
+"c_pogs_fixed := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS) option (no cluster));\n"
+"c_op_fixed := (select count (1) from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only) option (no cluster));\n"
+"log_message (sprintf (\'* Index sizes after the processing: %09d RDF_QUAD, %09d POGS, %09d OP\', c_main_fixed, c_pogs_fixed, c_op_fixed));\n"
+"if ((__min (c_main_fixed, c_pogs_fixed) < __max (c_main, c_pogs)) or (c_op_fixed < c_op))\n"
+"log_message (\'** Some data are lost or the corruption was strong before the processing.\');\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"log_message (\'Phase 7 of 9: integrity check (completeness of index RDF_QUAD_POGS of DB.DBA.RDF_QUAD) ...\');\n"
+"if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index RDF_QUAD_POGS) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))\n"
+"log_message (\'** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.\');\n"
+"\n"
+"log_message (\'Phase 8 of 9: integrity check (completeness of primary key of DB.DBA.RDF_QUAD) ...\');\n"
+"if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_POGS) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index primary key) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))\n"
+"log_message (\'** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.\');\n"
+"\n"
+"log_message (\'Phase 9 of 9: final checkpoint...\');\n"
+"registry_set (\'__rb_id_only_for_plain_ro_obj\', \'1\');\n"
+"exec (\'checkpoint\');\n"
+"log_enable (old_mode, 1);\n"
+"log_message (\'Update complete.\');\n"
+"}\n"
+"--src sparql.sql:14238\n";
+
+
+static const char *other34 = 
+" DB.DBA.RDF_QUAD_OUTLINE_ALL ()\n";
+static const char *proc358 = 
+"#line 14400 \"[executable]/sparql.sql\"\n"
 "create procedure DB.DBA.RDF_QUAD_FT_UPGRADE ()\n"
 "{\n"
 "declare stat, msg varchar;\n"
@@ -12623,9 +14864,12 @@ static const char *proc319 =
 "from DB.DBA.RDF_GRAPH_USER where RGU_GRAPH_IID = #i8192 );\n"
 "fake := (select count (dict_put (__rdf_graph_public_perms_dict(), RGU_GRAPH_IID, RGU_PERMISSIONS))\n"
 "from DB.DBA.RDF_GRAPH_USER where RGU_USER_ID = http_nobody_uid () );\n"
+"delete from DB.DBA.RDF_GRAPH_USER where not exists (select 1 from DB.DBA.SYS_USERS where RGU_USER_ID = U_ID);\n"
+"if (row_count ())\n"
+"log_message (\'Non-existing users are removed from graph security list\');\n"
 "fake := (select count (__rdf_graph_specific_perms_of_user (RGU_GRAPH_IID, RGU_USER_ID, RGU_PERMISSIONS))\n"
 "from DB.DBA.RDF_GRAPH_USER where RGU_USER_ID <> http_nobody_uid () and not (RGU_GRAPH_IID in (#i0, #i8192)) );\n"
-"if (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'RecoveryMode\'), \'0\') > \'0\')\n"
+"if (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'RecoveryMode\'), \'0\') > \'0\')\n"
 "{\n"
 "log_message (\'Switching to RecoveryMode as set in [SPARQL] section of the configuration.\');\n"
 "log_message (\'For safety, the use of SPARQL_UPDATE role is restricted.\');\n"
@@ -12658,29 +14902,29 @@ static const char *proc319 =
 "\n"
 "final_qm_reload:\n"
 "DB.DBA.SPARQL_RELOAD_QM_GRAPH ();\n"
-"insert soft rdf_datatype (rdt_iid, rdt_twobyte, rdt_qname) values\n"
-"(iri_to_id (\'http://www.openlinksw.com/schemas/virtrdf#Geometry\'), 256, \'http://www.openlinksw.com/schemas/virtrdf#Geometry\');\n"
+"\n"
+"\n"
 "\n"
 "return;\n"
 "}\n"
-"--src sparql.sql:12192\n";
+"--src sparql.sql:14398\n";
 
 
-static const char *other34 = 
-" DB.DBA.RDF_QUAD_FT_UPGRADE ()\n";
 static const char *other35 = 
+" DB.DBA.RDF_QUAD_FT_UPGRADE ()\n";
+static const char *other36 = 
 "DB.DBA.RDF_CREATE_SPARQL_ROLES ()\n";
-static const char *proc320 = 
-"#line 12283 \"[executable]/sparql.sql\"\n"
+static const char *proc359 = 
+"#line 14492 \"[executable]/sparql.sql\"\n"
 "create procedure rdfs_pn (in is_class int)\n"
 "{\n"
 "return case when is_class = 1 then iri_to_id (\'http://www.w3.org/2000/01/rdf-schema#subClassOf\')\n"
 "else  iri_to_id (\'http://www.w3.org/2000/01/rdf-schema#subPropertyOf\') end;\n"
 "}\n"
-"--src sparql.sql:12281\n";
+"--src sparql.sql:14490\n";
 
-static const char *proc321 = 
-"#line 12291 \"[executable]/sparql.sql\"\n"
+static const char *proc360 = 
+"#line 14500 \"[executable]/sparql.sql\"\n"
 "create procedure rdf_owl_sas_p (in gr iri_id, in name varchar, in super_c iri_id, in c iri_id, in visited any, inout supers any, in pos int)\n"
 "{\n"
 "declare txt varchar;\n"
@@ -12702,15 +14946,15 @@ static const char *proc321 =
 "}\n"
 "exec_close (cc);\n"
 "}\n"
-"--src sparql.sql:12289\n";
+"--src sparql.sql:14498\n";
 
-static const char *tbl18 = 
+static const char *tbl19 = 
 "create table DB.DBA.SYS_RDF_SCHEMA (RS_NAME VARCHAR , RS_URI VARCHAR, RS_G IRI_ID,\n"
 "PRIMARY KEY (RS_NAME, RS_URI))\n"
 "alter index SYS_RDF_SCHEMA on DB.DBA.SYS_RDF_SCHEMA partition cluster replicated\n";
 
-static const char *proc322 = 
-"#line 12320 \"[executable]/sparql.sql\"\n"
+static const char *proc361 = 
+"#line 14529 \"[executable]/sparql.sql\"\n"
 "create function rdfs_load_schema (in ri_name varchar, in gn varchar := null) returns integer\n"
 "{\n"
 "declare gr iri_id;\n"
@@ -12728,9 +14972,9 @@ static const char *proc322 =
 "res := 0;\n"
 "if (gn is null)\n"
 "{\n"
-"for (select rs_uri from sys_rdf_schema where rs_name=ri_name) do\n"
+"for (select RS_URI from DB.DBA.SYS_RDF_SCHEMA where RS_NAME=ri_name) do\n"
 "{\n"
-"from_text := from_text || sprintf (\' from <%s>\', rs_uri);\n"
+"from_text := from_text || sprintf (\' from <%s>\', RS_URI);\n"
 "}\n"
 "}\n"
 "else\n"
@@ -12865,24 +15109,26 @@ static const char *proc322 =
 "rules_count := rules_count + length (v);\n"
 "}\n"
 "jso_mark_affected (ri_name);\n"
+"\n"
+"rdf_inf_dir (ri_name, null, null, 0);\n"
 "return rules_count + 1;\n"
 "}\n"
-"--src sparql.sql:12318\n";
+"--src sparql.sql:14527\n";
 
-static const char *proc323 = 
-"#line 12479 \"[executable]/sparql.sql\"\n"
+static const char *proc362 = 
+"#line 14689 \"[executable]/sparql.sql\"\n"
 "create procedure rdf_schema_ld ()\n"
 "{\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
 "return 0;\n"
-"return (select count (*) from (select distinct s.rs_name from sys_rdf_schema s) sub where 0 = rdfs_load_schema (sub.rs_name));\n"
+"return (select count (*) from (select distinct s.RS_NAME from DB.DBA.SYS_RDF_SCHEMA s) sub where 0 = rdfs_load_schema (sub.RS_NAME));\n"
 "}\n"
-"--src sparql.sql:12477\n";
+"--src sparql.sql:14687\n";
 
-static const char *other36 = 
+static const char *other37 = 
 "rdf_schema_ld ()\n";
-static const char *proc324 = 
-"#line 12491 \"[executable]/sparql.sql\"\n"
+static const char *proc363 = 
+"#line 14701 \"[executable]/sparql.sql\"\n"
 "create function CL_RDF_INF_CHANGED_SRV (in name varchar) returns integer\n"
 "{\n"
 "declare res integer;\n"
@@ -12891,10 +15137,10 @@ static const char *proc324 =
 "return case (rdfs_load_schema (name)) when 0 then 1 else 0 end;\n"
 "return res;\n"
 "}\n"
-"--src sparql.sql:12489\n";
+"--src sparql.sql:14699\n";
 
-static const char *proc325 = 
-"#line 12501 \"[executable]/sparql.sql\"\n"
+static const char *proc364 = 
+"#line 14711 \"[executable]/sparql.sql\"\n"
 "create procedure CL_RDF_INF_CHANGED (in name varchar)\n"
 "{\n"
 "declare aq any;\n"
@@ -12904,16 +15150,16 @@ static const char *proc325 =
 "aq_request (aq, \'DB.DBA.CL_RDF_INF_CHANGED_SRV\', vector (name));\n"
 "aq_wait_all (aq);\n"
 "}\n"
-"--src sparql.sql:12499\n";
+"--src sparql.sql:14709\n";
 
-static const char *proc326 = 
-"#line 12512 \"[executable]/sparql.sql\"\n"
+static const char *proc365 = 
+"#line 14722 \"[executable]/sparql.sql\"\n"
 "create function rdfs_rule_set (in name varchar, in gn varchar, in remove int := 0) returns integer\n"
 "{\n"
-"delete from sys_rdf_schema where rs_name = name and rs_uri = gn;\n"
+"delete from DB.DBA.SYS_RDF_SCHEMA where RS_NAME = name and RS_URI = gn;\n"
 "if (not remove)\n"
 "{\n"
-"insert into sys_rdf_schema (rs_name, rs_uri) values (name, gn);\n"
+"insert into DB.DBA.SYS_RDF_SCHEMA (RS_NAME, RS_URI) values (name, gn);\n"
 "}\n"
 "commit work;\n"
 "if (0 = sys_stat (\'cl_run_local_only\'))\n"
@@ -12930,10 +15176,10 @@ static const char *proc326 =
 "return res;\n"
 "}\n"
 "}\n"
-"--src sparql.sql:12510\n";
+"--src sparql.sql:14720\n";
 
-static const char *proc327 = 
-"#line 12536 \"[executable]/sparql.sql\"\n"
+static const char *proc366 = 
+"#line 14746 \"[executable]/sparql.sql\"\n"
 "create function DB.DBA.RDF_IID_OF_QNAME (in qname varchar) returns IRI_ID\n"
 "{\n"
 "whenever sqlstate \'*\' goto retnull;\n"
@@ -12941,10 +15187,10 @@ static const char *proc327 =
 "retnull:\n"
 "return null;\n"
 "}\n"
-"--src sparql.sql:12534\n";
+"--src sparql.sql:14744\n";
 
-static const char *proc328 = 
-"#line 12545 \"[executable]/sparql.sql\"\n"
+static const char *proc367 = 
+"#line 14755 \"[executable]/sparql.sql\"\n"
 "create procedure SPARQL_INI_PARAMS (inout metas any, inout dta any)\n"
 "{\n"
 "declare item_cnt int;\n"
@@ -12959,7 +15205,7 @@ static const char *proc328 =
 "for (declare i int, i := 0; i < item_cnt; i := i + 1)\n"
 "{\n"
 "item_name := cfg_item_name (virtuoso_ini_path (), \'SPARQL\', i);\n"
-"item_value := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', item_name);\n"
+"item_value := virtuoso_ini_item_value (\'SPARQL\', item_name);\n"
 "http (sprintf (\'<http://www.openlinksw.com/schemas/virtini#SPARQL> <http://www.openlinksw.com/schemas/virtini#%U> \"%s\" .\\r\\n\',\n"
 "item_name, item_value), tmp);\n"
 "}\n"
@@ -12968,11 +15214,133 @@ static const char *proc328 =
 "metas := vector (vector (vector (\'res_dict\', 242, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0)), 1);\n"
 "dta := vector (vector (res_dict));\n"
 "}\n"
-"--src sparql.sql:12543\n";
+"--src sparql.sql:14753\n";
+
+static const char *proc368 = 
+"#line 14780 \"[executable]/sparql.sql\"\n"
+"create procedure cl_tmp_inx_recov_fill ()\n"
+"{\n"
+"if (registry_get (\'__rb_id_only_for_plain_ro_obj\') = \'1\')\n"
+"return;\n"
+"log_enable (2,1);\n"
+"log_message (\'Cleaning the temporary table ...\');\n"
+"again:\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster) option (index RDF_QUAD_RECOV_TMP, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster) option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_OP, index_only, no cluster) option (index RDF_QUAD_RECOV_TMP_OP, no cluster);\n"
+"\n"
+"if (exists (select 1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster)))\n"
+"goto again;\n"
+"\n"
+"log_message (\'Copying all quads to a temporary table ...\');\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster);\n"
+"insert soft DB.DBA.RDF_QUAD_RECOV_TMP index RDF_QUAD_RECOV_TMP_POGS option (no cluster) (G1,S1,P1,O1) select G,S,P,O from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster);\n"
+"}\n"
+"--src sparql.sql:14778\n";
+
+static const char *proc369 = 
+"#line 14800 \"[executable]/sparql.sql\"\n"
+"create procedure cl_inx_recov_clean ()\n"
+"{\n"
+"if (registry_get (\'__rb_id_only_for_plain_ro_obj\') = \'1\')\n"
+"return;\n"
+"log_enable (2,1);\n"
+"log_message (\'Cleaning the quad storage ...\');\n"
+"again:\n"
+"delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD, no cluster) option (index RDF_QUAD, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster) option (index RDF_QUAD_POGS, no cluster);\n"
+"delete from DB.DBA.RDF_QUAD table option (index RDF_QUAD_OP, index_only, no cluster) option (index RDF_QUAD_OP, no cluster);\n"
+"if (exists (select 1 from DB.DBA.RDF_QUAD table option (index RDF_QUAD_POGS, no cluster)))\n"
+"goto again;\n"
+"\n"
+"}\n"
+"--src sparql.sql:14798\n";
+
+static const char *proc370 = 
+"#line 14816 \"[executable]/sparql.sql\"\n"
+"create procedure cl_inx_recov_fill_1 ()\n"
+"{\n"
+"if (registry_get (\'__rb_id_only_for_plain_ro_obj\') = \'1\')\n"
+"return;\n"
+"log_enable (2,1);\n"
+"log_message (\'Refilling the quad storage (PK) from the temporary table...\');\n"
+"insert into DB.DBA.RDF_QUAD index RDF_QUAD option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP, no cluster);\n"
+"log_message (\'Refilling the quad storage (POGS) from the temporary table...\');\n"
+"insert into DB.DBA.RDF_QUAD index RDF_QUAD_POGS option (no cluster) (G,S,P,O) select G1,S1,P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);\n"
+"log_message (\'Refilling the quad storage (OP) from the temporary table...\');\n"
+"insert soft DB.DBA.RDF_QUAD index RDF_QUAD_OP option (index_only, no cluster) (P,O) select P1,O1 from DB.DBA.RDF_QUAD_RECOV_TMP table option (index RDF_QUAD_RECOV_TMP_POGS, no cluster);\n"
+"log_message (\'Done.\');\n"
+"}\n"
+"--src sparql.sql:14814\n";
+
+static const char *proc371 = 
+"#line 14842 \"[executable]/sparql.sql\"\n"
+"create procedure exec_from_daq (in cmd varchar)\n"
+"{\n"
+"declare aq any;\n"
+"aq := async_queue (1);\n"
+"aq_request (aq, \'DB.DBA.AQ_EXEC_SRV\', vector (cmd));\n"
+"aq_wait_all (aq);\n"
+"}\n"
+"--src sparql.sql:14840\n";
+
+static const char *proc372 = 
+"#line 14851 \"[executable]/sparql.sql\"\n"
+"create procedure cl_inx_recov (in force int := 0)\n"
+"{\n"
+"declare old_mode, tries int;\n"
+"if (force)\n"
+"cl_exec (\'registry_remove (\'\'__rb_id_only_for_plain_ro_obj\'\')\');\n"
+"if (registry_get (\'__rb_id_only_for_plain_ro_obj\') = \'1\')\n"
+"return;\n"
+"cl_exec (\'checkpoint_interval (0)\');\n"
+"log_message (\'Automatic checkpoint is stopped, must enable manually once upgrade finished.\');\n"
+"cl_exec (\'__dbf_set (\'\'cl_max_keep_alives_missed\'\', 10000)\');\n"
+"cl_exec (\'__dbf_set (\'\'cl_non_logged_write_mode\'\', 1)\');\n"
+"cl_exec (\'checkpoint\');\n"
+"old_mode := log_enable (2,1);\n"
+"cl_exec (\'exec_from_daq (\'\'cl_tmp_inx_recov_fill ()\'\')\');\n"
+"clear_retry:\n"
+"cl_exec (\'exec_from_daq (\'\'cl_inx_recov_clean ()\'\')\');\n"
+"if (\n"
+"exists (select 1 from rdf_quad table option (index rdf_quad)) or\n"
+"exists (select 1 from rdf_quad table option (index rdf_quad_pogs)) or\n"
+"exists (select 1 from rdf_quad table option (index rdf_quad_op, index_only))\n"
+")\n"
+"{\n"
+"tries := tries + 1;\n"
+"if (tries > 100)\n"
+"{\n"
+"log_message (\'Quad store can not be cleaned, data reloading is strictly recommended.\');\n"
+"cl_exec (\'raw_exit ()\');\n"
+"}\n"
+"log_message (sprintf (\'Quad store is not fully cleaned, will try again [%d]\', tries));\n"
+"goto clear_retry;\n"
+"}\n"
+"cl_exec (\'exec_from_daq (\'\'cl_inx_recov_fill_1 ()\'\')\');\n"
+"cl_exec (\'registry_set (\'\'__rb_id_only_for_plain_ro_obj\'\', \'\'1\'\')\');\n"
+"if (not force)\n"
+"cl_exec (\'checkpoint\');\n"
+"log_message (\'integrity check (completeness of index RDF_QUAD_POGS of DB.DBA.RDF_QUAD) ...\');\n"
+"if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index RDF_QUAD_POGS)\n"
+"where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))\n"
+"log_message (\'** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.\');\n"
+"\n"
+"log_message (\'integrity check (completeness of primary key of DB.DBA.RDF_QUAD) ...\');\n"
+"if (exists (select top 1 1 from DB.DBA.RDF_QUAD a table option (index RDF_QUAD_POGS) where not exists (select 1 from DB.DBA.RDF_QUAD b table option (loop, index RDF_QUAD)\n"
+"where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s)))\n"
+"log_message (\'** IMPORTANT WARNING: not all rows of DB.DBA.RDF_QUAD are found in RDF_QUAD_POGS, data reloading is strictly recommended.\');\n"
+"log_enable (old_mode, 1);\n"
+"cl_exec (\'__dbf_set (\'\'cl_non_logged_write_mode\'\', 0)\');\n"
+"log_message (\'Update complete.\');\n"
+"if (force)\n"
+"log_message (\'Must do checkpoint to persist the db state.\');\n"
+"}\n"
+"--src sparql.sql:14849\n";
 
 /* sparql_io.sql */
 
-static const char *proc329 = 
+static const char *proc373 = 
 "#line 25 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_XML_WRITE_NS (inout ses any)\n"
 "{\n"
@@ -12981,7 +15349,7 @@ static const char *proc329 =
 "}\n"
 "--src sparql_io.sql:23\n";
 
-static const char *proc330 = 
+static const char *proc374 = 
 "#line 34 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_XML_WRITE_HEAD (inout ses any, in colnames any)\n"
 "{\n"
@@ -12997,7 +15365,7 @@ static const char *proc330 =
 "}\n"
 "--src sparql_io.sql:32\n";
 
-static const char *proc331 = 
+static const char *proc375 = 
 "#line 49 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_RSET_XML_HTTP_PRE (in colnames any, in accept varchar)\n"
 "{\n"
@@ -13015,7 +15383,7 @@ static const char *proc331 =
 "}\n"
 "--src sparql_io.sql:47\n";
 
-static const char *proc332 = 
+static const char *proc376 = 
 "#line 66 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_XML_HTTP_INIT (inout env any)\n"
 "{\n"
@@ -13023,7 +15391,7 @@ static const char *proc332 =
 "}\n"
 "--src sparql_io.sql:64\n";
 
-static const char *proc333 = 
+static const char *proc377 = 
 "#line 73 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_RSET_XML_HTTP_FINAL (inout env any)\n"
 "{\n"
@@ -13032,14 +15400,14 @@ static const char *proc333 =
 "}\n"
 "--src sparql_io.sql:71\n";
 
-static const char *other37 = 
+static const char *other38 = 
 " create aggregate DB.DBA.SPARQL_RSET_XML_HTTP (inout colnames any, inout row any) from\n"
 "DB.DBA.SPARQL_RSET_XML_HTTP_INIT,\n"
 "sparql_rset_xml_write_row,\n"
 "DB.DBA.SPARQL_RSET_XML_HTTP_FINAL\n"
 "order\n";
 
-static const char *proc334 = 
+static const char *proc378 = 
 "#line 90 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_DICT_XML_HTTP_PRE (in colnames any, in accept varchar)\n"
 "{\n"
@@ -13055,13 +15423,13 @@ static const char *proc334 =
 "}\n"
 "--src sparql_io.sql:88\n";
 
-static const char *other38 = 
+static const char *other39 = 
 " create aggregate DB.DBA.SPARQL_DICT_XML_HTTP (inout colnames any, inout row any) from\n"
 "DB.DBA.SPARQL_RSET_XML_HTTP_INIT,\n"
 "sparql_dict_xml_write_row,\n"
 "DB.DBA.SPARQL_RSET_XML_HTTP_FINAL\n";
 
-static const char *proc335 = 
+static const char *proc379 = 
 "#line 113 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_TTL_WRITE_NS (inout ses any)\n"
 "{\n"
@@ -13071,7 +15439,7 @@ static const char *proc335 =
 "}\n"
 "--src sparql_io.sql:111\n";
 
-static const char *proc336 = 
+static const char *proc380 = 
 "#line 122 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_TTL_WRITE_HEAD (inout ses any, in colnames any)\n"
 "{\n"
@@ -13090,7 +15458,7 @@ static const char *proc336 =
 "}\n"
 "--src sparql_io.sql:120\n";
 
-static const char *proc337 = 
+static const char *proc381 = 
 "#line 140 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_RSET_TTL_HTTP_PRE (in colnames any, in accept varchar)\n"
 "{\n"
@@ -13112,7 +15480,7 @@ static const char *proc337 =
 "}\n"
 "--src sparql_io.sql:138\n";
 
-static const char *proc338 = 
+static const char *proc382 = 
 "#line 161 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_TTL_HTTP_INIT (inout env any)\n"
 "{\n"
@@ -13120,7 +15488,7 @@ static const char *proc338 =
 "}\n"
 "--src sparql_io.sql:159\n";
 
-static const char *proc339 = 
+static const char *proc383 = 
 "#line 168 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_RSET_TTL_HTTP_FINAL (inout env any)\n"
 "{\n"
@@ -13128,14 +15496,14 @@ static const char *proc339 =
 "}\n"
 "--src sparql_io.sql:166\n";
 
-static const char *other39 = 
+static const char *other40 = 
 " create aggregate DB.DBA.SPARQL_RSET_TTL_HTTP (inout colnames any, inout row any) from\n"
 "DB.DBA.SPARQL_RSET_TTL_HTTP_INIT,\n"
 "sparql_rset_ttl_write_row,\n"
 "DB.DBA.SPARQL_RSET_TTL_HTTP_FINAL\n"
 "order\n";
 
-static const char *proc340 = 
+static const char *proc384 = 
 "#line 183 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_NT_WRITE_NS (inout ses any)\n"
 "{\n"
@@ -13143,7 +15511,7 @@ static const char *proc340 =
 "}\n"
 "--src sparql_io.sql:181\n";
 
-static const char *proc341 = 
+static const char *proc385 = 
 "#line 190 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_RSET_NT_WRITE_HEAD (inout ses any, in colnames any)\n"
 "{\n"
@@ -13158,7 +15526,7 @@ static const char *proc341 =
 "}\n"
 "--src sparql_io.sql:188\n";
 
-static const char *proc342 = 
+static const char *proc386 = 
 "#line 204 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_RSET_NT_HTTP_PRE (in colnames any, in accept varchar)\n"
 "{\n"
@@ -13180,14 +15548,14 @@ static const char *proc342 =
 "}\n"
 "--src sparql_io.sql:202\n";
 
-static const char *other40 = 
+static const char *other41 = 
 " create aggregate DB.DBA.SPARQL_RSET_NT_HTTP (inout colnames any, inout row any) from\n"
 "DB.DBA.SPARQL_RSET_TTL_HTTP_INIT,\n"
 "sparql_rset_nt_write_row,\n"
 "DB.DBA.SPARQL_RSET_TTL_HTTP_FINAL\n"
 "order\n";
 
-static const char *proc343 = 
+static const char *proc387 = 
 "#line 235 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_REXEC_INT (\n"
 "in res_mode integer,\n"
@@ -13482,7 +15850,7 @@ static const char *proc343 =
 "}\n"
 "--src sparql_io.sql:233\n";
 
-static const char *proc344 = 
+static const char *proc388 = 
 "#line 528 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_REXEC (\n"
 "in service varchar,\n"
@@ -13499,7 +15867,7 @@ static const char *proc344 =
 "}\n"
 "--src sparql_io.sql:526\n";
 
-static const char *proc345 = 
+static const char *proc389 = 
 "#line 543 \"[executable]/sparql_io.sql\"\n"
 "create function DB.DBA.SPARQL_REXEC_TO_ARRAY (\n"
 "in service varchar,\n"
@@ -13517,7 +15885,7 @@ static const char *proc345 =
 "}\n"
 "--src sparql_io.sql:541\n";
 
-static const char *proc346 = 
+static const char *proc390 = 
 "#line 559 \"[executable]/sparql_io.sql\"\n"
 "create function DB.DBA.SPARQL_REXEC_TO_ARRAY_OF_OBJ (\n"
 "in service varchar,\n"
@@ -13535,7 +15903,7 @@ static const char *proc346 =
 "}\n"
 "--src sparql_io.sql:557\n";
 
-static const char *proc347 = 
+static const char *proc391 = 
 "#line 575 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_REXEC_WITH_META (\n"
 "in service varchar,\n"
@@ -13554,7 +15922,7 @@ static const char *proc347 =
 "}\n"
 "--src sparql_io.sql:573\n";
 
-static const char *proc348 = 
+static const char *proc392 = 
 "#line 593 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_SINV_IMP (in ws_endpoint varchar, in ws_params any, in qtext_template varchar, in qtext_posmap nvarchar, in param_row any, in expected_vars any)\n"
 "{\n"
@@ -13599,7 +15967,7 @@ static const char *proc348 =
 static const char *view0 = 
 "create procedure view DB.DBA.SPARQL_SINV_2 as DB.DBA.SPARQL_SINV_IMP (ws_endpoint, ws_params, qtext_template, qtext_posmap, param_row, expected_vars)(RSET any)\n";
 
-static const char *proc349 = 
+static const char *proc393 = 
 "#line 639 \"[executable]/sparql_io.sql\"\n"
 "create procedure \"querySoap\"  (in  \"Command\" varchar\n"
 ", in  \"Properties\" any\n"
@@ -13634,7 +16002,7 @@ static const char *proc349 =
 "}\n"
 "--src sparql_io.sql:637\n";
 
-static const char *proc350 = 
+static const char *proc394 = 
 "#line 673 \"[executable]/sparql_io.sql\"\n"
 " create procedure DB.DBA.SPARQL_WRITE_EXEC_STATUS (inout ses any, in line_format varchar, inout status any)\n"
 "{\n"
@@ -13654,7 +16022,7 @@ static const char *proc350 =
 "}\n"
 "--src sparql_io.sql:671\n";
 
-static const char *proc351 = 
+static const char *proc395 = 
 "#line 692 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_XML_WRITE_HEAD (inout ses any, in mdta any)\n"
 "{\n"
@@ -13682,7 +16050,7 @@ static const char *proc351 =
 "}\n"
 "--src sparql_io.sql:690\n";
 
-static const char *proc352 = 
+static const char *proc396 = 
 "#line 718 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_XML_WRITE_RES (inout ses any, in mdta any, inout dta any)\n"
 "{\n"
@@ -13695,7 +16063,7 @@ static const char *proc352 =
 "}\n"
 "--src sparql_io.sql:716\n";
 
-static const char *proc353 = 
+static const char *proc397 = 
 "#line 729 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_XML_WRITE_ROW (inout ses any, in mdta any, inout dta any)\n"
 "{\n"
@@ -13723,6 +16091,7 @@ static const char *proc353 =
 "if (res is null)\n"
 "res := sprintf (\'bad://%d\', iri_id_num (_val));\n"
 "http (sprintf (\'\\n   <binding name=\"%s\"><uri>\', _name), ses);\n"
+"res := charset_recode (res, \'UTF-8\', \'_WIDE_\');\n"
 "http_value (res, 0, ses);\n"
 "http (\'</uri></binding>\', ses);\n"
 "}\n"
@@ -13732,7 +16101,7 @@ static const char *proc353 =
 "if (_val like \'nodeID://%\')\n"
 "http (sprintf (\'\\n   <binding name=\"%s\"><bnode>%s</bnode></binding>\', _name, _val), ses);\n"
 "else\n"
-"http (sprintf (\'\\n   <binding name=\"%s\"><uri>%V</uri></binding>\', _name, _val), ses);\n"
+"http (sprintf (\'\\n   <binding name=\"%s\"><uri>%V</uri></binding>\', _name, charset_recode (_val, \'UTF-8\', \'_WIDE_\')), ses);\n"
 "}\n"
 "else\n"
 "{\n"
@@ -13794,18 +16163,18 @@ static const char *proc353 =
 "}\n"
 "--src sparql_io.sql:727\n";
 
-static const char *proc354 = 
-"#line 826 \"[executable]/sparql_io.sql\"\n"
+static const char *proc398 = 
+"#line 827 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_NS (inout ses any)\n"
 "{\n"
 "http (\'<rdf:RDF xmlns:res=\"http://www.w3.org/2005/sparql-results#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
 "<rdf:Description rdf:nodeID=\"rset\">\n"
 "<rdf:type rdf:resource=\"http://www.w3.org/2005/sparql-results#ResultSet\" />\', ses);\n"
 "}\n"
-"--src sparql_io.sql:824\n";
+"--src sparql_io.sql:825\n";
 
-static const char *proc355 = 
-"#line 834 \"[executable]/sparql_io.sql\"\n"
+static const char *proc399 = 
+"#line 835 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_HEAD (inout ses any, in mdta any)\n"
 "{\n"
 "declare i, col_count integer;\n"
@@ -13825,10 +16194,10 @@ static const char *proc355 =
 "i := i + 1;\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:832\n";
+"--src sparql_io.sql:833\n";
 
-static const char *proc356 = 
-"#line 855 \"[executable]/sparql_io.sql\"\n"
+static const char *proc400 = 
+"#line 856 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_RES (inout ses any, in mdta any, inout dta any)\n"
 "{\n"
 "for (declare ctr integer, ctr := 0; ctr < length (dta); ctr := ctr + 1)\n"
@@ -13838,10 +16207,10 @@ static const char *proc356 =
 "http (\'\\n    </res:solution>\', ses);\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:853\n";
+"--src sparql_io.sql:854\n";
 
-static const char *proc357 = 
-"#line 866 \"[executable]/sparql_io.sql\"\n"
+static const char *proc401 = 
+"#line 867 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_ROW (inout ses any, in mdta any, inout dta any, in rowno integer)\n"
 "{\n"
 "mdta := mdta[0];\n"
@@ -13867,7 +16236,7 @@ static const char *proc357 =
 "\n"
 "if (res is null)\n"
 "res := sprintf (\'bad://%d\', iri_id_num (_val));\n"
-"http (sprintf (\' rdf:resource=\"%V\"/></res:binding>\', res), ses);\n"
+"http (sprintf (\' rdf:resource=\"%V\"/></res:binding>\', charset_recode (res, \'UTF-8\', \'_WIDE_\')), ses);\n"
 "}\n"
 "}\n"
 "else if (isstring (_val) and (1 = __box_flags (_val)))\n"
@@ -13875,7 +16244,7 @@ static const char *proc357 =
 "if (_val like \'nodeID://%\')\n"
 "http (sprintf (\' rdf:nodeID=\"b%s\"/></res:binding>\', subseq(_val, 9)), ses);\n"
 "else\n"
-"http (sprintf (\' rdf:resource=\"%V\"/></res:binding>\', _val), ses);\n"
+"http (sprintf (\' rdf:resource=\"%V\"/></res:binding>\', charset_recode (_val, \'UTF-8\', \'_WIDE_\')), ses);\n"
 "}\n"
 "else\n"
 "{\n"
@@ -13926,20 +16295,20 @@ static const char *proc357 =
 "end_of_binding: ;\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:864\n";
+"--src sparql_io.sql:865\n";
 
-static const char *proc358 = 
-"#line 952 \"[executable]/sparql_io.sql\"\n"
+static const char *proc402 = 
+"#line 953 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_TTL_WRITE_NS (inout ses any)\n"
 "{\n"
 "http (\'@prefix res: <http://www.w3.org/2005/sparql-results#> .\n"
 "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"
 "_:_ a res:ResultSet .\\n\', ses);\n"
 "}\n"
-"--src sparql_io.sql:950\n";
+"--src sparql_io.sql:951\n";
 
-static const char *proc359 = 
-"#line 960 \"[executable]/sparql_io.sql\"\n"
+static const char *proc403 = 
+"#line 961 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_TTL_WRITE_HEAD (inout ses any, in mdta any)\n"
 "{\n"
 "declare i, col_count integer;\n"
@@ -13965,10 +16334,10 @@ static const char *proc359 =
 "}\n"
 "http (\'\" .\\n\', ses);\n"
 "}\n"
-"--src sparql_io.sql:958\n";
+"--src sparql_io.sql:959\n";
 
-static const char *proc360 = 
-"#line 987 \"[executable]/sparql_io.sql\"\n"
+static const char *proc404 = 
+"#line 988 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_TTL_WRITE_RES (inout ses any, in mdta any, inout dta any)\n"
 "{\n"
 "declare colctr, colcount, rowctr, len, fake_agg_ctx integer;\n"
@@ -13992,18 +16361,18 @@ static const char *proc360 =
 "rowctr := rowctr + 1;\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:985\n";
+"--src sparql_io.sql:986\n";
 
-static const char *proc361 = 
-"#line 1012 \"[executable]/sparql_io.sql\"\n"
+static const char *proc405 = 
+"#line 1013 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_NT_WRITE_NS (inout ses any)\n"
 "{\n"
 "http (\'_:ResultSet2053 rdf:type <http://www.w3.org/1999/02/22-rdf-syntax-ns#res:ResultSet> .\\n\', ses);\n"
 "}\n"
-"--src sparql_io.sql:1010\n";
+"--src sparql_io.sql:1011\n";
 
-static const char *proc362 = 
-"#line 1018 \"[executable]/sparql_io.sql\"\n"
+static const char *proc406 = 
+"#line 1019 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_NT_WRITE_HEAD (inout ses any, in mdta any)\n"
 "{\n"
 "declare i, col_count integer;\n"
@@ -14025,10 +16394,10 @@ static const char *proc362 =
 "i := i + 1;\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:1016\n";
+"--src sparql_io.sql:1017\n";
 
-static const char *proc363 = 
-"#line 1041 \"[executable]/sparql_io.sql\"\n"
+static const char *proc407 = 
+"#line 1042 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_NT_WRITE_RES (inout ses any, in mdta any, inout dta any)\n"
 "{\n"
 "declare colctr, colcount, rowctr, len, fake_agg_ctx integer;\n"
@@ -14052,11 +16421,11 @@ static const char *proc363 =
 "rowctr := rowctr + 1;\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:1039\n";
+"--src sparql_io.sql:1040\n";
 
-static const char *proc364 = 
-"#line 1066 \"[executable]/sparql_io.sql\"\n"
-"create procedure DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE (inout ses any, inout metas any, inout rset any, in is_js integer := 0, in esc_mode integer := 1)\n"
+static const char *proc408 = 
+"#line 1067 \"[executable]/sparql_io.sql\"\n"
+"create procedure DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE (inout ses any, inout metas any, inout rset any, in is_js integer := 0, in esc_mode integer := 1, in pure_html integer := 0)\n"
 "{\n"
 "declare varctr, varcount, resctr, rescount integer;\n"
 "declare trnewline, newline varchar;\n"
@@ -14126,7 +16495,7 @@ static const char *proc364 =
 "\n"
 "\n"
 "}\n"
-"else if (__tag of rdf_box = __tag (val))\n"
+"else if (pure_html and __tag of rdf_box = __tag (val))\n"
 "http_rdf_object (val, ses, 1);\n"
 "else\n"
 "{\n"
@@ -14139,10 +16508,10 @@ static const char *proc364 =
 "}\n"
 "http (trnewline || \'</table>\', ses);\n"
 "}\n"
-"--src sparql_io.sql:1064\n";
+"--src sparql_io.sql:1065\n";
 
-static const char *proc365 = 
-"#line 1151 \"[executable]/sparql_io.sql\"\n"
+static const char *proc409 = 
+"#line 1152 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_JSON_WRITE_BINDING (inout ses any, in colname varchar, inout val any)\n"
 "{\n"
 "http(\' \"\', ses);\n"
@@ -14235,10 +16604,10 @@ static const char *proc365 =
 "}\n"
 "http (\'\" }\', ses);\n"
 "}\n"
-"--src sparql_io.sql:1149\n";
+"--src sparql_io.sql:1150\n";
 
-static const char *proc366 = 
-"#line 1245 \"[executable]/sparql_io.sql\"\n"
+static const char *proc410 = 
+"#line 1246 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_JSON_WRITE (inout ses any, inout metas any, inout rset any)\n"
 "{\n"
 "declare varctr, varcount, resctr, rescount integer;\n"
@@ -14280,10 +16649,10 @@ static const char *proc366 =
 "}\n"
 "http (\' ] } }\', ses);\n"
 "}\n"
-"--src sparql_io.sql:1243\n";
+"--src sparql_io.sql:1244\n";
 
-static const char *proc367 = 
-"#line 1288 \"[executable]/sparql_io.sql\"\n"
+static const char *proc411 = 
+"#line 1289 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_RESULTS_CSV_WRITE (inout ses any, inout metas any, inout rset any)\n"
 "{\n"
 "declare varctr, varcount, resctr, rescount integer;\n"
@@ -14310,10 +16679,10 @@ static const char *proc367 =
 "http(\'\\n\', ses);\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:1286\n";
+"--src sparql_io.sql:1287\n";
 
-static const char *proc368 = 
-"#line 1317 \"[executable]/sparql_io.sql\"\n"
+static const char *proc412 = 
+"#line 1318 \"[executable]/sparql_io.sql\"\n"
 "create function DB.DBA.SPARQL_RESULTS_WRITE (inout ses any, inout metas any, inout rset any, in accept varchar, in add_http_headers integer, in status any := null) returns varchar\n"
 "{\n"
 "declare singlefield varchar;\n"
@@ -14383,14 +16752,35 @@ static const char *proc368 =
 "if (status is not null)\n"
 "SPARQL_WRITE_EXEC_STATUS (ses, \'#%015s: %s\\n\', status);\n"
 "}\n"
+"else if (ret_format = \'TRIG\')\n"
+"DB.DBA.RDF_TRIPLES_TO_TRIG (triples, ses);\n"
 "else if (ret_format = \'NT\')\n"
 "DB.DBA.RDF_TRIPLES_TO_NT (triples, ses);\n"
 "else if (ret_format in (\'JSON\', \'JSON;TALIS\'))\n"
 "DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (triples, ses);\n"
+"else if (ret_format = \'JSON;LD\')\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, ses);\n"
 "else if (ret_format = \'JSON;RES\')\n"
 "DB.DBA.RDF_TRIPLES_TO_JSON (triples, ses);\n"
 "else if (ret_format = \'RDFA;XHTML\')\n"
 "DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML (triples, ses);\n"
+"else if (ret_format = \'HTML;UL\')\n"
+"{\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_UL (triples, ses);\n"
+"ret_mime := \'text/html\';\n"
+"}\n"
+"else if (ret_format = \'HTML;TR\')\n"
+"{\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_TR (triples, ses);\n"
+"ret_mime := \'text/html\';\n"
+"}\n"
+"else if (ret_format = \'HTML;MICRODATA\')\n"
+"{\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (triples, ses);\n"
+"ret_mime := \'text/html\';\n"
+"}\n"
+"else if (ret_format = \'JSON;MICRODATA\')\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (triples, ses);\n"
 "else if (ret_format = \'ATOM;XML\')\n"
 "DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT (triples, 1, ses);\n"
 "else if (ret_format = \'JSON;ODATA\')\n"
@@ -14474,7 +16864,7 @@ static const char *proc368 =
 "}\n"
 "if (ret_format = \'HTML\')\n"
 "{\n"
-"SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE(ses, metas, rset, 0);\n"
+"SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE(ses, metas, rset, 0, 1, case when ret_mime = \'text/html\' then 1 else 0 end);\n"
 "goto body_complete;\n"
 "}\n"
 "if (ret_format = \'JS\')\n"
@@ -14553,10 +16943,10 @@ static const char *proc368 =
 "http_header (coalesce (http_header_get (), \'\') || \'Content-Type: \' || ret_mime || \'; charset=UTF-8\\r\\n\');\n"
 "return ret_mime;\n"
 "}\n"
-"--src sparql_io.sql:1315\n";
+"--src sparql_io.sql:1316\n";
 
-static const char *proc369 = 
-"#line 1562 \"[executable]/sparql_io.sql\"\n"
+static const char *proc413 = 
+"#line 1584 \"[executable]/sparql_io.sql\"\n"
 "create procedure WS.WS.SPARQL_VHOST_RESET ()\n"
 "{\n"
 "if (not exists (select 1 from \"DB\".\"DBA\".\"SYS_USERS\" where U_NAME = \'SPARQL\'))\n"
@@ -14564,12 +16954,16 @@ static const char *proc369 =
 "DB.DBA.USER_CREATE (\'SPARQL\', uuid(), vector (\'DISABLED\', 1, \'LOGIN_QUALIFIER\', \'SPARQL\'));\n"
 "DB.DBA.EXEC_STMT (\'grant SPARQL_SELECT to \"SPARQL\"\', 0);\n"
 "}\n"
-"if (registry_get (\'__SPARQL_VHOST_RESET\') = \'1\')\n"
+"if (registry_get (\'__SPARQL_VHOST_RESET\') >= \'20110703\')\n"
 "return;\n"
 "DB.DBA.VHOST_REMOVE (lpath=>\'/SPARQL\');\n"
 "DB.DBA.VHOST_REMOVE (lpath=>\'/sparql\');\n"
+"DB.DBA.VHOST_REMOVE (lpath=>\'/sparql-auth\');\n"
+"DB.DBA.VHOST_REMOVE (lpath=>\'/sparql-graph-crud\');\n"
+"DB.DBA.VHOST_REMOVE (lpath=>\'/sparql-graph-crud-auth\');\n"
 "DB.DBA.VHOST_REMOVE (lpath=>\'/services/sparql-query\');\n"
 "DB.DBA.VHOST_DEFINE (lpath=>\'/sparql/\', ppath => \'/!sparql/\', is_dav => 1, vsp_user => \'dba\', opts => vector(\'noinherit\', 1));\n"
+"DB.DBA.VHOST_DEFINE (lpath=>\'/sparql-graph-crud/\', ppath => \'/!sparql-graph-crud/\', is_dav => 1, vsp_user => \'dba\', opts => vector(\'noinherit\', 1, \'exec_as_get\', 1));\n"
 "DB.DBA.VHOST_REMOVE (lpath=>\'/sparql-auth\');\n"
 "DB.DBA.VHOST_DEFINE (lpath=>\'/sparql-auth\',\n"
 "ppath => \'/!sparql/\',\n"
@@ -14579,15 +16973,23 @@ static const char *proc369 =
 "auth_fn=>\'DB.DBA.HP_AUTH_SPARQL_USER\',\n"
 "realm=>\'SPARQL\',\n"
 "sec=>\'digest\');\n"
+"DB.DBA.VHOST_DEFINE (lpath=>\'/sparql-graph-crud-auth\',\n"
+"ppath => \'/!sparql-graph-crud/\',\n"
+"is_dav => 1,\n"
+"vsp_user => \'dba\',\n"
+"opts => vector(\'noinherit\', 1, \'exec_as_get\', 1),\n"
+"auth_fn=>\'DB.DBA.HP_AUTH_SPARQL_USER\',\n"
+"realm=>\'SPARQL\',\n"
+"sec=>\'digest\');\n"
 "\n"
 "\n"
 "\n"
-"registry_set (\'__SPARQL_VHOST_RESET\', \'1\');\n"
+"registry_set (\'__SPARQL_VHOST_RESET\', \'20110703\');\n"
 "}\n"
-"--src sparql_io.sql:1560\n";
+"--src sparql_io.sql:1582\n";
 
-static const char *proc370 = 
-"#line 1594 \"[executable]/sparql_io.sql\"\n"
+static const char *proc414 = 
+"#line 1628 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_PROTOCOL_ERROR_REPORT (\n"
 "inout path varchar, inout params any, inout lines any,\n"
 "in httpcode varchar, in httpstatus varchar,\n"
@@ -14634,10 +17036,10 @@ static const char *proc370 =
 "http (query);\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:1592\n";
+"--src sparql_io.sql:1626\n";
 
-static const char *proc371 = 
-"#line 1642 \"[executable]/sparql_io.sql\"\n"
+static const char *proc415 = 
+"#line 1676 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_WSDL11 (in lines any)\n"
 "{\n"
 "declare host any;\n"
@@ -14655,10 +17057,10 @@ static const char *proc371 =
 "</service>\n"
 "</definitions>\', host));\n"
 "}\n"
-"--src sparql_io.sql:1640\n";
+"--src sparql_io.sql:1674\n";
 
-static const char *proc372 = 
-"#line 1661 \"[executable]/sparql_io.sql\"\n"
+static const char *proc416 = 
+"#line 1695 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_WSDL (in lines any)\n"
 "{\n"
 "declare host any;\n"
@@ -14673,10 +17075,10 @@ static const char *proc372 =
 "</service>\n"
 "</description>\', host));\n"
 "}\n"
-"--src sparql_io.sql:1659\n";
+"--src sparql_io.sql:1693\n";
 
-static const char *proc373 = 
-"#line 1677 \"[executable]/sparql_io.sql\"\n"
+static const char *proc417 = 
+"#line 1711 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_SOAP_NS (in ver int)\n"
 "{\n"
 "if (ver = 11)\n"
@@ -14686,18 +17088,18 @@ static const char *proc373 =
 "else\n"
 "signal (\'42000\', \'Un-supported SOAP version\');\n"
 "}\n"
-"--src sparql_io.sql:1675\n";
+"--src sparql_io.sql:1709\n";
 
-static const char *proc374 = 
-"#line 1688 \"[executable]/sparql_io.sql\"\n"
+static const char *proc418 = 
+"#line 1722 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_PT_NS ()\n"
 "{\n"
 "return \'http://www.w3.org/2005/09/sparql-protocol-types/#\';\n"
 "}\n"
-"--src sparql_io.sql:1686\n";
+"--src sparql_io.sql:1720\n";
 
-static const char *proc375 = 
-"#line 1695 \"[executable]/sparql_io.sql\"\n"
+static const char *proc419 = 
+"#line 1729 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.PARSE_SPARQL_WS_PARAMS (in lst any) returns any\n"
 "{\n"
 "declare pval, parse, res any;\n"
@@ -14745,21 +17147,274 @@ static const char *proc375 =
 "vectorbld_final (res);\n"
 "return res;\n"
 "}\n"
-"--src sparql_io.sql:1693\n";
+"--src sparql_io.sql:1727\n";
 
-static const char *proc376 = 
-"#line 1744 \"[executable]/sparql_io.sql\"\n"
+static const char *proc420 = 
+"#line 1778 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.rdf_find_str (in x any)\n"
 "{\n"
 "return cast (x as varchar);\n"
 "}\n"
-"--src sparql_io.sql:1742\n";
+"--src sparql_io.sql:1776\n";
 
-static const char *other41 = 
+static const char *other42 = 
 "grant execute on DB.DBA.rdf_find_str to public\n";
-static const char *proc377 = 
-"#line 1753 \"[executable]/sparql_io.sql\"\n"
-"create procedure WS.WS.sparql_enpoint_format_opts (in can_cxml varchar, in can_qrcode varchar, in params varchar, in qr varchar)\n"
+static const char *proc421 = 
+"#line 1788 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE()\n"
+"{\n"
+"http(\'<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n\');\n"
+"http(\'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\\n\');\n"
+"http(\'<html version=\"-//W3C//DTD XHTML 1.1//EN\"\\n\');\n"
+"http(\'    xmlns=\"http://www.w3.org/1999/xhtml\"\\n\');\n"
+"http(\'    xml:lang=\"en\"\\n\');\n"
+"http(\'>\\n\');\n"
+"}\n"
+"--src sparql_io.sql:1786\n";
+
+static const char *proc422 = 
+"#line 1800 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_HTML_HEAD(in title varchar)\n"
+"{\n"
+"http(\'    <title>\' || title || \'</title>\\n\');\n"
+"http(sprintf(\'    <meta name=\"Copyright\" content=\"Copyright © %d OpenLink Software\" />\\n\', year(now())));\n"
+"http(\'    <meta name=\"Keywords\" content=\"OpenLink Virtuoso Sparql\" />\\n\');\n"
+"http(\'    <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\\n\');\n"
+"}\n"
+"--src sparql_io.sql:1798\n";
+
+static const char *proc423 = 
+"#line 1810 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_STYLE ()\n"
+"{\n"
+"http(\'\\n\');\n"
+"http(\'\n"
+"<style type=\"text/css\">\n"
+"/*<![CDATA[*/\n"
+"html { padding: 0; }\n"
+"body {\n"
+"padding: 0;\n"
+"margin: 0;\n"
+"font-family:Gill Sans, Arial, Helvetica, sans-serif;\n"
+"font-size: 9pt;\n"
+"color: #333;\n"
+"background-color: #FDFDFD;\n"
+"}\n"
+"#header {\n"
+"padding: 0;\n"
+"margin: 0;\n"
+"background-color: #86B9D9;\n"
+"color: #FFFFFF;\n"
+"border-bottom: 1px solid #AAA;\n"
+"}\n"
+"#header h1 {\n"
+"font-size: 16pt;\n"
+"font-weight: normal;\n"
+"text-align: left;\n"
+"vertical-align: middle;\n"
+"padding: 4px 8px 4px 8px;\n"
+"margin: 0px 0px 0px 0px;\n"
+"}\n"
+"#menu {\n"
+"margin-left: 8px;\n"
+"margin-right: 8px;\n"
+"margin-top: 0px;\n"
+"clear: right;\n"
+"float: right;\n"
+"}\n"
+"#intro,#main {\n"
+"margin-left: 8px;\n"
+"margin-right: 8px;\n"
+"}\n"
+"#help {\n"
+"margin-left: 8px;\n"
+"margin-right: 8px;\n"
+"width: 80%\n"
+"}\n"
+"#footer {\n"
+"width: 100%;\n"
+"float: left;\n"
+"clear: left;\n"
+"margin: 2em 0 0;\n"
+"padding-top: 0.7ex;\n"
+"border-top: 1px solid #AAA;\n"
+"font-size: 8pt;\n"
+"text-align: center;\n"
+"}\n"
+"fieldset {\n"
+"border: 0;\n"
+"padding: 0;\n"
+"margin: 0;\n"
+"}\n"
+"fieldset label {\n"
+"font-weight: normal;\n"
+"white-space: nowrap;\n"
+"font-size: 11pt;\n"
+"color: #000;\n"
+"}\n"
+"fieldset label.n {\n"
+"display: block;\n"
+"vertical-align: bottom;\n"
+"margin-top:5px;\n"
+"width: 160px;\n"
+"float:left;\n"
+"white-space: nowrap;\n"
+"}\n"
+"fieldset label.n:after { content: \":\"; }\n"
+"fieldset label.n1 {\n"
+"display: block;\n"
+"vertical-align: bottom;\n"
+"margin-top:5px;\n"
+"width: 160px;\n"
+"float:left;\n"
+"white-space: nowrap;\n"
+"}\n"
+"fieldset label.ckb {\n"
+"width: 160px;\n"
+"font-weight: normal;\n"
+"font-size: 10pt;\n"
+"}\n"
+"fieldset label.ckb:after { content: \"\"; }\n"
+"fieldset textarea {\n"
+"width: 99%;\n"
+"font-family: monospace;\n"
+"font-size: 10pt;\n"
+"}\n"
+"#cxml {\n"
+"clear: both;\n"
+"display: block;\n"
+"}\n"
+"#savefs {\n"
+"clear: both;\n"
+"display: block;\n"
+"}\n"
+"span.info {\n"
+"font-size: 9pt;\n"
+"white-space: nowrap;\n"
+"height: 2em;\n"
+"}\n"
+"br { clear: both; }\n"
+"/*]]>*/\n"
+"</style>\n"
+"\');\n"
+"}\n"
+"--src sparql_io.sql:1808\n";
+
+static const char *proc424 = 
+"#line 1926 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_JAVASCRIPT (in can_cxml integer, in can_qrcode integer)\n"
+"{\n"
+"http(\'\\n\');\n"
+"http(\'    <script type=\"text/javascript\">\\n\');\n"
+"http(\'    /*<![CDATA[*/\\n\');\n"
+"http(\'	var last_format = 1;\\n\');\n"
+"http(\'	function format_select(query_obg)\\n\');\n"
+"http(\'	{\\n\');\n"
+"http(\'		var query = query_obg.value; \\n\');\n"
+"http(\'		var format = query_obg.form.format;\\n\');\n"
+"http(\'\\n\');\n"
+"http(\'		if ((query.match(/\\\\bconstruct\\\\b/i) || query.match(/\\\\bdescribe\\\\b/i)) && last_format == 1) {\\n\');\n"
+"http(\'			for(var i = format.options.length; i > 0; i--)\\n\');\n"
+"http(\'				format.options[i] = null;\\n\');\n"
+"http(\'			format.options[1] = new Option(\\\'N3/Turtle\\\',\\\'text/rdf+n3\\\');\\n\');\n"
+"http(\'			format.options[2] = new Option(\\\'RDF/JSON\\\',\\\'application/rdf+json\\\');\\n\');\n"
+"http(\'			format.options[3] = new Option(\\\'RDF/XML\\\',\\\'application/rdf+xml\\\');\\n\');\n"
+"http(\'			format.options[4] = new Option(\\\'N-Triples\\\',\\\'text/plain\\\');\\n\');\n"
+"http(\'			format.options[5] = new Option(\\\'XHTML+RDFa\\\',\\\'application/xhtml+xml\\\');\\n\');\n"
+"http(\'			format.options[6] = new Option(\\\'ATOM+XML\\\',\\\'application/atom+xml\\\');\\n\');\n"
+"http(\'			format.options[7] = new Option(\\\'ODATA/JSON\\\',\\\'application/odata+json\\\');\\n\');\n"
+"http(\'			format.options[8] = new Option(\\\'JSON-LD\\\',\\\'application/x-json+ld\\\');\\n\');\n"
+"http(\'			format.options[9] = new Option(\\\'HTML (list)\\\',\\\'text/x-html+ul\\\');\\n\');\n"
+"http(\'			format.options[10] = new Option(\\\'HTML (table)\\\',\\\'text/x-html+tr\\\');\\n\');\n"
+"http(\'			format.options[11] = new Option(\\\'HTML+Microdata\\\',\\\'text/html\\\');\\n\');\n"
+"http(\'			format.options[12] = new Option(\\\'Microdata/JSON\\\',\\\'application/microdata+json\\\');\\n\');\n"
+"http(\'			format.options[13] = new Option(\\\'CSV\\\',\\\'text/csv\\\');\\n\');\n"
+"http(\'			format.options[14] = new Option(\\\'TriG\\\',\\\'application/x-trig\\\');\\n\');\n"
+"if (can_cxml)\n"
+"{\n"
+"http(\'			format.options[15] = new Option(\\\'CXML (Pivot Collection)\\\',\\\'text/cxml\\\');\\n\');\n"
+"if (can_qrcode)\n"
+"http(\'		format.options[16] = new Option(\\\'CXML (Pivot Collection with QRcodes)\\\',\\\'text/cxml+qrcode\\\');\\n\');\n"
+"}\n"
+"http(\'			format.selectedIndex = 1;\\n\');\n"
+"http(\'			last_format = 2;\\n\');\n"
+"http(\'		}\\n\');\n"
+"http(\'\\n\');\n"
+"http(\'		if (!(query.match(/\\\\bconstruct\\\\b/i) || query.match(/\\\\bdescribe\\\\b/i)) && last_format == 2) {\\n\');\n"
+"http(\'			for(var i = format.options.length; i > 0; i--)\\n\');\n"
+"http(\'				format.options[i] = null;\\n\');\n"
+"http(\'			format.options[1] = new Option(\\\'HTML\\\',\\\'text/html\\\');\\n\');\n"
+"http(\'			format.options[2] = new Option(\\\'Spreadsheet\\\',\\\'application/vnd.ms-excel\\\');\\n\');\n"
+"http(\'			format.options[3] = new Option(\\\'XML\\\',\\\'application/sparql-results+xml\\\');\\n\');\n"
+"http(\'			format.options[4] = new Option(\\\'JSON\\\',\\\'application/sparql-results+json\\\');\\n\');\n"
+"http(\'			format.options[5] = new Option(\\\'Javascript\\\',\\\'application/javascript\\\');\\n\');\n"
+"http(\'			format.options[6] = new Option(\\\'N3/Turtle\\\',\\\'text/rdf+n3\\\');\\n\');\n"
+"http(\'			format.options[7] = new Option(\\\'RDF/XML\\\',\\\'application/rdf+xml\\\');\\n\');\n"
+"http(\'			format.options[8] = new Option(\\\'N-Triples\\\',\\\'text/plain\\\');\\n\');\n"
+"http(\'			format.options[9] = new Option(\\\'CSV\\\',\\\'text/csv\\\');\\n\');\n"
+"if (can_cxml)\n"
+"http(\'			format.options[10] = new Option(\\\'CXML (Pivot Collection)\\\',\\\'text/cxml\\\');\\n\');\n"
+"http(\'			format.selectedIndex = 1;\\n\');\n"
+"http(\'			last_format = 1;\\n\');\n"
+"http(\'		}\\n\');\n"
+"http(\'	}\\n\');\n"
+"http(\'\n"
+"function format_change(e)\n"
+"{\n"
+"var format = e.value;\n"
+"var cxml = document.getElementById(\"cxml\");\n"
+"if (!cxml) return;\n"
+"if ((format.match (/\\\\bCXML\\\\b/i)))\n"
+"{\n"
+"cxml.style.display=\"block\";\n"
+"} else {\n"
+"cxml.style.display=\"none\";\n"
+"}\n"
+"}\n"
+"function savedav_change(e)\n"
+"{\n"
+"var savefs = document.getElementById(\"savefs\");\n"
+"if (!savefs) return;\n"
+"if (e.checked)\n"
+"{\n"
+"savefs.style.display = \"block\";\n"
+"}\n"
+"else\n"
+"{\n"
+"savefs.style.display = \"none\";\n"
+"}\n"
+"}\n"
+"function sparql_endpoint_init()\n"
+"{\n"
+"var cxml = document.getElementById(\"cxml\");\n"
+"if (cxml) cxml.style.display=\"none\";\n"
+"var savefs = document.getElementById(\"savefs\");\n"
+"if (savefs) savefs.style.display=\"none\";\n"
+"}\n"
+"\');\n"
+"http(\'    /*]]>*/\\n\');\n"
+"http(\'    </script>\\n\');\n"
+"}\n"
+"--src sparql_io.sql:1924\n";
+
+static const char *proc425 = 
+"#line 2022 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_FOOTER()\n"
+"{\n"
+"http(\'    <div id=\"footer\">\\n\');\n"
+"http(sprintf(\'	Copyright © %d <a href=\"http://www.openlinksw.com/virtuoso\">OpenLink Software</a>\', year(now())));\n"
+"http(sprintf(\'<br />Virtuoso version %s on %s (%s), \', sys_stat(\'st_dbms_ver\'), sys_stat(\'st_build_opsys_id\'), host_id()));\n"
+"if (1 = sys_stat(\'cl_run_local_only\'))\n"
+"http(\'Single Server Edition\\n\');\n"
+"else\n"
+"http(sprintf(\'Cluster Edition (%d server processes)\\n\', sys_stat(\'cl_n_hosts\')));\n"
+"http(\'    </div>\\n\');\n"
+"}\n"
+"--src sparql_io.sql:2020\n";
+
+static const char *proc426 = 
+"#line 2036 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_FORMAT_OPTS (in can_cxml integer, in can_qrcode integer, in params varchar, in qr varchar)\n"
 "{\n"
 "declare opts any;\n"
 "declare format varchar;\n"
@@ -14769,16 +17424,17 @@ static const char *proc377 =
 "{\n"
 "format := (\n"
 "case lower(format)\n"
-"when \'json\' then \'application/sparql-results+json\'\n"
-"when \'js\' then \'application/javascript\'\n"
-"when \'html\' then \'text/html\'\n"
-"when \'sparql\' then \'application/sparql-results+xml\'\n"
-"when \'xml\' then \'application/sparql-results+xml\'\n"
-"when \'rdf\' then \'application/rdf+xml\'\n"
-"when \'n3\' then \'text/rdf+n3\'\n"
-"when \'cxml\' then \'text/cxml\'\n"
-"when \'cxml+qrcode\' then \'text/cxml+qrcode\'\n"
-"when \'csv\' then \'text/csv\'\n"
+"when \'json\'		then \'application/sparql-results+json\'\n"
+"when \'js\'		then \'application/javascript\'\n"
+"when \'html\'		then \'text/html\'\n"
+"when \'sparql\'		then \'application/sparql-results+xml\'\n"
+"when \'xml\'		then \'application/sparql-results+xml\'\n"
+"when \'rdf\'		then \'application/rdf+xml\'\n"
+"when \'n3\'		then \'text/rdf+n3\'\n"
+"when \'cxml\'		then \'text/cxml\'\n"
+"when \'cxml+qrcode\'	then \'text/cxml+qrcode\'\n"
+"when \'csv\'		then \'text/csv\'\n"
+"when \'json-ld\'		then \'application/ld+json\'\n"
 "else format\n"
 "end);\n"
 "}\n"
@@ -14789,51 +17445,374 @@ static const char *proc377 =
 ")\n"
 "{\n"
 "opts := vector (\n"
-"vector (\'text/rdf+n3\', \'N3/Turtle\'),\n"
-"vector (\'application/rdf+json\', \'JSON\'),\n"
-"vector (\'application/rdf+xml\', \'RDF/XML\'),\n"
-"vector (\'text/plain\', \'NTriples\'),\n"
-"vector (\'application/xhtml+xml\', \'XHTML+RDFa\'),\n"
-"vector (\'application/atom+xml\', \'ATOM+XML\'),\n"
-"vector (\'application/odata+json\', \'ODATA/JSON\')\n"
-");\n"
+"vector (\'text/rdf+n3\'				, \'N3/Turtle\'		),\n"
+"vector (\'application/rdf+json\'		, \'RDF/JSON\'		),\n"
+"vector (\'application/rdf+xml\'			, \'RDF/XML\'		),\n"
+"vector (\'text/plain\'				, \'N-Triples\'		),\n"
+"vector (\'application/xhtml+xml\'		, \'XHTML+RDFa\'		),\n"
+"vector (\'application/atom+xml\'		, \'ATOM+XML\'		),\n"
+"vector (\'application/odata+json\'		, \'ODATA/JSON\'		),\n"
+"vector (\'application/x-json+ld\'		, \'JSON-LD\'		),\n"
+"vector (\'text/x-html+ul\'			, \'HTML (list)\'		),\n"
+"vector (\'text/x-html+tr\'			, \'HTML (table)\'	),\n"
+"vector (\'text/html\'				, \'HTML+Microdata\'	),\n"
+"vector (\'application/microdata+json\'		, \'Microdata/JSON\'	),\n"
+"vector (\'text/csv\'				, \'CSV\'			),\n"
+"vector (\'application/x-trig\'			, \'TriG\'		) );\n"
 "}\n"
 "else\n"
 "{\n"
 "if (not length (format)) format := \'text/html\';\n"
 "opts := vector (\n"
-"vector (\'auto\', \'Auto\'),\n"
-"vector (\'text/html\', \'HTML\'),\n"
-"vector (\'application/vnd.ms-excel\', \'Spreadsheet\'),\n"
-"vector (\'application/sparql-results+xml\', \'XML\'),\n"
-"vector (\'application/sparql-results+json\', \'JSON\'),\n"
-"vector (\'application/javascript\', \'Javascript\'),\n"
-"vector (\'text/plain\', \'NTriples\'),\n"
-"vector (\'application/rdf+xml\', \'RDF/XML\')\n"
+"vector (\'auto\'				, \'Auto\'		),\n"
+"vector (\'text/html\'				, \'HTML\'		),\n"
+"vector (\'application/vnd.ms-excel\'		, \'Spreadsheet\'		),\n"
+"vector (\'application/sparql-results+xml\'	, \'XML\'			),\n"
+"vector (\'application/sparql-results+json\'	, \'JSON\'		),\n"
+"vector (\'application/javascript\'		, \'Javascript\'		),\n"
+"vector (\'text/plain\'				, \'NTriples\'		),\n"
+"vector (\'application/rdf+xml\'			, \'RDF/XML\'		) );\n"
+"}\n"
+"foreach (any x in opts) do\n"
+"{\n"
+"http(sprintf (\'			<option value=\"%V\" %s>%V</option>\\n\',\n"
+"x[0], case when format = x[0] then \'selected=\"selected\"\' else \'\' end , x[1]));\n"
+"}\n"
+"http(\'			<option value=\"text/csv\">CSV</option>\\n\');\n"
+"if (can_cxml)\n"
+"{\n"
+"http(\'			<option value=\"text/cxml\">CXML (Pivot Collection)</option>\\n\');\n"
+"if (can_qrcode)\n"
+"http(\'			<option value=\"text/cxml+qrcode\">CXML (Pivot Collection with QRcode)</option>\\n\');\n"
+"}\n"
+"}\n"
+"--src sparql_io.sql:2034\n";
+
+static const char *proc427 = 
+"#line 2110 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_SPONGE_OPTS (in params varchar)\n"
+"{\n"
+"declare s_param varchar;\n"
+"declare opts any;\n"
+"\n"
+"s_param := get_keyword (\'should-sponge\', params, \'\');\n"
+"opts := vector (\n"
+"vector (\'\', 		  \'Use only local data (including data retrieved before), but do not retrieve more\'),\n"
+"vector (\'soft\', 		  \'Retrieve remote RDF data for all missing source graphs\'),\n"
+"vector (\'grab-all\',	  \'Retrieve all missing remote RDF data that might be useful\'),\n"
+"vector (\'grab-all-seealso\', \'Retrieve all missing remote RDF data that might be useful, including seeAlso references\'),\n"
+"vector (\'grab-everything\',  \'Try to download all referenced resources (this may be very slow and inefficient)\')\n"
+");\n"
+"\n"
+"foreach (any x in opts) do\n"
+"{\n"
+"http(sprintf (\'			<option value=\"%V\" %s>%V</option>\\n\',\n"
+"x[0], case when s_param = x[0] then \'selected=\"selected\"\' else \'\' end , x[1]));\n"
+"}\n"
+"}\n"
+"--src sparql_io.sql:2108\n";
+
+static const char *proc428 = 
+"#line 2133 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_CXML_OPTION (in can_pivot integer, in params varchar, in lbl varchar)\n"
+"{\n"
+"declare val varchar;\n"
+"declare opts varchar;\n"
+"\n"
+"if (\'CXML_redir_for_subjs\' = lbl)\n"
+"{\n"
+"val := get_keyword (lbl, params, \'121\');\n"
+"http (\'		<label for=\"CXML_redir_for_subjs\" class=\"n\">External resource link</label>\\n\');\n"
+"http (\'		<select name=\"CXML_redir_for_subjs\" id=\"CXML_redir_for_subjs\">\\n\');\n"
+"opts := vector (\n"
+"vector (\'\',			\'No link out\'),\n"
+"vector (\'121\',		\'External resource link\'),\n"
+"vector (\'LOCAL_TTL\', 		\'External description resource (TTL)\'),\n"
+"vector (\'LOCAL_NTRIPLES\', 	\'External description resource (NTRIPLES)\'),\n"
+"vector (\'LOCAL_JSON\', 	\'External description resource (JSON)\'),\n"
+"vector (\'LOCAL_XML\', 		\'External description resource (RDF/XML)\')\n"
+");\n"
+"} else {\n"
+"val := get_keyword (lbl, params, \'\');\n"
+"http (\'		<label for=\"CXML_redir_for_hrefs\" class=\"n\">Facet link behavior</label>\\n\');\n"
+"http (\'		<select name=\"CXML_redir_for_hrefs\" id=\"CXML_redir_for_hrefs\">\\n\');\n"
+"opts := vector (\n"
+"vector (\'\',			\'Local faceted navigation link\'),\n"
+"vector (\'121\',		\'External resource link\'),\n"
+"vector (\'LOCAL_PIVOT\',	\'External faceted navigation link\'),\n"
+"vector (\'LOCAL_TTL\', 		\'External description resource (TTL)\'),\n"
+"vector (\'LOCAL_CXML\',		\'External description resource (CXML)\'),\n"
+"vector (\'LOCAL_NTRIPLES\', 	\'External description resource (NTRIPLES)\'),\n"
+"vector (\'LOCAL_JSON\', 	\'External description resource (JSON)\'),\n"
+"vector (\'LOCAL_XML\', 		\'External description resource (RDFXML)\')\n"
 ");\n"
 "}\n"
-"foreach (any x in opts) do\n"
+"\n"
+"foreach (any x in opts) do\n"
+"{\n"
+"if (\'LOCAL_PIVOT\' <> x[0] or can_pivot)\n"
+"http(sprintf (\'			<option value=\"%V\" %s>%V</option>\\n\',\n"
+"x[0], case when val = x[0] then \'selected=\"selected\"\' else \'\' end , x[1]));\n"
+"}\n"
+"\n"
+"http (\'		</select><br />\\n\');\n"
+"}\n"
+"--src sparql_io.sql:2131\n";
+
+static const char *proc429 = 
+"#line 2179 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.sparql_predefined_nsdecl ()\n"
+"{\n"
+"declare label varchar;\n"
+"label := \'Predefined Namespace Prefixes\';\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();\n"
+"\n"
+"http(\'<head>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_HEAD(label);\n"
+"WS.WS.SPARQL_ENDPOINT_STYLE();\n"
+"http(\'</head>\\n\');\n"
+"\n"
+"http (\'<body>\\n\');\n"
+"http (\'    <div id=\"header\">\\n\');\n"
+"http (\'	<h1 id=\"title\">\'); http (sprintf (\'%s\', label)); http (\'</h1>\\n\');\n"
+"http (\'    </div>\\n\\n\');\n"
+"http (\'    <div id=\"main\">\\n\');\n"
+"http (\'    <br />\\n\');\n"
+"http (\'    <table class=\"tableresult\" border=\"1\">\\n\');\n"
+"http (sprintf (\'	<tr><th>Prefix</th><th>URI</th></tr>\\n\'));\n"
+"for select NS_PREFIX, NS_URL from SYS_XML_PERSISTENT_NS_DECL order by 1 do\n"
+"{\n"
+"http (sprintf (\'	<tr><td>%V</td><td>%V</td></tr>\\n\', NS_PREFIX, NS_URL));\n"
+"}\n"
+"http (\'    </table>\\n\');\n"
+"http (\'    </div>\\n\\n\');\n"
+"\n"
+"http(\'<p>\');\n"
+"http (\'<button type=\"button\" name=\"back\" value=\"Back\" onclick=\"javascript:history.go(-1);\">Back</button>\\n\');\n"
+"http(\'</p>\\n\');\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_FOOTER();\n"
+"http(\'</body>\\n\');\n"
+"http(\'</html>\\n\');\n"
+"}\n"
+"--src sparql_io.sql:2177\n";
+
+static const char *proc430 = 
+"#line 2217 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.sparql_predefined_rdfinf ()\n"
+"{\n"
+"declare label varchar;\n"
+"label := \'Predefined Inference Rules\';\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();\n"
+"\n"
+"http(\'<head>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_HEAD(label);\n"
+"WS.WS.SPARQL_ENDPOINT_STYLE();\n"
+"http(\'</head>\\n\');\n"
+"\n"
+"http (\'<body>\\n\');\n"
+"http (\'    <div id=\"header\">\\n\');\n"
+"http (\'	<h1 id=\"title\">\'); http (sprintf (\'%s\', label)); http (\'</h1>\\n\');\n"
+"http (\'    </div>\\n\\n\');\n"
+"http (\'    <div id=\"main\">\\n\');\n"
+"http (\'    <br />\\n\');\n"
+"http (\'    <table class=\"tableresult\" border=\"1\">\\n\');\n"
+"http (sprintf (\'	<tr><th>Name</th><th>URI</th></tr>\\n\'));\n"
+"for select * from SYS_RDF_SCHEMA order by 1 do\n"
+"{\n"
+"http (sprintf (\'	<tr><td>%V</td><td>%V</td></tr>\\n\', RS_NAME, RS_URI));\n"
+"}\n"
+"http (\'    </table>\\n\');\n"
+"http (\'    </div>\\n\\n\');\n"
+"\n"
+"http(\'<p>\');\n"
+"http (\'<button type=\"button\" name=\"back\" value=\"Back\" onclick=\"javascript:history.go(-1);\">Back</button>\\n\');\n"
+"http(\'</p>\\n\');\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_FOOTER();\n"
+"http(\'</body>\\n\');\n"
+"http(\'</html>\\n\');\n"
+"}\n"
+"--src sparql_io.sql:2215\n";
+
+static const char *proc431 = 
+"#line 2254 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.SPARQL_ENDPOINT_GENERATE_FORM(\n"
+"in params any,\n"
+"in ini_dflt_graph varchar,\n"
+"in def_qry varchar,\n"
+"in timeout integer,\n"
+"in debug integer,\n"
+"in save_mode integer,\n"
+"in dav_refresh varchar)\n"
+"{\n"
+"declare can_cxml, can_pivot, can_qrcode, can_sponge integer;\n"
+"can_cxml := case (isnull (DB.DBA.VAD_CHECK_VERSION (\'sparql_cxml\'))) when 0 then 1 else 0 end;\n"
+"can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION (\'PivotViewer\'))) when 0 then 1 else 0 end;\n"
+"can_qrcode := isstring (__proc_exists (\'QRcode encodeString8bit\', 2));\n"
+"can_sponge := coalesce ((select top 1 1\n"
+"from DB.DBA.SYS_USERS as sup\n"
+"join DB.DBA.SYS_ROLE_GRANTS as g on (sup.U_ID = g.GI_SUPER)\n"
+"join DB.DBA.SYS_USERS as sub on (g.GI_SUB = sub.U_ID)\n"
+"where sup.U_NAME = \'SPARQL\' and sub.U_NAME = \'SPARQL_SPONGE\' ), 0);\n"
+"\n"
+"declare endpoint_xsl any;\n"
+"endpoint_xsl := registry_get (\'sparql_endpoint_xsl\');\n"
+"if (0 = endpoint_xsl) endpoint_xsl := \'\';\n"
+"if (\'\' <> endpoint_xsl) http_xslt(endpoint_xsl);\n"
+"\n"
+"declare user_id varchar;\n"
+"user_id := connection_get (\'SPARQLUserId\', \'SPARQL\');\n"
+"\n"
+"declare save_dir varchar;\n"
+"declare save_dir_id any;\n"
+"save_dir := coalesce ((select U_HOME from DB.DBA.SYS_USERS where U_NAME = user_id and U_DAV_ENABLE));\n"
+"if (DAV_HIDE_ERROR (DAV_SEARCH_ID (save_dir, \'C\')) is null)\n"
+"save_dir := null;\n"
+"else\n"
+"{\n"
+"save_dir := save_dir || \'saved-sparql-results/\';\n"
+"save_dir_id := DAV_SEARCH_ID (save_dir, \'C\');\n"
+"if (DAV_HIDE_ERROR (save_dir_id) is null)\n"
+"save_dir := null;\n"
+"}\n"
+"\n"
+"http_header (\'Content-Type: text/html; charset=UTF-8\\r\\n\');\n"
+"if (http_request_get (\'REQUEST_METHOD\') = \'OPTIONS\')\n"
+"http_header (http_header_get () || \'MS-Author-Via: SPARQL\\r\\n\');\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();\n"
+"\n"
+"http(\'<head>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_HEAD(\'Virtuoso SPARQL Query Editor\');\n"
+"WS.WS.SPARQL_ENDPOINT_STYLE ();\n"
+"WS.WS.SPARQL_ENDPOINT_JAVASCRIPT(can_cxml, can_qrcode);\n"
+"http(\'</head>\\n\');\n"
+"\n"
+"http(\'<body onload=\"sparql_endpoint_init()\">\\n\');\n"
+"\n"
+"http(\'    <div id=\"header\">\\n\');\n"
+"http(\'	<h1>Virtuoso SPARQL Query Editor</h1>\\n\');\n"
+"http(\'    </div>\\n\\n\');\n"
+"\n"
+"http(\'    <div id=\"menu\">\\n\');\n"
+"http(\'	  <a href=\"/sparql?help=intro\">About</a>\\n\');\n"
+"http(\'	| <a href=\"/sparql?nsdecl\">Namespace Prefixes</a>\\n\');\n"
+"http(\'	| <a href=\"/sparql?rdfinf\">Inference rules</a>\\n\');\n"
+"if (DB.DBA.VAD_CHECK_VERSION(\'iSPARQL\') is not null)\n"
+"http(\'	| <a href=\"/isparql\">iSPARQL</a>\\n\');\n"
+"http(\'    </div>\\n\\n\');\n"
+"\n"
+"http(\'    <div id=\"main\">\\n\');\n"
+"http(\'    <br />\\n\');\n"
+"http(\'	<form action=\"\" method=\"get\">\\n\');\n"
+"http(\'	<fieldset>\\n\');\n"
+"http(\'		<label for=\"default-graph-uri\">Default Data Set Name (Graph IRI)</label><br />\\n\');\n"
+"http(\'		<input type=\"text\" name=\"default-graph-uri\" id=\"default-graph-uri\"\');\n"
+"http(sprintf (\' value=\"%s\" size=\"80\"/>\\n\', coalesce (ini_dflt_graph, \'\') ));\n"
+"http(\'		<br /><br />\\n\');\n"
+"\n"
+"http(\'		<label for=\"query\">Query Text</label><br />\\n\');\n"
+"http(\'		<textarea rows=\"18\" cols=\"80\" name=\"query\" id=\"query\" onchange=\"format_select(this)\" onkeyup=\"format_select(this)\">\'|| def_qry ||\'</textarea>\\n\');\n"
+"\n"
+"http(\'		<br /><br />\\n\');\n"
+"if (can_sponge)\n"
+"{\n"
+"http(\'		<label for=\"should-sponge\" class=\"n\">Sponging</label>\\n\');\n"
+"http(\'		<select name=\"should-sponge\" id=\"should-sponge\">\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_SPONGE_OPTS (params);\n"
+"http(\'		</select>\\n\');\n"
+"}\n"
+"else\n"
+"{\n"
+"http(\'		<span class=\"info\"><i>(Security restrictions of this server do not allow you to retrieve remote RDF data, see <a href=\"/sparql?help=enable_sponge\">details</a>.)</i></span>\\n\');\n"
+"}\n"
+"\n"
+"http(\'		<br />\\n\');\n"
+"http(\'		<label for=\"format\" class=\"n\">Results Format</label>\\n\');\n"
+"http(\'		<select name=\"format\" id=\"format\" onchange=\"format_change(this)\">\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_FORMAT_OPTS (can_cxml, can_qrcode, params, def_qry);\n"
+"http(\'		</select>\\n\');\n"
+"if (sys_stat(\'st_has_vdb\'))\n"
+"{\n"
+"if (not can_cxml)\n"
+"http(\'		<span class=\"info\"><i>(The CXML output is disabled, see <a href=\"/sparql?help=enable_cxml\">details</a>)</i></span>\\n\');\n"
+"else if (not can_qrcode)\n"
+"http(\'		<span class=\"info\"><i>(The QRCODE output is disabled, see <a href=\"/sparql?help=enable_cxml\">details</a>)</i></span>\\n\');\n"
+"}\n"
+"http(\'		<br />\\n\');\n"
+"\n"
+"if (can_cxml)\n"
+"{\n"
+"http (\'		<fieldset id=\"cxml\">\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_CXML_OPTION (can_pivot, params, \'CXML_redir_for_subjs\');\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_CXML_OPTION (can_pivot, params, \'CXML_redir_for_hrefs\');\n"
+"http (\'		</fieldset>\\n\');\n"
+"}\n"
+"\n"
+"http(\'		<label for=\"timeout\" class=\"n\">Execution timeout</label>\\n\');\n"
+"http(\'		<input name=\"timeout\" id=\"timeout\" type=\"text\" value=\"\' || coalesce (cast (timeout as varchar), \'\') || \'\" /> milliseconds\\n\');\n"
+"http(\'		<span class=\"info\"><i>(values less than 1000 are ignored)</i></span>\');\n"
+"http(\'		<br />\\n\');\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"http(\'		<label class=\"n\" for=\"options\">Options</label>\\n\');\n"
+"http(\'		<fieldset id=\"options\">\\n\');\n"
+"http(\'		<input name=\"debug\" id=\"debug\" type=\"checkbox\"\' || case (debug) when \'\' then \'\' else \' checked=\"checked\"\' end || \'/>\\n\');\n"
+"http(\'		<label for=\"debug\" class=\"ckb\">Strict checking of void variables</label>\\n\');\n"
+"\n"
+"\n"
+"if (save_dir is not null)\n"
 "{\n"
-"http(sprintf (\'<option value=\"%V\" %s>%V</option>\\n\',\n"
-"x[0], case when format = x[0] then \'selected\' else \'\' end , x[1]));\n"
+"http(\'		<br />\\n\');\n"
+"http(\'		<input name=\"save\" id=\"save\" onclick=\"savedav_change(this)\" type=\"checkbox\"\' || case when (save_mode is null) then \'\' else \' checked=\"checked\"\' end || \' />\\n\');\n"
+"http(\'		<label for=\"save\" class=\"ckb\">Save resultset to WebDAV folder on the server</label>\\n\');\n"
+"http(\'		<fieldset id=\"savefs\">\\n\');\n"
+"http(\'		    <label for=\"fname\">File name:</label>\\n\');\n"
+"http(\'		    <input type=\"text\" id=\"fname\" name=\"fname\" />\\n\');\n"
+"http(\'		    <input type=\"checkbox\" name=\"dav_refresh\" id=\"dav_refresh\"\' || case when (dav_refresh is null) then \'\' else \' checked=\"checked\"\' end || \' />\\n\');\n"
+"http(\'		    <label class=\"ckb\" for=\"dav_refresh\">Refresh periodically</label>\\n\');\n"
+"http(\'		</fieldset>\\n\');\n"
 "}\n"
-"http(\'			    <option value=\"text/csv\">CSV</option>\\n\');\n"
-"if (can_cxml)\n"
+"\n"
+"http(\'		</fieldset>\\n\');\n"
+"http(\'		<br />\\n\');\n"
+"\n"
+"if (save_dir is null)\n"
 "{\n"
-"http(\'			    <option value=\"text/cxml\">CXML (Pivot Collection)</option>\\n\');\n"
-"if (can_qrcode)\n"
-"http(\'			    <option value=\"text/cxml+qrcode\">CXML (Pivot Collection with QRcode)</option>\\n\');\n"
+"http(\'		<span class=\"info\"><i>(The result can only be sent back to browser, not saved on the server, see <a href=\"/sparql?help=enable_det\">details</a>)</i></span>\\n\');\n"
+"http(\'		<br />\\n\');\n"
 "}\n"
+"\n"
+"http(\'		<br />\\n\');\n"
+"http(\'		<input type=\"submit\" value=\"Run Query\"/>\\n\');\n"
+"http(\'		<input type=\"reset\" value=\"Reset\"/>\\n\');\n"
+"http(\'	</fieldset>\\n\');\n"
+"http(\'	</form>\\n\');\n"
+"http(\'    </div>\\n\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_FOOTER();\n"
+"http(\'</body>\\n\');\n"
+"http(\'</html>\\n\');\n"
+"\n"
+"return;\n"
 "}\n"
-"--src sparql_io.sql:1751\n";
+"--src sparql_io.sql:2252\n";
 
-static const char *proc378 = 
-"#line 1823 \"[executable]/sparql_io.sql\"\n"
+static const char *proc432 = 
+"#line 2424 \"[executable]/sparql_io.sql\"\n"
 "create procedure WS.WS.\"/!sparql/\" (inout path varchar, inout params any, inout lines any)\n"
 "{\n"
 "declare query, full_query, format, should_sponge, debug, def_qry varchar;\n"
 "declare dflt_graphs, named_graphs any;\n"
-"declare paramctr, paramcount, qry_params, maxrows, can_sponge, can_cxml, can_pivot, can_qrcode, start_time integer;\n"
+"declare paramctr, paramcount, qry_params, maxrows, can_sponge,  start_time integer;\n"
 "declare ses, content any;\n"
 "declare def_max, add_http_headers, hard_timeout, timeout, client_supports_partial_res, sp_ini, soap_ver int;\n"
 "declare http_meth, content_type, ini_dflt_graph, get_user, jsonp_callback varchar;\n"
@@ -14843,7 +17822,7 @@ static const char *proc378 =
 "declare exec_time, exec_db_activity any;\n"
 "declare __debug_mode integer;\n"
 "declare qtxt, deadl integer;\n"
-"declare save_mode, save_dir, fname varchar;\n"
+"declare save_mode, save_dir, dav_refresh, fname varchar;\n"
 "declare save_dir_id any;\n"
 "declare help_topic varchar;\n"
 "\n"
@@ -14886,40 +17865,48 @@ static const char *proc378 =
 "maxrows := 1024*1024;\n"
 "deadl := 0;\n"
 "http_meth := http_request_get (\'REQUEST_METHOD\');\n"
-"ini_dflt_graph := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'DefaultGraph\');\n"
-"hard_timeout := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'MaxQueryExecutionTime\'), \'0\')) * 1000;\n"
-"timeout := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'ExecutionTimeout\'), \'0\')) * 1000;\n"
+"ini_dflt_graph := virtuoso_ini_item_value (\'SPARQL\', \'DefaultGraph\');\n"
+"hard_timeout := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'MaxQueryExecutionTime\'), \'0\')) * 1000;\n"
+"timeout := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'ExecutionTimeout\'), \'0\')) * 1000;\n"
 "client_supports_partial_res := 0;\n"
+"\n"
 "user_id := connection_get (\'SPARQLUserId\', \'SPARQL\');\n"
 "help_topic := get_keyword (\'help\', params, null);\n"
 "if (help_topic is not null)\n"
 "goto brief_help;\n"
 "\n"
 "def_qry := get_keyword(\'qtxt\', params, \'\');\n"
+"ini_dflt_graph := get_keyword (\'default-graph-uri\', params, ini_dflt_graph);\n"
+"timeout := atoi (get_keyword (\'timeout\', params, cast (timeout as varchar)));\n"
 "\n"
 "if (\'\' <> def_qry)\n"
 "qtxt := 1;\n"
-"def_max := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'ResultSetMaxRows\'), \'-1\'));\n"
+"def_max := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'ResultSetMaxRows\'), \'-1\'));\n"
+"\n"
+"\n"
 "\n"
-"save_mode := get_keyword (\'save\', params, null);\n"
-"if (save_mode is not null and save_mode = \'display\')\n"
-"save_mode := null;\n"
-"else if (save_mode is not null)\n"
-"{\n"
-"save_dir := coalesce ((select U_HOME from DB.DBA.SYS_USERS where U_NAME = user_id and U_DAV_ENABLE));\n"
-"if (DAV_HIDE_ERROR (DAV_SEARCH_ID (save_dir, \'C\')) is null)\n"
-"save_dir := null;\n"
-"else\n"
-"{\n"
-"save_dir := save_dir || \'saved-sparql-results/\';\n"
-"save_dir_id := DAV_SEARCH_ID (save_dir, \'C\');\n"
-"if (DAV_HIDE_ERROR (save_dir_id) is null)\n"
-"save_dir := null;\n"
-"}\n"
-"}\n"
 "fname := trim (get_keyword (\'fname\', params, \'\'));\n"
 "if (fname = \'\')\n"
 "fname := null;\n"
+"\n"
+"dav_refresh := get_keyword (\'dav_refresh\', params, \'\');\n"
+"if (dav_refresh = \'\')\n"
+"dav_refresh := null;\n"
+"\n"
+"save_mode := get_keyword (\'save\', params, \'\');\n"
+"\n"
+"if (save_mode = \'\' OR save_mode = \'display\') {\n"
+"save_mode := null;\n"
+"dav_refresh := null;\n"
+"fname := null;\n"
+"} else if (save_mode = \'dynamic\' OR dav_refresh is not null) {\n"
+"save_mode := \'dynamic\';\n"
+"dav_refresh := \'1\';\n"
+"} else {\n"
+"save_mode := \'tmpstatic\';\n"
+"dav_refresh := null;\n"
+"}\n"
+"\n"
 "get_user := \'\';\n"
 "soap_ver := 0;\n"
 "soap_action := http_request_header (lines, \'SOAPAction\', null, null);\n"
@@ -14955,14 +17942,22 @@ static const char *proc378 =
 "\n"
 "if (__debug_mode) dbg_printf (\'%d\', soap_ver);\n"
 "\n"
+"if (get_keyword (\'nsdecl\', params) is not null)\n"
+"{\n"
+"WS.WS.sparql_predefined_nsdecl ();\n"
+"return;\n"
+"}\n"
+"if (get_keyword (\'rdfinf\', params) is not null)\n"
+"{\n"
+"WS.WS.sparql_predefined_rdfinf ();\n"
+"return;\n"
+"}\n"
+"\n"
 "can_sponge := coalesce ((select top 1 1\n"
 "from DB.DBA.SYS_USERS as sup\n"
 "join DB.DBA.SYS_ROLE_GRANTS as g on (sup.U_ID = g.GI_SUPER)\n"
 "join DB.DBA.SYS_USERS as sub on (g.GI_SUB = sub.U_ID)\n"
 "where sup.U_NAME = \'SPARQL\' and sub.U_NAME = \'SPARQL_SPONGE\' ), 0);\n"
-"can_cxml := case (isnull (DB.DBA.VAD_CHECK_VERSION (\'sparql_cxml\'))) when 0 then 1 else 0 end;\n"
-"can_pivot := case (isnull (DB.DBA.VAD_CHECK_VERSION (\'PivotViewer\'))) when 0 then 1 else 0 end;\n"
-"can_qrcode := isstring (__proc_exists (\'QRcode encodeString8bit\', 2));\n"
 "\n"
 "paramcount := length (params);\n"
 "\n"
@@ -14980,202 +17975,13 @@ static const char *proc378 =
 "}\n"
 "if (not qtxt)\n"
 "{\n"
-"def_qry := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'DefaultQuery\');\n"
+"def_qry := virtuoso_ini_item_value (\'SPARQL\', \'DefaultQuery\');\n"
 "if (def_qry is null)\n"
 "def_qry := \'SELECT * WHERE {?s ?p ?o}\';\n"
 "}\n"
-"http(\'<html xmlns=\"http://www.w3.org/1999/xhtml\">\\n\');\n"
-"http(\'	<head>\\n\');\n"
-"http(\'		<title>Virtuoso SPARQL Query Form</title>\\n\');\n"
-"http(\'		<style type=\"text/css\">\\n\');\n"
-"http(\'		label.n { display: inline; margin-top: 10pt; }\\n\');\n"
-"http(\'		body { font-family: arial, helvetica, sans-serif; font-size: 9pt; color: #234; }\\n\');\n"
-"http(\'		fieldset { border: 2px solid #86b9d9; }\\n\');\n"
-"http(\'		legend { font-size: 12pt; color: #86b9d9; }\\n\');\n"
-"http(\'		label { font-weight: bold; }\\n\');\n"
-"http(\'		h1 { width: 100%; background-color: #86b9d9; font-size: 18pt; font-weight: normal; color: #fff; height: 4ex; text-align: right; vertical-align: middle; padding-right:  8px; }\\n\');\n"
-"http(\'		textarea { width: 100%; padding: 3px; }\\n\');\n"
-"http(\'          #footer { width: 100%; float: left; clear: left; margin: 1.2em 0 0; padding: 0.3em; background-color: #fff;}\\n\');\n"
-"http(\'          #ft_r { float: right; clear: right;}\\n\');\n"
-"http(\'          #ft_t { text-align: center; }\\n\');\n"
-"http(\'          #ft_b { text-align: center; margin-top: 0.7ex }\\n\');\n"
-"http(\'		</style>\\n\');\n"
-"http(\'		<script language=\"JavaScript\">\\n\');\n"
-"http(\'var last_format = 1;\\n\');\n"
-"http(\'function format_select(query_obg)\\n\');\n"
-"http(\'{\\n\');\n"
-"http(\'  var query = query_obg.value; \\n\');\n"
-"http(\'  var format = query_obg.form.format;\\n\');\n"
-"http(\'\\n\');\n"
-"http(\'  if ((query.match(/\\\\bconstruct\\\\b/i) || query.match(/\\\\bdescribe\\\\b/i)) && last_format == 1) {\\n\');\n"
-"http(\'    for(var i = format.options.length; i > 0; i--)\\n\');\n"
-"http(\'      format.options[i] = null;\');\n"
-"http(\'    format.options[1] = new Option(\\\'N3/Turtle\\\',\\\'text/rdf+n3\\\');\\n\');\n"
-"http(\'    format.options[2] = new Option(\\\'JSON\\\',\\\'application/rdf+json\\\');\\n\');\n"
-"http(\'    format.options[3] = new Option(\\\'RDF/XML\\\',\\\'application/rdf+xml\\\');\\n\');\n"
-"http(\'    format.options[4] = new Option(\\\'NTriples\\\',\\\'text/plain\\\');\\n\');\n"
-"http(\'    format.options[5] = new Option(\\\'XHTML+RDFa\\\',\\\'application/xhtml+xml\\\');\\n\');\n"
-"http(\'    format.options[6] = new Option(\\\'ATOM+XML\\\',\\\'application/atom+xml\\\');\\n\');\n"
-"http(\'    format.options[7] = new Option(\\\'ODATA/JSON\\\',\\\'application/odata+json\\\');\\n\');\n"
-"http(\'    format.options[8] = new Option(\\\'CSV\\\',\\\'text/csv\\\');\\n\');\n"
-"if (can_cxml)\n"
-"{\n"
-"http(\'    format.options[9] = new Option(\\\'CXML (Pivot Collection)\\\',\\\'text/cxml\\\');\\n\');\n"
-"if (can_qrcode)\n"
-"http(\'    format.options[10] = new Option(\\\'CXML (Pivot Collection with QRcodes)\\\',\\\'text/cxml+qrcode\\\');\\n\');\n"
-"}\n"
-"http(\'    format.selectedIndex = 1;\\n\');\n"
-"http(\'    last_format = 2;\\n\');\n"
-"http(\'  }\\n\');\n"
-"http(\'\\n\');\n"
-"http(\'  if (!(query.match(/\\\\bconstruct\\\\b/i) || query.match(/\\\\bdescribe\\\\b/i)) && last_format == 2) {\\n\');\n"
-"http(\'    for(var i = format.options.length; i > 0; i--)\\n\');\n"
-"http(\'      format.options[i] = null;\\n\');\n"
-"http(\'    format.options[1] = new Option(\\\'HTML\\\',\\\'text/html\\\');\\n\');\n"
-"http(\'    format.options[2] = new Option(\\\'Spreadsheet\\\',\\\'application/vnd.ms-excel\\\');\\n\');\n"
-"http(\'    format.options[3] = new Option(\\\'XML\\\',\\\'application/sparql-results+xml\\\');\\n\');\n"
-"http(\'    format.options[4] = new Option(\\\'JSON\\\',\\\'application/sparql-results+json\\\');\\n\');\n"
-"http(\'    format.options[5] = new Option(\\\'Javascript\\\',\\\'application/javascript\\\');\\n\');\n"
-"http(\'    format.options[6] = new Option(\\\'N3/Turtle\\\',\\\'text/rdf+n3\\\');\\n\');\n"
-"http(\'    format.options[7] = new Option(\\\'RDF/XML\\\',\\\'application/rdf+xml\\\');\\n\');\n"
-"http(\'    format.options[8] = new Option(\\\'NTriples\\\',\\\'text/plain\\\');\\n\');\n"
-"http(\'    format.options[9] = new Option(\\\'CSV\\\',\\\'text/csv\\\');\\n\');\n"
-"if (can_cxml)\n"
-"http(\'    format.options[10] = new Option(\\\'CXML (Pivot Collection)\\\',\\\'text/cxml\\\');\\n\');\n"
-"http(\'    format.selectedIndex = 1;\\n\');\n"
-"http(\'    last_format = 1;\\n\');\n"
-"http(\'  }\\n\');\n"
-"http(\'}\\n\');\n"
-"http(\'		</script>\\n\');\n"
-"http(\'	</head>\\n\');\n"
-"http(\'	<body>\\n\');\n"
-"http(\'		<div id=\"header\">\\n\');\n"
-"http(\'			<h1>OpenLink Virtuoso SPARQL Query</h1>\\n\');\n"
-"http(\'		</div>\\n\');\n"
-"http(\'		<div id=\"main\">\\n\');\n"
-"http(\'			<p>This query page is designed to help you test OpenLink Virtuoso SPARQL protocol endpoint. <br/>\\n\');\n"
-"http(\'			Consult the <a href=\"http://virtuoso.openlinksw.com/wiki/main/Main/VOSSparqlProtocol\">Virtuoso Wiki page</a> describing the service \\n\');\n"
-"http(\'			or the <a href=\"http://docs.openlinksw.com/virtuoso/\">Online Virtuoso Documentation</a> section <a href=\"http://docs.openlinksw.com/virtuoso/rdfandsparql.html\">RDF Database and SPARQL</a>.</p>\\n\');\n"
-"http(\'			<p>There is also a rich Web based user interface with sample queries. \\n\');\n"
-"if (DB.DBA.VAD_CHECK_VERSION(\'iSPARQL\') is null)\n"
-"http(\'			In order to use it you must install the iSPARQL package (isparql_dav.vad).</p>\\n\');\n"
-"else\n"
-"http(\'			You can access it at: <a href=\"/isparql\">/isparql</a>.</p>\\n\');\n"
-"http(\'			<form action=\"\" method=\"GET\">\\n\');\n"
-"http(\'			<fieldset>\\n\');\n"
-"http(\'			<legend>Query</legend>\\n\');\n"
-"http(\'			  <label for=\"default-graph-uri\">Default Graph URI</label>\\n\');\n"
-"http(\'			  <br />\\n\');\n"
-"http(\'			  <input type=\"text\" name=\"default-graph-uri\" id=\"default-graph-uri\"\\n\');\n"
-"http(sprintf (\'				  	value=\"%s\" size=\"80\"/>\\n\', coalesce (ini_dflt_graph, \'\') ));\n"
-"http(\'			  <br /><br />\\n\');\n"
-"if (can_sponge)\n"
-"{\n"
-"declare s_param varchar;\n"
-"s_param := get_keyword (\'should-sponge\', params, \'\');\n"
-"http(\'<select name=\"should-sponge\" id=\"should-sponge\">\');\n"
-"http(\'  <option\' ||\n"
-"case (s_param) when \'\' then \' selected=\"selected\"\' else \'\' end ||\n"
-"\' value=\"\">Use only local data (including data retrieved before), but do not retrieve more</option>\\n\');\n"
-"http(\'  <option\' ||\n"
-"case (s_param) when \'soft\' then \' selected=\"selected\"\' else \'\' end ||\n"
-"\' value=\"soft\">Retrieve remote RDF data for all missing source graphs</option>\\n\');\n"
-"http(\'  <option\' ||\n"
-"case (s_param) when \'grab-all\' then \' selected=\"selected\"\' else \'\' end ||\n"
-"\' value=\"grab-all\">Retrieve all missing remote RDF data that might be useful</option>\\n\');\n"
-"http(\'  <option\' ||\n"
-"case (s_param) when \'grab-all-seealso\' then \' selected=\"selected\"\' else \'\' end ||\n"
-"\' value=\"grab-all-seealso\">Retrieve all missing remote RDF data that might be useful, including seeAlso references</option>\\n\');\n"
-"http(\'  <option\' ||\n"
-"case (s_param) when \'grab-everything\' then \' selected=\"selected\"\' else \'\' end ||\n"
-"\' value=\"grab-everything\">Try to download all referenced resources (this may be very slow and inefficient)</option>\\n\');\n"
-"http(\'</select>\\n\');\n"
-"http(\'			  <br />\\n\');\n"
-"}\n"
-"else\n"
-"{\n"
-"http(\'			  <font size=\"-1\"><i>(Security restrictions of this server do not allow you to retrieve remote RDF data.\n"
-"Database administrator can change them, accodring to these <a href=\"/sparql?help=enable_sponge\">instructions</a>.)</i></font>\\n\');\n"
-"}\n"
-"http(\'<br /><br />\\n\');\n"
-"http(\'			  <label for=\"query\">Query text</label>\\n\');\n"
-"http(\'			  <br />\\n\');\n"
-"http(\'			  <textarea rows=\"10\" cols=\"80\" name=\"query\" id=\"query\" onchange=\"format_select(this)\" onkeyup=\"format_select(this)\">\'|| def_qry ||\'</textarea>\\n\');\n"
-"http(\'			  <br /><br />\\n\');\n"
-"\n"
-"\n"
-"\n"
-"\n"
-"http(\'<label for=\"debug\" class=\"n\"><nobr>Rigorous check of the query:</nobr></label>\');\n"
-"http(\' <input name=\"debug\" type=\"checkbox\"\' || case (debug) when \'\' then \'\' else \' checked\' end || \'/>\');\n"
-"http(\'      \\n\');\n"
-"http(\'<label for=\"timeout\" class=\"n\"><nobr>Execution timeout, in milliseconds, values less than 1000 are ignored:</nobr></label>\');\n"
-"http(\' <input name=\"timeout\" type=\"text\"\' || case (isnull (timeout)) when 0 then cast (timeout as varchar) else \'\' end || \'/>\');\n"
-"http(\'      \\n\');\n"
-"http(\'			  <label for=\"format\" class=\"n\">Format Results As:</label>\\n\');\n"
-"http(\'			  <select name=\"format\">\\n\');\n"
-"WS.WS.sparql_enpoint_format_opts (can_cxml, can_qrcode, params, def_qry);\n"
-"http(\'			  </select>\\n\');\n"
-"if (can_cxml)\n"
-"{\n"
-"http(\'<div style=\"display:none\">\\n\');\n"
-"http(\'      \\n\');\n"
-"http(\'			  <label for=\"redir_for_subjs\" class=\"n\">Style for RDF subjects:</label>\\n\');\n"
-"http(\'			  <select name=\"CXML_redir_for_subjs\">\\n\');\n"
-"http(\'			    <option value=\"\" selected=\"selected\">Convert to string facets</option>\\n\');\n"
-"http(\'			    <option value=\"121\">Make Plain Links</option>\\n\');\n"
-"if (can_pivot is not null)\n"
-"http(\'			    <option value=\"LOCAL_PIVOT\">Make SPARQL DESCRIBE Pivot links</option>\\n\');\n"
-"http(\'			    <option value=\"LOCAL_TTL\">Make SPARQL DESCRIBE download links (TTL)</option>\\n\');\n"
-"http(\'			    <option value=\"LOCAL_CXML\">Make SPARQL DESCRIBE download links (CXML)</option>\\n\');\n"
-"http(\'			  </select>\\n\');\n"
-"http(\'</div>\\n\');\n"
-"http(\'      \\n\');\n"
-"\n"
-"http(\'			  <label for=\"redir_for_hrefs\" class=\"n\">CXML link behavior:</label>\\n\');\n"
-"http(\'			  <select name=\"CXML_redir_for_hrefs\">\\n\');\n"
-"http(\'			    <option value=\"\" selected=\"selected\">Local faceted navigation links</option>\\n\');\n"
-"http(\'			    <option value=\"121\">External resource links</option>\\n\');\n"
-"if (can_pivot is not null)\n"
-"http(\'			    <option value=\"LOCAL_PIVOT\">External faceted navigation links</option>\\n\');\n"
-"http(\'			    <option value=\"LOCAL_TTL\">External description resource (TTL)</option>\\n\');\n"
-"http(\'			    <option value=\"LOCAL_CXML\">External description resource (CXML)</option>\\n\');\n"
-"http(\'			  </select>\\n\');\n"
-"}\n"
-"if (not can_cxml)\n"
-"http(\' <font size=\"-1\"><i>(The CXML output is disabled, see <a href=\"/sparql?help=enable_cxml\">details</a>)</i></font>\\n\');\n"
-"else if (not can_qrcode)\n"
-"http(\' <font size=\"-1\"><i>(The QRcode output is disabled, no "qrcode" plugin found</a>)</i></font>\\n\');\n"
-"http(\'      \\n\');\n"
-"if (save_dir is not null)\n"
-"{\n"
 "\n"
-"http(\'			  <select name=\"save\">\\n\');\n"
-"http(\'			    <option value=\"display\" selected=\"selected\">Display the result and not save</option>\\n\');\n"
-"http(\'			    <option value=\"tmpstatic\">Save the result to the DAV as a temporary document with the specified name:</option>\\n\');\n"
-"http(\'			    <option value=\"dynamic\">Save the result to the DAV and refresh it periodically with the specified name:</option>\\n\');\n"
-"http(\'			  </select>\');\n"
-"http(\' <input name=\"fname\" type=\"text\" />\');\n"
-"http(\'      \\n\');\n"
-"}\n"
-"else\n"
-"http(\' <font size=\"-1\"><i>(The result can only be sent back to browser, but not saved on the server, see <a href=\"/sparql?help=enable_det\">details</a>)</i></font>\\n\');\n"
-"http(\'<br /><br />\\n\');\n"
-"http(\'			  <input type=\"submit\" value=\"Run Query\"/>\');\n"
-"http(\' <input type=\"reset\" value=\"Reset\"/>\\n\');\n"
-"http(\'			</fieldset>\\n\');\n"
-"http(\'			</form>\\n\');\n"
-"http(\'		</div>\\n\');\n"
-"http(\'		<div id=\"footer\">\\n\');\n"
-"http(\'		<div id=\"ft_b\">\\n\');\n"
-"http(\'<a href=\"http://www.openlinksw.com/virtuoso/\">OpenLink Virtuoso</a> version \'); http(sys_stat (\'st_dbms_ver\')); http(\', on \');\n"
-"http(sys_stat (\'st_build_opsys_id\')); http (sprintf (\' (%s), \', host_id ()));\n"
-"http(case when sys_stat (\'cl_run_local_only\') = 1 then \'Single Server\' else \'Cluster\' end); http (\' Edition \');\n"
-"http(case when sys_stat (\'cl_run_local_only\') = 0 then sprintf (\'(%d server processes)\', sys_stat (\'cl_n_hosts\')) else \'\' end);\n"
-"http(\'		</div>\\n\');\n"
-"http(\'		</div>\\n\');\n"
-"http(\'	</body>\\n\');\n"
-"http(\'</html>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_GENERATE_FORM(params, ini_dflt_graph, def_qry, timeout, debug, save_mode, dav_refresh);\n"
+"\n"
 "return;\n"
 "}\n"
 "qry_params := dict_new (7);\n"
@@ -15239,7 +18045,7 @@ static const char *proc378 =
 "else if (\'timeout\' = pname and length (pvalue))\n"
 "{\n"
 "declare t integer;\n"
-"t := cast (pvalue as integer) * 1000;\n"
+"t := cast (pvalue as integer);\n"
 "if (t is not null and t >= 1000)\n"
 "{\n"
 "if (hard_timeout >= 1000)\n"
@@ -15255,7 +18061,7 @@ static const char *proc378 =
 "}\n"
 "else if (query is null and \'query-uri\' = pname and length (pvalue))\n"
 "{\n"
-"if (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'ExternalQuerySource\') = \'1\')\n"
+"if (virtuoso_ini_item_value (\'SPARQL\', \'ExternalQuerySource\') = \'1\')\n"
 "{\n"
 "declare uri varchar;\n"
 "declare hf, hdr, charset any;\n"
@@ -15285,7 +18091,7 @@ static const char *proc378 =
 "}\n"
 "else if (\'xslt-uri\' = pname and length (pvalue))\n"
 "{\n"
-"if (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'ExternalXsltSource\') = \'1\')\n"
+"if (virtuoso_ini_item_value (\'SPARQL\', \'ExternalXsltSource\') = \'1\')\n"
 "{\n"
 "add_http_headers := 0;\n"
 "http_xslt (pvalue);\n"
@@ -15344,7 +18150,7 @@ static const char *proc378 =
 "spt_ns := DB.DBA.SPARQL_PT_NS ();\n"
 "ns_decl := \'[ xmlns:soap=\"\'||soap_ns||\'\" xmlns:sp=\"\'||spt_ns||\'\" ] \';\n"
 "content := http_body_read ();\n"
-"if (registry_get (\'__sparql_endpoint_debug\') = \'1\')\n"
+"if (__debug_mode)\n"
 "dbg_printf (\'content=[%s]\', string_output_string (content));\n"
 "xt := xtree_doc (content);\n"
 "query := charset_recode (xpath_eval (ns_decl||\'string (/soap:Envelope/soap:Body/sp:query-request/query)\', xt), \'_WIDE_\', \'UTF-8\');\n"
@@ -15504,14 +18310,14 @@ static const char *proc378 =
 "state := \'00000\';\n"
 "metas := null;\n"
 "rset := null;\n"
-"if (registry_get (\'__sparql_endpoint_debug\') = \'1\')\n"
+"if (__debug_mode)\n"
 "dbg_printf (\'query=[%s]\', full_query);\n"
 "\n"
 "declare sc_max int;\n"
 "declare sc decimal;\n"
-"sc_max := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'MaxQueryCostEstimationTime\'), \'-1\'));\n"
+"sc_max := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'MaxQueryCostEstimationTime\'), \'-1\'));\n"
 "if (sc_max < 0)\n"
-"sc_max := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'MaxExecutionTime\'), \'-1\'));\n"
+"sc_max := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'MaxExecutionTime\'), \'-1\'));\n"
 "if (sc_max > 0)\n"
 "{\n"
 "state := \'00000\';\n"
@@ -15527,6 +18333,17 @@ static const char *proc378 =
 "metas := null;\n"
 "rset := null;\n"
 "\n"
+"save_dir := coalesce ((select U_HOME from DB.DBA.SYS_USERS where U_NAME = user_id and U_DAV_ENABLE));\n"
+"if (DAV_HIDE_ERROR (DAV_SEARCH_ID (save_dir, \'C\')) is null)\n"
+"save_dir := null;\n"
+"else\n"
+"{\n"
+"save_dir := save_dir || \'saved-sparql-results/\';\n"
+"save_dir_id := DAV_SEARCH_ID (save_dir, \'C\');\n"
+"if (DAV_HIDE_ERROR (save_dir_id) is null)\n"
+"save_dir := null;\n"
+"}\n"
+"\n"
 "\n"
 "\n"
 "\n"
@@ -15573,7 +18390,7 @@ static const char *proc378 =
 "{\n"
 "declare state2, msg2 varchar;\n"
 "state2 := \'00000\';\n"
-"exec (\'isnull (sparql_to_sql_text (?))\', state2, msg2, vector (full_query));\n"
+"exec (\'isnull (sparql_to_sql_text (\'\'define sql:big-data-const 0 \'\' || ?))\', state2, msg2, vector (full_query));\n"
 "if (state2 <> \'00000\')\n"
 "{\n"
 "DB.DBA.SPARQL_PROTOCOL_ERROR_REPORT (path, params, lines,\n"
@@ -15586,6 +18403,7 @@ static const char *proc378 =
 "full_query, state, msg, format);\n"
 "return;\n"
 "}\n"
+"\n"
 "write_results:\n"
 "if (save_mode is not null)\n"
 "{\n"
@@ -15648,16 +18466,29 @@ static const char *proc378 =
 "refresh_sec := case (save_mode) when \'tmpstatic\' then null else __max (600, coalesce (hard_timeout, 1000)/100) end;\n"
 "ttl_sec := 172800;\n"
 "full_uri := concat (\'http://\', registry_get (\'URIQADefaultHost\'), DAV_SEARCH_PATH (save_dir_id, \'C\'), fname);\n"
-"\"DynaRes_INSERT_RESOURCE\" (detcol_id => save_dir_id, fname => fname,\n"
+"\"DynaRes_INSERT_RESOURCE\" (\n"
+"detcol_id => save_dir_id,\n"
+"fname => fname,\n"
 "owner_uid => sparql_uid,\n"
 "refresh_seconds => refresh_sec,\n"
 "ttl_seconds => ttl_sec,\n"
 "mime => accept,\n"
 "exec_stmt => \'DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS (?, ?, ?, ?, ?, ?, ?)\',\n"
 "exec_params => vector (full_query, qry_params, maxrows, accept, user_id, hard_timeout, jsonp_callback),\n"
-"exec_uname => user_id, content => ses );\n"
-"http (\'<html><head><title>The SPARQL result is successfully saved</title></head><body>\');\n"
-"http (\'<h3>Done!</h3>\');\n"
+"exec_uname => user_id,\n"
+"content => ses\n"
+");\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();\n"
+"http (\'<head>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_HEAD(\'Virtuoso SPARQL Query Editor | Save to DAV\');\n"
+"WS.WS.SPARQL_ENDPOINT_STYLE();\n"
+"http (\'</head>\\n\');\n"
+"http (\'<body>\\n\');\n"
+"http (\'    <div id=\"header\">\\n\');\n"
+"http (\'	<h1 id=\"title\">Virtuoso SPARQL Query Editor</h1>\\n\');\n"
+"http (\'    </div>\\n\\n\');\n"
+"http (\'<h3>Saved to DAV</h3>\');\n"
 "http (\'<p>The SPARQL result is successfully saved in DAV storage as <a href=\"\');\n"
 "http_value (full_uri);\n"
 "http (\'\">\');\n"
@@ -15669,8 +18500,8 @@ static const char *proc378 =
 "http (sprintf (\'<p>The link will stay valid for %d days. To preserve the referenced document for future use, copy it to some other location before expiration.</p>\', ttl_sec/(60*60*24)));\n"
 "if (accept <> \'text/html\')\n"
 "http (sprintf (\'<p>The resource MIME type is \"%s\". This type will be reported to the browser when you click on the link.\n"
-"If the browser is unable to open the link itself it can prompt for action like lauching an additional program.\n"
-"The program may let you to edit the loaded resource, in this case save the changed version should be saved to a different place, so use \"Save As\" command, not plain \"Save\".</p>\', accept));\n"
+"If the browser is unable to open the link itself it can prompt for action like launching an additional program.\n"
+"The program may let you edit the loaded resource, in this case save the changed version should be saved to a different place, so use \"Save As\" command, not plain \"Save\".</p>\', accept));\n"
 "http (\'</body></html>\');\n"
 "}\n"
 "}\n"
@@ -15687,54 +18518,90 @@ static const char *proc378 =
 "return;\n"
 "\n"
 "brief_help:\n"
-"http (\'<html><head><title>SPARQL Web Service Endpoint | Quick Help</title></head><body>\');\n"
-"if (help_topic=\'enable_sponge\')\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();\n"
+"\n"
+"http(\'<head>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_HEAD(\'Virtuoso SPARQL Query Editor | About\');\n"
+"WS.WS.SPARQL_ENDPOINT_STYLE ();\n"
+"http(\'</head>\\n\');\n"
+"\n"
+"http(\'<body>\\n\');\n"
+"http (\'    <div id=\"header\">\\n\');\n"
+"http(\'	<h1 id=\"title\">Virtuoso SPARQL Query Editor | About</h1>\\n\');\n"
+"http (\'    </div>\\n\\n\');\n"
+"\n"
+"http (\'    <div id=\"help\">\\n\');\n"
+"if (help_topic=\'intro\')\n"
+"{\n"
+"http(\'<h3>Intro</h3>\');\n"
+"http(\'	<p>This page is designed to help you test the OpenLink Virtuoso SPARQL protocol endpoint.<br/>\\n\');\n"
+"http(\'	Consult the <a href=\"http://virtuoso.openlinksw.com/wiki/main/Main/VOSSparqlProtocol\">Virtuoso Wiki page</a> describing the service \\n\');\n"
+"http(\'	or the <a href=\"http://docs.openlinksw.com/virtuoso/\">Online Virtuoso Documentation</a> section <a href=\"http://docs.openlinksw.com/virtuoso/rdfandsparql.html\">RDF Database and SPARQL</a>.</p>\\n\');\n"
+"http(\'	<p>There is also a rich Web based user interface with sample queries. \\n\');\n"
+"if (DB.DBA.VAD_CHECK_VERSION(\'iSPARQL\') is null)\n"
+"http(\'	In order to use it you must install the iSPARQL package (isparql_dav.vad).</p>\\n\');\n"
+"else\n"
+"http(\'	You can access it at: <a href=\"/isparql\">/isparql</a>.</p>\\n\');\n"
+"http(\'	<p>For your convenience we have a set of <a href=\"/sparql?nsdecl\">predefined name space prefixes</a> and <a href=\"/sparql?rdfinf\">inference rules</a></p>\\n\');\n"
+"\n"
+"http(\'	<h3>What is SPARQL?</h3>\\n\');\n"
+"http(\'	<p>SPARQL is the W3C\'\'s declaritive query-language for Graph Model Databases and Stores.</p>\\n\');\n"
+"http(\'    <p>As is the case with regards to SQL for relational databases and XQUERY for XML databases, \');\n"
+"http(\'    SPARQL is database and host operating system independent.<p>\\n\');\n"
+"http(\'	<p>The development and evolution of this standard is overseen by the\\n\');\n"
+"http(\'	<a href=\"http://www.w3.org/2009/sparql/wiki/Main_Page\">SPARQL Working Group</a> within W3C and\\n\');\n"
+"http(\'	while parts of the language are still in active <a href=\"http://www.w3.org/TR/2011/WD-sparql11-query-20110512/\">development</a>, it is fully <a href=\"http://www.w3.org/TR/rdf-sparql-query/\">documented</a> and <a href=\"http://www.w3.org/2009/05/sparql-phase-II-charter\">publicly</a> available.</p>\\n\');\n"
+"}\n"
+"else if (help_topic=\'enable_sponge\')\n"
 "{\n"
-"declare host_ur varchar; host_ur := registry_get (\'URIQADefaultHost\');\n"
+"declare host_ur varchar;\n"
+"host_ur := registry_get (\'URIQADefaultHost\');\n"
+"host_ur := http_request_header (lines, \'Host\', null, host_ur);\n"
 "http(\'<h3>How To Enable Sponge?</h3>\n"
-"<p>When a new Virtuoso server is installed, default security restrictions do not allow SPARQL endpoint users to retrieve remote RDF data.\n"
-"To remove the restriction, DBA should grant \"SPARQL_SPONGE\" privilege to \"SPARQL\" account.\n"
-"If you are the administrator, you can perform the following steps:</p>\\n\');\n"
+"<p>When a new Virtuoso server is installed, the default security restrictions do not allow SPARQL endpoint users to retrieve remote RDF data.\n"
+"To remove this restriction, the DBA should grant \"SPARQL_SPONGE\" privilege to \"SPARQL\" account.\n"
+"If you are the Database Administrator and want to enable this feature, you can perform the following steps:</p>\\n\');\n"
 "http(\'<ol>\\n\');\n"
 "http(\'<li>Go to the Virtuoso Administration Conductor i.e. \\n\');\n"
 "if (not isstring (host_ur))\n"
 "http(\'http://host:port/conductor .\');\n"
 "else\n"
 "http( sprintf(\'<a href=\"http://%s/conductor\">http://%s/conductor</a>.\', host_ur, host_ur));\n"
-"http(\'</li>\\n<li>Login as dba user.\');\n"
-"http(\'</li>\\n<li>Go to System Admin->User Accounts->Roles\\n\');\n"
-"http(\'</li>\\n<li>Click the link \"Edit\" for \"SPARQL_SPONGE\"\\n\');\n"
-"http(\'</li>\\n<li>Select from the list of available user/groups \"SPARQL\" and click the \">>\" button so to add it to the right-positioned list.\\n\');\n"
-"http(\'</li>\\n<li>Click the button \"Update\"\\n\');\n"
-"http(\'</li>\\n<li>Access again the sparql endpoint in order to be able to retrieve remote data.\\n\');\n"
-"http(\'</li></ol>\\n\');\n"
+"http(\'</li>\\n\');\n"
+"http(\'<li>Login as dba user.</li>\\n\');\n"
+"http(\'<li>Go to System Admin->User Accounts->Roles</li>\\n\');\n"
+"http(\'<li>Click the link \"Edit\" for \"SPARQL_SPONGE\"</li>\\n\');\n"
+"http(\'<li>Select from the list of available user/groups \"SPARQL\" and click the \">>\" button so to add it to the right-positioned list.\\n</li>\');\n"
+"http(\'<li>Click the button \"Update\"</li>\\n\');\n"
+"http(\'<li>Access again the sparql endpoint in order to be able to retrieve remote data.</li>\\n\');\n"
+"http(\'</ol>\\n\');\n"
 "}\n"
 "else if (help_topic=\'enable_cxml\')\n"
 "{\n"
 "http(\'<h3>How To Enable CXML Support</h3>\');\n"
-"http(\'<p>CXML is data exchange format for so-called \"faceted view\". It can be displayed by programs like Microsoft Pivot.\n"
-"For best results, the result of the query should contain links to images associated with described data and follow some rules, described in the User's Guide.</p>\n"
-"<p>This feature is supported by combination of three components:</p>\\n\');\n"
+"http(\'<p>CXML is data exchange format for so-called \"faceted view\". It can be displayed by programs like Microsoft Pivot.</p>\');\n"
+"http(\'<p>For best results, the result of the query should contain links to images associated with described data and follow some rules, described in the User's Guide.</p>\');\n"
+"http(\'<p>This feature is supported by combination of four components:</p>\\n\');\n"
 "http(\'<ol>\\n\');\n"
-"http(\'<li>Virtuoso Universal Server (Virtuoso Open Source does not contain some required functions)\\n\');\n"
-"http(\'</li>\\n<li>ImageMagick plugin of version 0.6 or newer\\n\');\n"
-"http(\'</li>\\n<li>sparql_cxml VAD package (it will in turn require "RDF mappers" package)\\n\');\n"
-"http(\'</li></ol>\\n\');\n"
-"http(\'<p>As soon as all components are installed, SPARQL web service endpoint will contain "CXML" option to the list of available formats.</p>\\n\');\n"
+"http(\'<li>The Virtuoso Universal Server (Virtuoso Open Source does not contain some required functions)</li>\\n\');\n"
+"http(\'<li>The ImageMagick plugin (version 0.6 or newer) and optionally the QRcode plugin</li>\\n\');\n"
+"http(\'<li>The QRcode plugin (version 0.1 or newer)</li>\\n\');\n"
+"http(\'<li>The sparql_cxml VAD package (which in turn requires the "RDF mappers" package)</li>\\n\');\n"
+"http(\'</ol>\\n\');\n"
+"http(\'<p>As soon as all these components are installed, the SPARQL web service endpoint will add the "CXML" option to the list of available formats.</p>\\n\');\n"
 "}\n"
 "else if (help_topic=\'enable_det\')\n"
 "{\n"
-"declare host_ur varchar; host_ur := registry_get (\'URIQADefaultHost\');\n"
-"http(\'<h3>How To Let the SPARQL Endpoint Save Results In DAV?</h3>\n"
-"<p>By default, SPARQL endpoint can only sent the result back to the client. That can be inconvenient if the result should be accessible for programs like file managers and archivers.</p>\n"
-"<p>The solution is to let the endpoint create "dynamic"resources in DAV storage of the Virtuoso server. A DAV client, e.g., the boilt-in client of Windows Explorer, can connect to that storage and access these resources as if they are plain local files.</p>\n"
-"<p>If you are the administrator and want to enable this feature, you can perform the following steps:</p>\\n\');\n"
+"http(\'<h3>How To Let the SPARQL Endpoint Save Results In WebDAV?</h3>\');\n"
+"http(\'<p>By default, the SPARQL endpoint can only sent the result back to the client. This can be inconvenient if the result should be accessible for programs like file managers and archivers.</p>\');\n"
+"http(\'<p>The solution is to let the endpoint create "dynamic"resources in a WebDAV folder on the Virtuoso server. A WebDAV client, e.g. the built-in client of Windows Explorer, can connect to that storage and access these resources as if they are plain local files.</p>\');\n"
+"http(\'<p>If you are the Database Administrator and want to enable this feature, you can perform the following steps:</p>\\n\');\n"
 "http(\'<ol>\\n\');\n"
-"http( sprintf(\'<li>This web service endpoint runs under "%.100s" account. This user should have an access to DAV (U_DAV_ENABLE=1 in DB.DBA.SYS_USERS)\\n\', user_id));\n"
-"http( sprintf(\'</li>\\n<li>The DAV home directory (e.g., <a href=\"/DAV/home/%.100s/\">/DAV/home/%.100s/</a>) should be created and the path to it should be remembered in DB.DBA.SYS_USERS (U_HOME field; do not forget the leading and the trailing slash chars).\\n\', user_id, user_id));\n"
-"http( sprintf(\'</li>\\n<li>The home directory should contain a subdirectory named "saved-sparql-results", and the subdirectory should be of "DynaRes" DAV Extension Type.\'));\n"
-"http(\'</li></ol>\\n\');\n"
-"http(\'<p>As soon as the appropriated directory exists, SPARQL web service endpoint will show additional controls to choose how to save results.</p>\\n\');\n"
+"http( sprintf(\'<li>This web service endpoint runs under the "%.100s" account. This user should have an access to WebDAV (U_DAV_ENABLE=1 in DB.DBA.SYS_USERS)</li>\\n\', user_id));\n"
+"http( sprintf(\'<li>A WebDAV home directory (e.g. <a href=\"/DAV/home/%.100s/\">/DAV/home/%.100s/</a>) should be created and the path to it should be remembered in DB.DBA.SYS_USERS (U_HOME) field;<br />(do not forget the leading and the trailing slash chars).</li>\\n\', user_id, user_id));\n"
+"http( sprintf(\'<li>This home directory should contain a subdirectory named "saved-sparql-results", and the subdirectory should be of "DynaRes" DAV Extension Type.</li>\\n\'));\n"
+"http(\'</ol>\\n\');\n"
+"http(\'<p>As soon as the appropriate directory exists, the SPARQL web service endpoint will show additional controls to choose how to save results.</p>\\n\');\n"
 "}\n"
 "else if (help_topic=\'enable_det\')\n"
 "{\n"
@@ -15742,14 +18609,299 @@ static const char *proc378 =
 "\'500\', \'Request Failed\',\n"
 "\'Invalid help topic\', format);\n"
 "}\n"
-"http(\'<p><font size=\"-1\">To close this help, press the "back" button of the browser.</font></p>\\n\');\n"
+"http(\'\');\n"
+"http(\'<p>To close this help, press \');\n"
+"http (\'<button type=\"button\" name=\"back\" value=\"Back\" onclick=\"javascript:history.go(-1);\">Back</button>\\n\');\n"
+"http(\' or use the "back" button of the browser.</p>\\n\');\n"
+"http(\'</div>\\n\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_FOOTER();\n"
+"http(\'</body>\\n\');\n"
+"http(\'</html>\\n\');\n"
 "}\n"
-"--src sparql_io.sql:1821\n";
+"--src sparql_io.sql:2422\n";
 
-static const char *other42 = 
+static const char *other43 = 
 "registry_set (\'/!sparql/\', \'no_vsp_recompile\')\n";
-static const char *proc379 = 
-"#line 2743 \"[executable]/sparql_io.sql\"\n"
+static const char *proc433 = 
+"#line 3240 \"[executable]/sparql_io.sql\"\n"
+" create procedure DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK (inout g_iid IRI_ID, inout app_env any, inout res IRI_ID)\n"
+"{\n"
+"res := min_bnode_iri_id ();\n"
+"}\n"
+"--src sparql_io.sql:3238\n";
+
+static const char *proc434 = 
+"#line 3247 \"[executable]/sparql_io.sql\"\n"
+" create procedure DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE (\n"
+"inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
+"inout o_uri varchar,\n"
+"inout app_env any )\n"
+"{\n"
+"signal (\'22023\', \'The graph URI is relative and can not be resolved using the submitted resource (base should be declared before data for the first triple)\');\n"
+"}\n"
+"--src sparql_io.sql:3245\n";
+
+static const char *proc435 = 
+"#line 3257 \"[executable]/sparql_io.sql\"\n"
+" create procedure DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L (\n"
+"inout g_iid IRI_ID, inout s_uri varchar, inout p_uri varchar,\n"
+"inout o_val any, inout o_type varchar, inout o_lang varchar,\n"
+"inout app_env any )\n"
+"{\n"
+"signal (\'22023\', \'The graph URI is relative and can not be resolved using the submitted resource (base should be declared before data for the first triple)\');\n"
+"}\n"
+"--src sparql_io.sql:3255\n";
+
+static const char *proc436 = 
+"#line 3267 \"[executable]/sparql_io.sql\"\n"
+" create procedure DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE (\n"
+"inout base_uri varchar,\n"
+"inout graph_uri varchar,\n"
+"inout app_env any )\n"
+"{\n"
+"app_env[0] := DB.DBA.XML_URI_RESOLVE_LIKE_GET (base_uri, graph_uri);\n"
+"signal (\'ok001\', \'\');\n"
+"}\n"
+"--src sparql_io.sql:3265\n";
+
+static const char *proc437 = 
+"#line 3278 \"[executable]/sparql_io.sql\"\n"
+" create procedure DB.DBA.SPARQL_CRUD_BASE_TTL (inout strg any, in graph_uri varchar, in flags integer := 255)\n"
+"{\n"
+"declare app_env any;\n"
+"if (126 = __tag (strg))\n"
+"strg := cast (strg as varchar);\n"
+"app_env := vector (null);\n"
+"whenever sqlstate \'ok001\' goto done;\n"
+"rdf_load_turtle (strg, \'\', graph_uri, flags,\n"
+"vector (\n"
+"\'\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK\',\n"
+"\'DB.DBA.TTLP_EV_GET_IID\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L\',\n"
+"\'\',\n"
+"\'\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE\' ),\n"
+"app_env);\n"
+"done:\n"
+"return app_env[0];\n"
+"}\n"
+"--src sparql_io.sql:3276\n";
+
+static const char *proc438 = 
+"#line 3302 \"[executable]/sparql_io.sql\"\n"
+" create procedure DB.DBA.SPARQL_CRUD_BASE_RDFXML (in strg any, in graph_uri varchar)\n"
+"{\n"
+"declare app_env any;\n"
+"app_env := vector (null);\n"
+"whenever sqlstate \'ok001\' goto done;\n"
+"rdf_load_rdfxml (strg, 0,\n"
+"graph_uri,\n"
+"vector (\n"
+"\'\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK\',\n"
+"\'DB.DBA.TTLP_EV_GET_IID\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L\',\n"
+"\'\',\n"
+"\'\',\n"
+"\'DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE\' ),\n"
+"app_env );\n"
+"done:\n"
+"return app_env[0];\n"
+"}\n"
+"--src sparql_io.sql:3300\n";
+
+static const char *proc439 = 
+"#line 3324 \"[executable]/sparql_io.sql\"\n"
+"create procedure WS.WS.\"/!sparql-graph-crud/\" (inout path varchar, inout params any, inout lines any)\n"
+"{\n"
+"declare user_id varchar;\n"
+"declare reqbegin varchar;\n"
+"declare graph_uri varchar;\n"
+"declare graph_uri_is_relative integer;\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"set http_charset=\'utf-8\';\n"
+"user_id := connection_get (\'SPARQLUserId\', \'SPARQL\');\n"
+"reqbegin := lines[0];\n"
+"graph_uri := trim(get_keyword (\'graph-uri\', params, \'\'));\n"
+"if (isstring (get_keyword (\'default\', params)))\n"
+"{\n"
+"declare req_hosts varchar;\n"
+"declare req_hosts_split any;\n"
+"declare hctr integer;\n"
+"if (graph_uri <> \'\')\n"
+"signal (\'22023\', \'The request to SPARQL 1.1 Graph Store endpoint contains both \"graph\" and \"default\" params\');\n"
+"req_hosts := http_request_header (lines, \'Host\', null, null);\n"
+"req_hosts := replace (req_hosts, \', \', \',\');\n"
+"req_hosts_split := split_and_decode (req_hosts, 0, \'\\0\\0,\');\n"
+"for (hctr := length (req_hosts_split) - 1; hctr >= 0; hctr := hctr - 1)\n"
+"{\n"
+"for (select top 1 SH_GRAPH_URI, SH_DEFINES from DB.DBA.SYS_SPARQL_HOST\n"
+"where req_hosts_split [hctr] like SH_HOST) do\n"
+"{\n"
+"if (length (SH_GRAPH_URI))\n"
+"{\n"
+"graph_uri := SH_GRAPH_URI;\n"
+"goto good_host_found;\n"
+"}\n"
+"goto bad_host_found;\n"
+"}\n"
+"}\n"
+"bad_host_found:\n"
+"signal (\'22023\', \'The request to SPARQL 1.1 Graph Store endpoint contains \"default\" param but the endpoint is not configured to have default graph\');\n"
+"good_host_found:\n"
+" ;\n"
+"}\n"
+"if (graph_uri <> \'\')\n"
+"goto graph_processing;\n"
+"http_methods_set (\'GET\', \'HEAD\', \'POST\', \'PUT\', \'DELETE\', \'PATCH\');\n"
+"\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE();\n"
+"\n"
+"http(\'<head>\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_HTML_HEAD(\'Virtuoso SPARQL 1.1 Uniform RDF Graph Query Form\');\n"
+"WS.WS.SPARQL_ENDPOINT_STYLE ();\n"
+"http(\'</head>\\n\');\n"
+"\n"
+"http(\'<body>\\n\');\n"
+"http(\'    <div id=\"header\">\\n\');\n"
+"http(\'	<h1>Virtuoso SPARQL 1.1 Uniform RDF Graph Query Form</h1>\\n\');\n"
+"http(\'    </div>\\n\\n\');\n"
+"http(\'    <div id=\"intro\">\\n\');\n"
+"http(\'	<p>This page is designed to help you test support for <a href=\"http://www.w3.org/TR/sparql11-http-rdf-update\">SPARQL 1.1 Graph Store HTTP Protocol</a> in OpenLink Virtuoso.</p>\\n\');\n"
+"http(\'    </div>\\n\\n\');\n"
+"http(\'    <div id=\"main\">\\n\');\n"
+"http(\'	<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\\n\');\n"
+"http(\'	<fieldset>\\n\');\n"
+"http(\'		<label for=\"graph-uri\">Graph URI</label>\\n\');\n"
+"http(\'		<br />\\n\');\n"
+"http(\'		<input type=\"text\" name=\"graph-uri\" id=\"graph-uri\" \');\n"
+"http(sprintf (\'value=\"%s\" size=\"80\"/>\\n\', coalesce (\'\')));\n"
+"http(\'		<br /><br />\\n\');\n"
+"http(\'		<label for=\"res-file\">File to upload</label>\\n\');\n"
+"http(\'		<br />\\n\');\n"
+"http(\'		<input type=\"file\" name=\"res-file\" id=\"res-file\"/>\\n\');\n"
+"http(\'		<br /><br />\\n\');\n"
+"http(\'		<input type=\"submit\" value=\"Upload the resource\"/>\');\n"
+"http(\'	</fieldset>\\n\');\n"
+"http(\'	</form>\\n\');\n"
+"http(\'    </div>\\n\\n\');\n"
+"WS.WS.SPARQL_ENDPOINT_FOOTER();\n"
+"http(\'</body>\\n\');\n"
+"http(\'</html>\\n\');\n"
+"return;\n"
+"graph_processing:\n"
+"commit work;\n"
+"graph_uri_is_relative := neq (graph_uri, DB.DBA.XML_URI_RESOLVE_LIKE_GET (\'zZz://example.com/\', graph_uri));\n"
+"if (graph_uri_is_relative)\n"
+"{\n"
+"if (not (reqbegin like \'PUT%\') and not (reqbegin like \'POST%\'))\n"
+"signal (\'22023\', \'The graph URI <\' || graph_uri || \'> is relative and can be passed to SPARQL 1.1 Graph Store endpoint only in some PUT or POST requests\');\n"
+"}\n"
+"if ((reqbegin like \'PUT%\') or (reqbegin like \'POST%\'))\n"
+"{\n"
+"declare res_file, res_content_type varchar;\n"
+"declare full_graph_uri varchar;\n"
+"declare graph_exists integer;\n"
+"set_user_id (user_id, 1);\n"
+"res_file := get_keyword (\'res-file\', params, \'\');\n"
+"\n"
+"if (0 = length (res_file))\n"
+"res_file := get_keyword (\'Content\', params, \'\');\n"
+"\n"
+"if (0 = length (res_file))\n"
+"res_file := http_body_read();\n"
+"\n"
+"if (0 = length (res_file))\n"
+"res_file := http_body_read(1);\n"
+"\n"
+"res_content_type := DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (null, null, res_file);\n"
+"\n"
+"if (graph_uri_is_relative)\n"
+"{\n"
+"full_graph_uri := null;\n"
+"if (res_content_type = \'text/rdf+n3\')\n"
+"full_graph_uri := DB.DBA.SPARQL_CRUD_BASE_TTL (res_file, graph_uri, 255);\n"
+"else if (res_content_type = \'application/rdf+xml\')\n"
+"full_graph_uri := DB.DBA.SPARQL_CRUD_BASE_RDFXML (res_file, graph_uri);\n"
+"else\n"
+"signal (\'22023\', \'The graph URI <\' || graph_uri || \'> is relative and can not be resolved using the submitted resource of unsupported type \' || coalesce (res_content_type, \'\'));\n"
+"if (full_graph_uri is null)\n"
+"signal (\'22023\', \'The graph URI <\' || graph_uri || \'> is relative and can not be resolved using the submitted resource (resource does not contain any base)\');\n"
+"}\n"
+"else\n"
+"full_graph_uri := graph_uri;\n"
+"commit work;\n"
+"graph_exists := (sparql define input:storage \"\" ask where { graph `iri(?:full_graph_uri)` { ?s ?p ?o }});\n"
+"if (res_content_type = \'text/rdf+n3\')\n"
+"{\n"
+"if (reqbegin like \'PUT%\')\n"
+"{\n"
+"sparql clear graph ?:full_graph_uri;\n"
+"commit work;\n"
+"}\n"
+"DB.DBA.TTLP (res_file, full_graph_uri, full_graph_uri);\n"
+"}\n"
+"else if (res_content_type = \'application/rdf+xml\')\n"
+"{\n"
+"if (reqbegin like \'PUT%\')\n"
+"{\n"
+"sparql clear graph ?:full_graph_uri;\n"
+"commit work;\n"
+"}\n"
+"DB.DBA.RDF_LOAD_RDFXML (res_file, full_graph_uri, full_graph_uri);\n"
+"}\n"
+"else\n"
+"signal (\'22023\', \'The PUT request for graph <\' || full_graph_uri || \'> is rejected: the submitted resource is of unsupported type \' || coalesce (res_content_type, \'\'));\n"
+"if (graph_exists is null)\n"
+"http_request_status (\'HTTP/1.1 201 Created\');\n"
+"else if (length (res_file) <= 2)\n"
+"http_request_status (\'HTTP/1.1 204 No Content\');\n"
+"return;\n"
+"}\n"
+"else if (reqbegin like \'DELETE%\')\n"
+"{\n"
+"set_user_id (user_id, 1);\n"
+"if (not (exists (sparql define input:storage \"\" select (1) where { graph `iri(?:graph_uri)` { ?s ?p ?o }})))\n"
+"{\n"
+"http_request_status (\'HTTP/1.1 404 Not Found\');\n"
+"return;\n"
+"}\n"
+"sparql clear graph ?:graph_uri;\n"
+"commit work;\n"
+"return;\n"
+"}\n"
+"else if (reqbegin like \'GET%\')\n"
+"{\n"
+"if (not (exists (sparql define input:storage \"\" select (1) where { graph `iri(?:graph_uri)` { ?s ?p ?o }})))\n"
+"{\n"
+"http_request_status (\'HTTP/1.1 404 Not Found\');\n"
+"return;\n"
+"}\n"
+"connection_set (\'SPARQL_crud_graph\', graph_uri);\n"
+"WS.WS.\"/!sparql/\" (path,\n"
+"vector_concat (\n"
+"vector (\'query\', \'define input:storage \"\" construct { ?s ?p ?o } where { graph `iri(bif:connection_get(\"SPARQL_crud_graph\"))` { ?s ?p ?o }}\'),\n"
+"params ), lines);\n"
+"return;\n"
+"}\n"
+"else\n"
+"{\n"
+"http_request_status (\'HTTP/1.1 501 Method Not Implemented\');\n"
+"return;\n"
+"}\n"
+"}\n"
+"--src sparql_io.sql:3322\n";
+
+static const char *other44 = 
+"registry_set (\'/!sparql-graph-crud/\', \'no_vsp_recompile\')\n";
+static const char *proc440 = 
+"#line 3511 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS (in full_query varchar, in qry_params any, in maxrows integer, in accept varchar, in user_id varchar, in hard_timeout integer, in jsonp_callback any)\n"
 "{\n"
 "\n"
@@ -15776,10 +18928,10 @@ static const char *proc379 =
 "http (\')\', ses);\n"
 "result (ses);\n"
 "}\n"
-"--src sparql_io.sql:2741\n";
+"--src sparql_io.sql:3509\n";
 
-static const char *proc380 = 
-"#line 2774 \"[executable]/sparql_io.sql\"\n"
+static const char *proc441 = 
+"#line 3542 \"[executable]/sparql_io.sql\"\n"
 " create function DB.DBA.SPARQL_ROUTE_IF_DAV (in graph_iri varchar, in output_format_name varchar)\n"
 "{\n"
 "\n"
@@ -15788,10 +18940,10 @@ static const char *proc380 =
 "return subseq (graph_iri, 17);\n"
 "return NULL;\n"
 "}\n"
-"--src sparql_io.sql:2772\n";
+"--src sparql_io.sql:3540\n";
 
-static const char *proc381 = 
-"#line 2784 \"[executable]/sparql_io.sql\"\n"
+static const char *proc442 = 
+"#line 3552 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.SPARQL_ROUTE_DICT_CONTENT_DAV (\n"
 "in graph_iri varchar,\n"
 "in opname varchar,\n"
@@ -15865,12 +19017,22 @@ static const char *proc381 =
 "DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (triples, 1, out_ses);\n"
 "else if ((\'text/rdf+n3\' = mime) or (\'text/rdf+ttl\' = mime) or (\'text/rdf+turtle\' = mime) or (\'text/turtle\' = mime) or (\'text/n3\' = mime))\n"
 "DB.DBA.RDF_TRIPLES_TO_TTL (triples, out_ses);\n"
+"else if (\'application/x-trig\' = mime)\n"
+"DB.DBA.RDF_TRIPLES_TO_TRIG (triples, out_ses);\n"
 "else if (\'text/plain\' = mime)\n"
 "DB.DBA.RDF_TRIPLES_TO_NT (triples, out_ses);\n"
 "else if ((\'application/json\' = mime) or (\'application/rdf+json\' = mime) or (\'application/x-rdf+json\' = mime))\n"
 "DB.DBA.RDF_TRIPLES_TO_TALIS_JSON (triples, out_ses);\n"
+"else if (\'application/x-json+ld\' = mime)\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, out_ses);\n"
+"else if (\'application/ld+json\' = mime)\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_LD (triples, out_ses);\n"
 "else if (\'application/xhtml+xml\' = mime)\n"
 "DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML (triples, out_ses);\n"
+"else if (\'text/html\' = mime)\n"
+"DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA (triples, out_ses);\n"
+"else if (\'application/microdata+json\' = mime)\n"
+"DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA (triples, out_ses);\n"
 "rc := DB.DBA.DAV_RES_UPLOAD (split, out_ses, mime, old_perms, old_uid, old_gid, uid, pwd);\n"
 "if (isinteger (rc) and rc < 0)\n"
 "signal (\'RDFXX\', sprintf (\'Unable to change \"%.200s\" in DAV: %s\', split, DB.DBA.DAV_PERROR (rc)));\n"
@@ -15878,28 +19040,28 @@ static const char *proc381 =
 "if (not isinteger (final_res))\n"
 "return final_res;\n"
 "}\n"
-"--src sparql_io.sql:2782\n";
+"--src sparql_io.sql:3550\n";
 
-static const char *proc382 = 
-"#line 2873 \"[executable]/sparql_io.sql\"\n"
+static const char *proc443 = 
+"#line 3651 \"[executable]/sparql_io.sql\"\n"
 "create procedure\n"
 "WS.WS.__http_handler_rq (in content any, in params any, in lines any, inout ipath_ostat any)\n"
 "{\n"
 "return DB.DBA.http_rq_file_handler(content, params, lines, ipath_ostat);\n"
 "}\n"
-"--src sparql_io.sql:2871\n";
+"--src sparql_io.sql:3649\n";
 
-static const char *proc383 = 
-"#line 2880 \"[executable]/sparql_io.sql\"\n"
+static const char *proc444 = 
+"#line 3658 \"[executable]/sparql_io.sql\"\n"
 "create procedure\n"
 "WS.WS.__http_handler_head_rq (in content any, in params any, in lines any, inout ipath_ostat any)\n"
 "{\n"
 "return DB.DBA.http_rq_file_handler(content, params, lines, ipath_ostat);\n"
 "}\n"
-"--src sparql_io.sql:2878\n";
+"--src sparql_io.sql:3656\n";
 
-static const char *proc384 = 
-"#line 2887 \"[executable]/sparql_io.sql\"\n"
+static const char *proc445 = 
+"#line 3665 \"[executable]/sparql_io.sql\"\n"
 "create procedure\n"
 "DB.DBA.http_rq_file_handler (in content any, in params any, in lines any, inout ipath_ostat any)\n"
 "{\n"
@@ -15936,6 +19098,7 @@ static const char *proc384 =
 "strcasestr (accept, \'text/rdf+ttl\') is not null or\n"
 "strcasestr (accept, \'text/rdf+turtle\') is not null or\n"
 "strcasestr (accept, \'text/turtle\') is not null or\n"
+"strcasestr (accept, \'application/x-trig\') is not null or\n"
 "strcasestr (accept, \'application/rdf+xml\') is not null or\n"
 "strcasestr (accept, \'application/javascript\') is not null or\n"
 "strcasestr (accept, \'application/soap+xml\') is not null or\n"
@@ -15956,10 +19119,10 @@ static const char *proc384 =
 "http (content);\n"
 "return \'\';\n"
 "}\n"
-"--src sparql_io.sql:2885\n";
+"--src sparql_io.sql:3663\n";
 
-static const char *proc385 = 
-"#line 2945 \"[executable]/sparql_io.sql\"\n"
+static const char *proc446 = 
+"#line 3724 \"[executable]/sparql_io.sql\"\n"
 "create procedure DB.DBA.RDF_GRANT_SPARQL_IO ()\n"
 "{\n"
 "declare state, msg varchar;\n"
@@ -15969,6 +19132,7 @@ static const char *proc385 =
 "\'grant execute on DB.DBA.SPARQL_REXEC_TO_ARRAY to SPARQL_SELECT\',\n"
 "\'grant execute on DB.DBA.SPARQL_REXEC_WITH_META to SPARQL_SELECT\',\n"
 "\'grant execute on WS.WS.\"/!sparql/\" to \"SPARQL\"\',\n"
+"\'grant execute on WS.WS.\"/!sparql-graph-crud/\" to \"SPARQL\"\',\n"
 "\'grant execute on DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS to \"SPARQL\"\',\n"
 "\'grant execute on DB.DBA.SPARQL_ROUTE_DICT_CONTENT_DAV to SPARQL_UPDATE\',\n"
 "\'grant execute on DB.DBA.SPARQL_SINV_IMP to SPARQL_SPONGE\',\n"
@@ -15978,15 +19142,15 @@ static const char *proc385 =
 "exec (cmd, state, msg);\n"
 "}\n"
 "}\n"
-"--src sparql_io.sql:2943\n";
+"--src sparql_io.sql:3722\n";
 
 
-static const char *other43 = 
+static const char *other45 = 
 " DB.DBA.RDF_GRANT_SPARQL_IO ()\n";
 /* rdf_sponge.sql */
 
-static const char *proc386 = 
-"#line 28 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc447 = 
+"#line 50 \"[executable]/rdf_sponge.sql\"\n"
 " create procedure DB.DBA.RDF_FT_INDEX_GRABBED (inout grabbed any, inout options any)\n"
 "{\n"
 "declare grabbed_list any;\n"
@@ -16019,10 +19183,10 @@ static const char *proc386 =
 "}\n"
 "\n"
 "}\n"
-"--src rdf_sponge.sql:26\n";
+"--src rdf_sponge.sql:48\n";
 
-static const char *proc387 = 
-"#line 62 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc448 = 
+"#line 84 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_GRAB_SINGLE (in val any, inout grabbed any, inout env any) returns integer\n"
 "{\n"
 "declare url, get_method, recov varchar;\n"
@@ -16046,7 +19210,7 @@ static const char *proc387 =
 "{\n"
 "declare final_dest, final_gdest varchar;\n"
 "final_dest := get_keyword (\'get:destination\', env, dest);\n"
-"final_gdest := get_keyword (\'get:group-destination\', env, dest);\n"
+"final_gdest := get_keyword (\'get:group-destination\', env);\n"
 "opts := vector (\n"
 "\'get:soft\', get_keyword_ucase (\'get:soft\', env, \'soft\'),\n"
 "\'get:refresh\', get_keyword_ucase (\'get:refresh\', env),\n"
@@ -16090,20 +19254,20 @@ static const char *proc387 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src rdf_sponge.sql:60\n";
+"--src rdf_sponge.sql:82\n";
 
-static const char *proc388 = 
-"#line 131 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc449 = 
+"#line 153 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_GRAB_SINGLE_ASYNC (in val any, in grabbed any, in env any, in counter_limit integer := 1)\n"
 "{\n"
 "\n"
 "if (dict_size (grabbed) < counter_limit)\n"
 "DB.DBA.RDF_GRAB_SINGLE (val, grabbed, vector_concat (vector (\'refresh_free_text\', 0), env));\n"
 "}\n"
-"--src rdf_sponge.sql:129\n";
+"--src rdf_sponge.sql:151\n";
 
-static const char *proc389 = 
-"#line 139 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc450 = 
+"#line 161 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_GRAB_SEEALSO (in subj varchar, in opt_g varchar, inout env any) returns integer\n"
 "{\n"
 "declare grabbed, aq any;\n"
@@ -16195,10 +19359,10 @@ static const char *proc389 =
 "return 4;\n"
 "return 2;\n"
 "}\n"
-"--src rdf_sponge.sql:137\n";
+"--src rdf_sponge.sql:159\n";
 
-static const char *proc390 = 
-"#line 232 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc451 = 
+"#line 254 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure\n"
 "DB.DBA.RDF_GRAB (\n"
 "in app_params any, in seed varchar, in iter varchar, in final varchar, in ret_limit integer,\n"
@@ -16308,10 +19472,10 @@ static const char *proc390 =
 "for (rctr := 0; rctr < rcount; rctr := rctr + 1)\n"
 "result (rset[rctr]);\n"
 "}\n"
-"--src rdf_sponge.sql:230\n";
+"--src rdf_sponge.sql:252\n";
 
-static const char *proc391 = 
-"#line 343 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc452 = 
+"#line 365 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_GRAB_RESOLVER_DEFAULT (in base varchar, in rel_uri varchar, out abs_uri varchar, out dest_uri varchar, out get_method varchar)\n"
 "{\n"
 "declare rel_lattice_pos, base_lattice_pos integer;\n"
@@ -16350,10 +19514,10 @@ static const char *proc391 =
 "get_method := \'GET\';\n"
 "\n"
 "}\n"
-"--src rdf_sponge.sql:341\n";
+"--src rdf_sponge.sql:363\n";
 
-static const char *proc392 = 
-"#line 388 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc453 = 
+"#line 410 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.SPARQL_EVAL_TO_ARRAY (in query varchar, in dflt_graph varchar, in maxrows integer)\n"
 "{\n"
 "declare state, msg varchar;\n"
@@ -16371,10 +19535,10 @@ static const char *proc392 =
 "signal (state, msg);\n"
 "return rset;\n"
 "}\n"
-"--src rdf_sponge.sql:386\n";
+"--src rdf_sponge.sql:408\n";
 
-static const char *proc393 = 
-"#line 407 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc454 = 
+"#line 429 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.SPARQL_EVAL (in query varchar, in dflt_graph varchar, in maxrows integer)\n"
 "{\n"
 "declare sqltext, state, msg varchar;\n"
@@ -16396,9 +19560,9 @@ static const char *proc393 =
 "exec_result (row);\n"
 "}\n"
 "}\n"
-"--src rdf_sponge.sql:405\n";
+"--src rdf_sponge.sql:427\n";
 
-static const char *tbl19 = 
+static const char *tbl20 = 
 "create table DB.DBA.SYS_HTTP_SPONGE (\n"
 "HS_LOCAL_IRI varchar not null,\n"
 "HS_PARSER varchar not null,\n"
@@ -16423,8 +19587,8 @@ static const char *tbl19 =
 "create index SYS_HTTP_SPONGE_EXPIRATION on DB.DBA.SYS_HTTP_SPONGE (HS_EXPIRATION desc) partition (HS_LOCAL_IRI varchar)\n"
 "create index SYS_HTTP_SPONGE_FROM_IRI on DB.DBA.SYS_HTTP_SPONGE (HS_FROM_IRI, HS_PARSER) partition (HS_FROM_IRI varchar)\n";
 
-static const char *proc394 = 
-"#line 465 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc455 = 
+"#line 487 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.SYS_HTTP_SPONGE_GET_CACHE_PARAMS\n"
 "(\n"
 "in explicit_refresh any,\n"
@@ -16458,9 +19622,11 @@ static const char *proc394 =
 "ret_dt_expires := http_string_date (ret_expires, NULL, now());\n"
 "ret_dt_last_modified := http_string_date (ret_last_modif, NULL, now());\n"
 "\n"
-"if (http_request_header (ret_hdr, \'Pragma\', null, null) = \'no-cache\' or\n"
-"http_request_header (ret_hdr, \'Cache-Control\', null, null) like \'no-cache%\' )\n"
+"if (http_request_header (ret_hdr, \'Pragma\', null, null) = \'no-cache\' or http_request_header (ret_hdr, \'Cache-Control\', null, null) like \'no-cache%\' )\n"
+"{\n"
 "ret_dt_expires := now ();\n"
+"ret_etag := null;\n"
+"}\n"
 "\n"
 "if (ret_304_not_modified and ret_dt_last_modified is null)\n"
 "ret_dt_last_modified := old_last_modified;\n"
@@ -16503,10 +19669,10 @@ static const char *proc394 =
 "new_expiration := __min (new_expiration, dateadd (\'second\', explicit_refresh, now()));\n"
 "}\n"
 "}\n"
-"--src rdf_sponge.sql:463\n";
+"--src rdf_sponge.sql:485\n";
 
-static const char *proc395 = 
-"#line 548 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc456 = 
+"#line 572 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.SYS_HTTP_SPONGE_DEP_URL_NOT_CHANGED (in local_iri varchar, in parser varchar, in explicit_refresh int)\n"
 "{\n"
 "\n"
@@ -16551,10 +19717,10 @@ static const char *proc395 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src rdf_sponge.sql:546\n";
+"--src rdf_sponge.sql:570\n";
 
-static const char *proc396 = 
-"#line 594 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc457 = 
+"#line 618 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_HTTP_MAKE_HTTP_REQ (in url varchar, in meth varchar, in req varchar)\n"
 "{\n"
 "declare hf any;\n"
@@ -16567,10 +19733,10 @@ static const char *proc396 =
 "str := replace (str, \'\\n\\n\', \'\\n\');\n"
 "return split_and_decode (str, 0, \'\\0\\0\\n\');\n"
 "}\n"
-"--src rdf_sponge.sql:592\n";
+"--src rdf_sponge.sql:616\n";
 
-static const char *proc397 = 
-"#line 608 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc458 = 
+"#line 632 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.SYS_HTTP_SPONGE_UP (in local_iri varchar, in get_uri varchar, in parser varchar, in eraser varchar, in options any)\n"
 "{\n"
 "declare new_origin_uri, new_origin_login, new_last_etag varchar;\n"
@@ -16579,8 +19745,9 @@ static const char *proc397 =
 "declare old_last_load, old_expiration, old_last_modified datetime;\n"
 "declare load_begin_msec, load_end_msec, old_exp_is_true,\n"
 "old_download_size, old_download_msec_time, old_read_count,\n"
-"new_download_size, explicit_refresh integer;\n"
+"new_download_size, explicit_refresh, max_sz integer;\n"
 "declare get_method varchar;\n"
+"declare get_soft varchar;\n"
 "declare ret_hdr, immg, req_hdr_arr any;\n"
 "declare req_hdr varchar;\n"
 "declare ret_body, ret_content_type, ret_etag, ret_last_modified, ret_date, ret_last_modif, ret_expires varchar;\n"
@@ -16594,9 +19761,10 @@ static const char *proc397 =
 "new_origin_uri := cast (get_keyword_ucase (\'get:uri\', options, get_uri) as varchar);\n"
 "new_origin_login := cast (get_keyword_ucase (\'get:login\', options) as varchar);\n"
 "explicit_refresh := get_keyword_ucase (\'get:refresh\', options);\n"
+"get_soft := get_keyword_ucase (\'get:soft\', options, \'\');\n"
 "if (explicit_refresh is null)\n"
 "{\n"
-"max_refresh := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'MaxCacheExpiration\');\n"
+"max_refresh := virtuoso_ini_item_value (\'SPARQL\', \'MaxCacheExpiration\');\n"
 "if (max_refresh is not null)\n"
 "{\n"
 "max_refresh := atoi (max_refresh);\n"
@@ -16606,7 +19774,7 @@ static const char *proc397 =
 "}\n"
 "else if (isstring (explicit_refresh))\n"
 "explicit_refresh := atoi (explicit_refresh);\n"
-"min_expiration := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'MinExpiration\'), \'-1\'));\n"
+"min_expiration := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'MinExpiration\'), \'-1\'));\n"
 "if (min_expiration < 0)\n"
 "min_expiration := null;\n"
 "set isolation=\'serializable\';\n"
@@ -16693,8 +19861,12 @@ static const char *proc397 =
 "\n"
 "if (get_method in (\'POST\', \'GET\', \'GET+MGET\'))\n"
 "{\n"
+"declare acc_hdr varchar; \n"
 "req_hdr := NULL;\n"
 "get_proxy := get_keyword_ucase (\'get:proxy\', options);\n"
+"acc_hdr := trim (get_keyword_ucase (\'get:accept\', options));\n"
+"if (not length (acc_hdr))\n"
+"acc_hdr := \'application/rdf+xml; q=1.0, text/rdf+n3; q=0.9, application/rdf+turtle; q=0.5, application/x-turtle; q=0.6, application/turtle; q=0.5, text/turtle; q=0.7, application/xml; q=0.2, */*; q=0.1\';\n"
 "connection_set (\'sparql-get:proxy\', get_proxy);\n"
 "\n"
 "\n"
@@ -16708,7 +19880,7 @@ static const char *proc397 =
 "\n"
 "req_hdr := req_hdr || case when length (req_hdr) > 0 then \'\\r\\n\' else \'\' end\n"
 "|| \'User-Agent: OpenLink Virtuoso RDF crawler\\r\\n\'\n"
-"|| \'Accept: application/rdf+xml; q=1.0, text/rdf+n3; q=0.9, application/rdf+turtle; q=0.7, application/x-turtle; q=0.6, application/turtle; q=0.5, application/xml; q=0.2, */*; q=0.1\';\n"
+"|| \'Accept: \' || acc_hdr;\n"
 "\n"
 "\n"
 "{\n"
@@ -16763,7 +19935,7 @@ static const char *proc397 =
 "}\n"
 "goto resp_received;\n"
 "}\n"
-"if (eraser is not null)\n"
+"if (eraser is not null and (get_soft <> \'add\'))\n"
 "call (eraser) (local_iri, new_origin_uri, options);\n"
 "signal (\'RDFZZ\', sprintf (\n"
 "\'Unable to get data from \"%.1000s\": This version of Virtuoso does not support OPTION (get:method \"%.100s\")\',\n"
@@ -16807,6 +19979,22 @@ static const char *proc397 =
 "\n"
 "new_download_size := length (ret_body);\n"
 "\n"
+"max_sz := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'MaxDataSourceSize\'), \'20971520\'));\n"
+"\n"
+"if (max_sz < new_download_size)\n"
+"{\n"
+"rollback work;\n"
+"update DB.DBA.SYS_HTTP_SPONGE\n"
+"set HS_SQL_STATE = \'RDFXX\',\n"
+"HS_SQL_MESSAGE = sprintf (\'Content length %d is over the limit %d\', new_download_size, max_sz),\n"
+"HS_EXPIRATION = now (),\n"
+"HS_EXP_IS_TRUE = 0\n"
+"where\n"
+"HS_LOCAL_IRI = local_iri and HS_PARSER = parser;\n"
+"commit work;\n"
+"signal (\'RDFXX\', sprintf (\'Content length %d is over the limit %d\', new_download_size, max_sz));\n"
+"}\n"
+"\n"
 "\n"
 "\n"
 "\n"
@@ -16814,7 +20002,7 @@ static const char *proc397 =
 "whenever sqlstate \'*\' goto error_during_load;\n"
 "parser_rc := 0;\n"
 "req_hdr_arr := DB.DBA.RDF_HTTP_MAKE_HTTP_REQ (new_origin_uri, get_method, req_hdr);\n"
-"if (eraser is not null)\n"
+"if (eraser is not null and (get_soft <> \'add\'))\n"
 "call (eraser) (local_iri, new_origin_uri, options);\n"
 "parser_rc := call (parser) (local_iri, new_origin_uri, ret_content_type, ret_hdr, ret_body, options, req_hdr_arr);\n"
 "\n"
@@ -16882,35 +20070,41 @@ static const char *proc397 =
 "signal (stat, msg);\n"
 "return local_iri;\n"
 "}\n"
-"--src rdf_sponge.sql:606\n";
+"--src rdf_sponge.sql:630\n";
 
-static const char *proc398 = 
-"#line 923 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc459 = 
+"#line 969 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.SYS_FILE_SPONGE_UP (in local_iri varchar, in get_uri varchar, in parser varchar, in eraser varchar, in options any)\n"
 "{\n"
 "declare new_origin_uri, str, base_uri, mime_type, dummy, tmp any;\n"
 "declare inx int;\n"
+"declare get_soft varchar;\n"
 "new_origin_uri := cast (get_keyword_ucase (\'get:uri\', options, get_uri) as varchar);\n"
+"get_soft := get_keyword_ucase (\'get:soft\', options, \'\');\n"
 "inx := 5;\n"
-"base_uri := local_iri;\n"
+"base_uri := new_origin_uri;\n"
 "base_uri := charset_recode (base_uri, \'UTF-8\', NULL);\n"
 "while (length (base_uri) > inx + 1 and aref (base_uri, inx) = ascii (\'/\'))\n"
 "inx := inx + 1;\n"
+"if (inx = 8)\n"
+"str := file_to_string (subseq (base_uri, inx-1));\n"
+"else\n"
 "str := file_to_string (concat (http_root(), \'/\' , subseq (base_uri, inx)));\n"
 "dummy := vector ();\n"
 "tmp := vector (\'OK\');\n"
 "mime_type := null;\n"
-"if (eraser is not null)\n"
+"if (eraser is not null and (get_soft <> \'add\'))\n"
 "call (eraser) (local_iri, new_origin_uri, options);\n"
 "DB.DBA.RDF_LOAD_HTTP_RESPONSE (local_iri, new_origin_uri, mime_type, tmp, str, options, dummy);\n"
 "return local_iri;\n"
 "}\n"
-"--src rdf_sponge.sql:921\n";
+"--src rdf_sponge.sql:967\n";
 
-static const char *proc399 = 
-"#line 945 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc460 = 
+"#line 996 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE (in origin_uri varchar, in ret_content_type varchar, inout ret_body any) returns varchar\n"
 "{\n"
+"\n"
 "if (ret_content_type is not null)\n"
 "{\n"
 "if (strstr (ret_content_type, \'application/sparql-results+xml\') is not null)\n"
@@ -16926,10 +20120,16 @@ static const char *proc399 =
 "strstr (ret_content_type, \'application/x-turtle\') is not null or\n"
 "strstr (ret_content_type, \'application/turtle\') is not null )\n"
 "return \'text/rdf+n3\';\n"
+"if (strstr (ret_content_type, \'application/x-trig\') is not null)\n"
+"return \'application/x-trig\';\n"
 "}\n"
 "declare ret_begin, ret_html any;\n"
 "ret_begin := subseq (ret_body, 0, 4096);\n"
+"if (isstring_session (ret_begin))\n"
+"ret_begin := string_output_string (ret_begin);\n"
+"\n"
 "ret_html := xtree_doc (ret_begin, 2);\n"
+"\n"
 "if (xpath_eval (\'/html|/xhtml\', ret_html) is not null)\n"
 "return \'text/html\';\n"
 "if (xpath_eval (\'[xmlns:rset=\"http://www.w3.org/2005/sparql-results#\"] /rset:sparql\', ret_html) is not null\n"
@@ -16967,9 +20167,9 @@ static const char *proc399 =
 "}\n"
 "return ret_content_type;\n"
 "}\n"
-"--src rdf_sponge.sql:943\n";
+"--src rdf_sponge.sql:994\n";
 
-static const char *tbl20 = 
+static const char *tbl21 = 
 "create table DB.DBA.SYS_RDF_MAPPERS (\n"
 "RM_ID integer identity,\n"
 "RM_PATTERN varchar,\n"
@@ -16985,8 +20185,8 @@ static const char *tbl20 =
 "create index SYS_RDF_MAPPERS_I1 on DB.DBA.SYS_RDF_MAPPERS (RM_ID) partition cluster replicated\n"
 "create index SYS_RDF_MAPPERS_I2 on DB.DBA.SYS_RDF_MAPPERS (RM_PID) partition cluster replicated\n";
 
-static const char *proc400 = 
-"#line 1056 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc461 = 
+"#line 1114 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_HTTP_URL_GET (inout url any, in base any, inout hdr any,\n"
 "in meth any := \'GET\', in req_hdr varchar := null, in cnt any := null, in proxy any := null, in sig int := 1)\n"
 "{\n"
@@ -17035,10 +20235,10 @@ static const char *proc400 =
 "\n"
 "return content;\n"
 "}\n"
-"--src rdf_sponge.sql:1054\n";
+"--src rdf_sponge.sql:1112\n";
 
-static const char *proc401 = 
-"#line 1107 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc462 = 
+"#line 1165 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_SW_PING (in endp varchar, in url varchar)\n"
 "{\n"
 "declare rc any;\n"
@@ -17056,7 +20256,7 @@ static const char *proc401 =
 "err := \'\';\n"
 "msg := \'n/a\';\n"
 "xt := null;\n"
-"if (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'RestPingService\') = \'1\')\n"
+"if (virtuoso_ini_item_value (\'SPARQL\', \'RestPingService\') = \'1\')\n"
 "{\n"
 "rc := http_get (endp||sprintf (\'?url=%U\', url));\n"
 "xt := xtree_doc (rc);\n"
@@ -17078,28 +20278,28 @@ static const char *proc401 =
 "commit work;\n"
 "return;\n"
 "}\n"
-"--src rdf_sponge.sql:1105\n";
+"--src rdf_sponge.sql:1163\n";
 
-static const char *proc402 = 
-"#line 1148 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc463 = 
+"#line 1206 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_PROC_COLS (in pname varchar)\n"
 "{\n"
 "set_user_id (\'dba\', 1);\n"
 "return procedure_cols (pname);\n"
 "}\n"
-"--src rdf_sponge.sql:1146\n";
+"--src rdf_sponge.sql:1204\n";
 
-static const char *proc403 = 
-"#line 1156 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc464 = 
+"#line 1214 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_LOAD_HTTP_RESPONSE (in graph_iri varchar, in new_origin_uri varchar, inout ret_content_type varchar, inout ret_hdr any, inout ret_body any, inout options any, inout req_hdr_arr any)\n"
 "{\n"
-"declare dest, groupdest, cset, base, first_stat, first_msg varchar;\n"
+"declare dest, groupdest, get_soft, cset, base, first_stat, first_msg varchar;\n"
 "declare rc any;\n"
 "declare aq, ps any;\n"
 "declare xd, xt any;\n"
-"declare saved_log_mode, only_rdfa integer;\n"
+"declare saved_log_mode, only_rdfa, retr_count integer;\n"
 "aq := null;\n"
-"ps := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'PingService\');\n"
+"ps := virtuoso_ini_item_value (\'SPARQL\', \'PingService\');\n"
 "if (length (ps))\n"
 "{\n"
 "aq := async_queue (1);\n"
@@ -17111,6 +20311,7 @@ static const char *proc403 =
 "dest := get_keyword_ucase (\'get:destination\', options);\n"
 "groupdest := get_keyword_ucase (\'get:group-destination\', options);\n"
 "base := get_keyword (\'http-redirect-to\', options, new_origin_uri);\n"
+"get_soft := get_keyword_ucase (\'get:soft\', options);\n"
 "if (get_keyword_ucase (\'get:strategy\', options, \'default\') = \'rdfa-only\')\n"
 "only_rdfa := 1;\n"
 "else\n"
@@ -17119,6 +20320,7 @@ static const char *proc403 =
 "signal (\'RDFXX\', sprintf (\'Unable to load RDF graph <%.500s> from <%.500s>: the sparql-results XML answer does not contain triples\', graph_iri, new_origin_uri));\n"
 "if (get_keyword (\'http-headers\', options) is null)\n"
 "options := vector_concat (options, vector (\'http-headers\', vector (req_hdr_arr, ret_hdr)));\n"
+"retry_after_deadlock:\n"
 "if (strstr (ret_content_type, \'application/rdf+xml\') is not null)\n"
 "{\n"
 "\n"
@@ -17132,6 +20334,8 @@ static const char *proc403 =
 "DB.DBA.RDF_LOAD_RDFXML (ret_body, base, coalesce (dest, graph_iri));\n"
 "if (groupdest is not null)\n"
 "DB.DBA.RDF_LOAD_RDFXML (ret_body, base, groupdest);\n"
+"if (exists (select 1 from DB.DBA.SYS_RDF_MAPPERS where RM_TYPE = \'URL\' and regexp_match (RM_PATTERN, new_origin_uri) and RM_ENABLED = 1))\n"
+"goto load_grddl;\n"
 "if (__proc_exists (\'DB.DBA.RDF_LOAD_POST_PROCESS\') and only_rdfa = 0)\n"
 "call (\'DB.DBA.RDF_LOAD_POST_PROCESS\') (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options);\n"
 "\n"
@@ -17157,6 +20361,8 @@ static const char *proc403 =
 "DB.DBA.TTLP (ret_body, base, coalesce (dest, graph_iri), 255);\n"
 "if (groupdest is not null)\n"
 "DB.DBA.TTLP (ret_body, base, groupdest);\n"
+"if (exists (select 1 from DB.DBA.SYS_RDF_MAPPERS where RM_TYPE = \'URL\' and regexp_match (RM_PATTERN, new_origin_uri) and RM_ENABLED = 1))\n"
+"goto load_grddl;\n"
 "if (__proc_exists (\'DB.DBA.RDF_LOAD_POST_PROCESS\') and only_rdfa = 0)\n"
 "call (\'DB.DBA.RDF_LOAD_POST_PROCESS\') (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options);\n"
 "\n"
@@ -17182,9 +20388,24 @@ static const char *proc403 =
 "\n"
 "\n"
 "\n"
+"\n"
 "load_grddl:;\n"
+"if ((\'40001\' = __SQL_STATE) and (retr_count < 10))\n"
+"{\n"
+"rollback work;\n"
+"retr_count := retr_count + 1;\n"
+"goto retry_after_deadlock;\n"
+"}\n"
+"if (__proc_exists (\'DB.DBA.RDF_RUN_CARTRIDGES\') is not null)\n"
+"{\n"
+"rc := DB.DBA.RDF_RUN_CARTRIDGES (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options, ret_hdr, ps, aq, req_hdr_arr);\n"
+"if (rc)\n"
+"return rc;\n"
+"}\n"
+"else\n"
+"{\n"
 "cset := http_request_header (ret_hdr, \'Content-Type\', \'charset\', null);\n"
-"for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do\n"
+"for select RM_PATTERN, RM_TYPE, RM_HOOK, RM_KEY, RM_OPTIONS, RM_DESCRIPTION from DB.DBA.SYS_RDF_MAPPERS where RM_ENABLED = 1 order by RM_ID do\n"
 "{\n"
 "declare val_match, pcols, new_opts any;\n"
 "declare npars int;\n"
@@ -17219,6 +20440,8 @@ static const char *proc403 =
 "if (registry_get (\'__sparql_mappers_debug\') = \'1\')\n"
 "dbg_obj_prin1 (\'Match \', RM_HOOK);\n"
 "new_opts := vector_concat (options, RM_OPTIONS, vector (\'content-type\', ret_content_type, \'charset\', cset));\n"
+"if (__proc_exists (\'DB.DBA.RDF_SPONGER_STATUS\'))\n"
+"call (\'DB.DBA.RDF_SPONGER_STATUS\') (graph_iri, new_origin_uri, dest, RM_DESCRIPTION, options);\n"
 "if (RM_TYPE <> \'HTTP\')\n"
 "{\n"
 "if (npars = 7)\n"
@@ -17241,7 +20464,7 @@ static const char *proc403 =
 "}\n"
 "if (__tag(rc) = 193 or rc < 0 or rc > 0)\n"
 "{\n"
-"if (__proc_exists (\'DB.DBA.RDF_LOAD_POST_PROCESS\'))\n"
+"if (rc > 0 and __proc_exists (\'DB.DBA.RDF_LOAD_POST_PROCESS\'))\n"
 "call (\'DB.DBA.RDF_LOAD_POST_PROCESS\') (graph_iri, new_origin_uri, dest, ret_body, ret_content_type, options);\n"
 "if (__tag(rc) = 193)\n"
 "return rc;\n"
@@ -17250,6 +20473,7 @@ static const char *proc403 =
 "}\n"
 "try_next_mapper:;\n"
 "}\n"
+"}\n"
 "\n"
 "\n"
 "\n"
@@ -17261,7 +20485,7 @@ static const char *proc403 =
 "\n"
 "\n"
 "\n"
-"if (dest is null)\n"
+"if ((dest is null) and (get_soft is null or (get_soft <> \'add\')))\n"
 "{\n"
 "DB.DBA.SPARUL_CLEAR (graph_iri, 1, 0);\n"
 "commit work;\n"
@@ -17301,17 +20525,23 @@ static const char *proc403 =
 "load_grddl_after_error:\n"
 "first_stat := __SQL_STATE;\n"
 "first_msg := __SQL_MESSAGE;\n"
+"if ((\'40001\' = first_stat) and (retr_count < 10))\n"
+"{\n"
+"rollback work;\n"
+"retr_count := retr_count + 1;\n"
+"goto retry_after_deadlock;\n"
+"}\n"
 "goto load_grddl;\n"
 "}\n"
-"--src rdf_sponge.sql:1154\n";
+"--src rdf_sponge.sql:1212\n";
 
-static const char *proc404 = 
-"#line 1370 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc465 = 
+"#line 1458 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_FORGET_HTTP_RESPONSE (in graph_iri varchar, in new_origin_uri varchar, inout options any)\n"
 "{\n"
 "declare dest varchar;\n"
 "declare deadl int;\n"
-"deadl := atoi (coalesce (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'MaxDeadlockRetries\'), \'5\'));\n"
+"deadl := atoi (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'MaxDeadlockRetries\'), \'5\'));\n"
 "declare exit handler for sqlstate \'40001\'\n"
 "{\n"
 "deadl := deadl - 1;\n"
@@ -17328,16 +20558,16 @@ static const char *proc404 =
 "if (dest is null)\n"
 "DB.DBA.SPARUL_CLEAR (graph_iri, 1, 0);\n"
 "}\n"
-"--src rdf_sponge.sql:1368\n";
+"--src rdf_sponge.sql:1456\n";
 
-static const char *proc405 = 
-"#line 1393 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc466 = 
+"#line 1481 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_SPONGE_UP (in graph_iri varchar, in options any, in uid integer := -1)\n"
 "{\n"
 "declare aq, cookie varchar;\n"
 "declare dest, local_iri varchar;\n"
 "\n"
-"if (cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'AsyncQueue\') = \'0\')\n"
+"if (coalesce (virtuoso_ini_item_value (\'SPARQL\', \'AsyncQueue\'), \'0\') = \'0\' or get_keyword (\'__rdf_sponge_queue\', options) = 1)\n"
 "{\n"
 "return DB.DBA.RDF_SPONGE_UP_1 (graph_iri, options, uid);\n"
 "}\n"
@@ -17364,10 +20594,10 @@ static const char *proc405 =
 "local_iri := graph_iri;\n"
 "return local_iri;\n"
 "}\n"
-"--src rdf_sponge.sql:1391\n";
+"--src rdf_sponge.sql:1479\n";
 
-static const char *proc406 = 
-"#line 1427 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc467 = 
+"#line 1515 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_SPONGE_UP_1 (in graph_iri varchar, in options any, in uid integer := -1)\n"
 "{\n"
 "declare dest, get_soft, local_iri, immg, res_graph_iri, cookie varchar;\n"
@@ -17412,23 +20642,23 @@ static const char *proc406 =
 "\n"
 "}\n"
 "else\n"
-"if ((\'replacing\' = get_soft) or (\'replace\' = get_soft))\n"
+"if ((\'replacing\' = get_soft) or (\'replace\' = get_soft) or (\'add\' = get_soft))\n"
 "{\n"
 "\n"
 " ;\n"
 "}\n"
 "else\n"
 "signal (\'RDFZZ\', sprintf (\n"
-"\'This version of Virtuoso supports only \"soft\" and \"replacing\" values of \"define get:soft ...\", not \"%.500s\"\',\n"
+"\'This version of Virtuoso supports only \"soft\", \"replacing\" and \"add\" values of \"define get:soft ...\", not \"%.500s\"\',\n"
 "get_soft ) );\n"
-"if (not bit_and (perms, 8))\n"
+"if (not bit_and (perms, 4))\n"
 "{\n"
 "\n"
 "return null;\n"
 "}\n"
 "\n"
 "\n"
-"immg := cfg_item_value (virtuoso_ini_path (), \'SPARQL\', \'ImmutableGraphs\');\n"
+"immg := virtuoso_ini_item_value (\'SPARQL\', \'ImmutableGraphs\');\n"
 "if (immg is not null and user <> \'dba\')\n"
 "{\n"
 "immg := split_and_decode (immg, 0, \'\\0\\0,\');\n"
@@ -17491,10 +20721,10 @@ static const char *proc406 =
 "VT_INC_INDEX_DB_DBA_RDF_OBJ();\n"
 "return res_graph_iri;\n"
 "}\n"
-"--src rdf_sponge.sql:1425\n";
+"--src rdf_sponge.sql:1513\n";
 
-static const char *proc407 = 
-"#line 1552 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc468 = 
+"#line 1640 \"[executable]/rdf_sponge.sql\"\n"
 "create function DB.DBA.RDF_SPONGE_UP_LIST (in sources any)\n"
 "{\n"
 "declare need_reindex integer;\n"
@@ -17513,10 +20743,10 @@ static const char *proc407 =
 "VT_INC_INDEX_DB_DBA_RDF_OBJ();\n"
 "return 1;\n"
 "}\n"
-"--src rdf_sponge.sql:1550\n";
+"--src rdf_sponge.sql:1638\n";
 
-static const char *proc408 = 
-"#line 1573 \"[executable]/rdf_sponge.sql\"\n"
+static const char *proc469 = 
+"#line 1661 \"[executable]/rdf_sponge.sql\"\n"
 "create procedure DB.DBA.RDF_GRANT_SPONGE ()\n"
 "{\n"
 "declare state, msg varchar;\n"
@@ -17539,14 +20769,14 @@ static const char *proc408 =
 "exec (cmd, state, msg);\n"
 "}\n"
 "}\n"
-"--src rdf_sponge.sql:1571\n";
+"--src rdf_sponge.sql:1659\n";
 
 
-static const char *other44 = 
+static const char *other46 = 
 " DB.DBA.RDF_GRANT_SPONGE ()\n";
 /* rdf_schema_objects.sql */
 
-static const char *proc409 = 
+static const char *proc470 = 
 "#line 31 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_tbl_opts (in tbls any, in cols any)\n"
 "{\n"
@@ -17585,7 +20815,7 @@ static const char *proc409 =
 "}\n"
 "--src rdf_schema_objects.sql:29\n";
 
-static const char *proc410 = 
+static const char *proc471 = 
 "#line 68 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_tbl_pk_cols (inout tbls any, out pkcols any)\n"
 "{\n"
@@ -17611,6 +20841,8 @@ static const char *proc410 =
 "declare cols any;\n"
 "declare j int;\n"
 "newtb[i/2] := tbls[i];\n"
+"if (__tag (tbls [i + 1]) = 193)\n"
+"{\n"
 "cols := make_array (length (tbls [i + 1]), \'any\');\n"
 "j := 0;\n"
 "foreach (varchar c in tbls [i + 1]) do\n"
@@ -17621,6 +20853,11 @@ static const char *proc410 =
 "signal (\'22023\', sprintf (\'Non existing column %s for table %s\', c, tbls[i]));\n"
 "j := j + 1;\n"
 "}\n"
+"}\n"
+"else\n"
+"{\n"
+"cols := rdf_view_get_primary_key (tbls[i]);\n"
+"}\n"
 "pkcols[i] := tbls[i];\n"
 "pkcols[i+1] := cols;\n"
 "}\n"
@@ -17643,8 +20880,8 @@ static const char *proc410 =
 "}\n"
 "--src rdf_schema_objects.sql:66\n";
 
-static const char *proc411 = 
-"#line 124 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc472 = 
+"#line 131 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_ns_get (in cols any, in f int)\n"
 "{\n"
 "declare ses, dict, nss any;\n"
@@ -17666,10 +20903,10 @@ static const char *proc411 =
 "}\n"
 "return string_output_string (ses);\n"
 "}\n"
-"--src rdf_schema_objects.sql:122\n";
+"--src rdf_schema_objects.sql:129\n";
 
-static const char *proc412 = 
-"#line 147 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc473 = 
+"#line 154 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_ns_get_1 (in cols any, inout dict any)\n"
 "{\n"
 "declare class any;\n"
@@ -17691,33 +20928,44 @@ static const char *proc412 =
 "dict_put (dict, ns, uri);\n"
 "}\n"
 "}\n"
-"--src rdf_schema_objects.sql:145\n";
+"--src rdf_schema_objects.sql:152\n";
 
-static const char *proc413 = 
-"#line 170 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc474 = 
+"#line 177 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
-"RDF_VIEW_DROP_STMT (in qualifier varchar)\n"
+"RDF_VIEW_DROP_STMT_BY_GRAPH (in gr varchar)\n"
 "{\n"
 "declare drop_map any;\n"
-"declare  mask varchar;\n"
 "\n"
 "drop_map := \'\';\n"
-"mask := sprintf (\'http://%s/schemas/%s/qm-%%\', cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\'), qualifier);\n"
-"for select \"o\" from (sparql define input:storage \"\"\n"
-"select ?o from virtrdf:\n"
+"for select \"s\" from (sparql define input:storage \"\"\n"
+"select ?s from virtrdf:\n"
 "{\n"
-"virtrdf:DefaultQuadStorage-UserMaps ?p ?o .\n"
-"filter ( ?p != rdf:type && ?o like ?:mask)\n"
+"?s virtrdf:qmGraphRange-rvrFixedValue `iri(?:gr)` ; virtrdf:qmUserSubMaps ?t\n"
 "}) x do\n"
 "{\n"
-"drop_map := drop_map || sprintf (\'SPARQL drop silent quad map <%s> .;\\n\', \"o\");\n"
+"drop_map := drop_map || sprintf (\'SPARQL drop silent quad map <%s> .;\\n\', \"s\");\n"
 "}\n"
 "return drop_map;\n"
 "}\n"
-"--src rdf_schema_objects.sql:168\n";
+"--src rdf_schema_objects.sql:175\n";
 
-static const char *proc414 = 
-"#line 191 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc475 = 
+"#line 195 \"[executable]/rdf_schema_objects.sql\"\n"
+"create procedure\n"
+"RDF_VIEW_DROP_STMT (in qualifier varchar)\n"
+"{\n"
+"declare drop_map any;\n"
+"declare gr varchar;\n"
+"\n"
+"drop_map := \'\';\n"
+"gr := sprintf (\'http://%s/%s#\', virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'), qualifier);\n"
+"return RDF_VIEW_DROP_STMT_BY_GRAPH (gr);\n"
+"}\n"
+"--src rdf_schema_objects.sql:193\n";
+
+static const char *proc476 = 
+"#line 207 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "RDF_VIEW_FROM_TBL (in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any := null)\n"
 "{\n"
@@ -17730,7 +20978,7 @@ static const char *proc414 =
 "cols := rdf_view_tbl_opts (_tbls, cols);\n"
 "sparql_pref := \'SPARQL\\n\';\n"
 "uriqa_str := \'^{URIQADefaultHost}^\';\n"
-"sns := ns := sprintf (\'prefix %s: <http://%s/schemas/%s/> \\n\', qualifier, cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\'), qualifier);\n"
+"sns := ns := sprintf (\'prefix %s: <http://%s/schemas/%s/> \\n\', qualifier, virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'), qualifier);\n"
 "\n"
 "\n"
 "\n"
@@ -17740,7 +20988,7 @@ static const char *proc414 =
 "\n"
 "if (gen_stat)\n"
 "{\n"
-"ns := ns || sprintf (\'prefix %s-stat: <http://%s/%s/stat#> \\n\', lcase (qualifier), cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\'),\n"
+"ns := ns || sprintf (\'prefix %s-stat: <http://%s/%s/stat#> \\n\', lcase (qualifier), virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'),\n"
 "qualifier);\n"
 "ns := ns || \'prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \\n\';\n"
 "ns := ns || \'prefix void: <http://rdfs.org/ns/void#> \\n\';\n"
@@ -17811,19 +21059,19 @@ static const char *proc414 =
 "\n"
 "return create_class_stmt || \'\\n\\n\' || create_count_count || create_view_stmt;\n"
 "}\n"
-"--src rdf_schema_objects.sql:189\n";
+"--src rdf_schema_objects.sql:205\n";
 
-static const char *proc415 = 
-"#line 286 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc477 = 
+"#line 302 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_sp (in i int)\n"
 "{\n"
 "return repeat (\' \', i);\n"
 "}\n"
-"--src rdf_schema_objects.sql:284\n";
+"--src rdf_schema_objects.sql:300\n";
 
-static const char *proc416 = 
-"#line 293 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc478 = 
+"#line 309 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_sql_tb (in tb varchar)\n"
 "{\n"
 "declare q, o, n varchar;\n"
@@ -17832,10 +21080,10 @@ static const char *proc416 =
 "n := name_part (tb, 2);\n"
 "return sprintf (\'\"%I\".\"%I\".\"%I\"\', q, o, n);\n"
 "}\n"
-"--src rdf_schema_objects.sql:291\n";
+"--src rdf_schema_objects.sql:307\n";
 
-static const char *proc417 = 
-"#line 303 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc479 = 
+"#line 319 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_tb (in tb varchar)\n"
 "{\n"
 "declare r varchar;\n"
@@ -17843,18 +21091,18 @@ static const char *proc417 =
 "r := lower (r);\n"
 "return r;\n"
 "}\n"
-"--src rdf_schema_objects.sql:301\n";
+"--src rdf_schema_objects.sql:317\n";
 
-static const char *proc418 = 
-"#line 312 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc480 = 
+"#line 328 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_sql_col (in col varchar)\n"
 "{\n"
 "return sprintf (\'\"%I\"\', col);\n"
 "}\n"
-"--src rdf_schema_objects.sql:310\n";
+"--src rdf_schema_objects.sql:326\n";
 
-static const char *proc419 = 
-"#line 318 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc481 = 
+"#line 334 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_col (in col varchar)\n"
 "{\n"
 "declare r varchar;\n"
@@ -17862,19 +21110,19 @@ static const char *proc419 =
 "r := lower (r);\n"
 "return r;\n"
 "}\n"
-"--src rdf_schema_objects.sql:316\n";
+"--src rdf_schema_objects.sql:332\n";
 
-static const char *proc420 = 
-"#line 327 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc482 = 
+"#line 343 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_cls_name (in nam varchar)\n"
 "{\n"
 "\n"
 "return SYS_ALFANUM_NAME (nam);\n"
 "}\n"
-"--src rdf_schema_objects.sql:325\n";
+"--src rdf_schema_objects.sql:341\n";
 
-static const char *proc421 = 
-"#line 334 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc483 = 
+"#line 350 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_get_ns (in uri varchar, out uriSearch varchar)\n"
 "{\n"
 "declare delim integer;\n"
@@ -17916,10 +21164,10 @@ static const char *proc421 =
 "}\n"
 "return nsPrefix;\n"
 "}\n"
-"--src rdf_schema_objects.sql:332\n";
+"--src rdf_schema_objects.sql:348\n";
 
-static const char *proc422 = 
-"#line 377 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc484 = 
+"#line 393 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_uri_curie (in uri varchar)\n"
 "{\n"
 "declare delim integer;\n"
@@ -17948,10 +21196,10 @@ static const char *proc422 =
 "}\n"
 "return uri;\n"
 "}\n"
-"--src rdf_schema_objects.sql:375\n";
+"--src rdf_schema_objects.sql:391\n";
 
-static const char *proc423 = 
-"#line 407 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc485 = 
+"#line 423 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure rdf_view_col_type (in qual varchar, in col varchar, in opts any)\n"
 "{\n"
 "if (not length (opts))\n"
@@ -17959,10 +21207,10 @@ static const char *proc423 =
 "else\n"
 "return rdf_view_uri_curie (opts);\n"
 "}\n"
-"--src rdf_schema_objects.sql:405\n";
+"--src rdf_schema_objects.sql:421\n";
 
-static const char *proc424 = 
-"#line 416 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc486 = 
+"#line 432 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_create_view (in nth int, in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any, in pkcols any)\n"
 "{\n"
@@ -18023,9 +21271,9 @@ static const char *proc424 =
 "}\n"
 "inx := inx + 1;\n"
 "}\n"
-"if (exists (select top 1 1 from SYS_FOREIGN_KEYS where PK_TABLE = tbl and 0 < position (FK_TABLE, _tbls))\n"
+"if (exists (select top 1 1 from SYS_FOREIGN_KEYS where PK_TABLE = tbl and FK_TABLE <> tbl and 0 < position (FK_TABLE, _tbls))\n"
 "or\n"
-"exists (select top 1 1 from SYS_FOREIGN_KEYS where FK_TABLE = tbl and 0 < position (PK_TABLE, _tbls)))\n"
+"exists (select top 1 1 from SYS_FOREIGN_KEYS where FK_TABLE = tbl and PK_TABLE <> tbl and 0 < position (PK_TABLE, _tbls)))\n"
 "ret := ret || rdf_view_sp (6) || \'# Maps from foreign-key relations of \"\' || tbl || \'\"\\n\';\n"
 "ret := ret || rdf_view_get_fk_pk_rel (qualifier, suffix, tbl, _tbls, pkcols);\n"
 "ret := ret || rdf_view_get_pk_fk_rel (qualifier, suffix, tbl, _tbls, pkcols);\n"
@@ -18051,10 +21299,10 @@ static const char *proc424 =
 "ret := ret || \'    }\\n }\\n\';\n"
 "return ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:414\n";
+"--src rdf_schema_objects.sql:430\n";
 
-static const char *proc425 = 
-"#line 506 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc487 = 
+"#line 522 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_create_void_view (in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any, in pkcols any)\n"
 "{\n"
@@ -18083,7 +21331,7 @@ static const char *proc425 =
 "ret := ret || rdf_view_sp (6) || \'# voID Statistics \\n\';\n"
 "ret := ret || rdf_view_sp (6) || sprintf (\'%s-stat: a void:Dataset as %s:dataset-%s ; \\n\', pref_l, qualifier, qual_l);\n"
 "ret := ret || rdf_view_sp (6) || sprintf (\' void:sparqlEndpoint <http://%s/sparql> as %s:dataset-sparql-%s ; \\n\',\n"
-"cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\'), qualifier, qual_l);\n"
+"virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'), qualifier, qual_l);\n"
 "\n"
 "ret := ret || rdf_view_sp (6) ||	sprintf (\'void:statItem %s-stat:Stat . \\n\', pref_l);\n"
 "ret := ret || rdf_view_sp (6) || sprintf (\'%s-stat:Stat a scovo:Item ; \\n\', pref_l);\n"
@@ -18111,10 +21359,10 @@ static const char *proc425 =
 "ret := ret || \'    }\\n }\';\n"
 "return ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:504\n";
+"--src rdf_schema_objects.sql:520\n";
 
-static const char *proc426 = 
-"#line 564 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc488 = 
+"#line 580 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_get_pk_rel (in pref varchar, in suffix varchar, inout tbl varchar, in set_tb int, in  pkcols any)\n"
 "{\n"
@@ -18135,10 +21383,10 @@ static const char *proc426 =
 "tbl := tbl_name_l;\n"
 "return ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:562\n";
+"--src rdf_schema_objects.sql:578\n";
 
-static const char *proc427 = 
-"#line 586 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc489 = 
+"#line 602 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_get_bin_rel (in pref varchar, in suffix varchar, in tbl varchar, in col_name varchar, in pkcols any)\n"
 "{\n"
@@ -18157,10 +21405,10 @@ static const char *proc427 =
 "ret := sprintf (\'%s:%s_%s (%s) \', pref, rdf_view_tb (tbl_name_l), col_name, pk_text);\n"
 "return ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:584\n";
+"--src rdf_schema_objects.sql:600\n";
 
-static const char *proc428 = 
-"#line 606 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc490 = 
+"#line 622 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_get_fk_pk_rel (in pref varchar, in suffix varchar, in tbl varchar, in tbls any, in pkcols any)\n"
 "{\n"
@@ -18181,10 +21429,10 @@ static const char *proc428 =
 "}\n"
 "return string_output_string (ret);\n"
 "}\n"
-"--src rdf_schema_objects.sql:604\n";
+"--src rdf_schema_objects.sql:620\n";
 
-static const char *proc429 = 
-"#line 628 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc491 = 
+"#line 644 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_get_pk_fk_rel (in pref varchar, in suffix varchar, in tbl varchar, in tbls any, in pkcols any)\n"
 "{\n"
@@ -18205,10 +21453,10 @@ static const char *proc429 =
 "}\n"
 "return string_output_string (ret);\n"
 "}\n"
-"--src rdf_schema_objects.sql:626\n";
+"--src rdf_schema_objects.sql:642\n";
 
-static const char *proc430 = 
-"#line 650 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc492 = 
+"#line 666 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_dv_to_printf_str_type (in _dv varchar, in sc int)\n"
 "{\n"
@@ -18224,10 +21472,10 @@ static const char *proc430 =
 "else if (__tag of datetime = _dv or __tag of timestamp = _dv) return \'%1D\';\n"
 "signal (\'42000\', sprintf (\'The current implementation do no supports data type %s (%i) for IRI classes\', dv_type_title (_dv), _dv));\n"
 "}\n"
-"--src rdf_schema_objects.sql:648\n";
+"--src rdf_schema_objects.sql:664\n";
 
-static const char *proc431 = 
-"#line 667 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc493 = 
+"#line 683 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_dv_to_sql_str_type (in _dv varchar)\n"
 "{\n"
@@ -18243,10 +21491,10 @@ static const char *proc431 =
 "else if (__tag of nvarchar = _dv) return \'nvarchar\';\n"
 "signal (\'42000\', sprintf (\'The current implementation do no supports data type %s (%i) for IRI classes\', dv_type_title (_dv), _dv));\n"
 "}\n"
-"--src rdf_schema_objects.sql:665\n";
+"--src rdf_schema_objects.sql:681\n";
 
-static const char *proc432 = 
-"#line 684 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc494 = 
+"#line 700 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_dv_to_xsd_str_type (in _dv varchar)\n"
 "{\n"
@@ -18262,10 +21510,10 @@ static const char *proc432 =
 "else if (__tag of nvarchar = _dv) return \'string\';\n"
 "signal (\'42000\', sprintf (\'The current implementation do no supports data type %s (%i) for IRI classes\', dv_type_title (_dv), _dv));\n"
 "}\n"
-"--src rdf_schema_objects.sql:682\n";
+"--src rdf_schema_objects.sql:698\n";
 
-static const char *proc433 = 
-"#line 701 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc495 = 
+"#line 717 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_create_class (in decl varchar, in _tbl varchar, in _host varchar, in qualifier varchar, in cols any, in pkcols any)\n"
 "{\n"
@@ -18311,19 +21559,19 @@ static const char *proc433 =
 "}\n"
 "return ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:699\n";
+"--src rdf_schema_objects.sql:715\n";
 
-static const char *proc434 = 
-"#line 748 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc496 = 
+"#line 764 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_get_primary_key (in _tbl varchar)\n"
 "{\n"
 "return DB.DBA.REPL_PK_COLS (_tbl);\n"
 "}\n"
-"--src rdf_schema_objects.sql:746\n";
+"--src rdf_schema_objects.sql:762\n";
 
-static const char *proc435 = 
-"#line 755 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc497 = 
+"#line 771 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "rdf_view_get_relations (in _tbl varchar, in _tbls varchar, in _suff varchar)\n"
 "{\n"
@@ -18364,10 +21612,10 @@ static const char *proc435 =
 "}\n"
 "return ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:753\n";
+"--src rdf_schema_objects.sql:769\n";
 
-static const char *proc436 = 
-"#line 797 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc498 = 
+"#line 813 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "RDF_OWL_FROM_TBL (in qual varchar, in _tbls any, in cols any := null)\n"
 "{\n"
@@ -18377,7 +21625,7 @@ static const char *proc436 =
 "\n"
 "rdf_view_tbl_pk_cols (_tbls, pkcols);\n"
 "cols := rdf_view_tbl_opts (_tbls, cols);\n"
-"ns := sprintf (\'@prefix %s: <http://%s/schemas/%s/> .\\n\', qual, cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\'), qual);\n"
+"ns := sprintf (\'@prefix %s: <http://%s/schemas/%s/> .\\n\', qual, virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'), qual);\n"
 "ses := string_output ();\n"
 "http (\'@prefix owl: <http://www.w3.org/2002/07/owl#> .\\n\', ses);\n"
 "http (\'@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\\n\', ses);\n"
@@ -18460,10 +21708,10 @@ static const char *proc436 =
 "}\n"
 "return string_output_string (ses);\n"
 "}\n"
-"--src rdf_schema_objects.sql:795\n";
+"--src rdf_schema_objects.sql:811\n";
 
-static const char *proc437 = 
-"#line 891 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc499 = 
+"#line 907 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure RDF_VIEW_GEN_VD (in qual varchar)\n"
 "{\n"
 "declare ses, pref any;\n"
@@ -18544,7 +21792,7 @@ static const char *proc437 =
 "\n"
 "case when fct_installed\n"
 "then\n"
-"\'\'\'/describe/?url=http://^{URIQADefaultHost}^%U%%23this&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23\'\',\'\n"
+"\'\'\'/describe/?url=http%%3A//^{URIQADefaultHost}^%U%%23this&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23\'\',\'\n"
 "else\n"
 "\'\'\'/about/html/http://^{URIQADefaultHost}^%s\'\',\'\n"
 "end\n"
@@ -18567,7 +21815,7 @@ static const char *proc437 =
 "\n"
 "case when fct_installed\n"
 "then\n"
-"\'\'\'/describe/?url=http://^{URIQADefaultHost}^/<qual>/stat%%23&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23\'\',\'\n"
+"\'\'\'/describe/?url=http%%3A//^{URIQADefaultHost}^/<qual>/stat%%23&graph=http%%3A//^{URIQADefaultHost}^/<qual>%%23\'\',\'\n"
 "else\n"
 "\'\'\'/about/html/http://^{URIQADefaultHost}^/<qual>/stat%%01\'\',\'\n"
 "end\n"
@@ -18609,10 +21857,10 @@ static const char *proc437 =
 "ses := replace (ses, \'<qual>\', qual);\n"
 "return ses;\n"
 "}\n"
-"--src rdf_schema_objects.sql:889\n";
+"--src rdf_schema_objects.sql:905\n";
 
-static const char *proc438 = 
-"#line 1038 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc500 = 
+"#line 1054 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure RDF_OWL_GEN_VD (in qual varchar)\n"
 "{\n"
 "declare fct_installed int;\n"
@@ -18658,7 +21906,7 @@ static const char *proc438 =
 "1,\\n\',\n"
 "case when fct_installed\n"
 "then\n"
-"\'\'\'/describe/?url=http://^{URIQADefaultHost}^%U&graph=http%%3A//^{URIQADefaultHost}^/schemas/<qual>%%23\'\',\'\n"
+"\'\'\'/describe/?url=http://^{URIQADefaultHost}^%U\'\',\'\n"
 "else\n"
 "\'\'\'/about/html/http://^{URIQADefaultHost}^%s\'\',\'\n"
 "end,\n"
@@ -18682,10 +21930,10 @@ static const char *proc438 =
 "ses := replace (ses, \'<qual>\', qual);\n"
 "return ses;\n"
 "}\n"
-"--src rdf_schema_objects.sql:1036\n";
+"--src rdf_schema_objects.sql:1052\n";
 
-static const char *proc439 = 
-"#line 1109 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc501 = 
+"#line 1125 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
 "RDF_VIEW_CHECK_SYNC_TB (in tb varchar)\n"
 "{\n"
@@ -18697,26 +21945,50 @@ static const char *proc439 =
 "return 0;\n"
 "return 1;\n"
 "}\n"
-"--src rdf_schema_objects.sql:1107\n";
+"--src rdf_schema_objects.sql:1123\n";
 
-static const char *proc440 = 
-"#line 1122 \"[executable]/rdf_schema_objects.sql\"\n"
+static const char *proc502 = 
+"#line 1138 \"[executable]/rdf_schema_objects.sql\"\n"
+"create procedure\n"
+"RDF_VIEW_DO_SYNC (in qualifier varchar, in load_data int := 0, in pgraph varchar := null)\n"
+"{\n"
+"declare gr varchar;\n"
+"gr := sprintf (\'http://%s/%s#\', virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'), qualifier);\n"
+"return RDF_VIEW_SYNC_TO_PHYSICAL (gr, load_data, pgraph);\n"
+"}\n"
+"--src rdf_schema_objects.sql:1136\n";
+
+static const char *proc503 = 
+"#line 1147 \"[executable]/rdf_schema_objects.sql\"\n"
 "create procedure\n"
-"RDF_VIEW_DO_SYNC (in qualifier varchar, in load_data int := 0)\n"
+"RDF_VIEW_SYNC_TO_PHYSICAL (in vgraph varchar, in load_data int := 0, in pgraph varchar := null, in log_mode int := 1, in load_atomic int := 1)\n"
 "{\n"
 "declare mask varchar;\n"
-"declare txt, tbls, err_ret any;\n"
-"declare stat, msg varchar;\n"
+"declare txt, tbls, err_ret, opt any;\n"
+"declare stat, msg, gr varchar;\n"
+"declare old_mode int;\n"
+"\n"
+"old_mode := log_enable (log_mode, 1);\n"
+"declare exit handler for sqlstate \'*\' {\n"
+"log_enable (old_mode, 1);\n"
+"if (load_atomic)\n"
+"__atomic (0);\n"
+"};\n"
 "\n"
+"if (load_atomic)\n"
+"__atomic (1);\n"
 "tbls := vector ();\n"
 "err_ret := vector ();\n"
-"mask := sprintf (\'http://%s/schemas/%s/qm-%%\', cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\'), qualifier);\n"
+"opt := vector ();\n"
+"gr := vgraph;\n"
+"if (length (pgraph))\n"
+"opt := vector (gr, pgraph);\n"
 "for select \"o\" from\n"
 "(sparql define input:storage \"\" select ?o from virtrdf:\n"
 "{\n"
 "virtrdf:DefaultQuadStorage-UserMaps ?p ?o .\n"
 "?o a virtrdf:QuadMap  .\n"
-"filter (?o like ?:mask)\n"
+"?o virtrdf:qmGraphRange-rvrFixedValue `iri(?:gr)` .\n"
 "}\n"
 "order by asc (bif:sprintf_inverse (bif:concat (str(rdf:_), \"%d\"), str (?p), 1))) x do\n"
 "{\n"
@@ -18749,7 +22021,7 @@ static const char *proc440 =
 "{\n"
 "for (declare ctr int, ctr := 1; ctr <= 4; ctr := ctr + 1)\n"
 "{\n"
-"txt := sparql_rdb2rdf_codegen (tb, ctr);\n"
+"txt := sparql_rdb2rdf_codegen (tb, ctr, opt);\n"
 "stat := \'00000\';\n"
 "if (isvector (txt))\n"
 "{\n"
@@ -18779,13 +22051,137 @@ static const char *proc440 =
 "if (stat <> \'00000\') err_ret := vector_concat (err_ret, vector (sprintf (\'%s: %s\', stat, msg)));\n"
 "}\n"
 "}\n"
+"log_enable (old_mode, 1);\n"
+"if (load_atomic)\n"
+"{\n"
+"__atomic (0);\n"
+"exec (\'checkpoint\');\n"
+"}\n"
 "return err_ret;\n"
 "}\n"
-"--src rdf_schema_objects.sql:1120\n";
+"--src rdf_schema_objects.sql:1145\n";
+
+static const char *proc504 = 
+"#line 1251 \"[executable]/rdf_schema_objects.sql\"\n"
+"create procedure\n"
+"R2RML_FROM_TBL (in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any := null)\n"
+"{\n"
+"declare create_view_stmt, ns, sns any;\n"
+"declare total_select, total_tb, total, qual, pkcols any;\n"
+"declare vname, mask, graph, uriqa_str varchar;\n"
+"\n"
+"rdf_view_tbl_pk_cols (_tbls, pkcols);\n"
+"cols := rdf_view_tbl_opts (_tbls, cols);\n"
+"sns := ns := sprintf (\'@prefix rr: <http://www.w3.org/ns/r2rml#> .\\n at prefix %s: <http://%s/schemas/%s/> .\\n\', qualifier, virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'), qualifier);\n"
+"\n"
+"if (gen_stat)\n"
+"{\n"
+"ns := ns || sprintf (\'@prefix %s-stat: <http://%s/%s/stat#> .\\n\', lcase (qualifier), virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\'),\n"
+"qualifier);\n"
+"ns := ns || \'@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\\n\';\n"
+"ns := ns || \'@prefix void: <http://rdfs.org/ns/void#> .\\n\';\n"
+"ns := ns || \'@prefix scovo: <http://purl.org/NET/scovo#> .\\n\';\n"
+"}\n"
+"ns := ns || \'@prefix aowl: <http://bblfish.net/work/atom-owl/2006-06-06/> .\\n\';\n"
+"ns := ns || rdf_view_ns_get (cols, 1);\n"
+"ns := ns || \'\\n\';\n"
+"\n"
+"uriqa_str := registry_get (\'URIQADefaultHost\');\n"
+"graph := \'http://\' || uriqa_str || \'/\' || qualifier || \'#\';\n"
+"create_view_stmt := ns;\n"
+"for (declare inx int, inx := 0; inx < length (_tbls) ; inx := inx + 1)\n"
+"create_view_stmt := create_view_stmt || \'\\n\' || r2rml_create_dataset (inx, qualifier, _tbls, gen_stat, cols, pkcols, graph) || \'\';\n"
+"\n"
+"return create_view_stmt;\n"
+"}\n"
+"--src rdf_schema_objects.sql:1249\n";
+
+static const char *proc505 = 
+"#line 1284 \"[executable]/rdf_schema_objects.sql\"\n"
+"create procedure\n"
+"r2rml_create_dataset (in nth int, in qualifier varchar, in _tbls any, in gen_stat int := 0, in cols any, in pkcols any, in graph varchar := null)\n"
+"{\n"
+"declare ret, qual, qual_l, tbl_name, tbl_name_l, pks, pk_text, uriqa_str, graph_def any;\n"
+"declare suffix, tname, tbl, own, pref_l any;\n"
+"declare cols_arr, inx, col_name, owner, owner_l any;\n"
+"\n"
+"ret := \'\';\n"
+"suffix := \'_s\';\n"
+"uriqa_str := registry_get (\'URIQADefaultHost\');\n"
+"qual := name_part (_tbls[nth], 0);\n"
+"own := name_part (_tbls[nth], 1);\n"
+"qual_l := lcase (qual);\n"
+"pref_l := lcase (qualifier);\n"
+"tbl := _tbls[nth];\n"
+"cols_arr := get_keyword (tbl, cols);\n"
+"tbl_name := name_part (tbl, 2);\n"
+"owner := name_part (tbl, 1);\n"
+"tbl_name_l := rdf_view_tb (tbl_name);\n"
+"owner_l := rdf_view_tb (owner);\n"
+"tname := tbl_name_l || suffix;\n"
+"pks := get_keyword (tbl, pkcols); \n"
+"\n"
+"pk_text := \'\';\n"
+"for (declare i any, i := 0; i < length (pks) ; i := i + 1)\n"
+"pk_text := pk_text || sprintf (\'/{%s}\', pks[i][0]);\n"
+"\n"
+"if (graph is not null)   \n"
+"graph_def := sprintf (\'rr:graph <%s> \', graph);  \n"
+"else \n"
+"graph_def := \'\';  \n"
+"ret := ret || sprintf (\'<#TriplesMap%s> a rr:TriplesMap; rr:logicalTable [ rr:tableSchema \"%s\" ; rr:tableOwner \"%s\" ; rr:tableName \"%s\" ]; \\n\', tbl_name, qual, own, tbl_name);\n"
+"ret := ret || sprintf (\'rr:subjectMap [ rr:termtype \"IRI\"  ; rr:template \"http://%s/%s/%s%s\"; rr:class %s:%s; %s];\\n\', uriqa_str, qual, tbl_name_l, pk_text, qualifier, rdf_view_cls_name (tbl_name), graph_def);\n"
+"\n"
+"inx := 0;\n"
+"for select \"COLUMN\", COL_DTP from TABLE_COLS where \"TABLE\" = tbl order by COL_ID do\n"
+"{\n"
+"col_name := \"COLUMN\";\n"
+"if (not exists (select 1 from SYS_FOREIGN_KEYS where FK_TABLE = tbl and FKCOLUMN_NAME = col_name))\n"
+"ret := ret || sprintf (\'rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s ] ; rr:objectMap [ rr:column \"%s\" ]; ] ;\\n\', \n"
+"qualifier, lower (col_name), col_name);\n"
+"inx := inx + 1;\n"
+"}\n"
+"for select distinct PK_TABLE as pkt from SYS_FOREIGN_KEYS where FK_TABLE = tbl and PK_TABLE <> tbl do\n"
+"{\n"
+"pk_text := \'\';\n"
+"for select FKCOLUMN_NAME from SYS_FOREIGN_KEYS where FK_TABLE = tbl and PK_TABLE = pkt order by KEY_SEQ do\n"
+"{\n"
+"pk_text := pk_text || sprintf (\'/{%s}\', FKCOLUMN_NAME);\n"
+"}\n"
+"ret := ret || sprintf (\'rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s_has_%s ] ; rr:objectMap [ rr:termtype \"IRI\" ; rr:template \"http://%s/%s/%s%s\" ]; ] ;\\n\',\n"
+"qualifier, tbl_name_l, lower (name_part (pkt, 3)), uriqa_str, qual, lower (name_part (pkt, 3)), pk_text);\n"
+"}\n"
+"\n"
+"for select distinct FK_TABLE as fkt from SYS_FOREIGN_KEYS where PK_TABLE = tbl and position (FK_TABLE, _tbls)  do\n"
+"{\n"
+"declare jc varchar;\n"
+"jc := \'\';\n"
+"pk_text := \'\';\n"
+"for select FKCOLUMN_NAME, PKCOLUMN_NAME from SYS_FOREIGN_KEYS where FK_TABLE = fkt and PK_TABLE = tbl order by KEY_SEQ do\n"
+"{\n"
+"jc := jc || sprintf (\' rr:joinCondition [ rr:child \"%s\" ; rr:parent \"%s\" ] ;\', FKCOLUMN_NAME, PKCOLUMN_NAME); \n"
+"pk_text := pk_text || sprintf (\'/{%s}\', FKCOLUMN_NAME);\n"
+"}\n"
+"if (tbl <> fkt)\n"
+"{ \n"
+"ret := ret || sprintf (\'rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s_of_%s ] ; rr:objectMap [ rr:parentTriplesMap <#TriplesMap%s>; %s ]; ] ;\\n\',\n"
+"qualifier, tbl_name_l, lower (name_part (fkt, 3)), name_part (fkt, 3), jc);\n"
+"}\n"
+"else\n"
+"{\n"
+"ret := ret || sprintf (\'rr:predicateObjectMap [ rr:predicateMap [ rr:constant %s:%s_has_%s ] ; rr:objectMap [ rr:termtype \"IRI\" ; rr:template \"http://%s/%s/%s%s\" ]; ] ;\\n\',\n"
+"qualifier, tbl_name_l, lower (name_part (fkt, 3)), uriqa_str, qual, lower (name_part (fkt, 3)), pk_text);\n"
+"}\n"
+"}\n"
+"\n"
+"ret := rtrim (ret, \';\\n\') || \'.\\n\'; \n"
+"return ret;\n"
+"}\n"
+"--src rdf_schema_objects.sql:1282\n";
 
 /* rdf_void.sql */
 
-static const char *tbl21 = 
+static const char *tbl22 = 
 "create table DB.DBA.RDF_VOID_GRAPH (\n"
 "RVG_IID IRI_ID not null primary key,\n"
 "RVG_IRI varchar not null,\n"
@@ -18794,7 +22190,7 @@ static const char *tbl21 =
 "alter index RDF_VOID_GRAPH on DB.DBA.RDF_VOID_GRAPH partition cluster replicated\n"
 "create index RDF_VOID_GRAPH_IRI on DB.DBA.RDF_VOID_GRAPH (RVG_IRI) partition cluster replicated\n";
 
-static const char *tbl22 = 
+static const char *tbl23 = 
 "create table DB.DBA.RDF_VOID_GRAPH_MEMBER (\n"
 "RVGM_GROUP_IID IRI_ID not null,\n"
 "RVGM_MEMBER_IID IRI_ID not null,\n"
@@ -18802,7 +22198,7 @@ static const char *tbl22 =
 ")\n"
 "alter index RDF_VOID_GRAPH_MEMBER on DB.DBA.RDF_VOID_GRAPH_MEMBER partition cluster replicated\n";
 
-static const char *proc441 = 
+static const char *proc506 = 
 "#line 43 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_INIT ()\n"
 "{\n"
@@ -18813,9 +22209,9 @@ static const char *proc441 =
 "}\n"
 "--src rdf_void.sql:41\n";
 
-static const char *other45 = 
+static const char *other47 = 
 "RDF_VOID_INIT ()\n";
-static const char *proc442 = 
+static const char *proc507 = 
 "#line 55 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_SPLIT_IRI (in rel varchar, out pref varchar, out name varchar)\n"
 "{\n"
@@ -18830,7 +22226,7 @@ static const char *proc442 =
 "}\n"
 "--src rdf_void.sql:53\n";
 
-static const char *proc443 = 
+static const char *proc508 = 
 "#line 68 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_STORE (in graph varchar, in to_graph_name varchar := null, in src varchar := null)\n"
 "{\n"
@@ -18843,7 +22239,7 @@ static const char *proc443 =
 "ses := src;\n"
 "if (to_graph_name is null)\n"
 "{\n"
-"host := cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\');\n"
+"host := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "to_graph_name := \'http://\' || host || \'/stats/void#\';\n"
 "}\n"
 "exec (sprintf (\'sparql delete from <%s> { ?s1 ?p1 ?s2 } from <%s> where { <%s#Dataset> void:statItem ?s1 . ?s1 ?p1 ?s2 }\',\n"
@@ -18853,7 +22249,7 @@ static const char *proc443 =
 "}\n"
 "--src rdf_void.sql:66\n";
 
-static const char *proc444 = 
+static const char *proc509 = 
 "#line 89 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_ALL_GEN (in target_graph varchar, in details int := 0)\n"
 "{\n"
@@ -18868,7 +22264,7 @@ static const char *proc444 =
 "if (is_http_ctx ())\n"
 "host := http_request_header(http_request_header (), \'Host\', null, null);\n"
 "if (host is null)\n"
-"host := cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\');\n"
+"host := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "if (host is null)\n"
 "{\n"
 "hf := WS.WS.PARSE_URI (target_graph);\n"
@@ -18918,7 +22314,7 @@ static const char *proc444 =
 "}\n"
 "--src rdf_void.sql:87\n";
 
-static const char *proc445 = 
+static const char *proc510 = 
 "#line 152 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_NS (inout ses any)\n"
 "{\n"
@@ -18931,7 +22327,7 @@ static const char *proc445 =
 "}\n"
 "--src rdf_void.sql:150\n";
 
-static const char *proc446 = 
+static const char *proc511 = 
 "#line 163 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_GEN (in graph varchar, in gr_name varchar := null)\n"
 "{\n"
@@ -18946,7 +22342,7 @@ static const char *proc446 =
 "}\n"
 "--src rdf_void.sql:161\n";
 
-static const char *proc447 = 
+static const char *proc512 = 
 "#line 176 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_DIST_O_SRV (in graph any)\n"
 "{\n"
@@ -18956,7 +22352,7 @@ static const char *proc447 =
 "}\n"
 "--src rdf_void.sql:174\n";
 
-static const char *proc448 = 
+static const char *proc513 = 
 "#line 184 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_DIST_O (in graph varchar)\n"
 "{\n"
@@ -18979,7 +22375,7 @@ static const char *proc448 =
 "}\n"
 "--src rdf_void.sql:182\n";
 
-static const char *proc449 = 
+static const char *proc514 = 
 "#line 205 \"[executable]/rdf_void.sql\"\n"
 "create procedure RDF_VOID_GEN_1 (in graph varchar, in gr_name varchar := null,\n"
 "in ns_pref varchar := \'this\', in this_ns varchar := \'\',\n"
@@ -18995,7 +22391,7 @@ static const char *proc449 =
 "if (is_http_ctx ())\n"
 "host := http_request_header(http_request_header (), \'Host\', null, null);\n"
 "if (host is null)\n"
-"host := cfg_item_value(virtuoso_ini_path(), \'URIQA\',\'DefaultHost\');\n"
+"host := virtuoso_ini_item_value (\'URIQA\',\'DefaultHost\');\n"
 "\n"
 "\n"
 "\n"
@@ -19118,7 +22514,7 @@ static const char *proc449 =
 
 /* rdflddir2.sql */
 
-static const char *tbl23 = 
+static const char *tbl24 = 
 "create table DB.DBA.LOAD_LIST (\n"
 "ll_file varchar,\n"
 "ll_graph varchar,\n"
@@ -19132,13 +22528,13 @@ static const char *tbl23 =
 "alter index LOAD_LIST on DB.DBA.LOAD_LIST partition (ll_file varchar)\n"
 "create index LL_STATE on DB.DBA.LOAD_LIST (ll_state, ll_file, ll_graph) partition (ll_state int)\n";
 
-static const char *tbl24 = 
+static const char *tbl25 = 
 "create table LDLOCK (id int primary key)\n"
 "alter index LDLOCK on LDLOCK partition (id int)\n";
 
-static const char *other46 = 
+static const char *other48 = 
 "insert soft DB.DBA.LDLOCK values (0)\n";
-static const char *proc450 = 
+static const char *proc515 = 
 "#line 47 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "ld_dir (in path varchar, in mask varchar, in graph varchar)\n"
@@ -19177,7 +22573,7 @@ static const char *proc450 =
 "}\n"
 "--src rdflddir2.sql:45\n";
 
-static const char *proc451 = 
+static const char *proc516 = 
 "#line 85 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "rdf_read_dir (in path varchar, in mask varchar, in graph varchar)\n"
@@ -19186,7 +22582,7 @@ static const char *proc451 =
 "}\n"
 "--src rdflddir2.sql:83\n";
 
-static const char *proc452 = 
+static const char *proc517 = 
 "#line 93 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "ld_dir_all (in path varchar, in mask varchar, in graph varchar)\n"
@@ -19211,7 +22607,7 @@ static const char *proc452 =
 "}\n"
 "--src rdflddir2.sql:91\n";
 
-static const char *proc453 = 
+static const char *proc518 = 
 "#line 116 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "ld_add (in _fname varchar, in _graph varchar)\n"
@@ -19228,18 +22624,34 @@ static const char *proc453 =
 "}\n"
 "--src rdflddir2.sql:114\n";
 
-static const char *proc454 = 
+static const char *proc519 = 
 "#line 131 \"[executable]/rdflddir2.sql\"\n"
-"create procedure ld_ttlp_flags (in fname varchar)\n"
+"create procedure ld_ttlp_flags (in fname varchar, in opt varchar)\n"
+"{\n"
+"if (fname like \'%/btc-20%\' or fname like \'%.nq%\' or fname like \'%.n4\')\n"
 "{\n"
-"if (fname like \'%/btc-2009%\' or fname like \'%.nq%\' or fname like \'%.n4\')\n"
+"if (lower (opt) = \'with_delete\')\n"
+"return 255 + 512 + 2048;\n"
 "return 255 + 512;\n"
+"}\n"
+"if (fname like \'%.trig\' or fname like \'%.trig.gz\')\n"
+"return 255 + 256;\n"
 "return 255;\n"
 "}\n"
 "--src rdflddir2.sql:129\n";
 
-static const char *proc455 = 
-"#line 139 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc520 = 
+"#line 145 \"[executable]/rdflddir2.sql\"\n"
+"create procedure ld_is_rdfxml (in f any)\n"
+"{\n"
+"if (f like \'%.xml\' or f like \'%.owl\' or f like \'%.rdf\' or f like \'%.rdfs\')\n"
+"return 1;\n"
+"return 0;\n"
+"}\n"
+"--src rdflddir2.sql:143\n";
+
+static const char *proc521 = 
+"#line 153 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "ld_file (in f varchar, in graph varchar)\n"
 "{\n"
@@ -19270,25 +22682,25 @@ static const char *proc455 =
 "else if (f like \'%.gz\')\n"
 "{\n"
 "gzip_name := regexp_replace (f, \'\\.gz\\x24\', \'\');\n"
-"if (gzip_name like \'%.xml\' or gzip_name like \'%.owl\' or gzip_name like \'%.rdf\')\n"
+"if (ld_is_rdfxml (gzip_name))\n"
 "DB.DBA.RDF_LOAD_RDFXML (gz_file_open (f), graph, graph);\n"
 "else\n"
-"TTLP (gz_file_open (f), graph, graph, ld_ttlp_flags (gzip_name));\n"
+"TTLP (gz_file_open (f), graph, graph, ld_ttlp_flags (gzip_name, graph));\n"
 "}\n"
 "else\n"
 "{\n"
-"if (f like \'%.xml\' or f like \'%.owl\' or f like \'%.rdf\')\n"
+"if (ld_is_rdfxml (f))\n"
 "DB.DBA.RDF_LOAD_RDFXML (file_open (f), graph, graph);\n"
 "else\n"
-"TTLP (file_open (f), graph, graph, ld_ttlp_flags (f));\n"
+"TTLP (file_open (f), graph, graph, ld_ttlp_flags (f, graph));\n"
 "}\n"
 "\n"
 "\n"
 "}\n"
-"--src rdflddir2.sql:137\n";
+"--src rdflddir2.sql:151\n";
 
-static const char *proc456 = 
-"#line 186 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc522 = 
+"#line 200 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "rdf_load_dir (in path varchar,\n"
 "in mask varchar := \'%.nt\',\n"
@@ -19302,52 +22714,58 @@ static const char *proc456 =
 "\n"
 "rdf_loader_run ();\n"
 "}\n"
-"--src rdflddir2.sql:184\n";
+"--src rdflddir2.sql:198\n";
 
-static const char *proc457 = 
-"#line 202 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc523 = 
+"#line 216 \"[executable]/rdflddir2.sql\"\n"
 "create procedure ld_array ()\n"
 "{\n"
-"declare first, last, arr, len, local any;\n"
+"declare first, last, arr, fs, len, local any;\n"
 "declare cr cursor for\n"
-"select top 100 LL_FILE, LL_GRAPH\n"
+"select top 200 LL_FILE, LL_GRAPH\n"
 "from DB.DBA.LOAD_LIST table option (index ll_state)\n"
 "where LL_STATE = 0\n"
 "for update;\n"
-"declare fill int;\n"
+"declare fill, inx int;\n"
 "declare f, g varchar;\n"
 "declare r any;\n"
 "whenever not found goto done;\n"
 "first := 0;\n"
 "last := 0;\n"
 "arr := make_array (100, \'any\');\n"
-"fill := 0;\n"
+"fs  := make_array (100, \'any\');\n"
+"fill := 0; inx := 0;\n"
 "open cr;\n"
 "len := 0;\n"
 "for (;;)\n"
 "{\n"
 "fetch cr into f, g;\n"
+"inx := inx + 1;\n"
+"if (file_stat (f, 1) = 0)\n"
+"goto next;\n"
 "if (0 = first) first := f;\n"
 "last := f;\n"
 "arr[fill] := vector (f, g);\n"
+"fs[fill] := f;\n"
 "len := len + cast (file_stat (f, 1) as int);\n"
 "fill := fill + 1;\n"
 "if (len > 2000000 or fill >= 100)\n"
 "goto done;\n"
+"next:;\n"
 "}\n"
 "done:\n"
 "if (0 = first)\n"
 "return 0;\n"
 "if (1 <> sys_stat (\'cl_run_local_only\'))\n"
 "local := sys_stat (\'cl_this_host\');\n"
-"update load_list set ll_state = 1, ll_started = curdatetime (), LL_HOST = local\n"
-"where ll_file >= first and ll_file <= last;\n"
+"update load_list set ll_state = 1, ll_started = curdatetime (), LL_HOST = local where ll_file in (fs);\n"
+"close cr;\n"
 "return arr;\n"
 "}\n"
-"--src rdflddir2.sql:200\n";
+"--src rdflddir2.sql:214\n";
 
-static const char *proc458 = 
-"#line 242 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc524 = 
+"#line 262 \"[executable]/rdflddir2.sql\"\n"
 "create procedure\n"
 "rdf_loader_run (in max_files integer := null, in log_enable int := 2)\n"
 "{\n"
@@ -19433,10 +22851,10 @@ static const char *proc458 =
 "return;\n"
 "\n"
 "}\n"
-"--src rdflddir2.sql:240\n";
+"--src rdflddir2.sql:260\n";
 
-static const char *proc459 = 
-"#line 329 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc525 = 
+"#line 349 \"[executable]/rdflddir2.sql\"\n"
 "create procedure rdf_load_stop (in force int := 0)\n"
 "{\n"
 "insert into DB.DBA.LOAD_LIST (LL_FILE) values (\'##stop\');\n"
@@ -19444,18 +22862,18 @@ static const char *proc459 =
 "if (force)\n"
 "cl_exec (\'txn_killall (1)\');\n"
 "}\n"
-"--src rdflddir2.sql:327\n";
+"--src rdflddir2.sql:347\n";
 
-static const char *proc460 = 
-"#line 339 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc526 = 
+"#line 359 \"[executable]/rdflddir2.sql\"\n"
 "create procedure RDF_LOADER_RUN_1 (in x int, in y int)\n"
 "{\n"
 "rdf_loader_run (x, y);\n"
 "}\n"
-"--src rdflddir2.sql:337\n";
+"--src rdflddir2.sql:357\n";
 
-static const char *proc461 = 
-"#line 345 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc527 = 
+"#line 365 \"[executable]/rdflddir2.sql\"\n"
 "create procedure rdf_ld_srv (in log_enable int := 2)\n"
 "{\n"
 "declare aq any;\n"
@@ -19463,10 +22881,10 @@ static const char *proc461 =
 "aq_request (aq, \'DB.DBA.RDF_LOADER_RUN_1\', vector (null, log_enable));\n"
 "aq_wait_all (aq);\n"
 "}\n"
-"--src rdflddir2.sql:343\n";
+"--src rdflddir2.sql:363\n";
 
-static const char *proc462 = 
-"#line 355 \"[executable]/rdflddir2.sql\"\n"
+static const char *proc528 = 
+"#line 375 \"[executable]/rdflddir2.sql\"\n"
 "create procedure load_grdf (in f varchar)\n"
 "{\n"
 "declare line any;\n"
@@ -19490,26 +22908,28 @@ static const char *proc462 =
 "inx := inx + 1;\n"
 "}\n"
 "}\n"
-"--src rdflddir2.sql:353\n";
+"--src rdflddir2.sql:373\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -19523,23 +22943,27 @@ sqls_define_sparql (void)
   /* sparql.sql */
 
   ddl_ensure_table ("DB.DBA.RDF_QUAD", tbl0);
+  ddl_ensure_table ("DB.DBA.RDF_QUAD_RECOV_TMP", tbl1);
   DEFINE_PROC ("DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE", proc0);
   DEFINE_PROC ("DB.DBA.RDF_MAKE_IID_OF_QNAME_COMP", proc1);
   DEFINE_PROC ("DB.DBA.RDF_QNAME_OF_IID", proc2);
-  ddl_ensure_table ("DB.DBA.RDF_OBJ", tbl1);
-  ddl_ensure_table ("DB.DBA.RO_START", tbl2);
-  ddl_ensure_table ("DB.DBA.RDF_DATATYPE", tbl3);
-  ddl_ensure_table ("DB.DBA.RDF_LANGUAGE", tbl4);
-  ddl_ensure_table ("DB.DBA.SYS_SPARQL_HOST", tbl5);
-  ddl_ensure_table ("DB.DBA.RDF_OBJ_FT_RULES", tbl6);
-  ddl_ensure_table ("DB.DBA.SYS_SPARQL_SW_LOG", tbl7);
-  ddl_ensure_table ("DB.DBA.SYS_XML_PERSISTENT_NS_DECL", tbl8);
-  ddl_ensure_table ("DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH", tbl9);
-  ddl_ensure_table ("DB.DBA.RDF_GEO", tbl10);
-  ddl_ensure_table ("DB.DBA.RDF_LABEL", tbl11);
-  ddl_ensure_table ("DB.DBA.RDF_QUAD_DELETE_QUEUE", tbl12);
-  ddl_ensure_table ("DB.DBA.SYS_FAKE_0", tbl13);
-  ddl_ensure_table ("DB.DBA.SYS_FAKE_1", tbl14);
+  ddl_ensure_table ("do this always", other0);
+  ddl_ensure_table ("do this always", other1);
+  ddl_ensure_table ("do this always", other2);
+  ddl_ensure_table ("DB.DBA.RDF_OBJ", tbl2);
+  ddl_ensure_table ("DB.DBA.RO_START", tbl3);
+  ddl_ensure_table ("DB.DBA.RDF_DATATYPE", tbl4);
+  ddl_ensure_table ("DB.DBA.RDF_LANGUAGE", tbl5);
+  ddl_ensure_table ("DB.DBA.SYS_SPARQL_HOST", tbl6);
+  ddl_ensure_table ("DB.DBA.RDF_OBJ_FT_RULES", tbl7);
+  ddl_ensure_table ("DB.DBA.SYS_SPARQL_SW_LOG", tbl8);
+  ddl_ensure_table ("DB.DBA.SYS_XML_PERSISTENT_NS_DECL", tbl9);
+  ddl_ensure_table ("DB.DBA.RDF_EXPLICITLY_CREATED_GRAPH", tbl10);
+  ddl_ensure_table ("DB.DBA.RDF_GEO", tbl11);
+  ddl_ensure_table ("DB.DBA.RDF_LABEL", tbl12);
+  ddl_ensure_table ("DB.DBA.RDF_QUAD_DELETE_QUEUE", tbl13);
+  ddl_ensure_table ("DB.DBA.SYS_IDONLY_EMPTY", tbl14);
+  ddl_ensure_table ("DB.DBA.SYS_IDONLY_ONE", tbl15);
   ddl_ensure_table ("do this always", other3);
   ddl_ensure_table ("do this always", other4);
   ddl_ensure_table ("do this always", other5);
@@ -19600,472 +23024,539 @@ sqls_define_sparql (void)
   DEFINE_PROC ("DB.DBA.RDF_QNAME_OF_OBJ", proc48);
   DEFINE_PROC ("DB.DBA.RDF_STRSQLVAL_OF_OBJ", proc49);
   DEFINE_PROC ("DB.DBA.RDF_OBJ_OF_LONG", proc50);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_OF_LONG", proc51);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_OF_SQLVAL", proc52);
-  DEFINE_PROC ("DB.DBA.RDF_MAKE_LONG_OF_SQLVAL", proc53);
-  DEFINE_PROC ("DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL", proc54);
-  DEFINE_PROC ("DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS", proc55);
-  DEFINE_PROC ("DB.DBA.RDF_QNAME_OF_LONG_SAFE", proc56);
-  DEFINE_PROC ("DB.DBA.RDF_SQLVAL_OF_LONG", proc57);
-  DEFINE_PROC ("DB.DBA.RDF_BOOL_OF_LONG", proc58);
-  DEFINE_PROC ("DB.DBA.RDF_DATATYPE_OF_LONG", proc59);
-  DEFINE_PROC ("DB.DBA.RDF_DATATYPE_IRI_OF_LONG", proc60);
-  DEFINE_PROC ("DB.DBA.RDF_LANGUAGE_OF_LONG", proc61);
-  DEFINE_PROC ("DB.DBA.RDF_STRSQLVAL_OF_LONG", proc62);
-  DEFINE_PROC ("DB.DBA.RDF_WIDESTRSQLVAL_OF_LONG", proc63); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DATATYPE_OF_SQLVAL", proc64);
-  DEFINE_PROC ("DB.DBA.RDF_LONG_OF_SQLVAL", proc65); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_STRSQLVAL_OF_SQLVAL", proc66); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_LANGUAGE_OF_SQLVAL", proc67); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_BLANK_REF", proc68); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_URI_REF", proc69); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_REF", proc70); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_LITERAL", proc71); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#boolean", proc72); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#date", proc73); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#dateTime", proc74); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#double", proc75); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#float", proc76); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#integer", proc77); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#int", proc78); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#time", proc79); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#string", proc80); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.__and", proc81); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.__or", proc82); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.__not", proc83);
-  DEFINE_PROC ("DB.DBA.RDF_QUAD_URI", proc84);
-  DEFINE_PROC ("DB.DBA.RDF_QUAD_URI_L", proc85);
-  DEFINE_PROC ("DB.DBA.RDF_QUAD_URI_L_TYPED", proc86);
-  DEFINE_PROC ("DB.DBA.RDF_QUAD_L_RDB2RDF", proc87);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_NEW_GRAPH", proc88);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_NEW_BLANK", proc89);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_GET_IID", proc90);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE", proc91);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L", proc92);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_COMMIT", proc93);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_REPORT_DEFAULT", proc94);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_XLAT", proc95);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_XLAT", proc96); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.TTLP_XLAT_CONCAT", proc97);
-  DEFINE_PROC ("DB.DBA.TTLP", proc98);
-  DEFINE_PROC ("DB.DBA.TTLP_WITH_IRI_TRANSLATION", proc99);
-  DEFINE_PROC ("DB.DBA.TTLP_VALIDATE", proc100);
-  DEFINE_PROC ("DB.DBA.TTLP_VALIDATE_LOCAL_FILE", proc101);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH", proc102);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK", proc103);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_GET_IID", proc104);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE", proc105);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L", proc106);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH", proc107);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH_EXEC_GET_IID", proc108);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH_EXEC_TRIPLE", proc109);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH_EXEC_TRIPLE_L", proc110);
-  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH", proc111);
-  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFXML", proc112);
-  DEFINE_PROC ("DB.DBA.RDF_RDFXML_TO_DICT", proc113);
-  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFA", proc114);
-  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION", proc115);
-  DEFINE_PROC ("DB.DBA.RDF_RDFA_TO_DICT", proc116); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_XML_IRI_TO_TTL", proc117); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_XML_OBJ_TO_TTL", proc118); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_NEW_BLANK", proc119); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_TRIPLE", proc120); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_TRIPLE_L", proc121); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL", proc122); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_FILE_TO_TTL_FILE", proc123);
-  DEFINE_PROC ("DB.DBA.RDF_LONG_TO_TTL", proc124);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_VERBOSE_TTL", proc125);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_TTL", proc126);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_NT", proc127);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_TO_TTL", proc128);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT", proc129);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_TALIS_JSON", proc130);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_JSON", proc131);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_CSV", proc132);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML", proc133);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ATOM_XML", proc134);
-  DEFINE_PROC ("DB.DBA.ODATA_EDM_TYPE", proc135);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ODATA_JSON", proc136);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_ODATA_JSON", proc137);
-  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT", proc138);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_INIT", proc139);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_ACC", proc140);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_FIN", proc141);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_OF_SQLVAL", proc51);
+  DEFINE_PROC ("DB.DBA.RDF_MAKE_LONG_OF_SQLVAL", proc52);
+  DEFINE_PROC ("DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL", proc53);
+  DEFINE_PROC ("DB.DBA.RDF_MAKE_LONG_OF_TYPEDSQLVAL_STRINGS", proc54);
+  DEFINE_PROC ("DB.DBA.RDF_QNAME_OF_LONG_SAFE", proc55);
+  DEFINE_PROC ("DB.DBA.RDF_SQLVAL_OF_LONG", proc56);
+  DEFINE_PROC ("DB.DBA.RDF_BOOL_OF_LONG", proc57);
+  DEFINE_PROC ("DB.DBA.RDF_DATATYPE_OF_LONG", proc58);
+  DEFINE_PROC ("DB.DBA.RDF_DATATYPE_IRI_OF_LONG", proc59);
+  DEFINE_PROC ("DB.DBA.RDF_STRSQLVAL_OF_LONG", proc60);
+  DEFINE_PROC ("DB.DBA.RDF_WIDESTRSQLVAL_OF_LONG", proc61); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DATATYPE_OF_SQLVAL", proc62);
+  DEFINE_PROC ("DB.DBA.RDF_LONG_OF_SQLVAL", proc63); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_STRSQLVAL_OF_SQLVAL", proc64); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_LANGUAGE_OF_SQLVAL", proc65); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_BLANK_REF", proc66); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_URI_REF", proc67); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_REF", proc68); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_IS_LITERAL", proc69); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#boolean", proc70); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#date", proc71); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#dateTime", proc72); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#double", proc73); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#float", proc74); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#integer", proc75); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#int", proc76); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#time", proc77); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.http://www.w3.org/2001/XMLSchema#string", proc78); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.__and", proc79); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.__or", proc80); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.__not", proc81);
+  DEFINE_PROC ("DB.DBA.rdf_strdt_impl", proc82);
+  DEFINE_PROC ("DB.DBA.rdf_strlang_impl", proc83); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.rdf_replace_impl", proc84); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.regexp_xfn_replace", proc85); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.rdf_timezone_impl", proc86); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.rdf_tz_impl", proc87);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_URI", proc88);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_URI_L", proc89);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_URI_L_TYPED", proc90);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_L_RDB2RDF", proc91);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_NEW_GRAPH", proc92);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_NEW_BLANK", proc93);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_GET_IID", proc94);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE", proc95);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L", proc96);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_COMMIT", proc97);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_REPORT_DEFAULT", proc98);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_XLAT", proc99);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_XLAT", proc100); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.TTLP_XLAT_CONCAT", proc101);
+  DEFINE_PROC ("DB.DBA.TTLP", proc102);
+  DEFINE_PROC ("DB.DBA.TTLP_WITH_IRI_TRANSLATION", proc103);
+  DEFINE_PROC ("DB.DBA.TTLP_VALIDATE", proc104);
+  DEFINE_PROC ("DB.DBA.TTLP_VALIDATE_LOCAL_FILE", proc105);
+  DEFINE_PROC ("DB.DBA.RDF_VALIDATE_RDFXML", proc106);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_NEW_GRAPH", proc107);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_NEW_BLANK", proc108);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_GET_IID", proc109);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE", proc110);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L", proc111);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_XLAT", proc112);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH_EXEC_TRIPLE_L_XLAT", proc113);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2HASH", proc114);
+  DEFINE_PROC ("DB.DBA.RDF_TTL_LOAD_DICT", proc115);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH_EXEC_GET_IID", proc116);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH_EXEC_TRIPLE", proc117);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH_EXEC_TRIPLE_L", proc118);
+  DEFINE_PROC ("DB.DBA.RDF_TTL2SQLHASH", proc119);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFXML_IMPL", proc120);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFXML", proc121);
+  DEFINE_PROC ("DB.DBA.RDF_RDFXML_TO_DICT", proc122);
+  DEFINE_PROC ("DB.DBA.RDF_RDFXML_LOAD_DICT", proc123);
+  DEFINE_PROC ("DB.DBA.RDFA_LOAD_DICT_XLAT", proc124);
+  DEFINE_PROC ("DB.DBA.RDF_RDFA11_FETCH_PROFILES", proc125);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFA", proc126);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFA_WITH_IRI_TRANSLATION", proc127);
+  DEFINE_PROC ("DB.DBA.RDF_RDFA_TO_DICT", proc128);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_XHTML_MICRODATA", proc129); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_XML_IRI_TO_TTL", proc130); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_XML_OBJ_TO_TTL", proc131); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_NEW_BLANK", proc132); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_TRIPLE", proc133); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL_EV_TRIPLE_L", proc134); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_TO_TTL", proc135); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_CONVERT_RDFXML_FILE_TO_TTL_FILE", proc136);
+  DEFINE_PROC ("DB.DBA.RDF_LONG_TO_TTL", proc137);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_BATCH_COMPLETE", proc138);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_VERBOSE_TTL", proc139);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_TTL", proc140);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_TRIG", proc141);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_NT", proc142);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_TO_TTL", proc143);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT", proc144);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_TALIS_JSON", proc145);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_JSON_LD", proc146);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_JSON", proc147);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_CSV", proc148);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_RDFA_XHTML", proc149);
+  DEFINE_PROC ("DB.DBA.RDF_ENDPOINT_DESCRIBE_LINK_FMT", proc150);
+  DEFINE_PROC ("DB.DBA.RDF_PIVOT_DESCRIBE_LINK", proc151);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_HTML_UL", proc152);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_HTML_TR", proc153);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_HTML_MICRODATA", proc154);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_JSON_MICRODATA", proc155);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ATOM_XML", proc156);
+  DEFINE_PROC ("DB.DBA.ODATA_EDM_TYPE", proc157);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_ODATA_JSON", proc158);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_ODATA_JSON", proc159);
+  DEFINE_PROC ("DB.DBA.RDF_TRIPLES_TO_ATOM_XML_TEXT", proc160);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_INIT", proc161);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_ACC", proc162);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_TTL_FIN", proc163);
   ddl_ensure_table ("do this always", other16);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_INIT", proc142);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_ACC", proc143);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_FIN", proc144);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_INIT", proc164);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_ACC", proc165);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_NT_FIN", proc166);
   ddl_ensure_table ("do this always", other17);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_INIT", proc145);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_ACC", proc146);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_FIN", proc147);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_INIT", proc167);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_ACC", proc168);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_RDF_XML_FIN", proc169);
   ddl_ensure_table ("do this always", other18);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_INIT", proc148);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_ACC", proc149);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_FIN", proc150);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_INIT", proc170);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_ACC", proc171);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_JSON_FIN", proc172);
   ddl_ensure_table ("do this always", other19);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_INIT", proc151);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_CSV_WRITE_VALUE", proc152);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_ACC", proc153);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_FIN", proc154);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_INIT", proc173);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_CSV_WRITE_VALUE", proc174);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_ACC", proc175);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CSV_FIN", proc176);
   ddl_ensure_table ("do this always", other20);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_INIT", proc155);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_ACC", proc156);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_FIN", proc157);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_INIT", proc177);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_ACC", proc178);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_RESULT_SET_AS_CXML_FIN", proc179);
   ddl_ensure_table ("do this always", other21);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TTL", proc158);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT", proc159);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML", proc160);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON", proc161);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CSV", proc162);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDFA_XHTML", proc163);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML", proc164);
-  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML_QRCODE", proc165); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_INIT", proc166); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_ACC", proc167); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_FIN", proc168);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TTL", proc180);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TRIG", proc181);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_NT", proc182);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDF_XML", proc183);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_TALIS_JSON", proc184);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_LD", proc185);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_UL", proc186);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_TR", proc187);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_HTML_MICRODATA", proc188);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_JSON_MICRODATA", proc189);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CSV", proc190);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_RDFA_XHTML", proc191);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML", proc192);
+  DEFINE_PROC ("DB.DBA.RDF_FORMAT_TRIPLE_DICT_AS_CXML_QRCODE", proc193); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_INIT", proc194); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_ACC", proc195); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_XML_FIN", proc196);
   ddl_ensure_table ("do this always", other22); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_INIT", proc169); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_ACC", proc170); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_FIN", proc171);
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_INIT", proc197); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_ACC", proc198); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_RDF_XML_FIN", proc199);
   ddl_ensure_table ("do this always", other23); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_INIT", proc172); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_ACC", proc173); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_FIN", proc174);
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_INIT", proc200); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_ACC", proc201); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_TTL_FIN", proc202);
   ddl_ensure_table ("do this always", other24); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_NT_FIN", proc175);
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_NT_FIN", proc203);
   ddl_ensure_table ("do this always", other25);
   ddl_ensure_table ("do this always", other26); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_CSV_FIN", proc176);
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FORMAT_BOOL_RESULT_AS_CSV_FIN", proc204);
   ddl_ensure_table ("do this always", other27);
-  DEFINE_PROC ("DB.DBA.RDF_INSERT_TRIPLES_CL", proc177);
-  DEFINE_PROC ("DB.DBA.RDF_INSERT_TRIPLES", proc178);
-  DEFINE_PROC ("DB.DBA.RDF_DELETE_TRIPLES", proc179);
-  DEFINE_PROC ("DB.DBA.RDF_DELETE_TRIPLES_AGG", proc180);
-  DEFINE_PROC ("DB.DBA.RDF_MODIFY_TRIPLES", proc181); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_INIT", proc182); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL", proc183); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_DELETE_CTOR_ACC", proc184); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INSERT_CTOR_ACC", proc185); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_MODIFY_CTOR_ACC", proc186); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_FIN", proc187); 
+  DEFINE_PROC ("DB.DBA.RDF_INSERT_TRIPLES_CL", proc205);
+  DEFINE_PROC ("DB.DBA.RDF_INSERT_TRIPLES", proc206);
+  DEFINE_PROC ("DB.DBA.RDF_DELETE_TRIPLES", proc207);
+  DEFINE_PROC ("DB.DBA.RDF_DELETE_TRIPLES_AGG", proc208);
+  DEFINE_PROC ("DB.DBA.RDF_MODIFY_TRIPLES", proc209); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_INIT", proc210); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INS_OR_DEL_CTOR_IMPL", proc211); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_DELETE_CTOR_ACC", proc212); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INSERT_CTOR_ACC", proc213); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_MODIFY_CTOR_ACC", proc214); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_INS_OR_DEL_OR_MODIFY_CTOR_FIN", proc215); 
   ddl_ensure_table ("do this always", other28); 
   ddl_ensure_table ("do this always", other29); 
   ddl_ensure_table ("do this always", other30);
-  DEFINE_PROC ("DB.DBA.SPARQL_INSERT_DICT_CONTENT", proc188);
-  DEFINE_PROC ("DB.DBA.SPARQL_DELETE_DICT_CONTENT", proc189);
-  DEFINE_PROC ("DB.DBA.SPARQL_MODIFY_BY_DICT_CONTENTS", proc190);
-  DEFINE_PROC ("DB.DBA.RDF_REPL_DEL", proc191);
-  DEFINE_PROC ("DB.DBA.SPARUL_CLEAR", proc192);
-  DEFINE_PROC ("DB.DBA.SPARUL_LOAD", proc193);
-  DEFINE_PROC ("DB.DBA.SPARUL_CREATE", proc194);
-  DEFINE_PROC ("DB.DBA.SPARUL_DROP", proc195);
-  DEFINE_PROC ("DB.DBA.SPARUL_RUN", proc196);
-  DEFINE_PROC ("DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS", proc197); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_REGEX", proc198); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_LANGMATCHES", proc199); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.BEST_LANGMATCH_INIT", proc200); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.BEST_LANGMATCH_ACC", proc201); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.BEST_LANGMATCH_FINAL", proc202); 
+  DEFINE_PROC ("DB.DBA.SPARQL_INSERT_DICT_CONTENT", proc216);
+  DEFINE_PROC ("DB.DBA.SPARQL_DELETE_DICT_CONTENT", proc217);
+  DEFINE_PROC ("DB.DBA.SPARQL_MODIFY_BY_DICT_CONTENTS", proc218);
+  DEFINE_PROC ("DB.DBA.RDF_REPL_DEL", proc219);
+  DEFINE_PROC ("DB.DBA.SPARUL_CLEAR", proc220);
+  DEFINE_PROC ("DB.DBA.SPARUL_LOAD", proc221);
+  DEFINE_PROC ("DB.DBA.SPARUL_CREATE", proc222);
+  DEFINE_PROC ("DB.DBA.SPARUL_DROP", proc223);
+  DEFINE_PROC ("DB.DBA.SPARUL_RUN", proc224);
+  DEFINE_PROC ("DB.DBA.SPARQL_INSERT_QUAD_DICT_CONTENT", proc225);
+  DEFINE_PROC ("DB.DBA.SPARQL_DELETE_QUAD_DICT_CONTENT", proc226);
+  DEFINE_PROC ("DB.DBA.SPARQL_MODIFY_BY_QUAD_DICT_CONTENTS", proc227);
+  DEFINE_PROC ("DB.DBA.SPARUL_COPYMOVEADD_IMPL", proc228);
+  DEFINE_PROC ("DB.DBA.SPARUL_COPY", proc229);
+  DEFINE_PROC ("DB.DBA.SPARUL_MOVE", proc230);
+  DEFINE_PROC ("DB.DBA.SPARUL_ADD", proc231);
+  DEFINE_PROC ("DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS", proc232); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_REGEX", proc233); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_LANGMATCHES", proc234); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.BEST_LANGMATCH_INIT", proc235); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.BEST_LANGMATCH_ACC", proc236); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.BEST_LANGMATCH_FINAL", proc237); 
   ddl_ensure_table ("do this always", other31); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CONSTRUCT_INIT", proc203); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CONSTRUCT_ACC", proc204); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CONSTRUCT_FIN", proc205); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CONSTRUCT_INIT", proc238); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CONSTRUCT_ACC", proc239); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CONSTRUCT_FIN", proc240); 
   ddl_ensure_table ("do this always", other32);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_AGG_INIT", proc206);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_AGG_ACC", proc207);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_AGG_FIN", proc208);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_AGG_INIT", proc241);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_AGG_ACC", proc242);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_AGG_FIN", proc243);
   ddl_ensure_table ("do this always", other33);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT", proc209);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_SPO", proc210);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL", proc211);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_CBD", proc212);
-  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL", proc213); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS", proc214);
-  DEFINE_PROC ("DB.DBA.RDF_TYPEMIN_OF_OBJ", proc215);
-  DEFINE_PROC ("DB.DBA.RDF_TYPEMAX_OF_OBJ", proc216);
-  DEFINE_PROC ("DB.DBA.RDF_IID_CMP", proc217);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_CMP", proc218);
-  DEFINE_PROC ("DB.DBA.RDF_LONG_CMP", proc219); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DIST_SER_LONG", proc220); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DIST_DESER_LONG", proc221);
-  DEFINE_PROC ("DB.DBA.JSO_MAKE_INHERITANCE", proc222);
-  DEFINE_PROC ("DB.DBA.JSO_LOAD_INSTANCE", proc223);
-  DEFINE_PROC ("DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH", proc224);
-  DEFINE_PROC ("DB.DBA.JSO_LOAD_GRAPH", proc225);
-  DEFINE_PROC ("DB.DBA.JSO_PIN_GRAPH", proc226); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.JSO_SYS_GRAPH", proc227);
-  DEFINE_PROC ("DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO", proc228);
-  DEFINE_PROC ("DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH", proc229);
-  DEFINE_PROC ("DB.DBA.JSO_DUMP_IRI", proc230);
-  DEFINE_PROC ("DB.DBA.JSO_DUMP_FLD", proc231);
-  DEFINE_PROC ("DB.DBA.JSO_VECTOR_TO_TTL", proc232);
-  DEFINE_PROC ("DB.DBA.JSO_FILTERED_PROPLIST", proc233);
-  DEFINE_PROC ("DB.DBA.JSO_DUMP_ALL", proc234);
-  DEFINE_PROC ("DB.DBA.RDF_BACKUP_METADATA", proc235);
-  DEFINE_PROC ("DB.DBA.RDF_RESTORE_METADATA", proc236);
-  DEFINE_PROC ("DB.DBA.RDF_AUDIT_METADATA", proc237);
-  DEFINE_PROC ("DB.DBA.RDF_QM_CHANGE", proc238);
-  DEFINE_PROC ("DB.DBA.RDF_QM_CHANGE_OPT", proc239);
-  DEFINE_PROC ("DB.DBA.RDF_QM_APPLY_CHANGES", proc240);
-  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_JSO_TYPE", proc241);
-  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_STORAGE_FLAG", proc242);
-  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_STORAGE_CONTAINS_MAPPING", proc243);
-  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_STORAGE_IS_FLAGGED", proc244);
-  DEFINE_PROC ("DB.DBA.RDF_QM_GC_SUBTREE", proc245);
-  DEFINE_PROC ("DB.DBA.RDF_QM_GC_MAPPING_SUBTREE", proc246);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DROP_MAPPING", proc247);
-  DEFINE_PROC ("DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE", proc248);
-  DEFINE_PROC ("DB.DBA.RDF_QM_CBD_OF_IRI_CLASS", proc249);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT", proc250);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS", proc251);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS", proc252); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_BAD_CLASS_INV_FUNCTION", proc253); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SQLNAME_NOTATION_TO_NAME", proc254); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SQLQNAME_NOTATION_TO_QNAME", proc255);
-  DEFINE_PROC ("DB.DBA.RDF_QM_CHECK_CLASS_FUNCTION_HEADERS", proc256);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_SUBCLASS", proc257);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DROP_CLASS", proc258);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DROP_QUAD_STORAGE", proc259);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_QUAD_STORAGE", proc260);
-  DEFINE_PROC ("DB.DBA.RDF_QM_BEGIN_ALTER_QUAD_STORAGE", proc261);
-  DEFINE_PROC ("DB.DBA.RDF_QM_END_ALTER_QUAD_STORAGE", proc262);
-  DEFINE_PROC ("DB.DBA.RDF_QM_STORE_ATABLES", proc263);
-  DEFINE_PROC ("DB.DBA.RDF_QM_FT_USAGE", proc264);
-  DEFINE_PROC ("DB.DBA.RDF_QM_CHECK_COLUMNS_FORM_KEY", proc265);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_MAP_VALUE", proc266);
-  DEFINE_PROC ("DB.DBA.RDF_QM_NORMALIZE_QMV", proc267);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_MAPPING", proc268);
-  DEFINE_PROC ("DB.DBA.RDF_QM_ATTACH_MAPPING", proc269);
-  DEFINE_PROC ("DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE", proc270);
-  DEFINE_PROC ("DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE", proc271);
-  DEFINE_PROC ("DB.DBA.RDF_QM_SET_DEFAULT_MAPPING", proc272);
-  DEFINE_PROC ("DB.DBA.RDF_ADD_qmAliasesKeyrefdByQuad", proc273);
-  DEFINE_PROC ("DB.DBA.RDF_UPGRADE_QUAD_MAP", proc274);
-  DEFINE_PROC ("DB.DBA.RDF_UPGRADE_METADATA", proc275);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_W", proc276);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_W", proc277);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_NEW_GRAPH_A", proc278);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_A", proc279);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_A", proc280);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_COMMIT_A", proc281);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_R", proc282);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_R", proc283);
-  DEFINE_PROC ("DB.DBA.TTLP_EV_COMMIT_R", proc284);
-  DEFINE_PROC ("DB.DBA.TTLP_MT", proc285);
-  DEFINE_PROC ("DB.DBA.TTLP_MT_LOCAL_FILE", proc286);
-  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFXML_MT", proc287);
-  DEFINE_PROC ("DB.DBA.VT_DECODE_KEYWORD_ITM", proc288);
-  DEFINE_PROC ("DB.DBA.VT_ENCODE_KEYWORD_ITM", proc289);
-  DEFINE_PROC ("DB.DBA.VT_COMPOSE_KEYWORD_INDEX_LINES", proc290); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_OBJ_PATCH_CONTAINS_BY_GRAPH", proc291); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_OBJ_PATCH_CONTAINS_BY_MANY_GRAPHS", proc292);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH", proc293);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH_OLD", proc294);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_FT_RULE_ADD", proc295);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_FT_RULE_DEL", proc296);
-  DEFINE_PROC ("DB.DBA.RDF_OBJ_FT_RECOVER", proc297);
-  ddl_ensure_table ("DB.DBA.RDF_GRAPH_GROUP", tbl15);
-  ddl_ensure_table ("DB.DBA.RDF_GRAPH_GROUP_MEMBER", tbl16);
-  ddl_ensure_table ("DB.DBA.RDF_GRAPH_USER", tbl17);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_CREATE_MEMONLY", proc298);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_CREATE", proc299);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DROP_MEMONLY", proc300);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DROP", proc301);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_CHECK_VISIBILITY_CHANGE", proc302);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_INS_MEMONLY", proc303);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_INS", proc304);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DEL_MEMONLY", proc305);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DEL", proc306);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_GET", proc307);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_ACK", proc308); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_GRAPH_USER_PERM_TITLE", proc309);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT", proc310);
-  DEFINE_PROC ("DB.DBA.RDF_DEFAULT_USER_PERMS_SET_MEMONLY", proc311);
-  DEFINE_PROC ("DB.DBA.RDF_DEFAULT_USER_PERMS_SET", proc312);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_SET_MEMONLY", proc313);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_SET", proc314);
-  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_LIST_GET", proc315);
-  DEFINE_PROC ("DB.DBA.SPARQL_RELOAD_QM_GRAPH", proc316);
-  DEFINE_PROC ("DB.DBA.RDF_CREATE_SPARQL_ROLES", proc317);
-  DEFINE_PROC ("DB.DBA.RDF_QUAD_AUDIT", proc318);
-  DEFINE_PROC ("DB.DBA.RDF_QUAD_FT_UPGRADE", proc319);
-  ddl_ensure_table ("do this always", other35);
-  DEFINE_PROC ("rdfs_pn", proc320);
-  DEFINE_PROC ("rdf_owl_sas_p", proc321);
-  ddl_ensure_table ("DB.DBA.SYS_RDF_SCHEMA", tbl18);
-  DEFINE_PROC ("rdfs_load_schema", proc322);
-  DEFINE_PROC ("rdf_schema_ld", proc323);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT", proc244);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_SPO", proc245);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_SPO_PHYSICAL", proc246);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_CBD", proc247);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_CBD_PHYSICAL", proc248);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_OBJCBD", proc249);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_OBJCBD_PHYSICAL", proc250);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_SCBD", proc251);
+  DEFINE_PROC ("DB.DBA.SPARQL_DESC_DICT_SCBD_PHYSICAL", proc252); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DICT_OF_TRIPLES_TO_THREE_COLS", proc253);
+  DEFINE_PROC ("DB.DBA.RDF_TYPEMIN_OF_OBJ", proc254);
+  DEFINE_PROC ("DB.DBA.RDF_TYPEMAX_OF_OBJ", proc255);
+  DEFINE_PROC ("DB.DBA.RDF_IID_CMP", proc256);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_CMP", proc257);
+  DEFINE_PROC ("DB.DBA.RDF_LONG_CMP", proc258); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DIST_SER_LONG", proc259); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_DIST_DESER_LONG", proc260);
+  DEFINE_PROC ("DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH", proc261);
+  DEFINE_PROC ("DB.DBA.JSO_DUMP_IRI", proc262);
+  DEFINE_PROC ("DB.DBA.JSO_DUMP_FLD", proc263);
+  DEFINE_PROC ("DB.DBA.JSO_VECTOR_TO_TTL", proc264);
+  DEFINE_PROC ("DB.DBA.JSO_FILTERED_PROPLIST", proc265);
+  DEFINE_PROC ("DB.DBA.JSO_DUMP_ALL", proc266);
+  DEFINE_PROC ("DB.DBA.RDF_BACKUP_METADATA", proc267);
+  DEFINE_PROC ("DB.DBA.RDF_RESTORE_METADATA", proc268);
+  DEFINE_PROC ("DB.DBA.RDF_AUDIT_METADATA", proc269);
+  DEFINE_PROC ("DB.DBA.RDF_QM_CHANGE", proc270);
+  DEFINE_PROC ("DB.DBA.RDF_QM_CHANGE_OPT", proc271);
+  DEFINE_PROC ("DB.DBA.RDF_QM_APPLY_CHANGES", proc272);
+  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_JSO_TYPE", proc273);
+  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_STORAGE_FLAG", proc274);
+  DEFINE_PROC ("DB.DBA.RDF_QM_ASSERT_STORAGE_CONTAINS_MAPPING", proc275);
+  DEFINE_PROC ("DB.DBA.RDF_QM_GC_SUBTREE", proc276);
+  DEFINE_PROC ("DB.DBA.RDF_QM_GC_MAPPING_SUBTREE", proc277);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DROP_MAPPING", proc278);
+  DEFINE_PROC ("DB.DBA.RDF_QM_MACROEXPAND_TEMPLATE", proc279);
+  DEFINE_PROC ("DB.DBA.RDF_QM_CBD_OF_IRI_CLASS", proc280);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FORMAT", proc281);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_IRI_CLASS_FUNCTIONS", proc282);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FORMAT", proc283);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_LITERAL_CLASS_FUNCTIONS", proc284); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_BAD_CLASS_INV_FUNCTION", proc285); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SQLNAME_NOTATION_TO_NAME", proc286); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SQLQNAME_NOTATION_TO_QNAME", proc287);
+  DEFINE_PROC ("DB.DBA.RDF_QM_CHECK_CLASS_FUNCTION_HEADERS", proc288);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_SUBCLASS", proc289);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DROP_CLASS", proc290);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DROP_QUAD_STORAGE", proc291);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_QUAD_STORAGE", proc292);
+  DEFINE_PROC ("DB.DBA.RDF_QM_BEGIN_ALTER_QUAD_STORAGE", proc293);
+  DEFINE_PROC ("DB.DBA.RDF_QM_END_ALTER_QUAD_STORAGE", proc294);
+  DEFINE_PROC ("DB.DBA.RDF_QM_STORE_ATABLES", proc295);
+  DEFINE_PROC ("DB.DBA.RDF_QM_FT_USAGE", proc296);
+  DEFINE_PROC ("DB.DBA.RDF_QM_CHECK_COLUMNS_FORM_KEY", proc297);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_MAP_VALUE", proc298);
+  DEFINE_PROC ("DB.DBA.RDF_QM_NORMALIZE_QMV", proc299);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DEFINE_MAPPING", proc300);
+  DEFINE_PROC ("DB.DBA.RDF_QM_ATTACH_MAPPING", proc301);
+  DEFINE_PROC ("DB.DBA.RDF_QM_ADD_MAPPING_TO_STORAGE", proc302);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DELETE_MAPPING_FROM_STORAGE", proc303);
+  DEFINE_PROC ("DB.DBA.RDF_QM_SET_DEFAULT_MAPPING", proc304);
+  DEFINE_PROC ("DB.DBA.RDF_SML_DROP", proc305);
+  DEFINE_PROC ("DB.DBA.RDF_SML_CREATE", proc306);
+  DEFINE_PROC ("DB.DBA.RDF_QM_DETACH_MACRO_LIBRARY", proc307);
+  DEFINE_PROC ("DB.DBA.RDF_QM_ATTACH_MACRO_LIBRARY", proc308);
+  DEFINE_PROC ("DB.DBA.RDF_ADD_qmAliasesKeyrefdByQuad", proc309);
+  DEFINE_PROC ("DB.DBA.RDF_UPGRADE_QUAD_MAP", proc310);
+  DEFINE_PROC ("DB.DBA.RDF_UPGRADE_METADATA", proc311);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_W", proc312);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_W", proc313);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_NEW_GRAPH_A", proc314);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_A", proc315);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_A", proc316);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_COMMIT_A", proc317);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_R", proc318);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_TRIPLE_L_R", proc319);
+  DEFINE_PROC ("DB.DBA.TTLP_EV_COMMIT_R", proc320);
+  DEFINE_PROC ("DB.DBA.TTLP_MT", proc321);
+  DEFINE_PROC ("DB.DBA.TTLP_MT_LOCAL_FILE", proc322);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_RDFXML_MT", proc323);
+  DEFINE_PROC ("DB.DBA.VT_DECODE_KEYWORD_ITM", proc324);
+  DEFINE_PROC ("DB.DBA.VT_ENCODE_KEYWORD_ITM", proc325);
+  DEFINE_PROC ("DB.DBA.VT_COMPOSE_KEYWORD_INDEX_LINES", proc326); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_OBJ_PATCH_CONTAINS_BY_GRAPH", proc327); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_OBJ_PATCH_CONTAINS_BY_MANY_GRAPHS", proc328);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH", proc329);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_ADD_KEYWORD_FOR_GRAPH_OLD", proc330);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_FT_RULE_ADD", proc331);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_FT_RULE_DEL", proc332);
+  DEFINE_PROC ("DB.DBA.RDF_OBJ_FT_RECOVER", proc333);
+  ddl_ensure_table ("DB.DBA.RDF_GRAPH_GROUP", tbl16);
+  ddl_ensure_table ("DB.DBA.RDF_GRAPH_GROUP_MEMBER", tbl17);
+  ddl_ensure_table ("DB.DBA.RDF_GRAPH_USER", tbl18);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_CREATE_MEMONLY", proc334);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_CREATE", proc335);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DROP_MEMONLY", proc336);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DROP", proc337);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_CHECK_VISIBILITY_CHANGE", proc338);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_INS_MEMONLY", proc339);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_INS", proc340);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DEL_MEMONLY", proc341);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_DEL", proc342);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_GET", proc343);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_ACK", proc344); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_GRAPH_USER_PERM_TITLE", proc345);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_ASSERT", proc346);
+  DEFINE_PROC ("DB.DBA.RDF_DEFAULT_USER_PERMS_SET_MEMONLY", proc347);
+  DEFINE_PROC ("DB.DBA.RDF_DEFAULT_USER_PERMS_SET", proc348);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_SET_MEMONLY", proc349);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_SET", proc350);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_DEL_MEMONLY", proc351);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_USER_PERMS_DEL", proc352);
+  DEFINE_PROC ("DB.DBA.RDF_GRAPH_GROUP_LIST_GET", proc353);
+  DEFINE_PROC ("DB.DBA.SPARQL_RELOAD_QM_GRAPH", proc354);
+  DEFINE_PROC ("DB.DBA.RDF_CREATE_SPARQL_ROLES", proc355);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_AUDIT", proc356);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_OUTLINE_ALL", proc357);
+  DEFINE_PROC ("DB.DBA.RDF_QUAD_FT_UPGRADE", proc358);
   ddl_ensure_table ("do this always", other36);
-  DEFINE_PROC ("CL_RDF_INF_CHANGED_SRV", proc324);
-  DEFINE_PROC ("CL_RDF_INF_CHANGED", proc325);
-  DEFINE_PROC ("rdfs_rule_set", proc326);
-  DEFINE_PROC ("DB.DBA.RDF_IID_OF_QNAME", proc327);
-  DEFINE_PROC ("SPARQL_INI_PARAMS", proc328);
+  DEFINE_PROC ("rdfs_pn", proc359);
+  DEFINE_PROC ("rdf_owl_sas_p", proc360);
+  ddl_ensure_table ("DB.DBA.SYS_RDF_SCHEMA", tbl19);
+  DEFINE_PROC ("rdfs_load_schema", proc361);
+  DEFINE_PROC ("rdf_schema_ld", proc362);
+  ddl_ensure_table ("do this always", other37);
+  DEFINE_PROC ("CL_RDF_INF_CHANGED_SRV", proc363);
+  DEFINE_PROC ("CL_RDF_INF_CHANGED", proc364);
+  DEFINE_PROC ("rdfs_rule_set", proc365);
+  DEFINE_PROC ("DB.DBA.RDF_IID_OF_QNAME", proc366);
+  DEFINE_PROC ("SPARQL_INI_PARAMS", proc367);
+  DEFINE_PROC ("cl_tmp_inx_recov_fill", proc368);
+  DEFINE_PROC ("cl_inx_recov_clean", proc369);
+  DEFINE_PROC ("cl_inx_recov_fill_1", proc370);
+  DEFINE_PROC ("exec_from_daq", proc371);
+  DEFINE_PROC ("cl_inx_recov", proc372);
 
   /* sparql_io.sql */
  
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_WRITE_NS", proc329); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_WRITE_HEAD", proc330); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_HTTP_PRE", proc331); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_HTTP_INIT", proc332); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_HTTP_FINAL", proc333); 
-  ddl_ensure_table ("do this always", other37); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_DICT_XML_HTTP_PRE", proc334); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_WRITE_NS", proc373); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_WRITE_HEAD", proc374); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_HTTP_PRE", proc375); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_HTTP_INIT", proc376); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_XML_HTTP_FINAL", proc377); 
   ddl_ensure_table ("do this always", other38); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_WRITE_NS", proc335); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_WRITE_HEAD", proc336); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_HTTP_PRE", proc337); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_HTTP_INIT", proc338); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_HTTP_FINAL", proc339); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_DICT_XML_HTTP_PRE", proc378); 
   ddl_ensure_table ("do this always", other39); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_NT_WRITE_NS", proc340); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_NT_WRITE_HEAD", proc341); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_NT_HTTP_PRE", proc342); 
-  ddl_ensure_table ("do this always", other40);
-  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_INT", proc343);
-  DEFINE_PROC ("DB.DBA.SPARQL_REXEC", proc344);
-  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_TO_ARRAY", proc345);
-  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_TO_ARRAY_OF_OBJ", proc346);
-  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_WITH_META", proc347);
-  DEFINE_PROC ("DB.DBA.SPARQL_SINV_IMP", proc348);
-  ddl_ensure_table ("DB.DBA.SPARQL_SINV_2", view0);
-  DEFINE_PROC ("querySoap", proc349); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_WRITE_EXEC_STATUS", proc350);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_XML_WRITE_HEAD", proc351);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_XML_WRITE_RES", proc352);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_XML_WRITE_ROW", proc353);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_NS", proc354);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_HEAD", proc355);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_RES", proc356);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_ROW", proc357);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_TTL_WRITE_NS", proc358);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_TTL_WRITE_HEAD", proc359);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_TTL_WRITE_RES", proc360);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_NT_WRITE_NS", proc361);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_NT_WRITE_HEAD", proc362);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_NT_WRITE_RES", proc363);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE", proc364);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_JSON_WRITE_BINDING", proc365);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_JSON_WRITE", proc366);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_CSV_WRITE", proc367);
-  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_WRITE", proc368);
-  DEFINE_PROC ("WS.WS.SPARQL_VHOST_RESET", proc369);
-  DEFINE_PROC ("DB.DBA.SPARQL_PROTOCOL_ERROR_REPORT", proc370);
-  DEFINE_PROC ("DB.DBA.SPARQL_WSDL11", proc371);
-  DEFINE_PROC ("DB.DBA.SPARQL_WSDL", proc372);
-  DEFINE_PROC ("DB.DBA.SPARQL_SOAP_NS", proc373);
-  DEFINE_PROC ("DB.DBA.SPARQL_PT_NS", proc374); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.PARSE_SPARQL_WS_PARAMS", proc375);
-  DEFINE_PROC ("DB.DBA.rdf_find_str", proc376);
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_WRITE_NS", proc379); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_WRITE_HEAD", proc380); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_HTTP_PRE", proc381); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_HTTP_INIT", proc382); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_TTL_HTTP_FINAL", proc383); 
+  ddl_ensure_table ("do this always", other40); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_NT_WRITE_NS", proc384); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_NT_WRITE_HEAD", proc385); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_RSET_NT_HTTP_PRE", proc386); 
   ddl_ensure_table ("do this always", other41);
-  DEFINE_PROC ("WS.WS.sparql_enpoint_format_opts", proc377);
-  DEFINE_PROC ("WS.WS./!sparql/", proc378);
+  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_INT", proc387);
+  DEFINE_PROC ("DB.DBA.SPARQL_REXEC", proc388);
+  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_TO_ARRAY", proc389);
+  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_TO_ARRAY_OF_OBJ", proc390);
+  DEFINE_PROC ("DB.DBA.SPARQL_REXEC_WITH_META", proc391);
+  DEFINE_PROC ("DB.DBA.SPARQL_SINV_IMP", proc392);
+  ddl_ensure_table ("DB.DBA.SPARQL_SINV_2", view0);
+  DEFINE_PROC ("querySoap", proc393); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_WRITE_EXEC_STATUS", proc394);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_XML_WRITE_HEAD", proc395);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_XML_WRITE_RES", proc396);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_XML_WRITE_ROW", proc397);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_NS", proc398);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_HEAD", proc399);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_RES", proc400);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_RDFXML_WRITE_ROW", proc401);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_TTL_WRITE_NS", proc402);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_TTL_WRITE_HEAD", proc403);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_TTL_WRITE_RES", proc404);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_NT_WRITE_NS", proc405);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_NT_WRITE_HEAD", proc406);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_NT_WRITE_RES", proc407);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_JAVASCRIPT_HTML_WRITE", proc408);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_JSON_WRITE_BINDING", proc409);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_JSON_WRITE", proc410);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_CSV_WRITE", proc411);
+  DEFINE_PROC ("DB.DBA.SPARQL_RESULTS_WRITE", proc412);
+  DEFINE_PROC ("WS.WS.SPARQL_VHOST_RESET", proc413);
+  DEFINE_PROC ("DB.DBA.SPARQL_PROTOCOL_ERROR_REPORT", proc414);
+  DEFINE_PROC ("DB.DBA.SPARQL_WSDL11", proc415);
+  DEFINE_PROC ("DB.DBA.SPARQL_WSDL", proc416);
+  DEFINE_PROC ("DB.DBA.SPARQL_SOAP_NS", proc417);
+  DEFINE_PROC ("DB.DBA.SPARQL_PT_NS", proc418); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.PARSE_SPARQL_WS_PARAMS", proc419);
+  DEFINE_PROC ("DB.DBA.rdf_find_str", proc420);
   ddl_ensure_table ("do this always", other42);
-  DEFINE_PROC ("DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS", proc379); 
-  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_ROUTE_IF_DAV", proc380);
-  DEFINE_PROC ("DB.DBA.SPARQL_ROUTE_DICT_CONTENT_DAV", proc381);
-  DEFINE_PROC ("WS.WS.__http_handler_rq", proc382);
-  DEFINE_PROC ("WS.WS.__http_handler_head_rq", proc383);
-  DEFINE_PROC ("DB.DBA.http_rq_file_handler", proc384);
-  DEFINE_PROC ("DB.DBA.RDF_GRANT_SPARQL_IO", proc385);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_HTML_DOCTYPE", proc421);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_HTML_HEAD", proc422);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_STYLE", proc423);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_JAVASCRIPT", proc424);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_FOOTER", proc425);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_FORMAT_OPTS", proc426);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_SPONGE_OPTS", proc427);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_CXML_OPTION", proc428);
+  DEFINE_PROC ("WS.WS.sparql_predefined_nsdecl", proc429);
+  DEFINE_PROC ("WS.WS.sparql_predefined_rdfinf", proc430);
+  DEFINE_PROC ("WS.WS.SPARQL_ENDPOINT_GENERATE_FORM", proc431);
+  DEFINE_PROC ("WS.WS./!sparql/", proc432);
+  ddl_ensure_table ("do this always", other43); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BLANK", proc433); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE", proc434); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CRUD_BASE_EV_TRIPLE_L", proc435); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CRUD_BASE_EV_NEW_BASE", proc436); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CRUD_BASE_TTL", proc437); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_CRUD_BASE_RDFXML", proc438);
+  DEFINE_PROC ("WS.WS./!sparql-graph-crud/", proc439);
+  ddl_ensure_table ("do this always", other44);
+  DEFINE_PROC ("DB.DBA.SPARQL_REFRESH_DYNARES_RESULTS", proc440); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SPARQL_ROUTE_IF_DAV", proc441);
+  DEFINE_PROC ("DB.DBA.SPARQL_ROUTE_DICT_CONTENT_DAV", proc442);
+  DEFINE_PROC ("WS.WS.__http_handler_rq", proc443);
+  DEFINE_PROC ("WS.WS.__http_handler_head_rq", proc444);
+  DEFINE_PROC ("DB.DBA.http_rq_file_handler", proc445);
+  DEFINE_PROC ("DB.DBA.RDF_GRANT_SPARQL_IO", proc446);
 
   /* rdf_sponge.sql */
  
-  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FT_INDEX_GRABBED", proc386);
-  DEFINE_PROC ("DB.DBA.RDF_GRAB_SINGLE", proc387);
-  DEFINE_PROC ("DB.DBA.RDF_GRAB_SINGLE_ASYNC", proc388);
-  DEFINE_PROC ("DB.DBA.RDF_GRAB_SEEALSO", proc389);
-  DEFINE_PROC ("DB.DBA.RDF_GRAB", proc390);
-  DEFINE_PROC ("DB.DBA.RDF_GRAB_RESOLVER_DEFAULT", proc391);
-  DEFINE_PROC ("DB.DBA.SPARQL_EVAL_TO_ARRAY", proc392);
-  DEFINE_PROC ("DB.DBA.SPARQL_EVAL", proc393);
-  ddl_ensure_table ("DB.DBA.SYS_HTTP_SPONGE", tbl19);
-  DEFINE_PROC ("DB.DBA.SYS_HTTP_SPONGE_GET_CACHE_PARAMS", proc394);
-  DEFINE_PROC ("DB.DBA.SYS_HTTP_SPONGE_DEP_URL_NOT_CHANGED", proc395);
-  DEFINE_PROC ("DB.DBA.RDF_HTTP_MAKE_HTTP_REQ", proc396);
-  DEFINE_PROC ("DB.DBA.SYS_HTTP_SPONGE_UP", proc397);
-  DEFINE_PROC ("DB.DBA.SYS_FILE_SPONGE_UP", proc398);
-  DEFINE_PROC ("DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE", proc399);
-  ddl_ensure_table ("DB.DBA.SYS_RDF_MAPPERS", tbl20);
-  DEFINE_PROC ("DB.DBA.RDF_HTTP_URL_GET", proc400);
-  DEFINE_PROC ("DB.DBA.RDF_SW_PING", proc401);
-  DEFINE_PROC ("DB.DBA.RDF_PROC_COLS", proc402);
-  DEFINE_PROC ("DB.DBA.RDF_LOAD_HTTP_RESPONSE", proc403);
-  DEFINE_PROC ("DB.DBA.RDF_FORGET_HTTP_RESPONSE", proc404);
-  DEFINE_PROC ("DB.DBA.RDF_SPONGE_UP", proc405);
-  DEFINE_PROC ("DB.DBA.RDF_SPONGE_UP_1", proc406);
-  DEFINE_PROC ("DB.DBA.RDF_SPONGE_UP_LIST", proc407);
-  DEFINE_PROC ("DB.DBA.RDF_GRANT_SPONGE", proc408);
+  DEFINE_PUBLIC_PROC ("DB.DBA.RDF_FT_INDEX_GRABBED", proc447);
+  DEFINE_PROC ("DB.DBA.RDF_GRAB_SINGLE", proc448);
+  DEFINE_PROC ("DB.DBA.RDF_GRAB_SINGLE_ASYNC", proc449);
+  DEFINE_PROC ("DB.DBA.RDF_GRAB_SEEALSO", proc450);
+  DEFINE_PROC ("DB.DBA.RDF_GRAB", proc451);
+  DEFINE_PROC ("DB.DBA.RDF_GRAB_RESOLVER_DEFAULT", proc452);
+  DEFINE_PROC ("DB.DBA.SPARQL_EVAL_TO_ARRAY", proc453);
+  DEFINE_PROC ("DB.DBA.SPARQL_EVAL", proc454);
+  ddl_ensure_table ("DB.DBA.SYS_HTTP_SPONGE", tbl20);
+  DEFINE_PROC ("DB.DBA.SYS_HTTP_SPONGE_GET_CACHE_PARAMS", proc455);
+  DEFINE_PROC ("DB.DBA.SYS_HTTP_SPONGE_DEP_URL_NOT_CHANGED", proc456);
+  DEFINE_PROC ("DB.DBA.RDF_HTTP_MAKE_HTTP_REQ", proc457);
+  DEFINE_PROC ("DB.DBA.SYS_HTTP_SPONGE_UP", proc458);
+  DEFINE_PROC ("DB.DBA.SYS_FILE_SPONGE_UP", proc459);
+  DEFINE_PROC ("DB.DBA.RDF_SPONGE_GUESS_CONTENT_TYPE", proc460);
+  ddl_ensure_table ("DB.DBA.SYS_RDF_MAPPERS", tbl21);
+  DEFINE_PROC ("DB.DBA.RDF_HTTP_URL_GET", proc461);
+  DEFINE_PROC ("DB.DBA.RDF_SW_PING", proc462);
+  DEFINE_PROC ("DB.DBA.RDF_PROC_COLS", proc463);
+  DEFINE_PROC ("DB.DBA.RDF_LOAD_HTTP_RESPONSE", proc464);
+  DEFINE_PROC ("DB.DBA.RDF_FORGET_HTTP_RESPONSE", proc465);
+  DEFINE_PROC ("DB.DBA.RDF_SPONGE_UP", proc466);
+  DEFINE_PROC ("DB.DBA.RDF_SPONGE_UP_1", proc467);
+  DEFINE_PROC ("DB.DBA.RDF_SPONGE_UP_LIST", proc468);
+  DEFINE_PROC ("DB.DBA.RDF_GRANT_SPONGE", proc469);
 
   /* rdf_schema_objects.sql */
 
-  DEFINE_PROC ("rdf_view_tbl_opts", proc409);
-  DEFINE_PROC ("rdf_view_tbl_pk_cols", proc410);
-  DEFINE_PROC ("rdf_view_ns_get", proc411);
-  DEFINE_PROC ("rdf_view_ns_get_1", proc412);
-  DEFINE_PROC ("RDF_VIEW_DROP_STMT", proc413);
-  DEFINE_PROC ("RDF_VIEW_FROM_TBL", proc414);
-  DEFINE_PROC ("rdf_view_sp", proc415);
-  DEFINE_PROC ("rdf_view_sql_tb", proc416);
-  DEFINE_PROC ("rdf_view_tb", proc417);
-  DEFINE_PROC ("rdf_view_sql_col", proc418);
-  DEFINE_PROC ("rdf_view_col", proc419);
-  DEFINE_PROC ("rdf_view_cls_name", proc420);
-  DEFINE_PROC ("rdf_view_get_ns", proc421);
-  DEFINE_PROC ("rdf_view_uri_curie", proc422);
-  DEFINE_PROC ("rdf_view_col_type", proc423);
-  DEFINE_PROC ("rdf_view_create_view", proc424);
-  DEFINE_PROC ("rdf_view_create_void_view", proc425);
-  DEFINE_PROC ("rdf_view_get_pk_rel", proc426);
-  DEFINE_PROC ("rdf_view_get_bin_rel", proc427);
-  DEFINE_PROC ("rdf_view_get_fk_pk_rel", proc428);
-  DEFINE_PROC ("rdf_view_get_pk_fk_rel", proc429);
-  DEFINE_PROC ("rdf_view_dv_to_printf_str_type", proc430);
-  DEFINE_PROC ("rdf_view_dv_to_sql_str_type", proc431);
-  DEFINE_PROC ("rdf_view_dv_to_xsd_str_type", proc432);
-  DEFINE_PROC ("rdf_view_create_class", proc433);
-  DEFINE_PROC ("rdf_view_get_primary_key", proc434);
-  DEFINE_PROC ("rdf_view_get_relations", proc435);
-  DEFINE_PROC ("RDF_OWL_FROM_TBL", proc436);
-  DEFINE_PROC ("RDF_VIEW_GEN_VD", proc437);
-  DEFINE_PROC ("RDF_OWL_GEN_VD", proc438);
-  DEFINE_PROC ("RDF_VIEW_CHECK_SYNC_TB", proc439);
-  DEFINE_PROC ("RDF_VIEW_DO_SYNC", proc440);
+  DEFINE_PROC ("rdf_view_tbl_opts", proc470);
+  DEFINE_PROC ("rdf_view_tbl_pk_cols", proc471);
+  DEFINE_PROC ("rdf_view_ns_get", proc472);
+  DEFINE_PROC ("rdf_view_ns_get_1", proc473);
+  DEFINE_PROC ("RDF_VIEW_DROP_STMT_BY_GRAPH", proc474);
+  DEFINE_PROC ("RDF_VIEW_DROP_STMT", proc475);
+  DEFINE_PROC ("RDF_VIEW_FROM_TBL", proc476);
+  DEFINE_PROC ("rdf_view_sp", proc477);
+  DEFINE_PROC ("rdf_view_sql_tb", proc478);
+  DEFINE_PROC ("rdf_view_tb", proc479);
+  DEFINE_PROC ("rdf_view_sql_col", proc480);
+  DEFINE_PROC ("rdf_view_col", proc481);
+  DEFINE_PROC ("rdf_view_cls_name", proc482);
+  DEFINE_PROC ("rdf_view_get_ns", proc483);
+  DEFINE_PROC ("rdf_view_uri_curie", proc484);
+  DEFINE_PROC ("rdf_view_col_type", proc485);
+  DEFINE_PROC ("rdf_view_create_view", proc486);
+  DEFINE_PROC ("rdf_view_create_void_view", proc487);
+  DEFINE_PROC ("rdf_view_get_pk_rel", proc488);
+  DEFINE_PROC ("rdf_view_get_bin_rel", proc489);
+  DEFINE_PROC ("rdf_view_get_fk_pk_rel", proc490);
+  DEFINE_PROC ("rdf_view_get_pk_fk_rel", proc491);
+  DEFINE_PROC ("rdf_view_dv_to_printf_str_type", proc492);
+  DEFINE_PROC ("rdf_view_dv_to_sql_str_type", proc493);
+  DEFINE_PROC ("rdf_view_dv_to_xsd_str_type", proc494);
+  DEFINE_PROC ("rdf_view_create_class", proc495);
+  DEFINE_PROC ("rdf_view_get_primary_key", proc496);
+  DEFINE_PROC ("rdf_view_get_relations", proc497);
+  DEFINE_PROC ("RDF_OWL_FROM_TBL", proc498);
+  DEFINE_PROC ("RDF_VIEW_GEN_VD", proc499);
+  DEFINE_PROC ("RDF_OWL_GEN_VD", proc500);
+  DEFINE_PROC ("RDF_VIEW_CHECK_SYNC_TB", proc501);
+  DEFINE_PROC ("RDF_VIEW_DO_SYNC", proc502);
+  DEFINE_PROC ("RDF_VIEW_SYNC_TO_PHYSICAL", proc503);
+  DEFINE_PROC ("R2RML_FROM_TBL", proc504);
+  DEFINE_PROC ("r2rml_create_dataset", proc505);
 
   /* rdf_void.sql */
 
-  ddl_ensure_table ("DB.DBA.RDF_VOID_GRAPH", tbl21);
-  ddl_ensure_table ("DB.DBA.RDF_VOID_GRAPH_MEMBER", tbl22);
-  DEFINE_PROC ("RDF_VOID_INIT", proc441);
-  ddl_ensure_table ("do this always", other45);
-  DEFINE_PROC ("RDF_VOID_SPLIT_IRI", proc442);
-  DEFINE_PROC ("RDF_VOID_STORE", proc443);
-  DEFINE_PROC ("RDF_VOID_ALL_GEN", proc444);
-  DEFINE_PROC ("RDF_VOID_NS", proc445);
-  DEFINE_PROC ("RDF_VOID_GEN", proc446);
-  DEFINE_PROC ("RDF_VOID_DIST_O_SRV", proc447);
-  DEFINE_PROC ("RDF_VOID_DIST_O", proc448);
-  DEFINE_PROC ("RDF_VOID_GEN_1", proc449);
+  ddl_ensure_table ("DB.DBA.RDF_VOID_GRAPH", tbl22);
+  ddl_ensure_table ("DB.DBA.RDF_VOID_GRAPH_MEMBER", tbl23);
+  DEFINE_PROC ("RDF_VOID_INIT", proc506);
+  ddl_ensure_table ("do this always", other47);
+  DEFINE_PROC ("RDF_VOID_SPLIT_IRI", proc507);
+  DEFINE_PROC ("RDF_VOID_STORE", proc508);
+  DEFINE_PROC ("RDF_VOID_ALL_GEN", proc509);
+  DEFINE_PROC ("RDF_VOID_NS", proc510);
+  DEFINE_PROC ("RDF_VOID_GEN", proc511);
+  DEFINE_PROC ("RDF_VOID_DIST_O_SRV", proc512);
+  DEFINE_PROC ("RDF_VOID_DIST_O", proc513);
+  DEFINE_PROC ("RDF_VOID_GEN_1", proc514);
 
   /* rdflddir2.sql */
 
-  ddl_ensure_table ("DB.DBA.LOAD_LIST", tbl23);
-  ddl_ensure_table ("DB.DBA.LDLOCK", tbl24);
-  ddl_ensure_table ("do this always", other46);
-  DEFINE_PROC ("ld_dir", proc450);
-  DEFINE_PROC ("rdf_read_dir", proc451);
-  DEFINE_PROC ("ld_dir_all", proc452);
-  DEFINE_PROC ("ld_add", proc453);
-  DEFINE_PROC ("ld_ttlp_flags", proc454);
-  DEFINE_PROC ("ld_file", proc455);
-  DEFINE_PROC ("rdf_load_dir", proc456);
-  DEFINE_PROC ("ld_array", proc457);
-  DEFINE_PROC ("rdf_loader_run", proc458);
-  DEFINE_PROC ("rdf_load_stop", proc459);
-  DEFINE_PROC ("RDF_LOADER_RUN_1", proc460);
-  DEFINE_PROC ("rdf_ld_srv", proc461);
-  DEFINE_PROC ("load_grdf", proc462);
+  ddl_ensure_table ("DB.DBA.LOAD_LIST", tbl24);
+  ddl_ensure_table ("DB.DBA.LDLOCK", tbl25);
+  ddl_ensure_table ("do this always", other48);
+  DEFINE_PROC ("ld_dir", proc515);
+  DEFINE_PROC ("rdf_read_dir", proc516);
+  DEFINE_PROC ("ld_dir_all", proc517);
+  DEFINE_PROC ("ld_add", proc518);
+  DEFINE_PROC ("ld_ttlp_flags", proc519);
+  DEFINE_PROC ("ld_is_rdfxml", proc520);
+  DEFINE_PROC ("ld_file", proc521);
+  DEFINE_PROC ("rdf_load_dir", proc522);
+  DEFINE_PROC ("ld_array", proc523);
+  DEFINE_PROC ("rdf_loader_run", proc524);
+  DEFINE_PROC ("rdf_load_stop", proc525);
+  DEFINE_PROC ("RDF_LOADER_RUN_1", proc526);
+  DEFINE_PROC ("rdf_ld_srv", proc527);
+  DEFINE_PROC ("load_grdf", proc528);
 }
 
 
@@ -20074,20 +23565,18 @@ sqls_arfw_define_sparql (void)
 {
   /* sparql.sql */
 
-  ddl_ensure_table ("do this always", other0);
-  ddl_ensure_table ("do this always", other1);
-  ddl_ensure_table ("do this always", other2);
   DEFINE_PROC ("DB.DBA.RDF_GLOBAL_RESET", proc20);
   ddl_ensure_table ("do this always", other34);
+  ddl_ensure_table ("do this always", other35);
 
   /* sparql_io.sql */
 
- if (sch_proc_def_exists (bootstrap_cli, "DB.DBA.USER_CREATE"))
-  ddl_ensure_table ("do this always", other43);
+ if (sch_proc_def_exists (bootstrap_cli, "DB.DBA.USER_CREATE", 0))
+  ddl_ensure_table ("do this always", other45);
 
   /* rdf_sponge.sql */
 
- if (sch_proc_def_exists (bootstrap_cli, "DB.DBA.USER_CREATE"))
-  ddl_ensure_table ("do this always", other44);
+ if (sch_proc_def_exists (bootstrap_cli, "DB.DBA.USER_CREATE", 0))
+  ddl_ensure_table ("do this always", other46);
 
 }
diff --git a/libsrc/Wi/sql_code_sparql_init.c b/libsrc/Wi/sql_code_sparql_init.c
new file mode 100644
index 0000000..f5352ea
--- /dev/null
+++ b/libsrc/Wi/sql_code_sparql_init.c
@@ -0,0 +1,1451 @@
+/* This file is automatically generated by sql_to_c.awk */
+
+#include "sqlnode.h"
+#include "sqlfn.h"
+#include "sqltype.h"
+
+/* useraggr.sql */
+
+static const char *proc0 = 
+"#line 24 \"[executable]/useraggr.sql\"\n"
+" create procedure STD_COUNT (in _env varchar)\n"
+"{\n"
+"return aref (deserialize(_env), 0);\n"
+"}\n"
+"--src useraggr.sql:22\n";
+
+static const char *proc1 = 
+"#line 31 \"[executable]/useraggr.sql\"\n"
+" create procedure STD11_INIT (inout _env varchar)\n"
+"{\n"
+"_env := serialize (vector (0, 0.0));\n"
+"}\n"
+"--src useraggr.sql:29\n";
+
+static const char *proc2 = 
+"#line 38 \"[executable]/useraggr.sql\"\n"
+" create procedure STD12_INIT (inout _env varchar)\n"
+"{\n"
+"_env := serialize (vector (0, 0.0,0.0));\n"
+"}\n"
+"--src useraggr.sql:36\n";
+
+static const char *proc3 = 
+"#line 45 \"[executable]/useraggr.sql\"\n"
+" create procedure STD13_INIT (inout _env varchar)\n"
+"{\n"
+"_env := serialize (vector (0, 0.0,0.0, 0.0));\n"
+"}\n"
+"--src useraggr.sql:43\n";
+
+static const char *proc4 = 
+"#line 52 \"[executable]/useraggr.sql\"\n"
+" create procedure VAR_ACC (inout _env varchar, in val numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if (val is null)\n"
+"return;\n"
+"declare ctx any;\n"
+"ctx := deserialize (_env);\n"
+"\n"
+"aset( ctx, 1, aref (ctx, 1) + val);\n"
+"aset( ctx, 2, aref (ctx, 2) + val*val);\n"
+"aset( ctx, 0, aref (ctx, 0) + 1);\n"
+"_env := serialize (ctx);\n"
+"}\n"
+"--src useraggr.sql:50\n";
+
+static const char *proc5 = 
+"#line 69 \"[executable]/useraggr.sql\"\n"
+" create procedure VAR_POP_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"declare _env any;\n"
+"_env := deserialize (_ctx);\n"
+"declare c integer;\n"
+"c := aref (_env, 0);\n"
+"if (c = 0)\n"
+"return null;\n"
+"return  (aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / c;\n"
+"}\n"
+"--src useraggr.sql:67\n";
+
+static const char *proc6 = 
+"#line 84 \"[executable]/useraggr.sql\"\n"
+" create procedure VAR_SAMP_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"declare _env any;\n"
+"_env := deserialize (_ctx);\n"
+"declare c integer;\n"
+"c := aref (_env, 0);\n"
+"if (c = 0)\n"
+"return null;\n"
+"if (c = 1)\n"
+"return 0.0;\n"
+"return  (aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / (c - 1);\n"
+"}\n"
+"--src useraggr.sql:82\n";
+
+static const char *proc7 = 
+"#line 101 \"[executable]/useraggr.sql\"\n"
+" create procedure VAR_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"if (STD_COUNT (_ctx) = 1)\n"
+"return null;\n"
+"return VAR_SAMP_FIN (_ctx);\n"
+"}\n"
+"--src useraggr.sql:99\n";
+
+static const char *proc8 = 
+"#line 112 \"[executable]/useraggr.sql\"\n"
+" create procedure STDDEV_POP_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"declare c integer;\n"
+"declare _env any;\n"
+"_env := deserialize (_ctx);\n"
+"c := aref (_env, 0);\n"
+"if (c = 0)\n"
+"return null;\n"
+"\n"
+"return  sqrt ((aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / c) ;\n"
+"}\n"
+"--src useraggr.sql:110\n";
+
+static const char *proc9 = 
+"#line 128 \"[executable]/useraggr.sql\"\n"
+" create procedure STDDEV_SAMP_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"declare c integer;\n"
+"declare _env any;\n"
+"_env := deserialize (_ctx);\n"
+"c := aref (_env, 0);\n"
+"if (c = 0)\n"
+"return null;\n"
+"if (c = 1)\n"
+"return 0.0;\n"
+"return  sqrt ((aref (_env, 2) - aref (_env, 1) * aref (_env, 1) / c) / ( c - 1));\n"
+"}\n"
+"--src useraggr.sql:126\n";
+
+static const char *proc10 = 
+"#line 145 \"[executable]/useraggr.sql\"\n"
+" create procedure STDDEV_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"if (STD_COUNT (_ctx) = 1)\n"
+"return null;\n"
+"return STDDEV_SAMP_FIN (_ctx);\n"
+"}\n"
+"--src useraggr.sql:143\n";
+
+static const char *proc11 = 
+"#line 156 \"[executable]/useraggr.sql\"\n"
+" create procedure COVAR_ACC (inout _ctx any,\n"
+"in expr1 numeric,\n"
+"in expr2 numeric)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return;\n"
+"if (expr1 is null or expr2 is null)\n"
+"return;\n"
+"\n"
+"declare _env any;\n"
+"\n"
+"_env := deserialize (_ctx);\n"
+"\n"
+"aset (_env, 1, aref (_env,1)+expr1);\n"
+"aset (_env, 2, aref (_env,2)+expr2);\n"
+"aset (_env, 3, aref (_env,3)+expr2*expr1);\n"
+"aset (_env, 0, aref (_env,0)+1);\n"
+"\n"
+"_ctx := serialize (_env);\n"
+"}\n"
+"--src useraggr.sql:154\n";
+
+static const char *proc12 = 
+"#line 179 \"[executable]/useraggr.sql\"\n"
+" create procedure COVAR_SAMP_FIN (inout _ctx any)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"declare _env any;\n"
+"_env := deserialize (_ctx);\n"
+"if (aref (_env, 0) = 0)\n"
+"return null;\n"
+"if (aref (_env, 0) = 1)\n"
+"return 0.0;\n"
+"\n"
+"return (aref (_env, 3) - aref(_env,2) * aref (_env,1) / aref (_env, 0)) / ( aref (_env, 0) - 1);\n"
+"}\n"
+"--src useraggr.sql:177\n";
+
+static const char *proc13 = 
+"#line 195 \"[executable]/useraggr.sql\"\n"
+" create procedure COVAR_POP_FIN (inout _ctx any)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"declare _env any;\n"
+"_env := deserialize (_ctx);\n"
+"if (aref (_env, 0) = 0)\n"
+"return null;\n"
+"if (aref (_env, 0) = 1)\n"
+"return 0.0;\n"
+"\n"
+"return (aref (_env, 3) - aref(_env,2) * aref (_env,1) / aref (_env, 0))/ aref (_env,0);\n"
+"}\n"
+"--src useraggr.sql:193\n";
+
+static const char *proc14 = 
+"#line 211 \"[executable]/useraggr.sql\"\n"
+" create procedure COVAR_FIN (inout _ctx varchar)\n"
+"{\n"
+"if (_ctx is null)\n"
+"return null;\n"
+"if (STD_COUNT (_ctx) = 1)\n"
+"return null;\n"
+"return COVAR_SAMP_FIN (_ctx);\n"
+"}\n"
+"--src useraggr.sql:209\n";
+
+static const char *other0 = 
+"create aggregate DB.DBA.VAR_POP (in val numeric) returns numeric from\n"
+"STD12_INIT, VAR_ACC, VAR_POP_FIN\n";
+
+static const char *other1 = 
+"create aggregate DB.DBA.VAR_SAMP (in val numeric) returns numeric from\n"
+"STD12_INIT, VAR_ACC, VAR_SAMP_FIN\n";
+
+static const char *other2 = 
+"create aggregate DB.DBA.VAR (in val numeric) returns numeric from\n"
+"STD12_INIT, VAR_ACC, VAR_FIN\n";
+
+static const char *other3 = 
+"create aggregate DB.DBA.STDDEV_POP (in val numeric) returns numeric from\n"
+"STD12_INIT, VAR_ACC, STDDEV_POP_FIN\n";
+
+static const char *other4 = 
+"create aggregate DB.DBA.STDDEV_SAMP (in val numeric) returns numeric from\n"
+"STD12_INIT, VAR_ACC, STDDEV_SAMP_FIN\n";
+
+static const char *other5 = 
+"create aggregate DB.DBA.STDDEV (in val numeric) returns numeric from\n"
+"STD12_INIT, VAR_ACC, STDDEV_FIN\n";
+
+static const char *other6 = 
+"create aggregate DB.DBA.COVAR_SAMP (in expr1 numeric, in expr2 numeric) returns numeric from\n"
+"STD13_INIT, COVAR_ACC, COVAR_SAMP_FIN\n";
+
+static const char *other7 = 
+"create aggregate DB.DBA.COVAR_POP (in expr1 numeric, in expr2 numeric) returns numeric from\n"
+"STD13_INIT, COVAR_ACC, COVAR_POP_FIN\n";
+
+static const char *other8 = 
+"create aggregate DB.DBA.COVAR (in expr1 numeric, in expr2 numeric) returns numeric from\n"
+"STD13_INIT, COVAR_ACC, COVAR_FIN\n";
+
+static const char *proc15 = 
+"#line 250 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SLOPE_INIT (inout _env varchar)\n"
+"{\n"
+"declare _ctx1 varchar;\n"
+"declare _ctx2 varchar;\n"
+"\n"
+"STD13_INIT (_ctx1);\n"
+"STD12_INIT (_ctx2);\n"
+"\n"
+"_env := serialize (vector (0, _ctx1, _ctx2));\n"
+"}\n"
+"--src useraggr.sql:248\n";
+
+static const char *proc16 = 
+"#line 263 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SLOPE_ACC (inout _env varchar, in expr1 numeric, in expr2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if ( (expr1 is null) or (expr2 is null))\n"
+"return;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _ctx1 varchar;\n"
+"declare _ctx2 varchar;\n"
+"\n"
+"_ctx1 := aref (_ctx, 1);\n"
+"_ctx2 := aref (_ctx, 2);\n"
+"\n"
+"aset (_ctx, 0, aref (_ctx,0) + 1);\n"
+"COVAR_ACC (_ctx1, expr1, expr2);\n"
+"VAR_ACC (_ctx2, expr2);\n"
+"\n"
+"aset (_ctx, 1, _ctx1);\n"
+"aset (_ctx, 2, _ctx2);\n"
+"\n"
+"_env := serialize (_ctx);\n"
+"}\n"
+"--src useraggr.sql:261\n";
+
+static const char *proc17 = 
+"#line 290 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SLOPE_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"declare c integer;\n"
+"\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"c := aref (_ctx, 0);\n"
+"if (c = 0)\n"
+"return 0;\n"
+"if (c = 1)\n"
+"return null;\n"
+"\n"
+"declare _ctx1 varchar;\n"
+"declare _ctx2 varchar;\n"
+"declare covar_pop_val numeric;\n"
+"declare var_pop_val numeric;\n"
+"\n"
+"_ctx1 := aref (_ctx, 1);\n"
+"_ctx2 := aref (_ctx, 2);\n"
+"\n"
+"\n"
+"covar_pop_val := COVAR_POP_FIN (_ctx1);\n"
+"var_pop_val := VAR_POP_FIN (_ctx2);\n"
+"\n"
+"if (var_pop_val = 0)\n"
+"return null;\n"
+"return covar_pop_val / var_pop_val;\n"
+"}\n"
+"--src useraggr.sql:288\n";
+
+static const char *other9 = 
+"create aggregate DB.DBA.REGR_SLOPE (in expr1 numeric, in expr2 numeric) returns numeric from REGR_SLOPE_INIT, REGR_SLOPE_ACC, REGR_SLOPE_FIN\n";
+
+static const char *proc18 = 
+"#line 327 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_INTERCEPT_INIT (inout _env varchar)\n"
+"{\n"
+"declare _ctx_regr_slope varchar;\n"
+"\n"
+"REGR_SLOPE_INIT (_ctx_regr_slope);\n"
+"_env := serialize (vector (0, 0.0, 0.0, _ctx_regr_slope));\n"
+"}\n"
+"--src useraggr.sql:325\n";
+
+static const char *proc19 = 
+"#line 337 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_INTERCEPT_ACC (inout _env varchar, in expr1 numeric, in expr2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if ((expr1 is null) or (expr2 is null))\n"
+"return;\n"
+"\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"aset (_ctx, 0, aref (_ctx, 0) + 1);\n"
+"aset (_ctx, 1, aref (_ctx, 1) + expr1);\n"
+"aset (_ctx, 2, aref (_ctx, 2) + expr2);\n"
+"\n"
+"declare _ctx_r varchar;\n"
+"_ctx_r := aref (_ctx, 3);\n"
+"REGR_SLOPE_ACC (_ctx_r, expr1, expr2);\n"
+"aset (_ctx, 3, _ctx_r);\n"
+"\n"
+"_env := serialize (_ctx);\n"
+"}\n"
+"--src useraggr.sql:335\n";
+
+static const char *proc20 = 
+"#line 361 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_INTERCEPT_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"declare c integer;\n"
+"c := aref (_ctx, 0);\n"
+"if ((c = 0) or (c = 1))\n"
+"return null;\n"
+"\n"
+"return aref (_ctx, 1) / c - REGR_SLOPE_FIN (aref (_ctx, 3)) * aref (_ctx, 2) / c;\n"
+"}\n"
+"--src useraggr.sql:359\n";
+
+static const char *other10 = 
+"create aggregate DB.DBA.REGR_INTERCEPT (in expr1 numeric, in expr2 numeric) returns numeric from REGR_INTERCEPT_INIT, REGR_INTERCEPT_ACC, REGR_INTERCEPT_FIN\n";
+
+static const char *proc21 = 
+"#line 380 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_COUNT_INIT (inout _env integer)\n"
+"{\n"
+"_env := 0;\n"
+"}\n"
+"--src useraggr.sql:378\n";
+
+static const char *proc22 = 
+"#line 387 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_COUNT_ACC (inout _env integer, in expr numeric, in expr2 numeric)\n"
+"{\n"
+"if ((_env is null) or (expr is null) or (expr2 is null))\n"
+"return;\n"
+"_env := _env + 1;\n"
+"}\n"
+"--src useraggr.sql:385\n";
+
+static const char *proc23 = 
+"#line 396 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_COUNT_FIN (inout _env integer)\n"
+"{\n"
+"return _env;\n"
+"}\n"
+"--src useraggr.sql:394\n";
+
+static const char *proc24 = 
+"#line 403 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_COUNT_MERGE (inout _e1 integer, inout _e2 integer)\n"
+"{\n"
+"_e1 := _e1 + _e2;\n"
+"}\n"
+"--src useraggr.sql:401\n";
+
+static const char *other11 = 
+"create aggregate DB.DBA.REGR_COUNT (in expr1 numeric, in expr2 numeric) returns numeric from REGR_COUNT_INIT, REGR_COUNT_ACC, REGR_COUNT_FIN, REGR_COUNT_MERGE\n";
+
+static const char *proc25 = 
+"#line 413 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_AVG_ACC (inout _env varchar, in expr1 numeric, in expr2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"\n"
+"if ( (expr1 is null) or (expr2 is null))\n"
+"return;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"aset (_ctx, 0, aref (_ctx, 0) + 1);\n"
+"aset (_ctx, 1, aref (_ctx, 1) + expr1);\n"
+"aset (_ctx, 2, aref (_ctx, 2) + expr2);\n"
+"\n"
+"_env := serialize (_ctx);\n"
+"}\n"
+"--src useraggr.sql:411\n";
+
+static const char *proc26 = 
+"#line 432 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_AVGX_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"if (aref (_ctx, 0) = 0)\n"
+"return null;\n"
+"return aref (_ctx, 1) / aref (_ctx,0);\n"
+"}\n"
+"--src useraggr.sql:430\n";
+
+static const char *proc27 = 
+"#line 445 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_AVGY_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"if (aref (_ctx, 0) = 0)\n"
+"return null;\n"
+"return aref (_ctx, 2) / aref (_ctx,0);\n"
+"}\n"
+"--src useraggr.sql:443\n";
+
+static const char *other12 = 
+"create aggregate DB.DBA.REGR_AVGX (in x numeric, in y numeric) returns numeric from\n"
+"STD12_INIT, REGR_AVG_ACC, REGR_AVGX_FIN\n";
+
+static const char *other13 = 
+"create aggregate DB.DBA.REGR_AVGY (in x numeric, in y numeric) returns numeric from\n"
+"STD12_INIT, REGR_AVG_ACC, REGR_AVGY_FIN\n";
+
+static const char *proc28 = 
+"#line 466 \"[executable]/useraggr.sql\"\n"
+" create procedure CORR_INIT (inout _env varchar)\n"
+"{\n"
+"declare _ctx_cov varchar;\n"
+"declare _ctx_stdev1 varchar;\n"
+"declare _ctx_stdev2 varchar;\n"
+"\n"
+"STD13_INIT (_ctx_cov);\n"
+"STD12_INIT (_ctx_stdev1);\n"
+"STD12_INIT (_ctx_stdev2);\n"
+"\n"
+"_env := serialize (vector (0, _ctx_cov, _ctx_stdev1, _ctx_stdev2));\n"
+"}\n"
+"--src useraggr.sql:464\n";
+
+static const char *proc29 = 
+"#line 481 \"[executable]/useraggr.sql\"\n"
+" create procedure CORR_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if ((e1 is null) or (e2 is null))\n"
+"return;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _ctx_cov varchar;\n"
+"declare _ctx_stdev1 varchar;\n"
+"declare _ctx_stdev2 varchar;\n"
+"\n"
+"_ctx_cov := aref (_ctx, 1);\n"
+"_ctx_stdev1 := aref (_ctx, 2);\n"
+"_ctx_stdev2 := aref (_ctx, 3);\n"
+"\n"
+"COVAR_ACC (_ctx_cov, e1, e2);\n"
+"VAR_ACC (_ctx_stdev1, e1);\n"
+"VAR_ACC (_ctx_stdev2, e2);\n"
+"\n"
+"aset (_ctx, 0, aref (_ctx, 0) + 1);\n"
+"aset (_ctx, 1, _ctx_cov);\n"
+"aset (_ctx, 2, _ctx_stdev1);\n"
+"aset (_ctx, 3, _ctx_stdev2);\n"
+"\n"
+"_env := serialize (_ctx);\n"
+"}\n"
+"--src useraggr.sql:479\n";
+
+static const char *proc30 = 
+"#line 512 \"[executable]/useraggr.sql\"\n"
+" create procedure CORR_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _ctx_cov_val numeric;\n"
+"declare _ctx_stdev1_val numeric;\n"
+"declare _ctx_stdev2_val numeric;\n"
+"\n"
+"_ctx_cov_val := COVAR_POP_FIN (aref (_ctx, 1));\n"
+"_ctx_stdev1_val := STDDEV_POP_FIN (aref (_ctx, 2));\n"
+"_ctx_stdev2_val := STDDEV_POP_FIN (aref (_ctx, 3));\n"
+"\n"
+"if (_ctx_cov_val is null)\n"
+"return null;\n"
+"if (_ctx_stdev1_val is null or _ctx_stdev1_val = 0)\n"
+"return null;\n"
+"if (_ctx_stdev2_val is null or _ctx_stdev2_val = 0)\n"
+"return null;\n"
+"\n"
+"return _ctx_cov_val / _ctx_stdev1_val / _ctx_stdev2_val;\n"
+"}\n"
+"--src useraggr.sql:510\n";
+
+static const char *other14 = 
+"create aggregate DB.DBA.CORR (in x numeric, in y numeric) returns numeric from\n"
+"CORR_INIT, CORR_ACC, CORR_FIN\n";
+
+static const char *proc31 = 
+"#line 543 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_R2_INIT (inout _env varchar)\n"
+"{\n"
+"declare _ctx_vp1 varchar;\n"
+"declare _ctx_vp2 varchar;\n"
+"declare _ctx_corr varchar;\n"
+"\n"
+"STD12_INIT (_ctx_vp1);\n"
+"STD12_INIT (_ctx_vp2);\n"
+"CORR_INIT (_ctx_corr);\n"
+"\n"
+"_env := serialize (vector (_ctx_vp1, _ctx_vp2, _ctx_corr));\n"
+"}\n"
+"--src useraggr.sql:541\n";
+
+static const char *proc32 = 
+"#line 558 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_R2_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if (e1 is null or e2 is null)\n"
+"return;\n"
+"declare _ctx  any;\n"
+"\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _ctx_vp1 varchar;\n"
+"declare _ctx_vp2 varchar;\n"
+"declare _ctx_corr varchar;\n"
+"\n"
+"_ctx_vp1 := aref (_ctx, 0);\n"
+"_ctx_vp2 := aref (_ctx, 1);\n"
+"_ctx_corr := aref (_ctx, 2);\n"
+"\n"
+"VAR_ACC (_ctx_vp1, e1);\n"
+"VAR_ACC (_ctx_vp2, e2);\n"
+"CORR_ACC (_ctx_corr, e1, e2);\n"
+"\n"
+"aset (_ctx, 0, _ctx_vp1);\n"
+"aset (_ctx, 1, _ctx_vp2);\n"
+"aset (_ctx, 2, _ctx_corr);\n"
+"\n"
+"_env := serialize (_ctx);\n"
+"}\n"
+"--src useraggr.sql:556\n";
+
+static const char *proc33 = 
+"#line 589 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_R2_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _vp1 numeric;\n"
+"declare _vp2 numeric;\n"
+"declare _corr numeric;\n"
+"\n"
+"_vp2 := VAR_POP_FIN (aref(_ctx, 1));\n"
+"if (_vp2 is null or _vp2 = 0)\n"
+"return null;\n"
+"_vp1 := VAR_POP_FIN (aref(_ctx, 0));\n"
+"if (_vp1 is null or _vp1 = 0)\n"
+"return 1;\n"
+"_corr := CORR_FIN (aref (_ctx, 2));\n"
+"return _corr * _corr;\n"
+"}\n"
+"--src useraggr.sql:587\n";
+
+static const char *other15 = 
+"create aggregate DB.DBA.REGR_R2 (in e1 numeric, in e2 numeric) returns numeric from\n"
+"REGR_R2_INIT, REGR_R2_ACC, REGR_R2_FIN\n";
+
+static const char *proc34 = 
+"#line 617 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SXX_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if (e1 is null or e2 is null)\n"
+"return;\n"
+"\n"
+"VAR_ACC (_env, e2);\n"
+"}\n"
+"--src useraggr.sql:615\n";
+
+static const char *proc35 = 
+"#line 629 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SYY_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if (e1 is null or e2 is null)\n"
+"return;\n"
+"\n"
+"VAR_ACC (_env, e1);\n"
+"}\n"
+"--src useraggr.sql:627\n";
+
+static const char *proc36 = 
+"#line 641 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SXY_ACC (inout _env varchar, in e1 numeric, in e2 numeric)\n"
+"{\n"
+"if (_env is null)\n"
+"return;\n"
+"if (e1 is null or e2 is null)\n"
+"return;\n"
+"\n"
+"COVAR_ACC (_env, e1, e2);\n"
+"}\n"
+"--src useraggr.sql:639\n";
+
+static const char *proc37 = 
+"#line 653 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_S___FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _var numeric;\n"
+"\n"
+"_var := VAR_POP_FIN (_env);\n"
+"if (_var is null)\n"
+"return null;\n"
+"return aref (_ctx,0) * _var;\n"
+"}\n"
+"--src useraggr.sql:651\n";
+
+static const char *proc38 = 
+"#line 670 \"[executable]/useraggr.sql\"\n"
+" create procedure REGR_SXY_FIN (inout _env varchar)\n"
+"{\n"
+"if (_env is null)\n"
+"return null;\n"
+"declare _ctx any;\n"
+"_ctx := deserialize (_env);\n"
+"\n"
+"declare _var numeric;\n"
+"\n"
+"_var := COVAR_POP_FIN (_env);\n"
+"if (_var is null)\n"
+"return null;\n"
+"return aref (_ctx,0) * _var;\n"
+"}\n"
+"--src useraggr.sql:668\n";
+
+static const char *other16 = 
+"create aggregate DB.DBA.REGR_SXX (in e1 numeric, in e2 numeric) returns numeric from\n"
+"STD12_INIT, REGR_SXX_ACC, REGR_S___FIN\n";
+
+static const char *other17 = 
+"create aggregate DB.DBA.REGR_SYY (in e1 numeric, in e2 numeric) returns numeric from\n"
+"STD12_INIT, REGR_SYY_ACC, REGR_S___FIN\n";
+
+static const char *other18 = 
+"create aggregate DB.DBA.REGR_SXY (in e1 numeric, in e2 numeric) returns numeric from\n"
+"STD13_INIT, REGR_SXY_ACC, REGR_SXY_FIN\n";
+
+static const char *proc39 = 
+"#line 699 \"[executable]/useraggr.sql\"\n"
+" create procedure xte_nodebld_final_root (in acc any) returns any\n"
+"{\n"
+"return xte_nodebld_xmlagg_final (acc, xte_head (UNAME\' root\'));\n"
+"}\n"
+"--src useraggr.sql:697\n";
+
+static const char *other19 = 
+"create aggregate DB.DBA.XMLAGG (in _child any) returns any\n"
+"from xte_nodebld_init, xte_nodebld_xmlagg_acc, xte_nodebld_final_root\n";
+
+static const char *other20 = 
+"create aggregate DB.DBA.VECTOR_AGG (in _child any) returns any\n"
+"from vectorbld_init, vectorbld_agg_acc, vectorbld_agg_final\n"
+"order\n";
+
+static const char *other21 = 
+"create aggregate DB.DBA.VECTOR_OF_NONNULLS_AGG (in _child any) returns any\n"
+"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vectorbld_agg_final\n"
+"order\n";
+
+static const char *other22 = 
+"create aggregate DB.DBA.VECTOR_OR_NULL_AGG (in _child any) returns any\n"
+"from vectorbld_init, vectorbld_agg_acc, vector_or_null_bld_agg_final\n"
+"order\n";
+
+static const char *other23 = 
+"create aggregate DB.DBA.VECTOR_OF_NONNULLS_OR_NULL_AGG (in _child any) returns any\n"
+"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vector_or_null_bld_agg_final\n"
+"order\n";
+
+static const char *other24 = 
+"create aggregate DB.DBA.VECTOR_CONCAT_AGG (in _child any) returns any\n"
+"from vectorbld_init, vectorbld_concat_agg_acc, vectorbld_agg_final\n"
+"order\n";
+
+static const char *other25 = 
+"create aggregate DB.DBA.XQ_SEQUENCE_AGG (in _child any) returns any\n"
+"from xq_sequencebld_init, xq_sequencebld_agg_acc, xq_sequencebld_agg_final\n"
+"order\n";
+
+static const char *other26 = 
+"create aggregate DB.DBA.BAG_AGG (in _child any) returns any\n"
+"from vectorbld_init, vectorbld_agg_acc, vectorbld_agg_final\n";
+
+static const char *other27 = 
+"create aggregate DB.DBA.BAG_OF_NONNULLS_AGG (in _child any) returns any\n"
+"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vectorbld_agg_final\n";
+
+static const char *other28 = 
+"create aggregate DB.DBA.BAG_OR_NULL_AGG (in _child any) returns any\n"
+"from vectorbld_init, vectorbld_agg_acc, vector_or_null_bld_agg_final\n";
+
+static const char *other29 = 
+"create aggregate DB.DBA.BAG_OF_NONNULLS_OR_NULL_AGG (in _child any) returns any\n"
+"from vectorbld_init, vector_of_nonnulls_bld_agg_acc, vector_or_null_bld_agg_final\n";
+
+static const char *other30 = 
+"create aggregate DB.DBA.BAG_CONCAT_AGG (in _child any) returns any\n"
+"from vectorbld_init, vectorbld_concat_agg_acc, vectorbld_agg_final\n";
+
+static const char *proc40 = 
+"#line 762 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.GROUP_CONCAT_INIT (inout _env any)\n"
+"{\n"
+"_env := 0;\n"
+"}\n"
+"--src useraggr.sql:760\n";
+
+static const char *proc41 = 
+"#line 769 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.GROUP_CONCAT_ACC (inout _env any, in token varchar, in delim varchar)\n"
+"{\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"if (__tag of varchar <> __tag (_env))\n"
+"_env := cast (token as varchar);\n"
+"else if (delim is not null)\n"
+"_env := concat (_env, cast (delim as varchar), cast (token as varchar));\n"
+"else\n"
+"_env := concat (_env, cast (token as varchar));\n"
+"}\n"
+"--src useraggr.sql:767\n";
+
+static const char *proc42 = 
+"#line 786 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.GROUP_CONCAT_FIN (inout _env any)\n"
+"{\n"
+"\n"
+"\n"
+"\n"
+"if (__tag of varchar <> __tag (_env))\n"
+"return \'\';\n"
+"return _env;\n"
+"}\n"
+"--src useraggr.sql:784\n";
+
+static const char *other31 = 
+"create aggregate DB.DBA.GROUP_CONCAT (in token varchar, in delim varchar) returns varchar\n"
+"from DB.DBA.GROUP_CONCAT_INIT, DB.DBA.GROUP_CONCAT_ACC, DB.DBA.GROUP_CONCAT_FIN\n"
+"order\n";
+
+static const char *proc43 = 
+"#line 804 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.GROUP_DIGEST_INIT (inout _env any)\n"
+"{\n"
+"_env := 0;\n"
+"}\n"
+"--src useraggr.sql:802\n";
+
+static const char *proc44 = 
+"#line 811 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.GROUP_DIGEST_ACC (inout _env any, in token varchar, in delim varchar, in maxlen integer, in mode integer)\n"
+"{\n"
+"declare curlen integer;\n"
+"declare env_vec, items any;\n"
+"if (__tag of varchar <> __tag (token))\n"
+"{\n"
+"token := cast (token as varchar);\n"
+"if (token is null)\n"
+"return;\n"
+"}\n"
+"if (__tag of varchar <> __tag (_env))\n"
+"{\n"
+"if (length (token) > maxlen)\n"
+"token := subseq (token, 0, maxlen+1);\n"
+"_env := serialize (vector_zap_args (vector_zap_args (token), cast (delim as varchar), maxlen));\n"
+"return;\n"
+"}\n"
+"curlen := length (_env);\n"
+"if (curlen >= maxlen)\n"
+"return;\n"
+"env_vec := deserialize (_env);\n"
+"items := aref_set_0 (env_vec, 0);\n"
+"if (bit_and (mode, 1))\n"
+"{\n"
+"if (0 < position (token, items))\n"
+"return;\n"
+"}\n"
+"if (length (token) > (env_vec[2] - curlen))\n"
+"token := subseq (token, 0, (env_vec[2] - curlen)+1);\n"
+"items := vector_concat (items, vector_zap_args (token));\n"
+"aset_zap_arg (env_vec, 0, items);\n"
+"_env := serialize (env_vec);\n"
+"}\n"
+"--src useraggr.sql:809\n";
+
+static const char *proc45 = 
+"#line 847 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.GROUP_DIGEST_FIN (inout _env any)\n"
+"{\n"
+"declare envlen, curlen, maxlen, itemctr, itemcount, delim_len, rest_len integer;\n"
+"declare env_vec, items, ses any;\n"
+"declare delim varchar;\n"
+"if (__tag of varchar <> __tag (_env))\n"
+"return \'\';\n"
+"envlen := length (_env);\n"
+"env_vec := deserialize (_env);\n"
+"items := aref_set_0 (env_vec, 0);\n"
+"delim := aref_set_0 (env_vec, 1);\n"
+"rest_len := maxlen := aref_set_0 (env_vec, 2);\n"
+"ses := string_output ();\n"
+"itemctr := 0;\n"
+"itemcount := length (items);\n"
+"delim_len := length (delim);\n"
+"for (itemctr := 0; itemctr < itemcount; itemctr := itemctr + 1)\n"
+"{\n"
+"declare itm varchar;\n"
+"declare itm_len integer;\n"
+"if (delim_len > (rest_len-5))\n"
+"goto items_done;\n"
+"if (itemctr)\n"
+"{\n"
+"http (delim, ses);\n"
+"rest_len := rest_len - delim_len;\n"
+"}\n"
+"itm := items [itemctr];\n"
+"itm_len := length (itm);\n"
+"if ((itm_len > rest_len) or ((envlen > maxlen) and (itemctr = itemcount-1)))\n"
+"{\n"
+"itm := subseq (itm, 0, rest_len);\n"
+"itm_len := coalesce (__max_notnull (strrchr (itm, 32), strrchr (itm, 10), strrchr (itm, 13)), 0);\n"
+"while ((itm_len > 0) and (itm [itm_len-1] in (32, 10, 13)))\n"
+"itm_len := itm_len - 1;\n"
+"if (0 = itm_len)\n"
+"http (subseq (itm, 0, rest_len-3), ses);\n"
+"else\n"
+"http (subseq (itm, 0, itm_len), ses);\n"
+"http (\'...\', ses);\n"
+"goto items_done;\n"
+"}\n"
+"http (itm, ses);\n"
+"rest_len := rest_len - itm_len;\n"
+"}\n"
+"items_done:\n"
+"return string_output_string (ses);\n"
+"}\n"
+"--src useraggr.sql:845\n";
+
+static const char *other32 = 
+"create aggregate DB.DBA.GROUP_DIGEST (in token varchar, in delim varchar, in maxlen integer, in mode integer) returns varchar\n"
+"from DB.DBA.GROUP_DIGEST_INIT, DB.DBA.GROUP_DIGEST_ACC, DB.DBA.GROUP_DIGEST_FIN\n"
+"order\n";
+
+static const char *proc46 = 
+"#line 904 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.SAMPLE_INIT (inout _env any)\n"
+"{\n"
+"_env := null;\n"
+"}\n"
+"--src useraggr.sql:902\n";
+
+static const char *proc47 = 
+"#line 911 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.SAMPLE_ACC (inout _env any, in sample any)\n"
+"{\n"
+"if (_env is not null)\n"
+"return;\n"
+"_env := sample;\n"
+"}\n"
+"--src useraggr.sql:909\n";
+
+static const char *proc48 = 
+"#line 920 \"[executable]/useraggr.sql\"\n"
+" create procedure DB.DBA.SAMPLE_FIN (inout _env any)\n"
+"{\n"
+"return _env;\n"
+"}\n"
+"--src useraggr.sql:918\n";
+
+static const char *other33 = 
+"create aggregate DB.DBA.SAMPLE (in sample any) returns any\n"
+"from DB.DBA.SAMPLE_INIT, DB.DBA.SAMPLE_ACC, DB.DBA.SAMPLE_FIN\n"
+"order\n";
+
+/* sparql_init.sql */
+
+static const char *proc49 = 
+"#line 24 \"[executable]/sparql_init.sql\"\n"
+"create function DB.DBA.RDF_LANGUAGE_OF_LONG (in longobj any, in dflt varchar := \'\') returns any\n"
+"{\n"
+"if (__tag of rdf_box = __tag (longobj))\n"
+"{\n"
+"declare twobyte integer;\n"
+"declare res varchar;\n"
+"twobyte := rdf_box_lang (longobj);\n"
+"if (257 = twobyte)\n"
+"return dflt;\n"
+"whenever not found goto badlang;\n"
+"select lower (RL_ID) into res from DB.DBA.RDF_LANGUAGE where RL_TWOBYTE = twobyte;\n"
+"return res;\n"
+"\n"
+"badlang:\n"
+"signal (\'RDFXX\', sprintf (\'Unknown language in DB.DBA.RDF_LANGUAGE_OF_LONG, bad id %d\', twobyte));\n"
+"}\n"
+"return case (isiri_id (longobj)) when 0 then dflt else null end;\n"
+"}\n"
+"--src sparql_init.sql:22\n";
+
+static const char *proc50 = 
+"#line 47 \"[executable]/sparql_init.sql\"\n"
+"create function DB.DBA.JSO_MAKE_INHERITANCE (in jgraph varchar, in class varchar, in rootinst varchar, in destinst varchar, in dest_iid iri_id, inout noinherits any, inout inh_stack any)\n"
+"{\n"
+"declare base_iid iri_id;\n"
+"declare baseinst varchar;\n"
+"\n"
+"inh_stack := vector_concat (inh_stack, vector (destinst));\n"
+"baseinst := null;\n"
+"if (not exists (sparql\n"
+"define input:storage \"\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"ask where {\n"
+"graph ?:jgraph { ?:dest_iid rdf:type `iri(?:class)`\n"
+"} } ) )\n"
+"signal (\'22023\', \'JSO_MAKE_INHERITANCE has not found object <\' || destinst || \'> of type <\' || class || \'>\');\n"
+"/* This fails. !!!TBD: fix sparql2sql.c to preserve data about equalities, fixed values and globals when triples are moved from gp to gp\n"
+"for (sparql\n"
+"define input:storage \"\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"select ?srcinst\n"
+"where {\n"
+"graph ?:jgraph {\n"
+"{ {\n"
+"?destnode rdf:type `iri(?:class)` .\n"
+"filter (?destnode = iri(?:destinst)) }\n"
+"union\n"
+"{\n"
+"?destnode rdf:type `iri(?:class)` .\n"
+"?destnode rdf:name `iri(?:destinst)` } } .\n"
+"?destnode virtrdf:inheritFrom ?srcinst .\n"
+"?srcinst rdf:type `iri(?:class)` .\n"
+"} } ) do\n"
+"*/\n"
+"for (sparql\n"
+"define input:storage \"\"\n"
+"define output:valmode \"LONG\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"select ?src_iid\n"
+"where {\n"
+"graph ?:jgraph { ?:dest_iid virtrdf:inheritFrom ?src_iid } } ) do\n"
+"{\n"
+"declare srcinst varchar;\n"
+"srcinst := id_to_iri_nosignal (\"src_iid\");\n"
+"if (baseinst is null)\n"
+"{\n"
+"if (not exists (sparql\n"
+"define input:storage \"\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"ask where { graph ?:jgraph { ?:\"src_iid\" rdf:type `iri(?:class)` } } ) )\n"
+"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || destinst || \'> has wrong virtrdf:inheritFrom <\' || srcinst || \'> that is not an instance of type <\' || class || \'>\');\n"
+"base_iid := \"src_iid\";\n"
+"baseinst := srcinst;\n"
+"}\n"
+"else if (baseinst <> srcinst)\n"
+"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || destinst || \'> has multiple virtrdf:inheritFrom declarations: <\' || baseinst || \'> and <\' || srcinst || \'>\');\n"
+"}\n"
+"if (position (baseinst, inh_stack))\n"
+"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || baseinst || \'> is recursively inherited from itself\');\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"for (sparql\n"
+"define input:storage \"\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"select ?pred\n"
+"where {\n"
+"graph ?:jgraph {\n"
+"?:dest_iid virtrdf:noInherit ?pred\n"
+"} } ) do\n"
+"{\n"
+"if (baseinst is null)\n"
+"signal (\'22023\', \'JSO_MAKE_INHERITANCE has found that the object <\' || destinst || \'> has set virtrdf:noInherit but has no virtrdf:inheritFrom\');\n"
+"dict_put (noinherits, \"pred\", destinst);\n"
+"}\n"
+"if (baseinst is null)\n"
+"return;\n"
+"for (select \"pred_id\", \"predval\"\n"
+"from (sparql\n"
+"define input:storage \"\"\n"
+"define output:valmode \"LONG\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"select ?pred_id, ?predval\n"
+"where {\n"
+"graph ?:jgraph {\n"
+"?:base_iid ?pred_id ?predval\n"
+"} } ) as \"t00\"\n"
+"where not exists (sparql\n"
+"define input:storage \"\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"ask where { graph ?:jgraph { ?:\"t00\".\"pred_id\" virtrdf:loadAs virtrdf:jsoTriple } } )\n"
+") do\n"
+"{\n"
+"declare \"pred\" any;\n"
+"\"pred\" := id_to_iri (\"pred_id\");\n"
+"if (DB.DBA.RDF_LANGUAGE_OF_LONG (\"predval\", null) is not null)\n"
+"signal (\'22023\', \'JSO_MAKE_INHERITANCE does not support language marks on objects\');\n"
+"if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\' = \"pred\")\n"
+" ;\n"
+"else if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#name\' = \"pred\")\n"
+" ;\n"
+"else if (\'http://www.openlinksw.com/schemas/virtrdf#inheritFrom\' = \"pred\")\n"
+" ;\n"
+"else if (\'http://www.openlinksw.com/schemas/virtrdf#noInherit\' = \"pred\")\n"
+" ;\n"
+"else if (dict_get (noinherits, \"pred\", baseinst) = baseinst)\n"
+"{\n"
+"jso_set (class, rootinst, \"pred\", __rdf_sqlval_of_obj (\"predval\"), isiri_id (\"predval\"));\n"
+"dict_put (noinherits, \"pred\", baseinst);\n"
+"}\n"
+"}\n"
+"DB.DBA.JSO_MAKE_INHERITANCE (jgraph, class, rootinst, baseinst, base_iid, noinherits, inh_stack);\n"
+"}\n"
+"--src sparql_init.sql:45\n";
+
+static const char *proc51 = 
+"#line 173 \"[executable]/sparql_init.sql\"\n"
+"create function DB.DBA.JSO_LOAD_INSTANCE (in jgraph varchar, in jinst varchar, in delete_first integer, in make_new integer, in jsubj_iid iri_id := 0)\n"
+"{\n"
+"declare jinst_iid, jgraph_iid IRI_ID;\n"
+"declare jclass varchar;\n"
+"declare noinherits, inh_stack, \"p\" any;\n"
+"\n"
+"noinherits := dict_new ();\n"
+"jinst_iid := iri_ensure (jinst);\n"
+"jgraph_iid := iri_ensure (jgraph);\n"
+"if (jsubj_iid is null)\n"
+"{\n"
+"jsubj_iid := (sparql\n"
+"define input:storage \"\"\n"
+"define output:valmode \"LONG\"\n"
+"select ?s\n"
+"where { graph ?:jgraph { ?s rdf:name ?:jinst } } );\n"
+"if (jsubj_iid is null)\n"
+"jsubj_iid := jinst_iid;\n"
+"}\n"
+"jclass := (sparql\n"
+"define input:storage \"\"\n"
+"select ?t\n"
+"where {\n"
+"graph ?:jgraph { ?:jsubj_iid rdf:type ?t } } );\n"
+"if (jclass is null)\n"
+"{\n"
+"if (exists (sparql\n"
+"define input:storage \"\"\n"
+"select ?x\n"
+"where { graph ?:jgraph {\n"
+"{ ?:jinst ?x ?o }\n"
+"union\n"
+"{ ?x rdf:name ?ji .\n"
+"filter (str (?ji) = ?:jinst)\n"
+"} } } ) )\n"
+"signal (\'22023\', \'JSO_LOAD_INSTANCE can not detect the type of <\' || jinst || \'>\');\n"
+"else\n"
+"signal (\'22023\', \'JSO_LOAD_INSTANCE can not find an object <\' || jinst || \'>\');\n"
+"}\n"
+"if (delete_first)\n"
+"jso_delete (jclass, jinst, 1);\n"
+"if (make_new)\n"
+"jso_new (jclass, jinst);\n"
+"for (select \"p_id\", coalesce (\"o2\", \"o1\") as \"o\"\n"
+"from (sparql\n"
+"define input:storage \"\"\n"
+"define output:valmode \"LONG\"\n"
+"select ?p_id ?o1 ?o2\n"
+"where {\n"
+"graph ?:jgraph {\n"
+"{ ?:jsubj_iid ?p_id ?o1 }  optional { ?o1 rdf:name ?o2 }\n"
+"} }\n"
+") as \"t00\"\n"
+"where not exists (sparql\n"
+"define input:storage \"\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"ask where { graph ?:jgraph_iid { ?:\"t00\".\"p_id\" virtrdf:loadAs virtrdf:jsoTriple } } ) option (quietcast)\n"
+") do\n"
+"{\n"
+"\"p\" := id_to_iri (\"p_id\");\n"
+"if (DB.DBA.RDF_LANGUAGE_OF_LONG (\"o\", null) is not null)\n"
+"signal (\'22023\', \'JSO_LOAD_INSTANCE does not support language marks on objects\');\n"
+"if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#type\' = \"p\")\n"
+"{\n"
+"if (__rdf_sqlval_of_obj (\"o\") <> jclass)\n"
+"signal (\'22023\', \'JSO_LOAD_INSTANCE has found that the object <\' || jinst || \'> has multiple type declarations\');\n"
+"}\n"
+"else if (\'http://www.w3.org/1999/02/22-rdf-syntax-ns#name\' = \"p\")\n"
+" ;\n"
+"else if (\'http://www.openlinksw.com/schemas/virtrdf#inheritFrom\' = \"p\")\n"
+" ;\n"
+"else if (\'http://www.openlinksw.com/schemas/virtrdf#noInherit\' = \"p\")\n"
+" ;\n"
+"else\n"
+"{\n"
+"jso_set (jclass, jinst, \"p\", __rdf_sqlval_of_obj (\"o\"), isiri_id (\"o\"));\n"
+"dict_put (noinherits, \"p\", jinst);\n"
+"}\n"
+"}\n"
+"inh_stack := vector ();\n"
+"DB.DBA.JSO_MAKE_INHERITANCE (jgraph, jclass, jinst, jinst, jsubj_iid, noinherits, inh_stack);\n"
+"}\n"
+"--src sparql_init.sql:171\n";
+
+static const char *proc52 = 
+"#line 257 \"[executable]/sparql_init.sql\"\n"
+"create procedure DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (in jgraph varchar, out instances any)\n"
+"{\n"
+"declare md, res, st, msg any;\n"
+"st:= \'00000\';\n"
+"exec (\n"
+"\'select DB.DBA.VECTOR_AGG (\n"
+"vector (\n"
+"id_to_iri (\"jclass\"),\n"
+"id_to_iri (\"jinst\"),\n"
+"coalesce (\"s\", \"jinst\") ) )\n"
+"from ( sparql\n"
+"define output:valmode \"LONG\"\n"
+"define input:storage \"\"\n"
+"select ?jclass ?jinst ?s\n"
+"where {\n"
+"graph ?? {\n"
+"{ ?jinst rdf:type ?jclass .\n"
+"filter (!isBLANK (?jinst)) }\n"
+"union\n"
+"{ ?s rdf:type ?jclass .\n"
+"?s rdf:name ?jinst .\n"
+"filter (isBLANK (?s))\n"
+"} } }\n"
+") as inst\',\n"
+"st, msg, vector (jgraph), 1, md, res);\n"
+"if (st <> \'00000\') signal (st, msg);\n"
+"instances := res[0][0];\n"
+"}\n"
+"--src sparql_init.sql:255\n";
+
+static const char *proc53 = 
+"#line 287 \"[executable]/sparql_init.sql\"\n"
+"create function DB.DBA.JSO_LOAD_GRAPH (in jgraph varchar, in pin_now integer := 1)\n"
+"{\n"
+"declare jgraph_iid IRI_ID;\n"
+"declare instances, chk any;\n"
+"\n"
+"log_text (\'DB.DBA.JSO_LOAD_GRAPH (?,?)\', jgraph, pin_now);\n"
+"jgraph_iid := iri_ensure (jgraph);\n"
+"DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);\n"
+"/* Pass 1. Deleting all obsolete instances. */\n"
+"foreach (any j in instances) do\n"
+"jso_delete (j[0], j[1], 1);\n"
+"/* Pass 2. Creating all instances. */\n"
+"foreach (any j in instances) do\n"
+"jso_new (j[0], j[1]);\n"
+"/* Pass 3. Loading all instances, including loading inherited values. */\n"
+"foreach (any j in instances) do\n"
+"DB.DBA.JSO_LOAD_INSTANCE (jgraph, j[1], 0, 0, j[2]);\n"
+"/* Pass 4. Validation all instances. */\n"
+"foreach (any j in instances) do\n"
+"jso_validate (j[0], j[1], 1);\n"
+"/* Pass 5. Pin all instances. */\n"
+"if (pin_now)\n"
+"{\n"
+"foreach (any j in instances) do\n"
+"jso_pin (j[0], j[1]);\n"
+"}\n"
+"/* Pass 6. Load all separate triples */\n"
+"exec (\'sparql\n"
+"define input:storage \"\"\n"
+"define sql:table-option \"LOOP\"\n"
+"prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>\n"
+"select (bif:jso_triple_add (?s, ?p, ?o))\n"
+"where { graph <\' || id_to_iri (jgraph_iid) || \'> { ?p virtrdf:loadAs virtrdf:jsoTriple . ?s ?p ?o } }\');\n"
+"chk := jso_triple_get_objs (\n"
+"UNAME\'http://www.openlinksw.com/schemas/virtrdf#loadAs\',\n"
+"UNAME\'http://www.openlinksw.com/schemas/virtrdf#loadAs\' );\n"
+"if ((1 <> length (chk)) or (cast (chk[0] as varchar) <> \'http://www.openlinksw.com/schemas/virtrdf#jsoTriple\'))\n"
+"signal (\'22023\', \'JSO_LOAD_GRAPH has not found expected metadata in the graph\');\n"
+"}\n"
+"--src sparql_init.sql:285\n";
+
+static const char *proc54 = 
+"#line 328 \"[executable]/sparql_init.sql\"\n"
+"create function DB.DBA.JSO_PIN_GRAPH (in jgraph varchar)\n"
+"{\n"
+"declare instances any;\n"
+"log_text (\'DB.DBA.JSO_PIN_GRAPH (?)\', jgraph);\n"
+"DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH (jgraph, instances);\n"
+"foreach (any j in instances) do\n"
+"jso_pin (j[0], j[1]);\n"
+"}\n"
+"--src sparql_init.sql:326\n";
+
+static const char *proc55 = 
+"#line 339 \"[executable]/sparql_init.sql\"\n"
+" create function DB.DBA.JSO_SYS_GRAPH () returns varchar\n"
+"{\n"
+"return \'http://www.openlinksw.com/schemas/virtrdf#\';\n"
+"}\n"
+"--src sparql_init.sql:337\n";
+
+static const char *proc56 = 
+"#line 346 \"[executable]/sparql_init.sql\"\n"
+"create procedure DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO (in graphiri varchar := null)\n"
+"{\n"
+"if (graphiri is null)\n"
+"graphiri := DB.DBA.JSO_SYS_GRAPH();\n"
+"if (not exists (select 1 from SYS_KEYS where KEY_TABLE = \'DB.DBA.RDF_QUAD\'))\n"
+"return;\n"
+"DB.DBA.JSO_LOAD_GRAPH (graphiri, 0);\n"
+"DB.DBA.JSO_PIN_GRAPH (graphiri);\n"
+"}\n"
+"--src sparql_init.sql:344\n";
+
+static const char *other34 = 
+"DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO ()\n";
+static int
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
+{
+  query_t *proc = NULL;
+  char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
+	cli->cli_qualifier, CLI_OWNER (cli));
+  if (full_name)
+    proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
+  return (proc != NULL);
+}
+
+#define DEFINE_PROC(name, proc) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
+     ddl_std_proc_1 (proc, 0x0, 1)
+
+
+#define DEFINE_PUBLIC_PROC(name, proc) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
+     ddl_std_proc_1 (proc, 0x1, 1)
+
+
+#define DEFINE_OVERWRITE_PROC(name, proc) \
+   ddl_std_proc_1 (proc, 0x1, 1)
+
+
+void
+sqls_define_sparql_init (void)
+{
+  /* useraggr.sql */
+ 
+  DEFINE_PUBLIC_PROC ("STD_COUNT", proc0); 
+  DEFINE_PUBLIC_PROC ("STD11_INIT", proc1); 
+  DEFINE_PUBLIC_PROC ("STD12_INIT", proc2); 
+  DEFINE_PUBLIC_PROC ("STD13_INIT", proc3); 
+  DEFINE_PUBLIC_PROC ("VAR_ACC", proc4); 
+  DEFINE_PUBLIC_PROC ("VAR_POP_FIN", proc5); 
+  DEFINE_PUBLIC_PROC ("VAR_SAMP_FIN", proc6); 
+  DEFINE_PUBLIC_PROC ("VAR_FIN", proc7); 
+  DEFINE_PUBLIC_PROC ("STDDEV_POP_FIN", proc8); 
+  DEFINE_PUBLIC_PROC ("STDDEV_SAMP_FIN", proc9); 
+  DEFINE_PUBLIC_PROC ("STDDEV_FIN", proc10); 
+  DEFINE_PUBLIC_PROC ("COVAR_ACC", proc11); 
+  DEFINE_PUBLIC_PROC ("COVAR_SAMP_FIN", proc12); 
+  DEFINE_PUBLIC_PROC ("COVAR_POP_FIN", proc13); 
+  DEFINE_PUBLIC_PROC ("COVAR_FIN", proc14);
+  ddl_ensure_table ("do this always", other0);
+  ddl_ensure_table ("do this always", other1);
+  ddl_ensure_table ("do this always", other2);
+  ddl_ensure_table ("do this always", other3);
+  ddl_ensure_table ("do this always", other4);
+  ddl_ensure_table ("do this always", other5);
+  ddl_ensure_table ("do this always", other6);
+  ddl_ensure_table ("do this always", other7);
+  ddl_ensure_table ("do this always", other8); 
+  DEFINE_PUBLIC_PROC ("REGR_SLOPE_INIT", proc15); 
+  DEFINE_PUBLIC_PROC ("REGR_SLOPE_ACC", proc16); 
+  DEFINE_PUBLIC_PROC ("REGR_SLOPE_FIN", proc17);
+  ddl_ensure_table ("do this always", other9); 
+  DEFINE_PUBLIC_PROC ("REGR_INTERCEPT_INIT", proc18); 
+  DEFINE_PUBLIC_PROC ("REGR_INTERCEPT_ACC", proc19); 
+  DEFINE_PUBLIC_PROC ("REGR_INTERCEPT_FIN", proc20);
+  ddl_ensure_table ("do this always", other10); 
+  DEFINE_PUBLIC_PROC ("REGR_COUNT_INIT", proc21); 
+  DEFINE_PUBLIC_PROC ("REGR_COUNT_ACC", proc22); 
+  DEFINE_PUBLIC_PROC ("REGR_COUNT_FIN", proc23); 
+  DEFINE_PUBLIC_PROC ("REGR_COUNT_MERGE", proc24);
+  ddl_ensure_table ("do this always", other11); 
+  DEFINE_PUBLIC_PROC ("REGR_AVG_ACC", proc25); 
+  DEFINE_PUBLIC_PROC ("REGR_AVGX_FIN", proc26); 
+  DEFINE_PUBLIC_PROC ("REGR_AVGY_FIN", proc27);
+  ddl_ensure_table ("do this always", other12);
+  ddl_ensure_table ("do this always", other13); 
+  DEFINE_PUBLIC_PROC ("CORR_INIT", proc28); 
+  DEFINE_PUBLIC_PROC ("CORR_ACC", proc29); 
+  DEFINE_PUBLIC_PROC ("CORR_FIN", proc30);
+  ddl_ensure_table ("do this always", other14); 
+  DEFINE_PUBLIC_PROC ("REGR_R2_INIT", proc31); 
+  DEFINE_PUBLIC_PROC ("REGR_R2_ACC", proc32); 
+  DEFINE_PUBLIC_PROC ("REGR_R2_FIN", proc33);
+  ddl_ensure_table ("do this always", other15); 
+  DEFINE_PUBLIC_PROC ("REGR_SXX_ACC", proc34); 
+  DEFINE_PUBLIC_PROC ("REGR_SYY_ACC", proc35); 
+  DEFINE_PUBLIC_PROC ("REGR_SXY_ACC", proc36); 
+  DEFINE_PUBLIC_PROC ("REGR_S___FIN", proc37); 
+  DEFINE_PUBLIC_PROC ("REGR_SXY_FIN", proc38);
+  ddl_ensure_table ("do this always", other16);
+  ddl_ensure_table ("do this always", other17);
+  ddl_ensure_table ("do this always", other18); 
+  DEFINE_PUBLIC_PROC ("xte_nodebld_final_root", proc39);
+  ddl_ensure_table ("do this always", other19);
+  ddl_ensure_table ("do this always", other20);
+  ddl_ensure_table ("do this always", other21);
+  ddl_ensure_table ("do this always", other22);
+  ddl_ensure_table ("do this always", other23);
+  ddl_ensure_table ("do this always", other24);
+  ddl_ensure_table ("do this always", other25);
+  ddl_ensure_table ("do this always", other26);
+  ddl_ensure_table ("do this always", other27);
+  ddl_ensure_table ("do this always", other28);
+  ddl_ensure_table ("do this always", other29);
+  ddl_ensure_table ("do this always", other30); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.GROUP_CONCAT_INIT", proc40); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.GROUP_CONCAT_ACC", proc41); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.GROUP_CONCAT_FIN", proc42);
+  ddl_ensure_table ("do this always", other31); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.GROUP_DIGEST_INIT", proc43); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.GROUP_DIGEST_ACC", proc44); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.GROUP_DIGEST_FIN", proc45);
+  ddl_ensure_table ("do this always", other32); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SAMPLE_INIT", proc46); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SAMPLE_ACC", proc47); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.SAMPLE_FIN", proc48);
+  ddl_ensure_table ("do this always", other33);
+
+  /* sparql_init.sql */
+
+  DEFINE_PROC ("DB.DBA.RDF_LANGUAGE_OF_LONG", proc49);
+  DEFINE_PROC ("DB.DBA.JSO_MAKE_INHERITANCE", proc50);
+  DEFINE_PROC ("DB.DBA.JSO_LOAD_INSTANCE", proc51);
+  DEFINE_PROC ("DB.DBA.JSO_LIST_INSTANCES_OF_GRAPH", proc52);
+  DEFINE_PROC ("DB.DBA.JSO_LOAD_GRAPH", proc53);
+  DEFINE_PROC ("DB.DBA.JSO_PIN_GRAPH", proc54); 
+  DEFINE_PUBLIC_PROC ("DB.DBA.JSO_SYS_GRAPH", proc55);
+  DEFINE_PROC ("DB.DBA.JSO_LOAD_AND_PIN_SYS_GRAPH_RO", proc56);
+  ddl_ensure_table ("do this always", other34);
+}
+
+
+void
+sqls_arfw_define_sparql_init (void)
+{
+}
diff --git a/libsrc/Wi/sql_code_sys.c b/libsrc/Wi/sql_code_sys.c
index 3962e51..bcf881b 100644
--- a/libsrc/Wi/sql_code_sys.c
+++ b/libsrc/Wi/sql_code_sys.c
@@ -145,8 +145,7 @@ static const char *proc1 =
 
 static const char *proc2 = 
 "#line 199 \"[executable]/users.sql\"\n"
-"create procedure\n"
-"USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)\n"
+"create procedure DB.DBA.USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)\n"
 "{\n"
 "declare _pwd, _pwd_mode, _pwd_mode_data, _login_qual varchar;\n"
 "declare _dav_enable, _sql_enable integer;\n"
@@ -177,7 +176,7 @@ static const char *proc2 =
 "_login_qual := get_keyword_ucase (\'LOGIN_QUALIFIER\', options, \'DB\');\n"
 "_prim_group := get_keyword_ucase (\'PRIMARY_GROUP\', options, NULL);\n"
 "\n"
-"_u_e_mail := get_keyword_ucase (\'E-MAIL\', options, \'\');\n"
+"_u_e_mail := coalesce (get_keyword_ucase (\'E-MAIL\', options), get_keyword_ucase (\'E_MAIL\', options, \'\'));\n"
 "_u_full_name := get_keyword_ucase (\'FULL_NAME\', options, NULL);\n"
 "_u_home := get_keyword_ucase (\'HOME\', options, NULL);\n"
 "_u_perms := get_keyword_ucase (\'PERMISSIONS\', options, \'110100000R\');\n"
@@ -190,7 +189,7 @@ static const char *proc2 =
 "new_opts := vector ();\n"
 "while (i < l)\n"
 "{\n"
-"if (upper(options[i]) not in (\'PASSWORD_MODE\', \'PASSWORD_MODE_DATA\', \'GET_PASSWORD\', \'SQL_ENABLE\', \'DAV_ENABLE\', \'LOGIN_QUALIFIER\', \'PRIMARY_GROUP\', \'E-MAIL\', \'FULL_NAME\', \'HOME\', \'PERMISSIONS\', \'DISABLED\'))\n"
+"if (upper(options[i]) not in (\'PASSWORD_MODE\', \'PASSWORD_MODE_DATA\', \'GET_PASSWORD\', \'SQL_ENABLE\', \'DAV_ENABLE\', \'LOGIN_QUALIFIER\', \'PRIMARY_GROUP\', \'E-MAIL\', \'E_MAIL\', \'FULL_NAME\', \'HOME\', \'PERMISSIONS\', \'DISABLED\'))\n"
 "{\n"
 "new_opts := vector_concat (new_opts, vector (options[i], options[i+1]));\n"
 "}\n"
@@ -200,6 +199,9 @@ static const char *proc2 =
 "if (_login_qual = \'\')\n"
 "signal (\'22023\', \'Qualifier cannot be empty string\');\n"
 "\n"
+"if (__tag of NVARCHAR = __tag (passwd))\n"
+"passwd := charset_recode (passwd, \'_WIDE_\', \'UTF-8\');\n"
+"\n"
 "_pwd := pwd_magic_calc (_name, passwd, 0);\n"
 "_u_sys_name := pwd_magic_calc (_name, _u_sec_sys_name, 0);\n"
 "_u_sys_pass := pwd_magic_calc (_name, _u_sec_sys_pass, 0);\n"
@@ -242,7 +244,7 @@ static const char *proc2 =
 "--src users.sql:197\n";
 
 static const char *proc3 = 
-"#line 296 \"[executable]/users.sql\"\n"
+"#line 298 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_ROLE_CREATE (in _name varchar, in is_dav integer := 0)\n"
 "{\n"
@@ -262,10 +264,10 @@ static const char *proc3 =
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'sec_set_user_struct (?,?,?,?,?,?)\', vector (_name, \'\', _g_id, _g_id, NULL, 1) );\n"
 "return _g_id;\n"
 "}\n"
-"--src users.sql:294\n";
+"--src users.sql:296\n";
 
 static const char *proc4 = 
-"#line 317 \"[executable]/users.sql\"\n"
+"#line 319 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_ROLE_DROP (in _name varchar)\n"
 "{\n"
@@ -281,13 +283,17 @@ static const char *proc4 =
 "if (_u_is_sql)\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'sec_remove_user_struct(?)\', vector (_name));\n"
 "}\n"
-"--src users.sql:315\n";
+"--src users.sql:317\n";
 
 static const char *proc5 = 
-"#line 334 \"[executable]/users.sql\"\n"
+"#line 336 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_CHANGE_PASSWORD (in _name varchar, in old_pwd varchar, in new_pwd varchar)\n"
 "{\n"
+"if (__tag of NVARCHAR = __tag (old_pwd))\n"
+"old_pwd := charset_recode (old_pwd, \'_WIDE_\', \'UTF-8\');\n"
+"if (__tag of NVARCHAR = __tag (new_pwd))\n"
+"new_pwd := charset_recode (new_pwd, \'_WIDE_\', \'UTF-8\');\n"
 "if (exists (select 1 from SYS_USERS where U_NAME = _name and U_IS_ROLE = 0 and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = old_pwd))\n"
 "{\n"
 "if (exists (select 1 from SYS_USERS where U_NAME = _name and U_SQL_ENABLE = 1))\n"
@@ -302,14 +308,16 @@ static const char *proc5 =
 "else\n"
 "signal (\'37000\', concat (\'The user \'\'\', _name, \'\'\' does not exist\'), \'U0009\');\n"
 "}\n"
-"--src users.sql:332\n";
+"--src users.sql:334\n";
 
 static const char *proc6 = 
-"#line 353 \"[executable]/users.sql\"\n"
+"#line 359 \"[executable]/users.sql\"\n"
 "create procedure USER_PASSWORD_SET (in name varchar, in passwd varchar)\n"
 "{\n"
 "declare _u_id, _u_group integer;\n"
 "declare _u_data varchar;\n"
+"if (__tag of NVARCHAR = __tag (passwd))\n"
+"passwd := charset_recode (passwd, \'_WIDE_\', \'UTF-8\');\n"
 "if (exists (select 1 from SYS_USERS where U_NAME = name and U_SQL_ENABLE = 1))\n"
 "{\n"
 "user_set_password (name, passwd);\n"
@@ -325,10 +333,10 @@ static const char *proc6 =
 "update DB.DBA.SYS_USERS set U_PASSWORD = pwd_magic_calc (name, passwd) where U_NAME = name;\n"
 "return 0;\n"
 "}\n"
-"--src users.sql:351\n";
+"--src users.sql:357\n";
 
 static const char *proc7 = 
-"#line 374 \"[executable]/users.sql\"\n"
+"#line 382 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_SET_QUALIFIER (in _name varchar, in qual varchar)\n"
 "{\n"
@@ -344,19 +352,19 @@ static const char *proc7 =
 "signal (\'37000\', concat (\'The user \'\'\', _name, \'\'\' does not exist\'), \'U0010\');\n"
 "}\n"
 "}\n"
-"--src users.sql:372\n";
+"--src users.sql:380\n";
 
 static const char *proc8 = 
-"#line 392 \"[executable]/users.sql\"\n"
+"#line 400 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_SET_ROLE (in _name varchar, in new_role varchar)\n"
 "{\n"
 "signal (\'42000\', \'Not implemented.\');\n"
 "}\n"
-"--src users.sql:390\n";
+"--src users.sql:398\n";
 
 static const char *proc9 = 
-"#line 399 \"[executable]/users.sql\"\n"
+"#line 407 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "GET_INHERITED_GRANTS (in g_id integer, in prim integer, inout inh any)\n"
 "{\n"
@@ -376,10 +384,10 @@ static const char *proc9 =
 "}\n"
 "}\n"
 "}\n"
-"--src users.sql:397\n";
+"--src users.sql:405\n";
 
 static const char *proc10 = 
-"#line 421 \"[executable]/users.sql\"\n"
+"#line 429 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_GRANT_ROLE (in _name varchar, in _role varchar, in grant_opt integer := 0)\n"
 "{\n"
@@ -424,7 +432,7 @@ static const char *proc10 =
 "{\n"
 "if (primary_group is null or inh[i] <> primary_group)\n"
 "{\n"
-"insert into SYS_ROLE_GRANTS (GI_SUPER, GI_SUB, GI_ADMIN, GI_DIRECT, GI_GRANT)\n"
+"insert soft SYS_ROLE_GRANTS (GI_SUPER, GI_SUB, GI_ADMIN, GI_DIRECT, GI_GRANT)\n"
 "values (_u_id, inh[i], grant_opt, 0, _g_id);\n"
 "}\n"
 "i := i + 1;\n"
@@ -440,10 +448,10 @@ static const char *proc10 =
 "}\n"
 "}\n"
 "}\n"
-"--src users.sql:419\n";
+"--src users.sql:427\n";
 
 static const char *proc11 = 
-"#line 483 \"[executable]/users.sql\"\n"
+"#line 491 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_REVOKE_ROLE (in _name varchar, in _role varchar)\n"
 "{\n"
@@ -478,10 +486,10 @@ static const char *proc11 =
 "\n"
 "\n"
 "}\n"
-"--src users.sql:481\n";
+"--src users.sql:489\n";
 
 static const char *proc12 = 
-"#line 520 \"[executable]/users.sql\"\n"
+"#line 528 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_DROP (in _name varchar, in _cascade integer := 0)\n"
 "{\n"
@@ -532,13 +540,14 @@ static const char *proc12 =
 "signal (\'37000\', concat (\'The user \'\'\', _name, \'\'\' does not exist\'), \'U0015\');\n"
 "delete from SYS_USER_GROUP where UG_UID = _u_id;\n"
 "delete from SYS_GRANTS where G_USER = _u_id;\n"
+"delete from DB.DBA.RDF_GRAPH_USER where RGU_USER_ID = _u_id;\n"
 "if (_u_is_sql)\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'sec_remove_user_struct(?)\', vector (_name));\n"
 "}\n"
-"--src users.sql:518\n";
+"--src users.sql:526\n";
 
 static const char *proc13 = 
-"#line 575 \"[executable]/users.sql\"\n"
+"#line 584 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_SET_OPTION (in _name varchar, in opt varchar, in value any)\n"
 "{\n"
@@ -622,10 +631,10 @@ static const char *proc13 =
 "case when length (_login_qual) then concat (\'Q \', _login_qual) else NULL end));\n"
 "DB.DBA.SECURITY_CL_EXEC_AND_LOG (\'sec_user_enable (?, ?)\', vector (_name, case when _disabled = 0 then 1 else 0 end));\n"
 "}\n"
-"--src users.sql:573\n";
+"--src users.sql:582\n";
 
 static const char *proc14 = 
-"#line 661 \"[executable]/users.sql\"\n"
+"#line 670 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_GET_OPTION (in _name varchar, in opt varchar)\n"
 "{\n"
@@ -634,28 +643,28 @@ static const char *proc14 =
 "GET_SEC_OBJECT_ID (_name, _u_id, _u_is_sql, opts);\n"
 "return get_keyword_ucase (upper (opt), opts, NULL);\n"
 "}\n"
-"--src users.sql:659\n";
+"--src users.sql:668\n";
 
 static const char *proc15 = 
-"#line 672 \"[executable]/users.sql\"\n"
+"#line 681 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_MGR_SET_OPTION (in opt varchar, in val varchar)\n"
 "{\n"
 "signal (\'42000\', \'Not implemented.\');\n"
 "}\n"
-"--src users.sql:670\n";
+"--src users.sql:679\n";
 
 static const char *proc16 = 
-"#line 680 \"[executable]/users.sql\"\n"
+"#line 689 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_MGR_GET_OPTION (in opt varchar) returns varchar\n"
 "{\n"
 "signal (\'42000\', \'Not implemented.\');\n"
 "}\n"
-"--src users.sql:678\n";
+"--src users.sql:687\n";
 
 static const char *proc17 = 
-"#line 698 \"[executable]/users.sql\"\n"
+"#line 707 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "LIST_USER_ROLE_GRANTS ()\n"
 "{\n"
@@ -683,10 +692,10 @@ static const char *proc17 =
 "i := i + 2;\n"
 "}\n"
 "}\n"
-"--src users.sql:696\n";
+"--src users.sql:705\n";
 
 static const char *proc18 = 
-"#line 727 \"[executable]/users.sql\"\n"
+"#line 736 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_KEY_IS_FILE (in f varchar, out path varchar)\n"
 "{\n"
@@ -702,10 +711,10 @@ static const char *proc18 =
 "else\n"
 "return 0;\n"
 "}\n"
-"--src users.sql:725\n";
+"--src users.sql:734\n";
 
 static const char *proc19 = 
-"#line 745 \"[executable]/users.sql\"\n"
+"#line 754 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_KEY_STORE (in username varchar, in key_name varchar, in key_type varchar, in key_format varchar, in key_passwd varchar, in key_value varchar := NULL)\n"
 "{\n"
@@ -731,10 +740,10 @@ static const char *proc19 =
 "keys := vector_concat (keys, vector (key_name, vector (key_type, key_format, key_value, key_passwd)));\n"
 "USER_SET_OPTION (username, \'KEYS\', keys);\n"
 "}\n"
-"--src users.sql:743\n";
+"--src users.sql:752\n";
 
 static const char *proc20 = 
-"#line 773 \"[executable]/users.sql\"\n"
+"#line 782 \"[executable]/users.sql\"\n"
 " create procedure\n"
 "USER_KEY_DELETE (in username varchar, in key_name varchar)\n"
 "{\n"
@@ -752,10 +761,10 @@ static const char *proc20 =
 "USER_SET_OPTION (username, \'KEYS\', keys);\n"
 "}\n"
 "}\n"
-"--src users.sql:771\n";
+"--src users.sql:780\n";
 
 static const char *proc21 = 
-"#line 793 \"[executable]/users.sql\"\n"
+"#line 802 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_KEYS_INIT (in username varchar, in opts any)\n"
 "{\n"
@@ -838,10 +847,10 @@ static const char *proc21 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src users.sql:791\n";
+"--src users.sql:800\n";
 
 static const char *proc22 = 
-"#line 877 \"[executable]/users.sql\"\n"
+"#line 886 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "__USER_LOAD_KEY_BY_TYPE (inout key_name varchar, inout key_value any, inout key_type any, inout fmt int, inout key_pkey any, inout key_passwd any)\n"
 "{\n"
@@ -873,10 +882,10 @@ static const char *proc22 =
 "signal (\'22023\', \'Unknown key type\');\n"
 "}\n"
 "}\n"
-"--src users.sql:875\n";
+"--src users.sql:884\n";
 
 static const char *proc23 = 
-"#line 911 \"[executable]/users.sql\"\n"
+"#line 920 \"[executable]/users.sql\"\n"
 " create procedure\n"
 "USER_KEY_LOAD (\n"
 "in key_name varchar,\n"
@@ -906,10 +915,10 @@ static const char *proc23 =
 "__USER_LOAD_KEY_BY_TYPE (key_name, key_value, key_type, fmt, key_pkey, key_passwd);\n"
 "USER_KEY_STORE (user, key_name, key_type, fmt, case store_pwd when 1 then key_passwd else NULL end, cert);\n"
 "}\n"
-"--src users.sql:909\n";
+"--src users.sql:918\n";
 
 static const char *proc24 = 
-"#line 942 \"[executable]/users.sql\"\n"
+"#line 951 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_CERT_REGISTER (in username varchar, in cert varchar, in pwd varchar := \'\', in coding varchar := \'PKCS12\')\n"
 "{\n"
@@ -942,10 +951,10 @@ static const char *proc24 =
 "USER_SET_OPTION (username, \'LOGIN_CERTIFICATES\', certs);\n"
 "sec_set_user_cert (username, cfp);\n"
 "}\n"
-"--src users.sql:940\n";
+"--src users.sql:949\n";
 
 static const char *proc25 = 
-"#line 976 \"[executable]/users.sql\"\n"
+"#line 985 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USER_CERT_UNREGISTER (in username varchar, in cert varchar, in pwd varchar := \'\', in coding varchar := \'PKCS12\')\n"
 "{\n"
@@ -988,10 +997,10 @@ static const char *proc25 =
 "USER_SET_OPTION (username, \'LOGIN_CERTIFICATES\', new_certs);\n"
 "sec_remove_user_cert (username, cfp);\n"
 "}\n"
-"--src users.sql:974\n";
+"--src users.sql:983\n";
 
 static const char *proc26 = 
-"#line 1021 \"[executable]/users.sql\"\n"
+"#line 1030 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "\"DB\".\"DBA\".\"USER_CERT_LOGIN\" (\n"
 "inout user_name varchar,\n"
@@ -1017,7 +1026,7 @@ static const char *proc26 =
 "if (fp is null)\n"
 "goto normal_auth;\n"
 "\n"
-"ext_oid := cfg_item_value (virtuoso_ini_path(), \'Parameters\', \'X509ExtensionOID\');\n"
+"ext_oid := virtuoso_ini_item_value (\'Parameters\', \'X509ExtensionOID\');\n"
 "\n"
 "if (ext_oid is not null)\n"
 "new_user := get_certificate_info (7, null, null, null, ext_oid);\n"
@@ -1044,7 +1053,7 @@ static const char *proc26 =
 "{\n"
 "rc := \"DB\".\"DBA\".\"DBEV_LOGIN\" (user_name, digest, session_random);\n"
 "}\n"
-"else\n"
+"else if (rc <= 0)\n"
 "{\n"
 "rc := DB.DBA.FOAF_SSL_LOGIN (user_name, digest, session_random);\n"
 "if (rc = 0)\n"
@@ -1052,10 +1061,10 @@ static const char *proc26 =
 "}\n"
 "return rc;\n"
 "}\n"
-"--src users.sql:1019\n";
+"--src users.sql:1028\n";
 
 static const char *proc27 = 
-"#line 1083 \"[executable]/users.sql\"\n"
+"#line 1092 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "SET_USER_OS_ACOUNT (in username varchar, in os_u_name varchar,\n"
 "in os_u_pass varchar, in only_check_sys_user integer := 0)\n"
@@ -1072,12 +1081,12 @@ static const char *proc27 =
 "concat (\'Can\'\'t login system user \', os_u_name, \'. Logon failure: unknown user name or bad password.\'),\n"
 "\'SR359\');\n"
 "}\n"
-"--src users.sql:1081\n";
+"--src users.sql:1090\n";
 
 static const char *other0 = 
 "grant execute on \"DB.DBA.SET_USER_OS_ACOUNT\" to public\n";
 static const char *proc28 = 
-"#line 1104 \"[executable]/users.sql\"\n"
+"#line 1113 \"[executable]/users.sql\"\n"
 "create procedure DB.DBA.__DDL_TABLE_FIND_DEPS (in tb varchar, inout deps any)\n"
 "{\n"
 "declare tb_key_id integer;\n"
@@ -1136,10 +1145,10 @@ static const char *proc28 =
 "if (get_keyword (tb, deps, 0) = 0)\n"
 "deps := vector_concat (deps, vector (tb, 1));\n"
 "}\n"
-"--src users.sql:1102\n";
+"--src users.sql:1111\n";
 
 static const char *proc29 = 
-"#line 1165 \"[executable]/users.sql\"\n"
+"#line 1174 \"[executable]/users.sql\"\n"
 "create procedure DB.DBA.__DDL_GET_DROP_USER_TABLES (in owner varchar)\n"
 "{\n"
 "declare deps any;\n"
@@ -1153,10 +1162,10 @@ static const char *proc29 =
 "\n"
 "return deps;\n"
 "}\n"
-"--src users.sql:1163\n";
+"--src users.sql:1172\n";
 
 static const char *proc30 = 
-"#line 1181 \"[executable]/users.sql\"\n"
+"#line 1190 \"[executable]/users.sql\"\n"
 "create procedure DB.DBA.__UPDATE_SOAP_USERS_ACCESS ()\n"
 "{\n"
 "\n"
@@ -1185,7 +1194,7 @@ static const char *proc30 =
 "log_message (\'The user petshop is deleted.\');\n"
 "}\n"
 "}\n"
-"--src users.sql:1179\n";
+"--src users.sql:1188\n";
 
 static const char *other1 = 
 "DB.DBA.__UPDATE_SOAP_USERS_ACCESS ()\n";
@@ -1204,7 +1213,7 @@ static const char *tbl0 =
 ")\n";
 
 static const char *proc31 = 
-"#line 1231 \"[executable]/users.sql\"\n"
+"#line 1240 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "DB.DBA.LDAP_LOGIN (inout user_name varchar, in digest varchar, in session_random varchar)\n"
 "{\n"
@@ -1282,7 +1291,7 @@ static const char *proc31 =
 "LDAP_VALIDATION_FAILURE:\n"
 "return 0;\n"
 "}\n"
-"--src users.sql:1229\n";
+"--src users.sql:1238\n";
 
 static const char *tbl1 = 
 "create table SYS_USER_WEBID (UW_U_NAME varchar, UW_WEBID varchar, primary key (UW_WEBID))\n"
@@ -1290,7 +1299,29 @@ static const char *tbl1 =
 "create index SYS_USER_WEBID_NAME on SYS_USER_WEBID (UW_U_NAME) partition cluster replicated\n";
 
 static const char *proc32 = 
-"#line 1316 \"[executable]/users.sql\"\n"
+"#line 1325 \"[executable]/users.sql\"\n"
+"create procedure FOAF_SSL_QRY (in gr varchar, in uri varchar)\n"
+"{\n"
+"return sprintf (\'sparql\n"
+"define input:storage \"\"\n"
+"define input:same-as \"yes\"\n"
+"prefix cert: <http://www.w3.org/ns/auth/cert#>\n"
+"prefix rsa: <http://www.w3.org/ns/auth/rsa#>\n"
+"select (str (?exp)) (str (?mod))\n"
+"from <%S>\n"
+"where\n"
+"{\n"
+"{ ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod .  }\n"
+"union\n"
+"{ ?id cert:identity <%S> ; rsa:public_exponent ?exp1 ; rsa:modulus ?mod1 . ?exp1 cert:decimal ?exp . ?mod1 cert:hex ?mod . }\n"
+"union\n"
+"{ <%S> cert:key ?key . ?key cert:exponent ?exp . ?key cert:modulus ?mod .  }\n"
+"}\', gr, uri, uri, uri);\n"
+"}\n"
+"--src users.sql:1323\n";
+
+static const char *proc33 = 
+"#line 1345 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "DB.DBA.FOAF_SSL_LOGIN (inout user_name varchar, in digest varchar, in session_random varchar)\n"
 "{\n"
@@ -1331,17 +1362,7 @@ static const char *proc32 =
 "stat := \'00000\';\n"
 "exec (qr, stat, msg);\n"
 "commit work;\n"
-"qr := sprintf (\n"
-"\'sparql define input:storage \"\" \'||\n"
-"\' prefix cert: <http://www.w3.org/ns/auth/cert#> \'||\n"
-"\' prefix rsa: <http://www.w3.org/ns/auth/rsa#> \' ||\n"
-"\' select (str (bif:coalesce (?exp_val, ?exp))) (str (bif:coalesce (?mod_val, ?mod))) \'||\n"
-"\' from <%S> \'||\n"
-"\' where { \'||\n"
-"\' 	  ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod . \' ||\n"
-"\' 	  optional { ?exp cert:decimal ?exp_val . ?mod cert:hex ?mod_val . } \'||\n"
-"\'       } \',\n"
-"gr, agent);\n"
+"qr := FOAF_SSL_QRY (gr, agent);\n"
 "stat := \'00000\';\n"
 "exec (qr, stat, msg, vector (), 0, meta, data);\n"
 "if (stat = \'00000\' and length (data))\n"
@@ -1367,10 +1388,10 @@ static const char *proc32 =
 "commit work;\n"
 "return rc;\n"
 "}\n"
-"--src users.sql:1314\n";
+"--src users.sql:1343\n";
 
-static const char *proc33 = 
-"#line 1394 \"[executable]/users.sql\"\n"
+static const char *proc34 = 
+"#line 1413 \"[executable]/users.sql\"\n"
 "create procedure\n"
 "USERS_GET_DEF_QUAL (in dta varchar)\n"
 "{\n"
@@ -1381,26 +1402,28 @@ static const char *proc33 =
 "dta := split_and_decode (dta, 0, \'   \');\n"
 "return (get_keyword (\'Q\', dta, \'\'));\n"
 "}\n"
-"--src users.sql:1392\n";
+"--src users.sql:1411\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
@@ -1419,7 +1442,7 @@ sqls_define_sys (void)
   ddl_std_proc (trig2, 0x0);
   DEFINE_PROC ("GET_SEC_OBJECT_ID", proc0);
   DEFINE_PROC ("DB.DBA.SECURITY_CL_EXEC_AND_LOG", proc1);
-  DEFINE_PROC ("USER_CREATE", proc2);
+  DEFINE_PROC ("DB.DBA.USER_CREATE", proc2);
   DEFINE_PROC ("USER_ROLE_CREATE", proc3);
   DEFINE_PROC ("USER_ROLE_DROP", proc4);
   DEFINE_PROC ("USER_CHANGE_PASSWORD", proc5);
@@ -1453,8 +1476,9 @@ sqls_define_sys (void)
   ddl_ensure_table ("DB.DBA.SYS_LDAP_SERVERS", tbl0);
   DEFINE_PROC ("DB.DBA.LDAP_LOGIN", proc31);
   ddl_ensure_table ("DB.DBA.SYS_USER_WEBID", tbl1);
-  DEFINE_PROC ("DB.DBA.FOAF_SSL_LOGIN", proc32);
-  DEFINE_PROC ("USERS_GET_DEF_QUAL", proc33);
+  DEFINE_PROC ("FOAF_SSL_QRY", proc32);
+  DEFINE_PROC ("DB.DBA.FOAF_SSL_LOGIN", proc33);
+  DEFINE_PROC ("USERS_GET_DEF_QUAL", proc34);
 }
 
 
diff --git a/libsrc/Wi/sql_code_uddi.c b/libsrc/Wi/sql_code_uddi.c
index db05a2c..1f08970 100644
--- a/libsrc/Wi/sql_code_uddi.c
+++ b/libsrc/Wi/sql_code_uddi.c
@@ -3068,23 +3068,25 @@ static const char *proc70 =
 "--src uddi.sql:3117\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_vad.c b/libsrc/Wi/sql_code_vad.c
index 6cc6e61..0cfe227 100644
--- a/libsrc/Wi/sql_code_vad.c
+++ b/libsrc/Wi/sql_code_vad.c
@@ -193,6 +193,7 @@ static const char *proc7 =
 "create procedure \"VAD\".\"DBA\".\"VAD_CHDIR\" (inout parr any, in curdir integer, in dirname varchar) returns integer\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
+"dirname := cast (dirname as varchar);\n"
 "if (dirname is not null and aref (dirname, 0) <> 47 and not exists ( select \"R_ID\" from \"VAD\".\"DBA\".\"VAD_REGISTRY\" where \"R_ID\" = curdir ))\n"
 "{\n"
 "if (parr is not null)\n"
@@ -231,7 +232,7 @@ static const char *proc7 =
 "--src vad_root.sql:208\n";
 
 static const char *proc8 = 
-"#line 251 \"[executable]/vad_root.sql\"\n"
+"#line 252 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_FIND_SMTH_BY_NAME\" (in curdir integer, in itemname varchar) returns integer\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
@@ -255,10 +256,10 @@ static const char *proc8 =
 "notfound:\n"
 "return 0;\n"
 "}\n"
-"--src vad_root.sql:249\n";
+"--src vad_root.sql:250\n";
 
 static const char *proc9 = 
-"#line 276 \"[executable]/vad_root.sql\"\n"
+"#line 277 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_REGET_HANDLERS\" (inout arr any) returns integer\n"
 "{\n"
 "if (arr is null or length(arr) = 0)\n"
@@ -271,10 +272,10 @@ static const char *proc9 =
 "http (sprintf (\'\\n<script>document.forms[0].tree_ser.value=\"%s\";</script>\\n\',s));\n"
 "return 1;\n"
 "}\n"
-"--src vad_root.sql:274\n";
+"--src vad_root.sql:275\n";
 
 static const char *proc10 = 
-"#line 290 \"[executable]/vad_root.sql\"\n"
+"#line 291 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_FULL_PATH\" (inout parr any, in curdir integer) returns varchar\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
@@ -317,10 +318,10 @@ static const char *proc10 =
 "\"VAD\".\"DBA\".\"VAD_REGET_HANDLERS\" (parr);\n"
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'Illegal handler:%d\', curdir));\n"
 "}\n"
-"--src vad_root.sql:288\n";
+"--src vad_root.sql:289\n";
 
 static const char *proc11 = 
-"#line 335 \"[executable]/vad_root.sql\"\n"
+"#line 336 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_TEST_PARENT\" (inout parr any, in curdir integer, in name varchar, inout rid int)\n"
 "returns varchar\n"
 "{\n"
@@ -343,10 +344,10 @@ static const char *proc11 =
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'parent directory name mismatch:%s\', nname));\n"
 "return nname;\n"
 "}\n"
-"--src vad_root.sql:333\n";
+"--src vad_root.sql:334\n";
 
 static const char *proc12 = 
-"#line 360 \"[executable]/vad_root.sql\"\n"
+"#line 361 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_TEST_NODE_TYPE\" (in type varchar) returns varchar\n"
 "{\n"
 "type := upper (type);\n"
@@ -360,10 +361,10 @@ static const char *proc12 =
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'illegal node type:%s\',cast (type as varchar)));\n"
 "return type;\n"
 "}\n"
-"--src vad_root.sql:358\n";
+"--src vad_root.sql:359\n";
 
 static const char *proc13 = 
-"#line 375 \"[executable]/vad_root.sql\"\n"
+"#line 376 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_MKDIR\" (inout parr any, in curdir integer, in name varchar ) returns integer\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
@@ -380,10 +381,10 @@ static const char *proc13 =
 "\n"
 "return _id;\n"
 "}\n"
-"--src vad_root.sql:373\n";
+"--src vad_root.sql:374\n";
 
 static const char *proc14 = 
-"#line 394 \"[executable]/vad_root.sql\"\n"
+"#line 395 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_MKCD\" (inout parr any, in curdir integer, in name varchar ) returns integer\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
@@ -394,10 +395,10 @@ static const char *proc14 =
 "else\n"
 "return \"VAD\".\"DBA\".\"VAD_MKDIR\" (parr, curdir, name);\n"
 "}\n"
-"--src vad_root.sql:392\n";
+"--src vad_root.sql:393\n";
 
 static const char *proc15 = 
-"#line 407 \"[executable]/vad_root.sql\"\n"
+"#line 408 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_RMDIR\" (inout parr any, in curdir integer) returns integer\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
@@ -421,10 +422,10 @@ static const char *proc15 =
 "\n"
 "return 1;\n"
 "}\n"
-"--src vad_root.sql:405\n";
+"--src vad_root.sql:406\n";
 
 static const char *proc16 = 
-"#line 433 \"[executable]/vad_root.sql\"\n"
+"#line 434 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_RMNODE\" (in id integer) returns integer\n"
 "{\n"
 "id := cast (id as integer);\n"
@@ -446,10 +447,10 @@ static const char *proc16 =
 "err:\n"
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'Item been removed does not exist:%d\', id));\n"
 "}\n"
-"--src vad_root.sql:431\n";
+"--src vad_root.sql:432\n";
 
 static const char *proc17 = 
-"#line 457 \"[executable]/vad_root.sql\"\n"
+"#line 458 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_MKNODE\" (inout parr any, in curdir integer, in name varchar, in type varchar, in val varchar ) returns integer\n"
 "{\n"
 "declare _id integer;\n"
@@ -469,10 +470,10 @@ static const char *proc17 =
 "\n"
 "return _id;\n"
 "}\n"
-"--src vad_root.sql:455\n";
+"--src vad_root.sql:456\n";
 
 static const char *proc18 = 
-"#line 479 \"[executable]/vad_root.sql\"\n"
+"#line 480 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_UPDATE_NODE\" (in curid integer, in val varchar, in oldval varchar ) returns integer\n"
 "{\n"
 "curid := cast (curid as integer);\n"
@@ -495,10 +496,10 @@ static const char *proc18 =
 "err:\n"
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'Attempt of getting info for non-existent node %d\', curid));\n"
 "}\n"
-"--src vad_root.sql:477\n";
+"--src vad_root.sql:478\n";
 
 static const char *proc19 = 
-"#line 503 \"[executable]/vad_root.sql\"\n"
+"#line 504 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_TEST_VALUE\" ( in type varchar, inout val varchar ) returns integer\n"
 "{\n"
 "if (equ (type, \'FOLDER\'))\n"
@@ -542,10 +543,10 @@ static const char *proc19 =
 "}\n"
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'illegal node type:%s\',cast (type as varchar)));\n"
 "}\n"
-"--src vad_root.sql:501\n";
+"--src vad_root.sql:502\n";
 
 static const char *proc20 = 
-"#line 549 \"[executable]/vad_root.sql\"\n"
+"#line 550 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_NODE_INFO\" (in nodeid integer, inout name varchar, inout type varchar, inout val varchar ) returns integer\n"
 "{\n"
 "nodeid := cast (nodeid as integer);\n"
@@ -556,10 +557,10 @@ static const char *proc20 =
 "err:\n"
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'Attempt of getting info for inexistent node %d\', nodeid));\n"
 "}\n"
-"--src vad_root.sql:547\n";
+"--src vad_root.sql:548\n";
 
 static const char *proc21 = 
-"#line 562 \"[executable]/vad_root.sql\"\n"
+"#line 563 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_NODE_INFO_BY_NAME\" (in curdir integer, in nodename varchar, inout name varchar, inout type varchar, inout val varchar, in ignite_error integer := 1 ) returns integer\n"
 "{\n"
 "declare iid integer;\n"
@@ -573,10 +574,10 @@ static const char *proc21 =
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'Attempt of getting info for inexistent node %d/%s\', curdir, nodename));\n"
 "return 0;\n"
 "}\n"
-"--src vad_root.sql:560\n";
+"--src vad_root.sql:561\n";
 
 static const char *proc22 = 
-"#line 578 \"[executable]/vad_root.sql\"\n"
+"#line 579 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_NEW_PACKAGE\" (inout parr any, in name varchar, in version varchar ) returns integer\n"
 "{\n"
 "declare curdir, tid, ret integer;\n"
@@ -603,10 +604,10 @@ static const char *proc22 =
 "\"VAD\".\"DBA\".\"VAD_DAV_MKCOL\"(ini, s);\n"
 "return tid;\n"
 "}\n"
-"--src vad_root.sql:576\n";
+"--src vad_root.sql:577\n";
 
 static const char *proc23 = 
-"#line 606 \"[executable]/vad_root.sql\"\n"
+"#line 607 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"__VAD_BUILD_TREE\" ( in curdir integer, in name varchar, in ltype varchar, in lkey varchar ) returns any\n"
 "{\n"
 "declare tname, ttype, tkey varchar;\n"
@@ -644,20 +645,20 @@ static const char *proc23 =
 "arr := vector_concat (arr, vector(NULL));\n"
 "return arr;\n"
 "}\n"
-"--src vad_root.sql:604\n";
+"--src vad_root.sql:605\n";
 
 static const char *proc24 = 
-"#line 646 \"[executable]/vad_root.sql\"\n"
+"#line 647 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_BUILD_TREE\" (  ) returns any\n"
 "{\n"
 "declare arr any;\n"
 "arr := \"VAD\".\"DBA\".\"__VAD_BUILD_TREE\" (1, \'/\', \'FOLDER\', \'/\');\n"
 "return arr;\n"
 "}\n"
-"--src vad_root.sql:644\n";
+"--src vad_root.sql:645\n";
 
 static const char *proc25 = 
-"#line 655 \"[executable]/vad_root.sql\"\n"
+"#line 656 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_GET_PACKAGES\" ( ) returns any\n"
 "{\n"
 "declare retarr, tmparr any;\n"
@@ -694,10 +695,10 @@ static const char *proc25 =
 "\n"
 "return retarr;\n"
 "}\n"
-"--src vad_root.sql:653\n";
+"--src vad_root.sql:654\n";
 
 static const char *proc26 = 
-"#line 693 \"[executable]/vad_root.sql\"\n"
+"#line 694 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"__VAD_DEL_SUBTREE\"(in curdir integer) returns any\n"
 "{\n"
 "declare tname varchar;\n"
@@ -726,10 +727,10 @@ static const char *proc26 =
 "\n"
 "return 1;\n"
 "}\n"
-"--src vad_root.sql:691\n";
+"--src vad_root.sql:692\n";
 
 static const char *proc27 = 
-"#line 724 \"[executable]/vad_root.sql\"\n"
+"#line 725 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_DEL_SUBTREE\" ( in curdir integer ) returns any\n"
 "{\n"
 "curdir := cast (curdir as integer);\n"
@@ -741,10 +742,10 @@ static const char *proc27 =
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'You can\\\'t remove system subtree\'));\n"
 "return \"VAD\".\"DBA\".\"__VAD_DEL_SUBTREE\" (curdir);\n"
 "}\n"
-"--src vad_root.sql:722\n";
+"--src vad_root.sql:723\n";
 
 static const char *proc28 = 
-"#line 738 \"[executable]/vad_root.sql\"\n"
+"#line 739 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_GET_PKG_ID\" (inout parr any, in name varchar, in version varchar ) returns integer\n"
 "{\n"
 "declare curdir, tid integer;\n"
@@ -758,10 +759,10 @@ static const char *proc28 =
 "else\n"
 "return curdir;\n"
 "}\n"
-"--src vad_root.sql:736\n";
+"--src vad_root.sql:737\n";
 
 static const char *proc29 = 
-"#line 754 \"[executable]/vad_root.sql\"\n"
+"#line 755 \"[executable]/vad_root.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"__vad_init\"()\n"
 "{\n"
 "declare parr, ini any;\n"
@@ -789,7 +790,7 @@ static const char *proc29 =
 "\n"
 "}\n"
 "}\n"
-"--src vad_root.sql:752\n";
+"--src vad_root.sql:753\n";
 
 
 static const char *other1 = 
@@ -858,7 +859,7 @@ static const char *proc31 =
 "http (\'<TR CLASS=\"CopyrightBorder\"><TD COLSPAN=\"2\"><IMG SRC=\"/admin/images/1x1.gif\" WIDTH=\"1\" HEIGHT=\"2\" ALT=\"\"></TD></TR>\');\n"
 "http (\'<TR><TD ALIGN=\"right\" COLSPAN=\"2\"><P CLASS=\"Copyright\">Virtuoso Server \');\n"
 "http (sys_stat(\'st_dbms_ver\'));\n"
-"http (sprintf (\' VAD Interface (%s) - Copyright© 1998-2011 OpenLink Software.</P></TD></TR>\',\"VAD\".\"DBA\".\"VAD_VERSION\" ()));\n"
+"http (sprintf (\' VAD Interface (%s) - Copyright© 1998-2012 OpenLink Software.</P></TD></TR>\',\"VAD\".\"DBA\".\"VAD_VERSION\" ()));\n"
 "http (\'</TABLE>\\n</BODY>\');\n"
 "}\n"
 "--src vad_misc.sql:72\n";
@@ -1323,7 +1324,11 @@ static const char *proc45 =
 "return 0;\n"
 "\n"
 "if (exists (\n"
-"select \"R_ID\" from \"VAD\".\"DBA\".\"VAD_REGISTRY\" where \"R_PRNT\" = id and \"R_TYPE\" = \'FOLDER\' and lt (\"R_SHKEY\", pkgver)\n"
+"select \"R_ID\" \n"
+"from \"VAD\".\"DBA\".\"VAD_REGISTRY\" \n"
+"where \"R_PRNT\" = id and \n"
+"\"R_TYPE\" = \'FOLDER\' and \n"
+"\"VAD\".\"DBA\".\"VERSION_COMPARE\" (\"R_SHKEY\", pkgver) = -1\n"
 "))\n"
 "return 1;\n"
 "\n"
@@ -1332,7 +1337,7 @@ static const char *proc45 =
 "--src vad_misc.sql:525\n";
 
 static const char *proc46 = 
-"#line 545 \"[executable]/vad_misc.sql\"\n"
+"#line 549 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_TEST_PACKAGE_GT\" (inout parr any, in pkgname varchar , in pkgver varchar) returns integer\n"
 "{\n"
 "declare s varchar;\n"
@@ -1342,15 +1347,19 @@ static const char *proc46 =
 "if (not id)\n"
 "return 0;\n"
 "if (exists (\n"
-"select \"R_ID\" from \"VAD\".\"DBA\".\"VAD_REGISTRY\" where \"R_PRNT\" = id and \"R_TYPE\" = \'FOLDER\' and gt (\"R_SHKEY\", pkgver)\n"
+"select \"R_ID\" \n"
+"from \"VAD\".\"DBA\".\"VAD_REGISTRY\" \n"
+"where \"R_PRNT\" = id and \n"
+"\"R_TYPE\" = \'FOLDER\' and \n"
+"\"VAD\".\"DBA\".\"VERSION_COMPARE\" (\"R_SHKEY\", pkgver) = 1\n"
 "))\n"
 "return 1;\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:543\n";
+"--src vad_misc.sql:547\n";
 
 static const char *proc47 = 
-"#line 561 \"[executable]/vad_misc.sql\"\n"
+"#line 569 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_TEST_PACKAGE_AND_REMOVE\" (inout parr any, in pkgname varchar , in pkgver varchar) returns integer\n"
 "{\n"
 "declare s varchar;\n"
@@ -1366,10 +1375,10 @@ static const char *proc47 =
 "\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:559\n";
+"--src vad_misc.sql:567\n";
 
 static const char *proc48 = 
-"#line 578 \"[executable]/vad_misc.sql\"\n"
+"#line 586 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_EXEC\" (in prog varchar) returns integer\n"
 "{\n"
 "if (prog is null or length (prog) = 0)\n"
@@ -1384,10 +1393,10 @@ static const char *proc48 =
 "exec (sprintf (\'drop procedure %s\', pname));\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:576\n";
+"--src vad_misc.sql:584\n";
 
 static const char *proc49 = 
-"#line 594 \"[executable]/vad_misc.sql\"\n"
+"#line 602 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_LOAD_FILE\" (in fname varchar) returns integer\n"
 "{\n"
 "declare code varchar;\n"
@@ -1453,28 +1462,28 @@ static const char *proc49 =
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'Attempt to load inexistent file\\n%s\', __SQL_MESSAGE));\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:592\n";
+"--src vad_misc.sql:600\n";
 
 static const char *proc50 = 
-"#line 662 \"[executable]/vad_misc.sql\"\n"
+"#line 670 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_VHOST_DEFINE\" (in pkgname varchar, in pkgver varchar ) returns integer\n"
 "{\n"
 "DB.DBA.VHOST_DEFINE(lpath=>sprintf (\'/VAD/%s/%s/\', pkgname, pkgver),ppath=>sprintf (\'/%s/%s/%s/\',\"VAD\".\"DBA\".\"VAD_GET_ROOT\" (\'http\'), pkgname, pkgver),vsp_user=>\'DBA\');\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:660\n";
+"--src vad_misc.sql:668\n";
 
 static const char *proc51 = 
-"#line 669 \"[executable]/vad_misc.sql\"\n"
+"#line 677 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_VHOST_REMOVE\" (in pkgname varchar, in pkgver varchar ) returns integer\n"
 "{\n"
 "DB.DBA.VHOST_REMOVE(lpath=>sprintf (\'/VAD/%s/%s/\', pkgname, pkgver));\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:667\n";
+"--src vad_misc.sql:675\n";
 
 static const char *proc52 = 
-"#line 676 \"[executable]/vad_misc.sql\"\n"
+"#line 684 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_EXEC_RETRYING\" (in _expn varchar) returns varchar\n"
 "{\n"
 "declare _state, _message varchar;\n"
@@ -1491,19 +1500,19 @@ static const char *proc52 =
 "_retries := _retries+1;\n"
 "}\n"
 "}\n"
-"--src vad_misc.sql:674\n";
+"--src vad_misc.sql:682\n";
 
 static const char *proc53 = 
-"#line 694 \"[executable]/vad_misc.sql\"\n"
+"#line 702 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_ASSERT2\" (in _val integer, in _text varchar)\n"
 "{\n"
 "if (not _val)\n"
 "\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (_text);\n"
 "}\n"
-"--src vad_misc.sql:692\n";
+"--src vad_misc.sql:700\n";
 
 static const char *proc54 = 
-"#line 701 \"[executable]/vad_misc.sql\"\n"
+"#line 709 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_ASSERT\" (in _expn varchar)\n"
 "{\n"
 "\"VAD\".\"DBA\".\"VAD_EXEC_RETRYING\" (\n"
@@ -1511,10 +1520,10 @@ static const char *proc54 =
 "\'\"DB\".\"DBA\".\"VAD_ASSERT2\"((\', _expn, \'), concat (\'\'Assertion failed: \'\', \',\n"
 "\"WS\".\"WS\".\"STR_SQL_APOS\"(_expn), \'))\' ) );\n"
 "}\n"
-"--src vad_misc.sql:699\n";
+"--src vad_misc.sql:707\n";
 
 static const char *proc55 = 
-"#line 710 \"[executable]/vad_misc.sql\"\n"
+"#line 718 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_SAFE_EXEC\" (in _expn varchar) returns integer\n"
 "{\n"
 "declare exit handler for sqlstate \'*\' { goto error_smth; };\n"
@@ -1525,10 +1534,10 @@ static const char *proc55 =
 "error_smth:;\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:708\n";
+"--src vad_misc.sql:716\n";
 
 static const char *proc56 = 
-"#line 722 \"[executable]/vad_misc.sql\"\n"
+"#line 730 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_GET_NAME_AND_VERSION\"(\n"
 "in name_and_version varchar,\n"
 "inout name varchar,\n"
@@ -1549,10 +1558,10 @@ static const char *proc56 =
 "else\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:720\n";
+"--src vad_misc.sql:728\n";
 
 static const char *proc57 = 
-"#line 744 \"[executable]/vad_misc.sql\"\n"
+"#line 752 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VERSION_COMPARE\"(in s1 varchar, in s2 varchar)\n"
 "{\n"
 "declare i, j any;\n"
@@ -1580,10 +1589,10 @@ static const char *proc57 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:742\n";
+"--src vad_misc.sql:750\n";
 
 static const char *proc58 = 
-"#line 773 \"[executable]/vad_misc.sql\"\n"
+"#line 781 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_CHECK_FOR_HIGH_VERSION\" (in name varchar) returns varchar\n"
 "{\n"
 "declare version, prod varchar;\n"
@@ -1609,10 +1618,10 @@ static const char *proc58 =
 "}\n"
 "return \'0\';\n"
 "}\n"
-"--src vad_misc.sql:771\n";
+"--src vad_misc.sql:779\n";
 
 static const char *proc59 = 
-"#line 800 \"[executable]/vad_misc.sql\"\n"
+"#line 808 \"[executable]/vad_misc.sql\"\n"
 "create procedure \"VAD\".\"DBA\".\"VAD_REMOVE_PREVIOUS_VERSION\" (in prod varchar, in version varchar) returns integer\n"
 "{\n"
 "declare dot_pos, ver1, ver2 integer;\n"
@@ -1706,7 +1715,7 @@ static const char *proc59 =
 "}\n"
 "return 0;\n"
 "}\n"
-"--src vad_misc.sql:798\n";
+"--src vad_misc.sql:806\n";
 
 /* oper_pars.sql */
 
@@ -2720,7 +2729,7 @@ static const char *proc81 =
 "tid := \"VAD\".\"DBA\".\"VAD_MKNODE\" (parr, tid, s2, \'STRING\', s3);\n"
 "}\n"
 "if (not \"VAD\".\"DBA\".\"VAD_TEST_PACKAGE_LT\" (parr, s2, s3))\n"
-"\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'required package %s with version less than %s hasn\\\'t yet installed\', s2, s3));\n"
+"\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'This package requires %s version less than %s\', s2, s3));\n"
 "}\n"
 "s3 := cast (xpath_eval (\'version/@package\', aref (items, j)) as varchar);\n"
 "if (s2 is not null and length(s3))\n"
@@ -2731,7 +2740,7 @@ static const char *proc81 =
 "tid := \"VAD\".\"DBA\".\"VAD_MKNODE\" (parr, tid, s2, \'STRING\', s3);\n"
 "}\n"
 "if (not \"VAD\".\"DBA\".\"VAD_TEST_PACKAGE_EQ\" (parr, s2, s3))\n"
-"\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'required package %s with version equal to %s hasn\\\'t yet installed\', s2, s3));\n"
+"\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'This package requires %s version %s\', s2, s3));\n"
 "}\n"
 "s3 := cast (xpath_eval (\'versions_later/@package\', aref (items, j)) as varchar);\n"
 "if (s2 is not null and length(s3))\n"
@@ -2742,7 +2751,7 @@ static const char *proc81 =
 "tid := \"VAD\".\"DBA\".\"VAD_MKNODE\" (parr, tid, s2, \'STRING\', s3);\n"
 "}\n"
 "if (not \"VAD\".\"DBA\".\"VAD_TEST_PACKAGE_GT\" (parr, s2, s3))\n"
-"\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'required package %s with version greater than %s hasn\\\'t yet installed\', s2, s3));\n"
+"\"VAD\".\"DBA\".\"VAD_FAIL_CHECK\" (sprintf (\'This package requires %s version greater than %s\', s2, s3));\n"
 "}\n"
 "j := j + 1;\n"
 "}\n"
@@ -2986,7 +2995,7 @@ static const char *proc84 =
 "exec (\'checkpoint\');\n"
 "else\n"
 "{\n"
-"cl_exec (\'rdf_check_init()\');\n"
+"exec (\'rdf_check_init()\');\n"
 "cl_exec (\'checkpoint\');\n"
 "}\n"
 "\n"
@@ -4236,23 +4245,25 @@ static const char *proc109 =
 "--src vad_make.sql:2288\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_vdb.c b/libsrc/Wi/sql_code_vdb.c
index abc2703..f2cb305 100644
--- a/libsrc/Wi/sql_code_vdb.c
+++ b/libsrc/Wi/sql_code_vdb.c
@@ -38,23 +38,25 @@ static const char *proc0 =
 "--src vdb.sql:24\n";
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_code_ws.c b/libsrc/Wi/sql_code_ws.c
index 1a95dc0..a4685ef 100644
--- a/libsrc/Wi/sql_code_ws.c
+++ b/libsrc/Wi/sql_code_ws.c
@@ -3184,7 +3184,7 @@ static const char *proc63 =
 "</Error>\', __SQL_STATE, __SQL_MESSAGE));\n"
 "goto err;\n"
 "};\n"
-"if (atoi (cfg_item_value (virtuoso_ini_path(), \'HTTPServer\', \'ServerThreads\')) < 2)\n"
+"if (atoi (virtuoso_ini_item_value (\'HTTPServer\', \'ServerThreads\')) < 2)\n"
 "{\n"
 "result := xml_tree_doc (sprintf (\'<Error>\n"
 "<Code>%V\n"
@@ -3224,7 +3224,7 @@ static const char *proc63 =
 "?>\n"
 "</TD></TR></TABLE>\n"
 "</DIV>\n"
-"<DIV class=\"foot\"><SPAN class=\"foot\">Virtuoso Universal Server <?=sys_stat(\'st_dbms_ver\')?> - Copyright© 1998-2011 OpenLink Software.</SPAN></DIV>\n"
+"<DIV class=\"foot\"><SPAN class=\"foot\">Virtuoso Universal Server <?=sys_stat(\'st_dbms_ver\')?> - Copyright© 1998-2012 OpenLink Software.</SPAN></DIV>\n"
 "</BODY>\n"
 "</HTML>\n"
 "<?vsp\n"
@@ -3651,12 +3651,12 @@ static const char *xsl3[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsrp_ultim.xsl,v 1.3 2007/03/16 09:56:12 source Exp $\n"
+" -  $Id: wsrp_ultim.xsl,v 1.3.2.1 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2007 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -3704,12 +3704,12 @@ static const char *xsl4[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsrp_resp.xsl,v 1.4 2009/04/09 13:22:15 source Exp $\n"
+" -  $Id: wsrp_resp.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -3831,12 +3831,12 @@ static const char *xsl5[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsrp_interm.xsl,v 1.4 2009/04/09 13:22:15 source Exp $\n"
+" -  $Id: wsrp_interm.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -3934,12 +3934,12 @@ static const char *xsl6[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsrp_error.xsl,v 1.4 2009/04/09 13:22:15 source Exp $\n"
+" -  $Id: wsrp_error.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -4048,12 +4048,12 @@ static const char *xsl7[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: soap_sch.xsl,v 1.4.2.1 2010/11/05 10:56:48 source Exp $\n"
+" -  $Id: soap_sch.xsl,v 1.4.2.2 2012/03/08 12:55:35 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -4501,12 +4501,12 @@ static const char *xsl8[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: soap_import_sch.xsl,v 1.4 2009/04/09 13:22:13 source Exp $\n"
+" -  $Id: soap_import_sch.xsl,v 1.4.2.1 2012/03/08 12:55:35 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -4573,12 +4573,12 @@ static const char *xsl9[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsdl_expand.xsl,v 1.4.2.1 2010/11/05 10:56:48 source Exp $\n"
+" -  $Id: wsdl_expand.xsl,v 1.4.2.2 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -4729,12 +4729,12 @@ static const char *xsl10[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsdl_parts.xsl,v 1.4 2009/04/09 13:22:15 source Exp $\n"
+" -  $Id: wsdl_parts.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -4908,12 +4908,12 @@ static const char *xsl11[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsdl_import.xsl,v 1.5.2.1 2010/11/05 10:56:49 source Exp $\n"
+" -  $Id: wsdl_import.xsl,v 1.5.2.2 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -5237,12 +5237,12 @@ static const char *xsl12[]= {
 "<?xml version=\"1.0\" ?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: wsdl2rdf.xsl,v 1.1.2.1 2009/04/16 09:48:07 source Exp $\n"
+" -  $Id: wsdl2rdf.xsl,v 1.1.2.2 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2009 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -5516,12 +5516,12 @@ static const char *xsl13[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: xmlrpc_soap.xsl,v 1.5 2009/04/09 13:22:15 source Exp $\n"
+" -  $Id: xmlrpc_soap.xsl,v 1.5.2.1 2012/03/08 12:55:38 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -5678,12 +5678,12 @@ static const char *xsl14[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: soap_xmlrpc.xsl,v 1.4 2009/04/09 13:22:13 source Exp $\n"
+" -  $Id: soap_xmlrpc.xsl,v 1.4.2.1 2012/03/08 12:55:35 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -5851,12 +5851,12 @@ static const char *xsl15[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -\n"
-" -  $Id: soap12_router.xsl,v 1.4 2009/04/09 13:22:13 source Exp $\n"
+" -  $Id: soap12_router.xsl,v 1.4.2.1 2012/03/08 12:55:35 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -\n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -\n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -9166,12 +9166,12 @@ static const char *xsl23[]= {
 "<?xml version=\"1.0\"?>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: wsrmcall.xsl,v 1.2 2006/08/15 22:09:21 source Exp $\n"
+" -  $Id: wsrmcall.xsl,v 1.2.2.1 2012/03/08 12:55:23 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -9554,9 +9554,9 @@ static const char *proc124 =
 "\n"
 "select U_NAME, U_PASSWORD, U_GROUP, U_ID\n"
 "into _u_name, _u_password, _u_group, _u_id from DB.DBA.SYS_USERS\n"
-"where U_NAME = _user;\n"
+"where U_NAME = _user and U_ACCOUNT_DISABLED = 0 and U_SQL_ENABLE = 1 and U_IS_ROLE = 0;\n"
 "\n"
-"if (0 = _u_group and 1 = DB.DBA.vsp_auth_verify_pass (auth, _u_name,\n"
+"if (1 = DB.DBA.vsp_auth_verify_pass (auth, _u_name,\n"
 "get_keyword (\'realm\', auth, \'\'),\n"
 "get_keyword (\'uri\', auth, \'\'),\n"
 "get_keyword (\'nonce\', auth, \'\'),\n"
@@ -9565,6 +9565,7 @@ static const char *proc124 =
 "get_keyword (\'qop\', auth, \'\'),\n"
 "_u_password))\n"
 "{\n"
+"connection_set (\'SPARQLUserId\', _u_name);\n"
 "if (http_map_get (\'persist_ses_vars\'))\n"
 "{\n"
 "declare vars any;\n"
@@ -9593,7 +9594,7 @@ static const char *proc124 =
 "--src http_auth.sql:24\n";
 
 static const char *proc125 = 
-"#line 101 \"[executable]/http_auth.sql\"\n"
+"#line 102 \"[executable]/http_auth.sql\"\n"
 "create procedure\n"
 "DB.DBA.HP_AUTH_DAV_ADMIN (in realm varchar)\n"
 "{\n"
@@ -9666,10 +9667,10 @@ static const char *proc125 =
 "\'false\', lines, allow_basic);\n"
 "return 0;\n"
 "}\n"
-"--src http_auth.sql:99\n";
+"--src http_auth.sql:100\n";
 
 static const char *proc126 = 
-"#line 176 \"[executable]/http_auth.sql\"\n"
+"#line 177 \"[executable]/http_auth.sql\"\n"
 "create procedure\n"
 "DB.DBA.HP_AUTH_DAV_PROTOCOL (in realm varchar)\n"
 "{\n"
@@ -9829,10 +9830,10 @@ static const char *proc126 =
 "\'false\', lines, allow_basic);\n"
 "return 0;\n"
 "}\n"
-"--src http_auth.sql:174\n";
+"--src http_auth.sql:175\n";
 
 static const char *proc127 = 
-"#line 338 \"[executable]/http_auth.sql\"\n"
+"#line 339 \"[executable]/http_auth.sql\"\n"
 "create procedure\n"
 "DB.DBA.HP_SES_VARS_STORE ()\n"
 "{\n"
@@ -9847,12 +9848,12 @@ static const char *proc127 =
 "update DB.DBA.ADMIN_SESSION set ASES_VARS = serialize (vars) where ASES_ID = sid;\n"
 "}\n"
 "}\n"
-"--src http_auth.sql:336\n";
+"--src http_auth.sql:337\n";
 
 static const char *other59 = 
 "grant execute on DB.DBA.HP_SES_VARS_STORE to public\n";
 static const char *proc128 = 
-"#line 358 \"[executable]/http_auth.sql\"\n"
+"#line 359 \"[executable]/http_auth.sql\"\n"
 "create procedure WS.WS.VSP_DEFINE (in path varchar, in _uid varchar)\n"
 "{\n"
 "declare x, y, stat, msg, st varchar;\n"
@@ -9878,7 +9879,7 @@ static const char *proc128 =
 "__pop_user_id ();\n"
 "return 1;\n"
 "}\n"
-"--src http_auth.sql:356\n";
+"--src http_auth.sql:357\n";
 
 static const char *tbl7 = 
 "CREATE TABLE WS.WS.SESSION (\n"
@@ -9899,7 +9900,7 @@ static const char *tbl7 =
 ")\n";
 
 static const char *proc129 = 
-"#line 411 \"[executable]/http_auth.sql\"\n"
+"#line 412 \"[executable]/http_auth.sql\"\n"
 " CREATE PROCEDURE WS.WS.SESSION_SAVE ()\n"
 "{\n"
 "declare sid varchar;\n"
@@ -9919,10 +9920,10 @@ static const char *proc129 =
 "\n"
 "connection_vars_set (NULL);\n"
 "}\n"
-"--src http_auth.sql:409\n";
+"--src http_auth.sql:410\n";
 
 static const char *proc130 = 
-"#line 434 \"[executable]/http_auth.sql\"\n"
+"#line 435 \"[executable]/http_auth.sql\"\n"
 " CREATE PROCEDURE WS.WS.SESSION_TERMINATE (in url varchar)\n"
 "{\n"
 "\n"
@@ -9931,10 +9932,10 @@ static const char *proc130 =
 "http_request_status (\'HTTP/1.1 302 Found\');\n"
 "http_header (sprintf (\'Location: %s\\r\\n\', url));\n"
 "}\n"
-"--src http_auth.sql:432\n";
+"--src http_auth.sql:433\n";
 
 static const char *proc131 = 
-"#line 448 \"[executable]/http_auth.sql\"\n"
+"#line 449 \"[executable]/http_auth.sql\"\n"
 " CREATE PROCEDURE WS.WS.DIGEST_AUTH (in realm varchar)\n"
 "{\n"
 "declare auth_vec, lines, vars, server_nc any;\n"
@@ -10023,10 +10024,10 @@ static const char *proc131 =
 "http (\'<HTML><BODY><p>Authorization failed (401)</p></BODY></HTML>\');\n"
 "return 0;\n"
 "}\n"
-"--src http_auth.sql:446\n";
+"--src http_auth.sql:447\n";
 
 static const char *proc132 = 
-"#line 538 \"[executable]/http_auth.sql\"\n"
+"#line 539 \"[executable]/http_auth.sql\"\n"
 "create procedure\n"
 "DB.DBA.HP_AUTH_SPARQL_USER (in realm varchar)\n"
 "{\n"
@@ -10084,7 +10085,7 @@ static const char *proc132 =
 "\'false\', lines, allow_basic);\n"
 "return 0;\n"
 "}\n"
-"--src http_auth.sql:536\n";
+"--src http_auth.sql:537\n";
 
 /* xmla.sql */
 
@@ -10409,7 +10410,7 @@ static const char *proc138 =
 "stmt := sprintf (\'SELECT CAST (%s as VARCHAR)\', stmt);\n"
 "tree := sql_parse (stmt);\n"
 "}\n"
-"if (tree [0] <> 100)\n"
+"if (tree [0] <> 100 and tree[0] <> 113)\n"
 "{\n"
 "if (registry_get (\'XMLA-DML\') = \'1\')\n"
 "{\n"
@@ -10422,6 +10423,22 @@ static const char *proc138 =
 "res := exec (stmt, state, msg, vector (), 0, mdta, dta);\n"
 "if (isinteger (dta))\n"
 "dta := vector (vector (dta));\n"
+"if ((1 = length (dta)) and (1 = length (dta[0])) and (214 = __tag (dta[0][0])))\n"
+"{\n"
+"declare triples, inx any;\n"
+"triples := dict_list_keys (dta[0][0], 1);\n"
+"for (inx := 0; inx < length (triples); inx := inx + 1)\n"
+"{\n"
+"declare trip any;\n"
+"trip := triples [inx];\n"
+"trip [0] := __ro2sq (trip[0]);\n"
+"trip [1] := __ro2sq (trip[1]);\n"
+"trip [2] := __ro2sq (trip[2]);\n"
+"triples [inx] := trip;\n"
+"}\n"
+"dta := triples;\n"
+"exec_metadata (\'select \\\'\\\' as S, \\\'\\\' as P, \\\'\\\' as O any\', state, msg, mdta);\n"
+"}\n"
 "\n"
 "\n"
 "blob_limit := atoi (xmla_get_property (\"Properties\", \'BLOBLimit\', \'0\'));\n"
@@ -10452,7 +10469,7 @@ static const char *proc138 =
 "--src xmla.sql:263\n";
 
 static const char *proc139 = 
-"#line 388 \"[executable]/xmla.sql\"\n"
+"#line 404 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_not_local_dsn (in dsn varchar)\n"
 "{\n"
@@ -10464,10 +10481,10 @@ static const char *proc139 =
 "return 0;\n"
 "return 1;\n"
 "}\n"
-"--src xmla.sql:386\n";
+"--src xmla.sql:402\n";
 
 static const char *proc140 = 
-"#line 401 \"[executable]/xmla.sql\"\n"
+"#line 417 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_make_meta (in dta any)\n"
 "{\n"
@@ -10493,7 +10510,7 @@ static const char *proc140 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src xmla.sql:399\n";
+"--src xmla.sql:415\n";
 
 static const char *other64 = 
 "create method\n"
@@ -10723,6 +10740,8 @@ static const char *other70 =
 "dsn := self.xmla_get_property (\'DataSourceInfo\', xmla_service_name ());\n"
 "dsn := xmla_get_dsn_name (dsn);\n"
 "cat := self.xmla_get_restriction (\'CATALOG_NAME\', \'%\');\n"
+"if (cat is null)\n"
+"cat := \'%\';\n"
 "\n"
 "if (not xmla_not_local_dsn (dsn))\n"
 "{\n"
@@ -10769,7 +10788,7 @@ static const char *other70 =
 "}\n";
 
 static const char *proc141 = 
-"#line 706 \"[executable]/xmla.sql\"\n"
+"#line 724 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_make_xsd (inout mdta any)\n"
 "{\n"
@@ -10824,10 +10843,10 @@ static const char *proc141 =
 "mdta := xml_tree_doc (xsd);\n"
 "return;\n"
 "}\n"
-"--src xmla.sql:704\n";
+"--src xmla.sql:722\n";
 
 static const char *proc142 = 
-"#line 762 \"[executable]/xmla.sql\"\n"
+"#line 780 \"[executable]/xmla.sql\"\n"
 "create procedure xmla_make_struct (inout mdta any, inout dta any)\n"
 "{\n"
 "declare res any;\n"
@@ -10843,10 +10862,10 @@ static const char *proc142 =
 "dta := res;\n"
 "xmla_make_xsd (mdta);\n"
 "}\n"
-"--src xmla.sql:760\n";
+"--src xmla.sql:778\n";
 
 static const char *proc143 = 
-"#line 779 \"[executable]/xmla.sql\"\n"
+"#line 797 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_make_element (in mdta any, in dta any)\n"
 "{\n"
@@ -10861,6 +10880,8 @@ static const char *proc143 =
 "aset (res, i1, mdta[i][0]);\n"
 "if (mdta[i][1] = 131 and not isblob(dta[i]))\n"
 "aset (res, i2, cast (dta[i] as varbinary));\n"
+"else if (mdta[i][1] = 219 and 219 <> __tag (dta[i]))\n"
+"aset (res, i2, cast (dta[i] as decimal));\n"
 "else\n"
 "aset (res, i2, dta[i]);\n"
 "i := i + 1;\n"
@@ -10869,7 +10890,7 @@ static const char *proc143 =
 "}\n"
 "return res;\n"
 "}\n"
-"--src xmla.sql:777\n";
+"--src xmla.sql:795\n";
 
 static const char *other71 = 
 "create method xmla_dbschema_columns () for xmla_discover\n"
@@ -10883,6 +10904,15 @@ static const char *other71 =
 "sch := self.xmla_get_restriction (\'TABLE_SCHEMA\', \'%\');\n"
 "tb := self.xmla_get_restriction (\'TABLE_NAME\', \'%\');\n"
 "col := self.xmla_get_restriction (\'COLUMN_NAME\', \'%\');\n"
+"if (cat is null)\n"
+"cat := \'%\';\n"
+"if (sch is null)\n"
+"sch := \'%\';\n"
+"if (tb is null)\n"
+"tb := \'%\';\n"
+"if (col is null)\n"
+"col := \'%\';\n"
+"\n"
 "if (not xmla_not_local_dsn (dsn))\n"
 "{\n"
 "declare uname, passwd varchar;\n"
@@ -10891,36 +10921,36 @@ static const char *other71 =
 "if (uname is null or passwd is null)\n"
 "signal (\'00002\', \'Unable to process the request, because the UserName property is not set or incorrect\');\n"
 "set_user_id (uname, 1, passwd);\n"
-"exec (\'select\n"
+"exec(\'select\n"
 "name_part(KEY_TABLE, 0) as TABLE_CATALOG,\n"
 "name_part(KEY_TABLE, 1) as TABLE_SCHEMA,\n"
 "name_part(KEY_TABLE, 2) as TABLE_NAME,\n"
-"\"COLUMN\" as COLUMN_NAME,\'\n"
-"|| \' NULL as COLUMN_GUID,\'\n"
-"|| \' NULL as COLUMN_PROPID INTEGER,\'\n"
-"|| \' (select count(*) from DB.DBA.SYS_COLS where \"TABLE\" = KEY_TABLE and COL_ID <= c.COL_ID and \"COLUMN\" <> \'\'_IDN\'\') as ORDINAL_POSITION INTEGER,\'\n"
-"|| \' case when deserialize(COL_DEFAULT) is null then 0 else -1 end as COLUMN_HASDEFAULT SMALLINT,\'\n"
-"|| \' cast (deserialize(COL_DEFAULT) as NVARCHAR) as COLUMN_DEFAULT NVARCHAR(254),\'\n"
-"|| \' cast (DB.DBA.oledb_dbflags(COL_DTP, COL_NULLABLE) as integer) as COLUMN_FLAGS INTEGER,\'\n"
-"|| \' case COL_NULLABLE when 1 then -1 else 0 end as IS_NULLABLE SMALLINT,\'\n"
-"|| \' cast (DB.DBA.oledb_dbtype(COL_DTP) as integer) as DATA_TYPE SMALLINT,\'\n"
-"|| \' NULL as TYPE_GUID,\'\n"
-"|| \' cast (DB.DBA.oledb_char_max_len(COL_DTP, COL_PREC) as integer) as CHARACTER_MAXIMUM_LENGTH INTEGER,\'\n"
-"|| \' cast (DB.DBA.oledb_char_oct_len(COL_DTP, COL_PREC) as integer) as CHARACTER_OCTET_LENGTH INTEGER,\'\n"
-"|| \' cast (DB.DBA.oledb_num_prec(COL_DTP, COL_PREC) as smallint) as NUMERIC_PRECISION SMALLINT,\'\n"
-"|| \' cast (DB.DBA.oledb_num_scale(COL_DTP, COL_SCALE) as smallint) as NUMERIC_SCALE SMALLINT,\'\n"
-"|| \' cast (DB.DBA.oledb_datetime_prec(COL_DTP, COL_PREC) as integer) as DATETIME_PRECISION INTEGER,\'\n"
-"|| \' NULL as CHARACTER_SET_CATALOG NVARCHAR(1),\'\n"
-"|| \' NULL as CHARACTER_SET_SCHEMA NVARCHAR(1),\'\n"
-"|| \' NULL as CHARACTER_SET_NAME NVARCHAR(1),\'\n"
-"|| \' NULL as COLLATION_CATALOG NVARCHAR(1),\'\n"
-"|| \' NULL as COLLATION_SCHEMA NVARCHAR(1),\'\n"
-"|| \' NULL as COLLATION_NAME NVARCHAR(1),\'\n"
-"|| \' NULL as DOMAIN_CATALOG NVARCHAR(1),\'\n"
-"|| \' NULL as DOMAIN_SCHEMA NVARCHAR(1),\'\n"
-"|| \' NULL as DOMAIN_NAME NVARCHAR(1),\'\n"
-"|| \' NULL as DESCRIPTION NVARCHAR(1) \' ||\n"
-"\'from DB.DBA.SYS_KEYS, DB.DBA.SYS_KEY_PARTS, DB.DBA.SYS_COLS c\n"
+"\"COLUMN\" as COLUMN_NAME,\n"
+"NULL as COLUMN_GUID,\n"
+"NULL as COLUMN_PROPID INTEGER,\n"
+"(select count(*) from DB.DBA.SYS_COLS where \"TABLE\" = KEY_TABLE and COL_ID <= c.COL_ID and \"COLUMN\" <> \'\'_IDN\'\') as ORDINAL_POSITION INTEGER,\n"
+"case when deserialize(COL_DEFAULT) is null then 0 else -1 end as COLUMN_HASDEFAULT SMALLINT,\n"
+"cast (deserialize(COL_DEFAULT) as NVARCHAR) as COLUMN_DEFAULT NVARCHAR(254),\n"
+"cast (DB.DBA.oledb_dbflags(COL_DTP, COL_NULLABLE) as integer) as COLUMN_FLAGS INTEGER,\n"
+"case COL_NULLABLE when 1 then -1 else 0 end as IS_NULLABLE SMALLINT,\n"
+"cast (DB.DBA.oledb_dbtype(COL_DTP) as integer) as DATA_TYPE SMALLINT,\n"
+"NULL as TYPE_GUID,\n"
+"cast (DB.DBA.oledb_char_max_len(COL_DTP, COL_PREC) as integer) as CHARACTER_MAXIMUM_LENGTH INTEGER,\n"
+"cast (DB.DBA.oledb_char_oct_len(COL_DTP, COL_PREC) as integer) as CHARACTER_OCTET_LENGTH INTEGER,\n"
+"cast (DB.DBA.oledb_num_prec(COL_DTP, COL_PREC) as smallint) as NUMERIC_PRECISION SMALLINT,\n"
+"cast (DB.DBA.oledb_num_scale(COL_DTP, COL_SCALE) as smallint) as NUMERIC_SCALE SMALLINT,\n"
+"cast (DB.DBA.oledb_datetime_prec(COL_DTP, COL_PREC) as integer) as DATETIME_PRECISION INTEGER,\n"
+"NULL as CHARACTER_SET_CATALOG NVARCHAR(1),\n"
+"NULL as CHARACTER_SET_SCHEMA NVARCHAR(1),\n"
+"NULL as CHARACTER_SET_NAME NVARCHAR(1),\n"
+"NULL as COLLATION_CATALOG NVARCHAR(1),\n"
+"NULL as COLLATION_SCHEMA NVARCHAR(1),\n"
+"NULL as COLLATION_NAME NVARCHAR(1),\n"
+"NULL as DOMAIN_CATALOG NVARCHAR(1),\n"
+"NULL as DOMAIN_SCHEMA NVARCHAR(1),\n"
+"NULL as DOMAIN_NAME NVARCHAR(1),\n"
+"NULL as DESCRIPTION NVARCHAR(1)\n"
+"from DB.DBA.SYS_KEYS, DB.DBA.SYS_KEY_PARTS, DB.DBA.SYS_COLS c\n"
 "where\n"
 "__any_grants(KEY_TABLE) and\n"
 "name_part(KEY_TABLE, 0) = ? and\n"
@@ -10958,53 +10988,102 @@ static const char *other72 =
 "create method xmla_dbschema_foreign_keys () for xmla_discover\n"
 "{\n"
 "declare dta, mdta, stmt, state, msg any;\n"
-"declare dsn, cat, tb, col, sch any;\n"
-"declare uname, passwd, _tbl varchar;\n"
+"declare dsn any;\n"
+"declare p_cat, p_tbl, p_sch any;\n"
+"declare f_cat, f_tbl, f_sch any;\n"
+"declare _ptbl, _ftbl varchar;\n"
 "\n"
 "dsn := self.xmla_get_property (\'DataSourceInfo\', xmla_service_name ());\n"
 "dsn := xmla_get_dsn_name (dsn);\n"
-"cat := self.xmla_get_restriction (\'PK_TABLE_CATALOG\', \'%\');\n"
-"sch := self.xmla_get_restriction (\'TABLE_SCHEMA\', \'%\');\n"
-"tb := self.xmla_get_restriction (\'TABLE_NAME\', \'%\');\n"
-"cat := trim (cat, \'\"\');\n"
-"sch := trim (sch, \'\"\');\n"
-"tb := trim (tb, \'\"\');\n"
-"uname := self.xmla_get_property (\'UserName\', null);\n"
-"passwd := self.xmla_get_property (\'Password\', null);\n"
-"_tbl := cat || \'.\' || sch || \'.\' || tb;\n"
 "\n"
-"if (uname is null or passwd is null)\n"
-"signal (\'00002\', \'Unable to process the request, because the UserName property is not set or incorrect\');\n"
+"p_cat := self.xmla_get_restriction (\'PK_TABLE_CATALOG\', \'%\');\n"
+"p_sch := self.xmla_get_restriction (\'PK_TABLE_SCHEMA\', \'%\');\n"
+"p_tbl := self.xmla_get_restriction (\'PK_TABLE_NAME\', \'%\');\n"
+"f_cat := self.xmla_get_restriction (\'FK_TABLE_CATALOG\', \'%\');\n"
+"f_sch := self.xmla_get_restriction (\'FK_TABLE_SCHEMA\', \'%\');\n"
+"f_tbl := self.xmla_get_restriction (\'FK_TABLE_NAME\', \'%\');\n"
 "\n"
-"if (not xmla_not_local_dsn (dsn))\n"
+"if (p_cat is null) \n"
 "{\n"
-"set_user_id (uname, 1, passwd);\n"
-"if (exists (select 1 from DB.DBA.SYS_REMOTE_TABLE where RT_NAME like _tbl))\n"
-"{\n"
-"declare _dsn, r_name, _rt_name any;\n"
-"select RT_DSN, RT_REMOTE_NAME, RT_NAME into _dsn, r_name, _rt_name\n"
-"from DB.DBA.SYS_REMOTE_TABLE where RT_NAME like _tbl;\n"
-"r_name := \'%.\' || r_name;\n"
-"stmt := \'SELECT * FROM DB.DBA.SYS_FOREIGN_KEYS_VIEW WHERE PK_TABLE = \'\'\' || r_name ||\n"
-"\'\'\' AND FK_TABLE = \'\'\' || _rt_name\n"
-"|| \'\'\' AND DSN = \'\'\' || xmla_get_dsn_name (_dsn) || \'\'\'\';\n"
+"if (f_cat is not null)\n"
+"p_cat := f_cat;\n"
+"else\n"
+"p_cat := \'%\';\n"
 "}\n"
+"\n"
+"if (f_cat is null)\n"
+"{ \n"
+"if (p_cat is not null)\n"
+"f_cat := p_cat;\n"
 "else\n"
-"stmt := \'SELECT name_part (PK_TABLE, 1) as PK_TABLE_SCHEMA,\n"
-"name_part (PK_TABLE, 2) as PK_TABLE_NAME, PKCOLUMN_NAME as PK_COLUMN_NAME,\n"
-"name_part (FK_TABLE, 1) as FK_TABLE_SCHEMA,\n"
-"name_part (FK_TABLE, 2) as FK_TABLE_NAME, FKCOLUMN_NAME AS FK_COLUMN_NAME,\n"
-"KEY_SEQ, UPDATE_RULE, DELETE_RULE, FK_NAME\n"
-"FROM DB.DBA.SYS_FOREIGN_KEYS WHERE PK_TABLE like \'\'\' || _tbl || \'\'\' OR FK_TABLE like \'\'\' || _tbl || \'\'\'\';\n"
+"f_cat := \'%\';\n"
+"}\n"
+"\n"
+"if (p_sch is null)\n"
+"p_sch := \'%\';\n"
+"if (p_tbl is null)\n"
+"p_tbl := \'%\';\n"
+"if (f_sch is null)\n"
+"f_sch := \'%\';\n"
+"if (f_tbl is null)\n"
+"f_tbl := \'%\';\n"
+"\n"
+"p_cat := trim (p_cat, \'\"\');\n"
+"p_sch := trim (p_sch, \'\"\');\n"
+"p_tbl := trim (p_tbl, \'\"\');\n"
+"f_cat := trim (f_cat, \'\"\');\n"
+"f_sch := trim (f_sch, \'\"\');\n"
+"f_tbl := trim (f_tbl, \'\"\');\n"
+"_ptbl := p_cat || \'.\' || p_sch || \'.\' || p_tbl;\n"
+"_ftbl := f_cat || \'.\' || f_sch || \'.\' || f_tbl;\n"
+"\n"
+"if (not xmla_not_local_dsn (dsn))\n"
+"{\n"
+"declare uname, passwd varchar;\n"
+"uname := self.xmla_get_property (\'UserName\', null);\n"
+"passwd := self.xmla_get_property (\'Password\', null);\n"
+"if (uname is null or passwd is null)\n"
+"signal (\'00002\', \'Unable to process the request, because the UserName property is not set or incorrect\');\n"
+"set_user_id (uname, 1, passwd);\n"
+"exec(\'select\n"
+"name_part (PK_TABLE, 0) as PK_TABLE_CATALOG varchar (128),\n"
+"name_part (PK_TABLE, 1) as PK_TABLE_SCHEMA varchar (128),\n"
+"name_part (PK_TABLE, 2) as PK_TABLE_NAME varchar (128),\n"
+"PKCOLUMN_NAME as PK_COLUMN_NAME,\n"
+"NULL as PK_COLUMN_GUID,\n"
+"NULL as PK_COLUMN_PROPID INTEGER,\n"
+"name_part (FK_TABLE, 0) as FK_TABLE_CATALOG varchar (128),\n"
+"name_part (FK_TABLE, 1) as FK_TABLE_SCHEMA varchar (128),\n"
+"name_part (FK_TABLE, 2) as FK_TABLE_NAME varchar (128),\n"
+"FKCOLUMN_NAME as FK_COLUMN_NAME,\n"
+"NULL as FK_COLUMN_GUID,\n"
+"NULL as FK_COLUMN_PROPID INTEGER,\n"
+"(KEY_SEQ + 1) as ORDINAL INTEGER,\n"
+"(case UPDATE_RULE when 0 then \'\'NO ACTION\'\' when 1 then \'\'CASCADE\'\' when 2 then \'\'SET NULL\'\' when 3 then \'\'SET DEFAULT\'\' else NULL end) as UPDATE_RULE varchar(20),\n"
+"(case DELETE_RULE when 0 then \'\'NO ACTION\'\' when 1 then \'\'CASCADE\'\' when 2 then \'\'SET NULL\'\' when 3 then \'\'SET DEFAULT\'\' else NULL end) as DELETE_RULE varchar(20),\n"
+"PK_NAME, \n"
+"FK_NAME,\n"
+"3 as DEFERRABILITY SMALLINT\n"
+"from DB.DBA.SYS_FOREIGN_KEYS SYS_FOREIGN_KEYS\n"
+"where name_part (PK_TABLE, 0) like ?\n"
+"and name_part (PK_TABLE, 1) like ?\n"
+"and name_part (PK_TABLE, 2) like ?\n"
+"and name_part (FK_TABLE, 0) like ?\n"
+"and name_part (FK_TABLE, 1) like ?\n"
+"and name_part (FK_TABLE, 2) like ?\n"
+"order by 1, 2, 3, 7, 8, 9, 13 \'\n"
+", null, null,\n"
+"vector(p_cat, p_sch, p_tbl, f_cat, f_sch, f_tbl), 0, mdta, dta);\n"
 "}\n"
 "else\n"
 "{\n"
 "dsn := xmla_get_dsn_name (dsn);\n"
-"stmt := \'SELECT * FROM DB.DBA.SYS_FOREIGN_KEYS_VIEW WHERE PK_TABLE = \'\'\' || _tbl || \'\'\' AND FK_TABLE = \'\'\' || _tbl\n"
+"stmt := \'SELECT * FROM DB.DBA.SYS_FOREIGN_KEYS_VIEW WHERE PK_TABLE = \'\'\' \n"
+"|| _ptbl || \'\'\' AND FK_TABLE = \'\'\' || _ftbl\n"
 "|| \'\'\' AND DSN = \'\'\' || dsn || \'\'\'\';\n"
+"exec (stmt, state, msg, vector (), 0, mdta, dta);\n"
 "}\n"
 "\n"
-"exec (stmt, state, msg, vector (), 0, mdta, dta);\n"
 "xmla_make_struct (mdta, dta);\n"
 "self.metadata := mdta;\n"
 "return dta;\n"
@@ -11015,35 +11094,66 @@ static const char *other73 =
 "{\n"
 "declare state, msg, dta, mdta, stmt any;\n"
 "declare dsn, cat, tb, col, sch any;\n"
-"declare uname, passwd, _tbl varchar;\n"
+"declare _tbl varchar;\n"
 "\n"
 "dsn := self.xmla_get_property (\'DataSourceInfo\', xmla_service_name ());\n"
 "dsn := xmla_get_dsn_name (dsn);\n"
 "cat := self.xmla_get_restriction (\'TABLE_CATALOG\', \'%\');\n"
 "sch := self.xmla_get_restriction (\'TABLE_SCHEMA\', \'%\');\n"
 "tb := self.xmla_get_restriction (\'TABLE_NAME\', \'%\');\n"
-"uname := self.xmla_get_property (\'UserName\', null);\n"
-"passwd := self.xmla_get_property (\'Password\', null);\n"
+"\n"
+"if (cat is null)\n"
+"cat := \'%\';\n"
+"if (sch is null)\n"
+"sch := \'%\';\n"
+"if (tb is null)\n"
+"tb := \'%\';\n"
+"\n"
 "cat := trim (cat, \'\"\');\n"
 "sch := trim (sch, \'\"\');\n"
 "tb := trim (tb, \'\"\');\n"
 "_tbl := cat || \'.\' || sch || \'.\' || tb;\n"
 "\n"
-"if (uname is null or passwd is null)\n"
-"signal (\'00002\', \'Unable to process the request, because the UserName property is not set or incorrect\');\n"
-"\n"
 "if (not xmla_not_local_dsn (dsn))\n"
 "{\n"
+"declare uname, passwd varchar;\n"
+"uname := self.xmla_get_property (\'UserName\', null);\n"
+"passwd := self.xmla_get_property (\'Password\', null);\n"
+"if (uname is null or passwd is null)\n"
+"signal (\'00002\', \'Unable to process the request, because the UserName property is not set or incorrect\');\n"
 "set_user_id (uname, 1, passwd);\n"
-"stmt := sprintf (\'SELECT COLUMN_NAME FROM %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS LEFT JOIN %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE ON %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_NAME = %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE.CONSTRAINT_NAME WHERE  CONSTRAINT_TYPE = \'\'PRIMARY KEY\'\' AND %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_NAME=\'\'%s\'\' AND %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_SCHEMA=\'\'%s\'\' AND %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA=\'\'%s\'\' AND %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE.TABLE_SCHEMA=\'\'%s\'\' AND %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA=\'\'%s\'\'\', cat, cat, cat, cat, cat, tb, cat, sch, cat, sch, cat, sch, cat, sch);\n"
+"exec(\'select\n"
+"name_part(KEY_TABLE, 0) AS TABLE_CATALOG NVARCHAR(128),\n"
+"name_part(KEY_TABLE, 1) AS TABLE_SCHEMA NVARCHAR(128),\n"
+"name_part(KEY_TABLE, 2) AS TABLE_NAME NVARCHAR(128),\n"
+"\"COLUMN\" as COLUMN_NAME NVARCHAR(128),\n"
+"NULL as COLUMN_GUID,\n"
+"NULL as COLUMN_POPID INTEGER,\n"
+"(KP_NTH + 1) as ORDINAL,\n"
+"name_part(KEY_NAME, 2) as PK_NAME\n"
+"from DB.DBA.SYS_KEYS, DB.DBA.SYS_KEY_PARTS, DB.DBA.SYS_COLS\n"
+"where\n"
+"__any_grants(KEY_TABLE) and\n"
+"name_part(KEY_TABLE, 0) LIKE ? and\n"
+"name_part(KEY_TABLE, 1) LIKE ? and\n"
+"name_part(KEY_TABLE, 2) LIKE ? and\n"
+"KEY_IS_MAIN = 1 and\n"
+"KEY_MIGRATE_TO is null and\n"
+"KP_KEY_ID = KEY_ID and\n"
+"KP_NTH < KEY_DECL_PARTS and\n"
+"COL_ID = KP_COL and\n"
+"\"COLUMN\" <> \'\'_IDN\'\'\n"
+"order by KEY_TABLE\'\n"
+", null, null,\n"
+"vector(cat, sch, tb), 0, mdta, dta);\n"
 "}\n"
 "else\n"
 "{\n"
 "dsn := xmla_get_dsn_name (dsn);\n"
 "stmt := \'SELECT * FROM DB.DBA.SYS_PRIMARY_KEYS_VIEW WHERE PK_TABLE = \'\'\' || _tbl || \'\'\' AND DSN = \'\'\' || dsn || \'\'\'\';\n"
+"exec (stmt, state, msg, vector (), 0, mdta, dta);\n"
 "}\n"
 "\n"
-"exec (stmt, state, msg, vector (), 0, mdta, dta);\n"
 "xmla_make_struct (mdta, dta);\n"
 "self.metadata := mdta;\n"
 "return dta;\n"
@@ -11133,13 +11243,21 @@ static const char *other75 =
 "create method xmla_dbschema_tables () for xmla_discover\n"
 "{\n"
 "declare dta, mdta any;\n"
-"declare dsn, cat, tb any;\n"
+"declare dsn, cat, sch, tb any;\n"
 "\n"
 "dsn := self.xmla_get_property (\'DataSourceInfo\', xmla_service_name ());\n"
 "dsn := xmla_get_dsn_name (dsn);\n"
-"\n"
-"tb := self.xmla_get_restriction (\'TABLE_NAME\', \'%\');\n"
 "cat := self.xmla_get_restriction (\'TABLE_CATALOG\', \'DB\');\n"
+"sch := self.xmla_get_restriction (\'TABLE_SCHEMA\', \'%\');\n"
+"tb := self.xmla_get_restriction (\'TABLE_NAME\', \'%\');\n"
+"\n"
+"if (cat is null)\n"
+"cat := \'DB\';\n"
+"if (sch is null)\n"
+"sch := \'%\';\n"
+"if (tb is null)\n"
+"tb := \'%\';\n"
+"\n"
 "if (not xmla_not_local_dsn (dsn))\n"
 "{\n"
 "declare uname, passwd varchar;\n"
@@ -11159,9 +11277,12 @@ static const char *other75 =
 "NULL as DATE_MODIFIED DATE\n"
 "from DB.DBA.SYS_KEYS where\n"
 "__any_grants(KEY_TABLE) and\n"
-"name_part(KEY_TABLE, 0) = ? and name_part(KEY_TABLE, 2) like ?\n"
-"and KEY_IS_MAIN = 1 and KEY_MIGRATE_TO is null\', null, null,\n"
-"vector (cat, tb), 0, mdta, dta);\n"
+"name_part(KEY_TABLE, 0) like ? and \n"
+"name_part(KEY_TABLE, 1) like ? and\n"
+"name_part(KEY_TABLE, 2) like ?\n"
+"and KEY_IS_MAIN = 1 and \n"
+"KEY_MIGRATE_TO is null\', null, null,\n"
+"vector (cat, sch, tb), 0, mdta, dta);\n"
 "}\n"
 "else\n"
 "{\n"
@@ -11184,7 +11305,7 @@ static const char *other76 =
 "}\n";
 
 static const char *proc144 = 
-"#line 1120 \"[executable]/xmla.sql\"\n"
+"#line 1240 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_schs ()\n"
 "{\n"
@@ -11200,12 +11321,11 @@ static const char *proc144 =
 "soap_box_structure (\'TABLE_CATALOG\', \'\', \'TABLE_SCHEMA\', \'\', \'TABLE_NAME\', \'\', \'TABLE_TYPE\', \'\', \'COLUMN_NAME\', \'\')\n"
 ",\'\'),\n"
 "vector (\'DBSCHEMA_PRIMARY_KEYS\',\n"
-"soap_box_structure (\'TABLE_CATALOG\', \'\', \'TABLE_SCHEMA\', \'\', \'TABLE_NAME\', \'\', \'TABLE_TYPE\', \'\', \'COLUMN_NAME\', \'\')\n"
+"soap_box_structure (\'TABLE_CATALOG\', \'\', \'TABLE_SCHEMA\', \'\', \'TABLE_NAME\', \'\')\n"
 ",\'\'),\n"
 "vector (\'DBSCHEMA_FOREIGN_KEYS\',\n"
-"soap_box_structure (\'PK_TABLE_SCHEMA\', \'\', \'PK_TABLE_NAME\', \'\', \'PK_COLUMN_NAME\', \'\',\n"
-"\'FK_TABLE_SCHEMA\', \'\', \'FK_TABLE_NAME\', \'\', \'FK_COLUMN_NAME\', \'\',\n"
-"\'KEY_SEQ\', \'\', \'UPDATE_RULE\', \'\', \'DELETE_RULE\', \'\', \'FK_NAME\', \'\')\n"
+"soap_box_structure (\'PK_TABLE_CATALOG\', \'\', \'PK_TABLE_SCHEMA\', \'\', \'PK_TABLE_NAME\', \'\',\n"
+"\'FK_TABLE_CATALOG\', \'\', \'FK_TABLE_SCHEMA\', \'\', \'FK_TABLE_NAME\', \'\')\n"
 ",\'\'),\n"
 "vector (\'DBSCHEMA_PROVIDER_TYPES\',\n"
 "soap_box_structure (\'DATA_TYPE\', \'\', \'BEST_MATCH\', \'\')\n"
@@ -11230,10 +11350,10 @@ static const char *proc144 =
 ",\'\')\n"
 ");\n"
 "}\n"
-"--src xmla.sql:1118\n";
+"--src xmla.sql:1238\n";
 
 static const char *proc145 = 
-"#line 1168 \"[executable]/xmla.sql\"\n"
+"#line 1287 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_props (in _dsn varchar := NULL)\n"
 "{\n"
@@ -11274,20 +11394,20 @@ static const char *proc145 =
 "vector (\'UserName\'	, \'\', \'string\', \'R/W\', 0, \'\')\n"
 ");\n"
 "}\n"
-"--src xmla.sql:1166\n";
+"--src xmla.sql:1285\n";
 
 static const char *proc146 = 
-"#line 1210 \"[executable]/xmla.sql\"\n"
+"#line 1329 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_dsn_name (in _dsn varchar)\n"
 "{\n"
 "return replace (_dsn, \'DSN=\', \'\');\n"
 "return _dsn;\n"
 "}\n"
-"--src xmla.sql:1208\n";
+"--src xmla.sql:1327\n";
 
 static const char *proc147 = 
-"#line 1218 \"[executable]/xmla.sql\"\n"
+"#line 1337 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_is_local_service (in _dsn varchar)\n"
 "{\n"
@@ -11295,10 +11415,10 @@ static const char *proc147 =
 "return 0;\n"
 "return 1;\n"
 "}\n"
-"--src xmla.sql:1216\n";
+"--src xmla.sql:1335\n";
 
 static const char *proc148 = 
-"#line 1227 \"[executable]/xmla.sql\"\n"
+"#line 1346 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_set_props (in properties any)\n"
 "{\n"
@@ -11320,10 +11440,10 @@ static const char *proc148 =
 "}\n"
 "return def_prop;\n"
 "}\n"
-"--src xmla.sql:1225\n";
+"--src xmla.sql:1344\n";
 
 static const char *proc149 = 
-"#line 1250 \"[executable]/xmla.sql\"\n"
+"#line 1369 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_enums ()\n"
 "{\n"
@@ -11355,10 +11475,10 @@ static const char *proc149 =
 "vector(\'MDXSupportLevel\',\'\',\'string\',\'None\',\'\',25)\n"
 ");\n"
 "}\n"
-"--src xmla.sql:1248\n";
+"--src xmla.sql:1367\n";
 
 static const char *proc150 = 
-"#line 1283 \"[executable]/xmla.sql\"\n"
+"#line 1402 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_literals ()\n"
 "{\n"
@@ -11382,19 +11502,19 @@ static const char *proc150 =
 "vector (\'DBLITERAL_QUOTE_SUFFIX\', \'\"\', \'\', \'\', 0)\n"
 ");\n"
 "}\n"
-"--src xmla.sql:1281\n";
+"--src xmla.sql:1400\n";
 
 static const char *proc151 = 
-"#line 1309 \"[executable]/xmla.sql\"\n"
+"#line 1428 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_service_name ()\n"
 "{\n"
 "return \'Local_Instance\';\n"
 "}\n"
-"--src xmla.sql:1307\n";
+"--src xmla.sql:1426\n";
 
 static const char *proc152 = 
-"#line 1317 \"[executable]/xmla.sql\"\n"
+"#line 1436 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_kwds ()\n"
 "{\n"
@@ -11431,10 +11551,10 @@ static const char *proc152 =
 "\'VARBINARY\', \'VARCHAR\', \'VARIABLE\', \'VIEW\', \'WHEN\', \'WHENEVER\', \'WHERE\', \'WHILE\', \'WITH\', \'WORK\', \'XML\', \'XPATH\'\n"
 ");\n"
 "}\n"
-"--src xmla.sql:1315\n";
+"--src xmla.sql:1434\n";
 
 static const char *proc153 = 
-"#line 1356 \"[executable]/xmla.sql\"\n"
+"#line 1475 \"[executable]/xmla.sql\"\n"
 "create procedure DB.DBA.xmla_vdd_dbschema_tables_rpoc (in tb varchar, in cat varchar, in dsn varchar)\n"
 "{\n"
 "declare _all, temp any;\n"
@@ -11460,10 +11580,10 @@ static const char *proc153 =
 "}\n"
 "\n"
 "}\n"
-"--src xmla.sql:1354\n";
+"--src xmla.sql:1473\n";
 
 static const char *proc154 = 
-"#line 1383 \"[executable]/xmla.sql\"\n"
+"#line 1502 \"[executable]/xmla.sql\"\n"
 "create procedure DB.DBA.xmla_vdd_dbschema_columns_rpoc (in tb varchar, in cat varchar, in col varchar, in dsn varchar)\n"
 "{\n"
 "declare _all any;\n"
@@ -11498,7 +11618,7 @@ static const char *proc154 =
 "cast (_line[11] as nvarchar));\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1381\n";
+"--src xmla.sql:1500\n";
 
 static const char *view0 = 
 "create procedure view XMLA_VDD_DBSCHEMA_COLUMNS as DB.DBA.xmla_vdd_dbschema_columns_rpoc (cat, tb, col, dsn)\n"
@@ -11523,7 +11643,7 @@ static const char *view2 =
 "GUID varchar, TYPELIB varchar, VERSION varchar, IS_LONG int, BEST_MATCH int, IS_FIXEDLENGTH int)\n";
 
 static const char *proc155 = 
-"#line 1447 \"[executable]/xmla.sql\"\n"
+"#line 1566 \"[executable]/xmla.sql\"\n"
 "create procedure xmla_vdd_dbschema_provider_types_rpoc (in tb int, in cat int, in dsn varchar)\n"
 "{\n"
 "declare _all any;\n"
@@ -11552,10 +11672,10 @@ static const char *proc155 =
 "NULL, NULL, NULL, NULL, NULL);\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1445\n";
+"--src xmla.sql:1564\n";
 
 static const char *proc156 = 
-"#line 1478 \"[executable]/xmla.sql\"\n"
+"#line 1597 \"[executable]/xmla.sql\"\n"
 "create procedure mxla_fk_pk_check (in dsn varchar, inout stmt varchar, inout mdta any, inout dta any)\n"
 "{\n"
 "declare state, msg any;\n"
@@ -11576,10 +11696,10 @@ static const char *proc156 =
 "\n"
 "exec (stmt, state, msg, vector (), 0, mdta, dta);\n"
 "}\n"
-"--src xmla.sql:1476\n";
+"--src xmla.sql:1595\n";
 
 static const char *proc157 = 
-"#line 1501 \"[executable]/xmla.sql\"\n"
+"#line 1620 \"[executable]/xmla.sql\"\n"
 "create procedure mxla_fk_pk_check_local (inout stmt varchar, inout mdta any, inout dta any)\n"
 "{\n"
 "declare _new, l_name, _schema, _catalog, _name, idx, _line any;\n"
@@ -11636,7 +11756,7 @@ static const char *proc157 =
 "\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1499\n";
+"--src xmla.sql:1618\n";
 
 static const char *view3 = 
 "create procedure view DB.DBA.SYS_FOREIGN_KEYS_VIEW as DB.DBA.\"XMLA_GET_FK\" (PK_TABLE, FK_TABLE, DSN)\n"
@@ -11656,7 +11776,7 @@ static const char *view4 =
 "(COLUMN_NAME VARCHAR)\n";
 
 static const char *proc158 = 
-"#line 1582 \"[executable]/xmla.sql\"\n"
+"#line 1701 \"[executable]/xmla.sql\"\n"
 "create procedure DB.DBA.\"XMLA_GET_PK\" (in _pk_table varchar, in dsn varchar)\n"
 "{\n"
 "declare COLUMN_NAME VARCHAR;\n"
@@ -11680,10 +11800,10 @@ static const char *proc158 =
 "result (_pk_tables[3]);\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1580\n";
+"--src xmla.sql:1699\n";
 
 static const char *proc159 = 
-"#line 1607 \"[executable]/xmla.sql\"\n"
+"#line 1726 \"[executable]/xmla.sql\"\n"
 "create procedure DB.DBA.\"XMLA_GET_FK\" (in _pk_table varchar, in _fk_table varchar, in dsn varchar)\n"
 "{\n"
 "declare PK_TABLE_SCHEMA VARCHAR;\n"
@@ -11747,17 +11867,17 @@ static const char *proc159 =
 "_fk_tables[8], _fk_tables[9], _fk_tables[10], _fk_tables[11]);\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1605\n";
+"--src xmla.sql:1724\n";
 
 static const char *proc160 = 
-"#line 1672 \"[executable]/xmla.sql\"\n"
+"#line 1791 \"[executable]/xmla.sql\"\n"
 "create procedure XMLA_USER_INIT ()\n"
 "{\n"
 "if (exists (select 1 from \"DB\".\"DBA\".\"SYS_USERS\" where U_NAME = \'XMLA\'))\n"
 "return;\n"
 "DB.DBA.USER_CREATE (\'XMLA\', uuid(), vector (\'DISABLED\', 1, \'LOGIN_QUALIFIER\', \'XMLA\'));\n"
 "}\n"
-"--src xmla.sql:1670\n";
+"--src xmla.sql:1789\n";
 
 static const char *other77 = 
 "XMLA_USER_INIT ()\n";
@@ -11795,7 +11915,7 @@ static const char *other92 =
 static const char *other93 = 
 "grant all privileges on DB.DBA.\"SYS_PRIMARY_KEYS_VIEW\" to \"XMLA\"\n";
 static const char *proc161 = 
-"#line 1733 \"[executable]/xmla.sql\"\n"
+"#line 1852 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_cursor_stmt_change (in _props any, inout _stmt varchar)\n"
 "{\n"
@@ -11846,10 +11966,10 @@ static const char *proc161 =
 "_stmt := replace (_stmt, _left_str, new_stmpt, 1);\n"
 "\n"
 "}\n"
-"--src xmla.sql:1731\n";
+"--src xmla.sql:1850\n";
 
 static const char *proc162 = 
-"#line 1785 \"[executable]/xmla.sql\"\n"
+"#line 1904 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_make_cursors_state (in _props any, inout _dta any, in stmt any)\n"
 "{\n"
@@ -11932,10 +12052,10 @@ static const char *proc162 =
 "_dta := _new_dta;\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1783\n";
+"--src xmla.sql:1902\n";
 
 static const char *proc163 = 
-"#line 1870 \"[executable]/xmla.sql\"\n"
+"#line 1989 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_make_skip (in _skip any, in _add int, in _dir int)\n"
 "{\n"
@@ -11962,19 +12082,19 @@ static const char *proc163 =
 "\n"
 "return ret;\n"
 "}\n"
-"--src xmla.sql:1868\n";
+"--src xmla.sql:1987\n";
 
 static const char *proc164 = 
-"#line 1898 \"[executable]/xmla.sql\"\n"
+"#line 2017 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_version ()\n"
 "{\n"
 "return \'1.01\';\n"
 "}\n"
-"--src xmla.sql:1896\n";
+"--src xmla.sql:2015\n";
 
 static const char *proc165 = 
-"#line 1906 \"[executable]/xmla.sql\"\n"
+"#line 2025 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_format_mdta (inout mdta any)\n"
 "{\n"
@@ -11993,10 +12113,10 @@ static const char *proc165 =
 "\n"
 "aset (mdta, 0, temp);\n"
 "}\n"
-"--src xmla.sql:1904\n";
+"--src xmla.sql:2023\n";
 
 static const char *proc166 = 
-"#line 1927 \"[executable]/xmla.sql\"\n"
+"#line 2046 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_get_rows_from_stmt (in stmt any)\n"
 "{\n"
@@ -12021,10 +12141,10 @@ static const char *proc166 =
 "\n"
 "return dta[0][0];\n"
 "}\n"
-"--src xmla.sql:1925\n";
+"--src xmla.sql:2044\n";
 
 static const char *proc167 = 
-"#line 1954 \"[executable]/xmla.sql\"\n"
+"#line 2073 \"[executable]/xmla.sql\"\n"
 "create procedure\n"
 "xmla_sparql_result (inout mdta any, inout dta any, in stmt any)\n"
 "{\n"
@@ -12054,7 +12174,7 @@ static const char *proc167 =
 "}\n"
 "}\n"
 "}\n"
-"--src xmla.sql:1952\n";
+"--src xmla.sql:2071\n";
 
 /* openxml.sql */
 
@@ -14212,7 +14332,7 @@ static const char *other155 =
 "declare i int;\n"
 "i := 0;\n"
 "while( i < length(parsed_text) ) {\n"
-"aset(parsed_text, i, trim(parsed_text[i], \'\\r\\n \') );\n"
+"\n"
 "err_sqlstate := \'00000\'; err_msg := \'\';\n"
 "\n"
 "result := null;\n"
@@ -14372,8 +14492,12 @@ static const char *proc173 =
 "}\n"
 "else\n"
 "{\n"
+"declare res any; \n"
+"res := 0;\n"
 "if (__tag (res_col) = 182 and cset is not null)\n"
-"res_col := charset_recode (res_col, cset, \'_WIDE_\');\n"
+"res := charset_recode (res_col, cset, \'_WIDE_\');\n"
+"if (res <> 0)\n"
+"res_col := res;		\n"
 "http_value (coalesce (res_col, \'<DB NULL>\'));\n"
 "}\n"
 "next:\n"
@@ -14946,7 +15070,7 @@ static const char *other187 =
 "}\n";
 
 static const char *proc174 = 
-"#line 2858 \"[executable]/vspx.sql\"\n"
+"#line 2862 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_xtext_node (in val any)\n"
 "{\n"
 "if (val is null)\n"
@@ -14956,7 +15080,7 @@ static const char *proc174 =
 "else\n"
 "return cast (val as varchar);\n"
 "}\n"
-"--src vspx.sql:2856\n";
+"--src vspx.sql:2860\n";
 
 static const char *other188 = 
 "create method epilogue_render () for vspx_form\n"
@@ -15177,7 +15301,7 @@ static const char *other197 =
 "}\n";
 
 static const char *proc175 = 
-"#line 3095 \"[executable]/vspx.sql\"\n"
+"#line 3099 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "vspx_print_html_attrs (inout control vspx_control)\n"
 "{\n"
@@ -15195,7 +15319,7 @@ static const char *proc175 =
 "i := i + 1;\n"
 "}\n"
 "}\n"
-"--src vspx.sql:3093\n";
+"--src vspx.sql:3097\n";
 
 static const char *other198 = 
 "create method vc_render () for vspx_url\n"
@@ -15403,7 +15527,7 @@ static const char *other212 =
 "}\n";
 
 static const char *proc176 = 
-"#line 3321 \"[executable]/vspx.sql\"\n"
+"#line 3325 \"[executable]/vspx.sql\"\n"
 "create function XMLS_VALUE_OF_SUBTREE (in _ent any, in _path varchar, in _params any, in _place varchar) returns any\n"
 "{\n"
 "\n"
@@ -15435,7 +15559,7 @@ static const char *proc176 =
 "}\n"
 "return cast (_ent as varchar);\n"
 "}\n"
-"--src vspx.sql:3319\n";
+"--src vspx.sql:3323\n";
 
 static const char *other213 = 
 "create method vc_get_from_element () for vspx_field_value\n"
@@ -17108,7 +17232,7 @@ static const char *udt51 =
 "as ( vc_stub any ) temporary self as ref\n";
 
 static const char *proc177 = 
-"#line 5035 \"[executable]/vspx.sql\"\n"
+"#line 5039 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_get_compiler_signature () returns varchar\n"
 "{\n"
 "declare res varchar;\n"
@@ -17122,10 +17246,10 @@ static const char *proc177 =
 ");\n"
 "return res;\n"
 "}\n"
-"--src vspx.sql:5033\n";
+"--src vspx.sql:5037\n";
 
 static const char *proc178 = 
-"#line 5050 \"[executable]/vspx.sql\"\n"
+"#line 5054 \"[executable]/vspx.sql\"\n"
 "create procedure\n"
 "vspx_make_temp_names (in resource_name varchar, inout vspxm_name varchar, inout sql_name varchar)\n"
 "returns int\n"
@@ -17157,10 +17281,10 @@ static const char *proc178 =
 "\n"
 "return is_temp;\n"
 "}\n"
-"--src vspx.sql:5048\n";
+"--src vspx.sql:5052\n";
 
 static const char *proc179 = 
-"#line 5084 \"[executable]/vspx.sql\"\n"
+"#line 5088 \"[executable]/vspx.sql\"\n"
 "create function vspx_make_vspxm (\n"
 "in resource_name varchar,\n"
 "in resource_text varchar,\n"
@@ -17398,10 +17522,10 @@ static const char *proc179 =
 "xslt_stale (xslt_macro_sheet_name);\n"
 "return xe;\n"
 "}\n"
-"--src vspx.sql:5082\n";
+"--src vspx.sql:5086\n";
 
 static const char *proc180 = 
-"#line 5324 \"[executable]/vspx.sql\"\n"
+"#line 5328 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_make_sql (\n"
 "in vspx_dbname varchar,\n"
 "in vspx_user varchar,\n"
@@ -17465,10 +17589,10 @@ static const char *proc180 =
 "vspx_src_store (sql_name, string_output_string (messages));\n"
 "return code_files;\n"
 "}\n"
-"--src vspx.sql:5322\n";
+"--src vspx.sql:5326\n";
 
 static const char *proc181 = 
-"#line 5390 \"[executable]/vspx.sql\"\n"
+"#line 5394 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_load_sql (\n"
 "in vspx_dbname varchar,\n"
 "in vspx_user varchar,\n"
@@ -17548,10 +17672,10 @@ static const char *proc181 =
 "curline := curline + 1;\n"
 "}\n"
 "}\n"
-"--src vspx.sql:5388\n";
+"--src vspx.sql:5392\n";
 
 static const char *proc182 = 
-"#line 5471 \"[executable]/vspx.sql\"\n"
+"#line 5475 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_src_get (in resource_name varchar, inout ses any, in try_temp int)\n"
 "{\n"
 "declare is_dav int;\n"
@@ -17583,10 +17707,10 @@ static const char *proc182 =
 "}\n"
 "return ret;\n"
 "}\n"
-"--src vspx.sql:5469\n";
+"--src vspx.sql:5473\n";
 
 static const char *proc183 = 
-"#line 5504 \"[executable]/vspx.sql\"\n"
+"#line 5508 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_src_store (in resource_name varchar, inout ses any)\n"
 "{\n"
 "declare is_dav int;\n"
@@ -17614,10 +17738,10 @@ static const char *proc183 =
 "}\n"
 "return;\n"
 "}\n"
-"--src vspx.sql:5502\n";
+"--src vspx.sql:5506\n";
 
 static const char *proc184 = 
-"#line 5533 \"[executable]/vspx.sql\"\n"
+"#line 5537 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_base_url (in f varchar)\n"
 "{\n"
 "if (http_map_get (\'is_dav\'))\n"
@@ -17625,10 +17749,10 @@ static const char *proc184 =
 "else\n"
 "return concat (\'file://\', f);\n"
 "}\n"
-"--src vspx.sql:5531\n";
+"--src vspx.sql:5535\n";
 
 static const char *proc185 = 
-"#line 5542 \"[executable]/vspx.sql\"\n"
+"#line 5546 \"[executable]/vspx.sql\"\n"
 "create procedure vsxp_src_stat (in f varchar)\n"
 "{\n"
 "if (http_map_get (\'is_dav\'))\n"
@@ -17640,10 +17764,10 @@ static const char *proc185 =
 "else\n"
 "return file_stat (concat (http_root (), f));\n"
 "}\n"
-"--src vspx.sql:5540\n";
+"--src vspx.sql:5544\n";
 
 static const char *proc186 = 
-"#line 5555 \"[executable]/vspx.sql\"\n"
+"#line 5559 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_url_stat (in base_uri varchar)\n"
 "{\n"
 "declare s_url any;\n"
@@ -17665,10 +17789,10 @@ static const char *proc186 =
 "else\n"
 "return 0;\n"
 "}\n"
-"--src vspx.sql:5553\n";
+"--src vspx.sql:5557\n";
 
 static const char *proc187 = 
-"#line 5578 \"[executable]/vspx.sql\"\n"
+"#line 5582 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_make_stat_vector (in dep_files any)\n"
 "{\n"
 "declare inx integer;\n"
@@ -17689,10 +17813,10 @@ static const char *proc187 =
 "\n"
 "return dep_string;\n"
 "}\n"
-"--src vspx.sql:5576\n";
+"--src vspx.sql:5580\n";
 
 static const char *proc188 = 
-"#line 5600 \"[executable]/vspx.sql\"\n"
+"#line 5604 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_check_file_deps (in resource_name varchar)\n"
 "{\n"
 "if (registry_get (\'vspx_production_mode\') <> \'1\')\n"
@@ -17727,10 +17851,10 @@ static const char *proc188 =
 "}\n"
 "return 1;\n"
 "}\n"
-"--src vspx.sql:5598\n";
+"--src vspx.sql:5602\n";
 
 static const char *proc189 = 
-"#line 5636 \"[executable]/vspx.sql\"\n"
+"#line 5640 \"[executable]/vspx.sql\"\n"
 "create function\n"
 "vspx_get_subclass_name (in resource_name varchar, in class_name varchar) returns varchar\n"
 "{\n"
@@ -17744,10 +17868,10 @@ static const char *proc189 =
 "}\n"
 "return class_name;\n"
 "}\n"
-"--src vspx.sql:5634\n";
+"--src vspx.sql:5638\n";
 
 static const char *proc190 = 
-"#line 5651 \"[executable]/vspx.sql\"\n"
+"#line 5655 \"[executable]/vspx.sql\"\n"
 "create function\n"
 "vspx_get_class_name (\n"
 "in resource_name varchar ) returns varchar\n"
@@ -17768,10 +17892,10 @@ static const char *proc190 =
 "class_name := concat (md5 (class_name), subseq (class_name, len-31));\n"
 "return fix_identifier_case (concat (\'page_\', class_name));\n"
 "}\n"
-"--src vspx.sql:5649\n";
+"--src vspx.sql:5653\n";
 
 static const char *proc191 = 
-"#line 5673 \"[executable]/vspx.sql\"\n"
+"#line 5677 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_get_signature (in dbname varchar, in usr varchar, in res varchar)\n"
 "{\n"
 "declare signature varchar;\n"
@@ -17782,10 +17906,10 @@ static const char *proc191 =
 "vspx_get_compiler_signature() );\n"
 "return signature;\n"
 "}\n"
-"--src vspx.sql:5671\n";
+"--src vspx.sql:5675\n";
 
 static const char *proc192 = 
-"#line 5685 \"[executable]/vspx.sql\"\n"
+"#line 5689 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_load_code (in vspx_dbname varchar, in vspx_user varchar,\n"
 "in resource_name varchar, in code_files any)\n"
 "{\n"
@@ -17808,10 +17932,10 @@ static const char *proc192 =
 "i := i + 1;\n"
 "}\n"
 "}\n"
-"--src vspx.sql:5683\n";
+"--src vspx.sql:5687\n";
 
 static const char *proc193 = 
-"#line 5709 \"[executable]/vspx.sql\"\n"
+"#line 5713 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_report_debug_log (in page vspx_page)\n"
 "{\n"
 "declare sheet_name varchar;\n"
@@ -17822,10 +17946,10 @@ static const char *proc193 =
 "http (\']]>-\' || \'->]]></table></div></ins></del><hr>\');\n"
 "http_value (xslt (sheet_name, page.vc_get_debug_log(\'xmp\'), vector(\'tgt\',\'http\')));\n"
 "}\n"
-"--src vspx.sql:5707\n";
+"--src vspx.sql:5711\n";
 
 static const char *proc194 = 
-"#line 5721 \"[executable]/vspx.sql\"\n"
+"#line 5725 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_get_user_info (inout vspx_dbname varchar, inout vspx_user varchar)\n"
 "{\n"
 "\n"
@@ -17833,10 +17957,10 @@ static const char *proc194 =
 "\n"
 "vspx_user := fix_identifier_case (http_map_get (\'vsp_uid\'));\n"
 "}\n"
-"--src vspx.sql:5719\n";
+"--src vspx.sql:5723\n";
 
 static const char *proc195 = 
-"#line 5731 \"[executable]/vspx.sql\"\n"
+"#line 5735 \"[executable]/vspx.sql\"\n"
 "create procedure\n"
 "vspx_dispatch (in resource_name varchar, inout path any, inout params any, inout lines any, in class_name varchar := null, in compile_only int := 0, in vspx_dbname varchar := NULL, in vspx_user varchar := NULL)\n"
 "{\n"
@@ -18007,10 +18131,10 @@ static const char *proc195 =
 "vspx_report_debug_log (page);\n"
 "return page;\n"
 "}\n"
-"--src vspx.sql:5729\n";
+"--src vspx.sql:5733\n";
 
 static const char *proc196 = 
-"#line 5904 \"[executable]/vspx.sql\"\n"
+"#line 5908 \"[executable]/vspx.sql\"\n"
 "create procedure\n"
 "vspx_verify_pass (in auth_vec any, in passwd varchar)\n"
 "{\n"
@@ -18024,10 +18148,10 @@ static const char *proc196 =
 "get_keyword (\'qop\', auth_vec, \'\'),\n"
 "passwd);\n"
 "}\n"
-"--src vspx.sql:5902\n";
+"--src vspx.sql:5906\n";
 
 static const char *proc197 = 
-"#line 5920 \"[executable]/vspx.sql\"\n"
+"#line 5924 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "vspx_get_cookie_vec (in lines any)\n"
 "{\n"
@@ -18053,10 +18177,10 @@ static const char *proc197 =
 "}\n"
 "return cookie_vec;\n"
 "}\n"
-"--src vspx.sql:5918\n";
+"--src vspx.sql:5922\n";
 
 static const char *proc198 = 
-"#line 5948 \"[executable]/vspx.sql\"\n"
+"#line 5952 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "vspx_do_compact (in arr any) returns any\n"
 "{\n"
@@ -18076,10 +18200,10 @@ static const char *proc198 =
 "}\n"
 "return ret;\n"
 "}\n"
-"--src vspx.sql:5946\n";
+"--src vspx.sql:5950\n";
 
 static const char *proc199 = 
-"#line 5973 \"[executable]/vspx.sql\"\n"
+"#line 5977 \"[executable]/vspx.sql\"\n"
 " create procedure DB.DBA.VSPX_COLUMNS_META (in sql varchar)\n"
 "{\n"
 "declare mtd, res any;\n"
@@ -18100,12 +18224,12 @@ static const char *proc199 =
 "}\n"
 "return xml_tree_doc(string_output_string (res));\n"
 "}\n"
-"--src vspx.sql:5971\n";
+"--src vspx.sql:5975\n";
 
 static const char *other276 = 
 "grant execute on DB.DBA.VSPX_COLUMNS_META to public\n";
 static const char *proc200 = 
-"#line 5999 \"[executable]/vspx.sql\"\n"
+"#line 6003 \"[executable]/vspx.sql\"\n"
 " create procedure VSPX_COLUMNS_META_TYPES (in col varchar, in tab varchar)\n"
 "{\n"
 "declare mtd, res, sql, ty any;\n"
@@ -18125,12 +18249,12 @@ static const char *proc200 =
 "else\n"
 "return \'varchar\';\n"
 "}\n"
-"--src vspx.sql:5997\n";
+"--src vspx.sql:6001\n";
 
 static const char *other277 = 
 "grant execute on DB.DBA.VSPX_COLUMNS_META_TYPES to public\n";
 static const char *proc201 = 
-"#line 6023 \"[executable]/vspx.sql\"\n"
+"#line 6027 \"[executable]/vspx.sql\"\n"
 "create procedure VSPX_PK_COLUMNS (in tab varchar)\n"
 "{\n"
 "declare ses, ret any;\n"
@@ -18158,7 +18282,7 @@ static const char *proc201 =
 "ret := \'<void />\';\n"
 "return xml_tree_doc(ret);\n"
 "}\n"
-"--src vspx.sql:6021\n";
+"--src vspx.sql:6025\n";
 
 static const char *other278 = 
 "grant execute on VSPX_PK_COLUMNS to public\n";
@@ -18175,7 +18299,7 @@ static const char *other283 =
 static const char *other284 = 
 "xpf_extension (\'http://www.openlinksw.com/vspx/:pk_columns\', \'DB.DBA.VSPX_PK_COLUMNS\', 0)\n";
 static const char *proc202 = 
-"#line 6082 \"[executable]/vspx.sql\"\n"
+"#line 6086 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "dbg_vspx_control (in control vspx_control, in tab int default 0)\n"
 "{\n"
@@ -18226,10 +18350,10 @@ static const char *proc202 =
 "if (not tab)\n"
 "dbg_obj_print (\'=============END=============\');\n"
 "}\n"
-"--src vspx.sql:6080\n";
+"--src vspx.sql:6084\n";
 
 static const char *proc203 = 
-"#line 6135 \"[executable]/vspx.sql\"\n"
+"#line 6139 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "vspx_uri_compose (in res any)\n"
 "{\n"
@@ -18265,10 +18389,10 @@ static const char *proc203 =
 "\n"
 "return _full_path;\n"
 "}\n"
-"--src vspx.sql:6133\n";
+"--src vspx.sql:6137\n";
 
 static const char *proc204 = 
-"#line 6173 \"[executable]/vspx.sql\"\n"
+"#line 6177 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "vspx_uri_add_parameters (in uri varchar, in pars varchar)\n"
 "{\n"
@@ -18284,10 +18408,10 @@ static const char *proc204 =
 "aset (hinfo, 4, par_str);\n"
 "return vspx_uri_compose (hinfo);\n"
 "}\n"
-"--src vspx.sql:6171\n";
+"--src vspx.sql:6175\n";
 
 static const char *proc205 = 
-"#line 6192 \"[executable]/vspx.sql\"\n"
+"#line 6196 \"[executable]/vspx.sql\"\n"
 " create procedure vspx_xforms_params_parse (inout cnt any)\n"
 "{\n"
 "declare xt, ret, ss any;\n"
@@ -18318,13 +18442,13 @@ static const char *proc205 =
 "ret := split_and_decode (xt, 0, \'\\0\\0&=\');\n"
 "return ret;\n"
 "}\n"
-"--src vspx.sql:6190\n";
+"--src vspx.sql:6194\n";
 
 static const char *other285 = 
 "insert soft \"DB\".\"DBA\".\"SYS_SCHEDULED_EVENT\" (SE_INTERVAL, SE_LAST_COMPLETED, SE_NAME, SE_SQL, SE_START)\n"
 "values (1440, NULL, \'VSPX_SESSION_EXPIRE\', \'VSPX_EXPIRE_SESSIONS ()\', now())\n";
 static const char *proc206 = 
-"#line 6231 \"[executable]/vspx.sql\"\n"
+"#line 6235 \"[executable]/vspx.sql\"\n"
 "create procedure\n"
 "VSPX_EXPIRE_SESSIONS ()\n"
 "{\n"
@@ -18333,10 +18457,10 @@ static const char *proc206 =
 "\n"
 "\n"
 "}\n"
-"--src vspx.sql:6229\n";
+"--src vspx.sql:6233\n";
 
 static const char *proc207 = 
-"#line 6242 \"[executable]/vspx.sql\"\n"
+"#line 6246 \"[executable]/vspx.sql\"\n"
 "create procedure DB.DBA.sys_xpath_localfile_eval(in content any, in expr any) {\n"
 "declare retval, result, pos, eval_result integer;\n"
 "declare pwd, dav_content any;\n"
@@ -18389,10 +18513,10 @@ static const char *proc207 =
 "result(eval_result);\n"
 "return retval;\n"
 "}\n"
-"--src vspx.sql:6240\n";
+"--src vspx.sql:6244\n";
 
 static const char *proc208 = 
-"#line 6296 \"[executable]/vspx.sql\"\n"
+"#line 6300 \"[executable]/vspx.sql\"\n"
 "create procedure DB.DBA.sys_save_http_history(in vdir any, in vres any)\n"
 "{\n"
 "declare _ext, result, name, content, pwd, cnt any;\n"
@@ -18423,12 +18547,15 @@ static const char *proc208 =
 "name := replace (name, \':\', \'_\');\n"
 "name := replace (name, \'/\', \'_\');\n"
 "name := replace (name, \'.\', \'_\');\n"
+"name := replace (name, \'&\', \'_\');\n"
 "\n"
 "content := http_full_request (0);\n"
 "if (registry_get (\'__save_http_history_on_disk\') = \'1\')\n"
 "{\n"
 "if (file_stat (\'./sys_http_recording\') = 0)\n"
 "signal (\'VSPX9\', \'Can not upload resource into sys_http_recording/ directory\');\n"
+"if (length (name) > 200)\n"
+"name := subseq (name, 0, 200);\n"
 "string_to_file (\'./sys_http_recording/\' || name, content, -2);\n"
 "}\n"
 "else\n"
@@ -18455,16 +18582,16 @@ static const char *proc208 =
 "}\n"
 "}\n"
 "}\n"
-"--src vspx.sql:6294\n";
+"--src vspx.sql:6298\n";
 
 static const char *proc209 = 
-"#line 6361 \"[executable]/vspx.sql\"\n"
+"#line 6368 \"[executable]/vspx.sql\"\n"
 "create procedure\n"
 "cal_icell (inout control vspx_control, in inx int)\n"
 "{\n"
 "return (control.vc_parent as vspx_row_template).te_rowset[inx];\n"
 "}\n"
-"--src vspx.sql:6359\n";
+"--src vspx.sql:6366\n";
 
 static const char *other286 = 
 "grant execute on  vspx_event  to public\n";
@@ -18555,7 +18682,7 @@ static const char *tbl10 =
 ")\n";
 
 static const char *proc210 = 
-"#line 6497 \"[executable]/vspx.sql\"\n"
+"#line 6504 \"[executable]/vspx.sql\"\n"
 " create procedure VSPX_CONTROL_EXISTS (in name varchar)\n"
 "{\n"
 "\n"
@@ -18564,24 +18691,24 @@ static const char *proc210 =
 "return 1;\n"
 "return null;\n"
 "}\n"
-"--src vspx.sql:6495\n";
+"--src vspx.sql:6502\n";
 
 static const char *other326 = 
 "grant execute on VSPX_CONTROL_EXISTS to public\n";
 static const char *proc211 = 
-"#line 6511 \"[executable]/vspx.sql\"\n"
+"#line 6518 \"[executable]/vspx.sql\"\n"
 " create procedure VSPX_CUSTOM_CLASS_NAME (in name varchar)\n"
 "{\n"
 "declare class_name varchar;\n"
 "select VCC_CLASS into class_name from VSPX_CUSTOM_CONTROL where VCC_TAG_NAME = name;\n"
 "return class_name;\n"
 "}\n"
-"--src vspx.sql:6509\n";
+"--src vspx.sql:6516\n";
 
 static const char *other327 = 
 "grant execute on VSPX_CUSTOM_CLASS_NAME to public\n";
 static const char *proc212 = 
-"#line 6523 \"[executable]/vspx.sql\"\n"
+"#line 6530 \"[executable]/vspx.sql\"\n"
 " create procedure VSPX_CLASS_PARSER (in name varchar, in tag any)\n"
 "{\n"
 "declare fn varchar;\n"
@@ -18591,7 +18718,7 @@ static const char *proc212 =
 "call (fn) (tag, ss);\n"
 "return string_output_string (ss);\n"
 "}\n"
-"--src vspx.sql:6521\n";
+"--src vspx.sql:6528\n";
 
 static const char *other328 = 
 "grant execute on VSPX_CLASS_PARSER to public\n";
@@ -18611,17 +18738,17 @@ static const char *other333 =
 static const char *other334 = 
 "xpf_extension (\'http://www.openlinksw.com/vspx/:vcc_class_name\', \'DB.DBA.VSPX_CUSTOM_CLASS_NAME\', 0)\n";
 static const char *proc213 = 
-"#line 6560 \"[executable]/vspx.sql\"\n"
+"#line 6567 \"[executable]/vspx.sql\"\n"
 "create procedure\n"
 "VSPX_REGISTER_CONTROL (in tag varchar, in class_name varchar, in func varchar)\n"
 "{\n"
 "insert replacing VSPX_CUSTOM_CONTROL (VCC_TAG_NAME, VCC_CLASS, VCC_FUNCTION)\n"
 "values (tag, class_name, func);\n"
 "}\n"
-"--src vspx.sql:6558\n";
+"--src vspx.sql:6565\n";
 
 static const char *proc214 = 
-"#line 6570 \"[executable]/vspx.sql\"\n"
+"#line 6577 \"[executable]/vspx.sql\"\n"
 " create procedure\n"
 "vspx_sid_generate ()\n"
 "{\n"
@@ -18634,10 +18761,10 @@ static const char *proc214 =
 "path := \'\';\n"
 "return md5 (concat (tim, ip, path));\n"
 "}\n"
-"--src vspx.sql:6568\n";
+"--src vspx.sql:6575\n";
 
 static const char *proc215 = 
-"#line 6585 \"[executable]/vspx.sql\"\n"
+"#line 6592 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_label_render (in fmt varchar, in val any)\n"
 "{\n"
 "if (length (fmt))\n"
@@ -18645,10 +18772,10 @@ static const char *proc215 =
 "else\n"
 "http_value (val);\n"
 "}\n"
-"--src vspx.sql:6583\n";
+"--src vspx.sql:6590\n";
 
 static const char *proc216 = 
-"#line 6594 \"[executable]/vspx.sql\"\n"
+"#line 6601 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_url_render (in fmt varchar, in val any, in url any, in sid any, in realm any, in is_local any)\n"
 "{\n"
 "if (length (sid))\n"
@@ -18665,10 +18792,10 @@ static const char *proc216 =
 "http_value (val);\n"
 "http (\'</a>\');\n"
 "}\n"
-"--src vspx.sql:6592\n";
+"--src vspx.sql:6599\n";
 
 static const char *proc217 = 
-"#line 6612 \"[executable]/vspx.sql\"\n"
+"#line 6619 \"[executable]/vspx.sql\"\n"
 "create procedure vspx_url_render_ex (in fmt varchar, in val any, in url any, in sid any, in realm any, in is_local any, in attrs any)\n"
 "{\n"
 "declare i, l int;\n"
@@ -18699,10 +18826,10 @@ static const char *proc217 =
 "http_value (val);\n"
 "http (\'</a>\');\n"
 "}\n"
-"--src vspx.sql:6610\n";
+"--src vspx.sql:6617\n";
 
 static const char *proc218 = 
-"#line 6645 \"[executable]/vspx.sql\"\n"
+"#line 6652 \"[executable]/vspx.sql\"\n"
 " create procedure VSPX_ONE_CONTROL_UP (in expn varchar)\n"
 "{\n"
 "declare idx integer;\n"
@@ -18726,7 +18853,7 @@ static const char *proc218 =
 "idx := aref (hit2, 4) + 7;\n"
 "goto again;\n"
 "}\n"
-"--src vspx.sql:6643\n";
+"--src vspx.sql:6650\n";
 
 static const char *other335 = 
 "grant execute on VSPX_ONE_CONTROL_UP to public\n";
@@ -18735,7 +18862,7 @@ static const char *other336 =
 static const char *other337 = 
 "xpf_extension (\'http://www.openlinksw.com/vspx/:one-control-up\', \'DB.DBA.VSPX_ONE_CONTROL_UP\', 0)\n";
 static const char *proc219 = 
-"#line 6679 \"[executable]/vspx.sql\"\n"
+"#line 6686 \"[executable]/vspx.sql\"\n"
 "create procedure VSPX_USER_LOGIN (in realm varchar, in uname varchar, in pass varchar, in auth_function varchar)\n"
 "{\n"
 "declare rc int;\n"
@@ -18750,10 +18877,10 @@ static const char *proc219 =
 "}\n"
 "return sid;\n"
 "}\n"
-"--src vspx.sql:6677\n";
+"--src vspx.sql:6684\n";
 
 static const char *proc220 = 
-"#line 6695 \"[executable]/vspx.sql\"\n"
+"#line 6702 \"[executable]/vspx.sql\"\n"
 "create procedure VSPX_SESSION_IS_VALID (in realm varchar, in sid varchar)\n"
 "{\n"
 "update VSPX_SESSION set VS_EXPIRY = now () where VS_SID = sid and VS_REALM = realm;\n"
@@ -18761,7 +18888,7 @@ static const char *proc220 =
 "return 0;\n"
 "return 1;\n"
 "}\n"
-"--src vspx.sql:6693\n";
+"--src vspx.sql:6700\n";
 
 /* vspx_add_locations.xsl */
 
@@ -18769,12 +18896,12 @@ static const char *xsl31[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: vspx_add_locations.xsl,v 1.2 2006/08/15 22:09:21 source Exp $\n"
+" -  $Id: vspx_add_locations.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -18831,12 +18958,12 @@ static const char *xsl32[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: vspx_expand.xsl,v 1.3 2006/08/15 22:09:21 source Exp $\n"
+" -  $Id: vspx_expand.xsl,v 1.3.2.1 2012/03/08 12:55:22 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -19337,12 +19464,12 @@ static const char *xsl33[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: vspx_pre_xsd.xsl,v 1.2 2006/08/15 22:09:21 source Exp $\n"
+" -  $Id: vspx_pre_xsd.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -19443,12 +19570,12 @@ static const char *xsl34[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: vspx_pre_sql.xsl,v 1.2 2006/08/15 22:09:21 source Exp $\n"
+" -  $Id: vspx_pre_sql.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -19659,12 +19786,12 @@ static const char *xsl35[]= {
 "<?xml version='1.0'?>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: vspx_log_format.xsl,v 1.2 2006/08/15 22:09:21 source Exp $\n"
+" -  $Id: vspx_log_format.xsl,v 1.2.2.1 2012/03/08 12:55:22 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -19773,7 +19900,7 @@ static const char *xsd36[]= {
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -22977,12 +23104,12 @@ static const char *xsl37[]= {
 "]>\n"
 "<!--\n"
 " -  \n"
-" -  $Id: vspx.xsl,v 1.7 2008/03/13 13:52:04 source Exp $\n"
+" -  $Id: vspx.xsl,v 1.7.2.2 2012/03/08 12:55:22 source Exp $\n"
 " -\n"
 " -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)\n"
 " -  project.\n"
 " -  \n"
-" -  Copyright (C) 1998-2006 OpenLink Software\n"
+" -  Copyright (C) 1998-2012 OpenLink Software\n"
 " -  \n"
 " -  This project is free software; you can redistribute it and/or modify it\n"
 " -  under the terms of the GNU General Public License as published by the\n"
@@ -26124,7 +26251,7 @@ static const char *xsl37[]= {
 "      while (inx < len) {\n"
 "        declare ctrl vspx_control;\n"
 "        ctrl := node.vc_children[inx];\n"
-"        if (ctrl and udt_instance_of (ctrl, fix_identifier_case ('vspx_button'))) {\n"
+"        if (ctrl is not null and udt_instance_of (ctrl, fix_identifier_case ('vspx_button'))) {\n"
 "          declare btn vspx_button;\n"
 "          btn := node.vc_children[inx];\n"
 "          btn.bt_open_img := sel_img;\n"
@@ -28417,23 +28544,25 @@ static query_t *xsd_define_qr;
   }
 
 static int
-sch_proc_def_exists (client_connection_t *cli, const char *proc_name)
+sch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)
 {
   query_t *proc = NULL;
   char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,
 	cli->cli_qualifier, CLI_OWNER (cli));
   if (full_name)
     proc = sch_proc_def (isp_schema(NULL), full_name);
+  if (report && proc != NULL)
+     log_debug ("built-in procedure \"%s\" overruled by the RDBMS", proc_name);
   return (proc != NULL);
 }
 
 #define DEFINE_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x0, 1)
 
 
 #define DEFINE_PUBLIC_PROC(name, proc) \
-   if (!sch_proc_def_exists (bootstrap_cli, (name))) \
+   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \
      ddl_std_proc_1 (proc, 0x1, 1)
 
 
diff --git a/libsrc/Wi/sql_to_c.awk b/libsrc/Wi/sql_to_c.awk
index 5566306..3f20456 100644
--- a/libsrc/Wi/sql_to_c.awk
+++ b/libsrc/Wi/sql_to_c.awk
@@ -1,14 +1,14 @@
 #
 # sql_to_c.awk
 #
-# $Id: sql_to_c.awk,v 1.6.2.5 2010/10/27 12:51:33 source Exp $
+# $Id: sql_to_c.awk,v 1.6.2.9 2012/03/08 13:52:41 source Exp $
 #
 #  Embeds SQL code into a C file
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -340,9 +340,11 @@ BEGIN   {
 		    if (length() < 2)
 		      next
 		  }
+
                 # does escape the symbols
 		fun = $0
-	        gsub ( /\\/, "\\\\", fun)
+		gsub ("\\\\", "&&", fun)
+
 		# remove whitespace except when there is just a semicolon
 		if ((in_xsl_mode == 0) && (in_xsd_mode == 0))
   		  {
@@ -447,7 +449,7 @@ BEGIN   {
 		        dep_col = _deps[3]
 			if (dep_tb == "__PROCEDURE__")
 			  {
-			    _text = "\n if (sch_proc_def_exists (bootstrap_cli, \"" dep_col "\"))"
+			    _text = "\n if (sch_proc_def_exists (bootstrap_cli, \"" dep_col "\", 0))"
 			  }
 			else
 			  {
@@ -687,21 +689,23 @@ END 	{
 		print ""
 	    }
 
-           print "static int\nsch_proc_def_exists (client_connection_t *cli, const char *proc_name)\n{"
+           print "static int\nsch_proc_def_exists (client_connection_t *cli, const char *proc_name, const int report)\n{"
 	   print "  query_t *proc = NULL;"
 	   print "  char *full_name = sch_full_proc_name (isp_schema(NULL), proc_name,"
 	   print "	cli->cli_qualifier, CLI_OWNER (cli));"
 	   print "  if (full_name)"
 	   print "    proc = sch_proc_def (isp_schema(NULL), full_name);"
+	   print "  if (report && proc != NULL)"
+	   print "     log_debug (\"built-in procedure \\\"%s\\\" overruled by the RDBMS\", proc_name);"
 	   print "  return (proc != NULL);"
 	   print "}\n"
 
 	   print "#define DEFINE_PROC(name, proc) \\"
-	   print "   if (!sch_proc_def_exists (bootstrap_cli, (name))) \\"
+	   print "   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \\"
 	   print "     ddl_std_proc_1 (proc, 0x0, 1)\n\n"
 
 	   print "#define DEFINE_PUBLIC_PROC(name, proc) \\"
-	   print "   if (!sch_proc_def_exists (bootstrap_cli, (name))) \\"
+	   print "   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \\"
 	   print "     ddl_std_proc_1 (proc, 0x1, 1)\n\n"
 
 	   print "#define DEFINE_OVERWRITE_PROC(name, proc) \\"
@@ -709,7 +713,7 @@ END 	{
 	   if (stored_proc > 0)
 	   {
 	   print "#define DEFINE_STORED_PROC(name, proc) \\"
-	   print "   if (!sch_proc_def_exists (bootstrap_cli, (name))) \\"
+	   print "   if (!sch_proc_def_exists (bootstrap_cli, (name), log_proc_overwrite)) \\"
            print "     ddl_ensure_table (\"do this always\", proc);\n\n"
 	   }
            if (nudt > 0)
diff --git a/libsrc/Wi/sqlbif.c b/libsrc/Wi/sqlbif.c
index 677942d..b6f2b4f 100644
--- a/libsrc/Wi/sqlbif.c
+++ b/libsrc/Wi/sqlbif.c
@@ -1,14 +1,14 @@
 /*
  *  sqlbif.c
  *
- *  $Id: sqlbif.c,v 1.122.2.58 2011/03/03 11:56:44 source Exp $
+ *  $Id: sqlbif.c,v 1.122.2.79 2012/03/14 00:42:48 source Exp $
  *
  *  SQL Built In Functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -31,6 +31,7 @@
    a while, when that same box is free'ed twice!
  */
 
+#include <math.h>
 #include "sqlnode.h"
 #include "sqlver.h"
 #include "sqlfn.h"
@@ -49,7 +50,6 @@
 #include "multibyte.h"
 #include "srvmultibyte.h"
 #include "bif_xper.h"
-#include <math.h>
 #include "libutil.h"
 #include "recovery.h"
 #if !defined (__APPLE__)
@@ -79,6 +79,8 @@ extern "C" {
 #include "virtpwd.h"
 #include "rdf_core.h"
 #include "shcompo.h"
+#include "http_client.h" /* for MD5Init and the like */
+#include "sparql.h"
 
 #define box_bool(n) ((caddr_t)((ptrlong)((n) ? 1 : 0)))
 
@@ -113,7 +115,6 @@ extern void bif_udt_init(void);
 extern void bif_xmlenc_init(void);
 extern void tp_bif_init(void);
 extern void bif_json_init (void);
-extern void col_init ();
 extern void geo_init ();
 #ifdef _KERBEROS
 extern void  bif_kerberos_init (void);
@@ -759,7 +760,7 @@ bif_array_of_pointer_arg (caddr_t * qst, state_slot_t ** args, int nth, const ch
   dtp_t dtp = DV_TYPE_OF (arg);
   if (dtp != DV_ARRAY_OF_POINTER)
     sqlr_new_error ("22023", "SR014",
-  "Function %s needs a generic  array  as argument %d, not an arg of type %s (%d)",
+  "Function %s needs a generic array as argument %d, not an arg of type %s (%d)",
   func, nth + 1, dv_type_title (dtp), dtp);
   return (caddr_t *)arg;
 }
@@ -917,12 +918,12 @@ bif_dbg_obj_princ (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     caddr_t val = qst_get (qst, arg);
     if (DV_IRI_ID == DV_TYPE_OF (val))
       {
-	iri_id_t iid = unbox_iri_id (val);
-	if ((0L != iid) && ((min_bnode_iri_id () > iid) || (min_named_bnode_iri_id () < iid)))
-	  {
-	    caddr_t iri = key_id_to_iri ((query_instance_t *) qst, iid);
-	    dk_set_push (&iri_labels, iri);
-	  }
+        iri_id_t iid = unbox_iri_id (val);
+        if ((0L != iid) && ((min_bnode_iri_id () > iid) || (min_named_bnode_iri_id () < iid)))
+          {
+            caddr_t iri = key_id_to_iri ((query_instance_t *) qst, iid);
+            dk_set_push (&iri_labels, iri);
+          }
       }
   }
   END_DO_BOX_FAST_REV;
@@ -944,28 +945,28 @@ bif_dbg_obj_princ (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       printf ("%s", val);
     else
       {
-	dbg_print_box (val, stdout);
-	if (DV_IRI_ID == DV_TYPE_OF (val))
-	  {
-	    iri_id_t iid = unbox_iri_id (val);
-	    if (0L == iid)
-	      goto done_iid;	/* see below */
-	    if ((min_bnode_iri_id () <= iid) && (min_named_bnode_iri_id () > iid))
-	      {
-		caddr_t iri = BNODE_IID_TO_LABEL (iid);
-		printf ("=%s", iri);
-		dk_free_box (iri);
-	      }
-	    else
-	      {
-		caddr_t iri = dk_set_pop (&iri_labels);
-		if (!iri)
-		  goto done_iid;	/* see below */
-		printf ("=<%s>", iri);
-		dk_free_box (iri);
-	      }
-	  done_iid:;
-	  }
+        dbg_print_box (val, stdout);
+        if (DV_IRI_ID == DV_TYPE_OF (val))
+          {
+            iri_id_t iid = unbox_iri_id (val);
+            if (0L == iid)
+              goto done_iid; /* see below */
+            if ((min_bnode_iri_id () <= iid) && (min_named_bnode_iri_id () > iid))
+              {
+                caddr_t iri = BNODE_IID_TO_LABEL (iid);
+                printf ("=%s", iri);
+                dk_free_box (iri);
+              }
+            else
+              {
+                caddr_t iri = dk_set_pop (&iri_labels);
+                if (!iri)
+                  goto done_iid; /* see below */
+                printf ("=<%s>", iri);
+                dk_free_box (iri);
+              }
+done_iid: ;
+          }
       }
     prev_is_strg_const = this_is_strg_const;
   }
@@ -1546,7 +1547,7 @@ bif_type_set (bif_type_t *bt, state_slot_t *ret, state_slot_t **params)
     return;
   if (bt->bt_func)
     {
-      long dt, sc_ret, sc_prec;
+      long dt = 0, sc_ret = 0, sc_prec = 0;
       bt->bt_func (params, &dt, &sc_prec, &sc_ret, (caddr_t *) &ret->ssl_sqt.sqt_collation);
       ret->ssl_prec = (uint32) sc_prec;
       ret->ssl_scale = (char) sc_ret;
@@ -1810,6 +1811,45 @@ again:
 
 
 caddr_t
+bif_aref_or_default (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t arr = bif_array_or_strses_arg (qst, args, 0, "aref_or_default");
+  int inx, n_elems;
+  dtp_t dtp;
+  int argcount = BOX_ELEMENTS (args);
+  int idxcount = argcount - 2;
+  int idxctr = 1;
+  if (idxcount <= 0)
+    sqlr_new_error ("22003", "SR020", "aref_or_default() requires 3 or more arguments, but only %d passed.", argcount);
+  dtp = DV_TYPE_OF (arr);
+
+again:
+  inx = (long) bif_long_arg (qst, args, idxctr, "aref_or_default");
+  n_elems = (box_length (arr) / get_itemsize_of_vector (dtp));
+  if ((inx >= n_elems && DV_STRING_SESSION != box_tag(arr)) || (inx < 0)) /* Catch negative indexes also! */
+    goto use_default; /* see below */
+  if (idxctr == idxcount)
+    return (gen_aref (arr, inx, dtp, "aref_or_default"));
+  if (IS_NONLEAF_DTP (dtp))
+    {
+      arr = ((caddr_t *)arr)[inx];
+      dtp = DV_TYPE_OF (arr);
+      if (dtp == DV_SHORT_STRING || dtp == DV_LONG_STRING || dtp == DV_UNAME
+		|| IS_NONLEAF_DTP(dtp)
+		|| dtp == DV_ARRAY_OF_LONG || dtp == DV_ARRAY_OF_FLOAT
+		|| dtp == DV_ARRAY_OF_DOUBLE || IS_WIDE_STRING_DTP (dtp)
+		|| dtp == DV_STRING_SESSION)
+	 {
+	   idxctr ++;
+	   goto again; /* see above */
+	 }
+    }
+use_default:
+  return box_copy_tree (bif_arg (qst, args, argcount-1, "aref_or_default"));
+}
+
+
+caddr_t
 bif_aref_set_0 (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t *arr = (caddr_t *) bif_array_arg (qst, args, 0, "aref_set_0");
@@ -2059,7 +2099,7 @@ bif_make_array (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
    return an empty string.
 
  */
-static dk_session_t *
+dk_session_t *
 strses_subseq (dk_session_t *ses, long from, long to)
 {
   dk_session_t *out = strses_allocate ();
@@ -2250,7 +2290,7 @@ bif_substr (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   if (from > to)
     sqlr_new_error ("22011", "SR026",
 	"substr: Bad string subrange: from=%ld, to=%ld, len=%ld.",
-	(long)from, (long)to, (long)len);
+	(long)from+1, (long)to+1, (long)len);
 
   res = dk_alloc_box (((to - from) + 1) * sizeof_char, (dtp_t)(IS_WIDE_STRING_DTP (dtp1) ? DV_WIDE : DV_LONG_STRING));
   if (dtp1 == DV_STRING_SESSION)
@@ -2270,10 +2310,12 @@ bif_left (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   long to = (long) bif_long_range_arg (qst, args, 1, "left", 0, 10000000); /* substr length */
   caddr_t res;
   long len;
-  dtp_t dtp1 = DV_TYPE_OF (str);
-  int sizeof_char = IS_WIDE_STRING_DTP (dtp1) ? sizeof (wchar_t) : sizeof (char);
+  dtp_t dtp1;
+  int sizeof_char;
 
 retry_unrdf:
+  dtp1 = DV_TYPE_OF (str);
+  sizeof_char = IS_WIDE_STRING_DTP (dtp1) ? sizeof (wchar_t) : sizeof (char);
   if (dtp1 == DV_DB_NULL)
     str = NULL;
   else if (dtp1 != DV_STRING && dtp1 != DV_C_STRING &&
@@ -2595,9 +2637,8 @@ bif_trim (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   int n_args = BOX_ELEMENTS (args);
   caddr_t str = bif_string_or_wide_or_null_arg (qst, args, 0, "trim");
-  caddr_t skip_str = NULL; /*((n_args > 1)
-			     ? bif_string_arg (qst, args, 1, "trim")
-			     : (caddr_t) " "); */ /* If second arg is not present it's a space by default. */
+  caddr_t skip_str_orig = NULL;
+  caddr_t skip_str = NULL;
   long len;
   long from;
   long to;
@@ -2608,41 +2649,26 @@ bif_trim (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t to_free = NULL;
 
   if (NULL == str)
-    {
-      return (NEW_DB_NULL);
-    }
+    return (NEW_DB_NULL);
 
   if (n_args > 1)
+    skip_str_orig = bif_string_or_wide_or_null_arg (qst, args, 1, "trim");
+  if (NULL == skip_str_orig)
+    skip_str = ((IS_WIDE_STRING_DTP (dtp1)) ? (caddr_t)L" " : " ");
+  else if (IS_WIDE_STRING_DTP (dtp1) && !DV_WIDESTRINGP (skip_str_orig))
     {
-      caddr_t x = bif_string_or_wide_or_null_arg (qst, args, 1, "trim");
-      if (IS_WIDE_STRING_DTP (dtp1) && !DV_WIDESTRINGP (x))
-	{
-	  to_free = (caddr_t) box_narrow_string_as_wide ((unsigned char *) x, NULL, 0, QST_CHARSET (qst), err_ret, 1);
-	  if (!to_free)
-	    return NULL;
-	  skip_str = to_free;
-	}
-      else if (!IS_WIDE_STRING_DTP (dtp1) && DV_WIDESTRINGP (x))
-	{
-	  to_free = box_wide_string_as_narrow (x, NULL, 0, QST_CHARSET (qst));
-	  skip_str = to_free;
-	}
-      else
-	{
-	  skip_str = x;
-	}
+      to_free = (caddr_t) box_narrow_string_as_wide ((unsigned char *) skip_str_orig, NULL, 0, QST_CHARSET (qst), err_ret, 1);
+      if (!to_free)
+        return NULL;
+      skip_str = to_free;
     }
-  else
+  else if (!IS_WIDE_STRING_DTP (dtp1) && DV_WIDESTRINGP (skip_str_orig))
     {
-      if (IS_WIDE_STRING_DTP (dtp1))
-	{
-	  skip_str = (caddr_t) L" ";
-	}
-      else
-	{
-	  skip_str = " ";
-	}
+      to_free = box_wide_string_as_narrow (skip_str_orig, NULL, 0, QST_CHARSET (qst));
+      skip_str = to_free;
     }
+  else
+    skip_str = skip_str_orig;
 
   len = (box_length (str) / sizeof_char - 1); /* box_length returns a length + 1 */
 
@@ -2743,7 +2769,7 @@ bif_concatenate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
           memcpy (res + fill * sizeof_char, a, alen * sizeof_char);
         }
       fill += alen;
-  }
+    }
 #ifdef DEBUG
   if (fill != len)
     GPF_T;
@@ -3732,7 +3758,7 @@ retry_unrdf:
 		  dtp_t connvar_dtp;
 		  query_instance_t *qi = (query_instance_t *) qst;
 		  client_connection_t *cli;
-		  const char *val_tail, *val_end;
+		  const char *val_tail;
 
 		  field_start = fmt_tail;
 		  fmt_tail++;
@@ -4140,10 +4166,83 @@ retry_unrdf:
       case 'E':
       case 'f':
       case 'g':
-	goto sorry_unsupported;
-	break;
+        {
+          const char *val_tail = val_start;
+          int fmt_idx = dk_set_length (res);
+          int e_found = 0;
+          caddr_t val_buf;
+          int exp_dtp = 0x80 | ((int)((fmt_idx < expected_dtp_len) ? (expected_dtp_strg[fmt_idx] & 0x7F) : 0));
+          if (('-' == val_tail[0]) || ('+' == val_tail[0]))
+            val_tail++;
+          if (!isdigit (val_tail[0]))
+            goto POP_format_mismatch_mid_field;
+          val_tail++;
+          while (isdigit (val_tail[0])) val_tail++;
+          if ('.' == val_tail[0])
+            {
+              val_tail++;
+              if (!isdigit (val_tail[0]))
+                goto POP_format_mismatch_mid_field;
+              val_tail++;
+              while (isdigit (val_tail[0])) val_tail++;
+            }
+          if (('f' != field_end[-1]) && (('e' == val_tail[0]) || ('E' == val_tail[0])))
+            {
+              const char *val_tail_try = val_tail+1;
+              if (('-' == val_tail_try[0]) || ('+' == val_tail_try[0]))
+                val_tail_try++;
+              if (isdigit (val_tail_try[0]))
+                {
+                  val_tail_try++;
+                  while (isdigit (val_tail_try[0])) val_tail_try++;
+                  val_tail = val_tail_try;
+                }
+              e_found = 1;
+            }
+          if (val_tail != val_end)
+            goto POP_format_mismatch_mid_field;
+          val_buf = box_dv_short_nchars (val_start, val_end - val_start);
+          switch (exp_dtp)
+            {
+            case DV_SINGLE_FLOAT:
+              {
+                float f = 0.0;
+                int sctr = sscanf (val_buf, "%f", &f);
+                dk_free_box (val_buf);
+                if (1 != sctr)
+                  goto POP_format_mismatch_mid_field;
+                dk_set_push (&res, box_float (f));
+                break;
+              }
+            case DV_DOUBLE_FLOAT:
+            default:
+              {
+                double d = 0.0;
+                int sctr = sscanf (val_buf, "%lf", &d);
+                dk_free_box (val_buf);
+                if (1 != sctr)
+                  goto POP_format_mismatch_mid_field;
+                dk_set_push (&res, box_float (d));
+                break;
+              }
+            case DV_NUMERIC:
+              {
+                numeric_t res = numeric_allocate ();
+                int errcode = numeric_from_string (res, val_buf);
+                dk_free_box (val_buf);
+                if (NUMERIC_STS_SUCCESS != errcode)
+                  {
+                    numeric_free (res);
+                    goto POP_format_mismatch_mid_field;
+                  }
+                return ((caddr_t) res);
+              }
+            }
+          break;
+        }
 
       case 'c':
+
 	goto sorry_unsupported;
 	break;
 
@@ -5746,6 +5845,64 @@ bif_isnumeric (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return (box_num (result));
 }
 
+caddr_t
+bif_isfinitenumeric (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t arg1 = bif_arg (qst, args, 0, "isfinitenumeric");
+  int result;
+
+  dtp_t dtp = DV_TYPE_OF (arg1);
+  switch (dtp)
+  {
+  case DV_SHORT_INT:
+  case DV_LONG_INT:
+  case DV_C_SHORT:    /* These are  */
+  case DV_C_INT:    /*  not needed? Or no? */
+    result = 1;
+    break;
+  case DV_SINGLE_FLOAT:
+    {
+      float val = unbox_float (arg1);
+#ifdef isfinite
+      result = (isfinite(val) ? 1 : 0);
+#elif WIN32
+      result = _finite (val) ? 1 : 0;
+#else
+      float myNAN_f = 0.0/0.0;
+      float myPOSINF_f = 1.0/0.0;
+      float myNEGINF_f = -1.0/0.0;
+      result = (((val == myNAN_f) || (val == myPOSINF_f) || (val == myNEGINF_f)) ? 0 : 1);
+#endif
+      break;
+    }
+  case DV_DOUBLE_FLOAT:
+    {
+      double val = unbox_double (arg1);
+#ifdef isfinite
+      result = (isfinite(val) ? 1 : 0);
+#elif WIN32
+      result = _finite (val) ? 1 : 0;
+#else
+      double myNAN_d = 0.0/0.0;
+      double myPOSINF_d = 1.0/0.0;
+      double myNEGINF_d = -1.0/0.0;
+      result = (((val == myNAN_d) || (val == myPOSINF_d) || (val == myNEGINF_d)) ? 0 : 1);
+#endif
+      break;
+    }
+  case DV_NUMERIC:
+    {
+      numeric_t val = (numeric_t)arg1;
+      result = (num_is_invalid(val) ? 0 : 1);
+      break;
+    }
+  default:
+    result = 0;
+    break;
+  }
+
+  return (box_num (result));
+}
 
 /* Is arg a single float? */
 caddr_t
@@ -5785,6 +5942,12 @@ bif_isstring (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return box_bool (DV_STRING == DV_TYPE_OF (arg0));
 }
 
+caddr_t
+bif_isstring_session (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t arg0 = bif_arg (qst, args, 0, "isstring_session");
+  return box_bool (DV_STRING_SESSION == DV_TYPE_OF (arg0));
+}
 
 caddr_t
 bif_isbinary (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
@@ -6009,9 +6172,9 @@ bif_max_notnull (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
         {
           coll = args[0]->ssl_sqt.sqt_collation;
           best = a;
+          notnull_found = 1;
         }
-      notnull_found = 1;
-      if (DVC_GREATER == cmp_boxes (a, best, coll, coll))
+      else if (DVC_GREATER == cmp_boxes (a, best, coll, coll))
         best = a;
     }
   if (notnull_found)
@@ -6036,9 +6199,9 @@ bif_min_notnull (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
         {
           coll = args[0]->ssl_sqt.sqt_collation;
           best = a;
+          notnull_found = 1;
         }
-      notnull_found = 1;
-      if (DVC_LESS == cmp_boxes (a, best, coll, coll))
+      else if (DVC_LESS == cmp_boxes (a, best, coll, coll))
         best = a;
     }
   if (notnull_found)
@@ -6443,7 +6606,7 @@ bif_sign (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 caddr_t
 bif_abs (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t arg = bif_arg (qst, args, 0, "abs");
+  caddr_t arg = bif_arg_unrdf (qst, args, 0, "abs");
   dtp_t dtp = DV_TYPE_OF (arg);
   switch (dtp)
   {
@@ -6615,6 +6778,13 @@ sqlbif_rnd (int32* seed)
   return seed[0];
 }
 
+double
+sqlbif_rnd_double (int32* seed, double upper_limit)
+{
+  int32 tmpres = sqlbif_rnd (&rnd_seed);
+  return (tmpres * upper_limit) / (double)(RNG_M);
+}
+
 
 caddr_t
 bif_randomize  (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
@@ -7551,12 +7721,12 @@ bif_split_and_decode (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     return (NEW_DB_NULL);
   }       /* NULL for NULL, ashes to ashes. */
 
-  end_ptr = (inputs + inputs_len);
+  end_ptr = (unsigned char *)(inputs + inputs_len);
 
   /* First count the number of occurrences of ampersands in inputs */
   {
   occurrences = 1;    /* Always at least one element. */
-  ptr = inputs;
+  ptr = (unsigned char *)inputs;
   while ((ptr < end_ptr)) /* (ptr = strchr(ptr,sep1)) */
     {
   if (sep1 == *ptr++)
@@ -7585,7 +7755,7 @@ bif_split_and_decode (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 
   /* Start scanning the inputs string again. */
   {
-  ptr = inputs;
+  ptr = (unsigned char *)inputs;
   reading_value = 0;
   counting_only = 1;
   vec_inx = 0;
@@ -8603,7 +8773,7 @@ bif_mem_all_in_use (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   FILE *fd = dp ? fopen (dp, "at") : NULL;
   dbg_malstats (fd ? fd : stderr, DBG_MALSTATS_ALL);
   if (fd)
-    fclose (fd);
+  fclose (fd);
   return NULL;
 }
 
@@ -8615,7 +8785,7 @@ bif_mem_new_in_use (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   FILE *fd = dp ? fopen (dp, "at") : NULL;
   dbg_malstats (fd ? fd : stderr, DBG_MALSTATS_NEW);
   if (fd)
-    fclose (fd);
+  fclose (fd);
   return NULL;
 }
 
@@ -8627,7 +8797,7 @@ bif_mem_leaks (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   FILE *fd = dp ? fopen (dp, "at") : NULL;
   dbg_malstats (fd ? fd : stderr, DBG_MALSTATS_LEAKS);
   if (fd)
-    fclose (fd);
+  fclose (fd);
   return NULL;
 }
 
@@ -8997,7 +9167,7 @@ do_long_int:
 		  xe_sqlnarrow_string_value ((xml_entity_t *)(data), &tmp_res, DV_LONG_STRING);
 		  val = safe_atoi (tmp_res, &err);
 		  dk_free_box (tmp_res);
-		  break;
+                  break;
 		}
 #endif
 	  case DV_NUMERIC:
@@ -9013,7 +9183,7 @@ do_long_int:
 		  char narrow [512];
 		  box_wide_string_as_narrow (data, narrow, 512, qst ? QST_CHARSET (qst) : NULL);
 		  val = safe_atoi (narrow, &err);
-		  break;
+                  break;
 		}
 	  default:
 	      goto cvt_error;
@@ -9051,16 +9221,16 @@ do_single_float:
 		}
 	  case DV_WIDE:
 	  case DV_LONG_WIDE:
-		{
-		  char narrow [512];
+            {
+              char narrow [512];
 	      double d;
               err = NULL;
-		  box_wide_string_as_narrow (data, narrow, 512, qst ? QST_CHARSET (qst) : NULL);
+              box_wide_string_as_narrow (data, narrow, 512, qst ? QST_CHARSET (qst) : NULL);
               d = safe_atof (narrow, &err);
               if (err)
                 goto inner_error;
               return (box_float ((float)d));
-		}
+            }
 	  default:
 	      goto cvt_error;
 	}
@@ -9084,7 +9254,7 @@ do_double_float:
                   if (NULL == start)
                     goto cvt_error;
 		  if (1 == sscanf (start, "%lf", &d))
-		  return (box_double (d));
+		    return (box_double (d));
 		  goto cvt_error;
 		}
 	  case DV_NUMERIC:
@@ -9130,43 +9300,43 @@ do_datetime:
       caddr_t res;
       switch (arg_dtp)
 	{
-	  case DV_STRING:
-	      res = string_to_dt_box (data);
+	case DV_STRING:
+	  res = string_to_dt_box (data);
           break;
-	  case DV_DATETIME:
-	  case DV_DATE:
-	  case DV_TIME:
-	      res = box_copy_tree (data);
+	case DV_DATETIME:
+	case DV_DATE:
+	case DV_TIME:
+	  res = box_copy_tree (data);
           break;
-	  case DV_BIN:
-	      if (dt_validate (data))
-		sqlr_new_error ("22003", "SR351",
-		    "Invalid data supplied in VARBINARY -> DATETIME conversion");
-	      res = box_copy (data);
-	      box_tag_modify (res, DV_DATETIME);
+	case DV_BIN:
+	  if (dt_validate (data))
+	    sqlr_new_error ("22003", "SR351",
+	      "Invalid data supplied in VARBINARY -> DATETIME conversion");
+	  res = box_copy (data);
+	  box_tag_modify (res, DV_DATETIME);
 	  break;
 	  case DV_WIDE:
-	  case DV_LONG_WIDE:
-		{
-		  caddr_t narrow = box_wide_string_as_narrow (data, NULL, 0, qst ? QST_CHARSET (qst) : NULL);
-		  res = string_to_dt_box (narrow);
-		  dk_free_box (narrow);
+	case DV_LONG_WIDE:
+	  {
+	    caddr_t narrow = box_wide_string_as_narrow (data, NULL, 0, qst ? QST_CHARSET (qst) : NULL);
+	    res = string_to_dt_box (narrow);
+	    dk_free_box (narrow);
             break;
 	  }
 	default:
 	  goto cvt_error;
 	}
-		  if (ST_P (dtp, DV_DATE))
-		    {
-		      dt_date_round (res);
-		    }
-		  else if (ST_P (dtp, DV_DATE) || ST_P (dtp, DV_TIME))
-		    {
-		      DT_SET_FRACTION (res, 0);
-		    }
-		  SET_DT_TYPE_BY_DTP (res, dtp->type);
-		  return res;
-		}
+      if (ST_P (dtp, DV_DATE))
+	{
+	  dt_date_round (res);
+	}
+      else if (ST_P (dtp, DV_DATE) || ST_P (dtp, DV_TIME))
+	{
+	  DT_SET_FRACTION (res, 0);
+	}
+      SET_DT_TYPE_BY_DTP (res, dtp->type);
+      return res;
+    }
 
 do_time:
     {
@@ -9272,11 +9442,11 @@ do_wide:
       err = NULL;
       switch (arg_dtp)
 	{
-	  case DV_STRING:
-	          ret = box_narrow_string_as_wide ((unsigned char *) data, NULL, 0, qst ? QST_CHARSET (qst) : NULL, &err, 1);
-		  if (err)
+	case DV_STRING:
+	  ret = box_narrow_string_as_wide ((unsigned char *) data, NULL, 0, qst ? QST_CHARSET (qst) : NULL, &err, 1);
+          if (err)
             goto inner_error;
-		  return ret;
+	  return ret;
 	  case DV_UNAME:
             {
               unsigned char *utf8 = (unsigned char *) data;
@@ -9352,7 +9522,7 @@ do_wide:
 		      caddr_t wide_ret = box_narrow_string_as_wide ((unsigned char *) ret,
 			  NULL, 0, qst ? QST_CHARSET (qst) : NULL, &err, 1);
 		      dk_free_box (ret);
-		      if (err)
+                      if (err)
                         goto inner_error;
 		      return wide_ret;
 		    }
@@ -9378,7 +9548,6 @@ inner_error:
 cvt_error:
   if (IS_BOX_POINTER (qst) && (((query_instance_t *)qst)->qi_no_cast_error))
     return NEW_DB_NULL;
-signal_error:
 #ifdef DEBUG
   sqlr_new_error ("22023", (IS_BOX_POINTER (qst) && (((query_instance_t *)qst)->qi_no_cast_error)) ? "sR066" : "SR066", "Unsupported case in CONVERT (%s -> %s)", dv_type_title(arg_dtp), dv_type_title((int) (dtp->type)));
 #else
@@ -10291,7 +10460,7 @@ bif_key_replay_insert (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   ITC_INIT (it, NULL, qi->qi_trx);
   memset (&rd, 0, sizeof (row_delta_t));
   if (!key || dk_set_length (key->key_parts) != BOX_ELEMENTS (arr) - 1)
-    sqlr_new_error ("42000", "KI...", "No key for the id or bad number of columns in key_insert_co;cols");
+    sqlr_new_error ("42000", "KI...", "No key for the id or bad number of columns in key_replay_insert");
   rd.rd_allocated = RD_AUTO;
   rd.rd_key = key;
   rd.rd_op = RD_INSERT;
@@ -10386,7 +10555,16 @@ bif_key_replay_insert (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   it->itc_insert_key = key;
   if (key->key_is_bitmap)
     {
-      key_bm_insert (it, &rd);
+      if (!qi->qi_non_txn_insert)
+	rd.rd_make_ins_rbe = 1;
+      ITC_FAIL (it)
+	{
+	  key_bm_insert (it, &rd);
+	}
+      ITC_FAILED
+	{
+	}
+      END_FAIL (it);
       itc_free_owned_params (it);
       return (caddr_t)DVC_LESS;
     }
@@ -10394,7 +10572,7 @@ bif_key_replay_insert (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     ins_mode = INS_REPLACING;
   else
     ins_mode = INS_SOFT;
-  if (KI_TEMP != key->key_id)
+  if (KI_TEMP != key->key_id && !qi->qi_non_txn_insert)
     rd.rd_make_ins_rbe = 1;
   ITC_FAIL (it)
     {
@@ -10553,7 +10731,8 @@ static caddr_t
 bif_user_set_password (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t u_name = bif_string_arg (qst, args, 0, "user_set_password");
-  caddr_t u_pwd = bif_string_arg (qst, args, 1, "user_set_password");
+  caddr_t u_pwd = bif_string_or_wide_or_uname_arg (qst, args, 1, "user_set_password");
+  caddr_t u_pwd_to_delete = NULL;
 
   query_instance_t *qi = (query_instance_t *) (qst);
   user_t *usr = sec_name_to_user (u_name);
@@ -10565,8 +10744,21 @@ bif_user_set_password (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 
   if (!usr)
     sqlr_new_error ("42000", "SR286", "The user %.50s does not exist", u_name);
-  if (strlen (u_pwd) == 0)
+  if ((DV_WIDE == DV_TYPE_OF (u_pwd)) ? (0 == ((wchar_t *)u_pwd)[0]) : ('\0' == u_pwd[0]))
     sqlr_new_error ("42000", "SR287", "The new password for %.50s cannot be empty", usr->usr_name);
+  switch (DV_TYPE_OF (u_pwd))
+    {
+    case DV_WIDE:
+      u_pwd_to_delete = u_pwd = box_wide_as_utf8_char (u_pwd, box_length (u_pwd) / sizeof (wchar_t) - 1, DV_SHORT_STRING);
+      break;
+    case DV_UNAME:
+      u_pwd_to_delete = u_pwd = box_dv_short_string (u_pwd);
+      break;
+    default:
+      if (strlen (u_pwd) != (box_length (u_pwd) - 1))
+        sqlr_new_error ("42000", "SR287", "The new password for %.50s cannot contain zero bytes", usr->usr_name);
+      break;
+    }
   qi->qi_client = bootstrap_cli;
   /*qi->qi_trx->lt_replicate = REPL_NO_LOG; */
   QR_RESET_CTX_T (qi->qi_thread)
@@ -10575,6 +10767,7 @@ bif_user_set_password (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     }
   QR_RESET_CODE
     {
+      dk_free_box (u_pwd_to_delete);
       POP_QR_RESET;
       /*qi->qi_trx->lt_replicate = old_log; */
       qi->qi_client = cli;
@@ -10593,6 +10786,7 @@ bif_user_set_password (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   log_array[5] = usr->usr_data ? box_string (usr->usr_data) : dk_alloc_box (0, DV_DB_NULL);
   log_text_array (qi->qi_trx, (caddr_t) log_array);
   dk_free_tree ((box_t) log_array);
+  dk_free_box (u_pwd_to_delete);
   return NULL;
 }
 
@@ -11237,6 +11431,8 @@ bif_txn_killall (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   int lte = n >= 1 ? bif_long_arg (qst, args, 0, "txn_killall") : LTE_TIMEOUT;
   query_instance_t *qi = (query_instance_t *) qst;
   sec_check_dba (qi, "txn_killall");
+  if (wi_inst.wi_is_checkpoint_pending)
+    sqlr_new_error ("37000", ".....", "Can not kill during pending checkpoint");
   IO_SECT (qi)
     {
       IN_TXN;
@@ -11873,20 +12069,20 @@ bif_exec_error (caddr_t * qst, state_slot_t ** args, caddr_t err, dk_set_t warni
 	qr_free (qr);
       sqlr_resignal (err);
     }
-  if (IS_POINTER (err))
+  if (IS_POINTER(err))
     {
       qst_set (qst, args[1], ERR_STATE (err));
       if (ssl_is_settable (args[2]))
 	qst_set (qst, args[2], ERR_MESSAGE (err));
-      dk_free_box (err);
+      dk_free_box(err);
     }
   else
     {
-      qst_set (qst, args[1], IS_POINTER (err) ? ERR_STATE (err) : box_dv_short_string ("01W01"));
+      qst_set (qst, args[1], IS_POINTER(err) ? ERR_STATE (err) : box_dv_short_string("01W01"));
       if (ssl_is_settable (args[2]))
 	{
-	  snprintf (buf, sizeof (buf), "No WHENEVER statement provided for SQLCODE %d", (int) (ptrlong) (err));
-	  qst_set (qst, args[2], box_dv_short_string (buf));
+	  snprintf (buf, sizeof (buf), "No WHENEVER statement provided for SQLCODE %d", (int)(ptrlong)(err));
+	  qst_set (qst, args[2], box_dv_short_string(buf));
 	}
     }
   return (box_num (-1));
@@ -12427,11 +12623,11 @@ bif_exec_next (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t err = NULL;
 
   if (n_args < 4)
-  return bif_exec_error (qst, args,
+    return bif_exec_error (qst, args,
 	srv_make_new_error ("22023", "SR079", "Too few arguments to exec_next(cursor, state, message, row)"), NULL, NULL, NULL);
 
   if (DV_TYPE_OF (handle) != DV_EXEC_CURSOR || BOX_ELEMENTS(handle) != 3)
-  return bif_exec_error (qst, args,
+    return bif_exec_error (qst, args,
 	srv_make_new_error ("22023", "SR080", "Parameter 4 is not a valid local exec handle"), NULL, NULL, NULL);
 
   qr = (query_t *) handle[0];
@@ -12439,29 +12635,29 @@ bif_exec_next (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   n_cols = (int) (ptrlong) handle[2];
 
   if (!lc_next (lc))
-  {
-    err = lc->lc_error;
-    lc->lc_error = NULL;
-    if (err)
-  {
+    {
+      err = lc->lc_error;
+      lc->lc_error = NULL;
+      if (err)
+	{
 	  return (bif_exec_error (qst, args, err, NULL, NULL, NULL));
-  }
-    else
-    return (box_num(SQL_NO_DATA_FOUND));
-  }
+	}
+      else
+	return (box_num(SQL_NO_DATA_FOUND));
+    }
   else
-  {
-    int inx;
-    caddr_t *row = (caddr_t *)
-    dk_alloc_box (n_cols * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
-    for (inx = 0; inx < n_cols; inx++)
-  row[inx] = box_copy_tree (lc_nth_col (lc, inx));
-    if (ssl_is_settable (args[3]))
-  qst_set (qst, args[3], (caddr_t) row);
-    else
-  dk_free_tree ((caddr_t) row);
-    return box_num (0);
-  }
+    {
+      int inx;
+      caddr_t *row = (caddr_t *)
+	  dk_alloc_box (n_cols * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
+      for (inx = 0; inx < n_cols; inx++)
+	row[inx] = box_copy_tree (lc_nth_col (lc, inx));
+      if (ssl_is_settable (args[3]))
+	qst_set (qst, args[3], (caddr_t) row);
+      else
+	dk_free_tree ((caddr_t) row);
+      return box_num (0);
+    }
   NO_CADDR_T;
 }
 
@@ -12474,7 +12670,7 @@ bif_exec_close (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   query_t *qr;
 
   if (DV_TYPE_OF (handle) != DV_EXEC_CURSOR || BOX_ELEMENTS(handle) != 3)
-  return bif_exec_error (qst, args,
+    return bif_exec_error (qst, args,
 	srv_make_new_error ("22023", "SR081", "Parameter 1 is not a valid local exec handle"), NULL, NULL, NULL);
 
   qr = (query_t *) handle[0];
@@ -13113,6 +13309,8 @@ bif_byte_order_check (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t *qi = QST_INSTANCE (qst);
   if (!QI_IS_DBA (qi))
     return 0;
+  if (f_read_from_rebuilt_database) /* doing a replay from backup dump must be possible on a different architecture */
+    return 0;
   if (order != DB_ORDER_UNKNOWN && order != DB_SYS_BYTE_ORDER)
     {
       log_error ("The transaction log file has been produced with wrong byte order. You can not replay it on this machine. "
@@ -13141,6 +13339,62 @@ bif_server_version_check (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args
   return NEW_DB_NULL;
 }
 
+caddr_t
+bif_server_id_check (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t id = bif_string_arg (qst, args, 0, "server_id_check");
+  caddr_t *qi = QST_INSTANCE (qst);
+  unsigned char db_id[16];
+  int inx, c;
+  if (!QI_IS_DBA (qi))
+    return 0;
+  if (f_read_from_rebuilt_database)
+    return 0;
+
+  if (box_length (id) < sizeof (db_id) * 2)
+    return 0;
+
+  for (inx = 0; inx < sizeof (db_id); inx ++)
+    {
+      sscanf (id + (inx * 2), "%02x", &c);
+      db_id[inx] = (unsigned char) c;
+    }
+
+  if (memcmp (db_id, wi_inst.wi_master->dbs_id, sizeof (db_id)))
+    {
+      log_error ("The transaction log file has been produced by different server instance.");
+      call_exit(0);
+    }
+  return NEW_DB_NULL;
+}
+
+caddr_t
+bif_proc_params_num (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  query_t * proc = NULL;
+  query_instance_t *qi = (query_instance_t *) qst;
+  char *proc_name = bif_string_arg (qst, args, 0, "procedure_params_num");
+  char * full_name;
+
+  proc = sch_proc_def (isp_schema (qi->qi_space), proc_name);
+  if (!proc)
+    {
+      full_name = sch_full_proc_name (isp_schema (qi->qi_space), proc_name,
+	  cli_qual (qi->qi_client), CLI_OWNER (qi->qi_client));
+      if (full_name)
+	proc = sch_proc_def (isp_schema (qi->qi_space), full_name);
+    }
+  if (NULL == proc)
+    return (dk_alloc_box (0, DV_DB_NULL));
+  if (proc->qr_to_recompile)
+    {
+      proc = qr_recompile (proc, err_ret);
+      if (*err_ret)
+	return NULL;
+    }
+  return (box_num (dk_set_length (proc->qr_parms)));
+}
+
 void
 fcache_init ()
 {
@@ -13516,634 +13770,759 @@ caddr_t bif_bit_v_count (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 }
 
 
-/* search_excerpt */
+void ssl_constant_init ();
+void bif_diff_init ();
+void bif_aq_init ();
+void rdf_box_init ();
+void   dbs_cache_check (dbe_storage_t *, int);
 
-typedef struct se_hit_s
-{
-  ptrlong	seh_idx; /* index of hit word in word_hit */
-  caddr_t	seh_hit_pointer; /* pointer of hit word found in main doc */
-} se_hit_t;
 
-#define HIT_TAG_LEN 80
-typedef struct search_excerpt_s
+caddr_t
+bif_cache_check (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  char *	se_doc;
-  caddr_t *	se_hit_words;
-  se_hit_t **	se_hits;
-  int		se_hits_len;
-  int		se_total;
-  int		se_excerpt_max;
-  int		se_text_mode;
-  char		se_hit_tag[HIT_TAG_LEN];
-  /* result */
-  caddr_t **	se_sentences;
-  /* do not search hit words, just make an excerpt from begin */
-  int		se_from_begin;
-} search_excerpt_t;
-
-#define MAX_EXCERPT_HITS	10
-#define MAX_EXCERPT_HITS_STR	"10"
-
-#define HIT_WORD_WEIGHT		100
-#define SE_HIT_POINTER(seh)	(((se_hit_t*) seh )->seh_hit_pointer)
+  wi_inst.wi_checkpoint_atomic = 1;
+  dbs_cache_check (wi_inst.wi_master, IT_CHECK_ALL);
+  wi_inst.wi_checkpoint_atomic = 0;
+  return NULL;
+}
 
-#define ISHITCHAR(c) ( isalpha(c) || isdigit(c) )
-#define WORD_POINTS		(caddr_t)1
-#define WORD_POINT_1		(caddr_t)2
 
-#define PUSH_POINT(set) \
-      if ((set) && ((set)->data != WORD_POINT_1)) dk_set_push (&(set), WORD_POINT_1);
+caddr_t
+bif_partition_def (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return NULL;
+}
 
-#define SEARCH_EXCERPT_MODE_HTML 0
-#define SEARCH_EXCERPT_MODE_WIKI 1
-#define SEARCH_EXCERPT_MODE_TEXT 2
-#define SEARCH_EXCERPT_MODE_MAX 3
+caddr_t
+bif_dpipe_define (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return NULL;
+}
 
-static
-int search_excerpt_check_html_tag (char ** wpoint);
+caddr_t
+bif_rdf_rand_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  double upper_limit = 1.0;
+  if (BOX_ELEMENTS (args) > 0)
+    upper_limit = bif_double_arg (qst, args, 0, "rdf_rand_impl");
+  if (upper_limit <= DBL_EPSILON)
+    sqlr_new_error ("22023", "SL001", "The range limit of SPARQL rand() function is too small");
 
-/* creates ordered set from ordered sets of ptrlongs
- */
-dk_set_t merge_sets (dk_set_t s1, dk_set_t s2)
+  return (box_double (sqlbif_rnd_double (&rnd_seed, upper_limit)));
+}
+
+caddr_t
+bif_rdf_floor_ceil_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, int is_floor)
 {
-  dk_set_t res = 0;
-  while (s1 && s2)
-    {
-      if (SE_HIT_POINTER(s1->data) < SE_HIT_POINTER(s2->data))
-	{
-	  dk_set_push (&res, s1->data);
-	  s1 = s1->next;
-	}
-      else
-	{
-	  dk_set_push (&res, s2->data);
-	  s2 = s2->next;
-	}
-    }
-  while (s1)
-    {
-      dk_set_push (&res, s1->data);
-      s1 = s1->next;
-    }
-  while (s2)
+  caddr_t arg = bif_arg_unrdf (qst, args, 0, is_floor ? "rdf_floor_impl" : "rdf_ceil_impl");
+  switch (DV_TYPE_OF (arg))
     {
-      dk_set_push (&res, s2->data);
-      s2 = s2->next;
+    case DV_LONG_INT: return box_copy (arg);
+    case DV_DOUBLE_FLOAT: { double x = unbox_double (arg); return box_double (is_floor ? floor(x) : ceil (x)); }
+    case DV_SINGLE_FLOAT: { float x = unbox_float (arg); return box_float (is_floor ? floor(x) : ceil (x)); }
+    case DV_NUMERIC:
+      {
+        numeric_t res;
+        numeric_t x = (numeric_t)arg;
+        if (0 == x->n_scale)
+          return box_copy (arg);
+        if (is_floor ? x->n_neg : !x->n_neg)
+          {
+            numeric_t temp;
+            numeric_t shifted;
+            /* construct +-0.5 */
+            NUMERIC_VAR (temp_buf);
+            NUMERIC_INIT (temp_buf);
+            temp = (numeric_t)temp_buf;
+            temp->n_value[0] = 1;
+            temp->n_len = 1;
+            temp->n_scale = 0;
+            temp->n_neg = is_floor;
+            shifted = numeric_allocate ();
+            num_add (shifted, x, temp, 0);
+            res = numeric_allocate ();
+            numeric_rescale_noround (res, shifted, shifted->n_len+1, 0);
+            numeric_free (shifted);
+            return (caddr_t)res;
+          }
+        res = numeric_allocate ();
+        numeric_rescale_noround (res, x, x->n_len+1, 0);
+        return (caddr_t)res;
+      }
+    case DV_DB_NULL: return NEW_DB_NULL;
+    default:
+      sqlr_new_error ("22023", "SL002", "The SPARQL 1.1 function %.10s() needs a numeric value as an argument", is_floor ? "floor" : "ceil");
+    return NULL;
     }
-  return res;
 }
 
-caddr_t search_excerpt_print (search_excerpt_t * se)
+caddr_t
+bif_rdf_floor_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t _result;
-  dk_session_t * strses = strses_allocate();
-  int sent_inx, word_inx;
-  int points = 0;
-  DO_BOX (caddr_t, sentence, sent_inx, se->se_sentences)
-    {
-      if (sent_inx && BOX_ELEMENTS (sentence))
-	SES_PRINT (strses, " ");
-      DO_BOX (caddr_t, word, word_inx, sentence)
-	{
-	  if (word == WORD_POINTS)
-	    points++;
-	  else
-	    points = 0;
-	  if (points == 2)
-	    {
-	      points = 0;
-	      continue;
-	    }
-	  if (word == WORD_POINTS)
-	    SES_PRINT (strses, "...");
-	  else if (word == WORD_POINT_1)
-	    SES_PRINT (strses, ".");
-	  else if (DV_TYPE_OF (word) != DV_ARRAY_OF_POINTER)
-	    SES_PRINT (strses, word);
-	  else
-	    {
-	      if (!se->se_text_mode)
-		{
-		  session_buffered_write_char ('<', strses);
-		  SES_PRINT (strses, se->se_hit_tag);
-		  session_buffered_write_char ('>', strses);
-		}
-	      SES_PRINT (strses, ((caddr_t*)word) [1] );
-	      if (!se->se_text_mode)
-		{
-		  SES_PRINT (strses, "</");
-		  SES_PRINT (strses, se->se_hit_tag);
-		  session_buffered_write_char ('>', strses);
-		}
-	    }
-	  if (word_inx + 2 < BOX_ELEMENTS (sentence)) /* word before . or ... */
-	    SES_PRINT (strses, " ");
-	}
-      END_DO_BOX;
-    }
-  END_DO_BOX;
-  _result = strses_string (strses);
-  strses_free (strses);
-  return _result;
+  return bif_rdf_floor_ceil_impl (qst, err_ret, args, 1);
 }
 
-void search_excerpt_push_hit_word (dk_set_t* set, char * start, char * end)
+caddr_t
+bif_rdf_ceil_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t * pair = (caddr_t *) dk_alloc_box (2 * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
-  pair [0] = box_num (1);
-  pair [1] = box_dv_short_nchars (start, end - start);
-  dk_set_push (set, pair);
+  return bif_rdf_floor_ceil_impl (qst, err_ret, args, 0);
 }
 
-/* returns offset to begin of tag */
-static
-int search_excerpt_get_html_tag_offset (caddr_t doc, caddr_t pointer, int max_offset)
+caddr_t
+bif_rdf_round_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t start = pointer;
-  while (--start > doc)
+  caddr_t arg = bif_arg_unrdf (qst, args, 0, "rdf_round_impl");
+  switch (DV_TYPE_OF (arg))
     {
-      if (pointer - start > max_offset)
-	return max_offset + 1;
-      if (start[0] == '<')
-	{
-	  caddr_t tag_end = start;
-	  if (search_excerpt_check_html_tag (&tag_end) && (tag_end == (pointer + 1)))
-	    return (pointer - start);
-	}
+    case DV_LONG_INT: return box_copy (arg);
+    case DV_DOUBLE_FLOAT: { double x = unbox_double (arg); return box_double (((x-floor(x)) >= 0.5 ? ceil(x) : floor(x))); }
+    case DV_SINGLE_FLOAT: { float x = unbox_float (arg); return box_float (((x-floor(x)) >= 0.5 ? ceil(x) : floor(x))); }
+    case DV_NUMERIC:
+      {
+        numeric_t res;
+        numeric_t x = (numeric_t)arg;
+        int tenths;
+        if (0 == x->n_scale)
+          return box_copy (arg);
+        tenths = x->n_value[(int)(x->n_len)];
+        if (x->n_neg ?
+          ((tenths > 5) || ((5 == tenths) && (1 < x->n_scale))) :
+          (tenths >= 5) )
+          {
+            numeric_t temp;
+            numeric_t shifted;
+            /* construct +-0.5 */
+            NUMERIC_VAR (temp_buf);
+            NUMERIC_INIT (temp_buf);
+            temp = (numeric_t)temp_buf;
+            temp->n_value[0] = 5;
+            temp->n_scale = 1;
+            temp->n_neg = x->n_neg;
+            shifted = numeric_allocate ();
+            num_add (shifted, x, temp, 0);
+            res = numeric_allocate ();
+            numeric_rescale_noround (res, shifted, shifted->n_len+1, 0);
+            numeric_free (shifted);
+            return (caddr_t)res;
+          }
+        res = numeric_allocate ();
+        numeric_rescale_noround (res, x, x->n_len+1, 0);
+        return (caddr_t)res;
+      }
+    case DV_DB_NULL: return NEW_DB_NULL;
+    default:
+      sqlr_new_error ("22023", "SL001", "The SPARQL 1.1 function round() needs a numeric value as an argument");
+    return NULL;
     }
-  return 0;
 }
 
-/* return either begin of the sentence or pointer after left_border */
-caddr_t search_excerpt_to_begin (caddr_t doc, caddr_t left_border, caddr_t start_from, int max_offset, int text_mode, int * hit_left_border)
+/**
+ * 17.4.3.2 STRLEN
+ * xsd:integer STRLEN(string literal str)
+ * The strlen function corresponds to the XPath fn:string-length function and returns an xsd:integer equal to the length in characters of the lexical form of the literal.
+ *
+ */
+caddr_t
+bif_rdf_strlen_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t pointer = start_from;
-  while ((max_offset-- >= 0) && (pointer > left_border))
-    {
-      if (pointer[0] == '.')
-	return pointer + 1;
-      else if (!text_mode && (pointer[0] == '>')) /* possible tag */
-	{
-	  int back_offset = search_excerpt_get_html_tag_offset (doc, pointer, max_offset);
-	  if (back_offset > max_offset)
-	    return pointer + 1;
-	  else if (back_offset)
-	    {
-	      max_offset -= back_offset;
-	      pointer -= back_offset + 1;
-	      continue;
-	    }
-	}
-      pointer--;
-    }
-  if (left_border == pointer)
+  caddr_t arg = bif_arg_unrdf (qst, args, 0, "rdf_strlen_impl");
+  dtp_t dtp = DV_TYPE_OF (arg);
+  switch (dtp)
     {
-      if (hit_left_border)
-	hit_left_border[0] = 1;
-      if (doc == left_border)
-	return pointer;
+    case DV_STRING:
+    case DV_UNAME:
+      return (caddr_t)box_num ( wide_char_length_of_utf8_string (arg, box_length(arg)) );
+    case DV_WIDE:
+      return (caddr_t)box_num( virt_wcslen (arg) );
+    case DV_DB_NULL:
+      return NEW_DB_NULL;
+    default:
+      sqlr_new_error ("22023", "SL001", "The SPARQL 1.1 function strlen() needs a string value as an argument");
+    return NULL;
     }
-  return pointer + 1;
 }
 
-/* return 1 if html tag detected,
-   points wpoint to the end of tag
-*/
-static
-int search_excerpt_check_html_tag (char ** wpoint)
+/* this function take a string, not a box as 'source' argument */
+caddr_t
+t_box_utf8_string (ccaddr_t utf8src, size_t max_chars)
 {
-  char * p = wpoint[0];
-  if (p[0] == '<')
-    {
-      p++;
-      if ((p[0] == '/') && isalpha(p[1]))
-	{ /* close tag */
-	  p++;
-	  while (p[0] && (p[0] != '>')) p++;
-	  if (p[0])
-	    {
-	      wpoint[0] = p + 1;
-	      return 1;
-	    }
-	}
-      else if (isalpha (p[0]))
-	{ /* open tag, empty tag */
-	  while (p[0] && (p[0] != '>')) p++;
-	  if (p[0])
-	    {
-	      wpoint[0] = p + 1;
-	      return 1;
-	    }
-	}
-      else if (p[0] == '!' &&
-	       p[1] == '-' &&
-	       p[2] == '-') /* comments */
-	{
-	  p += 2;
-	  while (p[0] && p[1] && p[2])
-	    {
-	      if (p[0] == '-' &&
-		  p[1] == '-' &&
-		  p[2] == '>')
-		{
-		  wpoint[0] = p + 3;
-		  return 1;
-		}
-	      p++;
-	    }
-	}
-    }
-  else if (p[0] == '&')
+  const unsigned char *src = (const unsigned char *) utf8src;
+
+  virt_mbstate_t state;
+  size_t inx, max_bytes = 0;
+  caddr_t box;
+  memset (&state, 0, sizeof(virt_mbstate_t));
+  for (inx=0; inx<max_chars && src[max_bytes]; ++inx)
     {
-      p++;
-      while (isalpha (p[0])) ++p;
-      if (p[0] == ';')
-        {
-	  wpoint[0] = ++p;
-	  return 1;
-	}
+      max_bytes += virt_mbrlen (src + max_bytes, VIRT_MB_CUR_MAX, &state);
     }
-  return 0;
-}
 
-#define NOTWORDCHAR(c) ((!isalnum((unsigned char)(c))\
-			&& ((c) != '.')))
+  box = dk_alloc_box (max_bytes + 1, DV_STRING);
 
+  strncpy (box,src,max_bytes);
+  box[max_bytes] = 0;
+  return box;
+}
 
-void search_excerpt_tokenize_doc (search_excerpt_t * se)
+/*
+17.4.3.3 SUBSTR
+string literal  SUBSTR(string literal source, xsd:integer startingLoc)
+string literal  SUBSTR(string literal source, xsd:integer startingLoc, xsd:integer length)
+The substr function corresponds to the XPath fn:substring function and returns a literal of
+the same kind (simple literal, literal with language tag, xsd:string typed literal) as
+the source input parameter but with a lexical form formed from the substring of
+the lexcial form of the source.
+The arguments startingLoc and length may be derived types of xsd:integer.
+The index of the first character in a strings is 1.
+*/
+caddr_t
+bif_rdf_substr_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t * curr_sentence;
-  dk_set_t curr_sentence_set = 0;
-  dk_set_t sentences_set = 0;
-  caddr_t wstart, wpoint;
-  int hidx = 0;
-  int sentence_hit_weight = 0;
-  int total_counter = 0, prev_total_counter = 0;
-  int excerpt_counter = 0;
-  int all_complete = 0;
-  int point_at_the_end = 0;
-  int sentences_count = 0;
+  char b[128] = "";
+  caddr_t src = bif_arg_unrdf (qst, args, 0, "rdf_substr_impl");
+  rdf_box_t *src_rdf_box = (rdf_box_t *)bif_arg_nochecks (qst, args, 0);
+  char src_is_rdf_box = DV_TYPE_OF (src_rdf_box) == DV_RDF;
+  boxint startl = bif_long_arg(qst, args, 1, "rdf_substr_impl");
+  unsigned start = (unsigned) startl - 1;
+  boxint lenl;
+  unsigned len = UINT_MAX;
+  size_t str_n_chars;
+  box_t r;
+  if (BOX_ELEMENTS (args) >= 3)
+    {
+      lenl = bif_long_arg (qst, args, 2, "rdf_substr_impl");
+      len = (unsigned) lenl;
+    }
 
-  if (!se->se_from_begin)
-    wpoint = search_excerpt_to_begin (se->se_doc, se->se_doc, se->se_hits[0]->seh_hit_pointer, se->se_excerpt_max / 2, se->se_text_mode, 0);
-  else
-    wpoint = search_excerpt_to_begin (se->se_doc, se->se_doc, se->se_doc, se->se_excerpt_max / 2, se->se_text_mode, 0);
-  wstart = wpoint;
-  /* search sentence */
- again:
-  while (wpoint[0] && wpoint[0] != '.')
+  switch (DV_TYPE_OF (src))
     {
-      if (!sentences_count)
-	{
-	  if (wpoint != se->se_doc)
-	    dk_set_push (&curr_sentence_set, WORD_POINTS);
-	  ++sentences_count;
-	}
-      if (NOTWORDCHAR(wpoint[0])) /* instead of isspace (wpoint[0])) */
-	{
-	  if (total_counter + wpoint - wstart >= se->se_total)
-	    {
-	      all_complete = 1;
-	      goto excerpt_end;
-	    }
-	  if (excerpt_counter +  wpoint - wstart >= se->se_excerpt_max)
-	    {
-	      wstart = wpoint;
-	    goto excerpt_end;
-	  }
-	if (!se->se_from_begin)
-	  {
-	    while ( (hidx < se->se_hits_len) && (se->se_hits[hidx]->seh_hit_pointer < wstart) )
-	      hidx++;
-	    if ( (hidx < se->se_hits_len ) && (se->se_hits[hidx]->seh_hit_pointer == wstart) )
-	      {
-		if ( ((wpoint - wstart) == strlen (se->se_hit_words[se->se_hits[hidx]->seh_idx])) ||
-		 !ISHITCHAR(wstart[strlen (se->se_hit_words[se->se_hits[hidx]->seh_idx])]))
-		  {
-		    search_excerpt_push_hit_word (&curr_sentence_set, wstart, wpoint);
-		    sentence_hit_weight += HIT_WORD_WEIGHT;
-		  }
-		hidx++;
-	       }
-	     else if (wpoint - wstart)
-	       {
-		 dk_set_push (&curr_sentence_set,
-		       box_dv_short_nchars (wstart, wpoint - wstart));
-	       }
-	  }
-	else if (wpoint - wstart)
-	  dk_set_push (&curr_sentence_set,
-		       box_dv_short_nchars (wstart, wpoint - wstart));
-	total_counter += wpoint - wstart;
-	excerpt_counter += wpoint - wstart;
-	if (!se->se_text_mode && search_excerpt_check_html_tag (&wpoint))
-	  wstart = wpoint;
-	while (wpoint[0] && NOTWORDCHAR (*wpoint))
-	  {
-	    if (!se->se_text_mode && search_excerpt_check_html_tag (&wpoint))
-	      wstart = wpoint;
-	    else
-	      wstart = wpoint[0] ? ++wpoint : wpoint;
-	  }
-      }
-    else
-      wpoint++;
-  }
-if ((wstart+1) != wpoint) /* "{ws}." */
-  {
-    if (total_counter + wpoint - wstart >= se->se_total)
+    case DV_STRING: /* utf-8 */
+    case DV_UNAME:
       {
-	all_complete = 1;
-	goto excerpt_end;
+        virt_mbstate_t mbstate;
+        const char *pstart = src;
+        size_t i;
+        memset (&mbstate, 0, sizeof(virt_mbstate_t));
+        for (i=0; i<start && *pstart; ++i)
+          {
+            pstart += virt_mbrlen (pstart, VIRT_MB_CUR_MAX, &mbstate);
+          }
+        str_n_chars = wide_char_length_of_utf8_string (pstart, strlen(pstart));
+
+        if (startl < 1 || !str_n_chars ||
+            (BOX_ELEMENTS (args) >= 3 && (lenl < 1 || lenl > str_n_chars)) )
+          goto bad_subrange;
+
+        if (len > str_n_chars)
+          len = str_n_chars;
+        r = t_box_utf8_string (pstart, len);
       }
-    if (excerpt_counter +  wpoint - wstart >= se->se_excerpt_max)
+      break;
+    case DV_WIDE:
+    case DV_LONG_WIDE:
       {
-	wstart = wpoint;
-	goto excerpt_end;
-	}
-      if (!se->se_from_begin && ((hidx < se->se_hits_len ) && (se->se_hits[hidx]->seh_hit_pointer == wstart)))
-	{
-	  if ( ((wpoint - wstart) == strlen (se->se_hit_words[se->se_hits[hidx]->seh_idx])) ||
-	       !ISHITCHAR(wstart[strlen (se->se_hit_words[se->se_hits[hidx]->seh_idx])]))
-	    {
-	      search_excerpt_push_hit_word (&curr_sentence_set, wstart, wpoint);
-	      sentence_hit_weight += HIT_WORD_WEIGHT;
-	    }
-	  hidx++;
-	}
-      else if (wpoint-wstart)
-	{
-	  dk_set_push (&curr_sentence_set,
-		     box_dv_short_nchars (wstart, wpoint - wstart));
-	  wstart = wpoint;
-	}
-      PUSH_POINT(curr_sentence_set);
-      point_at_the_end = 1;
+	const wchar_t *pstart;
+	size_t strlength;
+        str_n_chars = virt_wcslen (src);
+
+        if (startl < 1 || startl > str_n_chars ||
+            (BOX_ELEMENTS (args) >= 3 && (lenl < 1 || lenl > str_n_chars - start + 1)) )
+          goto bad_subrange;
+
+        pstart = (const wchar_t *)src + start;
+        strlength = virt_wcslen(pstart);
+        if (len > strlength)
+          len = strlength;
+        r = box_wide_as_utf8_char ((ccaddr_t)pstart, len, DV_STRING);
+      }
+      break;
+    case DV_DB_NULL:
+      return NEW_DB_NULL;
+    default:
+      sqlr_new_error ("22023", "SL001", "The SPARQL 1.1 function substr() needs a string value as 1st argument");
+    return NULL;
     }
- excerpt_end:
-  if(!point_at_the_end)
-    dk_set_push (&curr_sentence_set, WORD_POINTS);
-  if (wstart[0] == '.')
-    wstart++;
-  if (wpoint[0] == '.')
-    wpoint++;
-
-  if (se->se_from_begin || sentence_hit_weight)
+  box_flags(r) |= BF_UTF8;
+  if (src_is_rdf_box)
     {
-      /* dk_set_append_1 (&curr_sentence_set, box_num (sentence_hit_weight)); */
-      if (dk_set_length(curr_sentence_set) > 0)
-	{
-	  curr_sentence = (caddr_t *) list_to_array (dk_set_nreverse (curr_sentence_set));
-	  dk_set_push (&sentences_set, curr_sentence);
-	}
-      ++sentences_count;
+      rdf_box_t *r_rdf_box = rb_allocate();
+      r_rdf_box->rb_is_complete = 1;
+      r_rdf_box->rb_type = src_rdf_box->rb_type;
+      r_rdf_box->rb_lang = src_rdf_box->rb_lang;
+      r_rdf_box->rb_box = r;
+      return (caddr_t)r_rdf_box;
     }
   else
+    return (caddr_t)r;
+
+bad_subrange:
+  if (BOX_ELEMENTS (args) >= 3)
+    snprintf (b, 128, ", len=%ld", (long)lenl);
+  sqlr_new_error ("22011", "SR026",
+      "SPARQL substr: Bad string subrange: from=%ld%s.", (long)startl, b);
+  return NEW_DB_NULL;
+}
+
+/*
+17.4.3.4 UCASE
+string literal  UCASE(string literal str)
+The UCASE function corresponds to the XPath fn:upper-case function. It returns a string literal whose lexical form is the upper case of the lexcial form of the argument.
+17.4.3.5 LCASE
+string literal  LCASE(string literal str)
+The LCASE function corresponds to the XPath fn:lower-case function. It returns a string literal whose lexical form is the lower case of the lexcial form of the argument.
+*/
+caddr_t
+bif_rdf_ucase_lcase_impl(caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, char upcase /* == 1 - upcase, ==0 - lcase */)
+{
+  caddr_t str = bif_arg_unrdf (qst, args, 0, upcase ? "rdf_ucase_impl" : "rdf_lcase_impl");
+  rdf_box_t *str_rdf_box = (rdf_box_t *)bif_arg_nochecks (qst, args, 0);
+  char src_is_rdf_box = DV_TYPE_OF (str_rdf_box) == DV_RDF;
+  size_t i, str_n_chars;
+  wchar_t *wide_box = NULL;
+
+  box_t r;
+  unichar (*unicode3_get_x_case) (unichar);
+  switch (DV_TYPE_OF (str))
     {
-      DO_SET (caddr_t, el, &curr_sentence_set)
-	{
-	  dk_free_box (el);
-	}
-      END_DO_SET();
-      all_complete = 0;
-      total_counter = prev_total_counter;
-      dk_set_free (curr_sentence_set);
-      --sentences_count;
+    case DV_STRING: /* utf-8 */
+    case DV_UNAME:
+      {
+        wide_box =  (wchar_t*) box_utf8_as_wide_char (str, NULL, strlen(str), 0, DV_WIDE);
+        str_n_chars= virt_wcslen (wide_box);
+      }
+      break;
+    case DV_WIDE:
+    case DV_LONG_WIDE:
+      {
+        wide_box =  (wchar_t*)box_wide_string ((const wchar_t*)str);
+        str_n_chars = virt_wcslen ( (const wchar_t*)str);
+      }
+      break;
+    case DV_DB_NULL:
+      return NEW_DB_NULL;
+    default:
+      sqlr_new_error ("22023", "SL001", "The SPARQL 1.1 function %scase() needs a string value as 1st argument",
+          upcase ? "u" : "l" );
+    return NULL;
     }
-  curr_sentence_set = 0;
 
-  if (!se->se_from_begin)
+  unicode3_get_x_case = upcase ? unicode3_getucase : unicode3_getlcase;
+  for (i=0; i<str_n_chars; ++i)
     {
-      if (!all_complete)
-	{
-	  while ((hidx < se->se_hits_len) && (se->se_hits[hidx]->seh_hit_pointer < wpoint))
-	    hidx++;
-	  if (hidx < se->se_hits_len)
-	    {
-	      int hit_left_border = 0;
-	      if (!point_at_the_end && !hit_left_border)
-		dk_set_push (&curr_sentence_set, WORD_POINTS);
-	      wstart = wpoint = search_excerpt_to_begin (se->se_doc, wpoint, se->se_hits [hidx]->seh_hit_pointer, se->se_excerpt_max / 2,
-							 se->se_text_mode, &hit_left_border);
-	      if (!hit_left_border || (se->se_doc != wpoint))
-		{
-		  sentence_hit_weight = 0;
-		  excerpt_counter = 0;
-		  point_at_the_end = 0;
-		  prev_total_counter = total_counter;
-		  goto again;
-		}
-	    }
-	}
+      wide_box[i] = unicode3_get_x_case (wide_box[i]);
     }
-  else if (wpoint[0])
+  r = box_wide_as_utf8_char ((ccaddr_t)wide_box, str_n_chars, DV_STRING);
+  dk_free_box (wide_box);
+
+  box_flags(r) |= BF_UTF8;
+  if (src_is_rdf_box)
     {
-      sentence_hit_weight = 0;
-      excerpt_counter = 0;
-      prev_total_counter = total_counter;
-      ++wpoint;
-      goto again;
+      rdf_box_t *r_rdf_box = rb_allocate();
+      r_rdf_box->rb_is_complete = 1;
+      r_rdf_box->rb_type = str_rdf_box->rb_type;
+      r_rdf_box->rb_lang = str_rdf_box->rb_lang;
+      r_rdf_box->rb_box = r;
+      return (caddr_t)r_rdf_box;
     }
-  se->se_sentences = (caddr_t**) list_to_array (dk_set_nreverse (sentences_set));
+  else
+    return (caddr_t)r;
 }
 
-int search_excerpt_search_cluster (se_hit_t ** hit_index, int hit_index_sz, int cluster_sz)
+caddr_t
+bif_rdf_ucase_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  int idx ;
-  for (idx = 1; idx < hit_index_sz; idx ++)
-    if ((hit_index[idx]->seh_hit_pointer - hit_index[idx-1]->seh_hit_pointer) < cluster_sz)
-      return idx - 1;
-  return 0;
+  return bif_rdf_ucase_lcase_impl (qst, err_ret, args, 1);
 }
 
-static
-caddr_t search_excerpt_new_hit (int idx, caddr_t pointer)
+caddr_t
+bif_rdf_lcase_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  se_hit_t * seh = (se_hit_t*) dk_alloc (sizeof (se_hit_t));
-  seh->seh_idx = idx;
-  seh->seh_hit_pointer = pointer;
-  return (caddr_t) seh;
+  return bif_rdf_ucase_lcase_impl (qst, err_ret, args, 0);
 }
 
+/*
+17.4.3.6 STRSTARTS
 
-static
-caddr_t bif_search_excerpt (caddr_t *qst, caddr_t * err_ret, state_slot_t ** args)
-{
-  caddr_t * word_hits = bif_strict_type_array_arg (DV_STRING, qst, args, 0, "search_excerpt");
-  caddr_t text, text_with_offset = 0, original_text  = bif_arg (qst, args, 1, "search_excerpt");
-  ptrlong within_first = 200000;
-  ptrlong max_excerpt = 90;
-  ptrlong total = 200;
-  caddr_t html_hit_tag;
-  caddr_t _result = 0;
-  long mode = SEARCH_EXCERPT_MODE_HTML;
-
-  se_hit_t ** hit_index;
-  int hit_inx = 0;
-  int inx;
-  dk_set_t hit_sets[MAX_EXCERPT_HITS];
-  dk_set_t hit_res_set = 0;
-  if (DV_RDF == DV_TYPE_OF (original_text))
-    original_text = ((rdf_box_t*)original_text)->rb_box;
-  if (!DV_STRINGP (original_text))
-    return dk_alloc_box (0, DV_DB_NULL); /* if not a string, can happen in weird join orders with any columns */
-  memset (hit_sets, 0, sizeof (hit_sets));
+xsd:boolean  STRSTARTS(string literal arg1, string literal arg2)
 
-  if (BOX_ELEMENTS (word_hits) > MAX_EXCERPT_HITS)
-    sqlr_new_error ("XXXXX", "SRXXX", "search_excerpt does not support more than " MAX_EXCERPT_HITS_STR " hits");
+The STRSTARTS function corresponds to the XPath fn:starts-with function. The arguments must be argument compatible otherwise an error is raised.
+For such input pairs, the function returns true if the lexical form of arg1 starts with the lexical form of arg2, otherwise it returns false.
 
-  if (BOX_ELEMENTS (args) > 2)
-    within_first = bif_long_arg (qst, args, 2, "search_excerpt");
-  if (BOX_ELEMENTS (args) > 3)
-    max_excerpt = bif_long_arg (qst, args, 3, "search_excerpt");
-  if (BOX_ELEMENTS (args) > 4)
-    total = bif_long_arg (qst, args, 4, "search_excerpt");
-  if (BOX_ELEMENTS (args) > 5)
-    html_hit_tag = bif_string_or_null_arg (qst, args, 5, "search_excerpt");
-  else
-    html_hit_tag = "b";
-  if (BOX_ELEMENTS (args) > 6)
-    mode = bif_long_arg (qst, args, 6, "search_excerpt");
-  if ( (mode < 0) && (mode >= SEARCH_EXCERPT_MODE_MAX))
-    mode = SEARCH_EXCERPT_MODE_HTML;
-  DO_BOX (caddr_t, hit, inx, word_hits)
-    {
-      if (!box_length (hit) || !hit[0])
-	sqlr_new_error ("XXXXX", "SRXXX", "hit words must be non-zero length");
-    }
-  END_DO_BOX;
+17.4.3.7 STRENDS
 
-  if (box_length (original_text) > within_first)
-    text = box_dv_short_nchars (original_text, within_first);
-  else
-    text = original_text;
+xsd:boolean  STRENDS(string literal arg1, string literal arg2)
 
-  if (html_hit_tag && (mode == SEARCH_EXCERPT_MODE_HTML))
-    text_with_offset = (caddr_t) nc_strstr ((unsigned char *) text, (unsigned char *) "<body");
-  if (!text_with_offset)
-    text_with_offset = text;
+The STRENDS function corresponds to the XPath fn:starts-with function. The arguments must be argument compatible otherwise an error is raised.
+For such input pairs, the function returns true if the lexical form of arg1 ends with the lexical form of arg2, otherwise it returns false.
 
-  DO_BOX (caddr_t, hit, inx, word_hits)
-    {
-      char * hit_pointer = text_with_offset;
-      while ( (hit_pointer = (char *) nc_strstr ( (unsigned char *) hit_pointer, (unsigned char *) hit) ) )
-	{
-	  dk_set_push (&hit_sets[inx], search_excerpt_new_hit (inx, hit_pointer++));
-	  hit_inx++;
-	}
-      hit_sets[inx] = dk_set_nreverse (hit_sets[inx]);
-    }
-  END_DO_BOX;
-  if (!hit_inx)
-    goto fin;
-  hit_res_set = hit_sets[0];
-  for (inx = 1; inx < BOX_ELEMENTS (word_hits); inx++)
-    {
-      dk_set_t _prev = hit_res_set;
-      hit_res_set = dk_set_nreverse (merge_sets (_prev, hit_sets[inx]));
-      if (_prev != hit_sets[0])
-	dk_set_free (_prev);
-    }
+17.4.3.8 CONTAINS
+
+xsd:boolean  CONTAINS(string literal arg1, string literal arg2)
 
+The CONTAINS function corresponds to the XPath fn:contains. The arguments must be argument compatible otherwise an error is raised.
+*/
 
-  hit_index = (se_hit_t **) dk_set_to_array (hit_res_set);
-  if (hit_res_set != hit_sets[0])
-    dk_set_free (hit_res_set);
-  for (inx = 0; inx < BOX_ELEMENTS (word_hits); inx++)
-    dk_set_free (hit_sets[inx]);
+#define STRCONTAINS_AT_START ((char)0)
+#define STRCONTAINS_INSIDE ((char)1)
+#define STRCONTAINS_AT_END ((char)2)
 
-  { /* check consistency */
-    caddr_t prev_el_hit = 0;
-    DO_BOX (se_hit_t*, el, inx, hit_index)
-      {
-	/*	printf ("%s %x\n", el, el);
-		fflush (stdout); */
-	if (prev_el_hit > el->seh_hit_pointer)
-	  GPF_T;
-	prev_el_hit = el->seh_hit_pointer;
-      }
-    END_DO_BOX;
-  }
-  {
-    search_excerpt_t se;
-    int hit_index_cluster_ofs = search_excerpt_search_cluster (hit_index, BOX_ELEMENTS (hit_index), max_excerpt / 2);
-    memset (&se, 0, sizeof (search_excerpt_t));
-    se.se_doc = text_with_offset;
-    se.se_hit_words = word_hits;
-    se.se_hits = hit_index + hit_index_cluster_ofs;
-    se.se_hits_len = BOX_ELEMENTS (hit_index) - hit_index_cluster_ofs;
-    se.se_total = total;
-    se.se_excerpt_max = max_excerpt;
-    se.se_text_mode = (!html_hit_tag);
-    if (html_hit_tag)
-      strncpy (se.se_hit_tag, html_hit_tag, HIT_TAG_LEN-1);
-    else
-      strcpy (se.se_hit_tag, "b");
-    search_excerpt_tokenize_doc (&se);
-    _result = search_excerpt_print (&se);
-    /* dbg_print_box_dbx (se.se_sentences); */
-    dk_free_tree ((caddr_t) se.se_sentences);
-  }
+caddr_t
+bif_rdf_strcontains_x_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *fnname, const char *sparql_fnname, char substring_place)
+{
+  ccaddr_t str = bif_arg_unrdf (qst, args, 0, fnname);
+  ccaddr_t pattern = bif_arg_unrdf (qst, args, 1, fnname);
+  ccaddr_t str_end, pattern_position;
+  size_t str_n_chars, str_len, pattern_n_chars, pattern_len;
+  char r = 0; /* false by default */
+  ccaddr_t ok_position;
 
-  DO_BOX (caddr_t, seh, inx, hit_index)
+  switch (DV_TYPE_OF (str))
     {
-      dk_free (seh, sizeof (se_hit_t));
-    }
-  END_DO_BOX;
-  dk_free_box ((caddr_t)hit_index);
-
-fin:
-  if (!_result)
-    {
-      search_excerpt_t se;
-      memset (&se, 0, sizeof (search_excerpt_t));
-      se.se_doc = text_with_offset;
-      se.se_total = total;
-      se.se_excerpt_max = max_excerpt;
-      se.se_text_mode = (!html_hit_tag);
-      if (html_hit_tag)
-        strncpy (se.se_hit_tag, html_hit_tag, HIT_TAG_LEN-1);
-      else
-        strcpy (se.se_hit_tag, "b");
-      se.se_from_begin = 1;
-      search_excerpt_tokenize_doc (&se);
-      _result = search_excerpt_print (&se);
-      dk_free_tree ((box_t) se.se_sentences);
+    case DV_STRING: /* utf-8 */
+    case DV_UNAME:
+      {
+        virt_mbstate_t mbstate;
+        memset (&mbstate, 0, sizeof(virt_mbstate_t));
+        str_n_chars = wide_char_length_of_utf8_string ( (const unsigned char*)str, strlen(str));
+        memset (&mbstate, 0, sizeof(virt_mbstate_t));
+        pattern_n_chars = wide_char_length_of_utf8_string ( (const unsigned char*)pattern, strlen(pattern));
+        str_len = strlen ((const char*)str);
+        pattern_len = strlen ((const char*)pattern);
+
+        if (pattern_n_chars && pattern_n_chars <= str_n_chars)
+          {
+            if (substring_place == STRCONTAINS_AT_START)
+              r = strncmp ((const char*)str, (const char*)pattern, pattern_len) == 0;
+            else if (substring_place == STRCONTAINS_INSIDE)
+              r = strstr((const char*)str,(const char*)pattern) != NULL;
+            else
+              r = strncmp ((const char*)str + str_len - pattern_len, (const char*)pattern, pattern_len) == 0;
+          }
+      }
+      break;
+    case DV_WIDE: /* utf-32 */
+    case DV_LONG_WIDE:
+      {
+        str_n_chars = virt_wcslen ((const wchar_t*)str);
+        pattern_n_chars = virt_wcslen ((const wchar_t*)pattern);
+        str_end = (ccaddr_t)(((const wchar_t*)str) + str_n_chars - pattern_n_chars);
+        ok_position = substring_place == STRCONTAINS_AT_START ? str : str_end;
+
+        if (pattern_n_chars && pattern_n_chars <= str_n_chars)
+          {
+            pattern_position = substring_place != STRCONTAINS_AT_END ?
+                (ccaddr_t) virt_wcsstr ((const wchar_t*)str, (const wchar_t*)pattern)
+              : (ccaddr_t) virt_wcsrstr ((const wchar_t*)str, (const wchar_t*)pattern);
+
+            if (pattern_n_chars < str_n_chars)
+              r = pattern_position == ok_position || (substring_place == STRCONTAINS_INSIDE && pattern_position);
+            else if (str_n_chars == pattern_n_chars)
+              r = pattern_position == str;
+          }
+      }
+      break;
+    case DV_DB_NULL:
+      return NEW_DB_NULL;
+    default:
+      sqlr_new_error ("22023", "SL001", "The SPARQL 1.1 function %s() needs a string value as 1st argument", sparql_fnname);
+    return NULL;
     }
-  if (text != original_text)
-    dk_free_box (text);
-  return _result;
+
+  return (caddr_t)box_bool(r);
 }
 
-void ssl_constant_init ();
-void bif_diff_init ();
-void bif_aq_init ();
-void rdf_box_init ();
-void   dbs_cache_check (dbe_storage_t *, int);
+caddr_t
+bif_rdf_strstarts_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_rdf_strcontains_x_impl (qst, err_ret, args, "rdf_strstarts_impl", "STRSTARTS", STRCONTAINS_AT_START);
+}
 
+caddr_t
+bif_rdf_strends_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return bif_rdf_strcontains_x_impl (qst, err_ret, args, "rdf_strends_impl", "STRENDS", STRCONTAINS_AT_END);
+}
 
 caddr_t
-bif_cache_check (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+bif_rdf_contains_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  wi_inst.wi_checkpoint_atomic = 1;
-  dbs_cache_check (wi_inst.wi_master, IT_CHECK_ALL);
-  wi_inst.wi_checkpoint_atomic = 0;
-  return NULL;
+  return bif_rdf_strcontains_x_impl (qst, err_ret, args, "rdf_contains_impl", "CONTAINS", STRCONTAINS_INSIDE);
 }
 
+/*
+17.4.3.11 ENCODE_FOR_IRI
 
+A clone of XPath fn:encode-for-uri.
+*/
 caddr_t
-bif_partition_def (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+bif_rdf_encode_for_uri_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
+  dk_session_t *ses;
+  caddr_t str = bif_string_or_uname_or_wide_or_null_arg (qst, args, 0, "rdf_encode_for_uri");
+  if (NULL == str)
+    return NEW_DB_NULL;
+  switch (DV_TYPE_OF (str))
+    {
+    case DV_STRING: /* utf-8 */
+    case DV_UNAME:
+      {
+        ses = strses_allocate ();
+        dks_esc_write (ses, str, box_length (str) - 1, CHARSET_UTF8, CHARSET_UTF8, DKS_ESC_URI);
+      }
+      break;
+    case DV_WIDE:
+    case DV_LONG_WIDE:
+      {
+        ses = strses_allocate ();
+        dks_esc_write (ses, str, box_length (str) - 1, CHARSET_UTF8, CHARSET_WIDE, DKS_ESC_URI);
+      }
+      break;
+    default:
+#ifndef NDEBUG
+      GPF_T;
+#endif
+      return NULL;
+    }
+  if (STRSES_CAN_BE_STRING ((dk_session_t *) ses))
+    {
+      caddr_t res_strg = strses_string (ses);
+      dk_free_box ((caddr_t)ses);
+      box_flags(res_strg) |= BF_UTF8;
+      return res_strg;
+    }
+  strses_free (ses);
+  sqlr_resignal (STRSES_LENGTH_ERROR ("rdf_encode_for_uri"));
   return NULL;
 }
 
+/*
+17.4.3.11 CONCAT
+
+A clone of XPath fn:encode-for-uri.
+*/
 caddr_t
-bif_dpipe_define (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+bif_rdf_concat_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  return NULL;
+  caddr_t res_strg = bif_concatenate (qst, err_ret, args);
+  query_instance_t *qi = (query_instance_t *)qst;
+  int n_args = BOX_ELEMENTS (args), inx;
+  unsigned short common_type_twobytes = 0;
+  unsigned short common_lang_twobytes = 0;
+  for (inx = 0; inx < n_args; inx++)
+    {
+      rdf_box_t *arg = (rdf_box_t *)bif_arg_nochecks (qst, args, inx);
+      if (DV_RDF != DV_TYPE_OF (arg))
+        {
+          common_lang_twobytes = RDF_BOX_ILL_LANG;
+          common_type_twobytes = RDF_BOX_ILL_LANG;
+          continue;
+        }
+      if (RDF_BOX_DEFAULT_LANG != arg->rb_lang)
+        {
+          if (0 == common_lang_twobytes)
+            common_lang_twobytes = arg->rb_lang;
+          else if (common_lang_twobytes != arg->rb_lang)
+            common_lang_twobytes = RDF_BOX_ILL_LANG;
+        }
+      else if (RDF_BOX_DEFAULT_TYPE != arg->rb_type)
+        {
+          if (0 == common_type_twobytes)
+            common_type_twobytes = arg->rb_type;
+          else if (common_type_twobytes != arg->rb_type)
+            common_type_twobytes = RDF_BOX_ILL_TYPE;
+        }
+    }
+  if ((0 != common_type_twobytes) && (RDF_BOX_ILL_TYPE != common_type_twobytes))
+    {
+static unsigned short xsd_string_twobytes = 0;
+      if (0 == xsd_string_twobytes)
+        xsd_string_twobytes = nic_name_id (rdf_type_cache, uname_xmlschema_ns_uri_hash_string);
+      if (common_type_twobytes == xsd_string_twobytes)
+        {
+          rdf_box_t *rb_res = rb_allocate ();
+          rb_res->rb_box = res_strg;
+          rb_res->rb_is_complete = 1;
+          rb_res->rb_type = xsd_string_twobytes;
+          rb_res->rb_lang = RDF_BOX_DEFAULT_LANG;
+          return (caddr_t)rb_res;
+        }
+    }
+  if ((0 != common_lang_twobytes) && (RDF_BOX_ILL_LANG != common_lang_twobytes))
+    {
+      rdf_box_t *rb_res = rb_allocate ();
+      rb_res->rb_box = res_strg;
+      rb_res->rb_is_complete = 1;
+      rb_res->rb_type = RDF_BOX_DEFAULT_TYPE;
+      rb_res->rb_lang = common_lang_twobytes;
+      return (caddr_t)rb_res;
+    }
+  return res_strg;
+}
+
+caddr_t
+bif_rdf_seconds_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t dt = bif_date_arg (qst, args, 0, "rdf_seconds_impl");
+  TIMESTAMP_STRUCT ts;
+  dt_to_timestamp_struct (dt, &ts);
+  return box_double (ts.second + ts.fraction / 1000000000.0);
 }
 
+caddr_t
+bif_rdf_checksum_int (caddr_t * qst, state_slot_t ** args, int op, const char *fname)
+{
+  caddr_t arg = bif_arg_unrdf (qst, args, 0, fname);
+  caddr_t arg_strg = NULL;
+  caddr_t res = NULL;
+  int ctr, res_len;
+  dtp_t arg_dtp = DV_TYPE_OF (arg);
+  if ((DV_STRING != arg_dtp) || (DV_UNAME != arg_dtp))
+    arg_strg = box_cast_to_UTF8 (qst, arg);
+  else
+    arg_strg = arg;
+  switch (op)
+    {
+    case SPAR_BIF_MD5:
+      {
+        MD5_CTX ctx;
+        memset (&ctx, 0, sizeof (MD5_CTX));
+        MD5Init (&ctx);
+        MD5Update (&ctx, arg_strg, box_length (arg_strg)-1);
+        res_len = MD5_SIZE;
+        res = dk_alloc_box (res_len*2 + 1, DV_SHORT_STRING);
+        MD5Final ((unsigned char *) res, &ctx);
+        break;
+      }
+#if !defined(OPENSSL_NO_SHA1) && defined (SHA_DIGEST_LENGTH)
+    case SPAR_BIF_SHA1:
+      {
+        SHA_CTX ctx;
+        memset (&ctx, 0, sizeof (SHA_CTX));
+        SHA1_Init (&ctx);
+        SHA1_Update (&ctx, arg_strg, box_length (arg_strg)-1);
+        res_len = SHA_DIGEST_LENGTH;
+        res = dk_alloc_box (res_len*2 + 1, DV_SHORT_STRING);
+        SHA1_Final ((unsigned char *) res, &ctx);
+        break;
+      }
+#endif
+#if !defined( OPENSSL_NO_SHA256) && defined (SHA256_DIGEST_LENGTH)
+    case SPAR_BIF_SHA224:
+      {
+        SHA256_CTX ctx;
+        memset (&ctx, 0, sizeof (SHA256_CTX));
+        SHA224_Init (&ctx);
+        SHA224_Update (&ctx, arg_strg, box_length (arg_strg)-1);
+        res_len = SHA224_DIGEST_LENGTH;
+        res = dk_alloc_box (res_len*2 + 1, DV_SHORT_STRING);
+        SHA224_Final ((unsigned char *) res, &ctx);
+        break;
+      }
+    case SPAR_BIF_SHA256:
+      {
+        SHA256_CTX ctx;
+        memset (&ctx, 0, sizeof (SHA256_CTX));
+        SHA256_Init (&ctx);
+        SHA256_Update (&ctx, arg_strg, box_length (arg_strg)-1);
+        res_len = SHA256_DIGEST_LENGTH;
+        res = dk_alloc_box (res_len*2 + 1, DV_SHORT_STRING);
+        SHA256_Final ((unsigned char *) res, &ctx);
+        break;
+      }
+#endif
+#if !defined(OPENSSL_NO_SHA512) && defined (SHA512_DIGEST_LENGTH)
+    case SPAR_BIF_SHA384:
+      {
+        SHA512_CTX ctx;
+        memset (&ctx, 0, sizeof (SHA512_CTX));
+        SHA384_Init (&ctx);
+        SHA384_Update (&ctx, arg_strg, box_length (arg_strg)-1);
+        res_len = SHA384_DIGEST_LENGTH;
+        res = dk_alloc_box (res_len*2 + 1, DV_SHORT_STRING);
+        SHA384_Final ((unsigned char *) res, &ctx);
+        break;
+      }
+    case SPAR_BIF_SHA512:
+      {
+        SHA512_CTX ctx;
+        memset (&ctx, 0, sizeof (SHA512_CTX));
+        SHA512_Init (&ctx);
+        SHA512_Update (&ctx, arg_strg, box_length (arg_strg)-1);
+        res_len = SHA512_DIGEST_LENGTH;
+        res = dk_alloc_box (res_len*2 + 1, DV_SHORT_STRING);
+        SHA512_Final ((unsigned char *) res, &ctx);
+        break;
+      }
+#endif
+    default:
+      sqlr_new_error ("42001", "SR646", "The function %.100s() is not supported in the OpenSSL library used in this Virtuoso build", fname);
+    }
+  res[res_len * 2] = '\0';
+  for (ctr = res_len; ctr--; /* no step */)
+    {
+      unsigned char c = res[ctr];
+      res[ctr * 2 + 1] = "0123456789abcdef"[c & 0xf];
+      res[ctr * 2] = "0123456789abcdef"[c >> 4];
+    }
+  if (arg_strg != arg)
+    dk_free_box (arg_strg);
+  return res;
+}
+
+caddr_t
+bif_rdf_MD5_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{ return bif_rdf_checksum_int (qst, args, SPAR_BIF_MD5, "rdf_md5_impl"); }
+
+caddr_t
+bif_rdf_SHA1_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{ return bif_rdf_checksum_int (qst, args, SPAR_BIF_SHA1, "rdf_sha1_impl"); }
+
+caddr_t
+bif_rdf_SHA224_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{ return bif_rdf_checksum_int (qst, args, SPAR_BIF_SHA224, "rdf_sha224_impl"); }
+
+caddr_t
+bif_rdf_SHA256_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{ return bif_rdf_checksum_int (qst, args, SPAR_BIF_SHA256, "rdf_sha256_impl"); }
+
+caddr_t
+bif_rdf_SHA384_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{ return bif_rdf_checksum_int (qst, args, SPAR_BIF_SHA384, "rdf_sha384_impl"); }
+
+caddr_t
+bif_rdf_SHA512_impl (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{ return bif_rdf_checksum_int (qst, args, SPAR_BIF_SHA512, "rdf_sha512_impl"); }
+
+void
+bif_sparql_init (void)
+{
+  bif_define ("rdf_abs_impl", bif_abs);
+  bif_define ("rdf_ceil_impl", bif_rdf_ceil_impl);
+  bif_define ("rdf_floor_impl", bif_rdf_floor_impl);
+  bif_define_typed ("rdf_rand_impl", bif_rdf_rand_impl, &bt_double);
+  bif_define ("rdf_round_impl", bif_rdf_round_impl);
+  bif_define_typed ("rdf_strlen_impl", bif_rdf_strlen_impl, &bt_integer);
+  bif_define_typed ("rdf_substr_impl", bif_rdf_substr_impl, &bt_string);
+  bif_define_typed ("rdf_ucase_impl", bif_rdf_ucase_impl, &bt_string);
+  bif_define_typed ("rdf_lcase_impl", bif_rdf_lcase_impl, &bt_string);
+  bif_define_typed ("rdf_strstarts_impl", bif_rdf_strstarts_impl, &bt_integer);
+  bif_define_typed ("rdf_strends_impl", bif_rdf_strends_impl, &bt_integer);
+  bif_define_typed ("rdf_contains_impl", bif_rdf_contains_impl, &bt_integer);
+  bif_define_typed ("rdf_encode_for_uri_impl", bif_rdf_encode_for_uri_impl, &bt_varchar);
+  bif_define_typed ("rdf_concat_impl", bif_rdf_concat_impl, &bt_varchar);
+  /* Functions rdf_now_impl() and rdf_year_impl() to rdf_minutes_impl() are in bif_date.c */
+  bif_define_typed ("rdf_seconds_impl", bif_rdf_seconds_impl, &bt_double);
+  bif_define_typed ("rdf_md5_impl", bif_rdf_MD5_impl, &bt_string);
+  bif_define_typed ("rdf_sha1_impl", bif_rdf_SHA1_impl, &bt_string);
+  bif_define_typed ("rdf_sha224_impl", bif_rdf_SHA224_impl, &bt_string);
+  bif_define_typed ("rdf_sha256_impl", bif_rdf_SHA256_impl, &bt_string);
+  bif_define_typed ("rdf_sha384_impl", bif_rdf_SHA384_impl, &bt_string);
+  bif_define_typed ("rdf_sha512_impl", bif_rdf_SHA512_impl, &bt_string);
+}
+
+
+extern caddr_t bif_search_excerpt (caddr_t *qst, caddr_t * err_ret, state_slot_t ** args);
+
 void
 sql_bif_init (void)
 {
@@ -14195,6 +14574,7 @@ sql_bif_init (void)
   bif_define_typed ("octet_length", bif_length, &bt_integer);
 
   bif_define_typed ("aref", bif_aref, &bt_any);
+  bif_define_typed ("aref_or_default", bif_aref_or_default, &bt_any);
   bif_define_typed ("aref_set_0", bif_aref_set_0, &bt_any);
   bif_define_typed ("aset", bif_aset, &bt_integer);
   bif_define_typed ("aset_zap_arg", bif_aset_zap_arg, &bt_integer);
@@ -14268,6 +14648,7 @@ sql_bif_init (void)
   bif_define_typed ("internal_type", bif_internal_type, &bt_integer);
   bif_define_typed ("isinteger", bif_isinteger, &bt_integer);
   bif_define_typed ("isnumeric", bif_isnumeric, &bt_integer);
+  bif_define_typed ("isfinitenumeric", bif_isfinitenumeric, &bt_integer);
   bif_define_typed ("isfloat", bif_isfloat, &bt_integer);
   bif_define_typed ("isdouble", bif_isdouble, &bt_integer);
   bif_define_typed ("isnull", bif_isnull, &bt_integer);
@@ -14275,6 +14656,7 @@ sql_bif_init (void)
   bif_define_typed ("isblob", bif_isblob_handle, &bt_integer);
   bif_define_typed ("isentity", bif_isentity, &bt_integer);
   bif_define_typed ("isstring", bif_isstring, &bt_integer);
+  bif_define_typed ("isstring_session", bif_isstring_session, &bt_integer);
   bif_define_typed ("isbinary", bif_isbinary, &bt_integer);
   bif_define_typed ("isarray", bif_isarray, &bt_integer);
   bif_define_typed ("isvector", bif_isvector, &bt_integer);
@@ -14417,6 +14799,8 @@ sql_bif_init (void)
   bif_define_typed ("sequence_next", bif_sequence_next, &bt_integer);
   bif_define_typed ("sequence_remove", bif_sequence_remove, &bt_integer);
   bif_define_typed ("__sequence_set", bif_sequence_set, &bt_integer);
+  if (cl_run_local_only == CL_RUN_LOCAL)
+    bif_define_typed ("sequence_set", bif_sequence_set, &bt_integer);
   bif_define_typed ("get_all_sequences", bif_sequence_get_all, &bt_any);
   bif_define_typed ("sequence_get_all", bif_sequence_get_all, &bt_any);
   bif_define_typed ("registry_get_all", bif_registry_get_all, &bt_any);
@@ -14480,6 +14864,7 @@ sql_bif_init (void)
   bif_define ("__drop_trigger", bif_drop_trigger);
   bif_define ("__drop_proc", bif_drop_proc);
   bif_define ("__proc_exists", bif_proc_exists);
+  bif_define ("__proc_params_num", bif_proc_params_num);
   bif_define_typed ("__copy", bif_copy, &bt_copy);
   bif_define_typed ("exec", bif_exec, &bt_integer);
   bif_define_typed ("exec_metadata", bif_exec_metadata, &bt_integer);
@@ -14549,6 +14934,7 @@ sql_bif_init (void)
   /* check byteorder/version in the log */
   bif_define ("byte_order_check", bif_byte_order_check);
   bif_define ("server_version_check", bif_server_version_check);
+  bif_define ("server_id_check", bif_server_id_check);
 
   /* bit operations for BPEL */
   bif_define ("bit_set", bif_bit_set);
@@ -14574,6 +14960,8 @@ sql_bif_init (void)
   bif_define ("__spfinv", bif_sprintf_inverse);
 
   sqlbif2_init ();
+  bif_sparql_init ();
+
 #ifdef BIF_PURIFY
   bif_purify_init ();
 #endif
diff --git a/libsrc/Wi/sqlbif.h b/libsrc/Wi/sqlbif.h
index 46a1d1a..828df78 100644
--- a/libsrc/Wi/sqlbif.h
+++ b/libsrc/Wi/sqlbif.h
@@ -1,14 +1,14 @@
 /*
  *  sqlbif.h
  *
- *  $Id: sqlbif.h,v 1.29.2.11 2011/01/11 13:18:43 source Exp $
+ *  $Id: sqlbif.h,v 1.29.2.15 2012/03/08 12:55:36 source Exp $
  *
  *  SQL Built In Functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -28,6 +28,8 @@
 #ifndef _SQLBIF_H
 #define _SQLBIF_H
 
+#include "sqlnode.h"
+
 typedef void (*bif_type_func_t) (state_slot_t ** args, long *dtp, long *prec,
     long *scale, caddr_t *collation);
 
@@ -147,7 +149,7 @@ extern sql_tree_tmp * st_varchar;
 extern sql_tree_tmp * st_nvarchar;
 
 int is_allowed (char * path);
-extern void file_path_assert (caddr_t fname_cvt, caddr_t *err_ret, int free_fname_cvt);
+EXE_EXPORT (void, file_path_assert, (caddr_t fname_cvt, caddr_t *err_ret, int free_fname_cvt));
 int mime_get_attr (char *szMessage, long Offset, char szDelim, int *rfc822mode,
     int *override_to_mime, char *_szName, int max_name, char *_szValue, int max_value);
 void dime_compose (dk_session_t * ses, caddr_t *input, caddr_t * err);
@@ -196,8 +198,10 @@ caddr_t box_hmac (caddr_t box, caddr_t key, int alg);
 #define HMAC_ALG_RIPMD160	1
 #endif
 
-int32 sqlbif_rnd (int32* seed);
-extern int32 rnd_seed_b;
+extern int32 sqlbif_rnd (int32* seed);
+extern double sqlbif_rnd_double (int32* seed, double upper_limit);
+extern int32 rnd_seed;		/*!< 32 bit seed */
+extern int32 rnd_seed_b;	/*!< another 32 bit seed used in blobs */
 
 int virtuoso_sleep (long secs, long tms);
 void sqls_define_2pc (void);
@@ -226,6 +230,7 @@ caddr_t os_get_uname_by_uid (long uid);
 caddr_t os_get_gname_by_gid (long gid);
 
 extern caddr_t file_native_name (caddr_t server_encoded_fname);
+extern caddr_t file_native_name_from_iri_path_nchars (const char *iri_path, size_t iri_path_len);
 caddr_t get_ssl_error_text (char *buf, int len);
 
 caddr_t regexp_match_01 (const char *pattern, const char *str, int c_opts);
diff --git a/libsrc/Wi/sqlbif2.c b/libsrc/Wi/sqlbif2.c
index c454aff..f174d83 100644
--- a/libsrc/Wi/sqlbif2.c
+++ b/libsrc/Wi/sqlbif2.c
@@ -1,14 +1,14 @@
 /*
  *  sqlbif2.c
  *
- *  $Id: sqlbif2.c,v 1.31.2.14 2010/12/09 09:53:13 source Exp $
+ *  $Id: sqlbif2.c,v 1.31.2.19 2012/03/15 11:08:26 source Exp $
  *
  *  SQL Built In Functions. Part 2
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -716,6 +716,9 @@ bif_client_attr (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       else
 	return NULL;
 
+      if (!cert)
+	return NULL;
+
       in = BIO_new (BIO_s_mem());
 
       if (!in)
@@ -1136,12 +1139,12 @@ rfc1808_expand_uri (/*query_instance_t *qi,*/ ccaddr_t base_uri, ccaddr_t rel_ur
     }
   if ((base_cs != buffer_cs_upcase) && !((NULL != base_cs) && (NULL != buffer_cs_upcase) && !strcmp (base_cs, buffer_cs_upcase)))
     {
-      base_uri = charset_recode_from_named_to_named ((caddr_t)base_uri, base_cs, buffer_cs_upcase, &base_uri_is_temp, err_ret);
+      base_uri = charset_recode_from_named_to_named ((query_instance_t *)NULL, (caddr_t)base_uri, base_cs, buffer_cs_upcase, &base_uri_is_temp, err_ret);
       if (err_ret[0]) goto res_complete; /* see below */
     }
   if ((rel_cs != buffer_cs_upcase) && !((NULL != rel_cs) && (NULL != buffer_cs_upcase) && !strcmp (rel_cs, buffer_cs_upcase)))
     {
-      rel_uri = charset_recode_from_named_to_named ((caddr_t)rel_uri, rel_cs, buffer_cs_upcase, &rel_uri_is_temp, err_ret);
+      rel_uri = charset_recode_from_named_to_named ((query_instance_t *)NULL, (caddr_t)rel_uri, rel_cs, buffer_cs_upcase, &rel_uri_is_temp, err_ret);
       if (err_ret[0]) goto res_complete; /* see below */
     }
   if ((NULL == base_uri) || ('\0' == base_uri[0]))
@@ -1347,7 +1350,7 @@ buffer_ready:
     ((NULL == buffer_cs_upcase) || (NULL == output_cs_upcase) || strcmp(buffer_cs_upcase, output_cs_upcase)) )
     {
       caddr_t boxed_buffer = box_dv_short_nchars (buffer, buf_tail - buffer);
-      res = charset_recode_from_named_to_named (boxed_buffer, buffer_cs_upcase, output_cs_upcase, &res_is_new, err_ret);
+      res = charset_recode_from_named_to_named ((query_instance_t *)NULL, boxed_buffer, buffer_cs_upcase, output_cs_upcase, &res_is_new, err_ret);
       if (res_is_new)
         dk_free_box (boxed_buffer);
       else
@@ -1371,6 +1374,8 @@ buffer_ready:
     }
 
 res_complete:
+  if (!res_is_new)
+    res = box_copy (res);
   dk_free_box (output_cs_upcase);
   if (base_uri_is_temp)
     dk_free_box ((caddr_t) base_uri);
@@ -1601,7 +1606,11 @@ bif_this_server (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   return NEW_DB_NULL;
 }
-
+static caddr_t
+bif_is_geometry (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return box_num (0);
+}
 
 void
 sqlbif2_init (void)
@@ -1633,6 +1642,7 @@ sqlbif2_init (void)
   bif_define_typed ("format_number", bif_format_number, &bt_varchar);
   bif_define ("__stop_cpt", bif_stop_cpt);
   bif_define ("repl_this_server", bif_this_server);
+  bif_define ("isgeometry", bif_is_geometry);
   /*sqls_bif_init ();*/
   sqls_bif_init ();
   sqlo_inv_bif_int ();
diff --git a/libsrc/Wi/sqlcmps.h b/libsrc/Wi/sqlcmps.h
index 7f14c1e..5880bb5 100644
--- a/libsrc/Wi/sqlcmps.h
+++ b/libsrc/Wi/sqlcmps.h
@@ -1,14 +1,14 @@
 /*
  *  sqlcmps.h
  *
- *  $Id: sqlcmps.h,v 1.14.2.11 2010/11/15 16:51:56 source Exp $
+ *  $Id: sqlcmps.h,v 1.14.2.12 2012/03/08 12:55:36 source Exp $
  *
  *  SQL Compiler Data Structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlcomp.c b/libsrc/Wi/sqlcomp.c
index 4ccfee5..c4909a7 100644
--- a/libsrc/Wi/sqlcomp.c
+++ b/libsrc/Wi/sqlcomp.c
@@ -1,14 +1,14 @@
 /*
  *  sqlcomp.c
  *
- *  $Id: sqlcomp.c,v 1.7.2.7 2010/02/18 10:57:16 source Exp $
+ *  $Id: sqlcomp.c,v 1.7.2.8 2012/03/08 12:55:36 source Exp $
  *
  *  Dynamic SQL Compiler
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlcomp.h b/libsrc/Wi/sqlcomp.h
index f263faa..2f3885a 100644
--- a/libsrc/Wi/sqlcomp.h
+++ b/libsrc/Wi/sqlcomp.h
@@ -1,14 +1,14 @@
 /*
  *  sqlcomp.h
  *
- *  $Id: sqlcomp.h,v 1.4.2.1 2009/04/18 21:55:15 source Exp $
+ *  $Id: sqlcomp.h,v 1.4.2.2 2012/03/08 12:55:36 source Exp $
  *
  *  SQL Query Description
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlcomp2.c b/libsrc/Wi/sqlcomp2.c
index 67d210c..e88e1cb 100644
--- a/libsrc/Wi/sqlcomp2.c
+++ b/libsrc/Wi/sqlcomp2.c
@@ -1,14 +1,14 @@
 /*
  *  sqlcomp2.c
  *
- *  $Id: sqlcomp2.c,v 1.21.2.9 2010/10/29 14:12:27 source Exp $
+ *  $Id: sqlcomp2.c,v 1.21.2.12 2012/03/08 12:55:36 source Exp $
  *
  *  Dynamic SQL Compiler, part 2
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -652,6 +652,7 @@ yy_new_error (const char *s, const char *state, const char *native)
   int is_semi;
   int this_lineno = scn3_lineno;
   char buf_for_next [2000];
+  scn3_include_fragment_t *outer;
   if (scn3_inside_error_reporter)
     goto jmp; /* see below */
   nlen = scn3_sprint_curr_line_loc (sql_err_text, sizeof (sql_err_text));
@@ -691,6 +692,12 @@ yy_new_error (const char *s, const char *state, const char *native)
   sql_err_text [sizeof (sql_err_text)-1] = '\0';
 
 jmp:
+  outer = scn3_include_stack + scn3_include_depth;
+  if (outer->_.sif_skipped_part)
+    {
+      dk_free_box (outer->_.sif_skipped_part);
+      outer->_.sif_skipped_part = NULL;
+    }
   longjmp_splice (&parse_reset, 1);
 }
 
@@ -1458,8 +1465,11 @@ DBG_NAME(sql_compile_1) (DBG_PARAMS const char *string2, client_connection_t * c
 	is_ddl = sql_is_ddl (tree);
       if (!is_ddl)
 	{
-	  semaphore_leave (parse_sem);
-	  inside_sem = 0;
+          if (inside_sem)
+            {
+              semaphore_leave (parse_sem);
+              inside_sem = 0;
+            }
 	}
       else
 	sqlc_inside_sem = 1;
@@ -1708,7 +1718,18 @@ dbg_sql_compile_static (const char *file, int line, const char *string2, client_
 	     caddr_t * err, volatile int cr_type)
 {
   caddr_t my_err = NULL;
-  query_t *qr = DBG_NAME(sql_compile_1) (DBG_ARGS string2, cli, &my_err, cr_type, NULL, NULL);
+  query_t *qr = NULL;
+  sql_tree_t *tree = NULL;
+  if (SQLC_STATIC_PRESERVES_TREE == cr_type)
+    {
+      int cr_tree_type = ((NULL != parse_sem) && parse_sem->sem_entry_count) ? SQLC_PARSE_ONLY_REC : SQLC_PARSE_ONLY;
+      tree = (sql_tree_t *)DBG_NAME(sql_compile_1) (DBG_ARGS string2, cli, err, cr_tree_type, NULL, NULL);
+      if (NULL != err[0])
+        return NULL;
+      cr_type = SQLC_DEFAULT;
+    }
+  qr = DBG_NAME(sql_compile_1) (DBG_ARGS string2, cli, err, cr_type, tree, NULL);
+  dk_free_tree ((caddr_t *)tree);
   if (NULL != err)
     err[0] = my_err;
   if (NULL == qr)
@@ -1798,7 +1819,18 @@ query_t *
 sql_compile_static (const char *string2, client_connection_t * cli,
 	     caddr_t * err, volatile int cr_type)
 {
-  query_t *qr = DBG_NAME(sql_compile_1) (DBG_ARGS string2, cli, err, cr_type, NULL, NULL);
+  query_t *qr = NULL;
+  sql_tree_t *tree = NULL;
+  if (SQLC_STATIC_PRESERVES_TREE == cr_type)
+    {
+      int cr_tree_type = ((NULL != parse_sem) && parse_sem->sem_entry_count) ? SQLC_PARSE_ONLY_REC : SQLC_PARSE_ONLY;
+      tree = (sql_tree_t *)DBG_NAME(sql_compile_1) (DBG_ARGS string2, cli, err, cr_tree_type, NULL, NULL);
+      if (NULL != err[0])
+        return NULL;
+      cr_type = SQLC_DEFAULT;
+    }
+  qr = DBG_NAME(sql_compile_1) (DBG_ARGS string2, cli, err, cr_type, tree, NULL);
+  dk_free_tree ((caddr_t *)tree);
   return qr;
 }
 #endif
diff --git a/libsrc/Wi/sqlcost.c b/libsrc/Wi/sqlcost.c
index 7127eb6..25358a5 100644
--- a/libsrc/Wi/sqlcost.c
+++ b/libsrc/Wi/sqlcost.c
@@ -1,14 +1,14 @@
 /*
  *  sqlcost.c
  *
- *  $Id: sqlcost.c,v 1.30.2.30 2011/03/03 11:56:44 source Exp $
+ *  $Id: sqlcost.c,v 1.30.2.39 2012/03/08 12:55:36 source Exp $
  *
  *  sql cost functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -362,6 +362,12 @@ sqlo_pred_unit (df_elt_t * lower, df_elt_t * upper, float * u1, float * a1)
 		}
 	      END_DO_BOX;
 	    }
+	  else if (lower->_.bin.right->dfe_type == DFE_CALL &&
+	      lower->_.bin.right->_.call.func_name && 
+	      0 == stricmp (lower->_.bin.right->_.call.func_name, "min_bnode_iri_id"))
+	    {
+	      *a1 = 1;
+	    }
 	}
       else if (lower->_.bin.op == BOP_LIKE)
 	{
@@ -1196,7 +1202,7 @@ dfe_const_to_spec (df_elt_t * lower, df_elt_t * upper, dbe_key_t * key,
     }
   else
     {
-      sp->sp_min_op = bop_to_dvc (lower->_.bin.op);
+      sp->sp_min_op = in_list ? CMP_EQ : bop_to_dvc (lower->_.bin.op);
       sp->sp_max_op = bop_to_dvc (upper->_.bin.op);
       res = dfe_const_rhs (sp, upper, itc, v_fill);
 	  sp->sp_max = *v_fill - 1;
@@ -1221,6 +1227,13 @@ itc_sample_cache_key (it_cursor_t * itc)
       if (CMP_NONE != sp->sp_max_op)
 	conds = (conds << 3) | sp->sp_max_op;
     }
+  /* do same for itc->itc_row_specs */
+  for (sp = itc->itc_row_specs; sp; sp = sp->sp_next)
+    {
+      conds= (conds << 3) | sp->sp_min_op;
+      if (CMP_NONE != sp->sp_max_op)
+	conds = (conds << 3) | sp->sp_max_op;
+    }
   box[1] = box_num (conds);
   for (inx = 0; inx < itc->itc_search_par_fill; inx++)
     box[inx + 2] = box_copy_tree (itc->itc_search_params[inx]);
@@ -1244,17 +1257,22 @@ extern rdf_inf_ctx_t * empty_ric;
 #define SMPL_QUEUE 1
 #define SMPL_RESULT 2
 
+int32 sqlo_sample_dep_cols = 0;
+search_spec_t * dfe_to_spec (df_elt_t * lower, df_elt_t * upper, dbe_key_t * key);
+
 int64
-sqlo_inx_sample_1 (dbe_key_t * key, df_elt_t ** lowers, df_elt_t ** uppers, int n_parts, sample_opt_t * sop)
+sqlo_inx_sample_1 (df_elt_t * tb_dfe, dbe_key_t * key, df_elt_t ** lowers, df_elt_t ** uppers, int n_parts,
+    sample_opt_t * sop, index_choice_t * ic)
 {
   sqlo_t * so = NULL;
   caddr_t sc_key = NULL, num, *place;
   int64 res, tb_count;
   it_cursor_t itc_auto;
   it_cursor_t * itc = &itc_auto;
-  search_spec_t specs[10];
+  search_spec_t specs[10], row_specs[10];
   int v_fill = 0, inx;
   search_spec_t ** prev_sp;
+  dk_set_t added_cols = NULL;
   if (sop)
     sop->sop_res_from_ric_cache = 0;
   ITC_INIT (itc, key->key_fragments[0]->kf_it, NULL);
@@ -1276,8 +1294,36 @@ sqlo_inx_sample_1 (dbe_key_t * key, df_elt_t ** lowers, df_elt_t ** uppers, int
       if (!so)
 	so = lowers[inx] ? lowers[inx]->dfe_sqlo : uppers[inx]->dfe_sqlo;
       *prev_sp = &specs[inx];
+      t_set_push (&added_cols, (void *) (*prev_sp)->sp_col);
       prev_sp = &specs[inx].sp_next;
     }
+  if (sqlo_sample_dep_cols)
+    {
+      /* make row specs */
+      memset (&row_specs, 0, sizeof (row_specs));
+      prev_sp = &itc->itc_row_specs;
+      inx = 0;
+      ic->ic_inx_sample_cols = NULL;
+      DO_SET (df_elt_t *, cp, &tb_dfe->_.table.col_preds)
+	{
+	  if (cp->dfe_type != DFE_TEXT_PRED && !sqlo_in_list (cp, NULL, NULL) &&
+	      dk_set_member (key->key_parts, (void *) cp->_.bin.left->_.col.col) &&
+	      !dk_set_member (added_cols, (void *) cp->_.bin.left->_.col.col))
+	    {
+	      if (key->key_bit_cl && key->key_bit_cl->cl_col_id == cp->_.bin.left->_.col.col->col_id)
+		continue;
+	      res = dfe_const_to_spec (cp, NULL, key, &row_specs[inx], itc, &v_fill);
+	      if (KS_CAST_OK != res)
+		continue;
+	      *prev_sp = &row_specs[inx];
+	      prev_sp = &row_specs[inx].sp_next;
+	      /* push into a set inside ic so we know to exclude when calculate cost */
+	      t_set_push (&ic->ic_inx_sample_cols, cp);
+	      inx ++;
+	    }
+	}
+      END_DO_SET ();
+    }
   sc_key = itc_sample_cache_key (itc);
   if (sop && sop->sop_sc_key_ret)
     *sop->sop_sc_key_ret = box_copy_tree (sc_key);
@@ -1323,6 +1369,8 @@ sqlo_inx_sample_1 (dbe_key_t * key, df_elt_t ** lowers, df_elt_t ** uppers, int
   return res;
 }
 
+int32 ric_samples_sz = 10000;
+int32 ric_rnd_seed;
 
 void
 ric_set_sample (rdf_inf_ctx_t * ctx, caddr_t sc_key, int64 est)
@@ -1332,6 +1380,16 @@ ric_set_sample (rdf_inf_ctx_t * ctx, caddr_t sc_key, int64 est)
   tc.tc_estimate = est;
   tc.tc_time = approx_msec_real_time ();
   mutex_enter (ctx->ric_mtx);
+  if (ctx->ric_samples->ht_count > ric_samples_sz)
+    {
+      caddr_t key = NULL;
+      text_count_t old_tc;
+      int32 rnd  = sqlbif_rnd (&ric_rnd_seed);
+      if (id_hash_remove_rnd (ctx->ric_samples, rnd, (caddr_t)&key, (caddr_t)&old_tc))
+	{
+	  dk_free_tree (key);
+	}
+    }
   id_hash_set (ctx->ric_samples, (caddr_t)&sc_key, (caddr_t)&tc);
   mutex_leave (ctx->ric_mtx);
 }
@@ -1360,7 +1418,7 @@ ri_iterator_t * rit = ri_iterator (sub, ic->ic_inf_type, 1);
   while ((sub_iri = rit_next (rit)))
     {
       *variable = sub_iri->rs_iri;
-      s = sqlo_inx_sample_1 (key, lowers, uppers, n_parts, &sop);
+      s = sqlo_inx_sample_1 (tb_dfe, key, lowers, uppers, n_parts, &sop, ic);
       if (s >= 0)
 	{
 	  est += s;
@@ -1389,7 +1447,7 @@ ri_iterator_t * rit = ri_iterator (sub, ic->ic_inf_type, 1);
   if (sop.sop_is_cl)
     {
       sop.sop_is_cl = SMPL_RESULT;
-      s = sqlo_inx_sample_1 (key, lowers, uppers, n_parts, &sop);
+      s = sqlo_inx_sample_1 (tb_dfe, key, lowers, uppers, n_parts, &sop, ic);
       if (s >= 0)
 	{
 	  est += s;
@@ -1586,7 +1644,7 @@ sqlo_inx_sample (df_elt_t * tb_dfe, dbe_key_t * key, df_elt_t ** lowers, df_elt_
 	  memset (&sop, 0, sizeof (sop));
 	  sop.sop_ric = empty_ric;
 	  sop.sop_sc_key_ret = &sc_key;
-	  c = sqlo_inx_sample_1 (key, lowers, uppers, n_parts, &sop);
+	  c = sqlo_inx_sample_1 (tb_dfe, key, lowers, uppers, n_parts, &sop, ic);
 	  if (!sop.sop_res_from_ric_cache && c > 1000)
 	    {
 	      ric_set_sample (empty_ric, sc_key, c);
@@ -1631,7 +1689,7 @@ sqlo_inx_sample (df_elt_t * tb_dfe, dbe_key_t * key, df_elt_t ** lowers, df_elt_
       dk_free_box (o_const);
     }
   ic->ic_n_lookups = 1;
-  return sqlo_inx_sample_1 (key, lowers, uppers, n_parts, NULL);
+  return sqlo_inx_sample_1 (tb_dfe, key, lowers, uppers, n_parts, NULL, ic);
 }
 
 
@@ -1722,7 +1780,7 @@ sqlo_inx_intersect_cost (df_elt_t * tb_dfe, dk_set_t col_preds, dk_set_t group,
 }
 
 
-extern int enable_p_stat;
+extern int32 enable_p_stat;
 
 caddr_t
 sqlo_const_iri (sqlo_t * so, df_elt_t * dfe)
@@ -1788,7 +1846,6 @@ sqlo_use_p_stat (df_elt_t * dfe, df_elt_t ** lowers, int inx_const_fill, int64 e
   caddr_t p;
   float * place;
   dbe_key_t * key = dfe->_.table.key;
-  dbe_column_t * g_col;
   df_elt_t * so_dfe, * g_dfe;
   if (!enable_p_stat || 1 != inx_const_fill)
     return 0;
@@ -1974,6 +2031,7 @@ dfe_table_cost_ic_1 (df_elt_t * dfe, index_choice_t * ic, int inx_only)
 	    }
 	  else
 	    {
+	      /* here we should check if row spec was used to take samples */
 	      col_arity *= p_arity;
 	      col_cost += p_cost * col_arity;
 	    }
@@ -2069,7 +2127,9 @@ dfe_table_cost_ic_1 (df_elt_t * dfe, index_choice_t * ic, int inx_only)
 	  if (DFE_TEXT_PRED == pred->dfe_type)
 	    continue;
 	  left_col = in_list ? in_list[0]->_.col.col : DFE_COLUMN == pred->_.bin.left->dfe_type ? pred->_.bin.left->_.col.col : NULL;
-	  if (DFE_BOP_PRED == pred->dfe_type && !dk_set_member (key->key_parts, (void*) left_col))
+	  if (DFE_BOP_PRED == pred->dfe_type &&
+	      !dk_set_member (key->key_parts, (void*) left_col) &&
+	      !dk_set_member (ic->ic_inx_sample_cols, (void*) left_col))
 	    {
 	      sqlo_pred_unit (pred, NULL, &p_cost, &p_arity);
 	      total_arity *= p_arity;
@@ -2150,6 +2210,7 @@ dfe_table_cost_ic (df_elt_t * dfe, index_choice_t * ic, int inx_only)
       index_choice_t in_ic;
       memset (&in_ic, 0, sizeof (in_ic));
       SET_THR_ATTR (thr, TA_NTH_IN_ITEM, (caddr_t) (ptrlong) inx);
+      dfe->dfe_unit = 0;
       dfe_table_cost_ic_1 (dfe, &in_ic, inx_only);
       ic->ic_unit += in_ic.ic_unit;
       ic->ic_arity += in_ic.ic_arity;
diff --git a/libsrc/Wi/sqlcr.c b/libsrc/Wi/sqlcr.c
index 75d1e30..9ca9d39 100644
--- a/libsrc/Wi/sqlcr.c
+++ b/libsrc/Wi/sqlcr.c
@@ -1,14 +1,14 @@
 /*
  *  sqlstmts.c
  *
- *  $Id: sqlcr.c,v 1.7.2.4 2010/11/15 16:51:56 source Exp $
+ *  $Id: sqlcr.c,v 1.7.2.5 2012/03/08 12:55:36 source Exp $
  *
  *  Dynamic SQL Statement Compilations
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlcstate.h b/libsrc/Wi/sqlcstate.h
index a8b43c0..0de8365 100644
--- a/libsrc/Wi/sqlcstate.h
+++ b/libsrc/Wi/sqlcstate.h
@@ -1,12 +1,12 @@
 /*
  *  sqlcstate.h
  *
- *  $Id: sqlcstate.h,v 1.4.2.2 2009/04/18 21:55:15 source Exp $
+ *  $Id: sqlcstate.h,v 1.4.2.3 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqldf.c b/libsrc/Wi/sqldf.c
index 0d528c7..cc772be 100644
--- a/libsrc/Wi/sqldf.c
+++ b/libsrc/Wi/sqldf.c
@@ -1,14 +1,14 @@
 /*
  *  sqldf.c
  *
- *  $Id: sqldf.c,v 1.60.2.27 2011/02/14 11:48:50 source Exp $
+ *  $Id: sqldf.c,v 1.60.2.35 2012/03/13 11:46:13 source Exp $
  *
  *  sql expression dependencies and code layout
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -424,7 +424,8 @@ sqlo_const_cond (sqlo_t * so, df_elt_t * dfe)
 	  if (DFE_COLUMN == op->dfe_type)
 	    {
 	      op_table_t * defd = (op_table_t *) op->dfe_tables->data;
-	      if (defd->ot_table && !defd->ot_is_outer && op->_.col.col && op->_.col.col->col_sqt.sqt_non_null)
+	      remote_table_t * rt = defd->ot_table ? find_remote_table (defd->ot_table->tb_name, 0) : NULL;
+	      if (defd->ot_table && !defd->ot_is_outer && op->_.col.col && op->_.col.col->col_sqt.sqt_non_null && !rt)
 		return DFE_FALSE;
 	    }
 	  return dfe;
@@ -1088,7 +1089,7 @@ sqlo_dt_nth_col (sqlo_t * so, df_elt_t * super, df_elt_t * dt_dfe, int inx, df_e
 	    {
 	      if (!col_dfe->_.col.card)
 		sqlo_dt_col_card (so, col_dfe, exp);
-	    sqt_max_desc (&col_dfe->dfe_sqt, &exp->dfe_sqt);
+	      sqt_max_desc (&col_dfe->dfe_sqt, &exp->dfe_sqt);
 	    }
 	  col_dfe->dfe_locus = dt_dfe->dfe_locus;
 	  col_alias = ((ST**)(dt_dfe->_.sub.ot->ot_left_sel->_.select_stmt.selection))[inx]->_.as_exp.name;
@@ -1112,7 +1113,7 @@ sqlo_dt_nth_col (sqlo_t * so, df_elt_t * super, df_elt_t * dt_dfe, int inx, df_e
 	  if (exp)
 	    {
 	      sqlo_dt_col_card (so, col_dfe, exp);
-	    sqt_max_desc (&col_dfe->dfe_sqt, &exp->dfe_sqt);
+	      sqt_max_desc (&col_dfe->dfe_sqt, &exp->dfe_sqt);
 	    }
 	  if (so->so_place_code_forr_cond)
 	    sqlo_post_oby_ref (so, dt_dfe, exp, inx);
@@ -1147,7 +1148,7 @@ void
 dfe_loc_result (locus_t * loc_from, df_elt_t * requiring, df_elt_t * required)
 {
   if (!IS_BOX_POINTER (loc_from)
-      || requiring->dfe_locus == required->dfe_locus
+      || (requiring->dfe_locus == required->dfe_locus && required->dfe_type != DFE_CALL) /* can happen it's a standard function in same scope but result required */
       || required->dfe_type == DFE_CONST)
     return;
   {
@@ -1666,6 +1667,32 @@ sqlo_place_control_cols (sqlo_t * so, df_elt_t * super, ST * tree)
     }
 }
 
+int
+sqlo_is_const_call (ST * tree)
+{
+  if (!ARRAYP (tree))
+    return 1;
+  switch (tree->type)
+    {
+      case CALL_STMT:
+	    {
+	      caddr_t * pars = (caddr_t *) tree->_.call.params;
+	      int inx;
+	      DO_BOX (ST *, exp, inx, pars)
+		{
+		  if (!stricmp (tree->_.call.name, "_cvt") && !inx)
+		    continue;
+		  if (!sqlo_is_const_call (exp))
+		    return 0;
+		}
+	      END_DO_BOX;
+	      return 1;
+	    }
+      default:
+	  return 0;
+    }
+  return 1;
+}
 
 int
 sqlo_is_dt_state_func (char * name)
@@ -1875,6 +1902,8 @@ sqlo_place_exp (sqlo_t * so, df_elt_t * super, df_elt_t * dfe)
 	  { /* if this is a remote virtuoso do not pass through scalar functions on proc vars */
 	    pref_loc = LOC_LOCAL;
 	  }
+	if (sqlo_is_const_call (dfe->dfe_tree)) /* call with constant, do it locally and pass as parameter */
+	  pref_loc = LOC_LOCAL;
 
 	if (sqlo_is_dt_state_func (dfe->dfe_tree->_.call.name))
 	  {
@@ -3274,7 +3303,7 @@ is_call_only_dep_on (df_elt_t * dfe, op_table_t * ot, int skip_first_n)
       if (!ST_COLUMN (args[argctr], COL_DOTTED))
 	return 0;
     }
-  return  1;
+  return 1;
 }
 
 void
@@ -3414,12 +3443,12 @@ sqlo_col_inverse  (sqlo_t *so, df_elt_t * tb_dfe, df_elt_t * pred, dk_set_t * co
   if (ST_P (pred->_.bin.left->dfe_tree, CALL_STMT))
     {
       if (sqlo_col_inverse_eq_1 (so, tb_dfe, pred->_.bin.left, pred->_.bin.right, col_preds, after_preds))
-      return 1;
+        return 1;
     }
   if (ST_P (pred->_.bin.right->dfe_tree, CALL_STMT))
     {
       if (sqlo_col_inverse_eq_1 (so, tb_dfe, pred->_.bin.right, pred->_.bin.left, col_preds, after_preds))
-      return 1;
+        return 1;
     }
   return 0;
 }
@@ -5293,7 +5322,7 @@ dfe_suitable_for_next (df_elt_t * dfe, df_elt_t * must_be_next)
 
 
 df_elt_t *
-sqlo_next_joined (df_elt_t * dt_dfe)
+sqlo_next_joined (sqlo_t * so, df_elt_t * dt_dfe)
 {
   /* if there is an outer that must come at this point, return it */
   op_table_t * ot = dt_dfe->_.sub.ot;
@@ -5303,7 +5332,6 @@ sqlo_next_joined (df_elt_t * dt_dfe)
     {
       if (DFE_TABLE == placed->dfe_type || DFE_DT == placed->dfe_type)
 	last = placed;
-
     }
   for (from = ot->ot_from_dfes; from && from->next; from = from->next)
     {
@@ -5313,7 +5341,17 @@ sqlo_next_joined (df_elt_t * dt_dfe)
 	  int next_outer = dfe_is_join (next_from);
 	  remote_table_t * rt = DFE_TABLE == next_from->dfe_type ? find_remote_table (next_from->_.table.ot->ot_table->tb_name, 0) : NULL ;
 	  if (!next_from->dfe_is_placed && next_outer && rt)
-	    return next_from;
+	    {
+	      df_elt_t * preds = sqlo_df_elt (so, next_from->_.table.ot->ot_join_cond);
+	      char old = next_from->dfe_is_placed;
+	      next_from->dfe_is_placed = DFE_PLACED;
+	      if (preds && dfe_reqd_placed (preds))
+		{
+		  next_from->dfe_is_placed = old;
+		  return next_from;
+		}
+	      next_from->dfe_is_placed = old;
+	    }
 	}
     }
   return NULL;
@@ -5793,7 +5831,7 @@ sqlo_layout_1 (sqlo_t * so, op_table_t * ot, int is_top)
   dk_set_t sort_set = NULL, new_leaves = NULL;
   float this_score;
   int any_tried = 0;
-  must_be_next = sqlo_next_joined (ot->ot_work_dfe);
+  must_be_next = sqlo_next_joined (so, ot->ot_work_dfe);
   if (THR_IS_STACK_OVERFLOW (THREAD_CURRENT_THREAD, &any_tried, 8000))
     sqlc_error (so->so_sc->sc_cc, "42000", "Stack Overflow");
   if (DK_MEM_RESERVE)
@@ -5969,12 +6007,15 @@ sqlo_layout_1 (sqlo_t * so, op_table_t * ot, int is_top)
 	    }
 	}
       /* GK: all the predicates should be placed by now */
-      DO_SET (df_elt_t *, pred, &so->so_this_dt->ot_preds)
+      if (so->so_this_dt->ot_from_dfes)
 	{
-	  if (!pred->dfe_is_placed)
-	    SQL_GPF_T1 (so->so_sc->sc_cc, "Unplaced predicate in select layout");
+	  DO_SET (df_elt_t *, pred, &so->so_this_dt->ot_preds)
+	    {
+	      if (!pred->dfe_is_placed)
+		SQL_GPF_T1 (so->so_sc->sc_cc, "Unplaced predicate in select layout");
+	    }
+	  END_DO_SET ();
 	}
-      END_DO_SET ();
 
       sqlo_n_full_layouts++;
       this_score = sqlo_score (ot->ot_work_dfe, ot->ot_work_dfe->_.sub.in_arity);
diff --git a/libsrc/Wi/sqlexp.c b/libsrc/Wi/sqlexp.c
index c45ad1d..b9894cb 100644
--- a/libsrc/Wi/sqlexp.c
+++ b/libsrc/Wi/sqlexp.c
@@ -1,14 +1,14 @@
 /*
  *  sqlexp.c
  *
- *  $Id: sqlexp.c,v 1.16.2.23 2011/02/15 14:45:35 source Exp $
+ *  $Id: sqlexp.c,v 1.16.2.27 2012/03/08 12:55:36 source Exp $
  *
  *  Dynamic SQL Expression Generator
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -236,11 +236,13 @@ sqlc_call_exp (sql_comp_t * sc, dk_set_t * code, state_slot_t * ret, ST * tree)
       return;
     }
   if ((sqlc_trans_funcs (sc, tree, ret)))
-    return;
-  if ((func_len > 10) && !stricmp (func + (func_len - 10), " (w/cache)") && (n_params > 0))
+    return;                                            /* 0123456789 */
+  if ((func_len > 9) && !stricmp (func + (func_len - 9), "__w_cache") && (n_params >= 1))
     {
-      state_slot_t *cache = ssl_new_inst_variable (sc->sc_cc, "cache", DV_ARRAY_OF_POINTER);
-      ((ptrlong *)(act_params[n_params - 1]))[0] = cache->ssl_index;
+      ST ** new_pars = (ST **) t_full_box_copy_tree ((caddr_t)act_params); /* we do a copy in order to keep dfe_tree as is, otherwise we may not find it in a next step as hash on tree changes */
+      state_slot_t *aux_ssl = ssl_new_inst_variable (sc->sc_cc, "cache", DV_ARRAY_OF_POINTER);
+      ((ptrlong *)(new_pars[n_params - 1]))[0] = aux_ssl->ssl_index;
+      act_params = new_pars;
     }
   if (ret_param)
     params = (state_slot_t **) t_alloc_box ((n_params + 1) * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
@@ -1382,9 +1384,12 @@ pred_gen_1 (sql_comp_t * sc, ST * tree, dk_set_t * code, int succ, int fail, int
   if (ST_P (tree, BOP_AND))
     {
       jmp_label_t temp_succ = sqlc_new_label (sc);
-      pred_gen_1 (sc, tree->_.bin_exp.left, code, temp_succ, fail, unkn);
+      jmp_label_t temp_unkn = sqlc_new_label (sc);
+      pred_gen_1 (sc, tree->_.bin_exp.left, code, temp_succ, fail, temp_unkn);
       cv_label (code, temp_succ);
       pred_gen_1 (sc, tree->_.bin_exp.right, code, succ, fail, unkn);
+      cv_label (code, temp_unkn);
+      pred_gen_1 (sc, tree->_.bin_exp.right, code, unkn, fail, unkn);
       return;
     }
   if (BIN_EXP_P (tree))
diff --git a/libsrc/Wi/sqlfn.h b/libsrc/Wi/sqlfn.h
index 70545d8..9c270cc 100644
--- a/libsrc/Wi/sqlfn.h
+++ b/libsrc/Wi/sqlfn.h
@@ -1,12 +1,12 @@
 /*
  *  sqlfn.h
  *
- *  $Id: sqlfn.h,v 1.46.2.13 2011/02/15 10:11:40 source Exp $
+ *  $Id: sqlfn.h,v 1.46.2.17 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -210,10 +210,7 @@ caddr_t qi_bunion_reset (query_instance_t * qi, query_t * qr, int is_subq);
 
 
 
-caddr_t qr_exec (client_connection_t * cli, query_t * qr,
-    query_instance_t * caller, caddr_t cr_name, srv_stmt_t * stmt,
-    local_cursor_t ** ret, caddr_t * parms, stmt_options_t * opts,
-    int named_params);
+EXE_EXPORT (caddr_t, qr_exec, (client_connection_t * cli, query_t * qr, query_instance_t * caller, caddr_t cr_name, srv_stmt_t * stmt, local_cursor_t ** ret, caddr_t * parms, stmt_options_t * opts, int named_params));
 
 caddr_t qr_dml_array_exec (client_connection_t * cli, query_t * qr,
 			   query_instance_t * caller, caddr_t cr_name, srv_stmt_t * stmt,
@@ -1004,7 +1001,7 @@ caddr_t  sf_make_new_log_name(dbe_storage_t * dbs);
 
 dk_set_t srv_get_logons (void);
 
-srv_stmt_t * cli_get_stmt_access (client_connection_t * cli, caddr_t id, int mode);
+srv_stmt_t * cli_get_stmt_access (client_connection_t * cli, caddr_t id, int mode, caddr_t * err_ret);
 caddr_t stmt_set_query (srv_stmt_t * stmt, client_connection_t * cli, caddr_t text,
 		stmt_options_t * opts);
 query_t * cli_cached_sql_compile (caddr_t query_text, client_connection_t *cli,
@@ -1290,5 +1287,6 @@ void itc_assert_no_reg (it_cursor_t * itc);
 #endif
 
 caddr_t * itc_bm_array (it_cursor_t * itc, buffer_desc_t * buf);
+extern int32 log_proc_overwrite;
 
 #endif /* _SQLFN_H */
diff --git a/libsrc/Wi/sqlgen.c b/libsrc/Wi/sqlgen.c
index 1ddbc23..ec38f83 100644
--- a/libsrc/Wi/sqlgen.c
+++ b/libsrc/Wi/sqlgen.c
@@ -1,14 +1,14 @@
 /*
  *  sqlgen.c
  *
- *  $Id: sqlgen.c,v 1.39.2.26 2011/03/11 18:26:43 source Exp $
+ *  $Id: sqlgen.c,v 1.39.2.31 2012/03/13 11:48:57 source Exp $
  *
  *  sql executable graph generation
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -121,6 +121,13 @@ sqlg_dfe_ssl (sqlo_t * so, df_elt_t * dfe)
 
 	  memset (args, 0, box_length (args));
 	  memset (&dummy_arg, 0, sizeof (state_slot_t));
+	  if (!strcmp (dfe->dfe_tree->_.call.name, "_cvt") && ARRAYP (dfe->dfe_tree->_.call.params) &&
+	      BOX_ELEMENTS (dfe->dfe_tree->_.call.params) > 0 && ARRAYP (dfe->dfe_tree->_.call.params[0]) &&
+	      BOX_ELEMENTS (dfe->dfe_tree->_.call.params[0]) > 1)
+	    {
+	      ST *dtp = (ST *) (((caddr_t *) (dfe->dfe_tree->_.call.params[0]))[1]);
+	      dummy_arg.ssl_sqt.sqt_dtp = dtp->type;
+	    }
 	  DO_BOX (df_elt_t *, dfe_arg, inx, dfe->_.call.args)
 	    {
 	      args[inx] = dfe_arg->dfe_ssl ? dfe_arg->dfe_ssl : &dummy_arg;
@@ -128,6 +135,7 @@ sqlg_dfe_ssl (sqlo_t * so, df_elt_t * dfe)
 	  END_DO_BOX;
 	  bif_type_set (bt, dfe->dfe_ssl, args);
 	}
+      goto done;
     }
   if (ST_COLUMN (tree, COL_DOTTED))
     {
@@ -293,7 +301,7 @@ sqlg_non_index_ins (df_elt_t * tb_dfe)
 	  && sqlo_in_list (cp, NULL, NULL))
 	{
 	  if (tb_dfe->_.table.join_test)
-	    tb_dfe->_.table.join_test = (df_elt_t **) list (3, BOP_AND, sqlo_pred_body (tb_dfe->dfe_sqlo, LOC_LOCAL, tb_dfe, cp), tb_dfe->_.table.join_test);
+	    tb_dfe->_.table.join_test = (df_elt_t **) t_list (3, BOP_AND, sqlo_pred_body (tb_dfe->dfe_sqlo, LOC_LOCAL, tb_dfe, cp), tb_dfe->_.table.join_test);
 	  else
 	    tb_dfe->_.table.join_test = sqlo_pred_body (tb_dfe->dfe_sqlo, LOC_LOCAL, tb_dfe, cp);
 	  cp->dfe_is_placed = DFE_GEN;
@@ -1945,6 +1953,8 @@ sqlg_pred_find_duplicates (sqlo_t *so, df_elt_t **body, dk_set_t *dfe_set, dk_se
 
       if (pred->dfe_tree)
 	pred = sqlo_df_elt (so, pred->dfe_tree);
+      if (!pred)
+	SQL_GPF_T1 (so->so_sc->sc_cc, "Can't find the predicate internals");
       if (pred->dfe_type != DFE_BOP_PRED)
 	{
 	  if (dk_set_member (*dfe_set, pred))
@@ -4018,6 +4028,7 @@ sqlg_dt_subquery (sqlo_t * so, df_elt_t * dt_dfe, query_t * ext_query,
   char ord = so->so_sc->sc_order;
   update_node_t * kset = sc->sc_update_keyset;
   state_slot_t * set_no = sc->sc_set_no_ssl;
+  dk_set_t prev_in_iters = so->so_in_list_nodes;
   sc->sc_update_keyset = NULL;
   sc->sc_set_no_ssl = new_set_no;
   sqlg_set_ts_order (so, dt_dfe);
@@ -4030,6 +4041,7 @@ sqlg_dt_subquery (sqlo_t * so, df_elt_t * dt_dfe, query_t * ext_query,
   sc->sc_update_keyset = kset;
   sc->sc_set_no_ssl = set_no;
   so->so_sc->sc_order = ord;
+  so->so_in_list_nodes = prev_in_iters;
   return qr;
 }
 
diff --git a/libsrc/Wi/sqlhash.c b/libsrc/Wi/sqlhash.c
index 6d828f9..414f733 100644
--- a/libsrc/Wi/sqlhash.c
+++ b/libsrc/Wi/sqlhash.c
@@ -1,14 +1,14 @@
 /*
  *  sqlhash.c
  *
- *  $Id: sqlhash.c,v 1.5.2.9 2010/10/29 14:11:04 source Exp $
+ *  $Id: sqlhash.c,v 1.5.2.11 2012/03/08 12:55:36 source Exp $
  *
  *  Dynamic SQL Compiler, part 2
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -223,8 +223,6 @@ setp_distinct_hash (sql_comp_t * sc, setp_node_t * setp, long n_rows)
 	  case AMMSC_COUNTSUM:
 	  case AMMSC_SUM:
 	      case AMMSC_AVG:
-		  ha->ha_memcache_only = 0;
-		  break;
 	  case AMMSC_MIN:
 	  case AMMSC_MAX:
 		    {
diff --git a/libsrc/Wi/sqlintrp.c b/libsrc/Wi/sqlintrp.c
index bdf9b26..58df184 100644
--- a/libsrc/Wi/sqlintrp.c
+++ b/libsrc/Wi/sqlintrp.c
@@ -1,14 +1,14 @@
 /*
  *  sqlintrp.c
  *
- *  $Id: sqlintrp.c,v 1.21.2.13 2010/11/15 16:51:56 source Exp $
+ *  $Id: sqlintrp.c,v 1.21.2.15 2012/03/08 12:55:36 source Exp $
  *
  *  SQL interpreter
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -877,6 +877,7 @@ ins_subq (instruction_t * ins, caddr_t * qst)
   cli->cli_anytime_started = at_start;
   if (err == (caddr_t) SQL_NO_DATA_FOUND
       && ins->_.subq.query->qr_select_node
+      && ins->_.subq.query->qr_select_node->sel_out_slots
       && BOX_ELEMENTS (ins->_.subq.query->qr_select_node->sel_out_slots) > 0
       && ins->_.subq.query->qr_select_node->sel_out_slots[0])
     qst_set_bin_string (qst, ins->_.subq.query->qr_select_node->sel_out_slots[0], (db_buf_t) "", 0, DV_DB_NULL);
diff --git a/libsrc/Wi/sqlintrp.h b/libsrc/Wi/sqlintrp.h
index 62e090c..31a8449 100644
--- a/libsrc/Wi/sqlintrp.h
+++ b/libsrc/Wi/sqlintrp.h
@@ -1,14 +1,14 @@
 /*
  *  sqlintrp.h
  *
- *  $Id: sqlintrp.h,v 1.6.2.2 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlintrp.h,v 1.6.2.4 2012/03/08 12:55:36 source Exp $
  *
  *  SQL Interpreter Run Time Data
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -58,7 +58,7 @@ typedef struct _subqpred {
 
 typedef int (* pred_func_t) (caddr_t * qst, void * comp);
 
-typedef caddr_t (* ao_func_t) (caddr_t l, caddr_t r, caddr_t * qst, state_slot_t * target);
+typedef caddr_t (* ao_func_t) (ccaddr_t l, ccaddr_t r, caddr_t * qst, state_slot_t * target);
 
 
 typedef long jmp_label_t;
diff --git a/libsrc/Wi/sqlinx.c b/libsrc/Wi/sqlinx.c
index 2993aa0..543b0e4 100644
--- a/libsrc/Wi/sqlinx.c
+++ b/libsrc/Wi/sqlinx.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: sqlinx.c,v 1.1.2.7 2010/03/24 01:02:12 source Exp $
+ *  $Id: sqlinx.c,v 1.1.2.8 2012/03/08 12:55:36 source Exp $
  *
  *  Index selection
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlnode.h b/libsrc/Wi/sqlnode.h
index b8b9912..e1d2bdd 100644
--- a/libsrc/Wi/sqlnode.h
+++ b/libsrc/Wi/sqlnode.h
@@ -1,14 +1,14 @@
 /*
  *  sqlnode.h
  *
- *  $Id: sqlnode.h,v 1.30.2.16 2010/10/29 14:12:27 source Exp $
+ *  $Id: sqlnode.h,v 1.30.2.17 2012/03/08 12:55:36 source Exp $
  *
  *  SQL query nodes
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlo.c b/libsrc/Wi/sqlo.c
index 8833b6f..c11dafb 100644
--- a/libsrc/Wi/sqlo.c
+++ b/libsrc/Wi/sqlo.c
@@ -1,14 +1,14 @@
 /*
  *  sqlo.c
  *
- *  $Id: sqlo.c,v 1.15.2.17 2011/03/17 13:55:20 source Exp $
+ *  $Id: sqlo.c,v 1.15.2.19 2012/03/08 12:55:36 source Exp $
  *
  *  sql scope inference
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2992,6 +2992,8 @@ sqlo_scalar_subq_scope (sqlo_t * so, ST ** ptree)
   dk_set_t s;
   sql_scope_t * sco = so->so_scope;
   ST * org, * res;
+  if (!sco)
+    SQL_GPF_T1 (so->so_sc->sc_cc, "no scope");
   for (s = sco->sco_scalar_subqs; s; s = s->next->next)
     {
       org = (ST*)s->data;
diff --git a/libsrc/Wi/sqlo.h b/libsrc/Wi/sqlo.h
index 2fc7db2..355ebf3 100644
--- a/libsrc/Wi/sqlo.h
+++ b/libsrc/Wi/sqlo.h
@@ -1,14 +1,14 @@
 /*
  *  sqlo.h
  *
- *  $Id: sqlo.h,v 1.22.2.12 2011/02/14 11:48:50 source Exp $
+ *  $Id: sqlo.h,v 1.22.2.15 2012/03/08 12:55:36 source Exp $
  *
  *  sql opt graph
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -538,6 +538,7 @@ typedef struct index_choice_s
   char		ic_text_order;
   char		ic_geo_order;
   char		ic_o_string_range_lit; /* 1 if o is known to be a string 2 if literal strings */
+  dk_set_t	ic_inx_sample_cols;
 } index_choice_t;
 
 #define IC_OPT_ITERS 0 /* can change in or rdf inf iters into after test */
@@ -796,6 +797,7 @@ int dfe_is_eq_pred (df_elt_t * pred);
 float sqlo_index_path_cost (dk_set_t path, float * cost_ret, float * card_ret, char * sure_ret);
 data_source_t * sqlg_make_ts (sqlo_t * so, df_elt_t * tb_dfe);
 int dfe_is_o_ro2sq_range (df_elt_t * pred, df_elt_t * tb_dfe, df_elt_t ** o_col_dfe_ret, df_elt_t ** exp_dfe_ret, int * op_ret);
+void sqlg_in_iter_nodes (sqlo_t * so, data_source_t * ts, data_source_t ** head);
 int sqlo_has_col_ref (ST * tree);
 
 float dfe_exp_card (sqlo_t * so, df_elt_t * dfe);
diff --git a/libsrc/Wi/sqloby.c b/libsrc/Wi/sqloby.c
index 22c27ec..b0eb07b 100644
--- a/libsrc/Wi/sqloby.c
+++ b/libsrc/Wi/sqloby.c
@@ -1,14 +1,14 @@
 /*
  *  sqloby.c
  *
- *  $Id: sqloby.c,v 1.7.2.6 2010/03/08 12:04:13 source Exp $
+ *  $Id: sqloby.c,v 1.7.2.8 2012/03/08 12:55:36 source Exp $
  *
  *  sql order and group compilation
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -841,6 +841,7 @@ sqlo_post_oby_ref (sqlo_t * so, df_elt_t * dt_dfe, df_elt_t * sel_dfe, int inx)
   /* if exps laid out after oby, add the cols refd therein to oby deps */
   dk_set_t deps = NULL;
   df_elt_t * oby_dfe = dt_dfe->_.sub.last;
+  int __i;
   while (oby_dfe)
     {
       if (DFE_ORDER == oby_dfe->dfe_type)
@@ -849,6 +850,13 @@ sqlo_post_oby_ref (sqlo_t * so, df_elt_t * dt_dfe, df_elt_t * sel_dfe, int inx)
     }
   if (!oby_dfe)
     return;
+  DO_BOX (ST *, spec, __i, oby_dfe->_.setp.specs)
+    {
+      df_elt_t * spec_dfe = sqlo_df (so, spec->_.o_spec.col);
+      if (spec_dfe == sel_dfe)
+	return;
+    }
+  END_DO_BOX;
   sqlo_exp_cols_from_dt (so, sel_dfe->dfe_tree, dt_dfe, &deps);
   if (!oby_dfe->_.setp.oby_dep_cols)
     {
diff --git a/libsrc/Wi/sqlocr.c b/libsrc/Wi/sqlocr.c
index efb97cb..653ecb3 100644
--- a/libsrc/Wi/sqlocr.c
+++ b/libsrc/Wi/sqlocr.c
@@ -1,14 +1,14 @@
 /*
  *  sqlocr.c
  *
- *  $Id: sqlocr.c,v 1.4.2.3 2010/02/18 10:57:17 source Exp $
+ *  $Id: sqlocr.c,v 1.4.2.4 2012/03/08 12:55:36 source Exp $
  *
  *  sql opt cursors inference
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlocr.h b/libsrc/Wi/sqlocr.h
index 0b66764..c4e97ba 100644
--- a/libsrc/Wi/sqlocr.h
+++ b/libsrc/Wi/sqlocr.h
@@ -1,12 +1,12 @@
 /*
  * sqlocr.h
  *
- *  $Id: sqlocr.h,v 1.4.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlocr.h,v 1.4.2.2 2012/03/08 12:55:36 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlofn.h b/libsrc/Wi/sqlofn.h
index c14f2a8..d2f973f 100644
--- a/libsrc/Wi/sqlofn.h
+++ b/libsrc/Wi/sqlofn.h
@@ -1,14 +1,14 @@
 /*
  *  sqlofn.h
  *
- *  $Id: sqlofn.h,v 1.3.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlofn.h,v 1.3.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  sql opt export functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqloinv.c b/libsrc/Wi/sqloinv.c
index 38d1558..a4765f5 100644
--- a/libsrc/Wi/sqloinv.c
+++ b/libsrc/Wi/sqloinv.c
@@ -1,14 +1,14 @@
 /*
  *  sqloinv.c
  *
- *  $Id: sqloinv.c,v 1.6.2.4 2010/02/18 10:57:17 source Exp $
+ *  $Id: sqloinv.c,v 1.6.2.5 2012/03/08 12:55:37 source Exp $
  *
  *  sql inverse functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqloinv.h b/libsrc/Wi/sqloinv.h
index 7733d53..c1b734d 100644
--- a/libsrc/Wi/sqloinv.h
+++ b/libsrc/Wi/sqloinv.h
@@ -1,12 +1,12 @@
 /*
  * sqloinv.h
  *
- *  $Id: sqloinv.h,v 1.2.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqloinv.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqloinx.c b/libsrc/Wi/sqloinx.c
index 8010c40..57419e4 100644
--- a/libsrc/Wi/sqloinx.c
+++ b/libsrc/Wi/sqloinx.c
@@ -1,14 +1,14 @@
 /*
  *  sqloinx.c
  *
- *  $Id: sqloinx.c,v 1.17.2.5 2010/02/15 19:46:03 source Exp $
+ *  $Id: sqloinx.c,v 1.17.2.6 2012/03/08 12:55:37 source Exp $
  *
  *  sql expression dependencies and code layout
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlopcod.h b/libsrc/Wi/sqlopcod.h
index ab45319..f5f0d13 100644
--- a/libsrc/Wi/sqlopcod.h
+++ b/libsrc/Wi/sqlopcod.h
@@ -1,12 +1,12 @@
 /*
  *  sqlopcod.h
  *
- *  $Id: sqlopcod.h,v 1.2.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlopcod.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqloprt.c b/libsrc/Wi/sqloprt.c
index c5b38c9..2dc973e 100644
--- a/libsrc/Wi/sqloprt.c
+++ b/libsrc/Wi/sqloprt.c
@@ -1,14 +1,14 @@
 /*
  *  sqloprt.c
  *
- *  $Id: sqloprt.c,v 1.6.2.3 2010/02/01 12:53:46 source Exp $
+ *  $Id: sqloprt.c,v 1.6.2.6 2012/03/12 10:17:23 source Exp $
  *
  *  sql opt intermediate diag
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -188,7 +188,7 @@ sqlo_dfe_print (df_elt_t * dfe, int offset)
 	sqlo_print (("Table %s(%s %s) by %s %s", dfe->_.table.ot->ot_table->tb_name,
 	      dfe->_.table.ot->ot_prefix ? dfe->_.table.ot->ot_prefix : "",
 	      dfe->_.table.ot->ot_new_prefix,
-	      dfe->_.table.key->key_name,
+	      dfe->_.table.key ? dfe->_.table.key->key_name : "<no key>",
 		     dfe->_.table.hash_role == HR_FILL ? " hash filler " : dfe->_.table.hash_role == HR_REF ? "hash join" : ""));
 	if (compiler_unit_msecs)
 	  sqlo_print (("  Reached %9.2g unit %9.2g (%g msecs) arity %9.2g\n",
@@ -332,11 +332,12 @@ sqlo_dfe_print (df_elt_t * dfe, int offset)
 	  }
 	if (DFE_DT == dfe->dfe_type && dfe->_.sub.trans)
 	  sqlo_print (("  dt transitive\n"));
-	for (elt = dfe->_.sub.first->dfe_next; elt; elt = elt->dfe_next)
-	  {
-	    sqlo_dfe_print (elt, offset + OFS_INCR);
-	    sqlo_print (("\n"));
-	  }
+	if (dfe->_.sub.first)
+	  for (elt = dfe->_.sub.first->dfe_next; elt; elt = elt->dfe_next)
+	    {
+	      sqlo_dfe_print (elt, offset + OFS_INCR);
+	      sqlo_print (("\n"));
+	    }
 
 	sqlo_print (("%*.*s", offset, offset, " "));
 	sqlo_print (("}\n"));
diff --git a/libsrc/Wi/sqlorder.c b/libsrc/Wi/sqlorder.c
index 1b629ee..0c34c74 100644
--- a/libsrc/Wi/sqlorder.c
+++ b/libsrc/Wi/sqlorder.c
@@ -1,14 +1,14 @@
 /*
  *  sqlorder.c
  *
- *  $Id: sqlorder.c,v 1.5.2.4 2009/09/27 22:03:57 source Exp $
+ *  $Id: sqlorder.c,v 1.5.2.5 2012/03/08 12:55:37 source Exp $
  *
  *  SQL ORDER BY
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlovdb.c b/libsrc/Wi/sqlovdb.c
index 3b02914..1ee21e6 100644
--- a/libsrc/Wi/sqlovdb.c
+++ b/libsrc/Wi/sqlovdb.c
@@ -1,14 +1,14 @@
 /*
  *  sqlovdb.c
  *
- *  $Id: sqlovdb.c,v 1.5.2.4 2010/09/17 16:50:59 source Exp $
+ *  $Id: sqlovdb.c,v 1.5.2.6 2012/03/08 12:55:37 source Exp $
  *
  *  SQL remote table layout and emote SQL generation
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -63,6 +63,11 @@ sqlo_depends_on_locus (df_elt_t * dfe, locus_t * loc)
    subqueries & function calls.
  */
 
+int
+sqlo_rds_support_params_in_select (df_elt_t *dfe, locus_t *loc)
+{
+  return 1;
+}
 
 int
 sqlo_is_local (sql_comp_t * sc, remote_ds_t * rds, ST * tree, int only_eq_comps)
diff --git a/libsrc/Wi/sqlpar.h b/libsrc/Wi/sqlpar.h
index 1308e7f..3ae48b6 100644
--- a/libsrc/Wi/sqlpar.h
+++ b/libsrc/Wi/sqlpar.h
@@ -1,14 +1,14 @@
 /*
  *  sqlpar.h
  *
- *  $Id: sqlpar.h,v 1.3.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlpar.h,v 1.3.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Parse Tree
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlparext.h b/libsrc/Wi/sqlparext.h
index 47c6da5..026163a 100644
--- a/libsrc/Wi/sqlparext.h
+++ b/libsrc/Wi/sqlparext.h
@@ -1,14 +1,14 @@
 /*
  *  sqlparext.h
  *
- *  $Id: sqlparext.h,v 1.12.2.7 2010/02/18 10:57:17 source Exp $
+ *  $Id: sqlparext.h,v 1.12.2.8 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Parse Tree defines
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlpfn.c b/libsrc/Wi/sqlpfn.c
index b1427e7..dadd6ef 100644
--- a/libsrc/Wi/sqlpfn.c
+++ b/libsrc/Wi/sqlpfn.c
@@ -1,14 +1,14 @@
 /*
  *  sqlpfn.c
  *
- *  $Id: sqlpfn.c,v 1.20.2.6 2010/11/15 16:51:56 source Exp $
+ *  $Id: sqlpfn.c,v 1.20.2.9 2012/03/08 12:55:37 source Exp $
  *
  *  Parser Functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -41,6 +41,7 @@
 #include "sqlbif.h"
 #include "sqlcstate.h"
 #include "xmltree.h" /* For trick with precompilation of strings that are XPATH/XQuery expressions */
+#include "xpf.h"
 
 
 void yyerror (const char *s);
@@ -640,14 +641,14 @@ casemode_strncmp (const char *s1, const char *s2, size_t n)
 }
 
 caddr_t
-sqlp_box_id_upcase (const char *str)
+DBG_NAME (sqlp_box_id_upcase) (DBG_PARAMS const char *str)
 {
   /* nothing in 2 */
   caddr_t s;
   size_t len = strlen (str);
   if (len > MAX_NAME_LEN - 2)
     len = MAX_NAME_LEN - 2;
-  s = box_dv_short_nchars (str, len);
+  s = DBG_NAME (box_dv_short_nchars) (DBG_ARGS str, len);
   box_tag_modify (s, DV_SYMBOL);
   if (CM_UPPER == case_mode)
     sqlp_upcase (s);
@@ -1840,7 +1841,6 @@ sqlp_inline_order_by (ST *tree, ST **oby)
   return tree;
 }
 
-#if 0 /*GK: dead code */
 static ST *
 sqlp_raw_name_string_to_col_dotted (const char *fullname)
 {
@@ -1866,8 +1866,6 @@ sqlp_raw_name_string_to_col_dotted (const char *fullname)
     return t_listst (3, COL_DOTTED, c_pref (t_sqlp_box_id_upcase (buf), part1-buf, NULL, 0, t_sqlp_box_id_upcase (part2)), t_sqlp_box_id_upcase (part3));
   return t_listst (3, COL_DOTTED, c_pref (t_sqlp_box_id_upcase (buf), part1-buf, t_sqlp_box_id_upcase (part1), part2-part1, t_sqlp_box_id_upcase (part2)), t_sqlp_box_id_upcase (part3));
 }
-#endif
-
 
 static void
 sqlp_contains_opts (ST * tree)
@@ -1986,7 +1984,6 @@ sqlp_sqlxml (ST * tree)
 }
 /*end sqlxml*/
 
-#if 0 /*GK: dead code ?*/
 static void
 sqlp_xpath_or_xquery_eval (ST * funcall_tree)
 {
@@ -1995,7 +1992,7 @@ sqlp_xpath_or_xquery_eval (ST * funcall_tree)
       ST **old_params = funcall_tree->_.call.params;
       size_t old_argcount = BOX_ELEMENTS (old_params);
       if (2 > old_argcount)
-	yyerror ("Functions xpath_eval and xquery_eval require at least two arguments");
+    yyerror ("Functions xpath_eval() and xquery_eval() require at least two arguments");
       if (DV_STRING == DV_TYPE_OF(old_params[0]))
         {
 	  char predicate_type = (0 == stricmp (call_name, "xpath_eval")) ? 'p' : 'q';
@@ -2062,15 +2059,70 @@ sqlp_xpath_or_xquery_eval (ST * funcall_tree)
 	    }
 	  if (NULL != xqr)
 	    {
-	      old_params[0] = (ST *)(t_box_copy ((caddr_t)xqr));
+          /*t_trash_push (xqr);*/
+          old_params[0] = (ST *)xqr;
 	      return;
 	    }
         }
-      sprintf (buf, "%s (w/cache)", call_name);
+  sprintf (buf, "%s__w_cache", call_name);
+  funcall_tree->_.call.name = t_sqlp_box_id_upcase (buf);
+  funcall_tree->_.call.params = (ST **)t_list_concat ((caddr_t)old_params, (caddr_t)t_list (1, t_box_num_and_zero (0)));
+}
+
+static void
+sqlp_xpath_funcall_or_apply (ST * funcall_tree)
+{
+  const char *call_name = funcall_tree->_.call.name;
+  const char *xpf_name = NULL;
+  xpf_metadata_t *metas = NULL;
+  char buf[30];
+  ST **old_params = funcall_tree->_.call.params;
+  size_t old_argcount = BOX_ELEMENTS (old_params);
+  char call_type = ((0 == stricmp (call_name, "xpath_funcall")) ? 'f' : 'a');
+  if ('f' == call_type)
+    {
+      if (2 > old_argcount)
+        yyerror ("Function xpath_funcall() requires at least two arguments");
+    }
+  else
+    {
+      if (3 != old_argcount)
+        yyerror ("Function xpath_apply() requires exactly three arguments");
+    }
+  if (DV_STRING == DV_TYPE_OF(old_params[0]))
+    {
+      xpf_metadata_t ** metas_ptr;
+      xpf_name = (const char *)(old_params[0]);
+      metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&xpf_name));
+      if (NULL == metas_ptr)
+        yyerror ("Unknown XPath function name is used as first argument of xpath_funcall() or xpath_apply() function");
+      metas = metas_ptr[0];
+    }
+  if ((NULL != metas) && ('f' == call_type))
+    {
+      xp_query_t *xqr;
+      int fn_argcount = old_argcount-2;
+      if (metas->xpfm_min_arg_no > fn_argcount)
+        yyerror ("The XPATH function mentioned in xpath_funcall() requires more arguments than specified in the call");
+      if (metas->xpfm_main_arg_no < fn_argcount)
+        {
+          if (0 == metas->xpfm_tail_arg_no)
+            yyerror ("The XPATH function mentioned in xpath_funcall() requires less arguments than specified in the call");
+          else
+            {
+              int tail_mod = (fn_argcount - metas->xpfm_main_arg_no) % metas->xpfm_tail_arg_no;
+              if (tail_mod)
+                yyerror ("The XPATH function mentioned in xpath_funcall() requires less arguments than specified in the call");
+            }
+        }
+      xqr = xqr_stub_for_funcall (metas, fn_argcount);
+      /*t_trash_push (xqr);*/
+      old_params[0] = (ST *)xqr;
+    }
+  sprintf (buf, "%s__w_cache", call_name);
       funcall_tree->_.call.name = t_sqlp_box_id_upcase (buf);
       funcall_tree->_.call.params = (ST **)t_list_concat ((caddr_t)old_params, (caddr_t)t_list (1, t_box_num_and_zero (0)));
 }
-#endif
 
 ST *
 sqlp_patch_call_if_special (ST * funcall_tree)
@@ -2112,14 +2164,18 @@ sqlp_patch_call_if_special (ST * funcall_tree)
 	}
       goto generic_check;
     }
-#if 0 /* Tmp change */
   if (0 == stricmp (call_name, "xpath_eval")
 	   || 0 == stricmp (call_name, "xquery_eval") )
     {
       sqlp_xpath_or_xquery_eval (funcall_tree);
       goto generic_check;
     }
-#endif
+  if (0 == stricmp (call_name, "xpath_funcall")
+	   || 0 == stricmp (call_name, "xquery_apply") )
+    {
+      sqlp_xpath_funcall_or_apply (funcall_tree);
+      goto generic_check;
+    }
   if ((0 == strnicmp (call_name, "__I2ID", 6) || strstr (call_name, "IID_OF_QNAME"))
       && BOX_ELEMENTS (funcall_tree->_.call.params) >= 1)
     {
diff --git a/libsrc/Wi/sqlpfn.h b/libsrc/Wi/sqlpfn.h
index 60cbde4..88b22de 100644
--- a/libsrc/Wi/sqlpfn.h
+++ b/libsrc/Wi/sqlpfn.h
@@ -1,14 +1,14 @@
 /*
  *  sqlpfn.h
  *
- *  $Id: sqlpfn.h,v 1.8.2.6 2010/11/15 16:51:57 source Exp $
+ *  $Id: sqlpfn.h,v 1.8.2.8 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Parser Utility Functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -61,7 +61,10 @@ ST ** asg_col_list (ST ** asg_list);
 
 ST ** sqlp_local_variable_decls (caddr_t * names, ST * dtp);
 
-caddr_t sqlp_box_id_upcase (const char * str);
+caddr_t DBG_NAME (sqlp_box_id_upcase) (DBG_PARAMS const char *str);
+#ifdef MALLOC_DEBUG
+#define sqlp_box_id_upcase(s) dbg_sqlp_box_id_upcase (__FILE__, __LINE__, s)
+#endif
 caddr_t t_sqlp_box_id_upcase (const char * str);
 caddr_t sqlp_box_upcase (const char * str);
 caddr_t t_sqlp_box_upcase (const char * str);
diff --git a/libsrc/Wi/sqlprocc.c b/libsrc/Wi/sqlprocc.c
index 1184079..0bf594d 100644
--- a/libsrc/Wi/sqlprocc.c
+++ b/libsrc/Wi/sqlprocc.c
@@ -1,14 +1,14 @@
 /*
  *  sqlprocc.c
  *
- *  $Id: sqlprocc.c,v 1.7.2.5 2010/10/29 14:12:27 source Exp $
+ *  $Id: sqlprocc.c,v 1.7.2.6 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Procedure Compiler
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlprt.c b/libsrc/Wi/sqlprt.c
index 6b1327c..a075853 100644
--- a/libsrc/Wi/sqlprt.c
+++ b/libsrc/Wi/sqlprt.c
@@ -1,14 +1,14 @@
 /*
  *  sqlprt.c
  *
- *  $Id: sqlprt.c,v 1.6.2.3 2009/08/19 07:29:55 source Exp $
+ *  $Id: sqlprt.c,v 1.6.2.4 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Statement Printer
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlrbuf.c b/libsrc/Wi/sqlrbuf.c
index c67d2d4..5fd4005 100644
--- a/libsrc/Wi/sqlrbuf.c
+++ b/libsrc/Wi/sqlrbuf.c
@@ -1,14 +1,14 @@
 /*
  *  sqlrbuf.c
  *
- *  $Id: sqlrbuf.c,v 1.2.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlrbuf.c,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  VDB SQL Remote query execution.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlrcomp.c b/libsrc/Wi/sqlrcomp.c
index 359a7bc..6872222 100644
--- a/libsrc/Wi/sqlrcomp.c
+++ b/libsrc/Wi/sqlrcomp.c
@@ -1,14 +1,14 @@
 /*
  *  sqlrcomp.c
  *
- *  $Id: sqlrcomp.c,v 1.7.2.7 2011/01/11 22:41:31 source Exp $
+ *  $Id: sqlrcomp.c,v 1.7.2.8 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Compiler, VDB remote database access
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlrcomp.h b/libsrc/Wi/sqlrcomp.h
index 8c65600..6945fc7 100644
--- a/libsrc/Wi/sqlrcomp.h
+++ b/libsrc/Wi/sqlrcomp.h
@@ -1,12 +1,12 @@
 /*
  *  sqlrcomp.h
  *
- *  $Id: sqlrcomp.h,v 1.6.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlrcomp.h,v 1.6.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlrrun.c b/libsrc/Wi/sqlrrun.c
index d684f63..96566c2 100644
--- a/libsrc/Wi/sqlrrun.c
+++ b/libsrc/Wi/sqlrrun.c
@@ -1,14 +1,14 @@
 /*
  *  sqlrrun.c
  *
- *  $Id: sqlrrun.c,v 1.8.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlrrun.c,v 1.8.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  VDB SQL Remote query execution.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlrun.c b/libsrc/Wi/sqlrun.c
index 9a92539..c22b224 100644
--- a/libsrc/Wi/sqlrun.c
+++ b/libsrc/Wi/sqlrun.c
@@ -1,14 +1,14 @@
 /*
  *  sqlrun.c
  *
- *  $Id: sqlrun.c,v 1.24.2.21 2011/03/11 18:26:43 source Exp $
+ *  $Id: sqlrun.c,v 1.24.2.24 2012/03/13 11:51:15 source Exp $
  *
  *  SQL query execution
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -656,7 +656,7 @@ cli_terminate_in_itc_fail (client_connection_t * cli, it_cursor_t * itc, buffer_
       lt->lt_status = LT_BLOWN_OFF;
       if (itc)
 	itc_bust_this_trx (itc, buf, ITC_BUST_THROW);
-      sqlr_new_error ("S1T00", "{CLI..", "Client cancelled or disconnected");
+      sqlr_new_error ("S1T00", "CLI..", "Client cancelled or disconnected");
     }
 }
 
@@ -3422,9 +3422,12 @@ qr_dml_array_exec (client_connection_t * cli, query_t * qr,
       return err;
     }
   dk_free_box (detail);
-  for (inx = 0; inx < param_inx - 1; inx++)
-    cli_send_row_count (cli, 0, NULL, self_thread);
-  cli_send_row_count (cli, n_affected, NULL, self_thread);
+  if (CALLER_LOCAL != caller)
+    {
+      for (inx = 0; inx < param_inx - 1; inx++)
+	cli_send_row_count (cli, 0, NULL, self_thread);
+      cli_send_row_count (cli, n_affected, NULL, self_thread);
+    }
 #ifdef WIRE_DEBUG
   list_wired_buffers (__FILE__, __LINE__, "qr_exec finish");
 #endif
diff --git a/libsrc/Wi/sqlsrv.c b/libsrc/Wi/sqlsrv.c
index 263773e..f8fe873 100644
--- a/libsrc/Wi/sqlsrv.c
+++ b/libsrc/Wi/sqlsrv.c
@@ -1,14 +1,14 @@
 /*
  *  sqlsrv.c
  *
- *  $Id: sqlsrv.c,v 1.36.2.27 2011/01/05 12:51:53 source Exp $
+ *  $Id: sqlsrv.c,v 1.36.2.37 2012/03/08 12:55:37 source Exp $
  *
  *  SQL server functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -646,6 +646,12 @@ client_connection_free (client_connection_t * cli)
   LEAVE_TXN;
 #endif
   dk_free_tree (cli->cli_info);
+  if (NULL != cli->cli_ns_2dict)
+    {
+      xml_ns_2dict_clean (cli->cli_ns_2dict);
+      dk_free (cli->cli_ns_2dict, sizeof (xml_ns_2dict_t));
+      cli->cli_ns_2dict = NULL;
+    }
   dk_free ((caddr_t) cli, sizeof (client_connection_t));
 }
 
@@ -1386,15 +1392,21 @@ stmt_set_query (srv_stmt_t * stmt, client_connection_t * cli, caddr_t text,
 
 }
 
-
+int32 cli_max_cached_stmts = 10000;
 
 srv_stmt_t *
-cli_get_stmt_access (client_connection_t * cli, caddr_t id, int mode)
+cli_get_stmt_access (client_connection_t * cli, caddr_t id, int mode, caddr_t * err_ret)
 {
   caddr_t place;
   srv_stmt_t *stmt;
   IN_CLIENT (cli);
   place = id_hash_get (cli->cli_statements, (caddr_t) & id);
+  if (!place && cli->cli_statements->ht_count >= cli_max_cached_stmts)
+    {
+      if (err_ret)
+	*err_ret = srv_make_new_error ("HY013", "SR491", "Too many open statements");
+      return NULL;
+    }
   if (!place)
     {
       NEW_VARZ (srv_stmt_t, stmt);
@@ -1440,7 +1452,7 @@ cli_cached_sql_compile (caddr_t query_text, client_connection_t *cli, caddr_t *e
   caddr_t stmt_boxed = box_dv_short_string (query_text);
 
   stmt_id = box_dv_short_string (stmt_id_name);
-  sst = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE);
+  sst = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE, NULL);
   old_log_val = cli->cli_is_log;
   cli->cli_is_log = 1;
   err = stmt_set_query (sst, cli, stmt_boxed, NULL);
@@ -1460,16 +1472,19 @@ sf_stmt_prepare (caddr_t stmt_id, char *text, long explain,
 {
   dk_session_t *client = IMMEDIATE_CLIENT;
   client_connection_t *cli = DKS_DB_DATA (client);
-  caddr_t err;
+  caddr_t err = NULL;
 
-  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE);
+  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE, &err);
+  if (!stmt && err)
+    goto report_error;
   cli->cli_terminate_requested = 0;
   cli->cli_start_time = time_now_msec;
   if (!stmt || stmt->sst_cursor_state)
     {
       /* There's an instance. can't do it */
-      mutex_leave (cli->cli_mtx);
       err = srv_make_new_error ("S1010", "SR209", "Statement active");
+report_error:
+      mutex_leave (cli->cli_mtx);
       PrpcAddAnswer (err, DV_ARRAY_OF_POINTER, 1, 1);
       dk_free_tree (err);
 
@@ -1656,7 +1671,9 @@ sf_sql_execute (caddr_t stmt_id, char *text, char *cursor_name,
       goto report_rpc_format_error;
     }
 
-  stmt = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE);
+  stmt = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE, &err);
+  if (err)
+    goto report_error;
   if (params)
     n_params = BOX_ELEMENTS (params);
 
@@ -1679,6 +1696,7 @@ report_error:
       mutex_leave (cli->cli_mtx);
     report_rpc_format_error:
       PrpcAddAnswer (err, DV_ARRAY_OF_POINTER, 1, 1);
+      DKST_RPC_DONE (client);
       dk_free_tree (err);
 
       dk_free_box (text);
@@ -2276,7 +2294,7 @@ sf_sql_fetch (caddr_t stmt_id, long cond_no)
   dk_session_t *client = IMMEDIATE_CLIENT;
   caddr_t err;
   client_connection_t *cli = DKS_DB_DATA (client);
-  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE);
+  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_EXCLUSIVE, NULL);
 
   CHANGE_THREAD_USER(cli->cli_user);
 
@@ -2334,7 +2352,13 @@ sf_sql_free_stmt (caddr_t stmt_id, int op)
   query_instance_t *qi = NULL;
   dk_session_t *client = IMMEDIATE_CLIENT;
   client_connection_t *cli = DKS_DB_DATA (client);
-  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_ANY);
+  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_ANY, NULL);
+  if (!stmt)
+    {
+      LEAVE_CLIENT (cli);
+      DKST_RPC_DONE (IMMEDIATE_CLIENT);
+      return 1;
+    }
   dbg_printf (("sf_sql_free_stmt %s %d\n", stmt->sst_id, op));
   if (stmt->sst_cursor_state)
     stmt_scroll_close (stmt);
@@ -2409,6 +2433,7 @@ cli_transact (client_connection_t * cli, int op, caddr_t * replicate)
 
   IN_TXN;
   lt = cli->cli_trx;
+  lt_wait_checkpoint ();
 
   lt_threads_inc_inner (lt);
 
@@ -2846,6 +2871,10 @@ sf_sql_get_data_trx_error (int code, caddr_t err_detail)
 }
 
 
+#define BLOB_CHAR 0
+#define BLOB_WIDE 1
+#define BLOB_BIN  2
+
 void
 sf_sql_get_data (caddr_t stmt_id, long current_of, long nth_col,
     long how_much, long starting_at)
@@ -2854,8 +2883,8 @@ sf_sql_get_data (caddr_t stmt_id, long current_of, long nth_col,
   dk_session_t *client = IMMEDIATE_CLIENT_OR_NULL;
   client_connection_t *cli = DKS_DB_DATA (client);
   lock_trx_t *lt;
-  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_ANY);
-  if (stmt->sst_inst)
+  srv_stmt_t *stmt = cli_get_stmt_access (cli, stmt_id, GET_ANY, NULL);
+  if (stmt && stmt->sst_inst)
     {
       query_instance_t *qi = stmt->sst_inst;
       caddr_t val;
@@ -2873,7 +2902,7 @@ sf_sql_get_data (caddr_t stmt_id, long current_of, long nth_col,
       LEAVE_CLIENT (cli);
       if (IS_BLOB_HANDLE (val))
 	{
-	  blob_send_bytes (qi->qi_trx, val, how_much, 0);
+	  blob_send_bytes (qi->qi_trx, val, how_much, 0, BLOB_CHAR);
 	}
       else
 	{
@@ -2973,15 +3002,14 @@ lt_enter_anyway (lock_trx_t * lt)
   return rc;
 }
 
-
 void
-sf_sql_get_data_ac (long dp_from, long how_much, long starting_at, long bh_key_id, long bh_frag_no, long page_dir, caddr_t page_array, long is_wide, long timestamp)
+sf_sql_get_data_ac (long dp_from, long how_much, long starting_at, long bh_key_id, long bh_frag_no, long page_dir, caddr_t page_array, long blob_type, long timestamp)
 {
   int is_timeout;
   dk_session_t *client = IMMEDIATE_CLIENT_OR_NULL;
   client_connection_t *cli = DKS_DB_DATA (client);
   lock_trx_t *trx;
-  dtp_t bh_tag = is_wide ? DV_BLOB_WIDE_HANDLE : DV_BLOB_HANDLE;
+  dtp_t bh_tag = blob_type == BLOB_WIDE ? DV_BLOB_WIDE_HANDLE : DV_BLOB_HANDLE;
   blob_handle_t * bh = bh_alloc (bh_tag);
   dbe_key_t *key;
 
@@ -3027,7 +3055,7 @@ sf_sql_get_data_ac (long dp_from, long how_much, long starting_at, long bh_key_i
       return;
     }
   trx = cli->cli_trx;
-  blob_send_bytes (trx, (caddr_t) bh, how_much, 1);
+  blob_send_bytes (trx, (caddr_t) bh, how_much, 1, blob_type);
 
   IN_TXN;
   is_timeout = lt_leave (trx);
@@ -3042,8 +3070,9 @@ sf_sql_get_data_ac (long dp_from, long how_much, long starting_at, long bh_key_i
 
 #ifdef SERIAL_CLI
 CLI_WRAPPER (sf_sql_get_data_ac,
-	(long dp_from, long how_much, long starting_at, long bh_key_id, long bh_frag_no, long page_dir, caddr_t page_array, long is_wide, long timestamp),
-	(dp_from, how_much, starting_at, bh_key_id, bh_frag_no, page_dir, page_array, is_wide, timestamp))
+	(long dp_from, long how_much, long starting_at, long bh_key_id, long bh_frag_no, long page_dir, caddr_t page_array, long blob_type, 
+	 long timestamp),
+	(dp_from, how_much, starting_at, bh_key_id, bh_frag_no, page_dir, page_array, blob_type, timestamp))
 #define sf_sql_get_data_ac sf_sql_get_data_ac_w
 #endif
 
@@ -3897,20 +3926,25 @@ srv_global_init (char *mode)
       sec_read_grants (NULL, NULL, NULL, 0);
       sec_read_tb_rls (NULL, NULL, NULL);
       sinv_read_sql_inverses (NULL, bootstrap_cli);
-      read_proc_tables (1);
-      read_proc_tables (0);
+      sqls_define_sparql_init ();
+      read_proc_and_trigger_tables (1);
+      read_proc_and_trigger_tables (0);
       sec_read_grants (NULL, NULL, NULL, 1); /* call second time to do read of execute grants */
       ddl_standard_procs ();
     }
+  else if (!in_crash_dump)
+    sqls_define_sparql_init ();
   ddl_obackup_init ();
 
   ddl_ensure_stat_tables ();
   SET_THR_ATTR (THREAD_CURRENT_THREAD, TA_IMMEDIATE_CLIENT, bootstrap_cli);
+  bootstrap_cli->cli_user = sec_id_to_user (U_ID_DBA);
   if (!in_crash_dump)
     sql_code_global_init ();
   /* and a third time to process grants over the sqls_define procs */
   if (!strchr (mode, 'a'))
     sec_read_grants (NULL, NULL, NULL, 1);
+  read_utd_method_tables ();
   if (ddl_init_hook)
     ddl_init_hook (bootstrap_cli);
   local_commit (bootstrap_cli);
diff --git a/libsrc/Wi/sqlstmts.c b/libsrc/Wi/sqlstmts.c
index 2b713bf..89d655f 100644
--- a/libsrc/Wi/sqlstmts.c
+++ b/libsrc/Wi/sqlstmts.c
@@ -1,14 +1,14 @@
 /*
  *  sqlstmts.c
  *
- *  $Id: sqlstmts.c,v 1.12.2.4 2009/10/18 22:15:56 source Exp $
+ *  $Id: sqlstmts.c,v 1.12.2.7 2012/03/08 12:55:37 source Exp $
  *
  *  Dynamic SQL Statement Compilations
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1143,7 +1143,7 @@ sqlc_update_set_keyset (sql_comp_t * sc, table_source_t * ts)
       sc->sc_update_keyset = NULL;
       return;
     }
-  if (!key || !upd)
+  if (!key || !upd || key->key_no_pk_ref)
     {
       sc->sc_update_keyset = NULL;
       return;
@@ -1570,10 +1570,11 @@ sqlc_sch_list (sql_comp_t * sc, ST * tree)
 	xv->xv_schema = schema;
 	xv->xv_user = user;
 	xv->xv_local_name = local_name;
-        mpschema_set_view_def (full_name, box_copy_tree ((caddr_t)xv));
-      xmls_set_view_def ((void*) sc, (xml_view_t *) xv);
+      /* mpschema_set_view_def (full_name, (caddr_t)xv); Can't understand the reason: it is called again in xmls_set_view_def */
+      xmls_set_view_def ((void*) sc, xv);
       if (!sc->sc_store_procs)
 	return;
+      /*list[0] = box_copy_tree ((caddr_t)xv); / *... because the original is remembered in a hashtable in mpschema_set_view_def() */
     }
 #endif
   DO_BOX (ST *, elt, inx, list)
diff --git a/libsrc/Wi/sqltrig.c b/libsrc/Wi/sqltrig.c
index 4d5161b..1b199db 100644
--- a/libsrc/Wi/sqltrig.c
+++ b/libsrc/Wi/sqltrig.c
@@ -1,14 +1,14 @@
 /*
  *  sqltrig.c
  *
- *  $Id: sqltrig.c,v 1.5.2.2 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqltrig.c,v 1.5.2.3 2012/03/08 12:55:37 source Exp $
  *
  *  Triggers
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqltype.c b/libsrc/Wi/sqltype.c
index a22f1ba..cbcbe69 100644
--- a/libsrc/Wi/sqltype.c
+++ b/libsrc/Wi/sqltype.c
@@ -1,14 +1,14 @@
 /*
  *  sqltype.c
  *
- *  $Id: sqltype.c,v 1.16.2.8 2010/11/15 16:51:57 source Exp $
+ *  $Id: sqltype.c,v 1.16.2.9 2012/03/08 12:55:37 source Exp $
  *
  *  User defined types routines
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqltype.h b/libsrc/Wi/sqltype.h
index 6ba3b9a..b2609c1 100644
--- a/libsrc/Wi/sqltype.h
+++ b/libsrc/Wi/sqltype.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: sqltype.h,v 1.2.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqltype.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqltype_c.h b/libsrc/Wi/sqltype_c.h
index caa3407..a1018a4 100644
--- a/libsrc/Wi/sqltype_c.h
+++ b/libsrc/Wi/sqltype_c.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: sqltype_c.h,v 1.2.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqltype_c.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlver.c b/libsrc/Wi/sqlver.c
index 9b75dc0..4467a9b 100644
--- a/libsrc/Wi/sqlver.c
+++ b/libsrc/Wi/sqlver.c
@@ -1,14 +1,14 @@
 /*
  *  sqlver.c
  *
- *  $Id: sqlver.c,v 1.5.2.1 2009/04/18 21:55:16 source Exp $
+ *  $Id: sqlver.c,v 1.5.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  Build information
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlver.h b/libsrc/Wi/sqlver.h
index 11036c2..e78aa5a 100644
--- a/libsrc/Wi/sqlver.h
+++ b/libsrc/Wi/sqlver.h
@@ -1,14 +1,14 @@
 /*
  *  sqlver.h
  *
- *  $Id: sqlver.h,v 1.49.2.15 2011/02/03 09:25:01 source Exp $
+ *  $Id: sqlver.h,v 1.49.2.16 2012/03/08 12:55:37 source Exp $
  *
  *  Build & Version information, license control
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -25,7 +25,7 @@
  *
  */
 
-#define PRODUCT_COPYRIGHT	"Copyright (C) 1998-2011 OpenLink Software"
+#define PRODUCT_COPYRIGHT	"Copyright (C) 1998-2012 OpenLink Software"
 #define PRODUCT_NAME		"OpenLink Virtuoso"
 
 /* DBMS Server */
diff --git a/libsrc/Wi/sqlview.c b/libsrc/Wi/sqlview.c
index ee884fa..6ee3179 100644
--- a/libsrc/Wi/sqlview.c
+++ b/libsrc/Wi/sqlview.c
@@ -1,14 +1,14 @@
 /*
  *  sqlview.c
  *
- *  $Id: sqlview.c,v 1.7.2.4 2010/11/15 16:51:57 source Exp $
+ *  $Id: sqlview.c,v 1.7.2.5 2012/03/08 12:55:37 source Exp $
  *
  *  SQL Compiler, view, derived table, union
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlwords.gperf b/libsrc/Wi/sqlwords.gperf
index 3540a86..5036be4 100644
--- a/libsrc/Wi/sqlwords.gperf
+++ b/libsrc/Wi/sqlwords.gperf
@@ -1,10 +1,10 @@
 /*
- *  $Id: sqlwords.gperf,v 1.11.2.3 2010/02/01 12:53:46 source Exp $
+ *  $Id: sqlwords.gperf,v 1.11.2.4 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/sqlwords.h b/libsrc/Wi/sqlwords.h
index 9422bbb..981f0c7 100644
--- a/libsrc/Wi/sqlwords.h
+++ b/libsrc/Wi/sqlwords.h
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.0.3 */
+/* ANSI-C code produced by gperf version 3.0.4 */
 /* Command-line: /usr/bin/gperf -aCDGptr -Kkeiiyword -L ANSI-C -k'1,2,3,6,9,$' -Nlex_hash_kw ./sqlwords.gperf  */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -34,9 +34,9 @@ struct keyword { char *keiiyword; int token; };
 #define TOTAL_KEYWORDS 312
 #define MIN_WORD_LENGTH 1
 #define MAX_WORD_LENGTH 17
-#define MIN_HASH_VALUE 240
-#define MAX_HASH_VALUE 2466
-/* maximum key range = 2227, duplicates = 0 */
+#define MIN_HASH_VALUE 199
+#define MAX_HASH_VALUE 2366
+/* maximum key range = 2168, duplicates = 0 */
 
 #ifdef __GNUC__
 __inline
@@ -50,32 +50,32 @@ hash (register const char *str, register unsigned int len)
 {
   static const unsigned short asso_values[] =
     {
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467,  259, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467,  232,   19,  361,   71,   43,
-       463,   89,   47,   56,  130,   77,  149,  443,  448,  446,
-       186,  375,  379,  113,  376,   92,  463,   41,  324,  333,
-       435, 2467, 2467, 2467, 2467,  118, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467, 2467,
-      2467, 2467, 2467, 2467, 2467, 2467, 2467
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367,  236, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367,   85,  403,   99,  360,  190,
+       301,  345,  258,  307,  265,  292,  457,  352,   17,  202,
+       317,  320,  420,  500,  366,  117,   94,  112,  164,  160,
+        22, 2367, 2367, 2367, 2367,  426, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367, 2367,
+      2367, 2367, 2367, 2367, 2367, 2367, 2367
     };
   register int hval = len;
 
@@ -106,630 +106,630 @@ hash (register const char *str, register unsigned int len)
 
 static const struct keyword wordlist[] =
   {
-#line 333 "./sqlwords.gperf"
-    {"WITH", WITH},
-#line 58 "./sqlwords.gperf"
-    {"BEFORE", BEFORE},
-#line 332 "./sqlwords.gperf"
-    {"WHILE", WHILE},
-#line 176 "./sqlwords.gperf"
-    {"IS", IS},
-#line 125 "./sqlwords.gperf"
-    {"ESCAPE", ESCAPE},
-#line 186 "./sqlwords.gperf"
-    {"LEVEL", LEVEL_L},
-#line 188 "./sqlwords.gperf"
-    {"LIKE", LIKE},
-#line 317 "./sqlwords.gperf"
-    {"UPDATE", UPDATE},
-#line 40 "./sqlwords.gperf"
-    {"ADD", ADD},
-#line 27 "./sqlwords.gperf"
-    {"__TAG", __TAG_L},
-#line 320 "./sqlwords.gperf"
-    {"USING", USING},
-#line 236 "./sqlwords.gperf"
-    {"PURGE", PURGE},
-#line 104 "./sqlwords.gperf"
-    {"DATE", DATE_L},
-#line 50 "./sqlwords.gperf"
-    {"AS", AS},
-#line 261 "./sqlwords.gperf"
-    {"SAFE", SAFE_L},
-#line 105 "./sqlwords.gperf"
-    {"DATETIME", DATETIME},
-#line 152 "./sqlwords.gperf"
-    {"HAVING", HAVING},
-#line 239 "./sqlwords.gperf"
-    {"READ", READ_L},
-#line 228 "./sqlwords.gperf"
-    {"PLI", PLI},
-#line 64 "./sqlwords.gperf"
-    {"BITMAP", BITMAPPED},
-#line 43 "./sqlwords.gperf"
-    {"AGGREGATE", AGGREGATE},
-#line 255 "./sqlwords.gperf"
-    {"REVOKE", REVOKE},
-#line 39 "./sqlwords.gperf"
-    {"ADA", ADA},
-#line 240 "./sqlwords.gperf"
-    {"READS", READS},
-#line 59 "./sqlwords.gperf"
-    {"BEGIN", BEGINX},
-#line 118 "./sqlwords.gperf"
-    {"DTD", DTD},
-#line 106 "./sqlwords.gperf"
-    {"DECIMAL", DECIMAL_L},
-#line 337 "./sqlwords.gperf"
-    {"XPATH", XPATH},
-#line 241 "./sqlwords.gperf"
-    {"REAL", REAL},
-#line 331 "./sqlwords.gperf"
-    {"WHERE", WHERE},
-#line 122 "./sqlwords.gperf"
-    {"ENABLE", ENABLE_L},
-#line 124 "./sqlwords.gperf"
-    {"END", ENDX},
-#line 107 "./sqlwords.gperf"
-    {"DECLARE", DECLARE},
-#line 120 "./sqlwords.gperf"
-    {"ELSE", ELSE},
-#line 276 "./sqlwords.gperf"
-    {"SPARQL", SPARQL_L},
-#line 269 "./sqlwords.gperf"
-    {"SET", SET},
-#line 103 "./sqlwords.gperf"
-    {"DATA", DATA},
-#line 180 "./sqlwords.gperf"
-    {"JAVA", JAVA},
-#line 127 "./sqlwords.gperf"
-    {"EXCLUSIVE", EXCLUSIVE},
-#line 109 "./sqlwords.gperf"
-    {"DELETE", DELETE_L},
-#line 133 "./sqlwords.gperf"
-    {"FETCH", FETCH},
-#line 61 "./sqlwords.gperf"
-    {"BETWEEN", BETWEEN},
-#line 185 "./sqlwords.gperf"
-    {"LEFT", LEFT},
-#line 334 "./sqlwords.gperf"
-    {"WITHOUT", WITHOUT_L},
-#line 335 "./sqlwords.gperf"
-    {"WORK", WORK},
-#line 66 "./sqlwords.gperf"
-    {"BY", BY},
-#line 57 "./sqlwords.gperf"
-    {"BACKUP", BACKUP},
-#line 112 "./sqlwords.gperf"
-    {"DISABLE", DISABLE_L},
-#line 268 "./sqlwords.gperf"
-    {"SERIALIZABLE", SERIALIZABLE_L},
-#line 153 "./sqlwords.gperf"
-    {"HASH", HASH},
-#line 244 "./sqlwords.gperf"
-    {"REFERENCING", REFERENCING},
-#line 213 "./sqlwords.gperf"
-    {"OLD", OLD},
-#line 178 "./sqlwords.gperf"
-    {"IRI_ID", IRI_ID},
-#line 318 "./sqlwords.gperf"
-    {"USE", USE},
-#line 123 "./sqlwords.gperf"
-    {"ENCODING", ENCODING},
-#line 243 "./sqlwords.gperf"
-    {"REFERENCES", REFERENCES},
 #line 67 "./sqlwords.gperf"
     {"C", C},
-#line 193 "./sqlwords.gperf"
-    {"METHOD", METHOD},
-#line 129 "./sqlwords.gperf"
-    {"EXISTS", EXISTS},
-#line 190 "./sqlwords.gperf"
-    {"LOG", LOGX},
-#line 108 "./sqlwords.gperf"
-    {"DEFAULT", DEFAULT},
-#line 78 "./sqlwords.gperf"
-    {"CLOSE", CLOSE},
-#line 316 "./sqlwords.gperf"
-    {"UNIQUE", UNIQUE},
-#line 155 "./sqlwords.gperf"
-    {"IDENTIFIED", IDENTIFIED},
-#line 51 "./sqlwords.gperf"
-    {"ASC", ASC},
-#line 46 "./sqlwords.gperf"
-    {"AND", AND},
-#line 53 "./sqlwords.gperf"
-    {"ATTACH", ATTACH},
-#line 150 "./sqlwords.gperf"
-    {"GROUPING", GROUPING},
-#line 73 "./sqlwords.gperf"
-    {"CHAR", CHARACTER},
-#line 54 "./sqlwords.gperf"
-    {"ATTRIBUTE", ATTRIBUTE},
-#line 60 "./sqlwords.gperf"
-    {"BEST", BEST},
-#line 117 "./sqlwords.gperf"
-    {"DROP", DROP},
-#line 149 "./sqlwords.gperf"
-    {"GROUP", GROUP},
-#line 110 "./sqlwords.gperf"
-    {"DESC", DESC},
-#line 45 "./sqlwords.gperf"
-    {"ALTER", ALTER},
+#line 214 "./sqlwords.gperf"
+    {"ON", ON},
+#line 47 "./sqlwords.gperf"
+    {"ANY", ANY},
+#line 198 "./sqlwords.gperf"
+    {"NAME", NAME_L},
+#line 157 "./sqlwords.gperf"
+    {"IN", IN_L},
+#line 315 "./sqlwords.gperf"
+    {"UNION", UNION},
+#line 204 "./sqlwords.gperf"
+    {"NO", NO_L},
+#line 41 "./sqlwords.gperf"
+    {"ADMIN", ADMIN_L},
 #line 201 "./sqlwords.gperf"
     {"NEW", NEW},
 #line 97 "./sqlwords.gperf"
     {"CUBE", CUBE},
-#line 257 "./sqlwords.gperf"
-    {"RIGHT", RIGHT},
-#line 148 "./sqlwords.gperf"
-    {"GRANT", GRANT},
-#line 160 "./sqlwords.gperf"
-    {"INDEX", INDEX},
-#line 132 "./sqlwords.gperf"
-    {"EXIT", EXIT},
-#line 326 "./sqlwords.gperf"
-    {"VARIABLE", VARIABLE},
-#line 62 "./sqlwords.gperf"
-    {"BIGINT", BIGINT},
-#line 284 "./sqlwords.gperf"
-    {"START", START_L},
+#line 180 "./sqlwords.gperf"
+    {"JAVA", JAVA},
+#line 208 "./sqlwords.gperf"
+    {"NUMERIC", NUMERIC},
+#line 175 "./sqlwords.gperf"
+    {"INTO", INTO},
+#line 103 "./sqlwords.gperf"
+    {"DATA", DATA},
+#line 46 "./sqlwords.gperf"
+    {"AND", AND},
 #line 182 "./sqlwords.gperf"
     {"KEY", KEY},
-#line 256 "./sqlwords.gperf"
-    {"REXECUTE", REXECUTE},
-#line 179 "./sqlwords.gperf"
-    {"IRI_ID_8", IRI_ID_8},
-#line 234 "./sqlwords.gperf"
-    {"PROCEDURE", PROCEDURE},
-#line 306 "./sqlwords.gperf"
-    {"TIME", TIME},
-#line 161 "./sqlwords.gperf"
-    {"INDEX_NO_FILL", INDEX_NO_FILL},
-#line 75 "./sqlwords.gperf"
-    {"CHECK", CHECK},
-#line 157 "./sqlwords.gperf"
-    {"IN", IN_L},
-#line 246 "./sqlwords.gperf"
-    {"RENAME", RENAME},
-#line 145 "./sqlwords.gperf"
-    {"GENERATED", GENERATED},
-#line 245 "./sqlwords.gperf"
-    {"REMOTE", REMOTE},
-#line 56 "./sqlwords.gperf"
-    {"AUTOREGISTER", AUTOREGISTER_L},
-#line 115 "./sqlwords.gperf"
-    {"DO", DO},
-#line 144 "./sqlwords.gperf"
-    {"GENERAL", GENERAL},
-#line 314 "./sqlwords.gperf"
-    {"UNDER", UNDER},
-#line 192 "./sqlwords.gperf"
-    {"LOOP", LOOP},
-#line 285 "./sqlwords.gperf"
-    {"STYLE", STYLE},
-#line 170 "./sqlwords.gperf"
-    {"INT", INTEGER},
-#line 44 "./sqlwords.gperf"
-    {"ALL", ALL},
-#line 242 "./sqlwords.gperf"
-    {"REF", REF},
-#line 146 "./sqlwords.gperf"
-    {"GO", GO},
-#line 156 "./sqlwords.gperf"
-    {"IF", IF},
-#line 154 "./sqlwords.gperf"
-    {"IDENTITY", IDENTITY},
-#line 82 "./sqlwords.gperf"
-    {"COALESCE", COALESCE},
-#line 76 "./sqlwords.gperf"
-    {"CHECKED", CHECKED},
-#line 265 "./sqlwords.gperf"
-    {"SCHEMA", SCHEMA},
+#line 216 "./sqlwords.gperf"
+    {"OPTION", OPTION},
+#line 160 "./sqlwords.gperf"
+    {"INDEX", INDEX},
 #line 329 "./sqlwords.gperf"
     {"WHEN", WHEN},
-#line 81 "./sqlwords.gperf"
-    {"CLR", CLR},
-#line 219 "./sqlwords.gperf"
-    {"OUT", OUT_L},
-#line 233 "./sqlwords.gperf"
-    {"PRIVILEGES", PRIVILEGES},
-#line 272 "./sqlwords.gperf"
-    {"SNAPSHOT", SNAPSHOT},
-#line 305 "./sqlwords.gperf"
-    {"TIES", TIES},
-#line 220 "./sqlwords.gperf"
-    {"OUTER", OUTER},
-#line 271 "./sqlwords.gperf"
-    {"SMALLINT", SMALLINT},
+#line 85 "./sqlwords.gperf"
+    {"COLUMN", COLUMN},
+#line 203 "./sqlwords.gperf"
+    {"NOT", NOT},
+#line 92 "./sqlwords.gperf"
+    {"CONTINUE", CONTINUE},
+#line 66 "./sqlwords.gperf"
+    {"BY", BY},
+#line 322 "./sqlwords.gperf"
+    {"VALUE", VALUE},
+#line 235 "./sqlwords.gperf"
+    {"PUBLIC", PUBLIC},
 #line 71 "./sqlwords.gperf"
     {"CASE", CASE},
 #line 301 "./sqlwords.gperf"
     {"TABLE", TABLE},
-#line 196 "./sqlwords.gperf"
-    {"MODULE", MODULE},
-#line 171 "./sqlwords.gperf"
-    {"INTEGER", INTEGER},
+#line 314 "./sqlwords.gperf"
+    {"UNDER", UNDER},
+#line 146 "./sqlwords.gperf"
+    {"GO", GO},
+#line 181 "./sqlwords.gperf"
+    {"JOIN", JOIN},
+#line 104 "./sqlwords.gperf"
+    {"DATE", DATE_L},
+#line 124 "./sqlwords.gperf"
+    {"END", ENDX},
+#line 115 "./sqlwords.gperf"
+    {"DO", DO},
+#line 253 "./sqlwords.gperf"
+    {"RETURN", RETURN},
+#line 199 "./sqlwords.gperf"
+    {"NATURAL", NATURAL},
+#line 308 "./sqlwords.gperf"
+    {"TO", TO},
+#line 316 "./sqlwords.gperf"
+    {"UNIQUE", UNIQUE},
+#line 333 "./sqlwords.gperf"
+    {"WITH", WITH},
+#line 219 "./sqlwords.gperf"
+    {"OUT", OUT_L},
+#line 211 "./sqlwords.gperf"
+    {"OF", OF},
+#line 170 "./sqlwords.gperf"
+    {"INT", INTEGER},
+#line 321 "./sqlwords.gperf"
+    {"VALIDATE", VALIDATE_L},
 #line 328 "./sqlwords.gperf"
     {"VIEW", VIEW},
-#line 273 "./sqlwords.gperf"
-    {"SOFT", SOFT},
-#line 96 "./sqlwords.gperf"
-    {"CROSS", CROSS},
-#line 175 "./sqlwords.gperf"
-    {"INTO", INTO},
-#line 319 "./sqlwords.gperf"
-    {"USER", USER},
-#line 279 "./sqlwords.gperf"
-    {"SQLCODE", SQLCODE},
+#line 332 "./sqlwords.gperf"
+    {"WHILE", WHILE},
+#line 296 "./sqlwords.gperf"
+    {"T_MIN", T_MIN},
+#line 215 "./sqlwords.gperf"
+    {"OPEN", OPEN},
+#line 200 "./sqlwords.gperf"
+    {"NCHAR", NCHAR},
+#line 55 "./sqlwords.gperf"
+    {"AUTHORIZATION", AUTHORIZATION},
+#line 220 "./sqlwords.gperf"
+    {"OUTER", OUTER},
+#line 83 "./sqlwords.gperf"
+    {"COBOL", COBOL},
+#line 331 "./sqlwords.gperf"
+    {"WHERE", WHERE},
+#line 147 "./sqlwords.gperf"
+    {"GOTO", GOTO},
+#line 133 "./sqlwords.gperf"
+    {"FETCH", FETCH},
+#line 59 "./sqlwords.gperf"
+    {"BEGIN", BEGINX},
+#line 306 "./sqlwords.gperf"
+    {"TIME", TIME},
+#line 168 "./sqlwords.gperf"
+    {"INSTANCE", INSTANCE_L},
+#line 156 "./sqlwords.gperf"
+    {"IF", IF},
 #line 274 "./sqlwords.gperf"
     {"SOME", SOME},
-#line 299 "./sqlwords.gperf"
-    {"T_OUT", T_OUT},
-#line 49 "./sqlwords.gperf"
-    {"ARRAY", ARRAY},
+#line 72 "./sqlwords.gperf"
+    {"CAST", CAST},
+#line 173 "./sqlwords.gperf"
+    {"INTERNAL", INTERNAL},
+#line 61 "./sqlwords.gperf"
+    {"BETWEEN", BETWEEN},
+#line 42 "./sqlwords.gperf"
+    {"AFTER", AFTER},
+#line 39 "./sqlwords.gperf"
+    {"ADA", ADA},
+#line 131 "./sqlwords.gperf"
+    {"EXTRACT", EXTRACT},
+#line 304 "./sqlwords.gperf"
+    {"THEN", THEN},
+#line 206 "./sqlwords.gperf"
+    {"NULL", NULLX},
+#line 164 "./sqlwords.gperf"
+    {"INNER", INNER},
+#line 143 "./sqlwords.gperf"
+    {"FUNCTION", FUNCTION},
 #line 130 "./sqlwords.gperf"
     {"EXTERNAL", EXTERNAL},
-#line 26 "./sqlwords.gperf"
-    {"__COST", __COST},
-#line 267 "./sqlwords.gperf"
-    {"SELF", SELF_L},
-#line 210 "./sqlwords.gperf"
-    {"OBJECT_ID", OBJECT_ID},
+#line 75 "./sqlwords.gperf"
+    {"CHECK", CHECK},
+#line 140 "./sqlwords.gperf"
+    {"FOUND", FOUND},
+#line 286 "./sqlwords.gperf"
+    {"SYNC", SYNC},
+#line 153 "./sqlwords.gperf"
+    {"HASH", HASH},
+#line 295 "./sqlwords.gperf"
+    {"T_MAX", T_MAX},
+#line 132 "./sqlwords.gperf"
+    {"EXIT", EXIT},
+#line 197 "./sqlwords.gperf"
+    {"MUMPS", MUMPS},
+#line 122 "./sqlwords.gperf"
+    {"ENABLE", ENABLE_L},
+#line 68 "./sqlwords.gperf"
+    {"CALL", CALL},
+#line 40 "./sqlwords.gperf"
+    {"ADD", ADD},
+#line 48 "./sqlwords.gperf"
+    {"ARE", ARE},
+#line 174 "./sqlwords.gperf"
+    {"INTERVAL", INTERVAL},
+#line 317 "./sqlwords.gperf"
+    {"UPDATE", UPDATE},
 #line 165 "./sqlwords.gperf"
     {"INOUT", INOUT_L},
+#line 245 "./sqlwords.gperf"
+    {"REMOTE", REMOTE},
+#line 166 "./sqlwords.gperf"
+    {"INPUT", INPUT},
+#line 88 "./sqlwords.gperf"
+    {"COMPRESS", COMPRESS},
+#line 110 "./sqlwords.gperf"
+    {"DESC", DESC},
+#line 324 "./sqlwords.gperf"
+    {"VARBINARY", VARBINARY},
+#line 334 "./sqlwords.gperf"
+    {"WITHOUT", WITHOUT_L},
+#line 184 "./sqlwords.gperf"
+    {"LANGUAGE", LANGUAGE},
+#line 310 "./sqlwords.gperf"
+    {"TYPE", TYPE},
 #line 116 "./sqlwords.gperf"
     {"DOUBLE", DOUBLE_L},
+#line 217 "./sqlwords.gperf"
+    {"OR", OR},
+#line 51 "./sqlwords.gperf"
+    {"ASC", ASC},
+#line 86 "./sqlwords.gperf"
+    {"COMMIT", COMMIT},
+#line 171 "./sqlwords.gperf"
+    {"INTEGER", INTEGER},
+#line 105 "./sqlwords.gperf"
+    {"DATETIME", DATETIME},
+#line 78 "./sqlwords.gperf"
+    {"CLOSE", CLOSE},
+#line 194 "./sqlwords.gperf"
+    {"MODIFY", MODIFY},
 #line 294 "./sqlwords.gperf"
     {"T_IN", T_IN},
-#line 147 "./sqlwords.gperf"
-    {"GOTO", GOTO},
-#line 111 "./sqlwords.gperf"
-    {"DETERMINISTIC", DETERMINISTIC},
-#line 52 "./sqlwords.gperf"
-    {"ASSEMBLY", ASSEMBLY_L},
-#line 254 "./sqlwords.gperf"
-    {"RETURNS", RETURNS},
-#line 278 "./sqlwords.gperf"
-    {"SQL", SQL_L},
-#line 32 "./sqlwords.gperf"
-    {"__SOAP_NAME", __SOAP_NAME},
+#line 270 "./sqlwords.gperf"
+    {"SHUTDOWN", SHUTDOWN},
+#line 265 "./sqlwords.gperf"
+    {"SCHEMA", SCHEMA},
+#line 285 "./sqlwords.gperf"
+    {"STYLE", STYLE},
+#line 45 "./sqlwords.gperf"
+    {"ALTER", ALTER},
+#line 256 "./sqlwords.gperf"
+    {"REXECUTE", REXECUTE},
+#line 303 "./sqlwords.gperf"
+    {"TEXT", TEXT_L},
+#line 50 "./sqlwords.gperf"
+    {"AS", AS},
+#line 53 "./sqlwords.gperf"
+    {"ATTACH", ATTACH},
+#line 207 "./sqlwords.gperf"
+    {"NULLIF", NULLIF},
+#line 98 "./sqlwords.gperf"
+    {"CURRENT", CURRENT},
 #line 70 "./sqlwords.gperf"
     {"CASCADE", CASCADE},
-#line 289 "./sqlwords.gperf"
-    {"T_DIRECTION", T_DIRECTION},
-#line 223 "./sqlwords.gperf"
-    {"PASCAL", PASCAL_L},
-#line 197 "./sqlwords.gperf"
-    {"MUMPS", MUMPS},
-#line 195 "./sqlwords.gperf"
-    {"MODIFIES", MODIFIES},
-#line 184 "./sqlwords.gperf"
-    {"LANGUAGE", LANGUAGE},
-#line 38 "./sqlwords.gperf"
-    {"__SOAP_OPTIONS", __SOAP_OPTIONS},
+#line 255 "./sqlwords.gperf"
+    {"REVOKE", REVOKE},
+#line 335 "./sqlwords.gperf"
+    {"WORK", WORK},
+#line 318 "./sqlwords.gperf"
+    {"USE", USE},
+#line 139 "./sqlwords.gperf"
+    {"FORTRAN", FORTRAN},
+#line 261 "./sqlwords.gperf"
+    {"SAFE", SAFE_L},
+#line 236 "./sqlwords.gperf"
+    {"PURGE", PURGE},
+#line 196 "./sqlwords.gperf"
+    {"MODULE", MODULE},
+#line 119 "./sqlwords.gperf"
+    {"DYNAMIC", DYNAMIC},
+#line 169 "./sqlwords.gperf"
+    {"INSTEAD", INSTEAD},
+#line 337 "./sqlwords.gperf"
+    {"XPATH", XPATH},
+#line 152 "./sqlwords.gperf"
+    {"HAVING", HAVING},
+#line 212 "./sqlwords.gperf"
+    {"OFF", OFF},
+#line 151 "./sqlwords.gperf"
+    {"HANDLER", HANDLER},
+#line 260 "./sqlwords.gperf"
+    {"ROLE", ROLE_L},
+#line 49 "./sqlwords.gperf"
+    {"ARRAY", ARRAY},
+#line 269 "./sqlwords.gperf"
+    {"SET", SET},
 #line 275 "./sqlwords.gperf"
     {"SOURCE", SOURCE},
-#line 134 "./sqlwords.gperf"
-    {"FINAL", FINAL_L},
-#line 48 "./sqlwords.gperf"
-    {"ARE", ARE},
-#line 315 "./sqlwords.gperf"
-    {"UNION", UNION},
-#line 310 "./sqlwords.gperf"
-    {"TYPE", TYPE},
-#line 303 "./sqlwords.gperf"
-    {"TEXT", TEXT_L},
-#line 191 "./sqlwords.gperf"
-    {"LONG", LONG_L},
-#line 206 "./sqlwords.gperf"
-    {"NULL", NULLX},
-#line 99 "./sqlwords.gperf"
-    {"CURRENT_DATE", CURRENT_DATE},
+#line 73 "./sqlwords.gperf"
+    {"CHAR", CHARACTER},
+#line 325 "./sqlwords.gperf"
+    {"VARCHAR", VARCHAR},
+#line 330 "./sqlwords.gperf"
+    {"WHENEVER", WHENEVER},
 #line 262 "./sqlwords.gperf"
     {"SAME_AS", SAME_AS},
-#line 65 "./sqlwords.gperf"
-    {"BREAKUP", BREAKUP},
+#line 246 "./sqlwords.gperf"
+    {"RENAME", RENAME},
+#line 209 "./sqlwords.gperf"
+    {"NVARCHAR", NVARCHAR},
+#line 205 "./sqlwords.gperf"
+    {"NOVALIDATE", NOVALIDATE_L},
+#line 95 "./sqlwords.gperf"
+    {"CREATE", CREATE},
+#line 120 "./sqlwords.gperf"
+    {"ELSE", ELSE},
+#line 309 "./sqlwords.gperf"
+    {"TOP", TOP},
+#line 191 "./sqlwords.gperf"
+    {"LONG", LONG_L},
+#line 213 "./sqlwords.gperf"
+    {"OLD", OLD},
+#line 76 "./sqlwords.gperf"
+    {"CHECKED", CHECKED},
+#line 84 "./sqlwords.gperf"
+    {"COLLATE", COLLATE},
+#line 229 "./sqlwords.gperf"
+    {"POSITION", POSITION_L},
+#line 128 "./sqlwords.gperf"
+    {"EXECUTE", EXECUTE},
+#line 186 "./sqlwords.gperf"
+    {"LEVEL", LEVEL_L},
+#line 123 "./sqlwords.gperf"
+    {"ENCODING", ENCODING},
 #line 142 "./sqlwords.gperf"
     {"FULL", FULL},
-#line 151 "./sqlwords.gperf"
-    {"HANDLER", HANDLER},
-#line 162 "./sqlwords.gperf"
-    {"INDEX_ONLY", INDEX_ONLY},
-#line 181 "./sqlwords.gperf"
-    {"JOIN", JOIN},
-#line 199 "./sqlwords.gperf"
-    {"NATURAL", NATURAL},
-#line 80 "./sqlwords.gperf"
-    {"CLUSTERED", CLUSTERED},
-#line 293 "./sqlwords.gperf"
-    {"T_FINAL_AS", T_FINAL_AS},
-#line 42 "./sqlwords.gperf"
-    {"AFTER", AFTER},
+#line 320 "./sqlwords.gperf"
+    {"USING", USING},
+#line 218 "./sqlwords.gperf"
+    {"ORDER", ORDER},
+#line 63 "./sqlwords.gperf"
+    {"BINARY", BINARY},
+#line 183 "./sqlwords.gperf"
+    {"KEYSET", KEYSET},
+#line 254 "./sqlwords.gperf"
+    {"RETURNS", RETURNS},
+#line 242 "./sqlwords.gperf"
+    {"REF", REF},
+#line 69 "./sqlwords.gperf"
+    {"CALLED", CALLED},
+#line 190 "./sqlwords.gperf"
+    {"LOG", LOGX},
+#line 79 "./sqlwords.gperf"
+    {"CLUSTER", CLUSTER},
+#line 134 "./sqlwords.gperf"
+    {"FINAL", FINAL_L},
+#line 221 "./sqlwords.gperf"
+    {"OVERRIDING", OVERRIDING},
+#line 118 "./sqlwords.gperf"
+    {"DTD", DTD},
+#line 326 "./sqlwords.gperf"
+    {"VARIABLE", VARIABLE},
+#line 144 "./sqlwords.gperf"
+    {"GENERAL", GENERAL},
+#line 109 "./sqlwords.gperf"
+    {"DELETE", DELETE_L},
+#line 99 "./sqlwords.gperf"
+    {"CURRENT_DATE", CURRENT_DATE},
+#line 93 "./sqlwords.gperf"
+    {"CONVERT", CONVERT},
+#line 192 "./sqlwords.gperf"
+    {"LOOP", LOOP},
+#line 100 "./sqlwords.gperf"
+    {"CURRENT_TIME", CURRENT_TIME},
+#line 176 "./sqlwords.gperf"
+    {"IS", IS},
+#line 222 "./sqlwords.gperf"
+    {"PARTITION", PARTITION},
+#line 89 "./sqlwords.gperf"
+    {"CONSTRAINT", CONSTRAINT},
+#line 91 "./sqlwords.gperf"
+    {"CONTAINS", CONTAINS},
+#line 27 "./sqlwords.gperf"
+    {"__TAG", __TAG_L},
+#line 302 "./sqlwords.gperf"
+    {"TEMPORARY", TEMPORARY},
+#line 58 "./sqlwords.gperf"
+    {"BEFORE", BEFORE},
+#line 336 "./sqlwords.gperf"
+    {"XML", XML},
+#line 60 "./sqlwords.gperf"
+    {"BEST", BEST},
+#line 224 "./sqlwords.gperf"
+    {"PASSWORD", PASSWORD},
+#line 96 "./sqlwords.gperf"
+    {"CROSS", CROSS},
+#line 319 "./sqlwords.gperf"
+    {"USER", USER},
+#line 202 "./sqlwords.gperf"
+    {"NONINCREMENTAL", NONINCREMENTAL},
+#line 267 "./sqlwords.gperf"
+    {"SELF", SELF_L},
+#line 228 "./sqlwords.gperf"
+    {"PLI", PLI},
+#line 44 "./sqlwords.gperf"
+    {"ALL", ALL},
+#line 257 "./sqlwords.gperf"
+    {"RIGHT", RIGHT},
+#line 258 "./sqlwords.gperf"
+    {"ROLLBACK", ROLLBACK},
+#line 54 "./sqlwords.gperf"
+    {"ATTRIBUTE", ATTRIBUTE},
+#line 185 "./sqlwords.gperf"
+    {"LEFT", LEFT},
+#line 249 "./sqlwords.gperf"
+    {"REPLICATION", REPLICATION},
+#line 137 "./sqlwords.gperf"
+    {"FOREACH", FOREACH},
+#line 77 "./sqlwords.gperf"
+    {"CHECKPOINT", CHECKPOINT},
+#line 138 "./sqlwords.gperf"
+    {"FOREIGN", FOREIGN},
+#line 239 "./sqlwords.gperf"
+    {"READ", READ_L},
+#line 193 "./sqlwords.gperf"
+    {"METHOD", METHOD},
+#line 141 "./sqlwords.gperf"
+    {"FROM", FROM},
 #line 225 "./sqlwords.gperf"
     {"PERCENT", PERCENT},
-#line 198 "./sqlwords.gperf"
-    {"NAME", NAME_L},
-#line 288 "./sqlwords.gperf"
-    {"T_CYCLES_ONLY", T_CYCLES_ONLY},
+#line 82 "./sqlwords.gperf"
+    {"COALESCE", COALESCE},
+#line 149 "./sqlwords.gperf"
+    {"GROUP", GROUP},
+#line 87 "./sqlwords.gperf"
+    {"COMMITTED", COMMITTED_L},
+#line 188 "./sqlwords.gperf"
+    {"LIKE", LIKE},
+#line 273 "./sqlwords.gperf"
+    {"SOFT", SOFT},
+#line 117 "./sqlwords.gperf"
+    {"DROP", DROP},
+#line 43 "./sqlwords.gperf"
+    {"AGGREGATE", AGGREGATE},
+#line 114 "./sqlwords.gperf"
+    {"DISTINCT", DISTINCT},
+#line 136 "./sqlwords.gperf"
+    {"FOR", FOR},
+#line 167 "./sqlwords.gperf"
+    {"INSERT", INSERT},
+#line 101 "./sqlwords.gperf"
+    {"CURRENT_TIMESTAMP", CURRENT_TIMESTAMP},
+#line 125 "./sqlwords.gperf"
+    {"ESCAPE", ESCAPE},
+#line 111 "./sqlwords.gperf"
+    {"DETERMINISTIC", DETERMINISTIC},
+#line 56 "./sqlwords.gperf"
+    {"AUTOREGISTER", AUTOREGISTER_L},
+#line 154 "./sqlwords.gperf"
+    {"IDENTITY", IDENTITY},
 #line 135 "./sqlwords.gperf"
     {"FLOAT", FLOAT_L},
-#line 69 "./sqlwords.gperf"
-    {"CALLED", CALLED},
-#line 33 "./sqlwords.gperf"
-    {"__SOAP_TYPE", __SOAP_TYPE},
-#line 322 "./sqlwords.gperf"
-    {"VALUE", VALUE},
-#line 68 "./sqlwords.gperf"
-    {"CALL", CALL},
-#line 169 "./sqlwords.gperf"
-    {"INSTEAD", INSTEAD},
-#line 292 "./sqlwords.gperf"
-    {"T_EXISTS", T_EXISTS},
-#line 63 "./sqlwords.gperf"
-    {"BINARY", BINARY},
+#line 163 "./sqlwords.gperf"
+    {"INDICATOR", INDICATOR},
+#line 187 "./sqlwords.gperf"
+    {"LIBRARY", LIBRARY_L},
 #line 126 "./sqlwords.gperf"
     {"EXCEPT", EXCEPT},
-#line 173 "./sqlwords.gperf"
-    {"INTERNAL", INTERNAL},
-#line 131 "./sqlwords.gperf"
-    {"EXTRACT", EXTRACT},
-#line 41 "./sqlwords.gperf"
-    {"ADMIN", ADMIN_L},
-#line 217 "./sqlwords.gperf"
-    {"OR", OR},
 #line 281 "./sqlwords.gperf"
     {"SQLSTATE", SQLSTATE_L},
-#line 174 "./sqlwords.gperf"
-    {"INTERVAL", INTERVAL},
-#line 36 "./sqlwords.gperf"
-    {"__SOAP_DIME_ENC", __SOAP_DIME_ENC},
-#line 30 "./sqlwords.gperf"
-    {"__SOAP_HEADER", __SOAP_HEADER},
+#line 250 "./sqlwords.gperf"
+    {"RESIGNAL", RESIGNAL},
+#line 106 "./sqlwords.gperf"
+    {"DECIMAL", DECIMAL_L},
+#line 64 "./sqlwords.gperf"
+    {"BITMAP", BITMAPPED},
+#line 264 "./sqlwords.gperf"
+    {"UNRESTRICTED", UNRESTRICTED_L},
 #line 283 "./sqlwords.gperf"
     {"STATIC", STATIC_L},
-#line 251 "./sqlwords.gperf"
-    {"RESTRICT", RESTRICT},
-#line 200 "./sqlwords.gperf"
-    {"NCHAR", NCHAR},
-#line 218 "./sqlwords.gperf"
-    {"ORDER", ORDER},
-#line 128 "./sqlwords.gperf"
-    {"EXECUTE", EXECUTE},
-#line 286 "./sqlwords.gperf"
-    {"SYNC", SYNC},
-#line 166 "./sqlwords.gperf"
-    {"INPUT", INPUT},
-#line 308 "./sqlwords.gperf"
-    {"TO", TO},
-#line 295 "./sqlwords.gperf"
-    {"T_MAX", T_MAX},
-#line 119 "./sqlwords.gperf"
-    {"DYNAMIC", DYNAMIC},
-#line 187 "./sqlwords.gperf"
-    {"LIBRARY", LIBRARY_L},
-#line 227 "./sqlwords.gperf"
-    {"PERSISTENT", PERSISTENT},
-#line 226 "./sqlwords.gperf"
-    {"PERMISSION_SET", PERMISSION_SET},
-#line 95 "./sqlwords.gperf"
-    {"CREATE", CREATE},
-#line 29 "./sqlwords.gperf"
-    {"__SOAP_DOCW", __SOAP_DOCW},
-#line 34 "./sqlwords.gperf"
-    {"__SOAP_XML_TYPE", __SOAP_XML_TYPE},
-#line 37 "./sqlwords.gperf"
-    {"__SOAP_ENC_MIME", __SOAP_ENC_MIME},
-#line 183 "./sqlwords.gperf"
-    {"KEYSET", KEYSET},
-#line 313 "./sqlwords.gperf"
-    {"TRIGGER", TRIGGER},
-#line 260 "./sqlwords.gperf"
-    {"ROLE", ROLE_L},
-#line 238 "./sqlwords.gperf"
-    {"RDF_BOX", RDF_BOX_L},
-#line 224 "./sqlwords.gperf"
-    {"PASSWORD", PASSWORD},
-#line 83 "./sqlwords.gperf"
-    {"COBOL", COBOL},
-#line 102 "./sqlwords.gperf"
-    {"CURSOR", CURSOR},
-#line 164 "./sqlwords.gperf"
-    {"INNER", INNER},
-#line 114 "./sqlwords.gperf"
-    {"DISTINCT", DISTINCT},
-#line 304 "./sqlwords.gperf"
-    {"THEN", THEN},
+#line 241 "./sqlwords.gperf"
+    {"REAL", REAL},
+#line 305 "./sqlwords.gperf"
+    {"TIES", TIES},
+#line 81 "./sqlwords.gperf"
+    {"CLR", CLR},
+#line 299 "./sqlwords.gperf"
+    {"T_OUT", T_OUT},
+#line 57 "./sqlwords.gperf"
+    {"BACKUP", BACKUP},
 #line 327 "./sqlwords.gperf"
     {"VECTOR", VECTOR_L},
-#line 204 "./sqlwords.gperf"
-    {"NO", NO_L},
-#line 214 "./sqlwords.gperf"
-    {"ON", ON},
-#line 248 "./sqlwords.gperf"
-    {"REPLACING", REPLACING},
-#line 312 "./sqlwords.gperf"
-    {"TRANSITIVE", TRANSITIVE},
-#line 72 "./sqlwords.gperf"
-    {"CAST", CAST},
-#line 266 "./sqlwords.gperf"
-    {"SELECT", SELECT},
-#line 336 "./sqlwords.gperf"
-    {"XML", XML},
-#line 209 "./sqlwords.gperf"
-    {"NVARCHAR", NVARCHAR},
-#line 203 "./sqlwords.gperf"
-    {"NOT", NOT},
-#line 235 "./sqlwords.gperf"
-    {"PUBLIC", PUBLIC},
+#line 238 "./sqlwords.gperf"
+    {"RDF_BOX", RDF_BOX_L},
+#line 289 "./sqlwords.gperf"
+    {"T_DIRECTION", T_DIRECTION},
+#line 240 "./sqlwords.gperf"
+    {"READS", READS},
+#line 52 "./sqlwords.gperf"
+    {"ASSEMBLY", ASSEMBLY_L},
+#line 113 "./sqlwords.gperf"
+    {"DISCONNECT", DISCONNECT},
+#line 277 "./sqlwords.gperf"
+    {"SPECIFIC", SPECIFIC},
+#line 107 "./sqlwords.gperf"
+    {"DECLARE", DECLARE},
+#line 177 "./sqlwords.gperf"
+    {"ISOLATION", ISOLATION_L},
 #line 323 "./sqlwords.gperf"
     {"VALUES", VALUES},
-#line 31 "./sqlwords.gperf"
-    {"__SOAP_HTTP", __SOAP_HTTP},
-#line 211 "./sqlwords.gperf"
-    {"OF", OF},
-#line 247 "./sqlwords.gperf"
-    {"REPEATABLE", REPEATABLE_L},
-#line 168 "./sqlwords.gperf"
-    {"INSTANCE", INSTANCE_L},
-#line 309 "./sqlwords.gperf"
-    {"TOP", TOP},
-#line 296 "./sqlwords.gperf"
-    {"T_MIN", T_MIN},
-#line 98 "./sqlwords.gperf"
-    {"CURRENT", CURRENT},
-#line 330 "./sqlwords.gperf"
-    {"WHENEVER", WHENEVER},
-#line 79 "./sqlwords.gperf"
-    {"CLUSTER", CLUSTER},
-#line 250 "./sqlwords.gperf"
-    {"RESIGNAL", RESIGNAL},
-#line 136 "./sqlwords.gperf"
-    {"FOR", FOR},
-#line 291 "./sqlwords.gperf"
-    {"T_END_FLAG", T_END_FLAG},
-#line 208 "./sqlwords.gperf"
-    {"NUMERIC", NUMERIC},
+#line 148 "./sqlwords.gperf"
+    {"GRANT", GRANT},
+#line 237 "./sqlwords.gperf"
+    {"QUIETCAST", QUIETCAST_L},
+#line 145 "./sqlwords.gperf"
+    {"GENERATED", GENERATED},
+#line 272 "./sqlwords.gperf"
+    {"SNAPSHOT", SNAPSHOT},
+#line 195 "./sqlwords.gperf"
+    {"MODIFIES", MODIFIES},
+#line 102 "./sqlwords.gperf"
+    {"CURSOR", CURSOR},
+#line 65 "./sqlwords.gperf"
+    {"BREAKUP", BREAKUP},
+#line 162 "./sqlwords.gperf"
+    {"INDEX_ONLY", INDEX_ONLY},
+#line 80 "./sqlwords.gperf"
+    {"CLUSTERED", CLUSTERED},
+#line 230 "./sqlwords.gperf"
+    {"PRECISION", PRECISION},
+#line 263 "./sqlwords.gperf"
+    {"UNCOMMITTED", UNCOMMITTED_L},
 #line 232 "./sqlwords.gperf"
     {"PRIMARY", PRIMARY},
-#line 253 "./sqlwords.gperf"
-    {"RETURN", RETURN},
-#line 35 "./sqlwords.gperf"
-    {"__SOAP_FAULT", __SOAP_FAULT},
-#line 88 "./sqlwords.gperf"
-    {"COMPRESS", COMPRESS},
-#line 205 "./sqlwords.gperf"
-    {"NOVALIDATE", NOVALIDATE_L},
-#line 321 "./sqlwords.gperf"
-    {"VALIDATE", VALIDATE_L},
-#line 325 "./sqlwords.gperf"
-    {"VARCHAR", VARCHAR},
-#line 91 "./sqlwords.gperf"
-    {"CONTAINS", CONTAINS},
-#line 137 "./sqlwords.gperf"
-    {"FOREACH", FOREACH},
-#line 100 "./sqlwords.gperf"
-    {"CURRENT_TIME", CURRENT_TIME},
-#line 140 "./sqlwords.gperf"
-    {"FOUND", FOUND},
-#line 47 "./sqlwords.gperf"
-    {"ANY", ANY},
+#line 179 "./sqlwords.gperf"
+    {"IRI_ID_8", IRI_ID_8},
+#line 127 "./sqlwords.gperf"
+    {"EXCLUSIVE", EXCLUSIVE},
+#line 311 "./sqlwords.gperf"
+    {"TRANSACTION", TRANSACTION_L},
+#line 259 "./sqlwords.gperf"
+    {"ROLLUP", ROLLUP},
+#line 121 "./sqlwords.gperf"
+    {"ELSEIF", ELSEIF},
+#line 129 "./sqlwords.gperf"
+    {"EXISTS", EXISTS},
+#line 278 "./sqlwords.gperf"
+    {"SQL", SQL_L},
+#line 284 "./sqlwords.gperf"
+    {"START", START_L},
+#line 189 "./sqlwords.gperf"
+    {"LOCATOR", LOCATOR},
+#line 251 "./sqlwords.gperf"
+    {"RESTRICT", RESTRICT},
+#line 280 "./sqlwords.gperf"
+    {"SQLEXCEPTION", SQLEXCEPTION},
+#line 313 "./sqlwords.gperf"
+    {"TRIGGER", TRIGGER},
 #line 231 "./sqlwords.gperf"
     {"PREFETCH", PREFETCH},
-#line 212 "./sqlwords.gperf"
-    {"OFF", OFF},
+#line 94 "./sqlwords.gperf"
+    {"CORRESPONDING", CORRESPONDING},
 #line 172 "./sqlwords.gperf"
     {"INTERSECT", INTERSECT},
-#line 264 "./sqlwords.gperf"
-    {"UNRESTRICTED", UNRESTRICTED_L},
-#line 141 "./sqlwords.gperf"
-    {"FROM", FROM},
-#line 55 "./sqlwords.gperf"
-    {"AUTHORIZATION", AUTHORIZATION},
-#line 189 "./sqlwords.gperf"
-    {"LOCATOR", LOCATOR},
-#line 121 "./sqlwords.gperf"
-    {"ELSEIF", ELSEIF},
-#line 263 "./sqlwords.gperf"
-    {"UNCOMMITTED", UNCOMMITTED_L},
-#line 143 "./sqlwords.gperf"
-    {"FUNCTION", FUNCTION},
-#line 229 "./sqlwords.gperf"
-    {"POSITION", POSITION_L},
-#line 311 "./sqlwords.gperf"
-    {"TRANSACTION", TRANSACTION_L},
-#line 270 "./sqlwords.gperf"
-    {"SHUTDOWN", SHUTDOWN},
-#line 163 "./sqlwords.gperf"
-    {"INDICATOR", INDICATOR},
-#line 215 "./sqlwords.gperf"
-    {"OPEN", OPEN},
-#line 158 "./sqlwords.gperf"
-    {"INCREMENTAL", INCREMENTAL},
+#line 112 "./sqlwords.gperf"
+    {"DISABLE", DISABLE_L},
+#line 223 "./sqlwords.gperf"
+    {"PASCAL", PASCAL_L},
+#line 307 "./sqlwords.gperf"
+    {"TIMESTAMP", TIMESTAMP},
+#line 62 "./sqlwords.gperf"
+    {"BIGINT", BIGINT},
 #line 74 "./sqlwords.gperf"
     {"CHARACTER", CHARACTER},
 #line 252 "./sqlwords.gperf"
     {"RESULT", RESULT},
-#line 138 "./sqlwords.gperf"
-    {"FOREIGN", FOREIGN},
-#line 297 "./sqlwords.gperf"
-    {"T_NO_CYCLES", T_NO_CYCLES},
-#line 94 "./sqlwords.gperf"
-    {"CORRESPONDING", CORRESPONDING},
-#line 258 "./sqlwords.gperf"
-    {"ROLLBACK", ROLLBACK},
-#line 101 "./sqlwords.gperf"
-    {"CURRENT_TIMESTAMP", CURRENT_TIMESTAMP},
-#line 277 "./sqlwords.gperf"
-    {"SPECIFIC", SPECIFIC},
-#line 194 "./sqlwords.gperf"
-    {"MODIFY", MODIFY},
-#line 28 "./sqlwords.gperf"
-    {"__SOAP_DOC", __SOAP_DOC},
-#line 216 "./sqlwords.gperf"
-    {"OPTION", OPTION},
-#line 177 "./sqlwords.gperf"
-    {"ISOLATION", ISOLATION_L},
-#line 307 "./sqlwords.gperf"
-    {"TIMESTAMP", TIMESTAMP},
-#line 167 "./sqlwords.gperf"
-    {"INSERT", INSERT},
-#line 259 "./sqlwords.gperf"
-    {"ROLLUP", ROLLUP},
-#line 290 "./sqlwords.gperf"
-    {"T_DISTINCT", T_DISTINCT},
-#line 249 "./sqlwords.gperf"
-    {"REPLICATION", REPLICATION},
-#line 84 "./sqlwords.gperf"
-    {"COLLATE", COLLATE},
-#line 113 "./sqlwords.gperf"
-    {"DISCONNECT", DISCONNECT},
-#line 139 "./sqlwords.gperf"
-    {"FORTRAN", FORTRAN},
-#line 300 "./sqlwords.gperf"
-    {"T_SHORTEST_ONLY", T_SHORTEST_ONLY},
+#line 178 "./sqlwords.gperf"
+    {"IRI_ID", IRI_ID},
+#line 90 "./sqlwords.gperf"
+    {"CONSTRUCTOR", CONSTRUCTOR},
+#line 108 "./sqlwords.gperf"
+    {"DEFAULT", DEFAULT},
+#line 248 "./sqlwords.gperf"
+    {"REPLACING", REPLACING},
+#line 279 "./sqlwords.gperf"
+    {"SQLCODE", SQLCODE},
 #line 287 "./sqlwords.gperf"
     {"SYSTEM", SYSTEM},
-#line 237 "./sqlwords.gperf"
-    {"QUIETCAST", QUIETCAST_L},
-#line 92 "./sqlwords.gperf"
-    {"CONTINUE", CONTINUE},
+#line 150 "./sqlwords.gperf"
+    {"GROUPING", GROUPING},
+#line 37 "./sqlwords.gperf"
+    {"__SOAP_ENC_MIME", __SOAP_ENC_MIME},
 #line 159 "./sqlwords.gperf"
     {"INCREMENT", INCREMENT_L},
-#line 87 "./sqlwords.gperf"
-    {"COMMITTED", COMMITTED_L},
-#line 222 "./sqlwords.gperf"
-    {"PARTITION", PARTITION},
+#line 266 "./sqlwords.gperf"
+    {"SELECT", SELECT},
+#line 312 "./sqlwords.gperf"
+    {"TRANSITIVE", TRANSITIVE},
+#line 234 "./sqlwords.gperf"
+    {"PROCEDURE", PROCEDURE},
+#line 244 "./sqlwords.gperf"
+    {"REFERENCING", REFERENCING},
 #line 298 "./sqlwords.gperf"
     {"T_NO_ORDER", T_NO_ORDER},
+#line 293 "./sqlwords.gperf"
+    {"T_FINAL_AS", T_FINAL_AS},
+#line 32 "./sqlwords.gperf"
+    {"__SOAP_NAME", __SOAP_NAME},
+#line 290 "./sqlwords.gperf"
+    {"T_DISTINCT", T_DISTINCT},
+#line 155 "./sqlwords.gperf"
+    {"IDENTIFIED", IDENTIFIED},
+#line 161 "./sqlwords.gperf"
+    {"INDEX_NO_FILL", INDEX_NO_FILL},
+#line 243 "./sqlwords.gperf"
+    {"REFERENCES", REFERENCES},
+#line 28 "./sqlwords.gperf"
+    {"__SOAP_DOC", __SOAP_DOC},
+#line 29 "./sqlwords.gperf"
+    {"__SOAP_DOCW", __SOAP_DOCW},
+#line 158 "./sqlwords.gperf"
+    {"INCREMENTAL", INCREMENTAL},
+#line 33 "./sqlwords.gperf"
+    {"__SOAP_TYPE", __SOAP_TYPE},
+#line 227 "./sqlwords.gperf"
+    {"PERSISTENT", PERSISTENT},
+#line 268 "./sqlwords.gperf"
+    {"SERIALIZABLE", SERIALIZABLE_L},
+#line 271 "./sqlwords.gperf"
+    {"SMALLINT", SMALLINT},
+#line 26 "./sqlwords.gperf"
+    {"__COST", __COST},
+#line 247 "./sqlwords.gperf"
+    {"REPEATABLE", REPEATABLE_L},
+#line 36 "./sqlwords.gperf"
+    {"__SOAP_DIME_ENC", __SOAP_DIME_ENC},
+#line 291 "./sqlwords.gperf"
+    {"T_END_FLAG", T_END_FLAG},
 #line 282 "./sqlwords.gperf"
     {"SQLWARNING", SQLWARNING},
-#line 77 "./sqlwords.gperf"
-    {"CHECKPOINT", CHECKPOINT},
-#line 207 "./sqlwords.gperf"
-    {"NULLIF", NULLIF},
-#line 302 "./sqlwords.gperf"
-    {"TEMPORARY", TEMPORARY},
-#line 324 "./sqlwords.gperf"
-    {"VARBINARY", VARBINARY},
-#line 221 "./sqlwords.gperf"
-    {"OVERRIDING", OVERRIDING},
-#line 86 "./sqlwords.gperf"
-    {"COMMIT", COMMIT},
-#line 93 "./sqlwords.gperf"
-    {"CONVERT", CONVERT},
-#line 230 "./sqlwords.gperf"
-    {"PRECISION", PRECISION},
-#line 280 "./sqlwords.gperf"
-    {"SQLEXCEPTION", SQLEXCEPTION},
-#line 85 "./sqlwords.gperf"
-    {"COLUMN", COLUMN},
-#line 202 "./sqlwords.gperf"
-    {"NONINCREMENTAL", NONINCREMENTAL},
-#line 90 "./sqlwords.gperf"
-    {"CONSTRUCTOR", CONSTRUCTOR},
-#line 89 "./sqlwords.gperf"
-    {"CONSTRAINT", CONSTRAINT}
+#line 210 "./sqlwords.gperf"
+    {"OBJECT_ID", OBJECT_ID},
+#line 35 "./sqlwords.gperf"
+    {"__SOAP_FAULT", __SOAP_FAULT},
+#line 297 "./sqlwords.gperf"
+    {"T_NO_CYCLES", T_NO_CYCLES},
+#line 226 "./sqlwords.gperf"
+    {"PERMISSION_SET", PERMISSION_SET},
+#line 34 "./sqlwords.gperf"
+    {"__SOAP_XML_TYPE", __SOAP_XML_TYPE},
+#line 292 "./sqlwords.gperf"
+    {"T_EXISTS", T_EXISTS},
+#line 276 "./sqlwords.gperf"
+    {"SPARQL", SPARQL_L},
+#line 30 "./sqlwords.gperf"
+    {"__SOAP_HEADER", __SOAP_HEADER},
+#line 233 "./sqlwords.gperf"
+    {"PRIVILEGES", PRIVILEGES},
+#line 288 "./sqlwords.gperf"
+    {"T_CYCLES_ONLY", T_CYCLES_ONLY},
+#line 31 "./sqlwords.gperf"
+    {"__SOAP_HTTP", __SOAP_HTTP},
+#line 300 "./sqlwords.gperf"
+    {"T_SHORTEST_ONLY", T_SHORTEST_ONLY},
+#line 38 "./sqlwords.gperf"
+    {"__SOAP_OPTIONS", __SOAP_OPTIONS}
   };
 
 static const short lookup[] =
@@ -753,227 +753,217 @@ static const short lookup[] =
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-      0,  -1,  -1,   1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,   2,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,   3,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,   2,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   4,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,   3,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,   4,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,   5,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,   6,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,   7,  -1,  -1,  -1,  -1,  -1,  -1,
-      8,  -1,   9,  -1,  -1,  -1,  -1,  -1,  -1,  10,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  11,
-     -1,  -1,  12,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     13,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  14,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  15,  -1,  16,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  17,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  18,  -1,  -1,  -1,  -1,  -1,
+     -1,   5,  -1,   6,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  19,  -1,  -1,  -1,  -1,
-     -1,  -1,  20,  -1,  -1,  21,  -1,  22,  -1,  23,
-     -1,  -1,  24,  -1,  25,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  26,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  27,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  28,  -1,  -1,  -1,  -1,  29,
-     -1,  -1,  30,  -1,  -1,  -1,  -1,  -1,  31,  -1,
-     -1,  -1,  -1,  -1,  32,  33,  -1,  -1,  -1,  -1,
-     -1,  -1,  34,  -1,  -1,  -1,  -1,  35,  -1,  -1,
-     -1,  36,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  37,
-     -1,  -1,  -1,  -1,  -1,  -1,  38,  -1,  -1,  39,
-     40,  -1,  41,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  42,  -1,  -1,  43,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  44,  -1,  -1,  -1,  -1,  -1,  45,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     46,  -1,  47,  -1,  -1,  48,  49,  -1,  -1,  -1,
-     50,  -1,  51,  52,  53,  54,  -1,  -1,  -1,  -1,
-     55,  -1,  -1,  56,  -1,  -1,  57,  -1,  -1,  58,
-     -1,  -1,  -1,  -1,  59,  60,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  61,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  62,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     63,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     64,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  65,  -1,  -1,
-     66,  -1,  -1,  -1,  -1,  -1,  -1,  67,  -1,  -1,
-     68,  -1,  -1,  -1,  69,  -1,  -1,  -1,  70,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  71,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  72,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  73,  -1,  74,  -1,  75,
-     -1,  76,  -1,  77,  -1,  -1,  -1,  -1,  78,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  79,  80,  81,  -1,
-     82,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  83,
-     -1,  84,  -1,  -1,  -1,  -1,  -1,  -1,  85,  -1,
-     -1,  -1,  -1,  86,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  87,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  88,  -1,  -1,
+     -1,  -1,  -1,  -1,   7,  -1,   8,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  89,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  90,  91,  -1,  -1,  -1,  -1,  -1,
-     92,  93,  94,  95,  -1,  96,  97,  98,  -1,  -1,
-     -1,  99, 100,  -1,  -1, 101, 102, 103,  -1,  -1,
-     -1,  -1,  -1, 104, 105,  -1,  -1, 106,  -1,  -1,
-    107,  -1, 108,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-    109,  -1,  -1, 110,  -1, 111,  -1,  -1,  -1, 112,
-    113, 114, 115,  -1, 116, 117, 118, 119,  -1,  -1,
-     -1,  -1,  -1,  -1, 120, 121,  -1, 122, 123,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1, 124,  -1, 125,  -1,  -1,  -1,
-     -1, 126, 127,  -1, 128,  -1,  -1,  -1,  -1,  -1,
-     -1, 129, 130,  -1, 131, 132, 133,  -1,  -1, 134,
-     -1, 135, 136,  -1,  -1,  -1, 137, 138,  -1, 139,
-     -1, 140, 141, 142, 143,  -1,  -1,  -1,  -1,  -1,
-    144,  -1,  -1,  -1,  -1, 145,  -1,  -1, 146,  -1,
-     -1, 147,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 148,
-    149, 150,  -1,  -1, 151,  -1,  -1,  -1,  -1, 152,
-    153,  -1,  -1, 154,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1, 155, 156,  -1, 157,  -1, 158,  -1,  -1,  -1,
-    159,  -1,  -1,  -1,  -1, 160, 161,  -1,  -1,  -1,
-     -1, 162,  -1,  -1, 163,  -1,  -1, 164, 165,  -1,
-    166,  -1,  -1,  -1,  -1,  -1,  -1, 167,  -1,  -1,
-    168, 169,  -1, 170,  -1, 171,  -1,  -1, 172, 173,
-     -1,  -1,  -1,  -1, 174, 175, 176,  -1,  -1, 177,
-    178, 179,  -1, 180,  -1,  -1, 181,  -1,  -1,  -1,
-     -1, 182,  -1, 183, 184,  -1, 185,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1, 186,  -1, 187,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-    188,  -1,  -1, 189,  -1,  -1, 190,  -1, 191,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 192,
-     -1,  -1, 193,  -1,  -1,  -1, 194, 195,  -1,  -1,
-    196,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-    197, 198,  -1,  -1, 199,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1, 200,  -1,  -1,  -1, 201,
-     -1, 202,  -1,  -1,  -1, 203, 204,  -1,  -1, 205,
-     -1,  -1,  -1,  -1, 206,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1, 207, 208, 209, 210,  -1,  -1, 211,
-     -1,  -1, 212,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-    213,  -1,  -1,  -1, 214, 215,  -1,  -1, 216,  -1,
-     -1, 217, 218,  -1, 219, 220, 221,  -1,  -1, 222,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1, 223,  -1,  -1,
-     -1,  -1, 224,  -1, 225, 226,  -1, 227,  -1,  -1,
-    228, 229,  -1,  -1, 230, 231,  -1,  -1,  -1, 232,
-     -1,  -1,  -1,  -1,  -1,  -1, 233,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1, 234,  -1, 235,  -1,  -1,
-     -1, 236, 237, 238, 239,  -1, 240,  -1,  -1,  -1,
-     -1,  -1, 241,  -1, 242,  -1, 243,  -1, 244, 245,
-    246, 247,  -1,  -1,  -1,  -1, 248,  -1,  -1,  -1,
-    249,  -1,  -1,  -1,  -1,  -1,  -1, 250,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1, 251,  -1,  -1, 252,  -1,
-     -1, 253,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 254,
-     -1,  -1,  -1,  -1, 255,  -1,  -1,  -1,  -1,  -1,
-    256,  -1,  -1, 257,  -1, 258,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 259,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 260,  -1,
-    261,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1, 262, 263,  -1,  -1,  -1,  -1,  -1,  -1,
-    264, 265,  -1,  -1,  -1, 266,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1, 267, 268,  -1,  -1,
-     -1,  -1,  -1,  -1, 269, 270, 271,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1, 272,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1, 273,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1, 274,  -1, 275,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1, 276, 277,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1, 278,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1, 279,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1, 280,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1, 281, 282, 283,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1, 284,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-    285,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1, 286,  -1,  -1, 287,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 288,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 289,
-    290,  -1,  -1,  -1, 291,  -1,  -1,  -1,  -1, 292,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1, 293,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 294,
-     -1,  -1, 295,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   9,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1, 296,  -1,  -1,  -1,  -1,  -1, 297,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  10,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  11,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1, 298,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1, 299,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1, 300,  -1,  -1,  -1,  -1,
-     -1, 301,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1, 302,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1, 303,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  12,  -1,  -1,
+     -1,  13,  -1,  -1,  -1,  14,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  15,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  16,  -1,  -1,  -1,
+     -1,  -1,  -1,  17,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  18,  19,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  20,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  21,  -1,
+     -1,  -1,  -1,  -1,  -1,  22,  23,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  24,  -1,  -1,
+     -1,  -1,  -1,  -1,  25,  26,  -1,  -1,  -1,  27,
+     -1,  28,  -1,  29,  -1,  -1,  30,  -1,  -1,  -1,
+     31,  -1,  -1,  -1,  -1,  -1,  32,  33,  34,  -1,
+     -1,  -1,  35,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  36,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  37,  -1,
+     -1,  -1,  -1,  -1,  -1,  38,  39,  -1,  -1,  -1,
+     40,  -1,  -1,  -1,  41,  -1,  -1,  -1,  42,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1, 304,  -1, 305,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1, 306,  -1,  -1,  -1,
+     43,  44,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  45,  -1,  -1,  -1,  -1,  -1,  -1,  46,  -1,
+     -1,  -1,  -1,  -1,  47,  -1,  -1,  -1,  -1,  -1,
+     -1,  48,  49,  -1,  -1,  -1,  50,  -1,  -1,  -1,
+     51,  52,  -1,  53,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  54,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  55,  -1,  -1,  -1,  -1,
+     -1,  56,  -1,  57,  -1,  -1,  -1,  -1,  -1,  -1,
+     58,  -1,  -1,  59,  60,  -1,  -1,  -1,  61,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  62,  -1,  -1,  -1,
+     -1,  -1,  -1,  63,  -1,  -1,  64,  65,  -1,  -1,
+     -1,  66,  67,  68,  -1,  69,  -1,  -1,  -1,  -1,
+     -1,  -1,  70,  -1,  -1,  71,  -1,  -1,  -1,  -1,
+     -1,  72,  -1,  -1,  -1,  -1,  -1,  -1,  73,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  74,
+     -1,  75,  -1,  -1,  -1,  -1,  76,  77,  78,  79,
+     80,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     81,  -1,  82,  83,  -1,  84,  85,  -1,  -1,  86,
+     -1,  -1,  -1,  -1,  -1,  87,  88,  89,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     90,  -1,  91,  -1,  92,  -1,  -1,  93,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  94,  -1,  95,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  96,  97,  -1,
+     98,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  99, 100,
+     -1,  -1, 101, 102, 103, 104, 105, 106,  -1,  -1,
+    107,  -1,  -1,  -1, 108,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1, 109, 110, 111,  -1,
+    112, 113, 114,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1, 115,  -1,  -1,  -1,  -1, 116,
+    117,  -1,  -1,  -1,  -1, 118,  -1,  -1,  -1,  -1,
+     -1,  -1, 119,  -1,  -1,  -1,  -1, 120,  -1,  -1,
+     -1, 121, 122,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1, 123,  -1,  -1,  -1,  -1,  -1, 124,  -1,
+    125,  -1,  -1,  -1,  -1,  -1, 126,  -1,  -1,  -1,
+     -1,  -1, 127,  -1, 128,  -1,  -1,  -1,  -1,  -1,
+     -1, 129,  -1, 130, 131,  -1,  -1,  -1, 132,  -1,
+    133,  -1,  -1,  -1, 134,  -1, 135, 136, 137,  -1,
+    138,  -1, 139,  -1,  -1, 140, 141, 142, 143,  -1,
+     -1, 144,  -1,  -1,  -1,  -1,  -1, 145,  -1,  -1,
+     -1, 146, 147,  -1,  -1,  -1,  -1, 148, 149,  -1,
+     -1,  -1, 150,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 151,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 152,
+     -1,  -1, 153,  -1,  -1, 154,  -1, 155,  -1,  -1,
+     -1,  -1, 156,  -1,  -1,  -1, 157,  -1,  -1, 158,
+    159,  -1,  -1,  -1,  -1,  -1, 160,  -1, 161,  -1,
+     -1,  -1,  -1,  -1,  -1, 162, 163, 164,  -1,  -1,
+     -1, 165,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 166,
+     -1, 167,  -1,  -1,  -1,  -1, 168,  -1, 169, 170,
+     -1,  -1, 171,  -1, 172,  -1,  -1,  -1, 173, 174,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 175,  -1,
+     -1, 176, 177, 178,  -1,  -1,  -1, 179,  -1, 180,
+     -1,  -1,  -1,  -1, 181,  -1, 182,  -1,  -1, 183,
+    184,  -1, 185,  -1, 186,  -1,  -1, 187, 188,  -1,
+     -1,  -1, 189,  -1,  -1,  -1,  -1, 190,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1, 191,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1, 192,  -1,  -1, 193,  -1,  -1,
+     -1,  -1, 194,  -1, 195,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1, 196,  -1, 197,  -1, 198, 199,  -1,
+     -1,  -1, 200,  -1, 201,  -1, 202,  -1, 203,  -1,
+     -1,  -1,  -1, 204,  -1,  -1, 205,  -1, 206,  -1,
+     -1, 207,  -1, 208,  -1,  -1, 209,  -1, 210,  -1,
+    211,  -1, 212,  -1,  -1, 213,  -1,  -1, 214, 215,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 216,  -1,  -1,
+     -1, 217,  -1, 218, 219,  -1,  -1,  -1, 220, 221,
+    222,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 223,  -1,
+    224,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 225,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 226,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 227,  -1,
+     -1,  -1, 228,  -1,  -1, 229, 230, 231,  -1,  -1,
+     -1,  -1,  -1, 232,  -1,  -1,  -1, 233,  -1, 234,
+     -1,  -1, 235,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 236, 237,  -1,  -1,  -1,  -1,  -1,  -1, 238,
+     -1,  -1, 239,  -1,  -1, 240,  -1, 241,  -1, 242,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 243,  -1, 244,  -1,  -1,  -1,  -1,  -1, 245,
+     -1,  -1,  -1,  -1,  -1,  -1, 246,  -1,  -1,  -1,
+     -1,  -1,  -1, 247,  -1,  -1,  -1,  -1,  -1, 248,
+     -1,  -1,  -1,  -1, 249,  -1,  -1,  -1,  -1,  -1,
+     -1, 250,  -1,  -1,  -1, 251,  -1,  -1,  -1,  -1,
+     -1,  -1, 252,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    253,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 254,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 255,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1, 256,  -1, 257,  -1,
+    258,  -1,  -1,  -1,  -1,  -1, 259,  -1,  -1,  -1,
+     -1,  -1, 260,  -1,  -1,  -1,  -1, 261, 262,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 263,
+     -1,  -1,  -1,  -1,  -1,  -1, 264,  -1, 265,  -1,
+     -1,  -1,  -1,  -1, 266,  -1,  -1,  -1, 267,  -1,
+    268,  -1,  -1,  -1,  -1, 269,  -1,  -1, 270, 271,
+     -1,  -1,  -1,  -1,  -1,  -1, 272,  -1,  -1,  -1,
+     -1,  -1, 273,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 274,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1, 275,  -1,  -1,
+    276,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    277,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1, 278,  -1,  -1,  -1,  -1, 279,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1, 280, 281,  -1,  -1,
+     -1, 282,  -1, 283,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1, 284, 285,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1, 286, 287,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    288,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    289,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1, 290,  -1,  -1,  -1,
+    291,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 307,  -1,
+     -1,  -1,  -1,  -1, 292,  -1, 293,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    294,  -1,  -1, 295,  -1,  -1, 296,  -1,  -1, 297,
+     -1,  -1,  -1,  -1, 298,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1, 308,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1, 299,  -1,  -1,  -1,  -1,  -1, 300,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 301,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 302,
+     -1,  -1, 303,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1, 304,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+    305,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 306, 307,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1, 309,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 308,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 309,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
+     -1,  -1,  -1, 310,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
-     -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1, 310,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
      -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
@@ -985,7 +975,7 @@ static const short lookup[] =
 
 #ifdef __GNUC__
 __inline
-#ifdef __GNUC_STDC_INLINE__
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
 __attribute__ ((__gnu_inline__))
 #endif
 #endif
diff --git a/libsrc/Wi/srvcr.c b/libsrc/Wi/srvcr.c
index 5d31e29..63d9d6c 100644
--- a/libsrc/Wi/srvcr.c
+++ b/libsrc/Wi/srvcr.c
@@ -1,14 +1,14 @@
 /*
  *  sqlrun.c
  *
- *  $Id: srvcr.c,v 1.8.2.3 2010/01/29 02:02:18 source Exp $
+ *  $Id: srvcr.c,v 1.8.2.4 2012/03/08 12:55:37 source Exp $
  *
  *  SQL query execution
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/srvmultibyte.c b/libsrc/Wi/srvmultibyte.c
index d90924c..d0dec2f 100644
--- a/libsrc/Wi/srvmultibyte.c
+++ b/libsrc/Wi/srvmultibyte.c
@@ -1,12 +1,12 @@
 /*
  *  srvmultibyte.c
  *
- *  $Id: srvmultibyte.c,v 1.12.2.3 2010/12/13 11:17:56 source Exp $
+ *  $Id: srvmultibyte.c,v 1.12.2.6 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -360,8 +360,7 @@ bh_string_output_w (/* this was before 3.0: index_space_t * isp, */ lock_trx_t *
 
 
 dk_set_t
-bh_string_list_w (/* this was before 3.0: index_space_t * isp,*/ lock_trx_t * lt, blob_handle_t * bh,
-    long get_chars, int omit)
+bh_string_list_w (/* this was before 3.0: index_space_t * isp,*/ lock_trx_t * lt, blob_handle_t * bh, long get_chars, int omit, long blob_type)
 {
   /* take current page at current place and make string of
      n bytes from the place and write to client */
@@ -534,11 +533,9 @@ row_print_wide (caddr_t thing, dk_session_t * ses, dbe_column_t * col,
 }
 
 int
-compare_wide_to_utf8 (caddr_t _utf8_data, long utf8_len,
-    caddr_t _wide_data, long wide_len, collation_t *collation)
+compare_wide_to_utf8_with_collation (wchar_t *wide_data, long wide_wcharcount, utf8char *utf8_data, long utf8_bytes,
+    collation_t *collation)
 {
-  unsigned char *utf8_data = (unsigned char *) _utf8_data;
-  wchar_t *wide_data = (wchar_t *) _wide_data;
   long winx, ninx;
 
   wchar_t wtmp;
@@ -546,23 +543,22 @@ compare_wide_to_utf8 (caddr_t _utf8_data, long utf8_len,
   int rc;
 
   memset (&state, 0, sizeof (virt_mbstate_t));
-  wide_len = wide_len / sizeof (wchar_t);
 
   ninx = winx = 0;
   if (collation)
     while(1)
       {
-	if (ninx == utf8_len)
+	if (ninx == utf8_bytes)
 	  {
-	    if (winx == wide_len)
+	    if (winx == wide_wcharcount)
 	      return DVC_MATCH;
 	    else
 	      return DVC_LESS;
 	  }
-	if (winx == wide_len)
+	if (winx == wide_wcharcount)
 	  return DVC_GREATER;
 
-	rc = (int) virt_mbrtowc (&wtmp, utf8_data + ninx, utf8_len - ninx, &state);
+	rc = (int) virt_mbrtowc (&wtmp, utf8_data + ninx, utf8_bytes - ninx, &state);
 	if (rc <= 0)
 	  GPF_T1 ("inconsistent wide char data");
 	if (((wchar_t *)collation->co_table)[wtmp] <
@@ -577,17 +573,17 @@ compare_wide_to_utf8 (caddr_t _utf8_data, long utf8_len,
   else
     while(1)
       {
-	if (ninx == utf8_len)
+	if (ninx == utf8_bytes)
 	  {
-	    if (winx == wide_len)
+	    if (winx == wide_wcharcount)
 	      return DVC_MATCH;
 	    else
 	      return DVC_LESS;
 	  }
-	if (winx == wide_len)
+	if (winx == wide_wcharcount)
 	  return DVC_GREATER;
 
-	rc = (int) virt_mbrtowc (&wtmp, utf8_data + ninx, utf8_len - ninx, &state);
+	rc = (int) virt_mbrtowc (&wtmp, utf8_data + ninx, utf8_bytes - ninx, &state);
 	if (rc <= 0)
 	  GPF_T1 ("inconsistent wide char data");
 	if (wtmp < wide_data[winx])
@@ -832,11 +828,10 @@ complete_charset_name (caddr_t _qi, char *cs_name)
 
 
 int
-compare_wide_to_narrow (wchar_t *wbox1, long n1, unsigned char *box2, long n2)
+compare_wide_to_latin1 (wchar_t *wbox1, long n1, unsigned char *box2, long n2)
 {
   wchar_t temp;
   long inx = 0;
-
   while (1)
     {
       if (inx == n1)	/* box1 in end? */
@@ -846,20 +841,15 @@ compare_wide_to_narrow (wchar_t *wbox1, long n1, unsigned char *box2, long n2)
 	  else
 	    return DVC_LESS;   /* otherwise box1 is shorter than box2 */
 	}
-
       if (inx == n2)
 	return DVC_GREATER;	/* box2 in end (but not box1) */
-
       temp = CHAR_TO_WCHAR (box2[inx], NULL);
       if (wbox1[inx] < temp)
 	return DVC_LESS;
-
       if (wbox1[inx] > temp)
 	return DVC_GREATER;
-
       inx++;
     }
-
   /*NOTREACHED*/
   return DVC_LESS;
 }
diff --git a/libsrc/Wi/srvmultibyte.h b/libsrc/Wi/srvmultibyte.h
index ecb84fe..7e9624c 100644
--- a/libsrc/Wi/srvmultibyte.h
+++ b/libsrc/Wi/srvmultibyte.h
@@ -1,12 +1,12 @@
 /*
  *  srvmultibyte.h
  *
- *  $Id: srvmultibyte.h,v 1.9.2.2 2009/08/17 23:42:59 source Exp $
+ *  $Id: srvmultibyte.h,v 1.9.2.5 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -31,9 +31,8 @@
 void row_print_wide (caddr_t thing, dk_session_t * ses, dbe_column_t * col,
     caddr_t * err_ret, dtp_t dtp, wcharset_t *wcharset);
 dk_set_t bh_string_list_w (/* this was before 3.0: index_space_t * isp, */ lock_trx_t * lt, blob_handle_t * bh,
-    long get_chars, int omit); /* if omit!=0, it just run through blob part */
+    long get_chars, int omit, long blob_type); /* if omit!=0, it just run through blob part */
 dk_session_t *bh_string_output_w (/* this was before 3.0: index_space_t * isp, */ lock_trx_t * lt, blob_handle_t * bh, int omit); /* if omit!=0, it just run through blob part */
-int compare_wide_to_utf8 (caddr_t utf8_data, long utf8_len, caddr_t wide_data, long wide_len, collation_t *collation);
 int compare_utf8_with_collation (caddr_t dv1, long n1, caddr_t dv2, long n2, collation_t *collation);
 
 caddr_t box_wide_char_string (caddr_t data, size_t len, dtp_t dtp);
@@ -54,7 +53,8 @@ extern caddr_t default_charset_name;
 
 caddr_t complete_charset_name (caddr_t qi, char *cs_name);
 
-int compare_wide_to_narrow (wchar_t *wbox1, long n1, unsigned char *box2, long n2);
+int compare_wide_to_latin1 (wchar_t *wbox1, long wbox1_wcharcount, unsigned char *box2, long box2_bytes);
+int compare_wide_to_utf8_with_collation (wchar_t *wbox1, long wbox1_wcharcount, utf8char *box2, long box2_bytes, collation_t *collation);
 
 extern wcharset_t *sch_name_to_charset (const char *name);
 extern wcharset_t * wcharset_by_name_or_dflt (ccaddr_t cs_name, query_instance_t *qi);
@@ -64,7 +64,8 @@ caddr_t strstr_utf8_with_collation (caddr_t dv1, long n1,
 	    caddr_t dv2, long n2, caddr_t *next, collation_t *collation);
 
 struct encoding_handler_s;
-extern caddr_t charset_recode_from_named_to_named (caddr_t narrow, const char *cs1_uppercase, const char *cs2_uppercase, int *res_is_new_ret, caddr_t *err_ret);
+/*! Translates a \c narrow string from charset or encding named \c cs1_uppercase to charset named \c cs2_upperase. \c qi is optional and used for _WS_ name */
+extern caddr_t charset_recode_from_named_to_named (query_instance_t *qi, caddr_t narrow, const char *cs1_uppercase, const char *cs2_uppercase, int *res_is_new_ret, caddr_t *err_ret);
 extern caddr_t charset_recode_from_cs_or_eh_to_cs (caddr_t narrow, int bom_skip_offset, struct encoding_handler_s *eh_cs1, wcharset_t *cs1, wcharset_t *cs2, int *res_is_new_ret, caddr_t *err_ret);
 
 #endif /* _SRVMULTIBYTE_H */
diff --git a/libsrc/Wi/srvstat.c b/libsrc/Wi/srvstat.c
index 77ff8a1..9b86471 100644
--- a/libsrc/Wi/srvstat.c
+++ b/libsrc/Wi/srvstat.c
@@ -1,14 +1,14 @@
 /*
  *  srvstat.c
  *
- *  $Id: srvstat.c,v 1.29.2.23 2011/03/03 17:12:05 source Exp $
+ *  $Id: srvstat.c,v 1.29.2.36 2012/03/08 12:55:37 source Exp $
  *
  *  Server Status Report
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -191,6 +191,11 @@ extern int enable_dfg_print;
 extern int enable_distinct_sas;
 int32 ha_rehash_pct = 300;
 extern int c_use_aio;
+extern int32 sqlo_sample_dep_cols;
+extern long strses_file_reads;
+extern long strses_file_seeks;
+extern long strses_file_writes;
+extern long strses_file_wait_msec;
 
 long  tft_random_seek;
 long  tft_seq_seek;
@@ -372,9 +377,6 @@ process_status_report (void)
 }
 
 
-#define mutex_try_enter(m) \
-  (mutex_enter (m), 1)
-
 
 int
 dbs_mapped_back (dbe_storage_t * dbs)
@@ -691,9 +693,11 @@ lt_short_name (lock_trx_t * lt)
 
   if (!lt->lt_client)
     return "NO_CLIENT";
-  if (lt->lt_client->cli_ws)
-    return "VSP";
-  name = LT_NAME (lt);
+  if (lt->lt_client->cli_ws) /* http client, print the client IP */
+    return lt->lt_client->cli_ws->ws_client_ip ? lt->lt_client->cli_ws->ws_client_ip : "VSP";
+  name = lt->lt_client->cli_session ?
+      (lt->lt_client->cli_session->dks_peer_name ? lt->lt_client->cli_session->dks_peer_name : "NO_CONN") :
+      "INTERNAL";
   last = strchr (name, ':');
   if (last)
     return (last + 1);
@@ -799,14 +803,14 @@ srv_lock_report (const char * mode)
   int thr_ct = 0, lw_ct = 0, vdb_ct = 0, inx;
   IN_TXN;
   DO_SET (lock_trx_t *, lt, &all_trxs)
-    {
-      if (lt != bootstrap_cli->cli_trx)
-	{
-	  thr_ct += lt->lt_threads;
-	  lw_ct += lt->lt_lw_threads;
-	  vdb_ct += lt->lt_vdb_threads;
-	}
-    }
+  {
+    if (lt != bootstrap_cli->cli_trx)
+      {
+	thr_ct += lt->lt_threads;
+	lw_ct += lt->lt_lw_threads;
+	vdb_ct += lt->lt_vdb_threads;
+      }
+  }
   END_DO_SET ();
   thr_cli_running = thr_ct;
   thr_cli_waiting = lw_ct;
@@ -822,26 +826,27 @@ srv_lock_report (const char * mode)
       LEAVE_TXN;
       return;
     }
-    {
-      DO_SET (index_tree_t *, it, &wi_inst.wi_master->dbs_trees)
-	{
-	  for (inx = 0; inx < IT_N_MAPS; inx++)
-	    {
-	      mutex_enter (&it->it_maps[inx].itm_mtx);
-	  if (0 == setjmp_splice (&locks_done))
-	    {
-	      locks_printed = 0;
-		  maphash (lock_status, &it->it_maps[inx].itm_locks);
-		}
-	      mutex_leave (&it->it_maps[inx].itm_mtx);
-	    }
-	}
-      END_DO_SET();
-      lt_wait_status ();
-      cl_lt_wait_status ();
-
-    }
-    LEAVE_TXN;
+  DO_SET (index_tree_t *, it, &wi_inst.wi_master->dbs_trees)
+  {
+    for (inx = 0; inx < IT_N_MAPS; inx++)
+      {
+	if (mutex_try_enter (it->it_lock_release_mtx))
+	  {			/* prevent read release as lock release is outside of TXN mtx */
+	    mutex_enter (&it->it_maps[inx].itm_mtx);
+	    if (0 == setjmp_splice (&locks_done))
+	      {
+		locks_printed = 0;
+		maphash (lock_status, &it->it_maps[inx].itm_locks);
+	      }
+	    mutex_leave (&it->it_maps[inx].itm_mtx);
+	    mutex_leave (it->it_lock_release_mtx);
+	  }
+      }
+  }
+  END_DO_SET ();
+  lt_wait_status ();
+  cl_lt_wait_status ();
+  LEAVE_TXN;
 }
 
 
@@ -969,7 +974,8 @@ st_collect_ps_info (dk_set_t * arr)
 		  while (hit_next (&it, (char **) & text, (char **) & stmt))
 		    {
 		      caddr_t * inst = (caddr_t *) (*stmt)->sst_inst;
-		      if ((*stmt)->sst_start_msec && inst && (*stmt)->sst_query)
+		      if ((*stmt)->sst_start_msec && inst && (*stmt)->sst_query &&
+			  (*stmt)->sst_inst->qi_trx && (*stmt)->sst_inst->qi_trx->lt_threads)
 			{
 			  dk_set_push (arr, box_string ((*stmt)->sst_query->qr_text));
 			  dk_set_push (arr, box_num (time_now - (*stmt)->sst_start_msec));
@@ -979,8 +985,8 @@ st_collect_ps_info (dk_set_t * arr)
 		}
 	      else
 		{
-		  dk_set_push (arr, box_string (" client not available, pending compile, time shown is since last exec"));
-		  dk_set_push (arr, box_num (time_now - (*stmt)->sst_start_msec));
+		  dk_set_push (arr, box_string (" client not available, pending compile"));
+		  dk_set_push (arr, box_num (0));
 		}
 
 	    }
@@ -1010,6 +1016,8 @@ char *product_version_string ()
   return buf;
 }
 
+extern int process_is_swapping;
+
 void
 status_report (const char * mode, query_instance_t * qi)
 {
@@ -1078,21 +1086,28 @@ status_report (const char * mode, query_instance_t * qi)
       END_DO_SET ();
       mutex_leave (thread_mtx);
       dk_set_free (clients);
-      PrpcSelfSignal ((self_signal_func) st_collect_ps_info, (caddr_t)&set);
-      semaphore_enter (ps_sem);
-      rep_printf ("\n\nRunning Statements:\n%12.12s Text\n", "Time (msec)");
-      DO_SET (caddr_t, data, &set)
+      if (!process_is_swapping)
 	{
-	  if (DV_TYPE_OF (data) == DV_C_STRING)
+	  PrpcSelfSignal ((self_signal_func) st_collect_ps_info, (caddr_t)&set);
+	  semaphore_enter (ps_sem);
+	  rep_printf ("\n\nRunning Statements:\n%12.12s Text\n", "Time (msec)");
+	  DO_SET (caddr_t, data, &set)
+	    {
+	      if (DV_TYPE_OF (data) == DV_C_STRING)
 
-	    rep_printf ("%.80s\n", data);
-	  else
-	    rep_printf ("%12ld ", unbox (data));
-	  dk_free_box (data);
+		rep_printf ("%.80s\n", data);
+	      else
+		rep_printf ("%12ld ", unbox (data));
+	      dk_free_box (data);
+	    }
+	  END_DO_SET ();
+	  dk_set_free (set);
+	  set = NULL;
+	}
+      else
+	{
+	  rep_printf ("\n\nProcess is swapping cannot get client status report.");
 	}
-      END_DO_SET ();
-      dk_set_free (set);
-      set = NULL;
     }
   if (strchr (mode, 'k'))
     key_stats ();
@@ -1142,8 +1157,8 @@ static char *_st_os_user_name = &st_os_user_name[0];
 static long oneL = 1;
 
 
-#define SD_INT32 ((char *)-1)
-#define SD_INT64 ((char *)-2)
+#define SD_INT32 ((char **)-1)
+#define SD_INT64 ((char **)-2)
 
 
 stat_desc_t stat_descs [] =
@@ -1197,6 +1212,10 @@ stat_desc_t stat_descs [] =
     {"tc_anytime_early_flush", &tc_anytime_early_flush},
     {"read_block_usec", &read_block_usec},
     {"write_block_usec", &write_block_usec},
+    {"strses_file_reads", &strses_file_reads},
+    {"strses_file_writes", &strses_file_writes},
+    {"strses_file_seeks", &strses_file_seeks},
+    {"strses_file_wait_msec", &strses_file_wait_msec},
     {"tc_dive_would_deadlock", &tc_dive_would_deadlock},
     {"tc_get_buffer_while_stat", &tc_get_buffer_while_stat},
     {"tc_bp_wait_flush", &tc_bp_wait_flush},
@@ -1417,8 +1436,10 @@ stat_desc_t stat_descs [] =
     {"cl_n_hosts", &cl_n_hosts, SD_INT32},
     {"cl_cum_messages", &cl_cum_messages, SD_INT64},
     {"cl_cum_bytes", &cl_cum_bytes, SD_INT64},
+    {"cl_req_batch_size", &cl_req_batch_size, SD_INT32},
     {"db_exists", &db_exists, SD_INT32},
     {"st_lite_mode", &my_lite_mode, NULL},
+    {"st_aq_max_threads", &aq_max_threads, SD_INT32},
 
     /* backup vars */
     {"backup_prefix_name", NULL, &my_bp_prefix},
@@ -1466,13 +1487,14 @@ stat_desc_t dbf_descs [] =
     {"cl_con_drop_rate", &cl_con_drop_rate, SD_INT32},
     {"cl_keep_alive_interval", &cl_keep_alive_interval, SD_INT32},
     {"cl_max_keep_alives_missed", &cl_max_keep_alives_missed, SD_INT32},
-    {"cl_non_logged_write_mode", &cl_non_logged_write_mode},
+    {"cl_non_logged_write_mode", &cl_non_logged_write_mode, SD_INT32},
     {"cl_dead_w_interval", &cl_dead_w_interval, SD_INT32},
     {"timeout_resolution_sec", &atomic_timeout.to_sec, SD_INT32},
     {"timeout_resolution_usec", &atomic_timeout.to_usec, SD_INT32},
     {"ha_rehash_pct", &ha_rehash_pct, SD_INT32},
     {"c_use_aio", &c_use_aio, SD_INT32},
     {"callstack_on_exception", &callstack_on_exception},
+    {"sqlo_sample_dep_cols", &sqlo_sample_dep_cols, SD_INT32},
     {NULL, NULL, NULL}
   };
 
@@ -1504,9 +1526,9 @@ bif_sys_stat (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     {
       if (0 == strcmp (sd->sd_name, name))
 	{
-	  if (SD_INT32 == (char *) sd->sd_str_value)
+	  if (SD_INT32 == sd->sd_str_value)
 	    return box_num (*(int32*)sd->sd_value);
-	  if (SD_INT64 == (char *) sd->sd_str_value)
+	  if (SD_INT64 == sd->sd_str_value)
 	    return box_num (*(int64*)sd->sd_value);
 	  else if (sd->sd_value)
 	    return (box_num (*(sd->sd_value)));
@@ -1532,7 +1554,7 @@ bif_dbf_set (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
     {
       if (0 == strcmp (sd->sd_name, name))
 	{
-	  if (SD_INT32 == (char *) sd->sd_str_value)
+	  if (SD_INT32 == sd->sd_str_value)
 	    {
 	      int32 ov = *((int32*)sd->sd_value);
 	      *((int32*)sd->sd_value) = v;
diff --git a/libsrc/Wi/srvstat.h b/libsrc/Wi/srvstat.h
index 81b76ed..5663841 100644
--- a/libsrc/Wi/srvstat.h
+++ b/libsrc/Wi/srvstat.h
@@ -1,14 +1,14 @@
 /*
  *  srvstat.h
  *
- *  $Id: srvstat.h,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: srvstat.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  stats collection
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/ssl.c b/libsrc/Wi/ssl.c
index 15ded3e..20de715 100644
--- a/libsrc/Wi/ssl.c
+++ b/libsrc/Wi/ssl.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: ssl.c,v 1.5.2.2 2009/05/14 13:52:33 source Exp $
+ *  $Id: ssl.c,v 1.5.2.3 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/statuslog.h b/libsrc/Wi/statuslog.h
index 60fe1f7..7f650d0 100644
--- a/libsrc/Wi/statuslog.h
+++ b/libsrc/Wi/statuslog.h
@@ -1,12 +1,12 @@
 /*
  *  statuslog.h
  *
- *  $Id: statuslog.h,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: statuslog.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/string.c b/libsrc/Wi/string.c
index 0184c13..1682184 100644
--- a/libsrc/Wi/string.c
+++ b/libsrc/Wi/string.c
@@ -1,14 +1,14 @@
 /*
  *  string.c
  *
- *  $Id: string.c,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: string.c,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  Wildcard and fuzzy matching functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/string_tmpl.c b/libsrc/Wi/string_tmpl.c
index 8e82a97..20ee926 100644
--- a/libsrc/Wi/string_tmpl.c
+++ b/libsrc/Wi/string_tmpl.c
@@ -1,14 +1,14 @@
 /*
  *  string_tmpl.c
  *
- *  $Id: string_tmpl.c,v 1.3.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: string_tmpl.c,v 1.3.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  Wildcard and fuzzy matching functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/strlike.h b/libsrc/Wi/strlike.h
index e242839..d797559 100644
--- a/libsrc/Wi/strlike.h
+++ b/libsrc/Wi/strlike.h
@@ -1,12 +1,12 @@
 /*
  *  strlike.h
  *
- *  $Id: strlike.h,v 1.2.2.2 2010/09/09 19:19:35 source Exp $
+ *  $Id: strlike.h,v 1.2.2.4 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -32,7 +32,9 @@
 #define LIKE_ARG_WCHAR	2
 #define LIKE_ARG_UTF	3
 
-int cmp_like (const char *string, const char *pattern, collation_t *collation, char escape_char, int strtype, int patterntype );
-unsigned char *nc_strstr (const unsigned char *string1, const unsigned char *string2);
+extern int cmp_like (const char *string, const char *pattern, collation_t *collation, char escape_char, int strtype, int patterntype );
+extern unsigned char *nc_strstr (const unsigned char *string1, const unsigned char *string2);
+extern wchar_t *nc_strstr__wide (const wchar_t *string1, const wchar_t *string2);
+
 
 #endif /* _WI_STRLIKE_H */
diff --git a/libsrc/Wi/subseq.c b/libsrc/Wi/subseq.c
index c4e52f5..6d3b681 100644
--- a/libsrc/Wi/subseq.c
+++ b/libsrc/Wi/subseq.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: subseq.c,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: subseq.c,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/subseq.h b/libsrc/Wi/subseq.h
index 379d65c..dcb81e6 100644
--- a/libsrc/Wi/subseq.h
+++ b/libsrc/Wi/subseq.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: subseq.h,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: subseq.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/system.sql b/libsrc/Wi/system.sql
index 1e4a9a7..14c2214 100644
--- a/libsrc/Wi/system.sql
+++ b/libsrc/Wi/system.sql
@@ -1,10 +1,10 @@
 --
---  $Id: system.sql,v 1.41.2.23 2011/03/17 16:30:54 source Exp $
+--  $Id: system.sql,v 1.41.2.25 2012/03/08 12:55:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -5552,7 +5552,7 @@ create procedure view_from_tbl (in _dir varchar, in _tbls any)
    ret := make_array (2, 'any');
    prefix := 'SPARQL\n';
 
-   ns := sprintf ('prefix %s: <http://%s/%s#>\n', _dir, cfg_item_value (virtuoso_ini_path (), 'URIQA', 'DefaultHost'), _dir);
+   ns := sprintf ('prefix %s: <http://%s/%s#>\n', _dir, virtuoso_ini_item_value ('URIQA', 'DefaultHost'), _dir);
    ns := ns || 'prefix northwind: <http://demo.openlinksw.com/schemas/northwind#>
 prefix demo: <http://www.openlinksw.com/schemas/demo#>
 prefix oplsioc: <http://www.openlinksw.com/schemas/oplsioc#>
@@ -5560,7 +5560,7 @@ prefix sioc: <http://rdfs.org/sioc/ns#>
 prefix foaf: <http://xmlns.com/foaf/0.1/>
 prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>\n';
 
-   uriqa_str := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+   uriqa_str := virtuoso_ini_item_value ('URIQA','DefaultHost');
 
    create_class_stmt := '';
 
@@ -5586,7 +5586,7 @@ create procedure view_create_view (in _tbls any, in _dir varchar)
    declare ret, qual, qual_l, tbl_name, tbl_name_l, pks, pk_text, uriqa_str any;
    declare sufix, tname, tbl any;
 
-   uriqa_str := cfg_item_value(virtuoso_ini_path(), 'URIQA','DefaultHost');
+   uriqa_str := virtuoso_ini_item_value ('URIQA','DefaultHost');
    qual := name_part (_tbls[0], 0);
    qual_l := lcase (qual);
 
diff --git a/libsrc/Wi/system2.sql b/libsrc/Wi/system2.sql
index 2826df9..4f12bf5 100644
--- a/libsrc/Wi/system2.sql
+++ b/libsrc/Wi/system2.sql
@@ -1,10 +1,10 @@
 --
---  $Id: system2.sql,v 1.5.2.5 2010/08/02 07:40:54 source Exp $
+--  $Id: system2.sql,v 1.5.2.6 2012/03/08 12:55:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/text.c b/libsrc/Wi/text.c
index 46b02fb..74000f9 100644
--- a/libsrc/Wi/text.c
+++ b/libsrc/Wi/text.c
@@ -1,14 +1,14 @@
 /*
  *  text.c
  *
- *  $Id: text.c,v 1.16.2.7 2010/02/01 12:53:46 source Exp $
+ *  $Id: text.c,v 1.16.2.8 2012/03/08 12:55:37 source Exp $
  *
  *  Text search
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/text.h b/libsrc/Wi/text.h
index e972d3d..d470be3 100644
--- a/libsrc/Wi/text.h
+++ b/libsrc/Wi/text.h
@@ -1,12 +1,12 @@
 /*
  *  text.h
  *
- *  $Id: text.h,v 1.7.2.2 2009/04/18 21:55:17 source Exp $
+ *  $Id: text.h,v 1.7.2.3 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/trans.c b/libsrc/Wi/trans.c
index 74d48f8..f1b575d 100644
--- a/libsrc/Wi/trans.c
+++ b/libsrc/Wi/trans.c
@@ -1,14 +1,14 @@
 /*
  *  trans.c
  *
- *  $Id: trans.c,v 1.1.2.9 2011/02/03 13:30:10 source Exp $
+ *  $Id: trans.c,v 1.1.2.11 2012/03/08 12:55:37 source Exp $
  *
  *  Transitive Node
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1029,7 +1029,11 @@ tn_lowest_sas_result (trans_node_t * tn, caddr_t * inst, trans_set_t * ts)
     }
   END_DO_SET();
   if (!res)
-    return;
+    {
+      if (tn->tn_input[0] == tn->tn_output[0])
+	qn_send_output ((data_source_t*)tn, inst);
+      return;
+    }
   cl_ts_set_context ((table_source_t *)tn, itcl, inst, QST_INT (inst, tn->clb.clb_nth_set) - 1);
   qst_set (inst, tn->tn_output[0], box_iri_id (res));
   qn_send_output ((data_source_t*)tn, inst);
diff --git a/libsrc/Wi/turtle_l.c b/libsrc/Wi/turtle_l.c
index 1e08426..b3a46e5 100644
--- a/libsrc/Wi/turtle_l.c
+++ b/libsrc/Wi/turtle_l.c
@@ -359,30 +359,31 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[384] =
+static yyconst flex_int16_t yy_accept[394] =
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       106,  101,  100,   98,   98,   15,   74,   99,   73,   33,
        34,  101,    5,    9,   95,   10,   11,   44,   12,  101,
       101,   48,   35,   37,    3,   48,   28,   48,   48,   48,
-       48,   48,   38,   39,   83,   79,   79,   75,   85,   84,
-       80,   80,   76,   86,   87,   89,   89,   93,   91,   88,
-       90,   90,   94,   92,   67,   65,   65,   71,   69,   68,
-       66,   66,   72,   70,   56,  105,   55,   53,   53,  104,
-      104,  100,   98,    0,   57,   99,   98,   98,    0,   57,
-
-        0,   95,    8,    6,    7,    7,   96,   96,    0,   46,
-       46,    0,   45,   44,   44,    0,   14,   40,   44,   13,
-       51,   52,   16,   52,   52,   52,   52,   52,   52,   52,
-       52,   48,    0,   47,   36,    1,    2,    2,    4,   48,
-        0,    0,   48,   48,   30,   31,   48,   48,   83,    0,
-       79,   77,   81,   81,    0,    0,   84,    0,   80,   78,
-       82,   82,    0,    0,   87,    0,   89,    0,    0,    0,
-       88,    0,   90,    0,    0,    0,   67,    0,    0,   65,
-       65,   65,    0,    0,    0,   68,    0,    0,   66,   66,
-       66,    0,    0,    0,   55,   55,   53,    0,   53,  102,
-
+       48,   48,   38,   39,  105,   83,   79,   79,   75,   85,
+       84,   80,   80,   76,   86,   91,   87,   89,   89,   93,
+       91,   92,   88,   90,   90,   94,   92,   71,   67,   65,
+       65,   71,   69,   72,   68,   66,   66,   72,   70,   56,
+       55,   53,   53,  104,  104,  100,   98,    0,   57,   99,
+
+       98,   98,    0,   57,    0,   95,    8,    6,    7,    7,
+       96,   96,    0,   46,   46,    0,   45,   44,   44,    0,
+       14,   40,   44,   13,   51,   52,   16,   52,   52,   52,
+       52,   52,   52,   52,   52,   48,    0,   47,   36,    1,
+        2,    2,    4,   48,    0,    0,   48,   48,   30,   31,
+       48,   48,   83,    0,   79,   77,   81,   81,   83,    0,
+        0,   84,    0,   80,   78,   82,   82,   84,    0,    0,
+       87,    0,   89,    0,   87,    0,    0,   88,    0,   90,
+        0,   88,    0,    0,   67,    0,    0,   65,   65,   65,
+        0,   67,    0,    0,   68,    0,    0,   66,   66,   66,
+
+        0,   68,    0,    0,   55,   55,   53,    0,   53,  102,
       103,  103,   57,   60,   58,   98,   59,    7,   96,    0,
        97,   46,   46,   46,   45,    0,    0,    0,   42,   40,
         0,   44,   44,   44,   51,    0,    0,   52,   52,   52,
@@ -392,8 +393,8 @@ static yyconst flex_int16_t yy_accept[384] =
         0,    0,   53,   54,  103,   45,   46,    0,    0,   43,
         0,    0,    0,   41,   44,   44,   52,   52,   52,   18,
        52,   52,   52,   49,    0,   48,   32,   27,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   61,   63,
 
+        0,    0,    0,    0,    0,    0,    0,    0,   61,   63,
         0,    0,   62,   64,    0,    0,   41,    0,    0,   44,
        44,   17,   52,   52,   52,   52,   21,   49,   26,    0,
         0,    0,    0,   93,    0,    0,   94,    0,    0,    0,
@@ -403,6 +404,7 @@ static yyconst flex_int16_t yy_accept[384] =
         0,   44,   25,   52,    0,    0,    0,    0,    0,    0,
         0,   44,   22,    0,    0,    0,    0,    0,    0,    0,
        44,    0,    0
+
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -437,7 +439,7 @@ static yyconst flex_int32_t yy_ec[256] =
        62,   62,   62,   62,    9
     } ;
 
-static yyconst flex_int32_t yy_meta[63] =
+static yyconst flex_int32_t yy_meta[64] =
     {   0,
         1,    2,    3,    4,    2,    5,    6,    7,    5,    7,
         8,    5,    5,    9,   10,   11,   12,    9,   13,   14,
@@ -445,138 +447,140 @@ static yyconst flex_int32_t yy_meta[63] =
        17,   18,   10,   19,   10,    5,   20,   21,   21,   16,
        16,   16,   21,   17,   17,   17,   17,   17,   17,   18,
        17,   17,   18,   17,   18,   18,   17,   17,   17,   10,
-       10,   22
+       10,   22,   23
     } ;
 
-static yyconst flex_int16_t yy_base[546] =
+static yyconst flex_int16_t yy_base[560] =
     {   0,
-        0,    0,   60,   62,   65,   71,   73,   76,   78,   85,
-       87,   97,   99,  110,  144,    0,   80,   92,    0,    0,
-      835, 2335,   65,  823,  821, 2335,  816,  112,  804, 2335,
-     2335,  101, 2335,  120,  190,  225, 2335,  206,  790,    0,
-      214,  109,  778, 2335,  210,  110,  115,  200,  217,  204,
-      206,  247, 2335, 2335,  778,  807,  807,  776,  259,  765,
-      794,  787,  763,  267,  754,  783,  783,  759,   72,  743,
-      770,  770,  739,  222,  100,  760,  760,  269,  242,  249,
-      758,  758,  272,  245, 2335, 2335,    0,  121,  289, 2335,
-      282,  136, 2335,  753,  281,  139,  748,  278,  738,  199,
-
-      729,  285, 2335, 2335,  736,  736,  293,  305,  314,  328,
-      342,  356,  370,  286,  395,  305,  399, 2335,  431, 2335,
-      721,  721,  720,  293,  281,  325,  295,  252,  297,  339,
-      202,  276,  341,  480, 2335, 2335,  731,  724, 2335,  352,
-      366,  397,  389,  374,  391,  395,  407,  419,  690,  422,
-     2335, 2335,  719,  712,    0,    0,  680,  400, 2335, 2335,
-      709,  709,    0,    0,  677,  408, 2335,    0,    0,    0,
-      676,  411, 2335,    0,    0,    0,  407,  434,  415, 2335,
-      698,  696,  446,    0,    0,  337,  424,  416, 2335,  694,
-      687,  488,    0,    0,    0,  673,  443,    0,  488, 2335,
-
-      684,  684,  660, 2335, 2335,  681, 2335, 2335,  447,  665,
-      664,  513,  527,    0,  541,  555,  212,  505, 2335, 2335,
-      429,  580,  612,  653,  659,  658,    0,  321,  361,  428,
-      653,   77,  649,  435,  279, 2335,    0,  569,  494,  493,
-      537,  526, 2335,    0,    0, 2335,    0,    0,  648,    0,
-        0,  647,    0,    0,  626,  545,    0,    0,  614,  453,
-        0,    0,  631,    0, 2335,  603,    0,  406,  469, 2335,
-      478,    0,    0, 2335,  678,  703,  630,  518,  572,  629,
-      467,  485,  516,  602,  627,  576,  570,  578,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,  632, 2335,
-
-        0,    0,  628, 2335,    0,    0, 2335,    0,    0,  728,
-      753,  526,  341,  546,  558,  560,  524,  509,  588,    0,
-        0,    0,    0,  436,    0,    0,  430,    0,    0,    0,
-        0,    0,    0,    0,    0,  778,  803,  584,  573,  585,
-      327,    0,    0,    0,    0,    0,    0,    0,    0,  828,
-      215,  591,  608,  211,    0,    0,    0,    0,    0,    0,
-        0,  853,  206,  614,    0,    0,    0,    0,    0,    0,
-        0,  878,   70,    0,    0,    0,    0,    0,    0,    0,
-      903,    0, 2335,  946,  968,  990, 1012, 1034, 1056, 1078,
-     1100, 1122, 1144, 1166, 1188, 1204, 1225, 1232, 1239, 1250,
-
-     1262, 1284, 1304, 1325, 1345, 1366, 1383, 1404, 1421, 1442,
-     1459, 1480, 1497, 1508, 1519, 1530, 1545, 1561, 1577, 1598,
-     1616, 1628, 1644,  621,  645, 1666, 1683,  646,  657, 1704,
-     1721, 1727,  658,  687, 1748, 1765, 1771,  688,  712, 1792,
-     1809,  713,  737, 1830, 1847,  738,  762, 1858, 1869, 1880,
-     1889, 1900, 1915, 1931, 1947, 1968, 1985, 2005, 2026, 2038,
-     2048, 2059, 2074, 2090, 2102,  763,  787,  788,  812, 2114,
-      813,  837, 2125,  838,  862, 2146,  863,  887, 2168,  888,
-      912, 2180, 2189, 2206,  913, 1298, 2218, 1300, 1339, 1341,
-     1377, 2228, 1379, 1415, 2237, 1417, 1453, 1455, 1491, 1493,
-
-     1507, 1518, 1677, 1679, 1715, 1717, 1759, 1761, 1803, 1805,
-     1841, 1843, 1857, 1868, 1879, 1979, 1981, 2058, 2113, 2124,
-     2179, 2235, 2244, 2246, 2248, 2250, 2257, 2259, 2261, 2263,
-     2270, 2272, 2274, 2276, 2283, 2285, 2287, 2289, 2296, 2298,
-     2300, 2302, 2309, 2311, 2313
+        0,    0,   63,   67,   72,   79,   84,   88,  104,  116,
+       99,  142,  124,  156,  219,    0,   81,   87,    0,    0,
+      860, 2424,   67,  855,  855, 2424,  850,   90,  845, 2424,
+     2424,   95, 2424,  166,  135,  275, 2424,  170,  831,    0,
+      163,  104,  812, 2424,  300,  112,  117,  161,  169,  119,
+      267,  279, 2424, 2424, 2424,  810,  839,  832,  808,  303,
+      799,  828,  828,  804,  305, 2424,  788,  815,  815,  784,
+       84, 2424,  775,  804,  804,  780,  109, 2424,  150,  801,
+      794,  308,  124, 2424,  148,  790,  790,  310,  142, 2424,
+        0,  172,  335, 2424,  318,  195, 2424,  778,   70,  145,
+
+      780,  192,  772,  304,  763,  299, 2424, 2424,  777,  777,
+      310,  314,  197,  360,  374,  388,  402,  322,  427,  314,
+      431, 2424,  463, 2424,  755,  753,  752,  128,  318,  311,
+      339,  315,  344,  337,  167,  330,  356,  512, 2424, 2424,
+      756,  756, 2424,  384,  398,  429,  421,  404,  406,  423,
+      427,  440,  724,  339, 2424, 2424,  753,  753,  721,    0,
+        0,  720,  347, 2424, 2424,  749,  743,  711,    0,    0,
+      705,  424, 2424,    0,  701,    0,    0,  700,  427, 2424,
+        0,  685,    0,    0,  347,  451,  432, 2424,  714,  714,
+      473,  452,    0,    0,  464,  465,  436, 2424,  712,  712,
+
+      475,  474,    0,    0,    0,  698,  474,    0,  517, 2424,
+      700,  700,  672, 2424, 2424,  690, 2424, 2424,  475,  671,
+      670,  542,  556,    0,  570,  584,  385,  537, 2424, 2424,
+      459,  609,  641,  682,  661,  660,    0,  473,  459,  489,
+      660,  281,  659,  509,  329, 2424,    0,  598,  504,  483,
+      566,  555, 2424,    0,    0, 2424,    0,    0,  657,    0,
+        0,  569,    0,    0,  529,  531,    0,    0,  505,  527,
+        0,    0,  507,    0, 2424,  632,    0,  565,  567, 2424,
+      383,    0,    0, 2424,  723,  748,  495,  561,  601,  494,
+      498,  583,  584,  631,  433,  605,  599,  607,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,  435, 2424,
+        0,    0,  435, 2424,    0,    0, 2424,    0,    0,  773,
+      798,  274,  589,  602,  613,  620,  272,  269,  642,    0,
+        0,    0,    0,  201,    0,    0,  187,    0,    0,    0,
+        0,    0,    0,    0,    0,  823,  848,  619,  614,  618,
+      635,    0,    0,    0,    0,    0,    0,    0,    0,  873,
+       99,  645,  656,   93,    0,    0,    0,    0,    0,    0,
+        0,  898,   65,  658,    0,    0,    0,    0,    0,    0,
+        0,  923,   49,    0,    0,    0,    0,    0,    0,    0,
+      948,    0, 2424,  991, 1014, 1037, 1060, 1083, 1106, 1129,
+
+     1152, 1175, 1198, 1221, 1244, 1261, 1282, 1290, 1297, 1308,
+     1320, 1341, 1361, 1381, 1401, 1421, 1438, 1458, 1475, 1495,
+     1512, 1532, 1549, 1560, 1571, 1582, 1597, 1613, 1629, 1650,
+     1669, 1682, 1698, 1714, 1735, 1752,  675,  679, 1772, 1789,
+      686,  692, 1809, 1826, 1832,  715,  716, 1852, 1869, 1875,
+      717,  727, 1895, 1912,  728,  757, 1932, 1949,  758,  782,
+     1960, 1971, 1982, 1991, 2002, 2017, 2033, 2049, 2070, 2088,
+     2108, 2130, 2143, 2153, 2164, 2179, 2195, 2207,  783,  807,
+      808,  832, 2219,  833,  857, 2230,  858,  882, 2250,  883,
+      907, 2271,  908,  932, 2283, 2292, 2309,  933,  957, 2322,
+
+      958, 1355, 1357, 1395, 2332, 1397, 1408, 2341, 1432, 1434,
+     1469, 1471, 1506, 1508, 1543, 1545, 1559, 1570, 1746, 1748,
+     1783, 1785, 1796, 1820, 1822, 1863, 1865, 1906, 1908, 1943,
+     1945, 1959, 1970, 1981, 2082, 2084, 2163, 2218, 2229, 2282,
+     2339, 2348, 2350, 2352, 2354, 2361, 2363, 2365, 2367, 2374,
+     2376, 2378, 2380, 2387, 2389, 2391, 2393, 2400, 2402
     } ;
 
-static yyconst flex_int16_t yy_def[546] =
+static yyconst flex_int16_t yy_def[560] =
     {   0,
-      383,    1,  384,  384,  385,  385,  386,  386,  387,  387,
-      388,  388,  389,  389,  383,   15,  390,  390,  391,  391,
-      383,  383,  383,  383,  383,  383,  392,  393,  394,  383,
-      383,  383,  383,  395,  383,  396,  383,  397,  383,  398,
-      399,  400,  383,  383,  383,  401,  400,  400,  400,  400,
-      400,  400,  383,  383,  402,  383,  383,  383,  403,  404,
-      383,  383,  383,  405,  406,  383,  383,  383,  407,  408,
-      383,  383,  383,  409,  410,  383,  383,  410,  411,  412,
-      383,  383,  412,  413,  383,  383,  414,  415,  416,  383,
-      383,  383,  383,  392,  383,  393,  383,  393,  394,  383,
-
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  417,
-      418,  417,  419,  420,  397,  421,  397,  383,  420,  383,
-      422,  399,  399,  399,  399,  399,  399,  399,  399,  399,
-      399,  400,  400,  396,  383,  383,  383,  383,  383,  401,
-      401,  423,  400,  400,  400,  400,  400,  400,  402,  403,
-      383,  383,  383,  383,  424,  425,  426,  427,  383,  383,
-      383,  383,  428,  429,  430,  431,  383,  432,  433,  434,
-      435,  436,  383,  437,  438,  439,  440,  440,  441,  383,
-      383,  383,  440,  442,  443,  444,  444,  445,  383,  383,
-      383,  444,  446,  447,  448,  449,  450,  451,  452,  383,
-
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  453,  453,  213,  454,  455,  456,  456,  383,  383,
-      457,  458,  459,  459,  460,  460,  461,  462,  462,  462,
-      462,  462,  462,  462,  462,  383,  463,  464,  465,  465,
-      465,  465,  383,  466,  467,  383,  468,  469,  470,  471,
-      472,  473,  474,  475,  476,  383,  477,  478,  479,  383,
-      480,  481,  482,  483,  383,  455,  266,  456,  456,  383,
-      484,  485,  486,  383,  224,  224,  461,  462,  462,  462,
-      462,  462,  462,  464,  487,  465,  465,  465,  488,  489,
-      490,  491,  492,  493,  494,  495,  496,  497,  383,  383,
-
-      498,  499,  383,  383,  500,  501,  383,  502,  503,  224,
-      224,  462,  462,  462,  462,  462,  462,  487,  465,  504,
-      505,  506,  507,  492,  508,  509,  495,  510,  511,  512,
-      513,  514,  515,  516,  517,  224,  224,  462,  462,  462,
-      462,  518,  519,  520,  521,  522,  523,  524,  525,  224,
-      462,  462,  462,  462,  526,  527,  528,  529,  530,  531,
-      532,  224,  462,  462,  533,  534,  535,  536,  537,  538,
-      539,  224,  462,  540,  541,  542,  543,  544,  515,  545,
-      224,  525,    0,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383
+      393,    1,  394,  394,  395,  395,  396,  396,  397,  397,
+      398,  398,  399,  399,  393,   15,  400,  400,  401,  401,
+      393,  393,  393,  393,  393,  393,  402,  403,  404,  393,
+      393,  393,  393,  405,  393,  406,  393,  407,  393,  408,
+      409,  410,  393,  393,  393,  411,  410,  410,  410,  410,
+      410,  410,  393,  393,  393,  412,  393,  393,  393,  413,
+      414,  393,  393,  393,  415,  393,  416,  393,  393,  393,
+      417,  393,  418,  393,  393,  393,  419,  393,  420,  393,
+      393,  420,  421,  393,  422,  393,  393,  422,  423,  393,
+      424,  425,  426,  393,  393,  393,  393,  402,  393,  403,
+
+      393,  403,  404,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  427,  428,  427,  429,  430,  407,  431,
+      407,  393,  430,  393,  432,  409,  409,  409,  409,  409,
+      409,  409,  409,  409,  409,  410,  410,  433,  393,  393,
+      393,  393,  393,  411,  411,  434,  410,  410,  410,  410,
+      410,  410,  435,  436,  393,  393,  393,  393,  435,  437,
+      438,  439,  440,  393,  393,  393,  393,  439,  441,  442,
+      443,  444,  393,  445,  443,  446,  447,  448,  449,  393,
+      450,  448,  451,  452,  453,  453,  454,  393,  393,  393,
+      453,  453,  455,  456,  457,  457,  458,  393,  393,  393,
+
+      457,  457,  459,  460,  461,  462,  463,  464,  465,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  466,  466,  223,  467,  468,  469,  469,  393,  393,
+      470,  471,  472,  472,  473,  473,  474,  475,  475,  475,
+      475,  475,  475,  475,  475,  393,  476,  477,  478,  478,
+      478,  478,  393,  479,  480,  393,  481,  482,  483,  484,
+      485,  486,  487,  488,  489,  393,  490,  491,  492,  393,
+      493,  494,  495,  496,  393,  468,  276,  469,  469,  393,
+      497,  498,  499,  393,  472,  285,  474,  475,  475,  475,
+      475,  475,  475,  477,  500,  478,  478,  478,  501,  502,
+
+      503,  504,  505,  506,  507,  508,  509,  510,  393,  393,
+      511,  512,  393,  393,  513,  514,  393,  515,  516,  285,
+      285,  475,  475,  475,  475,  475,  475,  500,  478,  517,
+      518,  519,  520,  505,  521,  522,  508,  523,  524,  525,
+      526,  527,  528,  529,  530,  285,  285,  475,  475,  475,
+      475,  531,  532,  533,  534,  535,  536,  537,  538,  285,
+      475,  475,  475,  475,  539,  540,  541,  542,  543,  544,
+      545,  285,  475,  475,  546,  547,  548,  549,  550,  551,
+      552,  285,  475,  553,  554,  555,  556,  557,  558,  559,
+      285,  538,    0,  393,  393,  393,  393,  393,  393,  393,
+
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393
     } ;
 
-static yyconst flex_int16_t yy_nxt[2398] =
+static yyconst flex_int16_t yy_nxt[2488] =
     {   0,
        22,   23,   24,   25,   23,   26,   27,   28,   22,   22,
        29,   30,   31,   32,   33,   32,   34,   22,   35,   36,
@@ -584,267 +588,276 @@ static yyconst flex_int16_t yy_nxt[2398] =
        42,   42,   43,   22,   44,   45,   46,   47,   42,   42,
        42,   42,   48,   42,   49,   50,   42,   42,   42,   42,
        51,   42,   42,   42,   52,   42,   42,   42,   42,   53,
-       54,   42,   56,   57,   56,   57,   92,   61,   62,   92,
-       58,   63,   58,   61,   62,   66,   67,   63,   66,   67,
-       71,   72,   86,   68,   73,  227,   68,   71,   72,   76,
-       77,   73,  227,   59,   86,   59,   91,   78,   64,   76,
-
-       77,   81,   82,  169,   64,   83,   69,   78,   91,   69,
-      178,   74,   81,   82,   97,   98,   83,  101,   74,  102,
-       79,  104,  105,  106,  104,  133,  141,  170,  134,  142,
-       79,  133,   84,  179,  134,  281,  196,   92,  107,  195,
-       92,   97,   98,   84,   85,   85,   86,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   85,   85,   85,   87,
-       85,   85,   87,   85,   85,   85,   85,   85,   85,   85,
-       88,   88,   88,   88,   88,   88,   85,   85,   85,   85,
-       85,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-
-       89,   89,   89,   85,   85,   85,  108,  114,  102,  207,
-      114,  136,  137,  138,  136,  269,  133,  227,  109,  134,
-      133,  227,  133,  134,  205,  134,  227,  116,  117,  118,
-      227,  109,  110,  133,  110,  270,  134,  143,  110,  119,
-      111,  112,  110,  111,  110,  139,  235,  110,  146,  110,
-      110,  123,  124,  175,  144,  187,  125,  145,  126,  127,
-      128,  153,  154,  133,  129,  130,  134,  227,  131,  161,
-      162,  181,  182,  184,  190,  191,  193,  176,  192,  183,
-      206,   98,  188,  200,  201,  202,  200,  204,  217,  218,
-      155,  147,  133,  232,  227,  134,  227,  185,  163,  148,
-
-      194,  108,  179,  102,  196,  188,  205,  195,  227,  219,
-      227,  107,  227,  109,  156,  197,  197,  197,  197,  197,
-      197,  109,  164,  209,  283,  198,  109,  210,  220,  210,
-      228,  229,  211,  109,  109,  212,  227,  212,  221,  233,
-      227,  212,  227,  187,  214,  212,  109,  212,  231,  110,
-      212,  110,  212,  212,  227,  110,  227,  133,  112,  110,
-      383,  110,  230,  212,  110,  212,  110,  110,  141,  212,
-      188,  383,  214,  212,  278,  212,  227,  110,  212,  110,
-      212,  212,  141,  110,  354,  383,  216,  110,  338,  110,
-      133,  234,  110,  134,  110,  110,  114,  217,  218,  114,
-
-      114,  217,  218,  114,  237,  133,  237,  133,  134,  383,
-      134,  133,  237,  279,  134,  237,  116,  178,  118,  237,
-      116,  237,  118,  133,  383,  383,  134,  240,  119,  270,
-      259,  163,  119,  217,  218,  133,  239,  222,  134,  169,
-      179,  222,  175,  227,  255,  296,  184,  193,  181,  182,
-      227,  293,  241,  155,  219,  164,  256,  188,  196,  303,
-      272,  195,  223,  170,  222,  209,  176,  179,  222,  222,
-      185,  194,  383,  222,  242,  109,  282,  156,  304,  179,
-      222,  280,  227,  222,  273,  222,  224,  110,  109,  110,
-      190,  191,  270,  110,  260,  111,  112,  110,  111,  110,
-
-      227,  307,  110,  196,  110,  110,  195,  269,  383,  133,
-      133,  221,  134,  134,  197,  197,  197,  197,  197,  197,
-      212,  188,  212,  315,  198,  285,  212,  316,  270,  214,
-      212,  227,  212,  227,  212,  212,  212,  212,  212,  227,
-      212,  227,  133,  214,  212,  134,  212,  286,  110,  212,
-      110,  212,  212,  133,  110,  299,  134,  216,  110,  312,
-      110,  227,  212,  110,  212,  110,  110,  288,  212,  317,
-      300,  267,  212,  227,  212,  227,  237,  212,  237,  212,
-      212,  114,  217,  218,  114,  285,  133,  227,  227,  134,
-      287,  237,  133,  237,  133,  134,  339,  134,  313,  227,
-
-      227,  271,  314,  274,  133,  341,  227,  134,  340,  237,
-      212,  237,  212,  119,  217,  218,  212,  319,  285,  267,
-      212,  352,  212,  227,  237,  212,  237,  212,  212,  227,
-      275,  351,  363,  244,  303,  219,  244,  353,  275,  275,
-      275,  244,  299,  285,  227,  227,  196,  188,  364,  275,
-      275,  275,  275,  275,  275,  217,  218,  245,  247,  179,
-      245,  247,  296,  293,  227,  245,  247,  373,  227,  248,
-      250,  276,  248,  250,  226,  226,  219,  248,  250,  276,
-      276,  276,  211,  211,   93,  205,  265,  265,  195,  189,
-      276,  276,  276,  276,  276,  276,  310,  189,  180,  251,
-
-      253,  180,  251,  253,  310,  310,  310,  251,  253,  172,
-      166,  246,  246,  158,  243,  310,  310,  310,  310,  310,
-      310,  311,  243,  150,  254,  257,  236,  254,  257,  311,
-      311,  311,  254,  257,  236,  227,  227,  226,  208,  208,
-      311,  311,  311,  311,  311,  311,  336,  107,  203,  258,
-      261,   93,  258,  261,  336,  336,  336,  258,  261,  203,
-      189,  189,  180,  180,  174,  336,  336,  336,  336,  336,
-      336,  337,  173,  173,  262,  289,  172,  262,  289,  337,
-      337,  337,  262,  289,  168,  167,  167,  166,  160,  159,
-      337,  337,  337,  337,  337,  337,  350,  159,  158,  290,
-
-      291,  152,  290,  291,  350,  350,  350,  290,  291,  151,
-      151,  150,  135,  120,  100,  350,  350,  350,  350,  350,
-      350,  222,   95,   93,  292,  294,   93,  292,  294,  222,
-      222,  222,  292,  294,  383,  383,  383,  383,  383,  383,
-      222,  222,  222,  222,  222,  222,  362,  383,  383,  295,
-      297,  383,  295,  297,  362,  362,  362,  295,  297,  383,
-      383,  383,  383,  383,  383,  362,  362,  362,  362,  362,
-      362,  372,  383,  383,  298,  301,  383,  298,  301,  372,
-      372,  372,  298,  301,  383,  383,  383,  383,  383,  383,
-      372,  372,  372,  372,  372,  372,  381,  383,  383,  302,
-
-      305,  383,  302,  305,  381,  381,  381,  302,  305,  383,
-      383,  383,  383,  383,  383,  381,  381,  381,  381,  381,
-      381,  222,  383,  383,  306,  308,  383,  306,  308,  222,
-      222,  222,  306,  308,  383,  383,  383,  383,  383,  383,
-      222,  222,  222,  222,  222,  222,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
-
-       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
-       65,   65,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   75,   75,   75,   75,   75,   75,
-       75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
-       75,   75,   75,   75,   75,   75,   80,   80,   80,   80,
-       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
-       80,   80,   80,   80,   80,   80,   80,   80,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
-
-       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
-       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
-       86,   86,   94,   94,  383,   94,   94,   94,   94,   94,
+       54,   42,   22,   55,  237,   57,   58,   55,   96,   57,
+       58,   96,   55,   59,   62,   63,  214,   59,   64,   55,
+      237,   62,   63,   55,   66,   64,   68,   69,   66,   55,
+       68,   69,  101,  102,   70,  215,   60,   95,   70,   78,
+
+       60,   80,   81,   95,   72,   65,   74,   75,  237,   82,
+       76,  105,   65,  106,  237,  176,   72,   71,   74,   75,
+      137,   71,   76,  138,   84,   55,   86,   87,  145,   55,
+       88,  146,   83,  137,   55,  137,  138,   77,  138,  177,
+      183,   55,   78,  237,   80,   81,   66,  101,  102,   77,
+       66,  112,   82,  106,  196,  193,   84,   89,   86,   87,
+      186,   78,   88,  113,  184,  238,   72,  108,  109,  110,
+      108,  118,  149,  203,  118,   83,  113,  137,   72,  194,
+      138,  197,  237,  187,  111,  137,   84,  206,  138,   89,
+      205,  120,  121,  122,  216,  102,   96,  204,  147,   96,
+
+      127,  128,  306,  123,   78,  129,  148,  130,  131,  132,
+      220,  245,  220,  133,  134,  221,  303,  135,   84,   90,
+       90,   55,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   91,   90,   90,   91,   90,   90,
+       90,   90,   90,   90,   90,   92,   92,   92,   92,   92,
+       92,   90,   90,   90,   90,   90,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
+       93,   93,   93,   93,   93,   93,   93,   93,   90,   90,
+       90,   90,  114,  137,  114,  295,  138,  237,  114,  237,
+      115,  116,  114,  115,  114,  137,  237,  114,  138,  114,
+
+      114,  140,  141,  142,  140,  157,  158,  166,  167,  150,
+      189,  190,  199,  200,  217,  112,  201,  106,  191,  210,
+      211,  212,  210,  151,  227,  228,  237,  113,  111,  215,
+      237,  152,  219,  237,  160,  143,  169,  230,  113,  291,
+      113,  187,  113,  197,  237,  229,  137,  231,  240,  138,
+      206,  113,  237,  205,  237,  113,  242,  186,  161,  237,
+      170,  207,  207,  207,  207,  207,  207,  222,  239,  222,
+      160,  208,  137,  222,  293,  393,  224,  222,  169,  222,
+      187,  114,  222,  114,  222,  222,  243,  114,  279,  244,
+      116,  114,  241,  114,  161,  222,  114,  222,  114,  114,
+
+      145,  222,  170,  393,  224,  222,  317,  222,  280,  114,
+      222,  114,  222,  222,  145,  114,  231,  393,  226,  114,
+      137,  114,  137,  138,  114,  138,  114,  114,  118,  227,
+      228,  118,  118,  227,  228,  118,  247,  137,  247,  137,
+      138,  313,  138,  137,  247,  309,  138,  247,  120,  295,
+      122,  247,  120,  247,  122,  176,  137,  250,  183,  138,
+      123,  265,  186,  193,  123,  227,  228,  203,  249,  232,
+      196,  269,  251,  232,  237,  189,  190,  199,  200,  177,
+      196,  270,  184,  266,  187,  187,  229,  194,  237,  206,
+      282,  204,  205,  219,  233,  252,  232,  197,  197,  137,
+
+      232,  232,  138,  113,  237,  232,  187,  197,  197,  237,
+      237,  289,  232,  237,  283,  232,  113,  232,  234,  114,
+      137,  114,  206,  138,  237,  114,  288,  115,  116,  114,
+      115,  114,  206,  313,  114,  205,  114,  114,  197,  279,
+      393,  309,  290,  207,  207,  207,  207,  207,  207,  222,
+      292,  222,  314,  208,  325,  222,  310,  296,  224,  222,
+      280,  222,  187,  222,  222,  222,  222,  222,  393,  222,
+      393,  137,  224,  222,  138,  222,  237,  114,  222,  114,
+      222,  222,  137,  114,  306,  138,  226,  114,  280,  114,
+      280,  222,  114,  222,  114,  114,  298,  222,  237,  237,
+
+      277,  222,  322,  222,  237,  247,  222,  247,  222,  222,
+      118,  227,  228,  118,  295,  137,  237,  237,  138,  297,
+      247,  137,  247,  137,  138,  326,  138,  323,  237,  237,
+      281,  324,  284,  237,  237,  237,  348,  327,  247,  222,
+      247,  222,  123,  227,  228,  222,  329,  295,  277,  222,
+      237,  222,  349,  247,  222,  247,  222,  222,  137,  285,
+      237,  138,  362,  350,  229,  351,  361,  285,  285,  285,
+      363,  237,  303,  237,  237,  237,  236,  236,  285,  285,
+      285,  285,  285,  285,  227,  228,  373,  254,  221,  221,
+      254,  255,  364,   97,  255,  254,  374,  215,  257,  255,
+
+      286,  257,  275,  275,  258,  229,  257,  258,  286,  286,
+      286,  383,  258,  205,  198,  198,  188,  188,  179,  286,
+      286,  286,  286,  286,  286,  227,  228,  260,  261,  263,
+      260,  261,  263,  179,  172,  260,  261,  263,  172,  264,
+      267,  320,  264,  267,  163,  256,  229,  264,  267,  320,
+      320,  320,  256,  163,  154,  253,  253,  154,  246,  246,
+      320,  320,  320,  320,  320,  320,  321,  237,  237,  268,
+      271,  236,  268,  271,  321,  321,  321,  268,  271,  218,
+      218,  111,  213,   97,  213,  321,  321,  321,  321,  321,
+      321,  346,  198,  198,  272,  299,  188,  272,  299,  346,
+
+      346,  346,  272,  299,  188,  181,  180,  180,  179,  174,
+      346,  346,  346,  346,  346,  346,  347,  173,  173,  300,
+      301,  172,  300,  301,  347,  347,  347,  300,  301,  165,
+      164,  164,  163,  156,  155,  347,  347,  347,  347,  347,
+      347,  360,  155,  154,  302,  304,  139,  302,  304,  360,
+      360,  360,  302,  304,  124,  104,   99,   97,   97,  393,
+      360,  360,  360,  360,  360,  360,  232,  393,  393,  305,
+      307,  393,  305,  307,  232,  232,  232,  305,  307,  393,
+      393,  393,  393,  393,  393,  232,  232,  232,  232,  232,
+      232,  372,  393,  393,  308,  311,  393,  308,  311,  372,
+
+      372,  372,  308,  311,  393,  393,  393,  393,  393,  393,
+      372,  372,  372,  372,  372,  372,  382,  393,  393,  312,
+      315,  393,  312,  315,  382,  382,  382,  312,  315,  393,
+      393,  393,  393,  393,  393,  382,  382,  382,  382,  382,
+      382,  391,  393,  393,  316,  318,  393,  316,  318,  391,
+      391,  391,  316,  318,  393,  393,  393,  393,  393,  393,
+      391,  391,  391,  391,  391,  391,  232,  393,  393,  319,
+      330,  393,  319,  330,  232,  232,  232,  319,  330,  393,
+      393,  393,  393,  393,  393,  232,  232,  232,  232,  232,
+      232,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   61,   61,   61,   61,   61,   61,
+       61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
+       61,   61,   61,   61,   61,   61,   61,   67,   67,   67,
+       67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
+       67,   67,   67,   67,   67,   67,   67,   67,   67,   67,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   79,   79,   79,   79,   79,   79,   79,
+       79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
+
+       79,   79,   79,   79,   79,   79,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   94,
+       94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
-      383,   94,   94,   94,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
-       96,   96,   96,   96,   96,   96,   99,   99,  383,   99,
-       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
-       99,   99,   99,   99,  383,   99,   99,   99,  103,  103,
-      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
-
-      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
-      113,  383,  113,  383,  113,  113,  113,  113,  383,  113,
-      113,  113,  383,  113,  113,  113,  115,  383,  383,  115,
-      115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
-      115,  115,  115,  115,  115,  115,  115,  121,  121,  121,
-      383,  121,  121,  121,  122,  122,  122,  383,  383,  122,
-      132,  132,  132,  132,  383,  132,  132,  132,  383,  132,
-      132,  132,  140,  140,  140,  140,  383,  140,  140,  140,
-      383,  140,  140,  140,  149,  149,  383,  383,  149,  149,
-      149,  383,  149,  149,  149,  149,  149,  149,  149,  149,
-
-      149,  149,  149,  149,  149,  149,  149,  149,  383,  149,
-      309,  149,  320,  309,  383,  320,  383,  383,  309,  383,
-      320,  149,  149,  383,  149,  157,  157,  383,  383,  157,
-      383,  157,  157,  157,  157,  157,  157,  157,  157,  157,
-      157,  157,  157,  157,  157,  157,  157,  157,  157,  383,
-      157,  321,  157,  322,  321,  383,  322,  383,  383,  321,
-      383,  322,  157,  157,  383,  157,  165,  165,  383,  383,
-      165,  165,  165,  383,  165,  165,  165,  165,  165,  165,
-      165,  165,  165,  165,  165,  165,  165,  165,  165,  323,
-      165,  325,  323,  383,  325,  383,  383,  323,  383,  325,
-
-      165,  165,  383,  165,  171,  171,  383,  383,  171,  383,
+       94,   94,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   98,   98,  393,   98,   98,
+       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
+       98,   98,   98,  393,   98,   98,   98,   98,  100,  100,
+
+      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
+      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
+      100,  103,  103,  393,  103,  103,  103,  103,  103,  103,
+      103,  103,  103,  103,  103,  103,  103,  103,  103,  393,
+      103,  103,  103,  103,  107,  107,  107,  107,  107,  107,
+      107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
+      107,  107,  107,  107,  107,  107,  107,  117,  393,  117,
+      393,  117,  117,  117,  117,  393,  117,  117,  117,  393,
+      117,  117,  117,  119,  393,  393,  119,  119,  119,  119,
+      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
+
+      119,  119,  119,  119,  119,  125,  125,  125,  393,  125,
+      125,  125,  126,  126,  126,  393,  393,  126,  136,  136,
+      136,  136,  393,  136,  136,  136,  393,  136,  136,  136,
+      144,  144,  144,  144,  393,  144,  144,  144,  393,  144,
+      144,  144,  153,  393,  393,  153,  153,  153,  393,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  159,  159,  393,  159,  331,  159,  332,
+      331,  393,  332,  393,  393,  331,  393,  332,  159,  159,
+      393,  159,  162,  393,  393,  162,  393,  162,  162,  162,
+      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
+
+      162,  162,  162,  168,  168,  393,  168,  333,  168,  335,
+      333,  393,  335,  393,  393,  333,  393,  335,  168,  168,
+      336,  168,  171,  336,  393,  171,  171,  171,  336,  171,
       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
-      171,  171,  171,  171,  171,  171,  171,  326,  171,  328,
-      326,  383,  328,  383,  383,  326,  383,  328,  171,  171,
-      383,  171,  177,  177,  383,  383,  177,  177,  177,  177,
-      177,  177,  177,  177,  177,  177,  177,  177,  177,  177,
-      177,  177,  177,  177,  177,  329,  177,  330,  329,  383,
-      330,  383,  383,  329,  383,  330,  177,  177,  383,  177,
-      186,  186,  383,  383,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-
-      186,  186,  186,  331,  186,  332,  331,  383,  332,  383,
-      383,  331,  383,  332,  186,  186,  383,  186,  195,  333,
-      195,  383,  333,  195,  195,  195,  383,  333,  195,  197,
-      334,  197,  383,  334,  197,  197,  197,  383,  334,  197,
-      199,  383,  199,  383,  383,  199,  199,  199,  383,  199,
-      199,  213,  383,  213,  383,  213,  213,  213,  213,  383,
-      213,  213,  213,  383,  213,  213,  213,  111,  383,  111,
-      383,  111,  111,  111,  111,  383,  111,  111,  111,  383,
-      111,  111,  111,  215,  383,  215,  383,  215,  215,  215,
-      215,  383,  215,  215,  215,  383,  215,  215,  215,  114,
-
-      114,  114,  114,  114,  114,  114,  114,  114,  114,  114,
-      114,  114,  383,  114,  114,  114,  114,  114,  114,  114,
-      116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
-      116,  116,  116,  116,  116,  116,  116,  116,  225,  225,
-      225,  383,  383,  225,  225,  225,  383,  225,  225,  225,
-      238,  383,  383,  383,  238,  383,  238,  383,  383,  238,
-      238,  238,  383,  238,  238,  238,  157,  157,  383,  383,
-      157,  383,  157,  157,  157,  157,  157,  157,  157,  157,
-      157,  157,  157,  157,  157,  157,  157,  157,  157,  335,
-      157,  342,  335,  383,  342,  383,  383,  335,  383,  342,
-
-      157,  157,  383,  157,  165,  165,  383,  383,  165,  165,
-      165,  383,  165,  165,  165,  165,  165,  165,  165,  165,
-      165,  165,  165,  165,  165,  165,  165,  149,  165,  343,
-      149,  383,  343,  383,  383,  149,  383,  343,  165,  165,
-      383,  165,  249,  249,  249,  383,  383,  249,  171,  171,
-      383,  383,  171,  383,  171,  171,  171,  171,  171,  171,
+      171,  171,  171,  175,  338,  175,  339,  338,  393,  339,
+      393,  393,  338,  393,  339,  175,  175,  393,  175,  178,
+      393,  393,  178,  393,  178,  178,  178,  178,  178,  178,
+      178,  178,  178,  178,  178,  178,  178,  178,  178,  178,
+      182,  340,  182,  341,  340,  393,  341,  393,  393,  340,
+      393,  341,  182,  182,  393,  182,  185,  393,  393,  185,
+
+      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
+      185,  185,  185,  185,  185,  185,  185,  192,  342,  192,
+      343,  342,  393,  343,  393,  393,  342,  393,  343,  192,
+      192,  393,  192,  195,  393,  393,  195,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
+      195,  195,  195,  195,  202,  344,  202,  345,  344,  393,
+      345,  393,  393,  344,  393,  345,  202,  202,  393,  202,
+      205,  352,  205,  393,  352,  205,  205,  205,  393,  352,
+      205,  207,  159,  207,  393,  159,  207,  207,  207,  393,
+      159,  207,  209,  393,  209,  393,  393,  209,  209,  209,
+
+      393,  209,  209,  223,  393,  223,  393,  223,  223,  223,
+      223,  393,  223,  223,  223,  393,  223,  223,  223,  115,
+      393,  115,  393,  115,  115,  115,  115,  393,  115,  115,
+      115,  393,  115,  115,  115,  225,  393,  225,  393,  225,
+      225,  225,  225,  393,  225,  225,  225,  393,  225,  225,
+      225,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  393,  118,  118,  118,  118,  118,
+      118,  118,  118,  120,  120,  120,  120,  120,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  120,  120,  120,
+      120,  120,  235,  235,  235,  393,  393,  235,  235,  235,
+
+      393,  235,  235,  235,  117,  393,  117,  393,  117,  117,
+      117,  117,  393,  117,  117,  117,  393,  117,  117,  117,
+      248,  393,  393,  393,  248,  393,  248,  393,  393,  248,
+      248,  248,  393,  248,  248,  248,  153,  393,  393,  153,
+      153,  153,  393,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  159,  353,  159,
+      168,  353,  393,  168,  393,  393,  353,  393,  168,  159,
+      159,  393,  159,  162,  393,  393,  162,  393,  162,  162,
+      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
+      162,  162,  162,  162,  168,  354,  168,  175,  354,  393,
+
+      175,  393,  393,  354,  393,  175,  168,  168,  355,  168,
+      171,  355,  393,  171,  171,  171,  355,  171,  171,  171,
       171,  171,  171,  171,  171,  171,  171,  171,  171,  171,
-      171,  157,  171,  344,  157,  383,  344,  383,  383,  157,
-      383,  344,  171,  171,  383,  171,  252,  252,  252,  383,
-      383,  252,  177,  177,  383,  383,  177,  177,  177,  177,
-
-      177,  177,  177,  177,  177,  177,  177,  177,  177,  177,
-      177,  177,  177,  177,  177,  165,  177,  345,  165,  383,
-      345,  383,  383,  165,  383,  345,  177,  177,  383,  177,
-      186,  186,  383,  383,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  171,  186,  346,  171,  383,  346,  383,
-      383,  171,  383,  346,  186,  186,  383,  186,  195,  177,
-      195,  383,  177,  195,  195,  195,  383,  177,  195,  263,
-      347,  263,  383,  347,  263,  263,  263,  383,  347,  263,
-      197,  186,  197,  383,  186,  197,  197,  197,  383,  186,
-
-      197,  264,  383,  383,  264,  264,  264,  383,  383,  264,
-      199,  383,  199,  383,  383,  199,  199,  199,  383,  199,
-      199,  213,  383,  213,  383,  213,  213,  213,  213,  383,
-      213,  213,  213,  383,  213,  213,  213,  215,  383,  215,
-      383,  215,  215,  215,  215,  383,  215,  215,  215,  383,
-      215,  215,  215,  266,  383,  266,  383,  266,  266,  266,
-      266,  383,  266,  266,  266,  383,  266,  266,  266,  268,
-      383,  268,  268,  383,  268,  383,  268,  383,  268,  383,
-      268,  268,  383,  268,  268,  268,  383,  268,  268,  268,
-      271,  348,  271,  349,  348,  383,  349,  383,  383,  348,
-
-      383,  349,  271,  271,  383,  271,  222,  222,  222,  222,
-      222,  222,  222,  222,  222,  222,  222,  222,  222,  222,
-      222,  222,  222,  222,  222,  222,  222,  114,  114,  114,
-      114,  114,  114,  114,  114,  114,  114,  114,  114,  114,
-      383,  114,  114,  114,  114,  114,  114,  114,  225,  225,
-      225,  383,  383,  225,  225,  225,  383,  225,  225,  225,
-      277,  383,  383,  277,  277,  277,  383,  383,  277,  122,
-      355,  383,  383,  355,  122,  122,  122,  383,  355,  122,
-      237,  383,  383,  383,  237,  383,  237,  383,  383,  237,
-      237,  237,  383,  237,  237,  237,  284,  383,  383,  383,
-
-      284,  284,  284,  383,  383,  284,  284,  284,  383,  284,
-      284,  284,  132,  132,  132,  132,  383,  132,  132,  132,
-      383,  132,  132,  132,  249,  356,  383,  383,  356,  249,
-      249,  249,  383,  356,  249,  252,  357,  383,  383,  357,
-      252,  252,  252,  383,  357,  252,  177,  177,  383,  383,
-      177,  177,  177,  383,  177,  177,  177,  177,  177,  177,
-      177,  177,  177,  177,  177,  177,  177,  177,  186,  186,
-      383,  383,  186,  383,  186,  186,  186,  186,  186,  186,
-      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
-      263,  358,  263,  383,  358,  263,  263,  263,  383,  358,
-
-      263,  264,  383,  383,  264,  264,  264,  383,  383,  264,
-      271,  271,  271,  271,  271,  271,  271,  271,  271,  271,
-      271,  271,  271,  271,  271,  271,  271,  271,  318,  318,
-      318,  383,  383,  318,  318,  318,  383,  318,  318,  318,
-      324,  383,  383,  324,  324,  324,  383,  359,  324,  327,
-      359,  383,  327,  327,  327,  359,  360,  327,  361,  360,
-      271,  361,  365,  271,  360,  365,  361,  383,  271,  366,
-      365,  367,  366,  368,  367,  369,  368,  366,  369,  367,
-      383,  368,  370,  369,  371,  370,  374,  371,  375,  374,
-      370,  375,  371,  383,  374,  376,  375,  377,  376,  378,
-
-      377,  379,  378,  376,  379,  377,  383,  378,  380,  379,
-      149,  380,  157,  149,  165,  157,  380,  165,  149,  383,
-      157,  171,  165,  177,  171,  382,  177,  383,  382,  171,
-      383,  177,  383,  382,   21,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383
-
+      171,  175,  182,  175,  356,  182,  393,  356,  393,  393,
+      182,  393,  356,  175,  175,  393,  175,  259,  259,  259,
+      393,  393,  259,  178,  393,  393,  178,  393,  178,  178,
+      178,  178,  178,  178,  178,  178,  178,  178,  178,  178,
+      178,  178,  178,  178,  182,  192,  182,  357,  192,  393,
+      357,  393,  393,  192,  393,  357,  182,  182,  393,  182,
+      262,  262,  262,  393,  393,  262,  185,  393,  393,  185,
+
+      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
+      185,  185,  185,  185,  185,  185,  185,  192,  202,  192,
+      358,  202,  393,  358,  393,  393,  202,  393,  358,  192,
+      192,  393,  192,  195,  393,  393,  195,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
+      195,  195,  195,  195,  202,  359,  202,  365,  359,  393,
+      365,  393,  393,  359,  393,  365,  202,  202,  393,  202,
+      205,  366,  205,  393,  366,  205,  205,  205,  393,  366,
+      205,  273,  367,  273,  393,  367,  273,  273,  273,  393,
+      367,  273,  207,  368,  207,  393,  368,  207,  207,  207,
+
+      393,  368,  207,  274,  393,  393,  274,  274,  274,  393,
+      393,  274,  209,  393,  209,  393,  393,  209,  209,  209,
+      393,  209,  209,  223,  393,  223,  393,  223,  223,  223,
+      223,  393,  223,  223,  223,  393,  223,  223,  223,  225,
+      393,  225,  393,  225,  225,  225,  225,  393,  225,  225,
+      225,  393,  225,  225,  225,  276,  393,  276,  393,  276,
+      276,  276,  276,  393,  276,  276,  276,  393,  276,  276,
+      276,  278,  393,  278,  278,  393,  278,  393,  278,  393,
+      278,  393,  278,  278,  393,  278,  278,  278,  393,  278,
+      278,  278,  278,  281,  369,  281,  370,  369,  393,  370,
+
+      393,  393,  369,  393,  370,  281,  281,  393,  281,  232,
+      232,  232,  232,  232,  232,  232,  232,  232,  232,  232,
+      232,  232,  232,  232,  232,  232,  232,  232,  232,  232,
+      232,  118,  118,  118,  118,  118,  118,  118,  118,  118,
+      118,  118,  118,  118,  393,  118,  118,  118,  118,  118,
+      118,  118,  118,  235,  235,  235,  393,  393,  235,  235,
+      235,  393,  235,  235,  235,  287,  393,  393,  287,  287,
+      287,  393,  393,  287,  126,  371,  393,  393,  371,  126,
+      126,  126,  393,  371,  126,  247,  393,  393,  393,  247,
+      393,  247,  393,  393,  247,  247,  247,  393,  247,  247,
+
+      247,  294,  393,  393,  393,  294,  294,  294,  393,  393,
+      294,  294,  294,  393,  294,  294,  294,  136,  136,  136,
+      136,  393,  136,  136,  136,  393,  136,  136,  136,  259,
+      281,  393,  393,  281,  259,  259,  259,  393,  281,  259,
+      262,  375,  393,  393,  375,  262,  262,  262,  393,  375,
+      262,  185,  393,  393,  185,  185,  185,  393,  185,  185,
+      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
+      185,  185,  195,  393,  393,  195,  393,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
+      195,  195,  195,  273,  376,  273,  393,  376,  273,  273,
+
+      273,  393,  376,  273,  274,  393,  393,  274,  274,  274,
+      393,  393,  274,  281,  281,  281,  281,  281,  281,  281,
+      281,  281,  281,  281,  281,  281,  281,  281,  281,  281,
+      281,  281,  328,  328,  328,  393,  393,  328,  328,  328,
+      393,  328,  328,  328,  334,  393,  393,  334,  334,  334,
+      393,  377,  334,  337,  377,  393,  337,  337,  337,  377,
+      378,  337,  379,  378,  380,  379,  381,  380,  378,  381,
+      379,  393,  380,  384,  381,  385,  384,  386,  385,  387,
+      386,  384,  387,  385,  393,  386,  388,  387,  389,  388,
+      390,  389,  159,  390,  388,  159,  389,  393,  390,  168,
+
+      159,  175,  168,  182,  175,  192,  182,  168,  192,  175,
+      393,  182,  202,  192,  392,  202,  393,  392,  393,  393,
+      202,  393,  392,   21,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393
     } ;
 
-static yyconst flex_int16_t yy_chk[2398] =
+static yyconst flex_int16_t yy_chk[2488] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -852,264 +865,273 @@ static yyconst flex_int16_t yy_chk[2398] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    3,    3,    4,    4,   23,    5,    5,   23,
-        3,    5,    4,    6,    6,    7,    7,    6,    8,    8,
-        9,    9,   17,    7,    9,  373,    8,   10,   10,   11,
-       11,   10,  232,    3,   18,    4,   17,   11,    5,   12,
-
-       12,   13,   13,   69,    6,   13,    7,   12,   18,    8,
-       75,    9,   14,   14,   28,   28,   14,   32,   10,   32,
-       11,   34,   34,   34,   34,   42,   46,   69,   42,   46,
-       12,   47,   13,   75,   47,  232,   88,   92,   34,   88,
-       92,   96,   96,   14,   15,   15,   15,   15,   15,   15,
+        1,    1,    1,    3,  383,    3,    3,    4,   23,    4,
+        4,   23,    5,    3,    5,    5,   99,    4,    5,    6,
+      373,    6,    6,   17,    7,    6,    7,    7,    8,   18,
+        8,    8,   28,   28,    7,   99,    3,   17,    8,   11,
+
+        4,   11,   11,   18,    9,    5,    9,    9,  364,   11,
+        9,   32,    6,   32,  361,   71,   10,    7,   10,   10,
+       42,    8,   10,   42,   13,    3,   13,   13,   46,    4,
+       13,   46,   11,   47,    5,   50,   47,    9,   50,   71,
+       77,    6,   12,  128,   12,   12,    7,  100,  100,   10,
+        8,   35,   12,   35,   85,   83,   14,   13,   14,   14,
+       79,   11,   14,   35,   77,  128,    9,   34,   34,   34,
+       34,   38,   50,   89,   38,   12,   35,   48,   10,   83,
+       48,   85,  135,   79,   34,   49,   13,   92,   49,   14,
+       92,   38,   38,   38,  102,  102,   96,   89,   48,   96,
+
+       41,   41,  337,   38,   12,   41,   49,   41,   41,   41,
+      113,  135,  113,   41,   41,  113,  334,   41,   14,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
-
-       15,   15,   15,   15,   15,   15,   35,   38,   35,  100,
-       38,   45,   45,   45,   45,  217,   48,  131,   35,   48,
-       50,  363,   51,   50,  100,   51,  354,   38,   38,   38,
-      351,   35,   36,   49,   36,  217,   49,   48,   36,   38,
-       36,   36,   36,   36,   36,   45,  131,   36,   51,   36,
-       36,   41,   41,   74,   49,   80,   41,   50,   41,   41,
-       41,   59,   59,   52,   41,   41,   52,  128,   41,   64,
-       64,   78,   78,   79,   83,   83,   84,   74,   83,   78,
-       98,   98,   80,   91,   91,   91,   91,   95,  114,  114,
-       59,   52,  132,  128,  235,  132,  125,   79,   64,   52,
-
-       84,  102,   78,  102,   89,   83,   95,   89,  124,  114,
-      127,  107,  129,  102,   59,   89,   89,   89,   89,   89,
-       89,  107,   64,  108,  235,   89,  102,  109,  116,  109,
-      124,  125,  109,  108,  107,  110,  228,  110,  116,  129,
-      126,  110,  341,  186,  110,  110,  108,  110,  127,  111,
-      110,  111,  110,  110,  130,  111,  313,  133,  111,  111,
-      133,  111,  126,  112,  111,  112,  111,  111,  140,  112,
-      186,  140,  112,  112,  228,  112,  229,  113,  112,  113,
-      112,  112,  141,  113,  341,  141,  113,  113,  313,  113,
-      144,  130,  113,  144,  113,  113,  115,  115,  115,  115,
-
-      117,  117,  117,  117,  142,  143,  142,  145,  143,  268,
-      145,  146,  142,  229,  146,  142,  115,  177,  115,  142,
-      117,  142,  117,  147,  150,  150,  147,  144,  115,  268,
-      187,  158,  117,  119,  119,  148,  143,  119,  148,  166,
-      177,  119,  172,  230,  178,  327,  179,  188,  183,  183,
-      234,  324,  147,  150,  119,  158,  183,  187,  197,  260,
-      221,  197,  119,  166,  119,  209,  172,  178,  119,  119,
-      179,  188,  269,  119,  148,  209,  234,  150,  260,  183,
-      119,  230,  281,  119,  221,  119,  119,  134,  209,  134,
-      192,  192,  269,  134,  192,  134,  134,  134,  134,  134,
-
-      282,  271,  134,  199,  134,  134,  199,  218,  218,  240,
-      239,  271,  240,  239,  199,  199,  199,  199,  199,  199,
-      212,  192,  212,  281,  199,  318,  212,  282,  218,  212,
-      212,  283,  212,  278,  213,  212,  213,  212,  212,  317,
-      213,  312,  242,  213,  213,  242,  213,  239,  215,  213,
-      215,  213,  213,  241,  215,  256,  241,  215,  215,  278,
-      215,  314,  216,  215,  216,  215,  215,  242,  216,  283,
-      256,  216,  216,  315,  216,  316,  238,  216,  238,  216,
-      216,  222,  222,  222,  222,  238,  287,  279,  339,  287,
-      241,  238,  286,  238,  288,  286,  314,  288,  279,  338,
-
-      340,  222,  279,  222,  319,  316,  352,  319,  315,  284,
-      266,  284,  266,  222,  223,  223,  266,  286,  284,  266,
-      266,  339,  266,  353,  284,  266,  284,  266,  266,  364,
-      223,  338,  352,  424,  303,  223,  424,  340,  223,  223,
-      223,  424,  299,  285,  280,  277,  263,  259,  353,  223,
-      223,  223,  223,  223,  223,  224,  224,  425,  428,  255,
-      425,  428,  252,  249,  233,  425,  428,  364,  231,  429,
-      433,  224,  429,  433,  226,  225,  224,  429,  433,  224,
-      224,  224,  211,  210,  206,  203,  202,  201,  196,  191,
-      224,  224,  224,  224,  224,  224,  275,  190,  182,  434,
-
-      438,  181,  434,  438,  275,  275,  275,  434,  438,  171,
-      165,  162,  161,  157,  154,  275,  275,  275,  275,  275,
-      275,  276,  153,  149,  439,  442,  138,  439,  442,  276,
-      276,  276,  439,  442,  137,  123,  122,  121,  106,  105,
-      276,  276,  276,  276,  276,  276,  310,  101,   99,  443,
-      446,   97,  443,  446,  310,  310,  310,  443,  446,   94,
-       82,   81,   77,   76,   73,  310,  310,  310,  310,  310,
-      310,  311,   72,   71,  447,  466,   70,  447,  466,  311,
-      311,  311,  447,  466,   68,   67,   66,   65,   63,   62,
-      311,  311,  311,  311,  311,  311,  336,   61,   60,  467,
-
-      468,   58,  467,  468,  336,  336,  336,  467,  468,   57,
-       56,   55,   43,   39,   29,  336,  336,  336,  336,  336,
-      336,  337,   27,   25,  469,  471,   24,  469,  471,  337,
-      337,  337,  469,  471,   21,    0,    0,    0,    0,    0,
-      337,  337,  337,  337,  337,  337,  350,    0,    0,  472,
-      474,    0,  472,  474,  350,  350,  350,  472,  474,    0,
-        0,    0,    0,    0,    0,  350,  350,  350,  350,  350,
-      350,  362,    0,    0,  475,  477,    0,  475,  477,  362,
-      362,  362,  475,  477,    0,    0,    0,    0,    0,    0,
-      362,  362,  362,  362,  362,  362,  372,    0,    0,  478,
-
-      480,    0,  478,  480,  372,  372,  372,  478,  480,    0,
+       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
+       15,   15,   36,   51,   36,  328,   51,  327,   36,  322,
+       36,   36,   36,   36,   36,   52,  242,   36,   52,   36,
+
+       36,   45,   45,   45,   45,   60,   60,   65,   65,   51,
+       82,   82,   88,   88,  104,  106,   88,  106,   82,   95,
+       95,   95,   95,   52,  118,  118,  130,  106,  111,  104,
+      132,   52,  112,  129,   60,   45,   65,  120,  111,  242,
+      106,   82,  112,   88,  245,  118,  136,  120,  130,  136,
+       93,  111,  134,   93,  131,  112,  132,  185,   60,  133,
+       65,   93,   93,   93,   93,   93,   93,  114,  129,  114,
+      154,   93,  137,  114,  245,  137,  114,  114,  163,  114,
+      185,  115,  114,  115,  114,  114,  133,  115,  227,  134,
+      115,  115,  131,  115,  154,  116,  115,  116,  115,  115,
+
+      144,  116,  163,  144,  116,  116,  281,  116,  227,  117,
+      116,  117,  116,  116,  145,  117,  281,  145,  117,  117,
+      148,  117,  149,  148,  117,  149,  117,  117,  119,  119,
+      119,  119,  121,  121,  121,  121,  146,  147,  146,  150,
+      147,  313,  150,  151,  146,  309,  151,  146,  119,  295,
+      119,  146,  121,  146,  121,  172,  152,  148,  179,  152,
+      119,  186,  192,  187,  121,  123,  123,  197,  147,  123,
+      195,  196,  151,  123,  239,  191,  191,  201,  201,  172,
+      202,  201,  179,  191,  186,  192,  123,  187,  238,  207,
+      231,  197,  207,  219,  123,  152,  123,  195,  196,  250,
+
+      123,  123,  250,  219,  240,  123,  191,  202,  201,  290,
+      287,  239,  123,  291,  231,  123,  219,  123,  123,  138,
+      249,  138,  273,  249,  244,  138,  238,  138,  138,  138,
+      138,  138,  209,  270,  138,  209,  138,  138,  269,  228,
+      228,  266,  240,  209,  209,  209,  209,  209,  209,  222,
+      244,  222,  270,  209,  291,  222,  266,  249,  222,  222,
+      228,  222,  265,  223,  222,  223,  222,  222,  278,  223,
+      279,  252,  223,  223,  252,  223,  288,  225,  223,  225,
+      223,  223,  251,  225,  262,  251,  225,  225,  278,  225,
+      279,  226,  225,  226,  225,  225,  252,  226,  292,  293,
+
+      226,  226,  288,  226,  323,  248,  226,  248,  226,  226,
+      232,  232,  232,  232,  248,  297,  289,  324,  297,  251,
+      248,  296,  248,  298,  296,  292,  298,  289,  325,  349,
+      232,  289,  232,  350,  348,  326,  323,  293,  294,  276,
+      294,  276,  232,  233,  233,  276,  296,  294,  276,  276,
+      351,  276,  324,  294,  276,  294,  276,  276,  329,  233,
+      362,  329,  349,  325,  233,  326,  348,  233,  233,  233,
+      350,  363,  259,  374,  243,  241,  236,  235,  233,  233,
+      233,  233,  233,  233,  234,  234,  362,  437,  221,  220,
+      437,  438,  351,  216,  438,  437,  363,  213,  441,  438,
+
+      234,  441,  212,  211,  442,  234,  441,  442,  234,  234,
+      234,  374,  442,  206,  200,  199,  190,  189,  182,  234,
+      234,  234,  234,  234,  234,  285,  285,  446,  447,  451,
+      446,  447,  451,  178,  175,  446,  447,  451,  171,  452,
+      455,  285,  452,  455,  168,  167,  285,  452,  455,  285,
+      285,  285,  166,  162,  159,  158,  157,  153,  142,  141,
+      285,  285,  285,  285,  285,  285,  286,  127,  126,  456,
+      459,  125,  456,  459,  286,  286,  286,  456,  459,  110,
+      109,  105,  103,  101,   98,  286,  286,  286,  286,  286,
+      286,  320,   87,   86,  460,  479,   81,  460,  479,  320,
+
+      320,  320,  460,  479,   80,   76,   75,   74,   73,   70,
+      320,  320,  320,  320,  320,  320,  321,   69,   68,  480,
+      481,   67,  480,  481,  321,  321,  321,  480,  481,   64,
+       63,   62,   61,   59,   58,  321,  321,  321,  321,  321,
+      321,  346,   57,   56,  482,  484,   43,  482,  484,  346,
+      346,  346,  482,  484,   39,   29,   27,   25,   24,   21,
+      346,  346,  346,  346,  346,  346,  347,    0,    0,  485,
+      487,    0,  485,  487,  347,  347,  347,  485,  487,    0,
+        0,    0,    0,    0,    0,  347,  347,  347,  347,  347,
+      347,  360,    0,    0,  488,  490,    0,  488,  490,  360,
+
+      360,  360,  488,  490,    0,    0,    0,    0,    0,    0,
+      360,  360,  360,  360,  360,  360,  372,    0,    0,  491,
+      493,    0,  491,  493,  372,  372,  372,  491,  493,    0,
         0,    0,    0,    0,    0,  372,  372,  372,  372,  372,
-      372,  381,    0,    0,  481,  485,    0,  481,  485,  381,
-      381,  381,  481,  485,    0,    0,    0,    0,    0,    0,
-      381,  381,  381,  381,  381,  381,  384,  384,  384,  384,
-      384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
-      384,  384,  384,  384,  384,  384,  384,  384,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      385,  385,  385,  385,  385,  385,  385,  385,  385,  385,
-      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
-
-      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
-      386,  386,  387,  387,  387,  387,  387,  387,  387,  387,
-      387,  387,  387,  387,  387,  387,  387,  387,  387,  387,
-      387,  387,  387,  387,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  388,  388,  388,  388,
-      388,  388,  388,  388,  388,  388,  389,  389,  389,  389,
-      389,  389,  389,  389,  389,  389,  389,  389,  389,  389,
-      389,  389,  389,  389,  389,  389,  389,  389,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-      390,  390,  390,  390,  390,  390,  390,  390,  390,  390,
-
-      391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
-      391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
-      391,  391,  392,  392,    0,  392,  392,  392,  392,  392,
-      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
-        0,  392,  392,  392,  393,  393,  393,  393,  393,  393,
-      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
-      393,  393,  393,  393,  393,  393,  394,  394,    0,  394,
-      394,  394,  394,  394,  394,  394,  394,  394,  394,  394,
-      394,  394,  394,  394,    0,  394,  394,  394,  395,  395,
-      395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
+      372,  382,    0,    0,  494,  498,    0,  494,  498,  382,
+      382,  382,  494,  498,    0,    0,    0,    0,    0,    0,
+      382,  382,  382,  382,  382,  382,  391,    0,    0,  499,
+      501,    0,  499,  501,  391,  391,  391,  499,  501,    0,
+        0,    0,    0,    0,    0,  391,  391,  391,  391,  391,
+      391,  394,  394,  394,  394,  394,  394,  394,  394,  394,
 
+      394,  394,  394,  394,  394,  394,  394,  394,  394,  394,
+      394,  394,  394,  394,  395,  395,  395,  395,  395,  395,
       395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
-      396,    0,  396,    0,  396,  396,  396,  396,    0,  396,
-      396,  396,    0,  396,  396,  396,  397,    0,    0,  397,
+      395,  395,  395,  395,  395,  395,  395,  396,  396,  396,
+      396,  396,  396,  396,  396,  396,  396,  396,  396,  396,
+      396,  396,  396,  396,  396,  396,  396,  396,  396,  396,
+      397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
       397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
-      397,  397,  397,  397,  397,  397,  397,  398,  398,  398,
-        0,  398,  398,  398,  399,  399,  399,    0,    0,  399,
-      400,  400,  400,  400,    0,  400,  400,  400,    0,  400,
-      400,  400,  401,  401,  401,  401,    0,  401,  401,  401,
-        0,  401,  401,  401,  402,  402,    0,    0,  402,  402,
-      402,    0,  402,  402,  402,  402,  402,  402,  402,  402,
-
-      402,  402,  402,  402,  402,  402,  403,  403,    0,  403,
-      486,  403,  488,  486,    0,  488,    0,    0,  486,    0,
-      488,  403,  403,    0,  403,  404,  404,    0,    0,  404,
-        0,  404,  404,  404,  404,  404,  404,  404,  404,  404,
-      404,  404,  404,  404,  404,  404,  404,  405,  405,    0,
-      405,  489,  405,  490,  489,    0,  490,    0,    0,  489,
-        0,  490,  405,  405,    0,  405,  406,  406,    0,    0,
-      406,  406,  406,    0,  406,  406,  406,  406,  406,  406,
-      406,  406,  406,  406,  406,  406,  406,  406,  407,  491,
-      407,  493,  491,    0,  493,    0,    0,  491,    0,  493,
-
-      407,  407,    0,  407,  408,  408,    0,    0,  408,    0,
-      408,  408,  408,  408,  408,  408,  408,  408,  408,  408,
-      408,  408,  408,  408,  408,  408,  409,  494,  409,  496,
-      494,    0,  496,    0,    0,  494,    0,  496,  409,  409,
-        0,  409,  410,  410,    0,    0,  410,  410,  410,  410,
-      410,  410,  410,  410,  410,  410,  410,  410,  410,  410,
-      410,  410,  410,  410,  411,  497,  411,  498,  497,    0,
-      498,    0,    0,  497,    0,  498,  411,  411,    0,  411,
-      412,  412,    0,    0,  412,  412,  412,  412,  412,  412,
+      397,  397,  397,  398,  398,  398,  398,  398,  398,  398,
+      398,  398,  398,  398,  398,  398,  398,  398,  398,  398,
+
+      398,  398,  398,  398,  398,  398,  399,  399,  399,  399,
+      399,  399,  399,  399,  399,  399,  399,  399,  399,  399,
+      399,  399,  399,  399,  399,  399,  399,  399,  399,  400,
+      400,  400,  400,  400,  400,  400,  400,  400,  400,  400,
+      400,  400,  400,  400,  400,  400,  400,  400,  400,  400,
+      400,  400,  401,  401,  401,  401,  401,  401,  401,  401,
+      401,  401,  401,  401,  401,  401,  401,  401,  401,  401,
+      401,  401,  401,  401,  401,  402,  402,    0,  402,  402,
+      402,  402,  402,  402,  402,  402,  402,  402,  402,  402,
+      402,  402,  402,    0,  402,  402,  402,  402,  403,  403,
+
+      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
+      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
+      403,  404,  404,    0,  404,  404,  404,  404,  404,  404,
+      404,  404,  404,  404,  404,  404,  404,  404,  404,    0,
+      404,  404,  404,  404,  405,  405,  405,  405,  405,  405,
+      405,  405,  405,  405,  405,  405,  405,  405,  405,  405,
+      405,  405,  405,  405,  405,  405,  405,  406,    0,  406,
+        0,  406,  406,  406,  406,    0,  406,  406,  406,    0,
+      406,  406,  406,  407,    0,    0,  407,  407,  407,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  407,
+
+      407,  407,  407,  407,  407,  408,  408,  408,    0,  408,
+      408,  408,  409,  409,  409,    0,    0,  409,  410,  410,
+      410,  410,    0,  410,  410,  410,    0,  410,  410,  410,
+      411,  411,  411,  411,    0,  411,  411,  411,    0,  411,
+      411,  411,  412,    0,    0,  412,  412,  412,    0,  412,
       412,  412,  412,  412,  412,  412,  412,  412,  412,  412,
-
-      412,  412,  413,  499,  413,  500,  499,    0,  500,    0,
-        0,  499,    0,  500,  413,  413,    0,  413,  414,  501,
-      414,    0,  501,  414,  414,  414,    0,  501,  414,  415,
-      502,  415,    0,  502,  415,  415,  415,    0,  502,  415,
-      416,    0,  416,    0,    0,  416,  416,  416,    0,  416,
-      416,  417,    0,  417,    0,  417,  417,  417,  417,    0,
-      417,  417,  417,    0,  417,  417,  417,  418,    0,  418,
-        0,  418,  418,  418,  418,    0,  418,  418,  418,    0,
-      418,  418,  418,  419,    0,  419,    0,  419,  419,  419,
-      419,    0,  419,  419,  419,    0,  419,  419,  419,  420,
+      412,  412,  412,  413,  413,    0,  413,  502,  413,  503,
+      502,    0,  503,    0,    0,  502,    0,  503,  413,  413,
+        0,  413,  414,    0,    0,  414,    0,  414,  414,  414,
+      414,  414,  414,  414,  414,  414,  414,  414,  414,  414,
+
+      414,  414,  414,  415,  415,    0,  415,  504,  415,  506,
+      504,    0,  506,    0,    0,  504,    0,  506,  415,  415,
+      507,  415,  416,  507,    0,  416,  416,  416,  507,  416,
+      416,  416,  416,  416,  416,  416,  416,  416,  416,  416,
+      416,  416,  416,  417,  509,  417,  510,  509,    0,  510,
+        0,    0,  509,    0,  510,  417,  417,    0,  417,  418,
+        0,    0,  418,    0,  418,  418,  418,  418,  418,  418,
+      418,  418,  418,  418,  418,  418,  418,  418,  418,  418,
+      419,  511,  419,  512,  511,    0,  512,    0,    0,  511,
+        0,  512,  419,  419,    0,  419,  420,    0,    0,  420,
 
       420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,    0,  420,  420,  420,  420,  420,  420,  420,
-      421,  421,  421,  421,  421,  421,  421,  421,  421,  421,
-      421,  421,  421,  421,  421,  421,  421,  421,  422,  422,
-      422,    0,    0,  422,  422,  422,    0,  422,  422,  422,
-      423,    0,    0,    0,  423,    0,  423,    0,    0,  423,
-      423,  423,    0,  423,  423,  423,  426,  426,    0,    0,
-      426,    0,  426,  426,  426,  426,  426,  426,  426,  426,
-      426,  426,  426,  426,  426,  426,  426,  426,  427,  503,
-      427,  504,  503,    0,  504,    0,    0,  503,    0,  504,
-
-      427,  427,    0,  427,  430,  430,    0,    0,  430,  430,
-      430,    0,  430,  430,  430,  430,  430,  430,  430,  430,
-      430,  430,  430,  430,  430,  430,  431,  505,  431,  506,
-      505,    0,  506,    0,    0,  505,    0,  506,  431,  431,
-        0,  431,  432,  432,  432,    0,    0,  432,  435,  435,
-        0,    0,  435,    0,  435,  435,  435,  435,  435,  435,
-      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
-      436,  507,  436,  508,  507,    0,  508,    0,    0,  507,
-        0,  508,  436,  436,    0,  436,  437,  437,  437,    0,
-        0,  437,  440,  440,    0,    0,  440,  440,  440,  440,
-
-      440,  440,  440,  440,  440,  440,  440,  440,  440,  440,
-      440,  440,  440,  440,  441,  509,  441,  510,  509,    0,
-      510,    0,    0,  509,    0,  510,  441,  441,    0,  441,
-      444,  444,    0,    0,  444,  444,  444,  444,  444,  444,
-      444,  444,  444,  444,  444,  444,  444,  444,  444,  444,
-      444,  444,  445,  511,  445,  512,  511,    0,  512,    0,
-        0,  511,    0,  512,  445,  445,    0,  445,  448,  513,
-      448,    0,  513,  448,  448,  448,    0,  513,  448,  449,
-      514,  449,    0,  514,  449,  449,  449,    0,  514,  449,
-      450,  515,  450,    0,  515,  450,  450,  450,    0,  515,
-
-      450,  451,    0,    0,  451,  451,  451,    0,    0,  451,
-      452,    0,  452,    0,    0,  452,  452,  452,    0,  452,
-      452,  453,    0,  453,    0,  453,  453,  453,  453,    0,
-      453,  453,  453,    0,  453,  453,  453,  454,    0,  454,
-        0,  454,  454,  454,  454,    0,  454,  454,  454,    0,
-      454,  454,  454,  455,    0,  455,    0,  455,  455,  455,
-      455,    0,  455,  455,  455,    0,  455,  455,  455,  456,
-        0,  456,  456,    0,  456,    0,  456,    0,  456,    0,
-      456,  456,    0,  456,  456,  456,    0,  456,  456,  456,
-      457,  516,  457,  517,  516,    0,  517,    0,    0,  516,
-
-        0,  517,  457,  457,    0,  457,  458,  458,  458,  458,
-      458,  458,  458,  458,  458,  458,  458,  458,  458,  458,
-      458,  458,  458,  458,  458,  458,  458,  459,  459,  459,
-      459,  459,  459,  459,  459,  459,  459,  459,  459,  459,
-        0,  459,  459,  459,  459,  459,  459,  459,  460,  460,
-      460,    0,    0,  460,  460,  460,    0,  460,  460,  460,
-      461,    0,    0,  461,  461,  461,    0,    0,  461,  462,
-      518,    0,    0,  518,  462,  462,  462,    0,  518,  462,
-      463,    0,    0,    0,  463,    0,  463,    0,    0,  463,
-      463,  463,    0,  463,  463,  463,  464,    0,    0,    0,
-
-      464,  464,  464,    0,    0,  464,  464,  464,    0,  464,
-      464,  464,  465,  465,  465,  465,    0,  465,  465,  465,
-        0,  465,  465,  465,  470,  519,    0,    0,  519,  470,
-      470,  470,    0,  519,  470,  473,  520,    0,    0,  520,
-      473,  473,  473,    0,  520,  473,  476,  476,    0,    0,
-      476,  476,  476,    0,  476,  476,  476,  476,  476,  476,
-      476,  476,  476,  476,  476,  476,  476,  476,  479,  479,
-        0,    0,  479,    0,  479,  479,  479,  479,  479,  479,
-      479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
-      482,  521,  482,    0,  521,  482,  482,  482,    0,  521,
-
-      482,  483,    0,    0,  483,  483,  483,    0,    0,  483,
-      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
-      484,  484,  484,  484,  484,  484,  484,  484,  487,  487,
-      487,    0,    0,  487,  487,  487,    0,  487,  487,  487,
-      492,    0,    0,  492,  492,  492,    0,  522,  492,  495,
-      522,    0,  495,  495,  495,  522,  523,  495,  524,  523,
-      525,  524,  526,  525,  523,  526,  524,    0,  525,  527,
-      526,  528,  527,  529,  528,  530,  529,  527,  530,  528,
-        0,  529,  531,  530,  532,  531,  533,  532,  534,  533,
-      531,  534,  532,    0,  533,  535,  534,  536,  535,  537,
-
-      536,  538,  537,  535,  538,  536,    0,  537,  539,  538,
-      540,  539,  541,  540,  542,  541,  539,  542,  540,    0,
-      541,  543,  542,  544,  543,  545,  544,    0,  545,  543,
-        0,  544,    0,  545,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
-      383,  383,  383,  383,  383,  383,  383
-
+      420,  420,  420,  420,  420,  420,  420,  421,  513,  421,
+      514,  513,    0,  514,    0,    0,  513,    0,  514,  421,
+      421,    0,  421,  422,    0,    0,  422,  422,  422,  422,
+      422,  422,  422,  422,  422,  422,  422,  422,  422,  422,
+      422,  422,  422,  422,  423,  515,  423,  516,  515,    0,
+      516,    0,    0,  515,    0,  516,  423,  423,    0,  423,
+      424,  517,  424,    0,  517,  424,  424,  424,    0,  517,
+      424,  425,  518,  425,    0,  518,  425,  425,  425,    0,
+      518,  425,  426,    0,  426,    0,    0,  426,  426,  426,
+
+        0,  426,  426,  427,    0,  427,    0,  427,  427,  427,
+      427,    0,  427,  427,  427,    0,  427,  427,  427,  428,
+        0,  428,    0,  428,  428,  428,  428,    0,  428,  428,
+      428,    0,  428,  428,  428,  429,    0,  429,    0,  429,
+      429,  429,  429,    0,  429,  429,  429,    0,  429,  429,
+      429,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,    0,  430,  430,  430,  430,  430,
+      430,  430,  430,  431,  431,  431,  431,  431,  431,  431,
+      431,  431,  431,  431,  431,  431,  431,  431,  431,  431,
+      431,  431,  432,  432,  432,    0,    0,  432,  432,  432,
+
+        0,  432,  432,  432,  433,    0,  433,    0,  433,  433,
+      433,  433,    0,  433,  433,  433,    0,  433,  433,  433,
+      434,    0,    0,    0,  434,    0,  434,    0,    0,  434,
+      434,  434,    0,  434,  434,  434,  435,    0,    0,  435,
+      435,  435,    0,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  436,  519,  436,
+      520,  519,    0,  520,    0,    0,  519,    0,  520,  436,
+      436,    0,  436,  439,    0,    0,  439,    0,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,  439,  439,  439,  440,  521,  440,  522,  521,    0,
+
+      522,    0,    0,  521,    0,  522,  440,  440,  523,  440,
+      443,  523,    0,  443,  443,  443,  523,  443,  443,  443,
+      443,  443,  443,  443,  443,  443,  443,  443,  443,  443,
+      443,  444,  524,  444,  525,  524,    0,  525,    0,    0,
+      524,    0,  525,  444,  444,    0,  444,  445,  445,  445,
+        0,    0,  445,  448,    0,    0,  448,    0,  448,  448,
+      448,  448,  448,  448,  448,  448,  448,  448,  448,  448,
+      448,  448,  448,  448,  449,  526,  449,  527,  526,    0,
+      527,    0,    0,  526,    0,  527,  449,  449,    0,  449,
+      450,  450,  450,    0,    0,  450,  453,    0,    0,  453,
+
+      453,  453,  453,  453,  453,  453,  453,  453,  453,  453,
+      453,  453,  453,  453,  453,  453,  453,  454,  528,  454,
+      529,  528,    0,  529,    0,    0,  528,    0,  529,  454,
+      454,    0,  454,  457,    0,    0,  457,  457,  457,  457,
+      457,  457,  457,  457,  457,  457,  457,  457,  457,  457,
+      457,  457,  457,  457,  458,  530,  458,  531,  530,    0,
+      531,    0,    0,  530,    0,  531,  458,  458,    0,  458,
+      461,  532,  461,    0,  532,  461,  461,  461,    0,  532,
+      461,  462,  533,  462,    0,  533,  462,  462,  462,    0,
+      533,  462,  463,  534,  463,    0,  534,  463,  463,  463,
+
+        0,  534,  463,  464,    0,    0,  464,  464,  464,    0,
+        0,  464,  465,    0,  465,    0,    0,  465,  465,  465,
+        0,  465,  465,  466,    0,  466,    0,  466,  466,  466,
+      466,    0,  466,  466,  466,    0,  466,  466,  466,  467,
+        0,  467,    0,  467,  467,  467,  467,    0,  467,  467,
+      467,    0,  467,  467,  467,  468,    0,  468,    0,  468,
+      468,  468,  468,    0,  468,  468,  468,    0,  468,  468,
+      468,  469,    0,  469,  469,    0,  469,    0,  469,    0,
+      469,    0,  469,  469,    0,  469,  469,  469,    0,  469,
+      469,  469,  469,  470,  535,  470,  536,  535,    0,  536,
+
+        0,    0,  535,    0,  536,  470,  470,    0,  470,  471,
+      471,  471,  471,  471,  471,  471,  471,  471,  471,  471,
+      471,  471,  471,  471,  471,  471,  471,  471,  471,  471,
+      471,  472,  472,  472,  472,  472,  472,  472,  472,  472,
+      472,  472,  472,  472,    0,  472,  472,  472,  472,  472,
+      472,  472,  472,  473,  473,  473,    0,    0,  473,  473,
+      473,    0,  473,  473,  473,  474,    0,    0,  474,  474,
+      474,    0,    0,  474,  475,  537,    0,    0,  537,  475,
+      475,  475,    0,  537,  475,  476,    0,    0,    0,  476,
+        0,  476,    0,    0,  476,  476,  476,    0,  476,  476,
+
+      476,  477,    0,    0,    0,  477,  477,  477,    0,    0,
+      477,  477,  477,    0,  477,  477,  477,  478,  478,  478,
+      478,    0,  478,  478,  478,    0,  478,  478,  478,  483,
+      538,    0,    0,  538,  483,  483,  483,    0,  538,  483,
+      486,  539,    0,    0,  539,  486,  486,  486,    0,  539,
+      486,  489,    0,    0,  489,  489,  489,    0,  489,  489,
+      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
+      489,  489,  492,    0,    0,  492,    0,  492,  492,  492,
+      492,  492,  492,  492,  492,  492,  492,  492,  492,  492,
+      492,  492,  492,  495,  540,  495,    0,  540,  495,  495,
+
+      495,    0,  540,  495,  496,    0,    0,  496,  496,  496,
+        0,    0,  496,  497,  497,  497,  497,  497,  497,  497,
+      497,  497,  497,  497,  497,  497,  497,  497,  497,  497,
+      497,  497,  500,  500,  500,    0,    0,  500,  500,  500,
+        0,  500,  500,  500,  505,    0,    0,  505,  505,  505,
+        0,  541,  505,  508,  541,    0,  508,  508,  508,  541,
+      542,  508,  543,  542,  544,  543,  545,  544,  542,  545,
+      543,    0,  544,  546,  545,  547,  546,  548,  547,  549,
+      548,  546,  549,  547,    0,  548,  550,  549,  551,  550,
+      552,  551,  553,  552,  550,  553,  551,    0,  552,  554,
+
+      553,  555,  554,  556,  555,  557,  556,  554,  557,  555,
+        0,  556,  558,  557,  559,  558,    0,  559,    0,    0,
+      558,    0,  559,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393,  393,  393,  393,
+      393,  393,  393,  393,  393,  393,  393
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -1121,12 +1143,12 @@ static yyconst flex_int16_t yy_chk[2398] =
 #define YY_RESTORE_YY_MORE_OFFSET
 #line 1 "./turtle_l.l"
 /*
- *  $Id: turtle_l.l,v 1.21.2.15 2011/02/20 16:14:59 source Exp $
+ *  $Id: turtle_l.l,v 1.21.2.20 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1151,6 +1173,7 @@ static yyconst flex_int16_t yy_chk[2398] =
 #include "turtle_p.h"
 #include "nquad_p.h"
 #include "security.h"
+#include "sqlbif.h"
 #if (__NQUAD_NONPUNCT_END != __TTL_NONPUNCT_END)
   Sources of parsers are out of sync: mismatch between token declarations in nquad_p.y and turtle_p.y
 #endif
@@ -1256,7 +1279,7 @@ extern int ttlyydebug;
 
 /* Special unreacheable state to fill the first item of ttlp_arg[0].ttlp_lexstates */
 
-#line 1260 "turtle_l.c"
+#line 1283 "turtle_l.c"
 
 #define INITIAL 0
 #define TURTLE_SQ 1
@@ -1508,10 +1531,10 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 179 "./turtle_l.l"
+#line 180 "./turtle_l.l"
 
 
-#line 1515 "turtle_l.c"
+#line 1538 "turtle_l.c"
 
     yylval = yylval_param;
 
@@ -1572,13 +1595,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 384 )
+				if ( yy_current_state >= 394 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 383 );
+		while ( yy_current_state != 393 );
 		yy_cp = yyg->yy_last_accepting_cpos;
 		yy_current_state = yyg->yy_last_accepting_state;
 
@@ -1600,205 +1623,208 @@ do_action:	/* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 181 "./turtle_l.l"
+#line 182 "./turtle_l.l"
 { return _CARET_WS ; }
 	YY_BREAK
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 182 "./turtle_l.l"
+#line 183 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; return _CARET_WS ; }
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 183 "./turtle_l.l"
+#line 184 "./turtle_l.l"
 { return _CARET_NOWS	; }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 184 "./turtle_l.l"
+#line 185 "./turtle_l.l"
 { return _CARET_CARET	; }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 185 "./turtle_l.l"
+#line 186 "./turtle_l.l"
 { return _COMMA; }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 186 "./turtle_l.l"
+#line 187 "./turtle_l.l"
 { return _DOT_WS; }
 	YY_BREAK
 case 7:
 /* rule 7 can match eol */
 YY_RULE_SETUP
-#line 187 "./turtle_l.l"
+#line 188 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; return _DOT_WS; }
 	YY_BREAK
 case 8:
 /* rule 8 can match eol */
 YY_RULE_SETUP
-#line 188 "./turtle_l.l"
+#line 189 "./turtle_l.l"
 { TTLYYERROR_OR_RECOVER ("Whitespace is required after dot if dot is not inside decimal number, string or IRI"); }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 189 "./turtle_l.l"
+#line 190 "./turtle_l.l"
 { return _DOT_WS; }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 190 "./turtle_l.l"
+#line 191 "./turtle_l.l"
 { return _COLON; }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 191 "./turtle_l.l"
+#line 192 "./turtle_l.l"
 { return _SEMI; }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 192 "./turtle_l.l"
-{ return _EQ; }
+#line 193 "./turtle_l.l"
+{ return (((0 == ttlp_arg[0].ttlp_lexdepth) && (ttlp_arg[0].ttlp_flags & TTLP_ALLOW_TRIG)) ? _EQ_TOP_TRIG : _EQ); }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 193 "./turtle_l.l"
+#line 194 "./turtle_l.l"
 { return _EQ_GT; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 194 "./turtle_l.l"
+#line 195 "./turtle_l.l"
 { return _LT_EQ; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 195 "./turtle_l.l"
+#line 196 "./turtle_l.l"
 { return _BANG; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 197 "./turtle_l.l"
+#line 198 "./turtle_l.l"
 { return _AT_a_L; }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 198 "./turtle_l.l"
+#line 199 "./turtle_l.l"
 { return _AT_base_L; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 199 "./turtle_l.l"
+#line 200 "./turtle_l.l"
 { return _AT_has_L; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 200 "./turtle_l.l"
+#line 201 "./turtle_l.l"
 { return _AT_is_L; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 201 "./turtle_l.l"
+#line 202 "./turtle_l.l"
 { return _AT_of_L; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 202 "./turtle_l.l"
+#line 203 "./turtle_l.l"
 { return _AT_this_L; }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 203 "./turtle_l.l"
+#line 204 "./turtle_l.l"
 { return _AT_keywords_L; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 204 "./turtle_l.l"
+#line 205 "./turtle_l.l"
 { return _AT_prefix_L; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 205 "./turtle_l.l"
+#line 206 "./turtle_l.l"
 { ttlyyerror ("Current version of Virtuoso does not support @forAll keyword"); }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 206 "./turtle_l.l"
+#line 207 "./turtle_l.l"
 { ttlyyerror ("Current version of Virtuoso does not support @forSome keyword"); }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 207 "./turtle_l.l"
+#line 208 "./turtle_l.l"
 { return false_L; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 208 "./turtle_l.l"
+#line 209 "./turtle_l.l"
 { return true_L; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 210 "./turtle_l.l"
+#line 211 "./turtle_l.l"
 { TTL_SPECIAL_QNAME (TTLP_ALLOW_QNAME_A, _AT_a_L) }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 211 "./turtle_l.l"
+#line 212 "./turtle_l.l"
 { TTL_SPECIAL_QNAME (TTLP_ALLOW_QNAME_HAS, _AT_has_L) }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 212 "./turtle_l.l"
+#line 213 "./turtle_l.l"
 { TTL_SPECIAL_QNAME (TTLP_ALLOW_QNAME_IS, _AT_is_L) }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 213 "./turtle_l.l"
+#line 214 "./turtle_l.l"
 { TTL_SPECIAL_QNAME (TTLP_ALLOW_QNAME_OF, _AT_of_L) }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 214 "./turtle_l.l"
+#line 215 "./turtle_l.l"
 { TTL_SPECIAL_QNAME (TTLP_ALLOW_QNAME_THIS, _AT_this_L) }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 217 "./turtle_l.l"
+#line 218 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexdepth++; return _LPAR; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 218 "./turtle_l.l"
+#line 219 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexdepth--; return _RPAR; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 219 "./turtle_l.l"
+#line 220 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexdepth++; return _LSQBRA; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 220 "./turtle_l.l"
+#line 221 "./turtle_l.l"
 { return _LSQBRA_RSQBRA; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 221 "./turtle_l.l"
+#line 222 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexdepth--; return _RSQBRA; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 222 "./turtle_l.l"
-{ ttlp_arg[0].ttlp_lexdepth++; return _LBRA; }
+#line 223 "./turtle_l.l"
+{
+    int depth = ttlp_arg[0].ttlp_lexdepth++;
+    return (((0 == depth) && (ttlp_arg[0].ttlp_flags & TTLP_ALLOW_TRIG)) ? _LBRA_TOP_TRIG : _LBRA);
+  }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 223 "./turtle_l.l"
+#line 227 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexdepth--; return _RBRA; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 225 "./turtle_l.l"
+#line 229 "./turtle_l.l"
 {
     ttlyylval.box = box_dv_short_nchars (yytext + 1, yyleng - 2);
     return Q_IRI_REF;
@@ -1806,7 +1832,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 230 "./turtle_l.l"
+#line 234 "./turtle_l.l"
 {
     ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_LTGT, '>');
     return Q_IRI_REF;
@@ -1814,7 +1840,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 235 "./turtle_l.l"
+#line 239 "./turtle_l.l"
 {
     if (!(ttlp_arg[0].ttlp_flags & TTLP_ACCEPT_DIRTY_NAMES))
       TTLYYERROR_OR_RECOVER ("Invalid characters in angle-bracketed name; this error can be suppressed by parser flags");
@@ -1826,7 +1852,7 @@ YY_RULE_SETUP
 case 43:
 /* rule 43 can match eol */
 YY_RULE_SETUP
-#line 243 "./turtle_l.l"
+#line 247 "./turtle_l.l"
 {
     if (!(ttlp_arg[0].ttlp_flags & TTLP_ACCEPT_DIRTY_NAMES))
       TTLYYERROR_OR_RECOVER ("Line break in angle-bracketed name; this error can be suppressed by parser flags");
@@ -1838,19 +1864,19 @@ YY_RULE_SETUP
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 252 "./turtle_l.l"
+#line 256 "./turtle_l.l"
 {
     TTLYYERROR_OR_REPORT ("Invalid characters in angle-bracketed name");
     BEGIN (TURTLE_SKIP_TO_DOT_WS); yymore (); }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 256 "./turtle_l.l"
+#line 260 "./turtle_l.l"
 { TTL_TOKBOX_Q(0,QNAME,"qualified URI"); }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 257 "./turtle_l.l"
+#line 261 "./turtle_l.l"
 {
     if (!(ttlp_arg[0].ttlp_flags & TTLP_NAME_MAY_CONTAIN_PATH))
       TTLYYERROR_OR_RECOVER ("Invalid characters in local part of QName; this error can be suppressed by parser flags");
@@ -1859,22 +1885,22 @@ YY_RULE_SETUP
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 263 "./turtle_l.l"
+#line 267 "./turtle_l.l"
 { TTL_TOKBOX_Q(0,QNAME_NS,"namespace"); }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 264 "./turtle_l.l"
+#line 268 "./turtle_l.l"
 { TTL_TOKBOX_Q(0,QNAME,"name without prefix"); }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 265 "./turtle_l.l"
+#line 269 "./turtle_l.l"
 { TTL_TOKBOX_BNODE(0,BLANK_NODE_LABEL,"blank node label"); }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 267 "./turtle_l.l"
+#line 271 "./turtle_l.l"
 {
     if (!(ttlp_arg[0].ttlp_flags & TTLP_ACCEPT_DIRTY_NAMES))
       TTLYYERROR_OR_RECOVER ("Ill formed blank node label; this error can be suppressed by parser flags");
@@ -1883,7 +1909,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 273 "./turtle_l.l"
+#line 277 "./turtle_l.l"
 {
     if (!(ttlp_arg[0].ttlp_flags & TTLP_ACCEPT_VARIABLES))
       TTLYYERROR_OR_RECOVER ("Full N3 syntax allow variables, TURTLE does not; this error can be suppressed by parser flags");
@@ -1892,7 +1918,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 279 "./turtle_l.l"
+#line 283 "./turtle_l.l"
 {
     ttlyylval.box = box_dv_short_nchars (yytext + 1, yyleng - 1);
     return KEYWORD;
@@ -1900,7 +1926,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 284 "./turtle_l.l"
+#line 288 "./turtle_l.l"
 {
     BEGIN INITIAL;
     ttlyylval.box = box_dv_short_nchars (yytext, yyleng);
@@ -1909,7 +1935,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 290 "./turtle_l.l"
+#line 294 "./turtle_l.l"
 {
     char *tail;
     BEGIN INITIAL;
@@ -1925,21 +1951,21 @@ YY_RULE_SETUP
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 303 "./turtle_l.l"
+#line 307 "./turtle_l.l"
 { TTLYYERROR_OR_RECOVER ("The identifier after '@' at the end of quoted literal is not a valid language id"); }
 	YY_BREAK
 case YY_STATE_EOF(TURTLE_AT_AFTER_QUOTED):
-#line 304 "./turtle_l.l"
+#line 308 "./turtle_l.l"
 { TTLYYERROR_OR_RECOVER ("Missing language id after '@' at the end of quoted literal"); }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 305 "./turtle_l.l"
+#line 309 "./turtle_l.l"
 { TTLYYERROR_OR_RECOVER ("Bad character instead of language id after '@' at the end of quoted literal"); }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 308 "./turtle_l.l"
+#line 312 "./turtle_l.l"
 {
     ttlyylval.box = box_dv_short_nchars (yytext+1, yyleng - 2);
     return TURTLE_STRING;
@@ -1947,7 +1973,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 313 "./turtle_l.l"
+#line 317 "./turtle_l.l"
 {
     ttlyylval.box = box_dv_short_nchars (yytext+1, yyleng - 3);
     BEGIN TURTLE_AT_AFTER_QUOTED;
@@ -1956,118 +1982,118 @@ YY_RULE_SETUP
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 319 "./turtle_l.l"
+#line 323 "./turtle_l.l"
 { yymore(); BEGIN TURTLE_SSSQ; }
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 320 "./turtle_l.l"
+#line 324 "./turtle_l.l"
 { yymore(); BEGIN TURTLE_DDDQ; }
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 321 "./turtle_l.l"
+#line 325 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_3QUOT, '\''); BEGIN INITIAL; return TURTLE_STRING; }
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 322 "./turtle_l.l"
+#line 326 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_3QUOT, '\"'); BEGIN INITIAL; return TURTLE_STRING; }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 323 "./turtle_l.l"
+#line 327 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_3QUOT_AT, '\''); BEGIN TURTLE_AT_AFTER_QUOTED; return TURTLE_STRING; }
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 324 "./turtle_l.l"
+#line 328 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_3QUOT_AT, '\"'); BEGIN TURTLE_AT_AFTER_QUOTED; return TURTLE_STRING; }
 	YY_BREAK
 case 65:
 /* rule 65 can match eol */
 YY_RULE_SETUP
-#line 325 "./turtle_l.l"
+#line 329 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; yymore(); }
 	YY_BREAK
 case 66:
 /* rule 66 can match eol */
 YY_RULE_SETUP
-#line 326 "./turtle_l.l"
+#line 330 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; yymore(); }
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 327 "./turtle_l.l"
+#line 331 "./turtle_l.l"
 { yymore(); }
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 328 "./turtle_l.l"
+#line 332 "./turtle_l.l"
 { yymore(); }
 	YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 329 "./turtle_l.l"
+#line 333 "./turtle_l.l"
 { ttlyyerror ("Bad escape sequence in a long single-quoted string"); }
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 330 "./turtle_l.l"
+#line 334 "./turtle_l.l"
 { ttlyyerror ("Bad escape sequence in a long double-quoted string"); }
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 331 "./turtle_l.l"
+#line 335 "./turtle_l.l"
 { ttlyyerror ("Bad character in a long single-quoted string"); }
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 332 "./turtle_l.l"
+#line 336 "./turtle_l.l"
 { ttlyyerror ("Bad character in a long double-quoted string"); }
 	YY_BREAK
 case YY_STATE_EOF(TURTLE_SSSQ):
-#line 333 "./turtle_l.l"
+#line 337 "./turtle_l.l"
 { ttlyyerror ("Unterminated long single-quoted string"); }
 	YY_BREAK
 case YY_STATE_EOF(TURTLE_DDDQ):
-#line 334 "./turtle_l.l"
+#line 338 "./turtle_l.l"
 { ttlyyerror ("Unterminated long double-quoted string"); }
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 337 "./turtle_l.l"
+#line 341 "./turtle_l.l"
 { yymore(); BEGIN TURTLE_SQ; }
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 338 "./turtle_l.l"
+#line 342 "./turtle_l.l"
 { yymore(); BEGIN TURTLE_DQ; }
 	YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 339 "./turtle_l.l"
+#line 343 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_QUOT, '\''); BEGIN INITIAL; return TURTLE_STRING; }
 	YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 340 "./turtle_l.l"
+#line 344 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_QUOT, '\"'); BEGIN INITIAL; return TURTLE_STRING; }
 	YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 341 "./turtle_l.l"
+#line 345 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_QUOT_AT, '\''); BEGIN TURTLE_AT_AFTER_QUOTED; return TURTLE_STRING; }
 	YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 342 "./turtle_l.l"
+#line 346 "./turtle_l.l"
 { ttlyylval.box = ttlp_strliteral (ttlp_arg, yytext, TTLP_STRLITERAL_QUOT_AT, '\"'); BEGIN TURTLE_AT_AFTER_QUOTED; return TURTLE_STRING; }
 	YY_BREAK
 case 79:
 /* rule 79 can match eol */
 YY_RULE_SETUP
-#line 343 "./turtle_l.l"
+#line 347 "./turtle_l.l"
 {
     if (!(TTLP_STRING_MAY_CONTAIN_CRLF & ttlp_arg[0].ttlp_flags))
       {
@@ -2081,7 +2107,7 @@ YY_RULE_SETUP
 case 80:
 /* rule 80 can match eol */
 YY_RULE_SETUP
-#line 352 "./turtle_l.l"
+#line 356 "./turtle_l.l"
 {
     if (!(TTLP_STRING_MAY_CONTAIN_CRLF & ttlp_arg[0].ttlp_flags))
       {
@@ -2095,7 +2121,7 @@ YY_RULE_SETUP
 case 81:
 /* rule 81 can match eol */
 YY_RULE_SETUP
-#line 361 "./turtle_l.l"
+#line 365 "./turtle_l.l"
 {
     if (!(TTLP_STRING_MAY_CONTAIN_CRLF & ttlp_arg[0].ttlp_flags))
       {
@@ -2107,7 +2133,7 @@ YY_RULE_SETUP
 case 82:
 /* rule 82 can match eol */
 YY_RULE_SETUP
-#line 368 "./turtle_l.l"
+#line 372 "./turtle_l.l"
 {
     if (!(TTLP_STRING_MAY_CONTAIN_CRLF & ttlp_arg[0].ttlp_flags))
       {
@@ -2118,116 +2144,116 @@ YY_RULE_SETUP
 	YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 375 "./turtle_l.l"
+#line 379 "./turtle_l.l"
 { yymore(); }
 	YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 376 "./turtle_l.l"
+#line 380 "./turtle_l.l"
 { yymore(); }
 	YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 377 "./turtle_l.l"
+#line 381 "./turtle_l.l"
 {
     TTLYYERROR_OR_REPORT ("Bad escape sequence in a short single-quoted string");
     BEGIN (TURTLE_BAD_SQ); yymore(); }
 	YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 380 "./turtle_l.l"
+#line 384 "./turtle_l.l"
 {
     TTLYYERROR_OR_REPORT ("Bad escape sequence in a short double-quoted string");
     BEGIN (TURTLE_BAD_DQ); yymore(); }
 	YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 383 "./turtle_l.l"
+#line 387 "./turtle_l.l"
 {}
 	YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 384 "./turtle_l.l"
+#line 388 "./turtle_l.l"
 {}
 	YY_BREAK
 case 89:
 /* rule 89 can match eol */
 YY_RULE_SETUP
-#line 385 "./turtle_l.l"
+#line 389 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; yymore(); }
 	YY_BREAK
 case 90:
 /* rule 90 can match eol */
 YY_RULE_SETUP
-#line 386 "./turtle_l.l"
+#line 390 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; yymore(); }
 	YY_BREAK
 case 91:
 /* rule 91 can match eol */
 YY_RULE_SETUP
-#line 387 "./turtle_l.l"
+#line 391 "./turtle_l.l"
 {}
 	YY_BREAK
 case 92:
 /* rule 92 can match eol */
 YY_RULE_SETUP
-#line 388 "./turtle_l.l"
+#line 392 "./turtle_l.l"
 {}
 	YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 389 "./turtle_l.l"
+#line 393 "./turtle_l.l"
 { BEGIN INITIAL; return TTL_RECOVERABLE_ERROR; }
 	YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 390 "./turtle_l.l"
+#line 394 "./turtle_l.l"
 { BEGIN INITIAL; return TTL_RECOVERABLE_ERROR; }
 	YY_BREAK
 case YY_STATE_EOF(TURTLE_SQ):
 case YY_STATE_EOF(TURTLE_BAD_SQ):
-#line 392 "./turtle_l.l"
+#line 396 "./turtle_l.l"
 { ttlyyerror ("Unterminated short single-quoted string"); }
 	YY_BREAK
 case YY_STATE_EOF(TURTLE_DQ):
 case YY_STATE_EOF(TURTLE_BAD_DQ):
-#line 393 "./turtle_l.l"
+#line 397 "./turtle_l.l"
 { ttlyyerror ("Unterminated short double-quoted string"); }
 	YY_BREAK
 case 95:
 YY_RULE_SETUP
-#line 395 "./turtle_l.l"
+#line 399 "./turtle_l.l"
 { return ttlp_NUMBER_int (yylval, ttlp_arg, yyg); }
 	YY_BREAK
 case 96:
 YY_RULE_SETUP
-#line 396 "./turtle_l.l"
+#line 400 "./turtle_l.l"
 { return ttlp_NUMBER_decimal (yylval, ttlp_arg, yyg); }
 	YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 397 "./turtle_l.l"
+#line 401 "./turtle_l.l"
 { return ttlp_NUMBER_double (yylval, ttlp_arg, yyg); }
 	YY_BREAK
 case 98:
 /* rule 98 can match eol */
 YY_RULE_SETUP
-#line 399 "./turtle_l.l"
+#line 403 "./turtle_l.l"
 { ttlp_arg[0].ttlp_lexlineno++; }
 	YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 400 "./turtle_l.l"
+#line 404 "./turtle_l.l"
 { }
 	YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 401 "./turtle_l.l"
+#line 405 "./turtle_l.l"
 { }
 	YY_BREAK
 case 101:
 YY_RULE_SETUP
-#line 402 "./turtle_l.l"
+#line 406 "./turtle_l.l"
 {
     char buf[100]; sprintf (buf, "Unexpected character '%c'", yytext[yyleng-1]);
     TTLYYERROR_OR_REPORT (buf);
@@ -2235,18 +2261,18 @@ YY_RULE_SETUP
 	YY_BREAK
 case 102:
 YY_RULE_SETUP
-#line 406 "./turtle_l.l"
+#line 410 "./turtle_l.l"
 { BEGIN INITIAL; yyless (yyleng-2); return _GARBAGE_BEFORE_DOT_WS; }
 	YY_BREAK
 case 103:
 /* rule 103 can match eol */
 YY_RULE_SETUP
-#line 407 "./turtle_l.l"
+#line 411 "./turtle_l.l"
 { BEGIN INITIAL; yyless (('.' == yytext[yyleng-2]) ? yyleng-2 : yyleng-3); ttlp_arg[0].ttlp_lexlineno++; return _GARBAGE_BEFORE_DOT_WS; }
 	YY_BREAK
 case 104:
 YY_RULE_SETUP
-#line 408 "./turtle_l.l"
+#line 412 "./turtle_l.l"
 {
     if (yyleng > 8000)
       { char buf[100]; sprintf (buf, "Failed to recover syntax error at \"%.50s...\"", yytext); ttlyyerror (buf); }
@@ -2254,10 +2280,10 @@ YY_RULE_SETUP
 	YY_BREAK
 case 105:
 YY_RULE_SETUP
-#line 413 "./turtle_l.l"
+#line 417 "./turtle_l.l"
 ECHO;
 	YY_BREAK
-#line 2261 "turtle_l.c"
+#line 2287 "turtle_l.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(TURTLE_SKIP_TO_DOT_WS):
 case YY_STATE_EOF(UNREACHEABLE):
@@ -2545,7 +2571,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
 	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
 		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 9);
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 63);
 		if ( yy_accept[yy_current_state] )
 			{
 			yyg->yy_last_accepting_state = yy_current_state;
@@ -2554,7 +2580,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 384 )
+			if ( yy_current_state >= 394 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2574,7 +2600,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
 	register char *yy_cp = yyg->yy_c_buf_p;
 
-	register YY_CHAR yy_c = 9;
+	register YY_CHAR yy_c = 63;
 	if ( yy_accept[yy_current_state] )
 		{
 		yyg->yy_last_accepting_state = yy_current_state;
@@ -2583,11 +2609,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 384 )
+		if ( yy_current_state >= 394 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 383);
+	yy_is_jam = (yy_current_state == 393);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3463,7 +3489,7 @@ void ttlyyfree (void * ptr , yyscan_t yyscanner)
 
 #define YYTABLES_NAME "yytables"
 
-#line 413 "./turtle_l.l"
+#line 417 "./turtle_l.l"
 
 
 
@@ -3563,7 +3589,7 @@ ttlp_NUMBER_double (YYSTYPE *yylval_param, ttlp_t *ttlp_arg, struct yyguts_t * y
 }
 
 caddr_t
-ttl_query_lex_analyze (caddr_t str, wcharset_t *query_charset)
+ttl_lex_analyze (caddr_t str, int mode_bits, wcharset_t *query_charset)
 {
   dk_set_t lexems = NULL;
   caddr_t result_array;
@@ -3578,7 +3604,7 @@ ttl_query_lex_analyze (caddr_t str, wcharset_t *query_charset)
     {
       ttlp->ttlp_text = str;
       ttlp->ttlp_text_len = strlen (str);
-      ttlp->ttlp_err_hdr = "TURTLE parser";
+      ttlp->ttlp_err_hdr = ((mode_bits & TTLP_ALLOW_NQUAD) ? "NQuads lexical analyzer" : ((mode_bits & TTLP_ALLOW_TRIG) ? "TriG lexical analyzer" : "TURTLE lexical analyzer"));
       if (NULL == query_charset)
 	query_charset = default_charset;
       if (NULL == query_charset)
@@ -3657,33 +3683,15 @@ rdf_load_turtle (
 
   if (arg1_is_filename)
     {
-#ifdef WIN32
-      char fname[_MAX_PATH], *fname_ptr;
-      strncpy (fname, text_or_filename, _MAX_PATH);
-      fname[_MAX_PATH - 1] = '\0';
-      for (fname_ptr = fname; fname_ptr[0]; fname_ptr++)
-        {
-          switch (fname_ptr[0])
-            {
-            case '|':
-              fname_ptr[0] = ':';
-              break;
-            case '/':
-              fname_ptr[0] = '\\';
-              break;
-            }
-        }
-#else
-      char *fname = ((char *) text_or_filename);
-#endif
       sec_check_dba (qi, "<read XML from URL of type file://...>");
-      srcfile = fopen (fname, "rb");
+      tf->tf_boxed_input_name = file_native_name_from_iri_path_nchars (text_or_filename, strlen (text_or_filename));
+      file_path_assert (tf->tf_boxed_input_name, NULL, 1);
+      srcfile = fopen (tf->tf_boxed_input_name, "rb");
       if (NULL == srcfile)
         {
           ttlp_free (ttlp);
-	  sqlr_new_error ("42000", "SR598", "TURTLE parser has failed to open file '%s' for reading", fname);
+          sqlr_new_error ("42000", "SR598", "TURTLE parser has failed to open file '%s' for reading", tf->tf_boxed_input_name);
         }
-      tf->tf_input_name = fname;
       ttlp->ttlp_iter = file_read;
       ttlp->ttlp_iter_data = srcfile;
       goto iter_is_set;
@@ -3758,7 +3766,7 @@ iter_is_set:
 #ifdef MALLOC_DEBUG
       yy_push_state (INITIAL, scanner);
 #endif
-      tf_set_cbk_names (tf, (const char **)cbk_names);
+      tf_set_cbk_names (tf, (ccaddr_t *)cbk_names);
       TF_CHANGE_GRAPH_TO_DEFAULT (tf);
       /* ttlyydebug = 1; */
       if (flags & TTLP_ALLOW_NQUAD)
diff --git a/libsrc/Wi/turtle_l.l b/libsrc/Wi/turtle_l.l
index eec706d..f09e933 100644
--- a/libsrc/Wi/turtle_l.l
+++ b/libsrc/Wi/turtle_l.l
@@ -1,10 +1,10 @@
 /*
- *  $Id: turtle_l.l,v 1.21.2.15 2011/02/20 16:14:59 source Exp $
+ *  $Id: turtle_l.l,v 1.21.2.20 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -38,6 +38,7 @@
 #include "turtle_p.h"
 #include "nquad_p.h"
 #include "security.h"
+#include "sqlbif.h"
 #if (__NQUAD_NONPUNCT_END != __TTL_NONPUNCT_END)
   Sources of parsers are out of sync: mismatch between token declarations in nquad_p.y and turtle_p.y
 #endif
@@ -159,8 +160,8 @@ INTEGER_LITERAL ([0-9]+)
 DECIMAL_LITERAL (([0-9]+"."[0-9]*)|("."[0-9]+))
 DOUBLE_LITERAL	(({INTEGER_LITERAL}|{DECIMAL_LITERAL})[eE][+-]?[0-9]+)
 
-SPAR_SQ_PLAIN	([^\\''\r\n])
-SPAR_DQ_PLAIN	([^\\""\r\n])
+SPAR_SQ_PLAIN	([^\x00-\x1f\\''\r\n]|[\t])
+SPAR_DQ_PLAIN	([^\x00-\x1f\\""\r\n]|[\t])
 SPAR_ECHAR	([\\]([atbvnrf\\""'']|("u"{HEX}{HEX}{HEX}{HEX})|("U"{HEX}{HEX}{HEX}{HEX}{HEX}{HEX}{HEX}{HEX})))
 SPAR_LANGTAG	([a-zA-Z]+)(("-"([a-zA-Z0-9]+))*)
 SPAR_OLD_LANGTAG	([a-z]+)"_"([a-zA-Z0-9]+)
@@ -189,7 +190,7 @@ SPAR_NCNAME_X		(([A-Za-z0-9_./#%+?&=@*:\x7f-\xfe-]*[A-Za-z0-9_/#%+?&=@*:\x7f-\xf
 <INITIAL>"."		{ return _DOT_WS; }
 <INITIAL>":"		{ return _COLON; }
 <INITIAL>";"		{ return _SEMI; }
-<INITIAL>"="		{ return _EQ; }
+<INITIAL>"="		{ return (((0 == ttlp_arg[0].ttlp_lexdepth) && (ttlp_arg[0].ttlp_flags & TTLP_ALLOW_TRIG)) ? _EQ_TOP_TRIG : _EQ); }
 <INITIAL>"=>"		{ return _EQ_GT; }
 <INITIAL>"<="		{ return _LT_EQ; }
 <INITIAL>"!"		{ return _BANG; }
@@ -219,7 +220,10 @@ SPAR_NCNAME_X		(([A-Za-z0-9_./#%+?&=@*:\x7f-\xfe-]*[A-Za-z0-9_/#%+?&=@*:\x7f-\xf
 <INITIAL>"["				{ ttlp_arg[0].ttlp_lexdepth++; return _LSQBRA; }
 <INITIAL>"[]"				{ return _LSQBRA_RSQBRA; }
 <INITIAL>"]"				{ ttlp_arg[0].ttlp_lexdepth--; return _RSQBRA; }
-<INITIAL>"{"				{ ttlp_arg[0].ttlp_lexdepth++; return _LBRA; }
+<INITIAL>"{"				{
+    int depth = ttlp_arg[0].ttlp_lexdepth++;
+    return (((0 == depth) && (ttlp_arg[0].ttlp_flags & TTLP_ALLOW_TRIG)) ? _LBRA_TOP_TRIG : _LBRA);
+  }
 <INITIAL>"}"				{ ttlp_arg[0].ttlp_lexdepth--; return _RBRA; }
 
 <INITIAL>"<"([^\\>\001-\040])*">"	{
@@ -508,7 +512,7 @@ ttlp_NUMBER_double (YYSTYPE *yylval_param, ttlp_t *ttlp_arg, struct yyguts_t * y
 }
 
 caddr_t
-ttl_query_lex_analyze (caddr_t str, wcharset_t *query_charset)
+ttl_lex_analyze (caddr_t str, int mode_bits, wcharset_t *query_charset)
 {
   dk_set_t lexems = NULL;
   caddr_t result_array;
@@ -523,7 +527,7 @@ ttl_query_lex_analyze (caddr_t str, wcharset_t *query_charset)
     {
       ttlp->ttlp_text = str;
       ttlp->ttlp_text_len = strlen (str);
-      ttlp->ttlp_err_hdr = "TURTLE parser";
+      ttlp->ttlp_err_hdr = ((mode_bits & TTLP_ALLOW_NQUAD) ? "NQuads lexical analyzer" : ((mode_bits & TTLP_ALLOW_TRIG) ? "TriG lexical analyzer" : "TURTLE lexical analyzer"));
       if (NULL == query_charset)
 	query_charset = default_charset;
       if (NULL == query_charset)
@@ -602,33 +606,15 @@ rdf_load_turtle (
 
   if (arg1_is_filename)
     {
-#ifdef WIN32
-      char fname[_MAX_PATH], *fname_ptr;
-      strncpy (fname, text_or_filename, _MAX_PATH);
-      fname[_MAX_PATH - 1] = '\0';
-      for (fname_ptr = fname; fname_ptr[0]; fname_ptr++)
-        {
-          switch (fname_ptr[0])
-            {
-            case '|':
-              fname_ptr[0] = ':';
-              break;
-            case '/':
-              fname_ptr[0] = '\\';
-              break;
-            }
-        }
-#else
-      char *fname = ((char *) text_or_filename);
-#endif
       sec_check_dba (qi, "<read XML from URL of type file://...>");
-      srcfile = fopen (fname, "rb");
+      tf->tf_boxed_input_name = file_native_name_from_iri_path_nchars (text_or_filename, strlen (text_or_filename));
+      file_path_assert (tf->tf_boxed_input_name, NULL, 1);
+      srcfile = fopen (tf->tf_boxed_input_name, "rb");
       if (NULL == srcfile)
         {
           ttlp_free (ttlp);
-	  sqlr_new_error ("42000", "SR598", "TURTLE parser has failed to open file '%s' for reading", fname);
+          sqlr_new_error ("42000", "SR598", "TURTLE parser has failed to open file '%s' for reading", tf->tf_boxed_input_name);
         }
-      tf->tf_input_name = fname;
       ttlp->ttlp_iter = file_read;
       ttlp->ttlp_iter_data = srcfile;
       goto iter_is_set;
@@ -703,7 +689,7 @@ iter_is_set:
 #ifdef MALLOC_DEBUG
       yy_push_state (INITIAL, scanner);
 #endif
-      tf_set_cbk_names (tf, (const char **)cbk_names);
+      tf_set_cbk_names (tf, (ccaddr_t *)cbk_names);
       TF_CHANGE_GRAPH_TO_DEFAULT (tf);
       /* ttlyydebug = 1; */
       if (flags & TTLP_ALLOW_NQUAD)
diff --git a/libsrc/Wi/turtle_p.c b/libsrc/Wi/turtle_p.c
index 68d54aa..2349b03 100644
--- a/libsrc/Wi/turtle_p.c
+++ b/libsrc/Wi/turtle_p.c
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -118,7 +117,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 
 
 /* Line 189 of yacc.c  */
-#line 122 "turtle_p.c"
+#line 121 "turtle_p.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -153,43 +152,45 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
      _COMMA = 263,
      _DOT_WS = 264,
      _LBRA = 265,
-     _LPAR = 266,
-     _LSQBRA = 267,
-     _LSQBRA_RSQBRA = 268,
-     _RBRA = 269,
-     _RPAR = 270,
-     _RSQBRA = 271,
-     _SEMI = 272,
-     _EQ = 273,
-     _EQ_GT = 274,
-     _LT_EQ = 275,
-     _BANG = 276,
-     _AT_a_L = 277,
-     _AT_base_L = 278,
-     _AT_has_L = 279,
-     _AT_is_L = 280,
-     _AT_keywords_L = 281,
-     _AT_of_L = 282,
-     _AT_prefix_L = 283,
-     _AT_this_L = 284,
-     false_L = 285,
-     true_L = 286,
-     __TTL_PUNCT_END = 287,
-     __TTL_NONPUNCT_START = 288,
-     TURTLE_INTEGER = 289,
-     TURTLE_DECIMAL = 290,
-     TURTLE_DOUBLE = 291,
-     TURTLE_STRING = 292,
-     KEYWORD = 293,
-     LANGTAG = 294,
-     QNAME = 295,
-     QNAME_NS = 296,
-     VARIABLE = 297,
-     BLANK_NODE_LABEL = 298,
-     Q_IRI_REF = 299,
-     _GARBAGE_BEFORE_DOT_WS = 300,
-     TTL_RECOVERABLE_ERROR = 301,
-     __TTL_NONPUNCT_END = 302
+     _LBRA_TOP_TRIG = 266,
+     _LPAR = 267,
+     _LSQBRA = 268,
+     _LSQBRA_RSQBRA = 269,
+     _RBRA = 270,
+     _RPAR = 271,
+     _RSQBRA = 272,
+     _SEMI = 273,
+     _EQ = 274,
+     _EQ_TOP_TRIG = 275,
+     _EQ_GT = 276,
+     _LT_EQ = 277,
+     _BANG = 278,
+     _AT_a_L = 279,
+     _AT_base_L = 280,
+     _AT_has_L = 281,
+     _AT_is_L = 282,
+     _AT_keywords_L = 283,
+     _AT_of_L = 284,
+     _AT_prefix_L = 285,
+     _AT_this_L = 286,
+     false_L = 287,
+     true_L = 288,
+     __TTL_PUNCT_END = 289,
+     __TTL_NONPUNCT_START = 290,
+     TURTLE_INTEGER = 291,
+     TURTLE_DECIMAL = 292,
+     TURTLE_DOUBLE = 293,
+     TURTLE_STRING = 294,
+     KEYWORD = 295,
+     LANGTAG = 296,
+     QNAME = 297,
+     QNAME_NS = 298,
+     VARIABLE = 299,
+     BLANK_NODE_LABEL = 300,
+     Q_IRI_REF = 301,
+     _GARBAGE_BEFORE_DOT_WS = 302,
+     TTL_RECOVERABLE_ERROR = 303,
+     __TTL_NONPUNCT_END = 304
    };
 #endif
 /* Tokens.  */
@@ -201,43 +202,45 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 #define _COMMA 263
 #define _DOT_WS 264
 #define _LBRA 265
-#define _LPAR 266
-#define _LSQBRA 267
-#define _LSQBRA_RSQBRA 268
-#define _RBRA 269
-#define _RPAR 270
-#define _RSQBRA 271
-#define _SEMI 272
-#define _EQ 273
-#define _EQ_GT 274
-#define _LT_EQ 275
-#define _BANG 276
-#define _AT_a_L 277
-#define _AT_base_L 278
-#define _AT_has_L 279
-#define _AT_is_L 280
-#define _AT_keywords_L 281
-#define _AT_of_L 282
-#define _AT_prefix_L 283
-#define _AT_this_L 284
-#define false_L 285
-#define true_L 286
-#define __TTL_PUNCT_END 287
-#define __TTL_NONPUNCT_START 288
-#define TURTLE_INTEGER 289
-#define TURTLE_DECIMAL 290
-#define TURTLE_DOUBLE 291
-#define TURTLE_STRING 292
-#define KEYWORD 293
-#define LANGTAG 294
-#define QNAME 295
-#define QNAME_NS 296
-#define VARIABLE 297
-#define BLANK_NODE_LABEL 298
-#define Q_IRI_REF 299
-#define _GARBAGE_BEFORE_DOT_WS 300
-#define TTL_RECOVERABLE_ERROR 301
-#define __TTL_NONPUNCT_END 302
+#define _LBRA_TOP_TRIG 266
+#define _LPAR 267
+#define _LSQBRA 268
+#define _LSQBRA_RSQBRA 269
+#define _RBRA 270
+#define _RPAR 271
+#define _RSQBRA 272
+#define _SEMI 273
+#define _EQ 274
+#define _EQ_TOP_TRIG 275
+#define _EQ_GT 276
+#define _LT_EQ 277
+#define _BANG 278
+#define _AT_a_L 279
+#define _AT_base_L 280
+#define _AT_has_L 281
+#define _AT_is_L 282
+#define _AT_keywords_L 283
+#define _AT_of_L 284
+#define _AT_prefix_L 285
+#define _AT_this_L 286
+#define false_L 287
+#define true_L 288
+#define __TTL_PUNCT_END 289
+#define __TTL_NONPUNCT_START 290
+#define TURTLE_INTEGER 291
+#define TURTLE_DECIMAL 292
+#define TURTLE_DOUBLE 293
+#define TURTLE_STRING 294
+#define KEYWORD 295
+#define LANGTAG 296
+#define QNAME 297
+#define QNAME_NS 298
+#define VARIABLE 299
+#define BLANK_NODE_LABEL 300
+#define Q_IRI_REF 301
+#define _GARBAGE_BEFORE_DOT_WS 302
+#define TTL_RECOVERABLE_ERROR 303
+#define __TTL_NONPUNCT_END 304
 
 
 
@@ -252,11 +255,12 @@ typedef union YYSTYPE
   caddr_t box;
   ptrlong token_type;
   void *nothing;
+  ptrlong lexlineno;
 
 
 
 /* Line 214 of yacc.c  */
-#line 260 "turtle_p.c"
+#line 264 "turtle_p.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -268,7 +272,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 272 "turtle_p.c"
+#line 276 "turtle_p.c"
 
 #ifdef short
 # undef short
@@ -318,7 +322,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -483,20 +487,20 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  2
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   511
+#define YYLAST   522
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  48
+#define YYNTOKENS  50
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  57
+#define YYNNTS  65
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  150
+#define YYNRULES  163
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  208
+#define YYNSTATES  223
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   302
+#define YYMAXUTOK   304
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -534,7 +538,7 @@ static const yytype_uint8 yytranslate[] =
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47
+      45,    46,    47,    48,    49
 };
 
 #if YYDEBUG
@@ -542,86 +546,91 @@ static const yytype_uint8 yytranslate[] =
    YYRHS.  */
 static const yytype_uint16 yyprhs[] =
 {
-       0,     0,     3,     4,     7,     8,    13,    17,    22,    27,
-      28,    32,    34,    36,    37,    39,    42,    44,    47,    48,
-      54,    56,    59,    61,    65,    66,    71,    73,    74,    78,
-      79,    83,    84,    88,    89,    93,    95,    96,   101,   102,
-     106,   107,   112,   113,   118,   121,   123,   127,   129,   131,
-     133,   135,   137,   139,   140,   142,   144,   145,   149,   153,
-     158,   160,   163,   166,   170,   172,   174,   178,   180,   182,
-     184,   186,   190,   192,   194,   196,   198,   200,   203,   205,
-     206,   210,   211,   215,   216,   220,   222,   224,   226,   230,
-     232,   234,   236,   238,   240,   242,   244,   246,   248,   250,
-     252,   253,   257,   258,   262,   266,   270,   272,   274,   276,
-     278,   280,   282,   284,   287,   288,   293,   295,   297,   299,
-     301,   303,   305,   307,   309,   311,   313,   315,   318,   322,
-     324,   328,   332,   336,   338,   340,   343,   346,   349,   350,
-     353,   357,   359,   360,   364,   365,   368,   369,   373,   375,
-     377
+       0,     0,     3,     4,     7,     8,    13,    16,    19,    20,
+      24,    26,    27,    33,    35,    38,    42,    46,    47,    49,
+      52,    54,    57,    58,    64,    66,    69,    72,    74,    78,
+      80,    82,    84,    86,    90,    91,    96,    98,    99,   103,
+     104,   108,   109,   113,   114,   118,   120,   121,   126,   127,
+     131,   132,   137,   138,   143,   146,   148,   152,   154,   156,
+     158,   160,   162,   164,   165,   167,   169,   170,   174,   178,
+     183,   185,   188,   191,   195,   197,   199,   203,   205,   207,
+     209,   211,   215,   217,   219,   221,   223,   225,   228,   230,
+     231,   235,   236,   240,   241,   245,   247,   249,   251,   255,
+     257,   259,   261,   263,   265,   267,   269,   271,   273,   275,
+     277,   278,   282,   283,   287,   291,   295,   297,   299,   301,
+     303,   305,   307,   309,   312,   313,   318,   320,   322,   324,
+     326,   328,   330,   332,   334,   336,   338,   340,   343,   347,
+     349,   353,   357,   361,   363,   365,   366,   370,   371,   375,
+     376,   380,   381,   384,   388,   390,   391,   395,   396,   399,
+     400,   404,   406,   408
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      49,     0,    -1,    -1,    49,    50,    -1,    -1,    26,    51,
-      71,    53,    -1,    23,    44,    53,    -1,    28,    41,    44,
-      53,    -1,    28,     7,    44,    53,    -1,    -1,   104,    52,
-      55,    -1,    66,    -1,     1,    -1,    -1,     9,    -1,     9,
-      14,    -1,    14,    -1,    77,     9,    -1,    -1,    57,    56,
-      58,    54,    53,    -1,    10,    -1,    18,    10,    -1,    59,
-      -1,    58,     9,    59,    -1,    -1,   104,    60,    74,    73,
-      -1,    61,    -1,    -1,    42,    62,    77,    -1,    -1,    95,
-      63,    77,    -1,    -1,    91,    64,    77,    -1,    -1,    46,
-      65,    77,    -1,    45,    -1,    -1,    42,    67,    77,     9,
-      -1,    -1,    95,    68,    76,    -1,    -1,    91,    69,    77,
-       9,    -1,    -1,    46,    70,    77,     9,    -1,    45,     9,
-      -1,    72,    -1,    71,     8,    72,    -1,    40,    -1,    22,
-      -1,    24,    -1,    25,    -1,    27,    -1,    29,    -1,    -1,
-      17,    -1,    79,    -1,    -1,    10,    75,   102,    -1,    78,
-      73,     9,    -1,    78,    73,    45,     9,    -1,     9,    -1,
-      45,     9,    -1,    79,    73,    -1,    79,    73,    45,    -1,
-      45,    -1,    81,    -1,    78,    17,    80,    -1,     8,    -1,
-      17,    -1,     1,    -1,    81,    -1,    79,    17,    80,    -1,
-       8,    -1,    17,    -1,     9,    -1,     1,    -1,    81,    -1,
-      81,    45,    -1,    45,    -1,    -1,    87,    82,    85,    -1,
-      -1,    90,    83,    85,    -1,    -1,    46,    84,    85,    -1,
-      86,    -1,    45,    -1,    94,    -1,    86,     8,    93,    -1,
-       8,    -1,    17,    -1,     9,    -1,     1,    -1,   104,    -1,
-      42,    -1,    22,    -1,    18,    -1,    19,    -1,    13,    -1,
-      43,    -1,    -1,    12,    88,    96,    -1,    -1,    11,    89,
-      99,    -1,    25,   104,    27,    -1,    25,    42,    27,    -1,
-      20,    -1,    31,    -1,    30,    -1,    34,    -1,    35,    -1,
-      36,    -1,    37,    -1,    37,    39,    -1,    -1,    37,    92,
-       6,   104,    -1,    94,    -1,    45,    -1,   104,    -1,    42,
-      -1,    95,    -1,    31,    -1,    30,    -1,    34,    -1,    35,
-      -1,    36,    -1,    37,    -1,    37,    39,    -1,    37,     6,
-     104,    -1,    46,    -1,    37,     6,    46,    -1,    46,     6,
-     104,    -1,    46,     6,    46,    -1,    43,    -1,    13,    -1,
-      12,    96,    -1,    11,    99,    -1,    10,   102,    -1,    -1,
-      97,    98,    -1,    79,    73,    16,    -1,    16,    -1,    -1,
-     100,   101,    15,    -1,    -1,   101,    94,    -1,    -1,   103,
-      58,    14,    -1,    44,    -1,    40,    -1,    41,    -1
+      51,     0,    -1,    -1,    51,    52,    -1,    -1,    28,    53,
+      78,    58,    -1,    56,    58,    -1,    57,    58,    -1,    -1,
+     114,    54,    60,    -1,    73,    -1,    -1,    11,    55,    63,
+      59,    58,    -1,     1,    -1,    25,    46,    -1,    30,    43,
+      46,    -1,    30,     7,    46,    -1,    -1,     9,    -1,     9,
+      15,    -1,    15,    -1,    84,     9,    -1,    -1,    62,    61,
+      63,    59,    58,    -1,    11,    -1,    20,    11,    -1,    20,
+       1,    -1,    64,    -1,    63,     9,    64,    -1,    56,    -1,
+      57,    -1,    66,    -1,    66,    -1,    65,     9,    66,    -1,
+      -1,   114,    67,    81,    80,    -1,    68,    -1,    -1,    44,
+      69,    84,    -1,    -1,   102,    70,    84,    -1,    -1,    98,
+      71,    84,    -1,    -1,    48,    72,    84,    -1,    47,    -1,
+      -1,    44,    74,    84,     9,    -1,    -1,   102,    75,    83,
+      -1,    -1,    98,    76,    84,     9,    -1,    -1,    48,    77,
+      84,     9,    -1,    47,     9,    -1,    79,    -1,    78,     8,
+      79,    -1,    42,    -1,    24,    -1,    26,    -1,    27,    -1,
+      29,    -1,    31,    -1,    -1,    18,    -1,    86,    -1,    -1,
+      10,    82,   112,    -1,    85,    80,     9,    -1,    85,    80,
+      47,     9,    -1,     9,    -1,    47,     9,    -1,    86,    80,
+      -1,    86,    80,    47,    -1,    47,    -1,    88,    -1,    85,
+      18,    87,    -1,     8,    -1,    18,    -1,     1,    -1,    88,
+      -1,    86,    18,    87,    -1,     8,    -1,    18,    -1,     9,
+      -1,     1,    -1,    88,    -1,    88,    47,    -1,    47,    -1,
+      -1,    94,    89,    92,    -1,    -1,    97,    90,    92,    -1,
+      -1,    48,    91,    92,    -1,    93,    -1,    47,    -1,   101,
+      -1,    93,     8,   100,    -1,     8,    -1,    18,    -1,     9,
+      -1,     1,    -1,   114,    -1,    44,    -1,    24,    -1,    19,
+      -1,    21,    -1,    14,    -1,    45,    -1,    -1,    13,    95,
+     106,    -1,    -1,    12,    96,   109,    -1,    27,   114,    29,
+      -1,    27,    44,    29,    -1,    22,    -1,    33,    -1,    32,
+      -1,    36,    -1,    37,    -1,    38,    -1,    39,    -1,    39,
+      41,    -1,    -1,    39,    99,     6,   114,    -1,   101,    -1,
+      47,    -1,   114,    -1,    44,    -1,   102,    -1,    33,    -1,
+      32,    -1,    36,    -1,    37,    -1,    38,    -1,    39,    -1,
+      39,    41,    -1,    39,     6,   114,    -1,    48,    -1,    39,
+       6,    48,    -1,    48,     6,   114,    -1,    48,     6,    48,
+      -1,    45,    -1,    14,    -1,    -1,    13,   103,   106,    -1,
+      -1,    12,   104,   109,    -1,    -1,    10,   105,   112,    -1,
+      -1,   107,   108,    -1,    86,    80,    17,    -1,    17,    -1,
+      -1,   110,   111,    16,    -1,    -1,   111,   101,    -1,    -1,
+     113,    65,    15,    -1,    46,    -1,    42,    -1,    43,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   148,   148,   150,   154,   154,   155,   156,   175,   178,
-     178,   182,   183,   186,   188,   192,   193,   197,   198,   198,
-     208,   209,   213,   214,   218,   218,   222,   226,   226,   229,
-     229,   232,   232,   236,   236,   239,   243,   243,   246,   246,
-     249,   249,   253,   253,   256,   260,   261,   265,   266,   267,
-     268,   269,   270,   273,   275,   279,   281,   280,   287,   288,
-     289,   290,   294,   295,   296,   300,   301,   302,   303,   304,
-     308,   309,   310,   311,   312,   313,   317,   318,   319,   324,
-     323,   327,   326,   330,   330,   337,   338,   342,   343,   344,
-     345,   346,   347,   351,   352,   353,   354,   355,   356,   360,
-     369,   368,   373,   372,   379,   380,   381,   385,   386,   387,
-     388,   389,   390,   391,   392,   392,   398,   399,   403,   408,
-     412,   416,   418,   420,   424,   428,   432,   436,   442,   449,
-     450,   453,   456,   460,   467,   468,   469,   470,   475,   475,
-     485,   491,   500,   500,   534,   535,   554,   554,   574,   581,
-     589
+       0,   151,   151,   153,   157,   157,   158,   159,   160,   160,
+     164,   165,   165,   171,   175,   183,   205,   212,   214,   218,
+     219,   223,   224,   224,   236,   237,   238,   242,   243,   247,
+     248,   249,   253,   254,   258,   258,   262,   266,   266,   269,
+     269,   272,   272,   276,   276,   279,   283,   283,   286,   286,
+     289,   289,   293,   293,   296,   300,   301,   305,   306,   307,
+     308,   309,   310,   313,   315,   319,   321,   320,   327,   328,
+     329,   330,   334,   335,   336,   340,   341,   342,   343,   344,
+     348,   349,   350,   351,   352,   353,   357,   358,   359,   364,
+     363,   367,   366,   370,   370,   377,   378,   382,   383,   384,
+     385,   386,   387,   391,   392,   393,   394,   395,   396,   403,
+     414,   413,   426,   425,   440,   441,   442,   446,   447,   448,
+     449,   450,   451,   452,   453,   453,   459,   460,   464,   469,
+     473,   477,   479,   481,   485,   489,   493,   497,   503,   510,
+     511,   514,   517,   521,   530,   537,   536,   548,   547,   559,
+     558,   573,   573,   583,   589,   598,   598,   632,   633,   652,
+     652,   672,   679,   687
 };
 #endif
 
@@ -632,29 +641,31 @@ static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "__TTL_PUNCT_BEGIN", "_CARET_WS",
   "_CARET_NOWS", "_CARET_CARET", "_COLON", "_COMMA", "_DOT_WS", "_LBRA",
-  "_LPAR", "_LSQBRA", "_LSQBRA_RSQBRA", "_RBRA", "_RPAR", "_RSQBRA",
-  "_SEMI", "_EQ", "_EQ_GT", "_LT_EQ", "_BANG", "_AT_a_L", "_AT_base_L",
-  "_AT_has_L", "_AT_is_L", "_AT_keywords_L", "_AT_of_L", "_AT_prefix_L",
-  "_AT_this_L", "false_L", "true_L", "__TTL_PUNCT_END",
-  "__TTL_NONPUNCT_START", "TURTLE_INTEGER", "TURTLE_DECIMAL",
-  "TURTLE_DOUBLE", "TURTLE_STRING", "KEYWORD", "LANGTAG", "QNAME",
-  "QNAME_NS", "VARIABLE", "BLANK_NODE_LABEL", "Q_IRI_REF",
+  "_LBRA_TOP_TRIG", "_LPAR", "_LSQBRA", "_LSQBRA_RSQBRA", "_RBRA", "_RPAR",
+  "_RSQBRA", "_SEMI", "_EQ", "_EQ_TOP_TRIG", "_EQ_GT", "_LT_EQ", "_BANG",
+  "_AT_a_L", "_AT_base_L", "_AT_has_L", "_AT_is_L", "_AT_keywords_L",
+  "_AT_of_L", "_AT_prefix_L", "_AT_this_L", "false_L", "true_L",
+  "__TTL_PUNCT_END", "__TTL_NONPUNCT_START", "TURTLE_INTEGER",
+  "TURTLE_DECIMAL", "TURTLE_DOUBLE", "TURTLE_STRING", "KEYWORD", "LANGTAG",
+  "QNAME", "QNAME_NS", "VARIABLE", "BLANK_NODE_LABEL", "Q_IRI_REF",
   "_GARBAGE_BEFORE_DOT_WS", "TTL_RECOVERABLE_ERROR", "__TTL_NONPUNCT_END",
-  "$accept", "turtledoc", "clause", "$@1", "$@2", "dot_opt",
-  "trig_group_end", "trig_block_or_predicate_object_list", "$@3",
-  "opt_eq_lbra", "inner_triple_clauses", "inner_triple_clause", "$@4",
-  "triple_clause_with_nonq_subj", "$@5", "$@6", "$@7", "$@8",
-  "top_triple_clause_with_nonq_subj", "$@9", "$@10", "$@11", "$@12",
-  "keyword_list", "keyword", "semicolon_opt",
-  "inner_predicate_object_list", "$@13",
+  "$accept", "turtledoc", "clause", "$@1", "$@2", "$@3", "base_clause",
+  "prefix_clause", "dot_opt", "trig_group_end",
+  "trig_block_or_predicate_object_list", "$@4", "opt_eq_lbra",
+  "base_or_prefix_or_inner_triple_clauses",
+  "base_or_prefix_or_inner_triple_clause", "inner_triple_clauses",
+  "inner_triple_clause", "$@5", "triple_clause_with_nonq_subj", "$@6",
+  "$@7", "$@8", "$@9", "top_triple_clause_with_nonq_subj", "$@10", "$@11",
+  "$@12", "$@13", "keyword_list", "keyword", "semicolon_opt",
+  "inner_predicate_object_list", "$@14",
   "top_blank_predicate_object_list_or_garbage_with_dot",
   "predicate_object_list_or_garbage", "top_blank_predicate_object_list",
   "predicate_object_list", "verb_and_object_list_or_garbage",
-  "verb_and_object_list", "$@14", "$@15", "$@16", "object_list_or_garbage",
-  "object_list", "verb", "$@17", "$@18", "rev_verb", "literal_subject",
-  "$@19", "object_or_garbage", "object", "blank", "blank_block_subj",
-  "$@20", "blank_block_subj_tail", "blank_block_seq", "$@21", "items",
-  "blank_block_formula", "$@22", "q_complete", 0
+  "verb_and_object_list", "$@15", "$@16", "$@17", "object_list_or_garbage",
+  "object_list", "verb", "@18", "@19", "rev_verb", "literal_subject",
+  "$@20", "object_or_garbage", "object", "blank", "@21", "@22", "@23",
+  "blank_block_subj", "$@24", "blank_block_subj_tail", "blank_block_seq",
+  "$@25", "items", "blank_block_formula", "$@26", "q_complete", 0
 };
 #endif
 
@@ -667,37 +678,39 @@ static const yytype_uint16 yytoknum[] =
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302
+     295,   296,   297,   298,   299,   300,   301,   302,   303,   304
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    48,    49,    49,    51,    50,    50,    50,    50,    52,
-      50,    50,    50,    53,    53,    54,    54,    55,    56,    55,
-      57,    57,    58,    58,    60,    59,    59,    62,    61,    63,
-      61,    64,    61,    65,    61,    61,    67,    66,    68,    66,
-      69,    66,    70,    66,    66,    71,    71,    72,    72,    72,
-      72,    72,    72,    73,    73,    74,    75,    74,    76,    76,
-      76,    76,    77,    77,    77,    78,    78,    78,    78,    78,
-      79,    79,    79,    79,    79,    79,    80,    80,    80,    82,
-      81,    83,    81,    84,    81,    85,    85,    86,    86,    86,
-      86,    86,    86,    87,    87,    87,    87,    87,    87,    87,
-      88,    87,    89,    87,    90,    90,    90,    91,    91,    91,
-      91,    91,    91,    91,    92,    91,    93,    93,    94,    94,
-      94,    94,    94,    94,    94,    94,    94,    94,    94,    94,
-      94,    94,    94,    95,    95,    95,    95,    95,    97,    96,
-      98,    98,   100,    99,   101,   101,   103,   102,   104,   104,
-     104
+       0,    50,    51,    51,    53,    52,    52,    52,    54,    52,
+      52,    55,    52,    52,    56,    57,    57,    58,    58,    59,
+      59,    60,    61,    60,    62,    62,    62,    63,    63,    64,
+      64,    64,    65,    65,    67,    66,    66,    69,    68,    70,
+      68,    71,    68,    72,    68,    68,    74,    73,    75,    73,
+      76,    73,    77,    73,    73,    78,    78,    79,    79,    79,
+      79,    79,    79,    80,    80,    81,    82,    81,    83,    83,
+      83,    83,    84,    84,    84,    85,    85,    85,    85,    85,
+      86,    86,    86,    86,    86,    86,    87,    87,    87,    89,
+      88,    90,    88,    91,    88,    92,    92,    93,    93,    93,
+      93,    93,    93,    94,    94,    94,    94,    94,    94,    94,
+      95,    94,    96,    94,    97,    97,    97,    98,    98,    98,
+      98,    98,    98,    98,    99,    98,   100,   100,   101,   101,
+     101,   101,   101,   101,   101,   101,   101,   101,   101,   101,
+     101,   101,   101,   102,   102,   103,   102,   104,   102,   105,
+     102,   107,   106,   108,   108,   110,   109,   111,   111,   113,
+     112,   114,   114,   114
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 static const yytype_uint8 yyr2[] =
 {
-       0,     2,     0,     2,     0,     4,     3,     4,     4,     0,
-       3,     1,     1,     0,     1,     2,     1,     2,     0,     5,
-       1,     2,     1,     3,     0,     4,     1,     0,     3,     0,
+       0,     2,     0,     2,     0,     4,     2,     2,     0,     3,
+       1,     0,     5,     1,     2,     3,     3,     0,     1,     2,
+       1,     2,     0,     5,     1,     2,     2,     1,     3,     1,
+       1,     1,     1,     3,     0,     4,     1,     0,     3,     0,
        3,     0,     3,     0,     3,     1,     0,     4,     0,     3,
        0,     4,     0,     4,     2,     1,     3,     1,     1,     1,
        1,     1,     1,     0,     1,     1,     0,     3,     3,     4,
@@ -708,9 +721,9 @@ static const yytype_uint8 yyr2[] =
        0,     3,     0,     3,     3,     3,     1,     1,     1,     1,
        1,     1,     1,     2,     0,     4,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     2,     3,     1,
-       3,     3,     3,     1,     1,     2,     2,     2,     0,     2,
-       3,     1,     0,     3,     0,     2,     0,     3,     1,     1,
-       1
+       3,     3,     3,     1,     1,     0,     3,     0,     3,     0,
+       3,     0,     2,     3,     1,     0,     3,     0,     2,     0,
+       3,     1,     1,     1
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -718,221 +731,231 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       2,     0,     1,    12,   146,   142,   138,   134,     0,     4,
-       0,   108,   107,   109,   110,   111,   112,   149,   150,    36,
-     133,   148,     0,    42,     3,    11,    40,    38,     9,   137,
-       0,   136,   144,   135,     0,    13,     0,     0,     0,   113,
-       0,     0,    44,     0,     0,     0,     0,    27,    35,    33,
-       0,    22,    26,    31,    29,    24,     0,    75,    72,    74,
-     102,   100,    98,   141,    73,    96,    97,   106,    95,     0,
-      94,    99,    83,    53,    70,    79,    81,   139,    93,    14,
-       6,    48,    49,    50,    51,    52,    47,    13,    45,    13,
-      13,     0,    64,     0,    53,     0,     0,    69,    67,    60,
-      68,     0,    39,    53,    65,    20,    96,    10,    18,     0,
-       0,     0,     0,   147,     0,     0,     0,   143,   122,   121,
-     123,   124,   125,   126,   119,   129,   145,   120,   118,   142,
-     138,     0,     0,     0,    54,     0,     0,     0,     0,     5,
-       8,     7,   115,    37,    62,    43,    41,    61,    54,     0,
-      21,     0,    17,    28,    34,    23,    32,    30,    56,    53,
-      55,     0,   127,     0,   103,   101,   105,   104,    92,    89,
-      91,    90,    86,    84,    85,    87,    78,    71,    76,   140,
-      80,    82,    46,    63,    66,    58,     0,     0,   146,    54,
-      25,     0,   130,   128,   132,   131,     0,    77,    59,     0,
-      16,    13,    57,   117,    88,   116,    15,    19
+       2,     0,     1,    13,   149,    11,   147,   145,   144,     0,
+       4,     0,   118,   117,   119,   120,   121,   122,   162,   163,
+      46,   143,   161,     0,    52,     3,    17,    17,    10,    50,
+      48,     8,   159,     0,   155,   151,    14,     0,     0,     0,
+     123,     0,     0,    54,     0,    18,     6,     7,     0,     0,
+       0,   150,     0,    37,    45,    43,    29,    30,     0,    27,
+      31,    36,    41,    39,    34,   148,   157,   146,     0,    58,
+      59,    60,    61,    62,    57,    17,    55,    16,    15,     0,
+      85,    82,    84,   112,   110,   108,    83,   106,   107,   116,
+     105,     0,   104,   109,    74,    93,     0,    63,    80,    89,
+      91,   103,     0,     0,    79,    77,    70,    78,     0,    49,
+      63,    75,    24,     0,     9,    22,     0,     0,    32,     0,
+       0,     0,    20,    17,     0,     0,     0,     0,   154,    63,
+     152,     0,     5,   125,   155,   151,     0,     0,     0,    47,
+      64,    72,     0,     0,    53,    51,    71,    64,     0,    26,
+      25,     0,    21,     0,   160,    38,    44,    19,    28,    12,
+      42,    40,    66,    63,    65,   156,   132,   131,   133,   134,
+     135,   136,   129,   139,   158,   130,   128,     0,    56,   113,
+     111,   115,   114,   102,    99,   101,   100,    96,    94,    95,
+      97,    88,    81,    86,    73,    90,    92,    76,    68,     0,
+       0,    33,   159,    64,    35,     0,     0,   137,     0,   153,
+       0,    87,    69,    17,    67,   140,   138,   142,   141,   127,
+      98,   126,    23
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,     1,    24,    36,    46,    80,   201,   107,   151,   108,
-      50,    51,   116,    52,   110,   115,   114,   111,    25,    41,
-      45,    44,    43,    87,    88,   135,   159,   188,   102,    93,
-     103,    94,   177,    74,   136,   137,   133,   173,   174,    75,
-     130,   129,    76,    53,    40,   204,   175,   127,    33,    34,
-      77,    31,    32,    56,    29,    30,    78
+      -1,     1,    25,    37,    50,    33,    56,    57,    46,   123,
+     114,   151,   115,    58,    59,   117,    60,   126,    61,   119,
+     125,   124,   120,    28,    42,    49,    48,    44,    75,    76,
+     141,   163,   202,   109,    96,   110,    97,   192,    98,   142,
+     143,   138,   188,   189,    99,   135,   134,   100,    62,    41,
+     220,   190,    63,    35,    34,    32,    67,    68,   130,    65,
+      66,   127,    51,    52,   101
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -108
+#define YYPACT_NINF -123
 static const yytype_int16 yypact[] =
 {
-    -108,   144,  -108,  -108,  -108,  -108,  -108,  -108,   -29,  -108,
-       9,  -108,  -108,  -108,  -108,  -108,     8,  -108,  -108,  -108,
-    -108,  -108,    10,  -108,  -108,  -108,  -108,  -108,  -108,  -108,
-     231,  -108,  -108,  -108,    23,    17,    -2,    -7,     2,  -108,
-      15,   284,  -108,   284,   284,   330,   238,  -108,  -108,  -108,
-      19,  -108,  -108,  -108,  -108,  -108,   393,  -108,  -108,  -108,
-    -108,  -108,  -108,  -108,  -108,  -108,  -108,  -108,  -108,    30,
-    -108,  -108,  -108,    27,  -108,  -108,  -108,  -108,  -108,  -108,
-    -108,  -108,  -108,  -108,  -108,  -108,  -108,    79,  -108,    17,
-      17,    45,  -108,    43,    27,    49,    51,  -108,  -108,  -108,
-    -108,    53,  -108,    58,  -108,  -108,    73,  -108,  -108,    93,
-     284,   284,   231,  -108,   284,   284,   376,  -108,  -108,  -108,
-    -108,  -108,  -108,    12,  -108,    88,  -108,  -108,  -108,  -108,
-    -108,    76,    77,   192,   465,    90,   192,   192,    -2,  -108,
-    -108,  -108,  -108,  -108,    62,  -108,  -108,  -108,   465,     4,
-    -108,   231,  -108,  -108,  -108,  -108,  -108,  -108,  -108,    91,
-      92,    13,  -108,    38,  -108,  -108,  -108,  -108,  -108,  -108,
-    -108,  -108,  -108,  -108,   102,  -108,  -108,  -108,    68,  -108,
-    -108,  -108,  -108,  -108,  -108,  -108,   105,    47,  -108,  -108,
-    -108,   429,  -108,  -108,  -108,  -108,   277,  -108,  -108,    85,
-    -108,    17,  -108,  -108,  -108,  -108,  -108,  -108
+    -123,   135,  -123,  -123,  -123,  -123,  -123,  -123,  -123,   -35,
+    -123,    10,  -123,  -123,  -123,  -123,  -123,     9,  -123,  -123,
+    -123,  -123,  -123,    19,  -123,  -123,    26,    26,  -123,  -123,
+    -123,  -123,  -123,   430,  -123,  -123,  -123,    69,   -28,    -6,
+    -123,    36,    12,  -123,    12,  -123,  -123,  -123,    12,   275,
+     205,  -123,   268,  -123,  -123,  -123,  -123,  -123,     7,  -123,
+    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,   323,  -123,
+    -123,  -123,  -123,  -123,  -123,    29,  -123,  -123,  -123,    81,
+    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,
+    -123,    75,  -123,  -123,  -123,  -123,    37,    44,  -123,  -123,
+    -123,  -123,    57,    71,  -123,  -123,  -123,  -123,    76,  -123,
+      66,  -123,  -123,     8,  -123,  -123,    80,    14,  -123,    12,
+      12,   391,  -123,    26,    12,    12,   369,    31,  -123,    44,
+    -123,    69,  -123,  -123,  -123,  -123,    62,    63,   227,  -123,
+     474,    52,   227,   227,  -123,  -123,  -123,   474,     5,  -123,
+    -123,   430,  -123,   268,  -123,  -123,  -123,  -123,  -123,  -123,
+    -123,  -123,  -123,    86,    89,  -123,  -123,  -123,  -123,  -123,
+    -123,    42,  -123,   106,  -123,  -123,  -123,    97,  -123,  -123,
+    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,   108,
+    -123,  -123,  -123,    78,  -123,  -123,  -123,  -123,  -123,   113,
+       7,  -123,  -123,  -123,  -123,   437,    60,  -123,    67,  -123,
+     316,  -123,  -123,    26,  -123,  -123,  -123,  -123,  -123,  -123,
+    -123,  -123,  -123
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -108,  -108,  -108,  -108,  -108,   -83,  -108,  -108,  -108,  -108,
-     -28,  -107,  -108,  -108,  -108,  -108,  -108,  -108,  -108,  -108,
-    -108,  -108,  -108,  -108,   -21,   -86,  -108,  -108,  -108,   -34,
-    -108,   -23,   -24,   -43,  -108,  -108,  -108,   -36,  -108,  -108,
-    -108,  -108,  -108,   132,  -108,  -108,   -53,     0,     7,  -108,
-    -108,     5,  -108,  -108,   -50,  -108,    -1
+    -123,  -123,  -123,  -123,  -123,  -123,   128,   129,   -26,   -69,
+    -123,  -123,  -123,   -19,    13,  -123,   -48,  -123,  -123,  -123,
+    -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,  -123,     2,
+    -102,  -123,  -123,  -123,   -38,  -123,   -61,    -9,   -46,  -123,
+    -123,  -123,   -71,  -123,  -123,  -123,  -123,  -123,   139,  -123,
+    -123,  -122,     1,  -123,  -123,  -123,    16,  -123,  -123,    20,
+    -123,  -123,   -49,  -123,    -1
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -115
+#define YYTABLE_NINF -125
 static const yytype_int16 yytable[] =
 {
-      28,    27,   104,   126,   139,   155,   140,   141,   144,    95,
-      96,    73,   109,   185,  -114,    35,    37,   149,   161,    42,
-      81,    91,    82,    83,    57,    84,    79,    85,   112,    55,
-      54,    58,    59,   113,    60,    61,    62,    89,    86,    63,
-      64,    65,    66,    67,   134,    68,    90,    39,    69,   186,
-      38,   162,   143,    17,    18,   128,   199,    21,   145,   192,
-     146,   200,   147,    17,    18,    70,    71,    21,   132,    72,
-      17,    18,   131,   190,    21,   148,   153,   154,    17,    18,
-     156,   157,    21,   150,   194,    17,    18,   138,    79,    21,
-     142,   178,   155,   160,   163,     4,     5,     6,     7,   206,
-     180,   181,   152,   166,   167,   178,   179,   183,   189,   191,
-     196,    55,    54,   197,   198,    11,    12,   182,   207,    13,
-      14,    15,    16,   187,   184,    17,    18,    47,    20,    21,
-      48,    49,   128,    26,   164,   128,   128,   165,   202,     0,
-       0,     0,     0,   205,     2,     3,     0,     0,   178,     0,
-      55,    54,     0,     0,     4,     5,     6,     7,     0,     0,
-     193,     0,   195,     0,     0,     0,     0,     8,     0,     0,
-       9,     0,    10,     0,    11,    12,     0,     0,    13,    14,
-      15,    16,     0,     0,    17,    18,    19,    20,    21,    22,
-      23,     0,     0,   168,     0,   128,     0,     0,    55,    54,
-     169,   170,     4,     5,     6,     7,     0,     0,     0,   171,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   118,   119,     0,     0,   120,   121,   122,   123,
-       0,     0,    17,    18,   124,    20,    21,   172,   125,    57,
-       0,     4,     5,     6,     7,     0,    58,    59,   105,    60,
-      61,    62,     0,     0,     0,    64,   106,    66,    67,     0,
-      68,    11,    12,    69,     0,    13,    14,    15,    16,     0,
-       0,    17,    18,    47,    20,    21,    48,    49,    17,    18,
-      70,    71,    21,    92,    72,    57,     0,     4,     5,     6,
-       7,     0,    58,    59,     0,    60,    61,    62,     0,     0,
-       0,    64,    65,    66,    67,     0,    68,   118,   119,    69,
-       0,   120,   121,   122,   123,     0,     0,    17,    18,   124,
-      20,    21,   203,   125,    17,    18,    70,    71,    21,    92,
-      72,    97,     0,     0,     0,     0,     0,     0,    98,    99,
-       0,    60,    61,    62,     0,     0,     0,   100,    65,    66,
-      67,     0,    68,     0,     0,    69,     0,     0,     0,     0,
+      31,    47,    30,   111,   118,   174,   102,   129,   148,   149,
+     103,    36,   116,    80,   198,  -124,   121,    38,    77,   150,
+      81,    82,   122,   153,    83,    84,    85,   177,    43,   154,
+      86,    87,    64,    88,    89,    45,    90,   131,    45,    91,
+      78,     4,    79,     6,     7,     8,   139,   165,   206,   132,
+      40,    64,   199,    39,    18,    19,    92,    93,    22,    94,
+      95,   204,   140,   166,   167,   164,   144,   168,   169,   170,
+     171,   195,   196,    18,    19,   172,    21,    22,   133,   173,
+     145,   155,   156,   207,   147,   146,   160,   161,   221,   152,
+     137,   181,   182,    69,   193,    70,    71,   159,    72,   194,
+      73,   193,    18,    19,   203,   201,    22,   205,   215,    18,
+      19,    74,   208,    22,   209,   217,   210,    18,    19,   136,
+      64,    22,   212,    18,    19,   211,   176,    22,   175,    26,
+      27,   213,   200,   178,   158,     2,     3,   176,   197,   175,
+      29,   176,   176,   175,   175,     4,     5,     6,     7,     8,
+      64,   180,    64,   214,   179,     0,     0,     0,     0,   193,
+       9,     0,     0,    10,     0,    11,     0,    12,    13,     0,
+       0,    14,    15,    16,    17,     0,     0,    18,    19,    20,
+      21,    22,    23,    24,     0,     0,     0,   222,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      17,    18,    70,    71,    21,   101,    72,    57,     0,     0,
-       0,     0,     0,     0,    58,    59,   158,    60,    61,    62,
-       0,     0,     0,    64,    65,    66,    67,     0,    68,     0,
-       0,    69,     0,     4,     5,     6,     7,     0,   117,     0,
-       0,     0,     0,     0,     0,     0,    17,    18,    70,    71,
-      21,     0,    72,   118,   119,     0,     0,   120,   121,   122,
-     123,     0,     0,    17,    18,   124,    20,    21,     0,   125,
-      60,    61,    62,     0,     0,     0,     0,    65,    66,    67,
-       0,    68,     0,     0,    69,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    17,
-      18,    70,    71,    21,   176,    72,    60,    61,    62,     0,
-       0,     0,     0,    65,    66,    67,     0,    68,     0,     0,
-      69,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    17,    18,    70,    71,    21,
-       0,    72
+       0,     0,     0,     0,     0,   216,    80,   218,     0,   176,
+       0,   175,     0,    81,    82,     0,   112,    83,    84,    85,
+       0,     0,     0,    86,    87,   113,    88,    89,   183,    90,
+       0,     0,    91,     0,     0,   184,   185,     4,     0,     6,
+       7,     8,     0,     0,     0,   186,     0,    18,    19,    92,
+      93,    22,    94,    95,     0,     0,     0,     0,     0,   166,
+     167,     0,     0,   168,   169,   170,   171,     0,     0,    18,
+      19,   172,    21,    22,   187,   173,   104,     0,     4,     0,
+       6,     7,     8,   105,   106,     0,     0,    83,    84,    85,
+       0,     0,     0,   107,    87,     0,    88,    89,     0,    90,
+      12,    13,    91,     0,    14,    15,    16,    17,     0,     0,
+      18,    19,    53,    21,    22,    54,    55,    18,    19,    92,
+      93,    22,   108,    95,    80,     0,     4,     0,     6,     7,
+       8,    81,    82,     0,     0,    83,    84,    85,     0,     0,
+     128,    86,    87,     0,    88,    89,     0,    90,   166,   167,
+      91,     0,   168,   169,   170,   171,     0,     0,    18,    19,
+     172,    21,    22,   219,   173,    18,    19,    92,    93,    22,
+      80,    95,     0,     0,     0,     0,     0,    81,    82,   162,
+       0,    83,    84,    85,     0,     0,     0,    86,    87,     0,
+      88,    89,     0,    90,     0,     0,    91,     0,     0,     0,
+       0,     4,     0,     6,     7,     8,   157,     0,     0,     0,
+       0,    18,    19,    92,    93,    22,     9,    95,     0,     0,
+       0,    11,     0,    12,    13,     0,     0,    14,    15,    16,
+      17,     0,     0,    18,    19,    53,    21,    22,    54,    55,
+       4,     0,     6,     7,     8,     0,     0,     0,     0,    83,
+      84,    85,     0,     0,     0,     9,    87,     0,    88,    89,
+      11,    90,    12,    13,    91,     0,    14,    15,    16,    17,
+       0,     0,    18,    19,    53,    21,    22,    54,    55,    18,
+      19,    92,    93,    22,   191,    95,    83,    84,    85,     0,
+       0,     0,     0,    87,     0,    88,    89,     0,    90,     0,
+       0,    91,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    18,    19,    92,    93,
+      22,     0,    95
 };
 
 static const yytype_int16 yycheck[] =
 {
-       1,     1,    45,    56,    87,   112,    89,    90,    94,    43,
-      44,    34,    46,     9,     6,    44,     7,   103,     6,     9,
-      22,     6,    24,    25,     1,    27,     9,    29,     9,    30,
-      30,     8,     9,    14,    11,    12,    13,    44,    40,    16,
-      17,    18,    19,    20,    17,    22,    44,    39,    25,    45,
-      41,    39,     9,    40,    41,    56,     9,    44,     9,    46,
-       9,    14,     9,    40,    41,    42,    43,    44,    69,    46,
-      40,    41,    42,   159,    44,    17,   110,   111,    40,    41,
-     114,   115,    44,    10,    46,    40,    41,     8,     9,    44,
-      91,   134,   199,   116,     6,    10,    11,    12,    13,    14,
-     136,   137,     9,    27,    27,   148,    16,    45,    17,    17,
-       8,   112,   112,    45,     9,    30,    31,   138,   201,    34,
-      35,    36,    37,   151,   148,    40,    41,    42,    43,    44,
-      45,    46,   133,     1,   129,   136,   137,   130,   188,    -1,
-      -1,    -1,    -1,   196,     0,     1,    -1,    -1,   191,    -1,
-     151,   151,    -1,    -1,    10,    11,    12,    13,    -1,    -1,
-     161,    -1,   163,    -1,    -1,    -1,    -1,    23,    -1,    -1,
-      26,    -1,    28,    -1,    30,    31,    -1,    -1,    34,    35,
-      36,    37,    -1,    -1,    40,    41,    42,    43,    44,    45,
-      46,    -1,    -1,     1,    -1,   196,    -1,    -1,   199,   199,
-       8,     9,    10,    11,    12,    13,    -1,    -1,    -1,    17,
+       1,    27,     1,    49,    52,   127,    44,    68,   110,     1,
+      48,    46,    50,     1,     9,     6,     9,     7,    46,    11,
+       8,     9,    15,     9,    12,    13,    14,   129,     9,    15,
+      18,    19,    33,    21,    22,     9,    24,     8,     9,    27,
+      46,    10,     6,    12,    13,    14,     9,    16,     6,    75,
+      41,    52,    47,    43,    42,    43,    44,    45,    46,    47,
+      48,   163,    18,    32,    33,   126,     9,    36,    37,    38,
+      39,   142,   143,    42,    43,    44,    45,    46,    79,    48,
+       9,   119,   120,    41,    18,     9,   124,   125,   210,     9,
+      91,    29,    29,    24,   140,    26,    27,   123,    29,    47,
+      31,   147,    42,    43,    18,   153,    46,    18,    48,    42,
+      43,    42,     6,    46,    17,    48,     8,    42,    43,    44,
+     121,    46,     9,    42,    43,    47,   127,    46,   127,     1,
+       1,   200,   151,   131,   121,     0,     1,   138,   147,   138,
+       1,   142,   143,   142,   143,    10,    11,    12,    13,    14,
+     151,   135,   153,   202,   134,    -1,    -1,    -1,    -1,   205,
+      25,    -1,    -1,    28,    -1,    30,    -1,    32,    33,    -1,
+      -1,    36,    37,    38,    39,    -1,    -1,    42,    43,    44,
+      45,    46,    47,    48,    -1,    -1,    -1,   213,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    30,    31,    -1,    -1,    34,    35,    36,    37,
-      -1,    -1,    40,    41,    42,    43,    44,    45,    46,     1,
-      -1,    10,    11,    12,    13,    -1,     8,     9,    10,    11,
-      12,    13,    -1,    -1,    -1,    17,    18,    19,    20,    -1,
-      22,    30,    31,    25,    -1,    34,    35,    36,    37,    -1,
-      -1,    40,    41,    42,    43,    44,    45,    46,    40,    41,
-      42,    43,    44,    45,    46,     1,    -1,    10,    11,    12,
-      13,    -1,     8,     9,    -1,    11,    12,    13,    -1,    -1,
-      -1,    17,    18,    19,    20,    -1,    22,    30,    31,    25,
-      -1,    34,    35,    36,    37,    -1,    -1,    40,    41,    42,
-      43,    44,    45,    46,    40,    41,    42,    43,    44,    45,
-      46,     1,    -1,    -1,    -1,    -1,    -1,    -1,     8,     9,
-      -1,    11,    12,    13,    -1,    -1,    -1,    17,    18,    19,
-      20,    -1,    22,    -1,    -1,    25,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      40,    41,    42,    43,    44,    45,    46,     1,    -1,    -1,
-      -1,    -1,    -1,    -1,     8,     9,    10,    11,    12,    13,
-      -1,    -1,    -1,    17,    18,    19,    20,    -1,    22,    -1,
-      -1,    25,    -1,    10,    11,    12,    13,    -1,    15,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    40,    41,    42,    43,
-      44,    -1,    46,    30,    31,    -1,    -1,    34,    35,    36,
-      37,    -1,    -1,    40,    41,    42,    43,    44,    -1,    46,
-      11,    12,    13,    -1,    -1,    -1,    -1,    18,    19,    20,
-      -1,    22,    -1,    -1,    25,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
-      41,    42,    43,    44,    45,    46,    11,    12,    13,    -1,
-      -1,    -1,    -1,    18,    19,    20,    -1,    22,    -1,    -1,
-      25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    40,    41,    42,    43,    44,
-      -1,    46
+      -1,    -1,    -1,    -1,    -1,   206,     1,   208,    -1,   210,
+      -1,   210,    -1,     8,     9,    -1,    11,    12,    13,    14,
+      -1,    -1,    -1,    18,    19,    20,    21,    22,     1,    24,
+      -1,    -1,    27,    -1,    -1,     8,     9,    10,    -1,    12,
+      13,    14,    -1,    -1,    -1,    18,    -1,    42,    43,    44,
+      45,    46,    47,    48,    -1,    -1,    -1,    -1,    -1,    32,
+      33,    -1,    -1,    36,    37,    38,    39,    -1,    -1,    42,
+      43,    44,    45,    46,    47,    48,     1,    -1,    10,    -1,
+      12,    13,    14,     8,     9,    -1,    -1,    12,    13,    14,
+      -1,    -1,    -1,    18,    19,    -1,    21,    22,    -1,    24,
+      32,    33,    27,    -1,    36,    37,    38,    39,    -1,    -1,
+      42,    43,    44,    45,    46,    47,    48,    42,    43,    44,
+      45,    46,    47,    48,     1,    -1,    10,    -1,    12,    13,
+      14,     8,     9,    -1,    -1,    12,    13,    14,    -1,    -1,
+      17,    18,    19,    -1,    21,    22,    -1,    24,    32,    33,
+      27,    -1,    36,    37,    38,    39,    -1,    -1,    42,    43,
+      44,    45,    46,    47,    48,    42,    43,    44,    45,    46,
+       1,    48,    -1,    -1,    -1,    -1,    -1,     8,     9,    10,
+      -1,    12,    13,    14,    -1,    -1,    -1,    18,    19,    -1,
+      21,    22,    -1,    24,    -1,    -1,    27,    -1,    -1,    -1,
+      -1,    10,    -1,    12,    13,    14,    15,    -1,    -1,    -1,
+      -1,    42,    43,    44,    45,    46,    25,    48,    -1,    -1,
+      -1,    30,    -1,    32,    33,    -1,    -1,    36,    37,    38,
+      39,    -1,    -1,    42,    43,    44,    45,    46,    47,    48,
+      10,    -1,    12,    13,    14,    -1,    -1,    -1,    -1,    12,
+      13,    14,    -1,    -1,    -1,    25,    19,    -1,    21,    22,
+      30,    24,    32,    33,    27,    -1,    36,    37,    38,    39,
+      -1,    -1,    42,    43,    44,    45,    46,    47,    48,    42,
+      43,    44,    45,    46,    47,    48,    12,    13,    14,    -1,
+      -1,    -1,    -1,    19,    -1,    21,    22,    -1,    24,    -1,
+      -1,    27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    42,    43,    44,    45,
+      46,    -1,    48
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    49,     0,     1,    10,    11,    12,    13,    23,    26,
-      28,    30,    31,    34,    35,    36,    37,    40,    41,    42,
-      43,    44,    45,    46,    50,    66,    91,    95,   104,   102,
-     103,    99,   100,    96,    97,    44,    51,     7,    41,    39,
-      92,    67,     9,    70,    69,    68,    52,    42,    45,    46,
-      58,    59,    61,    91,    95,   104,   101,     1,     8,     9,
-      11,    12,    13,    16,    17,    18,    19,    20,    22,    25,
-      42,    43,    46,    79,    81,    87,    90,    98,   104,     9,
-      53,    22,    24,    25,    27,    29,    40,    71,    72,    44,
-      44,     6,    45,    77,    79,    77,    77,     1,     8,     9,
-      17,    45,    76,    78,    81,    10,    18,    55,    57,    77,
-      62,    65,     9,    14,    64,    63,    60,    15,    30,    31,
-      34,    35,    36,    37,    42,    46,    94,    95,   104,    89,
-      88,    42,   104,    84,    17,    73,    82,    83,     8,    53,
-      53,    53,   104,     9,    73,     9,     9,     9,    17,    73,
-      10,    56,     9,    77,    77,    59,    77,    77,    10,    74,
-      79,     6,    39,     6,    99,    96,    27,    27,     1,     8,
-       9,    17,    45,    85,    86,    94,    45,    80,    81,    16,
-      85,    85,    72,    45,    80,     9,    45,    58,    75,    17,
-      73,    17,    46,   104,    46,   104,     8,    45,     9,     9,
-      14,    54,   102,    45,    93,    94,    14,    53
+       0,    51,     0,     1,    10,    11,    12,    13,    14,    25,
+      28,    30,    32,    33,    36,    37,    38,    39,    42,    43,
+      44,    45,    46,    47,    48,    52,    56,    57,    73,    98,
+     102,   114,   105,    55,   104,   103,    46,    53,     7,    43,
+      41,    99,    74,     9,    77,     9,    58,    58,    76,    75,
+      54,   112,   113,    44,    47,    48,    56,    57,    63,    64,
+      66,    68,    98,   102,   114,   109,   110,   106,   107,    24,
+      26,    27,    29,    31,    42,    78,    79,    46,    46,     6,
+       1,     8,     9,    12,    13,    14,    18,    19,    21,    22,
+      24,    27,    44,    45,    47,    48,    84,    86,    88,    94,
+      97,   114,    84,    84,     1,     8,     9,    18,    47,    83,
+      85,    88,    11,    20,    60,    62,    84,    65,    66,    69,
+      72,     9,    15,    59,    71,    70,    67,   111,    17,    86,
+     108,     8,    58,   114,    96,    95,    44,   114,    91,     9,
+      18,    80,    89,    90,     9,     9,     9,    18,    80,     1,
+      11,    61,     9,     9,    15,    84,    84,    15,    64,    58,
+      84,    84,    10,    81,    86,    16,    32,    33,    36,    37,
+      38,    39,    44,    48,   101,   102,   114,    80,    79,   109,
+     106,    29,    29,     1,     8,     9,    18,    47,    92,    93,
+     101,    47,    87,    88,    47,    92,    92,    87,     9,    47,
+      63,    66,    82,    18,    80,    18,     6,    41,     6,    17,
+       8,    47,     9,    59,   112,    48,   114,    48,   114,    47,
+     100,   101,    58
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -947,9 +970,18 @@ static const yytype_uint8 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -1006,7 +1038,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -1757,518 +1789,572 @@ yyreduce:
     {
         case 4:
 
-/* Line 1455 of yacc.c  */
-#line 154 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 157 "./turtle_p.y"
     { ttlp_arg->ttlp_special_qnames = ~0; }
     break;
 
-  case 6:
+  case 8:
+
+/* Line 1464 of yacc.c  */
+#line 160 "./turtle_p.y"
+    { dk_free_tree (ttlp_arg->ttlp_subj_uri);
+		ttlp_arg->ttlp_subj_uri = ttlp_arg->ttlp_last_complete_uri;
+		ttlp_arg->ttlp_last_complete_uri = NULL; }
+    break;
+
+  case 11:
+
+/* Line 1464 of yacc.c  */
+#line 165 "./turtle_p.y"
+    {
+		triple_feed_t *tf = ttlp_arg->ttlp_tf;
+		ttlp_enter_trig_group (ttlp_arg);
+		TF_CHANGE_GRAPH_TO_DEFAULT (tf); }
+    break;
+
+  case 12:
+
+/* Line 1464 of yacc.c  */
+#line 169 "./turtle_p.y"
+    {
+		ttlp_leave_trig_group (ttlp_arg); }
+    break;
+
+  case 13:
+
+/* Line 1464 of yacc.c  */
+#line 171 "./turtle_p.y"
+    { ttlyyerror_action ("Only a triple or a special clause (like prefix declaration) is allowed here"); }
+    break;
+
+  case 14:
 
-/* Line 1455 of yacc.c  */
-#line 155 "./turtle_p.y"
-    { dk_free_box (ttlp_arg->ttlp_tf->tf_base_uri); ttlp_arg->ttlp_tf->tf_base_uri = (yyvsp[(2) - (3)].box); }
+/* Line 1464 of yacc.c  */
+#line 175 "./turtle_p.y"
+    {
+		  if (ttlp_arg->ttlp_base_uri != ttlp_arg->ttlp_base_uri_saved)
+		    dk_free_box (ttlp_arg->ttlp_base_uri);
+		  ttlp_arg->ttlp_base_uri = (yyvsp[(2) - (2)].box);
+		  TF_CHANGE_BASE_AND_DEFAULT_GRAPH(ttlp_arg->ttlp_tf, box_copy ((yyvsp[(2) - (2)].box))); }
     break;
 
-  case 7:
+  case 15:
 
-/* Line 1455 of yacc.c  */
-#line 156 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 183 "./turtle_p.y"
     {
+		id_hash_t **local_hash_ptr = (ttlp_arg->ttlp_in_trig_graph ?
+		  &(ttlp_arg->ttlp_inner_namespaces_prefix2iri) :
+		  &(ttlp_arg->ttlp_namespaces_prefix2iri) );
 		caddr_t *old_uri_ptr;
-		if (NULL != ttlp_arg->ttlp_namespaces_prefix2iri)
-		  old_uri_ptr = (caddr_t *)id_hash_get (ttlp_arg->ttlp_namespaces_prefix2iri, &((yyvsp[(2) - (4)].box)));
+		if (NULL != local_hash_ptr[0])
+		  old_uri_ptr = (caddr_t *)id_hash_get (local_hash_ptr[0], (caddr_t)(&((yyvsp[(2) - (3)].box))));
 		else
 		  {
-		    ttlp_arg->ttlp_namespaces_prefix2iri = (id_hash_t *)box_dv_dict_hashtable (31);
+		    local_hash_ptr[0] = (id_hash_t *)box_dv_dict_hashtable (31);
 		    old_uri_ptr = NULL;
 		  }
 		if (NULL != old_uri_ptr)
 		  {
-		    int err = strcmp (old_uri_ptr[0], (yyvsp[(3) - (4)].box));
-		    dk_free_box ((yyvsp[(2) - (4)].box));
-		    dk_free_box ((yyvsp[(3) - (4)].box));
+		    int err = strcmp (old_uri_ptr[0], (yyvsp[(3) - (3)].box));
+		    dk_free_box ((yyvsp[(2) - (3)].box));
+		    dk_free_box ((yyvsp[(3) - (3)].box));
 		    if (err)
 		      ttlyyerror_action ("Namespace prefix is re-used for a different namespace IRI");
 		  }
 		else
-		  id_hash_set (ttlp_arg->ttlp_namespaces_prefix2iri, &((yyvsp[(2) - (4)].box)), &((yyvsp[(3) - (4)].box))); }
+		  id_hash_set (local_hash_ptr[0], (caddr_t)(&((yyvsp[(2) - (3)].box))), (caddr_t)(&((yyvsp[(3) - (3)].box)))); }
     break;
 
-  case 8:
+  case 16:
 
-/* Line 1455 of yacc.c  */
-#line 175 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 205 "./turtle_p.y"
     {
-		dk_free_box (ttlp_arg->ttlp_default_ns_uri);
-		ttlp_arg->ttlp_default_ns_uri = (yyvsp[(3) - (4)].box); }
-    break;
-
-  case 9:
-
-/* Line 1455 of yacc.c  */
-#line 178 "./turtle_p.y"
-    { dk_free_tree (ttlp_arg->ttlp_subj_uri);
-		ttlp_arg->ttlp_subj_uri = ttlp_arg->ttlp_last_complete_uri;
-		ttlp_arg->ttlp_last_complete_uri = NULL; }
-    break;
-
-  case 12:
-
-/* Line 1455 of yacc.c  */
-#line 183 "./turtle_p.y"
-    { ttlyyerror_action ("Only a triple or a special clause (like prefix declaration) is allowed here"); }
+		if (ttlp_arg->ttlp_default_ns_uri != ttlp_arg->ttlp_default_ns_uri_saved)
+		  dk_free_box (ttlp_arg->ttlp_default_ns_uri);
+		ttlp_arg->ttlp_default_ns_uri = (yyvsp[(3) - (3)].box); }
     break;
 
-  case 18:
+  case 22:
 
-/* Line 1455 of yacc.c  */
-#line 198 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 224 "./turtle_p.y"
     {
 		triple_feed_t *tf = ttlp_arg->ttlp_tf;
 		TTLYYERROR_ACTION_COND (TTLP_ALLOW_TRIG, "Left curly brace can appear here only if the source text is TriG");
-                TF_CHANGE_GRAPH (tf, ttlp_arg->ttlp_subj_uri); }
+		ttlp_enter_trig_group (ttlp_arg);
+		TF_CHANGE_GRAPH (tf, ttlp_arg->ttlp_subj_uri); }
     break;
 
-  case 19:
+  case 23:
 
-/* Line 1455 of yacc.c  */
-#line 202 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 229 "./turtle_p.y"
     {
 		triple_feed_t *tf = ttlp_arg->ttlp_tf;
+		ttlp_leave_trig_group (ttlp_arg);
 		TF_CHANGE_GRAPH_TO_DEFAULT (tf); }
     break;
 
-  case 24:
+  case 26:
 
-/* Line 1455 of yacc.c  */
-#line 218 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 238 "./turtle_p.y"
+    { ttlyyerror_action ("No '{' after an equality sign in TriG"); }
+    break;
+
+  case 34:
+
+/* Line 1464 of yacc.c  */
+#line 258 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = ttlp_arg->ttlp_last_complete_uri;
 		ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
-  case 27:
+  case 37:
 
-/* Line 1455 of yacc.c  */
-#line 226 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 266 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 29:
+  case 39:
 
-/* Line 1455 of yacc.c  */
-#line 229 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 269 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 31:
+  case 41:
 
-/* Line 1455 of yacc.c  */
-#line 232 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 272 "./turtle_p.y"
     {
 		TTLYYERROR_ACTION_COND (TTLP_SKIP_LITERAL_SUBJECTS, "Virtuoso does not support literal subjects");
 		dk_free_tree (ttlp_arg->ttlp_subj_uri); ttlp_arg->ttlp_subj_uri = NULL; }
     break;
 
-  case 33:
+  case 43:
 
-/* Line 1455 of yacc.c  */
-#line 236 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 276 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = NULL; }
     break;
 
-  case 36:
+  case 46:
 
-/* Line 1455 of yacc.c  */
-#line 243 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 283 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 38:
+  case 48:
 
-/* Line 1455 of yacc.c  */
-#line 246 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 286 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 40:
+  case 50:
 
-/* Line 1455 of yacc.c  */
-#line 249 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 289 "./turtle_p.y"
     {
 		TTLYYERROR_ACTION_COND (TTLP_SKIP_LITERAL_SUBJECTS, "Virtuoso does not support literal subjects");
 		dk_free_tree (ttlp_arg->ttlp_subj_uri); ttlp_arg->ttlp_subj_uri = NULL; }
     break;
 
-  case 42:
+  case 52:
 
-/* Line 1455 of yacc.c  */
-#line 253 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 293 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = NULL; }
     break;
 
-  case 45:
+  case 55:
 
-/* Line 1455 of yacc.c  */
-#line 260 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 300 "./turtle_p.y"
     { ttlp_arg->ttlp_special_qnames &= ~((yyvsp[(1) - (1)].token_type)); }
     break;
 
-  case 46:
+  case 56:
 
-/* Line 1455 of yacc.c  */
-#line 261 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 301 "./turtle_p.y"
     { ttlp_arg->ttlp_special_qnames &= ~((yyvsp[(3) - (3)].token_type)); }
     break;
 
-  case 47:
+  case 57:
 
-/* Line 1455 of yacc.c  */
-#line 265 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 305 "./turtle_p.y"
     { (yyval.token_type) = ttlp_bit_of_special_qname ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 48:
+  case 58:
 
-/* Line 1455 of yacc.c  */
-#line 266 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 306 "./turtle_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_A; }
     break;
 
-  case 49:
+  case 59:
 
-/* Line 1455 of yacc.c  */
-#line 267 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 307 "./turtle_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_HAS; }
     break;
 
-  case 50:
+  case 60:
 
-/* Line 1455 of yacc.c  */
-#line 268 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 308 "./turtle_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_IS; }
     break;
 
-  case 51:
+  case 61:
 
-/* Line 1455 of yacc.c  */
-#line 269 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 309 "./turtle_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_OF; }
     break;
 
-  case 52:
+  case 62:
 
-/* Line 1455 of yacc.c  */
-#line 270 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 310 "./turtle_p.y"
     { (yyval.token_type) = TTLP_ALLOW_QNAME_THIS; }
     break;
 
-  case 56:
+  case 66:
 
-/* Line 1455 of yacc.c  */
-#line 281 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 321 "./turtle_p.y"
     {
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Sequence blank node (written as '{...}' formula) can not be used as a predicate"); }
     break;
 
-  case 60:
+  case 70:
 
-/* Line 1455 of yacc.c  */
-#line 289 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 329 "./turtle_p.y"
     { TTLYYERROR_ACTION_COND (TTLP_ACCEPT_DIRTY_SYNTAX, "Missing predicate and object between top-level blank node subject and a dot"); }
     break;
 
-  case 67:
+  case 77:
 
-/* Line 1455 of yacc.c  */
-#line 302 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 342 "./turtle_p.y"
     { ttlyyerror_action ("Missing object between top-level blank node and a comma"); }
     break;
 
-  case 68:
+  case 78:
 
-/* Line 1455 of yacc.c  */
-#line 303 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 343 "./turtle_p.y"
     { ttlyyerror_action ("Missing predicate and object between top-level blank node and a semicolon"); }
     break;
 
-  case 69:
+  case 79:
 
-/* Line 1455 of yacc.c  */
-#line 304 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 344 "./turtle_p.y"
     { ttlyyerror_action ("Predicate expected after top-level blank node"); }
     break;
 
-  case 72:
+  case 82:
 
-/* Line 1455 of yacc.c  */
-#line 310 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 350 "./turtle_p.y"
     { ttlyyerror_action ("Missing object before comma"); }
     break;
 
-  case 73:
+  case 83:
 
-/* Line 1455 of yacc.c  */
-#line 311 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 351 "./turtle_p.y"
     { ttlyyerror_action ("Missing predicate and object before semicolon"); }
     break;
 
-  case 74:
+  case 84:
 
-/* Line 1455 of yacc.c  */
-#line 312 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 352 "./turtle_p.y"
     { ttlyyerror_action ("Missing predicate and object before dot"); }
     break;
 
-  case 75:
+  case 85:
 
-/* Line 1455 of yacc.c  */
-#line 313 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 353 "./turtle_p.y"
     { ttlyyerror_action ("Predicate expected"); }
     break;
 
-  case 79:
+  case 89:
 
-/* Line 1455 of yacc.c  */
-#line 324 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 364 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 81:
+  case 91:
 
-/* Line 1455 of yacc.c  */
-#line 327 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 367 "./turtle_p.y"
     { dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = (yyvsp[(1) - (1)].box);
 		  ttlp_arg->ttlp_pred_is_reverse = 1; }
     break;
 
-  case 82:
+  case 92:
 
-/* Line 1455 of yacc.c  */
-#line 329 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 369 "./turtle_p.y"
     { ttlp_arg->ttlp_pred_is_reverse = 0; }
     break;
 
-  case 83:
+  case 93:
 
-/* Line 1455 of yacc.c  */
-#line 330 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 370 "./turtle_p.y"
     {
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_uri = NULL; }
     break;
 
-  case 87:
+  case 97:
 
-/* Line 1455 of yacc.c  */
-#line 342 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 382 "./turtle_p.y"
     {; /* triple is made by object */ }
     break;
 
-  case 88:
+  case 98:
 
-/* Line 1455 of yacc.c  */
-#line 343 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 383 "./turtle_p.y"
     {; /* triple is made by object */ }
     break;
 
-  case 89:
+  case 99:
 
-/* Line 1455 of yacc.c  */
-#line 344 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 384 "./turtle_p.y"
     { ttlyyerror_action ("Missing object before comma"); }
     break;
 
-  case 90:
+  case 100:
 
-/* Line 1455 of yacc.c  */
-#line 345 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 385 "./turtle_p.y"
     { ttlyyerror_action ("Missing object before semicolon"); }
     break;
 
-  case 91:
+  case 101:
 
-/* Line 1455 of yacc.c  */
-#line 346 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 386 "./turtle_p.y"
     { ttlyyerror_action ("Missing object before dot"); }
     break;
 
-  case 92:
+  case 102:
 
-/* Line 1455 of yacc.c  */
-#line 347 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 387 "./turtle_p.y"
     { ttlyyerror_action ("Object expected"); }
     break;
 
-  case 93:
+  case 103:
 
-/* Line 1455 of yacc.c  */
-#line 351 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 391 "./turtle_p.y"
     { (yyval.box) = ttlp_arg->ttlp_last_complete_uri; ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
-  case 94:
+  case 104:
 
-/* Line 1455 of yacc.c  */
-#line 352 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 392 "./turtle_p.y"
     { (yyval.box) = (yyvsp[(1) - (1)].box); }
     break;
 
-  case 95:
+  case 105:
 
-/* Line 1455 of yacc.c  */
-#line 353 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 393 "./turtle_p.y"
     { (yyval.box) = uname_rdf_ns_uri_type; }
     break;
 
-  case 96:
+  case 106:
 
-/* Line 1455 of yacc.c  */
-#line 354 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 394 "./turtle_p.y"
     { (yyval.box) = box_dv_uname_string ("http://www.w3.org/2002/07/owl#sameAs"); }
     break;
 
-  case 97:
+  case 107:
 
-/* Line 1455 of yacc.c  */
-#line 355 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 395 "./turtle_p.y"
     { (yyval.box) = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); }
     break;
 
-  case 98:
+  case 108:
 
-/* Line 1455 of yacc.c  */
-#line 357 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 397 "./turtle_p.y"
     {
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[]') can not be used as a predicate");
-		  (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL); }
+		  (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), ttlp_arg->ttlp_lexlineno, NULL);
+		}
     break;
 
-  case 99:
+  case 109:
 
-/* Line 1455 of yacc.c  */
-#line 361 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 404 "./turtle_p.y"
     {
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '_:...' label) can not be used as a predicate");
-                  if (ttlp_arg->ttlp_formula_iid)
+		  if (ttlp_arg->ttlp_formula_iid)
 		    (yyval.box) = tf_formula_bnode_iid (ttlp_arg, (yyvsp[(1) - (1)].box));
-                  else
+		  else
 		    (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, (yyvsp[(1) - (1)].box));
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), ttlp_arg->ttlp_lexlineno, (yyvsp[(1) - (1)].box));
 		}
     break;
 
-  case 100:
+  case 110:
 
-/* Line 1455 of yacc.c  */
-#line 369 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 414 "./turtle_p.y"
     {
-		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[...]' block) can not be used as a predicate"); }
+		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[...]' block) can not be used as a predicate");
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    (yyval.lexlineno) = ttlp_arg->ttlp_lexlineno;
+		}
     break;
 
-  case 101:
+  case 111:
 
-/* Line 1455 of yacc.c  */
-#line 371 "./turtle_p.y"
-    { (yyval.box) = (yyvsp[(3) - (3)].box); }
+/* Line 1464 of yacc.c  */
+#line 420 "./turtle_p.y"
+    {
+		  (yyval.box) = (yyvsp[(3) - (3)].box);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), (yyvsp[(2) - (3)].lexlineno), NULL);
+		}
     break;
 
-  case 102:
+  case 112:
 
-/* Line 1455 of yacc.c  */
-#line 373 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 426 "./turtle_p.y"
     {
-		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Sequence blank node (written as list in parenthesis) can not be used as a predicate"); }
+		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Sequence blank node (written as list in parenthesis) can not be used as a predicate");
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    (yyval.lexlineno) = ttlp_arg->ttlp_lexlineno;
+		}
     break;
 
-  case 103:
+  case 113:
 
-/* Line 1455 of yacc.c  */
-#line 375 "./turtle_p.y"
-    { (yyval.box) = (yyvsp[(3) - (3)].box); }
+/* Line 1464 of yacc.c  */
+#line 432 "./turtle_p.y"
+    {
+		  (yyval.box) = (yyvsp[(3) - (3)].box);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), (yyvsp[(2) - (3)].lexlineno), NULL);
+		}
     break;
 
-  case 104:
+  case 114:
 
-/* Line 1455 of yacc.c  */
-#line 379 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 440 "./turtle_p.y"
     { (yyval.box) = ttlp_arg->ttlp_last_complete_uri; ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
-  case 105:
+  case 115:
 
-/* Line 1455 of yacc.c  */
-#line 380 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 441 "./turtle_p.y"
     { (yyval.box) = (yyvsp[(2) - (3)].box); }
     break;
 
-  case 106:
+  case 116:
 
-/* Line 1455 of yacc.c  */
-#line 381 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 442 "./turtle_p.y"
     { (yyval.box) = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); /* Note this 'double reversed' meaning :) */ }
     break;
 
-  case 109:
+  case 119:
 
-/* Line 1455 of yacc.c  */
-#line 387 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 448 "./turtle_p.y"
     { dk_free_tree ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 110:
+  case 120:
 
-/* Line 1455 of yacc.c  */
-#line 388 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 449 "./turtle_p.y"
     { dk_free_tree ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 111:
+  case 121:
 
-/* Line 1455 of yacc.c  */
-#line 389 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 450 "./turtle_p.y"
     { dk_free_tree ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 112:
+  case 122:
 
-/* Line 1455 of yacc.c  */
-#line 390 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 451 "./turtle_p.y"
     { dk_free_tree ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 113:
+  case 123:
 
-/* Line 1455 of yacc.c  */
-#line 391 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 452 "./turtle_p.y"
     { dk_free_tree ((yyvsp[(1) - (2)].box)); dk_free_tree ((yyvsp[(2) - (2)].box)); }
     break;
 
-  case 114:
+  case 124:
 
-/* Line 1455 of yacc.c  */
-#line 392 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 453 "./turtle_p.y"
     { dk_free_tree ((yyvsp[(1) - (1)].box)); }
     break;
 
-  case 115:
+  case 125:
 
-/* Line 1455 of yacc.c  */
-#line 392 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 453 "./turtle_p.y"
     {
 			dk_free_tree (ttlp_arg->ttlp_last_complete_uri);
 			ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
-  case 118:
+  case 128:
 
-/* Line 1455 of yacc.c  */
-#line 403 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 464 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = ttlp_arg->ttlp_last_complete_uri;
@@ -2276,86 +2362,86 @@ yyreduce:
 		ttlp_triple_and_inf (ttlp_arg, ttlp_arg->ttlp_obj); }
     break;
 
-  case 119:
+  case 129:
 
-/* Line 1455 of yacc.c  */
-#line 408 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 469 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box);
 		ttlp_triple_and_inf (ttlp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 120:
+  case 130:
 
-/* Line 1455 of yacc.c  */
-#line 412 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 473 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box);
 		ttlp_triple_and_inf (ttlp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
-  case 121:
+  case 131:
 
-/* Line 1455 of yacc.c  */
-#line 416 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 477 "./turtle_p.y"
     {
 		ttlp_triple_l_and_inf (ttlp_arg, (caddr_t)((ptrlong)1), uname_xmlschema_ns_uri_hash_boolean, NULL); }
     break;
 
-  case 122:
+  case 132:
 
-/* Line 1455 of yacc.c  */
-#line 418 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 479 "./turtle_p.y"
     {
 		ttlp_triple_l_and_inf (ttlp_arg, (caddr_t)((ptrlong)0), uname_xmlschema_ns_uri_hash_boolean, NULL); }
     break;
 
-  case 123:
+  case 133:
 
-/* Line 1455 of yacc.c  */
-#line 420 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 481 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box);
 		ttlp_triple_l_and_inf (ttlp_arg, (yyvsp[(1) - (1)].box), uname_xmlschema_ns_uri_hash_integer, NULL); }
     break;
 
-  case 124:
+  case 134:
 
-/* Line 1455 of yacc.c  */
-#line 424 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 485 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box);
 		ttlp_triple_l_and_inf (ttlp_arg, (yyvsp[(1) - (1)].box), uname_xmlschema_ns_uri_hash_decimal, NULL); }
     break;
 
-  case 125:
+  case 135:
 
-/* Line 1455 of yacc.c  */
-#line 428 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 489 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box);
 		ttlp_triple_l_and_inf (ttlp_arg, (yyvsp[(1) - (1)].box), uname_xmlschema_ns_uri_hash_double, NULL);	}
     break;
 
-  case 126:
+  case 136:
 
-/* Line 1455 of yacc.c  */
-#line 432 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 493 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (1)].box);
 		ttlp_triple_l_and_inf (ttlp_arg, (yyvsp[(1) - (1)].box), NULL, NULL); }
     break;
 
-  case 127:
+  case 137:
 
-/* Line 1455 of yacc.c  */
-#line 436 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 497 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (2)].box);
@@ -2364,10 +2450,10 @@ yyreduce:
 		ttlp_triple_l_and_inf (ttlp_arg, (yyvsp[(1) - (2)].box), NULL, (yyvsp[(2) - (2)].box));	}
     break;
 
-  case 128:
+  case 138:
 
-/* Line 1455 of yacc.c  */
-#line 442 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 503 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (3)].box);
@@ -2377,123 +2463,171 @@ yyreduce:
 		ttlp_triple_l_and_inf (ttlp_arg, ttlp_arg->ttlp_obj, ttlp_arg->ttlp_obj_type, NULL);	}
     break;
 
-  case 129:
+  case 139:
 
-/* Line 1455 of yacc.c  */
-#line 449 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 510 "./turtle_p.y"
     { }
     break;
 
-  case 130:
+  case 140:
 
-/* Line 1455 of yacc.c  */
-#line 450 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 511 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = (yyvsp[(1) - (3)].box); }
     break;
 
-  case 131:
+  case 141:
 
-/* Line 1455 of yacc.c  */
-#line 453 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 514 "./turtle_p.y"
     {
 		dk_free_tree (ttlp_arg->ttlp_last_complete_uri);
 		ttlp_arg->ttlp_last_complete_uri = NULL; }
     break;
 
-  case 132:
+  case 142:
 
-/* Line 1455 of yacc.c  */
-#line 456 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 517 "./turtle_p.y"
     { }
     break;
 
-  case 133:
+  case 143:
 
-/* Line 1455 of yacc.c  */
-#line 461 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 522 "./turtle_p.y"
     {
-                  if (ttlp_arg->ttlp_formula_iid)
+		  if (ttlp_arg->ttlp_formula_iid)
 		    (yyval.box) = tf_formula_bnode_iid (ttlp_arg, (yyvsp[(1) - (1)].box));
-                  else
+		  else
 		    (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, (yyvsp[(1) - (1)].box));
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), ttlp_arg->ttlp_lexlineno, (yyvsp[(1) - (1)].box));
 		}
     break;
 
-  case 134:
+  case 144:
 
-/* Line 1455 of yacc.c  */
-#line 467 "./turtle_p.y"
-    { (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL); }
+/* Line 1464 of yacc.c  */
+#line 531 "./turtle_p.y"
+    {
+		  (yyval.box) = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), ttlp_arg->ttlp_lexlineno, NULL);
+		}
     break;
 
-  case 135:
+  case 145:
 
-/* Line 1455 of yacc.c  */
-#line 468 "./turtle_p.y"
-    { (yyval.box) = (yyvsp[(2) - (2)].box); }
+/* Line 1464 of yacc.c  */
+#line 537 "./turtle_p.y"
+    {
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    (yyval.lexlineno) = ttlp_arg->ttlp_lexlineno;
+		}
     break;
 
-  case 136:
+  case 146:
 
-/* Line 1455 of yacc.c  */
-#line 469 "./turtle_p.y"
-    { (yyval.box) = (yyvsp[(2) - (2)].box); }
+/* Line 1464 of yacc.c  */
+#line 542 "./turtle_p.y"
+    {
+		  (yyval.box) = (yyvsp[(3) - (3)].box);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), (yyvsp[(2) - (3)].lexlineno), NULL);
+		}
     break;
 
-  case 137:
+  case 147:
 
-/* Line 1455 of yacc.c  */
-#line 470 "./turtle_p.y"
-    { (yyval.box) = (yyvsp[(2) - (2)].box); }
+/* Line 1464 of yacc.c  */
+#line 548 "./turtle_p.y"
+    {
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    (yyval.lexlineno) = ttlp_arg->ttlp_lexlineno;
+		}
     break;
 
-  case 138:
+  case 148:
+
+/* Line 1464 of yacc.c  */
+#line 553 "./turtle_p.y"
+    {
+		  (yyval.box) = (yyvsp[(3) - (3)].box);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), (yyvsp[(2) - (3)].lexlineno), NULL);
+		}
+    break;
+
+  case 149:
+
+/* Line 1464 of yacc.c  */
+#line 559 "./turtle_p.y"
+    {
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    (yyval.lexlineno) = ttlp_arg->ttlp_lexlineno;
+		}
+    break;
+
+  case 150:
+
+/* Line 1464 of yacc.c  */
+#line 564 "./turtle_p.y"
+    {
+		  (yyval.box) = (yyvsp[(3) - (3)].box);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, (yyval.box), (yyvsp[(2) - (3)].lexlineno), NULL);
+		}
+    break;
 
-/* Line 1455 of yacc.c  */
-#line 475 "./turtle_p.y"
+  case 151:
+
+/* Line 1464 of yacc.c  */
+#line 573 "./turtle_p.y"
     { dk_set_push (&(ttlp_arg->ttlp_saved_uris), (void *)(ptrlong)ttlp_arg->ttlp_pred_is_reverse);
-                  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_subj_uri);
+		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_subj_uri);
 		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_is_reverse = 0;
 		  ttlp_arg->ttlp_subj_uri = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL);
 		  ttlp_arg->ttlp_pred_uri = NULL; }
     break;
 
-  case 139:
+  case 152:
 
-/* Line 1455 of yacc.c  */
-#line 481 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 579 "./turtle_p.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
-  case 140:
+  case 153:
 
-/* Line 1455 of yacc.c  */
-#line 486 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 584 "./turtle_p.y"
     { (yyval.box) = ttlp_arg->ttlp_subj_uri;
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
 		  ttlp_arg->ttlp_subj_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
-                  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
+		  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
     break;
 
-  case 141:
+  case 154:
 
-/* Line 1455 of yacc.c  */
-#line 492 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 590 "./turtle_p.y"
     { (yyval.box) = ttlp_arg->ttlp_subj_uri;
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
 		  ttlp_arg->ttlp_subj_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
-                  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
+		  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
     break;
 
-  case 142:
+  case 155:
 
-/* Line 1455 of yacc.c  */
-#line 500 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 598 "./turtle_p.y"
     {
 		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), (void *)(ptrlong)(ttlp_arg->ttlp_pred_is_reverse));
 		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_subj_uri);
@@ -2508,10 +2642,10 @@ yyreduce:
 		  ttlp_arg->ttlp_pred_uri = uname_rdf_ns_uri_first; }
     break;
 
-  case 143:
+  case 156:
 
-/* Line 1455 of yacc.c  */
-#line 512 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 610 "./turtle_p.y"
     {
 		  caddr_t first_node;
 		  dk_set_push (&(ttlp_arg->ttlp_unused_seq_bnodes), ttlp_arg->ttlp_subj_uri);
@@ -2533,17 +2667,17 @@ yyreduce:
 		  (yyval.box) = first_node; }
     break;
 
-  case 144:
+  case 157:
 
-/* Line 1455 of yacc.c  */
-#line 534 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 632 "./turtle_p.y"
     {}
     break;
 
-  case 145:
+  case 158:
 
-/* Line 1455 of yacc.c  */
-#line 535 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 633 "./turtle_p.y"
     {
 		  caddr_t last_node = ttlp_arg->ttlp_subj_uri;
 		  ttlp_arg->ttlp_subj_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
@@ -2561,10 +2695,10 @@ yyreduce:
 		  ttlp_arg->ttlp_pred_uri = uname_rdf_ns_uri_first; }
     break;
 
-  case 146:
+  case 159:
 
-/* Line 1455 of yacc.c  */
-#line 554 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 652 "./turtle_p.y"
     {
 		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_formula_iid);
 		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), (void *)(ptrlong)ttlp_arg->ttlp_pred_is_reverse);
@@ -2576,10 +2710,10 @@ yyreduce:
 		  ttlp_arg->ttlp_pred_uri = NULL; }
     break;
 
-  case 147:
+  case 160:
 
-/* Line 1455 of yacc.c  */
-#line 564 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 662 "./turtle_p.y"
     { (yyval.box) = ttlp_arg->ttlp_formula_iid;
 		  dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
@@ -2589,24 +2723,24 @@ yyreduce:
 		  ttlp_arg->ttlp_formula_iid = dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
     break;
 
-  case 148:
+  case 161:
 
-/* Line 1455 of yacc.c  */
-#line 575 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 673 "./turtle_p.y"
     {
-                  if (NULL != ttlp_arg->ttlp_last_complete_uri)
+		  if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
 		  ttlp_arg->ttlp_last_complete_uri = (yyvsp[(1) - (1)].box);
 		  TTLP_URI_RESOLVE_IF_NEEDED(ttlp_arg->ttlp_last_complete_uri);
 		 }
     break;
 
-  case 149:
+  case 162:
 
-/* Line 1455 of yacc.c  */
-#line 582 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 680 "./turtle_p.y"
     {
-                  if (NULL != ttlp_arg->ttlp_last_complete_uri)
+		  if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
 		  ttlp_arg->ttlp_last_complete_uri = (yyvsp[(1) - (1)].box);
 		  ttlp_arg->ttlp_last_complete_uri = ttlp_expand_qname_prefix (ttlp_arg, ttlp_arg->ttlp_last_complete_uri);
@@ -2614,12 +2748,12 @@ yyreduce:
 		}
     break;
 
-  case 150:
+  case 163:
 
-/* Line 1455 of yacc.c  */
-#line 590 "./turtle_p.y"
+/* Line 1464 of yacc.c  */
+#line 688 "./turtle_p.y"
     {
-                  if (NULL != ttlp_arg->ttlp_last_complete_uri)
+		  if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
 		  ttlp_arg->ttlp_last_complete_uri = (yyvsp[(1) - (1)].box);
 		  ttlp_arg->ttlp_last_complete_uri = ttlp_expand_qname_prefix (ttlp_arg, ttlp_arg->ttlp_last_complete_uri);
@@ -2629,8 +2763,8 @@ yyreduce:
 
 
 
-/* Line 1455 of yacc.c  */
-#line 2634 "turtle_p.c"
+/* Line 1464 of yacc.c  */
+#line 2768 "turtle_p.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/libsrc/Wi/turtle_p.h b/libsrc/Wi/turtle_p.h
index 3665ac3..fb0252a 100644
--- a/libsrc/Wi/turtle_p.h
+++ b/libsrc/Wi/turtle_p.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -47,43 +46,45 @@
      _COMMA = 263,
      _DOT_WS = 264,
      _LBRA = 265,
-     _LPAR = 266,
-     _LSQBRA = 267,
-     _LSQBRA_RSQBRA = 268,
-     _RBRA = 269,
-     _RPAR = 270,
-     _RSQBRA = 271,
-     _SEMI = 272,
-     _EQ = 273,
-     _EQ_GT = 274,
-     _LT_EQ = 275,
-     _BANG = 276,
-     _AT_a_L = 277,
-     _AT_base_L = 278,
-     _AT_has_L = 279,
-     _AT_is_L = 280,
-     _AT_keywords_L = 281,
-     _AT_of_L = 282,
-     _AT_prefix_L = 283,
-     _AT_this_L = 284,
-     false_L = 285,
-     true_L = 286,
-     __TTL_PUNCT_END = 287,
-     __TTL_NONPUNCT_START = 288,
-     TURTLE_INTEGER = 289,
-     TURTLE_DECIMAL = 290,
-     TURTLE_DOUBLE = 291,
-     TURTLE_STRING = 292,
-     KEYWORD = 293,
-     LANGTAG = 294,
-     QNAME = 295,
-     QNAME_NS = 296,
-     VARIABLE = 297,
-     BLANK_NODE_LABEL = 298,
-     Q_IRI_REF = 299,
-     _GARBAGE_BEFORE_DOT_WS = 300,
-     TTL_RECOVERABLE_ERROR = 301,
-     __TTL_NONPUNCT_END = 302
+     _LBRA_TOP_TRIG = 266,
+     _LPAR = 267,
+     _LSQBRA = 268,
+     _LSQBRA_RSQBRA = 269,
+     _RBRA = 270,
+     _RPAR = 271,
+     _RSQBRA = 272,
+     _SEMI = 273,
+     _EQ = 274,
+     _EQ_TOP_TRIG = 275,
+     _EQ_GT = 276,
+     _LT_EQ = 277,
+     _BANG = 278,
+     _AT_a_L = 279,
+     _AT_base_L = 280,
+     _AT_has_L = 281,
+     _AT_is_L = 282,
+     _AT_keywords_L = 283,
+     _AT_of_L = 284,
+     _AT_prefix_L = 285,
+     _AT_this_L = 286,
+     false_L = 287,
+     true_L = 288,
+     __TTL_PUNCT_END = 289,
+     __TTL_NONPUNCT_START = 290,
+     TURTLE_INTEGER = 291,
+     TURTLE_DECIMAL = 292,
+     TURTLE_DOUBLE = 293,
+     TURTLE_STRING = 294,
+     KEYWORD = 295,
+     LANGTAG = 296,
+     QNAME = 297,
+     QNAME_NS = 298,
+     VARIABLE = 299,
+     BLANK_NODE_LABEL = 300,
+     Q_IRI_REF = 301,
+     _GARBAGE_BEFORE_DOT_WS = 302,
+     TTL_RECOVERABLE_ERROR = 303,
+     __TTL_NONPUNCT_END = 304
    };
 #endif
 /* Tokens.  */
@@ -95,43 +96,45 @@
 #define _COMMA 263
 #define _DOT_WS 264
 #define _LBRA 265
-#define _LPAR 266
-#define _LSQBRA 267
-#define _LSQBRA_RSQBRA 268
-#define _RBRA 269
-#define _RPAR 270
-#define _RSQBRA 271
-#define _SEMI 272
-#define _EQ 273
-#define _EQ_GT 274
-#define _LT_EQ 275
-#define _BANG 276
-#define _AT_a_L 277
-#define _AT_base_L 278
-#define _AT_has_L 279
-#define _AT_is_L 280
-#define _AT_keywords_L 281
-#define _AT_of_L 282
-#define _AT_prefix_L 283
-#define _AT_this_L 284
-#define false_L 285
-#define true_L 286
-#define __TTL_PUNCT_END 287
-#define __TTL_NONPUNCT_START 288
-#define TURTLE_INTEGER 289
-#define TURTLE_DECIMAL 290
-#define TURTLE_DOUBLE 291
-#define TURTLE_STRING 292
-#define KEYWORD 293
-#define LANGTAG 294
-#define QNAME 295
-#define QNAME_NS 296
-#define VARIABLE 297
-#define BLANK_NODE_LABEL 298
-#define Q_IRI_REF 299
-#define _GARBAGE_BEFORE_DOT_WS 300
-#define TTL_RECOVERABLE_ERROR 301
-#define __TTL_NONPUNCT_END 302
+#define _LBRA_TOP_TRIG 266
+#define _LPAR 267
+#define _LSQBRA 268
+#define _LSQBRA_RSQBRA 269
+#define _RBRA 270
+#define _RPAR 271
+#define _RSQBRA 272
+#define _SEMI 273
+#define _EQ 274
+#define _EQ_TOP_TRIG 275
+#define _EQ_GT 276
+#define _LT_EQ 277
+#define _BANG 278
+#define _AT_a_L 279
+#define _AT_base_L 280
+#define _AT_has_L 281
+#define _AT_is_L 282
+#define _AT_keywords_L 283
+#define _AT_of_L 284
+#define _AT_prefix_L 285
+#define _AT_this_L 286
+#define false_L 287
+#define true_L 288
+#define __TTL_PUNCT_END 289
+#define __TTL_NONPUNCT_START 290
+#define TURTLE_INTEGER 291
+#define TURTLE_DECIMAL 292
+#define TURTLE_DOUBLE 293
+#define TURTLE_STRING 294
+#define KEYWORD 295
+#define LANGTAG 296
+#define QNAME 297
+#define QNAME_NS 298
+#define VARIABLE 299
+#define BLANK_NODE_LABEL 300
+#define Q_IRI_REF 301
+#define _GARBAGE_BEFORE_DOT_WS 302
+#define TTL_RECOVERABLE_ERROR 303
+#define __TTL_NONPUNCT_END 304
 
 
 
@@ -140,17 +143,18 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
+/* Line 1685 of yacc.c  */
 #line 72 "./turtle_p.y"
 
   caddr_t box;
   ptrlong token_type;
   void *nothing;
+  ptrlong lexlineno;
 
 
 
-/* Line 1676 of yacc.c  */
-#line 154 "turtle_p.h"
+/* Line 1685 of yacc.c  */
+#line 158 "turtle_p.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/libsrc/Wi/turtle_p.y b/libsrc/Wi/turtle_p.y
index c550019..9a329d7 100644
--- a/libsrc/Wi/turtle_p.y
+++ b/libsrc/Wi/turtle_p.y
@@ -1,10 +1,10 @@
 /*
- *  $Id: turtle_p.y,v 1.17.2.8 2011/01/03 10:17:27 source Exp $
+ *  $Id: turtle_p.y,v 1.17.2.15 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -26,7 +26,7 @@
 %parse-param {yyscan_t yyscanner}
 %lex-param {ttlp_t * ttlp_arg}
 %lex-param {yyscan_t yyscanner}
-%expect 3
+%expect 2
 
 %{
 
@@ -73,6 +73,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
   caddr_t box;
   ptrlong token_type;
   void *nothing;
+  ptrlong lexlineno;
 }
 
 %token __TTL_PUNCT_BEGIN	/* Delimiting value for syntax highlighting */
@@ -84,6 +85,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 %token _COMMA		/*:: PUNCT_TTL_LAST(",") ::*/
 %token _DOT_WS		/*:: PUNCT("."), TTL, LAST(". "), LAST(".\n"), LAST(".") ::*/
 %token _LBRA		/*:: PUNCT_TTL_LAST("{") ::*/
+%token _LBRA_TOP_TRIG	/*:: PUNCT_TRIG_LAST("{") ::*/
 %token _LPAR		/*:: PUNCT_TTL_LAST("(") ::*/
 %token _LSQBRA		/*:: PUNCT_TTL_LAST("[") ::*/
 %token _LSQBRA_RSQBRA	/*:: PUNCT_TTL_LAST("[]") ::*/
@@ -92,6 +94,7 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 %token _RSQBRA		/*:: PUNCT_TTL_LAST("[ ]") ::*/
 %token _SEMI		/*:: PUNCT_TTL_LAST(";") ::*/
 %token _EQ		/*:: PUNCT_TTL_LAST("=") ::*/
+%token _EQ_TOP_TRIG	/*:: PUNCT_TRIG_LAST("=") ::*/
 %token _EQ_GT		/*:: PUNCT_TTL_LAST("=>") ::*/
 %token _LT_EQ		/*:: PUNCT_TTL_LAST("<=") ::*/
 %token _BANG		/*:: PUNCT_TTL_LAST("!") ::*/
@@ -146,20 +149,47 @@ extern int ttlyylex (void *yylval_param, ttlp_t *ttlp_arg, yyscan_t yyscanner);
 %%
 
 turtledoc
-        : /* empty */
+	: /* empty */
 	| turtledoc clause
 	;
 
 clause
-        : _AT_keywords_L { ttlp_arg->ttlp_special_qnames = ~0; } keyword_list dot_opt
-	| _AT_base_L Q_IRI_REF dot_opt { dk_free_box (ttlp_arg->ttlp_tf->tf_base_uri); ttlp_arg->ttlp_tf->tf_base_uri = $2; }
-        | _AT_prefix_L QNAME_NS Q_IRI_REF dot_opt {
+	: _AT_keywords_L { ttlp_arg->ttlp_special_qnames = ~0; } keyword_list dot_opt
+	| base_clause dot_opt
+	| prefix_clause dot_opt
+	| q_complete { dk_free_tree (ttlp_arg->ttlp_subj_uri);
+		ttlp_arg->ttlp_subj_uri = ttlp_arg->ttlp_last_complete_uri;
+		ttlp_arg->ttlp_last_complete_uri = NULL; }
+		trig_block_or_predicate_object_list
+	| top_triple_clause_with_nonq_subj
+	| _LBRA_TOP_TRIG {
+		triple_feed_t *tf = ttlp_arg->ttlp_tf;
+		ttlp_enter_trig_group (ttlp_arg);
+		TF_CHANGE_GRAPH_TO_DEFAULT (tf); }
+	    base_or_prefix_or_inner_triple_clauses trig_group_end dot_opt {
+		ttlp_leave_trig_group (ttlp_arg); }
+	| error { ttlyyerror_action ("Only a triple or a special clause (like prefix declaration) is allowed here"); }
+	;
+
+base_clause
+	: _AT_base_L Q_IRI_REF {
+		  if (ttlp_arg->ttlp_base_uri != ttlp_arg->ttlp_base_uri_saved)
+		    dk_free_box (ttlp_arg->ttlp_base_uri);
+		  ttlp_arg->ttlp_base_uri = $2;
+		  TF_CHANGE_BASE_AND_DEFAULT_GRAPH(ttlp_arg->ttlp_tf, box_copy ($2)); }
+	;
+
+prefix_clause
+	: _AT_prefix_L QNAME_NS Q_IRI_REF {
+		id_hash_t **local_hash_ptr = (ttlp_arg->ttlp_in_trig_graph ?
+		  &(ttlp_arg->ttlp_inner_namespaces_prefix2iri) :
+		  &(ttlp_arg->ttlp_namespaces_prefix2iri) );
 		caddr_t *old_uri_ptr;
-		if (NULL != ttlp_arg->ttlp_namespaces_prefix2iri)
-		  old_uri_ptr = (caddr_t *)id_hash_get (ttlp_arg->ttlp_namespaces_prefix2iri, &($2));
+		if (NULL != local_hash_ptr[0])
+		  old_uri_ptr = (caddr_t *)id_hash_get (local_hash_ptr[0], (caddr_t)(&($2)));
 		else
 		  {
-		    ttlp_arg->ttlp_namespaces_prefix2iri = (id_hash_t *)box_dv_dict_hashtable (31);
+		    local_hash_ptr[0] = (id_hash_t *)box_dv_dict_hashtable (31);
 		    old_uri_ptr = NULL;
 		  }
 		if (NULL != old_uri_ptr)
@@ -171,18 +201,14 @@ clause
 		      ttlyyerror_action ("Namespace prefix is re-used for a different namespace IRI");
 		  }
 		else
-		  id_hash_set (ttlp_arg->ttlp_namespaces_prefix2iri, &($2), &($3)); }
-	| _AT_prefix_L _COLON Q_IRI_REF dot_opt	{
-		dk_free_box (ttlp_arg->ttlp_default_ns_uri);
+		  id_hash_set (local_hash_ptr[0], (caddr_t)(&($2)), (caddr_t)(&($3))); }
+	| _AT_prefix_L _COLON Q_IRI_REF	{
+		if (ttlp_arg->ttlp_default_ns_uri != ttlp_arg->ttlp_default_ns_uri_saved)
+		  dk_free_box (ttlp_arg->ttlp_default_ns_uri);
 		ttlp_arg->ttlp_default_ns_uri = $3; }
-	| q_complete { dk_free_tree (ttlp_arg->ttlp_subj_uri);
-		ttlp_arg->ttlp_subj_uri = ttlp_arg->ttlp_last_complete_uri;
-		ttlp_arg->ttlp_last_complete_uri = NULL; }
-		trig_block_or_predicate_object_list
-	| top_triple_clause_with_nonq_subj
-        | error { ttlyyerror_action ("Only a triple or a special clause (like prefix declaration) is allowed here"); }
 	;
 
+
 dot_opt
 	: /* empty */
 	| _DOT_WS
@@ -198,15 +224,29 @@ trig_block_or_predicate_object_list
 	| opt_eq_lbra {
 		triple_feed_t *tf = ttlp_arg->ttlp_tf;
 		TTLYYERROR_ACTION_COND (TTLP_ALLOW_TRIG, "Left curly brace can appear here only if the source text is TriG");
-                TF_CHANGE_GRAPH (tf, ttlp_arg->ttlp_subj_uri); }
-	    inner_triple_clauses trig_group_end dot_opt {
+		ttlp_enter_trig_group (ttlp_arg);
+		TF_CHANGE_GRAPH (tf, ttlp_arg->ttlp_subj_uri); }
+	    base_or_prefix_or_inner_triple_clauses trig_group_end dot_opt {
 		triple_feed_t *tf = ttlp_arg->ttlp_tf;
+		ttlp_leave_trig_group (ttlp_arg);
 		TF_CHANGE_GRAPH_TO_DEFAULT (tf); }
 	;
 
 opt_eq_lbra
-	: _LBRA
-	| _EQ _LBRA
+	: _LBRA_TOP_TRIG
+	| _EQ_TOP_TRIG _LBRA_TOP_TRIG
+	| _EQ_TOP_TRIG error { ttlyyerror_action ("No '{' after an equality sign in TriG"); }
+	;
+
+base_or_prefix_or_inner_triple_clauses
+	: base_or_prefix_or_inner_triple_clause
+	| base_or_prefix_or_inner_triple_clauses _DOT_WS base_or_prefix_or_inner_triple_clause
+	;
+
+base_or_prefix_or_inner_triple_clause
+	: base_clause
+	| prefix_clause
+	| inner_triple_clause
 	;
 
 inner_triple_clauses
@@ -233,7 +273,7 @@ triple_clause_with_nonq_subj
 		TTLYYERROR_ACTION_COND (TTLP_SKIP_LITERAL_SUBJECTS, "Virtuoso does not support literal subjects");
 		dk_free_tree (ttlp_arg->ttlp_subj_uri); ttlp_arg->ttlp_subj_uri = NULL; }
 	    predicate_object_list_or_garbage
-        | TTL_RECOVERABLE_ERROR { dk_free_tree (ttlp_arg->ttlp_subj_uri);
+	| TTL_RECOVERABLE_ERROR { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = NULL; }
 	    predicate_object_list_or_garbage
 	| _GARBAGE_BEFORE_DOT_WS
@@ -250,7 +290,7 @@ top_triple_clause_with_nonq_subj
 		TTLYYERROR_ACTION_COND (TTLP_SKIP_LITERAL_SUBJECTS, "Virtuoso does not support literal subjects");
 		dk_free_tree (ttlp_arg->ttlp_subj_uri); ttlp_arg->ttlp_subj_uri = NULL; }
 	    predicate_object_list_or_garbage _DOT_WS
-        | TTL_RECOVERABLE_ERROR { dk_free_tree (ttlp_arg->ttlp_subj_uri);
+	| TTL_RECOVERABLE_ERROR { dk_free_tree (ttlp_arg->ttlp_subj_uri);
 		ttlp_arg->ttlp_subj_uri = NULL; }
 	    predicate_object_list_or_garbage _DOT_WS
 	| _GARBAGE_BEFORE_DOT_WS _DOT_WS
@@ -273,11 +313,11 @@ keyword
 semicolon_opt
 	: /*empty*/
 	| _SEMI
-        ;
+	;
 
 inner_predicate_object_list
 	: predicate_object_list
-        | _LBRA
+	| _LBRA
 		{
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Sequence blank node (written as '{...}' formula) can not be used as a predicate"); }
 	    blank_block_formula
@@ -299,18 +339,18 @@ predicate_object_list_or_garbage
 top_blank_predicate_object_list
 	: verb_and_object_list
 	| top_blank_predicate_object_list _SEMI verb_and_object_list_or_garbage
-        | _COMMA { ttlyyerror_action ("Missing object between top-level blank node and a comma"); }
-        | _SEMI { ttlyyerror_action ("Missing predicate and object between top-level blank node and a semicolon"); }
-        | error { ttlyyerror_action ("Predicate expected after top-level blank node"); }
+	| _COMMA { ttlyyerror_action ("Missing object between top-level blank node and a comma"); }
+	| _SEMI { ttlyyerror_action ("Missing predicate and object between top-level blank node and a semicolon"); }
+	| error { ttlyyerror_action ("Predicate expected after top-level blank node"); }
 	;
 
 predicate_object_list
 	: verb_and_object_list
 	| predicate_object_list _SEMI verb_and_object_list_or_garbage
-        | _COMMA { ttlyyerror_action ("Missing object before comma"); }
-        | _SEMI { ttlyyerror_action ("Missing predicate and object before semicolon"); }
-        | _DOT_WS { ttlyyerror_action ("Missing predicate and object before dot"); }
-        | error { ttlyyerror_action ("Predicate expected"); }
+	| _COMMA { ttlyyerror_action ("Missing object before comma"); }
+	| _SEMI { ttlyyerror_action ("Missing predicate and object before semicolon"); }
+	| _DOT_WS { ttlyyerror_action ("Missing predicate and object before dot"); }
+	| error { ttlyyerror_action ("Predicate expected"); }
 	;
 
 verb_and_object_list_or_garbage
@@ -327,7 +367,7 @@ verb_and_object_list
 		{ dk_free_tree (ttlp_arg->ttlp_pred_uri); ttlp_arg->ttlp_pred_uri = $1;
 		  ttlp_arg->ttlp_pred_is_reverse = 1; }
 	    object_list_or_garbage	{ ttlp_arg->ttlp_pred_is_reverse = 0; }
-        | TTL_RECOVERABLE_ERROR {
+	| TTL_RECOVERABLE_ERROR {
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_uri = NULL; }
 	    object_list_or_garbage
@@ -341,10 +381,10 @@ object_list_or_garbage
 object_list
 	: object	{; /* triple is made by object */ }
 	| object_list _COMMA object_or_garbage	{; /* triple is made by object */ }
-        | _COMMA { ttlyyerror_action ("Missing object before comma"); }
-        | _SEMI { ttlyyerror_action ("Missing object before semicolon"); }
-        | _DOT_WS { ttlyyerror_action ("Missing object before dot"); }
-        | error { ttlyyerror_action ("Object expected"); }
+	| _COMMA { ttlyyerror_action ("Missing object before comma"); }
+	| _SEMI { ttlyyerror_action ("Missing object before semicolon"); }
+	| _DOT_WS { ttlyyerror_action ("Missing object before dot"); }
+	| error { ttlyyerror_action ("Object expected"); }
 	;
 
 verb
@@ -352,33 +392,54 @@ verb
 	| VARIABLE	{ $$ = $1; }
 	| _AT_a_L	{ $$ = uname_rdf_ns_uri_type; }
 	| _EQ		{ $$ = box_dv_uname_string ("http://www.w3.org/2002/07/owl#sameAs"); }
-        | _EQ_GT	{ $$ = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); }
+	| _EQ_GT	{ $$ = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); }
 	| _LSQBRA_RSQBRA
 		{
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[]') can not be used as a predicate");
-		  $$ = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL); }
+		  $$ = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, ttlp_arg->ttlp_lexlineno, NULL);
+		}
 	| BLANK_NODE_LABEL
 		{
 		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '_:...' label) can not be used as a predicate");
-                  if (ttlp_arg->ttlp_formula_iid)
+		  if (ttlp_arg->ttlp_formula_iid)
 		    $$ = tf_formula_bnode_iid (ttlp_arg, $1);
-                  else
+		  else
 		    $$ = tf_bnode_iid (ttlp_arg->ttlp_tf, $1);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, ttlp_arg->ttlp_lexlineno, $1);
 		}
-        | _LSQBRA
+	| _LSQBRA
 		{
-		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[...]' block) can not be used as a predicate"); }
-		blank_block_subj { $$ = $3; }
-        | _LPAR
+		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Blank node (written as '[...]' block) can not be used as a predicate");
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    $<lexlineno>$ = ttlp_arg->ttlp_lexlineno;
+		}
+	    blank_block_subj
+		{
+		  $$ = $3;
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, $<lexlineno>2, NULL);
+		}
+	| _LPAR
 		{
-		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Sequence blank node (written as list in parenthesis) can not be used as a predicate"); }
-		blank_block_seq { $$ = $3; }
+		  TTLYYERROR_ACTION_COND (TTLP_VERB_MAY_BE_BLANK, "Sequence blank node (written as list in parenthesis) can not be used as a predicate");
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    $<lexlineno>$ = ttlp_arg->ttlp_lexlineno;
+		}
+	    blank_block_seq
+		{
+		  $$ = $3;
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, $<lexlineno>2, NULL);
+		}
 	;
 
 rev_verb
 	: _AT_is_L q_complete _AT_of_L 	{ $$ = ttlp_arg->ttlp_last_complete_uri; ttlp_arg->ttlp_last_complete_uri = NULL; }
 	| _AT_is_L VARIABLE _AT_of_L 	{ $$ = $2; }
-        | _LT_EQ	{ $$ = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); /* Note this 'double reversed' meaning :) */ }
+	| _LT_EQ	{ $$ = box_dv_uname_string ("http://www.w3.org/2000/10/swap/log#implies"); /* Note this 'double reversed' meaning :) */ }
 	;
 
 literal_subject
@@ -446,34 +507,71 @@ object
 		ttlp_arg->ttlp_obj_type = ttlp_arg->ttlp_last_complete_uri;
 		ttlp_arg->ttlp_last_complete_uri = NULL;
 		ttlp_triple_l_and_inf (ttlp_arg, ttlp_arg->ttlp_obj, ttlp_arg->ttlp_obj_type, NULL);	}
-        | TTL_RECOVERABLE_ERROR { }
+	| TTL_RECOVERABLE_ERROR { }
 	| TURTLE_STRING _CARET_CARET TTL_RECOVERABLE_ERROR {
 		dk_free_tree (ttlp_arg->ttlp_obj);
 		ttlp_arg->ttlp_obj = $1; }
-        | TTL_RECOVERABLE_ERROR _CARET_CARET q_complete {
+	| TTL_RECOVERABLE_ERROR _CARET_CARET q_complete {
 		dk_free_tree (ttlp_arg->ttlp_last_complete_uri);
 		ttlp_arg->ttlp_last_complete_uri = NULL; }
-        | TTL_RECOVERABLE_ERROR _CARET_CARET TTL_RECOVERABLE_ERROR { }
+	| TTL_RECOVERABLE_ERROR _CARET_CARET TTL_RECOVERABLE_ERROR { }
 	;
 
 blank
 	: BLANK_NODE_LABEL
 		{
-                  if (ttlp_arg->ttlp_formula_iid)
+		  if (ttlp_arg->ttlp_formula_iid)
 		    $$ = tf_formula_bnode_iid (ttlp_arg, $1);
-                  else
+		  else
 		    $$ = tf_bnode_iid (ttlp_arg->ttlp_tf, $1);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, ttlp_arg->ttlp_lexlineno, $1);
+		}
+	| _LSQBRA_RSQBRA
+		{
+		  $$ = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL);
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, ttlp_arg->ttlp_lexlineno, NULL);
+		}
+	| _LSQBRA
+		{
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    $<lexlineno>$ = ttlp_arg->ttlp_lexlineno;
+		}
+	    blank_block_subj
+		{
+		  $$ = $3;
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, $<lexlineno>2, NULL);
+		}
+	| _LPAR
+		{
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    $<lexlineno>$ = ttlp_arg->ttlp_lexlineno;
+		}
+	    blank_block_seq
+		{
+		  $$ = $3;
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, $<lexlineno>2, NULL);
+		}
+	| _LBRA
+		{
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    $<lexlineno>$ = ttlp_arg->ttlp_lexlineno;
+		}
+	    blank_block_formula
+		{
+		  $$ = $3;
+		  if (TTLP_DEBUG_BNODES & ttlp_arg->ttlp_flags)
+		    ttlp_triples_for_bnodes_debug (ttlp_arg, $$, $<lexlineno>2, NULL);
 		}
-	| _LSQBRA_RSQBRA	{ $$ = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL); }
-        | _LSQBRA blank_block_subj	{ $$ = $2; }
-        | _LPAR	blank_block_seq		{ $$ = $2; }
-        | _LBRA	blank_block_formula	{ $$ = $2; }
 	;
 
 blank_block_subj
-        :
+	:
 		{ dk_set_push (&(ttlp_arg->ttlp_saved_uris), (void *)(ptrlong)ttlp_arg->ttlp_pred_is_reverse);
-                  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_subj_uri);
+		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_subj_uri);
 		  dk_set_push (&(ttlp_arg->ttlp_saved_uris), ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_is_reverse = 0;
 		  ttlp_arg->ttlp_subj_uri = tf_bnode_iid (ttlp_arg->ttlp_tf, NULL);
@@ -482,18 +580,18 @@ blank_block_subj
 	;
 
 blank_block_subj_tail
-        : predicate_object_list semicolon_opt _RSQBRA
+	: predicate_object_list semicolon_opt _RSQBRA
 		{ $$ = ttlp_arg->ttlp_subj_uri;
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
 		  ttlp_arg->ttlp_subj_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
-                  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
+		  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
 	| _RSQBRA
 		{ $$ = ttlp_arg->ttlp_subj_uri;
 		  dk_free_tree (ttlp_arg->ttlp_pred_uri);
 		  ttlp_arg->ttlp_pred_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
 		  ttlp_arg->ttlp_subj_uri = dk_set_pop (&(ttlp_arg->ttlp_saved_uris));
-                  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
+		  ttlp_arg->ttlp_pred_is_reverse = (ptrlong)dk_set_pop (&(ttlp_arg->ttlp_saved_uris)); }
 	;
 
 blank_block_seq
@@ -573,14 +671,14 @@ blank_block_formula
 q_complete
 	: Q_IRI_REF
 		{
-                  if (NULL != ttlp_arg->ttlp_last_complete_uri)
+		  if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
 		  ttlp_arg->ttlp_last_complete_uri = $1;
 		  TTLP_URI_RESOLVE_IF_NEEDED(ttlp_arg->ttlp_last_complete_uri);
 		 }
 	| QNAME
 		{
-                  if (NULL != ttlp_arg->ttlp_last_complete_uri)
+		  if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
 		  ttlp_arg->ttlp_last_complete_uri = $1;
 		  ttlp_arg->ttlp_last_complete_uri = ttlp_expand_qname_prefix (ttlp_arg, ttlp_arg->ttlp_last_complete_uri);
@@ -588,7 +686,7 @@ q_complete
 		}
 	| QNAME_NS
 		{
-                  if (NULL != ttlp_arg->ttlp_last_complete_uri)
+		  if (NULL != ttlp_arg->ttlp_last_complete_uri)
 		    ttlyyerror_action ("Internal error: proven memory leak");
 		  ttlp_arg->ttlp_last_complete_uri = $1;
 		  ttlp_arg->ttlp_last_complete_uri = ttlp_expand_qname_prefix (ttlp_arg, ttlp_arg->ttlp_last_complete_uri);
diff --git a/libsrc/Wi/uddi.sql b/libsrc/Wi/uddi.sql
index 65b9cff..30115b5 100644
--- a/libsrc/Wi/uddi.sql
+++ b/libsrc/Wi/uddi.sql
@@ -1,14 +1,14 @@
 --
 --  uddi.sql
 --
---  $Id: uddi.sql,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+--  $Id: uddi.sql,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
 --
 --  UDDI support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/uname_const_decl.c b/libsrc/Wi/uname_const_decl.c
index ad231a5..676427a 100644
--- a/libsrc/Wi/uname_const_decl.c
+++ b/libsrc/Wi/uname_const_decl.c
@@ -1,12 +1,12 @@
 /*
- *  $Id: uname_const_decl.c,v 1.1.2.2 2011/03/22 23:50:55 source Exp $
+ *  $Id: uname_const_decl.c,v 1.1.2.6 2012/03/08 12:55:37 source Exp $
  *
  *  Constant declarations of commonly used UNAMEs.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -81,9 +81,13 @@ caddr_t uname_virtrdf_ns_uri_PrivateGraphs;
 caddr_t uname_virtrdf_ns_uri_QuadMap;
 caddr_t uname_virtrdf_ns_uri_QuadMapFormat;
 caddr_t uname_virtrdf_ns_uri_QuadStorage;
+caddr_t uname_virtrdf_ns_uri_SparqlMacroLibrary;
 caddr_t uname_virtrdf_ns_uri_SyncToQuads;
 caddr_t uname_virtrdf_ns_uri_array_of_any;
 caddr_t uname_virtrdf_ns_uri_array_of_string;
+caddr_t uname_virtrdf_ns_uri_bnode_base;
+caddr_t uname_virtrdf_ns_uri_bnode_label;
+caddr_t uname_virtrdf_ns_uri_bnode_row;
 caddr_t uname_virtrdf_ns_uri_bitmask;
 caddr_t uname_virtrdf_ns_uri_isSpecialPredicate;
 caddr_t uname_virtrdf_ns_uri_isSubclassOf;
@@ -198,7 +202,7 @@ static uname_const_decl_t uname_const_decls[] = {
   { &uname_rdf_ns_uri_value			, RDF_NS_URI "value"		},
   { &uname_space				, "space"			},
   { &uname_swap_reify_ns_uri			, SWAP_REIFY_NS_URI		},
-  { &uname_swap_reify_ns_uri_statement		, SWAP_REIFY_NS_URI "#statement"	},
+  { &uname_swap_reify_ns_uri_statement		, SWAP_REIFY_NS_URI "statement"	},
   { &uname_virtrdf_ns_uri			, VIRTRDF_NS_URI		},
   { &uname_virtrdf_ns_uri_DefaultQuadMap	, VIRTRDF_NS_URI "DefaultQuadMap"	},
   { &uname_virtrdf_ns_uri_DefaultQuadStorage	, VIRTRDF_NS_URI "DefaultQuadStorage"	},
@@ -207,10 +211,14 @@ static uname_const_decl_t uname_const_decls[] = {
   { &uname_virtrdf_ns_uri_QuadMap		, VIRTRDF_NS_URI "QuadMap"	},
   { &uname_virtrdf_ns_uri_QuadMapFormat		, VIRTRDF_NS_URI "QuadMapFormat"	},
   { &uname_virtrdf_ns_uri_QuadStorage		, VIRTRDF_NS_URI "QuadStorage"	},
+  { &uname_virtrdf_ns_uri_SparqlMacroLibrary	, VIRTRDF_NS_URI "SparqlMacroLibrary"	},
   { &uname_virtrdf_ns_uri_SyncToQuads		, VIRTRDF_NS_URI "SyncToQuads"	},
   { &uname_virtrdf_ns_uri_array_of_any		, VIRTRDF_NS_URI "array-of-any"	},
   { &uname_virtrdf_ns_uri_array_of_string	, VIRTRDF_NS_URI "array-of-string"	},
   { &uname_virtrdf_ns_uri_bitmask		, VIRTRDF_NS_URI "bitmask"	},
+  { &uname_virtrdf_ns_uri_bnode_base		, VIRTRDF_NS_URI "bnode-base"	},
+  { &uname_virtrdf_ns_uri_bnode_label		, VIRTRDF_NS_URI "bnode-label"	},
+  { &uname_virtrdf_ns_uri_bnode_row		, VIRTRDF_NS_URI "bnode-row"	},
   { &uname_virtrdf_ns_uri_isSpecialPredicate	, VIRTRDF_NS_URI "isSpecialPredicate"	},
   { &uname_virtrdf_ns_uri_isSubclassOf		, VIRTRDF_NS_URI "isSubclassOf"	},
   { &uname_virtrdf_ns_uri_loadAs		, VIRTRDF_NS_URI "loadAs"	},
diff --git a/libsrc/Wi/uname_const_decl.h b/libsrc/Wi/uname_const_decl.h
index 14237c4..08f326c 100644
--- a/libsrc/Wi/uname_const_decl.h
+++ b/libsrc/Wi/uname_const_decl.h
@@ -1,12 +1,12 @@
 /*
- *  $Id: uname_const_decl.h,v 1.1.2.2 2011/03/22 23:50:55 source Exp $
+ *  $Id: uname_const_decl.h,v 1.1.2.5 2012/03/08 12:55:37 source Exp $
  *
  *  Constant declarations of commonly used UNAMEs.
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -99,10 +99,14 @@ extern caddr_t uname_virtrdf_ns_uri_PrivateGraphs;
 extern caddr_t uname_virtrdf_ns_uri_QuadMap;
 extern caddr_t uname_virtrdf_ns_uri_QuadMapFormat;
 extern caddr_t uname_virtrdf_ns_uri_QuadStorage;
+extern caddr_t uname_virtrdf_ns_uri_SparqlMacroLibrary;
 extern caddr_t uname_virtrdf_ns_uri_SyncToQuads;
 extern caddr_t uname_virtrdf_ns_uri_array_of_any;
 extern caddr_t uname_virtrdf_ns_uri_array_of_string;
 extern caddr_t uname_virtrdf_ns_uri_bitmask;
+extern caddr_t uname_virtrdf_ns_uri_bnode_base;
+extern caddr_t uname_virtrdf_ns_uri_bnode_label;
+extern caddr_t uname_virtrdf_ns_uri_bnode_row;
 extern caddr_t uname_virtrdf_ns_uri_isSpecialPredicate;
 extern caddr_t uname_virtrdf_ns_uri_isSubclassOf;
 extern caddr_t uname_virtrdf_ns_uri_loadAs;
diff --git a/libsrc/Wi/update.c b/libsrc/Wi/update.c
index f76bec1..b2daf41 100644
--- a/libsrc/Wi/update.c
+++ b/libsrc/Wi/update.c
@@ -1,14 +1,14 @@
 /*
  *  update.c
  *
- *  $Id: update.c,v 1.11.2.11 2010/11/09 10:59:15 source Exp $
+ *  $Id: update.c,v 1.11.2.14 2012/03/08 12:55:37 source Exp $
  *
  *  UPDATE statements
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -700,6 +700,7 @@ update_node_run_1 (update_node_t * upd, caddr_t * inst,
 		  goto next_key;
 		if (!key->key_distinct)
 		  {
+		    del_itc->itc_no_bitmap = 0; /* reset as prev ins may set it to true */
 		    res = itc_get_alt_key (del_itc, &del_buf, key, &rd);
 		    itc_delete_this (del_itc, &del_buf, res, NO_BLOBS);
 		  }
@@ -1101,6 +1102,35 @@ itc_row_insert (it_cursor_t * itc, row_delta_t * rd, buffer_desc_t ** unq_buf,
   return DVC_LESS;
 }
 
+void
+row_insert_rd_len (row_delta_t * rd)
+{
+  dbe_key_t * key = rd->rd_key;
+  int inx = 0;
+  DO_ALL_CL (cl, key)
+    {
+      caddr_t val = rd->rd_values [inx];
+      switch (cl->cl_sqt.sqt_dtp)
+	{
+	  case DV_STRING:
+	  case DV_WIDE:
+	  case DV_ANY:
+	  case DV_OBJECT:
+	      rd->rd_non_comp_len += (box_length (val) - 1);
+	      break;
+	  case DV_BIN:
+	      rd->rd_non_comp_len += box_length (val);
+	      break;
+	  case DV_BLOB:
+	  case DV_BLOB_BIN:
+	  case DV_BLOB_WIDE:
+	      rd->rd_non_comp_len += DV_BLOB_LEN;
+	      break;
+	}
+      inx++;
+    }
+  END_DO_ALL_CL;
+}
 
 void
 row_insert_node_input (row_insert_node_t * ins, caddr_t * inst,
@@ -1121,6 +1151,9 @@ row_insert_node_input (row_insert_node_t * ins, caddr_t * inst,
   if (!key)
     sqlr_new_error ("42000", "RFW..", "Key id " BOXINT_FMT " undefined in row insert", unbox (row[0]));
   rd.rd_key = key;
+  rd.rd_non_comp_len = key->key_row_var_start[0];
+  rd.rd_non_comp_max = MAX_ROW_BYTES;
+  row_insert_rd_len (&rd);
   ITC_FAIL (it)
   {
     if (DVC_MATCH == itc_row_insert (it, &rd, &buf, 0, 0))
diff --git a/libsrc/Wi/url_rewrite.sql b/libsrc/Wi/url_rewrite.sql
index 07ec84a..4d65c5d 100644
--- a/libsrc/Wi/url_rewrite.sql
+++ b/libsrc/Wi/url_rewrite.sql
@@ -1,10 +1,10 @@
 --
---  $Id: url_rewrite.sql,v 1.26.2.14 2010/09/01 10:15:57 source Exp $
+--  $Id: url_rewrite.sql,v 1.26.2.18 2012/03/08 12:55:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2009 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -452,7 +452,9 @@ create procedure DB.DBA.URLREWRITE_APPLY_RECURSIVE (
   out target_vhost_pkey any,
   out http_redir int,
   out http_headers varchar,
-  inout lines any)
+  inout lines any,
+  in meth varchar
+  )
   returns integer
 {
 -- dbg_obj_princ('in side! ', rulelist_iri);
@@ -462,7 +464,7 @@ create procedure DB.DBA.URLREWRITE_APPLY_RECURSIVE (
         {
           if (DB.DBA.URLREWRITE_APPLY_RECURSIVE (cur_iri, nice_host,
             nice_lhost, nice_lpath, nice_get_params, nice_frag, post_params, accept_header, long_url, params,
-            rule_iri, target_vhost_pkey, http_redir, http_headers, lines) = 1)
+            rule_iri, target_vhost_pkey, http_redir, http_headers, lines, meth) = 1)
             return 1;
         }
       else
@@ -487,6 +489,13 @@ create procedure DB.DBA.URLREWRITE_APPLY_RECURSIVE (
 	          if (accept_val is null)
 		    goto next_rule;
 		}
+	      -- cannot do redirect on POST or PUT or something having a content sent as part of the request
+	      if (URR_HTTP_REDIRECT is not null and URR_HTTP_REDIRECT > 299 and URR_HTTP_REDIRECT < 304 and meth not in ('GET', 'MGET', 'HEAD', 'OPTIONS'))
+		{
+		  if (registry_get ('__debug_url_rewrite') in ('1', '2'))
+		    dbg_printf ('skipping rule=[%s] because HTTP redirect cannot be done for HTTP %s', URR_NICE_FORMAT, meth);
+		  goto next_rule;
+		}
 
               if (URR_RULE_TYPE = 0)
                 {
@@ -591,7 +600,7 @@ create procedure DB.DBA.URLREWRITE_APPLY (
   -- dbg_obj_princ('bbb5', _lpath, _lhost_port, _lhost);
   whenever not found goto no_rec;
   select top 1 HP_HOST, HP_LISTEN_HOST, HP_LPATH, get_keyword ('url_rewrite', deserialize (HP_OPTIONS), NULL) into db_host, db_lhost, db_lpath, top_rulelist_iri from HTTP_PATH where
-    (HP_LISTEN_HOST = _lhost or HP_LISTEN_HOST = _lhost_port or (HP_LISTEN_HOST = '*ini*' and _lhost_port = cfg_item_value (virtuoso_ini_path (), 'HTTPServer','ServerPort'))) and
+    (HP_LISTEN_HOST = _lhost or HP_LISTEN_HOST = _lhost_port or (HP_LISTEN_HOST = '*ini*' and _lhost_port = virtuoso_ini_item_value ('HTTPServer','ServerPort'))) and
     HP_OPTIONS is not null and deserialize (HP_OPTIONS) is not null and
     left (_lpath, length (HP_LPATH)) = HP_LPATH order by HP_LPATH desc;
   if (db_host is null and db_lhost is null and db_lpath is null)
@@ -634,7 +643,8 @@ create procedure DB.DBA.URLREWRITE_APPLY (
     target_vhost_pkey,
     http_redir,
     http_headers,
-    lines);
+    lines,
+    'GET');
 }
 ;
 
@@ -1197,7 +1207,7 @@ create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar,
   declare params, lines any;
   declare nice_vhost_pkey any;
   declare top_rulelist_iri varchar;
-  declare rule_iri, in_path, qstr varchar;
+  declare rule_iri, in_path, qstr, meth varchar;
   declare target_vhost_pkey, hf, accept, http_headers any;
   declare result, http_redir, http_tcn_code, tcn_rc, keep_lpath int;
   declare http_tcn_headers varchar;
@@ -1211,6 +1221,7 @@ create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar,
   accept := null;
   qstr := null;
   keep_lpath := 0;
+  meth := 'GET';
 
   if (is_http_ctx ())
     {
@@ -1227,6 +1238,7 @@ create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar,
       accept := http_request_header (lines, 'Accept');
       if (not isstring (accept))
 	accept := '*/*';
+      meth := http_request_get ('REQUEST_METHOD');
     }
   else
     {
@@ -1236,12 +1248,15 @@ create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar,
   if (length (qstr))
     in_path := in_path || '?' || qstr;
 
+  if (registry_get ('__debug_url_rewrite') in ('1', '2'))
+    dbg_printf ('Input URL=[%s]', in_path);
+
   http_tcn_headers := http_headers := null;
   http_tcn_code := http_redir := null;
   tcn_rc := DB.DBA.URLREWRITE_APPLY_TCN (rule_list, in_path, lines, http_tcn_code, http_tcn_headers);
 --  dbg_obj_print ('http headers', http_tcn_code, http_tcn_headers);
   result := DB.DBA.URLREWRITE_APPLY_RECURSIVE (rule_list, null, null, in_path, '', qstr, post_params, accept,
-  	long_url, params, rule_iri, target_vhost_pkey, http_redir, http_headers, lines);
+  	long_url, params, rule_iri, target_vhost_pkey, http_redir, http_headers, lines, meth);
   if (registry_get ('__debug_url_rewrite') in ('1', '2') and length (long_url))
     dbg_printf ('*** RETURN rule=[%s] URL=[%s]', rule_iri, long_url);
   if (not tcn_rc and length (long_url))
@@ -1302,18 +1317,21 @@ create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar,
 	  http_status_set (http_redir);
 	  http_header (http_header_get () || 'Location: '|| DB.DBA.HTTP_LOC_NEW_URL (long_url) ||'\r\n');
 	  http_body_read ();
+	  if (registry_get ('__debug_url_rewrite') in ('1', '2')) dbg_printf ('HTTP redirect');
 	  return 1;
 	}
       else if (http_redir = 300) -- TCN
         {
 	  http_status_set (http_redir);
 	  http_body_read ();
+	  if (registry_get ('__debug_url_rewrite') in ('1', '2')) dbg_printf ('HTTP redirect');
 	  return 1;
         }
       else if (isinteger (http_redir) and http_redir > 399)
 	{
 	  http_status_set (http_redir);
 	  http_body_read ();
+	  if (registry_get ('__debug_url_rewrite') in ('1', '2')) dbg_printf ('HTTP status');
 	  return 1;
 	}
       else
@@ -1325,6 +1343,7 @@ create procedure DB.DBA.HTTP_URLREWRITE (in path varchar, in rule_list varchar,
 	  http_internal_redirect (full_path, p_full_path, long_url, keep_lpath);
 	  pars := vector_concat (params, pars);
 	  http_set_params (pars);
+	  if (registry_get ('__debug_url_rewrite') in ('1', '2')) dbg_printf ('Internal redirect');
         }
     }
   return 0;
diff --git a/libsrc/Wi/useraggr.sql b/libsrc/Wi/useraggr.sql
index 945a161..afbf5cf 100644
--- a/libsrc/Wi/useraggr.sql
+++ b/libsrc/Wi/useraggr.sql
@@ -1,10 +1,10 @@
 --
---  $Id: useraggr.sql,v 1.3.2.4 2010/12/22 10:32:00 source Exp $
+--  $Id: useraggr.sql,v 1.3.2.7 2012/03/08 12:55:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -757,3 +757,173 @@ create aggregate DB.DBA.BAG_CONCAT_AGG (in _child any) returns any
   from vectorbld_init, vectorbld_concat_agg_acc, vectorbld_agg_final
 ;
 
+
+--!AWK PUBLIC
+create procedure DB.DBA.GROUP_CONCAT_INIT (inout _env any)
+{
+  _env := 0;
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.GROUP_CONCAT_ACC (inout _env any, in token varchar, in delim varchar)
+{
+--  if (185 <> __tag (_env))
+--    _env := string_output();
+--  else if (delim is not null)
+--    http (cast (delim as varchar), _env);
+--  http (cast (token as varchar), _env);
+  if (__tag of varchar <> __tag (_env))
+    _env := cast (token as varchar);
+  else if (delim is not null)
+    _env := concat (_env, cast (delim as varchar), cast (token as varchar));
+  else
+    _env := concat (_env, cast (token as varchar));
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.GROUP_CONCAT_FIN (inout _env any)
+{
+--  if (185 <> __tag (_env))
+--    return '';
+--  return string_output_string (_env);
+  if (__tag of varchar <> __tag (_env))
+    return '';
+  return _env;
+}
+;
+
+create aggregate DB.DBA.GROUP_CONCAT (in token varchar, in delim varchar) returns varchar
+  from DB.DBA.GROUP_CONCAT_INIT, DB.DBA.GROUP_CONCAT_ACC, DB.DBA.GROUP_CONCAT_FIN
+order
+;
+
+
+--!AWK PUBLIC
+create procedure DB.DBA.GROUP_DIGEST_INIT (inout _env any)
+{
+  _env := 0;
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.GROUP_DIGEST_ACC (inout _env any, in token varchar, in delim varchar, in maxlen integer, in mode integer)
+{
+  declare curlen integer;
+  declare env_vec, items any;
+  if (__tag of varchar <> __tag (token))
+    {
+      token := cast (token as varchar);
+      if (token is null)
+        return;
+    }
+  if (__tag of varchar <> __tag (_env))
+    {
+      if (length (token) > maxlen)
+        token := subseq (token, 0, maxlen+1);
+      _env := serialize (vector_zap_args (vector_zap_args (token), cast (delim as varchar), maxlen));
+      return;
+    }
+  curlen := length (_env);
+  if (curlen >= maxlen)
+    return;
+  env_vec := deserialize (_env);
+  items := aref_set_0 (env_vec, 0);
+  if (bit_and (mode, 1))
+    {
+      if (0 < position (token, items))
+        return;
+    }
+  if (length (token) > (env_vec[2] - curlen))
+    token := subseq (token, 0, (env_vec[2] - curlen)+1);
+  items := vector_concat (items, vector_zap_args (token));
+  aset_zap_arg (env_vec, 0, items);
+  _env := serialize (env_vec);
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.GROUP_DIGEST_FIN (inout _env any)
+{
+  declare envlen, curlen, maxlen, itemctr, itemcount, delim_len, rest_len integer;
+  declare env_vec, items, ses any;
+  declare delim varchar;
+  if (__tag of varchar <> __tag (_env))
+    return '';
+  envlen := length (_env);
+  env_vec := deserialize (_env);
+  items := aref_set_0 (env_vec, 0);
+  delim := aref_set_0 (env_vec, 1);
+  rest_len := maxlen := aref_set_0 (env_vec, 2);
+  ses := string_output ();
+  itemctr := 0;
+  itemcount := length (items);
+  delim_len := length (delim);
+  for (itemctr := 0; itemctr < itemcount; itemctr := itemctr + 1)
+    {
+      declare itm varchar;
+      declare itm_len integer;
+      if (delim_len > (rest_len-5))
+        goto items_done;
+      if (itemctr)
+        {
+          http (delim, ses);
+          rest_len := rest_len - delim_len;
+        }
+      itm := items [itemctr];
+      itm_len := length (itm);
+      if ((itm_len > rest_len) or ((envlen > maxlen) and (itemctr = itemcount-1)))
+        {
+          itm := subseq (itm, 0, rest_len);
+          itm_len := coalesce (__max_notnull (strrchr (itm, 32), strrchr (itm, 10), strrchr (itm, 13)), 0);
+          while ((itm_len > 0) and (itm [itm_len-1] in (32, 10, 13)))
+            itm_len := itm_len - 1;
+          if (0 = itm_len)
+            http (subseq (itm, 0, rest_len-3), ses);
+          else
+            http (subseq (itm, 0, itm_len), ses);
+          http ('...', ses);
+          goto items_done;
+        }
+      http (itm, ses);
+      rest_len := rest_len - itm_len;
+    }
+items_done:
+  return string_output_string (ses);
+}
+;
+
+create aggregate DB.DBA.GROUP_DIGEST (in token varchar, in delim varchar, in maxlen integer, in mode integer) returns varchar
+  from DB.DBA.GROUP_DIGEST_INIT, DB.DBA.GROUP_DIGEST_ACC, DB.DBA.GROUP_DIGEST_FIN
+order
+;
+
+
+--!AWK PUBLIC
+create procedure DB.DBA.SAMPLE_INIT (inout _env any)
+{
+  _env := null;
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SAMPLE_ACC (inout _env any, in sample any)
+{
+  if (_env is not null)
+    return;
+  _env := sample;
+}
+;
+
+--!AWK PUBLIC
+create procedure DB.DBA.SAMPLE_FIN (inout _env any)
+{
+  return _env;
+}
+;
+
+create aggregate DB.DBA.SAMPLE (in sample any) returns any
+  from DB.DBA.SAMPLE_INIT, DB.DBA.SAMPLE_ACC, DB.DBA.SAMPLE_FIN
+order
+;
diff --git a/libsrc/Wi/users.sql b/libsrc/Wi/users.sql
index e1ec9e5..4a07ee5 100644
--- a/libsrc/Wi/users.sql
+++ b/libsrc/Wi/users.sql
@@ -1,14 +1,14 @@
 --
 --  users.sql
 --
---  $Id: users.sql,v 1.12.2.9 2010/10/25 13:15:58 source Exp $
+--  $Id: users.sql,v 1.12.2.17 2012/03/08 12:55:37 source Exp $
 --
 --  Unified user model
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -196,8 +196,7 @@ create procedure DB.DBA.SECURITY_CL_EXEC_AND_LOG (in txt varchar, in args any)
 }
 ;
 
-create procedure
-USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)
+create procedure DB.DBA.USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)
 {
   declare _pwd, _pwd_mode, _pwd_mode_data, _login_qual varchar;
   declare _dav_enable, _sql_enable integer;
@@ -228,7 +227,7 @@ USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)
     _login_qual := get_keyword_ucase ('LOGIN_QUALIFIER', options, 'DB');
     _prim_group := get_keyword_ucase ('PRIMARY_GROUP', options, NULL);
 
-    _u_e_mail := get_keyword_ucase ('E-MAIL', options, '');
+    _u_e_mail := coalesce (get_keyword_ucase ('E-MAIL', options), get_keyword_ucase ('E_MAIL', options, ''));
     _u_full_name := get_keyword_ucase ('FULL_NAME', options, NULL);
     _u_home := get_keyword_ucase ('HOME', options, NULL);
     _u_perms := get_keyword_ucase ('PERMISSIONS', options, '110100000R');
@@ -241,7 +240,7 @@ USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)
     new_opts := vector ();
     while (i < l)
       {
-	if (upper(options[i]) not in ('PASSWORD_MODE', 'PASSWORD_MODE_DATA', 'GET_PASSWORD', 'SQL_ENABLE', 'DAV_ENABLE', 'LOGIN_QUALIFIER', 'PRIMARY_GROUP', 'E-MAIL', 'FULL_NAME', 'HOME', 'PERMISSIONS', 'DISABLED'))
+	if (upper(options[i]) not in ('PASSWORD_MODE', 'PASSWORD_MODE_DATA', 'GET_PASSWORD', 'SQL_ENABLE', 'DAV_ENABLE', 'LOGIN_QUALIFIER', 'PRIMARY_GROUP', 'E-MAIL', 'E_MAIL', 'FULL_NAME', 'HOME', 'PERMISSIONS', 'DISABLED'))
 	  {
             new_opts := vector_concat (new_opts, vector (options[i], options[i+1]));
 	  }
@@ -251,6 +250,9 @@ USER_CREATE (in _name varchar, in passwd varchar, in options any := NULL)
   if (_login_qual = '')
     signal ('22023', 'Qualifier cannot be empty string');
 
+  if (__tag of NVARCHAR = __tag (passwd))
+    passwd := charset_recode (passwd, '_WIDE_', 'UTF-8');
+
   _pwd := pwd_magic_calc (_name, passwd, 0);
   _u_sys_name := pwd_magic_calc (_name, _u_sec_sys_name, 0);
   _u_sys_pass := pwd_magic_calc (_name, _u_sec_sys_pass, 0);
@@ -334,6 +336,10 @@ USER_ROLE_DROP (in _name varchar)
 create procedure
 USER_CHANGE_PASSWORD (in _name varchar, in old_pwd varchar, in new_pwd varchar)
 {
+  if (__tag of NVARCHAR = __tag (old_pwd))
+    old_pwd := charset_recode (old_pwd, '_WIDE_', 'UTF-8');
+  if (__tag of NVARCHAR = __tag (new_pwd))
+    new_pwd := charset_recode (new_pwd, '_WIDE_', 'UTF-8');
   if (exists (select 1 from SYS_USERS where U_NAME = _name and U_IS_ROLE = 0 and pwd_magic_calc (U_NAME, U_PASSWORD, 1) = old_pwd))
     {
       if (exists (select 1 from SYS_USERS where U_NAME = _name and U_SQL_ENABLE = 1))
@@ -354,6 +360,8 @@ create procedure USER_PASSWORD_SET (in name varchar, in passwd varchar)
 {
   declare _u_id, _u_group integer;
   declare _u_data varchar;
+  if (__tag of NVARCHAR = __tag (passwd))
+    passwd := charset_recode (passwd, '_WIDE_', 'UTF-8');
   if (exists (select 1 from SYS_USERS where U_NAME = name and U_SQL_ENABLE = 1))
     {
       user_set_password (name, passwd);
@@ -462,7 +470,7 @@ USER_GRANT_ROLE (in _name varchar, in _role varchar, in grant_opt integer := 0)
         {
 	  if (primary_group is null or inh[i] <> primary_group)
 	    {
-	      insert into SYS_ROLE_GRANTS (GI_SUPER, GI_SUB, GI_ADMIN, GI_DIRECT, GI_GRANT)
+	      insert soft SYS_ROLE_GRANTS (GI_SUPER, GI_SUB, GI_ADMIN, GI_DIRECT, GI_GRANT)
 		  values (_u_id, inh[i], grant_opt, 0, _g_id);
 	    }
           i := i + 1;
@@ -567,6 +575,7 @@ USER_DROP (in _name varchar, in _cascade integer := 0)
     signal ('37000', concat ('The user ''', _name, ''' does not exist'), 'U0015');
   delete from SYS_USER_GROUP where UG_UID = _u_id;
   delete from SYS_GRANTS where G_USER = _u_id;
+  delete from DB.DBA.RDF_GRAPH_USER where RGU_USER_ID = _u_id;
   if (_u_is_sql)
     DB.DBA.SECURITY_CL_EXEC_AND_LOG ('sec_remove_user_struct(?)', vector (_name));
 }
@@ -1043,7 +1052,7 @@ create procedure
 	if (fp is null)
 	  goto normal_auth;
 
-        ext_oid := cfg_item_value (virtuoso_ini_path(), 'Parameters', 'X509ExtensionOID');
+        ext_oid := virtuoso_ini_item_value ('Parameters', 'X509ExtensionOID');
 
         if (ext_oid is not null)
           new_user := get_certificate_info (7, null, null, null, ext_oid);
@@ -1070,7 +1079,7 @@ normal_auth:
     {
       rc := "DB"."DBA"."DBEV_LOGIN" (user_name, digest, session_random);
     }
-  else
+  else if (rc <= 0) -- only if not authenticated
     {
       rc := DB.DBA.FOAF_SSL_LOGIN (user_name, digest, session_random);
       if (rc = 0)
@@ -1313,6 +1322,26 @@ alter index SYS_USER_WEBID on SYS_USER_WEBID partition cluster replicated
 create index SYS_USER_WEBID_NAME on SYS_USER_WEBID (UW_U_NAME) partition cluster replicated
 ;
 
+create procedure FOAF_SSL_QRY (in gr varchar, in uri varchar)
+{
+    return sprintf ('sparql
+    define input:storage ""
+    define input:same-as "yes"
+    prefix cert: <http://www.w3.org/ns/auth/cert#>
+    prefix rsa: <http://www.w3.org/ns/auth/rsa#>
+    select (str (?exp)) (str (?mod))
+    from <%S>
+    where
+    {
+      { ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod .  }
+      union
+      { ?id cert:identity <%S> ; rsa:public_exponent ?exp1 ; rsa:modulus ?mod1 . ?exp1 cert:decimal ?exp . ?mod1 cert:hex ?mod . }
+      union
+      { <%S> cert:key ?key . ?key cert:exponent ?exp . ?key cert:modulus ?mod .  }
+    }', gr, uri, uri, uri);
+}
+;
+
 create procedure
 DB.DBA.FOAF_SSL_LOGIN (inout user_name varchar, in digest varchar, in session_random varchar)
 {
@@ -1353,17 +1382,7 @@ DB.DBA.FOAF_SSL_LOGIN (inout user_name varchar, in digest varchar, in session_ra
   stat := '00000';
   exec (qr, stat, msg);
   commit work;
-  qr := sprintf (
-        'sparql define input:storage "" '||
-	' prefix cert: <http://www.w3.org/ns/auth/cert#> '||
-	' prefix rsa: <http://www.w3.org/ns/auth/rsa#> ' ||
-  	' select (str (bif:coalesce (?exp_val, ?exp))) (str (bif:coalesce (?mod_val, ?mod))) '||
-	' from <%S> '||
-  	' where { '||
-	' 	  ?id cert:identity <%S> ; rsa:public_exponent ?exp ; rsa:modulus ?mod . ' ||
-	' 	  optional { ?exp cert:decimal ?exp_val . ?mod cert:hex ?mod_val . } '||
-	'       } ',
-	gr, agent);
+  qr := FOAF_SSL_QRY (gr, agent);
   stat := '00000';
   exec (qr, stat, msg, vector (), 0, meta, data);
   if (stat = '00000' and length (data))
diff --git a/libsrc/Wi/uuencode.c b/libsrc/Wi/uuencode.c
index 16fd29b..229560b 100644
--- a/libsrc/Wi/uuencode.c
+++ b/libsrc/Wi/uuencode.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: uuencode.c,v 1.6.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: uuencode.c,v 1.6.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/uuencode_impl.h b/libsrc/Wi/uuencode_impl.h
index ff3c3d8..de975dc 100644
--- a/libsrc/Wi/uuencode_impl.h
+++ b/libsrc/Wi/uuencode_impl.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: uuencode_impl.h,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: uuencode_impl.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/vdb.sql b/libsrc/Wi/vdb.sql
index ad7494f..19932e7 100644
--- a/libsrc/Wi/vdb.sql
+++ b/libsrc/Wi/vdb.sql
@@ -1,10 +1,10 @@
 --
---  $Id: vdb.sql,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+--  $Id: vdb.sql,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/virtext.h b/libsrc/Wi/virtext.h
index 9b1ff45..0206e9c 100644
--- a/libsrc/Wi/virtext.h
+++ b/libsrc/Wi/virtext.h
@@ -1,14 +1,14 @@
 /*
  *  virtext.h
  *
- *  $Id: virtext.h,v 1.3.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: virtext.h,v 1.3.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  Virtuoso UDBC Client Extensions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/virtpwd.h b/libsrc/Wi/virtpwd.h
index 9cefa7f..87f48c9 100644
--- a/libsrc/Wi/virtpwd.h
+++ b/libsrc/Wi/virtpwd.h
@@ -1,14 +1,14 @@
 /*
  *  virtpwd.h
  *
- *  $Id: virtpwd.h,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: virtpwd.h,v 1.2.2.2 2012/03/08 12:55:37 source Exp $
  *
  *  password encryption
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/virtual_dir.sql b/libsrc/Wi/virtual_dir.sql
index d43f123..e6d3951 100644
--- a/libsrc/Wi/virtual_dir.sql
+++ b/libsrc/Wi/virtual_dir.sql
@@ -1,14 +1,14 @@
 --
 --  virtual_dir.sql
 --
---  $Id: virtual_dir.sql,v 1.39.2.25 2010/12/23 16:33:49 source Exp $
+--  $Id: virtual_dir.sql,v 1.39.2.30 2012/03/08 12:55:37 source Exp $
 --
 --  Virtual Web directories support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -675,7 +675,7 @@ return rc;
 --HP_SSL_DEFAULT ()
 --{
 --  declare port, nam varchar;
---  port := cfg_item_value (virtuoso_ini_path (), 'HTTPServer', 'SSLPort');
+--  port := virtuoso_ini_item_value ('HTTPServer', 'SSLPort');
 --  nam := port;
 --  if (strrchr (port, ':') is null and atoi (port) <> 0)
 --    {
@@ -757,10 +757,8 @@ if (rc)
 	    {
 	      set http_charset=charset;
 	    }
-	  http_header (concat (http_header_get (), 'ETag: "', tag,
-		sprintf ('"\r\nContent-Length: %d\r\n\r\n', length (cnt))));
-	  http_flush (2);
-	  ses_write (cnt);
+	  http_header (concat (http_header_get (), sprintf ('ETag: "%s"\r\n', tag)));
+	  http (cnt);
 	}
       else
 	{
@@ -997,7 +995,7 @@ ext_http_proxy (in url varchar := null,
                 in header varchar := null,
                 in force varchar := null,
                 in "output-format" varchar := null,
-                in get varchar := 'soft',
+                in get varchar := 'add',
                 in login varchar := '') __SOAP_HTTP 'text/html'
 {
   declare hdr, content, req_hdr any;
@@ -1094,14 +1092,16 @@ end_loop:;
                 accept := "output-format";
 	    }
           stat := '00000';
-	  if (get not in ('soft', 'replacing'))
-	    get := 'soft';
+	  if (get not in ('soft', 'replacing', 'add'))
+	    get := 'add';
 	  if (length (login))
 	    login := concat ('define get:login "', login, '" ');
 	  else
 	    login := '';
 	  host := http_request_header(http_request_header(), 'Host', null, null);
 	  ids := vector ('rdf', 'id/entity', 'id');
+	  if (not exists (select 1 from RDF_QUAD where G = iri_to_id (url, 0)))
+	    {
 	  foreach (varchar idn in ids) do
 	    {
 	      pref := 'http://' || host || http_map_get ('domain') || '/' || idn || '/';
@@ -1116,6 +1116,7 @@ end_loop:;
 		    url := 'nodeID:/' || subseq (url, 6);
 		}
 	    }
+	    }
 	  -- escape chars which are not allowed
 	  url := replace (url, '''', '%27');
 	  url := replace (url, '<', '%3C');
@@ -1617,7 +1618,7 @@ create procedure WS.WS."host-meta" (in format varchar := 'xml') __SOAP_HTTP 'app
   accept := DB.DBA.HTTP_RDF_GET_ACCEPT_BY_Q (http_request_header_full (lines, 'Accept', '*/*'));
   if (format = 'json' or accept = 'application/json')
     {
-      http_header ('Content-Type: applicaition/json\r\n');
+      http_header ('Content-Type: application/json\r\n');
     http_xslt ('http://local.virt/xrd2json');
     }
   return ret;
diff --git a/libsrc/Wi/vt_text.sql b/libsrc/Wi/vt_text.sql
index eada27b..d6b3cb8 100644
--- a/libsrc/Wi/vt_text.sql
+++ b/libsrc/Wi/vt_text.sql
@@ -1,14 +1,14 @@
 --
 --  vt_text.sql
 --
---  $Id: vt_text.sql,v 1.2.2.2 2009/04/18 21:55:17 source Exp $
+--  $Id: vt_text.sql,v 1.2.2.3 2012/03/08 12:55:37 source Exp $
 --
 --  Text triggers support.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wi.h b/libsrc/Wi/wi.h
index 8513d90..d83adae 100644
--- a/libsrc/Wi/wi.h
+++ b/libsrc/Wi/wi.h
@@ -1,14 +1,14 @@
 /*
  *  wi.h
  *
- *  $Id: wi.h,v 1.23.2.21 2010/11/30 12:34:44 source Exp $
+ *  $Id: wi.h,v 1.23.2.24 2012/03/08 12:55:37 source Exp $
  *
  *  Data structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -287,6 +287,7 @@ struct dbe_storage_s
   buffer_desc_t *	dbs_extent_set;
   dp_addr_t		dbs_n_pages_in_extent_set;
   int32			dbs_initial_gen; /* generic no of exe tat inited the db */
+  char 			dbs_id[16];
 } ;
 
 
@@ -1572,7 +1573,7 @@ extern int64 bdf_is_avail_mask; /* all bits on except read aside flag which does
       if ((__lt && __lt->lt_status != LT_PENDING)  \
 || (wi_inst.wi_is_checkpoint_pending && cpt_is_global_lock ())) \
 	{ \
-	  if (!wi_inst.wi_checkpoint_atomic) \
+	  if (__lt && !wi_inst.wi_checkpoint_atomic) \
 	itc_bust_this_trx (it, buf, may_ret); \
 }\
  }								\
diff --git a/libsrc/Wi/wi_xid.c b/libsrc/Wi/wi_xid.c
index 9325a92..35f19da 100644
--- a/libsrc/Wi/wi_xid.c
+++ b/libsrc/Wi/wi_xid.c
@@ -1,14 +1,14 @@
 /*
  *  wi_xid.c
  *
- *  $Id: wi_xid.c,v 1.5.2.4 2009/07/21 19:24:58 source Exp $
+ *  $Id: wi_xid.c,v 1.5.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  Functions to deal with XID structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wi_xid.h b/libsrc/Wi/wi_xid.h
index 5374dc4..2de1603 100644
--- a/libsrc/Wi/wi_xid.h
+++ b/libsrc/Wi/wi_xid.h
@@ -1,14 +1,14 @@
 /*
  *  wi_xid.h
  *
- *  $Id: wi_xid.h,v 1.4.2.2 2009/06/19 10:23:39 source Exp $
+ *  $Id: wi_xid.h,v 1.4.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  Functions to deal with XID structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/widd.h b/libsrc/Wi/widd.h
index e39f9fd..31491bd 100644
--- a/libsrc/Wi/widd.h
+++ b/libsrc/Wi/widd.h
@@ -1,14 +1,14 @@
 /*
  *  widd.h
  *
- *  $Id: widd.h,v 1.6.2.7 2011/02/14 11:48:50 source Exp $
+ *  $Id: widd.h,v 1.6.2.8 2012/03/08 12:55:38 source Exp $
  *
  *  Data Dictionary
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/widisk.h b/libsrc/Wi/widisk.h
index 22ec39c..6b63963 100644
--- a/libsrc/Wi/widisk.h
+++ b/libsrc/Wi/widisk.h
@@ -1,14 +1,14 @@
 /*
  *  widisk.h
  *
- *  $Id: widisk.h,v 1.12.2.8 2010/02/24 13:02:42 source Exp $
+ *  $Id: widisk.h,v 1.12.2.11 2012/03/15 13:57:11 source Exp $
  *
  *  Disk Based Data Structures
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -48,8 +48,8 @@ typedef uint32 dp_addr_t;	/* must be exactly 32 bits wide */
 
 typedef unsigned char * db_buf_t;
 
-
 #define PAGE_SZ			8192
+#define KILOS_PER_PAGE (PAGE_SZ/1024)
 #define PAGE_DATA_SZ		(PAGE_SZ - DP_DATA)
 
 #define ROW_ALIGN(s) ALIGN_2(s)
@@ -357,6 +357,7 @@ struct wi_database_s
     int32	db_stripe_unit;
     int32	db_extent_size;
     int32	db_initial_gen;
+    char 	db_id[16];
   };
 
 struct disk_stripe_s
diff --git a/libsrc/Wi/widv.h b/libsrc/Wi/widv.h
index 2d2e457..a97c1c6 100644
--- a/libsrc/Wi/widv.h
+++ b/libsrc/Wi/widv.h
@@ -1,12 +1,12 @@
 /*
  *  widv.h
  *
- *  $Id: widv.h,v 1.16.2.4 2010/05/07 09:14:32 source Exp $
+ *  $Id: widv.h,v 1.16.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wifn.h b/libsrc/Wi/wifn.h
index 0cbe542..9055e4c 100644
--- a/libsrc/Wi/wifn.h
+++ b/libsrc/Wi/wifn.h
@@ -1,14 +1,14 @@
 /*
  *  wifn.h
  *
- *  $Id: wifn.h,v 1.40.2.24 2011/03/11 12:17:30 source Exp $
+ *  $Id: wifn.h,v 1.40.2.30 2012/03/08 12:55:38 source Exp $
  *
  *  Internal Functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -42,6 +42,7 @@ extern numeric_t num_int64_min;
 void db_buf_length  (unsigned char * buf, long * head_ret, long * len_ret);
 int box_serial_length (caddr_t box, dtp_t dtp);
 extern short db_buf_const_length [256];
+extern dtp_t dtp_canonical[256];
 
 int  dv_composite_cmp (db_buf_t dv1, db_buf_t dv2, collation_t * coll);
 int dv_compare (db_buf_t dv1, db_buf_t dv2, collation_t *collation, unsigned short offset);
@@ -541,7 +542,7 @@ void  page_row_bm (buffer_desc_t * buf, int irow, row_delta_t * rd, int op, it_c
 caddr_t rd_col (row_delta_t * rd, oid_t cid, int * found);
 int key_col_in_layout_seq (dbe_key_t * key, dbe_column_t * col);
 void kc_var_col (dbe_key_t * key, buffer_desc_t * buf, db_buf_t row, dbe_col_loc_t * cl, db_buf_t * p1, row_size_t * len1, db_buf_t * buf2, row_size_t* len2, unsigned short * offset);
-void pf_fill_registered (page_fill_t * pf, buffer_desc_t * buf);
+void pf_fill_registered (page_fill_t * pf, buffer_desc_t * buf, it_cursor_t * itc);
 int page_reloc_right_leaves (it_cursor_t * itc, buffer_desc_t * buf);
 void pf_change_org (page_fill_t * pf);
 void page_reg_past_end (buffer_desc_t * buf);
@@ -658,7 +659,11 @@ extern int case_mode;
 int casemode_strcmp (const char *s1, const char *s2);
 int casemode_strncmp (const char *s1, const char *s2, size_t n);
 
-caddr_t sqlp_box_id_upcase (const char *str);
+caddr_t DBG_NAME (sqlp_box_id_upcase) (DBG_PARAMS const char *str);
+#ifdef MALLOC_DEBUG
+#define sqlp_box_id_upcase(s) dbg_sqlp_box_id_upcase (__FILE__, __LINE__, s)
+#endif
+caddr_t t_sqlp_box_id_upcase (const char *str);
 void sqlp_upcase (char *str);
 caddr_t sqlp_box_upcase (const char *str);
 
@@ -834,7 +839,7 @@ int itc_print_blob_col_non_txn (it_cursor_t * row_itc, dk_session_t * row, caddr
 int bh_fill_buffer_from_blob (index_tree_t * it, lock_trx_t * lt, blob_handle_t * bh,
     caddr_t outbuf, long get_bytes);
 void blob_chain_delete (it_cursor_t * it, blob_layout_t *bl);
-void blob_send_bytes (lock_trx_t * lt, caddr_t bh, long n_bytes, int send_position);
+void blob_send_bytes (lock_trx_t * lt, caddr_t bh, long n_bytes, int send_position, long blob_type);
 void lt_write_blob_log (lock_trx_t * lt, dk_session_t * log_ses);
 dk_session_t * blob_to_string_output_isp (lock_trx_t * lt, caddr_t bhp);
 typedef struct blob_log_s
@@ -1065,7 +1070,10 @@ extern name_id_cache_t * iri_prefix_cache;
 extern name_id_cache_t * rdf_lang_cache;
 extern name_id_cache_t * rdf_type_cache;
 boxint nic_name_id (name_id_cache_t * nic, char * name);
-caddr_t  nic_id_name (name_id_cache_t * nic, boxint id);
+caddr_t DBG_NAME(nic_id_name) (DBG_PARAMS name_id_cache_t * nic, boxint id);
+#ifdef MALLOC_DEBUG
+#define nic_id_name(nic,id) DBG_NAME(nic_id_name) (__FILE__, __LINE__, (nic), (id))
+#endif
 void nic_set (name_id_cache_t * nic, caddr_t name, boxint id);
 boxint  lt_nic_name_id (lock_trx_t * lt, name_id_cache_t * nic, caddr_t name);
 caddr_t  lt_nic_id_name (lock_trx_t * lt, name_id_cache_t * nic, boxint id);
diff --git a/libsrc/Wi/wirpc.c b/libsrc/Wi/wirpc.c
index 12f4841..702a65e 100644
--- a/libsrc/Wi/wirpc.c
+++ b/libsrc/Wi/wirpc.c
@@ -1,14 +1,14 @@
 /*
  *  wirpc.c
  *
- *  $Id: wirpc.c,v 1.2.2.2 2011/01/05 12:51:53 source Exp $
+ *  $Id: wirpc.c,v 1.2.2.4 2012/03/08 12:55:38 source Exp $
  *
  *  Global RPC call hooks
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -82,7 +82,7 @@ SERVICE_9 (s_get_data_ac , _sgbt2, "GETDA", DA_FUTURE_REQUEST,
 	DV_LONG_INT,		1,/* frag_no */
 	DV_LONG_INT,		1,/* page dir 1st page */
 	DV_LONG_STRING,		1,/* the array of page nos */
-	DV_LONG_INT,		1,/* is_wide? */
+	DV_LONG_INT,		1,/* is_wide or is_bin ? */
 	DV_LONG_INT,            1);/* blob timestamp */
 
 
diff --git a/libsrc/Wi/wirpce.h b/libsrc/Wi/wirpce.h
index 163d1df..039d6f7 100644
--- a/libsrc/Wi/wirpce.h
+++ b/libsrc/Wi/wirpce.h
@@ -1,12 +1,12 @@
 /*
  *  wirpce.h
  *
- *  $Id: wirpce.h,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: wirpce.h,v 1.2.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wiservic.c b/libsrc/Wi/wiservic.c
index d70d32c..f9631b9 100644
--- a/libsrc/Wi/wiservic.c
+++ b/libsrc/Wi/wiservic.c
@@ -1,14 +1,14 @@
 /*
  *  wiservic.c
  *
- *  $Id: wiservic.c,v 1.3.2.2 2010/05/21 12:40:48 source Exp $
+ *  $Id: wiservic.c,v 1.3.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  Windows NT services
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wiservic.h b/libsrc/Wi/wiservic.h
index 111700d..6ee0367 100644
--- a/libsrc/Wi/wiservic.h
+++ b/libsrc/Wi/wiservic.h
@@ -1,12 +1,12 @@
 /*
  *  wiservic.h
  *
- *  $Id: wiservic.h,v 1.3.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: wiservic.h,v 1.3.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsdl2rdf.xsl b/libsrc/Wi/wsdl2rdf.xsl
index 78552f0..478fba4 100644
--- a/libsrc/Wi/wsdl2rdf.xsl
+++ b/libsrc/Wi/wsdl2rdf.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" ?>
 <!--
  -
- -  $Id: wsdl2rdf.xsl,v 1.1.2.1 2009/04/16 09:48:07 source Exp $
+ -  $Id: wsdl2rdf.xsl,v 1.1.2.2 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2009 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsdl_expand.xsl b/libsrc/Wi/wsdl_expand.xsl
index 8d9375b..dcad164 100644
--- a/libsrc/Wi/wsdl_expand.xsl
+++ b/libsrc/Wi/wsdl_expand.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -
- -  $Id: wsdl_expand.xsl,v 1.4.2.1 2010/11/05 10:56:48 source Exp $
+ -  $Id: wsdl_expand.xsl,v 1.4.2.2 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsdl_import.xsl b/libsrc/Wi/wsdl_import.xsl
index 64938fc..ff5c4a5 100644
--- a/libsrc/Wi/wsdl_import.xsl
+++ b/libsrc/Wi/wsdl_import.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -
- -  $Id: wsdl_import.xsl,v 1.5.2.1 2010/11/05 10:56:49 source Exp $
+ -  $Id: wsdl_import.xsl,v 1.5.2.2 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsdl_parts.xsl b/libsrc/Wi/wsdl_parts.xsl
index 337c9bd..8fc3817 100644
--- a/libsrc/Wi/wsdl_parts.xsl
+++ b/libsrc/Wi/wsdl_parts.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -
- -  $Id: wsdl_parts.xsl,v 1.4 2009/04/09 13:22:15 source Exp $
+ -  $Id: wsdl_parts.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsrp_error.xsl b/libsrc/Wi/wsrp_error.xsl
index 78ecbb7..7465a31 100644
--- a/libsrc/Wi/wsrp_error.xsl
+++ b/libsrc/Wi/wsrp_error.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wsrp_error.xsl,v 1.4 2009/04/09 13:22:15 source Exp $
+ -  $Id: wsrp_error.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsrp_interm.xsl b/libsrc/Wi/wsrp_interm.xsl
index 35b3c6e..7134ba9 100644
--- a/libsrc/Wi/wsrp_interm.xsl
+++ b/libsrc/Wi/wsrp_interm.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wsrp_interm.xsl,v 1.4 2009/04/09 13:22:15 source Exp $
+ -  $Id: wsrp_interm.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsrp_resp.xsl b/libsrc/Wi/wsrp_resp.xsl
index 49b0f6e..289f14b 100644
--- a/libsrc/Wi/wsrp_resp.xsl
+++ b/libsrc/Wi/wsrp_resp.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wsrp_resp.xsl,v 1.4 2009/04/09 13:22:15 source Exp $
+ -  $Id: wsrp_resp.xsl,v 1.4.2.1 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/wsrp_ultim.xsl b/libsrc/Wi/wsrp_ultim.xsl
index cd23dfe..8374286 100644
--- a/libsrc/Wi/wsrp_ultim.xsl
+++ b/libsrc/Wi/wsrp_ultim.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
  -
- -  $Id: wsrp_ultim.xsl,v 1.3 2007/03/16 09:56:12 source Exp $
+ -  $Id: wsrp_ultim.xsl,v 1.3.2.1 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2007 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xml.h b/libsrc/Wi/xml.h
index 7f859f3..aebee6f 100644
--- a/libsrc/Wi/xml.h
+++ b/libsrc/Wi/xml.h
@@ -1,12 +1,12 @@
 /*
  *  xml.h
  *
- *  $Id: xml.h,v 1.4.2.1 2009/04/18 21:55:17 source Exp $
+ *  $Id: xml.h,v 1.4.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xml_a.sql b/libsrc/Wi/xml_a.sql
index 65dbb16..69c814f 100644
--- a/libsrc/Wi/xml_a.sql
+++ b/libsrc/Wi/xml_a.sql
@@ -1,10 +1,10 @@
 --
---  $Id: xml_a.sql,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+--  $Id: xml_a.sql,v 1.2.2.2 2012/03/08 12:55:38 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xml_view.sql b/libsrc/Wi/xml_view.sql
index c9101e6..aa7c687 100644
--- a/libsrc/Wi/xml_view.sql
+++ b/libsrc/Wi/xml_view.sql
@@ -1,14 +1,14 @@
 --
 --  xml_view.sql
 --
---  $Id: xml_view.sql,v 1.2.2.1 2009/04/18 21:55:17 source Exp $
+--  $Id: xml_view.sql,v 1.2.2.2 2012/03/08 12:55:38 source Exp $
 --
 --  Publishing xml views as WebDAV resources.
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmla.sql b/libsrc/Wi/xmla.sql
index 4397d0f..5a2be62 100644
--- a/libsrc/Wi/xmla.sql
+++ b/libsrc/Wi/xmla.sql
@@ -1,10 +1,10 @@
 --
---  $Id: xmla.sql,v 1.14.2.2 2010/08/31 12:12:00 source Exp $
+--  $Id: xmla.sql,v 1.14.2.10 2012/03/15 13:41:27 source Exp $
 --
 --  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 --  project.
 --
---  Copyright (C) 1998-2006 OpenLink Software
+--  Copyright (C) 1998-2012 OpenLink Software
 --
 --  This project is free software; you can redistribute it and/or modify it
 --  under the terms of the GNU General Public License as published by the
@@ -342,7 +342,7 @@ create procedure
 	    stmt := sprintf ('SELECT CAST (%s as VARCHAR)', stmt);
 	    tree := sql_parse (stmt);
 	  }
-	if (tree [0] <> 100)
+	if (tree [0] <> 100 and tree[0] <> 113)
 	  {
 	    if (registry_get ('XMLA-DML') = '1')
 	      {
@@ -350,11 +350,27 @@ create procedure
 		stmt_is_ddl := 1;
 	      }
 	    else
-	   signal ('00004', 'Only select statements are supported via XML for Analysis provider');
+	      signal ('00004', 'Only select statements are supported via XML for Analysis provider');
 	  }
-	   res := exec (stmt, state, msg, vector (), 0, mdta, dta);
+	res := exec (stmt, state, msg, vector (), 0, mdta, dta);
 	if (isinteger (dta))
 	  dta := vector (vector (dta));
+        if ((1 = length (dta)) and (1 = length (dta[0])) and (214 = __tag (dta[0][0])))
+	  {
+	    declare triples, inx any;
+	    triples := dict_list_keys (dta[0][0], 1);
+	    for (inx := 0; inx < length (triples); inx := inx + 1)
+	      {
+		declare trip any;
+		trip := triples [inx];
+		trip [0] := __ro2sq (trip[0]);
+		trip [1] := __ro2sq (trip[1]);
+		trip [2] := __ro2sq (trip[2]);
+		triples [inx] := trip;
+	      }
+	    dta := triples;
+	    exec_metadata ('select \'\' as S, \'\' as P, \'\' as O any', state, msg, mdta);
+	  }
 --  	if (strstr (stmt, 'FROM DB.DBA.SYS_FOREIGN_KEYS'))
 --    	   xmla_add_quot_to_table (dta);
 	blob_limit := atoi (xmla_get_property ("Properties", 'BLOBLimit', '0'));
@@ -657,6 +673,8 @@ xmla_dbschema_catalogs () for xmla_discover
   dsn := self.xmla_get_property ('DataSourceInfo', xmla_service_name ());
   dsn := xmla_get_dsn_name (dsn);
   cat := self.xmla_get_restriction ('CATALOG_NAME', '%');
+  if (cat is null)
+    cat := '%';
 
   if (not xmla_not_local_dsn (dsn))
     {
@@ -790,6 +808,8 @@ xmla_make_element (in mdta any, in dta any)
       aset (res, i1, mdta[i][0]);
       if (mdta[i][1] = 131 and not isblob(dta[i]))
 	 aset (res, i2, cast (dta[i] as varbinary));
+      else if (mdta[i][1] = 219 and 219 <> __tag (dta[i]))
+	 aset (res, i2, cast (dta[i] as decimal));
       else
          aset (res, i2, dta[i]);
       i := i + 1;
@@ -812,6 +832,15 @@ create method xmla_dbschema_columns () for xmla_discover
   sch := self.xmla_get_restriction ('TABLE_SCHEMA', '%');
   tb := self.xmla_get_restriction ('TABLE_NAME', '%');
   col := self.xmla_get_restriction ('COLUMN_NAME', '%');
+  if (cat is null)
+    cat := '%';
+  if (sch is null)
+    sch := '%';
+  if (tb is null)
+    tb := '%';
+  if (col is null)
+    col := '%';
+
   if (not xmla_not_local_dsn (dsn))
     {
       declare uname, passwd varchar;
@@ -820,49 +849,49 @@ create method xmla_dbschema_columns () for xmla_discover
       if (uname is null or passwd is null)
 	signal ('00002', 'Unable to process the request, because the UserName property is not set or incorrect');
       set_user_id (uname, 1, passwd);
-      exec ('select
-	         name_part(KEY_TABLE, 0) as TABLE_CATALOG,
-	         name_part(KEY_TABLE, 1) as TABLE_SCHEMA,
-	         name_part(KEY_TABLE, 2) as TABLE_NAME,
-	         "COLUMN" as COLUMN_NAME,'
-		 || ' NULL as COLUMN_GUID,'
-		 || ' NULL as COLUMN_PROPID INTEGER,'
-		 || ' (select count(*) from DB.DBA.SYS_COLS where "TABLE" = KEY_TABLE and COL_ID <= c.COL_ID and "COLUMN" <> ''_IDN'') as ORDINAL_POSITION INTEGER,'
-		 || ' case when deserialize(COL_DEFAULT) is null then 0 else -1 end as COLUMN_HASDEFAULT SMALLINT,'
-		 || ' cast (deserialize(COL_DEFAULT) as NVARCHAR) as COLUMN_DEFAULT NVARCHAR(254),'
-		 || ' cast (DB.DBA.oledb_dbflags(COL_DTP, COL_NULLABLE) as integer) as COLUMN_FLAGS INTEGER,'
-		 || ' case COL_NULLABLE when 1 then -1 else 0 end as IS_NULLABLE SMALLINT,'
-		 || ' cast (DB.DBA.oledb_dbtype(COL_DTP) as integer) as DATA_TYPE SMALLINT,'
-		 || ' NULL as TYPE_GUID,'
-		 || ' cast (DB.DBA.oledb_char_max_len(COL_DTP, COL_PREC) as integer) as CHARACTER_MAXIMUM_LENGTH INTEGER,'
-		 || ' cast (DB.DBA.oledb_char_oct_len(COL_DTP, COL_PREC) as integer) as CHARACTER_OCTET_LENGTH INTEGER,'
-		 || ' cast (DB.DBA.oledb_num_prec(COL_DTP, COL_PREC) as smallint) as NUMERIC_PRECISION SMALLINT,'
-		 || ' cast (DB.DBA.oledb_num_scale(COL_DTP, COL_SCALE) as smallint) as NUMERIC_SCALE SMALLINT,'
-		 || ' cast (DB.DBA.oledb_datetime_prec(COL_DTP, COL_PREC) as integer) as DATETIME_PRECISION INTEGER,'
-		 || ' NULL as CHARACTER_SET_CATALOG NVARCHAR(1),'
-		 || ' NULL as CHARACTER_SET_SCHEMA NVARCHAR(1),'
-		 || ' NULL as CHARACTER_SET_NAME NVARCHAR(1),'
-		 || ' NULL as COLLATION_CATALOG NVARCHAR(1),'
-		 || ' NULL as COLLATION_SCHEMA NVARCHAR(1),'
-		 || ' NULL as COLLATION_NAME NVARCHAR(1),'
-		 || ' NULL as DOMAIN_CATALOG NVARCHAR(1),'
-		 || ' NULL as DOMAIN_SCHEMA NVARCHAR(1),'
-		 || ' NULL as DOMAIN_NAME NVARCHAR(1),'
-		 || ' NULL as DESCRIPTION NVARCHAR(1) ' ||
-	       'from DB.DBA.SYS_KEYS, DB.DBA.SYS_KEY_PARTS, DB.DBA.SYS_COLS c
-	       where
-	          __any_grants(KEY_TABLE) and
-		  name_part(KEY_TABLE, 0) = ? and
-		  name_part(KEY_TABLE, 1) like ? and
-		  name_part(KEY_TABLE, 2) like ? and
-		  "COLUMN" like ? and
-		  "COLUMN" <> ''_IDN'' and
-		  KEY_IS_MAIN = 1 and
-		  KEY_MIGRATE_TO is null and
-		  KP_KEY_ID = KEY_ID and
-		  COL_ID = KP_COL order by KEY_TABLE, 7'
-		  , null, null,
-	  vector (cat, sch, tb, col), 0, mdta, dta);
+      exec('select
+	 name_part(KEY_TABLE, 0) as TABLE_CATALOG,
+	 name_part(KEY_TABLE, 1) as TABLE_SCHEMA,
+	 name_part(KEY_TABLE, 2) as TABLE_NAME,
+	 "COLUMN" as COLUMN_NAME,
+	 NULL as COLUMN_GUID,
+	 NULL as COLUMN_PROPID INTEGER,
+	 (select count(*) from DB.DBA.SYS_COLS where "TABLE" = KEY_TABLE and COL_ID <= c.COL_ID and "COLUMN" <> ''_IDN'') as ORDINAL_POSITION INTEGER,
+	 case when deserialize(COL_DEFAULT) is null then 0 else -1 end as COLUMN_HASDEFAULT SMALLINT,
+         cast (deserialize(COL_DEFAULT) as NVARCHAR) as COLUMN_DEFAULT NVARCHAR(254),
+         cast (DB.DBA.oledb_dbflags(COL_DTP, COL_NULLABLE) as integer) as COLUMN_FLAGS INTEGER,
+	 case COL_NULLABLE when 1 then -1 else 0 end as IS_NULLABLE SMALLINT,
+	 cast (DB.DBA.oledb_dbtype(COL_DTP) as integer) as DATA_TYPE SMALLINT,
+	 NULL as TYPE_GUID,
+	 cast (DB.DBA.oledb_char_max_len(COL_DTP, COL_PREC) as integer) as CHARACTER_MAXIMUM_LENGTH INTEGER,
+	 cast (DB.DBA.oledb_char_oct_len(COL_DTP, COL_PREC) as integer) as CHARACTER_OCTET_LENGTH INTEGER,
+	 cast (DB.DBA.oledb_num_prec(COL_DTP, COL_PREC) as smallint) as NUMERIC_PRECISION SMALLINT,
+	 cast (DB.DBA.oledb_num_scale(COL_DTP, COL_SCALE) as smallint) as NUMERIC_SCALE SMALLINT,
+	 cast (DB.DBA.oledb_datetime_prec(COL_DTP, COL_PREC) as integer) as DATETIME_PRECISION INTEGER,
+	 NULL as CHARACTER_SET_CATALOG NVARCHAR(1),
+	 NULL as CHARACTER_SET_SCHEMA NVARCHAR(1),
+	 NULL as CHARACTER_SET_NAME NVARCHAR(1),
+	 NULL as COLLATION_CATALOG NVARCHAR(1),
+	 NULL as COLLATION_SCHEMA NVARCHAR(1),
+	 NULL as COLLATION_NAME NVARCHAR(1),
+	 NULL as DOMAIN_CATALOG NVARCHAR(1),
+	 NULL as DOMAIN_SCHEMA NVARCHAR(1),
+	 NULL as DOMAIN_NAME NVARCHAR(1),
+	 NULL as DESCRIPTION NVARCHAR(1)
+    	from DB.DBA.SYS_KEYS, DB.DBA.SYS_KEY_PARTS, DB.DBA.SYS_COLS c
+    	where
+	 __any_grants(KEY_TABLE) and
+	 name_part(KEY_TABLE, 0) = ? and
+	 name_part(KEY_TABLE, 1) like ? and
+	 name_part(KEY_TABLE, 2) like ? and
+	 "COLUMN" like ? and
+	 "COLUMN" <> ''_IDN'' and
+	 KEY_IS_MAIN = 1 and
+	 KEY_MIGRATE_TO is null and
+	 KP_KEY_ID = KEY_ID and
+	 COL_ID = KP_COL order by KEY_TABLE, 7'
+       , null, null,
+      vector (cat, sch, tb, col), 0, mdta, dta);
     }
   else
     {
@@ -888,53 +917,102 @@ create method xmla_dbschema_columns () for xmla_discover
 create method xmla_dbschema_foreign_keys () for xmla_discover
 {
   declare dta, mdta, stmt, state, msg any;
-  declare dsn, cat, tb, col, sch any;
-  declare uname, passwd, _tbl varchar;
+  declare dsn any;
+  declare p_cat, p_tbl, p_sch any;
+  declare f_cat, f_tbl, f_sch any;
+  declare _ptbl, _ftbl varchar;
 
   dsn := self.xmla_get_property ('DataSourceInfo', xmla_service_name ());
   dsn := xmla_get_dsn_name (dsn);
-  cat := self.xmla_get_restriction ('PK_TABLE_CATALOG', '%');
-  sch := self.xmla_get_restriction ('TABLE_SCHEMA', '%');
-  tb := self.xmla_get_restriction ('TABLE_NAME', '%');
-  cat := trim (cat, '"');
-  sch := trim (sch, '"');
-  tb := trim (tb, '"');
-  uname := self.xmla_get_property ('UserName', null);
-  passwd := self.xmla_get_property ('Password', null);
-  _tbl := cat || '.' || sch || '.' || tb;
 
-  if (uname is null or passwd is null)
-     signal ('00002', 'Unable to process the request, because the UserName property is not set or incorrect');
+  p_cat := self.xmla_get_restriction ('PK_TABLE_CATALOG', '%');
+  p_sch := self.xmla_get_restriction ('PK_TABLE_SCHEMA', '%');
+  p_tbl := self.xmla_get_restriction ('PK_TABLE_NAME', '%');
+  f_cat := self.xmla_get_restriction ('FK_TABLE_CATALOG', '%');
+  f_sch := self.xmla_get_restriction ('FK_TABLE_SCHEMA', '%');
+  f_tbl := self.xmla_get_restriction ('FK_TABLE_NAME', '%');
+
+  if (p_cat is null) 
+  {
+    if (f_cat is not null)
+      p_cat := f_cat;
+    else
+      p_cat := '%';
+  }
+
+  if (f_cat is null)
+  { 
+    if (p_cat is not null)
+      f_cat := p_cat;
+    else
+      f_cat := '%';
+  }
+
+  if (p_sch is null)
+    p_sch := '%';
+  if (p_tbl is null)
+    p_tbl := '%';
+  if (f_sch is null)
+    f_sch := '%';
+  if (f_tbl is null)
+    f_tbl := '%';
+
+  p_cat := trim (p_cat, '"');
+  p_sch := trim (p_sch, '"');
+  p_tbl := trim (p_tbl, '"');
+  f_cat := trim (f_cat, '"');
+  f_sch := trim (f_sch, '"');
+  f_tbl := trim (f_tbl, '"');
+  _ptbl := p_cat || '.' || p_sch || '.' || p_tbl;
+  _ftbl := f_cat || '.' || f_sch || '.' || f_tbl;
 
   if (not xmla_not_local_dsn (dsn))
     {
+      declare uname, passwd varchar;
+      uname := self.xmla_get_property ('UserName', null);
+      passwd := self.xmla_get_property ('Password', null);
+      if (uname is null or passwd is null)
+	signal ('00002', 'Unable to process the request, because the UserName property is not set or incorrect');
       set_user_id (uname, 1, passwd);
-      if (exists (select 1 from DB.DBA.SYS_REMOTE_TABLE where RT_NAME like _tbl))
-	{
-	    declare _dsn, r_name, _rt_name any;
-	    select RT_DSN, RT_REMOTE_NAME, RT_NAME into _dsn, r_name, _rt_name
-		from DB.DBA.SYS_REMOTE_TABLE where RT_NAME like _tbl;
-	    r_name := '%.' || r_name;
-       	    stmt := 'SELECT * FROM DB.DBA.SYS_FOREIGN_KEYS_VIEW WHERE PK_TABLE = ''' || r_name ||
-			''' AND FK_TABLE = ''' || _rt_name
-	       			|| ''' AND DSN = ''' || xmla_get_dsn_name (_dsn) || '''';
-	}
-      else
-        stmt := 'SELECT name_part (PK_TABLE, 1) as PK_TABLE_SCHEMA,
-		 name_part (PK_TABLE, 2) as PK_TABLE_NAME, PKCOLUMN_NAME as PK_COLUMN_NAME,
-		 name_part (FK_TABLE, 1) as FK_TABLE_SCHEMA,
-		 name_part (FK_TABLE, 2) as FK_TABLE_NAME, FKCOLUMN_NAME AS FK_COLUMN_NAME,
-		 KEY_SEQ, UPDATE_RULE, DELETE_RULE, FK_NAME
-		 FROM DB.DBA.SYS_FOREIGN_KEYS WHERE PK_TABLE like ''' || _tbl || ''' OR FK_TABLE like ''' || _tbl || '''';
+      exec('select
+    	 name_part (PK_TABLE, 0) as PK_TABLE_CATALOG varchar (128),
+    	 name_part (PK_TABLE, 1) as PK_TABLE_SCHEMA varchar (128),
+    	 name_part (PK_TABLE, 2) as PK_TABLE_NAME varchar (128),
+    	 PKCOLUMN_NAME as PK_COLUMN_NAME,
+    	 NULL as PK_COLUMN_GUID,
+    	 NULL as PK_COLUMN_PROPID INTEGER,
+    	 name_part (FK_TABLE, 0) as FK_TABLE_CATALOG varchar (128),
+	 name_part (FK_TABLE, 1) as FK_TABLE_SCHEMA varchar (128),
+    	 name_part (FK_TABLE, 2) as FK_TABLE_NAME varchar (128),
+    	 FKCOLUMN_NAME as FK_COLUMN_NAME,
+    	 NULL as FK_COLUMN_GUID,
+    	 NULL as FK_COLUMN_PROPID INTEGER,
+    	 (KEY_SEQ + 1) as ORDINAL INTEGER,
+    	 (case UPDATE_RULE when 0 then ''NO ACTION'' when 1 then ''CASCADE'' when 2 then ''SET NULL'' when 3 then ''SET DEFAULT'' else NULL end) as UPDATE_RULE varchar(20),
+    	 (case DELETE_RULE when 0 then ''NO ACTION'' when 1 then ''CASCADE'' when 2 then ''SET NULL'' when 3 then ''SET DEFAULT'' else NULL end) as DELETE_RULE varchar(20),
+	 PK_NAME, 
+	 FK_NAME,
+    	 3 as DEFERRABILITY SMALLINT
+    	from DB.DBA.SYS_FOREIGN_KEYS SYS_FOREIGN_KEYS
+    	where name_part (PK_TABLE, 0) like ?
+    	 and name_part (PK_TABLE, 1) like ?
+    	 and name_part (PK_TABLE, 2) like ?
+    	 and name_part (FK_TABLE, 0) like ?
+    	 and name_part (FK_TABLE, 1) like ?
+    	 and name_part (FK_TABLE, 2) like ?
+    	order by 1, 2, 3, 7, 8, 9, 13 '
+    	, null, null,
+      	vector(p_cat, p_sch, p_tbl, f_cat, f_sch, f_tbl), 0, mdta, dta);
     }
   else
     {
        dsn := xmla_get_dsn_name (dsn);
-       stmt := 'SELECT * FROM DB.DBA.SYS_FOREIGN_KEYS_VIEW WHERE PK_TABLE = ''' || _tbl || ''' AND FK_TABLE = ''' || _tbl
-	       || ''' AND DSN = ''' || dsn || '''';
+       stmt := 'SELECT * FROM DB.DBA.SYS_FOREIGN_KEYS_VIEW WHERE PK_TABLE = ''' 
+       		|| _ptbl || ''' AND FK_TABLE = ''' || _ftbl
+	       	|| ''' AND DSN = ''' || dsn || '''';
+       exec (stmt, state, msg, vector (), 0, mdta, dta);
     }
 
-  exec (stmt, state, msg, vector (), 0, mdta, dta);
   xmla_make_struct (mdta, dta);
   self.metadata := mdta;
   return dta;
@@ -946,35 +1024,66 @@ create method xmla_dbschema_primary_keys () for xmla_discover
 {
   declare state, msg, dta, mdta, stmt any;
   declare dsn, cat, tb, col, sch any;
-  declare uname, passwd, _tbl varchar;
+  declare _tbl varchar;
 
   dsn := self.xmla_get_property ('DataSourceInfo', xmla_service_name ());
   dsn := xmla_get_dsn_name (dsn);
   cat := self.xmla_get_restriction ('TABLE_CATALOG', '%');
   sch := self.xmla_get_restriction ('TABLE_SCHEMA', '%');
   tb := self.xmla_get_restriction ('TABLE_NAME', '%');
-  uname := self.xmla_get_property ('UserName', null);
-  passwd := self.xmla_get_property ('Password', null);
+
+  if (cat is null)
+    cat := '%';
+  if (sch is null)
+    sch := '%';
+  if (tb is null)
+    tb := '%';
+  
   cat := trim (cat, '"');
   sch := trim (sch, '"');
   tb := trim (tb, '"');
   _tbl := cat || '.' || sch || '.' || tb;
 
-  if (uname is null or passwd is null)
-     signal ('00002', 'Unable to process the request, because the UserName property is not set or incorrect');
-
   if (not xmla_not_local_dsn (dsn))
     {
+      declare uname, passwd varchar;
+      uname := self.xmla_get_property ('UserName', null);
+      passwd := self.xmla_get_property ('Password', null);
+      if (uname is null or passwd is null)
+	signal ('00002', 'Unable to process the request, because the UserName property is not set or incorrect');
       set_user_id (uname, 1, passwd);
-      stmt := sprintf ('SELECT COLUMN_NAME FROM %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS LEFT JOIN %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE ON %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_NAME = %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE.CONSTRAINT_NAME WHERE  CONSTRAINT_TYPE = ''PRIMARY KEY'' AND %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_NAME=''%s'' AND %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.TABLE_SCHEMA=''%s'' AND %s.INFORMATION_SCHEMA.TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA=''%s'' AND %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE.TABLE_SCHEMA=''%s'' AND %s.INFORMATION_SCHEMA.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA=''%s''', cat, cat, cat, cat, cat, tb, cat, sch, cat, sch, cat, sch, cat, sch);
+      exec('select
+    	 name_part(KEY_TABLE, 0) AS TABLE_CATALOG NVARCHAR(128),
+    	 name_part(KEY_TABLE, 1) AS TABLE_SCHEMA NVARCHAR(128),
+    	 name_part(KEY_TABLE, 2) AS TABLE_NAME NVARCHAR(128),
+    	 "COLUMN" as COLUMN_NAME NVARCHAR(128),
+    	 NULL as COLUMN_GUID,
+    	 NULL as COLUMN_POPID INTEGER,
+    	 (KP_NTH + 1) as ORDINAL,
+    	 name_part(KEY_NAME, 2) as PK_NAME
+    	from DB.DBA.SYS_KEYS, DB.DBA.SYS_KEY_PARTS, DB.DBA.SYS_COLS
+    	where
+    	 __any_grants(KEY_TABLE) and
+    	 name_part(KEY_TABLE, 0) LIKE ? and
+    	 name_part(KEY_TABLE, 1) LIKE ? and
+    	 name_part(KEY_TABLE, 2) LIKE ? and
+    	 KEY_IS_MAIN = 1 and
+    	 KEY_MIGRATE_TO is null and
+    	 KP_KEY_ID = KEY_ID and
+    	 KP_NTH < KEY_DECL_PARTS and
+    	 COL_ID = KP_COL and
+    	 "COLUMN" <> ''_IDN''
+    	order by KEY_TABLE'
+       	, null, null,
+      vector(cat, sch, tb), 0, mdta, dta);
     }
   else
     {
         dsn := xmla_get_dsn_name (dsn);
 	stmt := 'SELECT * FROM DB.DBA.SYS_PRIMARY_KEYS_VIEW WHERE PK_TABLE = ''' || _tbl || ''' AND DSN = ''' || dsn || '''';
+        exec (stmt, state, msg, vector (), 0, mdta, dta);
     }
 
-  exec (stmt, state, msg, vector (), 0, mdta, dta);
   xmla_make_struct (mdta, dta);
   self.metadata := mdta;
   return dta;
@@ -1066,13 +1175,21 @@ create method xmla_dbschema_provider_types () for xmla_discover
 create method xmla_dbschema_tables () for xmla_discover
 {
   declare dta, mdta any;
-  declare dsn, cat, tb any;
+  declare dsn, cat, sch, tb any;
 
   dsn := self.xmla_get_property ('DataSourceInfo', xmla_service_name ());
   dsn := xmla_get_dsn_name (dsn);
-  --cat := self.xmla_get_property ('Catalog', 'DB');
-  tb := self.xmla_get_restriction ('TABLE_NAME', '%');
   cat := self.xmla_get_restriction ('TABLE_CATALOG', 'DB');
+  sch := self.xmla_get_restriction ('TABLE_SCHEMA', '%');
+  tb := self.xmla_get_restriction ('TABLE_NAME', '%');
+
+  if (cat is null)
+    cat := 'DB';
+  if (sch is null)
+    sch := '%';
+  if (tb is null)
+    tb := '%';
+  
   if (not xmla_not_local_dsn (dsn))
     {
       declare uname, passwd varchar;
@@ -1092,9 +1209,12 @@ create method xmla_dbschema_tables () for xmla_discover
 		    NULL as DATE_MODIFIED DATE
 		    from DB.DBA.SYS_KEYS where
 		    __any_grants(KEY_TABLE) and
-		    name_part(KEY_TABLE, 0) = ? and name_part(KEY_TABLE, 2) like ?
-		    and KEY_IS_MAIN = 1 and KEY_MIGRATE_TO is null', null, null,
-	  vector (cat, tb), 0, mdta, dta);
+		    name_part(KEY_TABLE, 0) like ? and 
+		    name_part(KEY_TABLE, 1) like ? and
+		    name_part(KEY_TABLE, 2) like ?
+		    and KEY_IS_MAIN = 1 and 
+		    KEY_MIGRATE_TO is null', null, null,
+	  vector (cat, sch, tb), 0, mdta, dta);
     }
   else
     {
@@ -1132,12 +1252,11 @@ xmla_get_schs ()
 	 soap_box_structure ('TABLE_CATALOG', '', 'TABLE_SCHEMA', '', 'TABLE_NAME', '', 'TABLE_TYPE', '', 'COLUMN_NAME', '')
 	,''),
       vector ('DBSCHEMA_PRIMARY_KEYS',
-	 soap_box_structure ('TABLE_CATALOG', '', 'TABLE_SCHEMA', '', 'TABLE_NAME', '', 'TABLE_TYPE', '', 'COLUMN_NAME', '')
+	 soap_box_structure ('TABLE_CATALOG', '', 'TABLE_SCHEMA', '', 'TABLE_NAME', '')
 	,''),
       vector ('DBSCHEMA_FOREIGN_KEYS',
-	 soap_box_structure ('PK_TABLE_SCHEMA', '', 'PK_TABLE_NAME', '', 'PK_COLUMN_NAME', '',
-	   		     'FK_TABLE_SCHEMA', '', 'FK_TABLE_NAME', '', 'FK_COLUMN_NAME', '',
-			     'KEY_SEQ', '', 'UPDATE_RULE', '', 'DELETE_RULE', '', 'FK_NAME', '')
+	 soap_box_structure ('PK_TABLE_CATALOG', '', 'PK_TABLE_SCHEMA', '', 'PK_TABLE_NAME', '',
+	   		     'FK_TABLE_CATALOG', '', 'FK_TABLE_SCHEMA', '', 'FK_TABLE_NAME', '')
 	,''),
       vector ('DBSCHEMA_PROVIDER_TYPES',
 	 soap_box_structure ('DATA_TYPE', '', 'BEST_MATCH', '')
diff --git a/libsrc/Wi/xmlenc-dec.c b/libsrc/Wi/xmlenc-dec.c
index 1088799..bcd8c26 100644
--- a/libsrc/Wi/xmlenc-dec.c
+++ b/libsrc/Wi/xmlenc-dec.c
@@ -3,12 +3,12 @@
  *
  *  XML Encryption spec part 2 - decryption
  *
- *  $Id: xmlenc-dec.c,v 1.5.2.4 2010/10/07 23:31:46 source Exp $
+ *  $Id: xmlenc-dec.c,v 1.5.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlenc.c b/libsrc/Wi/xmlenc.c
index 23a9f5f..6e9f087 100644
--- a/libsrc/Wi/xmlenc.c
+++ b/libsrc/Wi/xmlenc.c
@@ -1,12 +1,12 @@
 /*
  *  xmlenc.c
  *
- *  $Id: xmlenc.c,v 1.16.2.14 2011/01/11 22:41:31 source Exp $
+ *  $Id: xmlenc.c,v 1.16.2.21 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -4587,8 +4587,8 @@ void xenc_generate_key_taglist (query_instance_t * qi, xenc_key_inst_t * xki, dk
 
 caddr_t *
 xenc_generate_security_tags (query_instance_t* qi, xpath_keyinst_t ** arr,
-				       dsig_signature_t * dsig, int generate_ref_list, caddr_t * err_ret,
-				       wsse_ser_ctx_t * sctx)
+    dsig_signature_t * dsig, int generate_ref_list, caddr_t * err_ret,
+    wsse_ser_ctx_t * sctx)
 {
   int inx;
   dk_set_t l = 0;
@@ -6284,6 +6284,7 @@ bif_xenc_x509_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   caddr_t * subj = (caddr_t *) bif_strict_array_or_null_arg (qst, args, 4, "xenc_x509_generate");
   caddr_t * exts = (caddr_t *) bif_strict_array_or_null_arg (qst, args, 5, "xenc_x509_generate");
   float hours = BOX_ELEMENTS (args) > 6 ? (float) bif_float_arg (qst, args, 6, "xenc_x509_generate") : 0;
+  caddr_t digest_name = BOX_ELEMENTS (args) > 7 ? bif_string_arg (qst, args, 7, "xenc_x509_generate") : "sha1";
   xenc_key_t * ca_key = xenc_get_key_by_name (key_name, 1);
   xenc_key_t * cli_key = xenc_get_key_by_name (cli_pub_key, 1);
   X509 *x = NULL;
@@ -6292,6 +6293,10 @@ bif_xenc_x509_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   DSA *dsa = NULL;
   X509_NAME *name = NULL;
   int i;
+  const EVP_MD *digest = EVP_get_digestbyname (digest_name);
+
+  if (!digest)
+    sqlr_new_error ("42000", "XECXX", "Cannot find digest %s", digest_name);
 
   /* check ca cert */
   if (!ca_key || !ca_key->xek_evp_private_key || !ca_key->xek_x509)
@@ -6397,7 +6402,7 @@ bif_xenc_x509_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
       x509_add_ext (x, nid, exts[i+1]);
     }
 
-  if (!X509_sign (x, pk, (pk->type == EVP_PKEY_RSA ? EVP_md5() : EVP_dss1()) ))
+  if (!X509_sign (x, pk, digest))
     {
       pk = NULL; /* keep one in the xenc_key */
       *err_ret = srv_make_new_error ("42000", "XECXX", "Can not sign certificate");
@@ -6423,6 +6428,8 @@ bif_xenc_x509_ss_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** arg
   long days = bif_long_arg (qst, args, 2, "xenc_x509_ss_generate");
   caddr_t * subj = (caddr_t *) bif_strict_array_or_null_arg (qst, args, 3, "xenc_x509_ss_generate");
   caddr_t * exts = (caddr_t *) bif_strict_array_or_null_arg (qst, args, 4, "xenc_x509_ss_generate");
+  float hours = BOX_ELEMENTS (args) > 5 ? (float) bif_float_arg (qst, args, 5, "xenc_x509_ss_generate") : 0;
+  caddr_t digest_name = BOX_ELEMENTS (args) > 6 ? bif_string_arg (qst, args, 6, "xenc_x509_ss_generate") : "sha1";
   xenc_key_t * key = xenc_get_key_by_name (key_name, 1);
   X509 *x = NULL;
   EVP_PKEY *pk = NULL;
@@ -6431,6 +6438,10 @@ bif_xenc_x509_ss_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** arg
   X509_NAME *name = NULL;
   char buf [512];
   int i;
+  const EVP_MD *digest = EVP_get_digestbyname (digest_name);
+
+  if (!digest)
+    sqlr_new_error ("42000", "XECXX", "Cannot find digest %s", digest_name);
 
   if (!key)
     {
@@ -6538,7 +6549,7 @@ bif_xenc_x509_ss_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** arg
       x509_add_ext (x, nid, exts[i+1]);
     }
 
-  if (!X509_sign (x, pk, (pk->type == EVP_PKEY_RSA ? EVP_md5() : EVP_dss1())))
+  if (!X509_sign (x, pk, digest))
     {
       pk = NULL; /* keep one in the xenc_key */
       *err_ret = srv_make_new_error ("42000", "XECXX", "Can not sign certificate : %s", get_ssl_error_text (buf, sizeof (buf)));
@@ -6558,6 +6569,306 @@ err:
 }
 
 static caddr_t
+bif_xenc_x509_csr_generate (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  static char * me = "xenc_x509_csr_generate";
+  caddr_t key_name = bif_string_arg (qst, args, 0, me);
+  caddr_t * subj = (caddr_t *) bif_strict_array_or_null_arg (qst, args, 1, me);
+  caddr_t * exts = (caddr_t *) bif_strict_array_or_null_arg (qst, args, 2, me);
+  xenc_key_t * key = xenc_get_key_by_name (key_name, 1);
+  X509_REQ *x = NULL;
+  EVP_PKEY *pk = NULL;
+  RSA *rsa = NULL;
+  DSA *dsa = NULL;
+  X509_NAME *name = NULL;
+  char buf [512];
+  int i;
+  BIO * b;
+  char *data_ptr;
+  int len;
+  caddr_t ret = NULL;
+  STACK_OF(X509_EXTENSION) *st_exts = NULL;
+
+  if (!key)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Missing key");
+      goto err;
+    }
+
+  if (key->xek_type != DSIG_KEY_RSA && key->xek_type != DSIG_KEY_DSA)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Key is not DSA nor RSA");
+      goto err;
+    }
+
+  rsa = key->xek_type == DSIG_KEY_RSA ? key->xek_private_rsa : NULL;
+  dsa = key->xek_type == DSIG_KEY_DSA ? key->xek_private_dsa : NULL;
+
+  if (!rsa && !dsa)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Missing private key");
+      goto err;
+    }
+
+  if ((BOX_ELEMENTS (subj) % 2) != 0)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Subject array must be name/value pairs");
+      goto err;
+    }
+
+  if ((BOX_ELEMENTS (exts) % 2) != 0)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Extension array must be name/value pairs");
+      goto err;
+    }
+
+  pk = key->xek_evp_private_key;
+
+  if (!pk)
+    {
+      if ((pk=EVP_PKEY_new()) == NULL)
+	{
+	  *err_ret = srv_make_new_error ("42000", "XECXX", "Can not create pkey");
+	  goto err;
+	}
+
+      if (rsa && !EVP_PKEY_assign_RSA (pk,rsa))
+	{
+	  *err_ret = srv_make_new_error ("42000", "XECXX", "Can not assign primary key");
+	  goto err;
+	}
+      else if (dsa && !EVP_PKEY_assign_DSA (pk,dsa))
+	{
+	  *err_ret = srv_make_new_error ("42000", "XECXX", "Can not assign primary key");
+	  goto err;
+	}
+      key->xek_evp_private_key = pk;
+    }
+
+
+  if ((x = X509_REQ_new()) == NULL)
+    {
+      *err_ret = srv_make_new_error ("42000", "XECXX", "Can not create x.509 structure");
+      goto err;
+    }
+
+
+  X509_REQ_set_pubkey (x, pk);
+  name = X509_REQ_get_subject_name(x);
+  st_exts = sk_X509_EXTENSION_new_null();
+
+  for (i = 0; i < BOX_ELEMENTS (subj); i += 2)
+    {
+      if (DV_STRINGP (subj[i]) && DV_STRINGP (subj[i + 1]) && box_length (subj[i + 1]) &&
+	  0 == X509_NAME_add_entry_by_txt (name, subj[i], MBSTRING_ASC, (unsigned char *) subj[i+1], -1, -1, 0))
+	{
+	  sqlr_warning ("01V01", "QW001", "Unknown name entry %s", subj[i]);
+	}
+    }
+
+  for (i = 0; i < BOX_ELEMENTS (exts); i += 2)
+    {
+      int nid;
+      X509_EXTENSION *ex;
+      if (!DV_STRINGP (exts[i]) || !DV_STRINGP (exts[i + 1]) || !box_length (exts[i + 1]))
+	continue;
+      nid = OBJ_sn2nid (exts[i]);
+      if (nid == NID_undef)
+	{
+	  sqlr_warning ("01V01", "QW001", "Unknown extension entry %s", exts[i]);
+	  continue;
+	}
+      ex = X509V3_EXT_conf_nid(NULL, NULL, nid, exts[i+1]);
+      if (ex)
+	sk_X509_EXTENSION_push(st_exts, ex);
+    }
+  X509_REQ_add_extensions(x, st_exts);
+  if (!X509_REQ_sign (x, pk, (pk->type == EVP_PKEY_RSA ? EVP_md5() : EVP_dss1())))
+    {
+      pk = NULL; /* keep one in the xenc_key */
+      *err_ret = srv_make_new_error ("42000", "XECXX", "Can not sign certificate : %s", get_ssl_error_text (buf, sizeof (buf)));
+      goto err;
+    }
+
+  b = BIO_new (BIO_s_mem());
+  PEM_write_bio_X509_REQ (b, x);
+  len = BIO_get_mem_data (b, &data_ptr);
+  if (len > 0 && data_ptr)
+    {
+      ret = dk_alloc_box (len + 1, DV_STRING);
+      memcpy (ret, data_ptr, len);
+      ret[len] = 0;
+    }
+  BIO_free (b);
+  X509_REQ_free (x);
+  sk_X509_EXTENSION_pop_free(st_exts, X509_EXTENSION_free);
+  return ret;
+err:
+  EVP_PKEY_free (pk);
+  X509_REQ_free (x);
+  sk_X509_EXTENSION_pop_free(st_exts, X509_EXTENSION_free);
+  return NEW_DB_NULL;
+}
+
+static caddr_t
+bif_xenc_x509_from_csr (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  static char * me = "xenc_x509_from_csr";
+  caddr_t key_name = bif_string_arg (qst, args, 0, me);
+  caddr_t cli_name = bif_string_arg (qst, args, 1, me);
+  caddr_t csr_str  = bif_string_arg (qst, args, 2, me);
+  long serial = bif_long_arg (qst, args, 3, me);
+  long days = bif_long_arg (qst, args, 4, me);
+  float hours = BOX_ELEMENTS (args) > 5 ? (float) bif_float_arg (qst, args, 5, me) : 0;
+  xenc_key_t * ca_key = xenc_get_key_by_name (key_name, 1), * k = xenc_get_key_by_name (cli_name, 1);
+  X509 *x = NULL;
+  X509_REQ *req = NULL;
+  EVP_PKEY *pk = NULL, *cli_pk = NULL;
+  RSA *rsa = NULL;
+  DSA *dsa = NULL;
+  char * enc_algoname, * sign_algoname;
+  X509_NAME *name = NULL, *xn;
+  int i;
+  BIO *b;
+  STACK_OF(X509_EXTENSION) *exts = NULL;
+  X509_EXTENSION *ext;
+
+  if (k)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "The key [%s] already exists", cli_name);
+      goto err;
+    }
+
+  /* check ca cert */
+  if (!ca_key || !ca_key->xek_evp_private_key || !ca_key->xek_x509)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Missing or invalid signer certificate");
+      goto err;
+    }
+
+  b = BIO_new (BIO_s_mem());
+  BIO_write (b, csr_str, box_length (csr_str) - 1);
+  req = PEM_read_bio_X509_REQ (b, NULL, NULL, NULL);
+  BIO_free (b);
+
+
+  if (!req)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Invalid certificate request");
+      goto err;
+    }
+
+  cli_pk = X509_REQ_get_pubkey(req);
+  if (!cli_pk)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Invalid certificate request public key");
+      goto err;
+    }
+
+  i = X509_REQ_verify (req, cli_pk);
+  if (i <= 0)
+    {
+      /* XXX: free */
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Signature did not match the certificate request");
+      goto err;
+    }
+
+  xn = X509_REQ_get_subject_name(req);
+  if (!xn)
+    {
+      *err_ret = srv_make_new_error ("22023", "XECXX", "Invalid certificate request subject name");
+      goto err;
+    }
+
+
+  pk = ca_key->xek_evp_private_key;
+
+  if ((x = X509_new()) == NULL)
+    {
+      *err_ret = srv_make_new_error ("42000", "XECXX", "Can not create x.509 structure");
+      goto err;
+    }
+
+
+  X509_set_version (x,2);
+  ASN1_INTEGER_set (X509_get_serialNumber (x), serial);
+  X509_gmtime_adj (X509_get_notBefore (x), 0);
+  X509_gmtime_adj (X509_get_notAfter (x), (long) (((days * 24) + hours) * 60 * 60));
+  X509_set_pubkey (x, cli_pk);
+  X509_set_subject_name (x, X509_NAME_dup (xn));
+  name = X509_get_subject_name (x);
+
+  /* issuer */
+  X509_set_issuer_name(x, X509_NAME_dup (X509_get_subject_name (ca_key->xek_x509)));
+
+  /* Add standard extensions */
+  x509_add_ext (x, NID_subject_key_identifier, "hash");
+  exts = X509_REQ_get_extensions (req);
+  for (i = 0; i < sk_X509_EXTENSION_num (exts); i++)
+    {
+      ext = sk_X509_EXTENSION_value (exts, i);
+      if (!X509_add_ext(x, ext, -1))
+	sqlr_warning ("01V01", "QW001", "Unknown extension entry");
+    }
+
+  if (!X509_sign (x, pk, (pk->type == EVP_PKEY_RSA ? EVP_md5() : EVP_dss1()) ))
+    {
+      pk = NULL; /* keep one in the xenc_key */
+      *err_ret = srv_make_new_error ("42000", "XECXX", "Can not sign certificate");
+      goto err;
+    }
+  switch (EVP_PKEY_type (cli_pk->type))
+    {
+      case EVP_PKEY_DSA:
+	  sign_algoname = DSIG_DSA_SHA1_ALGO;
+	  enc_algoname = XENC_DSA_ALGO;
+	  dsa = cli_pk->pkey.dsa;
+	  break;
+      case EVP_PKEY_RSA:
+	  sign_algoname = DSIG_RSA_SHA1_ALGO;
+	  enc_algoname = XENC_RSA_ALGO;
+	  rsa = cli_pk->pkey.rsa;
+	  break;
+      default:
+	  *err_ret = srv_make_new_error ("42000", "XECXX", "The type of public key is not supported mus tbe RSA or DSA");
+	  goto err;
+    }
+  mutex_enter (xenc_keys_mtx);
+  k = xenc_key_create (cli_name, enc_algoname, sign_algoname, 0);
+  if (!k)
+    {
+      mutex_leave (xenc_keys_mtx);
+      *err_ret = srv_make_new_error ("42000", "XECXX", "Can not create a key");
+      goto err;
+    }
+  if (rsa)
+    {
+      k->xek_rsa = rsa;
+      k->xek_private_rsa = 0;
+      k->ki.rsa.pad = RSA_PKCS1_PADDING;
+    }
+  else if (dsa)
+    {
+      k->xek_dsa = dsa;
+      k->xek_private_dsa = 0;
+    }
+  k->xek_evp_key = cli_pk;
+  k->xek_x509_ref = xenc_next_id ();
+  k->xek_x509 = x;
+  k->xek_x509_KI = xenc_x509_KI_base64 (x);
+  if (k->xek_x509_KI)
+    xenc_certificates_hash_add (k->xek_x509_KI, k, 0);
+  mutex_leave (xenc_keys_mtx);
+  X509_REQ_free (req);
+  return box_num (1);
+err:
+  X509_REQ_free (req);
+  X509_free (x);
+  return 0;
+}
+
+
+static caddr_t
 bif_xenc_pkcs12_export (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t key_name = bif_string_arg (qst, args, 0, "xenc_pkcs12_export");
@@ -6600,11 +6911,17 @@ bif_xenc_pem_export (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t key_name = bif_string_arg (qst, args, 0, "xenc_pem_export");
   long pkey = BOX_ELEMENTS (args) > 1 ? bif_long_arg (qst, args, 1, "xenc_pem_export") : 0;
+  caddr_t cipher_name = BOX_ELEMENTS (args) > 2 ? bif_string_arg (qst, args, 2, "xenc_pem_export") : NULL;
+  caddr_t pass = BOX_ELEMENTS (args) > 2 ? bif_string_arg (qst, args, 3, "xenc_pem_export") : NULL;
   xenc_key_t * key = xenc_get_key_by_name (key_name, 1);
   BIO * b;
   char *data_ptr;
   int len;
   caddr_t ret = NULL;
+  const EVP_CIPHER *enc = pass && strlen (pass) ? EVP_get_cipherbyname (cipher_name) : NULL;
+
+  if (!enc && pass && strlen (pass))
+    sqlr_new_error ("42000", "CR006", "Cannot find cipher");
 
   if (!key)
     goto err;
@@ -6612,14 +6929,14 @@ bif_xenc_pem_export (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   b = BIO_new (BIO_s_mem());
   if (key->xek_x509)
     {
-  PEM_write_bio_X509 (b, key->xek_x509);
-  if (pkey && key->xek_evp_private_key)
-    PEM_write_bio_PrivateKey (b, key->xek_evp_private_key, NULL, NULL, 0, NULL, NULL);
+      PEM_write_bio_X509 (b, key->xek_x509);
+      if (pkey && key->xek_evp_private_key)
+	PEM_write_bio_PrivateKey (b, key->xek_evp_private_key, enc, NULL, 0, NULL, pass);
     }
   else if (key->xek_type == DSIG_KEY_RSA)
-    PEM_write_bio_RSAPrivateKey (b, key->xek_private_rsa, NULL, NULL, 0, NULL, NULL);
+    PEM_write_bio_RSAPrivateKey (b, key->xek_private_rsa, enc, NULL, 0, NULL, pass);
   else if (key->xek_type == DSIG_KEY_DSA)
-    PEM_write_bio_DSAPrivateKey (b, key->xek_private_dsa, NULL, NULL, 0, NULL, NULL);
+    PEM_write_bio_DSAPrivateKey (b, key->xek_private_dsa, enc, NULL, 0, NULL, pass);
   else
     {
       BIO_free (b);
@@ -6656,22 +6973,22 @@ bif_xenc_pubkey_pem_export (caddr_t * qst, caddr_t * err_ret, state_slot_t ** ar
   b = BIO_new (BIO_s_mem());
   if (key->xek_x509)
     {
-  k = X509_get_pubkey (key->xek_x509);
+      k = X509_get_pubkey (key->xek_x509);
 #ifdef EVP_PKEY_RSA
-  if (k->type == EVP_PKEY_RSA)
-    {
-      RSA * x = k->pkey.rsa;
+      if (k->type == EVP_PKEY_RSA)
+	{
+	  RSA * x = k->pkey.rsa;
 	  PEM_write_bio_RSA_PUBKEY (b, x);
-    }
+	}
 #endif
 #ifdef EVP_PKEY_DSA
-  if (k->type == EVP_PKEY_DSA)
-    {
-      DSA * x = k->pkey.dsa;
-      PEM_write_bio_DSA_PUBKEY (b, x);
-    }
+      if (k->type == EVP_PKEY_DSA)
+	{
+	  DSA * x = k->pkey.dsa;
+	  PEM_write_bio_DSA_PUBKEY (b, x);
+	}
 #endif
-  EVP_PKEY_free (k);
+      EVP_PKEY_free (k);
     }
   else if (key->xek_type == DSIG_KEY_RSA)
     PEM_write_bio_RSA_PUBKEY (b, key->xek_rsa);
@@ -6696,6 +7013,61 @@ err:
 }
 
 static caddr_t
+bif_xenc_pubkey_der_export (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t key_name = bif_string_arg (qst, args, 0, "xenc_pubkey_DER_export");
+  xenc_key_t * key = xenc_get_key_by_name (key_name, 1);
+  BIO * b;
+  char *data_ptr;
+  int len;
+  caddr_t ret = NULL;
+  EVP_PKEY * k;
+
+  if (!key)
+    goto err;
+
+  b = BIO_new (BIO_s_mem());
+  if (key->xek_x509)
+    {
+      k = X509_get_pubkey (key->xek_x509);
+#ifdef EVP_PKEY_RSA
+      if (k->type == EVP_PKEY_RSA)
+	{
+	  RSA * x = k->pkey.rsa;
+	  i2d_RSA_PUBKEY_bio (b, x);
+	}
+#endif
+#ifdef EVP_PKEY_DSA
+      if (k->type == EVP_PKEY_DSA)
+	{
+	  DSA * x = k->pkey.dsa;
+	  i2d_DSA_PUBKEY_bio (b, x);
+	}
+#endif
+      EVP_PKEY_free (k);
+    }
+  else if (key->xek_type == DSIG_KEY_RSA)
+    i2d_RSA_PUBKEY_bio (b, key->xek_rsa);
+  else if (key->xek_type == DSIG_KEY_DSA)
+    i2d_DSA_PUBKEY_bio (b, key->xek_dsa);
+  else
+    {
+      BIO_free (b);
+      goto err;
+    }
+  len = BIO_get_mem_data (b, &data_ptr);
+  if (len > 0 && data_ptr)
+    {
+      ret = dk_alloc_box (len, DV_BIN);
+      memcpy (ret, data_ptr, len);
+    }
+  BIO_free (b);
+  return ret;
+err:
+  return NEW_DB_NULL;
+}
+
+static caddr_t
 BN2binbox (BIGNUM * x)
 {
   size_t buf_len, n;
@@ -6776,6 +7148,83 @@ bif_xenc_pubkey_magic_export (caddr_t * qst, caddr_t * err_ret, state_slot_t **
   return ret;
 }
 
+static int
+xenc_ssh_encode (caddr_t dest, caddr_t src)
+{
+  int32 new_len, len, pos;
+  new_len = len = box_length (src);
+  if (*src & 0x80)
+    {
+      new_len++;
+      dest[4] = 0;
+      pos = 5;
+    }
+  else
+    {
+      pos = 4;
+    }
+  LONG_SET_NA (dest, new_len);
+  memcpy(&dest[pos], src, len);
+  return pos + len;
+}
+
+static caddr_t
+xenc_rsa_pub_ssh_export (RSA * x)
+{
+  static char * ssh_header = "\x00\x00\x00\x07ssh-rsa";
+  caddr_t ret;
+  int len, pos;
+  caddr_t n = BN2binbox (x->n); /* modulus */
+  caddr_t e = BN2binbox (x->e); /* public exponent */
+  len = 11 + 8 + box_length (n) + box_length (e);
+  if (n[0] & 0x80)
+    len ++;
+  if (e[0] & 0x80)
+    len ++;
+  ret = dk_alloc_box (len, DV_BIN);
+  memcpy (ret, ssh_header, 11);
+  pos = xenc_ssh_encode (&ret[11], e);
+  pos = xenc_ssh_encode (&ret[11 + pos], n);
+  dk_free_box (n);
+  dk_free_box (e);
+  ret = xenc_encode_base64_binbox (ret, 1);
+  return ret;
+}
+
+static caddr_t
+bif_xenc_pubkey_ssh_export (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  caddr_t key_name = bif_string_arg (qst, args, 0, "xenc_pubkey_ssh_export");
+  xenc_key_t * key = xenc_get_key_by_name (key_name, 1);
+  caddr_t ret = NULL;
+  EVP_PKEY * k;
+
+  if (!key)
+    SQLR_NEW_KEY_ERROR (key_name);
+
+  if (key->xek_x509)
+    {
+      k = X509_get_pubkey (key->xek_x509);
+#ifdef EVP_PKEY_RSA
+      if (k->type == EVP_PKEY_RSA)
+	{
+	  RSA * x = k->pkey.rsa;
+	  ret = xenc_rsa_pub_ssh_export (x);
+	}
+#endif
+      EVP_PKEY_free (k);
+    }
+  else if (key->xek_type == DSIG_KEY_RSA)
+    {
+       RSA * x = key->xek_rsa;
+       ret = xenc_rsa_pub_ssh_export (x);
+    }
+  else
+    sqlr_new_error ("42000", "XENC..", "The key type is not supported for export.");
+
+  return ret;
+}
+
 static caddr_t
 bif_xenc_SPKI_read (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
@@ -6927,10 +7376,14 @@ void bif_xmlenc_init ()
   bif_define ("xenc_delete_temp_keys", bif_delete_temp_keys);
   bif_define ("xenc_x509_ss_generate", bif_xenc_x509_ss_generate);
   bif_define ("xenc_x509_generate", bif_xenc_x509_generate);
+  bif_define ("xenc_x509_csr_generate", bif_xenc_x509_csr_generate);
+  bif_define ("xenc_x509_from_csr", bif_xenc_x509_from_csr);
   bif_define ("xenc_pkcs12_export", bif_xenc_pkcs12_export);
   bif_define ("xenc_pem_export", bif_xenc_pem_export);
   bif_define ("xenc_pubkey_pem_export", bif_xenc_pubkey_pem_export);
+  bif_define ("xenc_pubkey_DER_export", bif_xenc_pubkey_der_export);
   bif_define ("xenc_pubkey_magic_export", bif_xenc_pubkey_magic_export);
+  bif_define ("xenc_pubkey_ssh_export", bif_xenc_pubkey_ssh_export);
   bif_define ("xenc_SPKI_read", bif_xenc_SPKI_read);
 
 #ifdef _KERBEROS
diff --git a/libsrc/Wi/xmlenc.h b/libsrc/Wi/xmlenc.h
index d44384f..d12120c 100644
--- a/libsrc/Wi/xmlenc.h
+++ b/libsrc/Wi/xmlenc.h
@@ -1,12 +1,12 @@
 /*
  *  xmlenc.h
  *
- *  $Id: xmlenc.h,v 1.6.2.4 2010/10/13 12:12:21 source Exp $
+ *  $Id: xmlenc.h,v 1.6.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlenc_algos.c b/libsrc/Wi/xmlenc_algos.c
index 3092b21..8c2e7f8 100644
--- a/libsrc/Wi/xmlenc_algos.c
+++ b/libsrc/Wi/xmlenc_algos.c
@@ -1,12 +1,12 @@
 /*
  *  xmlenc_algos.c
  *
- *  $Id: xmlenc_algos.c,v 1.8.2.3 2010/10/13 12:12:21 source Exp $
+ *  $Id: xmlenc_algos.c,v 1.8.2.4 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlenc_algos.h b/libsrc/Wi/xmlenc_algos.h
index 8b0e6bc..b5125a7 100644
--- a/libsrc/Wi/xmlenc_algos.h
+++ b/libsrc/Wi/xmlenc_algos.h
@@ -1,12 +1,12 @@
 /*
  *  xmlenc_algos.h
  *
- *  $Id: xmlenc_algos.h,v 1.6.2.2 2010/10/13 12:12:21 source Exp $
+ *  $Id: xmlenc_algos.h,v 1.6.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlenc_test.h b/libsrc/Wi/xmlenc_test.h
index 3c97305..e52290f 100644
--- a/libsrc/Wi/xmlenc_test.h
+++ b/libsrc/Wi/xmlenc_test.h
@@ -1,12 +1,12 @@
 /*
  *  xmlenc_test.h
  *
- *  $Id: xmlenc_test.h,v 1.3.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xmlenc_test.h,v 1.3.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlgen.h b/libsrc/Wi/xmlgen.h
index 67ebe47..c4b3ebf 100644
--- a/libsrc/Wi/xmlgen.h
+++ b/libsrc/Wi/xmlgen.h
@@ -1,12 +1,12 @@
 /*
  *  xmlgen.h
  *
- *  $Id: xmlgen.h,v 1.2.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xmlgen.h,v 1.2.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmllazy.c b/libsrc/Wi/xmllazy.c
index a624c67..697f70a 100644
--- a/libsrc/Wi/xmllazy.c
+++ b/libsrc/Wi/xmllazy.c
@@ -1,14 +1,14 @@
 /*
  *  xmllazy.c
  *
- *  $Id: xmllazy.c,v 1.3.2.2 2010/10/06 09:35:04 source Exp $
+ *  $Id: xmllazy.c,v 1.3.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  A stub XML entity that is a container for data of lazy loader of XML trees
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlnode.h b/libsrc/Wi/xmlnode.h
index ad88d21..8999476 100644
--- a/libsrc/Wi/xmlnode.h
+++ b/libsrc/Wi/xmlnode.h
@@ -1,12 +1,12 @@
 /*
  *  xmlnode.h
  *
- *  $Id: xmlnode.h,v 1.4.2.4 2010/02/01 12:53:46 source Exp $
+ *  $Id: xmlnode.h,v 1.4.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlres.h b/libsrc/Wi/xmlres.h
index 17bb5f5..66d5626 100644
--- a/libsrc/Wi/xmlres.h
+++ b/libsrc/Wi/xmlres.h
@@ -1,12 +1,12 @@
 /*
  *  xmlres.h
  *
- *  $Id: xmlres.h,v 1.2.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xmlres.h,v 1.2.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlrpc_soap.xsl b/libsrc/Wi/xmlrpc_soap.xsl
index ffbfbf9..d116c1b 100644
--- a/libsrc/Wi/xmlrpc_soap.xsl
+++ b/libsrc/Wi/xmlrpc_soap.xsl
@@ -1,12 +1,12 @@
 <?xml version='1.0'?>
 <!--
  -
- -  $Id: xmlrpc_soap.xsl,v 1.5 2009/04/09 13:22:15 source Exp $
+ -  $Id: xmlrpc_soap.xsl,v 1.5.2.1 2012/03/08 12:55:38 source Exp $
  -
  -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  -  project.
  -
- -  Copyright (C) 1998-2006 OpenLink Software
+ -  Copyright (C) 1998-2012 OpenLink Software
  -
  -  This project is free software; you can redistribute it and/or modify it
  -  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlschema.c b/libsrc/Wi/xmlschema.c
index 177ba02..f284a65 100644
--- a/libsrc/Wi/xmlschema.c
+++ b/libsrc/Wi/xmlschema.c
@@ -1,14 +1,14 @@
 /*
  *  xmlschema.c
  *
- *  $Id: xmlschema.c,v 1.6.2.4 2010/02/01 12:53:46 source Exp $
+ *  $Id: xmlschema.c,v 1.6.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  Dynamic SQL Compiler, part 2
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlsearch.c b/libsrc/Wi/xmlsearch.c
index 114f039..36d60f3 100644
--- a/libsrc/Wi/xmlsearch.c
+++ b/libsrc/Wi/xmlsearch.c
@@ -1,14 +1,14 @@
 /*
  *  xmlsearch.c
  *
- *  $Id: xmlsearch.c,v 1.3.2.2 2009/04/18 21:55:18 source Exp $
+ *  $Id: xmlsearch.c,v 1.3.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  Search
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xmlsql.c b/libsrc/Wi/xmlsql.c
index da3ca2e..5d5ad37 100644
--- a/libsrc/Wi/xmlsql.c
+++ b/libsrc/Wi/xmlsql.c
@@ -1,14 +1,14 @@
 /*
  *  xmlsql.c
  *
- *  $Id: xmlsql.c,v 1.18.2.3 2011/03/29 10:53:31 source Exp $
+ *  $Id: xmlsql.c,v 1.18.2.5 2012/03/08 12:55:38 source Exp $
  *
  *  Dynamic SQL Compiler, part 2
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -4561,7 +4561,7 @@ xs_stmts_exec (query_instance_t * qi, caddr_t *err_ret, xmlsql_ugram_t * xs,
 #ifndef XS_DEBUG
 	  /*    qr = sql_compile (stmt, qi->qi_client, &err, SQLC_DEFAULT);  */
 	  stmt_id = box_dv_short_string ("xmlsql-updg");
-	  sst = cli_get_stmt_access (qi->qi_client, stmt_id, GET_EXCLUSIVE);
+	  sst = cli_get_stmt_access (qi->qi_client, stmt_id, GET_EXCLUSIVE, NULL);
 	  /* get the old value of is_cli_log */
 	  old_log_val = qi->qi_client->cli_is_log;
 	  /*  set the cli_is_log to tru this will avoid PrpcAddAnswer and set_query will return a error */
diff --git a/libsrc/Wi/xmltree.c b/libsrc/Wi/xmltree.c
index 2eb494a..6f78385 100644
--- a/libsrc/Wi/xmltree.c
+++ b/libsrc/Wi/xmltree.c
@@ -1,14 +1,14 @@
 /*
  *  xmltree.c
  *
- *  $Id: xmltree.c,v 1.43.2.21 2011/01/18 10:31:48 source Exp $
+ *  $Id: xmltree.c,v 1.43.2.27 2012/03/08 12:55:38 source Exp $
  *
  *  XPATH interpreter
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -58,6 +58,7 @@ extern "C" {
 #include "xpathp.h"
 #include "date.h" /* for DT_DT_TYPE */
 #include "rdf_core.h" /* for rdf_type_twobyte_to_iri */
+#include "uname_const_decl.h"
 
 #define REF_REL_URI(xte,head) \
  ((BOX_ELEMENTS (head) > 4) ? \
@@ -487,6 +488,7 @@ xqi_value (xp_instance_t * xqi, XT * tree, dtp_t target_dtp)
 	return xqi_cast (xqi, (int) tree->_.literal.res, target_dtp);
       }
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
       state = (int) XQI_GET_INT (xqi, tree->_.var.state);
       if (state == XI_AT_END)
 	return NULL;
@@ -601,6 +603,7 @@ xqi_raw_value (xp_instance_t * xqi, XT * tree)
     case XP_LITERAL:
 	return tree->_.literal.val;
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
       state = (int) XQI_GET_INT (xqi, tree->_.var.state);
       if (state == XI_AT_END)
 	return NULL;
@@ -773,6 +776,7 @@ xqi_is_value (xp_instance_t * xqi, XT * tree)
       return (XI_RESULT == state);
     }
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
     {
       int state = (int) XQI_GET_INT (xqi, tree->_.var.state);
       if (XI_INITIAL == state)
@@ -839,6 +843,7 @@ xt_is_ret_node_set (XT * tree)
   case XQ_QUERY_MODULE:
     return xt_is_ret_node_set (tree->_.module.body);
   case XP_VARIABLE:
+  case XP_FAKE_VAR:
     return 1;
 #if 0
     {
@@ -898,6 +903,7 @@ int xt_predict_returned_type (XT * tree)
     case XP_STEP: case XP_FILTER: case XP_UNION:
       return XPDV_NODESET;
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
       return DV_UNKNOWN;
     case XP_LITERAL:
       return DV_TYPE_OF (tree->_.literal.val);
@@ -918,6 +924,7 @@ xqi_is_next_value (xp_instance_t * xqi, XT * tree)
       xqi_next (xqi, tree);
       return (XI_RESULT == XQI_GET_INT (xqi, tree->_.step.state));
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
       xqi_next (xqi, tree);
       return (XI_RESULT == XQI_GET_INT (xqi, tree->_.var.state));
     case XP_FILTER:
@@ -1902,6 +1909,36 @@ xqi_eval_var (xp_instance_t * xqi, XT * tree)
 
 
 void
+xqi_eval_fake_var (xp_instance_t * xqi, XT * tree)
+{
+  dtp_t dtp;
+  caddr_t val;
+  val = XQI_GET (xqi, tree->_.var.init);
+#ifdef XPATH_DEBUG
+  if (xqi_set_odometer >= xqi_set_debug_start)
+    dk_check_tree (val);
+#endif
+  dtp = DV_TYPE_OF (val);
+  XQI_SET (xqi, tree->_.var.res, NULL);
+#ifdef XPATH_DEBUG
+  if (xqi_set_odometer >= xqi_set_debug_start)
+    dk_check_tree (val);
+#endif
+  if (!val)
+    {
+      XQI_SET_INT (xqi, tree->_.var.state, XI_AT_END);
+      return;
+    }
+#ifdef XPATH_DEBUG
+  if (xqi_set_odometer >= xqi_set_debug_start)
+    dk_check_tree (val);
+#endif
+  XQI_SET_INT (xqi, tree->_.var.state, XI_INITIAL);
+  XQI_SET_INT (xqi, tree->_.var.inx, 0);
+}
+
+
+void
 xqi_eval (xp_instance_t * xqi, XT * tree, xml_entity_t * ctx_xe)
 {
   int rc;
@@ -1918,6 +1955,9 @@ xqi_eval (xp_instance_t * xqi, XT * tree, xml_entity_t * ctx_xe)
     case XP_VARIABLE:
       xqi_eval_var (xqi, tree);
       return;
+    case XP_FAKE_VAR:
+      xqi_eval_fake_var (xqi, tree);
+      return;
     case XP_STEP:
       {
 	if (!tree->_.step.input)
@@ -2917,6 +2957,7 @@ xqi_current (xp_instance_t * xqi, XT * tree)
     case XP_UNION:
       return ((xml_entity_t *) XQI_GET (xqi, tree->_.xp_union.res));
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
       {
 	int state = (int) XQI_GET_INT (xqi, tree->_.var.state);
 	caddr_t init = XQI_GET (xqi, tree->_.var.init);
@@ -2967,6 +3008,7 @@ xqi_next (xp_instance_t * xqi, XT * tree)
   switch (tree->type)
     {
     case XP_VARIABLE:
+    case XP_FAKE_VAR:
       {
 	int state = (int) XQI_GET_INT (xqi, tree->_.var.state);
 	caddr_t * set = (caddr_t *) XQI_GET (xqi, tree->_.var.init);
@@ -3590,18 +3632,26 @@ snprint_xdl (char *buffer, size_t buflength, xp_debug_location_t *xdl)
 }
 
 
-void bif_xquery_arg (caddr_t * qst, state_slot_t ** args, int nth, const char *func, caddr_t *str_ret, int *str_is_temp_ret, xml_entity_t **ent_ret, xp_query_t **xqr_ret)
+void
+bif_xquery_arg (caddr_t * qst, state_slot_t ** args, int main_arg_inx, int cache_ssl_inx, int key2, const char *func, const char *keyname, caddr_t *str_ret, int *str_is_temp_ret, xml_entity_t **ent_ret, xp_query_t **xqr_ret)
 {
-  caddr_t arg = bif_arg (qst, args, nth, func);
+  caddr_t arg = bif_arg (qst, args, main_arg_inx, func);
   dtp_t dtp = DV_TYPE_OF (arg);
+  xml_entity_t *xe;
   str_ret[0] = NULL;
   str_is_temp_ret[0] = 0;
   ent_ret[0] = NULL;
   xqr_ret[0] = NULL;
-  if (DV_XML_ENTITY == dtp)
+  switch (dtp)
     {
-      xml_entity_t *xe = (xml_entity_t *)arg;
-      ent_ret[0] = xe;
+    case DV_XPATH_QUERY:
+      xqr_ret[0] = (xp_query_t *)arg;
+      return;
+    case DV_STRING:
+      str_ret[0] = arg;
+      break;
+    case DV_XML_ENTITY:
+      ent_ret[0] = xe = (xml_entity_t *)arg;
       if (NULL != xe->xe_attr_name)
         {
           caddr_t attrvalue = xe->_->xe_currattrvalue (xe);
@@ -3617,26 +3667,50 @@ void bif_xquery_arg (caddr_t * qst, state_slot_t ** args, int nth, const char *f
               return;
             }
 	  sqlr_new_error ("22023", "SR014",
-	    "Function %s needs an expression as argument %d, not a special attribute XML entity '%s'", func, nth + 1, xe->xe_attr_name);
+            "Function %.200s needs %.200s as argument %d, not a special attribute XML entity '%s'", func, keyname, main_arg_inx + 1, xe->xe_attr_name);
         }
       xe->_->xe_string_value (xe, str_ret, DV_STRING);
       str_is_temp_ret[0] = 1;
-      return;
+      break;
+    default:
+      sqlr_new_error ("22023", "SR014",
+        "Function %.200s needs %.200s (either source or compiled, string or an XML entity) as argument %d, not an arg of type %s (%d)",
+        func, keyname, main_arg_inx + 1, dv_type_title (dtp), dtp);
     }
-  if (DV_XPATH_QUERY == dtp)
+  if (cache_ssl_inx)
     {
-      xqr_ret[0] = (xp_query_t *)arg;
+      caddr_t *cached_pair = (caddr_t *)(qst[cache_ssl_inx]);
+      xp_query_t *cached_xqr;
+      if (DV_ARRAY_OF_POINTER != DV_TYPE_OF (cached_pair))
+        return;
+      if (key2 >= 0)
+        {
+          if (3 != BOX_ELEMENTS (cached_pair))
+            return;
+          if (DV_LONG_INT != DV_TYPE_OF (cached_pair[2]))
+            return;
+          if (key2 != unbox (cached_pair[2]))
       return;
     }
-  if (dtp == DV_STRING)
+      else
     {
-      str_ret[0] = arg;
+          if (2 != BOX_ELEMENTS (cached_pair))
+            return;
+        }
+      if (DV_XPATH_QUERY != DV_TYPE_OF (cached_pair[0]))
+        return;
+      if (DV_STRING != DV_TYPE_OF (cached_pair[1]))
+        return;
+      if (strcmp (str_ret[0], cached_pair[1]))
+        return;
+      cached_xqr = (xp_query_t *)(cached_pair[0]);
+      if ((NULL != cached_xqr->xqr_shuric) && cached_xqr->xqr_shuric->shuric_is_stale)
+        return;
+      str_ret[0] = NULL;
+      str_is_temp_ret[0] = 0;
+      xqr_ret[0] = cached_xqr;
       return;
     }
-  if (dtp != DV_SHORT_STRING && dtp != DV_LONG_STRING)
-    sqlr_new_error ("22023", "SR014",
-  "Function %s needs an expression (either source or compiled, string or an XML entity) as argument %d, not an arg of type %s (%d)",
-  func, nth + 1, dv_type_title (dtp), dtp);
 }
 
 
@@ -3652,6 +3726,17 @@ void bif_xquery_arg (caddr_t * qst, state_slot_t ** args, int nth, const char *f
 	  } \
       } while (0)
 
+long
+bif_var_ssl_idx_arg (caddr_t * qst, state_slot_t ** args, int nth, const char *funname)
+{
+  query_instance_t *qi = (query_instance_t *)qst;
+  long ssl_idx = bif_long_arg (qst, args, nth, funname);
+  if (((ssl_idx * sizeof (caddr_t)) >= qi->qi_query->qr_instance_length) ||
+    (ssl_idx < (sizeof (query_instance_t) / sizeof (caddr_t))) )
+    sqlr_new_error ("22023", "SR643", "Incorrect state slot number argument, probably internal SQL compiler error");
+  return ssl_idx;
+}
+
 caddr_t
 xpath_or_xquery_eval (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *funname, ptrlong predicate_type, int with_cache)
 {
@@ -3661,37 +3746,25 @@ xpath_or_xquery_eval (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, co
   volatile caddr_t val = NULL;
   caddr_t str;
   int str_is_temp;
-  xml_entity_t *xqr_ent;
+  xml_entity_t *xqr_text_ent;
   shuric_cache_t *shu_cache;
   xp_query_env_t xqre;
   xp_query_t * xqr, *xqr_to_release = NULL;
   query_instance_t * qi = (query_instance_t *) qst;
   xml_entity_t * ent = bif_entity_arg (qst, args, 1, funname);
   size_t argcount = BOX_ELEMENTS (args);
-  long cache_ssl_idx = (with_cache ? bif_long_arg (qst, args, --argcount, funname) : 0);
+  long cache_ssl_idx = (with_cache ? bif_var_ssl_idx_arg (qst, args, --argcount, funname) : 0);
   volatile long nth_res = (argcount > 2) ? (long) bif_long_arg (qst, args, 2, funname) : 1;
   caddr_t * params = (argcount > 3) ? (caddr_t *) bif_array_or_null_arg (qst, args, 3, funname) : NULL;
   caddr_t err = NULL;
   xp_instance_t * xqi;
-  bif_xquery_arg (qst, args, 0, funname, &str, &str_is_temp, &xqr_ent, &xqr);
+  bif_xquery_arg (qst, args, 0, cache_ssl_idx, -1, funname, "an expression", &str, &str_is_temp, &xqr_text_ent, &xqr);
   if (xqr)
     goto xqr_ready; /* see below */
-  if (NULL != xqr_ent)
+  if (NULL != xqr_text_ent)
     cache_ssl_idx = 0; /* Can't use cache for query that is specified by an entity */
-  if (0 != cache_ssl_idx)
-    {
-      caddr_t *arg_cache = (caddr_t *)(qst[cache_ssl_idx]);
-      if ((DV_ARRAY_OF_POINTER == DV_TYPE_OF (arg_cache)) && !strcmp (str, arg_cache[0]))
-        {
-          xqr = (xp_query_t *) arg_cache[1];
-	  if (xqr->xqr_shuric->shuric_is_stale)
-	    xqr = NULL;
-	  else
-	    goto xqr_ready;
-	}
-    }
   shu_cache = (('q' == predicate_type) ? xquery_eval_cache : xpath_eval_cache);
-  if (NULL == xqr_ent)
+  if (NULL == xqr_text_ent)
     {
       encoding_handler_t *eh;
       caddr_t key;
@@ -3719,9 +3792,9 @@ xpath_or_xquery_eval (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, co
     }
   memset (&xqre, 0, sizeof (xp_query_env_t));
   xqre.xqre_key_gen = 2;
-  if (NULL != xqr_ent)
+  if (NULL != xqr_text_ent)
     {
-      xqre.xqre_nsctx_xe = xqr_ent;
+      xqre.xqre_nsctx_xe = xqr_text_ent;
       xqre.xqre_query_charset = CHARSET_UTF8;
     }
   xqr_to_release = xqr = xp_query_parse (qi, str, predicate_type, &err, &xqre);
@@ -3730,7 +3803,7 @@ xpath_or_xquery_eval (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, co
       if (str_is_temp) dk_free_box (str);
       sqlr_resignal (err);
     }
-  if (NULL == xqr_ent)
+  if (NULL == xqr_text_ent)
     {
       shu_cache->_->shuric_cache_put (shu_cache, xqr->xqr_shuric);
     }
@@ -3739,7 +3812,7 @@ xqr_put_to_arg_cache:
   if (0 != cache_ssl_idx)
     {
       dk_free_tree ((box_t) (qst[cache_ssl_idx]));
-      qst[cache_ssl_idx] = list (2, box_copy (str), xqr);
+      qst[cache_ssl_idx] = list (2, xqr, box_copy (str));
       xqr_to_release = NULL;
     }
 
@@ -3892,6 +3965,7 @@ const char *xt_dump_opname (ptrlong opname, int is_op)
     case XP_LITERAL: return "input from constant value";
     case XP_ELT: return "element() test";
     case XP_ELT_OR_ROOT: return "element() or document-node() test";
+    case XP_FAKE_VAR: return "input from a special or fake variable";
 /*
     case XP_HTTP: return "__http option";
     case XP_SHALLOW: return "__shallow option";
@@ -4058,6 +4132,13 @@ xt_dump (void *tree_arg, dk_session_t *ses, int indent, const char *title, int h
 	      xt_dump (tree->_.var.name, ses, indent+2, "NAME", 0);
 	      break;
 	    }
+	  case XP_FAKE_VAR:
+	    {
+	      sprintf (buf, "FAKE VARIABLE:");
+	      SES_PRINT (ses, buf);
+	      xt_dump (tree->_.var.name, ses, indent+2, "NAME", 0);
+	      break;
+	    }
 	  case XP_LITERAL:
 	    {
 	      sprintf (buf, "LITERAL:");
@@ -4361,14 +4442,14 @@ bif_xquery_eval_w_cache (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 caddr_t
 bif_xpath_explain (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  return xpath_or_xquery_explain (qst, err_ret, args, "xpath_eval", 'p');
+  return xpath_or_xquery_explain (qst, err_ret, args, "xpath_explain", 'p');
 }
 
 
 caddr_t
 bif_xquery_explain (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  return xpath_or_xquery_explain (qst, err_ret, args, "xquery_eval", 'q');
+  return xpath_or_xquery_explain (qst, err_ret, args, "xquery_explain", 'q');
 }
 
 
@@ -4383,10 +4464,207 @@ bif_xpath_lex_analyze (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 caddr_t
 bif_xquery_lex_analyze (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  caddr_t str = bif_string_arg (qst, args, 0, "xpath_lex_analyze");
+  caddr_t str = bif_string_arg (qst, args, 0, "xquery_lex_analyze");
   return xp_query_lex_analyze (str, 'q' /* like xquery */, NULL, QST_CHARSET(qst));
 }
 
+
+caddr_t
+xpath_funcall_or_apply (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *funname, ptrlong predicate_type, int with_cache)
+{
+  int first;
+  dk_set_t set = NULL;
+  volatile caddr_t val = NULL;
+  caddr_t str;
+  int str_is_temp;
+  xml_entity_t *xqr_text_ent;
+  xp_query_t * xqr, *xqr_to_release = NULL;
+  query_instance_t * qi = (query_instance_t *) qst;
+/*
+  xml_entity_t * ent = bif_entity_arg (qst, args, 1, funname);
+*/
+  caddr_t ent = bif_arg (qst, args, 1, funname);
+  size_t argcount = BOX_ELEMENTS (args);
+  long cache_ssl_idx = (with_cache ? bif_var_ssl_idx_arg (qst, args, --argcount, funname) : 0);
+  caddr_t * params = (('f' == predicate_type) ? NULL : (caddr_t *)bif_array_or_null_arg (qst, args, 2, funname));
+  int param_count = ('f' == predicate_type) ? argcount - 2 : BOX_ELEMENTS (params);
+  /*caddr_t err = NULL;*/
+  xp_instance_t * xqi;
+  XT *funcall;
+  xp_func_t fn;
+  bif_xquery_arg (qst, args, 0, cache_ssl_idx, param_count, funname, "function name", &str, &str_is_temp, &xqr_text_ent, &xqr);
+  if (NULL == xqr)
+    {
+      xpf_metadata_t *metas = NULL;
+      xpf_metadata_t ** metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&str));
+      if (NULL == metas_ptr)
+        sqlr_new_error ("22023", "XI039", "Unknown XPath function name %.200s is used as first argument of %.200s function", str, funname);
+      metas = metas_ptr[0];
+      if (metas->xpfm_min_arg_no > param_count)
+        sqlr_new_error ("22023", "XI040", "The XPATH function %.200s() mentioned in %.200s() requires %d arguments but the call contains only %d",
+          str, funname, (int)(metas->xpfm_min_arg_no), param_count );
+      if (metas->xpfm_main_arg_no < param_count)
+        {
+          if (0 == metas->xpfm_tail_arg_no)
+            sqlr_new_error ("22023", "XI041", "The XPATH function %.200s() mentioned in %.200s() can handle only %d arguments but the call provides %d",
+              str, funname, (int)(metas->xpfm_main_arg_no), param_count );
+          else
+            {
+              int tail_mod = (param_count - metas->xpfm_main_arg_no) % metas->xpfm_tail_arg_no;
+              if (tail_mod)
+                sqlr_new_error ("22023", "XI042", "The XPATH function %.200s() mentioned in %.200s() can handle %d, %d, %d etc. arguments but the call provides %d",
+                  str, funname, (int)(metas->xpfm_main_arg_no), (int)(metas->xpfm_main_arg_no + metas->xpfm_tail_arg_no), (int)(metas->xpfm_main_arg_no + 2 * metas->xpfm_tail_arg_no),
+                  param_count );
+            }
+        }
+      xqr = xqr_stub_for_funcall (metas, param_count);
+      if (0 != cache_ssl_idx)
+        {
+          dk_free_tree ((box_t) (qst[cache_ssl_idx]));
+          qst[cache_ssl_idx] = list (3, xqr, box_copy (str), box_num (param_count));
+        }
+      else
+        xqr_to_release = xqr;
+    }
+  xqi = xqr_instance (xqr, qi);
+  QR_RESET_CTX
+    {
+      int inx, param_ofs, param_step;
+      funcall = xqr->xqr_tree;
+      fn = (void *)unbox (funcall->_.xp_func.executable);
+      param_ofs = ((xpf_cartesian_product_loop == fn) ? 1 : 0);
+      param_step = ((xpf_cartesian_product_loop == fn) ? 2 : 1);
+      for (inx = 0; inx < param_count; inx ++)
+        {
+          XT *fake_var = funcall->_.xp_func.argtrees[inx * param_step + param_ofs];
+          caddr_t param_val = (('f' == predicate_type) ? bif_arg (qst, args, 2+inx, funname) : params[inx]);
+          XQI_SET (xqi, fake_var->_.var.res, NULL);
+#ifdef XPATH_DEBUG
+          if (xqi_set_odometer >= xqi_set_debug_start)
+            dk_check_fake_var (param_val);
+#endif
+          XQI_SET (xqi, fake_var->_.var.init, NULL);
+#ifdef XPATH_DEBUG
+          if (xqi_set_odometer >= xqi_set_debug_start)
+            dk_check_fake_var (param_val);
+#endif
+          if ((DV_DB_NULL == DV_TYPE_OF (param_val)) || (DV_ARRAY_OF_XQVAL == DV_TYPE_OF (param_val) && 0 == BOX_ELEMENTS (param_val)))
+            {
+              XQI_SET (xqi, fake_var->_.var.init, dk_alloc_box (0, DV_ARRAY_OF_XQVAL));
+              XQI_SET_INT (xqi, fake_var->_.var.state, XI_AT_END);
+            }
+          else
+            {
+#ifdef XPATH_DEBUG
+              if (xqi_set_odometer >= xqi_set_debug_start)
+                dk_check_fake_var (param_val);
+#endif
+              caddr_t converted_copy;
+              switch (DV_TYPE_OF (param_val))
+                {
+                case DV_LONG_INT: converted_copy = box_num_nonull (unbox (param_val)); break;
+                case DV_ARRAY_OF_POINTER:
+                  {
+                    int ctr;
+                    converted_copy = box_copy_tree (param_val);
+                    box_tag_modify (param_val, DV_ARRAY_OF_XQVAL);
+                    DO_BOX_FAST (caddr_t, v, ctr, converted_copy)
+                      {
+                        if (NULL == v) converted_copy = box_num_nonull (0);
+                      }
+                    END_DO_BOX_FAST;
+                    break;
+                  }
+                default: converted_copy = box_copy_tree (param_val); break;
+                }
+              XQI_SET (xqi, fake_var->_.var.init, converted_copy);
+              XQI_SET_INT (xqi, fake_var->_.var.state, XI_INITIAL);
+              XQI_SET_INT (xqi, fake_var->_.var.inx, 0);
+            }
+        }
+      xqi->xqi_return_attrs_as_nodes = 1;
+      xqi->xqi_xpath2_compare_rules = 0;
+      xqi_eval (xqi, xqr->xqr_tree, (xml_entity_t *)ent); /* At this point the actual type of ent is nto known, we just hope that if it's not an entity it will not be used */
+      first = xqi_is_value (xqi, xqr->xqr_tree);
+      while (first || xqi_is_next_value (xqi, xqr->xqr_tree))
+        {
+          first = 0;
+          val = xqi_raw_value (xqi, xqr->xqr_tree);
+          dk_set_push (&set, box_copy_tree (val));
+        }
+    }
+  QR_RESET_CODE
+    {
+      du_thread_t *self = THREAD_CURRENT_THREAD;
+      caddr_t err = thr_get_error_code (self);
+      XQI_FREE_XP_GLOBALS (xqi);
+      xqi_free (xqi);
+      POP_QR_RESET;
+      dk_free_box ((caddr_t)xqr_to_release);
+      if (str_is_temp) dk_free_box (str);
+      if (err)
+        sqlr_resignal (err);
+      return NULL;  /* not supposed to */
+    }
+  END_QR_RESET;
+  XQI_FREE_XP_GLOBALS (xqi);
+  xqi_free (xqi);
+  dk_free_box ((caddr_t)xqr_to_release);
+  if (str_is_temp) dk_free_box (str);
+  if (NULL == set)
+    val = NEW_DB_NULL;
+  else if (NULL == set->next)
+    val = dk_set_pop (&set);
+  else
+    val = list_to_array (dk_set_nreverse (set));
+#ifdef XPATH_DEBUG
+  if (xqi_set_odometer >= xqi_set_debug_start)
+    dk_check_tree (val);
+#endif
+  if ((xpf_cartesian_product_loop == fn) && (DV_ARRAY_OF_XQVAL == DV_TYPE_OF (val)))
+    {
+      caddr_t val0;
+      if (0 == BOX_ELEMENTS (val))
+        {
+          dk_free_tree (val); return NEW_DB_NULL;
+        }
+      val0 = ((caddr_t *)val)[0];
+      ((caddr_t *)val)[0] = NULL;
+      dk_free_tree (val);
+      return val0;
+    }
+  return val;
+}
+
+
+caddr_t
+bif_xpath_funcall (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return xpath_funcall_or_apply (qst, err_ret, args, "xpath_funcall", 'f', 0);
+}
+
+
+caddr_t
+bif_xpath_apply (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return xpath_funcall_or_apply (qst, err_ret, args, "xpath_apply", 'a', 0);
+}
+
+
+caddr_t
+bif_xpath_funcall_w_cache (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return xpath_funcall_or_apply (qst, err_ret, args, "xpath_funcall", 'f', 1);
+}
+
+
+caddr_t
+bif_xpath_apply_w_cache (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  return xpath_funcall_or_apply (qst, err_ret, args, "xpath_apply", 'a', 1);
+}
+
+
 #ifdef XPATHP_DEBUG
 
 typedef struct lexem_descr_s
@@ -9761,8 +10039,8 @@ caddr_t bif_xtree_sum64 (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
   return xte_sum64 (src->xte_current);
 }
 
-/*! \returns NULL for string, (ccaddr_t)((ptrlong)1) for unsupported, 2 for NULL, UNAME for others */
-ccaddr_t
+/*! \returns NULL for string, (caddr_t)((ptrlong)1) for unsupported, 2 for NULL, UNAME for others */
+caddr_t
 xsd_type_of_box (caddr_t arg)
 {
   dtp_t dtp = DV_TYPE_OF (arg);
@@ -9779,20 +10057,21 @@ again:
     case DV_STRING: case DV_BLOB_HANDLE: case DV_WIDE: case DV_LONG_WIDE:
       return NULL;
     case DV_LONG_INT: return uname_xmlschema_ns_uri_hash_integer;
-    case DV_NUMERIC: case DV_DOUBLE_FLOAT: return uname_xmlschema_ns_uri_hash_double;
+    case DV_NUMERIC: return uname_xmlschema_ns_uri_hash_decimal;
+    case DV_DOUBLE_FLOAT: return uname_xmlschema_ns_uri_hash_double;
     case DV_SINGLE_FLOAT: return uname_xmlschema_ns_uri_hash_float;
     case DV_DB_NULL:
-      return (ccaddr_t)((ptrlong)2);
+      return (caddr_t)((ptrlong)2);
     case DV_RDF:
       {
         rdf_box_t *rb = (rdf_box_t *)arg;
         if (RDF_BOX_DEFAULT_TYPE != rb->rb_type)
           {
-            ccaddr_t res = rdf_type_twobyte_to_iri (rb->rb_type);
+            caddr_t res = rdf_type_twobyte_to_iri (rb->rb_type);
             if (NULL == res)
-              return (ccaddr_t)((ptrlong)2);
+              return (caddr_t)((ptrlong)2);
             box_flags (res) |= BF_IRI;
-            return box_copy (res);
+            return res;
           }
         dtp = ((rb->rb_is_outlined) ? ((rdf_bigbox_t *)rb)->rbb_box_dtp : DV_TYPE_OF (rb->rb_box));
         goto again; /* see above */
@@ -9800,7 +10079,7 @@ again:
     case DV_XML_ENTITY:
       return uname_rdf_ns_uri_XMLLiteral;
     default:
-      return (ccaddr_t)((ptrlong)1);
+      return (caddr_t)((ptrlong)1);
     }
 }
 
@@ -9809,7 +10088,7 @@ caddr_t
 bif_xsd_type (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   caddr_t arg = bif_arg (qst, args, 0, "__xsd_type");
-  caddr_t res = (caddr_t) xsd_type_of_box (arg);
+  caddr_t res = xsd_type_of_box (arg);
   if (IS_BOX_POINTER (res))
     return res;
   switch ((ptrlong)(res))
@@ -9831,7 +10110,7 @@ bif_xsd_type (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
           dtp_t dtp = DV_TYPE_OF (arg);
           sqlr_new_error ("22023", "SR544",
             "Function __xsd_type() can not find XML Schema datatype that matches SQL datatype %s (%d)",
-            dv_type_title (dtp), dtp );
+            dv_type_title (dtp), (int)dtp );
         }
       return box_copy_tree (bif_arg (qst, args, 2, "__xsd_type"));
     }
@@ -9901,7 +10180,7 @@ xml_ent_hash (caddr_t box)
   xml_entity_t *xe = (xml_entity_t *)box;
   int32 chld_hash = 0;
   if (XE_IS_TREE (xe))
-    chld_hash = (int32)(((xml_tree_ent_t *)(xe))->xte_stack_top->xteb_current);
+    chld_hash = (int32)(ptrlong)(((xml_tree_ent_t *)(xe))->xte_stack_top->xteb_current);
   else if (XE_IS_PERSISTENT (xe))
     chld_hash = (int32)(((xper_entity_t *)(xe))->xper_pos);
 /* No need in "if (XE_IS_LAZY (xe))", because there's no position in not-yet-loaded doc */
@@ -10318,15 +10597,23 @@ xml_tree_init (void)
   bif_set_uses_index (bif_xpath_eval);
   bif_define ("xquery_eval", bif_xquery_eval);
   bif_set_uses_index (bif_xquery_eval);
-  bif_define ("xpath_eval (w/cache)", bif_xpath_eval_w_cache);
+  bif_define ("xpath_eval__w_cache", bif_xpath_eval_w_cache);
   bif_set_uses_index (bif_xpath_eval_w_cache);
-  bif_define ("xquery_eval (w/cache)", bif_xquery_eval_w_cache);
+  bif_define ("xquery_eval__w_cache", bif_xquery_eval_w_cache);
   bif_set_uses_index (bif_xquery_eval_w_cache);
   bif_define ("xpath_explain", bif_xpath_explain);
   bif_define ("xquery_explain", bif_xquery_explain);
   bif_define ("xpath_text", bif_xpath_text);
   bif_define ("xpath_lex_analyze", bif_xpath_lex_analyze);
   bif_define ("xquery_lex_analyze", bif_xquery_lex_analyze);
+  bif_define ("xpath_funcall", bif_xpath_funcall);
+  bif_set_uses_index (bif_xpath_funcall);
+  bif_define ("xpath_apply", bif_xpath_apply);
+  bif_set_uses_index (bif_xpath_apply);
+  bif_define ("xpath_funcall__w_cache", bif_xpath_funcall_w_cache);
+  bif_set_uses_index (bif_xpath_funcall_w_cache);
+  bif_define ("xpath_apply__w_cache", bif_xpath_apply_w_cache);
+  bif_set_uses_index (bif_xpath_apply_w_cache);
 #ifdef XPATHP_DEBUG
   bif_define ("xpathp_test", bif_xpathp_test);
 #endif
diff --git a/libsrc/Wi/xmltree.h b/libsrc/Wi/xmltree.h
index 4315e5c..cb0fb77 100644
--- a/libsrc/Wi/xmltree.h
+++ b/libsrc/Wi/xmltree.h
@@ -1,12 +1,12 @@
 /*
  *  xmltree.h
  *
- *  $Id: xmltree.h,v 1.27.2.13 2010/10/20 16:04:01 source Exp $
+ *  $Id: xmltree.h,v 1.27.2.18 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -632,113 +632,6 @@ typedef struct xp_node_s
   struct xparse_ctx_s * xn_xp;
 } xp_node_t;
 
-/*!< RDF/XML parser mode, i.e. what does the parser expect to read */
-#define XRL_PARSETYPE_TOP_LEVEL		0x01	/*!< Top-level element (rdf:RDF) */
-#define XRL_PARSETYPE_RESOURCE		0x02	/*!< Resource description */
-#define XRL_PARSETYPE_LITERAL		0x04	/*!< Literal value */
-#define XRL_PARSETYPE_RES_OR_LIT	0x06	/*!< Either resource description or a literal */
-#define XRL_PARSETYPE_PROPLIST		0x08	/*!< Sequence of properties of a resource */
-#define XRL_PARSETYPE_EMPTYPROP		0x10	/*!< Nothing but ending tag of property */
-#define XRL_PARSETYPE_COLLECTION	0x22	/*!< First resource inside collection, other resources are recognized by */
-
-/*! Stack part of RDF/XML-specific context of XML parser.
-These are fields of quad to be created.
-"Inheritable" fields are propagated from the parent. Pointers are copied, strings are not copied. */
-typedef struct xp_rdfxml_locals_s
-{
-  struct xp_rdfxml_locals_s *xrl_parent;	/*!< Pointer to parent context */
-  xp_node_t *	xrl_xn;			/*!< Node whose not-yet-closed element corresponds to the given context */
-  caddr_t	xrl_subject;		/*!< Subject (IRI of named node or blank node IRI_ID); subject is used for nested predicates */
-  caddr_t	xrl_predicate;		/*!< Predicate (IRI of named node or blank node IRI_ID) */
-  caddr_t	xrl_base;		/*!< Base to resolve relative URIs, inheritable */
-  caddr_t	xrl_language;		/*!< Language tag as string or NULL, inheritable */
-  caddr_t	xrl_datatype;		/*!< Object data type (named node IRI_ID), not inheritable */
-  caddr_t	xrl_reification_id;	/*!< ID used to reify a statement as four quads for S,P,O and rdf:type rdfs:Statement. */
-  int		xrl_li_count;		/*!< Counter of used LI, not inheritable */
-  dk_set_t	xrl_seq_items;		/*!< Backstack of "Sequence" parseType subjects */
-  int		xrl_parsetype:8;	/*!< Parse type (one of XRL_DATATYPE_NNN), not inheritable */
-  char		xrl_base_set:8;
-  char		xrl_language_set:8;
-} xp_rdfxml_locals_t;
-
-#define RDFA_ICT_PRED_REL_OR_TYPEOF	200	/*!< Forward with ref object */
-#define RDFA_ICT_PRED_REV		201	/*!< Reverse predicate */
-#define RDFA_ICT_PRED_PROPERTY		202	/*!< Forward predicate with literal object */
-
-/*! [I]n[C]omplete [T]riple.
-We should keep subject instead of use of innermost xrdfal_subj.
-This is for incomplete triples inside HEAD, they may wait for BASE definition and contain different "about" attributes. */
-typedef struct rdfa_ict_s
-{
-  ptrlong ict_pred_type;	/*!< Predicate type, one of RDFA_ICT_PRED_xxx values */
-  caddr_t ict_left;		/*!< Subject by default and object if \c ict_pred_type == RDFA_ICT_PRED_REV */
-  caddr_t ict_pred;		/*!< Predicate */
-  caddr_t ict_right;		/*!< Object by default and subject if \c ict_pred_type == RDFA_ICT_PRED_REV */
-  caddr_t ict_datatype;		/*!< Datatype of a literal object */
-  caddr_t ict_language;		/*!< Language of a literal object */
-  ptrlong ict_used_as_template;	/*!< The ICT itself was used as a template for cases like <X rel="p"><Y typeof="t" /></X> (even if was not completed) */
-} rdfa_ict_t;
-
-#define RDFA_IN_HTML		0x01	/*!< The current tag is XHTML top (or nested), respect <HEAD> and <BODY> if found inside */
-#define RDFA_IN_HEAD		0x02	/*!< The current tag is HEAD in XHTML (or nested), the doc is now default subject, do not feed triples immediately to handle <BASE> */
-#define RDFA_IN_BASE		0x04	/*!< The current tag is BASE in HEAD in XHTML (or nested), the content will go to all \c xrdfal_base throughout the stack. */
-#define RDFA_IN_BODY		0x08	/*!< The current tag is BODY in XHTML (or nested), the doc is now default subject, do feed triples as soon as they're complete */
-#define RDFA_IN_LITERAL		0x10	/*!< The parser runs inside an XML literal or a string literal or an unused subtree, because there was a "property" attribute */
-#define RDFA_IN_UNUSED		0x20	/*!< The parser runs inside an element with "content" attribute. The attribute is used as a string literal already so there's nothing to do in a subtree. Similarly, it is used for internals of <base href="...">...</base> */
-#define RDFA_IN_STRLITERAL	0x40	/*!< The parser runs inside an element with explicit datatype other than rdf:XMLLiteral, so all non-text items should be ignored, only texts are important. */
-#define RDFA_IN_XMLLITERAL	0x80	/*!< The parser runs inside an element with explicit rdf:XMLLiteral datatype or datatype is not present but non-text nodes were found. */
-
-/*! Stack part of RDFa-specific context of XML parser.
-Unlike RDF/XML, not every opened tag gets its own stack item, because many of them lacks RDFa-specific data at all.
-RDFa locals are popped only when an XML element to close corresponds to xrdfal_xn of the innermost local context */
-
-typedef struct xp_rdfa_locals_s
-{
-  struct xp_rdfa_locals_s *xrdfal_parent;	/*!< Pointer to parent context */
-  xp_node_t *	xrdfal_xn;		/*!< Node whose not-yet-closed element corresponds to the given context */
-  int		xrdfal_place_bits;	/*!< A combination of RDFA_IN_... bits */
-  caddr_t	xrdfal_base;		/*!< Base to resolve relative links as set by <BASE> now in XSLT+RDFa and may be set by xml:base in other XML docs */
-  caddr_t	xrdfal_subj;		/*!< A [new subject] as set at the end of parsing the opening tag. It can be NULL, look up */
-  caddr_t	xrdfal_obj_res;		/*!< A [current object resource] as set at the end of parsing the opening tag or created as bnode after that */
-  caddr_t	xrdfal_datatype;	/*!< Datatype IRI */
-  caddr_t	xrdfal_language;	/*!< Language label */
-  rdfa_ict_t *	xrdfal_ict_buffer;	/*!< Storage for incomplete triples, may contain NULLs at the end */
-  int		xrdfal_ict_count;	/*!< Count of stored incomplete triples */
-  int		xrdfal_boring_opened_elts;	/*!< Number of opened but not yet closed elements inside RDFA_IN_STRLITERAL or RDFA_IN_UNUSED or "uninteresting" elements between \c xrdfal_xn and next nested \c xp_rdfa_locals_t in chain */
-} xp_rdfa_locals_t;
-
-#define RDFA_ATTR_ABOUT		101
-#define RDFA_ATTR_CONTENT	102
-#define RDFA_ATTR_DATATYPE	103
-#define RDFA_ATTR_HREF		104
-#define RDFA_ATTR_PROPERTY	105
-#define RDFA_ATTR_REL		106
-#define RDFA_ATTR_RESOURCE	107
-#define RDFA_ATTR_REV		108
-#define RDFA_ATTR_SRC		109
-#define RDFA_ATTR_TYPEOF	110
-#define RDFA_ATTR_XML_BASE	111
-#define RDFA_ATTR_XML_LANG	112
-
-/*! This structure is kept in RDFa parser as a DV_ARRAY_OF_POINTER and freed in case of error, to avoid memleaks.
-It is allocated once and only partially cleaned by callback calls. */
-typedef struct xp_tmp_s
-{
-/* RDFa part: */
-  caddr_t xpt_base;		/*!< Readed but not saved xml:base */
-  caddr_t xpt_lang;		/*!< Readed but not saved xml:lang */
-  caddr_t xpt_dt;		/*!< Readed, not expanded and not saved datatype */
-  caddr_t xpt_src;		/*!< Readed, not expanded and not saved subj (obj for reverse preds) */
-  caddr_t xpt_href;		/*!< Readed, not expanded and not saved obj (subj for reverse preds or triple from element w/o "rel" or "rev") */
-  caddr_t *xpt_rel_preds;	/*!< Readed, not expanded and not saved "rel" predicates */
-  caddr_t *xpt_rev_preds;	/*!< Readed, not expanded and not saved "rev" predicates */
-  caddr_t *xpt_prop_preds;	/*!< Readed, not expanded and not saved "property" predicates */
-  caddr_t *xpt_typeofs;		/*!< Readed, not expanded and not saved "typeof" types */
-  caddr_t xpt_obj_res;		/*!< Readed, not expanded and not saved object resource OR composed and not saved bnode object */
-  caddr_t xpt_obj_content;	/*!< Readed but not saved content of literal object */
-} xp_tmp_t;
-
-
 typedef struct xslt_template_uses_s
 {
   long	xstu_byname_calls;
@@ -824,7 +717,7 @@ typedef struct xslt_sheet_s
 
 extern xslt_number_format_t *xsnf_default;
 
-/*! Context of an XML parsers (XML, XSLT, RDF/XML, RDFa) */
+/*! Context of an XML parsers (XML, XSLT, RDF/XML, RDFa, Microdata) */
 typedef struct xparse_ctx_s
 {
   struct xparse_ctx_s *	xp_parent;	/*!< Context of parent parser (not-NULL when a parser reads GE (generic entity) nested in other document) */
@@ -864,16 +757,16 @@ typedef struct xparse_ctx_s
   int			xp_namespaces_are_valid;
   caddr_t		xp_top_excl_res_prefx;	/*!< The value of exclude-result-prefixes XSLT attribute */
   struct triple_feed_s *xp_tf;			/*!< Triple feeder (for both RDF/XML and RDFa) */
-  xp_rdfxml_locals_t *	xp_rdfxml_locals;
-  xp_rdfxml_locals_t *	xp_rdfxml_free_list;
-  xp_rdfa_locals_t *	xp_rdfa_locals;
-  xp_rdfa_locals_t *	xp_rdfa_free_list;
-  xp_tmp_t *		xp_tmp;
+  struct xp_rdfxml_locals_s *	xp_rdfxml_locals;
+  struct xp_rdfxml_locals_s *	xp_rdfxml_free_list;
+  struct xp_rdfa_locals_s *	xp_rdfa_locals;
+  struct xp_rdfa_locals_s *	xp_rdfa_free_list;
+  struct xp_mdata_locals_s *	xp_mdata_locals;
+  struct xp_mdata_locals_s *	xp_mdata_free_list;
+  struct xp_tmp_s *		xp_tmp;
 } xparse_ctx_t;
 
-extern void xp_pop_rdf_locals (xparse_ctx_t *xp);
-extern void xp_pop_rdfa_locals (xparse_ctx_t *xp);
-extern xp_rdfxml_locals_t *xp_push_rdf_locals (xparse_ctx_t *xp);
+extern void xp_free_rdf_parser_fields (xparse_ctx_t * xp);
 
 extern void xp_element (void *userdata, char * name, vxml_parser_attrdata_t *attrdata);
 extern void xp_element_end (void *userdata, const char * name);
@@ -1125,19 +1018,28 @@ extern caddr_t box_cast_to_UTF8_uname (caddr_t *qst, caddr_t raw_name);
     BOX_DV_UNAME_CONCAT4(qname,nsuri,_local1,_local1_len); \
   } while (0)
 
+#define BOX_DV_UNAME_COLONCONCAT5(qname,nsuri,nsuri_len,local,local_len) \
+  do { \
+    ccaddr_t _nsuri5 = (nsuri); \
+    int _nsuri5_len = (nsuri_len); \
+    ccaddr_t _local5 = (local); \
+    int _local5_len = (local_len); \
+    int _qname5_len = _nsuri5_len + _local5_len + 1; \
+    caddr_t _qname5 = box_dv_ubuf (_qname5_len); \
+    memcpy (_qname5, _nsuri5, _nsuri5_len); \
+    _qname5[_nsuri5_len++] = ':'; \
+    memcpy (_qname5 + _nsuri5_len, _local5, _local5_len); \
+    _qname5[_qname5_len] = '\0'; \
+    (qname) = box_dv_uname_from_ubuf (_qname5); \
+  } while (0)
+
 #define BOX_DV_UNAME_COLONCONCAT4(qname,nsuri,local,local_len) \
   do { \
-    ccaddr_t _nsuri = (nsuri); \
-    int _nsuri_len = box_length_inline (_nsuri) - 1; \
-    ccaddr_t _local = (local); \
-    int _local_len = (local_len); \
-    int _qname_len = _nsuri_len + _local_len + 1; \
-    caddr_t _qname = box_dv_ubuf (_qname_len); \
-    memcpy (_qname, _nsuri, _nsuri_len); \
-    _qname[_nsuri_len++] = ':'; \
-    memcpy (_qname + _nsuri_len, _local, _local_len); \
-    _qname[_qname_len] = '\0'; \
-    (qname) = box_dv_uname_from_ubuf (_qname); \
+    ccaddr_t _nsuri4 = (nsuri); \
+    ccaddr_t _local4 = (local); \
+    int _local4_len = (local_len); \
+    int _nsuri4_len = box_length_inline (_nsuri4) - 1; \
+    BOX_DV_UNAME_COLONCONCAT5(qname,_nsuri4,_nsuri4_len,_local4,_local4_len); \
   } while (0)
 
 #define BOX_DV_UNAME_COLONCONCAT(qname,nsuri,local) \
diff --git a/libsrc/Wi/xpath.c b/libsrc/Wi/xpath.c
index 1d77ed8..57968c3 100644
--- a/libsrc/Wi/xpath.c
+++ b/libsrc/Wi/xpath.c
@@ -1,14 +1,14 @@
 /*
  *  xpath.c
  *
- *  $Id: xpath.c,v 1.15.2.13 2011/01/28 13:28:03 source Exp $
+ *  $Id: xpath.c,v 1.15.2.16 2012/03/08 12:55:38 source Exp $
  *
  *  XPATH to SQL
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2992,8 +2992,8 @@ void xp_reject_option_if_not_allowed (xpp_t *xpp, int type)
 
 void xp_register_default_namespace_prefixes (xpp_t *xpp)
 {
-  xp_register_namespace_prefix (xpp, XFN_NS_PREFIX1	, XFN_NS_URI	);
-  xp_register_namespace_prefix (xpp, XFN_NS_PREFIX2	, XFN_NS_URI	);
+  xp_register_namespace_prefix (xpp, XFN_NS_PREFIX	, XFN_NS_URI	);
+  xp_register_namespace_prefix (xpp, XXF_NS_PREFIX	, XXF_NS_URI	);
   xp_register_namespace_prefix (xpp, XLOCAL_NS_PREFIX	, XLOCAL_NS_URI	);
   xp_register_namespace_prefix (xpp, XOP_NS_PREFIX	, XOP_NS_URI	);
   xp_register_namespace_prefix (xpp, XDT_NS_PREFIX	, XDT_NS_URI	);
@@ -4410,7 +4410,9 @@ substitute_with_undefined:
   metas = metas_ptr[0];
   if (NULL == metas->xpfm_executable)
     {
-      if (!strcmp ("collection", metas->xpfm_name) || !strcmp (XFN_NS_URI ":collection", metas->xpfm_name))
+      if (!strcmp ("collection", metas->xpfm_name)
+        || !strcmp (XFN_NS_URI ":collection", metas->xpfm_name)
+        || !strcmp (XXF_NS_URI ":collection", metas->xpfm_name) )
 	{
 	  dk_set_t dirlist_args = NULL, doc_args = NULL;
 	  int ctr = BOX_ELEMENTS (arg_array);
@@ -4865,14 +4867,15 @@ shuric_t *xqr_shuric_retrieve (query_instance_t *qi, caddr_t uri, caddr_t *err_r
 xp_query_t *
 xqr_stub_for_funcall (xpf_metadata_t *metas, int argcount)
 {
-  int argctr;
+  int argctr, allctr, iterctr, itercount;
   xp_env_t l_xe;
   xpp_t l_xpp;
   xp_query_t *xqr = (xp_query_t *) dk_alloc_box_zero (sizeof (xp_query_t), DV_XPATH_QUERY);
   int n_slots, fill = 0;
   ptrlong *map;
-  XT **arg_array = dk_alloc_box (argcount * sizeof (XT *), DV_ARRAY_OF_POINTER);
+  XT **arg_array = (XT **)dk_alloc_box (argcount * sizeof (XT *), DV_ARRAY_OF_POINTER);
   XT *var = NULL;
+  XT *call;
   memset (&l_xe, 0, sizeof (xp_env_t));
   memset (&l_xpp, 0, sizeof (xpp_t));
   l_xpp.xpp_xp_env = &l_xe;
@@ -4887,15 +4890,63 @@ xqr_stub_for_funcall (xpf_metadata_t *metas, int argcount)
       arg_array[argctr] = xp_make_variable_ref (&l_xpp, buf);
       arg_array[argctr]->type = XP_FAKE_VAR;
     }
-  xqr->xqr_tree = xtlist_with_tail (&l_xpp, 8, (caddr_t)arg_array, CALL_STMT,
+  call = xtlist_with_tail (&l_xpp, 8, (caddr_t)arg_array, CALL_STMT,
     box_dv_uname_string (metas->xpfm_name),
     box_num((ptrlong)(metas->xpfm_executable)),
     (ptrlong)(metas->xpfm_res_dtp),
     xe_new_xqst (&l_xpp, XQST_REF),
     xe_new_xqst (&l_xpp, XQST_REF),
     var );
+  for (itercount = allctr = 0; allctr < argcount; allctr++)
+    {
+      int descr_idx = allctr;
+      xpfm_arg_descr_t *descr;
+      if (descr_idx > metas->xpfm_main_arg_no)
+        descr_idx = (int) (metas->xpfm_main_arg_no + ((descr_idx-metas->xpfm_main_arg_no) % metas->xpfm_tail_arg_no));
+      descr = metas->xpfm_args+descr_idx;
+      if (descr->xpfma_is_iter)
+        itercount++;
+    }
+  if (itercount != 0)
+    {
+      XT **iter_vars = (XT **) dk_alloc_box_zero ((itercount * 2 + 1) * sizeof (XT *), DV_ARRAY_OF_POINTER);
+      XT *cart_var = NULL;
+      XT *cart;
+      if (NULL != var)
+        {
+          cart_var = xp_make_variable_ref (&l_xpp, "Cartesian product");
+        }
+      cart = xtlist_with_tail (&l_xpp, 8, (caddr_t)iter_vars, CALL_STMT,
+        box_dv_uname_string ("(internal) Cartesian product loop"),
+        box_num((ptrlong)(xpf_cartesian_product_loop)),
+        DV_ARRAY_OF_XQVAL,
+        xe_new_xqst (&l_xpp, XQST_REF),
+        xe_new_xqst (&l_xpp, XQST_REF),
+        cart_var );
+      for (iterctr = allctr = 0; allctr < argcount; allctr++)
+        {
+          int descr_idx = allctr;
+          xpfm_arg_descr_t *descr;
+          if (descr_idx > metas->xpfm_main_arg_no)
+            descr_idx = (int) (metas->xpfm_main_arg_no + ((descr_idx-metas->xpfm_main_arg_no) % metas->xpfm_tail_arg_no));
+          descr = metas->xpfm_args+descr_idx;
+          if (descr->xpfma_is_iter)
+            {
+              char buf[30];
+              sprintf (buf, " %d", l_xe.xe_xqst_ctr);
+              cart->_.xp_func.argtrees[iterctr*2] =
+                xtlist (&l_xpp, 4, XP_LITERAL, NULL, box_dv_uname_string(buf), xe_new_xqst (&l_xpp, XQST_REF));
+              cart->_.xp_func.argtrees[iterctr*2+1] =
+                call->_.xp_func.argtrees[allctr];
+              call->_.xp_func.argtrees[allctr] = xp_make_variable_ref(&l_xpp, buf);
+              iterctr++;
+            }
+        }
+      cart->_.xp_func.argtrees[itercount*2] = call;
+      call = cart;
+    }
+  xqr->xqr_tree = call;
   xqr->xqr_instance_length = sizeof (caddr_t) * l_xe.xe_xqst_ctr;
-
   n_slots = dk_set_length (xqr->xqr_state_map);
   map = (ptrlong *) dk_alloc_box (sizeof (ptrlong) * n_slots, DV_SHORT_STRING);
   DO_SET (ptrlong, pos, &xqr->xqr_state_map)
diff --git a/libsrc/Wi/xpath.h b/libsrc/Wi/xpath.h
index 0a7e3ba..fad7702 100644
--- a/libsrc/Wi/xpath.h
+++ b/libsrc/Wi/xpath.h
@@ -1,12 +1,12 @@
 /*
  *  xpath.h
  *
- *  $Id: xpath.h,v 1.5.2.5 2011/01/28 13:28:03 source Exp $
+ *  $Id: xpath.h,v 1.5.2.6 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xpathp.c b/libsrc/Wi/xpathp.c
index 97f43d4..0bd5fd9 100644
--- a/libsrc/Wi/xpathp.c
+++ b/libsrc/Wi/xpathp.c
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +45,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.4.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -146,7 +145,7 @@ int xpyylex_from_xpp_bufs (caddr_t *yylval, xpp_t *xpp)
 
 
 /* Line 189 of yacc.c  */
-#line 150 "xpathp.c"
+#line 149 "xpathp.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -662,7 +661,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 666 "xpathp.c"
+#line 665 "xpathp.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -674,7 +673,7 @@ typedef union YYSTYPE
 
 
 /* Line 264 of yacc.c  */
-#line 678 "xpathp.c"
+#line 677 "xpathp.c"
 
 #ifdef short
 # undef short
@@ -724,7 +723,7 @@ typedef short int yytype_int16;
 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
 
 #ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -3010,9 +3009,18 @@ static const yytype_uint16 yystos[] =
 
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
+   Once GCC version 2 has supplanted version 1, this can go.  However,
+   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
+   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+   discussed.  */
 
 #define YYFAIL		goto yyerrlab
+#if defined YYFAIL
+  /* This is here to suppress warnings from the GCC cpp's
+     -Wunused-macros.  Normally we don't worry about that warning, but
+     some users do, and we want to make it easy for users to remove
+     YYFAIL uses, which will produce warnings from Bison 2.5.  */
+#endif
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
@@ -3069,7 +3077,7 @@ while (YYID (0))
    we won't break user code: when these are the locations we know.  */
 
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
 #  define YY_LOCATION_PRINT(File, Loc)			\
      fprintf (File, "%d.%d-%d.%d",			\
 	      (Loc).first_line, (Loc).first_column,	\
@@ -3807,7 +3815,7 @@ yyreduce:
     {
         case 2:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 517 "./xpathp.y"
     {
 		  xpp_arg->xpp_allowed_options = XP_XQUERY_OPTS | XP_XPATH_OPTS | XP_FREETEXT_OPTS;
@@ -3817,14 +3825,14 @@ yyreduce:
 
   case 3:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 521 "./xpathp.y"
     { xpp_arg->xpp_expr = (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
   case 4:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 523 "./xpathp.y"
     {
 		  xpp_arg->xpp_allowed_options = XP_XPATH_OPTS | XP_FREETEXT_OPTS;
@@ -3834,49 +3842,49 @@ yyreduce:
 
   case 5:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 527 "./xpathp.y"
     { xpp_arg->xpp_expr = (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
   case 6:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 528 "./xpathp.y"
     { xpp_arg->xpp_allowed_options = XP_FREETEXT_OPTS; }
     break;
 
   case 7:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 528 "./xpathp.y"
     { xpp_arg->xpp_expr = (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
   case 8:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 529 "./xpathp.y"
     { (yyval.tree) = NULL; /* This never happens and it's here solely to remove warnings */ }
     break;
 
   case 9:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 530 "./xpathp.y"
     { yyerror ("(internal SQL processing error) XQuery, XPath or Free-Text mark expected"); }
     break;
 
   case 10:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 534 "./xpathp.y"
     { yyerror ("The XQuery expression is totally empty"); }
     break;
 
   case 11:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 536 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_module (xpp_arg, NULL, NULL, (yyvsp[(3) - (4)].tree));
@@ -3885,7 +3893,7 @@ yyreduce:
 
   case 12:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 540 "./xpathp.y"
     {
 		  xp_register_namespace_prefix (xpp_arg, (yyvsp[(3) - (6)].box), (yyvsp[(5) - (6)].box));
@@ -3894,7 +3902,7 @@ yyreduce:
 
   case 13:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 544 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_module (xpp_arg, box_copy ((yyvsp[(3) - (9)].box)), box_copy ((yyvsp[(5) - (9)].box)), NULL);
@@ -3903,140 +3911,140 @@ yyreduce:
 
   case 14:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 550 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 17:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 559 "./xpathp.y"
     { (yyval.tree) = (XT*)((yyvsp[(2) - (3)].fts)); }
     break;
 
   case 19:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 568 "./xpathp.y"
     { ; }
     break;
 
   case 20:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 569 "./xpathp.y"
     { ; }
     break;
 
   case 24:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 579 "./xpathp.y"
     { yyerror ("Missing semicolon after prolog (setter) declaration"); }
     break;
 
   case 27:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 585 "./xpathp.y"
     { yyerror ("Prolog setter declaration can not appear after a non-setter declaration"); }
     break;
 
   case 28:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 589 "./xpathp.y"
     { XPP_PROLOG_SET (xe_xmlspace_mode, "xmlspace mode", XPP_XMLSPACE_PRESERVE); }
     break;
 
   case 29:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 590 "./xpathp.y"
     { XPP_PROLOG_SET (xe_xmlspace_mode, "xmlspace mode", XPP_XMLSPACE_STRIP); }
     break;
 
   case 30:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 591 "./xpathp.y"
     { XPP_PROLOG_SET (xe_dflt_collation, "default collation", box_copy ((yyvsp[(2) - (2)].box))); }
     break;
 
   case 31:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 592 "./xpathp.y"
     { XPP_PROLOG_SET (xe_base_uri, "base-uri", box_copy ((yyvsp[(2) - (2)].box))); }
     break;
 
   case 32:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 593 "./xpathp.y"
     { XPP_PROLOG_SET (xe_construction_mode, "construction mode", XPP_TYPE_PRESERVE); }
     break;
 
   case 33:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 594 "./xpathp.y"
     { XPP_PROLOG_SET (xe_construction_mode, "construction mode", XPP_TYPE_STRIP); }
     break;
 
   case 34:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 595 "./xpathp.y"
     { XPP_PROLOG_SET (xe_dflt_elt_namespace, "default element namespace", box_copy ((yyvsp[(3) - (3)].box))); }
     break;
 
   case 35:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 596 "./xpathp.y"
     { XPP_PROLOG_SET (xe_dflt_fn_namespace, "default function namespace", box_copy ((yyvsp[(3) - (3)].box))); }
     break;
 
   case 36:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 597 "./xpathp.y"
     { XPP_PROLOG_SET (xe_ordering_mode, "ordering mode", XPP_ORDERING_ORDERED); }
     break;
 
   case 37:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 598 "./xpathp.y"
     { XPP_PROLOG_SET (xe_ordering_mode, "ordering mode", XPP_ORDERING_UNORDERED); }
     break;
 
   case 38:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 599 "./xpathp.y"
     { XPP_PROLOG_SET (xe_validation_mode, "validation mode", XPP_VALIDATION_LAX); }
     break;
 
   case 39:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 600 "./xpathp.y"
     { XPP_PROLOG_SET (xe_validation_mode, "validation mode", XPP_VALIDATION_SKIP); }
     break;
 
   case 40:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 601 "./xpathp.y"
     { XPP_PROLOG_SET (xe_validation_mode, "validation mode", XPP_VALIDATION_STRICT); }
     break;
 
   case 43:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 607 "./xpathp.y"
     {
 		xp_register_namespace_prefix (xpp_arg, (yyvsp[(2) - (5)].box), (yyvsp[(4) - (5)].box));
@@ -4045,7 +4053,7 @@ yyreduce:
 
   case 44:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 610 "./xpathp.y"
     {
 		xp_register_namespace_prefix (xpp_arg, (yyvsp[(2) - (5)].box), (yyvsp[(4) - (5)].box));
@@ -4054,21 +4062,21 @@ yyreduce:
 
   case 46:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 614 "./xpathp.y"
     { /* dk_set_push (&(xpp_arg->xpp_preamble_decls), $1) */ ; }
     break;
 
   case 47:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 615 "./xpathp.y"
     { /* dk_set_push (&(xpp_arg->xpp_preamble_decls), $1) */ ; }
     break;
 
   case 48:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 620 "./xpathp.y"
     {
 		  if ((yyvsp[(2) - (4)].box))
@@ -4084,63 +4092,63 @@ yyreduce:
 
   case 49:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 633 "./xpathp.y"
     { (yyval.box) = NULL; }
     break;
 
   case 50:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 634 "./xpathp.y"
     { (yyval.box) = (yyvsp[(2) - (3)].box); }
     break;
 
   case 51:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 635 "./xpathp.y"
     { (yyval.box) = (yyvsp[(2) - (3)].box); }
     break;
 
   case 52:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 636 "./xpathp.y"
     { (yyval.box) = (void *)1; }
     break;
 
   case 53:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 640 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 54:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 641 "./xpathp.y"
     { dk_set_push (&((yyval.backstack)), (yyvsp[(2) - (3)].box)); (yyval.backstack) = dk_set_conc ((yyval.backstack), (yyvsp[(3) - (3)].backstack)); }
     break;
 
   case 55:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 645 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 56:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 646 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 57:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 651 "./xpathp.y"
     {
 		  if ((yyvsp[(2) - (4)].box))
@@ -4151,28 +4159,28 @@ yyreduce:
 
   case 58:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 659 "./xpathp.y"
     { (yyval.box) = NULL; }
     break;
 
   case 59:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 660 "./xpathp.y"
     { (yyval.box) = (yyvsp[(2) - (3)].box); }
     break;
 
   case 60:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 661 "./xpathp.y"
     { (yyval.box) = (yyvsp[(2) - (3)].box); }
     break;
 
   case 61:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 666 "./xpathp.y"
     {
 	      xp_var_decl (xpp_arg, box_copy ((yyvsp[(2) - (4)].box)), (yyvsp[(3) - (4)].tree), (yyvsp[(4) - (4)].tree));
@@ -4181,385 +4189,385 @@ yyreduce:
 
   case 62:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 672 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 63:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 673 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 64:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 679 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 65:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 680 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 67:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 685 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, XQCNAME, NULL, (XT *)(yyvsp[(1) - (1)].box), 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 68:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 686 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, XQCNAME, NULL, (XT *)(yyvsp[(1) - (1)].box), 0, XQ_SEQTYPE_OPT_MANY); }
     break;
 
   case 69:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 687 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, XQCNAME, NULL, (XT *)(yyvsp[(1) - (1)].box), 0, XQ_SEQTYPE_REQ_MANY); }
     break;
 
   case 70:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 688 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, XQCNAME, NULL, (XT *)(yyvsp[(1) - (1)].box), 0, XQ_SEQTYPE_OPT_ONE); }
     break;
 
   case 71:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 689 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, DOCUMENT_NODE_LPAR_L, NULL, (yyvsp[(2) - (3)].tree), 0, (yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 73:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 691 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ATTRIBUTE_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, (yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 74:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 692 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ATTRIBUTE_LPAR_L, (yyvsp[(2) - (5)].box), (XT *)(yyvsp[(4) - (5)].box), 0, (yyvsp[(5) - (5)].token_type)); }
     break;
 
   case 76:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 694 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, SCHEMA_ATTRIBUTE_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, (yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 77:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 695 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, PI_LPAR_L, NULL, (yyvsp[(2) - (3)].tree), 0, (yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 78:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 696 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, COMMENT_LPAR_L, NULL, NULL, 0, (yyvsp[(2) - (2)].token_type)); }
     break;
 
   case 79:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 697 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, TEXT_LPAR_L, NULL, NULL, 0, (yyvsp[(2) - (2)].token_type)); }
     break;
 
   case 80:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 698 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, NODE_LPAR_L, NULL, NULL, 0, (yyvsp[(2) - (2)].token_type)); }
     break;
 
   case 81:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 699 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ITEM_LPAR_RPAR_L, NULL, NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 82:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 700 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ITEM_LPAR_RPAR_L, NULL, NULL, 0, XQ_SEQTYPE_REQ_MANY); }
     break;
 
   case 83:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 701 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ITEM_LPAR_RPAR_L, NULL, NULL, 0, XQ_SEQTYPE_OPT_ONE); }
     break;
 
   case 84:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 702 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 85:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 703 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, EMPTY_LPAR_RPAR_L, NULL, NULL, 0, XQ_SEQTYPE_OPT_ONE); }
     break;
 
   case 86:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 707 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, DOCUMENT_NODE_LPAR_L, NULL, (yyvsp[(2) - (3)].tree), 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 88:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 709 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ATTRIBUTE_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 89:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 710 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ATTRIBUTE_LPAR_L, (yyvsp[(2) - (5)].box), (XT *)(yyvsp[(4) - (5)].box), 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 91:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 712 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, SCHEMA_ATTRIBUTE_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 92:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 713 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, PI_LPAR_L, NULL, (yyvsp[(2) - (3)].tree), 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 93:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 714 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, COMMENT_LPAR_L, NULL, NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 94:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 715 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, TEXT_LPAR_L, NULL, NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 95:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 716 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, NODE_LPAR_L, NULL, NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 96:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 720 "./xpathp.y"
     { (yyval.token_type) = XQ_SEQTYPE_REQ_MANY; }
     break;
 
   case 97:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 721 "./xpathp.y"
     { (yyval.token_type) = XQ_SEQTYPE_OPT_ONE; }
     break;
 
   case 98:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 722 "./xpathp.y"
     { (yyval.token_type) = XQ_SEQTYPE_OPT_MANY; }
     break;
 
   case 99:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 726 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, NULL, NULL, 0, (yyvsp[(2) - (2)].token_type)); }
     break;
 
   case 100:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 727 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, (yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 101:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 728 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (5)].box), (XT *)(yyvsp[(4) - (5)].box), 0, (yyvsp[(5) - (5)].token_type)); }
     break;
 
   case 102:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 729 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (6)].box), (XT *)(yyvsp[(4) - (6)].box), 1, (yyvsp[(6) - (6)].token_type)); }
     break;
 
   case 103:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 730 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (5)].box), (XT *)(yyvsp[(4) - (5)].box), 1, (yyvsp[(5) - (5)].token_type)); }
     break;
 
   case 104:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 734 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, NULL, NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 105:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 735 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 106:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 736 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (5)].box), (XT *)(yyvsp[(4) - (5)].box), 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 107:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 737 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (6)].box), (XT *)(yyvsp[(4) - (6)].box), 1, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 108:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 738 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, ELEMENT_LPAR_L, (yyvsp[(2) - (5)].box), (XT *)(yyvsp[(4) - (5)].box), 1, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 109:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 742 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, SCHEMA_ELEMENT_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, (yyvsp[(3) - (3)].token_type)); }
     break;
 
   case 110:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 746 "./xpathp.y"
     { (yyval.tree) = xp_make_seq_type (xpp_arg, SCHEMA_ELEMENT_LPAR_L, (yyvsp[(2) - (3)].box), NULL, 0, XQ_SEQTYPE_REQ_ONE); }
     break;
 
   case 111:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 750 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 112:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 751 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 113:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 752 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 114:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 753 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 115:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 754 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(1) - (1)].tree); }
     break;
 
   case 117:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 759 "./xpathp.y"
     { (yyval.box) = box_dv_uname_string ("not"); }
     break;
 
   case 118:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 760 "./xpathp.y"
     { (yyval.box) = NULL; }
     break;
 
   case 119:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 764 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 120:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 765 "./xpathp.y"
     { (yyval.tree) = (XT *)(yyvsp[(1) - (1)].box); }
     break;
 
   case 121:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 766 "./xpathp.y"
     { (yyval.tree) = (XT *)(yyvsp[(1) - (1)].box); }
     break;
 
   case 122:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 771 "./xpathp.y"
     {
 		  caddr_t fname = xp_make_extfunction_name (xpp_arg, NULL, (yyvsp[(2) - (4)].box));
@@ -4570,7 +4578,7 @@ yyreduce:
 
   case 123:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 777 "./xpathp.y"
     {
 #ifdef MALLOC_DEBUG
@@ -4604,56 +4612,56 @@ yyreduce:
 
   case 124:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 808 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 125:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 809 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(3) - (3)].tree); }
     break;
 
   case 126:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 810 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 127:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 814 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 129:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 819 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 130:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 820 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 131:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 824 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 5, XQ_DEFPARAM, (yyvsp[(3) - (3)].tree), box_copy ((yyvsp[(2) - (3)].box)), (ptrlong)0, (ptrlong)0); }
     break;
 
   case 132:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 849 "./xpathp.y"
     {
 		  if (dk_set_length((yyvsp[(1) - (1)].backstack)) > 1)
@@ -4665,14 +4673,14 @@ yyreduce:
 
   case 133:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 858 "./xpathp.y"
     { (yyval.tree) = xp_make_sortby (xpp_arg, (yyvsp[(1) - (2)].tree), (yyvsp[(2) - (2)].backstack)); }
     break;
 
   case 134:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 860 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "or", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4681,14 +4689,14 @@ yyreduce:
 
   case 135:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 863 "./xpathp.y"
     { yyerror ("operand expected after 'OR'"); }
     break;
 
   case 136:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 865 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "and", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4697,14 +4705,14 @@ yyreduce:
 
   case 137:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 868 "./xpathp.y"
     { yyerror ("operand expected after 'AND'"); }
     break;
 
   case 138:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 870 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "not", list (1, (yyvsp[(2) - (2)].tree)));
@@ -4713,14 +4721,14 @@ yyreduce:
 
   case 139:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 873 "./xpathp.y"
     { yyerror ("operand expected after 'NOT'"); }
     break;
 
   case 140:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 875 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "EQ operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4729,14 +4737,14 @@ yyreduce:
 
   case 141:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 878 "./xpathp.y"
     { yyerror ("operand expected after 'eq'"); }
     break;
 
   case 142:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 880 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, box_dv_uname_string("GE operator"), list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4745,14 +4753,14 @@ yyreduce:
 
   case 143:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 883 "./xpathp.y"
     { yyerror ("operand expected after 'ge'"); }
     break;
 
   case 144:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 885 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "GT operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4761,14 +4769,14 @@ yyreduce:
 
   case 145:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 888 "./xpathp.y"
     { yyerror ("operand expected after 'gt'"); }
     break;
 
   case 146:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 890 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "LE operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4777,14 +4785,14 @@ yyreduce:
 
   case 147:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 893 "./xpathp.y"
     { yyerror ("operand expected after 'le'"); }
     break;
 
   case 148:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 895 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "LT operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4793,14 +4801,14 @@ yyreduce:
 
   case 149:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 898 "./xpathp.y"
     { yyerror ("operand expected after 'lt'"); }
     break;
 
   case 150:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 900 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "NE operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4809,14 +4817,14 @@ yyreduce:
 
   case 151:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 903 "./xpathp.y"
     { yyerror ("operand expected after 'ne'"); }
     break;
 
   case 152:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 905 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "BEFORE operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4825,14 +4833,14 @@ yyreduce:
 
   case 153:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 908 "./xpathp.y"
     { yyerror ("operand expected after '<<'"); }
     break;
 
   case 154:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 910 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "BEFORE operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4841,14 +4849,14 @@ yyreduce:
 
   case 155:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 913 "./xpathp.y"
     { yyerror ("operand expected after 'before'"); }
     break;
 
   case 156:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 915 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "AFTER operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4857,14 +4865,14 @@ yyreduce:
 
   case 157:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 918 "./xpathp.y"
     { yyerror ("operand expected after '>>'"); }
     break;
 
   case 158:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 920 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "AFTER operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -4873,21 +4881,21 @@ yyreduce:
 
   case 159:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 923 "./xpathp.y"
     { yyerror ("operand expected after 'after'"); }
     break;
 
   case 160:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 925 "./xpathp.y"
     { (yyval.tree) = xp_make_flwr (xpp_arg, (yyvsp[(1) - (5)].backstack), (yyvsp[(2) - (5)].tree), (yyvsp[(3) - (5)].backstack), (yyvsp[(5) - (5)].tree)); }
     break;
 
   case 161:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 927 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "if", list (3, (yyvsp[(2) - (7)].tree), (yyvsp[(5) - (7)].tree), (yyvsp[(7) - (7)].tree)));
@@ -4896,7 +4904,7 @@ yyreduce:
 
   case 162:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 931 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "some", list (3, xp_make_literal_tree (xpp_arg, (yyvsp[(2) - (6)].box), 1), (yyvsp[(4) - (6)].tree), (yyvsp[(6) - (6)].tree)));
@@ -4905,7 +4913,7 @@ yyreduce:
 
   case 163:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 935 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "every", list (3, xp_make_literal_tree (xpp_arg, (yyvsp[(2) - (6)].box), 1), (yyvsp[(4) - (6)].tree), (yyvsp[(6) - (6)].tree)));
@@ -4914,105 +4922,105 @@ yyreduce:
 
   case 164:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 938 "./xpathp.y"
     { (yyval.tree) = xp_make_call (xpp_arg, "INSTANCE OF predicate", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree))); }
     break;
 
   case 165:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 939 "./xpathp.y"
     { (yyval.tree) = xp_make_cast (xpp_arg, XQ_CAST_AS_CNAME, NULL, (yyvsp[(1) - (2)].tree)); }
     break;
 
   case 166:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 940 "./xpathp.y"
     { (yyval.tree) = xp_make_cast (xpp_arg, XQ_CASTABLE_AS_CNAME, NULL, (yyvsp[(1) - (2)].tree)); }
     break;
 
   case 167:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 941 "./xpathp.y"
     { (yyval.tree) = xp_make_cast (xpp_arg, TREAT_AS_L, NULL, (yyvsp[(1) - (2)].tree)); }
     break;
 
   case 168:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 942 "./xpathp.y"
     { (yyval.tree) = xp_make_typeswitch (xpp_arg, (yyvsp[(2) - (5)].tree), (yyvsp[(4) - (5)].backstack), (yyvsp[(5) - (5)].trees)); }
     break;
 
   case 169:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 943 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_EQ, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 170:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 944 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_NEQ, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 171:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 945 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_SAME, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 172:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 946 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_NSAME, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 173:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 947 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_LIKE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 174:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 948 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_LT, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 175:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 949 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_LTE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 176:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 950 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_GT, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 177:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 951 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_GTE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 178:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 957 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "TO operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -5021,28 +5029,28 @@ yyreduce:
 
   case 179:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 960 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_PLUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 180:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 961 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_MINUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 181:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 962 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_TIMES, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 182:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 964 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "IDIV operator", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -5051,49 +5059,49 @@ yyreduce:
 
   case 183:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 967 "./xpathp.y"
     { yyerror ("operand expected after 'idiv'"); }
     break;
 
   case 184:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 968 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_DIV, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 185:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 969 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_MOD, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 186:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 970 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 187:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 971 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_MINUS, box_num_nonull (0), (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 188:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 973 "./xpathp.y"
     { (yyval.tree) = xp_make_call (xpp_arg, "union", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree))); }
     break;
 
   case 189:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 975 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 7, XP_UNION,
 		    (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), xe_new_xqst (xpp_arg, XQST_REF),
@@ -5103,7 +5111,7 @@ yyreduce:
 
   case 190:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 980 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "intersect", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -5112,7 +5120,7 @@ yyreduce:
 
   case 191:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 984 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "except", list (2, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)));
@@ -5121,42 +5129,42 @@ yyreduce:
 
   case 192:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 987 "./xpathp.y"
     { (yyval.tree) = xp_make_call (xpp_arg, "VALIDATE operator", list (2, (yyvsp[(2) - (3)].tree), (yyvsp[(1) - (3)].token_type))); }
     break;
 
   case 194:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 992 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(2) - (3)].backstack); }
     break;
 
   case 195:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 993 "./xpathp.y"
     { yyerror ("')' or ',' expected"); }
     break;
 
   case 196:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 997 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 197:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 998 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 198:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1003 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 7, (yyvsp[(2) - (5)].token_type),
 		  NULL,				    /* xs_query */
@@ -5170,112 +5178,112 @@ yyreduce:
 
   case 199:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1014 "./xpathp.y"
     { (yyval.token_type) = XQ_ASCENDING; }
     break;
 
   case 200:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1015 "./xpathp.y"
     { (yyval.token_type) = XQ_ASCENDING; }
     break;
 
   case 201:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1016 "./xpathp.y"
     { (yyval.token_type) = XQ_DESCENDING; }
     break;
 
   case 202:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1020 "./xpathp.y"
     { (yyval.token_type) = XQ_EMPTY_SQL_ORDER; }
     break;
 
   case 203:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1021 "./xpathp.y"
     { (yyval.token_type) = XQ_EMPTY_GREATEST; }
     break;
 
   case 204:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1022 "./xpathp.y"
     { (yyval.token_type) = XQ_EMPTY_LEAST; }
     break;
 
   case 205:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1026 "./xpathp.y"
     { (yyval.box) = NULL; }
     break;
 
   case 206:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1027 "./xpathp.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 207:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1031 "./xpathp.y"
     { (yyval.box) = DV_UNKNOWN; }
     break;
 
   case 208:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1032 "./xpathp.y"
     { (yyval.box) = (yyvsp[(2) - (2)].box); }
     break;
 
   case 209:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1036 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].backstack)); }
     break;
 
   case 210:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1037 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].backstack)); }
     break;
 
   case 213:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1046 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(2) - (2)].backstack); dk_set_push (&((yyval.backstack)), (void *)(XQ_FOR)); }
     break;
 
   case 214:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1050 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 215:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1051 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (4)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 216:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1056 "./xpathp.y"
     {
 	      (yyval.bookmark) = dk_alloc_box (sizeof (xp_lexbmk_t), DV_ARRAY_OF_LONG);
@@ -5285,7 +5293,7 @@ yyreduce:
 
   case 217:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1061 "./xpathp.y"
     {
               (yyval.tree) = xtlist (xpp_arg, 3, XQ_IN, box_copy ((yyvsp[(1) - (4)].box)), xp_embedded_xmlview (xpp_arg, (yyvsp[(3) - (4)].bookmark), (yyvsp[(4) - (4)].tree)));
@@ -5295,182 +5303,182 @@ yyreduce:
 
   case 218:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1068 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(2) - (2)].backstack); dk_set_push (&((yyval.backstack)), (void *)(XQ_LET)); }
     break;
 
   case 219:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1072 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 220:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1073 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (4)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 221:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1077 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 3, XQ_ASSIGN, box_copy ((yyvsp[(1) - (3)].box)), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 222:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1081 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 223:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1082 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (2)].tree); }
     break;
 
   case 224:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1086 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 225:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1087 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(2) - (2)].backstack); dk_set_push (&((yyval.backstack)), (void *)((ptrlong)ORDER_BY_L)); }
     break;
 
   case 226:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1088 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(2) - (2)].backstack); dk_set_push (&((yyval.backstack)), (void *)((ptrlong)STABLE_ORDER_BY_L)); }
     break;
 
   case 227:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1092 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].trees)); }
     break;
 
   case 228:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1093 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].trees)); }
     break;
 
   case 229:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1097 "./xpathp.y"
     { (yyval.trees) = (XT **) list (3, (yyvsp[(5) - (7)].tree), (yyvsp[(3) - (7)].box), (yyvsp[(7) - (7)].tree)); }
     break;
 
   case 230:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1098 "./xpathp.y"
     { (yyval.trees) = (XT **) list (3, (yyvsp[(2) - (4)].tree), NULL, (yyvsp[(4) - (4)].tree)); }
     break;
 
   case 231:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1102 "./xpathp.y"
     { (yyval.trees) = (XT **) list (3, NULL, (yyvsp[(3) - (5)].box), (yyvsp[(5) - (5)].tree)); }
     break;
 
   case 232:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1103 "./xpathp.y"
     { (yyval.trees) = (XT **) list (3, NULL, NULL, (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 233:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1107 "./xpathp.y"
     { (yyval.token_type) = xpp_arg->xpp_xp_env->xe_validation_mode; }
     break;
 
   case 234:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1108 "./xpathp.y"
     { (yyval.token_type) = XPP_VALIDATION_LAX; }
     break;
 
   case 235:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1109 "./xpathp.y"
     { (yyval.token_type) = XPP_VALIDATION_STRICT; }
     break;
 
   case 236:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1110 "./xpathp.y"
     { (yyval.token_type) = XPP_VALIDATION_SKIP; }
     break;
 
   case 239:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1120 "./xpathp.y"
     { (yyval.tree) = xp_path (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), 0); }
     break;
 
   case 240:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1121 "./xpathp.y"
     { (yyval.tree) = xp_path (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_SLASH_SLASH); }
     break;
 
   case 241:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1122 "./xpathp.y"
     { (yyval.tree) = xp_path (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_DEREF); }
     break;
 
   case 242:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1123 "./xpathp.y"
     { (yyval.tree) = xp_absolute (xpp_arg, (yyvsp[(2) - (2)].tree), XP_ABS_CHILD); }
     break;
 
   case 243:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1124 "./xpathp.y"
     { (yyval.tree) = xp_absolute (xpp_arg, (yyvsp[(2) - (2)].tree), XP_ABS_SLASH_SLASH); }
     break;
 
   case 244:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1125 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_ROOT, (XT*) XP_NODE, NULL); }
     break;
 
   case 245:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1127 "./xpathp.y"
     {
 		  XT *src = (yyvsp[(1) - (3)].tree);
@@ -5480,7 +5488,7 @@ yyreduce:
 
   case 246:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1132 "./xpathp.y"
     {
 		  XT *left = (yyvsp[(1) - (3)].tree);
@@ -5493,7 +5501,7 @@ yyreduce:
 
   case 247:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1143 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_filters (xpp_arg, (yyvsp[(1) - (2)].tree), dk_set_nreverse ((yyvsp[(2) - (2)].backstack)));
@@ -5502,42 +5510,42 @@ yyreduce:
 
   case 248:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1150 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, NULL, (yyvsp[(1) - (1)].tree), XP_BY_MAIN_STEP); }
     break;
 
   case 249:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1151 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, NULL, (yyvsp[(1) - (1)].tree), XP_BY_MAIN_STEP); }
     break;
 
   case 250:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1152 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_BY_MAIN_STEP); }
     break;
 
   case 251:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1153 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_SLASH_SLASH); }
     break;
 
   case 252:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1154 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_DEREF); }
     break;
 
   case 255:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1164 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_step (xpp_arg, (yyvsp[(1) - (3)].token_type), (yyvsp[(2) - (3)].tree),
@@ -5547,14 +5555,14 @@ yyreduce:
 
   case 256:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1169 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_PARENT, (XT *)XP_NODE, NULL); }
     break;
 
   case 257:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1174 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_step (xpp_arg, XP_CHILD, (yyvsp[(1) - (2)].tree), (XT **) list_to_array (dk_set_nreverse ((yyvsp[(2) - (2)].backstack))));
@@ -5564,70 +5572,70 @@ yyreduce:
 
   case 258:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1182 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 259:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1183 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 260:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1187 "./xpathp.y"
     { xp_pred_start (xpp_arg); }
     break;
 
   case 261:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1187 "./xpathp.y"
     { (yyval.tree) = xp_make_pred (xpp_arg, (yyvsp[(3) - (4)].tree)); }
     break;
 
   case 263:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1192 "./xpathp.y"
     { yyerror ("Unknown axis name"); }
     break;
 
   case 264:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1200 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 266:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1202 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 267:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1203 "./xpathp.y"
     { (yyval.tree) = xp_make_call (xpp_arg, "append", list(0)); }
     break;
 
   case 268:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1204 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_SELF, (XT *) XP_NODE, NULL); }
     break;
 
   case 273:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1210 "./xpathp.y"
     {
 		  (yyval.token_type) = xpp_arg->xpp_xp_env->xe_ordering_mode; xpp_arg->xpp_xp_env->xe_ordering_mode = (yyvsp[(1) - (1)].token_type);
@@ -5636,70 +5644,70 @@ yyreduce:
 
   case 274:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1213 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(3) - (4)].tree); xpp_arg->xpp_xp_env->xe_ordering_mode = (yyvsp[(2) - (4)].token_type);  }
     break;
 
   case 275:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1217 "./xpathp.y"
     { (yyval.token_type) = XPP_ORDERING_ORDERED; }
     break;
 
   case 276:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1218 "./xpathp.y"
     { (yyval.token_type) = XPP_ORDERING_UNORDERED; }
     break;
 
   case 280:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1229 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 281:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1230 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 282:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1231 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 283:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1235 "./xpathp.y"
     { (yyval.tree) = (XT *) XP_ELT; }
     break;
 
   case 284:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1236 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 4, XP_NAME_NSURI, xp_namespace_pref (xpp_arg, (yyvsp[(1) - (1)].box)), XP_STAR, NULL); }
     break;
 
   case 285:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1237 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 4, XP_NAME_LOCAL, XP_STAR, box_copy ((yyvsp[(1) - (1)].box)), NULL); }
     break;
 
   case 286:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1242 "./xpathp.y"
     {
 		    (yyval.tree) = xp_make_call_or_funcall (xpp_arg, (yyvsp[(1) - (3)].box), list_to_array (dk_set_nreverse ((yyvsp[(2) - (3)].backstack))));
@@ -5708,7 +5716,7 @@ yyreduce:
 
   case 287:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1246 "./xpathp.y"
     {
 		    (yyval.tree) = xp_make_call_or_funcall (xpp_arg, (yyvsp[(1) - (2)].box), list(0));
@@ -5717,7 +5725,7 @@ yyreduce:
 
   case 288:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1250 "./xpathp.y"
     {
 		    (yyval.tree) = xp_make_call_or_funcall (xpp_arg, (yyvsp[(1) - (3)].box), list_to_array (dk_set_nreverse ((yyvsp[(2) - (3)].backstack))));
@@ -5727,7 +5735,7 @@ yyreduce:
 
   case 289:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1255 "./xpathp.y"
     {
 		    (yyval.tree) = xp_make_call_or_funcall (xpp_arg, (yyvsp[(1) - (2)].box), list(0));
@@ -5737,49 +5745,49 @@ yyreduce:
 
   case 290:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1262 "./xpathp.y"
     { (yyval.tree) = xp_make_sqlcolumn_ref (xpp_arg, (yyvsp[(3) - (4)].box)); }
     break;
 
   case 291:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1263 "./xpathp.y"
     { yyerror ("')' expected after column name"); }
     break;
 
   case 292:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1264 "./xpathp.y"
     { yyerror ("Column name in sql:column must be a string constant"); }
     break;
 
   case 293:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1265 "./xpathp.y"
     { yyerror ("'(' expected after sql:column"); }
     break;
 
   case 294:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1269 "./xpathp.y"
     { (yyval.tree) = xp_make_variable_ref (xpp_arg, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 295:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1270 "./xpathp.y"
     { (yyval.tree) = xp_make_variable_ref (xpp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 300:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1287 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "DOCUMENT computed constructor", revlist_to_array ((yyvsp[(2) - (3)].backstack)));
@@ -5788,7 +5796,7 @@ yyreduce:
 
   case 301:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1291 "./xpathp.y"
     {
 		  dk_set_push (&((yyvsp[(2) - (3)].backstack)), xp_make_literal_tree (xpp_arg, xp_make_expanded_name (xpp_arg, (yyvsp[(1) - (3)].box), 0), 0));
@@ -5798,7 +5806,7 @@ yyreduce:
 
   case 302:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1296 "./xpathp.y"
     {
 		  dk_set_push (&((yyvsp[(5) - (6)].backstack)), (yyvsp[(2) - (6)].tree));
@@ -5808,7 +5816,7 @@ yyreduce:
 
   case 303:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1301 "./xpathp.y"
     {
 		  dk_set_push (&((yyvsp[(2) - (3)].backstack)), xp_make_literal_tree (xpp_arg, xp_make_expanded_name (xpp_arg, (yyvsp[(1) - (3)].box), 1), 0));
@@ -5818,7 +5826,7 @@ yyreduce:
 
   case 304:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1306 "./xpathp.y"
     {
 		  dk_set_push (&((yyvsp[(5) - (6)].backstack)), (yyvsp[(2) - (6)].tree));
@@ -5828,7 +5836,7 @@ yyreduce:
 
   case 305:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1311 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "TEXT computed constructor", revlist_to_array ((yyvsp[(2) - (3)].backstack)));
@@ -5837,7 +5845,7 @@ yyreduce:
 
   case 306:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1315 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call (xpp_arg, "COMMENT computed constructor", revlist_to_array ((yyvsp[(2) - (3)].backstack)));
@@ -5846,7 +5854,7 @@ yyreduce:
 
   case 307:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1319 "./xpathp.y"
     {
 		  dk_set_push (&((yyvsp[(2) - (3)].backstack)), xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (3)].box), 1));
@@ -5856,7 +5864,7 @@ yyreduce:
 
   case 308:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1324 "./xpathp.y"
     {
 		  dk_set_push (&((yyvsp[(5) - (6)].backstack)), (yyvsp[(2) - (6)].tree));
@@ -5866,63 +5874,63 @@ yyreduce:
 
   case 309:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1331 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 311:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1336 "./xpathp.y"
     { (yyval.backstack) = NULL; if ((yyvsp[(1) - (1)].tree)) dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 312:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1337 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); if ((yyvsp[(3) - (3)].tree)) dk_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 314:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1342 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 315:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1343 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 316:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1344 "./xpathp.y"
     { (yyval.tree) = NULL; }
     break;
 
   case 318:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1351 "./xpathp.y"
     { (yyval.tree) = xp_make_direct_comment_ctor (xpp_arg, xp_make_literal_tree (xpp_arg, (yyvsp[(2) - (2)].box), 1)); }
     break;
 
   case 319:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1352 "./xpathp.y"
     { (yyval.tree) = xp_make_direct_pi_ctor (xpp_arg, xp_make_literal_tree (xpp_arg, (yyvsp[(2) - (3)].box), 1), xp_make_literal_tree (xpp_arg, (yyvsp[(3) - (3)].box), 1)); }
     break;
 
   case 320:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1357 "./xpathp.y"
     {
 		  (yyval.list) = xp_bookmark_namespaces (xpp_arg);
@@ -5931,7 +5939,7 @@ yyreduce:
 
   case 321:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1360 "./xpathp.y"
     {
 		  (yyval.box) = xpp_arg->xpp_xp_env->xe_dflt_elt_namespace;
@@ -5940,7 +5948,7 @@ yyreduce:
 
   case 322:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1364 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_direct_el_ctor (xpp_arg, (yyvsp[(4) - (6)].tree), dk_set_nreverse((yyvsp[(5) - (6)].backstack)), dk_set_nreverse((yyvsp[(6) - (6)].backstack)));
@@ -5951,147 +5959,147 @@ yyreduce:
 
   case 323:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1372 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 324:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1373 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(2) - (3)].backstack); }
     break;
 
   case 325:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1377 "./xpathp.y"
     { /* no default action */; }
     break;
 
   case 326:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1378 "./xpathp.y"
     { /*dk_free_box ($2)*/; }
     break;
 
   case 327:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1382 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, xp_make_expanded_name (xpp_arg, (yyvsp[(1) - (1)].box), 0), 0); }
     break;
 
   case 328:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1383 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, xp_make_expanded_name (xpp_arg, (yyvsp[(1) - (1)].box), 0), 0); }
     break;
 
   case 329:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1384 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 330:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1388 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 331:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1389 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (4)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(2) - (4)].tree)); dk_set_push (&((yyval.backstack)), dk_set_nreverse((yyvsp[(4) - (4)].list))); }
     break;
 
   case 332:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1390 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (4)].backstack); xpp_arg->xpp_xp_env->xe_dflt_elt_namespace = box_dv_short_string ((yyvsp[(4) - (4)].box)); }
     break;
 
   case 333:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1391 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (4)].backstack); xp_register_namespace_prefix_by_xmlns (xpp_arg, (yyvsp[(2) - (4)].box), (yyvsp[(4) - (4)].box)); }
     break;
 
   case 334:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1395 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, xp_make_expanded_name (xpp_arg, (yyvsp[(1) - (1)].box), 1), 0); }
     break;
 
   case 335:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1396 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, xp_make_expanded_name (xpp_arg, (yyvsp[(1) - (1)].box), 1), 0); }
     break;
 
   case 336:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1397 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 340:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1408 "./xpathp.y"
     { (yyval.list) = NULL; dk_set_push (&((yyval.list)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 341:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1409 "./xpathp.y"
     { (yyval.list) = NULL; dk_set_push (&((yyval.list)), xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1)); }
     break;
 
   case 342:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1410 "./xpathp.y"
     { (yyval.list) = NULL; dk_set_push (&((yyval.list)), xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1)); }
     break;
 
   case 343:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1411 "./xpathp.y"
     { (yyval.list) = NULL; dk_set_push (&((yyval.list)), xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1)); }
     break;
 
   case 344:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1412 "./xpathp.y"
     { (yyval.list) = NULL; PUSH_STRING_ARG_OF_CONCAT((yyval.list), (yyvsp[(1) - (2)].box)); (yyval.list) = dk_set_conc ((yyvsp[(2) - (2)].backstack), (yyval.list)); }
     break;
 
   case 345:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1413 "./xpathp.y"
     { (yyval.list) = NULL; PUSH_STRING_ARG_OF_CONCAT((yyval.list), (yyvsp[(1) - (2)].box)); (yyval.list) = dk_set_conc ((yyvsp[(2) - (2)].backstack), (yyval.list)); }
     break;
 
   case 346:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1419 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack);
 		  PUSH_STRING_ARG_OF_CONCAT((yyval.backstack), (yyvsp[(2) - (2)].box));
@@ -6100,7 +6108,7 @@ yyreduce:
 
   case 347:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1423 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack);
 		  PUSH_STRING_ARG_OF_CONCAT((yyval.backstack), (yyvsp[(2) - (3)].box));
@@ -6110,7 +6118,7 @@ yyreduce:
 
   case 348:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1431 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack);
 		  PUSH_STRING_ARG_OF_CONCAT((yyval.backstack), (yyvsp[(2) - (2)].box));
@@ -6119,7 +6127,7 @@ yyreduce:
 
   case 349:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1435 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack);
 		  PUSH_STRING_ARG_OF_CONCAT((yyval.backstack), (yyvsp[(2) - (3)].box));
@@ -6129,56 +6137,56 @@ yyreduce:
 
   case 350:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1442 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 351:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1443 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (2)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 354:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1449 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 355:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1450 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 356:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1451 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 357:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1452 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, (yyvsp[(2) - (2)].box), 1); }
     break;
 
   case 358:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1514 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 359:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1520 "./xpathp.y"
     {
 		  /* if (1 == dk_set_length($1))
@@ -6190,133 +6198,133 @@ yyreduce:
 
   case 360:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1529 "./xpathp.y"
     { (yyval.backstack) = NULL; }
     break;
 
   case 362:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1534 "./xpathp.y"
     { (yyval.backstack) = NULL; dk_set_push (&((yyval.backstack)), (yyvsp[(1) - (1)].tree)); }
     break;
 
   case 363:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1535 "./xpathp.y"
     { (yyval.backstack) = (yyvsp[(1) - (3)].backstack); dk_set_push (&((yyval.backstack)), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 367:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1551 "./xpathp.y"
     { ; }
     break;
 
   case 368:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1552 "./xpathp.y"
     { ; }
     break;
 
   case 369:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1556 "./xpathp.y"
     { ; }
     break;
 
   case 370:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1557 "./xpathp.y"
     { yyerror ("']' or option expected"); }
     break;
 
   case 371:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1561 "./xpathp.y"
     { ; }
     break;
 
   case 372:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1562 "./xpathp.y"
     { ; }
     break;
 
   case 373:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1563 "./xpathp.y"
     { ; }
     break;
 
   case 374:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1567 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_is_http = 1; }
     break;
 
   case 375:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1568 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_is_for_key = 1; }
     break;
 
   case 376:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1569 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_is_for_attrs = 1; }
     break;
 
   case 377:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1570 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_is_sax = 1; }
     break;
 
   case 378:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1571 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_is_shallow = 1; }
     break;
 
   case 379:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1572 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_is_quiet = 1; }
     break;
 
   case 380:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1573 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_is_davprop = 1; }
     break;
 
   case 381:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1574 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_base_uri = box_copy_tree ((yyvsp[(2) - (2)].box)); }
     break;
 
   case 382:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1575 "./xpathp.y"
     {
 #ifdef OLD_VXML_TABLES
@@ -6329,7 +6337,7 @@ yyreduce:
 
   case 383:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1582 "./xpathp.y"
     {
 		xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS);
@@ -6343,14 +6351,14 @@ yyreduce:
 
   case 384:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1590 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS); xpp_arg->xpp_xp_env->xe_result_tag = box_copy ((yyvsp[(2) - (2)].box)); }
     break;
 
   case 385:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1591 "./xpathp.y"
     {
 		xp_reject_option_if_not_allowed (xpp_arg, XP_XPATH_OPTS);
@@ -6363,28 +6371,28 @@ yyreduce:
 
   case 386:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1598 "./xpathp.y"
     { XPP_PROLOG_SET (xe_dflt_elt_namespace, "default element namespace", (yyvsp[(3) - (3)].box)); }
     break;
 
   case 387:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1599 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_FREETEXT_OPTS); xpp_arg->xpp_lang = lh_get_handler ((yyvsp[(2) - (2)].box)); }
     break;
 
   case 388:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1600 "./xpathp.y"
     { xp_reject_option_if_not_allowed (xpp_arg, XP_FREETEXT_OPTS); xp_set_encoding_option (xpp_arg, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 389:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1601 "./xpathp.y"
     {
 		dk_set_push (&(xpp_arg->xpp_dtd_config_tmp_set), box_dv_short_string ((yyvsp[(1) - (3)].box)));
@@ -6394,112 +6402,112 @@ yyreduce:
 
   case 391:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1610 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_OR, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 392:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1611 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_AND, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 393:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1612 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_NOT, (yyvsp[(2) - (2)].tree), NULL); }
     break;
 
   case 394:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1613 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_EQ, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 395:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1614 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_NEQ, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 396:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1615 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_LT, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 397:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1616 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_LTE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 398:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1617 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_GT, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 399:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1618 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_GTE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 400:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1619 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_LIKE, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 401:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1620 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_MINUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 402:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1621 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_PLUS, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 403:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1622 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_TIMES, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 404:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1623 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_DIV, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 405:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1624 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_MOD, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree)); }
     break;
 
   case 406:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1626 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 7, XP_UNION,
 		    (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), xe_new_xqst (xpp_arg, XQST_REF),
@@ -6509,343 +6517,343 @@ yyreduce:
 
   case 407:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1630 "./xpathp.y"
     { XBIN_OP ((yyval.tree), BOP_MINUS, box_num_nonull (0), (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 410:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1638 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_ROOT, (XT*) XP_NODE, NULL); }
     break;
 
   case 411:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1643 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, NULL, (yyvsp[(1) - (1)].tree), XP_BY_MAIN_STEP); }
     break;
 
   case 412:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1644 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_BY_MAIN_STEP); }
     break;
 
   case 413:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1645 "./xpathp.y"
     { (yyval.tree) = xp_step (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_SLASH_SLASH); }
     break;
 
   case 414:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1650 "./xpathp.y"
     { (yyval.tree) = xp_absolute (xpp_arg, (yyvsp[(2) - (2)].tree), XP_ABS_CHILD); }
     break;
 
   case 415:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1651 "./xpathp.y"
     { (yyval.tree) = xp_absolute (xpp_arg, (yyvsp[(2) - (2)].tree), XP_ABS_SLASH_SLASH); }
     break;
 
   case 416:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1656 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, (yyvsp[(1) - (3)].token_type), (yyvsp[(2) - (3)].tree), (yyvsp[(3) - (3)].trees)); }
     break;
 
   case 417:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1657 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_CHILD, (yyvsp[(1) - (2)].tree), (yyvsp[(2) - (2)].trees)); }
     break;
 
   case 418:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1658 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_SELF, (XT*) XP_NODE, (yyvsp[(2) - (2)].trees)); }
     break;
 
   case 419:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1659 "./xpathp.y"
     { (yyval.tree) = xp_make_step (xpp_arg, XP_PARENT, (XT*) XP_NODE, (yyvsp[(2) - (2)].trees)); }
     break;
 
   case 421:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1665 "./xpathp.y"
     { (yyval.token_type) = XP_ATTRIBUTE; }
     break;
 
   case 422:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1670 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 423:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1671 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, box_dv_uname_string ("not"), 0); }
     break;
 
   case 424:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1672 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 425:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1673 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 4, XP_NAME_NSURI, xp_namespace_pref (xpp_arg, (yyvsp[(1) - (1)].box)), XP_STAR, NULL); }
     break;
 
   case 426:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1674 "./xpathp.y"
     { (yyval.tree) = xtlist (xpp_arg, 4, XP_NAME_LOCAL, XP_STAR, box_copy ((yyvsp[(1) - (1)].box)), NULL); }
     break;
 
   case 427:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1675 "./xpathp.y"
     { (yyval.tree) = (XT *) XP_ELT; }
     break;
 
   case 428:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1676 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(2) - (3)].box), 0); (yyval.tree)->type = XP_PI; }
     break;
 
   case 429:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1677 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(2) - (3)].box), 0); (yyval.tree)->type = XP_PI; }
     break;
 
   case 430:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1678 "./xpathp.y"
     { (yyval.tree) = (XT*) XP_PI; }
     break;
 
   case 431:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1679 "./xpathp.y"
     { (yyval.tree) = (XT*) XP_COMMENT; }
     break;
 
   case 432:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1680 "./xpathp.y"
     { (yyval.tree) = (XT*) XP_TEXT; }
     break;
 
   case 433:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1681 "./xpathp.y"
     { (yyval.tree) = (XT*) XP_NODE; }
     break;
 
   case 434:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1682 "./xpathp.y"
     { (yyval.tree) = xp_make_name_test_from_qname (xpp_arg, (yyvsp[(1) - (1)].box), 0); }
     break;
 
   case 435:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1687 "./xpathp.y"
     { (yyval.token_type) = XP_ANCESTOR; }
     break;
 
   case 436:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1688 "./xpathp.y"
     { (yyval.token_type) = XP_ANCESTOR_OR_SELF; }
     break;
 
   case 437:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1689 "./xpathp.y"
     { (yyval.token_type) = XP_ATTRIBUTE; }
     break;
 
   case 438:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1690 "./xpathp.y"
     { (yyval.token_type) = XP_CHILD; }
     break;
 
   case 439:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1691 "./xpathp.y"
     { (yyval.token_type) = XP_DESCENDANT; }
     break;
 
   case 440:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1692 "./xpathp.y"
     { (yyval.token_type) = XP_DESCENDANT_OR_SELF; }
     break;
 
   case 441:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1693 "./xpathp.y"
     { (yyval.token_type) = XP_FOLLOWING; }
     break;
 
   case 442:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1694 "./xpathp.y"
     { (yyval.token_type) = XP_FOLLOWING_SIBLING; }
     break;
 
   case 443:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1695 "./xpathp.y"
     { (yyval.token_type) = XP_NAMESPACE; yyerror ("namespace axis not allowed"); }
     break;
 
   case 444:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1696 "./xpathp.y"
     { (yyval.token_type) = XP_PARENT; }
     break;
 
   case 445:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1697 "./xpathp.y"
     { (yyval.token_type) = XP_PRECEDING; }
     break;
 
   case 446:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1698 "./xpathp.y"
     { (yyval.token_type) = XP_PRECEDING_SIBLING; }
     break;
 
   case 447:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1699 "./xpathp.y"
     { (yyval.token_type) = XP_SELF; }
     break;
 
   case 448:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1703 "./xpathp.y"
     { (yyval.trees) = NULL; }
     break;
 
   case 449:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1704 "./xpathp.y"
     { (yyval.trees) = (XT **) list_to_array ((yyvsp[(1) - (1)].list)); }
     break;
 
   case 450:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1708 "./xpathp.y"
     { xp_pred_start (xpp_arg); }
     break;
 
   case 451:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1708 "./xpathp.y"
     { (yyval.tree) = xp_make_pred (xpp_arg, (yyvsp[(3) - (4)].tree)); }
     break;
 
   case 452:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1712 "./xpathp.y"
     { (yyval.list) = CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 453:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1713 "./xpathp.y"
     { (yyval.list) = NCONC ((yyvsp[(1) - (2)].list), CONS ((yyvsp[(2) - (2)].tree), NULL)); }
     break;
 
   case 454:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1718 "./xpathp.y"
     { (yyval.tree) = xp_make_variable_ref(xpp_arg, (yyvsp[(2) - (2)].box)); }
     break;
 
   case 455:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1719 "./xpathp.y"
     { (yyval.tree) = xp_make_variable_ref(xpp_arg, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 457:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1725 "./xpathp.y"
     { (yyval.tree) = (yyvsp[(2) - (3)].tree); }
     break;
 
   case 459:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1727 "./xpathp.y"
     { (yyval.tree) = xp_make_literal_tree (xpp_arg, (yyvsp[(1) - (1)].box), 1); }
     break;
 
   case 460:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1733 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call_or_funcall (xpp_arg, (yyvsp[(1) - (3)].box), list_to_array ((yyvsp[(2) - (3)].list)));
@@ -6854,7 +6862,7 @@ yyreduce:
 
   case 461:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1737 "./xpathp.y"
     {
 		  (yyval.tree) = xp_make_call_or_funcall (xpp_arg, (yyvsp[(1) - (3)].box), list_to_array ((yyvsp[(2) - (3)].list)));
@@ -6864,70 +6872,70 @@ yyreduce:
 
   case 462:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1744 "./xpathp.y"
     { (yyval.list) = NULL; }
     break;
 
   case 463:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1745 "./xpathp.y"
     { (yyval.list) = CONS ((yyvsp[(1) - (1)].tree), NULL); }
     break;
 
   case 464:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1746 "./xpathp.y"
     { (yyval.list) = NCONC ((yyvsp[(1) - (3)].list), CONS ((yyvsp[(3) - (3)].tree), NULL)); }
     break;
 
   case 467:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1754 "./xpathp.y"
     { (yyval.tree) = xp_path (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), 0); }
     break;
 
   case 468:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1755 "./xpathp.y"
     { (yyval.tree) = xp_path (xpp_arg, (yyvsp[(1) - (3)].tree), (yyvsp[(3) - (3)].tree), XP_SLASH_SLASH); }
     break;
 
   case 470:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1761 "./xpathp.y"
     { (yyval.tree) = xp_make_filter (xpp_arg, (yyvsp[(1) - (2)].tree), (yyvsp[(2) - (2)].tree)); }
     break;
 
   case 476:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1780 "./xpathp.y"
     { (yyval.box) = xp_xml_view_name (xpp_arg, NULL, NULL, (yyvsp[(1) - (1)].box)); }
     break;
 
   case 477:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1782 "./xpathp.y"
     { (yyval.box) = xp_xml_view_name (xpp_arg, NULL, (yyvsp[(1) - (3)].box), (yyvsp[(3) - (3)].box)); }
     break;
 
   case 478:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1784 "./xpathp.y"
     { (yyval.box) = xp_xml_view_name (xpp_arg, (yyvsp[(1) - (5)].box), (yyvsp[(3) - (5)].box), (yyvsp[(5) - (5)].box)); }
     break;
 
   case 479:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1786 "./xpathp.y"
     { /* Note one _DOT_DOT here, not two _DOTs */
 		  (yyval.box) = xp_xml_view_name (xpp_arg, (yyvsp[(1) - (3)].box), NULL, (yyvsp[(3) - (3)].box)); }
@@ -6935,78 +6943,78 @@ yyreduce:
 
   case 480:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1791 "./xpathp.y"
     { (yyval.fts) = xp_word_or_phrase_from_string (xpp_arg, (yyvsp[(1) - (1)].box), xpp_arg->xpp_enc, xpp_arg->xpp_lang, 1); }
     break;
 
   case 481:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1792 "./xpathp.y"
     { (yyval.fts) = xp_word_or_phrase_from_string (xpp_arg, (yyvsp[(1) - (1)].box), xpp_arg->xpp_enc, xpp_arg->xpp_lang, 1); }
     break;
 
   case 482:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1793 "./xpathp.y"
     { (yyval.fts) = xp_word_from_exact_string (xpp_arg, (yyvsp[(2) - (2)].box), xpp_arg->xpp_enc, 1); }
     break;
 
   case 483:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1794 "./xpathp.y"
     {TBIN_OP ((yyval.fts), BOP_AND, (yyvsp[(1) - (3)].fts), (yyvsp[(3) - (3)].fts)); }
     break;
 
   case 484:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1795 "./xpathp.y"
     { TBIN_OP ((yyval.fts), XP_AND_NOT, (yyvsp[(1) - (4)].fts), (yyvsp[(4) - (4)].fts)); }
     break;
 
   case 485:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1796 "./xpathp.y"
     { TBIN_OP ((yyval.fts), BOP_OR, (yyvsp[(1) - (3)].fts), (yyvsp[(3) - (3)].fts)); }
     break;
 
   case 486:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1797 "./xpathp.y"
     { TBIN_OP ((yyval.fts), XP_NEAR, (yyvsp[(1) - (3)].fts), (yyvsp[(3) - (3)].fts)); }
     break;
 
   case 487:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1798 "./xpathp.y"
     { (yyval.fts) = (yyvsp[(2) - (3)].fts); }
     break;
 
   case 488:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1799 "./xpathp.y"
     { (yyval.fts) = (yyvsp[(4) - (5)].fts); }
     break;
 
   case 489:
 
-/* Line 1455 of yacc.c  */
+/* Line 1464 of yacc.c  */
 #line 1800 "./xpathp.y"
     { yyerror ("']' or option expected"); }
     break;
 
 
 
-/* Line 1455 of yacc.c  */
-#line 7010 "xpathp.c"
+/* Line 1464 of yacc.c  */
+#line 7018 "xpathp.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/libsrc/Wi/xpathp.h b/libsrc/Wi/xpathp.h
index eb2ca6d..d591976 100644
--- a/libsrc/Wi/xpathp.h
+++ b/libsrc/Wi/xpathp.h
@@ -1,10 +1,9 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1.  */
+/* A Bison parser, made by GNU Bison 2.4.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+   2009, 2010 Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -512,7 +511,7 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
+/* Line 1685 of yacc.c  */
 #line 99 "./xpathp.y"
 
   caddr_t box;
@@ -527,8 +526,8 @@ typedef union YYSTYPE
 
 
 
-/* Line 1676 of yacc.c  */
-#line 532 "xpathp.h"
+/* Line 1685 of yacc.c  */
+#line 531 "xpathp.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/libsrc/Wi/xpathp.y b/libsrc/Wi/xpathp.y
index bba18cc..e55c496 100644
--- a/libsrc/Wi/xpathp.y
+++ b/libsrc/Wi/xpathp.y
@@ -1,14 +1,14 @@
 /*
  *  xpathp.y
  *
- *  $Id: xpathp.y,v 1.9.2.2 2009/04/24 16:02:09 source Exp $
+ *  $Id: xpathp.y,v 1.9.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  SQL Parser
  *
  *   This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *   project.
  *
- *   Copyright (C) 1998-2006 OpenLink Software
+ *   Copyright (C) 1998-2012 OpenLink Software
  *
  *   This project is free software; you can redistribute it and/or modify it
  *   under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xpathp_impl.h b/libsrc/Wi/xpathp_impl.h
index 71784bc..2183e8f 100644
--- a/libsrc/Wi/xpathp_impl.h
+++ b/libsrc/Wi/xpathp_impl.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: xpathp_impl.h,v 1.5.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xpathp_impl.h,v 1.5.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xpf.c b/libsrc/Wi/xpf.c
index 90fd994..c3b8077 100644
--- a/libsrc/Wi/xpf.c
+++ b/libsrc/Wi/xpf.c
@@ -1,12 +1,12 @@
 /*
  *  xpf.c
  *
- *  $Id: xpf.c,v 1.11.2.3 2010/10/06 09:35:05 source Exp $
+ *  $Id: xpf.c,v 1.11.2.6 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -2126,6 +2126,8 @@ load_next_rel_uri:
       if (NULL != cached)
         {
 	  XD_DOM_LOCK(cached->xe_doc.xd);
+          dk_free_tree (cache_key->xdcs_abs_uri);
+          cache_key->xdcs_abs_uri = NULL;
 	  dk_set_push (&documents, (void*)(cached));
 	  goto loading_complete;
 	}
@@ -4828,24 +4830,45 @@ xpf_sql_neq (xp_instance_t * xqi, XT * tree, xml_entity_t * ctx_xe)
 }
 
 void
-xpf_define_builtin (
+xpfm_create_and_store_builtin (
   const char *xpfm_name,
   xp_func_t xpfm_executable,
   ptrlong xpfm_res_dtp,
   ptrlong xpfm_min_arg_no,
   xpfm_arg_descr_t **xpfm_main_args,
-  xpfm_arg_descr_t **xpfm_tail_args )
+  xpfm_arg_descr_t **xpfm_tail_args,
+  const char* nmspace )
 {
+  caddr_t key_qname;
   size_t ctr, main_arg_no, tail_arg_no;
   xpf_metadata_t ** metas_ptr;
   xpf_metadata_t * metas;
+  if (NULL != nmspace)
+    {
+      char buf[200];
+      sprintf (buf, "%.100s:%.50s", nmspace, xpfm_name);
+      key_qname = box_dv_uname_string (buf);
+    }
+  else
+    key_qname = box_dv_uname_string (xpfm_name);
+  box_dv_uname_make_immortal (key_qname);
+  metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&key_qname));
+  if (NULL != metas_ptr)
+    {
+      int defs_match = (
+        (metas_ptr[0]->xpfm_executable == xpfm_executable) &&
+        (metas_ptr[0]->xpfm_defun == NULL) &&
+        (metas_ptr[0]->xpfm_res_dtp == xpfm_res_dtp) &&
+        (metas_ptr[0]->xpfm_min_arg_no == xpfm_min_arg_no) );
+      log_info ("XPATH function %s is defined twice, %s", key_qname, (defs_match ? "relatively safe" : "totally wrong"));
+      return;
+    }
   main_arg_no = ((NULL == xpfm_main_args) ? 0 : BOX_ELEMENTS(xpfm_main_args));
   tail_arg_no = ((NULL == xpfm_tail_args) ? 0 : BOX_ELEMENTS(xpfm_tail_args));
   metas = (xpf_metadata_t *)dk_alloc_box_zero (
     sizeof(xpf_metadata_t) + (main_arg_no+tail_arg_no)*sizeof(xpfm_arg_descr_t),
     DV_ARRAY_OF_LONG );
-  metas->xpfm_name = box_dv_uname_string (xpfm_name);
-  box_dv_uname_make_immortal (metas->xpfm_name);
+  metas->xpfm_name = key_qname; /* No copying because it's been made immortal above */
   metas->xpfm_type = XPF_BUILTIN;
   metas->xpfm_executable = xpfm_executable;
   metas->xpfm_defun = NULL;
@@ -4867,53 +4890,96 @@ xpf_define_builtin (
   dk_free_box ((caddr_t)(xpfm_tail_args));
   for (ctr = 0; ctr < main_arg_no + tail_arg_no; ctr++)
     box_dv_uname_make_immortal (metas->xpfm_args[ctr].xpfma_name);
-  metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&xpfm_name));
-  if (NULL == metas_ptr)
-    id_hash_set (xpf_metas, (caddr_t)(&(metas->xpfm_name)), (caddr_t)(&metas));
-  else
-    {
-#ifdef XPATH_DEBUG
-	printf ("\nbody for %s is already defined!\n", xpfm_name);
-#else
-       ;
-#endif
-/*
-      id_hash_remove (xpf_reveng, (caddr_t)(&(metas_ptr[0]->xpfm_executable)));
-      dk_free_box ((caddr_t)(metas_ptr[0]));
-      metas_ptr[0] = metas;
-*/
-    }
+  id_hash_set (xpf_metas, (caddr_t)(&key_qname), (caddr_t)(&metas));
   if ((NULL != xpfm_executable) && (xpf_extension != xpfm_executable))
     {
       caddr_t *old_rev_name_ptr = (caddr_t *)id_hash_get (xpf_reveng, (caddr_t)(&xpfm_executable));
-      if (NULL == old_rev_name_ptr)
-	id_hash_set (xpf_reveng, (caddr_t)(&xpfm_executable), (caddr_t)(&(metas->xpfm_name)));
-#ifdef XPATH_DEBUG
+      if (NULL != old_rev_name_ptr)
+        log_info ("XPATH function %s can be declared as an alias of %s, but it does not", key_qname, old_rev_name_ptr[0]);
       else
-	printf ("\n%s is an alias for %s!\n", xpfm_name, old_rev_name_ptr[0]);
-#endif
+        id_hash_set (xpf_reveng, (caddr_t)(&xpfm_executable), (caddr_t)(&(metas->xpfm_name)));
     }
   dk_check_tree (metas);
 }
 
 void
-xpf_define_alias (const char *alias_local_name, const char *alias_ns, const char *main_local_name, const char *main_ns)
+xpf_define_builtin (
+  const char *xpfm_name,
+  xp_func_t xpfm_executable,
+  ptrlong xpfm_res_dtp,
+  ptrlong xpfm_min_arg_no,
+  xpfm_arg_descr_t **xpfm_main_args,
+  xpfm_arg_descr_t **xpfm_tail_args )
 {
-  caddr_t alias_n = (alias_ns ? box_sprintf (100, "%s:%s", alias_ns, alias_local_name) : box_dv_short_string (alias_local_name));
-  caddr_t main_n = (main_ns ? box_sprintf (100, "%s:%s", main_ns, main_local_name) : box_dv_short_string (main_local_name));
-  xpf_metadata_t ** metas_ptr;
+/* The order of these declarations is important because the first one is used for reverse searches */
+  xpfm_create_and_store_builtin (xpfm_name, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args, NULL);
+  xpfm_store_alias (xpfm_name, XXF_NS_URI, xpfm_name, NULL, "/#", 0);
+  xpfm_store_alias (xpfm_name, XXF_NS_URI, xpfm_name, NULL, "#", 0);
+  xpfm_store_alias (xpfm_name, XXF_NS_URI, xpfm_name, NULL, "", 0);
+}
+
+void
+x2f_define_builtin (
+  const char *xpfm_name,
+  xp_func_t xpfm_executable,
+  ptrlong xpfm_res_dtp,
+  ptrlong xpfm_min_arg_no,
+  xpfm_arg_descr_t **xpfm_main_args,
+  xpfm_arg_descr_t **xpfm_tail_args )
+{
+/* The order of these declarations is important because the first one is used for reverse searches */
+  xpf_define_builtin (xpfm_name, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, NULL, "/#", 0);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, NULL, "#", 0);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, NULL, "", 0);
+}
+
+void
+xpfm_store_alias (const char *alias_local_name, const char *alias_ns, const char *main_local_name, const char *main_ns, const char *alias_mid_chars, int insert_soft)
+{
+  caddr_t alias_n = (alias_ns ? box_sprintf (200, "%.100s%.10s:%.50s", alias_ns, alias_mid_chars, alias_local_name) : box_dv_short_string (alias_local_name));
+  caddr_t main_n = (main_ns ? box_sprintf (200, "%.100s:%s", main_ns, main_local_name) : box_dv_short_string (main_local_name));
+  xpf_metadata_t ** main_metas_ptr, **alias_metas_ptr;
   alias_n = box_dv_uname_string (alias_n);
-  main_n = box_dv_uname_string (main_n);
   box_dv_uname_make_immortal (alias_n);
+  main_n = box_dv_uname_string (main_n);
   box_dv_uname_make_immortal (main_n);
-  metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&main_n));
-  if (NULL == metas_ptr)
-    GPF_T;
-  if (NULL != id_hash_get (xpf_metas, (caddr_t)(&alias_n)))
-    GPF_T;
-  id_hash_set (xpf_metas, (caddr_t)(&alias_n), (caddr_t)(metas_ptr));
+  alias_metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&alias_n));
+  main_metas_ptr = (xpf_metadata_t **)id_hash_get (xpf_metas, (caddr_t)(&main_n));
+  if (NULL == main_metas_ptr)
+    {
+      log_info ("XPATH function %s is not defined so it can not be aliased as %s", main_n, alias_n);
+      return;
+    }
+  if (NULL != alias_metas_ptr)
+    {
+      int defs_match;
+      if (insert_soft)
+        return;
+      defs_match = (
+        (main_metas_ptr[0]->xpfm_executable == alias_metas_ptr[0]->xpfm_executable) &&
+        (main_metas_ptr[0]->xpfm_defun == alias_metas_ptr[0]->xpfm_defun) &&
+        (main_metas_ptr[0]->xpfm_res_dtp == alias_metas_ptr[0]->xpfm_res_dtp) &&
+        (main_metas_ptr[0]->xpfm_min_arg_no == alias_metas_ptr[0]->xpfm_min_arg_no) );
+#ifndef DEBUG
+      if (!defs_match)
+#endif
+      log_info ("XPATH function %s is defined but redefind as alias of %s, %s", alias_n, main_n, (defs_match ? "relatively safe" : "totally wrong"));
+      return;
+    }
+  id_hash_set (xpf_metas, (caddr_t)(&alias_n), (caddr_t)(main_metas_ptr));
 }
 
+void
+xpf_define_alias (const char *alias_local_name, const char *alias_ns, const char *main_local_name, const char *main_ns)
+{
+  xpfm_store_alias (alias_local_name, alias_ns, main_local_name, main_ns, "/#", 0);
+  if (NULL != alias_ns)
+    {
+      xpfm_store_alias (alias_local_name, alias_ns, main_local_name, main_ns, "/", 0);
+      xpfm_store_alias (alias_local_name, alias_ns, main_local_name, main_ns, "", 0);
+    }
+}
 
 typedef struct xp_addr_ent_s {
   ptrlong *xae_addr;
@@ -5775,123 +5841,122 @@ void xpf_init(void)
 
   xpf_define_builtin (" undefined"		, xpf_extension			/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
 
-  xpf_define_builtin ("AFTER operator"		, xpf_after_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(2, xpfma("set1",XPDV_NODESET,0), xpfma("set2",XPDV_NODESET,0))	, NULL );
-  xpf_define_builtin ("BEFORE operator"		, xpf_before_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(2, xpfma("set1",XPDV_NODESET,0), xpfma("set2",XPDV_NODESET,0))	, NULL );
-  xpf_define_builtin ("IDIV operator"		, xpf_idiv_operator		/* Virt 4.0 */	, DV_UNKNOWN	, 2	, xpfmalist(2, xpfma("i1",DV_LONG_INT,0), xpfma("i2",DV_LONG_INT,0))	, NULL );
-  xpf_define_builtin ("INSTANCE OF predicate"	, xpf_instance_of_predicate	/* Virt 3.0 */	, XPDV_BOOL	, 0	, xpfmalist(2, xpfma("input",XPDV_NODESET,0), xpfma("seqtype",DV_UNKNOWN,0)), NULL );
-  xpf_define_builtin ("ORDER BY operator"	, xpf_order_by_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(3, xpfma("input",XPDV_NODESET,0), xpfma("criterions",DV_UNKNOWN,0), xpfma("flatten-result",DV_LONG_INT,0)), NULL );
-  xpf_define_builtin ("SORTBY operator"		, xpf_sortby_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(2, xpfma("input",XPDV_NODESET,0), xpfma("criterions",DV_UNKNOWN,0)), NULL );
-  xpf_define_builtin ("TO operator"		, xpf_to_operator		/* Virt 3.0 */	, DV_UNKNOWN	, 2	, xpfmalist(2, xpfma("from",DV_LONG_INT,0), xpfma("to",DV_LONG_INT,0))	, NULL );
-  xpf_define_builtin ("TO predicate"		, xpf_to_predicate		/* Virt 3.0 */	, XPDV_NODESET	, 0	, xpfmalist(3, xpfma("input",XPDV_NODESET,0), xpfma("from",DV_LONG_INT,0), xpfma("to",DV_LONG_INT,0))	, NULL );
-  xpf_define_builtin ("abs"			, xpf_abs			/* XPath 2.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("arg",DV_NUMERIC,0))	, NULL );
-  xpf_define_builtin ("and"			, xpf_and			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma("arg",XPDV_BOOL,0)));
-  xpf_define_builtin ("append"			, xpf_append			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma("seq",DV_UNKNOWN,0)));
-  xpf_define_builtin ("assign"			, xpf_assign			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("avg"			, xpf_avg			/* XPath 1.0 */	, DV_NUMERIC	, 0	, NULL	, xpfmalist(1, xpfma("num",DV_NUMERIC,0)));
-  xpf_define_builtin ("boolean"			, xpf_boolean			/* XPath 1.0 */	, XPDV_BOOL	, 1	, xpfmalist(1, xpfma("arg",DV_UNKNOWN,0))	, NULL );
-  xpf_define_builtin ("ceiling"			, xpf_ceiling			/* XPath 1.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_NUMERIC,0))	, NULL );
-  xpf_define_builtin ("collection"		, NULL				/* Virt 3.5 */	, XPDV_NODESET	, 0	, xpfmalist(7, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma ("recursive", DV_LONG_INT, 0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
-  xpf_define_builtin (XFN_NS_URI ":collection"	, NULL				/* XQuery 1.0*/ , XPDV_NODESET	, 0	, xpfmalist(7, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma ("recursive", DV_LONG_INT, 0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
-  xpf_define_builtin ("collection-dir-list"	, xpf_collection_dir_list	/* Virt 3.5 */	, XPDV_NODESET	, 0	, xpfmalist(3, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma ("recursive", DV_LONG_INT, 0)), NULL);
-  xpf_define_builtin ("concat"			, xpf_concat			/* XPath 1.0 */	, DV_STRING	, 0	, NULL	, xpfmalist(1, xpfma("strg",DV_STRING,0)));
+  x2f_define_builtin ("AFTER operator"		, xpf_after_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(2, xpfma("set1",XPDV_NODESET,0), xpfma("set2",XPDV_NODESET,0))	, NULL );
+  x2f_define_builtin ("BEFORE operator"		, xpf_before_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(2, xpfma("set1",XPDV_NODESET,0), xpfma("set2",XPDV_NODESET,0))	, NULL );
+  x2f_define_builtin ("IDIV operator"		, xpf_idiv_operator		/* Virt 4.0 */	, DV_UNKNOWN	, 2	, xpfmalist(2, xpfma("i1",DV_LONG_INT,0), xpfma("i2",DV_LONG_INT,0))	, NULL );
+  x2f_define_builtin ("INSTANCE OF predicate"	, xpf_instance_of_predicate	/* Virt 3.0 */	, XPDV_BOOL	, 0	, xpfmalist(2, xpfma("input",XPDV_NODESET,0), xpfma("seqtype",DV_UNKNOWN,0)), NULL );
+  x2f_define_builtin ("ORDER BY operator"	, xpf_order_by_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(3, xpfma("input",XPDV_NODESET,0), xpfma("criterions",DV_UNKNOWN,0), xpfma("flatten-result",DV_LONG_INT,0)), NULL );
+  x2f_define_builtin ("SORTBY operator"		, xpf_sortby_operator		/* Virt 3.0 */	, XPDV_NODESET	, 2	, xpfmalist(2, xpfma("input",XPDV_NODESET,0), xpfma("criterions",DV_UNKNOWN,0)), NULL );
+  x2f_define_builtin ("TO operator"		, xpf_to_operator		/* Virt 3.0 */	, DV_UNKNOWN	, 2	, xpfmalist(2, xpfma("from",DV_LONG_INT,0), xpfma("to",DV_LONG_INT,0))	, NULL );
+  x2f_define_builtin ("TO predicate"		, xpf_to_predicate		/* Virt 3.0 */	, XPDV_NODESET	, 0	, xpfmalist(3, xpfma("input",XPDV_NODESET,0), xpfma("from",DV_LONG_INT,0), xpfma("to",DV_LONG_INT,0))	, NULL );
+  x2f_define_builtin ("abs"			, xpf_abs			/* XPath 2.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("arg",DV_NUMERIC,0))	, NULL );
+  x2f_define_builtin ("and"			, xpf_and			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma("arg",XPDV_BOOL,0)));
+  x2f_define_builtin ("append"			, xpf_append			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma("seq",DV_UNKNOWN,0)));
+  x2f_define_builtin ("assign"			, xpf_assign			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("avg"			, xpf_avg			/* XPath 1.0 */	, DV_NUMERIC	, 0	, NULL	, xpfmalist(1, xpfma("num",DV_NUMERIC,0)));
+  x2f_define_builtin ("boolean"			, xpf_boolean			/* XPath 1.0 */	, XPDV_BOOL	, 1	, xpfmalist(1, xpfma("arg",DV_UNKNOWN,0))	, NULL );
+  x2f_define_builtin ("ceiling"			, xpf_ceiling			/* XPath 1.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_NUMERIC,0))	, NULL );
+  x2f_define_builtin ("collection"		, NULL				/* Virt 3.5 */	, XPDV_NODESET	, 0	, xpfmalist(7, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma ("recursive", DV_LONG_INT, 0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
+  x2f_define_builtin ("collection-dir-list"	, xpf_collection_dir_list	/* Virt 3.5 */	, XPDV_NODESET	, 0	, xpfmalist(3, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma ("recursive", DV_LONG_INT, 0)), NULL);
+  x2f_define_builtin ("concat"			, xpf_concat			/* XPath 1.0 */	, DV_STRING	, 0	, NULL	, xpfmalist(1, xpfma("strg",DV_STRING,0)));
   xpf_define_builtin ("contains"		, xpf_contains			/* XPath 1.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("string",DV_STRING,0), xpfma("substring",DV_STRING,0))	, NULL );
-  xpf_define_builtin ("count"			, xpf_count			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("create-attribute"	, xpf_create_attribute		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("create-comment"		, xpf_create_comment		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma("content",DV_STRING,0))	, NULL	);
-  xpf_define_builtin ("create-element"		, xpf_create_element		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("create-pi"		, xpf_create_pi			/* Virt 3.0 */	, DV_UNKNOWN	, 1	, xpfmalist(2, xpfma("name",DV_STRING,0), xpfma("content",DV_STRING,0))	, NULL	);
-  xpf_define_builtin ("current"			, xpf_current			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("deass"			, NULL/*xpf_deass*/		/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("deep-equal"		, xpf_deep_equal		/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(3, xpfma(NULL,DV_UNKNOWN,0), xpfma(NULL,DV_UNKNOWN,0), xpfma(NULL,DV_STRING,0)), NULL);
-  xpf_define_builtin ("distinct"		, xpf_distinct			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("count"			, xpf_count			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("create-attribute"		, xpf_create_attribute		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("create-comment"		, xpf_create_comment		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma("content",DV_STRING,0))	, NULL	);
+  x2f_define_builtin ("create-element"		, xpf_create_element		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("create-pi"		, xpf_create_pi			/* Virt 3.0 */	, DV_UNKNOWN	, 1	, xpfmalist(2, xpfma("name",DV_STRING,0), xpfma("content",DV_STRING,0))	, NULL	);
+  x2f_define_builtin ("current"			, xpf_current			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("deass"			, NULL/*xpf_deass*/		/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("deep-equal"		, xpf_deep_equal		/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(3, xpfma(NULL,DV_UNKNOWN,0), xpfma(NULL,DV_UNKNOWN,0), xpfma(NULL,DV_STRING,0)), NULL);
+  x2f_define_builtin ("distinct"		, xpf_distinct			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("distinct-values"		, xpf_distinct_values		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("doc"			, xpf_doc			/* XPath 1.0 */	, XPDV_NODESET	, 0	, xpfmalist(1, xpfma("uri",DV_STRING,0)), NULL);
-  xpf_define_builtin ("document"		, xpf_document			/* XPath 1.0 */	, XPDV_NODESET	, 1	, xpfmalist(6, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
-  xpf_define_builtin ("document-lazy"		, xpf_document_lazy		/* Virt 6.0 */	, XPDV_NODESET	, 1	, xpfmalist(6, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
-  xpf_define_builtin ("document-lazy-in-coll"	, xpf_document_lazy_in_coll	/* Virt 6.0 */	, XPDV_NODESET	, 1	, xpfmalist(6, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
-  xpf_define_builtin ("document-get-uri"	, xpf_document_get_uri		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma("ent",DV_XML_ENTITY,0))	, NULL	);
-  xpf_define_builtin ("document-literal"	, xpf_document_literal		/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("doc"			, xpf_doc			/* XPath 1.0 */	, XPDV_NODESET	, 0	, xpfmalist(1, xpfma("uri",DV_STRING,0)), NULL);
+  x2f_define_builtin ("document"		, xpf_document			/* XPath 1.0 */	, XPDV_NODESET	, 1	, xpfmalist(6, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
+  x2f_define_builtin ("document-lazy"		, xpf_document_lazy		/* Virt 6.0 */	, XPDV_NODESET	, 1	, xpfmalist(6, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
+  x2f_define_builtin ("document-lazy-in-coll"	, xpf_document_lazy_in_coll	/* Virt 6.0 */	, XPDV_NODESET	, 1	, xpfmalist(6, xpfma("rel_uri",XPDV_NODESET,0), xpfma("base_uri",DV_UNKNOWN,0), xpfma("parse_mode",DV_NUMERIC,0), xpfma("encoding",DV_STRING,0), xpfma("language",DV_STRING,0), xpfma("dtd_config",DV_STRING,0) )	, NULL	);
+  x2f_define_builtin ("document-get-uri"		, xpf_document_get_uri		/* Virt 3.0 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma("ent",DV_XML_ENTITY,0))	, NULL	);
+  x2f_define_builtin ("document-literal"		, xpf_document_literal		/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_alias   ("document-uri", NULL, "document-get-uri", NULL);
-  xpf_define_builtin ("empty"			, xpf_empty			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("empty"			, xpf_empty			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("ends-with"		, xpf_ends_with			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("every"			, xpf_every			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("except"		        , xpf_except			/* XQuery 2.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("exists"			, xpf_exists			/* XQuery 2.0 */, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("expand-qname"		, xpf_expand_qname		/* Virt 3.5 */	, DV_STRING	, 1	, xpfmalist(3, xpfma("use_default",XPDV_BOOL,0), xpfma("qname",DV_STRING,0), xpfma("context",DV_XML_ENTITY,0))	, NULL	);
+  x2f_define_builtin ("every"			, xpf_every			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("except"			, xpf_except			/* XQuery 2.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("exists"			, xpf_exists			/* XQuery 2.0 */, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("expand-qname"		, xpf_expand_qname		/* Virt 3.5 */	, DV_STRING	, 1	, xpfmalist(3, xpfma("use_default",XPDV_BOOL,0), xpfma("qname",DV_STRING,0), xpfma("context",DV_XML_ENTITY,0))	, NULL	);
   xpf_define_builtin ("false"			, xpf_false			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("filter"			, xpf_filter			/* XQ 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("filter"			, xpf_filter			/* XQ 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("floor"			, xpf_floor			/* XPath 1.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_UNKNOWN,0))	, NULL	);
-  xpf_define_builtin ("for"			, xpf_for			/* Virt 3.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("format-number"		, xpf_format_number		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("function-available"	, xpf_function_available	/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("generate-id"		, xpf_generate_id		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("id"			, xpf_id			/* XPath 1.0 */	, XPDV_NODESET	, 1	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0))	, NULL	);
-  xpf_define_builtin ("if"			, xpf_if			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("is-after"		, xpf_is_after			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("is-before"		, xpf_is_before			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("is-descendant"		, xpf_is_descendant		/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("is-same"			, xpf_is_same			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("intersect"		, xpf_intersect			/* XQuery 2.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("iterate-rev"		, xpf_iterate_rev		/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("iterate"			, xpf_iterate			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("key"			, xpf_key			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("lang"			, xpf_lang			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("last"			, xpf_last			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("let"			, xpf_let			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("list"			, xpf_list			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("local-name"		, xpf_local_name		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("map"			, xpf_map			/* Virt 3.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("max"			, xpf_max			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("min"			, xpf_min			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("name"			, xpf_name			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("namespace-uri"		, xpf_namespace_uri		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("normalize-space"		, xpf_normalize_space		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("not"			, xpf_not			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("number"			, xpf_number			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("or"			, xpf_or			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("position"		, xpf_position			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("progn"			, xpf_progn			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("processXQuery"		, xpf_processXQuery		/* BPEL */	, XPDV_NODESET	, 1	, xpfmalist(3, xpfma("module_uri",DV_STRING,0), xpfma("source",DV_XML_ENTITY,0), xpfma("nth_result",DV_LONG_INT,0))	, xpfmalist(2, xpfma("param_name",DV_STRING,0), xpfma("param_value",DV_UNKNOWN,0)));
-  xpf_define_builtin ("processXSLT"		, xpf_processXSLT		/* BPEL */	, XPDV_NODESET	, 1	, xpfmalist(2, xpfma("stylesheet_uri",DV_STRING,0), xpfma("source",DV_XML_ENTITY,0))	, xpfmalist(2, xpfma("param_name",DV_STRING,0), xpfma("param_value",DV_UNKNOWN,0)));
+  x2f_define_builtin ("for"			, xpf_for			/* Virt 3.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("format-number"		, xpf_format_number		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("function-available"	, xpf_function_available	/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("generate-id"		, xpf_generate_id		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("id"			, xpf_id			/* XPath 1.0 */	, XPDV_NODESET	, 1	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0))	, NULL	);
+  x2f_define_builtin ("if"			, xpf_if			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("is-after"			, xpf_is_after			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("is-before"		, xpf_is_before			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("is-descendant"		, xpf_is_descendant		/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("is-same"			, xpf_is_same			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("intersect"		, xpf_intersect			/* XQuery 2.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("iterate-rev"		, xpf_iterate_rev		/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("iterate"			, xpf_iterate			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("key"			, xpf_key			/* XPath 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("lang"			, xpf_lang			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("last"			, xpf_last			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("let"			, xpf_let			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("list"			, xpf_list			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("local-name"		, xpf_local_name		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("map"			, xpf_map			/* Virt 3.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("max"			, xpf_max			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("min"			, xpf_min			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("name"			, xpf_name			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("namespace-uri"		, xpf_namespace_uri		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("normalize-space"		, xpf_normalize_space		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("not"			, xpf_not			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("number"			, xpf_number			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("or"			, xpf_or			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("position"		, xpf_position			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("progn"			, xpf_progn			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("processXQuery"		, xpf_processXQuery		/* BPEL */	, XPDV_NODESET	, 1	, xpfmalist(3, xpfma("module_uri",DV_STRING,0), xpfma("source",DV_XML_ENTITY,0), xpfma("nth_result",DV_LONG_INT,0))	, xpfmalist(2, xpfma("param_name",DV_STRING,0), xpfma("param_value",DV_UNKNOWN,0)));
+  x2f_define_builtin ("processXSLT"		, xpf_processXSLT		/* BPEL */	, XPDV_NODESET	, 1	, xpfmalist(2, xpfma("stylesheet_uri",DV_STRING,0), xpfma("source",DV_XML_ENTITY,0))	, xpfmalist(2, xpfma("param_name",DV_STRING,0), xpfma("param_value",DV_UNKNOWN,0)));
   xpf_define_builtin ("replace"			, xpf_replace			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("resolve-uri"		, xpf_resolve_uri		/* Virt 3.5 */	, DV_STRING	, 2	, xpfmalist(2, xpfma("base_uri",DV_STRING,0), xpfma("relative_uri",DV_STRING,0))	, NULL);
-  xpf_define_builtin ("round-half-to-even"	, xpf_round_half_to_even	/* XPath 2.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_UNKNOWN,0))	, NULL	);
-  xpf_define_builtin ("round-number"		, xpf_round_number		/* XPath 1.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_UNKNOWN,0))	, NULL	);
+  x2f_define_builtin ("resolve-uri"		, xpf_resolve_uri		/* Virt 3.5 */	, DV_STRING	, 2	, xpfmalist(2, xpfma("base_uri",DV_STRING,0), xpfma("relative_uri",DV_STRING,0))	, NULL);
+  x2f_define_builtin ("round-half-to-even"	, xpf_round_half_to_even	/* XPath 2.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_UNKNOWN,0))	, NULL	);
+  x2f_define_builtin ("round-number"		, xpf_round_number		/* XPath 1.0 */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma("num",DV_UNKNOWN,0))	, NULL	);
   xpf_define_alias   ("round" , NULL, "round-number", NULL);
-  xpf_define_builtin ("sql-column-select"	, xpf_sql_column_select		/* Virt 6.2 */	, XPDV_NODESET	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("sql-scalar-select"	, xpf_sql_scalar_select		/* Virt 6.2 */	, DV_UNKNOWN	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("serialize"		, xpf_serialize			/* Virt 3.0 */	, DV_STRING	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("shallow"			, xpf_shallow			/* XQuery 1.0 */ , XPDV_NODESET , 1	, xpfmalist(1, xpfma(NULL,DV_XML_ENTITY,0))	, NULL);
-  xpf_define_builtin ("some"			, xpf_some			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("sql-equ"			, xpf_sql_equ			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
-  xpf_define_builtin ("sql-ge"			, xpf_sql_le			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
-  xpf_define_builtin ("sql-gt"			, xpf_sql_gt			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
-  xpf_define_builtin ("sql-le"			, xpf_sql_le			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
-  xpf_define_builtin ("sql-lt"			, xpf_sql_lt			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
-  xpf_define_builtin ("sql-neq"			, xpf_sql_neq			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
+  x2f_define_builtin ("sql-column-select"	, xpf_sql_column_select		/* Virt 6.2 */	, XPDV_NODESET	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("sql-scalar-select"	, xpf_sql_scalar_select		/* Virt 6.2 */	, DV_UNKNOWN	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("serialize"		, xpf_serialize			/* Virt 3.0 */	, DV_STRING	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("shallow"			, xpf_shallow			/* XQuery 1.0 */ , XPDV_NODESET , 1	, xpfmalist(1, xpfma(NULL,DV_XML_ENTITY,0))	, NULL);
+  x2f_define_builtin ("some"			, xpf_some			/* Virt 3.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("sql-equ"			, xpf_sql_equ			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
+  x2f_define_builtin ("sql-ge"			, xpf_sql_ge			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
+  x2f_define_builtin ("sql-gt"			, xpf_sql_gt			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
+  x2f_define_builtin ("sql-le"			, xpf_sql_le			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
+  x2f_define_builtin ("sql-lt"			, xpf_sql_lt			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
+  x2f_define_builtin ("sql-neq"			, xpf_sql_neq			/* Virt 4.0 */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma("val1",DV_UNKNOWN,0), xpfma("val2",DV_UNKNOWN,0)),	 NULL);
   xpf_define_builtin ("starts-with"		, xpf_starts_with		/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("string-length"		, xpf_string_length		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("string"			, xpf_string			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  xpf_define_builtin ("substring"		, xpf_substring			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("substring-after"		, xpf_substring_after		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("substring-before"	, xpf_substring_before		/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("substring"		, xpf_substring			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("sum"			, xpf_sum			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("system-property"		, xpf_system_property		/* XXLT 1.0 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma("property_qname",DV_STRING,0))	, NULL);
-  xpf_define_builtin ("text-contains"		, xpf_text_contains		/* Virt 2.5 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("sum"			, xpf_sum			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("system-property"		, xpf_system_property		/* XXLT 1.0 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma("property_qname",DV_STRING,0))	, NULL);
+  x2f_define_builtin ("text-contains"		, xpf_text_contains		/* Virt 2.5 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("translate"		, xpf_translate			/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_builtin ("true"			, xpf_true			/* XPath 1.0 */	, XPDV_BOOL	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("tuple"			, xpf_tuple			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("union"			, xpf_union			/* Virt 3.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("unordered"		, xpf_unordered			/* XQ 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("unparsed-entity-uri"	, xpf_unparsed_entity_uri	/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("urlify"			, xpf_urlify			/* Virt 2.5 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0))	, NULL);
-  xpf_define_builtin ("vector"			, xpf_vector			/* Virt 3.5 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma("item",DV_UNKNOWN,0)));
-  xpf_define_builtin ("vector for ORDER BY"	, xpf_vector_for_order_by	/* Virt 3.5 */	, DV_UNKNOWN	, 2	, xpfmalist(1, xpfma("item",DV_UNKNOWN,0))	, xpfmalist(1, xpfma("key",DV_UNKNOWN,0)));
-  xpf_define_builtin ("xmlview"			, xpf_xmlview			/* XQuery  */	, XPDV_NODESET	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_builtin ("xpath-debug-srcline"	, xpf_xpath_debug_srcline	/* Virt 3.0 */	, DV_STRING	, 1	, xpfmalist(1, xpfma(NULL,DV_XML_ENTITY,0))	, NULL);
-  xpf_define_builtin ("xpath-debug-srcfile"	, xpf_xpath_debug_srcfile	/* Virt 3.0 */	, DV_STRING	, 1	, xpfmalist(1, xpfma(NULL,DV_XML_ENTITY,0))	, NULL);
-  xpf_define_builtin ("xpath-debug-xslline"	, xpf_xpath_debug_xslline	/* Virt 3.0 */	, DV_STRING	, 0	, NULL	, NULL);
-  xpf_define_builtin ("xpath-debug-xslfile"	, xpf_xpath_debug_xslfile	/* Virt 3.0 */	, DV_STRING	, 0	, NULL	, NULL);
+  x2f_define_builtin ("tuple"			, xpf_tuple			/* Virt 3.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("union"			, xpf_union			/* Virt 3.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("unordered"		, xpf_unordered			/* XQ 1.0 */	, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("unparsed-entity-uri"	, xpf_unparsed_entity_uri	/* XPath 1.0 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("urlify"			, xpf_urlify			/* Virt 2.5 */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0))	, NULL);
+  x2f_define_builtin ("vector"			, xpf_vector			/* Virt 3.5 */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma("item",DV_UNKNOWN,0)));
+  x2f_define_builtin ("vector for ORDER BY"	, xpf_vector_for_order_by	/* Virt 3.5 */	, DV_UNKNOWN	, 2	, xpfmalist(1, xpfma("item",DV_UNKNOWN,0))	, xpfmalist(1, xpfma("key",DV_UNKNOWN,0)));
+  x2f_define_builtin ("xmlview"			, xpf_xmlview			/* XQuery  */	, XPDV_NODESET	, 1	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("xpath-debug-srcline"	, xpf_xpath_debug_srcline	/* Virt 3.0 */	, DV_STRING	, 1	, xpfmalist(1, xpfma(NULL,DV_XML_ENTITY,0))	, NULL);
+  x2f_define_builtin ("xpath-debug-srcfile"	, xpf_xpath_debug_srcfile	/* Virt 3.0 */	, DV_STRING	, 1	, xpfmalist(1, xpfma(NULL,DV_XML_ENTITY,0))	, NULL);
+  x2f_define_builtin ("xpath-debug-xslline"	, xpf_xpath_debug_xslline	/* Virt 3.0 */	, DV_STRING	, 0	, NULL	, NULL);
+  x2f_define_builtin ("xpath-debug-xslfile"	, xpf_xpath_debug_xslfile	/* Virt 3.0 */	, DV_STRING	, 0	, NULL	, NULL);
   bif_define ("xpf_extension", bif_xpf_extension);
   bif_define ("xpf_extension_remove", bif_xpf_extension_remove);
 
diff --git a/libsrc/Wi/xpf.h b/libsrc/Wi/xpf.h
index 69d7ee4..707c1fd 100644
--- a/libsrc/Wi/xpf.h
+++ b/libsrc/Wi/xpf.h
@@ -1,12 +1,12 @@
 /*
  *  xpf.h
  *
- *  $Id: xpf.h,v 1.2.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xpf.h,v 1.2.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -32,9 +32,10 @@
 #define XPF_DEFUN 1
 
 /* Don't forget to modify xp_register_default_namespace_prefixes() when adding new prefixes here! */
-#define XFN_NS_PREFIX1			"fn"
-#define XFN_NS_PREFIX2			"xf"
-#define XFN_NS_URI			"http://www.w3.org/2004/07/xpath-functions"
+#define XFN_NS_PREFIX			"fn"
+#define XFN_NS_URI			"http://www.w3.org/2005/xpath-functions"
+#define XXF_NS_PREFIX			"xf"
+#define XXF_NS_URI			"http://www.w3.org/2004/07/xpath-functions"
 #define XLOCAL_NS_PREFIX		"local"
 #define XLOCAL_NS_URI			"http://www.w3.org/2004/07/xquery-local-functions"
 #define XOP_NS_PREFIX			"op"
@@ -76,8 +77,16 @@ extern id_hash_t * xpf_reveng;
 #define xpfma(name,dtp,iter) ((xpfm_arg_descr_t *)(list (3, ((name) ? box_dv_uname_string (name) : NULL), (ptrlong)dtp, (ptrlong)iter)))
 #define xpfmalist (xpfm_arg_descr_t **)list
 
+extern void xpfm_create_and_store_builtin (
+  const char *xpfm_name,
+  xp_func_t xpfm_executable,
+  ptrlong xpfm_res_dtp,
+  ptrlong xpfm_min_arg_no,
+  xpfm_arg_descr_t **xpfm_main_args,
+  xpfm_arg_descr_t **xpfm_tail_args,
+  const char* nmspace );
 
-extern void xpf_define_builtin (
+typedef void xpfm_define_builtin_t (
   const char *xpfm_name,
   xp_func_t xpfm_executable,
   ptrlong xpfm_res_dtp,
@@ -85,6 +94,10 @@ extern void xpf_define_builtin (
   xpfm_arg_descr_t **xpfm_main_args,
   xpfm_arg_descr_t **xpfm_tail_args );
 
+extern xpfm_define_builtin_t xpf_define_builtin, x2f_define_builtin, xqf_define_builtin, xsd_define_builtin, xop_define_builtin;
+
+extern void xpfm_store_alias (const char *alias_local_name, const char *alias_ns, const char *main_local_name, const char *main_ns, const char *alias_mid_chars, int insert_soft);
+
 extern void xpf_define_alias (const char *alias_local_name, const char *alias_ns, const char *main_local_name, const char *main_ns);
 
 
@@ -142,4 +155,6 @@ extern void xpf_arg_list_impl (xp_instance_t * xqi, XT * arg, xml_entity_t * ctx
 
 extern void xpf_init(void);
 
+extern xp_query_t *xqr_stub_for_funcall (xpf_metadata_t *metas, int argcount);
+
 #endif /* _XPF_H */
diff --git a/libsrc/Wi/xpscn.c b/libsrc/Wi/xpscn.c
index 1d3ee26..21575bf 100644
--- a/libsrc/Wi/xpscn.c
+++ b/libsrc/Wi/xpscn.c
@@ -3085,14 +3085,14 @@ char *xpyytext;
 /*
  *  xpscn.l
  *
- *  $Id: xpscn.l,v 1.8.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xpscn.l,v 1.8.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  XQuery scanner
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xpscn.l b/libsrc/Wi/xpscn.l
index 2c70488..8d261e5 100644
--- a/libsrc/Wi/xpscn.l
+++ b/libsrc/Wi/xpscn.l
@@ -1,14 +1,14 @@
 /*
  *  xpscn.l
  *
- *  $Id: xpscn.l,v 1.8.2.1 2009/04/18 21:55:18 source Exp $
+ *  $Id: xpscn.l,v 1.8.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  XQuery scanner
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xqf.c b/libsrc/Wi/xqf.c
index a46ac37..fba85a6 100644
--- a/libsrc/Wi/xqf.c
+++ b/libsrc/Wi/xqf.c
@@ -1,12 +1,12 @@
 /*
  *  xqf.c
  *
- *  $Id: xqf.c,v 1.21.2.9 2011/03/03 11:56:45 source Exp $
+ *  $Id: xqf.c,v 1.21.2.15 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -1479,16 +1479,15 @@ __xqf_compare  (xp_instance_t * xqi, XT * tree, xml_entity_t * ctx_xe, int do_wh
     case XQ_STARTSWITH:
       {
 	utf8char *tail, c;
-	int len = 0;
+	int len = 0, wide_len;
+	caddr_t wide_box = box_utf8_as_wide_char (str1, NULL, strlen (str1), 0, DV_WIDE), utf8_box;
+
+	wide_len = box_length (wide_box) / sizeof (wchar_t) - 1;
 	n = utf8_strlen ((utf8char *)str2);
-	for (tail = (utf8char *)str1; '\0' != tail[0]; tail++)
-	  {
-	    if (len == n)
-	      break;
-	    c = tail[0];
-	    if (UTF8_IS_HEADCHAR(c))
-	      len++;
-	  }
+	utf8_box = box_wide_as_utf8_char (wide_box, MIN (n, wide_len), DV_SHORT_STRING);
+	len = strlen (utf8_box);
+	dk_free_box (wide_box);
+	dk_free_box (utf8_box);
 	if (DVC_MATCH == compare_utf8_with_collation (str1, len, str2, (long) strlen (str2), coll))
 	  XQI_SET (xqi, tree->_.xp_func.res, (caddr_t) 1L);
 	else
@@ -3300,24 +3299,44 @@ xqf_current_dateTime  (xp_instance_t * xqi, XT * tree, xml_entity_t * ctx_xe)
   xpf_current_date_impl (xqi, tree, DV_DATETIME);
 }
 
-static void
-xqf_define_builtin_with_ns (
+void
+xqf_define_builtin (
   const char *xpfm_name,
   xp_func_t xpfm_executable,
   ptrlong xpfm_res_dtp,
   ptrlong xpfm_min_arg_no,
   xpfm_arg_descr_t **xpfm_main_args,
-  xpfm_arg_descr_t **xpfm_tail_args,
-  const char* namespace)
+  xpfm_arg_descr_t **xpfm_tail_args )
 {
-  caddr_t n2 = box_sprintf (100, "%s:%s", namespace, xpfm_name);
-  xpf_define_builtin (
-    n2, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args);
-  dk_free_box (n2);
+/* The order of these declarations is important because the first one is used for reverse searches */
+  xpfm_create_and_store_builtin (xpfm_name, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args, XFN_NS_URI "/#");
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, XFN_NS_URI "/#", "#", 0);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, XFN_NS_URI "/#", "", 0);
 }
 
-static void
-xqf_define_builtin (
+void
+xsd_define_builtin (
+  const char *xpfm_name,
+  xp_func_t xpfm_executable,
+  ptrlong xpfm_res_dtp,
+  ptrlong xpfm_min_arg_no,
+  xpfm_arg_descr_t **xpfm_main_args,
+  xpfm_arg_descr_t **xpfm_tail_args )
+{
+/* The order of these declarations is important because the first one is used for reverse searches */
+  xpfm_create_and_store_builtin (xpfm_name, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args, XS_NS_URI "/#");
+  xpfm_store_alias (xpfm_name, XS_NS_URI, xpfm_name, XS_NS_URI "/#", "#", 0);
+  xpfm_store_alias (xpfm_name, XS_NS_URI, xpfm_name, XS_NS_URI "/#", "", 0);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, XS_NS_URI "/#", "/#", 1);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, XS_NS_URI "/#", "#", 1);
+  xpfm_store_alias (xpfm_name, XFN_NS_URI, xpfm_name, XS_NS_URI "/#", "", 1);
+  xpfm_store_alias (xpfm_name, XXF_NS_URI, xpfm_name, XS_NS_URI "/#", "/#", 1);
+  xpfm_store_alias (xpfm_name, XXF_NS_URI, xpfm_name, XS_NS_URI "/#", "#", 1);
+  xpfm_store_alias (xpfm_name, XXF_NS_URI, xpfm_name, XS_NS_URI "/#", "", 1);
+}
+
+void
+xop_define_builtin (
   const char *xpfm_name,
   xp_func_t xpfm_executable,
   ptrlong xpfm_res_dtp,
@@ -3325,13 +3344,25 @@ xqf_define_builtin (
   xpfm_arg_descr_t **xpfm_main_args,
   xpfm_arg_descr_t **xpfm_tail_args )
 {
-  xqf_define_builtin_with_ns (xpfm_name,
-		      xpfm_executable,
-		      xpfm_res_dtp,
-		      xpfm_min_arg_no,
-		      xpfm_main_args,
-		      xpfm_tail_args,
-		      XFN_NS_URI);
+/* The order of these declarations is important because the first one is used for reverse searches */
+  xpfm_create_and_store_builtin (xpfm_name, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args, XOP_NS_URI "/#");
+  xpfm_store_alias (xpfm_name, XOP_NS_URI, xpfm_name, XOP_NS_URI "/#", "#", 0);
+  xpfm_store_alias (xpfm_name, XOP_NS_URI, xpfm_name, XOP_NS_URI "/#", "", 0);
+}
+
+void
+xdt_define_builtin (
+  const char *xpfm_name,
+  xp_func_t xpfm_executable,
+  ptrlong xpfm_res_dtp,
+  ptrlong xpfm_min_arg_no,
+  xpfm_arg_descr_t **xpfm_main_args,
+  xpfm_arg_descr_t **xpfm_tail_args )
+{
+/* The order of these declarations is important because the first one is used for reverse searches */
+  xpfm_create_and_store_builtin (xpfm_name, xpfm_executable, xpfm_res_dtp, xpfm_min_arg_no, xpfm_main_args, xpfm_tail_args, XDT_NS_URI "/#");
+  xpfm_store_alias (xpfm_name, XDT_NS_URI, xpfm_name, XDT_NS_URI "/#", "#", 0);
+  xpfm_store_alias (xpfm_name, XDT_NS_URI, xpfm_name, XDT_NS_URI "/#", "", 0);
 }
 
 static xqf_str_parser_desc_t xqf_str_parser_descs[] = {
@@ -3363,7 +3394,7 @@ static xqf_str_parser_desc_t xqf_str_parser_descs[] = {
     {	"precisionDecimal"	, __numeric_from_string		, NULL /*???*/		, 0			, 0	, 1	, DV_NUMERIC	, "__xqf_str_parse_numeric"	, NULL			},
     {	"short"			, __integer_from_string		, __integer_rcheck	, XQ_INT16		, 0	, 1	, DV_LONG_INT	, "__xqf_str_parse_integer"	, NULL			},
     {	"string"		, __gen_string_from_string	, __gen_string_rcheck	, XQ_STRING		, 0	, 1	, DV_STRING	, "__xqf_str_parse_nvarchar"	, "VARCHAR"		},
-    {	"time"			, __datetime_from_string	, __datetime_rcheck	, XQ_TIME		, 0	, 0	, DV_DATETIME	, "__xqf_str_parse_time"	, "DATETIME"		},
+    {	"time"			, __datetime_from_string	, __datetime_rcheck	, XQ_TIME		, 0	, 0	, DV_DATETIME	, "__xqf_str_parse_time"	, "TIME"		},
     {	"token"			, __gen_string_from_string	, __gen_string_rcheck	, XQ_TOKEN		, 0	, 1	, 0		, "__xqf_str_parse_nvarchar"	, NULL			},
     {	"unsignedByte"		, __integer_from_string		, __integer_rcheck	, XQ_UINT8		, 0	, 0	, DV_LONG_INT	, "__xqf_str_parse_integer"	, NULL			},
     {	"unsignedInt"		, __integer_from_string		, __integer_rcheck	, XQ_UINT32		, 0	, 0	, DV_LONG_INT	, "__xqf_str_parse_integer"	, NULL			},
@@ -3497,7 +3528,11 @@ bif_xqf_str_parse_to_rdf_box (caddr_t * qst, caddr_t * err_ret, state_slot_t **
           dtd_t *dtd = NULL;
           id_hash_t *id_cache = NULL;
           xml_tree_ent_t *xte;
-          caddr_t tree = xml_make_mod_tree ((query_instance_t *)qst, arg, &err, FINE_XML | GE_XML, NULL /* no uri! */, "UTF-8", NULL, NULL, &dtd, &id_cache, &ns_2dict);
+	  caddr_t tree;
+
+	  if (arg_dtp == DV_XML_ENTITY)
+	    return box_copy_tree (arg);
+          tree = xml_make_mod_tree ((query_instance_t *)qst, arg, &err, FINE_XML | GE_XML, NULL /* no uri! */, "UTF-8", NULL, NULL, &dtd, &id_cache, &ns_2dict);
           if (NULL == tree)
             sqlr_resignal (err);
           xte = xte_from_tree (tree, (query_instance_t*) qst);
@@ -3520,6 +3555,12 @@ bif_xqf_str_parse_to_rdf_box (caddr_t * qst, caddr_t * err_ret, state_slot_t **
   desc = xqf_str_parser_descs + desc_idx;
   if (DV_DB_NULL == arg_dtp)
     return NEW_DB_NULL;
+  /* if we have wide and we want typed string we do utf8, cast do to default charset so we do not do it */
+  if (DV_WIDE == arg_dtp && desc->p_dest_dtp == DV_STRING)
+    {
+      res = box_wide_as_utf8_char (arg, box_length (arg) / sizeof (wchar_t) - 1, DV_STRING);
+      goto res_ready;
+    }
   if (DV_STRING != arg_dtp)
     {
       caddr_t err = NULL;
@@ -3581,80 +3622,81 @@ void xqf_init(void)
   bif_define_typed ("__xqf_str_parse_time"	, bif_xqf_str_parse	, &bt_time	);
 
   /* Functions */
-  xqf_define_builtin ("ENTITY"					, NULL /*xqf_entity*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("ID"					, NULL /*xqf_id*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("IDREF"					, NULL /*xqf_idref*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("NCName"					, NULL /*xqf_ncname*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("NMTOKEN"					, NULL /*xqf_nmtoken*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("add-days"				, xqf_add_days			/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
-  xqf_define_builtin ("add-gMonth"				, xqf_add_gmonth		/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
-  xqf_define_builtin ("add-gYear"				, xqf_add_gyear			/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
-  xqf_define_builtin ("add-months"				, xqf_add_months		/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
-  xqf_define_builtin ("add-years"				, xqf_add_years			/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
-  xqf_define_builtin ("boolean-from-string"			, NULL /*xqf_boolean_from_string */	/* ??? */	, XPDV_BOOL	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("byte"					, xqf_byte			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xpf_define_alias ("ceiling", XFN_NS_URI, "ceiling", NULL);
-  xqf_define_builtin ("codepoint-compare"			, xqf_codepoint_compare		/* ??? */	, DV_LONG_INT	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("codepoint-contains"			, NULL /*xqf_codepoint_contains*/ /* ??? */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("codepoint-substring-after"		, NULL /*xqf_codepoint_substring_after*/ /* ??? */	, DV_SHORT_STRING	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("codepoint-substring-before"		, NULL /*xqf_codepoint_substring_before*/ /* ??? */	, DV_SHORT_STRING	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("codepoints-to-string"			, xqf_codepoints_to_string	/* XQuery 1.0 */, DV_STRING	, 0	, xpfmalist(1, xpfma(NULL,DV_LONG_INT,1))	,  xpfmalist(1, xpfma(NULL,DV_LONG_INT,1)));
-  xqf_define_builtin ("compare"					, xqf_compare			/* XQuery 1.0 */, DV_LONG_INT	, 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1))	, NULL);
-  xpf_define_alias ("concat", XFN_NS_URI, "concat", NULL);
+  x2f_define_builtin ("ENTITY"					, NULL /*xqf_entity*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("ID"					, NULL /*xqf_id*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("IDREF"					, NULL /*xqf_idref*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("NCName"					, NULL /*xqf_ncname*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("NMTOKEN"					, NULL /*xqf_nmtoken*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("add-days"				, xqf_add_days			/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  x2f_define_builtin ("add-gMonth"				, xqf_add_gmonth		/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  x2f_define_builtin ("add-gYear"				, xqf_add_gyear			/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  x2f_define_builtin ("add-months"				, xqf_add_months		/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  x2f_define_builtin ("add-years"				, xqf_add_years			/* ??? */	, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xsd_define_builtin ("boolean"					, xqf_boolean			/* XQuery 1.0 */, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,XPDV_BOOL,1))	, NULL);
+  x2f_define_builtin ("boolean-from-string"			, NULL /*xqf_boolean_from_string */	/* ??? */	, XPDV_BOOL	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("byte"					, xqf_byte			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias ("ceiling", XFN_NS_URI, "ceiling", NULL);*/
+  x2f_define_builtin ("codepoint-compare"			, xqf_codepoint_compare		/* ??? */	, DV_LONG_INT	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("codepoint-contains"			, NULL /*xqf_codepoint_contains*/ /* ??? */	, XPDV_BOOL	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("codepoint-substring-after"		, NULL /*xqf_codepoint_substring_after*/ /* ??? */	, DV_SHORT_STRING	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("codepoint-substring-before"		, NULL /*xqf_codepoint_substring_before*/ /* ??? */	, DV_SHORT_STRING	, 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("codepoints-to-string"			, xqf_codepoints_to_string	/* XQuery 1.0 */, DV_STRING	, 0	, xpfmalist(1, xpfma(NULL,DV_LONG_INT,1))	,  xpfmalist(1, xpfma(NULL,DV_LONG_INT,1)));
+  x2f_define_builtin ("compare"					, xqf_compare			/* XQuery 1.0 */, DV_LONG_INT	, 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1))	, NULL);
+  /*xpf_define_alias ("concat", XFN_NS_URI, "concat", NULL);*/
   xqf_define_builtin ("contains"				,xqf_contains			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1))	, NULL);
-  xpf_define_alias   ("count", XFN_NS_URI, "count", NULL);
-  xpf_define_alias   ("avg", XFN_NS_URI, "avg", NULL);
-  xpf_define_alias   ("sum", XFN_NS_URI, "sum", NULL);
-  xpf_define_alias   ("max", XFN_NS_URI, "max", NULL);
-  xpf_define_alias   ("min", XFN_NS_URI, "min", NULL);
-  xqf_define_builtin ("currentDateTime"				, xqf_currentDateTime		/* ??? */	, DV_DATETIME	, 0	, NULL	, NULL);
-  xqf_define_builtin_with_ns ("date"				, xqf_date			/* XQuery 1.0 */, DV_DATE	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-  xpf_define_alias   ("date", XFN_NS_URI, "date", XS_NS_URI);
-  xqf_define_builtin_with_ns ("dateTime"			, xqf_datetime			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-    xpf_define_alias   ("dateTime", XFN_NS_URI, "dateTime", XS_NS_URI);
-xqf_define_builtin ("decimal"					, xqf_decimal			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("double"					, xqf_double			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("duration"				, xqf_duration			/* ??? */	, XPDV_DURATION	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1)), NULL	);
+  /*xpf_define_alias   ("count", XFN_NS_URI, "count", NULL);*/
+  /*xpf_define_alias   ("avg", XFN_NS_URI, "avg", NULL);*/
+  /*xpf_define_alias   ("sum", XFN_NS_URI, "sum", NULL);*/
+  /*xpf_define_alias   ("max", XFN_NS_URI, "max", NULL);*/
+  /*xpf_define_alias   ("min", XFN_NS_URI, "min", NULL);*/
+  x2f_define_builtin ("currentDateTime"				, xqf_currentDateTime		/* ??? */	, DV_DATETIME	, 0	, NULL	, NULL);
+  xsd_define_builtin ("date"				, xqf_date			/* XQuery 1.0 */, DV_DATE	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("date", XFN_NS_URI, "date", XS_NS_URI);*/
+  xsd_define_builtin ("dateTime"			, xqf_datetime			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("dateTime", XFN_NS_URI, "dateTime", XS_NS_URI);*/
+  xsd_define_builtin ("decimal"					, xqf_decimal			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("double"					, xqf_double			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("duration"				, xqf_duration			/* ??? */	, XPDV_DURATION	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
   xqf_define_builtin ("ends-with"				, xqf_ends_with			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1))	, NULL);
-  xqf_define_builtin ("escape-uri"				, xqf_escape_uri		/* XQuery 1.0 */, DV_STRING	, 2	, xpfmalist(2, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_LONG_INT,1))	, NULL);
-  xpf_define_alias   ("false", XFN_NS_URI, "false", NULL);
-  xqf_define_builtin ("float"					, xqf_float			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xpf_define_alias   ("floor", XFN_NS_URI, "floor", NULL);
-  xqf_define_builtin ("gDay"					, xqf_gDay			/* ??? */	, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("gMonth"					, xqf_gMonth			/* ??? */	, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("gMonthDay"				, xqf_gMonthDay			/* ??? */	, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("gYear"					, xqf_gYear			/* ??? */	, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("gYearMonth"				, xqf_gYearMonth		/* ??? */	, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("get-Century-from-date"			, xqf_get_Century_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
+  x2f_define_builtin ("escape-uri"				, xqf_escape_uri		/* XQuery 1.0 */, DV_STRING	, 2	, xpfmalist(2, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_LONG_INT,1))	, NULL);
+  /*xpf_define_alias   ("false", XFN_NS_URI, "false", NULL);*/
+  xsd_define_builtin ("float"					, xqf_float			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("floor", XFN_NS_URI, "floor", NULL);*/
+  xsd_define_builtin ("gDay"					, xqf_gDay			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("gMonth"					, xqf_gMonth			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("gMonthDay"				, xqf_gMonthDay			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("gYear"					, xqf_gYear			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("gYearMonth"				, xqf_gYearMonth		/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("get-Century-from-date"			, xqf_get_Century_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
   xpf_define_alias   ("get-Century-from-dateTime", XFN_NS_URI, "get-Century-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-Century-from-gYear", XFN_NS_URI, "get-Century-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-Century-from-gYearMonth", XFN_NS_URI, "get-Century-from-date", XFN_NS_URI);
-  xqf_define_builtin ("get-days"				, xqf_get_Day_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
-  xqf_define_builtin ("get-duration"				, xqf_get_duration		/* ??? */	, XPDV_DURATION	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1))	, NULL);
-  xqf_define_builtin ("get-end"					, xqf_get_end			/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("get-days"				, xqf_get_Day_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+  x2f_define_builtin ("get-duration"				, xqf_get_duration		/* ??? */	, XPDV_DURATION	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1))	, NULL);
+  x2f_define_builtin ("get-end"					, xqf_get_end			/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
   xpf_define_alias   ("get-gDay-from-date", XFN_NS_URI, "get-days", XFN_NS_URI);
   xpf_define_alias   ("get-gDay-from-dateTime", XFN_NS_URI, "get-days", XFN_NS_URI);
   xpf_define_alias   ("get-gDay-from-gMonthDay", XFN_NS_URI, "get-days", XFN_NS_URI);
-  xqf_define_builtin ("get-gMonth-from-date"			, xqf_get_Month_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
+  x2f_define_builtin ("get-gMonth-from-date"			, xqf_get_Month_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
   xpf_define_alias   ("get-gMonth-from-dateTime", XFN_NS_URI, "get-gMonth-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-gMonth-from-gMonthDay", XFN_NS_URI, "get-gMonth-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-gMonth-from-gYearMonth", XFN_NS_URI, "get-gMonth-from-date", XFN_NS_URI);
-  xqf_define_builtin ("get-gYear-from-date"			, xqf_get_Year_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
+  x2f_define_builtin ("get-gYear-from-date"			, xqf_get_Year_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
   xpf_define_alias   ("get-gYear-from-dateTime", XFN_NS_URI, "get-gYear-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-gYear-from-gYear", XFN_NS_URI, "get-gYear-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-gYear-from-gYearMonth", XFN_NS_URI, "get-gYear-from-date", XFN_NS_URI);
-  xqf_define_builtin ("get-hour-from-dateTime"			, xqf_get_hour_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATETIME,1))	, NULL);
+  x2f_define_builtin ("get-hour-from-dateTime"			, xqf_get_hour_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATETIME,1))	, NULL);
   xpf_define_alias   ("get-hour-from-time", XFN_NS_URI, "get-hour-from-dateTime", XFN_NS_URI);
   xpf_define_alias   ("get-hours", XFN_NS_URI, "get-hour-from-dateTime", XFN_NS_URI);
-  xqf_define_builtin ("get-minutes-from-dateTime"		, xqf_get_minutes_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATETIME,1))	, NULL);
+  x2f_define_builtin ("get-minutes-from-dateTime"		, xqf_get_minutes_from_dateTime	/* ??? */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_DATETIME,1))	, NULL);
   xpf_define_alias   ("get-minutes-from-time", XFN_NS_URI, "get-minutes-from-dateTime", XFN_NS_URI);
   xpf_define_alias   ("get-minutes", XFN_NS_URI, "get-minutes-from-dateTime", XFN_NS_URI);
   xpf_define_alias   ("get-months", XFN_NS_URI, "get-gMonth-from-date", XFN_NS_URI);
-  xqf_define_builtin ("get-seconds-from-dateTime"		, xqf_get_seconds_from_dateTime	/* ??? */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma(NULL,DV_DATETIME,1))	, NULL);
+  x2f_define_builtin ("get-seconds-from-dateTime"		, xqf_get_seconds_from_dateTime	/* ??? */	, DV_NUMERIC	, 1	, xpfmalist(1, xpfma(NULL,DV_DATETIME,1))	, NULL);
   xpf_define_alias   ("get-seconds-from-time", XFN_NS_URI, "get-seconds-from-dateTime", XFN_NS_URI);
   xpf_define_alias   ("get-seconds", XFN_NS_URI, "get-seconds-from-dateTime", XFN_NS_URI);
-  xqf_define_builtin ("get-start"				, xqf_get_start			/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("get-timezone-from-date"			, xqf_get_TZ_from_dateTime	/* ??? */	, DV_SHORT_STRING	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
+  x2f_define_builtin ("get-start"				, xqf_get_start			/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("get-timezone-from-date"			, xqf_get_TZ_from_dateTime	/* ??? */	, DV_SHORT_STRING	, 1	, xpfmalist(1, xpfma(NULL,DV_DATE,1))	, NULL);
   xpf_define_alias   ("get-timezone-from-dateTime", XFN_NS_URI, "get-timezone-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-timezone-from-gDay", XFN_NS_URI, "get-timezone-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-timezone-from-gMonth", XFN_NS_URI, "get-timezone-from-date", XFN_NS_URI);
@@ -3663,95 +3705,94 @@ xqf_define_builtin ("decimal"					, xqf_decimal			/* ??? */	, DV_UNKNOWN	, 1	, x
   xpf_define_alias   ("get-timezone-from-gYearMonth", XFN_NS_URI, "get-timezone-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-timezone-from-time", XFN_NS_URI, "get-timezone-from-date", XFN_NS_URI);
   xpf_define_alias   ("get-years", XFN_NS_URI, "get-gYear-from-date", XFN_NS_URI);
-  xqf_define_builtin ("int"					, xqf_int			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("integer"					, xqf_integer			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("language"				, NULL /*xqf_language*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xpf_define_alias   ("local-name", XFN_NS_URI, "local-name", NULL);
-  xqf_define_builtin ("long"					, xqf_long			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("lower-case"				, xqf_lower_case	/* XQuery 1.0 */	, DV_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	, NULL);
-  xqf_define_builtin ("match"					, NULL /*xqf_match*/		/* ??? */	, DV_ARRAY_OF_XQVAL , 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("matches"					, xqf_matches			/* ??? */	, XPDV_BOOL, 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xpf_define_alias   ("name", XFN_NS_URI, "name", NULL);
-  xpf_define_alias   ("namespace-uri", XFN_NS_URI, "namespace-uri", NULL);
-  xpf_define_alias   ("not", XFN_NS_URI, "not", NULL);
-  xqf_define_builtin ("normalizedString"			, xqf_normalized_string		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xpf_define_alias   ("normalize-space", XFN_NS_URI, "normalize-space", NULL);
-  xqf_define_builtin ("normalize-unicode"			, NULL /*xqf_normalize_unicode*/		, DV_SHORT_STRING , 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xpf_define_alias   ("number", XFN_NS_URI, "number", NULL);
+  xsd_define_builtin ("int"					, xqf_int			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xsd_define_builtin ("integer"					, xqf_integer			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("language"				, NULL /*xqf_language*/		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("local-name", XFN_NS_URI, "local-name", NULL);*/
+  xsd_define_builtin ("long"					, xqf_long			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("lower-case"				, xqf_lower_case	/* XQuery 1.0 */	, DV_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	, NULL);
+  x2f_define_builtin ("match"					, NULL /*xqf_match*/		/* ??? */	, DV_ARRAY_OF_XQVAL , 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("matches"					, xqf_matches			/* ??? */	, XPDV_BOOL, 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("name", XFN_NS_URI, "name", NULL);*/
+  /*xpf_define_alias   ("namespace-uri", XFN_NS_URI, "namespace-uri", NULL);*/
+  /*xpf_define_alias   ("not", XFN_NS_URI, "not", NULL);*/
+  x2f_define_builtin ("normalizedString"			, xqf_normalized_string		/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("normalize-space", XFN_NS_URI, "normalize-space", NULL);*/
+  x2f_define_builtin ("normalize-unicode"			, NULL /*xqf_normalize_unicode*/		, DV_SHORT_STRING , 2	, xpfmalist(2, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  /*xpf_define_alias   ("number", XFN_NS_URI, "number", NULL);*/
   xpf_define_alias   ("processXQuery", VIRT_BPM_XPATH_EXTENSION_NS_URI, "processXQuery", NULL);
   xpf_define_alias   ("processXSLT", VIRT_BPM_XPATH_EXTENSION_NS_URI, "processXSLT", NULL);
   xqf_define_builtin ("replace"					, xqf_replace			/* XQuery 1.0 */, DV_STRING	, 3 , xpfmalist(4, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1),  xpfma(NULL,DV_STRING,1))	, NULL);
   xpf_define_alias   ("round", XFN_NS_URI, "round-number", NULL);
-  xqf_define_builtin ("root"					, xqf_root			/* XQuery 1.0 */, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,1))	, NULL);
-  xqf_define_builtin ("short"					, xqf_short			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("root"					, xqf_root			/* XQuery 1.0 */, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,1))	, NULL);
+  xsd_define_builtin ("short"					, xqf_short			/* ??? */	, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
   xqf_define_builtin ("starts-with"				, xqf_starts_with		/* ??? */	, XPDV_BOOL	, 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
   xqf_define_builtin ("string-length"				, xqf_string_length		/* XQuery 1.0 */	, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	, NULL);
-  xqf_define_builtin ("string"					, xqf_string			/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("string-join"				, xqf_string_join		/* XQuery 1.0 */, DV_STRING , 2	, xpfmalist(2, xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_STRING,1))	, NULL);
-  xqf_define_builtin ("string-pad-beginning"			, NULL /*xqf_string_pad_beginning*/ /* ??? */	, DV_SHORT_STRING , 3	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("string-pad-end"				, NULL /*xqf_string_pad_end*/	/* ??? */	, DV_SHORT_STRING , 3	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("string-to-codepoints"			, xqf_string_to_codepoints	/* XQuery 1.0 */, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	,  NULL);
+  xsd_define_builtin ("string"					, xqf_string			/* ??? */	, DV_SHORT_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("string-join"				, xqf_string_join		/* XQuery 1.0 */, DV_STRING , 2	, xpfmalist(2, xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_STRING,1))	, NULL);
+  x2f_define_builtin ("string-pad-beginning"			, NULL /*xqf_string_pad_beginning*/ /* ??? */	, DV_SHORT_STRING , 3	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("string-pad-end"				, NULL /*xqf_string_pad_end*/	/* ??? */	, DV_SHORT_STRING , 3	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("string-to-codepoints"			, xqf_string_to_codepoints	/* XQuery 1.0 */, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	,  NULL);
   xqf_define_builtin ("substring"				, xqf_substring			/* XQuery 1.0 */, DV_STRING , 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
   xqf_define_builtin ("substring-after"				, xqf_substring_after		/* XQUery 1.0 */, DV_STRING , 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1))	, NULL);
   xqf_define_builtin ("substring-before"			, xqf_substring_before		/* XQuery 1.0 */, DV_STRING , 2	, xpfmalist(3, xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1), xpfma(NULL,DV_STRING,1))	, NULL);
-  xqf_define_builtin ("temporal-dateTimeDuration-contains"	, xqf_dateTimeDuration_contains	/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("temporal-dateTimes-contains"		, xqf_dateTimes_contains	/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("temporal-durationDateTime-contains"	, xqf_durationDateTime_contains	/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin_with_ns ("time"				, xqf_time			/* XQuery 1.0 */, DV_TIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-  xqf_define_builtin ("token"					, xqf_token			/* ??? */	, DV_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
-  xqf_define_builtin ("tokenize"				, xqf_tokenize			/* ??? */	, DV_UNKNOWN, 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("temporal-dateTimeDuration-contains"	, xqf_dateTimeDuration_contains	/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("temporal-dateTimes-contains"		, xqf_dateTimes_contains	/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("temporal-durationDateTime-contains"	, xqf_durationDateTime_contains	/* ??? */	, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  xsd_define_builtin ("time"					, xqf_time			/* XQuery 1.0 */, DV_TIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("token"					, xqf_token			/* ??? */	, DV_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  x2f_define_builtin ("tokenize"				, xqf_tokenize			/* ??? */	, DV_UNKNOWN, 2	, xpfmalist(3, xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1), xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
   xpf_define_alias   ("translate", XFN_NS_URI, "translate", NULL);
   xpf_define_alias   ("true", XFN_NS_URI, "true", NULL);
-  xqf_define_builtin ("upper-case"				, xqf_upper_case	/* XQuery 1.0 */	, DV_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	, NULL);
+  x2f_define_builtin ("upper-case"				, xqf_upper_case	/* XQuery 1.0 */	, DV_STRING , 1	, xpfmalist(1, xpfma(NULL,DV_STRING,1))	, NULL);
 
 
   /* Operators */
-  xqf_define_builtin_with_ns ("numeric-abs"			, xqf_numeric_abs				, DV_NUMERIC , 1	, xpfmalist(1, xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
+  xop_define_builtin ("numeric-abs"			, xqf_numeric_abs				, DV_NUMERIC , 1	, xpfmalist(1, xpfma(NULL,DV_NUMERIC,1))	, NULL);
   xpf_define_alias ("numeric-add", XOP_NS_URI, "sum", NULL);
-  xqf_define_builtin_with_ns ("numeric-equal"			, xqf_numeric_equal				, XPDV_BOOL  , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-greater-than"		, xqf_numeric_gt				, XPDV_BOOL  , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-integer-divide"		, xqf_numeric_idivide				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-less-than"		, xqf_numeric_lt				, XPDV_BOOL  , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-mod"			, xqf_numeric_mod				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-multiply"		, xqf_numeric_multiply				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-subtract"		, xqf_numeric_subtract	/* ??? */		, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-divide"			, xqf_numeric_divide				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("numeric-unary-minus"		, xqf_numeric_uminus				, DV_NUMERIC , 1	, xpfmalist(1, xpfma(NULL,DV_NUMERIC,1))	, NULL, XOP_NS_URI);
-
-
-
-  xqf_define_builtin ("zero-or-one"			, xqf_zero_or_one			/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("one-or-more"			, xqf_one_or_more			/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("exactly-one"		, xqf_exactly_one				/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("boolean"				, xqf_boolean				/* XQuery 1.0 */, DV_UNKNOWN	, 1	, xpfmalist(1, xpfma(NULL,XPDV_BOOL,1))	, NULL);
-  xqf_define_builtin ("index-of"			, xqf_index_of				/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_alias   ("empty", XFN_NS_URI, "empty", NULL);
-  xpf_define_alias   ("exists", XFN_NS_URI, "exists", NULL);
+  xop_define_builtin ("numeric-equal"			, xqf_numeric_equal				, XPDV_BOOL  , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-greater-than"		, xqf_numeric_gt				, XPDV_BOOL  , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-integer-divide"		, xqf_numeric_idivide				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-less-than"		, xqf_numeric_lt				, XPDV_BOOL  , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-mod"			, xqf_numeric_mod				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-multiply"			, xqf_numeric_multiply				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-subtract"			, xqf_numeric_subtract	/* ??? */		, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-divide"			, xqf_numeric_divide				, DV_NUMERIC , 2	, xpfmalist(2, xpfma(NULL,DV_NUMERIC,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("numeric-unary-minus"		, xqf_numeric_uminus				, DV_NUMERIC , 1	, xpfmalist(1, xpfma(NULL,DV_NUMERIC,1))				, NULL);
+
+
+
+  x2f_define_builtin ("zero-or-one"			, xqf_zero_or_one			/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("one-or-more"			, xqf_one_or_more			/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("exactly-one"			, xqf_exactly_one				/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("index-of"				, xqf_index_of				/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  /*xpf_define_alias   ("empty", XFN_NS_URI, "empty", NULL);*/
+  /*xpf_define_alias   ("exists", XFN_NS_URI, "exists", NULL);*/
   xqf_define_builtin ("distinct-values"			, xqf_distinct_values			/* XQuery 1.0 */, DV_UNKNOWN	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("insert-before"			, xqf_insert_before			/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("remove"				, xqf_remove				/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("reverse"				, xqf_reverse				/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xqf_define_builtin ("subsequence"			, xqf_subsequence			/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
-  xpf_define_alias   ("unordered", XFN_NS_URI, "unordered", NULL);
-  xpf_define_alias   ("union", XFN_NS_URI, "union", NULL);
+  x2f_define_builtin ("insert-before"			, xqf_insert_before			/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("remove"				, xqf_remove				/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("reverse"				, xqf_reverse				/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  x2f_define_builtin ("subsequence"			, xqf_subsequence			/* XQuery 1.0 */, XPDV_NODESET	, 0	, NULL	, xpfmalist(1, xpfma(NULL,DV_UNKNOWN,0)));
+  /*xpf_define_alias   ("unordered", XFN_NS_URI, "unordered", NULL);*/
+  /*xpf_define_alias   ("union", XFN_NS_URI, "union", NULL);*/
   xpf_define_alias   ("union", XOP_NS_URI, "union", NULL);
-  xpf_define_alias   ("intersect", XFN_NS_URI, "intersect", NULL);
+  /*xpf_define_alias   ("intersect", XFN_NS_URI, "intersect", NULL);*/
   xpf_define_alias   ("intersect", XOP_NS_URI, "intersect", NULL);
-  xpf_define_alias   ("except", XFN_NS_URI, "except", NULL);
+  /*xpf_define_alias   ("except", XFN_NS_URI, "except", NULL);*/
   xpf_define_alias   ("except", XOP_NS_URI, "except", NULL);
 
   xpf_define_alias   ("is-same-node", XOP_NS_URI, "is-same", NULL);
   xpf_define_alias   ("node-before", XOP_NS_URI, "is-before", NULL);
   xpf_define_alias   ("node-after", XOP_NS_URI, "is-after", NULL);
   xpf_define_alias   ("to", XOP_NS_URI, "TO operator", NULL);
-  xpf_define_alias   ("id", XFN_NS_URI, "id", NULL);
-  xpf_define_alias   ("doc", XFN_NS_URI, "doc", NULL);
-  xpf_define_alias   ("position", XFN_NS_URI, "position", NULL);
-  xpf_define_alias   ("last", XFN_NS_URI, "last", NULL);
+  /*xpf_define_alias   ("id", XFN_NS_URI, "id", NULL);*/
+  /*xpf_define_alias   ("doc", XFN_NS_URI, "doc", NULL);*/
+  /*xpf_define_alias   ("position", XFN_NS_URI, "position", NULL);*/
+  /*xpf_define_alias   ("last", XFN_NS_URI, "last", NULL);*/
 
-  xqf_define_builtin_with_ns ("boolean-equal"		       , xqf_boolean_equal			/* XQuery 1.0 */, XPDV_BOOL     , 2	, xpfmalist(2, xpfma(NULL,XPDV_BOOL,0),  xpfma(NULL,XPDV_BOOL,0)), NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("boolean-less-than"	       , xqf_boolean_lt				/* XQuery 1.0 */, XPDV_BOOL     , 2	, xpfmalist(2, xpfma(NULL,XPDV_BOOL,0),  xpfma(NULL,XPDV_BOOL,0)), NULL, XOP_NS_URI);
-  xqf_define_builtin_with_ns ("boolean-greater-than"	       , xqf_boolean_gt				/* XQuery 1.0 */, XPDV_BOOL     , 2	, xpfmalist(2, xpfma(NULL,XPDV_BOOL,0),  xpfma(NULL,XPDV_BOOL,0)), NULL, XOP_NS_URI);
+  xop_define_builtin ("boolean-equal"		       , xqf_boolean_equal			/* XQuery 1.0 */, XPDV_BOOL     , 2	, xpfmalist(2, xpfma(NULL,XPDV_BOOL,0),  xpfma(NULL,XPDV_BOOL,0)), NULL);
+  xop_define_builtin ("boolean-less-than"	       , xqf_boolean_lt				/* XQuery 1.0 */, XPDV_BOOL     , 2	, xpfmalist(2, xpfma(NULL,XPDV_BOOL,0),  xpfma(NULL,XPDV_BOOL,0)), NULL);
+  xop_define_builtin ("boolean-greater-than"	       , xqf_boolean_gt				/* XQuery 1.0 */, XPDV_BOOL     , 2	, xpfmalist(2, xpfma(NULL,XPDV_BOOL,0),  xpfma(NULL,XPDV_BOOL,0)), NULL);
 
 
   /* datetime functions */
@@ -3774,88 +3815,107 @@ xqf_define_builtin ("decimal"					, xqf_decimal			/* ??? */	, DV_UNKNOWN	, 1	, x
   xpf_define_alias   ("seconds-from-time", XFN_NS_URI, "get-seconds-from-dateTime", XFN_NS_URI);
 
   /* duration functions */
-  xqf_define_builtin_with_ns ("yearMonthDuration"		, xqf_duration			/* XQuery 1.0 */, XPDV_DURATION	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1)), NULL,XDT_NS_URI);
-  xqf_define_builtin_with_ns ("dayTimeDuration"			, xqf_duration			/* XQuery 1.0 */, XPDV_DURATION	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1)), NULL,XDT_NS_URI);
-  xqf_define_builtin ("year-from-duration"			, xqf_get_Year_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
-  xqf_define_builtin ("day-from-duration"			, xqf_get_Day_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
-  xqf_define_builtin ("month-from-duration"			, xqf_get_Month_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
-  xqf_define_builtin ("minutes-from-duration"			, xqf_get_minutes_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
-  xqf_define_builtin ("hours-from-duration"			, xqf_get_hour_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
-  xqf_define_builtin ("seconds-from-duration"			, xqf_get_seconds_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+#if 1
+  xpf_define_alias   ("yearMonthDuration", XDT_NS_URI, "duration", XFN_NS_URI); /* XQuery 1.0 */
+  xpf_define_alias   ("dayTimeDuration", XDT_NS_URI, "duration", XFN_NS_URI); /* XQuery 1.0 */
+#else
+  xdt_define_builtin ("yearMonthDuration"			, xqf_duration			/* XQuery 1.0 */, XPDV_DURATION	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+  xdt_define_builtin ("dayTimeDuration"				, xqf_duration			/* XQuery 1.0 */, XPDV_DURATION	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL);
+#endif
+  x2f_define_builtin ("year-from-duration"			, xqf_get_Year_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+  x2f_define_builtin ("day-from-duration"			, xqf_get_Day_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+  x2f_define_builtin ("month-from-duration"			, xqf_get_Month_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+  x2f_define_builtin ("minutes-from-duration"			, xqf_get_minutes_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+  x2f_define_builtin ("hours-from-duration"			, xqf_get_hour_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
+  x2f_define_builtin ("seconds-from-duration"			, xqf_get_seconds_from_duration	/* XQuery 1.0 */, DV_LONG_INT	, 1	, xpfmalist(1, xpfma(NULL,XPDV_DURATION,1))	, NULL);
 
   /* duration operations */
-  xqf_define_builtin_with_ns ("yearMonthDuration-equal"		, xqf_YM_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("yearMonthDuration-less-than"	, xqf_YM_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("yearMonthDuration-greater-than"	, xqf_YM_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-
-  xqf_define_builtin_with_ns ("dayTimeDuration-equal"		, xqf_DT_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("dayTimeDuration-less-than"	, xqf_DT_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("dayTimeDuration-greater-than"	, xqf_DT_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
+  xop_define_builtin ("yearMonthDuration-equal"		, xqf_YM_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("yearMonthDuration-less-than"	, xqf_YM_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("yearMonthDuration-greater-than"	, xqf_YM_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("dayTimeDuration-equal"		, xqf_DT_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("dayTimeDuration-less-than"	, xqf_DT_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("dayTimeDuration-greater-than"	, xqf_DT_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
 
   /* arithmetic operations over durations */
-  xqf_define_builtin_with_ns ("add-yearMonthDurations"		, xqf_yMd_add			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-yearMonthDurations"	, xqf_yMd_sub			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("multiply-yearMonthDuration"	, xqf_yMd_mult			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("divide-yearMonthDuration"	, xqf_yMd_div			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("divide-yearMonthDuration-by-yearMonthDuration"	,xqf_yMd_div_yMd/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-
-  xqf_define_builtin_with_ns ("add-dayTimeDurations"		, xqf_dT_add			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-dayTimeDurations"	, xqf_dT_sub			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("multiply-dayTimeDuration"	, xqf_dT_mult			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("divide-dayTimeDuration"	, xqf_dT_div				/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("divide-dayTimeDuration-by-dayTimeDuration"	,xqf_dT_div_dT	/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
+  xop_define_builtin ("add-yearMonthDurations"		, xqf_yMd_add			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("subtract-yearMonthDurations"	, xqf_yMd_sub			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("multiply-yearMonthDuration"	, xqf_yMd_mult			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  xop_define_builtin ("divide-yearMonthDuration"		, xqf_yMd_div			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  xop_define_builtin ("divide-yearMonthDuration-by-yearMonthDuration"	,xqf_yMd_div_yMd/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("add-dayTimeDurations"		, xqf_dT_add			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("subtract-dayTimeDurations"	, xqf_dT_sub			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
+  xop_define_builtin ("multiply-dayTimeDuration"		, xqf_dT_mult			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  xop_define_builtin ("divide-dayTimeDuration"		, xqf_dT_div			/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  xop_define_builtin ("divide-dayTimeDuration-by-dayTimeDuration"	,xqf_dT_div_dT	/* XQuery 1.0 */, DV_UNKNOWN	, 2	, xpfmalist(2,  xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
 
 
   /* dateTime operations */
-  xqf_define_builtin_with_ns ("dateTime-equal"			, xqf_dT_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("dateTime-less-than"		, xqf_dT_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("dateTime-greater-than"		, xqf_dT_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
+  xop_define_builtin ("dateTime-equal"			, xqf_dT_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+  xop_define_builtin ("dateTime-less-than"		, xqf_dT_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+  xop_define_builtin ("dateTime-greater-than"		, xqf_dT_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
   /* Date operations */
-  xqf_define_builtin_with_ns ("date-equal"			, xqf_date_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("date-less-than"			, xqf_date_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("date-greater-than"		, xqf_date_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
+  xop_define_builtin ("date-equal"			, xqf_date_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+  xop_define_builtin ("date-less-than"			, xqf_date_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+  xop_define_builtin ("date-greater-than"		, xqf_date_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
   /* time operations */
-  xqf_define_builtin_with_ns ("time-equal"			, xqf_time_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("time-less-than"			, xqf_time_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("time-greater-than"		, xqf_time_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL,XOP_NS_URI);
-  /* constructors for date types */
-  xqf_define_builtin_with_ns ("gDay"				, xqf_gDay			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-  xqf_define_builtin_with_ns ("gMonth"				, xqf_gMonth			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-  xqf_define_builtin_with_ns ("gMonthDay"			, xqf_gMonthDay			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-  xqf_define_builtin_with_ns ("gYear"				, xqf_gYear			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-  xqf_define_builtin_with_ns ("gYearMonth"			, xqf_gYearMonth		/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(1, xpfma(NULL,DV_SHORT_STRING,1))	, NULL, XS_NS_URI);
-
-  xqf_define_builtin ("adjust-dateTime-to-timezone"	, xqf_adj_tz			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-  xqf_define_builtin ("adjust-date-to-timezone"	,	 xqf_adj_tz			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-  xqf_define_builtin ("adjust-time-to-timezone"	,	xqf_adj_tz			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  xop_define_builtin ("time-equal"			, xqf_time_eq			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+  xop_define_builtin ("time-less-than"			, xqf_time_lt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+  xop_define_builtin ("time-greater-than"		, xqf_time_gt			/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_DATETIME,1)), NULL);
+
+  x2f_define_builtin ("adjust-dateTime-to-timezone"	, xqf_adj_tz			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+#if 1
+  xpf_define_alias ("adjust-date-to-timezone", XFN_NS_URI, "adjust-dateTime-to-timezone", XFN_NS_URI);
+  xpf_define_alias ("adjust-date-to-timezone", XXF_NS_URI, "adjust-dateTime-to-timezone", XFN_NS_URI);
+  xpf_define_alias ("adjust-time-to-timezone", XFN_NS_URI, "adjust-dateTime-to-timezone", XFN_NS_URI);
+  xpf_define_alias ("adjust-time-to-timezone", XXF_NS_URI, "adjust-dateTime-to-timezone", XFN_NS_URI);
+#else
+  x2f_define_builtin ("adjust-date-to-timezone"	,	 xqf_adj_tz			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  x2f_define_builtin ("adjust-time-to-timezone"	,	xqf_adj_tz			/* XQuery 1.0 */, DV_DATETIME	, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+#endif
 
   /* Arithmetic functions on Durations, Dates and Times */
-  xqf_define_builtin ("subtract-dateTimes-yielding-yearMonthDuration",xqf_dT_sub_yMD		/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-  xqf_define_builtin ("subtract-dateTimes-yielding-dayTimeDuration",xqf_dT_sub_dTD		/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-  xqf_define_builtin ("subtract-dates-yielding-yearMonthDuration",xqf_dT_sub_yMD		/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-  xqf_define_builtin ("subtract-dates-yielding-dayTimeDuration",xqf_dT_sub_dTD			/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-  xqf_define_builtin ("subtract-times",xqf_dT_sub_dTD						/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
-
-  xqf_define_builtin_with_ns ("add-yearMonthDuration-to-dateTime", xqf_add_yMD_to_dT		/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("add-dayTimeDuration-to-dateTime", xqf_add_dTD_to_dT		/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-yearMonthDuration-from-dateTime", xqf_sub_yMD_to_dT	/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-dayTimeDuration-from-dateTime", xqf_sub_dTD_to_dT	/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-
-  xqf_define_builtin_with_ns ("add-yearMonthDuration-to-date", xqf_add_yMD_to_dT		/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("add-dayTimeDuration-to-date", xqf_add_dTD_to_dT			/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-yearMonthDuration-from-date", xqf_sub_yMD_to_dT		/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-dayTimeDuration-from-date", xqf_sub_dTD_to_dT		/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
+  x2f_define_builtin ("subtract-dateTimes-yielding-yearMonthDuration",xqf_dT_sub_yMD		/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  x2f_define_builtin ("subtract-dateTimes-yielding-dayTimeDuration",xqf_dT_sub_dTD		/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+#if 1
+  xpf_define_alias ("subtract-dates-yielding-yearMonthDuration", XFN_NS_URI, "subtract-dateTimes-yielding-yearMonthDuration", XFN_NS_URI);
+  xpf_define_alias ("subtract-dates-yielding-yearMonthDuration", XXF_NS_URI, "subtract-dateTimes-yielding-yearMonthDuration", XFN_NS_URI);
+  xpf_define_alias ("subtract-dates-yielding-dayTimeDuration", XFN_NS_URI, "subtract-dateTimes-yielding-dayTimeDuration", XFN_NS_URI);
+  xpf_define_alias ("subtract-dates-yielding-dayTimeDuration", XXF_NS_URI, "subtract-dateTimes-yielding-dayTimeDuration", XFN_NS_URI);
+  xpf_define_alias ("subtract-times", XFN_NS_URI, "subtract-dateTimes-yielding-dayTimeDuration", XFN_NS_URI);
+  xpf_define_alias ("subtract-times", XXF_NS_URI, "subtract-dateTimes-yielding-dayTimeDuration", XFN_NS_URI);
+#else
+  x2f_define_builtin ("subtract-dates-yielding-yearMonthDuration",xqf_dT_sub_yMD		/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  x2f_define_builtin ("subtract-dates-yielding-dayTimeDuration",xqf_dT_sub_dTD			/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+  x2f_define_builtin ("subtract-times",xqf_dT_sub_dTD						/* XQuery 1.0 */, DV_NUMERIC, 1	, xpfmalist(2,  xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL);
+#endif
 
-  xqf_define_builtin_with_ns ("add-dayTimeDuration-to-time", xqf_add_dTD_to_dT			/* XQuery 1.0 */, DV_TIME	, 2	, xpfmalist(2, xpfma(NULL,DV_TIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
-  xqf_define_builtin_with_ns ("subtract-dayTimeDuration-from-time", xqf_sub_dTD_to_dT		/* XQuery 1.0 */, DV_TIME	, 2	, xpfmalist(2, xpfma(NULL,DV_TIME,1), xpfma(NULL,DV_NUMERIC,1)), NULL,XOP_NS_URI);
+  xop_define_builtin ("add-yearMonthDuration-to-dateTime", xqf_add_yMD_to_dT		/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("add-dayTimeDuration-to-dateTime", xqf_add_dTD_to_dT		/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("subtract-yearMonthDuration-from-dateTime", xqf_sub_yMD_to_dT	/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+  xop_define_builtin ("subtract-dayTimeDuration-from-dateTime", xqf_sub_dTD_to_dT	/* XQuery 1.0 */, DV_DATETIME	, 2	, xpfmalist(2, xpfma(NULL,DV_DATETIME,1), xpfma(NULL,DV_NUMERIC,1))	, NULL);
+#if 1
+  xpf_define_alias ("add-yearMonthDuration-to-date"		, XOP_NS_URI  ,"add-yearMonthDuration-to-dateTime"		, XOP_NS_URI);
+  xpf_define_alias ("add-dayTimeDuration-to-date"		, XOP_NS_URI  ,"add-dayTimeDuration-to-dateTime"			, XOP_NS_URI);
+  xpf_define_alias ("subtract-yearMonthDuration-from-date"	, XOP_NS_URI  ,"subtract-yearMonthDuration-from-dateTime"	, XOP_NS_URI);
+  xpf_define_alias ("subtract-dayTimeDuration-from-date"		, XOP_NS_URI  ,"subtract-dayTimeDuration-from-dateTime"		, XOP_NS_URI);
+  xpf_define_alias ("add-dayTimeDuration-to-time"		, XOP_NS_URI  ,"add-dayTimeDuration-to-dateTime"			, XOP_NS_URI);
+  xpf_define_alias ("subtract-dayTimeDuration-from-time"		, XOP_NS_URI  ,"subtract-dayTimeDuration-from-dateTime"		, XOP_NS_URI);
+#else
+  xop_define_builtin ("add-yearMonthDuration-to-date", xqf_add_yMD_to_dT		/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))		, NULL);
+  xop_define_builtin ("add-dayTimeDuration-to-date", xqf_add_dTD_to_dT			/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))		, NULL);
+  xop_define_builtin ("subtract-yearMonthDuration-from-date", xqf_sub_yMD_to_dT		/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))		, NULL);
+  xop_define_builtin ("subtract-dayTimeDuration-from-date", xqf_sub_dTD_to_dT		/* XQuery 1.0 */, DV_DATE	, 2	, xpfmalist(2, xpfma(NULL,DV_DATE,1), xpfma(NULL,DV_NUMERIC,1))		, NULL);
+  xop_define_builtin ("add-dayTimeDuration-to-time", xqf_add_dTD_to_dT			/* XQuery 1.0 */, DV_TIME	, 2	, xpfmalist(2, xpfma(NULL,DV_TIME,1), xpfma(NULL,DV_NUMERIC,1))		, NULL);
+  xop_define_builtin ("subtract-dayTimeDuration-from-time", xqf_sub_dTD_to_dT		/* XQuery 1.0 */, DV_TIME	, 2	, xpfmalist(2, xpfma(NULL,DV_TIME,1), xpfma(NULL,DV_NUMERIC,1))		, NULL);
+#endif
 
   /* QNames */
-  xqf_define_builtin_with_ns ("QName-equal",		xqf_qname_eq				/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2, xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL,XOP_NS_URI);
+  xop_define_builtin ("QName-equal",		xqf_qname_eq				/* XQuery 1.0 */, XPDV_BOOL	, 2	, xpfmalist(2, xpfma(NULL,DV_UNKNOWN,1), xpfma(NULL,DV_UNKNOWN,1)), NULL);
 
   xpf_define_builtin ("current-date", xpf_current_date						/* XQuery 1.0 */, DV_DATE	, 0	, xpfmalist(0), NULL);
-  xpf_define_alias   ("current-date", XFN_NS_URI, "current-date", NULL);
-  xqf_define_builtin ("current-time", xqf_current_time						/* XQuery 1.0 */, DV_TIME	, 0	, xpfmalist(0), NULL);
-  xqf_define_builtin ("current-dateTime", xqf_current_dateTime					/* XQuery 1.0 */, DV_DATETIME	, 0	, xpfmalist(0), NULL);
-  xpf_define_alias   ("deep-equal", XFN_NS_URI, "deep-equal", NULL);
+  xpf_define_builtin ("current-time", xqf_current_time						/* XQuery 1.0 */, DV_TIME	, 0	, xpfmalist(0), NULL);
+  xpf_define_builtin ("current-dateTime", xqf_current_dateTime					/* XQuery 1.0 */, DV_DATETIME	, 0	, xpfmalist(0), NULL);
+  /*xpf_define_alias   ("deep-equal", XFN_NS_URI, "deep-equal", NULL);*/
 }
 
diff --git a/libsrc/Wi/xqf.h b/libsrc/Wi/xqf.h
index cb80aad..803cc2c 100644
--- a/libsrc/Wi/xqf.h
+++ b/libsrc/Wi/xqf.h
@@ -1,12 +1,12 @@
 /*
  *  xqf.h
  *
- *  $Id: xqf.h,v 1.4.2.3 2011/03/03 11:56:45 source Exp $
+ *  $Id: xqf.h,v 1.4.2.4 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xslt.c b/libsrc/Wi/xslt.c
index 0dd3d84..f57a2cb 100644
--- a/libsrc/Wi/xslt.c
+++ b/libsrc/Wi/xslt.c
@@ -1,14 +1,14 @@
 /*
  *  xslt.c
  *
- *  $Id: xslt.c,v 1.32.2.26 2011/02/02 15:36:58 source Exp $
+ *  $Id: xslt.c,v 1.32.2.29 2012/03/08 12:55:38 source Exp $
  *
  *  XSLT
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -3814,6 +3814,56 @@ bif_dict_dec_or_remove (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 }
 
 caddr_t
+bif_dict_bitor_or_put (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  id_hash_iterator_t *hit = bif_dict_iterator_arg (qst, args, 0, "dict_bitor_or_put", 0);
+  id_hash_t *ht = hit->hit_hash;
+  caddr_t key = bif_arg (qst, args, 1, "dict_bitor_or_put");
+  boxint bits_to_set = bif_long_arg (qst, args, 2, "dict_bitor_or_put");
+  boxint res;
+  caddr_t *old_val_ptr;
+  if (ht->ht_mutex)
+    mutex_enter (ht->ht_mutex);
+  if ((0 < ht->ht_dict_max_entries) &&
+      ((ht->ht_inserts - ht->ht_deletes) > ht->ht_dict_max_entries) )
+    goto skip_insertion; /* see below */
+  if ((0 < ht->ht_dict_max_mem_in_use) &&
+      (ht->ht_dict_mem_in_use > ht->ht_dict_max_mem_in_use) )
+    goto skip_insertion; /* see below */
+  old_val_ptr = (caddr_t *)id_hash_get (ht, (caddr_t)(&key));
+  if (NULL != old_val_ptr)
+    {
+      boxint old_int;
+      if (DV_LONG_INT != DV_TYPE_OF (old_val_ptr[0]))
+              sqlr_new_error ("42000", "SR627",
+                "dict_bitor_or_put() can not apply a bitwise OR to a noninteger value" );
+      old_int = unbox (old_val_ptr[0]);
+      dk_free_tree (old_val_ptr[0]);
+      res = old_int | bits_to_set;
+      old_val_ptr[0] = box_num (res);
+    }
+  else
+    {
+      caddr_t val = box_num (bits_to_set);
+      key = box_copy_tree (key);
+      res = bits_to_set;
+      if (ht->ht_mutex)
+        box_make_tree_mt_safe (key);
+      id_hash_set (ht, (caddr_t)(&key), (caddr_t)(&val));
+      if (0 < ht->ht_dict_max_mem_in_use)
+        ht->ht_dict_mem_in_use += raw_length (val) + raw_length (key) + 3 * sizeof (caddr_t);
+    }
+  id_hash_iterator (hit, ht);
+  ht->ht_dict_version++;
+  hit->hit_dict_version++ /* It's incorrect to write hit->hit_dict_version = ht->ht_dict_version because they may be out of sync before the id_hash_put */;
+skip_insertion:
+  if (ht->ht_mutex)
+    mutex_leave (ht->ht_mutex);
+  res = ht->ht_inserts - ht->ht_deletes;
+  return box_num (res);
+}
+
+caddr_t
 bif_dict_zap (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
   id_hash_iterator_t hit, *hit1 = bif_dict_iterator_or_null_arg (qst, args, 0, "dict_zap", 0);
@@ -4114,17 +4164,24 @@ cmp_done:
 
 #ifdef VECTOR_SORT_DEBUG
 #define VECTOR_CHECK_BLOCK(blk,specs) do { \
-    int ctr = specs->vs_block_elts; \
-    while (ctr--) dk_check_tree ((blk)[ctr]); \
+    int vctchkblk_ctr = specs->vs_block_elts; \
+    while (vctchkblk_ctr--) dk_check_tree ((blk)[vctchkblk_ctr]); \
   } while (0)
 #else
 #define VECTOR_CHECK_BLOCK(blk,specs)
 #endif
 
+#define VECTOR_SORT_COPY(a,b,specs) do { \
+    int bsize = (specs)->vs_block_size; \
+    VECTOR_CHECK_BLOCK(a,specs); \
+    VECTOR_CHECK_BLOCK(b,specs); \
+    memcpy ((a), (b), bsize); \
+  } while (0)
+
 
 #define VECTOR_SORT_SWAP(a,b,specs) do { \
     caddr_t tmp[MAX_VECTOR_BSORT_BLOCK]; \
-    int bsize = specs->vs_block_size; \
+    int bsize = (specs)->vs_block_size; \
     VECTOR_CHECK_BLOCK(a,specs); \
     VECTOR_CHECK_BLOCK(b,specs); \
     memcpy (tmp, (a), bsize); \
@@ -4259,7 +4316,7 @@ vector_qsort (caddr_t *vect, int group_count, vector_sort_t *specs)
 #ifdef VECTOR_SORT_DEBUG
   dk_check_tree (vect);
 #endif
-  dk_free_box (temp);
+  dk_free_box ((caddr_t)temp);
 }
 
 typedef struct dsort_itm_s {
@@ -4412,20 +4469,30 @@ bif_gvector_digit_sort (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 }
 
 caddr_t
-bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *funname, char algo)
+bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args, const char *funname, char algo, int block_elts, int key_ofs, int sort_asc)
 {
   caddr_t *vect = (caddr_t *)bif_array_arg (qst, args, 0, funname);
   int vect_elems = BOX_ELEMENTS (vect);
-  int key_ofs = bif_long_range_arg (qst, args, 1, funname, 0, 1024);
-  int sort_asc = bif_long_range_arg (qst, args, 2, funname, 0, 1);
+  int key_item_inx = bif_long_range_arg (qst, args, 1, funname, 0, 1024);
+  int group_count;
   vector_sort_t specs;
-  if (1 >= vect_elems)
-    return box_num (vect_elems); /* No need to sort empty or single-element vector */
+  if (block_elts <= 0)
+    sqlr_new_error ("22023", "SR488", "Number of elements in block should be positive integer in call of %s()", funname);
+  if (block_elts > MAX_VECTOR_BSORT_BLOCK)
+    sqlr_new_error ("22023", "SR488", "Number of elements in block is greater than maximum block length %d supported by %s()", MAX_VECTOR_BSORT_BLOCK, funname);
+  if (vect_elems % block_elts != 0)
+    sqlr_new_error ("22023", "SR489", "In call of %s(), length of vector in argument #1 is not a whole multiple of number of elements in block", funname);
+  if ((0 > key_ofs) || (key_ofs >= block_elts))
+    sqlr_new_error ("22023", "SR490", "In call of %s(), offset of key in block should be nonnegative integer that is less than number of elements in block", funname);
+  group_count = vect_elems / block_elts;
+  if (1 >= group_count)
+    return box_num (group_count); /* No need to sort empty or single-element vector */
+  specs.vs_block_elts = block_elts;
+  specs.vs_key_ofs = key_ofs;
+  specs.vs_sort_asc = sort_asc;
+  specs.vs_block_size = specs.vs_block_elts * sizeof (caddr_t);
   if ('Q' == algo)
     {
-      specs.vs_block_elts = 1;
-      specs.vs_key_ofs = key_ofs;
-      specs.vs_sort_asc = sort_asc;
       GPF_T1("rowvector_qsort_int is not yet implemented");
       /*rowvector_qsort_int (vect, temp, vect_elems, 0, &specs); */
     }
@@ -4437,30 +4504,51 @@ bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args,
       int shift, offsets_count, itm_ctr, twobyte, max_twobyte;
       boxint minv = BOXINT_MAX, maxv = BOXINT_MIN;
       boxint key_val = 0;
-      src = (dsort_itm_t *) dk_alloc (vect_elems * sizeof (dsort_itm_t));
-      for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+      src = (dsort_itm_t *) dk_alloc (group_count * sizeof (dsort_itm_t));
+      for (itm_ctr = group_count; itm_ctr--; /* no step */)
         {
-          caddr_t *row = (caddr_t *)(vect[itm_ctr]);
-          caddr_t key = NULL;
-          dtp_t key_dtp = 0;
+          caddr_t *row = (caddr_t *)(vect[itm_ctr*block_elts + key_ofs]);
+          caddr_t key;
+          dtp_t key_dtp;
           if (DV_ARRAY_OF_POINTER != DV_TYPE_OF(row))
             {
-              dk_free ((void *)src, vect_elems * sizeof (dsort_itm_t));
-              sqlr_new_error ("22023", "SR572",
-	        "Function %s needs vector of vectors, "
-		"found a value type %s (%d); index of bad item in array is %d",
-		funname, dv_type_title (key_dtp), key_dtp, itm_ctr );
+              dk_free ((void *)src, group_count * sizeof (dsort_itm_t));
+              if (1 == block_elts)
+                sqlr_new_error ("22023", "SR572",
+                  "Function %s needs vector of vectors, "
+                  "found a value type %s (%d); index of bad item in array is %d",
+                  funname, dv_type_title (key_dtp), key_dtp, itm_ctr );
+              else
+                sqlr_new_error ("22023", "SR572",
+                  "Function %s needs vector of blocks with vectors in key positions, "
+                  "found a key type %s (%d) instead; index of bad item in array is %d = %d * %d + %d (block index * no of items per block + key offset)",
+                  funname, dv_type_title (key_dtp), key_dtp, itm_ctr*block_elts + key_ofs, itm_ctr, block_elts, key_ofs );
             }
-          if (BOX_ELEMENTS(row) <= key_ofs)
+          if (BOX_ELEMENTS(row) > key_item_inx)
             {
-              dk_free ((void *)src, vect_elems * sizeof (dsort_itm_t));
-              sqlr_new_error ("22023", "SR572",
-	        "Function %s needs vector of vectors, each item should be at least %d values long "
-		"found an item of length %ld; index of bad item in array is %d",
-		funname, key_ofs+1, (long)(BOX_ELEMENTS(row)), itm_ctr );
+              key = row[key_item_inx];
+              key_dtp = DV_TYPE_OF (key);
+            }
+          else if ('G' == algo)
+            {
+              key = NULL;
+              key_dtp = DV_LONG_INT;
+            }
+          else
+            {
+              dk_free ((void *)src, group_count * sizeof (dsort_itm_t));
+              if (1 == block_elts)
+                sqlr_new_error ("22023", "SR572",
+                  "Function %s needs vector of vectors, each item should be at least %d values long "
+                  "found an item of length %ld; index of bad item in array is %d",
+                  funname, key_item_inx+1, (long)(BOX_ELEMENTS(row)), itm_ctr );
+              else
+                sqlr_new_error ("22023", "SR572",
+                  "Function %s needs vector of blocks with vectors in key positions, each key vector should be at least %d values long "
+                  "found an item of length %ld; index of bad item in array is %d = %d * %d + %d (block index * no of items per block + key offset)",
+                  funname, key_item_inx+1, (long)(BOX_ELEMENTS(row)), itm_ctr*block_elts + key_ofs, itm_ctr, block_elts, key_ofs );
+              key = NULL; key_dtp = 0; /* to keep compiler happy */
             }
-          key = row[key_ofs];
-          key_dtp = DV_TYPE_OF (key);
           if (DV_LONG_INT == key_dtp)
             key_val = unbox (key);
           else if (DV_IRI_ID == key_dtp)
@@ -4485,11 +4573,17 @@ bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args,
             }
           else
             {
-              dk_free ((void *)src, vect_elems * sizeof (dsort_itm_t));
-              sqlr_new_error ("22023", "SR572",
-	        "Function %s needs IRI_IDs or integers as key elements of array, "
-		"not a value type %s (%d); index of bad item in array is %d",
-		funname, dv_type_title (key_dtp), key_dtp, itm_ctr );
+              dk_free ((void *)src, group_count * sizeof (dsort_itm_t));
+              if (1 == block_elts)
+                sqlr_new_error ("22023", "SR572",
+                  "Function %s needs IRI_IDs or integers as key elements of array, "
+                  "not a value type %s (%d); index of bad item in array is %d",
+                  funname, dv_type_title (key_dtp), key_dtp, itm_ctr );
+              else
+                sqlr_new_error ("22023", "SR572",
+                  "Function %s needs IRI_IDs or integers as key elements of array, "
+                  "not a value type %s (%d); index of bad item in array is %d = %d * %d + %d (block index * no of items per block + key offset)",
+                  funname, dv_type_title (key_dtp), key_dtp, itm_ctr*block_elts + key_ofs, itm_ctr, block_elts, key_ofs );
             }
           if (key_val < minv)
             minv = key_val;
@@ -4500,14 +4594,14 @@ bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args,
         }
       if ((maxv - minv) < 0L)
         {
-          dk_free ((void *)src, vect_elems * sizeof (dsort_itm_t));
+          dk_free ((void *)src, group_count * sizeof (dsort_itm_t));
           sqlr_new_error ("22023", "SR573",
-	    "Function %s has failed to sort array: the difference between greatest and smallest keys does not fit 63 bit range"
+            "Function %s has failed to sort array: the difference between greatest and smallest keys does not fit 63 bit range"
             /*"; consider using rowvector_sort()"*/, funname );
         }
       if (sort_asc)
         {
-          for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+          for (itm_ctr = group_count; itm_ctr--; /* no step */)
             {
               src[itm_ctr].di_key -= minv;
             }
@@ -4515,13 +4609,13 @@ bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args,
         }
       else
         {
-          for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+          for (itm_ctr = group_count; itm_ctr--; /* no step */)
             {
               src[itm_ctr].di_key = maxv - src[itm_ctr].di_key;
             }
           maxv = maxv - minv;
         }
-      tgt = (dsort_itm_t *) dk_alloc (vect_elems * sizeof (dsort_itm_t));
+      tgt = (dsort_itm_t *) dk_alloc (group_count * sizeof (dsort_itm_t));
       offsets_count = ((maxv >= 0x10000) ? 0x10000 : (maxv+1));
       offsets = (uint32 *) dk_alloc (offsets_count * sizeof (uint32));
       for (shift = 0; shift < 8 * sizeof (boxint); shift += 16)
@@ -4530,19 +4624,19 @@ bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args,
             break;
           max_twobyte = (((maxv >> shift) >= 0x10000L) ? 0x10000 : (int)((maxv >> shift)+1));
           memset (offsets, 0, max_twobyte * sizeof (uint32));
-          for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+          for (itm_ctr = group_count; itm_ctr--; /* no step */)
             {
               (offsets[(src[itm_ctr].di_key >> shift) & 0xffff])++;
             }
-          if (vect_elems == offsets[0])
+          if (group_count == offsets[0])
             continue; /* Special case to optimize sorting of array of IRI_IDs of bnodes and iri nodes */
           for (twobyte = 1; twobyte < max_twobyte; twobyte++)
             offsets [twobyte] += offsets [twobyte-1];
 #ifndef DEBUG
-          if (vect_elems != offsets [max_twobyte - 1])
+          if (group_count != offsets [max_twobyte - 1])
             GPF_T1 ("Bad offsets in rowvector_digit_sort()");
 #endif
-          for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+          for (itm_ctr = group_count; itm_ctr--; /* no step */)
             {
               int ofs = --(offsets[(src[itm_ctr].di_key >> shift) & 0xffff]);
               tgt[ofs] = src[itm_ctr];
@@ -4553,31 +4647,184 @@ bif_rowvector_sort_imp (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args,
         }
       vect_copy = (caddr_t *)dk_alloc (vect_elems * sizeof (caddr_t));
       memcpy (vect_copy, vect, vect_elems * sizeof (caddr_t));
-      for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+      if (1 == block_elts)
+        {
+          for (itm_ctr = vect_elems; itm_ctr--; /* no step */)
+            vect[itm_ctr] = vect_copy[src[itm_ctr].di_pos];
+        }
+      else
         {
-          vect[itm_ctr] = vect_copy[src[itm_ctr].di_pos];
+          for (itm_ctr = group_count; itm_ctr--; /* no step */)
+            VECTOR_SORT_COPY (vect + itm_ctr * block_elts, vect_copy + src[itm_ctr].di_pos * block_elts, &specs);
         }
 #ifndef NDEBUG
       dk_check_tree (vect);
 #endif
-      dk_free (src, vect_elems * sizeof (dsort_itm_t));
-      dk_free (tgt, vect_elems * sizeof (dsort_itm_t));
+      dk_free (src, group_count * sizeof (dsort_itm_t));
+      dk_free (tgt, group_count * sizeof (dsort_itm_t));
       dk_free (offsets, offsets_count * sizeof (uint32));
       dk_free (vect_copy, vect_elems * sizeof (caddr_t));
     }
-  return box_num (vect_elems);
+  return box_num (group_count);
 }
 
 caddr_t
 bif_rowvector_digit_sort (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  return bif_rowvector_sort_imp (qst, err_ret, args, "rowvector_digit_sort", 'D');
+  int sort_asc = bif_long_range_arg (qst, args, 2, "rowvector_digit_sort", 0, 1);
+  return bif_rowvector_sort_imp (qst, err_ret, args, "rowvector_digit_sort", 'D', 1, 0, sort_asc);
+}
+
+caddr_t
+bif_rowvector_graph_sort (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  int sort_asc = bif_long_range_arg (qst, args, 2, "rowvector_graph_sort", 0, 1);
+  return bif_rowvector_sort_imp (qst, err_ret, args, "rowvector_graph_sort", 'G', 1, 0, sort_asc);
 }
 
 caddr_t
 bif_rowvector_subj_sort (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
 {
-  return bif_rowvector_sort_imp (qst, err_ret, args, "rowvector_subj_sort", 'S');
+  int sort_asc = bif_long_range_arg (qst, args, 2, "rowvector_subj_sort", 0, 1);
+  return bif_rowvector_sort_imp (qst, err_ret, args, "rowvector_subj_sort", 'S', 1, 0, sort_asc);
+}
+
+caddr_t
+bif_rowgvector_subj_sort (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  int block_elts = bif_long_range_arg (qst, args, 2, "rowgvector_subj_sort", 1, 1024);
+  int key_ofs = bif_long_range_arg (qst, args, 3, "rowgvector_subj_sort", 0, 1024);
+  int sort_asc = bif_long_range_arg (qst, args, 4, "rowgvector_subj_sort", 0, 1);
+  return bif_rowvector_sort_imp (qst, err_ret, args, "rowgvector_subj_sort", 'S', block_elts, key_ofs, sort_asc);
+}
+
+caddr_t
+bif_rowvector_graph_partition (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args)
+{
+  const char *funname = "rowvector_graph_partition";
+  const int block_elts = 1;
+  const int key_ofs = 0;
+  caddr_t **vect = (caddr_t **)bif_array_arg (qst, args, 0, funname);
+  int vect_elems = BOX_ELEMENTS (vect);
+  int key_item_inx = bif_long_range_arg (qst, args, 1, funname, 0, 1024);
+  int group_count, itm_ctr;
+  int partition_ctr = 0, partition_count = 0;
+  int prev_g_dtp = 1;
+  int start_itm_ctr = 0;
+  caddr_t prev_g = NULL;
+  caddr_t **res;
+  vector_sort_t specs;
+#if 0
+  if (block_elts <= 0)
+    sqlr_new_error ("22023", "SR488", "Number of elements in block should be positive integer in call of %s()", funname);
+  if (block_elts > MAX_VECTOR_BSORT_BLOCK)
+    sqlr_new_error ("22023", "SR488", "Number of elements in block is greater than maximum block length %d supported by %s()", MAX_VECTOR_BSORT_BLOCK, funname);
+  if (vect_elems % block_elts != 0)
+    sqlr_new_error ("22023", "SR489", "In call of %s(), length of vector in argument #1 is not a whole multiple of number of elements in block", funname);
+  if ((0 > key_ofs) || (key_ofs >= block_elts))
+    sqlr_new_error ("22023", "SR490", "In call of %s(), offset of key in block should be nonnegative integer that is less than number of elements in block", funname);
+#endif
+  group_count = vect_elems / block_elts;
+  if (0 >= group_count)
+    return dk_alloc_box (0, DV_ARRAY_OF_POINTER);
+  for (itm_ctr = 0; itm_ctr < group_count; itm_ctr++)
+    {
+      caddr_t *row = vect[itm_ctr * block_elts + key_ofs];
+      caddr_t key;
+      dtp_t key_dtp;
+      if (DV_ARRAY_OF_POINTER != DV_TYPE_OF(row))
+        {
+          if (1 == block_elts)
+            sqlr_new_error ("22023", "SR572",
+              "Function %s needs vector of vectors, "
+              "found a value type %s (%d); index of bad item in array is %d",
+              funname, dv_type_title (key_dtp), key_dtp, itm_ctr );
+          else
+            sqlr_new_error ("22023", "SR572",
+              "Function %s needs vector of blocks with vectors in key positions, "
+              "found a key type %s (%d) instead; index of bad item in array is %d = %d * %d + %d (block index * no of items per block + key offset)",
+              funname, dv_type_title (key_dtp), key_dtp, itm_ctr*block_elts + key_ofs, itm_ctr, block_elts, key_ofs );
+        }
+      if (BOX_ELEMENTS(row) > key_item_inx)
+        {
+          key = row[key_item_inx];
+          key_dtp = DV_TYPE_OF (key);
+        }
+      else
+        {
+          key = NULL;
+          key_dtp = 0;
+        }
+      if (key_dtp == prev_g_dtp)
+        {
+          switch (key_dtp)
+            {
+              case 0: continue;
+              case DV_LONG_INT: if (unbox (key) == unbox (prev_g)) continue; break;
+              case DV_IRI_ID: if (unbox_iri_id (key) == unbox_iri_id (prev_g)) continue; break;
+              case DV_STRING: case DV_UNAME: if ((box_length (key) == box_length (prev_g)) && !memcmp (key, prev_g, box_length (key)-1)) continue; break;
+              default:
+                sqlr_new_error ("22023", "SR572",
+                 "Function %s needs IRI_IDs or integers or strings as key elements of array, "
+                 "not a value type %s (%d); position of bad key in array is %d",
+                 funname, dv_type_title (key_dtp), key_dtp, itm_ctr * block_elts + key_ofs );
+            }
+        }
+      partition_count++;
+      prev_g = key;
+      prev_g_dtp = key_dtp;
+    }
+  prev_g_dtp = 1;
+  res = (caddr_t **)dk_alloc_box_zero (partition_count * sizeof (caddr_t), DV_ARRAY_OF_POINTER);
+  for (itm_ctr = 0; itm_ctr < group_count; itm_ctr++)
+    {
+      caddr_t *row = vect[itm_ctr * block_elts + key_ofs];
+      caddr_t key;
+      dtp_t key_dtp;
+      if (BOX_ELEMENTS(row) > key_item_inx)
+        {
+          key = row[key_item_inx];
+          key_dtp = DV_TYPE_OF (key);
+        }
+      else
+        {
+          key = NULL;
+          key_dtp = 0;
+        }
+      if (key_dtp == prev_g_dtp)
+        {
+          switch (key_dtp)
+            {
+              case 0: continue;
+              case DV_LONG_INT: if (unbox (key) == unbox (prev_g)) continue; break;
+              case DV_IRI_ID: if (unbox_iri_id (key) == unbox_iri_id (prev_g)) continue; break;
+              case DV_STRING: case DV_UNAME: if ((box_length (key) == box_length (prev_g)) && !memcmp (key, prev_g, box_length (key)-1)) continue; break;
+              default: break;
+            }
+        }
+      if (itm_ctr)
+        {
+          size_t cut_size = (itm_ctr - start_itm_ctr) * block_elts * sizeof (caddr_t);
+          caddr_t **src_start = vect + (start_itm_ctr * block_elts);
+          caddr_t *cut = (caddr_t *)dk_alloc_box (cut_size, DV_ARRAY_OF_POINTER);
+          memcpy (cut, src_start, cut_size);
+          memset (src_start, 0, cut_size);
+          res[partition_ctr++] = cut;
+        }
+      start_itm_ctr = itm_ctr;
+      prev_g = key;
+      prev_g_dtp = key_dtp;
+    }
+  if (start_itm_ctr < group_count)
+    {
+      size_t cut_size = (itm_ctr - start_itm_ctr) * block_elts * sizeof (caddr_t);
+      caddr_t **src_start = vect + (start_itm_ctr * block_elts);
+      caddr_t *cut = (caddr_t *)dk_alloc_box (cut_size, DV_ARRAY_OF_POINTER);
+      memcpy (cut, src_start, cut_size);
+      memset (src_start, 0, cut_size);
+      res[partition_ctr++] = cut;
+    }
+  return (caddr_t)res;
 }
 
 void
@@ -4823,6 +5070,7 @@ xslt_init (void)
   bif_define ("dict_remove", bif_dict_remove);
   bif_define ("dict_inc_or_put", bif_dict_inc_or_put);
   bif_define ("dict_dec_or_remove", bif_dict_dec_or_remove);
+  bif_define ("dict_bitor_or_put", bif_dict_bitor_or_put);
   bif_define ("dict_size", bif_dict_size);
   bif_define ("dict_list_keys", bif_dict_list_keys);
   bif_define ("dict_destructive_list_rnd_keys", bif_dict_destructive_list_rnd_keys);
@@ -4836,5 +5084,8 @@ xslt_init (void)
   bif_define ("gvector_digit_sort", bif_gvector_digit_sort);
   bif_define ("rowvector_digit_sort", bif_rowvector_digit_sort);
   bif_define ("rowvector_subj_sort", bif_rowvector_subj_sort);
+  bif_define ("rowvector_graph_sort", bif_rowvector_graph_sort);
+  bif_define ("rowgvector_subj_sort", bif_rowgvector_subj_sort);
+  bif_define ("rowvector_graph_partition", bif_rowvector_graph_partition);
 }
 
diff --git a/libsrc/Wi/xslt_fmt.c b/libsrc/Wi/xslt_fmt.c
index 8c344b4..66bfbb7 100644
--- a/libsrc/Wi/xslt_fmt.c
+++ b/libsrc/Wi/xslt_fmt.c
@@ -1,14 +1,14 @@
 /*
  *  xslt_fmt.c
  *
- *  $Id: xslt_fmt.c,v 1.2.2.2 2010/09/17 11:18:20 source Exp $
+ *  $Id: xslt_fmt.c,v 1.2.2.3 2012/03/08 12:55:38 source Exp $
  *
  *  XSLT formatting routines
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xslt_impl.h b/libsrc/Wi/xslt_impl.h
index 6f5c8f5..55da9b1 100644
--- a/libsrc/Wi/xslt_impl.h
+++ b/libsrc/Wi/xslt_impl.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: xslt_impl.h,v 1.3.2.5 2010/09/17 22:49:26 source Exp $
+ *  $Id: xslt_impl.h,v 1.3.2.6 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2009 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Wi/xslt_opt.c b/libsrc/Wi/xslt_opt.c
index 7b94fea..8a0f88a 100644
--- a/libsrc/Wi/xslt_opt.c
+++ b/libsrc/Wi/xslt_opt.c
@@ -1,14 +1,14 @@
 /*
  *  xslt.c
  *
- *  $Id: xslt_opt.c,v 1.9.2.6 2011/01/18 10:32:06 source Exp $
+ *  $Id: xslt_opt.c,v 1.9.2.7 2012/03/08 12:55:38 source Exp $
  *
  *  XSLT translator
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/Makefile.am b/libsrc/Xml.new/Makefile.am
index 2100742..90b60ee 100644
--- a/libsrc/Xml.new/Makefile.am
+++ b/libsrc/Xml.new/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/Makefile.in b/libsrc/Xml.new/Makefile.in
index 7895735..ffa7cb4 100644
--- a/libsrc/Xml.new/Makefile.in
+++ b/libsrc/Xml.new/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -129,6 +129,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -177,6 +178,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -228,6 +230,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -274,7 +277,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/Xml.new/charclasses.c b/libsrc/Xml.new/charclasses.c
index ff6b4b8..0ce766c 100644
--- a/libsrc/Xml.new/charclasses.c
+++ b/libsrc/Xml.new/charclasses.c
@@ -1,12 +1,12 @@
 /*
  *  charclasses.c
  *
- *  $Id: charclasses.c,v 1.2 2009/04/09 19:09:34 source Exp $
+ *  $Id: charclasses.c,v 1.2.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/charclasses.h b/libsrc/Xml.new/charclasses.h
index 890215c..4a35407 100644
--- a/libsrc/Xml.new/charclasses.h
+++ b/libsrc/Xml.new/charclasses.h
@@ -1,12 +1,12 @@
 /*
  *  charclasses.h
  *
- *  $Id: charclasses.h,v 1.2 2009/04/09 19:09:34 source Exp $
+ *  $Id: charclasses.h,v 1.2.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/datatypes.c b/libsrc/Xml.new/datatypes.c
index 40a5297..7d72928 100644
--- a/libsrc/Xml.new/datatypes.c
+++ b/libsrc/Xml.new/datatypes.c
@@ -1,12 +1,12 @@
 /*
  *  datatypes.c
  *
- *  $Id: datatypes.c,v 1.3 2009/04/09 19:09:34 source Exp $
+ *  $Id: datatypes.c,v 1.3.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/dtd.c b/libsrc/Xml.new/dtd.c
index 1f9e915..6ffc04a 100644
--- a/libsrc/Xml.new/dtd.c
+++ b/libsrc/Xml.new/dtd.c
@@ -1,12 +1,12 @@
 /*
  *  dtd.c
  *
- *  $Id: dtd.c,v 1.3.2.2 2010/05/12 22:47:38 source Exp $
+ *  $Id: dtd.c,v 1.3.2.4 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -647,7 +647,7 @@ dtd_normalize_attr_val (vxml_parser_t* parser, const char* value, int level)
 	    unichar c = dtd_char_ref (parser, tmp_buf.lm_memblock + (i + 1), tmp_buf.lm_length - (i + 1));
 	    if (c >= 0)
 	      {
-		while (';' != tmp_buf.lm_memblock[++i]) {}
+		while (';' != tmp_buf.lm_memblock[++i] && (i < tmp_buf.lm_length)) {}
 /* Trick! The fact is used that &..; notation is longer than UTF8 encoding for all standard charrefs,
 thus the length of output is no larger than the length if input. */
 		buf_tail = eh_encode_char__UTF8 (c, buf_tail, buf_tail+MAX_UTF8_CHAR /* no need to pass the handler here */);
@@ -1223,6 +1223,8 @@ thus the length of output is no larger than the length if input. */
 	}
 
     }
+  if ((NULL != parser->inner_tag) && (NULL != parser->inner_tag->ot_descr) && parser->inner_tag->ot_descr->htmltd_is_script)
+    return 0;
   if (log_syntax_error)
     xmlparser_logprintf (parser, XCFG_FATAL, ECM_MESSAGE_LEN, "Invalid reference"); /* unexpected input */
   return 0;
diff --git a/libsrc/Xml.new/html_mode.c b/libsrc/Xml.new/html_mode.c
index 25fec6a..226a330 100644
--- a/libsrc/Xml.new/html_mode.c
+++ b/libsrc/Xml.new/html_mode.c
@@ -1,12 +1,12 @@
 /*
  *  html_mode.c
  *
- *  $Id: html_mode.c,v 1.3 2009/04/09 19:09:34 source Exp $
+ *  $Id: html_mode.c,v 1.3.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/html_mode.h b/libsrc/Xml.new/html_mode.h
index f1e8d89..83babc4 100644
--- a/libsrc/Xml.new/html_mode.h
+++ b/libsrc/Xml.new/html_mode.h
@@ -3,12 +3,12 @@
  *
  *  HTML 4.01 processing
  *
- *  $Id: html_mode.h,v 1.2 2009/04/09 19:09:34 source Exp $
+ *  $Id: html_mode.h,v 1.2.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/schema.c b/libsrc/Xml.new/schema.c
index 55bd6a0..38cb201 100644
--- a/libsrc/Xml.new/schema.c
+++ b/libsrc/Xml.new/schema.c
@@ -1,12 +1,12 @@
 /*
  *  schema.c
  *
- *  $Id: schema.c,v 1.4 2009/04/09 19:09:34 source Exp $
+ *  $Id: schema.c,v 1.4.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/schema.h b/libsrc/Xml.new/schema.h
index 8372606..0d40f70 100644
--- a/libsrc/Xml.new/schema.h
+++ b/libsrc/Xml.new/schema.h
@@ -1,12 +1,12 @@
 /*
  *  schema.h
  *
- *  $Id: schema.h,v 1.3 2009/04/09 19:09:34 source Exp $
+ *  $Id: schema.h,v 1.3.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/schema_ecm.h b/libsrc/Xml.new/schema_ecm.h
index 34004c4..19b80b6 100644
--- a/libsrc/Xml.new/schema_ecm.h
+++ b/libsrc/Xml.new/schema_ecm.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/schema_fsm.c b/libsrc/Xml.new/schema_fsm.c
index 1f7643e..d7799cd 100644
--- a/libsrc/Xml.new/schema_fsm.c
+++ b/libsrc/Xml.new/schema_fsm.c
@@ -1,12 +1,12 @@
 /*
  *  schema_fsm.c
  *
- *  $Id: schema_fsm.c,v 1.4 2009/04/09 19:09:34 source Exp $
+ *  $Id: schema_fsm.c,v 1.4.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/test.c b/libsrc/Xml.new/test.c
index 2091f1f..a3efaed 100644
--- a/libsrc/Xml.new/test.c
+++ b/libsrc/Xml.new/test.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/tst.c b/libsrc/Xml.new/tst.c
index 3a357ca..2375dae 100644
--- a/libsrc/Xml.new/tst.c
+++ b/libsrc/Xml.new/tst.c
@@ -1,12 +1,12 @@
 /*
  *  tst.c
  *
- *  $Id: tst.c,v 1.2 2009/04/09 19:09:34 source Exp $
+ *  $Id: tst.c,v 1.2.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xml_ecm.c b/libsrc/Xml.new/xml_ecm.c
index 32978be..20e316c 100644
--- a/libsrc/Xml.new/xml_ecm.c
+++ b/libsrc/Xml.new/xml_ecm.c
@@ -1,12 +1,12 @@
 /*
  *  xml_ecm.c
  *
- *  $Id: xml_ecm.c,v 1.7.2.1 2010/01/28 00:38:14 source Exp $
+ *  $Id: xml_ecm.c,v 1.7.2.2 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xml_ecm.h b/libsrc/Xml.new/xml_ecm.h
index 344cc64..5804a8e 100644
--- a/libsrc/Xml.new/xml_ecm.h
+++ b/libsrc/Xml.new/xml_ecm.h
@@ -1,12 +1,12 @@
 /*
  *  xml_ecm.h
  *
- *  $Id: xml_ecm.h,v 1.6 2009/04/09 19:09:34 source Exp $
+ *  $Id: xml_ecm.h,v 1.6.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xml_ecm_test.c b/libsrc/Xml.new/xml_ecm_test.c
index d473ef8..00c8999 100644
--- a/libsrc/Xml.new/xml_ecm_test.c
+++ b/libsrc/Xml.new/xml_ecm_test.c
@@ -1,12 +1,12 @@
 /*
  *  xml_ecm_test.c
  *
- *  $Id: xml_ecm_test.c,v 1.2 2009/04/09 19:09:34 source Exp $
+ *  $Id: xml_ecm_test.c,v 1.2.2.1 2012/03/08 12:55:38 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xmlgram.c b/libsrc/Xml.new/xmlgram.c
index 897e51b..15ca6f5 100644
--- a/libsrc/Xml.new/xmlgram.c
+++ b/libsrc/Xml.new/xmlgram.c
@@ -1,12 +1,12 @@
 /*
  *  xmlgram.c
  *
- *  $Id: xmlgram.c,v 1.3 2009/04/09 19:09:34 source Exp $
+ *  $Id: xmlgram.c,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xmlparser.c b/libsrc/Xml.new/xmlparser.c
index b08576a..42b953b 100644
--- a/libsrc/Xml.new/xmlparser.c
+++ b/libsrc/Xml.new/xmlparser.c
@@ -1,12 +1,12 @@
 /*
  *  xmlparser.c
  *
- *  $Id: xmlparser.c,v 1.5.2.3 2011/03/08 11:52:56 source Exp $
+ *  $Id: xmlparser.c,v 1.5.2.4 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xmlparser.h b/libsrc/Xml.new/xmlparser.h
index 567ba85..ed7994e 100644
--- a/libsrc/Xml.new/xmlparser.h
+++ b/libsrc/Xml.new/xmlparser.h
@@ -1,12 +1,12 @@
 /*
  *  xmlparser.h
  *
- *  $Id: xmlparser.h,v 1.9.2.2 2011/03/08 11:52:56 source Exp $
+ *  $Id: xmlparser.h,v 1.9.2.4 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -401,7 +401,7 @@ typedef struct rdf1808_split_s {
 
 extern void rfc1808_parse_uri (const char *iri, rdf1808_split_t *split_ret);
 extern void rfc1808_parse_wide_uri (const wchar_t *iri, rdf1808_split_t *split_ret);
-extern caddr_t rfc1808_expand_uri (/*query_instance_t *qi,*/ ccaddr_t base_uri, ccaddr_t rel_uri,
+extern caddr_t rfc1808_expand_uri (ccaddr_t base_uri, ccaddr_t rel_uri,
   ccaddr_t output_cs_name, int do_resolve_like_http_get,
   ccaddr_t base_string_cs_name, /* Encoding used for base_uri IFF it is a narrow string, neither DV_UNAME nor WIDE */
   ccaddr_t rel_string_cs_name, /* Encoding used for rel_uri IFF it is a narrow string, neither DV_UNAME nor WIDE */
diff --git a/libsrc/Xml.new/xmlparser_impl.h b/libsrc/Xml.new/xmlparser_impl.h
index 5e10b91..905e7ae 100644
--- a/libsrc/Xml.new/xmlparser_impl.h
+++ b/libsrc/Xml.new/xmlparser_impl.h
@@ -1,12 +1,12 @@
 /*
  *  xmlparser_impl.h
  *
- *  $Id: xmlparser_impl.h,v 1.8.2.2 2011/03/08 11:52:56 source Exp $
+ *  $Id: xmlparser_impl.h,v 1.8.2.3 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/Xml.new/xmlread.c b/libsrc/Xml.new/xmlread.c
index 51316b0..1c8dbbd 100644
--- a/libsrc/Xml.new/xmlread.c
+++ b/libsrc/Xml.new/xmlread.c
@@ -1,12 +1,12 @@
 /*
  *  xmlread.c
  *
- *  $Id: xmlread.c,v 1.13.2.4 2011/03/08 11:52:57 source Exp $
+ *  $Id: xmlread.c,v 1.13.2.5 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/Makefile.am b/libsrc/langfunc/Makefile.am
index 9be36d6..a18260d 100644
--- a/libsrc/langfunc/Makefile.am
+++ b/libsrc/langfunc/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/Makefile.in b/libsrc/langfunc/Makefile.in
index c2a9986..bb99796 100644
--- a/libsrc/langfunc/Makefile.in
+++ b/libsrc/langfunc/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -133,6 +133,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -181,6 +182,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -232,6 +234,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -278,7 +281,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/langfunc/encoding_basic.c b/libsrc/langfunc/encoding_basic.c
index 6c507f7..d1d1973 100644
--- a/libsrc/langfunc/encoding_basic.c
+++ b/libsrc/langfunc/encoding_basic.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/encoding_charsets.c b/libsrc/langfunc/encoding_charsets.c
index aa079b9..e18ccf6 100644
--- a/libsrc/langfunc/encoding_charsets.c
+++ b/libsrc/langfunc/encoding_charsets.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/encoding_ucm.c b/libsrc/langfunc/encoding_ucm.c
index 9312bcf..bd9e740 100644
--- a/libsrc/langfunc/encoding_ucm.c
+++ b/libsrc/langfunc/encoding_ucm.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/encoding_wide.c b/libsrc/langfunc/encoding_wide.c
index ea5d919..e76d066 100644
--- a/libsrc/langfunc/encoding_wide.c
+++ b/libsrc/langfunc/encoding_wide.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/lang25.c b/libsrc/langfunc/lang25.c
index acf1177..476d748 100644
--- a/libsrc/langfunc/lang25.c
+++ b/libsrc/langfunc/lang25.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/langfunc.c b/libsrc/langfunc/langfunc.c
index f83142d..96d114b 100644
--- a/libsrc/langfunc/langfunc.c
+++ b/libsrc/langfunc/langfunc.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/langfunc.h b/libsrc/langfunc/langfunc.h
index c9b7dde..36722c0 100644
--- a/libsrc/langfunc/langfunc.h
+++ b/libsrc/langfunc/langfunc.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -112,12 +112,16 @@ struct encoding_handler_s;	/* see below */
 struct lang_handler_s;		/* see below */
 struct encodedlang_handler_s;	/* see below */
 
+#ifndef UTF8CHAR_DEFINED
+#define UTF8CHAR_DEFINED
+typedef unsigned char utf8char;			/*!< 8-bit chars of UTF-8 strings */
+#endif
+
 #ifndef UNICHAR_DEFINED
 #define UNICHAR_DEFINED
 typedef int unichar;				/*!< 31-bit unicode values, negative ones are invalid */
 #endif
 
-typedef unsigned char utf8char;			/*!< 8-bit chars of UTF-8 strings */
 #define UNICHAR_EOD		((unichar)(-2))	/*!< End of source buffer reached, no data to convert */
 #define UNICHAR_NO_DATA		((unichar)(-3))	/*!< Source buffer is too short, but nonempty (contains part of a char) */
 #define UNICHAR_NO_ROOM		((unichar)(-4))	/*!< Target buffer is too short */
diff --git a/libsrc/langfunc/langfunc_templ.c b/libsrc/langfunc/langfunc_templ.c
index 141d39b..05be81d 100644
--- a/libsrc/langfunc/langfunc_templ.c
+++ b/libsrc/langfunc/langfunc_templ.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/langman.c b/libsrc/langfunc/langman.c
index 95b990f..a881483 100644
--- a/libsrc/langfunc/langman.c
+++ b/libsrc/langfunc/langman.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/language__en_UK.c b/libsrc/langfunc/language__en_UK.c
index 8ced98c..ca766cb 100644
--- a/libsrc/langfunc/language__en_UK.c
+++ b/libsrc/langfunc/language__en_UK.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/language__en_US.c b/libsrc/langfunc/language__en_US.c
index 990674e..ca84b4e 100644
--- a/libsrc/langfunc/language__en_US.c
+++ b/libsrc/langfunc/language__en_US.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/language__ru_RU.c b/libsrc/langfunc/language__ru_RU.c
index 8c93be3..196d117 100644
--- a/libsrc/langfunc/language__ru_RU.c
+++ b/libsrc/langfunc/language__ru_RU.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/language__x_ViAny.c b/libsrc/langfunc/language__x_ViAny.c
index 4468736..63c0fca 100644
--- a/libsrc/langfunc/language__x_ViAny.c
+++ b/libsrc/langfunc/language__x_ViAny.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: language__x_ViAny.c,v 1.1.2.1 2009/08/09 00:09:06 source Exp $
+ *  $Id: language__x_ViAny.c,v 1.1.2.2 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2008 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/language__x_ViDoc.c b/libsrc/langfunc/language__x_ViDoc.c
index 74a9a13..b03dc3b 100644
--- a/libsrc/langfunc/language__x_ViDoc.c
+++ b/libsrc/langfunc/language__x_ViDoc.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/ucm.h b/libsrc/langfunc/ucm.h
index 14853ca..aff3e12 100644
--- a/libsrc/langfunc/ucm.h
+++ b/libsrc/langfunc/ucm.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/ucm2enc.c b/libsrc/langfunc/ucm2enc.c
index d51cda3..783dbaa 100644
--- a/libsrc/langfunc/ucm2enc.c
+++ b/libsrc/langfunc/ucm2enc.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicode3.c b/libsrc/langfunc/unicode3.c
index b9105da..e6f2ddb 100644
--- a/libsrc/langfunc/unicode3.c
+++ b/libsrc/langfunc/unicode3.c
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicode3_all_chars.h b/libsrc/langfunc/unicode3_all_chars.h
index 4ec8214..628e9b5 100644
--- a/libsrc/langfunc/unicode3_all_chars.h
+++ b/libsrc/langfunc/unicode3_all_chars.h
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicode3_basechars.h b/libsrc/langfunc/unicode3_basechars.h
index 2639a98..f5150fa 100644
--- a/libsrc/langfunc/unicode3_basechars.h
+++ b/libsrc/langfunc/unicode3_basechars.h
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicode3_lowers.h b/libsrc/langfunc/unicode3_lowers.h
index 73a46ad..4fb38fc 100644
--- a/libsrc/langfunc/unicode3_lowers.h
+++ b/libsrc/langfunc/unicode3_lowers.h
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicode3_spaces.h b/libsrc/langfunc/unicode3_spaces.h
index 6be1ff9..23dd91e 100644
--- a/libsrc/langfunc/unicode3_spaces.h
+++ b/libsrc/langfunc/unicode3_spaces.h
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicode3_uppers.h b/libsrc/langfunc/unicode3_uppers.h
index 0ace8da..74ae9b4 100644
--- a/libsrc/langfunc/unicode3_uppers.h
+++ b/libsrc/langfunc/unicode3_uppers.h
@@ -4,7 +4,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/langfunc/unicodetab2h.sh b/libsrc/langfunc/unicodetab2h.sh
index 8ac453a..95e1227 100755
--- a/libsrc/langfunc/unicodetab2h.sh
+++ b/libsrc/langfunc/unicodetab2h.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #  
-#  $Id: unicodetab2h.sh,v 1.3.2.1 2011/01/18 14:36:37 source Exp $
+#  $Id: unicodetab2h.sh,v 1.3.2.2 2012/03/08 12:55:39 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -71,7 +71,7 @@ cat > $2 <<-EOF
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/libutil.h b/libsrc/libutil.h
index ba29432..ce2e5ab 100644
--- a/libsrc/libutil.h
+++ b/libsrc/libutil.h
@@ -1,12 +1,12 @@
 /*
  *  libutil.h
  *
- *  $Id: libutil.h,v 1.4 2007/07/18 12:33:29 source Exp $
+ *  $Id: libutil.h,v 1.4.2.1 2012/03/08 12:55:30 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/odbcsdk/Makefile.am b/libsrc/odbcsdk/Makefile.am
index 51dd68a..af68e21 100644
--- a/libsrc/odbcsdk/Makefile.am
+++ b/libsrc/odbcsdk/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/odbcsdk/Makefile.in b/libsrc/odbcsdk/Makefile.in
index cd159cc..edf54ca 100644
--- a/libsrc/odbcsdk/Makefile.in
+++ b/libsrc/odbcsdk/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -99,6 +99,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -147,6 +148,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -198,6 +200,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -244,7 +247,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/odbcsdk/include/iodbcext.h b/libsrc/odbcsdk/include/iodbcext.h
index 6d4e93e..ee9a484 100644
--- a/libsrc/odbcsdk/include/iodbcext.h
+++ b/libsrc/odbcsdk/include/iodbcext.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -23,7 +23,7 @@
 /*
  *  iodbcext.h
  *
- *  $Id: iodbcext.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: iodbcext.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  iODBC extensions and changes to the SAG specifications
  *  for third party drivers
diff --git a/libsrc/odbcsdk/include/iodbcinst.h b/libsrc/odbcsdk/include/iodbcinst.h
index bcef411..2d06e56 100644
--- a/libsrc/odbcsdk/include/iodbcinst.h
+++ b/libsrc/odbcsdk/include/iodbcinst.h
@@ -1,14 +1,14 @@
 /*
  *  iodbcinst.h
  *
- *  $Id: iodbcinst.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: iodbcinst.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  iODBC Installer defines
  *
  *  The iODBC driver manager.
  *  
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com> 
- *  Copyright (C) 1996-2005 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/iodbcunix.h b/libsrc/odbcsdk/include/iodbcunix.h
index 957007d..8add6c9 100644
--- a/libsrc/odbcsdk/include/iodbcunix.h
+++ b/libsrc/odbcsdk/include/iodbcunix.h
@@ -1,14 +1,14 @@
 /*
  *  iodbcunix.h
  *
- *  $Id: iodbcunix.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: iodbcunix.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  ODBC defines for Unix
  *
  *  The iODBC driver manager.
  *
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com>
- *  Copyright (C) 1996-2004 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/isql.h b/libsrc/odbcsdk/include/isql.h
index 0d3ee39..9423708 100644
--- a/libsrc/odbcsdk/include/isql.h
+++ b/libsrc/odbcsdk/include/isql.h
@@ -1,14 +1,14 @@
 /*
  *  isql.h
  *
- *  $Id: isql.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: isql.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  iODBC defines
  *
  *  The iODBC driver manager.
  *  
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com> 
- *  Copyright (C) 1996-2002 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/isqlext.h b/libsrc/odbcsdk/include/isqlext.h
index 2249dbc..0f758ac 100644
--- a/libsrc/odbcsdk/include/isqlext.h
+++ b/libsrc/odbcsdk/include/isqlext.h
@@ -1,14 +1,14 @@
 /*
  *  isqlext.h
  *
- *  $Id: isqlext.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: isqlext.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  iODBC defines (ext)
  *
  *  The iODBC driver manager.
  *  
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com> 
- *  Copyright (C) 1996-2002 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/isqltypes.h b/libsrc/odbcsdk/include/isqltypes.h
index 4858ee0..c0e1b5e 100644
--- a/libsrc/odbcsdk/include/isqltypes.h
+++ b/libsrc/odbcsdk/include/isqltypes.h
@@ -1,14 +1,14 @@
 /*
  *  isqltypes.h
  *
- *  $Id: isqltypes.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: isqltypes.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  iODBC typedefs
  *
  *  The iODBC driver manager.
  *  
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com> 
- *  Copyright (C) 1996-2002 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/odbcinst.h b/libsrc/odbcsdk/include/odbcinst.h
index 4bae7bc..13adf23 100644
--- a/libsrc/odbcsdk/include/odbcinst.h
+++ b/libsrc/odbcsdk/include/odbcinst.h
@@ -1,13 +1,13 @@
 /*
  *  odbcinst.h
  *
- *  $Id: odbcinst.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: odbcinst.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  iODBC Installer defines
  *
  *  The iODBC driver manager.
  *  
- *  Copyright (C) 1999-2005 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1999-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/sql.h b/libsrc/odbcsdk/include/sql.h
index 7900013..63cccf0 100644
--- a/libsrc/odbcsdk/include/sql.h
+++ b/libsrc/odbcsdk/include/sql.h
@@ -1,14 +1,14 @@
 /*
  *  sql.h
  *
- *  $Id: sql.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: sql.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  ODBC defines
  *
  *  The iODBC driver manager.
  *  
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com> 
- *  Copyright (C) 1996-2002 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/sqlext.h b/libsrc/odbcsdk/include/sqlext.h
index 658f969..99e7114 100644
--- a/libsrc/odbcsdk/include/sqlext.h
+++ b/libsrc/odbcsdk/include/sqlext.h
@@ -1,14 +1,14 @@
 /*
  *  sqlext.h
  *
- *  $Id: sqlext.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: sqlext.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  ODBC defines (ext)
  *
  *  The iODBC driver manager.
  *  
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com> 
- *  Copyright (C) 1996-2002 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/sqltypes.h b/libsrc/odbcsdk/include/sqltypes.h
index 5c50630..192d212 100644
--- a/libsrc/odbcsdk/include/sqltypes.h
+++ b/libsrc/odbcsdk/include/sqltypes.h
@@ -1,14 +1,14 @@
 /*
  *  sqltypes.h
  *
- *  $Id: sqltypes.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: sqltypes.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  ODBC typedefs
  *
  *  The iODBC driver manager.
  *
  *  Copyright (C) 1995 by Ke Jin <kejin at empress.com>
- *  Copyright (C) 1996-2003 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/odbcsdk/include/sqlucode.h b/libsrc/odbcsdk/include/sqlucode.h
index 50179ab..c722140 100644
--- a/libsrc/odbcsdk/include/sqlucode.h
+++ b/libsrc/odbcsdk/include/sqlucode.h
@@ -1,13 +1,13 @@
 /*
  *  sqlucode.h
  *
- *  $Id: sqlucode.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: sqlucode.h,v 1.1.1.1.2.1 2012/03/08 13:13:48 source Exp $
  *
  *  ODBC Unicode defines
  *
  *  The iODBC driver manager.
  *
- *  Copyright (C) 1996-2003 by OpenLink Software <iodbc at openlinksw.com>
+ *  Copyright (C) 1996-2012 OpenLink Software <iodbc at openlinksw.com>
  *  All Rights Reserved.
  *
  *  This software is released under the terms of either of the following
diff --git a/libsrc/plugin/Makefile.am b/libsrc/plugin/Makefile.am
index 839623b..39a431b 100644
--- a/libsrc/plugin/Makefile.am
+++ b/libsrc/plugin/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/Makefile.in b/libsrc/plugin/Makefile.in
index 9390652..6a2f5f2 100644
--- a/libsrc/plugin/Makefile.in
+++ b/libsrc/plugin/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -144,6 +144,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -192,6 +193,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -243,6 +245,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -289,7 +292,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
diff --git a/libsrc/plugin/dlf.c b/libsrc/plugin/dlf.c
index 03bb575..7528dd2 100644
--- a/libsrc/plugin/dlf.c
+++ b/libsrc/plugin/dlf.c
@@ -1,14 +1,14 @@
 /*
  *  dlf.c
  *
- *  $Id: dlf.c,v 1.4 2009/04/09 17:53:08 source Exp $
+ *  $Id: dlf.c,v 1.4.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  dynamic load functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/dlf.h b/libsrc/plugin/dlf.h
index 21c5337..019113d 100644
--- a/libsrc/plugin/dlf.h
+++ b/libsrc/plugin/dlf.h
@@ -1,14 +1,14 @@
 /*
  *  dlf.h
  *
- *  $Id: dlf.h,v 1.4 2008/09/16 14:52:23 source Exp $
+ *  $Id: dlf.h,v 1.4.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  dynamic load functions
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/exe_export.h b/libsrc/plugin/exe_export.h
index a84c727..431e0df 100644
--- a/libsrc/plugin/exe_export.h
+++ b/libsrc/plugin/exe_export.h
@@ -1,12 +1,12 @@
 /*
  *  exe_export.h
  *
- *  $Id: exe_export.h,v 1.2 2009/04/09 17:53:08 source Exp $
+ *  $Id: exe_export.h,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/export_gate_virtuoso.c b/libsrc/plugin/export_gate_virtuoso.c
index 27b3974..4a7fea0 100644
--- a/libsrc/plugin/export_gate_virtuoso.c
+++ b/libsrc/plugin/export_gate_virtuoso.c
@@ -140,15 +140,18 @@ _gate_export_item_t _gate_export_data[] = {
   { &box_dv_uname_nchars, "box_dv_uname_nchars" },
   { &box_dv_uname_string, "box_dv_uname_string" },
   { &box_dv_uname_substr, "box_dv_uname_substr" },
+  { &box_dv_wide_nchars, "box_dv_wide_nchars" },
   { &box_equal, "box_equal" },
   { &box_find_mt_unsafe_subtree, "box_find_mt_unsafe_subtree" },
   { &box_float, "box_float" },
+  { &box_iri_id, "box_iri_id" },
   { &box_make_tree_mt_safe, "box_make_tree_mt_safe" },
   { &box_num, "box_num" },
   { &box_num_nonull, "box_num_nonull" },
   { &box_sprintf, "box_sprintf" },
   { &box_string, "box_string" },
   { &box_vsprintf, "box_vsprintf" },
+  { &copy_list_to_array, "copy_list_to_array" },
   { &dbg_calloc, "dbg_calloc" },
   { &dbg_free, "dbg_free" },
   { &dbg_malloc, "dbg_malloc" },
@@ -235,6 +238,7 @@ _gate_export_item_t _gate_export_data[] = {
   { &eh_wide_from_narrow, "eh_wide_from_narrow" },
   { &elh_get_handler, "elh_get_handler" },
   { &elh_load_handler, "elh_load_handler" },
+  { &file_path_assert, "file_path_assert" },
   { &id_hash_add_new, "id_hash_add_new" },
   { &id_hash_allocate, "id_hash_allocate" },
   { &id_hash_get, "id_hash_get" },
@@ -253,8 +257,10 @@ _gate_export_item_t _gate_export_data[] = {
   { &mutex_enter, "mutex_enter" },
   { &mutex_free, "mutex_free" },
   { &mutex_leave, "mutex_leave" },
+  { &qr_exec, "qr_exec" },
   { &registry_get, "registry_get" },
   { &registry_get_all, "registry_get_all" },
+  { &revlist_to_array, "revlist_to_array" },
   { &sec_check_dba, "sec_check_dba" },
   { &semaphore_allocate, "semaphore_allocate" },
   { &server_logmsg_ap, "server_logmsg_ap" },
@@ -288,6 +294,7 @@ _gate_export_item_t _gate_export_data[] = {
   { &strses_free, "strses_free" },
   { &strses_length, "strses_length" },
   { &strses_string, "strses_string" },
+  { &strses_wide_string, "strses_wide_string" },
   { &strses_write_out, "strses_write_out" },
   { &tcpses_get_fd, "tcpses_get_fd" },
   { &tcpses_get_last_r_errno, "tcpses_get_last_r_errno" },
diff --git a/libsrc/plugin/gate_virtuoso.h b/libsrc/plugin/gate_virtuoso.h
index 5affa44..6aec113 100644
--- a/libsrc/plugin/gate_virtuoso.h
+++ b/libsrc/plugin/gate_virtuoso.h
@@ -1,12 +1,12 @@
 /*
  *  gate_virtuoso.h
  *
- *  $Id: gate_virtuoso.h,v 1.3 2009/04/09 17:53:08 source Exp $
+ *  $Id: gate_virtuoso.h,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/gate_virtuoso_stubs.c b/libsrc/plugin/gate_virtuoso_stubs.c
index 6ee7392..a6ba323 100644
--- a/libsrc/plugin/gate_virtuoso_stubs.c
+++ b/libsrc/plugin/gate_virtuoso_stubs.c
@@ -1,12 +1,12 @@
 /*
  *  gate_virtuoso_stubs.c
  *
- *  $Id: gate_virtuoso_stubs.c,v 1.3 2009/04/09 17:53:08 source Exp $
+ *  $Id: gate_virtuoso_stubs.c,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/gate_virtuoso_stubs.h b/libsrc/plugin/gate_virtuoso_stubs.h
index c8981f9..cf1cf09 100644
--- a/libsrc/plugin/gate_virtuoso_stubs.h
+++ b/libsrc/plugin/gate_virtuoso_stubs.h
@@ -1,12 +1,12 @@
 /*
  *  gate_virtuoso_stubs.h
  *
- *  $Id: gate_virtuoso_stubs.h,v 1.3 2009/04/09 17:53:08 source Exp $
+ *  $Id: gate_virtuoso_stubs.h,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/gen_all_gates.sh b/libsrc/plugin/gen_all_gates.sh
index 46aef12..86f6a8c 100755
--- a/libsrc/plugin/gen_all_gates.sh
+++ b/libsrc/plugin/gen_all_gates.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: gen_all_gates.sh,v 1.5 2009/04/14 12:16:50 source Exp $
+#  $Id: gen_all_gates.sh,v 1.5.2.1 2012/03/08 12:55:39 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/gen_gate.sh b/libsrc/plugin/gen_gate.sh
index de233c8..f31531f 100755
--- a/libsrc/plugin/gen_gate.sh
+++ b/libsrc/plugin/gen_gate.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-#  $Id: gen_gate.sh,v 1.6.2.1 2010/02/03 19:14:35 source Exp $
+#  $Id: gen_gate.sh,v 1.6.2.2 2012/03/08 12:55:39 source Exp $
 #
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #
-#  Copyright (C) 1998-2009 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/hosting_sample.c b/libsrc/plugin/hosting_sample.c
index 76ca80f..fab13e3 100644
--- a/libsrc/plugin/hosting_sample.c
+++ b/libsrc/plugin/hosting_sample.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: hosting_sample.c,v 1.2 2009/04/09 17:53:08 source Exp $
+ *  $Id: hosting_sample.c,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/import_gate_virtuoso.c b/libsrc/plugin/import_gate_virtuoso.c
index dfeb50a..549de0e 100644
--- a/libsrc/plugin/import_gate_virtuoso.c
+++ b/libsrc/plugin/import_gate_virtuoso.c
@@ -60,15 +60,18 @@ struct _gate_s _gate = {
   { NULL, "box_dv_uname_nchars" },
   { NULL, "box_dv_uname_string" },
   { NULL, "box_dv_uname_substr" },
+  { NULL, "box_dv_wide_nchars" },
   { NULL, "box_equal" },
   { NULL, "box_find_mt_unsafe_subtree" },
   { NULL, "box_float" },
+  { NULL, "box_iri_id" },
   { NULL, "box_make_tree_mt_safe" },
   { NULL, "box_num" },
   { NULL, "box_num_nonull" },
   { NULL, "box_sprintf" },
   { NULL, "box_string" },
   { NULL, "box_vsprintf" },
+  { NULL, "copy_list_to_array" },
   { NULL, "dbg_calloc" },
   { NULL, "dbg_free" },
   { NULL, "dbg_malloc" },
@@ -155,6 +158,7 @@ struct _gate_s _gate = {
   { NULL, "eh_wide_from_narrow" },
   { NULL, "elh_get_handler" },
   { NULL, "elh_load_handler" },
+  { NULL, "file_path_assert" },
   { NULL, "id_hash_add_new" },
   { NULL, "id_hash_allocate" },
   { NULL, "id_hash_get" },
@@ -173,8 +177,10 @@ struct _gate_s _gate = {
   { NULL, "mutex_enter" },
   { NULL, "mutex_free" },
   { NULL, "mutex_leave" },
+  { NULL, "qr_exec" },
   { NULL, "registry_get" },
   { NULL, "registry_get_all" },
+  { NULL, "revlist_to_array" },
   { NULL, "sec_check_dba" },
   { NULL, "semaphore_allocate" },
   { NULL, "server_logmsg_ap" },
@@ -208,6 +214,7 @@ struct _gate_s _gate = {
   { NULL, "strses_free" },
   { NULL, "strses_length" },
   { NULL, "strses_string" },
+  { NULL, "strses_wide_string" },
   { NULL, "strses_write_out" },
   { NULL, "tcpses_get_fd" },
   { NULL, "tcpses_get_last_r_errno" },
diff --git a/libsrc/plugin/import_gate_virtuoso.h b/libsrc/plugin/import_gate_virtuoso.h
index 6b40b60..73397be 100644
--- a/libsrc/plugin/import_gate_virtuoso.h
+++ b/libsrc/plugin/import_gate_virtuoso.h
@@ -112,15 +112,18 @@ struct _gate_s {
   struct { typeof__box_dv_uname_nchars *_ptr; const char *_name; } _box_dv_uname_nchars;
   struct { typeof__box_dv_uname_string *_ptr; const char *_name; } _box_dv_uname_string;
   struct { typeof__box_dv_uname_substr *_ptr; const char *_name; } _box_dv_uname_substr;
+  struct { typeof__box_dv_wide_nchars *_ptr; const char *_name; } _box_dv_wide_nchars;
   struct { typeof__box_equal *_ptr; const char *_name; } _box_equal;
   struct { typeof__box_find_mt_unsafe_subtree *_ptr; const char *_name; } _box_find_mt_unsafe_subtree;
   struct { typeof__box_float *_ptr; const char *_name; } _box_float;
+  struct { typeof__box_iri_id *_ptr; const char *_name; } _box_iri_id;
   struct { typeof__box_make_tree_mt_safe *_ptr; const char *_name; } _box_make_tree_mt_safe;
   struct { typeof__box_num *_ptr; const char *_name; } _box_num;
   struct { typeof__box_num_nonull *_ptr; const char *_name; } _box_num_nonull;
   struct { typeof__box_sprintf *_ptr; const char *_name; } _box_sprintf;
   struct { typeof__box_string *_ptr; const char *_name; } _box_string;
   struct { typeof__box_vsprintf *_ptr; const char *_name; } _box_vsprintf;
+  struct { typeof__copy_list_to_array *_ptr; const char *_name; } _copy_list_to_array;
   struct { typeof__dbg_calloc *_ptr; const char *_name; } _dbg_calloc;
   struct { typeof__dbg_free *_ptr; const char *_name; } _dbg_free;
   struct { typeof__dbg_malloc *_ptr; const char *_name; } _dbg_malloc;
@@ -207,6 +210,7 @@ struct _gate_s {
   struct { typeof__eh_wide_from_narrow *_ptr; const char *_name; } _eh_wide_from_narrow;
   struct { typeof__elh_get_handler *_ptr; const char *_name; } _elh_get_handler;
   struct { typeof__elh_load_handler *_ptr; const char *_name; } _elh_load_handler;
+  struct { typeof__file_path_assert *_ptr; const char *_name; } _file_path_assert;
   struct { typeof__id_hash_add_new *_ptr; const char *_name; } _id_hash_add_new;
   struct { typeof__id_hash_allocate *_ptr; const char *_name; } _id_hash_allocate;
   struct { typeof__id_hash_get *_ptr; const char *_name; } _id_hash_get;
@@ -225,8 +229,10 @@ struct _gate_s {
   struct { typeof__mutex_enter *_ptr; const char *_name; } _mutex_enter;
   struct { typeof__mutex_free *_ptr; const char *_name; } _mutex_free;
   struct { typeof__mutex_leave *_ptr; const char *_name; } _mutex_leave;
+  struct { typeof__qr_exec *_ptr; const char *_name; } _qr_exec;
   struct { typeof__registry_get *_ptr; const char *_name; } _registry_get;
   struct { typeof__registry_get_all *_ptr; const char *_name; } _registry_get_all;
+  struct { typeof__revlist_to_array *_ptr; const char *_name; } _revlist_to_array;
   struct { typeof__sec_check_dba *_ptr; const char *_name; } _sec_check_dba;
   struct { typeof__semaphore_allocate *_ptr; const char *_name; } _semaphore_allocate;
   struct { typeof__server_logmsg_ap *_ptr; const char *_name; } _server_logmsg_ap;
@@ -260,6 +266,7 @@ struct _gate_s {
   struct { typeof__strses_free *_ptr; const char *_name; } _strses_free;
   struct { typeof__strses_length *_ptr; const char *_name; } _strses_length;
   struct { typeof__strses_string *_ptr; const char *_name; } _strses_string;
+  struct { typeof__strses_wide_string *_ptr; const char *_name; } _strses_wide_string;
   struct { typeof__strses_write_out *_ptr; const char *_name; } _strses_write_out;
   struct { typeof__tcpses_get_fd *_ptr; const char *_name; } _tcpses_get_fd;
   struct { typeof__tcpses_get_last_r_errno *_ptr; const char *_name; } _tcpses_get_last_r_errno;
@@ -346,15 +353,18 @@ extern struct _gate_s _gate;
 #define box_dv_uname_nchars (_gate._box_dv_uname_nchars._ptr)
 #define box_dv_uname_string (_gate._box_dv_uname_string._ptr)
 #define box_dv_uname_substr (_gate._box_dv_uname_substr._ptr)
+#define box_dv_wide_nchars (_gate._box_dv_wide_nchars._ptr)
 #define box_equal (_gate._box_equal._ptr)
 #define box_find_mt_unsafe_subtree (_gate._box_find_mt_unsafe_subtree._ptr)
 #define box_float (_gate._box_float._ptr)
+#define box_iri_id (_gate._box_iri_id._ptr)
 #define box_make_tree_mt_safe (_gate._box_make_tree_mt_safe._ptr)
 #define box_num (_gate._box_num._ptr)
 #define box_num_nonull (_gate._box_num_nonull._ptr)
 #define box_sprintf (_gate._box_sprintf._ptr)
 #define box_string (_gate._box_string._ptr)
 #define box_vsprintf (_gate._box_vsprintf._ptr)
+#define copy_list_to_array (_gate._copy_list_to_array._ptr)
 #define dbg_calloc (_gate._dbg_calloc._ptr)
 #define dbg_free (_gate._dbg_free._ptr)
 #define dbg_malloc (_gate._dbg_malloc._ptr)
@@ -441,6 +451,7 @@ extern struct _gate_s _gate;
 #define eh_wide_from_narrow (_gate._eh_wide_from_narrow._ptr)
 #define elh_get_handler (_gate._elh_get_handler._ptr)
 #define elh_load_handler (_gate._elh_load_handler._ptr)
+#define file_path_assert (_gate._file_path_assert._ptr)
 #define id_hash_add_new (_gate._id_hash_add_new._ptr)
 #define id_hash_allocate (_gate._id_hash_allocate._ptr)
 #define id_hash_get (_gate._id_hash_get._ptr)
@@ -459,8 +470,10 @@ extern struct _gate_s _gate;
 #define mutex_enter (_gate._mutex_enter._ptr)
 #define mutex_free (_gate._mutex_free._ptr)
 #define mutex_leave (_gate._mutex_leave._ptr)
+#define qr_exec (_gate._qr_exec._ptr)
 #define registry_get (_gate._registry_get._ptr)
 #define registry_get_all (_gate._registry_get_all._ptr)
+#define revlist_to_array (_gate._revlist_to_array._ptr)
 #define sec_check_dba (_gate._sec_check_dba._ptr)
 #define semaphore_allocate (_gate._semaphore_allocate._ptr)
 #define server_logmsg_ap (_gate._server_logmsg_ap._ptr)
@@ -494,6 +507,7 @@ extern struct _gate_s _gate;
 #define strses_free (_gate._strses_free._ptr)
 #define strses_length (_gate._strses_length._ptr)
 #define strses_string (_gate._strses_string._ptr)
+#define strses_wide_string (_gate._strses_wide_string._ptr)
 #define strses_write_out (_gate._strses_write_out._ptr)
 #define tcpses_get_fd (_gate._tcpses_get_fd._ptr)
 #define tcpses_get_last_r_errno (_gate._tcpses_get_last_r_errno._ptr)
diff --git a/libsrc/plugin/msdtc_plugin.c b/libsrc/plugin/msdtc_plugin.c
index 55da0ea..3ab4618 100644
--- a/libsrc/plugin/msdtc_plugin.c
+++ b/libsrc/plugin/msdtc_plugin.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: msdtc_plugin.c,v 1.2 2009/04/09 17:53:08 source Exp $
+ *  $Id: msdtc_plugin.c,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin.c b/libsrc/plugin/plugin.c
index 1fc1f0e..af880b0 100644
--- a/libsrc/plugin/plugin.c
+++ b/libsrc/plugin/plugin.c
@@ -1,12 +1,12 @@
 /*
  *  plugin.c
  *
- *  $Id: plugin.c,v 1.3 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin.c,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin.h b/libsrc/plugin/plugin.h
index d4b261a..c984194 100644
--- a/libsrc/plugin/plugin.h
+++ b/libsrc/plugin/plugin.h
@@ -1,12 +1,12 @@
 /*
  *  plugin.h
  *
- *  $Id: plugin.h,v 1.4 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin.h,v 1.4.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin_lang25.h b/libsrc/plugin/plugin_lang25.h
index f72954c..4455b02 100644
--- a/libsrc/plugin/plugin_lang25.h
+++ b/libsrc/plugin/plugin_lang25.h
@@ -1,12 +1,12 @@
 /*
  *  plugin_lang25.h
  *
- *  $Id: plugin_lang25.h,v 1.2 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin_lang25.h,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin_msdtc.h b/libsrc/plugin/plugin_msdtc.h
index cbc9fbe..1f72e3d 100644
--- a/libsrc/plugin/plugin_msdtc.h
+++ b/libsrc/plugin/plugin_msdtc.h
@@ -1,12 +1,12 @@
 /*
  *  msdtc_plugin.h
  *
- *  $Id: plugin_msdtc.h,v 1.2 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin_msdtc.h,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin_sample.c b/libsrc/plugin/plugin_sample.c
index e28cd43..c1dbf70 100644
--- a/libsrc/plugin/plugin_sample.c
+++ b/libsrc/plugin/plugin_sample.c
@@ -1,10 +1,10 @@
 /*
- *  $Id: plugin_sample.c,v 1.3 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin_sample.c,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin_unix.c b/libsrc/plugin/plugin_unix.c
index 8c23cc0..9f236e5 100644
--- a/libsrc/plugin/plugin_unix.c
+++ b/libsrc/plugin/plugin_unix.c
@@ -1,12 +1,12 @@
 /*
  *  plugin_unix.c
  *
- *  $Id: plugin_unix.c,v 1.7 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin_unix.c,v 1.7.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/plugin/plugin_win32.c b/libsrc/plugin/plugin_win32.c
index fc353fe..1b8230c 100644
--- a/libsrc/plugin/plugin_win32.c
+++ b/libsrc/plugin/plugin_win32.c
@@ -1,12 +1,12 @@
 /*
  *  plugin_win32.c
  *
- *  $Id: plugin_win32.c,v 1.3 2009/04/09 17:53:08 source Exp $
+ *  $Id: plugin_win32.c,v 1.3.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/Makefile.am b/libsrc/util/Makefile.am
index 9525c04..0b93a5a 100644
--- a/libsrc/util/Makefile.am
+++ b/libsrc/util/Makefile.am
@@ -2,7 +2,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -24,7 +24,7 @@ noinst_LTLIBRARIES = libutil.la
 noinst_HEADERS		= \
 	dbgmal.h dyntab.h fnmatch.h getdate.h getopt.h itypes.h listmac.h \
 	logmsg.h md5.h mpl.h ncfg.h oplthr.h regexp.h regmagic.h setext.h \
-	startup.h strfuns.h utalloc.h utf8funs.h uuid.h uuidP.h
+	startup.h strfuns.h utalloc.h utf8funs.h uuid.h uuidP.h sslengine.h
 
 libutil_la_CFLAGS  = @VIRT_AM_CFLAGS@
 libutil_la_CFLAGS  += -D_GNU_SOURCE -DIN_LIBUTIL -DGLOBALREF=extern 
@@ -64,6 +64,7 @@ libutil_la_SOURCES = \
 	regsub.c \
 	rtrim.c \
 	setext.c \
+	sslengine.c \
 	startup.c \
 	stpcpy.c \
 	strcpyin.c \
@@ -81,6 +82,7 @@ libutil_la_SOURCES = \
 	usage.c \
 	uuid.c \
 	wcslen.c \
+	virt_mbrlen.c \
 	virt_mbrtowc.c \
 	virt_mbsnrtowcs.c \
 	virt_wcrtomb.c \
diff --git a/libsrc/util/Makefile.in b/libsrc/util/Makefile.in
index eb93fd1..f8376b0 100644
--- a/libsrc/util/Makefile.in
+++ b/libsrc/util/Makefile.in
@@ -19,7 +19,7 @@
 #  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 #  project.
 #  
-#  Copyright (C) 1998-2006 OpenLink Software
+#  Copyright (C) 1998-2012 OpenLink Software
 #  
 #  This project is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU General Public License as published by the
@@ -87,15 +87,16 @@ am_libutil_la_OBJECTS = libutil_la-buildarg.lo libutil_la-cfg2.lo \
 	libutil_la-ltrim.lo libutil_la-make_env.lo libutil_la-mpl.lo \
 	libutil_la-ncfg.lo libutil_la-ntapp.lo libutil_la-regerror.lo \
 	libutil_la-regexp.lo libutil_la-regsub.lo libutil_la-rtrim.lo \
-	libutil_la-setext.lo libutil_la-startup.lo \
-	libutil_la-stpcpy.lo libutil_la-strcpyin.lo \
-	libutil_la-strerror.lo libutil_la-stricmp.lo \
-	libutil_la-strindex.lo libutil_la-strinsrt.lo \
-	libutil_la-strlwr.lo libutil_la-strnicmp.lo \
-	libutil_la-strquote.lo libutil_la-strtok_r.lo \
-	libutil_la-strupr.lo libutil_la-strxpect.lo \
-	libutil_la-terminat.lo libutil_la-usage.lo libutil_la-uuid.lo \
-	libutil_la-wcslen.lo libutil_la-virt_mbrtowc.lo \
+	libutil_la-setext.lo libutil_la-sslengine.lo \
+	libutil_la-startup.lo libutil_la-stpcpy.lo \
+	libutil_la-strcpyin.lo libutil_la-strerror.lo \
+	libutil_la-stricmp.lo libutil_la-strindex.lo \
+	libutil_la-strinsrt.lo libutil_la-strlwr.lo \
+	libutil_la-strnicmp.lo libutil_la-strquote.lo \
+	libutil_la-strtok_r.lo libutil_la-strupr.lo \
+	libutil_la-strxpect.lo libutil_la-terminat.lo \
+	libutil_la-usage.lo libutil_la-uuid.lo libutil_la-wcslen.lo \
+	libutil_la-virt_mbrlen.lo libutil_la-virt_mbrtowc.lo \
 	libutil_la-virt_mbsnrtowcs.lo libutil_la-virt_wcrtomb.lo \
 	libutil_la-virt_wcs_mask.lo libutil_la-virt_wcsnrtombs.lo \
 	libutil_la-pcre_chartables.lo libutil_la-pcre_compile.lo \
@@ -156,6 +157,7 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
@@ -204,6 +206,7 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -255,6 +258,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_jdk2_path = @ac_jdk2_path@
@@ -301,7 +305,6 @@ libexecdir = @libexecdir@
 libxml_file = @libxml_file@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -331,7 +334,7 @@ noinst_LTLIBRARIES = libutil.la
 noinst_HEADERS = \
 	dbgmal.h dyntab.h fnmatch.h getdate.h getopt.h itypes.h listmac.h \
 	logmsg.h md5.h mpl.h ncfg.h oplthr.h regexp.h regmagic.h setext.h \
-	startup.h strfuns.h utalloc.h utf8funs.h uuid.h uuidP.h
+	startup.h strfuns.h utalloc.h utf8funs.h uuid.h uuidP.h sslengine.h
 
 libutil_la_CFLAGS = @VIRT_AM_CFLAGS@ -D_GNU_SOURCE -DIN_LIBUTIL \
 	-DGLOBALREF=extern -I$(top_srcdir)/libsrc \
@@ -368,6 +371,7 @@ libutil_la_SOURCES = \
 	regsub.c \
 	rtrim.c \
 	setext.c \
+	sslengine.c \
 	startup.c \
 	stpcpy.c \
 	strcpyin.c \
@@ -385,6 +389,7 @@ libutil_la_SOURCES = \
 	usage.c \
 	uuid.c \
 	wcslen.c \
+	virt_mbrlen.c \
 	virt_mbrtowc.c \
 	virt_mbsnrtowcs.c \
 	virt_wcrtomb.c \
@@ -530,6 +535,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-regsub.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-rtrim.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-setext.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-sslengine.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-startup.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-stpcpy.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-strcpyin.Plo at am__quote@
@@ -546,6 +552,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-terminat.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-usage.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-uuid.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-virt_mbrlen.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-virt_mbrtowc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-virt_mbsnrtowcs.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libutil_la-virt_wcrtomb.Plo at am__quote@
@@ -784,6 +791,13 @@ libutil_la-setext.lo: setext.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -c -o libutil_la-setext.lo `test -f 'setext.c' || echo '$(srcdir)/'`setext.c
 
+libutil_la-sslengine.lo: sslengine.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -MT libutil_la-sslengine.lo -MD -MP -MF $(DEPDIR)/libutil_la-sslengine.Tpo -c -o libutil_la-sslengine.lo `test -f 'sslengine.c' || echo '$(srcdir)/'`sslengine.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libutil_la-sslengine.Tpo $(DEPDIR)/libutil_la-sslengine.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sslengine.c' object='libutil_la-sslengine.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -c -o libutil_la-sslengine.lo `test -f 'sslengine.c' || echo '$(srcdir)/'`sslengine.c
+
 libutil_la-startup.lo: startup.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -MT libutil_la-startup.lo -MD -MP -MF $(DEPDIR)/libutil_la-startup.Tpo -c -o libutil_la-startup.lo `test -f 'startup.c' || echo '$(srcdir)/'`startup.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libutil_la-startup.Tpo $(DEPDIR)/libutil_la-startup.Plo
@@ -903,6 +917,13 @@ libutil_la-wcslen.lo: wcslen.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -c -o libutil_la-wcslen.lo `test -f 'wcslen.c' || echo '$(srcdir)/'`wcslen.c
 
+libutil_la-virt_mbrlen.lo: virt_mbrlen.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -MT libutil_la-virt_mbrlen.lo -MD -MP -MF $(DEPDIR)/libutil_la-virt_mbrlen.Tpo -c -o libutil_la-virt_mbrlen.lo `test -f 'virt_mbrlen.c' || echo '$(srcdir)/'`virt_mbrlen.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libutil_la-virt_mbrlen.Tpo $(DEPDIR)/libutil_la-virt_mbrlen.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='virt_mbrlen.c' object='libutil_la-virt_mbrlen.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -c -o libutil_la-virt_mbrlen.lo `test -f 'virt_mbrlen.c' || echo '$(srcdir)/'`virt_mbrlen.c
+
 libutil_la-virt_mbrtowc.lo: virt_mbrtowc.c
 @am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutil_la_CFLAGS) $(CFLAGS) -MT libutil_la-virt_mbrtowc.lo -MD -MP -MF $(DEPDIR)/libutil_la-virt_mbrtowc.Tpo -c -o libutil_la-virt_mbrtowc.lo `test -f 'virt_mbrtowc.c' || echo '$(srcdir)/'`virt_mbrtowc.c
 @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libutil_la-virt_mbrtowc.Tpo $(DEPDIR)/libutil_la-virt_mbrtowc.Plo
diff --git a/libsrc/util/buildarg.c b/libsrc/util/buildarg.c
index f4e976c..5f68f68 100644
--- a/libsrc/util/buildarg.c
+++ b/libsrc/util/buildarg.c
@@ -1,14 +1,14 @@
 /*
  *  buildarg.c
  *
- *  $Id: buildarg.c,v 1.2 2006/04/18 19:49:56 source Exp $
+ *  $Id: buildarg.c,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Parse a string into argv[], argc
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/cfg2.c b/libsrc/util/cfg2.c
index eb448d9..0a171b2 100644
--- a/libsrc/util/cfg2.c
+++ b/libsrc/util/cfg2.c
@@ -1,14 +1,14 @@
 /*
  *  cfg2.c
  *
- *  $Id: cfg2.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: cfg2.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Configuration Management
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/cslentry.c b/libsrc/util/cslentry.c
index 156907d..b44c369 100644
--- a/libsrc/util/cslentry.c
+++ b/libsrc/util/cslentry.c
@@ -1,14 +1,14 @@
 /*
  *  cslentry.c
  *
- *  $Id: cslentry.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: cslentry.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Return an entry from a comma seperated list
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/csllkup.c b/libsrc/util/csllkup.c
index c8cdf5c..ef7e150 100644
--- a/libsrc/util/csllkup.c
+++ b/libsrc/util/csllkup.c
@@ -1,14 +1,14 @@
 /*
  *  csllkup.c
  *
- *  $Id: csllkup.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: csllkup.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Find an entry in a comma separated list
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/cslnment.c b/libsrc/util/cslnment.c
index 7b7dd49..6a6caf6 100644
--- a/libsrc/util/cslnment.c
+++ b/libsrc/util/cslnment.c
@@ -1,14 +1,14 @@
 /*
  *  cslnment.c
  *
- *  $Id: cslnment.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: cslnment.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Return # entries in comma seperated list
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/dbgmal.c b/libsrc/util/dbgmal.c
index 0f74893..9d774f3 100644
--- a/libsrc/util/dbgmal.c
+++ b/libsrc/util/dbgmal.c
@@ -1,14 +1,14 @@
 /*
  *  dbgmal.c
  *
- *  $Id: dbgmal.c,v 1.4 2008/11/25 12:35:44 source Exp $
+ *  $Id: dbgmal.c,v 1.4.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Debugging malloc package
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/dbgmal.h b/libsrc/util/dbgmal.h
index 460c0f7..340dbe9 100644
--- a/libsrc/util/dbgmal.h
+++ b/libsrc/util/dbgmal.h
@@ -1,14 +1,14 @@
 /*
  *  dbgmal.h
  *
- *  $Id: dbgmal.h,v 1.4 2008/11/25 12:35:44 source Exp $
+ *  $Id: dbgmal.h,v 1.4.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Debugging malloc package
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/debug.c b/libsrc/util/debug.c
index 36b72b9..23f1d01 100644
--- a/libsrc/util/debug.c
+++ b/libsrc/util/debug.c
@@ -1,14 +1,14 @@
 /*
  *  debug.c
  *
- *  $Id: debug.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: debug.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Code for debugging
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/dyntab.c b/libsrc/util/dyntab.c
index 102a32d..011b0e1 100644
--- a/libsrc/util/dyntab.c
+++ b/libsrc/util/dyntab.c
@@ -1,14 +1,14 @@
 /*
  *  dyntab.c
  *
- *  $Id: dyntab.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: dyntab.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Dynamic Tables
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/dyntab.h b/libsrc/util/dyntab.h
index fbde14e..f1a15f9 100644
--- a/libsrc/util/dyntab.h
+++ b/libsrc/util/dyntab.h
@@ -1,14 +1,14 @@
 /*
  *  dyntab.h
  *
- *  $Id: dyntab.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: dyntab.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Dynamic Tables
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/expandav.c b/libsrc/util/expandav.c
index 8adfc5c..85dcaac 100644
--- a/libsrc/util/expandav.c
+++ b/libsrc/util/expandav.c
@@ -1,14 +1,14 @@
 /*
  *  expandav.c
  *
- *  $Id: expandav.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: expandav.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Commandline expansion
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/fnqual.c b/libsrc/util/fnqual.c
index 7f37f4d..14c33b5 100644
--- a/libsrc/util/fnqual.c
+++ b/libsrc/util/fnqual.c
@@ -1,14 +1,14 @@
 /*
  *  fnqual.c
  *
- *  $Id: fnqual.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fnqual.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Filename qualification
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/fnsearch.c b/libsrc/util/fnsearch.c
index f64b336..aabaf82 100644
--- a/libsrc/util/fnsearch.c
+++ b/libsrc/util/fnsearch.c
@@ -1,14 +1,14 @@
 /*
  *  fnsearch.c
  *
- *  $Id: fnsearch.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fnsearch.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Search a file in a search path
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/fntodos.c b/libsrc/util/fntodos.c
index eeb2ab0..1babd6b 100644
--- a/libsrc/util/fntodos.c
+++ b/libsrc/util/fntodos.c
@@ -1,14 +1,14 @@
 /*
  *  fntodos.c
  *
- *  $Id: fntodos.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fntodos.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Convert unix filenames to dos filenames
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/fnundos.c b/libsrc/util/fnundos.c
index 22d9bc9..bf6128d 100644
--- a/libsrc/util/fnundos.c
+++ b/libsrc/util/fnundos.c
@@ -1,14 +1,14 @@
 /*
  *  fnundos.c
  *
- *  $Id: fnundos.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: fnundos.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Convert dos filenames to unix filenames
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/getdate.h b/libsrc/util/getdate.h
index c80df88..e954c78 100644
--- a/libsrc/util/getdate.h
+++ b/libsrc/util/getdate.h
@@ -1,12 +1,12 @@
 /*
  *  getdate.h
  *
- *  $Id: getdate.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: getdate.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/gettimeofday.c b/libsrc/util/gettimeofday.c
index c047699..4723b1f 100644
--- a/libsrc/util/gettimeofday.c
+++ b/libsrc/util/gettimeofday.c
@@ -1,14 +1,14 @@
 /*
  *  gettimeofday.c
  *
- *  $Id: gettimeofday.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: gettimeofday.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  gettimeofday emulation
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/itypes.h b/libsrc/util/itypes.h
index 89b9b42..1105136 100644
--- a/libsrc/util/itypes.h
+++ b/libsrc/util/itypes.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/listmac.h b/libsrc/util/listmac.h
index 6685f48..c3d9159 100644
--- a/libsrc/util/listmac.h
+++ b/libsrc/util/listmac.h
@@ -1,14 +1,14 @@
 /*
  *  listmac.h
  *
- *  $Id: listmac.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: listmac.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  List macros
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/login_digest.c b/libsrc/util/login_digest.c
index 298ea52..4f58f81 100644
--- a/libsrc/util/login_digest.c
+++ b/libsrc/util/login_digest.c
@@ -1,14 +1,14 @@
 /*
  *  login_digest.c
  *
- *  $Id: login_digest.c,v 1.2.2.1 2010/01/29 02:02:54 source Exp $
+ *  $Id: login_digest.c,v 1.2.2.2 2012/03/08 12:55:39 source Exp $
  *
  *  login digest calculator
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/logmsg.c b/libsrc/util/logmsg.c
index d408b5b..4ff414b 100644
--- a/libsrc/util/logmsg.c
+++ b/libsrc/util/logmsg.c
@@ -1,14 +1,14 @@
 /*
  *  logmsg.c
  *
- *  $Id: logmsg.c,v 1.5 2007/09/26 15:25:02 source Exp $
+ *  $Id: logmsg.c,v 1.5.2.2 2012/03/08 12:55:39 source Exp $
  *
  *  Logfile routines
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -671,7 +671,10 @@ log_open_file (char *filename, int level, int mask, int style)
 
   log = log_open_callback (file_emit, file_close, level, mask, style);
   if (log == NULL)
-    return NULL;
+    {
+      fclose (fp);
+      return NULL;
+    }
 
   log->user_data = fp;
 
diff --git a/libsrc/util/logmsg.h b/libsrc/util/logmsg.h
index 2ffc6e4..e3f3933 100644
--- a/libsrc/util/logmsg.h
+++ b/libsrc/util/logmsg.h
@@ -1,14 +1,14 @@
 /*
  *  logmsg.h
  *
- *  $Id: logmsg.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: logmsg.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Alternate logging module
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/ltrim.c b/libsrc/util/ltrim.c
index 35a1b56..e38d5bc 100644
--- a/libsrc/util/ltrim.c
+++ b/libsrc/util/ltrim.c
@@ -1,7 +1,7 @@
 /*
  *  ltrim.c
  *
- *  $Id: ltrim.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: ltrim.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  usage:
  *	char *ltrim (const char *s);
@@ -11,7 +11,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/make_env.c b/libsrc/util/make_env.c
index e4f6e3f..def6e00 100644
--- a/libsrc/util/make_env.c
+++ b/libsrc/util/make_env.c
@@ -1,14 +1,14 @@
 /*
  *  make_env.c
  *
- *  $Id: make_env.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: make_env.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Add a variable to the environment
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/md5.h b/libsrc/util/md5.h
index 1ec0f70..edb2f47 100644
--- a/libsrc/util/md5.h
+++ b/libsrc/util/md5.h
@@ -1,10 +1,10 @@
 /*
- *  $Id: md5.h,v 1.1.1.1.2.1 2010/01/29 02:02:54 source Exp $
+ *  $Id: md5.h,v 1.1.1.1.2.2 2012/03/08 12:55:39 source Exp $
  *
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2010 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/mpl.c b/libsrc/util/mpl.c
index f6d617f..ae39306 100644
--- a/libsrc/util/mpl.c
+++ b/libsrc/util/mpl.c
@@ -1,7 +1,7 @@
 /*
  *  mpl.c
  *
- *  $Id: mpl.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: mpl.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Mempory Pool Primitives
  *  Derived from obstack
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/mpl.h b/libsrc/util/mpl.h
index 0b08d8d..c4651a3 100644
--- a/libsrc/util/mpl.h
+++ b/libsrc/util/mpl.h
@@ -1,7 +1,7 @@
 /*
  *  mpl.h
  *
- *  $Id: mpl.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: mpl.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Mempory Pool Primitives
  *  Derived from obstack
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/ncfg.c b/libsrc/util/ncfg.c
index 5286be2..b309562 100644
--- a/libsrc/util/ncfg.c
+++ b/libsrc/util/ncfg.c
@@ -1,14 +1,14 @@
 /*
  *  ncfg.c
  *
- *  $Id: ncfg.c,v 1.1.1.1.2.1 2010/01/29 02:02:54 source Exp $
+ *  $Id: ncfg.c,v 1.1.1.1.2.2 2012/03/08 12:55:39 source Exp $
  *
  *  New Configuration File Management
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/ncfg.h b/libsrc/util/ncfg.h
index 6fdaaf7..23daf83 100644
--- a/libsrc/util/ncfg.h
+++ b/libsrc/util/ncfg.h
@@ -1,14 +1,14 @@
 /*
  *  ncfg.h
  *
- *  $Id: ncfg.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: ncfg.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  New Configuration File Management
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/ntapp.c b/libsrc/util/ntapp.c
index e2589d6..6d73566 100644
--- a/libsrc/util/ntapp.c
+++ b/libsrc/util/ntapp.c
@@ -1,7 +1,7 @@
 /*
  *  ntapp.c
  *
- *  $Id: ntapp.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: ntapp.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  NT Application specific code
  *  This function is a stub, if none is defined in the application
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/oplthr.h b/libsrc/util/oplthr.h
index fbae650..e04b863 100644
--- a/libsrc/util/oplthr.h
+++ b/libsrc/util/oplthr.h
@@ -1,14 +1,14 @@
 /*
  *  oplthr.h
  *
- *  $Id: oplthr.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: oplthr.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Macros for locking & multihreading
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/regerror.c b/libsrc/util/regerror.c
index c077b83..17f2d11 100644
--- a/libsrc/util/regerror.c
+++ b/libsrc/util/regerror.c
@@ -1,12 +1,12 @@
 /*
  *  regerror.c
  *
- *  $Id: regerror.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: regerror.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/regexp.c b/libsrc/util/regexp.c
index 157e82c..c4c8c42 100644
--- a/libsrc/util/regexp.c
+++ b/libsrc/util/regexp.c
@@ -239,7 +239,10 @@ regcomp (const char *exp)
   regcode = r->program;
   regc (MAGIC);
   if (reg (0, &flags) == NULL)
-    return (NULL);
+    {
+      free (r);
+      return (NULL);
+    }
 
   /* Dig out information for optimizations. */
   r->regstart = '\0';		/* Worst-case defaults. */
diff --git a/libsrc/util/regexp.h b/libsrc/util/regexp.h
index 564b13b..a45bb1f 100644
--- a/libsrc/util/regexp.h
+++ b/libsrc/util/regexp.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/regmagic.h b/libsrc/util/regmagic.h
index 9c84185..665dd07 100644
--- a/libsrc/util/regmagic.h
+++ b/libsrc/util/regmagic.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/rtrim.c b/libsrc/util/rtrim.c
index 3efd496..14764dc 100644
--- a/libsrc/util/rtrim.c
+++ b/libsrc/util/rtrim.c
@@ -1,7 +1,7 @@
 /*
  *  rtrim.c
  *
- *  $Id: rtrim.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: rtrim.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  rtrim () -- Remove spaces & tabs from the right end of a string
  *
@@ -14,7 +14,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/setext.c b/libsrc/util/setext.c
index 58f2bee..d17b86d 100644
--- a/libsrc/util/setext.c
+++ b/libsrc/util/setext.c
@@ -1,7 +1,7 @@
 /*
  *  setext.c
  *
- *  $Id: setext.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: setext.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  usage:
  *	char *setext (char *path, char *ext, int mode);
@@ -16,7 +16,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/setext.h b/libsrc/util/setext.h
index 49f4c4f..b4c810f 100644
--- a/libsrc/util/setext.h
+++ b/libsrc/util/setext.h
@@ -1,12 +1,12 @@
 /*
  *  setext.h
  *
- *  $Id: setext.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: setext.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/sslengine.c b/libsrc/util/sslengine.c
new file mode 100644
index 0000000..e6031f8
--- /dev/null
+++ b/libsrc/util/sslengine.c
@@ -0,0 +1,89 @@
+/*
+ *  sslengine.c
+ *
+ *  $Id: sslengine.c,v 1.1.2.1 2012/03/14 13:58:52 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libutil.h"
+#include "util/sslengine.h"
+#include <openssl/err.h>
+
+int
+ssl_engine_startup (void)
+{
+  CRYPTO_malloc_init ();
+  ERR_load_crypto_strings();
+  OpenSSL_add_all_algorithms();
+
+  return 0;
+}
+
+
+int
+ssl_engine_configure (const char *settings)
+{
+  return 0;
+}
+
+
+EVP_PKEY *
+ssl_load_privkey (const char *keyname, const void *keypass)
+{
+  EVP_PKEY *pkey = NULL;
+  BIO *bio_in;
+  char *s;
+
+  if ((bio_in = BIO_new_file (keyname, "r")) != NULL)
+    {
+      pkey = PEM_read_bio_PrivateKey (bio_in, NULL, NULL, NULL);
+      BIO_free (bio_in);
+    }
+
+  return pkey;
+}
+
+
+/******************************************************************************/
+
+X509 *
+ssl_load_x509 (const char *filename)
+{
+  X509 *x509 = NULL;
+  BIO *bio_in;
+
+  if ((bio_in = BIO_new_file (filename, "r")) != NULL)
+    {
+      x509 = PEM_read_bio_X509 (bio_in, NULL, NULL, NULL);
+
+      /* attempt binary certificates too, it's a native format on Windows */
+      if (x509 == NULL &&
+	(ERR_GET_REASON (ERR_peek_last_error ()) == PEM_R_NO_START_LINE))
+	{
+	  ERR_clear_error ();
+	  BIO_seek (bio_in, 0);
+	  x509 = d2i_X509_bio (bio_in, NULL);
+	}
+
+      BIO_free (bio_in);
+    }
+
+  return x509;
+}
diff --git a/libsrc/util/sslengine.h b/libsrc/util/sslengine.h
new file mode 100644
index 0000000..9f9a659
--- /dev/null
+++ b/libsrc/util/sslengine.h
@@ -0,0 +1,38 @@
+/*
+ *  sslengine.c
+ *
+ *  $Id: sslengine.h,v 1.1.2.1 2012/03/14 13:58:52 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef _SSLENGINE_H
+#define _SSLENGINE_H
+
+#include <openssl/ssl.h>
+
+BEGIN_CPLUSPLUS
+
+int ssl_engine_startup (void);
+int ssl_engine_configure (const char *settings);
+EVP_PKEY *ssl_load_privkey (const char *keyname, const void *keypass);
+X509 *ssl_load_x509 (const char *filename);
+
+END_CPLUSPLUS
+
+#endif
diff --git a/libsrc/util/startup.c b/libsrc/util/startup.c
index 36673a0..1190049 100644
--- a/libsrc/util/startup.c
+++ b/libsrc/util/startup.c
@@ -1,14 +1,14 @@
 /*
  *  startup.c
  *
- *  $Id: startup.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: startup.c,v 1.1.1.1.2.2 2012/03/08 12:55:39 source Exp $
  *
  *  Provides default program initialization
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -251,6 +251,8 @@ default_usage (void)
   for (opt = program_info.program_options; opt->long_opt; opt++)
     {
       int i = (int) strlen (opt->long_opt);
+      if (!opt->help)
+	continue;
       if (!strcmp (opt->long_opt, "internal"))
         continue;
       if (i > fmtlen)
@@ -313,6 +315,8 @@ default_usage (void)
   fmtlen = -(fmtlen + 2);
   for (opt = program_info.program_options; opt->long_opt; opt++)
     {
+      if (!opt->help)
+	continue;
 #ifdef BROKEN_PRINTF
       int i = strlen (opt->long_opt);
       if (!strcmp (opt->long_opt, "internal"))
diff --git a/libsrc/util/startup.h b/libsrc/util/startup.h
index 2608146..ba3e481 100644
--- a/libsrc/util/startup.h
+++ b/libsrc/util/startup.h
@@ -1,14 +1,14 @@
 /*
  *  startup.h
  *
- *  $Id: startup.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: startup.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Includes for startup.c
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/stpcpy.c b/libsrc/util/stpcpy.c
index 80b835f..7ab3d4a 100644
--- a/libsrc/util/stpcpy.c
+++ b/libsrc/util/stpcpy.c
@@ -1,14 +1,14 @@
 /*
  *  stpcpy.c
  *
- *  $Id: stpcpy.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: stpcpy.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Like strcpy, but returns a ptr to \0
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strcpyin.c b/libsrc/util/strcpyin.c
index 72d97a7..7e30999 100644
--- a/libsrc/util/strcpyin.c
+++ b/libsrc/util/strcpyin.c
@@ -1,12 +1,12 @@
 /*
  *  strcpyin.c
  *
- *  $Id: strcpyin.c,v 1.2 2006/04/18 19:49:56 source Exp $
+ *  $Id: strcpyin.c,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strerror.c b/libsrc/util/strerror.c
index 553ed3e..6f6edb8 100644
--- a/libsrc/util/strerror.c
+++ b/libsrc/util/strerror.c
@@ -1,14 +1,14 @@
 /*
  *  strerror.c
  *
- *  $Id: strerror.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strerror.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Return error string
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strfuns.h b/libsrc/util/strfuns.h
index 41ecf54..5d27390 100644
--- a/libsrc/util/strfuns.h
+++ b/libsrc/util/strfuns.h
@@ -1,12 +1,12 @@
 /*
  *  strfuns.h
  *
- *  $Id: strfuns.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strfuns.h,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/stricmp.c b/libsrc/util/stricmp.c
index 69b3eec..5ea7995 100644
--- a/libsrc/util/stricmp.c
+++ b/libsrc/util/stricmp.c
@@ -1,12 +1,12 @@
 /*
  *  stricmp.c
  *
- *  $Id: stricmp.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: stricmp.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strindex.c b/libsrc/util/strindex.c
index 532c352..ffe678f 100644
--- a/libsrc/util/strindex.c
+++ b/libsrc/util/strindex.c
@@ -1,12 +1,12 @@
 /*
  *  strindex.c
  *
- *  $Id: strindex.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strindex.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strinsrt.c b/libsrc/util/strinsrt.c
index 6a3ff85..e976ebb 100644
--- a/libsrc/util/strinsrt.c
+++ b/libsrc/util/strinsrt.c
@@ -1,12 +1,12 @@
 /*
  *  strinsert.c
  *
- *  $Id: strinsrt.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strinsrt.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strlwr.c b/libsrc/util/strlwr.c
index ec201cb..6910c02 100644
--- a/libsrc/util/strlwr.c
+++ b/libsrc/util/strlwr.c
@@ -1,12 +1,12 @@
 /*
  *  strlwr.c
  *
- *  $Id: strlwr.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strlwr.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strnicmp.c b/libsrc/util/strnicmp.c
index 1d0db76..851a91d 100644
--- a/libsrc/util/strnicmp.c
+++ b/libsrc/util/strnicmp.c
@@ -1,12 +1,12 @@
 /*
  *  stricmp.c
  *
- *  $Id: strnicmp.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strnicmp.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strquote.c b/libsrc/util/strquote.c
index 75ecd3d..99bf73d 100644
--- a/libsrc/util/strquote.c
+++ b/libsrc/util/strquote.c
@@ -1,7 +1,7 @@
 /*
  *  strquote.c
  *
- *  $Id: strquote.c,v 1.2 2006/04/18 19:49:56 source Exp $
+ *  $Id: strquote.c,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  strquote - strdup's a string, adding quotes.
  *  strunquote - strdup's a string, stripping off quotes.
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strupr.c b/libsrc/util/strupr.c
index c02ccc1..3bf9f98 100644
--- a/libsrc/util/strupr.c
+++ b/libsrc/util/strupr.c
@@ -1,12 +1,12 @@
 /*
  *  strupr.c
  *
- *  $Id: strupr.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strupr.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/strxpect.c b/libsrc/util/strxpect.c
index b726075..b580f7c 100644
--- a/libsrc/util/strxpect.c
+++ b/libsrc/util/strxpect.c
@@ -1,7 +1,7 @@
 /*
  *  strxpect.c
  *
- *  $Id: strxpect.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: strxpect.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Performs a keyword compare
  *  This functions tests if the second string (which is usually longer than
@@ -20,7 +20,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/terminat.c b/libsrc/util/terminat.c
index 4593788..ca95d79 100644
--- a/libsrc/util/terminat.c
+++ b/libsrc/util/terminat.c
@@ -1,7 +1,7 @@
 /*
  *  terminat.c
  *
- *  $Id: terminat.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: terminat.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Terminate a program
  *  This function is a stub, if none is defined in the application
@@ -9,7 +9,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/usage.c b/libsrc/util/usage.c
index 9a9c02c..c1c486b 100644
--- a/libsrc/util/usage.c
+++ b/libsrc/util/usage.c
@@ -1,14 +1,14 @@
 /*
  *  usage.c
  *
- *  $Id: usage.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: usage.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *
  *  Stub for startup.c
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/utalloc.h b/libsrc/util/utalloc.h
index 6e0d093..98e15a0 100644
--- a/libsrc/util/utalloc.h
+++ b/libsrc/util/utalloc.h
@@ -1,12 +1,12 @@
 /*
  *  utalloc.h
  *
- *  $Id: utalloc.h,v 1.2 2006/04/18 19:49:56 source Exp $
+ *  $Id: utalloc.h,v 1.2.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/utf8funs.h b/libsrc/util/utf8funs.h
index ff534d6..a56a285 100644
--- a/libsrc/util/utf8funs.h
+++ b/libsrc/util/utf8funs.h
@@ -1,12 +1,12 @@
 /*
  *  utf8funs.h
  *
- *  $Id: utf8funs.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: utf8funs.h,v 1.1.1.1.2.2 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
@@ -45,6 +45,7 @@ typedef struct
 
 extern const wchar_t virt_utf8_encoding_mask[];
 extern const unsigned char virt_utf8_encoding_byte[];
+size_t virt_mbrlen (const char *s, size_t n, virt_mbstate_t *ps);
 size_t virt_mbrtowc (wchar_t *pwc, const unsigned char *s, size_t n, virt_mbstate_t *ps);
 size_t virt_mbsnrtowcs (wchar_t *dst, unsigned char **src, size_t nmc, size_t len, virt_mbstate_t *ps);
 size_t virt_wcsnrtombs (unsigned char *dst, wchar_t **src, size_t nwc, size_t len, virt_mbstate_t *ps);
diff --git a/libsrc/util/virt_mbrlen.c b/libsrc/util/virt_mbrlen.c
new file mode 100644
index 0000000..d675948
--- /dev/null
+++ b/libsrc/util/virt_mbrlen.c
@@ -0,0 +1,109 @@
+/*
+ *  virt_mbrlen.c
+ *
+ *  Platform-intependent clone of mbrlen - determine number of bytes in next multibyte character
+ *
+ *  $Id: virt_mbrlen.c,v 1.1.2.1 2012/03/03 02:09:07 source Exp $
+ *
+ *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
+ *  project.
+ *
+ *  Copyright (C) 1998-2012 OpenLink Software
+ *
+ *  This project 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; only version 2 of the License, dated June 1991.
+ *
+ *  This program 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "libutil.h"
+
+size_t
+virt_mbrlen (const char *s, size_t n, virt_mbstate_t *ps)
+{
+  size_t used = 0;
+  static virt_mbstate_t internal;
+
+  if (ps == NULL)
+    ps = &internal;
+
+  if (s == NULL)
+    {
+      s = (unsigned char *) "";
+      n = 1;
+    }
+
+  if (n > 0)
+    {
+      if (ps->count == 0)
+        {
+          unsigned char byte = (unsigned char) *s++;
+          ++used;
+
+          /* We must look for a possible first byte of a UTF8 sequence.  */
+          if (!(byte & 0x80))
+            return byte ? used : 0;
+          if ((byte & 0xc0) == 0x80 || (byte & 0xfe) == 0xfe)
+            return (size_t) -1;
+          if ((byte & 0xe0) == 0xc0)
+            {
+              /* We expect two bytes.  */
+              ps->count = 1;
+              ps->value = byte & 0x1f;
+            }
+          else if ((byte & 0xf0) == 0xe0)
+            {
+              /* We expect three bytes.  */
+              ps->count = 2;
+              ps->value = byte & 0x0f;
+            }
+          else if ((byte & 0xf8) == 0xf0)
+            {
+              /* We expect four bytes.  */
+              ps->count = 3;
+              ps->value = byte & 0x07;
+            }
+          else if ((byte & 0xfc) == 0xf8)
+            {
+              /* We expect five bytes.  */
+              ps->count = 4;
+              ps->value = byte & 0x03;
+            }
+          else
+            {
+              /* We expect six bytes.  */
+              ps->count = 5;
+              ps->value = byte & 0x01;
+            }
+        }
+      /* We know we have to handle a multibyte character and there are
+         some more bytes to read.  */
+      while (used < n)
+        {
+          /* The second to sixths byte must be of the form 10xxxxxx.  */
+          unsigned char byte = (unsigned char) *s++;
+          ++used;
+
+          if ((byte & 0xc0) != 0x80)
+            {
+              return (size_t) -1;
+            }
+          ps->value <<= 6;
+          ps->value |= byte & 0x3f;
+          if (--ps->count == 0)
+            {
+              return ps->value ? used : 0;
+            }
+        }
+    }
+  return (size_t) -2;
+}
diff --git a/libsrc/util/virt_mbrtowc.c b/libsrc/util/virt_mbrtowc.c
index c6ebb31..e0b4da0 100644
--- a/libsrc/util/virt_mbrtowc.c
+++ b/libsrc/util/virt_mbrtowc.c
@@ -1,12 +1,12 @@
 /*
  *  virt_mbrtowc.c
  *
- *  $Id: virt_mbrtowc.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: virt_mbrtowc.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/virt_mbsnrtowcs.c b/libsrc/util/virt_mbsnrtowcs.c
index d0f90b8..d5a81e6 100644
--- a/libsrc/util/virt_mbsnrtowcs.c
+++ b/libsrc/util/virt_mbsnrtowcs.c
@@ -1,12 +1,12 @@
 /*
  *  virt_mbsnrtowcs.c
  *
- *  $Id: virt_mbsnrtowcs.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: virt_mbsnrtowcs.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/virt_wcrtomb.c b/libsrc/util/virt_wcrtomb.c
index 9d61385..dc9350a 100644
--- a/libsrc/util/virt_wcrtomb.c
+++ b/libsrc/util/virt_wcrtomb.c
@@ -1,12 +1,12 @@
 /*
  *  virt_wcrtomb.c
  *
- *  $Id: virt_wcrtomb.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: virt_wcrtomb.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/virt_wcs_mask.c b/libsrc/util/virt_wcs_mask.c
index 29238ee..11a4d75 100644
--- a/libsrc/util/virt_wcs_mask.c
+++ b/libsrc/util/virt_wcs_mask.c
@@ -1,12 +1,12 @@
 /*
  *  virt_wcs_mask.c
  *
- *  $Id: virt_wcs_mask.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: virt_wcs_mask.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/virt_wcsnrtombs.c b/libsrc/util/virt_wcsnrtombs.c
index d5b92e7..5b2d5d1 100644
--- a/libsrc/util/virt_wcsnrtombs.c
+++ b/libsrc/util/virt_wcsnrtombs.c
@@ -1,12 +1,12 @@
 /*
  *  virt_wcsnrtombs.c
  *
- *  $Id: virt_wcsnrtombs.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: virt_wcsnrtombs.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/wcslen.c b/libsrc/util/wcslen.c
index 5717bac..37e1391 100644
--- a/libsrc/util/wcslen.c
+++ b/libsrc/util/wcslen.c
@@ -1,12 +1,12 @@
 /*
  *  wsclen.c
  *
- *  $Id: wcslen.c,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ *  $Id: wcslen.c,v 1.1.1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/win32/ptrlong.h b/libsrc/util/win32/ptrlong.h
index 77e7b3c..8249e0c 100644
--- a/libsrc/util/win32/ptrlong.h
+++ b/libsrc/util/win32/ptrlong.h
@@ -3,7 +3,7 @@
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/win32/syslog.c b/libsrc/util/win32/syslog.c
index f169ccc..56aab49 100644
--- a/libsrc/util/win32/syslog.c
+++ b/libsrc/util/win32/syslog.c
@@ -1,12 +1,12 @@
 /*
  *  syslog.c
  *
- *  $Id: syslog.c,v 1.1 2006/04/13 18:48:10 source Exp $
+ *  $Id: syslog.c,v 1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/util/win32/syslog.h b/libsrc/util/win32/syslog.h
index 2709e05..15955d4 100644
--- a/libsrc/util/win32/syslog.h
+++ b/libsrc/util/win32/syslog.h
@@ -1,12 +1,12 @@
 /*
  *  syslog.h
  *
- *  $Id: syslog.h,v 1.1 2006/04/13 18:48:10 source Exp $
+ *  $Id: syslog.h,v 1.1.2.1 2012/03/08 12:55:39 source Exp $
  *  
  *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
  *  project.
  *  
- *  Copyright (C) 1998-2006 OpenLink Software
+ *  Copyright (C) 1998-2012 OpenLink Software
  *  
  *  This project is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License as published by the
diff --git a/libsrc/zlib/ChangeLog b/libsrc/zlib/ChangeLog
deleted file mode 100644
index e237d4e..0000000
--- a/libsrc/zlib/ChangeLog
+++ /dev/null
@@ -1,855 +0,0 @@
-
-                ChangeLog file for zlib
-
-Changes in 1.2.3 (18 July 2005)
-- Apply security vulnerability fixes to contrib/infback9 as well
-- Clean up some text files (carriage returns, trailing space)
-- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant]
-
-Changes in 1.2.2.4 (11 July 2005)
-- Add inflatePrime() function for starting inflation at bit boundary
-- Avoid some Visual C warnings in deflate.c
-- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit
-  compile
-- Fix some spelling errors in comments [Betts]
-- Correct inflateInit2() error return documentation in zlib.h
-- Added zran.c example of compressed data random access to examples
-  directory, shows use of inflatePrime()
-- Fix cast for assignments to strm->state in inflate.c and infback.c
-- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]
-- Move declarations of gf2 functions to right place in crc32.c [Oberhumer]
-- Add cast in trees.c t avoid a warning [Oberhumer]
-- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer]
-- Update make_vms.com [Zinser]
-- Initialize state->write in inflateReset() since copied in inflate_fast()
-- Be more strict on incomplete code sets in inflate_table() and increase
-  ENOUGH and MAXD -- this repairs a possible security vulnerability for
-  invalid inflate input.  Thanks to Tavis Ormandy and Markus Oberhumer for
-  discovering the vulnerability and providing test cases.
-- Add ia64 support to configure for HP-UX [Smith]
-- Add error return to gzread() for format or i/o error [Levin]
-- Use malloc.h for OS/2 [Necasek]
-
-Changes in 1.2.2.3 (27 May 2005)
-- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile
-- Typecast fread() return values in gzio.c [Vollant]
-- Remove trailing space in minigzip.c outmode (VC++ can't deal with it)
-- Fix crc check bug in gzread() after gzungetc() [Heiner]
-- Add the deflateTune() function to adjust internal compression parameters
-- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack)
-- Remove an incorrect assertion in examples/zpipe.c
-- Add C++ wrapper in infback9.h [Donais]
-- Fix bug in inflateCopy() when decoding fixed codes
-- Note in zlib.h how much deflateSetDictionary() actually uses
-- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used)
-- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer]
-- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer]
-- Add gzdirect() function to indicate transparent reads
-- Update contrib/minizip [Vollant]
-- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer]
-- Add casts in crc32.c to avoid warnings [Oberhumer]
-- Add contrib/masmx64 [Vollant]
-- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant]
-
-Changes in 1.2.2.2 (30 December 2004)
-- Replace structure assignments in deflate.c and inflate.c with zmemcpy to
-  avoid implicit memcpy calls (portability for no-library compilation)
-- Increase sprintf() buffer size in gzdopen() to allow for large numbers
-- Add INFLATE_STRICT to check distances against zlib header
-- Improve WinCE errno handling and comments [Chang]
-- Remove comment about no gzip header processing in FAQ
-- Add Z_FIXED strategy option to deflateInit2() to force fixed trees
-- Add updated make_vms.com [Coghlan], update README
-- Create a new "examples" directory, move gzappend.c there, add zpipe.c,
-  fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html.
-- Add FAQ entry and comments in deflate.c on uninitialized memory access
-- Add Solaris 9 make options in configure [Gilbert]
-- Allow strerror() usage in gzio.c for STDC
-- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer]
-- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant]
-- Use z_off_t for adler32_combine() and crc32_combine() lengths
-- Make adler32() much faster for small len
-- Use OS_CODE in deflate() default gzip header
-
-Changes in 1.2.2.1 (31 October 2004)
-- Allow inflateSetDictionary() call for raw inflate
-- Fix inflate header crc check bug for file names and comments
-- Add deflateSetHeader() and gz_header structure for custom gzip headers
-- Add inflateGetheader() to retrieve gzip headers
-- Add crc32_combine() and adler32_combine() functions
-- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list
-- Use zstreamp consistently in zlib.h (inflate_back functions)
-- Remove GUNZIP condition from definition of inflate_mode in inflate.h
-  and in contrib/inflate86/inffast.S [Truta, Anderson]
-- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson]
-- Update projects/README.projects and projects/visualc6 [Truta]
-- Update win32/DLL_FAQ.txt [Truta]
-- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta]
-- Deprecate Z_ASCII; use Z_TEXT instead [Truta]
-- Use a new algorithm for setting strm->data_type in trees.c [Truta]
-- Do not define an exit() prototype in zutil.c unless DEBUG defined
-- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta]
-- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate()
-- Fix Darwin build version identification [Peterson]
-
-Changes in 1.2.2 (3 October 2004)
-- Update zlib.h comments on gzip in-memory processing
-- Set adler to 1 in inflateReset() to support Java test suite [Walles]
-- Add contrib/dotzlib [Ravn]
-- Update win32/DLL_FAQ.txt [Truta]
-- Update contrib/minizip [Vollant]
-- Move contrib/visual-basic.txt to old/ [Truta]
-- Fix assembler builds in projects/visualc6/ [Truta]
-
-Changes in 1.2.1.2 (9 September 2004)
-- Update INDEX file
-- Fix trees.c to update strm->data_type (no one ever noticed!)
-- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown]
-- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE)
-- Add limited multitasking protection to DYNAMIC_CRC_TABLE
-- Add NO_vsnprintf for VMS in zutil.h [Mozilla]
-- Don't declare strerror() under VMS [Mozilla]
-- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize
-- Update contrib/ada [Anisimkov]
-- Update contrib/minizip [Vollant]
-- Fix configure to not hardcode directories for Darwin [Peterson]
-- Fix gzio.c to not return error on empty files [Brown]
-- Fix indentation; update version in contrib/delphi/ZLib.pas and
-  contrib/pascal/zlibpas.pas [Truta]
-- Update mkasm.bat in contrib/masmx86 [Truta]
-- Update contrib/untgz [Truta]
-- Add projects/README.projects [Truta]
-- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta]
-- Update win32/DLL_FAQ.txt [Truta]
-- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta]
-- Remove an unnecessary assignment to curr in inftrees.c [Truta]
-- Add OS/2 to exe builds in configure [Poltorak]
-- Remove err dummy parameter in zlib.h [Kientzle]
-
-Changes in 1.2.1.1 (9 January 2004)
-- Update email address in README
-- Several FAQ updates
-- Fix a big fat bug in inftrees.c that prevented decoding valid
-  dynamic blocks with only literals and no distance codes --
-  Thanks to "Hot Emu" for the bug report and sample file
-- Add a note to puff.c on no distance codes case.
-
-Changes in 1.2.1 (17 November 2003)
-- Remove a tab in contrib/gzappend/gzappend.c
-- Update some interfaces in contrib for new zlib functions
-- Update zlib version number in some contrib entries
-- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta]
-- Support shared libraries on Hurd and KFreeBSD [Brown]
-- Fix error in NO_DIVIDE option of adler32.c
-
-Changes in 1.2.0.8 (4 November 2003)
-- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas
-- Add experimental NO_DIVIDE #define in adler32.c
-    - Possibly faster on some processors (let me know if it is)
-- Correct Z_BLOCK to not return on first inflate call if no wrap
-- Fix strm->data_type on inflate() return to correctly indicate EOB
-- Add deflatePrime() function for appending in the middle of a byte
-- Add contrib/gzappend for an example of appending to a stream
-- Update win32/DLL_FAQ.txt [Truta]
-- Delete Turbo C comment in README [Truta]
-- Improve some indentation in zconf.h [Truta]
-- Fix infinite loop on bad input in configure script [Church]
-- Fix gzeof() for concatenated gzip files [Johnson]
-- Add example to contrib/visual-basic.txt [Michael B.]
-- Add -p to mkdir's in Makefile.in [vda]
-- Fix configure to properly detect presence or lack of printf functions
-- Add AS400 support [Monnerat]
-- Add a little Cygwin support [Wilson]
-
-Changes in 1.2.0.7 (21 September 2003)
-- Correct some debug formats in contrib/infback9
-- Cast a type in a debug statement in trees.c
-- Change search and replace delimiter in configure from % to # [Beebe]
-- Update contrib/untgz to 0.2 with various fixes [Truta]
-- Add build support for Amiga [Nikl]
-- Remove some directories in old that have been updated to 1.2
-- Add dylib building for Mac OS X in configure and Makefile.in
-- Remove old distribution stuff from Makefile
-- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X
-- Update links in README
-
-Changes in 1.2.0.6 (13 September 2003)
-- Minor FAQ updates
-- Update contrib/minizip to 1.00 [Vollant]
-- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta]
-- Update POSTINC comment for 68060 [Nikl]
-- Add contrib/infback9 with deflate64 decoding (unsupported)
-- For MVS define NO_vsnprintf and undefine FAR [van Burik]
-- Add pragma for fdopen on MVS [van Burik]
-
-Changes in 1.2.0.5 (8 September 2003)
-- Add OF to inflateBackEnd() declaration in zlib.h
-- Remember start when using gzdopen in the middle of a file
-- Use internal off_t counters in gz* functions to properly handle seeks
-- Perform more rigorous check for distance-too-far in inffast.c
-- Add Z_BLOCK flush option to return from inflate at block boundary
-- Set strm->data_type on return from inflate
-    - Indicate bits unused, if at block boundary, and if in last block
-- Replace size_t with ptrdiff_t in crc32.c, and check for correct size
-- Add condition so old NO_DEFLATE define still works for compatibility
-- FAQ update regarding the Windows DLL [Truta]
-- INDEX update: add qnx entry, remove aix entry [Truta]
-- Install zlib.3 into mandir [Wilson]
-- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta]
-- Adapt the zlib interface to the new DLL convention guidelines [Truta]
-- Introduce ZLIB_WINAPI macro to allow the export of functions using
-  the WINAPI calling convention, for Visual Basic [Vollant, Truta]
-- Update msdos and win32 scripts and makefiles [Truta]
-- Export symbols by name, not by ordinal, in win32/zlib.def [Truta]
-- Add contrib/ada [Anisimkov]
-- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta]
-- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant]
-- Add contrib/masm686 [Truta]
-- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm
-  [Truta, Vollant]
-- Update contrib/delphi; rename to contrib/pascal; add example [Truta]
-- Remove contrib/delphi2; add a new contrib/delphi [Truta]
-- Avoid inclusion of the nonstandard <memory.h> in contrib/iostream,
-  and fix some method prototypes [Truta]
-- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip
-  [Truta]
-- Avoid the use of backslash (\) in contrib/minizip [Vollant]
-- Fix file time handling in contrib/untgz; update makefiles [Truta]
-- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines
-  [Vollant]
-- Remove contrib/vstudio/vc15_16 [Vollant]
-- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta]
-- Update README.contrib [Truta]
-- Invert the assignment order of match_head and s->prev[...] in
-  INSERT_STRING [Truta]
-- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings
-  [Truta]
-- Compare function pointers with 0, not with NULL or Z_NULL [Truta]
-- Fix prototype of syncsearch in inflate.c [Truta]
-- Introduce ASMINF macro to be enabled when using an ASM implementation
-  of inflate_fast [Truta]
-- Change NO_DEFLATE to NO_GZCOMPRESS [Truta]
-- Modify test_gzio in example.c to take a single file name as a
-  parameter [Truta]
-- Exit the example.c program if gzopen fails [Truta]
-- Add type casts around strlen in example.c [Truta]
-- Remove casting to sizeof in minigzip.c; give a proper type
-  to the variable compared with SUFFIX_LEN [Truta]
-- Update definitions of STDC and STDC99 in zconf.h [Truta]
-- Synchronize zconf.h with the new Windows DLL interface [Truta]
-- Use SYS16BIT instead of __32BIT__ to distinguish between
-  16- and 32-bit platforms [Truta]
-- Use far memory allocators in small 16-bit memory models for
-  Turbo C [Truta]
-- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in
-  zlibCompileFlags [Truta]
-- Cygwin has vsnprintf [Wilson]
-- In Windows16, OS_CODE is 0, as in MSDOS [Truta]
-- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson]
-
-Changes in 1.2.0.4 (10 August 2003)
-- Minor FAQ updates
-- Be more strict when checking inflateInit2's windowBits parameter
-- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well
-- Add gzip wrapper option to deflateInit2 using windowBits
-- Add updated QNX rule in configure and qnx directory [Bonnefoy]
-- Make inflate distance-too-far checks more rigorous
-- Clean up FAR usage in inflate
-- Add casting to sizeof() in gzio.c and minigzip.c
-
-Changes in 1.2.0.3 (19 July 2003)
-- Fix silly error in gzungetc() implementation [Vollant]
-- Update contrib/minizip and contrib/vstudio [Vollant]
-- Fix printf format in example.c
-- Correct cdecl support in zconf.in.h [Anisimkov]
-- Minor FAQ updates
-
-Changes in 1.2.0.2 (13 July 2003)
-- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons
-- Attempt to avoid warnings in crc32.c for pointer-int conversion
-- Add AIX to configure, remove aix directory [Bakker]
-- Add some casts to minigzip.c
-- Improve checking after insecure sprintf() or vsprintf() calls
-- Remove #elif's from crc32.c
-- Change leave label to inf_leave in inflate.c and infback.c to avoid
-  library conflicts
-- Remove inflate gzip decoding by default--only enable gzip decoding by
-  special request for stricter backward compatibility
-- Add zlibCompileFlags() function to return compilation information
-- More typecasting in deflate.c to avoid warnings
-- Remove leading underscore from _Capital #defines [Truta]
-- Fix configure to link shared library when testing
-- Add some Windows CE target adjustments [Mai]
-- Remove #define ZLIB_DLL in zconf.h [Vollant]
-- Add zlib.3 [Rodgers]
-- Update RFC URL in deflate.c and algorithm.txt [Mai]
-- Add zlib_dll_FAQ.txt to contrib [Truta]
-- Add UL to some constants [Truta]
-- Update minizip and vstudio [Vollant]
-- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h
-- Expand use of NO_DUMMY_DECL to avoid all dummy structures
-- Added iostream3 to contrib [Schwardt]
-- Replace rewind() with fseek() for WinCE [Truta]
-- Improve setting of zlib format compression level flags
-    - Report 0 for huffman and rle strategies and for level == 0 or 1
-    - Report 2 only for level == 6
-- Only deal with 64K limit when necessary at compile time [Truta]
-- Allow TOO_FAR check to be turned off at compile time [Truta]
-- Add gzclearerr() function [Souza]
-- Add gzungetc() function
-
-Changes in 1.2.0.1 (17 March 2003)
-- Add Z_RLE strategy for run-length encoding [Truta]
-    - When Z_RLE requested, restrict matches to distance one
-    - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE
-- Correct FASTEST compilation to allow level == 0
-- Clean up what gets compiled for FASTEST
-- Incorporate changes to zconf.in.h [Vollant]
-    - Refine detection of Turbo C need for dummy returns
-    - Refine ZLIB_DLL compilation
-    - Include additional header file on VMS for off_t typedef
-- Try to use _vsnprintf where it supplants vsprintf [Vollant]
-- Add some casts in inffast.c
-- Enchance comments in zlib.h on what happens if gzprintf() tries to
-  write more than 4095 bytes before compression
-- Remove unused state from inflateBackEnd()
-- Remove exit(0) from minigzip.c, example.c
-- Get rid of all those darn tabs
-- Add "check" target to Makefile.in that does the same thing as "test"
-- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in
-- Update contrib/inflate86 [Anderson]
-- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant]
-- Add msdos and win32 directories with makefiles [Truta]
-- More additions and improvements to the FAQ
-
-Changes in 1.2.0 (9 March 2003)
-- New and improved inflate code
-    - About 20% faster
-    - Does not allocate 32K window unless and until needed
-    - Automatically detects and decompresses gzip streams
-    - Raw inflate no longer needs an extra dummy byte at end
-    - Added inflateBack functions using a callback interface--even faster
-      than inflate, useful for file utilities (gzip, zip)
-    - Added inflateCopy() function to record state for random access on
-      externally generated deflate streams (e.g. in gzip files)
-    - More readable code (I hope)
-- New and improved crc32()
-    - About 50% faster, thanks to suggestions from Rodney Brown
-- Add deflateBound() and compressBound() functions
-- Fix memory leak in deflateInit2()
-- Permit setting dictionary for raw deflate (for parallel deflate)
-- Fix const declaration for gzwrite()
-- Check for some malloc() failures in gzio.c
-- Fix bug in gzopen() on single-byte file 0x1f
-- Fix bug in gzread() on concatenated file with 0x1f at end of buffer
-  and next buffer doesn't start with 0x8b
-- Fix uncompress() to return Z_DATA_ERROR on truncated input
-- Free memory at end of example.c
-- Remove MAX #define in trees.c (conflicted with some libraries)
-- Fix static const's in deflate.c, gzio.c, and zutil.[ch]
-- Declare malloc() and free() in gzio.c if STDC not defined
-- Use malloc() instead of calloc() in zutil.c if int big enough
-- Define STDC for AIX
-- Add aix/ with approach for compiling shared library on AIX
-- Add HP-UX support for shared libraries in configure
-- Add OpenUNIX support for shared libraries in configure
-- Use $cc instead of gcc to build shared library
-- Make prefix directory if needed when installing
-- Correct Macintosh avoidance of typedef Byte in zconf.h
-- Correct Turbo C memory allocation when under Linux
-- Use libz.a instead of -lz in Makefile (assure use of compiled library)
-- Update configure to check for snprintf or vsnprintf functions and their
-  return value, warn during make if using an insecure function
-- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that
-  is lost when library is used--resolution is to build new zconf.h
-- Documentation improvements (in zlib.h):
-    - Document raw deflate and inflate
-    - Update RFCs URL
-    - Point out that zlib and gzip formats are different
-    - Note that Z_BUF_ERROR is not fatal
-    - Document string limit for gzprintf() and possible buffer overflow
-    - Note requirement on avail_out when flushing
-    - Note permitted values of flush parameter of inflate()
-- Add some FAQs (and even answers) to the FAQ
-- Add contrib/inflate86/ for x86 faster inflate
-- Add contrib/blast/ for PKWare Data Compression Library decompression
-- Add contrib/puff/ simple inflate for deflate format description
-
-Changes in 1.1.4 (11 March 2002)
-- ZFREE was repeated on same allocation on some error conditions.
-  This creates a security problem described in
-  http://www.zlib.org/advisory-2002-03-11.txt
-- Returned incorrect error (Z_MEM_ERROR) on some invalid data
-- Avoid accesses before window for invalid distances with inflate window
-  less than 32K.
-- force windowBits > 8 to avoid a bug in the encoder for a window size
-  of 256 bytes. (A complete fix will be available in 1.1.5).
-
-Changes in 1.1.3 (9 July 1998)
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-- Support gzdopen on Mac with Metrowerks (Jason Linhart)
-- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)
-- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)
-- avoid some warnings with Borland C (Tom Tanner)
-- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)
-- emulate utime() for WIN32 in contrib/untgz  (Gilles Vollant)
-- allow several arguments to configure (Tim Mooney, Frodo Looijaard)
-- use libdir and includedir in Makefile.in (Tim Mooney)
-- support shared libraries on OSF1 V4 (Tim Mooney)
-- remove so_locations in "make clean"  (Tim Mooney)
-- fix maketree.c compilation error (Glenn, Mark)
-- Python interface to zlib now in Python 1.5 (Jeremy Hylton)
-- new Makefile.riscos (Rich Walker)
-- initialize static descriptors in trees.c for embedded targets (Nick Smith)
-- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith)
-- add the OS/2 files in Makefile.in too (Andrew Zabolotny)
-- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)
-- fix maketree.c to allow clean compilation of inffixed.h (Mark)
-- fix parameter check in deflateCopy (Gunther Nikl)
-- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)
-- Many portability patches by Christian Spieler:
-  . zutil.c, zutil.h: added "const" for zmem*
-  . Make_vms.com: fixed some typos
-  . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists
-  . msdos/Makefile.msc: remove "default rtl link library" info from obj files
-  . msdos/Makefile.*: use model-dependent name for the built zlib library
-  . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:
-     new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)
-- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)
-- replace __far with _far for better portability (Christian Spieler, Tom Lane)
-- fix test for errno.h in configure (Tim Newsham)
-
-Changes in 1.1.2 (19 March 98)
-- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)
-  See http://www.winimage.com/zLibDll/unzip.html
-- preinitialize the inflate tables for fixed codes, to make the code
-  completely thread safe (Mark)
-- some simplifications and slight speed-up to the inflate code (Mark)
-- fix gzeof on non-compressed files (Allan Schrum)
-- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)
-- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)
-- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)
-- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)
-- do not wrap extern "C" around system includes (Tom Lane)
-- mention zlib binding for TCL in README (Andreas Kupries)
-- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)
-- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson)
-- allow "configure --prefix $HOME" (Tim Mooney)
-- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)
-- move Makefile.sas to amiga/Makefile.sas
-
-Changes in 1.1.1 (27 Feb 98)
-- fix macros _tr_tally_* in deflate.h for debug mode  (Glenn Randers-Pehrson)
-- remove block truncation heuristic which had very marginal effect for zlib
-  (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the
-  compression ratio on some files. This also allows inlining _tr_tally for
-  matches in deflate_slow.
-- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
-
-Changes in 1.1.0 (24 Feb 98)
-- do not return STREAM_END prematurely in inflate (John Bowler)
-- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)
-- compile with -DFASTEST to get compression code optimized for speed only
-- in minigzip, try mmap'ing the input file first (Miguel Albrecht)
-- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain
-  on Sun but significant on HP)
-
-- add a pointer to experimental unzip library in README (Gilles Vollant)
-- initialize variable gcc in configure (Chris Herborth)
-
-Changes in 1.0.9 (17 Feb 1998)
-- added gzputs and gzgets functions
-- do not clear eof flag in gzseek (Mark Diekhans)
-- fix gzseek for files in transparent mode (Mark Diekhans)
-- do not assume that vsprintf returns the number of bytes written (Jens Krinke)
-- replace EXPORT with ZEXPORT to avoid conflict with other programs
-- added compress2 in zconf.h, zlib.def, zlib.dnt
-- new asm code from Gilles Vollant in contrib/asm386
-- simplify the inflate code (Mark):
- . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()
- . ZALLOC the length list in inflate_trees_fixed() instead of using stack
- . ZALLOC the value area for huft_build() instead of using stack
- . Simplify Z_FINISH check in inflate()
-
-- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
-- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
-- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
-  the declaration of FAR (Gilles VOllant)
-- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
-- read_buf buf parameter of type Bytef* instead of charf*
-- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
-- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)
-- fix check for presence of directories in "make install" (Ian Willis)
-
-Changes in 1.0.8 (27 Jan 1998)
-- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)
-- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)
-- added compress2() to allow setting the compression level
-- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)
-- use constant arrays for the static trees in trees.c instead of computing
-  them at run time (thanks to Ken Raeburn for this suggestion). To create
-  trees.h, compile with GEN_TREES_H and run "make test".
-- check return code of example in "make test" and display result
-- pass minigzip command line options to file_compress
-- simplifying code of inflateSync to avoid gcc 2.8 bug
-
-- support CC="gcc -Wall" in configure -s (QingLong)
-- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)
-- fix test for shared library support to avoid compiler warnings
-- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)
-- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)
-- do not use fdopen for Metrowerks on Mac (Brad Pettit))
-- add checks for gzputc and gzputc in example.c
-- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)
-- use const for the CRC table (Ken Raeburn)
-- fixed "make uninstall" for shared libraries
-- use Tracev instead of Trace in infblock.c
-- in example.c use correct compressed length for test_sync
-- suppress +vnocompatwarnings in configure for HPUX (not always supported)
-
-Changes in 1.0.7 (20 Jan 1998)
-- fix gzseek which was broken in write mode
-- return error for gzseek to negative absolute position
-- fix configure for Linux (Chun-Chung Chen)
-- increase stack space for MSC (Tim Wegner)
-- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
-- define EXPORTVA for gzprintf (Gilles Vollant)
-- added man page zlib.3 (Rick Rodgers)
-- for contrib/untgz, fix makedir() and improve Makefile
-
-- check gzseek in write mode in example.c
-- allocate extra buffer for seeks only if gzseek is actually called
-- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
-- add inflateSyncPoint in zconf.h
-- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def
-
-Changes in 1.0.6 (19 Jan 1998)
-- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
-  gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
-- Fix a deflate bug occurring only with compression level 0 (thanks to
-  Andy Buckler for finding this one).
-- In minigzip, pass transparently also the first byte for .Z files.
-- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
-- check Z_FINISH in inflate (thanks to Marc Schluper)
-- Implement deflateCopy (thanks to Adam Costello)
-- make static libraries by default in configure, add --shared option.
-- move MSDOS or Windows specific files to directory msdos
-- suppress the notion of partial flush to simplify the interface
-  (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
-- suppress history buffer provided by application to simplify the interface
-  (this feature was not implemented anyway in 1.0.4)
-- next_in and avail_in must be initialized before calling inflateInit or
-  inflateInit2
-- add EXPORT in all exported functions (for Windows DLL)
-- added Makefile.nt (thanks to Stephen Williams)
-- added the unsupported "contrib" directory:
-   contrib/asm386/ by Gilles Vollant <info at winimage.com>
-        386 asm code replacing longest_match().
-   contrib/iostream/ by Kevin Ruland <kevin at rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-   contrib/iostream2/  by Tyge Løvset <Tyge.Lovset at cmr.no>
-        Another C++ I/O streams interface
-   contrib/untgz/  by "Pedro A. Aranda Guti\irrez" <paag at tid.es>
-        A very simple tar.gz file extractor using zlib
-   contrib/visual-basic.txt by Carlos Rios <c_rios at sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB.
-- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
-  level) in minigzip (thanks to Tom Lane)
-
-- use const for rommable constants in deflate
-- added test for gzseek and gztell in example.c
-- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
-- add undocumented function zError to convert error code to string
-  (for Tim Smithers)
-- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code.
-- Use default memcpy for Symantec MSDOS compiler.
-- Add EXPORT keyword for check_func (needed for Windows DLL)
-- add current directory to LD_LIBRARY_PATH for "make test"
-- create also a link for libz.so.1
-- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
-- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
-- added -soname for Linux in configure (Chun-Chung Chen,
-- assign numbers to the exported functions in zlib.def (for Windows DLL)
-- add advice in zlib.h for best usage of deflateSetDictionary
-- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
-- allow compilation with ANSI keywords only enabled for TurboC in large model
-- avoid "versionString"[0] (Borland bug)
-- add NEED_DUMMY_RETURN for Borland
-- use variable z_verbose for tracing in debug mode (L. Peter Deutsch).
-- allow compilation with CC
-- defined STDC for OS/2 (David Charlap)
-- limit external names to 8 chars for MVS (Thomas Lund)
-- in minigzip.c, use static buffers only for 16-bit systems
-- fix suffix check for "minigzip -d foo.gz"
-- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
-- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
-- added makelcc.bat for lcc-win32 (Tom St Denis)
-- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
-- Avoid expanded $Id: ChangeLog,v 1.2 2007/03/14 12:54:14 source Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
-- check for unistd.h in configure (for off_t)
-- remove useless check parameter in inflate_blocks_free
-- avoid useless assignment of s->check to itself in inflate_blocks_new
-- do not flush twice in gzclose (thanks to Ken Raeburn)
-- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
-- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
-- work around buggy fclose on pipes for HP/UX
-- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
-- fix configure if CC is already equal to gcc
-
-Changes in 1.0.5 (3 Jan 98)
-- Fix inflate to terminate gracefully when fed corrupted or invalid data
-- Use const for rommable constants in inflate
-- Eliminate memory leaks on error conditions in inflate
-- Removed some vestigial code in inflate
-- Update web address in README
-
-Changes in 1.0.4 (24 Jul 96)
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
-  bit, so the decompressor could decompress all the correct data but went
-  on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-- use z_error only for DEBUG (avoid problem with DLLs)
-
-Changes in 1.0.3 (2 Jul 96)
-- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
-  small and medium models; this makes the library incompatible with previous
-  versions for these models. (No effect in large model or on other systems.)
-- return OK instead of BUF_ERROR if previous deflate call returned with
-  avail_out as zero but there is nothing to do
-- added memcmp for non STDC compilers
-- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
-- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
-- better check for 16-bit mode MSC (avoids problem with Symantec)
-
-Changes in 1.0.2 (23 May 96)
-- added Windows DLL support
-- added a function zlibVersion (for the DLL support)
-- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
-- Bytef is define's instead of typedef'd only for Borland C
-- avoid reading uninitialized memory in example.c
-- mention in README that the zlib format is now RFC1950
-- updated Makefile.dj2
-- added algorithm.doc
-
-Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
-- fix array overlay in deflate.c which sometimes caused bad compressed data
-- fix inflate bug with empty stored block
-- fix MSDOS medium model which was broken in 0.99
-- fix deflateParams() which could generated bad compressed data.
-- Bytef is define'd instead of typedef'ed (work around Borland bug)
-- added an INDEX file
-- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
-  Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
-- speed up adler32 for modern machines without auto-increment
-- added -ansi for IRIX in configure
-- static_init_done in trees.c is an int
-- define unlink as delete for VMS
-- fix configure for QNX
-- add configure branch for SCO and HPUX
-- avoid many warnings (unused variables, dead assignments, etc...)
-- no fdopen for BeOS
-- fix the Watcom fix for 32 bit mode (define FAR as empty)
-- removed redefinition of Byte for MKWERKS
-- work around an MWKERKS bug (incorrect merge of all .h files)
-
-Changes in 0.99 (27 Jan 96)
-- allow preset dictionary shared between compressor and decompressor
-- allow compression level 0 (no compression)
-- add deflateParams in zlib.h: allow dynamic change of compression level
-  and compression strategy.
-- test large buffers and deflateParams in example.c
-- add optional "configure" to build zlib as a shared library
-- suppress Makefile.qnx, use configure instead
-- fixed deflate for 64-bit systems (detected on Cray)
-- fixed inflate_blocks for 64-bit systems (detected on Alpha)
-- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
-- always return Z_BUF_ERROR when deflate() has nothing to do
-- deflateInit and inflateInit are now macros to allow version checking
-- prefix all global functions and types with z_ with -DZ_PREFIX
-- make falloc completely reentrant (inftrees.c)
-- fixed very unlikely race condition in ct_static_init
-- free in reverse order of allocation to help memory manager
-- use zlib-1.0/* instead of zlib/* inside the tar.gz
-- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
-  -Wconversion -Wstrict-prototypes -Wmissing-prototypes"
-- allow gzread on concatenated .gz files
-- deflateEnd now returns Z_DATA_ERROR if it was premature
-- deflate is finally (?) fully deterministic (no matches beyond end of input)
-- Document Z_SYNC_FLUSH
-- add uninstall in Makefile
-- Check for __cpluplus in zlib.h
-- Better test in ct_align for partial flush
-- avoid harmless warnings for Borland C++
-- initialize hash_head in deflate.c
-- avoid warning on fdopen (gzio.c) for HP cc -Aa
-- include stdlib.h for STDC compilers
-- include errno.h for Cray
-- ignore error if ranlib doesn't exist
-- call ranlib twice for NeXTSTEP
-- use exec_prefix instead of prefix for libz.a
-- renamed ct_* as _tr_* to avoid conflict with applications
-- clear z->msg in inflateInit2 before any error return
-- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
-- fixed typo in zconf.h (_GNUC__ => __GNUC__)
-- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
-- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
-- in fcalloc, normalize pointer if size > 65520 bytes
-- don't use special fcalloc for 32 bit Borland C++
-- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
-- use Z_BINARY instead of BINARY
-- document that gzclose after gzdopen will close the file
-- allow "a" as mode in gzopen.
-- fix error checking in gzread
-- allow skipping .gz extra-field on pipes
-- added reference to Perl interface in README
-- put the crc table in FAR data (I dislike more and more the medium model :)
-- added get_crc_table
-- added a dimension to all arrays (Borland C can't count).
-- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
-- guard against multiple inclusion of *.h (for precompiled header on Mac)
-- Watcom C pretends to be Microsoft C small model even in 32 bit mode.
-- don't use unsized arrays to avoid silly warnings by Visual C++:
-     warning C4746: 'inflate_mask' : unsized array treated as  '__far'
-     (what's wrong with far data in far model?).
-- define enum out of inflate_blocks_state to allow compilation with C++
-
-Changes in 0.95 (16 Aug 95)
-- fix MSDOS small and medium model (now easier to adapt to any compiler)
-- inlined send_bits
-- fix the final (:-) bug for deflate with flush (output was correct but
-  not completely flushed in rare occasions).
-- default window size is same for compression and decompression
-  (it's now sufficient to set MAX_WBITS in zconf.h).
-- voidp -> voidpf and voidnp -> voidp (for consistency with other
-  typedefs and because voidnp was not near in large model).
-
-Changes in 0.94 (13 Aug 95)
-- support MSDOS medium model
-- fix deflate with flush (could sometimes generate bad output)
-- fix deflateReset (zlib header was incorrectly suppressed)
-- added support for VMS
-- allow a compression level in gzopen()
-- gzflush now calls fflush
-- For deflate with flush, flush even if no more input is provided.
-- rename libgz.a as libz.a
-- avoid complex expression in infcodes.c triggering Turbo C bug
-- work around a problem with gcc on Alpha (in INSERT_STRING)
-- don't use inline functions (problem with some gcc versions)
-- allow renaming of Byte, uInt, etc... with #define.
-- avoid warning about (unused) pointer before start of array in deflate.c
-- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
-- avoid reserved word 'new' in trees.c
-
-Changes in 0.93 (25 June 95)
-- temporarily disable inline functions
-- make deflate deterministic
-- give enough lookahead for PARTIAL_FLUSH
-- Set binary mode for stdin/stdout in minigzip.c for OS/2
-- don't even use signed char in inflate (not portable enough)
-- fix inflate memory leak for segmented architectures
-
-Changes in 0.92 (3 May 95)
-- don't assume that char is signed (problem on SGI)
-- Clear bit buffer when starting a stored block
-- no memcpy on Pyramid
-- suppressed inftest.c
-- optimized fill_window, put longest_match inline for gcc
-- optimized inflate on stored blocks.
-- untabify all sources to simplify patches
-
-Changes in 0.91 (2 May 95)
-- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
-- Document the memory requirements in zconf.h
-- added "make install"
-- fix sync search logic in inflateSync
-- deflate(Z_FULL_FLUSH) now works even if output buffer too short
-- after inflateSync, don't scare people with just "lo world"
-- added support for DJGPP
-
-Changes in 0.9 (1 May 95)
-- don't assume that zalloc clears the allocated memory (the TurboC bug
-  was Mark's bug after all :)
-- let again gzread copy uncompressed data unchanged (was working in 0.71)
-- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
-- added a test of inflateSync in example.c
-- moved MAX_WBITS to zconf.h because users might want to change that.
-- document explicitly that zalloc(64K) on MSDOS must return a normalized
-  pointer (zero offset)
-- added Makefiles for Microsoft C, Turbo C, Borland C++
-- faster crc32()
-
-Changes in 0.8 (29 April 95)
-- added fast inflate (inffast.c)
-- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
-  is incompatible with previous versions of zlib which returned Z_OK.
-- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
-  (actually that was not a compiler bug, see 0.81 above)
-- gzread no longer reads one extra byte in certain cases
-- In gzio destroy(), don't reference a freed structure
-- avoid many warnings for MSDOS
-- avoid the ERROR symbol which is used by MS Windows
-
-Changes in 0.71 (14 April 95)
-- Fixed more MSDOS compilation problems :( There is still a bug with
-  TurboC large model.
-
-Changes in 0.7 (14 April 95)
-- Added full inflate support.
-- Simplified the crc32() interface. The pre- and post-conditioning
-  (one's complement) is now done inside crc32(). WARNING: this is
-  incompatible with previous versions; see zlib.h for the new usage.
-
-Changes in 0.61 (12 April 95)
-- workaround for a bug in TurboC. example and minigzip now work on MSDOS.
-
-Changes in 0.6 (11 April 95)
-- added minigzip.c
-- added gzdopen to reopen a file descriptor as gzFile
-- added transparent reading of non-gziped files in gzread.
-- fixed bug in gzread (don't read crc as data)
-- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose).
-- don't allocate big arrays in the stack (for MSDOS)
-- fix some MSDOS compilation problems
-
-Changes in 0.5:
-- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
-  not yet Z_FULL_FLUSH.
-- support decompression but only in a single step (forced Z_FINISH)
-- added opaque object for zalloc and zfree.
-- added deflateReset and inflateReset
-- added a variable zlib_version for consistency checking.
-- renamed the 'filter' parameter of deflateInit2 as 'strategy'.
-  Added Z_FILTERED and Z_HUFFMAN_ONLY constants.
-
-Changes in 0.4:
-- avoid "zip" everywhere, use zlib instead of ziplib.
-- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
-  if compression method == 8.
-- added adler32 and crc32
-- renamed deflateOptions as deflateInit2, call one or the other but not both
-- added the method parameter for deflateInit2.
-- added inflateInit2
-- simplied considerably deflateInit and inflateInit by not supporting
-  user-provided history buffer. This is supported only in deflateInit2
-  and inflateInit2.
-
-Changes in 0.3:
-- prefix all macro names with Z_
-- use Z_FINISH instead of deflateEnd to finish compression.
-- added Z_HUFFMAN_ONLY
-- added gzerror()
diff --git a/libsrc/zlib/FAQ b/libsrc/zlib/FAQ
deleted file mode 100644
index 441d910..0000000
--- a/libsrc/zlib/FAQ
+++ /dev/null
@@ -1,339 +0,0 @@
-
-                Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page
-http://www.zlib.org which may have more recent information.
-The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. Is zlib Y2K-compliant?
-
-    Yes. zlib doesn't handle dates.
-
- 2. Where can I get a Windows DLL version?
-
-    The zlib sources can be compiled without change to produce a DLL.
-    See the file win32/DLL_FAQ.txt in the zlib distribution.
-    Pointers to the precompiled DLL are found in the zlib web site at
-    http://www.zlib.org.
-
- 3. Where can I get a Visual Basic interface to zlib?
-
-    See
-        * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
-        * contrib/visual-basic.txt in the zlib distribution
-        * win32/DLL_FAQ.txt in the zlib distribution
-
- 4. compress() returns Z_BUF_ERROR.
-
-    Make sure that before the call of compress, the length of the compressed
-    buffer is equal to the total size of the compressed buffer and not
-    zero. For Visual Basic, check that this parameter is passed by reference
-    ("as any"), not by value ("as long").
-
- 5. deflate() or inflate() returns Z_BUF_ERROR.
-
-    Before making the call, make sure that avail_in and avail_out are not
-    zero. When setting the parameter flush equal to Z_FINISH, also make sure
-    that avail_out is big enough to allow processing all pending input.
-    Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
-    inflate() can be made with more input or output space. A Z_BUF_ERROR
-    may in fact be unavoidable depending on how the functions are used, since
-    it is not possible to tell whether or not there is more output pending
-    when strm.avail_out returns with zero.
-
- 6. Where's the zlib documentation (man pages, etc.)?
-
-    It's in zlib.h for the moment, and Francis S. Lin has converted it to a
-    web page zlib.html. Volunteers to transform this to Unix-style man pages,
-    please contact us (zlib at gzip.org). Examples of zlib usage are in the files
-    example.c and minigzip.c.
-
- 7. Why don't you use GNU autoconf or libtool or ...?
-
-    Because we would like to keep zlib as a very small and simple
-    package. zlib is rather portable and doesn't need much configuration.
-
- 8. I found a bug in zlib.
-
-    Most of the time, such problems are due to an incorrect usage of
-    zlib. Please try to reproduce the problem with a small program and send
-    the corresponding source to us at zlib at gzip.org . Do not send
-    multi-megabyte data files without prior agreement.
-
- 9. Why do I get "undefined reference to gzputc"?
-
-    If "make test" produces something like
-
-       example.o(.text+0x154): undefined reference to `gzputc'
-
-    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
-    /usr/X11R6/lib. Remove any old versions, then do "make install".
-
-10. I need a Delphi interface to zlib.
-
-    See the contrib/delphi directory in the zlib distribution.
-
-11. Can zlib handle .zip archives?
-
-    Not by itself, no.  See the directory contrib/minizip in the zlib
-    distribution.
-
-12. Can zlib handle .Z files?
-
-    No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
-    the code of uncompress on your own.
-
-13. How can I make a Unix shared library?
-
-    make clean
-    ./configure -s
-    make
-
-14. How do I install a shared zlib library on Unix?
-
-    After the above, then:
-
-    make install
-
-    However, many flavors of Unix come with a shared zlib already installed.
-    Before going to the trouble of compiling a shared version of zlib and
-    trying to install it, you may want to check if it's already there! If you
-    can #include <zlib.h>, it's there. The -lz option will probably link to it.
-
-15. I have a question about OttoPDF.
-
-    We are not the authors of OttoPDF. The real author is on the OttoPDF web
-    site: Joel Hainley, jhainley at myndkryme.com.
-
-16. Can zlib decode Flate data in an Adobe PDF file?
-
-    Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
-    To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
-
-17. Why am I getting this "register_frame_info not found" error on Solaris?
-
-    After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
-    generates an error such as:
-
-        ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
-        symbol __register_frame_info: referenced symbol not found
-
-    The symbol __register_frame_info is not part of zlib, it is generated by
-    the C compiler (cc or gcc). You must recompile applications using zlib
-    which have this problem. This problem is specific to Solaris. See
-    http://www.sunfreeware.com for Solaris versions of zlib and applications
-    using zlib.
-
-18. Why does gzip give an error on a file I make with compress/deflate?
-
-    The compress and deflate functions produce data in the zlib format, which
-    is different and incompatible with the gzip format. The gz* functions in
-    zlib on the other hand use the gzip format. Both the zlib and gzip
-    formats use the same compressed data format internally, but have different
-    headers and trailers around the compressed data.
-
-19. Ok, so why are there two different formats?
-
-    The gzip format was designed to retain the directory information about
-    a single file, such as the name and last modification date. The zlib
-    format on the other hand was designed for in-memory and communication
-    channel applications, and has a much more compact header and trailer and
-    uses a faster integrity check than gzip.
-
-20. Well that's nice, but how do I make a gzip file in memory?
-
-    You can request that deflate write the gzip format instead of the zlib
-    format using deflateInit2(). You can also request that inflate decode
-    the gzip format using inflateInit2(). Read zlib.h for more details.
-
-21. Is zlib thread-safe?
-
-    Yes. However any library routines that zlib uses and any application-
-    provided memory allocation routines must also be thread-safe. zlib's gz*
-    functions use stdio library routines, and most of zlib's functions use the
-    library memory allocation routines by default. zlib's Init functions allow
-    for the application to provide custom memory allocation routines.
-
-    Of course, you should only operate on any given zlib or gzip stream from a
-    single thread at a time.
-
-22. Can I use zlib in my commercial application?
-
-    Yes. Please read the license in zlib.h.
-
-23. Is zlib under the GNU license?
-
-    No. Please read the license in zlib.h.
-
-24. The license says that altered source versions must be "plainly marked". So
-    what exactly do I need to do to meet that requirement?
-
-    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
-    particular, the final version number needs to be changed to "f", and an
-    identification string should be appended to ZLIB_VERSION. Version numbers
-    x.x.x.f are reserved for modifications to zlib by others than the zlib
-    maintainers. For example, if the version of the base zlib you are altering
-    is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
-    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
-    update the version strings in deflate.c and inftrees.c.
-
-    For altered source distributions, you should also note the origin and
-    nature of the changes in zlib.h, as well as in ChangeLog and README, along
-    with the dates of the alterations. The origin should include at least your
-    name (or your company's name), and an email address to contact for help or
-    issues with the library.
-
-    Note that distributing a compiled zlib library along with zlib.h and
-    zconf.h is also a source distribution, and so you should change
-    ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
-    in zlib.h as you would for a full source distribution.
-
-25. Will zlib work on a big-endian or little-endian architecture, and can I
-    exchange compressed data between them?
-
-    Yes and yes.
-
-26. Will zlib work on a 64-bit machine?
-
-    It should. It has been tested on 64-bit machines, and has no dependence
-    on any data types being limited to 32-bits in length. If you have any
-    difficulties, please provide a complete problem report to zlib at gzip.org
-
-27. Will zlib decompress data from the PKWare Data Compression Library?
-
-    No. The PKWare DCL uses a completely different compressed data format
-    than does PKZIP and zlib. However, you can look in zlib's contrib/blast
-    directory for a possible solution to your problem.
-
-28. Can I access data randomly in a compressed stream?
-
-    No, not without some preparation. If when compressing you periodically
-    use Z_FULL_FLUSH, carefully write all the pending data at those points,
-    and keep an index of those locations, then you can start decompression
-    at those points. You have to be careful to not use Z_FULL_FLUSH too
-    often, since it can significantly degrade compression.
-
-29. Does zlib work on MVS, OS/390, CICS, etc.?
-
-    We don't know for sure. We have heard occasional reports of success on
-    these systems. If you do use it on one of these, please provide us with
-    a report, instructions, and patches that we can reference when we get
-    these questions. Thanks.
-
-30. Is there some simpler, easier to read version of inflate I can look at
-    to understand the deflate format?
-
-    First off, you should read RFC 1951. Second, yes. Look in zlib's
-    contrib/puff directory.
-
-31. Does zlib infringe on any patents?
-
-    As far as we know, no. In fact, that was originally the whole point behind
-    zlib. Look here for some more information:
-
-    http://www.gzip.org/#faq11
-
-32. Can zlib work with greater than 4 GB of data?
-
-    Yes. inflate() and deflate() will process any amount of data correctly.
-    Each call of inflate() or deflate() is limited to input and output chunks
-    of the maximum value that can be stored in the compiler's "unsigned int"
-    type, but there is no limit to the number of chunks. Note however that the
-    strm.total_in and strm_total_out counters may be limited to 4 GB. These
-    counters are provided as a convenience and are not used internally by
-    inflate() or deflate(). The application can easily set up its own counters
-    updated after each call of inflate() or deflate() to count beyond 4 GB.
-    compress() and uncompress() may be limited to 4 GB, since they operate in a
-    single call. gzseek() and gztell() may be limited to 4 GB depending on how
-    zlib is compiled. See the zlibCompileFlags() function in zlib.h.
-
-    The word "may" appears several times above since there is a 4 GB limit
-    only if the compiler's "long" type is 32 bits. If the compiler's "long"
-    type is 64 bits, then the limit is 16 exabytes.
-
-33. Does zlib have any security vulnerabilities?
-
-    The only one that we are aware of is potentially in gzprintf(). If zlib
-    is compiled to use sprintf() or vsprintf(), then there is no protection
-    against a buffer overflow of a 4K string space, other than the caller of
-    gzprintf() assuring that the output will not exceed 4K. On the other
-    hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
-    normally be the case, then there is no vulnerability. The ./configure
-    script will display warnings if an insecure variation of sprintf() will
-    be used by gzprintf(). Also the zlibCompileFlags() function will return
-    information on what variant of sprintf() is used by gzprintf().
-
-    If you don't have snprintf() or vsnprintf() and would like one, you can
-    find a portable implementation here:
-
-        http://www.ijs.si/software/snprintf/
-
-    Note that you should be using the most recent version of zlib. Versions
-    1.1.3 and before were subject to a double-free vulnerability.
-
-34. Is there a Java version of zlib?
-
-    Probably what you want is to use zlib in Java. zlib is already included
-    as part of the Java SDK in the java.util.zip package. If you really want
-    a version of zlib written in the Java language, look on the zlib home
-    page for links: http://www.zlib.org/
-
-35. I get this or that compiler or source-code scanner warning when I crank it
-    up to maximally-pedantic. Can't you guys write proper code?
-
-    Many years ago, we gave up attempting to avoid warnings on every compiler
-    in the universe. It just got to be a waste of time, and some compilers
-    were downright silly. So now, we simply make sure that the code always
-    works.
-
-36. Valgrind (or some similar memory access checker) says that deflate is
-    performing a conditional jump that depends on an uninitialized value.
-    Isn't that a bug?
-
-    No.  That is intentional for performance reasons, and the output of
-    deflate is not affected.  This only started showing up recently since
-    zlib 1.2.x uses malloc() by default for allocations, whereas earlier
-    versions used calloc(), which zeros out the allocated memory.
-
-37. Will zlib read the (insert any ancient or arcane format here) compressed
-    data format?
-
-    Probably not. Look in the comp.compression FAQ for pointers to various
-    formats and associated software.
-
-38. How can I encrypt/decrypt zip files with zlib?
-
-    zlib doesn't support encryption. The original PKZIP encryption is very weak
-    and can be broken with freely available programs. To get strong encryption,
-    use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
-    For PKZIP compatible "encryption", look at http://www.info-zip.org/
-
-39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
-
-    "gzip" is the gzip format, and "deflate" is the zlib format. They should
-    probably have called the second one "zlib" instead to avoid confusion
-    with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
-    correctly points to the zlib specification in RFC 1950 for the "deflate"
-    transfer encoding, there have been reports of servers and browsers that
-    incorrectly produce or expect raw deflate data per the deflate
-    specficiation in RFC 1951, most notably Microsoft. So even though the
-    "deflate" transfer encoding using the zlib format would be the more
-    efficient approach (and in fact exactly what the zlib format was designed
-    for), using the "gzip" transfer encoding is probably more reliable due to
-    an unfortunate choice of name on the part of the HTTP 1.1 authors.
-
-    Bottom line: use the gzip format for HTTP 1.1 encoding.
-
-40. Does zlib support the new "Deflate64" format introduced by PKWare?
-
-    No. PKWare has apparently decided to keep that format proprietary, since
-    they have not documented it as they have previous compression formats.
-    In any case, the compression improvements are so modest compared to other
-    more modern approaches, that it's not worth the effort to implement.
-
-41. Can you please sign these lengthy legal documents and fax them back to us
-    so that we can use your software in our product?
-
-    No. Go away. Shoo.
diff --git a/libsrc/zlib/INDEX b/libsrc/zlib/INDEX
deleted file mode 100644
index 0587e59..0000000
--- a/libsrc/zlib/INDEX
+++ /dev/null
@@ -1,51 +0,0 @@
-ChangeLog       history of changes
-FAQ             Frequently Asked Questions about zlib
-INDEX           this file
-Makefile        makefile for Unix (generated by configure)
-Makefile.in     makefile for Unix (template for configure)
-README          guess what
-algorithm.txt   description of the (de)compression algorithm
-configure       configure script for Unix
-zconf.in.h      template for zconf.h (used by configure)
-
-amiga/          makefiles for Amiga SAS C
-as400/          makefiles for IBM AS/400
-msdos/          makefiles for MSDOS
-old/            makefiles for various architectures and zlib documentation
-                files that have not yet been updated for zlib 1.2.x
-projects/       projects for various Integrated Development Environments
-qnx/            makefiles for QNX
-win32/          makefiles for Windows
-
-                zlib public header files (must be kept):
-zconf.h
-zlib.h
-
-                private source files used to build the zlib library:
-adler32.c
-compress.c
-crc32.c
-crc32.h
-deflate.c
-deflate.h
-gzio.c
-infback.c
-inffast.c
-inffast.h
-inffixed.h
-inflate.c
-inflate.h
-inftrees.c
-inftrees.h
-trees.c
-trees.h
-uncompr.c
-zutil.c
-zutil.h
-
-                source files for sample programs:
-example.c
-minigzip.c
-
-                unsupported contribution by third parties
-See contrib/README.contrib
diff --git a/libsrc/zlib/Makefile.am b/libsrc/zlib/Makefile.am
deleted file mode 100644
index d19d699..0000000
--- a/libsrc/zlib/Makefile.am
+++ /dev/null
@@ -1,235 +0,0 @@
-#  
-#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-#  project.
-#  
-#  Copyright (C) 1998-2006 OpenLink Software
-#  
-#  This project 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; only version 2 of the License, dated June 1991.
-#  
-#  This program 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
-#  General Public License for more details.
-#  
-#  You should have received a copy of the GNU General Public License along
-#  with this program; if not, write to the Free Software Foundation, Inc.,
-#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#  
-#  
-
-
-if WITH_ZLIB
-noinst_LTLIBRARIES = libz.la
-endif
-
-noinst_HEADERS = \
-	crc32.h \
-	deflate.h \
-	inffast.h \
-	inffixed.h \
-	inflate.h \
-	inftrees.h \
-	trees.h \
-	zconf.h \
-	zconf.in.h \
-	zlib.h \
-	zutil.h
-
-libz_la_SOURCES = \
-	adler32.c \
-	compress.c \
-	crc32.c \
-	deflate.c \
-	gzio.c \
-	infback.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	trees.c \
-	uncompr.c \
-	zutil.c
-
-libz_la_CFLAGS  = @VIRT_AM_CFLAGS@
-libz_la_CFLAGS  += -I$(top_srcdir)/libsrc
-libz_la_CFLAGS  += -I$(top_srcdir)/libsrc/Dk
-libz_la_LDFLAGS = -prefer-pic
-
-
-# ----------------------------------------------------------------------
-#
-#  Additional files to distribute
-#
-# ----------------------------------------------------------------------
-EXTRA_DIST = \
-	ChangeLog \
-	FAQ \
-	INDEX \
-	README \
-	*.txt \
-	amiga/Makefile.pup \
-	amiga/Makefile.sas \
-	as400/*.txt \
-	as400/bndsrc \
-	as400/compile.clp \
-	as400/zlib.inc \
-	configure \
-	contrib/README.contrib \
-	contrib/ada/*.txt \
-	contrib/ada/buffer_demo.adb \
-	contrib/ada/mtest.adb \
-	contrib/ada/read.adb \
-	contrib/ada/test.adb \
-	contrib/ada/zlib-streams.adb \
-	contrib/ada/zlib-streams.ads \
-	contrib/ada/zlib-thin.adb \
-	contrib/ada/zlib-thin.ads \
-	contrib/ada/zlib.adb \
-	contrib/ada/zlib.ads \
-	contrib/ada/zlib.gpr \
-	contrib/asm586/README.586 \
-	contrib/asm586/match.S \
-	contrib/asm686/README.686 \
-	contrib/asm686/match.S \
-	contrib/blast/*.txt \
-	contrib/blast/README \
-	contrib/blast/blast.c \
-	contrib/blast/blast.h \
-	contrib/blast/test.pk \
-	contrib/delphi/*.txt \
-	contrib/delphi/ZLib.pas \
-	contrib/delphi/ZLibConst.pas \
-	contrib/delphi/zlibd32.mak \
-	contrib/dotzlib/*.txt \
-	contrib/dotzlib/DotZLib.build \
-	contrib/dotzlib/DotZLib.chm \
-	contrib/dotzlib/DotZLib.sln \
-	contrib/dotzlib/DotZLib/AssemblyInfo.cs \
-	contrib/dotzlib/DotZLib/ChecksumImpl.cs \
-	contrib/dotzlib/DotZLib/CircularBuffer.cs \
-	contrib/dotzlib/DotZLib/CodecBase.cs \
-	contrib/dotzlib/DotZLib/Deflater.cs \
-	contrib/dotzlib/DotZLib/DotZLib.cs \
-	contrib/dotzlib/DotZLib/DotZLib.csproj \
-	contrib/dotzlib/DotZLib/GZipStream.cs \
-	contrib/dotzlib/DotZLib/Inflater.cs \
-	contrib/dotzlib/DotZLib/UnitTests.cs \
-	contrib/infback9/README \
-	contrib/infback9/infback9.c \
-	contrib/infback9/infback9.h \
-	contrib/infback9/inffix9.h \
-	contrib/infback9/inflate9.h \
-	contrib/infback9/inftree9.c \
-	contrib/infback9/inftree9.h \
-	contrib/inflate86/inffas86.c \
-	contrib/inflate86/inffast.S \
-	contrib/iostream/test.cpp \
-	contrib/iostream/zfstream.cpp \
-	contrib/iostream/zfstream.h \
-	contrib/iostream2/zstream.h \
-	contrib/iostream2/zstream_test.cpp \
-	contrib/iostream3/README \
-	contrib/iostream3/TODO \
-	contrib/iostream3/test.cc \
-	contrib/iostream3/zfstream.cc \
-	contrib/iostream3/zfstream.h \
-	contrib/masm686/match.asm \
-	contrib/masmx64/*.txt \
-	contrib/masmx64/bld_ml64.bat \
-	contrib/masmx64/gvmat64.asm \
-	contrib/masmx64/inffas8664.c \
-	contrib/masmx64/inffasx64.asm \
-	contrib/masmx86/*.txt \
-	contrib/masmx86/bld_ml32.bat \
-	contrib/masmx86/gvmat32.asm \
-	contrib/masmx86/gvmat32c.c \
-	contrib/masmx86/inffas32.asm \
-	contrib/masmx86/mkasm.bat \
-	contrib/minizip/ChangeLogUnzip \
-	contrib/minizip/Makefile \
-	contrib/minizip/crypt.h \
-	contrib/minizip/ioapi.c \
-	contrib/minizip/ioapi.h \
-	contrib/minizip/iowin32.c \
-	contrib/minizip/iowin32.h \
-	contrib/minizip/miniunz.c \
-	contrib/minizip/minizip.c \
-	contrib/minizip/mztools.c \
-	contrib/minizip/mztools.h \
-	contrib/minizip/unzip.c \
-	contrib/minizip/unzip.h \
-	contrib/minizip/zip.c \
-	contrib/minizip/zip.h \
-	contrib/pascal/*.txt \
-	contrib/pascal/example.pas \
-	contrib/pascal/zlibd32.mak \
-	contrib/pascal/zlibpas.pas \
-	contrib/puff/README \
-	contrib/puff/puff.c \
-	contrib/puff/puff.h \
-	contrib/puff/zeros.raw \
-	contrib/testzlib/*.txt \
-	contrib/testzlib/testzlib.c \
-	contrib/untgz/Makefile \
-	contrib/untgz/Makefile.msc \
-	contrib/untgz/untgz.c \
-	contrib/vstudio/*.txt \
-	contrib/vstudio/vc7/miniunz.vcproj \
-	contrib/vstudio/vc7/minizip.vcproj \
-	contrib/vstudio/vc7/testzlib.vcproj \
-	contrib/vstudio/vc7/zlib.rc \
-	contrib/vstudio/vc7/zlibstat.vcproj \
-	contrib/vstudio/vc7/zlibvc.def \
-	contrib/vstudio/vc7/zlibvc.sln \
-	contrib/vstudio/vc7/zlibvc.vcproj \
-	contrib/vstudio/vc8/miniunz.vcproj \
-	contrib/vstudio/vc8/minizip.vcproj \
-	contrib/vstudio/vc8/testzlib.vcproj \
-	contrib/vstudio/vc8/testzlibdll.vcproj \
-	contrib/vstudio/vc8/zlib.rc \
-	contrib/vstudio/vc8/zlibstat.vcproj \
-	contrib/vstudio/vc8/zlibvc.def \
-	contrib/vstudio/vc8/zlibvc.sln \
-	contrib/vstudio/vc8/zlibvc.vcproj \
-	example.c \
-	examples/*.html \
-	examples/README.examples \
-	examples/fitblk.c \
-	examples/gun.c \
-	examples/gzappend.c \
-	examples/gzjoin.c \
-	examples/gzlog.c \
-	examples/gzlog.h \
-	examples/zpipe.c \
-	examples/zran.c \
-	make_vms.com \
-	minigzip.c \
-	msdos/Makefile.bor \
-	msdos/Makefile.dj2 \
-	msdos/Makefile.emx \
-	msdos/Makefile.msc \
-	msdos/Makefile.tc \
-	old/*.html \
-	old/*.txt \
-	old/Makefile.riscos \
-	old/README \
-	old/descrip.mms \
-	old/os2/Makefile.os2 \
-	old/os2/zlib.def \
-	projects/README.projects \
-	projects/visualc6/*.txt \
-	projects/visualc6/example.dsp \
-	projects/visualc6/minigzip.dsp \
-	projects/visualc6/zlib.dsp \
-	projects/visualc6/zlib.dsw \
-	qnx/package.qpg \
-	win32/*.txt \
-	win32/Makefile.bor \
-	win32/Makefile.emx \
-	win32/Makefile.gcc \
-	win32/Makefile.msc \
-	win32/zlib.def \
-	win32/zlib1.rc \
-	zconf.in.h \
-	zlib.3
diff --git a/libsrc/zlib/Makefile.in b/libsrc/zlib/Makefile.in
deleted file mode 100644
index 2feb4ff..0000000
--- a/libsrc/zlib/Makefile.in
+++ /dev/null
@@ -1,888 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-#  
-#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-#  project.
-#  
-#  Copyright (C) 1998-2006 OpenLink Software
-#  
-#  This project 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; only version 2 of the License, dated June 1991.
-#  
-#  This program 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
-#  General Public License for more details.
-#  
-#  You should have received a copy of the GNU General Public License along
-#  with this program; if not, write to the Free Software Foundation, Inc.,
-#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#  
-#  
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = libsrc/zlib
-DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in ChangeLog
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/binsrc/config/libtool.m4 \
-	$(top_srcdir)/binsrc/config/libxml.m4 \
-	$(top_srcdir)/binsrc/config/ltoptions.m4 \
-	$(top_srcdir)/binsrc/config/ltsugar.m4 \
-	$(top_srcdir)/binsrc/config/ltversion.m4 \
-	$(top_srcdir)/binsrc/config/lt~obsolete.m4 \
-	$(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/libsrc/Dk/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libz_la_LIBADD =
-am_libz_la_OBJECTS = libz_la-adler32.lo libz_la-compress.lo \
-	libz_la-crc32.lo libz_la-deflate.lo libz_la-gzio.lo \
-	libz_la-infback.lo libz_la-inffast.lo libz_la-inflate.lo \
-	libz_la-inftrees.lo libz_la-trees.lo libz_la-uncompr.lo \
-	libz_la-zutil.lo
-libz_la_OBJECTS = $(am_libz_la_OBJECTS)
-libz_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(libz_la_CFLAGS) $(CFLAGS) \
-	$(libz_la_LDFLAGS) $(LDFLAGS) -o $@
- at WITH_ZLIB_TRUE@am_libz_la_rpath =
-DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/libsrc/Dk
-depcomp = $(SHELL) $(top_srcdir)/binsrc/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
-SOURCES = $(libz_la_SOURCES)
-DIST_SOURCES = $(libz_la_SOURCES)
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_LDFLAGS = @AM_LDFLAGS@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BINDIR = @BINDIR@
-BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
-BUILD_GLIB_LIBS = @BUILD_GLIB_LIBS@
-BUILD_OPTS = @BUILD_OPTS@
-CC = @CC@
-CCDEBUG = @CCDEBUG@
-CCDEFS = @CCDEFS@
-CCDEPMODE = @CCDEPMODE@
-CCLIBS = @CCLIBS@
-CCOPT = @CCOPT@
-CCPLATFORMDEFS = @CCPLATFORMDEFS@
-CCWARN = @CCWARN@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FLEX = @FLEX@
-GAWK = @GAWK@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GMODULE_CFLAGS = @GMODULE_CFLAGS@
-GMODULE_LIBS = @GMODULE_LIBS@
-GPERF = @GPERF@
-GREP = @GREP@
-HSL_CPPFLAGS = @HSL_CPPFLAGS@
-HSL_LDFLAGS = @HSL_LDFLAGS@
-HSL_LIBS = @HSL_LIBS@
-HS_LOOKUP = @HS_LOOKUP@
-HTMLDOC = @HTMLDOC@
-IM_CONFIG = @IM_CONFIG@
-IM_CPPFLAGS = @IM_CPPFLAGS@
-IM_LDFLAGS = @IM_LDFLAGS@
-IM_LIBS = @IM_LIBS@
-INCDIR = @INCDIR@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBDIR = @LIBDIR@
-LIBDL = @LIBDL@
-LIBOBJS = @LIBOBJS@
-LIBRDL = @LIBRDL@
-LIBS = @LIBS@
-LIBTHR = @LIBTHR@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OPSYS = @OPSYS@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PERL_CFLAGS = @PERL_CFLAGS@
-PERL_LDFLAGS = @PERL_LDFLAGS@
-PKG_CONFIG = @PKG_CONFIG@
-PLSTATS = @PLSTATS@
-PORT = @PORT@
-PYTHON = @PYTHON@
-PYTHON_CFLAGS = @PYTHON_CFLAGS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-RANLIB = @RANLIB@
-RUBY = @RUBY@
-RUBY_CFLAGS = @RUBY_CFLAGS@
-RUBY_LDFLAGS = @RUBY_LDFLAGS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-SYSLIBS = @SYSLIBS@
-TOP = @TOP@
-VERSION = @VERSION@
-VIRT_AM_CFLAGS = @VIRT_AM_CFLAGS@
-WBXML2_CFLAGS = @WBXML2_CFLAGS@
-WBXML2_LDFLAGS = @WBXML2_LDFLAGS@
-WGET = @WGET@
-XML2_CONFIG = @XML2_CONFIG@
-XML_CPPFLAGS = @XML_CPPFLAGS@
-XML_LIBS = @XML_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-ZLIB_INC = @ZLIB_INC@
-ZLIB_LIB = @ZLIB_LIB@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_jdk2_path = @ac_jdk2_path@
-ac_jdk3_path = @ac_jdk3_path@
-ac_jdk4_path = @ac_jdk4_path@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-ccincl = @ccincl@
-clntlibs = @clntlibs@
-datadir = @datadir@
-datarootdir = @datarootdir@
-dbdir = @dbdir@
-demodir = @demodir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-hostingdir = @hostingdir@
-htmldir = @htmldir@
-htmldocdir = @htmldocdir@
-httprootdir = @httprootdir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-iodbc_LDFLAGS = @iodbc_LDFLAGS@
-java_CPPFLAGS = @java_CPPFLAGS@
-java_LDFLAGS = @java_LDFLAGS@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libxml_file = @libxml_file@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-openldap_CFLAGS = @openldap_CFLAGS@
-openldap_LDFLAGS = @openldap_LDFLAGS@
-openssl_CFLAGS = @openssl_CFLAGS@
-openssl_LDFLAGS = @openssl_LDFLAGS@
-pdfdir = @pdfdir@
-pdfdocdir = @pdfdocdir@
-php5_CFLAGS = @php5_CFLAGS@
-php5_LDFLAGS = @php5_LDFLAGS@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-srvrlibs = @srvrlibs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-vaddir = @vaddir@
- at WITH_ZLIB_TRUE@noinst_LTLIBRARIES = libz.la
-noinst_HEADERS = \
-	crc32.h \
-	deflate.h \
-	inffast.h \
-	inffixed.h \
-	inflate.h \
-	inftrees.h \
-	trees.h \
-	zconf.h \
-	zconf.in.h \
-	zlib.h \
-	zutil.h
-
-libz_la_SOURCES = \
-	adler32.c \
-	compress.c \
-	crc32.c \
-	deflate.c \
-	gzio.c \
-	infback.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	trees.c \
-	uncompr.c \
-	zutil.c
-
-libz_la_CFLAGS = @VIRT_AM_CFLAGS@ -I$(top_srcdir)/libsrc \
-	-I$(top_srcdir)/libsrc/Dk
-libz_la_LDFLAGS = -prefer-pic
-
-# ----------------------------------------------------------------------
-#
-#  Additional files to distribute
-#
-# ----------------------------------------------------------------------
-EXTRA_DIST = \
-	ChangeLog \
-	FAQ \
-	INDEX \
-	README \
-	*.txt \
-	amiga/Makefile.pup \
-	amiga/Makefile.sas \
-	as400/*.txt \
-	as400/bndsrc \
-	as400/compile.clp \
-	as400/zlib.inc \
-	configure \
-	contrib/README.contrib \
-	contrib/ada/*.txt \
-	contrib/ada/buffer_demo.adb \
-	contrib/ada/mtest.adb \
-	contrib/ada/read.adb \
-	contrib/ada/test.adb \
-	contrib/ada/zlib-streams.adb \
-	contrib/ada/zlib-streams.ads \
-	contrib/ada/zlib-thin.adb \
-	contrib/ada/zlib-thin.ads \
-	contrib/ada/zlib.adb \
-	contrib/ada/zlib.ads \
-	contrib/ada/zlib.gpr \
-	contrib/asm586/README.586 \
-	contrib/asm586/match.S \
-	contrib/asm686/README.686 \
-	contrib/asm686/match.S \
-	contrib/blast/*.txt \
-	contrib/blast/README \
-	contrib/blast/blast.c \
-	contrib/blast/blast.h \
-	contrib/blast/test.pk \
-	contrib/delphi/*.txt \
-	contrib/delphi/ZLib.pas \
-	contrib/delphi/ZLibConst.pas \
-	contrib/delphi/zlibd32.mak \
-	contrib/dotzlib/*.txt \
-	contrib/dotzlib/DotZLib.build \
-	contrib/dotzlib/DotZLib.chm \
-	contrib/dotzlib/DotZLib.sln \
-	contrib/dotzlib/DotZLib/AssemblyInfo.cs \
-	contrib/dotzlib/DotZLib/ChecksumImpl.cs \
-	contrib/dotzlib/DotZLib/CircularBuffer.cs \
-	contrib/dotzlib/DotZLib/CodecBase.cs \
-	contrib/dotzlib/DotZLib/Deflater.cs \
-	contrib/dotzlib/DotZLib/DotZLib.cs \
-	contrib/dotzlib/DotZLib/DotZLib.csproj \
-	contrib/dotzlib/DotZLib/GZipStream.cs \
-	contrib/dotzlib/DotZLib/Inflater.cs \
-	contrib/dotzlib/DotZLib/UnitTests.cs \
-	contrib/infback9/README \
-	contrib/infback9/infback9.c \
-	contrib/infback9/infback9.h \
-	contrib/infback9/inffix9.h \
-	contrib/infback9/inflate9.h \
-	contrib/infback9/inftree9.c \
-	contrib/infback9/inftree9.h \
-	contrib/inflate86/inffas86.c \
-	contrib/inflate86/inffast.S \
-	contrib/iostream/test.cpp \
-	contrib/iostream/zfstream.cpp \
-	contrib/iostream/zfstream.h \
-	contrib/iostream2/zstream.h \
-	contrib/iostream2/zstream_test.cpp \
-	contrib/iostream3/README \
-	contrib/iostream3/TODO \
-	contrib/iostream3/test.cc \
-	contrib/iostream3/zfstream.cc \
-	contrib/iostream3/zfstream.h \
-	contrib/masm686/match.asm \
-	contrib/masmx64/*.txt \
-	contrib/masmx64/bld_ml64.bat \
-	contrib/masmx64/gvmat64.asm \
-	contrib/masmx64/inffas8664.c \
-	contrib/masmx64/inffasx64.asm \
-	contrib/masmx86/*.txt \
-	contrib/masmx86/bld_ml32.bat \
-	contrib/masmx86/gvmat32.asm \
-	contrib/masmx86/gvmat32c.c \
-	contrib/masmx86/inffas32.asm \
-	contrib/masmx86/mkasm.bat \
-	contrib/minizip/ChangeLogUnzip \
-	contrib/minizip/Makefile \
-	contrib/minizip/crypt.h \
-	contrib/minizip/ioapi.c \
-	contrib/minizip/ioapi.h \
-	contrib/minizip/iowin32.c \
-	contrib/minizip/iowin32.h \
-	contrib/minizip/miniunz.c \
-	contrib/minizip/minizip.c \
-	contrib/minizip/mztools.c \
-	contrib/minizip/mztools.h \
-	contrib/minizip/unzip.c \
-	contrib/minizip/unzip.h \
-	contrib/minizip/zip.c \
-	contrib/minizip/zip.h \
-	contrib/pascal/*.txt \
-	contrib/pascal/example.pas \
-	contrib/pascal/zlibd32.mak \
-	contrib/pascal/zlibpas.pas \
-	contrib/puff/README \
-	contrib/puff/puff.c \
-	contrib/puff/puff.h \
-	contrib/puff/zeros.raw \
-	contrib/testzlib/*.txt \
-	contrib/testzlib/testzlib.c \
-	contrib/untgz/Makefile \
-	contrib/untgz/Makefile.msc \
-	contrib/untgz/untgz.c \
-	contrib/vstudio/*.txt \
-	contrib/vstudio/vc7/miniunz.vcproj \
-	contrib/vstudio/vc7/minizip.vcproj \
-	contrib/vstudio/vc7/testzlib.vcproj \
-	contrib/vstudio/vc7/zlib.rc \
-	contrib/vstudio/vc7/zlibstat.vcproj \
-	contrib/vstudio/vc7/zlibvc.def \
-	contrib/vstudio/vc7/zlibvc.sln \
-	contrib/vstudio/vc7/zlibvc.vcproj \
-	contrib/vstudio/vc8/miniunz.vcproj \
-	contrib/vstudio/vc8/minizip.vcproj \
-	contrib/vstudio/vc8/testzlib.vcproj \
-	contrib/vstudio/vc8/testzlibdll.vcproj \
-	contrib/vstudio/vc8/zlib.rc \
-	contrib/vstudio/vc8/zlibstat.vcproj \
-	contrib/vstudio/vc8/zlibvc.def \
-	contrib/vstudio/vc8/zlibvc.sln \
-	contrib/vstudio/vc8/zlibvc.vcproj \
-	example.c \
-	examples/*.html \
-	examples/README.examples \
-	examples/fitblk.c \
-	examples/gun.c \
-	examples/gzappend.c \
-	examples/gzjoin.c \
-	examples/gzlog.c \
-	examples/gzlog.h \
-	examples/zpipe.c \
-	examples/zran.c \
-	make_vms.com \
-	minigzip.c \
-	msdos/Makefile.bor \
-	msdos/Makefile.dj2 \
-	msdos/Makefile.emx \
-	msdos/Makefile.msc \
-	msdos/Makefile.tc \
-	old/*.html \
-	old/*.txt \
-	old/Makefile.riscos \
-	old/README \
-	old/descrip.mms \
-	old/os2/Makefile.os2 \
-	old/os2/zlib.def \
-	projects/README.projects \
-	projects/visualc6/*.txt \
-	projects/visualc6/example.dsp \
-	projects/visualc6/minigzip.dsp \
-	projects/visualc6/zlib.dsp \
-	projects/visualc6/zlib.dsw \
-	qnx/package.qpg \
-	win32/*.txt \
-	win32/Makefile.bor \
-	win32/Makefile.emx \
-	win32/Makefile.gcc \
-	win32/Makefile.msc \
-	win32/zlib.def \
-	win32/zlib1.rc \
-	zconf.in.h \
-	zlib.3
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libsrc/zlib/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu libsrc/zlib/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLTLIBRARIES:
-	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libz.la: $(libz_la_OBJECTS) $(libz_la_DEPENDENCIES) 
-	$(libz_la_LINK) $(am_libz_la_rpath) $(libz_la_OBJECTS) $(libz_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-adler32.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-compress.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-crc32.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-deflate.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-gzio.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-infback.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-inffast.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-inflate.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-inftrees.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-trees.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-uncompr.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libz_la-zutil.Plo at am__quote@
-
-.c.o:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c $<
-
-.c.obj:
- at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
- at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
-
-libz_la-adler32.lo: adler32.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-adler32.lo -MD -MP -MF $(DEPDIR)/libz_la-adler32.Tpo -c -o libz_la-adler32.lo `test -f 'adler32.c' || echo '$(srcdir)/'`adler32.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-adler32.Tpo $(DEPDIR)/libz_la-adler32.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='adler32.c' object='libz_la-adler32.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-adler32.lo `test -f 'adler32.c' || echo '$(srcdir)/'`adler32.c
-
-libz_la-compress.lo: compress.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-compress.lo -MD -MP -MF $(DEPDIR)/libz_la-compress.Tpo -c -o libz_la-compress.lo `test -f 'compress.c' || echo '$(srcdir)/'`compress.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-compress.Tpo $(DEPDIR)/libz_la-compress.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='compress.c' object='libz_la-compress.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-compress.lo `test -f 'compress.c' || echo '$(srcdir)/'`compress.c
-
-libz_la-crc32.lo: crc32.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-crc32.lo -MD -MP -MF $(DEPDIR)/libz_la-crc32.Tpo -c -o libz_la-crc32.lo `test -f 'crc32.c' || echo '$(srcdir)/'`crc32.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-crc32.Tpo $(DEPDIR)/libz_la-crc32.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crc32.c' object='libz_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-crc32.lo `test -f 'crc32.c' || echo '$(srcdir)/'`crc32.c
-
-libz_la-deflate.lo: deflate.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-deflate.lo -MD -MP -MF $(DEPDIR)/libz_la-deflate.Tpo -c -o libz_la-deflate.lo `test -f 'deflate.c' || echo '$(srcdir)/'`deflate.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-deflate.Tpo $(DEPDIR)/libz_la-deflate.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='deflate.c' object='libz_la-deflate.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-deflate.lo `test -f 'deflate.c' || echo '$(srcdir)/'`deflate.c
-
-libz_la-gzio.lo: gzio.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-gzio.lo -MD -MP -MF $(DEPDIR)/libz_la-gzio.Tpo -c -o libz_la-gzio.lo `test -f 'gzio.c' || echo '$(srcdir)/'`gzio.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-gzio.Tpo $(DEPDIR)/libz_la-gzio.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gzio.c' object='libz_la-gzio.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-gzio.lo `test -f 'gzio.c' || echo '$(srcdir)/'`gzio.c
-
-libz_la-infback.lo: infback.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-infback.lo -MD -MP -MF $(DEPDIR)/libz_la-infback.Tpo -c -o libz_la-infback.lo `test -f 'infback.c' || echo '$(srcdir)/'`infback.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-infback.Tpo $(DEPDIR)/libz_la-infback.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='infback.c' object='libz_la-infback.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-infback.lo `test -f 'infback.c' || echo '$(srcdir)/'`infback.c
-
-libz_la-inffast.lo: inffast.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-inffast.lo -MD -MP -MF $(DEPDIR)/libz_la-inffast.Tpo -c -o libz_la-inffast.lo `test -f 'inffast.c' || echo '$(srcdir)/'`inffast.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-inffast.Tpo $(DEPDIR)/libz_la-inffast.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='inffast.c' object='libz_la-inffast.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-inffast.lo `test -f 'inffast.c' || echo '$(srcdir)/'`inffast.c
-
-libz_la-inflate.lo: inflate.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-inflate.lo -MD -MP -MF $(DEPDIR)/libz_la-inflate.Tpo -c -o libz_la-inflate.lo `test -f 'inflate.c' || echo '$(srcdir)/'`inflate.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-inflate.Tpo $(DEPDIR)/libz_la-inflate.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='inflate.c' object='libz_la-inflate.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-inflate.lo `test -f 'inflate.c' || echo '$(srcdir)/'`inflate.c
-
-libz_la-inftrees.lo: inftrees.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-inftrees.lo -MD -MP -MF $(DEPDIR)/libz_la-inftrees.Tpo -c -o libz_la-inftrees.lo `test -f 'inftrees.c' || echo '$(srcdir)/'`inftrees.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-inftrees.Tpo $(DEPDIR)/libz_la-inftrees.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='inftrees.c' object='libz_la-inftrees.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-inftrees.lo `test -f 'inftrees.c' || echo '$(srcdir)/'`inftrees.c
-
-libz_la-trees.lo: trees.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-trees.lo -MD -MP -MF $(DEPDIR)/libz_la-trees.Tpo -c -o libz_la-trees.lo `test -f 'trees.c' || echo '$(srcdir)/'`trees.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-trees.Tpo $(DEPDIR)/libz_la-trees.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='trees.c' object='libz_la-trees.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-trees.lo `test -f 'trees.c' || echo '$(srcdir)/'`trees.c
-
-libz_la-uncompr.lo: uncompr.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-uncompr.lo -MD -MP -MF $(DEPDIR)/libz_la-uncompr.Tpo -c -o libz_la-uncompr.lo `test -f 'uncompr.c' || echo '$(srcdir)/'`uncompr.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-uncompr.Tpo $(DEPDIR)/libz_la-uncompr.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='uncompr.c' object='libz_la-uncompr.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-uncompr.lo `test -f 'uncompr.c' || echo '$(srcdir)/'`uncompr.c
-
-libz_la-zutil.lo: zutil.c
- at am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -MT libz_la-zutil.lo -MD -MP -MF $(DEPDIR)/libz_la-zutil.Tpo -c -o libz_la-zutil.lo `test -f 'zutil.c' || echo '$(srcdir)/'`zutil.c
- at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/libz_la-zutil.Tpo $(DEPDIR)/libz_la-zutil.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='zutil.c' object='libz_la-zutil.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libz_la_CFLAGS) $(CFLAGS) -c -o libz_la-zutil.lo `test -f 'zutil.c' || echo '$(srcdir)/'`zutil.c
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/libsrc/zlib/README b/libsrc/zlib/README
deleted file mode 100644
index 758cc50..0000000
--- a/libsrc/zlib/README
+++ /dev/null
@@ -1,125 +0,0 @@
-ZLIB DATA COMPRESSION LIBRARY
-
-zlib 1.2.3 is a general purpose data compression library.  All the code is
-thread safe.  The data format used by the zlib library is described by RFCs
-(Request for Comments) 1950 to 1952 in the files
-http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
-and rfc1952.txt (gzip format). These documents are also available in other
-formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib at gzip.org). A usage example
-of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
-compression library itself is composed of all source files except example.c and
-minigzip.c.
-
-To compile all files and run the test program, follow the instructions given at
-the top of Makefile. In short "make test; make install" should work for most
-machines. For Unix: "./configure; make test; make install". For MSDOS, use one
-of the special makefiles such as Makefile.msc. For VMS, use make_vms.com.
-
-Questions about zlib should be sent to <zlib at gzip.org>, or to Gilles Vollant
-<info at winimage.com> for the Windows DLL version. The zlib home page is
-http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
-please check this site to verify that you have the latest version of zlib;
-otherwise get the latest version and check whether the problem still exists or
-not.
-
-PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
-for help.
-
-Mark Nelson <markn at ieee.org> wrote an article about zlib for the Jan. 1997
-issue of  Dr. Dobb's Journal; a copy of the article is available in
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
-
-The changes made in version 1.2.3 are documented in the file ChangeLog.
-
-Unsupported third party contributions are provided in directory "contrib".
-
-A Java implementation of zlib is available in the Java Development Kit
-http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
-See the zlib home page http://www.zlib.org for details.
-
-A Perl interface to zlib written by Paul Marquess <pmqs at cpan.org> is in the
-CPAN (Comprehensive Perl Archive Network) sites
-http://www.cpan.org/modules/by-module/Compress/
-
-A Python interface to zlib written by A.M. Kuchling <amk at amk.ca> is
-available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
-
-A zlib binding for TCL written by Andreas Kupries <a.kupries at westend.com> is
-availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
-
-An experimental package to read and write files in .zip format, written on top
-of zlib by Gilles Vollant <info at winimage.com>, is available in the
-contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- For Windows DLL versions, please see win32/DLL_FAQ.txt
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization. With
-  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
-  compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
-  when compiled with cc.
-
-- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
-  necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
-  other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
-
-- For PalmOs, see http://palmzlib.sourceforge.net/
-
-- When building a shared, i.e. dynamic library on Mac OS X, the library must be
-  installed before testing (do "make install" before "make test"), since the
-  library location is specified in the library.
-
-
-Acknowledgments:
-
-  The deflate format used by zlib was defined by Phil Katz. The deflate
-  and zlib specifications were written by L. Peter Deutsch. Thanks to all the
-  people who reported problems and suggested various improvements in zlib;
-  they are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  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        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind.  The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes. Please
-read the FAQ for more information on the distribution of modified source
-versions.
diff --git a/libsrc/zlib/adler32.c b/libsrc/zlib/adler32.c
deleted file mode 100644
index c5b2265..0000000
--- a/libsrc/zlib/adler32.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: adler32.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#define BASE 65521UL    /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
-#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf)   DO8(buf,0); DO8(buf,8);
-
-/* use NO_DIVIDE if your processor does not do division in hardware */
-#ifdef NO_DIVIDE
-#  define MOD(a) \
-    do { \
-        if (a >= (BASE << 16)) a -= (BASE << 16); \
-        if (a >= (BASE << 15)) a -= (BASE << 15); \
-        if (a >= (BASE << 14)) a -= (BASE << 14); \
-        if (a >= (BASE << 13)) a -= (BASE << 13); \
-        if (a >= (BASE << 12)) a -= (BASE << 12); \
-        if (a >= (BASE << 11)) a -= (BASE << 11); \
-        if (a >= (BASE << 10)) a -= (BASE << 10); \
-        if (a >= (BASE << 9)) a -= (BASE << 9); \
-        if (a >= (BASE << 8)) a -= (BASE << 8); \
-        if (a >= (BASE << 7)) a -= (BASE << 7); \
-        if (a >= (BASE << 6)) a -= (BASE << 6); \
-        if (a >= (BASE << 5)) a -= (BASE << 5); \
-        if (a >= (BASE << 4)) a -= (BASE << 4); \
-        if (a >= (BASE << 3)) a -= (BASE << 3); \
-        if (a >= (BASE << 2)) a -= (BASE << 2); \
-        if (a >= (BASE << 1)) a -= (BASE << 1); \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#  define MOD4(a) \
-    do { \
-        if (a >= (BASE << 4)) a -= (BASE << 4); \
-        if (a >= (BASE << 3)) a -= (BASE << 3); \
-        if (a >= (BASE << 2)) a -= (BASE << 2); \
-        if (a >= (BASE << 1)) a -= (BASE << 1); \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#else
-#  define MOD(a) a %= BASE
-#  define MOD4(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
-    uLong adler;
-    const Bytef *buf;
-    uInt len;
-{
-    unsigned long sum2;
-    unsigned n;
-
-    /* split Adler-32 into component sums */
-    sum2 = (adler >> 16) & 0xffff;
-    adler &= 0xffff;
-
-    /* in case user likes doing a byte at a time, keep it fast */
-    if (len == 1) {
-        adler += buf[0];
-        if (adler >= BASE)
-            adler -= BASE;
-        sum2 += adler;
-        if (sum2 >= BASE)
-            sum2 -= BASE;
-        return adler | (sum2 << 16);
-    }
-
-    /* initial Adler-32 value (deferred check for len == 1 speed) */
-    if (buf == Z_NULL)
-        return 1L;
-
-    /* in case short lengths are provided, keep it somewhat fast */
-    if (len < 16) {
-        while (len--) {
-            adler += *buf++;
-            sum2 += adler;
-        }
-        if (adler >= BASE)
-            adler -= BASE;
-        MOD4(sum2);             /* only added so many BASE's */
-        return adler | (sum2 << 16);
-    }
-
-    /* do length NMAX blocks -- requires just one modulo operation */
-    while (len >= NMAX) {
-        len -= NMAX;
-        n = NMAX / 16;          /* NMAX is divisible by 16 */
-        do {
-            DO16(buf);          /* 16 sums unrolled */
-            buf += 16;
-        } while (--n);
-        MOD(adler);
-        MOD(sum2);
-    }
-
-    /* do remaining bytes (less than NMAX, still just one modulo) */
-    if (len) {                  /* avoid modulos if none remaining */
-        while (len >= 16) {
-            len -= 16;
-            DO16(buf);
-            buf += 16;
-        }
-        while (len--) {
-            adler += *buf++;
-            sum2 += adler;
-        }
-        MOD(adler);
-        MOD(sum2);
-    }
-
-    /* return recombined sums */
-    return adler | (sum2 << 16);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
-    uLong adler1;
-    uLong adler2;
-    z_off_t len2;
-{
-    unsigned long sum1;
-    unsigned long sum2;
-    unsigned rem;
-
-    /* the derivation of this formula is left as an exercise for the reader */
-    rem = (unsigned)(len2 % BASE);
-    sum1 = adler1 & 0xffff;
-    sum2 = rem * sum1;
-    MOD(sum2);
-    sum1 += (adler2 & 0xffff) + BASE - 1;
-    sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
-    if (sum1 > BASE) sum1 -= BASE;
-    if (sum1 > BASE) sum1 -= BASE;
-    if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
-    if (sum2 > BASE) sum2 -= BASE;
-    return sum1 | (sum2 << 16);
-}
diff --git a/libsrc/zlib/algorithm.txt b/libsrc/zlib/algorithm.txt
deleted file mode 100644
index b022dde..0000000
--- a/libsrc/zlib/algorithm.txt
+++ /dev/null
@@ -1,209 +0,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by gzip (also zip and zlib) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data.  The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length).  Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes.  (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for
-a longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the process of lazy evaluation begins again. Otherwise,
-the original match is kept, and the next match search is attempted only N
-steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-2.1 Introduction
-
-The key question is how to represent a Huffman code (or any prefix code) so
-that you can decode fast.  The most important characteristic is that shorter
-codes are much more common than longer codes, so pay attention to decoding the
-short codes fast, and let the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code.  It gets that many bits from the
-stream, and looks it up in the table.  The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table.  If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code.  However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table.  What inflate() does is
-simply to make the number of bits in the first table a variable, and  then
-to set that variable for the maximum speed.
-
-For inflate, which has 286 possible codes for the literal/length tree, the size
-of the first table is nine bits.  Also the distance trees have 30 possible
-values, and the size of the first table is six bits.  Note that for each of
-those cases, the table ended up one bit longer than the ``average'' code
-length, i.e. the code length of an approximately flat code which would be a
-little more than eight bits for 286 symbols and a little less than five bits
-for 30 symbols.
-
-
-2.2 More details on the inflate table lookup
-
-Ok, you want to know what this cleverly obfuscated inflate tree actually
-looks like.  You are correct that it's not a Huffman tree.  It is simply a
-lookup table for the first, let's say, nine bits of a Huffman symbol.  The
-symbol could be as short as one bit or as long as 15 bits.  If a particular
-symbol is shorter than nine bits, then that symbol's translation is duplicated
-in all those entries that start with that symbol's bits.  For example, if the
-symbol is four bits, then it's duplicated 32 times in a nine-bit table.  If a
-symbol is nine bits long, it appears in the table once.
-
-If the symbol is longer than nine bits, then that entry in the table points
-to another similar table for the remaining bits.  Again, there are duplicated
-entries as needed.  The idea is that most of the time the symbol will be short
-and there will only be one table look up.  (That's whole idea behind data
-compression in the first place.)  For the less frequent long symbols, there
-will be two lookups.  If you had a compression method with really long
-symbols, you could have as many levels of lookups as is efficient.  For
-inflate, two is enough.
-
-So a table entry either points to another table (in which case nine bits in
-the above example are gobbled), or it contains the translation for the symbol
-and the number of bits to gobble.  Then you start again with the next
-ungobbled bit.
-
-You may wonder: why not just have one lookup table for how ever many bits the
-longest symbol is?  The reason is that if you do that, you end up spending
-more time filling in duplicate symbol entries than you do actually decoding.
-At least for deflate's output that generates new trees every several 10's of
-kbytes.  You can imagine that filling in a 2^15 entry table for a 15-bit code
-would take too long if you're only decoding several thousand symbols.  At the
-other extreme, you could make a new table for every bit in the code.  In fact,
-that's essentially a Huffman tree.  But then you spend two much time
-traversing the tree while decoding, even for short symbols.
-
-So the number of bits for the first lookup table is a trade of the time to
-fill out the table vs. the time spent looking at the second level and above of
-the table.
-
-Here is an example, scaled down:
-
-The code being decoded, with 10 symbols, from 1 to 6 bits long:
-
-A: 0
-B: 10
-C: 1100
-D: 11010
-E: 11011
-F: 11100
-G: 11101
-H: 11110
-I: 111110
-J: 111111
-
-Let's make the first table three bits long (eight entries):
-
-000: A,1
-001: A,1
-010: A,1
-011: A,1
-100: B,2
-101: B,2
-110: -> table X (gobble 3 bits)
-111: -> table Y (gobble 3 bits)
-
-Each entry is what the bits decode as and how many bits that is, i.e. how
-many bits to gobble.  Or the entry points to another table, with the number of
-bits to gobble implicit in the size of the table.
-
-Table X is two bits long since the longest code starting with 110 is five bits
-long:
-
-00: C,1
-01: C,1
-10: D,2
-11: E,2
-
-Table Y is three bits long since the longest code starting with 111 is six
-bits long:
-
-000: F,2
-001: F,2
-010: G,2
-011: G,2
-100: H,2
-101: H,2
-110: I,3
-111: J,3
-
-So what we have here are three tables with a total of 20 entries that had to
-be constructed.  That's compared to 64 entries for a single table.  Or
-compared to 16 entries for a Huffman tree (six two entry tables and one four
-entry table).  Assuming that the code ideally represents the probability of
-the symbols, it takes on the average 1.25 lookups per symbol.  That's compared
-to one lookup for the single table, or 1.66 lookups per symbol for the
-Huffman tree.
-
-There, I think that gives you a picture of what's going on.  For inflate, the
-meaning of a particular symbol is often more than just a letter.  It can be a
-byte (a "literal"), or it can be either a length or a distance which
-indicates a base value and a number of bits to fetch after the code that is
-added to the base value.  Or it might be the special end-of-block code.  The
-data structures created in inftrees.c try to encode all that information
-compactly in the tables.
-
-
-Jean-loup Gailly        Mark Adler
-jloup at gzip.org          madler at alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-http://www.ietf.org/rfc/rfc1951.txt
diff --git a/libsrc/zlib/amiga/Makefile.pup b/libsrc/zlib/amiga/Makefile.pup
deleted file mode 100644
index 3f7e155..0000000
--- a/libsrc/zlib/amiga/Makefile.pup
+++ /dev/null
@@ -1,66 +0,0 @@
-# Amiga powerUP (TM) Makefile
-# makefile for libpng and SAS C V6.58/7.00 PPC compiler
-# Copyright (C) 1998 by Andreas R. Kleinert
-
-LIBNAME	= libzip.a
-
-CC	= scppc
-CFLAGS	= NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \
-	  OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER
-AR	= ppc-amigaos-ar cr
-RANLIB	= ppc-amigaos-ranlib
-LD	= ppc-amigaos-ld -r
-LDFLAGS	= -o
-LDLIBS	= LIB:scppc.a LIB:end.o
-RM	= delete quiet
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example minigzip
-
-check: test
-test: all
-	example
-	echo hello world | minigzip | minigzip -d
-
-$(LIBNAME): $(OBJS)
-	$(AR) $@ $(OBJS)
-	-$(RANLIB) $@
-
-example: example.o $(LIBNAME)
-	$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-minigzip: minigzip.o $(LIBNAME)
-	$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-mostlyclean: clean
-clean:
-	$(RM) *.o example minigzip $(LIBNAME) foo.gz
-
-zip:
-	zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
-	  descrip.mms *.[ch]
-
-tgz:
-	cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
-	  zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/libsrc/zlib/amiga/Makefile.sas b/libsrc/zlib/amiga/Makefile.sas
deleted file mode 100644
index 296ef48..0000000
--- a/libsrc/zlib/amiga/Makefile.sas
+++ /dev/null
@@ -1,65 +0,0 @@
-# SMakefile for zlib
-# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly
-# Osma Ahvenlampi <Osma.Ahvenlampi at hut.fi>
-# Amiga, SAS/C 6.56 & Smake
-
-CC=sc
-CFLAGS=OPT
-#CFLAGS=OPT CPU=68030
-#CFLAGS=DEBUG=LINE
-LDFLAGS=LIB z.lib
-
-SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \
-       NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \
-       DEF=POSTINC
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: SCOPTIONS example minigzip
-
-check: test
-test: all
-	example
-	echo hello world | minigzip | minigzip -d
-
-install: z.lib
-	copy clone zlib.h zconf.h INCLUDE:
-	copy clone z.lib LIB:
-
-z.lib: $(OBJS)
-	oml z.lib r $(OBJS)
-
-example: example.o z.lib
-	$(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o z.lib
-	$(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS)
-
-mostlyclean: clean
-clean:
-	-delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS
-
-SCOPTIONS: Makefile.sas
-	copy to $@ <from <
-$(SCOPTIONS)
-<
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/libsrc/zlib/as400/bndsrc b/libsrc/zlib/as400/bndsrc
deleted file mode 100644
index 9cf94bb..0000000
--- a/libsrc/zlib/as400/bndsrc
+++ /dev/null
@@ -1,132 +0,0 @@
-STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/*   Version 1.1.3 entry points.                                    */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/*   *MODULE      ADLER32      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("adler32")
-
-/********************************************************************/
-/*   *MODULE      COMPRESS     ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("compress")
-  EXPORT SYMBOL("compress2")
-
-/********************************************************************/
-/*   *MODULE      CRC32        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("crc32")
-  EXPORT SYMBOL("get_crc_table")
-
-/********************************************************************/
-/*   *MODULE      DEFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("deflate")
-  EXPORT SYMBOL("deflateEnd")
-  EXPORT SYMBOL("deflateSetDictionary")
-  EXPORT SYMBOL("deflateCopy")
-  EXPORT SYMBOL("deflateReset")
-  EXPORT SYMBOL("deflateParams")
-  EXPORT SYMBOL("deflatePrime")
-  EXPORT SYMBOL("deflateInit_")
-  EXPORT SYMBOL("deflateInit2_")
-
-/********************************************************************/
-/*   *MODULE      GZIO         ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("gzopen")
-  EXPORT SYMBOL("gzdopen")
-  EXPORT SYMBOL("gzsetparams")
-  EXPORT SYMBOL("gzread")
-  EXPORT SYMBOL("gzwrite")
-  EXPORT SYMBOL("gzprintf")
-  EXPORT SYMBOL("gzputs")
-  EXPORT SYMBOL("gzgets")
-  EXPORT SYMBOL("gzputc")
-  EXPORT SYMBOL("gzgetc")
-  EXPORT SYMBOL("gzflush")
-  EXPORT SYMBOL("gzseek")
-  EXPORT SYMBOL("gzrewind")
-  EXPORT SYMBOL("gztell")
-  EXPORT SYMBOL("gzeof")
-  EXPORT SYMBOL("gzclose")
-  EXPORT SYMBOL("gzerror")
-
-/********************************************************************/
-/*   *MODULE      INFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflate")
-  EXPORT SYMBOL("inflateEnd")
-  EXPORT SYMBOL("inflateSetDictionary")
-  EXPORT SYMBOL("inflateSync")
-  EXPORT SYMBOL("inflateReset")
-  EXPORT SYMBOL("inflateInit_")
-  EXPORT SYMBOL("inflateInit2_")
-  EXPORT SYMBOL("inflateSyncPoint")
-
-/********************************************************************/
-/*   *MODULE      UNCOMPR      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("uncompress")
-
-/********************************************************************/
-/*   *MODULE      ZUTIL        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("zlibVersion")
-  EXPORT SYMBOL("zError")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/*   Version 1.2.1 additional entry points.                         */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/*   *MODULE      COMPRESS     ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("compressBound")
-
-/********************************************************************/
-/*   *MODULE      DEFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("deflateBound")
-
-/********************************************************************/
-/*   *MODULE      GZIO         ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("gzungetc")
-  EXPORT SYMBOL("gzclearerr")
-
-/********************************************************************/
-/*   *MODULE      INFBACK      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflateBack")
-  EXPORT SYMBOL("inflateBackEnd")
-  EXPORT SYMBOL("inflateBackInit_")
-
-/********************************************************************/
-/*   *MODULE      INFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflateCopy")
-
-/********************************************************************/
-/*   *MODULE      ZUTIL        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("zlibCompileFlags")
-
-ENDPGMEXP
diff --git a/libsrc/zlib/as400/compile.clp b/libsrc/zlib/as400/compile.clp
deleted file mode 100644
index 8554951..0000000
--- a/libsrc/zlib/as400/compile.clp
+++ /dev/null
@@ -1,123 +0,0 @@
-/******************************************************************************/
-/*                                                                            */
-/*  ZLIB                                                                      */
-/*                                                                            */
-/*    Compile sources into modules and link them into a service program.      */
-/*                                                                            */
-/******************************************************************************/
-
-             PGM
-
-/*      Configuration adjustable parameters.                                  */
-
-             DCL        VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('ZLIB')                         /* Source library. */
-             DCL        VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
-                          VALUE('SOURCES')                      /* Source member file. */
-             DCL        VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
-                          VALUE('TOOLS')                        /* Control member file. */
-
-             DCL        VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('ZLIB')                         /* Module library. */
-
-             DCL        VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('LGPL')                         /* Service program library. */
-
-             DCL        VAR(&CFLAGS) TYPE(*CHAR) +
-                          VALUE('OPTIMIZE(40)')                 /* Compile options. */
-
-
-/*      Working storage.                                                      */
-
-             DCL        VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300)    /* Command length. */
-             DCL        VAR(&CMD) TYPE(*CHAR) LEN(512)
-
-
-/*      Compile sources into modules.                                         */
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/ADLER32)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/COMPRESS)              SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/CRC32)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/DEFLATE)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/GZIO)                  SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFBACK)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFFAST)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFLATE)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFTREES)              SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/TREES)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/UNCOMPR)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/ZUTIL)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-
-/*      Link modules into a service program.                                  */
-
-             CRTSRVPGM  SRVPGM(&SRVLIB/ZLIB) +
-                          MODULE(&MODLIB/ADLER32     &MODLIB/COMPRESS    +
-                                 &MODLIB/CRC32       &MODLIB/DEFLATE     +
-                                 &MODLIB/GZIO        &MODLIB/INFBACK     +
-                                 &MODLIB/INFFAST     &MODLIB/INFLATE     +
-                                 &MODLIB/INFTREES    &MODLIB/TREES       +
-                                 &MODLIB/UNCOMPR     &MODLIB/ZUTIL)      +
-                          SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
-                          TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)
-
-             ENDPGM
diff --git a/libsrc/zlib/as400/readme.txt b/libsrc/zlib/as400/readme.txt
deleted file mode 100644
index beae13f..0000000
--- a/libsrc/zlib/as400/readme.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-        ZLIB version 1.2.3 for AS400 installation instructions
-
-I) From an AS400 *SAVF file:
-
-1)      Unpacking archive to an AS400 save file
-
-On the AS400:
-
-_       Create the ZLIB AS400 library:
-
-        CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
-
-_       Create a work save file, for example:
-
-                CRTSAVF FILE(ZLIB/ZLIBSAVF)
-
-On a PC connected to the target AS400:
-
-_       Unpack the save file image to a PC file "ZLIBSAVF"
-_       Upload this file into the save file on the AS400, for example
-                using ftp in BINARY mode.
-
-
-2)      Populating the ZLIB AS400 source library
-
-On the AS400:
-
-_       Extract the saved objects into the ZLIB AS400 library using:
-
-RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB)
-
-
-3)      Customize installation:
-
-_       Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed,
-                according to the comments.
-
-_       Compile this member with:
-
-        CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE)
-
-
-4)      Compile and generate the service program:
-
-_       This can now be done by executing:
-
-        CALL PGM(ZLIB/COMPILE)
-
-
-
-II) From the original source distribution:
-
-1)      On the AS400, create the source library:
-
-        CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
-
-2)      Create the source files:
-
-        CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules')
-        CRTSRCPF FILE(ZLIB/H)       RCDLEN(112) TEXT('ZLIB library includes')
-        CRTSRCPF FILE(ZLIB/TOOLS)   RCDLEN(112) TEXT('ZLIB library control utilities')
-
-3)      From the machine hosting the distribution files, upload them (with
-                FTP in text mode, for example) according to the following table:
-
-    Original    AS400   AS400    AS400 AS400
-    file        file    member   type  description
-                SOURCES                Original ZLIB C subprogram sources
-    adler32.c           ADLER32  C     ZLIB - Compute the Adler-32 checksum of a dta strm
-    compress.c          COMPRESS C     ZLIB - Compress a memory buffer
-    crc32.c             CRC32    C     ZLIB - Compute the CRC-32 of a data stream
-    deflate.c           DEFLATE  C     ZLIB - Compress data using the deflation algorithm
-    gzio.c              GZIO     C     ZLIB - IO on .gz files
-    infback.c           INFBACK  C     ZLIB - Inflate using a callback interface
-    inffast.c           INFFAST  C     ZLIB - Fast proc. literals & length/distance pairs
-    inflate.c           INFLATE  C     ZLIB - Interface to inflate modules
-    inftrees.c          INFTREES C     ZLIB - Generate Huffman trees for efficient decode
-    trees.c             TREES    C     ZLIB - Output deflated data using Huffman coding
-    uncompr.c           UNCOMPR  C     ZLIB - Decompress a memory buffer
-    zutil.c             ZUTIL    C     ZLIB - Target dependent utility functions
-                H                      Original ZLIB C and ILE/RPG include files
-    crc32.h             CRC32    C     ZLIB - CRC32 tables
-    deflate.h           DEFLATE  C     ZLIB - Internal compression state
-    inffast.h           INFFAST  C     ZLIB - Header to use inffast.c
-    inffixed.h          INFFIXED C     ZLIB - Table for decoding fixed codes
-    inflate.h           INFLATE  C     ZLIB - Internal inflate state definitions
-    inftrees.h          INFTREES C     ZLIB - Header to use inftrees.c
-    trees.h             TREES    C     ZLIB - Created automatically with -DGEN_TREES_H
-    zconf.h             ZCONF    C     ZLIB - Compression library configuration
-    zlib.h              ZLIB     C     ZLIB - Compression library C user interface
-    as400/zlib.inc      ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface
-    zutil.h             ZUTIL    C     ZLIB - Internal interface and configuration
-                TOOLS                  Building source software & AS/400 README
-    as400/bndsrc        BNDSRC         Entry point exportation list
-    as400/compile.clp   COMPILE  CLP   Compile sources & generate service program
-    as400/readme.txt    README   TXT   Installation instructions
-
-4)      Continue as in I)3).
-
-
-
-
-Notes:  For AS400 ILE RPG programmers, a /copy member defining the ZLIB
-                API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC).
-                Please read comments in this member for more information.
-
-        Remember that most foreign textual data are ASCII coded: this
-                implementation does not handle conversion from/to ASCII, so
-                text data code conversions must be done explicitely.
-
-        Always open zipped files in binary mode.
diff --git a/libsrc/zlib/as400/zlib.inc b/libsrc/zlib/as400/zlib.inc
deleted file mode 100644
index 7bbfb7e..0000000
--- a/libsrc/zlib/as400/zlib.inc
+++ /dev/null
@@ -1,331 +0,0 @@
-      *  ZLIB.INC - Interface to the general purpose compression library
-      *
-      *  ILE RPG400 version by Patrick Monnerat, DATASPHERE.
-      *  Version 1.2.3
-      *
-      *
-      *  WARNING:
-      *     Procedures inflateInit(), inflateInit2(), deflateInit(),
-      *         deflateInit2() and inflateBackInit() need to be called with
-      *         two additional arguments:
-      *         the package version string and the stream control structure.
-      *         size. This is needed because RPG lacks some macro feature.
-      *         Call these procedures as:
-      *             inflateInit(...: ZLIB_VERSION: %size(z_stream))
-      *
-      /if not defined(ZLIB_H_)
-      /define ZLIB_H_
-      *
-      **************************************************************************
-      *                               Constants
-      **************************************************************************
-      *
-      *  Versioning information.
-      *
-     D ZLIB_VERSION    C                   '1.2.3'
-     D ZLIB_VERNUM     C                   X'1230'
-      *
-      *  Other equates.
-      *
-     D Z_NO_FLUSH      C                   0
-     D Z_SYNC_FLUSH    C                   2
-     D Z_FULL_FLUSH    C                   3
-     D Z_FINISH        C                   4
-     D Z_BLOCK         C                   5
-      *
-     D Z_OK            C                   0
-     D Z_STREAM_END    C                   1
-     D Z_NEED_DICT     C                   2
-     D Z_ERRNO         C                   -1
-     D Z_STREAM_ERROR  C                   -2
-     D Z_DATA_ERROR    C                   -3
-     D Z_MEM_ERROR     C                   -4
-     D Z_BUF_ERROR     C                   -5
-     DZ_VERSION_ERROR  C                   -6
-      *
-     D Z_NO_COMPRESSION...
-     D                 C                   0
-     D Z_BEST_SPEED    C                   1
-     D Z_BEST_COMPRESSION...
-     D                 C                   9
-     D Z_DEFAULT_COMPRESSION...
-     D                 C                   -1
-      *
-     D Z_FILTERED      C                   1
-     D Z_HUFFMAN_ONLY  C                   2
-     D Z_RLE           C                   3
-     D Z_DEFAULT_STRATEGY...
-     D                 C                   0
-      *
-     D Z_BINARY        C                   0
-     D Z_ASCII         C                   1
-     D Z_UNKNOWN       C                   2
-      *
-     D Z_DEFLATED      C                   8
-      *
-     D Z_NULL          C                   0
-      *
-      **************************************************************************
-      *                                 Types
-      **************************************************************************
-      *
-     D z_streamp       S               *                                        Stream struct ptr
-     D gzFile          S               *                                        File pointer
-     D z_off_t         S             10i 0                                      Stream offsets
-      *
-      **************************************************************************
-      *                               Structures
-      **************************************************************************
-      *
-      *  The GZIP encode/decode stream support structure.
-      *
-     D z_stream        DS                  align based(z_streamp)
-     D  zs_next_in                     *                                        Next input byte
-     D  zs_avail_in                  10U 0                                      Byte cnt at next_in
-     D  zs_total_in                  10U 0                                      Total bytes read
-     D  zs_next_out                    *                                        Output buffer ptr
-     D  zs_avail_out                 10U 0                                      Room left @ next_out
-     D  zs_total_out                 10U 0                                      Total bytes written
-     D  zs_msg                         *                                        Last errmsg or null
-     D  zs_state                       *                                        Internal state
-     D  zs_zalloc                      *   procptr                              Int. state allocator
-     D  zs_free                        *   procptr                              Int. state dealloc.
-     D  zs_opaque                      *                                        Private alloc. data
-     D  zs_data_type                 10i 0                                      ASC/BIN best guess
-     D  zs_adler                     10u 0                                      Uncompr. adler32 val
-     D                               10U 0                                      Reserved
-     D                               10U 0                                      Ptr. alignment
-      *
-      **************************************************************************
-      *                     Utility function prototypes
-      **************************************************************************
-      *
-     D compress        PR            10I 0 extproc('compress')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10u 0 value                                Source length
-      *
-     D compress2       PR            10I 0 extproc('compress2')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10U 0 value                                Source length
-     D  level                        10I 0 value                                Compression level
-      *
-     D compressBound   PR            10U 0 extproc('compressBound')
-     D  sourceLen                    10U 0 value
-      *
-     D uncompress      PR            10I 0 extproc('uncompress')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10U 0 value                                Source length
-      *
-     D gzopen          PR                  extproc('gzopen')
-     D                                     like(gzFile)
-     D  path                           *   value options(*string)               File pathname
-     D  mode                           *   value options(*string)               Open mode
-      *
-     D gzdopen         PR                  extproc('gzdopen')
-     D                                     like(gzFile)
-     D  fd                           10i 0 value                                File descriptor
-     D  mode                           *   value options(*string)               Open mode
-      *
-     D gzsetparams     PR            10I 0 extproc('gzsetparams')
-     D  file                               value like(gzFile)                   File pointer
-     D  level                        10I 0 value
-     D  strategy                     10i 0 value
-      *
-     D gzread          PR            10I 0 extproc('gzread')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    options(*varsize)                    Buffer
-     D  len                          10u 0 value                                Buffer length
-      *
-     D gzwrite         PR            10I 0 extproc('gzwrite')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    const options(*varsize)              Buffer
-     D  len                          10u 0 value                                Buffer length
-      *
-     D gzputs          PR            10I 0 extproc('gzputs')
-     D  file                               value like(gzFile)                   File pointer
-     D  s                              *   value options(*string)               String to output
-      *
-     D gzgets          PR              *   extproc('gzgets')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    options(*varsize)                    Read buffer
-     D  len                          10i 0 value                                Buffer length
-      *
-     D gzflush         PR            10i 0 extproc('gzflush')
-     D  file                               value like(gzFile)                   File pointer
-     D  flush                        10I 0 value                                Type of flush
-      *
-     D gzseek          PR                  extproc('gzseek')
-     D                                     like(z_off_t)
-     D  file                               value like(gzFile)                   File pointer
-     D  offset                             value like(z_off_t)                  Offset
-     D  whence                       10i 0 value                                Origin
-      *
-     D gzrewind        PR            10i 0 extproc('gzrewind')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gztell          PR                  extproc('gztell')
-     D                                     like(z_off_t)
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzeof           PR            10i 0 extproc('gzeof')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzclose         PR            10i 0 extproc('gzclose')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzerror         PR              *   extproc('gzerror')                   Error string
-     D  file                               value like(gzFile)                   File pointer
-     D  errnum                       10I 0                                      Error code
-      *
-     D gzclearerr      PR                  extproc('gzclearerr')
-     D  file                               value like(gzFile)                   File pointer
-      *
-      **************************************************************************
-      *                        Basic function prototypes
-      **************************************************************************
-      *
-     D zlibVersion     PR              *   extproc('zlibVersion')               Version string
-      *
-     D deflateInit     PR            10I 0 extproc('deflateInit_')              Init. compression
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D deflate         PR            10I 0 extproc('deflate')                   Compress data
-     D  strm                               like(z_stream)                       Compression stream
-     D  flush                        10I 0 value                                Flush type required
-      *
-     D deflateEnd      PR            10I 0 extproc('deflateEnd')                Termin. compression
-     D  strm                               like(z_stream)                       Compression stream
-      *
-     D inflateInit     PR            10I 0 extproc('inflateInit_')              Init. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflate         PR            10I 0 extproc('inflate')                   Expand data
-     D  strm                               like(z_stream)                       Expansion stream
-     D  flush                        10I 0 value                                Flush type required
-      *
-     D inflateEnd      PR            10I 0 extproc('inflateEnd')                Termin. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-      **************************************************************************
-      *                        Advanced function prototypes
-      **************************************************************************
-      *
-     D deflateInit2    PR            10I 0 extproc('deflateInit2_')             Init. compression
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  method                       10I 0 value                                Compression method
-     D  windowBits                   10I 0 value                                log2(window size)
-     D  memLevel                     10I 0 value                                Mem/cmpress tradeoff
-     D  strategy                     10I 0 value                                Compression stategy
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D deflateSetDictionary...
-     D                 PR            10I 0 extproc('deflateSetDictionary')      Init. dictionary
-     D  strm                               like(z_stream)                       Compression stream
-     D  dictionary                32767    const options(*varsize)              Dictionary bytes
-     D  dictLength                   10U 0 value                                Dictionary length
-      *
-     D deflateCopy     PR            10I 0 extproc('deflateCopy')               Compress strm 2 strm
-     D  dest                               like(z_stream)                       Destination stream
-     D  source                             like(z_stream)                       Source stream
-      *
-     D deflateReset    PR            10I 0 extproc('deflateReset')              End and init. stream
-     D  strm                               like(z_stream)                       Compression stream
-      *
-     D deflateParams   PR            10I 0 extproc('deflateParams')             Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  strategy                     10I 0 value                                Compression stategy
-      *
-     D deflateBound    PR            10U 0 extproc('deflateBound')              Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  sourcelen                    10U 0 value                                Compression level
-      *
-     D deflatePrime    PR            10I 0 extproc('deflatePrime')              Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  bits                         10I 0 value                                Number of bits to insert
-     D  value                        10I 0 value                                Bits to insert
-      *
-     D inflateInit2    PR            10I 0 extproc('inflateInit2_')             Init. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-     D  windowBits                   10I 0 value                                log2(window size)
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflateSetDictionary...
-     D                 PR            10I 0 extproc('inflateSetDictionary')      Init. dictionary
-     D  strm                               like(z_stream)                       Expansion stream
-     D  dictionary                32767    const options(*varsize)              Dictionary bytes
-     D  dictLength                   10U 0 value                                Dictionary length
-      *
-     D inflateSync     PR            10I 0 extproc('inflateSync')               Sync. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D inflateCopy     PR            10I 0 extproc('inflateCopy')
-     D  dest                               like(z_stream)                       Destination stream
-     D  source                             like(z_stream)                       Source stream
-      *
-     D inflateReset    PR            10I 0 extproc('inflateReset')              End and init. stream
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D inflateBackInit...
-     D                 PR            10I 0 extproc('inflateBackInit_')
-     D  strm                               like(z_stream)                       Expansion stream
-     D  windowBits                   10I 0 value                                Log2(buffer size)
-     D  window                    32767    options(*varsize)                    Buffer
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflateBack     PR            10I 0 extproc('inflateBack')
-     D  strm                               like(z_stream)                       Expansion stream
-     D  in                             *   value procptr                        Input function
-     D  in_desc                        *   value                                Input descriptor
-     D  out                            *   value procptr                        Output function
-     D  out_desc                       *   value                                Output descriptor
-      *
-     D inflateBackEnd  PR            10I 0 extproc('inflateBackEnd')
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D zlibCompileFlags...
-     D                 PR            10U 0 extproc('zlibCompileFlags')
-      *
-      **************************************************************************
-      *                        Checksum function prototypes
-      **************************************************************************
-      *
-     D adler32         PR            10U 0 extproc('adler32')                   New checksum
-     D  adler                        10U 0 value                                Old checksum
-     D  buf                       32767    const options(*varsize)              Bytes to accumulate
-     D  len                          10U 0 value                                Buffer length
-      *
-     D crc32           PR            10U 0 extproc('crc32')                     New checksum
-     D  crc                          10U 0 value                                Old checksum
-     D  buf                       32767    const options(*varsize)              Bytes to accumulate
-     D  len                          10U 0 value                                Buffer length
-      *
-      **************************************************************************
-      *                     Miscellaneous function prototypes
-      **************************************************************************
-      *
-     D zError          PR              *   extproc('zError')                    Error string
-     D  err                          10I 0 value                                Error code
-      *
-     D inflateSyncPoint...
-     D                 PR            10I 0 extproc('inflateSyncPoint')
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D get_crc_table   PR              *   extproc('get_crc_table')             Ptr to ulongs
-      *
-      /endif
diff --git a/libsrc/zlib/compress.c b/libsrc/zlib/compress.c
deleted file mode 100644
index 15f53b3..0000000
--- a/libsrc/zlib/compress.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: compress.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-    int level;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-    stream.opaque = (voidpf)0;
-
-    err = deflateInit(&stream, level);
-    if (err != Z_OK) return err;
-
-    err = deflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
-
-    err = deflateEnd(&stream);
-    return err;
-}
-
-/* ===========================================================================
- */
-int ZEXPORT compress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
-}
-
-/* ===========================================================================
-     If the default memLevel or windowBits for deflateInit() is changed, then
-   this function needs to be updated.
- */
-uLong ZEXPORT compressBound (sourceLen)
-    uLong sourceLen;
-{
-    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
-}
diff --git a/libsrc/zlib/configure b/libsrc/zlib/configure
deleted file mode 100755
index d7ffdc3..0000000
--- a/libsrc/zlib/configure
+++ /dev/null
@@ -1,459 +0,0 @@
-#!/bin/sh
-# configure script for zlib. This script is needed only if
-# you wish to build a shared library and your system supports them,
-# of if you need special compiler, flags or install directory.
-# Otherwise, you can just use directly "make test; make install"
-#
-# To create a shared library, use "configure --shared"; by default a static
-# library is created. If the primitive shared library support provided here
-# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
-#
-# To impose specific compiler or flags or install directory, use for example:
-#    prefix=$HOME CC=cc CFLAGS="-O4" ./configure
-# or for csh/tcsh users:
-#    (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
-# LDSHARED is the command to be used to create a shared library
-
-# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
-# If you have problems, try without defining CC and CFLAGS before reporting
-# an error.
-
-LIBS=libz.a
-LDFLAGS="-L. ${LIBS}"
-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
-AR=${AR-"ar rc"}
-RANLIB=${RANLIB-"ranlib"}
-prefix=${prefix-/usr/local}
-exec_prefix=${exec_prefix-'${prefix}'}
-libdir=${libdir-'${exec_prefix}/lib'}
-includedir=${includedir-'${prefix}/include'}
-mandir=${mandir-'${prefix}/share/man'}
-shared_ext='.so'
-shared=0
-gcc=0
-old_cc="$CC"
-old_cflags="$CFLAGS"
-
-while test $# -ge 1
-do
-case "$1" in
-    -h* | --h*)
-      echo 'usage:'
-      echo '  configure [--shared] [--prefix=PREFIX]  [--exec_prefix=EXPREFIX]'
-      echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
-        exit 0;;
-    -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
-    -p* | --p*) prefix="$2"; shift; shift;;
-    -e* | --e*) exec_prefix="$2"; shift; shift;;
-    -l* | --l*) libdir="$2"; shift; shift;;
-    -i* | --i*) includedir="$2"; shift; shift;;
-    -s* | --s*) shared=1; shift;;
-    *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
-    esac
-done
-
-test=ztest$$
-cat > $test.c <<EOF
-extern int getchar();
-int hello() {return getchar();}
-EOF
-
-test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
-cflags=${CFLAGS-"-O3"}
-# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
-case "$cc" in
-  *gcc*) gcc=1;;
-esac
-
-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
-  CC="$cc"
-  SFLAGS=${CFLAGS-"-fPIC -O3"}
-  CFLAGS="$cflags"
-  case `(uname -s || echo unknown) 2>/dev/null` in
-  Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
-  CYGWIN* | Cygwin* | cygwin* | OS/2* )
-             EXE='.exe';;
-  QNX*)  # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
-         # (alain.bonnefoy at icbt.com)
-                 LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
-  HP-UX*)
-         LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
-         case `(uname -m || echo unknown) 2>/dev/null` in
-         ia64)
-                 shared_ext='.so'
-                 SHAREDLIB='libz.so';;
-         *)
-                 shared_ext='.sl'
-                 SHAREDLIB='libz.sl';;
-         esac;;
-  Darwin*)   shared_ext='.dylib'
-             SHAREDLIB=libz$shared_ext
-             SHAREDLIBV=libz.$VER$shared_ext
-             SHAREDLIBM=libz.$VER1$shared_ext
-             LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
-  *)             LDSHARED=${LDSHARED-"$cc -shared"};;
-  esac
-else
-  # find system name and corresponding cc options
-  CC=${CC-cc}
-  case `(uname -sr || echo unknown) 2>/dev/null` in
-  HP-UX*)    SFLAGS=${CFLAGS-"-O +z"}
-             CFLAGS=${CFLAGS-"-O"}
-#            LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
-             LDSHARED=${LDSHARED-"ld -b"}
-         case `(uname -m || echo unknown) 2>/dev/null` in
-         ia64)
-             shared_ext='.so'
-             SHAREDLIB='libz.so';;
-         *)
-             shared_ext='.sl'
-             SHAREDLIB='libz.sl';;
-         esac;;
-  IRIX*)     SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
-             CFLAGS=${CFLAGS-"-ansi -O2"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
-             CFLAGS=${CFLAGS-"-O -std1"}
-             LDSHARED=${LDSHARED-"cc -shared  -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
-  OSF1*)     SFLAGS=${CFLAGS-"-O -std1"}
-             CFLAGS=${CFLAGS-"-O -std1"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  QNX*)      SFLAGS=${CFLAGS-"-4 -O"}
-             CFLAGS=${CFLAGS-"-4 -O"}
-             LDSHARED=${LDSHARED-"cc"}
-             RANLIB=${RANLIB-"true"}
-             AR="cc -A";;
-  SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
-             CFLAGS=${CFLAGS-"-O3"}
-             LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
-  SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
-             CFLAGS=${CFLAGS-"-fast -xcg89"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
-             CFLAGS=${CFLAGS-"-O2"}
-             LDSHARED=${LDSHARED-"ld"};;
-  SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
-             CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"}
-             LDSHARED=${LDSHARED-"cc -xarch=v9b"};;
-  UNIX_System_V\ 4.2.0)
-             SFLAGS=${CFLAGS-"-KPIC -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  UNIX_SV\ 4.2MP)
-             SFLAGS=${CFLAGS-"-Kconform_pic -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  OpenUNIX\ 5)
-             SFLAGS=${CFLAGS-"-KPIC -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  AIX*)  # Courtesy of dbakker at arrayasolutions.com
-             SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
-             CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
-             LDSHARED=${LDSHARED-"xlc -G"};;
-  # send working options for other systems to support at gzip.org
-  *)         SFLAGS=${CFLAGS-"-O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  esac
-fi
-
-SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
-SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
-SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
-
-if test $shared -eq 1; then
-  echo Checking for shared library support...
-  # we must test in two steps (cc then ld), required at least on SunOS 4.x
-  if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
-     test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
-    CFLAGS="$SFLAGS"
-    LIBS="$SHAREDLIBV"
-    echo Building shared library $SHAREDLIBV with $CC.
-  elif test -z "$old_cc" -a -z "$old_cflags"; then
-    echo No shared library support.
-    shared=0;
-  else
-    echo 'No shared library support; try without defining CC and CFLAGS'
-    shared=0;
-  fi
-fi
-if test $shared -eq 0; then
-  LDSHARED="$CC"
-  echo Building static library $LIBS version $VER with $CC.
-else
-  LDFLAGS="-L. ${SHAREDLIBV}"
-fi
-
-cat > $test.c <<EOF
-#include <unistd.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
-  echo "Checking for unistd.h... Yes."
-else
-  cp -p zconf.in.h zconf.h
-  echo "Checking for unistd.h... No."
-fi
-
-cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-#include "zconf.h"
-
-int main()
-{
-#ifndef STDC
-  choke me
-#endif
-
-  return 0;
-}
-EOF
-
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
-
-  cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return 0;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-    echo "Checking for vsnprintf() in stdio.h... Yes."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  int n;
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  n = vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return n;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of vsnprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
-      echo "Checking for return value of vsnprintf()... No."
-      echo "  WARNING: apparently vsnprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  else
-    CFLAGS="$CFLAGS -DNO_vsnprintf"
-    echo "Checking for vsnprintf() in stdio.h... No."
-    echo "  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
-    echo "  can build but will be open to possible buffer-overflow security"
-    echo "  vulnerabilities."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  int n;
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  n = vsprintf(buf, fmt, ap);
-  va_end(ap);
-  return n;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of vsprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_vsprintf_void"
-      echo "Checking for return value of vsprintf()... No."
-      echo "  WARNING: apparently vsprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  fi
-else
-  echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()"
-
-  cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  snprintf(buf, sizeof(buf), "%s", "foo");
-  return 0;
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-    echo "Checking for snprintf() in stdio.h... Yes."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  return snprintf(buf, sizeof(buf), "%s", "foo");
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of snprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_snprintf_void"
-      echo "Checking for return value of snprintf()... No."
-      echo "  WARNING: apparently snprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  else
-    CFLAGS="$CFLAGS -DNO_snprintf"
-    echo "Checking for snprintf() in stdio.h... No."
-    echo "  WARNING: snprintf() not found, falling back to sprintf(). zlib"
-    echo "  can build but will be open to possible buffer-overflow security"
-    echo "  vulnerabilities."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  return sprintf(buf, "%s", "foo");
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of sprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_sprintf_void"
-      echo "Checking for return value of sprintf()... No."
-      echo "  WARNING: apparently sprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  fi
-fi
-
-cat >$test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  echo "Checking for errno.h... Yes."
-else
-  echo "Checking for errno.h... No."
-  CFLAGS="$CFLAGS -DNO_ERRNO_H"
-fi
-
-cat > $test.c <<EOF
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-caddr_t hello() {
-  return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
-}
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  CFLAGS="$CFLAGS -DUSE_MMAP"
-  echo Checking for mmap support... Yes.
-else
-  echo Checking for mmap support... No.
-fi
-
-CPP=${CPP-"$CC -E"}
-case $CFLAGS in
-  *ASMV*)
-    if test "`nm $test.o | grep _hello`" = ""; then
-      CPP="$CPP -DNO_UNDERLINE"
-      echo Checking for underline in external names... No.
-    else
-      echo Checking for underline in external names... Yes.
-    fi;;
-esac
-
-rm -f $test.[co] $test $test$shared_ext
-
-# udpate Makefile
-sed < Makefile.in "
-/^CC *=/s#=.*#=$CC#
-/^CFLAGS *=/s#=.*#=$CFLAGS#
-/^CPP *=/s#=.*#=$CPP#
-/^LDSHARED *=/s#=.*#=$LDSHARED#
-/^LIBS *=/s#=.*#=$LIBS#
-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
-/^AR *=/s#=.*#=$AR#
-/^RANLIB *=/s#=.*#=$RANLIB#
-/^EXE *=/s#=.*#=$EXE#
-/^prefix *=/s#=.*#=$prefix#
-/^exec_prefix *=/s#=.*#=$exec_prefix#
-/^libdir *=/s#=.*#=$libdir#
-/^includedir *=/s#=.*#=$includedir#
-/^mandir *=/s#=.*#=$mandir#
-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
-" > Makefile
diff --git a/libsrc/zlib/contrib/README.contrib b/libsrc/zlib/contrib/README.contrib
index 20afc62..dd2285d 100644
--- a/libsrc/zlib/contrib/README.contrib
+++ b/libsrc/zlib/contrib/README.contrib
@@ -8,7 +8,10 @@ ada/        by Dmitriy Anisimkov <anisimkov at yahoo.com>
         Support for Ada
         See http://zlib-ada.sourceforge.net/
 
-asm586/
+amd64/      by Mikhail Teterin <mi at ALDAN.algebra.com>
+        asm code for AMD64
+        See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393
+
 asm686/     by Brian Raiter <breadbox at muppetlabs.com>
         asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
         See http://www.muppetlabs.com/~breadbox/software/assembly.html
@@ -22,6 +25,10 @@ delphi/     by Cosmin Truta <cosmint at cs.ubbcluj.ro>
 dotzlib/    by Henrik Ravn <henrik at ravn.com>
         Support for Microsoft .Net and Visual C++ .Net
 
+gcc_gvmat64/by Gilles Vollant <info at winimage.com>
+        GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64
+        assembler to replace longest_match() and inflate_fast()
+
 infback9/   by Mark Adler <madler at alumni.caltech.edu>
         Unsupported diffs to infback to decode the deflate64 format
 
@@ -38,20 +45,19 @@ iostream3/  by Ludwig Schwardt <schwardt at sun.ac.za>
             and Kevin Ruland <kevin at rodin.wustl.edu>
         Yet another C++ I/O streams interface
 
-masm686/    by Dan Higdon <hdan at kinesoft.com>
-            and Chuck Walbourn <chuckw at kinesoft.com>
-        asm code for Pentium Pro/PII, using the MASM syntax
-
 masmx64/    by Gilles Vollant <info at winimage.com>
-	x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
-	replace longest_match() and inflate_fast()
+        x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
+        replace longest_match() and inflate_fast(),  also masm x86
+        64-bits translation of Chris Anderson inflate_fast()
 
 masmx86/    by Gilles Vollant <info at winimage.com>
         x86 asm code to replace longest_match() and inflate_fast(),
-        for Visual C++ and MASM
+        for Visual C++ and MASM (32 bits).
+        Based on Brian Raiter (asm686) and Chris Anderson (inflate86)
 
 minizip/    by Gilles Vollant <info at winimage.com>
         Mini zip and unzip based on zlib
+        Includes Zip64 support by Mathias Svensson <mathias at result42.com>
         See http://www.winimage.com/zLibDll/unzip.html
 
 pascal/     by Bob Dellaca <bobdl at xtra.co.nz> et al.
diff --git a/libsrc/zlib/contrib/ada/buffer_demo.adb b/libsrc/zlib/contrib/ada/buffer_demo.adb
index 8da4f77..3094584 100644
--- a/libsrc/zlib/contrib/ada/buffer_demo.adb
+++ b/libsrc/zlib/contrib/ada/buffer_demo.adb
@@ -6,7 +6,7 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 --
---  $Id: buffer_demo.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: buffer_demo.adb,v 1.1.2.1 2011/04/21 11:43:00 source Exp $
 
 --  This demo program provided by Dr Steve Sangwine <sjs at essex.ac.uk>
 --
diff --git a/libsrc/zlib/contrib/ada/mtest.adb b/libsrc/zlib/contrib/ada/mtest.adb
index 72b195c..786e7c4 100644
--- a/libsrc/zlib/contrib/ada/mtest.adb
+++ b/libsrc/zlib/contrib/ada/mtest.adb
@@ -8,7 +8,7 @@
 --  Continuous test for ZLib multithreading. If the test would fail
 --  we should provide thread safe allocation routines for the Z_Stream.
 --
---  $Id: mtest.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: mtest.adb,v 1.1.2.1 2011/04/21 11:43:00 source Exp $
 
 with ZLib;
 with Ada.Streams;
diff --git a/libsrc/zlib/contrib/ada/read.adb b/libsrc/zlib/contrib/ada/read.adb
index 6148047..8062173 100644
--- a/libsrc/zlib/contrib/ada/read.adb
+++ b/libsrc/zlib/contrib/ada/read.adb
@@ -6,7 +6,7 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 
---  $Id: read.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: read.adb,v 1.1.2.1 2011/04/21 11:43:00 source Exp $
 
 --  Test/demo program for the generic read interface.
 
diff --git a/libsrc/zlib/contrib/ada/test.adb b/libsrc/zlib/contrib/ada/test.adb
index ad9808a..ffebcfc 100644
--- a/libsrc/zlib/contrib/ada/test.adb
+++ b/libsrc/zlib/contrib/ada/test.adb
@@ -6,7 +6,7 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 
---  $Id: test.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: test.adb,v 1.1.2.1 2011/04/21 11:43:00 source Exp $
 
 --  The program has a few aims.
 --  1. Test ZLib.Ada95 thick binding functionality.
diff --git a/libsrc/zlib/contrib/ada/zlib-streams.adb b/libsrc/zlib/contrib/ada/zlib-streams.adb
index 0d01d4b..e14463c 100644
--- a/libsrc/zlib/contrib/ada/zlib-streams.adb
+++ b/libsrc/zlib/contrib/ada/zlib-streams.adb
@@ -6,7 +6,7 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 
---  $Id: zlib-streams.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: zlib-streams.adb,v 1.1.2.1 2011/04/21 11:43:01 source Exp $
 
 with Ada.Unchecked_Deallocation;
 
diff --git a/libsrc/zlib/contrib/ada/zlib-streams.ads b/libsrc/zlib/contrib/ada/zlib-streams.ads
deleted file mode 100644
index 95c73da..0000000
--- a/libsrc/zlib/contrib/ada/zlib-streams.ads
+++ /dev/null
@@ -1,114 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-streams.ads,v 1.1 2007/03/14 12:54:14 source Exp $
-
-package ZLib.Streams is
-
-   type Stream_Mode is (In_Stream, Out_Stream, Duplex);
-
-   type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;
-
-   type Stream_Type is
-      new Ada.Streams.Root_Stream_Type with private;
-
-   procedure Read
-     (Stream : in out Stream_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset);
-
-   procedure Write
-     (Stream : in out Stream_Type;
-      Item   : in     Ada.Streams.Stream_Element_Array);
-
-   procedure Flush
-     (Stream : in out Stream_Type;
-      Mode   : in     Flush_Mode := Sync_Flush);
-   --  Flush the written data to the back stream,
-   --  all data placed to the compressor is flushing to the Back stream.
-   --  Should not be used untill necessary, becouse it is decreasing
-   --  compression.
-
-   function Read_Total_In (Stream : in Stream_Type) return Count;
-   pragma Inline (Read_Total_In);
-   --  Return total number of bytes read from back stream so far.
-
-   function Read_Total_Out (Stream : in Stream_Type) return Count;
-   pragma Inline (Read_Total_Out);
-   --  Return total number of bytes read so far.
-
-   function Write_Total_In (Stream : in Stream_Type) return Count;
-   pragma Inline (Write_Total_In);
-   --  Return total number of bytes written so far.
-
-   function Write_Total_Out (Stream : in Stream_Type) return Count;
-   pragma Inline (Write_Total_Out);
-   --  Return total number of bytes written to the back stream.
-
-   procedure Create
-     (Stream            :    out Stream_Type;
-      Mode              : in     Stream_Mode;
-      Back              : in     Stream_Access;
-      Back_Compressed   : in     Boolean;
-      Level             : in     Compression_Level := Default_Compression;
-      Strategy          : in     Strategy_Type     := Default_Strategy;
-      Header            : in     Header_Type       := Default;
-      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size;
-      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size);
-   --  Create the Comression/Decompression stream.
-   --  If mode is In_Stream then Write operation is disabled.
-   --  If mode is Out_Stream then Read operation is disabled.
-
-   --  If Back_Compressed is true then
-   --  Data written to the Stream is compressing to the Back stream
-   --  and data read from the Stream is decompressed data from the Back stream.
-
-   --  If Back_Compressed is false then
-   --  Data written to the Stream is decompressing to the Back stream
-   --  and data read from the Stream is compressed data from the Back stream.
-
-   --  !!! When the Need_Header is False ZLib-Ada is using undocumented
-   --  ZLib 1.1.4 functionality to do not create/wait for ZLib headers.
-
-   function Is_Open (Stream : Stream_Type) return Boolean;
-
-   procedure Close (Stream : in out Stream_Type);
-
-private
-
-   use Ada.Streams;
-
-   type Buffer_Access is access all Stream_Element_Array;
-
-   type Stream_Type
-     is new Root_Stream_Type with
-   record
-      Mode       : Stream_Mode;
-
-      Buffer     : Buffer_Access;
-      Rest_First : Stream_Element_Offset;
-      Rest_Last  : Stream_Element_Offset;
-      --  Buffer for Read operation.
-      --  We need to have this buffer in the record
-      --  becouse not all read data from back stream
-      --  could be processed during the read operation.
-
-      Buffer_Size : Stream_Element_Offset;
-      --  Buffer size for write operation.
-      --  We do not need to have this buffer
-      --  in the record becouse all data could be
-      --  processed in the write operation.
-
-      Back       : Stream_Access;
-      Reader     : Filter_Type;
-      Writer     : Filter_Type;
-   end record;
-
-end ZLib.Streams;
diff --git a/libsrc/zlib/contrib/ada/zlib-thin.adb b/libsrc/zlib/contrib/ada/zlib-thin.adb
index a03c019..290ff37 100644
--- a/libsrc/zlib/contrib/ada/zlib-thin.adb
+++ b/libsrc/zlib/contrib/ada/zlib-thin.adb
@@ -6,7 +6,7 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 
---  $Id: zlib-thin.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: zlib-thin.adb,v 1.1.2.1 2011/04/21 11:43:01 source Exp $
 
 package body ZLib.Thin is
 
diff --git a/libsrc/zlib/contrib/ada/zlib-thin.ads b/libsrc/zlib/contrib/ada/zlib-thin.ads
deleted file mode 100644
index fd798d5..0000000
--- a/libsrc/zlib/contrib/ada/zlib-thin.ads
+++ /dev/null
@@ -1,450 +0,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-thin.ads,v 1.1 2007/03/14 12:54:14 source Exp $
-
-with Interfaces.C.Strings;
-
-with System;
-
-private package ZLib.Thin is
-
-   --  From zconf.h
-
-   MAX_MEM_LEVEL : constant := 9;         --  zconf.h:105
-                                          --  zconf.h:105
-   MAX_WBITS : constant := 15;      --  zconf.h:115
-                                    --  32K LZ77 window
-                                    --  zconf.h:115
-   SEEK_SET : constant := 8#0000#;  --  zconf.h:244
-                                    --  Seek from beginning of file.
-                                    --  zconf.h:244
-   SEEK_CUR : constant := 1;        --  zconf.h:245
-                                    --  Seek from current position.
-                                    --  zconf.h:245
-   SEEK_END : constant := 2;        --  zconf.h:246
-                                    --  Set file pointer to EOF plus "offset"
-                                    --  zconf.h:246
-
-   type Byte is new Interfaces.C.unsigned_char; --  8 bits
-                                                --  zconf.h:214
-   type UInt is new Interfaces.C.unsigned;      --  16 bits or more
-                                                --  zconf.h:216
-   type Int is new Interfaces.C.int;
-
-   type ULong is new Interfaces.C.unsigned_long;     --  32 bits or more
-                                                     --  zconf.h:217
-   subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
-
-   type ULong_Access is access ULong;
-   type Int_Access is access Int;
-
-   subtype Voidp is System.Address;            --  zconf.h:232
-
-   subtype Byte_Access is Voidp;
-
-   Nul : constant Voidp := System.Null_Address;
-   --  end from zconf
-
-   Z_NO_FLUSH : constant := 8#0000#;   --  zlib.h:125
-                                       --  zlib.h:125
-   Z_PARTIAL_FLUSH : constant := 1;       --  zlib.h:126
-                                          --  will be removed, use
-                                          --  Z_SYNC_FLUSH instead
-                                          --  zlib.h:126
-   Z_SYNC_FLUSH : constant := 2;       --  zlib.h:127
-                                       --  zlib.h:127
-   Z_FULL_FLUSH : constant := 3;       --  zlib.h:128
-                                       --  zlib.h:128
-   Z_FINISH : constant := 4;        --  zlib.h:129
-                                    --  zlib.h:129
-   Z_OK : constant := 8#0000#;   --  zlib.h:132
-                                 --  zlib.h:132
-   Z_STREAM_END : constant := 1;       --  zlib.h:133
-                                       --  zlib.h:133
-   Z_NEED_DICT : constant := 2;        --  zlib.h:134
-                                       --  zlib.h:134
-   Z_ERRNO : constant := -1;        --  zlib.h:135
-                                    --  zlib.h:135
-   Z_STREAM_ERROR : constant := -2;       --  zlib.h:136
-                                          --  zlib.h:136
-   Z_DATA_ERROR : constant := -3;      --  zlib.h:137
-                                       --  zlib.h:137
-   Z_MEM_ERROR : constant := -4;       --  zlib.h:138
-                                       --  zlib.h:138
-   Z_BUF_ERROR : constant := -5;       --  zlib.h:139
-                                       --  zlib.h:139
-   Z_VERSION_ERROR : constant := -6;      --  zlib.h:140
-                                          --  zlib.h:140
-   Z_NO_COMPRESSION : constant := 8#0000#;   --  zlib.h:145
-                                             --  zlib.h:145
-   Z_BEST_SPEED : constant := 1;       --  zlib.h:146
-                                       --  zlib.h:146
-   Z_BEST_COMPRESSION : constant := 9;       --  zlib.h:147
-                                             --  zlib.h:147
-   Z_DEFAULT_COMPRESSION : constant := -1;      --  zlib.h:148
-                                                --  zlib.h:148
-   Z_FILTERED : constant := 1;      --  zlib.h:151
-                                    --  zlib.h:151
-   Z_HUFFMAN_ONLY : constant := 2;        --  zlib.h:152
-                                          --  zlib.h:152
-   Z_DEFAULT_STRATEGY : constant := 8#0000#; --  zlib.h:153
-                                             --  zlib.h:153
-   Z_BINARY : constant := 8#0000#;  --  zlib.h:156
-                                    --  zlib.h:156
-   Z_ASCII : constant := 1;      --  zlib.h:157
-                                 --  zlib.h:157
-   Z_UNKNOWN : constant := 2;       --  zlib.h:158
-                                    --  zlib.h:158
-   Z_DEFLATED : constant := 8;      --  zlib.h:161
-                                    --  zlib.h:161
-   Z_NULL : constant := 8#0000#; --  zlib.h:164
-                                 --  for initializing zalloc, zfree, opaque
-                                 --  zlib.h:164
-   type gzFile is new Voidp;                  --  zlib.h:646
-
-   type Z_Stream is private;
-
-   type Z_Streamp is access all Z_Stream;     --  zlib.h:89
-
-   type alloc_func is access function
-     (Opaque : Voidp;
-      Items  : UInt;
-      Size   : UInt)
-      return Voidp; --  zlib.h:63
-
-   type free_func is access procedure (opaque : Voidp; address : Voidp);
-
-   function zlibVersion return Chars_Ptr;
-
-   function Deflate (strm : Z_Streamp; flush : Int) return Int;
-
-   function DeflateEnd (strm : Z_Streamp) return Int;
-
-   function Inflate (strm : Z_Streamp; flush : Int) return Int;
-
-   function InflateEnd (strm : Z_Streamp) return Int;
-
-   function deflateSetDictionary
-     (strm       : Z_Streamp;
-      dictionary : Byte_Access;
-      dictLength : UInt)
-      return       Int;
-
-   function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int;
-   --  zlib.h:478
-
-   function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495
-
-   function deflateParams
-     (strm     : Z_Streamp;
-      level    : Int;
-      strategy : Int)
-      return     Int;       -- zlib.h:506
-
-   function inflateSetDictionary
-     (strm       : Z_Streamp;
-      dictionary : Byte_Access;
-      dictLength : UInt)
-      return       Int; --  zlib.h:548
-
-   function inflateSync (strm : Z_Streamp) return Int;  --  zlib.h:565
-
-   function inflateReset (strm : Z_Streamp) return Int; --  zlib.h:580
-
-   function compress
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong)
-      return      Int;           -- zlib.h:601
-
-   function compress2
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong;
-      level     : Int)
-      return      Int;          -- zlib.h:615
-
-   function uncompress
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong)
-      return      Int;
-
-   function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile;
-
-   function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile;
-
-   function gzsetparams
-     (file     : gzFile;
-      level    : Int;
-      strategy : Int)
-      return     Int;
-
-   function gzread
-     (file : gzFile;
-      buf  : Voidp;
-      len  : UInt)
-      return Int;
-
-   function gzwrite
-     (file : in gzFile;
-      buf  : in Voidp;
-      len  : in UInt)
-      return Int;
-
-   function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int;
-
-   function gzputs (file : in gzFile; s : in Chars_Ptr) return Int;
-
-   function gzgets
-     (file : gzFile;
-      buf  : Chars_Ptr;
-      len  : Int)
-      return Chars_Ptr;
-
-   function gzputc (file : gzFile; char : Int) return Int;
-
-   function gzgetc (file : gzFile) return Int;
-
-   function gzflush (file : gzFile; flush : Int) return Int;
-
-   function gzseek
-     (file   : gzFile;
-      offset : Int;
-      whence : Int)
-      return   Int;
-
-   function gzrewind (file : gzFile) return Int;
-
-   function gztell (file : gzFile) return Int;
-
-   function gzeof (file : gzFile) return Int;
-
-   function gzclose (file : gzFile) return Int;
-
-   function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr;
-
-   function adler32
-     (adler : ULong;
-      buf   : Byte_Access;
-      len   : UInt)
-      return  ULong;
-
-   function crc32
-     (crc  : ULong;
-      buf  : Byte_Access;
-      len  : UInt)
-      return ULong;
-
-   function deflateInit
-     (strm        : Z_Streamp;
-      level       : Int;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function deflateInit2
-     (strm        : Z_Streamp;
-      level       : Int;
-      method      : Int;
-      windowBits  : Int;
-      memLevel    : Int;
-      strategy    : Int;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function Deflate_Init
-     (strm       : Z_Streamp;
-      level      : Int;
-      method     : Int;
-      windowBits : Int;
-      memLevel   : Int;
-      strategy   : Int)
-      return       Int;
-   pragma Inline (Deflate_Init);
-
-   function inflateInit
-     (strm        : Z_Streamp;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function inflateInit2
-     (strm        : in Z_Streamp;
-      windowBits  : in Int;
-      version     : in Chars_Ptr;
-      stream_size : in Int)
-      return      Int;
-
-   function inflateBackInit
-     (strm        : in Z_Streamp;
-      windowBits  : in Int;
-      window      : in Byte_Access;
-      version     : in Chars_Ptr;
-      stream_size : in Int)
-      return      Int;
-   --  Size of window have to be 2**windowBits.
-
-   function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int;
-   pragma Inline (Inflate_Init);
-
-   function zError (err : Int) return Chars_Ptr;
-
-   function inflateSyncPoint (z : Z_Streamp) return Int;
-
-   function get_crc_table return ULong_Access;
-
-   --  Interface to the available fields of the z_stream structure.
-   --  The application must update next_in and avail_in when avail_in has
-   --  dropped to zero. It must update next_out and avail_out when avail_out
-   --  has dropped to zero. The application must initialize zalloc, zfree and
-   --  opaque before calling the init function.
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt);
-   pragma Inline (Set_In);
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt);
-   pragma Inline (Set_Out);
-
-   procedure Set_Mem_Func
-     (Strm   : in out Z_Stream;
-      Opaque : in Voidp;
-      Alloc  : in alloc_func;
-      Free   : in free_func);
-   pragma Inline (Set_Mem_Func);
-
-   function Last_Error_Message (Strm : in Z_Stream) return String;
-   pragma Inline (Last_Error_Message);
-
-   function Avail_Out (Strm : in Z_Stream) return UInt;
-   pragma Inline (Avail_Out);
-
-   function Avail_In (Strm : in Z_Stream) return UInt;
-   pragma Inline (Avail_In);
-
-   function Total_In (Strm : in Z_Stream) return ULong;
-   pragma Inline (Total_In);
-
-   function Total_Out (Strm : in Z_Stream) return ULong;
-   pragma Inline (Total_Out);
-
-   function inflateCopy
-     (dest   : in Z_Streamp;
-      Source : in Z_Streamp)
-      return Int;
-
-   function compressBound (Source_Len : in ULong) return ULong;
-
-   function deflateBound
-     (Strm       : in Z_Streamp;
-      Source_Len : in ULong)
-      return     ULong;
-
-   function gzungetc (C : in Int; File : in  gzFile) return Int;
-
-   function zlibCompileFlags return ULong;
-
-private
-
-   type Z_Stream is record            -- zlib.h:68
-      Next_In   : Voidp      := Nul;  -- next input byte
-      Avail_In  : UInt       := 0;    -- number of bytes available at next_in
-      Total_In  : ULong      := 0;    -- total nb of input bytes read so far
-      Next_Out  : Voidp      := Nul;  -- next output byte should be put there
-      Avail_Out : UInt       := 0;    -- remaining free space at next_out
-      Total_Out : ULong      := 0;    -- total nb of bytes output so far
-      msg       : Chars_Ptr;          -- last error message, NULL if no error
-      state     : Voidp;              -- not visible by applications
-      zalloc    : alloc_func := null; -- used to allocate the internal state
-      zfree     : free_func  := null; -- used to free the internal state
-      opaque    : Voidp;              -- private data object passed to
-                                      --  zalloc and zfree
-      data_type : Int;                -- best guess about the data type:
-                                      --  ascii or binary
-      adler     : ULong;              -- adler32 value of the uncompressed
-                                      --  data
-      reserved  : ULong;              -- reserved for future use
-   end record;
-
-   pragma Convention (C, Z_Stream);
-
-   pragma Import (C, zlibVersion, "zlibVersion");
-   pragma Import (C, Deflate, "deflate");
-   pragma Import (C, DeflateEnd, "deflateEnd");
-   pragma Import (C, Inflate, "inflate");
-   pragma Import (C, InflateEnd, "inflateEnd");
-   pragma Import (C, deflateSetDictionary, "deflateSetDictionary");
-   pragma Import (C, deflateCopy, "deflateCopy");
-   pragma Import (C, deflateReset, "deflateReset");
-   pragma Import (C, deflateParams, "deflateParams");
-   pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
-   pragma Import (C, inflateSync, "inflateSync");
-   pragma Import (C, inflateReset, "inflateReset");
-   pragma Import (C, compress, "compress");
-   pragma Import (C, compress2, "compress2");
-   pragma Import (C, uncompress, "uncompress");
-   pragma Import (C, gzopen, "gzopen");
-   pragma Import (C, gzdopen, "gzdopen");
-   pragma Import (C, gzsetparams, "gzsetparams");
-   pragma Import (C, gzread, "gzread");
-   pragma Import (C, gzwrite, "gzwrite");
-   pragma Import (C, gzprintf, "gzprintf");
-   pragma Import (C, gzputs, "gzputs");
-   pragma Import (C, gzgets, "gzgets");
-   pragma Import (C, gzputc, "gzputc");
-   pragma Import (C, gzgetc, "gzgetc");
-   pragma Import (C, gzflush, "gzflush");
-   pragma Import (C, gzseek, "gzseek");
-   pragma Import (C, gzrewind, "gzrewind");
-   pragma Import (C, gztell, "gztell");
-   pragma Import (C, gzeof, "gzeof");
-   pragma Import (C, gzclose, "gzclose");
-   pragma Import (C, gzerror, "gzerror");
-   pragma Import (C, adler32, "adler32");
-   pragma Import (C, crc32, "crc32");
-   pragma Import (C, deflateInit, "deflateInit_");
-   pragma Import (C, inflateInit, "inflateInit_");
-   pragma Import (C, deflateInit2, "deflateInit2_");
-   pragma Import (C, inflateInit2, "inflateInit2_");
-   pragma Import (C, zError, "zError");
-   pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
-   pragma Import (C, get_crc_table, "get_crc_table");
-
-   --  since zlib 1.2.0:
-
-   pragma Import (C, inflateCopy, "inflateCopy");
-   pragma Import (C, compressBound, "compressBound");
-   pragma Import (C, deflateBound, "deflateBound");
-   pragma Import (C, gzungetc, "gzungetc");
-   pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
-
-   pragma Import (C, inflateBackInit, "inflateBackInit_");
-
-   --  I stopped binding the inflateBack routines, becouse realize that
-   --  it does not support zlib and gzip headers for now, and have no
-   --  symmetric deflateBack routines.
-   --  ZLib-Ada is symmetric regarding deflate/inflate data transformation
-   --  and has a similar generic callback interface for the
-   --  deflate/inflate transformation based on the regular Deflate/Inflate
-   --  routines.
-
-   --  pragma Import (C, inflateBack, "inflateBack");
-   --  pragma Import (C, inflateBackEnd, "inflateBackEnd");
-
-end ZLib.Thin;
diff --git a/libsrc/zlib/contrib/ada/zlib.adb b/libsrc/zlib/contrib/ada/zlib.adb
index 8134988..8785011 100644
--- a/libsrc/zlib/contrib/ada/zlib.adb
+++ b/libsrc/zlib/contrib/ada/zlib.adb
@@ -6,7 +6,7 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 
---  $Id: zlib.adb,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: zlib.adb,v 1.1.2.1 2011/04/21 11:43:01 source Exp $
 
 with Ada.Exceptions;
 with Ada.Unchecked_Conversion;
diff --git a/libsrc/zlib/contrib/ada/zlib.ads b/libsrc/zlib/contrib/ada/zlib.ads
index 1a296b4..a76261a 100644
--- a/libsrc/zlib/contrib/ada/zlib.ads
+++ b/libsrc/zlib/contrib/ada/zlib.ads
@@ -25,7 +25,7 @@
 --  covered by the  GNU Public License.                                     --
 ------------------------------------------------------------------------------
 
---  $Id: zlib.ads,v 1.1 2007/03/14 12:54:14 source Exp $
+--  $Id: zlib.ads,v 1.1.2.1 2011/04/21 11:43:01 source Exp $
 
 with Ada.Streams;
 
diff --git a/libsrc/zlib/contrib/amd64/amd64-match.S b/libsrc/zlib/contrib/amd64/amd64-match.S
new file mode 100644
index 0000000..81d4a1c
--- /dev/null
+++ b/libsrc/zlib/contrib/amd64/amd64-match.S
@@ -0,0 +1,452 @@
+/*
+ * match.S -- optimized version of longest_match()
+ * based on the similar work by Gilles Vollant, and Brian Raiter, written 1998
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the BSD License. Use by owners of Che Guevarra
+ * parafernalia is prohibited, where possible, and highly discouraged
+ * elsewhere.
+ */
+
+#ifndef NO_UNDERLINE
+#	define	match_init	_match_init
+#	define	longest_match	_longest_match
+#endif
+
+#define	scanend		ebx
+#define	scanendw	bx
+#define	chainlenwmask	edx /* high word: current chain len low word: s->wmask */
+#define	curmatch	rsi
+#define	curmatchd	esi
+#define	windowbestlen	r8
+#define	scanalign	r9
+#define	scanalignd	r9d
+#define	window		r10
+#define	bestlen		r11
+#define	bestlend	r11d
+#define	scanstart	r12d
+#define	scanstartw	r12w
+#define scan		r13
+#define nicematch	r14d
+#define	limit		r15
+#define	limitd		r15d
+#define prev		rcx
+
+/*
+ * The 258 is a "magic number, not a parameter -- changing it
+ * breaks the hell loose
+ */
+#define	MAX_MATCH	(258)
+#define	MIN_MATCH	(3)
+#define	MIN_LOOKAHEAD	(MAX_MATCH + MIN_MATCH + 1)
+#define	MAX_MATCH_8	((MAX_MATCH + 7) & ~7)
+
+/* stack frame offsets */
+#define	LocalVarsSize	(112)
+#define _chainlenwmask	( 8-LocalVarsSize)(%rsp)
+#define _windowbestlen	(16-LocalVarsSize)(%rsp)
+#define save_r14        (24-LocalVarsSize)(%rsp)
+#define save_rsi        (32-LocalVarsSize)(%rsp)
+#define save_rbx        (40-LocalVarsSize)(%rsp)
+#define save_r12        (56-LocalVarsSize)(%rsp)
+#define save_r13        (64-LocalVarsSize)(%rsp)
+#define save_r15        (80-LocalVarsSize)(%rsp)
+
+
+.globl	match_init, longest_match
+
+/*
+ * On AMD64 the first argument of a function (in our case -- the pointer to
+ * deflate_state structure) is passed in %rdi, hence our offsets below are
+ * all off of that.
+ */
+
+/* you can check the structure offset by running
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "deflate.h"
+
+void print_depl()
+{
+deflate_state ds;
+deflate_state *s=&ds;
+printf("size pointer=%u\n",(int)sizeof(void*));
+
+printf("#define dsWSize         (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s)));
+printf("#define dsWMask         (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s)));
+printf("#define dsWindow        (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s)));
+printf("#define dsPrev          (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s)));
+printf("#define dsMatchLen      (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s)));
+printf("#define dsPrevMatch     (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s)));
+printf("#define dsStrStart      (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s)));
+printf("#define dsMatchStart    (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s)));
+printf("#define dsLookahead     (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s)));
+printf("#define dsPrevLen       (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s)));
+printf("#define dsMaxChainLen   (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
+printf("#define dsGoodMatch     (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s)));
+printf("#define dsNiceMatch     (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s)));
+}
+
+*/
+
+
+/*
+  to compile for XCode 3.2 on MacOSX x86_64
+  - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S"
+ */
+
+
+#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE
+#define dsWSize		( 68)(%rdi)
+#define dsWMask		( 76)(%rdi)
+#define dsWindow	( 80)(%rdi)
+#define dsPrev		( 96)(%rdi)
+#define dsMatchLen	(144)(%rdi)
+#define dsPrevMatch	(148)(%rdi)
+#define dsStrStart	(156)(%rdi)
+#define dsMatchStart	(160)(%rdi)
+#define dsLookahead	(164)(%rdi)
+#define dsPrevLen	(168)(%rdi)
+#define dsMaxChainLen	(172)(%rdi)
+#define dsGoodMatch	(188)(%rdi)
+#define dsNiceMatch	(192)(%rdi)
+
+#else 
+
+#ifndef STRUCT_OFFSET
+#	define STRUCT_OFFSET	(0)
+#endif
+
+
+#define dsWSize		( 56 + STRUCT_OFFSET)(%rdi)
+#define dsWMask		( 64 + STRUCT_OFFSET)(%rdi)
+#define dsWindow	( 72 + STRUCT_OFFSET)(%rdi)
+#define dsPrev		( 88 + STRUCT_OFFSET)(%rdi)
+#define dsMatchLen	(136 + STRUCT_OFFSET)(%rdi)
+#define dsPrevMatch	(140 + STRUCT_OFFSET)(%rdi)
+#define dsStrStart	(148 + STRUCT_OFFSET)(%rdi)
+#define dsMatchStart	(152 + STRUCT_OFFSET)(%rdi)
+#define dsLookahead	(156 + STRUCT_OFFSET)(%rdi)
+#define dsPrevLen	(160 + STRUCT_OFFSET)(%rdi)
+#define dsMaxChainLen	(164 + STRUCT_OFFSET)(%rdi)
+#define dsGoodMatch	(180 + STRUCT_OFFSET)(%rdi)
+#define dsNiceMatch	(184 + STRUCT_OFFSET)(%rdi)
+
+#endif
+
+
+
+
+.text
+
+/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
+
+longest_match:
+/*
+ * Retrieve the function arguments. %curmatch will hold cur_match
+ * throughout the entire function (passed via rsi on amd64).
+ * rdi will hold the pointer to the deflate_state (first arg on amd64)
+ */
+		mov     %rsi, save_rsi
+		mov     %rbx, save_rbx
+		mov	%r12, save_r12
+		mov     %r13, save_r13
+		mov     %r14, save_r14
+		mov     %r15, save_r15
+
+/* uInt wmask = s->w_mask;						*/
+/* unsigned chain_length = s->max_chain_length;				*/
+/* if (s->prev_length >= s->good_match) {				*/
+/*     chain_length >>= 2;						*/
+/* }									*/
+
+		movl	dsPrevLen, %eax
+		movl	dsGoodMatch, %ebx
+		cmpl	%ebx, %eax
+		movl	dsWMask, %eax
+		movl	dsMaxChainLen, %chainlenwmask
+		jl	LastMatchGood
+		shrl	$2, %chainlenwmask
+LastMatchGood:
+
+/* chainlen is decremented once beforehand so that the function can	*/
+/* use the sign flag instead of the zero flag for the exit test.	*/
+/* It is then shifted into the high word, to make room for the wmask	*/
+/* value, which it will always accompany.				*/
+
+		decl	%chainlenwmask
+		shll	$16, %chainlenwmask
+		orl	%eax, %chainlenwmask
+
+/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;	*/
+
+		movl	dsNiceMatch, %eax
+		movl	dsLookahead, %ebx
+		cmpl	%eax, %ebx
+		jl	LookaheadLess
+		movl	%eax, %ebx
+LookaheadLess:	movl	%ebx, %nicematch
+
+/* register Bytef *scan = s->window + s->strstart;			*/
+
+		mov	dsWindow, %window
+		movl	dsStrStart, %limitd
+		lea	(%limit, %window), %scan
+
+/* Determine how many bytes the scan ptr is off from being		*/
+/* dword-aligned.							*/
+
+		mov	%scan, %scanalign
+		negl	%scanalignd
+		andl	$3, %scanalignd
+
+/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?			*/
+/*     s->strstart - (IPos)MAX_DIST(s) : NIL;				*/
+
+		movl	dsWSize, %eax
+		subl	$MIN_LOOKAHEAD, %eax
+		xorl	%ecx, %ecx
+		subl	%eax, %limitd
+		cmovng	%ecx, %limitd
+
+/* int best_len = s->prev_length;					*/
+
+		movl	dsPrevLen, %bestlend
+
+/* Store the sum of s->window + best_len in %windowbestlen locally, and in memory.	*/
+
+		lea	(%window, %bestlen), %windowbestlen
+		mov	%windowbestlen, _windowbestlen
+
+/* register ush scan_start = *(ushf*)scan;				*/
+/* register ush scan_end   = *(ushf*)(scan+best_len-1);			*/
+/* Posf *prev = s->prev;						*/
+
+		movzwl	(%scan), %scanstart
+		movzwl	-1(%scan, %bestlen), %scanend
+		mov	dsPrev, %prev
+
+/* Jump into the main loop.						*/
+
+		movl	%chainlenwmask, _chainlenwmask
+		jmp	LoopEntry
+
+.balign 16
+
+/* do {
+ *     match = s->window + cur_match;
+ *     if (*(ushf*)(match+best_len-1) != scan_end ||
+ *         *(ushf*)match != scan_start) continue;
+ *     [...]
+ * } while ((cur_match = prev[cur_match & wmask]) > limit
+ *          && --chain_length != 0);
+ *
+ * Here is the inner loop of the function. The function will spend the
+ * majority of its time in this loop, and majority of that time will
+ * be spent in the first ten instructions.
+ */
+LookupLoop:
+		andl	%chainlenwmask, %curmatchd
+		movzwl	(%prev, %curmatch, 2), %curmatchd
+		cmpl	%limitd, %curmatchd
+		jbe	LeaveNow
+		subl	$0x00010000, %chainlenwmask
+		js	LeaveNow
+LoopEntry:	cmpw	-1(%windowbestlen, %curmatch), %scanendw
+		jne	LookupLoop
+		cmpw	%scanstartw, (%window, %curmatch)
+		jne	LookupLoop
+
+/* Store the current value of chainlen.					*/
+		movl	%chainlenwmask, _chainlenwmask
+
+/* %scan is the string under scrutiny, and %prev to the string we	*/
+/* are hoping to match it up with. In actuality, %esi and %edi are	*/
+/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is	*/
+/* initialized to -(MAX_MATCH_8 - scanalign).				*/
+
+		mov	$(-MAX_MATCH_8), %rdx
+		lea	(%curmatch, %window), %windowbestlen
+		lea	MAX_MATCH_8(%windowbestlen, %scanalign), %windowbestlen
+		lea	MAX_MATCH_8(%scan, %scanalign), %prev
+
+/* the prefetching below makes very little difference... */
+		prefetcht1	(%windowbestlen, %rdx)
+		prefetcht1	(%prev, %rdx)
+
+/*
+ * Test the strings for equality, 8 bytes at a time. At the end,
+ * adjust %rdx so that it is offset to the exact byte that mismatched.
+ *
+ * It should be confessed that this loop usually does not represent
+ * much of the total running time. Replacing it with a more
+ * straightforward "rep cmpsb" would not drastically degrade
+ * performance -- unrolling it, for example, makes no difference.
+ */
+
+#undef USE_SSE	/* works, but is 6-7% slower, than non-SSE... */
+
+LoopCmps:
+#ifdef USE_SSE
+		/* Preload the SSE registers */
+		movdqu	  (%windowbestlen, %rdx), %xmm1
+		movdqu	  (%prev, %rdx), %xmm2
+		pcmpeqb	%xmm2, %xmm1
+		movdqu	16(%windowbestlen, %rdx), %xmm3
+		movdqu	16(%prev, %rdx), %xmm4
+		pcmpeqb	%xmm4, %xmm3
+		movdqu	32(%windowbestlen, %rdx), %xmm5
+		movdqu	32(%prev, %rdx), %xmm6
+		pcmpeqb	%xmm6, %xmm5
+		movdqu	48(%windowbestlen, %rdx), %xmm7
+		movdqu	48(%prev, %rdx), %xmm8
+		pcmpeqb	%xmm8, %xmm7
+
+		/* Check the comparisions' results */
+		pmovmskb %xmm1, %rax
+		notw	%ax
+		bsfw	%ax, %ax
+		jnz	LeaveLoopCmps
+		
+		/* this is the only iteration of the loop with a possibility of having
+		   incremented rdx by 0x108 (each loop iteration add 16*4 = 0x40 
+		   and (0x40*4)+8=0x108 */
+		add	$8, %rdx
+		jz LenMaximum
+		add	$8, %rdx
+
+		
+		pmovmskb %xmm3, %rax
+		notw	%ax
+		bsfw	%ax, %ax
+		jnz	LeaveLoopCmps
+		
+		
+		add	$16, %rdx
+
+
+		pmovmskb %xmm5, %rax
+		notw	%ax
+		bsfw	%ax, %ax
+		jnz	LeaveLoopCmps
+		
+		add	$16, %rdx
+
+
+		pmovmskb %xmm7, %rax
+		notw	%ax
+		bsfw	%ax, %ax
+		jnz	LeaveLoopCmps
+		
+		add	$16, %rdx
+		
+		jmp	LoopCmps
+LeaveLoopCmps:	add	%rax, %rdx
+#else
+		mov	(%windowbestlen, %rdx), %rax
+		xor	(%prev, %rdx), %rax
+		jnz	LeaveLoopCmps
+		
+		mov	8(%windowbestlen, %rdx), %rax
+		xor	8(%prev, %rdx), %rax
+		jnz	LeaveLoopCmps8
+
+		mov	16(%windowbestlen, %rdx), %rax
+		xor	16(%prev, %rdx), %rax
+		jnz	LeaveLoopCmps16
+				
+		add	$24, %rdx
+		jnz	LoopCmps
+		jmp	LenMaximum
+#	if 0
+/*
+ * This three-liner is tantalizingly simple, but bsf is a slow instruction,
+ * and the complicated alternative down below is quite a bit faster. Sad...
+ */
+
+LeaveLoopCmps:	bsf	%rax, %rax /* find the first non-zero bit */
+		shrl	$3, %eax /* divide by 8 to get the byte */
+		add	%rax, %rdx
+#	else
+LeaveLoopCmps16:
+		add	$8, %rdx
+LeaveLoopCmps8:
+		add	$8, %rdx
+LeaveLoopCmps:	testl   $0xFFFFFFFF, %eax /* Check the first 4 bytes */
+		jnz     Check16
+		add     $4, %rdx
+		shr     $32, %rax
+Check16:        testw   $0xFFFF, %ax
+		jnz     LenLower
+		add	$2, %rdx
+		shrl	$16, %eax
+LenLower:	subb	$1, %al
+		adc	$0, %rdx
+#	endif
+#endif
+
+/* Calculate the length of the match. If it is longer than MAX_MATCH,	*/
+/* then automatically accept it as the best possible match and leave.	*/
+
+		lea	(%prev, %rdx), %rax
+		sub	%scan, %rax
+		cmpl	$MAX_MATCH, %eax
+		jge	LenMaximum
+
+/* If the length of the match is not longer than the best match we	*/
+/* have so far, then forget it and return to the lookup loop.		*/
+
+		cmpl	%bestlend, %eax
+		jg	LongerMatch
+		mov	_windowbestlen, %windowbestlen
+		mov	dsPrev, %prev
+		movl	_chainlenwmask, %edx
+		jmp	LookupLoop
+
+/*         s->match_start = cur_match;					*/
+/*         best_len = len;						*/
+/*         if (len >= nice_match) break;				*/
+/*         scan_end = *(ushf*)(scan+best_len-1);			*/
+
+LongerMatch:
+		movl	%eax, %bestlend
+		movl	%curmatchd, dsMatchStart
+		cmpl	%nicematch, %eax
+		jge	LeaveNow
+
+		lea	(%window, %bestlen), %windowbestlen
+		mov	%windowbestlen, _windowbestlen
+
+		movzwl	-1(%scan, %rax), %scanend
+		mov	dsPrev, %prev
+		movl	_chainlenwmask, %chainlenwmask
+		jmp	LookupLoop
+
+/* Accept the current string, with the maximum possible length.		*/
+
+LenMaximum:
+		movl	$MAX_MATCH, %bestlend
+		movl	%curmatchd, dsMatchStart
+
+/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;		*/
+/* return s->lookahead;							*/
+
+LeaveNow:
+		movl	dsLookahead, %eax
+		cmpl	%eax, %bestlend
+		cmovngl	%bestlend, %eax
+LookaheadRet:
+
+/* Restore the registers and return from whence we came.			*/
+
+	mov	save_rsi, %rsi
+	mov	save_rbx, %rbx
+	mov	save_r12, %r12
+	mov	save_r13, %r13
+	mov	save_r14, %r14
+	mov	save_r15, %r15
+
+	ret
+
+match_init:	ret
diff --git a/libsrc/zlib/contrib/asm586/README.586 b/libsrc/zlib/contrib/asm586/README.586
deleted file mode 100644
index 6bb78f3..0000000
--- a/libsrc/zlib/contrib/asm586/README.586
+++ /dev/null
@@ -1,43 +0,0 @@
-This is a patched version of zlib modified to use
-Pentium-optimized assembly code in the deflation algorithm. The files
-changed/added by this patch are:
-
-README.586
-match.S
-
-The effectiveness of these modifications is a bit marginal, as the the
-program's bottleneck seems to be mostly L1-cache contention, for which
-there is no real way to work around without rewriting the basic
-algorithm. The speedup on average is around 5-10% (which is generally
-less than the amount of variance between subsequent executions).
-However, when used at level 9 compression, the cache contention can
-drop enough for the assembly version to achieve 10-20% speedup (and
-sometimes more, depending on the amount of overall redundancy in the
-files). Even here, though, cache contention can still be the limiting
-factor, depending on the nature of the program using the zlib library.
-This may also mean that better improvements will be seen on a Pentium
-with MMX, which suffers much less from L1-cache contention, but I have
-not yet verified this.
-
-Note that this code has been tailored for the Pentium in particular,
-and will not perform well on the Pentium Pro (due to the use of a
-partial register in the inner loop).
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox at muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
diff --git a/libsrc/zlib/contrib/asm586/match.S b/libsrc/zlib/contrib/asm586/match.S
deleted file mode 100644
index 0368b35..0000000
--- a/libsrc/zlib/contrib/asm586/match.S
+++ /dev/null
@@ -1,364 +0,0 @@
-/* match.s -- Pentium-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
- */
-
-#ifndef NO_UNDERLINE
-#define	match_init	_match_init
-#define	longest_match	_longest_match
-#endif
-
-#define	MAX_MATCH	(258)
-#define	MIN_MATCH	(3)
-#define	MIN_LOOKAHEAD	(MAX_MATCH + MIN_MATCH + 1)
-#define	MAX_MATCH_8	((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define	wmask			0	/* local copy of s->wmask	*/
-#define	window			4	/* local copy of s->window	*/
-#define	windowbestlen		8	/* s->window + bestlen		*/
-#define	chainlenscanend		12	/* high word: current chain len	*/
-					/* low word: last bytes sought	*/
-#define	scanstart		16	/* first two bytes of string	*/
-#define	scanalign		20	/* dword-misalignment of string	*/
-#define	nicematch		24	/* a good enough match size	*/
-#define	bestlen			28	/* size of best match so far	*/
-#define	scan			32	/* ptr to string wanting match	*/
-
-#define	LocalVarsSize		(36)
-/*	saved ebx		36 */
-/*	saved edi		40 */
-/*	saved esi		44 */
-/*	saved ebp		48 */
-/*	return address		52 */
-#define	deflatestate		56	/* the function arguments	*/
-#define	curmatch		60
-
-/* Offsets for fields in the deflate_state structure. These numbers
- * are calculated from the definition of deflate_state, with the
- * assumption that the compiler will dword-align the fields. (Thus,
- * changing the definition of deflate_state could easily cause this
- * program to crash horribly, without so much as a warning at
- * compile time. Sigh.)
- */
-
-/* All the +zlib1222add offsets are due to the addition of fields
- *  in zlib in the deflate_state structure since the asm code was first written
- * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
- * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
- * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
- */
-
-#define zlib1222add		(8)
-
-#define	dsWSize			(36+zlib1222add)
-#define	dsWMask			(44+zlib1222add)
-#define	dsWindow		(48+zlib1222add)
-#define	dsPrev			(56+zlib1222add)
-#define	dsMatchLen		(88+zlib1222add)
-#define	dsPrevMatch		(92+zlib1222add)
-#define	dsStrStart		(100+zlib1222add)
-#define	dsMatchStart		(104+zlib1222add)
-#define	dsLookahead		(108+zlib1222add)
-#define	dsPrevLen		(112+zlib1222add)
-#define	dsMaxChainLen		(116+zlib1222add)
-#define	dsGoodMatch		(132+zlib1222add)
-#define	dsNiceMatch		(136+zlib1222add)
-
-
-.file "match.S"
-
-.globl	match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-
-/* Save registers that the compiler may be using, and adjust %esp to	*/
-/* make room for our stack frame.					*/
-
-		pushl	%ebp
-		pushl	%edi
-		pushl	%esi
-		pushl	%ebx
-		subl	$LocalVarsSize, %esp
-
-/* Retrieve the function arguments. %ecx will hold cur_match		*/
-/* throughout the entire function. %edx will hold the pointer to the	*/
-/* deflate_state structure during the function's setup (before		*/
-/* entering the main loop).						*/
-
-		movl	deflatestate(%esp), %edx
-		movl	curmatch(%esp), %ecx
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;	*/
-
-		movl	dsNiceMatch(%edx), %eax
-		movl	dsLookahead(%edx), %ebx
-		cmpl	%eax, %ebx
-		jl	LookaheadLess
-		movl	%eax, %ebx
-LookaheadLess:	movl	%ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart;			*/
-
-		movl	dsWindow(%edx), %esi
-		movl	%esi, window(%esp)
-		movl	dsStrStart(%edx), %ebp
-		lea	(%esi,%ebp), %edi
-		movl	%edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being		*/
-/* dword-aligned.							*/
-
-		movl	%edi, %eax
-		negl	%eax
-		andl	$3, %eax
-		movl	%eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?			*/
-/*     s->strstart - (IPos)MAX_DIST(s) : NIL;				*/
-
-		movl	dsWSize(%edx), %eax
-		subl	$MIN_LOOKAHEAD, %eax
-		subl	%eax, %ebp
-		jg	LimitPositive
-		xorl	%ebp, %ebp
-LimitPositive:
-
-/* unsigned chain_length = s->max_chain_length;				*/
-/* if (s->prev_length >= s->good_match) {				*/
-/*     chain_length >>= 2;						*/
-/* }									*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	dsGoodMatch(%edx), %ebx
-		cmpl	%ebx, %eax
-		movl	dsMaxChainLen(%edx), %ebx
-		jl	LastMatchGood
-		shrl	$2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can	*/
-/* use the sign flag instead of the zero flag for the exit test.	*/
-/* It is then shifted into the high word, to make room for the scanend	*/
-/* scanend value, which it will always accompany.			*/
-
-		decl	%ebx
-		shll	$16, %ebx
-
-/* int best_len = s->prev_length;					*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	%eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi.	*/
-
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan;				*/
-/* register ush scan_end   = *(ushf*)(scan+best_len-1);			*/
-
-		movw	(%edi), %bx
-		movw	%bx, scanstart(%esp)
-		movw	-1(%edi,%eax), %bx
-		movl	%ebx, chainlenscanend(%esp)
-
-/* Posf *prev = s->prev;						*/
-/* uInt wmask = s->w_mask;						*/
-
-		movl	dsPrev(%edx), %edi
-		movl	dsWMask(%edx), %edx
-		mov	%edx, wmask(%esp)
-
-/* Jump into the main loop.						*/
-
-		jmp	LoopEntry
-
-.balign 16
-
-/* do {
- *     match = s->window + cur_match;
- *     if (*(ushf*)(match+best_len-1) != scan_end ||
- *         *(ushf*)match != scan_start) continue;
- *     [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- *          && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = chainlenscanend - i.e., ((chainlen << 16) | scanend)
- * %ecx = curmatch
- * %edx = curmatch & wmask
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- *
- * Two optimization notes on the choice of instructions:
- *
- * The first instruction uses a 16-bit address, which costs an extra,
- * unpairable cycle. This is cheaper than doing a 32-bit access and
- * zeroing the high word, due to the 3-cycle misalignment penalty which
- * would occur half the time. This also turns out to be cheaper than
- * doing two separate 8-bit accesses, as the memory is so rarely in the
- * L1 cache.
- *
- * The window buffer, however, apparently spends a lot of time in the
- * cache, and so it is faster to retrieve the word at the end of the
- * match string with two 8-bit loads. The instructions that test the
- * word at the beginning of the match string, however, are executed
- * much less frequently, and there it was cheaper to use 16-bit
- * instructions, which avoided the necessity of saving off and
- * subsequently reloading one of the other registers.
- */
-LookupLoop:
-							/* 1 U & V  */
-		movw	(%edi,%edx,2), %cx		/* 2 U pipe */
-		movl	wmask(%esp), %edx		/* 2 V pipe */
-		cmpl	%ebp, %ecx			/* 3 U pipe */
-		jbe	LeaveNow			/* 3 V pipe */
-		subl	$0x00010000, %ebx		/* 4 U pipe */
-		js	LeaveNow			/* 4 V pipe */
-LoopEntry:	movb	-1(%esi,%ecx), %al		/* 5 U pipe */
-		andl	%ecx, %edx			/* 5 V pipe */
-		cmpb	%bl, %al			/* 6 U pipe */
-		jnz	LookupLoop			/* 6 V pipe */
-		movb	(%esi,%ecx), %ah
-		cmpb	%bh, %ah
-		jnz	LookupLoop
-		movl	window(%esp), %eax
-		movw	(%eax,%ecx), %ax
-		cmpw	scanstart(%esp), %ax
-		jnz	LookupLoop
-
-/* Store the current value of chainlen.					*/
-
-		movl	%ebx, chainlenscanend(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we	*/
-/* are hoping to match it up with. In actuality, %esi and %edi are	*/
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is	*/
-/* initialized to -(MAX_MATCH_8 - scanalign).				*/
-
-		movl	window(%esp), %esi
-		movl	scan(%esp), %edi
-		addl	%ecx, %esi
-		movl	scanalign(%esp), %eax
-		movl	$(-MAX_MATCH_8), %edx
-		lea	MAX_MATCH_8(%edi,%eax), %edi
-		lea	MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
-		movl	(%esi,%edx), %eax
-		movl	(%edi,%edx), %ebx
-		xorl	%ebx, %eax
-		jnz	LeaveLoopCmps
-		movl	4(%esi,%edx), %eax
-		movl	4(%edi,%edx), %ebx
-		xorl	%ebx, %eax
-		jnz	LeaveLoopCmps4
-		addl	$8, %edx
-		jnz	LoopCmps
-		jmp	LenMaximum
-LeaveLoopCmps4:	addl	$4, %edx
-LeaveLoopCmps:	testl	$0x0000FFFF, %eax
-		jnz	LenLower
-		addl	$2, %edx
-		shrl	$16, %eax
-LenLower:	subb	$1, %al
-		adcl	$0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH,	*/
-/* then automatically accept it as the best possible match and leave.	*/
-
-		lea	(%edi,%edx), %eax
-		movl	scan(%esp), %edi
-		subl	%edi, %eax
-		cmpl	$MAX_MATCH, %eax
-		jge	LenMaximum
-
-/* If the length of the match is not longer than the best match we	*/
-/* have so far, then forget it and return to the lookup loop.		*/
-
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		cmpl	%ebx, %eax
-		jg	LongerMatch
-		movl	chainlenscanend(%esp), %ebx
-		movl	windowbestlen(%esp), %esi
-		movl	dsPrev(%edx), %edi
-		movl	wmask(%esp), %edx
-		andl	%ecx, %edx
-		jmp	LookupLoop
-
-/*         s->match_start = cur_match;					*/
-/*         best_len = len;						*/
-/*         if (len >= nice_match) break;				*/
-/*         scan_end = *(ushf*)(scan+best_len-1);			*/
-
-LongerMatch:	movl	nicematch(%esp), %ebx
-		movl	%eax, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-		cmpl	%ebx, %eax
-		jge	LeaveNow
-		movl	window(%esp), %esi
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-		movl	chainlenscanend(%esp), %ebx
-		movw	-1(%edi,%eax), %bx
-		movl	dsPrev(%edx), %edi
-		movl	%ebx, chainlenscanend(%esp)
-		movl	wmask(%esp), %edx
-		andl	%ecx, %edx
-		jmp	LookupLoop
-
-/* Accept the current string, with the maximum possible length.		*/
-
-LenMaximum:	movl	deflatestate(%esp), %edx
-		movl	$MAX_MATCH, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;		*/
-/* return s->lookahead;							*/
-
-LeaveNow:
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		movl	dsLookahead(%edx), %eax
-		cmpl	%eax, %ebx
-		jg	LookaheadRet
-		movl	%ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came.			*/
-
-		addl	$LocalVarsSize, %esp
-		popl	%ebx
-		popl	%esi
-		popl	%edi
-		popl	%ebp
-match_init:	ret
diff --git a/libsrc/zlib/contrib/asm686/README.686 b/libsrc/zlib/contrib/asm686/README.686
index a593f23..a0bf3be 100644
--- a/libsrc/zlib/contrib/asm686/README.686
+++ b/libsrc/zlib/contrib/asm686/README.686
@@ -32,3 +32,20 @@ then do:
 
 CFLAGS="-O3 -DASMV" ./configure
 make OBJA=match.o
+
+
+Update:
+
+I've been ignoring these assembly routines for years, believing that
+gcc's generated code had caught up with it sometime around gcc 2.95
+and the major rearchitecting of the Pentium 4. However, I recently
+learned that, despite what I believed, this code still has some life
+in it. On the Pentium 4 and AMD64 chips, it continues to run about 8%
+faster than the code produced by gcc 4.1.
+
+In acknowledgement of its continuing usefulness, I've altered the
+license to match that of the rest of zlib. Share and Enjoy!
+
+Brian Raiter
+breadbox at muppetlabs.com
+April, 2007
diff --git a/libsrc/zlib/contrib/asm686/match.S b/libsrc/zlib/contrib/asm686/match.S
index 5c3e9ee..06817e1 100644
--- a/libsrc/zlib/contrib/asm686/match.S
+++ b/libsrc/zlib/contrib/asm686/match.S
@@ -1,9 +1,23 @@
-/* match.s -- Pentium-Pro-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
+/* match.S -- x86 assembly version of the zlib longest_match() function.
+ * Optimized for the Intel 686 chips (PPro and later).
  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
+ * Copyright (C) 1998, 2007 Brian Raiter <breadbox at muppetlabs.com>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the author 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.
  */
 
 #ifndef NO_UNDERLINE
diff --git a/libsrc/zlib/contrib/blast/Makefile b/libsrc/zlib/contrib/blast/Makefile
new file mode 100644
index 0000000..9be80ba
--- /dev/null
+++ b/libsrc/zlib/contrib/blast/Makefile
@@ -0,0 +1,8 @@
+blast: blast.c blast.h
+	cc -DTEST -o blast blast.c
+
+test: blast
+	blast < test.pk | cmp - test.txt
+
+clean:
+	rm -f blast blast.o
diff --git a/libsrc/zlib/contrib/delphi/ZLib.pas b/libsrc/zlib/contrib/delphi/ZLib.pas
index 3f2b8b4..0d86fb5 100644
--- a/libsrc/zlib/contrib/delphi/ZLib.pas
+++ b/libsrc/zlib/contrib/delphi/ZLib.pas
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
   const OutBuf: Pointer; BufSize: Integer);
 
 const
-  zlib_version = '1.2.3';
+  zlib_version = '1.2.5';
 
 type
   EZlibError = class(Exception);
diff --git a/libsrc/zlib/contrib/delphi/zlibd32.mak b/libsrc/zlib/contrib/delphi/zlibd32.mak
index 88fafa0..0d0699a 100644
--- a/libsrc/zlib/contrib/delphi/zlibd32.mak
+++ b/libsrc/zlib/contrib/delphi/zlibd32.mak
@@ -18,10 +18,10 @@ LDFLAGS =
 # variables
 ZLIB_LIB = zlib.lib
 
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
+OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
+OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
+OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
+OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
 
 
 # targets
@@ -38,7 +38,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h
 
 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
 
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
+gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
+
+gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
+
+gzread.obj: gzread.c zlib.h zconf.h gzguts.h
+
+gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
 
 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  inffast.h inffixed.h
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib.build b/libsrc/zlib/contrib/dotzlib/DotZLib.build
index ed19cc9..7f90d6b 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib.build
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib.build
@@ -4,7 +4,7 @@
 
 	<property name="nunit.location" value="c:/program files/NUnit V2.1/bin" />
 	<property name="build.root" value="bin" />
-	
+
 	<property name="debug" value="true" />
 	<property name="nunit" value="true" />
 
@@ -16,7 +16,7 @@
 	</target>
 
 	<target name="build" description="compiles the source code">
-		
+
 		<mkdir dir="${build.folder}" />
 		<csc target="library" output="${build.folder}DotZLib.dll" debug="${debug}">
 			<references basedir="${nunit.location}">
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib.chm b/libsrc/zlib/contrib/dotzlib/DotZLib.chm
index 0bc7df7..f214a44 100644
Binary files a/libsrc/zlib/contrib/dotzlib/DotZLib.chm and b/libsrc/zlib/contrib/dotzlib/DotZLib.chm differ
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs
index 623a525..0491bfc 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs
@@ -1,58 +1,58 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("DotZLib")]
-[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Henrik Ravn")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]		
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the 
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing. 
-//
-// Notes: 
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the 
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile 
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("DotZLib")]
+[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Henrik Ravn")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs
index c3fcf5f..788b2fc 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs
@@ -1,202 +1,202 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Runtime.InteropServices;
-using System.Text;
-
-
-namespace DotZLib
-{
-    #region ChecksumGeneratorBase
-    /// <summary>
-    /// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
-    /// </summary>
-    /// <example></example>
-    public abstract class ChecksumGeneratorBase : ChecksumGenerator
-    {
-        /// <summary>
-        /// The value of the current checksum
-        /// </summary>
-        protected uint _current;
-
-        /// <summary>
-        /// Initializes a new instance of the checksum generator base - the current checksum is 
-        /// set to zero
-        /// </summary>
-        public ChecksumGeneratorBase()
-        {
-            _current = 0;
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the checksum generator basewith a specified value
-        /// </summary>
-        /// <param name="initialValue">The value to set the current checksum to</param>
-        public ChecksumGeneratorBase(uint initialValue)
-        {
-            _current = initialValue;
-        }
-
-        /// <summary>
-        /// Resets the current checksum to zero
-        /// </summary>
-        public void Reset() { _current = 0; }
-
-        /// <summary>
-        /// Gets the current checksum value
-        /// </summary>
-        public uint Value { get { return _current; } }
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one. 
-        /// This is therefore the only method a derived class has to implement</remarks>
-        public abstract void Update(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Updates the current checksum with an array of bytes.
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        public void Update(byte[] data)
-        {
-            Update(data, 0, data.Length);
-        }
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
-        public void Update(string data)
-        {
-			Update(Encoding.UTF8.GetBytes(data));
-        }
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string, using a specific encoding
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <param name="encoding">The encoding to use</param>
-        public void Update(string data, Encoding encoding)
-        {
-            Update(encoding.GetBytes(data));
-        }
-
-    }
-    #endregion
-
-    #region CRC32
-    /// <summary>
-    /// Implements a CRC32 checksum generator
-    /// </summary>
-    public sealed class CRC32Checksum : ChecksumGeneratorBase    
-    {
-        #region DLL imports
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern uint crc32(uint crc, int data, uint length);
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the CRC32 checksum generator
-        /// </summary>
-        public CRC32Checksum() : base() {}
-
-        /// <summary>
-        /// Initializes a new instance of the CRC32 checksum generator with a specified value
-        /// </summary>
-        /// <param name="initialValue">The value to set the current checksum to</param>
-        public CRC32Checksum(uint initialValue) : base(initialValue) {}
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        public override void Update(byte[] data, int offset, int count)
-        {
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-            GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
-            try
-            {
-                _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
-            }
-            finally
-            {
-                hData.Free();
-            }
-        }
-
-    }
-    #endregion
-
-    #region Adler
-    /// <summary>
-    /// Implements a checksum generator that computes the Adler checksum on data
-    /// </summary>
-    public sealed class AdlerChecksum : ChecksumGeneratorBase    
-    {
-        #region DLL imports
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern uint adler32(uint adler, int data, uint length);
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the Adler checksum generator
-        /// </summary>
-        public AdlerChecksum() : base() {}
-
-        /// <summary>
-        /// Initializes a new instance of the Adler checksum generator with a specified value
-        /// </summary>
-        /// <param name="initialValue">The value to set the current checksum to</param>
-        public AdlerChecksum(uint initialValue) : base(initialValue) {}
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        public override void Update(byte[] data, int offset, int count)
-        {
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-            GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
-            try
-            {
-                _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
-            }
-            finally
-            {
-                hData.Free();
-            }
-        }
-
-    }
-    #endregion
-
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+
+
+namespace DotZLib
+{
+    #region ChecksumGeneratorBase
+    /// <summary>
+    /// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
+    /// </summary>
+    /// <example></example>
+    public abstract class ChecksumGeneratorBase : ChecksumGenerator
+    {
+        /// <summary>
+        /// The value of the current checksum
+        /// </summary>
+        protected uint _current;
+
+        /// <summary>
+        /// Initializes a new instance of the checksum generator base - the current checksum is
+        /// set to zero
+        /// </summary>
+        public ChecksumGeneratorBase()
+        {
+            _current = 0;
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the checksum generator basewith a specified value
+        /// </summary>
+        /// <param name="initialValue">The value to set the current checksum to</param>
+        public ChecksumGeneratorBase(uint initialValue)
+        {
+            _current = initialValue;
+        }
+
+        /// <summary>
+        /// Resets the current checksum to zero
+        /// </summary>
+        public void Reset() { _current = 0; }
+
+        /// <summary>
+        /// Gets the current checksum value
+        /// </summary>
+        public uint Value { get { return _current; } }
+
+        /// <summary>
+        /// Updates the current checksum with part of an array of bytes
+        /// </summary>
+        /// <param name="data">The data to update the checksum with</param>
+        /// <param name="offset">Where in <c>data</c> to start updating</param>
+        /// <param name="count">The number of bytes from <c>data</c> to use</param>
+        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+        /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one.
+        /// This is therefore the only method a derived class has to implement</remarks>
+        public abstract void Update(byte[] data, int offset, int count);
+
+        /// <summary>
+        /// Updates the current checksum with an array of bytes.
+        /// </summary>
+        /// <param name="data">The data to update the checksum with</param>
+        public void Update(byte[] data)
+        {
+            Update(data, 0, data.Length);
+        }
+
+        /// <summary>
+        /// Updates the current checksum with the data from a string
+        /// </summary>
+        /// <param name="data">The string to update the checksum with</param>
+        /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
+        public void Update(string data)
+        {
+			Update(Encoding.UTF8.GetBytes(data));
+        }
+
+        /// <summary>
+        /// Updates the current checksum with the data from a string, using a specific encoding
+        /// </summary>
+        /// <param name="data">The string to update the checksum with</param>
+        /// <param name="encoding">The encoding to use</param>
+        public void Update(string data, Encoding encoding)
+        {
+            Update(encoding.GetBytes(data));
+        }
+
+    }
+    #endregion
+
+    #region CRC32
+    /// <summary>
+    /// Implements a CRC32 checksum generator
+    /// </summary>
+    public sealed class CRC32Checksum : ChecksumGeneratorBase
+    {
+        #region DLL imports
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern uint crc32(uint crc, int data, uint length);
+
+        #endregion
+
+        /// <summary>
+        /// Initializes a new instance of the CRC32 checksum generator
+        /// </summary>
+        public CRC32Checksum() : base() {}
+
+        /// <summary>
+        /// Initializes a new instance of the CRC32 checksum generator with a specified value
+        /// </summary>
+        /// <param name="initialValue">The value to set the current checksum to</param>
+        public CRC32Checksum(uint initialValue) : base(initialValue) {}
+
+        /// <summary>
+        /// Updates the current checksum with part of an array of bytes
+        /// </summary>
+        /// <param name="data">The data to update the checksum with</param>
+        /// <param name="offset">Where in <c>data</c> to start updating</param>
+        /// <param name="count">The number of bytes from <c>data</c> to use</param>
+        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+        public override void Update(byte[] data, int offset, int count)
+        {
+            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+            if ((offset+count) > data.Length) throw new ArgumentException();
+            GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
+            try
+            {
+                _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
+            }
+            finally
+            {
+                hData.Free();
+            }
+        }
+
+    }
+    #endregion
+
+    #region Adler
+    /// <summary>
+    /// Implements a checksum generator that computes the Adler checksum on data
+    /// </summary>
+    public sealed class AdlerChecksum : ChecksumGeneratorBase
+    {
+        #region DLL imports
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern uint adler32(uint adler, int data, uint length);
+
+        #endregion
+
+        /// <summary>
+        /// Initializes a new instance of the Adler checksum generator
+        /// </summary>
+        public AdlerChecksum() : base() {}
+
+        /// <summary>
+        /// Initializes a new instance of the Adler checksum generator with a specified value
+        /// </summary>
+        /// <param name="initialValue">The value to set the current checksum to</param>
+        public AdlerChecksum(uint initialValue) : base(initialValue) {}
+
+        /// <summary>
+        /// Updates the current checksum with part of an array of bytes
+        /// </summary>
+        /// <param name="data">The data to update the checksum with</param>
+        /// <param name="offset">Where in <c>data</c> to start updating</param>
+        /// <param name="count">The number of bytes from <c>data</c> to use</param>
+        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+        public override void Update(byte[] data, int offset, int count)
+        {
+            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+            if ((offset+count) > data.Length) throw new ArgumentException();
+            GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
+            try
+            {
+                _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
+            }
+            finally
+            {
+                hData.Free();
+            }
+        }
+
+    }
+    #endregion
+
 }
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs
index 08f8c2c..c1cab3a 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs
@@ -1,83 +1,83 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Diagnostics;
-
-namespace DotZLib
-{
-
-	/// <summary>
-	/// This class implements a circular buffer
-	/// </summary>
-	internal class CircularBuffer
-	{
-        #region Private data
-        private int _capacity;
-        private int _head;
-        private int _tail;
-        private int _size;
-        private byte[] _buffer;
-        #endregion
-
-        public CircularBuffer(int capacity)
-        {    
-            Debug.Assert( capacity > 0 );
-            _buffer = new byte[capacity];
-            _capacity = capacity;
-            _head = 0;
-            _tail = 0;
-            _size = 0;
-        }
-
-        public int Size { get { return _size; } }
-
-        public int Put(byte[] source, int offset, int count)
-        {
-            Debug.Assert( count > 0 );
-            int trueCount = Math.Min(count, _capacity - Size);
-            for (int i = 0; i < trueCount; ++i)
-                _buffer[(_tail+i) % _capacity] = source[offset+i];
-            _tail += trueCount;
-            _tail %= _capacity;
-            _size += trueCount;
-            return trueCount;
-        }
-
-        public bool Put(byte b)
-        {
-            if (Size == _capacity) // no room
-                return false;
-            _buffer[_tail++] = b;
-            _tail %= _capacity;
-            ++_size;
-            return true;
-        }
-
-        public int Get(byte[] destination, int offset, int count)
-        {
-            int trueCount = Math.Min(count,Size);
-            for (int i = 0; i < trueCount; ++i)
-                destination[offset + i] = _buffer[(_head+i) % _capacity];
-            _head += trueCount;
-            _head %= _capacity;
-            _size -= trueCount;
-            return trueCount;
-        }
-
-        public int Get()
-        {
-            if (Size == 0)
-                return -1;
-
-            int result = (int)_buffer[_head++ % _capacity];
-            --_size;
-            return result;
-        }
-
-    }
-}
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.Diagnostics;
+
+namespace DotZLib
+{
+
+	/// <summary>
+	/// This class implements a circular buffer
+	/// </summary>
+	internal class CircularBuffer
+	{
+        #region Private data
+        private int _capacity;
+        private int _head;
+        private int _tail;
+        private int _size;
+        private byte[] _buffer;
+        #endregion
+
+        public CircularBuffer(int capacity)
+        {
+            Debug.Assert( capacity > 0 );
+            _buffer = new byte[capacity];
+            _capacity = capacity;
+            _head = 0;
+            _tail = 0;
+            _size = 0;
+        }
+
+        public int Size { get { return _size; } }
+
+        public int Put(byte[] source, int offset, int count)
+        {
+            Debug.Assert( count > 0 );
+            int trueCount = Math.Min(count, _capacity - Size);
+            for (int i = 0; i < trueCount; ++i)
+                _buffer[(_tail+i) % _capacity] = source[offset+i];
+            _tail += trueCount;
+            _tail %= _capacity;
+            _size += trueCount;
+            return trueCount;
+        }
+
+        public bool Put(byte b)
+        {
+            if (Size == _capacity) // no room
+                return false;
+            _buffer[_tail++] = b;
+            _tail %= _capacity;
+            ++_size;
+            return true;
+        }
+
+        public int Get(byte[] destination, int offset, int count)
+        {
+            int trueCount = Math.Min(count,Size);
+            for (int i = 0; i < trueCount; ++i)
+                destination[offset + i] = _buffer[(_head+i) % _capacity];
+            _head += trueCount;
+            _head %= _capacity;
+            _size -= trueCount;
+            return trueCount;
+        }
+
+        public int Get()
+        {
+            if (Size == 0)
+                return -1;
+
+            int result = (int)_buffer[_head++ % _capacity];
+            --_size;
+            return result;
+        }
+
+    }
+}
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/CodecBase.cs
index 7161f89..42e6da3 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/CodecBase.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/CodecBase.cs
@@ -1,198 +1,198 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-	/// <summary>
-	/// Implements the common functionality needed for all <see cref="Codec"/>s
-	/// </summary>
-	public abstract class CodecBase : Codec, IDisposable
-	{
-
-        #region Data members
-
-        /// <summary>
-        /// Instance of the internal zlib buffer structure that is 
-        /// passed to all functions in the zlib dll
-        /// </summary>
-        internal ZStream _ztream = new ZStream();
-
-        /// <summary>
-        /// True if the object instance has been disposed, false otherwise
-        /// </summary>
-        protected bool _isDisposed = false;
-
-        /// <summary>
-        /// The size of the internal buffers
-        /// </summary>
-        protected const int kBufferSize = 16384;
-
-        private byte[] _outBuffer = new byte[kBufferSize];
-        private byte[] _inBuffer = new byte[kBufferSize];
-
-        private GCHandle _hInput;
-        private GCHandle _hOutput;
-
-        private uint _checksum = 0;
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the <c>CodeBase</c> class. 
-        /// </summary>
-		public CodecBase()
-		{
-            try
-            {
-                _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned);
-                _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned);
-            }
-            catch (Exception)
-            {
-                CleanUp(false);
-                throw;
-            }
-        }
-
-
-        #region Codec Members
-
-        /// <summary>
-        /// Occurs when more processed data are available.
-        /// </summary>
-        public event DataAvailableHandler DataAvailable;
-
-        /// <summary>
-        /// Fires the <see cref="DataAvailable"/> event
-        /// </summary>
-        protected void OnDataAvailable()
-        {
-            if (_ztream.total_out > 0)
-            {
-                if (DataAvailable != null)
-                    DataAvailable( _outBuffer, 0, (int)_ztream.total_out); 
-                resetOutput();
-            }
-        }
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        public void Add(byte[] data)
-        {
-            Add(data,0,data.Length);
-        }
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        /// <remarks>This must be implemented by a derived class</remarks>
-        public abstract void Add(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        /// <remarks>This must be implemented by a derived class</remarks>
-        public abstract void Finish();
-
-        /// <summary>
-        /// Gets the checksum of the data that has been added so far
-        /// </summary>
-        public uint Checksum { get { return _checksum; } }
-
-        #endregion
-
-        #region Destructor & IDisposable stuff
-
-        /// <summary>
-        /// Destroys this instance
-        /// </summary>
-        ~CodecBase()
-        {
-            CleanUp(false);
-        }
-
-        /// <summary>
-        /// Releases any unmanaged resources and calls the <see cref="CleanUp()"/> method of the derived class
-        /// </summary>
-        public void Dispose()
-        {
-            CleanUp(true);
-        }
-
-        /// <summary>
-        /// Performs any codec specific cleanup
-        /// </summary>
-        /// <remarks>This must be implemented by a derived class</remarks>
-        protected abstract void CleanUp();
-
-        // performs the release of the handles and calls the dereived CleanUp()
-        private void CleanUp(bool isDisposing)
-        {
-            if (!_isDisposed)
-            {
-                CleanUp();
-                if (_hInput.IsAllocated)
-                    _hInput.Free();
-                if (_hOutput.IsAllocated)
-                    _hOutput.Free();
-
-                _isDisposed = true;
-            }
-        }
-
-
-        #endregion
-
-        #region Helper methods
-
-        /// <summary>
-        /// Copies a number of bytes to the internal codec buffer - ready for proccesing
-        /// </summary>
-        /// <param name="data">The byte array that contains the data to copy</param>
-        /// <param name="startIndex">The index of the first byte to copy</param>
-        /// <param name="count">The number of bytes to copy from <c>data</c></param>
-        protected void copyInput(byte[] data, int startIndex, int count)
-        {
-            Array.Copy(data, startIndex, _inBuffer,0, count);
-            _ztream.next_in = _hInput.AddrOfPinnedObject();
-            _ztream.total_in = 0;
-            _ztream.avail_in = (uint)count;
-
-        }
-
-        /// <summary>
-        /// Resets the internal output buffers to a known state - ready for processing
-        /// </summary>
-        protected void resetOutput()
-        {
-            _ztream.total_out = 0;
-            _ztream.avail_out = kBufferSize;
-            _ztream.next_out = _hOutput.AddrOfPinnedObject();
-        }
-
-        /// <summary>
-        /// Updates the running checksum property
-        /// </summary>
-        /// <param name="newSum">The new checksum value</param>
-        protected void setChecksum(uint newSum)
-        {
-            _checksum = newSum;
-        }
-        #endregion
-
-    }
-}
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+	/// <summary>
+	/// Implements the common functionality needed for all <see cref="Codec"/>s
+	/// </summary>
+	public abstract class CodecBase : Codec, IDisposable
+	{
+
+        #region Data members
+
+        /// <summary>
+        /// Instance of the internal zlib buffer structure that is
+        /// passed to all functions in the zlib dll
+        /// </summary>
+        internal ZStream _ztream = new ZStream();
+
+        /// <summary>
+        /// True if the object instance has been disposed, false otherwise
+        /// </summary>
+        protected bool _isDisposed = false;
+
+        /// <summary>
+        /// The size of the internal buffers
+        /// </summary>
+        protected const int kBufferSize = 16384;
+
+        private byte[] _outBuffer = new byte[kBufferSize];
+        private byte[] _inBuffer = new byte[kBufferSize];
+
+        private GCHandle _hInput;
+        private GCHandle _hOutput;
+
+        private uint _checksum = 0;
+
+        #endregion
+
+        /// <summary>
+        /// Initializes a new instance of the <c>CodeBase</c> class.
+        /// </summary>
+		public CodecBase()
+		{
+            try
+            {
+                _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned);
+                _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned);
+            }
+            catch (Exception)
+            {
+                CleanUp(false);
+                throw;
+            }
+        }
+
+
+        #region Codec Members
+
+        /// <summary>
+        /// Occurs when more processed data are available.
+        /// </summary>
+        public event DataAvailableHandler DataAvailable;
+
+        /// <summary>
+        /// Fires the <see cref="DataAvailable"/> event
+        /// </summary>
+        protected void OnDataAvailable()
+        {
+            if (_ztream.total_out > 0)
+            {
+                if (DataAvailable != null)
+                    DataAvailable( _outBuffer, 0, (int)_ztream.total_out);
+                resetOutput();
+            }
+        }
+
+        /// <summary>
+        /// Adds more data to the codec to be processed.
+        /// </summary>
+        /// <param name="data">Byte array containing the data to be added to the codec</param>
+        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+        public void Add(byte[] data)
+        {
+            Add(data,0,data.Length);
+        }
+
+        /// <summary>
+        /// Adds more data to the codec to be processed.
+        /// </summary>
+        /// <param name="data">Byte array containing the data to be added to the codec</param>
+        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+        /// <param name="count">The number of bytes to add</param>
+        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+        /// <remarks>This must be implemented by a derived class</remarks>
+        public abstract void Add(byte[] data, int offset, int count);
+
+        /// <summary>
+        /// Finishes up any pending data that needs to be processed and handled.
+        /// </summary>
+        /// <remarks>This must be implemented by a derived class</remarks>
+        public abstract void Finish();
+
+        /// <summary>
+        /// Gets the checksum of the data that has been added so far
+        /// </summary>
+        public uint Checksum { get { return _checksum; } }
+
+        #endregion
+
+        #region Destructor & IDisposable stuff
+
+        /// <summary>
+        /// Destroys this instance
+        /// </summary>
+        ~CodecBase()
+        {
+            CleanUp(false);
+        }
+
+        /// <summary>
+        /// Releases any unmanaged resources and calls the <see cref="CleanUp()"/> method of the derived class
+        /// </summary>
+        public void Dispose()
+        {
+            CleanUp(true);
+        }
+
+        /// <summary>
+        /// Performs any codec specific cleanup
+        /// </summary>
+        /// <remarks>This must be implemented by a derived class</remarks>
+        protected abstract void CleanUp();
+
+        // performs the release of the handles and calls the dereived CleanUp()
+        private void CleanUp(bool isDisposing)
+        {
+            if (!_isDisposed)
+            {
+                CleanUp();
+                if (_hInput.IsAllocated)
+                    _hInput.Free();
+                if (_hOutput.IsAllocated)
+                    _hOutput.Free();
+
+                _isDisposed = true;
+            }
+        }
+
+
+        #endregion
+
+        #region Helper methods
+
+        /// <summary>
+        /// Copies a number of bytes to the internal codec buffer - ready for proccesing
+        /// </summary>
+        /// <param name="data">The byte array that contains the data to copy</param>
+        /// <param name="startIndex">The index of the first byte to copy</param>
+        /// <param name="count">The number of bytes to copy from <c>data</c></param>
+        protected void copyInput(byte[] data, int startIndex, int count)
+        {
+            Array.Copy(data, startIndex, _inBuffer,0, count);
+            _ztream.next_in = _hInput.AddrOfPinnedObject();
+            _ztream.total_in = 0;
+            _ztream.avail_in = (uint)count;
+
+        }
+
+        /// <summary>
+        /// Resets the internal output buffers to a known state - ready for processing
+        /// </summary>
+        protected void resetOutput()
+        {
+            _ztream.total_out = 0;
+            _ztream.avail_out = kBufferSize;
+            _ztream.next_out = _hOutput.AddrOfPinnedObject();
+        }
+
+        /// <summary>
+        /// Updates the running checksum property
+        /// </summary>
+        /// <param name="newSum">The new checksum value</param>
+        protected void setChecksum(uint newSum)
+        {
+            _checksum = newSum;
+        }
+        #endregion
+
+    }
+}
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/Deflater.cs
index b25723b..c247792 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/Deflater.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/Deflater.cs
@@ -1,106 +1,106 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-
-    /// <summary>
-    /// Implements a data compressor, using the deflate algorithm in the ZLib dll
-    /// </summary>
-	public sealed class Deflater : CodecBase
-	{
-        #region Dll imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
-        private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int deflate(ref ZStream sz, int flush);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int deflateReset(ref ZStream sz);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int deflateEnd(ref ZStream sz);
-        #endregion
-
-        /// <summary>
-        /// Constructs an new instance of the <c>Deflater</c>
-        /// </summary>
-        /// <param name="level">The compression level to use for this <c>Deflater</c></param>
-		public Deflater(CompressLevel level) : base()
-		{
-            int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream));
-            if (retval != 0)
-                throw new ZLibException(retval, "Could not initialize deflater");
-
-            resetOutput();
-		}
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        public override void Add(byte[] data, int offset, int count)
-        {
-            if (data == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-            
-            int total = count;
-            int inputIndex = offset;
-            int err = 0;
-
-            while (err >= 0 && inputIndex < total)
-            {
-                copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
-                while (err >= 0 && _ztream.avail_in > 0)
-                {
-                    err = deflate(ref _ztream, (int)FlushTypes.None);
-                    if (err == 0)
-                        while (_ztream.avail_out == 0)
-                        {
-                            OnDataAvailable();
-                            err = deflate(ref _ztream, (int)FlushTypes.None);
-                        }
-                    inputIndex += (int)_ztream.total_in;
-                }
-            }
-            setChecksum( _ztream.adler );
-        }
-
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        public override void Finish()
-        {
-            int err;
-            do 
-            {
-                err = deflate(ref _ztream, (int)FlushTypes.Finish);
-                OnDataAvailable();
-            }
-            while (err == 0);
-            setChecksum( _ztream.adler );
-            deflateReset(ref _ztream);
-            resetOutput();
-        }
-
-        /// <summary>
-        /// Closes the internal zlib deflate stream
-        /// </summary>
-        protected override void CleanUp() { deflateEnd(ref _ztream); }
-
-    }
-}
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+
+    /// <summary>
+    /// Implements a data compressor, using the deflate algorithm in the ZLib dll
+    /// </summary>
+	public sealed class Deflater : CodecBase
+	{
+        #region Dll imports
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
+        private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int deflate(ref ZStream sz, int flush);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int deflateReset(ref ZStream sz);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int deflateEnd(ref ZStream sz);
+        #endregion
+
+        /// <summary>
+        /// Constructs an new instance of the <c>Deflater</c>
+        /// </summary>
+        /// <param name="level">The compression level to use for this <c>Deflater</c></param>
+		public Deflater(CompressLevel level) : base()
+		{
+            int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream));
+            if (retval != 0)
+                throw new ZLibException(retval, "Could not initialize deflater");
+
+            resetOutput();
+		}
+
+        /// <summary>
+        /// Adds more data to the codec to be processed.
+        /// </summary>
+        /// <param name="data">Byte array containing the data to be added to the codec</param>
+        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+        /// <param name="count">The number of bytes to add</param>
+        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+        public override void Add(byte[] data, int offset, int count)
+        {
+            if (data == null) throw new ArgumentNullException();
+            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+            if ((offset+count) > data.Length) throw new ArgumentException();
+
+            int total = count;
+            int inputIndex = offset;
+            int err = 0;
+
+            while (err >= 0 && inputIndex < total)
+            {
+                copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
+                while (err >= 0 && _ztream.avail_in > 0)
+                {
+                    err = deflate(ref _ztream, (int)FlushTypes.None);
+                    if (err == 0)
+                        while (_ztream.avail_out == 0)
+                        {
+                            OnDataAvailable();
+                            err = deflate(ref _ztream, (int)FlushTypes.None);
+                        }
+                    inputIndex += (int)_ztream.total_in;
+                }
+            }
+            setChecksum( _ztream.adler );
+        }
+
+
+        /// <summary>
+        /// Finishes up any pending data that needs to be processed and handled.
+        /// </summary>
+        public override void Finish()
+        {
+            int err;
+            do
+            {
+                err = deflate(ref _ztream, (int)FlushTypes.Finish);
+                OnDataAvailable();
+            }
+            while (err == 0);
+            setChecksum( _ztream.adler );
+            deflateReset(ref _ztream);
+            resetOutput();
+        }
+
+        /// <summary>
+        /// Closes the internal zlib deflate stream
+        /// </summary>
+        protected override void CleanUp() { deflateEnd(ref _ztream); }
+
+    }
+}
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/DotZLib.cs
index 42c793a..be184b4 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/DotZLib.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/DotZLib.cs
@@ -1,288 +1,288 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Text;
-
-
-namespace DotZLib
-{
-
-    #region Internal types
-
-    /// <summary>
-    /// Defines constants for the various flush types used with zlib
-    /// </summary>
-    internal enum FlushTypes 
-    {
-        None,  Partial,  Sync,  Full,  Finish,  Block
-    }
-
-    #region ZStream structure
-    // internal mapping of the zlib zstream structure for marshalling
-    [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)]
-    internal struct ZStream
-    {
-        public IntPtr next_in;
-        public uint avail_in;
-        public uint total_in;
-
-        public IntPtr next_out;
-        public uint avail_out;
-        public uint total_out;
-
-        [MarshalAs(UnmanagedType.LPStr)]
-        string msg; 
-        uint state;
-
-        uint zalloc;
-        uint zfree;
-        uint opaque;
-
-        int data_type;
-        public uint adler;
-        uint reserved;
-    }
-
-    #endregion
-    
-    #endregion
-
-    #region Public enums
-    /// <summary>
-    /// Defines constants for the available compression levels in zlib
-    /// </summary>
-    public enum CompressLevel : int
-    {
-        /// <summary>
-        /// The default compression level with a reasonable compromise between compression and speed
-        /// </summary>
-        Default = -1,   
-        /// <summary>
-        /// No compression at all. The data are passed straight through.
-        /// </summary>
-        None = 0,
-        /// <summary>
-        /// The maximum compression rate available.
-        /// </summary>
-        Best = 9,   
-        /// <summary>
-        /// The fastest available compression level.
-        /// </summary>
-        Fastest = 1
-    }
-    #endregion
-
-    #region Exception classes
-    /// <summary>
-    /// The exception that is thrown when an error occurs on the zlib dll
-    /// </summary>
-    public class ZLibException : ApplicationException
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified 
-        /// error message and error code
-        /// </summary>
-        /// <param name="errorCode">The zlib error code that caused the exception</param>
-        /// <param name="msg">A message that (hopefully) describes the error</param>
-        public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg))
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified 
-        /// error code
-        /// </summary>
-        /// <param name="errorCode">The zlib error code that caused the exception</param>
-        public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode))
-        {
-        }
-    }
-    #endregion
-
-    #region Interfaces
-
-    /// <summary>
-    /// Declares methods and properties that enables a running checksum to be calculated 
-    /// </summary>
-    public interface ChecksumGenerator
-    {
-        /// <summary>
-        /// Gets the current value of the checksum
-        /// </summary>
-        uint Value { get; }
-
-        /// <summary>
-        /// Clears the current checksum to 0
-        /// </summary>
-        void Reset();
-
-        /// <summary>
-        /// Updates the current checksum with an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        void Update(byte[] data);
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="ArgumentNullException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        void Update(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
-        void Update(string data);
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string, using a specific encoding
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <param name="encoding">The encoding to use</param>
-        void Update(string data, Encoding encoding);
-    }
-
-
-    /// <summary>
-    /// Represents the method that will be called from a codec when new data
-    /// are available.
-    /// </summary>
-    /// <paramref name="data">The byte array containing the processed data</paramref>
-    /// <paramref name="startIndex">The index of the first processed byte in <c>data</c></paramref>
-    /// <paramref name="count">The number of processed bytes available</paramref>
-    /// <remarks>On return from this method, the data may be overwritten, so grab it while you can. 
-    /// You cannot assume that startIndex will be zero.
-    /// </remarks>
-    public delegate void DataAvailableHandler(byte[] data, int startIndex, int count);
-
-    /// <summary>
-    /// Declares methods and events for implementing compressors/decompressors
-    /// </summary>
-    public interface Codec
-    {
-        /// <summary>
-        /// Occurs when more processed data are available.
-        /// </summary>
-        event DataAvailableHandler DataAvailable;
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        void Add(byte[] data);
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        void Add(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        void Finish();
-
-        /// <summary>
-        /// Gets the checksum of the data that has been added so far
-        /// </summary>
-        uint Checksum { get; }
-
-
-    }
-
-    #endregion
-
-    #region Classes
-    /// <summary>
-    /// Encapsulates general information about the ZLib library
-    /// </summary>
-    public class Info
-    {
-        #region DLL imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern uint zlibCompileFlags();
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern string zlibVersion();
-        #endregion
-
-        #region Private stuff
-        private uint _flags;
-
-        // helper function that unpacks a bitsize mask
-        private static int bitSize(uint bits)
-        {
-            switch (bits)
-            {
-                case 0: return 16;
-                case 1: return 32;
-                case 2: return 64;
-            }
-            return -1;
-        }
-        #endregion
-
-        /// <summary>
-        /// Constructs an instance of the <c>Info</c> class.
-        /// </summary>
-        public Info()
-        {
-            _flags = zlibCompileFlags();
-        }
-
-        /// <summary>
-        /// True if the library is compiled with debug info
-        /// </summary>
-        public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } }
-
-        /// <summary>
-        /// True if the library is compiled with assembly optimizations
-        /// </summary>
-        public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } }
-
-        /// <summary>
-        /// Gets the size of the unsigned int that was compiled into Zlib
-        /// </summary>
-        public int SizeOfUInt { get { return bitSize(_flags & 3); } }
-
-        /// <summary>
-        /// Gets the size of the unsigned long that was compiled into Zlib
-        /// </summary>
-        public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } }
-
-        /// <summary>
-        /// Gets the size of the pointers that were compiled into Zlib
-        /// </summary>
-        public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } }
-
-        /// <summary>
-        /// Gets the size of the z_off_t type that was compiled into Zlib
-        /// </summary>
-        public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } }
-
-        /// <summary>
-        /// Gets the version of ZLib as a string, e.g. "1.2.1"
-        /// </summary>
-        public static string Version { get { return zlibVersion(); } }
-    }
-
-    #endregion
-
-}
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Text;
+
+
+namespace DotZLib
+{
+
+    #region Internal types
+
+    /// <summary>
+    /// Defines constants for the various flush types used with zlib
+    /// </summary>
+    internal enum FlushTypes
+    {
+        None,  Partial,  Sync,  Full,  Finish,  Block
+    }
+
+    #region ZStream structure
+    // internal mapping of the zlib zstream structure for marshalling
+    [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)]
+    internal struct ZStream
+    {
+        public IntPtr next_in;
+        public uint avail_in;
+        public uint total_in;
+
+        public IntPtr next_out;
+        public uint avail_out;
+        public uint total_out;
+
+        [MarshalAs(UnmanagedType.LPStr)]
+        string msg;
+        uint state;
+
+        uint zalloc;
+        uint zfree;
+        uint opaque;
+
+        int data_type;
+        public uint adler;
+        uint reserved;
+    }
+
+    #endregion
+
+    #endregion
+
+    #region Public enums
+    /// <summary>
+    /// Defines constants for the available compression levels in zlib
+    /// </summary>
+    public enum CompressLevel : int
+    {
+        /// <summary>
+        /// The default compression level with a reasonable compromise between compression and speed
+        /// </summary>
+        Default = -1,
+        /// <summary>
+        /// No compression at all. The data are passed straight through.
+        /// </summary>
+        None = 0,
+        /// <summary>
+        /// The maximum compression rate available.
+        /// </summary>
+        Best = 9,
+        /// <summary>
+        /// The fastest available compression level.
+        /// </summary>
+        Fastest = 1
+    }
+    #endregion
+
+    #region Exception classes
+    /// <summary>
+    /// The exception that is thrown when an error occurs on the zlib dll
+    /// </summary>
+    public class ZLibException : ApplicationException
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified
+        /// error message and error code
+        /// </summary>
+        /// <param name="errorCode">The zlib error code that caused the exception</param>
+        /// <param name="msg">A message that (hopefully) describes the error</param>
+        public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg))
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified
+        /// error code
+        /// </summary>
+        /// <param name="errorCode">The zlib error code that caused the exception</param>
+        public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode))
+        {
+        }
+    }
+    #endregion
+
+    #region Interfaces
+
+    /// <summary>
+    /// Declares methods and properties that enables a running checksum to be calculated
+    /// </summary>
+    public interface ChecksumGenerator
+    {
+        /// <summary>
+        /// Gets the current value of the checksum
+        /// </summary>
+        uint Value { get; }
+
+        /// <summary>
+        /// Clears the current checksum to 0
+        /// </summary>
+        void Reset();
+
+        /// <summary>
+        /// Updates the current checksum with an array of bytes
+        /// </summary>
+        /// <param name="data">The data to update the checksum with</param>
+        void Update(byte[] data);
+
+        /// <summary>
+        /// Updates the current checksum with part of an array of bytes
+        /// </summary>
+        /// <param name="data">The data to update the checksum with</param>
+        /// <param name="offset">Where in <c>data</c> to start updating</param>
+        /// <param name="count">The number of bytes from <c>data</c> to use</param>
+        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
+        /// <exception cref="ArgumentNullException"><c>data</c> is a null reference</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
+        void Update(byte[] data, int offset, int count);
+
+        /// <summary>
+        /// Updates the current checksum with the data from a string
+        /// </summary>
+        /// <param name="data">The string to update the checksum with</param>
+        /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
+        void Update(string data);
+
+        /// <summary>
+        /// Updates the current checksum with the data from a string, using a specific encoding
+        /// </summary>
+        /// <param name="data">The string to update the checksum with</param>
+        /// <param name="encoding">The encoding to use</param>
+        void Update(string data, Encoding encoding);
+    }
+
+
+    /// <summary>
+    /// Represents the method that will be called from a codec when new data
+    /// are available.
+    /// </summary>
+    /// <paramref name="data">The byte array containing the processed data</paramref>
+    /// <paramref name="startIndex">The index of the first processed byte in <c>data</c></paramref>
+    /// <paramref name="count">The number of processed bytes available</paramref>
+    /// <remarks>On return from this method, the data may be overwritten, so grab it while you can.
+    /// You cannot assume that startIndex will be zero.
+    /// </remarks>
+    public delegate void DataAvailableHandler(byte[] data, int startIndex, int count);
+
+    /// <summary>
+    /// Declares methods and events for implementing compressors/decompressors
+    /// </summary>
+    public interface Codec
+    {
+        /// <summary>
+        /// Occurs when more processed data are available.
+        /// </summary>
+        event DataAvailableHandler DataAvailable;
+
+        /// <summary>
+        /// Adds more data to the codec to be processed.
+        /// </summary>
+        /// <param name="data">Byte array containing the data to be added to the codec</param>
+        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+        void Add(byte[] data);
+
+        /// <summary>
+        /// Adds more data to the codec to be processed.
+        /// </summary>
+        /// <param name="data">Byte array containing the data to be added to the codec</param>
+        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+        /// <param name="count">The number of bytes to add</param>
+        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+        void Add(byte[] data, int offset, int count);
+
+        /// <summary>
+        /// Finishes up any pending data that needs to be processed and handled.
+        /// </summary>
+        void Finish();
+
+        /// <summary>
+        /// Gets the checksum of the data that has been added so far
+        /// </summary>
+        uint Checksum { get; }
+
+
+    }
+
+    #endregion
+
+    #region Classes
+    /// <summary>
+    /// Encapsulates general information about the ZLib library
+    /// </summary>
+    public class Info
+    {
+        #region DLL imports
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern uint zlibCompileFlags();
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern string zlibVersion();
+        #endregion
+
+        #region Private stuff
+        private uint _flags;
+
+        // helper function that unpacks a bitsize mask
+        private static int bitSize(uint bits)
+        {
+            switch (bits)
+            {
+                case 0: return 16;
+                case 1: return 32;
+                case 2: return 64;
+            }
+            return -1;
+        }
+        #endregion
+
+        /// <summary>
+        /// Constructs an instance of the <c>Info</c> class.
+        /// </summary>
+        public Info()
+        {
+            _flags = zlibCompileFlags();
+        }
+
+        /// <summary>
+        /// True if the library is compiled with debug info
+        /// </summary>
+        public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } }
+
+        /// <summary>
+        /// True if the library is compiled with assembly optimizations
+        /// </summary>
+        public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } }
+
+        /// <summary>
+        /// Gets the size of the unsigned int that was compiled into Zlib
+        /// </summary>
+        public int SizeOfUInt { get { return bitSize(_flags & 3); } }
+
+        /// <summary>
+        /// Gets the size of the unsigned long that was compiled into Zlib
+        /// </summary>
+        public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } }
+
+        /// <summary>
+        /// Gets the size of the pointers that were compiled into Zlib
+        /// </summary>
+        public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } }
+
+        /// <summary>
+        /// Gets the size of the z_off_t type that was compiled into Zlib
+        /// </summary>
+        public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } }
+
+        /// <summary>
+        /// Gets the version of ZLib as a string, e.g. "1.2.1"
+        /// </summary>
+        public static string Version { get { return zlibVersion(); } }
+    }
+
+    #endregion
+
+}
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/GZipStream.cs
index f291bec..b161300 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/GZipStream.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/GZipStream.cs
@@ -1,301 +1,301 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-	/// <summary>
-	/// Implements a compressed <see cref="Stream"/>, in GZip (.gz) format.
-	/// </summary>
-	public class GZipStream : Stream, IDisposable
-	{
-        #region Dll Imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
-        private static extern IntPtr gzopen(string name, string mode);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzclose(IntPtr gzFile);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzwrite(IntPtr gzFile, int data, int length);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzread(IntPtr gzFile, int data, int length);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzgetc(IntPtr gzFile);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzputc(IntPtr gzFile, int c);
-
-        #endregion
-
-        #region Private data
-        private IntPtr _gzFile;
-        private bool _isDisposed = false;
-        private bool _isWriting;
-        #endregion
-
-        #region Constructors
-        /// <summary>
-        /// Creates a new file as a writeable GZipStream
-        /// </summary>
-        /// <param name="fileName">The name of the compressed file to create</param>
-        /// <param name="level">The compression level to use when adding data</param>
-        /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
-		public GZipStream(string fileName, CompressLevel level)
-		{
-            _isWriting = true;
-            _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level));
-            if (_gzFile == IntPtr.Zero)
-                throw new ZLibException(-1, "Could not open " + fileName);
-		}
-
-        /// <summary>
-        /// Opens an existing file as a readable GZipStream
-        /// </summary>
-        /// <param name="fileName">The name of the file to open</param>
-        /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
-        public GZipStream(string fileName)
-        {
-            _isWriting = false;
-            _gzFile = gzopen(fileName, "rb");
-            if (_gzFile == IntPtr.Zero)
-                throw new ZLibException(-1, "Could not open " + fileName);
-
-        }
-        #endregion
-
-        #region Access properties
-        /// <summary>
-        /// Returns true of this stream can be read from, false otherwise
-        /// </summary>
-        public override bool CanRead
-        {
-            get
-            {
-                return !_isWriting;
-            }
-        }
-    
-
-        /// <summary>
-        /// Returns false.
-        /// </summary>
-        public override bool CanSeek
-        {
-            get
-            {
-                return false;
-            }
-        }
-    
-        /// <summary>
-        /// Returns true if this tsream is writeable, false otherwise
-        /// </summary>
-        public override bool CanWrite
-        {
-            get
-            {
-                return _isWriting;
-            }
-        }
-        #endregion
-    
-        #region Destructor & IDispose stuff
-
-        /// <summary>
-        /// Destroys this instance
-        /// </summary>
-        ~GZipStream()
-        {
-            cleanUp(false);
-        }
-
-        /// <summary>
-        /// Closes the external file handle
-        /// </summary>
-        public void Dispose()
-        {
-            cleanUp(true);
-        }
-
-        // Does the actual closing of the file handle.
-        private void cleanUp(bool isDisposing)
-        {
-            if (!_isDisposed)
-            {
-                gzclose(_gzFile);
-                _isDisposed = true;
-            }
-        }
-        #endregion
-    
-        #region Basic reading and writing
-        /// <summary>
-        /// Attempts to read a number of bytes from the stream.
-        /// </summary>
-        /// <param name="buffer">The destination data buffer</param>
-        /// <param name="offset">The index of the first destination byte in <c>buffer</c></param>
-        /// <param name="count">The number of bytes requested</param>
-        /// <returns>The number of bytes read</returns>
-        /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
-        /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
-        /// <exception cref="ArgumentException">If <c>offset</c>  + <c>count</c> is > buffer.Length</exception>
-        /// <exception cref="NotSupportedException">If this stream is not readable.</exception>
-        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
-        public override int Read(byte[] buffer, int offset, int count)
-        {
-            if (!CanRead) throw new NotSupportedException();
-            if (buffer == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > buffer.Length) throw new ArgumentException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-
-            GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
-            int result;
-            try
-            {
-                result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
-                if (result < 0)
-                    throw new IOException();
-            }
-            finally
-            {
-                h.Free();
-            }
-            return result;
-        }
-
-        /// <summary>
-        /// Attempts to read a single byte from the stream.
-        /// </summary>
-        /// <returns>The byte that was read, or -1 in case of error or End-Of-File</returns>
-        public override int ReadByte()
-        {
-            if (!CanRead) throw new NotSupportedException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-            return gzgetc(_gzFile);
-        }
-
-        /// <summary>
-        /// Writes a number of bytes to the stream
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
-        /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
-        /// <exception cref="ArgumentException">If <c>offset</c>  + <c>count</c> is > buffer.Length</exception>
-        /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
-        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
-        public override void Write(byte[] buffer, int offset, int count)
-        {
-            if (!CanWrite) throw new NotSupportedException();
-            if (buffer == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > buffer.Length) throw new ArgumentException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-
-            GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
-            try
-            {
-                int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
-                if (result < 0)
-                    throw new IOException();
-            }
-            finally
-            {
-                h.Free();
-            }
-        }
-
-        /// <summary>
-        /// Writes a single byte to the stream
-        /// </summary>
-        /// <param name="value">The byte to add to the stream.</param>
-        /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
-        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
-        public override void WriteByte(byte value)
-        {
-            if (!CanWrite) throw new NotSupportedException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-
-            int result = gzputc(_gzFile, (int)value);
-            if (result < 0)
-                throw new IOException();
-        }
-        #endregion
-
-        #region Position & length stuff
-        /// <summary>
-        /// Not supported.
-        /// </summary>
-        /// <param name="value"></param>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override void SetLength(long value)
-        {
-            throw new NotSupportedException();
-        }
-    
-        /// <summary>
-        ///  Not suppported.
-        /// </summary>
-        /// <param name="offset"></param>
-        /// <param name="origin"></param>
-        /// <returns></returns>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override long Seek(long offset, SeekOrigin origin)
-        {
-            throw new NotSupportedException();
-        }
-    
-        /// <summary>
-        /// Flushes the <c>GZipStream</c>.
-        /// </summary>
-        /// <remarks>In this implementation, this method does nothing. This is because excessive
-        /// flushing may degrade the achievable compression rates.</remarks>
-        public override void Flush()
-        {
-            // left empty on purpose
-        }
-    
-        /// <summary>
-        /// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.
-        /// </summary>
-        /// <remarks>In this implementation this property is not supported</remarks>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override long Position
-        {
-            get
-            {
-                throw new NotSupportedException();
-            }
-            set
-            {
-                throw new NotSupportedException();
-            }
-        }
-    
-        /// <summary>
-        /// Gets the size of the stream. Not suppported.
-        /// </summary>
-        /// <remarks>In this implementation this property is not supported</remarks>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override long Length
-        {
-            get
-            {
-                throw new NotSupportedException();
-            }
-        }
-        #endregion
-    }
-}
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+	/// <summary>
+	/// Implements a compressed <see cref="Stream"/>, in GZip (.gz) format.
+	/// </summary>
+	public class GZipStream : Stream, IDisposable
+	{
+        #region Dll Imports
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
+        private static extern IntPtr gzopen(string name, string mode);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int gzclose(IntPtr gzFile);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int gzwrite(IntPtr gzFile, int data, int length);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int gzread(IntPtr gzFile, int data, int length);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int gzgetc(IntPtr gzFile);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int gzputc(IntPtr gzFile, int c);
+
+        #endregion
+
+        #region Private data
+        private IntPtr _gzFile;
+        private bool _isDisposed = false;
+        private bool _isWriting;
+        #endregion
+
+        #region Constructors
+        /// <summary>
+        /// Creates a new file as a writeable GZipStream
+        /// </summary>
+        /// <param name="fileName">The name of the compressed file to create</param>
+        /// <param name="level">The compression level to use when adding data</param>
+        /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
+		public GZipStream(string fileName, CompressLevel level)
+		{
+            _isWriting = true;
+            _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level));
+            if (_gzFile == IntPtr.Zero)
+                throw new ZLibException(-1, "Could not open " + fileName);
+		}
+
+        /// <summary>
+        /// Opens an existing file as a readable GZipStream
+        /// </summary>
+        /// <param name="fileName">The name of the file to open</param>
+        /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
+        public GZipStream(string fileName)
+        {
+            _isWriting = false;
+            _gzFile = gzopen(fileName, "rb");
+            if (_gzFile == IntPtr.Zero)
+                throw new ZLibException(-1, "Could not open " + fileName);
+
+        }
+        #endregion
+
+        #region Access properties
+        /// <summary>
+        /// Returns true of this stream can be read from, false otherwise
+        /// </summary>
+        public override bool CanRead
+        {
+            get
+            {
+                return !_isWriting;
+            }
+        }
+
+
+        /// <summary>
+        /// Returns false.
+        /// </summary>
+        public override bool CanSeek
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// Returns true if this tsream is writeable, false otherwise
+        /// </summary>
+        public override bool CanWrite
+        {
+            get
+            {
+                return _isWriting;
+            }
+        }
+        #endregion
+
+        #region Destructor & IDispose stuff
+
+        /// <summary>
+        /// Destroys this instance
+        /// </summary>
+        ~GZipStream()
+        {
+            cleanUp(false);
+        }
+
+        /// <summary>
+        /// Closes the external file handle
+        /// </summary>
+        public void Dispose()
+        {
+            cleanUp(true);
+        }
+
+        // Does the actual closing of the file handle.
+        private void cleanUp(bool isDisposing)
+        {
+            if (!_isDisposed)
+            {
+                gzclose(_gzFile);
+                _isDisposed = true;
+            }
+        }
+        #endregion
+
+        #region Basic reading and writing
+        /// <summary>
+        /// Attempts to read a number of bytes from the stream.
+        /// </summary>
+        /// <param name="buffer">The destination data buffer</param>
+        /// <param name="offset">The index of the first destination byte in <c>buffer</c></param>
+        /// <param name="count">The number of bytes requested</param>
+        /// <returns>The number of bytes read</returns>
+        /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
+        /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
+        /// <exception cref="ArgumentException">If <c>offset</c>  + <c>count</c> is > buffer.Length</exception>
+        /// <exception cref="NotSupportedException">If this stream is not readable.</exception>
+        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+        public override int Read(byte[] buffer, int offset, int count)
+        {
+            if (!CanRead) throw new NotSupportedException();
+            if (buffer == null) throw new ArgumentNullException();
+            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+            if ((offset+count) > buffer.Length) throw new ArgumentException();
+            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+
+            GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+            int result;
+            try
+            {
+                result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
+                if (result < 0)
+                    throw new IOException();
+            }
+            finally
+            {
+                h.Free();
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Attempts to read a single byte from the stream.
+        /// </summary>
+        /// <returns>The byte that was read, or -1 in case of error or End-Of-File</returns>
+        public override int ReadByte()
+        {
+            if (!CanRead) throw new NotSupportedException();
+            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+            return gzgetc(_gzFile);
+        }
+
+        /// <summary>
+        /// Writes a number of bytes to the stream
+        /// </summary>
+        /// <param name="buffer"></param>
+        /// <param name="offset"></param>
+        /// <param name="count"></param>
+        /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
+        /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
+        /// <exception cref="ArgumentException">If <c>offset</c>  + <c>count</c> is > buffer.Length</exception>
+        /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
+        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+        public override void Write(byte[] buffer, int offset, int count)
+        {
+            if (!CanWrite) throw new NotSupportedException();
+            if (buffer == null) throw new ArgumentNullException();
+            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+            if ((offset+count) > buffer.Length) throw new ArgumentException();
+            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+
+            GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+            try
+            {
+                int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
+                if (result < 0)
+                    throw new IOException();
+            }
+            finally
+            {
+                h.Free();
+            }
+        }
+
+        /// <summary>
+        /// Writes a single byte to the stream
+        /// </summary>
+        /// <param name="value">The byte to add to the stream.</param>
+        /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
+        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
+        public override void WriteByte(byte value)
+        {
+            if (!CanWrite) throw new NotSupportedException();
+            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
+
+            int result = gzputc(_gzFile, (int)value);
+            if (result < 0)
+                throw new IOException();
+        }
+        #endregion
+
+        #region Position & length stuff
+        /// <summary>
+        /// Not supported.
+        /// </summary>
+        /// <param name="value"></param>
+        /// <exception cref="NotSupportedException">Always thrown</exception>
+        public override void SetLength(long value)
+        {
+            throw new NotSupportedException();
+        }
+
+        /// <summary>
+        ///  Not suppported.
+        /// </summary>
+        /// <param name="offset"></param>
+        /// <param name="origin"></param>
+        /// <returns></returns>
+        /// <exception cref="NotSupportedException">Always thrown</exception>
+        public override long Seek(long offset, SeekOrigin origin)
+        {
+            throw new NotSupportedException();
+        }
+
+        /// <summary>
+        /// Flushes the <c>GZipStream</c>.
+        /// </summary>
+        /// <remarks>In this implementation, this method does nothing. This is because excessive
+        /// flushing may degrade the achievable compression rates.</remarks>
+        public override void Flush()
+        {
+            // left empty on purpose
+        }
+
+        /// <summary>
+        /// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.
+        /// </summary>
+        /// <remarks>In this implementation this property is not supported</remarks>
+        /// <exception cref="NotSupportedException">Always thrown</exception>
+        public override long Position
+        {
+            get
+            {
+                throw new NotSupportedException();
+            }
+            set
+            {
+                throw new NotSupportedException();
+            }
+        }
+
+        /// <summary>
+        /// Gets the size of the stream. Not suppported.
+        /// </summary>
+        /// <remarks>In this implementation this property is not supported</remarks>
+        /// <exception cref="NotSupportedException">Always thrown</exception>
+        public override long Length
+        {
+            get
+            {
+                throw new NotSupportedException();
+            }
+        }
+        #endregion
+    }
+}
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/Inflater.cs
index 9ae9cf3..8ed5451 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/Inflater.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/Inflater.cs
@@ -1,105 +1,105 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-    
-    /// <summary>
-    /// Implements a data decompressor, using the inflate algorithm in the ZLib dll
-    /// </summary>
-    public class Inflater : CodecBase
-	{
-        #region Dll imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
-        private static extern int inflateInit_(ref ZStream sz, string vs, int size);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int inflate(ref ZStream sz, int flush);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int inflateReset(ref ZStream sz);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int inflateEnd(ref ZStream sz);
-        #endregion
-
-        /// <summary>
-        /// Constructs an new instance of the <c>Inflater</c>
-        /// </summary>
-        public Inflater() : base()
-		{
-            int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream));
-            if (retval != 0)
-                throw new ZLibException(retval, "Could not initialize inflater");
-
-            resetOutput();
-        }
-
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        public override void Add(byte[] data, int offset, int count)
-        {
-            if (data == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-
-            int total = count;
-            int inputIndex = offset;
-            int err = 0;
-
-            while (err >= 0 && inputIndex < total)
-            {
-                copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
-                err = inflate(ref _ztream, (int)FlushTypes.None);
-                if (err == 0)
-                    while (_ztream.avail_out == 0)
-                    {
-                        OnDataAvailable();
-                        err = inflate(ref _ztream, (int)FlushTypes.None);
-                    }
-
-                inputIndex += (int)_ztream.total_in;
-            }
-            setChecksum( _ztream.adler );
-        }
-
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        public override void Finish()
-        {
-            int err;
-            do 
-            {
-                err = inflate(ref _ztream, (int)FlushTypes.Finish);
-                OnDataAvailable();
-            }
-            while (err == 0);
-            setChecksum( _ztream.adler );
-            inflateReset(ref _ztream);
-            resetOutput();
-        }
-
-        /// <summary>
-        /// Closes the internal zlib inflate stream
-        /// </summary>
-        protected override void CleanUp() { inflateEnd(ref _ztream); }
-
-
-	}
-}
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace DotZLib
+{
+
+    /// <summary>
+    /// Implements a data decompressor, using the inflate algorithm in the ZLib dll
+    /// </summary>
+    public class Inflater : CodecBase
+	{
+        #region Dll imports
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
+        private static extern int inflateInit_(ref ZStream sz, string vs, int size);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int inflate(ref ZStream sz, int flush);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int inflateReset(ref ZStream sz);
+
+        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
+        private static extern int inflateEnd(ref ZStream sz);
+        #endregion
+
+        /// <summary>
+        /// Constructs an new instance of the <c>Inflater</c>
+        /// </summary>
+        public Inflater() : base()
+		{
+            int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream));
+            if (retval != 0)
+                throw new ZLibException(retval, "Could not initialize inflater");
+
+            resetOutput();
+        }
+
+
+        /// <summary>
+        /// Adds more data to the codec to be processed.
+        /// </summary>
+        /// <param name="data">Byte array containing the data to be added to the codec</param>
+        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
+        /// <param name="count">The number of bytes to add</param>
+        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
+        public override void Add(byte[] data, int offset, int count)
+        {
+            if (data == null) throw new ArgumentNullException();
+            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
+            if ((offset+count) > data.Length) throw new ArgumentException();
+
+            int total = count;
+            int inputIndex = offset;
+            int err = 0;
+
+            while (err >= 0 && inputIndex < total)
+            {
+                copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
+                err = inflate(ref _ztream, (int)FlushTypes.None);
+                if (err == 0)
+                    while (_ztream.avail_out == 0)
+                    {
+                        OnDataAvailable();
+                        err = inflate(ref _ztream, (int)FlushTypes.None);
+                    }
+
+                inputIndex += (int)_ztream.total_in;
+            }
+            setChecksum( _ztream.adler );
+        }
+
+
+        /// <summary>
+        /// Finishes up any pending data that needs to be processed and handled.
+        /// </summary>
+        public override void Finish()
+        {
+            int err;
+            do
+            {
+                err = inflate(ref _ztream, (int)FlushTypes.Finish);
+                OnDataAvailable();
+            }
+            while (err == 0);
+            setChecksum( _ztream.adler );
+            inflateReset(ref _ztream);
+            resetOutput();
+        }
+
+        /// <summary>
+        /// Closes the internal zlib inflate stream
+        /// </summary>
+        protected override void CleanUp() { inflateEnd(ref _ztream); }
+
+
+	}
+}
diff --git a/libsrc/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/libsrc/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
index 2e96317..3bbcc8c 100644
--- a/libsrc/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
+++ b/libsrc/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
@@ -1,274 +1,274 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Collections;
-using System.IO;
-
-// uncomment the define below to include unit tests
-//#define nunit
-#if nunit
-using NUnit.Framework;
-
-// Unit tests for the DotZLib class library
-// ----------------------------------------
-//
-// Use this with NUnit 2 from http://www.nunit.org
-//
-
-namespace DotZLibTests
-{
-    using DotZLib;
-
-    // helper methods
-    internal class Utils
-    {
-        public static bool byteArrEqual( byte[] lhs, byte[] rhs )
-        {
-            if (lhs.Length != rhs.Length)
-                return false;
-            for (int i = lhs.Length-1; i >= 0; --i)
-                if (lhs[i] != rhs[i])
-                    return false;
-            return true;
-        }
-
-    }
-
-
-    [TestFixture]
-    public class CircBufferTests
-    {
-        #region Circular buffer tests
-        [Test]
-        public void SinglePutGet()
-        {
-            CircularBuffer buf = new CircularBuffer(10);
-            Assert.AreEqual( 0, buf.Size );
-            Assert.AreEqual( -1, buf.Get() );
-
-            Assert.IsTrue(buf.Put( 1 ));
-            Assert.AreEqual( 1, buf.Size );
-            Assert.AreEqual( 1, buf.Get() );
-            Assert.AreEqual( 0, buf.Size );
-            Assert.AreEqual( -1, buf.Get() );
-        }
-
-        [Test]
-        public void BlockPutGet()
-        {
-            CircularBuffer buf = new CircularBuffer(10);
-            byte[] arr = {1,2,3,4,5,6,7,8,9,10};
-            Assert.AreEqual( 10, buf.Put(arr,0,10) );
-            Assert.AreEqual( 10, buf.Size );
-            Assert.IsFalse( buf.Put(11) );
-            Assert.AreEqual( 1, buf.Get() );
-            Assert.IsTrue( buf.Put(11) );
-
-            byte[] arr2 = (byte[])arr.Clone();
-            Assert.AreEqual( 9, buf.Get(arr2,1,9) );
-            Assert.IsTrue( Utils.byteArrEqual(arr,arr2) );
-        }
-
-        #endregion
-    }
-
-    [TestFixture]
-    public class ChecksumTests
-    {
-        #region CRC32 Tests
-        [Test]
-        public void CRC32_Null()
-        {
-            CRC32Checksum crc32 = new CRC32Checksum();
-            Assert.AreEqual( 0, crc32.Value );
-
-            crc32 = new CRC32Checksum(1);
-            Assert.AreEqual( 1, crc32.Value );
-
-            crc32 = new CRC32Checksum(556);
-            Assert.AreEqual( 556, crc32.Value );
-        }
-
-        [Test]
-        public void CRC32_Data()
-        {
-            CRC32Checksum crc32 = new CRC32Checksum();
-            byte[] data = { 1,2,3,4,5,6,7 };
-            crc32.Update(data);
-            Assert.AreEqual( 0x70e46888, crc32.Value  );
-
-            crc32 = new CRC32Checksum();
-            crc32.Update("penguin");
-            Assert.AreEqual( 0x0e5c1a120, crc32.Value );
-
-            crc32 = new CRC32Checksum(1);
-            crc32.Update("penguin");
-            Assert.AreEqual(0x43b6aa94, crc32.Value);
-
-        }
-        #endregion
-
-        #region Adler tests
-
-        [Test]
-        public void Adler_Null()
-        {
-            AdlerChecksum adler = new AdlerChecksum();
-            Assert.AreEqual(0, adler.Value);
-
-            adler = new AdlerChecksum(1);
-            Assert.AreEqual( 1, adler.Value );
-
-            adler = new AdlerChecksum(556);
-            Assert.AreEqual( 556, adler.Value );
-        }
-
-        [Test]
-        public void Adler_Data()
-        {
-            AdlerChecksum adler = new AdlerChecksum(1);
-            byte[] data = { 1,2,3,4,5,6,7 };
-            adler.Update(data);
-            Assert.AreEqual( 0x5b001d, adler.Value  );
-
-            adler = new AdlerChecksum();
-            adler.Update("penguin");
-            Assert.AreEqual(0x0bcf02f6, adler.Value );
-
-            adler = new AdlerChecksum(1);
-            adler.Update("penguin");
-            Assert.AreEqual(0x0bd602f7, adler.Value);
-
-        }
-        #endregion
-    }
-
-    [TestFixture]
-    public class InfoTests
-    {
-        #region Info tests
-        [Test]
-        public void Info_Version()
-        {
-            Info info = new Info();
-            Assert.AreEqual("1.2.3", Info.Version);
-            Assert.AreEqual(32, info.SizeOfUInt);
-            Assert.AreEqual(32, info.SizeOfULong);
-            Assert.AreEqual(32, info.SizeOfPointer);
-            Assert.AreEqual(32, info.SizeOfOffset);
-        }
-        #endregion
-    }
-
-    [TestFixture]
-    public class DeflateInflateTests
-    {
-        #region Deflate tests
-        [Test]
-        public void Deflate_Init()
-        {
-            using (Deflater def = new Deflater(CompressLevel.Default))
-            {
-            }
-        }
-
-        private ArrayList compressedData = new ArrayList();
-        private uint adler1;
-
-        private ArrayList uncompressedData = new ArrayList();
-        private uint adler2;
-
-        public void CDataAvail(byte[] data, int startIndex, int count)
-        {
-            for (int i = 0; i < count; ++i)
-                compressedData.Add(data[i+startIndex]);
-        }
-
-        [Test]
-        public void Deflate_Compress()
-        {
-            compressedData.Clear();
-
-            byte[] testData = new byte[35000];
-            for (int i = 0; i < testData.Length; ++i)
-                testData[i] = 5;
-
-            using (Deflater def = new Deflater((CompressLevel)5))
-            {
-                def.DataAvailable += new DataAvailableHandler(CDataAvail);
-                def.Add(testData);
-                def.Finish();
-                adler1 = def.Checksum;
-            }
-        }
-        #endregion
-
-        #region Inflate tests
-        [Test]
-        public void Inflate_Init()
-        {
-            using (Inflater inf = new Inflater())
-            {
-            }
-        }
-
-        private void DDataAvail(byte[] data, int startIndex, int count)
-        {
-            for (int i = 0; i < count; ++i)
-                uncompressedData.Add(data[i+startIndex]);
-        }
-
-        [Test]
-        public void Inflate_Expand()
-        { 
-            uncompressedData.Clear();
-
-            using (Inflater inf = new Inflater())
-            {
-                inf.DataAvailable += new DataAvailableHandler(DDataAvail);
-                inf.Add((byte[])compressedData.ToArray(typeof(byte)));
-                inf.Finish();
-                adler2 = inf.Checksum;
-            }
-            Assert.AreEqual( adler1, adler2 );
-        }
-        #endregion
-    }
-
-    [TestFixture]
-    public class GZipStreamTests
-    {
-        #region GZipStream test
-        [Test]
-        public void GZipStream_WriteRead()
-        {
-            using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best))
-            {
-                BinaryWriter writer = new BinaryWriter(gzOut);
-                writer.Write("hi there");
-                writer.Write(Math.PI);
-                writer.Write(42);
-            }
-
-            using (GZipStream gzIn = new GZipStream("gzstream.gz"))
-            {
-                BinaryReader reader = new BinaryReader(gzIn);
-                string s = reader.ReadString();
-                Assert.AreEqual("hi there",s);
-                double d = reader.ReadDouble();
-                Assert.AreEqual(Math.PI, d);
-                int i = reader.ReadInt32();
-                Assert.AreEqual(42,i);
-            }
-
-        }
-        #endregion
-	}
-}
-
-#endif
\ No newline at end of file
+//
+// © Copyright Henrik Ravn 2004
+//
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+using System;
+using System.Collections;
+using System.IO;
+
+// uncomment the define below to include unit tests
+//#define nunit
+#if nunit
+using NUnit.Framework;
+
+// Unit tests for the DotZLib class library
+// ----------------------------------------
+//
+// Use this with NUnit 2 from http://www.nunit.org
+//
+
+namespace DotZLibTests
+{
+    using DotZLib;
+
+    // helper methods
+    internal class Utils
+    {
+        public static bool byteArrEqual( byte[] lhs, byte[] rhs )
+        {
+            if (lhs.Length != rhs.Length)
+                return false;
+            for (int i = lhs.Length-1; i >= 0; --i)
+                if (lhs[i] != rhs[i])
+                    return false;
+            return true;
+        }
+
+    }
+
+
+    [TestFixture]
+    public class CircBufferTests
+    {
+        #region Circular buffer tests
+        [Test]
+        public void SinglePutGet()
+        {
+            CircularBuffer buf = new CircularBuffer(10);
+            Assert.AreEqual( 0, buf.Size );
+            Assert.AreEqual( -1, buf.Get() );
+
+            Assert.IsTrue(buf.Put( 1 ));
+            Assert.AreEqual( 1, buf.Size );
+            Assert.AreEqual( 1, buf.Get() );
+            Assert.AreEqual( 0, buf.Size );
+            Assert.AreEqual( -1, buf.Get() );
+        }
+
+        [Test]
+        public void BlockPutGet()
+        {
+            CircularBuffer buf = new CircularBuffer(10);
+            byte[] arr = {1,2,3,4,5,6,7,8,9,10};
+            Assert.AreEqual( 10, buf.Put(arr,0,10) );
+            Assert.AreEqual( 10, buf.Size );
+            Assert.IsFalse( buf.Put(11) );
+            Assert.AreEqual( 1, buf.Get() );
+            Assert.IsTrue( buf.Put(11) );
+
+            byte[] arr2 = (byte[])arr.Clone();
+            Assert.AreEqual( 9, buf.Get(arr2,1,9) );
+            Assert.IsTrue( Utils.byteArrEqual(arr,arr2) );
+        }
+
+        #endregion
+    }
+
+    [TestFixture]
+    public class ChecksumTests
+    {
+        #region CRC32 Tests
+        [Test]
+        public void CRC32_Null()
+        {
+            CRC32Checksum crc32 = new CRC32Checksum();
+            Assert.AreEqual( 0, crc32.Value );
+
+            crc32 = new CRC32Checksum(1);
+            Assert.AreEqual( 1, crc32.Value );
+
+            crc32 = new CRC32Checksum(556);
+            Assert.AreEqual( 556, crc32.Value );
+        }
+
+        [Test]
+        public void CRC32_Data()
+        {
+            CRC32Checksum crc32 = new CRC32Checksum();
+            byte[] data = { 1,2,3,4,5,6,7 };
+            crc32.Update(data);
+            Assert.AreEqual( 0x70e46888, crc32.Value  );
+
+            crc32 = new CRC32Checksum();
+            crc32.Update("penguin");
+            Assert.AreEqual( 0x0e5c1a120, crc32.Value );
+
+            crc32 = new CRC32Checksum(1);
+            crc32.Update("penguin");
+            Assert.AreEqual(0x43b6aa94, crc32.Value);
+
+        }
+        #endregion
+
+        #region Adler tests
+
+        [Test]
+        public void Adler_Null()
+        {
+            AdlerChecksum adler = new AdlerChecksum();
+            Assert.AreEqual(0, adler.Value);
+
+            adler = new AdlerChecksum(1);
+            Assert.AreEqual( 1, adler.Value );
+
+            adler = new AdlerChecksum(556);
+            Assert.AreEqual( 556, adler.Value );
+        }
+
+        [Test]
+        public void Adler_Data()
+        {
+            AdlerChecksum adler = new AdlerChecksum(1);
+            byte[] data = { 1,2,3,4,5,6,7 };
+            adler.Update(data);
+            Assert.AreEqual( 0x5b001d, adler.Value  );
+
+            adler = new AdlerChecksum();
+            adler.Update("penguin");
+            Assert.AreEqual(0x0bcf02f6, adler.Value );
+
+            adler = new AdlerChecksum(1);
+            adler.Update("penguin");
+            Assert.AreEqual(0x0bd602f7, adler.Value);
+
+        }
+        #endregion
+    }
+
+    [TestFixture]
+    public class InfoTests
+    {
+        #region Info tests
+        [Test]
+        public void Info_Version()
+        {
+            Info info = new Info();
+            Assert.AreEqual("1.2.5", Info.Version);
+            Assert.AreEqual(32, info.SizeOfUInt);
+            Assert.AreEqual(32, info.SizeOfULong);
+            Assert.AreEqual(32, info.SizeOfPointer);
+            Assert.AreEqual(32, info.SizeOfOffset);
+        }
+        #endregion
+    }
+
+    [TestFixture]
+    public class DeflateInflateTests
+    {
+        #region Deflate tests
+        [Test]
+        public void Deflate_Init()
+        {
+            using (Deflater def = new Deflater(CompressLevel.Default))
+            {
+            }
+        }
+
+        private ArrayList compressedData = new ArrayList();
+        private uint adler1;
+
+        private ArrayList uncompressedData = new ArrayList();
+        private uint adler2;
+
+        public void CDataAvail(byte[] data, int startIndex, int count)
+        {
+            for (int i = 0; i < count; ++i)
+                compressedData.Add(data[i+startIndex]);
+        }
+
+        [Test]
+        public void Deflate_Compress()
+        {
+            compressedData.Clear();
+
+            byte[] testData = new byte[35000];
+            for (int i = 0; i < testData.Length; ++i)
+                testData[i] = 5;
+
+            using (Deflater def = new Deflater((CompressLevel)5))
+            {
+                def.DataAvailable += new DataAvailableHandler(CDataAvail);
+                def.Add(testData);
+                def.Finish();
+                adler1 = def.Checksum;
+            }
+        }
+        #endregion
+
+        #region Inflate tests
+        [Test]
+        public void Inflate_Init()
+        {
+            using (Inflater inf = new Inflater())
+            {
+            }
+        }
+
+        private void DDataAvail(byte[] data, int startIndex, int count)
+        {
+            for (int i = 0; i < count; ++i)
+                uncompressedData.Add(data[i+startIndex]);
+        }
+
+        [Test]
+        public void Inflate_Expand()
+        {
+            uncompressedData.Clear();
+
+            using (Inflater inf = new Inflater())
+            {
+                inf.DataAvailable += new DataAvailableHandler(DDataAvail);
+                inf.Add((byte[])compressedData.ToArray(typeof(byte)));
+                inf.Finish();
+                adler2 = inf.Checksum;
+            }
+            Assert.AreEqual( adler1, adler2 );
+        }
+        #endregion
+    }
+
+    [TestFixture]
+    public class GZipStreamTests
+    {
+        #region GZipStream test
+        [Test]
+        public void GZipStream_WriteRead()
+        {
+            using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best))
+            {
+                BinaryWriter writer = new BinaryWriter(gzOut);
+                writer.Write("hi there");
+                writer.Write(Math.PI);
+                writer.Write(42);
+            }
+
+            using (GZipStream gzIn = new GZipStream("gzstream.gz"))
+            {
+                BinaryReader reader = new BinaryReader(gzIn);
+                string s = reader.ReadString();
+                Assert.AreEqual("hi there",s);
+                double d = reader.ReadDouble();
+                Assert.AreEqual(Math.PI, d);
+                int i = reader.ReadInt32();
+                Assert.AreEqual(42,i);
+            }
+
+        }
+        #endregion
+	}
+}
+
+#endif
diff --git a/libsrc/zlib/contrib/dotzlib/readme.txt b/libsrc/zlib/contrib/dotzlib/readme.txt
index 210f4b0..b239572 100644
--- a/libsrc/zlib/contrib/dotzlib/readme.txt
+++ b/libsrc/zlib/contrib/dotzlib/readme.txt
@@ -1,6 +1,6 @@
 This directory contains a .Net wrapper class library for the ZLib1.dll
 
-The wrapper includes support for inflating/deflating memory buffers, 
+The wrapper includes support for inflating/deflating memory buffers,
 .Net streaming wrappers for the gz streams part of zlib, and wrappers
 for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples.
 
@@ -26,11 +26,11 @@ Build instructions:
 
 1. Using Visual Studio.Net 2003:
    Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll)
-   will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on 
-   you are building the release or debug version of the library. Check 
+   will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on
+   you are building the release or debug version of the library. Check
    DotZLib/UnitTests.cs for instructions on how to include unit tests in the
    build.
-   
+
 2. Using NAnt:
    Open a command prompt with access to the build environment and run nant
    in the same directory as the DotZLib.build file.
@@ -38,15 +38,15 @@ Build instructions:
    debug={true|false} to toggle between release/debug builds (default=true).
    nunit={true|false} to include or esclude unit tests (default=true).
    Also the target clean will remove binaries.
-   Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release 
-   or ./DotZLib/bin/debug, depending on whether you are building the release 
+   Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release
+   or ./DotZLib/bin/debug, depending on whether you are building the release
    or debug version of the library.
 
-   Examples: 
+   Examples:
      nant -D:debug=false -D:nunit=false
        will build a release mode version of the library without unit tests.
      nant
-       will build a debug version of the library with unit tests 
+       will build a debug version of the library with unit tests
      nant clean
        will remove all previously built files.
 
@@ -54,5 +54,5 @@ Build instructions:
 ---------------------------------
 Copyright (c) Henrik Ravn 2004
 
-Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
+Use, modification and distribution are subject to the Boost Software License, Version 1.0.
 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/libsrc/zlib/contrib/gcc_gvmat64/gvmat64.S b/libsrc/zlib/contrib/gcc_gvmat64/gvmat64.S
new file mode 100644
index 0000000..dd858dd
--- /dev/null
+++ b/libsrc/zlib/contrib/gcc_gvmat64/gvmat64.S
@@ -0,0 +1,574 @@
+/*
+;uInt longest_match_x64(
+;    deflate_state *s,
+;    IPos cur_match);                             // current match 
+
+; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64
+;  (AMD64 on Athlon 64, Opteron, Phenom
+;     and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
+; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode)
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+;
+; File written by Gilles Vollant, by converting to assembly the longest_match
+;  from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
+;  and by taking inspiration on asm686 with masm, optimised assembly code
+;        from Brian Raiter, written 1998
+;
+;  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.
+;
+;         http://www.zlib.net
+;         http://www.winimage.com/zLibDll
+;         http://www.muppetlabs.com/~breadbox/software/assembly.html
+;
+; to compile this file for zLib, I use option:
+;   gcc -c -arch x86_64 gvmat64.S
+
+
+;uInt longest_match(s, cur_match)
+;    deflate_state *s;
+;    IPos cur_match;                             // current match /
+;
+; with XCode for Mac, I had strange error with some jump on intel syntax
+; this is why BEFORE_JMP and AFTER_JMP are used
+ */
+
+
+#define BEFORE_JMP .att_syntax
+#define AFTER_JMP .intel_syntax noprefix
+
+#ifndef NO_UNDERLINE
+#	define	match_init	_match_init
+#	define	longest_match	_longest_match
+#endif
+
+.intel_syntax noprefix
+
+.globl	match_init, longest_match
+.text
+longest_match:
+
+
+
+#define LocalVarsSize 96
+/*
+; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
+; free register :  r14,r15
+; register can be saved : rsp
+*/
+
+#define chainlenwmask     (rsp + 8 - LocalVarsSize)
+#define nicematch         (rsp + 16 - LocalVarsSize)
+
+#define save_rdi        (rsp + 24 - LocalVarsSize)
+#define save_rsi        (rsp + 32 - LocalVarsSize)
+#define save_rbx        (rsp + 40 - LocalVarsSize)
+#define save_rbp        (rsp + 48 - LocalVarsSize)
+#define save_r12        (rsp + 56 - LocalVarsSize)
+#define save_r13        (rsp + 64 - LocalVarsSize)
+#define save_r14        (rsp + 72 - LocalVarsSize)
+#define save_r15        (rsp + 80 - LocalVarsSize)
+
+
+/*
+;  all the +4 offsets are due to the addition of pending_buf_size (in zlib
+;  in the deflate_state structure since the asm code was first written
+;  (if you compile with zlib 1.0.4 or older, remove the +4).
+;  Note : these value are good with a 8 bytes boundary pack structure
+*/
+
+#define    MAX_MATCH              258
+#define    MIN_MATCH              3
+#define    MIN_LOOKAHEAD          (MAX_MATCH+MIN_MATCH+1)
+
+/*
+;;; Offsets for fields in the deflate_state structure. These numbers
+;;; are calculated from the definition of deflate_state, with the
+;;; assumption that the compiler will dword-align the fields. (Thus,
+;;; changing the definition of deflate_state could easily cause this
+;;; program to crash horribly, without so much as a warning at
+;;; compile time. Sigh.)
+
+;  all the +zlib1222add offsets are due to the addition of fields
+;  in zlib in the deflate_state structure since the asm code was first written
+;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+*/
+
+
+
+/* you can check the structure offset by running
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "deflate.h"
+
+void print_depl()
+{
+deflate_state ds;
+deflate_state *s=&ds;
+printf("size pointer=%u\n",(int)sizeof(void*));
+
+printf("#define dsWSize         %u\n",(int)(((char*)&(s->w_size))-((char*)s)));
+printf("#define dsWMask         %u\n",(int)(((char*)&(s->w_mask))-((char*)s)));
+printf("#define dsWindow        %u\n",(int)(((char*)&(s->window))-((char*)s)));
+printf("#define dsPrev          %u\n",(int)(((char*)&(s->prev))-((char*)s)));
+printf("#define dsMatchLen      %u\n",(int)(((char*)&(s->match_length))-((char*)s)));
+printf("#define dsPrevMatch     %u\n",(int)(((char*)&(s->prev_match))-((char*)s)));
+printf("#define dsStrStart      %u\n",(int)(((char*)&(s->strstart))-((char*)s)));
+printf("#define dsMatchStart    %u\n",(int)(((char*)&(s->match_start))-((char*)s)));
+printf("#define dsLookahead     %u\n",(int)(((char*)&(s->lookahead))-((char*)s)));
+printf("#define dsPrevLen       %u\n",(int)(((char*)&(s->prev_length))-((char*)s)));
+printf("#define dsMaxChainLen   %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
+printf("#define dsGoodMatch     %u\n",(int)(((char*)&(s->good_match))-((char*)s)));
+printf("#define dsNiceMatch     %u\n",(int)(((char*)&(s->nice_match))-((char*)s)));
+}
+*/
+
+#define dsWSize          68
+#define dsWMask          76
+#define dsWindow         80
+#define dsPrev           96
+#define dsMatchLen       144
+#define dsPrevMatch      148
+#define dsStrStart       156
+#define dsMatchStart     160
+#define dsLookahead      164
+#define dsPrevLen        168
+#define dsMaxChainLen    172
+#define dsGoodMatch      188
+#define dsNiceMatch      192
+
+#define window_size      [ rcx + dsWSize]
+#define WMask            [ rcx + dsWMask]
+#define window_ad        [ rcx + dsWindow]
+#define prev_ad          [ rcx + dsPrev]
+#define strstart         [ rcx + dsStrStart]
+#define match_start      [ rcx + dsMatchStart]
+#define Lookahead        [ rcx + dsLookahead] //; 0ffffffffh on infozip
+#define prev_length      [ rcx + dsPrevLen]
+#define max_chain_length [ rcx + dsMaxChainLen]
+#define good_match       [ rcx + dsGoodMatch]
+#define nice_match       [ rcx + dsNiceMatch]
+
+/*
+; windows:
+; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match)
+
+; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
+; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
+;
+; All registers must be preserved across the call, except for
+;   rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
+
+;
+; gcc on macosx-linux:
+; see http://www.x86-64.org/documentation/abi-0.99.pdf
+; param 1 in rdi, param 2 in rsi
+; rbx, rsp, rbp, r12 to r15 must be preserved
+
+;;; Save registers that the compiler may be using, and adjust esp to
+;;; make room for our stack frame.
+
+
+;;; Retrieve the function arguments. r8d will hold cur_match
+;;; throughout the entire function. edx will hold the pointer to the
+;;; deflate_state structure during the function's setup (before
+;;; entering the main loop.
+
+; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
+; mac: param 1 in rdi, param 2 rsi
+; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
+*/
+        mov [save_rbx],rbx
+        mov [save_rbp],rbp
+
+
+        mov rcx,rdi
+
+        mov r8d,esi
+
+
+        mov [save_r12],r12
+        mov [save_r13],r13
+        mov [save_r14],r14
+        mov [save_r15],r15
+
+
+//;;; uInt wmask = s->w_mask;
+//;;; unsigned chain_length = s->max_chain_length;
+//;;; if (s->prev_length >= s->good_match) {
+//;;;     chain_length >>= 2;
+//;;; }
+
+
+        mov edi, prev_length
+        mov esi, good_match
+        mov eax, WMask
+        mov ebx, max_chain_length
+        cmp edi, esi
+        jl  LastMatchGood
+        shr ebx, 2
+LastMatchGood:
+
+//;;; chainlen is decremented once beforehand so that the function can
+//;;; use the sign flag instead of the zero flag for the exit test.
+//;;; It is then shifted into the high word, to make room for the wmask
+//;;; value, which it will always accompany.
+
+        dec ebx
+        shl ebx, 16
+        or  ebx, eax
+
+//;;; on zlib only
+//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+
+
+        mov eax, nice_match
+        mov [chainlenwmask], ebx
+        mov r10d, Lookahead
+        cmp r10d, eax
+        cmovnl r10d, eax
+        mov [nicematch],r10d
+
+
+
+//;;; register Bytef *scan = s->window + s->strstart;
+        mov r10, window_ad
+        mov ebp, strstart
+        lea r13, [r10 + rbp]
+
+//;;; Determine how many bytes the scan ptr is off from being
+//;;; dword-aligned.
+
+         mov r9,r13
+         neg r13
+         and r13,3
+
+//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+//;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
+
+
+        mov eax, window_size
+        sub eax, MIN_LOOKAHEAD
+
+
+        xor edi,edi
+        sub ebp, eax
+
+        mov r11d, prev_length
+
+        cmovng ebp,edi
+
+//;;; int best_len = s->prev_length;
+
+
+//;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+       lea  rsi,[r10+r11]
+
+//;;; register ush scan_start = *(ushf*)scan;
+//;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
+//;;; Posf *prev = s->prev;
+
+        movzx r12d,word ptr [r9]
+        movzx ebx, word ptr [r9 + r11 - 1]
+
+        mov rdi, prev_ad
+
+//;;; Jump into the main loop.
+
+        mov edx, [chainlenwmask]
+
+        cmp bx,word ptr [rsi + r8 - 1]
+        jz  LookupLoopIsZero
+				
+						
+						
+LookupLoop1:
+        and r8d, edx
+
+        movzx   r8d, word ptr [rdi + r8*2]
+        cmp r8d, ebp
+        jbe LeaveNow
+		
+		
+		
+        sub edx, 0x00010000
+		BEFORE_JMP
+        js  LeaveNow
+		AFTER_JMP
+
+LoopEntry1:
+        cmp bx,word ptr [rsi + r8 - 1]
+		BEFORE_JMP
+        jz  LookupLoopIsZero
+		AFTER_JMP
+
+LookupLoop2:
+        and r8d, edx
+
+        movzx   r8d, word ptr [rdi + r8*2]
+        cmp r8d, ebp
+		BEFORE_JMP
+        jbe LeaveNow
+		AFTER_JMP
+        sub edx, 0x00010000
+		BEFORE_JMP
+        js  LeaveNow
+		AFTER_JMP
+
+LoopEntry2:
+        cmp bx,word ptr [rsi + r8 - 1]
+		BEFORE_JMP
+        jz  LookupLoopIsZero
+		AFTER_JMP
+
+LookupLoop4:
+        and r8d, edx
+
+        movzx   r8d, word ptr [rdi + r8*2]
+        cmp r8d, ebp
+		BEFORE_JMP
+        jbe LeaveNow
+		AFTER_JMP
+        sub edx, 0x00010000
+		BEFORE_JMP
+        js  LeaveNow
+		AFTER_JMP
+
+LoopEntry4:
+
+        cmp bx,word ptr [rsi + r8 - 1]
+		BEFORE_JMP
+        jnz LookupLoop1
+        jmp LookupLoopIsZero
+		AFTER_JMP
+/*
+;;; do {
+;;;     match = s->window + cur_match;
+;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
+;;;         *(ushf*)match != scan_start) continue;
+;;;     [...]
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+;;;          && --chain_length != 0);
+;;;
+;;; Here is the inner loop of the function. The function will spend the
+;;; majority of its time in this loop, and majority of that time will
+;;; be spent in the first ten instructions.
+;;;
+;;; Within this loop:
+;;; ebx = scanend
+;;; r8d = curmatch
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+;;; esi = windowbestlen - i.e., (window + bestlen)
+;;; edi = prev
+;;; ebp = limit
+*/
+.balign 16
+LookupLoop:
+        and r8d, edx
+
+        movzx   r8d, word ptr [rdi + r8*2]
+        cmp r8d, ebp
+		BEFORE_JMP
+        jbe LeaveNow
+		AFTER_JMP
+        sub edx, 0x00010000
+		BEFORE_JMP
+        js  LeaveNow
+		AFTER_JMP
+
+LoopEntry:
+
+        cmp bx,word ptr [rsi + r8 - 1]
+		BEFORE_JMP
+        jnz LookupLoop1
+		AFTER_JMP
+LookupLoopIsZero:
+        cmp     r12w, word ptr [r10 + r8]
+		BEFORE_JMP
+        jnz LookupLoop1
+		AFTER_JMP
+
+
+//;;; Store the current value of chainlen.
+        mov [chainlenwmask], edx
+/*
+;;; Point edi to the string under scrutiny, and esi to the string we
+;;; are hoping to match it up with. In actuality, esi and edi are
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+;;; initialized to -(MAX_MATCH_8 - scanalign).
+*/
+        lea rsi,[r8+r10]
+        mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8)
+        lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8]
+        lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8]
+
+        prefetcht1 [rsi+rdx]
+        prefetcht1 [rdi+rdx]
+
+/*
+;;; Test the strings for equality, 8 bytes at a time. At the end,
+;;; adjust rdx so that it is offset to the exact byte that mismatched.
+;;;
+;;; We already know at this point that the first three bytes of the
+;;; strings match each other, and they can be safely passed over before
+;;; starting the compare loop. So what this code does is skip over 0-3
+;;; bytes, as much as necessary in order to dword-align the edi
+;;; pointer. (rsi will still be misaligned three times out of four.)
+;;;
+;;; It should be confessed that this loop usually does not represent
+;;; much of the total running time. Replacing it with a more
+;;; straightforward "rep cmpsb" would not drastically degrade
+;;; performance.
+*/
+
+LoopCmps:
+        mov rax, [rsi + rdx]
+        xor rax, [rdi + rdx]
+        jnz LeaveLoopCmps
+
+        mov rax, [rsi + rdx + 8]
+        xor rax, [rdi + rdx + 8]
+        jnz LeaveLoopCmps8
+
+
+        mov rax, [rsi + rdx + 8+8]
+        xor rax, [rdi + rdx + 8+8]
+        jnz LeaveLoopCmps16
+
+        add rdx,8+8+8
+
+		BEFORE_JMP
+        jnz  LoopCmps
+        jmp  LenMaximum
+		AFTER_JMP
+		
+LeaveLoopCmps16: add rdx,8
+LeaveLoopCmps8: add rdx,8
+LeaveLoopCmps:
+
+        test    eax, 0x0000FFFF
+        jnz LenLower
+
+        test eax,0xffffffff
+
+        jnz LenLower32
+
+        add rdx,4
+        shr rax,32
+        or ax,ax
+		BEFORE_JMP
+        jnz LenLower
+		AFTER_JMP
+
+LenLower32:
+        shr eax,16
+        add rdx,2
+		
+LenLower:		
+        sub al, 1
+        adc rdx, 0
+//;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+//;;; then automatically accept it as the best possible match and leave.
+
+        lea rax, [rdi + rdx]
+        sub rax, r9
+        cmp eax, MAX_MATCH
+		BEFORE_JMP
+        jge LenMaximum
+		AFTER_JMP
+/*
+;;; If the length of the match is not longer than the best match we
+;;; have so far, then forget it and return to the lookup loop.
+;///////////////////////////////////
+*/
+        cmp eax, r11d
+        jg  LongerMatch
+
+        lea rsi,[r10+r11]
+
+        mov rdi, prev_ad
+        mov edx, [chainlenwmask]
+		BEFORE_JMP
+        jmp LookupLoop
+		AFTER_JMP
+/*
+;;;         s->match_start = cur_match;
+;;;         best_len = len;
+;;;         if (len >= nice_match) break;
+;;;         scan_end = *(ushf*)(scan+best_len-1);
+*/
+LongerMatch:
+        mov r11d, eax
+        mov match_start, r8d
+        cmp eax, [nicematch]
+		BEFORE_JMP
+        jge LeaveNow
+		AFTER_JMP
+
+        lea rsi,[r10+rax]
+
+        movzx   ebx, word ptr [r9 + rax - 1]
+        mov rdi, prev_ad
+        mov edx, [chainlenwmask]
+		BEFORE_JMP
+        jmp LookupLoop
+		AFTER_JMP
+
+//;;; Accept the current string, with the maximum possible length.
+
+LenMaximum:
+        mov r11d,MAX_MATCH
+        mov match_start, r8d
+
+//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+//;;; return s->lookahead;
+
+LeaveNow:
+        mov eax, Lookahead
+        cmp r11d, eax
+        cmovng eax, r11d
+
+
+
+//;;; Restore the stack and return from whence we came.
+
+
+//        mov rsi,[save_rsi]
+//        mov rdi,[save_rdi]
+        mov rbx,[save_rbx]
+        mov rbp,[save_rbp]
+        mov r12,[save_r12]
+        mov r13,[save_r13]
+        mov r14,[save_r14]
+        mov r15,[save_r15]
+
+
+        ret 0
+//; please don't remove this string !
+//; Your can freely use gvmat64 in any free or commercial app
+//; but it is far better don't remove the string in the binary!
+ //   db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
+
+
+match_init:
+  ret 0
+
+
diff --git a/libsrc/zlib/contrib/infback9/infback9.c b/libsrc/zlib/contrib/infback9/infback9.c
index f5ddde6..7bbe90c 100644
--- a/libsrc/zlib/contrib/infback9/infback9.c
+++ b/libsrc/zlib/contrib/infback9/infback9.c
@@ -1,5 +1,5 @@
 /* infback9.c -- inflate deflate64 data using a call-back interface
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2008 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -242,7 +242,7 @@ void FAR *out_desc;
     code const FAR *distcode;   /* starting table for distance codes */
     unsigned lenbits;           /* index bits for lencode */
     unsigned distbits;          /* index bits for distcode */
-    code this;                  /* current decoding table entry */
+    code here;                  /* current decoding table entry */
     code last;                  /* parent table entry */
     unsigned len;               /* length to copy for repeats, bits to drop */
     int ret;                    /* return code */
@@ -384,19 +384,19 @@ void FAR *out_desc;
             state->have = 0;
             while (state->have < state->nlen + state->ndist) {
                 for (;;) {
-                    this = lencode[BITS(lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
+                    here = lencode[BITS(lenbits)];
+                    if ((unsigned)(here.bits) <= bits) break;
                     PULLBYTE();
                 }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
+                if (here.val < 16) {
+                    NEEDBITS(here.bits);
+                    DROPBITS(here.bits);
+                    state->lens[state->have++] = here.val;
                 }
                 else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
+                    if (here.val == 16) {
+                        NEEDBITS(here.bits + 2);
+                        DROPBITS(here.bits);
                         if (state->have == 0) {
                             strm->msg = (char *)"invalid bit length repeat";
                             mode = BAD;
@@ -406,16 +406,16 @@ void FAR *out_desc;
                         copy = 3 + BITS(2);
                         DROPBITS(2);
                     }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
+                    else if (here.val == 17) {
+                        NEEDBITS(here.bits + 3);
+                        DROPBITS(here.bits);
                         len = 0;
                         copy = 3 + BITS(3);
                         DROPBITS(3);
                     }
                     else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
+                        NEEDBITS(here.bits + 7);
+                        DROPBITS(here.bits);
                         len = 0;
                         copy = 11 + BITS(7);
                         DROPBITS(7);
@@ -433,7 +433,16 @@ void FAR *out_desc;
             /* handle error breaks in while */
             if (mode == BAD) break;
 
-            /* build code tables */
+            /* check for end-of-block code (better have one) */
+            if (state->lens[256] == 0) {
+                strm->msg = (char *)"invalid code -- missing end-of-block";
+                mode = BAD;
+                break;
+            }
+
+            /* build code tables -- note: do not change the lenbits or distbits
+               values here (9 and 6) without reading the comments in inftree9.h
+               concerning the ENOUGH constants, which depend on those values */
             state->next = state->codes;
             lencode = (code const FAR *)(state->next);
             lenbits = 9;
@@ -460,28 +469,28 @@ void FAR *out_desc;
         case LEN:
             /* get a literal, length, or end-of-block code */
             for (;;) {
-                this = lencode[BITS(lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
+                here = lencode[BITS(lenbits)];
+                if ((unsigned)(here.bits) <= bits) break;
                 PULLBYTE();
             }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
+            if (here.op && (here.op & 0xf0) == 0) {
+                last = here;
                 for (;;) {
-                    this = lencode[last.val +
+                    here = lencode[last.val +
                             (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
+                    if ((unsigned)(last.bits + here.bits) <= bits) break;
                     PULLBYTE();
                 }
                 DROPBITS(last.bits);
             }
-            DROPBITS(this.bits);
-            length = (unsigned)this.val;
+            DROPBITS(here.bits);
+            length = (unsigned)here.val;
 
             /* process literal */
-            if (this.op == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+            if (here.op == 0) {
+                Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
                         "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
+                        "inflate:         literal 0x%02x\n", here.val));
                 ROOM();
                 *put++ = (unsigned char)(length);
                 left--;
@@ -490,21 +499,21 @@ void FAR *out_desc;
             }
 
             /* process end of block */
-            if (this.op & 32) {
+            if (here.op & 32) {
                 Tracevv((stderr, "inflate:         end of block\n"));
                 mode = TYPE;
                 break;
             }
 
             /* invalid code */
-            if (this.op & 64) {
+            if (here.op & 64) {
                 strm->msg = (char *)"invalid literal/length code";
                 mode = BAD;
                 break;
             }
 
             /* length code -- get extra bits, if any */
-            extra = (unsigned)(this.op) & 31;
+            extra = (unsigned)(here.op) & 31;
             if (extra != 0) {
                 NEEDBITS(extra);
                 length += BITS(extra);
@@ -514,30 +523,30 @@ void FAR *out_desc;
 
             /* get distance code */
             for (;;) {
-                this = distcode[BITS(distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
+                here = distcode[BITS(distbits)];
+                if ((unsigned)(here.bits) <= bits) break;
                 PULLBYTE();
             }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
+            if ((here.op & 0xf0) == 0) {
+                last = here;
                 for (;;) {
-                    this = distcode[last.val +
+                    here = distcode[last.val +
                             (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
+                    if ((unsigned)(last.bits + here.bits) <= bits) break;
                     PULLBYTE();
                 }
                 DROPBITS(last.bits);
             }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
+            DROPBITS(here.bits);
+            if (here.op & 64) {
                 strm->msg = (char *)"invalid distance code";
                 mode = BAD;
                 break;
             }
-            offset = (unsigned)this.val;
+            offset = (unsigned)here.val;
 
             /* get distance extra bits, if any */
-            extra = (unsigned)(this.op) & 15;
+            extra = (unsigned)(here.op) & 15;
             if (extra != 0) {
                 NEEDBITS(extra);
                 offset += BITS(extra);
diff --git a/libsrc/zlib/contrib/infback9/inftree9.c b/libsrc/zlib/contrib/infback9/inftree9.c
index 0993f75..306c5f1 100644
--- a/libsrc/zlib/contrib/infback9/inftree9.c
+++ b/libsrc/zlib/contrib/infback9/inftree9.c
@@ -1,5 +1,5 @@
 /* inftree9.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate9_copyright[] =
-   " inflate9 1.2.3 Copyright 1995-2005 Mark Adler ";
+   " inflate9 1.2.5 Copyright 1995-2010 Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot
@@ -64,7 +64,7 @@ unsigned short FAR *work;
     static const unsigned short lext[31] = { /* Length codes 257..285 extra */
         128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
         130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
-        133, 133, 133, 133, 144, 201, 196};
+        133, 133, 133, 133, 144, 73, 195};
     static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
         1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
         65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
@@ -160,11 +160,10 @@ unsigned short FAR *work;
        entered in the tables.
 
        used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked when a LENS table is being made
-       against the space in *table, ENOUGH, minus the maximum space needed by
-       the worst case distance code, MAXD.  This should never happen, but the
-       sufficiency of ENOUGH has not been proven exhaustively, hence the check.
-       This assumes that when type == LENS, bits == 9.
+       provided *table space.  It is checked for LENS and DIST tables against
+       the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+       the initial root table size constants.  See the comments in inftree9.h
+       for more information.
 
        sym increments through all symbols, and the loop terminates when
        all codes of length max, i.e. all codes, have been processed.  This
@@ -203,7 +202,8 @@ unsigned short FAR *work;
     mask = used - 1;            /* mask for comparing low */
 
     /* check available table space */
-    if (type == LENS && used >= ENOUGH - MAXD)
+    if ((type == LENS && used >= ENOUGH_LENS) ||
+        (type == DISTS && used >= ENOUGH_DISTS))
         return 1;
 
     /* process all codes and make table entries */
@@ -270,7 +270,8 @@ unsigned short FAR *work;
 
             /* check for enough space */
             used += 1U << curr;
-            if (type == LENS && used >= ENOUGH - MAXD)
+            if ((type == LENS && used >= ENOUGH_LENS) ||
+                (type == DISTS && used >= ENOUGH_DISTS))
                 return 1;
 
             /* point entry in root table to sub-table */
diff --git a/libsrc/zlib/contrib/infback9/inftree9.h b/libsrc/zlib/contrib/infback9/inftree9.h
index a268084..5ab21f0 100644
--- a/libsrc/zlib/contrib/infback9/inftree9.h
+++ b/libsrc/zlib/contrib/infback9/inftree9.h
@@ -1,5 +1,5 @@
 /* inftree9.h -- header to use inftree9.c
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2008 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -35,15 +35,21 @@ typedef struct {
     01000000 - invalid code
  */
 
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1444 code structures (852 for length/literals
-   and 592 for distances, the latter actually the result of an
-   exhaustive search).  The true maximum is not known, but the value
-   below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
+/* Maximum size of the dynamic table.  The maximum number of code structures is
+   1446, which is the sum of 852 for literal/length codes and 594 for distance
+   codes.  These values were found by exhaustive searches using the program
+   examples/enough.c found in the zlib distribtution.  The arguments to that
+   program are the number of symbols, the initial root table size, and the
+   maximum bit length of a code.  "enough 286 9 15" for literal/length codes
+   returns returns 852, and "enough 32 6 15" for distance codes returns 594.
+   The initial root table size (9 or 6) is found in the fifth argument of the
+   inflate_table() calls in infback9.c.  If the root table size is changed,
+   then these maximum sizes would be need to be recalculated and updated. */
+#define ENOUGH_LENS 852
+#define ENOUGH_DISTS 594
+#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
 
-/* Type of code to build for inftable() */
+/* Type of code to build for inflate_table9() */
 typedef enum {
     CODES,
     LENS,
diff --git a/libsrc/zlib/contrib/inflate86/inffas86.c b/libsrc/zlib/contrib/inflate86/inffas86.c
index 6da7635..7292f67 100644
--- a/libsrc/zlib/contrib/inflate86/inffas86.c
+++ b/libsrc/zlib/contrib/inflate86/inffas86.c
@@ -113,7 +113,7 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
     ar.beg = ar.out - (start - strm->avail_out);
     ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
     ar.wsize = state->wsize;
-    ar.write = state->write;
+    ar.write = state->wnext;
     ar.window = state->window;
     ar.hold = state->hold;
     ar.bits = state->bits;
diff --git a/libsrc/zlib/contrib/iostream2/zstream.h b/libsrc/zlib/contrib/iostream2/zstream.h
index 891439c..9ef1e55 100644
--- a/libsrc/zlib/contrib/iostream2/zstream.h
+++ b/libsrc/zlib/contrib/iostream2/zstream.h
@@ -21,7 +21,7 @@
 
 /*
  * zstream.h - C++ interface to the 'zlib' general purpose compression library
- * $Id: zstream.h,v 1.1.1.1 2006/04/11 17:56:16 source Exp $
+ * $Id: zstream.h,v 1.1.1.1.2.1 2011/04/21 11:43:03 source Exp $
  */
 
 #include <strstream.h>
diff --git a/libsrc/zlib/contrib/masm686/match.asm b/libsrc/zlib/contrib/masm686/match.asm
deleted file mode 100644
index 4b03a71..0000000
--- a/libsrc/zlib/contrib/masm686/match.asm
+++ /dev/null
@@ -1,413 +0,0 @@
-
-; match.asm -- Pentium-Pro optimized version of longest_match()
-;
-; Updated for zlib 1.1.3 and converted to MASM 6.1x
-; Copyright (C) 2000 Dan Higdon <hdan at kinesoft.com>
-;                    and Chuck Walbourn <chuckw at kinesoft.com>
-; Corrections by Cosmin Truta <cosmint at cs.ubbcluj.ro>
-;
-; This is free software; you can redistribute it and/or modify it
-; under the terms of the GNU General Public License.
-
-; Based on match.S
-; Written for zlib 1.1.2
-; Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
-;
-; Modified by Gilles Vollant (2005) for add gzhead and gzindex
-
-	.686P
-	.MODEL	FLAT
-
-;===========================================================================
-; EQUATES
-;===========================================================================
-
-MAX_MATCH	EQU 258
-MIN_MATCH	EQU 3
-MIN_LOOKAHEAD	EQU (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8	EQU ((MAX_MATCH + 7) AND (NOT 7))
-
-;===========================================================================
-; STRUCTURES
-;===========================================================================
-
-; This STRUCT assumes a 4-byte alignment
-
-DEFLATE_STATE	STRUCT
-ds_strm			dd ?
-ds_status		dd ?
-ds_pending_buf		dd ?
-ds_pending_buf_size	dd ?
-ds_pending_out		dd ?
-ds_pending		dd ?
-ds_wrap			dd ?
-; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h)
-ds_gzhead               dd ?
-ds_gzindex              dd ?
-ds_data_type		db ?
-ds_method		db ?
-			db ?	; padding
-			db ?	; padding
-ds_last_flush		dd ?
-ds_w_size		dd ?	; used
-ds_w_bits		dd ?
-ds_w_mask		dd ?	; used
-ds_window		dd ?	; used
-ds_window_size		dd ?
-ds_prev			dd ?	; used
-ds_head			dd ?
-ds_ins_h		dd ?
-ds_hash_size		dd ?
-ds_hash_bits		dd ?
-ds_hash_mask		dd ?
-ds_hash_shift		dd ?
-ds_block_start		dd ?
-ds_match_length		dd ?	; used
-ds_prev_match		dd ?	; used
-ds_match_available	dd ?
-ds_strstart		dd ?	; used
-ds_match_start		dd ?	; used
-ds_lookahead		dd ?	; used
-ds_prev_length		dd ?	; used
-ds_max_chain_length	dd ?	; used
-ds_max_laxy_match	dd ?
-ds_level		dd ?
-ds_strategy		dd ?
-ds_good_match		dd ?	; used
-ds_nice_match		dd ?	; used
-
-; Don't need anymore of the struct for match
-DEFLATE_STATE	ENDS
-
-;===========================================================================
-; CODE
-;===========================================================================
-_TEXT	SEGMENT
-
-;---------------------------------------------------------------------------
-; match_init
-;---------------------------------------------------------------------------
-	ALIGN	4
-PUBLIC	_match_init
-_match_init	PROC
-	; no initialization needed
-	ret
-_match_init	ENDP
-
-;---------------------------------------------------------------------------
-; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-;---------------------------------------------------------------------------
-	ALIGN	4
-
-PUBLIC	_longest_match
-_longest_match	PROC
-
-; Since this code uses EBP for a scratch register, the stack frame must
-; be manually constructed and referenced relative to the ESP register.
-
-; Stack image
-; Variables
-chainlenwmask	=  0	; high word: current chain len
-			; low word: s->wmask
-window		=  4	; local copy of s->window
-windowbestlen	=  8	; s->window + bestlen
-scanend		= 12	; last two bytes of string
-scanstart	= 16	; first two bytes of string
-scanalign	= 20	; dword-misalignment of string
-nicematch	= 24	; a good enough match size
-bestlen		= 28	; size of best match so far
-scan		= 32	; ptr to string wanting match
-varsize		= 36	; number of bytes (also offset to last saved register)
-
-; Saved Registers (actually pushed into place)
-ebx_save	= 36
-edi_save	= 40
-esi_save	= 44
-ebp_save	= 48
-
-; Parameters
-retaddr		= 52
-deflatestate	= 56
-curmatch	= 60
-
-; Save registers that the compiler may be using
-	push	ebp
-	push	edi
-	push	esi
-	push	ebx
-
-; Allocate local variable space
-	sub	esp,varsize
-
-; Retrieve the function arguments. ecx will hold cur_match
-; throughout the entire function. edx will hold the pointer to the
-; deflate_state structure during the function's setup (before
-; entering the main loop).
-
-	mov	edx, [esp+deflatestate]
-ASSUME	edx:PTR DEFLATE_STATE
-
-	mov	ecx, [esp+curmatch]
-
-; uInt wmask = s->w_mask;
-; unsigned chain_length = s->max_chain_length;
-; if (s->prev_length >= s->good_match) {
-;     chain_length >>= 2;
-; }
-
-	mov	eax, [edx].ds_prev_length
-	mov	ebx, [edx].ds_good_match
-	cmp	eax, ebx
-	mov	eax, [edx].ds_w_mask
-	mov	ebx, [edx].ds_max_chain_length
-	jl	SHORT LastMatchGood
-	shr	ebx, 2
-LastMatchGood:
-
-; chainlen is decremented once beforehand so that the function can
-; use the sign flag instead of the zero flag for the exit test.
-; It is then shifted into the high word, to make room for the wmask
-; value, which it will always accompany.
-
-	dec	ebx
-	shl	ebx, 16
-	or	ebx, eax
-	mov	[esp+chainlenwmask], ebx
-
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-	mov	eax, [edx].ds_nice_match
-	mov	ebx, [edx].ds_lookahead
-	cmp	ebx, eax
-	jl	SHORT LookaheadLess
-	mov	ebx, eax
-LookaheadLess:
-	mov	[esp+nicematch], ebx
-
-;/* register Bytef *scan = s->window + s->strstart;                     */
-
-	mov	esi, [edx].ds_window
-	mov	[esp+window], esi
-	mov	ebp, [edx].ds_strstart
-	lea	edi, [esi+ebp]
-	mov	[esp+scan],edi
-
-;/* Determine how many bytes the scan ptr is off from being             */
-;/* dword-aligned.                                                      */
-
-	mov	eax, edi
-	neg	eax
-	and	eax, 3
-	mov	[esp+scanalign], eax
-
-;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?                      */
-;/*     s->strstart - (IPos)MAX_DIST(s) : NIL;                          */
-
-	mov	eax, [edx].ds_w_size
-	sub	eax, MIN_LOOKAHEAD
-	sub	ebp, eax
-	jg	SHORT LimitPositive
-	xor	ebp, ebp
-LimitPositive:
-
-;/* int best_len = s->prev_length;                                      */
-
-	mov	eax, [edx].ds_prev_length
-	mov	[esp+bestlen], eax
-
-;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
-
-	add	esi, eax
-	mov	[esp+windowbestlen], esi
-
-;/* register ush scan_start = *(ushf*)scan;                             */
-;/* register ush scan_end   = *(ushf*)(scan+best_len-1);                */
-;/* Posf *prev = s->prev;                                               */
-
-	movzx	ebx, WORD PTR[edi]
-	mov	[esp+scanstart], ebx
-	movzx	ebx, WORD PTR[eax+edi-1]
-	mov	[esp+scanend], ebx
-	mov	edi, [edx].ds_prev
-
-;/* Jump into the main loop.                                            */
-
-	mov	edx, [esp+chainlenwmask]
-	jmp	SHORT LoopEntry
-
-;/* do {
-; *     match = s->window + cur_match;
-; *     if (*(ushf*)(match+best_len-1) != scan_end ||
-; *         *(ushf*)match != scan_start) continue;
-; *     [...]
-; * } while ((cur_match = prev[cur_match & wmask]) > limit
-; *          && --chain_length != 0);
-; *
-; * Here is the inner loop of the function. The function will spend the
-; * majority of its time in this loop, and majority of that time will
-; * be spent in the first ten instructions.
-; *
-; * Within this loop:
-; * %ebx = scanend
-; * %ecx = curmatch
-; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-; * %esi = windowbestlen - i.e., (window + bestlen)
-; * %edi = prev
-; * %ebp = limit
-; */
-
-	ALIGN	4
-LookupLoop:
-	and	ecx, edx
-	movzx	ecx, WORD PTR[edi+ecx*2]
-	cmp	ecx, ebp
-	jbe	LeaveNow
-	sub	edx, 000010000H
-	js	LeaveNow
-
-LoopEntry:
-	movzx	eax, WORD PTR[esi+ecx-1]
-	cmp	eax, ebx
-	jnz	SHORT LookupLoop
-
-	mov	eax, [esp+window]
-	movzx	eax, WORD PTR[eax+ecx]
-	cmp	eax, [esp+scanstart]
-	jnz	SHORT LookupLoop
-
-;/* Store the current value of chainlen.                                */
-
-	mov	[esp+chainlenwmask], edx
-
-;/* Point %edi to the string under scrutiny, and %esi to the string we  */
-;/* are hoping to match it up with. In actuality, %esi and %edi are     */
-;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is     */
-;/* initialized to -(MAX_MATCH_8 - scanalign).                          */
-
-	mov	esi, [esp+window]
-	mov	edi, [esp+scan]
-	add	esi, ecx
-	mov	eax, [esp+scanalign]
-	mov	edx, -MAX_MATCH_8
-	lea	edi, [edi+eax+MAX_MATCH_8]
-	lea	esi, [esi+eax+MAX_MATCH_8]
-
-;/* Test the strings for equality, 8 bytes at a time. At the end,
-; * adjust %edx so that it is offset to the exact byte that mismatched.
-; *
-; * We already know at this point that the first three bytes of the
-; * strings match each other, and they can be safely passed over before
-; * starting the compare loop. So what this code does is skip over 0-3
-; * bytes, as much as necessary in order to dword-align the %edi
-; * pointer. (%esi will still be misaligned three times out of four.)
-; *
-; * It should be confessed that this loop usually does not represent
-; * much of the total running time. Replacing it with a more
-; * straightforward "rep cmpsb" would not drastically degrade
-; * performance.
-; */
-
-LoopCmps:
-	mov	eax, DWORD PTR[esi+edx]
-	xor	eax, DWORD PTR[edi+edx]
-	jnz	SHORT LeaveLoopCmps
-
-	mov	eax, DWORD PTR[esi+edx+4]
-	xor	eax, DWORD PTR[edi+edx+4]
-	jnz	SHORT LeaveLoopCmps4
-
-	add	edx, 8
-	jnz	SHORT LoopCmps
-	jmp	LenMaximum
-	ALIGN	4
-
-LeaveLoopCmps4:
-	add	edx, 4
-
-LeaveLoopCmps:
-	test	eax, 00000FFFFH
-	jnz	SHORT LenLower
-
-	add	edx, 2
-	shr	eax, 16
-
-LenLower:
-	sub	al, 1
-	adc	edx, 0
-
-;/* Calculate the length of the match. If it is longer than MAX_MATCH,  */
-;/* then automatically accept it as the best possible match and leave.  */
-
-	lea	eax, [edi+edx]
-	mov	edi, [esp+scan]
-	sub	eax, edi
-	cmp	eax, MAX_MATCH
-	jge	SHORT LenMaximum
-
-;/* If the length of the match is not longer than the best match we     */
-;/* have so far, then forget it and return to the lookup loop.          */
-
-	mov	edx, [esp+deflatestate]
-	mov	ebx, [esp+bestlen]
-	cmp	eax, ebx
-	jg	SHORT LongerMatch
-	mov	esi, [esp+windowbestlen]
-	mov	edi, [edx].ds_prev
-	mov	ebx, [esp+scanend]
-	mov	edx, [esp+chainlenwmask]
-	jmp	LookupLoop
-	ALIGN	4
-
-;/*         s->match_start = cur_match;                                 */
-;/*         best_len = len;                                             */
-;/*         if (len >= nice_match) break;                               */
-;/*         scan_end = *(ushf*)(scan+best_len-1);                       */
-
-LongerMatch:
-	mov	ebx, [esp+nicematch]
-	mov	[esp+bestlen], eax
-	mov	[edx].ds_match_start, ecx
-	cmp	eax, ebx
-	jge	SHORT LeaveNow
-	mov	esi, [esp+window]
-	add	esi, eax
-	mov	[esp+windowbestlen], esi
-	movzx	ebx, WORD PTR[edi+eax-1]
-	mov	edi, [edx].ds_prev
-	mov	[esp+scanend], ebx
-	mov	edx, [esp+chainlenwmask]
-	jmp	LookupLoop
-	ALIGN	4
-
-;/* Accept the current string, with the maximum possible length.        */
-
-LenMaximum:
-	mov	edx, [esp+deflatestate]
-	mov	DWORD PTR[esp+bestlen], MAX_MATCH
-	mov	[edx].ds_match_start, ecx
-
-;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;          */
-;/* return s->lookahead;                                                */
-
-LeaveNow:
-	mov	edx, [esp+deflatestate]
-	mov	ebx, [esp+bestlen]
-	mov	eax, [edx].ds_lookahead
-	cmp	ebx, eax
-	jg	SHORT LookaheadRet
-	mov	eax, ebx
-LookaheadRet:
-
-; Restore the stack and return from whence we came.
-
-	add	esp, varsize
-	pop	ebx
-	pop	esi
-	pop	edi
-	pop	ebp
-	ret
-
-_longest_match	ENDP
-
-_TEXT	ENDS
-END
diff --git a/libsrc/zlib/contrib/masmx64/gvmat64.asm b/libsrc/zlib/contrib/masmx64/gvmat64.asm
index 790d655..9879c28 100644
--- a/libsrc/zlib/contrib/masmx64/gvmat64.asm
+++ b/libsrc/zlib/contrib/masmx64/gvmat64.asm
@@ -2,8 +2,10 @@
 ;    deflate_state *s,
 ;    IPos cur_match);                             /* current match */
 
-; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
+;  (AMD64 on Athlon 64, Opteron, Phenom
+;     and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
 ;
 ; File written by Gilles Vollant, by converting to assembly the longest_match
 ;  from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
@@ -11,6 +13,24 @@
 ;  and by taking inspiration on asm686 with masm, optimised assembly code
 ;        from Brian Raiter, written 1998
 ;
+;  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.
+;
+;
+;
 ;         http://www.zlib.net
 ;         http://www.winimage.com/zLibDll
 ;         http://www.muppetlabs.com/~breadbox/software/assembly.html
@@ -26,10 +46,10 @@
 ;
 ; This file compile with Microsoft Macro Assembler (x64) for AMD64
 ;
-;   ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK
+;   ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
 ;
-;   (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from
-;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
+;   (you can get Windows WDK with ml64 for AMD64 from
+;      http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
 ;
 
 
@@ -71,6 +91,25 @@ save_r13        equ  rsp + 64 - LocalVarsSize
 ;save_r15        equ  rsp + 80 - LocalVarsSize
 
 
+; summary of register usage
+; scanend     ebx
+; scanendw    bx
+; chainlenwmask   edx
+; curmatch    rsi
+; curmatchd   esi
+; windowbestlen   r8
+; scanalign   r9
+; scanalignd  r9d
+; window      r10
+; bestlen     r11
+; bestlend    r11d
+; scanstart   r12d
+; scanstartw  r12w
+; scan        r13
+; nicematch   r14d
+; limit       r15
+; limitd      r15d
+; prev        rcx
 
 ;  all the +4 offsets are due to the addition of pending_buf_size (in zlib
 ;  in the deflate_state structure since the asm code was first written
@@ -406,7 +445,8 @@ LoopCmps:
 
         add rdx,8+8+8
 
-        jmp short LoopCmps
+        jnz short LoopCmps
+        jmp short LenMaximum
 LeaveLoopCmps16: add rdx,8
 LeaveLoopCmps8: add rdx,8
 LeaveLoopCmps:
diff --git a/libsrc/zlib/contrib/masmx64/inffas8664.c b/libsrc/zlib/contrib/masmx64/inffas8664.c
index 3af764d..e8af06f 100644
--- a/libsrc/zlib/contrib/masmx64/inffas8664.c
+++ b/libsrc/zlib/contrib/masmx64/inffas8664.c
@@ -111,11 +111,11 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
     type_ar ar;
     void inffas8664fnc(struct inffast_ar * par);
 
-    
+
 
 #if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
 #define PAD_AVAIL_IN 6
-#define PAD_AVAIL_OUT 258    
+#define PAD_AVAIL_OUT 258
 #else
 #define PAD_AVAIL_IN 5
 #define PAD_AVAIL_OUT 257
@@ -130,7 +130,7 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
     ar.beg = ar.out - (start - strm->avail_out);
     ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
     ar.wsize = state->wsize;
-    ar.write = state->write;
+    ar.write = state->wnext;
     ar.window = state->window;
     ar.hold = state->hold;
     ar.bits = state->bits;
diff --git a/libsrc/zlib/contrib/masmx64/inffasx64.asm b/libsrc/zlib/contrib/masmx64/inffasx64.asm
index b5d93a2..60a8d89 100644
--- a/libsrc/zlib/contrib/masmx64/inffasx64.asm
+++ b/libsrc/zlib/contrib/masmx64/inffasx64.asm
@@ -9,12 +9,16 @@
 ;   ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
 ;   with Microsoft Macro Assembler (x64) for AMD64
 ;
-;   ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
+
+; This file compile with Microsoft Macro Assembler (x64) for AMD64
+;
+;   ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
 ;
-;   (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from 
-;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
+;   (you can get Windows WDK with ml64 for AMD64 from
+;      http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
 ;
 
+
 .code
 inffas8664fnc PROC
 
@@ -379,7 +383,7 @@ L_break_loop_with_status:
 	mov r14,[rsp-40]
 	mov r15,[rsp-48]
 	mov rbx,[rsp-56]
-	
+
     ret 0
 ;          :
 ;          : "m" (ar)
diff --git a/libsrc/zlib/contrib/masmx64/readme.txt b/libsrc/zlib/contrib/masmx64/readme.txt
index ee03115..2da6733 100644
--- a/libsrc/zlib/contrib/masmx64/readme.txt
+++ b/libsrc/zlib/contrib/masmx64/readme.txt
@@ -12,7 +12,10 @@ inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
 
 Use instructions
 ----------------
-Copy these files into the zlib source directory.
+Assemble the .asm files using MASM and put the object files into the zlib source
+directory.  You can also get object files here:
+
+     http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
 
 define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
 and inffasx64.obj and gvmat64.obj as object to link.
@@ -24,5 +27,5 @@ run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe)
 
 ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
 
-You can get Windows 2003 server DDK with ml64 and cl for AMD64 from 
+You can get Windows 2003 server DDK with ml64 and cl for AMD64 from
   http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
diff --git a/libsrc/zlib/contrib/masmx86/bld_ml32.bat b/libsrc/zlib/contrib/masmx86/bld_ml32.bat
index 99144d0..e1b86bf 100644
--- a/libsrc/zlib/contrib/masmx86/bld_ml32.bat
+++ b/libsrc/zlib/contrib/masmx86/bld_ml32.bat
@@ -1,2 +1,2 @@
-ml /coff /Zi /c /Flgvmat32.lst  gvmat32.asm 
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm 
+ml /coff /Zi /c /Flmatch686.lst match686.asm
+ml /coff /Zi /c /Flinffas32.lst inffas32.asm
diff --git a/libsrc/zlib/contrib/masmx86/gvmat32.asm b/libsrc/zlib/contrib/masmx86/gvmat32.asm
deleted file mode 100644
index bb4f854..0000000
--- a/libsrc/zlib/contrib/masmx86/gvmat32.asm
+++ /dev/null
@@ -1,972 +0,0 @@
-; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
-; File written by Gilles Vollant, by modifiying the longest_match
-;  from Jean-loup Gailly in deflate.c
-;
-;         http://www.zlib.net
-;         http://www.winimage.com/zLibDll
-;         http://www.muppetlabs.com/~breadbox/software/assembly.html
-;
-; For Visual C++ 4.x and higher and ML 6.x and higher
-;   ml.exe is in directory \MASM611C of Win95 DDK
-;   ml.exe is also distributed in http://www.masm32.com/masmdl.htm
-;    and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
-;
-; this file contain two implementation of longest_match
-;
-;  longest_match_7fff : written 1996 by Gilles Vollant optimized for 
-;            first Pentium. Assume s->w_mask == 0x7fff
-;  longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro
-;
-;  for using an seembly version of longest_match, you need define ASMV in project
-;  There is two way in using gvmat32.asm
-;
-;  A) Suggested method
-;    if you want include both longest_match_7fff and longest_match_686
-;    compile the asm file running
-;           ml /coff /Zi /Flgvmat32.lst /c gvmat32.asm
-;    and include gvmat32c.c in your project
-;    if you have an old cpu (386,486 or first Pentium) and s->w_mask==0x7fff,
-;        longest_match_7fff will be used
-;    if you have a more modern CPU (Pentium Pro, II and higher)
-;        longest_match_686 will be used
-;    on old cpu with s->w_mask!=0x7fff, longest_match_686 will be used,
-;        but this is not a sitation you'll find often
-;
-;  B) Alternative
-;    if you are not interresed in old cpu performance and want the smaller
-;       binaries possible
-;
-;    compile the asm file running
-;           ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm
-;    and do not include gvmat32c.c in your project (ou define also 
-;              NOOLDPENTIUMCODE)
-;
-; note : as I known, longest_match_686 is very faster than longest_match_7fff
-;        on pentium Pro/II/III, faster (but less) in P4, but it seem
-;        longest_match_7fff can be faster (very very litte) on AMD Athlon64/K8
-;
-; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
-
-;uInt longest_match_7fff(s, cur_match)
-;    deflate_state *s;
-;    IPos cur_match;                             /* current match */
-
-    NbStack         equ     76
-    cur_match       equ     dword ptr[esp+NbStack-0]
-    str_s           equ     dword ptr[esp+NbStack-4]
-; 5 dword on top (ret,ebp,esi,edi,ebx)
-    adrret          equ     dword ptr[esp+NbStack-8]
-    pushebp         equ     dword ptr[esp+NbStack-12]
-    pushedi         equ     dword ptr[esp+NbStack-16]
-    pushesi         equ     dword ptr[esp+NbStack-20]
-    pushebx         equ     dword ptr[esp+NbStack-24]
-
-    chain_length    equ     dword ptr [esp+NbStack-28]
-    limit           equ     dword ptr [esp+NbStack-32]
-    best_len        equ     dword ptr [esp+NbStack-36]
-    window          equ     dword ptr [esp+NbStack-40]
-    prev            equ     dword ptr [esp+NbStack-44]
-    scan_start      equ      word ptr [esp+NbStack-48]
-    wmask           equ     dword ptr [esp+NbStack-52]
-    match_start_ptr equ     dword ptr [esp+NbStack-56]
-    nice_match      equ     dword ptr [esp+NbStack-60]
-    scan            equ     dword ptr [esp+NbStack-64]
-
-    windowlen       equ     dword ptr [esp+NbStack-68]
-    match_start     equ     dword ptr [esp+NbStack-72]
-    strend          equ     dword ptr [esp+NbStack-76]
-    NbStackAdd      equ     (NbStack-24)
-
-    .386p
-
-    name    gvmatch
-    .MODEL  FLAT
-
-
-
-;  all the +zlib1222add offsets are due to the addition of fields
-;  in zlib in the deflate_state structure since the asm code was first written
-;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
-;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
-;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
-
-    zlib1222add         equ     8
-
-;  Note : these value are good with a 8 bytes boundary pack structure
-    dep_chain_length    equ     74h+zlib1222add
-    dep_window          equ     30h+zlib1222add
-    dep_strstart        equ     64h+zlib1222add
-    dep_prev_length     equ     70h+zlib1222add
-    dep_nice_match      equ     88h+zlib1222add
-    dep_w_size          equ     24h+zlib1222add
-    dep_prev            equ     38h+zlib1222add
-    dep_w_mask          equ     2ch+zlib1222add
-    dep_good_match      equ     84h+zlib1222add
-    dep_match_start     equ     68h+zlib1222add
-    dep_lookahead       equ     6ch+zlib1222add
-
-
-_TEXT                   segment
-
-IFDEF NOUNDERLINE
-   IFDEF NOOLDPENTIUMCODE
-            public  longest_match
-            public  match_init
-   ELSE            
-            public  longest_match_7fff
-            public  cpudetect32
-            public  longest_match_686
-   ENDIF
-ELSE
-   IFDEF NOOLDPENTIUMCODE
-            public  _longest_match
-            public  _match_init
-   ELSE
-            public  _longest_match_7fff
-            public  _cpudetect32
-            public  _longest_match_686
-   ENDIF
-ENDIF
-
-    MAX_MATCH           equ     258
-    MIN_MATCH           equ     3
-    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)
-
-
-
-IFNDEF NOOLDPENTIUMCODE
-IFDEF NOUNDERLINE
-longest_match_7fff   proc near
-ELSE
-_longest_match_7fff  proc near
-ENDIF
-
-    mov     edx,[esp+4]
-
-
-
-    push    ebp
-    push    edi
-    push    esi
-    push    ebx
-
-    sub     esp,NbStackAdd
-
-; initialize or check the variables used in match.asm.
-    mov     ebp,edx
-
-; chain_length = s->max_chain_length
-; if (prev_length>=good_match) chain_length >>= 2
-    mov     edx,[ebp+dep_chain_length]
-    mov     ebx,[ebp+dep_prev_length]
-    cmp     [ebp+dep_good_match],ebx
-    ja      noshr
-    shr     edx,2
-noshr:
-; we increment chain_length because in the asm, the --chain_lenght is in the beginning of the loop
-    inc     edx
-    mov     edi,[ebp+dep_nice_match]
-    mov     chain_length,edx
-    mov     eax,[ebp+dep_lookahead]
-    cmp     eax,edi
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-    jae     nolookaheadnicematch
-    mov     edi,eax
-nolookaheadnicematch:
-; best_len = s->prev_length
-    mov     best_len,ebx
-
-; window = s->window
-    mov     esi,[ebp+dep_window]
-    mov     ecx,[ebp+dep_strstart]
-    mov     window,esi
-
-    mov     nice_match,edi
-; scan = window + strstart
-    add     esi,ecx
-    mov     scan,esi
-; dx = *window
-    mov     dx,word ptr [esi]
-; bx = *(window+best_len-1)
-    mov     bx,word ptr [esi+ebx-1]
-    add     esi,MAX_MATCH-1
-; scan_start = *scan
-    mov     scan_start,dx
-; strend = scan + MAX_MATCH-1
-    mov     strend,esi
-; bx = scan_end = *(window+best_len-1)
-
-;    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;        s->strstart - (IPos)MAX_DIST(s) : NIL;
-
-    mov     esi,[ebp+dep_w_size]
-    sub     esi,MIN_LOOKAHEAD
-; here esi = MAX_DIST(s)
-    sub     ecx,esi
-    ja      nodist
-    xor     ecx,ecx
-nodist:
-    mov     limit,ecx
-
-; prev = s->prev
-    mov     edx,[ebp+dep_prev]
-    mov     prev,edx
-
-;
-    mov     edx,dword ptr [ebp+dep_match_start]
-    mov     bp,scan_start
-    mov     eax,cur_match
-    mov     match_start,edx
-
-    mov     edx,window
-    mov     edi,edx
-    add     edi,best_len
-    mov     esi,prev
-    dec     edi
-; windowlen = window + best_len -1
-    mov     windowlen,edi
-
-    jmp     beginloop2
-    align   4
-
-; here, in the loop
-;       eax = ax = cur_match
-;       ecx = limit
-;        bx = scan_end
-;        bp = scan_start
-;       edi = windowlen (window + best_len -1)
-;       esi = prev
-
-
-;// here; chain_length <=16
-normalbeg0add16:
-    add     chain_length,16
-    jz      exitloop
-normalbeg0:
-    cmp     word ptr[edi+eax],bx
-    je      normalbeg2noroll
-rcontlabnoroll:
-; cur_match = prev[cur_match & wmask]
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-; if cur_match > limit, go to exitloop
-    cmp     ecx,eax
-    jnb     exitloop
-; if --chain_length != 0, go to exitloop
-    dec     chain_length
-    jnz     normalbeg0
-    jmp     exitloop
-
-normalbeg2noroll:
-; if (scan_start==*(cur_match+window)) goto normalbeg2
-    cmp     bp,word ptr[edx+eax]
-    jne     rcontlabnoroll
-    jmp     normalbeg2
-
-contloop3:
-    mov     edi,windowlen
-
-; cur_match = prev[cur_match & wmask]
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-; if cur_match > limit, go to exitloop
-    cmp     ecx,eax
-jnbexitloopshort1:
-    jnb     exitloop
-; if --chain_length != 0, go to exitloop
-
-
-; begin the main loop
-beginloop2:
-    sub     chain_length,16+1
-; if chain_length <=16, don't use the unrolled loop
-    jna     normalbeg0add16
-
-do16:
-    cmp     word ptr[edi+eax],bx
-    je      normalbeg2dc0
-
-maccn   MACRO   lab
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-    cmp     ecx,eax
-    jnb     exitloop
-    cmp     word ptr[edi+eax],bx
-    je      lab
-    ENDM
-
-rcontloop0:
-    maccn   normalbeg2dc1
-
-rcontloop1:
-    maccn   normalbeg2dc2
-
-rcontloop2:
-    maccn   normalbeg2dc3
-
-rcontloop3:
-    maccn   normalbeg2dc4
-
-rcontloop4:
-    maccn   normalbeg2dc5
-
-rcontloop5:
-    maccn   normalbeg2dc6
-
-rcontloop6:
-    maccn   normalbeg2dc7
-
-rcontloop7:
-    maccn   normalbeg2dc8
-
-rcontloop8:
-    maccn   normalbeg2dc9
-
-rcontloop9:
-    maccn   normalbeg2dc10
-
-rcontloop10:
-    maccn   short normalbeg2dc11
-
-rcontloop11:
-    maccn   short normalbeg2dc12
-
-rcontloop12:
-    maccn   short normalbeg2dc13
-
-rcontloop13:
-    maccn   short normalbeg2dc14
-
-rcontloop14:
-    maccn   short normalbeg2dc15
-
-rcontloop15:
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-    cmp     ecx,eax
-    jnb     exitloop
-
-    sub     chain_length,16
-    ja      do16
-    jmp     normalbeg0add16
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-normbeg MACRO   rcontlab,valsub
-; if we are here, we know that *(match+best_len-1) == scan_end
-    cmp     bp,word ptr[edx+eax]
-; if (match != scan_start) goto rcontlab
-    jne     rcontlab
-; calculate the good chain_length, and we'll compare scan and match string
-    add     chain_length,16-valsub
-    jmp     iseq
-    ENDM
-
-
-normalbeg2dc11:
-    normbeg rcontloop11,11
-
-normalbeg2dc12:
-    normbeg short rcontloop12,12
-
-normalbeg2dc13:
-    normbeg short rcontloop13,13
-
-normalbeg2dc14:
-    normbeg short rcontloop14,14
-
-normalbeg2dc15:
-    normbeg short rcontloop15,15
-
-normalbeg2dc10:
-    normbeg rcontloop10,10
-
-normalbeg2dc9:
-    normbeg rcontloop9,9
-
-normalbeg2dc8:
-    normbeg rcontloop8,8
-
-normalbeg2dc7:
-    normbeg rcontloop7,7
-
-normalbeg2dc6:
-    normbeg rcontloop6,6
-
-normalbeg2dc5:
-    normbeg rcontloop5,5
-
-normalbeg2dc4:
-    normbeg rcontloop4,4
-
-normalbeg2dc3:
-    normbeg rcontloop3,3
-
-normalbeg2dc2:
-    normbeg rcontloop2,2
-
-normalbeg2dc1:
-    normbeg rcontloop1,1
-
-normalbeg2dc0:
-    normbeg rcontloop0,0
-
-
-; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end
-
-normalbeg2:
-    mov     edi,window
-
-    cmp     bp,word ptr[edi+eax]
-    jne     contloop3                   ; if *(ushf*)match != scan_start, continue
-
-iseq:
-; if we are here, we know that *(match+best_len-1) == scan_end
-; and (match == scan_start)
-
-    mov     edi,edx
-    mov     esi,scan                    ; esi = scan
-    add     edi,eax                     ; edi = window + cur_match = match
-
-    mov     edx,[esi+3]                 ; compare manually dword at match+3
-    xor     edx,[edi+3]                 ; and scan +3
-
-    jz      begincompare                ; if equal, go to long compare
-
-; we will determine the unmatch byte and calculate len (in esi)
-    or      dl,dl
-    je      eq1rr
-    mov     esi,3
-    jmp     trfinval
-eq1rr:
-    or      dx,dx
-    je      eq1
-
-    mov     esi,4
-    jmp     trfinval
-eq1:
-    and     edx,0ffffffh
-    jz      eq11
-    mov     esi,5
-    jmp     trfinval
-eq11:
-    mov     esi,6
-    jmp     trfinval
-
-begincompare:
-    ; here we now scan and match begin same
-    add     edi,6
-    add     esi,6
-    mov     ecx,(MAX_MATCH-(2+4))/4     ; scan for at most MAX_MATCH bytes
-    repe    cmpsd                       ; loop until mismatch
-
-    je      trfin                       ; go to trfin if not unmatch
-; we determine the unmatch byte
-    sub     esi,4
-    mov     edx,[edi-4]
-    xor     edx,[esi]
-
-    or      dl,dl
-    jnz     trfin
-    inc     esi
-
-    or      dx,dx
-    jnz     trfin
-    inc     esi
-
-    and     edx,0ffffffh
-    jnz     trfin
-    inc     esi
-
-trfin:
-    sub     esi,scan          ; esi = len
-trfinval:
-; here we have finised compare, and esi contain len of equal string
-    cmp     esi,best_len        ; if len > best_len, go newbestlen
-    ja      short newbestlen
-; now we restore edx, ecx and esi, for the big loop
-    mov     esi,prev
-    mov     ecx,limit
-    mov     edx,window
-    jmp     contloop3
-
-newbestlen:
-    mov     best_len,esi        ; len become best_len
-
-    mov     match_start,eax     ; save new position as match_start
-    cmp     esi,nice_match      ; if best_len >= nice_match, exit
-    jae     exitloop
-    mov     ecx,scan
-    mov     edx,window          ; restore edx=window
-    add     ecx,esi
-    add     esi,edx
-
-    dec     esi
-    mov     windowlen,esi       ; windowlen = window + best_len-1
-    mov     bx,[ecx-1]          ; bx = *(scan+best_len-1) = scan_end
-
-; now we restore ecx and esi, for the big loop :
-    mov     esi,prev
-    mov     ecx,limit
-    jmp     contloop3
-
-exitloop:
-; exit : s->match_start=match_start
-    mov     ebx,match_start
-    mov     ebp,str_s
-    mov     ecx,best_len
-    mov     dword ptr [ebp+dep_match_start],ebx
-    mov     eax,dword ptr [ebp+dep_lookahead]
-    cmp     ecx,eax
-    ja      minexlo
-    mov     eax,ecx
-minexlo:
-; return min(best_len,s->lookahead)
-
-; restore stack and register ebx,esi,edi,ebp
-    add     esp,NbStackAdd
-
-    pop     ebx
-    pop     esi
-    pop     edi
-    pop     ebp
-    ret
-InfoAuthor:
-; please don't remove this string !
-; Your are free use gvmat32 in any fre or commercial apps if you don't remove the string in the binary!
-    db     0dh,0ah,"GVMat32 optimised assembly code written 1996-98 by Gilles Vollant",0dh,0ah
-
-
-
-IFDEF NOUNDERLINE
-longest_match_7fff   endp
-ELSE
-_longest_match_7fff  endp
-ENDIF
-
-
-IFDEF NOUNDERLINE
-cpudetect32     proc near
-ELSE
-_cpudetect32    proc near
-ENDIF
-
-    push    ebx
-
-    pushfd                  ; push original EFLAGS
-    pop     eax             ; get original EFLAGS
-    mov     ecx, eax        ; save original EFLAGS
-    xor     eax, 40000h     ; flip AC bit in EFLAGS
-    push    eax             ; save new EFLAGS value on stack
-    popfd                   ; replace current EFLAGS value
-    pushfd                  ; get new EFLAGS
-    pop     eax             ; store new EFLAGS in EAX
-    xor     eax, ecx        ; can’t toggle AC bit, processor=80386
-    jz      end_cpu_is_386  ; jump if 80386 processor
-    push    ecx
-    popfd                   ; restore AC bit in EFLAGS first
-
-    pushfd
-    pushfd
-    pop     ecx
-
-    mov     eax, ecx        ; get original EFLAGS
-    xor     eax, 200000h    ; flip ID bit in EFLAGS
-    push    eax             ; save new EFLAGS value on stack
-    popfd                   ; replace current EFLAGS value
-    pushfd                  ; get new EFLAGS
-    pop     eax             ; store new EFLAGS in EAX
-    popfd                   ; restore original EFLAGS
-    xor     eax, ecx        ; can’t toggle ID bit,
-    je      is_old_486      ; processor=old
-
-    mov     eax,1
-    db      0fh,0a2h        ;CPUID
-
-exitcpudetect:
-    pop ebx
-    ret
-
-end_cpu_is_386:
-    mov     eax,0300h
-    jmp     exitcpudetect
-
-is_old_486:
-    mov     eax,0400h
-    jmp     exitcpudetect
-
-IFDEF NOUNDERLINE
-cpudetect32     endp
-ELSE
-_cpudetect32    endp
-ENDIF
-ENDIF
-
-MAX_MATCH       equ     258
-MIN_MATCH       equ     3
-MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)
-
-
-;;; stack frame offsets
-
-chainlenwmask   equ  esp + 0    ; high word: current chain len
-                    ; low word: s->wmask
-window      equ  esp + 4    ; local copy of s->window
-windowbestlen   equ  esp + 8    ; s->window + bestlen
-scanstart   equ  esp + 16   ; first two bytes of string
-scanend     equ  esp + 12   ; last two bytes of string
-scanalign   equ  esp + 20   ; dword-misalignment of string
-nicematch   equ  esp + 24   ; a good enough match size
-bestlen     equ  esp + 28   ; size of best match so far
-scan        equ  esp + 32   ; ptr to string wanting match
-
-LocalVarsSize   equ 36
-;   saved ebx   byte esp + 36
-;   saved edi   byte esp + 40
-;   saved esi   byte esp + 44
-;   saved ebp   byte esp + 48
-;   return address  byte esp + 52
-deflatestate    equ  esp + 56   ; the function arguments
-curmatch    equ  esp + 60
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-dsWSize     equ 36+zlib1222add
-dsWMask     equ 44+zlib1222add
-dsWindow    equ 48+zlib1222add
-dsPrev      equ 56+zlib1222add
-dsMatchLen  equ 88+zlib1222add
-dsPrevMatch equ 92+zlib1222add
-dsStrStart  equ 100+zlib1222add
-dsMatchStart    equ 104+zlib1222add
-dsLookahead equ 108+zlib1222add
-dsPrevLen   equ 112+zlib1222add
-dsMaxChainLen   equ 116+zlib1222add
-dsGoodMatch equ 132+zlib1222add
-dsNiceMatch equ 136+zlib1222add
-
-
-;;; match.asm -- Pentium-Pro-optimized version of longest_match()
-;;; Written for zlib 1.1.2
-;;; Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
-;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
-;;;
-;;; This is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License.
-
-;GLOBAL _longest_match, _match_init
-
-
-;SECTION    .text
-
-;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-
-;_longest_match:
-IFDEF NOOLDPENTIUMCODE
-    IFDEF NOUNDERLINE
-    longest_match       proc near
-    ELSE
-    _longest_match      proc near
-    ENDIF
-ELSE
-    IFDEF NOUNDERLINE
-    longest_match_686   proc near
-    ELSE
-    _longest_match_686  proc near
-    ENDIF
-ENDIF
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
-        push    ebp
-        push    edi
-        push    esi
-        push    ebx
-        sub esp, LocalVarsSize
-
-;;; Retrieve the function arguments. ecx will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
-        mov edx, [deflatestate]
-        mov ecx, [curmatch]
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;;     chain_length >>= 2;
-;;; }
-
-        mov eax, [edx + dsPrevLen]
-        mov ebx, [edx + dsGoodMatch]
-        cmp eax, ebx
-        mov eax, [edx + dsWMask]
-        mov ebx, [edx + dsMaxChainLen]
-        jl  LastMatchGood
-        shr ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
-        dec ebx
-        shl ebx, 16
-        or  ebx, eax
-        mov [chainlenwmask], ebx
-
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-        mov eax, [edx + dsNiceMatch]
-        mov ebx, [edx + dsLookahead]
-        cmp ebx, eax
-        jl  LookaheadLess
-        mov ebx, eax
-LookaheadLess:  mov [nicematch], ebx
-
-;;; register Bytef *scan = s->window + s->strstart;
-
-        mov esi, [edx + dsWindow]
-        mov [window], esi
-        mov ebp, [edx + dsStrStart]
-        lea edi, [esi + ebp]
-        mov [scan], edi
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
-        mov eax, edi
-        neg eax
-        and eax, 3
-        mov [scanalign], eax
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
-
-        mov eax, [edx + dsWSize]
-        sub eax, MIN_LOOKAHEAD
-        sub ebp, eax
-        jg  LimitPositive
-        xor ebp, ebp
-LimitPositive:
-
-;;; int best_len = s->prev_length;
-
-        mov eax, [edx + dsPrevLen]
-        mov [bestlen], eax
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
-        add esi, eax
-        mov [windowbestlen], esi
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
-        movzx   ebx, word ptr [edi]
-        mov [scanstart], ebx
-        movzx   ebx, word ptr [edi + eax - 1]
-        mov [scanend], ebx
-        mov edi, [edx + dsPrev]
-
-;;; Jump into the main loop.
-
-        mov edx, [chainlenwmask]
-        jmp short LoopEntry
-
-align 4
-
-;;; do {
-;;;     match = s->window + cur_match;
-;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
-;;;         *(ushf*)match != scan_start) continue;
-;;;     [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;;          && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; ecx = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
-        and ecx, edx
-        movzx   ecx, word ptr [edi + ecx*2]
-        cmp ecx, ebp
-        jbe LeaveNow
-        sub edx, 00010000h
-        js  LeaveNow
-LoopEntry:  movzx   eax, word ptr [esi + ecx - 1]
-        cmp eax, ebx
-        jnz LookupLoop
-        mov eax, [window]
-        movzx   eax, word ptr [eax + ecx]
-        cmp eax, [scanstart]
-        jnz LookupLoop
-
-;;; Store the current value of chainlen.
-
-        mov [chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
-        mov esi, [window]
-        mov edi, [scan]
-        add esi, ecx
-        mov eax, [scanalign]
-        mov edx, 0fffffef8h; -(MAX_MATCH_8)
-        lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
-        lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust edx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (esi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-LoopCmps:
-        mov eax, [esi + edx]
-        xor eax, [edi + edx]
-        jnz LeaveLoopCmps
-        mov eax, [esi + edx + 4]
-        xor eax, [edi + edx + 4]
-        jnz LeaveLoopCmps4
-        add edx, 8
-        jnz LoopCmps
-        jmp short LenMaximum
-LeaveLoopCmps4: add edx, 4
-LeaveLoopCmps:  test    eax, 0000FFFFh
-        jnz LenLower
-        add edx,  2
-        shr eax, 16
-LenLower:   sub al, 1
-        adc edx, 0
-
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
-        lea eax, [edi + edx]
-        mov edi, [scan]
-        sub eax, edi
-        cmp eax, MAX_MATCH
-        jge LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-
-        mov edx, [deflatestate]
-        mov ebx, [bestlen]
-        cmp eax, ebx
-        jg  LongerMatch
-        mov esi, [windowbestlen]
-        mov edi, [edx + dsPrev]
-        mov ebx, [scanend]
-        mov edx, [chainlenwmask]
-        jmp LookupLoop
-
-;;;         s->match_start = cur_match;
-;;;         best_len = len;
-;;;         if (len >= nice_match) break;
-;;;         scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch:    mov ebx, [nicematch]
-        mov [bestlen], eax
-        mov [edx + dsMatchStart], ecx
-        cmp eax, ebx
-        jge LeaveNow
-        mov esi, [window]
-        add esi, eax
-        mov [windowbestlen], esi
-        movzx   ebx, word ptr [edi + eax - 1]
-        mov edi, [edx + dsPrev]
-        mov [scanend], ebx
-        mov edx, [chainlenwmask]
-        jmp LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum: mov edx, [deflatestate]
-        mov dword ptr [bestlen], MAX_MATCH
-        mov [edx + dsMatchStart], ecx
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
-        mov edx, [deflatestate]
-        mov ebx, [bestlen]
-        mov eax, [edx + dsLookahead]
-        cmp ebx, eax
-        jg  LookaheadRet
-        mov eax, ebx
-LookaheadRet:
-
-;;; Restore the stack and return from whence we came.
-
-        add esp, LocalVarsSize
-        pop ebx
-        pop esi
-        pop edi
-        pop ebp
-
-        ret
-; please don't remove this string !
-; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary!
-    db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
-
-
-IFDEF NOOLDPENTIUMCODE
-    IFDEF NOUNDERLINE
-    longest_match       endp
-    ELSE
-    _longest_match      endp
-    ENDIF
-
-    IFDEF NOUNDERLINE
-    match_init      proc near
-                    ret
-    match_init      endp
-    ELSE
-    _match_init     proc near
-                    ret
-    _match_init     endp
-    ENDIF    
-ELSE
-    IFDEF NOUNDERLINE
-    longest_match_686   endp
-    ELSE
-    _longest_match_686  endp
-    ENDIF
-ENDIF
-
-_TEXT   ends
-end
diff --git a/libsrc/zlib/contrib/masmx86/gvmat32c.c b/libsrc/zlib/contrib/masmx86/gvmat32c.c
deleted file mode 100644
index 7ad2b27..0000000
--- a/libsrc/zlib/contrib/masmx86/gvmat32c.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86
- * Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
- * File written by Gilles Vollant, by modifiying the longest_match
- *  from Jean-loup Gailly in deflate.c
- *  it prepare all parameters and call the assembly longest_match_gvasm
- *  longest_match execute standard C code is wmask != 0x7fff
- *     (assembly code is faster with a fixed wmask)
- *
- * Read comment at beginning of gvmat32.asm for more information
- */
-
-#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE))
-#include "deflate.h"
-
-/* if your C compiler don't add underline before function name,
-        define ADD_UNDERLINE_ASMFUNC */
-#ifdef ADD_UNDERLINE_ASMFUNC
-#define longest_match_7fff _longest_match_7fff
-#define longest_match_686  _longest_match_686
-#define cpudetect32        _cpudetect32
-#endif
-
-
-unsigned long cpudetect32();
-
-uInt longest_match_c(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-
-uInt longest_match_7fff(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-uInt longest_match_686(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-
-static uInt iIsPPro=2;
-
-void match_init ()
-{
-    iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;
-}
-
-uInt longest_match(
-    deflate_state *s,
-    IPos cur_match)                             /* current match */
-{
-    if (iIsPPro!=0)
-        return longest_match_686(s,cur_match);
-
-    if (s->w_mask != 0x7fff)
-        return longest_match_686(s,cur_match);
-
-    /* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */
-        return longest_match_7fff(s,cur_match);
-}
-
-
-#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */
diff --git a/libsrc/zlib/contrib/masmx86/inffas32.asm b/libsrc/zlib/contrib/masmx86/inffas32.asm
index 4a20512..92ac22a 100644
--- a/libsrc/zlib/contrib/masmx86/inffas32.asm
+++ b/libsrc/zlib/contrib/masmx86/inffas32.asm
@@ -16,7 +16,7 @@
 ; * enabled.  I will attempt to merge the MMX code into this version.  Newer
 ; * versions of this and inffast.S can be found at
 ; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
-; * 
+; *
 ; * 2005 : modification by Gilles Vollant
 ; */
 ; For Visual C++ 4.x and higher and ML 6.x and higher
@@ -33,7 +33,7 @@
 
 
 ; zlib122sup is 0 fort zlib 1.2.2.1 and lower
-; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head 
+; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head
 ;        in inflate_state in inflate.h)
 zlib1222sup      equ    8
 
@@ -644,9 +644,9 @@ L_init_mmx:
 	movd mm0,ebp
 	mov  ebp,ebx
 ; 896 "inffast.S"
-	movd mm4,[esp+0]
+	movd mm4,dword ptr [esp+0]
 	movq mm3,mm4
-	movd mm5,[esp+4]
+	movd mm5,dword ptr [esp+4]
 	movq mm2,mm5
 	pxor mm1,mm1
 	mov  ebx, [esp+8]
@@ -660,7 +660,7 @@ L_do_loop_mmx:
 	ja  L_get_length_code_mmx
 
 	movd mm6,ebp
-	movd mm7,[esi]
+	movd mm7,dword ptr [esi]
 	add  esi,4
 	psllq mm7,mm6
 	add  ebp,32
@@ -717,7 +717,7 @@ L_decode_distance_mmx:
 	ja L_get_dist_code_mmx
 
 	movd mm6,ebp
-	movd mm7,[esi]
+	movd mm7,dword ptr [esi]
 	add  esi,4
 	psllq mm7,mm6
 	add  ebp,32
diff --git a/libsrc/zlib/contrib/masmx86/match686.asm b/libsrc/zlib/contrib/masmx86/match686.asm
new file mode 100644
index 0000000..1eaf555
--- /dev/null
+++ b/libsrc/zlib/contrib/masmx86/match686.asm
@@ -0,0 +1,478 @@
+; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86
+; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+; File written by Gilles Vollant, by converting match686.S from Brian Raiter
+; for MASM. This is as assembly version of longest_match
+;  from Jean-loup Gailly in deflate.c
+;
+;         http://www.zlib.net
+;         http://www.winimage.com/zLibDll
+;         http://www.muppetlabs.com/~breadbox/software/assembly.html
+;
+; For Visual C++ 4.x and higher and ML 6.x and higher
+;   ml.exe is distributed in
+;  http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
+;
+; this file contain two implementation of longest_match
+;
+;  this longest_match was written by Brian raiter (1998), optimized for Pentium Pro
+;   (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)
+;
+;  for using an assembly version of longest_match, you need define ASMV in project
+;
+;    compile the asm file running
+;           ml /coff /Zi /c /Flmatch686.lst match686.asm
+;    and do not include match686.obj in your project
+;
+; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for
+;  Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor
+;  with autoselect (with cpu detection code)
+;  if you want support the old pentium optimization, you can still use these version
+;
+; this file is not optimized for old pentium, but it compatible with all x86 32 bits
+; processor (starting 80386)
+;
+;
+; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
+
+;uInt longest_match(s, cur_match)
+;    deflate_state *s;
+;    IPos cur_match;                             /* current match */
+
+    NbStack         equ     76
+    cur_match       equ     dword ptr[esp+NbStack-0]
+    str_s           equ     dword ptr[esp+NbStack-4]
+; 5 dword on top (ret,ebp,esi,edi,ebx)
+    adrret          equ     dword ptr[esp+NbStack-8]
+    pushebp         equ     dword ptr[esp+NbStack-12]
+    pushedi         equ     dword ptr[esp+NbStack-16]
+    pushesi         equ     dword ptr[esp+NbStack-20]
+    pushebx         equ     dword ptr[esp+NbStack-24]
+
+    chain_length    equ     dword ptr [esp+NbStack-28]
+    limit           equ     dword ptr [esp+NbStack-32]
+    best_len        equ     dword ptr [esp+NbStack-36]
+    window          equ     dword ptr [esp+NbStack-40]
+    prev            equ     dword ptr [esp+NbStack-44]
+    scan_start      equ      word ptr [esp+NbStack-48]
+    wmask           equ     dword ptr [esp+NbStack-52]
+    match_start_ptr equ     dword ptr [esp+NbStack-56]
+    nice_match      equ     dword ptr [esp+NbStack-60]
+    scan            equ     dword ptr [esp+NbStack-64]
+
+    windowlen       equ     dword ptr [esp+NbStack-68]
+    match_start     equ     dword ptr [esp+NbStack-72]
+    strend          equ     dword ptr [esp+NbStack-76]
+    NbStackAdd      equ     (NbStack-24)
+
+    .386p
+
+    name    gvmatch
+    .MODEL  FLAT
+
+
+
+;  all the +zlib1222add offsets are due to the addition of fields
+;  in zlib in the deflate_state structure since the asm code was first written
+;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
+;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
+;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
+
+    zlib1222add         equ     8
+
+;  Note : these value are good with a 8 bytes boundary pack structure
+    dep_chain_length    equ     74h+zlib1222add
+    dep_window          equ     30h+zlib1222add
+    dep_strstart        equ     64h+zlib1222add
+    dep_prev_length     equ     70h+zlib1222add
+    dep_nice_match      equ     88h+zlib1222add
+    dep_w_size          equ     24h+zlib1222add
+    dep_prev            equ     38h+zlib1222add
+    dep_w_mask          equ     2ch+zlib1222add
+    dep_good_match      equ     84h+zlib1222add
+    dep_match_start     equ     68h+zlib1222add
+    dep_lookahead       equ     6ch+zlib1222add
+
+
+_TEXT                   segment
+
+IFDEF NOUNDERLINE
+            public  longest_match
+            public  match_init
+ELSE
+            public  _longest_match
+            public  _match_init
+ENDIF
+
+    MAX_MATCH           equ     258
+    MIN_MATCH           equ     3
+    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)
+
+
+
+MAX_MATCH       equ     258
+MIN_MATCH       equ     3
+MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)
+MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)
+
+
+;;; stack frame offsets
+
+chainlenwmask   equ  esp + 0    ; high word: current chain len
+                    ; low word: s->wmask
+window      equ  esp + 4    ; local copy of s->window
+windowbestlen   equ  esp + 8    ; s->window + bestlen
+scanstart   equ  esp + 16   ; first two bytes of string
+scanend     equ  esp + 12   ; last two bytes of string
+scanalign   equ  esp + 20   ; dword-misalignment of string
+nicematch   equ  esp + 24   ; a good enough match size
+bestlen     equ  esp + 28   ; size of best match so far
+scan        equ  esp + 32   ; ptr to string wanting match
+
+LocalVarsSize   equ 36
+;   saved ebx   byte esp + 36
+;   saved edi   byte esp + 40
+;   saved esi   byte esp + 44
+;   saved ebp   byte esp + 48
+;   return address  byte esp + 52
+deflatestate    equ  esp + 56   ; the function arguments
+curmatch    equ  esp + 60
+
+;;; Offsets for fields in the deflate_state structure. These numbers
+;;; are calculated from the definition of deflate_state, with the
+;;; assumption that the compiler will dword-align the fields. (Thus,
+;;; changing the definition of deflate_state could easily cause this
+;;; program to crash horribly, without so much as a warning at
+;;; compile time. Sigh.)
+
+dsWSize     equ 36+zlib1222add
+dsWMask     equ 44+zlib1222add
+dsWindow    equ 48+zlib1222add
+dsPrev      equ 56+zlib1222add
+dsMatchLen  equ 88+zlib1222add
+dsPrevMatch equ 92+zlib1222add
+dsStrStart  equ 100+zlib1222add
+dsMatchStart    equ 104+zlib1222add
+dsLookahead equ 108+zlib1222add
+dsPrevLen   equ 112+zlib1222add
+dsMaxChainLen   equ 116+zlib1222add
+dsGoodMatch equ 132+zlib1222add
+dsNiceMatch equ 136+zlib1222add
+
+
+;;; match686.asm -- Pentium-Pro-optimized version of longest_match()
+;;; Written for zlib 1.1.2
+;;; Copyright (C) 1998 Brian Raiter <breadbox at muppetlabs.com>
+;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
+;;;
+;;
+;;  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.
+;;
+
+;GLOBAL _longest_match, _match_init
+
+
+;SECTION    .text
+
+;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
+
+;_longest_match:
+    IFDEF NOUNDERLINE
+    longest_match       proc near
+    ELSE
+    _longest_match      proc near
+    ENDIF
+
+;;; Save registers that the compiler may be using, and adjust esp to
+;;; make room for our stack frame.
+
+        push    ebp
+        push    edi
+        push    esi
+        push    ebx
+        sub esp, LocalVarsSize
+
+;;; Retrieve the function arguments. ecx will hold cur_match
+;;; throughout the entire function. edx will hold the pointer to the
+;;; deflate_state structure during the function's setup (before
+;;; entering the main loop.
+
+        mov edx, [deflatestate]
+        mov ecx, [curmatch]
+
+;;; uInt wmask = s->w_mask;
+;;; unsigned chain_length = s->max_chain_length;
+;;; if (s->prev_length >= s->good_match) {
+;;;     chain_length >>= 2;
+;;; }
+
+        mov eax, [edx + dsPrevLen]
+        mov ebx, [edx + dsGoodMatch]
+        cmp eax, ebx
+        mov eax, [edx + dsWMask]
+        mov ebx, [edx + dsMaxChainLen]
+        jl  LastMatchGood
+        shr ebx, 2
+LastMatchGood:
+
+;;; chainlen is decremented once beforehand so that the function can
+;;; use the sign flag instead of the zero flag for the exit test.
+;;; It is then shifted into the high word, to make room for the wmask
+;;; value, which it will always accompany.
+
+        dec ebx
+        shl ebx, 16
+        or  ebx, eax
+        mov [chainlenwmask], ebx
+
+;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+        mov eax, [edx + dsNiceMatch]
+        mov ebx, [edx + dsLookahead]
+        cmp ebx, eax
+        jl  LookaheadLess
+        mov ebx, eax
+LookaheadLess:  mov [nicematch], ebx
+
+;;; register Bytef *scan = s->window + s->strstart;
+
+        mov esi, [edx + dsWindow]
+        mov [window], esi
+        mov ebp, [edx + dsStrStart]
+        lea edi, [esi + ebp]
+        mov [scan], edi
+
+;;; Determine how many bytes the scan ptr is off from being
+;;; dword-aligned.
+
+        mov eax, edi
+        neg eax
+        and eax, 3
+        mov [scanalign], eax
+
+;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
+
+        mov eax, [edx + dsWSize]
+        sub eax, MIN_LOOKAHEAD
+        sub ebp, eax
+        jg  LimitPositive
+        xor ebp, ebp
+LimitPositive:
+
+;;; int best_len = s->prev_length;
+
+        mov eax, [edx + dsPrevLen]
+        mov [bestlen], eax
+
+;;; Store the sum of s->window + best_len in esi locally, and in esi.
+
+        add esi, eax
+        mov [windowbestlen], esi
+
+;;; register ush scan_start = *(ushf*)scan;
+;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
+;;; Posf *prev = s->prev;
+
+        movzx   ebx, word ptr [edi]
+        mov [scanstart], ebx
+        movzx   ebx, word ptr [edi + eax - 1]
+        mov [scanend], ebx
+        mov edi, [edx + dsPrev]
+
+;;; Jump into the main loop.
+
+        mov edx, [chainlenwmask]
+        jmp short LoopEntry
+
+align 4
+
+;;; do {
+;;;     match = s->window + cur_match;
+;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
+;;;         *(ushf*)match != scan_start) continue;
+;;;     [...]
+;;; } while ((cur_match = prev[cur_match & wmask]) > limit
+;;;          && --chain_length != 0);
+;;;
+;;; Here is the inner loop of the function. The function will spend the
+;;; majority of its time in this loop, and majority of that time will
+;;; be spent in the first ten instructions.
+;;;
+;;; Within this loop:
+;;; ebx = scanend
+;;; ecx = curmatch
+;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
+;;; esi = windowbestlen - i.e., (window + bestlen)
+;;; edi = prev
+;;; ebp = limit
+
+LookupLoop:
+        and ecx, edx
+        movzx   ecx, word ptr [edi + ecx*2]
+        cmp ecx, ebp
+        jbe LeaveNow
+        sub edx, 00010000h
+        js  LeaveNow
+LoopEntry:  movzx   eax, word ptr [esi + ecx - 1]
+        cmp eax, ebx
+        jnz LookupLoop
+        mov eax, [window]
+        movzx   eax, word ptr [eax + ecx]
+        cmp eax, [scanstart]
+        jnz LookupLoop
+
+;;; Store the current value of chainlen.
+
+        mov [chainlenwmask], edx
+
+;;; Point edi to the string under scrutiny, and esi to the string we
+;;; are hoping to match it up with. In actuality, esi and edi are
+;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
+;;; initialized to -(MAX_MATCH_8 - scanalign).
+
+        mov esi, [window]
+        mov edi, [scan]
+        add esi, ecx
+        mov eax, [scanalign]
+        mov edx, 0fffffef8h; -(MAX_MATCH_8)
+        lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
+        lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
+
+;;; Test the strings for equality, 8 bytes at a time. At the end,
+;;; adjust edx so that it is offset to the exact byte that mismatched.
+;;;
+;;; We already know at this point that the first three bytes of the
+;;; strings match each other, and they can be safely passed over before
+;;; starting the compare loop. So what this code does is skip over 0-3
+;;; bytes, as much as necessary in order to dword-align the edi
+;;; pointer. (esi will still be misaligned three times out of four.)
+;;;
+;;; It should be confessed that this loop usually does not represent
+;;; much of the total running time. Replacing it with a more
+;;; straightforward "rep cmpsb" would not drastically degrade
+;;; performance.
+
+LoopCmps:
+        mov eax, [esi + edx]
+        xor eax, [edi + edx]
+        jnz LeaveLoopCmps
+        mov eax, [esi + edx + 4]
+        xor eax, [edi + edx + 4]
+        jnz LeaveLoopCmps4
+        add edx, 8
+        jnz LoopCmps
+        jmp short LenMaximum
+LeaveLoopCmps4: add edx, 4
+LeaveLoopCmps:  test    eax, 0000FFFFh
+        jnz LenLower
+        add edx,  2
+        shr eax, 16
+LenLower:   sub al, 1
+        adc edx, 0
+
+;;; Calculate the length of the match. If it is longer than MAX_MATCH,
+;;; then automatically accept it as the best possible match and leave.
+
+        lea eax, [edi + edx]
+        mov edi, [scan]
+        sub eax, edi
+        cmp eax, MAX_MATCH
+        jge LenMaximum
+
+;;; If the length of the match is not longer than the best match we
+;;; have so far, then forget it and return to the lookup loop.
+
+        mov edx, [deflatestate]
+        mov ebx, [bestlen]
+        cmp eax, ebx
+        jg  LongerMatch
+        mov esi, [windowbestlen]
+        mov edi, [edx + dsPrev]
+        mov ebx, [scanend]
+        mov edx, [chainlenwmask]
+        jmp LookupLoop
+
+;;;         s->match_start = cur_match;
+;;;         best_len = len;
+;;;         if (len >= nice_match) break;
+;;;         scan_end = *(ushf*)(scan+best_len-1);
+
+LongerMatch:    mov ebx, [nicematch]
+        mov [bestlen], eax
+        mov [edx + dsMatchStart], ecx
+        cmp eax, ebx
+        jge LeaveNow
+        mov esi, [window]
+        add esi, eax
+        mov [windowbestlen], esi
+        movzx   ebx, word ptr [edi + eax - 1]
+        mov edi, [edx + dsPrev]
+        mov [scanend], ebx
+        mov edx, [chainlenwmask]
+        jmp LookupLoop
+
+;;; Accept the current string, with the maximum possible length.
+
+LenMaximum: mov edx, [deflatestate]
+        mov dword ptr [bestlen], MAX_MATCH
+        mov [edx + dsMatchStart], ecx
+
+;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+;;; return s->lookahead;
+
+LeaveNow:
+        mov edx, [deflatestate]
+        mov ebx, [bestlen]
+        mov eax, [edx + dsLookahead]
+        cmp ebx, eax
+        jg  LookaheadRet
+        mov eax, ebx
+LookaheadRet:
+
+;;; Restore the stack and return from whence we came.
+
+        add esp, LocalVarsSize
+        pop ebx
+        pop esi
+        pop edi
+        pop ebp
+
+        ret
+; please don't remove this string !
+; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!
+    db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
+
+
+    IFDEF NOUNDERLINE
+    longest_match       endp
+    ELSE
+    _longest_match      endp
+    ENDIF
+
+    IFDEF NOUNDERLINE
+    match_init      proc near
+                    ret
+    match_init      endp
+    ELSE
+    _match_init     proc near
+                    ret
+    _match_init     endp
+    ENDIF
+
+
+_TEXT   ends
+end
diff --git a/libsrc/zlib/contrib/masmx86/mkasm.bat b/libsrc/zlib/contrib/masmx86/mkasm.bat
deleted file mode 100755
index 70a51f8..0000000
--- a/libsrc/zlib/contrib/masmx86/mkasm.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-cl /DASMV /I..\.. /O2 /c gvmat32c.c
-ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm
diff --git a/libsrc/zlib/contrib/masmx86/readme.txt b/libsrc/zlib/contrib/masmx86/readme.txt
index 7b57167..3271f72 100644
--- a/libsrc/zlib/contrib/masmx86/readme.txt
+++ b/libsrc/zlib/contrib/masmx86/readme.txt
@@ -1,21 +1,27 @@
-
-Summary
--------
-This directory contains ASM implementations of the functions
-longest_match() and inflate_fast().
-
-
-Use instructions
-----------------
-Copy these files into the zlib source directory, then run the
-appropriate makefile, as suggested below.
-
-
-Build instructions
-------------------
-* With Microsoft C and MASM:
-nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj"
-
-* With Borland C and TASM:
-make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" OBJPA="+gvmat32c.obj+gvmat32.obj+inffas32.obj"
-
+
+Summary
+-------
+This directory contains ASM implementations of the functions
+longest_match() and inflate_fast().
+
+
+Use instructions
+----------------
+Assemble using MASM, and copy the object files into the zlib source
+directory, then run the appropriate makefile, as suggested below.  You can
+donwload MASM from here:
+
+    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
+
+You can also get objects files here:
+
+    http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
+
+Build instructions
+------------------
+* With Microsoft C and MASM:
+nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
+
+* With Borland C and TASM:
+make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
+
diff --git a/libsrc/zlib/contrib/minizip/ChangeLogUnzip b/libsrc/zlib/contrib/minizip/ChangeLogUnzip
deleted file mode 100644
index 50ca6a9..0000000
--- a/libsrc/zlib/contrib/minizip/ChangeLogUnzip
+++ /dev/null
@@ -1,67 +0,0 @@
-Change in 1.01e (12 feb 05)
-- Fix in zipOpen2 for globalcomment (Rolf Kalbermatter)
-- Fix possible memory leak in unzip.c (Zoran Stevanovic)
-
-Change in 1.01b (20 may 04)
-- Integrate patch from Debian package (submited by Mark Brown)
-- Add tools mztools from Xavier Roche
-
-Change in 1.01 (8 may 04)
-- fix buffer overrun risk in unzip.c (Xavier Roche)
-- fix a minor buffer insecurity in minizip.c (Mike Whittaker)
-
-Change in 1.00: (10 sept 03)
-- rename to 1.00
-- cosmetic code change
-
-Change in 0.22: (19 May 03)
-- crypting support (unless you define NOCRYPT)
-- append file in existing zipfile
-
-Change in 0.21: (10 Mar 03)
-- bug fixes
-
-Change in 0.17: (27 Jan 02)
-- bug fixes
-
-Change in 0.16: (19 Jan 02)
-- Support of ioapi for virtualize zip file access
-
-Change in 0.15: (19 Mar 98)
-- fix memory leak in minizip.c
-
-Change in 0.14: (10 Mar 98)
-- fix bugs in minizip.c sample for zipping big file
-- fix problem in month in date handling
-- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for
-    comment handling
-
-Change in 0.13: (6 Mar 98)
-- fix bugs in zip.c
-- add real minizip sample
-
-Change in 0.12: (4 Mar 98)
-- add zip.c and zip.h for creates .zip file
-- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly)
-- fix miniunz.c for file without specific record for directory
-
-Change in 0.11: (3 Mar 98)
-- fix bug in unzGetCurrentFileInfo for get extra field and comment
-- enhance miniunz sample, remove the bad unztst.c sample
-
-Change in 0.10: (2 Mar 98)
-- fix bug in unzReadCurrentFile
-- rename unzip* to unz* function and structure
-- remove Windows-like hungary notation variable name
-- modify some structure in unzip.h
-- add somes comment in source
-- remove unzipGetcCurrentFile function
-- replace ZUNZEXPORT by ZEXPORT
-- add unzGetLocalExtrafield for get the local extrafield info
-- add a new sample, miniunz.c
-
-Change in 0.4: (25 Feb 98)
-- suppress the type unzipFileInZip.
-  Only on file in the zipfile can be open at the same time
-- fix somes typo in code
-- added tm_unz structure in unzip_file_info (date/time in readable format)
diff --git a/libsrc/zlib/contrib/minizip/MiniZip64_Changes.txt b/libsrc/zlib/contrib/minizip/MiniZip64_Changes.txt
new file mode 100644
index 0000000..13a1bd9
--- /dev/null
+++ b/libsrc/zlib/contrib/minizip/MiniZip64_Changes.txt
@@ -0,0 +1,6 @@
+
+MiniZip 1.1 was derrived from MiniZip at version 1.01f
+
+Change in 1.0 (Okt 2009)
+ - **TODO - Add history**
+
diff --git a/libsrc/zlib/contrib/minizip/MiniZip64_info.txt b/libsrc/zlib/contrib/minizip/MiniZip64_info.txt
new file mode 100644
index 0000000..57d7152
--- /dev/null
+++ b/libsrc/zlib/contrib/minizip/MiniZip64_info.txt
@@ -0,0 +1,74 @@
+MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson
+
+Introduction
+---------------------
+MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html )
+
+When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0.
+All possible work was done for compatibility.
+
+
+Background
+---------------------
+When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64 
+support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ )
+
+That was used as a starting point. And after that ZIP64 support was added to zip.c
+some refactoring and code cleanup was also done.
+
+
+Changed from MiniZip 1.0 to MiniZip 1.1
+---------------------------------------
+* Added ZIP64 support for unzip ( by Even Rouault )
+* Added ZIP64 support for zip ( by Mathias Svensson )
+* Reverted some changed that Even Rouault did.
+* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users.
+* Added unzip patch for BZIP Compression method (patch create by Daniel Borca)
+* Added BZIP Compress method for zip
+* Did some refactoring and code cleanup
+
+
+Credits
+
+ Gilles Vollant    - Original MiniZip author
+ Even Rouault      - ZIP64 unzip Support
+ Daniel Borca      - BZip Compression method support in unzip
+ Mathias Svensson  - ZIP64 zip support
+ Mathias Svensson  - BZip Compression method support in zip
+
+ Resources
+
+ ZipLayout   http://result42.com/projects/ZipFileLayout
+             Command line tool for Windows that shows the layout and information of the headers in a zip archive.
+             Used when debugging and validating the creation of zip files using MiniZip64
+
+
+ ZIP App Note  http://www.pkware.com/documents/casestudies/APPNOTE.TXT
+               Zip File specification
+
+
+Notes.
+ * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined.
+
+License
+----------------------------------------------------------
+   Condition of use and distribution are the same than zlib :
+
+  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.
+
+----------------------------------------------------------
+
diff --git a/libsrc/zlib/contrib/minizip/crypt.h b/libsrc/zlib/contrib/minizip/crypt.h
index 622f4bc..a01d08d 100644
--- a/libsrc/zlib/contrib/minizip/crypt.h
+++ b/libsrc/zlib/contrib/minizip/crypt.h
@@ -87,13 +87,12 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon
 #    define ZCR_SEED2 3141592654UL     /* use PI as default pattern */
 #  endif
 
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
-    const char *passwd;         /* password string */
-    unsigned char *buf;         /* where to write header */
-    int bufSize;
-    unsigned long* pkeys;
-    const unsigned long* pcrc_32_tab;
-    unsigned long crcForCrypting;
+static int crypthead(const char* passwd,      /* password string */
+                     unsigned char* buf,      /* where to write header */
+                     int bufSize,
+                     unsigned long* pkeys,
+                     const unsigned long* pcrc_32_tab,
+                     unsigned long crcForCrypting)
 {
     int n;                       /* index in random header */
     int t;                       /* temporary */
@@ -124,8 +123,8 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
     {
         buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
     }
-    buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
-    buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+    buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
+    buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
     return n;
 }
 
diff --git a/libsrc/zlib/contrib/minizip/ioapi.c b/libsrc/zlib/contrib/minizip/ioapi.c
index f1bee23..49958f6 100644
--- a/libsrc/zlib/contrib/minizip/ioapi.c
+++ b/libsrc/zlib/contrib/minizip/ioapi.c
@@ -1,74 +1,104 @@
-/* ioapi.c -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "zlib.h"
-#include "ioapi.h"
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
+         Modifications for Zip64 support
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
+         For more info read MiniZip_info.txt
 
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
+*/
 
-#ifndef SEEK_CUR
-#define SEEK_CUR    1
+#if (defined(_WIN32))
+        #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#ifndef SEEK_END
-#define SEEK_END    2
-#endif
+#include "ioapi.h"
 
-#ifndef SEEK_SET
-#define SEEK_SET    0
-#endif
+voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
+{
+    if (pfilefunc->zfile_func64.zopen64_file != NULL)
+        return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
+    else
+    {
+        return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
+    }
+}
 
-voidpf ZCALLBACK fopen_file_func OF((
-   voidpf opaque,
-   const char* filename,
-   int mode));
+long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)
+{
+    if (pfilefunc->zfile_func64.zseek64_file != NULL)
+        return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
+    else
+    {
+        uLong offsetTruncated = (uLong)offset;
+        if (offsetTruncated != offset)
+            return -1;
+        else
+            return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);
+    }
+}
 
-uLong ZCALLBACK fread_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   void* buf,
-   uLong size));
+ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)
+{
+    if (pfilefunc->zfile_func64.zseek64_file != NULL)
+        return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
+    else
+    {
+        uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
+        if ((tell_uLong) == ((uLong)-1))
+            return (ZPOS64_T)-1;
+        else
+            return tell_uLong;
+    }
+}
 
-uLong ZCALLBACK fwrite_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   const void* buf,
-   uLong size));
+void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32)
+{
+    p_filefunc64_32->zfile_func64.zopen64_file = NULL;
+    p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
+    p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
+    p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;
+    p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;
+    p_filefunc64_32->zfile_func64.ztell64_file = NULL;
+    p_filefunc64_32->zfile_func64.zseek64_file = NULL;
+    p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file;
+    p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
+    p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque;
+    p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file;
+    p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;
+}
 
-long ZCALLBACK ftell_file_func OF((
-   voidpf opaque,
-   voidpf stream));
 
-long ZCALLBACK fseek_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   uLong offset,
-   int origin));
 
-int ZCALLBACK fclose_file_func OF((
-   voidpf opaque,
-   voidpf stream));
+static voidpf  ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
+static uLong   ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+static uLong   ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
+static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
+static long    ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+static int     ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
+static int     ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
 
-int ZCALLBACK ferror_file_func OF((
-   voidpf opaque,
-   voidpf stream));
+static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
+{
+    FILE* file = NULL;
+    const char* mode_fopen = NULL;
+    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+        mode_fopen = "rb";
+    else
+    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+        mode_fopen = "r+b";
+    else
+    if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+        mode_fopen = "wb";
 
+    if ((filename!=NULL) && (mode_fopen != NULL))
+        file = fopen(filename, mode_fopen);
+    return file;
+}
 
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
-   voidpf opaque;
-   const char* filename;
-   int mode;
+static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
 {
     FILE* file = NULL;
     const char* mode_fopen = NULL;
@@ -82,48 +112,41 @@ voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
         mode_fopen = "wb";
 
     if ((filename!=NULL) && (mode_fopen != NULL))
-        file = fopen(filename, mode_fopen);
+        file = fopen64((const char*)filename, mode_fopen);
     return file;
 }
 
 
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   void* buf;
-   uLong size;
+static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
 {
     uLong ret;
     ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
     return ret;
 }
 
-
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   const void* buf;
-   uLong size;
+static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
 {
     uLong ret;
     ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
     return ret;
 }
 
-long ZCALLBACK ftell_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
+static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
 {
     long ret;
     ret = ftell((FILE *)stream);
     return ret;
 }
 
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
-   voidpf opaque;
-   voidpf stream;
-   uLong offset;
-   int origin;
+
+static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
+{
+    ZPOS64_T ret;
+    ret = ftello64((FILE *)stream);
+    return ret;
+}
+
+static long ZCALLBACK fseek_file_func (voidpf  opaque, voidpf stream, uLong offset, int origin)
 {
     int fseek_origin=0;
     long ret;
@@ -141,22 +164,45 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
     default: return -1;
     }
     ret = 0;
-    fseek((FILE *)stream, offset, fseek_origin);
+    if (fseek((FILE *)stream, offset, fseek_origin) != 0)
+        ret = -1;
     return ret;
 }
 
-int ZCALLBACK fclose_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
+static long ZCALLBACK fseek64_file_func (voidpf  opaque, voidpf stream, ZPOS64_T offset, int origin)
+{
+    int fseek_origin=0;
+    long ret;
+    switch (origin)
+    {
+    case ZLIB_FILEFUNC_SEEK_CUR :
+        fseek_origin = SEEK_CUR;
+        break;
+    case ZLIB_FILEFUNC_SEEK_END :
+        fseek_origin = SEEK_END;
+        break;
+    case ZLIB_FILEFUNC_SEEK_SET :
+        fseek_origin = SEEK_SET;
+        break;
+    default: return -1;
+    }
+    ret = 0;
+
+    if(fseeko64((FILE *)stream, offset, fseek_origin) != 0)
+                        ret = -1;
+
+    return ret;
+}
+
+
+static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
 {
     int ret;
     ret = fclose((FILE *)stream);
     return ret;
 }
 
-int ZCALLBACK ferror_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
+static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
 {
     int ret;
     ret = ferror((FILE *)stream);
@@ -175,3 +221,15 @@ void fill_fopen_filefunc (pzlib_filefunc_def)
     pzlib_filefunc_def->zerror_file = ferror_file_func;
     pzlib_filefunc_def->opaque = NULL;
 }
+
+void fill_fopen64_filefunc (zlib_filefunc64_def*  pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = fopen64_file_func;
+    pzlib_filefunc_def->zread_file = fread_file_func;
+    pzlib_filefunc_def->zwrite_file = fwrite_file_func;
+    pzlib_filefunc_def->ztell64_file = ftell64_file_func;
+    pzlib_filefunc_def->zseek64_file = fseek64_file_func;
+    pzlib_filefunc_def->zclose_file = fclose_file_func;
+    pzlib_filefunc_def->zerror_file = ferror_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
diff --git a/libsrc/zlib/contrib/minizip/ioapi.h b/libsrc/zlib/contrib/minizip/ioapi.h
index 7d457ba..8309c4c 100644
--- a/libsrc/zlib/contrib/minizip/ioapi.h
+++ b/libsrc/zlib/contrib/minizip/ioapi.h
@@ -1,13 +1,104 @@
 /* ioapi.h -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Version 1.01e, February 12th, 2005
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Modifications for Zip64 support
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+         For more info read MiniZip_info.txt
+
+         Changes
+
+    Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
+    Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
+               More if/def section may be needed to support other platforms
+    Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.
+                          (but you should use iowin32.c for windows instead)
+
+*/
+
+#ifndef _ZLIBIOAPI64_H
+#define _ZLIBIOAPI64_H
+
+#if (!defined(_WIN32)) && (!defined(WIN32))
+
+  // Linux needs this to support file operation on files larger then 4+GB
+  // But might need better if/def to select just the platforms that needs them.
+
+        #ifndef __USE_FILE_OFFSET64
+                #define __USE_FILE_OFFSET64
+        #endif
+        #ifndef __USE_LARGEFILE64
+                #define __USE_LARGEFILE64
+        #endif
+        #ifndef _LARGEFILE64_SOURCE
+                #define _LARGEFILE64_SOURCE
+        #endif
+        #ifndef _FILE_OFFSET_BIT
+                #define _FILE_OFFSET_BIT 64
+        #endif
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "zlib.h"
+
+#if defined(USE_FILE32API)
+#define fopen64 fopen
+#define ftello64 ftell
+#define fseeko64 fseek
+#else
+#ifdef _MSC_VER
+ #define fopen64 fopen
+ #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
+  #define ftello64 _ftelli64
+  #define fseeko64 _fseeki64
+ #else // old MSC
+  #define ftello64 ftell
+  #define fseeko64 fseek
+ #endif
+#endif
+#endif
+
+/*
+#ifndef ZPOS64_T
+  #ifdef _WIN32
+                #define ZPOS64_T fpos_t
+  #else
+    #include <stdint.h>
+    #define ZPOS64_T uint64_t
+  #endif
+#endif
 */
 
-#ifndef _ZLIBIOAPI_H
-#define _ZLIBIOAPI_H
+#ifdef HAVE_MINIZIP64_CONF_H
+#include "mz64conf.h"
+#endif
+
+/* a type choosen by DEFINE */
+#ifdef HAVE_64BIT_INT_CUSTOM
+typedef  64BIT_INT_CUSTOM_TYPE ZPOS64_T;
+#else
+#ifdef HAS_STDINT_H
+#include "stdint.h"
+typedef uint64_t ZPOS64_T;
+#else
+
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef unsigned __int64 ZPOS64_T;
+#else
+typedef unsigned long long int ZPOS64_T;
+#endif
+#endif
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 
 #define ZLIB_FILEFUNC_SEEK_CUR (1)
@@ -23,26 +114,27 @@
 
 
 #ifndef ZCALLBACK
-
-#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
-#define ZCALLBACK CALLBACK
-#else
-#define ZCALLBACK
-#endif
+ #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
+   #define ZCALLBACK CALLBACK
+ #else
+   #define ZCALLBACK
+ #endif
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
 
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong  (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong  (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef long   (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long   (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-typedef int    (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int    (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
 
+
+typedef voidpf   (ZCALLBACK *open_file_func)      OF((voidpf opaque, const char* filename, int mode));
+typedef uLong    (ZCALLBACK *read_file_func)      OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong    (ZCALLBACK *write_file_func)     OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef int      (ZCALLBACK *close_file_func)     OF((voidpf opaque, voidpf stream));
+typedef int      (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
+
+typedef long     (ZCALLBACK *tell_file_func)      OF((voidpf opaque, voidpf stream));
+typedef long     (ZCALLBACK *seek_file_func)      OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+
+
+/* here is the "old" 32 bits structure structure */
 typedef struct zlib_filefunc_def_s
 {
     open_file_func      zopen_file;
@@ -55,21 +147,54 @@ typedef struct zlib_filefunc_def_s
     voidpf              opaque;
 } zlib_filefunc_def;
 
+typedef ZPOS64_T (ZCALLBACK *tell64_file_func)    OF((voidpf opaque, voidpf stream));
+typedef long     (ZCALLBACK *seek64_file_func)    OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+typedef voidpf   (ZCALLBACK *open64_file_func)    OF((voidpf opaque, const void* filename, int mode));
 
+typedef struct zlib_filefunc64_def_s
+{
+    open64_file_func    zopen64_file;
+    read_file_func      zread_file;
+    write_file_func     zwrite_file;
+    tell64_file_func    ztell64_file;
+    seek64_file_func    zseek64_file;
+    close_file_func     zclose_file;
+    testerror_file_func zerror_file;
+    voidpf              opaque;
+} zlib_filefunc64_def;
 
+void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
 void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
 
-#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
-#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
-#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
-#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
-#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
-#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
+/* now internal definition, only for zip.c and unzip.h */
+typedef struct zlib_filefunc64_32_def_s
+{
+    zlib_filefunc64_def zfile_func64;
+    open_file_func      zopen32_file;
+    tell_file_func      ztell32_file;
+    seek_file_func      zseek32_file;
+} zlib_filefunc64_32_def;
+
+
+#define ZREAD64(filefunc,filestream,buf,size)     ((*((filefunc).zfile_func64.zread_file))   ((filefunc).zfile_func64.opaque,filestream,buf,size))
+#define ZWRITE64(filefunc,filestream,buf,size)    ((*((filefunc).zfile_func64.zwrite_file))  ((filefunc).zfile_func64.opaque,filestream,buf,size))
+//#define ZTELL64(filefunc,filestream)            ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))
+//#define ZSEEK64(filefunc,filestream,pos,mode)   ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))
+#define ZCLOSE64(filefunc,filestream)             ((*((filefunc).zfile_func64.zclose_file))  ((filefunc).zfile_func64.opaque,filestream))
+#define ZERROR64(filefunc,filestream)             ((*((filefunc).zfile_func64.zerror_file))  ((filefunc).zfile_func64.opaque,filestream))
 
+voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
+long    call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
+ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
+
+void    fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);
+
+#define ZOPEN64(filefunc,filename,mode)         (call_zopen64((&(filefunc)),(filename),(mode)))
+#define ZTELL64(filefunc,filestream)            (call_ztell64((&(filefunc)),(filestream)))
+#define ZSEEK64(filefunc,filestream,pos,mode)   (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif
-
diff --git a/libsrc/zlib/contrib/minizip/iowin32.c b/libsrc/zlib/contrib/minizip/iowin32.c
index a9b5f78..6a2a883 100644
--- a/libsrc/zlib/contrib/minizip/iowin32.c
+++ b/libsrc/zlib/contrib/minizip/iowin32.c
@@ -1,10 +1,14 @@
 /* iowin32.c -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-   This IO API version uses the Win32 API (for Microsoft Windows)
+     Version 1.1, February 14h, 2010
+     part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Version 1.01e, February 12th, 2005
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+         Modifications for Zip64 support
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+     For more info read MiniZip_info.txt
 
-   Copyright (C) 1998-2005 Gilles Vollant
 */
 
 #include <stdlib.h>
@@ -21,40 +25,13 @@
 #define INVALID_SET_FILE_POINTER ((DWORD)-1)
 #endif
 
-voidpf ZCALLBACK win32_open_file_func OF((
-   voidpf opaque,
-   const char* filename,
-   int mode));
-
-uLong ZCALLBACK win32_read_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   void* buf,
-   uLong size));
-
-uLong ZCALLBACK win32_write_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   const void* buf,
-   uLong size));
-
-long ZCALLBACK win32_tell_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-long ZCALLBACK win32_seek_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   uLong offset,
-   int origin));
-
-int ZCALLBACK win32_close_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-int ZCALLBACK win32_error_file_func OF((
-   voidpf opaque,
-   voidpf stream));
+voidpf  ZCALLBACK win32_open_file_func  OF((voidpf opaque, const char* filename, int mode));
+uLong   ZCALLBACK win32_read_file_func  OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+uLong   ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+ZPOS64_T ZCALLBACK win32_tell64_file_func  OF((voidpf opaque, voidpf stream));
+long    ZCALLBACK win32_seek64_file_func  OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+int     ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream));
+int     ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream));
 
 typedef struct
 {
@@ -62,69 +39,121 @@ typedef struct
     int error;
 } WIN32FILE_IOWIN;
 
-voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode)
-   voidpf opaque;
-   const char* filename;
-   int mode;
-{
-    const char* mode_fopen = NULL;
-    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
-    HANDLE hFile = 0;
-    voidpf ret=NULL;
 
-    dwDesiredAccess = dwShareMode = dwFlagsAndAttributes = 0;
+static void win32_translate_open_mode(int mode,
+                                      DWORD* lpdwDesiredAccess,
+                                      DWORD* lpdwCreationDisposition,
+                                      DWORD* lpdwShareMode,
+                                      DWORD* lpdwFlagsAndAttributes)
+{
+    *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0;
 
     if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
     {
-        dwDesiredAccess = GENERIC_READ;
-        dwCreationDisposition = OPEN_EXISTING;
-        dwShareMode = FILE_SHARE_READ;
+        *lpdwDesiredAccess = GENERIC_READ;
+        *lpdwCreationDisposition = OPEN_EXISTING;
+        *lpdwShareMode = FILE_SHARE_READ;
     }
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+    else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
     {
-        dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
-        dwCreationDisposition = OPEN_EXISTING;
+        *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+        *lpdwCreationDisposition = OPEN_EXISTING;
     }
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+    else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
     {
-        dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
-        dwCreationDisposition = CREATE_ALWAYS;
+        *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+        *lpdwCreationDisposition = CREATE_ALWAYS;
     }
+}
 
-    if ((filename!=NULL) && (dwDesiredAccess != 0))
-        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL,
-                      dwCreationDisposition, dwFlagsAndAttributes, NULL);
-
-    if (hFile == INVALID_HANDLE_VALUE)
-        hFile = NULL;
+static voidpf win32_build_iowin(HANDLE hFile)
+{
+    voidpf ret=NULL;
 
-    if (hFile != NULL)
+    if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE))
     {
         WIN32FILE_IOWIN w32fiow;
         w32fiow.hf = hFile;
         w32fiow.error = 0;
         ret = malloc(sizeof(WIN32FILE_IOWIN));
+
         if (ret==NULL)
             CloseHandle(hFile);
-        else *((WIN32FILE_IOWIN*)ret) = w32fiow;
+        else
+            *((WIN32FILE_IOWIN*)ret) = w32fiow;
     }
     return ret;
 }
 
+voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
 
-uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   void* buf;
-   uLong size;
+voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size)
 {
     uLong ret=0;
     HANDLE hFile = NULL;
     if (stream!=NULL)
         hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+
     if (hFile != NULL)
+    {
         if (!ReadFile(hFile, buf, size, &ret, NULL))
         {
             DWORD dwErr = GetLastError();
@@ -132,23 +161,21 @@ uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size)
                 dwErr = 0;
             ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
         }
+    }
 
     return ret;
 }
 
 
-uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   const void* buf;
-   uLong size;
+uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size)
 {
     uLong ret=0;
     HANDLE hFile = NULL;
     if (stream!=NULL)
         hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
 
-    if (hFile !=NULL)
+    if (hFile != NULL)
+    {
         if (!WriteFile(hFile, buf, size, &ret, NULL))
         {
             DWORD dwErr = GetLastError();
@@ -156,13 +183,12 @@ uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size)
                 dwErr = 0;
             ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
         }
+    }
 
     return ret;
 }
 
-long ZCALLBACK win32_tell_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
+long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream)
 {
     long ret=-1;
     HANDLE hFile = NULL;
@@ -183,11 +209,32 @@ long ZCALLBACK win32_tell_file_func (opaque, stream)
     return ret;
 }
 
-long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin)
-   voidpf opaque;
-   voidpf stream;
-   uLong offset;
-   int origin;
+ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
+{
+    ZPOS64_T ret= (ZPOS64_T)-1;
+    HANDLE hFile = NULL;
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream)->hf;
+
+    if (hFile)
+    {
+        LARGE_INTEGER li;
+        li.QuadPart = 0;
+        li.u.LowPart = SetFilePointer(hFile, li.u.LowPart, &li.u.HighPart, FILE_CURRENT);
+        if ( (li.LowPart == 0xFFFFFFFF) && (GetLastError() != NO_ERROR))
+        {
+            DWORD dwErr = GetLastError();
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+            ret = (ZPOS64_T)-1;
+        }
+        else
+            ret=li.QuadPart;
+    }
+    return ret;
+}
+
+
+long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin)
 {
     DWORD dwMoveMethod=0xFFFFFFFF;
     HANDLE hFile = NULL;
@@ -224,9 +271,46 @@ long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin)
     return ret;
 }
 
-int ZCALLBACK win32_close_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
+long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin)
+{
+    DWORD dwMoveMethod=0xFFFFFFFF;
+    HANDLE hFile = NULL;
+    long ret=-1;
+
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream)->hf;
+
+    switch (origin)
+    {
+        case ZLIB_FILEFUNC_SEEK_CUR :
+            dwMoveMethod = FILE_CURRENT;
+            break;
+        case ZLIB_FILEFUNC_SEEK_END :
+            dwMoveMethod = FILE_END;
+            break;
+        case ZLIB_FILEFUNC_SEEK_SET :
+            dwMoveMethod = FILE_BEGIN;
+            break;
+        default: return -1;
+    }
+
+    if (hFile)
+    {
+        LARGE_INTEGER* li = (LARGE_INTEGER*)&offset;
+        DWORD dwSet = SetFilePointer(hFile, li->u.LowPart, &li->u.HighPart, dwMoveMethod);
+        if (dwSet == INVALID_SET_FILE_POINTER)
+        {
+            DWORD dwErr = GetLastError();
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+            ret = -1;
+        }
+        else
+            ret=0;
+    }
+    return ret;
+}
+
+int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
 {
     int ret=-1;
 
@@ -244,9 +328,7 @@ int ZCALLBACK win32_close_file_func (opaque, stream)
     return ret;
 }
 
-int ZCALLBACK win32_error_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
+int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream)
 {
     int ret=-1;
     if (stream!=NULL)
@@ -256,8 +338,7 @@ int ZCALLBACK win32_error_file_func (opaque, stream)
     return ret;
 }
 
-void fill_win32_filefunc (pzlib_filefunc_def)
-  zlib_filefunc_def* pzlib_filefunc_def;
+void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
 {
     pzlib_filefunc_def->zopen_file = win32_open_file_func;
     pzlib_filefunc_def->zread_file = win32_read_file_func;
@@ -266,5 +347,43 @@ void fill_win32_filefunc (pzlib_filefunc_def)
     pzlib_filefunc_def->zseek_file = win32_seek_file_func;
     pzlib_filefunc_def->zclose_file = win32_close_file_func;
     pzlib_filefunc_def->zerror_file = win32_error_file_func;
-    pzlib_filefunc_def->opaque=NULL;
+    pzlib_filefunc_def->opaque = NULL;
+}
+
+void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = win32_open64_file_func;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+    pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
+
+
+void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+    pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
+
+
+void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+    pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
 }
diff --git a/libsrc/zlib/contrib/minizip/iowin32.h b/libsrc/zlib/contrib/minizip/iowin32.h
index a3a437a..0ca0969 100644
--- a/libsrc/zlib/contrib/minizip/iowin32.h
+++ b/libsrc/zlib/contrib/minizip/iowin32.h
@@ -1,10 +1,14 @@
 /* iowin32.h -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-   This IO API version uses the Win32 API (for Microsoft Windows)
+     Version 1.1, February 14h, 2010
+     part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Version 1.01e, February 12th, 2005
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+         Modifications for Zip64 support
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+         For more info read MiniZip_info.txt
 
-   Copyright (C) 1998-2005 Gilles Vollant
 */
 
 #include <windows.h>
@@ -15,6 +19,9 @@ extern "C" {
 #endif
 
 void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def));
 
 #ifdef __cplusplus
 }
diff --git a/libsrc/zlib/contrib/minizip/make_vms.com b/libsrc/zlib/contrib/minizip/make_vms.com
new file mode 100644
index 0000000..9ac13a9
--- /dev/null
+++ b/libsrc/zlib/contrib/minizip/make_vms.com
@@ -0,0 +1,25 @@
+$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig
+$ open/write zdef vmsdefs.h
+$ copy sys$input: zdef
+$ deck
+#define unix
+#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from
+#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator
+#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord
+#define Write_EndOfCentralDirectoryRecord Write_EoDRecord
+$ eod
+$ close zdef
+$ copy vmsdefs.h,ioapi.h_orig ioapi.h
+$ cc/include=[--]/prefix=all ioapi.c
+$ cc/include=[--]/prefix=all miniunz.c
+$ cc/include=[--]/prefix=all unzip.c
+$ cc/include=[--]/prefix=all minizip.c
+$ cc/include=[--]/prefix=all zip.c
+$ link miniunz,unzip,ioapi,[--]libz.olb/lib
+$ link minizip,zip,ioapi,[--]libz.olb/lib
+$ mcr []minizip test minizip_info.txt
+$ mcr []miniunz -l test.zip
+$ rename minizip_info.txt; minizip_info.txt_old
+$ mcr []miniunz test.zip
+$ delete test.zip;*
+$exit
diff --git a/libsrc/zlib/contrib/minizip/miniunz.c b/libsrc/zlib/contrib/minizip/miniunz.c
index f599938..9ed009f 100644
--- a/libsrc/zlib/contrib/minizip/miniunz.c
+++ b/libsrc/zlib/contrib/minizip/miniunz.c
@@ -1,10 +1,31 @@
 /*
    miniunz.c
-   Version 1.01e, February 12th, 2005
+   Version 1.1, February 14h, 2010
+   sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+         Modifications of Unzip for Zip64
+         Copyright (C) 2007-2008 Even Rouault
+
+         Modifications for Zip64 support on both zip and unzip
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 */
 
+#ifndef _WIN32
+        #ifndef __USE_FILE_OFFSET64
+                #define __USE_FILE_OFFSET64
+        #endif
+        #ifndef __USE_LARGEFILE64
+                #define __USE_LARGEFILE64
+        #endif
+        #ifndef _LARGEFILE64_SOURCE
+                #define _LARGEFILE64_SOURCE
+        #endif
+        #ifndef _FILE_OFFSET_BIT
+                #define _FILE_OFFSET_BIT 64
+        #endif
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -27,7 +48,7 @@
 #define WRITEBUFFERSIZE (8192)
 #define MAXFILENAME (256)
 
-#ifdef WIN32
+#ifdef _WIN32
 #define USEWIN32IOAPI
 #include "iowin32.h"
 #endif
@@ -51,11 +72,11 @@ void change_file_date(filename,dosdate,tmu_date)
     uLong dosdate;
     tm_unz tmu_date;
 {
-#ifdef WIN32
+#ifdef _WIN32
   HANDLE hFile;
   FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
 
-  hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE,
+  hFile = CreateFileA(filename,GENERIC_READ | GENERIC_WRITE,
                       0,NULL,OPEN_EXISTING,0,NULL);
   GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite);
   DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal);
@@ -91,8 +112,8 @@ int mymkdir(dirname)
     const char* dirname;
 {
     int ret=0;
-#ifdef WIN32
-    ret = mkdir(dirname);
+#ifdef _WIN32
+    ret = _mkdir(dirname);
 #else
 #ifdef unix
     ret = mkdir (dirname,0775);
@@ -112,6 +133,11 @@ int makedir (newdir)
     return 0;
 
   buffer = (char*)malloc(len+1);
+        if (buffer==NULL)
+        {
+                printf("Error allocating memory\n");
+                return UNZ_INTERNALERROR;
+        }
   strcpy(buffer,newdir);
 
   if (buffer[len-1] == '/') {
@@ -164,34 +190,61 @@ void do_help()
            "  -p  extract crypted file using password\n\n");
 }
 
+void Display64BitsSize(ZPOS64_T n, int size_char)
+{
+  /* to avoid compatibility problem , we do here the conversion */
+  char number[21];
+  int offset=19;
+  int pos_string = 19;
+  number[20]=0;
+  for (;;) {
+      number[offset]=(char)((n%10)+'0');
+      if (number[offset] != '0')
+          pos_string=offset;
+      n/=10;
+      if (offset==0)
+          break;
+      offset--;
+  }
+  {
+      int size_display_string = 19-pos_string;
+      while (size_char > size_display_string)
+      {
+          size_char--;
+          printf(" ");
+      }
+  }
+
+  printf("%s",&number[pos_string]);
+}
 
 int do_list(uf)
     unzFile uf;
 {
     uLong i;
-    unz_global_info gi;
+    unz_global_info64 gi;
     int err;
 
-    err = unzGetGlobalInfo (uf,&gi);
+    err = unzGetGlobalInfo64(uf,&gi);
     if (err!=UNZ_OK)
         printf("error %d with zipfile in unzGetGlobalInfo \n",err);
-    printf(" Length  Method   Size  Ratio   Date    Time   CRC-32     Name\n");
-    printf(" ------  ------   ----  -----   ----    ----   ------     ----\n");
+    printf("  Length  Method     Size Ratio   Date    Time   CRC-32     Name\n");
+    printf("  ------  ------     ---- -----   ----    ----   ------     ----\n");
     for (i=0;i<gi.number_entry;i++)
     {
         char filename_inzip[256];
-        unz_file_info file_info;
+        unz_file_info64 file_info;
         uLong ratio=0;
         const char *string_method;
         char charCrypt=' ';
-        err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+        err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
         if (err!=UNZ_OK)
         {
             printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
             break;
         }
         if (file_info.uncompressed_size>0)
-            ratio = (file_info.compressed_size*100)/file_info.uncompressed_size;
+            ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size);
 
         /* display a '*' if the file is crypted */
         if ((file_info.flag & 1) != 0)
@@ -211,12 +264,17 @@ int do_list(uf)
               string_method="Defl:F"; /* 2:fast , 3 : extra fast*/
         }
         else
+        if (file_info.compression_method==Z_BZIP2ED)
+        {
+              string_method="BZip2 ";
+        }
+        else
             string_method="Unkn. ";
 
-        printf("%7lu  %6s%c%7lu %3lu%%  %2.2lu-%2.2lu-%2.2lu  %2.2lu:%2.2lu  %8.8lx   %s\n",
-                file_info.uncompressed_size,string_method,
-                charCrypt,
-                file_info.compressed_size,
+        Display64BitsSize(file_info.uncompressed_size,7);
+        printf("  %6s%c",string_method,charCrypt);
+        Display64BitsSize(file_info.compressed_size,7);
+        printf(" %3lu%%  %2.2lu-%2.2lu-%2.2lu  %2.2lu:%2.2lu  %8.8lx   %s\n",
                 ratio,
                 (uLong)file_info.tmu_date.tm_mon + 1,
                 (uLong)file_info.tmu_date.tm_mday,
@@ -252,9 +310,9 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
     void* buf;
     uInt size_buf;
 
-    unz_file_info file_info;
+    unz_file_info64 file_info;
     uLong ratio=0;
-    err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+    err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
 
     if (err!=UNZ_OK)
     {
@@ -306,7 +364,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
         {
             char rep=0;
             FILE* ftestexist;
-            ftestexist = fopen(write_filename,"rb");
+            ftestexist = fopen64(write_filename,"rb");
             if (ftestexist!=NULL)
             {
                 fclose(ftestexist);
@@ -317,7 +375,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
 
                     printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
                     ret = scanf("%1s",answer);
-                    if (ret != 1) 
+                    if (ret != 1)
                     {
                        exit(EXIT_FAILURE);
                     }
@@ -337,7 +395,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
 
         if ((skip==0) && (err==UNZ_OK))
         {
-            fout=fopen(write_filename,"wb");
+            fout=fopen64(write_filename,"wb");
 
             /* some zipfile don't contain directory alone before file */
             if ((fout==NULL) && ((*popt_extract_without_path)==0) &&
@@ -347,7 +405,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
                 *(filename_withoutpath-1)='\0';
                 makedir(write_filename);
                 *(filename_withoutpath-1)=c;
-                fout=fopen(write_filename,"wb");
+                fout=fopen64(write_filename,"wb");
             }
 
             if (fout==NULL)
@@ -409,11 +467,11 @@ int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
     const char* password;
 {
     uLong i;
-    unz_global_info gi;
+    unz_global_info64 gi;
     int err;
     FILE* fout=NULL;
 
-    err = unzGetGlobalInfo (uf,&gi);
+    err = unzGetGlobalInfo64(uf,&gi);
     if (err!=UNZ_OK)
         printf("error %d with zipfile in unzGetGlobalInfo \n",err);
 
@@ -470,6 +528,7 @@ int main(argc,argv)
     const char *password=NULL;
     char filename_try[MAXFILENAME+16] = "";
     int i;
+    int ret_value=0;
     int opt_do_list=0;
     int opt_do_extract=1;
     int opt_do_extract_withoutpath=0;
@@ -532,7 +591,7 @@ int main(argc,argv)
     {
 
 #        ifdef USEWIN32IOAPI
-        zlib_filefunc_def ffunc;
+        zlib_filefunc64_def ffunc;
 #        endif
 
         strncpy(filename_try, zipfilename,MAXFILENAME-1);
@@ -540,18 +599,18 @@ int main(argc,argv)
         filename_try[ MAXFILENAME ] = '\0';
 
 #        ifdef USEWIN32IOAPI
-        fill_win32_filefunc(&ffunc);
-        uf = unzOpen2(zipfilename,&ffunc);
+        fill_win32_filefunc64A(&ffunc);
+        uf = unzOpen2_64(zipfilename,&ffunc);
 #        else
-        uf = unzOpen(zipfilename);
+        uf = unzOpen64(zipfilename);
 #        endif
         if (uf==NULL)
         {
             strcat(filename_try,".zip");
 #            ifdef USEWIN32IOAPI
-            uf = unzOpen2(filename_try,&ffunc);
+            uf = unzOpen2_64(filename_try,&ffunc);
 #            else
-            uf = unzOpen(filename_try);
+            uf = unzOpen64(filename_try);
 #            endif
         }
     }
@@ -564,22 +623,26 @@ int main(argc,argv)
     printf("%s opened\n",filename_try);
 
     if (opt_do_list==1)
-        return do_list(uf);
+        ret_value = do_list(uf);
     else if (opt_do_extract==1)
     {
-        if (opt_extractdir && chdir(dirname)) 
+#ifdef _WIN32
+        if (opt_extractdir && _chdir(dirname))
+#else
+        if (opt_extractdir && chdir(dirname))
+#endif
         {
           printf("Error changing into %s, aborting\n", dirname);
           exit(-1);
         }
 
         if (filename_to_extract == NULL)
-            return do_extract(uf,opt_do_extract_withoutpath,opt_overwrite,password);
+            ret_value = do_extract(uf, opt_do_extract_withoutpath, opt_overwrite, password);
         else
-            return do_extract_onefile(uf,filename_to_extract,
-                                      opt_do_extract_withoutpath,opt_overwrite,password);
+            ret_value = do_extract_onefile(uf, filename_to_extract, opt_do_extract_withoutpath, opt_overwrite, password);
     }
-    unzCloseCurrentFile(uf);
 
-    return 0;
+    unzClose(uf);
+
+    return ret_value;
 }
diff --git a/libsrc/zlib/contrib/minizip/minizip.c b/libsrc/zlib/contrib/minizip/minizip.c
index f2dfecd..7a4fa5a 100644
--- a/libsrc/zlib/contrib/minizip/minizip.c
+++ b/libsrc/zlib/contrib/minizip/minizip.c
@@ -1,10 +1,33 @@
 /*
    minizip.c
-   Version 1.01e, February 12th, 2005
+   Version 1.1, February 14h, 2010
+   sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+         Modifications of Unzip for Zip64
+         Copyright (C) 2007-2008 Even Rouault
+
+         Modifications for Zip64 support on both zip and unzip
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 */
 
+
+#ifndef _WIN32
+        #ifndef __USE_FILE_OFFSET64
+                #define __USE_FILE_OFFSET64
+        #endif
+        #ifndef __USE_LARGEFILE64
+                #define __USE_LARGEFILE64
+        #endif
+        #ifndef _LARGEFILE64_SOURCE
+                #define _LARGEFILE64_SOURCE
+        #endif
+        #ifndef _FILE_OFFSET_BIT
+                #define _FILE_OFFSET_BIT 64
+        #endif
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -24,9 +47,9 @@
 
 #include "zip.h"
 
-#ifdef WIN32
-#define USEWIN32IOAPI
-#include "iowin32.h"
+#ifdef _WIN32
+        #define USEWIN32IOAPI
+        #include "iowin32.h"
 #endif
 
 
@@ -34,7 +57,7 @@
 #define WRITEBUFFERSIZE (16384)
 #define MAXFILENAME (256)
 
-#ifdef WIN32
+#ifdef _WIN32
 uLong filetime(f, tmzip, dt)
     char *f;                /* name of file to get info on */
     tm_zip *tmzip;             /* return value: access, modific. and creation times */
@@ -44,9 +67,9 @@ uLong filetime(f, tmzip, dt)
   {
       FILETIME ftLocal;
       HANDLE hFind;
-      WIN32_FIND_DATA  ff32;
+      WIN32_FIND_DATAA ff32;
 
-      hFind = FindFirstFile(f,&ff32);
+      hFind = FindFirstFileA(f,&ff32);
       if (hFind != INVALID_HANDLE_VALUE)
       {
         FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
@@ -119,7 +142,7 @@ int check_exist_file(filename)
 {
     FILE* ftestexist;
     int ret = 1;
-    ftestexist = fopen(filename,"rb");
+    ftestexist = fopen64(filename,"rb");
     if (ftestexist==NULL)
         ret = 0;
     else
@@ -129,18 +152,19 @@ int check_exist_file(filename)
 
 void do_banner()
 {
-    printf("MiniZip 1.01b, demo of zLib + Zip package written by Gilles Vollant\n");
-    printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
+    printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n");
+    printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n");
 }
 
 void do_help()
 {
-    printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] file.zip [files_to_add]\n\n" \
+    printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \
            "  -o  Overwrite existing file.zip\n" \
            "  -a  Append to existing file.zip\n" \
            "  -0  Store only\n" \
            "  -1  Compress faster\n" \
-           "  -9  Compress better\n\n");
+           "  -9  Compress better\n\n" \
+           "  -j  exclude path. store only the file name.\n\n");
 }
 
 /* calculate the CRC32 of a file,
@@ -149,7 +173,7 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne
 {
    unsigned long calculate_crc=0;
    int err=ZIP_OK;
-   FILE * fin = fopen(filenameinzip,"rb");
+   FILE * fin = fopen64(filenameinzip,"rb");
    unsigned long size_read = 0;
    unsigned long total_read = 0;
    if (fin==NULL)
@@ -179,10 +203,33 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne
         fclose(fin);
 
     *result_crc=calculate_crc;
-    printf("file %s crc %x\n",filenameinzip,calculate_crc);
+    printf("file %s crc %lx\n", filenameinzip, calculate_crc);
     return err;
 }
 
+int isLargeFile(const char* filename)
+{
+  int largeFile = 0;
+  ZPOS64_T pos = 0;
+  FILE* pFile = fopen64(filename, "rb");
+
+  if(pFile != NULL)
+  {
+    int n = fseeko64(pFile, 0, SEEK_END);
+
+    pos = ftello64(pFile);
+
+                printf("File : %s is %lld bytes\n", filename, pos);
+
+    if(pos >= 0xffffffff)
+     largeFile = 1;
+
+                fclose(pFile);
+  }
+
+ return largeFile;
+}
+
 int main(argc,argv)
     int argc;
     char *argv[];
@@ -190,6 +237,7 @@ int main(argc,argv)
     int i;
     int opt_overwrite=0;
     int opt_compress_level=Z_DEFAULT_COMPRESSION;
+    int opt_exclude_path=0;
     int zipfilenamearg = 0;
     char filename_try[MAXFILENAME+16];
     int zipok;
@@ -222,6 +270,8 @@ int main(argc,argv)
                         opt_overwrite = 2;
                     if ((c>='0') && (c<='9'))
                         opt_compress_level = c-'0';
+                    if ((c=='j') || (c=='J'))
+                        opt_exclude_path = 1;
 
                     if (((c=='p') || (c=='P')) && (i+1<argc))
                     {
@@ -231,8 +281,12 @@ int main(argc,argv)
                 }
             }
             else
+            {
                 if (zipfilenamearg == 0)
+                {
                     zipfilenamearg = i ;
+                }
+            }
         }
     }
 
@@ -245,7 +299,9 @@ int main(argc,argv)
     }
 
     if (zipfilenamearg==0)
+    {
         zipok=0;
+    }
     else
     {
         int i,len;
@@ -302,11 +358,11 @@ int main(argc,argv)
         zipFile zf;
         int errclose;
 #        ifdef USEWIN32IOAPI
-        zlib_filefunc_def ffunc;
-        fill_win32_filefunc(&ffunc);
-        zf = zipOpen2(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
+        zlib_filefunc64_def ffunc;
+        fill_win32_filefunc64A(&ffunc);
+        zf = zipOpen2_64(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
 #        else
-        zf = zipOpen(filename_try,(opt_overwrite==2) ? 2 : 0);
+        zf = zipOpen64(filename_try,(opt_overwrite==2) ? 2 : 0);
 #        endif
 
         if (zf == NULL)
@@ -329,8 +385,10 @@ int main(argc,argv)
                 FILE * fin;
                 int size_read;
                 const char* filenameinzip = argv[i];
+                const char *savefilenameinzip;
                 zip_fileinfo zi;
                 unsigned long crcFile=0;
+                int zip64 = 0;
 
                 zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
                 zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
@@ -348,19 +406,48 @@ int main(argc,argv)
                 if ((password != NULL) && (err==ZIP_OK))
                     err = getFileCrc(filenameinzip,buf,size_buf,&crcFile);
 
-                err = zipOpenNewFileInZip3(zf,filenameinzip,&zi,
+                zip64 = isLargeFile(filenameinzip);
+
+                                                         /* The path name saved, should not include a leading slash. */
+               /*if it did, windows/xp and dynazip couldn't read the zip file. */
+                 savefilenameinzip = filenameinzip;
+                 while( savefilenameinzip[0] == '\\' || savefilenameinzip[0] == '/' )
+                 {
+                     savefilenameinzip++;
+                 }
+
+                 /*should the zip file contain any path at all?*/
+                 if( opt_exclude_path )
+                 {
+                     const char *tmpptr;
+                     const char *lastslash = 0;
+                     for( tmpptr = savefilenameinzip; *tmpptr; tmpptr++)
+                     {
+                         if( *tmpptr == '\\' || *tmpptr == '/')
+                         {
+                             lastslash = tmpptr;
+                         }
+                     }
+                     if( lastslash != NULL )
+                     {
+                         savefilenameinzip = lastslash+1; // base filename follows last slash.
+                     }
+                 }
+
+                 /**/
+                err = zipOpenNewFileInZip3_64(zf,savefilenameinzip,&zi,
                                  NULL,0,NULL,0,NULL /* comment*/,
                                  (opt_compress_level != 0) ? Z_DEFLATED : 0,
                                  opt_compress_level,0,
                                  /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */
                                  -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
-                                 password,crcFile);
+                                 password,crcFile, zip64);
 
                 if (err != ZIP_OK)
                     printf("error in opening %s in zipfile\n",filenameinzip);
                 else
                 {
-                    fin = fopen(filenameinzip,"rb");
+                    fin = fopen64(filenameinzip,"rb");
                     if (fin==NULL)
                     {
                         err=ZIP_ERRNO;
diff --git a/libsrc/zlib/contrib/minizip/mztools.c b/libsrc/zlib/contrib/minizip/mztools.c
index 8a50ee4..f9092e6 100644
--- a/libsrc/zlib/contrib/minizip/mztools.c
+++ b/libsrc/zlib/contrib/minizip/mztools.c
@@ -62,7 +62,7 @@ uLong* bytesRecovered;
         unsigned int fnsize = READ_16(header + 26); /* file name length */
         unsigned int extsize = READ_16(header + 28); /* extra field length */
         filename[0] = extra[0] = '\0';
-        
+
         /* Header */
         if (fwrite(header, 1, 30, fpOut) == 30) {
           offset += 30;
@@ -70,7 +70,7 @@ uLong* bytesRecovered;
           err = Z_ERRNO;
           break;
         }
-        
+
         /* Filename */
         if (fnsize > 0) {
           if (fread(filename, 1, fnsize, fpZip) == fnsize) {
@@ -103,7 +103,7 @@ uLong* bytesRecovered;
             break;
           }
         }
-        
+
         /* Data */
         {
           int dataSize = cpsize;
@@ -133,7 +133,7 @@ uLong* bytesRecovered;
             }
           }
         }
-        
+
         /* Central directory entry */
         {
           char header[46];
@@ -159,7 +159,7 @@ uLong* bytesRecovered;
           /* Header */
           if (fwrite(header, 1, 46, fpOutCD) == 46) {
             offsetCD += 46;
-            
+
             /* Filename */
             if (fnsize > 0) {
               if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
@@ -172,7 +172,7 @@ uLong* bytesRecovered;
               err = Z_STREAM_ERROR;
               break;
             }
-            
+
             /* Extra field */
             if (extsize > 0) {
               if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
@@ -182,7 +182,7 @@ uLong* bytesRecovered;
                 break;
               }
             }
-            
+
             /* Comment field */
             if (comsize > 0) {
               if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
@@ -192,8 +192,8 @@ uLong* bytesRecovered;
                 break;
               }
             }
-            
-            
+
+
           } else {
             err = Z_ERRNO;
             break;
@@ -225,17 +225,17 @@ uLong* bytesRecovered;
       WRITE_32(header + 12, offsetCD);    /* size of CD */
       WRITE_32(header + 16, offset);      /* offset to CD */
       WRITE_16(header + 20, comsize);     /* comment */
-      
+
       /* Header */
       if (fwrite(header, 1, 22, fpOutCD) == 22) {
-        
+
         /* Comment field */
         if (comsize > 0) {
           if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {
             err = Z_ERRNO;
           }
         }
-        
+
       } else {
         err = Z_ERRNO;
       }
@@ -257,14 +257,14 @@ uLong* bytesRecovered;
         fclose(fpOutCD);
       }
     }
-    
+
     /* Close */
     fclose(fpZip);
     fclose(fpOut);
-    
+
     /* Wipe temporary file */
     (void)remove(fileOutTmp);
-    
+
     /* Number of recovered entries */
     if (err == Z_OK) {
       if (nRecovered != NULL) {
diff --git a/libsrc/zlib/contrib/minizip/mztools.h b/libsrc/zlib/contrib/minizip/mztools.h
index eee78dc..88b3459 100644
--- a/libsrc/zlib/contrib/minizip/mztools.h
+++ b/libsrc/zlib/contrib/minizip/mztools.h
@@ -17,14 +17,14 @@ extern "C" {
 
 #include "unzip.h"
 
-/* Repair a ZIP file (missing central directory) 
+/* Repair a ZIP file (missing central directory)
    file: file to recover
    fileOut: output file after recovery
    fileOutTmp: temporary file name used for recovery
 */
-extern int ZEXPORT unzRepair(const char* file, 
-                             const char* fileOut, 
-                             const char* fileOutTmp, 
+extern int ZEXPORT unzRepair(const char* file,
+                             const char* fileOut,
+                             const char* fileOutTmp,
                              uLong* nRecovered,
                              uLong* bytesRecovered);
 
diff --git a/libsrc/zlib/contrib/minizip/unzip.c b/libsrc/zlib/contrib/minizip/unzip.c
index 9ad4766..7617f41 100644
--- a/libsrc/zlib/contrib/minizip/unzip.c
+++ b/libsrc/zlib/contrib/minizip/unzip.c
@@ -1,43 +1,77 @@
 /* unzip.c -- IO for uncompress .zip files using zlib
-   Version 1.01e, February 12th, 2005
+   Version 1.1, February 14h, 2010
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Read unzip.h for more info
-*/
+         Modifications of Unzip for Zip64
+         Copyright (C) 2007-2008 Even Rouault
+
+         Modifications for Zip64 support on both zip and unzip
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+         For more info read MiniZip_info.txt
+
+
+  ------------------------------------------------------------------------------------
+  Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
+  compatibility with older software. The following is from the original crypt.c.
+  Code woven in by Terry Thorsen 1/2003.
 
-/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
-compatibility with older software. The following is from the original crypt.c. Code
-woven in by Terry Thorsen 1/2003.
-*/
-/*
   Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.
 
   See the accompanying file LICENSE, version 2000-Apr-09 or later
   (the contents of which are also included in zip.h) for terms of use.
   If, for some reason, all these files are missing, the Info-ZIP license
   also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
-*/
-/*
-  crypt.c (full version) by Info-ZIP.      Last revised:  [see crypt.h]
+
+        crypt.c (full version) by Info-ZIP.      Last revised:  [see crypt.h]
 
   The encryption/decryption parts of this source code (as opposed to the
   non-echoing password parts) were originally written in Europe.  The
   whole source package can be freely distributed, including from the USA.
   (Prior to January 2000, re-export from the US was a violation of US law.)
- */
 
-/*
-  This encryption code is a direct transcription of the algorithm from
+        This encryption code is a direct transcription of the algorithm from
   Roger Schlafly, described by Phil Katz in the file appnote.txt.  This
   file (appnote.txt) is distributed with the PKZIP program (even in the
   version without encryption capabilities).
- */
+
+        ------------------------------------------------------------------------------------
+
+        Changes in unzip.c
+
+        2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos
+  2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz*
+  2007-2008 - Even Rouault - Remove old C style function prototypes
+  2007-2008 - Even Rouault - Add unzip support for ZIP64
+
+        Copyright (C) 2007-2008 Even Rouault
+
+
+        Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again).
+  Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G
+                                should only read the compressed/uncompressed size from the Zip64 format if
+                                the size from normal header was 0xFFFFFFFF
+  Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant
+        Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required)
+                                Patch created by Daniel Borca
+
+  Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
+
+  Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson
+
+*/
 
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#ifndef NOUNCRYPT
+        #define NOUNCRYPT
+#endif
+
 #include "zlib.h"
 #include "unzip.h"
 
@@ -85,16 +119,14 @@ woven in by Terry Thorsen 1/2003.
 #define SIZEZIPLOCALHEADER (0x1e)
 
 
-
-
 const char unz_copyright[] =
    " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
 
 /* unz_file_info_interntal contain internal info about a file in zipfile*/
-typedef struct unz_file_info_internal_s
+typedef struct unz_file_info64_internal_s
 {
-    uLong offset_curfile;/* relative offset of local header 4 bytes */
-} unz_file_info_internal;
+    ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */
+} unz_file_info64_internal;
 
 
 /* file_in_zip_read_info_s contain internal information about a file in zipfile,
@@ -104,52 +136,61 @@ typedef struct
     char  *read_buffer;         /* internal buffer for compressed data */
     z_stream stream;            /* zLib stream structure for inflate */
 
-    uLong pos_in_zipfile;       /* position in byte on the zipfile, for fseek*/
+#ifdef HAVE_BZIP2
+    bz_stream bstream;          /* bzLib stream structure for bziped */
+#endif
+
+    ZPOS64_T pos_in_zipfile;       /* position in byte on the zipfile, for fseek*/
     uLong stream_initialised;   /* flag set if stream structure is initialised*/
 
-    uLong offset_local_extrafield;/* offset of the local extra field */
+    ZPOS64_T offset_local_extrafield;/* offset of the local extra field */
     uInt  size_local_extrafield;/* size of the local extra field */
-    uLong pos_local_extrafield;   /* position in the local extra field in read*/
+    ZPOS64_T pos_local_extrafield;   /* position in the local extra field in read*/
+    ZPOS64_T total_out_64;
 
     uLong crc32;                /* crc32 of all data uncompressed */
     uLong crc32_wait;           /* crc32 we must obtain after decompress all */
-    uLong rest_read_compressed; /* number of byte to be decompressed */
-    uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
-    zlib_filefunc_def z_filefunc;
+    ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */
+    ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/
+    zlib_filefunc64_32_def z_filefunc;
     voidpf filestream;        /* io structore of the zipfile */
     uLong compression_method;   /* compression method (0==store) */
-    uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+    ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
     int   raw;
-} file_in_zip_read_info_s;
+} file_in_zip64_read_info_s;
 
 
-/* unz_s contain internal information about the zipfile
+/* unz64_s contain internal information about the zipfile
 */
 typedef struct
 {
-    zlib_filefunc_def z_filefunc;
+    zlib_filefunc64_32_def z_filefunc;
+    int is64bitOpenFunction;
     voidpf filestream;        /* io structore of the zipfile */
-    unz_global_info gi;       /* public global information */
-    uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-    uLong num_file;             /* number of the current file in the zipfile*/
-    uLong pos_in_central_dir;   /* pos of the current file in the central dir*/
-    uLong current_file_ok;      /* flag about the usability of the current file*/
-    uLong central_pos;          /* position of the beginning of the central dir*/
-
-    uLong size_central_dir;     /* size of the central directory  */
-    uLong offset_central_dir;   /* offset of start of central directory with
+    unz_global_info64 gi;       /* public global information */
+    ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+    ZPOS64_T num_file;             /* number of the current file in the zipfile*/
+    ZPOS64_T pos_in_central_dir;   /* pos of the current file in the central dir*/
+    ZPOS64_T current_file_ok;      /* flag about the usability of the current file*/
+    ZPOS64_T central_pos;          /* position of the beginning of the central dir*/
+
+    ZPOS64_T size_central_dir;     /* size of the central directory  */
+    ZPOS64_T offset_central_dir;   /* offset of start of central directory with
                                    respect to the starting disk number */
 
-    unz_file_info cur_file_info; /* public info about the current file in zip*/
-    unz_file_info_internal cur_file_info_internal; /* private info about it*/
-    file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
+    unz_file_info64 cur_file_info; /* public info about the current file in zip*/
+    unz_file_info64_internal cur_file_info_internal; /* private info about it*/
+    file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current
                                         file if we are decompressing it */
     int encrypted;
+
+    int isZip64;
+
 #    ifndef NOUNCRYPT
     unsigned long keys[3];     /* keys defining the pseudo-random sequence */
     const unsigned long* pcrc_32_tab;
 #    endif
-} unz_s;
+} unz64_s;
 
 
 #ifndef NOUNCRYPT
@@ -163,18 +204,15 @@ typedef struct
 */
 
 
-local int unzlocal_getByte OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
+local int unz64local_getByte OF((
+    const zlib_filefunc64_32_def* pzlib_filefunc_def,
     voidpf filestream,
     int *pi));
 
-local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    int *pi;
+local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)
 {
     unsigned char c;
-    int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
+    int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
     if (err==1)
     {
         *pi = (int)c;
@@ -182,7 +220,7 @@ local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
     }
     else
     {
-        if (ZERROR(*pzlib_filefunc_def,filestream))
+        if (ZERROR64(*pzlib_filefunc_def,filestream))
             return UNZ_ERRNO;
         else
             return UNZ_EOF;
@@ -193,26 +231,25 @@ local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
 /* ===========================================================================
    Reads a long in LSB order from the given gz_stream. Sets
 */
-local int unzlocal_getShort OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
+local int unz64local_getShort OF((
+    const zlib_filefunc64_32_def* pzlib_filefunc_def,
     voidpf filestream,
     uLong *pX));
 
-local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
+local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def,
+                             voidpf filestream,
+                             uLong *pX)
 {
     uLong x ;
-    int i;
+    int i = 0;
     int err;
 
-    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+    err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
     x = (uLong)i;
 
     if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((uLong)i)<<8;
 
     if (err==UNZ_OK)
         *pX = x;
@@ -221,33 +258,32 @@ local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
     return err;
 }
 
-local int unzlocal_getLong OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
+local int unz64local_getLong OF((
+    const zlib_filefunc64_32_def* pzlib_filefunc_def,
     voidpf filestream,
     uLong *pX));
 
-local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
+local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def,
+                            voidpf filestream,
+                            uLong *pX)
 {
     uLong x ;
-    int i;
+    int i = 0;
     int err;
 
-    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+    err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
     x = (uLong)i;
 
     if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((uLong)i)<<8;
 
     if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<16;
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((uLong)i)<<16;
 
     if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
     x += ((uLong)i)<<24;
 
     if (err==UNZ_OK)
@@ -257,11 +293,60 @@ local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
     return err;
 }
 
+local int unz64local_getLong64 OF((
+    const zlib_filefunc64_32_def* pzlib_filefunc_def,
+    voidpf filestream,
+    ZPOS64_T *pX));
+
+
+local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def,
+                            voidpf filestream,
+                            ZPOS64_T *pX)
+{
+    ZPOS64_T x ;
+    int i = 0;
+    int err;
+
+    err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x = (ZPOS64_T)i;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<8;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<16;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<24;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<32;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<40;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<48;
+
+    if (err==UNZ_OK)
+        err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
+    x |= ((ZPOS64_T)i)<<56;
+
+    if (err==UNZ_OK)
+        *pX = x;
+    else
+        *pX = 0;
+    return err;
+}
 
 /* My own strcmpi / strcasecmp */
-local int strcmpcasenosensitive_internal (fileName1,fileName2)
-    const char* fileName1;
-    const char* fileName2;
+local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2)
 {
     for (;;)
     {
@@ -302,10 +387,10 @@ local int strcmpcasenosensitive_internal (fileName1,fileName2)
         (like 1 on Unix, 2 on Windows)
 
 */
-extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
-    const char* fileName1;
-    const char* fileName2;
-    int iCaseSensitivity;
+extern int ZEXPORT unzStringFileNameCompare (const char*  fileName1,
+                                                 const char*  fileName2,
+                                                 int iCaseSensitivity)
+
 {
     if (iCaseSensitivity==0)
         iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
@@ -324,25 +409,20 @@ extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivit
   Locate the Central directory of a zipfile (at the end, just before
     the global comment)
 */
-local uLong unzlocal_SearchCentralDir OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream));
-
-local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
+local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
+local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
 {
     unsigned char* buf;
-    uLong uSizeFile;
-    uLong uBackRead;
-    uLong uMaxBack=0xffff; /* maximum size of global comment */
-    uLong uPosFound=0;
+    ZPOS64_T uSizeFile;
+    ZPOS64_T uBackRead;
+    ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+    ZPOS64_T uPosFound=0;
 
-    if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+    if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
         return 0;
 
 
-    uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
+    uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
 
     if (uMaxBack>uSizeFile)
         uMaxBack = uSizeFile;
@@ -354,7 +434,8 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
     uBackRead = 4;
     while (uBackRead<uMaxBack)
     {
-        uLong uReadSize,uReadPos ;
+        uLong uReadSize;
+        ZPOS64_T uReadPos ;
         int i;
         if (uBackRead+BUFREADCOMMENT>uMaxBack)
             uBackRead = uMaxBack;
@@ -363,11 +444,11 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
         uReadPos = uSizeFile-uBackRead ;
 
         uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-        if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+                     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+        if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
             break;
 
-        if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+        if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
             break;
 
         for (i=(int)uReadSize-3; (i--)>0;)
@@ -385,6 +466,112 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
     return uPosFound;
 }
 
+
+/*
+  Locate the Central directory 64 of a zipfile (at the end, just before
+    the global comment)
+*/
+local ZPOS64_T unz64local_SearchCentralDir64 OF((
+    const zlib_filefunc64_32_def* pzlib_filefunc_def,
+    voidpf filestream));
+
+local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def,
+                                      voidpf filestream)
+{
+    unsigned char* buf;
+    ZPOS64_T uSizeFile;
+    ZPOS64_T uBackRead;
+    ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+    ZPOS64_T uPosFound=0;
+    uLong uL;
+                ZPOS64_T relativeOffset;
+
+    if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+        return 0;
+
+
+    uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
+
+    if (uMaxBack>uSizeFile)
+        uMaxBack = uSizeFile;
+
+    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+    if (buf==NULL)
+        return 0;
+
+    uBackRead = 4;
+    while (uBackRead<uMaxBack)
+    {
+        uLong uReadSize;
+        ZPOS64_T uReadPos;
+        int i;
+        if (uBackRead+BUFREADCOMMENT>uMaxBack)
+            uBackRead = uMaxBack;
+        else
+            uBackRead+=BUFREADCOMMENT;
+        uReadPos = uSizeFile-uBackRead ;
+
+        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+                     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+        if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+            break;
+
+        if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+            break;
+
+        for (i=(int)uReadSize-3; (i--)>0;)
+            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+                ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
+            {
+                uPosFound = uReadPos+i;
+                break;
+            }
+
+        if (uPosFound!=0)
+            break;
+    }
+    TRYFREE(buf);
+    if (uPosFound == 0)
+        return 0;
+
+    /* Zip64 end of central directory locator */
+    if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
+        return 0;
+
+    /* the signature, already checked */
+    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+        return 0;
+
+    /* number of the disk with the start of the zip64 end of  central directory */
+    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+        return 0;
+    if (uL != 0)
+        return 0;
+
+    /* relative offset of the zip64 end of central directory record */
+    if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK)
+        return 0;
+
+    /* total number of disks */
+    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+        return 0;
+    if (uL != 1)
+        return 0;
+
+    /* Goto end of central directory record */
+    if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
+        return 0;
+
+     /* the signature */
+    if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
+        return 0;
+
+    if (uL != 0x06064b50)
+        return 0;
+
+    return relativeOffset;
+}
+
 /*
   Open a Zip file. path contain the full pathname (by example,
      on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
@@ -394,19 +581,20 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
      Else, the return value is a unzFile Handle, usable with other function
        of this unzip package.
 */
-extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
-    const char *path;
-    zlib_filefunc_def* pzlib_filefunc_def;
+local unzFile unzOpenInternal (const void *path,
+                               zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
+                               int is64bitOpenFunction)
 {
-    unz_s us;
-    unz_s *s;
-    uLong central_pos,uL;
+    unz64_s us;
+    unz64_s *s;
+    ZPOS64_T central_pos;
+    uLong   uL;
 
     uLong number_disk;          /* number of the current dist, used for
                                    spaning ZIP, unsupported, always 0*/
     uLong number_disk_with_CD;  /* number the the disk with central dir, used
                                    for spaning ZIP, unsupported, always 0*/
-    uLong number_entry_CD;      /* total number of entries in
+    ZPOS64_T number_entry_CD;      /* total number of entries in
                                    the central dir
                                    (same than number_entry on nospan) */
 
@@ -415,63 +603,137 @@ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
     if (unz_copyright[0]!=' ')
         return NULL;
 
-    if (pzlib_filefunc_def==NULL)
-        fill_fopen_filefunc(&us.z_filefunc);
+    us.z_filefunc.zseek32_file = NULL;
+    us.z_filefunc.ztell32_file = NULL;
+    if (pzlib_filefunc64_32_def==NULL)
+        fill_fopen64_filefunc(&us.z_filefunc.zfile_func64);
     else
-        us.z_filefunc = *pzlib_filefunc_def;
+        us.z_filefunc = *pzlib_filefunc64_32_def;
+    us.is64bitOpenFunction = is64bitOpenFunction;
 
-    us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
+
+
+    us.filestream = ZOPEN64(us.z_filefunc,
                                                  path,
                                                  ZLIB_FILEFUNC_MODE_READ |
                                                  ZLIB_FILEFUNC_MODE_EXISTING);
     if (us.filestream==NULL)
         return NULL;
 
-    central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
-    if (central_pos==0)
-        err=UNZ_ERRNO;
+    central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream);
+    if (central_pos)
+    {
+        uLong uS;
+        ZPOS64_T uL64;
+
+        us.isZip64 = 1;
 
-    if (ZSEEK(us.z_filefunc, us.filestream,
+        if (ZSEEK64(us.z_filefunc, us.filestream,
                                       central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
         err=UNZ_ERRNO;
 
-    /* the signature, already checked */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        /* the signature, already checked */
+        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* number of this disk */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        /* size of zip64 end of central directory record */
+        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* number of the disk with the start of the central directory */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        /* version made by */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* total number of entries in the central dir on this disk */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        /* version needed to extract */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* total number of entries in the central dir */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        /* number of this disk */
+        if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    if ((number_entry_CD!=us.gi.number_entry) ||
-        (number_disk_with_CD!=0) ||
-        (number_disk!=0))
-        err=UNZ_BADZIPFILE;
+        /* number of the disk with the start of the central directory */
+        if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* size of the central directory */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        /* total number of entries in the central directory on this disk */
+        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
+            err=UNZ_ERRNO;
+
+        /* total number of entries in the central directory */
+        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* offset of start of central directory with respect to the
+        if ((number_entry_CD!=us.gi.number_entry) ||
+            (number_disk_with_CD!=0) ||
+            (number_disk!=0))
+            err=UNZ_BADZIPFILE;
+
+        /* size of the central directory */
+        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
+            err=UNZ_ERRNO;
+
+        /* offset of start of central directory with respect to the
           starting disk number */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
+            err=UNZ_ERRNO;
 
-    /* zipfile comment length */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
-        err=UNZ_ERRNO;
+        us.gi.size_comment = 0;
+    }
+    else
+    {
+        central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream);
+        if (central_pos==0)
+            err=UNZ_ERRNO;
+
+        us.isZip64 = 0;
+
+        if (ZSEEK64(us.z_filefunc, us.filestream,
+                                        central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+            err=UNZ_ERRNO;
+
+        /* the signature, already checked */
+        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+            err=UNZ_ERRNO;
+
+        /* number of this disk */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
+            err=UNZ_ERRNO;
+
+        /* number of the disk with the start of the central directory */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
+            err=UNZ_ERRNO;
+
+        /* total number of entries in the central dir on this disk */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+            err=UNZ_ERRNO;
+        us.gi.number_entry = uL;
+
+        /* total number of entries in the central dir */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+            err=UNZ_ERRNO;
+        number_entry_CD = uL;
+
+        if ((number_entry_CD!=us.gi.number_entry) ||
+            (number_disk_with_CD!=0) ||
+            (number_disk!=0))
+            err=UNZ_BADZIPFILE;
+
+        /* size of the central directory */
+        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+            err=UNZ_ERRNO;
+        us.size_central_dir = uL;
+
+        /* offset of start of central directory with respect to the
+            starting disk number */
+        if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+            err=UNZ_ERRNO;
+        us.offset_central_dir = uL;
+
+        /* zipfile comment length */
+        if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
+            err=UNZ_ERRNO;
+    }
 
     if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
         (err==UNZ_OK))
@@ -479,7 +741,7 @@ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
 
     if (err!=UNZ_OK)
     {
-        ZCLOSE(us.z_filefunc, us.filestream);
+        ZCLOSE64(us.z_filefunc, us.filestream);
         return NULL;
     }
 
@@ -490,17 +752,52 @@ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
     us.encrypted = 0;
 
 
-    s=(unz_s*)ALLOC(sizeof(unz_s));
-    *s=us;
-    unzGoToFirstFile((unzFile)s);
+    s=(unz64_s*)ALLOC(sizeof(unz64_s));
+    if( s != NULL)
+    {
+        *s=us;
+        unzGoToFirstFile((unzFile)s);
+    }
     return (unzFile)s;
 }
 
 
-extern unzFile ZEXPORT unzOpen (path)
-    const char *path;
+extern unzFile ZEXPORT unzOpen2 (const char *path,
+                                        zlib_filefunc_def* pzlib_filefunc32_def)
 {
-    return unzOpen2(path, NULL);
+    if (pzlib_filefunc32_def != NULL)
+    {
+        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+        fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
+        return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 0);
+    }
+    else
+        return unzOpenInternal(path, NULL, 0);
+}
+
+extern unzFile ZEXPORT unzOpen2_64 (const void *path,
+                                     zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    if (pzlib_filefunc_def != NULL)
+    {
+        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+        zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
+        zlib_filefunc64_32_def_fill.ztell32_file = NULL;
+        zlib_filefunc64_32_def_fill.zseek32_file = NULL;
+        return unzOpenInternal(path, &zlib_filefunc64_32_def_fill, 1);
+    }
+    else
+        return unzOpenInternal(path, NULL, 1);
+}
+
+extern unzFile ZEXPORT unzOpen (const char *path)
+{
+    return unzOpenInternal(path, NULL, 0);
+}
+
+extern unzFile ZEXPORT unzOpen64 (const void *path)
+{
+    return unzOpenInternal(path, NULL, 1);
 }
 
 /*
@@ -508,18 +805,17 @@ extern unzFile ZEXPORT unzOpen (path)
   If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
     these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
   return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzClose (file)
-    unzFile file;
+extern int ZEXPORT unzClose (unzFile file)
 {
-    unz_s* s;
+    unz64_s* s;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
 
     if (s->pfile_in_zip_read!=NULL)
         unzCloseCurrentFile(file);
 
-    ZCLOSE(s->z_filefunc, s->filestream);
+    ZCLOSE64(s->z_filefunc, s->filestream);
     TRYFREE(s);
     return UNZ_OK;
 }
@@ -529,28 +825,34 @@ extern int ZEXPORT unzClose (file)
   Write info about the ZipFile in the *pglobal_info structure.
   No preparation of the structure is needed
   return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
-    unzFile file;
-    unz_global_info *pglobal_info;
+extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info)
 {
-    unz_s* s;
+    unz64_s* s;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     *pglobal_info=s->gi;
     return UNZ_OK;
 }
 
-
+extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32)
+{
+    unz64_s* s;
+    if (file==NULL)
+        return UNZ_PARAMERROR;
+    s=(unz64_s*)file;
+    /* to do : check if number_entry is not truncated */
+    pglobal_info32->number_entry = (uLong)s->gi.number_entry;
+    pglobal_info32->size_comment = s->gi.size_comment;
+    return UNZ_OK;
+}
 /*
    Translate date/time from Dos format to tm_unz (readable more easilty)
 */
-local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
-    uLong ulDosDate;
-    tm_unz* ptm;
+local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)
 {
-    uLong uDate;
-    uDate = (uLong)(ulDosDate>>16);
+    ZPOS64_T uDate;
+    uDate = (ZPOS64_T)(ulDosDate>>16);
     ptm->tm_mday = (uInt)(uDate&0x1f) ;
     ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;
     ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
@@ -563,9 +865,9 @@ local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
 /*
   Get Info about the current file in the zipfile, with internal only info
 */
-local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
-                                                  unz_file_info *pfile_info,
-                                                  unz_file_info_internal
+local int unz64local_GetCurrentFileInfoInternal OF((unzFile file,
+                                                  unz_file_info64 *pfile_info,
+                                                  unz_file_info64_internal
                                                   *pfile_info_internal,
                                                   char *szFileName,
                                                   uLong fileNameBufferSize,
@@ -574,33 +876,29 @@ local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
                                                   char *szComment,
                                                   uLong commentBufferSize));
 
-local int unzlocal_GetCurrentFileInfoInternal (file,
-                                              pfile_info,
-                                              pfile_info_internal,
-                                              szFileName, fileNameBufferSize,
-                                              extraField, extraFieldBufferSize,
-                                              szComment,  commentBufferSize)
-    unzFile file;
-    unz_file_info *pfile_info;
-    unz_file_info_internal *pfile_info_internal;
-    char *szFileName;
-    uLong fileNameBufferSize;
-    void *extraField;
-    uLong extraFieldBufferSize;
-    char *szComment;
-    uLong commentBufferSize;
+local int unz64local_GetCurrentFileInfoInternal (unzFile file,
+                                                  unz_file_info64 *pfile_info,
+                                                  unz_file_info64_internal
+                                                  *pfile_info_internal,
+                                                  char *szFileName,
+                                                  uLong fileNameBufferSize,
+                                                  void *extraField,
+                                                  uLong extraFieldBufferSize,
+                                                  char *szComment,
+                                                  uLong commentBufferSize)
 {
-    unz_s* s;
-    unz_file_info file_info;
-    unz_file_info_internal file_info_internal;
+    unz64_s* s;
+    unz_file_info64 file_info;
+    unz_file_info64_internal file_info_internal;
     int err=UNZ_OK;
     uLong uMagic;
     long lSeek=0;
+    uLong uL;
 
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (ZSEEK(s->z_filefunc, s->filestream,
+    s=(unz64_s*)file;
+    if (ZSEEK64(s->z_filefunc, s->filestream,
               s->pos_in_central_dir+s->byte_before_the_zipfile,
               ZLIB_FILEFUNC_SEEK_SET)!=0)
         err=UNZ_ERRNO;
@@ -608,57 +906,63 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
 
     /* we check the magic */
     if (err==UNZ_OK)
-        if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+    {
+        if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
             err=UNZ_ERRNO;
         else if (uMagic!=0x02014b50)
             err=UNZ_BADZIPFILE;
+    }
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
+    unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
         err=UNZ_ERRNO;
+    file_info.compressed_size = uL;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
         err=UNZ_ERRNO;
+    file_info.uncompressed_size = uL;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
+                // relative offset of local header
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
         err=UNZ_ERRNO;
+    file_info_internal.offset_curfile = uL;
 
     lSeek+=file_info.size_filename;
     if ((err==UNZ_OK) && (szFileName!=NULL))
@@ -673,33 +977,105 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
             uSizeRead = fileNameBufferSize;
 
         if ((file_info.size_filename>0) && (fileNameBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
+            if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
                 err=UNZ_ERRNO;
         lSeek -= uSizeRead;
     }
 
-
+    // Read extrafield
     if ((err==UNZ_OK) && (extraField!=NULL))
     {
-        uLong uSizeRead ;
+        ZPOS64_T uSizeRead ;
         if (file_info.size_file_extra<extraFieldBufferSize)
             uSizeRead = file_info.size_file_extra;
         else
             uSizeRead = extraFieldBufferSize;
 
         if (lSeek!=0)
-            if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+        {
+            if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
                 lSeek=0;
             else
                 err=UNZ_ERRNO;
+        }
+
         if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
+            if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead)
                 err=UNZ_ERRNO;
-        lSeek += file_info.size_file_extra - uSizeRead;
+
+        lSeek += file_info.size_file_extra - (uLong)uSizeRead;
     }
     else
-        lSeek+=file_info.size_file_extra;
+        lSeek += file_info.size_file_extra;
+
+
+    if ((err==UNZ_OK) && (file_info.size_file_extra != 0))
+    {
+                                uLong acc = 0;
+
+        // since lSeek now points to after the extra field we need to move back
+        lSeek -= file_info.size_file_extra;
+
+        if (lSeek!=0)
+        {
+            if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+                lSeek=0;
+            else
+                err=UNZ_ERRNO;
+        }
 
+        while(acc < file_info.size_file_extra)
+        {
+            uLong headerId;
+                                                uLong dataSize;
+
+            if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK)
+                err=UNZ_ERRNO;
+
+            if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK)
+                err=UNZ_ERRNO;
+
+            /* ZIP64 extra fields */
+            if (headerId == 0x0001)
+            {
+                                                        uLong uL;
+
+                                                                if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1)
+                                                                {
+                                                                        if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
+                                                                                        err=UNZ_ERRNO;
+                                                                }
+
+                                                                if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1)
+                                                                {
+                                                                        if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
+                                                                                  err=UNZ_ERRNO;
+                                                                }
+
+                                                                if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1)
+                                                                {
+                                                                        /* Relative Header offset */
+                                                                        if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
+                                                                                err=UNZ_ERRNO;
+                                                                }
+
+                                                                if(file_info.disk_num_start == (unsigned long)-1)
+                                                                {
+                                                                        /* Disk Start Number */
+                                                                        if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
+                                                                                err=UNZ_ERRNO;
+                                                                }
+
+            }
+            else
+            {
+                if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0)
+                    err=UNZ_ERRNO;
+            }
+
+            acc += 2 + 2 + dataSize;
+        }
+    }
 
     if ((err==UNZ_OK) && (szComment!=NULL))
     {
@@ -713,18 +1089,22 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
             uSizeRead = commentBufferSize;
 
         if (lSeek!=0)
-            if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+        {
+            if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
                 lSeek=0;
             else
                 err=UNZ_ERRNO;
+        }
+
         if ((file_info.size_file_comment>0) && (commentBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
+            if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
                 err=UNZ_ERRNO;
         lSeek+=file_info.size_file_comment - uSizeRead;
     }
     else
         lSeek+=file_info.size_file_comment;
 
+
     if ((err==UNZ_OK) && (pfile_info!=NULL))
         *pfile_info=file_info;
 
@@ -741,41 +1121,70 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
   No preparation of the structure is needed
   return UNZ_OK if there is no problem.
 */
-extern int ZEXPORT unzGetCurrentFileInfo (file,
-                                          pfile_info,
-                                          szFileName, fileNameBufferSize,
-                                          extraField, extraFieldBufferSize,
-                                          szComment,  commentBufferSize)
-    unzFile file;
-    unz_file_info *pfile_info;
-    char *szFileName;
-    uLong fileNameBufferSize;
-    void *extraField;
-    uLong extraFieldBufferSize;
-    char *szComment;
-    uLong commentBufferSize;
+extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file,
+                                          unz_file_info64 * pfile_info,
+                                          char * szFileName, uLong fileNameBufferSize,
+                                          void *extraField, uLong extraFieldBufferSize,
+                                          char* szComment,  uLong commentBufferSize)
 {
-    return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
+    return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL,
                                                 szFileName,fileNameBufferSize,
                                                 extraField,extraFieldBufferSize,
                                                 szComment,commentBufferSize);
 }
 
+extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
+                                          unz_file_info * pfile_info,
+                                          char * szFileName, uLong fileNameBufferSize,
+                                          void *extraField, uLong extraFieldBufferSize,
+                                          char* szComment,  uLong commentBufferSize)
+{
+    int err;
+    unz_file_info64 file_info64;
+    err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL,
+                                                szFileName,fileNameBufferSize,
+                                                extraField,extraFieldBufferSize,
+                                                szComment,commentBufferSize);
+    if (err==UNZ_OK)
+    {
+        pfile_info->version = file_info64.version;
+        pfile_info->version_needed = file_info64.version_needed;
+        pfile_info->flag = file_info64.flag;
+        pfile_info->compression_method = file_info64.compression_method;
+        pfile_info->dosDate = file_info64.dosDate;
+        pfile_info->crc = file_info64.crc;
+
+        pfile_info->size_filename = file_info64.size_filename;
+        pfile_info->size_file_extra = file_info64.size_file_extra;
+        pfile_info->size_file_comment = file_info64.size_file_comment;
+
+        pfile_info->disk_num_start = file_info64.disk_num_start;
+        pfile_info->internal_fa = file_info64.internal_fa;
+        pfile_info->external_fa = file_info64.external_fa;
+
+        pfile_info->tmu_date = file_info64.tmu_date,
+
+
+        pfile_info->compressed_size = (uLong)file_info64.compressed_size;
+        pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size;
+
+    }
+    return err;
+}
 /*
   Set the current file of the zipfile to the first file.
   return UNZ_OK if there is no problem
 */
-extern int ZEXPORT unzGoToFirstFile (file)
-    unzFile file;
+extern int ZEXPORT unzGoToFirstFile (unzFile file)
 {
     int err=UNZ_OK;
-    unz_s* s;
+    unz64_s* s;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     s->pos_in_central_dir=s->offset_central_dir;
     s->num_file=0;
-    err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+    err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
                                              &s->cur_file_info_internal,
                                              NULL,0,NULL,0,NULL,0);
     s->current_file_ok = (err == UNZ_OK);
@@ -787,15 +1196,14 @@ extern int ZEXPORT unzGoToFirstFile (file)
   return UNZ_OK if there is no problem
   return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
 */
-extern int ZEXPORT unzGoToNextFile (file)
-    unzFile file;
+extern int ZEXPORT unzGoToNextFile (unzFile  file)
 {
-    unz_s* s;
+    unz64_s* s;
     int err;
 
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     if (!s->current_file_ok)
         return UNZ_END_OF_LIST_OF_FILE;
     if (s->gi.number_entry != 0xffff)    /* 2^16 files overflow hack */
@@ -805,7 +1213,7 @@ extern int ZEXPORT unzGoToNextFile (file)
     s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
             s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
     s->num_file++;
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+    err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
                                                &s->cur_file_info_internal,
                                                NULL,0,NULL,0,NULL,0);
     s->current_file_ok = (err == UNZ_OK);
@@ -821,21 +1229,18 @@ extern int ZEXPORT unzGoToNextFile (file)
   UNZ_OK if the file is found. It becomes the current file.
   UNZ_END_OF_LIST_OF_FILE if the file is not found
 */
-extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
-    unzFile file;
-    const char *szFileName;
-    int iCaseSensitivity;
+extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
 {
-    unz_s* s;
+    unz64_s* s;
     int err;
 
     /* We remember the 'current' position in the file so that we can jump
      * back there if we fail.
      */
-    unz_file_info cur_file_infoSaved;
-    unz_file_info_internal cur_file_info_internalSaved;
-    uLong num_fileSaved;
-    uLong pos_in_central_dirSaved;
+    unz_file_info64 cur_file_infoSaved;
+    unz_file_info64_internal cur_file_info_internalSaved;
+    ZPOS64_T num_fileSaved;
+    ZPOS64_T pos_in_central_dirSaved;
 
 
     if (file==NULL)
@@ -844,7 +1249,7 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
     if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
         return UNZ_PARAMERROR;
 
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     if (!s->current_file_ok)
         return UNZ_END_OF_LIST_OF_FILE;
 
@@ -859,7 +1264,7 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
     while (err == UNZ_OK)
     {
         char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
-        err = unzGetCurrentFileInfo(file,NULL,
+        err = unzGetCurrentFileInfo64(file,NULL,
                                     szCurrentFileName,sizeof(szCurrentFileName)-1,
                                     NULL,0,NULL,0);
         if (err == UNZ_OK)
@@ -895,20 +1300,18 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
 /*
 typedef struct unz_file_pos_s
 {
-    uLong pos_in_zip_directory;   // offset in file
-    uLong num_of_file;            // # of file
+    ZPOS64_T pos_in_zip_directory;   // offset in file
+    ZPOS64_T num_of_file;            // # of file
 } unz_file_pos;
 */
 
-extern int ZEXPORT unzGetFilePos(file, file_pos)
-    unzFile file;
-    unz_file_pos* file_pos;
+extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos*  file_pos)
 {
-    unz_s* s;
+    unz64_s* s;
 
     if (file==NULL || file_pos==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     if (!s->current_file_ok)
         return UNZ_END_OF_LIST_OF_FILE;
 
@@ -918,23 +1321,35 @@ extern int ZEXPORT unzGetFilePos(file, file_pos)
     return UNZ_OK;
 }
 
-extern int ZEXPORT unzGoToFilePos(file, file_pos)
-    unzFile file;
-    unz_file_pos* file_pos;
+extern int ZEXPORT unzGetFilePos(
+    unzFile file,
+    unz_file_pos* file_pos)
+{
+    unz64_file_pos file_pos64;
+    int err = unzGetFilePos64(file,&file_pos64);
+    if (err==UNZ_OK)
+    {
+        file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory;
+        file_pos->num_of_file = (uLong)file_pos64.num_of_file;
+    }
+    return err;
+}
+
+extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos)
 {
-    unz_s* s;
+    unz64_s* s;
     int err;
 
     if (file==NULL || file_pos==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
 
     /* jump to the right spot */
     s->pos_in_central_dir = file_pos->pos_in_zip_directory;
     s->num_file           = file_pos->num_of_file;
 
     /* set the current file */
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+    err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
                                                &s->cur_file_info_internal,
                                                NULL,0,NULL,0,NULL,0);
     /* return results */
@@ -942,6 +1357,19 @@ extern int ZEXPORT unzGoToFilePos(file, file_pos)
     return err;
 }
 
+extern int ZEXPORT unzGoToFilePos(
+    unzFile file,
+    unz_file_pos* file_pos)
+{
+    unz64_file_pos file_pos64;
+    if (file_pos == NULL)
+        return UNZ_PARAMERROR;
+
+    file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory;
+    file_pos64.num_of_file = file_pos->num_of_file;
+    return unzGoToFilePos64(file,&file_pos64);
+}
+
 /*
 // Unzip Helper Functions - should be here?
 ///////////////////////////////////////////
@@ -954,13 +1382,9 @@ extern int ZEXPORT unzGoToFilePos(file, file_pos)
   store in *piSizeVar the size of extra info in local header
         (filename and size of extra field data)
 */
-local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
-                                                    poffset_local_extrafield,
-                                                    psize_local_extrafield)
-    unz_s* s;
-    uInt* piSizeVar;
-    uLong *poffset_local_extrafield;
-    uInt  *psize_local_extrafield;
+local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar,
+                                                    ZPOS64_T * poffset_local_extrafield,
+                                                    uInt  * psize_local_extrafield)
 {
     uLong uMagic,uData,uFlags;
     uLong size_filename;
@@ -971,65 +1395,66 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
     *poffset_local_extrafield = 0;
     *psize_local_extrafield = 0;
 
-    if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
+    if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
                                 s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
         return UNZ_ERRNO;
 
 
     if (err==UNZ_OK)
-        if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+    {
+        if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
             err=UNZ_ERRNO;
         else if (uMagic!=0x04034b50)
             err=UNZ_BADZIPFILE;
+    }
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
         err=UNZ_ERRNO;
 /*
     else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
         err=UNZ_BADZIPFILE;
 */
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
         err=UNZ_ERRNO;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
         err=UNZ_ERRNO;
     else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
         err=UNZ_BADZIPFILE;
 
     if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
+/* #ifdef HAVE_BZIP2 */
+                         (s->cur_file_info.compression_method!=Z_BZIP2ED) &&
+/* #endif */
                          (s->cur_file_info.compression_method!=Z_DEFLATED))
         err=UNZ_BADZIPFILE;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
         err=UNZ_ERRNO;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
         err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
-                              ((uFlags & 8)==0))
+    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0))
         err=UNZ_BADZIPFILE;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
         err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
-                              ((uFlags & 8)==0))
+    else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0))
         err=UNZ_BADZIPFILE;
 
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
+    if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
         err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
-                              ((uFlags & 8)==0))
+    else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0))
         err=UNZ_BADZIPFILE;
 
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
         err=UNZ_ERRNO;
     else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
         err=UNZ_BADZIPFILE;
 
     *piSizeVar += (uInt)size_filename;
 
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
+    if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
         err=UNZ_ERRNO;
     *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
                                     SIZEZIPLOCALHEADER + size_filename;
@@ -1044,18 +1469,14 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
   Open for reading data the current file in the zipfile.
   If there is no error and the file is opened, the return value is UNZ_OK.
 */
-extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
-    unzFile file;
-    int* method;
-    int* level;
-    int raw;
-    const char* password;
+extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
+                                            int* level, int raw, const char* password)
 {
     int err=UNZ_OK;
     uInt iSizeVar;
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    uLong offset_local_extrafield;  /* offset of the local extra field */
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
+    ZPOS64_T offset_local_extrafield;  /* offset of the local extra field */
     uInt  size_local_extrafield;    /* size of the local extra field */
 #    ifndef NOUNCRYPT
     char source[12];
@@ -1066,19 +1487,17 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
 
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     if (!s->current_file_ok)
         return UNZ_PARAMERROR;
 
     if (s->pfile_in_zip_read != NULL)
         unzCloseCurrentFile(file);
 
-    if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
-                &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
+    if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
         return UNZ_BADZIPFILE;
 
-    pfile_in_zip_read_info = (file_in_zip_read_info_s*)
-                                        ALLOC(sizeof(file_in_zip_read_info_s));
+    pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));
     if (pfile_in_zip_read_info==NULL)
         return UNZ_INTERNALERROR;
 
@@ -1111,31 +1530,60 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
     }
 
     if ((s->cur_file_info.compression_method!=0) &&
+/* #ifdef HAVE_BZIP2 */
+        (s->cur_file_info.compression_method!=Z_BZIP2ED) &&
+/* #endif */
         (s->cur_file_info.compression_method!=Z_DEFLATED))
+
         err=UNZ_BADZIPFILE;
 
     pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
     pfile_in_zip_read_info->crc32=0;
-    pfile_in_zip_read_info->compression_method =
-            s->cur_file_info.compression_method;
+    pfile_in_zip_read_info->total_out_64=0;
+    pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method;
     pfile_in_zip_read_info->filestream=s->filestream;
     pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
     pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
 
     pfile_in_zip_read_info->stream.total_out = 0;
 
-    if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
-        (!raw))
+    if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw))
     {
+#ifdef HAVE_BZIP2
+      pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0;
+      pfile_in_zip_read_info->bstream.bzfree = (free_func)0;
+      pfile_in_zip_read_info->bstream.opaque = (voidpf)0;
+      pfile_in_zip_read_info->bstream.state = (voidpf)0;
+
       pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
       pfile_in_zip_read_info->stream.zfree = (free_func)0;
       pfile_in_zip_read_info->stream.opaque = (voidpf)0;
       pfile_in_zip_read_info->stream.next_in = (voidpf)0;
       pfile_in_zip_read_info->stream.avail_in = 0;
 
+      err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0);
+      if (err == Z_OK)
+        pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;
+      else
+      {
+        TRYFREE(pfile_in_zip_read_info);
+        return err;
+      }
+#else
+      pfile_in_zip_read_info->raw=1;
+#endif
+    }
+    else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw))
+    {
+      pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
+      pfile_in_zip_read_info->stream.zfree = (free_func)0;
+      pfile_in_zip_read_info->stream.opaque = (voidpf)0;
+      pfile_in_zip_read_info->stream.next_in = 0;
+      pfile_in_zip_read_info->stream.avail_in = 0;
+
       err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
       if (err == Z_OK)
-        pfile_in_zip_read_info->stream_initialised=1;
+        pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;
       else
       {
         TRYFREE(pfile_in_zip_read_info);
@@ -1162,6 +1610,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
     pfile_in_zip_read_info->stream.avail_in = (uInt)0;
 
     s->pfile_in_zip_read = pfile_in_zip_read_info;
+                s->encrypted = 0;
 
 #    ifndef NOUNCRYPT
     if (password != NULL)
@@ -1169,12 +1618,12 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
         int i;
         s->pcrc_32_tab = get_crc_table();
         init_keys(password,s->keys,s->pcrc_32_tab);
-        if (ZSEEK(s->z_filefunc, s->filestream,
+        if (ZSEEK64(s->z_filefunc, s->filestream,
                   s->pfile_in_zip_read->pos_in_zipfile +
                      s->pfile_in_zip_read->byte_before_the_zipfile,
                   SEEK_SET)!=0)
             return UNZ_INTERNALERROR;
-        if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
+        if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12)
             return UNZ_INTERNALERROR;
 
         for (i = 0; i<12; i++)
@@ -1189,28 +1638,39 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
     return UNZ_OK;
 }
 
-extern int ZEXPORT unzOpenCurrentFile (file)
-    unzFile file;
+extern int ZEXPORT unzOpenCurrentFile (unzFile file)
 {
     return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
 }
 
-extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
-    unzFile file;
-    const char* password;
+extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char*  password)
 {
     return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
 }
 
-extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
-    unzFile file;
-    int* method;
-    int* level;
-    int raw;
+extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw)
 {
     return unzOpenCurrentFile3(file, method, level, raw, NULL);
 }
 
+/** Addition for GDAL : START */
+
+extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file)
+{
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
+    s=(unz64_s*)file;
+    if (file==NULL)
+        return 0; //UNZ_PARAMERROR;
+    pfile_in_zip_read_info=s->pfile_in_zip_read;
+    if (pfile_in_zip_read_info==NULL)
+        return 0; //UNZ_PARAMERROR;
+    return pfile_in_zip_read_info->pos_in_zipfile +
+                         pfile_in_zip_read_info->byte_before_the_zipfile;
+}
+
+/** Addition for GDAL : END */
+
 /*
   Read bytes from the current file.
   buf contain buffer where data must be copied
@@ -1221,18 +1681,15 @@ extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
   return <0 with error code if there is an error
     (UNZ_ERRNO for IO error, or zLib error for uncompress error)
 */
-extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
-    unzFile file;
-    voidp buf;
-    unsigned len;
+extern int ZEXPORT unzReadCurrentFile  (unzFile file, voidp buf, unsigned len)
 {
     int err=UNZ_OK;
     uInt iRead = 0;
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     pfile_in_zip_read_info=s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info==NULL)
@@ -1270,13 +1727,13 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
                 uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
             if (uReadThis == 0)
                 return UNZ_EOF;
-            if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
+            if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,
                       pfile_in_zip_read_info->filestream,
                       pfile_in_zip_read_info->pos_in_zipfile +
                          pfile_in_zip_read_info->byte_before_the_zipfile,
                          ZLIB_FILEFUNC_SEEK_SET)!=0)
                 return UNZ_ERRNO;
-            if (ZREAD(pfile_in_zip_read_info->z_filefunc,
+            if (ZREAD64(pfile_in_zip_read_info->z_filefunc,
                       pfile_in_zip_read_info->filestream,
                       pfile_in_zip_read_info->read_buffer,
                       uReadThis)!=uReadThis)
@@ -1322,6 +1779,8 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
                 *(pfile_in_zip_read_info->stream.next_out+i) =
                         *(pfile_in_zip_read_info->stream.next_in+i);
 
+            pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy;
+
             pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
                                 pfile_in_zip_read_info->stream.next_out,
                                 uDoCopy);
@@ -1333,11 +1792,54 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
             pfile_in_zip_read_info->stream.total_out += uDoCopy;
             iRead += uDoCopy;
         }
-        else
+        else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED)
         {
+#ifdef HAVE_BZIP2
             uLong uTotalOutBefore,uTotalOutAfter;
             const Bytef *bufBefore;
             uLong uOutThis;
+
+            pfile_in_zip_read_info->bstream.next_in        = (char*)pfile_in_zip_read_info->stream.next_in;
+            pfile_in_zip_read_info->bstream.avail_in       = pfile_in_zip_read_info->stream.avail_in;
+            pfile_in_zip_read_info->bstream.total_in_lo32  = pfile_in_zip_read_info->stream.total_in;
+            pfile_in_zip_read_info->bstream.total_in_hi32  = 0;
+            pfile_in_zip_read_info->bstream.next_out       = (char*)pfile_in_zip_read_info->stream.next_out;
+            pfile_in_zip_read_info->bstream.avail_out      = pfile_in_zip_read_info->stream.avail_out;
+            pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out;
+            pfile_in_zip_read_info->bstream.total_out_hi32 = 0;
+
+            uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32;
+            bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out;
+
+            err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream);
+
+            uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32;
+            uOutThis = uTotalOutAfter-uTotalOutBefore;
+
+            pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
+
+            pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis));
+            pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;
+            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+
+            pfile_in_zip_read_info->stream.next_in   = (Bytef*)pfile_in_zip_read_info->bstream.next_in;
+            pfile_in_zip_read_info->stream.avail_in  = pfile_in_zip_read_info->bstream.avail_in;
+            pfile_in_zip_read_info->stream.total_in  = pfile_in_zip_read_info->bstream.total_in_lo32;
+            pfile_in_zip_read_info->stream.next_out  = (Bytef*)pfile_in_zip_read_info->bstream.next_out;
+            pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out;
+            pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32;
+
+            if (err==BZ_STREAM_END)
+              return (iRead==0) ? UNZ_EOF : iRead;
+            if (err!=BZ_OK)
+              break;
+#endif
+        } // end Z_BZIP2ED
+        else
+        {
+            ZPOS64_T uTotalOutBefore,uTotalOutAfter;
+            const Bytef *bufBefore;
+            ZPOS64_T uOutThis;
             int flush=Z_SYNC_FLUSH;
 
             uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
@@ -1357,6 +1859,8 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
             uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
             uOutThis = uTotalOutAfter-uTotalOutBefore;
 
+            pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis;
+
             pfile_in_zip_read_info->crc32 =
                 crc32(pfile_in_zip_read_info->crc32,bufBefore,
                         (uInt)(uOutThis));
@@ -1382,14 +1886,13 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
 /*
   Give the current position in uncompressed data
 */
-extern z_off_t ZEXPORT unztell (file)
-    unzFile file;
+extern z_off_t ZEXPORT unztell (unzFile file)
 {
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     pfile_in_zip_read_info=s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info==NULL)
@@ -1398,18 +1901,33 @@ extern z_off_t ZEXPORT unztell (file)
     return (z_off_t)pfile_in_zip_read_info->stream.total_out;
 }
 
+extern ZPOS64_T ZEXPORT unztell64 (unzFile file)
+{
+
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
+    if (file==NULL)
+        return (ZPOS64_T)-1;
+    s=(unz64_s*)file;
+    pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+    if (pfile_in_zip_read_info==NULL)
+        return (ZPOS64_T)-1;
+
+    return pfile_in_zip_read_info->total_out_64;
+}
+
 
 /*
   return 1 if the end of file was reached, 0 elsewhere
 */
-extern int ZEXPORT unzeof (file)
-    unzFile file;
+extern int ZEXPORT unzeof (unzFile file)
 {
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     pfile_in_zip_read_info=s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info==NULL)
@@ -1424,9 +1942,9 @@ extern int ZEXPORT unzeof (file)
 
 
 /*
-  Read extra field from the current file (opened by unzOpenCurrentFile)
-  This is the local-header version of the extra field (sometimes, there is
-    more info in the local-header version than in the central-header)
+Read extra field from the current file (opened by unzOpenCurrentFile)
+This is the local-header version of the extra field (sometimes, there is
+more info in the local-header version than in the central-header)
 
   if buf==NULL, it return the size of the local extra field that can be read
 
@@ -1435,19 +1953,16 @@ extern int ZEXPORT unzeof (file)
   the return value is the number of bytes copied in buf, or (if <0)
     the error code
 */
-extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
-    unzFile file;
-    voidp buf;
-    unsigned len;
+extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len)
 {
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
     uInt read_now;
-    uLong size_to_read;
+    ZPOS64_T size_to_read;
 
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     pfile_in_zip_read_info=s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info==NULL)
@@ -1467,14 +1982,14 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
     if (read_now==0)
         return 0;
 
-    if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
+    if (ZSEEK64(pfile_in_zip_read_info->z_filefunc,
               pfile_in_zip_read_info->filestream,
               pfile_in_zip_read_info->offset_local_extrafield +
               pfile_in_zip_read_info->pos_local_extrafield,
               ZLIB_FILEFUNC_SEEK_SET)!=0)
         return UNZ_ERRNO;
 
-    if (ZREAD(pfile_in_zip_read_info->z_filefunc,
+    if (ZREAD64(pfile_in_zip_read_info->z_filefunc,
               pfile_in_zip_read_info->filestream,
               buf,read_now)!=read_now)
         return UNZ_ERRNO;
@@ -1486,16 +2001,15 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
   Close the file in zip opened with unzipOpenCurrentFile
   Return UNZ_CRCERROR if all the file was read but the CRC is not good
 */
-extern int ZEXPORT unzCloseCurrentFile (file)
-    unzFile file;
+extern int ZEXPORT unzCloseCurrentFile (unzFile file)
 {
     int err=UNZ_OK;
 
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
+    unz64_s* s;
+    file_in_zip64_read_info_s* pfile_in_zip_read_info;
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
     pfile_in_zip_read_info=s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info==NULL)
@@ -1512,8 +2026,13 @@ extern int ZEXPORT unzCloseCurrentFile (file)
 
     TRYFREE(pfile_in_zip_read_info->read_buffer);
     pfile_in_zip_read_info->read_buffer = NULL;
-    if (pfile_in_zip_read_info->stream_initialised)
+    if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)
         inflateEnd(&pfile_in_zip_read_info->stream);
+#ifdef HAVE_BZIP2
+    else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED)
+        BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);
+#endif
+
 
     pfile_in_zip_read_info->stream_initialised = 0;
     TRYFREE(pfile_in_zip_read_info);
@@ -1529,29 +2048,25 @@ extern int ZEXPORT unzCloseCurrentFile (file)
   uSizeBuf is the size of the szComment buffer.
   return the number of byte copied or an error code <0
 */
-extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
-    unzFile file;
-    char *szComment;
-    uLong uSizeBuf;
+extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf)
 {
-    int err=UNZ_OK;
-    unz_s* s;
+    unz64_s* s;
     uLong uReadThis ;
     if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+        return (int)UNZ_PARAMERROR;
+    s=(unz64_s*)file;
 
     uReadThis = uSizeBuf;
     if (uReadThis>s->gi.size_comment)
         uReadThis = s->gi.size_comment;
 
-    if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
+    if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
         return UNZ_ERRNO;
 
     if (uReadThis>0)
     {
       *szComment='\0';
-      if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
+      if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
         return UNZ_ERRNO;
     }
 
@@ -1561,14 +2076,13 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
 }
 
 /* Additions by RX '2004 */
-extern uLong ZEXPORT unzGetOffset (file)
-    unzFile file;
+extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
 {
-    unz_s* s;
+    unz64_s* s;
 
     if (file==NULL)
-          return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+          return 0; //UNZ_PARAMERROR;
+    s=(unz64_s*)file;
     if (!s->current_file_ok)
       return 0;
     if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
@@ -1577,22 +2091,35 @@ extern uLong ZEXPORT unzGetOffset (file)
     return s->pos_in_central_dir;
 }
 
-extern int ZEXPORT unzSetOffset (file, pos)
-        unzFile file;
-        uLong pos;
+extern uLong ZEXPORT unzGetOffset (unzFile file)
+{
+    ZPOS64_T offset64;
+
+    if (file==NULL)
+          return 0; //UNZ_PARAMERROR;
+    offset64 = unzGetOffset64(file);
+    return (uLong)offset64;
+}
+
+extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
 {
-    unz_s* s;
+    unz64_s* s;
     int err;
 
     if (file==NULL)
         return UNZ_PARAMERROR;
-    s=(unz_s*)file;
+    s=(unz64_s*)file;
 
     s->pos_in_central_dir = pos;
     s->num_file = s->gi.number_entry;      /* hack */
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+    err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
                                               &s->cur_file_info_internal,
                                               NULL,0,NULL,0,NULL,0);
     s->current_file_ok = (err == UNZ_OK);
     return err;
 }
+
+extern int ZEXPORT unzSetOffset (unzFile file, uLong pos)
+{
+    return unzSetOffset64(file,pos);
+}
diff --git a/libsrc/zlib/contrib/minizip/unzip.h b/libsrc/zlib/contrib/minizip/unzip.h
index b247937..3183968 100644
--- a/libsrc/zlib/contrib/minizip/unzip.h
+++ b/libsrc/zlib/contrib/minizip/unzip.h
@@ -1,20 +1,20 @@
 /* unzip.h -- IO for uncompress .zip files using zlib
-   Version 1.01e, February 12th, 2005
+   Version 1.1, February 14h, 2010
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-   This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
-     WinZip, InfoZip tools and compatible.
+         Modifications of Unzip for Zip64
+         Copyright (C) 2007-2008 Even Rouault
 
-   Multi volume ZipFile (span) are not supported.
-   Encryption compatible with pkzip 2.04g only supported
-   Old compressions used by old PKZip 1.x are not supported
+         Modifications for Zip64 support on both zip and unzip
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
+         For more info read MiniZip_info.txt
 
-   I WAIT FEEDBACK at mail info at winimage.com
-   Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
+         ---------------------------------------------------------------------------------
 
-   Condition of use and distribution are the same than zlib :
+        Condition of use and distribution are the same than zlib :
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -32,18 +32,16 @@
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
 
+  ---------------------------------------------------------------------------------
 
-*/
+        Changes
+
+        See header of unzip64.c
 
-/* for more info about .ZIP format, see
-      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
-      http://www.info-zip.org/pub/infozip/doc/
-   PkWare has also a specification at :
-      ftp://ftp.pkware.com/probdesc.zip
 */
 
-#ifndef _unz_H
-#define _unz_H
+#ifndef _unz64_H
+#define _unz64_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -53,10 +51,16 @@ extern "C" {
 #include "zlib.h"
 #endif
 
-#ifndef _ZLIBIOAPI_H
+#ifndef  _ZLIBIOAPI_H
 #include "ioapi.h"
 #endif
 
+#ifdef HAVE_BZIP2
+#include "bzlib.h"
+#endif
+
+#define Z_BZIP2ED 12
+
 #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
 /* like the STRICT of WIN32, we define a pointer that cannot be converted
     from (void*) without cast */
@@ -89,15 +93,42 @@ typedef struct tm_unz_s
 
 /* unz_global_info structure contain global data about the ZIPfile
    These data comes from the end of central dir */
+typedef struct unz_global_info64_s
+{
+    ZPOS64_T number_entry;         /* total number of entries in
+                                     the central dir on this disk */
+    uLong size_comment;         /* size of the global comment of the zipfile */
+} unz_global_info64;
+
 typedef struct unz_global_info_s
 {
     uLong number_entry;         /* total number of entries in
-                       the central dir on this disk */
+                                     the central dir on this disk */
     uLong size_comment;         /* size of the global comment of the zipfile */
 } unz_global_info;
 
-
 /* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_info64_s
+{
+    uLong version;              /* version made by                 2 bytes */
+    uLong version_needed;       /* version needed to extract       2 bytes */
+    uLong flag;                 /* general purpose bit flag        2 bytes */
+    uLong compression_method;   /* compression method              2 bytes */
+    uLong dosDate;              /* last mod file date in Dos fmt   4 bytes */
+    uLong crc;                  /* crc-32                          4 bytes */
+    ZPOS64_T compressed_size;   /* compressed size                 8 bytes */
+    ZPOS64_T uncompressed_size; /* uncompressed size               8 bytes */
+    uLong size_filename;        /* filename length                 2 bytes */
+    uLong size_file_extra;      /* extra field length              2 bytes */
+    uLong size_file_comment;    /* file comment length             2 bytes */
+
+    uLong disk_num_start;       /* disk number start               2 bytes */
+    uLong internal_fa;          /* internal file attributes        2 bytes */
+    uLong external_fa;          /* external file attributes        4 bytes */
+
+    tm_unz tmu_date;
+} unz_file_info64;
+
 typedef struct unz_file_info_s
 {
     uLong version;              /* version made by                 2 bytes */
@@ -133,6 +164,7 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
 
 
 extern unzFile ZEXPORT unzOpen OF((const char *path));
+extern unzFile ZEXPORT unzOpen64 OF((const void *path));
 /*
   Open a Zip file. path contain the full pathname (by example,
      on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
@@ -141,8 +173,14 @@ extern unzFile ZEXPORT unzOpen OF((const char *path));
        return value is NULL.
      Else, the return value is a unzFile Handle, usable with other function
        of this unzip package.
+     the "64" function take a const void* pointer, because the path is just the
+       value passed to the open64_file_func callback.
+     Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path
+       is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char*
+       does not describe the reality
 */
 
+
 extern unzFile ZEXPORT unzOpen2 OF((const char *path,
                                     zlib_filefunc_def* pzlib_filefunc_def));
 /*
@@ -150,6 +188,13 @@ extern unzFile ZEXPORT unzOpen2 OF((const char *path,
       for read/write the zip file (see ioapi.h)
 */
 
+extern unzFile ZEXPORT unzOpen2_64 OF((const void *path,
+                                    zlib_filefunc64_def* pzlib_filefunc_def));
+/*
+   Open a Zip file, like unz64Open, but provide a set of file low level API
+      for read/write the zip file (see ioapi.h)
+*/
+
 extern int ZEXPORT unzClose OF((unzFile file));
 /*
   Close a ZipFile opened with unzipOpen.
@@ -159,6 +204,9 @@ extern int ZEXPORT unzClose OF((unzFile file));
 
 extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
                                         unz_global_info *pglobal_info));
+
+extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,
+                                        unz_global_info64 *pglobal_info));
 /*
   Write info about the ZipFile in the *pglobal_info structure.
   No preparation of the structure is needed
@@ -221,8 +269,31 @@ extern int ZEXPORT unzGoToFilePos(
     unzFile file,
     unz_file_pos* file_pos);
 
+typedef struct unz64_file_pos_s
+{
+    ZPOS64_T pos_in_zip_directory;   /* offset in zip file directory */
+    ZPOS64_T num_of_file;            /* # of file */
+} unz64_file_pos;
+
+extern int ZEXPORT unzGetFilePos64(
+    unzFile file,
+    unz64_file_pos* file_pos);
+
+extern int ZEXPORT unzGoToFilePos64(
+    unzFile file,
+    const unz64_file_pos* file_pos);
+
 /* ****************************************** */
 
+extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file,
+                         unz_file_info64 *pfile_info,
+                         char *szFileName,
+                         uLong fileNameBufferSize,
+                         void *extraField,
+                         uLong extraFieldBufferSize,
+                         char *szComment,
+                         uLong commentBufferSize));
+
 extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
                          unz_file_info *pfile_info,
                          char *szFileName,
@@ -244,6 +315,14 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
             (commentBufferSize is the size of the buffer)
 */
 
+
+/** Addition for GDAL : START */
+
+extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
+
+/** Addition for GDAL : END */
+
+
 /***************************************************************************/
 /* for reading the content of the current zipfile, you can open it, read data
    from it, and close it (you can close it before reading all the file)
@@ -312,6 +391,8 @@ extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
 */
 
 extern z_off_t ZEXPORT unztell OF((unzFile file));
+
+extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file));
 /*
   Give the current position in uncompressed data
 */
@@ -340,9 +421,11 @@ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
 /***************************************************************************/
 
 /* Get the current file offset */
+extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file);
 extern uLong ZEXPORT unzGetOffset (unzFile file);
 
 /* Set the current file offset */
+extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);
 extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
 
 
@@ -351,4 +434,4 @@ extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
 }
 #endif
 
-#endif /* _unz_H */
+#endif /* _unz64_H */
diff --git a/libsrc/zlib/contrib/minizip/zip.c b/libsrc/zlib/contrib/minizip/zip.c
index 7fbe002..3c34fc8 100644
--- a/libsrc/zlib/contrib/minizip/zip.c
+++ b/libsrc/zlib/contrib/minizip/zip.c
@@ -1,12 +1,24 @@
 /* zip.c -- IO on .zip files using zlib
-   Version 1.01e, February 12th, 2005
+   Version 1.1, February 14h, 2010
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   27 Dec 2004 Rolf Kalbermatter
-   Modification to zipOpen2 to support globalComment retrieval.
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Modifications for Zip64 support
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+         For more info read MiniZip_info.txt
+
+         Changes
+   Oct-2009 - Mathias Svensson - Remove old C style function prototypes
+   Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives
+   Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions.
+   Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data
+                                 It is used when recreting zip archive with RAW when deleting items from a zip.
+                                 ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed.
+   Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required)
+   Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
 
-   Read zip.h for more info
 */
 
 
@@ -39,7 +51,7 @@
 #endif
 
 #ifndef Z_BUFSIZE
-#define Z_BUFSIZE (16384)
+#define Z_BUFSIZE (64*1024) //(16384)
 #endif
 
 #ifndef Z_MAXFILENAMEINZIP
@@ -60,6 +72,10 @@
 
 /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
 
+
+// NOT sure that this work on ALL platform
+#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32))
+
 #ifndef SEEK_CUR
 #define SEEK_CUR    1
 #endif
@@ -79,8 +95,7 @@
 #  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
 #endif
 #endif
-const char zip_copyright[] =
-   " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
+const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
 
 
 #define SIZEDATA_INDATABLOCK (4096-(4*4))
@@ -88,6 +103,8 @@ const char zip_copyright[] =
 #define LOCALHEADERMAGIC    (0x04034b50)
 #define CENTRALHEADERMAGIC  (0x02014b50)
 #define ENDHEADERMAGIC      (0x06054b50)
+#define ZIP64ENDHEADERMAGIC      (0x6064b50)
+#define ZIP64ENDLOCHEADERMAGIC   (0x7064b50)
 
 #define FLAG_LOCALHEADER_OFFSET (0x06)
 #define CRC_LOCALHEADER_OFFSET  (0x0e)
@@ -113,13 +130,19 @@ typedef struct linkedlist_data_s
 typedef struct
 {
     z_stream stream;            /* zLib stream structure for inflate */
+#ifdef HAVE_BZIP2
+    bz_stream bstream;          /* bzLib stream structure for bziped */
+#endif
+
     int  stream_initialised;    /* 1 is stream is initialised */
     uInt pos_in_buffered_data;  /* last written byte in buffered_data */
 
-    uLong pos_local_header;     /* offset of the local header of the file
+    ZPOS64_T pos_local_header;     /* offset of the local header of the file
                                      currenty writing */
     char* central_header;       /* central header data for the current file */
+    uLong size_centralExtra;
     uLong size_centralheader;   /* size of the central header for cur file */
+    uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */
     uLong flag;                 /* flag of the file currently writing */
 
     int  method;                /* compression method of file currenty wr.*/
@@ -128,29 +151,34 @@ typedef struct
     uLong dosDate;
     uLong crc32;
     int  encrypt;
+    int  zip64;               /* Add ZIP64 extened information in the extra field */
+    ZPOS64_T pos_zip64extrainfo;
+    ZPOS64_T totalCompressedData;
+    ZPOS64_T totalUncompressedData;
 #ifndef NOCRYPT
     unsigned long keys[3];     /* keys defining the pseudo-random sequence */
     const unsigned long* pcrc_32_tab;
     int crypt_header_size;
 #endif
-} curfile_info;
+} curfile64_info;
 
 typedef struct
 {
-    zlib_filefunc_def z_filefunc;
+    zlib_filefunc64_32_def z_filefunc;
     voidpf filestream;        /* io structore of the zipfile */
     linkedlist_data central_dir;/* datablock with central dir in construction*/
     int  in_opened_file_inzip;  /* 1 if a file in the zip is currently writ.*/
-    curfile_info ci;            /* info on the file curretly writing */
+    curfile64_info ci;            /* info on the file curretly writing */
+
+    ZPOS64_T begin_pos;            /* position of the beginning of the zipfile */
+    ZPOS64_T add_position_when_writting_offset;
+    ZPOS64_T number_entry;
 
-    uLong begin_pos;            /* position of the beginning of the zipfile */
-    uLong add_position_when_writting_offset;
-    uLong number_entry;
 #ifndef NO_ADDFILEINEXISTINGZIP
     char *globalcomment;
 #endif
-} zip_internal;
 
+} zip64_internal;
 
 
 #ifndef NOCRYPT
@@ -172,8 +200,7 @@ local linkedlist_datablock_internal* allocate_new_datablock()
     return ldi;
 }
 
-local void free_datablock(ldi)
-    linkedlist_datablock_internal* ldi;
+local void free_datablock(linkedlist_datablock_internal* ldi)
 {
     while (ldi!=NULL)
     {
@@ -183,24 +210,19 @@ local void free_datablock(ldi)
     }
 }
 
-local void init_linkedlist(ll)
-    linkedlist_data* ll;
+local void init_linkedlist(linkedlist_data* ll)
 {
     ll->first_block = ll->last_block = NULL;
 }
 
-local void free_linkedlist(ll)
-    linkedlist_data* ll;
+local void free_linkedlist(linkedlist_data* ll)
 {
     free_datablock(ll->first_block);
     ll->first_block = ll->last_block = NULL;
 }
 
 
-local int add_data_in_datablock(ll,buf,len)
-    linkedlist_data* ll;
-    const void* buf;
-    uLong len;
+local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)
 {
     linkedlist_datablock_internal* ldi;
     const unsigned char* from_copy;
@@ -258,18 +280,13 @@ local int add_data_in_datablock(ll,buf,len)
 #ifndef NO_ADDFILEINEXISTINGZIP
 /* ===========================================================================
    Inputs a long in LSB order to the given file
-   nbByte == 1, 2 or 4 (byte, short or long)
+   nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T)
 */
 
-local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def,
-                                voidpf filestream, uLong x, int nbByte));
-local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong x;
-    int nbByte;
+local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte));
+local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)
 {
-    unsigned char buf[4];
+    unsigned char buf[8];
     int n;
     for (n = 0; n < nbByte; n++)
     {
@@ -284,17 +301,14 @@ local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte)
         }
       }
 
-    if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
+    if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
         return ZIP_ERRNO;
     else
         return ZIP_OK;
 }
 
-local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte));
-local void ziplocal_putValue_inmemory (dest, x, nbByte)
-    void* dest;
-    uLong x;
-    int nbByte;
+local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte));
+local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte)
 {
     unsigned char* buf=(unsigned char*)dest;
     int n;
@@ -315,14 +329,12 @@ local void ziplocal_putValue_inmemory (dest, x, nbByte)
 /****************************************************************************/
 
 
-local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
-    const tm_zip* ptm;
-    uLong dosDate;
+local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)
 {
     uLong year = (uLong)ptm->tm_year;
-    if (year>1980)
+    if (year>=1980)
         year-=1980;
-    else if (year>80)
+    else if (year>=80)
         year-=80;
     return
       (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |
@@ -332,18 +344,12 @@ local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
 
 /****************************************************************************/
 
-local int ziplocal_getByte OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    int *pi));
+local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi));
 
-local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    int *pi;
+local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi)
 {
     unsigned char c;
-    int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
+    int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
     if (err==1)
     {
         *pi = (int)c;
@@ -351,7 +357,7 @@ local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi)
     }
     else
     {
-        if (ZERROR(*pzlib_filefunc_def,filestream))
+        if (ZERROR64(*pzlib_filefunc_def,filestream))
             return ZIP_ERRNO;
         else
             return ZIP_EOF;
@@ -362,25 +368,19 @@ local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi)
 /* ===========================================================================
    Reads a long in LSB order from the given gz_stream. Sets
 */
-local int ziplocal_getShort OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
+local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
+
+local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
 {
     uLong x ;
-    int i;
+    int i = 0;
     int err;
 
-    err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
     x = (uLong)i;
 
     if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
+        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
     x += ((uLong)i)<<8;
 
     if (err==ZIP_OK)
@@ -390,33 +390,27 @@ local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX)
     return err;
 }
 
-local int ziplocal_getLong OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
+local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
 
-local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
+local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
 {
     uLong x ;
-    int i;
+    int i = 0;
     int err;
 
-    err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
     x = (uLong)i;
 
     if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
+        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
     x += ((uLong)i)<<8;
 
     if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
+        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
     x += ((uLong)i)<<16;
 
     if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
+        err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
     x += ((uLong)i)<<24;
 
     if (err==ZIP_OK)
@@ -426,6 +420,54 @@ local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX)
     return err;
 }
 
+local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX));
+
+
+local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)
+{
+  ZPOS64_T x;
+  int i = 0;
+  int err;
+
+  err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x = (ZPOS64_T)i;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<8;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<16;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<24;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<32;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<40;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<48;
+
+  if (err==ZIP_OK)
+    err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
+  x += ((ZPOS64_T)i)<<56;
+
+  if (err==ZIP_OK)
+    *pX = x;
+  else
+    *pX = 0;
+
+  return err;
+}
+
 #ifndef BUFREADCOMMENT
 #define BUFREADCOMMENT (0x400)
 #endif
@@ -433,87 +475,391 @@ local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX)
   Locate the Central directory of a zipfile (at the end, just before
     the global comment)
 */
-local uLong ziplocal_SearchCentralDir OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream));
+local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
 
-local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
+local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
 {
-    unsigned char* buf;
-    uLong uSizeFile;
-    uLong uBackRead;
-    uLong uMaxBack=0xffff; /* maximum size of global comment */
-    uLong uPosFound=0;
+  unsigned char* buf;
+  ZPOS64_T uSizeFile;
+  ZPOS64_T uBackRead;
+  ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+  ZPOS64_T uPosFound=0;
+
+  if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+    return 0;
 
-    if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
 
+  uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
 
-    uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
+  if (uMaxBack>uSizeFile)
+    uMaxBack = uSizeFile;
 
-    if (uMaxBack>uSizeFile)
-        uMaxBack = uSizeFile;
+  buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+  if (buf==NULL)
+    return 0;
 
-    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
-    if (buf==NULL)
-        return 0;
+  uBackRead = 4;
+  while (uBackRead<uMaxBack)
+  {
+    uLong uReadSize;
+    ZPOS64_T uReadPos ;
+    int i;
+    if (uBackRead+BUFREADCOMMENT>uMaxBack)
+      uBackRead = uMaxBack;
+    else
+      uBackRead+=BUFREADCOMMENT;
+    uReadPos = uSizeFile-uBackRead ;
+
+    uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+      (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+    if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+      break;
+
+    if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+      break;
+
+    for (i=(int)uReadSize-3; (i--)>0;)
+      if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+        ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
+      {
+        uPosFound = uReadPos+i;
+        break;
+      }
+
+      if (uPosFound!=0)
+        break;
+  }
+  TRYFREE(buf);
+  return uPosFound;
+}
 
-    uBackRead = 4;
-    while (uBackRead<uMaxBack)
+/*
+Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before
+the global comment)
+*/
+local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
+
+local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
+{
+  unsigned char* buf;
+  ZPOS64_T uSizeFile;
+  ZPOS64_T uBackRead;
+  ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
+  ZPOS64_T uPosFound=0;
+  uLong uL;
+  ZPOS64_T relativeOffset;
+
+  if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+    return 0;
+
+  uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
+
+  if (uMaxBack>uSizeFile)
+    uMaxBack = uSizeFile;
+
+  buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+  if (buf==NULL)
+    return 0;
+
+  uBackRead = 4;
+  while (uBackRead<uMaxBack)
+  {
+    uLong uReadSize;
+    ZPOS64_T uReadPos;
+    int i;
+    if (uBackRead+BUFREADCOMMENT>uMaxBack)
+      uBackRead = uMaxBack;
+    else
+      uBackRead+=BUFREADCOMMENT;
+    uReadPos = uSizeFile-uBackRead ;
+
+    uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+      (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+    if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+      break;
+
+    if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+      break;
+
+    for (i=(int)uReadSize-3; (i--)>0;)
     {
-        uLong uReadSize,uReadPos ;
-        int i;
-        if (uBackRead+BUFREADCOMMENT>uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead+=BUFREADCOMMENT;
-        uReadPos = uSizeFile-uBackRead ;
+      // Signature "0x07064b50" Zip64 end of central directory locater
+      if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
+      {
+        uPosFound = uReadPos+i;
+        break;
+      }
+    }
 
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-        if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            break;
+      if (uPosFound!=0)
+        break;
+  }
 
-        if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
-            break;
+  TRYFREE(buf);
+  if (uPosFound == 0)
+    return 0;
 
-        for (i=(int)uReadSize-3; (i--)>0;)
-            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
-                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
+  /* Zip64 end of central directory locator */
+  if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
+    return 0;
+
+  /* the signature, already checked */
+  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+    return 0;
+
+  /* number of the disk with the start of the zip64 end of  central directory */
+  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+    return 0;
+  if (uL != 0)
+    return 0;
+
+  /* relative offset of the zip64 end of central directory record */
+  if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK)
+    return 0;
+
+  /* total number of disks */
+  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+    return 0;
+  if (uL != 1)
+    return 0;
 
-        if (uPosFound!=0)
-            break;
+  /* Goto Zip64 end of central directory record */
+  if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
+    return 0;
+
+  /* the signature */
+  if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
+    return 0;
+
+  if (uL != 0x06064b50) // signature of 'Zip64 end of central directory'
+    return 0;
+
+  return relativeOffset;
+}
+
+int LoadCentralDirectoryRecord(zip64_internal* pziinit)
+{
+  int err=ZIP_OK;
+  ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+
+  ZPOS64_T size_central_dir;     /* size of the central directory  */
+  ZPOS64_T offset_central_dir;   /* offset of start of central directory */
+  ZPOS64_T central_pos;
+  uLong uL;
+
+  uLong number_disk;          /* number of the current dist, used for
+                              spaning ZIP, unsupported, always 0*/
+  uLong number_disk_with_CD;  /* number the the disk with central dir, used
+                              for spaning ZIP, unsupported, always 0*/
+  ZPOS64_T number_entry;
+  ZPOS64_T number_entry_CD;      /* total number of entries in
+                                the central dir
+                                (same than number_entry on nospan) */
+  uLong VersionMadeBy;
+  uLong VersionNeeded;
+  uLong size_comment;
+
+  int hasZIP64Record = 0;
+
+  // check first if we find a ZIP64 record
+  central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream);
+  if(central_pos > 0)
+  {
+    hasZIP64Record = 1;
+  }
+  else if(central_pos == 0)
+  {
+    central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream);
+  }
+
+/* disable to allow appending to empty ZIP archive
+        if (central_pos==0)
+            err=ZIP_ERRNO;
+*/
+
+  if(hasZIP64Record)
+  {
+    ZPOS64_T sizeEndOfCentralDirectory;
+    if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+      err=ZIP_ERRNO;
+
+    /* the signature, already checked */
+    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* size of zip64 end of central directory record */
+    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* version made by */
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* version needed to extract */
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* number of this disk */
+    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* number of the disk with the start of the central directory */
+    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* total number of entries in the central directory on this disk */
+    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* total number of entries in the central directory */
+    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
+      err=ZIP_BADZIPFILE;
+
+    /* size of the central directory */
+    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* offset of start of central directory with respect to the
+    starting disk number */
+    if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    // TODO..
+    // read the comment from the standard central header.
+    size_comment = 0;
+  }
+  else
+  {
+    // Read End of central Directory info
+    if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+      err=ZIP_ERRNO;
+
+    /* the signature, already checked */
+    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* number of this disk */
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* number of the disk with the start of the central directory */
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)
+      err=ZIP_ERRNO;
+
+    /* total number of entries in the central dir on this disk */
+    number_entry = 0;
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+      err=ZIP_ERRNO;
+    else
+      number_entry = uL;
+
+    /* total number of entries in the central dir */
+    number_entry_CD = 0;
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+      err=ZIP_ERRNO;
+    else
+      number_entry_CD = uL;
+
+    if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
+      err=ZIP_BADZIPFILE;
+
+    /* size of the central directory */
+    size_central_dir = 0;
+    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+      err=ZIP_ERRNO;
+    else
+      size_central_dir = uL;
+
+    /* offset of start of central directory with respect to the starting disk number */
+    offset_central_dir = 0;
+    if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
+      err=ZIP_ERRNO;
+    else
+      offset_central_dir = uL;
+
+
+    /* zipfile global comment length */
+    if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK)
+      err=ZIP_ERRNO;
+  }
+
+  if ((central_pos<offset_central_dir+size_central_dir) &&
+    (err==ZIP_OK))
+    err=ZIP_BADZIPFILE;
+
+  if (err!=ZIP_OK)
+  {
+    ZCLOSE64(pziinit->z_filefunc, pziinit->filestream);
+    return ZIP_ERRNO;
+  }
+
+  if (size_comment>0)
+  {
+    pziinit->globalcomment = (char*)ALLOC(size_comment+1);
+    if (pziinit->globalcomment)
+    {
+      size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment);
+      pziinit->globalcomment[size_comment]=0;
     }
-    TRYFREE(buf);
-    return uPosFound;
+  }
+
+  byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir);
+  pziinit->add_position_when_writting_offset = byte_before_the_zipfile;
+
+  {
+    ZPOS64_T size_central_dir_to_read = size_central_dir;
+    size_t buf_size = SIZEDATA_INDATABLOCK;
+    void* buf_read = (void*)ALLOC(buf_size);
+    if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0)
+      err=ZIP_ERRNO;
+
+    while ((size_central_dir_to_read>0) && (err==ZIP_OK))
+    {
+      ZPOS64_T read_this = SIZEDATA_INDATABLOCK;
+      if (read_this > size_central_dir_to_read)
+        read_this = size_central_dir_to_read;
+
+      if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this)
+        err=ZIP_ERRNO;
+
+      if (err==ZIP_OK)
+        err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this);
+
+      size_central_dir_to_read-=read_this;
+    }
+    TRYFREE(buf_read);
+  }
+  pziinit->begin_pos = byte_before_the_zipfile;
+  pziinit->number_entry = number_entry_CD;
+
+  if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0)
+    err=ZIP_ERRNO;
+
+  return err;
 }
+
+
 #endif /* !NO_ADDFILEINEXISTINGZIP*/
 
+
 /************************************************************/
-extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def)
-    const char *pathname;
-    int append;
-    zipcharpc* globalcomment;
-    zlib_filefunc_def* pzlib_filefunc_def;
+extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def)
 {
-    zip_internal ziinit;
-    zip_internal* zi;
+    zip64_internal ziinit;
+    zip64_internal* zi;
     int err=ZIP_OK;
 
-
-    if (pzlib_filefunc_def==NULL)
-        fill_fopen_filefunc(&ziinit.z_filefunc);
+    ziinit.z_filefunc.zseek32_file = NULL;
+    ziinit.z_filefunc.ztell32_file = NULL;
+    if (pzlib_filefunc64_32_def==NULL)
+        fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
     else
-        ziinit.z_filefunc = *pzlib_filefunc_def;
+        ziinit.z_filefunc = *pzlib_filefunc64_32_def;
 
-    ziinit.filestream = (*(ziinit.z_filefunc.zopen_file))
-                 (ziinit.z_filefunc.opaque,
+    ziinit.filestream = ZOPEN64(ziinit.z_filefunc,
                   pathname,
                   (append == APPEND_STATUS_CREATE) ?
                   (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :
@@ -521,7 +867,11 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc
 
     if (ziinit.filestream == NULL)
         return NULL;
-    ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream);
+
+    if (append == APPEND_STATUS_CREATEAFTER)
+        ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END);
+
+    ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream);
     ziinit.in_opened_file_inzip = 0;
     ziinit.ci.stream_initialised = 0;
     ziinit.number_entry = 0;
@@ -529,10 +879,11 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc
     init_linkedlist(&(ziinit.central_dir));
 
 
-    zi = (zip_internal*)ALLOC(sizeof(zip_internal));
+
+    zi = (zip64_internal*)ALLOC(sizeof(zip64_internal));
     if (zi==NULL)
     {
-        ZCLOSE(ziinit.z_filefunc,ziinit.filestream);
+        ZCLOSE64(ziinit.z_filefunc,ziinit.filestream);
         return NULL;
     }
 
@@ -541,122 +892,8 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc
     ziinit.globalcomment = NULL;
     if (append == APPEND_STATUS_ADDINZIP)
     {
-        uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-
-        uLong size_central_dir;     /* size of the central directory  */
-        uLong offset_central_dir;   /* offset of start of central directory */
-        uLong central_pos,uL;
-
-        uLong number_disk;          /* number of the current dist, used for
-                                    spaning ZIP, unsupported, always 0*/
-        uLong number_disk_with_CD;  /* number the the disk with central dir, used
-                                    for spaning ZIP, unsupported, always 0*/
-        uLong number_entry;
-        uLong number_entry_CD;      /* total number of entries in
-                                    the central dir
-                                    (same than number_entry on nospan) */
-        uLong size_comment;
-
-        central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream);
-        if (central_pos==0)
-            err=ZIP_ERRNO;
-
-        if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                                        central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err=ZIP_ERRNO;
-
-        /* the signature, already checked */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* number of this disk */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* number of the disk with the start of the central directory */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* total number of entries in the central dir on this disk */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* total number of entries in the central dir */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        if ((number_entry_CD!=number_entry) ||
-            (number_disk_with_CD!=0) ||
-            (number_disk!=0))
-            err=ZIP_BADZIPFILE;
-
-        /* size of the central directory */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* offset of start of central directory with respect to the
-            starting disk number */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* zipfile global comment length */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        if ((central_pos<offset_central_dir+size_central_dir) &&
-            (err==ZIP_OK))
-            err=ZIP_BADZIPFILE;
-
-        if (err!=ZIP_OK)
-        {
-            ZCLOSE(ziinit.z_filefunc, ziinit.filestream);
-            return NULL;
-        }
-
-        if (size_comment>0)
-        {
-            ziinit.globalcomment = ALLOC(size_comment+1);
-            if (ziinit.globalcomment)
-            {
-               size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment);
-               ziinit.globalcomment[size_comment]=0;
-            }
-        }
-
-        byte_before_the_zipfile = central_pos -
-                                (offset_central_dir+size_central_dir);
-        ziinit.add_position_when_writting_offset = byte_before_the_zipfile;
-
-        {
-            uLong size_central_dir_to_read = size_central_dir;
-            size_t buf_size = SIZEDATA_INDATABLOCK;
-            void* buf_read = (void*)ALLOC(buf_size);
-            if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                  offset_central_dir + byte_before_the_zipfile,
-                  ZLIB_FILEFUNC_SEEK_SET) != 0)
-                  err=ZIP_ERRNO;
-
-            while ((size_central_dir_to_read>0) && (err==ZIP_OK))
-            {
-                uLong read_this = SIZEDATA_INDATABLOCK;
-                if (read_this > size_central_dir_to_read)
-                    read_this = size_central_dir_to_read;
-                if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this)
-                    err=ZIP_ERRNO;
-
-                if (err==ZIP_OK)
-                    err = add_data_in_datablock(&ziinit.central_dir,buf_read,
-                                                (uLong)read_this);
-                size_central_dir_to_read-=read_this;
-            }
-            TRYFREE(buf_read);
-        }
-        ziinit.begin_pos = byte_before_the_zipfile;
-        ziinit.number_entry = number_entry_CD;
-
-        if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                  offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err=ZIP_ERRNO;
+      // Read and Cache Central Directory Records
+      err = LoadCentralDirectoryRecord(&ziinit);
     }
 
     if (globalcomment)
@@ -680,37 +917,150 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc
     }
 }
 
-extern zipFile ZEXPORT zipOpen (pathname, append)
-    const char *pathname;
-    int append;
+extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def)
 {
-    return zipOpen2(pathname,append,NULL,NULL);
+    if (pzlib_filefunc32_def != NULL)
+    {
+        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+        fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
+        return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);
+    }
+    else
+        return zipOpen3(pathname, append, globalcomment, NULL);
 }
 
-extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
-                                         extrafield_local, size_extrafield_local,
-                                         extrafield_global, size_extrafield_global,
-                                         comment, method, level, raw,
-                                         windowBits, memLevel, strategy,
-                                         password, crcForCrypting)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-    int raw;
-    int windowBits;
-    int memLevel;
-    int strategy;
-    const char* password;
-    uLong crcForCrypting;
+extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    if (pzlib_filefunc_def != NULL)
+    {
+        zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
+        zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
+        zlib_filefunc64_32_def_fill.ztell32_file = NULL;
+        zlib_filefunc64_32_def_fill.zseek32_file = NULL;
+        return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);
+    }
+    else
+        return zipOpen3(pathname, append, globalcomment, NULL);
+}
+
+
+
+extern zipFile ZEXPORT zipOpen (const char* pathname, int append)
 {
-    zip_internal* zi;
+    return zipOpen3((const void*)pathname,append,NULL,NULL);
+}
+
+extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append)
+{
+    return zipOpen3(pathname,append,NULL,NULL);
+}
+
+int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)
+{
+  /* write the local header */
+  int err;
+  uInt size_filename = (uInt)strlen(filename);
+  uInt size_extrafield = size_extrafield_local;
+
+  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4);
+
+  if (err==ZIP_OK)
+  {
+    if(zi->ci.zip64)
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */
+    else
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
+  }
+
+  if (err==ZIP_OK)
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
+
+  if (err==ZIP_OK)
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
+
+  if (err==ZIP_OK)
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);
+
+  // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later
+  if (err==ZIP_OK)
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */
+  if (err==ZIP_OK)
+  {
+    if(zi->ci.zip64)
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */
+    else
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */
+  }
+  if (err==ZIP_OK)
+  {
+    if(zi->ci.zip64)
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */
+    else
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */
+  }
+
+  if (err==ZIP_OK)
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);
+
+  if(zi->ci.zip64)
+  {
+    size_extrafield += 20;
+  }
+
+  if (err==ZIP_OK)
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2);
+
+  if ((err==ZIP_OK) && (size_filename > 0))
+  {
+    if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)
+      err = ZIP_ERRNO;
+  }
+
+  if ((err==ZIP_OK) && (size_extrafield_local > 0))
+  {
+    if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local)
+      err = ZIP_ERRNO;
+  }
+
+
+  if ((err==ZIP_OK) && (zi->ci.zip64))
+  {
+      // write the Zip64 extended info
+      short HeaderID = 1;
+      short DataSize = 16;
+      ZPOS64_T CompressedSize = 0;
+      ZPOS64_T UncompressedSize = 0;
+
+      // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file)
+      zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream);
+
+      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);
+      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
+
+      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
+      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);
+  }
+
+  return err;
+}
+
+/*
+ NOTE.
+ When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped
+ before calling this function it can be done with zipRemoveExtraInfoBlock
+
+ It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize
+ unnecessary allocations.
+ */
+extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                         const void* extrafield_local, uInt size_extrafield_local,
+                                         const void* extrafield_global, uInt size_extrafield_global,
+                                         const char* comment, int method, int level, int raw,
+                                         int windowBits,int memLevel, int strategy,
+                                         const char* password, uLong crcForCrypting,
+                                         uLong versionMadeBy, uLong flagBase, int zip64)
+{
+    zip64_internal* zi;
     uInt size_filename;
     uInt size_comment;
     uInt i;
@@ -723,10 +1073,16 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
 
     if (file == NULL)
         return ZIP_PARAMERROR;
+
+#ifdef HAVE_BZIP2
+    if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED))
+      return ZIP_PARAMERROR;
+#else
     if ((method!=0) && (method!=Z_DEFLATED))
-        return ZIP_PARAMERROR;
+      return ZIP_PARAMERROR;
+#endif
 
-    zi = (zip_internal*)file;
+    zi = (zip64_internal*)file;
 
     if (zi->in_opened_file_inzip == 1)
     {
@@ -735,7 +1091,6 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
             return err;
     }
 
-
     if (filename==NULL)
         filename="-";
 
@@ -752,10 +1107,11 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
     {
         if (zipfi->dosDate != 0)
             zi->ci.dosDate = zipfi->dosDate;
-        else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate);
+        else
+          zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date);
     }
 
-    zi->ci.flag = 0;
+    zi->ci.flag = flagBase;
     if ((level==8) || (level==9))
       zi->ci.flag |= 2;
     if ((level==2))
@@ -771,37 +1127,43 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
     zi->ci.stream_initialised = 0;
     zi->ci.pos_in_buffered_data = 0;
     zi->ci.raw = raw;
-    zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ;
-    zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename +
-                                      size_extrafield_global + size_comment;
-    zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader);
+    zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream);
+
+    zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment;
+    zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data
 
-    ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);
+    zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree);
+
+    zi->ci.size_centralExtra = size_extrafield_global;
+    zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);
     /* version info */
-    ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);
-    ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/
+    zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);
+    zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/
+    zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/
+    zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/
+    zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);
+    zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/
 
     if (zipfi==NULL)
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);
+        zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);
     else
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);
+        zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);
 
     if (zipfi==NULL)
-        ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);
+        zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);
     else
-        ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);
+        zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);
 
-    ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4);
+    if(zi->ci.pos_local_header >= 0xffffffff)
+      zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4);
+    else
+      zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4);
 
     for (i=0;i<size_filename;i++)
         *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);
@@ -816,63 +1178,66 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
     if (zi->ci.central_header == NULL)
         return ZIP_INTERNALERROR;
 
-    /* write the local header */
-    err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2);
-
-    if ((err==ZIP_OK) && (size_filename>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)
-                err = ZIP_ERRNO;
-
-    if ((err==ZIP_OK) && (size_extrafield_local>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local)
-                                                                           !=size_extrafield_local)
-                err = ZIP_ERRNO;
+    zi->ci.zip64 = zip64;
+    zi->ci.totalCompressedData = 0;
+    zi->ci.totalUncompressedData = 0;
+    zi->ci.pos_zip64extrainfo = 0;
+
+    err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local);
+
+#ifdef HAVE_BZIP2
+    zi->ci.bstream.avail_in = (uInt)0;
+    zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
+    zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
+    zi->ci.bstream.total_in_hi32 = 0;
+    zi->ci.bstream.total_in_lo32 = 0;
+    zi->ci.bstream.total_out_hi32 = 0;
+    zi->ci.bstream.total_out_lo32 = 0;
+#endif
 
     zi->ci.stream.avail_in = (uInt)0;
     zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
     zi->ci.stream.next_out = zi->ci.buffered_data;
     zi->ci.stream.total_in = 0;
     zi->ci.stream.total_out = 0;
+    zi->ci.stream.data_type = Z_BINARY;
 
+#ifdef HAVE_BZIP2
+    if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
+#else
     if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+#endif
     {
-        zi->ci.stream.zalloc = (alloc_func)0;
-        zi->ci.stream.zfree = (free_func)0;
-        zi->ci.stream.opaque = (voidpf)0;
+        if(zi->ci.method == Z_DEFLATED)
+        {
+          zi->ci.stream.zalloc = (alloc_func)0;
+          zi->ci.stream.zfree = (free_func)0;
+          zi->ci.stream.opaque = (voidpf)0;
 
-        if (windowBits>0)
-            windowBits = -windowBits;
+          if (windowBits>0)
+              windowBits = -windowBits;
 
-        err = deflateInit2(&zi->ci.stream, level,
-               Z_DEFLATED, windowBits, memLevel, strategy);
+          err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy);
+
+          if (err==Z_OK)
+              zi->ci.stream_initialised = Z_DEFLATED;
+        }
+        else if(zi->ci.method == Z_BZIP2ED)
+        {
+#ifdef HAVE_BZIP2
+            // Init BZip stuff here
+          zi->ci.bstream.bzalloc = 0;
+          zi->ci.bstream.bzfree = 0;
+          zi->ci.bstream.opaque = (voidpf)0;
+
+          err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35);
+          if(err == BZ_OK)
+            zi->ci.stream_initialised = Z_BZIP2ED;
+#endif
+        }
 
-        if (err==Z_OK)
-            zi->ci.stream_initialised = 1;
     }
+
 #    ifndef NOCRYPT
     zi->ci.crypt_header_size = 0;
     if ((err==Z_OK) && (password != NULL))
@@ -886,7 +1251,7 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
         sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting);
         zi->ci.crypt_header_size = sizeHead;
 
-        if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
+        if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
                 err = ZIP_ERRNO;
     }
 #    endif
@@ -896,53 +1261,105 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
     return err;
 }
 
-extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi,
-                                        extrafield_local, size_extrafield_local,
-                                        extrafield_global, size_extrafield_global,
-                                        comment, method, level, raw)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-    int raw;
+extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                         const void* extrafield_local, uInt size_extrafield_local,
+                                         const void* extrafield_global, uInt size_extrafield_global,
+                                         const char* comment, int method, int level, int raw,
+                                         int windowBits,int memLevel, int strategy,
+                                         const char* password, uLong crcForCrypting,
+                                         uLong versionMadeBy, uLong flagBase)
+{
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+                                 extrafield_local, size_extrafield_local,
+                                 extrafield_global, size_extrafield_global,
+                                 comment, method, level, raw,
+                                 windowBits, memLevel, strategy,
+                                 password, crcForCrypting, versionMadeBy, flagBase, 0);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                         const void* extrafield_local, uInt size_extrafield_local,
+                                         const void* extrafield_global, uInt size_extrafield_global,
+                                         const char* comment, int method, int level, int raw,
+                                         int windowBits,int memLevel, int strategy,
+                                         const char* password, uLong crcForCrypting)
+{
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+                                 extrafield_local, size_extrafield_local,
+                                 extrafield_global, size_extrafield_global,
+                                 comment, method, level, raw,
+                                 windowBits, memLevel, strategy,
+                                 password, crcForCrypting, VERSIONMADEBY, 0, 0);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                         const void* extrafield_local, uInt size_extrafield_local,
+                                         const void* extrafield_global, uInt size_extrafield_global,
+                                         const char* comment, int method, int level, int raw,
+                                         int windowBits,int memLevel, int strategy,
+                                         const char* password, uLong crcForCrypting, int zip64)
+{
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+                                 extrafield_local, size_extrafield_local,
+                                 extrafield_global, size_extrafield_global,
+                                 comment, method, level, raw,
+                                 windowBits, memLevel, strategy,
+                                 password, crcForCrypting, VERSIONMADEBY, 0, zip64);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                        const void* extrafield_local, uInt size_extrafield_local,
+                                        const void* extrafield_global, uInt size_extrafield_global,
+                                        const char* comment, int method, int level, int raw)
 {
-    return zipOpenNewFileInZip3 (file, filename, zipfi,
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
                                  extrafield_local, size_extrafield_local,
                                  extrafield_global, size_extrafield_global,
                                  comment, method, level, raw,
                                  -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
-                                 NULL, 0);
+                                 NULL, 0, VERSIONMADEBY, 0, 0);
 }
 
-extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi,
-                                        extrafield_local, size_extrafield_local,
-                                        extrafield_global, size_extrafield_global,
-                                        comment, method, level)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
+extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                        const void* extrafield_local, uInt size_extrafield_local,
+                                        const void* extrafield_global, uInt size_extrafield_global,
+                                        const char* comment, int method, int level, int raw, int zip64)
 {
-    return zipOpenNewFileInZip2 (file, filename, zipfi,
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
                                  extrafield_local, size_extrafield_local,
                                  extrafield_global, size_extrafield_global,
-                                 comment, method, level, 0);
+                                 comment, method, level, raw,
+                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+                                 NULL, 0, VERSIONMADEBY, 0, zip64);
 }
 
-local int zipFlushWriteBuffer(zi)
-  zip_internal* zi;
+extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                        const void* extrafield_local, uInt size_extrafield_local,
+                                        const void*extrafield_global, uInt size_extrafield_global,
+                                        const char* comment, int method, int level, int zip64)
+{
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+                                 extrafield_local, size_extrafield_local,
+                                 extrafield_global, size_extrafield_global,
+                                 comment, method, level, 0,
+                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+                                 NULL, 0, VERSIONMADEBY, 0, zip64);
+}
+
+extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi,
+                                        const void* extrafield_local, uInt size_extrafield_local,
+                                        const void*extrafield_global, uInt size_extrafield_global,
+                                        const char* comment, int method, int level)
+{
+    return zipOpenNewFileInZip4_64 (file, filename, zipfi,
+                                 extrafield_local, size_extrafield_local,
+                                 extrafield_global, size_extrafield_global,
+                                 comment, method, level, 0,
+                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+                                 NULL, 0, VERSIONMADEBY, 0, 0);
+}
+
+local int zip64FlushWriteBuffer(zip64_internal* zi)
 {
     int err=ZIP_OK;
 
@@ -952,169 +1369,372 @@ local int zipFlushWriteBuffer(zi)
         uInt i;
         int t;
         for (i=0;i<zi->ci.pos_in_buffered_data;i++)
-            zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab,
-                                       zi->ci.buffered_data[i],t);
+            zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t);
 #endif
     }
-    if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data)
-                                                                    !=zi->ci.pos_in_buffered_data)
+
+    if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data)
       err = ZIP_ERRNO;
+
+    zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data;
+
+#ifdef HAVE_BZIP2
+    if(zi->ci.method == Z_BZIP2ED)
+    {
+      zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32;
+      zi->ci.bstream.total_in_lo32 = 0;
+      zi->ci.bstream.total_in_hi32 = 0;
+    }
+    else
+#endif
+    {
+      zi->ci.totalUncompressedData += zi->ci.stream.total_in;
+      zi->ci.stream.total_in = 0;
+    }
+
+
     zi->ci.pos_in_buffered_data = 0;
+
     return err;
 }
 
-extern int ZEXPORT zipWriteInFileInZip (file, buf, len)
-    zipFile file;
-    const void* buf;
-    unsigned len;
+extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len)
 {
-    zip_internal* zi;
+    zip64_internal* zi;
     int err=ZIP_OK;
 
     if (file == NULL)
         return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
+    zi = (zip64_internal*)file;
 
     if (zi->in_opened_file_inzip == 0)
         return ZIP_PARAMERROR;
 
-    zi->ci.stream.next_in = (void*)buf;
-    zi->ci.stream.avail_in = len;
-    zi->ci.crc32 = crc32(zi->ci.crc32,buf,len);
+    zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len);
 
-    while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
+#ifdef HAVE_BZIP2
+    if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw))
     {
-        if (zi->ci.stream.avail_out == 0)
+      zi->ci.bstream.next_in = (void*)buf;
+      zi->ci.bstream.avail_in = len;
+      err = BZ_RUN_OK;
+
+      while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0))
+      {
+        if (zi->ci.bstream.avail_out == 0)
         {
-            if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)
-                err = ZIP_ERRNO;
-            zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-            zi->ci.stream.next_out = zi->ci.buffered_data;
+          if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+            err = ZIP_ERRNO;
+          zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
+          zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
         }
 
 
-        if(err != ZIP_OK)
-            break;
+        if(err != BZ_RUN_OK)
+          break;
 
-        if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+        if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
         {
-            uLong uTotalOutBefore = zi->ci.stream.total_out;
-            err=deflate(&zi->ci.stream,  Z_NO_FLUSH);
-            zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
+          uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32;
+//          uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32;
+          err=BZ2_bzCompress(&zi->ci.bstream,  BZ_RUN);
 
+          zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ;
         }
-        else
-        {
-            uInt copy_this,i;
-            if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)
-                copy_this = zi->ci.stream.avail_in;
-            else
-                copy_this = zi->ci.stream.avail_out;
-            for (i=0;i<copy_this;i++)
-                *(((char*)zi->ci.stream.next_out)+i) =
-                    *(((const char*)zi->ci.stream.next_in)+i);
-            {
-                zi->ci.stream.avail_in -= copy_this;
-                zi->ci.stream.avail_out-= copy_this;
-                zi->ci.stream.next_in+= copy_this;
-                zi->ci.stream.next_out+= copy_this;
-                zi->ci.stream.total_in+= copy_this;
-                zi->ci.stream.total_out+= copy_this;
-                zi->ci.pos_in_buffered_data += copy_this;
-            }
-        }
+      }
+
+      if(err == BZ_RUN_OK)
+        err = ZIP_OK;
+    }
+    else
+#endif
+    {
+      zi->ci.stream.next_in = (Bytef*)buf;
+      zi->ci.stream.avail_in = len;
+
+      while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
+      {
+          if (zi->ci.stream.avail_out == 0)
+          {
+              if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+                  err = ZIP_ERRNO;
+              zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
+              zi->ci.stream.next_out = zi->ci.buffered_data;
+          }
+
+
+          if(err != ZIP_OK)
+              break;
+
+          if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
+          {
+              uLong uTotalOutBefore = zi->ci.stream.total_out;
+              err=deflate(&zi->ci.stream,  Z_NO_FLUSH);
+              if(uTotalOutBefore > zi->ci.stream.total_out)
+              {
+                int bBreak = 0;
+                bBreak++;
+              }
+
+              zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
+          }
+          else
+          {
+              uInt copy_this,i;
+              if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)
+                  copy_this = zi->ci.stream.avail_in;
+              else
+                  copy_this = zi->ci.stream.avail_out;
+
+              for (i = 0; i < copy_this; i++)
+                  *(((char*)zi->ci.stream.next_out)+i) =
+                      *(((const char*)zi->ci.stream.next_in)+i);
+              {
+                  zi->ci.stream.avail_in -= copy_this;
+                  zi->ci.stream.avail_out-= copy_this;
+                  zi->ci.stream.next_in+= copy_this;
+                  zi->ci.stream.next_out+= copy_this;
+                  zi->ci.stream.total_in+= copy_this;
+                  zi->ci.stream.total_out+= copy_this;
+                  zi->ci.pos_in_buffered_data += copy_this;
+              }
+          }
+      }// while(...)
     }
 
     return err;
 }
 
-extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32)
-    zipFile file;
-    uLong uncompressed_size;
-    uLong crc32;
+extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32)
+{
+    return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32);
+}
+
+extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32)
 {
-    zip_internal* zi;
-    uLong compressed_size;
+    zip64_internal* zi;
+    ZPOS64_T compressed_size;
+    uLong invalidValue = 0xffffffff;
+    short datasize = 0;
     int err=ZIP_OK;
 
     if (file == NULL)
         return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
+    zi = (zip64_internal*)file;
 
     if (zi->in_opened_file_inzip == 0)
         return ZIP_PARAMERROR;
     zi->ci.stream.avail_in = 0;
 
     if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-        while (err==ZIP_OK)
+                {
+                        while (err==ZIP_OK)
+                        {
+                                uLong uTotalOutBefore;
+                                if (zi->ci.stream.avail_out == 0)
+                                {
+                                        if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+                                                err = ZIP_ERRNO;
+                                        zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
+                                        zi->ci.stream.next_out = zi->ci.buffered_data;
+                                }
+                                uTotalOutBefore = zi->ci.stream.total_out;
+                                err=deflate(&zi->ci.stream,  Z_FINISH);
+                                zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
+                        }
+                }
+    else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
     {
+#ifdef HAVE_BZIP2
+      err = BZ_FINISH_OK;
+      while (err==BZ_FINISH_OK)
+      {
         uLong uTotalOutBefore;
-        if (zi->ci.stream.avail_out == 0)
+        if (zi->ci.bstream.avail_out == 0)
         {
-            if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)
-                err = ZIP_ERRNO;
-            zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-            zi->ci.stream.next_out = zi->ci.buffered_data;
+          if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
+            err = ZIP_ERRNO;
+          zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
+          zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
         }
-        uTotalOutBefore = zi->ci.stream.total_out;
-        err=deflate(&zi->ci.stream,  Z_FINISH);
-        zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
+        uTotalOutBefore = zi->ci.bstream.total_out_lo32;
+        err=BZ2_bzCompress(&zi->ci.bstream,  BZ_FINISH);
+        if(err == BZ_STREAM_END)
+          err = Z_STREAM_END;
+
+        zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore);
+      }
+
+      if(err == BZ_FINISH_OK)
+        err = ZIP_OK;
+#endif
     }
 
     if (err==Z_STREAM_END)
         err=ZIP_OK; /* this is normal */
 
     if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
-        if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)
+                {
+        if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO)
             err = ZIP_ERRNO;
+                }
 
     if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
     {
-        err=deflateEnd(&zi->ci.stream);
+        int tmp_err = deflateEnd(&zi->ci.stream);
+        if (err == ZIP_OK)
+            err = tmp_err;
         zi->ci.stream_initialised = 0;
     }
+#ifdef HAVE_BZIP2
+    else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
+    {
+      int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream);
+                        if (err==ZIP_OK)
+                                err = tmperr;
+                        zi->ci.stream_initialised = 0;
+    }
+#endif
 
     if (!zi->ci.raw)
     {
         crc32 = (uLong)zi->ci.crc32;
-        uncompressed_size = (uLong)zi->ci.stream.total_in;
+        uncompressed_size = zi->ci.totalUncompressedData;
     }
-    compressed_size = (uLong)zi->ci.stream.total_out;
+    compressed_size = zi->ci.totalCompressedData;
+
 #    ifndef NOCRYPT
     compressed_size += zi->ci.crypt_header_size;
 #    endif
 
-    ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+20,
-                                compressed_size,4); /*compr size*/
+    // update Current Item crc and sizes,
+    if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff)
+    {
+      /*version Made by*/
+      zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2);
+      /*version needed*/
+      zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2);
+
+    }
+
+    zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/
+
+
+    if(compressed_size >= 0xffffffff)
+      zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/
+    else
+      zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/
+
+    /// set internal file attributes field
     if (zi->ci.stream.data_type == Z_ASCII)
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+24,
-                                uncompressed_size,4); /*uncompr size*/
+        zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);
+
+    if(uncompressed_size >= 0xffffffff)
+      zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/
+    else
+      zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/
+
+    // Add ZIP64 extra info field for uncompressed size
+    if(uncompressed_size >= 0xffffffff)
+      datasize += 8;
+
+    // Add ZIP64 extra info field for compressed size
+    if(compressed_size >= 0xffffffff)
+      datasize += 8;
+
+    // Add ZIP64 extra info field for relative offset to local file header of current file
+    if(zi->ci.pos_local_header >= 0xffffffff)
+      datasize += 8;
+
+    if(datasize > 0)
+    {
+      char* p = NULL;
+
+      if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree)
+      {
+        // we can not write more data to the buffer that we have room for.
+        return ZIP_BADZIPFILE;
+      }
+
+      p = zi->ci.central_header + zi->ci.size_centralheader;
+
+      // Add Extra Information Header for 'ZIP64 information'
+      zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID
+      p += 2;
+      zip64local_putValue_inmemory(p, datasize, 2); // DataSize
+      p += 2;
+
+      if(uncompressed_size >= 0xffffffff)
+      {
+        zip64local_putValue_inmemory(p, uncompressed_size, 8);
+        p += 8;
+      }
+
+      if(compressed_size >= 0xffffffff)
+      {
+        zip64local_putValue_inmemory(p, compressed_size, 8);
+        p += 8;
+      }
+
+      if(zi->ci.pos_local_header >= 0xffffffff)
+      {
+        zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8);
+        p += 8;
+      }
+
+      // Update how much extra free space we got in the memory buffer
+      // and increase the centralheader size so the new ZIP64 fields are included
+      // ( 4 below is the size of HeaderID and DataSize field )
+      zi->ci.size_centralExtraFree -= datasize + 4;
+      zi->ci.size_centralheader += datasize + 4;
+
+      // Update the extra info size field
+      zi->ci.size_centralExtra += datasize + 4;
+      zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2);
+    }
 
     if (err==ZIP_OK)
-        err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header,
-                                       (uLong)zi->ci.size_centralheader);
+        err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader);
+
     free(zi->ci.central_header);
 
     if (err==ZIP_OK)
     {
-        long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);
-        if (ZSEEK(zi->z_filefunc,zi->filestream,
-                  zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)
+        // Update the LocalFileHeader with the new values.
+
+        ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
+
+        if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)
             err = ZIP_ERRNO;
 
         if (err==ZIP_OK)
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */
+            err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */
 
-        if (err==ZIP_OK) /* compressed size, unknown */
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);
+        if(uncompressed_size >= 0xffffffff)
+        {
+          if(zi->ci.pos_zip64extrainfo > 0)
+          {
+            // Update the size in the ZIP64 extended field.
+            if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0)
+              err = ZIP_ERRNO;
+
+            if (err==ZIP_OK) /* compressed size, unknown */
+              err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8);
+
+            if (err==ZIP_OK) /* uncompressed size, unknown */
+              err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8);
+          }
+        }
+        else
+        {
+          if (err==ZIP_OK) /* compressed size, unknown */
+              err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);
 
-        if (err==ZIP_OK) /* uncompressed size, unknown */
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);
+          if (err==ZIP_OK) /* uncompressed size, unknown */
+              err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);
+        }
 
-        if (ZSEEK(zi->z_filefunc,zi->filestream,
-                  cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)
+        if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)
             err = ZIP_ERRNO;
     }
 
@@ -1124,24 +1744,150 @@ extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32)
     return err;
 }
 
-extern int ZEXPORT zipCloseFileInZip (file)
-    zipFile file;
+extern int ZEXPORT zipCloseFileInZip (zipFile file)
 {
     return zipCloseFileInZipRaw (file,0,0);
 }
 
-extern int ZEXPORT zipClose (file, global_comment)
-    zipFile file;
-    const char* global_comment;
+int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
 {
-    zip_internal* zi;
+  int err = ZIP_OK;
+  ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset;
+
+  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4);
+
+  /*num disks*/
+    if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
+
+  /*relative offset*/
+    if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8);
+
+  /*total disks*/ /* Do not support spawning of disk so always say 1 here*/
+    if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4);
+
+    return err;
+}
+
+int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
+{
+  int err = ZIP_OK;
+
+  uLong Zip64DataSize = 44;
+
+  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4);
+
+  if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ?
+
+  if (err==ZIP_OK) /* version made by */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);
+
+  if (err==ZIP_OK) /* version needed */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);
+
+  if (err==ZIP_OK) /* number of this disk */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
+
+  if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
+
+  if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
+    err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);
+
+  if (err==ZIP_OK) /* total number of entries in the central dir */
+    err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);
+
+  if (err==ZIP_OK) /* size of the central directory */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8);
+
+  if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */
+  {
+    ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8);
+  }
+  return err;
+}
+int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
+{
+  int err = ZIP_OK;
+
+  /*signature*/
+  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
+
+  if (err==ZIP_OK) /* number of this disk */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
+
+  if (err==ZIP_OK) /* number of the disk with the start of the central directory */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
+
+  if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
+  {
+    {
+      if(zi->number_entry >= 0xFFFF)
+        err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record
+      else
+        err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
+    }
+  }
+
+  if (err==ZIP_OK) /* total number of entries in the central dir */
+  {
+    if(zi->number_entry >= 0xFFFF)
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record
+    else
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
+  }
+
+  if (err==ZIP_OK) /* size of the central directory */
+    err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);
+
+  if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */
+  {
+    ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
+    if(pos >= 0xffffffff)
+    {
+      err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4);
+    }
+    else
+                  err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4);
+  }
+
+   return err;
+}
+
+int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
+{
+  int err = ZIP_OK;
+  uInt size_global_comment = 0;
+
+  if(global_comment != NULL)
+    size_global_comment = (uInt)strlen(global_comment);
+
+  err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);
+
+  if (err == ZIP_OK && size_global_comment > 0)
+  {
+    if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment)
+      err = ZIP_ERRNO;
+  }
+  return err;
+}
+
+extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
+{
+    zip64_internal* zi;
     int err = 0;
     uLong size_centraldir = 0;
-    uLong centraldir_pos_inzip;
-    uInt size_global_comment;
+    ZPOS64_T centraldir_pos_inzip;
+    ZPOS64_T pos;
+
     if (file == NULL)
         return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
+
+    zi = (zip64_internal*)file;
 
     if (zi->in_opened_file_inzip == 1)
     {
@@ -1152,61 +1898,42 @@ extern int ZEXPORT zipClose (file, global_comment)
     if (global_comment==NULL)
         global_comment = zi->globalcomment;
 #endif
-    if (global_comment==NULL)
-        size_global_comment = 0;
-    else
-        size_global_comment = (uInt)strlen(global_comment);
 
-    centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);
+    centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
+
     if (err==ZIP_OK)
     {
-        linkedlist_datablock_internal* ldi = zi->central_dir.first_block ;
+        linkedlist_datablock_internal* ldi = zi->central_dir.first_block;
         while (ldi!=NULL)
         {
             if ((err==ZIP_OK) && (ldi->filled_in_this_block>0))
-                if (ZWRITE(zi->z_filefunc,zi->filestream,
-                           ldi->data,ldi->filled_in_this_block)
-                              !=ldi->filled_in_this_block )
+            {
+                if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block)
                     err = ZIP_ERRNO;
+            }
 
             size_centraldir += ldi->filled_in_this_block;
             ldi = ldi->next_datablock;
         }
     }
-    free_datablock(zi->central_dir.first_block);
-
-    if (err==ZIP_OK) /* Magic End */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
-
-    if (err==ZIP_OK) /* number of this disk */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
-    if (err==ZIP_OK) /* number of the disk with the start of the central directory */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
-    if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
+    free_linkedlist(&(zi->central_dir));
 
-    if (err==ZIP_OK) /* total number of entries in the central dir */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
+    pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
+    if(pos >= 0xffffffff)
+    {
+      ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
+      Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
 
-    if (err==ZIP_OK) /* size of the central directory */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);
+      Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos);
+    }
 
-    if (err==ZIP_OK) /* offset of start of central directory with respect to the
-                            starting disk number */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,
-                                (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4);
+    if (err==ZIP_OK)
+      err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
 
-    if (err==ZIP_OK) /* zipfile comment length */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);
+    if(err == ZIP_OK)
+      err = Write_GlobalComment(zi, global_comment);
 
-    if ((err==ZIP_OK) && (size_global_comment>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,
-                   global_comment,size_global_comment) != size_global_comment)
-                err = ZIP_ERRNO;
-
-    if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0)
+    if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0)
         if (err == ZIP_OK)
             err = ZIP_ERRNO;
 
@@ -1217,3 +1944,61 @@ extern int ZEXPORT zipClose (file, global_comment)
 
     return err;
 }
+
+extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader)
+{
+  char* p = pData;
+  int size = 0;
+  char* pNewHeader;
+  char* pTmp;
+  short header;
+  short dataSize;
+
+  int retVal = ZIP_OK;
+
+  if(pData == NULL || *dataLen < 4)
+    return ZIP_PARAMERROR;
+
+  pNewHeader = (char*)ALLOC(*dataLen);
+  pTmp = pNewHeader;
+
+  while(p < (pData + *dataLen))
+  {
+    header = *(short*)p;
+    dataSize = *(((short*)p)+1);
+
+    if( header == sHeader ) // Header found.
+    {
+      p += dataSize + 4; // skip it. do not copy to temp buffer
+    }
+    else
+    {
+      // Extra Info block should not be removed, So copy it to the temp buffer.
+      memcpy(pTmp, p, dataSize + 4);
+      p += dataSize + 4;
+      size += dataSize + 4;
+    }
+
+  }
+
+  if(size < *dataLen)
+  {
+    // clean old extra info block.
+    memset(pData,0, *dataLen);
+
+    // copy the new extra info block over the old
+    if(size > 0)
+      memcpy(pData, pNewHeader, size);
+
+    // set the new extra info size
+    *dataLen = size;
+
+    retVal = ZIP_OK;
+  }
+  else
+    retVal = ZIP_ERRNO;
+
+  TRYFREE(pNewHeader);
+
+  return retVal;
+}
diff --git a/libsrc/zlib/contrib/minizip/zip.h b/libsrc/zlib/contrib/minizip/zip.h
index acacce8..8aaebb6 100644
--- a/libsrc/zlib/contrib/minizip/zip.h
+++ b/libsrc/zlib/contrib/minizip/zip.h
@@ -1,19 +1,15 @@
-/* zip.h -- IO for compress .zip files using zlib
-   Version 1.01e, February 12th, 2005
+/* zip.h -- IO on .zip files using zlib
+   Version 1.1, February 14h, 2010
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
 
-   Copyright (C) 1998-2005 Gilles Vollant
+         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-   This unzip package allow creates .ZIP file, compatible with PKZip 2.04g
-     WinZip, InfoZip tools and compatible.
-   Multi volume ZipFile (span) are not supported.
-   Encryption compatible with pkzip 2.04g only supported
-   Old compressions used by old PKZip 1.x are not supported
+         Modifications for Zip64 support
+         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
-  For uncompress .zip file, look at unzip.h
+         For more info read MiniZip_info.txt
 
-
-   I WAIT FEEDBACK at mail info at winimage.com
-   Visit also http://www.winimage.com/zLibDll/unzip.html for evolution
+         ---------------------------------------------------------------------------
 
    Condition of use and distribution are the same than zlib :
 
@@ -33,23 +29,23 @@
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
 
+        ---------------------------------------------------------------------------
 
-*/
+        Changes
+
+        See header of zip.h
 
-/* for more info about .ZIP format, see
-      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
-      http://www.info-zip.org/pub/infozip/doc/
-   PkWare has also a specification at :
-      ftp://ftp.pkware.com/probdesc.zip
 */
 
-#ifndef _zip_H
-#define _zip_H
+#ifndef _zip12_H
+#define _zip12_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+//#define HAVE_BZIP2
+
 #ifndef _ZLIB_H
 #include "zlib.h"
 #endif
@@ -58,6 +54,12 @@ extern "C" {
 #include "ioapi.h"
 #endif
 
+#ifdef HAVE_BZIP2
+#include "bzlib.h"
+#endif
+
+#define Z_BZIP2ED 12
+
 #if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
 /* like the STRICT of WIN32, we define a pointer that cannot be converted
     from (void*) without cast */
@@ -112,6 +114,7 @@ typedef const char* zipcharpc;
 #define APPEND_STATUS_ADDINZIP      (2)
 
 extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
+extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
 /*
   Create a zipfile.
      pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
@@ -136,6 +139,11 @@ extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
                                    zipcharpc* globalcomment,
                                    zlib_filefunc_def* pzlib_filefunc_def));
 
+extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
+                                   int append,
+                                   zipcharpc* globalcomment,
+                                   zlib_filefunc64_def* pzlib_filefunc_def));
+
 extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
                        const char* filename,
                        const zip_fileinfo* zipfi,
@@ -146,6 +154,19 @@ extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
                        const char* comment,
                        int method,
                        int level));
+
+extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,
+                       const char* filename,
+                       const zip_fileinfo* zipfi,
+                       const void* extrafield_local,
+                       uInt size_extrafield_local,
+                       const void* extrafield_global,
+                       uInt size_extrafield_global,
+                       const char* comment,
+                       int method,
+                       int level,
+                       int zip64));
+
 /*
   Open a file in the ZIP for writing.
   filename : the filename in zip (if NULL, '-' without quote will be used
@@ -157,6 +178,9 @@ extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
   if comment != NULL, comment contain the comment string
   method contain the compression method (0 for store, Z_DEFLATED for deflate)
   level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
+  zip64 is set to 1 if a zip64 extended information block should be added to the local file header.
+                    this MUST be '1' if the uncompressed size is >= 0xffffffff.
+
 */
 
 
@@ -172,6 +196,19 @@ extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
                                             int level,
                                             int raw));
 
+
+extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file,
+                                            const char* filename,
+                                            const zip_fileinfo* zipfi,
+                                            const void* extrafield_local,
+                                            uInt size_extrafield_local,
+                                            const void* extrafield_global,
+                                            uInt size_extrafield_global,
+                                            const char* comment,
+                                            int method,
+                                            int level,
+                                            int raw,
+                                            int zip64));
 /*
   Same than zipOpenNewFileInZip, except if raw=1, we write raw file
  */
@@ -191,13 +228,79 @@ extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
                                             int memLevel,
                                             int strategy,
                                             const char* password,
-                                            uLong crcForCtypting));
+                                            uLong crcForCrypting));
+
+extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,
+                                            const char* filename,
+                                            const zip_fileinfo* zipfi,
+                                            const void* extrafield_local,
+                                            uInt size_extrafield_local,
+                                            const void* extrafield_global,
+                                            uInt size_extrafield_global,
+                                            const char* comment,
+                                            int method,
+                                            int level,
+                                            int raw,
+                                            int windowBits,
+                                            int memLevel,
+                                            int strategy,
+                                            const char* password,
+                                            uLong crcForCrypting,
+                                            int zip64
+                                            ));
 
 /*
   Same than zipOpenNewFileInZip2, except
     windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
     password : crypting password (NULL for no crypting)
-    crcForCtypting : crc of file to compress (needed for crypting)
+    crcForCrypting : crc of file to compress (needed for crypting)
+ */
+
+extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file,
+                                            const char* filename,
+                                            const zip_fileinfo* zipfi,
+                                            const void* extrafield_local,
+                                            uInt size_extrafield_local,
+                                            const void* extrafield_global,
+                                            uInt size_extrafield_global,
+                                            const char* comment,
+                                            int method,
+                                            int level,
+                                            int raw,
+                                            int windowBits,
+                                            int memLevel,
+                                            int strategy,
+                                            const char* password,
+                                            uLong crcForCrypting,
+                                            uLong versionMadeBy,
+                                            uLong flagBase
+                                            ));
+
+
+extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,
+                                            const char* filename,
+                                            const zip_fileinfo* zipfi,
+                                            const void* extrafield_local,
+                                            uInt size_extrafield_local,
+                                            const void* extrafield_global,
+                                            uInt size_extrafield_global,
+                                            const char* comment,
+                                            int method,
+                                            int level,
+                                            int raw,
+                                            int windowBits,
+                                            int memLevel,
+                                            int strategy,
+                                            const char* password,
+                                            uLong crcForCrypting,
+                                            uLong versionMadeBy,
+                                            uLong flagBase,
+                                            int zip64
+                                            ));
+/*
+  Same than zipOpenNewFileInZip4, except
+    versionMadeBy : value for Version made by field
+    flag : value for flag field (compression level info will be added)
  */
 
 
@@ -216,8 +319,13 @@ extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
 extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
                                             uLong uncompressed_size,
                                             uLong crc32));
+
+extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
+                                            ZPOS64_T uncompressed_size,
+                                            uLong crc32));
+
 /*
-  Close the current file in the zipfile, for fiel opened with
+  Close the current file in the zipfile, for file opened with
     parameter raw=1 in zipOpenNewFileInZip2
   uncompressed_size and crc32 are value for the uncompressed size
 */
@@ -228,8 +336,27 @@ extern int ZEXPORT zipClose OF((zipFile file,
   Close the zipfile
 */
 
+
+extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
+/*
+  zipRemoveExtraInfoBlock -  Added by Mathias Svensson
+
+  Remove extra information block from a extra information data for the local file header or central directory header
+
+  It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode.
+
+  0x0001 is the signature header for the ZIP64 extra information blocks
+
+  usage.
+                        Remove ZIP64 Extra information from a central director extra field data
+              zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001);
+
+                        Remove ZIP64 Extra information from a Local File Header extra field data
+        zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001);
+*/
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _zip_H */
+#endif /* _zip64_H */
diff --git a/libsrc/zlib/contrib/pascal/zlibd32.mak b/libsrc/zlib/contrib/pascal/zlibd32.mak
index 88fafa0..0d0699a 100644
--- a/libsrc/zlib/contrib/pascal/zlibd32.mak
+++ b/libsrc/zlib/contrib/pascal/zlibd32.mak
@@ -18,10 +18,10 @@ LDFLAGS =
 # variables
 ZLIB_LIB = zlib.lib
 
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
+OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
+OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
+OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
+OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
 
 
 # targets
@@ -38,7 +38,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h
 
 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
 
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
+gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
+
+gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
+
+gzread.obj: gzread.c zlib.h zconf.h gzguts.h
+
+gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
 
 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
  inffast.h inffixed.h
diff --git a/libsrc/zlib/contrib/pascal/zlibpas.pas b/libsrc/zlib/contrib/pascal/zlibpas.pas
index 836848c..637ae3a 100644
--- a/libsrc/zlib/contrib/pascal/zlibpas.pas
+++ b/libsrc/zlib/contrib/pascal/zlibpas.pas
@@ -10,7 +10,7 @@ unit zlibpas;
 interface
 
 const
-  ZLIB_VERSION = '1.2.3';
+  ZLIB_VERSION = '1.2.5';
 
 type
   alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
diff --git a/libsrc/zlib/contrib/puff/Makefile b/libsrc/zlib/contrib/puff/Makefile
new file mode 100644
index 0000000..b6b6940
--- /dev/null
+++ b/libsrc/zlib/contrib/puff/Makefile
@@ -0,0 +1,8 @@
+puff: puff.c puff.h
+	cc -DTEST -o puff puff.c
+
+test: puff
+	puff zeros.raw
+
+clean:
+	rm -f puff puff.o
diff --git a/libsrc/zlib/contrib/puff/puff.c b/libsrc/zlib/contrib/puff/puff.c
index ce0cc40..650694e 100644
--- a/libsrc/zlib/contrib/puff/puff.c
+++ b/libsrc/zlib/contrib/puff/puff.c
@@ -1,8 +1,8 @@
 /*
  * puff.c
- * Copyright (C) 2002-2004 Mark Adler
+ * Copyright (C) 2002-2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in puff.h
- * version 1.8, 9 Jan 2004
+ * version 2.1, 4 Apr 2010
  *
  * puff.c is a simple inflate written to be an unambiguous way to specify the
  * deflate format.  It is not written for speed but rather simplicity.  As a
@@ -61,6 +61,14 @@
  * 1.7   3 Mar 2003     - Added test code for distribution
  *                      - Added zlib-like license
  * 1.8   9 Jan 2004     - Added some comments on no distance codes case
+ * 1.9  21 Feb 2008     - Fix bug on 16-bit integer architectures [Pohland]
+ *                      - Catch missing end-of-block symbol error
+ * 2.0  25 Jul 2008     - Add #define to permit distance too far back
+ *                      - Add option in TEST code for puff to write the data
+ *                      - Add option in TEST code to skip input bytes
+ *                      - Allow TEST code to read from piped stdin
+ * 2.1   4 Apr 2010     - Avoid variable initialization for happier compilers
+ *                      - Avoid unsigned comparisons for even happier compilers
  */
 
 #include <setjmp.h>             /* for setjmp(), longjmp(), and jmp_buf */
@@ -194,7 +202,7 @@ struct huffman {
  * Decode a code from the stream s using huffman table h.  Return the symbol or
  * a negative value if there is an error.  If all of the lengths are zero, i.e.
  * an empty code, or if the code is incomplete and an invalid code is received,
- * then -9 is returned after reading MAXBITS bits.
+ * then -10 is returned after reading MAXBITS bits.
  *
  * Format notes:
  *
@@ -226,14 +234,14 @@ local int decode(struct state *s, struct huffman *h)
     for (len = 1; len <= MAXBITS; len++) {
         code |= bits(s, 1);             /* get next bit */
         count = h->count[len];
-        if (code < first + count)       /* if length len, return symbol */
+        if (code - count < first)       /* if length len, return symbol */
             return h->symbol[index + (code - first)];
         index += count;                 /* else update for next length */
         first += count;
         first <<= 1;
         code <<= 1;
     }
-    return -9;                          /* ran out of codes */
+    return -10;                         /* ran out of codes */
 }
 
 /*
@@ -263,7 +271,7 @@ local int decode(struct state *s, struct huffman *h)
             code |= bitbuf & 1;
             bitbuf >>= 1;
             count = *next++;
-            if (code < first + count) { /* if length len, return symbol */
+            if (code - count < first) { /* if length len, return symbol */
                 s->bitbuf = bitbuf;
                 s->bitcnt = (s->bitcnt - len) & 7;
                 return h->symbol[index + (code - first)];
@@ -280,7 +288,7 @@ local int decode(struct state *s, struct huffman *h)
         bitbuf = s->in[s->incnt++];
         if (left > 8) left = 8;
     }
-    return -9;                          /* ran out of codes */
+    return -10;                         /* ran out of codes */
 }
 #endif /* SLOW */
 
@@ -448,21 +456,27 @@ local int codes(struct state *s,
         else if (symbol > 256) {        /* length */
             /* get and compute length */
             symbol -= 257;
-            if (symbol >= 29) return -9;        /* invalid fixed code */
+            if (symbol >= 29) return -10;       /* invalid fixed code */
             len = lens[symbol] + bits(s, lext[symbol]);
 
             /* get and check distance */
             symbol = decode(s, distcode);
             if (symbol < 0) return symbol;      /* invalid symbol */
             dist = dists[symbol] + bits(s, dext[symbol]);
+#ifndef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
             if (dist > s->outcnt)
-                return -10;     /* distance too far back */
+                return -11;     /* distance too far back */
+#endif
 
             /* copy length bytes from distance bytes back */
             if (s->out != NIL) {
                 if (s->outcnt + len > s->outlen) return 1;
                 while (len--) {
-                    s->out[s->outcnt] = s->out[s->outcnt - dist];
+                    s->out[s->outcnt] =
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+                        dist > s->outcnt ? 0 :
+#endif
+                        s->out[s->outcnt - dist];
                     s->outcnt++;
                 }
             }
@@ -504,8 +518,7 @@ local int fixed(struct state *s)
     static int virgin = 1;
     static short lencnt[MAXBITS+1], lensym[FIXLCODES];
     static short distcnt[MAXBITS+1], distsym[MAXDCODES];
-    static struct huffman lencode = {lencnt, lensym};
-    static struct huffman distcode = {distcnt, distsym};
+    static struct huffman lencode, distcode;
 
     /* build fixed huffman tables if first call (may not be thread safe) */
     if (virgin) {
@@ -528,6 +541,12 @@ local int fixed(struct state *s)
             lengths[symbol] = 5;
         construct(&distcode, lengths, MAXDCODES);
 
+        /* construct lencode and distcode */
+        lencode.count = lencnt;
+        lencode.symbol = lensym;
+        distcode.count = distcnt;
+        distcode.symbol = distsym;
+
         /* do this just once */
         virgin = 0;
     }
@@ -631,11 +650,16 @@ local int dynamic(struct state *s)
     short lengths[MAXCODES];            /* descriptor code lengths */
     short lencnt[MAXBITS+1], lensym[MAXLCODES];         /* lencode memory */
     short distcnt[MAXBITS+1], distsym[MAXDCODES];       /* distcode memory */
-    struct huffman lencode = {lencnt, lensym};          /* length code */
-    struct huffman distcode = {distcnt, distsym};       /* distance code */
+    struct huffman lencode, distcode;   /* length and distance codes */
     static const short order[19] =      /* permutation of code length codes */
         {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
 
+    /* construct lencode and distcode */
+    lencode.count = lencnt;
+    lencode.symbol = lensym;
+    distcode.count = distcnt;
+    distcode.symbol = distsym;
+
     /* get number of lengths in each table, check lengths */
     nlen = bits(s, 5) + 257;
     ndist = bits(s, 5) + 1;
@@ -680,6 +704,10 @@ local int dynamic(struct state *s)
         }
     }
 
+    /* check for end-of-block code -- there better be one! */
+    if (lengths[256] == 0)
+        return -9;
+
     /* build huffman table for literal/length codes */
     err = construct(&lencode, lengths, nlen);
     if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1))
@@ -724,8 +752,9 @@ local int dynamic(struct state *s)
  *  -6:  dynamic block code description: repeat more than specified lengths
  *  -7:  dynamic block code description: invalid literal/length code lengths
  *  -8:  dynamic block code description: invalid distance code lengths
- *  -9:  invalid literal/length or distance code in fixed or dynamic block
- * -10:  distance is too far back in fixed or dynamic block
+ *  -9:  dynamic block code description: missing end-of-block code
+ * -10:  invalid literal/length or distance code in fixed or dynamic block
+ * -11:  distance is too far back in fixed or dynamic block
  *
  * Format notes:
  *
@@ -783,54 +812,143 @@ int puff(unsigned char *dest,           /* pointer to destination pointer */
 }
 
 #ifdef TEST
-/* Example of how to use puff() */
+/* Examples of how to use puff().
+
+   Usage: puff [-w] [-nnn] file
+          ... | puff [-w] [-nnn]
+
+   where file is the input file with deflate data, nnn is the number of bytes
+   of input to skip before inflating (e.g. to skip a zlib or gzip header), and
+   -w is used to write the decompressed data to stdout */
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 
-local unsigned char *yank(char *name, unsigned long *len)
+/* Return size times approximately the cube root of 2, keeping the result as 1,
+   3, or 5 times a power of 2 -- the result is always > size, until the result
+   is the maximum value of an unsigned long, where it remains.  This is useful
+   to keep reallocations less than ~33% over the actual data. */
+local size_t bythirds(size_t size)
+{
+    int n;
+    size_t m;
+
+    m = size;
+    for (n = 0; m; n++)
+        m >>= 1;
+    if (n < 3)
+        return size + 1;
+    n -= 3;
+    m = size >> n;
+    m += m == 6 ? 2 : 1;
+    m <<= n;
+    return m > size ? m : (size_t)(-1);
+}
+
+/* Read the input file *name, or stdin if name is NULL, into allocated memory.
+   Reallocate to larger buffers until the entire file is read in.  Return a
+   pointer to the allocated data, or NULL if there was a memory allocation
+   failure.  *len is the number of bytes of data read from the input file (even
+   if load() returns NULL).  If the input file was empty or could not be opened
+   or read, *len is zero. */
+local void *load(char *name, size_t *len)
 {
-    unsigned long size;
-    unsigned char *buf;
+    size_t size;
+    void *buf, *swap;
     FILE *in;
-    struct stat s;
 
     *len = 0;
-    if (stat(name, &s)) return NULL;
-    if ((s.st_mode & S_IFMT) != S_IFREG) return NULL;
-    size = (unsigned long)(s.st_size);
-    if (size == 0 || (off_t)size != s.st_size) return NULL;
-    in = fopen(name, "r");
-    if (in == NULL) return NULL;
-    buf = malloc(size);
-    if (buf != NULL && fread(buf, 1, size, in) != size) {
-        free(buf);
-        buf = NULL;
+    buf = malloc(size = 4096);
+    if (buf == NULL)
+        return NULL;
+    in = name == NULL ? stdin : fopen(name, "rb");
+    if (in != NULL) {
+        for (;;) {
+            *len += fread((char *)buf + *len, 1, size - *len, in);
+            if (*len < size) break;
+            size = bythirds(size);
+            if (size == *len || (swap = realloc(buf, size)) == NULL) {
+                free(buf);
+                buf = NULL;
+                break;
+            }
+            buf = swap;
+        }
+        fclose(in);
     }
-    fclose(in);
-    *len = size;
     return buf;
 }
 
 int main(int argc, char **argv)
 {
-    int ret;
-    unsigned char *source;
-    unsigned long len, sourcelen, destlen;
-
-    if (argc < 2) return 2;
-    source = yank(argv[1], &len);
-    if (source == NULL) return 2;
-    sourcelen = len;
-    ret = puff(NIL, &destlen, source, &sourcelen);
+    int ret, put = 0;
+    unsigned skip = 0;
+    char *arg, *name = NULL;
+    unsigned char *source = NULL, *dest;
+    size_t len = 0;
+    unsigned long sourcelen, destlen;
+
+    /* process arguments */
+    while (arg = *++argv, --argc)
+        if (arg[0] == '-') {
+            if (arg[1] == 'w' && arg[2] == 0)
+                put = 1;
+            else if (arg[1] >= '0' && arg[1] <= '9')
+                skip = (unsigned)atoi(arg + 1);
+            else {
+                fprintf(stderr, "invalid option %s\n", arg);
+                return 3;
+            }
+        }
+        else if (name != NULL) {
+            fprintf(stderr, "only one file name allowed\n");
+            return 3;
+        }
+        else
+            name = arg;
+    source = load(name, &len);
+    if (source == NULL) {
+        fprintf(stderr, "memory allocation failure\n");
+        return 4;
+    }
+    if (len == 0) {
+        fprintf(stderr, "could not read %s, or it was empty\n",
+                name == NULL ? "<stdin>" : name);
+        free(source);
+        return 3;
+    }
+    if (skip >= len) {
+        fprintf(stderr, "skip request of %d leaves no input\n", skip);
+        free(source);
+        return 3;
+    }
+
+    /* test inflate data with offset skip */
+    len -= skip;
+    sourcelen = (unsigned long)len;
+    ret = puff(NIL, &destlen, source + skip, &sourcelen);
     if (ret)
-        printf("puff() failed with return code %d\n", ret);
+        fprintf(stderr, "puff() failed with return code %d\n", ret);
     else {
-        printf("puff() succeeded uncompressing %lu bytes\n", destlen);
-        if (sourcelen < len) printf("%lu compressed bytes unused\n",
-                                    len - sourcelen);
+        fprintf(stderr, "puff() succeeded uncompressing %lu bytes\n", destlen);
+        if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n",
+                                     len - sourcelen);
+    }
+
+    /* if requested, inflate again and write decompressd data to stdout */
+    if (put) {
+        dest = malloc(destlen);
+        if (dest == NULL) {
+            fprintf(stderr, "memory allocation failure\n");
+            free(source);
+            return 4;
+        }
+        puff(dest, &destlen, source + skip, &sourcelen);
+        fwrite(dest, 1, destlen, stdout);
+        free(dest);
     }
+
+    /* clean up */
     free(source);
     return ret;
 }
diff --git a/libsrc/zlib/contrib/puff/puff.h b/libsrc/zlib/contrib/puff/puff.h
index ef61252..88d1b38 100644
--- a/libsrc/zlib/contrib/puff/puff.h
+++ b/libsrc/zlib/contrib/puff/puff.h
@@ -1,6 +1,6 @@
 /* puff.h
-  Copyright (C) 2002, 2003 Mark Adler, all rights reserved
-  version 1.7, 3 Mar 2002
+  Copyright (C) 2002-2010 Mark Adler, all rights reserved
+  version 2.1, 4 Apr 2010
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the author be held liable for any damages
diff --git a/libsrc/zlib/contrib/testzlib/testzlib.c b/libsrc/zlib/contrib/testzlib/testzlib.c
index 08a4b4b..135888e 100644
--- a/libsrc/zlib/contrib/testzlib/testzlib.c
+++ b/libsrc/zlib/contrib/testzlib/testzlib.c
@@ -1,275 +1,275 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#include "zlib.h"
-
-
-void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
-{
-    R->HighPart = A.HighPart - B.HighPart;
-    if (A.LowPart >= B.LowPart)
-        R->LowPart = A.LowPart - B.LowPart;
-    else
-    {
-        R->LowPart = A.LowPart - B.LowPart;
-        R->HighPart --;
-    }
-}
-
-#ifdef _M_X64
-// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
-unsigned __int64 __rdtsc(void);
-void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
-{
- //   printf("rdtsc = %I64x\n",__rdtsc());
-   pbeginTime64->QuadPart=__rdtsc();
-}
-
-LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER LIres;
-    unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
-    LIres.QuadPart=res;
-   // printf("rdtsc = %I64x\n",__rdtsc());
-    return LIres;
-}
-#else
-#ifdef _M_IX86
-void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
-{
-    DWORD dwEdx,dwEax;
-    _asm
-    {
-        rdtsc
-        mov dwEax,eax
-        mov dwEdx,edx
-    }
-    pbeginTime64->LowPart=dwEax;
-    pbeginTime64->HighPart=dwEdx;
-}
-
-void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
-{
-    myGetRDTSC32(pbeginTime64);
-}
-
-LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER LIres,endTime64;
-    myGetRDTSC32(&endTime64);
-
-    LIres.LowPart=LIres.HighPart=0;
-    MyDoMinus64(&LIres,endTime64,beginTime64);
-    return LIres;
-}
-#else
-void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
-{
-}
-
-void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
-{
-}
-
-LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER lr;
-    lr.QuadPart=0;
-    return lr;
-}
-#endif
-#endif
-
-void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
-{
-    if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
-    {
-        pbeginTime64->LowPart = GetTickCount();
-        pbeginTime64->HighPart = 0;
-    }
-}
-
-DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER endTime64,ticksPerSecond,ticks;
-    DWORDLONG ticksShifted,tickSecShifted;
-    DWORD dwLog=16+0;
-    DWORD dwRet;
-    if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
-        dwRet = (GetTickCount() - beginTime64.LowPart)*1;
-    else
-    {
-        MyDoMinus64(&ticks,endTime64,beginTime64);
-        QueryPerformanceFrequency(&ticksPerSecond);
-
-    
-        {
-            ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
-            tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
-        
-        } 
-
-        dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
-        dwRet *=1;
-    }
-    return dwRet;
-}
-
-int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr)
-{
-    FILE* stream;
-    void* ptr;
-    int retVal=1;
-    stream=fopen(filename, "rb");
-    if (stream==NULL)
-        return 0;
-
-    fseek(stream,0,SEEK_END);
-
-    *plFileSize=ftell(stream);
-    fseek(stream,0,SEEK_SET);
-    ptr=malloc((*plFileSize)+1);
-    if (ptr==NULL)
-        retVal=0;
-    else
-    {
-        if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
-            retVal=0;
-    }
-    fclose(stream);
-    *pFilePtr=ptr;
-    return retVal;
-}
-
-int main(int argc, char *argv[])
-{
-    int BlockSizeCompress=0x8000;
-    int BlockSizeUncompress=0x8000;
-    int cprLevel=Z_DEFAULT_COMPRESSION ;
-    long lFileSize;
-    unsigned char* FilePtr;
-    long lBufferSizeCpr;
-    long lBufferSizeUncpr;
-    long lCompressedSize=0;
-    unsigned char* CprPtr;
-    unsigned char* UncprPtr;
-    long lSizeCpr,lSizeUncpr;
-    DWORD dwGetTick,dwMsecQP;
-    LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
-
-    if (argc<=1)
-    {
-        printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
-        return 0;
-    }
-
-    if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
-    {
-        printf("error reading %s\n",argv[1]);
-        return 1;
-    }
-    else printf("file %s read, %u bytes\n",argv[1],lFileSize);
-
-    if (argc>=3)
-        BlockSizeCompress=atol(argv[2]);
-
-    if (argc>=4)
-        BlockSizeUncompress=atol(argv[3]);
-
-    if (argc>=5)
-        cprLevel=(int)atol(argv[4]);
-
-    lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
-    lBufferSizeUncpr = lBufferSizeCpr;
-
-    CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
-
-    BeginCountPerfCounter(&li_qp,TRUE);
-    dwGetTick=GetTickCount();
-    BeginCountRdtsc(&li_rdtsc);
-    {
-        z_stream zcpr;
-        int ret=Z_OK;
-        long lOrigToDo = lFileSize;
-        long lOrigDone = 0;
-        int step=0;
-        memset(&zcpr,0,sizeof(z_stream));
-        deflateInit(&zcpr,cprLevel);
-
-        zcpr.next_in = FilePtr;
-        zcpr.next_out = CprPtr;
-
-
-        do
-        {
-            long all_read_before = zcpr.total_in;
-            zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
-            zcpr.avail_out = BlockSizeCompress;
-            ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
-            lOrigDone += (zcpr.total_in-all_read_before);
-            lOrigToDo -= (zcpr.total_in-all_read_before);
-            step++;
-        } while (ret==Z_OK);
-
-        lSizeCpr=zcpr.total_out;
-        deflateEnd(&zcpr);
-        dwGetTick=GetTickCount()-dwGetTick;
-        dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
-        dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
-        printf("total compress size = %u, in %u step\n",lSizeCpr,step);
-        printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
-        printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
-        printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
-    }
-
-    CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
-    UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
-
-    BeginCountPerfCounter(&li_qp,TRUE);
-    dwGetTick=GetTickCount();
-    BeginCountRdtsc(&li_rdtsc);
-    {
-        z_stream zcpr;
-        int ret=Z_OK;
-        long lOrigToDo = lSizeCpr;
-        long lOrigDone = 0;
-        int step=0;
-        memset(&zcpr,0,sizeof(z_stream));
-        inflateInit(&zcpr);
-
-        zcpr.next_in = CprPtr;
-        zcpr.next_out = UncprPtr;
-
-
-        do
-        {
-            long all_read_before = zcpr.total_in;
-            zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
-            zcpr.avail_out = BlockSizeUncompress;
-            ret=inflate(&zcpr,Z_SYNC_FLUSH);
-            lOrigDone += (zcpr.total_in-all_read_before);
-            lOrigToDo -= (zcpr.total_in-all_read_before);
-            step++;
-        } while (ret==Z_OK);
-
-        lSizeUncpr=zcpr.total_out;
-        inflateEnd(&zcpr);
-        dwGetTick=GetTickCount()-dwGetTick;
-        dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
-        dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
-        printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
-        printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
-        printf("uncpr  time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
-        printf("uncpr  result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
-    }
-
-    if (lSizeUncpr==lFileSize)
-    {
-        if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
-            printf("compare ok\n");
-
-    }
-
-    return 0;
-}
+#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+
+#include "zlib.h"
+
+
+void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
+{
+    R->HighPart = A.HighPart - B.HighPart;
+    if (A.LowPart >= B.LowPart)
+        R->LowPart = A.LowPart - B.LowPart;
+    else
+    {
+        R->LowPart = A.LowPart - B.LowPart;
+        R->HighPart --;
+    }
+}
+
+#ifdef _M_X64
+// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
+unsigned __int64 __rdtsc(void);
+void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
+{
+ //   printf("rdtsc = %I64x\n",__rdtsc());
+   pbeginTime64->QuadPart=__rdtsc();
+}
+
+LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+    LARGE_INTEGER LIres;
+    unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
+    LIres.QuadPart=res;
+   // printf("rdtsc = %I64x\n",__rdtsc());
+    return LIres;
+}
+#else
+#ifdef _M_IX86
+void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
+{
+    DWORD dwEdx,dwEax;
+    _asm
+    {
+        rdtsc
+        mov dwEax,eax
+        mov dwEdx,edx
+    }
+    pbeginTime64->LowPart=dwEax;
+    pbeginTime64->HighPart=dwEdx;
+}
+
+void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
+{
+    myGetRDTSC32(pbeginTime64);
+}
+
+LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+    LARGE_INTEGER LIres,endTime64;
+    myGetRDTSC32(&endTime64);
+
+    LIres.LowPart=LIres.HighPart=0;
+    MyDoMinus64(&LIres,endTime64,beginTime64);
+    return LIres;
+}
+#else
+void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
+{
+}
+
+void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
+{
+}
+
+LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+    LARGE_INTEGER lr;
+    lr.QuadPart=0;
+    return lr;
+}
+#endif
+#endif
+
+void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
+{
+    if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
+    {
+        pbeginTime64->LowPart = GetTickCount();
+        pbeginTime64->HighPart = 0;
+    }
+}
+
+DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
+{
+    LARGE_INTEGER endTime64,ticksPerSecond,ticks;
+    DWORDLONG ticksShifted,tickSecShifted;
+    DWORD dwLog=16+0;
+    DWORD dwRet;
+    if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
+        dwRet = (GetTickCount() - beginTime64.LowPart)*1;
+    else
+    {
+        MyDoMinus64(&ticks,endTime64,beginTime64);
+        QueryPerformanceFrequency(&ticksPerSecond);
+
+
+        {
+            ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
+            tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
+
+        }
+
+        dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
+        dwRet *=1;
+    }
+    return dwRet;
+}
+
+int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr)
+{
+    FILE* stream;
+    void* ptr;
+    int retVal=1;
+    stream=fopen(filename, "rb");
+    if (stream==NULL)
+        return 0;
+
+    fseek(stream,0,SEEK_END);
+
+    *plFileSize=ftell(stream);
+    fseek(stream,0,SEEK_SET);
+    ptr=malloc((*plFileSize)+1);
+    if (ptr==NULL)
+        retVal=0;
+    else
+    {
+        if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
+            retVal=0;
+    }
+    fclose(stream);
+    *pFilePtr=ptr;
+    return retVal;
+}
+
+int main(int argc, char *argv[])
+{
+    int BlockSizeCompress=0x8000;
+    int BlockSizeUncompress=0x8000;
+    int cprLevel=Z_DEFAULT_COMPRESSION ;
+    long lFileSize;
+    unsigned char* FilePtr;
+    long lBufferSizeCpr;
+    long lBufferSizeUncpr;
+    long lCompressedSize=0;
+    unsigned char* CprPtr;
+    unsigned char* UncprPtr;
+    long lSizeCpr,lSizeUncpr;
+    DWORD dwGetTick,dwMsecQP;
+    LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
+
+    if (argc<=1)
+    {
+        printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
+        return 0;
+    }
+
+    if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
+    {
+        printf("error reading %s\n",argv[1]);
+        return 1;
+    }
+    else printf("file %s read, %u bytes\n",argv[1],lFileSize);
+
+    if (argc>=3)
+        BlockSizeCompress=atol(argv[2]);
+
+    if (argc>=4)
+        BlockSizeUncompress=atol(argv[3]);
+
+    if (argc>=5)
+        cprLevel=(int)atol(argv[4]);
+
+    lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
+    lBufferSizeUncpr = lBufferSizeCpr;
+
+    CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
+
+    BeginCountPerfCounter(&li_qp,TRUE);
+    dwGetTick=GetTickCount();
+    BeginCountRdtsc(&li_rdtsc);
+    {
+        z_stream zcpr;
+        int ret=Z_OK;
+        long lOrigToDo = lFileSize;
+        long lOrigDone = 0;
+        int step=0;
+        memset(&zcpr,0,sizeof(z_stream));
+        deflateInit(&zcpr,cprLevel);
+
+        zcpr.next_in = FilePtr;
+        zcpr.next_out = CprPtr;
+
+
+        do
+        {
+            long all_read_before = zcpr.total_in;
+            zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
+            zcpr.avail_out = BlockSizeCompress;
+            ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
+            lOrigDone += (zcpr.total_in-all_read_before);
+            lOrigToDo -= (zcpr.total_in-all_read_before);
+            step++;
+        } while (ret==Z_OK);
+
+        lSizeCpr=zcpr.total_out;
+        deflateEnd(&zcpr);
+        dwGetTick=GetTickCount()-dwGetTick;
+        dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
+        dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
+        printf("total compress size = %u, in %u step\n",lSizeCpr,step);
+        printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
+        printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
+        printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
+    }
+
+    CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
+    UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
+
+    BeginCountPerfCounter(&li_qp,TRUE);
+    dwGetTick=GetTickCount();
+    BeginCountRdtsc(&li_rdtsc);
+    {
+        z_stream zcpr;
+        int ret=Z_OK;
+        long lOrigToDo = lSizeCpr;
+        long lOrigDone = 0;
+        int step=0;
+        memset(&zcpr,0,sizeof(z_stream));
+        inflateInit(&zcpr);
+
+        zcpr.next_in = CprPtr;
+        zcpr.next_out = UncprPtr;
+
+
+        do
+        {
+            long all_read_before = zcpr.total_in;
+            zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
+            zcpr.avail_out = BlockSizeUncompress;
+            ret=inflate(&zcpr,Z_SYNC_FLUSH);
+            lOrigDone += (zcpr.total_in-all_read_before);
+            lOrigToDo -= (zcpr.total_in-all_read_before);
+            step++;
+        } while (ret==Z_OK);
+
+        lSizeUncpr=zcpr.total_out;
+        inflateEnd(&zcpr);
+        dwGetTick=GetTickCount()-dwGetTick;
+        dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
+        dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
+        printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
+        printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
+        printf("uncpr  time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
+        printf("uncpr  result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
+    }
+
+    if (lSizeUncpr==lFileSize)
+    {
+        if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
+            printf("compare ok\n");
+
+    }
+
+    return 0;
+}
diff --git a/libsrc/zlib/contrib/vstudio/readme.txt b/libsrc/zlib/contrib/vstudio/readme.txt
index 16159f9..904888b 100644
--- a/libsrc/zlib/contrib/vstudio/readme.txt
+++ b/libsrc/zlib/contrib/vstudio/readme.txt
@@ -1,8 +1,8 @@
-Building instructions for the DLL versions of Zlib 1.2.3
+Building instructions for the DLL versions of Zlib 1.2.4
 ========================================================
 
 This directory contains projects that build zlib and minizip using
-Microsoft Visual C++ 7.0/7.1, and Visual C++ .
+Microsoft Visual C++ 9.0/10.0, and Visual C++ .
 
 You don't need to build these projects yourself. You can download the
 binaries from:
@@ -10,36 +10,23 @@ binaries from:
 
 More information can be found at this site.
 
+first compile assembly code by running
+bld_ml64.bat in contrib\masmx64
+bld_ml32.bat in contrib\masmx86
+
 
-Build instructions for Visual Studio 7.x (32 bits)
---------------------------------------------------
-- Uncompress current zlib, including all contrib/* files
-- Download the crtdll library from
-    http://www.winimage.com/zLibDll/crtdll.zip
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc7.
-- Open contrib\vstudio\vc7\zlibvc.sln with Microsoft Visual C++ 7.x
-  (Visual Studio .Net 2002 or 2003).
 
-Build instructions for Visual Studio 2005 (32 bits or 64 bits)
+
+Build instructions for Visual Studio 2008 (32 bits or 64 bits)
 --------------------------------------------------------------
 - Uncompress current zlib, including all contrib/* files
-- For 32 bits only: download the crtdll library from
-    http://www.winimage.com/zLibDll/crtdll.zip
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc8.
-- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0
-
-Build instructions for Visual Studio 2005 64 bits, PSDK compiler
-----------------------------------------------------------------
-at the time of writing this text file, Visual Studio 2005 (and 
-  Microsoft Visual C++ 8.0) is on the beta 2 stage.
-Using you can get the free 64 bits compiler from Platform SDK, 
-  which is NOT a beta, and compile using the Visual studio 2005 IDE
-see http://www.winimage.com/misc/sdk64onvs2005/ for instruction
+- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008.0
+- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
 
+Build instructions for Visual Studio 2010 (32 bits or 64 bits)
+--------------------------------------------------------------
 - Uncompress current zlib, including all contrib/* files
-- start Visual Studio 2005 from a platform SDK command prompt, using
-  the /useenv switch
-- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0
+- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010.0
 
 
 Important
diff --git a/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj b/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj
new file mode 100644
index 0000000..74e15c9
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Itanium">
+      <Configuration>Debug</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Itanium">
+      <Configuration>Release</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\minizip\miniunz.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="zlibvc.vcxproj">
+      <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters b/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters
new file mode 100644
index 0000000..0b2a3de
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{048af943-022b-4db6-beeb-a54c34774ee2}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{c1d600d2-888f-4aea-b73e-8b0dd9befa0c}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{0844199a-966b-4f19-81db-1e0125e141b9}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\minizip\miniunz.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user b/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj b/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj
new file mode 100644
index 0000000..917e156
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Itanium">
+      <Configuration>Debug</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Itanium">
+      <Configuration>Release</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)minizip.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)minizip.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)minizip.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)minizip.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)minizip.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)minizip.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\minizip\minizip.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="zlibvc.vcxproj">
+      <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters b/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters
new file mode 100644
index 0000000..dd73cd3
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{c0419b40-bf50-40da-b153-ff74215b79de}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{bb87b070-735b-478e-92ce-7383abb2f36c}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{f46ab6a6-548f-43cb-ae96-681abb5bd5db}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\minizip\minizip.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj.user b/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/minizip.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj b/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj
new file mode 100644
index 0000000..9088d17
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Itanium">
+      <Configuration>Debug</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Itanium">
+      <Configuration>Release</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+    <RootNamespace>testzlib</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlib$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\adler32.c" />
+    <ClCompile Include="..\..\..\compress.c" />
+    <ClCompile Include="..\..\..\crc32.c" />
+    <ClCompile Include="..\..\..\deflate.c" />
+    <ClCompile Include="..\..\..\infback.c" />
+    <ClCompile Include="..\..\masmx64\inffas8664.c">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inffast.c" />
+    <ClCompile Include="..\..\..\inflate.c" />
+    <ClCompile Include="..\..\..\inftrees.c" />
+    <ClCompile Include="..\..\testzlib\testzlib.c" />
+    <ClCompile Include="..\..\..\trees.c" />
+    <ClCompile Include="..\..\..\uncompr.c" />
+    <ClCompile Include="..\..\..\zutil.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters b/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters
new file mode 100644
index 0000000..249daa8
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{c1f6a2e3-5da5-4955-8653-310d3efe05a9}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{c2aaffdc-2c95-4d6f-8466-4bec5890af2c}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{c274fe07-05f2-461c-964b-f6341e4e7eb5}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\adler32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\compress.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\crc32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\deflate.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\infback.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\masmx64\inffas8664.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inffast.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inflate.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inftrees.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\testzlib\testzlib.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\trees.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\uncompr.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\zutil.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user b/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj b/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj
new file mode 100644
index 0000000..2d62815
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Itanium">
+      <Configuration>Debug</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Itanium">
+      <Configuration>Release</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\testzlib\testzlib.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="zlibvc.vcxproj">
+      <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters
new file mode 100644
index 0000000..53a8693
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{fa61a89f-93fc-4c89-b29e-36224b7592f4}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{d4b85da0-2ba2-4934-b57f-e2584e3848ee}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{e573e075-00bd-4a7d-bd67-a8cc9bfc5aca}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\testzlib\testzlib.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user b/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlib.rc b/libsrc/zlib/contrib/vstudio/vc10/zlib.rc
new file mode 100644
index 0000000..f822450
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1  1
+IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
+  FILEVERSION	 1,2,5,0
+  PRODUCTVERSION 1,2,5,0
+  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
+  FILEFLAGS	0
+  FILEOS	VOS_DOS_WINDOWS32
+  FILETYPE	VFT_DLL
+  FILESUBTYPE	0	// not used
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904E4"
+    //language ID = U.S. English, char set = Windows, Multilingual
+
+    BEGIN
+      VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+      VALUE "FileVersion",	"1.2.5\0"
+      VALUE "InternalName",	"zlib\0"
+      VALUE "OriginalFilename",	"zlib.dll\0"
+      VALUE "ProductName",	"ZLib.DLL\0"
+      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+      VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x0409, 1252
+  END
+END
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj b/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj
new file mode 100644
index 0000000..2682fca
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj
@@ -0,0 +1,457 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Itanium">
+      <Configuration>Debug</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Itanium">
+      <Configuration>Release</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>OldStyle</DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>OldStyle</DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>OldStyle</DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+    <Midl>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Lib>
+      <AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\adler32.c" />
+    <ClCompile Include="..\..\..\compress.c" />
+    <ClCompile Include="..\..\..\crc32.c" />
+    <ClCompile Include="..\..\..\deflate.c" />
+    <ClCompile Include="..\..\..\gzclose.c" />
+    <ClCompile Include="..\..\..\gzlib.c" />
+    <ClCompile Include="..\..\..\gzread.c" />
+    <ClCompile Include="..\..\..\gzwrite.c" />
+    <ClCompile Include="..\..\..\infback.c" />
+    <ClCompile Include="..\..\masmx64\inffas8664.c">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inffast.c" />
+    <ClCompile Include="..\..\..\inflate.c" />
+    <ClCompile Include="..\..\..\inftrees.c" />
+    <ClCompile Include="..\..\minizip\ioapi.c" />
+    <ClCompile Include="..\..\..\trees.c" />
+    <ClCompile Include="..\..\..\uncompr.c" />
+    <ClCompile Include="..\..\minizip\unzip.c" />
+    <ClCompile Include="..\..\minizip\zip.c" />
+    <ClCompile Include="..\..\..\zutil.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="zlib.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="zlibvc.def" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters
new file mode 100644
index 0000000..c8c7f7e
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\adler32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\compress.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\crc32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\deflate.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzclose.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzlib.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzread.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzwrite.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\infback.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\masmx64\inffas8664.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inffast.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inflate.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inftrees.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\ioapi.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\trees.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\uncompr.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\unzip.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\zip.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\zutil.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="zlib.rc">
+      <Filter>Source Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="zlibvc.def">
+      <Filter>Source Files</Filter>
+    </None>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user b/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibvc.def b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.def
new file mode 100644
index 0000000..0269ef7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.def
@@ -0,0 +1,130 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION		1.24
+
+EXPORTS
+        adler32                                  @1
+        compress                                 @2
+        crc32                                    @3
+        deflate                                  @4
+        deflateCopy                              @5
+        deflateEnd                               @6
+        deflateInit2_                            @7
+        deflateInit_                             @8
+        deflateParams                            @9
+        deflateReset                             @10
+        deflateSetDictionary                     @11
+        gzclose                                  @12
+        gzdopen                                  @13
+        gzerror                                  @14
+        gzflush                                  @15
+        gzopen                                   @16
+        gzread                                   @17
+        gzwrite                                  @18
+        inflate                                  @19
+        inflateEnd                               @20
+        inflateInit2_                            @21
+        inflateInit_                             @22
+        inflateReset                             @23
+        inflateSetDictionary                     @24
+        inflateSync                              @25
+        uncompress                               @26
+        zlibVersion                              @27
+        gzprintf                                 @28
+        gzputc                                   @29
+        gzgetc                                   @30
+        gzseek                                   @31
+        gzrewind                                 @32
+        gztell                                   @33
+        gzeof                                    @34
+        gzsetparams                              @35
+        zError                                   @36
+        inflateSyncPoint                         @37
+        get_crc_table                            @38
+        compress2                                @39
+        gzputs                                   @40
+        gzgets                                   @41
+        inflateCopy                              @42
+        inflateBackInit_                         @43
+        inflateBack                              @44
+        inflateBackEnd                           @45
+        compressBound                            @46
+        deflateBound                             @47
+        gzclearerr                               @48
+        gzungetc                                 @49
+        zlibCompileFlags                         @50
+        deflatePrime                             @51
+
+        unzOpen                                  @61
+        unzClose                                 @62
+        unzGetGlobalInfo                         @63
+        unzGetCurrentFileInfo                    @64
+        unzGoToFirstFile                         @65
+        unzGoToNextFile                          @66
+        unzOpenCurrentFile                       @67
+        unzReadCurrentFile                       @68
+        unzOpenCurrentFile3                      @69
+        unztell                                  @70
+        unzeof                                   @71
+        unzCloseCurrentFile                      @72
+        unzGetGlobalComment                      @73
+        unzStringFileNameCompare                 @74
+        unzLocateFile                            @75
+        unzGetLocalExtrafield                    @76
+        unzOpen2                                 @77
+        unzOpenCurrentFile2                      @78
+        unzOpenCurrentFilePassword               @79
+
+        zipOpen                                  @80
+        zipOpenNewFileInZip                      @81
+        zipWriteInFileInZip                      @82
+        zipCloseFileInZip                        @83
+        zipClose                                 @84
+        zipOpenNewFileInZip2                     @86
+        zipCloseFileInZipRaw                     @87
+        zipOpen2                                 @88
+        zipOpenNewFileInZip3                     @89
+
+        unzGetFilePos                            @100
+        unzGoToFilePos                           @101
+
+        fill_win32_filefunc                      @110
+
+; zlibwapi v1.2.4 added:
+        fill_win32_filefunc64                   @111
+        fill_win32_filefunc64A                  @112
+        fill_win32_filefunc64W                  @113
+
+        unzOpen64                               @120
+        unzOpen2_64                             @121
+        unzGetGlobalInfo64                      @122
+        unzGetCurrentFileInfo64                 @124
+        unzGetCurrentFileZStreamPos64           @125
+        unztell64                               @126
+        unzGetFilePos64                         @127
+        unzGoToFilePos64                        @128
+
+        zipOpen64                               @130
+        zipOpen2_64                             @131
+        zipOpenNewFileInZip64                   @132
+        zipOpenNewFileInZip2_64                 @133
+        zipOpenNewFileInZip3_64                 @134
+        zipOpenNewFileInZip4_64                 @135
+        zipCloseFileInZipRaw64                  @136
+
+; zlib1 v1.2.4 added:
+        adler32_combine                         @140
+        crc32_combine                           @142
+        deflateSetHeader                        @144
+        deflateTune                             @145
+        gzbuffer                                @146
+        gzclose_r                               @147
+        gzclose_w                               @148
+        gzdirect                                @149
+        gzoffset                                @150
+        inflateGetHeader                        @156
+        inflateMark                             @157
+        inflatePrime                            @158
+        inflateReset2                           @159
+        inflateUndermine                        @160
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibvc.sln b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.sln
new file mode 100644
index 0000000..6f6ffd5
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.sln
@@ -0,0 +1,135 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Itanium = Debug|Itanium
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Itanium = Release|Itanium
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
+		ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
+		ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj
new file mode 100644
index 0000000..9862398
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj
@@ -0,0 +1,659 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Itanium">
+      <Configuration>Debug</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+      <Configuration>ReleaseWithoutAsm</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Itanium">
+      <Configuration>Release</Configuration>
+      <Platform>Itanium</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibDll$(Configuration)\Tmp\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+    <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</GenerateManifest>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerOutput>All</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerOutput>All</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+    <Midl>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerOutput>All</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerOutput>All</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerOutput>All</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+    <Midl>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Itanium</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+      <AssemblerOutput>All</AssemblerOutput>
+      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+      <ObjectFileName>$(IntDir)</ObjectFileName>
+      <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x040c</Culture>
+    </ResourceCompile>
+    <Link>
+      <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+      <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+      <GenerateMapFile>true</GenerateMapFile>
+      <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+      <TargetMachine>MachineIA64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\adler32.c" />
+    <ClCompile Include="..\..\..\compress.c" />
+    <ClCompile Include="..\..\..\crc32.c" />
+    <ClCompile Include="..\..\..\deflate.c" />
+    <ClCompile Include="..\..\..\gzclose.c" />
+    <ClCompile Include="..\..\..\gzlib.c" />
+    <ClCompile Include="..\..\..\gzread.c" />
+    <ClCompile Include="..\..\..\gzwrite.c" />
+    <ClCompile Include="..\..\..\infback.c" />
+    <ClCompile Include="..\..\masmx64\inffas8664.c">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inffast.c" />
+    <ClCompile Include="..\..\..\inflate.c" />
+    <ClCompile Include="..\..\..\inftrees.c" />
+    <ClCompile Include="..\..\minizip\ioapi.c" />
+    <ClCompile Include="..\..\minizip\iowin32.c" />
+    <ClCompile Include="..\..\..\trees.c" />
+    <ClCompile Include="..\..\..\uncompr.c" />
+    <ClCompile Include="..\..\minizip\unzip.c">
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\zip.c">
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ClCompile Include="..\..\..\zutil.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="zlib.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="zlibvc.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\deflate.h" />
+    <ClInclude Include="..\..\..\infblock.h" />
+    <ClInclude Include="..\..\..\infcodes.h" />
+    <ClInclude Include="..\..\..\inffast.h" />
+    <ClInclude Include="..\..\..\inftrees.h" />
+    <ClInclude Include="..\..\..\infutil.h" />
+    <ClInclude Include="..\..\..\zconf.h" />
+    <ClInclude Include="..\..\..\zlib.h" />
+    <ClInclude Include="..\..\..\zutil.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters
new file mode 100644
index 0000000..180b71c
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{07934a85-8b61-443d-a0ee-b2eedb74f3cd}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{1d99675b-433d-4a21-9e50-ed4ab8b19762}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;fi;fd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{431c0958-fa71-44d0-9084-2d19d100c0cc}</UniqueIdentifier>
+      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\adler32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\compress.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\crc32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\deflate.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzclose.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzlib.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzread.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\gzwrite.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\infback.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\masmx64\inffas8664.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inffast.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inflate.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\inftrees.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\ioapi.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\iowin32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\trees.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\uncompr.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\unzip.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\minizip\zip.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\zutil.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="zlib.rc">
+      <Filter>Source Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="zlibvc.def">
+      <Filter>Source Files</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\deflate.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\infblock.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\infcodes.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\inffast.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\inftrees.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\infutil.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\zconf.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\zlib.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\zutil.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file
diff --git a/libsrc/zlib/contrib/vstudio/vc7/miniunz.vcproj b/libsrc/zlib/contrib/vstudio/vc7/miniunz.vcproj
deleted file mode 100644
index ad5117c..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/miniunz.vcproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="miniunz"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\..\minizip\miniunz.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="ReleaseDll\zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc7/minizip.vcproj b/libsrc/zlib/contrib/vstudio/vc7/minizip.vcproj
deleted file mode 100644
index fb5b632..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/minizip.vcproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="minizip"
-	ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\..\minizip\minizip.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="ReleaseDll\zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc7/testzlib.vcproj b/libsrc/zlib/contrib/vstudio/vc7/testzlib.vcproj
deleted file mode 100644
index 97bc3e8..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/testzlib.vcproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="testZlibDll"
-	ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\..\testzlib\testzlib.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="ReleaseDll\zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc7/zlib.rc b/libsrc/zlib/contrib/vstudio/vc7/zlib.rc
deleted file mode 100644
index 72cb8b4..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/zlib.rc
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1  1
-IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-  FILEVERSION	 1,2,3,0
-  PRODUCTVERSION 1,2,3,0
-  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
-  FILEFLAGS	0
-  FILEOS	VOS_DOS_WINDOWS32
-  FILETYPE	VFT_DLL
-  FILESUBTYPE	0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-
-    BEGIN
-      VALUE "FileDescription", "zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.3.0\0"
-      VALUE "InternalName",	"zlib\0"
-      VALUE "OriginalFilename",	"zlib.dll\0"
-      VALUE "ProductName",	"ZLib.DLL\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
diff --git a/libsrc/zlib/contrib/vstudio/vc7/zlibstat.vcproj b/libsrc/zlib/contrib/vstudio/vc7/zlibstat.vcproj
deleted file mode 100644
index 766d7a4..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/zlibstat.vcproj
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="zlibstat"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\zlibstatDebug"
-			IntermediateDirectory=".\zlibstatDebug"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="5"
-				PrecompiledHeaderFile=".\zlibstatDebug/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstatDebug/"
-				ObjectFile=".\zlibstatDebug/"
-				ProgramDataBaseFileName=".\zlibstatDebug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/NODEFAULTLIB "
-				OutputFile=".\zlibstatDebug\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseAxp|Win32"
-			OutputDirectory=".\zlibsta0"
-			IntermediateDirectory=".\zlibsta0"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibsta0/zlibstat.pch"
-				AssemblerListingLocation=".\zlibsta0/"
-				ObjectFile=".\zlibsta0/"
-				ProgramDataBaseFileName=".\zlibsta0/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/NODEFAULTLIB "
-				OutputFile=".\zlibsta0\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\zlibstat"
-			IntermediateDirectory=".\zlibstat"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;ASMV;ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstat/"
-				ObjectFile=".\zlibstat/"
-				ProgramDataBaseFileName=".\zlibstat/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj /NODEFAULTLIB "
-				OutputFile=".\zlibstat\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="zlibstatWithoutAsm"
-			IntermediateDirectory="zlibstatWithoutAsm"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstatWithoutAsm/"
-				ObjectFile=".\zlibstatWithoutAsm/"
-				ProgramDataBaseFileName=".\zlibstatWithoutAsm/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /NODEFAULTLIB "
-				OutputFile=".\zlibstatWithoutAsm\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="">
-			<File
-				RelativePath="..\..\..\adler32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c">
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c">
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c">
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c">
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c">
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c">
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c">
-			</File>
-			<File
-				RelativePath=".\zlib.rc">
-			</File>
-			<File
-				RelativePath=".\zlibvc.def">
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c">
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc7/zlibvc.def b/libsrc/zlib/contrib/vstudio/vc7/zlibvc.def
deleted file mode 100644
index a40e715..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/zlibvc.def
+++ /dev/null
@@ -1,92 +0,0 @@
-
-VERSION		1.23
-
-HEAPSIZE	1048576,8192
-
-EXPORTS
-        adler32                                  @1
-        compress                                 @2
-        crc32                                    @3
-        deflate                                  @4
-        deflateCopy                              @5
-        deflateEnd                               @6
-        deflateInit2_                            @7
-        deflateInit_                             @8
-        deflateParams                            @9
-        deflateReset                             @10
-        deflateSetDictionary                     @11
-        gzclose                                  @12
-        gzdopen                                  @13
-        gzerror                                  @14
-        gzflush                                  @15
-        gzopen                                   @16
-        gzread                                   @17
-        gzwrite                                  @18
-        inflate                                  @19
-        inflateEnd                               @20
-        inflateInit2_                            @21
-        inflateInit_                             @22
-        inflateReset                             @23
-        inflateSetDictionary                     @24
-        inflateSync                              @25
-        uncompress                               @26
-        zlibVersion                              @27
-        gzprintf                                 @28
-        gzputc                                   @29
-        gzgetc                                   @30
-        gzseek                                   @31
-        gzrewind                                 @32
-        gztell                                   @33
-        gzeof                                    @34
-        gzsetparams                              @35
-        zError                                   @36
-        inflateSyncPoint                         @37
-        get_crc_table                            @38
-        compress2                                @39
-        gzputs                                   @40
-        gzgets                                   @41
-        inflateCopy                              @42
-        inflateBackInit_                         @43
-        inflateBack                              @44
-        inflateBackEnd                           @45
-        compressBound                            @46
-        deflateBound                             @47
-        gzclearerr                               @48
-        gzungetc                                 @49
-        zlibCompileFlags                         @50
-        deflatePrime                             @51
-
-        unzOpen                                  @61
-        unzClose                                 @62
-        unzGetGlobalInfo                         @63
-        unzGetCurrentFileInfo                    @64
-        unzGoToFirstFile                         @65
-        unzGoToNextFile                          @66
-        unzOpenCurrentFile                       @67
-        unzReadCurrentFile                       @68
-        unzOpenCurrentFile3                      @69
-        unztell                                  @70
-        unzeof                                   @71
-        unzCloseCurrentFile                      @72
-        unzGetGlobalComment                      @73
-        unzStringFileNameCompare                 @74
-        unzLocateFile                            @75
-        unzGetLocalExtrafield                    @76
-        unzOpen2                                 @77
-        unzOpenCurrentFile2                      @78
-        unzOpenCurrentFilePassword               @79
-
-        zipOpen                                  @80
-        zipOpenNewFileInZip                      @81
-        zipWriteInFileInZip                      @82
-        zipCloseFileInZip                        @83
-        zipClose                                 @84
-        zipOpenNewFileInZip2                     @86
-        zipCloseFileInZipRaw                     @87
-        zipOpen2                                 @88
-        zipOpenNewFileInZip3                     @89
-
-        unzGetFilePos                            @100
-        unzGoToFilePos                           @101
-
-        fill_win32_filefunc                      @110
diff --git a/libsrc/zlib/contrib/vstudio/vc7/zlibvc.sln b/libsrc/zlib/contrib/vstudio/vc7/zlibvc.sln
deleted file mode 100644
index 927b42b..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/zlibvc.sln
+++ /dev/null
@@ -1,78 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testZlibDll", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug
-		ConfigName.1 = Release
-		ConfigName.2 = ReleaseAxp
-		ConfigName.3 = ReleaseWithoutAsm
-		ConfigName.4 = ReleaseWithoutCrtdll
-	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.ActiveCfg = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.Build.0 = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.ActiveCfg = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.Build.0 = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.Build.0 = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.ActiveCfg = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.Build.0 = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.ActiveCfg = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.Build.0 = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseWithoutCrtdll|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.Build.0 = ReleaseWithoutCrtdll|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.ActiveCfg = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.Build.0 = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.ActiveCfg = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.Build.0 = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
diff --git a/libsrc/zlib/contrib/vstudio/vc7/zlibvc.vcproj b/libsrc/zlib/contrib/vstudio/vc7/zlibvc.vcproj
deleted file mode 100644
index 8533b49..0000000
--- a/libsrc/zlib/contrib/vstudio/vc7/zlibvc.vcproj
+++ /dev/null
@@ -1,445 +0,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="zlibvc"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\DebugDll"
-			IntermediateDirectory=".\DebugDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="1"
-				PrecompiledHeaderFile=".\DebugDll/zlibvc.pch"
-				AssemblerListingLocation=".\DebugDll/"
-				ObjectFile=".\DebugDll/"
-				ProgramDataBaseFileName=".\DebugDll/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile=".\DebugDll\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\DebugDll/zlibwapi.pdb"
-				SubSystem="2"
-				ImportLibrary=".\DebugDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\DebugDll/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory=".\zlibDllWithoutAsm"
-			IntermediateDirectory=".\zlibDllWithoutAsm"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibDllWithoutAsm/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibDllWithoutAsm/"
-				ObjectFile=".\zlibDllWithoutAsm/"
-				ProgramDataBaseFileName=".\zlibDllWithoutAsm/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="crtdll.lib"
-				OutputFile=".\zlibDllWithoutAsm\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibDllWithoutAsm/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibDllWithoutAsm/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\zlibDllWithoutAsm/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibDllWithoutAsm/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutCrtdll|Win32"
-			OutputDirectory=".\zlibDllWithoutCrtDll"
-			IntermediateDirectory=".\zlibDllWithoutCrtDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibDllWithoutCrtDll/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibDllWithoutCrtDll/"
-				ObjectFile=".\zlibDllWithoutCrtDll/"
-				ProgramDataBaseFileName=".\zlibDllWithoutCrtDll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
-				OutputFile=".\zlibDllWithoutCrtDll\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="FALSE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibDllWithoutCrtDll/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibDllWithoutCrtDll/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\zlibDllWithoutCrtDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibDllWithoutCrtDll/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseAxp|Win32"
-			OutputDirectory=".\zlibvc__"
-			IntermediateDirectory=".\zlibvc__"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibvc__/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibvc__/"
-				ObjectFile=".\zlibvc__/"
-				ProgramDataBaseFileName=".\zlibvc__/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="crtdll.lib"
-				OutputFile="zlibvc__\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibvc__/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibvc__/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary=".\zlibvc__/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibvc__/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\ReleaseDll"
-			IntermediateDirectory=".\ReleaseDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\ReleaseDll/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\ReleaseDll/"
-				ObjectFile=".\ReleaseDll/"
-				ProgramDataBaseFileName=".\ReleaseDll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj crtdll.lib"
-				OutputFile=".\ReleaseDll\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\ReleaseDll/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\ReleaseDll/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\ReleaseDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Release/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90">
-			<File
-				RelativePath="..\..\..\adler32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c">
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c">
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c">
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="TRUE">
-					<Tool
-						Name="VCCLCompilerTool"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c">
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\iowin32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c">
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\zlib.rc">
-			</File>
-			<File
-				RelativePath=".\zlibvc.def">
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;fi;fd">
-			<File
-				RelativePath="..\..\..\deflate.h">
-			</File>
-			<File
-				RelativePath="..\..\..\infblock.h">
-			</File>
-			<File
-				RelativePath="..\..\..\infcodes.h">
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.h">
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.h">
-			</File>
-			<File
-				RelativePath="..\..\..\infutil.h">
-			</File>
-			<File
-				RelativePath="..\..\..\zconf.h">
-			</File>
-			<File
-				RelativePath="..\..\..\zlib.h">
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc8/miniunz.vcproj b/libsrc/zlib/contrib/vstudio/vc8/miniunz.vcproj
deleted file mode 100644
index 4af53e8..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/miniunz.vcproj
+++ /dev/null
@@ -1,566 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="miniunz"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\minizip\miniunz.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc8/minizip.vcproj b/libsrc/zlib/contrib/vstudio/vc8/minizip.vcproj
deleted file mode 100644
index 85f64c4..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/minizip.vcproj
+++ /dev/null
@@ -1,563 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="minizip"
-	ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\MiniZip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\$(ConfigurationName)"
-			IntermediateDirectory="x64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\$(ConfigurationName)"
-			IntermediateDirectory="ia64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\MiniZip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\$(ConfigurationName)"
-			IntermediateDirectory="x64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\$(ConfigurationName)"
-			IntermediateDirectory="ia64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\minizip\minizip.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc8/testzlib.vcproj b/libsrc/zlib/contrib/vstudio/vc8/testzlib.vcproj
deleted file mode 100644
index 68c3539..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/testzlib.vcproj
+++ /dev/null
@@ -1,948 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="testzlib"
-	ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-	RootNamespace="testzlib"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerOutput="4"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				AssemblerListingLocation="$(IntDir)\"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
-				GenerateManifest="false"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerOutput="4"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="x86\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|x64"
-			OutputDirectory="x64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				AssemblerListingLocation="$(IntDir)\"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies=""
-				GenerateManifest="false"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Itanium"
-			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				AssemblerListingLocation="$(IntDir)\"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
-				GenerateManifest="false"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\..\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win64 (AMD64)"
-					ExcludedFromBuild="TRUE"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win64 (AMD64)"
-					ExcludedFromBuild="TRUE"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseAsm|Win64 (AMD64)"
-					ExcludedFromBuild="TRUE"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx64\inffas8664.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\testzlib\testzlib.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc8/testzlibdll.vcproj b/libsrc/zlib/contrib/vstudio/vc8/testzlibdll.vcproj
deleted file mode 100644
index f38ab5e..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/testzlibdll.vcproj
+++ /dev/null
@@ -1,567 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="TestZlibDll"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
-	Keyword="Win32Proj"
-	SignManifests="true"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\testzlib\testzlib.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc8/zlib.rc b/libsrc/zlib/contrib/vstudio/vc8/zlib.rc
deleted file mode 100644
index 72cb8b4..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/zlib.rc
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1  1
-IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-  FILEVERSION	 1,2,3,0
-  PRODUCTVERSION 1,2,3,0
-  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
-  FILEFLAGS	0
-  FILEOS	VOS_DOS_WINDOWS32
-  FILETYPE	VFT_DLL
-  FILESUBTYPE	0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-
-    BEGIN
-      VALUE "FileDescription", "zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.3.0\0"
-      VALUE "InternalName",	"zlib\0"
-      VALUE "OriginalFilename",	"zlib.dll\0"
-      VALUE "ProductName",	"ZLib.DLL\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
diff --git a/libsrc/zlib/contrib/vstudio/vc8/zlibstat.vcproj b/libsrc/zlib/contrib/vstudio/vc8/zlibstat.vcproj
deleted file mode 100644
index fb97037..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/zlibstat.vcproj
+++ /dev/null
@@ -1,870 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="zlibstat"
-	ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|x64"
-			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Itanium"
-			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			>
-			<File
-				RelativePath="..\..\..\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx64\inffas8664.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c"
-				>
-			</File>
-			<File
-				RelativePath=".\zlib.rc"
-				>
-			</File>
-			<File
-				RelativePath=".\zlibvc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc8/zlibvc.def b/libsrc/zlib/contrib/vstudio/vc8/zlibvc.def
deleted file mode 100644
index a40e715..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/zlibvc.def
+++ /dev/null
@@ -1,92 +0,0 @@
-
-VERSION		1.23
-
-HEAPSIZE	1048576,8192
-
-EXPORTS
-        adler32                                  @1
-        compress                                 @2
-        crc32                                    @3
-        deflate                                  @4
-        deflateCopy                              @5
-        deflateEnd                               @6
-        deflateInit2_                            @7
-        deflateInit_                             @8
-        deflateParams                            @9
-        deflateReset                             @10
-        deflateSetDictionary                     @11
-        gzclose                                  @12
-        gzdopen                                  @13
-        gzerror                                  @14
-        gzflush                                  @15
-        gzopen                                   @16
-        gzread                                   @17
-        gzwrite                                  @18
-        inflate                                  @19
-        inflateEnd                               @20
-        inflateInit2_                            @21
-        inflateInit_                             @22
-        inflateReset                             @23
-        inflateSetDictionary                     @24
-        inflateSync                              @25
-        uncompress                               @26
-        zlibVersion                              @27
-        gzprintf                                 @28
-        gzputc                                   @29
-        gzgetc                                   @30
-        gzseek                                   @31
-        gzrewind                                 @32
-        gztell                                   @33
-        gzeof                                    @34
-        gzsetparams                              @35
-        zError                                   @36
-        inflateSyncPoint                         @37
-        get_crc_table                            @38
-        compress2                                @39
-        gzputs                                   @40
-        gzgets                                   @41
-        inflateCopy                              @42
-        inflateBackInit_                         @43
-        inflateBack                              @44
-        inflateBackEnd                           @45
-        compressBound                            @46
-        deflateBound                             @47
-        gzclearerr                               @48
-        gzungetc                                 @49
-        zlibCompileFlags                         @50
-        deflatePrime                             @51
-
-        unzOpen                                  @61
-        unzClose                                 @62
-        unzGetGlobalInfo                         @63
-        unzGetCurrentFileInfo                    @64
-        unzGoToFirstFile                         @65
-        unzGoToNextFile                          @66
-        unzOpenCurrentFile                       @67
-        unzReadCurrentFile                       @68
-        unzOpenCurrentFile3                      @69
-        unztell                                  @70
-        unzeof                                   @71
-        unzCloseCurrentFile                      @72
-        unzGetGlobalComment                      @73
-        unzStringFileNameCompare                 @74
-        unzLocateFile                            @75
-        unzGetLocalExtrafield                    @76
-        unzOpen2                                 @77
-        unzOpenCurrentFile2                      @78
-        unzOpenCurrentFilePassword               @79
-
-        zipOpen                                  @80
-        zipOpenNewFileInZip                      @81
-        zipWriteInFileInZip                      @82
-        zipCloseFileInZip                        @83
-        zipClose                                 @84
-        zipOpenNewFileInZip2                     @86
-        zipCloseFileInZipRaw                     @87
-        zipOpen2                                 @88
-        zipOpenNewFileInZip3                     @89
-
-        unzGetFilePos                            @100
-        unzGoToFilePos                           @101
-
-        fill_win32_filefunc                      @110
diff --git a/libsrc/zlib/contrib/vstudio/vc8/zlibvc.sln b/libsrc/zlib/contrib/vstudio/vc8/zlibvc.sln
deleted file mode 100644
index a815a55..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/zlibvc.sln
+++ /dev/null
@@ -1,144 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Itanium = Debug|Itanium
-		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
-		Release|Itanium = Release|Itanium
-		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
-		ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
-		ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
-		ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = ReleaseWithoutAsm|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/libsrc/zlib/contrib/vstudio/vc8/zlibvc.vcproj b/libsrc/zlib/contrib/vstudio/vc8/zlibvc.vcproj
deleted file mode 100644
index e717011..0000000
--- a/libsrc/zlib/contrib/vstudio/vc8/zlibvc.vcproj
+++ /dev/null
@@ -1,1219 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="zlibvc"
-	ProjectGUID="{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI,ASMV,ASMINF"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI,ASMV,ASMINF;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="2"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|x64"
-			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Itanium"
-			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="2"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;ASMV;ASMINF"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="2"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-			>
-			<File
-				RelativePath="..\..\..\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx64\inffas8664.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\iowin32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\zlib.rc"
-				>
-			</File>
-			<File
-				RelativePath=".\zlibvc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;fi;fd"
-			>
-			<File
-				RelativePath="..\..\..\deflate.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infblock.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infcodes.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infutil.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zconf.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zlib.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc9/miniunz.vcproj b/libsrc/zlib/contrib/vstudio/vc9/miniunz.vcproj
new file mode 100644
index 0000000..7da32b9
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/miniunz.vcproj
@@ -0,0 +1,565 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="miniunz"
+	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+		<Platform
+			Name="Itanium"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
+			IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/miniunz.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
+			IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/miniunz.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
+			IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/miniunz.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
+				SubSystem="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Itanium"
+			OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
+			IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/miniunz.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
+				SubSystem="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
+			IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/miniunz.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Itanium"
+			OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
+			IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/miniunz.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+			>
+			<File
+				RelativePath="..\..\minizip\miniunz.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc9/minizip.vcproj b/libsrc/zlib/contrib/vstudio/vc9/minizip.vcproj
new file mode 100644
index 0000000..e57e07d
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/minizip.vcproj
@@ -0,0 +1,562 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="minizip"
+	ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+		<Platform
+			Name="Itanium"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="x86\MiniZip$(ConfigurationName)"
+			IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/minizip.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="x86\MiniZip$(ConfigurationName)"
+			IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/minizip.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="x64\$(ConfigurationName)"
+			IntermediateDirectory="x64\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/minizip.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
+				SubSystem="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Itanium"
+			OutputDirectory="ia64\$(ConfigurationName)"
+			IntermediateDirectory="ia64\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/minizip.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
+				SubSystem="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="x64\$(ConfigurationName)"
+			IntermediateDirectory="x64\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/minizip.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Itanium"
+			OutputDirectory="ia64\$(ConfigurationName)"
+			IntermediateDirectory="ia64\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/minizip.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+			>
+			<File
+				RelativePath="..\..\minizip\minizip.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc9/testzlib.vcproj b/libsrc/zlib/contrib/vstudio/vc9/testzlib.vcproj
new file mode 100644
index 0000000..9cb0bf8
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/testzlib.vcproj
@@ -0,0 +1,852 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="testzlib"
+	ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
+	RootNamespace="testzlib"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+		<Platform
+			Name="Itanium"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="x86\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerOutput="4"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="x64\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				AssemblerListingLocation="$(IntDir)\"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
+				GenerateManifest="false"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Itanium"
+			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerOutput="4"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+				SubSystem="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|Win32"
+			OutputDirectory="x86\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|x64"
+			OutputDirectory="x64\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				AssemblerListingLocation="$(IntDir)\"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies=""
+				GenerateManifest="false"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|Itanium"
+			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="x86\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="x64\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				AssemblerListingLocation="$(IntDir)\"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
+				GenerateManifest="false"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Itanium"
+			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
+			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\.."
+				PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+			>
+			<File
+				RelativePath="..\..\..\adler32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compress.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\crc32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\deflate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\infback.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\masmx64\inffas8664.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseWithoutAsm|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseWithoutAsm|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\inffast.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inflate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inftrees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\testzlib\testzlib.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\trees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\uncompr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\zutil.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc9/testzlibdll.vcproj b/libsrc/zlib/contrib/vstudio/vc9/testzlibdll.vcproj
new file mode 100644
index 0000000..b1ddde0
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/testzlibdll.vcproj
@@ -0,0 +1,565 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="TestZlibDll"
+	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+		<Platform
+			Name="Itanium"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+				SubSystem="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Itanium"
+			OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
+			IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="2"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
+				SubSystem="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Itanium"
+			OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
+			IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="1"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
+				StringPooling="true"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="$(IntDir)\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
+				OutputFile="$(OutDir)/testzlib.exe"
+				LinkIncremental="1"
+				GenerateManifest="false"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+			>
+			<File
+				RelativePath="..\..\testzlib\testzlib.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc9/zlib.rc b/libsrc/zlib/contrib/vstudio/vc9/zlib.rc
new file mode 100644
index 0000000..f822450
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1  1
+IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
+  FILEVERSION	 1,2,5,0
+  PRODUCTVERSION 1,2,5,0
+  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
+  FILEFLAGS	0
+  FILEOS	VOS_DOS_WINDOWS32
+  FILETYPE	VFT_DLL
+  FILESUBTYPE	0	// not used
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904E4"
+    //language ID = U.S. English, char set = Windows, Multilingual
+
+    BEGIN
+      VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+      VALUE "FileVersion",	"1.2.5\0"
+      VALUE "InternalName",	"zlib\0"
+      VALUE "OriginalFilename",	"zlib.dll\0"
+      VALUE "ProductName",	"ZLib.DLL\0"
+      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+      VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x0409, 1252
+  END
+END
diff --git a/libsrc/zlib/contrib/vstudio/vc9/zlibstat.vcproj b/libsrc/zlib/contrib/vstudio/vc9/zlibstat.vcproj
new file mode 100644
index 0000000..61c76c7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/zlibstat.vcproj
@@ -0,0 +1,835 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="zlibstat"
+	ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+		<Platform
+			Name="Itanium"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				ExceptionHandling="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Itanium"
+			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				ExceptionHandling="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
+				AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
+				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Itanium"
+			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|Win32"
+			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|x64"
+			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|Itanium"
+			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
+			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
+			ConfigurationType="4"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="2"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
+				OutputFile="$(OutDir)\zlibstat.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			>
+			<File
+				RelativePath="..\..\..\adler32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compress.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\crc32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\deflate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzclose.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzguts.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzlib.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzread.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzwrite.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\infback.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\masmx64\inffas8664.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseWithoutAsm|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseWithoutAsm|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\inffast.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inflate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inftrees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\minizip\ioapi.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\trees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\uncompr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\minizip\unzip.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\minizip\zip.c"
+				>
+			</File>
+			<File
+				RelativePath=".\zlib.rc"
+				>
+			</File>
+			<File
+				RelativePath=".\zlibvc.def"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\zutil.c"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libsrc/zlib/contrib/vstudio/vc9/zlibvc.def b/libsrc/zlib/contrib/vstudio/vc9/zlibvc.def
new file mode 100644
index 0000000..0269ef7
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/zlibvc.def
@@ -0,0 +1,130 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION		1.24
+
+EXPORTS
+        adler32                                  @1
+        compress                                 @2
+        crc32                                    @3
+        deflate                                  @4
+        deflateCopy                              @5
+        deflateEnd                               @6
+        deflateInit2_                            @7
+        deflateInit_                             @8
+        deflateParams                            @9
+        deflateReset                             @10
+        deflateSetDictionary                     @11
+        gzclose                                  @12
+        gzdopen                                  @13
+        gzerror                                  @14
+        gzflush                                  @15
+        gzopen                                   @16
+        gzread                                   @17
+        gzwrite                                  @18
+        inflate                                  @19
+        inflateEnd                               @20
+        inflateInit2_                            @21
+        inflateInit_                             @22
+        inflateReset                             @23
+        inflateSetDictionary                     @24
+        inflateSync                              @25
+        uncompress                               @26
+        zlibVersion                              @27
+        gzprintf                                 @28
+        gzputc                                   @29
+        gzgetc                                   @30
+        gzseek                                   @31
+        gzrewind                                 @32
+        gztell                                   @33
+        gzeof                                    @34
+        gzsetparams                              @35
+        zError                                   @36
+        inflateSyncPoint                         @37
+        get_crc_table                            @38
+        compress2                                @39
+        gzputs                                   @40
+        gzgets                                   @41
+        inflateCopy                              @42
+        inflateBackInit_                         @43
+        inflateBack                              @44
+        inflateBackEnd                           @45
+        compressBound                            @46
+        deflateBound                             @47
+        gzclearerr                               @48
+        gzungetc                                 @49
+        zlibCompileFlags                         @50
+        deflatePrime                             @51
+
+        unzOpen                                  @61
+        unzClose                                 @62
+        unzGetGlobalInfo                         @63
+        unzGetCurrentFileInfo                    @64
+        unzGoToFirstFile                         @65
+        unzGoToNextFile                          @66
+        unzOpenCurrentFile                       @67
+        unzReadCurrentFile                       @68
+        unzOpenCurrentFile3                      @69
+        unztell                                  @70
+        unzeof                                   @71
+        unzCloseCurrentFile                      @72
+        unzGetGlobalComment                      @73
+        unzStringFileNameCompare                 @74
+        unzLocateFile                            @75
+        unzGetLocalExtrafield                    @76
+        unzOpen2                                 @77
+        unzOpenCurrentFile2                      @78
+        unzOpenCurrentFilePassword               @79
+
+        zipOpen                                  @80
+        zipOpenNewFileInZip                      @81
+        zipWriteInFileInZip                      @82
+        zipCloseFileInZip                        @83
+        zipClose                                 @84
+        zipOpenNewFileInZip2                     @86
+        zipCloseFileInZipRaw                     @87
+        zipOpen2                                 @88
+        zipOpenNewFileInZip3                     @89
+
+        unzGetFilePos                            @100
+        unzGoToFilePos                           @101
+
+        fill_win32_filefunc                      @110
+
+; zlibwapi v1.2.4 added:
+        fill_win32_filefunc64                   @111
+        fill_win32_filefunc64A                  @112
+        fill_win32_filefunc64W                  @113
+
+        unzOpen64                               @120
+        unzOpen2_64                             @121
+        unzGetGlobalInfo64                      @122
+        unzGetCurrentFileInfo64                 @124
+        unzGetCurrentFileZStreamPos64           @125
+        unztell64                               @126
+        unzGetFilePos64                         @127
+        unzGoToFilePos64                        @128
+
+        zipOpen64                               @130
+        zipOpen2_64                             @131
+        zipOpenNewFileInZip64                   @132
+        zipOpenNewFileInZip2_64                 @133
+        zipOpenNewFileInZip3_64                 @134
+        zipOpenNewFileInZip4_64                 @135
+        zipCloseFileInZipRaw64                  @136
+
+; zlib1 v1.2.4 added:
+        adler32_combine                         @140
+        crc32_combine                           @142
+        deflateSetHeader                        @144
+        deflateTune                             @145
+        gzbuffer                                @146
+        gzclose_r                               @147
+        gzclose_w                               @148
+        gzdirect                                @149
+        gzoffset                                @150
+        inflateGetHeader                        @156
+        inflateMark                             @157
+        inflatePrime                            @158
+        inflateReset2                           @159
+        inflateUndermine                        @160
diff --git a/libsrc/zlib/contrib/vstudio/vc9/zlibvc.sln b/libsrc/zlib/contrib/vstudio/vc9/zlibvc.sln
new file mode 100644
index 0000000..b482967
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/zlibvc.sln
@@ -0,0 +1,144 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Itanium = Debug|Itanium
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Itanium = Release|Itanium
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
+		ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
+		ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/libsrc/zlib/contrib/vstudio/vc9/zlibvc.vcproj b/libsrc/zlib/contrib/vstudio/vc9/zlibvc.vcproj
new file mode 100644
index 0000000..c9a8947
--- /dev/null
+++ b/libsrc/zlib/contrib/vstudio/vc9/zlibvc.vcproj
@@ -0,0 +1,1156 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="zlibvc"
+	ProjectGUID="{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+	RootNamespace="zlibvc"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+		<Platform
+			Name="Itanium"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
+				ExceptionHandling="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Itanium"
+			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="2"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+				ExceptionHandling="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="false"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|Win32"
+			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerOutput="2"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|x64"
+			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerOutput="2"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				OptimizeForWindows98="1"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="ReleaseWithoutAsm|Itanium"
+			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="2"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerOutput="2"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				OptimizeForWindows98="1"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerOutput="2"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:I386"
+				AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				OptimizeForWindows98="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerOutput="2"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				OptimizeForWindows98="1"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Itanium"
+			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
+			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
+			ConfigurationType="2"
+			InheritedPropertySheets="UpgradeFromVC70.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="2"
+				TypeLibraryName="$(OutDir)/zlibvc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+				AssemblerOutput="2"
+				AssemblerListingLocation="$(IntDir)\"
+				ObjectFile="$(IntDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1036"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlibwapi.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="false"
+				ModuleDefinitionFile=".\zlibvc.def"
+				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
+				GenerateMapFile="true"
+				MapFileName="$(OutDir)/zlibwapi.map"
+				SubSystem="2"
+				OptimizeForWindows98="1"
+				ImportLibrary="$(OutDir)/zlibwapi.lib"
+				TargetMachine="5"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+			>
+			<File
+				RelativePath="..\..\..\adler32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\compress.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\crc32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\deflate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzclose.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzguts.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzlib.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzread.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\gzwrite.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\infback.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\masmx64\inffas8664.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseWithoutAsm|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="ReleaseWithoutAsm|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Itanium"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\inffast.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inflate.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inftrees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\minizip\ioapi.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\minizip\iowin32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\trees.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\uncompr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\minizip\unzip.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions="ZLIB_INTERNAL"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions="ZLIB_INTERNAL"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Itanium"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions="ZLIB_INTERNAL"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\minizip\zip.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions="ZLIB_INTERNAL"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions="ZLIB_INTERNAL"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Itanium"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions="ZLIB_INTERNAL"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\zlib.rc"
+				>
+			</File>
+			<File
+				RelativePath=".\zlibvc.def"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\zutil.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;fi;fd"
+			>
+			<File
+				RelativePath="..\..\..\deflate.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\infblock.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\infcodes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inffast.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\inftrees.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\infutil.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\zconf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\zlib.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\zutil.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libsrc/zlib/crc32.c b/libsrc/zlib/crc32.c
deleted file mode 100644
index eb78340..0000000
--- a/libsrc/zlib/crc32.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Thanks to Rodney Brown <rbrown64 at csc.com.au> for his contribution of faster
- * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
- * tables for updating the shift register in one step with three exclusive-ors
- * instead of four steps with four exclusive-ors.  This results in about a
- * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
- */
-
-/* @(#) $Id: crc32.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-/*
-  Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
-  protection on the static variables used to control the first-use generation
-  of the crc tables.  Therefore, if you #define DYNAMIC_CRC_TABLE, you should
-  first call get_crc_table() to initialize the tables before allowing more than
-  one thread to use crc32().
- */
-
-#ifdef MAKECRCH
-#  include <stdio.h>
-#  ifndef DYNAMIC_CRC_TABLE
-#    define DYNAMIC_CRC_TABLE
-#  endif /* !DYNAMIC_CRC_TABLE */
-#endif /* MAKECRCH */
-
-#include "zutil.h"      /* for STDC and FAR definitions */
-
-#define local static
-
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-#  ifdef STDC           /* need ANSI C limits.h to determine sizes */
-#    include <limits.h>
-#    define BYFOUR
-#    if (UINT_MAX == 0xffffffffUL)
-       typedef unsigned int u4;
-#    else
-#      if (ULONG_MAX == 0xffffffffUL)
-         typedef unsigned long u4;
-#      else
-#        if (USHRT_MAX == 0xffffffffUL)
-           typedef unsigned short u4;
-#        else
-#          undef BYFOUR     /* can't find a four-byte integer type! */
-#        endif
-#      endif
-#    endif
-#  endif /* STDC */
-#endif /* !NOBYFOUR */
-
-/* Definitions for doing the crc four data bytes at a time. */
-#ifdef BYFOUR
-#  define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
-                (((w)&0xff00)<<8)+(((w)&0xff)<<24))
-   local unsigned long crc32_little OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-   local unsigned long crc32_big OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-#  define TBLS 8
-#else
-#  define TBLS 1
-#endif /* BYFOUR */
-
-/* Local functions for crc concatenation */
-local unsigned long gf2_matrix_times OF((unsigned long *mat,
-                                         unsigned long vec));
-local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
-local void make_crc_table OF((void));
-#ifdef MAKECRCH
-   local void write_table OF((FILE *, const unsigned long FAR *));
-#endif /* MAKECRCH */
-/*
-  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
-  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
-  Polynomials over GF(2) are represented in binary, one bit per coefficient,
-  with the lowest powers in the most significant bit.  Then adding polynomials
-  is just exclusive-or, and multiplying a polynomial by x is a right shift by
-  one.  If we call the above polynomial p, and represent a byte as the
-  polynomial q, also with the lowest power in the most significant bit (so the
-  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
-  where a mod b means the remainder after dividing a by b.
-
-  This calculation is done using the shift-register method of multiplying and
-  taking the remainder.  The register is initialized to zero, and for each
-  incoming bit, x^32 is added mod p to the register if the bit is a one (where
-  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
-  x (which is shifting right by one and adding x^32 mod p if the bit shifted
-  out is a one).  We start with the highest power (least significant bit) of
-  q and repeat for all eight bits of q.
-
-  The first table is simply the CRC of all possible eight bit values.  This is
-  all the information needed to generate CRCs on data a byte at a time for all
-  combinations of CRC register values and incoming bytes.  The remaining tables
-  allow for word-at-a-time CRC calculation for both big-endian and little-
-  endian machines, where a word is four bytes.
-*/
-local void make_crc_table()
-{
-    unsigned long c;
-    int n, k;
-    unsigned long poly;                 /* polynomial exclusive-or pattern */
-    /* terms of polynomial defining this crc (except x^32): */
-    static volatile int first = 1;      /* flag to limit concurrent making */
-    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
-    /* See if another task is already doing this (not thread-safe, but better
-       than nothing -- significantly reduces duration of vulnerability in
-       case the advice about DYNAMIC_CRC_TABLE is ignored) */
-    if (first) {
-        first = 0;
-
-        /* make exclusive-or pattern from polynomial (0xedb88320UL) */
-        poly = 0UL;
-        for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
-            poly |= 1UL << (31 - p[n]);
-
-        /* generate a crc for every 8-bit value */
-        for (n = 0; n < 256; n++) {
-            c = (unsigned long)n;
-            for (k = 0; k < 8; k++)
-                c = c & 1 ? poly ^ (c >> 1) : c >> 1;
-            crc_table[0][n] = c;
-        }
-
-#ifdef BYFOUR
-        /* generate crc for each value followed by one, two, and three zeros,
-           and then the byte reversal of those as well as the first table */
-        for (n = 0; n < 256; n++) {
-            c = crc_table[0][n];
-            crc_table[4][n] = REV(c);
-            for (k = 1; k < 4; k++) {
-                c = crc_table[0][c & 0xff] ^ (c >> 8);
-                crc_table[k][n] = c;
-                crc_table[k + 4][n] = REV(c);
-            }
-        }
-#endif /* BYFOUR */
-
-        crc_table_empty = 0;
-    }
-    else {      /* not first */
-        /* wait for the other guy to finish (not efficient, but rare) */
-        while (crc_table_empty)
-            ;
-    }
-
-#ifdef MAKECRCH
-    /* write out CRC tables to crc32.h */
-    {
-        FILE *out;
-
-        out = fopen("crc32.h", "w");
-        if (out == NULL) return;
-        fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
-        fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
-        fprintf(out, "local const unsigned long FAR ");
-        fprintf(out, "crc_table[TBLS][256] =\n{\n  {\n");
-        write_table(out, crc_table[0]);
-#  ifdef BYFOUR
-        fprintf(out, "#ifdef BYFOUR\n");
-        for (k = 1; k < 8; k++) {
-            fprintf(out, "  },\n  {\n");
-            write_table(out, crc_table[k]);
-        }
-        fprintf(out, "#endif\n");
-#  endif /* BYFOUR */
-        fprintf(out, "  }\n};\n");
-        fclose(out);
-    }
-#endif /* MAKECRCH */
-}
-
-#ifdef MAKECRCH
-local void write_table(out, table)
-    FILE *out;
-    const unsigned long FAR *table;
-{
-    int n;
-
-    for (n = 0; n < 256; n++)
-        fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : "    ", table[n],
-                n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
-}
-#endif /* MAKECRCH */
-
-#else /* !DYNAMIC_CRC_TABLE */
-/* ========================================================================
- * Tables of CRC-32s of all single-byte values, made by make_crc_table().
- */
-#include "crc32.h"
-#endif /* DYNAMIC_CRC_TABLE */
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const unsigned long FAR * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-    return (const unsigned long FAR *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
-#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
-
-/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    if (buf == Z_NULL) return 0UL;
-
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-
-#ifdef BYFOUR
-    if (sizeof(void *) == sizeof(ptrdiff_t)) {
-        u4 endian;
-
-        endian = 1;
-        if (*((unsigned char *)(&endian)))
-            return crc32_little(crc, buf, len);
-        else
-            return crc32_big(crc, buf, len);
-    }
-#endif /* BYFOUR */
-    crc = crc ^ 0xffffffffUL;
-    while (len >= 8) {
-        DO8;
-        len -= 8;
-    }
-    if (len) do {
-        DO1;
-    } while (--len);
-    return crc ^ 0xffffffffUL;
-}
-
-#ifdef BYFOUR
-
-/* ========================================================================= */
-#define DOLIT4 c ^= *buf4++; \
-        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
-            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-
-/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register u4 c;
-    register const u4 FAR *buf4;
-
-    c = (u4)crc;
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-        len--;
-    }
-
-    buf4 = (const u4 FAR *)(const void FAR *)buf;
-    while (len >= 32) {
-        DOLIT32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOLIT4;
-        len -= 4;
-    }
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)c;
-}
-
-/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
-        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
-            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-
-/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register u4 c;
-    register const u4 FAR *buf4;
-
-    c = REV((u4)crc);
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-        len--;
-    }
-
-    buf4 = (const u4 FAR *)(const void FAR *)buf;
-    buf4--;
-    while (len >= 32) {
-        DOBIG32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOBIG4;
-        len -= 4;
-    }
-    buf4++;
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)(REV(c));
-}
-
-#endif /* BYFOUR */
-
-#define GF2_DIM 32      /* dimension of GF(2) vectors (length of CRC) */
-
-/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
-    unsigned long *mat;
-    unsigned long vec;
-{
-    unsigned long sum;
-
-    sum = 0;
-    while (vec) {
-        if (vec & 1)
-            sum ^= *mat;
-        vec >>= 1;
-        mat++;
-    }
-    return sum;
-}
-
-/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
-    unsigned long *square;
-    unsigned long *mat;
-{
-    int n;
-
-    for (n = 0; n < GF2_DIM; n++)
-        square[n] = gf2_matrix_times(mat, mat[n]);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
-    uLong crc1;
-    uLong crc2;
-    z_off_t len2;
-{
-    int n;
-    unsigned long row;
-    unsigned long even[GF2_DIM];    /* even-power-of-two zeros operator */
-    unsigned long odd[GF2_DIM];     /* odd-power-of-two zeros operator */
-
-    /* degenerate case */
-    if (len2 == 0)
-        return crc1;
-
-    /* put operator for one zero bit in odd */
-    odd[0] = 0xedb88320L;           /* CRC-32 polynomial */
-    row = 1;
-    for (n = 1; n < GF2_DIM; n++) {
-        odd[n] = row;
-        row <<= 1;
-    }
-
-    /* put operator for two zero bits in even */
-    gf2_matrix_square(even, odd);
-
-    /* put operator for four zero bits in odd */
-    gf2_matrix_square(odd, even);
-
-    /* apply len2 zeros to crc1 (first square will put the operator for one
-       zero byte, eight zero bits, in even) */
-    do {
-        /* apply zeros operator for this bit of len2 */
-        gf2_matrix_square(even, odd);
-        if (len2 & 1)
-            crc1 = gf2_matrix_times(even, crc1);
-        len2 >>= 1;
-
-        /* if no more bits set, then done */
-        if (len2 == 0)
-            break;
-
-        /* another iteration of the loop with odd and even swapped */
-        gf2_matrix_square(odd, even);
-        if (len2 & 1)
-            crc1 = gf2_matrix_times(odd, crc1);
-        len2 >>= 1;
-
-        /* if no more bits set, then done */
-    } while (len2 != 0);
-
-    /* return combined crc */
-    crc1 ^= crc2;
-    return crc1;
-}
diff --git a/libsrc/zlib/crc32.h b/libsrc/zlib/crc32.h
deleted file mode 100644
index 8053b61..0000000
--- a/libsrc/zlib/crc32.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const unsigned long FAR crc_table[TBLS][256] =
-{
-  {
-    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
-    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
-    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
-    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
-    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
-    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
-    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
-    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
-    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
-    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
-    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
-    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
-    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
-    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
-    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
-    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
-    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
-    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
-    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
-    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
-    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
-    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
-    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
-    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
-    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
-    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
-    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
-    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
-    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
-    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
-    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
-    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
-    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
-    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
-    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
-    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
-    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
-    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
-    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
-    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
-    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
-    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
-    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
-    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
-    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
-    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
-    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
-    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
-    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
-    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
-    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
-    0x2d02ef8dUL
-#ifdef BYFOUR
-  },
-  {
-    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
-    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
-    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
-    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
-    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
-    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
-    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
-    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
-    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
-    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
-    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
-    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
-    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
-    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
-    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
-    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
-    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
-    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
-    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
-    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
-    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
-    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
-    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
-    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
-    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
-    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
-    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
-    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
-    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
-    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
-    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
-    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
-    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
-    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
-    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
-    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
-    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
-    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
-    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
-    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
-    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
-    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
-    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
-    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
-    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
-    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
-    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
-    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
-    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
-    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
-    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
-    0x9324fd72UL
-  },
-  {
-    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
-    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
-    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
-    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
-    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
-    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
-    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
-    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
-    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
-    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
-    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
-    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
-    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
-    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
-    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
-    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
-    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
-    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
-    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
-    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
-    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
-    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
-    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
-    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
-    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
-    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
-    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
-    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
-    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
-    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
-    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
-    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
-    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
-    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
-    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
-    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
-    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
-    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
-    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
-    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
-    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
-    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
-    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
-    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
-    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
-    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
-    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
-    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
-    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
-    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
-    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
-    0xbe9834edUL
-  },
-  {
-    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
-    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
-    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
-    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
-    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
-    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
-    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
-    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
-    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
-    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
-    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
-    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
-    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
-    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
-    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
-    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
-    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
-    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
-    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
-    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
-    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
-    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
-    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
-    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
-    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
-    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
-    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
-    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
-    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
-    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
-    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
-    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
-    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
-    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
-    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
-    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
-    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
-    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
-    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
-    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
-    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
-    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
-    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
-    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
-    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
-    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
-    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
-    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
-    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
-    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
-    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
-    0xde0506f1UL
-  },
-  {
-    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
-    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
-    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
-    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
-    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
-    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
-    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
-    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
-    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
-    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
-    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
-    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
-    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
-    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
-    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
-    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
-    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
-    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
-    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
-    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
-    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
-    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
-    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
-    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
-    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
-    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
-    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
-    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
-    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
-    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
-    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
-    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
-    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
-    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
-    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
-    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
-    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
-    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
-    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
-    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
-    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
-    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
-    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
-    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
-    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
-    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
-    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
-    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
-    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
-    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
-    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
-    0x8def022dUL
-  },
-  {
-    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
-    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
-    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
-    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
-    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
-    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
-    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
-    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
-    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
-    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
-    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
-    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
-    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
-    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
-    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
-    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
-    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
-    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
-    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
-    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
-    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
-    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
-    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
-    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
-    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
-    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
-    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
-    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
-    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
-    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
-    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
-    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
-    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
-    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
-    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
-    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
-    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
-    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
-    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
-    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
-    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
-    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
-    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
-    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
-    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
-    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
-    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
-    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
-    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
-    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
-    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
-    0x72fd2493UL
-  },
-  {
-    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
-    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
-    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
-    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
-    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
-    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
-    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
-    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
-    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
-    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
-    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
-    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
-    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
-    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
-    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
-    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
-    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
-    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
-    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
-    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
-    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
-    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
-    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
-    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
-    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
-    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
-    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
-    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
-    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
-    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
-    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
-    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
-    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
-    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
-    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
-    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
-    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
-    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
-    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
-    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
-    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
-    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
-    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
-    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
-    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
-    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
-    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
-    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
-    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
-    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
-    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
-    0xed3498beUL
-  },
-  {
-    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
-    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
-    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
-    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
-    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
-    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
-    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
-    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
-    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
-    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
-    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
-    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
-    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
-    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
-    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
-    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
-    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
-    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
-    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
-    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
-    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
-    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
-    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
-    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
-    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
-    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
-    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
-    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
-    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
-    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
-    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
-    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
-    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
-    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
-    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
-    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
-    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
-    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
-    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
-    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
-    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
-    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
-    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
-    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
-    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
-    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
-    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
-    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
-    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
-    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
-    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
-    0xf10605deUL
-#endif
-  }
-};
diff --git a/libsrc/zlib/deflate.c b/libsrc/zlib/deflate.c
deleted file mode 100644
index 0643d73..0000000
--- a/libsrc/zlib/deflate.c
+++ /dev/null
@@ -1,1736 +0,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process depends on being able to identify portions
- *      of the input text which are identical to earlier input (within a
- *      sliding window trailing behind the input currently being processed).
- *
- *      The most straightforward technique turns out to be the fastest for
- *      most input files: try all possible matches and select the longest.
- *      The key feature of this algorithm is that insertions into the string
- *      dictionary are very simple and thus fast, and deletions are avoided
- *      completely. Insertions are performed at each input character, whereas
- *      string matches are performed only when the previous match ends. So it
- *      is preferable to spend more time in matches to allow very fast string
- *      insertions and avoid deletions. The matching algorithm for small
- *      strings is inspired from that of Rabin & Karp. A brute force approach
- *      is used to find longer strings when a small match has been found.
- *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- *      (by Leonid Broukhis).
- *         A previous version of this file used a more sophisticated algorithm
- *      (by Fiala and Greene) which is guaranteed to run in linear amortized
- *      time, but has a larger average cost, uses more memory and is patented.
- *      However the F&G algorithm may be faster for some highly redundant
- *      files if the parameter max_chain_length (described below) is too large.
- *
- *  ACKNOWLEDGEMENTS
- *
- *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- *      I found it in 'freeze' written by Leonid Broukhis.
- *      Thanks to many people for bug reports and testing.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- *      Available in http://www.ietf.org/rfc/rfc1951.txt
- *
- *      A description of the Rabin and Karp algorithm is given in the book
- *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- *      Fiala,E.R., and Greene,D.H.
- *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* @(#) $Id: deflate.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#include "deflate.h"
-
-const char deflate_copyright[] =
-   " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- *  Function prototypes.
- */
-typedef enum {
-    need_more,      /* block not completed, need more input or more output */
-    block_done,     /* block flush performed */
-    finish_started, /* finish started, need only more output at next deflate */
-    finish_done     /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window    OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast   OF((deflate_state *s, int flush));
-#ifndef FASTEST
-local block_state deflate_slow   OF((deflate_state *s, int flush));
-#endif
-local void lm_init        OF((deflate_state *s));
-local void putShortMSB    OF((deflate_state *s, uInt b));
-local void flush_pending  OF((z_streamp strm));
-local int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifndef FASTEST
-#ifdef ASMV
-      void match_init OF((void)); /* asm code initialization */
-      uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#endif
-#endif
-local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
-
-#ifdef DEBUG
-local  void check_match OF((deflate_state *s, IPos start, IPos match,
-                            int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-#  define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
-   ush good_length; /* reduce lazy search above this match length */
-   ush max_lazy;    /* do not perform lazy search above this match length */
-   ush nice_length; /* quit search above this match length */
-   ush max_chain;
-   compress_func func;
-} config;
-
-#ifdef FASTEST
-local const config configuration_table[2] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}}; /* max speed, no lazy matches */
-#else
-local const config configuration_table[10] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}, /* max speed, no lazy matches */
-/* 2 */ {4,    5, 16,    8, deflate_fast},
-/* 3 */ {4,    6, 32,   32, deflate_fast},
-
-/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */
-/* 5 */ {8,   16, 32,   32, deflate_slow},
-/* 6 */ {8,   16, 128, 128, deflate_slow},
-/* 7 */ {8,   32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
-#endif
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-#ifndef NO_DUMMY_DECL
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-#endif
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
- *    input characters, so that a running hash key can be computed from the
- *    previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * If this file is compiled with -DFASTEST, the compression level is forced
- * to 1, and no hash chains are maintained.
- * IN  assertion: all calls to to INSERT_STRING are made with consecutive
- *    input characters and the first MIN_MATCH bytes of str are valid
- *    (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#endif
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
-    s->head[s->hash_size-1] = NIL; \
-    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
-    z_streamp strm;
-    int level;
-    const char *version;
-    int stream_size;
-{
-    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
-                         Z_DEFAULT_STRATEGY, version, stream_size);
-    /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-                  version, stream_size)
-    z_streamp strm;
-    int  level;
-    int  method;
-    int  windowBits;
-    int  memLevel;
-    int  strategy;
-    const char *version;
-    int stream_size;
-{
-    deflate_state *s;
-    int wrap = 1;
-    static const char my_version[] = ZLIB_VERSION;
-
-    ushf *overlay;
-    /* We overlay pending_buf and d_buf+l_buf. This works since the average
-     * output size for (length,distance) codes is <= 24 bits.
-     */
-
-    if (version == Z_NULL || version[0] != my_version[0] ||
-        stream_size != sizeof(z_stream)) {
-        return Z_VERSION_ERROR;
-    }
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-
-    strm->msg = Z_NULL;
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-
-    if (windowBits < 0) { /* suppress zlib wrapper */
-        wrap = 0;
-        windowBits = -windowBits;
-    }
-#ifdef GZIP
-    else if (windowBits > 15) {
-        wrap = 2;       /* write gzip wrapper instead */
-        windowBits -= 16;
-    }
-#endif
-    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-        strategy < 0 || strategy > Z_FIXED) {
-        return Z_STREAM_ERROR;
-    }
-    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
-    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
-    if (s == Z_NULL) return Z_MEM_ERROR;
-    strm->state = (struct internal_state FAR *)s;
-    s->strm = strm;
-
-    s->wrap = wrap;
-    s->gzhead = Z_NULL;
-    s->w_bits = windowBits;
-    s->w_size = 1 << s->w_bits;
-    s->w_mask = s->w_size - 1;
-
-    s->hash_bits = memLevel + 7;
-    s->hash_size = 1 << s->hash_bits;
-    s->hash_mask = s->hash_size - 1;
-    s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
-    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
-    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
-
-    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-    s->pending_buf = (uchf *) overlay;
-    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
-    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
-        s->pending_buf == Z_NULL) {
-        s->status = FINISH_STATE;
-        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
-        deflateEnd (strm);
-        return Z_MEM_ERROR;
-    }
-    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
-    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
-    s->level = level;
-    s->strategy = strategy;
-    s->method = (Byte)method;
-
-    return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
-    z_streamp strm;
-    const Bytef *dictionary;
-    uInt  dictLength;
-{
-    deflate_state *s;
-    uInt length = dictLength;
-    uInt n;
-    IPos hash_head = 0;
-
-    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
-        strm->state->wrap == 2 ||
-        (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
-        return Z_STREAM_ERROR;
-
-    s = strm->state;
-    if (s->wrap)
-        strm->adler = adler32(strm->adler, dictionary, dictLength);
-
-    if (length < MIN_MATCH) return Z_OK;
-    if (length > MAX_DIST(s)) {
-        length = MAX_DIST(s);
-        dictionary += dictLength - length; /* use the tail of the dictionary */
-    }
-    zmemcpy(s->window, dictionary, length);
-    s->strstart = length;
-    s->block_start = (long)length;
-
-    /* Insert all strings in the hash table (except for the last two bytes).
-     * s->lookahead stays null, so s->ins_h will be recomputed at the next
-     * call of fill_window.
-     */
-    s->ins_h = s->window[0];
-    UPDATE_HASH(s, s->ins_h, s->window[1]);
-    for (n = 0; n <= length - MIN_MATCH; n++) {
-        INSERT_STRING(s, n, hash_head);
-    }
-    if (hash_head) hash_head = 0;  /* to make compiler happy */
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
-    z_streamp strm;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
-        return Z_STREAM_ERROR;
-    }
-
-    strm->total_in = strm->total_out = 0;
-    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
-    strm->data_type = Z_UNKNOWN;
-
-    s = (deflate_state *)strm->state;
-    s->pending = 0;
-    s->pending_out = s->pending_buf;
-
-    if (s->wrap < 0) {
-        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
-    }
-    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
-    strm->adler =
-#ifdef GZIP
-        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
-#endif
-        adler32(0L, Z_NULL, 0);
-    s->last_flush = Z_NO_FLUSH;
-
-    _tr_init(s);
-    lm_init(s);
-
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetHeader (strm, head)
-    z_streamp strm;
-    gz_headerp head;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    if (strm->state->wrap != 2) return Z_STREAM_ERROR;
-    strm->state->gzhead = head;
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
-    z_streamp strm;
-    int bits;
-    int value;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    strm->state->bi_valid = bits;
-    strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
-    z_streamp strm;
-    int level;
-    int strategy;
-{
-    deflate_state *s;
-    compress_func func;
-    int err = Z_OK;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
-        return Z_STREAM_ERROR;
-    }
-    func = configuration_table[s->level].func;
-
-    if (func != configuration_table[level].func && strm->total_in != 0) {
-        /* Flush the last buffer: */
-        err = deflate(strm, Z_PARTIAL_FLUSH);
-    }
-    if (s->level != level) {
-        s->level = level;
-        s->max_lazy_match   = configuration_table[level].max_lazy;
-        s->good_match       = configuration_table[level].good_length;
-        s->nice_match       = configuration_table[level].nice_length;
-        s->max_chain_length = configuration_table[level].max_chain;
-    }
-    s->strategy = strategy;
-    return err;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
-    z_streamp strm;
-    int good_length;
-    int max_lazy;
-    int nice_length;
-    int max_chain;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-    s->good_match = good_length;
-    s->max_lazy_match = max_lazy;
-    s->nice_match = nice_length;
-    s->max_chain_length = max_chain;
-    return Z_OK;
-}
-
-/* =========================================================================
- * For the default windowBits of 15 and memLevel of 8, this function returns
- * a close to exact, as well as small, upper bound on the compressed size.
- * They are coded as constants here for a reason--if the #define's are
- * changed, then this function needs to be changed as well.  The return
- * value for 15 and 8 only works for those exact settings.
- *
- * For any setting other than those defaults for windowBits and memLevel,
- * the value returned is a conservative worst case for the maximum expansion
- * resulting from using fixed blocks instead of stored blocks, which deflate
- * can emit on compressed data for some combinations of the parameters.
- *
- * This function could be more sophisticated to provide closer upper bounds
- * for every combination of windowBits and memLevel, as well as wrap.
- * But even the conservative upper bound of about 14% expansion does not
- * seem onerous for output buffer allocation.
- */
-uLong ZEXPORT deflateBound(strm, sourceLen)
-    z_streamp strm;
-    uLong sourceLen;
-{
-    deflate_state *s;
-    uLong destLen;
-
-    /* conservative upper bound */
-    destLen = sourceLen +
-              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
-
-    /* if can't get parameters, return conservative bound */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return destLen;
-
-    /* if not default parameters, return conservative bound */
-    s = strm->state;
-    if (s->w_bits != 15 || s->hash_bits != 8 + 7)
-        return destLen;
-
-    /* default settings: return tight bound for that case */
-    return compressBound(sourceLen);
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
-    deflate_state *s;
-    uInt b;
-{
-    put_byte(s, (Byte)(b >> 8));
-    put_byte(s, (Byte)(b & 0xff));
-}
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
-    z_streamp strm;
-{
-    unsigned len = strm->state->pending;
-
-    if (len > strm->avail_out) len = strm->avail_out;
-    if (len == 0) return;
-
-    zmemcpy(strm->next_out, strm->state->pending_out, len);
-    strm->next_out  += len;
-    strm->state->pending_out  += len;
-    strm->total_out += len;
-    strm->avail_out  -= len;
-    strm->state->pending -= len;
-    if (strm->state->pending == 0) {
-        strm->state->pending_out = strm->state->pending_buf;
-    }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
-    z_streamp strm;
-    int flush;
-{
-    int old_flush; /* value of flush param for previous deflate call */
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        flush > Z_FINISH || flush < 0) {
-        return Z_STREAM_ERROR;
-    }
-    s = strm->state;
-
-    if (strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
-        (s->status == FINISH_STATE && flush != Z_FINISH)) {
-        ERR_RETURN(strm, Z_STREAM_ERROR);
-    }
-    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
-    s->strm = strm; /* just in case */
-    old_flush = s->last_flush;
-    s->last_flush = flush;
-
-    /* Write the header */
-    if (s->status == INIT_STATE) {
-#ifdef GZIP
-        if (s->wrap == 2) {
-            strm->adler = crc32(0L, Z_NULL, 0);
-            put_byte(s, 31);
-            put_byte(s, 139);
-            put_byte(s, 8);
-            if (s->gzhead == NULL) {
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, s->level == 9 ? 2 :
-                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                             4 : 0));
-                put_byte(s, OS_CODE);
-                s->status = BUSY_STATE;
-            }
-            else {
-                put_byte(s, (s->gzhead->text ? 1 : 0) +
-                            (s->gzhead->hcrc ? 2 : 0) +
-                            (s->gzhead->extra == Z_NULL ? 0 : 4) +
-                            (s->gzhead->name == Z_NULL ? 0 : 8) +
-                            (s->gzhead->comment == Z_NULL ? 0 : 16)
-                        );
-                put_byte(s, (Byte)(s->gzhead->time & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
-                put_byte(s, s->level == 9 ? 2 :
-                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                             4 : 0));
-                put_byte(s, s->gzhead->os & 0xff);
-                if (s->gzhead->extra != NULL) {
-                    put_byte(s, s->gzhead->extra_len & 0xff);
-                    put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
-                }
-                if (s->gzhead->hcrc)
-                    strm->adler = crc32(strm->adler, s->pending_buf,
-                                        s->pending);
-                s->gzindex = 0;
-                s->status = EXTRA_STATE;
-            }
-        }
-        else
-#endif
-        {
-            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
-            uInt level_flags;
-
-            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
-                level_flags = 0;
-            else if (s->level < 6)
-                level_flags = 1;
-            else if (s->level == 6)
-                level_flags = 2;
-            else
-                level_flags = 3;
-            header |= (level_flags << 6);
-            if (s->strstart != 0) header |= PRESET_DICT;
-            header += 31 - (header % 31);
-
-            s->status = BUSY_STATE;
-            putShortMSB(s, header);
-
-            /* Save the adler32 of the preset dictionary: */
-            if (s->strstart != 0) {
-                putShortMSB(s, (uInt)(strm->adler >> 16));
-                putShortMSB(s, (uInt)(strm->adler & 0xffff));
-            }
-            strm->adler = adler32(0L, Z_NULL, 0);
-        }
-    }
-#ifdef GZIP
-    if (s->status == EXTRA_STATE) {
-        if (s->gzhead->extra != NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-
-            while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size)
-                        break;
-                }
-                put_byte(s, s->gzhead->extra[s->gzindex]);
-                s->gzindex++;
-            }
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (s->gzindex == s->gzhead->extra_len) {
-                s->gzindex = 0;
-                s->status = NAME_STATE;
-            }
-        }
-        else
-            s->status = NAME_STATE;
-    }
-    if (s->status == NAME_STATE) {
-        if (s->gzhead->name != NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-            int val;
-
-            do {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size) {
-                        val = 1;
-                        break;
-                    }
-                }
-                val = s->gzhead->name[s->gzindex++];
-                put_byte(s, val);
-            } while (val != 0);
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (val == 0) {
-                s->gzindex = 0;
-                s->status = COMMENT_STATE;
-            }
-        }
-        else
-            s->status = COMMENT_STATE;
-    }
-    if (s->status == COMMENT_STATE) {
-        if (s->gzhead->comment != NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-            int val;
-
-            do {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size) {
-                        val = 1;
-                        break;
-                    }
-                }
-                val = s->gzhead->comment[s->gzindex++];
-                put_byte(s, val);
-            } while (val != 0);
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (val == 0)
-                s->status = HCRC_STATE;
-        }
-        else
-            s->status = HCRC_STATE;
-    }
-    if (s->status == HCRC_STATE) {
-        if (s->gzhead->hcrc) {
-            if (s->pending + 2 > s->pending_buf_size)
-                flush_pending(strm);
-            if (s->pending + 2 <= s->pending_buf_size) {
-                put_byte(s, (Byte)(strm->adler & 0xff));
-                put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-                strm->adler = crc32(0L, Z_NULL, 0);
-                s->status = BUSY_STATE;
-            }
-        }
-        else
-            s->status = BUSY_STATE;
-    }
-#endif
-
-    /* Flush as much pending output as possible */
-    if (s->pending != 0) {
-        flush_pending(strm);
-        if (strm->avail_out == 0) {
-            /* Since avail_out is 0, deflate will be called again with
-             * more output space, but possibly with both pending and
-             * avail_in equal to zero. There won't be anything to do,
-             * but this is not an error situation so make sure we
-             * return OK instead of BUF_ERROR at next call of deflate:
-             */
-            s->last_flush = -1;
-            return Z_OK;
-        }
-
-    /* Make sure there is something to do and avoid duplicate consecutive
-     * flushes. For repeated and useless calls with Z_FINISH, we keep
-     * returning Z_STREAM_END instead of Z_BUF_ERROR.
-     */
-    } else if (strm->avail_in == 0 && flush <= old_flush &&
-               flush != Z_FINISH) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* User must not provide more input after the first FINISH: */
-    if (s->status == FINISH_STATE && strm->avail_in != 0) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* Start a new block or continue the current one.
-     */
-    if (strm->avail_in != 0 || s->lookahead != 0 ||
-        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
-        block_state bstate;
-
-        bstate = (*(configuration_table[s->level].func))(s, flush);
-
-        if (bstate == finish_started || bstate == finish_done) {
-            s->status = FINISH_STATE;
-        }
-        if (bstate == need_more || bstate == finish_started) {
-            if (strm->avail_out == 0) {
-                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
-            }
-            return Z_OK;
-            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
-             * of deflate should use the same flush parameter to make sure
-             * that the flush is complete. So we don't have to output an
-             * empty block here, this will be done at next call. This also
-             * ensures that for a very small output buffer, we emit at most
-             * one empty block.
-             */
-        }
-        if (bstate == block_done) {
-            if (flush == Z_PARTIAL_FLUSH) {
-                _tr_align(s);
-            } else { /* FULL_FLUSH or SYNC_FLUSH */
-                _tr_stored_block(s, (char*)0, 0L, 0);
-                /* For a full flush, this empty block will be recognized
-                 * as a special marker by inflate_sync().
-                 */
-                if (flush == Z_FULL_FLUSH) {
-                    CLEAR_HASH(s);             /* forget history */
-                }
-            }
-            flush_pending(strm);
-            if (strm->avail_out == 0) {
-              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
-              return Z_OK;
-            }
-        }
-    }
-    Assert(strm->avail_out > 0, "bug2");
-
-    if (flush != Z_FINISH) return Z_OK;
-    if (s->wrap <= 0) return Z_STREAM_END;
-
-    /* Write the trailer */
-#ifdef GZIP
-    if (s->wrap == 2) {
-        put_byte(s, (Byte)(strm->adler & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
-        put_byte(s, (Byte)(strm->total_in & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
-    }
-    else
-#endif
-    {
-        putShortMSB(s, (uInt)(strm->adler >> 16));
-        putShortMSB(s, (uInt)(strm->adler & 0xffff));
-    }
-    flush_pending(strm);
-    /* If avail_out is zero, the application will call deflate again
-     * to flush the rest.
-     */
-    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
-    return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
-    z_streamp strm;
-{
-    int status;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
-    status = strm->state->status;
-    if (status != INIT_STATE &&
-        status != EXTRA_STATE &&
-        status != NAME_STATE &&
-        status != COMMENT_STATE &&
-        status != HCRC_STATE &&
-        status != BUSY_STATE &&
-        status != FINISH_STATE) {
-      return Z_STREAM_ERROR;
-    }
-
-    /* Deallocate in reverse order of allocations: */
-    TRY_FREE(strm, strm->state->pending_buf);
-    TRY_FREE(strm, strm->state->head);
-    TRY_FREE(strm, strm->state->prev);
-    TRY_FREE(strm, strm->state->window);
-
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-
-    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* =========================================================================
- * Copy the source state to the destination state.
- * To simplify the source, this is not supported for 16-bit MSDOS (which
- * doesn't have enough memory anyway to duplicate compression states).
- */
-int ZEXPORT deflateCopy (dest, source)
-    z_streamp dest;
-    z_streamp source;
-{
-#ifdef MAXSEG_64K
-    return Z_STREAM_ERROR;
-#else
-    deflate_state *ds;
-    deflate_state *ss;
-    ushf *overlay;
-
-
-    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
-        return Z_STREAM_ERROR;
-    }
-
-    ss = source->state;
-
-    zmemcpy(dest, source, sizeof(z_stream));
-
-    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
-    if (ds == Z_NULL) return Z_MEM_ERROR;
-    dest->state = (struct internal_state FAR *) ds;
-    zmemcpy(ds, ss, sizeof(deflate_state));
-    ds->strm = dest;
-
-    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
-    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
-    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
-    ds->pending_buf = (uchf *) overlay;
-
-    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
-        ds->pending_buf == Z_NULL) {
-        deflateEnd (dest);
-        return Z_MEM_ERROR;
-    }
-    /* following zmemcpy do not work for 16-bit MSDOS */
-    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
-    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
-    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
-    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
-
-    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
-    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
-    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
-
-    ds->l_desc.dyn_tree = ds->dyn_ltree;
-    ds->d_desc.dyn_tree = ds->dyn_dtree;
-    ds->bl_desc.dyn_tree = ds->bl_tree;
-
-    return Z_OK;
-#endif /* MAXSEG_64K */
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read.  All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
-    z_streamp strm;
-    Bytef *buf;
-    unsigned size;
-{
-    unsigned len = strm->avail_in;
-
-    if (len > size) len = size;
-    if (len == 0) return 0;
-
-    strm->avail_in  -= len;
-
-    if (strm->state->wrap == 1) {
-        strm->adler = adler32(strm->adler, strm->next_in, len);
-    }
-#ifdef GZIP
-    else if (strm->state->wrap == 2) {
-        strm->adler = crc32(strm->adler, strm->next_in, len);
-    }
-#endif
-    zmemcpy(buf, strm->next_in, len);
-    strm->next_in  += len;
-    strm->total_in += len;
-
-    return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
-    deflate_state *s;
-{
-    s->window_size = (ulg)2L*s->w_size;
-
-    CLEAR_HASH(s);
-
-    /* Set the default configuration parameters:
-     */
-    s->max_lazy_match   = configuration_table[s->level].max_lazy;
-    s->good_match       = configuration_table[s->level].good_length;
-    s->nice_match       = configuration_table[s->level].nice_length;
-    s->max_chain_length = configuration_table[s->level].max_chain;
-
-    s->strstart = 0;
-    s->block_start = 0L;
-    s->lookahead = 0;
-    s->match_length = s->prev_length = MIN_MATCH-1;
-    s->match_available = 0;
-    s->ins_h = 0;
-#ifndef FASTEST
-#ifdef ASMV
-    match_init(); /* initialize the asm code */
-#endif
-#endif
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    unsigned chain_length = s->max_chain_length;/* max hash chain length */
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    int best_len = s->prev_length;              /* best match length so far */
-    int nice_match = s->nice_match;             /* stop if match long enough */
-    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-        s->strstart - (IPos)MAX_DIST(s) : NIL;
-    /* Stop when cur_match becomes <= limit. To simplify the code,
-     * we prevent matches with the string of window index 0.
-     */
-    Posf *prev = s->prev;
-    uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
-    /* Compare two bytes at a time. Note: this is not always beneficial.
-     * Try with and without -DUNALIGNED_OK to check.
-     */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
-    register ush scan_start = *(ushf*)scan;
-    register ush scan_end   = *(ushf*)(scan+best_len-1);
-#else
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-    register Byte scan_end1  = scan[best_len-1];
-    register Byte scan_end   = scan[best_len];
-#endif
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    /* Do not waste too much time if we already have a good match: */
-    if (s->prev_length >= s->good_match) {
-        chain_length >>= 2;
-    }
-    /* Do not look for matches beyond the end of the input. This is necessary
-     * to make deflate deterministic.
-     */
-    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    do {
-        Assert(cur_match < s->strstart, "no future");
-        match = s->window + cur_match;
-
-        /* Skip to next match if the match length cannot increase
-         * or if the match length is less than 2.  Note that the checks below
-         * for insufficient lookahead only occur occasionally for performance
-         * reasons.  Therefore uninitialized memory will be accessed, and
-         * conditional jumps will be made that depend on those values.
-         * However the length of the match is limited to the lookahead, so
-         * the output of deflate is not affected by the uninitialized values.
-         */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
-        /* This code assumes sizeof(unsigned short) == 2. Do not use
-         * UNALIGNED_OK if your compiler uses a different size.
-         */
-        if (*(ushf*)(match+best_len-1) != scan_end ||
-            *(ushf*)match != scan_start) continue;
-
-        /* It is not necessary to compare scan[2] and match[2] since they are
-         * always equal when the other bytes match, given that the hash keys
-         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
-         * strstart+3, +5, ... up to strstart+257. We check for insufficient
-         * lookahead only every 4th comparison; the 128th check will be made
-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
-         * necessary to put more guard bytes at the end of the window, or
-         * to check more often for insufficient lookahead.
-         */
-        Assert(scan[2] == match[2], "scan[2]?");
-        scan++, match++;
-        do {
-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 scan < strend);
-        /* The funny "do {}" generates better code on most compilers */
-
-        /* Here, scan <= window+strstart+257 */
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-        if (*scan == *match) scan++;
-
-        len = (MAX_MATCH - 1) - (int)(strend-scan);
-        scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
-        if (match[best_len]   != scan_end  ||
-            match[best_len-1] != scan_end1 ||
-            *match            != *scan     ||
-            *++match          != scan[1])      continue;
-
-        /* The check at best_len-1 can be removed because it will be made
-         * again later. (This heuristic is not always a win.)
-         * It is not necessary to compare scan[2] and match[2] since they
-         * are always equal when the other bytes match, given that
-         * the hash keys are equal and that HASH_BITS >= 8.
-         */
-        scan += 2, match++;
-        Assert(*scan == *match, "match[2]?");
-
-        /* We check for insufficient lookahead only every 8th comparison;
-         * the 256th check will be made at strstart+258.
-         */
-        do {
-        } while (*++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 scan < strend);
-
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-        len = MAX_MATCH - (int)(strend - scan);
-        scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
-        if (len > best_len) {
-            s->match_start = cur_match;
-            best_len = len;
-            if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
-            scan_end = *(ushf*)(scan+best_len-1);
-#else
-            scan_end1  = scan[best_len-1];
-            scan_end   = scan[best_len];
-#endif
-        }
-    } while ((cur_match = prev[cur_match & wmask]) > limit
-             && --chain_length != 0);
-
-    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-    return s->lookahead;
-}
-#endif /* ASMV */
-#endif /* FASTEST */
-
-/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 or strategy == Z_RLE only
- */
-local uInt longest_match_fast(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    Assert(cur_match < s->strstart, "no future");
-
-    match = s->window + cur_match;
-
-    /* Return failure if the match length is less than 2:
-     */
-    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
-
-    /* The check at best_len-1 can be removed because it will be made
-     * again later. (This heuristic is not always a win.)
-     * It is not necessary to compare scan[2] and match[2] since they
-     * are always equal when the other bytes match, given that
-     * the hash keys are equal and that HASH_BITS >= 8.
-     */
-    scan += 2, match += 2;
-    Assert(*scan == *match, "match[2]?");
-
-    /* We check for insufficient lookahead only every 8th comparison;
-     * the 256th check will be made at strstart+258.
-     */
-    do {
-    } while (*++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             scan < strend);
-
-    Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-    len = MAX_MATCH - (int)(strend - scan);
-
-    if (len < MIN_MATCH) return MIN_MATCH - 1;
-
-    s->match_start = cur_match;
-    return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
-}
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
-    deflate_state *s;
-    IPos start, match;
-    int length;
-{
-    /* check that the match is indeed a match */
-    if (zmemcmp(s->window + match,
-                s->window + start, length) != EQUAL) {
-        fprintf(stderr, " start %u, match %u, length %d\n",
-                start, match, length);
-        do {
-            fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
-        } while (--length != 0);
-        z_error("invalid match");
-    }
-    if (z_verbose > 1) {
-        fprintf(stderr,"\\[%d,%d]", start-match, length);
-        do { putc(s->window[start++], stderr); } while (--length != 0);
-    }
-}
-#else
-#  define check_match(s, start, match, length)
-#endif /* DEBUG */
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- *    At least one byte has been read, or avail_in == 0; reads are
- *    performed for at least two bytes (required for the zip translate_eol
- *    option -- not supported here).
- */
-local void fill_window(s)
-    deflate_state *s;
-{
-    register unsigned n, m;
-    register Posf *p;
-    unsigned more;    /* Amount of free space at the end of the window. */
-    uInt wsize = s->w_size;
-
-    do {
-        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
-        /* Deal with !@#$% 64K limit: */
-        if (sizeof(int) <= 2) {
-            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
-                more = wsize;
-
-            } else if (more == (unsigned)(-1)) {
-                /* Very unlikely, but possible on 16 bit machine if
-                 * strstart == 0 && lookahead == 1 (input done a byte at time)
-                 */
-                more--;
-            }
-        }
-
-        /* If the window is almost full and there is insufficient lookahead,
-         * move the upper half to the lower one to make room in the upper half.
-         */
-        if (s->strstart >= wsize+MAX_DIST(s)) {
-
-            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
-            s->match_start -= wsize;
-            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
-            s->block_start -= (long) wsize;
-
-            /* Slide the hash table (could be avoided with 32 bit values
-               at the expense of memory usage). We slide even when level == 0
-               to keep the hash table consistent if we switch back to level > 0
-               later. (Using level 0 permanently is not an optimal usage of
-               zlib, so we don't care about this pathological case.)
-             */
-            /* %%% avoid this when Z_RLE */
-            n = s->hash_size;
-            p = &s->head[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-            } while (--n);
-
-            n = wsize;
-#ifndef FASTEST
-            p = &s->prev[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-                /* If n is not on any hash chain, prev[n] is garbage but
-                 * its value will never be used.
-                 */
-            } while (--n);
-#endif
-            more += wsize;
-        }
-        if (s->strm->avail_in == 0) return;
-
-        /* If there was no sliding:
-         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
-         *    more == window_size - lookahead - strstart
-         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
-         * => more >= window_size - 2*WSIZE + 2
-         * In the BIG_MEM or MMAP case (not yet supported),
-         *   window_size == input_size + MIN_LOOKAHEAD  &&
-         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
-         * Otherwise, window_size == 2*WSIZE so more >= 2.
-         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
-         */
-        Assert(more >= 2, "more < 2");
-
-        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
-        s->lookahead += n;
-
-        /* Initialize the hash value now that we have some input: */
-        if (s->lookahead >= MIN_MATCH) {
-            s->ins_h = s->window[s->strstart];
-            UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-            Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-        }
-        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
-         * but this is not important since only literal bytes will be emitted.
-         */
-
-    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
-   _tr_flush_block(s, (s->block_start >= 0L ? \
-                   (charf *)&s->window[(unsigned)s->block_start] : \
-                   (charf *)Z_NULL), \
-                (ulg)((long)s->strstart - s->block_start), \
-                (eof)); \
-   s->block_start = s->strstart; \
-   flush_pending(s->strm); \
-   Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
-   FLUSH_BLOCK_ONLY(s, eof); \
-   if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-local block_state deflate_stored(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
-     * to pending_buf_size, and each stored block has a 5 byte header:
-     */
-    ulg max_block_size = 0xffff;
-    ulg max_start;
-
-    if (max_block_size > s->pending_buf_size - 5) {
-        max_block_size = s->pending_buf_size - 5;
-    }
-
-    /* Copy as much as possible from input to output: */
-    for (;;) {
-        /* Fill the window as much as possible: */
-        if (s->lookahead <= 1) {
-
-            Assert(s->strstart < s->w_size+MAX_DIST(s) ||
-                   s->block_start >= (long)s->w_size, "slide too late");
-
-            fill_window(s);
-            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-        Assert(s->block_start >= 0L, "block gone");
-
-        s->strstart += s->lookahead;
-        s->lookahead = 0;
-
-        /* Emit a stored block if pending_buf will be full: */
-        max_start = s->block_start + max_block_size;
-        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
-            /* strstart == 0 is possible when wraparound on 16-bit machine */
-            s->lookahead = (uInt)(s->strstart - max_start);
-            s->strstart = (uInt)max_start;
-            FLUSH_BLOCK(s, 0);
-        }
-        /* Flush if we may have to slide, otherwise block_start may become
-         * negative and the data will be gone:
-         */
-        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
-            FLUSH_BLOCK(s, 0);
-        }
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL; /* head of the hash chain */
-    int bflush;           /* set if current block must be flushed */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         * At this point we have always match_length < MIN_MATCH
-         */
-        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-#ifdef FASTEST
-            if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) ||
-                (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-#else
-            if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
-                s->match_length = longest_match (s, hash_head);
-            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-#endif
-            /* longest_match() or longest_match_fast() sets match_start */
-        }
-        if (s->match_length >= MIN_MATCH) {
-            check_match(s, s->strstart, s->match_start, s->match_length);
-
-            _tr_tally_dist(s, s->strstart - s->match_start,
-                           s->match_length - MIN_MATCH, bflush);
-
-            s->lookahead -= s->match_length;
-
-            /* Insert new strings in the hash table only if the match length
-             * is not too large. This saves time but degrades compression.
-             */
-#ifndef FASTEST
-            if (s->match_length <= s->max_insert_length &&
-                s->lookahead >= MIN_MATCH) {
-                s->match_length--; /* string at strstart already in table */
-                do {
-                    s->strstart++;
-                    INSERT_STRING(s, s->strstart, hash_head);
-                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
-                     * always MIN_MATCH bytes ahead.
-                     */
-                } while (--s->match_length != 0);
-                s->strstart++;
-            } else
-#endif
-            {
-                s->strstart += s->match_length;
-                s->match_length = 0;
-                s->ins_h = s->window[s->strstart];
-                UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-                Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
-                 * matter since it will be recomputed at next deflate call.
-                 */
-            }
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL;    /* head of hash chain */
-    int bflush;              /* set if current block must be flushed */
-
-    /* Process the input block. */
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         */
-        s->prev_length = s->match_length, s->prev_match = s->match_start;
-        s->match_length = MIN_MATCH-1;
-
-        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
-            s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
-                s->match_length = longest_match (s, hash_head);
-            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-            /* longest_match() or longest_match_fast() sets match_start */
-
-            if (s->match_length <= 5 && (s->strategy == Z_FILTERED
-#if TOO_FAR <= 32767
-                || (s->match_length == MIN_MATCH &&
-                    s->strstart - s->match_start > TOO_FAR)
-#endif
-                )) {
-
-                /* If prev_match is also MIN_MATCH, match_start is garbage
-                 * but we will ignore the current match anyway.
-                 */
-                s->match_length = MIN_MATCH-1;
-            }
-        }
-        /* If there was a match at the previous step and the current
-         * match is not better, output the previous match:
-         */
-        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
-            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
-            /* Do not insert strings in hash table beyond this. */
-
-            check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
-            _tr_tally_dist(s, s->strstart -1 - s->prev_match,
-                           s->prev_length - MIN_MATCH, bflush);
-
-            /* Insert in hash table all strings up to the end of the match.
-             * strstart-1 and strstart are already inserted. If there is not
-             * enough lookahead, the last two strings are not inserted in
-             * the hash table.
-             */
-            s->lookahead -= s->prev_length-1;
-            s->prev_length -= 2;
-            do {
-                if (++s->strstart <= max_insert) {
-                    INSERT_STRING(s, s->strstart, hash_head);
-                }
-            } while (--s->prev_length != 0);
-            s->match_available = 0;
-            s->match_length = MIN_MATCH-1;
-            s->strstart++;
-
-            if (bflush) FLUSH_BLOCK(s, 0);
-
-        } else if (s->match_available) {
-            /* If there was no match at the previous position, output a
-             * single literal. If there was a match but the current match
-             * is longer, truncate the previous match to a single literal.
-             */
-            Tracevv((stderr,"%c", s->window[s->strstart-1]));
-            _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-            if (bflush) {
-                FLUSH_BLOCK_ONLY(s, 0);
-            }
-            s->strstart++;
-            s->lookahead--;
-            if (s->strm->avail_out == 0) return need_more;
-        } else {
-            /* There is no previous match to compare with, wait for
-             * the next step to decide.
-             */
-            s->match_available = 1;
-            s->strstart++;
-            s->lookahead--;
-        }
-    }
-    Assert (flush != Z_NO_FLUSH, "no flush?");
-    if (s->match_available) {
-        Tracevv((stderr,"%c", s->window[s->strstart-1]));
-        _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-        s->match_available = 0;
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif /* FASTEST */
-
-#if 0
-/* ===========================================================================
- * For Z_RLE, simply look for runs of bytes, generate matches only of distance
- * one.  Do not maintain a hash table.  (It will be regenerated if this run of
- * deflate switches away from Z_RLE.)
- */
-local block_state deflate_rle(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    int bflush;         /* set if current block must be flushed */
-    uInt run;           /* length of run */
-    uInt max;           /* maximum length of run */
-    uInt prev;          /* byte at distance one to match */
-    Bytef *scan;        /* scan for end of run */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the longest encodable run.
-         */
-        if (s->lookahead < MAX_MATCH) {
-            fill_window(s);
-            if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* See how many times the previous byte repeats */
-        run = 0;
-        if (s->strstart > 0) {      /* if there is a previous byte, that is */
-            max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
-            scan = s->window + s->strstart - 1;
-            prev = *scan++;
-            do {
-                if (*scan++ != prev)
-                    break;
-            } while (++run < max);
-        }
-
-        /* Emit match if have run of MIN_MATCH or longer, else emit literal */
-        if (run >= MIN_MATCH) {
-            check_match(s, s->strstart, s->strstart - 1, run);
-            _tr_tally_dist(s, 1, run - MIN_MATCH, bflush);
-            s->lookahead -= run;
-            s->strstart += run;
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif
diff --git a/libsrc/zlib/deflate.h b/libsrc/zlib/deflate.h
deleted file mode 100644
index 6a31736..0000000
--- a/libsrc/zlib/deflate.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-2004 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: deflate.h,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#ifndef DEFLATE_H
-#define DEFLATE_H
-
-#include "zutil.h"
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer creation by deflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip encoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GZIP
-#endif
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS  256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES   30
-/* number of distance codes */
-
-#define BL_CODES  19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE    42
-#define EXTRA_STATE   69
-#define NAME_STATE    73
-#define COMMENT_STATE 91
-#define HCRC_STATE   103
-#define BUSY_STATE   113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
-    union {
-        ush  freq;       /* frequency count */
-        ush  code;       /* bit string */
-    } fc;
-    union {
-        ush  dad;        /* father node in Huffman tree */
-        ush  len;        /* length of bit string */
-    } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad  dl.dad
-#define Len  dl.len
-
-typedef struct static_tree_desc_s  static_tree_desc;
-
-typedef struct tree_desc_s {
-    ct_data *dyn_tree;           /* the dynamic tree */
-    int     max_code;            /* largest code with non zero frequency */
-    static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
-    z_streamp strm;      /* pointer back to this zlib stream */
-    int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
-    ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
-    uInt   pending;      /* nb of bytes in the pending buffer */
-    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
-    gz_headerp  gzhead;  /* gzip header information to write */
-    uInt   gzindex;      /* where in extra, name, or comment */
-    Byte  method;        /* STORED (for zip only) or DEFLATED */
-    int   last_flush;    /* value of flush param for previous deflate call */
-
-                /* used by deflate.c: */
-
-    uInt  w_size;        /* LZ77 window size (32K by default) */
-    uInt  w_bits;        /* log2(w_size)  (8..16) */
-    uInt  w_mask;        /* w_size - 1 */
-
-    Bytef *window;
-    /* Sliding window. Input bytes are read into the second half of the window,
-     * and move to the first half later to keep a dictionary of at least wSize
-     * bytes. With this organization, matches are limited to a distance of
-     * wSize-MAX_MATCH bytes, but this ensures that IO is always
-     * performed with a length multiple of the block size. Also, it limits
-     * the window size to 64K, which is quite useful on MSDOS.
-     * To do: use the user input buffer as sliding window.
-     */
-
-    ulg window_size;
-    /* Actual size of window: 2*wSize, except when the user input buffer
-     * is directly used as sliding window.
-     */
-
-    Posf *prev;
-    /* Link to older string with same hash index. To limit the size of this
-     * array to 64K, this link is maintained only for the last 32K strings.
-     * An index in this array is thus a window index modulo 32K.
-     */
-
-    Posf *head; /* Heads of the hash chains or NIL. */
-
-    uInt  ins_h;          /* hash index of string to be inserted */
-    uInt  hash_size;      /* number of elements in hash table */
-    uInt  hash_bits;      /* log2(hash_size) */
-    uInt  hash_mask;      /* hash_size-1 */
-
-    uInt  hash_shift;
-    /* Number of bits by which ins_h must be shifted at each input
-     * step. It must be such that after MIN_MATCH steps, the oldest
-     * byte no longer takes part in the hash key, that is:
-     *   hash_shift * MIN_MATCH >= hash_bits
-     */
-
-    long block_start;
-    /* Window position at the beginning of the current output block. Gets
-     * negative when the window is moved backwards.
-     */
-
-    uInt match_length;           /* length of best match */
-    IPos prev_match;             /* previous match */
-    int match_available;         /* set if previous match exists */
-    uInt strstart;               /* start of string to insert */
-    uInt match_start;            /* start of matching string */
-    uInt lookahead;              /* number of valid bytes ahead in window */
-
-    uInt prev_length;
-    /* Length of the best match at previous step. Matches not greater than this
-     * are discarded. This is used in the lazy match evaluation.
-     */
-
-    uInt max_chain_length;
-    /* To speed up deflation, hash chains are never searched beyond this
-     * length.  A higher limit improves compression ratio but degrades the
-     * speed.
-     */
-
-    uInt max_lazy_match;
-    /* Attempt to find a better match only when the current match is strictly
-     * smaller than this value. This mechanism is used only for compression
-     * levels >= 4.
-     */
-#   define max_insert_length  max_lazy_match
-    /* Insert new strings in the hash table only if the match length is not
-     * greater than this length. This saves time but degrades compression.
-     * max_insert_length is used only for compression levels <= 3.
-     */
-
-    int level;    /* compression level (1..9) */
-    int strategy; /* favor or force Huffman coding*/
-
-    uInt good_match;
-    /* Use a faster search when the previous match is longer than this */
-
-    int nice_match; /* Stop searching when current match exceeds this */
-
-                /* used by trees.c: */
-    /* Didn't use ct_data typedef below to supress compiler warning */
-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-
-    struct tree_desc_s l_desc;               /* desc. for literal tree */
-    struct tree_desc_s d_desc;               /* desc. for distance tree */
-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-    int heap_len;               /* number of elements in the heap */
-    int heap_max;               /* element of largest frequency */
-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-     * The same heap array is used to build all trees.
-     */
-
-    uch depth[2*L_CODES+1];
-    /* Depth of each subtree used as tie breaker for trees of equal frequency
-     */
-
-    uchf *l_buf;          /* buffer for literals or lengths */
-
-    uInt  lit_bufsize;
-    /* Size of match buffer for literals/lengths.  There are 4 reasons for
-     * limiting lit_bufsize to 64K:
-     *   - frequencies can be kept in 16 bit counters
-     *   - if compression is not successful for the first block, all input
-     *     data is still in the window so we can still emit a stored block even
-     *     when input comes from standard input.  (This can also be done for
-     *     all blocks if lit_bufsize is not greater than 32K.)
-     *   - if compression is not successful for a file smaller than 64K, we can
-     *     even emit a stored file instead of a stored block (saving 5 bytes).
-     *     This is applicable only for zip (not gzip or zlib).
-     *   - creating new Huffman trees less frequently may not provide fast
-     *     adaptation to changes in the input data statistics. (Take for
-     *     example a binary file with poorly compressible code followed by
-     *     a highly compressible string table.) Smaller buffer sizes give
-     *     fast adaptation but have of course the overhead of transmitting
-     *     trees more frequently.
-     *   - I can't count above 4
-     */
-
-    uInt last_lit;      /* running index in l_buf */
-
-    ushf *d_buf;
-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
-     * the same number of elements. To use different lengths, an extra flag
-     * array would be necessary.
-     */
-
-    ulg opt_len;        /* bit length of current block with optimal trees */
-    ulg static_len;     /* bit length of current block with static trees */
-    uInt matches;       /* number of string matches in current block */
-    int last_eob_len;   /* bit length of EOB code for last block */
-
-#ifdef DEBUG
-    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-#endif
-
-    ush bi_buf;
-    /* Output buffer. bits are inserted starting at the bottom (least
-     * significant bits).
-     */
-    int bi_valid;
-    /* Number of valid bits in bi_buf.  All bits above the last valid bit
-     * are always zero.
-     */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
-        /* in trees.c */
-void _tr_init         OF((deflate_state *s));
-int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-void _tr_align        OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-
-#define d_code(dist) \
-   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch _length_code[];
-  extern uch _dist_code[];
-#else
-  extern const uch _length_code[];
-  extern const uch _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
-  { uch cc = (c); \
-    s->d_buf[s->last_lit] = 0; \
-    s->l_buf[s->last_lit++] = cc; \
-    s->dyn_ltree[cc].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-   }
-# define _tr_tally_dist(s, distance, length, flush) \
-  { uch len = (length); \
-    ush dist = (distance); \
-    s->d_buf[s->last_lit] = dist; \
-    s->l_buf[s->last_lit++] = len; \
-    dist--; \
-    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-    s->dyn_dtree[d_code(dist)].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-  }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
-              flush = _tr_tally(s, distance, length)
-#endif
-
-#endif /* DEFLATE_H */
diff --git a/libsrc/zlib/example.c b/libsrc/zlib/example.c
deleted file mode 100644
index 26177bf..0000000
--- a/libsrc/zlib/example.c
+++ /dev/null
@@ -1,565 +0,0 @@
-/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2004 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: example.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-
-#if defined(VMS) || defined(RISCOS)
-#  define TESTFILE "foo-gz"
-#else
-#  define TESTFILE "foo.gz"
-#endif
-
-#define CHECK_ERR(err, msg) { \
-    if (err != Z_OK) { \
-        fprintf(stderr, "%s error: %d\n", msg, err); \
-        exit(1); \
-    } \
-}
-
-const char hello[] = "hello, hello!";
-/* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- */
-
-const char dictionary[] = "hello";
-uLong dictId; /* Adler32 value of the dictionary */
-
-void test_compress      OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_gzio          OF((const char *fname,
-                            Byte *uncompr, uLong uncomprLen));
-void test_deflate       OF((Byte *compr, uLong comprLen));
-void test_inflate       OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_flush         OF((Byte *compr, uLong *comprLen));
-void test_sync          OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate  OF((Byte *compr, uLong comprLen));
-void test_dict_inflate  OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-int  main               OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Test compress() and uncompress()
- */
-void test_compress(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    uLong len = (uLong)strlen(hello)+1;
-
-    err = compress(compr, &comprLen, (const Bytef*)hello, len);
-    CHECK_ERR(err, "compress");
-
-    strcpy((char*)uncompr, "garbage");
-
-    err = uncompress(uncompr, &uncomprLen, compr, comprLen);
-    CHECK_ERR(err, "uncompress");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad uncompress\n");
-        exit(1);
-    } else {
-        printf("uncompress(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test read/write of .gz files
- */
-void test_gzio(fname, uncompr, uncomprLen)
-    const char *fname; /* compressed file name */
-    Byte *uncompr;
-    uLong uncomprLen;
-{
-#ifdef NO_GZCOMPRESS
-    fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
-#else
-    int err;
-    int len = (int)strlen(hello)+1;
-    gzFile file;
-    z_off_t pos;
-
-    file = gzopen(fname, "wb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    gzputc(file, 'h');
-    if (gzputs(file, "ello") != 4) {
-        fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (gzprintf(file, ", %s!", "hello") != 8) {
-        fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
-    gzclose(file);
-
-    file = gzopen(fname, "rb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    strcpy((char*)uncompr, "garbage");
-
-    if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
-        fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
-        exit(1);
-    } else {
-        printf("gzread(): %s\n", (char*)uncompr);
-    }
-
-    pos = gzseek(file, -8L, SEEK_CUR);
-    if (pos != 6 || gztell(file) != pos) {
-        fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
-                (long)pos, (long)gztell(file));
-        exit(1);
-    }
-
-    if (gzgetc(file) != ' ') {
-        fprintf(stderr, "gzgetc error\n");
-        exit(1);
-    }
-
-    if (gzungetc(' ', file) != ' ') {
-        fprintf(stderr, "gzungetc error\n");
-        exit(1);
-    }
-
-    gzgets(file, (char*)uncompr, (int)uncomprLen);
-    if (strlen((char*)uncompr) != 7) { /* " hello!" */
-        fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (strcmp((char*)uncompr, hello + 6)) {
-        fprintf(stderr, "bad gzgets after gzseek\n");
-        exit(1);
-    } else {
-        printf("gzgets() after gzseek: %s\n", (char*)uncompr);
-    }
-
-    gzclose(file);
-#endif
-}
-
-/* ===========================================================================
- * Test deflate() with small buffers
- */
-void test_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    uLong len = (uLong)strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-
-    while (c_stream.total_in != len && c_stream.total_out < comprLen) {
-        c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
-        err = deflate(&c_stream, Z_NO_FLUSH);
-        CHECK_ERR(err, "deflate");
-    }
-    /* Finish the stream, still forcing small buffers: */
-    for (;;) {
-        c_stream.avail_out = 1;
-        err = deflate(&c_stream, Z_FINISH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "deflate");
-    }
-
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with small buffers
- */
-void test_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 0;
-    d_stream.next_out = uncompr;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
-        d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate\n");
-        exit(1);
-    } else {
-        printf("inflate(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with large buffers and dynamic change of compression level
- */
-void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_SPEED);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    /* At this point, uncompr is still mostly zeroes, so it should compress
-     * very well:
-     */
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-    if (c_stream.avail_in != 0) {
-        fprintf(stderr, "deflate not greedy\n");
-        exit(1);
-    }
-
-    /* Feed in already compressed data and switch to no compression: */
-    deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
-    c_stream.next_in = compr;
-    c_stream.avail_in = (uInt)comprLen/2;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    /* Switch back to compressing mode: */
-    deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-        exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with large buffers
- */
-void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    for (;;) {
-        d_stream.next_out = uncompr;            /* discard the output */
-        d_stream.avail_out = (uInt)uncomprLen;
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "large inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
-        fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
-        exit(1);
-    } else {
-        printf("large_inflate(): OK\n");
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with full flush
- */
-void test_flush(compr, comprLen)
-    Byte *compr;
-    uLong *comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    uInt len = (uInt)strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-    c_stream.avail_in = 3;
-    c_stream.avail_out = (uInt)*comprLen;
-    err = deflate(&c_stream, Z_FULL_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    compr[3]++; /* force an error in first compressed block */
-    c_stream.avail_in = len - 3;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        CHECK_ERR(err, "deflate");
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-
-    *comprLen = c_stream.total_out;
-}
-
-/* ===========================================================================
- * Test inflateSync()
- */
-void test_sync(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 2; /* just read the zlib header */
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    inflate(&d_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "inflate");
-
-    d_stream.avail_in = (uInt)comprLen-2;   /* read all compressed data */
-    err = inflateSync(&d_stream);           /* but skip the damaged part */
-    CHECK_ERR(err, "inflateSync");
-
-    err = inflate(&d_stream, Z_FINISH);
-    if (err != Z_DATA_ERROR) {
-        fprintf(stderr, "inflate should report DATA_ERROR\n");
-        /* Because of incorrect adler32 */
-        exit(1);
-    }
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    printf("after inflateSync(): hel%s\n", (char *)uncompr);
-}
-
-/* ===========================================================================
- * Test deflate() with preset dictionary
- */
-void test_dict_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    err = deflateSetDictionary(&c_stream,
-                               (const Bytef*)dictionary, sizeof(dictionary));
-    CHECK_ERR(err, "deflateSetDictionary");
-
-    dictId = c_stream.adler;
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    c_stream.next_in = (Bytef*)hello;
-    c_stream.avail_in = (uInt)strlen(hello)+1;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-        exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with a preset dictionary
- */
-void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    for (;;) {
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        if (err == Z_NEED_DICT) {
-            if (d_stream.adler != dictId) {
-                fprintf(stderr, "unexpected dictionary");
-                exit(1);
-            }
-            err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
-                                       sizeof(dictionary));
-        }
-        CHECK_ERR(err, "inflate with dict");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate with dict\n");
-        exit(1);
-    } else {
-        printf("inflate with dictionary: %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Usage:  example [output.gz  [input.gz]]
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    Byte *compr, *uncompr;
-    uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
-    uLong uncomprLen = comprLen;
-    static const char* myVersion = ZLIB_VERSION;
-
-    if (zlibVersion()[0] != myVersion[0]) {
-        fprintf(stderr, "incompatible zlib version\n");
-        exit(1);
-
-    } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
-        fprintf(stderr, "warning: different zlib version\n");
-    }
-
-    printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
-            ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
-
-    compr    = (Byte*)calloc((uInt)comprLen, 1);
-    uncompr  = (Byte*)calloc((uInt)uncomprLen, 1);
-    /* compr and uncompr are cleared to avoid reading uninitialized
-     * data and to ensure that uncompr compresses well.
-     */
-    if (compr == Z_NULL || uncompr == Z_NULL) {
-        printf("out of memory\n");
-        exit(1);
-    }
-    test_compress(compr, comprLen, uncompr, uncomprLen);
-
-    test_gzio((argc > 1 ? argv[1] : TESTFILE),
-              uncompr, uncomprLen);
-
-    test_deflate(compr, comprLen);
-    test_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_large_deflate(compr, comprLen, uncompr, uncomprLen);
-    test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_flush(compr, &comprLen);
-    test_sync(compr, comprLen, uncompr, uncomprLen);
-    comprLen = uncomprLen;
-
-    test_dict_deflate(compr, comprLen);
-    test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    free(compr);
-    free(uncompr);
-
-    return 0;
-}
diff --git a/libsrc/zlib/examples/README.examples b/libsrc/zlib/examples/README.examples
deleted file mode 100644
index 5632d7a..0000000
--- a/libsrc/zlib/examples/README.examples
+++ /dev/null
@@ -1,42 +0,0 @@
-This directory contains examples of the use of zlib.
-
-fitblk.c
-    compress just enough input to nearly fill a requested output size
-    - zlib isn't designed to do this, but fitblk does it anyway
-
-gun.c
-    uncompress a gzip file
-    - illustrates the use of inflateBack() for high speed file-to-file
-      decompression using call-back functions
-    - is approximately twice as fast as gzip -d
-    - also provides Unix uncompress functionality, again twice as fast
-
-gzappend.c
-    append to a gzip file
-    - illustrates the use of the Z_BLOCK flush parameter for inflate()
-    - illustrates the use of deflatePrime() to start at any bit
-
-gzjoin.c
-    join gzip files without recalculating the crc or recompressing
-    - illustrates the use of the Z_BLOCK flush parameter for inflate()
-    - illustrates the use of crc32_combine()
-
-gzlog.c
-gzlog.h
-    efficiently maintain a message log file in gzip format
-    - illustrates use of raw deflate and Z_SYNC_FLUSH
-    - illustrates use of gzip header extra field
-
-zlib_how.html
-    painfully comprehensive description of zpipe.c (see below)
-    - describes in excruciating detail the use of deflate() and inflate()
-
-zpipe.c
-    reads and writes zlib streams from stdin to stdout
-    - illustrates the proper use of deflate() and inflate()
-    - deeply commented in zlib_how.html (see above)
-
-zran.c
-    index a zlib or gzip stream and randomly access it
-    - illustrates the use of Z_BLOCK, inflatePrime(), and
-      inflateSetDictionary() to provide random access
diff --git a/libsrc/zlib/examples/fitblk.c b/libsrc/zlib/examples/fitblk.c
deleted file mode 100644
index c61de5c..0000000
--- a/libsrc/zlib/examples/fitblk.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* fitblk.c: example of fitting compressed output to a specified size
-   Not copyrighted -- provided to the public domain
-   Version 1.1  25 November 2004  Mark Adler */
-
-/* Version history:
-   1.0  24 Nov 2004  First version
-   1.1  25 Nov 2004  Change deflateInit2() to deflateInit()
-                     Use fixed-size, stack-allocated raw buffers
-                     Simplify code moving compression to subroutines
-                     Use assert() for internal errors
-                     Add detailed description of approach
- */
-
-/* Approach to just fitting a requested compressed size:
-
-   fitblk performs three compression passes on a portion of the input
-   data in order to determine how much of that input will compress to
-   nearly the requested output block size.  The first pass generates
-   enough deflate blocks to produce output to fill the requested
-   output size plus a specfied excess amount (see the EXCESS define
-   below).  The last deflate block may go quite a bit past that, but
-   is discarded.  The second pass decompresses and recompresses just
-   the compressed data that fit in the requested plus excess sized
-   buffer.  The deflate process is terminated after that amount of
-   input, which is less than the amount consumed on the first pass.
-   The last deflate block of the result will be of a comparable size
-   to the final product, so that the header for that deflate block and
-   the compression ratio for that block will be about the same as in
-   the final product.  The third compression pass decompresses the
-   result of the second step, but only the compressed data up to the
-   requested size minus an amount to allow the compressed stream to
-   complete (see the MARGIN define below).  That will result in a
-   final compressed stream whose length is less than or equal to the
-   requested size.  Assuming sufficient input and a requested size
-   greater than a few hundred bytes, the shortfall will typically be
-   less than ten bytes.
-
-   If the input is short enough that the first compression completes
-   before filling the requested output size, then that compressed
-   stream is return with no recompression.
-
-   EXCESS is chosen to be just greater than the shortfall seen in a
-   two pass approach similar to the above.  That shortfall is due to
-   the last deflate block compressing more efficiently with a smaller
-   header on the second pass.  EXCESS is set to be large enough so
-   that there is enough uncompressed data for the second pass to fill
-   out the requested size, and small enough so that the final deflate
-   block of the second pass will be close in size to the final deflate
-   block of the third and final pass.  MARGIN is chosen to be just
-   large enough to assure that the final compression has enough room
-   to complete in all cases.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "zlib.h"
-
-#define local static
-
-/* print nastygram and leave */
-local void quit(char *why)
-{
-    fprintf(stderr, "fitblk abort: %s\n", why);
-    exit(1);
-}
-
-#define RAWLEN 4096    /* intermediate uncompressed buffer size */
-
-/* compress from file to def until provided buffer is full or end of
-   input reached; return last deflate() return value, or Z_ERRNO if
-   there was read error on the file */
-local int partcompress(FILE *in, z_streamp def)
-{
-    int ret, flush;
-    unsigned char raw[RAWLEN];
-
-    flush = Z_NO_FLUSH;
-    do {
-        def->avail_in = fread(raw, 1, RAWLEN, in);
-        if (ferror(in))
-            return Z_ERRNO;
-        def->next_in = raw;
-        if (feof(in))
-            flush = Z_FINISH;
-        ret = deflate(def, flush);
-        assert(ret != Z_STREAM_ERROR);
-    } while (def->avail_out != 0 && flush == Z_NO_FLUSH);
-    return ret;
-}
-
-/* recompress from inf's input to def's output; the input for inf and
-   the output for def are set in those structures before calling;
-   return last deflate() return value, or Z_MEM_ERROR if inflate()
-   was not able to allocate enough memory when it needed to */
-local int recompress(z_streamp inf, z_streamp def)
-{
-    int ret, flush;
-    unsigned char raw[RAWLEN];
-
-    flush = Z_NO_FLUSH;
-    do {
-        /* decompress */
-        inf->avail_out = RAWLEN;
-        inf->next_out = raw;
-        ret = inflate(inf, Z_NO_FLUSH);
-        assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR &&
-               ret != Z_NEED_DICT);
-        if (ret == Z_MEM_ERROR)
-            return ret;
-
-        /* compress what was decompresed until done or no room */
-        def->avail_in = RAWLEN - inf->avail_out;
-        def->next_in = raw;
-        if (inf->avail_out != 0)
-            flush = Z_FINISH;
-        ret = deflate(def, flush);
-        assert(ret != Z_STREAM_ERROR);
-    } while (ret != Z_STREAM_END && def->avail_out != 0);
-    return ret;
-}
-
-#define EXCESS 256      /* empirically determined stream overage */
-#define MARGIN 8        /* amount to back off for completion */
-
-/* compress from stdin to fixed-size block on stdout */
-int main(int argc, char **argv)
-{
-    int ret;                /* return code */
-    unsigned size;          /* requested fixed output block size */
-    unsigned have;          /* bytes written by deflate() call */
-    unsigned char *blk;     /* intermediate and final stream */
-    unsigned char *tmp;     /* close to desired size stream */
-    z_stream def, inf;      /* zlib deflate and inflate states */
-
-    /* get requested output size */
-    if (argc != 2)
-        quit("need one argument: size of output block");
-    ret = strtol(argv[1], argv + 1, 10);
-    if (argv[1][0] != 0)
-        quit("argument must be a number");
-    if (ret < 8)            /* 8 is minimum zlib stream size */
-        quit("need positive size of 8 or greater");
-    size = (unsigned)ret;
-
-    /* allocate memory for buffers and compression engine */
-    blk = malloc(size + EXCESS);
-    def.zalloc = Z_NULL;
-    def.zfree = Z_NULL;
-    def.opaque = Z_NULL;
-    ret = deflateInit(&def, Z_DEFAULT_COMPRESSION);
-    if (ret != Z_OK || blk == NULL)
-        quit("out of memory");
-
-    /* compress from stdin until output full, or no more input */
-    def.avail_out = size + EXCESS;
-    def.next_out = blk;
-    ret = partcompress(stdin, &def);
-    if (ret == Z_ERRNO)
-        quit("error reading input");
-
-    /* if it all fit, then size was undersubscribed -- done! */
-    if (ret == Z_STREAM_END && def.avail_out >= EXCESS) {
-        /* write block to stdout */
-        have = size + EXCESS - def.avail_out;
-        if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
-            quit("error writing output");
-
-        /* clean up and print results to stderr */
-        ret = deflateEnd(&def);
-        assert(ret != Z_STREAM_ERROR);
-        free(blk);
-        fprintf(stderr,
-                "%u bytes unused out of %u requested (all input)\n",
-                size - have, size);
-        return 0;
-    }
-
-    /* it didn't all fit -- set up for recompression */
-    inf.zalloc = Z_NULL;
-    inf.zfree = Z_NULL;
-    inf.opaque = Z_NULL;
-    inf.avail_in = 0;
-    inf.next_in = Z_NULL;
-    ret = inflateInit(&inf);
-    tmp = malloc(size + EXCESS);
-    if (ret != Z_OK || tmp == NULL)
-        quit("out of memory");
-    ret = deflateReset(&def);
-    assert(ret != Z_STREAM_ERROR);
-
-    /* do first recompression close to the right amount */
-    inf.avail_in = size + EXCESS;
-    inf.next_in = blk;
-    def.avail_out = size + EXCESS;
-    def.next_out = tmp;
-    ret = recompress(&inf, &def);
-    if (ret == Z_MEM_ERROR)
-        quit("out of memory");
-
-    /* set up for next reocmpression */
-    ret = inflateReset(&inf);
-    assert(ret != Z_STREAM_ERROR);
-    ret = deflateReset(&def);
-    assert(ret != Z_STREAM_ERROR);
-
-    /* do second and final recompression (third compression) */
-    inf.avail_in = size - MARGIN;   /* assure stream will complete */
-    inf.next_in = tmp;
-    def.avail_out = size;
-    def.next_out = blk;
-    ret = recompress(&inf, &def);
-    if (ret == Z_MEM_ERROR)
-        quit("out of memory");
-    assert(ret == Z_STREAM_END);    /* otherwise MARGIN too small */
-
-    /* done -- write block to stdout */
-    have = size - def.avail_out;
-    if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
-        quit("error writing output");
-
-    /* clean up and print results to stderr */
-    free(tmp);
-    ret = inflateEnd(&inf);
-    assert(ret != Z_STREAM_ERROR);
-    ret = deflateEnd(&def);
-    assert(ret != Z_STREAM_ERROR);
-    free(blk);
-    fprintf(stderr,
-            "%u bytes unused out of %u requested (%lu input)\n",
-            size - have, size, def.total_in);
-    return 0;
-}
diff --git a/libsrc/zlib/examples/gun.c b/libsrc/zlib/examples/gun.c
deleted file mode 100644
index bfec590..0000000
--- a/libsrc/zlib/examples/gun.c
+++ /dev/null
@@ -1,693 +0,0 @@
-/* gun.c -- simple gunzip to give an example of the use of inflateBack()
- * Copyright (C) 2003, 2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
-   Version 1.3  12 June 2005  Mark Adler */
-
-/* Version history:
-   1.0  16 Feb 2003  First version for testing of inflateBack()
-   1.1  21 Feb 2005  Decompress concatenated gzip streams
-                     Remove use of "this" variable (C++ keyword)
-                     Fix return value for in()
-                     Improve allocation failure checking
-                     Add typecasting for void * structures
-                     Add -h option for command version and usage
-                     Add a bunch of comments
-   1.2  20 Mar 2005  Add Unix compress (LZW) decompression
-                     Copy file attributes from input file to output file
-   1.3  12 Jun 2005  Add casts for error messages [Oberhumer]
- */
-
-/*
-   gun [ -t ] [ name ... ]
-
-   decompresses the data in the named gzip files.  If no arguments are given,
-   gun will decompress from stdin to stdout.  The names must end in .gz, -gz,
-   .z, -z, _z, or .Z.  The uncompressed data will be written to a file name
-   with the suffix stripped.  On success, the original file is deleted.  On
-   failure, the output file is deleted.  For most failures, the command will
-   continue to process the remaining names on the command line.  A memory
-   allocation failure will abort the command.  If -t is specified, then the
-   listed files or stdin will be tested as gzip files for integrity (without
-   checking for a proper suffix), no output will be written, and no files
-   will be deleted.
-
-   Like gzip, gun allows concatenated gzip streams and will decompress them,
-   writing all of the uncompressed data to the output.  Unlike gzip, gun allows
-   an empty file on input, and will produce no error writing an empty output
-   file.
-
-   gun will also decompress files made by Unix compress, which uses LZW
-   compression.  These files are automatically detected by virtue of their
-   magic header bytes.  Since the end of Unix compress stream is marked by the
-   end-of-file, they cannot be concantenated.  If a Unix compress stream is
-   encountered in an input file, it is the last stream in that file.
-
-   Like gunzip and uncompress, the file attributes of the orignal compressed
-   file are maintained in the final uncompressed file, to the extent that the
-   user permissions allow it.
-
-   On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version
-   1.2.4) is on the same file, when gun is linked with zlib 1.2.2.  Also the
-   LZW decompression provided by gun is about twice as fast as the standard
-   Unix uncompress command.
- */
-
-/* external functions and related types and constants */
-#include <stdio.h>          /* fprintf() */
-#include <stdlib.h>         /* malloc(), free() */
-#include <string.h>         /* strerror(), strcmp(), strlen(), memcpy() */
-#include <errno.h>          /* errno */
-#include <fcntl.h>          /* open() */
-#include <unistd.h>         /* read(), write(), close(), chown(), unlink() */
-#include <sys/types.h>
-#include <sys/stat.h>       /* stat(), chmod() */
-#include <utime.h>          /* utime() */
-#include "zlib.h"           /* inflateBackInit(), inflateBack(), */
-                            /* inflateBackEnd(), crc32() */
-
-/* function declaration */
-#define local static
-
-/* buffer constants */
-#define SIZE 32768U         /* input and output buffer sizes */
-#define PIECE 16384         /* limits i/o chunks for 16-bit int case */
-
-/* structure for infback() to pass to input function in() -- it maintains the
-   input file and a buffer of size SIZE */
-struct ind {
-    int infile;
-    unsigned char *inbuf;
-};
-
-/* Load input buffer, assumed to be empty, and return bytes loaded and a
-   pointer to them.  read() is called until the buffer is full, or until it
-   returns end-of-file or error.  Return 0 on error. */
-local unsigned in(void *in_desc, unsigned char **buf)
-{
-    int ret;
-    unsigned len;
-    unsigned char *next;
-    struct ind *me = (struct ind *)in_desc;
-
-    next = me->inbuf;
-    *buf = next;
-    len = 0;
-    do {
-        ret = PIECE;
-        if ((unsigned)ret > SIZE - len)
-            ret = (int)(SIZE - len);
-        ret = (int)read(me->infile, next, ret);
-        if (ret == -1) {
-            len = 0;
-            break;
-        }
-        next += ret;
-        len += ret;
-    } while (ret != 0 && len < SIZE);
-    return len;
-}
-
-/* structure for infback() to pass to output function out() -- it maintains the
-   output file, a running CRC-32 check on the output and the total number of
-   bytes output, both for checking against the gzip trailer.  (The length in
-   the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and
-   the output is greater than 4 GB.) */
-struct outd {
-    int outfile;
-    int check;                  /* true if checking crc and total */
-    unsigned long crc;
-    unsigned long total;
-};
-
-/* Write output buffer and update the CRC-32 and total bytes written.  write()
-   is called until all of the output is written or an error is encountered.
-   On success out() returns 0.  For a write failure, out() returns 1.  If the
-   output file descriptor is -1, then nothing is written.
- */
-local int out(void *out_desc, unsigned char *buf, unsigned len)
-{
-    int ret;
-    struct outd *me = (struct outd *)out_desc;
-
-    if (me->check) {
-        me->crc = crc32(me->crc, buf, len);
-        me->total += len;
-    }
-    if (me->outfile != -1)
-        do {
-            ret = PIECE;
-            if ((unsigned)ret > len)
-                ret = (int)len;
-            ret = (int)write(me->outfile, buf, ret);
-            if (ret == -1)
-                return 1;
-            buf += ret;
-            len -= ret;
-        } while (len != 0);
-    return 0;
-}
-
-/* next input byte macro for use inside lunpipe() and gunpipe() */
-#define NEXT() (have ? 0 : (have = in(indp, &next)), \
-                last = have ? (have--, (int)(*next++)) : -1)
-
-/* memory for gunpipe() and lunpipe() --
-   the first 256 entries of prefix[] and suffix[] are never used, could
-   have offset the index, but it's faster to waste the memory */
-unsigned char inbuf[SIZE];              /* input buffer */
-unsigned char outbuf[SIZE];             /* output buffer */
-unsigned short prefix[65536];           /* index to LZW prefix string */
-unsigned char suffix[65536];            /* one-character LZW suffix */
-unsigned char match[65280 + 2];         /* buffer for reversed match or gzip
-                                           32K sliding window */
-
-/* throw out what's left in the current bits byte buffer (this is a vestigial
-   aspect of the compressed data format derived from an implementation that
-   made use of a special VAX machine instruction!) */
-#define FLUSHCODE() \
-    do { \
-        left = 0; \
-        rem = 0; \
-        if (chunk > have) { \
-            chunk -= have; \
-            have = 0; \
-            if (NEXT() == -1) \
-                break; \
-            chunk--; \
-            if (chunk > have) { \
-                chunk = have = 0; \
-                break; \
-            } \
-        } \
-        have -= chunk; \
-        next += chunk; \
-        chunk = 0; \
-    } while (0)
-
-/* Decompress a compress (LZW) file from indp to outfile.  The compress magic
-   header (two bytes) has already been read and verified.  There are have bytes
-   of buffered input at next.  strm is used for passing error information back
-   to gunpipe().
-
-   lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of
-   file, read error, or write error (a write error indicated by strm->next_in
-   not equal to Z_NULL), or Z_DATA_ERROR for invalid input.
- */
-local int lunpipe(unsigned have, unsigned char *next, struct ind *indp,
-                  int outfile, z_stream *strm)
-{
-    int last;                   /* last byte read by NEXT(), or -1 if EOF */
-    int chunk;                  /* bytes left in current chunk */
-    int left;                   /* bits left in rem */
-    unsigned rem;               /* unused bits from input */
-    int bits;                   /* current bits per code */
-    unsigned code;              /* code, table traversal index */
-    unsigned mask;              /* mask for current bits codes */
-    int max;                    /* maximum bits per code for this stream */
-    int flags;                  /* compress flags, then block compress flag */
-    unsigned end;               /* last valid entry in prefix/suffix tables */
-    unsigned temp;              /* current code */
-    unsigned prev;              /* previous code */
-    unsigned final;             /* last character written for previous code */
-    unsigned stack;             /* next position for reversed string */
-    unsigned outcnt;            /* bytes in output buffer */
-    struct outd outd;           /* output structure */
-
-    /* set up output */
-    outd.outfile = outfile;
-    outd.check = 0;
-
-    /* process remainder of compress header -- a flags byte */
-    flags = NEXT();
-    if (last == -1)
-        return Z_BUF_ERROR;
-    if (flags & 0x60) {
-        strm->msg = (char *)"unknown lzw flags set";
-        return Z_DATA_ERROR;
-    }
-    max = flags & 0x1f;
-    if (max < 9 || max > 16) {
-        strm->msg = (char *)"lzw bits out of range";
-        return Z_DATA_ERROR;
-    }
-    if (max == 9)                           /* 9 doesn't really mean 9 */
-        max = 10;
-    flags &= 0x80;                          /* true if block compress */
-
-    /* clear table */
-    bits = 9;
-    mask = 0x1ff;
-    end = flags ? 256 : 255;
-
-    /* set up: get first 9-bit code, which is the first decompressed byte, but
-       don't create a table entry until the next code */
-    if (NEXT() == -1)                       /* no compressed data is ok */
-        return Z_OK;
-    final = prev = (unsigned)last;          /* low 8 bits of code */
-    if (NEXT() == -1)                       /* missing a bit */
-        return Z_BUF_ERROR;
-    if (last & 1) {                         /* code must be < 256 */
-        strm->msg = (char *)"invalid lzw code";
-        return Z_DATA_ERROR;
-    }
-    rem = (unsigned)last >> 1;              /* remaining 7 bits */
-    left = 7;
-    chunk = bits - 2;                       /* 7 bytes left in this chunk */
-    outbuf[0] = (unsigned char)final;       /* write first decompressed byte */
-    outcnt = 1;
-
-    /* decode codes */
-    stack = 0;
-    for (;;) {
-        /* if the table will be full after this, increment the code size */
-        if (end >= mask && bits < max) {
-            FLUSHCODE();
-            bits++;
-            mask <<= 1;
-            mask++;
-        }
-
-        /* get a code of length bits */
-        if (chunk == 0)                     /* decrement chunk modulo bits */
-            chunk = bits;
-        code = rem;                         /* low bits of code */
-        if (NEXT() == -1) {                 /* EOF is end of compressed data */
-            /* write remaining buffered output */
-            if (outcnt && out(&outd, outbuf, outcnt)) {
-                strm->next_in = outbuf;     /* signal write error */
-                return Z_BUF_ERROR;
-            }
-            return Z_OK;
-        }
-        code += (unsigned)last << left;     /* middle (or high) bits of code */
-        left += 8;
-        chunk--;
-        if (bits > left) {                  /* need more bits */
-            if (NEXT() == -1)               /* can't end in middle of code */
-                return Z_BUF_ERROR;
-            code += (unsigned)last << left; /* high bits of code */
-            left += 8;
-            chunk--;
-        }
-        code &= mask;                       /* mask to current code length */
-        left -= bits;                       /* number of unused bits */
-        rem = (unsigned)last >> (8 - left); /* unused bits from last byte */
-
-        /* process clear code (256) */
-        if (code == 256 && flags) {
-            FLUSHCODE();
-            bits = 9;                       /* initialize bits and mask */
-            mask = 0x1ff;
-            end = 255;                      /* empty table */
-            continue;                       /* get next code */
-        }
-
-        /* special code to reuse last match */
-        temp = code;                        /* save the current code */
-        if (code > end) {
-            /* Be picky on the allowed code here, and make sure that the code
-               we drop through (prev) will be a valid index so that random
-               input does not cause an exception.  The code != end + 1 check is
-               empirically derived, and not checked in the original uncompress
-               code.  If this ever causes a problem, that check could be safely
-               removed.  Leaving this check in greatly improves gun's ability
-               to detect random or corrupted input after a compress header.
-               In any case, the prev > end check must be retained. */
-            if (code != end + 1 || prev > end) {
-                strm->msg = (char *)"invalid lzw code";
-                return Z_DATA_ERROR;
-            }
-            match[stack++] = (unsigned char)final;
-            code = prev;
-        }
-
-        /* walk through linked list to generate output in reverse order */
-        while (code >= 256) {
-            match[stack++] = suffix[code];
-            code = prefix[code];
-        }
-        match[stack++] = (unsigned char)code;
-        final = code;
-
-        /* link new table entry */
-        if (end < mask) {
-            end++;
-            prefix[end] = (unsigned short)prev;
-            suffix[end] = (unsigned char)final;
-        }
-
-        /* set previous code for next iteration */
-        prev = temp;
-
-        /* write output in forward order */
-        while (stack > SIZE - outcnt) {
-            while (outcnt < SIZE)
-                outbuf[outcnt++] = match[--stack];
-            if (out(&outd, outbuf, outcnt)) {
-                strm->next_in = outbuf; /* signal write error */
-                return Z_BUF_ERROR;
-            }
-            outcnt = 0;
-        }
-        do {
-            outbuf[outcnt++] = match[--stack];
-        } while (stack);
-
-        /* loop for next code with final and prev as the last match, rem and
-           left provide the first 0..7 bits of the next code, end is the last
-           valid table entry */
-    }
-}
-
-/* Decompress a gzip file from infile to outfile.  strm is assumed to have been
-   successfully initialized with inflateBackInit().  The input file may consist
-   of a series of gzip streams, in which case all of them will be decompressed
-   to the output file.  If outfile is -1, then the gzip stream(s) integrity is
-   checked and nothing is written.
-
-   The return value is a zlib error code: Z_MEM_ERROR if out of memory,
-   Z_DATA_ERROR if the header or the compressed data is invalid, or if the
-   trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends
-   prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip
-   stream) follows a valid gzip stream.
- */
-local int gunpipe(z_stream *strm, int infile, int outfile)
-{
-    int ret, first, last;
-    unsigned have, flags, len;
-    unsigned char *next;
-    struct ind ind, *indp;
-    struct outd outd;
-
-    /* setup input buffer */
-    ind.infile = infile;
-    ind.inbuf = inbuf;
-    indp = &ind;
-
-    /* decompress concatenated gzip streams */
-    have = 0;                               /* no input data read in yet */
-    first = 1;                              /* looking for first gzip header */
-    strm->next_in = Z_NULL;                 /* so Z_BUF_ERROR means EOF */
-    for (;;) {
-        /* look for the two magic header bytes for a gzip stream */
-        if (NEXT() == -1) {
-            ret = Z_OK;
-            break;                          /* empty gzip stream is ok */
-        }
-        if (last != 31 || (NEXT() != 139 && last != 157)) {
-            strm->msg = (char *)"incorrect header check";
-            ret = first ? Z_DATA_ERROR : Z_ERRNO;
-            break;                          /* not a gzip or compress header */
-        }
-        first = 0;                          /* next non-header is junk */
-
-        /* process a compress (LZW) file -- can't be concatenated after this */
-        if (last == 157) {
-            ret = lunpipe(have, next, indp, outfile, strm);
-            break;
-        }
-
-        /* process remainder of gzip header */
-        ret = Z_BUF_ERROR;
-        if (NEXT() != 8) {                  /* only deflate method allowed */
-            if (last == -1) break;
-            strm->msg = (char *)"unknown compression method";
-            ret = Z_DATA_ERROR;
-            break;
-        }
-        flags = NEXT();                     /* header flags */
-        NEXT();                             /* discard mod time, xflgs, os */
-        NEXT();
-        NEXT();
-        NEXT();
-        NEXT();
-        NEXT();
-        if (last == -1) break;
-        if (flags & 0xe0) {
-            strm->msg = (char *)"unknown header flags set";
-            ret = Z_DATA_ERROR;
-            break;
-        }
-        if (flags & 4) {                    /* extra field */
-            len = NEXT();
-            len += (unsigned)(NEXT()) << 8;
-            if (last == -1) break;
-            while (len > have) {
-                len -= have;
-                have = 0;
-                if (NEXT() == -1) break;
-                len--;
-            }
-            if (last == -1) break;
-            have -= len;
-            next += len;
-        }
-        if (flags & 8)                      /* file name */
-            while (NEXT() != 0 && last != -1)
-                ;
-        if (flags & 16)                     /* comment */
-            while (NEXT() != 0 && last != -1)
-                ;
-        if (flags & 2) {                    /* header crc */
-            NEXT();
-            NEXT();
-        }
-        if (last == -1) break;
-
-        /* set up output */
-        outd.outfile = outfile;
-        outd.check = 1;
-        outd.crc = crc32(0L, Z_NULL, 0);
-        outd.total = 0;
-
-        /* decompress data to output */
-        strm->next_in = next;
-        strm->avail_in = have;
-        ret = inflateBack(strm, in, indp, out, &outd);
-        if (ret != Z_STREAM_END) break;
-        next = strm->next_in;
-        have = strm->avail_in;
-        strm->next_in = Z_NULL;             /* so Z_BUF_ERROR means EOF */
-
-        /* check trailer */
-        ret = Z_BUF_ERROR;
-        if (NEXT() != (outd.crc & 0xff) ||
-            NEXT() != ((outd.crc >> 8) & 0xff) ||
-            NEXT() != ((outd.crc >> 16) & 0xff) ||
-            NEXT() != ((outd.crc >> 24) & 0xff)) {
-            /* crc error */
-            if (last != -1) {
-                strm->msg = (char *)"incorrect data check";
-                ret = Z_DATA_ERROR;
-            }
-            break;
-        }
-        if (NEXT() != (outd.total & 0xff) ||
-            NEXT() != ((outd.total >> 8) & 0xff) ||
-            NEXT() != ((outd.total >> 16) & 0xff) ||
-            NEXT() != ((outd.total >> 24) & 0xff)) {
-            /* length error */
-            if (last != -1) {
-                strm->msg = (char *)"incorrect length check";
-                ret = Z_DATA_ERROR;
-            }
-            break;
-        }
-
-        /* go back and look for another gzip stream */
-    }
-
-    /* clean up and return */
-    return ret;
-}
-
-/* Copy file attributes, from -> to, as best we can.  This is best effort, so
-   no errors are reported.  The mode bits, including suid, sgid, and the sticky
-   bit are copied (if allowed), the owner's user id and group id are copied
-   (again if allowed), and the access and modify times are copied. */
-local void copymeta(char *from, char *to)
-{
-    struct stat was;
-    struct utimbuf when;
-
-    /* get all of from's Unix meta data, return if not a regular file */
-    if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG)
-        return;
-
-    /* set to's mode bits, ignore errors */
-    (void)chmod(to, was.st_mode & 07777);
-
-    /* copy owner's user and group, ignore errors */
-    (void)chown(to, was.st_uid, was.st_gid);
-
-    /* copy access and modify times, ignore errors */
-    when.actime = was.st_atime;
-    when.modtime = was.st_mtime;
-    (void)utime(to, &when);
-}
-
-/* Decompress the file inname to the file outnname, of if test is true, just
-   decompress without writing and check the gzip trailer for integrity.  If
-   inname is NULL or an empty string, read from stdin.  If outname is NULL or
-   an empty string, write to stdout.  strm is a pre-initialized inflateBack
-   structure.  When appropriate, copy the file attributes from inname to
-   outname.
-
-   gunzip() returns 1 if there is an out-of-memory error or an unexpected
-   return code from gunpipe().  Otherwise it returns 0.
- */
-local int gunzip(z_stream *strm, char *inname, char *outname, int test)
-{
-    int ret;
-    int infile, outfile;
-
-    /* open files */
-    if (inname == NULL || *inname == 0) {
-        inname = "-";
-        infile = 0;     /* stdin */
-    }
-    else {
-        infile = open(inname, O_RDONLY, 0);
-        if (infile == -1) {
-            fprintf(stderr, "gun cannot open %s\n", inname);
-            return 0;
-        }
-    }
-    if (test)
-        outfile = -1;
-    else if (outname == NULL || *outname == 0) {
-        outname = "-";
-        outfile = 1;    /* stdout */
-    }
-    else {
-        outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666);
-        if (outfile == -1) {
-            close(infile);
-            fprintf(stderr, "gun cannot create %s\n", outname);
-            return 0;
-        }
-    }
-    errno = 0;
-
-    /* decompress */
-    ret = gunpipe(strm, infile, outfile);
-    if (outfile > 2) close(outfile);
-    if (infile > 2) close(infile);
-
-    /* interpret result */
-    switch (ret) {
-    case Z_OK:
-    case Z_ERRNO:
-        if (infile > 2 && outfile > 2) {
-            copymeta(inname, outname);          /* copy attributes */
-            unlink(inname);
-        }
-        if (ret == Z_ERRNO)
-            fprintf(stderr, "gun warning: trailing garbage ignored in %s\n",
-                    inname);
-        break;
-    case Z_DATA_ERROR:
-        if (outfile > 2) unlink(outname);
-        fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg);
-        break;
-    case Z_MEM_ERROR:
-        if (outfile > 2) unlink(outname);
-        fprintf(stderr, "gun out of memory error--aborting\n");
-        return 1;
-    case Z_BUF_ERROR:
-        if (outfile > 2) unlink(outname);
-        if (strm->next_in != Z_NULL) {
-            fprintf(stderr, "gun write error on %s: %s\n",
-                    outname, strerror(errno));
-        }
-        else if (errno) {
-            fprintf(stderr, "gun read error on %s: %s\n",
-                    inname, strerror(errno));
-        }
-        else {
-            fprintf(stderr, "gun unexpected end of file on %s\n",
-                    inname);
-        }
-        break;
-    default:
-        if (outfile > 2) unlink(outname);
-        fprintf(stderr, "gun internal error--aborting\n");
-        return 1;
-    }
-    return 0;
-}
-
-/* Process the gun command line arguments.  See the command syntax near the
-   beginning of this source file. */
-int main(int argc, char **argv)
-{
-    int ret, len, test;
-    char *outname;
-    unsigned char *window;
-    z_stream strm;
-
-    /* initialize inflateBack state for repeated use */
-    window = match;                         /* reuse LZW match buffer */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = inflateBackInit(&strm, 15, window);
-    if (ret != Z_OK) {
-        fprintf(stderr, "gun out of memory error--aborting\n");
-        return 1;
-    }
-
-    /* decompress each file to the same name with the suffix removed */
-    argc--;
-    argv++;
-    test = 0;
-    if (argc && strcmp(*argv, "-h") == 0) {
-        fprintf(stderr, "gun 1.3 (12 Jun 2005)\n");
-        fprintf(stderr, "Copyright (c) 2005 Mark Adler\n");
-        fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n");
-        return 0;
-    }
-    if (argc && strcmp(*argv, "-t") == 0) {
-        test = 1;
-        argc--;
-        argv++;
-    }
-    if (argc)
-        do {
-            if (test)
-                outname = NULL;
-            else {
-                len = (int)strlen(*argv);
-                if (strcmp(*argv + len - 3, ".gz") == 0 ||
-                    strcmp(*argv + len - 3, "-gz") == 0)
-                    len -= 3;
-                else if (strcmp(*argv + len - 2, ".z") == 0 ||
-                    strcmp(*argv + len - 2, "-z") == 0 ||
-                    strcmp(*argv + len - 2, "_z") == 0 ||
-                    strcmp(*argv + len - 2, ".Z") == 0)
-                    len -= 2;
-                else {
-                    fprintf(stderr, "gun error: no gz type on %s--skipping\n",
-                            *argv);
-                    continue;
-                }
-                outname = malloc(len + 1);
-                if (outname == NULL) {
-                    fprintf(stderr, "gun out of memory error--aborting\n");
-                    ret = 1;
-                    break;
-                }
-                memcpy(outname, *argv, len);
-                outname[len] = 0;
-            }
-            ret = gunzip(&strm, *argv, outname, test);
-            if (outname != NULL) free(outname);
-            if (ret) break;
-        } while (argv++, --argc);
-    else
-        ret = gunzip(&strm, NULL, NULL, test);
-
-    /* clean up */
-    inflateBackEnd(&strm);
-    return ret;
-}
diff --git a/libsrc/zlib/examples/gzappend.c b/libsrc/zlib/examples/gzappend.c
deleted file mode 100644
index e9e878e..0000000
--- a/libsrc/zlib/examples/gzappend.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* gzappend -- command to append to a gzip file
-
-  Copyright (C) 2003 Mark Adler, all rights reserved
-  version 1.1, 4 Nov 2003
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author 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.
-
-  Mark Adler    madler at alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0  19 Oct 2003     - First version
- * 1.1   4 Nov 2003     - Expand and clarify some comments and notes
- *                      - Add version and copyright to help
- *                      - Send help to stdout instead of stderr
- *                      - Add some preemptive typecasts
- *                      - Add L to constants in lseek() calls
- *                      - Remove some debugging information in error messages
- *                      - Use new data_type definition for zlib 1.2.1
- *                      - Simplfy and unify file operations
- *                      - Finish off gzip file in gztack()
- *                      - Use deflatePrime() instead of adding empty blocks
- *                      - Keep gzip file clean on appended file read errors
- *                      - Use in-place rotate instead of auxiliary buffer
- *                        (Why you ask?  Because it was fun to write!)
- */
-
-/*
-   gzappend takes a gzip file and appends to it, compressing files from the
-   command line or data from stdin.  The gzip file is written to directly, to
-   avoid copying that file, in case it's large.  Note that this results in the
-   unfriendly behavior that if gzappend fails, the gzip file is corrupted.
-
-   This program was written to illustrate the use of the new Z_BLOCK option of
-   zlib 1.2.x's inflate() function.  This option returns from inflate() at each
-   block boundary to facilitate locating and modifying the last block bit at
-   the start of the final deflate block.  Also whether using Z_BLOCK or not,
-   another required feature of zlib 1.2.x is that inflate() now provides the
-   number of unusued bits in the last input byte used.  gzappend will not work
-   with versions of zlib earlier than 1.2.1.
-
-   gzappend first decompresses the gzip file internally, discarding all but
-   the last 32K of uncompressed data, and noting the location of the last block
-   bit and the number of unused bits in the last byte of the compressed data.
-   The gzip trailer containing the CRC-32 and length of the uncompressed data
-   is verified.  This trailer will be later overwritten.
-
-   Then the last block bit is cleared by seeking back in the file and rewriting
-   the byte that contains it.  Seeking forward, the last byte of the compressed
-   data is saved along with the number of unused bits to initialize deflate.
-
-   A deflate process is initialized, using the last 32K of the uncompressed
-   data from the gzip file to initialize the dictionary.  If the total
-   uncompressed data was less than 32K, then all of it is used to initialize
-   the dictionary.  The deflate output bit buffer is also initialized with the
-   last bits from the original deflate stream.  From here on, the data to
-   append is simply compressed using deflate, and written to the gzip file.
-   When that is complete, the new CRC-32 and uncompressed length are written
-   as the trailer of the gzip file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "zlib.h"
-
-#define local static
-#define LGCHUNK 14
-#define CHUNK (1U << LGCHUNK)
-#define DSIZE 32768U
-
-/* print an error message and terminate with extreme prejudice */
-local void bye(char *msg1, char *msg2)
-{
-    fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2);
-    exit(1);
-}
-
-/* return the greatest common divisor of a and b using Euclid's algorithm,
-   modified to be fast when one argument much greater than the other, and
-   coded to avoid unnecessary swapping */
-local unsigned gcd(unsigned a, unsigned b)
-{
-    unsigned c;
-
-    while (a && b)
-        if (a > b) {
-            c = b;
-            while (a - c >= c)
-                c <<= 1;
-            a -= c;
-        }
-        else {
-            c = a;
-            while (b - c >= c)
-                c <<= 1;
-            b -= c;
-        }
-    return a + b;
-}
-
-/* rotate list[0..len-1] left by rot positions, in place */
-local void rotate(unsigned char *list, unsigned len, unsigned rot)
-{
-    unsigned char tmp;
-    unsigned cycles;
-    unsigned char *start, *last, *to, *from;
-
-    /* normalize rot and handle degenerate cases */
-    if (len < 2) return;
-    if (rot >= len) rot %= len;
-    if (rot == 0) return;
-
-    /* pointer to last entry in list */
-    last = list + (len - 1);
-
-    /* do simple left shift by one */
-    if (rot == 1) {
-        tmp = *list;
-        memcpy(list, list + 1, len - 1);
-        *last = tmp;
-        return;
-    }
-
-    /* do simple right shift by one */
-    if (rot == len - 1) {
-        tmp = *last;
-        memmove(list + 1, list, len - 1);
-        *list = tmp;
-        return;
-    }
-
-    /* otherwise do rotate as a set of cycles in place */
-    cycles = gcd(len, rot);             /* number of cycles */
-    do {
-        start = from = list + cycles;   /* start index is arbitrary */
-        tmp = *from;                    /* save entry to be overwritten */
-        for (;;) {
-            to = from;                  /* next step in cycle */
-            from += rot;                /* go right rot positions */
-            if (from > last) from -= len;   /* (pointer better not wrap) */
-            if (from == start) break;   /* all but one shifted */
-            *to = *from;                /* shift left */
-        }
-        *to = tmp;                      /* complete the circle */
-    } while (--cycles);
-}
-
-/* structure for gzip file read operations */
-typedef struct {
-    int fd;                     /* file descriptor */
-    int size;                   /* 1 << size is bytes in buf */
-    unsigned left;              /* bytes available at next */
-    unsigned char *buf;         /* buffer */
-    unsigned char *next;        /* next byte in buffer */
-    char *name;                 /* file name for error messages */
-} file;
-
-/* reload buffer */
-local int readin(file *in)
-{
-    int len;
-
-    len = read(in->fd, in->buf, 1 << in->size);
-    if (len == -1) bye("error reading ", in->name);
-    in->left = (unsigned)len;
-    in->next = in->buf;
-    return len;
-}
-
-/* read from file in, exit if end-of-file */
-local int readmore(file *in)
-{
-    if (readin(in) == 0) bye("unexpected end of ", in->name);
-    return 0;
-}
-
-#define read1(in) (in->left == 0 ? readmore(in) : 0, \
-                   in->left--, *(in->next)++)
-
-/* skip over n bytes of in */
-local void skip(file *in, unsigned n)
-{
-    unsigned bypass;
-
-    if (n > in->left) {
-        n -= in->left;
-        bypass = n & ~((1U << in->size) - 1);
-        if (bypass) {
-            if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1)
-                bye("seeking ", in->name);
-            n -= bypass;
-        }
-        readmore(in);
-        if (n > in->left)
-            bye("unexpected end of ", in->name);
-    }
-    in->left -= n;
-    in->next += n;
-}
-
-/* read a four-byte unsigned integer, little-endian, from in */
-unsigned long read4(file *in)
-{
-    unsigned long val;
-
-    val = read1(in);
-    val += (unsigned)read1(in) << 8;
-    val += (unsigned long)read1(in) << 16;
-    val += (unsigned long)read1(in) << 24;
-    return val;
-}
-
-/* skip over gzip header */
-local void gzheader(file *in)
-{
-    int flags;
-    unsigned n;
-
-    if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file");
-    if (read1(in) != 8) bye("unknown compression method in", in->name);
-    flags = read1(in);
-    if (flags & 0xe0) bye("unknown header flags set in", in->name);
-    skip(in, 6);
-    if (flags & 4) {
-        n = read1(in);
-        n += (unsigned)(read1(in)) << 8;
-        skip(in, n);
-    }
-    if (flags & 8) while (read1(in) != 0) ;
-    if (flags & 16) while (read1(in) != 0) ;
-    if (flags & 2) skip(in, 2);
-}
-
-/* decompress gzip file "name", return strm with a deflate stream ready to
-   continue compression of the data in the gzip file, and return a file
-   descriptor pointing to where to write the compressed data -- the deflate
-   stream is initialized to compress using level "level" */
-local int gzscan(char *name, z_stream *strm, int level)
-{
-    int ret, lastbit, left, full;
-    unsigned have;
-    unsigned long crc, tot;
-    unsigned char *window;
-    off_t lastoff, end;
-    file gz;
-
-    /* open gzip file */
-    gz.name = name;
-    gz.fd = open(name, O_RDWR, 0);
-    if (gz.fd == -1) bye("cannot open ", name);
-    gz.buf = malloc(CHUNK);
-    if (gz.buf == NULL) bye("out of memory", "");
-    gz.size = LGCHUNK;
-    gz.left = 0;
-
-    /* skip gzip header */
-    gzheader(&gz);
-
-    /* prepare to decompress */
-    window = malloc(DSIZE);
-    if (window == NULL) bye("out of memory", "");
-    strm->zalloc = Z_NULL;
-    strm->zfree = Z_NULL;
-    strm->opaque = Z_NULL;
-    ret = inflateInit2(strm, -15);
-    if (ret != Z_OK) bye("out of memory", " or library mismatch");
-
-    /* decompress the deflate stream, saving append information */
-    lastbit = 0;
-    lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-    left = 0;
-    strm->avail_in = gz.left;
-    strm->next_in = gz.next;
-    crc = crc32(0L, Z_NULL, 0);
-    have = full = 0;
-    do {
-        /* if needed, get more input */
-        if (strm->avail_in == 0) {
-            readmore(&gz);
-            strm->avail_in = gz.left;
-            strm->next_in = gz.next;
-        }
-
-        /* set up output to next available section of sliding window */
-        strm->avail_out = DSIZE - have;
-        strm->next_out = window + have;
-
-        /* inflate and check for errors */
-        ret = inflate(strm, Z_BLOCK);
-        if (ret == Z_STREAM_ERROR) bye("internal stream error!", "");
-        if (ret == Z_MEM_ERROR) bye("out of memory", "");
-        if (ret == Z_DATA_ERROR)
-            bye("invalid compressed data--format violated in", name);
-
-        /* update crc and sliding window pointer */
-        crc = crc32(crc, window + have, DSIZE - have - strm->avail_out);
-        if (strm->avail_out)
-            have = DSIZE - strm->avail_out;
-        else {
-            have = 0;
-            full = 1;
-        }
-
-        /* process end of block */
-        if (strm->data_type & 128) {
-            if (strm->data_type & 64)
-                left = strm->data_type & 0x1f;
-            else {
-                lastbit = strm->data_type & 0x1f;
-                lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in;
-            }
-        }
-    } while (ret != Z_STREAM_END);
-    inflateEnd(strm);
-    gz.left = strm->avail_in;
-    gz.next = strm->next_in;
-
-    /* save the location of the end of the compressed data */
-    end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-
-    /* check gzip trailer and save total for deflate */
-    if (crc != read4(&gz))
-        bye("invalid compressed data--crc mismatch in ", name);
-    tot = strm->total_out;
-    if ((tot & 0xffffffffUL) != read4(&gz))
-        bye("invalid compressed data--length mismatch in", name);
-
-    /* if not at end of file, warn */
-    if (gz.left || readin(&gz))
-        fprintf(stderr,
-            "gzappend warning: junk at end of gzip file overwritten\n");
-
-    /* clear last block bit */
-    lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET);
-    if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
-    *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7)));
-    lseek(gz.fd, -1L, SEEK_CUR);
-    if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name);
-
-    /* if window wrapped, build dictionary from window by rotating */
-    if (full) {
-        rotate(window, DSIZE, have);
-        have = DSIZE;
-    }
-
-    /* set up deflate stream with window, crc, total_in, and leftover bits */
-    ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY);
-    if (ret != Z_OK) bye("out of memory", "");
-    deflateSetDictionary(strm, window, have);
-    strm->adler = crc;
-    strm->total_in = tot;
-    if (left) {
-        lseek(gz.fd, --end, SEEK_SET);
-        if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
-        deflatePrime(strm, 8 - left, *gz.buf);
-    }
-    lseek(gz.fd, end, SEEK_SET);
-
-    /* clean up and return */
-    free(window);
-    free(gz.buf);
-    return gz.fd;
-}
-
-/* append file "name" to gzip file gd using deflate stream strm -- if last
-   is true, then finish off the deflate stream at the end */
-local void gztack(char *name, int gd, z_stream *strm, int last)
-{
-    int fd, len, ret;
-    unsigned left;
-    unsigned char *in, *out;
-
-    /* open file to compress and append */
-    fd = 0;
-    if (name != NULL) {
-        fd = open(name, O_RDONLY, 0);
-        if (fd == -1)
-            fprintf(stderr, "gzappend warning: %s not found, skipping ...\n",
-                    name);
-    }
-
-    /* allocate buffers */
-    in = fd == -1 ? NULL : malloc(CHUNK);
-    out = malloc(CHUNK);
-    if (out == NULL) bye("out of memory", "");
-
-    /* compress input file and append to gzip file */
-    do {
-        /* get more input */
-        len = fd == -1 ? 0 : read(fd, in, CHUNK);
-        if (len == -1) {
-            fprintf(stderr,
-                    "gzappend warning: error reading %s, skipping rest ...\n",
-                    name);
-            len = 0;
-        }
-        strm->avail_in = (unsigned)len;
-        strm->next_in = in;
-        if (len) strm->adler = crc32(strm->adler, in, (unsigned)len);
-
-        /* compress and write all available output */
-        do {
-            strm->avail_out = CHUNK;
-            strm->next_out = out;
-            ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH);
-            left = CHUNK - strm->avail_out;
-            while (left) {
-                len = write(gd, out + CHUNK - strm->avail_out - left, left);
-                if (len == -1) bye("writing gzip file", "");
-                left -= (unsigned)len;
-            }
-        } while (strm->avail_out == 0 && ret != Z_STREAM_END);
-    } while (len != 0);
-
-    /* write trailer after last entry */
-    if (last) {
-        deflateEnd(strm);
-        out[0] = (unsigned char)(strm->adler);
-        out[1] = (unsigned char)(strm->adler >> 8);
-        out[2] = (unsigned char)(strm->adler >> 16);
-        out[3] = (unsigned char)(strm->adler >> 24);
-        out[4] = (unsigned char)(strm->total_in);
-        out[5] = (unsigned char)(strm->total_in >> 8);
-        out[6] = (unsigned char)(strm->total_in >> 16);
-        out[7] = (unsigned char)(strm->total_in >> 24);
-        len = 8;
-        do {
-            ret = write(gd, out + 8 - len, len);
-            if (ret == -1) bye("writing gzip file", "");
-            len -= ret;
-        } while (len);
-        close(gd);
-    }
-
-    /* clean up and return */
-    free(out);
-    if (in != NULL) free(in);
-    if (fd > 0) close(fd);
-}
-
-/* process the compression level option if present, scan the gzip file, and
-   append the specified files, or append the data from stdin if no other file
-   names are provided on the command line -- the gzip file must be writable
-   and seekable */
-int main(int argc, char **argv)
-{
-    int gd, level;
-    z_stream strm;
-
-    /* ignore command name */
-    argv++;
-
-    /* provide usage if no arguments */
-    if (*argv == NULL) {
-        printf("gzappend 1.1 (4 Nov 2003) Copyright (C) 2003 Mark Adler\n");
-        printf(
-            "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n");
-        return 0;
-    }
-
-    /* set compression level */
-    level = Z_DEFAULT_COMPRESSION;
-    if (argv[0][0] == '-') {
-        if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0)
-            bye("invalid compression level", "");
-        level = argv[0][1] - '0';
-        if (*++argv == NULL) bye("no gzip file name after options", "");
-    }
-
-    /* prepare to append to gzip file */
-    gd = gzscan(*argv++, &strm, level);
-
-    /* append files on command line, or from stdin if none */
-    if (*argv == NULL)
-        gztack(NULL, gd, &strm, 1);
-    else
-        do {
-            gztack(*argv, gd, &strm, argv[1] == NULL);
-        } while (*++argv != NULL);
-    return 0;
-}
diff --git a/libsrc/zlib/examples/gzjoin.c b/libsrc/zlib/examples/gzjoin.c
deleted file mode 100644
index 129347c..0000000
--- a/libsrc/zlib/examples/gzjoin.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/* gzjoin -- command to join gzip files into one gzip file
-
-  Copyright (C) 2004 Mark Adler, all rights reserved
-  version 1.0, 11 Dec 2004
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author 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.
-
-  Mark Adler    madler at alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0  11 Dec 2004     - First version
- * 1.1  12 Jun 2005     - Changed ssize_t to long for portability
- */
-
-/*
-   gzjoin takes one or more gzip files on the command line and writes out a
-   single gzip file that will uncompress to the concatenation of the
-   uncompressed data from the individual gzip files.  gzjoin does this without
-   having to recompress any of the data and without having to calculate a new
-   crc32 for the concatenated uncompressed data.  gzjoin does however have to
-   decompress all of the input data in order to find the bits in the compressed
-   data that need to be modified to concatenate the streams.
-
-   gzjoin does not do an integrity check on the input gzip files other than
-   checking the gzip header and decompressing the compressed data.  They are
-   otherwise assumed to be complete and correct.
-
-   Each joint between gzip files removes at least 18 bytes of previous trailer
-   and subsequent header, and inserts an average of about three bytes to the
-   compressed data in order to connect the streams.  The output gzip file
-   has a minimal ten-byte gzip header with no file name or modification time.
-
-   This program was written to illustrate the use of the Z_BLOCK option of
-   inflate() and the crc32_combine() function.  gzjoin will not compile with
-   versions of zlib earlier than 1.2.3.
- */
-
-#include <stdio.h>      /* fputs(), fprintf(), fwrite(), putc() */
-#include <stdlib.h>     /* exit(), malloc(), free() */
-#include <fcntl.h>      /* open() */
-#include <unistd.h>     /* close(), read(), lseek() */
-#include "zlib.h"
-    /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */
-
-#define local static
-
-/* exit with an error (return a value to allow use in an expression) */
-local int bail(char *why1, char *why2)
-{
-    fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2);
-    exit(1);
-    return 0;
-}
-
-/* -- simple buffered file input with access to the buffer -- */
-
-#define CHUNK 32768         /* must be a power of two and fit in unsigned */
-
-/* bin buffered input file type */
-typedef struct {
-    char *name;             /* name of file for error messages */
-    int fd;                 /* file descriptor */
-    unsigned left;          /* bytes remaining at next */
-    unsigned char *next;    /* next byte to read */
-    unsigned char *buf;     /* allocated buffer of length CHUNK */
-} bin;
-
-/* close a buffered file and free allocated memory */
-local void bclose(bin *in)
-{
-    if (in != NULL) {
-        if (in->fd != -1)
-            close(in->fd);
-        if (in->buf != NULL)
-            free(in->buf);
-        free(in);
-    }
-}
-
-/* open a buffered file for input, return a pointer to type bin, or NULL on
-   failure */
-local bin *bopen(char *name)
-{
-    bin *in;
-
-    in = malloc(sizeof(bin));
-    if (in == NULL)
-        return NULL;
-    in->buf = malloc(CHUNK);
-    in->fd = open(name, O_RDONLY, 0);
-    if (in->buf == NULL || in->fd == -1) {
-        bclose(in);
-        return NULL;
-    }
-    in->left = 0;
-    in->next = in->buf;
-    in->name = name;
-    return in;
-}
-
-/* load buffer from file, return -1 on read error, 0 or 1 on success, with
-   1 indicating that end-of-file was reached */
-local int bload(bin *in)
-{
-    long len;
-
-    if (in == NULL)
-        return -1;
-    if (in->left != 0)
-        return 0;
-    in->next = in->buf;
-    do {
-        len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left);
-        if (len < 0)
-            return -1;
-        in->left += (unsigned)len;
-    } while (len != 0 && in->left < CHUNK);
-    return len == 0 ? 1 : 0;
-}
-
-/* get a byte from the file, bail if end of file */
-#define bget(in) (in->left ? 0 : bload(in), \
-                  in->left ? (in->left--, *(in->next)++) : \
-                    bail("unexpected end of file on ", in->name))
-
-/* get a four-byte little-endian unsigned integer from file */
-local unsigned long bget4(bin *in)
-{
-    unsigned long val;
-
-    val = bget(in);
-    val += (unsigned long)(bget(in)) << 8;
-    val += (unsigned long)(bget(in)) << 16;
-    val += (unsigned long)(bget(in)) << 24;
-    return val;
-}
-
-/* skip bytes in file */
-local void bskip(bin *in, unsigned skip)
-{
-    /* check pointer */
-    if (in == NULL)
-        return;
-
-    /* easy case -- skip bytes in buffer */
-    if (skip <= in->left) {
-        in->left -= skip;
-        in->next += skip;
-        return;
-    }
-
-    /* skip what's in buffer, discard buffer contents */
-    skip -= in->left;
-    in->left = 0;
-
-    /* seek past multiples of CHUNK bytes */
-    if (skip > CHUNK) {
-        unsigned left;
-
-        left = skip & (CHUNK - 1);
-        if (left == 0) {
-            /* exact number of chunks: seek all the way minus one byte to check
-               for end-of-file with a read */
-            lseek(in->fd, skip - 1, SEEK_CUR);
-            if (read(in->fd, in->buf, 1) != 1)
-                bail("unexpected end of file on ", in->name);
-            return;
-        }
-
-        /* skip the integral chunks, update skip with remainder */
-        lseek(in->fd, skip - left, SEEK_CUR);
-        skip = left;
-    }
-
-    /* read more input and skip remainder */
-    bload(in);
-    if (skip > in->left)
-        bail("unexpected end of file on ", in->name);
-    in->left -= skip;
-    in->next += skip;
-}
-
-/* -- end of buffered input functions -- */
-
-/* skip the gzip header from file in */
-local void gzhead(bin *in)
-{
-    int flags;
-
-    /* verify gzip magic header and compression method */
-    if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8)
-        bail(in->name, " is not a valid gzip file");
-
-    /* get and verify flags */
-    flags = bget(in);
-    if ((flags & 0xe0) != 0)
-        bail("unknown reserved bits set in ", in->name);
-
-    /* skip modification time, extra flags, and os */
-    bskip(in, 6);
-
-    /* skip extra field if present */
-    if (flags & 4) {
-        unsigned len;
-
-        len = bget(in);
-        len += (unsigned)(bget(in)) << 8;
-        bskip(in, len);
-    }
-
-    /* skip file name if present */
-    if (flags & 8)
-        while (bget(in) != 0)
-            ;
-
-    /* skip comment if present */
-    if (flags & 16)
-        while (bget(in) != 0)
-            ;
-
-    /* skip header crc if present */
-    if (flags & 2)
-        bskip(in, 2);
-}
-
-/* write a four-byte little-endian unsigned integer to out */
-local void put4(unsigned long val, FILE *out)
-{
-    putc(val & 0xff, out);
-    putc((val >> 8) & 0xff, out);
-    putc((val >> 16) & 0xff, out);
-    putc((val >> 24) & 0xff, out);
-}
-
-/* Load up zlib stream from buffered input, bail if end of file */
-local void zpull(z_streamp strm, bin *in)
-{
-    if (in->left == 0)
-        bload(in);
-    if (in->left == 0)
-        bail("unexpected end of file on ", in->name);
-    strm->avail_in = in->left;
-    strm->next_in = in->next;
-}
-
-/* Write header for gzip file to out and initialize trailer. */
-local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out)
-{
-    fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out);
-    *crc = crc32(0L, Z_NULL, 0);
-    *tot = 0;
-}
-
-/* Copy the compressed data from name, zeroing the last block bit of the last
-   block if clr is true, and adding empty blocks as needed to get to a byte
-   boundary.  If clr is false, then the last block becomes the last block of
-   the output, and the gzip trailer is written.  crc and tot maintains the
-   crc and length (modulo 2^32) of the output for the trailer.  The resulting
-   gzip file is written to out.  gzinit() must be called before the first call
-   of gzcopy() to write the gzip header and to initialize crc and tot. */
-local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot,
-                  FILE *out)
-{
-    int ret;                /* return value from zlib functions */
-    int pos;                /* where the "last block" bit is in byte */
-    int last;               /* true if processing the last block */
-    bin *in;                /* buffered input file */
-    unsigned char *start;   /* start of compressed data in buffer */
-    unsigned char *junk;    /* buffer for uncompressed data -- discarded */
-    z_off_t len;            /* length of uncompressed data (support > 4 GB) */
-    z_stream strm;          /* zlib inflate stream */
-
-    /* open gzip file and skip header */
-    in = bopen(name);
-    if (in == NULL)
-        bail("could not open ", name);
-    gzhead(in);
-
-    /* allocate buffer for uncompressed data and initialize raw inflate
-       stream */
-    junk = malloc(CHUNK);
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit2(&strm, -15);
-    if (junk == NULL || ret != Z_OK)
-        bail("out of memory", "");
-
-    /* inflate and copy compressed data, clear last-block bit if requested */
-    len = 0;
-    zpull(&strm, in);
-    start = strm.next_in;
-    last = start[0] & 1;
-    if (last && clr)
-        start[0] &= ~1;
-    strm.avail_out = 0;
-    for (;;) {
-        /* if input used and output done, write used input and get more */
-        if (strm.avail_in == 0 && strm.avail_out != 0) {
-            fwrite(start, 1, strm.next_in - start, out);
-            start = in->buf;
-            in->left = 0;
-            zpull(&strm, in);
-        }
-
-        /* decompress -- return early when end-of-block reached */
-        strm.avail_out = CHUNK;
-        strm.next_out = junk;
-        ret = inflate(&strm, Z_BLOCK);
-        switch (ret) {
-        case Z_MEM_ERROR:
-            bail("out of memory", "");
-        case Z_DATA_ERROR:
-            bail("invalid compressed data in ", in->name);
-        }
-
-        /* update length of uncompressed data */
-        len += CHUNK - strm.avail_out;
-
-        /* check for block boundary (only get this when block copied out) */
-        if (strm.data_type & 128) {
-            /* if that was the last block, then done */
-            if (last)
-                break;
-
-            /* number of unused bits in last byte */
-            pos = strm.data_type & 7;
-
-            /* find the next last-block bit */
-            if (pos != 0) {
-                /* next last-block bit is in last used byte */
-                pos = 0x100 >> pos;
-                last = strm.next_in[-1] & pos;
-                if (last && clr)
-                    strm.next_in[-1] &= ~pos;
-            }
-            else {
-                /* next last-block bit is in next unused byte */
-                if (strm.avail_in == 0) {
-                    /* don't have that byte yet -- get it */
-                    fwrite(start, 1, strm.next_in - start, out);
-                    start = in->buf;
-                    in->left = 0;
-                    zpull(&strm, in);
-                }
-                last = strm.next_in[0] & 1;
-                if (last && clr)
-                    strm.next_in[0] &= ~1;
-            }
-        }
-    }
-
-    /* update buffer with unused input */
-    in->left = strm.avail_in;
-    in->next = strm.next_in;
-
-    /* copy used input, write empty blocks to get to byte boundary */
-    pos = strm.data_type & 7;
-    fwrite(start, 1, in->next - start - 1, out);
-    last = in->next[-1];
-    if (pos == 0 || !clr)
-        /* already at byte boundary, or last file: write last byte */
-        putc(last, out);
-    else {
-        /* append empty blocks to last byte */
-        last &= ((0x100 >> pos) - 1);       /* assure unused bits are zero */
-        if (pos & 1) {
-            /* odd -- append an empty stored block */
-            putc(last, out);
-            if (pos == 1)
-                putc(0, out);               /* two more bits in block header */
-            fwrite("\0\0\xff\xff", 1, 4, out);
-        }
-        else {
-            /* even -- append 1, 2, or 3 empty fixed blocks */
-            switch (pos) {
-            case 6:
-                putc(last | 8, out);
-                last = 0;
-            case 4:
-                putc(last | 0x20, out);
-                last = 0;
-            case 2:
-                putc(last | 0x80, out);
-                putc(0, out);
-            }
-        }
-    }
-
-    /* update crc and tot */
-    *crc = crc32_combine(*crc, bget4(in), len);
-    *tot += (unsigned long)len;
-
-    /* clean up */
-    inflateEnd(&strm);
-    free(junk);
-    bclose(in);
-
-    /* write trailer if this is the last gzip file */
-    if (!clr) {
-        put4(*crc, out);
-        put4(*tot, out);
-    }
-}
-
-/* join the gzip files on the command line, write result to stdout */
-int main(int argc, char **argv)
-{
-    unsigned long crc, tot;     /* running crc and total uncompressed length */
-
-    /* skip command name */
-    argc--;
-    argv++;
-
-    /* show usage if no arguments */
-    if (argc == 0) {
-        fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n",
-              stderr);
-        return 0;
-    }
-
-    /* join gzip files on command line and write to stdout */
-    gzinit(&crc, &tot, stdout);
-    while (argc--)
-        gzcopy(*argv++, argc, &crc, &tot, stdout);
-
-    /* done */
-    return 0;
-}
diff --git a/libsrc/zlib/examples/gzlog.c b/libsrc/zlib/examples/gzlog.c
deleted file mode 100644
index f71f817..0000000
--- a/libsrc/zlib/examples/gzlog.c
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * gzlog.c
- * Copyright (C) 2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in gzlog.h
- * version 1.0, 26 Nov 2004
- *
- */
-
-#include <string.h>             /* memcmp() */
-#include <stdlib.h>             /* malloc(), free(), NULL */
-#include <sys/types.h>          /* size_t, off_t */
-#include <unistd.h>             /* read(), close(), sleep(), ftruncate(), */
-                                /* lseek() */
-#include <fcntl.h>              /* open() */
-#include <sys/file.h>           /* flock() */
-#include "zlib.h"               /* deflateInit2(), deflate(), deflateEnd() */
-
-#include "gzlog.h"              /* interface */
-#define local static
-
-/* log object structure */
-typedef struct {
-    int id;                 /* object identifier */
-    int fd;                 /* log file descriptor */
-    off_t extra;            /* offset of extra "ap" subfield */
-    off_t mark_off;         /* offset of marked data */
-    off_t last_off;         /* offset of last block */
-    unsigned long crc;      /* uncompressed crc */
-    unsigned long len;      /* uncompressed length (modulo 2^32) */
-    unsigned stored;        /* length of current stored block */
-} gz_log;
-
-#define GZLOGID 19334       /* gz_log object identifier */
-
-#define LOCK_RETRY 1            /* retry lock once a second */
-#define LOCK_PATIENCE 1200      /* try about twenty minutes before forcing */
-
-/* acquire a lock on a file */
-local int lock(int fd)
-{
-    int patience;
-
-    /* try to lock every LOCK_RETRY seconds for LOCK_PATIENCE seconds */
-    patience = LOCK_PATIENCE;
-    do {
-        if (flock(fd, LOCK_EX + LOCK_NB) == 0)
-            return 0;
-        (void)sleep(LOCK_RETRY);
-        patience -= LOCK_RETRY;
-    } while (patience > 0);
-
-    /* we've run out of patience -- give up */
-    return -1;
-}
-
-/* release lock */
-local void unlock(int fd)
-{
-    (void)flock(fd, LOCK_UN);
-}
-
-/* release a log object */
-local void log_clean(gz_log *log)
-{
-    unlock(log->fd);
-    (void)close(log->fd);
-    free(log);
-}
-
-/* read an unsigned long from a byte buffer little-endian */
-local unsigned long make_ulg(unsigned char *buf)
-{
-    int n;
-    unsigned long val;
-
-    val = (unsigned long)(*buf++);
-    for (n = 8; n < 32; n += 8)
-        val += (unsigned long)(*buf++) << n;
-    return val;
-}
-
-/* read an off_t from a byte buffer little-endian */
-local off_t make_off(unsigned char *buf)
-{
-    int n;
-    off_t val;
-
-    val = (off_t)(*buf++);
-    for (n = 8; n < 64; n += 8)
-        val += (off_t)(*buf++) << n;
-    return val;
-}
-
-/* write an unsigned long little-endian to byte buffer */
-local void dice_ulg(unsigned long val, unsigned char *buf)
-{
-    int n;
-
-    for (n = 0; n < 4; n++) {
-        *buf++ = val & 0xff;
-        val >>= 8;
-    }
-}
-
-/* write an off_t little-endian to byte buffer */
-local void dice_off(off_t val, unsigned char *buf)
-{
-    int n;
-
-    for (n = 0; n < 8; n++) {
-        *buf++ = val & 0xff;
-        val >>= 8;
-    }
-}
-
-/* initial, empty gzip file for appending */
-local char empty_gz[] = {
-    0x1f, 0x8b,                 /* magic gzip id */
-    8,                          /* compression method is deflate */
-    4,                          /* there is an extra field */
-    0, 0, 0, 0,                 /* no modification time provided */
-    0, 0xff,                    /* no extra flags, no OS */
-    20, 0, 'a', 'p', 16, 0,     /* extra field with "ap" subfield */
-    32, 0, 0, 0, 0, 0, 0, 0,    /* offset of uncompressed data */
-    32, 0, 0, 0, 0, 0, 0, 0,    /* offset of last block */
-    1, 0, 0, 0xff, 0xff,        /* empty stored block (last) */
-    0, 0, 0, 0,                 /* crc */
-    0, 0, 0, 0                  /* uncompressed length */
-};
-
-/* initialize a log object with locking */
-void *gzlog_open(char *path)
-{
-    unsigned xlen;
-    unsigned char temp[20];
-    unsigned sub_len;
-    int good;
-    gz_log *log;
-
-    /* allocate log structure */
-    log = malloc(sizeof(gz_log));
-    if (log == NULL)
-        return NULL;
-    log->id = GZLOGID;
-
-    /* open file, creating it if necessary, and locking it */
-    log->fd = open(path, O_RDWR | O_CREAT, 0600);
-    if (log->fd < 0) {
-        free(log);
-        return NULL;
-    }
-    if (lock(log->fd)) {
-        close(log->fd);
-        free(log);
-        return NULL;
-    }
-
-    /* if file is empty, write new gzip stream */
-    if (lseek(log->fd, 0, SEEK_END) == 0) {
-        if (write(log->fd, empty_gz, sizeof(empty_gz)) != sizeof(empty_gz)) {
-            log_clean(log);
-            return NULL;
-        }
-    }
-
-    /* check gzip header */
-    (void)lseek(log->fd, 0, SEEK_SET);
-    if (read(log->fd, temp, 12) != 12 || temp[0] != 0x1f ||
-        temp[1] != 0x8b || temp[2] != 8 || (temp[3] & 4) == 0) {
-        log_clean(log);
-        return NULL;
-    }
-
-    /* process extra field to find "ap" sub-field */
-    xlen = temp[10] + (temp[11] << 8);
-    good = 0;
-    while (xlen) {
-        if (xlen < 4 || read(log->fd, temp, 4) != 4)
-            break;
-        sub_len = temp[2];
-        sub_len += temp[3] << 8;
-        xlen -= 4;
-        if (memcmp(temp, "ap", 2) == 0 && sub_len == 16) {
-            good = 1;
-            break;
-        }
-        if (xlen < sub_len)
-            break;
-        (void)lseek(log->fd, sub_len, SEEK_CUR);
-        xlen -= sub_len;
-    }
-    if (!good) {
-        log_clean(log);
-        return NULL;
-    }
-
-    /* read in "ap" sub-field */
-    log->extra = lseek(log->fd, 0, SEEK_CUR);
-    if (read(log->fd, temp, 16) != 16) {
-        log_clean(log);
-        return NULL;
-    }
-    log->mark_off = make_off(temp);
-    log->last_off = make_off(temp + 8);
-
-    /* get crc, length of gzip file */
-    (void)lseek(log->fd, log->last_off, SEEK_SET);
-    if (read(log->fd, temp, 13) != 13 ||
-        memcmp(temp, "\001\000\000\377\377", 5) != 0) {
-        log_clean(log);
-        return NULL;
-    }
-    log->crc = make_ulg(temp + 5);
-    log->len = make_ulg(temp + 9);
-
-    /* set up to write over empty last block */
-    (void)lseek(log->fd, log->last_off + 5, SEEK_SET);
-    log->stored = 0;
-    return (void *)log;
-}
-
-/* maximum amount to put in a stored block before starting a new one */
-#define MAX_BLOCK 16384
-
-/* write a block to a log object */
-int gzlog_write(void *obj, char *data, size_t len)
-{
-    size_t some;
-    unsigned char temp[5];
-    gz_log *log;
-
-    /* check object */
-    log = (gz_log *)obj;
-    if (log == NULL || log->id != GZLOGID)
-        return 1;
-
-    /* write stored blocks until all of the input is written */
-    do {
-        some = MAX_BLOCK - log->stored;
-        if (some > len)
-            some = len;
-        if (write(log->fd, data, some) != some)
-            return 1;
-        log->crc = crc32(log->crc, data, some);
-        log->len += some;
-        len -= some;
-        data += some;
-        log->stored += some;
-
-        /* if the stored block is full, end it and start another */
-        if (log->stored == MAX_BLOCK) {
-            (void)lseek(log->fd, log->last_off, SEEK_SET);
-            temp[0] = 0;
-            dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16),
-                     temp + 1);
-            if (write(log->fd, temp, 5) != 5)
-                return 1;
-            log->last_off = lseek(log->fd, log->stored, SEEK_CUR);
-            (void)lseek(log->fd, 5, SEEK_CUR);
-            log->stored = 0;
-        }
-    } while (len);
-    return 0;
-}
-
-/* recompress the remaining stored deflate data in place */
-local int recomp(gz_log *log)
-{
-    z_stream strm;
-    size_t len, max;
-    unsigned char *in;
-    unsigned char *out;
-    unsigned char temp[16];
-
-    /* allocate space and read it all in (it's around 1 MB) */
-    len = log->last_off - log->mark_off;
-    max = len + (len >> 12) + (len >> 14) + 11;
-    out = malloc(max);
-    if (out == NULL)
-        return 1;
-    in = malloc(len);
-    if (in == NULL) {
-        free(out);
-        return 1;
-    }
-    (void)lseek(log->fd, log->mark_off, SEEK_SET);
-    if (read(log->fd, in, len) != len) {
-        free(in);
-        free(out);
-        return 1;
-    }
-
-    /* recompress in memory, decoding stored data as we go */
-    /* note: this assumes that unsigned is four bytes or more */
-    /*       consider not making that assumption */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    if (deflateInit2(&strm, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8,
-        Z_DEFAULT_STRATEGY) != Z_OK) {
-        free(in);
-        free(out);
-        return 1;
-    }
-    strm.next_in = in;
-    strm.avail_out = max;
-    strm.next_out = out;
-    while (len >= 5) {
-        if (strm.next_in[0] != 0)
-            break;
-        strm.avail_in = strm.next_in[1] + (strm.next_in[2] << 8);
-        strm.next_in += 5;
-        len -= 5;
-        if (strm.avail_in != 0) {
-            if (len < strm.avail_in)
-                break;
-            len -= strm.avail_in;
-            (void)deflate(&strm, Z_NO_FLUSH);
-            if (strm.avail_in != 0 || strm.avail_out == 0)
-                break;
-        }
-    }
-    (void)deflate(&strm, Z_SYNC_FLUSH);
-    (void)deflateEnd(&strm);
-    free(in);
-    if (len != 0 || strm.avail_out == 0) {
-        free(out);
-        return 1;
-    }
-
-    /* overwrite stored data with compressed data */
-    (void)lseek(log->fd, log->mark_off, SEEK_SET);
-    len = max - strm.avail_out;
-    if (write(log->fd, out, len) != len) {
-        free(out);
-        return 1;
-    }
-    free(out);
-
-    /* write last empty block, crc, and length */
-    log->mark_off = log->last_off = lseek(log->fd, 0, SEEK_CUR);
-    temp[0] = 1;
-    dice_ulg(0xffffL << 16, temp + 1);
-    dice_ulg(log->crc, temp + 5);
-    dice_ulg(log->len, temp + 9);
-    if (write(log->fd, temp, 13) != 13)
-        return 1;
-
-    /* truncate file to discard remaining stored data and old trailer */
-    ftruncate(log->fd, lseek(log->fd, 0, SEEK_CUR));
-
-    /* update extra field to point to new last empty block */
-    (void)lseek(log->fd, log->extra, SEEK_SET);
-    dice_off(log->mark_off, temp);
-    dice_off(log->last_off, temp + 8);
-    if (write(log->fd, temp, 16) != 16)
-        return 1;
-    return 0;
-}
-
-/* maximum accumulation of stored blocks before compressing */
-#define MAX_STORED 1048576
-
-/* close log object */
-int gzlog_close(void *obj)
-{
-    unsigned char temp[8];
-    gz_log *log;
-
-    /* check object */
-    log = (gz_log *)obj;
-    if (log == NULL || log->id != GZLOGID)
-        return 1;
-
-    /* go to start of most recent block being written */
-    (void)lseek(log->fd, log->last_off, SEEK_SET);
-
-    /* if some stuff was put there, update block */
-    if (log->stored) {
-        temp[0] = 0;
-        dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16),
-                 temp + 1);
-        if (write(log->fd, temp, 5) != 5)
-            return 1;
-        log->last_off = lseek(log->fd, log->stored, SEEK_CUR);
-    }
-
-    /* write last block (empty) */
-    if (write(log->fd, "\001\000\000\377\377", 5) != 5)
-        return 1;
-
-    /* write updated crc and uncompressed length */
-    dice_ulg(log->crc, temp);
-    dice_ulg(log->len, temp + 4);
-    if (write(log->fd, temp, 8) != 8)
-        return 1;
-
-    /* put offset of that last block in gzip extra block */
-    (void)lseek(log->fd, log->extra + 8, SEEK_SET);
-    dice_off(log->last_off, temp);
-    if (write(log->fd, temp, 8) != 8)
-        return 1;
-
-    /* if more than 1 MB stored, then time to compress it */
-    if (log->last_off - log->mark_off > MAX_STORED) {
-        if (recomp(log))
-            return 1;
-    }
-
-    /* unlock and close file */
-    log_clean(log);
-    return 0;
-}
diff --git a/libsrc/zlib/examples/gzlog.h b/libsrc/zlib/examples/gzlog.h
deleted file mode 100644
index a800bd5..0000000
--- a/libsrc/zlib/examples/gzlog.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* gzlog.h
-  Copyright (C) 2004 Mark Adler, all rights reserved
-  version 1.0, 26 Nov 2004
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author 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.
-
-  Mark Adler    madler at alumni.caltech.edu
- */
-
-/*
-   The gzlog object allows writing short messages to a gzipped log file,
-   opening the log file locked for small bursts, and then closing it.  The log
-   object works by appending stored data to the gzip file until 1 MB has been
-   accumulated.  At that time, the stored data is compressed, and replaces the
-   uncompressed data in the file.  The log file is truncated to its new size at
-   that time.  After closing, the log file is always valid gzip file that can
-   decompressed to recover what was written.
-
-   A gzip header "extra" field contains two file offsets for appending.  The
-   first points to just after the last compressed data.  The second points to
-   the last stored block in the deflate stream, which is empty.  All of the
-   data between those pointers is uncompressed.
- */
-
-/* Open a gzlog object, creating the log file if it does not exist.  Return
-   NULL on error.  Note that gzlog_open() could take a long time to return if
-   there is difficulty in locking the file. */
-void *gzlog_open(char *path);
-
-/* Write to a gzlog object.  Return non-zero on error.  This function will
-   simply write data to the file uncompressed.  Compression of the data
-   will not occur until gzlog_close() is called.  It is expected that
-   gzlog_write() is used for a short message, and then gzlog_close() is
-   called.  If a large amount of data is to be written, then the application
-   should write no more than 1 MB at a time with gzlog_write() before
-   calling gzlog_close() and then gzlog_open() again. */
-int gzlog_write(void *log, char *data, size_t len);
-
-/* Close a gzlog object.  Return non-zero on error.  The log file is locked
-   until this function is called.  This function will compress stored data
-   at the end of the gzip file if at least 1 MB has been accumulated.  Note
-   that the file will not be a valid gzip file until this function completes.
- */
-int gzlog_close(void *log);
diff --git a/libsrc/zlib/examples/zlib_how.html b/libsrc/zlib/examples/zlib_how.html
deleted file mode 100644
index 40998db..0000000
--- a/libsrc/zlib/examples/zlib_how.html
+++ /dev/null
@@ -1,523 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-  "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>zlib Usage Example</title>
-<!--  Copyright (c) 2004 Mark Adler.  -->
-</head>
-<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000">
-<h2 align="center"> zlib Usage Example </h2>
-We often get questions about how the <tt>deflate()</tt> and <tt>inflate()</tt> functions should be used.
-Users wonder when they should provide more input, when they should use more output,
-what to do with a <tt>Z_BUF_ERROR</tt>, how to make sure the process terminates properly, and
-so on.  So for those who have read <tt>zlib.h</tt> (a few times), and
-would like further edification, below is an annotated example in C of simple routines to compress and decompress
-from an input file to an output file using <tt>deflate()</tt> and <tt>inflate()</tt> respectively.  The
-annotations are interspersed between lines of the code.  So please read between the lines.
-We hope this helps explain some of the intricacies of <em>zlib</em>.
-<p>
-Without further adieu, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>:
-<pre><b>
-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
-   Not copyrighted -- provided to the public domain
-   Version 1.2  9 November 2004  Mark Adler */
-
-/* Version history:
-   1.0  30 Oct 2004  First version
-   1.1   8 Nov 2004  Add void casting for unused return values
-                     Use switch statement for inflate() return values
-   1.2   9 Nov 2004  Add assertions to document zlib guarantees
- */
-</b></pre><!-- -->
-We now include the header files for the required definitions.  From
-<tt>stdio.h</tt> we use <tt>fopen()</tt>, <tt>fread()</tt>, <tt>fwrite()</tt>,
-<tt>feof()</tt>, <tt>ferror()</tt>, and <tt>fclose()</tt> for file i/o, and
-<tt>fputs()</tt> for error messages.  From <tt>string.h</tt> we use
-<tt>strcmp()</tt> for command line argument processing.
-From <tt>assert.h</tt> we use the <tt>assert()</tt> macro.
-From <tt>zlib.h</tt>
-we use the basic compression functions <tt>deflateInit()</tt>,
-<tt>deflate()</tt>, and <tt>deflateEnd()</tt>, and the basic decompression
-functions <tt>inflateInit()</tt>, <tt>inflate()</tt>, and
-<tt>inflateEnd()</tt>.
-<pre><b>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include "zlib.h"
-</b></pre><!-- -->
-<tt>CHUNK</tt> is simply the buffer size for feeding data to and pulling data
-from the <em>zlib</em> routines.  Larger buffer sizes would be more efficient,
-especially for <tt>inflate()</tt>.  If the memory is available, buffers sizes
-on the order of 128K or 256K bytes should be used.
-<pre><b>
-#define CHUNK 16384
-</b></pre><!-- -->
-The <tt>def()</tt> routine compresses data from an input file to an output file.  The output data
-will be in the <em>zlib</em> format, which is different from the <em>gzip</em> or <em>zip</em>
-formats.  The <em>zlib</em> format has a very small header of only two bytes to identify it as
-a <em>zlib</em> stream and to provide decoding information, and a four-byte trailer with a fast
-check value to verify the integrity of the uncompressed data after decoding.
-<pre><b>
-/* Compress from file source to file dest until EOF on source.
-   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_STREAM_ERROR if an invalid compression
-   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
-   version of the library linked do not match, or Z_ERRNO if there is
-   an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
-</b></pre>
-Here are the local variables for <tt>def()</tt>.  <tt>ret</tt> will be used for <em>zlib</em>
-return codes.  <tt>flush</tt> will keep track of the current flushing state for <tt>deflate()</tt>,
-which is either no flushing, or flush to completion after the end of the input file is reached.
-<tt>have</tt> is the amount of data returned from <tt>deflate()</tt>.  The <tt>strm</tt> structure
-is used to pass information to and from the <em>zlib</em> routines, and to maintain the
-<tt>deflate()</tt> state.  <tt>in</tt> and <tt>out</tt> are the input and output buffers for
-<tt>deflate()</tt>.
-<pre><b>
-    int ret, flush;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-</b></pre><!-- -->
-The first thing we do is to initialize the <em>zlib</em> state for compression using
-<tt>deflateInit()</tt>.  This must be done before the first use of <tt>deflate()</tt>.
-The <tt>zalloc</tt>, <tt>zfree</tt>, and <tt>opaque</tt> fields in the <tt>strm</tt>
-structure must be initialized before calling <tt>deflateInit()</tt>.  Here they are
-set to the <em>zlib</em> constant <tt>Z_NULL</tt> to request that <em>zlib</em> use
-the default memory allocation routines.  An application may also choose to provide
-custom memory allocation routines here.  <tt>deflateInit()</tt> will allocate on the
-order of 256K bytes for the internal state.
-(See <a href="zlib_tech.html"><em>zlib Technical Details</em></a>.)
-<p>
-<tt>deflateInit()</tt> is called with a pointer to the structure to be initialized and
-the compression level, which is an integer in the range of -1 to 9.  Lower compression
-levels result in faster execution, but less compression.  Higher levels result in
-greater compression, but slower execution.  The <em>zlib</em> constant Z_DEFAULT_COMPRESSION,
-equal to -1,
-provides a good compromise between compression and speed and is equivalent to level 6.
-Level 0 actually does no compression at all, and in fact expands the data slightly to produce
-the <em>zlib</em> format (it is not a byte-for-byte copy of the input).
-More advanced applications of <em>zlib</em>
-may use <tt>deflateInit2()</tt> here instead.  Such an application may want to reduce how
-much memory will be used, at some price in compression.  Or it may need to request a
-<em>gzip</em> header and trailer instead of a <em>zlib</em> header and trailer, or raw
-encoding with no header or trailer at all.
-<p>
-We must check the return value of <tt>deflateInit()</tt> against the <em>zlib</em> constant
-<tt>Z_OK</tt> to make sure that it was able to
-allocate memory for the internal state, and that the provided arguments were valid.
-<tt>deflateInit()</tt> will also check that the version of <em>zlib</em> that the <tt>zlib.h</tt>
-file came from matches the version of <em>zlib</em> actually linked with the program.  This
-is especially important for environments in which <em>zlib</em> is a shared library.
-<p>
-Note that an application can initialize multiple, independent <em>zlib</em> streams, which can
-operate in parallel.  The state information maintained in the structure allows the <em>zlib</em>
-routines to be reentrant.
-<pre><b>
-    /* allocate deflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = deflateInit(&strm, level);
-    if (ret != Z_OK)
-        return ret;
-</b></pre><!-- -->
-With the pleasantries out of the way, now we can get down to business.  The outer <tt>do</tt>-loop
-reads all of the input file and exits at the bottom of the loop once end-of-file is reached.
-This loop contains the only call of <tt>deflate()</tt>.  So we must make sure that all of the
-input data has been processed and that all of the output data has been generated and consumed
-before we fall out of the loop at the bottom.
-<pre><b>
-    /* compress until end of file */
-    do {
-</b></pre>
-We start off by reading data from the input file.  The number of bytes read is put directly
-into <tt>avail_in</tt>, and a pointer to those bytes is put into <tt>next_in</tt>.  We also
-check to see if end-of-file on the input has been reached.  If we are at the end of file, then <tt>flush</tt> is set to the
-<em>zlib</em> constant <tt>Z_FINISH</tt>, which is later passed to <tt>deflate()</tt> to
-indicate that this is the last chunk of input data to compress.  We need to use <tt>feof()</tt>
-to check for end-of-file as opposed to seeing if fewer than <tt>CHUNK</tt> bytes have been read.  The
-reason is that if the input file length is an exact multiple of <tt>CHUNK</tt>, we will miss
-the fact that we got to the end-of-file, and not know to tell <tt>deflate()</tt> to finish
-up the compressed stream.  If we are not yet at the end of the input, then the <em>zlib</em>
-constant <tt>Z_NO_FLUSH</tt> will be passed to <tt>deflate</tt> to indicate that we are still
-in the middle of the uncompressed data.
-<p>
-If there is an error in reading from the input file, the process is aborted with
-<tt>deflateEnd()</tt> being called to free the allocated <em>zlib</em> state before returning
-the error.  We wouldn't want a memory leak, now would we?  <tt>deflateEnd()</tt> can be called
-at any time after the state has been initialized.  Once that's done, <tt>deflateInit()</tt> (or
-<tt>deflateInit2()</tt>) would have to be called to start a new compression process.  There is
-no point here in checking the <tt>deflateEnd()</tt> return code.  The deallocation can't fail.
-<pre><b>
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)deflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
-        strm.next_in = in;
-</b></pre><!-- -->
-The inner <tt>do</tt>-loop passes our chunk of input data to <tt>deflate()</tt>, and then
-keeps calling <tt>deflate()</tt> until it is done producing output.  Once there is no more
-new output, <tt>deflate()</tt> is guaranteed to have consumed all of the input, i.e.,
-<tt>avail_in</tt> will be zero.
-<pre><b>
-        /* run deflate() on input until output buffer not full, finish
-           compression if all of source has been read in */
-        do {
-</b></pre>
-Output space is provided to <tt>deflate()</tt> by setting <tt>avail_out</tt> to the number
-of available output bytes and <tt>next_out</tt> to a pointer to that space.
-<pre><b>
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-</b></pre>
-Now we call the compression engine itself, <tt>deflate()</tt>.  It takes as many of the
-<tt>avail_in</tt> bytes at <tt>next_in</tt> as it can process, and writes as many as
-<tt>avail_out</tt> bytes to <tt>next_out</tt>.  Those counters and pointers are then
-updated past the input data consumed and the output data written.  It is the amount of
-output space available that may limit how much input is consumed.
-Hence the inner loop to make sure that
-all of the input is consumed by providing more output space each time.  Since <tt>avail_in</tt>
-and <tt>next_in</tt> are updated by <tt>deflate()</tt>, we don't have to mess with those
-between <tt>deflate()</tt> calls until it's all used up.
-<p>
-The parameters to <tt>deflate()</tt> are a pointer to the <tt>strm</tt> structure containing
-the input and output information and the internal compression engine state, and a parameter
-indicating whether and how to flush data to the output.  Normally <tt>deflate</tt> will consume
-several K bytes of input data before producing any output (except for the header), in order
-to accumulate statistics on the data for optimum compression.  It will then put out a burst of
-compressed data, and proceed to consume more input before the next burst.  Eventually,
-<tt>deflate()</tt>
-must be told to terminate the stream, complete the compression with provided input data, and
-write out the trailer check value.  <tt>deflate()</tt> will continue to compress normally as long
-as the flush parameter is <tt>Z_NO_FLUSH</tt>.  Once the <tt>Z_FINISH</tt> parameter is provided,
-<tt>deflate()</tt> will begin to complete the compressed output stream.  However depending on how
-much output space is provided, <tt>deflate()</tt> may have to be called several times until it
-has provided the complete compressed stream, even after it has consumed all of the input.  The flush
-parameter must continue to be <tt>Z_FINISH</tt> for those subsequent calls.
-<p>
-There are other values of the flush parameter that are used in more advanced applications.  You can
-force <tt>deflate()</tt> to produce a burst of output that encodes all of the input data provided
-so far, even if it wouldn't have otherwise, for example to control data latency on a link with
-compressed data.  You can also ask that <tt>deflate()</tt> do that as well as erase any history up to
-that point so that what follows can be decompressed independently, for example for random access
-applications.  Both requests will degrade compression by an amount depending on how often such
-requests are made.
-<p>
-<tt>deflate()</tt> has a return value that can indicate errors, yet we do not check it here.  Why
-not?  Well, it turns out that <tt>deflate()</tt> can do no wrong here.  Let's go through
-<tt>deflate()</tt>'s return values and dispense with them one by one.  The possible values are
-<tt>Z_OK</tt>, <tt>Z_STREAM_END</tt>, <tt>Z_STREAM_ERROR</tt>, or <tt>Z_BUF_ERROR</tt>.  <tt>Z_OK</tt>
-is, well, ok.  <tt>Z_STREAM_END</tt> is also ok and will be returned for the last call of
-<tt>deflate()</tt>.  This is already guaranteed by calling <tt>deflate()</tt> with <tt>Z_FINISH</tt>
-until it has no more output.  <tt>Z_STREAM_ERROR</tt> is only possible if the stream is not
-initialized properly, but we did initialize it properly.  There is no harm in checking for
-<tt>Z_STREAM_ERROR</tt> here, for example to check for the possibility that some
-other part of the application inadvertently clobbered the memory containing the <em>zlib</em> state.
-<tt>Z_BUF_ERROR</tt> will be explained further below, but
-suffice it to say that this is simply an indication that <tt>deflate()</tt> could not consume
-more input or produce more output.  <tt>deflate()</tt> can be called again with more output space
-or more available input, which it will be in this code.
-<pre><b>
-            ret = deflate(&strm, flush);    /* no bad return value */
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-</b></pre>
-Now we compute how much output <tt>deflate()</tt> provided on the last call, which is the
-difference between how much space was provided before the call, and how much output space
-is still available after the call.  Then that data, if any, is written to the output file.
-We can then reuse the output buffer for the next call of <tt>deflate()</tt>.  Again if there
-is a file i/o error, we call <tt>deflateEnd()</tt> before returning to avoid a memory leak.
-<pre><b>
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)deflateEnd(&strm);
-                return Z_ERRNO;
-            }
-</b></pre>
-The inner <tt>do</tt>-loop is repeated until the last <tt>deflate()</tt> call fails to fill the
-provided output buffer.  Then we know that <tt>deflate()</tt> has done as much as it can with
-the provided input, and that all of that input has been consumed.  We can then fall out of this
-loop and reuse the input buffer.
-<p>
-The way we tell that <tt>deflate()</tt> has no more output is by seeing that it did not fill
-the output buffer, leaving <tt>avail_out</tt> greater than zero.  However suppose that
-<tt>deflate()</tt> has no more output, but just so happened to exactly fill the output buffer!
-<tt>avail_out</tt> is zero, and we can't tell that <tt>deflate()</tt> has done all it can.
-As far as we know, <tt>deflate()</tt>
-has more output for us.  So we call it again.  But now <tt>deflate()</tt> produces no output
-at all, and <tt>avail_out</tt> remains unchanged as <tt>CHUNK</tt>.  That <tt>deflate()</tt> call
-wasn't able to do anything, either consume input or produce output, and so it returns
-<tt>Z_BUF_ERROR</tt>.  (See, I told you I'd cover this later.)  However this is not a problem at
-all.  Now we finally have the desired indication that <tt>deflate()</tt> is really done,
-and so we drop out of the inner loop to provide more input to <tt>deflate()</tt>.
-<p>
-With <tt>flush</tt> set to <tt>Z_FINISH</tt>, this final set of <tt>deflate()</tt> calls will
-complete the output stream.  Once that is done, subsequent calls of <tt>deflate()</tt> would return
-<tt>Z_STREAM_ERROR</tt> if the flush parameter is not <tt>Z_FINISH</tt>, and do no more processing
-until the state is reinitialized.
-<p>
-Some applications of <em>zlib</em> have two loops that call <tt>deflate()</tt>
-instead of the single inner loop we have here.  The first loop would call
-without flushing and feed all of the data to <tt>deflate()</tt>.  The second loop would call
-<tt>deflate()</tt> with no more
-data and the <tt>Z_FINISH</tt> parameter to complete the process.  As you can see from this
-example, that can be avoided by simply keeping track of the current flush state.
-<pre><b>
-        } while (strm.avail_out == 0);
-        assert(strm.avail_in == 0);     /* all input will be used */
-</b></pre><!-- -->
-Now we check to see if we have already processed all of the input file.  That information was
-saved in the <tt>flush</tt> variable, so we see if that was set to <tt>Z_FINISH</tt>.  If so,
-then we're done and we fall out of the outer loop.  We're guaranteed to get <tt>Z_STREAM_END</tt>
-from the last <tt>deflate()</tt> call, since we ran it until the last chunk of input was
-consumed and all of the output was generated.
-<pre><b>
-        /* done when last data in file processed */
-    } while (flush != Z_FINISH);
-    assert(ret == Z_STREAM_END);        /* stream will be complete */
-</b></pre><!-- -->
-The process is complete, but we still need to deallocate the state to avoid a memory leak
-(or rather more like a memory hemorrhage if you didn't do this).  Then
-finally we can return with a happy return value.
-<pre><b>
-    /* clean up and return */
-    (void)deflateEnd(&strm);
-    return Z_OK;
-}
-</b></pre><!-- -->
-Now we do the same thing for decompression in the <tt>inf()</tt> routine. <tt>inf()</tt>
-decompresses what is hopefully a valid <em>zlib</em> stream from the input file and writes the
-uncompressed data to the output file.  Much of the discussion above for <tt>def()</tt>
-applies to <tt>inf()</tt> as well, so the discussion here will focus on the differences between
-the two.
-<pre><b>
-/* Decompress from file source to file dest until stream ends or EOF.
-   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_DATA_ERROR if the deflate data is
-   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
-   the version of the library linked do not match, or Z_ERRNO if there
-   is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
-</b></pre>
-The local variables have the same functionality as they do for <tt>def()</tt>.  The
-only difference is that there is no <tt>flush</tt> variable, since <tt>inflate()</tt>
-can tell from the <em>zlib</em> stream itself when the stream is complete.
-<pre><b>
-    int ret;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-</b></pre><!-- -->
-The initialization of the state is the same, except that there is no compression level,
-of course, and two more elements of the structure are initialized.  <tt>avail_in</tt>
-and <tt>next_in</tt> must be initialized before calling <tt>inflateInit()</tt>.  This
-is because the application has the option to provide the start of the zlib stream in
-order for <tt>inflateInit()</tt> to have access to information about the compression
-method to aid in memory allocation.  In the current implementation of <em>zlib</em>
-(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of
-<tt>inflate()</tt> anyway.  However those fields must be initialized since later versions
-of <em>zlib</em> that provide more compression methods may take advantage of this interface.
-In any case, no decompression is performed by <tt>inflateInit()</tt>, so the
-<tt>avail_out</tt> and <tt>next_out</tt> fields do not need to be initialized before calling.
-<p>
-Here <tt>avail_in</tt> is set to zero and <tt>next_in</tt> is set to <tt>Z_NULL</tt> to
-indicate that no input data is being provided.
-<pre><b>
-    /* allocate inflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit(&strm);
-    if (ret != Z_OK)
-        return ret;
-</b></pre><!-- -->
-The outer <tt>do</tt>-loop decompresses input until <tt>inflate()</tt> indicates
-that it has reached the end of the compressed data and has produced all of the uncompressed
-output.  This is in contrast to <tt>def()</tt> which processes all of the input file.
-If end-of-file is reached before the compressed data self-terminates, then the compressed
-data is incomplete and an error is returned.
-<pre><b>
-    /* decompress until deflate stream ends or end of file */
-    do {
-</b></pre>
-We read input data and set the <tt>strm</tt> structure accordingly.  If we've reached the
-end of the input file, then we leave the outer loop and report an error, since the
-compressed data is incomplete.  Note that we may read more data than is eventually consumed
-by <tt>inflate()</tt>, if the input file continues past the <em>zlib</em> stream.
-For applications where <em>zlib</em> streams are embedded in other data, this routine would
-need to be modified to return the unused data, or at least indicate how much of the input
-data was not used, so the application would know where to pick up after the <em>zlib</em> stream.
-<pre><b>
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)inflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        if (strm.avail_in == 0)
-            break;
-        strm.next_in = in;
-</b></pre><!-- -->
-The inner <tt>do</tt>-loop has the same function it did in <tt>def()</tt>, which is to
-keep calling <tt>inflate()</tt> until has generated all of the output it can with the
-provided input.
-<pre><b>
-        /* run inflate() on input until output buffer not full */
-        do {
-</b></pre>
-Just like in <tt>def()</tt>, the same output space is provided for each call of <tt>inflate()</tt>.
-<pre><b>
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-</b></pre>
-Now we run the decompression engine itself.  There is no need to adjust the flush parameter, since
-the <em>zlib</em> format is self-terminating. The main difference here is that there are
-return values that we need to pay attention to.  <tt>Z_DATA_ERROR</tt>
-indicates that <tt>inflate()</tt> detected an error in the <em>zlib</em> compressed data format,
-which means that either the data is not a <em>zlib</em> stream to begin with, or that the data was
-corrupted somewhere along the way since it was compressed.  The other error to be processed is
-<tt>Z_MEM_ERROR</tt>, which can occur since memory allocation is deferred until <tt>inflate()</tt>
-needs it, unlike <tt>deflate()</tt>, whose memory is allocated at the start by <tt>deflateInit()</tt>.
-<p>
-Advanced applications may use
-<tt>deflateSetDictionary()</tt> to prime <tt>deflate()</tt> with a set of likely data to improve the
-first 32K or so of compression.  This is noted in the <em>zlib</em> header, so <tt>inflate()</tt>
-requests that that dictionary be provided before it can start to decompress.  Without the dictionary,
-correct decompression is not possible.  For this routine, we have no idea what the dictionary is,
-so the <tt>Z_NEED_DICT</tt> indication is converted to a <tt>Z_DATA_ERROR</tt>.
-<p>
-<tt>inflate()</tt> can also return <tt>Z_STREAM_ERROR</tt>, which should not be possible here,
-but could be checked for as noted above for <tt>def()</tt>.  <tt>Z_BUF_ERROR</tt> does not need to be
-checked for here, for the same reasons noted for <tt>def()</tt>.  <tt>Z_STREAM_END</tt> will be
-checked for later.
-<pre><b>
-            ret = inflate(&strm, Z_NO_FLUSH);
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            switch (ret) {
-            case Z_NEED_DICT:
-                ret = Z_DATA_ERROR;     /* and fall through */
-            case Z_DATA_ERROR:
-            case Z_MEM_ERROR:
-                (void)inflateEnd(&strm);
-                return ret;
-            }
-</b></pre>
-The output of <tt>inflate()</tt> is handled identically to that of <tt>deflate()</tt>.
-<pre><b>
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)inflateEnd(&strm);
-                return Z_ERRNO;
-            }
-</b></pre>
-The inner <tt>do</tt>-loop ends when <tt>inflate()</tt> has no more output as indicated
-by not filling the output buffer, just as for <tt>deflate()</tt>.  In this case, we cannot
-assert that <tt>strm.avail_in</tt> will be zero, since the deflate stream may end before the file
-does.
-<pre><b>
-        } while (strm.avail_out == 0);
-</b></pre><!-- -->
-The outer <tt>do</tt>-loop ends when <tt>inflate()</tt> reports that it has reached the
-end of the input <em>zlib</em> stream, has completed the decompression and integrity
-check, and has provided all of the output.  This is indicated by the <tt>inflate()</tt>
-return value <tt>Z_STREAM_END</tt>.  The inner loop is guaranteed to leave <tt>ret</tt>
-equal to <tt>Z_STREAM_END</tt> if the last chunk of the input file read contained the end
-of the <em>zlib</em> stream.  So if the return value is not <tt>Z_STREAM_END</tt>, the
-loop continues to read more input.
-<pre><b>
-        /* done when inflate() says it's done */
-    } while (ret != Z_STREAM_END);
-</b></pre><!-- -->
-At this point, decompression successfully completed, or we broke out of the loop due to no
-more data being available from the input file.  If the last <tt>inflate()</tt> return value
-is not <tt>Z_STREAM_END</tt>, then the <em>zlib</em> stream was incomplete and a data error
-is returned.  Otherwise, we return with a happy return value.  Of course, <tt>inflateEnd()</tt>
-is called first to avoid a memory leak.
-<pre><b>
-    /* clean up and return */
-    (void)inflateEnd(&strm);
-    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-</b></pre><!-- -->
-That ends the routines that directly use <em>zlib</em>.  The following routines make this
-a command-line program by running data through the above routines from <tt>stdin</tt> to
-<tt>stdout</tt>, and handling any errors reported by <tt>def()</tt> or <tt>inf()</tt>.
-<p>
-<tt>zerr()</tt> is used to interpret the possible error codes from <tt>def()</tt>
-and <tt>inf()</tt>, as detailed in their comments above, and print out an error message.
-Note that these are only a subset of the possible return values from <tt>deflate()</tt>
-and <tt>inflate()</tt>.
-<pre><b>
-/* report a zlib or i/o error */
-void zerr(int ret)
-{
-    fputs("zpipe: ", stderr);
-    switch (ret) {
-    case Z_ERRNO:
-        if (ferror(stdin))
-            fputs("error reading stdin\n", stderr);
-        if (ferror(stdout))
-            fputs("error writing stdout\n", stderr);
-        break;
-    case Z_STREAM_ERROR:
-        fputs("invalid compression level\n", stderr);
-        break;
-    case Z_DATA_ERROR:
-        fputs("invalid or incomplete deflate data\n", stderr);
-        break;
-    case Z_MEM_ERROR:
-        fputs("out of memory\n", stderr);
-        break;
-    case Z_VERSION_ERROR:
-        fputs("zlib version mismatch!\n", stderr);
-    }
-}
-</b></pre><!-- -->
-Here is the <tt>main()</tt> routine used to test <tt>def()</tt> and <tt>inf()</tt>.  The
-<tt>zpipe</tt> command is simply a compression pipe from <tt>stdin</tt> to <tt>stdout</tt>, if
-no arguments are given, or it is a decompression pipe if <tt>zpipe -d</tt> is used.  If any other
-arguments are provided, no compression or decompression is performed.  Instead a usage
-message is displayed.  Examples are <tt>zpipe < foo.txt > foo.txt.z</tt> to compress, and
-<tt>zpipe -d < foo.txt.z > foo.txt</tt> to decompress.
-<pre><b>
-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
-    int ret;
-
-    /* do compression if no arguments */
-    if (argc == 1) {
-        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* do decompression if -d specified */
-    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
-        ret = inf(stdin, stdout);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* otherwise, report usage */
-    else {
-        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
-        return 1;
-    }
-}
-</b></pre>
-<hr>
-<i>Copyright (c) 2004 by Mark Adler<br>Last modified 13 November 2004</i>
-</body>
-</html>
diff --git a/libsrc/zlib/examples/zpipe.c b/libsrc/zlib/examples/zpipe.c
deleted file mode 100644
index 26abb56..0000000
--- a/libsrc/zlib/examples/zpipe.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
-   Not copyrighted -- provided to the public domain
-   Version 1.2  9 November 2004  Mark Adler */
-
-/* Version history:
-   1.0  30 Oct 2004  First version
-   1.1   8 Nov 2004  Add void casting for unused return values
-                     Use switch statement for inflate() return values
-   1.2   9 Nov 2004  Add assertions to document zlib guarantees
-   1.3   6 Apr 2005  Remove incorrect assertion in inf()
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include "zlib.h"
-
-#define CHUNK 16384
-
-/* Compress from file source to file dest until EOF on source.
-   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_STREAM_ERROR if an invalid compression
-   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
-   version of the library linked do not match, or Z_ERRNO if there is
-   an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
-    int ret, flush;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-
-    /* allocate deflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = deflateInit(&strm, level);
-    if (ret != Z_OK)
-        return ret;
-
-    /* compress until end of file */
-    do {
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)deflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
-        strm.next_in = in;
-
-        /* run deflate() on input until output buffer not full, finish
-           compression if all of source has been read in */
-        do {
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-            ret = deflate(&strm, flush);    /* no bad return value */
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)deflateEnd(&strm);
-                return Z_ERRNO;
-            }
-        } while (strm.avail_out == 0);
-        assert(strm.avail_in == 0);     /* all input will be used */
-
-        /* done when last data in file processed */
-    } while (flush != Z_FINISH);
-    assert(ret == Z_STREAM_END);        /* stream will be complete */
-
-    /* clean up and return */
-    (void)deflateEnd(&strm);
-    return Z_OK;
-}
-
-/* Decompress from file source to file dest until stream ends or EOF.
-   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_DATA_ERROR if the deflate data is
-   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
-   the version of the library linked do not match, or Z_ERRNO if there
-   is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
-    int ret;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-
-    /* allocate inflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit(&strm);
-    if (ret != Z_OK)
-        return ret;
-
-    /* decompress until deflate stream ends or end of file */
-    do {
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)inflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        if (strm.avail_in == 0)
-            break;
-        strm.next_in = in;
-
-        /* run inflate() on input until output buffer not full */
-        do {
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-            ret = inflate(&strm, Z_NO_FLUSH);
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            switch (ret) {
-            case Z_NEED_DICT:
-                ret = Z_DATA_ERROR;     /* and fall through */
-            case Z_DATA_ERROR:
-            case Z_MEM_ERROR:
-                (void)inflateEnd(&strm);
-                return ret;
-            }
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)inflateEnd(&strm);
-                return Z_ERRNO;
-            }
-        } while (strm.avail_out == 0);
-
-        /* done when inflate() says it's done */
-    } while (ret != Z_STREAM_END);
-
-    /* clean up and return */
-    (void)inflateEnd(&strm);
-    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-
-/* report a zlib or i/o error */
-void zerr(int ret)
-{
-    fputs("zpipe: ", stderr);
-    switch (ret) {
-    case Z_ERRNO:
-        if (ferror(stdin))
-            fputs("error reading stdin\n", stderr);
-        if (ferror(stdout))
-            fputs("error writing stdout\n", stderr);
-        break;
-    case Z_STREAM_ERROR:
-        fputs("invalid compression level\n", stderr);
-        break;
-    case Z_DATA_ERROR:
-        fputs("invalid or incomplete deflate data\n", stderr);
-        break;
-    case Z_MEM_ERROR:
-        fputs("out of memory\n", stderr);
-        break;
-    case Z_VERSION_ERROR:
-        fputs("zlib version mismatch!\n", stderr);
-    }
-}
-
-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
-    int ret;
-
-    /* do compression if no arguments */
-    if (argc == 1) {
-        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* do decompression if -d specified */
-    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
-        ret = inf(stdin, stdout);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* otherwise, report usage */
-    else {
-        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
-        return 1;
-    }
-}
diff --git a/libsrc/zlib/examples/zran.c b/libsrc/zlib/examples/zran.c
deleted file mode 100644
index 8c7717e..0000000
--- a/libsrc/zlib/examples/zran.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/* zran.c -- example of zlib/gzip stream indexing and random access
- * Copyright (C) 2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
-   Version 1.0  29 May 2005  Mark Adler */
-
-/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
-   for random access of a compressed file.  A file containing a zlib or gzip
-   stream is provided on the command line.  The compressed stream is decoded in
-   its entirety, and an index built with access points about every SPAN bytes
-   in the uncompressed output.  The compressed file is left open, and can then
-   be read randomly, having to decompress on the average SPAN/2 uncompressed
-   bytes before getting to the desired block of data.
-
-   An access point can be created at the start of any deflate block, by saving
-   the starting file offset and bit of that block, and the 32K bytes of
-   uncompressed data that precede that block.  Also the uncompressed offset of
-   that block is saved to provide a referece for locating a desired starting
-   point in the uncompressed stream.  build_index() works by decompressing the
-   input zlib or gzip stream a block at a time, and at the end of each block
-   deciding if enough uncompressed data has gone by to justify the creation of
-   a new access point.  If so, that point is saved in a data structure that
-   grows as needed to accommodate the points.
-
-   To use the index, an offset in the uncompressed data is provided, for which
-   the latest accees point at or preceding that offset is located in the index.
-   The input file is positioned to the specified location in the index, and if
-   necessary the first few bits of the compressed data is read from the file.
-   inflate is initialized with those bits and the 32K of uncompressed data, and
-   the decompression then proceeds until the desired offset in the file is
-   reached.  Then the decompression continues to read the desired uncompressed
-   data from the file.
-
-   Another approach would be to generate the index on demand.  In that case,
-   requests for random access reads from the compressed data would try to use
-   the index, but if a read far enough past the end of the index is required,
-   then further index entries would be generated and added.
-
-   There is some fair bit of overhead to starting inflation for the random
-   access, mainly copying the 32K byte dictionary.  So if small pieces of the
-   file are being accessed, it would make sense to implement a cache to hold
-   some lookahead and avoid many calls to extract() for small lengths.
-
-   Another way to build an index would be to use inflateCopy().  That would
-   not be constrained to have access points at block boundaries, but requires
-   more memory per access point, and also cannot be saved to file due to the
-   use of pointers in the state.  The approach here allows for storage of the
-   index in a file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-
-#define local static
-
-#define SPAN 1048576L       /* desired distance between access points */
-#define WINSIZE 32768U      /* sliding window size */
-#define CHUNK 16384         /* file input buffer size */
-
-/* access point entry */
-struct point {
-    off_t out;          /* corresponding offset in uncompressed data */
-    off_t in;           /* offset in input file of first full byte */
-    int bits;           /* number of bits (1-7) from byte at in - 1, or 0 */
-    unsigned char window[WINSIZE];  /* preceding 32K of uncompressed data */
-};
-
-/* access point list */
-struct access {
-    int have;           /* number of list entries filled in */
-    int size;           /* number of list entries allocated */
-    struct point *list; /* allocated list */
-};
-
-/* Deallocate an index built by build_index() */
-local void free_index(struct access *index)
-{
-    if (index != NULL) {
-        free(index->list);
-        free(index);
-    }
-}
-
-/* Add an entry to the access point list.  If out of memory, deallocate the
-   existing list and return NULL. */
-local struct access *addpoint(struct access *index, int bits,
-    off_t in, off_t out, unsigned left, unsigned char *window)
-{
-    struct point *next;
-
-    /* if list is empty, create it (start with eight points) */
-    if (index == NULL) {
-        index = malloc(sizeof(struct access));
-        if (index == NULL) return NULL;
-        index->list = malloc(sizeof(struct point) << 3);
-        if (index->list == NULL) {
-            free(index);
-            return NULL;
-        }
-        index->size = 8;
-        index->have = 0;
-    }
-
-    /* if list is full, make it bigger */
-    else if (index->have == index->size) {
-        index->size <<= 1;
-        next = realloc(index->list, sizeof(struct point) * index->size);
-        if (next == NULL) {
-            free_index(index);
-            return NULL;
-        }
-        index->list = next;
-    }
-
-    /* fill in entry and increment how many we have */
-    next = index->list + index->have;
-    next->bits = bits;
-    next->in = in;
-    next->out = out;
-    if (left)
-        memcpy(next->window, window + WINSIZE - left, left);
-    if (left < WINSIZE)
-        memcpy(next->window + left, window, WINSIZE - left);
-    index->have++;
-
-    /* return list, possibly reallocated */
-    return index;
-}
-
-/* Make one entire pass through the compressed stream and build an index, with
-   access points about every span bytes of uncompressed output -- span is
-   chosen to balance the speed of random access against the memory requirements
-   of the list, about 32K bytes per access point.  Note that data after the end
-   of the first zlib or gzip stream in the file is ignored.  build_index()
-   returns the number of access points on success (>= 1), Z_MEM_ERROR for out
-   of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a
-   file read error.  On success, *built points to the resulting index. */
-local int build_index(FILE *in, off_t span, struct access **built)
-{
-    int ret;
-    off_t totin, totout;        /* our own total counters to avoid 4GB limit */
-    off_t last;                 /* totout value of last access point */
-    struct access *index;       /* access points being generated */
-    z_stream strm;
-    unsigned char input[CHUNK];
-    unsigned char window[WINSIZE];
-
-    /* initialize inflate */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit2(&strm, 47);      /* automatic zlib or gzip decoding */
-    if (ret != Z_OK)
-        return ret;
-
-    /* inflate the input, maintain a sliding window, and build an index -- this
-       also validates the integrity of the compressed data using the check
-       information at the end of the gzip or zlib stream */
-    totin = totout = last = 0;
-    index = NULL;               /* will be allocated by first addpoint() */
-    strm.avail_out = 0;
-    do {
-        /* get some compressed data from input file */
-        strm.avail_in = fread(input, 1, CHUNK, in);
-        if (ferror(in)) {
-            ret = Z_ERRNO;
-            goto build_index_error;
-        }
-        if (strm.avail_in == 0) {
-            ret = Z_DATA_ERROR;
-            goto build_index_error;
-        }
-        strm.next_in = input;
-
-        /* process all of that, or until end of stream */
-        do {
-            /* reset sliding window if necessary */
-            if (strm.avail_out == 0) {
-                strm.avail_out = WINSIZE;
-                strm.next_out = window;
-            }
-
-            /* inflate until out of input, output, or at end of block --
-               update the total input and output counters */
-            totin += strm.avail_in;
-            totout += strm.avail_out;
-            ret = inflate(&strm, Z_BLOCK);      /* return at end of block */
-            totin -= strm.avail_in;
-            totout -= strm.avail_out;
-            if (ret == Z_NEED_DICT)
-                ret = Z_DATA_ERROR;
-            if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
-                goto build_index_error;
-            if (ret == Z_STREAM_END)
-                break;
-
-            /* if at end of block, consider adding an index entry (note that if
-               data_type indicates an end-of-block, then all of the
-               uncompressed data from that block has been delivered, and none
-               of the compressed data after that block has been consumed,
-               except for up to seven bits) -- the totout == 0 provides an
-               entry point after the zlib or gzip header, and assures that the
-               index always has at least one access point; we avoid creating an
-               access point after the last block by checking bit 6 of data_type
-             */
-            if ((strm.data_type & 128) && !(strm.data_type & 64) &&
-                (totout == 0 || totout - last > span)) {
-                index = addpoint(index, strm.data_type & 7, totin,
-                                 totout, strm.avail_out, window);
-                if (index == NULL) {
-                    ret = Z_MEM_ERROR;
-                    goto build_index_error;
-                }
-                last = totout;
-            }
-        } while (strm.avail_in != 0);
-    } while (ret != Z_STREAM_END);
-
-    /* clean up and return index (release unused entries in list) */
-    (void)inflateEnd(&strm);
-    index = realloc(index, sizeof(struct point) * index->have);
-    index->size = index->have;
-    *built = index;
-    return index->size;
-
-    /* return error */
-  build_index_error:
-    (void)inflateEnd(&strm);
-    if (index != NULL)
-        free_index(index);
-    return ret;
-}
-
-/* Use the index to read len bytes from offset into buf, return bytes read or
-   negative for error (Z_DATA_ERROR or Z_MEM_ERROR).  If data is requested past
-   the end of the uncompressed data, then extract() will return a value less
-   than len, indicating how much as actually read into buf.  This function
-   should not return a data error unless the file was modified since the index
-   was generated.  extract() may also return Z_ERRNO if there is an error on
-   reading or seeking the input file. */
-local int extract(FILE *in, struct access *index, off_t offset,
-                  unsigned char *buf, int len)
-{
-    int ret, skip;
-    z_stream strm;
-    struct point *here;
-    unsigned char input[CHUNK];
-    unsigned char discard[WINSIZE];
-
-    /* proceed only if something reasonable to do */
-    if (len < 0)
-        return 0;
-
-    /* find where in stream to start */
-    here = index->list;
-    ret = index->have;
-    while (--ret && here[1].out <= offset)
-        here++;
-
-    /* initialize file and inflate state to start there */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit2(&strm, -15);         /* raw inflate */
-    if (ret != Z_OK)
-        return ret;
-    ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET);
-    if (ret == -1)
-        goto extract_ret;
-    if (here->bits) {
-        ret = getc(in);
-        if (ret == -1) {
-            ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR;
-            goto extract_ret;
-        }
-        (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits));
-    }
-    (void)inflateSetDictionary(&strm, here->window, WINSIZE);
-
-    /* skip uncompressed bytes until offset reached, then satisfy request */
-    offset -= here->out;
-    strm.avail_in = 0;
-    skip = 1;                               /* while skipping to offset */
-    do {
-        /* define where to put uncompressed data, and how much */
-        if (offset == 0 && skip) {          /* at offset now */
-            strm.avail_out = len;
-            strm.next_out = buf;
-            skip = 0;                       /* only do this once */
-        }
-        if (offset > WINSIZE) {             /* skip WINSIZE bytes */
-            strm.avail_out = WINSIZE;
-            strm.next_out = discard;
-            offset -= WINSIZE;
-        }
-        else if (offset != 0) {             /* last skip */
-            strm.avail_out = (unsigned)offset;
-            strm.next_out = discard;
-            offset = 0;
-        }
-
-        /* uncompress until avail_out filled, or end of stream */
-        do {
-            if (strm.avail_in == 0) {
-                strm.avail_in = fread(input, 1, CHUNK, in);
-                if (ferror(in)) {
-                    ret = Z_ERRNO;
-                    goto extract_ret;
-                }
-                if (strm.avail_in == 0) {
-                    ret = Z_DATA_ERROR;
-                    goto extract_ret;
-                }
-                strm.next_in = input;
-            }
-            ret = inflate(&strm, Z_NO_FLUSH);       /* normal inflate */
-            if (ret == Z_NEED_DICT)
-                ret = Z_DATA_ERROR;
-            if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
-                goto extract_ret;
-            if (ret == Z_STREAM_END)
-                break;
-        } while (strm.avail_out != 0);
-
-        /* if reach end of stream, then don't keep trying to get more */
-        if (ret == Z_STREAM_END)
-            break;
-
-        /* do until offset reached and requested data read, or stream ends */
-    } while (skip);
-
-    /* compute number of uncompressed bytes read after offset */
-    ret = skip ? 0 : len - strm.avail_out;
-
-    /* clean up and return bytes read or error */
-  extract_ret:
-    (void)inflateEnd(&strm);
-    return ret;
-}
-
-/* Demonstrate the use of build_index() and extract() by processing the file
-   provided on the command line, and the extracting 16K from about 2/3rds of
-   the way through the uncompressed output, and writing that to stdout. */
-int main(int argc, char **argv)
-{
-    int len;
-    off_t offset;
-    FILE *in;
-    struct access *index;
-    unsigned char buf[CHUNK];
-
-    /* open input file */
-    if (argc != 2) {
-        fprintf(stderr, "usage: zran file.gz\n");
-        return 1;
-    }
-    in = fopen(argv[1], "rb");
-    if (in == NULL) {
-        fprintf(stderr, "zran: could not open %s for reading\n", argv[1]);
-        return 1;
-    }
-
-    /* build index */
-    len = build_index(in, SPAN, &index);
-    if (len < 0) {
-        fclose(in);
-        switch (len) {
-        case Z_MEM_ERROR:
-            fprintf(stderr, "zran: out of memory\n");
-            break;
-        case Z_DATA_ERROR:
-            fprintf(stderr, "zran: compressed data error in %s\n", argv[1]);
-            break;
-        case Z_ERRNO:
-            fprintf(stderr, "zran: read error on %s\n", argv[1]);
-            break;
-        default:
-            fprintf(stderr, "zran: error %d while building index\n", len);
-        }
-        return 1;
-    }
-    fprintf(stderr, "zran: built index with %d access points\n", len);
-
-    /* use index by reading some bytes from an arbitrary offset */
-    offset = (index->list[index->have - 1].out << 1) / 3;
-    len = extract(in, index, offset, buf, CHUNK);
-    if (len < 0)
-        fprintf(stderr, "zran: extraction failed: %s error\n",
-                len == Z_MEM_ERROR ? "out of memory" : "input corrupted");
-    else {
-        fwrite(buf, 1, len, stdout);
-        fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset);
-    }
-
-    /* clean up and exit */
-    free_index(index);
-    fclose(in);
-    return 0;
-}
diff --git a/libsrc/zlib/gzio.c b/libsrc/zlib/gzio.c
deleted file mode 100644
index b111261..0000000
--- a/libsrc/zlib/gzio.c
+++ /dev/null
@@ -1,1026 +0,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Compile this file with -DNO_GZCOMPRESS to avoid the compression code.
- */
-
-/* @(#) $Id: gzio.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-#ifdef NO_DEFLATE       /* for compatibility with old definition */
-#  define NO_GZCOMPRESS
-#endif
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-#ifndef Z_BUFSIZE
-#  ifdef MAXSEG_64K
-#    define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
-#  else
-#    define Z_BUFSIZE 16384
-#  endif
-#endif
-#ifndef Z_PRINTF_BUFSIZE
-#  define Z_PRINTF_BUFSIZE 4096
-#endif
-
-#ifdef __MVS__
-#  pragma map (fdopen , "\174\174FDOPEN")
-   FILE *fdopen(int, const char *);
-#endif
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC     0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME    0x08 /* bit 3 set: original file name present */
-#define COMMENT      0x10 /* bit 4 set: file comment present */
-#define RESERVED     0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
-    z_stream stream;
-    int      z_err;   /* error code for last stream operation */
-    int      z_eof;   /* set if end of input file */
-    FILE     *file;   /* .gz file */
-    Byte     *inbuf;  /* input buffer */
-    Byte     *outbuf; /* output buffer */
-    uLong    crc;     /* crc32 of uncompressed data */
-    char     *msg;    /* error message */
-    char     *path;   /* path name for debugging only */
-    int      transparent; /* 1 if input file is not a .gz file */
-    char     mode;    /* 'w' or 'r' */
-    z_off_t  start;   /* start of compressed data in file (header skipped) */
-    z_off_t  in;      /* bytes into deflate or inflate */
-    z_off_t  out;     /* bytes out of deflate or inflate */
-    int      back;    /* one character push-back */
-    int      last;    /* true if push-back is last character */
-} gz_stream;
-
-
-local gzFile gz_open      OF((const char *path, const char *mode, int  fd));
-local int do_flush        OF((gzFile file, int flush));
-local int    get_byte     OF((gz_stream *s));
-local void   check_header OF((gz_stream *s));
-local int    destroy      OF((gz_stream *s));
-local void   putLong      OF((FILE *file, uLong x));
-local uLong  getLong      OF((gz_stream *s));
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb"). The file is given either by file descriptor
-   or path name (if fd == -1).
-     gz_open returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
-    const char *path;
-    const char *mode;
-    int  fd;
-{
-    int err;
-    int level = Z_DEFAULT_COMPRESSION; /* compression level */
-    int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
-    char *p = (char*)mode;
-    gz_stream *s;
-    char fmode[80]; /* copy of mode, without the compression level */
-    char *m = fmode;
-
-    if (!path || !mode) return Z_NULL;
-
-    s = (gz_stream *)ALLOC(sizeof(gz_stream));
-    if (!s) return Z_NULL;
-
-    s->stream.zalloc = (alloc_func)0;
-    s->stream.zfree = (free_func)0;
-    s->stream.opaque = (voidpf)0;
-    s->stream.next_in = s->inbuf = Z_NULL;
-    s->stream.next_out = s->outbuf = Z_NULL;
-    s->stream.avail_in = s->stream.avail_out = 0;
-    s->file = NULL;
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->in = 0;
-    s->out = 0;
-    s->back = EOF;
-    s->crc = crc32(0L, Z_NULL, 0);
-    s->msg = NULL;
-    s->transparent = 0;
-
-    s->path = (char*)ALLOC(strlen(path)+1);
-    if (s->path == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    strcpy(s->path, path); /* do this early for debugging */
-
-    s->mode = '\0';
-    do {
-        if (*p == 'r') s->mode = 'r';
-        if (*p == 'w' || *p == 'a') s->mode = 'w';
-        if (*p >= '0' && *p <= '9') {
-            level = *p - '0';
-        } else if (*p == 'f') {
-          strategy = Z_FILTERED;
-        } else if (*p == 'h') {
-          strategy = Z_HUFFMAN_ONLY;
-        } else if (*p == 'R') {
-          strategy = Z_RLE;
-        } else {
-            *m++ = *p; /* copy the mode */
-        }
-    } while (*p++ && m != fmode + sizeof(fmode));
-    if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        err = Z_STREAM_ERROR;
-#else
-        err = deflateInit2(&(s->stream), level,
-                           Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
-        /* windowBits is passed < 0 to suppress zlib header */
-
-        s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-#endif
-        if (err != Z_OK || s->outbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    } else {
-        s->stream.next_in  = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
-        err = inflateInit2(&(s->stream), -MAX_WBITS);
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
-         * present after the compressed stream.
-         */
-        if (err != Z_OK || s->inbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    }
-    s->stream.avail_out = Z_BUFSIZE;
-
-    errno = 0;
-    s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
-    if (s->file == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    if (s->mode == 'w') {
-        /* Write a very simple .gz header:
-         */
-        fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
-             Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
-        s->start = 10L;
-        /* We use 10L instead of ftell(s->file) to because ftell causes an
-         * fflush on some systems. This version of the library doesn't use
-         * start anyway in write mode, so this initialization is not
-         * necessary.
-         */
-    } else {
-        check_header(s); /* skip the .gz header */
-        s->start = ftell(s->file) - s->stream.avail_in;
-    }
-
-    return (gzFile)s;
-}
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile ZEXPORT gzopen (path, mode)
-    const char *path;
-    const char *mode;
-{
-    return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
-     Associate a gzFile with the file descriptor fd. fd is not dup'ed here
-   to mimic the behavio(u)r of fdopen.
-*/
-gzFile ZEXPORT gzdopen (fd, mode)
-    int fd;
-    const char *mode;
-{
-    char name[46];      /* allow for up to 128-bit integers */
-
-    if (fd < 0) return (gzFile)Z_NULL;
-    sprintf(name, "<fd:%d>", fd); /* for debugging */
-
-    return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- * Update the compression level and strategy
- */
-int ZEXPORT gzsetparams (file, level, strategy)
-    gzFile file;
-    int level;
-    int strategy;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    /* Make room to allow flushing */
-    if (s->stream.avail_out == 0) {
-
-        s->stream.next_out = s->outbuf;
-        if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-            s->z_err = Z_ERRNO;
-        }
-        s->stream.avail_out = Z_BUFSIZE;
-    }
-
-    return deflateParams (&(s->stream), level, strategy);
-}
-
-/* ===========================================================================
-     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
-   for end of file.
-   IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
-    gz_stream *s;
-{
-    if (s->z_eof) return EOF;
-    if (s->stream.avail_in == 0) {
-        errno = 0;
-        s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-        if (s->stream.avail_in == 0) {
-            s->z_eof = 1;
-            if (ferror(s->file)) s->z_err = Z_ERRNO;
-            return EOF;
-        }
-        s->stream.next_in = s->inbuf;
-    }
-    s->stream.avail_in--;
-    return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
-      Check the gzip header of a gz_stream opened for reading. Set the stream
-    mode to transparent if the gzip magic header is not present; set s->err
-    to Z_DATA_ERROR if the magic header is present but the rest of the header
-    is incorrect.
-    IN assertion: the stream s has already been created sucessfully;
-       s->stream.avail_in is zero for the first time, but may be non-zero
-       for concatenated .gz files.
-*/
-local void check_header(s)
-    gz_stream *s;
-{
-    int method; /* method byte */
-    int flags;  /* flags byte */
-    uInt len;
-    int c;
-
-    /* Assure two bytes in the buffer so we can peek ahead -- handle case
-       where first byte of header is at the end of the buffer after the last
-       gzip segment */
-    len = s->stream.avail_in;
-    if (len < 2) {
-        if (len) s->inbuf[0] = s->stream.next_in[0];
-        errno = 0;
-        len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
-        if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
-        s->stream.avail_in += len;
-        s->stream.next_in = s->inbuf;
-        if (s->stream.avail_in < 2) {
-            s->transparent = s->stream.avail_in;
-            return;
-        }
-    }
-
-    /* Peek ahead to check the gzip magic header */
-    if (s->stream.next_in[0] != gz_magic[0] ||
-        s->stream.next_in[1] != gz_magic[1]) {
-        s->transparent = 1;
-        return;
-    }
-    s->stream.avail_in -= 2;
-    s->stream.next_in += 2;
-
-    /* Check the rest of the gzip header */
-    method = get_byte(s);
-    flags = get_byte(s);
-    if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
-        s->z_err = Z_DATA_ERROR;
-        return;
-    }
-
-    /* Discard time, xflags and OS code: */
-    for (len = 0; len < 6; len++) (void)get_byte(s);
-
-    if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
-        len  =  (uInt)get_byte(s);
-        len += ((uInt)get_byte(s))<<8;
-        /* len is garbage if EOF but the loop below will quit anyway */
-        while (len-- != 0 && get_byte(s) != EOF) ;
-    }
-    if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
-        while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */
-        while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */
-        for (len = 0; len < 2; len++) (void)get_byte(s);
-    }
-    s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
-   Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
-    gz_stream *s;
-{
-    int err = Z_OK;
-
-    if (!s) return Z_STREAM_ERROR;
-
-    TRYFREE(s->msg);
-
-    if (s->stream.state != NULL) {
-        if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-            err = Z_STREAM_ERROR;
-#else
-            err = deflateEnd(&(s->stream));
-#endif
-        } else if (s->mode == 'r') {
-            err = inflateEnd(&(s->stream));
-        }
-    }
-    if (s->file != NULL && fclose(s->file)) {
-#ifdef ESPIPE
-        if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-#endif
-            err = Z_ERRNO;
-    }
-    if (s->z_err < 0) err = s->z_err;
-
-    TRYFREE(s->inbuf);
-    TRYFREE(s->outbuf);
-    TRYFREE(s->path);
-    TRYFREE(s);
-    return err;
-}
-
-/* ===========================================================================
-     Reads the given number of uncompressed bytes from the compressed file.
-   gzread returns the number of bytes actually read (0 for end of file).
-*/
-int ZEXPORT gzread (file, buf, len)
-    gzFile file;
-    voidp buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-    Bytef *start = (Bytef*)buf; /* starting point for crc computation */
-    Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
-    if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
-    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
-    if (s->z_err == Z_STREAM_END) return 0;  /* EOF */
-
-    next_out = (Byte*)buf;
-    s->stream.next_out = (Bytef*)buf;
-    s->stream.avail_out = len;
-
-    if (s->stream.avail_out && s->back != EOF) {
-        *next_out++ = s->back;
-        s->stream.next_out++;
-        s->stream.avail_out--;
-        s->back = EOF;
-        s->out++;
-        start++;
-        if (s->last) {
-            s->z_err = Z_STREAM_END;
-            return 1;
-        }
-    }
-
-    while (s->stream.avail_out != 0) {
-
-        if (s->transparent) {
-            /* Copy first the lookahead bytes: */
-            uInt n = s->stream.avail_in;
-            if (n > s->stream.avail_out) n = s->stream.avail_out;
-            if (n > 0) {
-                zmemcpy(s->stream.next_out, s->stream.next_in, n);
-                next_out += n;
-                s->stream.next_out = next_out;
-                s->stream.next_in   += n;
-                s->stream.avail_out -= n;
-                s->stream.avail_in  -= n;
-            }
-            if (s->stream.avail_out > 0) {
-                s->stream.avail_out -=
-                    (uInt)fread(next_out, 1, s->stream.avail_out, s->file);
-            }
-            len -= s->stream.avail_out;
-            s->in  += len;
-            s->out += len;
-            if (len == 0) s->z_eof = 1;
-            return (int)len;
-        }
-        if (s->stream.avail_in == 0 && !s->z_eof) {
-
-            errno = 0;
-            s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-            if (s->stream.avail_in == 0) {
-                s->z_eof = 1;
-                if (ferror(s->file)) {
-                    s->z_err = Z_ERRNO;
-                    break;
-                }
-            }
-            s->stream.next_in = s->inbuf;
-        }
-        s->in += s->stream.avail_in;
-        s->out += s->stream.avail_out;
-        s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-        s->in -= s->stream.avail_in;
-        s->out -= s->stream.avail_out;
-
-        if (s->z_err == Z_STREAM_END) {
-            /* Check CRC and original size */
-            s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-            start = s->stream.next_out;
-
-            if (getLong(s) != s->crc) {
-                s->z_err = Z_DATA_ERROR;
-            } else {
-                (void)getLong(s);
-                /* The uncompressed length returned by above getlong() may be
-                 * different from s->out in case of concatenated .gz files.
-                 * Check for such files:
-                 */
-                check_header(s);
-                if (s->z_err == Z_OK) {
-                    inflateReset(&(s->stream));
-                    s->crc = crc32(0L, Z_NULL, 0);
-                }
-            }
-        }
-        if (s->z_err != Z_OK || s->z_eof) break;
-    }
-    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
-    if (len == s->stream.avail_out &&
-        (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO))
-        return -1;
-    return (int)(len - s->stream.avail_out);
-}
-
-
-/* ===========================================================================
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-int ZEXPORT gzgetc(file)
-    gzFile file;
-{
-    unsigned char c;
-
-    return gzread(file, &c, 1) == 1 ? c : -1;
-}
-
-
-/* ===========================================================================
-      Push one byte back onto the stream.
-*/
-int ZEXPORT gzungetc(c, file)
-    int c;
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF;
-    s->back = c;
-    s->out--;
-    s->last = (s->z_err == Z_STREAM_END);
-    if (s->last) s->z_err = Z_OK;
-    s->z_eof = 0;
-    return c;
-}
-
-
-/* ===========================================================================
-      Reads bytes from the compressed file until len-1 characters are
-   read, or a newline character is read and transferred to buf, or an
-   end-of-file condition is encountered.  The string is then terminated
-   with a null character.
-      gzgets returns buf, or Z_NULL in case of error.
-
-      The current implementation is not optimized at all.
-*/
-char * ZEXPORT gzgets(file, buf, len)
-    gzFile file;
-    char *buf;
-    int len;
-{
-    char *b = buf;
-    if (buf == Z_NULL || len <= 0) return Z_NULL;
-
-    while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ;
-    *buf = '\0';
-    return b == buf && len > 0 ? Z_NULL : b;
-}
-
-
-#ifndef NO_GZCOMPRESS
-/* ===========================================================================
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int ZEXPORT gzwrite (file, buf, len)
-    gzFile file;
-    voidpc buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.next_in = (Bytef*)buf;
-    s->stream.avail_in = len;
-
-    while (s->stream.avail_in != 0) {
-
-        if (s->stream.avail_out == 0) {
-
-            s->stream.next_out = s->outbuf;
-            if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-                s->z_err = Z_ERRNO;
-                break;
-            }
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        s->in += s->stream.avail_in;
-        s->out += s->stream.avail_out;
-        s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
-        s->in -= s->stream.avail_in;
-        s->out -= s->stream.avail_out;
-        if (s->z_err != Z_OK) break;
-    }
-    s->crc = crc32(s->crc, (const Bytef *)buf, len);
-
-    return (int)(len - s->stream.avail_in);
-}
-
-
-/* ===========================================================================
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).
-*/
-#ifdef STDC
-#include <stdarg.h>
-
-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    va_list va;
-    int len;
-
-    buf[sizeof(buf) - 1] = 0;
-    va_start(va, format);
-#ifdef NO_vsnprintf
-#  ifdef HAS_vsprintf_void
-    (void)vsprintf(buf, format, va);
-    va_end(va);
-    for (len = 0; len < sizeof(buf); len++)
-        if (buf[len] == 0) break;
-#  else
-    len = vsprintf(buf, format, va);
-    va_end(va);
-#  endif
-#else
-#  ifdef HAS_vsnprintf_void
-    (void)vsnprintf(buf, sizeof(buf), format, va);
-    va_end(va);
-    len = strlen(buf);
-#  else
-    len = vsnprintf(buf, sizeof(buf), format, va);
-    va_end(va);
-#  endif
-#endif
-    if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)
-        return 0;
-    return gzwrite(file, buf, (unsigned)len);
-}
-#else /* not ANSI C */
-
-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-                       a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-    gzFile file;
-    const char *format;
-    int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-        a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    int len;
-
-    buf[sizeof(buf) - 1] = 0;
-#ifdef NO_snprintf
-#  ifdef HAS_sprintf_void
-    sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-            a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-    for (len = 0; len < sizeof(buf); len++)
-        if (buf[len] == 0) break;
-#  else
-    len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-                a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#  endif
-#else
-#  ifdef HAS_snprintf_void
-    snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-             a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-    len = strlen(buf);
-#  else
-    len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-                 a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#  endif
-#endif
-    if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0)
-        return 0;
-    return gzwrite(file, buf, len);
-}
-#endif
-
-/* ===========================================================================
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-int ZEXPORT gzputc(file, c)
-    gzFile file;
-    int c;
-{
-    unsigned char cc = (unsigned char) c; /* required for big endian systems */
-
-    return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
-}
-
-
-/* ===========================================================================
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-int ZEXPORT gzputs(file, s)
-    gzFile file;
-    const char *s;
-{
-    return gzwrite(file, (char*)s, (unsigned)strlen(s));
-}
-
-
-/* ===========================================================================
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function.
-*/
-local int do_flush (file, flush)
-    gzFile file;
-    int flush;
-{
-    uInt len;
-    int done = 0;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.avail_in = 0; /* should be zero already anyway */
-
-    for (;;) {
-        len = Z_BUFSIZE - s->stream.avail_out;
-
-        if (len != 0) {
-            if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
-                s->z_err = Z_ERRNO;
-                return Z_ERRNO;
-            }
-            s->stream.next_out = s->outbuf;
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        if (done) break;
-        s->out += s->stream.avail_out;
-        s->z_err = deflate(&(s->stream), flush);
-        s->out -= s->stream.avail_out;
-
-        /* Ignore the second of two consecutive flushes: */
-        if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-
-        /* deflate has finished flushing only when it hasn't used up
-         * all the available space in the output buffer:
-         */
-        done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
-
-        if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
-    }
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-int ZEXPORT gzflush (file, flush)
-     gzFile file;
-     int flush;
-{
-    gz_stream *s = (gz_stream*)file;
-    int err = do_flush (file, flush);
-
-    if (err) return err;
-    fflush(s->file);
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-#endif /* NO_GZCOMPRESS */
-
-/* ===========================================================================
-      Sets the starting position for the next gzread or gzwrite on the given
-   compressed file. The offset represents a number of bytes in the
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error.
-      SEEK_END is not implemented, returns error.
-      In this version of the library, gzseek can be extremely slow.
-*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
-    gzFile file;
-    z_off_t offset;
-    int whence;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || whence == SEEK_END ||
-        s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
-        return -1L;
-    }
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        return -1L;
-#else
-        if (whence == SEEK_SET) {
-            offset -= s->in;
-        }
-        if (offset < 0) return -1L;
-
-        /* At this point, offset is the number of zero bytes to write. */
-        if (s->inbuf == Z_NULL) {
-            s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
-            if (s->inbuf == Z_NULL) return -1L;
-            zmemzero(s->inbuf, Z_BUFSIZE);
-        }
-        while (offset > 0)  {
-            uInt size = Z_BUFSIZE;
-            if (offset < Z_BUFSIZE) size = (uInt)offset;
-
-            size = gzwrite(file, s->inbuf, size);
-            if (size == 0) return -1L;
-
-            offset -= size;
-        }
-        return s->in;
-#endif
-    }
-    /* Rest of function is for reading only */
-
-    /* compute absolute position */
-    if (whence == SEEK_CUR) {
-        offset += s->out;
-    }
-    if (offset < 0) return -1L;
-
-    if (s->transparent) {
-        /* map to fseek */
-        s->back = EOF;
-        s->stream.avail_in = 0;
-        s->stream.next_in = s->inbuf;
-        if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
-        s->in = s->out = offset;
-        return offset;
-    }
-
-    /* For a negative seek, rewind and use positive seek */
-    if (offset >= s->out) {
-        offset -= s->out;
-    } else if (gzrewind(file) < 0) {
-        return -1L;
-    }
-    /* offset is now the number of bytes to skip. */
-
-    if (offset != 0 && s->outbuf == Z_NULL) {
-        s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-        if (s->outbuf == Z_NULL) return -1L;
-    }
-    if (offset && s->back != EOF) {
-        s->back = EOF;
-        s->out++;
-        offset--;
-        if (s->last) s->z_err = Z_STREAM_END;
-    }
-    while (offset > 0)  {
-        int size = Z_BUFSIZE;
-        if (offset < Z_BUFSIZE) size = (int)offset;
-
-        size = gzread(file, s->outbuf, (uInt)size);
-        if (size <= 0) return -1L;
-        offset -= size;
-    }
-    return s->out;
-}
-
-/* ===========================================================================
-     Rewinds input file.
-*/
-int ZEXPORT gzrewind (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r') return -1;
-
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->back = EOF;
-    s->stream.avail_in = 0;
-    s->stream.next_in = s->inbuf;
-    s->crc = crc32(0L, Z_NULL, 0);
-    if (!s->transparent) (void)inflateReset(&s->stream);
-    s->in = 0;
-    s->out = 0;
-    return fseek(s->file, s->start, SEEK_SET);
-}
-
-/* ===========================================================================
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-*/
-z_off_t ZEXPORT gztell (file)
-    gzFile file;
-{
-    return gzseek(file, 0L, SEEK_CUR);
-}
-
-/* ===========================================================================
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-int ZEXPORT gzeof (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    /* With concatenated compressed files that can have embedded
-     * crc trailers, z_eof is no longer the only/best indicator of EOF
-     * on a gz_stream. Handle end-of-stream error explicitly here.
-     */
-    if (s == NULL || s->mode != 'r') return 0;
-    if (s->z_eof) return 1;
-    return s->z_err == Z_STREAM_END;
-}
-
-/* ===========================================================================
-     Returns 1 if reading and doing so transparently, otherwise zero.
-*/
-int ZEXPORT gzdirect (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r') return 0;
-    return s->transparent;
-}
-
-/* ===========================================================================
-   Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
-    FILE *file;
-    uLong x;
-{
-    int n;
-    for (n = 0; n < 4; n++) {
-        fputc((int)(x & 0xff), file);
-        x >>= 8;
-    }
-}
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets z_err in case
-   of error.
-*/
-local uLong getLong (s)
-    gz_stream *s;
-{
-    uLong x = (uLong)get_byte(s);
-    int c;
-
-    x += ((uLong)get_byte(s))<<8;
-    x += ((uLong)get_byte(s))<<16;
-    c = get_byte(s);
-    if (c == EOF) s->z_err = Z_DATA_ERROR;
-    x += ((uLong)c)<<24;
-    return x;
-}
-
-/* ===========================================================================
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state.
-*/
-int ZEXPORT gzclose (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return Z_STREAM_ERROR;
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        return Z_STREAM_ERROR;
-#else
-        if (do_flush (file, Z_FINISH) != Z_OK)
-            return destroy((gz_stream*)file);
-
-        putLong (s->file, s->crc);
-        putLong (s->file, (uLong)(s->in & 0xffffffff));
-#endif
-    }
-    return destroy((gz_stream*)file);
-}
-
-#ifdef STDC
-#  define zstrerror(errnum) strerror(errnum)
-#else
-#  define zstrerror(errnum) ""
-#endif
-
-/* ===========================================================================
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-const char * ZEXPORT gzerror (file, errnum)
-    gzFile file;
-    int *errnum;
-{
-    char *m;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) {
-        *errnum = Z_STREAM_ERROR;
-        return (const char*)ERR_MSG(Z_STREAM_ERROR);
-    }
-    *errnum = s->z_err;
-    if (*errnum == Z_OK) return (const char*)"";
-
-    m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
-    if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
-    TRYFREE(s->msg);
-    s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
-    if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);
-    strcpy(s->msg, s->path);
-    strcat(s->msg, ": ");
-    strcat(s->msg, m);
-    return (const char*)s->msg;
-}
-
-/* ===========================================================================
-     Clear the error and end-of-file flags, and do the same for the real file.
-*/
-void ZEXPORT gzclearerr (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return;
-    if (s->z_err != Z_STREAM_END) s->z_err = Z_OK;
-    s->z_eof = 0;
-    clearerr(s->file);
-}
diff --git a/libsrc/zlib/infback.c b/libsrc/zlib/infback.c
deleted file mode 100644
index 455dbc9..0000000
--- a/libsrc/zlib/infback.c
+++ /dev/null
@@ -1,623 +0,0 @@
-/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
-   This code is largely copied from inflate.c.  Normally either infback.o or
-   inflate.o would be linked into an application--not both.  The interface
-   with inffast.c is retained so that optimized assembler-coded versions of
-   inflate_fast() can be used with either inflate.c or infback.c.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-
-/*
-   strm provides memory allocation functions in zalloc and zfree, or
-   Z_NULL to use the library memory allocation functions.
-
-   windowBits is in the range 8..15, and window is a user-supplied
-   window and output buffer that is 2**windowBits bytes.
- */
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_streamp strm;
-int windowBits;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL || window == Z_NULL ||
-        windowBits < 8 || windowBits > 15)
-        return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
-                                               sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (struct internal_state FAR *)state;
-    state->dmax = 32768U;
-    state->wbits = windowBits;
-    state->wsize = 1U << windowBits;
-    state->window = window;
-    state->write = 0;
-    state->whave = 0;
-    return Z_OK;
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-/* Macros for inflateBack(): */
-
-/* Load returned state from inflate_fast() */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Set state from registers for inflate_fast() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Assure that some input is available.  If input is requested, but denied,
-   then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
-    do { \
-        if (have == 0) { \
-            have = in(in_desc, &next); \
-            if (have == 0) { \
-                next = Z_NULL; \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
-   with an error if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        PULL(); \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflateBack() with
-   an error. */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Assure that some output space is available, by writing out the window
-   if it's full.  If the write fails, return from inflateBack() with a
-   Z_BUF_ERROR. */
-#define ROOM() \
-    do { \
-        if (left == 0) { \
-            put = state->window; \
-            left = state->wsize; \
-            state->whave = left; \
-            if (out(out_desc, put, left)) { \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/*
-   strm provides the memory allocation functions and window buffer on input,
-   and provides information on the unused input on return.  For Z_DATA_ERROR
-   returns, strm will also provide an error message.
-
-   in() and out() are the call-back input and output functions.  When
-   inflateBack() needs more input, it calls in().  When inflateBack() has
-   filled the window with output, or when it completes with data in the
-   window, it calls out() to write out the data.  The application must not
-   change the provided input until in() is called again or inflateBack()
-   returns.  The application must not change the window/output buffer until
-   inflateBack() returns.
-
-   in() and out() are called with a descriptor parameter provided in the
-   inflateBack() call.  This parameter can be a structure that provides the
-   information required to do the read or write, as well as accumulated
-   information on the input and output such as totals and check values.
-
-   in() should return zero on failure.  out() should return non-zero on
-   failure.  If either in() or out() fails, than inflateBack() returns a
-   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
-   was in() or out() that caused in the error.  Otherwise,  inflateBack()
-   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
-   error, or Z_MEM_ERROR if it could not allocate memory for the state.
-   inflateBack() can also return Z_STREAM_ERROR if the input parameters
-   are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_streamp strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    /* Check that the strm exists and that the state was initialized */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* Reset the state */
-    strm->msg = Z_NULL;
-    state->mode = TYPE;
-    state->last = 0;
-    state->whave = 0;
-    next = strm->next_in;
-    have = next != Z_NULL ? strm->avail_in : 0;
-    hold = 0;
-    bits = 0;
-    put = state->window;
-    left = state->wsize;
-
-    /* Inflate until end of block marked as last */
-    for (;;)
-        switch (state->mode) {
-        case TYPE:
-            /* determine and dispatch block type */
-            if (state->last) {
-                BYTEBITS();
-                state->mode = DONE;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-
-        case STORED:
-            /* get and verify stored block length */
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-
-            /* copy stored block from input to output */
-            while (state->length != 0) {
-                copy = state->length;
-                PULL();
-                ROOM();
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-
-        case TABLE:
-            /* get dynamic table entries descriptor */
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-
-            /* get code length code lengths (not a typo) */
-            state->have = 0;
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-
-            /* get length and distance code code lengths */
-            state->have = 0;
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = (unsigned)(state->lens[state->have - 1]);
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (state->mode == BAD) break;
-
-            /* build code tables */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-
-        case LEN:
-            /* use inflate_fast() if we have enough input and output */
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                if (state->whave < state->wsize)
-                    state->whave = state->wsize - left;
-                inflate_fast(strm, state->wsize);
-                LOAD();
-                break;
-            }
-
-            /* get a literal, length, or end-of-block code */
-            for (;;) {
-                this = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            state->length = (unsigned)this.val;
-
-            /* process literal */
-            if (this.op == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                ROOM();
-                *put++ = (unsigned char)(state->length);
-                left--;
-                state->mode = LEN;
-                break;
-            }
-
-            /* process end of block */
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-
-            /* invalid code */
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-
-            /* length code -- get extra bits, if any */
-            state->extra = (unsigned)(this.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-
-            /* get distance code */
-            for (;;) {
-                this = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)this.val;
-
-            /* get distance extra bits, if any */
-            state->extra = (unsigned)(this.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            if (state->offset > state->wsize - (state->whave < state->wsize ?
-                                                left : 0)) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-
-            /* copy match from window to output */
-            do {
-                ROOM();
-                copy = state->wsize - state->offset;
-                if (copy < left) {
-                    from = put + copy;
-                    copy = left - copy;
-                }
-                else {
-                    from = put - state->offset;
-                    copy = left;
-                }
-                if (copy > state->length) copy = state->length;
-                state->length -= copy;
-                left -= copy;
-                do {
-                    *put++ = *from++;
-                } while (--copy);
-            } while (state->length != 0);
-            break;
-
-        case DONE:
-            /* inflate stream terminated properly -- write leftover output */
-            ret = Z_STREAM_END;
-            if (left < state->wsize) {
-                if (out(out_desc, state->window, state->wsize - left))
-                    ret = Z_BUF_ERROR;
-            }
-            goto inf_leave;
-
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-
-        default:                /* can't happen, but makes compilers happy */
-            ret = Z_STREAM_ERROR;
-            goto inf_leave;
-        }
-
-    /* Return unused input */
-  inf_leave:
-    strm->next_in = next;
-    strm->avail_in = have;
-    return ret;
-}
-
-int ZEXPORT inflateBackEnd(strm)
-z_streamp strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
diff --git a/libsrc/zlib/inffast.c b/libsrc/zlib/inffast.c
deleted file mode 100644
index bbee92e..0000000
--- a/libsrc/zlib/inffast.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* inffast.c -- fast decoding
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
-   Based on testing to date,
-   Pre-increment preferred for:
-   - PowerPC G3 (Adler)
-   - MIPS R5000 (Randers-Pehrson)
-   Post-increment preferred for:
-   - none
-   No measurable difference:
-   - Pentium III (Anderson)
-   - M68060 (Nikl)
- */
-#ifdef POSTINC
-#  define OFF 0
-#  define PUP(a) *(a)++
-#else
-#  define OFF 1
-#  define PUP(a) *++(a)
-#endif
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *in;      /* local strm->next_in */
-    unsigned char FAR *last;    /* while in < last, enough input available */
-    unsigned char FAR *out;     /* local strm->next_out */
-    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
-    unsigned char FAR *end;     /* while out < end, enough space available */
-#ifdef INFLATE_STRICT
-    unsigned dmax;              /* maximum distance from zlib header */
-#endif
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned write;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
-    unsigned long hold;         /* local strm->hold */
-    unsigned bits;              /* local strm->bits */
-    code const FAR *lcode;      /* local strm->lencode */
-    code const FAR *dcode;      /* local strm->distcode */
-    unsigned lmask;             /* mask for first level of length codes */
-    unsigned dmask;             /* mask for first level of distance codes */
-    code this;                  /* retrieved table entry */
-    unsigned op;                /* code bits, operation, extra bits, or */
-                                /*  window position, window bytes to copy */
-    unsigned len;               /* match length, unused bytes */
-    unsigned dist;              /* match distance */
-    unsigned char FAR *from;    /* where to copy match from */
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-    in = strm->next_in - OFF;
-    last = in + (strm->avail_in - 5);
-    out = strm->next_out - OFF;
-    beg = out - (start - strm->avail_out);
-    end = out + (strm->avail_out - 257);
-#ifdef INFLATE_STRICT
-    dmax = state->dmax;
-#endif
-    wsize = state->wsize;
-    whave = state->whave;
-    write = state->write;
-    window = state->window;
-    hold = state->hold;
-    bits = state->bits;
-    lcode = state->lencode;
-    dcode = state->distcode;
-    lmask = (1U << state->lenbits) - 1;
-    dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-    do {
-        if (bits < 15) {
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-        }
-        this = lcode[hold & lmask];
-      dolen:
-        op = (unsigned)(this.bits);
-        hold >>= op;
-        bits -= op;
-        op = (unsigned)(this.op);
-        if (op == 0) {                          /* literal */
-            Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                    "inflate:         literal '%c'\n" :
-                    "inflate:         literal 0x%02x\n", this.val));
-            PUP(out) = (unsigned char)(this.val);
-        }
-        else if (op & 16) {                     /* length base */
-            len = (unsigned)(this.val);
-            op &= 15;                           /* number of extra bits */
-            if (op) {
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                }
-                len += (unsigned)hold & ((1U << op) - 1);
-                hold >>= op;
-                bits -= op;
-            }
-            Tracevv((stderr, "inflate:         length %u\n", len));
-            if (bits < 15) {
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-            }
-            this = dcode[hold & dmask];
-          dodist:
-            op = (unsigned)(this.bits);
-            hold >>= op;
-            bits -= op;
-            op = (unsigned)(this.op);
-            if (op & 16) {                      /* distance base */
-                dist = (unsigned)(this.val);
-                op &= 15;                       /* number of extra bits */
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                    if (bits < op) {
-                        hold += (unsigned long)(PUP(in)) << bits;
-                        bits += 8;
-                    }
-                }
-                dist += (unsigned)hold & ((1U << op) - 1);
-#ifdef INFLATE_STRICT
-                if (dist > dmax) {
-                    strm->msg = (char *)"invalid distance too far back";
-                    state->mode = BAD;
-                    break;
-                }
-#endif
-                hold >>= op;
-                bits -= op;
-                Tracevv((stderr, "inflate:         distance %u\n", dist));
-                op = (unsigned)(out - beg);     /* max distance in output */
-                if (dist > op) {                /* see if copy from window */
-                    op = dist - op;             /* distance back in window */
-                    if (op > whave) {
-                        strm->msg = (char *)"invalid distance too far back";
-                        state->mode = BAD;
-                        break;
-                    }
-                    from = window - OFF;
-                    if (write == 0) {           /* very common case */
-                        from += wsize - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    else if (write < op) {      /* wrap around window */
-                        from += wsize + write - op;
-                        op -= write;
-                        if (op < len) {         /* some from end of window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = window - OFF;
-                            if (write < len) {  /* some from start of window */
-                                op = write;
-                                len -= op;
-                                do {
-                                    PUP(out) = PUP(from);
-                                } while (--op);
-                                from = out - dist;      /* rest from output */
-                            }
-                        }
-                    }
-                    else {                      /* contiguous in window */
-                        from += write - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    while (len > 2) {
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    }
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-                else {
-                    from = out - dist;          /* copy direct from output */
-                    do {                        /* minimum length is three */
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    } while (len > 2);
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-            }
-            else if ((op & 64) == 0) {          /* 2nd level distance code */
-                this = dcode[this.val + (hold & ((1U << op) - 1))];
-                goto dodist;
-            }
-            else {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-        }
-        else if ((op & 64) == 0) {              /* 2nd level length code */
-            this = lcode[this.val + (hold & ((1U << op) - 1))];
-            goto dolen;
-        }
-        else if (op & 32) {                     /* end-of-block */
-            Tracevv((stderr, "inflate:         end of block\n"));
-            state->mode = TYPE;
-            break;
-        }
-        else {
-            strm->msg = (char *)"invalid literal/length code";
-            state->mode = BAD;
-            break;
-        }
-    } while (in < last && out < end);
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    len = bits >> 3;
-    in -= len;
-    bits -= len << 3;
-    hold &= (1U << bits) - 1;
-
-    /* update state and return */
-    strm->next_in = in + OFF;
-    strm->next_out = out + OFF;
-    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
-    strm->avail_out = (unsigned)(out < end ?
-                                 257 + (end - out) : 257 - (out - end));
-    state->hold = hold;
-    state->bits = bits;
-    return;
-}
-
-/*
-   inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
-   - Using bit fields for code structure
-   - Different op definition to avoid & for extra bits (do & for table bits)
-   - Three separate decoding do-loops for direct, window, and write == 0
-   - Special case for distance > 1 copies to do overlapped load and store copy
-   - Explicit branch predictions (based on measured branch probabilities)
-   - Deferring match copy and interspersed it with decoding subsequent codes
-   - Swapping literal/length else
-   - Swapping window/direct else
-   - Larger unrolled copy loops (three is about right)
-   - Moving len -= 3 statement into middle of loop
- */
-
-#endif /* !ASMINF */
diff --git a/libsrc/zlib/inffast.h b/libsrc/zlib/inffast.h
deleted file mode 100644
index 1e88d2d..0000000
--- a/libsrc/zlib/inffast.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-void inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/libsrc/zlib/inffixed.h b/libsrc/zlib/inffixed.h
deleted file mode 100644
index 75ed4b5..0000000
--- a/libsrc/zlib/inffixed.h
+++ /dev/null
@@ -1,94 +0,0 @@
-    /* inffixed.h -- table for decoding fixed codes
-     * Generated automatically by makefixed().
-     */
-
-    /* WARNING: this file should *not* be used by applications. It
-       is part of the implementation of the compression library and
-       is subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
-        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
-        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
-        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
-        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
-        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
-        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
-        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
-        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
-        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
-        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
-        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
-        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
-        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
-        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
-        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
-        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
-        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
-        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
-        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
-        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
-        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
-        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
-        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
-        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
-        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
-        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
-        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
-        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
-        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
-        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
-        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
-        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
-        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
-        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
-        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
-        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
-        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
-        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
-        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
-        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
-        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
-        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
-        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
-        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
-        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
-        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
-        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
-        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
-        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
-        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
-        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
-        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
-        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
-        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
-        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
-        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
-        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
-        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
-        {0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
-        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
-        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
-        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
-        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
-        {22,5,193},{64,5,0}
-    };
diff --git a/libsrc/zlib/inflate.c b/libsrc/zlib/inflate.c
deleted file mode 100644
index 792fdee..0000000
--- a/libsrc/zlib/inflate.c
+++ /dev/null
@@ -1,1368 +0,0 @@
-/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * Change history:
- *
- * 1.2.beta0    24 Nov 2002
- * - First version -- complete rewrite of inflate to simplify code, avoid
- *   creation of window when not needed, minimize use of window when it is
- *   needed, make inffast.c even faster, implement gzip decoding, and to
- *   improve code readability and style over the previous zlib inflate code
- *
- * 1.2.beta1    25 Nov 2002
- * - Use pointers for available input and output checking in inffast.c
- * - Remove input and output counters in inffast.c
- * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
- * - Remove unnecessary second byte pull from length extra in inffast.c
- * - Unroll direct copy to three copies per loop in inffast.c
- *
- * 1.2.beta2    4 Dec 2002
- * - Change external routine names to reduce potential conflicts
- * - Correct filename to inffixed.h for fixed tables in inflate.c
- * - Make hbuf[] unsigned char to match parameter type in inflate.c
- * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
- *   to avoid negation problem on Alphas (64 bit) in inflate.c
- *
- * 1.2.beta3    22 Dec 2002
- * - Add comments on state->bits assertion in inffast.c
- * - Add comments on op field in inftrees.h
- * - Fix bug in reuse of allocated window after inflateReset()
- * - Remove bit fields--back to byte structure for speed
- * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
- * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
- * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
- * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
- * - Use local copies of stream next and avail values, as well as local bit
- *   buffer and bit count in inflate()--for speed when inflate_fast() not used
- *
- * 1.2.beta4    1 Jan 2003
- * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
- * - Move a comment on output buffer sizes from inffast.c to inflate.c
- * - Add comments in inffast.c to introduce the inflate_fast() routine
- * - Rearrange window copies in inflate_fast() for speed and simplification
- * - Unroll last copy for window match in inflate_fast()
- * - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
- * - Make op and len in inflate_fast() unsigned for consistency
- * - Add FAR to lcode and dcode declarations in inflate_fast()
- * - Simplified bad distance check in inflate_fast()
- * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
- *   source file infback.c to provide a call-back interface to inflate for
- *   programs like gzip and unzip -- uses window as output buffer to avoid
- *   window copying
- *
- * 1.2.beta5    1 Jan 2003
- * - Improved inflateBack() interface to allow the caller to provide initial
- *   input in strm.
- * - Fixed stored blocks bug in inflateBack()
- *
- * 1.2.beta6    4 Jan 2003
- * - Added comments in inffast.c on effectiveness of POSTINC
- * - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
- *   make compilers happy
- * - Changed type of window in inflateBackInit() to unsigned char *
- *
- * 1.2.beta7    27 Jan 2003
- * - Changed many types to unsigned or unsigned short to avoid warnings
- * - Added inflateCopy() function
- *
- * 1.2.0        9 Mar 2003
- * - Changed inflateBack() interface to provide separate opaque descriptors
- *   for the in() and out() functions
- * - Changed inflateBack() argument and in_func typedef to swap the length
- *   and buffer address return values for the input function
- * - Check next_in and next_out for Z_NULL on entry to inflate()
- *
- * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifdef MAKEFIXED
-#  ifndef BUILDFIXED
-#    define BUILDFIXED
-#  endif
-#endif
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
-#ifdef BUILDFIXED
-   void makefixed OF((void));
-#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
-                              unsigned len));
-
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    strm->total_in = strm->total_out = state->total = 0;
-    strm->msg = Z_NULL;
-    strm->adler = 1;        /* to support ill-conceived Java test suite */
-    state->mode = HEAD;
-    state->last = 0;
-    state->havedict = 0;
-    state->dmax = 32768U;
-    state->head = Z_NULL;
-    state->wsize = 0;
-    state->whave = 0;
-    state->write = 0;
-    state->hold = 0;
-    state->bits = 0;
-    state->lencode = state->distcode = state->next = state->codes;
-    Tracev((stderr, "inflate: reset\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
-    value &= (1L << bits) - 1;
-    state->hold += value << state->bits;
-    state->bits += bits;
-    return Z_OK;
-}
-
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)
-            ZALLOC(strm, 1, sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (struct internal_state FAR *)state;
-    if (windowBits < 0) {
-        state->wrap = 0;
-        windowBits = -windowBits;
-    }
-    else {
-        state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
-        if (windowBits < 48) windowBits &= 15;
-#endif
-    }
-    if (windowBits < 8 || windowBits > 15) {
-        ZFREE(strm, state);
-        strm->state = Z_NULL;
-        return Z_STREAM_ERROR;
-    }
-    state->wbits = (unsigned)windowBits;
-    state->window = Z_NULL;
-    return inflateReset(strm);
-}
-
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
-{
-    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-/*
-   Write out the inffixed.h that is #include'd above.  Defining MAKEFIXED also
-   defines BUILDFIXED, so the tables are built on the fly.  makefixed() writes
-   those tables to stdout, which would be piped to inffixed.h.  A small program
-   can simply call makefixed to do this:
-
-    void makefixed(void);
-
-    int main(void)
-    {
-        makefixed();
-        return 0;
-    }
-
-   Then that can be linked with zlib built with MAKEFIXED defined and run:
-
-    a.out > inffixed.h
- */
-void makefixed()
-{
-    unsigned low, size;
-    struct inflate_state state;
-
-    fixedtables(&state);
-    puts("    /* inffixed.h -- table for decoding fixed codes");
-    puts("     * Generated automatically by makefixed().");
-    puts("     */");
-    puts("");
-    puts("    /* WARNING: this file should *not* be used by applications.");
-    puts("       It is part of the implementation of this library and is");
-    puts("       subject to change. Applications should only use zlib.h.");
-    puts("     */");
-    puts("");
-    size = 1U << 9;
-    printf("    static const code lenfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 7) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
-               state.lencode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-    size = 1U << 5;
-    printf("\n    static const code distfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 6) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
-               state.distcode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-}
-#endif /* MAKEFIXED */
-
-/*
-   Update the window with the last wsize (normally 32K) bytes written before
-   returning.  If window does not exist yet, create it.  This is only called
-   when a window is already in use, or when output has been written during this
-   inflate call, but the end of the deflate stream has not been reached yet.
-   It is also called to create a window for dictionary data when a dictionary
-   is loaded.
-
-   Providing output buffers larger than 32K to inflate() should provide a speed
-   advantage, since only the last 32K of output is copied to the sliding window
-   upon return from inflate(), and since all distances after the first 32K of
-   output will fall in the output data, making match copies simpler and faster.
-   The advantage may be dependent on the size of the processor's data caches.
- */
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
-{
-    struct inflate_state FAR *state;
-    unsigned copy, dist;
-
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* if it hasn't been done already, allocate space for the window */
-    if (state->window == Z_NULL) {
-        state->window = (unsigned char FAR *)
-                        ZALLOC(strm, 1U << state->wbits,
-                               sizeof(unsigned char));
-        if (state->window == Z_NULL) return 1;
-    }
-
-    /* if window not in use yet, initialize */
-    if (state->wsize == 0) {
-        state->wsize = 1U << state->wbits;
-        state->write = 0;
-        state->whave = 0;
-    }
-
-    /* copy state->wsize or less output bytes into the circular window */
-    copy = out - strm->avail_out;
-    if (copy >= state->wsize) {
-        zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
-        state->write = 0;
-        state->whave = state->wsize;
-    }
-    else {
-        dist = state->wsize - state->write;
-        if (dist > copy) dist = copy;
-        zmemcpy(state->window + state->write, strm->next_out - copy, dist);
-        copy -= dist;
-        if (copy) {
-            zmemcpy(state->window, strm->next_out - copy, copy);
-            state->write = copy;
-            state->whave = state->wsize;
-        }
-        else {
-            state->write += dist;
-            if (state->write == state->wsize) state->write = 0;
-            if (state->whave < state->wsize) state->whave += dist;
-        }
-    }
-    return 0;
-}
-
-/* Macros for inflate(): */
-
-/* check function to use adler32() for zlib or crc32() for gzip */
-#ifdef GUNZIP
-#  define UPDATE(check, buf, len) \
-    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
-#else
-#  define UPDATE(check, buf, len) adler32(check, buf, len)
-#endif
-
-/* check macros for header crc */
-#ifdef GUNZIP
-#  define CRC2(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        check = crc32(check, hbuf, 2); \
-    } while (0)
-
-#  define CRC4(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        hbuf[2] = (unsigned char)((word) >> 16); \
-        hbuf[3] = (unsigned char)((word) >> 24); \
-        check = crc32(check, hbuf, 4); \
-    } while (0)
-#endif
-
-/* Load registers with state in inflate() for speed */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Restore state from registers in inflate() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflate()
-   if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        if (have == 0) goto inf_leave; \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflate(). */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
-    ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
-     (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-/*
-   inflate() uses a state machine to process as much input data and generate as
-   much output data as possible before returning.  The state machine is
-   structured roughly as follows:
-
-    for (;;) switch (state) {
-    ...
-    case STATEn:
-        if (not enough input data or output space to make progress)
-            return;
-        ... make progress ...
-        state = STATEm;
-        break;
-    ...
-    }
-
-   so when inflate() is called again, the same case is attempted again, and
-   if the appropriate resources are provided, the machine proceeds to the
-   next state.  The NEEDBITS() macro is usually the way the state evaluates
-   whether it can proceed or should return.  NEEDBITS() does the return if
-   the requested bits are not available.  The typical use of the BITS macros
-   is:
-
-        NEEDBITS(n);
-        ... do something with BITS(n) ...
-        DROPBITS(n);
-
-   where NEEDBITS(n) either returns from inflate() if there isn't enough
-   input left to load n bits into the accumulator, or it continues.  BITS(n)
-   gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
-   the low n bits off the accumulator.  INITBITS() clears the accumulator
-   and sets the number of available bits to zero.  BYTEBITS() discards just
-   enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
-   and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
-
-   NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
-   if there is no input available.  The decoding of variable length codes uses
-   PULLBYTE() directly in order to pull just enough bytes to decode the next
-   code, and no more.
-
-   Some states loop until they get enough input, making sure that enough
-   state information is maintained to continue the loop where it left off
-   if NEEDBITS() returns in the loop.  For example, want, need, and keep
-   would all have to actually be part of the saved state in case NEEDBITS()
-   returns:
-
-    case STATEw:
-        while (want < need) {
-            NEEDBITS(n);
-            keep[want++] = BITS(n);
-            DROPBITS(n);
-        }
-        state = STATEx;
-    case STATEx:
-
-   As shown above, if the next state is also the next case, then the break
-   is omitted.
-
-   A state may also return if there is not enough output space available to
-   complete that state.  Those states are copying stored data, writing a
-   literal byte, and copying a matching string.
-
-   When returning, a "goto inf_leave" is used to update the total counters,
-   update the check value, and determine whether any progress has been made
-   during that inflate() call in order to return the proper return code.
-   Progress is defined as a change in either strm->avail_in or strm->avail_out.
-   When there is a window, goto inf_leave will update the window with the last
-   output written.  If a goto inf_leave occurs in the middle of decompression
-   and there is no window currently, goto inf_leave will create one and copy
-   output to the window for the next call of inflate().
-
-   In this implementation, the flush parameter of inflate() only affects the
-   return code (per zlib.h).  inflate() always writes as much as possible to
-   strm->next_out, given the space available and the provided input--the effect
-   documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
-   the allocation of and copying into a sliding window until necessary, which
-   provides the effect documented in zlib.h for Z_FINISH when the entire input
-   stream available.  So the only thing the flush parameter actually does is:
-   when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
-   will return Z_BUF_ERROR if it has not reached the end of the stream.
- */
-
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned in, out;           /* save starting available input and output */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-#ifdef GUNZIP
-    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
-#endif
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0))
-        return Z_STREAM_ERROR;
-
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
-    LOAD();
-    in = have;
-    out = left;
-    ret = Z_OK;
-    for (;;)
-        switch (state->mode) {
-        case HEAD:
-            if (state->wrap == 0) {
-                state->mode = TYPEDO;
-                break;
-            }
-            NEEDBITS(16);
-#ifdef GUNZIP
-            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
-                state->check = crc32(0L, Z_NULL, 0);
-                CRC2(state->check, hold);
-                INITBITS();
-                state->mode = FLAGS;
-                break;
-            }
-            state->flags = 0;           /* expect zlib header */
-            if (state->head != Z_NULL)
-                state->head->done = -1;
-            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
-#else
-            if (
-#endif
-                ((BITS(8) << 8) + (hold >> 8)) % 31) {
-                strm->msg = (char *)"incorrect header check";
-                state->mode = BAD;
-                break;
-            }
-            if (BITS(4) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            DROPBITS(4);
-            len = BITS(4) + 8;
-            if (len > state->wbits) {
-                strm->msg = (char *)"invalid window size";
-                state->mode = BAD;
-                break;
-            }
-            state->dmax = 1U << len;
-            Tracev((stderr, "inflate:   zlib header ok\n"));
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = hold & 0x200 ? DICTID : TYPE;
-            INITBITS();
-            break;
-#ifdef GUNZIP
-        case FLAGS:
-            NEEDBITS(16);
-            state->flags = (int)(hold);
-            if ((state->flags & 0xff) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            if (state->flags & 0xe000) {
-                strm->msg = (char *)"unknown header flags set";
-                state->mode = BAD;
-                break;
-            }
-            if (state->head != Z_NULL)
-                state->head->text = (int)((hold >> 8) & 1);
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = TIME;
-        case TIME:
-            NEEDBITS(32);
-            if (state->head != Z_NULL)
-                state->head->time = hold;
-            if (state->flags & 0x0200) CRC4(state->check, hold);
-            INITBITS();
-            state->mode = OS;
-        case OS:
-            NEEDBITS(16);
-            if (state->head != Z_NULL) {
-                state->head->xflags = (int)(hold & 0xff);
-                state->head->os = (int)(hold >> 8);
-            }
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = EXLEN;
-        case EXLEN:
-            if (state->flags & 0x0400) {
-                NEEDBITS(16);
-                state->length = (unsigned)(hold);
-                if (state->head != Z_NULL)
-                    state->head->extra_len = (unsigned)hold;
-                if (state->flags & 0x0200) CRC2(state->check, hold);
-                INITBITS();
-            }
-            else if (state->head != Z_NULL)
-                state->head->extra = Z_NULL;
-            state->mode = EXTRA;
-        case EXTRA:
-            if (state->flags & 0x0400) {
-                copy = state->length;
-                if (copy > have) copy = have;
-                if (copy) {
-                    if (state->head != Z_NULL &&
-                        state->head->extra != Z_NULL) {
-                        len = state->head->extra_len - state->length;
-                        zmemcpy(state->head->extra + len, next,
-                                len + copy > state->head->extra_max ?
-                                state->head->extra_max - len : copy);
-                    }
-                    if (state->flags & 0x0200)
-                        state->check = crc32(state->check, next, copy);
-                    have -= copy;
-                    next += copy;
-                    state->length -= copy;
-                }
-                if (state->length) goto inf_leave;
-            }
-            state->length = 0;
-            state->mode = NAME;
-        case NAME:
-            if (state->flags & 0x0800) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                    if (state->head != Z_NULL &&
-                            state->head->name != Z_NULL &&
-                            state->length < state->head->name_max)
-                        state->head->name[state->length++] = len;
-                } while (len && copy < have);
-                if (state->flags & 0x0200)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            else if (state->head != Z_NULL)
-                state->head->name = Z_NULL;
-            state->length = 0;
-            state->mode = COMMENT;
-        case COMMENT:
-            if (state->flags & 0x1000) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                    if (state->head != Z_NULL &&
-                            state->head->comment != Z_NULL &&
-                            state->length < state->head->comm_max)
-                        state->head->comment[state->length++] = len;
-                } while (len && copy < have);
-                if (state->flags & 0x0200)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            else if (state->head != Z_NULL)
-                state->head->comment = Z_NULL;
-            state->mode = HCRC;
-        case HCRC:
-            if (state->flags & 0x0200) {
-                NEEDBITS(16);
-                if (hold != (state->check & 0xffff)) {
-                    strm->msg = (char *)"header crc mismatch";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-            }
-            if (state->head != Z_NULL) {
-                state->head->hcrc = (int)((state->flags >> 9) & 1);
-                state->head->done = 1;
-            }
-            strm->adler = state->check = crc32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-            break;
-#endif
-        case DICTID:
-            NEEDBITS(32);
-            strm->adler = state->check = REVERSE(hold);
-            INITBITS();
-            state->mode = DICT;
-        case DICT:
-            if (state->havedict == 0) {
-                RESTORE();
-                return Z_NEED_DICT;
-            }
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-        case TYPE:
-            if (flush == Z_BLOCK) goto inf_leave;
-        case TYPEDO:
-            if (state->last) {
-                BYTEBITS();
-                state->mode = CHECK;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-        case STORED:
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-            state->mode = COPY;
-        case COPY:
-            copy = state->length;
-            if (copy) {
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                if (copy == 0) goto inf_leave;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-                break;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-        case TABLE:
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-            state->have = 0;
-            state->mode = LENLENS;
-        case LENLENS:
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-            state->have = 0;
-            state->mode = CODELENS;
-        case CODELENS:
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = state->lens[state->have - 1];
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (state->mode == BAD) break;
-
-            /* build code tables */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-        case LEN:
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                inflate_fast(strm, out);
-                LOAD();
-                break;
-            }
-            for (;;) {
-                this = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            state->length = (unsigned)this.val;
-            if ((int)(this.op) == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                state->mode = LIT;
-                break;
-            }
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-            state->extra = (unsigned)(this.op) & 15;
-            state->mode = LENEXT;
-        case LENEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-            state->mode = DIST;
-        case DIST:
-            for (;;) {
-                this = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)this.val;
-            state->extra = (unsigned)(this.op) & 15;
-            state->mode = DISTEXT;
-        case DISTEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-#ifdef INFLATE_STRICT
-            if (state->offset > state->dmax) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            if (state->offset > state->whave + out - left) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-            state->mode = MATCH;
-        case MATCH:
-            if (left == 0) goto inf_leave;
-            copy = out - left;
-            if (state->offset > copy) {         /* copy from window */
-                copy = state->offset - copy;
-                if (copy > state->write) {
-                    copy -= state->write;
-                    from = state->window + (state->wsize - copy);
-                }
-                else
-                    from = state->window + (state->write - copy);
-                if (copy > state->length) copy = state->length;
-            }
-            else {                              /* copy from output */
-                from = put - state->offset;
-                copy = state->length;
-            }
-            if (copy > left) copy = left;
-            left -= copy;
-            state->length -= copy;
-            do {
-                *put++ = *from++;
-            } while (--copy);
-            if (state->length == 0) state->mode = LEN;
-            break;
-        case LIT:
-            if (left == 0) goto inf_leave;
-            *put++ = (unsigned char)(state->length);
-            left--;
-            state->mode = LEN;
-            break;
-        case CHECK:
-            if (state->wrap) {
-                NEEDBITS(32);
-                out -= left;
-                strm->total_out += out;
-                state->total += out;
-                if (out)
-                    strm->adler = state->check =
-                        UPDATE(state->check, put - out, out);
-                out = left;
-                if ((
-#ifdef GUNZIP
-                     state->flags ? hold :
-#endif
-                     REVERSE(hold)) != state->check) {
-                    strm->msg = (char *)"incorrect data check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   check matches trailer\n"));
-            }
-#ifdef GUNZIP
-            state->mode = LENGTH;
-        case LENGTH:
-            if (state->wrap && state->flags) {
-                NEEDBITS(32);
-                if (hold != (state->total & 0xffffffffUL)) {
-                    strm->msg = (char *)"incorrect length check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   length matches trailer\n"));
-            }
-#endif
-            state->mode = DONE;
-        case DONE:
-            ret = Z_STREAM_END;
-            goto inf_leave;
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-        case MEM:
-            return Z_MEM_ERROR;
-        case SYNC:
-        default:
-            return Z_STREAM_ERROR;
-        }
-
-    /*
-       Return from inflate(), updating the total counts and the check value.
-       If there was no progress during the inflate() call, return a buffer
-       error.  Call updatewindow() to create and/or update the window state.
-       Note: a memory error from inflate() is non-recoverable.
-     */
-  inf_leave:
-    RESTORE();
-    if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
-        if (updatewindow(strm, out)) {
-            state->mode = MEM;
-            return Z_MEM_ERROR;
-        }
-    in -= strm->avail_in;
-    out -= strm->avail_out;
-    strm->total_in += in;
-    strm->total_out += out;
-    state->total += out;
-    if (state->wrap && out)
-        strm->adler = state->check =
-            UPDATE(state->check, strm->next_out - out, out);
-    strm->data_type = state->bits + (state->last ? 64 : 0) +
-                      (state->mode == TYPE ? 128 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
-    return ret;
-}
-
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->window != Z_NULL) ZFREE(strm, state->window);
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
-{
-    struct inflate_state FAR *state;
-    unsigned long id;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->wrap != 0 && state->mode != DICT)
-        return Z_STREAM_ERROR;
-
-    /* check for correct dictionary id */
-    if (state->mode == DICT) {
-        id = adler32(0L, Z_NULL, 0);
-        id = adler32(id, dictionary, dictLength);
-        if (id != state->check)
-            return Z_DATA_ERROR;
-    }
-
-    /* copy dictionary to window */
-    if (updatewindow(strm, strm->avail_out)) {
-        state->mode = MEM;
-        return Z_MEM_ERROR;
-    }
-    if (dictLength > state->wsize) {
-        zmemcpy(state->window, dictionary + dictLength - state->wsize,
-                state->wsize);
-        state->whave = state->wsize;
-    }
-    else {
-        zmemcpy(state->window + state->wsize - dictLength, dictionary,
-                dictLength);
-        state->whave = dictLength;
-    }
-    state->havedict = 1;
-    Tracev((stderr, "inflate:   dictionary set\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
-{
-    struct inflate_state FAR *state;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
-
-    /* save header structure */
-    state->head = head;
-    head->done = 0;
-    return Z_OK;
-}
-
-/*
-   Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
-   or when out of input.  When called, *have is the number of pattern bytes
-   found in order so far, in 0..3.  On return *have is updated to the new
-   state.  If on return *have equals four, then the pattern was found and the
-   return value is how many bytes were read including the last byte of the
-   pattern.  If *have is less than four, then the pattern has not been found
-   yet and the return value is len.  In the latter case, syncsearch() can be
-   called again with more data and the *have state.  *have is initialized to
-   zero for the first call.
- */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
-{
-    unsigned got;
-    unsigned next;
-
-    got = *have;
-    next = 0;
-    while (next < len && got < 4) {
-        if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
-            got++;
-        else if (buf[next])
-            got = 0;
-        else
-            got = 4 - got;
-        next++;
-    }
-    *have = got;
-    return next;
-}
-
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
-{
-    unsigned len;               /* number of bytes to look at or looked at */
-    unsigned long in, out;      /* temporary to save total_in and total_out */
-    unsigned char buf[4];       /* to restore bit buffer to byte string */
-    struct inflate_state FAR *state;
-
-    /* check parameters */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
-
-    /* if first time, start search in bit buffer */
-    if (state->mode != SYNC) {
-        state->mode = SYNC;
-        state->hold <<= state->bits & 7;
-        state->bits -= state->bits & 7;
-        len = 0;
-        while (state->bits >= 8) {
-            buf[len++] = (unsigned char)(state->hold);
-            state->hold >>= 8;
-            state->bits -= 8;
-        }
-        state->have = 0;
-        syncsearch(&(state->have), buf, len);
-    }
-
-    /* search available input */
-    len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
-    strm->avail_in -= len;
-    strm->next_in += len;
-    strm->total_in += len;
-
-    /* return no joy or set up to restart inflate() on a new block */
-    if (state->have != 4) return Z_DATA_ERROR;
-    in = strm->total_in;  out = strm->total_out;
-    inflateReset(strm);
-    strm->total_in = in;  strm->total_out = out;
-    state->mode = TYPE;
-    return Z_OK;
-}
-
-/*
-   Returns true if inflate is currently at the end of a block generated by
-   Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
-   implementation to provide an additional safety check. PPP uses
-   Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
-   block. When decompressing, PPP checks that at the end of input packet,
-   inflate is waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    return state->mode == STORED && state->bits == 0;
-}
-
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
-{
-    struct inflate_state FAR *state;
-    struct inflate_state FAR *copy;
-    unsigned char FAR *window;
-    unsigned wsize;
-
-    /* check input */
-    if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
-        source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)source->state;
-
-    /* allocate space */
-    copy = (struct inflate_state FAR *)
-           ZALLOC(source, 1, sizeof(struct inflate_state));
-    if (copy == Z_NULL) return Z_MEM_ERROR;
-    window = Z_NULL;
-    if (state->window != Z_NULL) {
-        window = (unsigned char FAR *)
-                 ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
-        if (window == Z_NULL) {
-            ZFREE(source, copy);
-            return Z_MEM_ERROR;
-        }
-    }
-
-    /* copy state */
-    zmemcpy(dest, source, sizeof(z_stream));
-    zmemcpy(copy, state, sizeof(struct inflate_state));
-    if (state->lencode >= state->codes &&
-        state->lencode <= state->codes + ENOUGH - 1) {
-        copy->lencode = copy->codes + (state->lencode - state->codes);
-        copy->distcode = copy->codes + (state->distcode - state->codes);
-    }
-    copy->next = copy->codes + (state->next - state->codes);
-    if (window != Z_NULL) {
-        wsize = 1U << state->wbits;
-        zmemcpy(window, state->window, wsize);
-    }
-    copy->window = window;
-    dest->state = (struct internal_state FAR *)copy;
-    return Z_OK;
-}
diff --git a/libsrc/zlib/inflate.h b/libsrc/zlib/inflate.h
deleted file mode 100644
index 07bd3e7..0000000
--- a/libsrc/zlib/inflate.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip decoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-    HEAD,       /* i: waiting for magic header */
-    FLAGS,      /* i: waiting for method and flags (gzip) */
-    TIME,       /* i: waiting for modification time (gzip) */
-    OS,         /* i: waiting for extra flags and operating system (gzip) */
-    EXLEN,      /* i: waiting for extra length (gzip) */
-    EXTRA,      /* i: waiting for extra bytes (gzip) */
-    NAME,       /* i: waiting for end of file name (gzip) */
-    COMMENT,    /* i: waiting for end of comment (gzip) */
-    HCRC,       /* i: waiting for header crc (gzip) */
-    DICTID,     /* i: waiting for dictionary check value */
-    DICT,       /* waiting for inflateSetDictionary() call */
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        TYPEDO,     /* i: same, but skip check to exit inflate on new block */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        COPY,       /* i/o: waiting for input or output to copy stored block */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-        LENLENS,    /* i: waiting for code length code lengths */
-        CODELENS,   /* i: waiting for length/lit and distance code lengths */
-            LEN,        /* i: waiting for length/lit code */
-            LENEXT,     /* i: waiting for length extra bits */
-            DIST,       /* i: waiting for distance code */
-            DISTEXT,    /* i: waiting for distance extra bits */
-            MATCH,      /* o: waiting for output space to copy string */
-            LIT,        /* o: waiting for output space to write literal */
-    CHECK,      /* i: waiting for 32-bit check value */
-    LENGTH,     /* i: waiting for 32-bit length (gzip) */
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD,        /* got a data error -- remain here until reset */
-    MEM,        /* got an inflate() memory error -- remain here until reset */
-    SYNC        /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to the BAD or MEM mode -- not shown for clarity)
-
-    Process header:
-        HEAD -> (gzip) or (zlib)
-        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
-        NAME -> COMMENT -> HCRC -> TYPE
-        (zlib) -> DICTID or TYPE
-        DICTID -> DICT -> TYPE
-    Read deflate blocks:
-            TYPE -> STORED or TABLE or LEN or CHECK
-            STORED -> COPY -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN
-    Read deflate codes:
-                LEN -> LENEXT or LIT or TYPE
-                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
-                LIT -> LEN
-    Process trailer:
-        CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls.  Approximately 7K bytes. */
-struct inflate_state {
-    inflate_mode mode;          /* current inflate mode */
-    int last;                   /* true if processing last block */
-    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
-    int havedict;               /* true if dictionary provided */
-    int flags;                  /* gzip header method and flags (0 if zlib) */
-    unsigned dmax;              /* zlib header max distance (INFLATE_STRICT) */
-    unsigned long check;        /* protected copy of check value */
-    unsigned long total;        /* protected copy of output count */
-    gz_headerp head;            /* where to save gzip header information */
-        /* sliding window */
-    unsigned wbits;             /* log base 2 of requested window size */
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned write;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* bit accumulator */
-    unsigned long hold;         /* input bit accumulator */
-    unsigned bits;              /* number of bits in "in" */
-        /* for string and stored block copying */
-    unsigned length;            /* literal or length of data to copy */
-    unsigned offset;            /* distance back to copy string from */
-        /* for table and code decoding */
-    unsigned extra;             /* extra bits needed */
-        /* fixed and dynamic code tables */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-};
diff --git a/libsrc/zlib/inftrees.c b/libsrc/zlib/inftrees.c
deleted file mode 100644
index 8a9c13f..0000000
--- a/libsrc/zlib/inftrees.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#define MAXBITS 15
-
-const char inflate_copyright[] =
-   " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/*
-   Build a set of tables to decode the provided canonical Huffman code.
-   The code lengths are lens[0..codes-1].  The result starts at *table,
-   whose indices are 0..2^bits-1.  work is a writable array of at least
-   lens shorts, which is used as a work area.  type is the type of code
-   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
-   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
-   on return points to the next available entry's address.  bits is the
-   requested root table index bits, and on return it is the actual root
-   table index bits.  It will differ if the request is greater than the
-   longest code or if it is less than the shortest code.
- */
-int inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
-    unsigned len;               /* a code's length in bits */
-    unsigned sym;               /* index of code symbols */
-    unsigned min, max;          /* minimum and maximum code lengths */
-    unsigned root;              /* number of index bits for root table */
-    unsigned curr;              /* number of index bits for current table */
-    unsigned drop;              /* code bits to drop for sub-table */
-    int left;                   /* number of prefix codes available */
-    unsigned used;              /* code entries in table used */
-    unsigned huff;              /* Huffman code */
-    unsigned incr;              /* for incrementing code, index */
-    unsigned fill;              /* index for replicating entries */
-    unsigned low;               /* low bits for current root entry */
-    unsigned mask;              /* mask for low root bits */
-    code this;                  /* table entry for duplication */
-    code FAR *next;             /* next available space in table */
-    const unsigned short FAR *base;     /* base value table to use */
-    const unsigned short FAR *extra;    /* extra bits table to use */
-    int end;                    /* use base and extra for symbol > end */
-    unsigned short count[MAXBITS+1];    /* number of codes of each length */
-    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
-    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
-    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
-        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
-    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577, 0, 0};
-    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
-        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
-        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
-        28, 28, 29, 29, 64, 64};
-
-    /*
-       Process a set of code lengths to create a canonical Huffman code.  The
-       code lengths are lens[0..codes-1].  Each length corresponds to the
-       symbols 0..codes-1.  The Huffman code is generated by first sorting the
-       symbols by length from short to long, and retaining the symbol order
-       for codes with equal lengths.  Then the code starts with all zero bits
-       for the first code of the shortest length, and the codes are integer
-       increments for the same length, and zeros are appended as the length
-       increases.  For the deflate format, these bits are stored backwards
-       from their more natural integer increment ordering, and so when the
-       decoding tables are built in the large loop below, the integer codes
-       are incremented backwards.
-
-       This routine assumes, but does not check, that all of the entries in
-       lens[] are in the range 0..MAXBITS.  The caller must assure this.
-       1..MAXBITS is interpreted as that code length.  zero means that that
-       symbol does not occur in this code.
-
-       The codes are sorted by computing a count of codes for each length,
-       creating from that a table of starting indices for each length in the
-       sorted table, and then entering the symbols in order in the sorted
-       table.  The sorted table is work[], with that space being provided by
-       the caller.
-
-       The length counts are used for other purposes as well, i.e. finding
-       the minimum and maximum length codes, determining if there are any
-       codes at all, checking for a valid set of lengths, and looking ahead
-       at length counts to determine sub-table sizes when building the
-       decoding tables.
-     */
-
-    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
-    for (len = 0; len <= MAXBITS; len++)
-        count[len] = 0;
-    for (sym = 0; sym < codes; sym++)
-        count[lens[sym]]++;
-
-    /* bound code lengths, force root to be within code lengths */
-    root = *bits;
-    for (max = MAXBITS; max >= 1; max--)
-        if (count[max] != 0) break;
-    if (root > max) root = max;
-    if (max == 0) {                     /* no symbols to code at all */
-        this.op = (unsigned char)64;    /* invalid code marker */
-        this.bits = (unsigned char)1;
-        this.val = (unsigned short)0;
-        *(*table)++ = this;             /* make a table to force an error */
-        *(*table)++ = this;
-        *bits = 1;
-        return 0;     /* no symbols, but wait for decoding to report error */
-    }
-    for (min = 1; min <= MAXBITS; min++)
-        if (count[min] != 0) break;
-    if (root < min) root = min;
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;
-        left -= count[len];
-        if (left < 0) return -1;        /* over-subscribed */
-    }
-    if (left > 0 && (type == CODES || max != 1))
-        return -1;                      /* incomplete set */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + count[len];
-
-    /* sort symbols by length, by symbol order within each length */
-    for (sym = 0; sym < codes; sym++)
-        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
-    /*
-       Create and fill in decoding tables.  In this loop, the table being
-       filled is at next and has curr index bits.  The code being used is huff
-       with length len.  That code is converted to an index by dropping drop
-       bits off of the bottom.  For codes where len is less than drop + curr,
-       those top drop + curr - len bits are incremented through all values to
-       fill the table with replicated entries.
-
-       root is the number of index bits for the root table.  When len exceeds
-       root, sub-tables are created pointed to by the root entry with an index
-       of the low root bits of huff.  This is saved in low to check for when a
-       new sub-table should be started.  drop is zero when the root table is
-       being filled, and drop is root when sub-tables are being filled.
-
-       When a new sub-table is needed, it is necessary to look ahead in the
-       code lengths to determine what size sub-table is needed.  The length
-       counts are used for this, and so count[] is decremented as codes are
-       entered in the tables.
-
-       used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked when a LENS table is being made
-       against the space in *table, ENOUGH, minus the maximum space needed by
-       the worst case distance code, MAXD.  This should never happen, but the
-       sufficiency of ENOUGH has not been proven exhaustively, hence the check.
-       This assumes that when type == LENS, bits == 9.
-
-       sym increments through all symbols, and the loop terminates when
-       all codes of length max, i.e. all codes, have been processed.  This
-       routine permits incomplete codes, so another loop after this one fills
-       in the rest of the decoding tables with invalid code markers.
-     */
-
-    /* set up for code type */
-    switch (type) {
-    case CODES:
-        base = extra = work;    /* dummy value--not used */
-        end = 19;
-        break;
-    case LENS:
-        base = lbase;
-        base -= 257;
-        extra = lext;
-        extra -= 257;
-        end = 256;
-        break;
-    default:            /* DISTS */
-        base = dbase;
-        extra = dext;
-        end = -1;
-    }
-
-    /* initialize state for loop */
-    huff = 0;                   /* starting code */
-    sym = 0;                    /* starting code symbol */
-    len = min;                  /* starting code length */
-    next = *table;              /* current table to fill in */
-    curr = root;                /* current table index bits */
-    drop = 0;                   /* current bits to drop from code for index */
-    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
-    used = 1U << root;          /* use root table entries */
-    mask = used - 1;            /* mask for comparing low */
-
-    /* check available table space */
-    if (type == LENS && used >= ENOUGH - MAXD)
-        return 1;
-
-    /* process all codes and make table entries */
-    for (;;) {
-        /* create table entry */
-        this.bits = (unsigned char)(len - drop);
-        if ((int)(work[sym]) < end) {
-            this.op = (unsigned char)0;
-            this.val = work[sym];
-        }
-        else if ((int)(work[sym]) > end) {
-            this.op = (unsigned char)(extra[work[sym]]);
-            this.val = base[work[sym]];
-        }
-        else {
-            this.op = (unsigned char)(32 + 64);         /* end of block */
-            this.val = 0;
-        }
-
-        /* replicate for those indices with low len bits equal to huff */
-        incr = 1U << (len - drop);
-        fill = 1U << curr;
-        min = fill;                 /* save offset to next table */
-        do {
-            fill -= incr;
-            next[(huff >> drop) + fill] = this;
-        } while (fill != 0);
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-
-        /* go to next symbol, update count, len */
-        sym++;
-        if (--(count[len]) == 0) {
-            if (len == max) break;
-            len = lens[work[sym]];
-        }
-
-        /* create new sub-table if needed */
-        if (len > root && (huff & mask) != low) {
-            /* if first time, transition to sub-tables */
-            if (drop == 0)
-                drop = root;
-
-            /* increment past last table */
-            next += min;            /* here min is 1 << curr */
-
-            /* determine length of next table */
-            curr = len - drop;
-            left = (int)(1 << curr);
-            while (curr + drop < max) {
-                left -= count[curr + drop];
-                if (left <= 0) break;
-                curr++;
-                left <<= 1;
-            }
-
-            /* check for enough space */
-            used += 1U << curr;
-            if (type == LENS && used >= ENOUGH - MAXD)
-                return 1;
-
-            /* point entry in root table to sub-table */
-            low = huff & mask;
-            (*table)[low].op = (unsigned char)curr;
-            (*table)[low].bits = (unsigned char)root;
-            (*table)[low].val = (unsigned short)(next - *table);
-        }
-    }
-
-    /*
-       Fill in rest of table for incomplete codes.  This loop is similar to the
-       loop above in incrementing huff for table indices.  It is assumed that
-       len is equal to curr + drop, so there is no loop needed to increment
-       through high index bits.  When the current sub-table is filled, the loop
-       drops back to the root table to fill in any remaining entries there.
-     */
-    this.op = (unsigned char)64;                /* invalid code marker */
-    this.bits = (unsigned char)(len - drop);
-    this.val = (unsigned short)0;
-    while (huff != 0) {
-        /* when done with sub-table, drop back to root table */
-        if (drop != 0 && (huff & mask) != low) {
-            drop = 0;
-            len = root;
-            next = *table;
-            this.bits = (unsigned char)len;
-        }
-
-        /* put invalid code marker in table */
-        next[huff >> drop] = this;
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-    }
-
-    /* set return parameters */
-    *table += used;
-    *bits = root;
-    return 0;
-}
diff --git a/libsrc/zlib/inftrees.h b/libsrc/zlib/inftrees.h
deleted file mode 100644
index b1104c8..0000000
--- a/libsrc/zlib/inftrees.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    0001eeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1444 code structures (852 for length/literals
-   and 592 for distances, the latter actually the result of an
-   exhaustive search).  The true maximum is not known, but the value
-   below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
-
-/* Type of code to build for inftable() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
diff --git a/libsrc/zlib/make_vms.com b/libsrc/zlib/make_vms.com
deleted file mode 100644
index c2a1fb5..0000000
--- a/libsrc/zlib/make_vms.com
+++ /dev/null
@@ -1,461 +0,0 @@
-$! make libz under VMS written by
-$! Martin P.J. Zinser
-$! <zinser at zinser.no-ip.info or zinser at sysdev.deutsche-boerse.com>
-$!
-$ on error then goto err_exit
-$!
-$!
-$! Just some general constants...
-$!
-$ true  = 1
-$ false = 0
-$ tmpnam = "temp_" + f$getjpi("","pid")
-$ SAY = "WRITE SYS$OUTPUT"
-$!
-$! Setup variables holding "config" information
-$!
-$ Make     = ""
-$ name     = "Zlib"
-$ version  = "?.?.?"
-$ v_string = "ZLIB_VERSION"
-$ v_file   = "zlib.h"
-$ ccopt    = ""
-$ lopts    = ""
-$ linkonly = false
-$ optfile  = name + ".opt"
-$ its_decc = false
-$ its_vaxc = false
-$ its_gnuc = false
-$ axp      = f$getsyi("HW_MODEL").ge.1024
-$ s_case   = false
-$! Check for MMK/MMS
-$!
-$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
-$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
-$!
-$!
-$ gosub find_version
-$!
-$ gosub check_opts
-$!
-$! Look for the compiler used
-$!
-$ gosub check_compiler
-$ if its_decc
-$ then
-$   ccopt = "/prefix=all" + ccopt
-$   if f$trnlnm("SYS") .eqs. ""
-$   then
-$     if axp
-$     then
-$       define sys sys$library:
-$     else
-$       ccopt = "/decc" + ccopt
-$       define sys decc$library_include:
-$     endif
-$   endif
-$ endif
-$ if its_vaxc .or. its_gnuc
-$ then
-$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ endif
-$!
-$! Build the thing plain or with mms
-$!
-$ write sys$output "Compiling Zlib sources ..."
-$ if make.eqs.""
-$  then
-$   dele example.obj;*,minigzip.obj;*
-$   CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
-                adler32.c zlib.h zconf.h
-$   CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
-                compress.c zlib.h zconf.h
-$   CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
-                crc32.c zlib.h zconf.h
-$   CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
-                deflate.c deflate.h zutil.h zlib.h zconf.h
-$   CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" -
-                gzio.c zutil.h zlib.h zconf.h
-$   CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
-                infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
-$   CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
-                inffast.c zutil.h zlib.h zconf.h inffast.h
-$   CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
-                inflate.c zutil.h zlib.h zconf.h infblock.h
-$   CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
-                inftrees.c zutil.h zlib.h zconf.h inftrees.h
-$   CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
-                trees.c deflate.h zutil.h zlib.h zconf.h
-$   CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
-                uncompr.c zlib.h zconf.h
-$   CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
-                zutil.c zutil.h zlib.h zconf.h
-$   write sys$output "Building Zlib ..."
-$   CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
-$   write sys$output "Building example..."
-$   CALL MAKE example.OBJ "CC ''CCOPT' example" -
-                example.c zlib.h zconf.h
-$   call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
-$   if f$search("x11vms:xvmsutils.olb") .nes. ""
-$   then
-$     write sys$output "Building minigzip..."
-$     CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
-                minigzip.c zlib.h zconf.h
-$     call make minigzip.exe -
-                "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
-                minigzip.obj libz.olb
-$   endif
-$  else
-$   gosub crea_mms
-$   SAY "Make ''name' ''version' with ''Make' "
-$   'make'
-$  endif
-$!
-$! Alpha gets a shareable image
-$!
-$ If axp
-$ Then
-$   gosub crea_olist
-$   write sys$output "Creating libzshr.exe"
-$   call anal_obj_axp modules.opt _link.opt
-$   if s_case
-$   then
-$      open/append optf modules.opt
-$      write optf "case_sensitive=YES"
-$      close optf
-$   endif
-$   LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,_link.opt/opt
-$ endif
-$ write sys$output "Zlib build completed"
-$ exit
-$CC_ERR:
-$ write sys$output "C compiler required to build ''name'"
-$ goto err_exit
-$ERR_EXIT:
-$ set message/facil/ident/sever/text
-$ write sys$output "Exiting..."
-$ exit 2
-$!
-$!
-$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8  What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$       Argument = P'arg
-$       If Argument .Eqs. "" Then Goto Exit
-$       El=0
-$Loop2:
-$       File = F$Element(El," ",Argument)
-$       If File .Eqs. " " Then Goto Endl
-$       AFile = ""
-$Loop3:
-$       OFile = AFile
-$       AFile = F$Search(File)
-$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$       Goto Loop3
-$NextEL:
-$       El = El + 1
-$       Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
-$!------------------------------------------------------------------------------
-$!
-$! Check command line options and set symbols accordingly
-$!
-$ CHECK_OPTS:
-$ i = 1
-$ OPT_LOOP:
-$ if i .lt. 9
-$ then
-$   cparm = f$edit(p'i',"upcase")
-$   if cparm .eqs. "DEBUG"
-$   then
-$     ccopt = ccopt + "/noopt/deb"
-$     lopts = lopts + "/deb"
-$   endif
-$   if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
-$   then
-$     start = f$locate("=",cparm) + 1
-$     len   = f$length(cparm) - start
-$     ccopt = ccopt + f$extract(start,len,cparm)
-$     if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
-         then s_case = true
-$   endif
-$   if cparm .eqs. "LINK" then linkonly = true
-$   if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
-$   then
-$     start = f$locate("=",cparm) + 1
-$     len   = f$length(cparm) - start
-$     lopts = lopts + f$extract(start,len,cparm)
-$   endif
-$   if f$locate("CC=",cparm) .lt. f$length(cparm)
-$   then
-$     start  = f$locate("=",cparm) + 1
-$     len    = f$length(cparm) - start
-$     cc_com = f$extract(start,len,cparm)
-      if (cc_com .nes. "DECC") .and. -
-         (cc_com .nes. "VAXC") .and. -
-	 (cc_com .nes. "GNUC")
-$     then
-$       write sys$output "Unsupported compiler choice ''cc_com' ignored"
-$       write sys$output "Use DECC, VAXC, or GNUC instead"
-$     else
-$     	if cc_com .eqs. "DECC" then its_decc = true
-$     	if cc_com .eqs. "VAXC" then its_vaxc = true
-$     	if cc_com .eqs. "GNUC" then its_gnuc = true
-$     endif
-$   endif
-$   if f$locate("MAKE=",cparm) .lt. f$length(cparm)
-$   then
-$     start  = f$locate("=",cparm) + 1
-$     len    = f$length(cparm) - start
-$     mmks = f$extract(start,len,cparm)
-$     if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
-$     then
-$       make = mmks
-$     else
-$       write sys$output "Unsupported make choice ''mmks' ignored"
-$       write sys$output "Use MMK or MMS instead"
-$     endif
-$   endif
-$   i = i + 1
-$   goto opt_loop
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Look for the compiler used
-$!
-$CHECK_COMPILER:
-$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
-$ then
-$   its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
-$   its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "")
-$   its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "")
-$ endif
-$!
-$! Exit if no compiler available
-$!
-$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
-$ then goto CC_ERR
-$ else
-$   if its_decc then write sys$output "CC compiler check ... Compaq C"
-$   if its_vaxc then write sys$output "CC compiler check ... VAX C"
-$   if its_gnuc then write sys$output "CC compiler check ... GNU C"
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! If MMS/MMK are available dump out the descrip.mms if required
-$!
-$CREA_MMS:
-$ write sys$output "Creating descrip.mms..."
-$ create descrip.mms
-$ open/append out descrip.mms
-$ copy sys$input: out
-$ deck
-# descrip.mms: MMS description file for building zlib on VMS
-# written by Martin P.J. Zinser
-# <zinser at zinser.no-ip.info or zinser at sysdev.deutsche-boerse.com>
-
-OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj, infback.obj\
-       deflate.obj, trees.obj, zutil.obj, inflate.obj, \
-       inftrees.obj, inffast.obj
-
-$ eod
-$ write out "CFLAGS=", ccopt
-$ write out "LOPTS=", lopts
-$ copy sys$input: out
-$ deck
-
-all : example.exe minigzip.exe libz.olb
-        @ write sys$output " Example applications available"
-
-libz.olb : libz.olb($(OBJS))
-	@ write sys$output " libz available"
-
-example.exe : example.obj libz.olb
-              link $(LOPTS) example,libz.olb/lib
-
-minigzip.exe : minigzip.obj libz.olb
-              link $(LOPTS) minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
-
-clean :
-	delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
-
-
-# Other dependencies.
-adler32.obj  : adler32.c zutil.h zlib.h zconf.h
-compress.obj : compress.c zlib.h zconf.h
-crc32.obj    : crc32.c zutil.h zlib.h zconf.h
-deflate.obj  : deflate.c deflate.h zutil.h zlib.h zconf.h
-example.obj  : example.c zlib.h zconf.h
-gzio.obj     : gzio.c zutil.h zlib.h zconf.h
-inffast.obj  : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
-inflate.obj  : inflate.c zutil.h zlib.h zconf.h
-inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
-minigzip.obj : minigzip.c zlib.h zconf.h
-trees.obj    : trees.c deflate.h zutil.h zlib.h zconf.h
-uncompr.obj  : uncompr.c zlib.h zconf.h
-zutil.obj    : zutil.c zutil.h zlib.h zconf.h
-infback.obj  : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
-$ eod
-$ close out
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Read list of core library sources from makefile.in and create options
-$! needed to build shareable image
-$!
-$CREA_OLIST:
-$ open/read min makefile.in
-$ open/write mod modules.opt
-$ src_check = "OBJS ="
-$MRLOOP:
-$ read/end=mrdone min rec
-$ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop
-$ rec = rec - src_check
-$ gosub extra_filnam
-$ if (f$element(1,"\",rec) .eqs. "\") then goto mrdone
-$MRSLOOP:
-$ read/end=mrdone min rec
-$ gosub extra_filnam
-$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop
-$MRDONE:
-$ close min
-$ close mod
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Take record extracted in crea_olist and split it into single filenames
-$!
-$EXTRA_FILNAM:
-$ myrec = f$edit(rec - "\", "trim,compress")
-$ i = 0
-$FELOOP:
-$ srcfil = f$element(i," ", myrec)
-$ if (srcfil .nes. " ")
-$ then
-$   write mod f$parse(srcfil,,,"NAME"), ".obj"
-$   i = i + 1
-$   goto feloop
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Find current Zlib version number
-$!
-$FIND_VERSION:
-$ open/read h_in 'v_file'
-$hloop:
-$ read/end=hdone h_in rec
-$ rec = f$edit(rec,"TRIM")
-$ if (f$extract(0,1,rec) .nes. "#") then goto hloop
-$ rec = f$edit(rec - "#", "TRIM")
-$ if f$element(0," ",rec) .nes. "define" then goto hloop
-$ if f$element(1," ",rec) .eqs. v_string
-$ then
-$   version = 'f$element(2," ",rec)'
-$   goto hdone
-$ endif
-$ goto hloop
-$hdone:
-$ close h_in
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
-$! information to build a symbol vector for a shareable image
-$! All the "brains" of this logic was suggested by Hartmut Becker
-$! (Hartmut.Becker at compaq.com). All the bugs were introduced by me
-$! (zinser at decus.de), so if you do have problem reports please do not
-$! bother Hartmut/HP, but get in touch with me
-$!
-$ ANAL_OBJ_AXP: Subroutine
-$ V = 'F$Verify(0)
-$ SAY := "WRITE_ SYS$OUTPUT"
-$
-$ IF F$SEARCH("''P1'") .EQS. ""
-$ THEN
-$    SAY "ANAL_OBJ_AXP-E-NOSUCHFILE:  Error, inputfile ''p1' not available"
-$    goto exit_aa
-$ ENDIF
-$ IF "''P2'" .EQS. ""
-$ THEN
-$    SAY "ANAL_OBJ_AXP:  Error, no output file provided"
-$    goto exit_aa
-$ ENDIF
-$
-$ open/read in 'p1
-$ create a.tmp
-$ open/append atmp a.tmp
-$ loop:
-$ read/end=end_loop in line
-$ f= f$search(line)
-$ if f .eqs. ""
-$ then
-$	write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
-$	goto loop
-$ endif
-$ define/user sys$output nl:
-$ define/user sys$error nl:
-$ anal/obj/gsd 'f /out=x.tmp
-$ open/read xtmp x.tmp
-$ XLOOP:
-$ read/end=end_xloop xtmp xline
-$ xline = f$edit(xline,"compress")
-$ write atmp xline
-$ goto xloop
-$ END_XLOOP:
-$ close xtmp
-$ goto loop
-$ end_loop:
-$ close in
-$ close atmp
-$ if f$search("a.tmp") .eqs. "" -
-	then $ exit
-$ ! all global definitions
-$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
-$ ! all procedures
-$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
-$ search c.tmp "symbol:"/out=d.tmp
-$ define/user sys$output nl:
-$ edito/edt/command=sys$input d.tmp
-sub/symbol: "/symbol_vector=(/whole
-sub/"/=PROCEDURE)/whole
-exit
-$ ! all data
-$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
-$ search e.tmp "symbol:"/out=f.tmp
-$ define/user sys$output nl:
-$ edito/edt/command=sys$input f.tmp
-sub/symbol: "/symbol_vector=(/whole
-sub/"/=DATA)/whole
-exit
-$ sort/nodupl d.tmp,f.tmp 'p2'
-$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
-$ if f$search("x.tmp") .nes. "" -
-	then $ delete x.tmp;*
-$!
-$ EXIT_AA:
-$ if V then set verify
-$ endsubroutine
-$!------------------------------------------------------------------------------
diff --git a/libsrc/zlib/minigzip.c b/libsrc/zlib/minigzip.c
deleted file mode 100644
index 0a4af5a..0000000
--- a/libsrc/zlib/minigzip.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * minigzip is a minimal implementation of the gzip utility. This is
- * only an example of using zlib and isn't meant to replace the
- * full-featured gzip. No attempt is made to deal with file systems
- * limiting names to 14 or 8+3 characters, etc... Error checking is
- * very limited. So use minigzip only for testing; use gzip for the
- * real thing. On MSDOS, use only on file names without extension
- * or in pipe mode.
- */
-
-/* @(#) $Id: minigzip.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-
-#ifdef USE_MMAP
-#  include <sys/types.h>
-#  include <sys/mman.h>
-#  include <sys/stat.h>
-#endif
-
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
-#  include <fcntl.h>
-#  include <io.h>
-#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#  define SET_BINARY_MODE(file)
-#endif
-
-#ifdef VMS
-#  define unlink delete
-#  define GZ_SUFFIX "-gz"
-#endif
-#ifdef RISCOS
-#  define unlink remove
-#  define GZ_SUFFIX "-gz"
-#  define fileno(file) file->__file
-#endif
-#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#  include <unix.h> /* for fileno */
-#endif
-
-#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
-  extern int unlink OF((const char *));
-#endif
-
-#ifndef GZ_SUFFIX
-#  define GZ_SUFFIX ".gz"
-#endif
-#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1)
-
-#define BUFLEN      16384
-#define MAX_NAME_LEN 1024
-
-#ifdef MAXSEG_64K
-#  define local static
-   /* Needed for systems with limitation on stack size. */
-#else
-#  define local
-#endif
-
-char *prog;
-
-void error            OF((const char *msg));
-void gz_compress      OF((FILE   *in, gzFile out));
-#ifdef USE_MMAP
-int  gz_compress_mmap OF((FILE   *in, gzFile out));
-#endif
-void gz_uncompress    OF((gzFile in, FILE   *out));
-void file_compress    OF((char  *file, char *mode));
-void file_uncompress  OF((char  *file));
-int  main             OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Display error message and exit
- */
-void error(msg)
-    const char *msg;
-{
-    fprintf(stderr, "%s: %s\n", prog, msg);
-    exit(1);
-}
-
-/* ===========================================================================
- * Compress input to output then close both files.
- */
-
-void gz_compress(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-#ifdef USE_MMAP
-    /* Try first compressing with mmap. If mmap fails (minigzip used in a
-     * pipe), use the normal fread loop.
-     */
-    if (gz_compress_mmap(in, out) == Z_OK) return;
-#endif
-    for (;;) {
-        len = (int)fread(buf, 1, sizeof(buf), in);
-        if (ferror(in)) {
-            perror("fread");
-            exit(1);
-        }
-        if (len == 0) break;
-
-        if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
-    }
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-}
-
-#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech at eso.org> */
-
-/* Try compressing the input file at once using mmap. Return Z_OK if
- * if success, Z_ERRNO otherwise.
- */
-int gz_compress_mmap(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    int len;
-    int err;
-    int ifd = fileno(in);
-    caddr_t buf;    /* mmap'ed buffer for the entire input file */
-    off_t buf_len;  /* length of the input file */
-    struct stat sb;
-
-    /* Determine the size of the file, needed for mmap: */
-    if (fstat(ifd, &sb) < 0) return Z_ERRNO;
-    buf_len = sb.st_size;
-    if (buf_len <= 0) return Z_ERRNO;
-
-    /* Now do the actual mmap: */
-    buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
-    if (buf == (caddr_t)(-1)) return Z_ERRNO;
-
-    /* Compress the whole file at once: */
-    len = gzwrite(out, (char *)buf, (unsigned)buf_len);
-
-    if (len != (int)buf_len) error(gzerror(out, &err));
-
-    munmap(buf, buf_len);
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-    return Z_OK;
-}
-#endif /* USE_MMAP */
-
-/* ===========================================================================
- * Uncompress input to output then close both files.
- */
-void gz_uncompress(in, out)
-    gzFile in;
-    FILE   *out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-    for (;;) {
-        len = gzread(in, buf, sizeof(buf));
-        if (len < 0) error (gzerror(in, &err));
-        if (len == 0) break;
-
-        if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-            error("failed fwrite");
-        }
-    }
-    if (fclose(out)) error("failed fclose");
-
-    if (gzclose(in) != Z_OK) error("failed gzclose");
-}
-
-
-/* ===========================================================================
- * Compress the given file: create a corresponding .gz file and remove the
- * original.
- */
-void file_compress(file, mode)
-    char  *file;
-    char  *mode;
-{
-    local char outfile[MAX_NAME_LEN];
-    FILE  *in;
-    gzFile out;
-
-    strcpy(outfile, file);
-    strcat(outfile, GZ_SUFFIX);
-
-    in = fopen(file, "rb");
-    if (in == NULL) {
-        perror(file);
-        exit(1);
-    }
-    out = gzopen(outfile, mode);
-    if (out == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
-        exit(1);
-    }
-    gz_compress(in, out);
-
-    unlink(file);
-}
-
-
-/* ===========================================================================
- * Uncompress the given file and remove the original.
- */
-void file_uncompress(file)
-    char  *file;
-{
-    local char buf[MAX_NAME_LEN];
-    char *infile, *outfile;
-    FILE  *out;
-    gzFile in;
-    uInt len = (uInt)strlen(file);
-
-    strcpy(buf, file);
-
-    if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) {
-        infile = file;
-        outfile = buf;
-        outfile[len-3] = '\0';
-    } else {
-        outfile = file;
-        infile = buf;
-        strcat(infile, GZ_SUFFIX);
-    }
-    in = gzopen(infile, "rb");
-    if (in == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
-        exit(1);
-    }
-    out = fopen(outfile, "wb");
-    if (out == NULL) {
-        perror(file);
-        exit(1);
-    }
-
-    gz_uncompress(in, out);
-
-    unlink(infile);
-}
-
-
-/* ===========================================================================
- * Usage:  minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...]
- *   -d : decompress
- *   -f : compress with Z_FILTERED
- *   -h : compress with Z_HUFFMAN_ONLY
- *   -r : compress with Z_RLE
- *   -1 to -9 : compression level
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    int uncompr = 0;
-    gzFile file;
-    char outmode[20];
-
-    strcpy(outmode, "wb6 ");
-
-    prog = argv[0];
-    argc--, argv++;
-
-    while (argc > 0) {
-      if (strcmp(*argv, "-d") == 0)
-        uncompr = 1;
-      else if (strcmp(*argv, "-f") == 0)
-        outmode[3] = 'f';
-      else if (strcmp(*argv, "-h") == 0)
-        outmode[3] = 'h';
-      else if (strcmp(*argv, "-r") == 0)
-        outmode[3] = 'R';
-      else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
-               (*argv)[2] == 0)
-        outmode[2] = (*argv)[1];
-      else
-        break;
-      argc--, argv++;
-    }
-    if (outmode[3] == ' ')
-        outmode[3] = 0;
-    if (argc == 0) {
-        SET_BINARY_MODE(stdin);
-        SET_BINARY_MODE(stdout);
-        if (uncompr) {
-            file = gzdopen(fileno(stdin), "rb");
-            if (file == NULL) error("can't gzdopen stdin");
-            gz_uncompress(file, stdout);
-        } else {
-            file = gzdopen(fileno(stdout), outmode);
-            if (file == NULL) error("can't gzdopen stdout");
-            gz_compress(stdin, file);
-        }
-    } else {
-        do {
-            if (uncompr) {
-                file_uncompress(*argv);
-            } else {
-                file_compress(*argv, outmode);
-            }
-        } while (argv++, --argc);
-    }
-    return 0;
-}
diff --git a/libsrc/zlib/msdos/Makefile.bor b/libsrc/zlib/msdos/Makefile.bor
deleted file mode 100644
index 8f8132d..0000000
--- a/libsrc/zlib/msdos/Makefile.bor
+++ /dev/null
@@ -1,109 +0,0 @@
-# Makefile for zlib
-# Borland C++
-# Last updated: 15-Mar-2003
-
-# To use, do "make -fmakefile.bor"
-# To compile in small model, set below: MODEL=s
-
-# WARNING: the small model is supported but only for small values of
-# MAX_WBITS and MAX_MEM_LEVEL. For example:
-#    -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to the LOC macro below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------ Turbo C++, Borland C++ ------------
-
-#    Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-#    should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
-#    to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
-CPU_TYP = 0
-
-# memory model: one of s, m, c, l (small, medium, compact, large)
-MODEL=l
-
-# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version
-CC=bcc
-LD=bcc
-AR=tlib
-
-# compiler flags
-# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0
-CFLAGS=-O2 -Z -m$(MODEL) $(LOC)
-
-LDFLAGS=-m$(MODEL) -f-
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del zlib_*.bak
-	-del foo.gz
diff --git a/libsrc/zlib/msdos/Makefile.dj2 b/libsrc/zlib/msdos/Makefile.dj2
deleted file mode 100644
index 283d1d9..0000000
--- a/libsrc/zlib/msdos/Makefile.dj2
+++ /dev/null
@@ -1,104 +0,0 @@
-# Makefile for zlib.  Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.dj2;  make test -fmakefile.dj2
-#
-# To install libz.a, zconf.h and zlib.h in the djgpp directories, type:
-#
-#    make install -fmakefile.dj2
-#
-# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as
-# in the sample below if the pattern of the DJGPP distribution is to
-# be followed.  Remember that, while <sp>'es around <=> are ignored in
-# makefiles, they are *not* in batch files or in djgpp.env.
-# - - - - -
-# [make]
-# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include
-# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib
-# BUTT=-m486
-# - - - - -
-# Alternately, these variables may be defined below, overriding the values
-# in djgpp.env, as
-# INCLUDE_PATH=c:\usr\include
-# LIBRARY_PATH=c:\usr\lib
-
-CC=gcc
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lz
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=libz.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-check: test
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-libz.a: $(OBJS) $(OBJA)
-	$(AR) $@ $(OBJS) $(OBJA)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
-
-.PHONY : uninstall clean
-
-install: $(INCL) $(LIBS)
-	- at if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH)
-	- at if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH)
-	$(INSTALL) zlib.h $(INCLUDE_PATH)
-	$(INSTALL) zconf.h $(INCLUDE_PATH)
-	$(INSTALL) libz.a $(LIBRARY_PATH)
-
-uninstall:
-	$(RM) $(INCLUDE_PATH)\zlib.h
-	$(RM) $(INCLUDE_PATH)\zconf.h
-	$(RM) $(LIBRARY_PATH)\libz.a
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) libz.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/libsrc/zlib/msdos/Makefile.emx b/libsrc/zlib/msdos/Makefile.emx
deleted file mode 100644
index ed4c31f..0000000
--- a/libsrc/zlib/msdos/Makefile.emx
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.emx;  make test -fmakefile.emx
-#
-
-CC=gcc
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
-	$(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) zlib.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/libsrc/zlib/msdos/Makefile.msc b/libsrc/zlib/msdos/Makefile.msc
deleted file mode 100644
index b8fc665..0000000
--- a/libsrc/zlib/msdos/Makefile.msc
+++ /dev/null
@@ -1,106 +0,0 @@
-# Makefile for zlib
-# Microsoft C 5.1 or later
-# Last updated: 19-Mar-2003
-
-# To use, do "make makefile.msc"
-# To compile in small model, set below: MODEL=S
-
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to the LOC macro below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------- Microsoft C 5.1 and later -------------
-
-#    Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-#    should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
-#    to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
-CPU_TYP = 0
-
-# Memory model: one of S, M, C, L (small, medium, compact, large)
-MODEL=L
-
-CC=cl
-CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC)
-#-Ox generates bad code with MSC 5.1
-LIB_CFLAGS=-Zl $(CFLAGS)
-
-LD=link
-LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode
-# "/farcall/packcode" are only useful for `large code' memory models
-# but should be a "no-op" for small code models.
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-
-
-# targets
-all:  $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(LIB_CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	if exist $(ZLIB_LIB) del $(ZLIB_LIB)
-	lib $(ZLIB_LIB) $(OBJ1);
-	lib $(ZLIB_LIB) $(OBJ2);
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB);
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB);
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del *.map
-	-del zlib_*.bak
-	-del foo.gz
diff --git a/libsrc/zlib/msdos/Makefile.tc b/libsrc/zlib/msdos/Makefile.tc
deleted file mode 100644
index 480750a..0000000
--- a/libsrc/zlib/msdos/Makefile.tc
+++ /dev/null
@@ -1,94 +0,0 @@
-# Makefile for zlib
-# Turbo C 2.01, Turbo C++ 1.01
-# Last updated: 15-Mar-2003
-
-# To use, do "make -fmakefile.tc"
-# To compile in small model, set below: MODEL=s
-
-# WARNING: the small model is supported but only for small values of
-# MAX_WBITS and MAX_MEM_LEVEL. For example:
-#    -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to CFLAGS below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------
-MODEL=l
-CC=tcc
-LD=tcc
-AR=tlib
-# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-CFLAGS=-O2 -G -Z -m$(MODEL)
-LDFLAGS=-m$(MODEL) -f-
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del zlib_*.bak
-	-del foo.gz
diff --git a/libsrc/zlib/old/Makefile.riscos b/libsrc/zlib/old/Makefile.riscos
deleted file mode 100644
index 57e29d3..0000000
--- a/libsrc/zlib/old/Makefile.riscos
+++ /dev/null
@@ -1,151 +0,0 @@
-# Project:   zlib_1_03
-# Patched for zlib 1.1.2 rw at shadow.org.uk 19980430
-# test works out-of-the-box, installs `somewhere' on demand
-
-# Toolflags:
-CCflags = -c -depend !Depend -IC: -g -throwback  -DRISCOS  -fah
-C++flags = -c -depend !Depend -IC: -throwback
-Linkflags = -aif -c++ -o $@
-ObjAsmflags = -throwback -NoCache -depend !Depend
-CMHGflags =
-LibFileflags = -c -l -o $@
-Squeezeflags = -o $@
-
-# change the line below to where _you_ want the library installed.
-libdest = lib:zlib
-
-# Final targets:
- at .lib:   @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \
-        @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \
-        @.o.uncompr @.o.zutil
-        LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \
-        @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \
-        @.o.trees @.o.uncompr @.o.zutil
-test:   @.minigzip @.example @.lib
-	@copy @.lib @.libc  A~C~DF~L~N~P~Q~RS~TV
-	@echo running tests: hang on.
-	@/@.minigzip -f -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -f -1 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -h -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -h -1 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -1 libc
-	@/@.minigzip -d libc-gz
-	@diff @.lib @.libc
-	@echo that should have reported '@.lib and @.libc identical' if you have diff.
-	@/@.example @.fred @.fred
-	@echo that will have given lots of hello!'s.
-
- at .minigzip:   @.o.minigzip @.lib C:o.Stubs
-        Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs
- at .example:   @.o.example @.lib C:o.Stubs
-        Link $(Linkflags) @.o.example @.lib C:o.Stubs
-
-install: @.lib
-	cdir $(libdest)
-	cdir $(libdest).h
-	@copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV
-	@copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV
-	@copy @.lib $(libdest).lib  A~C~DF~L~N~P~Q~RS~TV
-	@echo okay, installed zlib in $(libdest)
-
-clean:; remove @.minigzip
-	remove @.example
-	remove @.libc
-	-wipe @.o.* F~r~cV
-	remove @.fred
-
-# User-editable dependencies:
-.c.o:
-        cc $(ccflags) -o $@ $<
-
-# Static dependencies:
-
-# Dynamic dependencies:
-o.example:	c.example
-o.example:	h.zlib
-o.example:	h.zconf
-o.minigzip:	c.minigzip
-o.minigzip:	h.zlib
-o.minigzip:	h.zconf
-o.adler32:	c.adler32
-o.adler32:	h.zlib
-o.adler32:	h.zconf
-o.compress:	c.compress
-o.compress:	h.zlib
-o.compress:	h.zconf
-o.crc32:	c.crc32
-o.crc32:	h.zlib
-o.crc32:	h.zconf
-o.deflate:	c.deflate
-o.deflate:	h.deflate
-o.deflate:	h.zutil
-o.deflate:	h.zlib
-o.deflate:	h.zconf
-o.gzio:	c.gzio
-o.gzio:	h.zutil
-o.gzio:	h.zlib
-o.gzio:	h.zconf
-o.infblock:	c.infblock
-o.infblock:	h.zutil
-o.infblock:	h.zlib
-o.infblock:	h.zconf
-o.infblock:	h.infblock
-o.infblock:	h.inftrees
-o.infblock:	h.infcodes
-o.infblock:	h.infutil
-o.infcodes:	c.infcodes
-o.infcodes:	h.zutil
-o.infcodes:	h.zlib
-o.infcodes:	h.zconf
-o.infcodes:	h.inftrees
-o.infcodes:	h.infblock
-o.infcodes:	h.infcodes
-o.infcodes:	h.infutil
-o.infcodes:	h.inffast
-o.inffast:	c.inffast
-o.inffast:	h.zutil
-o.inffast:	h.zlib
-o.inffast:	h.zconf
-o.inffast:	h.inftrees
-o.inffast:	h.infblock
-o.inffast:	h.infcodes
-o.inffast:	h.infutil
-o.inffast:	h.inffast
-o.inflate:	c.inflate
-o.inflate:	h.zutil
-o.inflate:	h.zlib
-o.inflate:	h.zconf
-o.inflate:	h.infblock
-o.inftrees:	c.inftrees
-o.inftrees:	h.zutil
-o.inftrees:	h.zlib
-o.inftrees:	h.zconf
-o.inftrees:	h.inftrees
-o.inftrees:	h.inffixed
-o.infutil:	c.infutil
-o.infutil:	h.zutil
-o.infutil:	h.zlib
-o.infutil:	h.zconf
-o.infutil:	h.infblock
-o.infutil:	h.inftrees
-o.infutil:	h.infcodes
-o.infutil:	h.infutil
-o.trees:	c.trees
-o.trees:	h.deflate
-o.trees:	h.zutil
-o.trees:	h.zlib
-o.trees:	h.zconf
-o.trees:	h.trees
-o.uncompr:	c.uncompr
-o.uncompr:	h.zlib
-o.uncompr:	h.zconf
-o.zutil:	c.zutil
-o.zutil:	h.zutil
-o.zutil:	h.zlib
-o.zutil:	h.zconf
diff --git a/libsrc/zlib/old/README b/libsrc/zlib/old/README
deleted file mode 100644
index 800bf07..0000000
--- a/libsrc/zlib/old/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains files that have not been updated for zlib 1.2.x
-
-(Volunteers are encouraged to help clean this up.  Thanks.)
diff --git a/libsrc/zlib/old/descrip.mms b/libsrc/zlib/old/descrip.mms
deleted file mode 100644
index 7066da5..0000000
--- a/libsrc/zlib/old/descrip.mms
+++ /dev/null
@@ -1,48 +0,0 @@
-# descrip.mms: MMS description file for building zlib on VMS
-# written by Martin P.J. Zinser <m.zinser at gsi.de>
-
-cc_defs =
-c_deb =
-
-.ifdef __DECC__
-pref = /prefix=all
-.endif
-
-OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\
-       deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\
-       inftrees.obj, infcodes.obj, infutil.obj, inffast.obj
-
-CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
-
-all : example.exe minigzip.exe
-        @ write sys$output " Example applications available"
-libz.olb : libz.olb($(OBJS))
-	@ write sys$output " libz available"
-
-example.exe : example.obj libz.olb
-              link example,libz.olb/lib
-
-minigzip.exe : minigzip.obj libz.olb
-              link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
-
-clean :
-	delete *.obj;*,libz.olb;*
-
-
-# Other dependencies.
-adler32.obj : zutil.h zlib.h zconf.h
-compress.obj : zlib.h zconf.h
-crc32.obj : zutil.h zlib.h zconf.h
-deflate.obj : deflate.h zutil.h zlib.h zconf.h
-example.obj : zlib.h zconf.h
-gzio.obj : zutil.h zlib.h zconf.h
-infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h
-inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
-inflate.obj : zutil.h zlib.h zconf.h infblock.h
-inftrees.obj : zutil.h zlib.h zconf.h inftrees.h
-infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h
-minigzip.obj : zlib.h zconf.h
-trees.obj : deflate.h zutil.h zlib.h zconf.h
-uncompr.obj : zlib.h zconf.h
-zutil.obj : zutil.h zlib.h zconf.h
diff --git a/libsrc/zlib/old/os2/Makefile.os2 b/libsrc/zlib/old/os2/Makefile.os2
deleted file mode 100644
index a105aaa..0000000
--- a/libsrc/zlib/old/os2/Makefile.os2
+++ /dev/null
@@ -1,136 +0,0 @@
-# Makefile for zlib under OS/2 using GCC (PGCC)
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-#   cp Makefile.os2 ..
-#   cd ..
-#   make -f Makefile.os2 test
-
-# This makefile will build a static library z.lib, a shared library
-# z.dll and a import library zdll.lib. You can use either z.lib or
-# zdll.lib by specifying either -lz or -lzdll on gcc's command line
-
-CC=gcc -Zomf -s
-
-CFLAGS=-O6 -Wall
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-#           -Wstrict-prototypes -Wmissing-prototypes
-
-#################### BUG WARNING: #####################
-## infcodes.c hits a bug in pgcc-1.0, so you have to use either
-## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem)
-## This bug is reportedly fixed in pgcc >1.0, but this was not tested
-CFLAGS+=-fno-force-mem
-
-LDFLAGS=-s -L. -lzdll -Zcrtdll
-LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll
-
-VER=1.1.0
-ZLIB=z.lib
-SHAREDLIB=z.dll
-SHAREDLIBIMP=zdll.lib
-LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
-
-AR=emxomfar cr
-IMPLIB=emximp
-RANLIB=echo
-TAR=tar
-SHELL=bash
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \
-  algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
-  nt/Makefile.nt nt/zlib.dnt  contrib/README.contrib contrib/*.txt \
-  contrib/asm386/*.asm contrib/asm386/*.c \
-  contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \
-  contrib/iostream/*.h  contrib/iostream2/*.h contrib/iostream2/*.cpp \
-  contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32
-
-all: example.exe minigzip.exe
-
-test: all
-	@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
-	echo hello world | ./minigzip | ./minigzip -d || \
-	  echo '		*** minigzip test FAILED ***' ; \
-	if ./example; then \
-	  echo '		*** zlib test OK ***'; \
-	else \
-	  echo '		*** zlib test FAILED ***'; \
-	fi
-
-$(ZLIB): $(OBJS)
-	$(AR) $@ $(OBJS)
-	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-$(SHAREDLIB): $(OBJS) os2/z.def
-	$(LDSHARED) -o $@ $^
-
-$(SHAREDLIBIMP): os2/z.def
-	$(IMPLIB) -o $@ $^
-
-example.exe: example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip.exe: minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-clean:
-	rm -f *.o *~ example minigzip libz.a libz.so* foo.gz
-
-distclean:	clean
-
-zip:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c
-	v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	zip -ul9 zlib$$v $(DISTFILES)
-	mv Makefile~ Makefile
-
-dist:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c
-	d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	rm -f $$d.tar.gz; \
-	if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
-	files=""; \
-	for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
-	cd ..; \
-	GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
-	if test ! -d $$d; then rm -f $$d; fi
-	mv Makefile~ Makefile
-
-tags:
-	etags *.[ch]
-
-depend:
-	makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
-infcodes.o: zutil.h zlib.h zconf.h
-infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h
-inffast.o: infblock.h infcodes.h infutil.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h infblock.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/libsrc/zlib/old/os2/zlib.def b/libsrc/zlib/old/os2/zlib.def
deleted file mode 100644
index 4c753f1..0000000
--- a/libsrc/zlib/old/os2/zlib.def
+++ /dev/null
@@ -1,51 +0,0 @@
-;
-; Slightly modified version of ../nt/zlib.dnt :-)
-;
-
-LIBRARY		Z
-DESCRIPTION	"Zlib compression library for OS/2"
-CODE		PRELOAD MOVEABLE DISCARDABLE
-DATA		PRELOAD MOVEABLE MULTIPLE
-
-EXPORTS
-    adler32
-    compress
-    crc32
-    deflate
-    deflateCopy
-    deflateEnd
-    deflateInit2_
-    deflateInit_
-    deflateParams
-    deflateReset
-    deflateSetDictionary
-    gzclose
-    gzdopen
-    gzerror
-    gzflush
-    gzopen
-    gzread
-    gzwrite
-    inflate
-    inflateEnd
-    inflateInit2_
-    inflateInit_
-    inflateReset
-    inflateSetDictionary
-    inflateSync
-    uncompress
-    zlibVersion
-    gzprintf
-    gzputc
-    gzgetc
-    gzseek
-    gzrewind
-    gztell
-    gzeof
-    gzsetparams
-    zError
-    inflateSyncPoint
-    get_crc_table
-    compress2
-    gzputs
-    gzgets
diff --git a/libsrc/zlib/old/visual-basic.txt b/libsrc/zlib/old/visual-basic.txt
deleted file mode 100644
index 57efe58..0000000
--- a/libsrc/zlib/old/visual-basic.txt
+++ /dev/null
@@ -1,160 +0,0 @@
-See below some functions declarations for Visual Basic.
-
-Frequently Asked Question:
-
-Q: Each time I use the compress function I get the -5 error (not enough
-   room in the output buffer).
-
-A: Make sure that the length of the compressed buffer is passed by
-   reference ("as any"), not by value ("as long"). Also check that
-   before the call of compress this length is equal to the total size of
-   the compressed buffer and not zero.
-
-
-From: "Jon Caruana" <jon-net at usa.net>
-Subject: Re: How to port zlib declares to vb?
-Date: Mon, 28 Oct 1996 18:33:03 -0600
-
-Got the answer! (I haven't had time to check this but it's what I got, and
-looks correct):
-
-He has the following routines working:
-        compress
-        uncompress
-        gzopen
-        gzwrite
-        gzread
-        gzclose
-
-Declares follow: (Quoted from Carlos Rios <c_rios at sonda.cl>, in Vb4 form)
-
-#If Win16 Then   'Use Win16 calls.
-Declare Function compress Lib "ZLIB.DLL" (ByVal compr As
-        String, comprLen As Any, ByVal buf As String, ByVal buflen
-        As Long) As Integer
-Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr
-        As String, uncomprLen As Any, ByVal compr As String, ByVal
-        lcompr As Long) As Integer
-Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As
-        String, ByVal mode As String) As Long
-Declare Function gzread Lib "ZLIB.DLL" (ByVal file As
-        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
-        As Integer
-Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As
-        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
-        As Integer
-Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As
-        Long) As Integer
-#Else
-Declare Function compress Lib "ZLIB32.DLL"
-        (ByVal compr As String, comprLen As Any, ByVal buf As
-        String, ByVal buflen As Long) As Integer
-Declare Function uncompress Lib "ZLIB32.DLL"
-        (ByVal uncompr As String, uncomprLen As Any, ByVal compr As
-        String, ByVal lcompr As Long) As Long
-Declare Function gzopen Lib "ZLIB32.DLL"
-        (ByVal file As String, ByVal mode As String) As Long
-Declare Function gzread Lib "ZLIB32.DLL"
-        (ByVal file As Long, ByVal uncompr As String, ByVal
-        uncomprLen As Long) As Long
-Declare Function gzwrite Lib "ZLIB32.DLL"
-        (ByVal file As Long, ByVal uncompr As String, ByVal
-        uncomprLen As Long) As Long
-Declare Function gzclose Lib "ZLIB32.DLL"
-        (ByVal file As Long) As Long
-#End If
-
--Jon Caruana
-jon-net at usa.net
-Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member
-
-
-Here is another example from Michael <michael_borgsys at hotmail.com> that he
-says conforms to the VB guidelines, and that solves the problem of not
-knowing the uncompressed size by storing it at the end of the file:
-
-'Calling the functions:
-'bracket meaning: <parameter> [optional] {Range of possible values}
-'Call subCompressFile(<path with filename to compress> [, <path with
-filename to write to>, [level of compression {1..9}]])
-'Call subUncompressFile(<path with filename to compress>)
-
-Option Explicit
-Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller'
-Private Const SUCCESS As Long = 0
-Private Const strFilExt As String = ".cpr"
-Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef
-dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long,
-ByVal level As Integer) As Long
-Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef
-dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long)
-As Long
-
-Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal
-strargCprFilPth As String, Optional ByVal intLvl As Integer = 9)
-    Dim strCprPth As String
-    Dim lngOriSiz As Long
-    Dim lngCprSiz As Long
-    Dim bytaryOri() As Byte
-    Dim bytaryCpr() As Byte
-    lngOriSiz = FileLen(strargOriFilPth)
-    ReDim bytaryOri(lngOriSiz - 1)
-    Open strargOriFilPth For Binary Access Read As #1
-        Get #1, , bytaryOri()
-    Close #1
-    strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth)
-'Select file path and name
-    strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) =
-strFilExt, "", strFilExt) 'Add file extension if not exists
-    lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit
-more space then original file size
-    ReDim bytaryCpr(lngCprSiz - 1)
-    If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) =
-SUCCESS Then
-        lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100
-        ReDim Preserve bytaryCpr(lngCprSiz - 1)
-        Open strCprPth For Binary Access Write As #1
-            Put #1, , bytaryCpr()
-            Put #1, , lngOriSiz 'Add the the original size value to the end
-(last 4 bytes)
-        Close #1
-    Else
-        MsgBox "Compression error"
-    End If
-    Erase bytaryCpr
-    Erase bytaryOri
-End Sub
-
-Public Sub subUncompressFile(ByVal strargFilPth As String)
-    Dim bytaryCpr() As Byte
-    Dim bytaryOri() As Byte
-    Dim lngOriSiz As Long
-    Dim lngCprSiz As Long
-    Dim strOriPth As String
-    lngCprSiz = FileLen(strargFilPth)
-    ReDim bytaryCpr(lngCprSiz - 1)
-    Open strargFilPth For Binary Access Read As #1
-        Get #1, , bytaryCpr()
-    Close #1
-    'Read the original file size value:
-    lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _
-              + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _
-              + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _
-              + bytaryCpr(lngCprSiz - 4)
-    ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value
-    ReDim bytaryOri(lngOriSiz - 1)
-    If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS
-Then
-        strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt))
-        Open strOriPth For Binary Access Write As #1
-            Put #1, , bytaryOri()
-        Close #1
-    Else
-        MsgBox "Uncompression error"
-    End If
-    Erase bytaryCpr
-    Erase bytaryOri
-End Sub
-Public Property Get lngPercentSmaller() As Long
-    lngPercentSmaller = lngpvtPcnSml
-End Property
diff --git a/libsrc/zlib/old/zlib.html b/libsrc/zlib/old/zlib.html
deleted file mode 100644
index 8c1b190..0000000
--- a/libsrc/zlib/old/zlib.html
+++ /dev/null
@@ -1,971 +0,0 @@
-<html>
-<head>
- <title>
- zlib general purpose compression library version 1.1.4
- </title>
-</head>
-<body bgcolor="White" text="Black" vlink="Red" alink="Navy" link="Red">
-<!-- background="zlibbg.gif" -->
-
-<h1> zlib 1.1.4 Manual </h1>
-<hr>
-<a name="Contents"><h2>Contents</h2>
-<ol type="I">
-<li> <a href="#Prologue">Prologue</a>
-<li> <a href="#Introduction">Introduction</a>
-<li> <a href="#Utility functions">Utility functions</a>
-<li> <a href="#Basic functions">Basic functions</a>
-<li> <a href="#Advanced functions">Advanced functions</a>
-<li> <a href="#Constants">Constants</a>
-<li> <a href="#struct z_stream_s">struct z_stream_s</a>
-<li> <a href="#Checksum functions">Checksum functions</a>
-<li> <a href="#Misc">Misc</a>
-</ol>
-<hr>
-<a name="Prologue"><h2> Prologue </h2>
-  'zlib' general purpose compression library version 1.1.4, March 11th, 2002
-  <p>
-  Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
-  <p>
-  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.
-  <p>
-  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:
-  <ol>
-   <li> 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.
-   <li> Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-   <li> This notice may not be removed or altered from any source distribution.
-  </ol>
-
-  <dl>
-  <dt>Jean-loup Gailly
-  <dd><a href="mailto:jloup at gzip.org">jloup at gzip.org</a>
-  <dt>Mark Adler
-  <dd><a href="mailto:madler at alumni.caltech.edu">madler at alumni.caltech.edu</a>
-  </dl>
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files
-  <a href="ftp://ds.internic.net/rfc/rfc1950.txt">
-  ftp://ds.internic.net/rfc/rfc1950.txt </a>
-  (zlib format),
-  <a href="ftp://ds.internic.net/rfc/rfc1951.txt">
-  rfc1951.txt </a>
-  (<a href="#deflate">deflate</a> format) and
-  <a href="ftp://ds.internic.net/rfc/rfc1952.txt">
-  rfc1952.txt </a>
-  (gzip format).
-  <p>
-  This manual is converted from zlib.h by
-  <a href="mailto:piaip at csie.ntu.edu.tw"> piaip </a>
-  <p>
-  Visit <a href="http://ftp.cdrom.com/pub/infozip/zlib/">
-  http://ftp.cdrom.com/pub/infozip/zlib/</a>
-  for the official zlib web page.
-  <p>
-
-<hr>
-<a name="Introduction"><h2> Introduction </h2>
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-  <p>
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-  <p>
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio.
-  <p>
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-  <p>
-
-<hr>
-<a name="Utility functions"><h2> Utility functions </h2>
-     The following utility functions are implemented on top of the
-   <a href="#Basic functions">basic stream-oriented functions</a>.
-   To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-<h3> Function list </h3>
-<ul>
-<li> int  <a href="#compress">compress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);
-<li> int  <a href="#compress2">compress2</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen, int level);
-<li> int  <a href="#uncompress">uncompress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);
-<li> typedef voidp gzFile;
-<li>  gzFile  <a href="#gzopen">gzopen</a>  (const char *path, const char *mode);
-<li> gzFile  <a href="#gzdopen">gzdopen</a>  (int fd, const char *mode);
-<li> int  <a href="#gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);
-<li> int     <a href="#gzread">gzread</a>  (gzFile file, voidp buf, unsigned len);
-<li> int     <a href="#gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);
-<li> int VA   <a href="#gzprintf">gzprintf</a> (gzFile file, const char *format, ...);
-<li> int  <a href="#gzputs">gzputs</a> (gzFile file, const char *s);
-<li> char *  <a href="#gzgets">gzgets</a> (gzFile file, char *buf, int len);
-<li> int     <a href="#gzputc">gzputc</a> (gzFile file, int c);
-<li> int     <a href="#gzgetc">gzgetc</a> (gzFile file);
-<li> int     <a href="#gzflush">gzflush</a> (gzFile file, int flush);
-<li> z_off_t     <a href="#gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);
-<li> z_off_t     <a href="#gztell">gztell</a> (gzFile file);
-<li> int     <a href="#gzrewind">gzrewind</a> (gzFile file);
-<li> int  <a href="#gzeof">gzeof</a> (gzFile file);
-<li> int     <a href="#gzclose">gzclose</a> (gzFile file);
-<li> const char *  <a href="#gzerror">gzerror</a> (gzFile file, int *errnum);
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt> int  <a name="compress">compress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
-<dd>
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least 0.1% larger than
-   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-   compressed buffer.<p>
-     This function can be used to <a href="#compress">compress</a> a whole file at once if the
-   input file is mmap'ed.<p>
-     <a href="#compress">compress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
-   buffer.<p>
-
-<font color="Blue"><dt> int  <a name="compress2">compress2</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen, int level);</font>
-<dd>
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in <a href="#deflateInit">deflateInit</a>.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-   <p>
-
-     <a href="#compress2">compress2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output buffer,
-   <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the level parameter is invalid.
-   <p>
-
-<font color="Blue"><dt> int  <a name="uncompress">uncompress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
-<dd>
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer. <p>
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-   <p>
-
-     <a href="#uncompress">uncompress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
-   buffer, or <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was corrupted.
-   <p>
-
-<dt> typedef voidp gzFile;
-<dd> <p>
-
-<font color="Blue"><dt>  gzFile  <a name="gzopen">gzopen</a>  (const char *path, const char *mode);</font>
-<dd>
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h". (See the description
-   of <a href="#deflateInit2">deflateInit2</a> for more information about the strategy parameter.)
-   <p>
-
-     <a href="#gzopen">gzopen</a> can be used to read a file which is not in gzip format ; in this
-   case <a href="#gzread">gzread</a> will directly read from the file without decompression.
-   <p>
-
-     <a href="#gzopen">gzopen</a> returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression <a href="#state">state</a> ; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a>).
-   <p>
-
-<font color="Blue"><dt> gzFile  <a name="gzdopen">gzdopen</a>  (int fd, const char *mode);</font>
-<dd>
-     <a href="#gzdopen">gzdopen</a>() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in <a href="#gzopen">gzopen</a>.
-   <p>
-     The next call of <a href="#gzclose">gzclose</a> on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use <a href="#gzdopen">gzdopen</a>(dup(fd), mode).
-   <p>
-     <a href="#gzdopen">gzdopen</a> returns NULL if there was insufficient memory to allocate
-   the (de)compression <a href="#state">state</a>.
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);</font>
-<dd>
-     Dynamically update the compression level or strategy. See the description
-   of <a href="#deflateInit2">deflateInit2</a> for the meaning of these parameters.
-   <p>
-     <a href="#gzsetparams">gzsetparams</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the file was not
-   opened for writing.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzread">gzread</a>  (gzFile file, voidp buf, unsigned len);</font>
-<dd>
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, <a href="#gzread">gzread</a> copies the given number
-   of bytes into the buffer.
-   <p>
-     <a href="#gzread">gzread</a> returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error).
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);</font>
-<dd>
-     Writes the given number of uncompressed bytes into the compressed file.
-   <a href="#gzwrite">gzwrite</a> returns the number of uncompressed bytes actually written
-   (0 in case of error).
-   <p>
-
-<font color="Blue"><dt> int VA   <a name="gzprintf">gzprintf</a> (gzFile file, const char *format, ...);</font>
-<dd>
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. <a href="#gzprintf">gzprintf</a> returns the number of
-   uncompressed bytes actually written (0 in case of error).
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzputs">gzputs</a> (gzFile file, const char *s);</font>
-<dd>
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-   <p>
-      <a href="#gzputs">gzputs</a> returns the number of characters written, or -1 in case of error.
-      <p>
-
-<font color="Blue"><dt> char *  <a name="gzgets">gzgets</a> (gzFile file, char *buf, int len);</font>
-<dd>
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-   <p>
-      <a href="#gzgets">gzgets</a> returns buf, or <a href="#Z_NULL">Z_NULL</a> in case of error.
-      <p>
-
-<font color="Blue"><dt> int     <a name="gzputc">gzputc</a> (gzFile file, int c);</font>
-<dd>
-      Writes c, converted to an unsigned char, into the compressed file.
-   <a href="#gzputc">gzputc</a> returns the value that was written, or -1 in case of error.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzgetc">gzgetc</a> (gzFile file);</font>
-<dd>
-      Reads one byte from the compressed file. <a href="#gzgetc">gzgetc</a> returns this byte
-   or -1 in case of end of file or error.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzflush">gzflush</a> (gzFile file, int flush);</font>
-<dd>
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the <a href="#deflate">deflate</a>() function. The return value is the zlib
-   error number (see function <a href="#gzerror">gzerror</a> below). <a href="#gzflush">gzflush</a> returns <a href="#Z_OK">Z_OK</a> if
-   the flush parameter is <a href="#Z_FINISH">Z_FINISH</a> and all output could be flushed.
-   <p>
-     <a href="#gzflush">gzflush</a> should be called only when strictly necessary because it can
-   degrade compression.
-   <p>
-
-<font color="Blue"><dt> z_off_t     <a name="gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);</font>
-<dd>
-      Sets the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-   <p>
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported ; <a href="#gzseek">gzseek</a> then compresses a sequence of zeroes up to the new
-   starting position.
-   <p>
-      <a href="#gzseek">gzseek</a> returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzrewind">gzrewind</a> (gzFile file);</font>
-<dd>
-     Rewinds the given file. This function is supported only for reading.
-     <p>
-   <a href="#gzrewind">gzrewind</a>(file) is equivalent to (int)<a href="#gzseek">gzseek</a>(file, 0L, SEEK_SET)
-   <p>
-
-<font color="Blue"><dt> z_off_t     <a name="gztell">gztell</a> (gzFile file);</font>
-<dd>
-     Returns the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-   <p>
-
-   <a href="#gztell">gztell</a>(file) is equivalent to <a href="#gzseek">gzseek</a>(file, 0L, SEEK_CUR)
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzeof">gzeof</a> (gzFile file);</font>
-<dd>
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzclose">gzclose</a> (gzFile file);</font>
-<dd>
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression <a href="#state">state</a>. The return value is the zlib
-   error number (see function <a href="#gzerror">gzerror</a> below).
-   <p>
-
-<font color="Blue"><dt> const char *  <a name="gzerror">gzerror</a> (gzFile file, int *errnum);</font>
-<dd>
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to <a href="#Z_ERRNO">Z_ERRNO</a> and the application may consult errno
-   to get the exact error code.
-   <p>
-</dl>
-<hr>
-<a name="Basic functions"><h2> Basic functions </h2>
-<h3> Function list </h3>
-<ul>
-<li>  const char *  <a href="#zlibVersion">zlibVersion</a> (void);
-<li>  int  <a href="#deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);
-<li>  int  <a href="#deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
-<li>  int  <a href="#deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li>  int  <a href="#inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li>  int  <a href="#inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
-<li>  int  <a href="#inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
-</ul>
-
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt>  const char *  <a name="zlibVersion">zlibVersion</a> (void);</font>
-<dd> The application can compare <a href="#zlibVersion">zlibVersion</a> and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a>.
-   <p>
-
-<font color="Blue"><dt> int  <a name="deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);</font>
-<dd>
-     Initializes the internal stream <a href="#state">state</a> for compression. The fields
-   <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by the caller.
-   If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#deflateInit">deflateInit</a> updates them to
-   use default allocation functions.
-   <p>
-
-     The compression level must be <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   <p>
-
-   <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a> requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-   <p>
-
-     <a href="#deflateInit">deflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if level is not a valid compression level,
-   <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version (<a href="#zlib_version">zlib_version</a>) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#deflateInit">deflateInit</a> does not
-   perform any compression: this will be done by <a href="#deflate">deflate</a>().
-   <p>
-
-<font color="Blue"><dt>  int  <a name="deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
-<dd>
-    <a href="#deflate">deflate</a> compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.<p>
-
-    The detailed semantics are as follows. <a href="#deflate">deflate</a> performs one or both of the
-  following actions:
-
-  <ul>
-  <li> Compress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> are updated and
-    processing will resume at this point for the next call of <a href="#deflate">deflate</a>().
-
-  <li>
-    Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a>
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-  </ul> <p>
-
-  Before the call of <a href="#deflate">deflate</a>(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> accordingly ; <a href="#avail_out">avail_out</a>
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (<a href="#avail_out">avail_out</a> == 0), or after each call of <a href="#deflate">deflate</a>(). If <a href="#deflate">deflate</a> returns <a href="#Z_OK">Z_OK</a>
-  and with zero <a href="#avail_out">avail_out</a>, it must be called again after making room in the
-  output buffer because there might be more output pending.
-  <p>
-
-    If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  <a href="#avail_in">avail_in</a> is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-  <p>
-
-    If flush is set to <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>, all output is flushed as with
-  <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, and the compression <a href="#state">state</a> is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a> too often can seriously degrade
-  the compression.
-  <p>
-
-    If <a href="#deflate">deflate</a> returns with <a href="#avail_out">avail_out</a> == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  <a href="#avail_out">avail_out</a>), until the flush is complete (<a href="#deflate">deflate</a> returns with non-zero
-  <a href="#avail_out">avail_out</a>).
-  <p>
-
-    If the parameter flush is set to <a href="#Z_FINISH">Z_FINISH</a>, pending input is processed,
-  pending output is flushed and <a href="#deflate">deflate</a> returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> if there
-  was enough output space ; if <a href="#deflate">deflate</a> returns with <a href="#Z_OK">Z_OK</a>, this function must be
-  called again with <a href="#Z_FINISH">Z_FINISH</a> and more output space (updated <a href="#avail_out">avail_out</a>) but no
-  more input data, until it returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> or an error. After
-  <a href="#deflate">deflate</a> has returned <a href="#Z_STREAM_END">Z_STREAM_END</a>, the only possible operations on the
-  stream are <a href="#deflateReset">deflateReset</a> or <a href="#deflateEnd">deflateEnd</a>.
-  <p>
-
-    <a href="#Z_FINISH">Z_FINISH</a> can be used immediately after <a href="#deflateInit">deflateInit</a> if all the compression
-  is to be done in a single step. In this case, <a href="#avail_out">avail_out</a> must be at least
-  0.1% larger than <a href="#avail_in">avail_in</a> plus 12 bytes.  If <a href="#deflate">deflate</a> does not return
-  <a href="#Z_STREAM_END">Z_STREAM_END</a>, then it must be called again as described above.
-  <p>
-
-    <a href="#deflate">deflate</a>() sets strm-&gt <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all input read
-  so far (that is, <a href="#total_in">total_in</a> bytes).
-  <p>
-
-    <a href="#deflate">deflate</a>() may update <a href="#data_type">data_type</a> if it can make a good guess about
-  the input data type (<a href="#Z_ASCII">Z_ASCII</a> or <a href="#Z_BINARY">Z_BINARY</a>). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-  <p>
-
-    <a href="#deflate">deflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input
-  processed or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if all input has been
-  consumed and all output has been produced (only when flush is set to
-  <a href="#Z_FINISH">Z_FINISH</a>), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a> was inconsistent (for example
-  if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible
-  (for example <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> was zero).
-  <p>
-
-<font color="Blue"><dt>  int  <a name="deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-   <p>
-
-     <a href="#deflateEnd">deflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the
-   stream <a href="#state">state</a> was inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   <a href="#msg">msg</a> may be set but then points to a static string (which must not be
-   deallocated).
-   <p>
-
-<font color="Blue"><dt>  int  <a name="inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-	Initializes the internal stream <a href="#state">state</a> for decompression. The fields
-   <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
-   the caller. If <a href="#next_in">next_in</a> is not <a href="#Z_NULL">Z_NULL</a> and <a href="#avail_in">avail_in</a> is large enough (the exact
-   value depends on the compression method), <a href="#inflateInit">inflateInit</a> determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly ; otherwise the allocation will be deferred to the first call of
-   <a href="#inflate">inflate</a>.  If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#inflateInit">inflateInit</a> updates them to
-   use default allocation functions.
-   <p>
-
-     <a href="#inflateInit">inflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version is incompatible with the
-   version assumed by the caller.  <a href="#msg">msg</a> is set to null if there is no error
-   message. <a href="#inflateInit">inflateInit</a> does not perform any decompression apart from reading
-   the zlib header if present: this will be done by <a href="#inflate">inflate</a>().  (So <a href="#next_in">next_in</a> and
-   <a href="#avail_in">avail_in</a> may be modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)
-   <p>
-
-<font color="Blue"><dt>  int  <a name="inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
-<dd>
-    <a href="#inflate">inflate</a> decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may some
-  introduce some output latency (reading input without producing any output)
-  except when forced to flush.
-  <p>
-
-  The detailed semantics are as follows. <a href="#inflate">inflate</a> performs one or both of the
-  following actions:
-
-  <ul>
-  <li> Decompress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), <a href="#next_in">next_in</a> is updated and processing
-    will resume at this point for the next call of <a href="#inflate">inflate</a>().
-
-  <li> Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and
-    <a href="#avail_out">avail_out</a> accordingly.  <a href="#inflate">inflate</a>() provides as much output as possible,
-    until there is no more input data or no more space in the output buffer
-    (see below about the flush parameter).
-  </ul> <p>
-
-  Before the call of <a href="#inflate">inflate</a>(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (<a href="#avail_out">avail_out</a> == 0), or after each
-  call of <a href="#inflate">inflate</a>(). If <a href="#inflate">inflate</a> returns <a href="#Z_OK">Z_OK</a> and with zero <a href="#avail_out">avail_out</a>, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-  <p>
-
-    If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, <a href="#inflate">inflate</a> flushes as much
-  output as possible to the output buffer. The flushing behavior of <a href="#inflate">inflate</a> is
-  not specified for values of the flush parameter other than <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>
-  and <a href="#Z_FINISH">Z_FINISH</a>, but the current implementation actually flushes as much output
-  as possible anyway.
-  <p>
-
-    <a href="#inflate">inflate</a>() should normally be called until it returns <a href="#Z_STREAM_END">Z_STREAM_END</a> or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of <a href="#inflate">inflate</a>), the parameter flush should be set to
-  <a href="#Z_FINISH">Z_FINISH</a>. In this case all pending input is processed and all pending
-  output is flushed ; <a href="#avail_out">avail_out</a> must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be <a href="#inflateEnd">inflateEnd</a> to deallocate the decompression <a href="#state">state</a>. The use of <a href="#Z_FINISH">Z_FINISH</a>
-  is never required, but can be used to inform <a href="#inflate">inflate</a> that a faster routine
-  may be used for the single <a href="#inflate">inflate</a>() call.
-  <p>
-
-     If a preset dictionary is needed at this point (see <a href="#inflateSetDictionary">inflateSetDictionary</a>
-  below), <a href="#inflate">inflate</a> sets strm-<a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of the
-  dictionary chosen by the compressor and returns <a href="#Z_NEED_DICT">Z_NEED_DICT</a> ; otherwise
-  it sets strm-&gt <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all output produced
-  so far (that is, <a href="#total_out">total_out</a> bytes) and returns <a href="#Z_OK">Z_OK</a>, <a href="#Z_STREAM_END">Z_STREAM_END</a> or
-  an error code as described below. At the end of the stream, <a href="#inflate">inflate</a>()
-  checks that its computed <a href="#adler32">adler32</a> checksum is equal to that saved by the
-  compressor and returns <a href="#Z_STREAM_END">Z_STREAM_END</a> only if the checksum is correct.
-  <p>
-
-    <a href="#inflate">inflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input processed
-  or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if the end of the compressed data has
-  been reached and all uncompressed output has been produced, <a href="#Z_NEED_DICT">Z_NEED_DICT</a> if a
-  preset dictionary is needed at this point, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect
-  <a href="#adler32">adler32</a> checksum), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent
-  (for example if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-  enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible or if there was not
-  enough room in the output buffer when <a href="#Z_FINISH">Z_FINISH</a> is used. In the <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a>
-  case, the application may then call <a href="#inflateSync">inflateSync</a> to look for a good
-  compression block.
-  <p>
-
-<font color="Blue"><dt>  int  <a name="inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-   <p>
-
-     <a href="#inflateEnd">inflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a>
-   was inconsistent. In the error case, <a href="#msg">msg</a> may be set but then points to a
-   static string (which must not be deallocated).
-</dl>
-<hr>
-<a name="Advanced functions"><h2> Advanced functions </h2>
-    The following functions are needed only in some special applications.
-<h3> Function list </h3>
-<ul>
-<li>  int  <a href="#deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm,
-<li> int  <a href="#deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);
-<li> int  <a href="#deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);
-<li> int  <a href="#deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li> int  <a href="#deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);
-<li> int  <a href="#inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  windowBits);
-<li>  int  <a href="#inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);
-<li> int  <a href="#inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li> int  <a href="#inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
-
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt>  int  <a name="deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  level, int  method, int  windowBits, int  memLevel, int  strategy);</font>
-
-<dd> This is another version of <a href="#deflateInit">deflateInit</a> with more compression options. The
-   fields <a href="#next_in">next_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
-   the caller.<p>
-
-     The method parameter is the compression method. It must be <a href="#Z_DEFLATED">Z_DEFLATED</a> in
-   this version of the library.<p>
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   <a href="#deflateInit">deflateInit</a> is used instead.<p>
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression <a href="#state">state</a>. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio ; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.<p>
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value <a href="#Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a> for normal data, <a href="#Z_FILTERED">Z_FILTERED</a> for data produced by a
-   filter (or predictor), or <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a> to force Huffman encoding only (no
-   string match).  Filtered data consists mostly of small values with a
-   somewhat random distribution. In this case, the compression algorithm is
-   tuned to <a href="#compress">compress</a> them better. The effect of <a href="#Z_FILTERED">Z_FILTERED</a> is to force more
-   Huffman coding and less string matching ; it is somewhat intermediate
-   between Z_DEFAULT and <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>. The strategy parameter only affects
-   the compression ratio but not the correctness of the compressed output even
-   if it is not set appropriately.<p>
-
-      <a href="#deflateInit2">deflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as an invalid
-   method). <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#deflateInit2">deflateInit2</a> does
-   not perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);</font>
-<dd>
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after <a href="#deflateInit">deflateInit</a>, <a href="#deflateInit2">deflateInit2</a> or <a href="#deflateReset">deflateReset</a>, before any
-   call of <a href="#deflate">deflate</a>. The compressor and decompressor must use exactly the same
-   dictionary (see <a href="#inflateSetDictionary">inflateSetDictionary</a>).<p>
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy ; the data can then be compressed better than
-   with the default empty dictionary.<p>
-
-     Depending on the size of the compression data structures selected by
-   <a href="#deflateInit">deflateInit</a> or <a href="#deflateInit2">deflateInit2</a>, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   <a href="#deflate">deflate</a> or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front.<p>
-
-     Upon return of this function, strm-&gt <a href="#adler">adler</a> is set to the Adler32 value
-   of the dictionary ; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The Adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.)<p>
-
-     <a href="#deflateSetDictionary">deflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
-   parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
-   inconsistent (for example if <a href="#deflate">deflate</a> has already been called for this stream
-   or if the compression method is bsort). <a href="#deflateSetDictionary">deflateSetDictionary</a> does not
-   perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);</font>
-<dd>
-     Sets the destination stream as a complete copy of the source stream.<p>
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling <a href="#deflateEnd">deflateEnd</a>.  Note that <a href="#deflateCopy">deflateCopy</a> duplicates the internal
-   compression <a href="#state">state</a> which can be quite large, so this strategy is slow and
-   can consume lots of memory.<p>
-
-     <a href="#deflateCopy">deflateCopy</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source stream <a href="#state">state</a> was inconsistent
-   (such as <a href="#zalloc">zalloc</a> being NULL). <a href="#msg">msg</a> is left unchanged in both source and
-   destination.<p>
-
-<font color="Blue"><dt> int  <a name="deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>     This function is equivalent to <a href="#deflateEnd">deflateEnd</a> followed by <a href="#deflateInit">deflateInit</a>,
-   but does not free and reallocate all the internal compression <a href="#state">state</a>.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by <a href="#deflateInit2">deflateInit2</a>.<p>
-
-      <a href="#deflateReset">deflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).<p>
-
-<font color="Blue"><dt> int  <a name="deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);</font>
-<dd>
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in <a href="#deflateInit2">deflateInit2</a>.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of <a href="#deflate">deflate</a>().<p>
-
-     Before the call of <a href="#deflateParams">deflateParams</a>, the stream <a href="#state">state</a> must be set as for
-   a call of <a href="#deflate">deflate</a>(), since the currently available input may have to
-   be compressed and flushed. In particular, strm-&gt <a href="#avail_out">avail_out</a> must be
-   non-zero.<p>
-
-     <a href="#deflateParams">deflateParams</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent or if a parameter was invalid, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
-   if strm-&gtavail_out was zero.<p>
-
-<font color="Blue"><dt> int  <a name="inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  windowBits);</font>
-
-<dd>     This is another version of <a href="#inflateInit">inflateInit</a> with an extra parameter. The
-   fields <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized
-   before by the caller.<p>
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if <a href="#inflateInit">inflateInit</a> is used
-   instead. If a compressed stream with a larger window size is given as
-   input, <a href="#inflate">inflate</a>() will return with the error code <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> instead of
-   trying to allocate a larger window.<p>
-
-      <a href="#inflateInit2">inflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as a negative
-   memLevel). <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#inflateInit2">inflateInit2</a>
-   does not perform any decompression apart from reading the zlib header if
-   present: this will be done by <a href="#inflate">inflate</a>(). (So <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> may be
-   modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)<p>
-
-<font color="Blue"><dt>  int  <a name="inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);</font>
-<dd>
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of <a href="#inflate">inflate</a>
-   if this call returned <a href="#Z_NEED_DICT">Z_NEED_DICT</a>. The dictionary chosen by the compressor
-   can be determined from the Adler32 value returned by this call of
-   <a href="#inflate">inflate</a>. The compressor and decompressor must use exactly the same
-   dictionary (see <a href="#deflateSetDictionary">deflateSetDictionary</a>).<p>
-
-     <a href="#inflateSetDictionary">inflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
-   parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
-   inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the given dictionary doesn't match the
-   expected one (incorrect Adler32 value). <a href="#inflateSetDictionary">inflateSetDictionary</a> does not
-   perform any decompression: this will be done by subsequent calls of
-   <a href="#inflate">inflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-
-<dd>    Skips invalid compressed data until a full flush point (see above the
-  description of <a href="#deflate">deflate</a> with <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>) can be found, or until all
-  available input is skipped. No output is provided.<p>
-
-    <a href="#inflateSync">inflateSync</a> returns <a href="#Z_OK">Z_OK</a> if a full flush point has been found, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
-  if no more input was provided, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if no flush point has been found,
-  or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of <a href="#total_in">total_in</a> which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call <a href="#inflateSync">inflateSync</a>, providing more input each time,
-  until success or end of the input data.<p>
-
-<font color="Blue"><dt> int  <a name="inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     This function is equivalent to <a href="#inflateEnd">inflateEnd</a> followed by <a href="#inflateInit">inflateInit</a>,
-   but does not free and reallocate all the internal decompression <a href="#state">state</a>.
-   The stream will keep attributes that may have been set by <a href="#inflateInit2">inflateInit2</a>.
-   <p>
-
-      <a href="#inflateReset">inflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).
-   <p>
-</dl>
-
-<hr>
-<a name="Checksum functions"><h2> Checksum functions </h2>
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-<h3> Function list </h3>
-<ul>
-<li> uLong  <a href="#adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);
-<li> uLong  <a href="#crc32">crc32</a>   (uLong crc, const Bytef *buf, uInt len);
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt> uLong  <a name="adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);</font>
-<dd>
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   <p>
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-   <pre>
-
-     uLong <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(<a href="#adler">adler</a>, buffer, length);
-     }
-     if (<a href="#adler">adler</a> != original_adler) error();
-   </pre>
-
-<font color="Blue"><dt> uLong  <a name="crc32">crc32</a>   (uLong crc, const Bytef *buf, uInt len);</font>
-<dd>
-     Update a running crc with the bytes buf[0..len-1] and return the updated
-   crc. If buf is NULL, this function returns the required initial value
-   for the crc. Pre- and post-conditioning (one's complement) is performed
-   within this function so it shouldn't be done by the application.
-   Usage example:
-   <pre>
-
-     uLong crc = <a href="#crc32">crc32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = <a href="#crc32">crc32</a>(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-   </pre>
-</dl>
-<hr>
-<a name="struct z_stream_s"><h2> struct z_stream_s </h2>
-<font color="Blue">
-<a name="z_stream_s">
-<pre>
-typedef struct z_stream_s {
-    Bytef    *<a name="next_in">next_in</a>;  /* next input byte */
-    uInt     <a name="avail_in">avail_in</a>;  /* number of bytes available at <a href="#next_in">next_in</a> */
-    uLong    <a name="total_in">total_in</a>;  /* total nb of input bytes read so far */
-
-    Bytef    *<a name="next_out">next_out</a>; /* next output byte should be put there */
-    uInt     <a name="avail_out">avail_out</a>; /* remaining free space at <a href="#next_out">next_out</a> */
-    uLong    <a name="total_out">total_out</a>; /* total nb of bytes output so far */
-
-    char     *<a name="msg">msg</a>;      /* last error message, NULL if no error */
-    struct internal_state FAR *<a name="state">state</a>; /* not visible by applications */
-
-    alloc_func <a name="zalloc">zalloc</a>;  /* used to allocate the internal <a href="#state">state</a> */
-    free_func  <a name="zfree">zfree</a>;   /* used to free the internal <a href="#state">state</a> */
-    voidpf     <a name="opaque">opaque</a>;  /* private data object passed to <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> */
-
-    int     <a name="data_type">data_type</a>;  /* best guess about the data type: ascii or binary */
-    uLong   <a name="adler">adler</a>;      /* <a href="#adler32">adler32</a> value of the uncompressed data */
-    uLong   <a name="reserved">reserved</a>;   /* <a href="#reserved">reserved</a> for future use */
-} <a href="#z_stream_s">z_stream</a> ;
-
-typedef <a href="#z_stream_s">z_stream</a> FAR * <a name="z_streamp">z_streamp</a>;  ÿ
-</pre>
-</font>
-   The application must update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> when <a href="#avail_in">avail_in</a> has
-   dropped to zero. It must update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> when <a href="#avail_out">avail_out</a>
-   has dropped to zero. The application must initialize <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and
-   <a href="#opaque">opaque</a> before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application. <p>
-
-   The <a href="#opaque">opaque</a> value provided by the application will be passed as the first
-   parameter for calls of <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a>. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   <a href="#opaque">opaque</a> value. <p>
-
-   <a href="#zalloc">zalloc</a> must return <a href="#Z_NULL">Z_NULL</a> if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be
-   thread safe. <p>
-
-   On 16-bit systems, the functions <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by <a href="#zalloc">zalloc</a> for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-   <p>
-
-   The fields <a href="#total_in">total_in</a> and <a href="#total_out">total_out</a> can be used for statistics or
-   progress reports. After compression, <a href="#total_in">total_in</a> holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step). <p>
-
-<hr>
-<a name="Constants"><h2> Constants </h2>
-<font color="Blue">
-<pre>
-#define <a name="Z_NO_FLUSH">Z_NO_FLUSH</a>      0
-#define <a name="Z_PARTIAL_FLUSH">Z_PARTIAL_FLUSH</a> 1
-	/* will be removed, use <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a> instead */
-#define <a name="Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>    2
-#define <a name="Z_FULL_FLUSH">Z_FULL_FLUSH</a>    3
-#define <a name="Z_FINISH">Z_FINISH</a>        4
-/* Allowed flush values ; see <a href="#deflate">deflate</a>() below for details */
-
-#define <a name="Z_OK">Z_OK</a>            0
-#define <a name="Z_STREAM_END">Z_STREAM_END</a>    1
-#define <a name="Z_NEED_DICT">Z_NEED_DICT</a>     2
-#define <a name="Z_ERRNO">Z_ERRNO</a>        (-1)
-#define <a name="Z_STREAM_ERROR">Z_STREAM_ERROR</a> (-2)
-#define <a name="Z_DATA_ERROR">Z_DATA_ERROR</a>   (-3)
-#define <a name="Z_MEM_ERROR">Z_MEM_ERROR</a>    (-4)
-#define <a name="Z_BUF_ERROR">Z_BUF_ERROR</a>    (-5)
-#define <a name="Z_VERSION_ERROR">Z_VERSION_ERROR</a> (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define <a name="Z_NO_COMPRESSION">Z_NO_COMPRESSION</a>         0
-#define <a name="Z_BEST_SPEED">Z_BEST_SPEED</a>             1
-#define <a name="Z_BEST_COMPRESSION">Z_BEST_COMPRESSION</a>       9
-#define <a name="Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>  (-1)
-/* compression levels */
-
-#define <a name="Z_FILTERED">Z_FILTERED</a>            1
-#define <a name="Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>        2
-#define <a name="Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a>    0
-/* compression strategy ; see <a href="#deflateInit2">deflateInit2</a>() below for details */
-
-#define <a name="Z_BINARY">Z_BINARY</a>   0
-#define <a name="Z_ASCII">Z_ASCII</a>    1
-#define <a name="Z_UNKNOWN">Z_UNKNOWN</a>  2
-/* Possible values of the <a href="#data_type">data_type</a> field */
-
-#define <a name="Z_DEFLATED">Z_DEFLATED</a>   8
-/* The <a href="#deflate">deflate</a> compression method (the only one supported in this version) */
-
-#define <a name="Z_NULL">Z_NULL</a>  0  /* for initializing <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a>, <a href="#opaque">opaque</a> */
-
-#define <a name="zlib_version">zlib_version</a> <a href="#zlibVersion">zlibVersion</a>()
-/* for compatibility with versions less than 1.0.2 */
-</pre>
-</font>
-
-<hr>
-<a name="Misc"><h2> Misc </h2>
- <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a> are macros to allow checking the zlib version
- and the compiler's view of <a href="#z_stream_s">z_stream</a>.
- <p>
- Other functions:
- <dl>
- <font color="Blue"><dt> const char   *  <a name="zError">zError</a>           (int err);</font>
- <font color="Blue"><dt> int             <a name="inflateSyncPoint">inflateSyncPoint</a> (<a href="#z_streamp">z_streamp</a> z);</font>
- <font color="Blue"><dt> const uLongf *  <a name="get_crc_table">get_crc_table</a>    (void);</font>
- </dl>
- <hr>
- <font size="-1">
- Last update: Wed Oct 13 20:42:34 1999<br>
- piapi at csie.ntu.edu.tw
- </font>
-
-</body>
-</html>
diff --git a/libsrc/zlib/projects/README.projects b/libsrc/zlib/projects/README.projects
deleted file mode 100644
index 1c029e4..0000000
--- a/libsrc/zlib/projects/README.projects
+++ /dev/null
@@ -1,41 +0,0 @@
-This directory contains project files for building zlib under various
-Integrated Development Environments (IDE).
-
-If you wish to submit a new project to this directory, you should comply
-to the following requirements.  Otherwise (e.g. if you wish to integrate
-a custom piece of code that changes the zlib interface or its behavior),
-please consider submitting the project to the contrib directory.
-
-
-Requirements
-============
-
-- The project must build zlib using the source files from the official
-  zlib source distribution, exclusively.
-
-- If the project produces redistributable builds (e.g. shared objects
-  or DLL files), these builds must be compatible to those produced by
-  makefiles, if such makefiles exist in the zlib distribution.
-  In particular, if the project produces a DLL build for the Win32
-  platform, this build must comply to the officially-ammended Win32 DLL
-  Application Binary Interface (ABI), described in win32/DLL_FAQ.txt.
-
-- The project may provide additional build targets, which depend on
-  3rd-party (unofficially-supported) software, present in the contrib
-  directory.  For example, it is possible to provide an "ASM build",
-  besides the officially-supported build, and have ASM source files
-  among its dependencies.
-
-- If there are significant differences between the project files created
-  by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name
-  of the project directory should contain the version number of the IDE
-  for which the project is intended (e.g. "visualc6" for Visual C++ 6.0,
-  or "visualc7" for Visual C++ 7.0 and 7.1).
-
-
-Current projects
-================
-
-visualc6/   by Simon-Pierre Cadieux <methodex at methodex.ca>
-            and Cosmin Truta <cosmint at cs.ubbcluj.ro>
-        Project for Microsoft Visual C++ 6.0
diff --git a/libsrc/zlib/projects/visualc6/README.txt b/libsrc/zlib/projects/visualc6/README.txt
deleted file mode 100644
index d0296c2..0000000
--- a/libsrc/zlib/projects/visualc6/README.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-Microsoft Developer Studio Project Files, Format Version 6.00 for zlib.
-
-Copyright (C) 2000-2004 Simon-Pierre Cadieux.
-Copyright (C) 2004 Cosmin Truta.
-For conditions of distribution and use, see copyright notice in zlib.h.
-
-
-This project builds the zlib binaries as follows:
-
-* Win32_DLL_Release\zlib1.dll       DLL build
-* Win32_DLL_Debug\zlib1d.dll        DLL build (debug version)
-* Win32_DLL_ASM_Release\zlib1.dll   DLL build using ASM code
-* Win32_DLL_ASM_Debug\zlib1d.dll    DLL build using ASM code (debug version)
-* Win32_LIB_Release\zlib.lib        static build
-* Win32_LIB_Debug\zlibd.lib         static build (debug version)
-* Win32_LIB_ASM_Release\zlib.lib    static build using ASM code
-* Win32_LIB_ASM_Debug\zlibd.lib     static build using ASM code (debug version)
-
-
-For more information regarding the DLL builds, please see the DLL FAQ
-in ..\..\win32\DLL_FAQ.txt.
-
-
-To build and test:
-
-1) On the main menu, select "File | Open Workspace".
-   Open "zlib.dsw".
-
-2) Select "Build | Set Active Configuration".
-   Choose the configuration you wish to build.
-
-3) Select "Build | Clean".
-
-4) Select "Build | Build ... (F7)".  Ignore warning messages about
-   not being able to find certain include files (e.g. alloc.h).
-
-5) If you built one of the sample programs (example or minigzip),
-   select "Build | Execute ... (Ctrl+F5)".
-
-
-To use:
-
-1) Select "Project | Settings (Alt+F7)".
-   Make note of the configuration names used in your project.
-   Usually, these names are "Win32 Release" and "Win32 Debug".
-
-2) In the Workspace window, select the "FileView" tab.
-   Right-click on the root item "Workspace '...'".
-   Select "Insert Project into Workspace".
-   Switch on the checkbox "Dependency of:", and select the name
-   of your project.  Open "zlib.dsp".
-
-3) Select "Build | Configurations".
-   For each configuration of your project:
-   3.1) Choose the zlib configuration you wish to use.
-   3.2) Click on "Add".
-   3.3) Set the new zlib configuration name to the name used by
-        the configuration from the current iteration.
-
-4) Select "Build | Set Active Configuration".
-   Choose the configuration you wish to build.
-
-5) Select "Build | Build ... (F7)".
-
-6) If you built an executable program, select
-   "Build | Execute ... (Ctrl+F5)".
-
-
-Note:
-
-To build the ASM-enabled code, you need Microsoft Assembler
-(ML.EXE).  You can get it by downloading and installing the
-latest Processor Pack for Visual C++ 6.0.
diff --git a/libsrc/zlib/projects/visualc6/example.dsp b/libsrc/zlib/projects/visualc6/example.dsp
deleted file mode 100644
index e072a37..0000000
--- a/libsrc/zlib/projects/visualc6/example.dsp
+++ /dev/null
@@ -1,278 +0,0 @@
-# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=example - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "example.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "example - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "example - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "example - Win32 DLL Release"
-# Name "example - Win32 DLL Debug"
-# Name "example - Win32 DLL ASM Release"
-# Name "example - Win32 DLL ASM Debug"
-# Name "example - Win32 LIB Release"
-# Name "example - Win32 LIB Debug"
-# Name "example - Win32 LIB ASM Release"
-# Name "example - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\example.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/libsrc/zlib/projects/visualc6/minigzip.dsp b/libsrc/zlib/projects/visualc6/minigzip.dsp
deleted file mode 100644
index f32024e..0000000
--- a/libsrc/zlib/projects/visualc6/minigzip.dsp
+++ /dev/null
@@ -1,278 +0,0 @@
-# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=minigzip - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "minigzip.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "minigzip - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "minigzip - Win32 DLL Release"
-# Name "minigzip - Win32 DLL Debug"
-# Name "minigzip - Win32 DLL ASM Release"
-# Name "minigzip - Win32 DLL ASM Debug"
-# Name "minigzip - Win32 LIB Release"
-# Name "minigzip - Win32 LIB Debug"
-# Name "minigzip - Win32 LIB ASM Release"
-# Name "minigzip - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\minigzip.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/libsrc/zlib/projects/visualc6/zlib.dsp b/libsrc/zlib/projects/visualc6/zlib.dsp
deleted file mode 100644
index 0fe0604..0000000
--- a/libsrc/zlib/projects/visualc6/zlib.dsp
+++ /dev/null
@@ -1,609 +0,0 @@
-# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=zlib - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "zlib.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "zlib - Win32 DLL Release"
-# Name "zlib - Win32 DLL Debug"
-# Name "zlib - Win32 DLL ASM Release"
-# Name "zlib - Win32 DLL ASM Debug"
-# Name "zlib - Win32 LIB Release"
-# Name "zlib - Win32 LIB Debug"
-# Name "zlib - Win32 LIB ASM Release"
-# Name "zlib - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\adler32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\compress.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\crc32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\deflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\gzio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\infback.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffast.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inftrees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\trees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\uncompr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\win32\zlib.def
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zutil.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\crc32.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\deflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffast.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffixed.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inftrees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\trees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zutil.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\..\win32\zlib1.rc
-# End Source File
-# End Group
-# Begin Group "Assembler Files (Unsupported)"
-
-# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx"
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\gvmat32.asm
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Release
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Debug
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Release
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Debug
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\gvmat32c.c
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# ADD CPP /I "..\.."
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\inffas32.asm
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Release
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Debug
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Release
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Debug
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\README.txt
-# End Source File
-# End Target
-# End Project
diff --git a/libsrc/zlib/projects/visualc6/zlib.dsw b/libsrc/zlib/projects/visualc6/zlib.dsw
deleted file mode 100644
index 3a771fc..0000000
--- a/libsrc/zlib/projects/visualc6/zlib.dsw
+++ /dev/null
@@ -1,59 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "example"=.\example.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "minigzip"=.\minigzip.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlib"=.\zlib.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/libsrc/zlib/qnx/package.qpg b/libsrc/zlib/qnx/package.qpg
deleted file mode 100644
index 8a4a47c..0000000
--- a/libsrc/zlib/qnx/package.qpg
+++ /dev/null
@@ -1,141 +0,0 @@
-<QPG:Generation>
-   <QPG:Options>
-      <QPG:User unattended="no" verbosity="2" listfiles="yes"/>
-      <QPG:Defaults type="qnx_package"/>
-      <QPG:Source></QPG:Source>
-      <QPG:Release number="+"/>
-      <QPG:Build></QPG:Build>
-      <QPG:FileSorting strip="yes"/>
-      <QPG:Package targets="combine"/>
-      <QPG:Repository generate="yes"/>
-      <QPG:FinalDir></QPG:FinalDir>
-      <QPG:Cleanup></QPG:Cleanup>
-   </QPG:Options>
-
-   <QPG:Responsible>
-      <QPG:Company></QPG:Company>
-      <QPG:Department></QPG:Department>
-      <QPG:Group></QPG:Group>
-      <QPG:Team></QPG:Team>
-      <QPG:Employee></QPG:Employee>
-      <QPG:EmailAddress></QPG:EmailAddress>
-   </QPG:Responsible>
-
-   <QPG:Values>
-      <QPG:Files>
-         <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" user="root:bin" permission="644"/>
-         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.3"/>
-         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3"/>
-         <QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" component="slib"/>
-      </QPG:Files>
-
-      <QPG:PackageFilter>
-         <QPM:PackageManifest>
-            <QPM:PackageDescription>
-               <QPM:PackageType>Library</QPM:PackageType>
-               <QPM:PackageReleaseNotes></QPM:PackageReleaseNotes>
-               <QPM:PackageReleaseUrgency>Medium</QPM:PackageReleaseUrgency>
-               <QPM:PackageRepository></QPM:PackageRepository>
-               <QPM:FileVersion>2.0</QPM:FileVersion>
-            </QPM:PackageDescription>
-
-            <QPM:ProductDescription>
-               <QPM:ProductName>zlib</QPM:ProductName>
-               <QPM:ProductIdentifier>zlib</QPM:ProductIdentifier>
-               <QPM:ProductEmail>alain.bonnefoy at icbt.com</QPM:ProductEmail>
-               <QPM:VendorName>Public</QPM:VendorName>
-               <QPM:VendorInstallName>public</QPM:VendorInstallName>
-               <QPM:VendorURL>www.gzip.org/zlib</QPM:VendorURL>
-               <QPM:VendorEmbedURL></QPM:VendorEmbedURL>
-               <QPM:VendorEmail></QPM:VendorEmail>
-               <QPM:AuthorName>Jean-Loup Gailly,Mark Adler</QPM:AuthorName>
-               <QPM:AuthorURL>www.gzip.org/zlib</QPM:AuthorURL>
-               <QPM:AuthorEmbedURL></QPM:AuthorEmbedURL>
-               <QPM:AuthorEmail>zlib at gzip.org</QPM:AuthorEmail>
-               <QPM:ProductIconSmall></QPM:ProductIconSmall>
-               <QPM:ProductIconLarge></QPM:ProductIconLarge>
-               <QPM:ProductDescriptionShort>A massively spiffy yet delicately unobtrusive compression library.</QPM:ProductDescriptionShort>
-               <QPM:ProductDescriptionLong>zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system.</QPM:ProductDescriptionLong>
-               <QPM:ProductDescriptionURL>http://www.gzip.org/zlib</QPM:ProductDescriptionURL>
-               <QPM:ProductDescriptionEmbedURL></QPM:ProductDescriptionEmbedURL>
-            </QPM:ProductDescription>
-
-            <QPM:ReleaseDescription>
-               <QPM:ReleaseVersion>1.2.3</QPM:ReleaseVersion>
-               <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
-               <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
-               <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
-               <QPM:ReleaseNoteMajor></QPM:ReleaseNoteMajor>
-               <QPM:ExcludeCountries>
-                  <QPM:Country></QPM:Country>
-               </QPM:ExcludeCountries>
-
-               <QPM:ReleaseCopyright>No License</QPM:ReleaseCopyright>
-            </QPM:ReleaseDescription>
-
-            <QPM:ContentDescription>
-               <QPM:ContentTopic xmlmultiple="true">Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>
-               <QPM:ContentKeyword>zlib,compression</QPM:ContentKeyword>
-               <QPM:TargetOS>qnx6</QPM:TargetOS>
-               <QPM:HostOS>qnx6</QPM:HostOS>
-               <QPM:DisplayEnvironment xmlmultiple="true">None</QPM:DisplayEnvironment>
-               <QPM:TargetAudience xmlmultiple="true">Developer</QPM:TargetAudience>
-            </QPM:ContentDescription>
-         </QPM:PackageManifest>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter proc="none" target="none">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationDependencies>
-               <QPM:ProductRequirements></QPM:ProductRequirements>
-            </QPM:ProductInstallationDependencies>
-
-            <QPM:ProductInstallationProcedure>
-               <QPM:Script xmlmultiple="true">
-                  <QPM:ScriptName></QPM:ScriptName>
-                  <QPM:ScriptType>Install</QPM:ScriptType>
-                  <QPM:ScriptTiming>Post</QPM:ScriptTiming>
-                  <QPM:ScriptBlocking>No</QPM:ScriptBlocking>
-                  <QPM:ScriptResult>Ignore</QPM:ScriptResult>
-                  <QPM:ShortDescription></QPM:ShortDescription>
-                  <QPM:UseBinaries>No</QPM:UseBinaries>
-                  <QPM:Priority>Optional</QPM:Priority>
-               </QPM:Script>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter type="core" component="none">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationProcedure>
-	       <QPM:OrderDependency xmlmultiple="true">
-	          <QPM:Order>InstallOver</QPM:Order>
-	          <QPM:Product>zlib</QPM:Product>
-	       </QPM:OrderDependency>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter type="core" component="dev">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationProcedure>
-	       <QPM:OrderDependency xmlmultiple="true">
-	          <QPM:Order>InstallOver</QPM:Order>
-	          <QPM:Product>zlib-dev</QPM:Product>
-	       </QPM:OrderDependency>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-   </QPG:Values>
-</QPG:Generation>
diff --git a/libsrc/zlib/trees.c b/libsrc/zlib/trees.c
deleted file mode 100644
index 371b270..0000000
--- a/libsrc/zlib/trees.c
+++ /dev/null
@@ -1,1219 +0,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2005 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process uses several Huffman trees. The more
- *      common source values are represented by shorter bit sequences.
- *
- *      Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values).  The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- *      Storer, James A.
- *          Data Compression:  Methods and Theory, pp. 49-50.
- *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.
- *
- *      Sedgewick, R.
- *          Algorithms, p290.
- *          Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* @(#) $Id: trees.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-/* #define GEN_TREES_H */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-#  include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6      16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10    17
-/* repeat a zero length 3-10 times  (3 bits of repeat count) */
-
-#define REPZ_11_138  18
-/* repeat a zero length 11-138 times  (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
-   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
-   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
-   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
-   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-#define DIST_CODE_LEN  512 /* see definition of array dist_code below */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-/* non ANSI compilers may not accept trees.h */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-uch _dist_code[DIST_CODE_LEN];
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-#else
-#  include "trees.h"
-#endif /* GEN_TREES_H */
-
-struct static_tree_desc_s {
-    const ct_data *static_tree;  /* static tree or NULL */
-    const intf *extra_bits;      /* extra bits for each code or NULL */
-    int     extra_base;          /* base index for extra_bits */
-    int     elems;               /* max number of elements in the tree */
-    int     max_length;          /* max bit length for the codes */
-};
-
-local static_tree_desc  static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc  static_d_desc =
-{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};
-
-local static_tree_desc  static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block     OF((deflate_state *s));
-local void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen     OF((deflate_state *s, tree_desc *desc));
-local void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree     OF((deflate_state *s, tree_desc *desc));
-local void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local int  build_bl_tree  OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
-                              int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
-                              ct_data *dtree));
-local void set_data_type  OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup      OF((deflate_state *s));
-local void bi_flush       OF((deflate_state *s));
-local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,
-                              int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
-   /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-#  define send_code(s, c, tree) \
-     { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
-       send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
-    put_byte(s, (uch)((w) & 0xff)); \
-    put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits      OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
-    deflate_state *s;
-    int value;  /* value to send */
-    int length; /* number of bits */
-{
-    Tracevv((stderr," l %2d v %4x ", length, value));
-    Assert(length > 0 && length <= 15, "invalid length");
-    s->bits_sent += (ulg)length;
-
-    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
-     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
-     * unused bits in value.
-     */
-    if (s->bi_valid > (int)Buf_size - length) {
-        s->bi_buf |= (value << s->bi_valid);
-        put_short(s, s->bi_buf);
-        s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
-        s->bi_valid += length - Buf_size;
-    } else {
-        s->bi_buf |= value << s->bi_valid;
-        s->bi_valid += length;
-    }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
-  if (s->bi_valid > (int)Buf_size - len) {\
-    int val = value;\
-    s->bi_buf |= (val << s->bi_valid);\
-    put_short(s, s->bi_buf);\
-    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
-    s->bi_valid += len - Buf_size;\
-  } else {\
-    s->bi_buf |= (value) << s->bi_valid;\
-    s->bi_valid += len;\
-  }\
-}
-#endif /* DEBUG */
-
-
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
-#if defined(GEN_TREES_H) || !defined(STDC)
-    static int static_init_done = 0;
-    int n;        /* iterates over tree elements */
-    int bits;     /* bit counter */
-    int length;   /* length value */
-    int code;     /* code value */
-    int dist;     /* distance index */
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    if (static_init_done) return;
-
-    /* For some embedded targets, global variables are not initialized: */
-    static_l_desc.static_tree = static_ltree;
-    static_l_desc.extra_bits = extra_lbits;
-    static_d_desc.static_tree = static_dtree;
-    static_d_desc.extra_bits = extra_dbits;
-    static_bl_desc.extra_bits = extra_blbits;
-
-    /* Initialize the mapping length (0..255) -> length code (0..28) */
-    length = 0;
-    for (code = 0; code < LENGTH_CODES-1; code++) {
-        base_length[code] = length;
-        for (n = 0; n < (1<<extra_lbits[code]); n++) {
-            _length_code[length++] = (uch)code;
-        }
-    }
-    Assert (length == 256, "tr_static_init: length != 256");
-    /* Note that the length 255 (match length 258) can be represented
-     * in two different ways: code 284 + 5 bits or code 285, so we
-     * overwrite length_code[255] to use the best encoding:
-     */
-    _length_code[length-1] = (uch)code;
-
-    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
-    dist = 0;
-    for (code = 0 ; code < 16; code++) {
-        base_dist[code] = dist;
-        for (n = 0; n < (1<<extra_dbits[code]); n++) {
-            _dist_code[dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: dist != 256");
-    dist >>= 7; /* from now on, all distances are divided by 128 */
-    for ( ; code < D_CODES; code++) {
-        base_dist[code] = dist << 7;
-        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
-            _dist_code[256 + dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
-    /* Construct the codes of the static literal tree */
-    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
-    n = 0;
-    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
-    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
-    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
-    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
-    /* Codes 286 and 287 do not exist, but we must include them in the
-     * tree construction to get a canonical Huffman tree (longest code
-     * all ones)
-     */
-    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
-    /* The static distance tree is trivial: */
-    for (n = 0; n < D_CODES; n++) {
-        static_dtree[n].Len = 5;
-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
-    }
-    static_init_done = 1;
-
-#  ifdef GEN_TREES_H
-    gen_trees_header();
-#  endif
-#endif /* defined(GEN_TREES_H) || !defined(STDC) */
-}
-
-/* ===========================================================================
- * Genererate the file trees.h describing the static trees.
- */
-#ifdef GEN_TREES_H
-#  ifndef DEBUG
-#    include <stdio.h>
-#  endif
-
-#  define SEPARATOR(i, last, width) \
-      ((i) == (last)? "\n};\n\n" :    \
-       ((i) % (width) == (width)-1 ? ",\n" : ", "))
-
-void gen_trees_header()
-{
-    FILE *header = fopen("trees.h", "w");
-    int i;
-
-    Assert (header != NULL, "Can't open trees.h");
-    fprintf(header,
-            "/* header created automatically with -DGEN_TREES_H */\n\n");
-
-    fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
-    for (i = 0; i < L_CODES+2; i++) {
-        fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
-                static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
-    }
-
-    fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
-                static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
-    }
-
-    fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
-    for (i = 0; i < DIST_CODE_LEN; i++) {
-        fprintf(header, "%2u%s", _dist_code[i],
-                SEPARATOR(i, DIST_CODE_LEN-1, 20));
-    }
-
-    fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
-    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
-        fprintf(header, "%2u%s", _length_code[i],
-                SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
-    }
-
-    fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
-    for (i = 0; i < LENGTH_CODES; i++) {
-        fprintf(header, "%1u%s", base_length[i],
-                SEPARATOR(i, LENGTH_CODES-1, 20));
-    }
-
-    fprintf(header, "local const int base_dist[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "%5u%s", base_dist[i],
-                SEPARATOR(i, D_CODES-1, 10));
-    }
-
-    fclose(header);
-}
-#endif /* GEN_TREES_H */
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void _tr_init(s)
-    deflate_state *s;
-{
-    tr_static_init();
-
-    s->l_desc.dyn_tree = s->dyn_ltree;
-    s->l_desc.stat_desc = &static_l_desc;
-
-    s->d_desc.dyn_tree = s->dyn_dtree;
-    s->d_desc.stat_desc = &static_d_desc;
-
-    s->bl_desc.dyn_tree = s->bl_tree;
-    s->bl_desc.stat_desc = &static_bl_desc;
-
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
-    s->compressed_len = 0L;
-    s->bits_sent = 0L;
-#endif
-
-    /* Initialize the first block of the first file: */
-    init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
-    deflate_state *s;
-{
-    int n; /* iterates over tree elements */
-
-    /* Initialize the trees. */
-    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
-    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
-    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
-    s->dyn_ltree[END_BLOCK].Freq = 1;
-    s->opt_len = s->static_len = 0L;
-    s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
-    top = s->heap[SMALLEST]; \
-    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
-    pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
-   (tree[n].Freq < tree[m].Freq || \
-   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
-    deflate_state *s;
-    ct_data *tree;  /* the tree to restore */
-    int k;               /* node to move down */
-{
-    int v = s->heap[k];
-    int j = k << 1;  /* left son of k */
-    while (j <= s->heap_len) {
-        /* Set j to the smallest of the two sons: */
-        if (j < s->heap_len &&
-            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
-            j++;
-        }
-        /* Exit if v is smaller than both sons */
-        if (smaller(tree, v, s->heap[j], s->depth)) break;
-
-        /* Exchange v with the smallest son */
-        s->heap[k] = s->heap[j];  k = j;
-
-        /* And continue down the tree, setting j to the left son of k */
-        j <<= 1;
-    }
-    s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- *    above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- *     array bl_count contains the frequencies for each bit length.
- *     The length opt_len is updated; static_len is also updated if stree is
- *     not null.
- */
-local void gen_bitlen(s, desc)
-    deflate_state *s;
-    tree_desc *desc;    /* the tree descriptor */
-{
-    ct_data *tree        = desc->dyn_tree;
-    int max_code         = desc->max_code;
-    const ct_data *stree = desc->stat_desc->static_tree;
-    const intf *extra    = desc->stat_desc->extra_bits;
-    int base             = desc->stat_desc->extra_base;
-    int max_length       = desc->stat_desc->max_length;
-    int h;              /* heap index */
-    int n, m;           /* iterate over the tree elements */
-    int bits;           /* bit length */
-    int xbits;          /* extra bits */
-    ush f;              /* frequency */
-    int overflow = 0;   /* number of elements with bit length too large */
-
-    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
-    /* In a first pass, compute the optimal bit lengths (which may
-     * overflow in the case of the bit length tree).
-     */
-    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
-    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
-        n = s->heap[h];
-        bits = tree[tree[n].Dad].Len + 1;
-        if (bits > max_length) bits = max_length, overflow++;
-        tree[n].Len = (ush)bits;
-        /* We overwrite tree[n].Dad which is no longer needed */
-
-        if (n > max_code) continue; /* not a leaf node */
-
-        s->bl_count[bits]++;
-        xbits = 0;
-        if (n >= base) xbits = extra[n-base];
-        f = tree[n].Freq;
-        s->opt_len += (ulg)f * (bits + xbits);
-        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
-    }
-    if (overflow == 0) return;
-
-    Trace((stderr,"\nbit length overflow\n"));
-    /* This happens for example on obj2 and pic of the Calgary corpus */
-
-    /* Find the first bit length which could increase: */
-    do {
-        bits = max_length-1;
-        while (s->bl_count[bits] == 0) bits--;
-        s->bl_count[bits]--;      /* move one leaf down the tree */
-        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
-        s->bl_count[max_length]--;
-        /* The brother of the overflow item also moves one step up,
-         * but this does not affect bl_count[max_length]
-         */
-        overflow -= 2;
-    } while (overflow > 0);
-
-    /* Now recompute all bit lengths, scanning in increasing frequency.
-     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
-     * lengths instead of fixing only the wrong ones. This idea is taken
-     * from 'ar' written by Haruhiko Okumura.)
-     */
-    for (bits = max_length; bits != 0; bits--) {
-        n = s->bl_count[bits];
-        while (n != 0) {
-            m = s->heap[--h];
-            if (m > max_code) continue;
-            if ((unsigned) tree[m].Len != (unsigned) bits) {
-                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
-                s->opt_len += ((long)bits - (long)tree[m].Len)
-                              *(long)tree[m].Freq;
-                tree[m].Len = (ush)bits;
-            }
-            n--;
-        }
-    }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- *     zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
-    ct_data *tree;             /* the tree to decorate */
-    int max_code;              /* largest code with non zero frequency */
-    ushf *bl_count;            /* number of codes at each bit length */
-{
-    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
-    ush code = 0;              /* running code value */
-    int bits;                  /* bit index */
-    int n;                     /* code index */
-
-    /* The distribution counts are first used to generate the code values
-     * without bit reversal.
-     */
-    for (bits = 1; bits <= MAX_BITS; bits++) {
-        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
-    }
-    /* Check that the bit counts in bl_count are consistent. The last code
-     * must be all ones.
-     */
-    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
-            "inconsistent bit counts");
-    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
-    for (n = 0;  n <= max_code; n++) {
-        int len = tree[n].Len;
-        if (len == 0) continue;
-        /* Now reverse the bits */
-        tree[n].Code = bi_reverse(next_code[len]++, len);
-
-        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
-             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
-    }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- *     and corresponding code. The length opt_len is updated; static_len is
- *     also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
-    deflate_state *s;
-    tree_desc *desc; /* the tree descriptor */
-{
-    ct_data *tree         = desc->dyn_tree;
-    const ct_data *stree  = desc->stat_desc->static_tree;
-    int elems             = desc->stat_desc->elems;
-    int n, m;          /* iterate over heap elements */
-    int max_code = -1; /* largest code with non zero frequency */
-    int node;          /* new node being created */
-
-    /* Construct the initial heap, with least frequent element in
-     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
-     * heap[0] is not used.
-     */
-    s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
-    for (n = 0; n < elems; n++) {
-        if (tree[n].Freq != 0) {
-            s->heap[++(s->heap_len)] = max_code = n;
-            s->depth[n] = 0;
-        } else {
-            tree[n].Len = 0;
-        }
-    }
-
-    /* The pkzip format requires that at least one distance code exists,
-     * and that at least one bit should be sent even if there is only one
-     * possible code. So to avoid special checks later on we force at least
-     * two codes of non zero frequency.
-     */
-    while (s->heap_len < 2) {
-        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
-        tree[node].Freq = 1;
-        s->depth[node] = 0;
-        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
-        /* node is 0 or 1 so it does not have extra bits */
-    }
-    desc->max_code = max_code;
-
-    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
-     * establish sub-heaps of increasing lengths:
-     */
-    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
-    /* Construct the Huffman tree by repeatedly combining the least two
-     * frequent nodes.
-     */
-    node = elems;              /* next internal node of the tree */
-    do {
-        pqremove(s, tree, n);  /* n = node of least frequency */
-        m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
-        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
-        s->heap[--(s->heap_max)] = m;
-
-        /* Create a new node father of n and m */
-        tree[node].Freq = tree[n].Freq + tree[m].Freq;
-        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
-                                s->depth[n] : s->depth[m]) + 1);
-        tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
-        if (tree == s->bl_tree) {
-            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
-                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
-        }
-#endif
-        /* and insert the new node in the heap */
-        s->heap[SMALLEST] = node++;
-        pqdownheap(s, tree, SMALLEST);
-
-    } while (s->heap_len >= 2);
-
-    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
-    /* At this point, the fields freq and dad are set. We can now
-     * generate the bit lengths.
-     */
-    gen_bitlen(s, (tree_desc *)desc);
-
-    /* The field len is now set, we can generate the bit codes */
-    gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree;   /* the tree to be scanned */
-    int max_code;    /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    if (nextlen == 0) max_count = 138, min_count = 3;
-    tree[max_code+1].Len = (ush)0xffff; /* guard */
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            s->bl_tree[curlen].Freq += count;
-        } else if (curlen != 0) {
-            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
-            s->bl_tree[REP_3_6].Freq++;
-        } else if (count <= 10) {
-            s->bl_tree[REPZ_3_10].Freq++;
-        } else {
-            s->bl_tree[REPZ_11_138].Freq++;
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree; /* the tree to be scanned */
-    int max_code;       /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    /* tree[max_code+1].Len = -1; */  /* guard already set */
-    if (nextlen == 0) max_count = 138, min_count = 3;
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
-        } else if (curlen != 0) {
-            if (curlen != prevlen) {
-                send_code(s, curlen, s->bl_tree); count--;
-            }
-            Assert(count >= 3 && count <= 6, " 3_6?");
-            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
-        } else if (count <= 10) {
-            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
-        } else {
-            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
-    deflate_state *s;
-{
-    int max_blindex;  /* index of last bit length code of non zero freq */
-
-    /* Determine the bit length frequencies for literal and distance trees */
-    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
-    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
-    /* Build the bit length tree: */
-    build_tree(s, (tree_desc *)(&(s->bl_desc)));
-    /* opt_len now includes the length of the tree representations, except
-     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
-     */
-
-    /* Determine the number of bit length codes to send. The pkzip format
-     * requires that at least 4 bit length codes be sent. (appnote.txt says
-     * 3 but the actual value used is 4.)
-     */
-    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
-        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
-    }
-    /* Update opt_len to include the bit length tree and counts */
-    s->opt_len += 3*(max_blindex+1) + 5+5+4;
-    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
-            s->opt_len, s->static_len));
-
-    return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
-    deflate_state *s;
-    int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
-    int rank;                    /* index in bl_order */
-
-    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
-    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
-            "too many codes");
-    Tracev((stderr, "\nbl counts: "));
-    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
-    send_bits(s, dcodes-1,   5);
-    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
-    for (rank = 0; rank < blcodes; rank++) {
-        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
-        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
-    }
-    Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
-    Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
-    Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void _tr_stored_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
-#ifdef DEBUG
-    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
-    s->compressed_len += (stored_len + 4) << 3;
-#endif
-    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
- */
-void _tr_align(s)
-    deflate_state *s;
-{
-    send_bits(s, STATIC_TREES<<1, 3);
-    send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
-    bi_flush(s);
-    /* Of the 10 bits for the empty block, we have already sent
-     * (10 - bi_valid) bits. The lookahead for the last real code (before
-     * the EOB of the previous block) was thus at least one plus the length
-     * of the EOB plus what we have just sent of the empty static block.
-     */
-    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
-        send_bits(s, STATIC_TREES<<1, 3);
-        send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-        s->compressed_len += 10L;
-#endif
-        bi_flush(s);
-    }
-    s->last_eob_len = 7;
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-void _tr_flush_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block, or NULL if too old */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
-    int max_blindex = 0;  /* index of last bit length code of non zero freq */
-
-    /* Build the Huffman trees unless a stored block is forced */
-    if (s->level > 0) {
-
-        /* Check if the file is binary or text */
-        if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
-            set_data_type(s);
-
-        /* Construct the literal and distance trees */
-        build_tree(s, (tree_desc *)(&(s->l_desc)));
-        Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-
-        build_tree(s, (tree_desc *)(&(s->d_desc)));
-        Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-        /* At this point, opt_len and static_len are the total bit lengths of
-         * the compressed block data, excluding the tree representations.
-         */
-
-        /* Build the bit length tree for the above two trees, and get the index
-         * in bl_order of the last bit length code to send.
-         */
-        max_blindex = build_bl_tree(s);
-
-        /* Determine the best encoding. Compute the block lengths in bytes. */
-        opt_lenb = (s->opt_len+3+7)>>3;
-        static_lenb = (s->static_len+3+7)>>3;
-
-        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
-                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
-                s->last_lit));
-
-        if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
-    } else {
-        Assert(buf != (char*)0, "lost buf");
-        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
-    }
-
-#ifdef FORCE_STORED
-    if (buf != (char*)0) { /* force stored block */
-#else
-    if (stored_len+4 <= opt_lenb && buf != (char*)0) {
-                       /* 4: two words for the lengths */
-#endif
-        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
-         * Otherwise we can't have processed more than WSIZE input bytes since
-         * the last block flush, because compression would have been
-         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
-         * transform a block into a stored block.
-         */
-        _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
-    } else if (static_lenb >= 0) { /* force static trees */
-#else
-    } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
-#endif
-        send_bits(s, (STATIC_TREES<<1)+eof, 3);
-        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->static_len;
-#endif
-    } else {
-        send_bits(s, (DYN_TREES<<1)+eof, 3);
-        send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
-                       max_blindex+1);
-        compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->opt_len;
-#endif
-    }
-    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
-    /* The above check is made mod 2^32, for files larger than 512 MB
-     * and uLong implemented on 32 bits.
-     */
-    init_block(s);
-
-    if (eof) {
-        bi_windup(s);
-#ifdef DEBUG
-        s->compressed_len += 7;  /* align on byte boundary */
-#endif
-    }
-    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
-           s->compressed_len-7*eof));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int _tr_tally (s, dist, lc)
-    deflate_state *s;
-    unsigned dist;  /* distance of matched string */
-    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
-    s->d_buf[s->last_lit] = (ush)dist;
-    s->l_buf[s->last_lit++] = (uch)lc;
-    if (dist == 0) {
-        /* lc is the unmatched char */
-        s->dyn_ltree[lc].Freq++;
-    } else {
-        s->matches++;
-        /* Here, lc is the match length - MIN_MATCH */
-        dist--;             /* dist = match distance - 1 */
-        Assert((ush)dist < (ush)MAX_DIST(s) &&
-               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
-               (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
-
-        s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
-        s->dyn_dtree[d_code(dist)].Freq++;
-    }
-
-#ifdef TRUNCATE_BLOCK
-    /* Try to guess if it is profitable to stop the current block here */
-    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
-        /* Compute an upper bound for the compressed length */
-        ulg out_length = (ulg)s->last_lit*8L;
-        ulg in_length = (ulg)((long)s->strstart - s->block_start);
-        int dcode;
-        for (dcode = 0; dcode < D_CODES; dcode++) {
-            out_length += (ulg)s->dyn_dtree[dcode].Freq *
-                (5L+extra_dbits[dcode]);
-        }
-        out_length >>= 3;
-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
-               s->last_lit, in_length, out_length,
-               100L - out_length*100L/in_length));
-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
-    }
-#endif
-    return (s->last_lit == s->lit_bufsize-1);
-    /* We avoid equality with lit_bufsize because of wraparound at 64K
-     * on 16 bit machines and because stored blocks are restricted to
-     * 64K-1 bytes.
-     */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
-    deflate_state *s;
-    ct_data *ltree; /* literal tree */
-    ct_data *dtree; /* distance tree */
-{
-    unsigned dist;      /* distance of matched string */
-    int lc;             /* match length or unmatched char (if dist == 0) */
-    unsigned lx = 0;    /* running index in l_buf */
-    unsigned code;      /* the code to send */
-    int extra;          /* number of extra bits to send */
-
-    if (s->last_lit != 0) do {
-        dist = s->d_buf[lx];
-        lc = s->l_buf[lx++];
-        if (dist == 0) {
-            send_code(s, lc, ltree); /* send a literal byte */
-            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
-        } else {
-            /* Here, lc is the match length - MIN_MATCH */
-            code = _length_code[lc];
-            send_code(s, code+LITERALS+1, ltree); /* send the length code */
-            extra = extra_lbits[code];
-            if (extra != 0) {
-                lc -= base_length[code];
-                send_bits(s, lc, extra);       /* send the extra length bits */
-            }
-            dist--; /* dist is now the match distance - 1 */
-            code = d_code(dist);
-            Assert (code < D_CODES, "bad d_code");
-
-            send_code(s, code, dtree);       /* send the distance code */
-            extra = extra_dbits[code];
-            if (extra != 0) {
-                dist -= base_dist[code];
-                send_bits(s, dist, extra);   /* send the extra distance bits */
-            }
-        } /* literal or match pair ? */
-
-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
-        Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
-               "pendingBuf overflow");
-
-    } while (lx < s->last_lit);
-
-    send_code(s, END_BLOCK, ltree);
-    s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-/* ===========================================================================
- * Set the data type to BINARY or TEXT, using a crude approximation:
- * set it to Z_TEXT if all symbols are either printable characters (33 to 255)
- * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
- * IN assertion: the fields Freq of dyn_ltree are set.
- */
-local void set_data_type(s)
-    deflate_state *s;
-{
-    int n;
-
-    for (n = 0; n < 9; n++)
-        if (s->dyn_ltree[n].Freq != 0)
-            break;
-    if (n == 9)
-        for (n = 14; n < 32; n++)
-            if (s->dyn_ltree[n].Freq != 0)
-                break;
-    s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
-    unsigned code; /* the value to invert */
-    int len;       /* its bit length */
-{
-    register unsigned res = 0;
-    do {
-        res |= code & 1;
-        code >>= 1, res <<= 1;
-    } while (--len > 0);
-    return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
-    deflate_state *s;
-{
-    if (s->bi_valid == 16) {
-        put_short(s, s->bi_buf);
-        s->bi_buf = 0;
-        s->bi_valid = 0;
-    } else if (s->bi_valid >= 8) {
-        put_byte(s, (Byte)s->bi_buf);
-        s->bi_buf >>= 8;
-        s->bi_valid -= 8;
-    }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
-    deflate_state *s;
-{
-    if (s->bi_valid > 8) {
-        put_short(s, s->bi_buf);
-    } else if (s->bi_valid > 0) {
-        put_byte(s, (Byte)s->bi_buf);
-    }
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-#ifdef DEBUG
-    s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
-    deflate_state *s;
-    charf    *buf;    /* the input data */
-    unsigned len;     /* its length */
-    int      header;  /* true if block header must be written */
-{
-    bi_windup(s);        /* align on byte boundary */
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-
-    if (header) {
-        put_short(s, (ush)len);
-        put_short(s, (ush)~len);
-#ifdef DEBUG
-        s->bits_sent += 2*16;
-#endif
-    }
-#ifdef DEBUG
-    s->bits_sent += (ulg)len<<3;
-#endif
-    while (len--) {
-        put_byte(s, *buf++);
-    }
-}
diff --git a/libsrc/zlib/trees.h b/libsrc/zlib/trees.h
deleted file mode 100644
index 72facf9..0000000
--- a/libsrc/zlib/trees.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch _dist_code[DIST_CODE_LEN] = {
- 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
- 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
-    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
- 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-};
-
diff --git a/libsrc/zlib/uncompr.c b/libsrc/zlib/uncompr.c
deleted file mode 100644
index dc4d1a2..0000000
--- a/libsrc/zlib/uncompr.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: uncompr.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-
-    err = inflateInit(&stream);
-    if (err != Z_OK) return err;
-
-    err = inflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        inflateEnd(&stream);
-        if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
-            return Z_DATA_ERROR;
-        return err;
-    }
-    *destLen = stream.total_out;
-
-    err = inflateEnd(&stream);
-    return err;
-}
diff --git a/libsrc/zlib/win32/DLL_FAQ.txt b/libsrc/zlib/win32/DLL_FAQ.txt
deleted file mode 100644
index fb18e07..0000000
--- a/libsrc/zlib/win32/DLL_FAQ.txt
+++ /dev/null
@@ -1,397 +0,0 @@
-
-            Frequently Asked Questions about ZLIB1.DLL
-
-
-This document describes the design, the rationale, and the usage
-of the official DLL build of zlib, named ZLIB1.DLL.  If you have
-general questions about zlib, you should see the file "FAQ" found
-in the zlib distribution, or at the following location:
-  http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. What is ZLIB1.DLL, and how can I get it?
-
-  - ZLIB1.DLL is the official build of zlib as a DLL.
-    (Please remark the character '1' in the name.)
-
-    Pointers to a precompiled ZLIB1.DLL can be found in the zlib
-    web site at:
-      http://www.zlib.org/
-
-    Applications that link to ZLIB1.DLL can rely on the following
-    specification:
-
-    * The exported symbols are exclusively defined in the source
-      files "zlib.h" and "zlib.def", found in an official zlib
-      source distribution.
-    * The symbols are exported by name, not by ordinal.
-    * The exported names are undecorated.
-    * The calling convention of functions is "C" (CDECL).
-    * The ZLIB1.DLL binary is linked to MSVCRT.DLL.
-
-    The archive in which ZLIB1.DLL is bundled contains compiled
-    test programs that must run with a valid build of ZLIB1.DLL.
-    It is recommended to download the prebuilt DLL from the zlib
-    web site, instead of building it yourself, to avoid potential
-    incompatibilities that could be introduced by your compiler
-    and build settings.  If you do build the DLL yourself, please
-    make sure that it complies with all the above requirements,
-    and it runs with the precompiled test programs, bundled with
-    the original ZLIB1.DLL distribution.
-
-    If, for any reason, you need to build an incompatible DLL,
-    please use a different file name.
-
-
- 2. Why did you change the name of the DLL to ZLIB1.DLL?
-    What happened to the old ZLIB.DLL?
-
-  - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required
-    compilation settings that were incompatible to those used by
-    a static build.  The DLL settings were supposed to be enabled
-    by defining the macro ZLIB_DLL, before including "zlib.h".
-    Incorrect handling of this macro was silently accepted at
-    build time, resulting in two major problems:
-
-    * ZLIB_DLL was missing from the old makefile.  When building
-      the DLL, not all people added it to the build options.  In
-      consequence, incompatible incarnations of ZLIB.DLL started
-      to circulate around the net.
-
-    * When switching from using the static library to using the
-      DLL, applications had to define the ZLIB_DLL macro and
-      to recompile all the sources that contained calls to zlib
-      functions.  Failure to do so resulted in creating binaries
-      that were unable to run with the official ZLIB.DLL build.
-
-    The only possible solution that we could foresee was to make
-    a binary-incompatible change in the DLL interface, in order to
-    remove the dependency on the ZLIB_DLL macro, and to release
-    the new DLL under a different name.
-
-    We chose the name ZLIB1.DLL, where '1' indicates the major
-    zlib version number.  We hope that we will not have to break
-    the binary compatibility again, at least not as long as the
-    zlib-1.x series will last.
-
-    There is still a ZLIB_DLL macro, that can trigger a more
-    efficient build and use of the DLL, but compatibility no
-    longer dependents on it.
-
-
- 3. Can I build ZLIB.DLL from the new zlib sources, and replace
-    an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier?
-
-  - In principle, you can do it by assigning calling convention
-    keywords to the macros ZEXPORT and ZEXPORTVA.  In practice,
-    it depends on what you mean by "an old ZLIB.DLL", because the
-    old DLL exists in several mutually-incompatible versions.
-    You have to find out first what kind of calling convention is
-    being used in your particular ZLIB.DLL build, and to use the
-    same one in the new build.  If you don't know what this is all
-    about, you might be better off if you would just leave the old
-    DLL intact.
-
-
- 4. Can I compile my application using the new zlib interface, and
-    link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or
-    earlier?
-
-  - The official answer is "no"; the real answer depends again on
-    what kind of ZLIB.DLL you have.  Even if you are lucky, this
-    course of action is unreliable.
-
-    If you rebuild your application and you intend to use a newer
-    version of zlib (post- 1.1.4), it is strongly recommended to
-    link it to the new ZLIB1.DLL.
-
-
- 5. Why are the zlib symbols exported by name, and not by ordinal?
-
-  - Although exporting symbols by ordinal is a little faster, it
-    is risky.  Any single glitch in the maintenance or use of the
-    DEF file that contains the ordinals can result in incompatible
-    builds and frustrating crashes.  Simply put, the benefits of
-    exporting symbols by ordinal do not justify the risks.
-
-    Technically, it should be possible to maintain ordinals in
-    the DEF file, and still export the symbols by name.  Ordinals
-    exist in every DLL, and even if the dynamic linking performed
-    at the DLL startup is searching for names, ordinals serve as
-    hints, for a faster name lookup.  However, if the DEF file
-    contains ordinals, the Microsoft linker automatically builds
-    an implib that will cause the executables linked to it to use
-    those ordinals, and not the names.  It is interesting to
-    notice that the GNU linker for Win32 does not suffer from this
-    problem.
-
-    It is possible to avoid the DEF file if the exported symbols
-    are accompanied by a "__declspec(dllexport)" attribute in the
-    source files.  You can do this in zlib by predefining the
-    ZLIB_DLL macro.
-
-
- 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling
-    convention.  Why not use the STDCALL convention?
-    STDCALL is the standard convention in Win32, and I need it in
-    my Visual Basic project!
-
-    (For readability, we use CDECL to refer to the convention
-     triggered by the "__cdecl" keyword, STDCALL to refer to
-     the convention triggered by "__stdcall", and FASTCALL to
-     refer to the convention triggered by "__fastcall".)
-
-  - Most of the native Windows API functions (without varargs) use
-    indeed the WINAPI convention (which translates to STDCALL in
-    Win32), but the standard C functions use CDECL.  If a user
-    application is intrinsically tied to the Windows API (e.g.
-    it calls native Windows API functions such as CreateFile()),
-    sometimes it makes sense to decorate its own functions with
-    WINAPI.  But if ANSI C or POSIX portability is a goal (e.g.
-    it calls standard C functions such as fopen()), it is not a
-    sound decision to request the inclusion of <windows.h>, or to
-    use non-ANSI constructs, for the sole purpose to make the user
-    functions STDCALL-able.
-
-    The functionality offered by zlib is not in the category of
-    "Windows functionality", but is more like "C functionality".
-
-    Technically, STDCALL is not bad; in fact, it is slightly
-    faster than CDECL, and it works with variable-argument
-    functions, just like CDECL.  It is unfortunate that, in spite
-    of using STDCALL in the Windows API, it is not the default
-    convention used by the C compilers that run under Windows.
-    The roots of the problem reside deep inside the unsafety of
-    the K&R-style function prototypes, where the argument types
-    are not specified; but that is another story for another day.
-
-    The remaining fact is that CDECL is the default convention.
-    Even if an explicit convention is hard-coded into the function
-    prototypes inside C headers, problems may appear.  The
-    necessity to expose the convention in users' callbacks is one
-    of these problems.
-
-    The calling convention issues are also important when using
-    zlib in other programming languages.  Some of them, like Ada
-    (GNAT) and Fortran (GNU G77), have C bindings implemented
-    initially on Unix, and relying on the C calling convention.
-    On the other hand, the pre- .NET versions of Microsoft Visual
-    Basic require STDCALL, while Borland Delphi prefers, although
-    it does not require, FASTCALL.
-
-    In fairness to all possible uses of zlib outside the C
-    programming language, we choose the default "C" convention.
-    Anyone interested in different bindings or conventions is
-    encouraged to maintain specialized projects.  The "contrib/"
-    directory from the zlib distribution already holds a couple
-    of foreign bindings, such as Ada, C++, and Delphi.
-
-
- 7. I need a DLL for my Visual Basic project.  What can I do?
-
-  - Define the ZLIB_WINAPI macro before including "zlib.h", when
-    building both the DLL and the user application (except that
-    you don't need to define anything when using the DLL in Visual
-    Basic).  The ZLIB_WINAPI macro will switch on the WINAPI
-    (STDCALL) convention.  The name of this DLL must be different
-    than the official ZLIB1.DLL.
-
-    Gilles Vollant has contributed a build named ZLIBWAPI.DLL,
-    with the ZLIB_WINAPI macro turned on, and with the minizip
-    functionality built in.  For more information, please read
-    the notes inside "contrib/vstudio/readme.txt", found in the
-    zlib distribution.
-
-
- 8. I need to use zlib in my Microsoft .NET project.  What can I
-    do?
-
-  - Henrik Ravn has contributed a .NET wrapper around zlib.  Look
-    into contrib/dotzlib/, inside the zlib distribution.
-
-
- 9. If my application uses ZLIB1.DLL, should I link it to
-    MSVCRT.DLL?  Why?
-
-  - It is not required, but it is recommended to link your
-    application to MSVCRT.DLL, if it uses ZLIB1.DLL.
-
-    The executables (.EXE, .DLL, etc.) that are involved in the
-    same process and are using the C run-time library (i.e. they
-    are calling standard C functions), must link to the same
-    library.  There are several libraries in the Win32 system:
-    CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc.
-    Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that
-    depend on it should also be linked to MSVCRT.DLL.
-
-
-10. Why are you saying that ZLIB1.DLL and my application should
-    be linked to the same C run-time (CRT) library?  I linked my
-    application and my DLLs to different C libraries (e.g. my
-    application to a static library, and my DLLs to MSVCRT.DLL),
-    and everything works fine.
-
-  - If a user library invokes only pure Win32 API (accessible via
-    <windows.h> and the related headers), its DLL build will work
-    in any context.  But if this library invokes standard C API,
-    things get more complicated.
-
-    There is a single Win32 library in a Win32 system.  Every
-    function in this library resides in a single DLL module, that
-    is safe to call from anywhere.  On the other hand, there are
-    multiple versions of the C library, and each of them has its
-    own separate internal state.  Standalone executables and user
-    DLLs that call standard C functions must link to a C run-time
-    (CRT) library, be it static or shared (DLL).  Intermixing
-    occurs when an executable (not necessarily standalone) and a
-    DLL are linked to different CRTs, and both are running in the
-    same process.
-
-    Intermixing multiple CRTs is possible, as long as their
-    internal states are kept intact.  The Microsoft Knowledge Base
-    articles KB94248 "HOWTO: Use the C Run-Time" and KB140584
-    "HOWTO: Link with the Correct C Run-Time (CRT) Library"
-    mention the potential problems raised by intermixing.
-
-    If intermixing works for you, it's because your application
-    and DLLs are avoiding the corruption of each of the CRTs'
-    internal states, maybe by careful design, or maybe by fortune.
-
-    Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such
-    as those provided by Borland, raises similar problems.
-
-
-11. Why are you linking ZLIB1.DLL to MSVCRT.DLL?
-
-  - MSVCRT.DLL exists on every Windows 95 with a new service pack
-    installed, or with Microsoft Internet Explorer 4 or later, and
-    on all other Windows 4.x or later (Windows 98, Windows NT 4,
-    or later).  It is freely distributable; if not present in the
-    system, it can be downloaded from Microsoft or from other
-    software provider for free.
-
-    The fact that MSVCRT.DLL does not exist on a virgin Windows 95
-    is not so problematic.  Windows 95 is scarcely found nowadays,
-    Microsoft ended its support a long time ago, and many recent
-    applications from various vendors, including Microsoft, do not
-    even run on it.  Furthermore, no serious user should run
-    Windows 95 without a proper update installed.
-
-
-12. Why are you not linking ZLIB1.DLL to
-    <<my favorite C run-time library>> ?
-
-  - We considered and abandoned the following alternatives:
-
-    * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or
-      LIBCMT.LIB) is not a good option.  People are using the DLL
-      mainly to save disk space.  If you are linking your program
-      to a static C library, you may as well consider linking zlib
-      in statically, too.
-
-    * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because
-      CRTDLL.DLL is present on every Win32 installation.
-      Unfortunately, it has a series of problems: it does not
-      work properly with Microsoft's C++ libraries, it does not
-      provide support for 64-bit file offsets, (and so on...),
-      and Microsoft discontinued its support a long time ago.
-
-    * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied
-      with the Microsoft .NET platform, and Visual C++ 7.0/7.1,
-      raises problems related to the status of ZLIB1.DLL as a
-      system component.  According to the Microsoft Knowledge Base
-      article KB326922 "INFO: Redistribution of the Shared C
-      Runtime Component in Visual C++ .NET", MSVCR70.DLL and
-      MSVCR71.DLL are not supposed to function as system DLLs,
-      because they may clash with MSVCRT.DLL.  Instead, the
-      application's installer is supposed to put these DLLs
-      (if needed) in the application's private directory.
-      If ZLIB1.DLL depends on a non-system runtime, it cannot
-      function as a redistributable system component.
-
-    * Linking ZLIB1.DLL to non-Microsoft runtimes, such as
-      Borland's, or Cygwin's, raises problems related to the
-      reliable presence of these runtimes on Win32 systems.
-      It's easier to let the DLL build of zlib up to the people
-      who distribute these runtimes, and who may proceed as
-      explained in the answer to Question 14.
-
-
-13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL,
-    how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0
-    (Visual Studio .NET) or newer?
-
-  - Due to the problems explained in the Microsoft Knowledge Base
-    article KB326922 (see the previous answer), the C runtime that
-    comes with the VC7 environment is no longer considered a
-    system component.  That is, it should not be assumed that this
-    runtime exists, or may be installed in a system directory.
-    Since ZLIB1.DLL is supposed to be a system component, it may
-    not depend on a non-system component.
-
-    In order to link ZLIB1.DLL and your application to MSVCRT.DLL
-    in VC7, you need the library of Visual C++ 6.0 or older.  If
-    you don't have this library at hand, it's probably best not to
-    use ZLIB1.DLL.
-
-    We are hoping that, in the future, Microsoft will provide a
-    way to build applications linked to a proper system runtime,
-    from the Visual C++ environment.  Until then, you have a
-    couple of alternatives, such as linking zlib in statically.
-    If your application requires dynamic linking, you may proceed
-    as explained in the answer to Question 14.
-
-
-14. I need to link my own DLL build to a CRT different than
-    MSVCRT.DLL.  What can I do?
-
-  - Feel free to rebuild the DLL from the zlib sources, and link
-    it the way you want.  You should, however, clearly state that
-    your build is unofficial.  You should give it a different file
-    name, and/or install it in a private directory that can be
-    accessed by your application only, and is not visible to the
-    others (e.g. it's not in the SYSTEM or the SYSTEM32 directory,
-    and it's not in the PATH).  Otherwise, your build may clash
-    with applications that link to the official build.
-
-    For example, in Cygwin, zlib is linked to the Cygwin runtime
-    CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
-
-
-15. May I include additional pieces of code that I find useful,
-    link them in ZLIB1.DLL, and export them?
-
-  - No.  A legitimate build of ZLIB1.DLL must not include code
-    that does not originate from the official zlib source code.
-    But you can make your own private DLL build, under a different
-    file name, as suggested in the previous answer.
-
-    For example, zlib is a part of the VCL library, distributed
-    with Borland Delphi and C++ Builder.  The DLL build of VCL
-    is a redistributable file, named VCLxx.DLL.
-
-
-16. May I remove some functionality out of ZLIB1.DLL, by enabling
-    macros like NO_GZCOMPRESS or NO_GZIP at compile time?
-
-  - No.  A legitimate build of ZLIB1.DLL must provide the complete
-    zlib functionality, as implemented in the official zlib source
-    code.  But you can make your own private DLL build, under a
-    different file name, as suggested in the previous answer.
-
-
-17. I made my own ZLIB1.DLL build.  Can I test it for compliance?
-
-  - We prefer that you download the official DLL from the zlib
-    web site.  If you need something peculiar from this DLL, you
-    can send your suggestion to the zlib mailing list.
-
-    However, in case you do rebuild the DLL yourself, you can run
-    it with the test programs found in the DLL distribution.
-    Running these test programs is not a guarantee of compliance,
-    but a failure can imply a detected problem.
-
-**
-
-This document is written and maintained by
-Cosmin Truta <cosmint at cs.ubbcluj.ro>
diff --git a/libsrc/zlib/win32/Makefile.bor b/libsrc/zlib/win32/Makefile.bor
deleted file mode 100644
index b802519..0000000
--- a/libsrc/zlib/win32/Makefile.bor
+++ /dev/null
@@ -1,107 +0,0 @@
-# Makefile for zlib
-# Borland C++ for Win32
-#
-# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003
-# Last updated: 28-Aug-2003
-#
-# Usage:
-#  make -f win32/Makefile.bor
-#  make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
-
-# ------------ Borland C++ ------------
-
-# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
-# added to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-CC = bcc32
-AS = bcc32
-LD = bcc32
-AR = tlib
-CFLAGS  = -a -d -k- -O2 $(LOC)
-ASFLAGS = $(LOC)
-LDFLAGS = $(LOC)
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1  = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2  = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-#OBJA =
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-#OBJPA=
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $<
-
-.asm.obj:
-	$(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-	$(AR) $(ZLIB_LIB) $(OBJPA)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
diff --git a/libsrc/zlib/win32/Makefile.emx b/libsrc/zlib/win32/Makefile.emx
deleted file mode 100644
index 7b08424..0000000
--- a/libsrc/zlib/win32/Makefile.emx
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for zlib.  Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.emx;  make test -fmakefile.emx
-#
-
-CC=gcc -Zwin32
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
-	$(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) zlib.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/libsrc/zlib/win32/Makefile.gcc b/libsrc/zlib/win32/Makefile.gcc
deleted file mode 100644
index 62a8430..0000000
--- a/libsrc/zlib/win32/Makefile.gcc
+++ /dev/null
@@ -1,141 +0,0 @@
-# Makefile for zlib, derived from Makefile.dj2.
-# Modified for mingw32 by C. Spieler, 6/16/98.
-# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
-# Last updated: 1-Aug-2003.
-# Tested under Cygwin and MinGW.
-
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.gcc;  make test testdll -fmakefile.gcc
-#
-# To use the asm code, type:
-#   cp contrib/asm?86/match.S ./match.S
-#   make LOC=-DASMV OBJA=match.o -fmakefile.gcc
-#
-# To install libz.a, zconf.h and zlib.h in the system directories, type:
-#
-#   make install -fmakefile.gcc
-
-# Note:
-# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
-# the DLL name should be changed from "zlib1.dll".
-
-STATICLIB = libz.a
-SHAREDLIB = zlib1.dll
-IMPLIB    = libzdll.a
-
-#LOC = -DASMV
-#LOC = -DDEBUG -g
-
-CC = gcc
-CFLAGS = $(LOC) -O3 -Wall
-
-AS = $(CC)
-ASFLAGS = $(LOC) -Wall
-
-LD = $(CC)
-LDFLAGS = $(LOC) -s
-
-AR = ar
-ARFLAGS = rcs
-
-RC = windres
-RCFLAGS = --define GCC_WINDRES
-
-CP = cp -fp
-# If GNU install is available, replace $(CP) with install.
-INSTALL = $(CP)
-RM = rm -f
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \
-       inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
-OBJA =
-
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d
-
-test: example minigzip
-	./example
-	echo hello world | ./minigzip | ./minigzip -d
-
-testdll: example_d minigzip_d
-	./example_d
-	echo hello world | ./minigzip_d | ./minigzip_d -d
-
-.c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-.S.o:
-	$(AS) $(ASFLAGS) -c -o $@ $<
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
-	dllwrap --driver-name $(CC) --def win32/zlib.def \
-	  --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
-	strip $@
-
-example: example.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
-
-minigzip: minigzip.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
-
-example_d: example.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
-
-minigzip_d: minigzip.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
-
-zlibrc.o: win32/zlib1.rc
-	$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
-
-
-# INCLUDE_PATH and LIBRARY_PATH must be set.
-
-.PHONY: install uninstall clean
-
-install: zlib.h zconf.h $(LIB)
-	- at if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
-	- at if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
-	-$(INSTALL) zlib.h $(INCLUDE_PATH)
-	-$(INSTALL) zconf.h $(INCLUDE_PATH)
-	-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
-	-$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
-
-uninstall:
-	-$(RM) $(INCLUDE_PATH)/zlib.h
-	-$(RM) $(INCLUDE_PATH)/zconf.h
-	-$(RM) $(LIBRARY_PATH)/$(STATICLIB)
-	-$(RM) $(LIBRARY_PATH)/$(IMPLIB)
-
-clean:
-	-$(RM) $(STATICLIB)
-	-$(RM) $(SHAREDLIB)
-	-$(RM) $(IMPLIB)
-	-$(RM) *.o
-	-$(RM) *.exe
-	-$(RM) foo.gz
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/libsrc/zlib/win32/Makefile.msc b/libsrc/zlib/win32/Makefile.msc
deleted file mode 100644
index 528ecaa..0000000
--- a/libsrc/zlib/win32/Makefile.msc
+++ /dev/null
@@ -1,126 +0,0 @@
-# Makefile for zlib -- Microsoft (Visual) C
-#
-# Authors:
-#   Cosmin Truta, 11-Mar-2003
-#   Christian Spieler, 19-Mar-2003
-#
-# Last updated:
-#   Cosmin Truta, 27-Aug-2003
-#
-# Usage:
-#   nmake -f win32/Makefile.msc            (standard build)
-#   nmake -f win32/Makefile.msc LOC=-DFOO  (nonstandard build)
-#   nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj  (use ASM code)
-
-
-# optional build flags
-LOC =
-
-
-# variables
-STATICLIB = zlib.lib
-SHAREDLIB = zlib1.dll
-IMPLIB    = zdll.lib
-
-CC = cl
-AS = ml
-LD = link
-AR = lib
-RC = rc
-CFLAGS  = -nologo -MD -O2 $(LOC)
-ASFLAGS = -coff
-LDFLAGS = -nologo -release
-ARFLAGS = -nologo
-RCFLAGS = /dWIN32 /r
-
-OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
-       inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJA =
-
-
-# targets
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \
-     example.exe minigzip.exe example_d.exe minigzip_d.exe
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
-	$(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
-	  -out:$@ $(OBJS) $(OBJA) zlib1.res
-
-example.exe: example.obj $(STATICLIB)
-	$(LD) $(LDFLAGS) example.obj $(STATICLIB)
-
-minigzip.exe: minigzip.obj $(STATICLIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
-
-example_d.exe: example.obj $(IMPLIB)
-	$(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
-
-minigzip_d.exe: minigzip.obj $(IMPLIB)
-	$(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $<
-
-.asm.obj:
-	$(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-zlib1.res: win32/zlib1.rc
-	$(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-testdll: example_d.exe minigzip_d.exe
-	example_d
-	echo hello world | minigzip_d | minigzip_d -d
-
-
-# cleanup
-clean:
-	-del $(STATICLIB)
-	-del $(SHAREDLIB)
-	-del $(IMPLIB)
-	-del *.obj
-	-del *.res
-	-del *.exp
-	-del *.exe
-	-del foo.gz
diff --git a/libsrc/zlib/win32/VisualC.txt b/libsrc/zlib/win32/VisualC.txt
deleted file mode 100644
index 579a5fc..0000000
--- a/libsrc/zlib/win32/VisualC.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-To build zlib using the Microsoft Visual C++ environment,
-use the appropriate project from the projects/ directory.
diff --git a/libsrc/zlib/win32/zlib.def b/libsrc/zlib/win32/zlib.def
deleted file mode 100644
index a47cbc1..0000000
--- a/libsrc/zlib/win32/zlib.def
+++ /dev/null
@@ -1,60 +0,0 @@
-LIBRARY
-; zlib data compression library
-
-EXPORTS
-; basic functions
-    zlibVersion
-    deflate
-    deflateEnd
-    inflate
-    inflateEnd
-; advanced functions
-    deflateSetDictionary
-    deflateCopy
-    deflateReset
-    deflateParams
-    deflateBound
-    deflatePrime
-    inflateSetDictionary
-    inflateSync
-    inflateCopy
-    inflateReset
-    inflateBack
-    inflateBackEnd
-    zlibCompileFlags
-; utility functions
-    compress
-    compress2
-    compressBound
-    uncompress
-    gzopen
-    gzdopen
-    gzsetparams
-    gzread
-    gzwrite
-    gzprintf
-    gzputs
-    gzgets
-    gzputc
-    gzgetc
-    gzungetc
-    gzflush
-    gzseek
-    gzrewind
-    gztell
-    gzeof
-    gzclose
-    gzerror
-    gzclearerr
-; checksum functions
-    adler32
-    crc32
-; various hacks, don't look :)
-    deflateInit_
-    deflateInit2_
-    inflateInit_
-    inflateInit2_
-    inflateBackInit_
-    inflateSyncPoint
-    get_crc_table
-    zError
diff --git a/libsrc/zlib/win32/zlib1.rc b/libsrc/zlib/win32/zlib1.rc
deleted file mode 100644
index 99025c9..0000000
--- a/libsrc/zlib/win32/zlib1.rc
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <windows.h>
-
-#ifdef GCC_WINDRES
-VS_VERSION_INFO		VERSIONINFO
-#else
-VS_VERSION_INFO		VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-#endif
-  FILEVERSION		1,2,2,0
-  PRODUCTVERSION	1,2,2,0
-  FILEFLAGSMASK		VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
-  FILEFLAGS		1
-#else
-  FILEFLAGS		0
-#endif
-  FILEOS		VOS_DOS_WINDOWS32
-  FILETYPE		VFT_DLL
-  FILESUBTYPE		0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-    BEGIN
-      VALUE "FileDescription",	"zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.3\0"
-      VALUE "InternalName",	"zlib1.dll\0"
-      VALUE "LegalCopyright",	"(C) 1995-2004 Jean-loup Gailly & Mark Adler\0"
-      VALUE "OriginalFilename",	"zlib1.dll\0"
-      VALUE "ProductName",	"zlib\0"
-      VALUE "ProductVersion",	"1.2.3\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
diff --git a/libsrc/zlib/zconf.h b/libsrc/zlib/zconf.h
deleted file mode 100644
index b620ace..0000000
--- a/libsrc/zlib/zconf.h
+++ /dev/null
@@ -1,332 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.h,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/libsrc/zlib/zconf.in.h b/libsrc/zlib/zconf.in.h
deleted file mode 100644
index d8eee27..0000000
--- a/libsrc/zlib/zconf.in.h
+++ /dev/null
@@ -1,332 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.in.h,v 1.1 2007/03/14 12:54:14 source Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/libsrc/zlib/zlib.3 b/libsrc/zlib/zlib.3
deleted file mode 100644
index 90b8162..0000000
--- a/libsrc/zlib/zlib.3
+++ /dev/null
@@ -1,159 +0,0 @@
-.TH ZLIB 3 "18 July 2005"
-.SH NAME
-zlib \- compression/decompression library
-.SH SYNOPSIS
-[see
-.I zlib.h
-for full description]
-.SH DESCRIPTION
-The
-.I zlib
-library is a general purpose data compression library.
-The code is thread safe.
-It provides in-memory compression and decompression functions,
-including integrity checks of the uncompressed data.
-This version of the library supports only one compression method (deflation)
-but other algorithms will be added later
-and will have the same stream interface.
-.LP
-Compression can be done in a single step if the buffers are large enough
-(for example if an input file is mmap'ed),
-or can be done by repeated calls of the compression function.
-In the latter case,
-the application must provide more input and/or consume the output
-(providing more output space) before each call.
-.LP
-The library also supports reading and writing files in
-.IR gzip (1)
-(.gz) format
-with an interface similar to that of stdio.
-.LP
-The library does not install any signal handler.
-The decoder checks the consistency of the compressed data,
-so the library should never crash even in case of corrupted input.
-.LP
-All functions of the compression library are documented in the file
-.IR zlib.h .
-The distribution source includes examples of use of the library
-in the files
-.I example.c
-and
-.IR minigzip.c .
-.LP
-Changes to this version are documented in the file
-.I ChangeLog
-that accompanies the source,
-and are concerned primarily with bug fixes and portability enhancements.
-.LP
-A Java implementation of
-.I zlib
-is available in the Java Development Kit 1.1:
-.IP
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
-.LP
-A Perl interface to
-.IR zlib ,
-written by Paul Marquess (pmqs at cpan.org),
-is available at CPAN (Comprehensive Perl Archive Network) sites,
-including:
-.IP
-http://www.cpan.org/modules/by-module/Compress/
-.LP
-A Python interface to
-.IR zlib ,
-written by A.M. Kuchling (amk at magnet.com),
-is available in Python 1.5 and later versions:
-.IP
-http://www.python.org/doc/lib/module-zlib.html
-.LP
-A
-.I zlib
-binding for
-.IR tcl (1),
-written by Andreas Kupries (a.kupries at westend.com),
-is availlable at:
-.IP
-http://www.westend.com/~kupries/doc/trf/man/man.html
-.LP
-An experimental package to read and write files in .zip format,
-written on top of
-.I zlib
-by Gilles Vollant (info at winimage.com),
-is available at:
-.IP
-http://www.winimage.com/zLibDll/unzip.html
-and also in the
-.I contrib/minizip
-directory of the main
-.I zlib
-web site.
-.SH "SEE ALSO"
-The
-.I zlib
-web site can be found at either of these locations:
-.IP
-http://www.zlib.org
-.br
-http://www.gzip.org/zlib/
-.LP
-The data format used by the zlib library is described by RFC
-(Request for Comments) 1950 to 1952 in the files:
-.IP
-http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format)
-.br
-http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format)
-.br
-http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format)
-.LP
-These documents are also available in other formats from:
-.IP
-ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-.LP
-Mark Nelson (markn at ieee.org) wrote an article about
-.I zlib
-for the Jan. 1997 issue of  Dr. Dobb's Journal;
-a copy of the article is available at:
-.IP
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
-.SH "REPORTING PROBLEMS"
-Before reporting a problem,
-please check the
-.I zlib
-web site to verify that you have the latest version of
-.IR zlib ;
-otherwise,
-obtain the latest version and see if the problem still exists.
-Please read the
-.I zlib
-FAQ at:
-.IP
-http://www.gzip.org/zlib/zlib_faq.html
-.LP
-before asking for help.
-Send questions and/or comments to zlib at gzip.org,
-or (for the Windows DLL version) to Gilles Vollant (info at winimage.com).
-.SH AUTHORS
-Version 1.2.3
-Copyright (C) 1995-2005 Jean-loup Gailly (jloup at gzip.org)
-and Mark Adler (madler at alumni.caltech.edu).
-.LP
-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.
-See the distribution directory with respect to requirements
-governing redistribution.
-The deflate format used by
-.I zlib
-was defined by Phil Katz.
-The deflate and
-.I zlib
-specifications were written by L. Peter Deutsch.
-Thanks to all the people who reported problems and suggested various
-improvements in
-.IR zlib ;
-who are too numerous to cite here.
-.LP
-UNIX manual page by R. P. C. Rodgers,
-U.S. National Library of Medicine (rodgers at nlm.nih.gov).
-.\" end of man page
diff --git a/libsrc/zlib/zlib.h b/libsrc/zlib/zlib.h
deleted file mode 100644
index 0228179..0000000
--- a/libsrc/zlib/zlib.h
+++ /dev/null
@@ -1,1357 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.3, July 18th, 2005
-
-  Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
-  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        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
-
-/*
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-     The compressed data format used by default by the in-memory functions is
-  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
-  around a deflate stream, which is itself documented in RFC 1951.
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-     This library can optionally read and write gzip streams in memory as well.
-
-     The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: binary or text */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-     gzip header information passed to and from zlib routines.  See RFC 1952
-  for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
-    int     text;       /* true if compressed data believed to be text */
-    uLong   time;       /* modification time */
-    int     xflags;     /* extra flags (not used when writing a gzip file) */
-    int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
-    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
-    uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
-    uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
-    uInt    comm_max;   /* space at comment (only when reading header) */
-    int     hcrc;       /* true if there was or will be a header crc */
-    int     done;       /* true when done reading gzip header (not used
-                           when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
-   The application must update next_in and avail_in when avail_in has
-   dropped to zero. It must update next_out and avail_out when avail_out
-   has dropped to zero. The application must initialize zalloc, zfree and
-   opaque before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application.
-
-   The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   opaque value.
-
-   zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-   On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by zalloc for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
-   The fields total_in and total_out can be used for statistics or
-   progress reports. After compression, total_in holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_FIXED               4
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_TEXT     1
-#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression. The fields
-   zalloc, zfree and opaque must be initialized before by the caller.
-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-   use default allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   msg is set to null if there is no error message.  deflateInit does not
-   perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows. deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-
-  Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating avail_in or avail_out accordingly; avail_out
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-  and with zero avail_out, it must be called again after making room in the
-  output buffer because there might be more output pending.
-
-    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
-  decide how much data to accumualte before producing output, in order to
-  maximize compression.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  avail_in is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-  compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there
-  was enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error. After
-  deflate has returned Z_STREAM_END, the only possible operations on the
-  stream are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step. In this case, avail_out must be at least
-  the value returned by deflateBound (see below). If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update strm->data_type if it can make a good guess about
-  the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   msg may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression. The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-   value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller.  msg is set to null if there is no error
-   message. inflateInit does not perform any decompression apart from reading
-   the zlib header if present: this will be done by inflate().  (So next_in and
-   avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows. inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing
-    will resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there
-    is no more input data or no more space in the output buffer (see below
-    about the flush parameter).
-
-  Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (avail_out == 0), or after each
-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
-  Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer. Z_BLOCK requests that inflate() stop
-  if and when it gets to the next deflate block boundary. When decoding the
-  zlib or gzip format, this will cause inflate() to return immediately after
-  the header and before the first block. When doing a raw inflate, inflate()
-  will go ahead and process the first block, and will return when it gets to
-  the end of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64
-  if inflate() is currently decoding the last block in the deflate stream,
-  plus 128 if inflate() returned immediately after decoding an end-of-block
-  code or decoding the complete header up to just before the first byte of the
-  deflate stream. The end-of-block will not be indicated until all of the
-  uncompressed data from that block has been written to strm->next_out.  The
-  number of unused bits may in general be greater than seven, except when
-  bit 7 of data_type is set, in which case the number of unused bits will be
-  less than eight.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of inflate), the parameter flush should be set to
-  Z_FINISH. In this case all pending input is processed and all pending
-  output is flushed; avail_out must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-  is never required, but can be used to inform inflate that a faster approach
-  may be used for the single inflate() call.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call. So the only effect of the flush parameter in this implementation
-  is on the return value of inflate(), as noted below, or when it returns early
-  because Z_BLOCK is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm->adler to the adler32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the adler32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below. At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() will decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically.  Any information
-  contained in the gzip header is not retained, so applications that need that
-  information should instead use raw inflate, see inflateInit2() below, or
-  inflateBack() and perform their own processing of the gzip header and
-  trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing. If Z_DATA_ERROR is returned, the application may then
-  call inflateSync() to look for a good compression block if a partial recovery
-  of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent. In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options. The
-   fields next_in, zalloc, zfree and opaque must be initialized before by
-   the caller.
-
-     The method parameter is the compression method. It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer). It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
-   determines the window size. deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding. Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper. The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero),
-   no header crc, and the operating system will be set to 255 (unknown).  If a
-   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding). Filtered data consists mostly of small values with a somewhat
-   random distribution. In this case, the compression algorithm is tuned to
-   compress them better. The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
-   Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
-   parameter only affects the compression ratio but not the correctness of the
-   compressed output even if it is not set appropriately.  Z_FIXED prevents the
-   use of dynamic Huffman codes, allowing for a simpler decoder for special
-   applications.
-
-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-   method). msg is set to null if there is no error message.  deflateInit2 does
-   not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any
-   call of deflate. The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   deflate or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front. In addition, the
-   current implementation of deflate will use at most the window size minus
-   262 bytes of the provided dictionary.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort). deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and
-   can consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by deflateInit2.
-
-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to
-   be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-   if strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
-                                    int good_length,
-                                    int max_lazy,
-                                    int nice_length,
-                                    int max_chain));
-/*
-     Fine tune deflate's internal compression parameters.  This should only be
-   used by someone who understands the algorithm used by zlib's deflate for
-   searching for the best matching string, and even then only by the most
-   fanatic optimizer trying to squeeze out the last compressed bit for their
-   specific input data.  Read the deflate.c source code for the meaning of the
-   max_lazy, good_length, nice_length, and max_chain parameters.
-
-     deflateTune() can be called after deflateInit() or deflateInit2(), and
-   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit()
-   or deflateInit2().  This would be used to allocate an output buffer
-   for deflation in a single pass, and so would be called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-  is that this function is used to start off the deflate output with the
-  bits leftover from a previous deflate stream when appending to it.  As such,
-  this function can only be used for raw deflate, and must be used before the
-  first deflate() call after a deflateInit2() or deflateReset().  bits must be
-  less than or equal to 16, and that many of the least significant bits of
-  value will be inserted in the output.
-
-      deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-      deflateSetHeader() provides gzip header information for when a gzip
-   stream is requested by deflateInit2().  deflateSetHeader() may be called
-   after deflateInit2() or deflateReset() and before the first call of
-   deflate().  The text, time, os, extra field, name, and comment information
-   in the provided gz_header structure are written to the gzip header (xflag is
-   ignored -- the extra flags are set according to the compression level).  The
-   caller must assure that, if not Z_NULL, name and comment are terminated with
-   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
-   available there.  If hcrc is true, a gzip header crc is included.  Note that
-   the current versions of the command-line version of gzip (up through version
-   1.3.x) do not support header crc's, and will report that it is a "multi-part
-   gzip file" and give up.
-
-      If deflateSetHeader is not used, the default gzip header has text false,
-   the time set to zero, and os set to 255, with no extra, name, or comment
-   fields.  The gzip header is returned to the default state by deflateReset().
-
-      deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter. The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if inflateInit is used
-   instead. windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used. If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
-   determines the window size. inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream. This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values. If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is. Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding. Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is
-   a crc32 instead of an adler32.
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
-   is set to null if there is no error message.  inflateInit2 does not perform
-   any decompression apart from reading the zlib header if present: this will
-   be done by inflate(). (So next_in and avail_in may be modified, but next_out
-   and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of inflate,
-   if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by that call of inflate.
-   The compressor and decompressor must use exactly the same dictionary (see
-   deflateSetDictionary).  For raw inflate, this function can be called
-   immediately after inflateInit2() or inflateReset() and before any call of
-   inflate() to set the dictionary.  The application must insure that the
-   dictionary that was used for compression is provided.
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value). inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-    Skips invalid compressed data until a full flush point (see above the
-  description of deflate with Z_FULL_FLUSH) can be found, or until all
-  available input is skipped. No output is provided.
-
-    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-  if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of total_in which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call inflateSync, providing more input each time,
-  until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.
-   The stream will keep attributes that may have been set by inflateInit2.
-
-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     This function inserts bits in the inflate input stream.  The intent is
-  that this function is used to start inflating at a bit position in the
-  middle of a byte.  The provided bits will be used before any bytes are used
-  from next_in.  This function should only be used with raw inflate, and
-  should be used before the first inflate() call after inflateInit2() or
-  inflateReset().  bits must be less than or equal to 16, and that many of the
-  least significant bits of value will be inserted in the input.
-
-      inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-      inflateGetHeader() requests that gzip header information be stored in the
-   provided gz_header structure.  inflateGetHeader() may be called after
-   inflateInit2() or inflateReset(), and before the first call of inflate().
-   As inflate() processes the gzip stream, head->done is zero until the header
-   is completed, at which time head->done is set to one.  If a zlib stream is
-   being decoded, then head->done is set to -1 to indicate that there will be
-   no gzip header information forthcoming.  Note that Z_BLOCK can be used to
-   force inflate() to return immediately after header processing is complete
-   and before any actual data is decompressed.
-
-      The text, time, xflags, and os fields are filled in with the gzip header
-   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
-   was valid if done is set to one.)  If extra is not Z_NULL, then extra_max
-   contains the maximum number of bytes to write to extra.  Once done is true,
-   extra_len contains the actual extra field length, and extra contains the
-   extra field, or that field truncated if extra_max is less than extra_len.
-   If name is not Z_NULL, then up to name_max characters are written there,
-   terminated with a zero unless the length is greater than name_max.  If
-   comment is not Z_NULL, then up to comm_max characters are written there,
-   terminated with a zero unless the length is greater than comm_max.  When
-   any of extra, name, or comment are not Z_NULL and the respective field is
-   not present in the header, then that field is set to Z_NULL to signal its
-   absence.  This allows the use of deflateSetHeader() with the returned
-   structure to duplicate the header.  However if those fields are set to
-   allocated memory, then the application will need to save those pointers
-   elsewhere so that they can be eventually freed.
-
-      If inflateGetHeader is not used, then the header information is simply
-   discarded.  The header is always checked for validity, including the header
-   CRC if present.  inflateReset() will reset the process to discard the header
-   information.  The application would need to call inflateGetHeader() again to
-   retrieve the header from the next gzip stream.
-
-      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the paramaters are invalid, Z_MEM_ERROR if the internal state could not
-   be allocated, or Z_VERSION_ERROR if the version of the library does not
-   match the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is more efficient than inflate() for
-   file i/o applications in that it avoids copying between the output and the
-   sliding window by simply making the window itself the output buffer.  This
-   function trusts the application to not change the output buffer passed by
-   the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free
-   the allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects
-   only the raw deflate stream to decompress.  This is different from the
-   normal behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 .. strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format
-   error in the deflate stream (in which case strm->msg is set to indicate the
-   nature of the error), or Z_STREAM_ERROR if the stream was not properly
-   initialized.  In the case of Z_BUF_ERROR, an input or output error can be
-   distinguished using strm->next_in which will be Z_NULL only if in() returned
-   an error.  If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
-   out() returning non-zero.  (in() will always be called before out(), so
-   strm->next_in is assured to be defined if out() returns non-zero.)  Note
-   that inflateBack() cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the
-   basic stream-oriented functions. To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least the value returned
-   by compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-     This function can be used to compress a whole file at once if the
-   input file is mmap'ed.
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before
-   a compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-/*
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h", or 'R' for run-length encoding
-   as in "wb1R". (See the description of deflateInit2 for more information
-   about the strategy parameter.)
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).  */
-
-ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-/*
-     gzdopen() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in gzopen.
-     The next call of gzclose on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-     gzdopen returns NULL if there was insufficient memory to allocate
-   the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy. See the description
-   of deflateInit2 for the meaning of these parameters.
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, gzread copies the given number
-   of bytes into the buffer.
-     gzread returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
-                                   voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes actually written
-   (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).  The number of
-   uncompressed bytes written is limited to 4095. The caller should assure that
-   this limit is not exceeded. If it is exceeded, then gzprintf() will return
-   return an error (0) with nothing written. In this case, there may also be a
-   buffer overflow with unpredictable consequences, which is possible only if
-   zlib was compiled with the insecure functions sprintf() or vsprintf()
-   because the secure snprintf() or vsnprintf() functions were not available.
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-      gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-/*
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-/*
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT    gzungetc OF((int c, gzFile file));
-/*
-      Push one character back onto the stream to be read again later.
-   Only one character of push-back is allowed.  gzungetc() returns the
-   character pushed, or -1 on failure.  gzungetc() will fail if a
-   character has been pushed but not read yet, or if c is -1. The pushed
-   character will be discarded if the stream is repositioned with gzseek()
-   or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function. The return value is the zlib
-   error number (see function gzerror below). gzflush returns Z_OK if
-   the flush parameter is Z_FINISH and all output could be flushed.
-     gzflush should be called only when strictly necessary because it can
-   degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-                                      z_off_t offset, int whence));
-/*
-      Sets the starting position for the next gzread or gzwrite on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-/*
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-
-   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
-     Returns 1 if file is being read directly without decompression, otherwise
-   zero.
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state. The return value is the zlib
-   error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file. This is analogous to the
-   clearerr() function in stdio. This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
-                                          z_off_t len2));
-/*
-     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
-   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
-   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
-   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running CRC-32 with the bytes buf[0..len-1] and return the
-   updated CRC-32. If buf is NULL, this function returns the required initial
-   value for the for the crc. Pre- and post-conditioning (one's complement) is
-   performed within this function so it shouldn't be done by the application.
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-/*
-     Combine two CRC-32 check values into one.  For two sequences of bytes,
-   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
-   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
-   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
-   len2.
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-        ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char   * ZEXPORT zError           OF((int));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
diff --git a/libsrc/zlib/zutil.c b/libsrc/zlib/zutil.c
deleted file mode 100644
index 357322c..0000000
--- a/libsrc/zlib/zutil.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zutil.c,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#include "zutil.h"
-
-#ifndef NO_DUMMY_DECL
-struct internal_state      {int dummy;}; /* for buggy compilers */
-#endif
-
-const char * const z_errmsg[10] = {
-"need dictionary",     /* Z_NEED_DICT       2  */
-"stream end",          /* Z_STREAM_END      1  */
-"",                    /* Z_OK              0  */
-"file error",          /* Z_ERRNO         (-1) */
-"stream error",        /* Z_STREAM_ERROR  (-2) */
-"data error",          /* Z_DATA_ERROR    (-3) */
-"insufficient memory", /* Z_MEM_ERROR     (-4) */
-"buffer error",        /* Z_BUF_ERROR     (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
-    return ZLIB_VERSION;
-}
-
-uLong ZEXPORT zlibCompileFlags()
-{
-    uLong flags;
-
-    flags = 0;
-    switch (sizeof(uInt)) {
-    case 2:     break;
-    case 4:     flags += 1;     break;
-    case 8:     flags += 2;     break;
-    default:    flags += 3;
-    }
-    switch (sizeof(uLong)) {
-    case 2:     break;
-    case 4:     flags += 1 << 2;        break;
-    case 8:     flags += 2 << 2;        break;
-    default:    flags += 3 << 2;
-    }
-    switch (sizeof(voidpf)) {
-    case 2:     break;
-    case 4:     flags += 1 << 4;        break;
-    case 8:     flags += 2 << 4;        break;
-    default:    flags += 3 << 4;
-    }
-    switch (sizeof(z_off_t)) {
-    case 2:     break;
-    case 4:     flags += 1 << 6;        break;
-    case 8:     flags += 2 << 6;        break;
-    default:    flags += 3 << 6;
-    }
-#ifdef DEBUG
-    flags += 1 << 8;
-#endif
-#if defined(ASMV) || defined(ASMINF)
-    flags += 1 << 9;
-#endif
-#ifdef ZLIB_WINAPI
-    flags += 1 << 10;
-#endif
-#ifdef BUILDFIXED
-    flags += 1 << 12;
-#endif
-#ifdef DYNAMIC_CRC_TABLE
-    flags += 1 << 13;
-#endif
-#ifdef NO_GZCOMPRESS
-    flags += 1L << 16;
-#endif
-#ifdef NO_GZIP
-    flags += 1L << 17;
-#endif
-#ifdef PKZIP_BUG_WORKAROUND
-    flags += 1L << 20;
-#endif
-#ifdef FASTEST
-    flags += 1L << 21;
-#endif
-#ifdef STDC
-#  ifdef NO_vsnprintf
-        flags += 1L << 25;
-#    ifdef HAS_vsprintf_void
-        flags += 1L << 26;
-#    endif
-#  else
-#    ifdef HAS_vsnprintf_void
-        flags += 1L << 26;
-#    endif
-#  endif
-#else
-        flags += 1L << 24;
-#  ifdef NO_snprintf
-        flags += 1L << 25;
-#    ifdef HAS_sprintf_void
-        flags += 1L << 26;
-#    endif
-#  else
-#    ifdef HAS_snprintf_void
-        flags += 1L << 26;
-#    endif
-#  endif
-#endif
-    return flags;
-}
-
-#ifdef DEBUG
-
-#  ifndef verbose
-#    define verbose 0
-#  endif
-int z_verbose = verbose;
-
-void z_error (m)
-    char *m;
-{
-    fprintf(stderr, "%s\n", m);
-    exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
-    int err;
-{
-    return ERR_MSG(err);
-}
-
-#if defined(_WIN32_WCE)
-    /* The Microsoft C Run-Time Library for Windows CE doesn't have
-     * errno.  We define it as a global variable to simplify porting.
-     * Its value is always 0 and should not be used.
-     */
-    int errno = 0;
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
-    Bytef* dest;
-    const Bytef* source;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = *source++; /* ??? to be unrolled */
-    } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
-    const Bytef* s1;
-    const Bytef* s2;
-    uInt  len;
-{
-    uInt j;
-
-    for (j = 0; j < len; j++) {
-        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
-    }
-    return 0;
-}
-
-void zmemzero(dest, len)
-    Bytef* dest;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = 0;  /* ??? to be unrolled */
-    } while (--len != 0);
-}
-#endif
-
-
-#ifdef SYS16BIT
-
-#ifdef __TURBOC__
-/* Turbo C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
-    voidpf org_ptr;
-    voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    voidpf buf = opaque; /* just to make some compilers happy */
-    ulg bsize = (ulg)items*size;
-
-    /* If we allocate less than 65520 bytes, we assume that farmalloc
-     * will return a usable pointer which doesn't have to be normalized.
-     */
-    if (bsize < 65520L) {
-        buf = farmalloc(bsize);
-        if (*(ush*)&buf != 0) return buf;
-    } else {
-        buf = farmalloc(bsize + 16L);
-    }
-    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
-    table[next_ptr].org_ptr = buf;
-
-    /* Normalize the pointer to seg:0 */
-    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
-    *(ush*)&buf = 0;
-    table[next_ptr++].new_ptr = buf;
-    return buf;
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    int n;
-    if (*(ush*)&ptr != 0) { /* object < 64K */
-        farfree(ptr);
-        return;
-    }
-    /* Find the original pointer */
-    for (n = 0; n < next_ptr; n++) {
-        if (ptr != table[n].new_ptr) continue;
-
-        farfree(table[n].org_ptr);
-        while (++n < next_ptr) {
-            table[n-1] = table[n];
-        }
-        next_ptr--;
-        return;
-    }
-    ptr = opaque; /* just to make some compilers happy */
-    Assert(0, "zcfree: ptr not found");
-}
-
-#endif /* __TURBOC__ */
-
-
-#ifdef M_I86
-/* Microsoft C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-#  define _halloc  halloc
-#  define _hfree   hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    return _halloc((long)items, size);
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    _hfree(ptr);
-}
-
-#endif /* M_I86 */
-
-#endif /* SYS16BIT */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern voidp  calloc OF((uInt items, uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
-    voidpf opaque;
-    unsigned items;
-    unsigned size;
-{
-    if (opaque) items += size - size; /* make compiler happy */
-    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
-                              (voidpf)calloc(items, size);
-}
-
-void  zcfree (opaque, ptr)
-    voidpf opaque;
-    voidpf ptr;
-{
-    free(ptr);
-    if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
diff --git a/libsrc/zlib/zutil.h b/libsrc/zlib/zutil.h
deleted file mode 100644
index 55d2102..0000000
--- a/libsrc/zlib/zutil.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: zutil.h,v 1.2 2007/03/14 12:54:14 source Exp $ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#ifdef STDC
-#  ifndef _WIN32_WCE
-#    include <stddef.h>
-#  endif
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-#   ifdef _WIN32_WCE
-      /* The Microsoft C Run-Time Library for Windows CE doesn't have
-       * errno.  We define it as a global variable to simplify porting.
-       * Its value is always 0 and should not be used.  We rename it to
-       * avoid conflict with other libraries that use the same workaround.
-       */
-#     define errno z_errno
-#   endif
-    extern int errno;
-#else
-#  ifndef _WIN32_WCE
-#    include <errno.h>
-#  endif
-#endif
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char  uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long  ulg;
-
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
-  return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
-        /* common constants */
-
-#ifndef DEF_WBITS
-#  define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES    2
-/* The three kinds of block type */
-
-#define MIN_MATCH  3
-#define MAX_MATCH  258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-        /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-#  define OS_CODE  0x00
-#  if defined(__TURBOC__) || defined(__BORLANDC__)
-#    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-       /* Allow compilation with ANSI keywords only enabled */
-       void _Cdecl farfree( void *block );
-       void *_Cdecl farmalloc( unsigned long nbytes );
-#    else
-#      include <alloc.h>
-#    endif
-#  else /* MSC or DJGPP */
-#    include <malloc.h>
-#  endif
-#endif
-
-#ifdef AMIGA
-#  define OS_CODE  0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-#  define OS_CODE  0x02
-#  define F_OPEN(name, mode) \
-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-#  define OS_CODE  0x05
-#endif
-
-#ifdef OS2
-#  define OS_CODE  0x06
-#  ifdef M_I86
-     #include <malloc.h>
-#  endif
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-#  define OS_CODE  0x07
-#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#    include <unix.h> /* for fdopen */
-#  else
-#    ifndef fdopen
-#      define fdopen(fd,mode) NULL /* No fdopen() */
-#    endif
-#  endif
-#endif
-
-#ifdef TOPS20
-#  define OS_CODE  0x0a
-#endif
-
-#ifdef WIN32
-#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
-#    define OS_CODE  0x0b
-#  endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-#  define OS_CODE  0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-#  define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
-#  if defined(_WIN32_WCE)
-#    define fdopen(fd,mode) NULL /* No fdopen() */
-#    ifndef _PTRDIFF_T_DEFINED
-       typedef int ptrdiff_t;
-#      define _PTRDIFF_T_DEFINED
-#    endif
-#  else
-#    define fdopen(fd,type)  _fdopen(fd,type)
-#  endif
-#endif
-
-        /* common defaults */
-
-#ifndef OS_CODE
-#  define OS_CODE  0x03  /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-#  define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
-         /* functions */
-
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-#  ifndef HAVE_VSNPRINTF
-#    define HAVE_VSNPRINTF
-#  endif
-#endif
-#if defined(__CYGWIN__)
-#  ifndef HAVE_VSNPRINTF
-#    define HAVE_VSNPRINTF
-#  endif
-#endif
-#ifndef HAVE_VSNPRINTF
-#  ifdef MSDOS
-     /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
-        but for now we just assume it doesn't. */
-#    define NO_vsnprintf
-#  endif
-#  ifdef __TURBOC__
-#    define NO_vsnprintf
-#  endif
-#  ifdef WIN32
-     /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-#    if !defined(vsnprintf) && !defined(NO_vsnprintf)
-#      define vsnprintf _vsnprintf
-#    endif
-#  endif
-#  ifdef __SASC
-#    define NO_vsnprintf
-#  endif
-#endif
-#ifdef VMS
-#  define NO_vsnprintf
-#endif
-
-#if defined(pyr)
-#  define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
-  * You may have to use the same strategy for Borland C (untested).
-  * The __SC__ check is for Symantec.
-  */
-#  define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-#  define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-#    define zmemcpy _fmemcpy
-#    define zmemcmp _fmemcmp
-#    define zmemzero(dest, len) _fmemset(dest, 0, len)
-#  else
-#    define zmemcpy memcpy
-#    define zmemcmp memcmp
-#    define zmemzero(dest, len) memset(dest, 0, len)
-#  endif
-#else
-   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
-   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
-   extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  include <stdio.h>
-   extern int z_verbose;
-   extern void z_error    OF((char *m));
-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void   zcfree  OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
-           (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* ZUTIL_H */
diff --git a/win32/ab_vad.vcproj b/win32/ab_vad.vcproj
deleted file mode 100644
index c883103..0000000
--- a/win32/ab_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_adressbook_vad"
-	ProjectGUID="{20D26EE8-E1BA-11DB-930B-CD6B662399AA}"
-	RootNamespace="ods_adressbook_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_adressbook_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_adressbook_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_adressbook_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_adressbook_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Addressbook\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_addressbook_dav.vad;$(InputDir)\ods_addressbook_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_addressbook_dav.vad;$(InputDir)\ods_addressbook_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/blobs.vcproj b/win32/blobs.vcproj
deleted file mode 100644
index 7181ae1..0000000
--- a/win32/blobs.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="blobs"
-	ProjectGUID="{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\blobs"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/blobs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\blobs/blobs.pch"
-				AssemblerListingLocation="$(ConfigurationName)\blobs/"
-				ObjectFile="$(ConfigurationName)\blobs/"
-				ProgramDataBaseFileName="$(ConfigurationName)\blobs/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/blobs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/blobs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\blobs"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/blobs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\blobs/blobs.pch"
-				AssemblerListingLocation="$(ConfigurationName)\blobs/"
-				ObjectFile="$(ConfigurationName)\blobs/"
-				ProgramDataBaseFileName="$(ConfigurationName)\blobs/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/blobs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/blobs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\blobs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/blog_vad.vcproj b/win32/blog_vad.vcproj
deleted file mode 100644
index 16d022b..0000000
--- a/win32/blog_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_blog_vad"
-	ProjectGUID="{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}"
-	RootNamespace="ods_blog_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_blog_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_blog_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_blog_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_blog_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Blog\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_blog_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_blog_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/bookmark_vad.vcproj b/win32/bookmark_vad.vcproj
deleted file mode 100644
index bbf73cb..0000000
--- a/win32/bookmark_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_bookmark_vad"
-	ProjectGUID="{8A49554A-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_bookmark_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Bookmark\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_bookmark_dav.vad;$(InputDir)\ods_bookmark_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_bookmark_dav.vad;$(InputDir)\ods_bookmark_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/bpel_vad.vcproj b/win32/bpel_vad.vcproj
deleted file mode 100644
index cbe9868..0000000
--- a/win32/bpel_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="bpel_vad"
-	ProjectGUID="{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="bpel_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\bpel_vad"
-			IntermediateDirectory="$(ConfigurationName)\bpel_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\bpel_vad"
-			IntermediateDirectory="$(ConfigurationName)\bpel_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\bpel\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\bpel_dav.vad;$(InputDir)\bpel_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\bpel_dav.vad;$(InputDir)\bpel_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/briefcase_vad.vcproj b/win32/briefcase_vad.vcproj
deleted file mode 100644
index f972f0b..0000000
--- a/win32/briefcase_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_briefcase_vad"
-	ProjectGUID="{55215A1C-EFE2-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_briefcase_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Briefcase\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\ods_briefcase_dav.vad;$(InputDir)\ods_briefcase_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_briefcase_dav.vad;$(InputDir)\ods_briefcase_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/burstoff.vcproj b/win32/burstoff.vcproj
deleted file mode 100644
index 7cecbe0..0000000
--- a/win32/burstoff.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="burstoff"
-	ProjectGUID="{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\burstoff"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/burstoff.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\burstoff/burstoff.pch"
-				AssemblerListingLocation="$(ConfigurationName)\burstoff/"
-				ObjectFile="$(ConfigurationName)\burstoff/"
-				ProgramDataBaseFileName="$(ConfigurationName)\burstoff/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/burstoff.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/burstoff.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\burstoff"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/burstoff.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\burstoff/burstoff.pch"
-				AssemblerListingLocation="$(ConfigurationName)\burstoff/"
-				ObjectFile="$(ConfigurationName)\burstoff/"
-				ProgramDataBaseFileName="$(ConfigurationName)\burstoff/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/burstoff.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/burstoff.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\burstoff.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/calendar_vad.vcproj b/win32/calendar_vad.vcproj
deleted file mode 100644
index 00e6c1e..0000000
--- a/win32/calendar_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_calendar_vad"
-	ProjectGUID="{351A8882-FD57-11DB-B29C-A18F012B09DC}"
-	RootNamespace="ods_calendar_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_calendar_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_calendar_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_calendar_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_calendar_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Calendar\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_calendar_dav.vad;$(InputDir)\ods_calendar_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_calendar_dav.vad;$(InputDir)\ods_calendar_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/community_vad.vcproj b/win32/community_vad.vcproj
deleted file mode 100644
index b12cbd5..0000000
--- a/win32/community_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_community_vad"
-	ProjectGUID="{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_community_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_community_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_community_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_community_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_community_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Community\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_community_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_community_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/conductor_vad.vcproj b/win32/conductor_vad.vcproj
deleted file mode 100644
index 26c5168..0000000
--- a/win32/conductor_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="conductor_vad"
-	ProjectGUID="{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="conductor_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\conductor_vad"
-			IntermediateDirectory="$(ConfigurationName)\conductor_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\conductor_vad"
-			IntermediateDirectory="$(ConfigurationName)\conductor_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\yacutia\mkvad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash mkvad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\conductor_dav.vad;$(InputDir)\conductor_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash mkvad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\conductor_dav.vad;$(InputDir)\conductor_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/creolewiki.vcproj b/win32/creolewiki.vcproj
deleted file mode 100644
index 444f9a9..0000000
--- a/win32/creolewiki.vcproj
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="creolewiki"
-	ProjectGUID="{ABE43C46-E1C4-11DB-930B-CD6B662399AA}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/creolewiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\creolewiki/creolewiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\creolewiki/"
-				ObjectFile="$(ConfigurationName)\creolewiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\creolewiki/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/creolewiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\creolewiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/creolewiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/creolewiki.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/creolewiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\creolewiki/creolewiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\creolewiki/"
-				ObjectFile="$(ConfigurationName)\creolewiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\creolewiki/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/creolewiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\creolewiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/creolewiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/creolewiki.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\creole_maclex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\creole_wikilex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\creolewiki.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-		<Filter
-			Name="LexFiles"
-			>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\creole_maclex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f creole_maclex.c&#x0D;&#x0A;flex -8 -Pcreolemacyy -ocreole_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\creole_maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f creole_maclex.c&#x0D;&#x0A;flex -8 -Pcreolemacyy -ocreole_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\creole_maclex.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\creole_wikilex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f creole_wikilex.c&#x0D;&#x0A;flex -8 -Pcreolewikiyy -ocreole_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\creole_wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f creole_wikilex.c&#x0D;&#x0A;flex -8 -Pcreolewikiyy -ocreole_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\creole_wikilex.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/cursor.vcproj b/win32/cursor.vcproj
deleted file mode 100644
index a2d4d21..0000000
--- a/win32/cursor.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="cursor"
-	ProjectGUID="{97D467CE-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\cursor"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cursor.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\cursor/cursor.pch"
-				AssemblerListingLocation="$(ConfigurationName)\cursor/"
-				ObjectFile="$(ConfigurationName)\cursor/"
-				ProgramDataBaseFileName="$(ConfigurationName)\cursor/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/cursor.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cursor.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\cursor"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cursor.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\cursor/cursor.pch"
-				AssemblerListingLocation="$(ConfigurationName)\cursor/"
-				ObjectFile="$(ConfigurationName)\cursor/"
-				ProgramDataBaseFileName="$(ConfigurationName)\cursor/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/cursor.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cursor.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\cursor.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/cutter.vcproj b/win32/cutter.vcproj
deleted file mode 100644
index a5f9685..0000000
--- a/win32/cutter.vcproj
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="cutter"
-	ProjectGUID="{6E10B655-C324-491F-B202-73565D6B30FB}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\cutter"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cutter.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="_CONSOLE,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\cutter/cutter.pch"
-				AssemblerListingLocation="$(ConfigurationName)\cutter/"
-				ObjectFile="$(ConfigurationName)\cutter/"
-				ProgramDataBaseFileName="$(ConfigurationName)\cutter/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				OutputFile="$(ConfigurationName)/cutter.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cutter.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\cutter"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cutter.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\cutter/isql.pch"
-				AssemblerListingLocation="$(ConfigurationName)\cutter/"
-				ObjectFile="$(ConfigurationName)\cutter/"
-				ProgramDataBaseFileName="$(ConfigurationName)\cutter/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				OutputFile="$(ConfigurationName)/cutter.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cutter.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\sqldoc\cutter.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/demodb.vcproj b/win32/demodb.vcproj
deleted file mode 100644
index b491099..0000000
--- a/win32/demodb.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="demodb"
-	ProjectGUID="{CA03DBF1-2C7E-4732-8F41-65030876DDE7}"
-	RootNamespace="demodb"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\demodb"
-			IntermediateDirectory="$(ConfigurationName)\demodb"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\demodb"
-			IntermediateDirectory="$(ConfigurationName)\demodb"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\samples\demo\mkdemo.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set BINDIR=$(TargetDir)\..&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;rmdir /S /Q docsrc&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;bash mkdemo.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe;..\binsrc\bpel\bpel_dav.vad;..\binsrc\yacutia\conductor_dav.vad;..\binsrc\samples\demo\doc_dav.vad;..\binsrc\tutorial\tutorial_dav.vad"
-					Outputs="$(InputDir)\demo.db;$(InputDir)\demo_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set BINDIR=$(TargetDir)\..&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;rmdir /S /Q docsrc&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;bash mkdemo.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe;..\binsrc\bpel\bpel_dav.vad;..\binsrc\yacutia\conductor_dav.vad;..\binsrc\samples\demo\doc_dav.vad;..\binsrc\tutorial\tutorial_dav.vad"
-					Outputs="$(InputDir)\demo.db;$(InputDir)\demo_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/dk1t.vcproj b/win32/dk1t.vcproj
deleted file mode 100644
index 10c97ec..0000000
--- a/win32/dk1t.vcproj
+++ /dev/null
@@ -1,274 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="dk1t"
-	ProjectGUID="{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}"
-	RootNamespace="dk1t"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\dk1t"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile=""
-				AssemblerListingLocation="$(ConfigurationName)\dk1t/"
-				ObjectFile="$(ConfigurationName)\dk1t/"
-				ProgramDataBaseFileName="$(ConfigurationName)\dk1t/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dk1t.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\dk1t"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\dk1t\dk1t.pch"
-				AssemblerListingLocation="$(ConfigurationName)\dk1t/"
-				ObjectFile="$(ConfigurationName)\dk1t/"
-				ProgramDataBaseFileName="$(ConfigurationName)\dk1t/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dk1t.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\config.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkalloc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbasket.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbox.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkdevice.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhashext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkmarshal.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkpool.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkresource.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkrusage.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkses2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesinp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksession.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesstr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksestcp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksets.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstkern.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/dksrv.vcproj b/win32/dksrv.vcproj
deleted file mode 100644
index cdc6d81..0000000
--- a/win32/dksrv.vcproj
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="dksrv"
-	ProjectGUID="{58867EBA-CA07-4F41-A966-6245FF14773E}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\dksrv"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile=""
-				AssemblerListingLocation="$(ConfigurationName)\dksrv/"
-				ObjectFile="$(ConfigurationName)\dksrv/"
-				ProgramDataBaseFileName="$(ConfigurationName)\dksrv/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dksrv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\dksrv"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\dksrv/dksrv.pch"
-				AssemblerListingLocation="$(ConfigurationName)\dksrv/"
-				ObjectFile="$(ConfigurationName)\dksrv/"
-				ProgramDataBaseFileName="$(ConfigurationName)\dksrv/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dksrv.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\Dkalloc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbasket.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbox.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkdevice.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkernel.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhashext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkmarshal.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkpool.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkresource.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkrusage.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkses2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesinp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksession.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesstr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksestcp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksets.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\Dkalloc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbasket.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbox.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkconfig.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkdevice.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkernel.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhash.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhashext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkmarshal.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkparam.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkpool.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkresource.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksession.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksets.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksystem.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dktrace.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dktypes.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkutil.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/doc_vad.vcproj b/win32/doc_vad.vcproj
deleted file mode 100644
index 6910133..0000000
--- a/win32/doc_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="doc_vad"
-	ProjectGUID="{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="doc_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\doc_vad"
-			IntermediateDirectory="$(ConfigurationName)\doc_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\doc_vad"
-			IntermediateDirectory="$(ConfigurationName)\doc_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\samples\demo\mkdoc.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;set CUTTER=cutter.exe&#x0D;&#x0A;bash mkdoc.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-					Outputs="$(InputDir)\doc_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;set CUTTER=cutter.exe&#x0D;&#x0A;bash mkdoc.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\doc_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/feeds_vad.vcproj b/win32/feeds_vad.vcproj
deleted file mode 100644
index 2890130..0000000
--- a/win32/feeds_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_feedmanager_vad"
-	ProjectGUID="{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_feedmanager_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-FeedManager\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_feedmanager_dav.vad;$(InputDir)\ods_feedmanager_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_feedmanager_dav.vad;$(InputDir)\ods_feedmanager_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/gallery_vad.vcproj b/win32/gallery_vad.vcproj
deleted file mode 100644
index 0864d85..0000000
--- a/win32/gallery_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_gallery_vad"
-	ProjectGUID="{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_gallery_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_gallery_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_gallery_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_gallery_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_gallery_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Gallery\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_gallery_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_gallery_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/getdata.vcproj b/win32/getdata.vcproj
deleted file mode 100644
index 182f9a3..0000000
--- a/win32/getdata.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="getdata"
-	ProjectGUID="{AFB15514-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\getdata"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/getdata.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\getdata/getdata.pch"
-				AssemblerListingLocation="$(ConfigurationName)\getdata/"
-				ObjectFile="$(ConfigurationName)\getdata/"
-				ProgramDataBaseFileName="$(ConfigurationName)\getdata/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/getdata.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/getdata.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\getdata"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/getdata.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\getdata/getdata.pch"
-				AssemblerListingLocation="$(ConfigurationName)\getdata/"
-				ObjectFile="$(ConfigurationName)\getdata/"
-				ProgramDataBaseFileName="$(ConfigurationName)\getdata/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/getdata.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/getdata.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\getdata.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/hosting_perl.vcproj b/win32/hosting_perl.vcproj
deleted file mode 100644
index 912d701..0000000
--- a/win32/hosting_perl.vcproj
+++ /dev/null
@@ -1,276 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hosting_perl"
-	ProjectGUID="{354809B6-CF7B-11DA-85E2-A4E5714C712A}"
-	RootNamespace="hosting_perl"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_perl"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_perl.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PERL_CFLAGS)"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_perl/hosting_perl.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_perl/"
-				ObjectFile="$(ConfigurationName)\hosting_perl/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_perl/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PERL_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_perl.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\perl\hosting_perl.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_perl.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_perl.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_perl"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_perl.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PERL_CFLAGS)"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_perl/hosting_perl.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_perl/"
-				ObjectFile="$(ConfigurationName)\hosting_perl/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_perl/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PERL_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_perl.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\perl\hosting_perl.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_perl.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_perl.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\perl\hosting_perl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\perl\virt_handler.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="SqlFiles"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\perl\pl_to_c.awk"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/hosting_php.vcproj b/win32/hosting_php.vcproj
deleted file mode 100644
index fccc61c..0000000
--- a/win32/hosting_php.vcproj
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hosting_php"
-	ProjectGUID="{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}"
-	RootNamespace="hosting_php"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_php"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_php.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;php5;php5\main;php5\Zend;php5\ext;php5\regex;php5\TSRM;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=1;MSVC5;ZEND_WIN32;_USE_32BIT_TIME_T"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_php/hosting_php.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_php/"
-				ObjectFile="$(ConfigurationName)\hosting_php/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_php/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib php5ts.lib"
-				OutputFile="$(ConfigurationName)/hosting_php.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,.\php5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\php\hosting_php.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_php.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_php.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_php"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_php.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;php5;php5\main;php5\Zend;php5\ext;php5\regex;php5\TSRM;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;_PHP;_PHP_WIN32;_MBCS;WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;_MBCS;WIN32;ZTS;ZEND_DEBUG=1;MSVC5;ZEND_WIN32;_MBCS;WIN32"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_php/hosting_php.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_php/"
-				ObjectFile="$(ConfigurationName)\hosting_php/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_php/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib php5ts.lib"
-				OutputFile="$(ConfigurationName)/hosting_php.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,.\php5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\php\hosting_php.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_php.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_php.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\php\hosting_php.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/hosting_python.vcproj b/win32/hosting_python.vcproj
deleted file mode 100644
index 0859afb..0000000
--- a/win32/hosting_python.vcproj
+++ /dev/null
@@ -1,276 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hosting_python"
-	ProjectGUID="{B525A234-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="hosting_python"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_python"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_python.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PYTHON_CFLAGS)"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_python/hosting_python.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_python/"
-				ObjectFile="$(ConfigurationName)\hosting_python/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_python/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PYTHON_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_python.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\python\hosting_python.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_python.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_python.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_python"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_python.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PYTHON_CFLAGS)"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_python/hosting_python.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_python/"
-				ObjectFile="$(ConfigurationName)\hosting_python/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_python/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386  $(PYTHON_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_python.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\python\hosting_python.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_python.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_python.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\python\hosting_python.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\python\virt_handler.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="SqlFiles"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\python\py_to_c.awk"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f py_to_c.awk virt_handler.py > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f py_to_c.awk virt_handler.py > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/hslookup.vcproj b/win32/hslookup.vcproj
deleted file mode 100644
index 5b5f3a0..0000000
--- a/win32/hslookup.vcproj
+++ /dev/null
@@ -1,250 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hslookup"
-	ProjectGUID="{14ECED18-FB38-11DC-8216-8B38A5565D8C}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hslookup"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hslookup.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;hcc5\"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hslookup/hslookup.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hslookup/"
-				ObjectFile="$(ConfigurationName)\hslookup/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hslookup/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib handle.lib"
-				OutputFile="$(ConfigurationName)/hslookup.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,hcc5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\hslookup\hslookup.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(ConfigurationName)/hslookup.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hslookup.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hslookup"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hslookup.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,.;hcc5\"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hslookup/hslookup.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hslookup/"
-				ObjectFile="$(ConfigurationName)\hslookup/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hslookup/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib handle.lib"
-				OutputFile="$(ConfigurationName)/hslookup.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl;hcc5\"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\hslookup\hslookup.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hslookup.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hslookup.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\samples\hslookup\hslookup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/im.vcproj b/win32/im.vcproj
deleted file mode 100644
index 389a89c..0000000
--- a/win32/im.vcproj
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="im"
-	ProjectGUID="{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="im"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\im"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/im.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;.;.\ImageMagick"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\im/im.pch"
-				AssemblerListingLocation="$(ConfigurationName)\im/"
-				ObjectFile="$(ConfigurationName)\im/"
-				ProgramDataBaseFileName="$(ConfigurationName)\im/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib CORE_RL_wand_.lib CORE_RL_coders_.lib CORE_RL_magick_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_bzlib_.lib CORE_RL_zlib_.lib CORE_RL_lcms_.lib CORE_RL_tiff_.lib CORE_RL_filters_.lib CORE_RL_jpeg_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_png_.lib CORE_RL_wmf_.lib CORE_RL_libxml_.lib"
-				OutputFile="$(ConfigurationName)/im.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;.\ImageMagick"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\image_magick\im.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(ConfigurationName)/im.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/im.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\im"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/im.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\plugin;..\binsrc\driver\include..\libsrc\Dk;..\libsrc\util\win32;..\libsrc;..\libsrc\Xml.new;openssl;.;.\ImageMagick"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\im/im.pch"
-				AssemblerListingLocation="$(ConfigurationName)\im/"
-				ObjectFile="$(ConfigurationName)\im/"
-				ProgramDataBaseFileName="$(ConfigurationName)\im/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib CORE_RL_wand_.lib CORE_RL_coders_.lib CORE_RL_magick_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_bzlib_.lib CORE_RL_zlib_.lib CORE_RL_lcms_.lib CORE_RL_tiff_.lib CORE_RL_filters_.lib CORE_RL_jpeg_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_png_.lib CORE_RL_wmf_.lib CORE_RL_libxml_.lib"
-				OutputFile="$(ConfigurationName)/im.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;.\ImageMagick"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\image_magick\im.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/im.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/im.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\samples\image_magick\im.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/ins.vcproj b/win32/ins.vcproj
deleted file mode 100644
index 20d529d..0000000
--- a/win32/ins.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ins"
-	ProjectGUID="{C6C66924-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\ins"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/ins.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\ins/ins.pch"
-				AssemblerListingLocation="$(ConfigurationName)\ins/"
-				ObjectFile="$(ConfigurationName)\ins/"
-				ProgramDataBaseFileName="$(ConfigurationName)\ins/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/ins.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/ins.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\ins"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/ins.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\ins/ins.pch"
-				AssemblerListingLocation="$(ConfigurationName)\ins/"
-				ObjectFile="$(ConfigurationName)\ins/"
-				ProgramDataBaseFileName="$(ConfigurationName)\ins/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/ins.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/ins.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\ins.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/isparql_vad.vcproj b/win32/isparql_vad.vcproj
deleted file mode 100644
index 092881c..0000000
--- a/win32/isparql_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="isparql_vad"
-	ProjectGUID="{6260E42E-239D-11DB-9594-FD7021681415}"
-	RootNamespace="isparql_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\isparql_vad"
-			IntermediateDirectory="$(ConfigurationName)\isparql_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\isparql_vad"
-			IntermediateDirectory="$(ConfigurationName)\isparql_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\isparql\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\isparql_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\isparql_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/isql.vcproj b/win32/isql.vcproj
deleted file mode 100644
index 5bc78c9..0000000
--- a/win32/isql.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="isqlo"
-	ProjectGUID="{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\isql"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\isql/isql.pch"
-				AssemblerListingLocation="$(ConfigurationName)\isql/"
-				ObjectFile="$(ConfigurationName)\isql/"
-				ProgramDataBaseFileName="$(ConfigurationName)\isql/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="Ws2_32.lib odbc32.lib odbccp32.lib"
-				OutputFile="$(ConfigurationName)/isqlo.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\isql"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\isql/isql.pch"
-				AssemblerListingLocation="$(ConfigurationName)\isql/"
-				ObjectFile="$(ConfigurationName)\isql/"
-				ProgramDataBaseFileName="$(ConfigurationName)\isql/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="Ws2_32.lib odbc32.lib odbccp32.lib"
-				OutputFile="$(ConfigurationName)/isqlo.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\isql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/isql_native.vcproj b/win32/isql_native.vcproj
deleted file mode 100644
index d980674..0000000
--- a/win32/isql_native.vcproj
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="isql"
-	ProjectGUID="{AFB1D909-86D0-49DE-8BD8-DF89349F934E}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\isql_native"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\isql_native/isql_native.pch"
-				AssemblerListingLocation="$(ConfigurationName)\isql_native/"
-				ObjectFile="$(ConfigurationName)\isql_native/"
-				ProgramDataBaseFileName="$(ConfigurationName)\isql_native/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isql.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\isql_native"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\isql_native/isql_native.pch"
-				AssemblerListingLocation="$(ConfigurationName)\isql_native/"
-				ObjectFile="$(ConfigurationName)\isql_native/"
-				ProgramDataBaseFileName="$(ConfigurationName)\isql_native/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isql.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\isql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/libvirtuoso_odbc_t.vcproj b/win32/libvirtuoso_odbc_t.vcproj
deleted file mode 100644
index c811e43..0000000
--- a/win32/libvirtuoso_odbc_t.vcproj
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="libvirtuoso_t"
-	ProjectGUID="{FB836C59-41E1-48EA-A59B-460AB56587EE}"
-	RootNamespace="libvirtuoso_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\libvirtuoso_t"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;PACKAGE_VERSION=\"6.1.3\""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="4"
-				CompileAs="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(OutDir)/libvirtuoso-t.dll"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtuoso\libviwin32.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/libvirtuoso_t.pdb"
-				SubSystem="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\libvirtuoso_t"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="PACKAGE_VERSION=\"6.1.3\";_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(OutDir)/libvirtuoso-t.dll"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtuoso\libviwin32.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(OutDir)/libvirtuoso_t.pdb"
-				SubSystem="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\virtuoso\viconfig.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtuoso\viwin32.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/mail_vad.vcproj b/win32/mail_vad.vcproj
deleted file mode 100644
index 9998a42..0000000
--- a/win32/mail_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_webmail_vad"
-	ProjectGUID="{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_webmail_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_webmail_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_webmail_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_webmail_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_webmail_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-WebMail\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\ods_webmail_dav.vad;$(InputDir)\ods_webmail_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_webmail_dav.vad;$(InputDir)\ods_webmail_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/maildrop.vcproj b/win32/maildrop.vcproj
deleted file mode 100644
index 5f97225..0000000
--- a/win32/maildrop.vcproj
+++ /dev/null
@@ -1,304 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="maildrop"
-	ProjectGUID="{C5F98602-E5B9-11DA-85E2-A4E5714C712A}"
-	RootNamespace="maildrop"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\maildrop"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				CommandLine="midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" mailmsg.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" smtpevent.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" cdosys.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" seo.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" msado15.idl&#x0D;&#x0A;"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/maildrop.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\plugin;..\binsrc\driver\include..\libsrc\Dk;..\libsrc\util\win32;..\libsrc;..\binsrc\maildrop\win32\gen;..\binsrc\maildrop;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\maildrop/maildrop.pch"
-				AssemblerListingLocation="$(ConfigurationName)\maildrop/"
-				ObjectFile="$(ConfigurationName)\maildrop/"
-				ProgramDataBaseFileName="$(ConfigurationName)\maildrop/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/maildrop.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\maildrop\win32\maildrop.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/maildrop.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/maildrop.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\maildrop"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			UseOfATL="1"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				CommandLine="midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" mailmsg.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" smtpevent.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" cdosys.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" seo.idl&#x0D;&#x0A;midl /nologo /env win32  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" msado15.idl&#x0D;&#x0A;"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="false"
-				SuppressStartupBanner="true"
-				TargetEnvironment="0"
-				TypeLibraryName=""
-				HeaderFileName=""
-				DLLDataFileName=""
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\plugin;..\binsrc\driver\include..\libsrc\Dk;..\libsrc\util\win32;..\libsrc;..\binsrc\maildrop\win32\gen;..\binsrc\maildrop;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\maildrop/maildrop.pch"
-				AssemblerListingLocation="$(ConfigurationName)\maildrop/"
-				ObjectFile="$(ConfigurationName)\maildrop/"
-				ProgramDataBaseFileName="$(ConfigurationName)\maildrop/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/maildrop.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\maildrop\win32\maildrop.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/maildrop.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/maildrop.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\maildrop.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\maildrop.idl"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCMIDLTool"
-						MkTypLibCompatible="false"
-						TargetEnvironment="1"
-						TypeLibraryName="$(InputName).tlb"
-						OutputDirectory="$(InputDir)\gen\"
-						HeaderFileName="$(InputName).h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCMIDLTool"
-						MkTypLibCompatible="false"
-						TargetEnvironment="1"
-						TypeLibraryName="$(InputName).tlb"
-						OutputDirectory="$(InputDir)\gen\"
-						HeaderFileName="$(InputName).h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\mpl.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\maildrop.rc"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalIncludeDirectories="..\libsrc\Wi;..\binsrc\maildrop\win32\gen"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalIncludeDirectories="..\libsrc\Wi;..\binsrc\maildrop\win32\gen"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/mediawiki.vcproj b/win32/mediawiki.vcproj
deleted file mode 100644
index a31453e..0000000
--- a/win32/mediawiki.vcproj
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="mediawiki"
-	ProjectGUID="{408E2482-2623-11DB-9BB9-97600548391D}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\mediawiki"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/mediawiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\mediawiki/mediawiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\mediawiki/"
-				ObjectFile="$(ConfigurationName)\mediawiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\mediawiki/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/mediawiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\mediawiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/mediawiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/mediawiki.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\mediawiki"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/mediawiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\mediawiki/mediawiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\mediawiki/"
-				ObjectFile="$(ConfigurationName)\mediawiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\mediawiki/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/mediawiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\mediawiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/mediawiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/mediawiki.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_maclex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_wikilex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\mediawiki.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-		<Filter
-			Name="LexFiles"
-			>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_maclex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_maclex.c&#x0D;&#x0A;flex -8 -Pmediamacyy -omedia_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_maclex.c&#x0D;&#x0A;flex -8 -Pmediamacyy -omedia_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_maclex.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_wikilex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_wikilex.c&#x0D;&#x0A;flex -8 -Pmediawikiyy -omedia_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_wikilex.c&#x0D;&#x0A;flex -8 -Pmediawikiyy -omedia_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_wikilex.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/mkperlenv.pl b/win32/mkperlenv.pl
deleted file mode 100644
index 2ef8da0..0000000
--- a/win32/mkperlenv.pl
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-#  
-#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-#  project.
-#  
-#  Copyright (C) 1998-2006 OpenLink Software
-#  
-#  This project 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; only version 2 of the License, dated June 1991.
-#  
-#  This program 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
-#  General Public License for more details.
-#  
-#  You should have received a copy of the GNU General Public License along
-#  with this program; if not, write to the Free Software Foundation, Inc.,
-#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#  
-#  
-#used to generate the appropriate parts of dirs.prj for perl/win32 embedding
-
-use strict;
-use ExtUtils::Embed;
-
-print "\nPERL_CFLAGS=",ccopts,"\n";
-print "\nPERL_LDFLAGS=",ldopts,"\n";
diff --git a/win32/mkpythonenv.py b/win32/mkpythonenv.py
deleted file mode 100644
index 501fd71..0000000
--- a/win32/mkpythonenv.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/python
-#  
-#  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-#  project.
-#  
-#  Copyright (C) 1998-2006 OpenLink Software
-#  
-#  This project 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; only version 2 of the License, dated June 1991.
-#  
-#  This program 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
-#  General Public License for more details.
-#  
-#  You should have received a copy of the GNU General Public License along
-#  with this program; if not, write to the Free Software Foundation, Inc.,
-#  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#  
-#  
-import distutils.sysconfig
-
-print "PYTHON_CFLAGS=-I" + distutils.sysconfig.get_config_var ("INCLUDEPY")
-
-print "PYTHON_LDFLAGS=/LIBPATH:" + distutils.sysconfig.get_config_var ("exec_prefix") + "/libs"
diff --git a/win32/nntpf_vad.vcproj b/win32/nntpf_vad.vcproj
deleted file mode 100644
index d2bbf0a..0000000
--- a/win32/nntpf_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_discussion_vad"
-	ProjectGUID="{607116BE-F168-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_discussion_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_discussion_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_discussion_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_discussion_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_discussion_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Discussion\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_discussion_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_discussion_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/odbcmail.vcproj b/win32/odbcmail.vcproj
deleted file mode 100644
index 22e96d1..0000000
--- a/win32/odbcmail.vcproj
+++ /dev/null
@@ -1,245 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtmail"
-	ProjectGUID="{4C517D78-E5B9-11DA-85E2-A4E5714C712A}"
-	RootNamespace="odbcmail"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\odbcmail"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				Description="Making the version file"
-				CommandLine="bash $(InputDir)\..\bin\makever -o $(InputDir)\..\binsrc\maildrop\odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"&#x0D;&#x0A;"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/odbcmail.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\binsrc\maildrop;..\libsrc\zlib;..\binsrc\driver;..\binsrc\maildrop\win32\gen;.\openssl"
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\odbcmail/odbcmail.pch"
-				AssemblerListingLocation="$(ConfigurationName)\odbcmail/"
-				ObjectFile="$(ConfigurationName)\odbcmail/"
-				ProgramDataBaseFileName="$(ConfigurationName)\odbcmail/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="util.lib wic.lib dk1t.lib threads.lib libeay32.lib gdi32.lib advapi32.lib ssleay32.lib ws2_32.lib user32.lib kernel32.lib"
-				OutputFile="$(ConfigurationName)/virt_mail.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/odbcmail.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\odbcmail"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-				CommandLine="cd $(IntDir)&#x0D;&#x0A;bash $(InputDir)\..\bin\makever -o odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;"
-				AdditionalDependencies="$(IntDir)\odbc_mail.obj"
-				Outputs="$(IntDir)\odbcmail.vers.c"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/odbcmail.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl"
-				PreprocessorDefinitions="_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\odbcmail/odbcmail.pch"
-				AssemblerListingLocation="$(ConfigurationName)\odbcmail/"
-				ObjectFile="$(ConfigurationName)\odbcmail/"
-				ProgramDataBaseFileName="$(ConfigurationName)\odbcmail/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="util.lib wic.lib dk1t.lib threads.lib libeay32.lib gdi32.lib advapi32.lib ssleay32.lib ws2_32.lib user32.lib kernel32.lib"
-				OutputFile="$(ConfigurationName)/virt_mail.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/odbcmail.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\maildrop\odbc_mail.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\maildrop\odbcmail.vers.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/ods_vad.vcproj b/win32/ods_vad.vcproj
deleted file mode 100644
index a70ce8c..0000000
--- a/win32/ods_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_framework_vad"
-	ProjectGUID="{7DF920B2-EFDA-11DA-988C-EBAD6065650A}"
-	RootNamespace="ods_framework_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_framework_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_framework_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_framework_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_framework_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Framework\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_framework_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_framework_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/polls_vad.vcproj b/win32/polls_vad.vcproj
deleted file mode 100644
index ad835ce..0000000
--- a/win32/polls_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_polls_vad"
-	ProjectGUID="{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}"
-	RootNamespace="ods_polls_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_polls_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_polls_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_polls_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_polls_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Polls\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\ods_polls_dav.vad;$(InputDir)\ods_polls_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_polls_dav.vad;$(InputDir)\ods_polls_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/rdf_mappers.vcproj b/win32/rdf_mappers.vcproj
deleted file mode 100644
index e31a71e..0000000
--- a/win32/rdf_mappers.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="rdf_mappers_vad"
-	ProjectGUID="{C6451C76-DC57-11DB-930B-CD6B662399AA}"
-	RootNamespace="rdf_mappers_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\rdf_mappers_vad"
-			IntermediateDirectory="$(ConfigurationName)\rdf_mappers_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\rdf_mappers_vad"
-			IntermediateDirectory="$(ConfigurationName)\rdf_mappers_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\rdf_mappers\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\rdf_mappers_dav.vad;$(InputDir)\rdf_mappers_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\rdf_mappers_dav.vad;$(InputDir)\rdf_mappers_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/scroll.vcproj b/win32/scroll.vcproj
deleted file mode 100644
index 99b1713..0000000
--- a/win32/scroll.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="scroll"
-	ProjectGUID="{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\scroll"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/scroll.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\scroll/scroll.pch"
-				AssemblerListingLocation="$(ConfigurationName)\scroll/"
-				ObjectFile="$(ConfigurationName)\scroll/"
-				ProgramDataBaseFileName="$(ConfigurationName)\scroll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/scroll.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/scroll.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\scroll"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/scroll.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\scroll/scroll.pch"
-				AssemblerListingLocation="$(ConfigurationName)\scroll/"
-				ObjectFile="$(ConfigurationName)\scroll/"
-				ProgramDataBaseFileName="$(ConfigurationName)\scroll/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/scroll.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/scroll.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\scroll.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/setcurs.vcproj b/win32/setcurs.vcproj
deleted file mode 100644
index 2419b02..0000000
--- a/win32/setcurs.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="setcurs"
-	ProjectGUID="{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\setcurs"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/setcurs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\setcurs/setcurs.pch"
-				AssemblerListingLocation="$(ConfigurationName)\setcurs/"
-				ObjectFile="$(ConfigurationName)\setcurs/"
-				ProgramDataBaseFileName="$(ConfigurationName)\setcurs/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/setcurs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/setcurs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\setcurs"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/setcurs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\setcurs/setcurs.pch"
-				AssemblerListingLocation="$(ConfigurationName)\setcurs/"
-				ObjectFile="$(ConfigurationName)\setcurs/"
-				ProgramDataBaseFileName="$(ConfigurationName)\setcurs/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/setcurs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/setcurs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\setcurs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/sparql_demo_vad.vcproj b/win32/sparql_demo_vad.vcproj
deleted file mode 100644
index e02f05b..0000000
--- a/win32/sparql_demo_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="sparql_demo_vad"
-	ProjectGUID="{CDFD5FAC-FD70-11DB-B29C-A18F012B09DC}"
-	RootNamespace="sparql_demo_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\sparql_demo_vad"
-			IntermediateDirectory="$(ConfigurationName)\sparql_demo_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\sparql_demo_vad"
-			IntermediateDirectory="$(ConfigurationName)\sparql_demo_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\samples\sparql_demo\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\sparql_demo_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\sparql_demo_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/sqlcode.bat b/win32/sqlcode.bat
deleted file mode 100644
index 1efa355..0000000
--- a/win32/sqlcode.bat
+++ /dev/null
@@ -1,60 +0,0 @@
-set SQL_FILES=system.sql system2.sql odbccat.sql useraggr.sql vt_text.sql phrasematch.sql hosting.sql
-set SQL_FILES_1=oledb.sql information_schema.sql
-set SQL_FILES_WS=../../binsrc/vsp/vsp_auth.sql soap.sql wsrp_ultim.xsl wsrp_resp.xsl wsrp_interm.xsl wsrp_error.xsl soap_sch.xsl soap_import_sch.xsl wsdl_expand.xsl wsdl_parts.xsl wsdl_import.xsl wsdl2rdf.xsl xmlrpc_soap.xsl soap_xmlrpc.xsl soap12_router.xsl ../../binsrc/ws/wsrm/wsrm_ddl.sql ../../binsrc/ws/wsrm/wsrm_xsd.sql ../../binsrc/ws/wsrm/wsrmcli.sql ../../binsrc/ws/wsrm/wsrmsrv.sql ../../binsrc/ws/wstr/wstr_ddl.sql ../../binsrc/ws/wstr/wstrcli.sql ../../binsrc/ws/wstr/wstrsrv.sql ../../binsrc/ws/wsrm/wsrmcall.xsl rdf_net.sql simile.sql http_auth.sql xmla.sql openxml.sql ../../binsrc/vspx/vspx.sql ../../binsrc/vspx/vspx_add_locations.xsl ../../binsrc/vspx/vspx_expand.xsl ../../binsrc/vspx/vspx_pre_xsd.xsl ../../binsrc/vspx/vspx_pre_sql.xsl ../../binsrc/vspx/vspx_log_format.xsl ../../binsrc/vspx/vspx.xsd ../../binsrc/vspx/vspx.xsl
-set SQL_FILES_REPL=snapshot_repl.sql repl.sql
-set SQL_FILES_DAV=../../binsrc/dav/dav.sql ../../binsrc/dav/dav_api.sql ../../binsrc/dav/dav_meta.sql ../../binsrc/dav/dav_acct.sql ../../binsrc/dav/dav_rdf_quad.sql ../../binsrc/vsp/admin/admin_dav/vfs.sql ../../binsrc/dav/davxml2rdfxml.xsl ../../binsrc/dav/davxml2n3xml.xsl ../../binsrc/dav/rdfxml2n3xml.xsl ../../binsrc/dav/n3xml2uriqahtml.xsl ../../binsrc/dav/uriqa.sql ../../binsrc/dav/DET_CatFilter.sql ../../binsrc/dav/DET_HostFs.sql ../../binsrc/dav/DET_ResFilter.sql ../../binsrc/dav/DET_PropFilter.sql ../../binsrc/dav/DET_RDFData.sql ../../binsrc/dav/Versioning/DET_Versioning.sql xml_view.sql ../../binsrc/dav/DET_S3.sql
-set SQL_FILES_DDK=replddk.sql ../../binsrc/dav/davddk.sql mail_cli.sql ../../binsrc/vsp/admin/admin_ddl.sql ../../binsrc/vsp/admin/admin_dav/vfsddk.sql virtual_dir.sql url_rewrite.sql
-set SQL_FILES_SYS=users.sql
-set SQL_FILES_UDDI=uddi.sql
-set SQL_FILES_IMSG=pop3_svr.sql ftp.sql nn_svr.sql ../../binsrc/vsp/admin/admin_news/admin_news.sql
-set SQL_FILES_AUTO=autoexec.sql
-set SQL_FILES_ADM=../../binsrc/vsp/admin/admin.sql ../../binsrc/vspx/browser/admin_dav_browser.sql
-set SQL_FILES_2PC=2pc.sql
- at rem set SQL_FILES_BLOG=../../binsrc/weblog2/widgets/rss2rdf.xsl
-set SQL_FILES_VDB=vdb.sql
-set SQL_FILES_PLDBG=cov_report.xsl cov_time.xsl
-set SQL_FILES_VAD=../../binsrc/vad/vad_root.sql ../../binsrc/vad/vad_misc.sql ../../binsrc/vad/oper_pars.sql ../../binsrc/vad/pars_init.sql ../../binsrc/vad/vad_make.sql
-set SQL_FILES_DBP=../../binsrc/vsp/admin/dbpump/dbpump_root.sql ../../binsrc/vsp/admin/dbpump/oper_pars.sql ../../binsrc/vsp/admin/dbpump/components.sql ../../binsrc/vsp/admin/dbpump/comp_html.sql ../../binsrc/vsp/admin/dbpump/comp_misc.sql ../../binsrc/vsp/admin/dbpump/comp_rpath.sql ../../binsrc/vsp/admin/dbpump/comp_tables.sql ../../binsrc/vsp/admin/dbpump/pars_init.sql
-set SQL_FILES_SPARQL=sparql.sql sparql_io.sql rdf_sponge.sql rdf_schema_objects.sql rdf_void.sql rdflddir2.sql
-
-rm -f sql_code.c sql_code_1.c sql_code_ws.c sql_code_repl.c sql_code_dav.c sql_code_ddk.c sql_code_sys.c sql_code_uddi.c 
-rm -f sql_code_imsg.c sql_code_auto.c sql_code_adm.c sql_code_2pc.c sql_code_vdb.c sql_code_pldbg.c 
-rm -f sql_code_vad.c sql_code_dbp.c sql_code_sparql.c
-
-gawk -f sql_to_c.awk                    -v pl_stats=PLDBG  %SQL_FILES%      > sql_code.c
-gawk -f sql_to_c.awk -v init_name=_1 -v pl_stats=PLDBG %SQL_FILES_1% > sql_code_1.c
-gawk -f sql_to_c.awk -v init_name=_ws   -v pl_stats=PLDBG  %SQL_FILES_WS%   > sql_code_ws.c
-gawk -f sql_to_c.awk -v init_name=_repl -v pl_stats=PLDBG  %SQL_FILES_REPL% > sql_code_repl.c
-gawk -f sql_to_c.awk -v init_name=_dav -v pl_stats=PLDBG %SQL_FILES_DAV% > sql_code_dav.c
-gawk -f sql_to_c.awk -v init_name=_ddk  -v pl_stats=PLDBG  %SQL_FILES_DDK%  > sql_code_ddk.c
-gawk -f sql_to_c.awk -v init_name=_sys  -v pl_stats=PLDBG  %SQL_FILES_SYS%  > sql_code_sys.c
-gawk -f sql_to_c.awk -v init_name=_uddi -v pl_stats=PLDBG %SQL_FILES_UDDI% > sql_code_uddi.c
-gawk -f sql_to_c.awk -v init_name=_imsg -v pl_stats=PLDBG %SQL_FILES_IMSG% > sql_code_imsg.c
-gawk -f sql_to_c.awk -v init_name=_auto -v pl_stats=PLDBG %SQL_FILES_AUTO% > sql_code_auto.c
-gawk -f sql_to_c.awk -v init_name=_adm  -v pl_stats=PLDBG  %SQL_FILES_ADM%  > sql_code_adm.c
-gawk -f sql_to_c.awk -v init_name=_2pc -v pl_stats=PLDBG %SQL_FILES_2PC% > sql_code_2pc.c
- at rem gawk -f sql_to_c.awk -v init_name=_blog -v pl_stats=PLDBG  %SQL_FILES_BLOG% > sql_code_blog.c
-gawk -f sql_to_c.awk -v init_name=_vdb -v pl_stats=PLDBG %SQL_FILES_VDB% > sql_code_vdb.c
-gawk -f sql_to_c.awk -v init_name=_pldbg -v pl_stats=PLDBG %SQL_FILES_PLDBG% > sql_code_pldbg.c
-gawk -f sql_to_c.awk -v init_name=_vad  -v pl_stats=PLDBG  %SQL_FILES_VAD% > sql_code_vad.c
-gawk -f sql_to_c.awk -v init_name=_dbp  -v pl_stats=PLDBG  %SQL_FILES_DBP% > sql_code_dbp.c
-gawk -f sql_to_c.awk -v init_name=_sparql -v pl_stats=PLDBG %SQL_FILES_SPARQL% > sql_code_sparql.c
-
-gawk -f "jso_reformat.awk" -v "output_mode=h" -v "h_wrapper=__RDF_MAPPING_JSO_H" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.h
-
-gawk -f "jso_reformat.awk" -v "output_mode=c" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.c
-
-gawk -f "jso_reformat.awk" -v "output_mode=ttl" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.ttl
-
-gawk -f "jso_reformat.awk" -v "output_mode=ttl-sample" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.ttl-sample
-
-cd ../../binsrc/cached_resources
-bash cache_gen.sh > cached_resources.c
-cd ../../libsrc/Wi
-
- at echo #include "sql_code_cache_impl.c" > sql_code_cache.c
- at echo #include "../../binsrc/cached_resources/cached_resources.c" >> sql_code_cache.c
-
-bash list_lex_props.sh sparql_p.y sparql_lex_props.c
-bash list_lex_props.sh turtle_p.y turtle_lex_props.c 
-
diff --git a/win32/threads.vcproj b/win32/threads.vcproj
deleted file mode 100644
index c56c1e9..0000000
--- a/win32/threads.vcproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="threads"
-	ProjectGUID="{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\threads"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\threads/threads.pch"
-				AssemblerListingLocation="$(ConfigurationName)\threads/"
-				ObjectFile="$(ConfigurationName)\threads/"
-				ProgramDataBaseFileName="$(ConfigurationName)\threads/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threads.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\threads"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\threads/threads.pch"
-				AssemblerListingLocation="$(ConfigurationName)\threads/"
-				ObjectFile="$(ConfigurationName)\threads/"
-				ProgramDataBaseFileName="$(ConfigurationName)\threads/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threads.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Thread\sched_single.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_attr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_queue.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\timer_queue.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/threadw.vcproj b/win32/threadw.vcproj
deleted file mode 100644
index e9a1971..0000000
--- a/win32/threadw.vcproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="threadw"
-	ProjectGUID="{D3A2882C-410A-4F58-8ACE-A771888073E8}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\threadw"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\threadw/threadw.pch"
-				AssemblerListingLocation="$(ConfigurationName)\threadw/"
-				ObjectFile="$(ConfigurationName)\threadw/"
-				ProgramDataBaseFileName="$(ConfigurationName)\threadw/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threadw.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\threadw"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\threadw/threadw.pch"
-				AssemblerListingLocation="$(ConfigurationName)\threadw/"
-				ObjectFile="$(ConfigurationName)\threadw/"
-				ProgramDataBaseFileName="$(ConfigurationName)\threadw/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threadw.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Thread\io_unix.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\sched_winthread.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_attr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_queue.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_rwlock.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\timer_queue.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/tidy.vcproj b/win32/tidy.vcproj
deleted file mode 100644
index 220f8e6..0000000
--- a/win32/tidy.vcproj
+++ /dev/null
@@ -1,248 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tidy"
-	ProjectGUID="{D9E130E1-7734-43DF-A7EF-15CD95E467EE}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\tidy"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin"
-				PreprocessorDefinitions="_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\tidy/tidy.pch"
-				AssemblerListingLocation="$(ConfigurationName)\tidy/"
-				ObjectFile="$(ConfigurationName)\tidy/"
-				ProgramDataBaseFileName="$(ConfigurationName)\tidy/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\tidy.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\tidy"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc\Dk;..\libsrc;..\libsrc\util;..\libsrc\util\win32"
-				PreprocessorDefinitions="_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile=""
-				AssemblerListingLocation="$(ConfigurationName)\tidy/"
-				ObjectFile="$(ConfigurationName)\tidy/"
-				ProgramDataBaseFileName="$(ConfigurationName)\tidy/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\tidy.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Tidy\attrs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\clean.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\config.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\entities.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\istack.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\lexer.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\localize.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\parser.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\pprint.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\tab2space.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\tags.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\tidy.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Tidy\html.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\platform.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/tpcc.vcproj b/win32/tpcc.vcproj
deleted file mode 100644
index da994a0..0000000
--- a/win32/tpcc.vcproj
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tpcc"
-	ProjectGUID="{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\tpcc"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/tpcc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\tpcc/tpcc.pch"
-				AssemblerListingLocation="$(ConfigurationName)\tpcc/"
-				ObjectFile="$(ConfigurationName)\tpcc/"
-				ProgramDataBaseFileName="$(ConfigurationName)\tpcc/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/tpcc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/tpcc.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\tpcc"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/tpcc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\tpcc/tpcc.pch"
-				AssemblerListingLocation="$(ConfigurationName)\tpcc/"
-				ObjectFile="$(ConfigurationName)\tpcc/"
-				ProgramDataBaseFileName="$(ConfigurationName)\tpcc/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/tpcc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/tpcc.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\tpcc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\tpccodbc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\tpcctrx.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\binsrc\tests\tpcc.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/tutorial_vad.vcproj b/win32/tutorial_vad.vcproj
deleted file mode 100644
index 3f63bf3..0000000
--- a/win32/tutorial_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tutorial_vad"
-	ProjectGUID="{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="tutorial_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\tutorial_vad"
-			IntermediateDirectory="$(ConfigurationName)\tutorial_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\tutorial_vad"
-			IntermediateDirectory="$(ConfigurationName)\tutorial_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\tutorial\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\tutorial_dav.vad;$(InputDir)\tutorial_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\tutorial_dav.vad;$(InputDir)\tutorial_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/urlsimu.vcproj b/win32/urlsimu.vcproj
deleted file mode 100644
index 334ae51..0000000
--- a/win32/urlsimu.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="urlsimu"
-	ProjectGUID="{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\urlsimu"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/urlsimu.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\urlsimu/urlsimu.pch"
-				AssemblerListingLocation="$(ConfigurationName)\urlsimu/"
-				ObjectFile="$(ConfigurationName)\urlsimu/"
-				ProgramDataBaseFileName="$(ConfigurationName)\urlsimu/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/urlsimu.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/urlsimu.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\urlsimu"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/urlsimu.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\urlsimu/urlsimu.pch"
-				AssemblerListingLocation="$(ConfigurationName)\urlsimu/"
-				ObjectFile="$(ConfigurationName)\urlsimu/"
-				ProgramDataBaseFileName="$(ConfigurationName)\urlsimu/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/urlsimu.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/urlsimu.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\urlsimu.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/util.vcproj b/win32/util.vcproj
deleted file mode 100644
index c16fc90..0000000
--- a/win32/util.vcproj
+++ /dev/null
@@ -1,631 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="util"
-	ProjectGUID="{031DB868-5294-4738-90BA-F80BB2CEA9DC}"
-	RootNamespace="util"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\util"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc\Xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\langfunc;..\libsrc\plugin,."
-				PreprocessorDefinitions="DLDAPI_WINDOWS;_SSL;YYTOKENTYPE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK;PCRE_STATIC"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\util/util.pch"
-				AssemblerListingLocation="$(ConfigurationName)\util/"
-				ObjectFile="$(ConfigurationName)\util/"
-				ProgramDataBaseFileName="$(ConfigurationName)\util/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\util.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\util"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\zlib;..\binsrc\driver;..\libsrc\langfunc;..\libsrc\plugin,."
-				PreprocessorDefinitions="DLDAPI_WINDOWS;_SSL;BIF_XML;_IMSG;VAD;YYTOKENTYPE;WINDOWS;INPROCESS_CLIENT;_MBCS;WIN32;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK;PCRE_STATIC"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\util/util.pch"
-				AssemblerListingLocation="$(ConfigurationName)\util/"
-				ObjectFile="$(ConfigurationName)\util/"
-				ProgramDataBaseFileName="$(ConfigurationName)\util/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\util.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\util\buildarg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\cfg2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\cslentry.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\csllkup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\cslnment.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\dbgmal.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\debug.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\dyntab.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_ucm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\expandav.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnmatch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnqual.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnsearch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fntodos.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnundos.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\getopt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\getopt1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\latin1ctype.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\login_digest.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\logmsg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\ltrim.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\make_env.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\mpl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\ncfg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\ntapp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\regerror.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\regexp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\regsub.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\rtrim.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\setext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\startup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\stpcpy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strcpyin.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strerror.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\stricmp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strindex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strinsrt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strlwr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strnicmp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strquote.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strtok_r.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strupr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strxpect.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\win32\syslog.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\terminat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\ucm2enc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\usage.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\uuid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_mbrtowc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_mbsnrtowcs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_wcrtomb.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_wcs_mask.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_wcsnrtombs.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\libutil.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\uuid.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\uuidP.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="RegExp"
-			>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_chartables.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_compile.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_config.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_dfa_exec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_exec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_fullinfo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_get.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_globals.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_newline.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_ord2utf8.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_study.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_tables.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_try_flipped.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_ucd.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_valid_utf8.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_version.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_xclass.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Langfunc sources"
-			>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_basic.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_charsets.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_html.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_wide.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\langfunc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\langfunc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\langman.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__en_US.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__ru_RU.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__x_ViAny.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__x_ViDoc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_all_chars.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_lowers.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_spaces.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_uppers.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Plugin sources"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\exe_export.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\export_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\gate_virtuoso_stubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\gate_virtuoso_stubs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\gen_all_gates.sh"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;bash gen_all_gates.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\export_gate_virtuoso.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;bash gen_all_gates.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\export_gate_virtuoso.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\plugin.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\plugin.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\plugin_win32.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/virtodbc.vcproj b/win32/virtodbc.vcproj
deleted file mode 100644
index 7410dd7..0000000
--- a/win32/virtodbc.vcproj
+++ /dev/null
@@ -1,342 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtodbc"
-	ProjectGUID="{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtodbc"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtodbc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\virtodbc/virtodbc.pch"
-				AssemblerListingLocation="$(ConfigurationName)\virtodbc/"
-				ObjectFile="$(ConfigurationName)\virtodbc/"
-				ProgramDataBaseFileName="$(ConfigurationName)\virtodbc/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtodbc.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtodbc\virtodbc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtodbc.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtodbc.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtodbc"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtodbc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\virtodbc/virtodbc.pch"
-				AssemblerListingLocation="$(ConfigurationName)\virtodbc/"
-				ObjectFile="$(ConfigurationName)\virtodbc/"
-				ProgramDataBaseFileName="$(ConfigurationName)\virtodbc/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtodbc.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtodbc\virtodbc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtodbc.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtodbc.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIodbc3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\CLIsql3_w32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIuti.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\dialog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\kvlist.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\winctl.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\wizard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowser.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowsercombo.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.rc"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/virtoledb.vcproj b/win32/virtoledb.vcproj
deleted file mode 100644
index 0428c52..0000000
--- a/win32/virtoledb.vcproj
+++ /dev/null
@@ -1,536 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtoledb"
-	ProjectGUID="{F357CF96-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtoledb"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtoledb.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				RuntimeTypeInfo="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\virtoledb/virtoledb.pch"
-				AssemblerListingLocation="$(ConfigurationName)\virtoledb/"
-				ObjectFile="$(ConfigurationName)\virtoledb/"
-				ProgramDataBaseFileName="$(ConfigurationName)\virtoledb/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="ole32.lib oleaut32.lib odbccp32.lib rpcrt4.lib gdi32.lib comdlg32.lib threads.lib dk1t.lib util.lib odbc32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtoledb.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtoledb\virtoledb.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtoledb.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtoledb.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtoledb"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtoledb.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				RuntimeTypeInfo="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\virtoledb/virtoledb.pch"
-				AssemblerListingLocation="$(ConfigurationName)\virtoledb/"
-				ObjectFile="$(ConfigurationName)\virtoledb/"
-				ProgramDataBaseFileName="$(ConfigurationName)\virtoledb/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="ole32.lib oleaut32.lib odbccp32.lib rpcrt4.lib gdi32.lib comdlg32.lib threads.lib dk1t.lib util.lib odbc32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtoledb.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtoledb\virtoledb.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtoledb.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtoledb.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\virtoledb\asserts.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\baseobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIodbc3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\CLIsql3_w32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIuti.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\command.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\connobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\data.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\datalink.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dataobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\datasource.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\db.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\dialog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dllmodule.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\error.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\filedsn.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\globals.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\kvlist.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\lobdata.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\mresults.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\paramdata.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\properties.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\refcounted.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowset.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetdata.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetprops.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\session.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\syncobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\util.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\winctl.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\wizard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowser.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowsercombo.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\binsrc\virtoledb\asserts.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\baseobj.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\command.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\connobj.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\data.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\datalink.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dataobj.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\db.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dllmodule.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\error.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\filedsn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\headers.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\lobdata.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\os.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\paramdata.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\properties.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\refcounted.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\resource.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowset.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetdata.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetprops.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\session.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\util.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\virtoledb.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\virtoledb\virtoledb.rc"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/virtuoso-opensource.sln b/win32/virtuoso-opensource.sln
deleted file mode 100644
index 7478643..0000000
--- a/win32/virtuoso-opensource.sln
+++ /dev/null
@@ -1,607 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blobs", "blobs.vcproj", "{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bpel_vad", "bpel_vad.vcproj", "{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "burstoff", "burstoff.vcproj", "{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "conductor_vad", "conductor_vad.vcproj", "{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cursor", "cursor.vcproj", "{97D467CE-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cutter", "cutter.vcproj", "{6E10B655-C324-491F-B202-73565D6B30FB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demodb", "demodb.vcproj", "{CA03DBF1-2C7E-4732-8F41-65030876DDE7}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A} = {441F1D0C-EFE3-11DA-85E2-A4E5714C712A}
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A} = {BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A} = {55215A1C-EFE2-11DA-85E2-A4E5714C712A}
-		{D3A2882C-410A-4F58-8ACE-A771888073E8} = {D3A2882C-410A-4F58-8ACE-A771888073E8}
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{6260E42E-239D-11DB-9594-FD7021681415} = {6260E42E-239D-11DB-9594-FD7021681415}
-		{40062448-EFE0-11DA-85E2-A4E5714C712A} = {40062448-EFE0-11DA-85E2-A4E5714C712A}
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A} = {8A49554A-EFE3-11DA-85E2-A4E5714C712A}
-		{6E10B655-C324-491F-B202-73565D6B30FB} = {6E10B655-C324-491F-B202-73565D6B30FB}
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A} = {C0990F5A-EFE3-11DA-85E2-A4E5714C712A}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6} = {8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A} = {A9B1A466-CF7A-11DA-85E2-A4E5714C712A}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{C6451C76-DC57-11DB-930B-CD6B662399AA} = {C6451C76-DC57-11DB-930B-CD6B662399AA}
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A} = {3A2B317A-CF7A-11DA-85E2-A4E5714C712A}
-		{408E2482-2623-11DB-9BB9-97600548391D} = {408E2482-2623-11DB-9BB9-97600548391D}
-		{408E2482-2623-11DB-9BB9-97600548391D} = {408E2482-2623-11DB-9BB9-97600548391D}
-		{408E2482-2623-11DB-9BB9-97600548391D} = {408E2482-2623-11DB-9BB9-97600548391D}
-		{351A8882-FD57-11DB-B29C-A18F012B09DC} = {351A8882-FD57-11DB-B29C-A18F012B09DC}
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A} = {B0058FA6-EFE3-11DA-85E2-A4E5714C712A}
-		{CDFD5FAC-FD70-11DB-B29C-A18F012B09DC} = {CDFD5FAC-FD70-11DB-B29C-A18F012B09DC}
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A} = {7DF920B2-EFDA-11DA-988C-EBAD6065650A}
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A} = {EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A} = {828BB6BA-CF7A-11DA-85E2-A4E5714C712A}
-		{607116BE-F168-11DA-85E2-A4E5714C712A} = {607116BE-F168-11DA-85E2-A4E5714C712A}
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A} = {C152ADCC-CF7A-11DA-85E2-A4E5714C712A}
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A} = {3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA} = {FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F} = {A326A0DF-4F93-4DF6-813D-0B64F98B389F}
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE} = {D9E130E1-7734-43DF-A7EF-15CD95E467EE}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA} = {20D26EE8-E1BA-11DB-930B-CD6B662399AA}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dk1t", "dk1t.vcproj", "{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dksrv", "dksrv.vcproj", "{58867EBA-CA07-4F41-A966-6245FF14773E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_vad", "doc_vad.vcproj", "{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{6E10B655-C324-491F-B202-73565D6B30FB} = {6E10B655-C324-491F-B202-73565D6B30FB}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getdata", "getdata.vcproj", "{AFB15514-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_perl", "hosting_perl.vcproj", "{354809B6-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_python", "hosting_python.vcproj", "{B525A234-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im", "im.vcproj", "{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ins", "ins.vcproj", "{C6C66924-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isql", "isql_native.vcproj", "{AFB1D909-86D0-49DE-8BD8-DF89349F934E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvirtuoso_t", "libvirtuoso_odbc_t.vcproj", "{FB836C59-41E1-48EA-A59B-460AB56587EE}"
-	ProjectSection(ProjectDependencies) = postProject
-		{D3A2882C-410A-4F58-8ACE-A771888073E8} = {D3A2882C-410A-4F58-8ACE-A771888073E8}
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE} = {D9E130E1-7734-43DF-A7EF-15CD95E467EE}
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isqlo", "isql.vcproj", "{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scroll", "scroll.vcproj", "{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "setcurs", "setcurs.vcproj", "{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threads", "threads.vcproj", "{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadw", "threadw.vcproj", "{D3A2882C-410A-4F58-8ACE-A771888073E8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tidy", "tidy.vcproj", "{D9E130E1-7734-43DF-A7EF-15CD95E467EE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tpcc", "tpcc.vcproj", "{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tutorial_vad", "tutorial_vad.vcproj", "{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A} = {3A2B317A-CF7A-11DA-85E2-A4E5714C712A}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "urlsimu", "urlsimu.vcproj", "{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "util.vcproj", "{031DB868-5294-4738-90BA-F80BB2CEA9DC}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtodbc", "virtodbc.vcproj", "{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtoledb", "virtoledb.vcproj", "{F357CF96-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_clr_t", "virtuoso_odbc_clr_t.vcproj", "{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}"
-	ProjectSection(ProjectDependencies) = postProject
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_javavm_t", "virtuoso_odbc_javavm_t.vcproj", "{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_sample_t", "virtuoso_odbc_sample_t.vcproj", "{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_t", "virtuoso_odbc_t.vcproj", "{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}"
-	ProjectSection(ProjectDependencies) = postProject
-		{D3A2882C-410A-4F58-8ACE-A771888073E8} = {D3A2882C-410A-4F58-8ACE-A771888073E8}
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE} = {D9E130E1-7734-43DF-A7EF-15CD95E467EE}
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wi", "wi.vcproj", "{93051962-7797-49F0-8958-BB1CE60FFE6F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wic", "wic.vcproj", "{A66E395B-18EE-4877-8F0D-386A7BBAB370}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wikiv", "wikiv.vcproj", "{A326A0DF-4F93-4DF6-813D-0B64F98B389F}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "xml.vcproj", "{0C234EF0-7725-4BDA-A1C3-47F5835A3837}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtmail", "odbcmail.vcproj", "{4C517D78-E5B9-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maildrop", "maildrop.vcproj", "{C5F98602-E5B9-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_framework_vad", "ods_vad.vcproj", "{7DF920B2-EFDA-11DA-988C-EBAD6065650A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_blog_vad", "blog_vad.vcproj", "{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_wiki_vad", "wiki_vad.vcproj", "{40062448-EFE0-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{408E2482-2623-11DB-9BB9-97600548391D} = {408E2482-2623-11DB-9BB9-97600548391D}
-		{408E2482-2623-11DB-9BB9-97600548391D} = {408E2482-2623-11DB-9BB9-97600548391D}
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F} = {A326A0DF-4F93-4DF6-813D-0B64F98B389F}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_briefcase_vad", "briefcase_vad.vcproj", "{55215A1C-EFE2-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_feedmanager_vad", "feeds_vad.vcproj", "{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_bookmark_vad", "bookmark_vad.vcproj", "{8A49554A-EFE3-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_webmail_vad", "mail_vad.vcproj", "{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_gallery_vad", "gallery_vad.vcproj", "{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_community_vad", "community_vad.vcproj", "{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_discussion_vad", "nntpf_vad.vcproj", "{607116BE-F168-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isparql_vad", "isparql_vad.vcproj", "{6260E42E-239D-11DB-9594-FD7021681415}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediawiki", "mediawiki.vcproj", "{408E2482-2623-11DB-9BB9-97600548391D}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_polls_vad", "polls_vad.vcproj", "{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A} = {7DF920B2-EFDA-11DA-988C-EBAD6065650A}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbxml2", "wbxml2.vcproj", "{5582D8D0-DB93-11DB-930B-CD6B662399AA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdf_mappers_vad", "rdf_mappers.vcproj", "{C6451C76-DC57-11DB-930B-CD6B662399AA}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "creolewiki", "creolewiki.vcproj", "{ABE43C46-E1C4-11DB-930B-CD6B662399AA}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_calendar_vad", "calendar_vad.vcproj", "{351A8882-FD57-11DB-B29C-A18F012B09DC}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_adressbook_vad", "ab_vad.vcproj", "{20D26EE8-E1BA-11DB-930B-CD6B662399AA}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparql_demo_vad", "sparql_demo_vad.vcproj", "{CDFD5FAC-FD70-11DB-B29C-A18F012B09DC}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_php", "hosting_php.vcproj", "{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hslookup", "hslookup.vcproj", "{14ECED18-FB38-11DC-8216-8B38A5565D8C}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Win32.ActiveCfg = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Win32.Build.0 = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Win32.ActiveCfg = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Win32.Build.0 = Release|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|Win32.ActiveCfg = Debug|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|Win32.ActiveCfg = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Win32.Build.0 = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Win32.ActiveCfg = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Win32.Build.0 = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Win32.Build.0 = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Win32.ActiveCfg = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Win32.Build.0 = Release|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Win32.Build.0 = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Win32.ActiveCfg = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Win32.Build.0 = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Win32.ActiveCfg = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Win32.Build.0 = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Win32.ActiveCfg = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Win32.Build.0 = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Win32.Build.0 = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Win32.ActiveCfg = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Win32.Build.0 = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Win32.Build.0 = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Win32.ActiveCfg = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Win32.Build.0 = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Win32.ActiveCfg = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Win32.Build.0 = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Win32.ActiveCfg = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Win32.Build.0 = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Win32.ActiveCfg = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Win32.Build.0 = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Win32.ActiveCfg = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Win32.Build.0 = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Win32.Build.0 = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Win32.ActiveCfg = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Win32.Build.0 = Release|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Win32.Build.0 = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Win32.ActiveCfg = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Win32.Build.0 = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Win32.Build.0 = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Win32.ActiveCfg = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Win32.Build.0 = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Win32.Build.0 = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Win32.ActiveCfg = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Win32.Build.0 = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Win32.Build.0 = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Win32.ActiveCfg = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Win32.Build.0 = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Win32.Build.0 = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Win32.ActiveCfg = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Win32.Build.0 = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Win32.ActiveCfg = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Win32.Build.0 = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Win32.ActiveCfg = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Win32.Build.0 = Release|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|Win32.ActiveCfg = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|Win32.ActiveCfg = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{6260E42E-239D-11DB-9594-FD7021681415}.Debug|Win32.ActiveCfg = Debug|Win32
-		{6260E42E-239D-11DB-9594-FD7021681415}.Release|Win32.ActiveCfg = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Win32.ActiveCfg = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Win32.ActiveCfg = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Win32.Build.0 = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Win32.Build.0 = Release|Win32
-		{C6451C76-DC57-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C6451C76-DC57-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Win32.Build.0 = Release|Win32
-		{351A8882-FD57-11DB-B29C-A18F012B09DC}.Debug|Win32.ActiveCfg = Debug|Win32
-		{351A8882-FD57-11DB-B29C-A18F012B09DC}.Release|Win32.ActiveCfg = Release|Win32
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{20D26EE8-E1BA-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{CDFD5FAC-FD70-11DB-B29C-A18F012B09DC}.Debug|Win32.ActiveCfg = Debug|Win32
-		{CDFD5FAC-FD70-11DB-B29C-A18F012B09DC}.Release|Win32.ActiveCfg = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Win32.ActiveCfg = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Win32.Build.0 = Release|Win32
-		{14ECED18-FB38-11DC-8216-8B38A5565D8C}.Debug|Win32.ActiveCfg = Debug|Win32
-		{14ECED18-FB38-11DC-8216-8B38A5565D8C}.Debug|Win32.Build.0 = Debug|Win32
-		{14ECED18-FB38-11DC-8216-8B38A5565D8C}.Release|Win32.ActiveCfg = Release|Win32
-		{14ECED18-FB38-11DC-8216-8B38A5565D8C}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/win32/virtuoso_odbc_clr_t.vcproj b/win32/virtuoso_odbc_clr_t.vcproj
deleted file mode 100644
index 8fed7c2..0000000
--- a/win32/virtuoso_odbc_clr_t.vcproj
+++ /dev/null
@@ -1,312 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_clr_t"
-	ProjectGUID="{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}"
-	RootNamespace="virtuoso_clr_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_clr_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/STACK:100000,50000"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib advapi32.lib Mscoree.lib"
-				OutputFile="$(OutDir)/virtuoso-clr-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				ModuleDefinitionFile="..\binsrc\hosting\mono\clr.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_clr_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_clr_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/STACK:100000,50000"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib advapi32.lib Mscoree.lib"
-				OutputFile="$(OutDir)/virtuoso-clr-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				ModuleDefinitionFile="..\binsrc\hosting\mono\clr.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_clr_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\mono\basec.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\dotnet.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\sql_code_clr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\sql_code_xslt.c"
-				>
-			</File>
-			<File
-				RelativePath=".\virtuoso_t.rc"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<Filter
-			Name="PreBuild"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\mono\import_clr.sql"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG import_clr.sql > sql_code_clr.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG import_clr.sql > sql_code_clr.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\mono_type.xsl"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG mono_type.xsl > sql_code_xslt.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG mono_type.xsl > sql_code_xslt.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\virtclr.cs"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virtclr.dll $(InputFileName)&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs&#x0D;&#x0A;gacutil -u virt_http&#x0D;&#x0A;gacutil -i $(TargetDir)/virt_http.dll&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_http.cs"
-						Outputs="$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virtclr.dll $(InputFileName)&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs&#x0D;&#x0A;gacutil -u virt_http&#x0D;&#x0A;gacutil -i $(TargetDir)/virt_http.dll&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_http.cs"
-						Outputs="$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/virtuoso_odbc_javavm_t.vcproj b/win32/virtuoso_odbc_javavm_t.vcproj
deleted file mode 100644
index e97a780..0000000
--- a/win32/virtuoso_odbc_javavm_t.vcproj
+++ /dev/null
@@ -1,301 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_javavm_t"
-	ProjectGUID="{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}"
-	RootNamespace="virtuoso_javavm_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_javavm_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories=""$(JDK_PATH_I386)\include";..\libsrc\xml.new;..\libsrc;"$(JDK_PATH)\include\win32";..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib "$(JDK_PATH_I386)\lib\jvm.lib""
-				OutputFile="$(OutDir)/virtuoso-javavm-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_javavm_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_javavm_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""$(JDK_PATH_I386)\include";..\libsrc\xml.new;..\libsrc;"$(JDK_PATH)\include\win32";..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib "$(JDK_PATH_I386)\lib\jvm.lib""
-				OutputFile="$(OutDir)/virtuoso-javavm-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_javavm_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\tests\biftest\java_code.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\javavm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\sql_code_clr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\sql_code_javavm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\sql_code_xslt.c"
-				>
-			</File>
-			<File
-				RelativePath=".\virtuoso_t.rc"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<Filter
-			Name="PreBuild"
-			>
-			<File
-				RelativePath="..\binsrc\tests\biftest\import_clr.sql"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG import_clr.sql > sql_code_clr.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG import_clr.sql > sql_code_clr.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\javavm_type.xsl"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG javavm_type.xsl > sql_code_xslt.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG javavm_type.xsl > sql_code_xslt.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\javavm_xml.sql"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_javavm.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_javavm.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_javavm.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_javavm.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/virtuoso_odbc_sample_t.vcproj b/win32/virtuoso_odbc_sample_t.vcproj
deleted file mode 100644
index 85e2c37..0000000
--- a/win32/virtuoso_odbc_sample_t.vcproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_sample_t"
-	ProjectGUID="{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}"
-	RootNamespace="virtuoso_sample_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_sample_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(OutDir)/virtuoso-sample-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_sample_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_sample_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(OutDir)/virtuoso-sample-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_sample_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\tests\biftest\bif_sample.c"
-				>
-			</File>
-			<File
-				RelativePath=".\virtuoso_t.rc"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/virtuoso_odbc_t.vcproj b/win32/virtuoso_odbc_t.vcproj
deleted file mode 100644
index fb41750..0000000
--- a/win32/virtuoso_odbc_t.vcproj
+++ /dev/null
@@ -1,259 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_t"
-	ProjectGUID="{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}"
-	RootNamespace="virtuoso_t"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/virtuoso_t.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;PACKAGE_VERSION=\"6.1.3\""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\virtuoso_t/virtuoso_t.pch"
-				AssemblerListingLocation="$(ConfigurationName)\virtuoso_t/"
-				ObjectFile="$(ConfigurationName)\virtuoso_t/"
-				ProgramDataBaseFileName="$(ConfigurationName)\virtuoso_t/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-				AdditionalIncludeDirectories="..\openlink\include;..\xOs\stubs"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtuoso-t.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtuoso_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\virtuoso_t"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/virtuoso_t.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="PACKAGE_VERSION=\"6.1.3\";_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\virtuoso_t/virtuoso_t.pch"
-				AssemblerListingLocation="$(ConfigurationName)\virtuoso_t/"
-				ObjectFile="$(ConfigurationName)\virtuoso_t/"
-				ProgramDataBaseFileName="$(ConfigurationName)\virtuoso_t/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-				AdditionalIncludeDirectories="..\openlink\include;..\xOs\stubs"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtuoso-t.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtuoso_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\virtuoso\viconfig.c"
-				>
-			</File>
-			<File
-				RelativePath=".\virtuoso_t.rc"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						Culture="1033"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtuoso\viwin32.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath=".\resource.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\virtuoso\viwin32.ico"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/wbxml2.vcproj b/win32/wbxml2.vcproj
deleted file mode 100644
index 5b35679..0000000
--- a/win32/wbxml2.vcproj
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wbxml2"
-	ProjectGUID="{5582D8D0-DB93-11DB-930B-CD6B662399AA}"
-	RootNamespace="wbxml2"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wbxml2"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/wbxml2.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;.;.\wbxml2\src;.\wbxml2\win32\expat"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;LIBWBXML2_EXPORTS;WBXML_LIB_VERBOSE;WBXML_SUPPORT_WML;WBXML_SUPPORT_WTA;WBXML_SUPPORT_SI;WBXML_SUPPORT_SL;WBXML_SUPPORT_CO;WBXML_SUPPORT_PROV;WBXML_SUPPORT_EMN;WBXML_SUPPORT_DRMREL;WBXML_SUPPORT_OTA_SETTINGS;WBXML_SUPPORT_SYNCML;WBXML_SUPPORT_WV;WBXML_ENCODER_USE_STRTBL;HAVE_EXPAT;WBXML_WRAPPERS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wbxml2/wbxml2.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wbxml2/"
-				ObjectFile="$(ConfigurationName)\wbxml2/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wbxml2/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib libwbxml2.lib"
-				OutputFile="$(ConfigurationName)/wbxml2.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;.\wbxml2\win32\expat\;.\wbxml2\win32\libwbxml2\Release\"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\wbxml2\wbxml2.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wbxml2.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wbxml2.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wbxml2"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/wbxml2.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,.;$(WBXML2_PATH)\src;$(WBXML2_PATH)\win32\expat"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;LIBWBXML2_EXPORTS;WBXML_LIB_VERBOSE;WBXML_SUPPORT_WML;WBXML_SUPPORT_WTA;WBXML_SUPPORT_SI;WBXML_SUPPORT_SL;WBXML_SUPPORT_CO;WBXML_SUPPORT_PROV;WBXML_SUPPORT_EMN;WBXML_SUPPORT_DRMREL;WBXML_SUPPORT_OTA_SETTINGS;WBXML_SUPPORT_SYNCML;WBXML_SUPPORT_WV;WBXML_ENCODER_USE_STRTBL;HAVE_EXPAT;WBXML_WRAPPERS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wbxml2/wbxml2.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wbxml2/"
-				ObjectFile="$(ConfigurationName)\wbxml2/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wbxml2/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib libwbxml2.lib"
-				OutputFile="$(ConfigurationName)/wbxml2.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;"$(WBXML2_PATH)\win32\expat\";"$(WBXML2_PATH)\win32\libwbxml2\Debug\""
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\wbxml2\wbxml2.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wbxml2.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wbxml2.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\samples\wbxml2\wbxml2.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/wi.vcproj b/win32/wi.vcproj
deleted file mode 100644
index 24fecfa..0000000
--- a/win32/wi.vcproj
+++ /dev/null
@@ -1,1792 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wi"
-	ProjectGUID="{93051962-7797-49F0-8958-BB1CE60FFE6F}"
-	RootNamespace="wi"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wi"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\tidy;..\binsrc\driver;."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;YY_NO_UNISTD_H;PCRE_STATIC;OLD_TIDY"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wi/wi.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wi/"
-				ObjectFile="$(ConfigurationName)\wi/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wi/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="YYDEBUG"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wi.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wi"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\tidy;..\binsrc\driver;."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;YY_NO_UNISTD_H;PCRE_STATIC"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wi/wi.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wi/"
-				ObjectFile="$(ConfigurationName)\wi/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wi/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="YYDEBUG"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wi.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\2pc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\aqueue.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\arith.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\auxfiles.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_audio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_crypto.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_date.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_dav.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_diff.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_explain.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_file.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_gnw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_imap.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_intl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_json.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_kerberoscli.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_ldapcli.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_mts.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_nntp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_phrasematch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_pop3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_regexp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_repl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_smtp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_soap.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_text.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_tidy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_uuencode.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_xml.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_xper.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bitmap.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blob.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\cl_stubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\crypt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ddlrun.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\disk.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\dks_esc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\eqlcomp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\extent.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\hash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\hosting.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\insert.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\inxop.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\jso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\json_l.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\json_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\lisprdr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\lock.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\log.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\map_schema.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\map_schema.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\meta.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mtwrite.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\neodisk.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\nquad_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\obackup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\odbccat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\page.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\pldebug.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_loader.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdf_core.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdf_mapping_jso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdfbox.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdfinf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdfxml_parser.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\recovery.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\regist.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rltrx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\row.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\schspace.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\scn3_vsnet.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\search.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\search_in.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\security.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\shcompo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\shuric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sort.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\space.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql2sql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql2sqltext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_core.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_l.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_qm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_rdb2rdf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_sff.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_tree.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparqld.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparul2sql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql3_vc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_1.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_2pc.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_adm.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_auto.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_blog.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_cache.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_cache_impl.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_dav.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_dbp.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_ddk.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_imsg.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_pldbg.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_repl.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_sparql.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_sys.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_uddi.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_vad.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_vdb.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_ws.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlbif.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlbif2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcomp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcomp2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcost.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqldf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlexp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlgen.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlhash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlintrp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlinx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloby.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlocr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloinv.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloinx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloprt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlorder.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlovdb.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlpfn.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlprocc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlprt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrbuf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrcomp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrrun.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrun.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlsrv.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlstmts.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltrig.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltype.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlver.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlview.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvmultibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvstat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\string.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\subseq.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\text.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\trans.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_l.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\uname_const_decl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\update.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\uuencode.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wiservic.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc-dec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc_algos.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmllazy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlschema.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlsearch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlsql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmltree.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpath.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpscn_vsnet.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xqf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt_fmt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt_opt.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\2pc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\2pc_client.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\arith.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_text.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_xper.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLI.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\crsr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\date.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\eqlcomp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\iodbcinst.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ksrvext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\license.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\lisprdr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\list2.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\log.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ltrx.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_com.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\odbcinc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\remote.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\repl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\replsr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\security.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_p.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql3.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlbif.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcmps.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcomp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlfn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlintrp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlnode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlo.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlocr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlofn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlopcod.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlpar.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlparext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlpfn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrcomp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltype.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltype_c.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlver.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlwords.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvmultibyte.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\text.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_p.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\uuencode_impl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\virtext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\widd.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\widisk.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\widv.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wifn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wiservic.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xml.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlgen.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlnode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlres.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmltree.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpath.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp_impl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpf.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xqf.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="PreBuild"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\json.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f json_l.c&#x0D;&#x0A;flex -Pjsonyy -ojson_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)json_p.h"
-						Outputs="$(InputDir)json_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f json_l.c&#x0D;&#x0A;flex -Pjsonyy -ojson_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)json_p.h"
-						Outputs="$(InputDir)json_l.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\json.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f json_p.c&#x0D;&#x0A;rm -f json_p.h&#x0D;&#x0A;bison -y -vd -pjsonyy json.y -ojson_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)json_p.c;$(InputDir)json_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f json_p.c&#x0D;&#x0A;rm -f json_p.h&#x0D;&#x0A;bison -y -vd -pjsonyy json.y -ojson_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)json_p.c;$(InputDir)json_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\nquad_p.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f nquad_p.c&#x0D;&#x0A;rm -f nquad_p.h&#x0D;&#x0A;bison -y -vd -pnqyy nquad_p.y -onquad_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)nquad_p.c;$(InputDir)nquad_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\scn3.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f scn3_vsnet.c&#x0D;&#x0A;flex -oscn3_vsnet.c $(InputPath)&#x0D;&#x0A;flex -Pscn3splityy -oscn3split.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)sql3.h"
-						Outputs="$(InputDir)scn3_vsnet.c;$(InputDir)scn3split.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f scn3_vsnet.c&#x0D;&#x0A;flex -oscn3_vsnet.c $(InputPath)&#x0D;&#x0A;flex -Pscn3splityy -oscn3split.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)sql3.h"
-						Outputs="$(InputDir)scn3_vsnet.c;$(InputDir)scn3split.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_l.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_l.c&#x0D;&#x0A;flex -8 -Psparyy -osparql_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)sparql_p.h"
-						Outputs="$(InputDir)sparql_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_l.c&#x0D;&#x0A;flex -8 -Psparyy -osparql_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)sparql_p.h"
-						Outputs="$(InputDir)sparql_l.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_p.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_p.c&#x0D;&#x0A;rm -f sparql_p.h&#x0D;&#x0A;bison -y -vd -psparyy sparql_p.y -osparql_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_p.c;$(InputDir)sparql_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_p.c&#x0D;&#x0A;rm -f sparql_p.h&#x0D;&#x0A;bison -y -vd -psparyy sparql_p.y -osparql_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_p.c;$(InputDir)sparql_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql3.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sql3.c&#x0D;&#x0A;rm -f sql3.h&#x0D;&#x0A;bison -y  -vd sql3.y -osql3.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sql3.c;$(InputDir)sql3.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sql3.c&#x0D;&#x0A;rm -f sql3.h&#x0D;&#x0A;bison -y  -vd sql3.y -osql3.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sql3.c;$(InputDir)sql3.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_to_c.awk"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;$(ProjectDir)\sqlcode.bat&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\..\..\binsrc\vspx\vspx.xsl"
-						Outputs="$(InputDir)\sql_code.c;$(InputDir)\sql_code_1.c;$(InputDir)\sql_code_ddk.c;$(InputDir)\sql_code_adm.c;$(InputDir)\sql_code_dav.c;$(InputDir)\sql_code_vad.c;$(InputDir)\sql_code_dbp.c;$(InputDir)\sql_code_uddi.c;$(InputDir)\sql_code_imsg.c;$(InputDir)\sql_code_auto.c;$(InputDir)\sql_code_2pc.c;$(InputDir)\rdf_mapping_jso.h;$(InputDir)\rdf_mapping_jso.c;$(InputDir)\rdf_mapping_jso.ttl;$(InputDir)\rdf_mapping_jso.ttl-sample"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;$(ProjectDir)\sqlcode.bat&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\..\..\binsrc\vspx\vspx.xsl"
-						Outputs="$(InputDir)\sql_code.c;$(InputDir)\sql_code_1.c;$(InputDir)\sql_code_ddk.c;$(InputDir)\sql_code_adm.c;$(InputDir)\sql_code_dav.c;$(InputDir)\sql_code_vad.c;$(InputDir)\sql_code_dbp.c;$(InputDir)\sql_code_uddi.c;$(InputDir)\sql_code_imsg.c;$(InputDir)\sql_code_auto.c;$(InputDir)\sql_code_2pc.c;$(InputDir)\rdf_mapping_jso.h;$(InputDir)\rdf_mapping_jso.c;$(InputDir)\rdf_mapping_jso.ttl;$(InputDir)\rdf_mapping_jso.ttl-sample"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlwords.gperf"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sqlwords.h&#x0D;&#x0A;gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e 's/char \*keyword/char *keiiyword/g' >sqlwords.h&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sqlwords.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sqlwords.h&#x0D;&#x0A;gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e 's/char \*keyword/char *keiiyword/g' >sqlwords.h&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sqlwords.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_l.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_l.c&#x0D;&#x0A;flex -8 -Pttlyy -oturtle_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)turtle_p.h"
-						Outputs="$(InputDir)turtle_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_l.c&#x0D;&#x0A;flex -8 -Pttlyy -oturtle_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)turtle_p.h"
-						Outputs="$(InputDir)turtle_l.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_p.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_p.c&#x0D;&#x0A;rm -f turtle_p.h&#x0D;&#x0A;bison -y -vd -pttlyy turtle_p.y -oturtle_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_p.c;$(InputDir)turtle_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_p.c&#x0D;&#x0A;rm -f turtle_p.h&#x0D;&#x0A;bison -y -vd -pttlyy turtle_p.y -oturtle_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_p.c;$(InputDir)turtle_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpathp.c&#x0D;&#x0A;rm -f xpathp.h&#x0D;&#x0A;bison -y -vd -pxpyy xpathp.y -oxpathp.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpathp.c;$(InputDir)xpathp.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpathp.c&#x0D;&#x0A;rm -f xpathp.h&#x0D;&#x0A;bison -y -vd -pxpyy xpathp.y -oxpathp.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpathp.c;$(InputDir)xpathp.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpscn.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpscn_vsnet.c&#x0D;&#x0A;flex -i -oxpscn_vsnet.c -Pxpyy $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)xpathp.h"
-						Outputs="$(InputDir)xpscn_vsnet.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpscn_vsnet.c&#x0D;&#x0A;flex -i -oxpscn_vsnet.c -Pxpyy $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)xpathp.h"
-						Outputs="$(InputDir)xpscn_vsnet.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/wic.vcproj b/win32/wic.vcproj
deleted file mode 100644
index 6af1d08..0000000
--- a/win32/wic.vcproj
+++ /dev/null
@@ -1,267 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wic"
-	ProjectGUID="{A66E395B-18EE-4877-8F0D-386A7BBAB370}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wic"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wic/wic.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wic/"
-				ObjectFile="$(ConfigurationName)\wic/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wic/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wic.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wic"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wic/wic.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wic/"
-				ObjectFile="$(ConfigurationName)\wic/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wic/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wic.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIodbc3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql3W.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIuti.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\pldbgcli.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\wirpce.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/wiki_vad.vcproj b/win32/wiki_vad.vcproj
deleted file mode 100644
index a210a78..0000000
--- a/win32/wiki_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_wiki_vad"
-	ProjectGUID="{40062448-EFE0-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_wiki_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_wiki_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_wiki_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_wiki_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_wiki_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Wiki\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_wiki_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_wiki_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/wikiv.vcproj b/win32/wikiv.vcproj
deleted file mode 100644
index a28e44a..0000000
--- a/win32/wikiv.vcproj
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wikiv"
-	ProjectGUID="{A326A0DF-4F93-4DF6-813D-0B64F98B389F}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wikiv"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/wikiv.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wikiv/wikiv.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wikiv/"
-				ObjectFile="$(ConfigurationName)\wikiv/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wikiv/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/wikiv.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\wikiv.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wikiv.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wikiv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\wikiv"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/wikiv.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\wikiv/wikiv.pch"
-				AssemblerListingLocation="$(ConfigurationName)\wikiv/"
-				ObjectFile="$(ConfigurationName)\wikiv/"
-				ProgramDataBaseFileName="$(ConfigurationName)\wikiv/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/wikiv.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\wikiv.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wikiv.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wikiv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\maclex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\wikilex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\wikiv.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-		<Filter
-			Name="LexFiles"
-			>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\maclex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f maclex.c&#x0D;&#x0A;flex -8 -Pmacyy -omaclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f maclex.c&#x0D;&#x0A;flex -8 -Pmacyy -omaclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\maclex.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\wikilex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f wikilex.c&#x0D;&#x0A;flex -8 -Pwikiyy -owikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f wikilex.c&#x0D;&#x0A;flex -8 -Pwikiyy -owikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\wikilex.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/xml.vcproj b/win32/xml.vcproj
deleted file mode 100644
index ce536f9..0000000
--- a/win32/xml.vcproj
+++ /dev/null
@@ -1,283 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="xml"
-	ProjectGUID="{0C234EF0-7725-4BDA-A1C3-47F5835A3837}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\xml"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,..\libsrc\util\pcrelib"
-				PreprocessorDefinitions="_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\xml/xml.pch"
-				AssemblerListingLocation="$(ConfigurationName)\xml/"
-				ObjectFile="$(ConfigurationName)\xml/"
-				ProgramDataBaseFileName="$(ConfigurationName)\xml/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="XML_NS"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\xml.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\xml"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\libsrc\langfunc,..\libsrc\plugin,..\libsrc\util\pcrelib"
-				PreprocessorDefinitions="_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\xml/xml.pch"
-				AssemblerListingLocation="$(ConfigurationName)\xml/"
-				ObjectFile="$(ConfigurationName)\xml/"
-				ProgramDataBaseFileName="$(ConfigurationName)\xml/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="XML_NS"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\xml.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Xml.new\charclasses.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\datatypes.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\dtd.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\encodings.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\html_mode.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\schema.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\schema_fsm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xml_ecm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlgram.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlparser.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlread.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Xml.new\charclasses.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\encodings.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\html_mode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\schema.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xml_ecm.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlparser.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlparser_impl.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win32/zlib.vcproj b/win32/zlib.vcproj
deleted file mode 100644
index 6190f12..0000000
--- a/win32/zlib.vcproj
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="zlib"
-	ProjectGUID="{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\zlib"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\zlib/zlib.pch"
-				AssemblerListingLocation="$(ConfigurationName)\zlib/"
-				ObjectFile="$(ConfigurationName)\zlib/"
-				ProgramDataBaseFileName="$(ConfigurationName)\zlib/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\zlib.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\zlib"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\zlib"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\zlib/zlib.pch"
-				AssemblerListingLocation="$(ConfigurationName)\zlib/"
-				ObjectFile="$(ConfigurationName)\zlib/"
-				ProgramDataBaseFileName="$(ConfigurationName)\zlib/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\zlib.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\zlib\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\gzio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\zutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/blobs.vcproj b/win64/blobs.vcproj
deleted file mode 100644
index b05f1ca..0000000
--- a/win64/blobs.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="blobs"
-	ProjectGUID="{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/blobs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/blobs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/blobs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/blobs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/blobs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/blobs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/blobs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/blobs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/blobs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/blobs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/blobs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/blobs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\blobs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/blog_vad.vcproj b/win64/blog_vad.vcproj
deleted file mode 100644
index ecd391b..0000000
--- a/win64/blog_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="blog_vad"
-	ProjectGUID="{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}"
-	RootNamespace="ods_blog_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_blog_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_blog_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_blog_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_blog_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Blog\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_blog_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_blog_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/bookmark_vad.vcproj b/win64/bookmark_vad.vcproj
deleted file mode 100644
index fde6f65..0000000
--- a/win64/bookmark_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="bookmark_vad"
-	ProjectGUID="{8A49554A-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_bookmark_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_bookmark_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Bookmark\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_bookmark_dav.vad;$(InputDir)\ods_bookmark_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_bookmark_dav.vad;$(InputDir)\ods_bookmark_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/bpel_vad.vcproj b/win64/bpel_vad.vcproj
deleted file mode 100644
index 4f8a71d..0000000
--- a/win64/bpel_vad.vcproj
+++ /dev/null
@@ -1,323 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="bpel_vad"
-	ProjectGUID="{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="bpel_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\bpel\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\bpel_dav.vad;$(InputDir)\bpel_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Debug|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\bpel_dav.vad;$(InputDir)\bpel_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\bpel_dav.vad;$(InputDir)\bpel_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\bpel_dav.vad;$(InputDir)\bpel_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/briefcase_vad.vcproj b/win64/briefcase_vad.vcproj
deleted file mode 100644
index 76399a0..0000000
--- a/win64/briefcase_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="briefcase_vad"
-	ProjectGUID="{55215A1C-EFE2-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_briefcase_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_briefcase_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Briefcase\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\ods_briefcase_dav.vad;$(InputDir)\ods_briefcase_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_briefcase_dav.vad;$(InputDir)\ods_briefcase_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/burstoff.vcproj b/win64/burstoff.vcproj
deleted file mode 100644
index e78e75a..0000000
--- a/win64/burstoff.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="burstoff"
-	ProjectGUID="{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/burstoff.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/burstoff.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/burstoff.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/burstoff.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/burstoff.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/burstoff.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/burstoff.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/burstoff.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/burstoff.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/burstoff.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/burstoff.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/burstoff.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\burstoff.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/community_vad.vcproj b/win64/community_vad.vcproj
deleted file mode 100644
index 0af624b..0000000
--- a/win64/community_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="community_vad"
-	ProjectGUID="{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_community_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_community_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_community_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_community_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_community_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Community\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_community_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_community_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/conductor_vad.vcproj b/win64/conductor_vad.vcproj
deleted file mode 100644
index dcb3d73..0000000
--- a/win64/conductor_vad.vcproj
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="conductor_vad"
-	ProjectGUID="{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="conductor_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\yacutia\mkvad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash mkvad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\conductor_dav.vad;$(InputDir)\conductor_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Debug|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash mkvad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\conductor_dav.vad;$(InputDir)\conductor_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash mkvad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\conductor_dav.vad;$(InputDir)\conductor_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash mkvad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\conductor_dav.vad;$(InputDir)\conductor_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/cursor.vcproj b/win64/cursor.vcproj
deleted file mode 100644
index 5b33a93..0000000
--- a/win64/cursor.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="cursor"
-	ProjectGUID="{97D467CE-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cursor.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/cursor.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cursor.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/cursor.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/cursor.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cursor.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cursor.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/cursor.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cursor.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/cursor.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/cursor.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cursor.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\cursor.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/cutter.vcproj b/win64/cutter.vcproj
deleted file mode 100644
index 30c00af..0000000
--- a/win64/cutter.vcproj
+++ /dev/null
@@ -1,400 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="cutter"
-	ProjectGUID="{6E10B655-C324-491F-B202-73565D6B30FB}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cutter.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="_CONSOLE,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				OutputFile="$(ConfigurationName)/cutter.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cutter.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/cutter.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="_CONSOLE,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)/cutter.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cutter.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/cutter.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				OutputFile="$(ConfigurationName)/cutter.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cutter.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/cutter.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)/cutter.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/cutter.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\sqldoc\cutter.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/demodb.vcproj b/win64/demodb.vcproj
deleted file mode 100644
index 8909889..0000000
--- a/win64/demodb.vcproj
+++ /dev/null
@@ -1,323 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="demodb"
-	ProjectGUID="{CA03DBF1-2C7E-4732-8F41-65030876DDE7}"
-	RootNamespace="demodb"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\samples\demo\mkdemo.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set SRC=$(ProjectDir)\..\&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;rmdir /S /Q docsrc&#x0D;&#x0A;bash mkdemo.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe;..\binsrc\bpel\bpel_dav.vad;..\binsrc\yacutia\conductor_dav.vad;..\binsrc\samples\demo\doc_dav.vad;..\binsrc\tutorial\tutorial_dav.vad"
-					Outputs="$(InputDir)\demo.db"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Debug|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set SRC=$(ProjectDir)\..\&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;rmdir /S /Q docsrc&#x0D;&#x0A;bash mkdemo.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe;..\binsrc\bpel\bpel_dav.vad;..\binsrc\yacutia\conductor_dav.vad;..\binsrc\samples\demo\doc_dav.vad;..\binsrc\tutorial\tutorial_dav.vad"
-					Outputs="$(InputDir)\demo.db"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set SRC=$(ProjectDir)\..\&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;rmdir /S /Q docsrc&#x0D;&#x0A;bash mkdemo.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe;..\binsrc\bpel\bpel_dav.vad;..\binsrc\yacutia\conductor_dav.vad;..\binsrc\samples\demo\doc_dav.vad;..\binsrc\tutorial\tutorial_dav.vad"
-					Outputs="$(InputDir)\demo.db"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set SRC=$(ProjectDir)\..\&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;rmdir /S /Q docsrc&#x0D;&#x0A;bash mkdemo.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe;..\binsrc\bpel\bpel_dav.vad;..\binsrc\yacutia\conductor_dav.vad;..\binsrc\samples\demo\doc_dav.vad;..\binsrc\tutorial\tutorial_dav.vad"
-					Outputs="$(InputDir)\demo.db"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/dk1t.vcproj b/win64/dk1t.vcproj
deleted file mode 100644
index 78ddae4..0000000
--- a/win64/dk1t.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="dk1t"
-	ProjectGUID="{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}"
-	RootNamespace="dk1t"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dk1t.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dk1t.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;INPROCESS_CLIENT"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dk1t.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;INPROCESS_CLIENT"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\dk1t.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\config.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkalloc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbasket.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbox.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkdevice.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhashext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkmarshal.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkpool.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkresource.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkrusage.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkses2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesinp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksession.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesstr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksestcp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksets.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstkern.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/dksrv.vcproj b/win64/dksrv.vcproj
deleted file mode 100644
index f482554..0000000
--- a/win64/dksrv.vcproj
+++ /dev/null
@@ -1,493 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="dksrv"
-	ProjectGUID="{58867EBA-CA07-4F41-A966-6245FF14773E}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile=""
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dksrv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile=""
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dksrv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;INPROCESS_CLIENT"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\dksrv.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;INPROCESS_CLIENT"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\dksrv.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\Dkalloc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbasket.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbox.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkdevice.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkernel.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhashext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkmarshal.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkpool.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkresource.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkrusage.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkses2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesinp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksession.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksesstr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksestcp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksets.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Dk\Dkalloc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbasket.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkbox.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkconfig.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkdevice.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkernel.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhash.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkhashext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkmarshal.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkparam.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkpool.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkresource.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksession.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksets.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkstubs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dksystem.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dktrace.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dktypes.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Dk\Dkutil.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/doc_vad.vcproj b/win64/doc_vad.vcproj
deleted file mode 100644
index e58f3cb..0000000
--- a/win64/doc_vad.vcproj
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="doc_vad"
-	ProjectGUID="{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="doc_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\samples\demo\mkdoc.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;set CUTTER=cutter.exe&#x0D;&#x0A;bash mkdoc.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-					Outputs="$(InputDir)\doc_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Debug|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;set CUTTER=cutter.exe&#x0D;&#x0A;bash mkdoc.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-					Outputs="$(InputDir)\doc_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;set CUTTER=cutter.exe&#x0D;&#x0A;bash mkdoc.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\doc_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;set CUTTER=cutter.exe&#x0D;&#x0A;bash mkdoc.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\doc_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/feeds_vad.vcproj b/win64/feeds_vad.vcproj
deleted file mode 100644
index 5374c9b..0000000
--- a/win64/feeds_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="feeds_vad"
-	ProjectGUID="{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_feedmanager_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_feedmanager_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-FeedManager\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_feedmanager_dav.vad;$(InputDir)\ods_feedmanager_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_feedmanager_dav.vad;$(InputDir)\ods_feedmanager_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/gallery_vad.vcproj b/win64/gallery_vad.vcproj
deleted file mode 100644
index c6ba6dd..0000000
--- a/win64/gallery_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="gallery_vad"
-	ProjectGUID="{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_gallery_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_gallery_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_gallery_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_gallery_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_gallery_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Gallery\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_gallery_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_gallery_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/getdata.vcproj b/win64/getdata.vcproj
deleted file mode 100644
index 07a2f87..0000000
--- a/win64/getdata.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="getdata"
-	ProjectGUID="{AFB15514-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/getdata.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/getdata.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/getdata.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/getdata.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/getdata.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/getdata.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/getdata.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/getdata.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/getdata.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/getdata.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/getdata.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/getdata.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\getdata.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/hosting_perl.vcproj b/win64/hosting_perl.vcproj
deleted file mode 100644
index b3c1394..0000000
--- a/win64/hosting_perl.vcproj
+++ /dev/null
@@ -1,490 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hosting_perl"
-	ProjectGUID="{354809B6-CF7B-11DA-85E2-A4E5714C712A}"
-	RootNamespace="hosting_perl"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_perl.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PERL_CFLAGS)"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PERL_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_perl.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\perl\hosting_perl.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_perl.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_perl.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/hosting_perl.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PERL_CFLAGS)"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PERL_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_perl.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\perl\hosting_perl.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_perl.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_perl.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_perl.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PERL_CFLAGS)"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PERL_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_perl.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\perl\hosting_perl.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_perl.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_perl.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/hosting_perl.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PERL_CFLAGS)"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PERL_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_perl.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\perl\hosting_perl.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_perl.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_perl.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\perl\hosting_perl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\perl\virt_handler.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="SqlFiles"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\perl\pl_to_c.awk"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/hosting_php.vcproj b/win64/hosting_php.vcproj
deleted file mode 100644
index 2e53634..0000000
--- a/win64/hosting_php.vcproj
+++ /dev/null
@@ -1,450 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hosting_php"
-	ProjectGUID="{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}"
-	RootNamespace="hosting_php"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_php"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_php.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;php5;php5\main;php5\Zend;php5\ext;php5\regex;php5\TSRM;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=1;MSVC5;ZEND_WIN32"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_php/hosting_php.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_php/"
-				ObjectFile="$(ConfigurationName)\hosting_php/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_php/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib php5ts.lib"
-				OutputFile="$(ConfigurationName)/hosting_php.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,.\php5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\php\hosting_php.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_php.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_php.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/hosting_php.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;php5;php5\main;php5\Zend;php5\ext;php5\regex;php5\TSRM;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=1;MSVC5;ZEND_WIN32"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_php/hosting_php.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_php/"
-				ObjectFile="$(ConfigurationName)\hosting_php/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_php/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib php5ts.lib"
-				OutputFile="$(ConfigurationName)/hosting_php.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,.\php5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\php\hosting_php.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_php.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_php.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\hosting_php"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_php.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;php5;php5\main;php5\Zend;php5\ext;php5\regex;php5\TSRM;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=1;MSVC5;ZEND_WIN32"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_php/hosting_php.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_php/"
-				ObjectFile="$(ConfigurationName)\hosting_php/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_php/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib php5ts.lib"
-				OutputFile="$(ConfigurationName)/hosting_php.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,.\php5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\php\hosting_php.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_php.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_php.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/hosting_php.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;php5;php5\main;php5\Zend;php5\ext;php5\regex;php5\TSRM;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=1;MSVC5;ZEND_WIN32"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\hosting_php/hosting_php.pch"
-				AssemblerListingLocation="$(ConfigurationName)\hosting_php/"
-				ObjectFile="$(ConfigurationName)\hosting_php/"
-				ProgramDataBaseFileName="$(ConfigurationName)\hosting_php/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib php5ts.lib"
-				OutputFile="$(ConfigurationName)/hosting_php.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,.\php5"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\php\hosting_php.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_php.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_php.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\php\hosting_php.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/hosting_python.vcproj b/win64/hosting_python.vcproj
deleted file mode 100644
index cd1eb59..0000000
--- a/win64/hosting_python.vcproj
+++ /dev/null
@@ -1,490 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="hosting_python"
-	ProjectGUID="{B525A234-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="hosting_python"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_python.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PYTHON_CFLAGS)"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PYTHON_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_python.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\python\hosting_python.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_python.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_python.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/hosting_python.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PYTHON_CFLAGS)"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386 $(PYTHON_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_python.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\python\hosting_python.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_python.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_python.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/hosting_python.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PYTHON_CFLAGS)"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386  $(PYTHON_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_python.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\python\hosting_python.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_python.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_python.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/hosting_python.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="$(PYTHON_CFLAGS)"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386  $(PYTHON_LDFLAGS)"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/hosting_python.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\hosting\python\hosting_python.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/hosting_python.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/hosting_python.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\python\hosting_python.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\python\virt_handler.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="SqlFiles"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\python\py_to_c.awk"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f py_to_c.awk virt_handler.py > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f py_to_c.awk virt_handler.py > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f py_to_c.awk virt_handler.py > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;gawk -f py_to_c.awk virt_handler.py > virt_handler.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_handler.pm"
-						Outputs="$(InputDir)\virt_handler.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/im.vcproj b/win64/im.vcproj
deleted file mode 100644
index 7a29637..0000000
--- a/win64/im.vcproj
+++ /dev/null
@@ -1,441 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="im"
-	ProjectGUID="{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="im"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/im.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;$(IM_PATH)"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib CORE_RL_wand_.lib CORE_RL_coders_.lib CORE_RL_magick_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_bzlib_.lib CORE_RL_zlib_.lib CORE_RL_lcms_.lib CORE_RL_tiff_.lib CORE_RL_filters_.lib CORE_RL_jpeg_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_png_.lib CORE_RL_wmf_.lib CORE_RL_libxml_.lib"
-				OutputFile="$(ConfigurationName)/im.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl,$(IM_PATH)"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\image_magick\im.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/im.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/im.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/im.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;.;"$(ProjectDir)ImageMagick""
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib CORE_RL_wand_.lib CORE_RL_coders_.lib CORE_RL_magick_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_bzlib_.lib CORE_RL_zlib_.lib CORE_RL_lcms_.lib CORE_RL_tiff_.lib CORE_RL_filters_.lib CORE_RL_jpeg_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_png_.lib CORE_RL_wmf_.lib CORE_RL_libxml_.lib"
-				OutputFile="$(ConfigurationName)/im.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;"$(ProjectDir)ImageMagick""
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\image_magick\im.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/im.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/im.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/im.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\plugin;..\binsrc\driver\include..\libsrc\Dk;..\libsrc\util\win32;..\libsrc;..\libsrc\Xml.new;openssl;.;"$(IM_PATH)""
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib CORE_RL_wand_.lib CORE_RL_coders_.lib CORE_RL_magick_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_bzlib_.lib CORE_RL_zlib_.lib CORE_RL_lcms_.lib CORE_RL_tiff_.lib CORE_RL_filters_.lib CORE_RL_jpeg_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_png_.lib CORE_RL_wmf_.lib CORE_RL_libxml_.lib"
-				OutputFile="$(ConfigurationName)/im.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl;$(IM_PATH)"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\image_magick\im.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/im.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/im.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/im.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,.;$(IM_PATH)"
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib CORE_RL_wand_.lib CORE_RL_coders_.lib CORE_RL_magick_.lib CORE_RL_ttf_.lib CORE_RL_xlib_.lib CORE_RL_bzlib_.lib CORE_RL_zlib_.lib CORE_RL_lcms_.lib CORE_RL_tiff_.lib CORE_RL_filters_.lib CORE_RL_jpeg_.lib CORE_RL_jbig_.lib CORE_RL_jp2_.lib CORE_RL_png_.lib CORE_RL_wmf_.lib CORE_RL_libxml_.lib"
-				OutputFile="$(ConfigurationName)/im.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl;$(IM_PATH)"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\samples\image_magick\im.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/im.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/im.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\samples\image_magick\im.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/ins.vcproj b/win64/ins.vcproj
deleted file mode 100644
index f52cfa7..0000000
--- a/win64/ins.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ins"
-	ProjectGUID="{C6C66924-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/ins.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/ins.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/ins.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/ins.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/ins.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/ins.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/ins.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/ins.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/ins.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/ins.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/ins.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/ins.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\ins.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/isparql_vad.vcproj b/win64/isparql_vad.vcproj
deleted file mode 100644
index a43cf2b..0000000
--- a/win64/isparql_vad.vcproj
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="sparql_demo_vad"
-	ProjectGUID="{6260E42E-239D-11DB-9594-FD7021681415}"
-	RootNamespace="sparql_demo_vad"
-	Keyword="MakeFileProj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\sparql_demo_vad"
-			IntermediateDirectory="$(ConfigurationName)\sparql_demo_vad"
-			ConfigurationType="1">
-			<Tool
-				Name="VCCLCompilerTool"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\sparql_demo_vad"
-			IntermediateDirectory="$(ConfigurationName)\sparql_demo_vad"
-			ConfigurationType="1">
-			<Tool
-				Name="VCCLCompilerTool"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-		    RelativePath="..\binsrc\samples\sparql_demo\make_vad.sh">
-			<FileConfiguration
-				Name="Debug|Win32">
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)
-set PATH=$(InputDir);$(TargetDir)\..;%PATH%
-set HOME=$(ProjectDir)\..\
-set PORT=5555
-set ISQL=isql.exe
-set SERVER=virtuoso-t.exe
-bash make_vad.sh
-cd $(ProjectDir)
-"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\sparql_demo_dav.vad"/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32">
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)
-set PATH=$(InputDir);$(TargetDir)\..;%PATH%
-set HOME=$(ProjectDir)\..\
-set PORT=5555
-set ISQL=isql.exe
-set SERVER=virtuoso-t.exe
-bash make_vad.sh
-cd $(ProjectDir)
-"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\sparql_demo_dav.vad"/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/isql.vcproj b/win64/isql.vcproj
deleted file mode 100644
index 5bc30a0..0000000
--- a/win64/isql.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="isqlo"
-	ProjectGUID="{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="Ws2_32.lib odbc32.lib odbccp32.lib"
-				OutputFile="$(ConfigurationName)/isqlo.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isqlo.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="Ws2_32.lib odbc32.lib odbccp32.lib"
-				OutputFile="$(ConfigurationName)/isqlo.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isqlo.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\isql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/isql_native.vcproj b/win64/isql_native.vcproj
deleted file mode 100644
index d7064c0..0000000
--- a/win64/isql_native.vcproj
+++ /dev/null
@@ -1,424 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="isql"
-	ProjectGUID="{AFB1D909-86D0-49DE-8BD8-DF89349F934E}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isql.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isql.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isql.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/isql_native.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/isql.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreAllDefaultLibraries="false"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/isql_native.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\isql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/libvirtuoso_odbc_t.vcproj b/win64/libvirtuoso_odbc_t.vcproj
deleted file mode 100644
index f815ee9..0000000
--- a/win64/libvirtuoso_odbc_t.vcproj
+++ /dev/null
@@ -1,405 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="libvirtuoso_t"
-	ProjectGUID="{FB836C59-41E1-48EA-A59B-460AB56587EE}"
-	RootNamespace="libvirtuoso_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;PACKAGE_VERSION="6.1.3""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="4"
-				CompileAs="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(OutDir)/libvirtuoso-t.dll"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtuoso\libviwin32.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/libvirtuoso_t.pdb"
-				SubSystem="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;PACKAGE_VERSION=\"6.1.3\""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CompileAs="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(OutDir)/libvirtuoso-t.dll"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtuoso\libviwin32.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/libvirtuoso_t.pdb"
-				SubSystem="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(OutDir)/libvirtuoso-t.dll"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtuoso\libviwin32.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(OutDir)/libvirtuoso_t.pdb"
-				SubSystem="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="PACKAGE_VERSION=\"6.1.3\";_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(OutDir)/libvirtuoso-t.dll"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtuoso\libviwin32.def"
-				GenerateDebugInformation="false"
-				ProgramDatabaseFile="$(OutDir)/libvirtuoso_t.pdb"
-				SubSystem="2"
-				RandomizedBaseAddress="1"
-				FixedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\shcompo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtuoso\viconfig.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtuoso\viwin32.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/mail_vad.vcproj b/win64/mail_vad.vcproj
deleted file mode 100644
index 14c8858..0000000
--- a/win64/mail_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="mail_vad"
-	ProjectGUID="{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_webmail_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_webmail_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_webmail_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_webmail_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_webmail_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-WebMail\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\ods_webmail_dav.vad;$(InputDir)\ods_webmail_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_webmail_dav.vad;$(InputDir)\ods_webmail_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/maildrop.vcproj b/win64/maildrop.vcproj
deleted file mode 100644
index b232b27..0000000
--- a/win64/maildrop.vcproj
+++ /dev/null
@@ -1,487 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="maildrop"
-	ProjectGUID="{C5F98602-E5B9-11DA-85E2-A4E5714C712A}"
-	RootNamespace="maildrop"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\maildrop"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/maildrop.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\maildrop/maildrop.pch"
-				AssemblerListingLocation="$(ConfigurationName)\maildrop/"
-				ObjectFile="$(ConfigurationName)\maildrop/"
-				ProgramDataBaseFileName="$(ConfigurationName)\maildrop/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/maildrop.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\maildrop\win32\maildrop.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/maildrop.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/maildrop.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\maildrop"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/maildrop.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\maildrop/maildrop.pch"
-				AssemblerListingLocation="$(ConfigurationName)\maildrop/"
-				ObjectFile="$(ConfigurationName)\maildrop/"
-				ProgramDataBaseFileName="$(ConfigurationName)\maildrop/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/maildrop.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\maildrop\win32\maildrop.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/maildrop.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/maildrop.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\maildrop"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				CommandLine=""
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="..\binsrc\maildrop\win32\gen\maildrop.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\plugin;..\binsrc\driver\include..\libsrc\Dk;..\libsrc\util\win32;..\libsrc;..\binsrc\maildrop\win32\gen;..\binsrc\maildrop;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\maildrop/maildrop.pch"
-				AssemblerListingLocation="$(ConfigurationName)\maildrop/"
-				ObjectFile="$(ConfigurationName)\maildrop/"
-				ProgramDataBaseFileName="$(ConfigurationName)\maildrop/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/maildrop.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\maildrop\win32\maildrop.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/maildrop.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/maildrop.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\maildrop"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			UseOfATL="2"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				CommandLine="midl /nologo /env x64  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" mailmsg.idl&#x0D;&#x0A;midl /nologo /env x64  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" smtpevent.idl&#x0D;&#x0A;midl /nologo /env x64  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" msado15.idl&#x0D;&#x0A;midl /nologo /env x64  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" seo.idl&#x0D;&#x0A;midl /nologo /env x64  /out "$(InputDir)\..\binsrc\maildrop\win32\gen" cdosys.idl&#x0D;&#x0A;"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="..\binsrc\maildrop\win32\gen\maildrop.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\plugin;..\binsrc\driver\include..\libsrc\Dk;..\libsrc\util\win32;..\libsrc;..\binsrc\maildrop\win32\gen;..\binsrc\maildrop;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\maildrop/maildrop.pch"
-				AssemblerListingLocation="$(ConfigurationName)\maildrop/"
-				ObjectFile="$(ConfigurationName)\maildrop/"
-				ProgramDataBaseFileName="$(ConfigurationName)\maildrop/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/maildrop.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\maildrop\win32\maildrop.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/maildrop.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/maildrop.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\maildrop.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\maildrop.idl"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCMIDLTool"
-						MkTypLibCompatible="false"
-						TargetEnvironment="3"
-						OutputDirectory="$(InputDir)\gen"
-						HeaderFileName="$(InputName).h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\mpl.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\maildrop\win32\maildrop.rc"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						AdditionalIncludeDirectories="..\libsrc\Wi;..\binsrc\maildrop\win32\gen"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/mediawiki.vcproj b/win64/mediawiki.vcproj
deleted file mode 100644
index 94f4a1b..0000000
--- a/win64/mediawiki.vcproj
+++ /dev/null
@@ -1,550 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="mediawiki"
-	ProjectGUID="{408E2482-2623-11DB-9BB9-97600548391D}"
-	RootNamespace="mediawiki"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\mediawiki"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/mediawiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\mediawiki/mediawiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\mediawiki/"
-				ObjectFile="$(ConfigurationName)\mediawiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\mediawiki/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/mediawiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\mediawiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/mediawiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/mediawiki.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\mediawiki"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/mediawiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\mediawiki/mediawiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\mediawiki/"
-				ObjectFile="$(ConfigurationName)\mediawiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\mediawiki/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/mediawiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\mediawiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/mediawiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/mediawiki.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\mediawiki"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/mediawiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\mediawiki/mediawiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\mediawiki/"
-				ObjectFile="$(ConfigurationName)\mediawiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\mediawiki/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/mediawiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\mediawiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/mediawiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/mediawiki.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/mediawiki.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\mediawiki/mediawiki.pch"
-				AssemblerListingLocation="$(ConfigurationName)\mediawiki/"
-				ObjectFile="$(ConfigurationName)\mediawiki/"
-				ProgramDataBaseFileName="$(ConfigurationName)\mediawiki/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/mediawiki.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\mediawiki.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/mediawiki.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/mediawiki.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_maclex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_wikilex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\mediawiki.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-		<Filter
-			Name="LexFiles"
-			>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_maclex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_maclex.c&#x0D;&#x0A;flex -8 -Pmediamacyy -omedia_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_maclex.c&#x0D;&#x0A;flex -8 -Pmediamacyy -omedia_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_maclex.c&#x0D;&#x0A;flex -8 -Pmediamacyy -omedia_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_maclex.c&#x0D;&#x0A;flex -8 -Pmediamacyy -omedia_maclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_maclex.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\media_wikilex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_wikilex.c&#x0D;&#x0A;flex -8 -Pmediawikiyy -omedia_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_wikilex.c&#x0D;&#x0A;flex -8 -Pmediawikiyy -omedia_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_wikilex.c&#x0D;&#x0A;flex -8 -Pmediawikiyy -omedia_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f media_wikilex.c&#x0D;&#x0A;flex -8 -Pmediawikiyy -omedia_wikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\media_wikilex.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/nntpf_vad.vcproj b/win64/nntpf_vad.vcproj
deleted file mode 100644
index c899efa..0000000
--- a/win64/nntpf_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="nntpf_vad"
-	ProjectGUID="{607116BE-F168-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_discussion_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_discussion_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_discussion_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_discussion_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_discussion_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Discussion\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_discussion_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_discussion_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/odbcmail.vcproj b/win64/odbcmail.vcproj
deleted file mode 100644
index 2fd4f85..0000000
--- a/win64/odbcmail.vcproj
+++ /dev/null
@@ -1,442 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtmail"
-	ProjectGUID="{4C517D78-E5B9-11DA-85E2-A4E5714C712A}"
-	RootNamespace="odbcmail"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\odbcmail"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				Description="Making the version file"
-				CommandLine="bash $(InputDir)\..\bin\makever -o $(InputDir)\..\binsrc\maildrop\odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"&#x0D;&#x0A;"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/odbcmail.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\binsrc\maildrop;..\libsrc\zlib;..\binsrc\driver;..\binsrc\maildrop\win32\gen;.\openssl"
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\odbcmail/odbcmail.pch"
-				AssemblerListingLocation="$(ConfigurationName)\odbcmail/"
-				ObjectFile="$(ConfigurationName)\odbcmail/"
-				ProgramDataBaseFileName="$(ConfigurationName)\odbcmail/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="util.lib wic.lib dk1t.lib threads.lib libeay32.lib gdi32.lib advapi32.lib ssleay32.lib ws2_32.lib user32.lib kernel32.lib"
-				OutputFile="$(ConfigurationName)/virt_mail.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/odbcmail.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\odbcmail"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-				Description="Making the version file"
-				CommandLine="bash $(InputDir)\..\bin\makever -o $(InputDir)\..\binsrc\maildrop\odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"&#x0D;&#x0A;"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/odbcmail.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\binsrc\maildrop;..\libsrc\zlib;..\binsrc\driver;..\binsrc\maildrop\win32\gen;.\openssl"
-				PreprocessorDefinitions="_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\odbcmail/odbcmail.pch"
-				AssemblerListingLocation="$(ConfigurationName)\odbcmail/"
-				ObjectFile="$(ConfigurationName)\odbcmail/"
-				ProgramDataBaseFileName="$(ConfigurationName)\odbcmail/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="util.lib wic.lib dk1t.lib threads.lib libeay32.lib gdi32.lib advapi32.lib ssleay32.lib ws2_32.lib user32.lib kernel32.lib"
-				OutputFile="$(ConfigurationName)/virt_mail.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/odbcmail.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\odbcmail"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-				CommandLine="cd $(IntDir)&#x0D;&#x0A;bash $(InputDir)\..\bin\makever -o odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;"
-				AdditionalDependencies="$(IntDir)\odbc_mail.obj"
-				Outputs="$(IntDir)\odbcmail.vers.c"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/odbcmail.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl"
-				PreprocessorDefinitions="_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\odbcmail/odbcmail.pch"
-				AssemblerListingLocation="$(ConfigurationName)\odbcmail/"
-				ObjectFile="$(ConfigurationName)\odbcmail/"
-				ProgramDataBaseFileName="$(ConfigurationName)\odbcmail/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="util.lib wic.lib dk1t.lib threads.lib libeay32.lib gdi32.lib advapi32.lib ssleay32.lib ws2_32.lib user32.lib kernel32.lib"
-				OutputFile="$(ConfigurationName)/virt_mail.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/odbcmail.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\odbcmail"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-				CommandLine="cd $(IntDir)&#x0D;&#x0A;bash $(InputDir)\..\bin\makever -o odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;"
-				AdditionalDependencies="$(IntDir)\odbc_mail.obj"
-				Outputs="$(IntDir)\odbcmail.vers.c"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/odbcmail.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl"
-				PreprocessorDefinitions="_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_WIN32_DCOM;FULL_WINDOWS"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderFile="$(ConfigurationName)\odbcmail/odbcmail.pch"
-				AssemblerListingLocation="$(ConfigurationName)\odbcmail/"
-				ObjectFile="$(ConfigurationName)\odbcmail/"
-				ProgramDataBaseFileName="$(ConfigurationName)\odbcmail/"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="util.lib wic.lib dk1t.lib threads.lib libeay32.lib gdi32.lib advapi32.lib ssleay32.lib ws2_32.lib user32.lib kernel32.lib"
-				OutputFile="$(ConfigurationName)/virt_mail.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/odbcmail.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\maildrop\odbc_mail.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\maildrop\odbcmail.vers.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/ods_vad.vcproj b/win64/ods_vad.vcproj
deleted file mode 100644
index 4e03eab..0000000
--- a/win64/ods_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="ods_vad"
-	ProjectGUID="{7DF920B2-EFDA-11DA-988C-EBAD6065650A}"
-	RootNamespace="ods_framework_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_framework_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_framework_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_framework_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_framework_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Framework\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_framework_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_framework_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/polls_vad.vcproj b/win64/polls_vad.vcproj
deleted file mode 100644
index 39cb587..0000000
--- a/win64/polls_vad.vcproj
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="polls_vad"
-	ProjectGUID="{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}"
-	RootNamespace="ods_polls_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_polls_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_polls_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_polls_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_polls_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Polls\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\ods_polls_dav.vad;$(InputDir)\ods_polls_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_polls_dav.vad;$(InputDir)\ods_polls_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/scroll.vcproj b/win64/scroll.vcproj
deleted file mode 100644
index ffff7f7..0000000
--- a/win64/scroll.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="scroll"
-	ProjectGUID="{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/scroll.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/scroll.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/scroll.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/scroll.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/scroll.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/scroll.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/scroll.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/scroll.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/scroll.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/scroll.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/scroll.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/scroll.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\scroll.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/setcurs.vcproj b/win64/setcurs.vcproj
deleted file mode 100644
index 0df012e..0000000
--- a/win64/setcurs.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="setcurs"
-	ProjectGUID="{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/setcurs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/setcurs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/setcurs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/setcurs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/setcurs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/setcurs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/setcurs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/setcurs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/setcurs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/setcurs.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/setcurs.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/setcurs.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\setcurs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/threads.vcproj b/win64/threads.vcproj
deleted file mode 100644
index fbdacfd..0000000
--- a/win64/threads.vcproj
+++ /dev/null
@@ -1,359 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="threads"
-	ProjectGUID="{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threads.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threads.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threads.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\threads.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Thread\sched_single.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_attr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_queue.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\timer_queue.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/threadw.vcproj b/win64/threadw.vcproj
deleted file mode 100644
index 692e39d..0000000
--- a/win64/threadw.vcproj
+++ /dev/null
@@ -1,365 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="threadw"
-	ProjectGUID="{D3A2882C-410A-4F58-8ACE-A771888073E8}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threadw.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threadw.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\threadw.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\threadw.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Thread\io_unix.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\sched_winthread.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_attr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_queue.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\thread_rwlock.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Thread\timer_queue.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/tidy.vcproj b/win64/tidy.vcproj
deleted file mode 100644
index cc65d40..0000000
--- a/win64/tidy.vcproj
+++ /dev/null
@@ -1,397 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tidy"
-	ProjectGUID="{D9E130E1-7734-43DF-A7EF-15CD95E467EE}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin"
-				PreprocessorDefinitions="_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\tidy.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin"
-				PreprocessorDefinitions="_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\tidy.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc\Dk;..\libsrc;..\libsrc\util;..\libsrc\util\win32"
-				PreprocessorDefinitions="_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\tidy.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc\Dk;..\libsrc;..\libsrc\util;..\libsrc\util\win32"
-				PreprocessorDefinitions="_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\tidy.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Tidy\attrs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\clean.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\config.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\entities.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\istack.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\lexer.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\localize.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\parser.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\pprint.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\tab2space.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\tags.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\tidy.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Tidy\html.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Tidy\platform.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/tpcc.vcproj b/win64/tpcc.vcproj
deleted file mode 100644
index f8c95df..0000000
--- a/win64/tpcc.vcproj
+++ /dev/null
@@ -1,434 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tpcc"
-	ProjectGUID="{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/tpcc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/tpcc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/tpcc.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/tpcc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/tpcc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/tpcc.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/tpcc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/tpcc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/tpcc.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/tpcc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/tpcc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/tpcc.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\tpcc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\tpccodbc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\tpcctrx.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\binsrc\tests\tpcc.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/tutorial_vad.vcproj b/win64/tutorial_vad.vcproj
deleted file mode 100644
index 745786c..0000000
--- a/win64/tutorial_vad.vcproj
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="tutorial_vad"
-	ProjectGUID="{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}"
-	RootNamespace="tutorial_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)\$(ProjectName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\binsrc\tutorial\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\tutorial_dav.vad;$(InputDir)\tutorial_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Debug|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					Outputs="$(InputDir)\tutorial_dav.vad;$(InputDir)\tutorial_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\tutorial_dav.vad;$(InputDir)\tutorial_filesystem.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|x64"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(InputDir);$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\isql.exe;$(TargetDir)\virtuoso-t.exe"
-					Outputs="$(InputDir)\tutorial_dav.vad;$(InputDir)\tutorial_filesystem.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/urlsimu.vcproj b/win64/urlsimu.vcproj
deleted file mode 100644
index 2518e57..0000000
--- a/win64/urlsimu.vcproj
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="urlsimu"
-	ProjectGUID="{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/urlsimu.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/urlsimu.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/urlsimu.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/urlsimu.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/urlsimu.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/urlsimu.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/urlsimu.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/urlsimu.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/urlsimu.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/urlsimu.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,.\openssl"
-				PreprocessorDefinitions="_SSL,_CONSOLE,ODBC_ONLY,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="wic.lib threads.lib dk1t.lib ws2_32.lib libeay32.lib util.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/urlsimu.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/urlsimu.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\tests\time.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\urlsimu.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/util.vcproj b/win64/util.vcproj
deleted file mode 100644
index 08a2784..0000000
--- a/win64/util.vcproj
+++ /dev/null
@@ -1,814 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="util"
-	ProjectGUID="{031DB868-5294-4738-90BA-F80BB2CEA9DC}"
-	RootNamespace="util"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc\Xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\langfunc;..\libsrc\plugin,."
-				PreprocessorDefinitions="DLDAPI_WINDOWS;_SSL;YYTOKENTYPE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\util.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc\Xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\langfunc;..\libsrc\plugin,."
-				PreprocessorDefinitions="DLDAPI_WINDOWS;_SSL;YYTOKENTYPE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK;PCRE_STATIC"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\util.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\zlib;..\binsrc\driver;..\libsrc\langfunc;..\libsrc\plugin,."
-				PreprocessorDefinitions="DLDAPI_WINDOWS;_SSL;BIF_XML;_IMSG;VAD;YYTOKENTYPE;WINDOWS;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\util.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\zlib;..\binsrc\driver;..\libsrc\langfunc;..\libsrc\plugin,."
-				PreprocessorDefinitions="DLDAPI_WINDOWS;_SSL;BIF_XML;_IMSG;VAD;YYTOKENTYPE;WINDOWS;INPROCESS_CLIENT;_MBCS;WIN32;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK;PCRE_STATIC"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\util.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\util\buildarg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\cfg2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\cslentry.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\csllkup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\cslnment.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\dbgmal.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\debug.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\dyntab.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_ucm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\expandav.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnmatch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnqual.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnsearch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fntodos.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\fnundos.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\getopt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\getopt1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\latin1ctype.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\login_digest.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\logmsg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\ltrim.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\make_env.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\mpl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\ncfg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\ntapp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\regerror.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\regexp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\regsub.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\rtrim.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\setext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\startup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\stpcpy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strcpyin.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strerror.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\stricmp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strindex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strinsrt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strlwr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strnicmp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strquote.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strtok_r.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strupr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\strxpect.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\win32\syslog.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\terminat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\ucm2enc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\usage.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\uuid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_mbrtowc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_mbsnrtowcs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_wcrtomb.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_wcs_mask.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\virt_wcsnrtombs.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\libutil.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\uuid.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\uuidP.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="RegExp"
-			>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_chartables.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_compile.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_config.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_dfa_exec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_exec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_fullinfo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_get.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_globals.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_newline.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_ord2utf8.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_study.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_tables.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_try_flipped.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_ucd.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_valid_utf8.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_version.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\util\pcrelib\pcre_xclass.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Langfunc sources"
-			>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_basic.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_charsets.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_html.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\encoding_wide.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\langfunc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\langfunc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\langman.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__en_US.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__ru_RU.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__x_ViAny.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\language__x_ViDoc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_all_chars.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_lowers.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_spaces.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\langfunc\unicode3_uppers.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Plugin sources"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\exe_export.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\export_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\gate_virtuoso_stubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\gate_virtuoso_stubs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\gen_all_gates.sh"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;bash gen_all_gates.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\export_gate_virtuoso.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;bash gen_all_gates.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\export_gate_virtuoso.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;bash gen_all_gates.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\export_gate_virtuoso.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;bash gen_all_gates.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\export_gate_virtuoso.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\plugin.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\plugin.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\plugin_win32.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/virtodbc.vcproj b/win64/virtodbc.vcproj
deleted file mode 100644
index 19c3d01..0000000
--- a/win64/virtodbc.vcproj
+++ /dev/null
@@ -1,534 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtodbc"
-	ProjectGUID="{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtodbc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtodbc.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtodbc\virtodbc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtodbc.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtodbc.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/virtodbc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtodbc.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtodbc\virtodbc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtodbc.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtodbc.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtodbc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtodbc.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtodbc\virtodbc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtodbc.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtodbc.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/virtodbc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtodbc.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				ModuleDefinitionFile="..\binsrc\virtodbc\virtodbc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtodbc.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtodbc.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIodbc3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\CLIsql3_w32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIuti.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\dialog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\kvlist.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\winctl.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\wizard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowser.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowsercombo.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.rc"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/virtoledb.vcproj b/win64/virtoledb.vcproj
deleted file mode 100644
index 4f61221..0000000
--- a/win64/virtoledb.vcproj
+++ /dev/null
@@ -1,727 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtoledb"
-	ProjectGUID="{F357CF96-CF7A-11DA-85E2-A4E5714C712A}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtoledb.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="ole32.lib oleaut32.lib odbccp32.lib rpcrt4.lib gdi32.lib comdlg32.lib threads.lib dk1t.lib util.lib odbc32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtoledb.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtoledb\virtoledb.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtoledb.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtoledb.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/virtoledb.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="ole32.lib oleaut32.lib odbccp32.lib rpcrt4.lib gdi32.lib comdlg32.lib threads.lib dk1t.lib util.lib odbc32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtoledb.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtoledb\virtoledb.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtoledb.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtoledb.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/virtoledb.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="ole32.lib oleaut32.lib odbccp32.lib rpcrt4.lib gdi32.lib comdlg32.lib threads.lib dk1t.lib util.lib odbc32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtoledb.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\binsrc\virtoledb\virtoledb.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtoledb.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtoledb.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/virtoledb.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="ole32.lib oleaut32.lib odbccp32.lib rpcrt4.lib gdi32.lib comdlg32.lib threads.lib dk1t.lib util.lib odbc32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtoledb.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib;LIBCMT.lib"
-				ModuleDefinitionFile="..\binsrc\virtoledb\virtoledb.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtoledb.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/virtoledb.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\binsrc\virtoledb\asserts.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\baseobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIodbc3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\CLIsql3_w32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIuti.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\command.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\connobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\data.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\datalink.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dataobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\datasource.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\db.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\dialog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dllmodule.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\error.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\filedsn.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\globals.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\kvlist.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\lobdata.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\mresults.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\paramdata.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\properties.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\refcounted.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowset.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetdata.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetprops.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\session.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\syncobj.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\util.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\virtodbc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\winctl.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\wizard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowser.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtodbc\zcbrowsercombo.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\binsrc\virtoledb\asserts.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\baseobj.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\command.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\connobj.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\data.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\datalink.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dataobj.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\db.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\dllmodule.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\error.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\filedsn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\headers.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\lobdata.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\os.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\paramdata.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\properties.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\refcounted.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\resource.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowset.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetdata.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\rowsetprops.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\session.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\util.h"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtoledb\virtoledb.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-			<File
-				RelativePath="..\binsrc\virtoledb\virtoledb.rc"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/virtuoso-opensource.sln b/win64/virtuoso-opensource.sln
deleted file mode 100644
index ae614ea..0000000
--- a/win64/virtuoso-opensource.sln
+++ /dev/null
@@ -1,1132 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blobs", "blobs.vcproj", "{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bpel_vad", "bpel_vad.vcproj", "{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "burstoff", "burstoff.vcproj", "{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "conductor_vad", "conductor_vad.vcproj", "{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cursor", "cursor.vcproj", "{97D467CE-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cutter", "cutter.vcproj", "{6E10B655-C324-491F-B202-73565D6B30FB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demodb", "demodb.vcproj", "{CA03DBF1-2C7E-4732-8F41-65030876DDE7}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7} = {50E2DD3F-5B5E-4E62-9206-A41824905CD7}
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A} = {A9B1A466-CF7A-11DA-85E2-A4E5714C712A}
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A} = {3A2B317A-CF7A-11DA-85E2-A4E5714C712A}
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A} = {EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A} = {828BB6BA-CF7A-11DA-85E2-A4E5714C712A}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dk1t", "dk1t.vcproj", "{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dksrv", "dksrv.vcproj", "{58867EBA-CA07-4F41-A966-6245FF14773E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_vad", "doc_vad.vcproj", "{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{6E10B655-C324-491F-B202-73565D6B30FB} = {6E10B655-C324-491F-B202-73565D6B30FB}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getdata", "getdata.vcproj", "{AFB15514-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_perl", "hosting_perl.vcproj", "{354809B6-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_python", "hosting_python.vcproj", "{B525A234-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im", "im.vcproj", "{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ins", "ins.vcproj", "{C6C66924-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isql", "isql_native.vcproj", "{AFB1D909-86D0-49DE-8BD8-DF89349F934E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvirtuoso_t", "libvirtuoso_odbc_t.vcproj", "{FB836C59-41E1-48EA-A59B-460AB56587EE}"
-	ProjectSection(ProjectDependencies) = postProject
-		{D3A2882C-410A-4F58-8ACE-A771888073E8} = {D3A2882C-410A-4F58-8ACE-A771888073E8}
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isqlo", "isql.vcproj", "{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scroll", "scroll.vcproj", "{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "setcurs", "setcurs.vcproj", "{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threads", "threads.vcproj", "{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadw", "threadw.vcproj", "{D3A2882C-410A-4F58-8ACE-A771888073E8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tidy", "tidy.vcproj", "{D9E130E1-7734-43DF-A7EF-15CD95E467EE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tpcc", "tpcc.vcproj", "{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tutorial_vad", "tutorial_vad.vcproj", "{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E} = {AFB1D909-86D0-49DE-8BD8-DF89349F934E}
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7} = {50E2DD3F-5B5E-4E62-9206-A41824905CD7}
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0} = {F4E88BFA-FC96-439D-9E67-0A92AB541EE0}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "urlsimu", "urlsimu.vcproj", "{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "util.vcproj", "{031DB868-5294-4738-90BA-F80BB2CEA9DC}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtodbc", "virtodbc.vcproj", "{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtoledb", "virtoledb.vcproj", "{F357CF96-CF7A-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_clr_t", "virtuoso_odbc_clr_t.vcproj", "{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}"
-	ProjectSection(ProjectDependencies) = postProject
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_javavm_t", "virtuoso_odbc_javavm_t.vcproj", "{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_sample_t", "virtuoso_odbc_sample_t.vcproj", "{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{FB836C59-41E1-48EA-A59B-460AB56587EE} = {FB836C59-41E1-48EA-A59B-460AB56587EE}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso_t", "virtuoso_odbc_t.vcproj", "{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}"
-	ProjectSection(ProjectDependencies) = postProject
-		{D3A2882C-410A-4F58-8ACE-A771888073E8} = {D3A2882C-410A-4F58-8ACE-A771888073E8}
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wi", "wi.vcproj", "{93051962-7797-49F0-8958-BB1CE60FFE6F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wic", "wic.vcproj", "{A66E395B-18EE-4877-8F0D-386A7BBAB370}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wikiv", "wikiv.vcproj", "{A326A0DF-4F93-4DF6-813D-0B64F98B389F}"
-	ProjectSection(ProjectDependencies) = postProject
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "xml.vcproj", "{0C234EF0-7725-4BDA-A1C3-47F5835A3837}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VirtuosoClient.NET.vc2005", "..\binsrc\VirtuosoClient.Net\VirtuosoClient.NET.vc2005.csproj", "{50E2DD3F-5B5E-4E62-9206-A41824905CD7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maildrop", "maildrop.vcproj", "{C5F98602-E5B9-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtmail", "odbcmail.vcproj", "{4C517D78-E5B9-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ods_vad", "ods_vad.vcproj", "{7DF920B2-EFDA-11DA-988C-EBAD6065650A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blog_vad", "blog_vad.vcproj", "{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bookmark_vad", "bookmark_vad.vcproj", "{8A49554A-EFE3-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "briefcase_vad", "briefcase_vad.vcproj", "{55215A1C-EFE2-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "community_vad", "community_vad.vcproj", "{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "feeds_vad", "feeds_vad.vcproj", "{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gallery_vad", "gallery_vad.vcproj", "{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mail_vad", "mail_vad.vcproj", "{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nntpf_vad", "nntpf_vad.vcproj", "{607116BE-F168-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polls_vad", "polls_vad.vcproj", "{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wiki_vad", "wiki_vad.vcproj", "{40062448-EFE0-11DA-85E2-A4E5714C712A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_php", "hosting_php.vcproj", "{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
-		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
-		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "creolewiki", "creolewiki.vcproj", "{ABE43C46-E1C4-11DB-930B-CD6B662399AA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediawiki", "mediawiki.vcproj", "{408E2482-2623-11DB-9BB9-97600548391D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbxml2", "wbxml2.vcproj", "{5582D8D0-DB93-11DB-930B-CD6B662399AA}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Debug|Mixed Platforms = Debug|Mixed Platforms
-		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
-		Release|Any CPU = Release|Any CPU
-		Release|Mixed Platforms = Release|Mixed Platforms
-		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{3A2B317A-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{828BB6BA-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Win32.ActiveCfg = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Win32.Build.0 = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|x64.ActiveCfg = Debug|x64
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|x64.Build.0 = Debug|x64
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|x86.ActiveCfg = Debug|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Any CPU.ActiveCfg = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Win32.ActiveCfg = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Win32.Build.0 = Release|Win32
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|x64.ActiveCfg = Release|x64
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|x64.Build.0 = Release|x64
-		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|x86.ActiveCfg = Release|x64
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|Win32.ActiveCfg = Debug|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|Win32.Build.0 = Debug|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|x64.ActiveCfg = Debug|x64
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Debug|x86.ActiveCfg = Debug|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|Any CPU.ActiveCfg = Release|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|Win32.ActiveCfg = Release|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|Win32.Build.0 = Release|Win32
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|x64.ActiveCfg = Release|x64
-		{CA03DBF1-2C7E-4732-8F41-65030876DDE7}.Release|x86.ActiveCfg = Release|x64
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Win32.Build.0 = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|x64.ActiveCfg = Debug|x64
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|x64.Build.0 = Debug|x64
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|x86.ActiveCfg = Debug|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Any CPU.ActiveCfg = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Win32.ActiveCfg = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Win32.Build.0 = Release|Win32
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|x64.ActiveCfg = Release|x64
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|x64.Build.0 = Release|x64
-		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|x86.ActiveCfg = Release|x64
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Win32.Build.0 = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|x64.ActiveCfg = Debug|x64
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|x64.Build.0 = Debug|x64
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|x86.ActiveCfg = Debug|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Any CPU.ActiveCfg = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Win32.ActiveCfg = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Win32.Build.0 = Release|Win32
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|x64.ActiveCfg = Release|x64
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|x64.Build.0 = Release|x64
-		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|x86.ActiveCfg = Release|x64
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{A9B1A466-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Win32.Build.0 = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|x64.ActiveCfg = Debug|x64
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|x64.Build.0 = Debug|x64
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|x86.ActiveCfg = Debug|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Any CPU.ActiveCfg = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Win32.ActiveCfg = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Win32.Build.0 = Release|Win32
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|x64.ActiveCfg = Release|x64
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|x64.Build.0 = Release|x64
-		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|x86.ActiveCfg = Release|x64
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Win32.ActiveCfg = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Win32.Build.0 = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|x64.ActiveCfg = Debug|x64
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|x64.Build.0 = Debug|x64
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|x86.ActiveCfg = Debug|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Any CPU.ActiveCfg = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Win32.ActiveCfg = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Win32.Build.0 = Release|Win32
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|x64.ActiveCfg = Release|x64
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|x64.Build.0 = Release|x64
-		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|x86.ActiveCfg = Release|x64
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Win32.Build.0 = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|x64.ActiveCfg = Debug|x64
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|x64.Build.0 = Debug|x64
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|x86.ActiveCfg = Debug|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Any CPU.ActiveCfg = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Win32.ActiveCfg = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Win32.Build.0 = Release|Win32
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|x64.ActiveCfg = Release|x64
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|x64.Build.0 = Release|x64
-		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|x86.ActiveCfg = Release|x64
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Win32.Build.0 = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|x64.ActiveCfg = Debug|x64
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|x64.Build.0 = Debug|x64
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|x86.ActiveCfg = Debug|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Any CPU.ActiveCfg = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Win32.ActiveCfg = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Win32.Build.0 = Release|Win32
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|x64.ActiveCfg = Release|x64
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|x64.Build.0 = Release|x64
-		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|x86.ActiveCfg = Release|x64
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Win32.ActiveCfg = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Win32.Build.0 = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|x64.ActiveCfg = Debug|x64
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|x64.Build.0 = Debug|x64
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|x86.ActiveCfg = Debug|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Any CPU.ActiveCfg = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Win32.ActiveCfg = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Win32.Build.0 = Release|Win32
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|x64.ActiveCfg = Release|x64
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|x64.Build.0 = Release|x64
-		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|x86.ActiveCfg = Release|x64
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{EB22A6B6-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Win32.ActiveCfg = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Win32.Build.0 = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|x64.ActiveCfg = Debug|x64
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|x64.Build.0 = Debug|x64
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|x86.ActiveCfg = Debug|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Any CPU.ActiveCfg = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Win32.ActiveCfg = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Win32.Build.0 = Release|Win32
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|x64.ActiveCfg = Release|x64
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|x64.Build.0 = Release|x64
-		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|x86.ActiveCfg = Release|x64
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Win32.Build.0 = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|x64.ActiveCfg = Debug|x64
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|x64.Build.0 = Debug|x64
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|x86.ActiveCfg = Debug|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Any CPU.ActiveCfg = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Win32.ActiveCfg = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Win32.Build.0 = Release|Win32
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|x64.ActiveCfg = Release|x64
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|x64.Build.0 = Release|x64
-		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|x86.ActiveCfg = Release|x64
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Debug|x64
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
-		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Win32.Build.0 = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|x64.ActiveCfg = Debug|x64
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|x64.Build.0 = Debug|x64
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|x86.ActiveCfg = Debug|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Any CPU.ActiveCfg = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Win32.ActiveCfg = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Win32.Build.0 = Release|Win32
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|x64.ActiveCfg = Release|x64
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|x64.Build.0 = Release|x64
-		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|x86.ActiveCfg = Release|x64
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Win32.Build.0 = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|x64.ActiveCfg = Debug|x64
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|x64.Build.0 = Debug|x64
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|x86.ActiveCfg = Debug|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Any CPU.ActiveCfg = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Win32.ActiveCfg = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Win32.Build.0 = Release|Win32
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|x64.ActiveCfg = Release|x64
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|x64.Build.0 = Release|x64
-		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|x86.ActiveCfg = Release|x64
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Win32.Build.0 = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|x64.ActiveCfg = Debug|x64
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|x64.Build.0 = Debug|x64
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|x86.ActiveCfg = Debug|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Any CPU.ActiveCfg = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Win32.ActiveCfg = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Win32.Build.0 = Release|Win32
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|x64.ActiveCfg = Release|x64
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|x64.Build.0 = Release|x64
-		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|x86.ActiveCfg = Release|x64
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Win32.Build.0 = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|x64.ActiveCfg = Debug|x64
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|x64.Build.0 = Debug|x64
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|x86.ActiveCfg = Debug|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Any CPU.ActiveCfg = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Win32.ActiveCfg = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Win32.Build.0 = Release|Win32
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|x64.ActiveCfg = Release|x64
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|x64.Build.0 = Release|x64
-		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|x86.ActiveCfg = Release|x64
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Win32.Build.0 = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|x64.ActiveCfg = Debug|x64
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|x64.Build.0 = Debug|x64
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|x86.ActiveCfg = Debug|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Any CPU.ActiveCfg = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Win32.ActiveCfg = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Win32.Build.0 = Release|Win32
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|x64.ActiveCfg = Release|x64
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|x64.Build.0 = Release|x64
-		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|x86.ActiveCfg = Release|x64
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Win32.ActiveCfg = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Win32.Build.0 = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|x64.ActiveCfg = Debug|x64
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|x64.Build.0 = Debug|x64
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|x86.ActiveCfg = Debug|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Any CPU.ActiveCfg = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Win32.ActiveCfg = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Win32.Build.0 = Release|Win32
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|x64.ActiveCfg = Release|x64
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|x64.Build.0 = Release|x64
-		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|x86.ActiveCfg = Release|x64
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Mixed Platforms.Build.0 = Debug|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Win32.ActiveCfg = Debug|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x64.Build.0 = Debug|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x86.ActiveCfg = Debug|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x86.Build.0 = Debug|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Any CPU.Build.0 = Release|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Mixed Platforms.ActiveCfg = Release|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Mixed Platforms.Build.0 = Release|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Win32.ActiveCfg = Release|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x64.ActiveCfg = Release|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x64.Build.0 = Release|Any CPU
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x86.ActiveCfg = Release|x86
-		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x86.Build.0 = Release|x86
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
-		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|Win32.Build.0 = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|x64.ActiveCfg = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Debug|x86.ActiveCfg = Debug|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|Win32.ActiveCfg = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|Win32.Build.0 = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|x64.ActiveCfg = Release|Win32
-		{7DF920B2-EFDA-11DA-988C-EBAD6065650A}.Release|x86.ActiveCfg = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|Win32.Build.0 = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|x64.ActiveCfg = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Debug|x86.ActiveCfg = Debug|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|Any CPU.ActiveCfg = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|Win32.ActiveCfg = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|Win32.Build.0 = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|x64.ActiveCfg = Release|Win32
-		{8CF9FC64-EFDD-11DA-986F-EA05CA2469B6}.Release|x86.ActiveCfg = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{8A49554A-EFE3-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{55215A1C-EFE2-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{C0990F5A-EFE3-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{441F1D0C-EFE3-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{BFCB4C14-EFE3-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{B0058FA6-EFE3-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{607116BE-F168-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|Win32.Build.0 = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|x64.ActiveCfg = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Debug|x86.ActiveCfg = Debug|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|Any CPU.ActiveCfg = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|Win32.Build.0 = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|x64.ActiveCfg = Release|Win32
-		{FAB7D8D8-C7DD-11DB-930B-CD6B662399AA}.Release|x86.ActiveCfg = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|Win32.Build.0 = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Debug|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|Win32
-		{40062448-EFE0-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Win32.Build.0 = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|x64.ActiveCfg = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|x86.ActiveCfg = Debug|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Any CPU.ActiveCfg = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Win32.ActiveCfg = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Win32.Build.0 = Release|Win32
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|x64.ActiveCfg = Release|x64
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|x64.Build.0 = Release|x64
-		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|x86.ActiveCfg = Release|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Any CPU.ActiveCfg = Debug|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Mixed Platforms.Build.0 = Debug|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Win32.Build.0 = Debug|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|x64.ActiveCfg = Debug|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|x64.Build.0 = Debug|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|x86.ActiveCfg = Debug|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Any CPU.ActiveCfg = Release|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Mixed Platforms.ActiveCfg = Release|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Mixed Platforms.Build.0 = Release|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Win32.Build.0 = Release|Win32
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|x64.ActiveCfg = Release|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|x64.Build.0 = Release|x64
-		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|x86.ActiveCfg = Release|x64
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Any CPU.ActiveCfg = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Mixed Platforms.Build.0 = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Win32.ActiveCfg = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Win32.Build.0 = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|x64.ActiveCfg = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|x86.ActiveCfg = Debug|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Any CPU.ActiveCfg = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Mixed Platforms.ActiveCfg = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Mixed Platforms.Build.0 = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Win32.ActiveCfg = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Win32.Build.0 = Release|Win32
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|x64.ActiveCfg = Release|x64
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|x64.Build.0 = Release|x64
-		{408E2482-2623-11DB-9BB9-97600548391D}.Release|x86.ActiveCfg = Release|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Any CPU.ActiveCfg = Debug|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Mixed Platforms.Build.0 = Debug|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Debug|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Win32.Build.0 = Debug|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|x64.ActiveCfg = Debug|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|x64.Build.0 = Debug|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|x86.ActiveCfg = Debug|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Any CPU.ActiveCfg = Release|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Mixed Platforms.ActiveCfg = Release|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Mixed Platforms.Build.0 = Release|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Win32.Build.0 = Release|Win32
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|x64.ActiveCfg = Release|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|x64.Build.0 = Release|x64
-		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|x86.ActiveCfg = Release|x64
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/win64/virtuoso_odbc_clr_t.vcproj b/win64/virtuoso_odbc_clr_t.vcproj
deleted file mode 100644
index 6f005d9..0000000
--- a/win64/virtuoso_odbc_clr_t.vcproj
+++ /dev/null
@@ -1,527 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_clr_t"
-	ProjectGUID="{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}"
-	RootNamespace="virtuoso_clr_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib advapi32.lib Mscoree.lib"
-				OutputFile="$(OutDir)/virtuoso-clr-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_clr_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib advapi32.lib Mscoree.lib"
-				OutputFile="$(OutDir)/virtuoso-clr-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_clr_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib advapi32.lib Mscoree.lib"
-				OutputFile="$(OutDir)/virtuoso-clr-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_clr_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib advapi32.lib Mscoree.lib"
-				OutputFile="$(OutDir)/virtuoso-clr-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_clr_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\mono\basec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\dotnet.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\sql_code_clr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\sql_code_xslt.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-			<File
-				RelativePath="..\win32\virtuoso_t.rc"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="PreBuild"
-			>
-			<File
-				RelativePath="..\binsrc\hosting\mono\import_clr.sql"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\mono_type.xsl"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_xslt.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_xslt.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputFileName) > sql_code_xslt.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_xslt.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sql_code_xslt.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputFileName) > sql_code_xslt.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\hosting\mono\virtclr.cs"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virtclr.dll $(InputFileName)&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs&#x0D;&#x0A;gacutil -u virt_http&#x0D;&#x0A;gacutil -i $(TargetDir)/virt_http.dll&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_http.cs"
-						Outputs="$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virtclr.dll $(InputFileName)&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs&#x0D;&#x0A;gacutil -u virt_http&#x0D;&#x0A;gacutil -i $(TargetDir)/virt_http.dll&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_http.cs"
-						Outputs="$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virtclr.dll $(InputFileName)&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs&#x0D;&#x0A;gacutil -u virt_http&#x0D;&#x0A;gacutil -i $(TargetDir)/virt_http.dll&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_http.cs"
-						Outputs="$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virtclr.dll $(InputFileName)&#x0D;&#x0A;csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs&#x0D;&#x0A;gacutil -u virt_http&#x0D;&#x0A;gacutil -i $(TargetDir)/virt_http.dll&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\virt_http.cs"
-						Outputs="$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/virtuoso_odbc_javavm_t.vcproj b/win64/virtuoso_odbc_javavm_t.vcproj
deleted file mode 100644
index d37cf62..0000000
--- a/win64/virtuoso_odbc_javavm_t.vcproj
+++ /dev/null
@@ -1,525 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_javavm_t"
-	ProjectGUID="{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}"
-	RootNamespace="virtuoso_javavm_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""$(JDK_PATH)\include";..\libsrc\xml.new;..\libsrc;"$(JDK_PATH)\include\win32";..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib "$(JDK_PATH)\lib\jvm.lib""
-				OutputFile="$(OutDir)/virtuoso-javavm-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_javavm_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""$(JDK_PATH)\include";..\libsrc\xml.new;..\libsrc;"$(JDK_PATH)\include\win32";..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib "$(JDK_PATH)\lib\jvm.lib""
-				OutputFile="$(OutDir)/virtuoso-javavm-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_javavm_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""$(JDK_PATH)\include";..\libsrc\xml.new;..\libsrc;"$(JDK_PATH)\include\win32";..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib "$(JDK_PATH)\lib\jvm.lib""
-				OutputFile="$(OutDir)/virtuoso-javavm-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_javavm_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories=""$(JDK_PATH)\include";..\libsrc\xml.new;..\libsrc;"$(JDK_PATH)\include\win32";..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib "$(JDK_PATH)\lib\jvm.lib""
-				OutputFile="$(OutDir)/virtuoso-javavm-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_javavm_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\tests\biftest\java_code.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\javavm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\sql_code_clr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\sql_code_javavm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\sql_code_xslt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\win32\virtuoso_t.rc"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<Filter
-			Name="PreBuild"
-			>
-			<File
-				RelativePath="..\binsrc\tests\biftest\import_clr.sql"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_clr.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_clr.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\javavm_type.xsl"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_xslt.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_xslt.c &#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputFileName) > sql_code_xslt.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_clr.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputPath) > sql_code_xslt.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_xslt.c &#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG $(InputFileName) > sql_code_xslt.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)"
-						Outputs="$(InputDir)\sql_code_xslt.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\binsrc\tests\biftest\javavm_xml.sql"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_javavm.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_javavm.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_javavm.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_javavm.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_javavm.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_javavm.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;&#x0D;&#x0A;rm -f sql_code_javavm.c&#x0D;&#x0A;gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c&#x0D;&#x0A;&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sql_code_javavm.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/virtuoso_odbc_sample_t.vcproj b/win64/virtuoso_odbc_sample_t.vcproj
deleted file mode 100644
index 7e96e89..0000000
--- a/win64/virtuoso_odbc_sample_t.vcproj
+++ /dev/null
@@ -1,387 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_sample_t"
-	ProjectGUID="{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}"
-	RootNamespace="virtuoso_sample_t"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(OutDir)/virtuoso-sample-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_sample_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(OutDir)/virtuoso-sample-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_sample_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(OutDir)/virtuoso-sample-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_sample_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;."
-				PreprocessorDefinitions="INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				PrecompiledHeaderThrough=""
-				WarningLevel="3"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="libvirtuoso-t.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(OutDir)/virtuoso-sample-t.exe"
-				LinkIncremental="0"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames=""
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/virtuoso_sample_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\binsrc\tests\biftest\bif_sample.c"
-				>
-			</File>
-			<File
-				RelativePath="..\win32\virtuoso_t.rc"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/virtuoso_odbc_t.vcproj b/win64/virtuoso_odbc_t.vcproj
deleted file mode 100644
index 02e2073..0000000
--- a/win64/virtuoso_odbc_t.vcproj
+++ /dev/null
@@ -1,431 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="virtuoso_t"
-	ProjectGUID="{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}"
-	RootNamespace="virtuoso_t"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/virtuoso_t.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;PACKAGE_VERSION="6.1.3""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-				AdditionalIncludeDirectories="..\openlink\include;..\xOs\stubs"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtuoso-t.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtuoso_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/virtuoso_t.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;PACKAGE_VERSION=\"6.1.3\""
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-				AdditionalIncludeDirectories="..\openlink\include;..\xOs\stubs"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtuoso-t.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtuoso_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName="$(ConfigurationName)/virtuoso_t.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-				AdditionalIncludeDirectories="..\openlink\include;..\xOs\stubs"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/virtuoso-t.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName);.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtuoso_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/virtuoso_t.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\plugin,..\libsrc\langfunc,..\libsrc\openssl, ."
-				PreprocessorDefinitions="PACKAGE_VERSION=\"6.1.3\";_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1049"
-				AdditionalIncludeDirectories="..\openlink\include;..\xOs\stubs"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="threadw.lib wi.lib dksrv.lib util.lib xml.lib zlib.lib ws2_32.lib libeay32.lib ssleay32.lib tidy.lib"
-				OutputFile="$(ConfigurationName)/virtuoso-t.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories=""$(ConfigurationName)";.\openssl;..\libsrc\openssl"
-				IgnoreDefaultLibraryNames="LIBCMT"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/virtuoso_t.pdb"
-				SubSystem="1"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\shcompo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtuoso\viconfig.c"
-				>
-			</File>
-			<File
-				RelativePath="..\win32\virtuoso_t.rc"
-				>
-			</File>
-			<File
-				RelativePath="..\binsrc\virtuoso\viwin32.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/wi.vcproj b/win64/wi.vcproj
deleted file mode 100644
index 56e6fd2..0000000
--- a/win64/wi.vcproj
+++ /dev/null
@@ -1,2495 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wi"
-	ProjectGUID="{93051962-7797-49F0-8958-BB1CE60FFE6F}"
-	RootNamespace="wi"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\tidy;..\binsrc\driver;."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="YYDEBUG"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wi.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;"$(InputDir)\tidy";..\binsrc\driver;.;..\libsrc\Tidy"
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;YY_NO_UNISTD_H;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;OLD_TIDY"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="YYDEBUG"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wi.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\tidy;..\binsrc\driver;."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="YYDEBUG"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wi.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\tidy;..\binsrc\driver;."
-				PreprocessorDefinitions="_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;YY_NO_UNISTD_H;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="YYDEBUG"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\wi.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\2pc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\aqueue.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\arith.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\auxfiles.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_audio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_crypto.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_date.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_dav.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_diff.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_explain.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_file.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_gnw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_imap.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_intl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_json.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_kerberoscli.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_ldapcli.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_mts.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_nntp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_phrasematch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_pop3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_regexp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_repl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_smtp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_soap.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_text.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_tidy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_uuencode.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_xml.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_xper.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bitmap.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blob.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\cl_stubs.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\crypt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ddlrun.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\disk.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\dks_esc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\eqlcomp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\extent.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\hash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\hosting.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\insert.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\inxop.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\jso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\json_l.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\json_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\lisprdr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\lock.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\log.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\map_schema.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\map_schema.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\meta.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mtwrite.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\neodisk.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\nquad_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\obackup.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\odbccat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\page.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\pldebug.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_loader.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdf_core.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdf_mapping_jso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdfbox.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdfinf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdfxml_parser.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\recovery.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\regist.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rltrx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\row.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\schspace.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\scn3_vsnet.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\search.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\search_in.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\security.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\shuric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sort.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\space.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql2sql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql2sqltext.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_core.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_l.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_qm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_rdb2rdf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_sff.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_tree.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparqld.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparul2sql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql3_vc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_1.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_2pc.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_adm.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_auto.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_blog.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_cache.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_cache_impl.c"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_dav.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_dbp.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_ddk.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_imsg.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_pldbg.c"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_repl.c"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_sparql.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_sys.c"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_uddi.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_vad.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_vdb.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_code_ws.c"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlbif.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlbif2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcomp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcomp2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcost.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqldf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlexp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlgen.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlhash.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlintrp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlinx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlo.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloby.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlocr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloinv.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloinx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloprt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlorder.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlovdb.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlpfn.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlprocc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlprt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrbuf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrcomp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrrun.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrun.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlsrv.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlstmts.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltrig.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltype.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlver.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlview.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvmultibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvstat.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\string.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\subseq.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\text.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\trans.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_l.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_p.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\uname_const_decl.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\update.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\uuencode.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wiservic.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc-dec.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc_algos.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmllazy.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlschema.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlsearch.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlsql.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmltree.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpath.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpscn_vsnet.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xqf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt_fmt.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt_opt.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\2pc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\2pc_client.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\arith.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_text.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\bif_xper.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLI.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\crsr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\date.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\eqlcomp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\hosting.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\http_client.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\iodbcinst.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ksrvext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ksrvextphp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\license.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\lisprdr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\list2.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\log.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\ltrx.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\msdtc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_com.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\odbcinc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\pldebug.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rdf_core.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\recovery.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\remote.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\rendezvous.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\repl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\replsr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\schspace.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\security.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sha.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\shuric.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\soap.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql2sql.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_p.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql3.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlbif.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcmps.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcomp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlcstate.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlfn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlintrp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlnode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlo.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlocr.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlofn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqloinv.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlopcod.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlpar.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlparext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlpfn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlrcomp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltype.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqltype_c.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlver.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlwords.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvmultibyte.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\srvstat.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\statuslog.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\strlike.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\subseq.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\text.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_p.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\uuencode_impl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\virtext.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\virtpwd.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\widd.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\widisk.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\widv.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wifn.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpce.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wiservic.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xml.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc_algos.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlenc_test.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlgen.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlnode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmlres.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xmltree.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpath.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp_impl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpf.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xqf.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xslt_impl.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="PreBuild"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\json.l"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f json_l.c&#x0D;&#x0A;flex -8 -Pjsonyy -ojson_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)json_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f json_l.c&#x0D;&#x0A;flex -8 -Pjsonyy -ojson_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)json_l.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\json.y"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f json_p.c&#x0D;&#x0A;rm -f json_p.h&#x0D;&#x0A;bison -y -vd -pjsonyy json.y -ojson_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)json_p.c;$(InputDir)json_p.h"
-						Outputs="$(InputDir)json_p.c;$(InputDir)json_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f json_p.c&#x0D;&#x0A;rm -f json_p.h&#x0D;&#x0A;bison -y -vd -pjsonyy json.y -ojson_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies=""
-						Outputs="$(InputDir)json_p.c;$(InputDir)json_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\nquad_p.y"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f nquad_p.c&#x0D;&#x0A;rm -f nquad_p.h&#x0D;&#x0A;bison -y -vd -pnqyy nquad_p.y -onquad_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)nquad_p.c;$(InputDir)nquad_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\scn3.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f scn3_vsnet.c&#x0D;&#x0A;flex -oscn3_vsnet.c $(InputPath)&#x0D;&#x0A;flex -Pscn3splityy -oscn3split.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)scn3_vsnet.c;$(InputDir)scn3split.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f scn3_vsnet.c&#x0D;&#x0A;flex -oscn3_vsnet.c $(InputPath)&#x0D;&#x0A;flex -Pscn3splityy -oscn3split.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)scn3_vsnet.c;$(InputDir)scn3split.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f scn3_vsnet.c&#x0D;&#x0A;flex -oscn3_vsnet.c $(InputPath)&#x0D;&#x0A;flex -Pscn3splityy -oscn3split.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)scn3_vsnet.c;$(InputDir)scn3split.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f scn3_vsnet.c&#x0D;&#x0A;flex -oscn3_vsnet.c $(InputPath)&#x0D;&#x0A;flex -Pscn3splityy -oscn3split.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)scn3_vsnet.c;$(InputDir)scn3split.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_l.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_l.c&#x0D;&#x0A;flex -8 -Psparyy -osparql_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_l.c&#x0D;&#x0A;flex -8 -Psparyy -osparql_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_l.c&#x0D;&#x0A;flex -8 -Psparyy -osparql_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_l.c&#x0D;&#x0A;flex -8 -Psparyy -osparql_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_l.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sparql_p.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_p.c&#x0D;&#x0A;rm -f sparql_p.h&#x0D;&#x0A;bison -y -vd -psparyy sparql_p.y -osparql_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_p.c;$(InputDir)sparql_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_p.c&#x0D;&#x0A;rm -f sparql_p.h&#x0D;&#x0A;bison -y -vd -psparyy sparql_p.y -osparql_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_p.c;$(InputDir)sparql_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_p.c&#x0D;&#x0A;rm -f sparql_p.h&#x0D;&#x0A;bison -y -vd -psparyy sparql_p.y -osparql_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_p.c;$(InputDir)sparql_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sparql_p.c&#x0D;&#x0A;rm -f sparql_p.h&#x0D;&#x0A;bison -y -vd -psparyy sparql_p.y -osparql_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sparql_p.c;$(InputDir)sparql_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql3.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sql3.c&#x0D;&#x0A;rm -f sql3.h&#x0D;&#x0A;bison -y  -vd sql3.y -osql3.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sql3.c;$(InputDir)sql3.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sql3.c&#x0D;&#x0A;rm -f sql3.h&#x0D;&#x0A;bison -y  -vd sql3.y -osql3.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sql3.c;$(InputDir)sql3.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sql3.c&#x0D;&#x0A;rm -f sql3.h&#x0D;&#x0A;bison -y  -vd sql3.y -osql3.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sql3.c;$(InputDir)sql3.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f sql3.c&#x0D;&#x0A;rm -f sql3.h&#x0D;&#x0A;bison -y  -vd sql3.y -osql3.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)sql3.c;$(InputDir)sql3.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sql_to_c.awk"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;$(ProjectDir)\sqlcode.bat&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\..\..\binsrc\vspx\vspx.xsl"
-						Outputs="$(InputDir)\sql_code.c;$(InputDir)\sql_code_1.c;$(InputDir)\sql_code_ddk.c;$(InputDir)\sql_code_adm.c;$(InputDir)\sql_code_dav.c;$(InputDir)\sql_code_vad.c;$(InputDir)\sql_code_dbp.c;$(InputDir)\sql_code_uddi.c;$(InputDir)\sql_code_imsg.c;$(InputDir)\sql_code_auto.c;$(InputDir)\sql_code_2pc.c;$(InputDir)\rdf_mapping_jso.h;$(InputDir)\rdf_mapping_jso.c;$(InputDir)\rdf_mapping_jso.ttl;$(InputDir)\rdf_mapping_jso.ttl-sample"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;$(ProjectDir)\sqlcode.bat&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\..\..\binsrc\vspx\vspx.xsl"
-						Outputs="$(InputDir)\sql_code.c;$(InputDir)\sql_code_1.c;$(InputDir)\sql_code_ddk.c;$(InputDir)\sql_code_adm.c;$(InputDir)\sql_code_dav.c;$(InputDir)\sql_code_vad.c;$(InputDir)\sql_code_dbp.c;$(InputDir)\sql_code_uddi.c;$(InputDir)\sql_code_imsg.c;$(InputDir)\sql_code_auto.c;$(InputDir)\sql_code_2pc.c;$(InputDir)\rdf_mapping_jso.h;$(InputDir)\rdf_mapping_jso.c;$(InputDir)\rdf_mapping_jso.ttl;$(InputDir)\rdf_mapping_jso.ttl-sample"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;$(ProjectDir)\sqlcode.bat&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\..\..\binsrc\vspx\vspx.xsl"
-						Outputs="$(InputDir)\sql_code.c;$(InputDir)\sql_code_1.c;$(InputDir)\sql_code_ddk.c;$(InputDir)\sql_code_adm.c;$(InputDir)\sql_code_dav.c;$(InputDir)\sql_code_vad.c;$(InputDir)\sql_code_dbp.c;$(InputDir)\sql_code_uddi.c;$(InputDir)\sql_code_imsg.c;$(InputDir)\sql_code_auto.c;$(InputDir)\sql_code_2pc.c;$(InputDir)\rdf_mapping_jso.h;$(InputDir)\rdf_mapping_jso.c;$(InputDir)\rdf_mapping_jso.ttl;$(InputDir)\rdf_mapping_jso.ttl-sample"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;$(ProjectDir)\sqlcode.bat&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						AdditionalDependencies="$(InputDir)\..\..\binsrc\vspx\vspx.xsl"
-						Outputs="$(InputDir)\sql_code.c;$(InputDir)\sql_code_1.c;$(InputDir)\sql_code_ddk.c;$(InputDir)\sql_code_adm.c;$(InputDir)\sql_code_dav.c;$(InputDir)\sql_code_vad.c;$(InputDir)\sql_code_dbp.c;$(InputDir)\sql_code_uddi.c;$(InputDir)\sql_code_imsg.c;$(InputDir)\sql_code_auto.c;$(InputDir)\sql_code_2pc.c;$(InputDir)\rdf_mapping_jso.h;$(InputDir)\rdf_mapping_jso.c;$(InputDir)\rdf_mapping_jso.ttl;$(InputDir)\rdf_mapping_jso.ttl-sample"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\sqlwords.gperf"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sqlwords.h&#x0D;&#x0A;gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e 's/char \*keyword/char *keiiyword/g' >sqlwords.h&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sqlwords.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="cd $(InputDir)&#x0D;&#x0A;rm -f sqlwords.h&#x0D;&#x0A;gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e 's/char \*keyword/char *keiiyword/g' >sqlwords.h&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\sqlwords.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_l.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_l.c&#x0D;&#x0A;flex -8 -Pttlyy -oturtle_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_l.c&#x0D;&#x0A;flex -8 -Pttlyy -oturtle_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_l.c&#x0D;&#x0A;flex -8 -Pttlyy -oturtle_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_l.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_l.c&#x0D;&#x0A;flex -8 -Pttlyy -oturtle_l.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_l.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\turtle_p.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_p.c&#x0D;&#x0A;rm -f turtle_p.h&#x0D;&#x0A;bison -y -vd -pttlyy turtle_p.y -oturtle_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_p.c;$(InputDir)turtle_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_p.c&#x0D;&#x0A;rm -f turtle_p.h&#x0D;&#x0A;bison -y -vd -pttlyy turtle_p.y -oturtle_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_p.c;$(InputDir)turtle_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_p.c&#x0D;&#x0A;rm -f turtle_p.h&#x0D;&#x0A;bison -y -vd -pttlyy turtle_p.y -oturtle_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)turtle_p.c;$(InputDir)turtle_p.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f turtle_p.c&#x0D;&#x0A;rm -f turtle_p.h&#x0D;&#x0A;bison -y -vd -pttlyy turtle_p.y -oturtle_p.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\turtle_p.c;$(InputDir)\turtle_p.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpathp.y"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpathp.c&#x0D;&#x0A;rm -f xpathp.h&#x0D;&#x0A;bison -y -vd -pxpyy xpathp.y -oxpathp.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpathp.c;$(InputDir)xpathp.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpathp.c&#x0D;&#x0A;rm -f xpathp.h&#x0D;&#x0A;bison -y -vd -pxpyy xpathp.y -oxpathp.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpathp.c;$(InputDir)xpathp.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpathp.c&#x0D;&#x0A;rm -f xpathp.h&#x0D;&#x0A;bison -y -vd -pxpyy xpathp.y -oxpathp.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpathp.c;$(InputDir)xpathp.h"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpathp.c&#x0D;&#x0A;rm -f xpathp.h&#x0D;&#x0A;bison -y -vd -pxpyy xpathp.y -oxpathp.c&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpathp.c;$(InputDir)xpathp.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\xpscn.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpscn_vsnet.c&#x0D;&#x0A;flex -i -oxpscn_vsnet.c -Pxpyy $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpscn_vsnet.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpscn_vsnet.c&#x0D;&#x0A;flex -i -oxpscn_vsnet.c -Pxpyy $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpscn_vsnet.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpscn_vsnet.c&#x0D;&#x0A;flex -i -oxpscn_vsnet.c -Pxpyy $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpscn_vsnet.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f xpscn_vsnet.c&#x0D;&#x0A;flex -i -oxpscn_vsnet.c -Pxpyy $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)xpscn_vsnet.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/wic.vcproj b/win64/wic.vcproj
deleted file mode 100644
index 1ef37b2..0000000
--- a/win64/wic.vcproj
+++ /dev/null
@@ -1,417 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wic"
-	ProjectGUID="{A66E395B-18EE-4877-8F0D-386A7BBAB370}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wic.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wic.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\wic.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,."
-				PreprocessorDefinitions="_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\wic.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\blobio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIcr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIodbc3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql1.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql2.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIsql3W.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIuti.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\CLIw.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\datesupp.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\plugin\dlf.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\mts_client.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\multibyte.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\numeric.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\pldbgcli.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\plugin_gate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wi_xid.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Wi\wirpc.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Wi\wirpce.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/wiki_vad.vcproj b/win64/wiki_vad.vcproj
deleted file mode 100644
index 5a8b4b6..0000000
--- a/win64/wiki_vad.vcproj
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wiki_vad"
-	ProjectGUID="{40062448-EFE0-11DA-85E2-A4E5714C712A}"
-	RootNamespace="ods_wiki_vad"
-	Keyword="MakeFileProj"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_wiki_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_wiki_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)\ods_wiki_vad"
-			IntermediateDirectory="$(ConfigurationName)\ods_wiki_vad"
-			ConfigurationType="1"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=""
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\appsrc\ODS-Wiki\make_vad.sh"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_wiki_dav.vad"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCustomBuildTool"
-					CommandLine="cd $(InputDir)&#x0D;&#x0A;set PATH=$(TargetDir)\..;%PATH%&#x0D;&#x0A;set HOME=$(ProjectDir)\..\&#x0D;&#x0A;set PORT=5555&#x0D;&#x0A;set ISQL=isql.exe&#x0D;&#x0A;set SERVER=virtuoso-t.exe&#x0D;&#x0A;bash make_vad.sh&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-					AdditionalDependencies="$(TargetDir)\..\isql.exe;$(TargetDir)\..\virtuoso-t.exe"
-					Outputs="$(InputDir)\ods_wiki_dav.vad"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/wikiv.vcproj b/win64/wikiv.vcproj
deleted file mode 100644
index b1bb03c..0000000
--- a/win64/wikiv.vcproj
+++ /dev/null
@@ -1,534 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="wikiv"
-	ProjectGUID="{A326A0DF-4F93-4DF6-813D-0B64F98B389F}"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/wikiv.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/wikiv.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\wikiv.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wikiv.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wikiv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/wikiv.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/wikiv.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\wikiv.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wikiv.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wikiv.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(ConfigurationName)/wikiv.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/wikiv.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\wikiv.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wikiv.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wikiv.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="2"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions=""
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(ConfigurationName)/wikiv.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\binsrc\driver,..\libsrc\Wi,..\libsrc\langfunc,..\libsrc\plugin,..\binsrc\driver\include..\libsrc\Dk,..\libsrc\util\win32,..\libsrc;..\libsrc\Xml.new;openssl,."
-				PreprocessorDefinitions="_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions=""
-				Culture="1049"
-				AdditionalIncludeDirectories="..\libsrc\Wi"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="dk1t.lib threadw.lib util.lib odbc32.lib odbccp32.lib ws2_32.lib libeay32.lib ssleay32.lib"
-				OutputFile="$(ConfigurationName)/wikiv.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="$(ConfigurationName),.\openssl"
-				IgnoreDefaultLibraryNames="LIBCD.lib"
-				ModuleDefinitionFile="..\appsrc\ODS-Wiki\plugin\wikiv.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(ConfigurationName)/wikiv.pdb"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(ConfigurationName)/wikiv.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\plugin\import_gate_virtuoso.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\maclex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\wikilex.c"
-				>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\wikiv.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-		<Filter
-			Name="LexFiles"
-			>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\maclex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f maclex.c&#x0D;&#x0A;flex -8 -Pmacyy -omaclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f maclex.c&#x0D;&#x0A;flex -8 -Pmacyy -omaclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f maclex.c&#x0D;&#x0A;flex -8 -Pmacyy -omaclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\maclex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f maclex.c&#x0D;&#x0A;flex -8 -Pmacyy -omaclex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\maclex.c"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\appsrc\ODS-Wiki\plugin\wikilex.l"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f wikilex.c&#x0D;&#x0A;flex -8 -Pwikiyy -owikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f wikilex.c&#x0D;&#x0A;flex -8 -Pwikiyy -owikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f wikilex.c&#x0D;&#x0A;flex -8 -Pwikiyy -owikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\wikilex.c"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&#x0D;&#x0A;cd $(InputDir)&#x0D;&#x0A;rm -f wikilex.c&#x0D;&#x0A;flex -8 -Pwikiyy -owikilex.c $(InputPath)&#x0D;&#x0A;cd $(ProjectDir)&#x0D;&#x0A;"
-						Outputs="$(InputDir)\wikilex.c"
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/xml.vcproj b/win64/xml.vcproj
deleted file mode 100644
index 683c6e9..0000000
--- a/win64/xml.vcproj
+++ /dev/null
@@ -1,465 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="xml"
-	ProjectGUID="{0C234EF0-7725-4BDA-A1C3-47F5835A3837}"
-	RootNamespace="xml"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,..\libsrc\util\pcrelib"
-				PreprocessorDefinitions="_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="XML_NS"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\xml.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver,..\libsrc\langfunc,..\libsrc\plugin,..\libsrc\util\pcrelib"
-				PreprocessorDefinitions="_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="XML_NS"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\xml.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\libsrc\langfunc,..\libsrc\plugin,..\libsrc\util\pcrelib"
-				PreprocessorDefinitions="_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="XML_NS"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\xml.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\libsrc\langfunc,..\libsrc\plugin,..\libsrc\util\pcrelib"
-				PreprocessorDefinitions="_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-				UndefinePreprocessorDefinitions="XML_NS"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\xml.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\Xml.new\charclasses.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\datatypes.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\dtd.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\encodings.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\html_mode.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\schema.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\schema_fsm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xhtml_ent.gperf"
-				>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="gperf -aCDGptr -Kentity -k1,2,3,4,5,$ $(InputDir)xhtml_ent.gperf -Nxhtml_ent_gperf > $(InputDir)xhtml_ent.h&#x0D;&#x0A;&#x0D;&#x0A;"
-						Outputs="xhtml_ent.h"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xml_ecm.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlgram.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlparser.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlread.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-			<File
-				RelativePath="..\libsrc\Xml.new\charclasses.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\encodings.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\html_mode.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\schema.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xml_ecm.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlparser.h"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\Xml.new\xmlparser_impl.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64/zlib.vcproj b/win64/zlib.vcproj
deleted file mode 100644
index ef2d75d..0000000
--- a/win64/zlib.vcproj
+++ /dev/null
@@ -1,394 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="zlib"
-	ProjectGUID="{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}"
-	RootNamespace="zlib"
-	TargetFrameworkVersion="131072"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\zlib.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/Zm200 "
-				Optimization="0"
-				AdditionalIncludeDirectories="..\libsrc\xml.new,..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\Wi,..\libsrc\zlib,..\binsrc\driver"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64"
-				OutputFile="$(ConfigurationName)\zlib.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\zlib"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\zlib.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
-			ConfigurationType="4"
-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions=""
-				Optimization="3"
-				OmitFramePointers="false"
-				AdditionalIncludeDirectories="..\libsrc,..\libsrc\Dk,..\libsrc\util\win32,..\libsrc\zlib"
-				PreprocessorDefinitions="_LIBC,INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG"
-				MinimalRebuild="false"
-				ExceptionHandling="0"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="false"
-				UsePrecompiledHeader="0"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="0"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1049"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="$(ConfigurationName)\zlib.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="..\libsrc\zlib\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\gzio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\libsrc\zlib\zutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/windows/blobs.vcxproj b/windows/blobs.vcxproj
new file mode 100644
index 0000000..a16c5eb
--- /dev/null
+++ b/windows/blobs.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>blobs</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/blobs.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)blobs.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/blobs.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/blobs.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)blobs.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/blobs.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\blobs.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/burstoff.vcxproj b/windows/burstoff.vcxproj
new file mode 100644
index 0000000..18d61d5
--- /dev/null
+++ b/windows/burstoff.vcxproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>burstoff</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/burstoff.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)burstoff.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/burstoff.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/burstoff.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)burstoff.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/burstoff.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\burstoff.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/creolewiki.vcxproj b/windows/creolewiki.vcxproj
new file mode 100644
index 0000000..b1f1877
--- /dev/null
+++ b/windows/creolewiki.vcxproj
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{ABE43C46-E1C4-11DB-930B-CD6B662399AA}</ProjectGuid>
+    <RootNamespace>creolewiki</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/creolewiki.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)creolewiki.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\appsrc\ODS-Wiki\plugin\creolewiki.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/creolewiki.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)creolewiki.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\appsrc\ODS-Wiki\plugin\creolewiki.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\creole_maclex.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\creole_wikilex.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\creolewiki.c" />
+    <ClCompile Include="..\libsrc\plugin\import_gate_virtuoso.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\appsrc\ODS-Wiki\plugin\creole_maclex.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_maclex.c
+flex -8 -Pcreolemacyy -ocreole_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\creole_maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f creole_maclex.c
+flex -8 -Pcreolemacyy -ocreole_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_maclex.c
+flex -8 -Pcreolemacyy -ocreole_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\creole_maclex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\creole_maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_maclex.c
+flex -8 -Pcreolemacyy -ocreole_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\creole_maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f creole_maclex.c
+flex -8 -Pcreolemacyy -ocreole_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_maclex.c
+flex -8 -Pcreolemacyy -ocreole_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\creole_maclex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\creole_maclex.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\appsrc\ODS-Wiki\plugin\creole_wikilex.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_wikilex.c
+flex -8 -Pcreolewikiyy -ocreole_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\creole_wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f creole_wikilex.c
+flex -8 -Pcreolewikiyy -ocreole_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_wikilex.c
+flex -8 -Pcreolewikiyy -ocreole_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\creole_wikilex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\creole_wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_wikilex.c
+flex -8 -Pcreolewikiyy -ocreole_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\creole_wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f creole_wikilex.c
+flex -8 -Pcreolewikiyy -ocreole_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f creole_wikilex.c
+flex -8 -Pcreolewikiyy -ocreole_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\creole_wikilex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\creole_wikilex.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/cursor.vcxproj b/windows/cursor.vcxproj
new file mode 100644
index 0000000..538c0cd
--- /dev/null
+++ b/windows/cursor.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{97D467CE-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>cursor</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/cursor.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)cursor.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/cursor.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/cursor.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)cursor.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/cursor.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\cursor.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/cutter.vcxproj b/windows/cutter.vcxproj
new file mode 100644
index 0000000..3191383
--- /dev/null
+++ b/windows/cutter.vcxproj
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{6E10B655-C324-491F-B202-73565D6B30FB}</ProjectGuid>
+    <RootNamespace>cutter</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/cutter.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <OutputFile>$(OutDir)cutter.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/cutter.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <OutputFile>$(OutDir)cutter.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\sqldoc\cutter.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/dk1t.vcxproj b/windows/dk1t.vcxproj
new file mode 100644
index 0000000..4367d51
--- /dev/null
+++ b/windows/dk1t.vcxproj
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}</ProjectGuid>
+    <RootNamespace>dk1t</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>0</PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)dk1t.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>0</PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)dk1t.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\Dk\config.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkstubs.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Dk\Dkalloc.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkbasket.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkbox.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkdevice.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkhash.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkhashext.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkmarshal.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkpool.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkresource.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkrusage.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkses2.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksesinp.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksession.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksesstr.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksestcp.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksets.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkstkern.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkstubs.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkutil.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/dksrv.vcxproj b/windows/dksrv.vcxproj
new file mode 100644
index 0000000..0c30a3f
--- /dev/null
+++ b/windows/dksrv.vcxproj
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{58867EBA-CA07-4F41-A966-6245FF14773E}</ProjectGuid>
+    <RootNamespace>dksrv</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)dksrv.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)dksrv.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Dk\Dkalloc.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkbasket.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkbox.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkdevice.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkernel.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkhash.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkhashext.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkmarshal.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkpool.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkresource.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkrusage.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkses2.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksesinp.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksession.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksesstr.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksestcp.c" />
+    <ClCompile Include="..\libsrc\Dk\Dksets.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkstubs.c" />
+    <ClCompile Include="..\libsrc\Dk\Dkutil.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\Dk\Dkalloc.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkbasket.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkbox.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkconfig.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkdevice.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkernel.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkhash.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkhashext.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkmarshal.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkparam.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkpool.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkresource.h" />
+    <ClInclude Include="..\libsrc\Dk\Dksession.h" />
+    <ClInclude Include="..\libsrc\Dk\Dksets.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkstubs.h" />
+    <ClInclude Include="..\libsrc\Dk\Dksystem.h" />
+    <ClInclude Include="..\libsrc\Dk\Dktrace.h" />
+    <ClInclude Include="..\libsrc\Dk\Dktypes.h" />
+    <ClInclude Include="..\libsrc\Dk\Dkutil.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/getdata.vcxproj b/windows/getdata.vcxproj
new file mode 100644
index 0000000..f8085f1
--- /dev/null
+++ b/windows/getdata.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{AFB15514-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>getdata</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/getdata.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)getdata.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/getdata.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/getdata.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)getdata.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/getdata.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\getdata.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/hosting_perl.vcxproj b/windows/hosting_perl.vcxproj
new file mode 100644
index 0000000..eba81f2
--- /dev/null
+++ b/windows/hosting_perl.vcxproj
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{354809B6-CF7B-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>hosting_perl</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/hosting_perl.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>$(PERL_CFLAGS) %(AdditionalOptions)</AdditionalOptions>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 $(PERL_LDFLAGS) %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)hosting_perl.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\hosting\perl\hosting_perl.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/hosting_perl.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/hosting_perl.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/hosting_perl.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>$(PERL_CFLAGS) %(AdditionalOptions)</AdditionalOptions>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)hosting_perl.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\hosting\perl\hosting_perl.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/hosting_perl.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/hosting_perl.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\hosting\perl\hosting_perl.c" />
+    <ClCompile Include="..\binsrc\hosting\perl\virt_handler.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\binsrc\hosting\perl\pl_to_c.awk">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f pl_to_c.awk virt_handler.pm > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/hosting_php.vcxproj b/windows/hosting_php.vcxproj
new file mode 100644
index 0000000..abcc806
--- /dev/null
+++ b/windows/hosting_php.vcxproj
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}</ProjectGuid>
+    <RootNamespace>hosting_php</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/hosting_php.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\SDK\$(ShortPlatform)\php53\;..\SDK\$(ShortPlatform)\php53\main;..\SDK\$(ShortPlatform)\php53\Zend;..\SDK\$(ShortPlatform)\php53\ext;..\SDK\$(ShortPlatform)\php53\regex;..\SDK\$(ShortPlatform)\php53\TSRM;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=0;MSVC5;ZEND_WIN32;_WIN32_WINNT=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;php5ts.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)hosting_php.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;../SDK/$(ShortPlatform)/php53;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\hosting\php\hosting_php.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/hosting_php.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/hosting_php.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\SDK\$(ShortPlatform)\php53\;..\SDK\$(ShortPlatform)\php53\main;..\SDK\$(ShortPlatform)\php53\Zend;..\SDK\$(ShortPlatform)\php53\ext;..\SDK\$(ShortPlatform)\php53\regex;..\SDK\$(ShortPlatform)\php53\TSRM;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;YYTOKENTYPE;_PHP;_PHP_WIN32;_ZEND_CONFIG_W32_H;PHP_WIN32;ZTS;ZEND_DEBUG=0;MSVC5;ZEND_WIN32;_WIN32_WINNT=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;php5ts.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)hosting_php.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;../SDK/$(ShortPlatform)/php53;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\hosting\php\hosting_php.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/hosting_php.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\hosting\php\hosting_php.c" />
+    <ClCompile Include="..\libsrc\plugin\import_gate_virtuoso.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="dksrv.vcxproj">
+      <Project>{58867eba-ca07-4f41-a966-6245ff14773e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/hosting_python.vcxproj b/windows/hosting_python.vcxproj
new file mode 100644
index 0000000..564c8ee
--- /dev/null
+++ b/windows/hosting_python.vcxproj
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B525A234-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>hosting_python</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/hosting_python.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>$(PYTHON_CFLAGS) %(AdditionalOptions)</AdditionalOptions>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 $(PYTHON_LDFLAGS) %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)hosting_python.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\hosting\python\hosting_python.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/hosting_python.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/hosting_python.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/hosting_python.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>$(PYTHON_CFLAGS) %(AdditionalOptions)</AdditionalOptions>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)hosting_python.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\hosting\python\hosting_python.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/hosting_python.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/hosting_python.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\hosting\python\hosting_python.c" />
+    <ClCompile Include="..\binsrc\hosting\python\virt_handler.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\binsrc\hosting\python\py_to_c.awk">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f py_to_c.awk virt_handler.py > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+gawk -f py_to_c.awk virt_handler.py > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f py_to_c.awk virt_handler.py > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f py_to_c.awk virt_handler.py > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+gawk -f py_to_c.awk virt_handler.py > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+gawk -f py_to_c.awk virt_handler.py > virt_handler.c
+cd $(ProjectDir)
+
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.pm;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_handler.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/im.vcxproj b/windows/im.vcxproj
new file mode 100644
index 0000000..1b89f33
--- /dev/null
+++ b/windows/im.vcxproj
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>im</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/im.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;..\SDK\$(ShortPlatform)\ImageMagick;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_LIB=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;CORE_RL_wand_.lib;CORE_RL_coders_.lib;CORE_RL_magick_.lib;CORE_RL_magick++_.lib;CORE_RL_ttf_.lib;CORE_RL_xlib_.lib;CORE_RL_bzlib_.lib;CORE_RL_zlib_.lib;CORE_RL_lcms_.lib;CORE_RL_tiff_.lib;CORE_RL_filters_.lib;CORE_RL_jpeg_.lib;CORE_RL_jbig_.lib;CORE_RL_jp2_.lib;CORE_RL_png_.lib;CORE_RL_wmf_.lib;CORE_RL_libxml_.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)im.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;../SDK/$(ShortPlatform)/ImageMagick;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\samples\image_magick\im.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/im.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/im.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;..\SDK\$(ShortPlatform)\ImageMagick;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_LIB=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;CORE_RL_wand_.lib;CORE_RL_coders_.lib;CORE_RL_magick_.lib;CORE_RL_magick++_.lib;CORE_RL_ttf_.lib;CORE_RL_xlib_.lib;CORE_RL_bzlib_.lib;CORE_RL_zlib_.lib;CORE_RL_lcms_.lib;CORE_RL_tiff_.lib;CORE_RL_filters_.lib;CORE_RL_jpeg_.lib;CORE_RL_jbig_.lib;CORE_RL_jp2_.lib;CORE_RL_png_.lib;CORE_RL_wmf_.lib;CORE_RL_libxml_.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)im.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;../SDK/$(ShortPlatform)/ImageMagick;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\samples\image_magick\im.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/im.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\samples\image_magick\im.c" />
+    <ClCompile Include="..\libsrc\plugin\import_gate_virtuoso.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/ins.vcxproj b/windows/ins.vcxproj
new file mode 100644
index 0000000..29cc8cc
--- /dev/null
+++ b/windows/ins.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C6C66924-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>ins</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/ins.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)ins.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/ins.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/ins.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)ins.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/ins.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\ins.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/isql.vcxproj b/windows/isql.vcxproj
new file mode 100644
index 0000000..8a61c83
--- /dev/null
+++ b/windows/isql.vcxproj
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>isqlo</ProjectName>
+    <ProjectGuid>{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>isqlo</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/isql_native.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)isqlo.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/isql_native.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/isql_native.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)isqlo.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/isql_native.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\isql.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/isql_native.vcxproj b/windows/isql_native.vcxproj
new file mode 100644
index 0000000..95c44af
--- /dev/null
+++ b/windows/isql_native.vcxproj
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>isql</ProjectName>
+    <ProjectGuid>{AFB1D909-86D0-49DE-8BD8-DF89349F934E}</ProjectGuid>
+    <RootNamespace>isql</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/isql_native.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)isql.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/isql_native.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/isql_native.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc;..\libsrc\Wi;..\libsrc\util\win32;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;PLDBG;YYTOKENTYPE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)isql.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/isql_native.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\isql.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/libvirtuoso_odbc_t.vcxproj b/windows/libvirtuoso_odbc_t.vcxproj
new file mode 100644
index 0000000..47d0baf
--- /dev/null
+++ b/windows/libvirtuoso_odbc_t.vcxproj
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>libvirtuoso-t</ProjectName>
+    <ProjectGuid>{FB836C59-41E1-48EA-A59B-460AB56587EE}</ProjectGuid>
+    <RootNamespace>libvirtuoso_t</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\SDK\$(ShortPlatform)\sslsdk\inc32; .;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>PACKAGE_VERSION="6.1.5";_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>threadw.lib;wi.lib;dksrv.lib;util.lib;xml.lib;zlib.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;tidy.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)libvirtuoso-t.dll</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\virtuoso\libviwin32.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)libvirtuoso_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <FixedBaseAddress>false</FixedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\SDK\$(ShortPlatform)\sslsdk\inc32; .;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>PACKAGE_VERSION="6.1.5";_SSL;_CONSOLE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;SHARED_OBJECT;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>threadw.lib;wi.lib;dksrv.lib;util.lib;xml.lib;zlib.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;tidy.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)libvirtuoso-t.dll</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\virtuoso\libviwin32.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)libvirtuoso_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <FixedBaseAddress>false</FixedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Wi\shcompo.c" />
+    <ClCompile Include="..\binsrc\virtuoso\viconfig.c" />
+    <ClCompile Include="..\binsrc\virtuoso\viwin32.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dksrv.vcxproj">
+      <Project>{58867eba-ca07-4f41-a966-6245ff14773e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threadw.vcxproj">
+      <Project>{d3a2882c-410a-4f58-8ace-a771888073e8}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="xml.vcxproj">
+      <Project>{0c234ef0-7725-4bda-a1c3-47f5835a3837}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="zlib.vcxproj">
+      <Project>{86645c8e-3bbe-4e1e-a8ae-c6990b4ecc64}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/windows/maildrop.vcxproj b/windows/maildrop.vcxproj
new file mode 100644
index 0000000..d314329
--- /dev/null
+++ b/windows/maildrop.vcxproj
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C5F98602-E5B9-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>maildrop</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/maildrop.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(Configuration)\maildrop/</AssemblerListingLocation>
+      <ObjectFileName>$(Configuration)\maildrop/</ObjectFileName>
+      <ProgramDataBaseFileName>$(Configuration)\maildrop/</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)maildrop.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\maildrop\win32\maildrop.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/maildrop.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/maildrop.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/maildrop.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;_WIN32_DCOM;FULL_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(Configuration)\maildrop/</AssemblerListingLocation>
+      <ObjectFileName>$(Configuration)\maildrop/</ObjectFileName>
+      <ProgramDataBaseFileName>$(Configuration)\maildrop/</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)maildrop.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\maildrop\win32\maildrop.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/maildrop.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/maildrop.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\maildrop\win32\maildrop.cpp" />
+    <ClCompile Include="..\binsrc\maildrop\win32\mpl.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <Midl Include="..\binsrc\maildrop\win32\maildrop.idl">
+      <MkTypLibCompatible Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</MkTypLibCompatible>
+      <MkTypLibCompatible Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</MkTypLibCompatible>
+      <TargetEnvironment Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">X64</TargetEnvironment>
+      <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\gen</OutputDirectory>
+      <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\gen</OutputDirectory>
+      <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).h</HeaderFileName>
+      <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).h</HeaderFileName>
+    </Midl>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\maildrop\win32\maildrop.rc">
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\libsrc\Wi;..\binsrc\maildrop\win32\gen;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/mediawiki.vcxproj b/windows/mediawiki.vcxproj
new file mode 100644
index 0000000..68fdee1
--- /dev/null
+++ b/windows/mediawiki.vcxproj
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{408E2482-2623-11DB-9BB9-97600548391D}</ProjectGuid>
+    <RootNamespace>mediawiki</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/mediawiki.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)mediawiki.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\appsrc\ODS-Wiki\plugin\mediawiki.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/mediawiki.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/mediawiki.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)mediawiki.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\appsrc\ODS-Wiki\plugin\mediawiki.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/mediawiki.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\plugin\import_gate_virtuoso.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\media_maclex.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\media_wikilex.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\mediawiki.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\appsrc\ODS-Wiki\plugin\media_maclex.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_maclex.c
+flex -8 -Pmediamacyy -omedia_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\media_maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f media_maclex.c
+flex -8 -Pmediamacyy -omedia_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_maclex.c
+flex -8 -Pmediamacyy -omedia_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\media_maclex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\media_maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_maclex.c
+flex -8 -Pmediamacyy -omedia_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\media_maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f media_maclex.c
+flex -8 -Pmediamacyy -omedia_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_maclex.c
+flex -8 -Pmediamacyy -omedia_maclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\media_maclex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\media_maclex.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\appsrc\ODS-Wiki\plugin\media_wikilex.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_wikilex.c
+flex -8 -Pmediawikiyy -omedia_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\media_wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f media_wikilex.c
+flex -8 -Pmediawikiyy -omedia_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_wikilex.c
+flex -8 -Pmediawikiyy -omedia_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\media_wikilex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\media_wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_wikilex.c
+flex -8 -Pmediawikiyy -omedia_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\media_wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f media_wikilex.c
+flex -8 -Pmediawikiyy -omedia_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f media_wikilex.c
+flex -8 -Pmediawikiyy -omedia_wikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\media_wikilex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\media_wikilex.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/odbcmail.vcxproj b/windows/odbcmail.vcxproj
new file mode 100644
index 0000000..f477789
--- /dev/null
+++ b/windows/odbcmail.vcxproj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>virtmail</ProjectName>
+    <ProjectGuid>{4C517D78-E5B9-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>odbcmail</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <CustomBuildStep>
+      <Command>cd $(IntDir)
+bash $(ProjectDir)\..\bin\makever -o odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"
+cd $(ProjectDir)
+</Command>
+      <Inputs>$(IntDir)odbc_mail.obj;%(Inputs)</Inputs>
+      <Outputs>$(IntDir)odbcmail.vers.c;%(Outputs)</Outputs>
+    </CustomBuildStep>
+    <Midl>
+      <TypeLibraryName>$(Configuration)/odbcmail.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_WIN32_DCOM;FULL_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(Configuration)\odbcmail/</AssemblerListingLocation>
+      <ObjectFileName>$(Configuration)\odbcmail/</ObjectFileName>
+      <ProgramDataBaseFileName>$(Configuration)\odbcmail/</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>util.lib;wic.lib;dk1t.lib;threads.lib;libeay32.lib;gdi32.lib;advapi32.lib;ssleay32.lib;ws2_32.lib;user32.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virt_mail.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/odbcmail.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <CustomBuildStep>
+      <Command>cd $(IntDir)
+bash $(ProjectDir)\..\bin\makever -o odbcmail.vers.c -p "OpenLink ODBC Mail Interface" -v "2.01"
+cd $(ProjectDir)
+</Command>
+      <Inputs>$(IntDir)odbc_mail.obj;%(Inputs)</Inputs>
+      <Outputs>$(IntDir)odbcmail.vers.c;%(Outputs)</Outputs>
+    </CustomBuildStep>
+    <Midl>
+      <TypeLibraryName>$(Configuration)/odbcmail.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_WIN32_DCOM;FULL_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <AssemblerListingLocation>$(Configuration)\odbcmail/</AssemblerListingLocation>
+      <ObjectFileName>$(Configuration)\odbcmail/</ObjectFileName>
+      <ProgramDataBaseFileName>$(Configuration)\odbcmail/</ProgramDataBaseFileName>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>util.lib;wic.lib;dk1t.lib;threads.lib;libeay32.lib;gdi32.lib;advapi32.lib;ssleay32.lib;ws2_32.lib;user32.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virt_mail.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/odbcmail.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\maildrop\odbc_mail.c" />
+    <ClCompile Include="..\binsrc\maildrop\odbcmail.vers.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/scroll.vcxproj b/windows/scroll.vcxproj
new file mode 100644
index 0000000..69327a4
--- /dev/null
+++ b/windows/scroll.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>scroll</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/scroll.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)scroll.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/scroll.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/scroll.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)scroll.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/scroll.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\scroll.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/setcurs.vcxproj b/windows/setcurs.vcxproj
new file mode 100644
index 0000000..c3206b0
--- /dev/null
+++ b/windows/setcurs.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>setcurs</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/setcurs.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)setcurs.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/setcurs.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/setcurs.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)setcurs.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/setcurs.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\setcurs.c" />
+    <ClCompile Include="..\binsrc\tests\time.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/sqlcode.bat b/windows/sqlcode.bat
new file mode 100644
index 0000000..2037645
--- /dev/null
+++ b/windows/sqlcode.bat
@@ -0,0 +1,62 @@
+set SQL_FILES=system.sql system2.sql odbccat.sql vt_text.sql phrasematch.sql hosting.sql
+set SQL_FILES_1=oledb.sql information_schema.sql
+set SQL_FILES_WS=../../binsrc/vsp/vsp_auth.sql soap.sql wsrp_ultim.xsl wsrp_resp.xsl wsrp_interm.xsl wsrp_error.xsl soap_sch.xsl soap_import_sch.xsl wsdl_expand.xsl wsdl_parts.xsl wsdl_import.xsl wsdl2rdf.xsl xmlrpc_soap.xsl soap_xmlrpc.xsl soap12_router.xsl ../../binsrc/ws/wsrm/wsrm_ddl.sql ../../binsrc/ws/wsrm/wsrm_xsd.sql ../../binsrc/ws/wsrm/wsrmcli.sql ../../binsrc/ws/wsrm/wsrmsrv.sql ../../binsrc/ws/wstr/wstr_ddl.sql ../../binsrc/ws/wstr/wstrcli.sql ../../binsrc/ws/wstr/wstrsrv.sql ../../binsrc/ws/wsrm/wsrmcall.xsl rdf_net.sql simile.sql http_auth.sql xmla.sql openxml.sql ../../binsrc/vspx/vspx.sql ../../binsrc/vspx/vspx_add_locations.xsl ../../binsrc/vspx/vspx_expand.xsl ../../binsrc/vspx/vspx_pre_xsd.xsl ../../binsrc/vspx/vspx_pre_sql.xsl ../../binsrc/vspx/vspx_log_format.xsl ../../binsrc/vspx/vspx.xsd ../../binsrc/vspx/vspx.xsl
+set SQL_FILES_REPL=snapshot_repl.sql repl.sql
+set SQL_FILES_DAV=../../binsrc/dav/dav.sql ../../binsrc/dav/dav_api.sql ../../binsrc/dav/dav_meta.sql ../../binsrc/dav/dav_acct.sql ../../binsrc/dav/dav_rdf_quad.sql ../../binsrc/vsp/admin/admin_dav/vfs.sql ../../binsrc/dav/davxml2rdfxml.xsl ../../binsrc/dav/davxml2n3xml.xsl ../../binsrc/dav/rdfxml2n3xml.xsl ../../binsrc/dav/n3xml2uriqahtml.xsl ../../binsrc/dav/uriqa.sql ../../binsrc/dav/DET_CatFilter.sql ../../binsrc/dav/DET_HostFs.sql ../../binsrc/dav/DET_ResFilter.sql ../../binsrc/dav/DET_PropFilter.sql ../../binsrc/dav/DET_RDFData.sql ../../binsrc/dav/Versioning/DET_Versioning.sql xml_view.sql ../../binsrc/dav/DET_S3.sql
+set SQL_FILES_DDK=replddk.sql ../../binsrc/dav/davddk.sql mail_cli.sql ../../binsrc/vsp/admin/admin_ddl.sql ../../binsrc/vsp/admin/admin_dav/vfsddk.sql virtual_dir.sql url_rewrite.sql
+set SQL_FILES_SYS=users.sql
+set SQL_FILES_UDDI=uddi.sql
+set SQL_FILES_IMSG=pop3_svr.sql ftp.sql nn_svr.sql ../../binsrc/vsp/admin/admin_news/admin_news.sql
+set SQL_FILES_AUTO=autoexec.sql
+set SQL_FILES_ADM=../../binsrc/vsp/admin/admin.sql ../../binsrc/vspx/browser/admin_dav_browser.sql
+set SQL_FILES_2PC=2pc.sql
+ at rem set SQL_FILES_BLOG=../../binsrc/weblog2/widgets/rss2rdf.xsl
+set SQL_FILES_VDB=vdb.sql
+set SQL_FILES_PLDBG=cov_report.xsl cov_time.xsl
+set SQL_FILES_VAD=../../binsrc/vad/vad_root.sql ../../binsrc/vad/vad_misc.sql ../../binsrc/vad/oper_pars.sql ../../binsrc/vad/pars_init.sql ../../binsrc/vad/vad_make.sql
+set SQL_FILES_DBP=../../binsrc/vsp/admin/dbpump/dbpump_root.sql ../../binsrc/vsp/admin/dbpump/oper_pars.sql ../../binsrc/vsp/admin/dbpump/components.sql ../../binsrc/vsp/admin/dbpump/comp_html.sql ../../binsrc/vsp/admin/dbpump/comp_misc.sql ../../binsrc/vsp/admin/dbpump/comp_rpath.sql ../../binsrc/vsp/admin/dbpump/comp_tables.sql ../../binsrc/vsp/admin/dbpump/pars_init.sql
+set SQL_FILES_SPARQL=sparql.sql sparql_io.sql rdf_sponge.sql rdf_schema_objects.sql rdf_void.sql rdflddir2.sql
+set SQL_FILES_SPARQL_INIT=useraggr.sql sparql_init.sql
+
+rm -f sql_code.c sql_code_1.c sql_code_ws.c sql_code_repl.c sql_code_dav.c sql_code_ddk.c sql_code_sys.c sql_code_uddi.c 
+rm -f sql_code_imsg.c sql_code_auto.c sql_code_adm.c sql_code_2pc.c sql_code_vdb.c sql_code_pldbg.c 
+rm -f sql_code_vad.c sql_code_dbp.c sql_code_sparql.c
+
+gawk -f sql_to_c.awk                    -v pl_stats=PLDBG  %SQL_FILES%      > sql_code.c
+gawk -f sql_to_c.awk -v init_name=_1 -v pl_stats=PLDBG %SQL_FILES_1% > sql_code_1.c
+gawk -f sql_to_c.awk -v init_name=_ws   -v pl_stats=PLDBG  %SQL_FILES_WS%   > sql_code_ws.c
+gawk -f sql_to_c.awk -v init_name=_repl -v pl_stats=PLDBG  %SQL_FILES_REPL% > sql_code_repl.c
+gawk -f sql_to_c.awk -v init_name=_dav -v pl_stats=PLDBG %SQL_FILES_DAV% > sql_code_dav.c
+gawk -f sql_to_c.awk -v init_name=_ddk  -v pl_stats=PLDBG  %SQL_FILES_DDK%  > sql_code_ddk.c
+gawk -f sql_to_c.awk -v init_name=_sys  -v pl_stats=PLDBG  %SQL_FILES_SYS%  > sql_code_sys.c
+gawk -f sql_to_c.awk -v init_name=_uddi -v pl_stats=PLDBG %SQL_FILES_UDDI% > sql_code_uddi.c
+gawk -f sql_to_c.awk -v init_name=_imsg -v pl_stats=PLDBG %SQL_FILES_IMSG% > sql_code_imsg.c
+gawk -f sql_to_c.awk -v init_name=_auto -v pl_stats=PLDBG %SQL_FILES_AUTO% > sql_code_auto.c
+gawk -f sql_to_c.awk -v init_name=_adm  -v pl_stats=PLDBG  %SQL_FILES_ADM%  > sql_code_adm.c
+gawk -f sql_to_c.awk -v init_name=_2pc -v pl_stats=PLDBG %SQL_FILES_2PC% > sql_code_2pc.c
+ at rem gawk -f sql_to_c.awk -v init_name=_blog -v pl_stats=PLDBG  %SQL_FILES_BLOG% > sql_code_blog.c
+gawk -f sql_to_c.awk -v init_name=_vdb -v pl_stats=PLDBG %SQL_FILES_VDB% > sql_code_vdb.c
+gawk -f sql_to_c.awk -v init_name=_pldbg -v pl_stats=PLDBG %SQL_FILES_PLDBG% > sql_code_pldbg.c
+gawk -f sql_to_c.awk -v init_name=_vad  -v pl_stats=PLDBG  %SQL_FILES_VAD% > sql_code_vad.c
+gawk -f sql_to_c.awk -v init_name=_dbp  -v pl_stats=PLDBG  %SQL_FILES_DBP% > sql_code_dbp.c
+gawk -f sql_to_c.awk -v init_name=_sparql -v pl_stats=PLDBG %SQL_FILES_SPARQL% > sql_code_sparql.c
+gawk -f sql_to_c.awk -v init_name=_sparql_init -v pl_stats=PLDBG %SQL_FILES_SPARQL_INIT% > sql_code_sparql_init.c
+
+gawk -f "jso_reformat.awk" -v "output_mode=h" -v "h_wrapper=__RDF_MAPPING_JSO_H" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.h
+
+gawk -f "jso_reformat.awk" -v "output_mode=c" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.c
+
+gawk -f "jso_reformat.awk" -v "output_mode=ttl" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.ttl
+
+gawk -f "jso_reformat.awk" -v "output_mode=ttl-sample" -v "init_name=rdf_mapping" rdf_mapping.jso > rdf_mapping_jso.ttl-sample
+
+cd ../../binsrc/cached_resources
+bash cache_gen.sh > cached_resources.c
+cd ../../libsrc/Wi
+
+ at echo #include "sql_code_cache_impl.c" > sql_code_cache.c
+ at echo #include "../../binsrc/cached_resources/cached_resources.c" >> sql_code_cache.c
+
+bash list_lex_props.sh sparql_p.y sparql_lex_props.c
+bash list_lex_props.sh turtle_p.y turtle_lex_props.c 
+
diff --git a/windows/threads.vcxproj b/windows/threads.vcxproj
new file mode 100644
index 0000000..c312c74
--- /dev/null
+++ b/windows/threads.vcxproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}</ProjectGuid>
+    <RootNamespace>threads</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)threads.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)threads.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Thread\sched_single.c" />
+    <ClCompile Include="..\libsrc\Thread\thread_attr.c" />
+    <ClCompile Include="..\libsrc\Thread\thread_queue.c" />
+    <ClCompile Include="..\libsrc\Thread\timer_queue.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/threadw.vcxproj b/windows/threadw.vcxproj
new file mode 100644
index 0000000..0d73e7b
--- /dev/null
+++ b/windows/threadw.vcxproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{D3A2882C-410A-4F58-8ACE-A771888073E8}</ProjectGuid>
+    <RootNamespace>threadw</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)threadw.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)threadw.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Thread\io_unix.c" />
+    <ClCompile Include="..\libsrc\Thread\sched_winthread.c" />
+    <ClCompile Include="..\libsrc\Thread\thread_attr.c" />
+    <ClCompile Include="..\libsrc\Thread\thread_queue.c" />
+    <ClCompile Include="..\libsrc\Thread\thread_rwlock.c" />
+    <ClCompile Include="..\libsrc\Thread\timer_queue.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/tidy.vcxproj b/windows/tidy.vcxproj
new file mode 100644
index 0000000..1aeb0fa
--- /dev/null
+++ b/windows/tidy.vcxproj
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{D9E130E1-7734-43DF-A7EF-15CD95E467EE}</ProjectGuid>
+    <RootNamespace>tidy</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\Dk;..\libsrc;..\libsrc\util;..\libsrc\util\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)tidy.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\Dk;..\libsrc;..\libsrc\util;..\libsrc\util\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;IN_LIBUTIL;_GNU_SOURCE;__WITH_LIBDK;BIF_TIDY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)tidy.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Tidy\attrs.c" />
+    <ClCompile Include="..\libsrc\Tidy\clean.c" />
+    <ClCompile Include="..\libsrc\Tidy\config.c" />
+    <ClCompile Include="..\libsrc\Tidy\entities.c" />
+    <ClCompile Include="..\libsrc\Tidy\istack.c" />
+    <ClCompile Include="..\libsrc\Tidy\lexer.c" />
+    <ClCompile Include="..\libsrc\Tidy\localize.c" />
+    <ClCompile Include="..\libsrc\Tidy\parser.c" />
+    <ClCompile Include="..\libsrc\Tidy\pprint.c" />
+    <ClCompile Include="..\libsrc\Tidy\tab2space.c" />
+    <ClCompile Include="..\libsrc\Tidy\tags.c" />
+    <ClCompile Include="..\libsrc\Tidy\tidy.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\Tidy\html.h" />
+    <ClInclude Include="..\libsrc\Tidy\platform.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/tpcc.vcxproj b/windows/tpcc.vcxproj
new file mode 100644
index 0000000..b4ac393
--- /dev/null
+++ b/windows/tpcc.vcxproj
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>tpcc</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/tpcc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)tpcc.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/tpcc.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/tpcc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)tpcc.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/tpcc.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\time.c" />
+    <ClCompile Include="..\binsrc\tests\tpcc.c" />
+    <ClCompile Include="..\binsrc\tests\tpccodbc.c" />
+    <ClCompile Include="..\binsrc\tests\tpcctrx.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\binsrc\tests\tpcc.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/urlsimu.vcxproj b/windows/urlsimu.vcxproj
new file mode 100644
index 0000000..237f0bb
--- /dev/null
+++ b/windows/urlsimu.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>urlsimu</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/urlsimu.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)urlsimu.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/urlsimu.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/urlsimu.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;.\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_CONSOLE;ODBC_ONLY;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>wic.lib;threads.lib;dk1t.lib;ws2_32.lib;libeay32.lib;util.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)urlsimu.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/urlsimu.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\time.c" />
+    <ClCompile Include="..\binsrc\tests\urlsimu.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/util.vcxproj b/windows/util.vcxproj
new file mode 100644
index 0000000..e032f08
--- /dev/null
+++ b/windows/util.vcxproj
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{031DB868-5294-4738-90BA-F80BB2CEA9DC}</ProjectGuid>
+    <RootNamespace>util</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\Xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\langfunc;..\libsrc\plugin;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>DLDAPI_WINDOWS;_SSL;YYTOKENTYPE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)util.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc\Xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\langfunc;..\libsrc\plugin;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>DLDAPI_WINDOWS;_SSL;YYTOKENTYPE;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;IN_LIBUTIL;_LIBC;_GNU_SOURCE;SUPPORT_UTF8;GLOBALREF=extern;__WITH_LIBDK;PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)util.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\util\buildarg.c" />
+    <ClCompile Include="..\libsrc\util\cfg2.c" />
+    <ClCompile Include="..\libsrc\util\cslentry.c" />
+    <ClCompile Include="..\libsrc\util\csllkup.c" />
+    <ClCompile Include="..\libsrc\util\cslnment.c" />
+    <ClCompile Include="..\libsrc\util\dbgmal.c" />
+    <ClCompile Include="..\libsrc\util\debug.c" />
+    <ClCompile Include="..\libsrc\util\dyntab.c" />
+    <ClCompile Include="..\libsrc\langfunc\encoding_ucm.c" />
+    <ClCompile Include="..\libsrc\util\expandav.c" />
+    <ClCompile Include="..\libsrc\util\fnmatch.c" />
+    <ClCompile Include="..\libsrc\util\fnqual.c" />
+    <ClCompile Include="..\libsrc\util\fnsearch.c" />
+    <ClCompile Include="..\libsrc\util\fntodos.c" />
+    <ClCompile Include="..\libsrc\util\fnundos.c" />
+    <ClCompile Include="..\libsrc\util\getopt.c" />
+    <ClCompile Include="..\libsrc\util\getopt1.c" />
+    <ClCompile Include="..\libsrc\langfunc\latin1ctype.c" />
+    <ClCompile Include="..\libsrc\util\login_digest.c" />
+    <ClCompile Include="..\libsrc\util\logmsg.c" />
+    <ClCompile Include="..\libsrc\util\ltrim.c" />
+    <ClCompile Include="..\libsrc\util\make_env.c" />
+    <ClCompile Include="..\libsrc\util\mpl.c" />
+    <ClCompile Include="..\libsrc\util\ncfg.c" />
+    <ClCompile Include="..\libsrc\util\ntapp.c" />
+    <ClCompile Include="..\libsrc\util\regerror.c" />
+    <ClCompile Include="..\libsrc\util\regexp.c" />
+    <ClCompile Include="..\libsrc\util\regsub.c" />
+    <ClCompile Include="..\libsrc\util\rtrim.c" />
+    <ClCompile Include="..\libsrc\util\setext.c" />
+    <ClCompile Include="..\libsrc\util\sslengine.c" />
+    <ClCompile Include="..\libsrc\util\startup.c" />
+    <ClCompile Include="..\libsrc\util\stpcpy.c" />
+    <ClCompile Include="..\libsrc\util\strcpyin.c" />
+    <ClCompile Include="..\libsrc\util\strerror.c" />
+    <ClCompile Include="..\libsrc\util\stricmp.c" />
+    <ClCompile Include="..\libsrc\util\strindex.c" />
+    <ClCompile Include="..\libsrc\util\strinsrt.c" />
+    <ClCompile Include="..\libsrc\util\strlwr.c" />
+    <ClCompile Include="..\libsrc\util\strnicmp.c" />
+    <ClCompile Include="..\libsrc\util\strquote.c" />
+    <ClCompile Include="..\libsrc\util\strtok_r.c" />
+    <ClCompile Include="..\libsrc\util\strupr.c" />
+    <ClCompile Include="..\libsrc\util\strxpect.c" />
+    <ClCompile Include="..\libsrc\util\virt_mbrlen.c" />
+    <ClCompile Include="..\libsrc\util\win32\syslog.c" />
+    <ClCompile Include="..\libsrc\util\terminat.c" />
+    <ClCompile Include="..\libsrc\langfunc\ucm2enc.c" />
+    <ClCompile Include="..\libsrc\util\usage.c" />
+    <ClCompile Include="..\libsrc\util\uuid.c" />
+    <ClCompile Include="..\libsrc\util\virt_mbrtowc.c" />
+    <ClCompile Include="..\libsrc\util\virt_mbsnrtowcs.c" />
+    <ClCompile Include="..\libsrc\util\virt_wcrtomb.c" />
+    <ClCompile Include="..\libsrc\util\virt_wcs_mask.c" />
+    <ClCompile Include="..\libsrc\util\virt_wcsnrtombs.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_chartables.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_compile.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_config.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_dfa_exec.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_exec.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_fullinfo.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_get.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_globals.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_newline.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_ord2utf8.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_study.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_tables.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_try_flipped.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_ucd.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_valid_utf8.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_version.c" />
+    <ClCompile Include="..\libsrc\util\pcrelib\pcre_xclass.c" />
+    <ClCompile Include="..\libsrc\langfunc\encoding_basic.c" />
+    <ClCompile Include="..\libsrc\langfunc\encoding_charsets.c" />
+    <ClCompile Include="..\libsrc\langfunc\encoding_html.c" />
+    <ClCompile Include="..\libsrc\langfunc\encoding_wide.c">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\langfunc\langfunc.c" />
+    <ClCompile Include="..\libsrc\langfunc\langman.c" />
+    <ClCompile Include="..\libsrc\langfunc\language__en_US.c" />
+    <ClCompile Include="..\libsrc\langfunc\language__ru_RU.c" />
+    <ClCompile Include="..\libsrc\langfunc\language__x_ViAny.c" />
+    <ClCompile Include="..\libsrc\langfunc\language__x_ViDoc.c" />
+    <ClCompile Include="..\libsrc\langfunc\unicode3.c" />
+    <ClCompile Include="..\libsrc\plugin\dlf.c" />
+    <ClCompile Include="..\libsrc\plugin\export_gate_virtuoso.c" />
+    <ClCompile Include="..\libsrc\plugin\gate_virtuoso_stubs.c" />
+    <ClCompile Include="..\libsrc\plugin\plugin.c" />
+    <ClCompile Include="..\libsrc\plugin\plugin_win32.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\libutil.h" />
+    <ClInclude Include="..\libsrc\util\uuid.h" />
+    <ClInclude Include="..\libsrc\util\uuidP.h" />
+    <ClInclude Include="..\libsrc\langfunc\langfunc.h" />
+    <ClInclude Include="..\libsrc\langfunc\unicode3_all_chars.h" />
+    <ClInclude Include="..\libsrc\langfunc\unicode3_lowers.h" />
+    <ClInclude Include="..\libsrc\langfunc\unicode3_spaces.h" />
+    <ClInclude Include="..\libsrc\langfunc\unicode3_uppers.h" />
+    <ClInclude Include="..\libsrc\plugin\exe_export.h" />
+    <ClInclude Include="..\libsrc\plugin\gate_virtuoso_stubs.h" />
+    <ClInclude Include="..\libsrc\plugin\plugin.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\libsrc\plugin\gen_all_gates.sh">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+bash gen_all_gates.sh
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\export_gate_virtuoso.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+bash gen_all_gates.sh
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+bash gen_all_gates.sh
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\export_gate_virtuoso.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\export_gate_virtuoso.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+bash gen_all_gates.sh
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\export_gate_virtuoso.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+bash gen_all_gates.sh
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+bash gen_all_gates.sh
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\export_gate_virtuoso.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\export_gate_virtuoso.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/windows/virtodbc.vcxproj b/windows/virtodbc.vcxproj
new file mode 100644
index 0000000..7e61b88
--- /dev/null
+++ b/windows/virtodbc.vcxproj
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>virtodbc</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/virtodbc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtodbc.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\virtodbc\virtodbc.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>
+      </ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/virtodbc.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/virtodbc.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtodbc.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\virtodbc\virtodbc.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>
+      </ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/virtodbc.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Wi\blobio.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIcr.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIodbc3.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql1.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql2.c" />
+    <ClCompile Include="..\binsrc\virtodbc\CLIsql3_w32.cpp" />
+    <ClCompile Include="..\libsrc\Wi\CLIuti.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIw.c" />
+    <ClCompile Include="..\libsrc\Wi\datesupp.c" />
+    <ClCompile Include="..\binsrc\virtodbc\dialog.cpp" />
+    <ClCompile Include="..\libsrc\plugin\dlf.c" />
+    <ClCompile Include="..\binsrc\virtodbc\kvlist.cpp" />
+    <ClCompile Include="..\libsrc\Wi\mts_client.c" />
+    <ClCompile Include="..\libsrc\Wi\multibyte.c" />
+    <ClCompile Include="..\libsrc\Wi\numeric.c" />
+    <ClCompile Include="..\libsrc\Wi\plugin_gate.c" />
+    <ClCompile Include="..\binsrc\virtodbc\virtodbc.cpp" />
+    <ClCompile Include="..\libsrc\Wi\wi_xid.c" />
+    <ClCompile Include="..\binsrc\virtodbc\winctl.cpp" />
+    <ClCompile Include="..\libsrc\Wi\wirpc.c" />
+    <ClCompile Include="..\binsrc\virtodbc\wizard.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\zcbrowser.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\zcbrowsercombo.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\binsrc\virtodbc\virtodbc.def" />
+    <None Include="..\binsrc\virtodbc\virtodbc.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\binsrc\virtodbc\resource.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\virtodbc\virtodbc.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/virtoledb.vcxproj b/windows/virtoledb.vcxproj
new file mode 100644
index 0000000..a9de723
--- /dev/null
+++ b/windows/virtoledb.vcxproj
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{F357CF96-CF7A-11DA-85E2-A4E5714C712A}</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/virtoledb.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>ole32.lib;oleaut32.lib;odbccp32.lib;rpcrt4.lib;gdi32.lib;comdlg32.lib;threads.lib;dk1t.lib;util.lib;odbc32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtoledb.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\virtoledb\virtoledb.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/virtoledb.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/virtoledb.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/virtoledb.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;BIF_XML;NDEBUG;VIRTOLEDB_CLI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>ole32.lib;oleaut32.lib;odbccp32.lib;rpcrt4.lib;gdi32.lib;comdlg32.lib;threads.lib;dk1t.lib;util.lib;odbc32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtoledb.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\virtoledb\virtoledb.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/virtoledb.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(Configuration)/virtoledb.lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\virtoledb\asserts.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\baseobj.cpp" />
+    <ClCompile Include="..\libsrc\Wi\blobio.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIcr.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIodbc3.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql1.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql2.c" />
+    <ClCompile Include="..\binsrc\virtodbc\CLIsql3_w32.cpp" />
+    <ClCompile Include="..\libsrc\Wi\CLIuti.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIw.c" />
+    <ClCompile Include="..\binsrc\virtoledb\command.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\connobj.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\data.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\datalink.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\dataobj.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\datasource.cpp" />
+    <ClCompile Include="..\libsrc\Wi\datesupp.c" />
+    <ClCompile Include="..\binsrc\virtoledb\db.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\dialog.cpp" />
+    <ClCompile Include="..\libsrc\plugin\dlf.c" />
+    <ClCompile Include="..\binsrc\virtoledb\dllmodule.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\error.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\filedsn.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\globals.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\kvlist.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\lobdata.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\mresults.cpp" />
+    <ClCompile Include="..\libsrc\Wi\mts_client.c" />
+    <ClCompile Include="..\libsrc\Wi\multibyte.c" />
+    <ClCompile Include="..\libsrc\Wi\numeric.c" />
+    <ClCompile Include="..\binsrc\virtoledb\paramdata.cpp" />
+    <ClCompile Include="..\libsrc\Wi\plugin_gate.c" />
+    <ClCompile Include="..\binsrc\virtoledb\properties.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\refcounted.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\rowset.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\rowsetdata.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\rowsetprops.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\session.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\syncobj.cpp" />
+    <ClCompile Include="..\binsrc\virtoledb\util.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\virtodbc.cpp" />
+    <ClCompile Include="..\libsrc\Wi\wi_xid.c" />
+    <ClCompile Include="..\binsrc\virtodbc\winctl.cpp" />
+    <ClCompile Include="..\libsrc\Wi\wirpc.c" />
+    <ClCompile Include="..\binsrc\virtodbc\wizard.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\zcbrowser.cpp" />
+    <ClCompile Include="..\binsrc\virtodbc\zcbrowsercombo.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\binsrc\virtodbc\virtodbc.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\binsrc\virtoledb\asserts.h" />
+    <ClInclude Include="..\binsrc\virtoledb\baseobj.h" />
+    <ClInclude Include="..\binsrc\virtoledb\command.h" />
+    <ClInclude Include="..\binsrc\virtoledb\connobj.h" />
+    <ClInclude Include="..\binsrc\virtoledb\data.h" />
+    <ClInclude Include="..\binsrc\virtoledb\datalink.h" />
+    <ClInclude Include="..\binsrc\virtoledb\dataobj.h" />
+    <ClInclude Include="..\binsrc\virtoledb\db.h" />
+    <ClInclude Include="..\binsrc\virtoledb\dllmodule.h" />
+    <ClInclude Include="..\binsrc\virtoledb\error.h" />
+    <ClInclude Include="..\binsrc\virtoledb\filedsn.h" />
+    <ClInclude Include="..\binsrc\virtoledb\headers.h" />
+    <ClInclude Include="..\binsrc\virtoledb\lobdata.h" />
+    <ClInclude Include="..\binsrc\virtoledb\os.h" />
+    <ClInclude Include="..\binsrc\virtoledb\paramdata.h" />
+    <ClInclude Include="..\binsrc\virtoledb\properties.h" />
+    <ClInclude Include="..\binsrc\virtoledb\refcounted.h" />
+    <ClInclude Include="..\binsrc\virtoledb\resource.h" />
+    <ClInclude Include="..\binsrc\virtoledb\rowset.h" />
+    <ClInclude Include="..\binsrc\virtoledb\rowsetdata.h" />
+    <ClInclude Include="..\binsrc\virtoledb\rowsetprops.h" />
+    <ClInclude Include="..\binsrc\virtoledb\session.h" />
+    <ClInclude Include="..\binsrc\virtoledb\util.h" />
+    <ClInclude Include="..\binsrc\virtoledb\virtoledb.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\virtoledb\virtoledb.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dk1t.vcxproj">
+      <Project>{58f7dcef-d5de-402d-8f50-39b67c8b9e9e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threads.vcxproj">
+      <Project>{b619bb2c-a9ac-453d-ba98-3a8f3217b1ab}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wic.vcxproj">
+      <Project>{a66e395b-18ee-4877-8f0d-386a7bbab370}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/virtuoso-opensource.sln b/windows/virtuoso-opensource.sln
new file mode 100644
index 0000000..51630c6
--- /dev/null
+++ b/windows/virtuoso-opensource.sln
@@ -0,0 +1,552 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blobs", "blobs.vcxproj", "{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "burstoff", "burstoff.vcxproj", "{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cursor", "cursor.vcxproj", "{97D467CE-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cutter", "cutter.vcxproj", "{6E10B655-C324-491F-B202-73565D6B30FB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dk1t", "dk1t.vcxproj", "{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dksrv", "dksrv.vcxproj", "{58867EBA-CA07-4F41-A966-6245FF14773E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getdata", "getdata.vcxproj", "{AFB15514-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_perl", "hosting_perl.vcxproj", "{354809B6-CF7B-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_python", "hosting_python.vcxproj", "{B525A234-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im", "im.vcxproj", "{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ins", "ins.vcxproj", "{C6C66924-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isql", "isql_native.vcxproj", "{AFB1D909-86D0-49DE-8BD8-DF89349F934E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvirtuoso-t", "libvirtuoso_odbc_t.vcxproj", "{FB836C59-41E1-48EA-A59B-460AB56587EE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "isqlo", "isql.vcxproj", "{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scroll", "scroll.vcxproj", "{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "setcurs", "setcurs.vcxproj", "{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threads", "threads.vcxproj", "{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadw", "threadw.vcxproj", "{D3A2882C-410A-4F58-8ACE-A771888073E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tidy", "tidy.vcxproj", "{D9E130E1-7734-43DF-A7EF-15CD95E467EE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tpcc", "tpcc.vcxproj", "{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "urlsimu", "urlsimu.vcxproj", "{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "util.vcxproj", "{031DB868-5294-4738-90BA-F80BB2CEA9DC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtodbc", "virtodbc.vcxproj", "{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtoledb", "virtoledb.vcxproj", "{F357CF96-CF7A-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso-clr-t", "virtuoso_odbc_clr_t.vcxproj", "{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso-javavm-t", "virtuoso_odbc_javavm_t.vcxproj", "{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso-sample-t", "virtuoso_odbc_sample_t.vcxproj", "{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtuoso-t", "virtuoso_odbc_t.vcxproj", "{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370} = {A66E395B-18EE-4877-8F0D-386A7BBAB370}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wi", "wi.vcxproj", "{93051962-7797-49F0-8958-BB1CE60FFE6F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{D3A2882C-410A-4F58-8ACE-A771888073E8} = {D3A2882C-410A-4F58-8ACE-A771888073E8}
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB} = {B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64} = {86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}
+		{58867EBA-CA07-4F41-A966-6245FF14773E} = {58867EBA-CA07-4F41-A966-6245FF14773E}
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE} = {D9E130E1-7734-43DF-A7EF-15CD95E467EE}
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E} = {58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837} = {0C234EF0-7725-4BDA-A1C3-47F5835A3837}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wic", "wic.vcxproj", "{A66E395B-18EE-4877-8F0D-386A7BBAB370}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wikiv", "wikiv.vcxproj", "{A326A0DF-4F93-4DF6-813D-0B64F98B389F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "xml.vcxproj", "{0C234EF0-7725-4BDA-A1C3-47F5835A3837}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcxproj", "{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maildrop", "maildrop.vcxproj", "{C5F98602-E5B9-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtmail", "odbcmail.vcxproj", "{4C517D78-E5B9-11DA-85E2-A4E5714C712A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hosting_php", "hosting_php.vcxproj", "{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "creolewiki", "creolewiki.vcxproj", "{ABE43C46-E1C4-11DB-930B-CD6B662399AA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediawiki", "mediawiki.vcxproj", "{408E2482-2623-11DB-9BB9-97600548391D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbxml2", "wbxml2.vcxproj", "{5582D8D0-DB93-11DB-930B-CD6B662399AA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{93051962-7797-49F0-8958-BB1CE60FFE6F} = {93051962-7797-49F0-8958-BB1CE60FFE6F}
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC} = {031DB868-5294-4738-90BA-F80BB2CEA9DC}
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VirtuosoClient.NET.vc2005", "..\binsrc\VirtuosoClient.Net\VirtuosoClient.NET.vc2005.csproj", "{50E2DD3F-5B5E-4E62-9206-A41824905CD7}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{72ABF3AE-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{7B2A50F2-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{97D467CE-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Any CPU.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|Win32.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|x64.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|x64.Build.0 = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Debug|x86.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Any CPU.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Win32.ActiveCfg = Release|Win32
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|Win32.Build.0 = Release|Win32
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|x64.ActiveCfg = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|x64.Build.0 = Release|x64
+		{6E10B655-C324-491F-B202-73565D6B30FB}.Release|x86.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Any CPU.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|Win32.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|x64.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|x64.Build.0 = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Debug|x86.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Any CPU.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Win32.ActiveCfg = Release|Win32
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|Win32.Build.0 = Release|Win32
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|x64.ActiveCfg = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|x64.Build.0 = Release|x64
+		{58F7DCEF-D5DE-402D-8F50-39B67C8B9E9E}.Release|x86.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Any CPU.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|Win32.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|x64.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|x64.Build.0 = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Debug|x86.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Any CPU.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Win32.ActiveCfg = Release|Win32
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|Win32.Build.0 = Release|Win32
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|x64.ActiveCfg = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|x64.Build.0 = Release|x64
+		{58867EBA-CA07-4F41-A966-6245FF14773E}.Release|x86.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{AFB15514-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{354809B6-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{B525A234-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{C152ADCC-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{C6C66924-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Any CPU.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|Win32.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|x64.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|x64.Build.0 = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Debug|x86.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Any CPU.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Win32.ActiveCfg = Release|Win32
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|Win32.Build.0 = Release|Win32
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|x64.ActiveCfg = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|x64.Build.0 = Release|x64
+		{AFB1D909-86D0-49DE-8BD8-DF89349F934E}.Release|x86.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Any CPU.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|Win32.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|x64.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|x64.Build.0 = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Debug|x86.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Any CPU.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Win32.ActiveCfg = Release|Win32
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|Win32.Build.0 = Release|Win32
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|x64.ActiveCfg = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|x64.Build.0 = Release|x64
+		{FB836C59-41E1-48EA-A59B-460AB56587EE}.Release|x86.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{9FF2579E-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{C9EC4A56-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{DCA407C4-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Any CPU.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|Win32.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|x64.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|x64.Build.0 = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Debug|x86.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Any CPU.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Win32.ActiveCfg = Release|Win32
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|Win32.Build.0 = Release|Win32
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|x64.ActiveCfg = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|x64.Build.0 = Release|x64
+		{B619BB2C-A9AC-453D-BA98-3A8F3217B1AB}.Release|x86.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Any CPU.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|Win32.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|x64.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|x64.Build.0 = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Debug|x86.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Any CPU.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Win32.ActiveCfg = Release|Win32
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|Win32.Build.0 = Release|Win32
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|x64.ActiveCfg = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|x64.Build.0 = Release|x64
+		{D3A2882C-410A-4F58-8ACE-A771888073E8}.Release|x86.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Any CPU.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|Win32.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|x64.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|x64.Build.0 = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Debug|x86.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Any CPU.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Win32.ActiveCfg = Release|Win32
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|Win32.Build.0 = Release|Win32
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|x64.ActiveCfg = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|x64.Build.0 = Release|x64
+		{D9E130E1-7734-43DF-A7EF-15CD95E467EE}.Release|x86.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{E5D3D9AA-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{EF98F42A-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Any CPU.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|Win32.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|x64.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|x64.Build.0 = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Debug|x86.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Any CPU.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Win32.ActiveCfg = Release|Win32
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|Win32.Build.0 = Release|Win32
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|x64.ActiveCfg = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|x64.Build.0 = Release|x64
+		{031DB868-5294-4738-90BA-F80BB2CEA9DC}.Release|x86.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{3D1A94CE-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{F357CF96-CF7A-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Any CPU.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|Win32.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|x64.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|x64.Build.0 = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Debug|x86.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Any CPU.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Win32.ActiveCfg = Release|Win32
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|Win32.Build.0 = Release|Win32
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|x64.ActiveCfg = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|x64.Build.0 = Release|x64
+		{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}.Release|x86.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|Win32.Build.0 = Release|Win32
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|x64.Build.0 = Release|x64
+		{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Any CPU.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|Win32.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|x64.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|x64.Build.0 = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Debug|x86.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Any CPU.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Win32.ActiveCfg = Release|Win32
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|Win32.Build.0 = Release|Win32
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|x64.ActiveCfg = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|x64.Build.0 = Release|x64
+		{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}.Release|x86.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Any CPU.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|Win32.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|x64.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|x64.Build.0 = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Debug|x86.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Any CPU.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Win32.ActiveCfg = Release|Win32
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|Win32.Build.0 = Release|Win32
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|x64.ActiveCfg = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|x64.Build.0 = Release|x64
+		{93051962-7797-49F0-8958-BB1CE60FFE6F}.Release|x86.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Any CPU.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|Win32.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|x64.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|x64.Build.0 = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Debug|x86.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Any CPU.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Win32.ActiveCfg = Release|Win32
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|Win32.Build.0 = Release|Win32
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|x64.ActiveCfg = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|x64.Build.0 = Release|x64
+		{A66E395B-18EE-4877-8F0D-386A7BBAB370}.Release|x86.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Any CPU.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|Win32.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|x64.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|x64.Build.0 = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Debug|x86.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Any CPU.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Win32.ActiveCfg = Release|Win32
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|Win32.Build.0 = Release|Win32
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|x64.ActiveCfg = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|x64.Build.0 = Release|x64
+		{A326A0DF-4F93-4DF6-813D-0B64F98B389F}.Release|x86.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Any CPU.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|Win32.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|x64.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|x64.Build.0 = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Debug|x86.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Any CPU.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Win32.ActiveCfg = Release|Win32
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|Win32.Build.0 = Release|Win32
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|x64.ActiveCfg = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|x64.Build.0 = Release|x64
+		{0C234EF0-7725-4BDA-A1C3-47F5835A3837}.Release|x86.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Any CPU.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|Win32.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|x64.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|x64.Build.0 = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Debug|x86.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Any CPU.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Win32.ActiveCfg = Release|Win32
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|Win32.Build.0 = Release|Win32
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|x64.ActiveCfg = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|x64.Build.0 = Release|x64
+		{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}.Release|x86.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{C5F98602-E5B9-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|Win32.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|x64.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|x64.Build.0 = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Debug|x86.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Any CPU.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|Win32.ActiveCfg = Release|Win32
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|x64.ActiveCfg = Release|x64
+		{4C517D78-E5B9-11DA-85E2-A4E5714C712A}.Release|x86.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Any CPU.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|Win32.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|x64.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|x64.Build.0 = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Debug|x86.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Any CPU.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Win32.ActiveCfg = Release|Win32
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|Win32.Build.0 = Release|Win32
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|x64.ActiveCfg = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|x64.Build.0 = Release|x64
+		{9D059C10-A1AE-11DC-AE66-B7BFA9FB648A}.Release|x86.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Any CPU.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|x64.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|x64.Build.0 = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Debug|x86.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Any CPU.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|Win32.Build.0 = Release|Win32
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|x64.ActiveCfg = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|x64.Build.0 = Release|x64
+		{ABE43C46-E1C4-11DB-930B-CD6B662399AA}.Release|x86.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Any CPU.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|Win32.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|x64.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|x64.Build.0 = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Debug|x86.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Any CPU.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Win32.ActiveCfg = Release|Win32
+		{408E2482-2623-11DB-9BB9-97600548391D}.Release|Win32.Build.0 = Release|Win32
+		{408E2482-2623-11DB-9BB9-97600548391D}.Release|x64.ActiveCfg = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Release|x64.Build.0 = Release|x64
+		{408E2482-2623-11DB-9BB9-97600548391D}.Release|x86.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Any CPU.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|Win32.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|x64.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|x64.Build.0 = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Debug|x86.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Any CPU.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|Win32.ActiveCfg = Release|Win32
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|x64.ActiveCfg = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|x64.Build.0 = Release|x64
+		{5582D8D0-DB93-11DB-930B-CD6B662399AA}.Release|x86.ActiveCfg = Release|x64
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|Win32.ActiveCfg = Debug|x86
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x64.ActiveCfg = Debug|x64
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x64.Build.0 = Debug|x64
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x86.ActiveCfg = Debug|x86
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Debug|x86.Build.0 = Debug|x86
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Win32.ActiveCfg = Release|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|Win32.Build.0 = Release|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x64.ActiveCfg = Release|Any CPU
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x86.ActiveCfg = Release|x86
+		{50E2DD3F-5B5E-4E62-9206-A41824905CD7}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/windows/virtuoso_odbc_clr_t.vcxproj b/windows/virtuoso_odbc_clr_t.vcxproj
new file mode 100644
index 0000000..8016d14
--- /dev/null
+++ b/windows/virtuoso_odbc_clr_t.vcxproj
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>virtuoso-clr-t</ProjectName>
+    <ProjectGuid>{8D07389F-F48A-49B9-BED9-F71FCBACC4A8}</ProjectGuid>
+    <RootNamespace>virtuoso_clr_t</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>libvirtuoso-t.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;advapi32.lib;Mscoree.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-clr-t.exe</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)virtuoso_clr_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>libvirtuoso-t.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;advapi32.lib;Mscoree.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-clr-t.exe</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)virtuoso_clr_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\hosting\mono\basec.c" />
+    <ClCompile Include="..\binsrc\hosting\mono\dotnet.cpp" />
+    <ClCompile Include="..\binsrc\hosting\mono\sql_code_clr.c" />
+    <ClCompile Include="..\binsrc\hosting\mono\sql_code_xslt.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\virtuoso\virtuoso_t.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\binsrc\hosting\mono\import_clr.sql">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\binsrc\hosting\mono\mono_type.xsl">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_xslt.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_xslt.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\binsrc\hosting\mono\virtclr.cs">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+csc /t:library /out:$(TargetDir)/virtclr.dll %(Filename)%(Extension)
+csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs
+gacutil -u virt_http
+gacutil -i $(TargetDir)/virt_http.dll
+
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_http.cs;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+
+csc /t:library /out:$(TargetDir)/virtclr.dll %(Filename)%(Extension)
+csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs
+gacutil -u virt_http
+gacutil -i $(TargetDir)/virt_http.dll
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+csc /t:library /out:$(TargetDir)/virtclr.dll %(Filename)%(Extension)
+csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs
+gacutil -u virt_http
+gacutil -i $(TargetDir)/virt_http.dll
+
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\virt_http.cs;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\virt_http.cs;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+csc /t:library /out:$(TargetDir)/virtclr.dll %(Filename)%(Extension)
+csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs
+gacutil -u virt_http
+gacutil -i $(TargetDir)/virt_http.dll
+
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_http.cs;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+
+csc /t:library /out:$(TargetDir)/virtclr.dll %(Filename)%(Extension)
+csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs
+gacutil -u virt_http
+gacutil -i $(TargetDir)/virt_http.dll
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+csc /t:library /out:$(TargetDir)/virtclr.dll %(Filename)%(Extension)
+csc /t:library /out:$(TargetDir)/virt_http.dll virt_http.cs
+gacutil -u virt_http
+gacutil -i $(TargetDir)/virt_http.dll
+
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\virt_http.cs;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\virt_http.cs;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)\virtclr.dll;$(TargetDir)\virt_http.dll;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="libvirtuoso_odbc_t.vcxproj">
+      <Project>{fb836c59-41e1-48ea-a59b-460ab56587ee}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/virtuoso_odbc_javavm_t.vcxproj b/windows/virtuoso_odbc_javavm_t.vcxproj
new file mode 100644
index 0000000..5a67453
--- /dev/null
+++ b/windows/virtuoso_odbc_javavm_t.vcxproj
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>virtuoso-javavm-t</ProjectName>
+    <ProjectGuid>{02AD88A0-CF7B-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>virtuoso_javavm_t</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>$(JDK_PATH)\include;..\libsrc\xml.new;..\libsrc;$(JDK_PATH)\include\win32;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>libvirtuoso-t.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;$(JDK_PATH)\lib\jvm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-javavm-t.exe</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)virtuoso_javavm_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>$(JDK_PATH)\include;..\libsrc\xml.new;..\libsrc;$(JDK_PATH)\include\win32;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;YYTOKENTYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>libvirtuoso-t.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;$(JDK_PATH)\lib\jvm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-javavm-t.exe</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)virtuoso_javavm_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\biftest\java_code.c" />
+    <ClCompile Include="..\binsrc\tests\biftest\javavm.c" />
+    <ClCompile Include="..\binsrc\tests\biftest\sql_code_clr.c" />
+    <ClCompile Include="..\binsrc\tests\biftest\sql_code_javavm.c" />
+    <ClCompile Include="..\binsrc\tests\biftest\sql_code_xslt.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\virtuoso\virtuoso_t.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\binsrc\tests\biftest\import_clr.sql">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_clr pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_clr.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_clr.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\binsrc\tests\biftest\javavm_type.xsl">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_xslt.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_clr.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(FullPath) > sql_code_xslt.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_xslt.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_xslt pass_bootstrap_cli=1 pl_stats=PLDBG %(Filename)%(Extension) > sql_code_xslt.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_xslt.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\binsrc\tests\biftest\javavm_xml.sql">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_javavm.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_javavm.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_javavm.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_javavm.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sql_code_javavm.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code_javavm.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_javavm.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_javavm.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_javavm.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c
+
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+
+rm -f sql_code_javavm.c
+gawk -f ../../../libsrc/Wi/sql_to_c.awk -v init_name=_javavm pass_bootstrap_cli=1 pl_stats=PLDBG javavm_xml.sql > sql_code_javavm.c
+
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sql_code_javavm.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code_javavm.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="libvirtuoso_odbc_t.vcxproj">
+      <Project>{fb836c59-41e1-48ea-a59b-460ab56587ee}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/virtuoso_odbc_sample_t.vcxproj b/windows/virtuoso_odbc_sample_t.vcxproj
new file mode 100644
index 0000000..cf422f2
--- /dev/null
+++ b/windows/virtuoso_odbc_sample_t.vcxproj
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>virtuoso-sample-t</ProjectName>
+    <ProjectGuid>{0E838FA8-CF7B-11DA-85E2-A4E5714C712A}</ProjectGuid>
+    <RootNamespace>virtuoso_sample_t</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>libvirtuoso-t.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-sample-t.exe</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)virtuoso_sample_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\libsrc\openssl;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;_CONSOLE;_SSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>libvirtuoso-t.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-sample-t.exe</OutputFile>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)virtuoso_sample_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\binsrc\tests\biftest\bif_sample.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\virtuoso\virtuoso_t.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="libvirtuoso_odbc_t.vcxproj">
+      <Project>{fb836c59-41e1-48ea-a59b-460ab56587ee}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/virtuoso_odbc_t.vcxproj b/windows/virtuoso_odbc_t.vcxproj
new file mode 100644
index 0000000..5336b94
--- /dev/null
+++ b/windows/virtuoso_odbc_t.vcxproj
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectName>virtuoso-t</ProjectName>
+    <ProjectGuid>{F4E88BFA-FC96-439D-9E67-0A92AB541EE0}</ProjectGuid>
+    <RootNamespace>virtuoso_t</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/virtuoso_t.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\SDK\$(ShortPlatform)\sslsdk\inc32;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>PACKAGE_VERSION="6.1.5";_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <CompileAs>Default</CompileAs>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\openlink\include;..\xOs\stubs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>threadw.lib;wi.lib;dksrv.lib;util.lib;xml.lib;zlib.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;tidy.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-t.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/virtuoso_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <TypeLibraryName>$(Configuration)/virtuoso_t.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\plugin;..\libsrc\langfunc;..\SDK\$(ShortPlatform)\sslsdk\inc32;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>PACKAGE_VERSION="6.1.5";_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\openlink\include;..\xOs\stubs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>threadw.lib;wi.lib;dksrv.lib;util.lib;xml.lib;zlib.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;tidy.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)virtuoso-t.exe</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/virtuoso_t.pdb</ProgramDatabaseFile>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Wi\shcompo.c" />
+    <ClCompile Include="..\binsrc\virtuoso\viconfig.c" />
+    <ClCompile Include="..\binsrc\virtuoso\viwin32.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\binsrc\virtuoso\virtuoso_t.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\binsrc\virtuoso\viwin32.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="dksrv.vcxproj">
+      <Project>{58867eba-ca07-4f41-a966-6245ff14773e}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="threadw.vcxproj">
+      <Project>{d3a2882c-410a-4f58-8ace-a771888073e8}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="util.vcxproj">
+      <Project>{031db868-5294-4738-90ba-f80bb2cea9dc}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="xml.vcxproj">
+      <Project>{0c234ef0-7725-4bda-a1c3-47f5835a3837}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="zlib.vcxproj">
+      <Project>{86645c8e-3bbe-4e1e-a8ae-c6990b4ecc64}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/wbxml2.vcxproj b/windows/wbxml2.vcxproj
new file mode 100644
index 0000000..2a91561
--- /dev/null
+++ b/windows/wbxml2.vcxproj
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5582D8D0-DB93-11DB-930B-CD6B662399AA}</ProjectGuid>
+    <RootNamespace>wbxml2</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/wbxml2.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;..\SDK\$(ShortPlatform)\wbxml2;..\SDK\$(ShortPlatform)\wbxml2\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;LIBWBXML2_EXPORTS;WBXML_LIB_VERBOSE;WBXML_SUPPORT_WML;WBXML_SUPPORT_WTA;WBXML_SUPPORT_SI;WBXML_SUPPORT_SL;WBXML_SUPPORT_CO;WBXML_SUPPORT_PROV;WBXML_SUPPORT_EMN;WBXML_SUPPORT_DRMREL;WBXML_SUPPORT_OTA_SETTINGS;WBXML_SUPPORT_SYNCML;WBXML_SUPPORT_WV;WBXML_ENCODER_USE_STRTBL;WBXML_WRAPPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;libwbxml2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)wbxml2.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;../SDK/$(ShortPlatform)/wbxml2/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\samples\wbxml2\wbxml2.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/wbxml2.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/wbxml2.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;..\SDK\$(ShortPlatform)\wbxml2;..\SDK\$(ShortPlatform)\wbxml2\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;LIBWBXML2_EXPORTS;WBXML_LIB_VERBOSE;WBXML_SUPPORT_WML;WBXML_SUPPORT_WTA;WBXML_SUPPORT_SI;WBXML_SUPPORT_SL;WBXML_SUPPORT_CO;WBXML_SUPPORT_PROV;WBXML_SUPPORT_EMN;WBXML_SUPPORT_DRMREL;WBXML_SUPPORT_OTA_SETTINGS;WBXML_SUPPORT_SYNCML;WBXML_SUPPORT_WV;WBXML_ENCODER_USE_STRTBL;WBXML_WRAPPERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <PrecompiledHeaderOutputFile>
+      </PrecompiledHeaderOutputFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;libwbxml2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)wbxml2.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;../SDK/$(ShortPlatform)/wbxml2/;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\binsrc\samples\wbxml2\wbxml2.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/wbxml2.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <AdditionalOptions>
+      </AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\plugin\import_gate_virtuoso.c" />
+    <ClCompile Include="..\binsrc\samples\wbxml2\wbxml2.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/wi.vcxproj b/windows/wi.vcxproj
new file mode 100644
index 0000000..a6b26cf
--- /dev/null
+++ b/windows/wi.vcxproj
@@ -0,0 +1,1080 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{93051962-7797-49F0-8958-BB1CE60FFE6F}</ProjectGuid>
+    <RootNamespace>wi</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;%(RootDir)%(Directory)\tidy;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;..\libsrc\Tidy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;YY_NO_UNISTD_H;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;OLD_TIDY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <UndefinePreprocessorDefinitions>YYDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)wi.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\zlib;..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\plugin;..\libsrc\langfunc;%(RootDir)%(Directory)\tidy;..\binsrc\driver;..\SDK\$(ShortPlatform)\sslsdk\inc32;..\libsrc\Tidy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_IMSG;_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;BIF_XML;REPLICATION_SUPPORT=1;REPLICATION_SUPPORT2=1;VIRTUAL_DIR;BIF_XPER;BIF_TIDY;VIRTTP;INC_BACKUP;VAD;_LDAP;YYTOKENTYPE;PLDBG;NDEBUG;YY_NO_UNISTD_H;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC;OLD_TIDY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <UndefinePreprocessorDefinitions>YYDEBUG;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)wi.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Wi\2pc.c" />
+    <ClCompile Include="..\libsrc\Wi\aqueue.c" />
+    <ClCompile Include="..\libsrc\Wi\arith.c" />
+    <ClCompile Include="..\libsrc\Wi\auxfiles.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_audio.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_crypto.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_date.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_dav.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_diff.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_explain.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_file.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_gnw.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_imap.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_intl.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_json.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_kerberoscli.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_ldapcli.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\bif_mts.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_nntp.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_phrasematch.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_pop3.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_regexp.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_repl.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_search_excerpt.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_smtp.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_soap.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_text.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_tidy.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_uuencode.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_xml.c" />
+    <ClCompile Include="..\libsrc\Wi\bif_xper.c" />
+    <ClCompile Include="..\libsrc\Wi\bitmap.c" />
+    <ClCompile Include="..\libsrc\Wi\blob.c" />
+    <ClCompile Include="..\libsrc\Wi\blobio.c" />
+    <ClCompile Include="..\libsrc\Wi\cl_stubs.c" />
+    <ClCompile Include="..\libsrc\Wi\crypt.c" />
+    <ClCompile Include="..\libsrc\Wi\datesupp.c" />
+    <ClCompile Include="..\libsrc\Wi\ddlrun.c" />
+    <ClCompile Include="..\libsrc\Wi\disk.c" />
+    <ClCompile Include="..\libsrc\Wi\dks_esc.c" />
+    <ClCompile Include="..\libsrc\Wi\eqlcomp.c" />
+    <ClCompile Include="..\libsrc\Wi\extent.c" />
+    <ClCompile Include="..\libsrc\Wi\gate.c" />
+    <ClCompile Include="..\libsrc\Wi\hash.c" />
+    <ClCompile Include="..\libsrc\Wi\hosting.c" />
+    <ClCompile Include="..\libsrc\Wi\http.c" />
+    <ClCompile Include="..\libsrc\Wi\http_client.c" />
+    <ClCompile Include="..\libsrc\Wi\insert.c" />
+    <ClCompile Include="..\libsrc\Wi\inxop.c" />
+    <ClCompile Include="..\libsrc\Wi\jso.c" />
+    <ClCompile Include="..\libsrc\Wi\json_l.c" />
+    <ClCompile Include="..\libsrc\Wi\json_p.c" />
+    <ClCompile Include="..\libsrc\Wi\lisprdr.c" />
+    <ClCompile Include="..\libsrc\Wi\lock.c" />
+    <ClCompile Include="..\libsrc\Wi\log.c" />
+    <ClCompile Include="..\libsrc\Wi\map_schema.c" />
+    <ClCompile Include="..\libsrc\Wi\meta.c" />
+    <ClCompile Include="..\libsrc\Wi\mtwrite.c" />
+    <ClCompile Include="..\libsrc\Wi\multibyte.c" />
+    <ClCompile Include="..\libsrc\Wi\neodisk.c" />
+    <ClCompile Include="..\libsrc\Wi\nquad_p.c" />
+    <ClCompile Include="..\libsrc\Wi\numeric.c" />
+    <ClCompile Include="..\libsrc\Wi\obackup.c" />
+    <ClCompile Include="..\libsrc\Wi\odbccat.c" />
+    <ClCompile Include="..\libsrc\Wi\page.c" />
+    <ClCompile Include="..\libsrc\Wi\pldebug.c" />
+    <ClCompile Include="..\libsrc\Wi\plugin_loader.c" />
+    <ClCompile Include="..\libsrc\Wi\rdf_core.c" />
+    <ClCompile Include="..\libsrc\Wi\rdf_mapping_jso.c" />
+    <ClCompile Include="..\libsrc\Wi\rdfbox.c" />
+    <ClCompile Include="..\libsrc\Wi\rdfinf.c" />
+    <ClCompile Include="..\libsrc\Wi\rdfxml_parser.c" />
+    <ClCompile Include="..\libsrc\Wi\recovery.c" />
+    <ClCompile Include="..\libsrc\Wi\regist.c" />
+    <ClCompile Include="..\libsrc\Wi\rltrx.c" />
+    <ClCompile Include="..\libsrc\Wi\row.c" />
+    <ClCompile Include="..\libsrc\Wi\schspace.c" />
+    <ClCompile Include="..\libsrc\Wi\scn3_vsnet.c" />
+    <ClCompile Include="..\libsrc\Wi\search.c" />
+    <ClCompile Include="..\libsrc\Wi\search_in.c" />
+    <ClCompile Include="..\libsrc\Wi\security.c" />
+    <ClCompile Include="..\libsrc\Wi\shuric.c" />
+    <ClCompile Include="..\libsrc\Wi\sort.c" />
+    <ClCompile Include="..\libsrc\Wi\space.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql2sql.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql2sqltext.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_core.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_l.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_p.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_qm.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_rdb2rdf.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_sff.c" />
+    <ClCompile Include="..\libsrc\Wi\sparql_tree.c" />
+    <ClCompile Include="..\libsrc\Wi\sparqld.c" />
+    <ClCompile Include="..\libsrc\Wi\sparul2sql.c" />
+    <ClCompile Include="..\libsrc\Wi\sql3_vc.c" />
+    <ClCompile Include="..\libsrc\Wi\sql_code.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_1.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_2pc.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_adm.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_auto.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_blog.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_cache.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_cache_impl.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_dav.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_dbp.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_ddk.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_imsg.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_pldbg.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_repl.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_sparql.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_sparql_init.c" />
+    <ClCompile Include="..\libsrc\Wi\sql_code_sys.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_uddi.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_vad.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_vdb.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sql_code_ws.c">
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
+      <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Disabled</Optimization>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Wi\sqlbif.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlbif2.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlcomp.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlcomp2.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlcost.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlcr.c" />
+    <ClCompile Include="..\libsrc\Wi\sqldf.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlexp.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlgen.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlhash.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlintrp.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlinx.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlo.c" />
+    <ClCompile Include="..\libsrc\Wi\sqloby.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlocr.c" />
+    <ClCompile Include="..\libsrc\Wi\sqloinv.c" />
+    <ClCompile Include="..\libsrc\Wi\sqloinx.c" />
+    <ClCompile Include="..\libsrc\Wi\sqloprt.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlorder.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlovdb.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlpfn.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlprocc.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlprt.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlrbuf.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlrcomp.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlrrun.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlrun.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlsrv.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlstmts.c" />
+    <ClCompile Include="..\libsrc\Wi\sqltrig.c" />
+    <ClCompile Include="..\libsrc\Wi\sqltype.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlver.c" />
+    <ClCompile Include="..\libsrc\Wi\sqlview.c" />
+    <ClCompile Include="..\libsrc\Wi\srvcr.c" />
+    <ClCompile Include="..\libsrc\Wi\srvmultibyte.c" />
+    <ClCompile Include="..\libsrc\Wi\srvstat.c" />
+    <ClCompile Include="..\libsrc\Wi\string.c" />
+    <ClCompile Include="..\libsrc\Wi\subseq.c" />
+    <ClCompile Include="..\libsrc\Wi\text.c" />
+    <ClCompile Include="..\libsrc\Wi\trans.c" />
+    <ClCompile Include="..\libsrc\Wi\turtle_l.c" />
+    <ClCompile Include="..\libsrc\Wi\turtle_p.c" />
+    <ClCompile Include="..\libsrc\Wi\uname_const_decl.c" />
+    <ClCompile Include="..\libsrc\Wi\update.c" />
+    <ClCompile Include="..\libsrc\Wi\uuencode.c" />
+    <ClCompile Include="..\libsrc\Wi\wi_xid.c" />
+    <ClCompile Include="..\libsrc\Wi\wirpc.c" />
+    <ClCompile Include="..\libsrc\Wi\wiservic.c" />
+    <ClCompile Include="..\libsrc\Wi\xmlenc-dec.c" />
+    <ClCompile Include="..\libsrc\Wi\xmlenc.c" />
+    <ClCompile Include="..\libsrc\Wi\xmlenc_algos.c" />
+    <ClCompile Include="..\libsrc\Wi\xmllazy.c" />
+    <ClCompile Include="..\libsrc\Wi\xmlschema.c" />
+    <ClCompile Include="..\libsrc\Wi\xmlsearch.c" />
+    <ClCompile Include="..\libsrc\Wi\xmlsql.c" />
+    <ClCompile Include="..\libsrc\Wi\xmltree.c" />
+    <ClCompile Include="..\libsrc\Wi\xpath.c" />
+    <ClCompile Include="..\libsrc\Wi\xpathp.c" />
+    <ClCompile Include="..\libsrc\Wi\xpf.c" />
+    <ClCompile Include="..\libsrc\Wi\xpscn_vsnet.c" />
+    <ClCompile Include="..\libsrc\Wi\xqf.c" />
+    <ClCompile Include="..\libsrc\Wi\xslt.c" />
+    <ClCompile Include="..\libsrc\Wi\xslt_fmt.c" />
+    <ClCompile Include="..\libsrc\Wi\xslt_opt.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\Wi\map_schema.h" />
+    <ClInclude Include="..\libsrc\Wi\2pc.h" />
+    <ClInclude Include="..\libsrc\Wi\2pc_client.h" />
+    <ClInclude Include="..\libsrc\Wi\arith.h" />
+    <ClInclude Include="..\libsrc\Wi\bif_text.h" />
+    <ClInclude Include="..\libsrc\Wi\bif_xper.h" />
+    <ClInclude Include="..\libsrc\Wi\blobio.h" />
+    <ClInclude Include="..\libsrc\Wi\CLI.h" />
+    <ClInclude Include="..\libsrc\Wi\crsr.h" />
+    <ClInclude Include="..\libsrc\Wi\date.h" />
+    <ClInclude Include="..\libsrc\Wi\datesupp.h" />
+    <ClInclude Include="..\libsrc\Wi\eqlcomp.h" />
+    <ClInclude Include="..\libsrc\Wi\hosting.h" />
+    <ClInclude Include="..\libsrc\Wi\http.h" />
+    <ClInclude Include="..\libsrc\Wi\http_client.h" />
+    <ClInclude Include="..\libsrc\Wi\iodbcinst.h" />
+    <ClInclude Include="..\libsrc\Wi\ksrvext.h" />
+    <ClInclude Include="..\libsrc\Wi\ksrvextphp.h" />
+    <ClInclude Include="..\libsrc\Wi\license.h" />
+    <ClInclude Include="..\libsrc\Wi\lisprdr.h" />
+    <ClInclude Include="..\libsrc\Wi\list2.h" />
+    <ClInclude Include="..\libsrc\Wi\log.h" />
+    <ClInclude Include="..\libsrc\Wi\ltrx.h" />
+    <ClInclude Include="..\libsrc\Wi\msdtc.h" />
+    <ClInclude Include="..\libsrc\Wi\mts.h" />
+    <ClInclude Include="..\libsrc\Wi\mts_client.h" />
+    <ClInclude Include="..\libsrc\Wi\mts_com.h" />
+    <ClInclude Include="..\libsrc\Wi\multibyte.h" />
+    <ClInclude Include="..\libsrc\Wi\numeric.h" />
+    <ClInclude Include="..\libsrc\Wi\odbcinc.h" />
+    <ClInclude Include="..\libsrc\Wi\pldebug.h" />
+    <ClInclude Include="..\libsrc\Wi\rdf_core.h" />
+    <ClInclude Include="..\libsrc\Wi\recovery.h" />
+    <ClInclude Include="..\libsrc\Wi\remote.h" />
+    <ClInclude Include="..\libsrc\Wi\rendezvous.h" />
+    <ClInclude Include="..\libsrc\Wi\repl.h" />
+    <ClInclude Include="..\libsrc\Wi\replsr.h" />
+    <ClInclude Include="..\libsrc\Wi\schspace.h" />
+    <ClInclude Include="..\libsrc\Wi\security.h" />
+    <ClInclude Include="..\libsrc\Wi\sha.h" />
+    <ClInclude Include="..\libsrc\Wi\shuric.h" />
+    <ClInclude Include="..\libsrc\Wi\soap.h" />
+    <ClInclude Include="..\libsrc\Wi\sparql.h" />
+    <ClInclude Include="..\libsrc\Wi\sparql2sql.h" />
+    <ClInclude Include="..\libsrc\Wi\sparql_p.h" />
+    <ClInclude Include="..\libsrc\Wi\sql3.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlbif.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlcmps.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlcomp.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlcstate.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlfn.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlintrp.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlnode.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlo.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlocr.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlofn.h" />
+    <ClInclude Include="..\libsrc\Wi\sqloinv.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlopcod.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlpar.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlparext.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlpfn.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlrcomp.h" />
+    <ClInclude Include="..\libsrc\Wi\sqltype.h" />
+    <ClInclude Include="..\libsrc\Wi\sqltype_c.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlver.h" />
+    <ClInclude Include="..\libsrc\Wi\sqlwords.h" />
+    <ClInclude Include="..\libsrc\Wi\srvmultibyte.h" />
+    <ClInclude Include="..\libsrc\Wi\srvstat.h" />
+    <ClInclude Include="..\libsrc\Wi\statuslog.h" />
+    <ClInclude Include="..\libsrc\Wi\strlike.h" />
+    <ClInclude Include="..\libsrc\Wi\subseq.h" />
+    <ClInclude Include="..\libsrc\Wi\text.h" />
+    <ClInclude Include="..\libsrc\Wi\turtle_p.h" />
+    <ClInclude Include="..\libsrc\Wi\uuencode_impl.h" />
+    <ClInclude Include="..\libsrc\Wi\virtext.h" />
+    <ClInclude Include="..\libsrc\Wi\virtpwd.h" />
+    <ClInclude Include="..\libsrc\Wi\wi.h" />
+    <ClInclude Include="..\libsrc\Wi\wi_xid.h" />
+    <ClInclude Include="..\libsrc\Wi\widd.h" />
+    <ClInclude Include="..\libsrc\Wi\widisk.h" />
+    <ClInclude Include="..\libsrc\Wi\widv.h" />
+    <ClInclude Include="..\libsrc\Wi\wifn.h" />
+    <ClInclude Include="..\libsrc\Wi\wirpce.h" />
+    <ClInclude Include="..\libsrc\Wi\wiservic.h" />
+    <ClInclude Include="..\libsrc\Wi\xml.h" />
+    <ClInclude Include="..\libsrc\Wi\xmlenc.h" />
+    <ClInclude Include="..\libsrc\Wi\xmlenc_algos.h" />
+    <ClInclude Include="..\libsrc\Wi\xmlenc_test.h" />
+    <ClInclude Include="..\libsrc\Wi\xmlgen.h" />
+    <ClInclude Include="..\libsrc\Wi\xmlnode.h" />
+    <ClInclude Include="..\libsrc\Wi\xmlres.h" />
+    <ClInclude Include="..\libsrc\Wi\xmltree.h" />
+    <ClInclude Include="..\libsrc\Wi\xpath.h" />
+    <ClInclude Include="..\libsrc\Wi\xpathp.h" />
+    <ClInclude Include="..\libsrc\Wi\xpathp_impl.h" />
+    <ClInclude Include="..\libsrc\Wi\xpf.h" />
+    <ClInclude Include="..\libsrc\Wi\xqf.h" />
+    <ClInclude Include="..\libsrc\Wi\xslt_impl.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\libsrc\Wi\json.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+rm -f json_l.c
+flex -8 -Pjsonyy -ojson_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f json_l.c
+flex -8 -Pjsonyy -ojson_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)json_l.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)json_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f json_l.c
+flex -8 -Pjsonyy -ojson_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f json_l.c
+flex -8 -Pjsonyy -ojson_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)json_l.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)json_l.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\json.y">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+rm -f json_p.c
+rm -f json_p.h
+bison -y -vd -pjsonyy json.y -ojson_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f json_p.c
+rm -f json_p.h
+bison -y -vd -pjsonyy json.y -ojson_p.c
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)json_p.c;%(RootDir)%(Directory)json_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)json_p.c;%(RootDir)%(Directory)json_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f json_p.c
+rm -f json_p.h
+bison -y -vd -pjsonyy json.y -ojson_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f json_p.c
+rm -f json_p.h
+bison -y -vd -pjsonyy json.y -ojson_p.c
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)json_p.c;%(RootDir)%(Directory)json_p.h;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)json_p.c;%(RootDir)%(Directory)json_p.h;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)json_p.c;%(RootDir)%(Directory)json_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)json_p.c;%(RootDir)%(Directory)json_p.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\nquad_p.y">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f nquad_p.c
+rm -f nquad_p.h
+bison -y -vd -pnqyy nquad_p.y -onquad_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f nquad_p.c
+rm -f nquad_p.h
+bison -y -vd -pnqyy nquad_p.y -onquad_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)nquad_p.c;%(RootDir)%(Directory)nquad_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)nquad_p.c;%(RootDir)%(Directory)nquad_p.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\scn3.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f scn3_vsnet.c
+flex -oscn3_vsnet.c %(FullPath)
+flex -Pscn3splityy -oscn3split.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)scn3_vsnet.c;%(RootDir)%(Directory)scn3split.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+rm -f scn3_vsnet.c
+flex -oscn3_vsnet.c %(FullPath)
+flex -Pscn3splityy -oscn3split.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f scn3_vsnet.c
+flex -oscn3_vsnet.c %(FullPath)
+flex -Pscn3splityy -oscn3split.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)scn3_vsnet.c;%(RootDir)%(Directory)scn3split.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)scn3_vsnet.c;%(RootDir)%(Directory)scn3split.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f scn3_vsnet.c
+flex -oscn3_vsnet.c %(FullPath)
+flex -Pscn3splityy -oscn3split.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)scn3_vsnet.c;%(RootDir)%(Directory)scn3split.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f scn3_vsnet.c
+flex -oscn3_vsnet.c %(FullPath)
+flex -Pscn3splityy -oscn3split.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f scn3_vsnet.c
+flex -oscn3_vsnet.c %(FullPath)
+flex -Pscn3splityy -oscn3split.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)scn3_vsnet.c;%(RootDir)%(Directory)scn3split.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)scn3_vsnet.c;%(RootDir)%(Directory)scn3split.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\sparql_l.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_l.c
+flex -8 -Psparyy -osparql_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)sparql_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f sparql_l.c
+flex -8 -Psparyy -osparql_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_l.c
+flex -8 -Psparyy -osparql_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)sparql_l.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)sparql_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_l.c
+flex -8 -Psparyy -osparql_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)sparql_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f sparql_l.c
+flex -8 -Psparyy -osparql_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_l.c
+flex -8 -Psparyy -osparql_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)sparql_l.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)sparql_l.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\sparql_p.y">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_p.c
+rm -f sparql_p.h
+bison -y -vd -psparyy sparql_p.y -osparql_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)sparql_p.c;%(RootDir)%(Directory)sparql_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f sparql_p.c
+rm -f sparql_p.h
+bison -y -vd -psparyy sparql_p.y -osparql_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_p.c
+rm -f sparql_p.h
+bison -y -vd -psparyy sparql_p.y -osparql_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)sparql_p.c;%(RootDir)%(Directory)sparql_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)sparql_p.c;%(RootDir)%(Directory)sparql_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_p.c
+rm -f sparql_p.h
+bison -y -vd -psparyy sparql_p.y -osparql_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)sparql_p.c;%(RootDir)%(Directory)sparql_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f sparql_p.c
+rm -f sparql_p.h
+bison -y -vd -psparyy sparql_p.y -osparql_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sparql_p.c
+rm -f sparql_p.h
+bison -y -vd -psparyy sparql_p.y -osparql_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)sparql_p.c;%(RootDir)%(Directory)sparql_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)sparql_p.c;%(RootDir)%(Directory)sparql_p.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\sql3.y">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sql3.c
+rm -f sql3.h
+bison -y  -vd sql3.y -osql3.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)sql3.c;%(RootDir)%(Directory)sql3.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f sql3.c
+rm -f sql3.h
+bison -y  -vd sql3.y -osql3.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sql3.c
+rm -f sql3.h
+bison -y  -vd sql3.y -osql3.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)sql3.c;%(RootDir)%(Directory)sql3.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)sql3.c;%(RootDir)%(Directory)sql3.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sql3.c
+rm -f sql3.h
+bison -y  -vd sql3.y -osql3.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)sql3.c;%(RootDir)%(Directory)sql3.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f sql3.c
+rm -f sql3.h
+bison -y  -vd sql3.y -osql3.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f sql3.c
+rm -f sql3.h
+bison -y  -vd sql3.y -osql3.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)sql3.c;%(RootDir)%(Directory)sql3.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)sql3.c;%(RootDir)%(Directory)sql3.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\sql_to_c.awk">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+$(ProjectDir)\sqlcode.bat
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\..\..\binsrc\vspx\vspx.xsl;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code.c;%(RootDir)%(Directory)\sql_code_1.c;%(RootDir)%(Directory)\sql_code_ddk.c;%(RootDir)%(Directory)\sql_code_adm.c;%(RootDir)%(Directory)\sql_code_dav.c;%(RootDir)%(Directory)\sql_code_vad.c;%(RootDir)%(Directory)\sql_code_dbp.c;%(RootDir)%(Directory)\sql_code_uddi.c;%(RootDir)%(Directory)\sql_code_imsg.c;%(RootDir)%(Directory)\sql_code_auto.c;%(RootDir)%(Directory)\sql_code_2pc.c;%(RootDir)%(Directory)\rdf_mapping_jso.h;%(RootDir)%(Directory)\rdf_mapping_jso.c;%(RootDir)%(Directory)\rdf_mapping_jso.ttl;%(RootDir)%(Directory)\rdf_mapping_jso.ttl-sample;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+$(ProjectDir)\sqlcode.bat
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+$(ProjectDir)\sqlcode.bat
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\..\..\binsrc\vspx\vspx.xsl;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\..\..\binsrc\vspx\vspx.xsl;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sql_code.c;%(RootDir)%(Directory)\sql_code_1.c;%(RootDir)%(Directory)\sql_code_ddk.c;%(RootDir)%(Directory)\sql_code_adm.c;%(RootDir)%(Directory)\sql_code_dav.c;%(RootDir)%(Directory)\sql_code_vad.c;%(RootDir)%(Directory)\sql_code_dbp.c;%(RootDir)%(Directory)\sql_code_uddi.c;%(RootDir)%(Directory)\sql_code_imsg.c;%(RootDir)%(Directory)\sql_code_auto.c;%(RootDir)%(Directory)\sql_code_2pc.c;%(RootDir)%(Directory)\rdf_mapping_jso.h;%(RootDir)%(Directory)\rdf_mapping_jso.c;%(RootDir)%(Directory)\rdf_mapping_jso.ttl;%(RootDir)%(Directory)\rdf_mapping_jso.ttl-sample;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sql_code.c;%(RootDir)%(Directory)\sql_code_1.c;%(RootDir)%(Directory)\sql_code_ddk.c;%(RootDir)%(Directory)\sql_code_adm.c;%(RootDir)%(Directory)\sql_code_dav.c;%(RootDir)%(Directory)\sql_code_vad.c;%(RootDir)%(Directory)\sql_code_dbp.c;%(RootDir)%(Directory)\sql_code_uddi.c;%(RootDir)%(Directory)\sql_code_imsg.c;%(RootDir)%(Directory)\sql_code_auto.c;%(RootDir)%(Directory)\sql_code_2pc.c;%(RootDir)%(Directory)\rdf_mapping_jso.h;%(RootDir)%(Directory)\rdf_mapping_jso.c;%(RootDir)%(Directory)\rdf_mapping_jso.ttl;%(RootDir)%(Directory)\rdf_mapping_jso.ttl-sample;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+$(ProjectDir)\sqlcode.bat
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\..\..\binsrc\vspx\vspx.xsl;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code.c;%(RootDir)%(Directory)\sql_code_1.c;%(RootDir)%(Directory)\sql_code_ddk.c;%(RootDir)%(Directory)\sql_code_adm.c;%(RootDir)%(Directory)\sql_code_dav.c;%(RootDir)%(Directory)\sql_code_vad.c;%(RootDir)%(Directory)\sql_code_dbp.c;%(RootDir)%(Directory)\sql_code_uddi.c;%(RootDir)%(Directory)\sql_code_imsg.c;%(RootDir)%(Directory)\sql_code_auto.c;%(RootDir)%(Directory)\sql_code_2pc.c;%(RootDir)%(Directory)\rdf_mapping_jso.h;%(RootDir)%(Directory)\rdf_mapping_jso.c;%(RootDir)%(Directory)\rdf_mapping_jso.ttl;%(RootDir)%(Directory)\rdf_mapping_jso.ttl-sample;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+$(ProjectDir)\sqlcode.bat
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+$(ProjectDir)\sqlcode.bat
+cd $(ProjectDir)
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\..\..\binsrc\vspx\vspx.xsl;%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\..\..\binsrc\vspx\vspx.xsl;%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sql_code.c;%(RootDir)%(Directory)\sql_code_1.c;%(RootDir)%(Directory)\sql_code_ddk.c;%(RootDir)%(Directory)\sql_code_adm.c;%(RootDir)%(Directory)\sql_code_dav.c;%(RootDir)%(Directory)\sql_code_vad.c;%(RootDir)%(Directory)\sql_code_dbp.c;%(RootDir)%(Directory)\sql_code_uddi.c;%(RootDir)%(Directory)\sql_code_imsg.c;%(RootDir)%(Directory)\sql_code_auto.c;%(RootDir)%(Directory)\sql_code_2pc.c;%(RootDir)%(Directory)\rdf_mapping_jso.h;%(RootDir)%(Directory)\rdf_mapping_jso.c;%(RootDir)%(Directory)\rdf_mapping_jso.ttl;%(RootDir)%(Directory)\rdf_mapping_jso.ttl-sample;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sql_code.c;%(RootDir)%(Directory)\sql_code_1.c;%(RootDir)%(Directory)\sql_code_ddk.c;%(RootDir)%(Directory)\sql_code_adm.c;%(RootDir)%(Directory)\sql_code_dav.c;%(RootDir)%(Directory)\sql_code_vad.c;%(RootDir)%(Directory)\sql_code_dbp.c;%(RootDir)%(Directory)\sql_code_uddi.c;%(RootDir)%(Directory)\sql_code_imsg.c;%(RootDir)%(Directory)\sql_code_auto.c;%(RootDir)%(Directory)\sql_code_2pc.c;%(RootDir)%(Directory)\rdf_mapping_jso.h;%(RootDir)%(Directory)\rdf_mapping_jso.c;%(RootDir)%(Directory)\rdf_mapping_jso.ttl;%(RootDir)%(Directory)\rdf_mapping_jso.ttl-sample;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\sqlwords.gperf">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd %(RootDir)%(Directory)
+rm -f sqlwords.h
+gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e %27s/char \*keyword/char *keiiyword/g%27 >sqlwords.h
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd %(RootDir)%(Directory)
+rm -f sqlwords.h
+gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e %27s/char \*keyword/char *keiiyword/g%27 >sqlwords.h
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\sqlwords.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\sqlwords.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f sqlwords.h
+gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e %27s/char \*keyword/char *keiiyword/g%27 >sqlwords.h
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f sqlwords.h
+gperf -aCDGptr -Kkeiiyword -L ANSI-C -k1,2,3,6,9,$ sqlwords.gperf -Nlex_hash_kw | sed -e %27s/char \*keyword/char *keiiyword/g%27 >sqlwords.h
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sqlwords.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sqlwords.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\turtle_l.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_l.c
+flex -8 -Pttlyy -oturtle_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)turtle_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f turtle_l.c
+flex -8 -Pttlyy -oturtle_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_l.c
+flex -8 -Pttlyy -oturtle_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)turtle_l.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)turtle_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_l.c
+flex -8 -Pttlyy -oturtle_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)turtle_l.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f turtle_l.c
+flex -8 -Pttlyy -oturtle_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_l.c
+flex -8 -Pttlyy -oturtle_l.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)turtle_l.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)turtle_l.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\turtle_p.y">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_p.c
+rm -f turtle_p.h
+bison -y -vd -pttlyy turtle_p.y -oturtle_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)turtle_p.c;%(RootDir)%(Directory)turtle_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f turtle_p.c
+rm -f turtle_p.h
+bison -y -vd -pttlyy turtle_p.y -oturtle_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_p.c
+rm -f turtle_p.h
+bison -y -vd -pttlyy turtle_p.y -oturtle_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\turtle_p.c;%(RootDir)%(Directory)\turtle_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\turtle_p.c;%(RootDir)%(Directory)\turtle_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_p.c
+rm -f turtle_p.h
+bison -y -vd -pttlyy turtle_p.y -oturtle_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)turtle_p.c;%(RootDir)%(Directory)turtle_p.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f turtle_p.c
+rm -f turtle_p.h
+bison -y -vd -pttlyy turtle_p.y -oturtle_p.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f turtle_p.c
+rm -f turtle_p.h
+bison -y -vd -pttlyy turtle_p.y -oturtle_p.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)turtle_p.c;%(RootDir)%(Directory)turtle_p.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)turtle_p.c;%(RootDir)%(Directory)turtle_p.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\xpathp.y">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpathp.c
+rm -f xpathp.h
+bison -y -vd -pxpyy xpathp.y -oxpathp.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)xpathp.c;%(RootDir)%(Directory)xpathp.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f xpathp.c
+rm -f xpathp.h
+bison -y -vd -pxpyy xpathp.y -oxpathp.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpathp.c
+rm -f xpathp.h
+bison -y -vd -pxpyy xpathp.y -oxpathp.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)xpathp.c;%(RootDir)%(Directory)xpathp.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)xpathp.c;%(RootDir)%(Directory)xpathp.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpathp.c
+rm -f xpathp.h
+bison -y -vd -pxpyy xpathp.y -oxpathp.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)xpathp.c;%(RootDir)%(Directory)xpathp.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f xpathp.c
+rm -f xpathp.h
+bison -y -vd -pxpyy xpathp.y -oxpathp.c
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpathp.c
+rm -f xpathp.h
+bison -y -vd -pxpyy xpathp.y -oxpathp.c
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)xpathp.c;%(RootDir)%(Directory)xpathp.h;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)xpathp.c;%(RootDir)%(Directory)xpathp.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\libsrc\Wi\xpscn.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpscn_vsnet.c
+flex -i -oxpscn_vsnet.c -Pxpyy %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)xpscn_vsnet.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f xpscn_vsnet.c
+flex -i -oxpscn_vsnet.c -Pxpyy %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpscn_vsnet.c
+flex -i -oxpscn_vsnet.c -Pxpyy %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)xpscn_vsnet.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)xpscn_vsnet.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpscn_vsnet.c
+flex -i -oxpscn_vsnet.c -Pxpyy %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)xpscn_vsnet.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f xpscn_vsnet.c
+flex -i -oxpscn_vsnet.c -Pxpyy %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f xpscn_vsnet.c
+flex -i -oxpscn_vsnet.c -Pxpyy %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)xpscn_vsnet.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)xpscn_vsnet.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\libsrc\Wi\sparqlwords.gperf">
+      <FileType>Document</FileType>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd %(RootDir)%(Directory)
+rm -f sparqlwords.h
+gperf -aCDGptr -Kkwd -L ANSI-C -k1,2,3,5,7,$ sparqlwords.gperf --ignore-case -Nsparql_lex_hash_kw >sparqlwords.h
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\sparqlwords.h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd %(RootDir)%(Directory)
+rm -f sparqlwords.h
+gperf -aCDGptr -Kkwd -L ANSI-C -k1,2,3,5,7,$ sparqlwords.gperf --ignore-case -Nsparql_lex_hash_kw >sparqlwords.h
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\sparqlwords.h;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/windows/wic.vcxproj b/windows/wic.vcxproj
new file mode 100644
index 0000000..83d9a8d
--- /dev/null
+++ b/windows/wic.vcxproj
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A66E395B-18EE-4877-8F0D-386A7BBAB370}</ProjectGuid>
+    <RootNamespace>wic</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\langfunc;..\libsrc\plugin;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)wic.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\binsrc\driver;..\libsrc\langfunc;..\libsrc\plugin;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;DLDAPI_WINDOWS;NO_IMPORT;PLDBG;YYTOKENTYPE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)wic.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Wi\blobio.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIcr.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIodbc3.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql1.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql2.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql3.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIsql3W.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIuti.c" />
+    <ClCompile Include="..\libsrc\Wi\CLIw.c" />
+    <ClCompile Include="..\libsrc\Wi\datesupp.c" />
+    <ClCompile Include="..\libsrc\plugin\dlf.c" />
+    <ClCompile Include="..\libsrc\Wi\mts_client.c" />
+    <ClCompile Include="..\libsrc\Wi\multibyte.c" />
+    <ClCompile Include="..\libsrc\Wi\numeric.c" />
+    <ClCompile Include="..\libsrc\Wi\pldbgcli.c" />
+    <ClCompile Include="..\libsrc\Wi\plugin_gate.c" />
+    <ClCompile Include="..\libsrc\Wi\wi_xid.c" />
+    <ClCompile Include="..\libsrc\Wi\wirpc.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\Wi\wirpce.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/wikiv.vcxproj b/windows/wikiv.vcxproj
new file mode 100644
index 0000000..0aab809
--- /dev/null
+++ b/windows/wikiv.vcxproj
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A326A0DF-4F93-4DF6-813D-0B64F98B389F}</ProjectGuid>
+    <RootNamespace>wikiv</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>X64</TargetEnvironment>
+      <TypeLibraryName>$(Configuration)/wikiv.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>/MACHINE:AMD64 %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)wikiv.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\appsrc\ODS-Wiki\plugin\wikiv.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/wikiv.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TypeLibraryName>$(Configuration)/wikiv.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\binsrc\driver;..\libsrc\Wi;..\libsrc\langfunc;..\libsrc\Xml.new;..\libsrc\plugin;..\libsrc\Dk;..\binsrc\driver\include;..\libsrc\Xml.new;..\libsrc\util\win32;..\libsrc;..\SDK\$(ShortPlatform)\sslsdk\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_SSL;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;YYTOKENTYPE;DLDAPI_WINDOWS;NO_IMPORT;VIRTTP;NDEBUG;_USRDLL;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+      <AdditionalIncludeDirectories>..\libsrc\Wi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalOptions>
+      </AdditionalOptions>
+      <AdditionalDependencies>dk1t.lib;threadw.lib;util.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)wikiv.dll</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <AdditionalLibraryDirectories>$(ShortPlatform)/$(Configuration)/;../SDK/$(ShortPlatform)/sslsdk/out32dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreSpecificDefaultLibraries>LIBCD.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <ModuleDefinitionFile>..\appsrc\ODS-Wiki\plugin\wikiv.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(Configuration)/wikiv.pdb</ProgramDatabaseFile>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>$(ShortPlatform)/$(Configuration)/$(ProjectName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\plugin\import_gate_virtuoso.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\maclex.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\wikilex.c" />
+    <ClCompile Include="..\appsrc\ODS-Wiki\plugin\wikiv.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\appsrc\ODS-Wiki\plugin\maclex.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f maclex.c
+flex -8 -Pmacyy -omaclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f maclex.c
+flex -8 -Pmacyy -omaclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f maclex.c
+flex -8 -Pmacyy -omaclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\maclex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f maclex.c
+flex -8 -Pmacyy -omaclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\maclex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f maclex.c
+flex -8 -Pmacyy -omaclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f maclex.c
+flex -8 -Pmacyy -omaclex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\maclex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\maclex.c;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\appsrc\ODS-Wiki\plugin\wikilex.l">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f wikilex.c
+flex -8 -Pwikiyy -owikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+cd %(RootDir)%(Directory)
+rm -f wikilex.c
+flex -8 -Pwikiyy -owikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+cd %(RootDir)%(Directory)
+rm -f wikilex.c
+flex -8 -Pwikiyy -owikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\wikilex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f wikilex.c
+flex -8 -Pwikiyy -owikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\wikilex.c;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+cd %(RootDir)%(Directory)
+rm -f wikilex.c
+flex -8 -Pwikiyy -owikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+cd %(RootDir)%(Directory)
+rm -f wikilex.c
+flex -8 -Pwikiyy -owikilex.c %(FullPath)
+cd $(ProjectDir)
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\wikilex.c;%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\wikilex.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="wi.vcxproj">
+      <Project>{93051962-7797-49f0-8958-bb1ce60ffe6f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/windows/xml.vcxproj b/windows/xml.vcxproj
new file mode 100644
index 0000000..432887b
--- /dev/null
+++ b/windows/xml.vcxproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{0C234EF0-7725-4BDA-A1C3-47F5835A3837}</ProjectGuid>
+    <RootNamespace>xml</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+    <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\libsrc\langfunc;..\libsrc\plugin;..\libsrc\util\pcrelib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <UndefinePreprocessorDefinitions>XML_NS;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)xml.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <AdditionalIncludeDirectories>..\libsrc\xml.new;..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\Wi;..\libsrc\zlib;..\libsrc\langfunc;..\libsrc\plugin;..\libsrc\util\pcrelib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <UndefinePreprocessorDefinitions>XML_NS;%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)xml.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\Xml.new\charclasses.c" />
+    <ClCompile Include="..\libsrc\Xml.new\datatypes.c" />
+    <ClCompile Include="..\libsrc\Xml.new\dtd.c" />
+    <ClCompile Include="..\libsrc\Xml.new\encodings.c">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+    </ClCompile>
+    <ClCompile Include="..\libsrc\Xml.new\html_mode.c" />
+    <ClCompile Include="..\libsrc\Xml.new\schema.c" />
+    <ClCompile Include="..\libsrc\Xml.new\schema_fsm.c" />
+    <ClCompile Include="..\libsrc\Xml.new\xml_ecm.c" />
+    <ClCompile Include="..\libsrc\Xml.new\xmlgram.c" />
+    <ClCompile Include="..\libsrc\Xml.new\xmlparser.c" />
+    <ClCompile Include="..\libsrc\Xml.new\xmlread.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\libsrc\Xml.new\xhtml_ent.gperf">
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">gperf -aCDGptr -Kentity -k1,2,3,4,5,$ %(RootDir)%(Directory)xhtml_ent.gperf -Nxhtml_ent_gperf > %(RootDir)%(Directory)xhtml_ent.h
+
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">gperf -aCDGptr -Kentity -k1,2,3,4,5,$ %(RootDir)%(Directory)xhtml_ent.gperf -Nxhtml_ent_gperf > %(RootDir)%(Directory)xhtml_ent.h
+
+</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)xhtml_ent.h</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xhtml_ent.h;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\libsrc\Xml.new\charclasses.h" />
+    <ClInclude Include="..\libsrc\Xml.new\encodings.h" />
+    <ClInclude Include="..\libsrc\Xml.new\html_mode.h" />
+    <ClInclude Include="..\libsrc\Xml.new\schema.h" />
+    <ClInclude Include="..\libsrc\Xml.new\xml_ecm.h" />
+    <ClInclude Include="..\libsrc\Xml.new\xmlparser.h" />
+    <ClInclude Include="..\libsrc\Xml.new\xmlparser_impl.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/windows/zlib.vcxproj b/windows/zlib.vcxproj
new file mode 100644
index 0000000..7310240
--- /dev/null
+++ b/windows/zlib.vcxproj
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{86645C8E-3BBE-4E1E-A8AE-C6990B4ECC64}</ProjectGuid>
+    <RootNamespace>zlib</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+      <ShortPlatform Condition="'$(Platform)' == 'Win32'">x86</ShortPlatform>
+      <ShortPlatform Condition="'$(Platform)' == 'x64'">x64</ShortPlatform>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ShortPlatform)\$(Configuration)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)zlib.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Midl />
+    <ClCompile>
+      <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
+      <Optimization>Full</Optimization>
+      <OmitFramePointers>false</OmitFramePointers>
+      <AdditionalIncludeDirectories>..\libsrc;..\libsrc\Dk;..\libsrc\util\win32;..\libsrc\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_LIBC;INPROCESS_CLIENT;_MBCS;WIN32;WINDOWS;_Windows;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <ExceptionHandling>
+      </ExceptionHandling>
+      <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+    </ClCompile>
+    <ResourceCompile>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0419</Culture>
+    </ResourceCompile>
+    <Lib>
+      <OutputFile>$(OutDir)zlib.lib</OutputFile>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\libsrc\zlib\adler32.c" />
+    <ClCompile Include="..\libsrc\zlib\compress.c" />
+    <ClCompile Include="..\libsrc\zlib\crc32.c" />
+    <ClCompile Include="..\libsrc\zlib\deflate.c" />
+    <ClCompile Include="..\libsrc\zlib\gzclose.c" />
+    <ClCompile Include="..\libsrc\zlib\gzlib.c" />
+    <ClCompile Include="..\libsrc\zlib\gzread.c" />
+    <ClCompile Include="..\libsrc\zlib\gzwrite.c" />
+    <ClCompile Include="..\libsrc\zlib\infback.c" />
+    <ClCompile Include="..\libsrc\zlib\inffast.c" />
+    <ClCompile Include="..\libsrc\zlib\inflate.c" />
+    <ClCompile Include="..\libsrc\zlib\inftrees.c" />
+    <ClCompile Include="..\libsrc\zlib\trees.c" />
+    <ClCompile Include="..\libsrc\zlib\uncompr.c" />
+    <ClCompile Include="..\libsrc\zlib\zutil.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

-- 
Git repository for pkg-virtuoso



More information about the Pkg-virtuoso-commits mailing list